@tangle-network/sandbox 1.0.231 → 1.0.232

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 (77) hide show
  1. package/README.md +22 -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-DMaHbXAk.d.ts → agent-run-outcome-MsLkgPNu.d.ts} +2 -2
  7. package/dist/{api-request-_SFFNVqY.js → api-request-B0BPgzdp.js} +34 -9
  8. package/dist/auth/index.d.ts +2 -2
  9. package/dist/auth/index.js +2 -2
  10. package/dist/{browser-interactive-control-controller-BiP6TJFP.js → browser-interactive-control-controller-Bf-DbRCA.js} +14 -4
  11. package/dist/{browser-interactive-control-controller-qv26Bpfx.d.ts → browser-interactive-control-controller-D17JJ8B0.d.ts} +1 -1
  12. package/dist/{chunked-upload-BjkxykZD.js → chunked-upload-BGwaw5np.js} +4 -5
  13. package/dist/{chunked-upload-file-B2KFimpz.js → chunked-upload-file-BnV8qgwV.js} +2 -2
  14. package/dist/cli-auth-bundle-DvmJ71bO.js +2 -0
  15. package/dist/{client-DvvRMxKx.d.ts → client-BTpWpGs-.d.ts} +36 -30
  16. package/dist/{client-OlxlnLwV.js → client-CgZADtPk.js} +36 -46
  17. package/dist/collaboration/index.d.ts +1 -1
  18. package/dist/collaboration/index.js +1 -1
  19. package/dist/{collaboration-DZ8ptALs.js → collaboration-DneF_7bo.js} +20 -27
  20. package/dist/{core-D7czAW25.js → core-Cxww35JL.js} +5 -5
  21. package/dist/core.d.ts +6 -6
  22. package/dist/core.js +5 -5
  23. package/dist/{direct-http2-DU2SK2Wo.js → direct-http2-B5bdFrtg.js} +1 -1
  24. package/dist/{errors-A-bhwwsE.js → error-catalog-CGhVLVNq.js} +1 -382
  25. package/dist/errors-dK3-2RCh.js +382 -0
  26. package/dist/{file-download-UhMKbMbD.js → file-download-CUNdbymj.js} +1 -1
  27. package/dist/{index-Cip3q_xe.d.ts → index-CHP8U613.d.ts} +13 -23
  28. package/dist/index.d.ts +12 -12
  29. package/dist/index.js +28 -25
  30. package/dist/intelligence/index.js +3 -3
  31. package/dist/interactive-control.d.ts +1 -1
  32. package/dist/interactive-control.js +1 -1
  33. package/dist/{interactive-controller-D4gZ4f2I.js → interactive-controller-Bs7VQ04W.js} +17 -54
  34. package/dist/{interactive-controller-P0yy6sGl.d.ts → interactive-controller-DbNjY09X.d.ts} +3 -3
  35. package/dist/lib/prepared-evidence.js +1 -1
  36. package/dist/lib/prepared-process.js +1 -1
  37. package/dist/{lines-7VecgiGd.js → lines-DtssoioA.js} +1 -1
  38. package/dist/{lines-DNXdVbGO.d.ts → lines-n-mBURry.d.ts} +1 -1
  39. package/dist/lines.d.ts +1 -1
  40. package/dist/lines.js +1 -1
  41. package/dist/{local-cli-auth-CPS9yuTc.js → local-cli-auth-8Ndf1jRw.js} +1 -1
  42. package/dist/{mcp-local-CIXZFqF4.js → mcp-local-tA5cB3zq.js} +4 -4
  43. package/dist/{prepared-evidence-Byty5p51.js → prepared-evidence-DBE_xYjq.js} +2 -2
  44. package/dist/{prepared-process-u1B0b94R.js → prepared-process-B1kSkhn-.js} +2 -2
  45. package/dist/{preview-CNfYklE6.d.ts → preview-BHee3FzP.d.ts} +3 -3
  46. package/dist/{public-templates-CPvDf8CH.d.ts → public-templates-ZrUJ507X.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-BgWqaQcM.js → raw-evidence-archive-Cfy_3_3y.js} +2 -2
  50. package/dist/{retry-policy-Dh-VezcE.js → retry-policy-CI5tyUGr.js} +2 -24
  51. package/dist/runtime.d.ts +7 -7
  52. package/dist/runtime.js +9 -9
  53. package/dist/{sandbox-Dvk2PYnL.js → sandbox-DOvm9OvM.js} +59 -74
  54. package/dist/{secp256k1-Cbp9tbkX.js → secp256k1-DZM5U2gv.js} +1 -1
  55. package/dist/select-seat-command.d.ts +1 -1
  56. package/dist/select-seat-command.js +1 -1
  57. package/dist/session-gateway/index.js +11 -20
  58. package/dist/sidecar-proxy-error-CeNM5eJj.js +4 -0
  59. package/dist/tangle/index.d.ts +1 -1
  60. package/dist/tangle/index.js +1 -1
  61. package/dist/{tangle-DWzUnb1Y.js → tangle-DFmy_0hM.js} +22 -17
  62. package/dist/{terminal-stream-types-DB8V0hiG.d.ts → terminal-stream-types-NBdVKKFu.d.ts} +0 -1
  63. package/dist/{types-Cmv31xBh.d.ts → types-CuMa305b.d.ts} +13 -57
  64. package/package.json +5 -5
  65. package/dist/cli-auth-bundle-CMJWI99l.js +0 -2
  66. package/dist/sidecar-proxy-error-DpBLxIof.js +0 -24
  67. /package/dist/{abort-signal-BbJTt2QJ.js → abort-signal-C0_9B1Hm.js} +0 -0
  68. /package/dist/{cli-auth-bundle-Wg3x2hd2.d.ts → cli-auth-bundle-BE_EfLUx.d.ts} +0 -0
  69. /package/dist/{cli-auth-bundle-C6DtK7GX-BbbiAn-Z.js → cli-auth-bundle-C6DtK7GX-Cjs6D-9c.js} +0 -0
  70. /package/dist/{file-transfer-BSe4ayU9.js → file-transfer-CSL53pv9.js} +0 -0
  71. /package/dist/{index-YbAo-so_.d.ts → index-D0zHNMSe.d.ts} +0 -0
  72. /package/dist/{index-CDtEPygc.d.ts → index-DsX2pOIn.d.ts} +0 -0
  73. /package/dist/{keep-alive-fetch-BIaDMUtu.js → keep-alive-fetch-C2DX2_rG.js} +0 -0
  74. /package/dist/{preview-operations-B3TTvqlm.js → preview-operations-BBF0BNuZ.js} +0 -0
  75. /package/dist/{retry-after-header-DUdCC0KJ.js → retry-after-header-Bt-XvU-x.js} +0 -0
  76. /package/dist/{sse-parser-DOCszo1K.js → sse-parser-CBQzZvkZ.js} +0 -0
  77. /package/dist/{utils-CK-x8vXj.js → utils-DqiOGAK5.js} +0 -0
