@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.
- package/README.md +22 -1
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +5 -5
- package/dist/agent/preview.d.ts +1 -1
- package/dist/agent/preview.js +2 -2
- package/dist/agent-execution-preparation-BJChICex.js +18 -0
- package/dist/agent-execution-preparation-receipt-BIFxqyr5.js +250 -0
- package/dist/{agent-run-outcome-DMaHbXAk.d.ts → agent-run-outcome-B0nURFpG.d.ts} +3 -2
- package/dist/{api-request-_SFFNVqY.js → api-request-dyabkosT.js} +34 -9
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +2 -2
- package/dist/{browser-interactive-control-controller-BiP6TJFP.js → browser-interactive-control-controller-BM2p1dBp.js} +16 -252
- package/dist/{browser-interactive-control-controller-qv26Bpfx.d.ts → browser-interactive-control-controller-CcUjQEfa.d.ts} +1 -1
- package/dist/{chunked-upload-BjkxykZD.js → chunked-upload-BlvgxPWx.js} +4 -5
- package/dist/{chunked-upload-file-B2KFimpz.js → chunked-upload-file-DOeLpMO0.js} +2 -2
- package/dist/cli-auth-bundle-BLAtE6Dc.js +2 -0
- package/dist/{client-OlxlnLwV.js → client-BS-PR_-j.js} +38 -47
- package/dist/{client-DvvRMxKx.d.ts → client-DlTDphmI.d.ts} +38 -32
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-DZ8ptALs.js → collaboration-Dz20mN9a.js} +20 -27
- package/dist/core-CUZyz-U8.js +161 -0
- package/dist/core.d.ts +6 -6
- package/dist/core.js +6 -5
- package/dist/{direct-http2-DU2SK2Wo.js → direct-http2-Bgb2lHte.js} +1 -1
- package/dist/{errors-A-bhwwsE.js → error-catalog-CAbzw67O.js} +1 -382
- package/dist/errors-nXGKGVFe.js +382 -0
- package/dist/{file-download-UhMKbMbD.js → file-download-BjkrYzy_.js} +1 -1
- package/dist/{index-Cip3q_xe.d.ts → index-DE5n6mot.d.ts} +13 -23
- package/dist/index.d.ts +12 -12
- package/dist/index.js +29 -25
- package/dist/intelligence/index.d.ts +41 -109
- package/dist/intelligence/index.js +60 -73
- package/dist/interactive-control.d.ts +1 -1
- package/dist/interactive-control.js +1 -1
- package/dist/{interactive-controller-D4gZ4f2I.js → interactive-controller-DDPdZa2H.js} +20 -54
- package/dist/{interactive-controller-P0yy6sGl.d.ts → interactive-controller-sEU_J6Bc.d.ts} +3 -3
- package/dist/lib/prepared-evidence.js +1 -1
- package/dist/lib/prepared-process.js +1 -1
- package/dist/{lines-7VecgiGd.js → lines-CSGBHEjR.js} +1 -1
- package/dist/{lines-DNXdVbGO.d.ts → lines-qvpmwN_2.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/lines.js +1 -1
- package/dist/{local-cli-auth-CPS9yuTc.js → local-cli-auth-CO0byocv.js} +1 -1
- package/dist/{mcp-local-CIXZFqF4.js → mcp-local-Dz_Sehz0.js} +4 -4
- package/dist/{prepared-evidence-Byty5p51.js → prepared-evidence-ibAysmX8.js} +2 -2
- package/dist/{prepared-process-u1B0b94R.js → prepared-process-DQ_68Ofg.js} +2 -2
- package/dist/{preview-CNfYklE6.d.ts → preview-BC_wLaA2.d.ts} +3 -3
- package/dist/{public-templates-CPvDf8CH.d.ts → public-templates-WuvmbvzY.d.ts} +2 -2
- package/dist/public-templates.d.ts +1 -1
- package/dist/public-templates.js +1 -1
- package/dist/{raw-evidence-archive-BgWqaQcM.js → raw-evidence-archive-Cz4j8VMw.js} +2 -2
- package/dist/{retry-policy-Dh-VezcE.js → retry-policy-oW3_ljoc.js} +2 -24
- package/dist/runtime.d.ts +7 -7
- package/dist/runtime.js +9 -9
- package/dist/{sandbox-Dvk2PYnL.js → sandbox-OyCRplrI.js} +65 -91
- package/dist/{secp256k1-Cbp9tbkX.js → secp256k1-ZiYFbGjz.js} +1 -1
- package/dist/{core-D7czAW25.js → select-seat-B4Y-7vIq.js} +40 -171
- package/dist/select-seat-command.d.ts +9 -3
- package/dist/select-seat-command.js +69 -57
- package/dist/session-gateway/index.js +11 -20
- package/dist/sidecar-proxy-error-DTdbCbUM.js +4 -0
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-DWzUnb1Y.js → tangle-Crxw_6V-.js} +22 -17
- package/dist/{terminal-stream-types-DB8V0hiG.d.ts → terminal-stream-types-eE97lZ-5.d.ts} +0 -1
- package/dist/{types-Cmv31xBh.d.ts → types-Cs5eJzOK.d.ts} +17 -57
- package/package.json +5 -5
- package/dist/cli-auth-bundle-CMJWI99l.js +0 -2
- package/dist/sidecar-proxy-error-DpBLxIof.js +0 -24
- /package/dist/{abort-signal-BbJTt2QJ.js → abort-signal-CRxC2dlT.js} +0 -0
- /package/dist/{cli-auth-bundle-C6DtK7GX-BbbiAn-Z.js → cli-auth-bundle-C6DtK7GX-mBUPER0R.js} +0 -0
- /package/dist/{cli-auth-bundle-Wg3x2hd2.d.ts → cli-auth-bundle-CjSu4D9W.d.ts} +0 -0
- /package/dist/{file-transfer-BSe4ayU9.js → file-transfer-DOSTbUSR.js} +0 -0
- /package/dist/{index-CDtEPygc.d.ts → index-C-_HY5NY.d.ts} +0 -0
- /package/dist/{index-YbAo-so_.d.ts → index-o31uwAkX.d.ts} +0 -0
- /package/dist/{keep-alive-fetch-BIaDMUtu.js → keep-alive-fetch-sGVP8skk.js} +0 -0
- /package/dist/{preview-operations-B3TTvqlm.js → preview-operations-DWL78boI.js} +0 -0
- /package/dist/{retry-after-header-DUdCC0KJ.js → retry-after-header-BZbs5rig.js} +0 -0
- /package/dist/{sse-parser-DOCszo1K.js → sse-parser-BCG3iL9j.js} +0 -0
- /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-
|
|
2
|
-
import { t as CliAuthReference } from "./cli-auth-bundle-
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
4398
|
-
*
|
|
4399
|
-
*
|
|
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
|
-
*
|
|
4517
|
-
*
|
|
4518
|
-
*
|
|
4519
|
-
*
|
|
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.
|
|
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/
|
|
160
|
-
"@tangle-network/
|
|
159
|
+
"@tangle-network/cli-agent-registry": "0.15.0",
|
|
160
|
+
"@tangle-network/runtime-contracts": "0.20.0"
|
|
161
161
|
},
|
|
162
162
|
"tangleRelease": {
|
|
163
|
-
"sourceSha": "
|
|
164
|
-
"mergedAt": "2026-11-
|
|
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,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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|