@tangle-network/sandbox 0.43.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { $ as SandboxMcpEndpoint, A as InterruptResult, B as InteractiveAttachRequest, C as InteractiveSessionHost, D as InteractiveSessionStartOptions, E as InteractiveSessionRef, F as InteractiveTerminalMetadata, G as SandboxInteractionConflict, H as InteractiveSessionControllerOptions, I as createInteractiveTerminalCapture, J as BuildControlPlaneMcpConfigOptions, K as SandboxInteractionResolution, L as createInteractiveTerminalSession, M as agentInteractiveSessionPromptRequestDigest, N as InteractiveTerminalCapture, O as InteractiveSessionStartResult, P as InteractiveTerminalFrameLog, Q as SandboxMcpConfig, R as BrowserInteractiveSessionController, S as InteractiveSessionHandleOptions, T as InteractiveSessionInfo, U as InteractiveSessionControllerTransport, V as InteractiveSessionController, W as SandboxInteractionCommandResult, X as CONTROL_PLANE_MCP_SERVER_NAME, Y as BuildSandboxMcpConfigOptions, Z as SANDBOX_MCP_SERVER_NAME, _ as AgentInteractiveTerminalSession, a as WorkspaceImagePublishRequestOptions, b as InteractiveSessionControlClaim, c as TraceExportFormat, d as buildTraceExportPayload, et as SandboxMcpServerEntry, f as exportTraceBundle, g as SandboxSession, h as SandboxTaskSession, i as WorkspaceImagePublishInput, j as RespondToPermissionOptions, k as InteractiveStopCommand, l as TraceExportResult, m as toOtelJson, nt as buildSandboxMcpConfig, o as WorkspaceImagePublishResult, p as otelTraceIdForTangleTrace, q as SandboxInteractionResult, r as SandboxInstance, s as WorkspaceImages, t as ForkAcknowledgement, tt as buildControlPlaneMcpConfig, u as TraceExportSink, v as InteractiveControlClaimRequest, w as InteractiveSessionIncarnationId, x as InteractiveSessionHandle, y as InteractivePromptCommand, z as BrowserInteractiveSessionControllerOptions } from "./sandbox-DVJ-rfdd.js";
1
+ import { $ as SandboxMcpEndpoint, A as InterruptResult, B as InteractiveAttachRequest, C as InteractiveSessionHost, D as InteractiveSessionStartOptions, E as InteractiveSessionRef, F as InteractiveTerminalMetadata, G as SandboxInteractionConflict, H as InteractiveSessionControllerOptions, I as createInteractiveTerminalCapture, J as BuildControlPlaneMcpConfigOptions, K as SandboxInteractionResolution, L as createInteractiveTerminalSession, M as agentInteractiveSessionPromptRequestDigest, N as InteractiveTerminalCapture, O as InteractiveSessionStartResult, P as InteractiveTerminalFrameLog, Q as SandboxMcpConfig, R as BrowserInteractiveSessionController, S as InteractiveSessionHandleOptions, T as InteractiveSessionInfo, U as InteractiveSessionControllerTransport, V as InteractiveSessionController, W as SandboxInteractionCommandResult, X as CONTROL_PLANE_MCP_SERVER_NAME, Y as BuildSandboxMcpConfigOptions, Z as SANDBOX_MCP_SERVER_NAME, _ as AgentInteractiveTerminalSession, a as WorkspaceImagePublishRequestOptions, b as InteractiveSessionControlClaim, c as TraceExportFormat, d as buildTraceExportPayload, et as SandboxMcpServerEntry, f as exportTraceBundle, g as SandboxSession, h as SandboxTaskSession, i as WorkspaceImagePublishInput, j as RespondToPermissionOptions, k as InteractiveStopCommand, l as TraceExportResult, m as toOtelJson, nt as buildSandboxMcpConfig, o as WorkspaceImagePublishResult, p as otelTraceIdForTangleTrace, q as SandboxInteractionResult, r as SandboxInstance, s as WorkspaceImages, t as ForkAcknowledgement, tt as buildControlPlaneMcpConfig, u as TraceExportSink, v as InteractiveControlClaimRequest, w as InteractiveSessionIncarnationId, x as InteractiveSessionHandle, y as InteractivePromptCommand, z as BrowserInteractiveSessionControllerOptions } from "./sandbox-cTa_FF5p.js";
2
2
  import { c as MintScopedTokenOptions, d as TERMINAL_WS_ECHO_SUBPROTOCOL, f as TerminalExitInfo, g as TerminalStreamAuthFormat, h as TerminalReadyInfo, i as TerminalStreamOptions, l as ScopedToken, m as TerminalOutputMessage, n as TerminalStreamError, o as TerminalStreamToken, p as TerminalInteractiveSessionIdentity, r as TerminalStreamHandlers, s as MintInteractiveSessionTokenOptions, t as TerminalStream, u as ScopedTokenScope } from "./terminal-stream-CcaBTVg3.js";
3
3
  import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as InteractiveAttachOptions, f as InteractiveControlClaimAcknowledgement, h as InteractiveSessionStatus, i as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as createInteractiveControlHolderId, m as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimOptions, r as browserInteractiveControlHolderId, s as InteractiveSessionControlTransport, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-BELrFH4f.js";
