/** * The outcome of classifying one ACP `session/update`. A `message` still needs * its chunks coalesced by the client; a `tool-call`/`tool-result` is a complete * canonical event body; an `ignored` update carries no canonical meaning. */ export type AcpClassifiedUpdate = { readonly kind: "message"; readonly role: "assistant" | "reasoning" | "user"; /** Groups streamed chunks into one message; `null` when the agent omits it. */ readonly messageId: string | null; readonly text: string; } | { readonly kind: "tool-call"; readonly callId: string; readonly name: string; readonly args: unknown; } | { readonly kind: "tool-result"; readonly callId: string; readonly ok: boolean; readonly result: unknown; } | { readonly kind: "ignored"; readonly sessionUpdate: string; readonly reason: string; }; /** * Classify one ACP `update` object (the `params.update` of a `session/update` * notification). Pure and total — every input yields a classification, malformed * or unknown ones landing in `ignored` with a diagnostic reason rather than * throwing, so a single odd notification can never abort an ingestion stream. */ export declare function classifyUpdate(value: unknown): AcpClassifiedUpdate; /** One place where ACP is thinner than a native transcript (ADR 0062 §5). */ export interface AcpFidelityGap { /** The canonical concept that cannot be fully reconstructed from ACP alone. */ readonly concept: string; /** Why ACP cannot carry it, and what a native transcript (slice 3) preserves. */ readonly detail: string; } /** * The enumerated resume-fidelity gaps in the ACP backend — the documented reason * (ADR 0062 §5) the slice 3 native normaliser exists as a fallback path. This is * a derived source of truth: `normalize.test.ts` asserts the mapping above only * ever emits `assistant`/`reasoning`/`user`/`tool-call`/`tool-result`, so any * canonical event ACP *cannot* produce is accounted for here. */ export declare const ACP_FIDELITY_GAPS: readonly AcpFidelityGap[];