/** * Host-loop request snapshot registry: observes the `llm/stream` waterfall * and keeps the latest agent-loop request per session so Route A can reuse * the exact system/tools/messages the host already sent (spec §2.2). * @module dsh-continual-harness */ import type { Context } from '@deepseek-ai/cordis'; import { type RequestMessage, type ToolSchema } from '@deepseek-ai/dsh-llm'; import type { SessionId } from '@deepseek-ai/dsh-session'; /** Read-only view of the latest agent-loop request for one session. */ export interface HostRequestSnapshot { provider: string; model: string; system?: string; tools?: readonly ToolSchema[]; messages: readonly RequestMessage[]; sessionId: SessionId; } /** Per-session lookup of the last captured host-loop request. */ export interface HostRequestRegistry { latestFor(sessionId: SessionId): HostRequestSnapshot | undefined; } /** * Install the `llm/stream` waterfall listener. Only requests carrying the * process-local agent-loop marker are captured; one-shot/planner calls (no * marker) are ignored so a planner call can never shadow the host prefix. * The listener returns `next()` unchanged — it only observes. */ export declare function installHostRequestSnapshot(ctx: Context): HostRequestRegistry; //# sourceMappingURL=request-snapshot.d.ts.map