4
- import { $ as DurablePlanDecisionResult, $i as UpdateUserOptions, $n as RolloutScorer, $r as SandboxTerminalCreateOptions, $t as GpuLeaseStatus, A as CommitTaskSessionOptions, Ai as SnapshotDeleteOutcome, An as ProcessSpawnOptions, Ar as SandboxFleetPolicy, At as FleetDriveTurnRequest, B as CreateTaskSessionOptions, Bi as TaskSessionChanges, Bn as PublicTemplateVersionInfo, Br as SandboxFleetWorkspaceSnapshotResult, Bt as GitAuth, C as BranchOptions, Ci as SessionInterruptOptions, Cn as PreviewLinkWaitOptions, Cr as SandboxFleetMachine, Ct as FileUsageResult, Di as SessionResultOptions, Dn as ProcessLogEntry, Dr as SandboxFleetManifest, Dt as FleetDispatchResultBufferOptions, Ei as SessionMessageInputPart, En as ProcessListOptions, Er as SandboxFleetMachineSpec, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fn as ProvisionEvent, Fr as SandboxFleetTraceOptions, G as DispatchedSession, Gi as TeeAttestationOptions, Gn as ReconcileSandboxFleetsOptions, Gr as SandboxPortPreviewLink, Gt as GitStatus, H as DevServerInfo, Hi as TaskSessionFileChange, Hn as PublishPublicTemplateVersionOptions, Hr as SandboxInfo, Ht as GitCommit, Ii as StartupDiagnostics, In as ProvisionResult, Ir as SandboxFleetUsage, It as ForkCounts, J as DriveTurnOptions, Ji as TeePublicKey, Jr as SandboxResources, Jt as GpuLeaseCommandResult, K as DownloadOptions, Ki as TeeAttestationReport, Kn as ReconcileSandboxFleetsResult, Kr as SandboxRemovalState, Kt as GpuLease, L as CreateSandboxFleetWithCoordinatorOptions, Li as StartupOperation, Ln as ProvisionStatus, Lr as SandboxFleetWorkspace, Lt as ForkIdempotency, M as CreateGpuLeaseOptions, Mi as SnapshotInfo, Mn as PromptInputPart, Mr as SandboxFleetTraceBundle, N as CreateIntelligenceReportOptions, Ni as SnapshotOptions, Nn as PromptOptions, Nr as SandboxFleetTraceEvent, Nt as FleetMachineId, Oi as SessionStatus, On as ProcessManager, Or as SandboxFleetManifestMachine, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pi as SnapshotResult, Pn as PromptResult, Pr as SandboxFleetTraceExport, Pt as FleetPromptDispatchOptions, Q as DurablePlan, Qi as TurnDriveResult, Qn as RolloutOptions, Qr as SandboxTerminalAttachOptions, Qt as GpuLeaseProviderName, R as CreateSandboxOptions, Ri as StorageConfig, Rn as ProvisionStep, Rr as SandboxFleetWorkspaceReconcileResult, Rt as ForkLookupOptions, S as BatchTaskResult, Si as SessionInfo, Sn as PreviewLinkManager, Sr as SandboxFleetIntelligenceEnvelope, St as FileUsageOptions, T as ChunkedUploadResult, Ti as SessionMessage, Tn as ProcessInfo, Tr as SandboxFleetMachineRecord, Tt as FleetDispatchCancelResult, U as DirectoryPermission, Ui as TaskSessionInfo, Un as ReapExpiredSandboxFleetsOptions, Ur as SandboxIntelligenceEnvelope, Ut as GitConfig, V as DeleteOptions, Vi as TaskSessionCommitResult, Vn as PublishPublicTemplateOptions, Vr as SandboxIdentity, Vt as GitBranch, W as DispatchPromptOptions, Wi as TaskSessionProfile, Wn as ReapExpiredSandboxFleetsResult, Wr as SandboxPortBinding, Wt as GitDiff, X as DriverInfo, Xi as TokenRefreshHandler, Xn as Rollout, Xr as SandboxRuntimeHealth, Xt as GpuLeaseExecResult, Y as DriverConfig, Yi as TeePublicKeyResponse, Yr as SandboxRuntimeCapabilities, Yt as GpuLeaseExecOptions, Z as DriverType, Zi as TokenUsage, Zn as RolloutChildResult, Zr as SandboxStatus, Zt as GpuLeaseManager, _ as BatchBackend, _a as parseBackendType, _i as SessionEventStreamOptions, _n as NetworkManager, _r as SandboxFleetDispatchFailureClass, _t as FileRenameResult, aa as WorkspaceOperationLookup, ai as SandboxTraceEvent, an as IntelligenceReportCompareTo, ar as SandboxConfig, at as EgressManager, b as BatchRunRequest, bi as SessionFailureReason, bn as PermissionsManager, br as SandboxFleetDriverTimings, bt as FileTreeOptions, c as AttachGpuLeaseOptions, ca as WriteManyOptions, ci as SandboxUser, cr as SandboxCreateReceipt, ct as EventStreamOptions, d as BackendConfig, da as BatchEventDataMap, di as SecretInfo, dn as ListSandboxFleetOptions, dr as SandboxDeleteOutcome, dt as ExecResult, ea as UploadOptions, ei as SandboxTerminalInfo, en as HostAgentDriverConfig, er as RolloutStartResult, f as BackendInfo, fa as BatchSidecarGroup, fi as SecretsManager, fn as ListSandboxOptions, fr as SandboxEnvironment, ft as FileInfo, g as BackendStatus, ga as BackendType, gi as SessionBackendCredentials, gn as NetworkConfig, gr as SandboxFleetCostEstimate, gt as FileReadResult, h as BackendRuntimeConfigUpdate, ha as ALL_BACKEND_TYPES, hi as SentSessionMessage, hn as MkdirOptions, hr as SandboxFleetArtifactSpec, ht as FileReadError, ia as WaitForRolloutOptions, ii as SandboxTraceBundle, in as IntelligenceReportBudget, ir as SSHCredentials, it as EgressDenial, j as CompletedTurnResult, ji as SnapshotIdempotency, jn as ProcessStatus, jr as SandboxFleetToken, jt as FleetExecDispatchOptions, ki as SnapshotDeleteAcknowledgement, kn as ProcessSignal, kr as SandboxFleetOperationsSummary, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, la as BatchBackendStats, li as SearchMatch, ln as ListMessagesOptions, lr as SandboxDeleteAcknowledgement, lt as ExactProcessSpawnOptions, m as BackendMcpServerStatus, ma as PublicBatchRunRequest, mi as SendSessionMessageRequest, mn as McpServerConfig, mr as SandboxFleetArtifact, mt as FileReadBatchResult, n as AccessPolicyRule, na as UsageInfo, ni as SandboxTerminalRequestOptions, nn as InstalledTool, nr as RolloutTurnPart, nt as EffectiveBackendProfile, oa as WriteFileOptions, oi as SandboxTraceExport, on as IntelligenceReportSubjectType, or as SandboxConnection, ot as EgressPolicy, p as BackendManager, pa as BatchTaskUsage, pi as SendSessionMessageOptions, pn as MAX_EGRESS_DENIALS_LIMIT, pr as SandboxEvent, pt as FileReadBatchOptions, q as DownloadProgress, qi as TeeAttestationResponse, qn as RenameOptions, qr as SandboxResourceUsage, qt as GpuLeaseBilling, r as AddUserOptions, ra as WaitForOptions, ri as SandboxTerminals, rn as IntelligenceReport, rr as SSHCommandDescriptor, rt as EffectiveBackendSource, sa as WriteManyFile, si as SandboxTraceOptions, sn as IntelligenceReportWindow, sr as SandboxCreateOutcome, st as EnsureDevServerOptions, t as AcceleratorKind, ta as UploadProgress, ti as SandboxTerminalManager, tn as HostAgentRuntimeBackend, tr as RolloutStatus, tt as EffectiveBackend, u as BackendCapabilities, ua as BatchEvent, ui as SearchOptions, un as ListOptions, ur as SandboxDeleteOptions, ut as ExecOptions, v as BatchResult, vi as SessionExecutionInfo, vn as NonHostAgentDriverConfig, vr as SandboxFleetDispatchResponse, vt as FileSystem, w as ChunkedUploadOptions, wi as SessionListOptions, wn as Process, wr as SandboxFleetMachineMeteredUsage, wt as FileWriteResult, x as BatchTask, xi as SessionForkOptions, xn as PreviewLinkInfo, xr as SandboxFleetInfo, xt as FileTreeResult, y as BatchRunOptions, yi as SessionExecutionStatus, yn as PermissionLevel, yr as SandboxFleetDriverCapability, yt as FileTreeFile, z as CreateSessionOptions, zi as SubscriptionInfo, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceRestoreResult, zt as GPU_LEASE_PROVIDER_NAMES } from "./types-DKtPjwgd.js";
5
- import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, a as Team, b as backendRegistryEntrySchema, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, 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, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-Bd-hvjk_.js";
4
+ import { $ as DriverType, $i as TeeAttestationResponse, $n as RolloutChildResult, $r as SandboxShape, $t as GpuLeaseManager, A as CommitTaskSessionOptions, Ai as SessionMessage, An as ProcessManager, Ar as SandboxFleetManifestMachine, At as FleetDispatchStreamOptions, B as CreateSandboxOptions, Bi as SnapshotResult, Bn as ProvisionStep, Br as SandboxFleetWorkspaceReconcileResult, Bt as ForkLookupOptions, C as BranchOptions, Ca as parseBackendType, Ci as SessionExecutionInfo, Cn as PreviewLinkInfo, Cr as SandboxFleetInfo, Ct as FileTreeResult, Di as SessionInfo, Dn as ProcessInfo, Dr as SandboxFleetMachineRecord, Dt as FleetDispatchCancelResult, Ei as SessionForkOptions, En as Process, Er as SandboxFleetMachineMeteredUsage, Et as FileWriteResult, F as CreateIntelligenceReportOptions, Fi as SnapshotDeleteAcknowledgement, Fn as PromptOptions, Fr as SandboxFleetTraceEvent, Ft as FleetMachineId, G as DirectoryPermission, Gi as SubscriptionInfo, Gn as ReapExpiredSandboxFleetsOptions, Gr as SandboxIntelligenceEnvelope, Gt as GitConfig, H as CreateTaskSessionOptions, Hi as StartupDiagnostics, Hn as PublicTemplateVersionInfo, Hr as SandboxFleetWorkspaceSnapshotResult, Ht as GitAuth, I as CreateRequestOptions, Ii as SnapshotDeleteOutcome, In as PromptResult, Ir as SandboxFleetTraceExport, It as FleetPromptDispatchOptions, J as DownloadOptions, Ji as TaskSessionFileChange, Jn as ReconcileSandboxFleetsResult, Jr as SandboxRemovalState, Jt as GpuLease, K as DispatchPromptOptions, Ki as TaskSessionChanges, Kn as ReapExpiredSandboxFleetsResult, Kr as SandboxPortBinding, Kt as GitDiff, L as CreateSandboxFleetOptions, Li as SnapshotIdempotency, Ln as ProvisionEvent, Lr as SandboxFleetTraceOptions, M as ConversationTurnOptions, Mi as SessionMessageInputPart, Mn as ProcessSpawnOptions, Mr as SandboxFleetPolicy, Mt as FleetDriveTurnRequest, N as ConversationTurnResult, Ni as SessionResultOptions, Nn as ProcessStatus, Nr as SandboxFleetToken, Nt as FleetExecDispatchOptions, Oi as SessionInterruptOptions, On as ProcessListOptions, Or as SandboxFleetMachineSpec, Ot as FleetDispatchResultBuffer, P as CreateGpuLeaseOptions, Pi as SessionStatus, Pn as PromptInputPart, Pr as SandboxFleetTraceBundle, Q as DriverInfo, Qi as TeeAttestationReport, Qn as Rollout, Qr as SandboxRuntimeHealth, Qt as GpuLeaseExecResult, Ri as SnapshotInfo, Rn as ProvisionResult, Rr as SandboxFleetUsage, Rt as ForkCounts, S as BatchTaskResult, Sa as BackendType, Si as SessionEventStreamOptions, Sn as PermissionsManager, Sr as SandboxFleetDriverTimings, St as FileTreeOptions, T as ChunkedUploadResult, Ti as SessionFailureReason, Tn as PreviewLinkWaitOptions, Tr as SandboxFleetMachine, Tt as FileUsageResult, U as DeleteOptions, Ui as StartupOperation, Un as PublishPublicTemplateOptions, Ur as SandboxIdentity, Ut as GitBranch, V as CreateSessionOptions, Vn as PublicTemplateInfo, Vr as SandboxFleetWorkspaceRestoreResult, Vt as GPU_LEASE_PROVIDER_NAMES, W as DevServerInfo, Wi as StorageConfig, Wn as PublishPublicTemplateVersionOptions, Wr as SandboxInfo, Wt as GitCommit, X as DriveTurnOptions, Xi as TaskSessionProfile, Xr as SandboxResources, Xt as GpuLeaseCommandResult, Y as DownloadProgress, Yi as TaskSessionInfo, Yn as RenameOptions, Yr as SandboxResourceUsage, Yt as GpuLeaseBilling, Z as DriverConfig, Zi as TeeAttestationOptions, Zr as SandboxRuntimeCapabilities, Zt as GpuLeaseExecOptions, _ as BatchBackend, _a as BatchEventDataMap, _i as SecretsManager, _n as MkdirOptions, _r as SandboxFleetArtifactSpec, _t as FileReadError, aa as UpdateUserOptions, ai as SandboxTerminalInfo, an as IntelligenceReport, ar as SSHCommandDescriptor, at as EffectiveBackendSource, b as BatchRunRequest, ba as PublicBatchRunRequest, bi as SentSessionMessage, bn as NonHostAgentDriverConfig, br as SandboxFleetDispatchResponse, bt as FileSystem, c as AttachGpuLeaseOptions, ca as UsageInfo, ci as SandboxTerminals, cn as IntelligenceReportSubjectType, cr as SandboxConnection, ct as EgressPolicy, d as BackendConfig, da as WorkspaceOperationLookup, di as SandboxTraceExport, dn as ListMessagesOptions, dr as SandboxDeleteAcknowledgement, dt as ExactProcessSpawnOptions, ea as TeePublicKey, ei as SandboxShapePreset, en as GpuLeaseProviderName, er as RolloutOptions, et as DurablePlan, f as BackendInfo, fa as WriteFileOptions, fi as SandboxTraceOptions, fn as ListOptions, fr as SandboxDeleteOptions, ft as ExecOptions, g as BackendStatus, ga as BatchEvent, gi as SecretInfo, gn as McpServerConfig, gr as SandboxFleetArtifact, gt as FileReadBatchResult, h as BackendRuntimeConfigUpdate, ha as BatchBackendStats, hi as SearchOptions, hn as MAX_EGRESS_DENIALS_LIMIT, hr as SandboxEvent, ht as FileReadBatchOptions, ia as TurnDriveResult, ii as SandboxTerminalCreateOptions, in as InstalledTool, ir as RolloutTurnPart, it as EffectiveBackendProfile, j as CompletedTurnResult, ji as SessionMessageAdmission, jn as ProcessSignal, jr as SandboxFleetOperationsSummary, jt as FleetDriveTurnOutcome, ki as SessionListOptions, kn as ProcessLogEntry, kr as SandboxFleetManifest, kt as FleetDispatchResultBufferOptions, l as AttachSandboxFleetMachineOptions, la as WaitForOptions, li as SandboxTraceBundle, ln as IntelligenceReportWindow, lr as SandboxCreateOutcome, lt as EnsureDevServerOptions, m as BackendMcpServerStatus, ma as WriteManyOptions, mi as SearchMatch, mn as ListSandboxOptions, mr as SandboxEnvironment, mt as FileInfo, n as AccessPolicyRule, na as TokenRefreshHandler, ni as SandboxStatus, nn as HostAgentDriverConfig, nr as RolloutStartResult, oa as UploadOptions, oi as SandboxTerminalManager, on as IntelligenceReportBudget, or as SSHCredentials, ot as EgressDenial, p as BackendManager, pa as WriteManyFile, pi as SandboxUser, pn as ListSandboxFleetOptions, pr as SandboxDeleteOutcome, pt as ExecResult, q as DispatchedSession, qi as TaskSessionCommitResult, qn as ReconcileSandboxFleetsOptions, qr as SandboxPortPreviewLink, qt as GitStatus, r as AddUserOptions, ra as TokenUsage, ri as SandboxTerminalAttachOptions, rn as HostAgentRuntimeBackend, rr as RolloutStatus, rt as EffectiveBackend, sa as UploadProgress, si as SandboxTerminalRequestOptions, sn as IntelligenceReportCompareTo, sr as SandboxConfig, st as EgressManager, t as AcceleratorKind, ta as TeePublicKeyResponse, ti as SandboxShapesInfo, tn as GpuLeaseStatus, tr as RolloutScorer, tt as DurablePlanDecisionResult, u as BackendCapabilities, ua as WaitForRolloutOptions, ui as SandboxTraceEvent, ur as SandboxCreateReceipt, ut as EventStreamOptions, v as BatchResult, va as BatchSidecarGroup, vi as SendSessionMessageOptions, vn as NetworkConfig, vr as SandboxFleetCostEstimate, vt as FileReadResult, w as ChunkedUploadOptions, wi as SessionExecutionStatus, wn as PreviewLinkManager, wr as SandboxFleetIntelligenceEnvelope, wt as FileUsageOptions, x as BatchTask, xa as ALL_BACKEND_TYPES, xi as SessionBackendCredentials, xn as PermissionLevel, xr as SandboxFleetDriverCapability, xt as FileTreeFile, y as BatchRunOptions, ya as BatchTaskUsage, yi as SendSessionMessageRequest, yn as NetworkManager, yr as SandboxFleetDispatchFailureClass, yt as FileRenameResult, z as CreateSandboxFleetWithCoordinatorOptions, zi as SnapshotOptions, zn as ProvisionStatus, zr as SandboxFleetWorkspace, zt as ForkIdempotency } from "./types-C3Kw-Tml.js";
5
+ import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, a as Team, b as backendRegistryEntrySchema, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, 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, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-DdmHMuCL.js";
6
6
  import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-CS-t6tPU.js";
