@tangle-network/sandbox 0.68.6 → 0.69.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 (68) hide show
  1. package/README.md +5 -4
  2. package/dist/abort-signal-BKVZNJul.js +46 -0
  3. package/dist/agent/index.d.ts +4 -4
  4. package/dist/agent/index.js +4 -4
  5. package/dist/agent/preview.d.ts +1 -1
  6. package/dist/agent/preview.js +2 -2
  7. package/dist/{agent-run-outcome-Cp8hzV98.d.ts → agent-run-outcome-z5-7NA1x.d.ts} +1 -1
  8. package/dist/{api-request-D8Mni27A.js → api-request-D1UVNo16.js} +1 -1
  9. package/dist/auth/index.d.ts +2 -2
  10. package/dist/auth/index.js +1 -1
  11. package/dist/{browser-interactive-control-controller-CH7CLpmc.d.ts → browser-interactive-control-controller-CAmOZ9Sw.d.ts} +1 -1
  12. package/dist/{browser-interactive-control-controller-k1KkqDGF.js → browser-interactive-control-controller-CLHNi8rG.js} +2 -46
  13. package/dist/{chunked-upload-file-CbbWlCFt.js → chunked-upload-file-CLwAeLrM.js} +1 -1
  14. package/dist/{client-cOkMrS6h.d.ts → client-BG1kKuT7.d.ts} +15 -15
  15. package/dist/{client-D5GLp93x.js → client-DP5TOkG6.js} +9 -8
  16. package/dist/collaboration/index.d.ts +1 -1
  17. package/dist/collaboration/index.js +1 -1
  18. package/dist/{core-VOzQz1mc.js → core-CO7om2qW.js} +2 -2
  19. package/dist/core.d.ts +6 -6
  20. package/dist/core.js +4 -4
  21. package/dist/{direct-http2--35cHOv5.js → direct-http2-Pyj3Rvr1.js} +1 -1
  22. package/dist/{index-EebEqYqj.d.ts → index-DQpx4M1t.d.ts} +8 -8
  23. package/dist/index.d.ts +11 -11
  24. package/dist/index.js +9 -8
  25. package/dist/intelligence/index.js +1 -1
  26. package/dist/interactive-control.d.ts +1 -1
  27. package/dist/interactive-control.js +1 -1
  28. package/dist/{interactive-controller-ThIeP_oZ.js → interactive-controller-DIlzqR9a.js} +15 -234
  29. package/dist/{interactive-controller-Mh7Ud5DQ.d.ts → interactive-controller-qsiVS3gd.d.ts} +3 -3
  30. package/dist/lib/prepared-evidence.js +1 -1
  31. package/dist/lib/prepared-process.js +1 -1
  32. package/dist/{lines-BTIFNxRO.d.ts → lines-B9f2EKS6.d.ts} +1 -1
  33. package/dist/lines.d.ts +1 -1
  34. package/dist/lines.js +1 -1
  35. package/dist/{local-cli-auth-Dxti_D10.js → local-cli-auth-B5lzT8mt.js} +1 -1
  36. package/dist/{mcp-local-ClJ5TD-m.js → mcp-local-Gz1Uygqk.js} +1 -1
  37. package/dist/{preview-BBpr9Ogx.d.ts → preview-II4uNVbG.d.ts} +3 -3
  38. package/dist/{public-templates-sZe-0Qvi.d.ts → public-templates-CkHcnhWA.d.ts} +2 -2
  39. package/dist/public-templates.d.ts +1 -1
  40. package/dist/{raw-evidence-archive-iDPF8eF_.js → raw-evidence-archive-D60Yg1-5.js} +1 -1
  41. package/dist/runtime.d.ts +5 -5
  42. package/dist/runtime.js +4 -4
  43. package/dist/{sandbox-Ksajmtq4.js → sandbox-CVieDtU6.js} +31 -39
  44. package/dist/{secp256k1-CoRKQn1k.js → secp256k1-DxHlUI6v.js} +1 -1
  45. package/dist/select-seat-command.d.ts +1 -1
  46. package/dist/session-gateway/index.d.ts +132 -508
  47. package/dist/session-gateway/index.js +694 -946
  48. package/dist/sidecar-proxy-error-B2Hxt41g.js +24 -0
  49. package/dist/sse-parser-CUfurwcm.js +227 -0
  50. package/dist/tangle/index.d.ts +1 -1
  51. package/dist/tangle/index.js +1 -1
  52. package/dist/{tangle-Cmr8JcO3.js → tangle-B4k-BjIh.js} +3 -3
  53. package/dist/{terminal-stream-types-yAt76vk7.d.ts → terminal-stream-types-Bgy8iSFg.d.ts} +8 -5
  54. package/dist/{types-DUNlmyED.d.ts → types-D6n5ohlx.d.ts} +2 -2
  55. package/package.json +6 -6
  56. /package/dist/{chunked-upload-CbtLVV6-.js → chunked-upload-l6b9AWFA.js} +0 -0
  57. /package/dist/{cli-auth-bundle-Can3oLKY.d.ts → cli-auth-bundle-CeNOYFje.d.ts} +0 -0
  58. /package/dist/{cli-auth-bundle-DlQs_26j.js → cli-auth-bundle-CrO4F3Ru.js} +0 -0
  59. /package/dist/{collaboration-Ox7K-TN6.js → collaboration-BwLNv6sy.js} +0 -0
  60. /package/dist/{index-B8xo7y26.d.ts → index-C0RkLba5.d.ts} +0 -0
  61. /package/dist/{index-mz8_2rr2.d.ts → index-DaIF4c9p.d.ts} +0 -0
  62. /package/dist/{keep-alive-fetch-C92u8Kce.js → keep-alive-fetch-Bi-zvHpN.js} +0 -0
  63. /package/dist/{lines-DgRXUg5y.js → lines-D_HDAcVt.js} +0 -0
  64. /package/dist/{prepared-evidence-Di89Tatw.js → prepared-evidence-DUmJSegi.js} +0 -0
  65. /package/dist/{prepared-process-DKgEUodb.js → prepared-process-Dlk_9JVJ.js} +0 -0
  66. /package/dist/{preview-operations-BL7YCkes.js → preview-operations-eTUlPen5.js} +0 -0
  67. /package/dist/{response-rewrap-Bsj87BIq.js → response-rewrap-BKkJ5hnn.js} +0 -0
  68. /package/dist/{utils-C86i6t3C.js → utils-DB8DnUCU.js} +0 -0
