import type { WebSearchProvider, WebSearchRequest, WebSearchResult } from '@deepseek-ai/dsh-web'; /** Explicit cross-provider spending policy; disabled unless the operator selects DeepSeek. */ export type SearchFallback = 'none' | 'deepseek'; /** Selection captured from the initiating request, never from a global default. */ export interface SearchSelection { readonly provider: string; readonly model: string; } /** Public, non-secret provenance retained outside the canonical WebSearchResult. */ export interface SearchRouting { readonly requestedProvider: 'github-copilot-hosted'; readonly actualProvider: 'github-copilot-hosted' | 'deepseek-official'; readonly model: string; readonly fallback: boolean; readonly reason?: string; } /** Delegated results have no plugin provenance and retain their original object identity. */ export interface RoutedSearchResult { readonly result: WebSearchResult; readonly routing?: SearchRouting; } /** Operation-local dependencies; providers must be owned instances, not private-registry lookups. */ export interface SessionSearchDependencies { readonly selection: SearchSelection | undefined; readonly managedOwned: boolean; readonly fallback: SearchFallback; readonly copilot: WebSearchProvider; readonly delegate: (request: WebSearchRequest, signal?: AbortSignal) => Promise; readonly resolveDeepSeek: () => Promise; /** Recheck captured owner/account generation after every asynchronous boundary. */ readonly canContinue: () => boolean; } /** Match only the canonical route or a verified plugin-owned managed route. */ export declare function isCopilotSearchSelection(selection: SearchSelection | undefined, managedOwned: boolean): boolean; /** * Route one already-validated search using captured request identity. * Non-Copilot calls delegate untouched. Copilot failures reach a known DeepSeek * provider only under the explicit spending policy; cancellation and invalidated * ownership never trigger fallback. Consumer validation, batching and deadlines * remain the caller's responsibility, not this provider-selection function. */ export declare function routeSessionSearch(request: WebSearchRequest, signal: AbortSignal | undefined, deps: SessionSearchDependencies): Promise; //# sourceMappingURL=search-routing.d.ts.map