@@ -0,0 +1,4 @@
1
+ //#region ../../../packages/runtime-contracts/dist/sidecar-proxy-error.js
2
+ const SIDECAR_PROXY_ERROR_HEADER = "X-Tangle-Sidecar-Proxy-Error";
3
+ //#endregion
4
+ export { SIDECAR_PROXY_ERROR_HEADER as t };
@@ -1,2 +1,2 @@
1
- import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_CHAIN_ID, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as BlueprintSandboxClientConfig, h as BlueprintSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TANGLE_JOBS_CONTRACT, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-Cip3q_xe.js";
1
+ import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_CHAIN_ID, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as BlueprintSandboxClientConfig, h as BlueprintSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TANGLE_JOBS_CONTRACT, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-CHP8U613.js";
2
2
  export { AgentSandboxBlueprintAbi, BlueprintSandboxClient, BlueprintSandboxClientConfig, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JobQuoteDetails, JsonResponseParamTypes, OperatorChallenge, OperatorSession, OperatorSessionError, OperatorSessionToken, QuoteDomain, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, SignMessage, SignedQuote, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
@@ -1,2 +1,2 @@
1
- import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as BlueprintSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-DWzUnb1Y.js";
1
+ import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as BlueprintSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-DFmy_0hM.js";
2
2
  export { AgentSandboxBlueprintAbi, BlueprintSandboxClient, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
@@ -1,6 +1,7 @@
1
- import { L as readFilesystemIncarnationTuple, n as createSandboxInstanceFromResponse } from "./sandbox-Dvk2PYnL.js";
2
- import { a as readResponseJson } from "./errors-A-bhwwsE.js";
3
- import { _ as rotlBH, a as anumber, b as rotlSL, d as createXOFer, g as u32, h as toBytes$1, l as createHasher, m as swap32IfBE, n as abytes, o as aoutput, r as aexists, s as clean, t as Hash, v as rotlBL, x as split, y as rotlSH } from "./utils-CK-x8vXj.js";
1
+ import { L as readFilesystemIncarnationTuple, n as createSandboxInstanceFromResponse } from "./sandbox-DOvm9OvM.js";
2
+ import { a as readResponseJson } from "./errors-dK3-2RCh.js";
3
+ import { i as fetchSandboxApi } from "./api-request-B0BPgzdp.js";
4
+ import { _ as rotlBH, a as anumber, b as rotlSL, d as createXOFer, g as u32, h as toBytes$1, l as createHasher, m as swap32IfBE, n as abytes, o as aoutput, r as aexists, s as clean, t as Hash, v as rotlBL, x as split, y as rotlSH } from "./utils-DqiOGAK5.js";
4
5
  //#region ../../../packages/runtime-contracts/dist/tangle-blueprint-abi.js
5
6
  /**
6
7
  * Tangle blueprint wire contract shared by the orchestrator's Tangle driver and
@@ -998,12 +999,18 @@ var OperatorSession = class OperatorSession {
998
999
  */
999
1000
  static async establish(baseUrl, signMessage, fetchImpl = fetch) {
1000
1001
  const root = baseUrl.replace(/\/+$/, "");
1001
- const challengeResponse = await fetchImpl(`${root}/api/auth/challenge`, { method: "POST" });
1002
+ const challengeResponse = await fetchSandboxApi({
1003
+ baseUrl: "",
1004
+ fetchImpl
1005
+ }, `${root}/api/auth/challenge`, { method: "POST" });
1002
1006
  if (!challengeResponse.ok) throw new OperatorSessionError(`Operator challenge failed (HTTP ${challengeResponse.status})`, challengeResponse.status);
1003
1007
  const challenge = await challengeResponse.json();
1004
1008
  if (!challenge?.nonce || !challenge?.message) throw new OperatorSessionError("Operator challenge response is missing nonce/message");
1005
1009
  const signature = await signMessage(challenge.message);
1006
- const sessionResponse = await fetchImpl(`${root}/api/auth/session`, {
1010
+ const sessionResponse = await fetchSandboxApi({
1011
+ baseUrl: "",
1012
+ fetchImpl
1013
+ }, `${root}/api/auth/session`, {
1007
1014
  method: "POST",
1008
1015
  headers: { "Content-Type": "application/json" },
1009
1016
  body: JSON.stringify({
@@ -1258,13 +1265,13 @@ var BlueprintSandboxClient = class {
1258
1265
  * - POST /v1/sandboxes/:id/resume → unsupported until blueprint exposes resume
1259
1266
  * - DELETE /v1/sandboxes/:id → on-chain JOB_SANDBOX_DELETE
1260
1267
  */
1261
- async fetch(path, options) {
1268
+ async fetch(path, options, fetchOptions) {
1262
1269
  const method = options?.method ?? "GET";
1263
1270
  const runtimeMatch = path.match(/^\/v1\/sandboxes\/([^/]+)\/runtime(\/.*)$/);
1264
1271
  if (runtimeMatch) {
1265
1272
  const id = decodeURIComponent(requirePathGroup(runtimeMatch, 1));
1266
1273
  const runtimePath = requirePathGroup(runtimeMatch, 2);
1267
- return this.fetchRuntime(id, runtimePath, options);
1274
+ return this.fetchRuntime(id, runtimePath, options, fetchOptions);
1268
1275
  }
1269
1276
  const getMatch = path.match(/^\/v1\/sandboxes\/([^/]+)$/);
1270
1277
  if (getMatch && method === "GET") {
@@ -1349,7 +1356,7 @@ var BlueprintSandboxClient = class {
1349
1356
  }
1350
1357
  throw new Error(`Operation not supported via on-chain client: ${method} ${path}`);
1351
1358
  }
1352
- async fetchRuntime(sandboxId, runtimePath, options) {
1359
+ async fetchRuntime(sandboxId, runtimePath, options, fetchOptions) {
1353
1360
  let entry = this.#sandboxes.get(sandboxId);
1354
1361
  if (this.operatorApiUrl) {
1355
1362
  const operatorResponse = await this.fetchOperatorApi(`/api/sandboxes/${encodeURIComponent(sandboxId)}`, { method: "GET" });
@@ -1366,12 +1373,10 @@ var BlueprintSandboxClient = class {
1366
1373
  headers.set("Authorization", `Bearer ${entry.runtimeToken}`);
1367
1374
  const isFormDataBody = typeof FormData !== "undefined" && options?.body instanceof FormData;
1368
1375
  if (!headers.has("Content-Type") && !isFormDataBody) headers.set("Content-Type", "application/json");
1369
- const method = options?.method ?? "GET";
1370
- return await fetch(`${entry.runtimeUrl.replace(/\/$/, "")}${runtimePath}`, {
1376
+ return fetchSandboxApi({ baseUrl: entry.runtimeUrl }, runtimePath, {
1371
1377
  ...options,
1372
- method,
1373
1378
  headers
1374
- });
1379
+ }, fetchOptions);
1375
1380
  }
1376
1381
  /**
1377
1382
  * Get available capacity from the blueprint contract.
@@ -1410,7 +1415,7 @@ var BlueprintSandboxClient = class {
1410
1415
  */
1411
1416
  async injectSecrets(sandboxId, secrets) {
1412
1417
  await this.withOperatorSession(sandboxId, async (session, url) => {
1413
- return await fetch(`${url}/api/sandboxes/${encodeURIComponent(sandboxId)}/secrets`, {
1418
+ return await fetchSandboxApi({ baseUrl: "" }, `${url}/api/sandboxes/${encodeURIComponent(sandboxId)}/secrets`, {
1414
1419
  method: "POST",
1415
1420
  headers: {
1416
1421
  Authorization: session.authorizationHeader(),
@@ -1423,7 +1428,7 @@ var BlueprintSandboxClient = class {
1423
1428
  /** Read a sandbox's provisioned secret keys and credential availability. */
1424
1429
  async getSecrets(sandboxId) {
1425
1430
  return this.withOperatorSession(sandboxId, async (session, url) => {
1426
- return await fetch(`${url}/api/sandboxes/${encodeURIComponent(sandboxId)}/secrets`, {
1431
+ return await fetchSandboxApi({ baseUrl: "" }, `${url}/api/sandboxes/${encodeURIComponent(sandboxId)}/secrets`, {
1427
1432
  method: "GET",
1428
1433
  headers: { Authorization: session.authorizationHeader() }
1429
1434
  });
@@ -1437,7 +1442,7 @@ var BlueprintSandboxClient = class {
1437
1442
  });
1438
1443
  }
1439
1444
  async readSandboxCredentials(sandboxId) {
1440
- const body = await (await this.withOperatorSession(sandboxId, async (session, url) => fetch(`${url}/api/sandboxes/${encodeURIComponent(sandboxId)}/credentials`, {
1445
+ const body = await (await this.withOperatorSession(sandboxId, async (session, url) => fetchSandboxApi({ baseUrl: "" }, `${url}/api/sandboxes/${encodeURIComponent(sandboxId)}/credentials`, {
1441
1446
  method: "GET",
1442
1447
  headers: { Authorization: session.authorizationHeader() }
1443
1448
  }), "read credentials for")).json();
@@ -1476,7 +1481,7 @@ var BlueprintSandboxClient = class {
1476
1481
  const headers = new Headers(options?.headers);
1477
1482
  if (this.#operatorApiToken && !headers.has("Authorization")) headers.set("Authorization", `Bearer ${this.#operatorApiToken}`);
1478
1483
  if (options?.body && !headers.has("Content-Type")) headers.set("Content-Type", "application/json");
1479
- return fetch(`${this.operatorApiUrl}${path}`, {
1484
+ return fetchSandboxApi({ baseUrl: this.operatorApiUrl }, path, {
1480
1485
  ...options,
1481
1486
  headers
1482
1487
  });
@@ -2712,7 +2717,7 @@ function isAddressEqual(a, b) {
2712
2717
  //#region ../../../node_modules/.pnpm/viem@2.57.11_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/signature/recoverPublicKey.js
2713
2718
  async function recoverPublicKey({ hash, signature }) {
2714
2719
  const hashHex = isHex(hash) ? hash : toHex(hash);
2715
- const { secp256k1 } = await import("./secp256k1-Cbp9tbkX.js");
2720
+ const { secp256k1 } = await import("./secp256k1-DZM5U2gv.js");
2716
2721
  return `0x${(() => {
2717
2722
  if (typeof signature === "object" && "r" in signature && "s" in signature) {
2718
2723
  const { r, s, v, yParity } = signature;
@@ -3404,7 +3404,6 @@ declare const ERROR_CATALOG: {
3404
3404
  readonly TEMPLATE_PUBLICATION_WAIT_INTERRUPTED: "504 retry | The SDK stopped waiting for a template publication; the job keeps running. | Resume the wait with resumeJobId instead of publishing again.";
3405
3405
  };
3406
3406
  type ErrorCode = keyof typeof ERROR_CATALOG;
3407
- /** What armed a HOST_AGENT_RESTARTING refusal's planned restart: its `restartKind`. */
3408
3407
  declare const HOST_AGENT_RESTART_KINDS: readonly ["rollout", "maintenance", "authorized", "in_place"];
3409
3408
  type HostAgentRestartKind = (typeof HOST_AGENT_RESTART_KINDS)[number];
3410
3409
  //#endregion
@@ -1,5 +1,5 @@
1
- import { Ct as InteractionRequest, Dt as AgentProfileConfidential, Et as AgentProfileCapabilities, It as ProxySecretReceipt, Nt as AgentProfileValidationResult, Pt as ReasoningEffort, Rt as PlanContinuation, Tt as AgentProfile, Z as BatchBackendInput, a as TerminalStreamOptions, g as TerminalReadyInfo, i as TerminalStreamHandlers, nt as SandboxSizePreset, q as SandboxCreateReceipt, rt as AgentRuntimeAttachments, s as TerminalStreamToken, t as TerminalAttachTimings, yt as AgentExactRunControlRef } from "./terminal-stream-types-DB8V0hiG.js";
2
- import { t as CliAuthReference } from "./cli-auth-bundle-Wg3x2hd2.js";
1
+ import { Ct as InteractionRequest, Dt as AgentProfileConfidential, Et as AgentProfileCapabilities, It as ProxySecretReceipt, Nt as AgentProfileValidationResult, Pt as ReasoningEffort, Rt as PlanContinuation, Tt as AgentProfile, Z as BatchBackendInput, a as TerminalStreamOptions, g as TerminalReadyInfo, i as TerminalStreamHandlers, nt as SandboxSizePreset, q as SandboxCreateReceipt, rt as AgentRuntimeAttachments, s as TerminalStreamToken, t as TerminalAttachTimings, yt as AgentExactRunControlRef } from "./terminal-stream-types-NBdVKKFu.js";
2
+ import { t as CliAuthReference } from "./cli-auth-bundle-BE_EfLUx.js";
3
3
  import { z } from "zod";
4
4
  //#region ../../../packages/runtime-contracts/dist/backend-types.d.ts
5
5
  /** This distribution's backend vocabulary. Gemini is only a backing transport, not a direct backend. */
@@ -2622,6 +2622,8 @@ interface HttpClient {
2622
2622
  readonly directExec?: boolean;
2623
2623
  /** Cancels this client's requests, including direct runtime transports. */
2624
2624
  readonly signal?: AbortSignal | undefined;
2625
+ /** Default request deadline in ms, direct runtime calls included (`SDK_TIMEOUTS`). */
2626
+ readonly timeoutMs?: number;
2625
2627
  }
2626
2628
  //#endregion
2627
2629
  //#region ../../../packages/runtime-contracts/dist/managed-process-contract.d.ts
@@ -2704,7 +2706,7 @@ type ManagedProcessRecord = z.infer<typeof managedProcessRecordSchema>;
2704
2706
  interface CodeExecutionOptions {
2705
2707
  /** Session scope: kernels persist variables across calls with the same id. */
2706
2708
  sessionId?: string;
2707
- /** Per-call timeout in ms. 0 disables. Default 60_000. */
2709
+ /** Kernel run limit in ms (`SDK_TIMEOUTS.runCode`; 0 removes it); the request waits it plus `SDK_TIMEOUTS.margin`. */
2708
2710
  timeoutMs?: number;
2709
2711
  /** Extra env vars merged in for this call only. */
2710
2712
  env?: Record<string, string>;
@@ -3074,7 +3076,7 @@ interface ExecOptions {
3074
3076
  cwd?: string;
3075
3077
  /** Environment variables */
3076
3078
  env?: Record<string, string>;
3077
- /** Timeout in milliseconds */
3079
+ /** Run limit in ms (default 30 s); the request waits it plus `SDK_TIMEOUTS.margin`. */
3078
3080
  timeoutMs?: number;
3079
3081
  /** Task session id (e.g. `task-abc123`). When set, the runtime
3080
3082
  * resolves `cwd` against the session's isolated workspace and
@@ -4394,9 +4396,9 @@ interface SandboxConfig {
4394
4396
  /** Base URL for the Sandbox API */
4395
4397
  baseUrl: string;
4396
4398
  /**
4397
- * Request timeout in milliseconds, including declared JSON and error response bodies.
4398
- * Successful SSE and binary streams are bounded only through response headers.
4399
- * Defaults to 30000 (30 seconds).
4399
+ * Every call's deadline in ms (default `SDK_TIMEOUTS.default`, 30 s), direct runtime calls
4400
+ * included, unless `SDK_TIMEOUTS` names the call. A JSON or error body is bounded until read;
4401
+ * a successful SSE or binary stream until its headers arrive.
4400
4402
  */
4401
4403
  timeoutMs?: number;
4402
4404
  /** Client lifetime cancellation, composed with each request's own signal. */
@@ -4513,56 +4515,10 @@ interface SandboxShapesInfo {
4513
4515
  }
4514
4516
  /** @deprecated Use CreateSandboxOptions.proxySecrets for authored proxy policy. */
4515
4517
  /**
4516
- * Configuration for creating a new sandbox.
4517
- *
4518
- * Sandboxes can run in two modes:
4519
- * - **Managed** (default): Full-featured with agent, files, terminal, git, tools
4520
- * - **Bare**: Minimal container with only exec() and lifecycle methods
4521
- *
4522
- * @example Minimal sandbox (managed mode with defaults)
4523
- * ```typescript
4524
- * const box = await client.create();
4525
- * // Uses the server's default image and managed runtime
4526
- * ```
4527
- *
4528
- * @example Sandbox with a Git repository
4529
- * ```typescript
4530
- * const box = await client.create({
4531
- * git: {
4532
- * url: "https://github.com/user/dapp.git",
4533
- * ref: "main",
4534
- * },
4535
- * });
4536
- * ```
4537
- *
4538
- * @example Sandbox with custom Docker image
4539
- * ```typescript
4540
- * const box = await client.create({
4541
- * environment: "python:3.12-slim",
4542
- * git: { url: "https://github.com/user/ml-project.git" },
4543
- * });
4544
- * ```
4545
- *
4546
- * @example Bare sandbox (no managed runtime, just exec)
4547
- * ```typescript
4548
- * const box = await client.create({
4549
- * environment: "ubuntu:24.04",
4550
- * bare: true,
4551
- * });
4552
- * // Only box.exec(), box.stop(), box.resume(), box.delete() available
4553
- * ```
4554
- *
4555
- * @example With BYOS3 storage for snapshots
4556
- * ```typescript
4557
- * const box = await client.create({
4558
- * storage: {
4559
- * type: "s3",
4560
- * bucket: "my-snapshots",
4561
- * credentials: { accessKeyId: "...", secretAccessKey: "..." },
4562
- * },
4563
- * fromSnapshot: "snap_abc123",
4564
- * });
4565
- * ```
4518
+ * Create a managed sandbox, or use bare for exec/lifecycle without the runtime.
4519
+ * Git seeds a repository; environment selects an image. Storage and fromSnapshot
4520
+ * restore a durable workspace. Field docs below own each option's semantics;
4521
+ * the exported quickstart examples provide complete runnable create flows.
4566
4522
  */
4567
4523
  interface CreateSandboxOptions {
4568
4524
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "1.0.231",
3
+ "version": "1.0.232",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -156,12 +156,12 @@
156
156
  "@products/sandbox-test-utils": "0.0.0",
157
157
  "@repo/shared": "0.0.0",
158
158
  "@tangle-network/agent-profile-materialize": "0.27.1",
159
- "@tangle-network/runtime-contracts": "0.20.0",
160
- "@tangle-network/cli-agent-registry": "0.15.0"
159
+ "@tangle-network/cli-agent-registry": "0.15.0",
160
+ "@tangle-network/runtime-contracts": "0.20.0"
161
161
  },
162
162
  "tangleRelease": {
163
- "sourceSha": "8a30e5eb019ccb70228dbb0402424851987c8515",
164
- "mergedAt": "2026-11-04T14:30:50-08:00"
163
+ "sourceSha": "29a3412f03231d8799989ce2d03f501f4a5ea989",
164
+ "mergedAt": "2026-11-04T15:52:12-08:00"
165
165
  },
166
166
  "scripts": {
167
167
  "build": "node scripts/build-dist.mjs",
@@ -1,2 +0,0 @@
1
- import "./cli-auth-bundle-C6DtK7GX-BbbiAn-Z.js";
2
- export {};
@@ -1,24 +0,0 @@
1
- //#region ../../../packages/runtime-contracts/dist/sidecar-proxy-error.js
2
- /**
3
- * Response header that the host-agent sidecar proxy puts on each error it
4
- * writes itself. The value is the host-agent error code, for example
5
- * `NOT_MANAGED` or `ROUTE_LOOKUP_FAILED`.
6
- *
7
- * The orchestrator reaches a sidecar only through the host-agent sidecar
8
- * proxy. Thus two services write errors on that path. They use the same
9
- * statuses (404, 502, 503, 504) and the same `{error, code}` JSON body. This
10
- * header names the author of the response. If the header is present, the
11
- * host-agent wrote the response. If the header is absent, the sidecar wrote
12
- * the response.
13
- *
14
- * The orchestrator invalidates the endpoint and sends the request again only
15
- * for a host-agent error. A sidecar error is an ordinary answer, and a new
16
- * endpoint cannot change it.
17
- *
18
- * The host-agent deletes this header from an upstream response before it
19
- * returns that response. A sidecar must not be able to set the header. A
20
- * tenant preview app on an in-container port must not be able to set it.
21
- */
22
- const SIDECAR_PROXY_ERROR_HEADER = "X-Tangle-Sidecar-Proxy-Error";
23
- //#endregion
24
- export { SIDECAR_PROXY_ERROR_HEADER as t };
File without changes