package/dist/runtime.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { A as NetworkError, B as StateError, E as FileWriteConflictError, I as SandboxError, L as SandboxErrorJson, M as PartialFailureError, N as ProfileFileMountPathError, P as QuotaError, R as SandboxFailureDetail, S as CapabilityError, U as TimeoutError, W as ValidationError, b as AuthError, j as NotFoundError, u as ScopedToken, z as ServerError } from "./terminal-stream-types-yAt76vk7.js";
2
- import { Bn as SandboxPortBinding, Br as FileTreeResult, Ct as SessionMessageAdmission, Dt as TaskSessionCommitResult, Er as ChunkedUploadResult, Et as TaskSessionChanges, Gn as SandboxTerminalCreateOptions, Hr as FileUsageResult, Ir as FileRenameResult, Jn as SandboxTerminalRequestOptions, Jr as UploadProgress, Kn as SandboxTerminalInfo, Kr as RenameOptions, Mr as FileReadBatchOptions, Nr as FileReadBatchResult, Q as CommitTaskSessionOptions, St as SessionMessage, Tr as ChunkedUploadOptions, Un as SandboxRuntimeHealth, Ur as FileWriteResult, Vr as FileUsageOptions, Yr as WriteFileOptions, ct as ListMessagesOptions, dt as SendSessionMessageRequest, fa as SandboxEvent, ft as SentSessionMessage, gt as SessionExecutionStatus, ht as SessionExecutionInfo, it as CreateTaskSessionOptions, kt as TaskSessionInfo, mt as SessionEventStreamOptions, qn as SandboxTerminalManager, rr as TerminalStream, rt as CreateSessionOptions, ut as SendSessionMessageOptions, yt as SessionInfo, zr as FileTreeOptions } from "./types-DUNlmyED.js";
3
- import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-CH7CLpmc.js";
4
- import { t as BrowserInteractiveSessionController } from "./interactive-controller-Mh7Ud5DQ.js";
5
- import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-Cp8hzV98.js";
1
+ import { A as NetworkError, B as StateError, E as FileWriteConflictError, I as SandboxError, L as SandboxErrorJson, M as PartialFailureError, N as ProfileFileMountPathError, P as QuotaError, R as SandboxFailureDetail, S as CapabilityError, U as TimeoutError, W as ValidationError, b as AuthError, j as NotFoundError, u as ScopedToken, z as ServerError } from "./terminal-stream-types-Bgy8iSFg.js";
2
+ import { Bn as SandboxPortBinding, Br as FileTreeResult, Ct as SessionMessageAdmission, Dt as TaskSessionCommitResult, Er as ChunkedUploadResult, Et as TaskSessionChanges, Gn as SandboxTerminalCreateOptions, Hr as FileUsageResult, Ir as FileRenameResult, Jn as SandboxTerminalRequestOptions, Jr as UploadProgress, Kn as SandboxTerminalInfo, Kr as RenameOptions, Mr as FileReadBatchOptions, Nr as FileReadBatchResult, Q as CommitTaskSessionOptions, St as SessionMessage, Tr as ChunkedUploadOptions, Un as SandboxRuntimeHealth, Ur as FileWriteResult, Vr as FileUsageOptions, Yr as WriteFileOptions, ct as ListMessagesOptions, dt as SendSessionMessageRequest, fa as SandboxEvent, ft as SentSessionMessage, gt as SessionExecutionStatus, ht as SessionExecutionInfo, it as CreateTaskSessionOptions, kt as TaskSessionInfo, mt as SessionEventStreamOptions, qn as SandboxTerminalManager, rr as TerminalStream, rt as CreateSessionOptions, ut as SendSessionMessageOptions, yt as SessionInfo, zr as FileTreeOptions } from "./types-D6n5ohlx.js";
3
+ import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-CAmOZ9Sw.js";
4
+ import { t as BrowserInteractiveSessionController } from "./interactive-controller-qsiVS3gd.js";
5
+ import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-z5-7NA1x.js";
6
6
 
