export declare const RUN_WAIT_DEFAULT_S = 1800; export declare const RUN_POLL_MS = 5000; export interface RunCall { readonly origin: string; readonly token: string; readonly prompt: string; readonly conversationId: string; readonly agent?: string; readonly waitS: number; readonly land: boolean; } export type RunStatus = "completed" | "parked" | "failed" | "timeout"; export interface RunOutcome { readonly status: RunStatus; readonly conversationId: string; readonly branch?: string; readonly summary: string; readonly landed?: boolean; } export declare const runRequestBody: (call: RunCall) => Record; export declare const conversationIdFor: (env: Readonly>, random: () => string) => string; export interface AgentCard { readonly status: string; readonly title?: string; readonly failure?: string; readonly branch?: string; readonly attention?: Readonly>; } export declare const readCard: (body: unknown) => AgentCard | undefined; export declare const settledOf: (card: AgentCard) => RunStatus | undefined; export declare const summaryOfCard: (card: AgentCard, status: RunStatus) => string; export declare const exitOfRun: (status: RunStatus) => number; export type ParsedRun = { kind: "call"; call: RunCall; } | { kind: "help"; } | { kind: "error"; message: string; }; export declare const RUN_USAGE = "intentic-gate run: start an agent turn in your sandbox and exit on how it ended\n\nusage: intentic-gate run [options] [prompt...]\n\nThe prompt is the arguments joined, or stdin when none are given.\n\noptions:\n --url the sandbox's own address (or env INTENTIC_URL)\n --token a control token minted on Sandbox \u2192 Access (or env INTENTIC_TOKEN); drive scope, or\n land scope with --land\n --agent which agent runs it (claude, codex, \u2026); default: the sandbox's own\n --conversation the conversation to open or continue; default: one per CI run\n --wait how long to wait for the turn to settle (default 1800)\n --land merge the branch into the main tree once the turn completes\n -h, --help this text\n\nexit codes: 0 completed \u00B7 1 parked on a person, or failed \u00B7 2 the exchange itself failed, or the turn\nwas still running at the deadline (it keeps working in the sandbox)."; export declare const parseRunArgs: (argv: readonly string[], env: Readonly>, random: () => string) => ParsedRun; export declare const originOf: (url: string) => string | undefined; export interface RunDeps { readonly fetch: (url: string, init: { method: string; headers: Record; body?: string; }) => Promise<{ ok: boolean; status: number; text: () => Promise; }>; readonly sleep: (ms: number) => Promise; readonly now: () => number; } export declare class RunExchangeError extends Error { } export declare const detailOf: (text: string) => string; export declare const runExchange: (call: RunCall, deps: RunDeps) => Promise; //# sourceMappingURL=run.d.ts.map