@tangle-network/sandbox 1.0.196 → 1.0.197

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.
Files changed (47) hide show
  1. package/README.md +6 -1
  2. package/dist/agent/index.d.ts +4 -4
  3. package/dist/agent/index.js +5 -5
  4. package/dist/agent/preview.d.ts +1 -1
  5. package/dist/agent/preview.js +1 -1
  6. package/dist/{agent-run-outcome-9Crbg1zl.d.ts → agent-run-outcome-D2Owom0h.d.ts} +2 -2
  7. package/dist/{api-request-CpMIaWDv.js → api-request-S6doJ_UF.js} +1 -1
  8. package/dist/{browser-interactive-control-controller-F4fljkmB.d.ts → browser-interactive-control-controller-BgHKZaE7.d.ts} +1 -1
  9. package/dist/{chunked-upload-5JAqrDnT.js → chunked-upload-DCdc8Nly.js} +2 -2
  10. package/dist/{chunked-upload-file-MijVbmg2.js → chunked-upload-file-M4sFHf5n.js} +1 -1
  11. package/dist/{client-DZE5kmbS.js → client-CUm9KHI8.js} +9 -9
  12. package/dist/{client-BZvv8K5i.d.ts → client-DtQu5U1z.d.ts} +5 -5
  13. package/dist/collaboration/index.js +1 -1
  14. package/dist/{collaboration-BudW_tuq.js → collaboration-9LAsWHvQ.js} +1 -1
  15. package/dist/{core-BIa-CuSj.js → core-Cqb0csUL.js} +3 -4
  16. package/dist/core.d.ts +6 -6
  17. package/dist/core.js +5 -5
  18. package/dist/{errors-D_kyWjb1.js → errors-DKIV20jZ.js} +37 -34
  19. package/dist/{file-download-CclrJZ6w.js → file-download-DnI_Z_Za.js} +1 -1
  20. package/dist/{index-CRURJxeK.d.ts → index-BZY242A9.d.ts} +5 -5
  21. package/dist/index.d.ts +9 -9
  22. package/dist/index.js +9 -9
  23. package/dist/intelligence/index.js +3 -3
  24. package/dist/interactive-control.d.ts +1 -1
  25. package/dist/{interactive-controller-Dlk3qIdd.js → interactive-controller-CbA-njUb.js} +3 -3
  26. package/dist/{interactive-controller-CS4ppPKD.d.ts → interactive-controller-DRUUUo4N.d.ts} +3 -3
  27. package/dist/{lines-0DF4MAoY.d.ts → lines-CmxWSizM.d.ts} +1 -1
  28. package/dist/{lines-Bj4jbNKO.js → lines-D3CdWX7Y.js} +1 -1
  29. package/dist/lines.d.ts +1 -1
  30. package/dist/lines.js +1 -1
  31. package/dist/{mcp-local-LfC9Qhyt.js → mcp-local-DrQMU1lu.js} +2 -2
  32. package/dist/{preview-Zu-XKRkA.d.ts → preview-DcjUC7Wh.d.ts} +3 -3
  33. package/dist/{public-templates-l8Xtonad.d.ts → public-templates-DV6L-Ndd.d.ts} +2 -2
  34. package/dist/public-templates.d.ts +1 -1
  35. package/dist/public-templates.js +1 -1
  36. package/dist/{raw-evidence-archive-gUL5fNkE.js → raw-evidence-archive-O1NFVYoU.js} +1 -1
  37. package/dist/runtime.d.ts +5 -5
  38. package/dist/runtime.js +4 -4
  39. package/dist/{sandbox-C4L7OUsF.js → sandbox-BApEp_7n.js} +17 -17
  40. package/dist/select-seat-command.d.ts +1 -1
  41. package/dist/select-seat-command.js +1 -1
  42. package/dist/tangle/index.d.ts +1 -1
  43. package/dist/tangle/index.js +1 -1
  44. package/dist/{tangle-BZELiaQ6.js → tangle-NAHKN48l.js} +2 -2
  45. package/dist/{terminal-stream-types-HvjaJGBC.d.ts → terminal-stream-types-Dy12OgR4.d.ts} +32 -30
  46. package/dist/{types-By-d4a-y.d.ts → types-CmvYNLKn.d.ts} +1 -1
  47. package/package.json +4 -4
package/README.md CHANGED
@@ -931,7 +931,12 @@ The main client provides `create`, `list`, `get`, `usage`, `subscription`, and `
931
931
  Its managers cover environments, public templates, teams, secrets, SSH keys, fleets, and intelligence reports.
932
932
  The published TypeScript declarations are the complete method and option reference.
933
933
 
934
- Handle SDK failures through the exported error hierarchy.
934
+ ### Errors
935
+
936
+ Every SDK failure is a `SandboxError`.
937
+ `code` is the code the server sent, or the SDK's own code for a client-side failure, exactly as before 1.0.191.
938
+ `catalogCode` is that code's entry in the platform error catalog (the same value when the catalog lists `code`; otherwise the catalog code its name or HTTP status maps to), and `status`, `retryable`, `nextStep` and `docs` come from that entry.
939
+ `wireCode` (1.0.191 to 1.0.195) is a deprecated alias of `code`; it and the deprecated subclasses such as `NotFoundError` are removed in 2.0.0.
935
940
 
936
941
  ```typescript
937
942
  import { SandboxError } from "@tangle-network/sandbox";
@@ -1,7 +1,7 @@
1
- import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-CRURJxeK.js";
2
- import { Bt as SandboxFleetParent, Ha as CodeExecutionResult, Ua as CodeLanguage, Ur as CodeExecutionOptions, Wa as CodeResultPart, ga as BackendConfig, ia as SessionListOptions, na as SessionInfo, wo as BackendType } from "../types-By-d4a-y.js";
3
- import { t as Sandbox } from "../client-BZvv8K5i.js";
4
- import { u as PreviewAuthorizer } from "../preview-Zu-XKRkA.js";
1
+ import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-BZY242A9.js";
2
+ import { Bt as SandboxFleetParent, Ha as CodeExecutionResult, Ua as CodeLanguage, Ur as CodeExecutionOptions, Wa as CodeResultPart, ga as BackendConfig, ia as SessionListOptions, na as SessionInfo, wo as BackendType } from "../types-CmvYNLKn.js";
3
+ import { t as Sandbox } from "../client-DtQu5U1z.js";
4
+ import { u as PreviewAuthorizer } from "../preview-DcjUC7Wh.js";
5
5
  import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
6
6
  import { JSONSchema } from "zod/v4/core";
7
7
  import { ToolSet } from "ai";
@@ -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-LfC9Qhyt.js";
2
- import { O as assertCurrentBackendType } from "../interactive-controller-Dlk3qIdd.js";
3
- import { t as SandboxInstance } from "../sandbox-C4L7OUsF.js";
4
- import { D as ValidationError, _ as NotFoundError, w as StateError } from "../errors-D_kyWjb1.js";
5
- import { t as Sandbox } from "../client-DZE5kmbS.js";
1
+ import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-DrQMU1lu.js";
2
+ import { O as assertCurrentBackendType } from "../interactive-controller-CbA-njUb.js";
3
+ import { t as SandboxInstance } from "../sandbox-BApEp_7n.js";
4
+ import { D as ValidationError, _ as NotFoundError, w as StateError } from "../errors-DKIV20jZ.js";
5
+ import { t as Sandbox } from "../client-CUm9KHI8.js";
6
6
  import { z } from "zod";
