import { type KnowledgeAdapter, type KnowledgePosture } from "@vendoai/core"; /** How one client names its own failures. Everything else about speaking `vendo/knowledge-wire@1` is identical for Cloud and BYO, so this is the whole difference between them. */ export interface WireErrors { /** The transport never answered. */ unreachable: (cause: unknown) => Error; /** Consulted before the wire's status mapping, for statuses this client reads as its own (Cloud folds any 401 into a key problem, whatever the response body claims). Return undefined to fall through. */ rejected?: (status: number) => Error | undefined; /** 2xx with a body that is not the wire. */ badBody: (route: string) => Error; } export interface WireClientOptions { /** The five wire paths are appended directly to this base. */ base: string; bearer?: string; posture: KnowledgePosture; fetch?: typeof fetch; errors: WireErrors; } /** The one `vendo/knowledge-wire@1` client. Both shipped engines are this function plus a base url, a bearer, a posture and an error flavour, so a retry, a header or a status mapping is added in exactly one place. Optional members exist exactly when the declared posture covers them (presence is conformance-tested, not promised) — a full-posture caller gets fetch/upsert/remove, a search-only endpoint's adapter simply lacks them. */ export declare function knowledgeWireAdapter(options: WireClientOptions): KnowledgeAdapter; //# sourceMappingURL=wire.d.ts.map