@tangle-network/sandbox 1.0.194 → 1.0.195

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
- import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-DJPIxnlZ.js";
2
- import { O as assertCurrentBackendType } from "../interactive-controller-jr3_74Pq.js";
3
- import { t as SandboxInstance } from "../sandbox-Dtb-_btd.js";
4
- import { D as ValidationError, _ as NotFoundError, w as StateError } from "../errors-Mzq10WZq.js";
5
- import { t as Sandbox } from "../client-DQHiP4yW.js";
1
+ import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-BkxybFme.js";
2
+ import { O as assertCurrentBackendType } from "../interactive-controller-DqlIWA_z.js";
3
+ import { t as SandboxInstance } from "../sandbox-Djgwuf3R.js";
4
+ import { D as ValidationError, _ as NotFoundError, w as StateError } from "../errors-DYrRgCHB.js";
5
+ import { t as Sandbox } from "../client-BC3csszv.js";
6
6
  import { z } from "zod";
7
7
  //#region src/agent/instances.ts
8
8
  const managers = /* @__PURE__ */ new WeakMap();
@@ -66,7 +66,7 @@ async function servePreviewMcp(request, config) {
66
66
  if (typeof config.authorize !== "function") throw new Error("Preview MCP requires a host authorization callback");
67
67
  const tools = config.tools ?? PREVIEW_TOOLS;
68
68
  if (!tools.length || tools.some((tool) => !PREVIEW_TOOLS.includes(tool))) throw new Error("Preview MCP requires an explicit nonempty preview-only tool grant");
69
- const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-DJPIxnlZ.js").then((n) => n.n), import("@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js")]);
69
+ const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-BkxybFme.js").then((n) => n.n), import("@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js")]);
70
70
  const handle = await createMcpServer(config.box, {
71
71
  name: "tangle-previews",
72
72
  sessionId: config.sessionId,
@@ -1,7 +1,7 @@
1
1
  import { t as rewrapResponse } from "./response-rewrap-Cjoxh2wZ.js";
2
2
  //#region src/lib/api-request.mjs
3
3
  /** The package version tsdown.config.ts defines; unbuilt source reports 0.0.0. */
4
- const SDK_VERSION = "1.0.194";
4
+ const SDK_VERSION = "1.0.195";
5
5
  function withRequestContextHeaders(response, path, method, body = response.body) {
6
6
  const headers = new Headers(response.headers);
7
7
  headers.set("x-tangle-request-path", path);
@@ -1,4 +1,4 @@
1
- import { S as SandboxError, n as isTransientWrite, r as parseErrorResponse } from "./errors-Mzq10WZq.js";
1
+ import { S as SandboxError, n as isTransientWrite, r as parseErrorResponse } from "./errors-DYrRgCHB.js";
2
2
  import { t as abortableSleep } from "./abort-signal-Cu4F2VVz.js";
3
3
  import { i as FILE_UPLOAD_SESSION_MAX_BYTES, n as isFileTooLargeErrorBody, r as isPayloadTooLargeErrorBody } from "./file-transfer-Cr9Ossea.js";
4
4
  //#region src/generated/sandbox-upload-operations.ts
@@ -1,5 +1,5 @@
1
1
  import { i as FILE_UPLOAD_SESSION_MAX_BYTES } from "./file-transfer-Cr9Ossea.js";
2
- import { a as planCompression, i as partCount, n as commitSession, o as putPart, r as initUploadSession, t as abortSession } from "./chunked-upload-D5ytV_s6.js";
2
+ import { a as planCompression, i as partCount, n as commitSession, o as putPart, r as initUploadSession, t as abortSession } from "./chunked-upload-D1sTCeLr.js";
3
3
  import { createHash } from "node:crypto";
4
4
  import { open } from "node:fs/promises";
5
5
  //#region src/lib/chunked-upload-file.ts
@@ -1,13 +1,13 @@
1
- import { A as normalizeRuntimeBackendConfig, D as applyRequestedModel, E as isBrowserRuntime, H as backendTypeSchema, N as withProfileHarness, O as assertCurrentBackendType, P as withoutCreateOnlyModelFields, S as encodePromptForWire, o as requestInteractiveSessionToken } from "./interactive-controller-jr3_74Pq.js";
1
+ import { A as normalizeRuntimeBackendConfig, D as applyRequestedModel, E as isBrowserRuntime, H as backendTypeSchema, N as withProfileHarness, O as assertCurrentBackendType, P as withoutCreateOnlyModelFields, S as encodePromptForWire, o as requestInteractiveSessionToken } from "./interactive-controller-DqlIWA_z.js";
2
2
  import { r as agentProfileSchema } from "./profile-schema-C1KpT-wS.js";
3
- import { A as normalizeSandboxCreateReceipt, B as CAPACITY_ETA_WAIT_MAX_MS, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeConnection, G as extendableDeadline, I as normalizeEgressPolicyFields, J as isDeployWindowCreateError, K as generateIdempotencyKey, L as normalizeProxySecretReceipt, N as dateOf, O as isRetryableProfileFileMaterializeFailure, P as parseLifecycleTimes, R as normalizeSandboxShape, T as splitInlineProfileFileMounts, U as DEPLOY_WINDOW_RETRY_MS, W as createRetryDelayMs, X as isRetryableCreateError, Y as isRateLimitCreateError, d as sandboxLedgerUsd, j as normalizeStartupDiagnostics, k as normalizeCaptureProof, n as createSandboxInstanceFromResponse, o as exportTraceBundle, q as isCapacityShortageCreateError, z as CAPACITY_ETA_MARGIN_MS } from "./sandbox-Dtb-_btd.js";
4
- import { C as ServerError, D as ValidationError, E as TimeoutError, S as SandboxError, _ as NotFoundError, a as readResponseJson, g as NetworkError, i as parseResponseError, o as retryWhen, r as parseErrorResponse, s as AuthError, v as PartialFailureError } from "./errors-Mzq10WZq.js";
3
+ import { A as normalizeSandboxCreateReceipt, B as CAPACITY_ETA_WAIT_MAX_MS, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeConnection, G as extendableDeadline, I as normalizeEgressPolicyFields, J as isDeployWindowCreateError, K as generateIdempotencyKey, L as normalizeProxySecretReceipt, N as dateOf, O as isRetryableProfileFileMaterializeFailure, P as parseLifecycleTimes, R as normalizeSandboxShape, T as splitInlineProfileFileMounts, U as DEPLOY_WINDOW_RETRY_MS, W as createRetryDelayMs, X as isRetryableCreateError, Y as isRateLimitCreateError, d as sandboxLedgerUsd, j as normalizeStartupDiagnostics, k as normalizeCaptureProof, n as createSandboxInstanceFromResponse, o as exportTraceBundle, q as isCapacityShortageCreateError, z as CAPACITY_ETA_MARGIN_MS } from "./sandbox-Djgwuf3R.js";
4
+ import { C as ServerError, D as ValidationError, E as TimeoutError, S as SandboxError, _ as NotFoundError, a as readResponseJson, g as NetworkError, i as parseResponseError, o as retryWhen, r as parseErrorResponse, s as AuthError, v as PartialFailureError } from "./errors-DYrRgCHB.js";
5
5
  import { r as combineAbortSignals, t as abortableSleep } from "./abort-signal-Cu4F2VVz.js";
6
6
  import { l as SANDBOX_AGENT_HOME, t as isInsideReservedDir } from "./file-transfer-Cr9Ossea.js";
7
- import { n as fetchSandboxApi } from "./api-request-BC-hCa1t.js";
7
+ import { n as fetchSandboxApi } from "./api-request-DmLZ1RdX.js";
8
8
  import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-C2lFwrMA.js";
9
9
  import { t as parseSSEStream } from "./sse-parser-B4aH89Nq.js";
10
- import { t as LinesClient } from "./lines-DrG0WOW6.js";
10
+ import { t as LinesClient } from "./lines-gn8FqF3c.js";
11
11
  import { PublicTemplatesClient } from "./public-templates.js";
12
12
  import { z } from "zod";
13
13
  //#region ../../../packages/runtime-contracts/dist/git-policy.js
@@ -1,2 +1,2 @@
1
- import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-Bbr45lyk.js";
1
+ import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-DZIcyGoF.js";
2
2
  export { CollaborationClient, CollaborationFileBridge, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
@@ -1,4 +1,4 @@
1
- import { E as TimeoutError, g as NetworkError, r as parseErrorResponse } from "./errors-Mzq10WZq.js";
1
+ import { E as TimeoutError, g as NetworkError, r as parseErrorResponse } from "./errors-DYrRgCHB.js";
2
2
  //#region src/collaboration/client.ts
3
3
  const DEFAULT_TIMEOUT_MS = 3e4;
4
4
  function normalizeBaseUrl(url) {
@@ -1,6 +1,6 @@
1
1
  import { r as agentProfileSchema } from "./profile-schema-C1KpT-wS.js";
2
- import { Z as canonicalAgentProfileDigest } from "./sandbox-Dtb-_btd.js";
3
- import { D as ValidationError, S as SandboxError, l as CapabilityError } from "./errors-Mzq10WZq.js";
2
+ import { Z as canonicalAgentProfileDigest } from "./sandbox-Djgwuf3R.js";
3
+ import { D as ValidationError, S as SandboxError, l as CapabilityError } from "./errors-DYrRgCHB.js";
4
4
  import { n as awaitWithAbort } from "./abort-signal-Cu4F2VVz.js";
5
5
  import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-C6DtK7GX-BbbiAn-Z.js";
6
6
  import "./cli-auth-bundle-CMJWI99l.js";
package/dist/core.js CHANGED
@@ -1,7 +1,7 @@
1
- import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-Dtb-_btd.js";
2
- import { C as ServerError, D as ValidationError, E as TimeoutError, S as SandboxError, _ as NotFoundError, b as QuotaError, g as NetworkError, l as CapabilityError, p as FileWriteConflictError, r as parseErrorResponse, s as AuthError, v as PartialFailureError, w as StateError, y as ProfileFileMountPathError } from "./errors-Mzq10WZq.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-DQHiP4yW.js";
4
- import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-DrG0WOW6.js";
1
+ import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-Djgwuf3R.js";
2
+ import { C as ServerError, D as ValidationError, E as TimeoutError, S as SandboxError, _ as NotFoundError, b as QuotaError, g as NetworkError, l as CapabilityError, p as FileWriteConflictError, r as parseErrorResponse, s as AuthError, v as PartialFailureError, w as StateError, y as ProfileFileMountPathError } from "./errors-DYrRgCHB.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-BC3csszv.js";
4
+ import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-gn8FqF3c.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-BU1I2KvV.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-BKU1_Pbj.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, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference, sandboxFailureKind };
@@ -524,6 +524,11 @@ function parseErrorResponse(status, body, context, headers) {
524
524
  } catch {
525
525
  data = { message: body };
526
526
  }
527
+ const nested = data.error?.details;
528
+ if (isFailureDetail(nested)) data = {
529
+ ...nested,
530
+ ...data
531
+ };
527
532
  const errorObj = data.error;
528
533
  const nestedMessage = typeof errorObj === "object" && errorObj !== null ? errorObj.message : void 0;
529
534
  const nestedCode = typeof errorObj === "object" && errorObj !== null ? typeof errorObj.code === "string" ? asErrorCode(errorObj.code) : void 0 : void 0;
@@ -1,5 +1,5 @@
1
1
  import { n as bytesToHex, t as sha256 } from "./sha2-vu4U-x2L.js";
2
- import { D as ValidationError } from "./errors-Mzq10WZq.js";
2
+ import { D as ValidationError } from "./errors-DYrRgCHB.js";
3
3
  //#region src/lib/file-download.ts
4
4
  function downloadBounds(options) {
5
5
  for (const [name, value] of Object.entries({
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
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-jr3_74Pq.js";
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-DqlIWA_z.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-BYbNLahH.js";
3
3
  import { i as SANDBOX_SIZE_PRESET_NAMES, r as agentProfileSchema, t as agentProfileConfidentialSchema } from "./profile-schema-C1KpT-wS.js";
4
- 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, f as InteractiveSessionHandle, 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-Dtb-_btd.js";
5
- import { C as ServerError, D as ValidationError, E as TimeoutError, S as SandboxError, T as StreamInterruptedError, _ as NotFoundError, b as QuotaError, c as BranchFanoutExceedsHostError, d as EdgeNotReadyError, f as EgressProxyRecoveryError, g as NetworkError, h as KeyBudgetExhaustedError, l as CapabilityError, m as GpuProviderNotConfiguredError, p as FileWriteConflictError, r as parseErrorResponse, s as AuthError, t as TerminalStreamError, u as CompliancePlacementError, v as PartialFailureError, w as StateError, x as ResumeEnvRequiredError, y as ProfileFileMountPathError } from "./errors-Mzq10WZq.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-DQHiP4yW.js";
7
- import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-Bbr45lyk.js";
4
+ 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, f as InteractiveSessionHandle, 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-Djgwuf3R.js";
5
+ import { C as ServerError, D as ValidationError, E as TimeoutError, S as SandboxError, T as StreamInterruptedError, _ as NotFoundError, b as QuotaError, c as BranchFanoutExceedsHostError, d as EdgeNotReadyError, f as EgressProxyRecoveryError, g as NetworkError, h as KeyBudgetExhaustedError, l as CapabilityError, m as GpuProviderNotConfiguredError, p as FileWriteConflictError, r as parseErrorResponse, s as AuthError, t as TerminalStreamError, u as CompliancePlacementError, v as PartialFailureError, w as StateError, x as ResumeEnvRequiredError, y as ProfileFileMountPathError } from "./errors-DYrRgCHB.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-BC3csszv.js";
7
+ import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DZIcyGoF.js";
8
8
  import { t as parseSSEStream } from "./sse-parser-B4aH89Nq.js";
9
- import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-DrG0WOW6.js";
10
- import { t as downloadFile } from "./file-download-CKOxcATB.js";
9
+ import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-gn8FqF3c.js";
10
+ import { t as downloadFile } from "./file-download-CUIMLK3J.js";
11
11
  import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
12
- 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-BU1I2KvV.js";
13
- import { s as BlueprintSandboxClient } from "./tangle-fs17QlcY.js";
12
+ 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-BKU1_Pbj.js";
13
+ import { s as BlueprintSandboxClient } from "./tangle-cfvm_9z5.js";
14
14
  import { z } from "zod";
15
15
  //#region ../../../packages/runtime-contracts/dist/model-key-proxy.js
16
16
  const MANAGED_MODEL_KEY_SENTINEL = "proxy-managed-per-request";
@@ -1,6 +1,6 @@
1
- import { E as TimeoutError, g as NetworkError, r as parseErrorResponse } from "../errors-Mzq10WZq.js";
2
- import { n as fetchSandboxApi } from "../api-request-BC-hCa1t.js";
3
- import { n as verifyDownload } from "../file-download-CKOxcATB.js";
1
+ import { E as TimeoutError, g as NetworkError, r as parseErrorResponse } from "../errors-DYrRgCHB.js";
2
+ import { n as fetchSandboxApi } from "../api-request-DmLZ1RdX.js";
3
+ import { n as verifyDownload } from "../file-download-CUIMLK3J.js";
4
4
  //#region src/intelligence/index.ts
5
5
  /**
6
6
  * `@tangle-network/sandbox/intelligence` — browser-safe typed client for the
@@ -1,10 +1,10 @@
1
1
  import { C as boundedIdentifierSchema, T as boundedJsonSchema, o as canonicalCandidateDigest } from "./harness-DMaNgn0S.js";
2
2
  import { B as PlanContinuationSchema, D as agentInteractiveSessionControlClaimMatchesRef, P as AgentExactRunControlRefSchema, R as AgentExecutionOutcomeSchema, U as InteractionRequestSchema, c as assertInteractiveSessionRef, h as AgentInteractiveSessionAttachSchema, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, r as browserInteractiveTerminalEndpoint, v as AgentInteractiveSessionControlClaimSchema, x as AgentInteractiveSessionRefSchema, z as DurablePlanSchema } from "./browser-interactive-control-controller-BYbNLahH.js";
3
3
  import { r as agentProfileSchema } from "./profile-schema-C1KpT-wS.js";
4
- import { C as ServerError, D as ValidationError, S as SandboxError, g as NetworkError, i as parseResponseError, l as CapabilityError, t as TerminalStreamError } from "./errors-Mzq10WZq.js";
4
+ import { C as ServerError, D as ValidationError, S as SandboxError, g as NetworkError, i as parseResponseError, l as CapabilityError, t as TerminalStreamError } from "./errors-DYrRgCHB.js";
5
5
  import { n as awaitWithAbort, r as combineAbortSignals, t as abortableSleep } from "./abort-signal-Cu4F2VVz.js";
6
6
  import { t as parseSSEStream } from "./sse-parser-B4aH89Nq.js";
7
- import { s as uploadChunked } from "./chunked-upload-D5ytV_s6.js";
7
+ import { s as uploadChunked } from "./chunked-upload-D1sTCeLr.js";
8
8
  import { z } from "zod";
9
9
  /** Stable declaration order; registry tests check the shipped spec composition. */
10
10
  const ALL_BACKEND_TYPES = Object.values({
@@ -771,7 +771,7 @@ function secretProfilePublicRequestDigest(backend) {
771
771
  //#region src/backend-config.ts
772
772
  function assertCurrentBackendType(value, field = "backend.type") {
773
773
  const parsed = backendTypeSchema.safeParse(value);
774
- if (!parsed.success) throw new Error(`[sandbox-sdk] ${field} must be a current backend type: ${parsed.error.issues[0]?.message ?? "invalid value"}`);
774
+ if (!parsed.success) throw new ValidationError(`[sandbox-sdk] ${field} must be a current backend type: ${parsed.error.issues[0]?.message ?? "invalid value"}`);
775
775
  }
776
776
  /**
777
777
  * Fold a per-turn `PromptOptions.model` shorthand into the backend override
@@ -1,4 +1,4 @@
1
- import { D as ValidationError, r as parseErrorResponse } from "./errors-Mzq10WZq.js";
1
+ import { D as ValidationError, r as parseErrorResponse } from "./errors-DYrRgCHB.js";
2
2
  //#region src/line-identity.ts
3
3
  /**
4
4
  * The instance key that serves one member: `keyPrefix` plus the first 32 hex
package/dist/lines.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-DrG0WOW6.js";
1
+ import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-gn8FqF3c.js";
2
2
  export { LinesClient, SandboxLines, lineInstanceKey, profileChannelReference };
@@ -1,5 +1,5 @@
1
1
  import { u as SANDBOX_FILE_API_ABSOLUTE_ROOTS } from "./file-transfer-Cr9Ossea.js";
2
- import "./api-request-BC-hCa1t.js";
2
+ import "./api-request-DmLZ1RdX.js";
3
3
  import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-B3TTvqlm.js";
4
4
  //#region \0rolldown/runtime.js
5
5
  var __defProp = Object.defineProperty;
@@ -396,7 +396,7 @@ async function createMcpServer(box, options = {}) {
396
396
  const { bindings, handlers } = bindToolSpecs(box, options);
397
397
  const server = new serverModule.Server({
398
398
  name: options.name ?? "tangle-sandbox",
399
- version: options.version ?? "1.0.194"
399
+ version: options.version ?? "1.0.195"
400
400
  }, { capabilities: { tools: {} } });
401
401
  server.setRequestHandler(typesModule.ListToolsRequestSchema, async () => ({ tools: bindings.map(({ spec: s }) => ({
402
402
  name: s.name,
@@ -1,4 +1,4 @@
1
- import { S as SandboxError, a as readResponseJson } from "./errors-Mzq10WZq.js";
1
+ import { S as SandboxError, a as readResponseJson } from "./errors-DYrRgCHB.js";
2
2
  import { z } from "zod";
3
3
  //#region src/public-templates.ts
4
4
  const publicationStatus = z.enum([
@@ -1,4 +1,4 @@
1
- import { n as verifyDownload } from "./file-download-CKOxcATB.js";
1
+ import { n as verifyDownload } from "./file-download-CUIMLK3J.js";
2
2
  import { t as runPreparedEvidence } from "./prepared-evidence-4prvV0YK.js";
3
3
  import { z } from "zod";
4
4
  //#region src/lib/raw-evidence-archive.ts
package/dist/runtime.js CHANGED
@@ -1,8 +1,8 @@
1
- import { I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController, z as projectAgentTerminalRecord } from "./interactive-controller-jr3_74Pq.js";
1
+ import { I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController, z as projectAgentTerminalRecord } from "./interactive-controller-DqlIWA_z.js";
2
2
  import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-BYbNLahH.js";
3
- import { C as ServerError, D as ValidationError, E as TimeoutError, S as SandboxError, _ as NotFoundError, b as QuotaError, g as NetworkError, l as CapabilityError, p as FileWriteConflictError, s as AuthError, v as PartialFailureError, w as StateError, y as ProfileFileMountPathError } from "./errors-Mzq10WZq.js";
4
- import { n as fetchSandboxApi } from "./api-request-BC-hCa1t.js";
5
- import { s as uploadChunked } from "./chunked-upload-D5ytV_s6.js";
3
+ import { C as ServerError, D as ValidationError, E as TimeoutError, S as SandboxError, _ as NotFoundError, b as QuotaError, g as NetworkError, l as CapabilityError, p as FileWriteConflictError, s as AuthError, v as PartialFailureError, w as StateError, y as ProfileFileMountPathError } from "./errors-DYrRgCHB.js";
4
+ import { n as fetchSandboxApi } from "./api-request-DmLZ1RdX.js";
5
+ import { s as uploadChunked } from "./chunked-upload-D1sTCeLr.js";
6
6
  //#region src/runtime-client.ts
7
7
  const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
8
8
  function requireToken(token) {
@@ -1,21 +1,21 @@
1
- import { A as normalizeRuntimeBackendConfig, C as encodeTextForWire, D as applyRequestedModel, F as withoutRuntimeSecrets, I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, M as requestedSecretProfilePublicDigest, O as assertCurrentBackendType, S as encodePromptForWire, T as canUseNodeHttp2, W as normalizeEffectiveBackend, _ as isTraceId, a as assertScopedTokenActive, b as resolveDispatchRunIdentity, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as TRACE_ID_HEADER, h as isRetryableCredentialRefusal, i as terminalUpgradeHeadersSupported, j as requestedPublicProfileDigest, k as mergeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as mintTraceId, w as runtimeFilesystemPath, x as validateAcceptedDispatchRunRef, y as resolveTraceId } from "./interactive-controller-jr3_74Pq.js";
1
+ import { A as normalizeRuntimeBackendConfig, C as encodeTextForWire, D as applyRequestedModel, F as withoutRuntimeSecrets, I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, M as requestedSecretProfilePublicDigest, O as assertCurrentBackendType, S as encodePromptForWire, T as canUseNodeHttp2, W as normalizeEffectiveBackend, _ as isTraceId, a as assertScopedTokenActive, b as resolveDispatchRunIdentity, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as TRACE_ID_HEADER, h as isRetryableCredentialRefusal, i as terminalUpgradeHeadersSupported, j as requestedPublicProfileDigest, k as mergeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as mintTraceId, w as runtimeFilesystemPath, x as validateAcceptedDispatchRunRef, y as resolveTraceId } from "./interactive-controller-DqlIWA_z.js";
2
2
  import { C as boundedIdentifierSchema, E as boundedStringSchema, g as sha256DigestSchema$1, o as canonicalCandidateDigest$1, s as canonicalCandidateJson$1, u as isCanonicalJsonValue$1 } from "./harness-DMaNgn0S.js";
3
3
  import { t as sha256 } from "./sha2-vu4U-x2L.js";
4
4
  import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-BYbNLahH.js";
5
5
  import { a as ProxySecretReceiptSchema, o as canonicalAgentProfileValue, r as agentProfileSchema } from "./profile-schema-C1KpT-wS.js";
6
- import { C as ServerError, D as ValidationError, E as TimeoutError, S as SandboxError, T as StreamInterruptedError, _ as NotFoundError, a as readResponseJson, d as EdgeNotReadyError, g as NetworkError, i as parseResponseError, l as CapabilityError, n as isTransientWrite, o as retryWhen, r as parseErrorResponse, s as AuthError, t as TerminalStreamError, w as StateError, y as ProfileFileMountPathError } from "./errors-Mzq10WZq.js";
6
+ import { C as ServerError, D as ValidationError, E as TimeoutError, S as SandboxError, T as StreamInterruptedError, _ as NotFoundError, a as readResponseJson, d as EdgeNotReadyError, g as NetworkError, i as parseResponseError, l as CapabilityError, n as isTransientWrite, o as retryWhen, r as parseErrorResponse, s as AuthError, t as TerminalStreamError, w as StateError, y as ProfileFileMountPathError } from "./errors-DYrRgCHB.js";
7
7
  import { i as delayUntilAborted, n as awaitWithAbort, r as combineAbortSignals, t as abortableSleep } from "./abort-signal-Cu4F2VVz.js";
8
8
  import { a as SANDBOX_PROXY_REQUEST_MAX_BYTES, c as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, d as isProfileFileMountOutsideRoots, f as profileFileMountOutsideRootsMessage, l as SANDBOX_AGENT_HOME, o as FILE_OPERATION_LIMITS, u as SANDBOX_FILE_API_ABSOLUTE_ROOTS } from "./file-transfer-Cr9Ossea.js";
9
9
  import { t as rewrapResponse } from "./response-rewrap-Cjoxh2wZ.js";
10
10
  import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-C2lFwrMA.js";
11
11
  import { t as SIDECAR_PROXY_ERROR_HEADER } from "./sidecar-proxy-error-DTJbOAWL.js";
12
12
  import { t as parseSSEStream } from "./sse-parser-B4aH89Nq.js";
13
- import { s as uploadChunked } from "./chunked-upload-D5ytV_s6.js";
13
+ import { s as uploadChunked } from "./chunked-upload-D1sTCeLr.js";
14
14
  import { t as runPreparedProcess } from "./prepared-process-BSpZXDDw.js";
15
15
  import { a as isBackendType, r as cliAuthReferenceSchema } from "./cli-auth-bundle-C6DtK7GX-BbbiAn-Z.js";
16
16
  import "./cli-auth-bundle-CMJWI99l.js";
17
- import { n as SandboxLines } from "./lines-DrG0WOW6.js";
18
- import { t as downloadFile } from "./file-download-CKOxcATB.js";
17
+ import { n as SandboxLines } from "./lines-gn8FqF3c.js";
18
+ import { t as downloadFile } from "./file-download-CUIMLK3J.js";
19
19
  import { z } from "zod";
20
20
  import { createHash } from "node:crypto";
21
21
  import { constants } from "node:fs";
@@ -8873,7 +8873,7 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
8873
8873
  var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabilities {
8874
8874
  /** @internal — invoked before the sandbox is deleted. */
8875
8875
  async _sessionExportRawEvidence(id, destination, options) {
8876
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-BD37zHN5.js");
8876
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-DOrr7af7.js");
8877
8877
  await this.ensureRunning();
8878
8878
  await this.refresh();
8879
8879
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/raw-evidence/archive?${new URLSearchParams([
@@ -8904,7 +8904,7 @@ var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabil
8904
8904
  * and the byte and file bounds are verified before the directory appears.
8905
8905
  */
8906
8906
  async exportRawEvidence(destination, options) {
8907
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-BD37zHN5.js");
8907
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-DOrr7af7.js");
8908
8908
  await this.ensureRunning();
8909
8909
  await this.refresh();
8910
8910
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/raw-evidence/archive?${new URLSearchParams({
@@ -11034,7 +11034,7 @@ var SandboxFilesystemOperations = class extends DeclaredFilesystemOperations {
11034
11034
  totalBytes: size,
11035
11035
  percentage: 0
11036
11036
  });
11037
- const { uploadChunkedFromFile } = await import("./chunked-upload-file-DL1-AqRp.js");
11037
+ const { uploadChunkedFromFile } = await import("./chunked-upload-file-BM3k_ol3.js");
11038
11038
  await uploadChunkedFromFile({ fetch: (path, init) => this.host.runtimeFetch(path, init) }, remotePath, localPath, {
11039
11039
  mode: options?.permissions,
11040
11040
  onProgress: options?.onProgress ? (progress) => {
@@ -1,4 +1,4 @@
1
- import { D as ValidationError, S as SandboxError } from "./errors-Mzq10WZq.js";
1
+ import { D as ValidationError, S as SandboxError } from "./errors-DYrRgCHB.js";
2
2
  import { spawn } from "node:child_process";
3
3
  //#region src/select-seat-command.ts
4
4
  /**
@@ -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 BlueprintSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-fs17QlcY.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 BlueprintSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-cfvm_9z5.js";
2
2
  export { AgentSandboxBlueprintAbi, BlueprintSandboxClient, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
@@ -1,5 +1,5 @@
1
- import { M as readFilesystemIncarnationTuple, n as createSandboxInstanceFromResponse } from "./sandbox-Dtb-_btd.js";
2
- import { a as readResponseJson } from "./errors-Mzq10WZq.js";
1
+ import { M as readFilesystemIncarnationTuple, n as createSandboxInstanceFromResponse } from "./sandbox-Djgwuf3R.js";
2
+ import { a as readResponseJson } from "./errors-DYrRgCHB.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-CK-x8vXj.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": "1.0.194",
3
+ "version": "1.0.195",
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",
157
- "@tangle-network/cli-agent-registry": "0.15.0",
158
156
  "@repo/shared": "0.0.0",
157
+ "@tangle-network/agent-profile-materialize": "0.27.1",
158
+ "@products/sandbox-test-utils": "0.0.0",
159
159
  "@tangle-network/runtime-contracts": "0.20.0",
160
- "@tangle-network/agent-profile-materialize": "0.27.1"
160
+ "@tangle-network/cli-agent-registry": "0.15.0"
161
161
  },
162
162
  "tangleRelease": {
163
- "sourceSha": "d75d059cac3d4c266f276a9303bb1c06b752f053",
164
- "mergedAt": "2026-11-02T09:11:19-08:00"
163
+ "sourceSha": "fcc4ccab93268867518d3ab9f0cb30a54865d39f",
164
+ "mergedAt": "2026-11-02T09:49:03-08:00"
165
165
  },
166
166
  "scripts": {
167
167
  "build": "node scripts/build-dist.mjs",