7
7
  //#region src/lib/chunked-upload.d.ts
8
8
  /** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
package/dist/runtime.js CHANGED
@@ -1,8 +1,8 @@
1
- import { I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController, z as projectAgentTerminalRecord } from "./interactive-controller-ThIeP_oZ.js";
1
+ import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-DIlzqR9a.js";
2
2
  import { C as StateError, E as ValidationError, S as ServerError, T as TimeoutError, _ as PartialFailureError, a as AuthError, d as FileWriteConflictError, g as NotFoundError, h as NetworkError, s as CapabilityError, v as ProfileFileMountPathError, x as SandboxError, y as QuotaError } from "./errors-Bs5G7JdV.js";
3
- import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-k1KkqDGF.js";
4
- import { t as fetchSandboxApi } from "./api-request-D8Mni27A.js";
5
- import { s as uploadChunked } from "./chunked-upload-CbtLVV6-.js";
3
+ import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-CLHNi8rG.js";
4
+ import { t as fetchSandboxApi } from "./api-request-D1UVNo16.js";
5
+ import { s as uploadChunked } from "./chunked-upload-l6b9AWFA.js";
6
6
  //#region src/runtime-client.ts
7
7
  const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
8
8
  function requireToken(token) {
@@ -1,13 +1,16 @@
1
1
  import { a as normalizeEffectiveBackend, r as backendTypeSchema } from "./backend-types-CLvdSX8V.js";
2
- import { A as normalizeRuntimeBackendConfig, C as encodePromptForWire, D as assertCurrentBackendType, E as applyRequestedModel, F as withoutRuntimeSecrets, I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, M as requestedSecretProfilePublicDigest, S as validateAcceptedDispatchRunRef, T as canUseNodeHttp2, _ as mintTraceId, a as assertScopedTokenActive, b as parseSSEStream, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as sessionHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedPublicProfileDigest, k as mergeRuntimeBackendConfig, l as normalizeSessionInfo, m as waitForRetryAfter, n as InteractiveSessionController, p as isRetryableCredentialRefusal, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as encodeTextForWire, x as resolveDispatchRunIdentity, y as traceHeaders } from "./interactive-controller-ThIeP_oZ.js";
2
+ import { A as requestedPublicProfileDigest, C as encodeTextForWire, E as assertCurrentBackendType, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, O as mergeRuntimeBackendConfig, P as withoutRuntimeSecrets, S as encodePromptForWire, T as applyRequestedModel, _ as mintTraceId, a as assertScopedTokenActive, b as resolveDispatchRunIdentity, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as sessionHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedSecretProfilePublicDigest, k as normalizeRuntimeBackendConfig, l as normalizeSessionInfo, m as waitForRetryAfter, n as InteractiveSessionController, p as isRetryableCredentialRefusal, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as canUseNodeHttp2, x as validateAcceptedDispatchRunRef, y as traceHeaders } from "./interactive-controller-DIlzqR9a.js";
3
3
  import { A as SANDBOX_PROXY_REQUEST_MAX_BYTES, C as StateError, E as ValidationError, F as isProfileFileMountOutsideRoots, I as profileFileMountOutsideRootsMessage, M as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, N as SANDBOX_AGENT_HOME, P as SANDBOX_FILE_API_ABSOLUTE_ROOTS, S as ServerError, T as TimeoutError, a as AuthError, g as NotFoundError, h as NetworkError, i as readResponseJson, l as EdgeNotReadyError, n as parseErrorResponse, r as parseResponseError, s as CapabilityError, t as TerminalStreamError, v as ProfileFileMountPathError, w as StreamInterruptedError, x as SandboxError, y as QuotaError } from "./errors-Bs5G7JdV.js";
4
- import { _ as interactiveSessionStatusResponseSchema, d as awaitWithAbort, f as combineAbortSignals, g as interactiveSessionControlValidationResponseSchema, h as interactiveSessionControlReleaseResponseSchema, l as createInteractiveControlHolderId, m as interactiveSessionControlClaimResponseSchema, p as delayUntilAborted } from "./browser-interactive-control-controller-k1KkqDGF.js";
5
- import { t as rewrapResponse } from "./response-rewrap-Bsj87BIq.js";
6
- import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-C92u8Kce.js";
7
- import { s as uploadChunked } from "./chunked-upload-CbtLVV6-.js";
8
- import { t as runPreparedProcess } from "./prepared-process-DKgEUodb.js";
9
- import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-DlQs_26j.js";
10
- import { n as SandboxLines } from "./lines-DgRXUg5y.js";
4
+ import { d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema } from "./browser-interactive-control-controller-CLHNi8rG.js";
5
+ import { n as combineAbortSignals, r as delayUntilAborted, t as awaitWithAbort } from "./abort-signal-BKVZNJul.js";
6
+ import { t as rewrapResponse } from "./response-rewrap-BKkJ5hnn.js";
7
+ import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-Bi-zvHpN.js";
8
+ import { t as SIDECAR_PROXY_ERROR_HEADER } from "./sidecar-proxy-error-B2Hxt41g.js";
9
+ import { t as parseSSEStream } from "./sse-parser-CUfurwcm.js";
10
+ import { s as uploadChunked } from "./chunked-upload-l6b9AWFA.js";
11
+ import { t as runPreparedProcess } from "./prepared-process-Dlk_9JVJ.js";
12
+ import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-CrO4F3Ru.js";
13
+ import { n as SandboxLines } from "./lines-D_HDAcVt.js";
11
14
  import { z } from "zod";
12
15
  import { AgentExactRunControlRefSchema, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, InteractionAcknowledgementSchema, InteractionBindingSchema, InteractionRequestSchema, InteractionResponseCommandSchema, InteractionResponseSchema, PlanContinuationSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentProfileSchema, agentRunCancellationAcknowledgementMatchesRequest, canonicalCandidateDigest, canonicalCandidateJson, exactAgentInteractiveSessionStart, sha256DigestSchema, terminalSessionUsable } from "@tangle-network/agent-interface";
13
16
  import { AgentInteractiveSessionControlClaimSchema as AgentInteractiveSessionControlClaimSchema$1, AgentInteractiveSessionPromptAcknowledgementSchema as AgentInteractiveSessionPromptAcknowledgementSchema$1, AgentInteractiveSessionRefSchema as AgentInteractiveSessionRefSchema$1, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema as AgentInteractiveSessionStopAcknowledgementSchema$1 } from "@tangle-network/agent-interface/environment-interactive-control";
@@ -1114,29 +1117,6 @@ function classifySidecarRequest(input, method, upgrade = false) {
1114
1117
  };
1115
1118
  }
1116
1119
  //#endregion
1117
- //#region ../../../packages/runtime-contracts/dist/sidecar-proxy-error.js
1118
- /**
1119
- * Response header that the host-agent sidecar proxy puts on each error it
1120
- * writes itself. The value is the host-agent error code, for example
1121
- * `NOT_MANAGED` or `ROUTE_LOOKUP_FAILED`.
1122
- *
1123
- * The orchestrator reaches a sidecar only through the host-agent sidecar
1124
- * proxy. Thus two services write errors on that path. They use the same
1125
- * statuses (404, 502, 503, 504) and the same `{error, code}` JSON body. This
1126
- * header names the author of the response. If the header is present, the
1127
- * host-agent wrote the response. If the header is absent, the sidecar wrote
1128
- * the response.
1129
- *
1130
- * The orchestrator invalidates the endpoint and sends the request again only
1131
- * for a host-agent error. A sidecar error is an ordinary answer, and a new
1132
- * endpoint cannot change it.
1133
- *
1134
- * The host-agent deletes this header from an upstream response before it
1135
- * returns that response. A sidecar must not be able to set the header. A
1136
- * tenant preview app on an in-container port must not be able to set it.
1137
- */
1138
- const SIDECAR_PROXY_ERROR_HEADER = "X-Tangle-Sidecar-Proxy-Error";
1139
- //#endregion
1140
1120
  //#region src/runtime-route-policy.ts
