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 GrokTurnState = StructuredRunnerTurnState; export declare function buildGrokArgs(session: SessionSnapshot, prompt: string): string[]; /** Apply one official Grok Build `streaming-json` event. */ export declare function applyGrokEvent(state: GrokTurnState, event: Record): string | null; export declare class GrokRunner implements StructuredRunnerAdapter { private readonly spawnProcess; private readonly execHost?; constructor(spawnProcess?: typeof spawn, execHost?: StructuredExecHost | undefined); start(context: StructuredRunnerContext, observer: StructuredRunnerObserver): StructuredRunnerExecution; }