/** One thing the harness did, as it reported it. The producer pins this shape on the wire; the receiver reads it as sent. */ export type WorkbenchEvent = { kind: "step-start"; step: number; maxSteps: number; activeTools: readonly string[]; } | { kind: "step-end"; step: number; stopReason: string; durationMs: number; usage?: { inputTokens?: number; outputTokens?: number; }; } | { kind: "tool"; step: number; toolCallId: string; name: string; argsPreview: string; status: "ok" | "denied" | "error"; guard?: "run" | "ask" | "block"; approval?: "auto" | "approved" | "timed-out" | "denied"; durationMs: number; } | { kind: "context"; estTokens: number; windowTokens: number; triggerTokens: number; } | { kind: "compaction"; reason: "trigger" | "overflow-retry"; summary: string; } | { kind: "shed"; dropped: number; } | { kind: "loadout"; active: readonly string[]; searchedIn: readonly string[]; alwaysActive: readonly string[]; withheldCount: number; } | { kind: "subagent"; label: string; steps: number; maxSteps: number; report?: string; } | { kind: "error"; code: string; message: string; } | { kind: "step-limit"; steps: number; }; /** One event, addressed: whose turn, where in it, and which agent spoke. */ export type WorkbenchPart = { turnId: string; seq: number; at: number; agent: "resident" | "screen" | "subagent"; event: WorkbenchEvent; }; /** One turn's parts, oldest `seq` first. */ export interface WorkbenchTurn { turnId: string; parts: readonly WorkbenchPart[]; } /** One `onData` chunk, offered. Anything that is not a debug part is ignored, * so the caller needs no branch of its own. */ export declare function publishWorkbenchPart(chunk: { type: string; data?: unknown; }): void; export declare function subscribeWorkbench(listener: () => void): () => void; export declare function workbenchFeed(): readonly WorkbenchTurn[]; /** Test/host teardown: forget every turn. */ export declare function resetWorkbench(): void; /** Every turn the harness has reported diagnostics for, oldest turn first. */ export declare function useWorkbenchFeed(): readonly WorkbenchTurn[];