/** * Is a provider's response envelope structurally usable by the response mappers? * * Moved out of `backend.ts` unchanged (HOTSPOT-10). The bodies below are byte-identical to the * ones that lived there; only the two names `backend.ts` still calls became exports. * * ⚠ It answers about FORM, never about content: whether the discriminator the mapper switches on * is present and carries the field that discriminator promises. That is the same side of the * repair boundary as the tool-call validator — the relay never judges what a model said, only * whether the shape it arrived in can be read. * * ⚠ This module imports `isRecord` and nothing else. Keep it that way: it sits beneath the * transport it validates for, and a dependency pointing back at `backend.js` would be a cycle. */ export type ResponseProtocol = "openai-chat" | "anthropic-messages" | "openai-responses"; /** * Validate only the protocol structure the response mappers rely on. Optional identifiers, * model names and usage remain optional because several compatible providers legitimately omit * them; the required response discriminator must not be optional, or `{}` becomes a successful * empty assistant message. */ export declare function invalidEnvelopeReason(value: unknown, protocol: ResponseProtocol, streamed: boolean): string | null;