@tangle-network/sandbox 1.0.189 → 1.0.190
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 +7 -0
- package/dist/agent/index.js +2 -2
- package/dist/agent/preview.js +1 -1
- package/dist/{api-request-D4Ln_0F5.js → api-request-CZlFy3ku.js} +4 -1
- package/dist/{client-CwWS3a-i.js → client-BERYosgI.js} +1 -1
- package/dist/core.js +1 -1
- package/dist/index.js +1 -1
- package/dist/intelligence/index.js +1 -1
- package/dist/{mcp-local-Cqf4Lpp0.js → mcp-local-D7MpwsW0.js} +2 -9
- package/dist/runtime.js +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -15,6 +15,13 @@ export TANGLE_API_KEY=sk-tan-...
|
|
|
15
15
|
export SANDBOX_BASE_URL=https://sandbox.tangle.tools
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
## Supported versions
|
|
19
|
+
|
|
20
|
+
The oldest supported SDK is `@tangle-network/sandbox@1.0.151`, the first version that accepts a capability or enum value it does not know instead of refusing the whole response.
|
|
21
|
+
Older versions fail when the Sandbox API advertises a new value; upgrade to this version or later.
|
|
22
|
+
This line is the one place the floor is stated: the production journey (`scripts/production-journey.sh`) reads it and runs every cell's journey on it.
|
|
23
|
+
Every request from the [shared raw transport](src/lib/api-request.mjs) and the Python SDK sends `x-sdk-version: <package version>`, and the Sandbox Worker's invocation log records it as `$workers.event.request.headers.x-sdk-version`, so the versions customers run can be counted.
|
|
24
|
+
|
|
18
25
|
## Choose an entrypoint
|
|
19
26
|
|
|
20
27
|
| Need | Import |
|
package/dist/agent/index.js
CHANGED
|
@@ -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-
|
|
1
|
+
import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-D7MpwsW0.js";
|
|
2
2
|
import { O as assertCurrentBackendType } from "../interactive-controller-C876Pjaj.js";
|
|
3
3
|
import { t as SandboxInstance } from "../sandbox-B_Xbc9wR.js";
|
|
4
4
|
import { C as StateError, E as ValidationError, g as NotFoundError } from "../errors-CaX0a5Ry.js";
|
|
5
|
-
import { t as Sandbox } from "../client-
|
|
5
|
+
import { t as Sandbox } from "../client-BERYosgI.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/agent/instances.ts
|
|
8
8
|
const managers = /* @__PURE__ */ new WeakMap();
|
package/dist/agent/preview.js
CHANGED
|
@@ -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-
|
|
69
|
+
const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-D7MpwsW0.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,7 @@
|
|
|
1
1
|
import { t as rewrapResponse } from "./response-rewrap-Cjoxh2wZ.js";
|
|
2
2
|
//#region src/lib/api-request.mjs
|
|
3
|
+
/** The package version tsdown.config.ts defines; unbuilt source reports 0.0.0. */
|
|
4
|
+
const SDK_VERSION = "1.0.190";
|
|
3
5
|
function withRequestContextHeaders(response, path, method, body = response.body) {
|
|
4
6
|
const headers = new Headers(response.headers);
|
|
5
7
|
headers.set("x-tangle-request-path", path);
|
|
@@ -27,6 +29,7 @@ async function fetchSandboxApi({ baseUrl, apiKey, timeoutMs = 3e4, signal, fetch
|
|
|
27
29
|
try {
|
|
28
30
|
const headers = new Headers(options?.headers);
|
|
29
31
|
headers.set("Authorization", `Bearer ${apiKey}`);
|
|
32
|
+
headers.set("x-sdk-version", SDK_VERSION);
|
|
30
33
|
const isFormDataBody = typeof FormData !== "undefined" && options?.body instanceof FormData;
|
|
31
34
|
if (!headers.has("Content-Type") && !isFormDataBody) headers.set("Content-Type", "application/json");
|
|
32
35
|
const response = await fetchImpl(url, {
|
|
@@ -86,4 +89,4 @@ async function fetchSandboxApi({ baseUrl, apiKey, timeoutMs = 3e4, signal, fetch
|
|
|
86
89
|
}
|
|
87
90
|
}
|
|
88
91
|
//#endregion
|
|
89
|
-
export { fetchSandboxApi as t };
|
|
92
|
+
export { fetchSandboxApi as n, SDK_VERSION as t };
|
|
@@ -4,7 +4,7 @@ import { A as normalizeSandboxCreateReceipt, B as CAPACITY_ETA_WAIT_MAX_MS, D as
|
|
|
4
4
|
import { l as SANDBOX_AGENT_HOME, t as isInsideReservedDir } from "./file-transfer-DTHgLccV.js";
|
|
5
5
|
import { E as ValidationError, S as ServerError, T as TimeoutError, _ as PartialFailureError, a as AuthError, g as NotFoundError, h as NetworkError, i as readResponseJson, n as parseErrorResponse, r as parseResponseError, x as SandboxError } from "./errors-CaX0a5Ry.js";
|
|
6
6
|
import { r as combineAbortSignals, t as abortableSleep } from "./abort-signal-PgWPMn_e.js";
|
|
7
|
-
import {
|
|
7
|
+
import { n as fetchSandboxApi } from "./api-request-CZlFy3ku.js";
|
|
8
8
|
import { n as fetchWithKeepAlive } from "./keep-alive-fetch-C2lFwrMA.js";
|
|
9
9
|
import { t as parseSSEStream } from "./sse-parser-B4aH89Nq.js";
|
|
10
10
|
import { t as LinesClient } from "./lines-DxHJhxCe.js";
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-B_Xbc9wR.js";
|
|
2
2
|
import { C as StateError, E as ValidationError, S as ServerError, T as TimeoutError, _ as PartialFailureError, a as AuthError, d as FileWriteConflictError, g as NotFoundError, h as NetworkError, n as parseErrorResponse, s as CapabilityError, v as ProfileFileMountPathError, x as SandboxError, y as QuotaError } from "./errors-CaX0a5Ry.js";
|
|
3
|
-
import { a as InstancesClient, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, p as isBackendRegistryInteractionKind, r as HostedInstance, t as Sandbox, u as backendRegistryEntrySchema } from "./client-
|
|
3
|
+
import { a as InstancesClient, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, p as isBackendRegistryInteractionKind, r as HostedInstance, t as Sandbox, u as backendRegistryEntrySchema } from "./client-BERYosgI.js";
|
|
4
4
|
import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-DxHJhxCe.js";
|
|
5
5
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
6
6
|
import { a as LINE_APPLICATION_REPLY_MAX_CHARS, c as parseLineApplicationResult, i as gatewaySeatTransport, l as sandboxFailureKind, n as SeatSelectionError, o as LINE_APPLICATION_REQUEST_MAX_BYTES, r as createSelectSeat, s as parseLineApplicationRequest, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-BT-0QZT-.js";
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, k as agentInteractiveSessi
|
|
|
3
3
|
import { i as SANDBOX_SIZE_PRESET_NAMES, r as agentProfileSchema, t as agentProfileConfidentialSchema } from "./profile-schema-C1KpT-wS.js";
|
|
4
4
|
import { C as SandboxOperationFailedError, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, S as SandboxOperation, T as splitInlineProfileFileMounts, _ as collectAgentFinalMessageText, a as buildTraceExportPayload, b as isToolBearingEvent, c as toOtelJson, f as InteractiveSessionHandle, g as applySandboxEventText, h as createInteractiveTerminalSession, i as MAX_EGRESS_DENIALS_LIMIT, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as exportTraceBundle, p as InteractiveTerminalFrameLog, r as WorkspaceImages, s as otelTraceIdForTangleTrace, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as materializeProfileFileMounts, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-B_Xbc9wR.js";
|
|
5
5
|
import { C as StateError, E as ValidationError, S as ServerError, T as TimeoutError, _ as PartialFailureError, a as AuthError, b as ResumeEnvRequiredError, c as CompliancePlacementError, d as FileWriteConflictError, f as GpuProviderNotConfiguredError, g as NotFoundError, h as NetworkError, l as EdgeNotReadyError, n as parseErrorResponse, o as BranchFanoutExceedsHostError, p as KeyBudgetExhaustedError, s as CapabilityError, t as TerminalStreamError, u as EgressProxyRecoveryError, v as ProfileFileMountPathError, w as StreamInterruptedError, x as SandboxError, y as QuotaError } from "./errors-CaX0a5Ry.js";
|
|
6
|
-
import { _ as createBatchResultAccumulator, a as InstancesClient, c as runtimeWorkspaceCwdSchema, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, g as IntelligenceClient, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, n as RunsClient, o as SandboxFleetClient, p as isBackendRegistryInteractionKind, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as backendRegistryEntrySchema, v as validateBatchRunRequest } from "./client-
|
|
6
|
+
import { _ as createBatchResultAccumulator, a as InstancesClient, c as runtimeWorkspaceCwdSchema, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, g as IntelligenceClient, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, n as RunsClient, o as SandboxFleetClient, p as isBackendRegistryInteractionKind, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as backendRegistryEntrySchema, v as validateBatchRunRequest } from "./client-BERYosgI.js";
|
|
7
7
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-CmT6Ygiv.js";
|
|
8
8
|
import { t as parseSSEStream } from "./sse-parser-B4aH89Nq.js";
|
|
9
9
|
import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-DxHJhxCe.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as TimeoutError, h as NetworkError, n as parseErrorResponse } from "../errors-CaX0a5Ry.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as fetchSandboxApi } from "../api-request-CZlFy3ku.js";
|
|
3
3
|
import { n as verifyDownload } from "../file-download-BXgu9BNh.js";
|
|
4
4
|
//#region src/intelligence/index.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { u as SANDBOX_FILE_API_ABSOLUTE_ROOTS } from "./file-transfer-DTHgLccV.js";
|
|
2
|
+
import "./api-request-CZlFy3ku.js";
|
|
2
3
|
import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-B3TTvqlm.js";
|
|
3
|
-
import { createRequire } from "node:module";
|
|
4
4
|
//#region \0rolldown/runtime.js
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -354,13 +354,6 @@ function bindToolSpecs(box, options) {
|
|
|
354
354
|
* pnpm add @modelcontextprotocol/sdk
|
|
355
355
|
*/
|
|
356
356
|
var mcp_local_exports = /* @__PURE__ */ __exportAll({ createMcpServer: () => createMcpServer });
|
|
357
|
-
const SDK_VERSION = (() => {
|
|
358
|
-
try {
|
|
359
|
-
return createRequire(import.meta.url)("../../package.json").version ?? "0.0.0";
|
|
360
|
-
} catch {
|
|
361
|
-
return "0.0.0";
|
|
362
|
-
}
|
|
363
|
-
})();
|
|
364
357
|
/**
|
|
365
358
|
* Build an MCP server backed by one sandbox. The server registers
|
|
366
359
|
* `tools/list` and `tools/call` handlers populated from the same registry
|
|
@@ -403,7 +396,7 @@ async function createMcpServer(box, options = {}) {
|
|
|
403
396
|
const { bindings, handlers } = bindToolSpecs(box, options);
|
|
404
397
|
const server = new serverModule.Server({
|
|
405
398
|
name: options.name ?? "tangle-sandbox",
|
|
406
|
-
version: options.version ??
|
|
399
|
+
version: options.version ?? "1.0.190"
|
|
407
400
|
}, { capabilities: { tools: {} } });
|
|
408
401
|
server.setRequestHandler(typesModule.ListToolsRequestSchema, async () => ({ tools: bindings.map(({ spec: s }) => ({
|
|
409
402
|
name: s.name,
|
package/dist/runtime.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController, z as projectAgentTerminalRecord } from "./interactive-controller-C876Pjaj.js";
|
|
2
2
|
import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-DHIS8edi.js";
|
|
3
3
|
import { C as StateError, E as ValidationError, S as ServerError, T as TimeoutError, _ as PartialFailureError, a as AuthError, d as FileWriteConflictError, g as NotFoundError, h as NetworkError, s as CapabilityError, v as ProfileFileMountPathError, x as SandboxError, y as QuotaError } from "./errors-CaX0a5Ry.js";
|
|
4
|
-
import {
|
|
4
|
+
import { n as fetchSandboxApi } from "./api-request-CZlFy3ku.js";
|
|
5
5
|
import { s as uploadChunked } from "./chunked-upload-vAE2hVcP.js";
|
|
6
6
|
//#region src/runtime-client.ts
|
|
7
7
|
const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.190",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -153,15 +153,15 @@
|
|
|
153
153
|
"vitest": "^4.1.12",
|
|
154
154
|
"ws": "^8.22.0",
|
|
155
155
|
"yjs": "13.6.33",
|
|
156
|
-
"@repo/shared": "0.0.0",
|
|
157
|
-
"@tangle-network/agent-profile-materialize": "0.27.1",
|
|
158
156
|
"@products/sandbox-test-utils": "0.0.0",
|
|
157
|
+
"@repo/shared": "0.0.0",
|
|
159
158
|
"@tangle-network/cli-agent-registry": "0.15.0",
|
|
159
|
+
"@tangle-network/agent-profile-materialize": "0.27.1",
|
|
160
160
|
"@tangle-network/runtime-contracts": "0.20.0"
|
|
161
161
|
},
|
|
162
162
|
"tangleRelease": {
|
|
163
|
-
"sourceSha": "
|
|
164
|
-
"mergedAt": "2026-11-
|
|
163
|
+
"sourceSha": "f41fd1645824c17db6abeca83a9637311792837d",
|
|
164
|
+
"mergedAt": "2026-11-02T07:52:44-08:00"
|
|
165
165
|
},
|
|
166
166
|
"scripts": {
|
|
167
167
|
"build": "node scripts/build-dist.mjs",
|