@tangle-network/sandbox 0.10.5-develop.20260713235503.8f2cefc → 0.10.5-develop.20260715115519.fee3d86

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.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { $ as EventStreamOptions, $n as SandboxFleetInfo, $r as SessionListOptions, $t as MkdirOptions, A as CommitTaskSessionOptions, Ai as WaitForOptions, Ar as SandboxStatus, At as GpuLeaseBilling, B as CreateTaskSessionOptions, Bi as AgentProfileMcpServer, Bn as SSHCommandDescriptor, Br as ScopedToken, Bt as InstalledTool, C as BatchTaskUsage, Ci as TokenRefreshHandler, Cn as PublishPublicTemplateOptions, Cr as SandboxPortPreviewLink, Ct as GitAuth, Di as UploadOptions, Dn as ReconcileSandboxFleetsOptions, Dr as SandboxRuntimeHealth, Dt as GitDiff, Ei as UpdateUserOptions, En as ReapExpiredSandboxFleetsResult, Er as SandboxResources, Et as GitConfig, F as CreateSandboxFleetOptions, Fi as AgentProfile, Fn as RolloutScorer, Fr as SandboxTraceBundle, Ft as GpuLeaseProviderName, G as DownloadOptions, Gi as AgentProfileResources, Gn as SandboxEvent, Gr as SecretsManager, Gt as IntelligenceReportWindow, H as DirectoryPermission, Hi as AgentProfilePermissionValue, Hn as SandboxClientConfig, Hr as SearchMatch, Ht as IntelligenceReportBudget, Ii as AgentProfileCapabilities, In as RolloutStartResult, Ir as SandboxTraceEvent, It as GpuLeaseStatus, J as DriverConfig, Ji as AgentSubagentProfile, Jn as SandboxFleetCostEstimate, Jr as SentSessionMessage, Jt as ListOptions, K as DownloadProgress, Ki as AgentProfileValidationIssue, Kn as SandboxFleetArtifact, Kr as SendSessionMessageOptions, L as CreateSandboxFleetWithCoordinatorOptions, Li as AgentProfileConfidential, Ln as RolloutStatus, Lr as SandboxTraceExport, Lt as GpuType, M as CreateGpuLeaseOptions, Mi as WriteFileOptions, Mn as Rollout, Mr as SandboxTerminalInfo, Mt as GpuLeaseExecOptions, N as CreateIntelligenceReportOptions, Ni as WriteManyFile, Nn as RolloutChildResult, Nr as SandboxTerminalManager, Nt as GpuLeaseExecResult, O as CodeResult, Oi as UploadProgress, On as ReconcileSandboxFleetsResult, Or as SandboxRuntimeProfile, Ot as GitStatus, P as CreateRequestOptions, Pi as WriteManyOptions, Pn as RolloutOptions, Pr as SandboxTerminalRequestOptions, Pt as GpuLeaseManager, Q as EgressPolicy, Qi as mergeAgentProfiles, Qn as SandboxFleetDriverTimings, Qr as SessionInfo, Qt as MintScopedTokenOptions, R as CreateSandboxOptions, Ri as AgentProfileConnection, Rn as RolloutTurnPart, Rr as SandboxTraceOptions, Rt as HostAgentDriverConfig, S as BatchTaskResult, Si as TeePublicKeyResponse, Sn as PublicTemplateVersionInfo, Sr as SandboxPortBinding, St as GPU_LEASE_PROVIDER_NAMES, Ti as TurnDriveResult, Tn as ReapExpiredSandboxFleetsOptions, Tr as SandboxResourceUsage, Tt as GitCommit, U as DispatchPromptOptions, Ui as AgentProfilePrompt, Un as SandboxConnection, Ur as SearchOptions, Ut as IntelligenceReportCompareTo, V as DeleteOptions, Vi as AgentProfileModelHints, Vn as SSHCredentials, Vr as ScopedTokenScope, Vt as IntelligenceReport, W as DispatchedSession, Wi as AgentProfileResourceRef, Wn as SandboxEnvironment, Wr as SecretInfo, Wt as IntelligenceReportSubjectType, X as DriverType, Xi as defineGitHubResource, Xn as SandboxFleetDispatchResponse, Xr as SessionEventStreamOptions, Xt as ListSandboxOptions, Y as DriverInfo, Yi as defineAgentProfile, Yn as SandboxFleetDispatchFailureClass, Yr as SessionBackendCredentials, Yt as ListSandboxFleetOptions, Z as EgressManager, Zi as defineInlineResource, Zn as SandboxFleetDriverCapability, Zr as SessionForkOptions, Zt as McpServerConfig, _ as BatchResult, _i as TaskSessionProfile, _n as ProvisionEvent, _r as SandboxFleetWorkspaceRestoreResult, _t as FleetExecDispatchOptions, a as AttachSandboxFleetMachineOptions, ai as SnapshotResult, an as PreviewLinkInfo, ar as SandboxFleetManifest, at as FileReadError, b as BatchSidecarGroup, bi as TeeAttestationResponse, bn as ProvisionStep, br as SandboxIntelligenceEnvelope, bt as FleetPromptDispatchOptions, c as BackendInfo, ci as StartupOperation, cn as ProcessInfo, cr as SandboxFleetPolicy, ct as FileSystem, d as BackendType, di as TaskOptions, dn as ProcessSignal, dr as SandboxFleetTraceEvent, dt as FileTreeResult, ei as SessionMessage, en as NetworkConfig, er as SandboxFleetIntelligenceEnvelope, et as ExecOptions, f as BatchBackend, fi as TaskResult, fn as ProcessSpawnOptions, fr as SandboxFleetTraceExport, ft as FileWriteResult, g as BatchOptions, gi as TaskSessionInfo, gn as PromptResult, gr as SandboxFleetWorkspaceReconcileResult, gt as FleetDispatchStreamOptions, h as BatchEventDataMap, hi as TaskSessionFileChange, hn as PromptOptions, hr as SandboxFleetWorkspace, ht as FleetDispatchResultBufferOptions, i as AttachGpuLeaseOptions, ii as SnapshotOptions, in as PermissionsManager, ir as SandboxFleetMachineSpec, it as FileReadBatchResult, j as CompletedTurnResult, ji as WaitForRolloutOptions, jr as SandboxTerminalCreateOptions, jt as GpuLeaseCommandResult, ki as UsageInfo, kn as RenameOptions, kr as SandboxRuntimeProfileList, kt as GpuLease, l as BackendManager, li as StorageConfig, ln as ProcessLogEntry, lr as SandboxFleetToken, lt as FileTreeFile, m as BatchEvent, mi as TaskSessionCommitResult, mr as SandboxFleetUsage, mt as FleetDispatchResultBuffer, n as AccessPolicyRule, ni as SessionStatus, nn as NonHostAgentDriverConfig, nr as SandboxFleetMachineMeteredUsage, nt as FileInfo, o as BackendCapabilities, on as PreviewLinkManager, or as SandboxFleetManifestMachine, ot as FileReadResult, p as BatchBackendStats, pi as TaskSessionChanges, pn as ProcessStatus, pr as SandboxFleetTraceOptions, pt as FleetDispatchCancelResult, q as DriveTurnOptions, qi as AgentProfileValidationResult, qn as SandboxFleetArtifactSpec, qr as SendSessionMessageRequest, qt as ListMessagesOptions, r as AddUserOptions, ri as SnapshotInfo, rn as PermissionLevel, rr as SandboxFleetMachineRecord, rt as FileReadBatchOptions, s as BackendConfig, si as StartupDiagnostics, sn as Process, sr as SandboxFleetOperationsSummary, st as FileRenameResult, t as AcceleratorKind, ti as SessionMessageInputPart, tn as NetworkManager, tr as SandboxFleetMachine, tt as ExecResult, u as BackendStatus, ui as SubscriptionInfo, un as ProcessManager, ur as SandboxFleetTraceBundle, ut as FileTreeOptions, v as BatchRunOptions, vi as TeeAttestationOptions, vn as ProvisionResult, vr as SandboxFleetWorkspaceSnapshotResult, w as BranchOptions, wi as ToolsConfig, wn as PublishPublicTemplateVersionOptions, wr as SandboxProfileSummary, wt as GitBranch, x as BatchTask, xi as TeePublicKey, xn as PublicTemplateInfo, xr as SandboxPermissionsConfig, y as BatchRunRequest, yi as TeeAttestationReport, yn as ProvisionStatus, yr as SandboxInfo, yt as FleetMachineId, z as CreateSessionOptions, zi as AgentProfileFileMount, zn as RunCodeOptions, zr as SandboxUser, zt as HostAgentRuntimeBackend } from "./types-yNRVRww-.js";
2
- import { C as SandboxMcpConfig, D as buildSandboxMcpConfig, E as buildControlPlaneMcpConfig, S as SANDBOX_MCP_SERVER_NAME, T as SandboxMcpServerEntry, _ as RespondToPermissionOptions, a as TraceExportSink, b as BuildSandboxMcpConfigOptions, c as otelTraceIdForTangleTrace, d as SandboxSession, f as InteractiveAuthFile, g as InterruptResult, 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 StartInteractiveOptions, w as SandboxMcpEndpoint, x as CONTROL_PLANE_MCP_SERVER_NAME, y as BuildControlPlaneMcpConfigOptions } from "./sandbox-BvNEOnIl.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-C-4NcZoa.js";
1
+ import { $ as EgressManager, $i as defineInlineResource, $n as SandboxFleetDriverCapability, $r as SessionForkOptions, $t as McpServerConfig, A as CodeResult, Ai as UploadProgress, An as ReconcileSandboxFleetsResult, Ar as SandboxRuntimeProfile, At as GitStatus, B as CreateSandboxOptions, Bi as AgentProfileConnection, Bn as RolloutTurnPart, Br as SandboxTraceOptions, Bt as HostAgentDriverConfig, C as BatchTaskUsage, Ci as TeePublicKey, Cn as PublicTemplateInfo, Cr as SandboxPermissionsConfig, Di as TurnDriveResult, Dn as ReapExpiredSandboxFleetsOptions, Dr as SandboxResourceUsage, Dt as GitCommit, E as ChunkedUploadResult, Ei as ToolsConfig, En as PublishPublicTemplateVersionOptions, Er as SandboxProfileSummary, Et as GitBranch, F as CreateIntelligenceReportOptions, Fi as WriteManyFile, Fn as RolloutChildResult, Fr as SandboxTerminalManager, Ft as GpuLeaseExecResult, G as DispatchPromptOptions, Gi as AgentProfilePrompt, Gn as SandboxConnection, Gr as SearchOptions, Gt as IntelligenceReportCompareTo, H as CreateTaskSessionOptions, Hi as AgentProfileMcpServer, Hn as SSHCommandDescriptor, Hr as ScopedToken, Ht as InstalledTool, I as CreateRequestOptions, Ii as WriteManyOptions, In as RolloutOptions, Ir as SandboxTerminalRequestOptions, It as GpuLeaseManager, J as DownloadProgress, Ji as AgentProfileValidationIssue, Jn as SandboxFleetArtifact, Jr as SendSessionMessageOptions, K as DispatchedSession, Ki as AgentProfileResourceRef, Kn as SandboxEnvironment, Kr as SecretInfo, Kt as IntelligenceReportSubjectType, L as CreateSandboxFleetOptions, Li as AgentProfile, Ln as RolloutScorer, Lr as SandboxTraceBundle, Lt as GpuLeaseProviderName, M as CommitTaskSessionOptions, Mi as WaitForOptions, Mr as SandboxStatus, Mt as GpuLeaseBilling, N as CompletedTurnResult, Ni as WaitForRolloutOptions, Nr as SandboxTerminalCreateOptions, Nt as GpuLeaseCommandResult, Oi as UpdateUserOptions, On as ReapExpiredSandboxFleetsResult, Or as SandboxResources, Ot as GitConfig, P as CreateGpuLeaseOptions, Pi as WriteFileOptions, Pn as Rollout, Pr as SandboxTerminalInfo, Pt as GpuLeaseExecOptions, Q as DriverType, Qi as defineGitHubResource, Qn as SandboxFleetDispatchResponse, Qr as SessionEventStreamOptions, Qt as ListSandboxOptions, Ri as AgentProfileCapabilities, Rn as RolloutStartResult, Rr as SandboxTraceEvent, Rt as GpuLeaseStatus, S as BatchTaskResult, Si as TeeAttestationResponse, Sn as ProvisionStep, Sr as SandboxIntelligenceEnvelope, St as FleetPromptDispatchOptions, T as ChunkedUploadOptions, Ti as TokenRefreshHandler, Tn as PublishPublicTemplateOptions, Tr as SandboxPortPreviewLink, Tt as GitAuth, U as DeleteOptions, Ui as AgentProfileModelHints, Un as SSHCredentials, Ur as ScopedTokenScope, Ut as IntelligenceReport, V as CreateSessionOptions, Vi as AgentProfileFileMount, Vn as RunCodeOptions, Vr as SandboxUser, Vt as HostAgentRuntimeBackend, W as DirectoryPermission, Wi as AgentProfilePermissionValue, Wn as SandboxClientConfig, Wr as SearchMatch, Wt as IntelligenceReportBudget, X as DriverConfig, Xi as AgentSubagentProfile, Xn as SandboxFleetCostEstimate, Xr as SentSessionMessage, Xt as ListOptions, Y as DriveTurnOptions, Yi as AgentProfileValidationResult, Yn as SandboxFleetArtifactSpec, Yr as SendSessionMessageRequest, Yt as ListMessagesOptions, Z as DriverInfo, Zi as defineAgentProfile, Zn as SandboxFleetDispatchFailureClass, Zr as SessionBackendCredentials, Zt as ListSandboxFleetOptions, _ as BatchResult, _i as TaskSessionFileChange, _n as PromptOptions, _r as SandboxFleetWorkspace, _t as FleetDispatchResultBufferOptions, a as AttachSandboxFleetMachineOptions, ai as SnapshotInfo, an as PermissionLevel, ar as SandboxFleetMachineRecord, at as FileReadBatchOptions, b as BatchSidecarGroup, bi as TeeAttestationOptions, bn as ProvisionResult, br as SandboxFleetWorkspaceSnapshotResult, c as BackendInfo, cn as PreviewLinkManager, cr as SandboxFleetManifestMachine, ct as FileReadResult, d as BackendType, di as StorageConfig, dn as ProcessLogEntry, dr as SandboxFleetToken, dt as FileTreeFile, ea as mergeAgentProfiles, ei as SessionInfo, en as MintScopedTokenOptions, er as SandboxFleetDriverTimings, et as EgressPolicy, f as BatchBackend, fi as SubscriptionInfo, fn as ProcessManager, fr as SandboxFleetTraceBundle, ft as FileTreeOptions, g as BatchOptions, gi as TaskSessionCommitResult, gr as SandboxFleetUsage, gt as FleetDispatchResultBuffer, h as BatchEventDataMap, hi as TaskSessionChanges, hn as ProcessStatus, hr as SandboxFleetTraceOptions, ht as FleetDispatchCancelResult, i as AttachGpuLeaseOptions, ii as SessionStatus, in as NonHostAgentDriverConfig, ir as SandboxFleetMachineMeteredUsage, it as FileInfo, ji as UsageInfo, jn as RenameOptions, jr as SandboxRuntimeProfileList, jt as GpuLease, ki as UploadOptions, kn as ReconcileSandboxFleetsOptions, kr as SandboxRuntimeHealth, kt as GitDiff, l as BackendManager, li as StartupDiagnostics, ln as Process, lr as SandboxFleetOperationsSummary, lt as FileRenameResult, m as BatchEvent, mi as TaskResult, mn as ProcessSpawnOptions, mr as SandboxFleetTraceExport, mt as FileWriteResult, n as AccessPolicyRule, ni as SessionMessage, nn as NetworkConfig, nr as SandboxFleetIntelligenceEnvelope, nt as ExecOptions, o as BackendCapabilities, oi as SnapshotOptions, on as PermissionsManager, or as SandboxFleetMachineSpec, ot as FileReadBatchResult, p as BatchBackendStats, pi as TaskOptions, pn as ProcessSignal, pr as SandboxFleetTraceEvent, pt as FileTreeResult, q as DownloadOptions, qi as AgentProfileResources, qn as SandboxEvent, qr as SecretsManager, qt as IntelligenceReportWindow, r as AddUserOptions, ri as SessionMessageInputPart, rn as NetworkManager, rr as SandboxFleetMachine, rt as ExecResult, s as BackendConfig, si as SnapshotResult, sn as PreviewLinkInfo, sr as SandboxFleetManifest, st as FileReadError, t as AcceleratorKind, ti as SessionListOptions, tn as MkdirOptions, tr as SandboxFleetInfo, tt as EventStreamOptions, u as BackendStatus, ui as StartupOperation, un as ProcessInfo, ur as SandboxFleetPolicy, ut as FileSystem, v as BatchRunOptions, vi as TaskSessionInfo, vn as PromptResult, vr as SandboxFleetWorkspaceReconcileResult, vt as FleetDispatchStreamOptions, w as BranchOptions, wi as TeePublicKeyResponse, wn as PublicTemplateVersionInfo, wr as SandboxPortBinding, wt as GPU_LEASE_PROVIDER_NAMES, x as BatchTask, xi as TeeAttestationReport, xn as ProvisionStatus, xr as SandboxInfo, xt as FleetMachineId, y as BatchRunRequest, yi as TaskSessionProfile, yn as ProvisionEvent, yr as SandboxFleetWorkspaceRestoreResult, yt as FleetExecDispatchOptions, z as CreateSandboxFleetWithCoordinatorOptions, zi as AgentProfileConfidential, zn as RolloutStatus, zr as SandboxTraceExport, zt as GpuType } from "./types-LNLeU9Ub.js";
2
+ import { C as SandboxMcpConfig, D as buildSandboxMcpConfig, E as buildControlPlaneMcpConfig, S as SANDBOX_MCP_SERVER_NAME, T as SandboxMcpServerEntry, _ as RespondToPermissionOptions, a as TraceExportSink, b as BuildSandboxMcpConfigOptions, c as otelTraceIdForTangleTrace, d as SandboxSession, f as InteractiveAuthFile, g as InterruptResult, 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 StartInteractiveOptions, w as SandboxMcpEndpoint, x as CONTROL_PLANE_MCP_SERVER_NAME, y as BuildControlPlaneMcpConfigOptions } from "./sandbox-B9P4tyt4.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-CSaBJ8wD.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-CNCz3Ms9.js";
7
- import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-DFJiN98I.js";
7
+ import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-CEZaPvfX.js";
8
8
 
