@tangle-network/sandbox 0.19.5 → 0.19.6
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-CPSJHnNS.js → client-BdPiqRIx.js} +2 -2
- package/dist/{client-BCwkh2kj.d.ts → client-CTGhu52i.d.ts} +2 -2
- package/dist/core.d.ts +3 -3
- package/dist/core.js +2 -2
- package/dist/{index-CpRq1GR5.d.ts → index-4bmnN7LO.d.ts} +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +4 -4
- package/dist/{runtime-api-BQii48NT.js → runtime-api-RuvDrvUR.js} +6 -2
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/{sandbox-BEsoO8Ux.d.ts → sandbox-Cmm_WGUI.d.ts} +19 -4
- package/dist/{sandbox-DVwPvdG_.js → sandbox-XXX293yz.js} +149 -31
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-CNd36MoA.js → tangle-Ba2AIhaE.js} +1 -1
- package/dist/{types-C7mxmAil.d.ts → types-C2ZNhygk.d.ts} +12 -3
- package/package.json +1 -1
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-C2ZNhygk.js";
|
|
2
|
+
import { n as SandboxInstance } from "../sandbox-Cmm_WGUI.js";
|
|
3
|
+
import { i as Sandbox } from "../client-CTGhu52i.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,6 +1,6 @@
|
|
|
1
|
-
import { c as combineAbortSignals, d as applyRequestedModel, f as assertCurrentBackendType, l as encodePromptForWire, m as backendTypeSchema, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, u as encodeTextForWire } from "./runtime-api-
|
|
1
|
+
import { c as combineAbortSignals, d as applyRequestedModel, f as assertCurrentBackendType, l as encodePromptForWire, m as backendTypeSchema, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, u as encodeTextForWire } from "./runtime-api-RuvDrvUR.js";
|
|
2
2
|
import { a as NetworkError, f as TimeoutError, l as SandboxError, m as parseErrorResponse, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-Bf-A-4SA.js";
|
|
3
|
-
import { g as normalizeConnection, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, v as exportTraceBundle, x as parseSSEStream } from "./sandbox-
|
|
3
|
+
import { g as normalizeConnection, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, v as exportTraceBundle, x as parseSSEStream } from "./sandbox-XXX293yz.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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $n as SandboxFleetCostEstimate, $t as ListSandboxFleetOptions, A as CreateSandboxFleetTokenOptions, An as PublishPublicTemplateVersionOptions, Cr as SandboxFleetWorkspaceSnapshotResult, Ct as FleetExecDispatchResult, D as CreateIntelligenceReportOptions, Dn as PublicTemplateInfo, Et as FleetPromptDispatchResult, Gt as IntelligenceReport, Kt as IntelligenceReportBudget, M as CreateSandboxOptions, Mn as ReapExpiredSandboxFleetsResult, Nn as ReconcileSandboxFleetsOptions, O as CreateRequestOptions, Oi as TokenRefreshHandler, On as PublicTemplateVersionInfo, Pi as UsageInfo, Pn as ReconcileSandboxFleetsResult, Qn as SandboxFleetArtifactSpec, Sn as PromptResult, Sr as SandboxFleetWorkspaceRestoreResult, St as FleetExecDispatchOptions, Tr as SandboxInfo, Tt as FleetPromptDispatchOptions, Xi as BatchEvent, Yn as SandboxEnvironment, Yr as SecretsManager, Yt as IntelligenceReportWindow, Zn as SandboxFleetArtifact, _i as SubscriptionInfo, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, bn as PromptInputPart, bt as FleetDriveTurnOutcome, cr as SandboxFleetMachineRecord, en as ListSandboxOptions, f as BatchResult, fr as SandboxFleetOperationsSummary, gt as FleetDispatchCancelResult, hr as SandboxFleetTraceBundle, ir as SandboxFleetInfo, j as CreateSandboxFleetWithCoordinatorOptions, jn as ReapExpiredSandboxFleetsOptions, k as CreateSandboxFleetOptions, kn as PublishPublicTemplateOptions, m as BatchRunRequest, mr as SandboxFleetToken, nr as SandboxFleetDriverCapability, nt as ExecResult, p as BatchRunOptions, pi as SshKeysManager, qn as SandboxConfig, qt as IntelligenceReportCompareTo, tr as SandboxFleetDispatchResponse, tt as ExecOptions, ur as SandboxFleetManifest, vr as SandboxFleetTraceOptions, vt as FleetDispatchResultBufferOptions, wr as SandboxIdentity, wt as FleetMachineId, xn as PromptOptions, xr as SandboxFleetWorkspaceReconcileResult, xt as FleetDriveTurnRequest, yr as SandboxFleetUsage, yt as FleetDispatchStreamOptions } from "./types-
|
|
2
|
-
import { c as TraceExportResult, l as TraceExportSink, n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
1
|
+
import { $n as SandboxFleetCostEstimate, $t as ListSandboxFleetOptions, A as CreateSandboxFleetTokenOptions, An as PublishPublicTemplateVersionOptions, Cr as SandboxFleetWorkspaceSnapshotResult, Ct as FleetExecDispatchResult, D as CreateIntelligenceReportOptions, Dn as PublicTemplateInfo, Et as FleetPromptDispatchResult, Gt as IntelligenceReport, Kt as IntelligenceReportBudget, M as CreateSandboxOptions, Mn as ReapExpiredSandboxFleetsResult, Nn as ReconcileSandboxFleetsOptions, O as CreateRequestOptions, Oi as TokenRefreshHandler, On as PublicTemplateVersionInfo, Pi as UsageInfo, Pn as ReconcileSandboxFleetsResult, Qn as SandboxFleetArtifactSpec, Sn as PromptResult, Sr as SandboxFleetWorkspaceRestoreResult, St as FleetExecDispatchOptions, Tr as SandboxInfo, Tt as FleetPromptDispatchOptions, Xi as BatchEvent, Yn as SandboxEnvironment, Yr as SecretsManager, Yt as IntelligenceReportWindow, Zn as SandboxFleetArtifact, _i as SubscriptionInfo, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, bn as PromptInputPart, bt as FleetDriveTurnOutcome, cr as SandboxFleetMachineRecord, en as ListSandboxOptions, f as BatchResult, fr as SandboxFleetOperationsSummary, gt as FleetDispatchCancelResult, hr as SandboxFleetTraceBundle, ir as SandboxFleetInfo, j as CreateSandboxFleetWithCoordinatorOptions, jn as ReapExpiredSandboxFleetsOptions, k as CreateSandboxFleetOptions, kn as PublishPublicTemplateOptions, m as BatchRunRequest, mr as SandboxFleetToken, nr as SandboxFleetDriverCapability, nt as ExecResult, p as BatchRunOptions, pi as SshKeysManager, qn as SandboxConfig, qt as IntelligenceReportCompareTo, tr as SandboxFleetDispatchResponse, tt as ExecOptions, ur as SandboxFleetManifest, vr as SandboxFleetTraceOptions, vt as FleetDispatchResultBufferOptions, wr as SandboxIdentity, wt as FleetMachineId, xn as PromptOptions, xr as SandboxFleetWorkspaceReconcileResult, xt as FleetDriveTurnRequest, yr as SandboxFleetUsage, yt as FleetDispatchStreamOptions } from "./types-C2ZNhygk.js";
|
|
2
|
+
import { c as TraceExportResult, l as TraceExportSink, n as SandboxInstance, t as HttpClient } from "./sandbox-Cmm_WGUI.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sse-parser.d.ts
|
|
5
5
|
/**
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as CreateSandboxOptions, Mr as SandboxStatus, Tr as SandboxInfo, bn as PromptInputPart, dn as PreviewLinkWaitOptions, in as NetworkConfig, ln as PreviewLinkInfo, nt as ExecResult, qn as SandboxConfig, tt as ExecOptions, un as PreviewLinkManager } 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 { M as CreateSandboxOptions, Mr as SandboxStatus, Tr as SandboxInfo, bn as PromptInputPart, dn as PreviewLinkWaitOptions, in as NetworkConfig, ln as PreviewLinkInfo, nt as ExecResult, qn as SandboxConfig, tt as ExecOptions, un as PreviewLinkManager } from "./types-C2ZNhygk.js";
|
|
2
|
+
import { a as WorkspaceImagePublishResult, i as WorkspaceImagePublishRequestOptions, n as SandboxInstance, o as WorkspaceImages, r as WorkspaceImagePublishInput } from "./sandbox-Cmm_WGUI.js";
|
|
3
|
+
import { i as Sandbox } from "./client-CTGhu52i.js";
|
|
4
4
|
import { a as NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-Bdy5jXzc.js";
|
|
5
5
|
export { AuthError, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, FileWriteConflictError, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, 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 NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-Bf-A-4SA.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-BdPiqRIx.js";
|
|
3
|
+
import { i as WorkspaceImages, t as SandboxInstance } from "./sandbox-XXX293yz.js";
|
|
4
4
|
export { AuthError, CapabilityError, FileWriteConflictError, 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-C2ZNhygk.js";
|
|
2
|
+
import { n as SandboxInstance, t as HttpClient } from "./sandbox-Cmm_WGUI.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tangle/abi.d.ts
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $ as EventStreamOptions, $i as BatchTaskUsage, $n as SandboxFleetCostEstimate, $r as SessionBackendCredentials, $t as ListSandboxFleetOptions, Ai as TurnDriveResult, An as PublishPublicTemplateVersionOptions, Ar as SandboxResources, At as GitCommit, B as DownloadOptions, Bi as TERMINAL_WS_ECHO_SUBPROTOCOL, Bn as RolloutOptions, Br as SandboxTraceEvent, Bt as GpuLeaseProviderName, Ci as TeeAttestationOptions, Cn as ProvisionEvent, Cr as SandboxFleetWorkspaceSnapshotResult, D as CreateIntelligenceReportOptions, Di as TeePublicKeyResponse, Dn as PublicTemplateInfo, Dr as SandboxPortBinding, Dt as GPU_LEASE_PROVIDER_NAMES, E as CreateGpuLeaseOptions, Ei as TeePublicKey, En as ProvisionStep, Er as SandboxIntelligenceEnvelope, F as DeleteOptions, Fi as WaitForOptions, Fn as RenameOptions, Fr as SandboxTerminalInfo, Ft as GpuLeaseBilling, G as DriverType, Gi as TerminalStreamError, Gn as SSHCommandDescriptor, Gr as ScopedTokenScope, Gt as IntelligenceReport, H as DriveTurnOptions, Hi as TerminalReadyInfo, Hn as RolloutStartResult, Hr as SandboxTraceOptions, Ht as HostAgentDriverConfig, I as DevServerInfo, Ii as WaitForRolloutOptions, Ir as SandboxTerminalManager, It as GpuLeaseCommandResult, J as EffectiveBackendProfile, Ji as TerminalStreamToken, Jn as SandboxConnection, Jr as SecretInfo, Jt as IntelligenceReportSubjectType, Ki as TerminalStreamHandlers, Kn as SSHCredentials, Kr as SearchMatch, Kt as IntelligenceReportBudget, L as DirectoryPermission, Li as WriteFileOptions, Lr as SandboxTerminalRequestOptions, Lt as GpuLeaseExecOptions, M as CreateSandboxOptions, Mi as UploadOptions, Mn as ReapExpiredSandboxFleetsResult, Mr as SandboxStatus, Mt as GitDiff, N as CreateSessionOptions, Ni as UploadProgress, Nn as ReconcileSandboxFleetsOptions, Nr as SandboxTerminalAttachOptions, Nt as GitStatus, O as CreateRequestOptions, Oi as TokenRefreshHandler, On as PublicTemplateVersionInfo, Or as SandboxPortPreviewLink, Ot as GitAuth, P as CreateTaskSessionOptions, Pi as UsageInfo, Pn as ReconcileSandboxFleetsResult, Pr as SandboxTerminalCreateOptions, Pt as GpuLease, Q as EnsureDevServerOptions, Qi as BatchSidecarGroup, Qn as SandboxFleetArtifactSpec, Qr as SentSessionMessage, Qt as ListOptions, R as DispatchPromptOptions, Ri as WriteManyFile, Rn as Rollout, Rr as SandboxTerminals, Rt as GpuLeaseExecResult, Si as TaskSessionProfile, Sn as PromptResult, Sr as SandboxFleetWorkspaceRestoreResult, St as FleetExecDispatchOptions, T as CompletedTurnResult, Ti as TeeAttestationResponse, Tn as ProvisionStatus, Tr as SandboxInfo, Tt as FleetPromptDispatchOptions, U as DriverConfig, Ui as TerminalStream, Un as RolloutStatus, Ur as SandboxUser, Ut as HostAgentRuntimeBackend, V as DownloadProgress, Vi as TerminalExitInfo, Vn as RolloutScorer, Vr as SandboxTraceExport, Vt as GpuLeaseStatus, W as DriverInfo, Wi as TerminalStreamAuthFormat, Wn as RolloutTurnPart, Wr as ScopedToken, Wt as InstalledTool, X as EgressManager, Xi as BatchEvent, Xn as SandboxEvent, Xr as SendSessionMessageOptions, Y as EffectiveBackendSource, Yi as BatchBackendStats, Yn as SandboxEnvironment, Yr as SecretsManager, Yt as IntelligenceReportWindow, Z as EgressPolicy, Zi as BatchEventDataMap, Zn as SandboxFleetArtifact, Zr as SendSessionMessageRequest, Zt as ListMessagesOptions, _ as BranchOptions, _i as SubscriptionInfo, _n as ProcessSignal, _r as SandboxFleetTraceExport, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, ai as SessionListOptions, an as NetworkManager, ar as SandboxFleetIntelligenceEnvelope, at as FileReadBatchResult, bi as TaskSessionFileChange, bn as PromptInputPart, br as SandboxFleetWorkspace, bt as FleetDriveTurnOutcome, c as BackendInfo, ci as SessionResultOptions, cn as PermissionsManager, cr as SandboxFleetMachineRecord, ct as FileRenameResult, d as BatchBackend, di as SnapshotOptions, dn as PreviewLinkWaitOptions, dr as SandboxFleetManifestMachine, dt as FileTreeOptions, ea as PublicBatchRunRequest, ei as SessionEventStreamOptions, en as ListSandboxOptions, er as SandboxFleetDispatchFailureClass, et as ExactProcessSpawnOptions, f as BatchResult, fi as SnapshotResult, fn as Process, fr as SandboxFleetOperationsSummary, ft as FileTreeResult, g as BatchTaskResult, gi as StorageConfig, gn as ProcessManager, gr as SandboxFleetTraceEvent, gt as FleetDispatchCancelResult, h as BatchTask, hi as StartupOperation, hn as ProcessLogEntry, hr as SandboxFleetTraceBundle, ht as FileWriteResult, i as AttachGpuLeaseOptions, ii as SessionInterruptOptions, in as NetworkConfig, ir as SandboxFleetInfo, it as FileReadBatchOptions, j as CreateSandboxFleetWithCoordinatorOptions, ji as UpdateUserOptions, jn as ReapExpiredSandboxFleetsOptions, jr as SandboxRuntimeHealth, jt as GitConfig, k as CreateSandboxFleetOptions, ki as TokenUsage, kn as PublishPublicTemplateOptions, kr as SandboxResourceUsage, kt as GitBranch, l as BackendManager, li as SessionStatus, ln as PreviewLinkInfo, lr as SandboxFleetMachineSpec, lt as FileSystem, m as BatchRunRequest, mi as StartupDiagnostics, mn as ProcessListOptions, mr as SandboxFleetToken, mt as FileUsageResult, n as AccessPolicyRule, na as parseBackendType, ni as SessionForkOptions, nn as MintScopedTokenOptions, nr as SandboxFleetDriverCapability, nt as ExecResult, o as BackendCapabilities, oi as SessionMessage, on as NonHostAgentDriverConfig, or as SandboxFleetMachine, ot as FileReadError, p as BatchRunOptions, pn as ProcessInfo, pr as SandboxFleetPolicy, pt as FileUsageOptions, q as EffectiveBackend, qi as TerminalStreamOptions, qn as SandboxConfig, qr as SearchOptions, qt as IntelligenceReportCompareTo, r as AddUserOptions, ri as SessionInfo, rn as MkdirOptions, rr as SandboxFleetDriverTimings, rt as FileInfo, s as BackendConfig, si as SessionMessageInputPart, sn as PermissionLevel, sr as SandboxFleetMachineMeteredUsage, st as FileReadResult, t as AcceleratorKind, ta as BackendType, ti as SessionFailureReason, tn as McpServerConfig, tr as SandboxFleetDispatchResponse, tt as ExecOptions, u as BackendStatus, ui as SnapshotInfo, un as PreviewLinkManager, ur as SandboxFleetManifest, ut as FileTreeFile, v as ChunkedUploadOptions, vi as TaskSessionChanges, vn as ProcessSpawnOptions, vr as SandboxFleetTraceOptions, vt as FleetDispatchResultBufferOptions, w as CommitTaskSessionOptions, wi as TeeAttestationReport, wn as ProvisionResult, wr as SandboxIdentity, wt as FleetMachineId, xi as TaskSessionInfo, xn as PromptOptions, xr as SandboxFleetWorkspaceReconcileResult, xt as FleetDriveTurnRequest, y as ChunkedUploadResult, yi as TaskSessionCommitResult, yn as ProcessStatus, yr as SandboxFleetUsage, yt as FleetDispatchStreamOptions, z as DispatchedSession, zi as WriteManyOptions, zn as RolloutChildResult, zr as SandboxTraceBundle, zt as GpuLeaseManager } 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 EventStreamOptions, $i as BatchTaskUsage, $n as SandboxFleetCostEstimate, $r as SessionBackendCredentials, $t as ListSandboxFleetOptions, Ai as TurnDriveResult, An as PublishPublicTemplateVersionOptions, Ar as SandboxResources, At as GitCommit, B as DownloadOptions, Bi as TERMINAL_WS_ECHO_SUBPROTOCOL, Bn as RolloutOptions, Br as SandboxTraceEvent, Bt as GpuLeaseProviderName, Ci as TeeAttestationOptions, Cn as ProvisionEvent, Cr as SandboxFleetWorkspaceSnapshotResult, D as CreateIntelligenceReportOptions, Di as TeePublicKeyResponse, Dn as PublicTemplateInfo, Dr as SandboxPortBinding, Dt as GPU_LEASE_PROVIDER_NAMES, E as CreateGpuLeaseOptions, Ei as TeePublicKey, En as ProvisionStep, Er as SandboxIntelligenceEnvelope, F as DeleteOptions, Fi as WaitForOptions, Fn as RenameOptions, Fr as SandboxTerminalInfo, Ft as GpuLeaseBilling, G as DriverType, Gi as TerminalStreamError, Gn as SSHCommandDescriptor, Gr as ScopedTokenScope, Gt as IntelligenceReport, H as DriveTurnOptions, Hi as TerminalReadyInfo, Hn as RolloutStartResult, Hr as SandboxTraceOptions, Ht as HostAgentDriverConfig, I as DevServerInfo, Ii as WaitForRolloutOptions, Ir as SandboxTerminalManager, It as GpuLeaseCommandResult, J as EffectiveBackendProfile, Ji as TerminalStreamToken, Jn as SandboxConnection, Jr as SecretInfo, Jt as IntelligenceReportSubjectType, Ki as TerminalStreamHandlers, Kn as SSHCredentials, Kr as SearchMatch, Kt as IntelligenceReportBudget, L as DirectoryPermission, Li as WriteFileOptions, Lr as SandboxTerminalRequestOptions, Lt as GpuLeaseExecOptions, M as CreateSandboxOptions, Mi as UploadOptions, Mn as ReapExpiredSandboxFleetsResult, Mr as SandboxStatus, Mt as GitDiff, N as CreateSessionOptions, Ni as UploadProgress, Nn as ReconcileSandboxFleetsOptions, Nr as SandboxTerminalAttachOptions, Nt as GitStatus, O as CreateRequestOptions, Oi as TokenRefreshHandler, On as PublicTemplateVersionInfo, Or as SandboxPortPreviewLink, Ot as GitAuth, P as CreateTaskSessionOptions, Pi as UsageInfo, Pn as ReconcileSandboxFleetsResult, Pr as SandboxTerminalCreateOptions, Pt as GpuLease, Q as EnsureDevServerOptions, Qi as BatchSidecarGroup, Qn as SandboxFleetArtifactSpec, Qr as SentSessionMessage, Qt as ListOptions, R as DispatchPromptOptions, Ri as WriteManyFile, Rn as Rollout, Rr as SandboxTerminals, Rt as GpuLeaseExecResult, Si as TaskSessionProfile, Sn as PromptResult, Sr as SandboxFleetWorkspaceRestoreResult, St as FleetExecDispatchOptions, T as CompletedTurnResult, Ti as TeeAttestationResponse, Tn as ProvisionStatus, Tr as SandboxInfo, Tt as FleetPromptDispatchOptions, U as DriverConfig, Ui as TerminalStream, Un as RolloutStatus, Ur as SandboxUser, Ut as HostAgentRuntimeBackend, V as DownloadProgress, Vi as TerminalExitInfo, Vn as RolloutScorer, Vr as SandboxTraceExport, Vt as GpuLeaseStatus, W as DriverInfo, Wi as TerminalStreamAuthFormat, Wn as RolloutTurnPart, Wr as ScopedToken, Wt as InstalledTool, X as EgressManager, Xi as BatchEvent, Xn as SandboxEvent, Xr as SendSessionMessageOptions, Y as EffectiveBackendSource, Yi as BatchBackendStats, Yn as SandboxEnvironment, Yr as SecretsManager, Yt as IntelligenceReportWindow, Z as EgressPolicy, Zi as BatchEventDataMap, Zn as SandboxFleetArtifact, Zr as SendSessionMessageRequest, Zt as ListMessagesOptions, _ as BranchOptions, _i as SubscriptionInfo, _n as ProcessSignal, _r as SandboxFleetTraceExport, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, ai as SessionListOptions, an as NetworkManager, ar as SandboxFleetIntelligenceEnvelope, at as FileReadBatchResult, bi as TaskSessionFileChange, bn as PromptInputPart, br as SandboxFleetWorkspace, bt as FleetDriveTurnOutcome, c as BackendInfo, ci as SessionResultOptions, cn as PermissionsManager, cr as SandboxFleetMachineRecord, ct as FileRenameResult, d as BatchBackend, di as SnapshotOptions, dn as PreviewLinkWaitOptions, dr as SandboxFleetManifestMachine, dt as FileTreeOptions, ea as PublicBatchRunRequest, ei as SessionEventStreamOptions, en as ListSandboxOptions, er as SandboxFleetDispatchFailureClass, et as ExactProcessSpawnOptions, f as BatchResult, fi as SnapshotResult, fn as Process, fr as SandboxFleetOperationsSummary, ft as FileTreeResult, g as BatchTaskResult, gi as StorageConfig, gn as ProcessManager, gr as SandboxFleetTraceEvent, gt as FleetDispatchCancelResult, h as BatchTask, hi as StartupOperation, hn as ProcessLogEntry, hr as SandboxFleetTraceBundle, ht as FileWriteResult, i as AttachGpuLeaseOptions, ii as SessionInterruptOptions, in as NetworkConfig, ir as SandboxFleetInfo, it as FileReadBatchOptions, j as CreateSandboxFleetWithCoordinatorOptions, ji as UpdateUserOptions, jn as ReapExpiredSandboxFleetsOptions, jr as SandboxRuntimeHealth, jt as GitConfig, k as CreateSandboxFleetOptions, ki as TokenUsage, kn as PublishPublicTemplateOptions, kr as SandboxResourceUsage, kt as GitBranch, l as BackendManager, li as SessionStatus, ln as PreviewLinkInfo, lr as SandboxFleetMachineSpec, lt as FileSystem, m as BatchRunRequest, mi as StartupDiagnostics, mn as ProcessListOptions, mr as SandboxFleetToken, mt as FileUsageResult, n as AccessPolicyRule, na as parseBackendType, ni as SessionForkOptions, nn as MintScopedTokenOptions, nr as SandboxFleetDriverCapability, nt as ExecResult, o as BackendCapabilities, oi as SessionMessage, on as NonHostAgentDriverConfig, or as SandboxFleetMachine, ot as FileReadError, p as BatchRunOptions, pn as ProcessInfo, pr as SandboxFleetPolicy, pt as FileUsageOptions, q as EffectiveBackend, qi as TerminalStreamOptions, qn as SandboxConfig, qr as SearchOptions, qt as IntelligenceReportCompareTo, r as AddUserOptions, ri as SessionInfo, rn as MkdirOptions, rr as SandboxFleetDriverTimings, rt as FileInfo, s as BackendConfig, si as SessionMessageInputPart, sn as PermissionLevel, sr as SandboxFleetMachineMeteredUsage, st as FileReadResult, t as AcceleratorKind, ta as BackendType, ti as SessionFailureReason, tn as McpServerConfig, tr as SandboxFleetDispatchResponse, tt as ExecOptions, u as BackendStatus, ui as SnapshotInfo, un as PreviewLinkManager, ur as SandboxFleetManifest, ut as FileTreeFile, v as ChunkedUploadOptions, vi as TaskSessionChanges, vn as ProcessSpawnOptions, vr as SandboxFleetTraceOptions, vt as FleetDispatchResultBufferOptions, w as CommitTaskSessionOptions, wi as TeeAttestationReport, wn as ProvisionResult, wr as SandboxIdentity, wt as FleetMachineId, xi as TaskSessionInfo, xn as PromptOptions, xr as SandboxFleetWorkspaceReconcileResult, xt as FleetDriveTurnRequest, y as ChunkedUploadResult, yi as TaskSessionCommitResult, yn as ProcessStatus, yr as SandboxFleetUsage, yt as FleetDispatchStreamOptions, z as DispatchedSession, zi as WriteManyOptions, zn as RolloutChildResult, zr as SandboxTraceBundle, zt as GpuLeaseManager } from "./types-C2ZNhygk.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-Cmm_WGUI.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-CTGhu52i.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 NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, r as EgressProxyRecoveryError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-Bdy5jXzc.js";
|
|
7
|
-
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
7
|
+
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-4bmnN7LO.js";
|
|
8
8
|
import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
|
|
9
|
-
import { AgentProfile, AgentProfile as AgentProfile$1, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileConfigValue, AgentProfileConnection, AgentProfileFileMount, AgentProfileFileMount as AgentProfileFileMount$1, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePermissionValue, AgentProfilePrompt, AgentProfileResourceRef, AgentProfileResources, AgentProfileSecurityPolicy, AgentProfileValidationIssue, AgentProfileValidationResult, AgentSubagentProfile, Capability, SANDBOX_SIZE_PRESET_NAMES, SandboxSizePreset } from "@tangle-network/agent-interface";
|
|
9
|
+
import { AgentProfile, AgentProfile as AgentProfile$1, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileConfigValue, AgentProfileConnection, AgentProfileFileMount, AgentProfileFileMount as AgentProfileFileMount$1, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePermissionValue, AgentProfilePrompt, AgentProfileResourceRef, AgentProfileResources, AgentProfileSecurityPolicy, AgentProfileValidationIssue, AgentProfileValidationResult, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, AgentSubagentProfile, Capability, SANDBOX_SIZE_PRESET_NAMES, SandboxSizePreset } from "@tangle-network/agent-interface";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
|
|
12
12
|
//#region src/attestation-heartbeat.d.ts
|
|
@@ -4395,4 +4395,4 @@ interface RouterEvalMatrixCaseResult {
|
|
|
4395
4395
|
}
|
|
4396
4396
|
declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
|
|
4397
4397
|
//#endregion
|
|
4398
|
-
export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileSecurityPolicy, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchResult, type BatchResultAccumulator, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, type Capability, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DevServerInfo, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EffectiveBackend, type EffectiveBackendProfile, type EffectiveBackendSource, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EnsureDevServerOptions, type EventStreamOptions, type ExactProcessSpawnOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileRenameResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileUsageOptions, type FileUsageResult, FileWriteConflictError, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetDriveTurnOutcome, type FleetDriveTurnRequest, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAttachOptions, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InteractiveSessionStatus, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, type Process, type ProcessInfo, type ProcessListOptions, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptInputPart, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, type Rollout, type RolloutChildResult, type RolloutOptions, type RolloutScorer, type RolloutStartResult, type RolloutStatus, type RolloutTurnPart, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, Sandbox, type SandboxConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxIdentity, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeHealth, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalAttachOptions, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTerminals, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionBroadcastEvent, type SessionBroadcastResult, type SessionEventStreamOptions, type SessionFailureReason, type SessionForkOptions, type SessionInfo, type SessionInterruptOptions, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionResultOptions, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, type TerminalExitInfo, type TerminalReadyInfo, TerminalStream, type TerminalStreamAuthFormat, TerminalStreamError, type TerminalStreamHandlers, type TerminalStreamOptions, type TerminalStreamToken, TimeoutError, type TokenRefreshHandler, type TokenUsage, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createBatchResultAccumulator, createConfidentialSandbox, createManageSandboxesTool, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, isToolBearingEvent, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendType, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
|
|
4398
|
+
export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileSecurityPolicy, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentRunCancellationAcknowledgement, type AgentRunCancellationRequest, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchResult, type BatchResultAccumulator, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, type Capability, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DevServerInfo, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EffectiveBackend, type EffectiveBackendProfile, type EffectiveBackendSource, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EnsureDevServerOptions, type EventStreamOptions, type ExactProcessSpawnOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileRenameResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileUsageOptions, type FileUsageResult, FileWriteConflictError, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetDriveTurnOutcome, type FleetDriveTurnRequest, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAttachOptions, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InteractiveSessionStatus, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, type Process, type ProcessInfo, type ProcessListOptions, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptInputPart, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, type Rollout, type RolloutChildResult, type RolloutOptions, type RolloutScorer, type RolloutStartResult, type RolloutStatus, type RolloutTurnPart, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, Sandbox, type SandboxConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxIdentity, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeHealth, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalAttachOptions, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTerminals, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionBroadcastEvent, type SessionBroadcastResult, type SessionEventStreamOptions, type SessionFailureReason, type SessionForkOptions, type SessionInfo, type SessionInterruptOptions, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionResultOptions, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, type TerminalExitInfo, type TerminalReadyInfo, TerminalStream, type TerminalStreamAuthFormat, TerminalStreamError, type TerminalStreamHandlers, type TerminalStreamOptions, type TerminalStreamToken, TimeoutError, type TokenRefreshHandler, type TokenUsage, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createBatchResultAccumulator, createConfidentialSandbox, createManageSandboxesTool, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, isToolBearingEvent, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendType, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { h as parseBackendType, m as backendTypeSchema, p as normalizeRuntimeBackendConfig } from "./runtime-api-
|
|
1
|
+
import { h as parseBackendType, m as backendTypeSchema, p as normalizeRuntimeBackendConfig } from "./runtime-api-RuvDrvUR.js";
|
|
2
2
|
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, r as EgressProxyRecoveryError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-Bf-A-4SA.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 buildTraceExportPayload, a as TERMINAL_WS_ECHO_SUBPROTOCOL, b as toOtelJson, c as SandboxTaskSession, d as applySandboxEventText, f as collectAgentFinalMessageText, h as isToolBearingEvent, i as WorkspaceImages, l as SandboxSession, m as getSandboxEventText, o as TerminalStream, p as collectAgentResponseText, s as TerminalStreamError, t as SandboxInstance, u as InteractiveSessionHandle, v as exportTraceBundle, x as parseSSEStream, y as otelTraceIdForTangleTrace } 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-BdPiqRIx.js";
|
|
4
|
+
import { _ as buildTraceExportPayload, a as TERMINAL_WS_ECHO_SUBPROTOCOL, b as toOtelJson, c as SandboxTaskSession, d as applySandboxEventText, f as collectAgentFinalMessageText, h as isToolBearingEvent, i as WorkspaceImages, l as SandboxSession, m as getSandboxEventText, o as TerminalStream, p as collectAgentResponseText, s as TerminalStreamError, t as SandboxInstance, u as InteractiveSessionHandle, v as exportTraceBundle, x as parseSSEStream, y as otelTraceIdForTangleTrace } from "./sandbox-XXX293yz.js";
|
|
5
5
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-CVdLf_4n.js";
|
|
6
|
-
import { t as TangleSandboxClient } from "./tangle-
|
|
6
|
+
import { t as TangleSandboxClient } from "./tangle-Ba2AIhaE.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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as NetworkError, c as QuotaError, f as TimeoutError, l as SandboxError, m as parseErrorResponse, n as CapabilityError, p as ValidationError, u as ServerError } from "./errors-Bf-A-4SA.js";
|
|
2
|
-
import { agentProfileSchema, harnessTypeSchema } from "@tangle-network/agent-interface";
|
|
2
|
+
import { AgentExactRunControlRefSchema, agentProfileSchema, harnessTypeSchema } from "@tangle-network/agent-interface";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region ../../../packages/runtime-contracts/dist/backend-types.js
|
|
5
5
|
/**
|
|
@@ -797,6 +797,9 @@ function normalizeSessionInfo(raw) {
|
|
|
797
797
|
if (typeof id !== "string") return null;
|
|
798
798
|
const status = raw.status || "running";
|
|
799
799
|
const effectiveBackend = normalizeEffectiveBackend(raw.effectiveBackend);
|
|
800
|
+
const parsedRunControlRef = AgentExactRunControlRefSchema.safeParse(raw.runControlRef);
|
|
801
|
+
const latestExecutionId = typeof raw.latestExecutionId === "string" && raw.latestExecutionId.length > 0 ? raw.latestExecutionId : void 0;
|
|
802
|
+
const runControlRef = parsedRunControlRef.success && parsedRunControlRef.data.sessionId === id && (latestExecutionId === void 0 || parsedRunControlRef.data.executionId === latestExecutionId) ? parsedRunControlRef.data : void 0;
|
|
800
803
|
return {
|
|
801
804
|
id,
|
|
802
805
|
parentId: typeof raw.parentID === "string" ? raw.parentID : typeof raw.parentId === "string" ? raw.parentId : void 0,
|
|
@@ -809,7 +812,8 @@ function normalizeSessionInfo(raw) {
|
|
|
809
812
|
].includes(status) ? status : "running",
|
|
810
813
|
failureReason: normalizeSessionFailureReason(raw.failureReason),
|
|
811
814
|
activeExecutionId: typeof raw.activeExecutionId === "string" && raw.activeExecutionId.length > 0 ? raw.activeExecutionId : void 0,
|
|
812
|
-
latestExecutionId
|
|
815
|
+
latestExecutionId,
|
|
816
|
+
...runControlRef ? { runControlRef } : {},
|
|
813
817
|
backend: typeof raw.backendType === "string" ? raw.backendType : typeof raw.backend === "string" ? raw.backend : void 0,
|
|
814
818
|
effectiveBackend,
|
|
815
819
|
model: typeof raw.model === "string" ? raw.model : effectiveBackend?.model,
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dr as SandboxPortBinding, Fn as RenameOptions, Fr as SandboxTerminalInfo, Ir as SandboxTerminalManager, Li as WriteFileOptions, Lr as SandboxTerminalRequestOptions, N as CreateSessionOptions, Ni as UploadProgress, P as CreateTaskSessionOptions, Pr as SandboxTerminalCreateOptions, Qr as SentSessionMessage, Xr as SendSessionMessageOptions, Zr as SendSessionMessageRequest, Zt as ListMessagesOptions, at as FileReadBatchResult, ct as FileRenameResult, dt as FileTreeOptions, ft as FileTreeResult, ht as FileWriteResult, it as FileReadBatchOptions, jr as SandboxRuntimeHealth, mt as FileUsageResult, oi as SessionMessage, pt as FileUsageOptions, ri as SessionInfo, v as ChunkedUploadOptions, vi as TaskSessionChanges, w as CommitTaskSessionOptions, xi as TaskSessionInfo, y as ChunkedUploadResult, yi as TaskSessionCommitResult } from "./types-
|
|
1
|
+
import { Dr as SandboxPortBinding, Fn as RenameOptions, Fr as SandboxTerminalInfo, Ir as SandboxTerminalManager, Li as WriteFileOptions, Lr as SandboxTerminalRequestOptions, N as CreateSessionOptions, Ni as UploadProgress, P as CreateTaskSessionOptions, Pr as SandboxTerminalCreateOptions, Qr as SentSessionMessage, Xr as SendSessionMessageOptions, Zr as SendSessionMessageRequest, Zt as ListMessagesOptions, at as FileReadBatchResult, ct as FileRenameResult, dt as FileTreeOptions, ft as FileTreeResult, ht as FileWriteResult, it as FileReadBatchOptions, jr as SandboxRuntimeHealth, mt as FileUsageResult, oi as SessionMessage, pt as FileUsageOptions, ri as SessionInfo, v as ChunkedUploadOptions, vi as TaskSessionChanges, w as CommitTaskSessionOptions, xi as TaskSessionInfo, y as ChunkedUploadResult, yi as TaskSessionCommitResult } from "./types-C2ZNhygk.js";
|
|
2
2
|
import { a as NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-Bdy5jXzc.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/chunked-upload.d.ts
|
package/dist/runtime.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as uploadChunked, c as combineAbortSignals, t as SandboxRuntimeApi } from "./runtime-api-
|
|
1
|
+
import { a as uploadChunked, c as combineAbortSignals, t as SandboxRuntimeApi } from "./runtime-api-RuvDrvUR.js";
|
|
2
2
|
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-Bf-A-4SA.js";
|
|
3
3
|
//#region src/runtime-client.ts
|
|
4
4
|
const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as EventStreamOptions, Ai as TurnDriveResult, At as GitCommit, Bn as RolloutOptions, Ci as TeeAttestationOptions, Cn as ProvisionEvent, Di as TeePublicKeyResponse, Dr as SandboxPortBinding, Fi as WaitForOptions, Gn as SSHCommandDescriptor, Gt as IntelligenceReport, H as DriveTurnOptions, Hn as RolloutStartResult, Hr as SandboxTraceOptions, Ii as WaitForRolloutOptions, In as RestoreSnapshotOptions, Jn as SandboxConnection, K as DurablePlan, Ki as TerminalStreamHandlers, Kn as SSHCredentials, Kr as SearchMatch, Kt as IntelligenceReportBudget, Li as WriteFileOptions, Ln as ResumeOptions, Mr as SandboxStatus, Mt as GitDiff, N as CreateSessionOptions, Nr as SandboxTerminalAttachOptions, Nt as GitStatus, P as CreateTaskSessionOptions, Pt as GpuLease, Qr as SentSessionMessage, R as DispatchPromptOptions, Ri as WriteManyFile, Rn as Rollout, Rr as SandboxTerminals, S as CodeLanguage, Sn as PromptResult, T as CompletedTurnResult, Ti as TeeAttestationResponse, Tr as SandboxInfo, Ui as TerminalStream, W as DriverInfo, Wr as ScopedToken, Wt as InstalledTool, X as EgressManager, Xn as SandboxEvent, Xr as SendSessionMessageOptions, Xt as JsonValue, Yt as IntelligenceReportWindow, Zr as SendSessionMessageRequest, Zt as ListMessagesOptions, _ as BranchOptions, ai as SessionListOptions, an as NetworkManager, b as CodeExecutionOptions, bn as PromptInputPart, ci as SessionResultOptions, cn as PermissionsManager, di as SnapshotOptions, ei as SessionEventStreamOptions, fi as SnapshotResult, gn as ProcessManager, hr as SandboxFleetTraceBundle, ht as FileWriteResult, ii as SessionInterruptOptions, jr as SandboxRuntimeHealth, kr as SandboxResourceUsage, kt as GitBranch, l as BackendManager, lt as FileSystem, mi as StartupDiagnostics, ni as SessionForkOptions, nn as MintScopedTokenOptions, nt as ExecResult, oi as SessionMessage, qr as SearchOptions, qt as IntelligenceReportCompareTo, ri as SessionInfo, s as BackendConfig, ta as BackendType, tt as ExecOptions, ui as SnapshotInfo, un as PreviewLinkManager, vi as TaskSessionChanges, w as CommitTaskSessionOptions, wn as ProvisionResult, x as CodeExecutionResult, xi as TaskSessionInfo, xn as PromptOptions, yi as TaskSessionCommitResult, z as DispatchedSession, zi as WriteManyOptions, zr as SandboxTraceBundle, zt as GpuLeaseManager } from "./types-
|
|
2
|
-
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
1
|
+
import { $ as EventStreamOptions, Ai as TurnDriveResult, At as GitCommit, Bn as RolloutOptions, Ci as TeeAttestationOptions, Cn as ProvisionEvent, Di as TeePublicKeyResponse, Dr as SandboxPortBinding, Fi as WaitForOptions, Gn as SSHCommandDescriptor, Gt as IntelligenceReport, H as DriveTurnOptions, Hn as RolloutStartResult, Hr as SandboxTraceOptions, Ii as WaitForRolloutOptions, In as RestoreSnapshotOptions, Jn as SandboxConnection, K as DurablePlan, Ki as TerminalStreamHandlers, Kn as SSHCredentials, Kr as SearchMatch, Kt as IntelligenceReportBudget, Li as WriteFileOptions, Ln as ResumeOptions, Mr as SandboxStatus, Mt as GitDiff, N as CreateSessionOptions, Nr as SandboxTerminalAttachOptions, Nt as GitStatus, P as CreateTaskSessionOptions, Pt as GpuLease, Qr as SentSessionMessage, R as DispatchPromptOptions, Ri as WriteManyFile, Rn as Rollout, Rr as SandboxTerminals, S as CodeLanguage, Sn as PromptResult, T as CompletedTurnResult, Ti as TeeAttestationResponse, Tr as SandboxInfo, Ui as TerminalStream, W as DriverInfo, Wr as ScopedToken, Wt as InstalledTool, X as EgressManager, Xn as SandboxEvent, Xr as SendSessionMessageOptions, Xt as JsonValue, Yt as IntelligenceReportWindow, Zr as SendSessionMessageRequest, Zt as ListMessagesOptions, _ as BranchOptions, ai as SessionListOptions, an as NetworkManager, b as CodeExecutionOptions, bn as PromptInputPart, ci as SessionResultOptions, cn as PermissionsManager, di as SnapshotOptions, ei as SessionEventStreamOptions, fi as SnapshotResult, gn as ProcessManager, hr as SandboxFleetTraceBundle, ht as FileWriteResult, ii as SessionInterruptOptions, jr as SandboxRuntimeHealth, kr as SandboxResourceUsage, kt as GitBranch, l as BackendManager, lt as FileSystem, mi as StartupDiagnostics, ni as SessionForkOptions, nn as MintScopedTokenOptions, nt as ExecResult, oi as SessionMessage, qr as SearchOptions, qt as IntelligenceReportCompareTo, ri as SessionInfo, s as BackendConfig, ta as BackendType, tt as ExecOptions, ui as SnapshotInfo, un as PreviewLinkManager, vi as TaskSessionChanges, w as CommitTaskSessionOptions, wn as ProvisionResult, x as CodeExecutionResult, xi as TaskSessionInfo, xn as PromptOptions, yi as TaskSessionCommitResult, z as DispatchedSession, zi as WriteManyOptions, zr as SandboxTraceBundle, zt as GpuLeaseManager } from "./types-C2ZNhygk.js";
|
|
2
|
+
import { AgentProfile, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest } from "@tangle-network/agent-interface";
|
|
3
3
|
|
|
4
4
|
//#region src/mcp.d.ts
|
|
5
5
|
/**
|
|
@@ -302,6 +302,9 @@ interface SandboxSessionHost extends InteractiveSessionHost {
|
|
|
302
302
|
_sessionFork(id: string, opts?: SessionForkOptions): Promise<SessionInfo>;
|
|
303
303
|
_respondToPermission(id: string, permissionID: string, options: RespondToPermissionOptions): Promise<void>;
|
|
304
304
|
_interrupt(id: string, options?: SessionInterruptOptions): Promise<InterruptResult>;
|
|
305
|
+
_cancelRun(id: string, request: AgentRunCancellationRequest, options?: {
|
|
306
|
+
signal?: AbortSignal;
|
|
307
|
+
}): Promise<AgentRunCancellationAcknowledgement>;
|
|
305
308
|
_answerQuestion(id: string, answers: Record<string, string[]>): Promise<void>;
|
|
306
309
|
_currentPlan(id: string): Promise<DurablePlan | null>;
|
|
307
310
|
_decidePlan(id: string, planId: string, decision: {
|
|
@@ -336,8 +339,8 @@ declare class SandboxSession {
|
|
|
336
339
|
status(): Promise<SessionInfo | null>;
|
|
337
340
|
/**
|
|
338
341
|
* Stream events from this session as they arrive. With no `since`,
|
|
339
|
-
* starts at the live tail; with `since`, replays
|
|
340
|
-
*
|
|
342
|
+
* starts at the live tail; with `since`, replays strictly after that
|
|
343
|
+
* event id — useful for reconnect-after-disconnect flows.
|
|
341
344
|
*
|
|
342
345
|
* The async iterator terminates when the session reaches a terminal
|
|
343
346
|
* state (`completed`, `failed`, `cancelled`) and the corresponding
|
|
@@ -402,6 +405,14 @@ declare class SandboxSession {
|
|
|
402
405
|
* `{ cancelled: false }` when the selected execution is not running.
|
|
403
406
|
*/
|
|
404
407
|
interrupt(options?: SessionInterruptOptions): Promise<InterruptResult>;
|
|
408
|
+
/**
|
|
409
|
+
* Cancel one exact run through the durable operation contract. Reusing the
|
|
410
|
+
* same request after a lost response returns the sidecar's replayed
|
|
411
|
+
* acknowledgement instead of issuing a second cancellation.
|
|
412
|
+
*/
|
|
413
|
+
cancelRun(request: AgentRunCancellationRequest, options?: {
|
|
414
|
+
signal?: AbortSignal;
|
|
415
|
+
}): Promise<AgentRunCancellationAcknowledgement>;
|
|
405
416
|
/**
|
|
406
417
|
* Answer a question the agent asked via a question tool invocation. `answers`
|
|
407
418
|
* maps each question id to the selected option(s). Backend-agnostic: works
|
|
@@ -1739,6 +1750,10 @@ declare class SandboxInstance {
|
|
|
1739
1750
|
_respondToPermission(id: string, permissionID: string, options: RespondToPermissionOptions): Promise<void>;
|
|
1740
1751
|
/** @internal — invoked by SandboxSession.interrupt(). */
|
|
1741
1752
|
_interrupt(id: string, options?: SessionInterruptOptions): Promise<InterruptResult>;
|
|
1753
|
+
/** @internal — invoked by SandboxSession.cancelRun(). */
|
|
1754
|
+
_cancelRun(id: string, request: AgentRunCancellationRequest, options?: {
|
|
1755
|
+
signal?: AbortSignal;
|
|
1756
|
+
}): Promise<AgentRunCancellationAcknowledgement>;
|
|
1742
1757
|
/**
|
|
1743
1758
|
* @internal — invoked by SandboxSession.answer(). Resolves the session's
|
|
1744
1759
|
* outstanding question interaction and posts the answer through the
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { a as uploadChunked, c as combineAbortSignals, d as applyRequestedModel, f as assertCurrentBackendType, i as sessionHeaders, l as encodePromptForWire, n as normalizeSessionInfo, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, r as appendSessionIdQuery, t as SandboxRuntimeApi } from "./runtime-api-
|
|
1
|
+
import { a as uploadChunked, c as combineAbortSignals, d as applyRequestedModel, f as assertCurrentBackendType, i as sessionHeaders, l as encodePromptForWire, n as normalizeSessionInfo, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, r as appendSessionIdQuery, t as SandboxRuntimeApi } from "./runtime-api-RuvDrvUR.js";
|
|
2
2
|
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, l as SandboxError, m as parseErrorResponse, n as CapabilityError, o as NotFoundError, p as ValidationError, t as AuthError, u as ServerError } from "./errors-Bf-A-4SA.js";
|
|
3
|
+
import { AgentExactRunControlRefSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, agentRunCancellationAcknowledgementMatchesRequest, canonicalCandidateDigest } from "@tangle-network/agent-interface";
|
|
3
4
|
import { readTokenCostUsd, readTokenUsage } from "@tangle-network/agent-core";
|
|
4
5
|
//#region src/lib/sse-parser.ts
|
|
5
6
|
/**
|
|
@@ -337,6 +338,77 @@ function normalizeSshCredentials(raw) {
|
|
|
337
338
|
};
|
|
338
339
|
}
|
|
339
340
|
//#endregion
|
|
341
|
+
//#region src/completed-turn.ts
|
|
342
|
+
function invalidCompletedTurn(message) {
|
|
343
|
+
throw new ServerError(`Completed-turn lookup returned ${message}`, 502, {
|
|
344
|
+
origin: "runtime",
|
|
345
|
+
endpoint: "/messages/turns"
|
|
346
|
+
}, "INVALID_COMPLETED_TURN");
|
|
347
|
+
}
|
|
348
|
+
function parseCompletedTurnResult(value, expected) {
|
|
349
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) invalidCompletedTurn("a non-object record");
|
|
350
|
+
const record = value;
|
|
351
|
+
if (typeof record.turnId !== "string" || typeof record.sessionId !== "string" || typeof record.completedAt !== "string" || record.completedAt.length === 0 || record.result === null || typeof record.result !== "object" || Array.isArray(record.result)) invalidCompletedTurn("a malformed record");
|
|
352
|
+
if (record.turnId !== expected.turnId || record.sessionId !== expected.sessionId) invalidCompletedTurn("a record for another turn or session");
|
|
353
|
+
return {
|
|
354
|
+
turnId: record.turnId,
|
|
355
|
+
sessionId: record.sessionId,
|
|
356
|
+
completedAt: record.completedAt,
|
|
357
|
+
result: record.result
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region src/dispatch-run-control.ts
|
|
362
|
+
const DISPATCH_RUN_PROVIDER = "tangle-sandbox";
|
|
363
|
+
function generateRuntimeId(prefix) {
|
|
364
|
+
const crypto = globalThis.crypto;
|
|
365
|
+
if (crypto?.randomUUID) return `${prefix}-${crypto.randomUUID()}`;
|
|
366
|
+
if (crypto?.getRandomValues) {
|
|
367
|
+
const bytes = crypto.getRandomValues(new Uint8Array(16));
|
|
368
|
+
return `${prefix}-${Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
|
|
369
|
+
}
|
|
370
|
+
throw new ValidationError("Run identity generation requires global crypto");
|
|
371
|
+
}
|
|
372
|
+
function resolveDispatchRunIdentity(sandboxId, message, options) {
|
|
373
|
+
const sessionId = options?.sessionId ?? options?.runControlRef?.sessionId ?? generateRuntimeId("session");
|
|
374
|
+
const executionId = options?.executionId ?? options?.runControlRef?.executionId ?? generateRuntimeId("execution");
|
|
375
|
+
return {
|
|
376
|
+
sessionId,
|
|
377
|
+
executionId,
|
|
378
|
+
runControlRef: options?.runControlRef ?? {
|
|
379
|
+
runId: generateRuntimeId("run"),
|
|
380
|
+
provider: DISPATCH_RUN_PROVIDER,
|
|
381
|
+
environmentId: sandboxId,
|
|
382
|
+
sessionId,
|
|
383
|
+
executionId,
|
|
384
|
+
requestDigest: canonicalCandidateDigest({
|
|
385
|
+
message,
|
|
386
|
+
sessionId,
|
|
387
|
+
turnId: options?.turnId ?? null,
|
|
388
|
+
backend: options?.backend ?? null,
|
|
389
|
+
model: options?.model ?? null,
|
|
390
|
+
context: options?.context ?? null
|
|
391
|
+
})
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
function sameExactRunControlRef(left, right) {
|
|
396
|
+
return left.runId === right.runId && left.provider === right.provider && left.environmentId === right.environmentId && left.sessionId === right.sessionId && left.executionId === right.executionId && left.requestDigest === right.requestDigest;
|
|
397
|
+
}
|
|
398
|
+
function validateAcceptedDispatchRunRef(raw, expected, sandboxId, sessionId, executionId) {
|
|
399
|
+
const parsed = AgentExactRunControlRefSchema.safeParse(raw);
|
|
400
|
+
if (!parsed.success) throw new ServerError("Sandbox returned an invalid exact run reference on admission", 502, {
|
|
401
|
+
origin: "runtime",
|
|
402
|
+
endpoint: "/agents/run/stream"
|
|
403
|
+
});
|
|
404
|
+
const accepted = parsed.data;
|
|
405
|
+
if (accepted.environmentId !== sandboxId || accepted.sessionId !== sessionId || accepted.executionId !== executionId || !sameExactRunControlRef(accepted, expected)) throw new ServerError("Sandbox returned an exact run reference for another execution", 502, {
|
|
406
|
+
origin: "runtime",
|
|
407
|
+
endpoint: "/agents/run/stream"
|
|
408
|
+
});
|
|
409
|
+
return accepted;
|
|
410
|
+
}
|
|
411
|
+
//#endregion
|
|
340
412
|
//#region src/lib/agent-response-text.ts
|
|
341
413
|
/**
|
|
342
414
|
* Canonical extraction of an agent's response text from its sandbox event
|
|
@@ -610,29 +682,6 @@ var InteractiveSessionHandle = class {
|
|
|
610
682
|
//#endregion
|
|
611
683
|
//#region src/session.ts
|
|
612
684
|
/**
|
|
613
|
-
* SandboxSession — first-class noun for an agent session inside a sandbox.
|
|
614
|
-
*
|
|
615
|
-
* Closes Issue #913 Gap 3: today `sessionId` is a string passed into
|
|
616
|
-
* `prompt()` for resume; there is no way to inspect a session, list
|
|
617
|
-
* active sessions, or query state without re-running the prompt. Apps
|
|
618
|
-
* that fan out parallel research workers (the agent-builder Forge use
|
|
619
|
-
* case) end up shadowing all session state in their own database. This
|
|
620
|
-
* class makes the sandbox the source of truth — apps reduce their own
|
|
621
|
-
* tables to thin denormalizations for cross-sandbox queries.
|
|
622
|
-
*
|
|
623
|
-
* The class is a thin façade over the sidecar's `/agents/sessions/{id}`
|
|
624
|
-
* routes: `status` reads `GET /agents/sessions/{id}`, `events` opens an
|
|
625
|
-
* SSE stream against `/agents/events?sessionId=...` (with `since` for
|
|
626
|
-
* replay), `prompt` continues the session via `/agents/run/stream`,
|
|
627
|
-
* `interrupt` calls `/agents/sessions/{id}/abort` by default or the
|
|
628
|
-
* execution-scoped cancel route when an execution id is supplied. No new
|
|
629
|
-
* sidecar surface is required — every endpoint already exists.
|
|
630
|
-
*
|
|
631
|
-
* Construction is private to the SDK: get a Session from
|
|
632
|
-
* `box.session(id)` (lazy reference, no network) or `box.sessions(...)`
|
|
633
|
-
* (lister, single round-trip).
|
|
634
|
-
*/
|
|
635
|
-
/**
|
|
636
685
|
* A single agent session inside a sandbox. Created via
|
|
637
686
|
* `box.session(id)` — does not hit the network until a method is called.
|
|
638
687
|
*/
|
|
@@ -657,8 +706,8 @@ var SandboxSession = class SandboxSession {
|
|
|
657
706
|
}
|
|
658
707
|
/**
|
|
659
708
|
* Stream events from this session as they arrive. With no `since`,
|
|
660
|
-
* starts at the live tail; with `since`, replays
|
|
661
|
-
*
|
|
709
|
+
* starts at the live tail; with `since`, replays strictly after that
|
|
710
|
+
* event id — useful for reconnect-after-disconnect flows.
|
|
662
711
|
*
|
|
663
712
|
* The async iterator terminates when the session reaches a terminal
|
|
664
713
|
* state (`completed`, `failed`, `cancelled`) and the corresponding
|
|
@@ -751,6 +800,14 @@ var SandboxSession = class SandboxSession {
|
|
|
751
800
|
return options ? this.box._interrupt(this.id, options) : this.box._interrupt(this.id);
|
|
752
801
|
}
|
|
753
802
|
/**
|
|
803
|
+
* Cancel one exact run through the durable operation contract. Reusing the
|
|
804
|
+
* same request after a lost response returns the sidecar's replayed
|
|
805
|
+
* acknowledgement instead of issuing a second cancellation.
|
|
806
|
+
*/
|
|
807
|
+
async cancelRun(request, options) {
|
|
808
|
+
return this.box._cancelRun(this.id, request, options);
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
754
811
|
* Answer a question the agent asked via a question tool invocation. `answers`
|
|
755
812
|
* maps each question id to the selected option(s). Backend-agnostic: works
|
|
756
813
|
* with any backend that raises kind:"question" interactions — OpenCode
|
|
@@ -2605,6 +2662,9 @@ var SandboxInstance = class SandboxInstance {
|
|
|
2605
2662
|
*/
|
|
2606
2663
|
async *streamPromptInner(message, options, internal) {
|
|
2607
2664
|
if (options?.lastEventId && !options.executionId) throw new ValidationError("lastEventId requires executionId so the SDK can replay the correct execution", { executionId: "Required when lastEventId is set" });
|
|
2665
|
+
const runControlRef = options?.runControlRef ? AgentExactRunControlRefSchema.safeParse(options.runControlRef) : void 0;
|
|
2666
|
+
if (runControlRef && !runControlRef.success) throw new ValidationError("Invalid runControlRef", { runControlRef: runControlRef.error.message });
|
|
2667
|
+
if (runControlRef?.success && (runControlRef.data.environmentId !== this.id || runControlRef.data.sessionId !== options?.sessionId || runControlRef.data.executionId !== options?.executionId)) throw new ValidationError("runControlRef does not belong to this sandbox dispatch", { runControlRef: "environmentId, sessionId, and executionId must match the dispatch" });
|
|
2608
2668
|
await this.ensureRunning();
|
|
2609
2669
|
const timeoutMs = typeof options?.timeoutMs === "number" && options.timeoutMs > 0 ? options.timeoutMs : void 0;
|
|
2610
2670
|
const timeoutSignal = timeoutMs ? AbortSignal.timeout(timeoutMs) : void 0;
|
|
@@ -2664,6 +2724,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
2664
2724
|
body: JSON.stringify({
|
|
2665
2725
|
id: "default",
|
|
2666
2726
|
...options?.sessionId ? { sessionId: options.sessionId } : {},
|
|
2727
|
+
...runControlRef?.success ? { runControlRef: runControlRef.data } : {},
|
|
2667
2728
|
parts: encodePromptForWire(message),
|
|
2668
2729
|
turnId: options?.turnId,
|
|
2669
2730
|
metadata: options?.context,
|
|
@@ -5404,14 +5465,19 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5404
5465
|
};
|
|
5405
5466
|
}
|
|
5406
5467
|
}
|
|
5468
|
+
const identity = resolveDispatchRunIdentity(this.id, message, opts);
|
|
5407
5469
|
const ctrl = new AbortController();
|
|
5408
5470
|
const stream = this.streamPrompt(message, {
|
|
5409
5471
|
...opts,
|
|
5472
|
+
sessionId: identity.sessionId,
|
|
5473
|
+
executionId: identity.executionId,
|
|
5474
|
+
runControlRef: identity.runControlRef,
|
|
5410
5475
|
detach: true,
|
|
5411
5476
|
signal: ctrl.signal
|
|
5412
5477
|
});
|
|
5413
|
-
let resolvedSessionId =
|
|
5414
|
-
let resolvedExecutionId;
|
|
5478
|
+
let resolvedSessionId = identity.sessionId;
|
|
5479
|
+
let resolvedExecutionId = identity.executionId;
|
|
5480
|
+
let resolvedRunControlRef;
|
|
5415
5481
|
let admissionObserved = false;
|
|
5416
5482
|
let dispatchError;
|
|
5417
5483
|
try {
|
|
@@ -5424,6 +5490,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5424
5490
|
if (typeof executionId === "string" && executionId.length > 0) resolvedExecutionId = executionId;
|
|
5425
5491
|
if (typeof id === "string" && id.length > 0) resolvedSessionId = id;
|
|
5426
5492
|
admissionObserved = Boolean(resolvedSessionId && resolvedExecutionId);
|
|
5493
|
+
if (data?.runControlRef !== void 0) resolvedRunControlRef = validateAcceptedDispatchRunRef(data.runControlRef, identity.runControlRef, this.id, resolvedSessionId ?? identity.sessionId, resolvedExecutionId ?? identity.executionId);
|
|
5427
5494
|
}
|
|
5428
5495
|
if (admissionObserved || event.type === "result" || event.type === "done") break;
|
|
5429
5496
|
}
|
|
@@ -5431,9 +5498,14 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5431
5498
|
ctrl.abort();
|
|
5432
5499
|
}
|
|
5433
5500
|
if (!admissionObserved || !resolvedSessionId || !resolvedExecutionId) throw new ServerError(dispatchError ?? "dispatchPrompt did not receive an execution admission from the sandbox");
|
|
5501
|
+
if (!resolvedRunControlRef) throw new ServerError("Sandbox admission did not return the exact run reference", 502, {
|
|
5502
|
+
origin: "runtime",
|
|
5503
|
+
endpoint: "/agents/run/stream"
|
|
5504
|
+
});
|
|
5434
5505
|
return {
|
|
5435
5506
|
sessionId: resolvedSessionId,
|
|
5436
5507
|
...resolvedExecutionId ? { executionId: resolvedExecutionId } : {},
|
|
5508
|
+
runControlRef: resolvedRunControlRef,
|
|
5437
5509
|
status: "running",
|
|
5438
5510
|
alreadyExisted: existing !== null,
|
|
5439
5511
|
dispatched: true
|
|
@@ -5510,13 +5582,20 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5510
5582
|
*/
|
|
5511
5583
|
async findCompletedTurn(turnId, opts) {
|
|
5512
5584
|
await this.ensureRunning();
|
|
5513
|
-
const
|
|
5514
|
-
|
|
5585
|
+
const query = new URLSearchParams({
|
|
5586
|
+
turnId,
|
|
5587
|
+
sessionId: opts.sessionId
|
|
5588
|
+
});
|
|
5589
|
+
const response = await this.runtimeFetch(`/messages/turns?${query.toString()}`, { method: "GET" });
|
|
5590
|
+
if (response.status === 204) return null;
|
|
5515
5591
|
if (!response.ok) {
|
|
5516
5592
|
const body = await response.text();
|
|
5517
5593
|
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
5518
5594
|
}
|
|
5519
|
-
return await response.json()
|
|
5595
|
+
return parseCompletedTurnResult(await response.json(), {
|
|
5596
|
+
turnId,
|
|
5597
|
+
sessionId: opts.sessionId
|
|
5598
|
+
});
|
|
5520
5599
|
}
|
|
5521
5600
|
/**
|
|
5522
5601
|
* Drive a detached turn forward by exactly one settle → poll → dispatch
|
|
@@ -5928,6 +6007,45 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5928
6007
|
const json = await response.json();
|
|
5929
6008
|
return { cancelled: options?.executionId ? json.success === true : json.data?.cancelled === true };
|
|
5930
6009
|
}
|
|
6010
|
+
/** @internal — invoked by SandboxSession.cancelRun(). */
|
|
6011
|
+
async _cancelRun(id, request, options) {
|
|
6012
|
+
options?.signal?.throwIfAborted();
|
|
6013
|
+
const parsedRequest = AgentRunCancellationRequestSchema.safeParse(request);
|
|
6014
|
+
if (!parsedRequest.success) throw new ValidationError("Invalid run cancellation request", { requestDigest: parsedRequest.error.message });
|
|
6015
|
+
if (parsedRequest.data.run.sessionId !== id) throw new ValidationError("Cancellation request does not belong to this session", { "run.sessionId": `Expected ${id}` });
|
|
6016
|
+
if (parsedRequest.data.run.environmentId !== this.id) throw new ValidationError("Cancellation request does not belong to this sandbox", { "run.environmentId": `Expected ${this.id}` });
|
|
6017
|
+
await this.ensureRunning();
|
|
6018
|
+
options?.signal?.throwIfAborted();
|
|
6019
|
+
const response = await this.runtimeFetch("/agents/run/cancel", {
|
|
6020
|
+
method: "POST",
|
|
6021
|
+
headers: { "content-type": "application/json" },
|
|
6022
|
+
body: JSON.stringify(parsedRequest.data),
|
|
6023
|
+
...options?.signal === void 0 ? {} : { signal: options.signal }
|
|
6024
|
+
});
|
|
6025
|
+
const body = await response.text();
|
|
6026
|
+
if (response.ok || response.status === 409) {
|
|
6027
|
+
let raw;
|
|
6028
|
+
try {
|
|
6029
|
+
raw = JSON.parse(body);
|
|
6030
|
+
} catch {
|
|
6031
|
+
throw new ServerError("Sidecar returned an invalid cancellation acknowledgement", response.status, {
|
|
6032
|
+
origin: "runtime",
|
|
6033
|
+
endpoint: "/agents/run/cancel"
|
|
6034
|
+
});
|
|
6035
|
+
}
|
|
6036
|
+
const acknowledgement = AgentRunCancellationAcknowledgementSchema.safeParse(raw);
|
|
6037
|
+
if (!acknowledgement.success) throw new ServerError("Sidecar returned an invalid cancellation acknowledgement", response.status, {
|
|
6038
|
+
origin: "runtime",
|
|
6039
|
+
endpoint: "/agents/run/cancel"
|
|
6040
|
+
});
|
|
6041
|
+
if (!agentRunCancellationAcknowledgementMatchesRequest(parsedRequest.data, acknowledgement.data)) throw new ServerError("Sidecar returned a cancellation acknowledgement for another request", response.status, {
|
|
6042
|
+
origin: "runtime",
|
|
6043
|
+
endpoint: "/agents/run/cancel"
|
|
6044
|
+
});
|
|
6045
|
+
return acknowledgement.data;
|
|
6046
|
+
}
|
|
6047
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
6048
|
+
}
|
|
5931
6049
|
/**
|
|
5932
6050
|
* @internal — invoked by SandboxSession.answer(). Resolves the session's
|
|
5933
6051
|
* outstanding question interaction and posts the answer through the
|
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-4bmnN7LO.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-Ba2AIhaE.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 { m as parseErrorResponse } from "./errors-Bf-A-4SA.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-XXX293yz.js";
|
|
3
3
|
//#region src/tangle/abi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tangle Contract ABI Definitions
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentProfile, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileValidationResult, HarnessType, ReasoningEffort } from "@tangle-network/agent-interface";
|
|
1
|
+
import { AgentExactRunControlRef, AgentProfile, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileValidationResult, HarnessType, ReasoningEffort } from "@tangle-network/agent-interface";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region ../../../packages/runtime-contracts/dist/backend-types.d.ts
|
|
@@ -2651,6 +2651,12 @@ interface PromptOptions {
|
|
|
2651
2651
|
timeoutMs?: number;
|
|
2652
2652
|
/** Additional context */
|
|
2653
2653
|
context?: Record<string, unknown>;
|
|
2654
|
+
/**
|
|
2655
|
+
* Exact run identity bound to this first dispatch. The runtime stores this
|
|
2656
|
+
* reference with the live execution so delayed control operations cannot
|
|
2657
|
+
* target a newer run that reused the same execution id.
|
|
2658
|
+
*/
|
|
2659
|
+
runControlRef?: AgentExactRunControlRef;
|
|
2654
2660
|
/** Fail chat-like runs that finish with no text or renderable interaction. */
|
|
2655
2661
|
requireVisibleAssistantOutput?: boolean;
|
|
2656
2662
|
/** AbortSignal for cancellation */
|
|
@@ -3144,6 +3150,8 @@ interface SessionInfo {
|
|
|
3144
3150
|
activeExecutionId?: string;
|
|
3145
3151
|
/** Most recent execution id, retained after completion for event replay. */
|
|
3146
3152
|
latestExecutionId?: string;
|
|
3153
|
+
/** Exact identity of the latest admitted run, retained for canonical control. */
|
|
3154
|
+
runControlRef?: AgentExactRunControlRef;
|
|
3147
3155
|
/** Backend identifier (e.g. provider name). */
|
|
3148
3156
|
backend?: string;
|
|
3149
3157
|
/** Provider/model selected after request normalization and environment fallback. */
|
|
@@ -3311,8 +3319,7 @@ interface TaskSessionCommitResult {
|
|
|
3311
3319
|
* Options for `SandboxSession.events()` streaming.
|
|
3312
3320
|
*/
|
|
3313
3321
|
interface SessionEventStreamOptions {
|
|
3314
|
-
/** Replay
|
|
3315
|
-
* the live tail. Useful for reconnect-after-disconnect flows. */
|
|
3322
|
+
/** Replay strictly after this event id. Omit to start at the live tail. */
|
|
3316
3323
|
since?: string;
|
|
3317
3324
|
/** Restrict replay to one execution within the session. Required with
|
|
3318
3325
|
* `since` when attaching after a server-dispatched turn has already begun. */
|
|
@@ -3445,6 +3452,8 @@ interface DispatchedSession {
|
|
|
3445
3452
|
sessionId: string;
|
|
3446
3453
|
/** Runtime execution id when the admission event supplied one. */
|
|
3447
3454
|
executionId?: string;
|
|
3455
|
+
/** Exact run identity accepted by the runtime for canonical cancellation. */
|
|
3456
|
+
runControlRef?: AgentExactRunControlRef;
|
|
3448
3457
|
/** Lifecycle state at the moment dispatch returned. */
|
|
3449
3458
|
status: SessionStatus;
|
|
3450
3459
|
/** True when a session with the supplied id already existed. On its own
|
package/package.json
CHANGED