@tangle-network/sandbox 0.67.1 → 0.68.0
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/dist/agent/index.js +2 -2
- package/dist/{client-wYnuw78C.js → client-C2pwbpBn.js} +1 -1
- package/dist/core.js +2 -2
- package/dist/{direct-http2-CR8A1W4N.js → direct-http2-Hcum3yHf.js} +11 -4
- package/dist/index.js +3 -3
- package/dist/{sandbox-BQGYdVS-.js → sandbox-Be3DcloI.js} +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-BsqvA07Z.js → tangle-uptUv4ZY.js} +1 -1
- package/package.json +4 -4
package/dist/agent/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-CjcoVT7f.js";
|
|
2
2
|
import { D as assertCurrentBackendType } from "../interactive-controller-CqdnD7nC.js";
|
|
3
3
|
import { C as StateError, E as ValidationError, g as NotFoundError } from "../errors-Bs5G7JdV.js";
|
|
4
|
-
import { t as Sandbox } from "../client-
|
|
5
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
4
|
+
import { t as Sandbox } from "../client-C2pwbpBn.js";
|
|
5
|
+
import { t as SandboxInstance } from "../sandbox-Be3DcloI.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/agent/instances.ts
|
|
8
8
|
const managers = /* @__PURE__ */ new WeakMap();
|
|
@@ -3,7 +3,7 @@ import { A as normalizeRuntimeBackendConfig, C as encodePromptForWire, D as asse
|
|
|
3
3
|
import { E as ValidationError, S as ServerError, T as TimeoutError, _ as PartialFailureError, a as AuthError, c as CompliancePlacementError, f as GpuProviderNotConfiguredError, g as NotFoundError, h as NetworkError, i as readResponseJson, m as NON_RETRYABLE_CREATE_QUOTA_REASONS, n as parseErrorResponse, r as parseResponseError, x as SandboxError, y as QuotaError } from "./errors-Bs5G7JdV.js";
|
|
4
4
|
import { f as combineAbortSignals } from "./browser-interactive-control-controller-k1KkqDGF.js";
|
|
5
5
|
import { n as fetchWithKeepAlive } from "./keep-alive-fetch-_KZcsAS_.js";
|
|
6
|
-
import { A as normalizeSandboxCreateReceipt, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeSandboxShape, I as rewrapResponse, M as parseStopPhase, N as normalizeConnection, O as isRetryableProfileFileMaterializeFailure, P as normalizeEgressPolicyFields, T as splitInlineProfileFileMounts, j as normalizeStartupDiagnostics, k as normalizeCaptureProof, n as createSandboxInstanceFromResponse, o as exportTraceBundle } from "./sandbox-
|
|
6
|
+
import { A as normalizeSandboxCreateReceipt, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeSandboxShape, I as rewrapResponse, M as parseStopPhase, N as normalizeConnection, O as isRetryableProfileFileMaterializeFailure, P as normalizeEgressPolicyFields, T as splitInlineProfileFileMounts, j as normalizeStartupDiagnostics, k as normalizeCaptureProof, n as createSandboxInstanceFromResponse, o as exportTraceBundle } from "./sandbox-Be3DcloI.js";
|
|
7
7
|
import { t as LinesClient } from "./lines-BO1jPFsj.js";
|
|
8
8
|
import { PublicTemplatesClient } from "./public-templates.js";
|
|
9
9
|
import { z } from "zod";
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
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-Bs5G7JdV.js";
|
|
2
|
-
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 { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-
|
|
2
|
+
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-C2pwbpBn.js";
|
|
3
|
+
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-Be3DcloI.js";
|
|
4
4
|
import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-BO1jPFsj.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, n as SeatSelectionError, o as LINE_APPLICATION_REQUEST_MAX_BYTES, r as createSelectSeat, s as parseLineApplicationRequest, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-DUpukePg.js";
|
|
@@ -2,6 +2,7 @@ import { t as emitTiming } from "./keep-alive-fetch-_KZcsAS_.js";
|
|
|
2
2
|
//#region src/lib/direct-http2.ts
|
|
3
3
|
const sessions = /* @__PURE__ */ new Map();
|
|
4
4
|
const inFlight = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
const IDLE_SESSION_MS = 6e4;
|
|
5
6
|
async function fetchDirectHttp2(url, init, timing) {
|
|
6
7
|
const { connect } = await import("node:http2");
|
|
7
8
|
const { Readable } = await import("node:stream");
|
|
@@ -23,9 +24,10 @@ async function fetchDirectHttp2(url, init, timing) {
|
|
|
23
24
|
forget();
|
|
24
25
|
opened.close();
|
|
25
26
|
});
|
|
26
|
-
opened.
|
|
27
|
+
opened.on("timeout", () => opened.close());
|
|
28
|
+
opened.setTimeout(IDLE_SESSION_MS);
|
|
27
29
|
const heartbeat = setInterval(() => {
|
|
28
|
-
if ((inFlight.get(opened) ?? 0) > 0 && !opened.
|
|
30
|
+
if ((inFlight.get(opened) ?? 0) > 0 && !opened.destroyed) opened.ping(() => {});
|
|
29
31
|
}, 15e3);
|
|
30
32
|
heartbeat.unref();
|
|
31
33
|
opened.once("close", () => clearInterval(heartbeat));
|
|
@@ -46,11 +48,16 @@ async function fetchDirectHttp2(url, init, timing) {
|
|
|
46
48
|
const started = performance.now();
|
|
47
49
|
const stream = activeSession.request(headers);
|
|
48
50
|
activeSession.ref();
|
|
49
|
-
|
|
51
|
+
const open = (inFlight.get(activeSession) ?? 0) + 1;
|
|
52
|
+
inFlight.set(activeSession, open);
|
|
53
|
+
if (open === 1) activeSession.setTimeout(0);
|
|
50
54
|
stream.once("close", () => {
|
|
51
55
|
const count = (inFlight.get(activeSession) ?? 1) - 1;
|
|
52
56
|
inFlight.set(activeSession, count);
|
|
53
|
-
if (!count)
|
|
57
|
+
if (!count) {
|
|
58
|
+
activeSession.unref();
|
|
59
|
+
if (!activeSession.destroyed) activeSession.setTimeout(IDLE_SESSION_MS);
|
|
60
|
+
}
|
|
54
61
|
});
|
|
55
62
|
const abort = () => stream.destroy(request.signal.reason instanceof Error ? request.signal.reason : /* @__PURE__ */ new Error("Request aborted"));
|
|
56
63
|
request.signal.addEventListener("abort", abort, { once: true });
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { i as isolationPrincipalSchema, o as parseBackendType, r as backendTypeSchema, t as ALL_BACKEND_TYPES } from "./backend-types-CLvdSX8V.js";
|
|
2
2
|
import { A as normalizeRuntimeBackendConfig, B as TERMINAL_WS_ECHO_SUBPROTOCOL, I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, b as parseSSEStream, i as terminalUpgradeHeadersSupported, j as requestedPublicProfileDigest, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, z as projectAgentTerminalRecord } from "./interactive-controller-CqdnD7nC.js";
|
|
3
3
|
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, 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-Bs5G7JdV.js";
|
|
4
|
-
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-
|
|
4
|
+
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-C2pwbpBn.js";
|
|
5
5
|
import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as createInteractiveControlHolderId, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-k1KkqDGF.js";
|
|
6
6
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-Ox7K-TN6.js";
|
|
7
|
-
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, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, 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-
|
|
7
|
+
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, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, 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-Be3DcloI.js";
|
|
8
8
|
import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-BO1jPFsj.js";
|
|
9
9
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
10
10
|
import { a as LINE_APPLICATION_REPLY_MAX_CHARS, c as parseLineApplicationResult, i as gatewaySeatTransport, n as SeatSelectionError, o as LINE_APPLICATION_REQUEST_MAX_BYTES, r as createSelectSeat, s as parseLineApplicationRequest, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-DUpukePg.js";
|
|
11
|
-
import { s as TangleSandboxClient } from "./tangle-
|
|
11
|
+
import { s as TangleSandboxClient } from "./tangle-uptUv4ZY.js";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
14
14
|
//#region ../../../packages/runtime-contracts/dist/model-key-proxy.js
|
|
@@ -1481,7 +1481,7 @@ var DirectRuntimeHttpClient = class {
|
|
|
1481
1481
|
};
|
|
1482
1482
|
if (!route) throw new NetworkError("Direct runtime route was withdrawn");
|
|
1483
1483
|
if ((route.useHost || route.useExec) && canUseNodeHttp2()) {
|
|
1484
|
-
const { fetchDirectHttp2 } = await import("./direct-http2-
|
|
1484
|
+
const { fetchDirectHttp2 } = await import("./direct-http2-Hcum3yHf.js");
|
|
1485
1485
|
return fetchDirectHttp2(route.url, request, timing);
|
|
1486
1486
|
}
|
|
1487
1487
|
return fetchWithKeepAlive(route.url, request, timing);
|
package/dist/tangle/index.js
CHANGED
|
@@ -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 TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-
|
|
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 TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-uptUv4ZY.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as readResponseJson } from "./errors-Bs5G7JdV.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-Be3DcloI.js";
|
|
3
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-Bl-H3KsQ.js";
|
|
4
4
|
//#region ../../../packages/runtime-contracts/dist/tangle-blueprint-abi.js
|
|
5
5
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.68.0",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -164,17 +164,17 @@
|
|
|
164
164
|
"vitest": "^4.1.11",
|
|
165
165
|
"ws": "^8.20.0",
|
|
166
166
|
"yjs": "13.6.30",
|
|
167
|
+
"@products/sandbox-test-utils": "0.0.0",
|
|
167
168
|
"@repo/shared": "0.0.0",
|
|
168
169
|
"@tangle-network/agent-profile-materialize": "0.26.0",
|
|
169
170
|
"@tangle-network/cli-agent-registry": "0.10.2",
|
|
170
171
|
"@tangle-network/runtime-contracts": "0.19.0",
|
|
171
172
|
"@tangle-network/sdk": "4.0.16",
|
|
172
|
-
"@products/sandbox-test-utils": "0.0.0",
|
|
173
173
|
"@tangle-network/sse-core": "0.0.0"
|
|
174
174
|
},
|
|
175
175
|
"tangleRelease": {
|
|
176
|
-
"sourceSha": "
|
|
177
|
-
"mergedAt": "2026-10-25T18:
|
|
176
|
+
"sourceSha": "7fb5884232e6cb79b9c795de5c13f4787fba3dc2",
|
|
177
|
+
"mergedAt": "2026-10-25T18:44:06-06:00"
|
|
178
178
|
},
|
|
179
179
|
"scripts": {
|
|
180
180
|
"build": "node scripts/build-dist.mjs",
|