9
9
  //#region src/attestation-heartbeat.d.ts
10
10
  interface TeeAttestationHeartbeatSample {
@@ -1063,10 +1063,31 @@ interface MaterializeProfileFileMountsResult {
1063
1063
  written: number;
1064
1064
  viaFileApi: number;
1065
1065
  viaExec: number;
1066
+ /** Files delivered through {@link FileSystem.uploadData} because their
1067
+ * serialized content does not fit a gateway-safe single-shot write. */
1068
+ viaUpload: number;
1066
1069
  }
1067
1070
  type ProfileFileMountBox = Pick<SandboxInstance, "exec"> & {
1068
- fs?: Pick<SandboxInstance["fs"], "supportsWriteMode" | "writeMany">;
1071
+ fs?: Pick<SandboxInstance["fs"], "supportsWriteMode" | "writeMany"> & {
1072
+ /**
1073
+ * Optional chunked-upload capability. Only required when a deferred
1074
+ * inline mount's decoded content exceeds the gateway-safe single-shot
1075
+ * write ceiling — {@link materializeProfileFileMounts} fails loud
1076
+ * (naming the oversized mount) rather than attempting a single-shot
1077
+ * write the wire would reject.
1078
+ */
1079
+ uploadData?: SandboxInstance["fs"]["uploadData"];
1080
+ };
1069
1081
  };
1082
+ /**
1083
+ * Synchronous pre-flight validation of deferred inline mounts: the same
1084
+ * content/path rules {@link materializeProfileFileMounts} enforces, runnable
1085
+ * BEFORE a sandbox is provisioned. create() calls this ahead of its POST so
1086
+ * client-detectable bad input (traversal paths, control characters,
1087
+ * non-string content) fails without paying for a sandbox that would only be
1088
+ * orphaned by the post-provision throw.
1089
+ */
1090
+ declare function validateDeferredProfileFileMounts(files: readonly AgentProfileFileMount[]): void;
1070
1091
  declare function splitInlineProfileFileMounts(profile: AgentProfile): SplitInlineProfileFileMountsResult;
1071
1092
  declare function materializeProfileFileMounts(box: ProfileFileMountBox, files: readonly AgentProfileFileMount[], options?: MaterializeProfileFileMountsOptions): Promise<MaterializeProfileFileMountsResult>;
1072
1093
  //#endregion
@@ -1371,4 +1392,4 @@ interface RouterEvalMatrixCaseResult {
1371
1392
  }
1372
1393
  declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
1373
1394
  //#endregion
1374
- 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 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, CapabilityError, 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 DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EventStreamOptions, 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 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 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 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, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, startTeeAttestationHeartbeat, toOtelJson };
1395
+ 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 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, 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 DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EventStreamOptions, 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 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 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 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, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, startTeeAttestationHeartbeat, toOtelJson, validateDeferredProfileFileMounts };
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { i as serializeForSidecar, r as normalizeRuntimeBackendConfig } from "./runtime-api-CaXI7Kl2.js";
1
+ import { a as serializeForSidecar, i as normalizeRuntimeBackendConfig } from "./runtime-api-BWq4XSrb.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-wd266B9Q.js";
3
- import { a as InteractiveSessionHandle, c as getSandboxEventText, d as exportTraceBundle, f as otelTraceIdForTangleTrace, g as parseSSEStream, h as encodeTextForWire, i as SandboxSession, o as applySandboxEventText, p as toOtelJson, r as SandboxTaskSession, s as collectAgentResponseText, t as SandboxInstance, u as buildTraceExportPayload } from "./sandbox-CIHssZCH.js";
4
- import { a as DEFAULT_SANDBOX_SIZE, c as resolveSandboxResources, i as SandboxFleetClient, l as sandboxResourcesForSize, n as SandboxClient, o as SANDBOX_SIZE_PRESETS, r as SandboxFleet, s as SANDBOX_SIZE_PRESET_NAMES, t as IntelligenceClient } from "./client-CL_cbjU4.js";
3
+ import { a as InteractiveSessionHandle, c as getSandboxEventText, d as exportTraceBundle, f as otelTraceIdForTangleTrace, g as parseSSEStream, i as SandboxSession, o as applySandboxEventText, p as toOtelJson, r as SandboxTaskSession, s as collectAgentResponseText, t as SandboxInstance, u as buildTraceExportPayload } from "./sandbox-KiKLRbR_.js";
4
+ import { a as validateDeferredProfileFileMounts, c as DEFAULT_SANDBOX_SIZE, d as resolveSandboxResources, f as sandboxResourcesForSize, i as splitInlineProfileFileMounts, l as SANDBOX_SIZE_PRESETS, n as SandboxClient, o as SandboxFleet, r as materializeProfileFileMounts, s as SandboxFleetClient, t as IntelligenceClient, u as SANDBOX_SIZE_PRESET_NAMES } from "./client-_OBj4sNO.js";
5
5
  import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-CcZE2xMl.js";
