import type { FailureSummary } from "../execution/failure.js"; import { type SessionHandle } from "../execution/open-session.js"; import { type QuestionMode } from "../interpretation/question.js"; /** Captured from `session_close`: a refused session open (#345) or a crash * with no open turn (#347) leaves a session failure for `closed` to carry. */ export interface CloseInfo { exitCode: number | null; cause: string; failure?: FailureSummary; } export type SessionOrigin = "fresh" | "resumed"; export interface JsonSessionArgs { readonly handle: SessionHandle; readonly sessionId: string; readonly harness: string; readonly hcnVersion: string; readonly questions?: QuestionMode; readonly origin: SessionOrigin; /** Read after close - the runner's final exitCode and cause. */ readonly getCloseInfo: () => CloseInfo; /** Read after close - ids the runner accepted and never * delivered. Each owes the consumer a rejection (RFC S003). */ readonly getDroppedIds?: () => readonly string[]; /** Injected for tests; defaults to process.stdin / process.stdout. */ readonly input?: NodeJS.ReadableStream; readonly write?: (line: string) => boolean; readonly onDrain?: (fn: () => void) => void; } export declare const runJsonSession: (a: JsonSessionArgs) => Promise; //# sourceMappingURL=session-json.d.ts.map