@tangle-network/sandbox 0.14.0 → 0.15.0-develop.20260727230202.7200886
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/agent/index.d.ts +3 -3
- package/dist/{client-CGQnn2gj.d.ts → client-Cf4yrjD6.d.ts} +2 -2
- package/dist/{client-Cv_z3tRq.js → client-Dj9pI8pq.js} +1 -1
- package/dist/core.d.ts +3 -3
- package/dist/core.js +2 -2
- package/dist/{index-DC_39G_I.d.ts → index-COEAR283.d.ts} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/openai/index.js +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/{sandbox-Bvt_WexG.js → sandbox-ClU3H3WT.js} +57 -12
- package/dist/{sandbox-Ceeti101.d.ts → sandbox-Dcrcg3A1.d.ts} +33 -7
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-Bf2HbxKL.js → tangle-Co7xFRJm.js} +1 -1
- package/dist/{types-Dr1wNaqo.d.ts → types-Qj4sIfZE.d.ts} +14 -6
- package/package.json +3 -3
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CodeResultPart, S as CodeLanguage, b as CodeExecutionOptions, x as CodeExecutionResult } from "../types-
|
|
2
|
-
import { n as SandboxInstance } from "../sandbox-
|
|
3
|
-
import { i as Sandbox } from "../client-
|
|
1
|
+
import { C as CodeResultPart, S as CodeLanguage, b as CodeExecutionOptions, x as CodeExecutionResult } from "../types-Qj4sIfZE.js";
|
|
2
|
+
import { n as SandboxInstance } from "../sandbox-Dcrcg3A1.js";
|
|
3
|
+
import { i as Sandbox } from "../client-Cf4yrjD6.js";
|
|
4
4
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
5
5
|
|
|
6
6
|
//#region src/agent/tools/_specs.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as ExecResult, A as CreateSandboxFleetTokenOptions, An as ReconcileSandboxFleetsResult, Cn as PublicTemplateInfo, Ct as FleetPromptDispatchResult, D as CreateIntelligenceReportOptions, Di as UsageInfo, Dn as ReapExpiredSandboxFleetsOptions, En as PublishPublicTemplateVersionOptions, Gn as SandboxEnvironment, Gr as SecretsManager, Ht as IntelligenceReport, Jn as SandboxFleetArtifactSpec, Kt as IntelligenceReportWindow, M as CreateSandboxOptions, O as CreateRequestOptions, On as ReapExpiredSandboxFleetsResult, Q as ExecOptions, Qn as SandboxFleetDriverCapability, St as FleetPromptDispatchOptions, Tn as PublishPublicTemplateOptions, Ui as BatchEvent, Un as SandboxConfig, Ut as IntelligenceReportBudget, Wt as IntelligenceReportCompareTo, Xt as ListSandboxFleetOptions, Yn as SandboxFleetCostEstimate, Zn as SandboxFleetDispatchResponse, Zt as ListSandboxOptions, _n as PromptOptions, _r as SandboxFleetWorkspaceReconcileResult, _t as FleetDriveTurnOutcome, a as AttachSandboxFleetMachineOptions, br as SandboxIdentity, bt as FleetExecDispatchResult, cr as SandboxFleetOperationsSummary, dr as SandboxFleetTraceBundle, er as SandboxFleetInfo, f as BatchResult, gn as PromptInputPart, gt as FleetDispatchStreamOptions, hr as SandboxFleetUsage, ht as FleetDispatchResultBufferOptions, ir as SandboxFleetMachineRecord, j as CreateSandboxFleetWithCoordinatorOptions, k as CreateSandboxFleetOptions, kn as ReconcileSandboxFleetsOptions, m as BatchRunRequest, mr as SandboxFleetTraceOptions, mt as FleetDispatchResultBuffer, oi as SshKeysManager, or as SandboxFleetManifest, p as BatchRunOptions, pt as FleetDispatchCancelResult, qn as SandboxFleetArtifact, ui as SubscriptionInfo, ur as SandboxFleetToken, vn as PromptResult, vr as SandboxFleetWorkspaceRestoreResult, vt as FleetDriveTurnRequest, wn as PublicTemplateVersionInfo, xi as TokenRefreshHandler, xr as SandboxInfo, xt as FleetMachineId, yr as SandboxFleetWorkspaceSnapshotResult, yt as FleetExecDispatchOptions } from "./types-
|
|
2
|
-
import { c as TraceExportResult, l as TraceExportSink, n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
1
|
+
import { $ as ExecResult, A as CreateSandboxFleetTokenOptions, An as ReconcileSandboxFleetsResult, Cn as PublicTemplateInfo, Ct as FleetPromptDispatchResult, D as CreateIntelligenceReportOptions, Di as UsageInfo, Dn as ReapExpiredSandboxFleetsOptions, En as PublishPublicTemplateVersionOptions, Gn as SandboxEnvironment, Gr as SecretsManager, Ht as IntelligenceReport, Jn as SandboxFleetArtifactSpec, Kt as IntelligenceReportWindow, M as CreateSandboxOptions, O as CreateRequestOptions, On as ReapExpiredSandboxFleetsResult, Q as ExecOptions, Qn as SandboxFleetDriverCapability, St as FleetPromptDispatchOptions, Tn as PublishPublicTemplateOptions, Ui as BatchEvent, Un as SandboxConfig, Ut as IntelligenceReportBudget, Wt as IntelligenceReportCompareTo, Xt as ListSandboxFleetOptions, Yn as SandboxFleetCostEstimate, Zn as SandboxFleetDispatchResponse, Zt as ListSandboxOptions, _n as PromptOptions, _r as SandboxFleetWorkspaceReconcileResult, _t as FleetDriveTurnOutcome, a as AttachSandboxFleetMachineOptions, br as SandboxIdentity, bt as FleetExecDispatchResult, cr as SandboxFleetOperationsSummary, dr as SandboxFleetTraceBundle, er as SandboxFleetInfo, f as BatchResult, gn as PromptInputPart, gt as FleetDispatchStreamOptions, hr as SandboxFleetUsage, ht as FleetDispatchResultBufferOptions, ir as SandboxFleetMachineRecord, j as CreateSandboxFleetWithCoordinatorOptions, k as CreateSandboxFleetOptions, kn as ReconcileSandboxFleetsOptions, m as BatchRunRequest, mr as SandboxFleetTraceOptions, mt as FleetDispatchResultBuffer, oi as SshKeysManager, or as SandboxFleetManifest, p as BatchRunOptions, pt as FleetDispatchCancelResult, qn as SandboxFleetArtifact, ui as SubscriptionInfo, ur as SandboxFleetToken, vn as PromptResult, vr as SandboxFleetWorkspaceRestoreResult, vt as FleetDriveTurnRequest, wn as PublicTemplateVersionInfo, xi as TokenRefreshHandler, xr as SandboxInfo, xt as FleetMachineId, yr as SandboxFleetWorkspaceSnapshotResult, yt as FleetExecDispatchOptions } from "./types-Qj4sIfZE.js";
|
|
2
|
+
import { c as TraceExportResult, l as TraceExportSink, n as SandboxInstance, t as HttpClient } from "./sandbox-Dcrcg3A1.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sse-parser.d.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as encodeTextForWire, d as normalizeRuntimeBackendConfig, f as backendTypeSchema, i as SANDBOX_PROXY_REQUEST_MAX_BYTES, l as applyRequestedModel, o as combineAbortSignals, s as encodePromptForWire, u as assertCurrentBackendType } from "./runtime-api-CCvDLhAW.js";
|
|
2
2
|
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, o as PartialFailureError, p as parseErrorResponse, t as AuthError } from "./errors-D9fFOWX9.js";
|
|
3
|
-
import { g as exportTraceBundle, m as normalizeConnection, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, y as parseSSEStream } from "./sandbox-
|
|
3
|
+
import { g as exportTraceBundle, m as normalizeConnection, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, y as parseSSEStream } from "./sandbox-ClU3H3WT.js";
|
|
4
4
|
import { agentProfileSchema } from "@tangle-network/agent-interface";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region ../../../packages/runtime-contracts/dist/git-policy.js
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as ExecResult, M as CreateSandboxOptions, Or as SandboxStatus, Q as ExecOptions, Un as SandboxConfig, gn as PromptInputPart, on as PreviewLinkInfo, sn as PreviewLinkManager, tn as NetworkConfig, xr as SandboxInfo } from "./types-
|
|
2
|
-
import { a as WorkspaceImagePublishResult, i as WorkspaceImagePublishRequestOptions, n as SandboxInstance, o as WorkspaceImages, r as WorkspaceImagePublishInput } from "./sandbox-
|
|
3
|
-
import { i as Sandbox } from "./client-
|
|
1
|
+
import { $ as ExecResult, M as CreateSandboxOptions, Or as SandboxStatus, Q as ExecOptions, Un as SandboxConfig, gn as PromptInputPart, on as PreviewLinkInfo, sn as PreviewLinkManager, tn as NetworkConfig, xr as SandboxInfo } from "./types-Qj4sIfZE.js";
|
|
2
|
+
import { a as WorkspaceImagePublishResult, i as WorkspaceImagePublishRequestOptions, n as SandboxInstance, o as WorkspaceImages, r as WorkspaceImagePublishInput } from "./sandbox-Dcrcg3A1.js";
|
|
3
|
+
import { i as Sandbox } from "./client-Cf4yrjD6.js";
|
|
4
4
|
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-BzMmpmqU.js";
|
|
5
5
|
export { AuthError, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, type PromptInputPart, QuotaError, Sandbox, type SandboxConfig, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages };
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-D9fFOWX9.js";
|
|
2
|
-
import { n as Sandbox } from "./client-
|
|
3
|
-
import { i as WorkspaceImages, t as SandboxInstance } from "./sandbox-
|
|
2
|
+
import { n as Sandbox } from "./client-Dj9pI8pq.js";
|
|
3
|
+
import { i as WorkspaceImages, t as SandboxInstance } from "./sandbox-ClU3H3WT.js";
|
|
4
4
|
export { AuthError, CapabilityError, NetworkError, NotFoundError, PartialFailureError, QuotaError, Sandbox, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as CreateSandboxOptions } from "./types-
|
|
2
|
-
import { n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
1
|
+
import { M as CreateSandboxOptions } from "./types-Qj4sIfZE.js";
|
|
2
|
+
import { n as SandboxInstance, t as HttpClient } from "./sandbox-Dcrcg3A1.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tangle/abi.d.ts
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as ExecResult, $n as SandboxFleetDriverTimings, $r as SessionListOptions, $t as MintScopedTokenOptions, Ai as WriteFileOptions, An as ReconcileSandboxFleetsResult, Ar as SandboxTerminalCreateOptions, At as GitStatus, B as DownloadOptions, Bi as TerminalStreamOptions, Bn as RolloutTurnPart, Br as ScopedToken, Bt as HostAgentRuntimeBackend, Ci as TurnDriveResult, Cn as PublicTemplateInfo, Cr as SandboxPortBinding, D as CreateIntelligenceReportOptions, Di as UsageInfo, Dn as ReapExpiredSandboxFleetsOptions, Dr as SandboxRuntimeHealth, Dt as GitCommit, E as CreateGpuLeaseOptions, Ei as UploadProgress, En as PublishPublicTemplateVersionOptions, Er as SandboxResources, Et as GitBranch, F as DeleteOptions, Fi as TerminalReadyInfo, Fn as RolloutChildResult, Fr as SandboxTraceBundle, Ft as GpuLeaseExecResult, G as DriverType, Gi as BatchSidecarGroup, Gn as SandboxEnvironment, Gr as SecretsManager, Gt as IntelligenceReportSubjectType, H as DriveTurnOptions, Hi as BatchBackendStats, Hn as SSHCredentials, Hr as SearchMatch, Ht as IntelligenceReport, I as DevServerInfo, Ii as TerminalStream, In as RolloutOptions, Ir as SandboxTraceEvent, It as GpuLeaseManager, J as EgressPolicy, Ji as BackendType, Jn as SandboxFleetArtifactSpec, Jr as SentSessionMessage, Jt as ListMessagesOptions, Ki as BatchTaskUsage, Kn as SandboxEvent, Kr as SendSessionMessageOptions, Kt as IntelligenceReportWindow, L as DirectoryPermission, Li as TerminalStreamAuthFormat, Ln as RolloutScorer, Lr as SandboxTraceExport, Lt as GpuLeaseProviderName, M as CreateSandboxOptions, Mi as WriteManyOptions, Mr as SandboxTerminalManager, Mt as GpuLeaseBilling, N as CreateSessionOptions, Ni as TERMINAL_WS_ECHO_SUBPROTOCOL, Nr as SandboxTerminalRequestOptions, Nt as GpuLeaseCommandResult, O as CreateRequestOptions, Oi as WaitForOptions, On as ReapExpiredSandboxFleetsResult, Or as SandboxStatus, Ot as GitConfig, P as CreateTaskSessionOptions, Pi as TerminalExitInfo, Pn as Rollout, Pr as SandboxTerminals, Pt as GpuLeaseExecOptions, Q as ExecOptions, Qn as SandboxFleetDriverCapability, Qr as SessionInfo, Qt as McpServerConfig, R as DispatchPromptOptions, Ri as TerminalStreamError, Rn as RolloutStartResult, Rr as SandboxTraceOptions, Rt as GpuLeaseStatus, Si as TokenUsage, Sn as ProvisionStep, Sr as SandboxIntelligenceEnvelope, St as FleetPromptDispatchOptions, T as CompletedTurnResult, Ti as UploadOptions, Tn as PublishPublicTemplateOptions, Tr as SandboxResourceUsage, Tt as GitAuth, U as DriverConfig, Ui as BatchEvent, Un as SandboxConfig, Ur as SearchOptions, Ut as IntelligenceReportBudget, V as DownloadProgress, Vi as TerminalStreamToken, Vn as SSHCommandDescriptor, Vr as ScopedTokenScope, Vt as InstalledTool, W as DriverInfo, Wi as BatchEventDataMap, Wn as SandboxConnection, Wr as SecretInfo, Wt as IntelligenceReportCompareTo, X as EventStreamOptions, Xn as SandboxFleetDispatchFailureClass, Xr as SessionEventStreamOptions, Xt as ListSandboxFleetOptions, Y as EnsureDevServerOptions, Yn as SandboxFleetCostEstimate, Yr as SessionBackendCredentials, Yt as ListOptions, Z as ExactProcessSpawnOptions, Zn as SandboxFleetDispatchResponse, Zr as SessionForkOptions, Zt as ListSandboxOptions, _ as BranchOptions, _i as TeeAttestationReport, _n as PromptOptions, _r as SandboxFleetWorkspaceReconcileResult, _t as FleetDriveTurnOutcome, a as AttachSandboxFleetMachineOptions, ai as SnapshotResult, an as PermissionsManager, ar as SandboxFleetMachineSpec, at as FileRenameResult, bi as TeePublicKeyResponse, bn as ProvisionResult, br as SandboxIdentity, c as BackendInfo, ci as StartupOperation, cn as Process, cr as SandboxFleetOperationsSummary, ct as FileTreeOptions, d as BatchBackend, di as TaskSessionChanges, dn as ProcessLogEntry, dr as SandboxFleetTraceBundle, dt as FileUsageResult, ei as SessionMessage, en as MkdirOptions, er as SandboxFleetInfo, et as FileInfo, f as BatchResult, fi as TaskSessionCommitResult, fn as ProcessManager, fr as SandboxFleetTraceEvent, ft as FileWriteResult, g as BatchTaskResult, gi as TeeAttestationOptions, gn as PromptInputPart, gr as SandboxFleetWorkspace, gt as FleetDispatchStreamOptions, h as BatchTask, hi as TaskSessionProfile, hn as ProcessStatus, hr as SandboxFleetUsage, ht as FleetDispatchResultBufferOptions, i as AttachGpuLeaseOptions, ii as SnapshotOptions, in as PermissionLevel, ir as SandboxFleetMachineRecord, it as FileReadResult, j as CreateSandboxFleetWithCoordinatorOptions, ji as WriteManyFile, jn as RenameOptions, jr as SandboxTerminalInfo, jt as GpuLease, k as CreateSandboxFleetOptions, ki as WaitForRolloutOptions, kn as ReconcileSandboxFleetsOptions, kr as SandboxTerminalAttachOptions, kt as GitDiff, l as BackendManager, li as StorageConfig, ln as ProcessInfo, lr as SandboxFleetPolicy, lt as FileTreeResult, m as BatchRunRequest, mi as TaskSessionInfo, mn as ProcessSpawnOptions, mr as SandboxFleetTraceOptions, mt as FleetDispatchResultBuffer, n as AccessPolicyRule, ni as SessionStatus, nn as NetworkManager, nr as SandboxFleetMachine, nt as FileReadBatchResult, o as BackendCapabilities, on as PreviewLinkInfo, or as SandboxFleetManifest, ot as FileSystem, p as BatchRunOptions, pi as TaskSessionFileChange, pn as ProcessSignal, pr as SandboxFleetTraceExport, pt as FleetDispatchCancelResult, q as EgressManager, qi as PublicBatchRunRequest, qn as SandboxFleetArtifact, qr as SendSessionMessageRequest, r as AddUserOptions, ri as SnapshotInfo, rn as NonHostAgentDriverConfig, rr as SandboxFleetMachineMeteredUsage, rt as FileReadError, s as BackendConfig, si as StartupDiagnostics, sn as PreviewLinkManager, sr as SandboxFleetManifestMachine, st as FileTreeFile, t as AcceleratorKind, ti as SessionMessageInputPart, tn as NetworkConfig, tr as SandboxFleetIntelligenceEnvelope, tt as FileReadBatchOptions, u as BackendStatus, ui as SubscriptionInfo, un as ProcessListOptions, ur as SandboxFleetToken, ut as FileUsageOptions, v as ChunkedUploadOptions, vi as TeeAttestationResponse, vn as PromptResult, vr as SandboxFleetWorkspaceRestoreResult, vt as FleetDriveTurnRequest, w as CommitTaskSessionOptions, wi as UpdateUserOptions, wn as PublicTemplateVersionInfo, wr as SandboxPortPreviewLink, wt as GPU_LEASE_PROVIDER_NAMES, xi as TokenRefreshHandler, xn as ProvisionStatus, xr as SandboxInfo, xt as FleetMachineId, y as ChunkedUploadResult, yi as TeePublicKey, yn as ProvisionEvent, yr as SandboxFleetWorkspaceSnapshotResult, yt as FleetExecDispatchOptions, z as DispatchedSession, zi as TerminalStreamHandlers, zn as RolloutStatus, zr as SandboxUser, zt as HostAgentDriverConfig } from "./types-
|
|
2
|
-
import { A as SandboxMcpEndpoint, C as RespondToPermissionOptions, D as CONTROL_PLANE_MCP_SERVER_NAME, E as BuildSandboxMcpConfigOptions, M as buildControlPlaneMcpConfig, N as buildSandboxMcpConfig, O as SANDBOX_MCP_SERVER_NAME, S as InterruptResult, T as BuildControlPlaneMcpConfigOptions, _ as InteractiveAuthFile, a as WorkspaceImagePublishResult, b as InteractiveSessionInfo, c as TraceExportResult, d as exportTraceBundle, f as otelTraceIdForTangleTrace, g as InteractiveAttachOptions, h as SandboxSession, i as WorkspaceImagePublishRequestOptions, j as SandboxMcpServerEntry, k as SandboxMcpConfig, l as TraceExportSink, m as SandboxTaskSession, n as SandboxInstance, o as WorkspaceImages, p as toOtelJson, r as WorkspaceImagePublishInput, s as TraceExportFormat, u as buildTraceExportPayload, v as InteractiveSessionHandle, w as StartInteractiveOptions, x as InteractiveSessionStatus, y as InteractiveSessionHost } from "./sandbox-
|
|
3
|
-
import { a as Team, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, 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 } from "./client-
|
|
1
|
+
import { $ as ExecResult, $n as SandboxFleetDriverTimings, $r as SessionListOptions, $t as MintScopedTokenOptions, Ai as WriteFileOptions, An as ReconcileSandboxFleetsResult, Ar as SandboxTerminalCreateOptions, At as GitStatus, B as DownloadOptions, Bi as TerminalStreamOptions, Bn as RolloutTurnPart, Br as ScopedToken, Bt as HostAgentRuntimeBackend, Ci as TurnDriveResult, Cn as PublicTemplateInfo, Cr as SandboxPortBinding, D as CreateIntelligenceReportOptions, Di as UsageInfo, Dn as ReapExpiredSandboxFleetsOptions, Dr as SandboxRuntimeHealth, Dt as GitCommit, E as CreateGpuLeaseOptions, Ei as UploadProgress, En as PublishPublicTemplateVersionOptions, Er as SandboxResources, Et as GitBranch, F as DeleteOptions, Fi as TerminalReadyInfo, Fn as RolloutChildResult, Fr as SandboxTraceBundle, Ft as GpuLeaseExecResult, G as DriverType, Gi as BatchSidecarGroup, Gn as SandboxEnvironment, Gr as SecretsManager, Gt as IntelligenceReportSubjectType, H as DriveTurnOptions, Hi as BatchBackendStats, Hn as SSHCredentials, Hr as SearchMatch, Ht as IntelligenceReport, I as DevServerInfo, Ii as TerminalStream, In as RolloutOptions, Ir as SandboxTraceEvent, It as GpuLeaseManager, J as EgressPolicy, Ji as BackendType, Jn as SandboxFleetArtifactSpec, Jr as SentSessionMessage, Jt as ListMessagesOptions, Ki as BatchTaskUsage, Kn as SandboxEvent, Kr as SendSessionMessageOptions, Kt as IntelligenceReportWindow, L as DirectoryPermission, Li as TerminalStreamAuthFormat, Ln as RolloutScorer, Lr as SandboxTraceExport, Lt as GpuLeaseProviderName, M as CreateSandboxOptions, Mi as WriteManyOptions, Mr as SandboxTerminalManager, Mt as GpuLeaseBilling, N as CreateSessionOptions, Ni as TERMINAL_WS_ECHO_SUBPROTOCOL, Nr as SandboxTerminalRequestOptions, Nt as GpuLeaseCommandResult, O as CreateRequestOptions, Oi as WaitForOptions, On as ReapExpiredSandboxFleetsResult, Or as SandboxStatus, Ot as GitConfig, P as CreateTaskSessionOptions, Pi as TerminalExitInfo, Pn as Rollout, Pr as SandboxTerminals, Pt as GpuLeaseExecOptions, Q as ExecOptions, Qn as SandboxFleetDriverCapability, Qr as SessionInfo, Qt as McpServerConfig, R as DispatchPromptOptions, Ri as TerminalStreamError, Rn as RolloutStartResult, Rr as SandboxTraceOptions, Rt as GpuLeaseStatus, Si as TokenUsage, Sn as ProvisionStep, Sr as SandboxIntelligenceEnvelope, St as FleetPromptDispatchOptions, T as CompletedTurnResult, Ti as UploadOptions, Tn as PublishPublicTemplateOptions, Tr as SandboxResourceUsage, Tt as GitAuth, U as DriverConfig, Ui as BatchEvent, Un as SandboxConfig, Ur as SearchOptions, Ut as IntelligenceReportBudget, V as DownloadProgress, Vi as TerminalStreamToken, Vn as SSHCommandDescriptor, Vr as ScopedTokenScope, Vt as InstalledTool, W as DriverInfo, Wi as BatchEventDataMap, Wn as SandboxConnection, Wr as SecretInfo, Wt as IntelligenceReportCompareTo, X as EventStreamOptions, Xn as SandboxFleetDispatchFailureClass, Xr as SessionEventStreamOptions, Xt as ListSandboxFleetOptions, Y as EnsureDevServerOptions, Yn as SandboxFleetCostEstimate, Yr as SessionBackendCredentials, Yt as ListOptions, Z as ExactProcessSpawnOptions, Zn as SandboxFleetDispatchResponse, Zr as SessionForkOptions, Zt as ListSandboxOptions, _ as BranchOptions, _i as TeeAttestationReport, _n as PromptOptions, _r as SandboxFleetWorkspaceReconcileResult, _t as FleetDriveTurnOutcome, a as AttachSandboxFleetMachineOptions, ai as SnapshotResult, an as PermissionsManager, ar as SandboxFleetMachineSpec, at as FileRenameResult, bi as TeePublicKeyResponse, bn as ProvisionResult, br as SandboxIdentity, c as BackendInfo, ci as StartupOperation, cn as Process, cr as SandboxFleetOperationsSummary, ct as FileTreeOptions, d as BatchBackend, di as TaskSessionChanges, dn as ProcessLogEntry, dr as SandboxFleetTraceBundle, dt as FileUsageResult, ei as SessionMessage, en as MkdirOptions, er as SandboxFleetInfo, et as FileInfo, f as BatchResult, fi as TaskSessionCommitResult, fn as ProcessManager, fr as SandboxFleetTraceEvent, ft as FileWriteResult, g as BatchTaskResult, gi as TeeAttestationOptions, gn as PromptInputPart, gr as SandboxFleetWorkspace, gt as FleetDispatchStreamOptions, h as BatchTask, hi as TaskSessionProfile, hn as ProcessStatus, hr as SandboxFleetUsage, ht as FleetDispatchResultBufferOptions, i as AttachGpuLeaseOptions, ii as SnapshotOptions, in as PermissionLevel, ir as SandboxFleetMachineRecord, it as FileReadResult, j as CreateSandboxFleetWithCoordinatorOptions, ji as WriteManyFile, jn as RenameOptions, jr as SandboxTerminalInfo, jt as GpuLease, k as CreateSandboxFleetOptions, ki as WaitForRolloutOptions, kn as ReconcileSandboxFleetsOptions, kr as SandboxTerminalAttachOptions, kt as GitDiff, l as BackendManager, li as StorageConfig, ln as ProcessInfo, lr as SandboxFleetPolicy, lt as FileTreeResult, m as BatchRunRequest, mi as TaskSessionInfo, mn as ProcessSpawnOptions, mr as SandboxFleetTraceOptions, mt as FleetDispatchResultBuffer, n as AccessPolicyRule, ni as SessionStatus, nn as NetworkManager, nr as SandboxFleetMachine, nt as FileReadBatchResult, o as BackendCapabilities, on as PreviewLinkInfo, or as SandboxFleetManifest, ot as FileSystem, p as BatchRunOptions, pi as TaskSessionFileChange, pn as ProcessSignal, pr as SandboxFleetTraceExport, pt as FleetDispatchCancelResult, q as EgressManager, qi as PublicBatchRunRequest, qn as SandboxFleetArtifact, qr as SendSessionMessageRequest, r as AddUserOptions, ri as SnapshotInfo, rn as NonHostAgentDriverConfig, rr as SandboxFleetMachineMeteredUsage, rt as FileReadError, s as BackendConfig, si as StartupDiagnostics, sn as PreviewLinkManager, sr as SandboxFleetManifestMachine, st as FileTreeFile, t as AcceleratorKind, ti as SessionMessageInputPart, tn as NetworkConfig, tr as SandboxFleetIntelligenceEnvelope, tt as FileReadBatchOptions, u as BackendStatus, ui as SubscriptionInfo, un as ProcessListOptions, ur as SandboxFleetToken, ut as FileUsageOptions, v as ChunkedUploadOptions, vi as TeeAttestationResponse, vn as PromptResult, vr as SandboxFleetWorkspaceRestoreResult, vt as FleetDriveTurnRequest, w as CommitTaskSessionOptions, wi as UpdateUserOptions, wn as PublicTemplateVersionInfo, wr as SandboxPortPreviewLink, wt as GPU_LEASE_PROVIDER_NAMES, xi as TokenRefreshHandler, xn as ProvisionStatus, xr as SandboxInfo, xt as FleetMachineId, y as ChunkedUploadResult, yi as TeePublicKey, yn as ProvisionEvent, yr as SandboxFleetWorkspaceSnapshotResult, yt as FleetExecDispatchOptions, z as DispatchedSession, zi as TerminalStreamHandlers, zn as RolloutStatus, zr as SandboxUser, zt as HostAgentDriverConfig } from "./types-Qj4sIfZE.js";
|
|
2
|
+
import { A as SandboxMcpEndpoint, C as RespondToPermissionOptions, D as CONTROL_PLANE_MCP_SERVER_NAME, E as BuildSandboxMcpConfigOptions, M as buildControlPlaneMcpConfig, N as buildSandboxMcpConfig, O as SANDBOX_MCP_SERVER_NAME, S as InterruptResult, T as BuildControlPlaneMcpConfigOptions, _ as InteractiveAuthFile, a as WorkspaceImagePublishResult, b as InteractiveSessionInfo, c as TraceExportResult, d as exportTraceBundle, f as otelTraceIdForTangleTrace, g as InteractiveAttachOptions, h as SandboxSession, i as WorkspaceImagePublishRequestOptions, j as SandboxMcpServerEntry, k as SandboxMcpConfig, l as TraceExportSink, m as SandboxTaskSession, n as SandboxInstance, o as WorkspaceImages, p as toOtelJson, r as WorkspaceImagePublishInput, s as TraceExportFormat, u as buildTraceExportPayload, v as InteractiveSessionHandle, w as StartInteractiveOptions, x as InteractiveSessionStatus, y as InteractiveSessionHost } from "./sandbox-Dcrcg3A1.js";
|
|
3
|
+
import { a as Team, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, 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 } from "./client-Cf4yrjD6.js";
|
|
4
4
|
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-DtRFVx5U.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-Cp1KYanB.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-BzMmpmqU.js";
|
|
7
|
-
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
7
|
+
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-COEAR283.js";
|
|
8
8
|
import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
|
|
9
9
|
import { AgentProfile, AgentProfileConfidential, AgentProfileFileMount, SANDBOX_SIZE_PRESET_NAMES, SandboxSizePreset } from "@tangle-network/agent-interface";
|
|
10
10
|
import { z } from "zod";
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { d as normalizeRuntimeBackendConfig, f as backendTypeSchema } from "./runtime-api-CCvDLhAW.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-D9fFOWX9.js";
|
|
3
|
-
import { a as splitInlineProfileSkills, c as SandboxFleetClient, i as splitInlineProfileFileMounts, l as createBatchResultAccumulator, n as Sandbox, o as validateDeferredProfileFileMounts, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as validateBatchRunRequest } from "./client-
|
|
4
|
-
import { _ as otelTraceIdForTangleTrace, a as TERMINAL_WS_ECHO_SUBPROTOCOL, c as SandboxTaskSession, d as applySandboxEventText, f as collectAgentResponseText, g as exportTraceBundle, h as buildTraceExportPayload, i as WorkspaceImages, l as SandboxSession, o as TerminalStream, p as getSandboxEventText, s as TerminalStreamError, t as SandboxInstance, u as InteractiveSessionHandle, v as toOtelJson, y as parseSSEStream } from "./sandbox-
|
|
3
|
+
import { a as splitInlineProfileSkills, c as SandboxFleetClient, i as splitInlineProfileFileMounts, l as createBatchResultAccumulator, n as Sandbox, o as validateDeferredProfileFileMounts, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as validateBatchRunRequest } from "./client-Dj9pI8pq.js";
|
|
4
|
+
import { _ as otelTraceIdForTangleTrace, a as TERMINAL_WS_ECHO_SUBPROTOCOL, c as SandboxTaskSession, d as applySandboxEventText, f as collectAgentResponseText, g as exportTraceBundle, h as buildTraceExportPayload, i as WorkspaceImages, l as SandboxSession, o as TerminalStream, p as getSandboxEventText, s as TerminalStreamError, t as SandboxInstance, u as InteractiveSessionHandle, v as toOtelJson, y as parseSSEStream } from "./sandbox-ClU3H3WT.js";
|
|
5
5
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DdD_rFZQ.js";
|
|
6
|
-
import { t as TangleSandboxClient } from "./tangle-
|
|
6
|
+
import { t as TangleSandboxClient } from "./tangle-Co7xFRJm.js";
|
|
7
7
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
//#region src/confidential.ts
|
package/dist/openai/index.js
CHANGED
|
@@ -1431,7 +1431,7 @@ function openaiMessagesToSandboxInput(messages, tools, model) {
|
|
|
1431
1431
|
if (!attached) throw new Error(`openaiMessagesToSandboxInput: tool message references unknown tool_call_id ${msg.tool_call_id}`);
|
|
1432
1432
|
break;
|
|
1433
1433
|
}
|
|
1434
|
-
case "function":
|
|
1434
|
+
case "function": throw new Error("openaiMessagesToSandboxInput: the `function` message role is not supported. Convert function-call results to `tool` messages with a tool_call_id (the OpenAI tools API shape).");
|
|
1435
1435
|
}
|
|
1436
1436
|
if (i === lastUserIndex) flushPending();
|
|
1437
1437
|
}
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ai as WriteFileOptions, Ar as SandboxTerminalCreateOptions, Cr as SandboxPortBinding, Dr as SandboxRuntimeHealth, Ei as UploadProgress, Jr as SentSessionMessage, Jt as ListMessagesOptions, Kr as SendSessionMessageOptions, Mr as SandboxTerminalManager, N as CreateSessionOptions, Nr as SandboxTerminalRequestOptions, P as CreateTaskSessionOptions, Qr as SessionInfo, at as FileRenameResult, ct as FileTreeOptions, di as TaskSessionChanges, dt as FileUsageResult, ei as SessionMessage, fi as TaskSessionCommitResult, ft as FileWriteResult, jn as RenameOptions, jr as SandboxTerminalInfo, lt as FileTreeResult, mi as TaskSessionInfo, nt as FileReadBatchResult, qr as SendSessionMessageRequest, tt as FileReadBatchOptions, ut as FileUsageOptions, v as ChunkedUploadOptions, w as CommitTaskSessionOptions, y as ChunkedUploadResult } from "./types-
|
|
1
|
+
import { Ai as WriteFileOptions, Ar as SandboxTerminalCreateOptions, Cr as SandboxPortBinding, Dr as SandboxRuntimeHealth, Ei as UploadProgress, Jr as SentSessionMessage, Jt as ListMessagesOptions, Kr as SendSessionMessageOptions, Mr as SandboxTerminalManager, N as CreateSessionOptions, Nr as SandboxTerminalRequestOptions, P as CreateTaskSessionOptions, Qr as SessionInfo, at as FileRenameResult, ct as FileTreeOptions, di as TaskSessionChanges, dt as FileUsageResult, ei as SessionMessage, fi as TaskSessionCommitResult, ft as FileWriteResult, jn as RenameOptions, jr as SandboxTerminalInfo, lt as FileTreeResult, mi as TaskSessionInfo, nt as FileReadBatchResult, qr as SendSessionMessageRequest, tt as FileReadBatchOptions, ut as FileUsageOptions, v as ChunkedUploadOptions, w as CommitTaskSessionOptions, y as ChunkedUploadResult } from "./types-Qj4sIfZE.js";
|
|
2
2
|
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-BzMmpmqU.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/chunked-upload.d.ts
|
|
@@ -4980,20 +4980,55 @@ var SandboxInstance = class SandboxInstance {
|
|
|
4980
4980
|
* returns; reconnect via `box.session(id).events()` or wait for
|
|
4981
4981
|
* completion with `box.session(id).result()`.
|
|
4982
4982
|
*
|
|
4983
|
-
*
|
|
4984
|
-
*
|
|
4985
|
-
*
|
|
4986
|
-
*
|
|
4983
|
+
* Skips the dispatch only on positive evidence that this work is
|
|
4984
|
+
* already in flight or already finished — never on the mere existence
|
|
4985
|
+
* of a session with the same id:
|
|
4986
|
+
*
|
|
4987
|
+
* 1. The session is in flight — `running`, or `queued` with a
|
|
4988
|
+
* `latestExecutionId` — → a second dispatch would run two agents
|
|
4989
|
+
* against one session, so return the live status with
|
|
4990
|
+
* `dispatched: false`.
|
|
4991
|
+
* 2. `opts.turnId` is set and the completed-turn cache has it → the
|
|
4992
|
+
* turn already finished; return `dispatched: false`. This is the
|
|
4993
|
+
* only durable idempotency key, and it outlives the session (the
|
|
4994
|
+
* cache survives session eviction, see `findCompletedTurn`).
|
|
4995
|
+
*
|
|
4996
|
+
* Anything else dispatches. Two cases in particular:
|
|
4997
|
+
*
|
|
4998
|
+
* - A `queued` session with no `latestExecutionId` was created or
|
|
4999
|
+
* forked and has never run anything — the runtime writes exactly
|
|
5000
|
+
* that state on `POST /agents/sessions` and on fork, and sets
|
|
5001
|
+
* `latestExecutionId` at execution START. Refusing here would leave
|
|
5002
|
+
* a pre-created session permanently undispatchable.
|
|
5003
|
+
* - A terminal session is a finished conversation, and a new prompt
|
|
5004
|
+
* into it is a new turn, not a retry.
|
|
5005
|
+
*
|
|
5006
|
+
* A caller that needs a completed dispatch to stay a no-op across
|
|
5007
|
+
* retries MUST pass `turnId`; session existence cannot stand in for it,
|
|
5008
|
+
* because an evicted session makes the same retry dispatch anyway.
|
|
5009
|
+
*
|
|
5010
|
+
* Read `dispatched`, not `alreadyExisted`, to tell "the prompt ran"
|
|
5011
|
+
* from "we found prior work and did nothing".
|
|
4987
5012
|
*/
|
|
4988
5013
|
async dispatchPrompt(message, opts) {
|
|
4989
5014
|
await this.ensureRunning();
|
|
5015
|
+
let existing = null;
|
|
4990
5016
|
if (opts?.sessionId) {
|
|
4991
|
-
|
|
4992
|
-
if (existing) return {
|
|
5017
|
+
existing = await this._sessionStatus(opts.sessionId);
|
|
5018
|
+
if (existing && isSessionInFlight(existing)) return {
|
|
4993
5019
|
sessionId: existing.id,
|
|
4994
5020
|
status: existing.status,
|
|
4995
|
-
alreadyExisted: true
|
|
5021
|
+
alreadyExisted: true,
|
|
5022
|
+
dispatched: false
|
|
4996
5023
|
};
|
|
5024
|
+
if (opts.turnId) {
|
|
5025
|
+
if (await this.findCompletedTurn(opts.turnId, { sessionId: opts.sessionId })) return {
|
|
5026
|
+
sessionId: existing?.id ?? opts.sessionId,
|
|
5027
|
+
status: existing?.status ?? "completed",
|
|
5028
|
+
alreadyExisted: existing !== null,
|
|
5029
|
+
dispatched: false
|
|
5030
|
+
};
|
|
5031
|
+
}
|
|
4997
5032
|
}
|
|
4998
5033
|
const ctrl = new AbortController();
|
|
4999
5034
|
const stream = this.streamPrompt(message, {
|
|
@@ -5017,7 +5052,8 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5017
5052
|
return {
|
|
5018
5053
|
sessionId: resolvedSessionId,
|
|
5019
5054
|
status: "running",
|
|
5020
|
-
alreadyExisted:
|
|
5055
|
+
alreadyExisted: existing !== null,
|
|
5056
|
+
dispatched: true
|
|
5021
5057
|
};
|
|
5022
5058
|
}
|
|
5023
5059
|
/**
|
|
@@ -5116,8 +5152,9 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5116
5152
|
* `failed`.
|
|
5117
5153
|
* 3. The session is terminal without a cached turn → settle from the
|
|
5118
5154
|
* session result; an unsuccessful result is `failed`.
|
|
5119
|
-
* 4. No session exists
|
|
5120
|
-
* `
|
|
5155
|
+
* 4. No session exists, or one exists that was created/forked but never
|
|
5156
|
+
* ran (`queued` with no `latestExecutionId`) → dispatch
|
|
5157
|
+
* fire-and-detach → `running`.
|
|
5121
5158
|
*
|
|
5122
5159
|
* `failed` is always deterministic: re-invoking with the same ids
|
|
5123
5160
|
* returns the same outcome rather than starting a second agent run, so
|
|
@@ -5128,7 +5165,8 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5128
5165
|
const turn = await this.findCompletedTurn(turnId, { sessionId: opts.sessionId });
|
|
5129
5166
|
if (turn) return settleTurnDrive(turn.result);
|
|
5130
5167
|
const info = await this._sessionStatus(opts.sessionId);
|
|
5131
|
-
|
|
5168
|
+
const awaitingFirstTurn = Boolean(info && isSessionAwaitingFirstTurn(info));
|
|
5169
|
+
if (info && isSessionInFlight(info)) {
|
|
5132
5170
|
const startedAt = info.startedAt ?? info.createdAt;
|
|
5133
5171
|
const elapsedMs = startedAt ? Date.now() - startedAt.getTime() : void 0;
|
|
5134
5172
|
if (opts.wallCapMs !== void 0 && elapsedMs !== void 0 && elapsedMs > opts.wallCapMs) {
|
|
@@ -5144,7 +5182,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5144
5182
|
...elapsedMs !== void 0 ? { elapsedMs } : {}
|
|
5145
5183
|
};
|
|
5146
5184
|
}
|
|
5147
|
-
if (info) {
|
|
5185
|
+
if (info && !awaitingFirstTurn) {
|
|
5148
5186
|
if (!info.latestExecutionId) return {
|
|
5149
5187
|
state: "failed",
|
|
5150
5188
|
error: `session ${opts.sessionId} ${info.status}: no execution result is available`
|
|
@@ -5548,6 +5586,13 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5548
5586
|
return decoded.plan;
|
|
5549
5587
|
}
|
|
5550
5588
|
};
|
|
5589
|
+
function isSessionAwaitingFirstTurn(info) {
|
|
5590
|
+
return info.status === "queued" && !info.latestExecutionId;
|
|
5591
|
+
}
|
|
5592
|
+
function isSessionInFlight(info) {
|
|
5593
|
+
if (info.status === "running") return true;
|
|
5594
|
+
return info.status === "queued" && !isSessionAwaitingFirstTurn(info);
|
|
5595
|
+
}
|
|
5551
5596
|
function settleTurnDrive(result) {
|
|
5552
5597
|
const plan = readAwaitingPlan(result);
|
|
5553
5598
|
if (plan) return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as ExecResult, $r as SessionListOptions, $t as MintScopedTokenOptions, Ai as WriteFileOptions, At as GitStatus, Br as ScopedToken, Ci as TurnDriveResult, Cr as SandboxPortBinding, Dr as SandboxRuntimeHealth, Dt as GitCommit, Et as GitBranch, Fr as SandboxTraceBundle, H as DriveTurnOptions, Hn as SSHCredentials, Hr as SearchMatch, Ht as IntelligenceReport, Ii as TerminalStream, In as RolloutOptions, It as GpuLeaseManager, Ji as BackendType, Jr as SentSessionMessage, Jt as ListMessagesOptions, K as DurablePlan, Kn as SandboxEvent, Kr as SendSessionMessageOptions, Kt as IntelligenceReportWindow, Mi as WriteManyOptions, Mn as RestoreSnapshotOptions, N as CreateSessionOptions, Nn as ResumeOptions, Oi as WaitForOptions, Or as SandboxStatus, P as CreateTaskSessionOptions, Pn as Rollout, Pr as SandboxTerminals, Q as ExecOptions, Qr as SessionInfo, R as DispatchPromptOptions, Rn as RolloutStartResult, Rr as SandboxTraceOptions, S as CodeLanguage, T as CompletedTurnResult, Tr as SandboxResourceUsage, Ur as SearchOptions, Ut as IntelligenceReportBudget, Vn as SSHCommandDescriptor, Vt as InstalledTool, W as DriverInfo, Wn as SandboxConnection, Wt as IntelligenceReportCompareTo, X as EventStreamOptions, Xr as SessionEventStreamOptions, Zr as SessionForkOptions, _ as BranchOptions, _n as PromptOptions, ai as SnapshotResult, an as PermissionsManager, b as CodeExecutionOptions, bi as TeePublicKeyResponse, bn as ProvisionResult, di as TaskSessionChanges, dr as SandboxFleetTraceBundle, ei as SessionMessage, fi as TaskSessionCommitResult, fn as ProcessManager, ft as FileWriteResult, gi as TeeAttestationOptions, gn as PromptInputPart, ii as SnapshotOptions, ji as WriteManyFile, jt as GpuLease, ki as WaitForRolloutOptions, kr as SandboxTerminalAttachOptions, kt as GitDiff, l as BackendManager, mi as TaskSessionInfo, nn as NetworkManager, ot as FileSystem, q as EgressManager, qr as SendSessionMessageRequest, qt as JsonValue, ri as SnapshotInfo, s as BackendConfig, si as StartupDiagnostics, sn as PreviewLinkManager, vi as TeeAttestationResponse, vn as PromptResult, w as CommitTaskSessionOptions, x as CodeExecutionResult, xr as SandboxInfo, yn as ProvisionEvent, z as DispatchedSession, zi as TerminalStreamHandlers } from "./types-
|
|
1
|
+
import { $ as ExecResult, $r as SessionListOptions, $t as MintScopedTokenOptions, Ai as WriteFileOptions, At as GitStatus, Br as ScopedToken, Ci as TurnDriveResult, Cr as SandboxPortBinding, Dr as SandboxRuntimeHealth, Dt as GitCommit, Et as GitBranch, Fr as SandboxTraceBundle, H as DriveTurnOptions, Hn as SSHCredentials, Hr as SearchMatch, Ht as IntelligenceReport, Ii as TerminalStream, In as RolloutOptions, It as GpuLeaseManager, Ji as BackendType, Jr as SentSessionMessage, Jt as ListMessagesOptions, K as DurablePlan, Kn as SandboxEvent, Kr as SendSessionMessageOptions, Kt as IntelligenceReportWindow, Mi as WriteManyOptions, Mn as RestoreSnapshotOptions, N as CreateSessionOptions, Nn as ResumeOptions, Oi as WaitForOptions, Or as SandboxStatus, P as CreateTaskSessionOptions, Pn as Rollout, Pr as SandboxTerminals, Q as ExecOptions, Qr as SessionInfo, R as DispatchPromptOptions, Rn as RolloutStartResult, Rr as SandboxTraceOptions, S as CodeLanguage, T as CompletedTurnResult, Tr as SandboxResourceUsage, Ur as SearchOptions, Ut as IntelligenceReportBudget, Vn as SSHCommandDescriptor, Vt as InstalledTool, W as DriverInfo, Wn as SandboxConnection, Wt as IntelligenceReportCompareTo, X as EventStreamOptions, Xr as SessionEventStreamOptions, Zr as SessionForkOptions, _ as BranchOptions, _n as PromptOptions, ai as SnapshotResult, an as PermissionsManager, b as CodeExecutionOptions, bi as TeePublicKeyResponse, bn as ProvisionResult, di as TaskSessionChanges, dr as SandboxFleetTraceBundle, ei as SessionMessage, fi as TaskSessionCommitResult, fn as ProcessManager, ft as FileWriteResult, gi as TeeAttestationOptions, gn as PromptInputPart, ii as SnapshotOptions, ji as WriteManyFile, jt as GpuLease, ki as WaitForRolloutOptions, kr as SandboxTerminalAttachOptions, kt as GitDiff, l as BackendManager, mi as TaskSessionInfo, nn as NetworkManager, ot as FileSystem, q as EgressManager, qr as SendSessionMessageRequest, qt as JsonValue, ri as SnapshotInfo, s as BackendConfig, si as StartupDiagnostics, sn as PreviewLinkManager, vi as TeeAttestationResponse, vn as PromptResult, w as CommitTaskSessionOptions, x as CodeExecutionResult, xr as SandboxInfo, yn as ProvisionEvent, z as DispatchedSession, zi as TerminalStreamHandlers } from "./types-Qj4sIfZE.js";
|
|
2
2
|
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
3
3
|
|
|
4
4
|
//#region src/mcp.d.ts
|
|
@@ -1580,10 +1580,35 @@ declare class SandboxInstance {
|
|
|
1580
1580
|
* returns; reconnect via `box.session(id).events()` or wait for
|
|
1581
1581
|
* completion with `box.session(id).result()`.
|
|
1582
1582
|
*
|
|
1583
|
-
*
|
|
1584
|
-
*
|
|
1585
|
-
*
|
|
1586
|
-
*
|
|
1583
|
+
* Skips the dispatch only on positive evidence that this work is
|
|
1584
|
+
* already in flight or already finished — never on the mere existence
|
|
1585
|
+
* of a session with the same id:
|
|
1586
|
+
*
|
|
1587
|
+
* 1. The session is in flight — `running`, or `queued` with a
|
|
1588
|
+
* `latestExecutionId` — → a second dispatch would run two agents
|
|
1589
|
+
* against one session, so return the live status with
|
|
1590
|
+
* `dispatched: false`.
|
|
1591
|
+
* 2. `opts.turnId` is set and the completed-turn cache has it → the
|
|
1592
|
+
* turn already finished; return `dispatched: false`. This is the
|
|
1593
|
+
* only durable idempotency key, and it outlives the session (the
|
|
1594
|
+
* cache survives session eviction, see `findCompletedTurn`).
|
|
1595
|
+
*
|
|
1596
|
+
* Anything else dispatches. Two cases in particular:
|
|
1597
|
+
*
|
|
1598
|
+
* - A `queued` session with no `latestExecutionId` was created or
|
|
1599
|
+
* forked and has never run anything — the runtime writes exactly
|
|
1600
|
+
* that state on `POST /agents/sessions` and on fork, and sets
|
|
1601
|
+
* `latestExecutionId` at execution START. Refusing here would leave
|
|
1602
|
+
* a pre-created session permanently undispatchable.
|
|
1603
|
+
* - A terminal session is a finished conversation, and a new prompt
|
|
1604
|
+
* into it is a new turn, not a retry.
|
|
1605
|
+
*
|
|
1606
|
+
* A caller that needs a completed dispatch to stay a no-op across
|
|
1607
|
+
* retries MUST pass `turnId`; session existence cannot stand in for it,
|
|
1608
|
+
* because an evicted session makes the same retry dispatch anyway.
|
|
1609
|
+
*
|
|
1610
|
+
* Read `dispatched`, not `alreadyExisted`, to tell "the prompt ran"
|
|
1611
|
+
* from "we found prior work and did nothing".
|
|
1587
1612
|
*/
|
|
1588
1613
|
dispatchPrompt(message: string | PromptInputPart[], opts?: DispatchPromptOptions): Promise<DispatchedSession>;
|
|
1589
1614
|
/**
|
|
@@ -1640,8 +1665,9 @@ declare class SandboxInstance {
|
|
|
1640
1665
|
* `failed`.
|
|
1641
1666
|
* 3. The session is terminal without a cached turn → settle from the
|
|
1642
1667
|
* session result; an unsuccessful result is `failed`.
|
|
1643
|
-
* 4. No session exists
|
|
1644
|
-
* `
|
|
1668
|
+
* 4. No session exists, or one exists that was created/forked but never
|
|
1669
|
+
* ran (`queued` with no `latestExecutionId`) → dispatch
|
|
1670
|
+
* fire-and-detach → `running`.
|
|
1645
1671
|
*
|
|
1646
1672
|
* `failed` is always deterministic: re-invoking with the same ids
|
|
1647
1673
|
* returns the same outcome rather than starting a second agent run, so
|
package/dist/tangle/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TANGLE_JOBS_CONTRACT, c as AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-
|
|
1
|
+
import { a as TANGLE_JOBS_CONTRACT, c as AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-COEAR283.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient, TangleSandboxClientConfig };
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-
|
|
1
|
+
import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-Co7xFRJm.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as parseErrorResponse } from "./errors-D9fFOWX9.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-ClU3H3WT.js";
|
|
3
3
|
//#region src/tangle/abi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tangle Contract ABI Definitions
|
|
@@ -3187,10 +3187,11 @@ interface SessionEventStreamOptions {
|
|
|
3187
3187
|
* Options for `box.dispatchPrompt()` — fire-and-detach prompt semantics.
|
|
3188
3188
|
*/
|
|
3189
3189
|
interface DispatchPromptOptions extends PromptOptions {
|
|
3190
|
-
/** Client-supplied session id
|
|
3191
|
-
*
|
|
3192
|
-
*
|
|
3193
|
-
*
|
|
3190
|
+
/** Client-supplied session id. Re-dispatching with the same id while
|
|
3191
|
+
* that session is in flight is a lookup, not a second run — a
|
|
3192
|
+
* concurrency guard, not a retry key. Once the turn finishes (or if the
|
|
3193
|
+
* session was evicted) the same call dispatches again; pass `turnId` for
|
|
3194
|
+
* retry safety that outlives the turn. */
|
|
3194
3195
|
sessionId?: string;
|
|
3195
3196
|
}
|
|
3196
3197
|
/**
|
|
@@ -3287,9 +3288,16 @@ interface DispatchedSession {
|
|
|
3287
3288
|
sessionId: string;
|
|
3288
3289
|
/** Lifecycle state at the moment dispatch returned. */
|
|
3289
3290
|
status: SessionStatus;
|
|
3290
|
-
/** True when
|
|
3291
|
-
*
|
|
3291
|
+
/** True when a session with the supplied id already existed. On its own
|
|
3292
|
+
* this says nothing about whether the prompt ran — an existing terminal
|
|
3293
|
+
* session still accepts a new turn. Read `dispatched` for that. */
|
|
3292
3294
|
alreadyExisted: boolean;
|
|
3295
|
+
/** Whether this call actually dispatched the prompt. `false` means the
|
|
3296
|
+
* call was a no-op because the turn is already in flight (session
|
|
3297
|
+
* `queued`/`running`) or already finished (`turnId` hit the completed-
|
|
3298
|
+
* turn cache) — the prompt was deliberately not sent, and no new events
|
|
3299
|
+
* will appear on the session bus for it. */
|
|
3300
|
+
dispatched: boolean;
|
|
3293
3301
|
}
|
|
3294
3302
|
/**
|
|
3295
3303
|
* Options for `box.driveTurn()` — one settle/poll/dispatch pass over a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0-develop.20260727230202.7200886",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -127,9 +127,9 @@
|
|
|
127
127
|
"vitest": "^4.1.5",
|
|
128
128
|
"ws": "^8.20.0",
|
|
129
129
|
"yjs": "13.6.30",
|
|
130
|
+
"@tangle-network/cli-agent-registry": "0.3.1",
|
|
130
131
|
"@repo/shared": "0.0.0",
|
|
131
|
-
"@tangle-network/runtime-contracts": "0.3.
|
|
132
|
-
"@tangle-network/cli-agent-registry": "0.3.0"
|
|
132
|
+
"@tangle-network/runtime-contracts": "0.3.1"
|
|
133
133
|
},
|
|
134
134
|
"scripts": {
|
|
135
135
|
"build": "node scripts/build-dist.mjs",
|