/** * Bocha AI Provider Adapter. * * Implements Search (and Diagnostics in T4) for the Bocha AI API * (POST /v1/web-search). * * The wire response is a Bing-compatible wrapped envelope: results * live at `data.webPages.value[]` — never the JSON root (SCHEMA.md). * Application-level envelope codes are checked here: success only when * HTTP 2xx AND (`code` undefined or `code === 200`); any other code is * an error with a curated message (the raw `msg` never surfaces). * * Field mapping: * value[].name -> title * value[].url -> url (rows without url are dropped) * value[].summary|snippet -> summary (summary preferred) * value[].dateLastCrawled -> date * value[].siteName -> source ("bocha (|web)") * * Control mapping (SearchControls → wire body): * domain -> `site: ` query prefix * recency -> freshness (Scoutline enum passes through 1:1) * contentSize -> summary: true (always pinned on the body) * topic -> appended to query via applySearchTopic * type -> REJECTED (UnsupportedOptionError) * location -> REJECTED (UnsupportedOptionError) */ import type { ProviderAdapter, ProviderContext, ProviderDescriptor, ProviderId } from "../types.js"; import type { SearchCapability } from "../../capabilities/search.js"; import type { DiagnosticsCapability } from "../../capabilities/diagnostics.js"; import { type BochaTransportDeps } from "./client.js"; export interface BochaAdapterDependencies { readonly transport?: BochaTransportDeps; } export declare class BochaAdapter implements ProviderAdapter { private readonly context; readonly id: ProviderId; readonly search: SearchCapability; readonly diagnostics: DiagnosticsCapability; constructor(context: ProviderContext, deps?: BochaAdapterDependencies); } export declare function createBochaDescriptor(deps?: BochaAdapterDependencies): ProviderDescriptor; //# sourceMappingURL=adapter.d.ts.map