import type { NormalizedDriverMessage } from "./messages.js"; import type { DriverEventEnvelope, RuntimeDriver, RuntimeDriverRunHandle, RuntimeDriverRunInput } from "../types.js"; interface ChildExitInfo { code: number | null; signal: NodeJS.Signals | null; } /** * Try to locate the SDK's underlying native child process on the query * object and listen for its death. Returns a detach callback. The SDK does * not promise this shape, so we probe defensively: if the field is missing * or doesn't quack like an EventEmitter, we log once and return a noop — * the run will still complete normally on the cooperative path. Issue #7. */ /** @internal exported for tests; not part of the public driver surface */ export declare function attachChildDeathWatchdog(request: unknown, graceMs: number, controller: AbortController, onDeath: (info: ChildExitInfo) => void | Promise): () => void; export declare function parseClaudeSdkMessage(message: unknown): NormalizedDriverMessage[]; export interface ClaudeSdkDriverOptions { /** * Grace window (ms) between observing the SDK's native child exit and * aborting the in-process iterator. Lets in-flight messages drain. Issue #7. */ childDeathGraceMs?: number; } export declare class ClaudeSdkDriver implements RuntimeDriver { readonly name: "claude-sdk"; private readonly childDeathGraceMs; constructor(options?: ClaudeSdkDriverOptions); run(input: RuntimeDriverRunInput, onEventRaw: (event: DriverEventEnvelope) => Promise | void): RuntimeDriverRunHandle; private buildOptions; } export {};