@tangle-network/sandbox 0.11.1-develop.20260722003615.8b1bf31 → 0.11.1-develop.20260722074913.252db0d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { C as CodeExecutionResult, E as CodeResultPart, S as CodeExecutionOptions, w as CodeLanguage } from "../types-CKKO6y8K.js";
2
- import { n as SandboxInstance } from "../sandbox-CuXnqd7a.js";
3
- import { i as SandboxClient } from "../client-BV3kKzze.js";
1
+ import { C as CodeExecutionResult, E as CodeResultPart, S as CodeExecutionOptions, w as CodeLanguage } from "../types-B0EPTi1F.js";
2
+ import { n as SandboxInstance } from "../sandbox-i9F1XmCG.js";
3
+ import { i as SandboxClient } from "../client-B2WKNCtZ.js";
4
4
  import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
5
5
 
6
6
  //#region src/agent/tools/_specs.d.ts
@@ -1,5 +1,5 @@
1
- import { $n as SandboxFleetDispatchResponse, $t as ListSandboxOptions, A as CreateIntelligenceReportOptions, An as ReconcileSandboxFleetsOptions, Ct as FleetPromptDispatchOptions, Dn as PublishPublicTemplateVersionOptions, Dr as SandboxProfileSummary, Ei as TokenRefreshHandler, En as PublishPublicTemplateOptions, F as CreateSandboxOptions, Gn as SandboxClientConfig, Gt as IntelligenceReportBudget, Jr as SecretsManager, Jt as IntelligenceReportWindow, Kt as IntelligenceReportCompareTo, M as CreateSandboxFleetOptions, Mi as UsageInfo, N as CreateSandboxFleetTokenOptions, On as ReapExpiredSandboxFleetsOptions, P as CreateSandboxFleetWithCoordinatorOptions, Qt as ListSandboxFleetOptions, Sr as SandboxInfo, St as FleetMachineId, Tn as PublicTemplateVersionInfo, Wt as IntelligenceReport, Xn as SandboxFleetArtifactSpec, Yn as SandboxFleetArtifact, Zn as SandboxFleetCostEstimate, _ as BatchTask, _n as PromptInputPart, _r as SandboxFleetUsage, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, br as SandboxFleetWorkspaceRestoreResult, bt as FleetExecDispatchOptions, cr as SandboxFleetManifest, er as SandboxFleetDriverCapability, fr as SandboxFleetToken, g as BatchRunRequest, gr as SandboxFleetTraceOptions, gt as FleetDispatchCancelResult, h as BatchRunOptions, j as CreateRequestOptions, jn as ReconcileSandboxFleetsResult, kn as ReapExpiredSandboxFleetsResult, li as SshKeysManager, m as BatchResult, nr as SandboxFleetInfo, nt as ExecResult, or as SandboxFleetMachineRecord, p as BatchOptions, pi as SubscriptionInfo, pr as SandboxFleetTraceBundle, qn as SandboxEnvironment, tt as ExecOptions, ur as SandboxFleetOperationsSummary, vn as PromptOptions, vt as FleetDispatchResultBufferOptions, wn as PublicTemplateInfo, wt as FleetPromptDispatchResult, xr as SandboxFleetWorkspaceSnapshotResult, xt as FleetExecDispatchResult, yn as PromptResult, yr as SandboxFleetWorkspaceReconcileResult, yt as FleetDispatchStreamOptions, zi as BatchEvent } from "./types-CKKO6y8K.js";
2
- import { a as TraceExportSink, i as TraceExportResult, n as SandboxInstance, t as HttpClient } from "./sandbox-CuXnqd7a.js";
1
+ import { $n as SandboxFleetDispatchResponse, $t as ListSandboxOptions, A as CreateIntelligenceReportOptions, An as ReconcileSandboxFleetsOptions, Ct as FleetPromptDispatchOptions, Dn as PublishPublicTemplateVersionOptions, Dr as SandboxProfileSummary, En as PublishPublicTemplateOptions, F as CreateSandboxOptions, Gn as SandboxClientConfig, Gt as IntelligenceReportBudget, Jt as IntelligenceReportWindow, Kt as IntelligenceReportCompareTo, M as CreateSandboxFleetOptions, N as CreateSandboxFleetTokenOptions, Oi as TokenRefreshHandler, On as ReapExpiredSandboxFleetsOptions, P as CreateSandboxFleetWithCoordinatorOptions, Pi as UsageInfo, Qt as ListSandboxFleetOptions, Sr as SandboxInfo, St as FleetMachineId, Tn as PublicTemplateVersionInfo, Vi as BatchEvent, Wt as IntelligenceReport, Xn as SandboxFleetArtifactSpec, Xr as SecretsManager, Yn as SandboxFleetArtifact, Zn as SandboxFleetCostEstimate, _ as BatchTask, _n as PromptInputPart, _r as SandboxFleetUsage, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, br as SandboxFleetWorkspaceRestoreResult, bt as FleetExecDispatchOptions, cr as SandboxFleetManifest, di as SshKeysManager, er as SandboxFleetDriverCapability, fr as SandboxFleetToken, g as BatchRunRequest, gr as SandboxFleetTraceOptions, gt as FleetDispatchCancelResult, h as BatchRunOptions, hi as SubscriptionInfo, j as CreateRequestOptions, jn as ReconcileSandboxFleetsResult, kn as ReapExpiredSandboxFleetsResult, m as BatchResult, nr as SandboxFleetInfo, nt as ExecResult, or as SandboxFleetMachineRecord, p as BatchOptions, pr as SandboxFleetTraceBundle, qn as SandboxEnvironment, tt as ExecOptions, ur as SandboxFleetOperationsSummary, vn as PromptOptions, vt as FleetDispatchResultBufferOptions, wn as PublicTemplateInfo, wt as FleetPromptDispatchResult, xr as SandboxFleetWorkspaceSnapshotResult, xt as FleetExecDispatchResult, yn as PromptResult, yr as SandboxFleetWorkspaceReconcileResult, yt as FleetDispatchStreamOptions } from "./types-B0EPTi1F.js";
2
+ import { a as TraceExportSink, i as TraceExportResult, n as SandboxInstance, t as HttpClient } from "./sandbox-i9F1XmCG.js";
3
3
 
4
4
  //#region src/lib/sse-parser.d.ts
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import { c as encodeTextForWire, i as SANDBOX_PROXY_REQUEST_MAX_BYTES, o as combineAbortSignals, s as encodePromptForWire } from "./runtime-api-DCMrscis.js";
2
2
  import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, o as PartialFailureError, p as parseErrorResponse, t as AuthError } from "./errors-hbpL_-S6.js";
3
- import { f as exportTraceBundle, h as parseSSEStream, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, u as normalizeConnection } from "./sandbox-DnDmHM5x.js";
3
+ import { h as exportTraceBundle, n as createSandboxInstanceFromResponse, p as normalizeConnection, r as normalizeStartupDiagnostics, v as parseSSEStream } from "./sandbox-DIh_cMZL.js";
4
4
  //#region src/resources.ts
