import { type Database } from "./database.js"; export type ActiveSandboxPointer = { activeSandboxId: string | null; activeEpoch: number; workingDir: string | null; }; /** * Why a swap did not happen. Only `epoch_changed` is a lost race; the rest are * decisions about the target or the chat that a retry alone will not change. */ export type ActiveSandboxSwapRefusal = "epoch_changed" | "chat_unavailable" | "not_permitted" | "target_unavailable"; export declare function setActiveSandbox(db: Database, input: { accountId: string; workspaceId: string; sessionId: string; targetSandboxId: string | null; expectedEpoch: number; subjectId?: string; /** Explicit owner click, never implicit create-time or scheduled seeding. */ consentToCurrentTurn?: boolean; personalMachineAttempt?: { turnId: string; attemptId: string; executionGeneration: number; initiatingHumanSubjectId: string; }; workingDir?: string | null; }): Promise<{ swapped: boolean; pointer: ActiveSandboxPointer | null; refusal?: ActiveSandboxSwapRefusal; }>;