7
7
  //#region src/agent/instances.ts
8
8
  const managers = /* @__PURE__ */ new WeakMap();
@@ -1,2 +1,2 @@
1
- import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-Zu-XKRkA.js";
1
+ import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-DcjUC7Wh.js";
2
2
  export { AgentPreviewError, AgentPreviewOptions, PREVIEW_MCP_ALIAS, PREVIEW_TOOLS, PreviewAuthorizationRequest, PreviewAuthorizer, PreviewExecutionContext, PreviewTool, PublishAgentPreviewOptions, assertPreviewId, ensureAgentPreview, getAgentPreview, listAgentPreviews, previewOperationTool, previewToolsForProfile, publishAgentPreview, removeAgentPreview, resolveSelfSandbox, servePreviewMcp };
@@ -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-LfC9Qhyt.js").then((n) => n.n), import("@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js")]);
69
+ const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-DrQMU1lu.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,5 +1,5 @@
1
- import { V as InteractionRequest } from "./terminal-stream-types-HvjaJGBC.js";
2
- import { Di as SandboxEvent, _i as DurablePlanSnapshot, ci as AgentApprovalRequirement, di as AgentToolInvocation, li as AgentQuestionRequest, ui as AgentRunStatus } from "./types-By-d4a-y.js";
1
+ import { V as InteractionRequest } from "./terminal-stream-types-Dy12OgR4.js";
2
+ import { Di as SandboxEvent, _i as DurablePlanSnapshot, ci as AgentApprovalRequirement, di as AgentToolInvocation, li as AgentQuestionRequest, ui as AgentRunStatus } from "./types-CmvYNLKn.js";
3
3
 
4
4
  //#region src/agent-run-outcome.d.ts