5
5
  /**
6
6
  * Compute tiers, ordered smallest → largest. Defined HERE (not imported from
package/dist/core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as CreateSandboxOptions, Gn as SandboxClientConfig, Nr as SandboxStatus, Sr as SandboxInfo, cn as PreviewLinkInfo, ln as PreviewLinkManager, nt as ExecResult, rn as NetworkConfig, tt as ExecOptions } from "./types-CKKO6y8K.js";
2
- import { n as SandboxInstance } from "./sandbox-CuXnqd7a.js";
3
- import { i as SandboxClient } from "./client-BV3kKzze.js";
1
+ import { F as CreateSandboxOptions, Gn as SandboxClientConfig, Nr as SandboxStatus, Sr as SandboxInfo, cn as PreviewLinkInfo, ln as PreviewLinkManager, nt as ExecResult, rn as NetworkConfig, tt as ExecOptions } from "./types-B0EPTi1F.js";
2
+ import { n as SandboxInstance } from "./sandbox-i9F1XmCG.js";
3
+ import { i as SandboxClient } from "./client-B2WKNCtZ.js";
4
4
  import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-B-8AMQdY.js";
5
5
  export { AuthError, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, QuotaError, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError };
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-hbpL_-S6.js";
2
- import { t as SandboxInstance } from "./sandbox-DnDmHM5x.js";
3
- import { n as SandboxClient } from "./client-DAGPD4d-.js";
2
+ import { t as SandboxInstance } from "./sandbox-DIh_cMZL.js";
3
+ import { n as SandboxClient } from "./client-DNi_lq1C.js";
4
4
  export { AuthError, CapabilityError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError };
@@ -1,5 +1,5 @@
1
- import { F as CreateSandboxOptions } from "./types-CKKO6y8K.js";
2
- import { n as SandboxInstance, t as HttpClient } from "./sandbox-CuXnqd7a.js";
1
+ import { F as CreateSandboxOptions } from "./types-B0EPTi1F.js";
2
+ import { n as SandboxInstance, t as HttpClient } from "./sandbox-i9F1XmCG.js";
3
3
 
4
4
  //#region src/tangle/abi.d.ts
5
5
  /**
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { $ as EventStreamOptions, $i as AgentProfileResources, $n as SandboxFleetDispatchResponse, $r as SessionEventStreamOptions, $t as ListSandboxOptions, A as CreateIntelligenceReportOptions, Ai as UploadOptions, An as ReconcileSandboxFleetsOptions, Ar as SandboxRuntimeHealth, At as GitDiff, B as DirectoryPermission, Bi as BatchEventDataMap, Bn as RolloutStatus, Br as SandboxTraceExport, Bt as GpuType, Ci as TeeAttestationResponse, Cn as ProvisionStep, Cr as SandboxIntelligenceEnvelope, Ct as FleetPromptDispatchOptions, D as CommitTaskSessionOptions, Di as ToolsConfig, Dn as PublishPublicTemplateVersionOptions, Dr as SandboxProfileSummary, Dt as GitBranch, Ei as TokenRefreshHandler, En as PublishPublicTemplateOptions, Er as SandboxPortPreviewLink, Et as GitAuth, F as CreateSandboxOptions, Fi as WriteFileOptions, Fn as Rollout, Fr as SandboxTerminalInfo, Ft as GpuLeaseExecOptions, G as DriveTurnOptions, Gi as AgentProfileConfidential, Gn as SandboxClientConfig, Gr as SearchMatch, Gt as IntelligenceReportBudget, H as DispatchedSession, Hi as BatchTaskUsage, Hn as RunCodeOptions, Hr as SandboxUser, Ht as HostAgentRuntimeBackend, I as CreateSessionOptions, Ii as WriteManyFile, In as RolloutChildResult, Ir as SandboxTerminalManager, It as GpuLeaseExecResult, J as DriverType, Ji as AgentProfileMcpServer, Jn as SandboxEvent, Jr as SecretsManager, Jt as IntelligenceReportWindow, K as DriverConfig, Ki as AgentProfileConnection, Kn as SandboxConnection, Kr as SearchOptions, Kt as IntelligenceReportCompareTo, L as CreateTaskSessionOptions, Li as WriteManyOptions, Ln as RolloutOptions, Lr as SandboxTerminalRequestOptions, Lt as GpuLeaseManager, M as CreateSandboxFleetOptions, Mi as UsageInfo, Mn as RenameOptions, Mr as SandboxRuntimeProfileList, Mt as GpuLease, Ni as WaitForOptions, Nr as SandboxStatus, Nt as GpuLeaseBilling, O as CompletedTurnResult, Oi as TurnDriveResult, On as ReapExpiredSandboxFleetsOptions, Or as SandboxResourceUsage, Ot as GitCommit, P as CreateSandboxFleetWithCoordinatorOptions, Pi as WaitForRolloutOptions, Pr as SandboxTerminalCreateOptions, Pt as GpuLeaseCommandResult, Q as EnsureDevServerOptions, Qi as AgentProfileResourceRef, Qn as SandboxFleetDispatchFailureClass, Qr as SessionBackendCredentials, Qt as ListSandboxFleetOptions, R as DeleteOptions, Ri as BatchBackendStats, Rn as RolloutScorer, Rr as SandboxTraceBundle, Rt as GpuLeaseProviderName, Si as TeeAttestationReport, Sn as ProvisionStatus, Sr as SandboxInfo, St as FleetMachineId, T as CodeResult, Ti as TeePublicKeyResponse, Tn as PublicTemplateVersionInfo, Tr as SandboxPortBinding, Tt as GPU_LEASE_PROVIDER_NAMES, U as DownloadOptions, Ui as AgentProfile, Un as SSHCommandDescriptor, Ur as ScopedToken, Ut as InstalledTool, V as DispatchPromptOptions, Vi as BatchSidecarGroup, Vn as RolloutTurnPart, Vr as SandboxTraceOptions, Vt as HostAgentDriverConfig, W as DownloadProgress, Wi as AgentProfileCapabilities, Wn as SSHCredentials, Wr as ScopedTokenScope, Wt as IntelligenceReport, X as EgressManager, Xi as AgentProfilePermissionValue, Xn as SandboxFleetArtifactSpec, Xr as SendSessionMessageRequest, Xt as ListMessagesOptions, Yi as AgentProfileModelHints, Yn as SandboxFleetArtifact, Yr as SendSessionMessageOptions, Z as EgressPolicy, Zi as AgentProfilePrompt, Zn as SandboxFleetCostEstimate, Zr as SentSessionMessage, Zt as ListOptions, _ as BatchTask, _i as TaskSessionCommitResult, _r as SandboxFleetUsage, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, aa as agentProfileSchema, ai as SessionStatus, an as NonHostAgentDriverConfig, ar as SandboxFleetMachineMeteredUsage, at as FileReadBatchResult, b as ChunkedUploadOptions, bi as TaskSessionProfile, bn as ProvisionEvent, br as SandboxFleetWorkspaceRestoreResult, bt as FleetExecDispatchOptions, c as BackendInfo, ca as defineGitHubResource, ci as SnapshotResult, cn as PreviewLinkInfo, cr as SandboxFleetManifest, ct as FileRenameResult, d as BackendType, da as validateAgentProfileSecurity, di as StartupOperation, dn as ProcessInfo, dr as SandboxFleetPolicy, dt as FileTreeOptions, ea as AgentProfileSecurityPolicy, ei as SessionForkOptions, en as McpServerConfig, er as SandboxFleetDriverCapability, et as ExactProcessSpawnOptions, f as BatchBackend, fi as StorageConfig, fn as ProcessLogEntry, fr as SandboxFleetToken, ft as FileTreeResult, g as BatchRunRequest, gi as TaskSessionChanges, gn as ProcessStatus, gr as SandboxFleetTraceOptions, gt as FleetDispatchCancelResult, h as BatchRunOptions, hi as TaskResult, hn as ProcessSpawnOptions, hr as SandboxFleetTraceExport, ht as FileWriteResult, i as AttachGpuLeaseOptions, ia as Capability, ii as SessionMessageInputPart, in as NetworkManager, ir as SandboxFleetMachine, it as FileReadBatchOptions, j as CreateRequestOptions, ji as UploadProgress, jn as ReconcileSandboxFleetsResult, jr as SandboxRuntimeProfile, jt as GitStatus, k as CreateGpuLeaseOptions, ki as UpdateUserOptions, kn as ReapExpiredSandboxFleetsResult, kr as SandboxResources, kt as GitConfig, l as BackendManager, la as defineInlineResource, ln as PreviewLinkManager, lr as SandboxFleetManifestMachine, lt as FileSystem, m as BatchResult, mi as TaskOptions, mn as ProcessSignal, mr as SandboxFleetTraceEvent, mt as FileUsageResult, n as AccessPolicyRule, na as AgentProfileValidationResult, ni as SessionListOptions, nn as MkdirOptions, nr as SandboxFleetInfo, nt as ExecResult, o as BackendCapabilities, oa as capabilitySchema, oi as SnapshotInfo, on as PermissionLevel, or as SandboxFleetMachineRecord, ot as FileReadError, p as BatchOptions, pi as SubscriptionInfo, pn as ProcessManager, pr as SandboxFleetTraceBundle, pt as FileUsageOptions, q as DriverInfo, qi as AgentProfileFileMount, qn as SandboxEnvironment, qr as SecretInfo, qt as IntelligenceReportSubjectType, r as AddUserOptions, ra as AgentSubagentProfile, ri as SessionMessage, rn as NetworkConfig, rr as SandboxFleetIntelligenceEnvelope, rt as FileInfo, s as BackendConfig, sa as defineAgentProfile, si as SnapshotOptions, sn as PermissionsManager, sr as SandboxFleetMachineSpec, st as FileReadResult, t as AcceleratorKind, ta as AgentProfileValidationIssue, ti as SessionInfo, tn as MintScopedTokenOptions, tr as SandboxFleetDriverTimings, tt as ExecOptions, u as BackendStatus, ua as mergeAgentProfiles, ui as StartupDiagnostics, un as Process, ur as SandboxFleetOperationsSummary, ut as FileTreeFile, v as BatchTaskResult, vi as TaskSessionFileChange, vn as PromptOptions, vr as SandboxFleetWorkspace, vt as FleetDispatchResultBufferOptions, wi as TeePublicKey, wn as PublicTemplateInfo, wr as SandboxPermissionsConfig, x as ChunkedUploadResult, xi as TeeAttestationOptions, xn as ProvisionResult, xr as SandboxFleetWorkspaceSnapshotResult, y as BranchOptions, yi as TaskSessionInfo, yn as PromptResult, yr as SandboxFleetWorkspaceReconcileResult, yt as FleetDispatchStreamOptions, z as DevServerInfo, zi as BatchEvent, zn as RolloutStartResult, zr as SandboxTraceEvent, zt as GpuLeaseStatus } from "./types-CKKO6y8K.js";
2
- import { C as SANDBOX_MCP_SERVER_NAME, D as buildControlPlaneMcpConfig, E as SandboxMcpServerEntry, O as buildSandboxMcpConfig, S as CONTROL_PLANE_MCP_SERVER_NAME, T as SandboxMcpEndpoint, _ as InterruptResult, a as TraceExportSink, b as BuildControlPlaneMcpConfigOptions, c as otelTraceIdForTangleTrace, d as SandboxSession, f as InteractiveAuthFile, g as InteractiveSessionStatus, h as InteractiveSessionInfo, i as TraceExportResult, l as toOtelJson, m as InteractiveSessionHost, n as SandboxInstance, o as buildTraceExportPayload, p as InteractiveSessionHandle, r as TraceExportFormat, s as exportTraceBundle, u as SandboxTaskSession, v as RespondToPermissionOptions, w as SandboxMcpConfig, x as BuildSandboxMcpConfigOptions, y as StartInteractiveOptions } from "./sandbox-CuXnqd7a.js";
3
- import { a as Team, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, i as SandboxClient, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet } from "./client-BV3kKzze.js";
1
+ import { $ as EventStreamOptions, $i as TerminalStreamToken, $n as SandboxFleetDispatchResponse, $r as SentSessionMessage, $t as ListSandboxOptions, A as CreateIntelligenceReportOptions, Ai as TurnDriveResult, An as ReconcileSandboxFleetsOptions, Ar as SandboxRuntimeHealth, At as GitDiff, B as DirectoryPermission, Bi as BatchBackendStats, Bn as RolloutStatus, Br as SandboxTraceBundle, Bt as GpuType, Ci as TeeAttestationOptions, Cn as ProvisionStep, Cr as SandboxIntelligenceEnvelope, Ct as FleetPromptDispatchOptions, D as CommitTaskSessionOptions, Di as TeePublicKeyResponse, Dn as PublishPublicTemplateVersionOptions, Dr as SandboxProfileSummary, Dt as GitBranch, Ei as TeePublicKey, En as PublishPublicTemplateOptions, Er as SandboxPortPreviewLink, Et as GitAuth, F as CreateSandboxOptions, Fi as WaitForOptions, Fn as Rollout, Fr as SandboxTerminalCreateOptions, Ft as GpuLeaseExecOptions, G as DriveTurnOptions, Gi as TERMINAL_WS_ECHO_SUBPROTOCOL, Gn as SandboxClientConfig, Gr as ScopedToken, Gt as IntelligenceReportBudget, H as DispatchedSession, Hi as BatchEventDataMap, Hn as RunCodeOptions, Hr as SandboxTraceExport, Ht as HostAgentRuntimeBackend, I as CreateSessionOptions, Ii as WaitForRolloutOptions, In as RolloutChildResult, Ir as SandboxTerminalInfo, It as GpuLeaseExecResult, J as DriverType, Ji as TerminalStream, Jn as SandboxEvent, Jr as SearchOptions, Jt as IntelligenceReportWindow, K as DriverConfig, Ki as TerminalExitInfo, Kn as SandboxConnection, Kr as ScopedTokenScope, Kt as IntelligenceReportCompareTo, L as CreateTaskSessionOptions, Li as WriteFileOptions, Ln as RolloutOptions, Lr as SandboxTerminalManager, Lt as GpuLeaseManager, M as CreateSandboxFleetOptions, Mi as UploadOptions, Mn as RenameOptions, Mr as SandboxRuntimeProfileList, Mt as GpuLease, Ni as UploadProgress, Nr as SandboxStatus, Nt as GpuLeaseBilling, O as CompletedTurnResult, Oi as TokenRefreshHandler, On as ReapExpiredSandboxFleetsOptions, Or as SandboxResourceUsage, Ot as GitCommit, P as CreateSandboxFleetWithCoordinatorOptions, Pi as UsageInfo, Pr as SandboxTerminalAttachOptions, Pt as GpuLeaseCommandResult, Q as EnsureDevServerOptions, Qi as TerminalStreamOptions, Qn as SandboxFleetDispatchFailureClass, Qr as SendSessionMessageRequest, Qt as ListSandboxFleetOptions, R as DeleteOptions, Ri as WriteManyFile, Rn as RolloutScorer, Rr as SandboxTerminalRequestOptions, Rt as GpuLeaseProviderName, Sa as validateAgentProfileSecurity, Si as TaskSessionProfile, Sn as ProvisionStatus, Sr as SandboxInfo, St as FleetMachineId, T as CodeResult, Ti as TeeAttestationResponse, Tn as PublicTemplateVersionInfo, Tr as SandboxPortBinding, Tt as GPU_LEASE_PROVIDER_NAMES, U as DownloadOptions, Ui as BatchSidecarGroup, Un as SSHCommandDescriptor, Ur as SandboxTraceOptions, Ut as InstalledTool, V as DispatchPromptOptions, Vi as BatchEvent, Vn as RolloutTurnPart, Vr as SandboxTraceEvent, Vt as HostAgentDriverConfig, W as DownloadProgress, Wi as BatchTaskUsage, Wn as SSHCredentials, Wr as SandboxUser, Wt as IntelligenceReport, X as EgressManager, Xi as TerminalStreamError, Xn as SandboxFleetArtifactSpec, Xr as SecretsManager, Xt as ListMessagesOptions, Yi as TerminalStreamAuthFormat, Yn as SandboxFleetArtifact, Yr as SecretInfo, Z as EgressPolicy, Zi as TerminalStreamHandlers, Zn as SandboxFleetCostEstimate, Zr as SendSessionMessageOptions, Zt as ListOptions, _ as BatchTask, _a as capabilitySchema, _i as TaskResult, _r as SandboxFleetUsage, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, aa as AgentProfileMcpServer, ai as SessionMessage, an as NonHostAgentDriverConfig, ar as SandboxFleetMachineMeteredUsage, at as FileReadBatchResult, b as ChunkedUploadOptions, ba as defineInlineResource, bi as TaskSessionFileChange, bn as ProvisionEvent, br as SandboxFleetWorkspaceRestoreResult, bt as FleetExecDispatchOptions, c as BackendInfo, ca as AgentProfilePrompt, ci as SnapshotInfo, cn as PreviewLinkInfo, cr as SandboxFleetManifest, ct as FileRenameResult, d as BackendType, da as AgentProfileSecurityPolicy, dn as ProcessInfo, dr as SandboxFleetPolicy, dt as FileTreeOptions, ea as AgentProfile, ei as SessionBackendCredentials, en as McpServerConfig, er as SandboxFleetDriverCapability, et as ExactProcessSpawnOptions, f as BatchBackend, fa as AgentProfileValidationIssue, fi as StartupDiagnostics, fn as ProcessLogEntry, fr as SandboxFleetToken, ft as FileTreeResult, g as BatchRunRequest, ga as agentProfileSchema, gi as TaskOptions, gn as ProcessStatus, gr as SandboxFleetTraceOptions, gt as FleetDispatchCancelResult, h as BatchRunOptions, ha as Capability, hi as SubscriptionInfo, hn as ProcessSpawnOptions, hr as SandboxFleetTraceExport, ht as FileWriteResult, i as AttachGpuLeaseOptions, ia as AgentProfileFileMount, ii as SessionListOptions, in as NetworkManager, ir as SandboxFleetMachine, it as FileReadBatchOptions, j as CreateRequestOptions, ji as UpdateUserOptions, jn as ReconcileSandboxFleetsResult, jr as SandboxRuntimeProfile, jt as GitStatus, k as CreateGpuLeaseOptions, ki as ToolsConfig, kn as ReapExpiredSandboxFleetsResult, kr as SandboxResources, kt as GitConfig, l as BackendManager, la as AgentProfileResourceRef, li as SnapshotOptions, ln as PreviewLinkManager, lr as SandboxFleetManifestMachine, lt as FileSystem, m as BatchResult, ma as AgentSubagentProfile, mi as StorageConfig, mn as ProcessSignal, mr as SandboxFleetTraceEvent, mt as FileUsageResult, n as AccessPolicyRule, na as AgentProfileConfidential, ni as SessionForkOptions, nn as MkdirOptions, nr as SandboxFleetInfo, nt as ExecResult, o as BackendCapabilities, oa as AgentProfileModelHints, oi as SessionMessageInputPart, on as PermissionLevel, or as SandboxFleetMachineRecord, ot as FileReadError, p as BatchOptions, pa as AgentProfileValidationResult, pi as StartupOperation, pn as ProcessManager, pr as SandboxFleetTraceBundle, pt as FileUsageOptions, q as DriverInfo, qi as TerminalReadyInfo, qn as SandboxEnvironment, qr as SearchMatch, qt as IntelligenceReportSubjectType, r as AddUserOptions, ra as AgentProfileConnection, ri as SessionInfo, rn as NetworkConfig, rr as SandboxFleetIntelligenceEnvelope, rt as FileInfo, s as BackendConfig, sa as AgentProfilePermissionValue, si as SessionStatus, sn as PermissionsManager, sr as SandboxFleetMachineSpec, st as FileReadResult, t as AcceleratorKind, ta as AgentProfileCapabilities, ti as SessionEventStreamOptions, tn as MintScopedTokenOptions, tr as SandboxFleetDriverTimings, tt as ExecOptions, u as BackendStatus, ua as AgentProfileResources, ui as SnapshotResult, un as Process, ur as SandboxFleetOperationsSummary, ut as FileTreeFile, v as BatchTaskResult, va as defineAgentProfile, vi as TaskSessionChanges, vn as PromptOptions, vr as SandboxFleetWorkspace, vt as FleetDispatchResultBufferOptions, wi as TeeAttestationReport, wn as PublicTemplateInfo, wr as SandboxPermissionsConfig, x as ChunkedUploadResult, xa as mergeAgentProfiles, xi as TaskSessionInfo, xn as ProvisionResult, xr as SandboxFleetWorkspaceSnapshotResult, y as BranchOptions, ya as defineGitHubResource, yi as TaskSessionCommitResult, yn as PromptResult, yr as SandboxFleetWorkspaceReconcileResult, yt as FleetDispatchStreamOptions, z as DevServerInfo, zi as WriteManyOptions, zn as RolloutStartResult, zr as SandboxTerminals, zt as GpuLeaseStatus } from "./types-B0EPTi1F.js";
2
+ import { C as CONTROL_PLANE_MCP_SERVER_NAME, D as SandboxMcpServerEntry, E as SandboxMcpEndpoint, O as buildControlPlaneMcpConfig, S as BuildSandboxMcpConfigOptions, T as SandboxMcpConfig, _ as InteractiveSessionStatus, a as TraceExportSink, b as StartInteractiveOptions, c as otelTraceIdForTangleTrace, d as SandboxSession, f as InteractiveAttachOptions, g as InteractiveSessionInfo, h as InteractiveSessionHost, i as TraceExportResult, k as buildSandboxMcpConfig, l as toOtelJson, m as InteractiveSessionHandle, n as SandboxInstance, o as buildTraceExportPayload, p as InteractiveAuthFile, r as TraceExportFormat, s as exportTraceBundle, u as SandboxTaskSession, v as InterruptResult, w as SANDBOX_MCP_SERVER_NAME, x as BuildControlPlaneMcpConfigOptions, y as RespondToPermissionOptions } from "./sandbox-i9F1XmCG.js";
3
+ import { a as Team, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, i as SandboxClient, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet } from "./client-B2WKNCtZ.js";
4
4
  import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-CyHojkuA.js";
5
5
  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-DKzapw-9.js";
6
6
  import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-B-8AMQdY.js";
7
- import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-wJTgrUG8.js";
7
+ import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-C4qh6W2h.js";
8
8
 
9
9
  //#region src/attestation-heartbeat.d.ts
10
10
  interface TeeAttestationHeartbeatSample {
@@ -1404,4 +1404,4 @@ interface RouterEvalMatrixCaseResult {
1404
1404
  }
1405
1405
  declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
1406
1406
  //#endregion
1407
- export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileSecurityPolicy, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchOptions, type BatchResult, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, type Capability, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type CodeResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DevServerInfo, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EnsureDevServerOptions, type EventStreamOptions, type ExactProcessSpawnOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileRenameResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileUsageOptions, type FileUsageResult, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type GpuType, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InteractiveSessionStatus, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type Process, type ProcessInfo, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, type Rollout, type RolloutChildResult, type RolloutOptions, type RolloutScorer, type RolloutStartResult, type RolloutStatus, type RolloutTurnPart, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunCodeOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPermissionsConfig, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxProfileSummary, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeHealth, type SandboxRuntimeProfile, type SandboxRuntimeProfileList, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionBroadcastEvent, type SessionBroadcastResult, type SessionEventStreamOptions, type SessionForkOptions, type SessionInfo, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskOptions, type TaskResult, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, TimeoutError, type TokenRefreshHandler, type ToolsConfig, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, agentProfileSchema, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, capabilitySchema, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateAgentProfileSecurity, validateDeferredProfileFileMounts };
1407
+ export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileSecurityPolicy, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchOptions, type BatchResult, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, type Capability, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type CodeResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DevServerInfo, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EnsureDevServerOptions, type EventStreamOptions, type ExactProcessSpawnOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileRenameResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileUsageOptions, type FileUsageResult, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type GpuType, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAttachOptions, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InteractiveSessionStatus, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type Process, type ProcessInfo, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, type Rollout, type RolloutChildResult, type RolloutOptions, type RolloutScorer, type RolloutStartResult, type RolloutStatus, type RolloutTurnPart, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunCodeOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPermissionsConfig, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxProfileSummary, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeHealth, type SandboxRuntimeProfile, type SandboxRuntimeProfileList, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalAttachOptions, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTerminals, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionBroadcastEvent, type SessionBroadcastResult, type SessionEventStreamOptions, type SessionForkOptions, type SessionInfo, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskOptions, type TaskResult, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, type TerminalExitInfo, type TerminalReadyInfo, TerminalStream, type TerminalStreamAuthFormat, TerminalStreamError, type TerminalStreamHandlers, type TerminalStreamOptions, type TerminalStreamToken, TimeoutError, type TokenRefreshHandler, type ToolsConfig, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, agentProfileSchema, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, capabilitySchema, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateAgentProfileSecurity, validateDeferredProfileFileMounts };
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { d as serializeForSidecar, l as normalizeRuntimeBackendConfig } from "./runtime-api-DCMrscis.js";
2
2
  import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as StateError } from "./errors-hbpL_-S6.js";
3
- import { a as SandboxSession, c as collectAgentResponseText, d as buildTraceExportPayload, f as exportTraceBundle, h as parseSSEStream, i as SandboxTaskSession, l as getSandboxEventText, m as toOtelJson, o as InteractiveSessionHandle, p as otelTraceIdForTangleTrace, s as applySandboxEventText, t as SandboxInstance } from "./sandbox-DnDmHM5x.js";
4
- import { a as splitInlineProfileSkills, c as SandboxFleetClient, d as SANDBOX_SIZE_PRESET_NAMES, f as resolveSandboxResources, i as splitInlineProfileFileMounts, l as DEFAULT_SANDBOX_SIZE, n as SandboxClient, o as validateDeferredProfileFileMounts, p as sandboxResourcesForSize, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as SANDBOX_SIZE_PRESETS } from "./client-DAGPD4d-.js";
3
+ import { _ as toOtelJson, a as TerminalStream, c as SandboxSession, d as collectAgentResponseText, f as getSandboxEventText, g as otelTraceIdForTangleTrace, h as exportTraceBundle, i as TERMINAL_WS_ECHO_SUBPROTOCOL, l as InteractiveSessionHandle, m as buildTraceExportPayload, o as TerminalStreamError, s as SandboxTaskSession, t as SandboxInstance, u as applySandboxEventText, v as parseSSEStream } from "./sandbox-DIh_cMZL.js";
4
+ import { a as splitInlineProfileSkills, c as SandboxFleetClient, d as SANDBOX_SIZE_PRESET_NAMES, f as resolveSandboxResources, i as splitInlineProfileFileMounts, l as DEFAULT_SANDBOX_SIZE, n as SandboxClient, o as validateDeferredProfileFileMounts, p as sandboxResourcesForSize, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as SANDBOX_SIZE_PRESETS } from "./client-DNi_lq1C.js";
5
5
  import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-CeNQA9H_.js";
6
- import { t as TangleSandboxClient } from "./tangle-BaTM5dI_.js";
6
+ import { t as TangleSandboxClient } from "./tangle-DvSHze2O.js";
7
7
  import { agentProfileSchema, capabilitySchema, defineAgentProfile, defineGitHubResource, defineInlineResource, mergeAgentProfiles, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
8
8
  //#region src/confidential.ts
9
9
  function generateAttestationNonce(bytes = 32) {
@@ -1454,4 +1454,4 @@ function stripUndefined(value) {
1454
1454
  return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => [k, stripUndefined(v)]));
1455
1455
  }
1456
1456
  //#endregion
1457
- export { AuthError, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, DEFAULT_SANDBOX_SIZE, EgressProxyRecoveryError, GPU_LEASE_PROVIDER_NAMES, Image, ImageBuilder, IntelligenceClient, InteractiveSessionHandle, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, NetworkError, NotFoundError, PartialFailureError, QuotaError, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxSession, SandboxTaskSession, ServerError, StateError, TangleSandboxClient, TimeoutError, ValidationError, agentProfileSchema, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, capabilitySchema, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateAgentProfileSecurity, validateDeferredProfileFileMounts };
1457
+ export { AuthError, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, DEFAULT_SANDBOX_SIZE, EgressProxyRecoveryError, GPU_LEASE_PROVIDER_NAMES, Image, ImageBuilder, IntelligenceClient, InteractiveSessionHandle, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, NetworkError, NotFoundError, PartialFailureError, QuotaError, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxSession, SandboxTaskSession, ServerError, StateError, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, TerminalStream, TerminalStreamError, TimeoutError, ValidationError, agentProfileSchema, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, capabilitySchema, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateAgentProfileSecurity, validateDeferredProfileFileMounts };
package/dist/runtime.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Ar as SandboxRuntimeHealth, D as CommitTaskSessionOptions, Fi as WriteFileOptions, Fr as SandboxTerminalInfo, I as CreateSessionOptions, Ir as SandboxTerminalManager, L as CreateTaskSessionOptions, Lr as SandboxTerminalRequestOptions, Mn as RenameOptions, Mr as SandboxRuntimeProfileList, Pr as SandboxTerminalCreateOptions, Tr as SandboxPortBinding, Xr as SendSessionMessageRequest, Xt as ListMessagesOptions, Yr as SendSessionMessageOptions, Zr as SentSessionMessage, _i as TaskSessionCommitResult, at as FileReadBatchResult, b as ChunkedUploadOptions, ct as FileRenameResult, dt as FileTreeOptions, ft as FileTreeResult, gi as TaskSessionChanges, ht as FileWriteResult, it as FileReadBatchOptions, ji as UploadProgress, mt as FileUsageResult, pt as FileUsageOptions, ri as SessionMessage, ti as SessionInfo, x as ChunkedUploadResult, yi as TaskSessionInfo } from "./types-CKKO6y8K.js";
1
+ import { $r as SentSessionMessage, Ar as SandboxRuntimeHealth, D as CommitTaskSessionOptions, Fr as SandboxTerminalCreateOptions, I as CreateSessionOptions, Ir as SandboxTerminalInfo, L as CreateTaskSessionOptions, Li as WriteFileOptions, Lr as SandboxTerminalManager, Mn as RenameOptions, Mr as SandboxRuntimeProfileList, Ni as UploadProgress, Qr as SendSessionMessageRequest, Rr as SandboxTerminalRequestOptions, Tr as SandboxPortBinding, Xt as ListMessagesOptions, Zr as SendSessionMessageOptions, ai as SessionMessage, at as FileReadBatchResult, b as ChunkedUploadOptions, ct as FileRenameResult, dt as FileTreeOptions, ft as FileTreeResult, ht as FileWriteResult, it as FileReadBatchOptions, mt as FileUsageResult, pt as FileUsageOptions, ri as SessionInfo, vi as TaskSessionChanges, x as ChunkedUploadResult, xi as TaskSessionInfo, yi as TaskSessionCommitResult } from "./types-B0EPTi1F.js";
2
2
  import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-B-8AMQdY.js";
3
3
 
4
4
  //#region src/lib/chunked-upload.d.ts
@@ -433,8 +433,9 @@ var InteractiveSessionHandle = class {
433
433
  }
434
434
  /**
435
435
  * Spawn the harness's interactive TUI for this session. Returns the
436
- * `streamUrl` to attach a terminal client to. Throws if the harness has no
437
- * interactive entrypoint (e.g. cursor, which is SDK-only), the binary is
436
+ * `streamUrl` of the live framebuffer — open it programmatically with
437
+ * `attach()`, or hand it to a terminal frontend. Throws if the harness has
438
+ * no interactive entrypoint (e.g. cursor, which is SDK-only), the binary is
438
439
  * not installed, or a session is already running for this id.
439
440
  */
