/** * Kagi Provider Adapter. * * Implements Search for the Kagi API (GET /api/v1/search, or * GET /api/v0/enrich/news when controls.topic === "news"). * * Wire response is `{ meta, data: [...] }`. Only `t === 0` rows with a * truthy url are results; `t: 1` rows are related-query suggestions and * MUST be dropped (SCHEMA.md — pinned). * * Field mapping: * item.title -> title * item.url -> url * item.snippet -> summary * item.published -> date (when present) * source -> "kagi" (constant) * * Control mapping (SearchControls → wire): * domain -> `site: ` query prefix * topic:news -> v0 enrich/news endpoint (same q/limit) * recency -> REJECTED (UnsupportedOptionError) * location -> REJECTED (UnsupportedOptionError) * contentSize -> REJECTED (UnsupportedOptionError) * type -> REJECTED (UnsupportedOptionError) * * Auth is `Authorization: Bot ` — Kagi wire truth, not Bearer. * Diagnostics probes the same v1 search endpoint with q=scoutline-doctor-probe&limit=1. */ 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 KagiTransportDeps } from "./client.js"; export interface KagiAdapterDependencies { readonly transport?: KagiTransportDeps; } export declare class KagiAdapter implements ProviderAdapter { private readonly context; readonly id: ProviderId; readonly search: SearchCapability; readonly diagnostics: DiagnosticsCapability; constructor(context: ProviderContext, deps?: KagiAdapterDependencies); } export declare function createKagiDescriptor(deps?: KagiAdapterDependencies): ProviderDescriptor; //# sourceMappingURL=adapter.d.ts.map