@tangle-network/sandbox 0.14.0-develop.20260727203948.0397c1c → 0.14.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/agent/index.d.ts +3 -3
- package/dist/{client-Cf4yrjD6.d.ts → client-CGQnn2gj.d.ts} +2 -2
- package/dist/{client-Dj9pI8pq.js → client-Cv_z3tRq.js} +1 -1
- package/dist/core.d.ts +3 -3
- package/dist/core.js +2 -2
- package/dist/{index-COEAR283.d.ts → index-DC_39G_I.d.ts} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/runtime.d.ts +1 -1
- package/dist/{sandbox-ClU3H3WT.js → sandbox-Bvt_WexG.js} +12 -57
- package/dist/{sandbox-Dcrcg3A1.d.ts → sandbox-Ceeti101.d.ts} +7 -33
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-Co7xFRJm.js → tangle-Bf2HbxKL.js} +1 -1
- package/dist/{types-Qj4sIfZE.d.ts → types-Dr1wNaqo.d.ts} +6 -14
- 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-Dr1wNaqo.js";
|
|
2
|
+
import { n as SandboxInstance } from "../sandbox-Ceeti101.js";
|
|
3
|
+
import { i as Sandbox } from "../client-CGQnn2gj.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-Dr1wNaqo.js";
|
|
2
|
+
import { c as TraceExportResult, l as TraceExportSink, n as SandboxInstance, t as HttpClient } from "./sandbox-Ceeti101.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-Bvt_WexG.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-Dr1wNaqo.js";
|
|
2
|
+
import { a as WorkspaceImagePublishResult, i as WorkspaceImagePublishRequestOptions, n as SandboxInstance, o as WorkspaceImages, r as WorkspaceImagePublishInput } from "./sandbox-Ceeti101.js";
|
|
3
|
+
import { i as Sandbox } from "./client-CGQnn2gj.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-Cv_z3tRq.js";
|
|
3
|
+
import { i as WorkspaceImages, t as SandboxInstance } from "./sandbox-Bvt_WexG.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-Dr1wNaqo.js";
|
|
2
|
+
import { n as SandboxInstance, t as HttpClient } from "./sandbox-Ceeti101.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-Dr1wNaqo.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-Ceeti101.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-CGQnn2gj.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-DC_39G_I.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-Cv_z3tRq.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-Bvt_WexG.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-Bf2HbxKL.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/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-Dr1wNaqo.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,55 +4980,20 @@ 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
|
-
*
|
|
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".
|
|
4983
|
+
* Idempotent on `opts.sessionId`: re-dispatching with the same id when
|
|
4984
|
+
* the session is already running is a lookup, not a re-create. This
|
|
4985
|
+
* lets queue retries and reconnect-after-Worker-restart be safe by
|
|
4986
|
+
* construction.
|
|
5012
4987
|
*/
|
|
5013
4988
|
async dispatchPrompt(message, opts) {
|
|
5014
4989
|
await this.ensureRunning();
|
|
5015
|
-
let existing = null;
|
|
5016
4990
|
if (opts?.sessionId) {
|
|
5017
|
-
existing = await this._sessionStatus(opts.sessionId);
|
|
5018
|
-
if (existing
|
|
4991
|
+
const existing = await this._sessionStatus(opts.sessionId);
|
|
4992
|
+
if (existing) return {
|
|
5019
4993
|
sessionId: existing.id,
|
|
5020
4994
|
status: existing.status,
|
|
5021
|
-
alreadyExisted: true
|
|
5022
|
-
dispatched: false
|
|
4995
|
+
alreadyExisted: true
|
|
5023
4996
|
};
|
|
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
|
-
}
|
|
5032
4997
|
}
|
|
5033
4998
|
const ctrl = new AbortController();
|
|
5034
4999
|
const stream = this.streamPrompt(message, {
|
|
@@ -5052,8 +5017,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5052
5017
|
return {
|
|
5053
5018
|
sessionId: resolvedSessionId,
|
|
5054
5019
|
status: "running",
|
|
5055
|
-
alreadyExisted:
|
|
5056
|
-
dispatched: true
|
|
5020
|
+
alreadyExisted: false
|
|
5057
5021
|
};
|
|
5058
5022
|
}
|
|
5059
5023
|
/**
|
|
@@ -5152,9 +5116,8 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5152
5116
|
* `failed`.
|
|
5153
5117
|
* 3. The session is terminal without a cached turn → settle from the
|
|
5154
5118
|
* session result; an unsuccessful result is `failed`.
|
|
5155
|
-
* 4. No session exists
|
|
5156
|
-
*
|
|
5157
|
-
* fire-and-detach → `running`.
|
|
5119
|
+
* 4. No session exists → dispatch fire-and-detach (idempotent on
|
|
5120
|
+
* `sessionId`, exactly like `dispatchPrompt`) → `running`.
|
|
5158
5121
|
*
|
|
5159
5122
|
* `failed` is always deterministic: re-invoking with the same ids
|
|
5160
5123
|
* returns the same outcome rather than starting a second agent run, so
|
|
@@ -5165,8 +5128,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5165
5128
|
const turn = await this.findCompletedTurn(turnId, { sessionId: opts.sessionId });
|
|
5166
5129
|
if (turn) return settleTurnDrive(turn.result);
|
|
5167
5130
|
const info = await this._sessionStatus(opts.sessionId);
|
|
5168
|
-
|
|
5169
|
-
if (info && isSessionInFlight(info)) {
|
|
5131
|
+
if (info && (info.status === "running" || info.status === "queued")) {
|
|
5170
5132
|
const startedAt = info.startedAt ?? info.createdAt;
|
|
5171
5133
|
const elapsedMs = startedAt ? Date.now() - startedAt.getTime() : void 0;
|
|
5172
5134
|
if (opts.wallCapMs !== void 0 && elapsedMs !== void 0 && elapsedMs > opts.wallCapMs) {
|
|
@@ -5182,7 +5144,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5182
5144
|
...elapsedMs !== void 0 ? { elapsedMs } : {}
|
|
5183
5145
|
};
|
|
5184
5146
|
}
|
|
5185
|
-
if (info
|
|
5147
|
+
if (info) {
|
|
5186
5148
|
if (!info.latestExecutionId) return {
|
|
5187
5149
|
state: "failed",
|
|
5188
5150
|
error: `session ${opts.sessionId} ${info.status}: no execution result is available`
|
|
@@ -5586,13 +5548,6 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5586
5548
|
return decoded.plan;
|
|
5587
5549
|
}
|
|
5588
5550
|
};
|
|
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
|
-
}
|
|
5596
5551
|
function settleTurnDrive(result) {
|
|
5597
5552
|
const plan = readAwaitingPlan(result);
|
|
5598
5553
|
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-Dr1wNaqo.js";
|
|
2
2
|
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
3
3
|
|
|
4
4
|
//#region src/mcp.d.ts
|
|
@@ -1580,35 +1580,10 @@ 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
|
-
*
|
|
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".
|
|
1583
|
+
* Idempotent on `opts.sessionId`: re-dispatching with the same id when
|
|
1584
|
+
* the session is already running is a lookup, not a re-create. This
|
|
1585
|
+
* lets queue retries and reconnect-after-Worker-restart be safe by
|
|
1586
|
+
* construction.
|
|
1612
1587
|
*/
|
|
1613
1588
|
dispatchPrompt(message: string | PromptInputPart[], opts?: DispatchPromptOptions): Promise<DispatchedSession>;
|
|
1614
1589
|
/**
|
|
@@ -1665,9 +1640,8 @@ declare class SandboxInstance {
|
|
|
1665
1640
|
* `failed`.
|
|
1666
1641
|
* 3. The session is terminal without a cached turn → settle from the
|
|
1667
1642
|
* session result; an unsuccessful result is `failed`.
|
|
1668
|
-
* 4. No session exists
|
|
1669
|
-
*
|
|
1670
|
-
* fire-and-detach → `running`.
|
|
1643
|
+
* 4. No session exists → dispatch fire-and-detach (idempotent on
|
|
1644
|
+
* `sessionId`, exactly like `dispatchPrompt`) → `running`.
|
|
1671
1645
|
*
|
|
1672
1646
|
* `failed` is always deterministic: re-invoking with the same ids
|
|
1673
1647
|
* 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-DC_39G_I.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-Bf2HbxKL.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-Bvt_WexG.js";
|
|
3
3
|
//#region src/tangle/abi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tangle Contract ABI Definitions
|
|
@@ -3187,11 +3187,10 @@ 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. Re-dispatching with
|
|
3191
|
-
*
|
|
3192
|
-
*
|
|
3193
|
-
*
|
|
3194
|
-
* retry safety that outlives the turn. */
|
|
3190
|
+
/** Client-supplied session id for idempotency. Re-dispatching with
|
|
3191
|
+
* the same id while the session is running is a lookup, not a
|
|
3192
|
+
* re-create. Lets queue retries and reconnect-after-restart be safe
|
|
3193
|
+
* by construction. */
|
|
3195
3194
|
sessionId?: string;
|
|
3196
3195
|
}
|
|
3197
3196
|
/**
|
|
@@ -3288,16 +3287,9 @@ interface DispatchedSession {
|
|
|
3288
3287
|
sessionId: string;
|
|
3289
3288
|
/** Lifecycle state at the moment dispatch returned. */
|
|
3290
3289
|
status: SessionStatus;
|
|
3291
|
-
/** True when
|
|
3292
|
-
*
|
|
3293
|
-
* session still accepts a new turn. Read `dispatched` for that. */
|
|
3290
|
+
/** True when an existing session with the supplied id was found and
|
|
3291
|
+
* dispatch was a no-op (idempotency). */
|
|
3294
3292
|
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;
|
|
3301
3293
|
}
|
|
3302
3294
|
/**
|
|
3303
3295
|
* 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.14.0
|
|
3
|
+
"version": "0.14.0",
|
|
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",
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
"ws": "^8.20.0",
|
|
129
129
|
"yjs": "13.6.30",
|
|
130
130
|
"@repo/shared": "0.0.0",
|
|
131
|
-
"@tangle-network/
|
|
132
|
-
"@tangle-network/
|
|
131
|
+
"@tangle-network/runtime-contracts": "0.3.0",
|
|
132
|
+
"@tangle-network/cli-agent-registry": "0.3.0"
|
|
133
133
|
},
|
|
134
134
|
"scripts": {
|
|
135
135
|
"build": "node scripts/build-dist.mjs",
|