440
441
  start(options) {
@@ -445,6 +446,22 @@ var InteractiveSessionHandle = class {
445
446
  return this.host._sendInteractivePrompt(this.sessionId, prompt);
446
447
  }
447
448
  /**
449
+ * Attach to the live harness PTY as a {@link TerminalStream}: the same PTY
450
+ * the interactive TUI runs in (the sidecar keys it by this session id), so
451
+ * the stream sees the harness's screen and its keystrokes drive the
452
+ * harness — never a fresh shell. The host mints a short-lived scoped
453
+ * terminal token and dials the session's `streamUrl` through the secured
454
+ * sidecar proxy; resolves once the server acknowledges the attach (the
455
+ * buffered screen then replays through `handlers.onData`).
456
+ *
457
+ * Throws when no interactive session is running for this id — attach after
458
+ * `start()`, or to a session another caller started.
459
+ */
460
+ attach(options) {
461
+ if (!this.host._attachInteractive) return Promise.reject(/* @__PURE__ */ new Error("Interactive session attach is not supported by this host"));
462
+ return this.host._attachInteractive(this.sessionId, options);
463
+ }
464
+ /**
448
465
  * Observe the session: running, exited (with its exit code), or `null`
449
466
  * when the sidecar no longer knows the id. Poll this to detect completion —
450
467
  * an interactive session has no structured result stream, so the exit
@@ -665,6 +682,317 @@ var SandboxTaskSession = class extends SandboxSession {
665
682
  }
666
683
  };
667
684
  //#endregion
685
+ //#region src/terminal-stream.ts
686
+ /** A protocol `error` control frame or a transport failure. */
687
+ var TerminalStreamError = class extends Error {
688
+ /** Protocol error code (e.g. `INIT_FAILED`) or `TRANSPORT` for socket faults. */
689
+ code;
690
+ constructor(message, code) {
691
+ super(message);
692
+ this.name = "TerminalStreamError";
693
+ this.code = code;
694
+ }
695
+ };
696
+ /**
697
+ * The sidecar caps WebSocket frames at 1 MiB (`WS_MAX_PAYLOAD_BYTES` in
698
+ * `apps/sidecar/src/routes/terminal-ws.ts`) and drops the connection on
699
+ * larger frames. `write()` chunks input so every serialized `input` frame
700
+ * stays under that cap: 128 Ki characters per chunk × a worst-case JSON
701
+ * escape expansion of 6 bytes per character (`` etc.) ≈ 768 KiB,
702
+ * comfortably below the limit including the frame's JSON envelope.
703
+ */
704
+ const INPUT_FRAME_CHUNK_CHARS = 128 * 1024;
705
+ const DEFAULT_COLS = 80;
706
+ const DEFAULT_ROWS = 24;
707
+ const DEFAULT_CONNECT_TIMEOUT_MS = 15e3;
708
+ /** Geometry bounds mirrored from the sidecar's init/resize schemas. */
709
+ const MIN_DIMENSION = 1;
710
+ const MAX_DIMENSION = 4096;
711
+ const EDGE_BEARER_SUBPROTOCOL_PREFIX = "bearer.";
712
+ const SIDECAR_BEARER_SUBPROTOCOL_PREFIX = "tangle.bearer.";
713
+ /**
714
+ * Fixed non-credential marker offered on EVERY dial (both auth formats),
715
+ * giving a spec-compliant server something safe to select into the 101's
716
+ * `Sec-WebSocket-Protocol`. Two reasons it exists:
717
+ *
718
+ * 1. RFC 6455 §4.1 says a client that offered subprotocols MUST fail the
719
+ * connection when the server selects none. Node's WebSocket (undici,
720
+ * per the WHATWG spec) enforces this strictly; browsers are lenient and
721
+ * tolerate a 101 with no selected subprotocol — which is why the
722
+ * browser-only reference client got away with offering just the
723
+ * credential.
724
+ * 2. The server must never echo the token-bearing offer back (that would
725
+ * leak the live credential into a response header) — so it needs a
726
+ * non-credential protocol it CAN select.
727
+ */
728
+ const TERMINAL_WS_ECHO_SUBPROTOCOL = "tangle.terminal.v1";
729
+ /**
730
+ * base64url-encode a UTF-8 string without padding — the exact envelope the
731
+ * edge's `parseTerminalWsSubprotocolToken` decodes (its strict round-trip
732
+ * check tolerates padding, but the reference browser client emits unpadded).
733
+ */
734
+ function base64UrlEncodeUtf8(value) {
735
+ if (typeof btoa !== "function") throw new TerminalStreamError("global btoa is unavailable; cannot build the edge bearer subprotocol", "ENVIRONMENT");
736
+ const bytes = new TextEncoder().encode(value);
737
+ let binary = "";
738
+ for (const byte of bytes) binary += String.fromCharCode(byte);
739
+ return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
740
+ }
741
+ function buildAuthSubprotocols(format, token) {
742
+ if (format === "sidecar-direct") return [`${SIDECAR_BEARER_SUBPROTOCOL_PREFIX}${token}`, TERMINAL_WS_ECHO_SUBPROTOCOL];
743
+ return [`${EDGE_BEARER_SUBPROTOCOL_PREFIX}${base64UrlEncodeUtf8(token)}`, TERMINAL_WS_ECHO_SUBPROTOCOL];
744
+ }
745
+ /**
746
+ * Resolve the dial credential: invoke a provider (fresh token per dial) or
747
+ * pass a string through. Fails loud on an empty result — a blank credential
748
+ * would dial and be rejected with an opaque 401 downstream.
749
+ */
750
+ async function resolveTerminalToken(token) {
751
+ const value = typeof token === "function" ? await token() : token;
752
+ if (typeof value !== "string" || !value.trim()) throw new TerminalStreamError(typeof token === "function" ? "Terminal stream token provider returned an empty token" : "Terminal stream token must not be empty", "INVALID_TOKEN");
753
+ return value;
754
+ }
755
+ function toWebSocketUrl(url) {
756
+ let parsed;
757
+ try {
758
+ parsed = new URL(url);
759
+ } catch {
760
+ throw new TerminalStreamError(`Terminal WebSocket URL is not absolute: ${url}`, "INVALID_URL");
761
+ }
762
+ if (parsed.protocol === "https:") parsed.protocol = "wss:";
763
+ else if (parsed.protocol === "http:") parsed.protocol = "ws:";
764
+ if (parsed.protocol !== "wss:" && parsed.protocol !== "ws:") throw new TerminalStreamError(`Terminal WebSocket URL must be ws(s) or http(s), got ${parsed.protocol}`, "INVALID_URL");
765
+ return parsed.toString();
766
+ }
767
+ function assertDimension(name, value) {
768
+ if (!Number.isInteger(value) || value < MIN_DIMENSION || value > MAX_DIMENSION) throw new TerminalStreamError(`${name} must be an integer in [${MIN_DIMENSION}, ${MAX_DIMENSION}], got ${value}`, "INVALID_DIMENSION");
769
+ }
770
+ /**
771
+ * Split input so each serialized `input` frame stays under the server's
772
+ * 1 MiB frame cap, without splitting a surrogate pair across frames (a torn
773
+ * pair would reach the PTY as two invalid UTF-8 writes).
774
+ */
775
+ function* chunkInput(text) {
776
+ if (text.length <= INPUT_FRAME_CHUNK_CHARS) {
777
+ yield text;
778
+ return;
779
+ }
780
+ let index = 0;
781
+ while (index < text.length) {
782
+ let end = Math.min(index + INPUT_FRAME_CHUNK_CHARS, text.length);
783
+ if (end < text.length) {
784
+ const trailing = text.charCodeAt(end - 1);
785
+ if (trailing >= 55296 && trailing <= 56319) end -= 1;
786
+ }
787
+ yield text.slice(index, end);
788
+ index = end;
789
+ }
790
+ }
791
+ /**
792
+ * Client for one terminal WebSocket connection. Construct via
793
+ * {@link TerminalStream.connect}, which resolves once the server
794
+ * acknowledges the attach with `ready` (history replay then streams through
795
+ * `handlers.onData`).
796
+ */
797
+ var TerminalStream = class TerminalStream {
798
+ ws;
799
+ options;
800
+ handlers;
801
+ readyInfo = null;
802
+ closed = false;
803
+ closeWaiters = [];
804
+ textDecoder = new TextDecoder();
805
+ /**
806
+ * Dial the endpoint, send `init` as the first frame, and resolve once the
807
+ * server responds `ready`. Rejects on a protocol `error` frame, a socket
808
+ * close/failure before `ready`, or the connect timeout — always with the
809
+ * reason the server gave. A token PROVIDER is awaited here, before the
810
+ * socket opens, so every dial (first connect and each reconnect) carries a
811
+ * fresh credential.
812
+ */
813
+ static async connect(options) {
814
+ return new TerminalStream(options, await resolveTerminalToken(options.token)).establish();
815
+ }
816
+ constructor(options, resolvedToken) {
817
+ if (!options.connectionId.trim()) throw new TerminalStreamError("Terminal stream connectionId must not be empty", "INVALID_CONNECTION_ID");
818
+ if (options.cols !== void 0) assertDimension("cols", options.cols);
819
+ if (options.rows !== void 0) assertDimension("rows", options.rows);
820
+ const WebSocketCtor = globalThis.WebSocket;
821
+ if (typeof WebSocketCtor !== "function") throw new TerminalStreamError("global WebSocket is unavailable in this environment (Node >= 22 or a browser is required)", "ENVIRONMENT");
822
+ this.options = options;
823
+ this.handlers = options.handlers ?? {};
824
+ this.ws = new WebSocketCtor(toWebSocketUrl(options.url), buildAuthSubprotocols(options.authFormat ?? "edge", resolvedToken));
825
+ this.ws.binaryType = "arraybuffer";
826
+ }
827
+ establish() {
828
+ return new Promise((resolve, reject) => {
829
+ let settled = false;
830
+ const timeoutMs = this.options.connectTimeoutMs ?? DEFAULT_CONNECT_TIMEOUT_MS;
831
+ const timer = setTimeout(() => {
832
+ fail(new TerminalStreamError(`Terminal attach timed out after ${timeoutMs}ms waiting for ready`, "CONNECT_TIMEOUT"));
833
+ this.ws.close(1e3, "connect timeout");
834
+ }, timeoutMs);
835
+ const succeed = () => {
836
+ if (settled) return;
837
+ settled = true;
838
+ clearTimeout(timer);
839
+ resolve(this);
840
+ };
841
+ const fail = (error) => {
842
+ if (settled) return;
843
+ settled = true;
844
+ clearTimeout(timer);
845
+ reject(error);
846
+ };
847
+ this.ws.addEventListener("open", () => {
848
+ this.ws.send(JSON.stringify({
849
+ type: "init",
850
+ connectionId: this.options.connectionId,
851
+ cols: this.options.cols ?? DEFAULT_COLS,
852
+ rows: this.options.rows ?? DEFAULT_ROWS,
853
+ ...this.options.command !== void 0 ? { command: this.options.command } : {},
854
+ ...this.options.cwd !== void 0 ? { cwd: this.options.cwd } : {},
855
+ ...this.options.env !== void 0 ? { env: this.options.env } : {}
856
+ }));
857
+ });
858
+ this.ws.addEventListener("message", (event) => {
859
+ this.handleMessage(event.data, {
860
+ succeed,
861
+ fail,
862
+ settled: () => settled
863
+ });
864
+ });
865
+ this.ws.addEventListener("error", () => {
866
+ fail(new TerminalStreamError("Terminal WebSocket transport failed before ready", "TRANSPORT"));
867
+ });
868
+ this.ws.addEventListener("close", (event) => {
869
+ this.closed = true;
870
+ fail(new TerminalStreamError(`Terminal WebSocket closed before ready (code ${event.code}${event.reason ? `: ${event.reason}` : ""})`, "CLOSED_BEFORE_READY"));
871
+ for (const waiter of this.closeWaiters) waiter();
872
+ this.closeWaiters = [];
873
+ this.handlers.onClose?.(event.code, event.reason);
874
+ });
875
+ });
876
+ }
877
+ handleMessage(data, connectPhase) {
878
+ if (typeof data !== "string") {
879
+ if (data instanceof ArrayBuffer) this.handlers.onData?.(new Uint8Array(data));
880
+ return;
881
+ }
882
+ let message;
883
+ try {
884
+ message = JSON.parse(data);
885
+ } catch {
886
+ this.handlers.onError?.(new TerminalStreamError("Terminal control frame is not valid JSON", "INVALID_FRAME"));
887
+ return;
888
+ }
889
+ switch (message.type) {
890
+ case "ready": {
891
+ const info = {
892
+ connectionId: String(message.connectionId ?? ""),
893
+ sessionId: String(message.sessionId ?? ""),
894
+ restored: message.restored === true,
895
+ detachTimeoutMs: Number(message.detachTimeoutMs ?? 0)
896
+ };
897
+ this.readyInfo = info;
898
+ connectPhase.succeed();
899
+ this.handlers.onReady?.(info);
900
+ return;
901
+ }
902
+ case "exit":
903
+ this.handlers.onExit?.({
904
+ exitCode: typeof message.exitCode === "number" ? message.exitCode : void 0,
905
+ exitSignal: typeof message.exitSignal === "string" ? message.exitSignal : void 0
906
+ });
907
+ return;
908
+ case "error": {
909
+ const error = new TerminalStreamError(typeof message.message === "string" ? message.message : "terminal error", typeof message.code === "string" ? message.code : "UNKNOWN");
910
+ if (!connectPhase.settled()) {
911
+ connectPhase.fail(error);
912
+ return;
913
+ }
914
+ this.handlers.onError?.(error);
915
+ return;
916
+ }
917
+ case "rec":
918
+ case "rec.done": return;
919
+ default: return;
920
+ }
921
+ }
922
+ /** PTY connection id this stream is attached to. */
923
+ get connectionId() {
924
+ return this.options.connectionId;
925
+ }
926
+ /** The server's `ready` acknowledgement. Set once `connect()` resolves. */
927
+ get ready() {
928
+ if (!this.readyInfo) throw new TerminalStreamError("Terminal stream is not ready yet", "NOT_READY");
929
+ return this.readyInfo;
930
+ }
931
+ /** True while the socket is open. */
932
+ get isOpen() {
933
+ return !this.closed && this.ws.readyState === WebSocket.OPEN;
934
+ }
935
+ /**
936
+ * Send input keystrokes to the PTY. `Uint8Array` input is decoded as
937
+ * UTF-8 (the wire protocol carries input as JSON text). Input larger than
938
+ * the server's 1 MiB frame cap is split across multiple `input` frames in
939
+ * order on the same socket, so delivery order is preserved.
940
+ */
941
+ write(data) {
942
+ this.assertOpen("write");
943
+ const text = typeof data === "string" ? data : this.textDecoder.decode(data);
944
+ for (const chunk of chunkInput(text)) this.ws.send(JSON.stringify({
945
+ type: "input",
946
+ data: chunk
947
+ }));
948
+ }
949
+ /** Resize the PTY. */
950
+ resize(cols, rows) {
951
+ assertDimension("cols", cols);
952
+ assertDimension("rows", rows);
953
+ this.assertOpen("resize");
954
+ this.ws.send(JSON.stringify({
955
+ type: "resize",
956
+ cols,
957
+ rows
958
+ }));
959
+ }
960
+ /**
961
+ * Detach cleanly: close the socket and resolve once the close completes.
962
+ * The PTY survives server-side for `ready.detachTimeoutMs` (5 minutes
963
+ * today) — reattach within that window via {@link reconnect} (or a fresh
964
+ * `connect()` with the same connectionId) to replay history and continue.
965
+ */
966
+ close() {
967
+ if (this.closed) return Promise.resolve();
968
+ return new Promise((resolve) => {
969
+ this.closeWaiters.push(resolve);
970
+ this.ws.close(1e3, "client detach");
971
+ });
972
+ }
973
+ /**
974
+ * Re-dial the same endpoint with the same connectionId on a fresh socket
975
+ * — the server reattaches the PTY and replays its buffered history. When
976
+ * the stream was constructed with a token PROVIDER, it is re-invoked for
977
+ * the new dial (scoped terminal tokens expire within minutes, so the
978
+ * original credential may be dead by reconnect time); with a plain string
979
+ * token, pass a fresh `token` override yourself when it may have expired.
980
+ * `handlers` rebinds callbacks for the new stream.
981
+ */
982
+ reconnect(overrides) {
983
+ return TerminalStream.connect({
984
+ ...this.options,
985
+ token: overrides?.token ?? this.options.token,
986
+ handlers: overrides?.handlers ?? this.options.handlers,
987
+ cols: overrides?.cols ?? this.options.cols,
988
+ rows: overrides?.rows ?? this.options.rows
989
+ });
990
+ }
991
+ assertOpen(action) {
992
+ if (!this.isOpen) throw new TerminalStreamError(`Cannot ${action}: terminal stream is not open`, "NOT_OPEN");
993
+ }
994
+ };
995
+ //#endregion
668
996
  //#region src/sandbox.ts
669
997
  /**
670
998
  * Sandbox Instance
@@ -2279,9 +2607,16 @@ var SandboxInstance = class SandboxInstance {
2279
2607
  async ports() {
2280
2608
  return this.runtime.ports();
2281
2609
  }
2282
- /** Interactive terminal operations for this runtime. */
2610
+ /**
2611
+ * Interactive terminal operations for this runtime: the REST manager
2612
+ * (create/input/list/get) plus `attach()`, which opens the live terminal
2613
+ * WebSocket as a {@link TerminalStream}.
2614
+ */
2283
2615
  get terminals() {
2284
- return this.runtime.terminals;
2616
+ return {
2617
+ ...this.runtime.terminals,
2618
+ attach: (connectionId, options) => this._attachTerminal(connectionId, options)
2619
+ };
2285
2620
  }
2286
2621
  /** List profiles installed in this sandbox runtime. */
2287
2622
  async listProfiles() {
@@ -4899,6 +5234,86 @@ var SandboxInstance = class SandboxInstance {
4899
5234
  });
4900
5235
  return data;
4901
5236
  }
