export type WorkspaceRegistryKind = "git" | "directory"; export type IncarnationStatus = "confirmed" | "suspect" | "replaced" | "unknown"; export interface WorkspaceIdentityInput { readonly installationId: string; readonly platformNamespace: string; readonly volumeNamespace: string; readonly workspaceKind: WorkspaceRegistryKind; readonly canonicalIdentityComponents: readonly string[]; } export interface WorkspaceRegistryPaths { readonly graftDir: string; readonly workspaceDir: string; readonly metadataPath: string; readonly incarnationsDir: string; readonly incarnationDir: string; readonly incarnationMetadataPath: string; readonly incarnationCacheDir: string; } export interface WorkspaceRegistryRetention { readonly cachePolicy: "derived-content"; readonly workspaceBudgetBytes: number; readonly ttlDays: number; } export interface WorkspaceRegistryStorage { readonly registry: "graft-managed"; readonly cache: "graft-managed"; } export interface WorkspaceMetadataRecord { readonly schemaVersion: 1; readonly workspaceId: string; readonly displayName: string; readonly canonicalRoot: string; readonly gitCommonDir: string; readonly sanitizedRemotes: readonly string[]; readonly incarnationId: string; readonly historyBindingIds: readonly string[]; readonly storage: WorkspaceRegistryStorage; readonly createdAt: string; readonly lastObservedAt: string; readonly retention: WorkspaceRegistryRetention; } export interface IncarnationMetadataRecord { readonly schemaVersion: 1; readonly workspaceId: string; readonly incarnationId: string; readonly incarnationStatus: IncarnationStatus; readonly createdAt: string; readonly lastObservedAt: string; readonly evidence: { readonly kind: "git"; readonly canonicalRoot: string; readonly gitCommonDir: string; readonly repositoryFingerprint?: string | undefined; }; } export interface ObserveGitWorkspaceInput { readonly graftDir: string; readonly canonicalRoot: string; readonly gitCommonDir: string; readonly remotes?: readonly string[] | undefined; readonly installationId?: string | undefined; readonly platformNamespace?: string | undefined; readonly volumeNamespace?: string | undefined; readonly now?: (() => string) | undefined; readonly randomBytes?: ((size: number) => Buffer) | undefined; readonly repositoryFingerprint?: string | undefined; } export interface ObservedWorkspaceRecord { readonly workspaceId: string; readonly incarnationId: string; readonly metadata: WorkspaceMetadataRecord; readonly paths: WorkspaceRegistryPaths; } export declare function deriveWorkspaceId(input: WorkspaceIdentityInput): string; export declare function registryPaths(graftDir: string, workspaceId: string, incarnationId: string): WorkspaceRegistryPaths; export declare function sanitizeRemoteUrl(remote: string): string; export declare function loadOrCreateInstallationId(input: { readonly graftDir: string; readonly now?: (() => string) | undefined; readonly randomBytes?: ((size: number) => Buffer) | undefined; }): Promise; export declare function observeGitWorkspace(input: ObserveGitWorkspaceInput): Promise; //# sourceMappingURL=workspace-registry.d.ts.map