/** * Capability probe: one bounded operation per candidate protocol that forces * the server-side web tool to run and checks the reply for the structured * evidence that it did. A protocol claim is trusted only after this passes — * several "Responses-compatible" gateways accept the `web_search` tool field * and silently ignore it (DeepSeek documents that unknown tool types are * ignored), which is exactly the failure mode static protocol detection * cannot see. The probe is what makes the auto-disable decision honest. * @module dsh-github-copilot/probe */ import type { ResponsesWebSearchToolType, SearchPlanCandidate } from './plan.ts'; import type { ResolvedRequestAuth } from './copilot-request.ts'; /** The outcome of probing one candidate. */ export interface ProbeOutcome { readonly supported: boolean; /** Why the candidate failed, for the auto-disable diagnostic. */ readonly detail: string; /** * The Responses tool spelling the probe verified (openai-responses only). * May differ from the candidate's primary spelling when the fallback won; * the wire must use this verified value. */ readonly webSearchToolType?: ResponsesWebSearchToolType; } /** * Probe one candidate protocol with a bounded request sequence. The verdict is * structural: a Responses reply must contain a `web_search_call` item and a * Messages reply must contain a `web_search_tool_result` block; anything else * — HTTP error, unparseable body, silent tool ignore — is "not supported". * The timeout bounds the WHOLE probe, including credential resolution; the * probe never throws — every failure becomes a verdict. * @param candidate - the resolved endpoint facts to verify. * @param resolveApiKey - resolves the candidate's credential reference. * @param timeoutMs - bound on the whole probe. * @param signal - optional owner lifecycle cancellation; abort forbids later attempts. * @returns the verdict and a diagnostic detail. */ export declare function probeCandidate(candidate: SearchPlanCandidate, resolveApiKey: (candidate: SearchPlanCandidate) => Promise, timeoutMs: number, signal?: AbortSignal): Promise; //# sourceMappingURL=probe.d.ts.map