5237
+ /**
5238
+ * @internal Test seam: unit tests replace this to intercept terminal
5239
+ * WebSocket dials without opening a real socket. Production paths always
5240
+ * go through `TerminalStream.connect`.
5241
+ */
5242
+ _terminalStreamConnect = (options) => TerminalStream.connect(options);
5243
+ /**
5244
+ * Resolve a sandbox-relative terminal stream path against the browser-safe
5245
+ * sidecar proxy base returned by the scoped-token mint. Concatenation, not
5246
+ * URL resolution: the proxy base carries a path prefix
5247
+ * (`/v1/sidecar-proxy/{id}`) that `new URL(absolutePath, base)` would drop.
5248
+ */
5249
+ resolveTerminalStreamUrl(sidecarProxyUrl, streamPath) {
5250
+ if (!streamPath.startsWith("/")) throw new ServerError(`Terminal stream path must be sandbox-relative (got "${streamPath}")`, 502, { origin: "runtime" });
5251
+ return `${sidecarProxyUrl.replace(/\/+$/, "")}${streamPath}`;
5252
+ }
5253
+ /** @internal — invoked by InteractiveSessionHandle.attach(). */
5254
+ async _attachInteractive(id, options = {}) {
5255
+ const status = await this._interactiveStatus(id);
5256
+ if (!status) throw new NotFoundError("Interactive session", id, {
5257
+ origin: "runtime",
5258
+ endpoint: `/agents/sessions/${encodeURIComponent(id)}/interactive`
5259
+ });
5260
+ if (status.state !== "running") throw new StateError(`Interactive session ${id} has exited; there is no live PTY to attach`, status.state, "running", {
5261
+ origin: "runtime",
5262
+ endpoint: `/agents/sessions/${encodeURIComponent(id)}/interactive`
5263
+ }, "INTERACTIVE_SESSION_EXITED");
5264
+ const scoped = await this.mintScopedToken({
5265
+ scope: "session-runtime",
5266
+ sessionId: id
5267
+ });
5268
+ return this._terminalStreamConnect({
5269
+ url: this.resolveTerminalStreamUrl(scoped.sidecarProxyUrl, status.streamUrl),
5270
+ token: this.terminalTokenProvider(scoped.token, id),
5271
+ connectionId: id,
5272
+ cols: options.cols,
5273
+ rows: options.rows,
5274
+ handlers: options.handlers
5275
+ });
5276
+ }
5277
+ /**
5278
+ * Per-dial credential for a terminal attach. The first dial consumes the
5279
+ * token minted alongside the proxy URL (no second mint); every later dial
5280
+ * (a `reconnect()` after the socket dropped or the detach window) re-mints,
5281
+ * because scoped terminal tokens are clamped to a <= 15-minute TTL and the
5282
+ * original is likely dead by then.
5283
+ */
5284
+ terminalTokenProvider(initialToken, sessionId) {
5285
+ let unused = initialToken;
5286
+ return async () => {
5287
+ if (unused !== null) {
5288
+ const token = unused;
5289
+ unused = null;
5290
+ return token;
5291
+ }
5292
+ return (await this.mintScopedToken({
5293
+ scope: "session-runtime",
5294
+ sessionId
5295
+ })).token;
5296
+ };
5297
+ }
5298
+ /** @internal — invoked by `box.terminals.attach()`. */
5299
+ async _attachTerminal(connectionId, options = {}) {
5300
+ if (!connectionId.trim()) throw new ValidationError("Terminal connectionId is required");
5301
+ const scoped = await this.mintScopedToken({
5302
+ scope: "session-runtime",
5303
+ sessionId: connectionId
5304
+ });
5305
+ return this._terminalStreamConnect({
5306
+ url: this.resolveTerminalStreamUrl(scoped.sidecarProxyUrl, `/terminals/${encodeURIComponent(connectionId)}/ws`),
5307
+ token: this.terminalTokenProvider(scoped.token, connectionId),
5308
+ connectionId,
5309
+ cols: options.cols,
5310
+ rows: options.rows,
5311
+ command: options.command,
5312
+ cwd: options.cwd,
5313
+ env: options.env,
5314
+ handlers: options.handlers
5315
+ });
5316
+ }
4902
5317
  /** @internal — invoked by InteractiveSessionHandle.stop(). */
