/** * Exa Provider Adapter (tech-plan §7, Control Mapping, Field Normalization, * Failure Normalization). * * Implements the Exa Provider Descriptor with Search, Reader, Research, * and Diagnostics capabilities on top of the direct-HTTP transport * (`./client.ts`). The Adapter owns credentials, transport lifecycle, * Provider field mapping, and failure normalization; shared execution * owns cache and retry policy. * * Boundary rules (ARCHITECTURE.md §2): * - May import capability types, normalized errors, Provider identity * types, and the Adapter-local credential and transport Modules. * - Must NOT import command presentation, output mode, or another * Provider's Adapter. * * Field mapping (tech-plan §7 Exa mapping): * Search results[].title -> title * Search results[].url -> url * Search results[].highlights[] -> summary (join with " ") * Search results[].author -> source * Search results[].publishedDate -> date * Search results[].score -> (dropped) * * Control mapping (SearchControls → Exa-native API params): * domain -> includeDomains: [domain] * recency -> startPublishedDate (oneDay→now-1d ISO, etc.) * contentSize -> type (medium/omitted→"auto", high→"deep") * topic -> category (general→omit, news→"news", * finance→"financial report") * location -> userLocation */ import type { ProviderDescriptor } from "../types.js"; import type { AsyncJobStateFile } from "../../lib/async-job-state.js"; import { type ExaTransportDeps } from "./client.js"; /** * Dependencies the Exa Adapter accepts. The unified `transport` seam * carries `fetch` and timer injection. Production defaults to the global * `fetch` and timers inside the transport Module. */ export interface ExaAdapterDependencies { /** Optional transport injection (fetch, timers, env). */ readonly transport?: ExaTransportDeps; /** Optional Research state-file port (tech-plan §3). */ readonly researchStateFile?: AsyncJobStateFile; /** * Optional Research state dir. Exa's research has no create-lock * today, but the seam knob ships (#158) so the file/dir pairing * contract is uniform across the async-job adapters and the dir is * the single source the default state file derives from. */ readonly researchStateDir?: string; } /** * Build the Exa Provider Descriptor. The descriptor advertises the Exa * capability set (search, reader, research, diagnostics) and constructs * an Adapter whose Capabilities own credentials, transport, Provider * field mapping, and failure normalization. Construction is * side-effect-free; the transport is invoked per Capability call. Tests * pass `transport` (typically a fake-fetch wrapper); production uses * the no-argument factory which resolves to the global `fetch` and * timers inside the transport Module. */ export declare function createExaDescriptor(dependencies?: ExaAdapterDependencies): ProviderDescriptor; //# sourceMappingURL=adapter.d.ts.map