/** * cursor spawn adapter: runs one subagent as a headless `cursor-agent -p` * subprocess with `--output-format json`. * * Contract notes (LIVE-VERIFIED 2026-07-17 against cursor-agent * 2026.07.16-899851b: schema-gated triage + text stages round-trip via * `--adapter cursor`, session_id parses from the envelope): * - `cursor-agent -p "" --output-format json` prints a single result * envelope modeled on Claude Code's (`{type: "result", is_error, result, * session_id, …}`). * - `--trust` is required: headless runs refuse untrusted workspaces (exit 1, * "Workspace Trust Required") — see the argv comment below. * - `--force` is required: print mode has no channel for an operator to approve * shell commands, so Smart Auto can leave a child able to patch files but * unable to test or commit them. * - Envelope drift guard: when stdout doesn't parse as JSON but the process * exited 0, the raw stdout is returned as the reply text. * - No per-run cost surface → undefined. No max-turns equivalent → `maxTurns` * accepted and ignored (documented in the CLI docs page). */ import type { AdapterInvocation, AdapterRawResult } from "../adapters/types.js"; import type { Spawner, SpawnRequest, SpawnResult } from "./types.js"; /** Exported for unit tests (no live binary to test against). */ export declare function parseCursorOutput(stdout: string): { text: string; sessionId?: string; isError: boolean; }; export declare function buildCursorInvocation(req: SpawnRequest): AdapterInvocation; export declare function normalizeCursorResult(raw: AdapterRawResult): SpawnResult; export declare const cursorSpawner: Spawner; //# sourceMappingURL=spawn-cursor.d.ts.map