@tangle-network/sandbox 0.60.78-develop.20261023063254.e61b3b8 → 0.60.78-develop.20261023065630.1d223ed
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 +1 -1
- package/dist/agent/index.js +2 -2
- package/dist/{client-DkwgGHA6.js → client-C-o416Dc.js} +1 -1
- package/dist/core.js +2 -2
- package/dist/index.js +3 -3
- package/dist/lib/prepared-process.js +1 -1
- package/dist/{prepared-process-Bf-WBVNx.js → prepared-process-BOu9ZhKj.js} +3 -3
- package/dist/{sandbox-JRl9l7pE.js → sandbox-ClF1lCZz.js} +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-CIhQrQxx.js → tangle-rBYA7naZ.js} +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -461,7 +461,7 @@ Use `adopt` to move a sandbox you created earlier under a key.
|
|
|
461
461
|
|
|
462
462
|
`exec()` returns the exit code, standard output, standard error, and timing data.
|
|
463
463
|
|
|
464
|
-
After an admitted blocking command is aborted or times out, the shared process transport sends a tree kill and follows the authenticated PID result until it settles, within
|
|
464
|
+
After an admitted blocking command is aborted or times out, the shared process transport sends a tree kill and follows the authenticated PID result until it settles, within the independent cleanup budget owned by [the shared process transport](src/lib/prepared-process.mjs). A kill acknowledgement alone does not prove exit. Missing results, authentication failures, transport failures, and cleanup expiry leave termination unknown; the caller still receives its original abort or timeout error. The SDK fetch transport cancels the terminal response stream without materializing completed command output. Existing parsed-JSON probe adapters retain their response transport's eager parsing.
|
|
465
465
|
|
|
466
466
|
```typescript
|
|
467
467
|
const test = await box.exec("pnpm test", {
|
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-BaQdgLvZ.js";
|
|
2
2
|
import { D as assertCurrentBackendType } from "../interactive-controller-D_YmzZMA.js";
|
|
3
3
|
import { S as StateError, T as ValidationError, h as NotFoundError } from "../errors-BfbOP_rx.js";
|
|
4
|
-
import { t as Sandbox } from "../client-
|
|
5
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
4
|
+
import { t as Sandbox } from "../client-C-o416Dc.js";
|
|
5
|
+
import { t as SandboxInstance } from "../sandbox-ClF1lCZz.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 { T as ValidationError, a as AuthError, b as SandboxError, d as GpuProviderNotConfiguredError, g as PartialFailureError, h as NotFoundError, i as readResponseJson, m as NetworkError, n as parseErrorResponse, p as NON_RETRYABLE_CREATE_QUOTA_REASONS, r as parseResponseError, v as QuotaError, w as TimeoutError, x as ServerError } from "./errors-BfbOP_rx.js";
|
|
4
4
|
import { f as combineAbortSignals } from "./browser-interactive-control-controller-DHx53yre.js";
|
|
5
5
|
import { n as fetchWithKeepAlive } from "./keep-alive-fetch-BBzJDWyt.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-ClF1lCZz.js";
|
|
7
7
|
import { t as LinesClient } from "./lines-CXkOvy_9.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 { S as StateError, T as ValidationError, _ as ProfileFileMountPathError, a as AuthError, b as SandboxError, g as PartialFailureError, h as NotFoundError, m as NetworkError, s as CapabilityError, u as FileWriteConflictError, v as QuotaError, w as TimeoutError, x as ServerError } from "./errors-BfbOP_rx.js";
|
|
2
|
-
import { _ as parseBackendRegistryResponse, a as InstancesClient, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as InstanceRestartingError, m as backendRegistryInteractionKindSchema, p as backendRegistryEntrySchema, r as HostedInstance, t as Sandbox, v as parseBackendRegistryResponseBody } from "./client-
|
|
3
|
-
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-
|
|
2
|
+
import { _ as parseBackendRegistryResponse, a as InstancesClient, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as InstanceRestartingError, m as backendRegistryInteractionKindSchema, p as backendRegistryEntrySchema, r as HostedInstance, t as Sandbox, v as parseBackendRegistryResponseBody } from "./client-C-o416Dc.js";
|
|
3
|
+
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-ClF1lCZz.js";
|
|
4
4
|
import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-CXkOvy_9.js";
|
|
5
5
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
6
6
|
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-CvOBTLei.js";
|
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-D_YmzZMA.js";
|
|
3
3
|
import { C as StreamInterruptedError, S as StateError, T as ValidationError, _ as ProfileFileMountPathError, a as AuthError, b as SandboxError, c as EdgeNotReadyError, d as GpuProviderNotConfiguredError, f as KeyBudgetExhaustedError, g as PartialFailureError, h as NotFoundError, l as EgressProxyRecoveryError, m as NetworkError, o as BranchFanoutExceedsHostError, s as CapabilityError, t as TerminalStreamError, u as FileWriteConflictError, v as QuotaError, w as TimeoutError, x as ServerError, y as ResumeEnvRequiredError } from "./errors-BfbOP_rx.js";
|
|
4
|
-
import { _ as parseBackendRegistryResponse, a as InstancesClient, c as IntelligenceClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as InstanceRestartingError, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as RunsClient, o as SandboxFleetClient, p as backendRegistryEntrySchema, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-
|
|
4
|
+
import { _ as parseBackendRegistryResponse, a as InstancesClient, c as IntelligenceClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as InstanceRestartingError, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as RunsClient, o as SandboxFleetClient, p as backendRegistryEntrySchema, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-C-o416Dc.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-DHx53yre.js";
|
|
6
|
-
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-
|
|
6
|
+
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-ClF1lCZz.js";
|
|
7
7
|
import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-CXkOvy_9.js";
|
|
8
8
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
9
9
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-Dgyl7F33.js";
|
|
10
10
|
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-CvOBTLei.js";
|
|
11
|
-
import { s as TangleSandboxClient } from "./tangle-
|
|
11
|
+
import { s as TangleSandboxClient } from "./tangle-rBYA7naZ.js";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
14
14
|
//#region src/confidential.ts
|
|
@@ -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-BOu9ZhKj.js";
|
|
2
2
|
export { runPreparedProcess, withPreparedProcessCalls };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
function processRequests(request, deadline, signal) {
|
|
4
4
|
const remaining = (ceiling = 3e4) => {
|
|
5
5
|
signal?.throwIfAborted();
|
|
6
|
-
const left = deadline -
|
|
6
|
+
const left = Math.floor(deadline - performance.now());
|
|
7
7
|
if (left <= 0) throw new Error("Process result timed out");
|
|
8
8
|
return Math.min(left, ceiling);
|
|
9
9
|
};
|
|
@@ -50,7 +50,7 @@ async function pollPreparedProcess(transport, target, pid, headers, read) {
|
|
|
50
50
|
}
|
|
51
51
|
/** One prepare/PID/result transport for SDK, Worker adapters and Node probes. */
|
|
52
52
|
async function runPreparedProcess(request, path, init, timeoutMs = 75e3, read = (response) => response.clone().json()) {
|
|
53
|
-
const transport = processRequests(request, timeoutMs === 0 ? Number.POSITIVE_INFINITY :
|
|
53
|
+
const transport = processRequests(request, timeoutMs === 0 ? Number.POSITIVE_INFINITY : performance.now() + timeoutMs, init.signal);
|
|
54
54
|
const resultBase = path.split("?")[0].replace(/\/spawn$/, "");
|
|
55
55
|
let pid;
|
|
56
56
|
try {
|
|
@@ -65,7 +65,7 @@ async function runPreparedProcess(request, path, init, timeoutMs = 75e3, read =
|
|
|
65
65
|
const cancelHeaders = new Headers(init.headers);
|
|
66
66
|
cancelHeaders.set("Content-Type", "application/json");
|
|
67
67
|
if (pid) {
|
|
68
|
-
const cleanup = processRequests(request,
|
|
68
|
+
const cleanup = processRequests(request, performance.now() + 5e3);
|
|
69
69
|
try {
|
|
70
70
|
await (await cleanup.ask(`${resultBase}/${pid}`, {
|
|
71
71
|
method: "DELETE",
|
|
@@ -4,7 +4,7 @@ import { C as StreamInterruptedError, F as profileFileMountOutsideRootsMessage,
|
|
|
4
4
|
import { _ as interactiveSessionStatusResponseSchema, d as awaitWithAbort, f as combineAbortSignals, g as interactiveSessionControlValidationResponseSchema, h as interactiveSessionControlReleaseResponseSchema, l as createInteractiveControlHolderId, m as interactiveSessionControlClaimResponseSchema, p as delayUntilAborted } from "./browser-interactive-control-controller-DHx53yre.js";
|
|
5
5
|
import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-BBzJDWyt.js";
|
|
6
6
|
import { s as uploadChunked } from "./chunked-upload-DN2twsUu.js";
|
|
7
|
-
import { t as runPreparedProcess } from "./prepared-process-
|
|
7
|
+
import { t as runPreparedProcess } from "./prepared-process-BOu9ZhKj.js";
|
|
8
8
|
import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-DyiAdzXr.js";
|
|
9
9
|
import { n as SandboxLines } from "./lines-CXkOvy_9.js";
|
|
10
10
|
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-rBYA7naZ.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-BfbOP_rx.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-ClF1lCZz.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-CLVp0apb.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.60.78-develop.
|
|
3
|
+
"version": "0.60.78-develop.20261023065630.1d223ed",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -160,10 +160,10 @@
|
|
|
160
160
|
"ws": "^8.20.0",
|
|
161
161
|
"yjs": "13.6.30",
|
|
162
162
|
"@products/sandbox-test-utils": "0.0.0",
|
|
163
|
+
"@repo/shared": "0.0.0",
|
|
163
164
|
"@tangle-network/agent-profile-materialize": "0.26.0",
|
|
164
165
|
"@tangle-network/cli-agent-registry": "0.10.2",
|
|
165
166
|
"@tangle-network/runtime-contracts": "0.19.0",
|
|
166
|
-
"@repo/shared": "0.0.0",
|
|
167
167
|
"@tangle-network/sdk": "4.0.16",
|
|
168
168
|
"@tangle-network/sse-core": "0.0.0"
|
|
169
169
|
},
|