import { withFileLock } from '../atomic-file.js'; import { type TempLifecycleDeps } from '../temp-lifecycle.js'; import { type CoworkAdapter } from './cowork-adapter.js'; import type { RoomMemberSeat, RoomOrchestrationRecord } from './types.js'; export interface RoomCloseDeps { inspectMember?(seat: RoomMemberSeat): Promise<{ launchId: string; }>; requestStop?(role: string): Promise; waitForLivenessAbsent?(role: string, launchId: string): Promise; secureArchive?(role: string, launchId: string): Promise; removeIdentity?(seat: RoomMemberSeat): Promise; lock?: typeof withFileLock; } export declare function inspectMember(seat: RoomMemberSeat): Promise<{ launchId: string; }>; export declare function waitForLivenessAbsent(role: string, launchId: string, lifecycleDeps?: TempLifecycleDeps): Promise; /** Report whether any daemon identity — under any name — carries this exact CID. */ export declare function identityCidPresent(cid: string): Promise; export declare function removeExactMemberIdentity(seat: RoomMemberSeat): Promise; /** One forward-only room close saga shared by every Fleet entry point. */ export declare function acceptManagedRoomClose(roomId: string): Promise; export declare function recordManagedRoomCloseError(roomId: string, error: string, recoveryHint: string): Promise; export declare function closeManagedRoom(input: { roomId: string; cowork: Pick; deps?: RoomCloseDeps; }): Promise; export interface ManagedRoomDeleteResult { room_id: string; deleted: true; } /** Remove retained state written by prerelease builds that stopped at `closed`. */ export declare function deleteLegacyClosedRooms(input: { cowork: Pick; }): Promise; /** Retire live resources through the existing cursor, then delete retained state. */ export declare function deleteManagedRoom(input: { roomId: string; cowork: Pick; deps?: RoomCloseDeps; }): Promise;