4903
5318
  async _stopInteractive(id) {
4904
5319
  await this.ensureRunning();
@@ -5108,4 +5523,4 @@ function quoteForShell(value) {
5108
5523
  return `'${value.replace(/'/g, "'\\''")}'`;
5109
5524
  }
5110
5525
  //#endregion
5111
- export { SandboxSession as a, collectAgentResponseText as c, buildTraceExportPayload as d, exportTraceBundle as f, parseSSEStream as h, SandboxTaskSession as i, getSandboxEventText as l, toOtelJson as m, createSandboxInstanceFromResponse as n, InteractiveSessionHandle as o, otelTraceIdForTangleTrace as p, normalizeStartupDiagnostics as r, applySandboxEventText as s, SandboxInstance as t, normalizeConnection as u };
5526
+ export { toOtelJson as _, TerminalStream as a, SandboxSession as c, collectAgentResponseText as d, getSandboxEventText as f, otelTraceIdForTangleTrace as g, exportTraceBundle as h, TERMINAL_WS_ECHO_SUBPROTOCOL as i, InteractiveSessionHandle as l, buildTraceExportPayload as m, createSandboxInstanceFromResponse as n, TerminalStreamError as o, normalizeConnection as p, normalizeStartupDiagnostics as r, SandboxTaskSession as s, SandboxInstance as t, applySandboxEventText as u, parseSSEStream as v };
@@ -1,4 +1,4 @@
1
- import { $ as EventStreamOptions, $r as SessionEventStreamOptions, Ar as SandboxRuntimeHealth, At as GitDiff, C as CodeExecutionResult, Ci as TeeAttestationResponse, D as CommitTaskSessionOptions, Dt as GitBranch, Fi as WriteFileOptions, Fn as Rollout, G as DriveTurnOptions, Gr as SearchMatch, Gt as IntelligenceReportBudget, H as DispatchedSession, I as CreateSessionOptions, Ii as WriteManyFile, Ir as SandboxTerminalManager, Jn as SandboxEvent, Jt as IntelligenceReportWindow, Kn as SandboxConnection, Kr as SearchOptions, Kt as IntelligenceReportCompareTo, L as CreateTaskSessionOptions, Li as WriteManyOptions, Ln as RolloutOptions, Lt as GpuLeaseManager, Mr as SandboxRuntimeProfileList, Mt as GpuLease, Ni as WaitForOptions, Nn as RestoreSnapshotOptions, Nr as SandboxStatus, O as CompletedTurnResult, Oi as TurnDriveResult, Or as SandboxResourceUsage, Ot as GitCommit, Pi as WaitForRolloutOptions, Pn as ResumeOptions, Rr as SandboxTraceBundle, S as CodeExecutionOptions, Sr as SandboxInfo, Ti as TeePublicKeyResponse, Tr as SandboxPortBinding, Un as SSHCommandDescriptor, Ur as ScopedToken, Ut as InstalledTool, V as DispatchPromptOptions, Vr as SandboxTraceOptions, Wn as SSHCredentials, Wt as IntelligenceReport, X as EgressManager, Xr as SendSessionMessageRequest, Xt as ListMessagesOptions, Y as DurablePlan, Yr as SendSessionMessageOptions, Yt as JsonValue, Zr as SentSessionMessage, _i as TaskSessionCommitResult, _n as PromptInputPart, bn as ProvisionEvent, ci as SnapshotResult, ei as SessionForkOptions, gi as TaskSessionChanges, hi as TaskResult, ht as FileWriteResult, in as NetworkManager, jt as GitStatus, l as BackendManager, ln as PreviewLinkManager, lt as FileSystem, mi as TaskOptions, ni as SessionListOptions, nt as ExecResult, oi as SnapshotInfo, pn as ProcessManager, pr as SandboxFleetTraceBundle, q as DriverInfo, ri as SessionMessage, s as BackendConfig, si as SnapshotOptions, sn as PermissionsManager, ti as SessionInfo, tn as MintScopedTokenOptions, tt as ExecOptions, ui as StartupDiagnostics, vn as PromptOptions, w as CodeLanguage, xi as TeeAttestationOptions, xn as ProvisionResult, y as BranchOptions, yi as TaskSessionInfo, yn as PromptResult, zn as RolloutStartResult } from "./types-CKKO6y8K.js";
1
+ import { $ as EventStreamOptions, $r as SentSessionMessage, Ai as TurnDriveResult, Ar as SandboxRuntimeHealth, At as GitDiff, Br as SandboxTraceBundle, C as CodeExecutionResult, Ci as TeeAttestationOptions, D as CommitTaskSessionOptions, Di as TeePublicKeyResponse, Dt as GitBranch, Fi as WaitForOptions, Fn as Rollout, G as DriveTurnOptions, Gr as ScopedToken, Gt as IntelligenceReportBudget, H as DispatchedSession, I as CreateSessionOptions, Ii as WaitForRolloutOptions, Ji as TerminalStream, Jn as SandboxEvent, Jr as SearchOptions, Jt as IntelligenceReportWindow, Kn as SandboxConnection, Kt as IntelligenceReportCompareTo, L as CreateTaskSessionOptions, Li as WriteFileOptions, Ln as RolloutOptions, Lt as GpuLeaseManager, Mr as SandboxRuntimeProfileList, Mt as GpuLease, Nn as RestoreSnapshotOptions, Nr as SandboxStatus, O as CompletedTurnResult, Or as SandboxResourceUsage, Ot as GitCommit, Pn as ResumeOptions, Pr as SandboxTerminalAttachOptions, Qr as SendSessionMessageRequest, Ri as WriteManyFile, S as CodeExecutionOptions, Sr as SandboxInfo, Ti as TeeAttestationResponse, Tr as SandboxPortBinding, Un as SSHCommandDescriptor, Ur as SandboxTraceOptions, Ut as InstalledTool, V as DispatchPromptOptions, Wn as SSHCredentials, Wt as IntelligenceReport, X as EgressManager, Xt as ListMessagesOptions, Y as DurablePlan, Yt as JsonValue, Zi as TerminalStreamHandlers, Zr as SendSessionMessageOptions, _i as TaskResult, _n as PromptInputPart, ai as SessionMessage, bn as ProvisionEvent, ci as SnapshotInfo, fi as StartupDiagnostics, gi as TaskOptions, ht as FileWriteResult, ii as SessionListOptions, in as NetworkManager, jt as GitStatus, l as BackendManager, li as SnapshotOptions, ln as PreviewLinkManager, lt as FileSystem, ni as SessionForkOptions, nt as ExecResult, pn as ProcessManager, pr as SandboxFleetTraceBundle, q as DriverInfo, qr as SearchMatch, ri as SessionInfo, s as BackendConfig, sn as PermissionsManager, ti as SessionEventStreamOptions, tn as MintScopedTokenOptions, tt as ExecOptions, ui as SnapshotResult, vi as TaskSessionChanges, vn as PromptOptions, w as CodeLanguage, xi as TaskSessionInfo, xn as ProvisionResult, y as BranchOptions, yi as TaskSessionCommitResult, yn as PromptResult, zi as WriteManyOptions, zn as RolloutStartResult, zr as SandboxTerminals } from "./types-B0EPTi1F.js";
2
2
  import { AgentProfile } from "@tangle-network/agent-interface";
3
3
 
4
4
  //#region src/mcp.d.ts
@@ -184,6 +184,19 @@ type InteractiveSessionStatus = {
184
184
  exitSignal?: string; /** "exited" = the process ended on its own; "stopped" = explicit stop(). */
185
185
  reason: "exited" | "stopped";
186
186
  };
187
+ /** Options for `InteractiveSessionHandle.attach()`. */
188
+ interface InteractiveAttachOptions {
189
+ /** Initial PTY geometry reported in the attach init frame. */
190
+ cols?: number;
191
+ rows?: number;
192
+ /**
193
+ * Stream callbacks, bound before the socket opens. Register `onData` here:
194
+ * the server replays the session's buffered screen immediately after the
195
+ * attach acknowledgement, so a handler added after `attach()` resolves
196
+ * would miss the replayed frames.
197
+ */
198
+ handlers?: TerminalStreamHandlers;
199
+ }
187
200
  /** Decision passed to `respondToPermission`. */
188
201
  interface RespondToPermissionOptions {
189
202
  /** The human's decision for the awaiting permission interaction. */
@@ -215,6 +228,12 @@ interface InteractiveSessionHost {
215
228
  * clear "not supported" error instead of failing to compile downstream.
216
229
  */
217
230
  _interactiveStatus?(id: string): Promise<InteractiveSessionStatus | null>;
231
+ /**
232
+ * Optional for the same additive-change reason as `_interactiveStatus`. A
233
+ * host that omits it makes `InteractiveSessionHandle.attach()` reject with
234
+ * a clear "not supported" error.
235
+ */
236
+ _attachInteractive?(id: string, options?: InteractiveAttachOptions): Promise<TerminalStream>;
218
237
  }
219
238
  /**
220
239
  * Handle for one session's interactive harness. Obtained via
@@ -227,13 +246,27 @@ declare class InteractiveSessionHandle {
227
246
  constructor(host: InteractiveSessionHost, sessionId: string);
228
247
  /**
229
248
  * Spawn the harness's interactive TUI for this session. Returns the
230
- * `streamUrl` to attach a terminal client to. Throws if the harness has no
231
- * interactive entrypoint (e.g. cursor, which is SDK-only), the binary is
249
+ * `streamUrl` of the live framebuffer — open it programmatically with
250
+ * `attach()`, or hand it to a terminal frontend. Throws if the harness has
251
+ * no interactive entrypoint (e.g. cursor, which is SDK-only), the binary is
232
252
  * not installed, or a session is already running for this id.
233
253
  */
234
254
  start(options: StartInteractiveOptions): Promise<InteractiveSessionInfo>;
235
255
  /** Inject a prompt as keystrokes into the live harness (submitted on send). */
236
256
  sendPrompt(prompt: string): Promise<void>;
257
+ /**
258
+ * Attach to the live harness PTY as a {@link TerminalStream}: the same PTY
259
+ * the interactive TUI runs in (the sidecar keys it by this session id), so
260
+ * the stream sees the harness's screen and its keystrokes drive the
261
+ * harness — never a fresh shell. The host mints a short-lived scoped
262
+ * terminal token and dials the session's `streamUrl` through the secured
263
+ * sidecar proxy; resolves once the server acknowledges the attach (the
264
+ * buffered screen then replays through `handlers.onData`).
265
+ *
266
+ * Throws when no interactive session is running for this id — attach after
267
+ * `start()`, or to a session another caller started.
268
+ */
269
+ attach(options?: InteractiveAttachOptions): Promise<TerminalStream>;
237
270
  /**
238
271
  * Observe the session: running, exited (with its exit code), or `null`
239
272
  * when the sidecar no longer knows the id. Poll this to detect completion —
@@ -904,8 +937,12 @@ declare class SandboxInstance {
904
937
  runtimeHealth(): Promise<SandboxRuntimeHealth>;
905
938
  /** Return the runtime's current listening-port snapshot. */
906
939
  ports(): Promise<SandboxPortBinding[]>;
907
- /** Interactive terminal operations for this runtime. */
908
- get terminals(): SandboxTerminalManager;
940
+ /**
941
+ * Interactive terminal operations for this runtime: the REST manager
942
+ * (create/input/list/get) plus `attach()`, which opens the live terminal
943
+ * WebSocket as a {@link TerminalStream}.
944
+ */
945
+ get terminals(): SandboxTerminals;
909
946
  /** List profiles installed in this sandbox runtime. */
910
947
  listProfiles(): Promise<SandboxRuntimeProfileList>;
911
948
  /**
@@ -1633,6 +1670,31 @@ declare class SandboxInstance {
1633
1670
  _sendInteractivePrompt(id: string, prompt: string): Promise<void>;
1634
1671
  /** @internal — invoked by InteractiveSessionHandle.status(). */
1635
1672
  _interactiveStatus(id: string): Promise<InteractiveSessionStatus | null>;
1673
+ /**
1674
+ * @internal Test seam: unit tests replace this to intercept terminal
1675
+ * WebSocket dials without opening a real socket. Production paths always
1676
+ * go through `TerminalStream.connect`.
1677
+ */
1678
+ private _terminalStreamConnect;
1679
+ /**
1680
+ * Resolve a sandbox-relative terminal stream path against the browser-safe
1681
+ * sidecar proxy base returned by the scoped-token mint. Concatenation, not
1682
+ * URL resolution: the proxy base carries a path prefix
1683
+ * (`/v1/sidecar-proxy/{id}`) that `new URL(absolutePath, base)` would drop.
1684
+ */
1685
+ private resolveTerminalStreamUrl;
1686
+ /** @internal — invoked by InteractiveSessionHandle.attach(). */
1687
+ _attachInteractive(id: string, options?: InteractiveAttachOptions): Promise<TerminalStream>;
1688
+ /**
1689
+ * Per-dial credential for a terminal attach. The first dial consumes the
1690
+ * token minted alongside the proxy URL (no second mint); every later dial
1691
+ * (a `reconnect()` after the socket dropped or the detach window) re-mints,
1692
+ * because scoped terminal tokens are clamped to a <= 15-minute TTL and the
1693
+ * original is likely dead by then.
1694
+ */
1695
+ private terminalTokenProvider;
1696
+ /** @internal — invoked by `box.terminals.attach()`. */
1697
+ _attachTerminal(connectionId: string, options?: SandboxTerminalAttachOptions): Promise<TerminalStream>;
1636
1698
  /** @internal — invoked by InteractiveSessionHandle.stop(). */
1637
1699
  _stopInteractive(id: string): Promise<void>;
1638
1700
  /** @internal — invoked by SandboxSession.respondToPermission(). */
@@ -1657,4 +1719,4 @@ declare class SandboxInstance {
1657
1719
  }): Promise<DurablePlan>;
1658
1720
  }
