@tangle-network/sandbox 1.0.509 → 1.0.511

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/dist/agent/index.d.ts +4 -4
  3. package/dist/agent/index.js +5 -5
  4. package/dist/agent/preview.d.ts +1 -1
  5. package/dist/agent/preview.js +2 -2
  6. package/dist/{agent-run-outcome-IWbQgIbt.d.ts → agent-run-outcome-hucdyrR6.d.ts} +1 -1
  7. package/dist/{api-request-CJ9M-TN7.js → api-request-C-WGI8Tv.js} +12 -4
  8. package/dist/auth/index.js +2 -2
  9. package/dist/{browser-interactive-control-controller-CNqYrsK-.d.ts → browser-interactive-control-controller-CD8b8KFn.d.ts} +1 -1
  10. package/dist/{browser-interactive-control-controller-cfE_Hhvr.js → browser-interactive-control-controller-ZgflEMgw.js} +1 -1
  11. package/dist/{chunked-upload-6M8Y9Sry.js → chunked-upload-ClIgZBWm.js} +3 -3
  12. package/dist/{chunked-upload-file-BAqjjSIN.js → chunked-upload-file-rgkPRmQb.js} +2 -2
  13. package/dist/cli-auth-bundle-ECDHagkC.js +2 -0
  14. package/dist/{client-DL_Q0ixz.js → client-Bh0fgYe6.js} +50 -36
  15. package/dist/{client-Bb4VO8Tv.d.ts → client-DFaxpuf9.d.ts} +6 -5
  16. package/dist/collaboration/index.js +1 -1
  17. package/dist/{collaboration-ZcNePxyN.js → collaboration-3qrTMyna.js} +2 -2
  18. package/dist/core.d.ts +6 -6
  19. package/dist/core.js +6 -6
  20. package/dist/{direct-http2-Dm88_AQC.js → direct-http2-Drov3Qp5.js} +2 -2
  21. package/dist/{error-catalog-DMNep7Y3.js → error-catalog-DwxHMZQZ.js} +3 -0
  22. package/dist/{errors-CgHRBUnE.js → errors-BuEDuIrs.js} +1 -1
  23. package/dist/{file-download-CeikrxZL.js → file-download-BEPpLHi7.js} +1 -1
  24. package/dist/gpu-lease/index.js +2 -2
  25. package/dist/{index-D7dMz_US.d.ts → index-CtrSdLo2.d.ts} +9 -8
  26. package/dist/index.d.ts +9 -9
  27. package/dist/index.js +14 -14
  28. package/dist/intelligence/index.js +4 -4
  29. package/dist/interactive-control.d.ts +1 -1
  30. package/dist/interactive-control.js +1 -1
  31. package/dist/{interactive-controller-zv5TV56E.js → interactive-controller-BqkP064x.js} +6 -6
  32. package/dist/{interactive-controller-RKI6dXBi.d.ts → interactive-controller-DJpf6ofh.d.ts} +3 -3
  33. package/dist/{keep-alive-fetch-DjzdPAP3.js → keep-alive-fetch-xLyOpHAc.js} +1 -1
  34. package/dist/lib/prepared-evidence.js +1 -1
  35. package/dist/lib/prepared-process.js +1 -1
  36. package/dist/lifecycle-trace-CDGgSOVP.js +36 -0
  37. package/dist/{lines-DkfkbLSV.d.ts → lines-Ce4UmKfm.d.ts} +1 -1
  38. package/dist/{lines-CdfEanMh.js → lines-D3DKzzQT.js} +1 -1
  39. package/dist/lines.d.ts +1 -1
  40. package/dist/lines.js +1 -1
  41. package/dist/{local-cli-auth-CueE1l0F.js → local-cli-auth-BVXWKaty.js} +1 -1
  42. package/dist/{mcp-local-LIZ1E1uA.js → mcp-local-BbtNT6Nh.js} +4 -4
  43. package/dist/{prepared-evidence-BMADfSad.js → prepared-evidence-BKtdRWT7.js} +1 -1
  44. package/dist/{prepared-process-B4DuLmEg.js → prepared-process-ZCv_G1q4.js} +1 -1
  45. package/dist/{preview-tqaVk0Af.d.ts → preview-C4nOdGvR.d.ts} +3 -3
  46. package/dist/{public-templates-maL22HQt.d.ts → public-templates-GebzRZgV.d.ts} +2 -2
  47. package/dist/public-templates.d.ts +1 -1
  48. package/dist/public-templates.js +1 -1
  49. package/dist/{raw-evidence-archive-GuIfCwo8.js → raw-evidence-archive-_aeJodxs.js} +3 -3
  50. package/dist/runtime.d.ts +5 -5
  51. package/dist/runtime.js +5 -5
  52. package/dist/{sandbox-BTTAoCMR.js → sandbox-DRZhN_Vu.js} +91 -44
  53. package/dist/{secp256k1-DIwypP5B.js → secp256k1-B2arMxku.js} +1 -1
  54. package/dist/{select-seat-Cq1LrUG-.js → select-seat-D_L4pss9.js} +3 -3
  55. package/dist/select-seat-command.d.ts +2 -2
  56. package/dist/select-seat-command.js +2 -2
  57. package/dist/session-gateway/index.js +2 -2
  58. package/dist/tangle/index.d.ts +1 -1
  59. package/dist/tangle/index.js +2 -2
  60. package/dist/{tangle-DBx6JdWz.js → tangle-FnB8JXIv.js} +6 -6
  61. package/dist/{terminal-stream-types-RAsy75gD.d.ts → terminal-stream-types-BMLdhwUQ.d.ts} +3 -0
  62. package/dist/{trace-id-8KPKajMl.js → trace-id-DX218plN.js} +8 -2
  63. package/dist/{types-5by8R76_.d.ts → types-DOngB_Rs.d.ts} +4 -1
  64. package/package.json +7 -7
  65. package/dist/cli-auth-bundle-DqIHmlbG.js +0 -2
  66. /package/dist/{abi-pcDt2Adp.js → abi-CQYNCS4F.js} +0 -0
  67. /package/dist/{cli-auth-bundle-CXI4ysvr-DMV1Pos7.js → cli-auth-bundle-CXI4ysvr-CGgx1JDO.js} +0 -0
  68. /package/dist/{core-CBWUEURz.js → core-BWiEs9yv.js} +0 -0
  69. /package/dist/{file-transfer-DOSTbUSR.js → file-transfer-CnCWFYua.js} +0 -0
  70. /package/dist/{preview-operations-BTHZR1w2.js → preview-operations-DYH3y0cn.js} +0 -0
  71. /package/dist/{raw-evidence-export-Dog7W5zP.js → raw-evidence-export-gCbAD5ZV.js} +0 -0
  72. /package/dist/{retry-policy-oW3_ljoc.js → retry-policy-BlkQJ7_e.js} +0 -0
  73. /package/dist/{sse-parser-BCG3iL9j.js → sse-parser-DTgSRcZC.js} +0 -0
  74. /package/dist/{utils-BvN0Mk3j.js → utils-fYi8g-M-.js} +0 -0
