import type { AccountTransportAcquireInput, AccountTransportAcquisition } from '../account-transports.js'; import type { AccountTransportProviderId } from '../auth.js'; import type { AccountPublic, EnrollmentSession, StartEnrollmentInput } from '../enrollment/contracts.js'; import type { LlmMesh } from '../mesh.js'; import { type InMemoryRoutePlannerOptions } from '../route-planner.js'; import type { RoutePlanner } from '../routing-contracts.js'; export interface ProviderRequest { modelId: string; contents: unknown[]; generationConfig?: unknown; systemInstruction?: unknown; tools?: unknown[]; toolConfig?: unknown; diagnostics?: readonly { code: string; message: string; metadata?: Record; }[]; } export type ProviderEvent = { kind: 'content'; delta: string; } | { kind: 'reasoning'; delta: string; } | { kind: 'tool-call'; id: string; name: string; arguments: unknown; metadata?: Record; } | { kind: 'diagnostic'; code: string; message: string; metadata?: Record; } | { kind: 'done'; usage: unknown; finishReason?: string; } | { kind: 'error'; code: string; message: string; statusCode?: number; retryAfterMs?: number; }; export interface ProviderAdapter { execute(acquisition: AccountTransportAcquisition, request: ProviderRequest, signal: AbortSignal): AsyncIterable; } export interface KeyringAdapter { getSecret(key: string): Promise; setSecret(key: string, secret: string): Promise; setSecretIfAbsent?(key: string, secret: string): Promise; deleteSecret(key: string): Promise; } export interface ConfigResolver { resolveConfig(configRef: string): Promise>; } export interface FacadeOptions { configResolver: ConfigResolver; keyring?: KeyringAdapter; mode: 'cli' | 'portal'; /** Explicit owner used only to bind pre-ownerScope local keyring records. */ legacyAccountOwnerScopeRef?: string; } export interface AccountOwnerInput { ownerScope: string; } export interface RemoveAccountResult { accountId: string; removed: true; } export interface LlmMeshAccountAdministration { listAccounts(input: AccountOwnerInput): Promise; removeAccount(accountId: string, input: AccountOwnerInput): Promise; } export interface LlmMeshFacade { enroll(providerId: AccountTransportProviderId, input: StartEnrollmentInput): Promise; waitForCallback(enrollmentId: string): Promise<{ accountId: string; label: string; }>; pollForCompletion(enrollmentId: string): Promise<{ accountId: string; label: string; }>; cancel(enrollmentId: string): Promise; acquire(input: AccountTransportAcquireInput): Promise; release(acquisition: AccountTransportAcquisition): Promise; getAdapter(providerId: AccountTransportProviderId): ProviderAdapter; createRoutePlanner(runtime: Pick, options?: Omit): RoutePlanner; } export interface LlmMeshAdministrativeFacade extends LlmMeshFacade, LlmMeshAccountAdministration { } export declare function createLlmMeshFacade(options: FacadeOptions): LlmMeshAdministrativeFacade; //# sourceMappingURL=facade.d.ts.map