1659
1721
  //#endregion
1660
- export { SANDBOX_MCP_SERVER_NAME as C, buildControlPlaneMcpConfig as D, SandboxMcpServerEntry as E, buildSandboxMcpConfig as O, CONTROL_PLANE_MCP_SERVER_NAME as S, SandboxMcpEndpoint as T, InterruptResult as _, TraceExportSink as a, BuildControlPlaneMcpConfigOptions as b, otelTraceIdForTangleTrace as c, SandboxSession as d, InteractiveAuthFile as f, InteractiveSessionStatus as g, InteractiveSessionInfo as h, TraceExportResult as i, toOtelJson as l, InteractiveSessionHost as m, SandboxInstance as n, buildTraceExportPayload as o, InteractiveSessionHandle as p, TraceExportFormat as r, exportTraceBundle as s, HttpClient as t, SandboxTaskSession as u, RespondToPermissionOptions as v, SandboxMcpConfig as w, BuildSandboxMcpConfigOptions as x, StartInteractiveOptions as y };
1722
+ export { CONTROL_PLANE_MCP_SERVER_NAME as C, SandboxMcpServerEntry as D, SandboxMcpEndpoint as E, buildControlPlaneMcpConfig as O, BuildSandboxMcpConfigOptions as S, SandboxMcpConfig as T, InteractiveSessionStatus as _, TraceExportSink as a, StartInteractiveOptions as b, otelTraceIdForTangleTrace as c, SandboxSession as d, InteractiveAttachOptions as f, InteractiveSessionInfo as g, InteractiveSessionHost as h, TraceExportResult as i, buildSandboxMcpConfig as k, toOtelJson as l, InteractiveSessionHandle as m, SandboxInstance as n, buildTraceExportPayload as o, InteractiveAuthFile as p, TraceExportFormat as r, exportTraceBundle as s, HttpClient as t, SandboxTaskSession as u, InterruptResult as v, SANDBOX_MCP_SERVER_NAME as w, BuildControlPlaneMcpConfigOptions as x, RespondToPermissionOptions as y };
@@ -1,2 +1,2 @@
1
- import { a as TANGLE_JOBS_CONTRACT, c as AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-wJTgrUG8.js";
1
+ import { a as TANGLE_JOBS_CONTRACT, c as AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-C4qh6W2h.js";
2
2
  export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient, TangleSandboxClientConfig };
@@ -1,2 +1,2 @@
1
- import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-BaTM5dI_.js";
1
+ import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-DvSHze2O.js";
2
2
  export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient };
@@ -1,5 +1,5 @@
1
1
  import { p as parseErrorResponse } from "./errors-hbpL_-S6.js";
2
- import { n as createSandboxInstanceFromResponse } from "./sandbox-DnDmHM5x.js";
2
+ import { n as createSandboxInstanceFromResponse } from "./sandbox-DIh_cMZL.js";
3
3
  //#region src/tangle/abi.ts
