@tangle-network/sandbox 1.0.50 → 1.0.51
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-j1hs8jdU.js → client-BFkcCOgt.js} +1 -1
- package/dist/{core-hzDXsmrh.js → core-D16kcnQC.js} +1 -1
- package/dist/core.js +3 -3
- package/dist/index.js +4 -4
- package/dist/lib/prepared-process.js +1 -1
- package/dist/{prepared-process-8V85-d5C.js → prepared-process-DUPGC_ff.js} +2 -10
- package/dist/{sandbox-DLMXfYX9.js → sandbox-NWLsprXf.js} +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-TilLsJS2.js → tangle-zhjXPhc1.js} +1 -1
- package/package.json +6 -6
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-CPdKHcQ-.js";
|
|
2
2
|
import { D as assertCurrentBackendType } from "../interactive-controller-C9Th5fLc.js";
|
|
3
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
3
|
+
import { t as SandboxInstance } from "../sandbox-NWLsprXf.js";
|
|
4
4
|
import { C as StateError, E as ValidationError, g as NotFoundError } from "../errors-D-BwELkd.js";
|
|
5
|
-
import { t as Sandbox } from "../client-
|
|
5
|
+
import { t as Sandbox } from "../client-BFkcCOgt.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 { A as normalizeRuntimeBackendConfig, D as assertCurrentBackendType, E as applyRequestedModel, H as backendTypeSchema, N as withProfileHarness, O as foldModelRoutingFields, P as withoutCreateOnlyModelFields, S as encodePromptForWire, T as isBrowserRuntime, o as requestInteractiveSessionToken } from "./interactive-controller-C9Th5fLc.js";
|
|
2
2
|
import { r as agentProfileSchema } from "./profile-schema-DFZTAn1S.js";
|
|
3
|
-
import { A as normalizeStartupDiagnostics, B as isDeployWindowCreateError, D as isRetryableProfileFileMaterializeFailure, E as validateDeferredProfileFileMounts, H as waitForCreateRetry, L as DEPLOY_WINDOW_RETRY_MS, M as normalizeConnection, N as normalizeEgressPolicyFields, O as normalizeCaptureProof, P as normalizeSandboxShape, R as createRetryDelayMs, T as splitInlineProfileSkills, V as isRetryableCreateError, j as parseStopPhase, k as normalizeSandboxCreateReceipt, n as createSandboxInstanceFromResponse, o as exportTraceBundle, w as splitInlineProfileFileMounts, z as generateIdempotencyKey } from "./sandbox-
|
|
3
|
+
import { A as normalizeStartupDiagnostics, B as isDeployWindowCreateError, D as isRetryableProfileFileMaterializeFailure, E as validateDeferredProfileFileMounts, H as waitForCreateRetry, L as DEPLOY_WINDOW_RETRY_MS, M as normalizeConnection, N as normalizeEgressPolicyFields, O as normalizeCaptureProof, P as normalizeSandboxShape, R as createRetryDelayMs, T as splitInlineProfileSkills, V as isRetryableCreateError, j as parseStopPhase, k as normalizeSandboxCreateReceipt, n as createSandboxInstanceFromResponse, o as exportTraceBundle, w as splitInlineProfileFileMounts, z as generateIdempotencyKey } from "./sandbox-NWLsprXf.js";
|
|
4
4
|
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-D-BwELkd.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 { U as canonicalAgentProfileDigest } from "./sandbox-
|
|
2
|
+
import { U as canonicalAgentProfileDigest } from "./sandbox-NWLsprXf.js";
|
|
3
3
|
import { E as ValidationError, s as CapabilityError, x as SandboxError } from "./errors-D-BwELkd.js";
|
|
4
4
|
import { t as awaitWithAbort } from "./abort-signal-JVaAyNMP.js";
|
|
5
5
|
import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-CP1BXoLR.js";
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as ManagedProcessClient, r as WorkspaceImages, t as SandboxInstance } from "./sandbox-
|
|
1
|
+
import { b as ManagedProcessClient, r as WorkspaceImages, t as SandboxInstance } from "./sandbox-NWLsprXf.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-D-BwELkd.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-BFkcCOgt.js";
|
|
4
4
|
import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-B2GBrzcC.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-D16kcnQC.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 };
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { A as normalizeRuntimeBackendConfig, B as TERMINAL_WS_ECHO_SUBPROTOCOL, G as parseBackendType, H as backendTypeSchema, I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, U as isolationPrincipalSchema, V as ALL_BACKEND_TYPES, i as terminalUpgradeHeadersSupported, j as requestedPublicProfileDigest, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, z as projectAgentTerminalRecord } from "./interactive-controller-C9Th5fLc.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 materializeProfileFileMounts, E as validateDeferredProfileFileMounts, S as SandboxOperationFailedError, T as splitInlineProfileSkills, _ as collectAgentResponseText, a as buildTraceExportPayload, b as ManagedProcessClient, c as toOtelJson, d as InteractiveSessionHandle, f as InteractiveTerminalFrameLog, g as collectAgentFinalMessageText, h as applySandboxEventText, i as MAX_EGRESS_DENIALS_LIMIT, l as SandboxTaskSession, m as createInteractiveTerminalSession, o as exportTraceBundle, p as createInteractiveTerminalCapture, r as WorkspaceImages, s as otelTraceIdForTangleTrace, t as SandboxInstance, u as SandboxSession, v as getSandboxEventText, w as splitInlineProfileFileMounts, x as SandboxOperation, y as isToolBearingEvent } from "./sandbox-
|
|
4
|
+
import { C as materializeProfileFileMounts, E as validateDeferredProfileFileMounts, S as SandboxOperationFailedError, T as splitInlineProfileSkills, _ as collectAgentResponseText, a as buildTraceExportPayload, b as ManagedProcessClient, c as toOtelJson, d as InteractiveSessionHandle, f as InteractiveTerminalFrameLog, g as collectAgentFinalMessageText, h as applySandboxEventText, i as MAX_EGRESS_DENIALS_LIMIT, l as SandboxTaskSession, m as createInteractiveTerminalSession, o as exportTraceBundle, p as createInteractiveTerminalCapture, r as WorkspaceImages, s as otelTraceIdForTangleTrace, t as SandboxInstance, u as SandboxSession, v as getSandboxEventText, w as splitInlineProfileFileMounts, x as SandboxOperation, y as isToolBearingEvent } from "./sandbox-NWLsprXf.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-D-BwELkd.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-BFkcCOgt.js";
|
|
7
7
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DOuxvRLs.js";
|
|
8
8
|
import { t as parseSSEStream } from "./sse-parser-B7uNzlUG.js";
|
|
9
9
|
import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-B2GBrzcC.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-D16kcnQC.js";
|
|
12
|
+
import { s as TangleSandboxClient } from "./tangle-zhjXPhc1.js";
|
|
13
13
|
import { z } from "zod";
|
|
14
14
|
//#region ../../../packages/runtime-contracts/dist/model-key-proxy.js
|
|
15
15
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as withPreparedProcessCalls, t as runPreparedProcess } from "../prepared-process-
|
|
1
|
+
import { n as withPreparedProcessCalls, t as runPreparedProcess } from "../prepared-process-DUPGC_ff.js";
|
|
2
2
|
export { runPreparedProcess, withPreparedProcessCalls };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as parseSandboxRetryAfterHeader } from "./retry-after-header-DrbSlyKY.js";
|
|
1
2
|
//#region src/lib/prepared-process.mjs
|
|
2
3
|
/** Request and pause share one deadline, including independent cancellation cleanup. */
|
|
3
4
|
function processRequests(request, deadline, signal) {
|
|
@@ -52,7 +53,7 @@ async function pollPreparedProcess(transport, target, pid, headers, read) {
|
|
|
52
53
|
});
|
|
53
54
|
if (response.status === 429) {
|
|
54
55
|
await response.body?.cancel?.();
|
|
55
|
-
await transport.pause(
|
|
56
|
+
await transport.pause(parseSandboxRetryAfterHeader(response.headers?.get?.("retry-after")) ?? pollDelayMs(poll));
|
|
56
57
|
continue;
|
|
57
58
|
}
|
|
58
59
|
if (response.status !== 202) return response;
|
|
@@ -64,15 +65,6 @@ async function pollPreparedProcess(transport, target, pid, headers, read) {
|
|
|
64
65
|
function pollDelayMs(poll) {
|
|
65
66
|
return Math.min(POLL_DELAY_MIN_MS * 2 ** poll, POLL_DELAY_MAX_MS);
|
|
66
67
|
}
|
|
67
|
-
/** `Retry-After` as delay-seconds or an HTTP date; undefined when absent or unreadable. */
|
|
68
|
-
function retryAfterMs(response) {
|
|
69
|
-
const value = response.headers?.get?.("retry-after");
|
|
70
|
-
if (!value) return void 0;
|
|
71
|
-
const seconds = Number(value);
|
|
72
|
-
if (Number.isFinite(seconds) && seconds >= 0) return seconds * 1e3;
|
|
73
|
-
const date = Date.parse(value);
|
|
74
|
-
return Number.isFinite(date) ? Math.max(0, date - Date.now()) : void 0;
|
|
75
|
-
}
|
|
76
68
|
/** One prepare/PID/result transport for SDK, Worker adapters and Node probes. */
|
|
77
69
|
async function runPreparedProcess(request, path, init, timeoutMs = 75e3, read = (response) => response.clone().json()) {
|
|
78
70
|
const transport = processRequests(request, timeoutMs === 0 ? Number.POSITIVE_INFINITY : performance.now() + timeoutMs, init.signal);
|
|
@@ -9,7 +9,7 @@ import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch--8t
|
|
|
9
9
|
import { t as SIDECAR_PROXY_ERROR_HEADER } from "./sidecar-proxy-error-DORW8_mD.js";
|
|
10
10
|
import { t as parseSSEStream } from "./sse-parser-B7uNzlUG.js";
|
|
11
11
|
import { s as uploadChunked } from "./chunked-upload-CeXIUqaY.js";
|
|
12
|
-
import { t as runPreparedProcess } from "./prepared-process-
|
|
12
|
+
import { t as runPreparedProcess } from "./prepared-process-DUPGC_ff.js";
|
|
13
13
|
import { a as backendTypeSchema, r as cliAuthReferenceSchema } from "./cli-auth-bundle-CP1BXoLR.js";
|
|
14
14
|
import { n as SandboxLines } from "./lines-B2GBrzcC.js";
|
|
15
15
|
import { z } from "zod";
|
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-zhjXPhc1.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-NWLsprXf.js";
|
|
2
2
|
import { i as readResponseJson } from "./errors-D-BwELkd.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.51",
|
|
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.30",
|
|
156
|
+
"@tangle-network/agent-profile-materialize": "0.27.1",
|
|
157
|
+
"@tangle-network/runtime-contracts": "0.19.0",
|
|
156
158
|
"@products/sandbox-test-utils": "0.0.0",
|
|
157
|
-
"@tangle-network/cli-agent-registry": "0.14.0",
|
|
158
159
|
"@repo/shared": "0.0.0",
|
|
159
|
-
"@tangle-network/agent-
|
|
160
|
-
"@tangle-network/runtime-contracts": "0.19.0"
|
|
160
|
+
"@tangle-network/cli-agent-registry": "0.14.0"
|
|
161
161
|
},
|
|
162
162
|
"tangleRelease": {
|
|
163
|
-
"sourceSha": "
|
|
164
|
-
"mergedAt": "2026-10-28T03:
|
|
163
|
+
"sourceSha": "aa2b38c5acffbbec81e9929001af0724042cb572",
|
|
164
|
+
"mergedAt": "2026-10-28T03:24:05-06:00"
|
|
165
165
|
},
|
|
166
166
|
"scripts": {
|
|
167
167
|
"build": "node scripts/build-dist.mjs",
|