import { Context } from '@deepseek-ai/cordis'; import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol'; import type { CopilotAccountBinding, CopilotAccountIdentity, CopilotAccountLease, CopilotAccountsDiagnostic, CopilotAccountsView } from './copilot-accounts-types.ts'; interface Dependencies { fetch?: typeof globalThis.fetch; validateModels?: (binding: CopilotAccountBinding, signal: AbortSignal) => Promise; routeDiagnostic?: () => CopilotAccountsDiagnostic | undefined; } export declare function isCopilotAccountRecord(key: string): boolean; /** Account membership is credential metadata; only the selector lives in Settings. */ export declare class CopilotAccountsHost { private readonly ctx; private readonly dependencies; private generation; private selectionSignature; private disposed; private readonly leases; private readonly accountLeases; private readonly identities; private readonly unavailableIdentities; private readonly identityFlights; private readonly identityFailures; private readonly listeners; private readonly abort; private operation; private attemptKey; private authorizationAbort; private notices; private lastFailure; constructor(ctx: Context, dependencies?: Dependencies); private settings; private selection; private revoke; selectionChanged(): void; isActiveRecord(key: string): boolean; credentialChanged(key: string): void; private invalidateIdentity; onChanged(listener: () => void): () => void; cachedIdentity(accountId: string): CopilotAccountIdentity | undefined; capture(accountId?: string): CopilotAccountBinding; /** A frozen turn owns a record, not the mutable profile default. */ captureAccount(accountId: string): CopilotAccountBinding; validateAccount(binding: CopilotAccountBinding): Promise; acquire(signal?: AbortSignal, requireManaged?: boolean, accountId?: string): CopilotAccountLease; acquireCanonicalAuthorization(): CopilotAccountLease; private routeDiagnostic; private busy; private membership; get(): Promise; private accountView; private identity; private fetchIdentity; private fetchIdentityResponse; refreshIdentity(): Promise; ensureIdentity(): Promise; viewForAccount(accountId: string): Promise; refreshIdentityFor(accountId: string): Promise; ensureIdentityFor(accountId: string): Promise; ensureAccountNamesFor(accountId: string): Promise; private readIdentity; private readIdentityObserved; private validateModels; private assertIdentityCurrent; switchAccount(accountId: string, expectedRevision: number): Promise; add(): Promise; reauthorize(accountId: string, expectedRevision: number): Promise; authorize(accountId: string, expectedRevision?: number): Promise; cancel(): Promise; remove(accountId: string, expectedRevision: number): Promise; signOutActive(): Promise; dispose(): void; } declare module '@deepseek-ai/cordis' { interface Context { githubCopilotAccounts: GitHubCopilotAccountsController; } } export declare function activeCopilotBinding(ctx: Context): CopilotAccountBinding | undefined; export declare function isActiveCopilotRecord(ctx: Context, key: string): boolean; export default class GitHubCopilotAccountsController extends TypertRemoteService { readonly host: CopilotAccountsHost; constructor(ctx: Context); get(): Promise; refreshIdentity(): Promise; ensureIdentity(): Promise; add(): Promise; cancel(): Promise; reauthorize(accountId: string, expectedRevision: number): Promise; switchAccount(accountId: string, expectedRevision: number): Promise; removeAccount(accountId: string, expectedRevision: number): Promise; } export {}; //# sourceMappingURL=copilot-accounts-host.d.ts.map