@tangle-network/sandbox 1.0.231 → 1.0.233

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 (81) 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-execution-preparation-BJChICex.js +18 -0
  7. package/dist/agent-execution-preparation-receipt-BIFxqyr5.js +250 -0
  8. package/dist/{agent-run-outcome-DMaHbXAk.d.ts → agent-run-outcome-B0nURFpG.d.ts} +3 -2
  9. package/dist/{api-request-_SFFNVqY.js → api-request-dyabkosT.js} +34 -9
  10. package/dist/auth/index.d.ts +2 -2
  11. package/dist/auth/index.js +2 -2
  12. package/dist/{browser-interactive-control-controller-BiP6TJFP.js → browser-interactive-control-controller-BM2p1dBp.js} +16 -252
  13. package/dist/{browser-interactive-control-controller-qv26Bpfx.d.ts → browser-interactive-control-controller-CcUjQEfa.d.ts} +1 -1
  14. package/dist/{chunked-upload-BjkxykZD.js → chunked-upload-BlvgxPWx.js} +4 -5
  15. package/dist/{chunked-upload-file-B2KFimpz.js → chunked-upload-file-DOeLpMO0.js} +2 -2
  16. package/dist/cli-auth-bundle-BLAtE6Dc.js +2 -0
  17. package/dist/{client-OlxlnLwV.js → client-BS-PR_-j.js} +38 -47
  18. package/dist/{client-DvvRMxKx.d.ts → client-DlTDphmI.d.ts} +38 -32
  19. package/dist/collaboration/index.d.ts +1 -1
  20. package/dist/collaboration/index.js +1 -1
  21. package/dist/{collaboration-DZ8ptALs.js → collaboration-Dz20mN9a.js} +20 -27
  22. package/dist/core-CUZyz-U8.js +161 -0
  23. package/dist/core.d.ts +6 -6
  24. package/dist/core.js +6 -5
  25. package/dist/{direct-http2-DU2SK2Wo.js → direct-http2-Bgb2lHte.js} +1 -1
  26. package/dist/{errors-A-bhwwsE.js → error-catalog-CAbzw67O.js} +1 -382
  27. package/dist/errors-nXGKGVFe.js +382 -0
  28. package/dist/{file-download-UhMKbMbD.js → file-download-BjkrYzy_.js} +1 -1
  29. package/dist/{index-Cip3q_xe.d.ts → index-DE5n6mot.d.ts} +13 -23
  30. package/dist/index.d.ts +12 -12
  31. package/dist/index.js +29 -25
  32. package/dist/intelligence/index.d.ts +41 -109
  33. package/dist/intelligence/index.js +60 -73
  34. package/dist/interactive-control.d.ts +1 -1
  35. package/dist/interactive-control.js +1 -1
  36. package/dist/{interactive-controller-D4gZ4f2I.js → interactive-controller-DDPdZa2H.js} +20 -54
  37. package/dist/{interactive-controller-P0yy6sGl.d.ts → interactive-controller-sEU_J6Bc.d.ts} +3 -3
  38. package/dist/lib/prepared-evidence.js +1 -1
  39. package/dist/lib/prepared-process.js +1 -1
  40. package/dist/{lines-7VecgiGd.js → lines-CSGBHEjR.js} +1 -1
  41. package/dist/{lines-DNXdVbGO.d.ts → lines-qvpmwN_2.d.ts} +1 -1
  42. package/dist/lines.d.ts +1 -1
  43. package/dist/lines.js +1 -1
  44. package/dist/{local-cli-auth-CPS9yuTc.js → local-cli-auth-CO0byocv.js} +1 -1
  45. package/dist/{mcp-local-CIXZFqF4.js → mcp-local-Dz_Sehz0.js} +4 -4
  46. package/dist/{prepared-evidence-Byty5p51.js → prepared-evidence-ibAysmX8.js} +2 -2
  47. package/dist/{prepared-process-u1B0b94R.js → prepared-process-DQ_68Ofg.js} +2 -2
  48. package/dist/{preview-CNfYklE6.d.ts → preview-BC_wLaA2.d.ts} +3 -3
  49. package/dist/{public-templates-CPvDf8CH.d.ts → public-templates-WuvmbvzY.d.ts} +2 -2
  50. package/dist/public-templates.d.ts +1 -1
  51. package/dist/public-templates.js +1 -1
  52. package/dist/{raw-evidence-archive-BgWqaQcM.js → raw-evidence-archive-Cz4j8VMw.js} +2 -2
  53. package/dist/{retry-policy-Dh-VezcE.js → retry-policy-oW3_ljoc.js} +2 -24
  54. package/dist/runtime.d.ts +7 -7
  55. package/dist/runtime.js +9 -9
  56. package/dist/{sandbox-Dvk2PYnL.js → sandbox-OyCRplrI.js} +65 -91
  57. package/dist/{secp256k1-Cbp9tbkX.js → secp256k1-ZiYFbGjz.js} +1 -1
  58. package/dist/{core-D7czAW25.js → select-seat-B4Y-7vIq.js} +40 -171
  59. package/dist/select-seat-command.d.ts +9 -3
  60. package/dist/select-seat-command.js +69 -57
  61. package/dist/session-gateway/index.js +11 -20
  62. package/dist/sidecar-proxy-error-DTdbCbUM.js +4 -0
  63. package/dist/tangle/index.d.ts +1 -1
  64. package/dist/tangle/index.js +1 -1
  65. package/dist/{tangle-DWzUnb1Y.js → tangle-Crxw_6V-.js} +22 -17
  66. package/dist/{terminal-stream-types-DB8V0hiG.d.ts → terminal-stream-types-eE97lZ-5.d.ts} +0 -1
  67. package/dist/{types-Cmv31xBh.d.ts → types-Cs5eJzOK.d.ts} +17 -57
  68. package/package.json +5 -5
  69. package/dist/cli-auth-bundle-CMJWI99l.js +0 -2
  70. package/dist/sidecar-proxy-error-DpBLxIof.js +0 -24
  71. /package/dist/{abort-signal-BbJTt2QJ.js → abort-signal-CRxC2dlT.js} +0 -0
  72. /package/dist/{cli-auth-bundle-C6DtK7GX-BbbiAn-Z.js → cli-auth-bundle-C6DtK7GX-mBUPER0R.js} +0 -0
  73. /package/dist/{cli-auth-bundle-Wg3x2hd2.d.ts → cli-auth-bundle-CjSu4D9W.d.ts} +0 -0
  74. /package/dist/{file-transfer-BSe4ayU9.js → file-transfer-DOSTbUSR.js} +0 -0
  75. /package/dist/{index-CDtEPygc.d.ts → index-C-_HY5NY.d.ts} +0 -0
  76. /package/dist/{index-YbAo-so_.d.ts → index-o31uwAkX.d.ts} +0 -0
  77. /package/dist/{keep-alive-fetch-BIaDMUtu.js → keep-alive-fetch-sGVP8skk.js} +0 -0
  78. /package/dist/{preview-operations-B3TTvqlm.js → preview-operations-DWL78boI.js} +0 -0
  79. /package/dist/{retry-after-header-DUdCC0KJ.js → retry-after-header-BZbs5rig.js} +0 -0
  80. /package/dist/{sse-parser-DOCszo1K.js → sse-parser-BCG3iL9j.js} +0 -0
  81. /package/dist/{utils-CK-x8vXj.js → utils-BT2q9nkO.js} +0 -0