1141
1121
  /**
1142
1122
  * Where the default sandbox handle sends a runtime call, and whether a call
@@ -1455,7 +1435,7 @@ var DirectRuntimeHttpClient = class {
1455
1435
  };
1456
1436
  if (!route) throw new NetworkError("Direct runtime route was withdrawn");
1457
1437
  if ((route.useHost || route.useExec) && canUseNodeHttp2()) {
1458
- const { fetchDirectHttp2 } = await import("./direct-http2--35cHOv5.js");
1438
+ const { fetchDirectHttp2 } = await import("./direct-http2-Pyj3Rvr1.js");
1459
1439
  return fetchDirectHttp2(route.url, request, timing);
1460
1440
  }
1461
1441
  return fetchWithKeepAlive(route.url, request, timing);
@@ -3953,13 +3933,25 @@ const LIFECYCLE_CONFLICT_MAX_DELAY_MS = 4e3;
3953
3933
  function isLifecycleConflict(cause) {
3954
3934
  return cause instanceof SandboxError && cause.status === 409 && cause.code === LIFECYCLE_CONFLICT_CODE;
3955
3935
  }
3936
+ /**
3937
+ * The orchestrator's typed refusal of a delete whose agent sessions are not
3938
+ * yet sealed in run session storage: HTTP 503, nothing was torn down, and the
3939
+ * route says to retry the delete. One child delete of a 16-child branch met it
3940
+ * in production branch-fanout (eu1, 2026-10-26) and failed the whole run.
3941
+ */
3942
+ const RUN_SESSION_CAPTURE_PENDING_CODE = "RUN_SESSION_CAPTURE_PENDING";
3943
+ /** A refusal that changed nothing and that the platform says to retry. */
3944
+ function isRetriedLifecycleRefusal(cause) {
3945
+ return isLifecycleConflict(cause) || cause instanceof SandboxError && cause.status === 503 && cause.code === RUN_SESSION_CAPTURE_PENDING_CODE;
3946
+ }
3956
3947
  function lifecycleConflictDelayMs(cause, failedAttempt) {
3957
3948
  if (cause instanceof SandboxError && cause.retryAfterMs !== void 0) return cause.retryAfterMs;
3958
3949
  return Math.min(LIFECYCLE_CONFLICT_BASE_DELAY_MS * 2 ** Math.max(0, failedAttempt - 1), LIFECYCLE_CONFLICT_MAX_DELAY_MS);
3959
3950
  }
3960
3951
  /**
3961
3952
  * Run one lifecycle mutation, re-attempting only the platform's typed
3962
- * "already in progress" refusal.
3953
+ * "already in progress" refusal and its "sessions not yet sealed" delete
3954
+ * refusal.
3963
3955
  *
3964
3956
  * Every other failure keeps its identity and its stack: this widens no other
3965
3957
  * error class, and a caller abort ends the wait immediately.
@@ -3968,7 +3960,7 @@ async function withLifecycleConflictRetry(run, options) {
3968
3960
  for (let attempt = 1;; attempt += 1) try {
3969
3961
  return await run();
3970
3962
  } catch (error) {
3971
- if (!isLifecycleConflict(error) || attempt >= LIFECYCLE_CONFLICT_MAX_ATTEMPTS || options?.signal?.aborted) throw error;
3963
+ if (!isRetriedLifecycleRefusal(error) || attempt >= LIFECYCLE_CONFLICT_MAX_ATTEMPTS || options?.signal?.aborted) throw error;
3972
3964
  await delayUntilAborted(lifecycleConflictDelayMs(error, attempt), options?.signal);
3973
3965
  }
3974
3966
  }
@@ -7207,8 +7199,8 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
7207
7199
  /**
7208
7200
  * Mint a scoped, time-bounded JWT for browser access (Issue #913 Gap 1).
7209
7201
  * Authority is the caller's `TANGLE_API_KEY` (sk-tan-*); signing secrets
7210
- * stay server-side. Session/project scopes work with SessionGatewayClient,
7211
- * while session-runtime/read-only scopes work with SandboxRuntimeClient.
7202
+ * stay server-side. Native session streams use read-only session-runtime;
7203
+ * session/project retain legacy gateway semantics.
7212
7204
  */
7213
7205
  async mintScopedToken(opts) {
7214
7206
  return requestScopedToken(state(this).client, this.id, opts);
@@ -7438,7 +7430,7 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
7438
7430
  var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabilities {
7439
7431
  /** @internal — invoked before the sandbox is deleted. */
7440
7432
  async _sessionExportRawEvidence(id, destination, options) {
7441
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-iDPF8eF_.js");
7433
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-D60Yg1-5.js");
7442
7434
  await this.ensureRunning();
7443
7435
  await this.refresh();
7444
7436
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/raw-evidence/archive?${new URLSearchParams([
@@ -7469,7 +7461,7 @@ var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabil
7469
7461
  * and the byte and file bounds are verified before the directory appears.
7470
7462
  */
7471
7463
  async exportRawEvidence(destination, options) {
7472
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-iDPF8eF_.js");
7464
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-D60Yg1-5.js");
7473
7465
  await this.ensureRunning();
7474
7466
  await this.refresh();
7475
7467
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/raw-evidence/archive?${new URLSearchParams({
@@ -9782,7 +9774,7 @@ var SandboxFilesystemOperations = class {
9782
9774
  totalBytes: size,
9783
9775
  percentage: 0
9784
9776
  });
9785
- const { uploadChunkedFromFile } = await import("./chunked-upload-file-CbbWlCFt.js");
9777
+ const { uploadChunkedFromFile } = await import("./chunked-upload-file-CLwAeLrM.js");
9786
9778
  await uploadChunkedFromFile({ fetch: (path, init) => this.host.runtimeFetch(path, init) }, remotePath, localPath, {
9787
9779
  mode: options?.permissions,
9788
9780
  onProgress: options?.onProgress ? (progress) => {
@@ -1,4 +1,4 @@
1
- import { a as anumber, c as concatBytes$1, f as randomBytes, h as toBytes, i as ahash, l as createHasher$1, n as abytes$1, o as aoutput, p as rotr, r as aexists, s as clean, t as Hash, u as createView, x as split } from "./utils-C86i6t3C.js";
1
+ import { a as anumber, c as concatBytes$1, f as randomBytes, h as toBytes, i as ahash, l as createHasher$1, n as abytes$1, o as aoutput, p as rotr, r as aexists, s as clean, t as Hash, u as createView, x as split } from "./utils-DB8DnUCU.js";
2
2
  //#region ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js
3
3
  /**
4
4
  * Internal Merkle-Damgard hash utils.
@@ -1,4 +1,4 @@
1
- import { At as SeatOwnerTransport } from "./client-cOkMrS6h.js";
1
+ import { At as SeatOwnerTransport } from "./client-BG1kKuT7.js";
2
2
 
3
3
  //#region src/select-seat-command.d.ts
4
4
  /** Public reply bound; the owner prints one metadata object. */