import type { SourceControlStorageHandle } from '../storage/domains/source-control/base.js'; import type { WorkItemsStorage } from '../storage/domains/work-items/base.js'; type WarningLogger = (message: string, details: Record) => void; export interface SessionRetirementCoordinatorOptions { invalidateSession?: (sessionId: string) => Promise | void; warn?: WarningLogger; } export interface RetireSessionInput { sourceControl: SourceControlStorageHandle; /** When provided, deleting the session row also strips its work-item refs. */ workItems?: Pick; orgId: string; sessionId: string; deleteSession: boolean; } /** * Owns terminal and destructive session cleanup. Each session is serialized so * duplicate role bindings and competing deletion/transition requests cannot * run teardown concurrently. * * Sandbox identity is the session id: retirement stops (or, for deleted * sessions, destroys) the sandbox this process holds in the session memo. * Sessions opened on another replica have no memo entry here — their VMs are * left to the provider's idle lifecycle (pause / idle GC), which is the * provider-owned half of the contract. */ export declare class SessionRetirementCoordinator { #private; constructor(options?: SessionRetirementCoordinatorOptions); retireSession(input: RetireSessionInput): Promise; retireWorkItemSessions(options: { workItems: Pick; sourceControl: SourceControlStorageHandle; orgId: string; workItemId: string; }): Promise; retireProjectRepositorySessions(options: { sourceControl: SourceControlStorageHandle; workItems?: Pick; orgId: string; projectRepositoryId: string; }): Promise; } export {}; //# sourceMappingURL=session-retirement.d.ts.map