import type { Context } from '@deepseek-ai/cordis'; import type { Agent } from '@deepseek-ai/dsh-agent'; import type { PiAiProviderProfile } from '@deepseek-ai/dsh-llm-pi-ai'; import { GITHUB_COPILOT_PREVIEW_PROVIDER_ID } from './copilot-identity.ts'; import type { AccountModelLoadOptions } from './account-model-source.ts'; import type { AccountModelDescriptor, AccountModelRejection } from './account-model-catalog.ts'; import type { InlineConfig } from './config.ts'; import type { RequestBudgetPolicy } from './request-budget.ts'; /** Safe request knobs; identities, model tables, endpoints and credentials are not configurable. */ export type PreviewRouteConfig = Pick & Pick & { readonly streamLiveness?: boolean; readonly chatRequestSettings?: () => Pick; readonly accountModelSettings?: () => Pick; readonly requestBudget?: Partial; readonly requestBudgetSettings?: () => Partial; }; export interface GitHubCopilotPreviewView { readonly provider: typeof GITHUB_COPILOT_PREVIEW_PROVIDER_ID; readonly configured: boolean; readonly available: boolean; readonly correctionActive: boolean; readonly state: 'idle' | 'loading' | 'ready' | 'stale' | 'unconfigured' | 'unavailable' | 'error' | 'disposed'; readonly models: readonly { readonly id: string; readonly name: string; readonly api: string; }[]; readonly rejected: readonly AccountModelRejection[]; readonly warnings: readonly { readonly id: string; readonly code: string; }[]; readonly discoveredAt?: number; readonly error?: string; } export interface GitHubCopilotPreview { getView(): GitHubCopilotPreviewView; /** Synchronous, account-proven summary capacities for the initiating Agent; never triggers discovery. */ recoveryLimits(modelId: string, agent?: Agent): { readonly api: AccountModelDescriptor['api']; readonly limits: Pick; readonly policy: Partial; readonly assertCurrent: () => void; } | undefined; /** Host-only current endpoint facts; no discovery and no credential material. */ routeFacts(modelId: string): { readonly api: string; readonly baseURL: string; } | undefined; /** Capture credential-proof continuity, independent of ordinary metadata cache TTL. */ captureSearchProof(): () => boolean; /** Host-only credential resolution for an independent, account-scoped search request. */ resolveRequestAuth(modelId: string, signal?: AbortSignal): Promise<{ readonly apiKey: string; readonly baseURL: string; readonly headers: Readonly>; }>; /** Read stored credentials/status only; never starts native refresh or discovery. */ refresh(): Promise; /** Explicit account model discovery. May refresh native OAuth and GET /models. */ discover(options?: AccountModelLoadOptions): Promise; } declare module '@deepseek-ai/cordis' { interface Context { githubCopilotPreview: GitHubCopilotPreview; } } /** Register services once; account switches affect the directory, not admitted turns. */ export declare function apply(ctx: Context, config?: PreviewRouteConfig): void; declare const _default: { name: string; inject: string[]; apply: typeof apply; }; export default _default; //# sourceMappingURL=preview-route.d.ts.map