export interface CachedIdentity { provider: string; handle: string; verifiedAtMs: number; source: string; } export interface PodIdentity extends CachedIdentity { podRid?: string; podAlias?: string; } export declare class PodIdentityMismatchError extends Error { readonly errorCode = "pod-identity-mismatch"; } export declare const IDENTITY_SOURCE_PROVISIONAL = "provisional"; export declare const IDENTITY_SOURCE_GH = "gh-cli"; export declare function isProvisionalIdentity(id: CachedIdentity): boolean; export declare function writeProvisionalIdentity(handle: string, nowMs?: number, path?: string): CachedIdentity; export declare function getIdentityCachePath(): string; export declare function getLegacyIdentityCachePath(): string; export declare function migrateIdentityCache(): boolean; export declare function readIdentityCache(path?: string): CachedIdentity | null; export declare function writeIdentityCache(identity: CachedIdentity, path?: string): void; export declare function getPodIdentityPath(podRepoDir: string): string; export declare function readPodIdentity(podRepoDir: string): PodIdentity | null; export declare function readCurrentPodIdentity(podRepoDir: string): CachedIdentity | null; export declare function writePodIdentity(identity: PodIdentity, podRepoDir: string): void; export declare function sanitizePodAlias(value: string): string | null; export declare function fallbackPodAlias(podRid: string): string; export declare function deriveInitialPodAlias(podRid: string, osUsername?: string): string; export declare function ensurePodIdentityMetadata(podRepoDir: string, podRid: string, options?: { freshPod: boolean; osUsername?: string; }): PodIdentity | null; export declare function updatePodAlias(podRepoDir: string, alias: string): PodIdentity; export interface ResolvePodIdentityOptions { podRepoDir?: string | undefined; deriveHandle?: (() => string) | undefined; nowMs?: number | undefined; localCachePath?: string | undefined; } export declare function resolvePodIdentity(opts?: ResolvePodIdentityOptions): CachedIdentity | null; export declare function renderMachineIdentity(id: CachedIdentity): string; export declare function renderPodIdentity(id: PodIdentity): string; export declare function renderIdentityYon(id: CachedIdentity): string; export type ReconcileIdentityOutcome = { kind: "none"; reason: string; } | { kind: "handle-conflict"; podHandle: string; machineHandle: string; } | { kind: "verified-at-restamped"; handle: string; fromMs: number; toMs: number; }; export declare function reconcileIdentity(podRepoDir: string, localCachePath?: string): ReconcileIdentityOutcome; export declare function parseIdentityYon(raw: string): PodIdentity | null; //# sourceMappingURL=identity-cache.d.ts.map