/** * `botmux goal run` — a small, daemon-free product entrypoint for one real * headless goal. It deliberately reuses the v3 run envelope, journal, drive * lease, worker fence, ephemeral pool, and manifest validator. There is no * second scheduler or mutable result store here. */ import { type BotConfig } from '../../bot-registry.js'; import { readAndValidateManifest } from './manifest.js'; import type { ManifestFile, RunNode, ValidateManifest } from './contract.js'; export declare const GOAL_RUN_REQUEST_SCHEMA: "botmux.goal-run-request/v1"; export declare const GOAL_RUN_RESULT_SCHEMA: "botmux.goal-run-result/v1"; export declare const GOAL_RUN_EXIT: { readonly succeeded: 0; readonly failed: 10; readonly blocked: 11; readonly cancelled: 12; readonly conflict: 13; readonly error: 14; }; export type GoalRunTerminalState = 'succeeded' | 'failed' | 'blocked' | 'cancelled'; export interface GoalRunResultV1 { schemaVersion: typeof GOAL_RUN_RESULT_SCHEMA; runId: string | null; state: GoalRunTerminalState | 'conflict' | 'error'; exitCode: number; summary?: string; error?: { code: string; message: string; }; artifacts?: ManifestFile[]; runDirectory?: { path: string; stability: 'informative-only'; }; } interface SignalEmitter { on(signal: NodeJS.Signals, listener: () => void): unknown; off(signal: NodeJS.Signals, listener: () => void): unknown; } export interface GoalCliDependencies { loadBots: () => BotConfig[]; makeRunNode: (bots: BotConfig[]) => RunNode; validateManifest: ValidateManifest; readValidatedManifest: typeof readAndValidateManifest; signalEmitter: SignalEmitter; now: () => Date; newRunId: () => string; stdout: Pick & { fd?: number; }; stderr: Pick; /** Process env read by the machine-wide workflow kill-switch. Injectable so * tests can flip BOTMUX_WORKFLOW_ENABLED without mutating process.env. */ env: NodeJS.ProcessEnv; } export declare function projectGoalRunTerminal(runId: string, runDir: string, deps: GoalCliDependencies): Promise; /** Dispatcher for `botmux goal `. Returns an exit code; never calls exit. */ export declare function cmdGoal(sub: string, rest: string[], overrides?: Partial): Promise; export {}; //# sourceMappingURL=goal-cli.d.ts.map