4
4
  /**
5
5
  * Tangle Contract ABI Definitions
@@ -1,5 +1,212 @@
1
1
  import { AgentProfile as AgentProfile$1, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileConnection, AgentProfileFileMount, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePermissionValue, AgentProfilePrompt, AgentProfileResourceRef, AgentProfileResources, AgentProfileSecurityPolicy, AgentProfileValidationIssue, AgentProfileValidationResult, AgentSubagentProfile, Capability, agentProfileSchema, capabilitySchema, defineAgentProfile, defineGitHubResource, defineInlineResource, mergeAgentProfiles, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
2
2
 
3
+ //#region src/terminal-stream.d.ts
4
+ /**
5
+ * TerminalStream — typed client for the sandbox terminal WebSocket protocol.
6
+ *
7
+ * Drives a live PTY session (an interactive harness TUI or a plain shell)
8
+ * from the caller's own program: binary frames stream raw PTY output bytes,
9
+ * TEXT JSON frames carry the control protocol. The wire contract is defined
10
+ * by the sidecar in `apps/sidecar/src/terminal/websocket-protocol.ts` (the
11
+ * source of truth for these message shapes — its zod schemas cannot be
12
+ * imported here without pulling sidecar dependencies into the SDK bundle,
13
+ * so the types are mirrored locally):
14
+ *
15
+ * client → server (TEXT JSON):
16
+ * init {connectionId?, cols, rows, command?, cwd?, env?} — MUST be first
17
+ * input {data}
18
+ * resize {cols, rows}
19
+ * server → client (TEXT JSON):
20
+ * ready {connectionId, sessionId, restored, detachTimeoutMs}
21
+ * exit {exitCode?, exitSignal?}
22
+ * error {code, message}
23
+ * rec / rec.done — recording tee frames for the platform's session
24
+ * capture consumer; not part of the client surface
25
+ * server → client (BINARY): raw PTY output bytes
26
+ *
27
+ * Detach/reconnect: the server keeps the PTY alive for `detachTimeoutMs`
28
+ * (5 minutes today) after the socket closes; re-dialing with the SAME
29
+ * connectionId reattaches and replays the buffered output history, so a
30
+ * fresh client repaints the current screen.
31
+ *
32
+ * Browser-safe: uses the global `WebSocket` (browsers, Workers, Node >= 22)
33
+ * and never imports `ws` — the same environment contract as
34
+ * `session-gateway/client.ts`.
35
+ */
36
+ /** Ready acknowledgement — the PTY is attached and history replay follows. */
37
+ interface TerminalReadyInfo {
38
+ connectionId: string;
39
+ sessionId: string;
40
+ /** True when an existing PTY was reattached (its history is replayed). */
41
+ restored: boolean;
42
+ /** How long (ms) the server keeps the PTY alive after this socket closes. */
43
+ detachTimeoutMs: number;
44
+ }
45
+ /** Terminal process exit notification. */
46
+ interface TerminalExitInfo {
47
+ exitCode?: number;
48
+ exitSignal?: string;
49
+ }
50
+ /** A protocol `error` control frame or a transport failure. */
51
+ declare class TerminalStreamError extends Error {
52
+ /** Protocol error code (e.g. `INIT_FAILED`) or `TRANSPORT` for socket faults. */
53
+ readonly code: string;
54
+ constructor(message: string, code: string);
55
+ }
56
+ /**
57
+ * Event callbacks, passed at construction (the same idiom as
58
+ * `SessionGatewayClient`'s `handlers` config). Registering them up front is
59
+ * load-bearing: the server replays PTY history immediately after `ready`, so
60
+ * a handler attached after connect would miss the replayed screen.
61
+ */
62
+ interface TerminalStreamHandlers {
63
+ /** Raw PTY output bytes (both live output and reattach history replay). */
64
+ onData?: (data: Uint8Array) => void;
65
+ onReady?: (info: TerminalReadyInfo) => void;
66
+ onExit?: (info: TerminalExitInfo) => void;
67
+ /** Protocol `error` frames and post-connect transport failures. */
68
+ onError?: (error: TerminalStreamError) => void;
69
+ /** Socket closed — by the server, the network, or a local `close()`. */
70
+ onClose?: (code: number, reason: string) => void;
71
+ }
72
+ /**
73
+ * Which WebSocket-subprotocol auth envelope to offer. A WebSocket client
74
+ * cannot set an Authorization header, so the bearer rides the
75
+ * `Sec-WebSocket-Protocol` offer — and the two dialable endpoints expect
76
+ * DIFFERENT envelopes:
77
+ *
78
+ * - `"edge"` (default): the public API proxy
79
+ * (`wss://<api>/v1/sidecar-proxy/{sidecarId}/terminals/{id}/ws`) expects
80
+ * `bearer.<base64url(token)>` — see `parseTerminalWsSubprotocolToken` in
81
+ * `products/sandbox/api/src/lib/terminal-websocket.ts`. The fixed
82
+ * `tangle.terminal.v1` marker is offered alongside the credential (see
83
+ * {@link TERMINAL_WS_ECHO_SUBPROTOCOL}).
84
+ * - `"sidecar-direct"`: the sidecar's own `/terminals/{id}/ws` route expects
85
+ * `tangle.bearer.<token>` plus the same `tangle.terminal.v1` echo marker —
86
+ * see `apps/sidecar/src/routes/ws-subprotocol-auth.ts`. Only
87
+ * platform-internal callers (and the composed integration tests) dial the
88
+ * sidecar directly.
89
+ */
90
+ type TerminalStreamAuthFormat = "edge" | "sidecar-direct";
91
+ /**
92
+ * Bearer credential for the dial: a token string, or a provider invoked on
93
+ * EVERY dial (including {@link TerminalStream.reconnect}). Scoped terminal
94
+ * tokens are short-lived (the platform clamps them to <= 15 minutes), so a
95
+ * reconnect after the detach window with the original string would be
96
+ * rejected — a provider lets the SDK re-mint a fresh token per dial.
97
+ */
98
+ type TerminalStreamToken = string | (() => Promise<string> | string);
99
+ interface TerminalStreamOptions {
100
+ /**
101
+ * Absolute URL of the terminal WebSocket endpoint. `http(s)` URLs are
102
+ * converted to `ws(s)` automatically.
103
+ */
104
+ url: string;
105
+ /**
106
+ * Bearer token carried in the auth subprotocol (see `authFormat`) — a
107
+ * string, or a provider re-invoked on every dial so short-lived scoped
108
+ * tokens stay fresh across reconnects.
109
+ */
110
+ token: TerminalStreamToken;
111
+ /**
112
+ * PTY connection id — also sent in the `init` frame; the server rejects a
113
+ * mismatch with the URL's id. Reusing an id reattaches the existing PTY.
114
+ */
115
+ connectionId: string;
116
+ cols?: number;
117
+ rows?: number;
118
+ /** Command to run when the id has no live PTY (defaults to the shell). */
119
+ command?: string;
120
+ cwd?: string;
121
+ env?: Record<string, string>;
122
+ /** Auth subprotocol envelope. Default `"edge"`. */
123
+ authFormat?: TerminalStreamAuthFormat;
124
+ handlers?: TerminalStreamHandlers;
125
+ /** Reject `connect()` if `ready` has not arrived within this window. */
126
+ connectTimeoutMs?: number;
127
+ }
128
+ /**
129
+ * Fixed non-credential marker offered on EVERY dial (both auth formats),
130
+ * giving a spec-compliant server something safe to select into the 101's
131
+ * `Sec-WebSocket-Protocol`. Two reasons it exists:
132
+ *
133
+ * 1. RFC 6455 §4.1 says a client that offered subprotocols MUST fail the
134
+ * connection when the server selects none. Node's WebSocket (undici,
135
+ * per the WHATWG spec) enforces this strictly; browsers are lenient and
136
+ * tolerate a 101 with no selected subprotocol — which is why the
137
+ * browser-only reference client got away with offering just the
138
+ * credential.
139
+ * 2. The server must never echo the token-bearing offer back (that would
140
+ * leak the live credential into a response header) — so it needs a
141
+ * non-credential protocol it CAN select.
142
+ */
143
+ declare const TERMINAL_WS_ECHO_SUBPROTOCOL = "tangle.terminal.v1";
144
+ /**
145
+ * Client for one terminal WebSocket connection. Construct via
146
+ * {@link TerminalStream.connect}, which resolves once the server
147
+ * acknowledges the attach with `ready` (history replay then streams through
148
+ * `handlers.onData`).
149
+ */
150
+ declare class TerminalStream {
151
+ private readonly ws;
152
+ private readonly options;
153
+ private readonly handlers;
154
+ private readyInfo;
155
+ private closed;
156
+ private closeWaiters;
157
+ private readonly textDecoder;
158
+ /**
159
+ * Dial the endpoint, send `init` as the first frame, and resolve once the
160
+ * server responds `ready`. Rejects on a protocol `error` frame, a socket
161
+ * close/failure before `ready`, or the connect timeout — always with the
162
+ * reason the server gave. A token PROVIDER is awaited here, before the
163
+ * socket opens, so every dial (first connect and each reconnect) carries a
164
+ * fresh credential.
165
+ */
166
+ static connect(options: TerminalStreamOptions): Promise<TerminalStream>;
167
+ private constructor();
168
+ private establish;
169
+ private handleMessage;
170
+ /** PTY connection id this stream is attached to. */
171
+ get connectionId(): string;
172
+ /** The server's `ready` acknowledgement. Set once `connect()` resolves. */
173
+ get ready(): TerminalReadyInfo;
174
+ /** True while the socket is open. */
175
+ get isOpen(): boolean;
176
+ /**
177
+ * Send input keystrokes to the PTY. `Uint8Array` input is decoded as
178
+ * UTF-8 (the wire protocol carries input as JSON text). Input larger than
179
+ * the server's 1 MiB frame cap is split across multiple `input` frames in
180
+ * order on the same socket, so delivery order is preserved.
181
+ */
182
+ write(data: string | Uint8Array): void;
183
+ /** Resize the PTY. */
184
+ resize(cols: number, rows: number): void;
185
+ /**
186
+ * Detach cleanly: close the socket and resolve once the close completes.
187
+ * The PTY survives server-side for `ready.detachTimeoutMs` (5 minutes
188
+ * today) — reattach within that window via {@link reconnect} (or a fresh
189
+ * `connect()` with the same connectionId) to replay history and continue.
190
+ */
191
+ close(): Promise<void>;
192
+ /**
193
+ * Re-dial the same endpoint with the same connectionId on a fresh socket
194
+ * — the server reattaches the PTY and replays its buffered history. When
195
+ * the stream was constructed with a token PROVIDER, it is re-invoked for
196
+ * the new dial (scoped terminal tokens expire within minutes, so the
197
+ * original credential may be dead by reconnect time); with a plain string
198
+ * token, pass a fresh `token` override yourself when it may have expired.
199
+ * `handlers` rebinds callbacks for the new stream.
200
+ */
201
+ reconnect(overrides?: {
202
+ token?: TerminalStreamToken;
203
+ handlers?: TerminalStreamHandlers;
204
+ cols?: number;
205
+ rows?: number;
206
+ }): Promise<TerminalStream>;
207
+ private assertOpen;
208
+ }
209
+ //#endregion
3
210
  //#region ../../../packages/runtime-contracts/dist/batch-events.d.ts
4
211
  /** Token and tool usage emitted when one batch task completes. */
