import { MutagentCore } from "../core.js"; import { RequestOptions } from "../lib/sdks.js"; import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js"; import * as errors from "../models/errors/index.js"; import { MutagentError } from "../models/errors/mutagent-error.js"; import { ResponseValidationError } from "../models/errors/response-validation-error.js"; import { SDKValidationError } from "../models/errors/sdk-validation-error.js"; import * as operations from "../models/operations/index.js"; import { APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** * Rebuild this sandbox from a checkpoint, with full state * * @remarks * A cloud equivalent of a local `/resume`, and it does NOT require the old box to still exist — a reaped or torn-down sandbox is the ordinary input. In order: a fresh box is spawned for the SAME sandbox id at generation+1 with the same secret NAMES (values are re-minted, never stored); the relay's seq counter is seeded from the persisted high-water mark so a client's `?since=` cursor stays valid; the workspace and `$HOME/.mutagent` are extracted BEFORE Helix starts; a session is started in the checkpoint's cwd; the conversation is written in, its sha256 compared against the box's own, and only then switched onto; the runtime settings and pending queue are replayed; and a `session {status:"restored"}` frame is appended to the stream with a real seq. A digest mismatch is a 422 and the session is NOT switched. 404 if the snapshot is not in this workspace. Read `notRestored` — a restore that carried only the conversation is legitimate and says so there. A DEFAULTED restore uses the newest checkpoint that has a manifest and lists newer rows it passed over in `skippedSnapshots`. `partial: true` restores the incremental transcript prefix beyond the checkpoint when one exists (the frame then carries `partial: true`); its tail may end on a tool call with no result, which the harness answers with a synthetic error on the next turn — the accepted risk of asking for it. ENVIRONMENT: `environment` and `env` layer onto the restored session exactly as on session start (provider keys, then the Environment, then per-call `env`, then platform-owned variables). The Environment a session was started with is recorded by NAME in the checkpoint manifest and re-resolved when `environment` is omitted; a name in the body wins, and an unknown one is a 404 before the old box is touched. Per-call `env` values are NEVER stored, so a restore that omits `env` does not bring them back — send a model key given as `env` again. * * If set, this operation will use {@link Security.bearerAuth} from the global security. */ export declare function sandboxPostApiSandboxByIdRestore(client: MutagentCore, request: operations.PostApiSandboxByIdRestoreRequest, options?: RequestOptions): APIPromise>; //# sourceMappingURL=sandbox-post-api-sandbox-by-id-restore.d.ts.map