5
5
  interface AgentRunOutcome {
@@ -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.196";
4
+ const SDK_VERSION = "1.0.197";
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 { A as AgentInteractiveSessionStatus, C as AgentInteractiveSessionAttach, E as AgentInteractiveSessionControlClaimRequest, T as AgentInteractiveSessionControlClaimAcknowledgement, i as TerminalStreamHandlers, k as AgentInteractiveSessionRef, w as AgentInteractiveSessionControlClaim } from "./terminal-stream-types-HvjaJGBC.js";
1
+ import { A as AgentInteractiveSessionStatus, C as AgentInteractiveSessionAttach, E as AgentInteractiveSessionControlClaimRequest, T as AgentInteractiveSessionControlClaimAcknowledgement, i as TerminalStreamHandlers, k as AgentInteractiveSessionRef, w as AgentInteractiveSessionControlClaim } from "./terminal-stream-types-Dy12OgR4.js";
2
2
 
3
3
  //#region src/interactive-types.d.ts
4
4
  /** Cancellation for an interactive SDK request. */
@@ -1,4 +1,4 @@
1
- import { S as SandboxError, n as isTransientWrite, r as parseErrorResponse } from "./errors-D_kyWjb1.js";
1
+ import { S as SandboxError, n as isTransientWrite, r as parseErrorResponse } from "./errors-DKIV20jZ.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
@@ -51,7 +51,7 @@ const RETRY_MAX_MS = 2e3;
51
51
  const DEFAULT_UPLOAD_CONCURRENCY = 4;
52
52
  const MAX_UPLOAD_CONCURRENCY = 8;
53
53
  function isChecksumMismatch(rejection) {
54
- return rejection instanceof SandboxError && rejection.wireCode === "CHECKSUM_MISMATCH";
54
+ return rejection instanceof SandboxError && rejection.code === "CHECKSUM_MISMATCH";
55
55
  }
56
56
  /** Cheap size probe used for the pre-flight cap check, read directly off
57
57
  * the input shape (`Blob.size` / `ArrayBuffer.byteLength` / view
@@ -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-5JAqrDnT.js";
2
+ import { a as planCompression, i as partCount, n as commitSession, o as putPart, r as initUploadSession, t as abortSession } from "./chunked-upload-DCdc8Nly.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-Dlk3qIdd.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-CbA-njUb.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-C4L7OUsF.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-D_kyWjb1.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-BApEp_7n.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-DKIV20jZ.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-CpMIaWDv.js";
7
+ import { n as fetchSandboxApi } from "./api-request-S6doJ_UF.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-Bj4jbNKO.js";
10
+ import { t as LinesClient } from "./lines-D3CdWX7Y.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
@@ -1921,7 +1921,7 @@ var SandboxCreation = class extends SandboxManagement {
1921
1921
  if (cause instanceof SandboxError) emitTiming(this.onTiming, {
1922
1922
  name: "sdk.retry",
1923
1923
  durMs: 0,
1924
- desc: `${cause.wireCode} retry-after=${cause.retryAfterMs ?? "none"}`,
1924
+ desc: `${cause.code} retry-after=${cause.retryAfterMs ?? "none"}`,
1925
1925
  path: "/v1/sandboxes",
1926
1926
  status: cause.status
1927
1927
  });
@@ -1933,7 +1933,7 @@ var SandboxCreation = class extends SandboxManagement {
1933
1933
  }
1934
1934
  const delayMs = createRetryDelayMs(cause, failedAttempt);
1935
1935
  if (cause instanceof SandboxError && delayMs >= deadline - Date.now()) {
1936
- if (proxyTimedOutCreate && cause.wireCode === "IDEMPOTENT_CREATE_IN_PROGRESS") throw createTimeoutError();
1936
+ if (proxyTimedOutCreate && cause.code === "IDEMPOTENT_CREATE_IN_PROGRESS") throw createTimeoutError();
1937
1937
  throw cause;
1938
1938
  }
1939
1939
  await sleepBeforeRetry(delayMs);
@@ -1944,7 +1944,7 @@ var SandboxCreation = class extends SandboxManagement {
1944
1944
  if (!isRetryableCreateError(error)) return true;
1945
1945
  if (options?.retry?.capacity === false && error instanceof SandboxError && error.code === "CAPACITY_EXHAUSTED") return true;
1946
1946
  if (isPacedCreateError(error)) return false;
1947
- if (proxyTimedOutCreate && error instanceof SandboxError && error.wireCode === "IDEMPOTENT_CREATE_IN_PROGRESS") return false;
1947
+ if (proxyTimedOutCreate && error instanceof SandboxError && error.code === "IDEMPOTENT_CREATE_IN_PROGRESS") return false;
1948
1948
  shortBudgetFailures += 1;
1949
1949
  return shortBudgetFailures >= 5;
1950
1950
  };
@@ -1971,7 +1971,7 @@ var SandboxCreation = class extends SandboxManagement {
1971
1971
  const error = parseErrorResponse(response.status, body, { allPreviousCreateAttemptsRefused }, response.headers);
1972
1972
  if (response.status === 524) proxyTimedOutCreate = true;
1973
1973
  allPreviousCreateAttemptsRefused = error.createFailureDisposition === "not-admitted";
1974
- if (error.wireCode === "SANDBOX_CREATE_RECONCILING" && lastServerError && lastServerError.wireCode !== "SANDBOX_CREATE_RECONCILING") throw lastServerError;
1974
+ if (error.code === "SANDBOX_CREATE_RECONCILING" && lastServerError && lastServerError.code !== "SANDBOX_CREATE_RECONCILING") throw lastServerError;
1975
1975
  lastServerError = error;
1976
1976
  if (requestOptions?.timeoutMs === void 0 && isCapacityShortageCreateError(error) && error.etaSeconds) {
1977
1977
  const until = Math.min(startedAt + CAPACITY_ETA_WAIT_MAX_MS, Date.now() + error.etaSeconds * 1e3 + CAPACITY_ETA_MARGIN_MS);
@@ -1,8 +1,8 @@
1
- import { A as TraceExportResult, H as MaterializeProfileFileMountsOptions, O as SandboxInstance, U as MaterializeProfileFileMountsResult, W as ProfileFileMountBox, j as TraceExportSink } from "./index-CRURJxeK.js";
2
- import { G as AgentProfileConfidential, J as AgentProfileMcpServer, K as AgentProfileConfigValue, U as AgentProfile, X as AgentProfileSeat, Y as AgentProfileMetadata, b as SandboxSizePreset, bt as SandboxError, c as MintInteractiveSessionTokenOptions, k as AgentInteractiveSessionRef, q as AgentProfileFileMount, u as ScopedToken } from "./terminal-stream-types-HvjaJGBC.js";
3
- import { $ as CreateSandboxFleetOptions, $t as SandboxFleetWorkspaceRestoreResult, A as SandboxIdentity, Bt as SandboxFleetParent, Ci as IntelligenceReportWindow, Di as SandboxEvent, Dn as SandboxResources, Ei as PromptResult, En as SandboxConfig, Et as SandboxFleetCostEstimate, Ft as SandboxFleetMachineRecord, Ga as ExecResult, Gr as ManagedProcessOptions, Gt as SandboxFleetToken, Ht as SandboxFleetPolicy, It as SandboxFleetMachineSpec, Jr as ManagedProcessRecord, Kr as ManagedProcessResumeOptions, Kt as SandboxFleetTraceBundle, Lt as SandboxFleetManifest, M as UsageInfo, Ma as GpuLeaseProviderName, Nt as SandboxFleetMachine, On as SandboxShapesInfo, Ot as SandboxFleetDispatchResponse, Pi as TurnBackendConfig, Q as AttachSandboxFleetMachineOptions, Qt as SandboxFleetWorkspaceReconcileResult, Ri as ConversationTurnOptions, St as SandboxFleetAgent, T as SshKeysManager, Ti as PromptOptions, Tn as CreateSandboxOptions, Tt as SandboxFleetArtifactSpec, Wr as ManagedProcessJobs, Wt as SandboxFleetSpend, X as FleetDriveTurnRequest, Xr as HttpClient, Xt as SandboxFleetUsage, Y as FleetDriveTurnOutcome, Yn as DownloadResult, Yr as ManagedProcessSpec, Yt as SandboxFleetTraceOptions, Z as TokenRefreshHandler, Zr as SdkTimingHook, _o as PublicBatchRunRequestInput, _t as ListSandboxFleetOptions, a as DeleteMatchingSandboxesResult, an as SandboxInfo, bi as IntelligenceReportBudget, bn as TeeAttestationResponse, bt as ReconcileSandboxFleetsOptions, cn as SandboxRunGeneration, ct as FleetDispatchResultBufferOptions, dt as FleetExecDispatchResult, en as SandboxFleetWorkspaceSnapshotResult, et as CreateSandboxFleetTokenOptions, fi as CreateIntelligenceReportOptions, ft as FleetMachineId, ga as BackendConfig, go as PublicBatchRunRequest, gt as FleetRunOptions, ht as FleetRunEvent, i as DeleteMatchingSandboxesOptions, it as FleetAgentResult, j as SubscriptionInfo, jn as SandboxShapePreset, jt as SandboxFleetInfo, kt as SandboxFleetDriverCapability, lt as FleetDispatchStreamOptions, mt as FleetPromptDispatchResult, nt as FleetAgentId, ot as FleetDispatchCancelResult, po as BatchResult, pt as FleetPromptDispatchOptions, qn as DownloadOptions, r as DeleteMatchingSandboxesFilter, si as BatchRunOptions, st as FleetDispatchResultBuffer, tn as ListSandboxOptions, tt as CreateSandboxFleetWithCoordinatorOptions, ut as FleetExecDispatchOptions, vt as ReapExpiredSandboxFleetsOptions, w as SecretsManager, wa as SecretBindingOptions, wi as PromptInputPart, wn as CreateRequestOptions, wr as SandboxEnvironment, wt as SandboxFleetArtifact, xi as IntelligenceReportCompareTo, xt as ReconcileSandboxFleetsResult, yi as IntelligenceReport, yn as TeeAttestationReport, yo as BatchEvent, yr as ExecOptions, yt as ReapExpiredSandboxFleetsResult, zi as ConversationTurnResult, zt as SandboxFleetOperationsSummary } from "./types-By-d4a-y.js";
4
- import { t as LinesClient } from "./lines-0DF4MAoY.js";
5
- import { a as PublicTemplatesClient } from "./public-templates-l8Xtonad.js";
1
+ import { A as TraceExportResult, H as MaterializeProfileFileMountsOptions, O as SandboxInstance, U as MaterializeProfileFileMountsResult, W as ProfileFileMountBox, j as TraceExportSink } from "./index-BZY242A9.js";
2
+ import { G as AgentProfileConfidential, J as AgentProfileMcpServer, K as AgentProfileConfigValue, U as AgentProfile, X as AgentProfileSeat, Y as AgentProfileMetadata, b as SandboxSizePreset, bt as SandboxError, c as MintInteractiveSessionTokenOptions, k as AgentInteractiveSessionRef, q as AgentProfileFileMount, u as ScopedToken } from "./terminal-stream-types-Dy12OgR4.js";
3
+ import { $ as CreateSandboxFleetOptions, $t as SandboxFleetWorkspaceRestoreResult, A as SandboxIdentity, Bt as SandboxFleetParent, Ci as IntelligenceReportWindow, Di as SandboxEvent, Dn as SandboxResources, Ei as PromptResult, En as SandboxConfig, Et as SandboxFleetCostEstimate, Ft as SandboxFleetMachineRecord, Ga as ExecResult, Gr as ManagedProcessOptions, Gt as SandboxFleetToken, Ht as SandboxFleetPolicy, It as SandboxFleetMachineSpec, Jr as ManagedProcessRecord, Kr as ManagedProcessResumeOptions, Kt as SandboxFleetTraceBundle, Lt as SandboxFleetManifest, M as UsageInfo, Ma as GpuLeaseProviderName, Nt as SandboxFleetMachine, On as SandboxShapesInfo, Ot as SandboxFleetDispatchResponse, Pi as TurnBackendConfig, Q as AttachSandboxFleetMachineOptions, Qt as SandboxFleetWorkspaceReconcileResult, Ri as ConversationTurnOptions, St as SandboxFleetAgent, T as SshKeysManager, Ti as PromptOptions, Tn as CreateSandboxOptions, Tt as SandboxFleetArtifactSpec, Wr as ManagedProcessJobs, Wt as SandboxFleetSpend, X as FleetDriveTurnRequest, Xr as HttpClient, Xt as SandboxFleetUsage, Y as FleetDriveTurnOutcome, Yn as DownloadResult, Yr as ManagedProcessSpec, Yt as SandboxFleetTraceOptions, Z as TokenRefreshHandler, Zr as SdkTimingHook, _o as PublicBatchRunRequestInput, _t as ListSandboxFleetOptions, a as DeleteMatchingSandboxesResult, an as SandboxInfo, bi as IntelligenceReportBudget, bn as TeeAttestationResponse, bt as ReconcileSandboxFleetsOptions, cn as SandboxRunGeneration, ct as FleetDispatchResultBufferOptions, dt as FleetExecDispatchResult, en as SandboxFleetWorkspaceSnapshotResult, et as CreateSandboxFleetTokenOptions, fi as CreateIntelligenceReportOptions, ft as FleetMachineId, ga as BackendConfig, go as PublicBatchRunRequest, gt as FleetRunOptions, ht as FleetRunEvent, i as DeleteMatchingSandboxesOptions, it as FleetAgentResult, j as SubscriptionInfo, jn as SandboxShapePreset, jt as SandboxFleetInfo, kt as SandboxFleetDriverCapability, lt as FleetDispatchStreamOptions, mt as FleetPromptDispatchResult, nt as FleetAgentId, ot as FleetDispatchCancelResult, po as BatchResult, pt as FleetPromptDispatchOptions, qn as DownloadOptions, r as DeleteMatchingSandboxesFilter, si as BatchRunOptions, st as FleetDispatchResultBuffer, tn as ListSandboxOptions, tt as CreateSandboxFleetWithCoordinatorOptions, ut as FleetExecDispatchOptions, vt as ReapExpiredSandboxFleetsOptions, w as SecretsManager, wa as SecretBindingOptions, wi as PromptInputPart, wn as CreateRequestOptions, wr as SandboxEnvironment, wt as SandboxFleetArtifact, xi as IntelligenceReportCompareTo, xt as ReconcileSandboxFleetsResult, yi as IntelligenceReport, yn as TeeAttestationReport, yo as BatchEvent, yr as ExecOptions, yt as ReapExpiredSandboxFleetsResult, zi as ConversationTurnResult, zt as SandboxFleetOperationsSummary } from "./types-CmvYNLKn.js";
4
+ import { t as LinesClient } from "./lines-CmxWSizM.js";
5
+ import { a as PublicTemplatesClient } from "./public-templates-DV6L-Ndd.js";
6
6
  import { z } from "zod";
7
7
 
8
8
  //#region src/backend-registry.d.ts
@@ -1,2 +1,2 @@
1
- import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-BudW_tuq.js";
1
+ import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-9LAsWHvQ.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-D_kyWjb1.js";
1
+ import { E as TimeoutError, g as NetworkError, r as parseErrorResponse } from "./errors-DKIV20jZ.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-C4L7OUsF.js";
3
- import { D as ValidationError, S as SandboxError, l as CapabilityError } from "./errors-D_kyWjb1.js";
2
+ import { Z as canonicalAgentProfileDigest } from "./sandbox-BApEp_7n.js";
3
+ import { D as ValidationError, S as SandboxError, l as CapabilityError } from "./errors-DKIV20jZ.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";
@@ -26,8 +26,7 @@ function chain(error) {
26
26
  }
27
27
  function sandboxFailureKind(error) {
28
28
  for (const cause of chain(error)) {
29
- const wire = cause.wireCode ?? cause.code;
30
- const code = typeof wire === "string" ? wire.toUpperCase() : "";
29
+ const code = String(cause.code ?? "").toUpperCase();
31
30
  if (LOST_CODES.has(code)) return "lost";
32
31
  if (BUDGET_CODES.has(code) || code.endsWith("_QUOTA_EXCEEDED")) return "budget";
33
32
  if (CAPACITY_CODES.has(code)) return "capacity";
package/dist/core.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { B as WorkspaceImages, O as SandboxInstance, V as ProfileFileDeliveryReport, z as WorkspaceImagePublishRequestOptions } from "./index-CRURJxeK.js";
2
- import { Ct as ServerError, Dt as TimeoutError, Ot as ValidationError, St as SandboxFailureDetail, _t as ProfileFileMountPathError, bt as SandboxError, gt as PartialFailureError, ht as NotFoundError, it as AuthError, mt as NetworkError, ot as CapabilityError, rt as parseErrorResponse, ut as FileWriteConflictError, vt as QuotaError, wt as StateError, xt as SandboxErrorJson } from "./terminal-stream-types-HvjaJGBC.js";
3
- import { En as SandboxConfig, Ga as ExecResult, Gr as ManagedProcessOptions, H as PreviewLinkInfo, Ia as WorkspaceImagePublishInput, In as NetworkConfig, Ja as SandboxEnvRecoveryView, Jr as ManagedProcessRecord, Kr as ManagedProcessResumeOptions, La as WorkspaceImagePublishResult, Ri as ConversationTurnOptions, Tn as CreateSandboxOptions, U as PreviewLinkManager, W as PreviewLinkWaitOptions, Wr as ManagedProcessJobs, Yr as ManagedProcessSpec, an as SandboxInfo, kn as SandboxStatus, oa as SessionMessageAdmission, qa as SandboxEnvRecovery, qr as ManagedProcessState, wi as PromptInputPart, yr as ExecOptions, zi as ConversationTurnResult } from "./types-By-d4a-y.js";
4
- import { D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, l as LineApplicationAttachOptions, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, t as LinesClient, w as LineNumberInventory, y as LineMember } from "./lines-0DF4MAoY.js";
5
- import { Ct as InstanceRestartingError, Dt as sandboxFailureKind, Et as SandboxFailureKind, St as InstanceRecord, Tt as InstancesClient, _t as gatewaySeatTransport, an as backendRegistryEntrySchema, bt as HostedInstance, cn as isBackendRegistryInteractionKind, ct as SandboxResolvedSeat, dt as SeatOwnerReply, en as BackendRegistryCapabilities, ft as SeatOwnerTransport, gt as createSelectSeat, ht as SeatSelectionRequest, in as backendRegistryCapabilitiesSchema, ln as parseBackendRegistryResponse, lt as SandboxSeatCredentials, mt as SeatSelectionError, nn as BackendRegistryInteractionKind, on as backendRegistryInteractionKindSchema, ot as ISOLATED_CREATION_ATTESTATION_VERSION, pt as SeatResolutionObservation, rn as BackendRegistryResponse, sn as backendRegistryResponseSchema, st as CreateSelectSeatOptions, t as Sandbox, tn as BackendRegistryEntry, un as parseBackendRegistryResponseBody, ut as SandboxSeatSelectionInput, vt as ManagedProcessClient, xt as InstanceProfile, yt as EnsureInstanceOptions } from "./client-BZvv8K5i.js";
6
- import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-l8Xtonad.js";
1
+ import { B as WorkspaceImages, O as SandboxInstance, V as ProfileFileDeliveryReport, z as WorkspaceImagePublishRequestOptions } from "./index-BZY242A9.js";
2
+ import { Ct as ServerError, Dt as TimeoutError, Ot as ValidationError, St as SandboxFailureDetail, _t as ProfileFileMountPathError, bt as SandboxError, gt as PartialFailureError, ht as NotFoundError, it as AuthError, mt as NetworkError, ot as CapabilityError, rt as parseErrorResponse, ut as FileWriteConflictError, vt as QuotaError, wt as StateError, xt as SandboxErrorJson } from "./terminal-stream-types-Dy12OgR4.js";
3
+ import { En as SandboxConfig, Ga as ExecResult, Gr as ManagedProcessOptions, H as PreviewLinkInfo, Ia as WorkspaceImagePublishInput, In as NetworkConfig, Ja as SandboxEnvRecoveryView, Jr as ManagedProcessRecord, Kr as ManagedProcessResumeOptions, La as WorkspaceImagePublishResult, Ri as ConversationTurnOptions, Tn as CreateSandboxOptions, U as PreviewLinkManager, W as PreviewLinkWaitOptions, Wr as ManagedProcessJobs, Yr as ManagedProcessSpec, an as SandboxInfo, kn as SandboxStatus, oa as SessionMessageAdmission, qa as SandboxEnvRecovery, qr as ManagedProcessState, wi as PromptInputPart, yr as ExecOptions, zi as ConversationTurnResult } from "./types-CmvYNLKn.js";
4
+ import { D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, l as LineApplicationAttachOptions, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, t as LinesClient, w as LineNumberInventory, y as LineMember } from "./lines-CmxWSizM.js";
5
+ import { Ct as InstanceRestartingError, Dt as sandboxFailureKind, Et as SandboxFailureKind, St as InstanceRecord, Tt as InstancesClient, _t as gatewaySeatTransport, an as backendRegistryEntrySchema, bt as HostedInstance, cn as isBackendRegistryInteractionKind, ct as SandboxResolvedSeat, dt as SeatOwnerReply, en as BackendRegistryCapabilities, ft as SeatOwnerTransport, gt as createSelectSeat, ht as SeatSelectionRequest, in as backendRegistryCapabilitiesSchema, ln as parseBackendRegistryResponse, lt as SandboxSeatCredentials, mt as SeatSelectionError, nn as BackendRegistryInteractionKind, on as backendRegistryInteractionKindSchema, ot as ISOLATED_CREATION_ATTESTATION_VERSION, pt as SeatResolutionObservation, rn as BackendRegistryResponse, sn as backendRegistryResponseSchema, st as CreateSelectSeatOptions, t as Sandbox, tn as BackendRegistryEntry, un as parseBackendRegistryResponseBody, ut as SandboxSeatSelectionInput, vt as ManagedProcessClient, xt as InstanceProfile, yt as EnsureInstanceOptions } from "./client-DtQu5U1z.js";
6
+ import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-DV6L-Ndd.js";
7
7
  export { AuthError, BackendRegistryCapabilities, BackendRegistryEntry, BackendRegistryInteractionKind, BackendRegistryResponse, CapabilityError, ConversationTurnOptions, ConversationTurnResult, CreateSandboxOptions, CreateSelectSeatOptions, EnsureInstanceOptions, ExecOptions, ExecResult, FileWriteConflictError, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, InstanceProfile, InstanceRecord, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, Line, LineAgentRolePolicy, LineApplication, LineApplicationAttachOptions, LineApplicationRequest, LineApplicationResult, LineApplicationState, LineApplicationView, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineImage, LineInstanceAttachOptions, LineInstanceCreate, LineMember, LineMemberInstance, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyCode, LineReplyCodeInput, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LinesClient, ManagedProcessClient, ManagedProcessJobs, ManagedProcessOptions, ManagedProcessRecord, ManagedProcessResumeOptions, ManagedProcessSpec, ManagedProcessState, NetworkConfig, NetworkError, NotFoundError, PartialFailureError, PreviewLinkInfo, PreviewLinkManager, PreviewLinkWaitOptions, ProfileFileDeliveryReport, ProfileFileMountPathError, PromptInputPart, PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient, QuotaError, Sandbox, SandboxConfig, SandboxEnvRecovery, SandboxEnvRecoveryView, SandboxError, SandboxErrorJson, SandboxFailureDetail, SandboxFailureKind, SandboxInfo, SandboxInstance, SandboxResolvedSeat, SandboxSeatCredentials, SandboxSeatSelectionInput, SandboxStatus, SeatOwnerReply, SeatOwnerTransport, SeatResolutionObservation, SeatSelectionError, SeatSelectionRequest, ServerError, SessionMessageAdmission, StateError, TimeoutError, ValidationError, WorkspaceImagePublishInput, WorkspaceImagePublishRequestOptions, WorkspaceImagePublishResult, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, createSelectSeat, gatewaySeatTransport, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference, sandboxFailureKind };
package/dist/core.js CHANGED
@@ -1,7 +1,7 @@
1
- import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-C4L7OUsF.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-D_kyWjb1.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-DZE5kmbS.js";
4
- import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-Bj4jbNKO.js";
1
+ import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-BApEp_7n.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-DKIV20jZ.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-CUm9KHI8.js";
4
+ import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-D3CdWX7Y.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-BIa-CuSj.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-Cqb0csUL.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 };
@@ -132,9 +132,8 @@ function catalogEntry(code) {
132
132
  /**
133
133
  * Sandbox SDK Errors
134
134
  *
135
- * One error class, `SandboxError`. Its `code` is the catalog's `ErrorCode`
136
- * (the runtime contracts' error catalog), and `status`,
137
- * `retryable` and `nextStep` come from that code's catalog entry.
135
+ * One error class, `SandboxError`: `code` is the code the server sent, and
136
+ * `catalogCode` its catalog `ErrorCode`, whose entry gives `status`, `retryable` and `nextStep`.
138
137
  */
139
138
  const STATUS_CODE = {
140
139
  400: "VALIDATION_ERROR",
@@ -180,15 +179,15 @@ function catalogCode(wireCode, status, fallback = "INTERNAL_ERROR") {
180
179
  return NAME_CODE.find(([pattern]) => pattern.test(wireCode))?.[1] ?? (status === void 0 ? void 0 : STATUS_CODE[status]) ?? fallback;
181
180
  }
182
181
  /**
183
- * The one SDK error. `code` is the catalog code callers branch on; `wireCode`
184
- * is the code the server sent (it differs while servers still send
185
- * pre-catalog codes). `retryable` is the catalog's verdict on whether a later
186
- * retry can succeed, and `nextStep` is what the caller does about it.
182
+ * The one SDK error. `code` is the code the server sent, or the SDK's own
183
+ * code for a client-side failure; `catalogCode` is its catalog code (equal
184
+ * when the catalog lists `code`). `retryable` is the catalog's verdict on
185
+ * whether a later retry can succeed, and `nextStep` is what the caller does.
187
186
  */
188
187
  var SandboxError = class extends Error {
189
188
  code;
190
- wireCode;
191
- /** HTTP status the server answered, else the catalog status of `code`. */
189
+ catalogCode;
190
+ /** HTTP status the server answered, else the catalog status of `catalogCode`. */
192
191
  status;
193
192
  retryable;
194
193
  nextStep;
@@ -265,9 +264,9 @@ var SandboxError = class extends Error {
265
264
  const { code, status, cause, ...fields } = metadata;
266
265
  super(message, cause === void 0 ? void 0 : { cause });
267
266
  const fallback = ALIAS_CODE.get(new.target) ?? "INTERNAL_ERROR";
268
- this.wireCode = code ?? (status === void 0 ? void 0 : STATUS_CODE[status]) ?? fallback;
269
- this.code = catalogCode(this.wireCode, status, fallback);
270
- const entry = catalogEntry(this.code);
267
+ this.code = code ?? (status === void 0 ? void 0 : STATUS_CODE[status]) ?? fallback;
268
+ this.catalogCode = catalogCode(this.code, status, fallback);
269
+ const entry = catalogEntry(this.catalogCode);
271
270
  this.status = status ?? entry.status;
272
271
  this.retryable = entry.retryable;
273
272
  this.nextStep = entry.nextStep;
@@ -275,52 +274,56 @@ var SandboxError = class extends Error {
275
274
  Object.assign(this, fields);
276
275
  this.name = new.target.name;
277
276
  }
277
+ /** @deprecated Shipped in 1.0.191–1.0.195; removed in 2.0.0. Read `code`. */
278
+ get wireCode() {
279
+ return this.code;
280
+ }
278
281
  };
279
- /** @deprecated Removed in 0.62; check `code === "UNAUTHORIZED"`. */
282
+ /** @deprecated Removed in 2.0.0; check `catalogCode === "UNAUTHORIZED"`. */
280
283
  var AuthError = class extends SandboxError {};
281
- /** @deprecated Removed in 0.62; check `code === "NOT_FOUND"`. */
284
+ /** @deprecated Removed in 2.0.0; check `catalogCode === "NOT_FOUND"`. */
282
285
  var NotFoundError = class extends SandboxError {};
283
- /** @deprecated Removed in 0.62; check `code === "QUOTA_EXCEEDED"` or `"RATE_LIMITED"`. */
286
+ /** @deprecated Removed in 2.0.0; check `catalogCode === "QUOTA_EXCEEDED"` or `"RATE_LIMITED"`. */
284
287
  var QuotaError = class extends SandboxError {};
285
- /** @deprecated Removed in 0.62; check `code === "UNSUPPORTED"` or `"FEATURE_DISABLED"`. */
288
+ /** @deprecated Removed in 2.0.0; check `catalogCode === "UNSUPPORTED"` or `"FEATURE_DISABLED"`. */
286
289
  var CapabilityError = class extends SandboxError {};
287
- /** @deprecated Removed in 0.62; check `wireCode === "GPU_PROVIDER_NOT_CONFIGURED"`. */
290
+ /** @deprecated Removed in 2.0.0; check `code === "GPU_PROVIDER_NOT_CONFIGURED"`. */
288
291
  var GpuProviderNotConfiguredError = class extends CapabilityError {};
289
- /** @deprecated Removed in 0.62; check `wireCode` for `COMPLIANCE_NOT_ENTITLED` or `COMPLIANCE_CELL_UNAVAILABLE`. */
292
+ /** @deprecated Removed in 2.0.0; check `code` for `COMPLIANCE_NOT_ENTITLED` or `COMPLIANCE_CELL_UNAVAILABLE`. */
290
293
  var CompliancePlacementError = class extends SandboxError {};
291
- /** @deprecated Removed in 0.62; read `failures`. */
294
+ /** @deprecated Removed in 2.0.0; read `failures`. */
292
295
  var PartialFailureError = class extends SandboxError {};
293
- /** @deprecated Removed in 0.62; check `code === "VALIDATION_ERROR"`. */
296
+ /** @deprecated Removed in 2.0.0; check `catalogCode === "VALIDATION_ERROR"`. */
294
297
  var ValidationError = class extends SandboxError {};
295
- /** @deprecated Removed in 0.62; check `wireCode` and read `path`. */
298
+ /** @deprecated Removed in 2.0.0; check `code` and read `path`. */
296
299
  var ProfileFileMountPathError = class extends SandboxError {};
297
- /** @deprecated Removed in 0.62; check `code === "INVALID_STATE"`. */
300
+ /** @deprecated Removed in 2.0.0; check `catalogCode === "INVALID_STATE"`. */
298
301
  var StateError = class extends SandboxError {};
299
- /** @deprecated Removed in 0.62; check `wireCode === "EDGE_NOT_READY"`. */
302
+ /** @deprecated Removed in 2.0.0; check `code === "EDGE_NOT_READY"`. */
300
303
  var EdgeNotReadyError = class extends SandboxError {};
301
- /** @deprecated Removed in 0.62; check `wireCode === "FILE_WRITE_CONFLICT"`. */
304
+ /** @deprecated Removed in 2.0.0; check `code === "FILE_WRITE_CONFLICT"`. */
302
305
  var FileWriteConflictError = class extends SandboxError {};
303
- /** @deprecated Removed in 0.62; check `wireCode === "KEY_BUDGET_EXHAUSTED"`. */
306
+ /** @deprecated Removed in 2.0.0; check `code === "KEY_BUDGET_EXHAUSTED"`. */
304
307
  var KeyBudgetExhaustedError = class extends SandboxError {};
305
- /** @deprecated Removed in 0.62; check `code === "EGRESS_PROXY_RECOVERY_REQUIRED"`. */
308
+ /** @deprecated Removed in 2.0.0; check `code === "EGRESS_PROXY_RECOVERY_REQUIRED"`. */
306
309
  var EgressProxyRecoveryError = class extends SandboxError {};
307
- /** @deprecated Removed in 0.62; check `wireCode === "RESUME_ENV_REQUIRED"` and read `missingEnvKeys`. */
310
+ /** @deprecated Removed in 2.0.0; check `code === "RESUME_ENV_REQUIRED"` and read `missingEnvKeys`. */
308
311
  var ResumeEnvRequiredError = class extends SandboxError {};
309
- /** @deprecated Removed in 0.62; check `wireCode === "BRANCH_FANOUT_EXCEEDS_HOST"` and read `maxChildren`. */
312
+ /** @deprecated Removed in 2.0.0; check `code === "BRANCH_FANOUT_EXCEEDS_HOST"` and read `maxChildren`. */
310
313
  var BranchFanoutExceedsHostError = class extends SandboxError {};
311
- /** @deprecated Removed in 0.62; check `code === "TIMEOUT"`. */
314
+ /** @deprecated Removed in 2.0.0; check `catalogCode === "TIMEOUT"`. */
312
315
  var TimeoutError = class extends SandboxError {};
313
- /** @deprecated Removed in 0.62; check `code === "NETWORK_ERROR"`. */
316
+ /** @deprecated Removed in 2.0.0; check `catalogCode === "NETWORK_ERROR"`. */
314
317
  var NetworkError = class extends SandboxError {};
315
318
  /**
316
319
  * The stream of an admitted execution ended without its terminal event and
317
320
  * the SDK could not rejoin it. The outcome is UNKNOWN, never a failure
318
321
  * verdict: rejoin with `streamPrompt(message, { executionId, lastEventId,
319
322
  * sessionId })`, or read the session status.
320
- * @deprecated Removed in 0.62; check `code === "STREAM_INTERRUPTED"`.
323
+ * @deprecated Removed in 2.0.0; check `code === "STREAM_INTERRUPTED"`.
321
324
  */
322
325
  var StreamInterruptedError = class extends SandboxError {};
323
- /** @deprecated Removed in 0.62; check `status >= 500`. */
326
+ /** @deprecated Removed in 2.0.0; check `status >= 500`. */
324
327
  var ServerError = class extends SandboxError {};
325
328
  /** Each alias, its default code, and the wire codes the parse point builds it for. */
326
329
  const ALIASES = [
@@ -578,10 +581,10 @@ function readResponseJson(response) {
578
581
  });
579
582
  }
580
583
  /**
581
- * A terminal protocol `error` frame (`wireCode` is its protocol code, e.g.
584
+ * A terminal protocol `error` frame (`code` is its protocol code, e.g.
582
585
  * `INIT_FAILED`) or a socket fault (`TRANSPORT`). `beforeOpen` is true when
583
586
  * the socket never reached OPEN, so no PTY work started on this dial.
584
- * @deprecated Removed in 0.62; check `code`.
587
+ * @deprecated Removed in 2.0.0; check `code`.
585
588
  */
586
589
  var TerminalStreamError = class extends SandboxError {};
587
590
  //#endregion
@@ -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-D_kyWjb1.js";
2
+ import { D as ValidationError } from "./errors-DKIV20jZ.js";
3
3
  //#region src/lib/file-download.ts
4
4
  function downloadBounds(options) {
5
5
  for (const [name, value] of Object.entries({
@@ -1,9 +1,9 @@
1
- import { $ as ProxySecretReceipt, At as SandboxCreateReceipt, B as InteractionAcknowledgement, C as AgentInteractiveSessionAttach, D as AgentInteractiveSessionPromptAcknowledgement, E as AgentInteractiveSessionControlClaimRequest, F as TerminalOutputEvent, H as InteractionResponseCommand, I as TerminalReplayWindow, M as AgentInteractiveSessionStopCommand, N as AgentInteractiveTerminalSession, O as AgentInteractiveSessionPromptCommand, R as AgentRunCancellationAcknowledgement, S as AgentInteractiveSessionStart, T as AgentInteractiveSessionControlClaimAcknowledgement, U as AgentProfile, V as InteractionRequest, bt as SandboxError, et as InteractionData, g as TerminalReadyInfo, i as TerminalStreamHandlers, j as AgentInteractiveSessionStopAcknowledgement, k as AgentInteractiveSessionRef, l as MintScopedTokenOptions, o as TerminalStreamReconnectAuthority, q as AgentProfileFileMount, u as ScopedToken, w as AgentInteractiveSessionControlClaim, z as AgentRunCancellationRequest } from "./terminal-stream-types-HvjaJGBC.js";
2
- import { $a as RawEvidenceBoxDirectoryExport, $r as ForkCounts, An as SandboxShape, Ar as DriverInfo, Bi as CreateSessionOptions, C as WorkspaceOperationLookup, Ci as IntelligenceReportWindow, Cn as TerminalStream, D as ProvisionResult, Di as SandboxEvent, E as ProvisionEvent, Ei as PromptResult, Fi as CommitTaskSessionOptions, Fn as EgressManager, G as GitBranch, Ga as ExecResult, Gi as ListMessagesOptions, Ha as CodeExecutionResult, Hi as DispatchPromptOptions, Ia as WorkspaceImagePublishInput, J as GitStatus, Ja as SandboxEnvRecoveryView, Ji as SendSessionMessageRequest, K as GitCommit, Ka as WriteFileRequest, Ki as PublicProfileConflict, Kt as SandboxFleetTraceBundle, La as WorkspaceImagePublishResult, Li as CompletedTurnResult, Ln as NetworkManager, Lr as GpuLeaseManager, Mi as SandboxTraceOptions, Mn as SandboxResourceUsage, Mr as GpuLease, N as WaitForOptions, Nn as SandboxRuntimeCapabilities, Pi as TurnBackendConfig, Qi as SessionExecutionInfo, Qr as BranchOptions, Ri as ConversationTurnOptions, S as StopOptions, Sn as TeePublicKeyResponse, Ti as PromptOptions, Tn as CreateSandboxOptions, U as PreviewLinkManager, Ua as CodeLanguage, Ui as DispatchedSession, Ur as CodeExecutionOptions, Vi as CreateTaskSessionOptions, Wi as DriveTurnOptions, Xa as RawEvidenceArchiveManifest, Xr as HttpClient, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, _ as SnapshotInfo, _r as SearchMatch, aa as SessionMessage, ai as WaitForRolloutOptions, an as SandboxInfo, bi as IntelligenceReportBudget, bn as TeeAttestationResponse, c as SandboxDeleteOptions, ca as SessionResultOptions, co as InteractionResolutionAcknowledgement, cr as FileWriteResult, d as SandboxOperationKind, ei as ForkIdempotency, eo as RawEvidenceBoxExportOptions, f as SandboxOperationState, fa as TaskSessionInfo, ga as BackendConfig, gn as StartupDiagnostics, gr as WriteManyOptions, hi as DurablePlanDecisionResult, hn as SandboxTerminals, hr as WriteManyFile, ia as SessionListOptions, ii as RolloutStartResult, in as SandboxConnection, k as ResumeOptions, ki as SandboxTraceBundle, kn as SandboxStatus, la as TaskSessionChanges, ln as SandboxRuntimeHealth, m as SnapshotDeleteAcknowledgement, ma as TurnDriveResult, mi as DurablePlanDecisionOptions, mr as WriteFileOptions, na as SessionInfo, ni as Rollout, nn as SSHCommandDescriptor, no as RawEvidenceExportOptions, nr as FileSystem, o as RestoreSnapshotOptions, oa as SessionMessageAdmission, on as SandboxPortBinding, oo as RawEvidenceUnavailable, pi as DurablePlan, q as GitDiff, qa as SandboxEnvRecovery, qi as SendSessionMessageOptions, ra as SessionInterruptOptions, ri as RolloutOptions, rn as SSHCredentials, s as SandboxDeleteAcknowledgement, ta as SessionForkOptions, ti as ForkLookupOptions, to as RawEvidenceDirectoryExport, u as SandboxOperationInfo, ua as TaskSessionCommitResult, un as SandboxTerminalAttachOptions, v as SnapshotOptions, va as BackendManager, vi as EventStreamOptions, vn as TeeAttestationOptions, vr as SearchOptions, wi as PromptInputPart, x as SnapshotResult, xi as IntelligenceReportCompareTo, y as SnapshotProvenance, yi as IntelligenceReport, yr as ExecOptions, z as ProcessManager, zi as ConversationTurnResult } from "./types-By-d4a-y.js";
1
+ import { $ as ProxySecretReceipt, At as SandboxCreateReceipt, B as InteractionAcknowledgement, C as AgentInteractiveSessionAttach, D as AgentInteractiveSessionPromptAcknowledgement, E as AgentInteractiveSessionControlClaimRequest, F as TerminalOutputEvent, H as InteractionResponseCommand, I as TerminalReplayWindow, M as AgentInteractiveSessionStopCommand, N as AgentInteractiveTerminalSession, O as AgentInteractiveSessionPromptCommand, R as AgentRunCancellationAcknowledgement, S as AgentInteractiveSessionStart, T as AgentInteractiveSessionControlClaimAcknowledgement, U as AgentProfile, V as InteractionRequest, bt as SandboxError, et as InteractionData, g as TerminalReadyInfo, i as TerminalStreamHandlers, j as AgentInteractiveSessionStopAcknowledgement, k as AgentInteractiveSessionRef, l as MintScopedTokenOptions, o as TerminalStreamReconnectAuthority, q as AgentProfileFileMount, u as ScopedToken, w as AgentInteractiveSessionControlClaim, z as AgentRunCancellationRequest } from "./terminal-stream-types-Dy12OgR4.js";
2
+ import { $a as RawEvidenceBoxDirectoryExport, $r as ForkCounts, An as SandboxShape, Ar as DriverInfo, Bi as CreateSessionOptions, C as WorkspaceOperationLookup, Ci as IntelligenceReportWindow, Cn as TerminalStream, D as ProvisionResult, Di as SandboxEvent, E as ProvisionEvent, Ei as PromptResult, Fi as CommitTaskSessionOptions, Fn as EgressManager, G as GitBranch, Ga as ExecResult, Gi as ListMessagesOptions, Ha as CodeExecutionResult, Hi as DispatchPromptOptions, Ia as WorkspaceImagePublishInput, J as GitStatus, Ja as SandboxEnvRecoveryView, Ji as SendSessionMessageRequest, K as GitCommit, Ka as WriteFileRequest, Ki as PublicProfileConflict, Kt as SandboxFleetTraceBundle, La as WorkspaceImagePublishResult, Li as CompletedTurnResult, Ln as NetworkManager, Lr as GpuLeaseManager, Mi as SandboxTraceOptions, Mn as SandboxResourceUsage, Mr as GpuLease, N as WaitForOptions, Nn as SandboxRuntimeCapabilities, Pi as TurnBackendConfig, Qi as SessionExecutionInfo, Qr as BranchOptions, Ri as ConversationTurnOptions, S as StopOptions, Sn as TeePublicKeyResponse, Ti as PromptOptions, Tn as CreateSandboxOptions, U as PreviewLinkManager, Ua as CodeLanguage, Ui as DispatchedSession, Ur as CodeExecutionOptions, Vi as CreateTaskSessionOptions, Wi as DriveTurnOptions, Xa as RawEvidenceArchiveManifest, Xr as HttpClient, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, _ as SnapshotInfo, _r as SearchMatch, aa as SessionMessage, ai as WaitForRolloutOptions, an as SandboxInfo, bi as IntelligenceReportBudget, bn as TeeAttestationResponse, c as SandboxDeleteOptions, ca as SessionResultOptions, co as InteractionResolutionAcknowledgement, cr as FileWriteResult, d as SandboxOperationKind, ei as ForkIdempotency, eo as RawEvidenceBoxExportOptions, f as SandboxOperationState, fa as TaskSessionInfo, ga as BackendConfig, gn as StartupDiagnostics, gr as WriteManyOptions, hi as DurablePlanDecisionResult, hn as SandboxTerminals, hr as WriteManyFile, ia as SessionListOptions, ii as RolloutStartResult, in as SandboxConnection, k as ResumeOptions, ki as SandboxTraceBundle, kn as SandboxStatus, la as TaskSessionChanges, ln as SandboxRuntimeHealth, m as SnapshotDeleteAcknowledgement, ma as TurnDriveResult, mi as DurablePlanDecisionOptions, mr as WriteFileOptions, na as SessionInfo, ni as Rollout, nn as SSHCommandDescriptor, no as RawEvidenceExportOptions, nr as FileSystem, o as RestoreSnapshotOptions, oa as SessionMessageAdmission, on as SandboxPortBinding, oo as RawEvidenceUnavailable, pi as DurablePlan, q as GitDiff, qa as SandboxEnvRecovery, qi as SendSessionMessageOptions, ra as SessionInterruptOptions, ri as RolloutOptions, rn as SSHCredentials, s as SandboxDeleteAcknowledgement, ta as SessionForkOptions, ti as ForkLookupOptions, to as RawEvidenceDirectoryExport, u as SandboxOperationInfo, ua as TaskSessionCommitResult, un as SandboxTerminalAttachOptions, v as SnapshotOptions, va as BackendManager, vi as EventStreamOptions, vn as TeeAttestationOptions, vr as SearchOptions, wi as PromptInputPart, x as SnapshotResult, xi as IntelligenceReportCompareTo, y as SnapshotProvenance, yi as IntelligenceReport, yr as ExecOptions, z as ProcessManager, zi as ConversationTurnResult } from "./types-CmvYNLKn.js";
3
3
  import { t as CliAuthReference } from "./cli-auth-bundle-Wg3x2hd2.js";
4
- import { n as SandboxLines } from "./lines-0DF4MAoY.js";
5
- import { _ as InteractiveSessionStatus, f as InteractiveAttachOptions, g as InteractiveRequestOptions, h as InteractiveObserveOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-F4fljkmB.js";
6
- import { r as InteractiveAttachRequest } from "./interactive-controller-CS4ppPKD.js";
4
+ import { n as SandboxLines } from "./lines-CmxWSizM.js";
5
+ import { _ as InteractiveSessionStatus, f as InteractiveAttachOptions, g as InteractiveRequestOptions, h as InteractiveObserveOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-BgHKZaE7.js";
6
+ import { r as InteractiveAttachRequest } from "./interactive-controller-DRUUUo4N.js";
7
7
  import { z } from "zod";
8
8
  import { OtlpTraceExport } from "@tangle-network/agent-trace-contract/otlp";
9
9