@@ -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-eE97lZ-5.js";
2
+ import { t as CliAuthReference } from "./cli-auth-bundle-CjSu4D9W.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. */
@@ -2043,6 +2043,8 @@ interface PromptResult {
2043
2043
  response?: string;
2044
2044
  /** Error message when the run did not succeed */
2045
2045
  error?: string;
2046
+ /** Failure metadata; the consuming provider validates its owning interface schema. */
2047
+ failure?: Readonly<Record<string, unknown>>;
2046
2048
  /** Machine-readable error code from the runtime, e.g. `empty_visible_output`. */
2047
2049
  errorCode?: string;
2048
2050
  /** Native HTTP failure status when the provider reported it. */
@@ -2622,6 +2624,8 @@ interface HttpClient {
2622
2624
  readonly directExec?: boolean;
2623
2625
  /** Cancels this client's requests, including direct runtime transports. */
2624
2626
  readonly signal?: AbortSignal | undefined;
2627
+ /** Default request deadline in ms, direct runtime calls included (`SDK_TIMEOUTS`). */
2628
+ readonly timeoutMs?: number;
2625
2629
  }
2626
2630
  //#endregion
2627
2631
  //#region ../../../packages/runtime-contracts/dist/managed-process-contract.d.ts
@@ -2704,7 +2708,7 @@ type ManagedProcessRecord = z.infer<typeof managedProcessRecordSchema>;
2704
2708
  interface CodeExecutionOptions {
2705
2709
  /** Session scope: kernels persist variables across calls with the same id. */
2706
2710
  sessionId?: string;
2707
- /** Per-call timeout in ms. 0 disables. Default 60_000. */
2711
+ /** Kernel run limit in ms (`SDK_TIMEOUTS.runCode`; 0 removes it); the request waits it plus `SDK_TIMEOUTS.margin`. */
2708
2712
  timeoutMs?: number;
2709
2713
  /** Extra env vars merged in for this call only. */
2710
2714
  env?: Record<string, string>;
@@ -3074,7 +3078,7 @@ interface ExecOptions {
3074
3078
  cwd?: string;
3075
3079
  /** Environment variables */
3076
3080
  env?: Record<string, string>;
3077
- /** Timeout in milliseconds */
3081
+ /** Run limit in ms (default 30 s); the request waits it plus `SDK_TIMEOUTS.margin`. */
3078
3082
  timeoutMs?: number;
3079
3083
  /** Task session id (e.g. `task-abc123`). When set, the runtime
3080
3084
  * resolves `cwd` against the session's isolated workspace and
@@ -4394,9 +4398,9 @@ interface SandboxConfig {
4394
4398
  /** Base URL for the Sandbox API */
4395
4399
  baseUrl: string;
4396
4400
  /**
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).
4401
+ * Every call's deadline in ms (default `SDK_TIMEOUTS.default`, 30 s), direct runtime calls
4402
+ * included, unless `SDK_TIMEOUTS` names the call. A JSON or error body is bounded until read;
4403
+ * a successful SSE or binary stream until its headers arrive.
4400
4404
  */
4401
4405
  timeoutMs?: number;
4402
4406
  /** Client lifetime cancellation, composed with each request's own signal. */
@@ -4513,56 +4517,10 @@ interface SandboxShapesInfo {
4513
4517
  }
4514
4518
  /** @deprecated Use CreateSandboxOptions.proxySecrets for authored proxy policy. */
4515
4519
  /**
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
- * ```
4520
+ * Create a managed sandbox, or use bare for exec/lifecycle without the runtime.
4521
+ * Git seeds a repository; environment selects an image. Storage and fromSnapshot
4522
+ * restore a durable workspace. Field docs below own each option's semantics;
4523
+ * the exported quickstart examples provide complete runnable create flows.
4566
4524
  */
4567
4525
  interface CreateSandboxOptions {
4568
4526
  /**
@@ -4578,6 +4536,8 @@ interface CreateSandboxOptions {
4578
4536
  ownerContext?: "inherit" | "isolated";
4579
4537
  /** Require proven native session capture on the selected host. */
4580
4538
  requireNativeSessionCapture?: boolean;
4539
+ /** Internal-owned ephemeral workspaces only; incompatible with capture or retained paths. */
4540
+ sessionCapture?: "discard";
4581
4541
  /**
4582
4542
  * Optional environment or container image override.
4583
4543
  * Omit this field to use the server's default image.
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.233",
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": "182382617cc538d30d0be31e52989e254a5cba8a",
164
+ "mergedAt": "2026-11-04T17:38: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