@tangle-network/sandbox 0.38.1 → 0.39.0

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 (35) hide show
  1. package/dist/agent/index.d.ts +3 -3
  2. package/dist/agent/index.js +4 -4
  3. package/dist/{agent-run-outcome-Bq1aHHPy.d.ts → agent-run-outcome-oEXhCh-O.d.ts} +1 -1
  4. package/dist/auth/index.d.ts +2 -2
  5. package/dist/auth/index.js +2 -1
  6. package/dist/{browser-interactive-control-controller-lRfzpg9t.d.ts → browser-interactive-control-controller-BELrFH4f.d.ts} +1 -1
  7. package/dist/cli-auth-bundle-DUsK57rK.js +25 -0
  8. package/dist/{client-eGeDzgEf.d.ts → client-CXb0D47L.d.ts} +13 -4
  9. package/dist/{client-mqBSqcXd.js → client-CfAcCFQh.js} +98 -13
  10. package/dist/collaboration/index.d.ts +1 -1
  11. package/dist/collaboration/index.js +1 -1
  12. package/dist/{collaboration-DQD9kCdN.js → collaboration-BKHF1SP8.js} +1 -1
  13. package/dist/core.d.ts +4 -4
  14. package/dist/core.js +3 -3
  15. package/dist/{errors-C6kn-3zt.js → errors-DrJySZQG.js} +30 -4
  16. package/dist/{errors-CQOvGddH.d.ts → errors-rp1GiVzL.d.ts} +23 -2
  17. package/dist/{index-Dace0mEd.d.ts → index-B88RBB1S.d.ts} +2 -2
  18. package/dist/{index-Bq_z_u6A.d.ts → index-C_2tEmR1.d.ts} +10 -1
  19. package/dist/index.d.ts +31 -32
  20. package/dist/index.js +7 -7
  21. package/dist/intelligence/index.js +1 -1
  22. package/dist/interactive-control.d.ts +1 -1
  23. package/dist/{local-cli-auth-CJmSpTjk.js → local-cli-auth-BAJuMBZU.js} +7 -5
  24. package/dist/{runtime-api-BcLo4lBU.js → runtime-api-B8uIpISe.js} +27 -3
  25. package/dist/runtime.d.ts +3 -3
  26. package/dist/runtime.js +2 -2
  27. package/dist/{sandbox-mTNH1V-j.js → sandbox-BwUEeVkk.js} +21 -5
  28. package/dist/{sandbox-DdaYTq_N.d.ts → sandbox-EqAbiXhz.d.ts} +11 -4
  29. package/dist/tangle/index.d.ts +1 -1
  30. package/dist/tangle/index.js +1 -1
  31. package/dist/{tangle-DtOSgw8n.js → tangle-BPlbGnxF.js} +2 -2
  32. package/dist/{types-DTDI3kek.d.ts → types-CVrkDpOF.d.ts} +6 -2
  33. package/package.json +5 -5
  34. /package/dist/{index-CMLW3u5K.d.ts → index-BzAxTiqF.d.ts} +0 -0
  35. /package/dist/{terminal-stream-5GNLCsms.d.ts → terminal-stream-CcaBTVg3.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
- import { g as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-DdaYTq_N.js";
2
- import { D as CodeExecutionResult, E as CodeExecutionOptions, O as CodeLanguage, Si as SessionListOptions, bi as SessionInfo, d as BackendConfig, k as CodeResultPart } from "../types-DTDI3kek.js";
3
- import { i as Sandbox } from "../client-eGeDzgEf.js";
1
+ import { g as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-EqAbiXhz.js";
2
+ import { D as CodeExecutionResult, E as CodeExecutionOptions, O as CodeLanguage, Si as SessionListOptions, bi as SessionInfo, d as BackendConfig, k as CodeResultPart } from "../types-CVrkDpOF.js";
3
+ import { i as Sandbox } from "../client-CXb0D47L.js";
4
4
  import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
5
5
 
6
6
  //#region src/agent/instances.d.ts
@@ -1,7 +1,7 @@
1
- import { f as assertCurrentBackendType } from "../runtime-api-BcLo4lBU.js";
2
- import { d as StateError, o as NotFoundError, p as ValidationError } from "../errors-C6kn-3zt.js";
3
- import { n as Sandbox } from "../client-mqBSqcXd.js";
4
- import { t as SandboxInstance } from "../sandbox-mTNH1V-j.js";
1
+ import { f as assertCurrentBackendType } from "../runtime-api-B8uIpISe.js";
2
+ import { f as StateError, m as ValidationError, s as NotFoundError } from "../errors-DrJySZQG.js";
3
+ import { n as Sandbox } from "../client-CfAcCFQh.js";
4
+ import { t as SandboxInstance } from "../sandbox-BwUEeVkk.js";
5
5
  import { createRequire } from "node:module";
6
6
  //#region src/agent/instances.ts
7
7
  const managers = /* @__PURE__ */ new WeakMap();
@@ -1,4 +1,4 @@
1
- import { a as AgentQuestionRequest, et as DurablePlanSnapshot, fr as SandboxEvent, i as AgentApprovalRequirement, o as AgentRunStatus, s as AgentToolInvocation } from "./types-DTDI3kek.js";
1
+ import { a as AgentQuestionRequest, et as DurablePlanSnapshot, fr as SandboxEvent, i as AgentApprovalRequirement, o as AgentRunStatus, s as AgentToolInvocation } from "./types-CVrkDpOF.js";
2
2
  import { InteractionRequest } from "@tangle-network/agent-interface";
3
3
 
4
4
  //#region src/agent-run-outcome.d.ts
@@ -1,2 +1,2 @@
1
- import { _ as ReadTokenPayload, a as issueCollaborationToken, c as issueSessionScopedToken, d as AnyTokenPayload, f as BatchScopedTokenPayload, g as ProjectScopedTokenPayload, h as IssueCollaborationTokenOptions, i as issueBatchScopedToken, l as unsafeDecodeToken, m as CollaborationTokenPayload, n as getTokenTTL, o as issueProjectScopedToken, p as CollaborationAccess, r as isTokenExpiringSoon, s as issueReadToken, t as ProductTokenIssuer, u as verifyToken, v as SessionScopedTokenPayload, y as TokenScope } from "../index-Bq_z_u6A.js";
2
- export { AnyTokenPayload, BatchScopedTokenPayload, CollaborationAccess, CollaborationTokenPayload, IssueCollaborationTokenOptions, ProductTokenIssuer, ProjectScopedTokenPayload, ReadTokenPayload, SessionScopedTokenPayload, TokenScope, getTokenTTL, isTokenExpiringSoon, issueBatchScopedToken, issueCollaborationToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, unsafeDecodeToken, verifyToken };
1
+ import { _ as ReadTokenPayload, a as issueCollaborationToken, b as materializeCliAuthBundle, c as issueSessionScopedToken, d as AnyTokenPayload, f as BatchScopedTokenPayload, g as ProjectScopedTokenPayload, h as IssueCollaborationTokenOptions, i as issueBatchScopedToken, l as unsafeDecodeToken, m as CollaborationTokenPayload, n as getTokenTTL, o as issueProjectScopedToken, p as CollaborationAccess, r as isTokenExpiringSoon, s as issueReadToken, t as ProductTokenIssuer, u as verifyToken, v as SessionScopedTokenPayload, y as TokenScope } from "../index-C_2tEmR1.js";
2
+ export { AnyTokenPayload, BatchScopedTokenPayload, CollaborationAccess, CollaborationTokenPayload, IssueCollaborationTokenOptions, ProductTokenIssuer, ProjectScopedTokenPayload, ReadTokenPayload, SessionScopedTokenPayload, TokenScope, getTokenTTL, isTokenExpiringSoon, issueBatchScopedToken, issueCollaborationToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, materializeCliAuthBundle, unsafeDecodeToken, verifyToken };
@@ -1,3 +1,4 @@
1
+ import { n as materializeCliAuthBundle } from "../cli-auth-bundle-DUsK57rK.js";
1
2
  //#region src/auth/tokens.ts
2
3
  const textEncoder = new TextEncoder();
3
4
  const textDecoder = new TextDecoder();
@@ -311,4 +312,4 @@ var ProductTokenIssuer = class {
311
312
  }
312
313
  };
313
314
  //#endregion
314
- export { ProductTokenIssuer, getTokenTTL, isTokenExpiringSoon, issueBatchScopedToken, issueCollaborationToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, unsafeDecodeToken, verifyToken };
315
+ export { ProductTokenIssuer, getTokenTTL, isTokenExpiringSoon, issueBatchScopedToken, issueCollaborationToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, materializeCliAuthBundle, unsafeDecodeToken, verifyToken };
@@ -1,4 +1,4 @@
1
- import { r as TerminalStreamHandlers } from "./terminal-stream-5GNLCsms.js";
1
+ import { r as TerminalStreamHandlers } from "./terminal-stream-CcaBTVg3.js";
2
2
  import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionStatus } from "@tangle-network/agent-interface";
3
3
  import { AgentInteractiveSessionControlClaim as AgentInteractiveSessionControlClaim$1, AgentInteractiveSessionControlClaimRequest as AgentInteractiveSessionControlClaimRequest$1, AgentInteractiveSessionRef as AgentInteractiveSessionRef$1 } from "@tangle-network/agent-interface/environment-interactive-control";
4
4
 
@@ -0,0 +1,25 @@
1
+ //#region ../../../packages/cli-agent-registry/dist/cli-auth-bundle.mjs
2
+ const DEFAULT_MODE = 384;
3
+ const AUTH_BUNDLE_PATHS = Object.freeze({
4
+ codex: ".codex/auth.json",
5
+ "claude-code": ".claude/.credentials.json"
6
+ });
7
+ /** Convert a native credential JSON bundle without reading host credentials. */
8
+ function materializeCliAuthBundle(backendType, rawBundle) {
9
+ if (backendType !== "codex" && backendType !== "claude-code") throw new Error("CLI auth bundle is not supported for the selected backend");
10
+ if (typeof rawBundle !== "string") throw new Error("CLI auth bundle must be a JSON object");
11
+ let value;
12
+ try {
13
+ value = JSON.parse(rawBundle);
14
+ } catch {
15
+ throw new Error("CLI auth bundle must be a JSON object");
16
+ }
17
+ if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("CLI auth bundle must be a JSON object");
18
+ return [{
19
+ path: AUTH_BUNDLE_PATHS[backendType],
20
+ content: rawBundle,
21
+ mode: DEFAULT_MODE
22
+ }];
23
+ }
24
+ //#endregion
25
+ export { materializeCliAuthBundle as n, AUTH_BUNDLE_PATHS as t };
@@ -1,6 +1,6 @@
1
- import { l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-DdaYTq_N.js";
2
- import { l as ScopedToken, s as MintInteractiveSessionTokenOptions } from "./terminal-stream-5GNLCsms.js";
3
- import { Ar as SandboxFleetToken, At as FleetDriveTurnRequest, Bn as PublicTemplateVersionInfo, Br as SandboxIdentity, Dt as FleetDispatchResultBufferOptions, Er as SandboxFleetManifest, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fr as SandboxFleetUsage, Ft as FleetPromptDispatchResult, Gn as ReconcileSandboxFleetsOptions, Hn as PublishPublicTemplateVersionOptions, I as CreateSandboxFleetTokenOptions, Ji as TokenRefreshHandler, Kn as ReconcileSandboxFleetsResult, L as CreateSandboxFleetWithCoordinatorOptions, Li as SubscriptionInfo, Lr as SandboxFleetWorkspaceReconcileResult, Mn as PromptInputPart, Mt as FleetExecDispatchResult, N as CreateIntelligenceReportOptions, Ni as SshKeysManager, Nn as PromptOptions, Nt as FleetMachineId, Or as SandboxFleetOperationsSummary, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pn as PromptResult, Pr as SandboxFleetTraceOptions, Pt as FleetPromptDispatchOptions, R as CreateSandboxOptions, Rr as SandboxFleetWorkspaceRestoreResult, Tt as FleetDispatchCancelResult, Un as ReapExpiredSandboxFleetsOptions, Vn as PublishPublicTemplateOptions, Vr as SandboxInfo, Wn as ReapExpiredSandboxFleetsResult, _r as SandboxFleetDispatchResponse, an as IntelligenceReportCompareTo, ar as SandboxConfig, b as BatchRunRequest, br as SandboxFleetInfo, ca as BatchEvent, dn as ListSandboxFleetOptions, dr as SandboxEnvironment, dt as ExecResult, ea as UsageInfo, fn as ListSandboxOptions, hr as SandboxFleetCostEstimate, in as IntelligenceReportBudget, jr as SandboxFleetTraceBundle, jt as FleetExecDispatchOptions, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, mr as SandboxFleetArtifactSpec, pr as SandboxFleetArtifact, rn as IntelligenceReport, sn as IntelligenceReportWindow, ui as SecretsManager, ut as ExecOptions, v as BatchResult, vr as SandboxFleetDriverCapability, wr as SandboxFleetMachineRecord, y as BatchRunOptions, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceSnapshotResult } from "./types-DTDI3kek.js";
1
+ import { l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-EqAbiXhz.js";
2
+ import { l as ScopedToken, s as MintInteractiveSessionTokenOptions } from "./terminal-stream-CcaBTVg3.js";
3
+ import { Ar as SandboxFleetToken, At as FleetDriveTurnRequest, Bn as PublicTemplateVersionInfo, Br as SandboxIdentity, Dt as FleetDispatchResultBufferOptions, Er as SandboxFleetManifest, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fr as SandboxFleetUsage, Ft as FleetPromptDispatchResult, Gn as ReconcileSandboxFleetsOptions, Hn as PublishPublicTemplateVersionOptions, I as CreateSandboxFleetTokenOptions, Ji as TokenRefreshHandler, Kn as ReconcileSandboxFleetsResult, L as CreateSandboxFleetWithCoordinatorOptions, Li as SubscriptionInfo, Lr as SandboxFleetWorkspaceReconcileResult, Mn as PromptInputPart, Mt as FleetExecDispatchResult, N as CreateIntelligenceReportOptions, Ni as SshKeysManager, Nn as PromptOptions, Nt as FleetMachineId, Or as SandboxFleetOperationsSummary, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pn as PromptResult, Pr as SandboxFleetTraceOptions, Pt as FleetPromptDispatchOptions, R as CreateSandboxOptions, Rr as SandboxFleetWorkspaceRestoreResult, Tt as FleetDispatchCancelResult, Un as ReapExpiredSandboxFleetsOptions, Vn as PublishPublicTemplateOptions, Vr as SandboxInfo, Wn as ReapExpiredSandboxFleetsResult, _r as SandboxFleetDispatchResponse, an as IntelligenceReportCompareTo, ar as SandboxConfig, b as BatchRunRequest, br as SandboxFleetInfo, ca as BatchEvent, dn as ListSandboxFleetOptions, dr as SandboxEnvironment, dt as ExecResult, ea as UsageInfo, fn as ListSandboxOptions, hr as SandboxFleetCostEstimate, in as IntelligenceReportBudget, jr as SandboxFleetTraceBundle, jt as FleetExecDispatchOptions, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, mr as SandboxFleetArtifactSpec, pr as SandboxFleetArtifact, rn as IntelligenceReport, sn as IntelligenceReportWindow, ui as SecretsManager, ut as ExecOptions, v as BatchResult, vr as SandboxFleetDriverCapability, wr as SandboxFleetMachineRecord, y as BatchRunOptions, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceSnapshotResult } from "./types-CVrkDpOF.js";
4
4
  import { AgentInteractiveSessionRef } from "@tangle-network/agent-interface";
5
5
  import { z } from "zod";
6
6
 
@@ -23,6 +23,9 @@ declare const backendRegistryCapabilitiesSchema: z.ZodObject<{
23
23
  imageInput: z.ZodBoolean;
24
24
  contextWindow: z.ZodNumber;
25
25
  mcp: z.ZodBoolean;
26
+ runtimeAttachments: z.ZodOptional<z.ZodObject<{
27
+ mcp: z.ZodLiteral<true>;
28
+ }, z.core.$strip>>;
26
29
  sessions: z.ZodBoolean;
27
30
  configurable: z.ZodBoolean;
28
31
  interactions: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("permission" | "question" | "plan")[], string[]>>;
@@ -40,6 +43,9 @@ declare const backendRegistryEntrySchema: z.ZodObject<{
40
43
  imageInput: z.ZodBoolean;
41
44
  contextWindow: z.ZodNumber;
42
45
  mcp: z.ZodBoolean;
46
+ runtimeAttachments: z.ZodOptional<z.ZodObject<{
47
+ mcp: z.ZodLiteral<true>;
48
+ }, z.core.$strip>>;
43
49
  sessions: z.ZodBoolean;
44
50
  configurable: z.ZodBoolean;
45
51
  interactions: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("permission" | "question" | "plan")[], string[]>>;
@@ -59,6 +65,9 @@ declare const backendRegistryResponseSchema: z.ZodObject<{
59
65
  imageInput: z.ZodBoolean;
60
66
  contextWindow: z.ZodNumber;
61
67
  mcp: z.ZodBoolean;
68
+ runtimeAttachments: z.ZodOptional<z.ZodObject<{
69
+ mcp: z.ZodLiteral<true>;
70
+ }, z.core.$strip>>;
62
71
  sessions: z.ZodBoolean;
63
72
  configurable: z.ZodBoolean;
64
73
  interactions: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("permission" | "question" | "plan")[], string[]>>;
@@ -422,7 +431,7 @@ declare class Sandbox implements HttpClient, ScopedTokenHttpClient {
422
431
  * });
423
432
  * ```
424
433
  */
425
- create(options?: CreateSandboxOptions, requestOptions?: CreateRequestOptions): Promise<SandboxInstance>;
434
+ create(inputOptions?: CreateSandboxOptions, requestOptions?: CreateRequestOptions): Promise<SandboxInstance>;
426
435
  /**
427
436
  * Poll a sandbox to `running` by id. Surfaces a real provision failure
428
437
  * as a {@link StateError} (carrying the sandbox's error message) rather
@@ -1,7 +1,7 @@
1
- import { _ as backendTypeSchema, c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, l as encodeTextForWire, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, u as parseSSEStream } from "./runtime-api-BcLo4lBU.js";
2
- import { a as NetworkError, f as TimeoutError, l as SandboxError, m as parseErrorResponse, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-C6kn-3zt.js";
1
+ import { c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, l as encodeTextForWire, m as normalizeRuntimeBackendConfig, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, u as parseSSEStream, v as backendTypeSchema } from "./runtime-api-B8uIpISe.js";
2
+ import { c as PartialFailureError, d as ServerError, h as parseErrorResponse, m as ValidationError, o as NetworkError, p as TimeoutError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-DrJySZQG.js";
3
3
  import { n as combineAbortSignals } from "./abort-signal-si1WMfJb.js";
4
- import { E as normalizeConnection, O as exportTraceBundle, b as requestInteractiveSessionToken, i as normalizeStartupDiagnostics, n as createSandboxInstanceFromResponse, r as normalizeSandboxCreateReceipt } from "./sandbox-mTNH1V-j.js";
4
+ import { E as normalizeConnection, O as exportTraceBundle, b as requestInteractiveSessionToken, i as normalizeStartupDiagnostics, n as createSandboxInstanceFromResponse, r as normalizeSandboxCreateReceipt } from "./sandbox-BwUEeVkk.js";
5
5
  import { agentProfileSchema } from "@tangle-network/agent-interface";
6
6
  import { z } from "zod";
7
7
  //#region src/backend-registry.ts
@@ -24,6 +24,7 @@ const backendRegistryCapabilitiesSchema = z.object({
24
24
  imageInput: z.boolean(),
25
25
  contextWindow: z.number(),
26
26
  mcp: z.boolean(),
27
+ runtimeAttachments: z.object({ mcp: z.literal(true) }).optional(),
27
28
  sessions: z.boolean(),
28
29
  configurable: z.boolean(),
29
30
  interactions: z.array(z.string().min(1)).transform((values) => values.filter(isBackendRegistryInteractionKind))
@@ -2429,6 +2430,56 @@ const RETRYABLE_CREATE_STATUS_CODES = new Set([
2429
2430
  503,
2430
2431
  504
2431
2432
  ]);
2433
+ /**
2434
+ * 503 classes that mean "the cell cannot place a create right now, ask
2435
+ * again", not "this create failed". They are what a caller sees while the
2436
+ * production host-agent rolls: placement is drained on the only host, so an
2437
+ * unkeyed create fails `CAPACITY_EXHAUSTED` (`HOST_PRESSURE` and
2438
+ * `PROVISIONING_PAUSED` are the sibling admission refusals the orchestrator
2439
+ * maps to 503), and a keyed create cannot verify its ref while the agent is
2440
+ * down (`IDEMPOTENT_CREATE_PROBE_FAILED`). Re-POSTing is safe: the admission
2441
+ * refusals started no provision, the probe answer is the Worker declining to
2442
+ * act until it can prove what exists, and the idempotency key joins
2443
+ * whichever provision did start.
2444
+ *
2445
+ * `SANDBOX_CREATE_RECONCILING` is deliberately not in the family. The Worker
2446
+ * answers it (Retry-After 2) when a same-key create meets a journaled D1
2447
+ * reservation left by an earlier attempt
2448
+ * (products/sandbox/api/src/routes/sandbox-create-idempotency-flow.ts). The
2449
+ * Worker releases that journal on the three admission refusals above
2450
+ * (sandbox-create-failure.ts, `PRE_PROVISION_REFUSAL_CODES`), so the hold
2451
+ * can only follow a retained real failure: a provision that started and
2452
+ * failed, or a create whose commit never ran because the Worker or the
2453
+ * controller stopped mid-create. The reconciler leaves such a journal alone
2454
+ * for RESERVATION_TTL_MS = 5 min and then releases it only after three
2455
+ * authoritative misses, one cron tick apart
2456
+ * (products/sandbox/api/src/cf/create-reservation-reconciler.ts), which is
2457
+ * longer than the 150 s ceiling below and the 120 s default create budget.
2458
+ * Retrying it on the time budget could never outlast the hold; it only
2459
+ * turned a ~10 s failure into a 120 s TimeoutError. It keeps the
2460
+ * five-attempt budget, paced on its Retry-After, like every other 503. The
2461
+ * same code also answers a failed read of that recovery state, a transient
2462
+ * the short budget already covers.
2463
+ */
2464
+ const DEPLOY_WINDOW_RETRY_CODES = new Set([
2465
+ "IDEMPOTENT_CREATE_PROBE_FAILED",
2466
+ "CAPACITY_EXHAUSTED",
2467
+ "HOST_PRESSURE",
2468
+ "PROVISIONING_PAUSED"
2469
+ ]);
2470
+ /**
2471
+ * Longest a create keeps re-POSTing through the deploy-window family,
2472
+ * counted from the start of the create. Sized to the production host-agent
2473
+ * roll in `.github/actions/update-host-agents/action.yml` (drain placement
2474
+ * on the host, swap the agent, restore placement): the last measured roll
2475
+ * kept placement drained for 124 s. The caller's create deadline binds
2476
+ * first when it is shorter, and the 120 s default is, so a default create
2477
+ * waits out its own deadline rather than this ceiling.
2478
+ */
2479
+ const DEPLOY_WINDOW_RETRY_MS = 15e4;
2480
+ function isDeployWindowCreateError(cause) {
2481
+ return cause instanceof SandboxError && cause.status === 503 && DEPLOY_WINDOW_RETRY_CODES.has(cause.code);
2482
+ }
2432
2483
  function isRetryableCreateError(cause) {
2433
2484
  if (cause instanceof NetworkError) return true;
2434
2485
  return cause instanceof SandboxError && cause.status !== void 0 && RETRYABLE_CREATE_STATUS_CODES.has(cause.status);
@@ -2480,11 +2531,11 @@ function withRequestContextHeaders(response, path, method) {
2480
2531
  });
2481
2532
  }
2482
2533
  async function resolveLocalCliAuthFiles(backendType) {
2483
- const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-CJmSpTjk.js");
2534
+ const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-BAJuMBZU.js");
2484
2535
  return discoverLocalCliAuthFiles(backendType);
2485
2536
  }
2486
2537
  async function describeLocalCliAuthExpectation(backendType) {
2487
- const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-CJmSpTjk.js");
2538
+ const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-BAJuMBZU.js");
2488
2539
  return describe(backendType);
2489
2540
  }
2490
2541
  async function hydrateLocalCliBackendAuth(backend, baseUrl, trustLocalCliAuth) {
@@ -2661,11 +2712,24 @@ var Sandbox = class {
2661
2712
  * });
2662
2713
  * ```
2663
2714
  */
2664
- async create(options, requestOptions) {
2715
+ async create(inputOptions, requestOptions) {
2716
+ let options = inputOptions;
2717
+ if (options?.backend?.runtimeAttachments !== void 0) {
2718
+ normalizeRuntimeBackendConfig(options.backend);
2719
+ options = {
2720
+ ...options,
2721
+ backend: {
2722
+ ...options.backend,
2723
+ runtimeAttachments: structuredClone(options.backend.runtimeAttachments)
2724
+ }
2725
+ };
2726
+ }
2665
2727
  if (options?.backend?.type !== void 0) assertCurrentBackendType(options.backend.type);
2666
2728
  const timeoutMs = requestOptions?.timeoutMs ?? (options?.gpuLease ? DEFAULT_GPU_CREATE_TIMEOUT_MS : DEFAULT_CREATE_TIMEOUT_MS);
2667
2729
  const idempotencyKey = options?.idempotencyKey ?? generateIdempotencyKey();
2668
- const deadline = Date.now() + timeoutMs;
2730
+ const startedAt = Date.now();
2731
+ const deadline = startedAt + timeoutMs;
2732
+ const deployWindowDeadline = Math.min(deadline, startedAt + DEPLOY_WINDOW_RETRY_MS);
2669
2733
  const git = options?.git ? {
2670
2734
  url: options.git.url,
2671
2735
  ref: options.git.ref,
@@ -2754,17 +2818,36 @@ var Sandbox = class {
2754
2818
  idempotencyKey,
2755
2819
  billingOwnerId: options?.billingOwnerId
2756
2820
  });
2757
- const createTimeoutError = () => new TimeoutError(timeoutMs, `Sandbox create did not complete within ${timeoutMs}ms. The provision may still be running server-side; retry create() with idempotencyKey="${idempotencyKey}" to join it.`);
2758
- const waitBeforeRetry = async (cause, failedAttempt) => {
2821
+ let lastServerError;
2822
+ const createTimeoutError = () => new TimeoutError(timeoutMs, `Sandbox create did not complete within ${timeoutMs}ms. ` + (lastServerError ? `The last attempt failed with ${lastServerError.code}${lastServerError.status === void 0 ? "" : ` (HTTP ${lastServerError.status})`}: ${lastServerError.message}. ` : "") + `The provision may still be running server-side; retry create() with idempotencyKey="${idempotencyKey}" to join it.`, void 0, lastServerError);
2823
+ const sleepBeforeRetry = async (delayMs) => {
2759
2824
  try {
2760
- await waitForCreateRetry(createRetryDelayMs(cause, failedAttempt), postSignal);
2825
+ await waitForCreateRetry(delayMs, postSignal);
2761
2826
  } catch (waitError) {
2762
2827
  if (requestOptions?.signal?.aborted) throw waitError;
2763
2828
  throw createTimeoutError();
2764
2829
  }
2765
2830
  };
2831
+ const waitBeforeRetry = async (cause, failedAttempt) => {
2832
+ if (isDeployWindowCreateError(cause)) {
2833
+ const delayMs = Math.max(createRetryDelayMs(cause, failedAttempt), CREATE_RETRY_BASE_DELAY_MS);
2834
+ if (delayMs >= deployWindowDeadline - Date.now()) throw deployWindowDeadline === deadline ? createTimeoutError() : cause;
2835
+ await sleepBeforeRetry(delayMs);
2836
+ return;
2837
+ }
2838
+ const delayMs = createRetryDelayMs(cause, failedAttempt);
2839
+ if (cause instanceof SandboxError && delayMs >= deadline - Date.now()) throw cause;
2840
+ await sleepBeforeRetry(delayMs);
2841
+ };
2766
2842
  let response;
2767
- for (let attempt = 1; attempt <= CREATE_POST_MAX_ATTEMPTS; attempt++) {
2843
+ let shortBudgetFailures = 0;
2844
+ const exhaustsRetryBudget = (error) => {
2845
+ if (!isRetryableCreateError(error)) return true;
2846
+ if (isDeployWindowCreateError(error)) return false;
2847
+ shortBudgetFailures += 1;
2848
+ return shortBudgetFailures >= CREATE_POST_MAX_ATTEMPTS;
2849
+ };
2850
+ for (let attempt = 1;; attempt++) {
2768
2851
  try {
2769
2852
  response = await this.fetch("/v1/sandboxes", {
2770
2853
  method: "POST",
@@ -2774,15 +2857,17 @@ var Sandbox = class {
2774
2857
  }, { timeoutMs });
2775
2858
  } catch (error) {
2776
2859
  if (requestOptions?.signal?.aborted) throw error;
2860
+ if (error instanceof SandboxError && !(error instanceof TimeoutError)) lastServerError = error;
2777
2861
  if (postDeadline.aborted || Date.now() >= deadline || error instanceof TimeoutError || error instanceof Error && (error.name === "AbortError" || error.name === "TimeoutError")) throw createTimeoutError();
2778
- if (attempt >= CREATE_POST_MAX_ATTEMPTS || !isRetryableCreateError(error)) throw error;
2862
+ if (exhaustsRetryBudget(error instanceof Error ? error : new Error(String(error)))) throw error;
2779
2863
  await waitBeforeRetry(error, attempt);
2780
2864
  continue;
2781
2865
  }
2782
2866
  if (response.ok) break;
2783
2867
  const body = await response.text();
2784
2868
  const error = parseErrorResponse(response.status, body, void 0, response.headers);
2785
- if (attempt >= CREATE_POST_MAX_ATTEMPTS || !isRetryableCreateError(error)) throw error;
2869
+ lastServerError = error;
2870
+ if (exhaustsRetryBudget(error)) throw error;
2786
2871
  await waitBeforeRetry(error, attempt);
2787
2872
  response = void 0;
2788
2873
  }
@@ -1,2 +1,2 @@
1
- import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "../index-CMLW3u5K.js";
1
+ import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "../index-BzAxTiqF.js";
2
2
  export { CollaborationBootstrapRequest, CollaborationBootstrapResponse, CollaborationClient, CollaborationClientConfig, CollaborationDocumentAdapter, CollaborationDocumentChange, CollaborationDocumentRef, CollaborationFileBridge, CollaborationFileBridgeOptions, CollaborationFileEvent, CollaborationPermissions, CollaborationTokenRefreshRequest, CollaborationTokenRefreshResponse, CollaborationTransportConfig, SaveCollaborationSnapshotRequest, SaveCollaborationSnapshotResponse, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
@@ -1,2 +1,2 @@
1
- import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-DQD9kCdN.js";
1
+ import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-BKHF1SP8.js";
2
2
  export { CollaborationClient, CollaborationFileBridge, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
@@ -1,4 +1,4 @@
1
- import { a as NetworkError, f as TimeoutError, m as parseErrorResponse } from "./errors-C6kn-3zt.js";
1
+ import { h as parseErrorResponse, o as NetworkError, p as TimeoutError } from "./errors-DrJySZQG.js";
2
2
  //#region src/collaboration/client.ts
3
3
  const DEFAULT_TIMEOUT_MS = 3e4;
4
4
  function normalizeBaseUrl(url) {
package/dist/core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-DdaYTq_N.js";
2
- import { Cn as PreviewLinkWaitOptions, Mn as PromptInputPart, R as CreateSandboxOptions, Sn as PreviewLinkManager, Vr as SandboxInfo, Yr as SandboxStatus, ar as SandboxConfig, dt as ExecResult, gn as NetworkConfig, ut as ExecOptions, xn as PreviewLinkInfo } from "./types-DTDI3kek.js";
3
- import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, b as backendRegistryEntrySchema, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-eGeDzgEf.js";
4
- import { a as NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-CQOvGddH.js";
1
+ import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-EqAbiXhz.js";
2
+ import { Cn as PreviewLinkWaitOptions, Mn as PromptInputPart, R as CreateSandboxOptions, Sn as PreviewLinkManager, Vr as SandboxInfo, Yr as SandboxStatus, ar as SandboxConfig, dt as ExecResult, gn as NetworkConfig, ut as ExecOptions, xn as PreviewLinkInfo } from "./types-CVrkDpOF.js";
3
+ import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, b as backendRegistryEntrySchema, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-CXb0D47L.js";
4
+ import { a as FileWriteConflictError, c as PartialFailureError, d as SandboxErrorJson, f as SandboxFailureDetail, g as ValidationError, h as TimeoutError, l as QuotaError, m as StateError, n as CapabilityError, o as NetworkError, p as ServerError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-rp1GiVzL.js";
5
5
  export { AuthError, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, FileWriteConflictError, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, type PromptInputPart, QuotaError, Sandbox, type SandboxConfig, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, isBackendRegistryInteractionKind, parseBackendRegistryResponse, parseBackendRegistryResponseBody };
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-C6kn-3zt.js";
2
- import { _ as parseBackendRegistryResponse, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-mqBSqcXd.js";
3
- import { a as WorkspaceImages, t as SandboxInstance } from "./sandbox-mTNH1V-j.js";
1
+ import { a as FileWriteConflictError, c as PartialFailureError, d as ServerError, f as StateError, l as QuotaError, m as ValidationError, n as CapabilityError, o as NetworkError, p as TimeoutError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-DrJySZQG.js";
2
+ import { _ as parseBackendRegistryResponse, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-CfAcCFQh.js";
3
+ import { a as WorkspaceImages, t as SandboxInstance } from "./sandbox-BwUEeVkk.js";
4
4
  export { AuthError, CapabilityError, FileWriteConflictError, NetworkError, NotFoundError, PartialFailureError, QuotaError, Sandbox, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, isBackendRegistryInteractionKind, parseBackendRegistryResponse, parseBackendRegistryResponseBody };
@@ -130,6 +130,19 @@ var StateError = class extends SandboxError {
130
130
  this.requiredState = requiredState;
131
131
  }
132
132
  };
133
+ /**
134
+ * The sandbox lifecycle is running, but its consumer-facing runtime edge is
135
+ * still attaching or has failed to attach.
136
+ */
137
+ var EdgeNotReadyError = class extends SandboxError {
138
+ /** Current public edge state. */
139
+ edgeStatus;
140
+ constructor(message, edgeStatus, metadata) {
141
+ super(message, "EDGE_NOT_READY", edgeStatus === "failed" ? 502 : 409, metadata);
142
+ this.name = "EdgeNotReadyError";
143
+ this.edgeStatus = edgeStatus;
144
+ }
145
+ };
133
146
  var FileWriteConflictError = class extends SandboxError {
134
147
  expectedHash;
135
148
  constructor(message, path, expectedHash, currentHash, currentMtime, metadata) {
@@ -155,10 +168,23 @@ var EgressProxyRecoveryError = class extends SandboxError {
155
168
  var TimeoutError = class extends SandboxError {
156
169
  /** Timeout duration in milliseconds */
157
170
  timeoutMs;
158
- constructor(timeoutMs, message, metadata) {
171
+ /**
172
+ * The last typed failure the operation had already received when the
173
+ * deadline fired, when there was one.
174
+ *
175
+ * An operation that spends its budget across several attempts (create's
176
+ * bounded POST retry) usually learns the server's failure class on an
177
+ * earlier attempt — `CONTAINER_START_FAILED`, `PROVISIONING_ERROR`,
178
+ * `RATE_LIMIT_EXCEEDED`. Without this field that class dies at the
179
+ * deadline and the caller is left with a timeout that names no cause,
180
+ * which is the last discard in a chain built specifically to deliver it.
181
+ */
182
+ cause;
183
+ constructor(timeoutMs, message, metadata, cause) {
159
184
  super(message ?? `Request timed out after ${timeoutMs}ms`, "TIMEOUT", 408, metadata);
160
185
  this.name = "TimeoutError";
161
186
  this.timeoutMs = timeoutMs;
187
+ this.cause = cause;
162
188
  }
163
189
  };
164
190
  /**
@@ -266,13 +292,13 @@ function parseErrorResponse(status, body, context, headers) {
266
292
  }
267
293
  const errorObj = data.error;
268
294
  const nestedMessage = typeof errorObj === "object" && errorObj !== null ? errorObj.message : void 0;
269
- const nestedCode = typeof errorObj === "object" && errorObj !== null ? asErrorCode(errorObj.code) : void 0;
295
+ const nestedCode = typeof errorObj === "object" && errorObj !== null ? typeof errorObj.code === "string" ? asErrorCode(errorObj.code) : void 0 : void 0;
270
296
  const baseMessage = data.message || nestedMessage || (typeof errorObj === "string" ? errorObj : void 0) || body || "Unknown error";
271
297
  const details = typeof data.details === "string" && data.details.trim().length > 0 ? data.details.trim() : void 0;
272
298
  const shouldAppendDetails = !!details && details !== baseMessage && (baseMessage === "Unknown error" || /^failed\b/i.test(baseMessage) || /^provision failed\b/i.test(baseMessage) || /^deprovision failed\b/i.test(baseMessage));
273
299
  const rawReason = typeof data.reason === "string" ? data.reason : typeof errorObj === "object" && errorObj !== null ? errorObj.reason : void 0;
274
300
  const reason = typeof rawReason === "string" && rawReason.trim().length > 0 ? rawReason.trim() : void 0;
275
- const code = asErrorCode(data.code) ?? nestedCode;
301
+ const code = (typeof data.code === "string" ? asErrorCode(data.code) : void 0) ?? nestedCode;
276
302
  const rawLog = typeof errorObj === "object" && errorObj !== null ? errorObj.log : void 0;
277
303
  const logTail = typeof rawLog === "string" && rawLog.trim().length > 0 ? rawLog.trim() : void 0;
278
304
  const prefix = context ? `${context.method ?? "REQUEST"} ${context.path ?? ""}: ` : "";
@@ -309,4 +335,4 @@ function parseErrorResponse(status, body, context, headers) {
309
335
  }
310
336
  }
311
337
  //#endregion
312
- export { NetworkError as a, QuotaError as c, StateError as d, TimeoutError as f, FileWriteConflictError as i, SandboxError as l, parseErrorResponse as m, CapabilityError as n, NotFoundError as o, ValidationError as p, EgressProxyRecoveryError as r, PartialFailureError as s, AuthError as t, ServerError as u };
338
+ export { FileWriteConflictError as a, PartialFailureError as c, ServerError as d, StateError as f, parseErrorResponse as h, EgressProxyRecoveryError as i, QuotaError as l, ValidationError as m, CapabilityError as n, NetworkError as o, TimeoutError as p, EdgeNotReadyError as r, NotFoundError as s, AuthError as t, SandboxError as u };
@@ -102,6 +102,15 @@ declare class StateError extends SandboxError {
102
102
  readonly requiredState?: string;
103
103
  constructor(message: string, currentState: string, requiredState?: string, metadata?: SandboxErrorMetadata, code?: string);
104
104
  }
105
+ /**
106
+ * The sandbox lifecycle is running, but its consumer-facing runtime edge is
107
+ * still attaching or has failed to attach.
108
+ */
109
+ declare class EdgeNotReadyError extends SandboxError {
110
+ /** Current public edge state. */
111
+ readonly edgeStatus: "pending" | "failed";
112
+ constructor(message: string, edgeStatus: "pending" | "failed", metadata?: SandboxErrorMetadata);
113
+ }
105
114
  declare class FileWriteConflictError extends SandboxError {
106
115
  readonly path: string;
107
116
  readonly currentHash: string | null;
@@ -119,7 +128,19 @@ declare class EgressProxyRecoveryError extends SandboxError {
119
128
  declare class TimeoutError extends SandboxError {
120
129
  /** Timeout duration in milliseconds */
121
130
  readonly timeoutMs: number;
122
- constructor(timeoutMs: number, message?: string, metadata?: SandboxErrorMetadata);
131
+ /**
132
+ * The last typed failure the operation had already received when the
133
+ * deadline fired, when there was one.
134
+ *
135
+ * An operation that spends its budget across several attempts (create's
136
+ * bounded POST retry) usually learns the server's failure class on an
137
+ * earlier attempt — `CONTAINER_START_FAILED`, `PROVISIONING_ERROR`,
138
+ * `RATE_LIMIT_EXCEEDED`. Without this field that class dies at the
139
+ * deadline and the caller is left with a timeout that names no cause,
140
+ * which is the last discard in a chain built specifically to deliver it.
141
+ */
142
+ readonly cause?: SandboxError;
143
+ constructor(timeoutMs: number, message?: string, metadata?: SandboxErrorMetadata, cause?: SandboxError);
123
144
  }
124
145
  /**
125
146
  * A network or connection error occurred.
@@ -136,4 +157,4 @@ declare class ServerError extends SandboxError {
136
157
  constructor(message: string, status?: number, metadata?: SandboxErrorMetadata, code?: string);
137
158
  }
138
159
  //#endregion
139
- export { NetworkError as a, QuotaError as c, SandboxFailureDetail as d, ServerError as f, ValidationError as h, FileWriteConflictError as i, SandboxError as l, TimeoutError as m, CapabilityError as n, NotFoundError as o, StateError as p, EgressProxyRecoveryError as r, PartialFailureError as s, AuthError as t, SandboxErrorJson as u };
160
+ export { FileWriteConflictError as a, PartialFailureError as c, SandboxErrorJson as d, SandboxFailureDetail as f, ValidationError as g, TimeoutError as h, EgressProxyRecoveryError as i, QuotaError as l, StateError as m, CapabilityError as n, NetworkError as o, ServerError as p, EdgeNotReadyError as r, NotFoundError as s, AuthError as t, SandboxError as u };
@@ -1,5 +1,5 @@
1
- import { n as HttpClient, r as SandboxInstance } from "./sandbox-DdaYTq_N.js";
2
- import { R as CreateSandboxOptions } from "./types-DTDI3kek.js";
1
+ import { n as HttpClient, r as SandboxInstance } from "./sandbox-EqAbiXhz.js";
2
+ import { R as CreateSandboxOptions } from "./types-CVrkDpOF.js";
3
3
 
4
4
  //#region src/tangle/abi.d.ts
5
5
  /**
@@ -1,3 +1,12 @@
1
+ //#region ../../../packages/cli-agent-registry/src/cli-auth-bundle.d.ts
2
+ type LocalCliAuthFile = {
3
+ path: string;
4
+ content: string;
5
+ mode?: number;
6
+ };
7
+ /** Convert a native credential JSON bundle without reading host credentials. */
8
+ declare function materializeCliAuthBundle(backendType: string, rawBundle: string): LocalCliAuthFile[];
9
+ //#endregion
1
10
  //#region src/auth/types.d.ts
2
11
  /**
3
12
  * Auth Types
@@ -217,4 +226,4 @@ declare class ProductTokenIssuer {
217
226
  getTtlMinutes(tier?: "free" | "pro" | "enterprise"): number;
218
227
  }
219
228
  //#endregion
220
- export { ReadTokenPayload as _, issueCollaborationToken as a, issueSessionScopedToken as c, AnyTokenPayload as d, BatchScopedTokenPayload as f, ProjectScopedTokenPayload as g, IssueCollaborationTokenOptions as h, issueBatchScopedToken as i, unsafeDecodeToken as l, CollaborationTokenPayload as m, getTokenTTL as n, issueProjectScopedToken as o, CollaborationAccess as p, isTokenExpiringSoon as r, issueReadToken as s, ProductTokenIssuer as t, verifyToken as u, SessionScopedTokenPayload as v, TokenScope as y };
229
+ export { ReadTokenPayload as _, issueCollaborationToken as a, materializeCliAuthBundle as b, issueSessionScopedToken as c, AnyTokenPayload as d, BatchScopedTokenPayload as f, ProjectScopedTokenPayload as g, IssueCollaborationTokenOptions as h, issueBatchScopedToken as i, unsafeDecodeToken as l, CollaborationTokenPayload as m, getTokenTTL as n, issueProjectScopedToken as o, CollaborationAccess as p, isTokenExpiringSoon as r, issueReadToken as s, ProductTokenIssuer as t, verifyToken as u, SessionScopedTokenPayload as v, TokenScope as y };