7
7
  import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "./index-BzAxTiqF.js";
8
8
  import { _ as ValidationError, a as FileWriteConflictError, c as NotFoundError, d as SandboxError, f as SandboxErrorJson, g as TimeoutError, h as StateError, i as EgressProxyRecoveryError, l as PartialFailureError, m as ServerError, n as CapabilityError, o as KeyBudgetExhaustedError, p as SandboxFailureDetail, r as EdgeNotReadyError, s as NetworkError, t as AuthError, u as QuotaError } from "./errors-BoD3Ifbd.js";
9
- import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-BSZbRoHp.js";
10
- import { o as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-BpO7MMIC.js";
9
+ import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-B_DRpTxx.js";
10
+ import { o as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-B6eCXD1R.js";
11
11
  import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
12
12
  import { AgentProfile, AgentProfile as AgentProfile$1, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileConfigValue, AgentProfileConnection, AgentProfileFileMount, AgentProfileFileMount as AgentProfileFileMount$1, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePermissionValue, AgentProfilePrompt, AgentProfileResourceRef, AgentProfileResources, AgentProfileSecurityPolicy, AgentProfileValidationIssue, AgentProfileValidationResult, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, AgentSubagentProfile, Capability, SANDBOX_SIZE_PRESET_NAMES, SandboxSizePreset } from "@tangle-network/agent-interface";
13
13
  import { z } from "zod";
@@ -480,11 +480,9 @@ declare function generateDockerfile(spec: ImageSpec): string;
480
480
  //#region src/lib/agent-response-text.d.ts
481
481
  declare function getSandboxEventText(event: SandboxEvent): string | undefined;
482
482
  /**
483
- * Fold one event into the running response text. `token` events APPEND their
484
- * incremental delta/value; every other text-bearing event (`result`,
485
- * `message.part.updated`) carries the cumulative text, so it REPLACES — unless
486
- * it is a strict continuation of what we already have, in which case it is
487
- * appended once. An event with no meaningful text leaves `current` untouched.
483
+ * Fold one event into the running response text. Explicit deltas append,
484
+ * including whitespace and repeated chunks. Cumulative message parts and
485
+ * final results replace the text. Blank snapshots leave `current` untouched.
488
486
  *
489
487
  * Whitespace handling differs by kind: an incremental `token` keeps its RAW text
490
488
  * (a lone space delta is a word separator — dropping it concatenates words), but
@@ -4153,39 +4151,50 @@ declare function materializeProfileFileMounts(box: ProfileFileMountBox, files: r
4153
4151
  /** The concrete cpu/memory/disk for each named tier. */
4154
4152
  type SizePresetResources = Required<Pick<SandboxResources, "cpuCores" | "memoryMB" | "diskGB">>;
4155
4153
  /**
4156
- * The concrete compute behind each {@link SandboxSizePreset} — the SINGLE source
4157
- * of truth for what a tier means. `@tangle-network/agent-interface` owns the
4158
- * tier NAMES (so the lowest layer can reference a size); this owns the numbers.
4154
+ * The compute behind each {@link SandboxSizePreset} as the sandbox API
4155
+ * defines it. The API owns these numbers and serves them from
4156
+ * `GET /v1/shapes` ({@link Sandbox.shapes}); this table is the offline
4157
+ * mirror for a caller that must resolve a tier before it holds a client (a
4158
+ * workflow definition, a tool spec) and is pinned to the API's table by a
4159
+ * drift test. `@tangle-network/agent-interface` owns the tier NAMES so the
4160
+ * lowest layer can reference a size.
4159
4161
  *
4160
- * Values stay within the sandbox-api default plan caps (8 vCPU / 16 GB / 100 GB)
4161
- * and keep memory at or above the driver's firecracker-snapshot floor (1536 MB),
4162
- * so a requested tier is never silently bumped. `diskGB` is in gigabytes;
4163
- * `memoryMB` in megabytes. The server still clamps every request to the owner's
4164
- * actual plan limits — these are the unclamped tier definitions, not guarantees.
4162
+ * `large` equals the deployment's default per-box ceiling (8 vCPU / 16 GB /
4163
+ * 100 GB), so every tier is creatable on a deployment that leaves
4164
+ * `MAX_SANDBOX_*` unset. The server still clamps an advisory request and
4165
+ * refuses an explicit one above the account's ceiling — read `shapes()` for
4166
+ * that ceiling.
4165
4167
  */
4166
4168
  declare const SANDBOX_SIZE_PRESETS: Record<SandboxSizePreset, SizePresetResources>;
4167
4169
  /**
4168
- * Default tier when a caller provisions without picking a size. The smallest
4169
- * tier that comfortably runs an agent harness (opencode + a repo clone + a
4170
- * build) — deliberately NOT a maxed box, so a thin task is cheap by default and
4171
- * a heavy one opts up explicitly.
4170
+ * The platform's default tier, served as `default` by `GET /v1/shapes`. An
4171
+ * unsized create is granted this tier's CPU and memory and reports the grant
4172
+ * in `resources`; its DISK is currently held below this tier (see that
4173
+ * endpoint's description), so expand the tier locally only when you also send
4174
+ * it as a request.
4172
4175
  */
4173
4176
  declare const DEFAULT_SANDBOX_SIZE: SandboxSizePreset;
4174
- /** The resources for a named tier, as a fresh object (never the shared preset).
4175
- * Fails loud on an unknown key rather than spreading `undefined` into an empty
4176
- * resources object — a silent zero would send no compute request downstream. */
4177
- declare function sandboxResourcesForSize(size: SandboxSizePreset): SandboxResources;
4177
+ /**
4178
+ * The resources for a named tier, as a fresh object (never the shared preset).
4179
+ * Pass the `presets` from {@link Sandbox.shapes} to expand the tier to what
4180
+ * the serving deployment defines; without them the pinned mirror applies.
4181
+ * Fails loud on an unknown key rather than spreading `undefined` into an
4182
+ * empty resources object — a silent zero would send no compute request
4183
+ * downstream.
4184
+ */
4185
+ declare function sandboxResourcesForSize(size: SandboxSizePreset, presets?: ReadonlyArray<SandboxShapePreset>): SandboxResources;
4178
4186
  /**
4179
4187
  * Resolve a caller's size intent to concrete {@link SandboxResources}. Raw
4180
4188
  * `resources` win (an explicit cpu/memory request is authoritative); else a
4181
- * named `size` expands to its preset; else `undefined` (the caller applies its
4182
- * own default). Raw and preset are intentionally exclusive at the schema layer —
4183
- * if both arrive here, the explicit numbers take precedence rather than being
4184
- * silently merged.
4189
+ * named `size` expands to its preset; else `undefined` (the API applies
4190
+ * {@link DEFAULT_SANDBOX_SIZE}). Raw and preset are intentionally exclusive at
4191
+ * the schema layer — if both arrive here, the explicit numbers take precedence
4192
+ * rather than being silently merged.
4185
4193
  */
4186
4194
  declare function resolveSandboxResources(opts: {
4187
4195
  size?: SandboxSizePreset;
4188
4196
  resources?: SandboxResources;
4197
+ presets?: ReadonlyArray<SandboxShapePreset>;
4189
4198
  }): SandboxResources | undefined;
4190
4199
  //#endregion
4191
4200
  //#region src/router-search.d.ts
@@ -4438,4 +4447,4 @@ interface RouterEvalMatrixCaseResult {
4438
4447
  }
4439
4448
  declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
4440
4449
  //#endregion
4441
- export { ALL_BACKEND_TYPES, type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentInteractiveTerminalSession, 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 AgentRunCancellationAcknowledgement, type AgentRunCancellationRequest, type AgentRunOutcome, type AgentRunOutcomeTracker, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendMcpServerStatus, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, type BackendRuntimeConfigUpdate, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchResult, type BatchResultAccumulator, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, BrowserInteractiveSessionControlController, type BrowserInteractiveSessionControlControllerOptions, BrowserInteractiveSessionController, type BrowserInteractiveSessionControllerOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, type Capability, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, 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 DurablePlan, type DurablePlanDecisionResult, EdgeNotReadyError, type EffectiveBackend, type EffectiveBackendProfile, type EffectiveBackendSource, type EgressDenial, 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, FileWriteConflictError, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetDriveTurnOutcome, type FleetDriveTurnRequest, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, type ForkAcknowledgement, type ForkCounts, type ForkIdempotency, type ForkLookupOptions, 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 HostAgentDriverConfig, type HostAgentRuntimeBackend, INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, 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 InteractiveAttachRequest, type InteractiveControlClaimAcknowledgement, type InteractiveControlClaimOptions, type InteractiveControlClaimRequest, type InteractivePromptCommand, type InteractiveRequestOptions, type InteractiveSessionControlClaim, InteractiveSessionControlController, type InteractiveSessionControlControllerOptions, type InteractiveSessionControlTransport, InteractiveSessionController, type InteractiveSessionControllerOptions, type InteractiveSessionControllerTransport, InteractiveSessionHandle, type InteractiveSessionHandleOptions, type InteractiveSessionHost, type InteractiveSessionIdentity, type InteractiveSessionIncarnationId, type InteractiveSessionInfo, type InteractiveSessionRef, type InteractiveSessionStartOptions, type InteractiveSessionStartResult, type InteractiveSessionStatus, type InteractiveStopCommand, type InteractiveTerminalCapture, InteractiveTerminalFrameLog, type InteractiveTerminalMetadata, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, KeyBudgetExhaustedError, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, MAX_EGRESS_DENIALS_LIMIT, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintInteractiveSessionTokenOptions, 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 PreviewLinkWaitOptions, type Process, type ProcessInfo, type ProcessListOptions, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptInputPart, 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 RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, Sandbox, type SandboxConfig, type SandboxConnection, type SandboxCreateOutcome, type SandboxCreateReceipt, type SandboxDeleteAcknowledgement, type SandboxDeleteOptions, type SandboxDeleteOutcome, 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 SandboxIdentity, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxInteractionCommandResult, type SandboxInteractionConflict, type SandboxInteractionResolution, type SandboxInteractionResult, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxRemovalState, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeCapabilities, type SandboxRuntimeHealth, 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 SessionExecutionInfo, type SessionExecutionStatus, type SessionFailureReason, type SessionForkOptions, type SessionInfo, type SessionInterruptOptions, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionResultOptions, type SessionStatus, type SnapshotDeleteAcknowledgement, type SnapshotDeleteOutcome, type SnapshotIdempotency, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, 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 TerminalInteractiveSessionIdentity, type TerminalOutputMessage, type TerminalReadyInfo, TerminalStream, type TerminalStreamAuthFormat, TerminalStreamError, type TerminalStreamHandlers, type TerminalStreamOptions, type TerminalStreamToken, TimeoutError, type TokenRefreshHandler, type TokenUsage, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, type WorkspaceOperationLookup, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, browserInteractiveControlHolderId, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createAgentRunOutcomeTracker, createBatchResultAccumulator, createConfidentialSandbox, createInteractiveControlHolderId, createInteractiveTerminalCapture, createInteractiveTerminalSession, createManageSandboxesTool, deriveAgentResultOutcome, deriveAgentRunOutcome, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, agentInteractiveSessionPromptRequestDigest as interactivePromptRequestDigest, interactiveSessionIdentityDigest, isBackendRegistryInteractionKind, isToolBearingEvent, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseBackendType, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
4450
+ export { ALL_BACKEND_TYPES, type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentInteractiveTerminalSession, 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 AgentRunCancellationAcknowledgement, type AgentRunCancellationRequest, type AgentRunOutcome, type AgentRunOutcomeTracker, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendMcpServerStatus, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, type BackendRuntimeConfigUpdate, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchResult, type BatchResultAccumulator, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, BrowserInteractiveSessionControlController, type BrowserInteractiveSessionControlControllerOptions, BrowserInteractiveSessionController, type BrowserInteractiveSessionControllerOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, type Capability, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, 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 ConversationTurnOptions, type ConversationTurnResult, 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 DurablePlan, type DurablePlanDecisionResult, EdgeNotReadyError, type EffectiveBackend, type EffectiveBackendProfile, type EffectiveBackendSource, type EgressDenial, 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, FileWriteConflictError, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetDriveTurnOutcome, type FleetDriveTurnRequest, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, type ForkAcknowledgement, type ForkCounts, type ForkIdempotency, type ForkLookupOptions, 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 HostAgentDriverConfig, type HostAgentRuntimeBackend, INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, 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 InteractiveAttachRequest, type InteractiveControlClaimAcknowledgement, type InteractiveControlClaimOptions, type InteractiveControlClaimRequest, type InteractivePromptCommand, type InteractiveRequestOptions, type InteractiveSessionControlClaim, InteractiveSessionControlController, type InteractiveSessionControlControllerOptions, type InteractiveSessionControlTransport, InteractiveSessionController, type InteractiveSessionControllerOptions, type InteractiveSessionControllerTransport, InteractiveSessionHandle, type InteractiveSessionHandleOptions, type InteractiveSessionHost, type InteractiveSessionIdentity, type InteractiveSessionIncarnationId, type InteractiveSessionInfo, type InteractiveSessionRef, type InteractiveSessionStartOptions, type InteractiveSessionStartResult, type InteractiveSessionStatus, type InteractiveStopCommand, type InteractiveTerminalCapture, InteractiveTerminalFrameLog, type InteractiveTerminalMetadata, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, KeyBudgetExhaustedError, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, MAX_EGRESS_DENIALS_LIMIT, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintInteractiveSessionTokenOptions, 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 PreviewLinkWaitOptions, type Process, type ProcessInfo, type ProcessListOptions, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptInputPart, 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 RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, Sandbox, type SandboxConfig, type SandboxConnection, type SandboxCreateOutcome, type SandboxCreateReceipt, type SandboxDeleteAcknowledgement, type SandboxDeleteOptions, type SandboxDeleteOutcome, 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 SandboxIdentity, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxInteractionCommandResult, type SandboxInteractionConflict, type SandboxInteractionResolution, type SandboxInteractionResult, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxRemovalState, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeCapabilities, type SandboxRuntimeHealth, SandboxSession, type SandboxShape, type SandboxShapePreset, type SandboxShapesInfo, 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 SessionExecutionInfo, type SessionExecutionStatus, type SessionFailureReason, type SessionForkOptions, type SessionInfo, type SessionInterruptOptions, type SessionListOptions, type SessionMessage, type SessionMessageAdmission, type SessionMessageInputPart, type SessionResultOptions, type SessionStatus, type SnapshotDeleteAcknowledgement, type SnapshotDeleteOutcome, type SnapshotIdempotency, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, 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 TerminalInteractiveSessionIdentity, type TerminalOutputMessage, type TerminalReadyInfo, TerminalStream, type TerminalStreamAuthFormat, TerminalStreamError, type TerminalStreamHandlers, type TerminalStreamOptions, type TerminalStreamToken, TimeoutError, type TokenRefreshHandler, type TokenUsage, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, type WorkspaceOperationLookup, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, browserInteractiveControlHolderId, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createAgentRunOutcomeTracker, createBatchResultAccumulator, createConfidentialSandbox, createInteractiveControlHolderId, createInteractiveTerminalCapture, createInteractiveTerminalSession, createManageSandboxesTool, deriveAgentResultOutcome, deriveAgentRunOutcome, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, agentInteractiveSessionPromptRequestDigest as interactivePromptRequestDigest, interactiveSessionIdentityDigest, isBackendRegistryInteractionKind, isToolBearingEvent, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseBackendType, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { _ as deriveAgentRunOutcome, b as parseBackendType, g as deriveAgentResultOutcome, h as createAgentRunOutcomeTracker, m as normalizeRuntimeBackendConfig, u as parseSSEStream, v as ALL_BACKEND_TYPES, y as backendTypeSchema } from "./runtime-api-BpOFn4cB.js";
1
+ import { C as parseBackendType, S as backendTypeSchema, _ as normalizeRuntimeBackendConfig, b as deriveAgentRunOutcome, p as parseSSEStream, v as createAgentRunOutcomeTracker, x as ALL_BACKEND_TYPES, y as deriveAgentResultOutcome } from "./runtime-api-D7CdKcbu.js";
2
2
  import { a as FileWriteConflictError, c as NotFoundError, d as SandboxError, f as ServerError, h as ValidationError, i as EgressProxyRecoveryError, l as PartialFailureError, m as TimeoutError, n as CapabilityError, o as KeyBudgetExhaustedError, p as StateError, r as EdgeNotReadyError, s as NetworkError, t as AuthError, u as QuotaError } from "./errors-CdDyExth.js";
3
- import { _ as parseBackendRegistryResponse, a as splitInlineProfileSkills, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as splitInlineProfileFileMounts, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as validateDeferredProfileFileMounts, p as backendRegistryEntrySchema, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-DuC9Z9zp.js";
3
+ import { _ as parseBackendRegistryResponse, a as splitInlineProfileSkills, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as splitInlineProfileFileMounts, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as validateDeferredProfileFileMounts, p as backendRegistryEntrySchema, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-BSNkAx2K.js";
4
4
  import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, c as createInteractiveControlHolderId, l as interactiveSessionIdentityDigest, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-Dv0gbFMu.js";
5
- import { A as toOtelJson, C as collectAgentResponseText, D as buildTraceExportPayload, O as exportTraceBundle, S as collectAgentFinalMessageText, T as isToolBearingEvent, _ as TerminalStream, a as WorkspaceImages, c as SandboxTaskSession, d as agentInteractiveSessionPromptRequestDigest, f as InteractiveTerminalFrameLog, g as InteractiveSessionController, h as BrowserInteractiveSessionController, k as otelTraceIdForTangleTrace, l as SandboxSession, m as createInteractiveTerminalSession, o as GPU_LEASE_PROVIDER_NAMES, p as createInteractiveTerminalCapture, s as MAX_EGRESS_DENIALS_LIMIT, t as SandboxInstance, u as InteractiveSessionHandle, v as TerminalStreamError, w as getSandboxEventText, x as applySandboxEventText, y as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./sandbox-CWoNC94K.js";
5
+ import { A as otelTraceIdForTangleTrace, C as collectAgentResponseText, O as buildTraceExportPayload, S as collectAgentFinalMessageText, T as isToolBearingEvent, _ as TerminalStream, a as WorkspaceImages, c as SandboxTaskSession, d as agentInteractiveSessionPromptRequestDigest, f as InteractiveTerminalFrameLog, g as InteractiveSessionController, h as BrowserInteractiveSessionController, j as toOtelJson, k as exportTraceBundle, l as SandboxSession, m as createInteractiveTerminalSession, o as GPU_LEASE_PROVIDER_NAMES, p as createInteractiveTerminalCapture, s as MAX_EGRESS_DENIALS_LIMIT, t as SandboxInstance, u as InteractiveSessionHandle, v as TerminalStreamError, w as getSandboxEventText, x as applySandboxEventText, y as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./sandbox-BRZLdcud.js";
6
6
  import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DilBgjXG.js";
7
- import { t as TangleSandboxClient } from "./tangle-O1Hi84be.js";
7
+ import { t as TangleSandboxClient } from "./tangle-D7KgC1Xb.js";
8
8
  import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
9
9
  import { z } from "zod";
10
10
  //#region src/confidential.ts
@@ -1010,64 +1010,79 @@ function buildControlPlaneMcpConfig(options) {
1010
1010
  //#endregion
1011
1011
  //#region src/resources.ts
1012
1012
  /**
1013
- * The concrete compute behind each {@link SandboxSizePreset} — the SINGLE source
1014
- * of truth for what a tier means. `@tangle-network/agent-interface` owns the
1015
- * tier NAMES (so the lowest layer can reference a size); this owns the numbers.
1013
+ * The compute behind each {@link SandboxSizePreset} as the sandbox API
1014
+ * defines it. The API owns these numbers and serves them from
1015
+ * `GET /v1/shapes` ({@link Sandbox.shapes}); this table is the offline
1016
+ * mirror for a caller that must resolve a tier before it holds a client (a
1017
+ * workflow definition, a tool spec) and is pinned to the API's table by a
1018
+ * drift test. `@tangle-network/agent-interface` owns the tier NAMES so the
1019
+ * lowest layer can reference a size.
1016
1020
  *
1017
- * Values stay within the sandbox-api default plan caps (8 vCPU / 16 GB / 100 GB)
1018
- * and keep memory at or above the driver's firecracker-snapshot floor (1536 MB),
1019
- * so a requested tier is never silently bumped. `diskGB` is in gigabytes;
1020
- * `memoryMB` in megabytes. The server still clamps every request to the owner's
1021
- * actual plan limits — these are the unclamped tier definitions, not guarantees.
1021
+ * `large` equals the deployment's default per-box ceiling (8 vCPU / 16 GB /
1022
+ * 100 GB), so every tier is creatable on a deployment that leaves
1023
+ * `MAX_SANDBOX_*` unset. The server still clamps an advisory request and
1024
+ * refuses an explicit one above the account's ceiling — read `shapes()` for
1025
+ * that ceiling.
1022
1026
  */
1023
1027
  const SANDBOX_SIZE_PRESETS = {
1024
1028
  nano: {
1025
1029
  cpuCores: 1,
1026
1030
  memoryMB: 2048,
1027
- diskGB: 5
1031
+ diskGB: 10
1028
1032
  },
1029
1033
  small: {
1030
1034
  cpuCores: 2,
1031
1035
  memoryMB: 4096,
1032
- diskGB: 10
1036
+ diskGB: 20
1033
1037
  },
1034
1038
  medium: {
1035
1039
  cpuCores: 4,
1036
1040
  memoryMB: 8192,
1037
- diskGB: 20
1041
+ diskGB: 50
1038
1042
  },
1039
1043
  large: {
1040
1044
  cpuCores: 8,
1041
1045
  memoryMB: 16384,
1042
- diskGB: 50
1046
+ diskGB: 100
1043
1047
  }
1044
1048
  };
1045
1049
  /**
1046
- * Default tier when a caller provisions without picking a size. The smallest
1047
- * tier that comfortably runs an agent harness (opencode + a repo clone + a
1048
- * build) — deliberately NOT a maxed box, so a thin task is cheap by default and
1049
- * a heavy one opts up explicitly.
1050
+ * The platform's default tier, served as `default` by `GET /v1/shapes`. An
1051
+ * unsized create is granted this tier's CPU and memory and reports the grant
1052
+ * in `resources`; its DISK is currently held below this tier (see that
1053
+ * endpoint's description), so expand the tier locally only when you also send
1054
+ * it as a request.
1050
1055
  */
1051
1056
  const DEFAULT_SANDBOX_SIZE = "small";
1052
- /** The resources for a named tier, as a fresh object (never the shared preset).
1053
- * Fails loud on an unknown key rather than spreading `undefined` into an empty
1054
- * resources object — a silent zero would send no compute request downstream. */
1055
- function sandboxResourcesForSize(size) {
1056
- const preset = SANDBOX_SIZE_PRESETS[size];
1057
+ /**
1058
+ * The resources for a named tier, as a fresh object (never the shared preset).
1059
+ * Pass the `presets` from {@link Sandbox.shapes} to expand the tier to what
1060
+ * the serving deployment defines; without them the pinned mirror applies.
1061
+ * Fails loud on an unknown key rather than spreading `undefined` into an
1062
+ * empty resources object — a silent zero would send no compute request
1063
+ * downstream.
1064
+ */
1065
+ function sandboxResourcesForSize(size, presets) {
1066
+ const served = presets?.find((preset) => preset.name === size);
1067
+ const preset = served ? {
1068
+ cpuCores: served.cpuCores,
1069
+ memoryMB: served.memoryMB,
1070
+ diskGB: served.diskGB
1071
+ } : SANDBOX_SIZE_PRESETS[size];
1057
1072
  if (!preset) throw new Error(`sandboxResourcesForSize: unknown size preset '${size}' (expected one of ${SANDBOX_SIZE_PRESET_NAMES.join(", ")})`);
1058
1073
  return { ...preset };
1059
1074
  }
1060
1075
  /**
1061
1076
  * Resolve a caller's size intent to concrete {@link SandboxResources}. Raw
1062
1077
  * `resources` win (an explicit cpu/memory request is authoritative); else a
1063
- * named `size` expands to its preset; else `undefined` (the caller applies its
1064
- * own default). Raw and preset are intentionally exclusive at the schema layer —
1065
- * if both arrive here, the explicit numbers take precedence rather than being
1066
- * silently merged.
1078
+ * named `size` expands to its preset; else `undefined` (the API applies
1079
+ * {@link DEFAULT_SANDBOX_SIZE}). Raw and preset are intentionally exclusive at
1080
+ * the schema layer — if both arrive here, the explicit numbers take precedence
1081
+ * rather than being silently merged.
1067
1082
  */
1068
1083
  function resolveSandboxResources(opts) {
1069
1084
  if (opts.resources) return opts.resources;
1070
- if (opts.size) return sandboxResourcesForSize(opts.size);
1085
+ if (opts.size) return sandboxResourcesForSize(opts.size, opts.presets);
1071
1086
  }
1072
1087
  //#endregion
1073
1088
  //#region src/router-search.ts
@@ -1,6 +1,6 @@
1
1
  import { d as SandboxError, f as ServerError, g as parseErrorResponse, h as ValidationError, m as TimeoutError, n as CapabilityError, s as NetworkError, u as QuotaError } from "./errors-CdDyExth.js";
2
2
  import { n as combineAbortSignals } from "./abort-signal-si1WMfJb.js";
3
- import { AgentExactRunControlRefSchema, AgentExecutionOutcomeSchema, AgentRuntimeAttachmentsSchema, DurablePlanSchema, InteractionRequestSchema, agentProfileSchema, harnessTypeSchema } from "@tangle-network/agent-interface";
3
+ import { AgentExactRunControlRefSchema, AgentExecutionOutcomeSchema, AgentRuntimeAttachmentsSchema, DurablePlanSchema, InteractionRequestSchema, agentProfileSchema, canonicalCandidateDigest, harnessTypeSchema } from "@tangle-network/agent-interface";
4
4
  import { z } from "zod";
5
5
  //#region ../../../packages/runtime-contracts/dist/backend-types.js
6
6
  /**
@@ -796,6 +796,57 @@ function isFileTooLargeErrorBody(value) {
796
796
  return isSizeLimitErrorBodyFor(value, FILE_TOO_LARGE_CODE);
797
797
  }
798
798
  //#endregion
799
+ //#region src/dispatch-run-control.ts
800
+ const DISPATCH_RUN_PROVIDER = "tangle-sandbox";
801
+ function generateRuntimeId(prefix) {
802
+ const crypto = globalThis.crypto;
803
+ if (crypto?.randomUUID) return `${prefix}-${crypto.randomUUID()}`;
804
+ if (crypto?.getRandomValues) {
805
+ const bytes = crypto.getRandomValues(new Uint8Array(16));
806
+ return `${prefix}-${Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
807
+ }
808
+ throw new ValidationError("Run identity generation requires global crypto");
809
+ }
810
+ function resolveDispatchRunIdentity(sandboxId, message, options) {
811
+ const sessionId = options?.sessionId ?? options?.runControlRef?.sessionId ?? generateRuntimeId("session");
812
+ const executionId = options?.executionId ?? options?.runControlRef?.executionId ?? generateRuntimeId("execution");
813
+ return {
814
+ sessionId,
815
+ executionId,
816
+ runControlRef: options?.runControlRef ?? {
817
+ runId: generateRuntimeId("run"),
818
+ provider: DISPATCH_RUN_PROVIDER,
819
+ environmentId: sandboxId,
820
+ sessionId,
821
+ executionId,
822
+ requestDigest: canonicalCandidateDigest({
823
+ message,
824
+ sessionId,
825
+ turnId: options?.turnId ?? null,
826
+ backend: options?.backend ?? null,
827
+ model: options?.model ?? null,
828
+ context: options?.context ?? null
829
+ })
830
+ }
831
+ };
832
+ }
833
+ function sameExactRunControlRef(left, right) {
834
+ return left.runId === right.runId && left.provider === right.provider && left.environmentId === right.environmentId && left.sessionId === right.sessionId && left.executionId === right.executionId && left.requestDigest === right.requestDigest;
835
+ }
836
+ function validateAcceptedDispatchRunRef(raw, expected, sandboxId, sessionId, executionId, endpoint = "/agents/run/stream") {
837
+ const parsed = AgentExactRunControlRefSchema.safeParse(raw);
838
+ if (!parsed.success) throw new ServerError("Sandbox returned an invalid exact run reference on admission", 502, {
839
+ origin: "runtime",
840
+ endpoint
841
+ });
842
+ const accepted = parsed.data;
843
+ if (accepted.environmentId !== sandboxId || accepted.sessionId !== sessionId || accepted.executionId !== executionId || !sameExactRunControlRef(accepted, expected)) throw new ServerError("Sandbox returned an exact run reference for another execution", 502, {
844
+ origin: "runtime",
845
+ endpoint
846
+ });
847
+ return accepted;
848
+ }
849
+ //#endregion
799
850
  //#region src/lib/chunked-upload.ts
800
851
  /**
801
852
  * Chunked upload — the sanctioned SDK path for delivering payloads larger
@@ -1144,16 +1195,48 @@ var SandboxRuntimeApi = class {
1144
1195
  }
1145
1196
  if (options.executionId !== void 0 && !sawTerminal) throw new NetworkError("event stream ended before a terminal event — the connection dropped mid-turn");
1146
1197
  }
1147
- /**
1148
- * List the durable execution records for one session.
1149
- *
1150
- * The sidecar owns this ledger and returns records newest first. Validate
1151
- * the response here so malformed payloads cannot become false run evidence.
1152
- */
1153
- async runs(sessionId) {
1198
+ /** Read a turn's retained admission without proposing or admitting a message. */
1199
+ async admission(sessionId, turnId, options = {}) {
1200
+ if (!sessionId.trim() || !turnId.trim()) throw new ValidationError("sessionId and turnId are required");
1201
+ await this.transport.ensureRunning();
1202
+ const endpoint = `/agents/sessions/${encodeURIComponent(sessionId)}/admissions/${encodeURIComponent(turnId)}`;
1203
+ const payload = await this.json(endpoint, {
1204
+ method: "GET",
1205
+ signal: options.signal
1206
+ });
1207
+ if (payload?.receipt === null) return null;
1208
+ const receipt = payload?.receipt;
1209
+ if (!receipt || typeof receipt.info?.id !== "string" || !receipt.info.id || receipt.processing !== true) throw new ServerError("Runtime returned an invalid message admission receipt", 502, {
1210
+ origin: "runtime",
1211
+ endpoint
1212
+ });
1213
+ const parsedRef = receipt.runControlRef === void 0 ? void 0 : AgentExactRunControlRefSchema.safeParse(receipt.runControlRef);
1214
+ if (parsedRef && !parsedRef.success) throw new ServerError("Admission returned an invalid exact run reference", 502, {
1215
+ origin: "runtime",
1216
+ endpoint
1217
+ });
1218
+ const runControlRef = parsedRef?.data;
1219
+ if (runControlRef && (runControlRef.sessionId !== sessionId || runControlRef.executionId !== receipt.info.id)) throw new ServerError("Admission control reference does not match its execution", 502, {
1220
+ origin: "runtime",
1221
+ endpoint
1222
+ });
1223
+ const run = (await this.runs(sessionId, options)).find((candidate) => candidate.executionId === receipt.info.id);
1224
+ return {
1225
+ sessionId,
1226
+ turnId,
1227
+ executionId: receipt.info.id,
1228
+ status: run?.status ?? "unavailable",
1229
+ ...runControlRef ? { runControlRef } : {}
1230
+ };
1231
+ }
1232
+ /** List validated execution records from the runtime ledger, newest first. */
1233
+ async runs(sessionId, options = {}) {
1154
1234
  await this.transport.ensureRunning();
1155
1235
  const endpoint = `/agents/sessions/${encodeURIComponent(sessionId)}/runs`;
1156
- const payload = await this.json(endpoint, { method: "GET" });
1236
+ const payload = await this.json(endpoint, {
1237
+ method: "GET",
1238
+ signal: options.signal
1239
+ });
1157
1240
  if (payload.success !== true || !Array.isArray(payload.executions)) throw new ServerError("Session runs response has an invalid shape", 502, {
1158
1241
  origin: "runtime",
1159
1242
  endpoint
@@ -1305,6 +1388,7 @@ var SandboxRuntimeApi = class {
1305
1388
  body: JSON.stringify({
1306
1389
  ...options.sessionId !== void 0 ? { sessionId: options.sessionId } : {},
1307
1390
  ...options.title !== void 0 ? { title: options.title } : {},
1391
+ ...options.retention !== void 0 ? { retention: options.retention } : {},
1308
1392
  ...options.parentId !== void 0 ? { parentID: options.parentId } : {},
1309
1393
  ...backend && Object.keys(backend).length > 0 ? { backend } : {}
1310
1394
  })
@@ -1362,30 +1446,18 @@ var SandboxRuntimeApi = class {
1362
1446
  method: "POST",
1363
1447
  headers,
1364
1448
  signal,
1365
- body: JSON.stringify({
1366
- ...request.messageId !== void 0 ? { messageID: request.messageId } : {},
1367
- parts: request.parts.map((part) => part.type === "text" ? {
1368
- ...part,
1369
- text: encodeTextForWire(part.text)
1370
- } : part),
1371
- ...request.system !== void 0 ? { system: request.system } : {},
1372
- ...request.agent !== void 0 ? { agent: request.agent } : {},
1373
- ...request.model !== void 0 ? { model: {
1374
- providerID: request.model.providerId,
1375
- modelID: request.model.modelId
1376
- } } : {},
1377
- ...request.reasoningEffort !== void 0 ? { reasoningEffort: request.reasoningEffort } : {},
1378
- ...request.turnId !== void 0 ? { turnId: request.turnId } : {},
1379
- ...request.interactions !== void 0 ? { interactions: request.interactions } : {}
1380
- })
1449
+ body: JSON.stringify(sessionMessageRequestBody(request))
1381
1450
  };
1451
+ let receipt;
1382
1452
  try {
1383
- return await this.json(path, init);
1453
+ receipt = await this.json(path, init);
1384
1454
  } catch (error) {
1385
1455
  if (!isRetryableCredentialRefusal(error)) throw error;
1386
1456
  await waitForRetryAfter(error.retryAfterMs ?? 1e3, signal);
1387
- return this.json(path, init);
1457
+ receipt = await this.json(path, init);
1388
1458
  }
1459
+ if (request.runControlRef) validateAcceptedDispatchRunRef(receipt.runControlRef, request.runControlRef, request.runControlRef.environmentId, id, receipt.info.id, path);
1460
+ return receipt;
1389
1461
  }
1390
1462
  async deleteSession(id) {
1391
1463
  await this.transport.ensureRunning();
@@ -1553,5 +1625,26 @@ function normalizeSessionInfo(raw) {
1553
1625
  raw
1554
1626
  };
1555
1627
  }
1628
+ /** The admission check must hash the same wire request as dispatch. */
1629
+ function sessionMessageRequestBody(request) {
1630
+ return {
1631
+ ...request.backend !== void 0 ? { backend: normalizeRuntimeBackendConfig(request.backend) } : {},
1632
+ ...request.runControlRef !== void 0 ? { runControlRef: AgentExactRunControlRefSchema.parse(request.runControlRef) } : {},
1633
+ ...request.messageId !== void 0 ? { messageID: request.messageId } : {},
1634
+ parts: request.parts.map((part) => part.type === "text" ? {
1635
+ ...part,
1636
+ text: encodeTextForWire(part.text)
1637
+ } : part),
1638
+ ...request.system !== void 0 ? { system: request.system } : {},
1639
+ ...request.agent !== void 0 ? { agent: request.agent } : {},
1640
+ ...request.model !== void 0 ? { model: {
1641
+ providerID: request.model.providerId,
1642
+ modelID: request.model.modelId
1643
+ } } : {},
1644
+ ...request.reasoningEffort !== void 0 ? { reasoningEffort: request.reasoningEffort } : {},
1645
+ ...request.turnId !== void 0 ? { turnId: request.turnId } : {},
1646
+ ...request.interactions !== void 0 ? { interactions: request.interactions } : {}
1647
+ };
1648
+ }
1556
1649
  //#endregion
1557
- export { deriveAgentRunOutcome as _, uploadChunked as a, parseBackendType as b, encodePromptForWire as c, applyRequestedModel as d, assertCurrentBackendType as f, deriveAgentResultOutcome as g, createAgentRunOutcomeTracker as h, sessionHeaders as i, encodeTextForWire as l, normalizeRuntimeBackendConfig as m, normalizeSessionInfo as n, SANDBOX_PROXY_REQUEST_MAX_BYTES as o, mergeRuntimeBackendConfig as p, appendSessionIdQuery as r, FILE_DECODED_WRITE_MAX_BYTES as s, SandboxRuntimeApi as t, parseSSEStream as u, ALL_BACKEND_TYPES as v, backendTypeSchema as y };
1650
+ export { parseBackendType as C, backendTypeSchema as S, normalizeRuntimeBackendConfig as _, sessionHeaders as a, deriveAgentRunOutcome as b, validateAcceptedDispatchRunRef as c, encodePromptForWire as d, encodeTextForWire as f, mergeRuntimeBackendConfig as g, assertCurrentBackendType as h, appendSessionIdQuery as i, SANDBOX_PROXY_REQUEST_MAX_BYTES as l, applyRequestedModel as m, normalizeSessionInfo as n, uploadChunked as o, parseSSEStream as p, sessionMessageRequestBody as r, resolveDispatchRunIdentity as s, SandboxRuntimeApi as t, FILE_DECODED_WRITE_MAX_BYTES as u, createAgentRunOutcomeTracker as v, ALL_BACKEND_TYPES as x, deriveAgentResultOutcome as y };
package/dist/runtime.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { $r as SandboxTerminalCreateOptions, A as CommitTaskSessionOptions, B as CreateTaskSessionOptions, Bi as TaskSessionChanges, Ct as FileUsageResult, Si as SessionInfo, St as FileUsageOptions, T as ChunkedUploadResult, Ti as SessionMessage, Ui as TaskSessionInfo, Vi as TaskSessionCommitResult, Wr as SandboxPortBinding, Xr as SandboxRuntimeHealth, _i as SessionEventStreamOptions, _t as FileRenameResult, bt as FileTreeOptions, ei as SandboxTerminalInfo, hi as SentSessionMessage, ln as ListMessagesOptions, mi as SendSessionMessageRequest, mt as FileReadBatchResult, ni as SandboxTerminalRequestOptions, oa as WriteFileOptions, pi as SendSessionMessageOptions, pr as SandboxEvent, pt as FileReadBatchOptions, qn as RenameOptions, ta as UploadProgress, ti as SandboxTerminalManager, vi as SessionExecutionInfo, w as ChunkedUploadOptions, wt as FileWriteResult, xt as FileTreeResult, yi as SessionExecutionStatus, z as CreateSessionOptions } from "./types-DKtPjwgd.js";
1
+ import { A as CommitTaskSessionOptions, Ai as SessionMessage, Ci as SessionExecutionInfo, Ct as FileTreeResult, Di as SessionInfo, Et as FileWriteResult, H as CreateTaskSessionOptions, Ki as TaskSessionChanges, Kr as SandboxPortBinding, Qr as SandboxRuntimeHealth, Si as SessionEventStreamOptions, St as FileTreeOptions, T as ChunkedUploadResult, Tt as FileUsageResult, V as CreateSessionOptions, Yi as TaskSessionInfo, Yn as RenameOptions, ai as SandboxTerminalInfo, bi as SentSessionMessage, dn as ListMessagesOptions, fa as WriteFileOptions, gt as FileReadBatchResult, hr as SandboxEvent, ht as FileReadBatchOptions, ii as SandboxTerminalCreateOptions, ji as SessionMessageAdmission, oi as SandboxTerminalManager, qi as TaskSessionCommitResult, sa as UploadProgress, si as SandboxTerminalRequestOptions, vi as SendSessionMessageOptions, w as ChunkedUploadOptions, wi as SessionExecutionStatus, wt as FileUsageOptions, yi as SendSessionMessageRequest, yt as FileRenameResult } from "./types-C3Kw-Tml.js";
2
2
  import { _ as ValidationError, a as FileWriteConflictError, c as NotFoundError, d as SandboxError, f as SandboxErrorJson, g as TimeoutError, h as StateError, l as PartialFailureError, m as ServerError, n as CapabilityError, p as SandboxFailureDetail, s as NetworkError, t as AuthError, u as QuotaError } from "./errors-BoD3Ifbd.js";
3
- import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-BSZbRoHp.js";
3
+ import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-B_DRpTxx.js";
4
4
 
5
5
  //#region src/lib/chunked-upload.d.ts
6
6
  /** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
@@ -56,13 +56,14 @@ declare class SandboxRuntimeApi {
56
56
  * the token for.
57
57
  */
58
58
  events(sessionId: string, options?: SessionEventStreamOptions): AsyncGenerator<SandboxEvent>;
59
- /**
60
- * List the durable execution records for one session.
61
- *
62
- * The sidecar owns this ledger and returns records newest first. Validate
63
- * the response here so malformed payloads cannot become false run evidence.
64
- */
65
- runs(sessionId: string): Promise<SessionExecutionInfo[]>;
59
+ /** Read a turn's retained admission without proposing or admitting a message. */
60
+ admission(sessionId: string, turnId: string, options?: {
61
+ signal?: AbortSignal;
62
+ }): Promise<SessionMessageAdmission | null>;
63
+ /** List validated execution records from the runtime ledger, newest first. */
64
+ runs(sessionId: string, options?: {
65
+ signal?: AbortSignal;
66
+ }): Promise<SessionExecutionInfo[]>;
66
67
  readFiles(paths: string[], options?: FileReadBatchOptions): Promise<FileReadBatchResult>;
67
68
  writeFile(path: string, content: string, options?: WriteFileOptions): Promise<FileWriteResult>;
68
69
  /**
@@ -128,4 +129,4 @@ declare class SandboxRuntimeClient extends SandboxRuntimeApi {
128
129
  }
129
130
  declare function createSandboxRuntimeClient(config: SandboxRuntimeClientConfig): SandboxRuntimeClient;
130
131
  //#endregion
131
- export { type AgentRunOutcome, type AgentRunOutcomeTracker, AuthError, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, FileWriteConflictError, type FileWriteResult, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, ServerError, type SessionEventStreamOptions, type SessionExecutionInfo, type SessionExecutionStatus, type SessionMessage, StateError, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
132
+ export { type AgentRunOutcome, type AgentRunOutcomeTracker, AuthError, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, FileWriteConflictError, type FileWriteResult, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, ServerError, type SessionEventStreamOptions, type SessionExecutionInfo, type SessionExecutionStatus, type SessionMessage, type SessionMessageAdmission, StateError, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };