@tangle-network/sandbox 1.0.241 → 1.0.243

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 (50) hide show
  1. package/dist/agent/index.d.ts +4 -4
  2. package/dist/agent/index.js +5 -5
  3. package/dist/agent/preview.d.ts +1 -1
  4. package/dist/agent/preview.js +1 -1
  5. package/dist/{agent-run-outcome-BiCsXGzw.d.ts → agent-run-outcome-BgSJNbSv.d.ts} +2 -2
  6. package/dist/{api-request--DWPzmwv.js → api-request-DdzWM-kd.js} +2 -2
  7. package/dist/{browser-interactive-control-controller-D9plWzEP.d.ts → browser-interactive-control-controller-D1CmLBEn.d.ts} +1 -1
  8. package/dist/{browser-interactive-control-controller-D3ENnAih.js → browser-interactive-control-controller-gOAFGLlO.js} +1 -1
  9. package/dist/{chunked-upload-O-8ZfTgv.js → chunked-upload-B_CfWth1.js} +1 -1
  10. package/dist/{chunked-upload-file-Cko41h8C.js → chunked-upload-file-16t2BxYx.js} +1 -1
  11. package/dist/{client-BaodKpEF.js → client-CwVObMPp.js} +5 -5
  12. package/dist/{client-CP2Arxbz.d.ts → client-ZpAmrHIa.d.ts} +15 -8
  13. package/dist/collaboration/index.js +1 -1
  14. package/dist/{collaboration-BqP_-0rI.js → collaboration-D9UlQ1Xs.js} +2 -2
  15. package/dist/core.d.ts +7 -7
  16. package/dist/core.js +5 -5
  17. package/dist/{error-catalog-LyHHTFoQ.js → error-catalog-CH_n2ubl.js} +1 -0
  18. package/dist/{errors-BY-3SBlL.js → errors-LJAXbFuF.js} +1 -1
  19. package/dist/{file-download-C-u5Ejk6.js → file-download-BQZCoO5d.js} +1 -1
  20. package/dist/{index-B2cujKJI.d.ts → index-Wj7PcCUU.d.ts} +8 -8
  21. package/dist/index.d.ts +10 -10
  22. package/dist/index.js +11 -11
  23. package/dist/intelligence/index.js +3 -3
  24. package/dist/interactive-control.d.ts +1 -1
  25. package/dist/interactive-control.js +1 -1
  26. package/dist/{interactive-controller-XhBbQdry.d.ts → interactive-controller-Cfx6Y0YB.d.ts} +3 -3
  27. package/dist/{interactive-controller-CwHdvUR-.js → interactive-controller-r8zayd7q.js} +4 -4
  28. package/dist/{lines-BNaFiqBy.js → lines-CIkCYod2.js} +1 -1
  29. package/dist/{lines-Bpzbhe3z.d.ts → lines-Ts_OQha-.d.ts} +1 -1
  30. package/dist/lines.d.ts +1 -1
  31. package/dist/lines.js +1 -1
  32. package/dist/{mcp-local-BrTDDAV2.js → mcp-local-BeYPMmHZ.js} +2 -2
  33. package/dist/{preview-BEQ_X3h1.d.ts → preview-CCdeS6_7.d.ts} +3 -3
  34. package/dist/{public-templates-BDIqpwN5.d.ts → public-templates-62hehiOi.d.ts} +2 -2
  35. package/dist/public-templates.d.ts +1 -1
  36. package/dist/public-templates.js +1 -1
  37. package/dist/{raw-evidence-archive-CpPxVqUK.js → raw-evidence-archive-Bg8v2G0F.js} +1 -1
  38. package/dist/runtime.d.ts +5 -5
  39. package/dist/runtime.js +5 -5
  40. package/dist/{sandbox-qq0PSq3P.js → sandbox-1pkXjQGb.js} +87 -75
  41. package/dist/{select-seat-sASXpRdL.js → select-seat-BMbwBp0s.js} +102 -41
  42. package/dist/select-seat-command.d.ts +5 -6
  43. package/dist/select-seat-command.js +31 -25
  44. package/dist/session-gateway/index.js +1 -1
  45. package/dist/tangle/index.d.ts +1 -1
  46. package/dist/tangle/index.js +1 -1
  47. package/dist/{tangle-qoQOQKdR.js → tangle-BR2dRtZx.js} +3 -3
  48. package/dist/{terminal-stream-types-DQNUfdKj.d.ts → terminal-stream-types-DHBpfcAh.d.ts} +1 -0
  49. package/dist/{types-D2l2jaHS.d.ts → types-Ds1aBGvy.d.ts} +3 -1
  50. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { A as requestedPublicProfileDigest, B as ALL_BACKEND_TYPES, F as createAgentRunOutcomeTracker, H as isolationPrincipalSchema, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, V as backendTypeSchema, W as parseBackendType, i as terminalUpgradeHeadersSupported, k as normalizeRuntimeBackendConfig, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, z as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./interactive-controller-CwHdvUR-.js";
1
+ import { A as requestedPublicProfileDigest, B as ALL_BACKEND_TYPES, F as createAgentRunOutcomeTracker, H as isolationPrincipalSchema, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, V as backendTypeSchema, W as parseBackendType, i as terminalUpgradeHeadersSupported, k as normalizeRuntimeBackendConfig, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, z as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./interactive-controller-r8zayd7q.js";
2
2
  import { i as SANDBOX_SIZE_PRESET_NAMES, r as agentProfileSchema, t as agentProfileConfidentialSchema } from "./profile-schema-C0n0VgmA.js";
3
- import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, k as agentInteractiveSessionPromptRequestDigest, l as createInteractiveControlHolderId, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-D3ENnAih.js";
4
- import { A as HARNESS_LAUNCH_MATERIALIZE_OPTIONS, C as SandboxOperation, D as splitInlineProfileSkills, E as splitInlineProfileFileMounts, M as enforceWorkspacePlanSupport, N as isMaterializerHarness, O as validateDeferredProfileFileMounts, P as materializeProfile, S as ManagedProcessClient, T as materializeProfileFileMounts, _ as collectAgentFinalMessageText, a as buildTraceExportPayload, b as isToolBearingEvent, c as toOtelJson, f as InteractiveSessionHandle, g as applySandboxEventText, h as createInteractiveTerminalSession, i as MAX_EGRESS_DENIALS_LIMIT, j as ProfileUnsupportedError, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as exportTraceBundle, p as InteractiveTerminalFrameLog, r as WorkspaceImages, s as otelTraceIdForTangleTrace, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as SandboxOperationFailedError, y as getSandboxEventText } from "./sandbox-qq0PSq3P.js";
5
- import { C as SandboxError, D as TimeoutError, E as StreamInterruptedError, O as ValidationError, S as ResumeEnvRequiredError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, d as CompliancePlacementError, f as EdgeNotReadyError, g as KeyBudgetExhaustedError, h as GpuProviderNotConfiguredError, l as BranchFanoutExceedsHostError, m as FileWriteConflictError, o as responseMetadata, p as EgressProxyRecoveryError, r as parseErrorResponse, t as TerminalStreamError, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-BY-3SBlL.js";
6
- import { _ as createBatchResultAccumulator, a as InstancesClient, c as runtimeWorkspaceCwdSchema, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, g as IntelligenceClient, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, n as RunsClient, o as SandboxFleetClient, p as isBackendRegistryInteractionKind, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as backendRegistryEntrySchema, v as validateBatchRunRequest } from "./client-BaodKpEF.js";
7
- import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request--DWPzmwv.js";
8
- import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-BqP_-0rI.js";
3
+ import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, k as agentInteractiveSessionPromptRequestDigest, l as createInteractiveControlHolderId, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-gOAFGLlO.js";
4
+ import { A as HARNESS_LAUNCH_MATERIALIZE_OPTIONS, C as SandboxOperation, D as splitInlineProfileSkills, E as splitInlineProfileFileMounts, M as enforceWorkspacePlanSupport, N as isMaterializerHarness, O as validateDeferredProfileFileMounts, P as materializeProfile, S as ManagedProcessClient, T as materializeProfileFileMounts, _ as collectAgentFinalMessageText, a as buildTraceExportPayload, b as isToolBearingEvent, c as toOtelJson, f as InteractiveSessionHandle, g as applySandboxEventText, h as createInteractiveTerminalSession, i as MAX_EGRESS_DENIALS_LIMIT, j as ProfileUnsupportedError, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as exportTraceBundle, p as InteractiveTerminalFrameLog, r as WorkspaceImages, s as otelTraceIdForTangleTrace, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as SandboxOperationFailedError, y as getSandboxEventText } from "./sandbox-1pkXjQGb.js";
5
+ import { C as SandboxError, D as TimeoutError, E as StreamInterruptedError, O as ValidationError, S as ResumeEnvRequiredError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, d as CompliancePlacementError, f as EdgeNotReadyError, g as KeyBudgetExhaustedError, h as GpuProviderNotConfiguredError, l as BranchFanoutExceedsHostError, m as FileWriteConflictError, o as responseMetadata, p as EgressProxyRecoveryError, r as parseErrorResponse, t as TerminalStreamError, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-LJAXbFuF.js";
6
+ import { _ as createBatchResultAccumulator, a as InstancesClient, c as runtimeWorkspaceCwdSchema, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, g as IntelligenceClient, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, n as RunsClient, o as SandboxFleetClient, p as isBackendRegistryInteractionKind, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as backendRegistryEntrySchema, v as validateBatchRunRequest } from "./client-CwVObMPp.js";
7
+ import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-DdzWM-kd.js";
8
+ import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-D9UlQ1Xs.js";
9
9
  import "./file-transfer-DOSTbUSR.js";
10
10
  import { t as parseSSEStream } from "./sse-parser-BCG3iL9j.js";
11
- import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-BNaFiqBy.js";
12
- import { t as downloadFile } from "./file-download-C-u5Ejk6.js";
11
+ import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-CIkCYod2.js";
12
+ import { t as downloadFile } from "./file-download-BQZCoO5d.js";
13
13
  import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
14
14
  import { a as parseLineApplicationResult, i as parseLineApplicationRequest, n as LINE_APPLICATION_REPLY_MAX_CHARS, o as sandboxFailureKind, r as LINE_APPLICATION_REQUEST_MAX_BYTES, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-CTkHtpap.js";
15
- import { a as gatewaySeatTransport, i as createSelectSeat, r as SeatSelectionError } from "./select-seat-sASXpRdL.js";
16
- import { s as BlueprintSandboxClient } from "./tangle-qoQOQKdR.js";
15
+ import { a as createSelectSeat, i as SeatSelectionError, o as gatewaySeatTransport } from "./select-seat-BMbwBp0s.js";
16
+ import { s as BlueprintSandboxClient } from "./tangle-BR2dRtZx.js";
17
17
  import { z } from "zod";
18
18
  //#region ../../../packages/runtime-contracts/dist/model-key-proxy.js
19
19
  const MANAGED_MODEL_KEY_SENTINEL = "proxy-managed-per-request";
@@ -1,6 +1,6 @@
1
- import { D as TimeoutError, _ as NetworkError, r as parseErrorResponse, u as CapabilityError } from "../errors-BY-3SBlL.js";
2
- import { i as fetchSandboxApi } from "../api-request--DWPzmwv.js";
3
- import { n as verifyDownload } from "../file-download-C-u5Ejk6.js";
1
+ import { D as TimeoutError, _ as NetworkError, r as parseErrorResponse, u as CapabilityError } from "../errors-LJAXbFuF.js";
2
+ import { i as fetchSandboxApi } from "../api-request-DdzWM-kd.js";
3
+ import { n as verifyDownload } from "../file-download-BQZCoO5d.js";
4
4
  import { t as rawEvidenceArchiveAttemptSchema } from "../raw-evidence-export-C6Xdl3nC.js";
5
5
  import { z } from "zod";
6
6
  //#region src/intelligence/run-session-capture.ts
@@ -1,2 +1,2 @@
1
- import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, n as BrowserInteractiveSessionControlControllerOptions, r as browserInteractiveControlHolderId, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-D9plWzEP.js";
1
+ import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, n as BrowserInteractiveSessionControlControllerOptions, r as browserInteractiveControlHolderId, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-D1CmLBEn.js";
2
2
  export { BrowserInteractiveSessionControlController, type BrowserInteractiveSessionControlControllerOptions, type InteractiveSessionIdentity, InteractiveSessionNotRunningError, browserInteractiveControlHolderId };
@@ -1,2 +1,2 @@
1
- import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-D3ENnAih.js";
1
+ import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-gOAFGLlO.js";
2
2
  export { BrowserInteractiveSessionControlController, InteractiveSessionNotRunningError, browserInteractiveControlHolderId };
@@ -1,6 +1,6 @@
1
- import { ft as AgentInteractiveSessionRef, o as TerminalStreamReconnectAuthority, u as ScopedToken } from "./terminal-stream-types-DQNUfdKj.js";
2
- import { Cn as TerminalStream } from "./types-D2l2jaHS.js";
3
- import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, f as InteractiveAttachOptions, g as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-D9plWzEP.js";
1
+ import { ft as AgentInteractiveSessionRef, o as TerminalStreamReconnectAuthority, u as ScopedToken } from "./terminal-stream-types-DHBpfcAh.js";
2
+ import { Cn as TerminalStream } from "./types-Ds1aBGvy.js";
3
+ import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, f as InteractiveAttachOptions, g as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-D1CmLBEn.js";
4
4
 
5
5
  //#region src/interactive-controller.d.ts
6
6
  /** The request fields supplied by an attach caller before control is claimed. */
@@ -1,10 +1,10 @@
1
1
  import { C as boundedIdentifierSchema, T as boundedJsonSchema, o as canonicalCandidateDigest } from "./harness-C5lXV9e5.js";
2
2
  import { r as agentProfileSchema } from "./profile-schema-C0n0VgmA.js";
3
- import { B as PlanContinuationSchema, D as agentInteractiveSessionControlClaimMatchesRef, P as AgentExactRunControlRefSchema, R as AgentExecutionOutcomeSchema, U as InteractionRequestSchema, c as assertInteractiveSessionRef, h as AgentInteractiveSessionAttachSchema, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, r as browserInteractiveTerminalEndpoint, v as AgentInteractiveSessionControlClaimSchema, x as AgentInteractiveSessionRefSchema, z as DurablePlanSchema } from "./browser-interactive-control-controller-D3ENnAih.js";
4
- import { O as ValidationError, _ as NetworkError, i as parseResponseError, s as retryWhen, t as TerminalStreamError, u as CapabilityError, w as ServerError } from "./errors-BY-3SBlL.js";
3
+ import { B as PlanContinuationSchema, D as agentInteractiveSessionControlClaimMatchesRef, P as AgentExactRunControlRefSchema, R as AgentExecutionOutcomeSchema, U as InteractionRequestSchema, c as assertInteractiveSessionRef, h as AgentInteractiveSessionAttachSchema, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, r as browserInteractiveTerminalEndpoint, v as AgentInteractiveSessionControlClaimSchema, x as AgentInteractiveSessionRefSchema, z as DurablePlanSchema } from "./browser-interactive-control-controller-gOAFGLlO.js";
4
+ import { O as ValidationError, _ as NetworkError, i as parseResponseError, s as retryWhen, t as TerminalStreamError, u as CapabilityError, w as ServerError } from "./errors-LJAXbFuF.js";
5
5
  import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-CRxC2dlT.js";
6
- import { n as SDK_TIMEOUTS } from "./api-request--DWPzmwv.js";
7
- import { c as awaitSdkResend, s as uploadChunked } from "./chunked-upload-O-8ZfTgv.js";
6
+ import { n as SDK_TIMEOUTS } from "./api-request-DdzWM-kd.js";
7
+ import { c as awaitSdkResend, s as uploadChunked } from "./chunked-upload-B_CfWth1.js";
8
8
  import { t as parseSSEStream } from "./sse-parser-BCG3iL9j.js";
9
9
  import { z } from "zod";
10
10
  import { PART_TEXT, PART_TEXT_SUFFIX } from "@tangle-network/agent-core/sse";
@@ -1,4 +1,4 @@
1
- import { O as ValidationError, r as parseErrorResponse } from "./errors-BY-3SBlL.js";
1
+ import { O as ValidationError, r as parseErrorResponse } from "./errors-LJAXbFuF.js";
2
2
  //#region src/line-identity.ts
3
3
  /**
4
4
  * The instance key that serves one member: `keyPrefix` plus the first 32 hex
@@ -1,4 +1,4 @@
1
- import { Tn as CreateSandboxOptions, ga as BackendConfig } from "./types-D2l2jaHS.js";
1
+ import { Tn as CreateSandboxOptions, ga as BackendConfig } from "./types-Ds1aBGvy.js";
2
2
 
3
3
  //#region src/line-application.d.ts
4
4
  /** Bounded callback request bytes after canonicalization, including JSON framing. */
package/dist/lines.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as LineRespondAgent, B as LineVoiceOptions, C as LineMessage, D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, I as LineSenderVerificationStart, L as LineThread, M as LineRole, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, R as LineTransport, S as LineMemberSpec, T as LineProvider, V as LinesHttpClient, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, c as LineAllowanceSubject, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, j as LineRespondView, k as LineReplyGate, l as LineApplicationAttachOptions, m as LineFromConnectionInput, n as SandboxLines, o as LineAgentRolePolicy, p as LineExecutionKey, r as lineInstanceKey, s as LineAllowance, t as LinesClient, u as LineAttachOptions, v as LineLimits, w as LineNumberInventory, x as LineMemberPatch, y as LineMember, z as LineVoice } from "./lines-Bpzbhe3z.js";
1
+ import { A as LineRespondAgent, B as LineVoiceOptions, C as LineMessage, D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, I as LineSenderVerificationStart, L as LineThread, M as LineRole, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, R as LineTransport, S as LineMemberSpec, T as LineProvider, V as LinesHttpClient, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, c as LineAllowanceSubject, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, j as LineRespondView, k as LineReplyGate, l as LineApplicationAttachOptions, m as LineFromConnectionInput, n as SandboxLines, o as LineAgentRolePolicy, p as LineExecutionKey, r as lineInstanceKey, s as LineAllowance, t as LinesClient, u as LineAttachOptions, v as LineLimits, w as LineNumberInventory, x as LineMemberPatch, y as LineMember, z as LineVoice } from "./lines-Ts_OQha-.js";
2
2
  export { Line, LineAgentRolePolicy, LineAllowance, LineAllowanceSubject, LineApplicationAttachOptions, LineAttachOptions, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineFromConnectionInput, LineImage, LineInstanceAttachOptions, LineInstanceCreate, LineLimits, LineMember, LineMemberInstance, LineMemberPatch, LineMemberSpec, LineMessage, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyCode, LineReplyCodeInput, LineReplyGate, LineRespondAgent, LineRespondView, LineRole, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LineThread, LineTransport, LineVoice, LineVoiceOptions, LinesClient, LinesHttpClient, SandboxLines, lineInstanceKey, profileChannelReference };
package/dist/lines.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-BNaFiqBy.js";
1
+ import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-CIkCYod2.js";
2
2
  export { LinesClient, SandboxLines, lineInstanceKey, profileChannelReference };
@@ -1,4 +1,4 @@
1
- import "./api-request--DWPzmwv.js";
1
+ import "./api-request-DdzWM-kd.js";
2
2
  import { u as SANDBOX_FILE_API_ABSOLUTE_ROOTS } from "./file-transfer-DOSTbUSR.js";
3
3
  import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-DWL78boI.js";
4
4
  //#region \0rolldown/runtime.js
@@ -396,7 +396,7 @@ async function createMcpServer(box, options = {}) {
396
396
  const { bindings, handlers } = bindToolSpecs(box, options);
397
397
  const server = new serverModule.Server({
398
398
  name: options.name ?? "tangle-sandbox",
399
- version: options.version ?? "1.0.241"
399
+ version: options.version ?? "1.0.243"
400
400
  }, { capabilities: { tools: {} } });
401
401
  server.setRequestHandler(typesModule.ListToolsRequestSchema, async () => ({ tools: bindings.map(({ spec: s }) => ({
402
402
  name: s.name,
@@ -1,6 +1,6 @@
1
- import { O as SandboxInstance } from "./index-B2cujKJI.js";
2
- import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-D2l2jaHS.js";
3
- import { t as Sandbox } from "./client-CP2Arxbz.js";
1
+ import { O as SandboxInstance } from "./index-Wj7PcCUU.js";
2
+ import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-Ds1aBGvy.js";
3
+ import { t as Sandbox } from "./client-ZpAmrHIa.js";
4
4
 
5
5
  //#region src/agent/preview-operations.d.ts
6
6
  type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
@@ -1,5 +1,5 @@
1
- import { R as SandboxError } from "./terminal-stream-types-DQNUfdKj.js";
2
- import { Cr as PublishPublicTemplateVersionOptions, Sr as PublishPublicTemplateOptions, Xr as HttpClient, br as PublicTemplateInfo, xr as PublicTemplateVersionInfo } from "./types-D2l2jaHS.js";
1
+ import { R as SandboxError } from "./terminal-stream-types-DHBpfcAh.js";
2
+ import { Cr as PublishPublicTemplateVersionOptions, Sr as PublishPublicTemplateOptions, Xr as HttpClient, br as PublicTemplateInfo, xr as PublicTemplateVersionInfo } from "./types-Ds1aBGvy.js";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/public-templates.d.ts
@@ -1,2 +1,2 @@
1
- import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-BDIqpwN5.js";
1
+ import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-62hehiOi.js";
2
2
  export { PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient };
@@ -1,4 +1,4 @@
1
- import { C as SandboxError, a as readResponseJson } from "./errors-BY-3SBlL.js";
1
+ import { C as SandboxError, a as readResponseJson } from "./errors-LJAXbFuF.js";
2
2
  import { z } from "zod";
3
3
  //#region src/public-templates.ts
4
4
  const publicationStatus = z.enum([
@@ -1,4 +1,4 @@
1
- import { n as verifyDownload } from "./file-download-C-u5Ejk6.js";
1
+ import { n as verifyDownload } from "./file-download-BQZCoO5d.js";
2
2
  import { t as runPreparedEvidence } from "./prepared-evidence-ibAysmX8.js";
3
3
  import { t as rawEvidenceArchiveAttemptSchema } from "./raw-evidence-export-C6Xdl3nC.js";
4
4
  import { z } from "zod";
package/dist/runtime.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { F as ProfileFileMountPathError, H as ServerError, I as QuotaError, K as TimeoutError, M as NetworkError, N as NotFoundError, O as FileWriteConflictError, P as PartialFailureError, R as SandboxError, S as AuthError, U as StateError, V as SandboxFailureDetail, q as ValidationError, u as ScopedToken, w as CapabilityError, z as SandboxErrorJson } from "./terminal-stream-types-DQNUfdKj.js";
2
- import { $i as SessionExecutionStatus, Bi as CreateSessionOptions, Cn as TerminalStream, Di as SandboxEvent, Fi as CommitTaskSessionOptions, Gi as ListMessagesOptions, Gn as ChunkedUploadResult, Ji as SendSessionMessageRequest, Qi as SessionExecutionInfo, Qn as FileReadBatchResult, Vi as CreateTaskSessionOptions, Wn as ChunkedUploadOptions, Xr as HttpClient, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, Zn as FileReadBatchOptions, aa as SessionMessage, ar as FileTreeResult, cr as FileWriteResult, dn as SandboxTerminalCreateOptions, dr as RenameOptions, fa as TaskSessionInfo, fn as SandboxTerminalInfo, ir as FileTreeOptions, la as TaskSessionChanges, ln as SandboxRuntimeHealth, mn as SandboxTerminalRequestOptions, mr as WriteFileOptions, na as SessionInfo, oa as SessionMessageAdmission, on as SandboxPortBinding, or as FileUsageOptions, pn as SandboxTerminalManager, pr as UploadProgress, qi as SendSessionMessageOptions, sr as FileUsageResult, tr as FileRenameResult, ua as TaskSessionCommitResult } from "./types-D2l2jaHS.js";
3
- import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-D9plWzEP.js";
4
- import { t as BrowserInteractiveSessionController } from "./interactive-controller-XhBbQdry.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-BiCsXGzw.js";
1
+ import { F as ProfileFileMountPathError, H as ServerError, I as QuotaError, K as TimeoutError, M as NetworkError, N as NotFoundError, O as FileWriteConflictError, P as PartialFailureError, R as SandboxError, S as AuthError, U as StateError, V as SandboxFailureDetail, q as ValidationError, u as ScopedToken, w as CapabilityError, z as SandboxErrorJson } from "./terminal-stream-types-DHBpfcAh.js";
2
+ import { $i as SessionExecutionStatus, Bi as CreateSessionOptions, Cn as TerminalStream, Di as SandboxEvent, Fi as CommitTaskSessionOptions, Gi as ListMessagesOptions, Gn as ChunkedUploadResult, Ji as SendSessionMessageRequest, Qi as SessionExecutionInfo, Qn as FileReadBatchResult, Vi as CreateTaskSessionOptions, Wn as ChunkedUploadOptions, Xr as HttpClient, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, Zn as FileReadBatchOptions, aa as SessionMessage, ar as FileTreeResult, cr as FileWriteResult, dn as SandboxTerminalCreateOptions, dr as RenameOptions, fa as TaskSessionInfo, fn as SandboxTerminalInfo, ir as FileTreeOptions, la as TaskSessionChanges, ln as SandboxRuntimeHealth, mn as SandboxTerminalRequestOptions, mr as WriteFileOptions, na as SessionInfo, oa as SessionMessageAdmission, on as SandboxPortBinding, or as FileUsageOptions, pn as SandboxTerminalManager, pr as UploadProgress, qi as SendSessionMessageOptions, sr as FileUsageResult, tr as FileRenameResult, ua as TaskSessionCommitResult } from "./types-Ds1aBGvy.js";
3
+ import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-D1CmLBEn.js";
4
+ import { t as BrowserInteractiveSessionController } from "./interactive-controller-Cfx6Y0YB.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-BgSJNbSv.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 { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-CwHdvUR-.js";
2
- import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-D3ENnAih.js";
3
- import { C as SandboxError, D as TimeoutError, O as ValidationError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, m as FileWriteConflictError, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-BY-3SBlL.js";
4
- import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request--DWPzmwv.js";
5
- import { s as uploadChunked } from "./chunked-upload-O-8ZfTgv.js";
1
+ import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-r8zayd7q.js";
2
+ import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-gOAFGLlO.js";
3
+ import { C as SandboxError, D as TimeoutError, O as ValidationError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, m as FileWriteConflictError, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-LJAXbFuF.js";
4
+ import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-DdzWM-kd.js";
5
+ import { s as uploadChunked } from "./chunked-upload-B_CfWth1.js";
6
6
  //#region src/runtime-client.ts
7
7
  function requireToken(token) {
8
8
  const value = token.trim();
@@ -1,23 +1,23 @@
1
- import { A as requestedPublicProfileDigest, C as runtimeFilesystemPath, D as assertCurrentBackendType, E as applyRequestedModel, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, O as mergeRuntimeBackendConfig, P as withoutRuntimeSecrets, S as encodeTextForWire, U as normalizeEffectiveBackend, _ as mintTraceId, a as assertScopedTokenActive, b as validateAcceptedDispatchRunRef, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedSecretProfilePublicDigest, k as normalizeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as canUseNodeHttp2, x as encodePromptForWire, y as resolveDispatchRunIdentity } from "./interactive-controller-CwHdvUR-.js";
1
+ import { A as requestedPublicProfileDigest, C as runtimeFilesystemPath, D as assertCurrentBackendType, E as applyRequestedModel, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, O as mergeRuntimeBackendConfig, P as withoutRuntimeSecrets, S as encodeTextForWire, U as normalizeEffectiveBackend, _ as mintTraceId, a as assertScopedTokenActive, b as validateAcceptedDispatchRunRef, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedSecretProfilePublicDigest, k as normalizeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as canUseNodeHttp2, x as encodePromptForWire, y as resolveDispatchRunIdentity } from "./interactive-controller-r8zayd7q.js";
2
2
  import { C as boundedIdentifierSchema$1, E as boundedStringSchema$1, g as sha256DigestSchema$1, o as canonicalCandidateDigest$1, s as canonicalCandidateJson$1 } from "./harness-C5lXV9e5.js";
3
3
  import { a as ProxySecretReceiptSchema$1, r as agentProfileSchema$1 } from "./profile-schema-C0n0VgmA.js";
4
4
  import { t as sha256$1 } from "./sha2-BIoWepwn.js";
5
- import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-D3ENnAih.js";
5
+ import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-gOAFGLlO.js";
6
6
  import { t as canonicalAgentProfileDigest } from "./agent-execution-preparation-CjKTjmJ9.js";
7
- import { C as SandboxError, D as TimeoutError, E as StreamInterruptedError, O as ValidationError, T as StateError, _ as NetworkError, a as readResponseJson, b as ProfileFileMountPathError, c as AuthError, f as EdgeNotReadyError, i as parseResponseError, n as isTransientWrite, o as responseMetadata, r as parseErrorResponse, s as retryWhen, t as TerminalStreamError, u as CapabilityError, v as NotFoundError, w as ServerError } from "./errors-BY-3SBlL.js";
7
+ import { C as SandboxError, D as TimeoutError, E as StreamInterruptedError, O as ValidationError, T as StateError, _ as NetworkError, a as readResponseJson, b as ProfileFileMountPathError, c as AuthError, f as EdgeNotReadyError, i as parseResponseError, n as isTransientWrite, o as responseMetadata, r as parseErrorResponse, s as retryWhen, t as TerminalStreamError, u as CapabilityError, v as NotFoundError, w as ServerError } from "./errors-LJAXbFuF.js";
8
8
  import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-CRxC2dlT.js";
9
9
  import { a as backoffDelayMs, o as isUndelivered, r as abortableSleep } from "./retry-policy-oW3_ljoc.js";
10
- import { a as isReplayableBody, i as fetchSandboxApi, n as SDK_TIMEOUTS, o as rewrapResponse, t as IDEMPOTENT_METHODS } from "./api-request--DWPzmwv.js";
10
+ import { a as isReplayableBody, i as fetchSandboxApi, n as SDK_TIMEOUTS, o as rewrapResponse, t as IDEMPOTENT_METHODS } from "./api-request-DdzWM-kd.js";
11
11
  import { a as SANDBOX_PROXY_REQUEST_MAX_BYTES, c as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, d as isProfileFileMountOutsideRoots, f as profileFileMountOutsideRootsMessage, l as SANDBOX_AGENT_HOME, o as FILE_OPERATION_LIMITS, u as SANDBOX_FILE_API_ABSOLUTE_ROOTS } from "./file-transfer-DOSTbUSR.js";
12
- import { c as awaitSdkResend, l as takeSdkTurn, s as uploadChunked } from "./chunked-upload-O-8ZfTgv.js";
12
+ import { c as awaitSdkResend, l as takeSdkTurn, s as uploadChunked } from "./chunked-upload-B_CfWth1.js";
13
13
  import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-sGVP8skk.js";
14
14
  import { t as SIDECAR_PROXY_ERROR_HEADER } from "./sidecar-proxy-error-DTdbCbUM.js";
15
15
  import { t as parseSSEStream } from "./sse-parser-BCG3iL9j.js";
16
16
  import { t as runPreparedProcess } from "./prepared-process-DQ_68Ofg.js";
17
17
  import { a as isBackendType, r as cliAuthReferenceSchema } from "./cli-auth-bundle-C6DtK7GX-DoqlFTT-.js";
18
18
  import "./cli-auth-bundle-BinY89CX.js";
19
- import { n as SandboxLines } from "./lines-BNaFiqBy.js";
20
- import { t as downloadFile } from "./file-download-C-u5Ejk6.js";
19
+ import { n as SandboxLines } from "./lines-CIkCYod2.js";
20
+ import { t as downloadFile } from "./file-download-BQZCoO5d.js";
21
21
  import { z } from "zod";
22
22
  import { createHash } from "node:crypto";
23
23
  import { constants } from "node:fs";
@@ -5050,6 +5050,7 @@ const ERROR_CATALOG = {
5050
5050
  UNSUPPORTED: "501 final | This operation is not supported for this runtime, harness or driver. | Choose a runtime or option that supports it.",
5051
5051
  UPSTREAM_ERROR: "502 retry | An upstream service failed or answered outside its contract. | Retry with backoff; report the request id if it persists.",
5052
5052
  UNAVAILABLE: "503 retry | A dependency or capacity is temporarily unavailable. | Retry after the Retry-After interval.",
5053
+ UPSTREAM_UNAVAILABLE: "503 retry | The sandbox controller did not answer, or answered without a code the catalog knows. | Retry after the Retry-After interval.",
5053
5054
  NOT_READY: "503 retry | The target is starting, restarting, recovering or draining. | Retry after the Retry-After interval.",
5054
5055
  BACKEND_UNAVAILABLE: "503 retry | The agent backend did not answer. | Retry after the Retry-After interval.",
5055
5056
  MESSAGE_RETRIEVAL_UNAVAILABLE: "503 retry | Message storage did not answer. | Retry after the Retry-After interval.",
@@ -11114,9 +11115,9 @@ var SandboxSessionAdmissionCapabilities = class extends SandboxProfileCapabiliti
11114
11115
  return info;
11115
11116
  }
11116
11117
  /** @internal — invoked by SandboxSession.status(). */
11117
- async _sessionStatus(id) {
11118
- await this.ensureRunning();
11119
- const response = await this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}`);
11118
+ async _sessionStatus(id, signal) {
11119
+ await this.ensureRunning(signal);
11120
+ const response = await this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}`, { signal });
11120
11121
  if (response.status === 404) return null;
11121
11122
  return normalizeSessionInfo(await readResponseJson(response));
11122
11123
  }
@@ -12010,7 +12011,7 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
12010
12011
  var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabilities {
12011
12012
  /** @internal — invoked before the sandbox is deleted. */
12012
12013
  async _sessionExportRawEvidence(id, destination, options) {
12013
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-CpPxVqUK.js");
12014
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-Bg8v2G0F.js");
12014
12015
  await this.ensureRunning();
12015
12016
  await this.refresh();
12016
12017
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/raw-evidence/archive?${new URLSearchParams([
@@ -12041,7 +12042,7 @@ var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabil
12041
12042
  * and the byte and file bounds are verified before the directory appears.
12042
12043
  */
12043
12044
  async exportRawEvidence(destination, options) {
12044
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-CpPxVqUK.js");
12045
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-Bg8v2G0F.js");
12045
12046
  await this.ensureRunning();
12046
12047
  await this.refresh();
12047
12048
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/raw-evidence/archive?${new URLSearchParams({
@@ -12129,92 +12130,103 @@ var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabil
12129
12130
  }
12130
12131
  }
12131
12132
  /** Replay one execution without subscribing to other runs on its session. */
12132
- async *_executionEvents(sessionId, executionId) {
12133
- await this.ensureRunning();
12133
+ async *_executionEvents(sessionId, executionId, signal) {
12134
+ await this.ensureRunning(signal);
12134
12135
  const search = new URLSearchParams({
12135
12136
  lastEventId: "0",
12136
12137
  format: "sse",
12137
12138
  sessionId,
12138
12139
  [PART_TEXT]: PART_TEXT_SUFFIX
12139
12140
  });
12140
- const response = await this.runtimeFetch(`/agents/run/${encodeURIComponent(executionId)}/events?${search.toString()}`);
12141
+ const response = await this.runtimeFetch(`/agents/run/${encodeURIComponent(executionId)}/events?${search.toString()}`, { signal });
12141
12142
  if (!response.ok) throw await parseResponseError(response);
12142
12143
  let lastEventId = "0";
12143
12144
  try {
12144
- for await (const event of this.parseSSEStream(response)) {
12145
+ for await (const event of this.parseSSEStream(response, signal)) {
12145
12146
  if (event.id) lastEventId = event.id;
12146
12147
  yield event;
12147
12148
  if (event.type === "done" || event.type === "error") return;
12148
12149
  }
12149
12150
  } catch {}
12151
+ signal?.throwIfAborted();
12150
12152
  yield* this.streamPromptInner("", {
12151
12153
  sessionId,
12152
12154
  executionId,
12153
- lastEventId
12155
+ lastEventId,
12156
+ signal
12154
12157
  }, { replaySessionId: sessionId });
12155
12158
  }
12156
12159
  /** @internal — invoked by SandboxSession.result(). */
12157
12160
  async _sessionResult(id, options, knownSession) {
12158
12161
  if (options?.executionId !== void 0 && !options.executionId) throw new ValidationError("executionId must not be empty", { fields: { executionId: "Expected a non-empty runtime execution id" } });
12159
- const startTime = Date.now();
12160
- let executionId = options?.executionId;
12161
- if (!executionId) {
12162
- const session = knownSession ?? await this._sessionStatus(id);
12163
- if (!session) throw new NotFoundError(`Session not found: ${id}`, {
12164
- resourceType: "Session",
12165
- resourceId: id,
12166
- origin: "runtime",
12167
- endpoint: `/agents/sessions/${encodeURIComponent(id)}`
12168
- });
12169
- if (!session.latestExecutionId) throw new StateError(`Session ${id} has no execution result to await`, {
12170
- currentState: session.status,
12171
- requiredState: "session with an admitted execution",
12172
- origin: "runtime",
12173
- endpoint: `/agents/sessions/${encodeURIComponent(id)}`,
12174
- code: "SESSION_EXECUTION_MISSING"
12175
- });
12176
- executionId = session.latestExecutionId;
12177
- }
12178
- let resultExecutionId = executionId;
12179
- let response;
12180
- const outcomeTracker = createAgentRunOutcomeTracker();
12181
- let traceId;
12182
- let usage;
12183
- let modelCalls;
12184
- const events = this._executionEvents(id, executionId);
12185
- for await (const event of events) {
12186
- outcomeTracker.observe(event);
12187
- response = applySandboxEventText(response, event);
12188
- if (event.type === "result" || event.type === "done") {
12189
- const data = event.data;
12190
- if (typeof data.executionId === "string" && data.executionId) resultExecutionId = data.executionId;
12191
- usage = readTokenUsage(data) ?? usage;
12192
- modelCalls = readModelCalls(data.modelCalls) ?? modelCalls;
12162
+ const configuredSignal = state(this).client.signal;
12163
+ const signal = options?.signal && configuredSignal ? combineAbortSignals([options.signal, configuredSignal]) : options?.signal ?? configuredSignal;
12164
+ signal?.throwIfAborted();
12165
+ try {
12166
+ const startTime = Date.now();
12167
+ let executionId = options?.executionId;
12168
+ if (!executionId) {
12169
+ const session = knownSession ?? await this._sessionStatus(id, signal);
12170
+ if (!session) throw new NotFoundError(`Session not found: ${id}`, {
12171
+ resourceType: "Session",
12172
+ resourceId: id,
12173
+ origin: "runtime",
12174
+ endpoint: `/agents/sessions/${encodeURIComponent(id)}`
12175
+ });
12176
+ if (!session.latestExecutionId) throw new StateError(`Session ${id} has no execution result to await`, {
12177
+ currentState: session.status,
12178
+ requiredState: "session with an admitted execution",
12179
+ origin: "runtime",
12180
+ endpoint: `/agents/sessions/${encodeURIComponent(id)}`,
12181
+ code: "SESSION_EXECUTION_MISSING"
12182
+ });
12183
+ executionId = session.latestExecutionId;
12193
12184
  }
12194
- if (event.type === "trace.id") traceId = event.data.traceId;
12195
- if (event.type === "done" || event.type === "error") break;
12185
+ let resultExecutionId = executionId;
12186
+ let response;
12187
+ const outcomeTracker = createAgentRunOutcomeTracker();
12188
+ let traceId;
12189
+ let usage;
12190
+ let modelCalls;
12191
+ const events = this._executionEvents(id, executionId, signal);
12192
+ for await (const event of events) {
12193
+ outcomeTracker.observe(event);
12194
+ response = applySandboxEventText(response, event);
12195
+ if (event.type === "result" || event.type === "done") {
12196
+ const data = event.data;
12197
+ if (typeof data.executionId === "string" && data.executionId) resultExecutionId = data.executionId;
12198
+ usage = readTokenUsage(data) ?? usage;
12199
+ modelCalls = readModelCalls(data.modelCalls) ?? modelCalls;
12200
+ }
12201
+ if (event.type === "trace.id") traceId = event.data.traceId;
12202
+ if (event.type === "done" || event.type === "error") break;
12203
+ }
12204
+ signal?.throwIfAborted();
12205
+ const outcome = outcomeTracker.finish();
12206
+ return {
12207
+ success: outcome.success,
12208
+ status: outcome.status,
12209
+ executionId: resultExecutionId,
12210
+ response,
12211
+ error: outcome.error,
12212
+ errorCode: outcome.errorCode,
12213
+ ...outcome.failure ? { failure: outcome.failure } : {},
12214
+ ...outcome.resetAt ? { resetAt: outcome.resetAt } : {},
12215
+ ...outcome.statusCode === void 0 ? {} : { statusCode: outcome.statusCode },
12216
+ toolInvocations: outcome.toolInvocations,
12217
+ approval: outcome.approval,
12218
+ interaction: outcome.interaction,
12219
+ question: outcome.question,
12220
+ plan: outcome.plan,
12221
+ traceId,
12222
+ durationMs: Date.now() - startTime,
12223
+ usage,
12224
+ ...modelCalls ? { modelCalls } : {}
12225
+ };
12226
+ } catch (cause) {
12227
+ signal?.throwIfAborted();
12228
+ throw cause;
12196
12229
  }
12197
- const outcome = outcomeTracker.finish();
12198
- return {
12199
- success: outcome.success,
12200
- status: outcome.status,
12201
- executionId: resultExecutionId,
12202
- response,
12203
- error: outcome.error,
12204
- errorCode: outcome.errorCode,
12205
- ...outcome.failure ? { failure: outcome.failure } : {},
12206
- ...outcome.resetAt ? { resetAt: outcome.resetAt } : {},
12207
- ...outcome.statusCode === void 0 ? {} : { statusCode: outcome.statusCode },
12208
- toolInvocations: outcome.toolInvocations,
12209
- approval: outcome.approval,
12210
- interaction: outcome.interaction,
12211
- question: outcome.question,
12212
- plan: outcome.plan,
12213
- traceId,
12214
- durationMs: Date.now() - startTime,
12215
- usage,
12216
- ...modelCalls ? { modelCalls } : {}
12217
- };
12218
12230
  }
12219
12231
  };
12220
12232
  function isSessionAwaitingFirstTurn(info) {
@@ -14130,7 +14142,7 @@ var SandboxFilesystemOperations = class extends DeclaredFilesystemOperations {
14130
14142
  totalBytes: size,
14131
14143
  percentage: 0
14132
14144
  });
14133
- const { uploadChunkedFromFile } = await import("./chunked-upload-file-Cko41h8C.js");
14145
+ const { uploadChunkedFromFile } = await import("./chunked-upload-file-16t2BxYx.js");
14134
14146
  await uploadChunkedFromFile({ fetch: (path, init) => this.host.runtimeFetch(path, init) }, remotePath, localPath, {
14135
14147
  mode: options?.permissions,
14136
14148
  onProgress: options?.onProgress ? (progress) => {