@tangle-network/sandbox 1.0.40 → 1.0.41

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.
@@ -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-B1hYEHHR.js";
3
- import { t as SandboxInstance } from "../sandbox-iF479Pro.js";
3
+ import { t as SandboxInstance } from "../sandbox-DOBvmjwA.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-BRXA0n_m.js";
5
+ import { t as Sandbox } from "../client-p07jyp5S.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-B1hYEHHR.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-iF479Pro.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-DOBvmjwA.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-iF479Pro.js";
2
+ import { U as canonicalAgentProfileDigest } from "./sandbox-DOBvmjwA.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-iF479Pro.js";
1
+ import { b as ManagedProcessClient, r as WorkspaceImages, t as SandboxInstance } from "./sandbox-DOBvmjwA.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-BRXA0n_m.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-p07jyp5S.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-mdZgLXnr.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-BjTgpGXh.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-B1hYEHHR.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-iF479Pro.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-DOBvmjwA.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-BRXA0n_m.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-p07jyp5S.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-mdZgLXnr.js";
12
- import { s as TangleSandboxClient } from "./tangle-DlczUR3S.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-BjTgpGXh.js";
12
+ import { s as TangleSandboxClient } from "./tangle-Dn3ZEv3_.js";
13
13
  import { z } from "zod";
14
14
  //#region ../../../packages/runtime-contracts/dist/model-key-proxy.js
15
15
  /**
@@ -1468,10 +1468,12 @@ function classifySidecarRequest(input, method, upgrade = false) {
1468
1468
  * A call goes to one of three places:
1469
1469
  * - the cell's exec host, for the exec family on its short grant
1470
1470
  * (`classifySidecarRequest(...).shortTokenRequired`);
1471
- * - the Sandbox API, for the platform operations it answers itself and for
1472
- * the agent calls it prepares before the sidecar sees them;
1471
+ * - the Sandbox API, for the platform operations it answers itself (network,
1472
+ * preview links, and backend lifecycle, which the orchestrator serves and
1473
+ * the sidecar does not) and for the agent calls it prepares before the
1474
+ * sidecar sees them;
1473
1475
  * - the cell edge at `connection.runtimeUrl`, for everything else: files,
1474
- * processes, agent reads and event streams, git, backend, terminals.
1476
+ * processes, agent reads and event streams, git, terminals.
1475
1477
  *
1476
1478
  * A call the edge did not serve goes to the API once. When the answer proves
1477
1479
  * the sandbox never received the call, any call goes; when it does not, only
@@ -1480,7 +1482,7 @@ function classifySidecarRequest(input, method, upgrade = false) {
1480
1482
  /** Platform operations under `/runtime` that the API answers itself. */
1481
1483
  function isControlPlaneRuntimePath(runtimePath) {
1482
1484
  const path = runtimePath.split("?")[0] ?? "";
1483
- return path === "/network" || path.startsWith("/network/") || path === "/preview-links" || path.startsWith("/preview-links/");
1485
+ return path === "/network" || path.startsWith("/network/") || path === "/preview-links" || path.startsWith("/preview-links/") || path === "/backend" || path.startsWith("/backend/");
1484
1486
  }
1485
1487
  const READ_METHODS = new Set([
1486
1488
  "GET",
@@ -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-DlczUR3S.js";
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-Dn3ZEv3_.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-iF479Pro.js";
1
+ import { n as createSandboxInstanceFromResponse } from "./sandbox-DOBvmjwA.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.40",
3
+ "version": "1.0.41",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -154,14 +154,14 @@
154
154
  "ws": "^8.22.0",
155
155
  "yjs": "13.6.30",
156
156
  "@products/sandbox-test-utils": "0.0.0",
157
- "@tangle-network/agent-profile-materialize": "0.27.1",
158
- "@repo/shared": "0.0.0",
159
157
  "@tangle-network/cli-agent-registry": "0.14.0",
160
- "@tangle-network/runtime-contracts": "0.19.0"
158
+ "@repo/shared": "0.0.0",
159
+ "@tangle-network/runtime-contracts": "0.19.0",
160
+ "@tangle-network/agent-profile-materialize": "0.27.1"
161
161
  },
162
162
  "tangleRelease": {
163
- "sourceSha": "0ff73ef43c3dfc8e9fc83154d5016fe76e947ce4",
164
- "mergedAt": "2026-10-27T14:26:51-06:00"
163
+ "sourceSha": "54d631eb347267529fb60804c8b4b6d3e02f59fe",
164
+ "mergedAt": "2026-10-27T14:58:52-06:00"
165
165
  },
166
166
  "scripts": {
167
167
  "build": "node scripts/build-dist.mjs",