/** * Agent-agnostic injection adapter contract (epic #2098, child #4). * * The daemon guarantees: one inject() at a time (FIFO), and every inject() * call corresponds to a HUMAN Accept press recorded with the relay before the * adapter runs (acceptance criterion 3). */ export interface AdapterContext { repoRoot: string; /** Narration hook — daemon log (and optionally a Slack thread). */ onProgress(line: string): void; /** Persisted session/thread id from a previous run, when resuming. */ resumeSessionId?: string; /** Called when the adapter learns its session/thread id (persist for resume). */ onSessionId?(sessionId: string): void; } export interface InjectOutcome { /** * completed — the session ran the instruction to a final result. * handed_off — the instruction was delivered to a human/manual surface * (paste mode); execution is outside the daemon's sight. * error — the adapter failed; summary explains why. The relay ack * still fires (result carried in the ack detail — the * injection_failed enum is a deferred backend follow-up). */ result: 'completed' | 'handed_off' | 'error'; /** Bounded human-readable outcome for the ack detail + status envelope. */ summary: string; } export interface AgentAdapter { readonly id: 'claude-code' | 'codex' | 'paste'; /** Cheap availability probe — binary/config present, SDK importable. */ available(ctx: AdapterContext): Promise; /** Warm/create the session. May no-op; called once before the first inject. */ start(ctx: AdapterContext): Promise; /** Deliver one human-approved instruction. Serialized by the daemon. */ inject(instruction: string, ctx: AdapterContext): Promise; stop(): Promise; } /** Bound a summary for ack detail (relay caps detail at 2000 chars). */ export declare function boundSummary(text: string, max?: number): string; //# sourceMappingURL=types.d.ts.map