/** * Brave Diagnostics Capability (brave-tech-plan §3, §7; T5). * * Probes Brave connectivity with a single, cheapest-possible request * — one `/res/v1/web/search` GET with a stub query — so the doctor * command can verify a credential authenticates without a generative * request. Brave has no `search_depth`-style knob (unlike Tavily), so * the probe sends a bare `q` and no other params. * * The probe performs exactly ONE attempt. Shared execution owns the * retry policy; this transport never retries. The doctor command * catches the throw on failure and records a redacted error entry. * * When `options.probe` is false, `invoke` resolves immediately without * touching the network — the doctor command skips probing unconfigured * Providers (passing `probe: false`) before reaching this Capability. * * Boundary rules (ARCHITECTURE.md §2): * - May import the diagnostics capability contract, Adapter-local * credentials, Adapter-local search transport, and normalized errors. * - Must NOT import command presentation or another Provider's Adapter. */ import type { DiagnosticsCapability } from "../../capabilities/diagnostics.js"; import { type BraveTransportDeps } from "./client.js"; /** * Options for the Brave DiagnosticsCapability. The API key is resolved * from `env`; transport dependencies (`fetch`, timer) are injectable * for deterministic tests through the unified `transport` seam. */ export interface BraveDiagnosticsCapabilityOptions { readonly env: NodeJS.ProcessEnv; readonly transport?: BraveTransportDeps; } /** * Build the Brave DiagnosticsCapability. The probe performs ONE * `/res/v1/web/search` request with a stub query (`scoutline-doctor- * probe`) and no params — the cheapest credible probe. Shared * execution owns the retry policy; this transport performs exactly one * attempt per invocation. * * When `options.probe` is false, `invoke` resolves immediately without * touching the network — the doctor command skips probing unconfigured * Providers before reaching this Capability. */ export declare function createBraveDiagnosticsCapability(options: BraveDiagnosticsCapabilityOptions): DiagnosticsCapability; //# sourceMappingURL=diagnostics.d.ts.map