6
- import { t as TangleSandboxClient } from "./tangle-C-5OvIj8.js";
6
+ import { t as TangleSandboxClient } from "./tangle-Os9sH-ms.js";
7
7
  import { defineAgentProfile, defineGitHubResource, defineInlineResource, mergeAgentProfiles } from "@tangle-network/agent-interface";
8
8
  //#region src/confidential.ts
9
9
  function generateAttestationNonce(bytes = 32) {
@@ -1062,281 +1062,6 @@ function buildControlPlaneMcpConfig(options) {
1062
1062
  };
1063
1063
  }
1064
1064
  //#endregion
1065
- //#region src/profile-file-mounts.ts
1066
- const PROFILE_FILE_MOUNT_B64_CHUNK_CHARS = 3e3;
1067
- const PROFILE_FILE_MOUNT_MAX_RETRIES = 4;
1068
- const PROFILE_FILE_MOUNT_RETRY_BASE_MS = 250;
1069
- const PROFILE_FILE_MOUNT_RETRY_MAX_MS = 2e3;
1070
- const PROFILE_FILE_MOUNT_EXEC_TIMEOUT_MS = 3e4;
1071
- const PROFILE_FILE_MOUNT_PACE_MS = 150;
1072
- const PROFILE_BIN_DIR_RE = /(^|\/)(s?bin)\//;
1073
- const DEFAULT_PROFILE_FILE_API_ABSOLUTE_PREFIXES = [
1074
- ["/home", "agent"].join("/"),
1075
- ["/home", "user"].join("/"),
1076
- "/tmp",
1077
- "/output"
1078
- ];
1079
- function inlineContent(mount) {
1080
- const resource = mount.resource;
1081
- if (resource.kind !== "inline") throw new Error(`materializeProfileFileMounts: ${mount.path} requires an inline resource`);
1082
- if (typeof resource.content !== "string") throw new Error(`materializeProfileFileMounts: ${mount.path} inline resource requires string content`);
1083
- return resource.content;
1084
- }
1085
- function splitInlineProfileFileMounts(profile) {
1086
- const files = profile.resources?.files ?? [];
1087
- const deferredFiles = [];
1088
- const keptFiles = [];
1089
- for (const mount of files) if (mount.resource.kind === "inline") deferredFiles.push(mount);
1090
- else keptFiles.push(mount);
1091
- if (deferredFiles.length === 0) return {
1092
- leanProfile: profile,
1093
- deferredFiles
1094
- };
1095
- return {
1096
- leanProfile: {
1097
- ...profile,
1098
- resources: {
1099
- ...profile.resources ?? {},
1100
- files: keptFiles
1101
- }
1102
- },
1103
- deferredFiles
1104
- };
1105
- }
1106
- function shellSingleQuote(value) {
1107
- return `'${value.replace(/'/g, `'\\''`)}'`;
1108
- }
1109
- function shellPath(path) {
1110
- if (path === "~") return "\"$HOME\"";
1111
- if (path.startsWith("~/")) {
1112
- const rest = path.slice(2);
1113
- return rest ? `"$HOME"/${shellSingleQuote(rest)}` : "\"$HOME\"";
1114
- }
1115
- return shellSingleQuote(path);
1116
- }
1117
- function validateProfileFilePath(path) {
1118
- if (!path) throw new Error("materializeProfileFileMounts: file path is required");
1119
- if (path.endsWith("/")) throw new Error(`materializeProfileFileMounts: refusing directory-shaped file path ${path}`);
1120
- if (hasControlCharacter(path)) throw new Error(`materializeProfileFileMounts: refusing unsafe file path ${JSON.stringify(path)}`);
1121
- if (path === "~" || /^~[^/]/.test(path)) throw new Error(`materializeProfileFileMounts: refusing unsupported home path ${path}`);
1122
- if (hasUnsafeFileApiSegment(path)) throw new Error(`materializeProfileFileMounts: refusing unsafe file path ${path}`);
1123
- }
1124
- function hasUnsafeFileApiSegment(path) {
1125
- return path.split("/").some((segment) => segment === "." || segment === ".." || segment === ".sidecar");
1126
- }
1127
- function hasControlCharacter(value) {
1128
- for (let i = 0; i < value.length; i++) {
1129
- const code = value.charCodeAt(i);
1130
- if (code < 32 || code === 127) return true;
1131
- }
1132
- return false;
1133
- }
1134
- function normalizeAbsolutePrefixes(prefixes) {
1135
- return prefixes.map((prefix) => {
1136
- const normalized = prefix.trim().replace(/\/+$/, "");
1137
- if (!normalized.startsWith("/") || hasControlCharacter(normalized)) throw new Error(`materializeProfileFileMounts: fileApiAbsolutePrefixes must contain absolute paths; received ${JSON.stringify(prefix)}`);
1138
- if (hasUnsafeFileApiSegment(normalized)) throw new Error(`materializeProfileFileMounts: fileApiAbsolutePrefixes contains unsafe path ${JSON.stringify(prefix)}`);
1139
- return normalized;
1140
- });
1141
- }
1142
- function isAllowedAbsoluteFileApiPath(path, prefixes) {
1143
- for (const prefix of prefixes) if (path === prefix || path.startsWith(`${prefix}/`)) return true;
1144
- return false;
1145
- }
1146
- function fileApiTarget(mount, absolutePrefixes) {
1147
- if (mount.path.startsWith("~/")) return null;
1148
- if (mount.path.startsWith("/")) return isAllowedAbsoluteFileApiPath(mount.path, absolutePrefixes) ? mount.path : null;
1149
- if (mount.path.startsWith("~")) return null;
1150
- if (mount.path.length === 0) return null;
1151
- return mount.path;
1152
- }
1153
- function isExecutableProfileFile(mount) {
1154
- return mount.executable ?? PROFILE_BIN_DIR_RE.test(mount.path);
1155
- }
1156
- function profileFileMode(mount) {
1157
- return isExecutableProfileFile(mount) ? 493 : void 0;
1158
- }
1159
- function fileApiSupportsMode(box) {
1160
- return box.fs?.supportsWriteMode === true;
1161
- }
1162
- const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
1163
- var ProfileFileMountExecTimeoutError = class extends Error {
1164
- constructor(timeoutMs) {
1165
- super(`exec exceeded ${timeoutMs}ms`);
1166
- this.name = "ProfileFileMountExecTimeoutError";
1167
- }
1168
- };
1169
- function execWithTimeout(box, cmd, timeoutMs) {
1170
- return new Promise((resolve, reject) => {
1171
- let settled = false;
1172
- const timer = setTimeout(() => {
1173
- if (settled) return;
1174
- settled = true;
1175
- reject(new ProfileFileMountExecTimeoutError(timeoutMs));
1176
- }, timeoutMs);
1177
- box.exec(cmd, { timeoutMs }).then((res) => {
1178
- if (settled) return;
1179
- settled = true;
1180
- clearTimeout(timer);
1181
- resolve(res);
1182
- }, (err) => {
1183
- if (settled) return;
1184
- settled = true;
1185
- clearTimeout(timer);
1186
- reject(err);
1187
- });
1188
- });
1189
- }
1190
- const TRANSIENT_EXEC_STATUS_CODES = new Set([
1191
- 408,
1192
- 409,
1193
- 425,
1194
- 429,
1195
- 500,
1196
- 502,
1197
- 503,
1198
- 504
1199
- ]);
1200
- const TRANSIENT_EXEC_CODE_RE = /^(ECONNRESET|ECONNREFUSED|ETIMEDOUT|EPIPE|ECONNABORTED)$/i;
1201
- const TRANSIENT_EXEC_MESSAGE_RE = /\b(408|409|425|429|500|502|503|504)\b|rate.?limit|too many requests|\bfetch failed\b|network error|connection reset|socket hang up|timed? out|service unavailable|bad gateway|gateway timeout|internal server error|\b(?:sidecar|runtime|exec(?:ution)?|terminal|sandbox|service|command(?:s)?|proxy)\b.{0,80}\bnot ready\b|\bnot ready\b.{0,80}\b(?:sidecar|runtime|exec(?:ution)?|terminal|sandbox|service|command(?:s)?|proxy)\b/i;
1202
- function errorStatus(err) {
1203
- const rawStatus = err.status ?? err.statusCode ?? (err.response && typeof err.response === "object" ? err.response.status : void 0);
1204
- if (typeof rawStatus === "number") return rawStatus;
1205
- if (typeof rawStatus === "string" && /^\d+$/.test(rawStatus)) return Number(rawStatus);
1206
- }
1207
- function retryAfterMs(err, seen = /* @__PURE__ */ new Set()) {
1208
- if (!err || typeof err !== "object") return void 0;
1209
- if (seen.has(err)) return void 0;
1210
- seen.add(err);
1211
- const e = err;
1212
- if (typeof e.retryAfterMs === "number") return e.retryAfterMs;
1213
- return retryAfterMs(e.cause, seen);
1214
- }
1215
- function isTransientExecError(err, seen = /* @__PURE__ */ new Set()) {
1216
- if (!err || typeof err !== "object") return false;
1217
- if (seen.has(err)) return false;
1218
- seen.add(err);
1219
- const e = err;
1220
- const status = errorStatus(e);
1221
- if (status !== void 0 && TRANSIENT_EXEC_STATUS_CODES.has(status)) return true;
1222
- if (typeof e.code === "string") {
1223
- if (TRANSIENT_EXEC_CODE_RE.test(e.code)) return true;
1224
- if (/rate.?limit|too.?many.?requests|429|server.?error|service.?unavailable/i.test(e.code)) return true;
1225
- }
1226
- if (typeof e.message === "string" && TRANSIENT_EXEC_MESSAGE_RE.test(e.message)) return true;
1227
- return isTransientExecError(e.cause, seen);
1228
- }
1229
- function transientExecError(err) {
1230
- if (err instanceof ProfileFileMountExecTimeoutError) return { retryable: false };
1231
- if (isTransientExecError(err)) return {
1232
- retryable: true,
1233
- retryAfterMs: retryAfterMs(err)
1234
- };
1235
- return { retryable: false };
1236
- }
1237
- async function sha256Hex(content) {
1238
- const bytes = new TextEncoder().encode(content);
1239
- const webSubtle = globalThis.crypto?.subtle;
1240
- if (webSubtle) {
1241
- const digest = await webSubtle.digest("SHA-256", bytes);
1242
- return Array.from(new Uint8Array(digest)).map((byte) => byte.toString(16).padStart(2, "0")).join("");
1243
- }
1244
- const { createHash } = await import("node:crypto");
1245
- return createHash("sha256").update(content, "utf8").digest("hex");
1246
- }
1247
- async function execProfileFileMount(box, mount, content, options, execState) {
1248
- const maxRetries = options.maxRetries ?? PROFILE_FILE_MOUNT_MAX_RETRIES;
1249
- const path = mount.path;
1250
- const b64 = encodeTextForWire(content);
1251
- const b64Chunks = [];
1252
- for (let i = 0; i < b64.length; i += PROFILE_FILE_MOUNT_B64_CHUNK_CHARS) b64Chunks.push(b64.slice(i, i + PROFILE_FILE_MOUNT_B64_CHUNK_CHARS));
1253
- const expectedSha256 = await sha256Hex(content);
1254
- const dir = path.replace(/\/[^/]*$/, "");
1255
- const executable = isExecutableProfileFile(mount);
1256
- const q = shellPath(path);
1257
- const qb64 = shellPath(`${path}.b64`);
1258
- const qtmp = shellPath(`${path}.tmp`);
1259
- const qpartPrefix = shellPath(`${path}.b64.part.`);
1260
- const homeGuard = path.startsWith("~/") ? `[ -n "$HOME" ] || { echo ${shellSingleQuote(`materializeProfileFileMounts: HOME is unset for ${path}`)} >&2; exit 1; }; ` : "";
1261
- const run = async (cmd) => {
1262
- for (let attempt = 0;; attempt++) {
1263
- if (execState.started && options.paceMs > 0) await sleep(options.paceMs);
1264
- execState.started = true;
1265
- try {
1266
- return await execWithTimeout(box, cmd, options.execTimeoutMs);
1267
- } catch (err) {
1268
- const { retryable, retryAfterMs: retryAfter } = transientExecError(err);
1269
- if (retryable && attempt < maxRetries) {
1270
- const backoff = Math.min(PROFILE_FILE_MOUNT_RETRY_BASE_MS * 2 ** attempt, PROFILE_FILE_MOUNT_RETRY_MAX_MS);
1271
- await sleep(Math.min(retryAfter ?? backoff, PROFILE_FILE_MOUNT_RETRY_MAX_MS));
1272
- continue;
1273
- }
1274
- throw new Error(`materializeProfileFileMounts: exec failed for ${path}`, { cause: err });
1275
- }
1276
- }
1277
- };
1278
- const step = async (cmd) => {
1279
- const result = await run(`${homeGuard}${cmd}`);
1280
- if (result.exitCode !== 0) throw new Error(`materializeProfileFileMounts: failed to write ${path} (exit ${result.exitCode}): ${result.stderr.slice(0, 500)}`);
1281
- };
1282
- await step(dir ? `mkdir -p ${shellPath(dir)}` : ":");
1283
- for (let i = 0; i < b64Chunks.length; i++) {
1284
- const slice = b64Chunks[i];
1285
- if (slice === void 0) continue;
1286
- await step(`printf '%s' '${slice}' > ${shellPath(`${path}.b64.part.${i}`)}`);
1287
- }
1288
- const chmod = executable ? `chmod +x ${q} || exit 1; ` : "";
1289
- const checksumMismatch = shellSingleQuote(`materializeProfileFileMounts: checksum mismatch for ${path}`);
1290
- await step(`cleanup() { ${`rm -f ${qb64} ${qtmp}; i=0; while [ "$i" -lt ${b64Chunks.length} ]; do rm -f ${qpartPrefix}$i; i=$((i+1)); done`}; }; trap cleanup EXIT; expected='${expectedSha256}'; if [ -f ${q} ] && [ "$(sha256sum ${q} | awk '{print $1}')" = "$expected" ]; then ${chmod}exit 0; fi; : > ${qb64} && i=0; while [ "$i" -lt ${b64Chunks.length} ]; do cat ${qpartPrefix}$i >> ${qb64} || exit 1; i=$((i+1)); done && base64 -d ${qb64} > ${qtmp} && [ "$(sha256sum ${qtmp} | awk '{print $1}')" = "$expected" ] || { echo ${checksumMismatch} >&2; exit 1; }; mv ${qtmp} ${q} && ${executable ? `chmod +x ${q} && ` : ""}[ "$(sha256sum ${q} | awk '{print $1}')" = "$expected" ] || { echo ${checksumMismatch} >&2; exit 1; }`);
1291
- }
1292
- async function materializeProfileFileMounts(box, files, options = {}) {
1293
- const execTimeoutMs = options.execTimeoutMs ?? PROFILE_FILE_MOUNT_EXEC_TIMEOUT_MS;
1294
- const paceMs = options.paceMs ?? PROFILE_FILE_MOUNT_PACE_MS;
1295
- const maxRetries = options.maxRetries ?? PROFILE_FILE_MOUNT_MAX_RETRIES;
1296
- const absolutePrefixes = normalizeAbsolutePrefixes(options.fileApiAbsolutePrefixes ?? DEFAULT_PROFILE_FILE_API_ABSOLUTE_PREFIXES);
1297
- const fs = box.fs;
1298
- const fileApiAvailable = typeof fs?.writeMany === "function";
1299
- const modeAwareFileApi = fileApiSupportsMode(box);
1300
- const viaFileApi = [];
1301
- const viaExec = [];
1302
- for (const mount of files) {
1303
- const content = inlineContent(mount);
1304
- validateProfileFilePath(mount.path);
1305
- const target = fileApiAvailable ? fileApiTarget(mount, absolutePrefixes) : null;
1306
- const executable = isExecutableProfileFile(mount);
1307
- if (target !== null && (!executable || modeAwareFileApi)) {
1308
- const mode = profileFileMode(mount);
1309
- viaFileApi.push({
1310
- path: target,
1311
- content,
1312
- ...mode !== void 0 ? { mode } : {}
1313
- });
1314
- } else viaExec.push({
1315
- mount,
1316
- content
1317
- });
1318
- }
1319
- if (viaFileApi.length > 0) try {
1320
- await fs?.writeMany(viaFileApi, {
1321
- paceMs,
1322
- maxRetries
1323
- });
1324
- } catch (err) {
1325
- throw new Error("materializeProfileFileMounts: file API batch write failed", { cause: err });
1326
- }
1327
- const execState = { started: false };
1328
- for (const item of viaExec) await execProfileFileMount(box, item.mount, item.content, {
1329
- execTimeoutMs,
1330
- paceMs,
1331
- maxRetries
1332
- }, execState);
1333
- return {
1334
- written: viaFileApi.length + viaExec.length,
1335
- viaFileApi: viaFileApi.length,
1336
- viaExec: viaExec.length
1337
- };
1338
- }
1339
- //#endregion
1340
1065
  //#region src/router-search.ts
1341
1066
  const DEFAULT_ROUTER_URL = "https://router.tangle.tools";
1342
1067
  async function fetchTangleRouterSearchConfig(options = {}) {
@@ -1730,4 +1455,4 @@ function stripUndefined(value) {
1730
1455
  return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => [k, stripUndefined(v)]));
1731
1456
  }
1732
1457
  //#endregion
1733
- 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, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, startTeeAttestationHeartbeat, toOtelJson };
1458
+ 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, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, startTeeAttestationHeartbeat, toOtelJson, validateDeferredProfileFileMounts };