5
212
  interface BatchTaskUsage {
@@ -1089,6 +1296,33 @@ interface SandboxTerminalManager {
1089
1296
  list(): Promise<SandboxTerminalInfo[]>;
1090
1297
  get(sessionId: string): Promise<SandboxTerminalInfo | null>;
1091
1298
  }
1299
+ /** Options for `box.terminals.attach()`. */
1300
+ interface SandboxTerminalAttachOptions {
1301
+ /** Initial PTY geometry reported in the attach init frame. */
1302
+ cols?: number;
1303
+ rows?: number;
1304
+ /** Command to run when the connection id has no live PTY (default: shell). */
1305
+ command?: string;
1306
+ cwd?: string;
1307
+ env?: Record<string, string>;
1308
+ /**
1309
+ * Stream callbacks, bound before the socket opens. Register `onData` here:
1310
+ * a reattached PTY replays its buffered screen immediately after the
1311
+ * attach acknowledgement, so a handler added after `attach()` resolves
1312
+ * would miss the replayed frames.
1313
+ */
1314
+ handlers?: TerminalStreamHandlers;
1315
+ }
1316
+ /**
1317
+ * `box.terminals` — the REST terminal manager plus the live PTY attach
1318
+ * surface. `attach()` opens the terminal WebSocket (through the secured
1319
+ * sidecar proxy, with a short-lived scoped token minted per dial) as a
1320
+ * {@link TerminalStream}: reusing a connection id reattaches the existing
1321
+ * PTY and replays its history; a new id spawns a fresh shell (or `command`).
1322
+ */
1323
+ interface SandboxTerminals extends SandboxTerminalManager {
1324
+ attach(connectionId: string, options?: SandboxTerminalAttachOptions): Promise<TerminalStream>;
1325
+ }
1092
1326
  /** Runtime-local agent profile. */
1093
1327
  interface SandboxRuntimeProfile {
1094
1328
  name: string;
@@ -5151,4 +5385,4 @@ interface CodeExecutionOptions {
5151
5385
  idempotencyKey?: string;
5152
5386
  }
5153
5387
  //#endregion
5154
- export { EventStreamOptions as $, AgentProfileResources as $i, SandboxFleetDispatchResponse as $n, SessionEventStreamOptions as $r, ListSandboxOptions as $t, CreateIntelligenceReportOptions as A, UploadOptions as Ai, ReconcileSandboxFleetsOptions as An, SandboxRuntimeHealth as Ar, GitDiff as At, DirectoryPermission as B, BatchEventDataMap as Bi, RolloutStatus as Bn, SandboxTraceExport as Br, GpuType as Bt, CodeExecutionResult as C, TeeAttestationResponse as Ci, ProvisionStep as Cn, SandboxIntelligenceEnvelope as Cr, FleetPromptDispatchOptions as Ct, CommitTaskSessionOptions as D, ToolsConfig as Di, PublishPublicTemplateVersionOptions as Dn, SandboxProfileSummary as Dr, GitBranch as Dt, CodeResultPart as E, TokenRefreshHandler as Ei, PublishPublicTemplateOptions as En, SandboxPortPreviewLink as Er, GitAuth as Et, CreateSandboxOptions as F, WriteFileOptions as Fi, Rollout as Fn, SandboxTerminalInfo as Fr, GpuLeaseExecOptions as Ft, DriveTurnOptions as G, AgentProfileConfidential as Gi, SandboxClientConfig as Gn, SearchMatch as Gr, IntelligenceReportBudget as Gt, DispatchedSession as H, BatchTaskUsage as Hi, RunCodeOptions as Hn, SandboxUser as Hr, HostAgentRuntimeBackend as Ht, CreateSessionOptions as I, WriteManyFile as Ii, RolloutChildResult as In, SandboxTerminalManager as Ir, GpuLeaseExecResult as It, DriverType as J, AgentProfileMcpServer as Ji, SandboxEvent as Jn, SecretsManager as Jr, IntelligenceReportWindow as Jt, DriverConfig as K, AgentProfileConnection as Ki, SandboxConnection as Kn, SearchOptions as Kr, IntelligenceReportCompareTo as Kt, CreateTaskSessionOptions as L, WriteManyOptions as Li, RolloutOptions as Ln, SandboxTerminalRequestOptions as Lr, GpuLeaseManager as Lt, CreateSandboxFleetOptions as M, UsageInfo as Mi, RenameOptions as Mn, SandboxRuntimeProfileList as Mr, GpuLease as Mt, CreateSandboxFleetTokenOptions as N, WaitForOptions as Ni, RestoreSnapshotOptions as Nn, SandboxStatus as Nr, GpuLeaseBilling as Nt, CompletedTurnResult as O, TurnDriveResult as Oi, ReapExpiredSandboxFleetsOptions as On, SandboxResourceUsage as Or, GitCommit as Ot, CreateSandboxFleetWithCoordinatorOptions as P, WaitForRolloutOptions as Pi, ResumeOptions as Pn, SandboxTerminalCreateOptions as Pr, GpuLeaseCommandResult as Pt, EnsureDevServerOptions as Q, AgentProfileResourceRef as Qi, SandboxFleetDispatchFailureClass as Qn, SessionBackendCredentials as Qr, ListSandboxFleetOptions as Qt, DeleteOptions as R, BatchBackendStats as Ri, RolloutScorer as Rn, SandboxTraceBundle as Rr, GpuLeaseProviderName as Rt, CodeExecutionOptions as S, TeeAttestationReport as Si, ProvisionStatus as Sn, SandboxInfo as Sr, FleetMachineId as St, CodeResult as T, TeePublicKeyResponse as Ti, PublicTemplateVersionInfo as Tn, SandboxPortBinding as Tr, GPU_LEASE_PROVIDER_NAMES as Tt, DownloadOptions as U, AgentProfile$1 as Ui, SSHCommandDescriptor as Un, ScopedToken as Ur, InstalledTool as Ut, DispatchPromptOptions as V, BatchSidecarGroup as Vi, RolloutTurnPart as Vn, SandboxTraceOptions as Vr, HostAgentDriverConfig as Vt, DownloadProgress as W, AgentProfileCapabilities as Wi, SSHCredentials as Wn, ScopedTokenScope as Wr, IntelligenceReport as Wt, EgressManager as X, AgentProfilePermissionValue as Xi, SandboxFleetArtifactSpec as Xn, SendSessionMessageRequest as Xr, ListMessagesOptions as Xt, DurablePlan as Y, AgentProfileModelHints as Yi, SandboxFleetArtifact as Yn, SendSessionMessageOptions as Yr, JsonValue as Yt, EgressPolicy as Z, AgentProfilePrompt as Zi, SandboxFleetCostEstimate as Zn, SentSessionMessage as Zr, ListOptions as Zt, BatchTask as _, TaskSessionCommitResult as _i, PromptInputPart as _n, SandboxFleetUsage as _r, FleetDispatchResultBuffer as _t, AttachSandboxFleetMachineOptions as a, agentProfileSchema as aa, SessionStatus as ai, NonHostAgentDriverConfig as an, SandboxFleetMachineMeteredUsage as ar, FileReadBatchResult as at, ChunkedUploadOptions as b, TaskSessionProfile as bi, ProvisionEvent as bn, SandboxFleetWorkspaceRestoreResult as br, FleetExecDispatchOptions as bt, BackendInfo as c, defineGitHubResource as ca, SnapshotResult as ci, PreviewLinkInfo as cn, SandboxFleetManifest as cr, FileRenameResult as ct, BackendType as d, validateAgentProfileSecurity as da, StartupOperation as di, ProcessInfo as dn, SandboxFleetPolicy as dr, FileTreeOptions as dt, AgentProfileSecurityPolicy as ea, SessionForkOptions as ei, McpServerConfig as en, SandboxFleetDriverCapability as er, ExactProcessSpawnOptions as et, BatchBackend as f, StorageConfig as fi, ProcessLogEntry as fn, SandboxFleetToken as fr, FileTreeResult as ft, BatchRunRequest as g, TaskSessionChanges as gi, ProcessStatus as gn, SandboxFleetTraceOptions as gr, FleetDispatchCancelResult as gt, BatchRunOptions as h, TaskResult as hi, ProcessSpawnOptions as hn, SandboxFleetTraceExport as hr, FileWriteResult as ht, AttachGpuLeaseOptions as i, Capability as ia, SessionMessageInputPart as ii, NetworkManager as in, SandboxFleetMachine as ir, FileReadBatchOptions as it, CreateRequestOptions as j, UploadProgress as ji, ReconcileSandboxFleetsResult as jn, SandboxRuntimeProfile as jr, GitStatus as jt, CreateGpuLeaseOptions as k, UpdateUserOptions as ki, ReapExpiredSandboxFleetsResult as kn, SandboxResources as kr, GitConfig as kt, BackendManager as l, defineInlineResource as la, SshKeysManager as li, PreviewLinkManager as ln, SandboxFleetManifestMachine as lr, FileSystem as lt, BatchResult as m, TaskOptions as mi, ProcessSignal as mn, SandboxFleetTraceEvent as mr, FileUsageResult as mt, AccessPolicyRule as n, AgentProfileValidationResult as na, SessionListOptions as ni, MkdirOptions as nn, SandboxFleetInfo as nr, ExecResult as nt, BackendCapabilities as o, capabilitySchema as oa, SnapshotInfo as oi, PermissionLevel as on, SandboxFleetMachineRecord as or, FileReadError as ot, BatchOptions as p, SubscriptionInfo as pi, ProcessManager as pn, SandboxFleetTraceBundle as pr, FileUsageOptions as pt, DriverInfo as q, AgentProfileFileMount as qi, SandboxEnvironment as qn, SecretInfo as qr, IntelligenceReportSubjectType as qt, AddUserOptions as r, AgentSubagentProfile as ra, SessionMessage as ri, NetworkConfig as rn, SandboxFleetIntelligenceEnvelope as rr, FileInfo as rt, BackendConfig as s, defineAgentProfile as sa, SnapshotOptions as si, PermissionsManager as sn, SandboxFleetMachineSpec as sr, FileReadResult as st, AcceleratorKind as t, AgentProfileValidationIssue as ta, SessionInfo as ti, MintScopedTokenOptions as tn, SandboxFleetDriverTimings as tr, ExecOptions as tt, BackendStatus as u, mergeAgentProfiles as ua, StartupDiagnostics as ui, Process as un, SandboxFleetOperationsSummary as ur, FileTreeFile as ut, BatchTaskResult as v, TaskSessionFileChange as vi, PromptOptions as vn, SandboxFleetWorkspace as vr, FleetDispatchResultBufferOptions as vt, CodeLanguage as w, TeePublicKey as wi, PublicTemplateInfo as wn, SandboxPermissionsConfig as wr, FleetPromptDispatchResult as wt, ChunkedUploadResult as x, TeeAttestationOptions as xi, ProvisionResult as xn, SandboxFleetWorkspaceSnapshotResult as xr, FleetExecDispatchResult as xt, BranchOptions as y, TaskSessionInfo as yi, PromptResult as yn, SandboxFleetWorkspaceReconcileResult as yr, FleetDispatchStreamOptions as yt, DevServerInfo as z, BatchEvent as zi, RolloutStartResult as zn, SandboxTraceEvent as zr, GpuLeaseStatus as zt };
5388
+ export { EventStreamOptions as $, TerminalStreamToken as $i, SandboxFleetDispatchResponse as $n, SentSessionMessage as $r, ListSandboxOptions as $t, CreateIntelligenceReportOptions as A, TurnDriveResult as Ai, ReconcileSandboxFleetsOptions as An, SandboxRuntimeHealth as Ar, GitDiff as At, DirectoryPermission as B, BatchBackendStats as Bi, RolloutStatus as Bn, SandboxTraceBundle as Br, GpuType as Bt, CodeExecutionResult as C, TeeAttestationOptions as Ci, ProvisionStep as Cn, SandboxIntelligenceEnvelope as Cr, FleetPromptDispatchOptions as Ct, CommitTaskSessionOptions as D, TeePublicKeyResponse as Di, PublishPublicTemplateVersionOptions as Dn, SandboxProfileSummary as Dr, GitBranch as Dt, CodeResultPart as E, TeePublicKey as Ei, PublishPublicTemplateOptions as En, SandboxPortPreviewLink as Er, GitAuth as Et, CreateSandboxOptions as F, WaitForOptions as Fi, Rollout as Fn, SandboxTerminalCreateOptions as Fr, GpuLeaseExecOptions as Ft, DriveTurnOptions as G, TERMINAL_WS_ECHO_SUBPROTOCOL as Gi, SandboxClientConfig as Gn, ScopedToken as Gr, IntelligenceReportBudget as Gt, DispatchedSession as H, BatchEventDataMap as Hi, RunCodeOptions as Hn, SandboxTraceExport as Hr, HostAgentRuntimeBackend as Ht, CreateSessionOptions as I, WaitForRolloutOptions as Ii, RolloutChildResult as In, SandboxTerminalInfo as Ir, GpuLeaseExecResult as It, DriverType as J, TerminalStream as Ji, SandboxEvent as Jn, SearchOptions as Jr, IntelligenceReportWindow as Jt, DriverConfig as K, TerminalExitInfo as Ki, SandboxConnection as Kn, ScopedTokenScope as Kr, IntelligenceReportCompareTo as Kt, CreateTaskSessionOptions as L, WriteFileOptions as Li, RolloutOptions as Ln, SandboxTerminalManager as Lr, GpuLeaseManager as Lt, CreateSandboxFleetOptions as M, UploadOptions as Mi, RenameOptions as Mn, SandboxRuntimeProfileList as Mr, GpuLease as Mt, CreateSandboxFleetTokenOptions as N, UploadProgress as Ni, RestoreSnapshotOptions as Nn, SandboxStatus as Nr, GpuLeaseBilling as Nt, CompletedTurnResult as O, TokenRefreshHandler as Oi, ReapExpiredSandboxFleetsOptions as On, SandboxResourceUsage as Or, GitCommit as Ot, CreateSandboxFleetWithCoordinatorOptions as P, UsageInfo as Pi, ResumeOptions as Pn, SandboxTerminalAttachOptions as Pr, GpuLeaseCommandResult as Pt, EnsureDevServerOptions as Q, TerminalStreamOptions as Qi, SandboxFleetDispatchFailureClass as Qn, SendSessionMessageRequest as Qr, ListSandboxFleetOptions as Qt, DeleteOptions as R, WriteManyFile as Ri, RolloutScorer as Rn, SandboxTerminalRequestOptions as Rr, GpuLeaseProviderName as Rt, CodeExecutionOptions as S, validateAgentProfileSecurity as Sa, TaskSessionProfile as Si, ProvisionStatus as Sn, SandboxInfo as Sr, FleetMachineId as St, CodeResult as T, TeeAttestationResponse as Ti, PublicTemplateVersionInfo as Tn, SandboxPortBinding as Tr, GPU_LEASE_PROVIDER_NAMES as Tt, DownloadOptions as U, BatchSidecarGroup as Ui, SSHCommandDescriptor as Un, SandboxTraceOptions as Ur, InstalledTool as Ut, DispatchPromptOptions as V, BatchEvent as Vi, RolloutTurnPart as Vn, SandboxTraceEvent as Vr, HostAgentDriverConfig as Vt, DownloadProgress as W, BatchTaskUsage as Wi, SSHCredentials as Wn, SandboxUser as Wr, IntelligenceReport as Wt, EgressManager as X, TerminalStreamError as Xi, SandboxFleetArtifactSpec as Xn, SecretsManager as Xr, ListMessagesOptions as Xt, DurablePlan as Y, TerminalStreamAuthFormat as Yi, SandboxFleetArtifact as Yn, SecretInfo as Yr, JsonValue as Yt, EgressPolicy as Z, TerminalStreamHandlers as Zi, SandboxFleetCostEstimate as Zn, SendSessionMessageOptions as Zr, ListOptions as Zt, BatchTask as _, capabilitySchema as _a, TaskResult as _i, PromptInputPart as _n, SandboxFleetUsage as _r, FleetDispatchResultBuffer as _t, AttachSandboxFleetMachineOptions as a, AgentProfileMcpServer as aa, SessionMessage as ai, NonHostAgentDriverConfig as an, SandboxFleetMachineMeteredUsage as ar, FileReadBatchResult as at, ChunkedUploadOptions as b, defineInlineResource as ba, TaskSessionFileChange as bi, ProvisionEvent as bn, SandboxFleetWorkspaceRestoreResult as br, FleetExecDispatchOptions as bt, BackendInfo as c, AgentProfilePrompt as ca, SnapshotInfo as ci, PreviewLinkInfo as cn, SandboxFleetManifest as cr, FileRenameResult as ct, BackendType as d, AgentProfileSecurityPolicy as da, SshKeysManager as di, ProcessInfo as dn, SandboxFleetPolicy as dr, FileTreeOptions as dt, AgentProfile$1 as ea, SessionBackendCredentials as ei, McpServerConfig as en, SandboxFleetDriverCapability as er, ExactProcessSpawnOptions as et, BatchBackend as f, AgentProfileValidationIssue as fa, StartupDiagnostics as fi, ProcessLogEntry as fn, SandboxFleetToken as fr, FileTreeResult as ft, BatchRunRequest as g, agentProfileSchema as ga, TaskOptions as gi, ProcessStatus as gn, SandboxFleetTraceOptions as gr, FleetDispatchCancelResult as gt, BatchRunOptions as h, Capability as ha, SubscriptionInfo as hi, ProcessSpawnOptions as hn, SandboxFleetTraceExport as hr, FileWriteResult as ht, AttachGpuLeaseOptions as i, AgentProfileFileMount as ia, SessionListOptions as ii, NetworkManager as in, SandboxFleetMachine as ir, FileReadBatchOptions as it, CreateRequestOptions as j, UpdateUserOptions as ji, ReconcileSandboxFleetsResult as jn, SandboxRuntimeProfile as jr, GitStatus as jt, CreateGpuLeaseOptions as k, ToolsConfig as ki, ReapExpiredSandboxFleetsResult as kn, SandboxResources as kr, GitConfig as kt, BackendManager as l, AgentProfileResourceRef as la, SnapshotOptions as li, PreviewLinkManager as ln, SandboxFleetManifestMachine as lr, FileSystem as lt, BatchResult as m, AgentSubagentProfile as ma, StorageConfig as mi, ProcessSignal as mn, SandboxFleetTraceEvent as mr, FileUsageResult as mt, AccessPolicyRule as n, AgentProfileConfidential as na, SessionForkOptions as ni, MkdirOptions as nn, SandboxFleetInfo as nr, ExecResult as nt, BackendCapabilities as o, AgentProfileModelHints as oa, SessionMessageInputPart as oi, PermissionLevel as on, SandboxFleetMachineRecord as or, FileReadError as ot, BatchOptions as p, AgentProfileValidationResult as pa, StartupOperation as pi, ProcessManager as pn, SandboxFleetTraceBundle as pr, FileUsageOptions as pt, DriverInfo as q, TerminalReadyInfo as qi, SandboxEnvironment as qn, SearchMatch as qr, IntelligenceReportSubjectType as qt, AddUserOptions as r, AgentProfileConnection as ra, SessionInfo as ri, NetworkConfig as rn, SandboxFleetIntelligenceEnvelope as rr, FileInfo as rt, BackendConfig as s, AgentProfilePermissionValue as sa, SessionStatus as si, PermissionsManager as sn, SandboxFleetMachineSpec as sr, FileReadResult as st, AcceleratorKind as t, AgentProfileCapabilities as ta, SessionEventStreamOptions as ti, MintScopedTokenOptions as tn, SandboxFleetDriverTimings as tr, ExecOptions as tt, BackendStatus as u, AgentProfileResources as ua, SnapshotResult as ui, Process as un, SandboxFleetOperationsSummary as ur, FileTreeFile as ut, BatchTaskResult as v, defineAgentProfile as va, TaskSessionChanges as vi, PromptOptions as vn, SandboxFleetWorkspace as vr, FleetDispatchResultBufferOptions as vt, CodeLanguage as w, TeeAttestationReport as wi, PublicTemplateInfo as wn, SandboxPermissionsConfig as wr, FleetPromptDispatchResult as wt, ChunkedUploadResult as x, mergeAgentProfiles as xa, TaskSessionInfo as xi, ProvisionResult as xn, SandboxFleetWorkspaceSnapshotResult as xr, FleetExecDispatchResult as xt, BranchOptions as y, defineGitHubResource as ya, TaskSessionCommitResult as yi, PromptResult as yn, SandboxFleetWorkspaceReconcileResult as yr, FleetDispatchStreamOptions as yt, DevServerInfo as z, WriteManyOptions as zi, RolloutStartResult as zn, SandboxTerminals as zr, GpuLeaseStatus as zt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "0.11.1-develop.20260722003615.8b1bf31",
3
+ "version": "0.11.1-develop.20260722074913.252db0d",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",