import type { SandboxClientLike, SandboxInstanceLike } from "./tangle-types.js"; /** * How long `create()` waits for a new sandbox to reach `running`. * * The value is the Sandbox SDK's own wait default, so the adapter states no * second deadline that disagrees with the platform's. */ export declare const DEFAULT_TANGLE_READY_TIMEOUT_MS = 120000; /** * Hold `create()` until the sandbox can accept a turn. * * The gap this closes is narrow and specific. `client.create()` waits by * itself only when the create response reports `pending` or `provisioning`. * A response that already reports `running` skips that wait, and `running` * alone is not usable: the SDK's own `waitFor` treats the target as reached * only when `filesystemIncarnationReadiness` is `ready`, because the box's * filesystem is still being built until then. An environment composed before * that is an environment that cannot accept a turn. * * WHAT THIS WAIT IS NOT FOR. An earlier version of this comment claimed the * wait also closed the platform's "A sandbox lifecycle operation is already in * progress", and that claim is withdrawn: measured 2026-09-01 (issue #280), * that refusal comes from `DELETE /v1/sandboxes/:id`, not from a turn. The * platform guards exactly three routes with the per-sandbox lifecycle lease — * resume, stop and delete — and the runtime path a prompt takes is not one of * them, so no readiness wait here can prevent it and none is trying to. The * collision is answered where it happens, in `destroy()` * (`tangle-environment.ts`). * * Readiness also decides what the environment can claim. Composing an * environment reads the sandbox's deployment capability document once, and a * sandbox that is not yet running cannot answer that read, so an environment * composed during provisioning claims nothing for the rest of its life. * * The platform owns the wait, and this adapter runs no status loop of its own. * `waitFor` on the created instance is preferred because it refreshes that * instance in place, which keeps the create receipt and gains the runtime * connection the environment reads. */ export declare function awaitSandboxRunning(box: SandboxInstanceLike, client: SandboxClientLike, options: { timeoutMs: number; signal?: AbortSignal; }): Promise;