@tangle-network/sandbox 1.0.101 → 1.0.103
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-SIv1HL13.js → client-B-2ck5mr.js} +1 -1
- package/dist/{core-bCUQZECJ.js → core-Me-5_wL7.js} +1 -1
- package/dist/core.js +3 -3
- package/dist/{direct-http2-DNIjw6C-.js → direct-http2-Cn0xyjt5.js} +6 -9
- package/dist/index.js +4 -4
- package/dist/{sandbox-DFVkEXtw.js → sandbox-_4YGQDyy.js} +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-D-pRELFm.js → tangle-DZ_FFzJa.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-CQJwjQkZ.js";
|
|
2
2
|
import { k as assertCurrentBackendType } from "../interactive-controller-D6utTcix.js";
|
|
3
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
3
|
+
import { t as SandboxInstance } from "../sandbox-_4YGQDyy.js";
|
|
4
4
|
import { C as StateError, E as ValidationError, g as NotFoundError } from "../errors-ystNl7Ae.js";
|
|
5
|
-
import { t as Sandbox } from "../client-
|
|
5
|
+
import { t as Sandbox } from "../client-B-2ck5mr.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/agent/instances.ts
|
|
8
8
|
const managers = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as encodePromptForWire, D as isBrowserRuntime, F as withoutCreateOnlyModelFields, O as applyRequestedModel, P as withProfileHarness, U as backendTypeSchema, j as normalizeRuntimeBackendConfig, k as assertCurrentBackendType, o as requestInteractiveSessionToken } from "./interactive-controller-D6utTcix.js";
|
|
2
2
|
import { r as agentProfileSchema } from "./profile-schema-DFZTAn1S.js";
|
|
3
|
-
import { A as normalizeSandboxCreateReceipt, B as generateIdempotencyKey, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeSandboxShape, H as isRateLimitCreateError, M as parseStopPhase, N as normalizeConnection, O as isRetryableProfileFileMaterializeFailure, P as normalizeEgressPolicyFields, R as DEPLOY_WINDOW_RETRY_MS, T as splitInlineProfileFileMounts, U as isRetryableCreateError, V as isDeployWindowCreateError, W as waitForCreateRetry, j as normalizeStartupDiagnostics, k as normalizeCaptureProof, n as createSandboxInstanceFromResponse, s as exportTraceBundle, z as createRetryDelayMs } from "./sandbox-
|
|
3
|
+
import { A as normalizeSandboxCreateReceipt, B as generateIdempotencyKey, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeSandboxShape, H as isRateLimitCreateError, M as parseStopPhase, N as normalizeConnection, O as isRetryableProfileFileMaterializeFailure, P as normalizeEgressPolicyFields, R as DEPLOY_WINDOW_RETRY_MS, T as splitInlineProfileFileMounts, U as isRetryableCreateError, V as isDeployWindowCreateError, W as waitForCreateRetry, j as normalizeStartupDiagnostics, k as normalizeCaptureProof, n as createSandboxInstanceFromResponse, s as exportTraceBundle, z as createRetryDelayMs } from "./sandbox-_4YGQDyy.js";
|
|
4
4
|
import { D as isInsideReservedDir, 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-ystNl7Ae.js";
|
|
5
5
|
import { n as combineAbortSignals } from "./abort-signal-JVaAyNMP.js";
|
|
6
6
|
import { t as fetchSandboxApi } from "./api-request-B7cnX489.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as agentProfileSchema } from "./profile-schema-DFZTAn1S.js";
|
|
2
|
-
import { G as canonicalAgentProfileDigest } from "./sandbox-
|
|
2
|
+
import { G as canonicalAgentProfileDigest } from "./sandbox-_4YGQDyy.js";
|
|
3
3
|
import { E as ValidationError, s as CapabilityError, x as SandboxError } from "./errors-ystNl7Ae.js";
|
|
4
4
|
import { t as awaitWithAbort } from "./abort-signal-JVaAyNMP.js";
|
|
5
5
|
import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-mPeBMy6N.js";
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-
|
|
1
|
+
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-_4YGQDyy.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, s as CapabilityError, v as ProfileFileMountPathError, x as SandboxError, y as QuotaError } from "./errors-ystNl7Ae.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-B-2ck5mr.js";
|
|
4
4
|
import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-DEg0cqSV.js";
|
|
5
5
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
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-
|
|
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-Me-5_wL7.js";
|
|
7
7
|
export { AuthError, CapabilityError, FileWriteConflictError, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, LinesClient, ManagedProcessClient, NetworkError, NotFoundError, PartialFailureError, ProfileFileMountPathError, PublicTemplatePublishError, PublicTemplatesClient, QuotaError, Sandbox, SandboxError, SandboxInstance, SeatSelectionError, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, createSelectSeat, gatewaySeatTransport, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference, sandboxFailureKind };
|
|
@@ -3,6 +3,8 @@ import { t as emitTiming } from "./keep-alive-fetch--8twRp99.js";
|
|
|
3
3
|
const sessions = /* @__PURE__ */ new Map();
|
|
4
4
|
const inFlight = /* @__PURE__ */ new WeakMap();
|
|
5
5
|
const IDLE_SESSION_MS = 6e4;
|
|
6
|
+
const WINDOW = { initialWindowSize: 2 ** 21 };
|
|
7
|
+
const HOP_BY_HOP = "connection host keep-alive transfer-encoding upgrade".split(" ");
|
|
6
8
|
async function fetchDirectHttp2(url, init, timing) {
|
|
7
9
|
const { connect, constants } = await import("node:http2");
|
|
8
10
|
const { Readable } = await import("node:stream");
|
|
@@ -12,9 +14,10 @@ async function fetchDirectHttp2(url, init, timing) {
|
|
|
12
14
|
let session = sessions.get(target.origin);
|
|
13
15
|
const reused = !!session && !session.closed && !session.destroyed;
|
|
14
16
|
if (!session || session.closed || session.destroyed) {
|
|
15
|
-
session = connect(target.origin);
|
|
17
|
+
session = connect(target.origin, { settings: WINDOW });
|
|
16
18
|
sessions.set(target.origin, session);
|
|
17
19
|
const opened = session;
|
|
20
|
+
opened.once("connect", () => opened.setLocalWindowSize?.(2 ** 23));
|
|
18
21
|
const forget = () => {
|
|
19
22
|
if (sessions.get(target.origin) === opened) sessions.delete(target.origin);
|
|
20
23
|
};
|
|
@@ -38,15 +41,9 @@ async function fetchDirectHttp2(url, init, timing) {
|
|
|
38
41
|
":method": request.method,
|
|
39
42
|
":path": target.pathname + target.search
|
|
40
43
|
};
|
|
41
|
-
for (const [key, value] of request.headers) if (![
|
|
42
|
-
"connection",
|
|
43
|
-
"host",
|
|
44
|
-
"transfer-encoding",
|
|
45
|
-
"upgrade",
|
|
46
|
-
"keep-alive"
|
|
47
|
-
].includes(key)) headers[key] = value;
|
|
44
|
+
for (const [key, value] of request.headers) if (!HOP_BY_HOP.includes(key)) headers[key] = value;
|
|
48
45
|
const started = performance.now();
|
|
49
|
-
const stream = activeSession.request(headers);
|
|
46
|
+
const stream = activeSession.request(headers, { endStream: !request.body });
|
|
50
47
|
activeSession.ref();
|
|
51
48
|
const open = (inFlight.get(activeSession) ?? 0) + 1;
|
|
52
49
|
inFlight.set(activeSession, open);
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { B as projectAgentTerminalRecord, H as ALL_BACKEND_TYPES, K as parseBackendType, L as createAgentRunOutcomeTracker, M as requestedPublicProfileDigest, R as deriveAgentResultOutcome, U as backendTypeSchema, V as TERMINAL_WS_ECHO_SUBPROTOCOL, W as isolationPrincipalSchema, i as terminalUpgradeHeadersSupported, j as normalizeRuntimeBackendConfig, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, z as deriveAgentRunOutcome } from "./interactive-controller-D6utTcix.js";
|
|
2
2
|
import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, k as agentInteractiveSessionPromptRequestDigest, l as createInteractiveControlHolderId, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-BvtNDWql.js";
|
|
3
3
|
import { i as SANDBOX_SIZE_PRESET_NAMES, r as agentProfileSchema, t as agentProfileConfidentialSchema } from "./profile-schema-DFZTAn1S.js";
|
|
4
|
-
import { C as SandboxOperationFailedError, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, S as SandboxOperation, T as splitInlineProfileFileMounts, _ as collectAgentFinalMessageText, a as MAX_EGRESS_DENIALS_LIMIT, b as isToolBearingEvent, c as otelTraceIdForTangleTrace, d as SandboxSession, f as InteractiveSessionHandle, g as applySandboxEventText, h as createInteractiveTerminalSession, i as downloadFile, l as toOtelJson, m as createInteractiveTerminalCapture, o as buildTraceExportPayload, p as InteractiveTerminalFrameLog, r as WorkspaceImages, s as exportTraceBundle, t as SandboxInstance, u as SandboxTaskSession, v as collectAgentResponseText, w as materializeProfileFileMounts, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-
|
|
4
|
+
import { C as SandboxOperationFailedError, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, S as SandboxOperation, T as splitInlineProfileFileMounts, _ as collectAgentFinalMessageText, a as MAX_EGRESS_DENIALS_LIMIT, b as isToolBearingEvent, c as otelTraceIdForTangleTrace, d as SandboxSession, f as InteractiveSessionHandle, g as applySandboxEventText, h as createInteractiveTerminalSession, i as downloadFile, l as toOtelJson, m as createInteractiveTerminalCapture, o as buildTraceExportPayload, p as InteractiveTerminalFrameLog, r as WorkspaceImages, s as exportTraceBundle, t as SandboxInstance, u as SandboxTaskSession, v as collectAgentResponseText, w as materializeProfileFileMounts, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-_4YGQDyy.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, 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-ystNl7Ae.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-B-2ck5mr.js";
|
|
7
7
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-C1jO3_Pp.js";
|
|
8
8
|
import { t as parseSSEStream } from "./sse-parser-BUIKfYAd.js";
|
|
9
9
|
import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-DEg0cqSV.js";
|
|
10
10
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
11
|
-
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-
|
|
12
|
-
import { s as TangleSandboxClient } from "./tangle-
|
|
11
|
+
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-Me-5_wL7.js";
|
|
12
|
+
import { s as TangleSandboxClient } from "./tangle-DZ_FFzJa.js";
|
|
13
13
|
import { z } from "zod";
|
|
14
14
|
//#region ../../../packages/runtime-contracts/dist/model-key-proxy.js
|
|
15
15
|
/**
|
|
@@ -3152,7 +3152,7 @@ var DirectRuntimeHttpClient = class {
|
|
|
3152
3152
|
};
|
|
3153
3153
|
if (!route) throw new NetworkError("Direct runtime route was withdrawn");
|
|
3154
3154
|
if ((route.useHost || route.useExec) && canUseNodeHttp2()) {
|
|
3155
|
-
const { fetchDirectHttp2 } = await import("./direct-http2-
|
|
3155
|
+
const { fetchDirectHttp2 } = await import("./direct-http2-Cn0xyjt5.js");
|
|
3156
3156
|
return fetchDirectHttp2(route.url, request, timing);
|
|
3157
3157
|
}
|
|
3158
3158
|
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-DZ_FFzJa.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,4 +1,4 @@
|
|
|
1
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
1
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-_4YGQDyy.js";
|
|
2
2
|
import { i as readResponseJson } from "./errors-ystNl7Ae.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-BXgE8UHJ.js";
|
|
4
4
|
//#region ../../../packages/runtime-contracts/dist/tangle-blueprint-abi.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.103",
|
|
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
|
+
"@products/sandbox-test-utils": "0.0.0",
|
|
156
157
|
"@repo/shared": "0.0.0",
|
|
157
158
|
"@tangle-network/cli-agent-registry": "0.14.0",
|
|
158
159
|
"@tangle-network/agent-profile-materialize": "0.27.1",
|
|
159
|
-
"@products/sandbox-test-utils": "0.0.0",
|
|
160
160
|
"@tangle-network/runtime-contracts": "0.20.0"
|
|
161
161
|
},
|
|
162
162
|
"tangleRelease": {
|
|
163
|
-
"sourceSha": "
|
|
164
|
-
"mergedAt": "2026-10-
|
|
163
|
+
"sourceSha": "43710279bbc3490b06397f9408a7e53aada615d6",
|
|
164
|
+
"mergedAt": "2026-10-29T18:30:21-06:00"
|
|
165
165
|
},
|
|
166
166
|
"scripts": {
|
|
167
167
|
"build": "node scripts/build-dist.mjs",
|