package/README.md CHANGED
@@ -142,7 +142,7 @@ try {
142
142
  Keep `delete()` in `finally` unless the sandbox must outlive the process.
143
143
  `delete()` answers once the sandbox is dead and billed; its container, volume and network are reclaimed behind the answer, and the acknowledgement reports `removal: "pending"`.
144
144
  The sandbox is already gone for every read at that point.
145
- Deleted customer snapshot repositories, including their final snapshot, remain until their owner explicitly deletes them. Platform-managed repositories of internal-account boxes retire automatically after the deleted-retention window, subject to preservation holds and active exports/restores. The serving window comes from the storage owner; see [deleted repository retention](../../../docs/sandbox-lifecycle-reliability.md#deleted-snapshot-repository-retirement).
145
+ Deleted customer snapshot repositories, including their final snapshot when the delete took one, remain until their owner explicitly deletes them. A delete takes a final snapshot of every sandbox, unless the deployment takes delete backups on request: then only of a sandbox created with `retain` paths or `retain.publication`, required native session capture or customer storage. A sandbox stopped with `retain` keeps the snapshot that stop confirmed as its final one. Otherwise the newest snapshot confirmed before the delete, if any, is the last one. Platform-managed repositories of internal-account boxes retire automatically after the deleted-retention window, subject to preservation holds and active exports/restores. The serving window comes from the storage owner; see [deleted repository retention](../../../docs/sandbox-lifecycle-reliability.md#deleted-snapshot-repository-retirement).
146
146
  Pass `await box.delete({ until: "removed" })` when you need the reclaim itself, for example before reusing the same host capacity in a test; it reports `removal: "complete"`, or `"pending"` if the wait runs out.
147
147
 
148
148
  To remove every sandbox that one job created, tag them with metadata at create time and delete them by prefix:
@@ -1,7 +1,7 @@
1
- import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-D7dMz_US.js";
2
- import { Ga as CodeLanguage, Ka as CodeResultPart, Wa as CodeExecutionResult, ga as BackendConfig, hr as CodeExecutionOptions, ia as SessionListOptions, io as BackendType, na as SessionInfo, vt as SandboxFleetParent } from "../types-5by8R76_.js";
3
- import { t as Sandbox } from "../client-Bb4VO8Tv.js";
4
- import { u as PreviewAuthorizer } from "../preview-tqaVk0Af.js";
1
+ import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-CtrSdLo2.js";
2
+ import { Ga as CodeLanguage, Ka as CodeResultPart, Wa as CodeExecutionResult, ga as BackendConfig, hr as CodeExecutionOptions, ia as SessionListOptions, io as BackendType, na as SessionInfo, vt as SandboxFleetParent } from "../types-DOngB_Rs.js";
3
+ import { t as Sandbox } from "../client-DFaxpuf9.js";
4
+ import { u as PreviewAuthorizer } from "../preview-C4nOdGvR.js";
5
5
  import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
6
6
  import { JSONSchema } from "zod/v4/core";
7
7
  import { ToolSet } from "ai";
@@ -1,8 +1,8 @@
1
- import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-LIZ1E1uA.js";
2
- import { x as assertCurrentBackendType } from "../interactive-controller-zv5TV56E.js";
3
- import { t as SandboxInstance } from "../sandbox-BTTAoCMR.js";
4
- import { O as ValidationError, T as StateError, v as NotFoundError } from "../errors-CgHRBUnE.js";
5
- import { t as Sandbox } from "../client-DL_Q0ixz.js";
1
+ import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-BbtNT6Nh.js";
2
+ import { x as assertCurrentBackendType } from "../interactive-controller-BqkP064x.js";
3
+ import { t as SandboxInstance } from "../sandbox-DRZhN_Vu.js";
4
+ import { O as ValidationError, T as StateError, v as NotFoundError } from "../errors-BuEDuIrs.js";
5
+ import { t as Sandbox } from "../client-Bh0fgYe6.js";
6
6
  import { z } from "zod";
7
7
  //#region src/agent/instances.ts
8
8
  const managers = /* @__PURE__ */ new WeakMap();
@@ -1,2 +1,2 @@
1
- import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-tqaVk0Af.js";
1
+ import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-C4nOdGvR.js";
2
2
  export { AgentPreviewError, AgentPreviewOptions, PREVIEW_MCP_ALIAS, PREVIEW_TOOLS, PreviewAuthorizationRequest, PreviewAuthorizer, PreviewExecutionContext, PreviewTool, PublishAgentPreviewOptions, assertPreviewId, ensureAgentPreview, getAgentPreview, listAgentPreviews, previewOperationTool, previewToolsForProfile, publishAgentPreview, removeAgentPreview, resolveSelfSandbox, servePreviewMcp };
@@ -1,5 +1,5 @@
1
1
  import { r as agentProfileSchema } from "../profile-schema-BHeC7cOf.js";
2
- import { a as listAgentPreviews, c as resolveSelfSandbox, i as getAgentPreview, n as assertPreviewId, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "../preview-operations-BTHZR1w2.js";
2
+ import { a as listAgentPreviews, c as resolveSelfSandbox, i as getAgentPreview, n as assertPreviewId, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "../preview-operations-DYH3y0cn.js";
3
3
  //#region src/agent/preview-policy.ts
4
4
  /** Channel-neutral preview tool selection from a host-authored profile. */
5
5
  const PREVIEW_TOOLS = [
@@ -66,7 +66,7 @@ async function servePreviewMcp(request, config) {
66
66
  if (typeof config.authorize !== "function") throw new Error("Preview MCP requires a host authorization callback");
67
67
  const tools = config.tools ?? PREVIEW_TOOLS;
68
68
  if (!tools.length || tools.some((tool) => !PREVIEW_TOOLS.includes(tool))) throw new Error("Preview MCP requires an explicit nonempty preview-only tool grant");
69
- const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-LIZ1E1uA.js").then((n) => n.n), import("@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js")]);
69
+ const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-BbtNT6Nh.js").then((n) => n.n), import("@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js")]);
70
70
  const handle = await createMcpServer(config.box, {
71
71
  name: "tangle-previews",
72
72
  sessionId: config.sessionId,
@@ -1,5 +1,5 @@
1
1
  import { C as InteractionRequest } from "./index-V_pXOH3B.js";
2
- import { Ei as SandboxEvent, ci as AgentQuestionRequest, gi as DurablePlanSnapshot, li as AgentRunStatus, si as AgentApprovalRequirement, ui as AgentToolInvocation } from "./types-5by8R76_.js";
2
+ import { Ei as SandboxEvent, ci as AgentQuestionRequest, gi as DurablePlanSnapshot, li as AgentRunStatus, si as AgentApprovalRequirement, ui as AgentToolInvocation } from "./types-DOngB_Rs.js";
3
3
 
4
4
  //#region src/agent-run-outcome.d.ts
5
5
  interface AgentRunOutcome {
@@ -1,6 +1,7 @@
1
- import { r as catalogEntry, t as ERROR_CATALOG } from "./error-catalog-DMNep7Y3.js";
1
+ import { r as catalogEntry, t as ERROR_CATALOG } from "./error-catalog-DwxHMZQZ.js";
2
2
  import { n as plannedRestartDeadline, t as parseSandboxRetryAfterHeader } from "./retry-after-header-DyAWSQ4m.js";
3
- import { c as retryBudget, n as SANDBOX_API_RETRY_SCOPE, o as isUndelivered, r as abortableSleep, s as planResend } from "./retry-policy-oW3_ljoc.js";
3
+ import { n as childTraceparent, r as parseTraceparent, t as TRACEPARENT_HEADER } from "./lifecycle-trace-CDGgSOVP.js";
4
+ import { c as retryBudget, n as SANDBOX_API_RETRY_SCOPE, o as isUndelivered, r as abortableSleep, s as planResend } from "./retry-policy-BlkQJ7_e.js";
4
5
  //#region src/lib/response-rewrap.mjs
5
6
  /**
6
7
  * Response wrappers that must outlive the fetch Response they wrap.
@@ -30,7 +31,7 @@ function rewrapResponse(original, headers, body = original.body) {
30
31
  //#endregion
31
32
  //#region src/lib/api-request.mjs
32
33
  /** The package version tsdown.config.ts defines; unbuilt source reports 0.0.0. */
33
- const SDK_VERSION = "1.0.509";
34
+ const SDK_VERSION = "1.0.511";
34
35
  function withRequestContextHeaders(response, path, method, body = response.body) {
35
36
  const headers = new Headers(response.headers);
36
37
  headers.set("x-tangle-request-path", path);
@@ -88,7 +89,7 @@ async function retryDelayMs(response, attempt, window, safe) {
88
89
  }
89
90
  /** SDK/probe transport retries replayable idempotent/keyed calls, or any verb after a proven failed dial or a planned-restart refusal.
90
91
  * x-no-retry forbids replay; the caller deadline bounds attempts, and headers finalize an answer. */
91
- async function fetchSandboxApi({ baseUrl, apiKey, timeoutMs = SDK_TIMEOUTS.default, signal, fetchImpl = fetch, networkError = (error) => error, timeoutError = () => new DOMException("The operation was aborted due to timeout", "TimeoutError") }, path, options, fetchOptions) {
92
+ async function fetchSandboxApi({ baseUrl, apiKey, lifecycleTraceContext, traceIdOf, timeoutMs = SDK_TIMEOUTS.default, signal, fetchImpl = fetch, networkError = (error) => error, timeoutError = () => new DOMException("The operation was aborted due to timeout", "TimeoutError") }, path, options, fetchOptions) {
92
93
  const url = `${baseUrl.replace(/\/+$/, "")}${path}`;
93
94
  const requestTimeoutMs = typeof fetchOptions?.timeoutMs === "number" && fetchOptions.timeoutMs > 0 ? fetchOptions.timeoutMs : timeoutMs;
94
95
  const deadline = Date.now() + requestTimeoutMs;
@@ -114,6 +115,12 @@ async function fetchSandboxApi({ baseUrl, apiKey, timeoutMs = SDK_TIMEOUTS.defau
114
115
  }
115
116
  const isFormDataBody = typeof FormData !== "undefined" && options?.body instanceof FormData;
116
117
  if (!headers.has("Content-Type") && !isFormDataBody) headers.set("Content-Type", "application/json");
118
+ const legacyId = headers.get("x-tangle-trace-id");
119
+ let parent;
120
+ if (lifecycleTraceContext && typeof globalThis.crypto?.getRandomValues === "function") {
121
+ const supplied = headers.get(TRACEPARENT_HEADER);
122
+ parent = parseTraceparent(supplied) ? supplied : childTraceparent(void 0, legacyId && traceIdOf ? traceIdOf(legacyId) : void 0);
123
+ } else if (lifecycleTraceContext !== void 0) headers.delete(TRACEPARENT_HEADER);
117
124
  const method = (options?.method ?? "GET").toUpperCase();
118
125
  const repeatable = !headers.has("x-no-retry") && isReplayableBody(options?.body);
119
126
  const safe = IDEMPOTENT_METHODS.has(method) || headers.has("Idempotency-Key");
@@ -122,6 +129,7 @@ async function fetchSandboxApi({ baseUrl, apiKey, timeoutMs = SDK_TIMEOUTS.defau
122
129
  let response;
123
130
  let lost;
124
131
  for (let attempt = 1;; attempt++) {
132
+ if (parent) headers.set(TRACEPARENT_HEADER, childTraceparent(parent));
125
133
  retryBudget(SANDBOX_API_RETRY_SCOPE).sent();
126
134
  try {
127
135
  response = await fetchImpl(url, {
@@ -1,5 +1,5 @@
1
- import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema } from "../cli-auth-bundle-CXI4ysvr-DMV1Pos7.js";
2
- import "../cli-auth-bundle-DqIHmlbG.js";
1
+ import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema } from "../cli-auth-bundle-CXI4ysvr-CGgx1JDO.js";
2
+ import "../cli-auth-bundle-ECDHagkC.js";
3
3
  //#region src/auth/tokens.ts
4
4
  const textEncoder = new TextEncoder();
5
5
  const textDecoder = new TextDecoder();
@@ -1,4 +1,4 @@
1
- import { i as TerminalStreamHandlers } from "./terminal-stream-types-RAsy75gD.js";
1
+ import { i as TerminalStreamHandlers } from "./terminal-stream-types-BMLdhwUQ.js";
2
2
  import { a as AgentInteractiveSessionControlClaim, d as AgentInteractiveSessionStatus, i as AgentInteractiveSessionAttach, o as AgentInteractiveSessionControlClaimAcknowledgement, s as AgentInteractiveSessionControlClaimRequest, u as AgentInteractiveSessionRef } from "./index-V_pXOH3B.js";
3
3
 
4
4
  //#region src/interactive-types.d.ts
@@ -1,7 +1,7 @@
1
1
  import { C as boundedEventContentRecordSchema, D as boundedJsonSchema, E as boundedJsonRecordSchema, O as boundedStringSchema, S as boundedEventContentJsonSchema, T as boundedIdentifierSchema, k as isBoundedEventContentJson, s as canonicalCandidateDigest, v as sha256DigestSchema, w as boundedEventContentStringSchema, x as CONTRACT_MAX_STRING_LENGTH, y as CONTRACT_MAX_ARRAY_LENGTH } from "./harness-QlDF8rzb.js";
2
2
  import { t as agentExecutionPreparationReceiptSchema } from "./agent-execution-preparation-receipt-Cc9RZhlS.js";
3
3
  import { t as awaitWithAbort } from "./abort-signal-BsriwJ8L.js";
4
- import { i as fetchSandboxApi } from "./api-request-CJ9M-TN7.js";
4
+ import { i as fetchSandboxApi } from "./api-request-C-WGI8Tv.js";
5
5
  import { z } from "zod";
6
6
  //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.28/node_modules/@tangle-network/agent-interface/dist/native-session-event.js
7
7
  /**
@@ -1,6 +1,6 @@
1
- import { C as SandboxError, n as isTransientWrite, r as parseErrorResponse } from "./errors-CgHRBUnE.js";
2
- import { c as retryBudget, i as awaitResend, n as SANDBOX_API_RETRY_SCOPE, r as abortableSleep } from "./retry-policy-oW3_ljoc.js";
3
- import { i as FILE_UPLOAD_SESSION_MAX_BYTES, n as isFileTooLargeErrorBody, r as isPayloadTooLargeErrorBody } from "./file-transfer-DOSTbUSR.js";
1
+ import { C as SandboxError, n as isTransientWrite, r as parseErrorResponse } from "./errors-BuEDuIrs.js";
2
+ import { c as retryBudget, i as awaitResend, n as SANDBOX_API_RETRY_SCOPE, r as abortableSleep } from "./retry-policy-BlkQJ7_e.js";
3
+ import { i as FILE_UPLOAD_SESSION_MAX_BYTES, n as isFileTooLargeErrorBody, r as isPayloadTooLargeErrorBody } from "./file-transfer-CnCWFYua.js";
4
4
  //#region src/lib/sdk-retry.ts
5
5
  const takeSdkTurn = (maxWaitMs) => retryBudget(SANDBOX_API_RETRY_SCOPE).take(maxWaitMs);
6
6
  const awaitSdkResend = (resend, o) => awaitResend(SANDBOX_API_RETRY_SCOPE, resend, o);
@@ -1,5 +1,5 @@
1
- import { i as FILE_UPLOAD_SESSION_MAX_BYTES } from "./file-transfer-DOSTbUSR.js";
2
- import { a as partWire, i as partCount, n as commitSession, o as planCompression, r as initUploadSession, s as putPart, t as abortSession } from "./chunked-upload-6M8Y9Sry.js";
1
+ import { i as FILE_UPLOAD_SESSION_MAX_BYTES } from "./file-transfer-CnCWFYua.js";
2
+ import { a as partWire, i as partCount, n as commitSession, o as planCompression, r as initUploadSession, s as putPart, t as abortSession } from "./chunked-upload-ClIgZBWm.js";
3
3
  import { createHash } from "node:crypto";
4
4
  import { open } from "node:fs/promises";
5
5
  //#region src/lib/chunked-upload-file.ts
@@ -0,0 +1,2 @@
1
+ import "./cli-auth-bundle-CXI4ysvr-CGgx1JDO.js";
2
+ export {};
@@ -1,17 +1,19 @@
1
- import { C as normalizeRuntimeBackendConfig, D as withoutCreateOnlyModelFields, E as withProfileHarness, I as backendTypeSchema, _ as encodePromptForWire, b as applyRequestedModel, o as requestInteractiveSessionToken, x as assertCurrentBackendType } from "./interactive-controller-zv5TV56E.js";
1
+ import { C as normalizeRuntimeBackendConfig, D as withoutCreateOnlyModelFields, E as withProfileHarness, I as backendTypeSchema, _ as encodePromptForWire, b as applyRequestedModel, o as requestInteractiveSessionToken, x as assertCurrentBackendType } from "./interactive-controller-BqkP064x.js";
2
2
  import { r as agentProfileSchema } from "./profile-schema-BHeC7cOf.js";
3
- import { $ as isCapacityShortageCreateError, B as parseLifecycleTimes, E as validateDeferredProfileFileMounts, F as normalizeCaptureProof, G as normalizeSandboxShape, H as normalizeConnection, I as normalizeSandboxCreateReceipt, J as DEPLOY_WINDOW_RETRY_MS, K as CAPACITY_ETA_MARGIN_MS, L as normalizeStartupDiagnostics, P as DirectRuntimeHttpClient, Q as generateIdempotencyKey, T as splitInlineProfileSkills, U as normalizeEgressPolicyFields, V as state, W as normalizeProxySecretReceipt, X as createRetryDelayMs, Y as awaitCreateResend, Z as extendableDeadline, d as sandboxLedgerUsd, et as isDeployWindowCreateError, n as createSandboxInstanceFromResponse, nt as isRetryableCreateError, o as exportTraceBundle, q as CAPACITY_ETA_WAIT_MAX_MS, rt as runtimeWorkspaceCwdSchema, tt as isRateLimitCreateError, w as splitInlineProfileFileMounts, x as deleteSandbox, z as dateOf } from "./sandbox-BTTAoCMR.js";
4
- import { C as SandboxError, D as TimeoutError, O as ValidationError, _ as NetworkError, a as readResponseJson, c as AuthError, i as parseResponseError, k as SANDBOX_CREATE_DEADLINE_HEADER, r as parseErrorResponse, v as NotFoundError, w as ServerError, y as PartialFailureError } from "./errors-CgHRBUnE.js";
3
+ import { $ as isCapacityShortageCreateError, B as parseLifecycleTimes, E as validateDeferredProfileFileMounts, F as normalizeCaptureProof, G as normalizeSandboxShape, H as normalizeConnection, I as normalizeSandboxCreateReceipt, J as DEPLOY_WINDOW_RETRY_MS, K as CAPACITY_ETA_MARGIN_MS, L as normalizeStartupDiagnostics, P as DirectRuntimeHttpClient, Q as generateIdempotencyKey, T as splitInlineProfileSkills, U as normalizeEgressPolicyFields, V as state, W as normalizeProxySecretReceipt, X as createRetryDelayMs, Y as awaitCreateResend, Z as extendableDeadline, d as sandboxLedgerUsd, et as isDeployWindowCreateError, n as createSandboxInstanceFromResponse, nt as isRetryableCreateError, o as exportTraceBundle, q as CAPACITY_ETA_WAIT_MAX_MS, rt as runtimeWorkspaceCwdSchema, tt as isRateLimitCreateError, w as splitInlineProfileFileMounts, x as deleteSandbox, z as dateOf } from "./sandbox-DRZhN_Vu.js";
4
+ import { C as SandboxError, D as TimeoutError, O as ValidationError, _ as NetworkError, a as readResponseJson, c as AuthError, i as parseResponseError, k as SANDBOX_CREATE_DEADLINE_HEADER, r as parseErrorResponse, v as NotFoundError, w as ServerError, y as PartialFailureError } from "./errors-BuEDuIrs.js";
5
5
  import { n as combineAbortSignals } from "./abort-signal-BsriwJ8L.js";
6
- import { r as abortableSleep, t as RETRY_POLICY } from "./retry-policy-oW3_ljoc.js";
7
- import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-CJ9M-TN7.js";
8
- import { l as SANDBOX_AGENT_HOME } from "./file-transfer-DOSTbUSR.js";
9
- import { c as isBrowserRuntime, i as resolveTraceId } from "./trace-id-8KPKajMl.js";
10
- import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-DjzdPAP3.js";
11
- import { t as parseSSEStream } from "./sse-parser-BCG3iL9j.js";
12
- import { t as LinesClient } from "./lines-CdfEanMh.js";
6
+ import { t as TRACEPARENT_HEADER } from "./lifecycle-trace-CDGgSOVP.js";
7
+ import { r as abortableSleep, t as RETRY_POLICY } from "./retry-policy-BlkQJ7_e.js";
8
+ import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-C-WGI8Tv.js";
9
+ import { l as SANDBOX_AGENT_HOME } from "./file-transfer-CnCWFYua.js";
10
+ import { a as resolveTraceId, l as isBrowserRuntime, r as lifecycleTraceHeaders } from "./trace-id-DX218plN.js";
11
+ import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-xLyOpHAc.js";
12
+ import { t as parseSSEStream } from "./sse-parser-DTgSRcZC.js";
13
+ import { t as LinesClient } from "./lines-D3DKzzQT.js";
13
14
  import { PublicTemplatesClient } from "./public-templates.js";
14
15
  import { z } from "zod";
16
+ import { toW3CTraceId } from "@tangle-network/agent-trace-contract/otlp";
15
17
  //#region ../../../packages/runtime-contracts/dist/git-policy.js
16
18
  const MAX_GIT_AUTH_TOKEN_LENGTH = 4096;
17
19
  const MAX_GIT_REPOSITORY_PATH_SEGMENT_LENGTH = 255;
@@ -1203,11 +1205,11 @@ function isLocalSandboxEndpoint(baseUrl) {
1203
1205
  }
1204
1206
  }
1205
1207
  async function resolveLocalCliAuthFiles(backendType) {
1206
- const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-CueE1l0F.js");
1208
+ const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-BVXWKaty.js");
1207
1209
  return discoverLocalCliAuthFiles(backendType);
1208
1210
  }
1209
1211
  async function loadLocalCliAuthExpectation(backendType) {
1210
- const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-CueE1l0F.js");
1212
+ const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-BVXWKaty.js");
1211
1213
  return describe(backendType);
1212
1214
  }
1213
1215
  /**
@@ -1258,6 +1260,7 @@ var SandboxTransport = class {
1258
1260
  onDirectRuntimeResponse;
1259
1261
  /** See `SandboxConfig.directExec`. */
1260
1262
  directExec;
1263
+ lifecycleTraceContext;
1261
1264
  signal;
1262
1265
  constructor(config) {
1263
1266
  if (!config.apiKey) throw new AuthError("API key is required");
@@ -1270,6 +1273,7 @@ var SandboxTransport = class {
1270
1273
  this.trustLocalCliAuth = config.trustLocalCliAuth === true;
1271
1274
  this.onTiming = config.onTiming;
1272
1275
  this.onDirectRuntimeResponse = config.onDirectRuntimeResponse;
1276
+ this.lifecycleTraceContext = config.lifecycleTraceContext ?? true;
1273
1277
  this.directExec = config.directExec ?? !isBrowserRuntime();
1274
1278
  this.signal = config.signal;
1275
1279
  }
@@ -1299,6 +1303,8 @@ var SandboxTransport = class {
1299
1303
  async fetch(path, options, fetchOptions) {
1300
1304
  return fetchSandboxApi({
1301
1305
  baseUrl: this.baseUrl,
1306
+ lifecycleTraceContext: this.lifecycleTraceContext,
1307
+ traceIdOf: toW3CTraceId,
1302
1308
  apiKey: this.#apiKey,
1303
1309
  timeoutMs: this.timeoutMs,
1304
1310
  signal: this.signal,
@@ -1724,6 +1730,34 @@ function verbatimCreateFields(options) {
1724
1730
  egressPolicy: options?.egressPolicy
1725
1731
  };
1726
1732
  }
1733
+ /** Keep the create operation attached until the returned allocation is ready. */
1734
+ async function waitForCreatedSandbox(instance, info, idempotencyKey, deadline, traceparent, signal) {
1735
+ const remainingMs = Math.max(0, deadline - Date.now());
1736
+ state(instance).createWaitTraceparent = traceparent;
1737
+ try {
1738
+ await instance.waitFor("running", {
1739
+ timeoutMs: remainingMs,
1740
+ signal
1741
+ });
1742
+ } catch (cause) {
1743
+ throw new PartialFailureError(`Sandbox ${info.id} did not become ready: ${cause instanceof Error ? cause.message : String(cause)}`, {
1744
+ code: "SANDBOX_CREATE_READINESS_FAILED",
1745
+ status: 502,
1746
+ origin: "sandbox-api",
1747
+ endpoint: "/v1/sandboxes",
1748
+ failures: [{
1749
+ sandboxId: info.id,
1750
+ idempotencyKey
1751
+ }],
1752
+ cause,
1753
+ allocationId: info.id,
1754
+ idempotencyKey,
1755
+ createReceipt: info.createReceipt ?? null
1756
+ });
1757
+ } finally {
1758
+ delete state(instance).createWaitTraceparent;
1759
+ }
1760
+ }
1727
1761
  var SandboxCreation = class extends SandboxManagement {
1728
1762
  /** Fresh execution with no ambient owner context. Old hosts reject this
1729
1763
  * explicit field before provisioning; no best-effort security downgrade. */
@@ -1749,6 +1783,7 @@ var SandboxCreation = class extends SandboxManagement {
1749
1783
  const timeoutMs = requestOptions?.timeoutMs ?? (options?.gpuLease ? SDK_TIMEOUTS.gpuCreate : SDK_TIMEOUTS.create);
1750
1784
  const idempotencyKey = options?.idempotencyKey ?? generateIdempotencyKey();
1751
1785
  const traceId = requestOptions?.traceId === void 0 && !globalThis.crypto ? void 0 : resolveTraceId(requestOptions?.traceId);
1786
+ const context = lifecycleTraceHeaders(this, traceId);
1752
1787
  const startedAt = Date.now();
1753
1788
  let deadline = startedAt + timeoutMs;
1754
1789
  let deployWindowDeadline = Math.min(deadline, startedAt + DEPLOY_WINDOW_RETRY_MS);
@@ -1885,6 +1920,7 @@ var SandboxCreation = class extends SandboxManagement {
1885
1920
  method: "POST",
1886
1921
  headers: {
1887
1922
  "Idempotency-Key": idempotencyKey,
1923
+ ...context,
1888
1924
  ...traceId && { ["x-tangle-trace-id"]: traceId },
1889
1925
  "x-no-retry": "1",
1890
1926
  [SANDBOX_CREATE_DEADLINE_HEADER]: String(deadline)
@@ -1955,30 +1991,7 @@ var SandboxCreation = class extends SandboxManagement {
1955
1991
  const instance = createSandboxInstanceFromResponse(this, info, withoutCreateOnlyModelFields(handleBackend), data);
1956
1992
  const runtimeClient = state(instance).client;
1957
1993
  if (runtimeClient instanceof DirectRuntimeHttpClient) runtimeClient.preconnect();
1958
- if (instance.status === "provisioning" || instance.status === "pending") {
1959
- const remainingMs = Math.max(0, deadline - Date.now());
1960
- try {
1961
- await instance.waitFor("running", {
1962
- timeoutMs: remainingMs,
1963
- signal: requestOptions?.signal
1964
- });
1965
- } catch (cause) {
1966
- throw new PartialFailureError(`Sandbox ${info.id} did not become ready: ${cause instanceof Error ? cause.message : String(cause)}`, {
1967
- code: "SANDBOX_CREATE_READINESS_FAILED",
1968
- status: 502,
1969
- origin: "sandbox-api",
1970
- endpoint: "/v1/sandboxes",
1971
- failures: [{
1972
- sandboxId: info.id,
1973
- idempotencyKey
1974
- }],
1975
- cause,
1976
- allocationId: info.id,
1977
- idempotencyKey,
1978
- createReceipt: info.createReceipt ?? null
1979
- });
1980
- }
1981
- }
1994
+ if (instance.status === "provisioning" || instance.status === "pending") await waitForCreatedSandbox(instance, info, idempotencyKey, deadline, context[TRACEPARENT_HEADER], requestOptions?.signal);
1982
1995
  if (pendingProfile) instance.deferProfileDelivery(pendingProfile, deferredProfileForPriming);
1983
1996
  return instance;
1984
1997
  }
@@ -4437,6 +4450,7 @@ var Sandbox = class Sandbox extends SandboxBatch {
4437
4450
  timeoutMs: this.timeoutMs,
4438
4451
  ...this.signal ? { signal: this.signal } : {},
4439
4452
  directExec: this.directExec,
4453
+ lifecycleTraceContext: this.lifecycleTraceContext,
4440
4454
  trustLocalCliAuth: this.trustLocalCliAuth,
4441
4455
  onTiming: this.onTiming
4442
4456
  });
@@ -1,9 +1,9 @@
1
- import { A as TraceExportResult, G as MaterializeProfileFileMountsResult, K as ProfileFileMountBox, O as SandboxInstance, W as MaterializeProfileFileMountsOptions, j as TraceExportSink, xt as SandboxOperation } from "./index-D7dMz_US.js";
2
- import { R as SandboxError, X as BatchCustody, Z as BatchResult, c as MintInteractiveSessionTokenOptions, it as BatchEvent, nt as PublicBatchRunRequestInput, tt as PublicBatchRunRequest, u as ScopedToken } from "./terminal-stream-types-RAsy75gD.js";
1
+ import { A as TraceExportResult, G as MaterializeProfileFileMountsResult, K as ProfileFileMountBox, O as SandboxInstance, W as MaterializeProfileFileMountsOptions, j as TraceExportSink, xt as SandboxOperation } from "./index-CtrSdLo2.js";
2
+ import { R as SandboxError, X as BatchCustody, Z as BatchResult, c as MintInteractiveSessionTokenOptions, it as BatchEvent, nt as PublicBatchRunRequestInput, tt as PublicBatchRunRequest, u as ScopedToken } from "./terminal-stream-types-BMLdhwUQ.js";
3
3
  import { A as AgentProfileMcpServer, D as AgentProfileConfidential, M as AgentProfileSeat, O as AgentProfileConfigValue, T as AgentProfile, j as AgentProfileMetadata, k as AgentProfileFileMount, n as SandboxSizePreset, u as AgentInteractiveSessionRef, x as AgentRuntimeAttachments } from "./index-V_pXOH3B.js";
4
- import { $ as SandboxFleetAgent, A as CreateSandboxFleetOptions, At as SandboxFleetWorkspaceReconcileResult, B as FleetDispatchStreamOptions, Br as SandboxDeleteOptions, Bt as SandboxRunGeneration, Ci as PromptInputPart, Cn as DownloadOptions, Cr as SdkTimingHook, Ct as SandboxFleetToken, D as FleetDriveTurnRequest, Dt as SandboxFleetTraceOptions, E as FleetDriveTurnOutcome, Ei as SandboxEvent, F as FleetAgentResult, Fr as DeleteMatchingSandboxesFilter, G as FleetPromptDispatchResult, H as FleetExecDispatchResult, Ir as DeleteMatchingSandboxesOptions, J as ListSandboxFleetOptions, K as FleetRunEvent, L as FleetDispatchCancelResult, Lr as DeleteMatchingSandboxesResult, Lt as SandboxInfo, M as CreateSandboxFleetWithCoordinatorOptions, Mr as AccountSnapshotInfo, Mt as SandboxFleetWorkspaceSnapshotResult, N as FleetAgentId, Nt as ListSandboxOptions, O as TokenRefreshHandler, Ot as SandboxFleetUsage, Pa as GpuLeaseProviderName, Pi as TurnBackendConfig, Q as ReconcileSandboxFleetsResult, Qn as PublishPublicTemplateOptions, Qt as TeeAttestationResponse, R as FleetDispatchResultBuffer, Ri as ConversationTurnOptions, Si as IntelligenceReportWindow, Sr as HttpClient, St as SandboxFleetSpend, Ti as PromptResult, Tn as DownloadResult, U as FleetMachineId, V as FleetExecDispatchOptions, W as FleetPromptDispatchOptions, X as ReapExpiredSandboxFleetsResult, Y as ReapExpiredSandboxFleetsOptions, Yn as ExecOptions, Z as ReconcileSandboxFleetsOptions, Zt as TeeAttestationReport, _r as ManagedProcessOptions, _t as SandboxFleetOperationsSummary, an as SandboxResources, bi as IntelligenceReportCompareTo, br as ManagedProcessRecord, bt as SandboxFleetPolicy, c as SubscriptionInfo, di as CreateIntelligenceReportOptions, dt as SandboxFleetMachine, er as SandboxEnvironment, ga as BackendConfig, gr as ManagedProcessJobs, ht as SandboxFleetManifest, in as SandboxConfig, it as SandboxFleetCostEstimate, j as CreateSandboxFleetTokenOptions, jt as SandboxFleetWorkspaceRestoreResult, k as AttachSandboxFleetMachineOptions, l as UsageInfo, ln as SandboxShapePreset, lt as SandboxFleetInfo, mt as SandboxFleetMachineSpec, n as SshKeysManager, nn as CreateRequestOptions, nt as SandboxFleetArtifactSpec, oi as BatchRunOptions, on as SandboxShapesInfo, ot as SandboxFleetDispatchResponse, pt as SandboxFleetMachineRecord, q as FleetRunOptions, qa as ExecResult, rn as CreateSandboxOptions, rt as SandboxFleetCancelResult, s as SandboxIdentity, st as SandboxFleetDriverCapability, t as SecretsManager, tt as SandboxFleetArtifact, vi as IntelligenceReport, vr as ManagedProcessResumeOptions, vt as SandboxFleetParent, wa as SecretBindingOptions, wi as PromptOptions, wt as SandboxFleetTraceBundle, xr as ManagedProcessSpec, yi as IntelligenceReportBudget, z as FleetDispatchResultBufferOptions, zi as ConversationTurnResult, zr as SandboxDeleteAcknowledgement } from "./types-5by8R76_.js";
5
- import { t as LinesClient } from "./lines-DkfkbLSV.js";
6
- import { a as PublicTemplatesClient } from "./public-templates-maL22HQt.js";
4
+ import { $ as SandboxFleetAgent, A as CreateSandboxFleetOptions, At as SandboxFleetWorkspaceReconcileResult, B as FleetDispatchStreamOptions, Br as SandboxDeleteOptions, Bt as SandboxRunGeneration, Ci as PromptInputPart, Cn as DownloadOptions, Cr as SdkTimingHook, Ct as SandboxFleetToken, D as FleetDriveTurnRequest, Dt as SandboxFleetTraceOptions, E as FleetDriveTurnOutcome, Ei as SandboxEvent, F as FleetAgentResult, Fr as DeleteMatchingSandboxesFilter, G as FleetPromptDispatchResult, H as FleetExecDispatchResult, Ir as DeleteMatchingSandboxesOptions, J as ListSandboxFleetOptions, K as FleetRunEvent, L as FleetDispatchCancelResult, Lr as DeleteMatchingSandboxesResult, Lt as SandboxInfo, M as CreateSandboxFleetWithCoordinatorOptions, Mr as AccountSnapshotInfo, Mt as SandboxFleetWorkspaceSnapshotResult, N as FleetAgentId, Nt as ListSandboxOptions, O as TokenRefreshHandler, Ot as SandboxFleetUsage, Pa as GpuLeaseProviderName, Pi as TurnBackendConfig, Q as ReconcileSandboxFleetsResult, Qn as PublishPublicTemplateOptions, Qt as TeeAttestationResponse, R as FleetDispatchResultBuffer, Ri as ConversationTurnOptions, Si as IntelligenceReportWindow, Sr as HttpClient, St as SandboxFleetSpend, Ti as PromptResult, Tn as DownloadResult, U as FleetMachineId, V as FleetExecDispatchOptions, W as FleetPromptDispatchOptions, X as ReapExpiredSandboxFleetsResult, Y as ReapExpiredSandboxFleetsOptions, Yn as ExecOptions, Z as ReconcileSandboxFleetsOptions, Zt as TeeAttestationReport, _r as ManagedProcessOptions, _t as SandboxFleetOperationsSummary, an as SandboxResources, bi as IntelligenceReportCompareTo, br as ManagedProcessRecord, bt as SandboxFleetPolicy, c as SubscriptionInfo, di as CreateIntelligenceReportOptions, dt as SandboxFleetMachine, er as SandboxEnvironment, ga as BackendConfig, gr as ManagedProcessJobs, ht as SandboxFleetManifest, in as SandboxConfig, it as SandboxFleetCostEstimate, j as CreateSandboxFleetTokenOptions, jt as SandboxFleetWorkspaceRestoreResult, k as AttachSandboxFleetMachineOptions, l as UsageInfo, ln as SandboxShapePreset, lt as SandboxFleetInfo, mt as SandboxFleetMachineSpec, n as SshKeysManager, nn as CreateRequestOptions, nt as SandboxFleetArtifactSpec, oi as BatchRunOptions, on as SandboxShapesInfo, ot as SandboxFleetDispatchResponse, pt as SandboxFleetMachineRecord, q as FleetRunOptions, qa as ExecResult, rn as CreateSandboxOptions, rt as SandboxFleetCancelResult, s as SandboxIdentity, st as SandboxFleetDriverCapability, t as SecretsManager, tt as SandboxFleetArtifact, vi as IntelligenceReport, vr as ManagedProcessResumeOptions, vt as SandboxFleetParent, wa as SecretBindingOptions, wi as PromptOptions, wt as SandboxFleetTraceBundle, xr as ManagedProcessSpec, yi as IntelligenceReportBudget, z as FleetDispatchResultBufferOptions, zi as ConversationTurnResult, zr as SandboxDeleteAcknowledgement } from "./types-DOngB_Rs.js";
5
+ import { t as LinesClient } from "./lines-Ce4UmKfm.js";
6
+ import { a as PublicTemplatesClient } from "./public-templates-GebzRZgV.js";
7
7
  import { z } from "zod";
8
8
 
9
9
  //#region src/backend-registry.d.ts
@@ -106,6 +106,7 @@ declare class SandboxTransport {
106
106
  readonly onDirectRuntimeResponse: SandboxConfig["onDirectRuntimeResponse"];
107
107
  /** See `SandboxConfig.directExec`. */
108
108
  readonly directExec: boolean;
109
+ readonly lifecycleTraceContext: boolean;
109
110
  readonly signal: AbortSignal | undefined;
110
111
  constructor(config: SandboxConfig);
111
112
  getApiKey(): string;
@@ -1,2 +1,2 @@
1
- import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-ZcNePxyN.js";
1
+ import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-3qrTMyna.js";
2
2
  export { CollaborationClient, CollaborationFileBridge, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
@@ -1,5 +1,5 @@
1
- import { D as TimeoutError, _ as NetworkError, r as parseErrorResponse } from "./errors-CgHRBUnE.js";
2
- import { i as fetchSandboxApi } from "./api-request-CJ9M-TN7.js";
1
+ import { D as TimeoutError, _ as NetworkError, r as parseErrorResponse } from "./errors-BuEDuIrs.js";
2
+ import { i as fetchSandboxApi } from "./api-request-C-WGI8Tv.js";
3
3
  //#region src/collaboration/client.ts
4
4
  function normalizeBaseUrl(url) {
5
5
  return url.replace(/\/+$/, "");
package/dist/core.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { B as WorkspaceImages, H as WorkspaceImagePublishResult, O as SandboxInstance, U as ProfileFileDeliveryReport, V as WorkspaceImagePublishInput, z as WorkspaceImagePublishRequestOptions } from "./index-D7dMz_US.js";
2
- import { F as ProfileFileMountPathError, H as ServerError, I as QuotaError, K as TimeoutError, M as NetworkError, N as NotFoundError, O as FileWriteConflictError, P as PartialFailureError, R as SandboxError, S as AuthError, U as StateError, V as SandboxFailureDetail, b as parseErrorResponse, q as ValidationError, w as CapabilityError, x as responseMetadata, z as SandboxErrorJson } from "./terminal-stream-types-RAsy75gD.js";
3
- import { Ci as PromptInputPart, Lt as SandboxInfo, Ri as ConversationTurnOptions, Xa as SandboxEnvRecoveryView, Ya as SandboxEnvRecovery, Yn as ExecOptions, _r as ManagedProcessOptions, b as PreviewLinkManager, br as ManagedProcessRecord, fn as NetworkConfig, gr as ManagedProcessJobs, in as SandboxConfig, oa as SessionMessageAdmission, qa as ExecResult, rn as CreateSandboxOptions, sn as SandboxStatus, vr as ManagedProcessResumeOptions, x as PreviewLinkWaitOptions, xr as ManagedProcessSpec, y as PreviewLinkInfo, yr as ManagedProcessState, zi as ConversationTurnResult } from "./types-5by8R76_.js";
4
- import { D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, l as LineApplicationAttachOptions, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, t as LinesClient, w as LineNumberInventory, y as LineMember } from "./lines-DkfkbLSV.js";
5
- import { At as InstancesClient, Ct as ManagedProcessClient, Dt as InstanceRecord, Et as InstanceProfile, Mt as sandboxFailureKind, Ot as InstanceRestartingError, St as gatewaySeatTransport, Tt as HostedInstance, _t as SeatOwnerTransport, an as BackendRegistryCapabilities, bt as SeatSelectionRequest, cn as BackendRegistryResponse, dn as backendRegistryInteractionKindSchema, dt as GatewaySeatTransportOptions, fn as backendRegistryResponseSchema, gt as SeatOwnerReply, hn as parseBackendRegistryResponseBody, ht as SandboxSeatSelectionInput, jt as SandboxFailureKind, ln as backendRegistryCapabilitiesSchema, lt as ISOLATED_CREATION_ATTESTATION_VERSION, mn as parseBackendRegistryResponse, mt as SandboxSeatCredentials, on as BackendRegistryEntry, pn as isBackendRegistryInteractionKind, pt as SandboxResolvedSeat, sn as BackendRegistryInteractionKind, t as Sandbox, un as backendRegistryEntrySchema, ut as CreateSelectSeatOptions, vt as SeatResolutionObservation, wt as EnsureInstanceOptions, xt as createSelectSeat, yt as SeatSelectionError } from "./client-Bb4VO8Tv.js";
6
- import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-maL22HQt.js";
1
+ import { B as WorkspaceImages, H as WorkspaceImagePublishResult, O as SandboxInstance, U as ProfileFileDeliveryReport, V as WorkspaceImagePublishInput, z as WorkspaceImagePublishRequestOptions } from "./index-CtrSdLo2.js";
2
+ import { F as ProfileFileMountPathError, H as ServerError, I as QuotaError, K as TimeoutError, M as NetworkError, N as NotFoundError, O as FileWriteConflictError, P as PartialFailureError, R as SandboxError, S as AuthError, U as StateError, V as SandboxFailureDetail, b as parseErrorResponse, q as ValidationError, w as CapabilityError, x as responseMetadata, z as SandboxErrorJson } from "./terminal-stream-types-BMLdhwUQ.js";
3
+ import { Ci as PromptInputPart, Lt as SandboxInfo, Ri as ConversationTurnOptions, Xa as SandboxEnvRecoveryView, Ya as SandboxEnvRecovery, Yn as ExecOptions, _r as ManagedProcessOptions, b as PreviewLinkManager, br as ManagedProcessRecord, fn as NetworkConfig, gr as ManagedProcessJobs, in as SandboxConfig, oa as SessionMessageAdmission, qa as ExecResult, rn as CreateSandboxOptions, sn as SandboxStatus, vr as ManagedProcessResumeOptions, x as PreviewLinkWaitOptions, xr as ManagedProcessSpec, y as PreviewLinkInfo, yr as ManagedProcessState, zi as ConversationTurnResult } from "./types-DOngB_Rs.js";
4
+ import { D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, l as LineApplicationAttachOptions, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, t as LinesClient, w as LineNumberInventory, y as LineMember } from "./lines-Ce4UmKfm.js";
5
+ import { At as InstancesClient, Ct as ManagedProcessClient, Dt as InstanceRecord, Et as InstanceProfile, Mt as sandboxFailureKind, Ot as InstanceRestartingError, St as gatewaySeatTransport, Tt as HostedInstance, _t as SeatOwnerTransport, an as BackendRegistryCapabilities, bt as SeatSelectionRequest, cn as BackendRegistryResponse, dn as backendRegistryInteractionKindSchema, dt as GatewaySeatTransportOptions, fn as backendRegistryResponseSchema, gt as SeatOwnerReply, hn as parseBackendRegistryResponseBody, ht as SandboxSeatSelectionInput, jt as SandboxFailureKind, ln as backendRegistryCapabilitiesSchema, lt as ISOLATED_CREATION_ATTESTATION_VERSION, mn as parseBackendRegistryResponse, mt as SandboxSeatCredentials, on as BackendRegistryEntry, pn as isBackendRegistryInteractionKind, pt as SandboxResolvedSeat, sn as BackendRegistryInteractionKind, t as Sandbox, un as backendRegistryEntrySchema, ut as CreateSelectSeatOptions, vt as SeatResolutionObservation, wt as EnsureInstanceOptions, xt as createSelectSeat, yt as SeatSelectionError } from "./client-DFaxpuf9.js";
6
+ import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-GebzRZgV.js";
7
7
  export { AuthError, BackendRegistryCapabilities, BackendRegistryEntry, BackendRegistryInteractionKind, BackendRegistryResponse, CapabilityError, ConversationTurnOptions, ConversationTurnResult, CreateSandboxOptions, CreateSelectSeatOptions, EnsureInstanceOptions, ExecOptions, ExecResult, FileWriteConflictError, GatewaySeatTransportOptions, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, InstanceProfile, InstanceRecord, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, Line, LineAgentRolePolicy, LineApplication, LineApplicationAttachOptions, LineApplicationRequest, LineApplicationResult, LineApplicationState, LineApplicationView, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineImage, LineInstanceAttachOptions, LineInstanceCreate, LineMember, LineMemberInstance, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyCode, LineReplyCodeInput, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LinesClient, ManagedProcessClient, ManagedProcessJobs, ManagedProcessOptions, ManagedProcessRecord, ManagedProcessResumeOptions, ManagedProcessSpec, ManagedProcessState, NetworkConfig, NetworkError, NotFoundError, PartialFailureError, PreviewLinkInfo, PreviewLinkManager, PreviewLinkWaitOptions, ProfileFileDeliveryReport, ProfileFileMountPathError, PromptInputPart, PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient, QuotaError, Sandbox, SandboxConfig, SandboxEnvRecovery, SandboxEnvRecoveryView, SandboxError, SandboxErrorJson, SandboxFailureDetail, SandboxFailureKind, SandboxInfo, SandboxInstance, SandboxResolvedSeat, SandboxSeatCredentials, SandboxSeatSelectionInput, SandboxStatus, SeatOwnerReply, SeatOwnerTransport, SeatResolutionObservation, SeatSelectionError, SeatSelectionRequest, ServerError, SessionMessageAdmission, StateError, TimeoutError, ValidationError, WorkspaceImagePublishInput, WorkspaceImagePublishRequestOptions, WorkspaceImagePublishResult, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, createSelectSeat, gatewaySeatTransport, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference, responseMetadata, sandboxFailureKind };
package/dist/core.js CHANGED
@@ -1,8 +1,8 @@
1
- import { S as ManagedProcessClient, r as WorkspaceImages, t as SandboxInstance } from "./sandbox-BTTAoCMR.js";
2
- import { C as SandboxError, D as TimeoutError, O as ValidationError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, m as FileWriteConflictError, o as responseMetadata, r as parseErrorResponse, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-CgHRBUnE.js";
3
- import { a as InstancesClient, c as backendRegistryCapabilitiesSchema, d as backendRegistryResponseSchema, f as isBackendRegistryInteractionKind, i as InstanceRestartingError, l as backendRegistryEntrySchema, m as parseBackendRegistryResponseBody, p as parseBackendRegistryResponse, r as HostedInstance, t as Sandbox, u as backendRegistryInteractionKindSchema } from "./client-DL_Q0ixz.js";
4
- import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-CdfEanMh.js";
1
+ import { S as ManagedProcessClient, r as WorkspaceImages, t as SandboxInstance } from "./sandbox-DRZhN_Vu.js";
2
+ import { C as SandboxError, D as TimeoutError, O as ValidationError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, m as FileWriteConflictError, o as responseMetadata, r as parseErrorResponse, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-BuEDuIrs.js";
3
+ import { a as InstancesClient, c as backendRegistryCapabilitiesSchema, d as backendRegistryResponseSchema, f as isBackendRegistryInteractionKind, i as InstanceRestartingError, l as backendRegistryEntrySchema, m as parseBackendRegistryResponseBody, p as parseBackendRegistryResponse, r as HostedInstance, t as Sandbox, u as backendRegistryInteractionKindSchema } from "./client-Bh0fgYe6.js";
4
+ import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-D3DKzzQT.js";
5
5
  import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
6
- import { a as parseLineApplicationResult, i as parseLineApplicationRequest, n as LINE_APPLICATION_REPLY_MAX_CHARS, o as sandboxFailureKind, r as LINE_APPLICATION_REQUEST_MAX_BYTES, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-CBWUEURz.js";
7
- import { a as createSelectSeat, i as SeatSelectionError, o as gatewaySeatTransport } from "./select-seat-Cq1LrUG-.js";
6
+ import { a as parseLineApplicationResult, i as parseLineApplicationRequest, n as LINE_APPLICATION_REPLY_MAX_CHARS, o as sandboxFailureKind, r as LINE_APPLICATION_REQUEST_MAX_BYTES, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-BWiEs9yv.js";
7
+ import { a as createSelectSeat, i as SeatSelectionError, o as gatewaySeatTransport } from "./select-seat-D_L4pss9.js";
8
8
  export { AuthError, CapabilityError, FileWriteConflictError, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, LinesClient, ManagedProcessClient, NetworkError, NotFoundError, PartialFailureError, ProfileFileMountPathError, PublicTemplatePublishError, PublicTemplatesClient, QuotaError, Sandbox, SandboxError, SandboxInstance, SeatSelectionError, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, createSelectSeat, gatewaySeatTransport, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference, responseMetadata, sandboxFailureKind };
@@ -1,5 +1,5 @@
1
- import { a as responseTraceId } from "./trace-id-8KPKajMl.js";
2
- import { t as emitTiming } from "./keep-alive-fetch-DjzdPAP3.js";
1
+ import { o as responseTraceId } from "./trace-id-DX218plN.js";
2
+ import { t as emitTiming } from "./keep-alive-fetch-xLyOpHAc.js";
3
3
  //#region src/lib/direct-http2.ts
4
4
  const sessions = /* @__PURE__ */ new Map();
5
5
  const inFlight = /* @__PURE__ */ new WeakMap();
@@ -33,6 +33,7 @@ const ERROR_CATALOG = {
33
33
  UPSTREAM_ERROR: "502 retry | An upstream service failed or answered outside its contract. | Retry with backoff; report the request id if it persists.",
34
34
  UNAVAILABLE: "503 retry | A dependency or capacity is temporarily unavailable. | Retry after the Retry-After interval.",
35
35
  UPSTREAM_UNAVAILABLE: "503 retry | The sandbox controller did not answer, or answered without a code the catalog knows. | Retry after the Retry-After interval.",
36
+ CONTROLLER_RESTARTING: "503 retry | The controller is restarting. | Retry reads or repeat with the same operation key. Check unkeyed writes before repeating them.",
36
37
  NOT_READY: "503 retry | The target is starting, restarting, recovering or draining. | Retry after the Retry-After interval.",
37
38
  BACKEND_UNAVAILABLE: "503 retry | The agent backend did not answer. | Retry after the Retry-After interval.",
38
39
  MESSAGE_RETRIEVAL_UNAVAILABLE: "503 retry | Message storage did not answer. | Retry after the Retry-After interval.",
@@ -54,6 +55,7 @@ const ERROR_CATALOG = {
54
55
  BRANCH_PARENT_NOT_RUNNING: "409 final | The branch parent is not running. | Resume the parent sandbox, then branch again.",
55
56
  BRANCH_NOT_MATERIALIZED: "409 final | The branch parent was removed before any child materialized. | Branch a live sandbox with a new idempotency key.",
56
57
  CONTAINER_RESERVATION_CONFLICT: "409 retry | Another lifecycle operation holds this sandbox. | Wait for that operation to finish, then retry.",
58
+ CONTAINER_GENERATION_MISMATCH: "409 final | The stopped Docker generation differs from the sandbox checkpoint. | Resume the sandbox from its confirmed checkpoint.",
57
59
  CONTAINER_NETWORK_MISSING: "409 final | The stopped sandbox lost its network, so it cannot start in place; its files remain. | Resume the sandbox so the platform recreates it.",
58
60
  EGRESS_DISABLED: "409 final | Egress is not enabled on this host. | Place the sandbox on a host with egress enabled.",
59
61
  NATIVE_CAPTURE_UNAVAILABLE: "409 final | The host cannot prove the native capture image this create requires. | Retry on another host, or create without native capture.",
@@ -62,6 +64,7 @@ const ERROR_CATALOG = {
62
64
  SNAPSHOT_LIMIT_REACHED: "409 final | The sandbox holds as many snapshots as its plan allows. | Delete a snapshot of this sandbox, or move to a plan with a higher snapshot limit.",
63
65
  SNAPSHOT_NOT_SYNCED: "409 retry | The snapshot has not finished uploading. | Retry after the upload completes.",
64
66
  WARM_CLAIM_REMOVED: "409 final | Another lifecycle operation removed the claimed warm sandbox. | Create the sandbox again.",
67
+ GOLDEN_SEED_SPENT: "503 final | This warm-pool seed captured the golden snapshot and was retired, since its identity is in that memory. | Nothing to do; the pool's next seed restores from that snapshot.",
65
68
  WORKSPACE_STORAGE_MISSING: "409 final | The stopped sandbox storage is gone or replaced, so the host refused to start it. | Restore the sandbox from a snapshot.",
66
69
  RESTORE_QUOTA_EXCEEDED: "413 final | The snapshot is larger than the workspace quota. | Create with a larger disk, or restore a smaller snapshot.",
67
70
  GIT_CLONE_REFUSED: "422 final | The repository refused the clone credential, or the credential cannot see it. | Fix the git credential or repository URL, then create again.",
@@ -1,4 +1,4 @@
1
- import { n as HOST_AGENT_RESTART_KINDS, r as catalogEntry, t as ERROR_CATALOG } from "./error-catalog-DMNep7Y3.js";
1
+ import { n as HOST_AGENT_RESTART_KINDS, r as catalogEntry, t as ERROR_CATALOG } from "./error-catalog-DwxHMZQZ.js";
2
2
  import { n as plannedRestartDeadline, t as parseSandboxRetryAfterHeader } from "./retry-after-header-DyAWSQ4m.js";
3
3
  //#region ../../../packages/runtime-contracts/dist/sandbox-create-headers.js
4
4
  /** The caller's absolute create deadline (epoch ms), shared by every attempt. */
@@ -1,5 +1,5 @@
1
1
  import { n as bytesToHex, t as sha256 } from "./sha2--74Uh_Sg.js";
2
- import { O as ValidationError } from "./errors-CgHRBUnE.js";
2
+ import { O as ValidationError } from "./errors-BuEDuIrs.js";
3
3
  import { n as combineAbortSignals } from "./abort-signal-BsriwJ8L.js";
4
4
  //#region src/lib/file-download.ts
5
5
  function downloadBounds(options) {
@@ -1,5 +1,5 @@
1
- import { i as fetchSandboxApi } from "../api-request-CJ9M-TN7.js";
2
- import { t as ITangleJobsAbi } from "../abi-pcDt2Adp.js";
1
+ import { i as fetchSandboxApi } from "../api-request-C-WGI8Tv.js";
2
+ import { t as ITangleJobsAbi } from "../abi-CQYNCS4F.js";
3
3
  import { createPublicClient, createWalletClient, decodeAbiParameters, encodeAbiParameters, encodeFunctionData, hexToBytes, http, keccak256, parseAbi, parseAbiParameters, parseEventLogs, recoverMessageAddress, stringToHex } from "viem";
4
4
  import { privateKeyToAccount } from "viem/accounts";
5
5
  //#region src/gpu-lease/vault.ts
@@ -1,11 +1,11 @@
1
- import { R as SandboxError, Y as SandboxCreateReceipt, g as TerminalReadyInfo, i as TerminalStreamHandlers, l as MintScopedTokenOptions, o as TerminalStreamReconnectAuthority, u as ScopedToken } from "./terminal-stream-types-RAsy75gD.js";
1
+ import { R as SandboxError, Y as SandboxCreateReceipt, g as TerminalReadyInfo, i as TerminalStreamHandlers, l as MintScopedTokenOptions, o as TerminalStreamReconnectAuthority, u as ScopedToken } from "./terminal-stream-types-BMLdhwUQ.js";
2
2
  import { C as InteractionRequest, F as ProxySecretReceipt, I as InteractionData, S as InteractionAcknowledgement, T as AgentProfile, _ as TerminalReplayWindow, a as AgentInteractiveSessionControlClaim, b as AgentRunCancellationRequest, c as AgentInteractiveSessionPromptAcknowledgement, f as AgentInteractiveSessionStopAcknowledgement, g as TerminalOutputEvent, i as AgentInteractiveSessionAttach, k as AgentProfileFileMount, l as AgentInteractiveSessionPromptCommand, m as AgentInteractiveTerminalSession, o as AgentInteractiveSessionControlClaimAcknowledgement, p as AgentInteractiveSessionStopCommand, r as AgentInteractiveSessionStart, s as AgentInteractiveSessionControlClaimRequest, u as AgentInteractiveSessionRef, w as InteractionResponseCommand, y as AgentRunCancellationAcknowledgement } from "./index-V_pXOH3B.js";
3
- import { $r as SnapshotResult, Ar as RolloutStartResult, Bi as CreateSessionOptions, Br as SandboxDeleteOptions, C as GitCommit, Ci as PromptInputPart, Dr as ForkLookupOptions, Ei as SandboxEvent, Er as ForkIdempotency, Fi as CommitTaskSessionOptions, Ft as SSHCredentials, Ga as CodeLanguage, Gi as ListMessagesOptions, Gn as WriteManyFile, Hi as DispatchPromptOptions, Hr as SandboxOperationInfo, Ht as SandboxTerminalAttachOptions, It as SandboxConnection, Ja as WriteFileRequest, Ji as SendSessionMessageRequest, Jn as SearchOptions, Jt as StartupDiagnostics, Ki as PublicProfileConflict, Kn as WriteManyOptions, Kr as SnapshotDeleteAcknowledgement, Li as CompletedTurnResult, Lt as SandboxInfo, Mi as SandboxTraceOptions, Mn as FileSystem, Or as Rollout, Pi as TurnBackendConfig, Pt as SSHCommandDescriptor, Qa as InteractionResolutionAcknowledgement, Qi as SessionExecutionInfo, Qt as TeeAttestationResponse, Ri as ConversationTurnOptions, Rn as FileWriteResult, Rr as RestoreSnapshotOptions, Rt as SandboxPortBinding, S as GitBranch, Si as IntelligenceReportWindow, Sr as HttpClient, T as GitStatus, Ti as PromptResult, Tr as ForkCounts, Ui as DispatchedSession, Ur as SandboxOperationKind, Vi as CreateTaskSessionOptions, Vt as SandboxRuntimeHealth, Wa as CodeExecutionResult, Wi as DriveTurnOptions, Wn as WriteFileOptions, Wr as SandboxOperationState, Xa as SandboxEnvRecoveryView, Xr as SnapshotOptions, Xt as TeeAttestationOptions, Ya as SandboxEnvRecovery, Yi as SentSessionMessage, Yn as ExecOptions, Yr as SnapshotInfo, Zi as SessionEventStreamOptions, Zr as SnapshotProvenance, _i as EventStreamOptions, aa as SessionMessage, ar as DriverInfo, b as PreviewLinkManager, bi as IntelligenceReportCompareTo, ca as SessionResultOptions, cn as SandboxShape, ei as StopOptions, en as TeePublicKeyResponse, fa as TaskSessionInfo, fi as DurablePlan, fr as GpuLeaseManager, g as ProcessManager, ga as BackendConfig, hr as CodeExecutionOptions, i as ProvisionResult, ia as SessionListOptions, jr as WaitForRolloutOptions, ki as SandboxTraceBundle, kr as RolloutOptions, la as TaskSessionChanges, ma as TurnDriveResult, mi as DurablePlanDecisionResult, na as SessionInfo, ni as SandboxResourceUsage, o as ResumeOptions, oa as SessionMessageAdmission, pi as DurablePlanDecisionOptions, pn as NetworkManager, qa as ExecResult, qi as SendSessionMessageOptions, qn as SearchMatch, qt as SandboxTerminals, r as ProvisionEvent, ra as SessionInterruptOptions, ri as SandboxRuntimeCapabilities, rn as CreateSandboxOptions, sn as SandboxStatus, sr as GpuLease, ta as SessionForkOptions, ti as WorkspaceOperationLookup, tn as TerminalStream, u as WaitForOptions, ua as TaskSessionCommitResult, un as EgressManager, va as BackendManager, vi as IntelligenceReport, w as GitDiff, wi as PromptOptions, wr as BranchOptions, wt as SandboxFleetTraceBundle, yi as IntelligenceReportBudget, za as RetainedWorkspacePublication, zi as ConversationTurnResult, zr as SandboxDeleteAcknowledgement } from "./types-5by8R76_.js";
3
+ import { $r as SnapshotResult, Ar as RolloutStartResult, Bi as CreateSessionOptions, Br as SandboxDeleteOptions, C as GitCommit, Ci as PromptInputPart, Dr as ForkLookupOptions, Ei as SandboxEvent, Er as ForkIdempotency, Fi as CommitTaskSessionOptions, Ft as SSHCredentials, Ga as CodeLanguage, Gi as ListMessagesOptions, Gn as WriteManyFile, Hi as DispatchPromptOptions, Hr as SandboxOperationInfo, Ht as SandboxTerminalAttachOptions, It as SandboxConnection, Ja as WriteFileRequest, Ji as SendSessionMessageRequest, Jn as SearchOptions, Jt as StartupDiagnostics, Ki as PublicProfileConflict, Kn as WriteManyOptions, Kr as SnapshotDeleteAcknowledgement, Li as CompletedTurnResult, Lt as SandboxInfo, Mi as SandboxTraceOptions, Mn as FileSystem, Or as Rollout, Pi as TurnBackendConfig, Pt as SSHCommandDescriptor, Qa as InteractionResolutionAcknowledgement, Qi as SessionExecutionInfo, Qt as TeeAttestationResponse, Ri as ConversationTurnOptions, Rn as FileWriteResult, Rr as RestoreSnapshotOptions, Rt as SandboxPortBinding, S as GitBranch, Si as IntelligenceReportWindow, Sr as HttpClient, T as GitStatus, Ti as PromptResult, Tr as ForkCounts, Ui as DispatchedSession, Ur as SandboxOperationKind, Vi as CreateTaskSessionOptions, Vt as SandboxRuntimeHealth, Wa as CodeExecutionResult, Wi as DriveTurnOptions, Wn as WriteFileOptions, Wr as SandboxOperationState, Xa as SandboxEnvRecoveryView, Xr as SnapshotOptions, Xt as TeeAttestationOptions, Ya as SandboxEnvRecovery, Yi as SentSessionMessage, Yn as ExecOptions, Yr as SnapshotInfo, Zi as SessionEventStreamOptions, Zr as SnapshotProvenance, _i as EventStreamOptions, aa as SessionMessage, ar as DriverInfo, b as PreviewLinkManager, bi as IntelligenceReportCompareTo, ca as SessionResultOptions, cn as SandboxShape, ei as StopOptions, en as TeePublicKeyResponse, fa as TaskSessionInfo, fi as DurablePlan, fr as GpuLeaseManager, g as ProcessManager, ga as BackendConfig, hr as CodeExecutionOptions, i as ProvisionResult, ia as SessionListOptions, jr as WaitForRolloutOptions, ki as SandboxTraceBundle, kr as RolloutOptions, la as TaskSessionChanges, ma as TurnDriveResult, mi as DurablePlanDecisionResult, na as SessionInfo, ni as SandboxResourceUsage, o as ResumeOptions, oa as SessionMessageAdmission, pi as DurablePlanDecisionOptions, pn as NetworkManager, qa as ExecResult, qi as SendSessionMessageOptions, qn as SearchMatch, qt as SandboxTerminals, r as ProvisionEvent, ra as SessionInterruptOptions, ri as SandboxRuntimeCapabilities, rn as CreateSandboxOptions, sn as SandboxStatus, sr as GpuLease, ta as SessionForkOptions, ti as WorkspaceOperationLookup, tn as TerminalStream, u as WaitForOptions, ua as TaskSessionCommitResult, un as EgressManager, va as BackendManager, vi as IntelligenceReport, w as GitDiff, wi as PromptOptions, wr as BranchOptions, wt as SandboxFleetTraceBundle, yi as IntelligenceReportBudget, za as RetainedWorkspacePublication, zi as ConversationTurnResult, zr as SandboxDeleteAcknowledgement } from "./types-DOngB_Rs.js";
4
4
  import { c as RawEvidenceDirectoryExport, l as RawEvidenceExportOptions, o as RawEvidenceBoxDirectoryExport, p as RawEvidenceUnavailable, r as RawEvidenceArchiveManifest, s as RawEvidenceBoxExportOptions } from "./raw-evidence-export-1ygyhNsS.js";
5
5
  import { r as CliAuthReference } from "./cli-auth-bundle-Dx3AAWdJ.js";
6
- import { n as SandboxLines } from "./lines-DkfkbLSV.js";
7
- import { _ as InteractiveSessionStatus, f as InteractiveAttachOptions, g as InteractiveRequestOptions, h as InteractiveObserveOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-CNqYrsK-.js";
8
- import { r as InteractiveAttachRequest } from "./interactive-controller-RKI6dXBi.js";
6
+ import { n as SandboxLines } from "./lines-Ce4UmKfm.js";
7
+ import { _ as InteractiveSessionStatus, f as InteractiveAttachOptions, g as InteractiveRequestOptions, h as InteractiveObserveOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-CD8b8KFn.js";
8
+ import { r as InteractiveAttachRequest } from "./interactive-controller-DJpf6ofh.js";
9
9
  import { z } from "zod";
10
10
  import { OtlpTraceExport } from "@tangle-network/agent-trace-contract/otlp";
11
11
 
@@ -128,7 +128,7 @@ declare class SandboxOperationFailedError extends SandboxError {
128
128
  }
129
129
  declare class SandboxOperation {
130
130
  #private;
131
- constructor(info: SandboxOperationInfo, client: HttpClient | null, onSettled?: (info: SandboxOperationInfo) => void | Promise<void>);
131
+ constructor(info: SandboxOperationInfo, client: HttpClient | null, onSettled?: (info: SandboxOperationInfo) => void | Promise<void>, traceHeaders?: Record<string, string>);
132
132
  static completed(kind: SandboxOperationKind, sandboxId: string, result?: SandboxOperationInfo["result"]): SandboxOperation;
133
133
  get id(): string;
134
134
  get state(): SandboxOperationState;
@@ -1772,6 +1772,7 @@ declare abstract class SandboxSnapshotCapabilities extends SandboxTurnCapabiliti
1772
1772
  snapshot(options?: SnapshotOptions): Promise<SnapshotResult>;
1773
1773
  /** List snapshots; storage selects the direct customer-S3 path. */
1774
1774
  listSnapshots(storage?: SnapshotOptions["storage"]): Promise<SnapshotInfo[]>;
1775
+ private readSnapshotList;
1775
1776
  /** Delete returns already_absent for a missing snapshot; 404 means the sandbox itself is unknown. */
1776
1777
  deleteSnapshot(snapshotId: string, options?: {
1777
1778
  /** Per-call request deadline; invalid timer bounds throw RangeError. Omitted uses the client timeout. */timeoutMs?: number;
@@ -1787,8 +1788,8 @@ declare abstract class SandboxSnapshotCapabilities extends SandboxTurnCapabiliti
1787
1788
  /** One keyed restore: a transport re-send joins its job; a 202 settles from that job. */
1788
1789
  private restoreSnapshot;
1789
1790
  /** Read the accepted restore job first; poll only while unfinished. */
1790
- protected waitForSnapshotRestore(snapshotId: string, accepted: SnapshotRestoreJobStatusResponse): Promise<SnapshotResult>;
1791
- protected waitForSnapshotVisible(snapshotId: string, fallback?: Partial<SnapshotResult>): Promise<SnapshotResult>;
1791
+ protected waitForSnapshotRestore(snapshotId: string, accepted: SnapshotRestoreJobStatusResponse, trace?: Record<string, string>): Promise<SnapshotResult>;
1792
+ protected waitForSnapshotVisible(snapshotId: string, fallback?: Partial<SnapshotResult>, trace?: Record<string, string>): Promise<SnapshotResult>;
1792
1793
  /** Restore the latest customer-storage snapshot directly; null means none found. */
1793
1794
  restoreFromStorage(storage: SnapshotOptions["storage"], options?: RestoreSnapshotOptions): Promise<SnapshotResult | null>;
1794
1795
  }