import { spawn } from "node:child_process"; import type { StructuredExecHost } from "./structured-exec-host.js"; import type { StructuredRunnerAdapter, StructuredRunnerContext, StructuredRunnerExecution, StructuredRunnerObserver, StructuredRunnerTurnState } from "./structured-runner.js"; import type { SessionSnapshot } from "./types.js"; export type OpenCodeTurnState = StructuredRunnerTurnState; export declare function buildOpenCodeArgs(session: SessionSnapshot): string[]; /** Apply one OpenCode NDJSON event to the current transport-neutral turn state. */ export declare function applyOpenCodeEvent(turnState: OpenCodeTurnState, event: Record, createId?: () => string): string | null; /** Production adapter for the external `opencode run --format json` process. */ export declare class OpenCodeRunner implements StructuredRunnerAdapter { private readonly spawnProcess; private readonly execHost?; constructor(spawnProcess?: typeof spawn, execHost?: StructuredExecHost | undefined); start(context: StructuredRunnerContext, observer: StructuredRunnerObserver): StructuredRunnerExecution; }