@tangle-network/sandbox 0.36.4 → 0.37.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/agent/index.js +3 -3
- package/dist/{agent-run-outcome-C0T6t4zn.d.ts → agent-run-outcome-kV5PiK7G.d.ts} +1 -1
- package/dist/{client-DG0Pwadv.js → client-BbKA0oQY.js} +2 -2
- package/dist/{client-C-f9U8O4.d.ts → client-otBwUOrK.d.ts} +2 -2
- package/dist/core.d.ts +3 -3
- package/dist/core.js +2 -2
- package/dist/{index-DcWLZb5F.d.ts → index-CDuBQOYX.d.ts} +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/{runtime-api-ClXF8k_q.js → runtime-api-BcLo4lBU.js} +2 -1
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +1 -1
- package/dist/{sandbox-BK6WNRtc.d.ts → sandbox-BhuWwk-8.d.ts} +6 -6
- package/dist/{sandbox--QhO618M.js → sandbox-CVj0AN5M.js} +46 -34
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-CaYKcNaS.js → tangle-BfNXEx5D.js} +1 -1
- package/dist/{types-B00bLoQR.d.ts → types-CnnhgS8s.d.ts} +22 -15
- package/package.json +3 -3
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-
|
|
2
|
-
import { D as CodeExecutionResult, E as CodeExecutionOptions, O as CodeLanguage, Si as SessionListOptions, bi as SessionInfo, d as BackendConfig, k as CodeResultPart } from "../types-
|
|
3
|
-
import { i as Sandbox } from "../client-
|
|
1
|
+
import { g as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-BhuWwk-8.js";
|
|
2
|
+
import { D as CodeExecutionResult, E as CodeExecutionOptions, O as CodeLanguage, Si as SessionListOptions, bi as SessionInfo, d as BackendConfig, k as CodeResultPart } from "../types-CnnhgS8s.js";
|
|
3
|
+
import { i as Sandbox } from "../client-otBwUOrK.js";
|
|
4
4
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
5
5
|
|
|
6
6
|
//#region src/agent/instances.d.ts
|
package/dist/agent/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as assertCurrentBackendType } from "../runtime-api-
|
|
1
|
+
import { f as assertCurrentBackendType } from "../runtime-api-BcLo4lBU.js";
|
|
2
2
|
import { d as StateError, o as NotFoundError, p as ValidationError } from "../errors-C6kn-3zt.js";
|
|
3
|
-
import { n as Sandbox } from "../client-
|
|
4
|
-
import { t as SandboxInstance } from "../sandbox
|
|
3
|
+
import { n as Sandbox } from "../client-BbKA0oQY.js";
|
|
4
|
+
import { t as SandboxInstance } from "../sandbox-CVj0AN5M.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
//#region src/agent/instances.ts
|
|
7
7
|
const managers = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AgentQuestionRequest, et as DurablePlanSnapshot, fr as SandboxEvent, i as AgentApprovalRequirement, o as AgentRunStatus, s as AgentToolInvocation } from "./types-
|
|
1
|
+
import { a as AgentQuestionRequest, et as DurablePlanSnapshot, fr as SandboxEvent, i as AgentApprovalRequirement, o as AgentRunStatus, s as AgentToolInvocation } from "./types-CnnhgS8s.js";
|
|
2
2
|
import { InteractionRequest } from "@tangle-network/agent-interface";
|
|
3
3
|
|
|
4
4
|
//#region src/agent-run-outcome.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as backendTypeSchema, c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, l as encodeTextForWire, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, u as parseSSEStream } from "./runtime-api-
|
|
1
|
+
import { _ as backendTypeSchema, c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, l as encodeTextForWire, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, u as parseSSEStream } from "./runtime-api-BcLo4lBU.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-C6kn-3zt.js";
|
|
3
3
|
import { n as combineAbortSignals } from "./abort-signal-si1WMfJb.js";
|
|
4
|
-
import { E as normalizeConnection, O as exportTraceBundle, b as requestInteractiveSessionToken, i as normalizeStartupDiagnostics, n as createSandboxInstanceFromResponse, r as normalizeSandboxCreateReceipt } from "./sandbox
|
|
4
|
+
import { E as normalizeConnection, O as exportTraceBundle, b as requestInteractiveSessionToken, i as normalizeStartupDiagnostics, n as createSandboxInstanceFromResponse, r as normalizeSandboxCreateReceipt } from "./sandbox-CVj0AN5M.js";
|
|
5
5
|
import { agentProfileSchema } from "@tangle-network/agent-interface";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/backend-registry.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-
|
|
1
|
+
import { l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-BhuWwk-8.js";
|
|
2
2
|
import { l as ScopedToken, s as MintInteractiveSessionTokenOptions } from "./terminal-stream-5GNLCsms.js";
|
|
3
|
-
import { Ar as SandboxFleetToken, At as FleetDriveTurnRequest, Bn as PublicTemplateVersionInfo, Br as SandboxIdentity, Dt as FleetDispatchResultBufferOptions, Er as SandboxFleetManifest, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fr as SandboxFleetUsage, Ft as FleetPromptDispatchResult, Gn as ReconcileSandboxFleetsOptions, Hn as PublishPublicTemplateVersionOptions, I as CreateSandboxFleetTokenOptions, Ji as TokenRefreshHandler, Kn as ReconcileSandboxFleetsResult, L as CreateSandboxFleetWithCoordinatorOptions, Li as SubscriptionInfo, Lr as SandboxFleetWorkspaceReconcileResult, Mn as PromptInputPart, Mt as FleetExecDispatchResult, N as CreateIntelligenceReportOptions, Ni as SshKeysManager, Nn as PromptOptions, Nt as FleetMachineId, Or as SandboxFleetOperationsSummary, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pn as PromptResult, Pr as SandboxFleetTraceOptions, Pt as FleetPromptDispatchOptions, R as CreateSandboxOptions, Rr as SandboxFleetWorkspaceRestoreResult, Tt as FleetDispatchCancelResult, Un as ReapExpiredSandboxFleetsOptions, Vn as PublishPublicTemplateOptions, Vr as SandboxInfo, Wn as ReapExpiredSandboxFleetsResult, _r as SandboxFleetDispatchResponse, an as IntelligenceReportCompareTo, ar as SandboxConfig, b as BatchRunRequest, br as SandboxFleetInfo, ca as BatchEvent, dn as ListSandboxFleetOptions, dr as SandboxEnvironment, dt as ExecResult, ea as UsageInfo, fn as ListSandboxOptions, hr as SandboxFleetCostEstimate, in as IntelligenceReportBudget, jr as SandboxFleetTraceBundle, jt as FleetExecDispatchOptions, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, mr as SandboxFleetArtifactSpec, pr as SandboxFleetArtifact, rn as IntelligenceReport, sn as IntelligenceReportWindow, ui as SecretsManager, ut as ExecOptions, v as BatchResult, vr as SandboxFleetDriverCapability, wr as SandboxFleetMachineRecord, y as BatchRunOptions, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceSnapshotResult } from "./types-
|
|
3
|
+
import { Ar as SandboxFleetToken, At as FleetDriveTurnRequest, Bn as PublicTemplateVersionInfo, Br as SandboxIdentity, Dt as FleetDispatchResultBufferOptions, Er as SandboxFleetManifest, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fr as SandboxFleetUsage, Ft as FleetPromptDispatchResult, Gn as ReconcileSandboxFleetsOptions, Hn as PublishPublicTemplateVersionOptions, I as CreateSandboxFleetTokenOptions, Ji as TokenRefreshHandler, Kn as ReconcileSandboxFleetsResult, L as CreateSandboxFleetWithCoordinatorOptions, Li as SubscriptionInfo, Lr as SandboxFleetWorkspaceReconcileResult, Mn as PromptInputPart, Mt as FleetExecDispatchResult, N as CreateIntelligenceReportOptions, Ni as SshKeysManager, Nn as PromptOptions, Nt as FleetMachineId, Or as SandboxFleetOperationsSummary, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pn as PromptResult, Pr as SandboxFleetTraceOptions, Pt as FleetPromptDispatchOptions, R as CreateSandboxOptions, Rr as SandboxFleetWorkspaceRestoreResult, Tt as FleetDispatchCancelResult, Un as ReapExpiredSandboxFleetsOptions, Vn as PublishPublicTemplateOptions, Vr as SandboxInfo, Wn as ReapExpiredSandboxFleetsResult, _r as SandboxFleetDispatchResponse, an as IntelligenceReportCompareTo, ar as SandboxConfig, b as BatchRunRequest, br as SandboxFleetInfo, ca as BatchEvent, dn as ListSandboxFleetOptions, dr as SandboxEnvironment, dt as ExecResult, ea as UsageInfo, fn as ListSandboxOptions, hr as SandboxFleetCostEstimate, in as IntelligenceReportBudget, jr as SandboxFleetTraceBundle, jt as FleetExecDispatchOptions, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, mr as SandboxFleetArtifactSpec, pr as SandboxFleetArtifact, rn as IntelligenceReport, sn as IntelligenceReportWindow, ui as SecretsManager, ut as ExecOptions, v as BatchResult, vr as SandboxFleetDriverCapability, wr as SandboxFleetMachineRecord, y as BatchRunOptions, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceSnapshotResult } from "./types-CnnhgS8s.js";
|
|
4
4
|
import { AgentInteractiveSessionRef } from "@tangle-network/agent-interface";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-
|
|
2
|
-
import { Cn as PreviewLinkWaitOptions, Mn as PromptInputPart, R as CreateSandboxOptions, Sn as PreviewLinkManager, Vr as SandboxInfo, Yr as SandboxStatus, ar as SandboxConfig, dt as ExecResult, gn as NetworkConfig, ut as ExecOptions, xn as PreviewLinkInfo } from "./types-
|
|
3
|
-
import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, b as backendRegistryEntrySchema, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-
|
|
1
|
+
import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-BhuWwk-8.js";
|
|
2
|
+
import { Cn as PreviewLinkWaitOptions, Mn as PromptInputPart, R as CreateSandboxOptions, Sn as PreviewLinkManager, Vr as SandboxInfo, Yr as SandboxStatus, ar as SandboxConfig, dt as ExecResult, gn as NetworkConfig, ut as ExecOptions, xn as PreviewLinkInfo } from "./types-CnnhgS8s.js";
|
|
3
|
+
import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, b as backendRegistryEntrySchema, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-otBwUOrK.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-CQOvGddH.js";
|
|
5
5
|
export { AuthError, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, 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, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, isBackendRegistryInteractionKind, parseBackendRegistryResponse, parseBackendRegistryResponseBody };
|
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-C6kn-3zt.js";
|
|
2
|
-
import { _ as parseBackendRegistryResponse, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-
|
|
3
|
-
import { a as WorkspaceImages, t as SandboxInstance } from "./sandbox
|
|
2
|
+
import { _ as parseBackendRegistryResponse, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-BbKA0oQY.js";
|
|
3
|
+
import { a as WorkspaceImages, t as SandboxInstance } from "./sandbox-CVj0AN5M.js";
|
|
4
4
|
export { AuthError, CapabilityError, FileWriteConflictError, NetworkError, NotFoundError, PartialFailureError, QuotaError, Sandbox, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, isBackendRegistryInteractionKind, parseBackendRegistryResponse, parseBackendRegistryResponseBody };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as HttpClient, r as SandboxInstance } from "./sandbox-
|
|
2
|
-
import { R as CreateSandboxOptions } from "./types-
|
|
1
|
+
import { n as HttpClient, r as SandboxInstance } from "./sandbox-BhuWwk-8.js";
|
|
2
|
+
import { R as CreateSandboxOptions } from "./types-CnnhgS8s.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tangle/abi.d.ts
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $ as SandboxMcpEndpoint, A as InterruptResult, B as InteractiveAttachRequest, C as InteractiveSessionHost, D as InteractiveSessionStartOptions, E as InteractiveSessionRef, F as InteractiveTerminalMetadata, G as SandboxInteractionConflict, H as InteractiveSessionControllerOptions, I as createInteractiveTerminalCapture, J as BuildControlPlaneMcpConfigOptions, K as SandboxInteractionResolution, L as createInteractiveTerminalSession, M as agentInteractiveSessionPromptRequestDigest, N as InteractiveTerminalCapture, O as InteractiveSessionStartResult, P as InteractiveTerminalFrameLog, Q as SandboxMcpConfig, R as BrowserInteractiveSessionController, S as InteractiveSessionHandleOptions, T as InteractiveSessionInfo, U as InteractiveSessionControllerTransport, V as InteractiveSessionController, W as SandboxInteractionCommandResult, X as CONTROL_PLANE_MCP_SERVER_NAME, Y as BuildSandboxMcpConfigOptions, Z as SANDBOX_MCP_SERVER_NAME, _ as AgentInteractiveTerminalSession, a as WorkspaceImagePublishRequestOptions, b as InteractiveSessionControlClaim, c as TraceExportFormat, d as buildTraceExportPayload, et as SandboxMcpServerEntry, f as exportTraceBundle, g as SandboxSession, h as SandboxTaskSession, i as WorkspaceImagePublishInput, j as RespondToPermissionOptions, k as InteractiveStopCommand, l as TraceExportResult, m as toOtelJson, nt as buildSandboxMcpConfig, o as WorkspaceImagePublishResult, p as otelTraceIdForTangleTrace, q as SandboxInteractionResult, r as SandboxInstance, s as WorkspaceImages, t as ForkAcknowledgement, tt as buildControlPlaneMcpConfig, u as TraceExportSink, v as InteractiveControlClaimRequest, w as InteractiveSessionIncarnationId, x as InteractiveSessionHandle, y as InteractivePromptCommand, z as BrowserInteractiveSessionControllerOptions } from "./sandbox-
|
|
1
|
+
import { $ as SandboxMcpEndpoint, A as InterruptResult, B as InteractiveAttachRequest, C as InteractiveSessionHost, D as InteractiveSessionStartOptions, E as InteractiveSessionRef, F as InteractiveTerminalMetadata, G as SandboxInteractionConflict, H as InteractiveSessionControllerOptions, I as createInteractiveTerminalCapture, J as BuildControlPlaneMcpConfigOptions, K as SandboxInteractionResolution, L as createInteractiveTerminalSession, M as agentInteractiveSessionPromptRequestDigest, N as InteractiveTerminalCapture, O as InteractiveSessionStartResult, P as InteractiveTerminalFrameLog, Q as SandboxMcpConfig, R as BrowserInteractiveSessionController, S as InteractiveSessionHandleOptions, T as InteractiveSessionInfo, U as InteractiveSessionControllerTransport, V as InteractiveSessionController, W as SandboxInteractionCommandResult, X as CONTROL_PLANE_MCP_SERVER_NAME, Y as BuildSandboxMcpConfigOptions, Z as SANDBOX_MCP_SERVER_NAME, _ as AgentInteractiveTerminalSession, a as WorkspaceImagePublishRequestOptions, b as InteractiveSessionControlClaim, c as TraceExportFormat, d as buildTraceExportPayload, et as SandboxMcpServerEntry, f as exportTraceBundle, g as SandboxSession, h as SandboxTaskSession, i as WorkspaceImagePublishInput, j as RespondToPermissionOptions, k as InteractiveStopCommand, l as TraceExportResult, m as toOtelJson, nt as buildSandboxMcpConfig, o as WorkspaceImagePublishResult, p as otelTraceIdForTangleTrace, q as SandboxInteractionResult, r as SandboxInstance, s as WorkspaceImages, t as ForkAcknowledgement, tt as buildControlPlaneMcpConfig, u as TraceExportSink, v as InteractiveControlClaimRequest, w as InteractiveSessionIncarnationId, x as InteractiveSessionHandle, y as InteractivePromptCommand, z as BrowserInteractiveSessionControllerOptions } from "./sandbox-BhuWwk-8.js";
|
|
2
2
|
import { c as MintScopedTokenOptions, d as TERMINAL_WS_ECHO_SUBPROTOCOL, f as TerminalExitInfo, g as TerminalStreamAuthFormat, h as TerminalReadyInfo, i as TerminalStreamOptions, l as ScopedToken, m as TerminalOutputMessage, n as TerminalStreamError, o as TerminalStreamToken, p as TerminalInteractiveSessionIdentity, r as TerminalStreamHandlers, s as MintInteractiveSessionTokenOptions, t as TerminalStream, u as ScopedTokenScope } from "./terminal-stream-5GNLCsms.js";
|
|
3
3
|
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as InteractiveAttachOptions, f as InteractiveControlClaimAcknowledgement, h as InteractiveSessionStatus, i as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as createInteractiveControlHolderId, m as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimOptions, r as browserInteractiveControlHolderId, s as InteractiveSessionControlTransport, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-lRfzpg9t.js";
|
|
4
|
-
import { $ as DurablePlanDecisionResult, $i as UploadProgress, $n as RolloutScorer, $r as SandboxTerminalManager, $t as GpuLeaseStatus, A as CommitTaskSessionOptions, Ai as SnapshotInfo, An as ProcessSpawnOptions, Ar as SandboxFleetToken, At as FleetDriveTurnRequest, B as CreateTaskSessionOptions, Bi as TaskSessionFileChange, Bn as PublicTemplateVersionInfo, Br as SandboxIdentity, Bt as GitAuth, C as BranchOptions, Ci as SessionMessage, Cn as PreviewLinkWaitOptions, Cr as SandboxFleetMachineMeteredUsage, Ct as FileUsageResult, Di as SnapshotDeleteAcknowledgement, Dn as ProcessLogEntry, Dr as SandboxFleetManifestMachine, Dt as FleetDispatchResultBufferOptions, Ei as SessionStatus, En as ProcessListOptions, Er as SandboxFleetManifest, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fi as StartupOperation, Fn as ProvisionEvent, Fr as SandboxFleetUsage, G as DispatchedSession, Gi as TeeAttestationResponse, Gn as ReconcileSandboxFleetsOptions, Gr as SandboxResourceUsage, Gt as GitStatus, H as DevServerInfo, Hi as TaskSessionProfile, Hn as PublishPublicTemplateVersionOptions, Hr as SandboxIntelligenceEnvelope, Ht as GitCommit, Ii as StorageConfig, In as ProvisionResult, Ir as SandboxFleetWorkspace, It as ForkCounts, J as DriveTurnOptions, Ji as TokenRefreshHandler, Jr as SandboxRuntimeHealth, Jt as GpuLeaseCommandResult, K as DownloadOptions, Ki as TeePublicKey, Kn as ReconcileSandboxFleetsResult, Kr as SandboxResources, Kt as GpuLease, L as CreateSandboxFleetWithCoordinatorOptions, Li as SubscriptionInfo, Ln as ProvisionStatus, Lr as SandboxFleetWorkspaceReconcileResult, Lt as ForkIdempotency, M as CreateGpuLeaseOptions, Mi as SnapshotResult, Mn as PromptInputPart, Mr as SandboxFleetTraceEvent, N as CreateIntelligenceReportOptions, Nn as PromptOptions, Nr as SandboxFleetTraceExport, Nt as FleetMachineId, Oi as SnapshotDeleteOutcome, On as ProcessManager, Or as SandboxFleetOperationsSummary, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pi as StartupDiagnostics, Pn as PromptResult, Pr as SandboxFleetTraceOptions, Pt as FleetPromptDispatchOptions, Q as DurablePlan, Qi as UploadOptions, Qn as RolloutOptions, Qr as SandboxTerminalInfo, Qt as GpuLeaseProviderName, R as CreateSandboxOptions, Ri as TaskSessionChanges, Rn as ProvisionStep, Rr as SandboxFleetWorkspaceRestoreResult, Rt as ForkLookupOptions, S as BatchTaskResult, Si as SessionListOptions, Sn as PreviewLinkManager, Sr as SandboxFleetMachine, St as FileUsageOptions, T as ChunkedUploadResult, Ti as SessionResultOptions, Tn as ProcessInfo, Tr as SandboxFleetMachineSpec, Tt as FleetDispatchCancelResult, U as DirectoryPermission, Ui as TeeAttestationOptions, Un as ReapExpiredSandboxFleetsOptions, Ur as SandboxPortBinding, Ut as GitConfig, V as DeleteOptions, Vi as TaskSessionInfo, Vn as PublishPublicTemplateOptions, Vr as SandboxInfo, Vt as GitBranch, W as DispatchPromptOptions, Wi as TeeAttestationReport, Wn as ReapExpiredSandboxFleetsResult, Wr as SandboxPortPreviewLink, Wt as GitDiff, X as DriverInfo, Xi as TurnDriveResult, Xn as Rollout, Xr as SandboxTerminalAttachOptions, Xt as GpuLeaseExecResult, Y as DriverConfig, Yi as TokenUsage, Yr as SandboxStatus, Yt as GpuLeaseExecOptions, Z as DriverType, Zi as UpdateUserOptions, Zn as RolloutChildResult, Zr as SandboxTerminalCreateOptions, Zt as GpuLeaseManager, _ as BatchBackend, _i as SessionExecutionStatus, _n as NetworkManager, _r as SandboxFleetDispatchResponse, _t as FileRenameResult, aa as WriteManyFile, ai as SandboxTraceOptions, an as IntelligenceReportCompareTo, ar as SandboxConfig, at as EgressManager, b as BatchRunRequest, bi as SessionInfo, bn as PermissionsManager, br as SandboxFleetInfo, bt as FileTreeOptions, c as AttachGpuLeaseOptions, ca as BatchEvent, ci as SearchOptions, cr as SandboxCreateReceipt, ct as EventStreamOptions, d as BackendConfig, da as BatchTaskUsage, di as SendSessionMessageOptions, dn as ListSandboxFleetOptions, dr as SandboxEnvironment, dt as ExecResult, ea as UsageInfo, ei as SandboxTerminalRequestOptions, en as HostAgentDriverConfig, er as RolloutStartResult, f as BackendInfo, fa as PublicBatchRunRequest, fi as SendSessionMessageRequest, fn as ListSandboxOptions, fr as SandboxEvent, ft as FileInfo, g as BackendStatus, gi as SessionExecutionInfo, gn as NetworkConfig, gr as SandboxFleetDispatchFailureClass, gt as FileReadResult, h as BackendRuntimeConfigUpdate, hi as SessionEventStreamOptions, hn as MkdirOptions, hr as SandboxFleetCostEstimate, ht as FileReadError, ia as WriteFileOptions, ii as SandboxTraceExport, in as IntelligenceReportBudget, ir as SSHCredentials, it as EgressDenial, j as CompletedTurnResult, ji as SnapshotOptions, jn as ProcessStatus, jr as SandboxFleetTraceBundle, jt as FleetExecDispatchOptions, ki as SnapshotIdempotency, kn as ProcessSignal, kr as SandboxFleetPolicy, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, la as BatchEventDataMap, li as SecretInfo, ln as ListMessagesOptions, lr as SandboxDeleteAcknowledgement, lt as ExactProcessSpawnOptions, m as BackendMcpServerStatus, ma as parseBackendType, mi as SessionBackendCredentials, mn as McpServerConfig, mr as SandboxFleetArtifactSpec, mt as FileReadBatchResult, n as AccessPolicyRule, na as WaitForRolloutOptions, ni as SandboxTraceBundle, nn as InstalledTool, nr as RolloutTurnPart, nt as EffectiveBackendProfile, oa as WriteManyOptions, oi as SandboxUser, on as IntelligenceReportSubjectType, or as SandboxConnection, ot as EgressPolicy, p as BackendManager, pa as BackendType, pi as SentSessionMessage, pn as MAX_EGRESS_DENIALS_LIMIT, pr as SandboxFleetArtifact, pt as FileReadBatchOptions, q as DownloadProgress, qi as TeePublicKeyResponse, qn as RenameOptions, qr as SandboxRuntimeCapabilities, qt as GpuLeaseBilling, r as AddUserOptions, ra as WorkspaceOperationLookup, ri as SandboxTraceEvent, rn as IntelligenceReport, rr as SSHCommandDescriptor, rt as EffectiveBackendSource, sa as BatchBackendStats, si as SearchMatch, sn as IntelligenceReportWindow, sr as SandboxCreateOutcome, st as EnsureDevServerOptions, t as AcceleratorKind, ta as WaitForOptions, ti as SandboxTerminals, tn as HostAgentRuntimeBackend, tr as RolloutStatus, tt as EffectiveBackend, u as BackendCapabilities, ua as BatchSidecarGroup, ui as SecretsManager, un as ListOptions, ur as SandboxDeleteOutcome, ut as ExecOptions, v as BatchResult, vi as SessionFailureReason, vn as NonHostAgentDriverConfig, vr as SandboxFleetDriverCapability, vt as FileSystem, w as ChunkedUploadOptions, wi as SessionMessageInputPart, wn as Process, wr as SandboxFleetMachineRecord, wt as FileWriteResult, x as BatchTask, xi as SessionInterruptOptions, xn as PreviewLinkInfo, xr as SandboxFleetIntelligenceEnvelope, xt as FileTreeResult, y as BatchRunOptions, yi as SessionForkOptions, yn as PermissionLevel, yr as SandboxFleetDriverTimings, yt as FileTreeFile, z as CreateSessionOptions, zi as TaskSessionCommitResult, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceSnapshotResult, zt as GPU_LEASE_PROVIDER_NAMES } from "./types-
|
|
5
|
-
import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, a as Team, b as backendRegistryEntrySchema, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-
|
|
4
|
+
import { $ as DurablePlanDecisionResult, $i as UploadProgress, $n as RolloutScorer, $r as SandboxTerminalManager, $t as GpuLeaseStatus, A as CommitTaskSessionOptions, Ai as SnapshotInfo, An as ProcessSpawnOptions, Ar as SandboxFleetToken, At as FleetDriveTurnRequest, B as CreateTaskSessionOptions, Bi as TaskSessionFileChange, Bn as PublicTemplateVersionInfo, Br as SandboxIdentity, Bt as GitAuth, C as BranchOptions, Ci as SessionMessage, Cn as PreviewLinkWaitOptions, Cr as SandboxFleetMachineMeteredUsage, Ct as FileUsageResult, Di as SnapshotDeleteAcknowledgement, Dn as ProcessLogEntry, Dr as SandboxFleetManifestMachine, Dt as FleetDispatchResultBufferOptions, Ei as SessionStatus, En as ProcessListOptions, Er as SandboxFleetManifest, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fi as StartupOperation, Fn as ProvisionEvent, Fr as SandboxFleetUsage, G as DispatchedSession, Gi as TeeAttestationResponse, Gn as ReconcileSandboxFleetsOptions, Gr as SandboxResourceUsage, Gt as GitStatus, H as DevServerInfo, Hi as TaskSessionProfile, Hn as PublishPublicTemplateVersionOptions, Hr as SandboxIntelligenceEnvelope, Ht as GitCommit, Ii as StorageConfig, In as ProvisionResult, Ir as SandboxFleetWorkspace, It as ForkCounts, J as DriveTurnOptions, Ji as TokenRefreshHandler, Jr as SandboxRuntimeHealth, Jt as GpuLeaseCommandResult, K as DownloadOptions, Ki as TeePublicKey, Kn as ReconcileSandboxFleetsResult, Kr as SandboxResources, Kt as GpuLease, L as CreateSandboxFleetWithCoordinatorOptions, Li as SubscriptionInfo, Ln as ProvisionStatus, Lr as SandboxFleetWorkspaceReconcileResult, Lt as ForkIdempotency, M as CreateGpuLeaseOptions, Mi as SnapshotResult, Mn as PromptInputPart, Mr as SandboxFleetTraceEvent, N as CreateIntelligenceReportOptions, Nn as PromptOptions, Nr as SandboxFleetTraceExport, Nt as FleetMachineId, Oi as SnapshotDeleteOutcome, On as ProcessManager, Or as SandboxFleetOperationsSummary, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pi as StartupDiagnostics, Pn as PromptResult, Pr as SandboxFleetTraceOptions, Pt as FleetPromptDispatchOptions, Q as DurablePlan, Qi as UploadOptions, Qn as RolloutOptions, Qr as SandboxTerminalInfo, Qt as GpuLeaseProviderName, R as CreateSandboxOptions, Ri as TaskSessionChanges, Rn as ProvisionStep, Rr as SandboxFleetWorkspaceRestoreResult, Rt as ForkLookupOptions, S as BatchTaskResult, Si as SessionListOptions, Sn as PreviewLinkManager, Sr as SandboxFleetMachine, St as FileUsageOptions, T as ChunkedUploadResult, Ti as SessionResultOptions, Tn as ProcessInfo, Tr as SandboxFleetMachineSpec, Tt as FleetDispatchCancelResult, U as DirectoryPermission, Ui as TeeAttestationOptions, Un as ReapExpiredSandboxFleetsOptions, Ur as SandboxPortBinding, Ut as GitConfig, V as DeleteOptions, Vi as TaskSessionInfo, Vn as PublishPublicTemplateOptions, Vr as SandboxInfo, Vt as GitBranch, W as DispatchPromptOptions, Wi as TeeAttestationReport, Wn as ReapExpiredSandboxFleetsResult, Wr as SandboxPortPreviewLink, Wt as GitDiff, X as DriverInfo, Xi as TurnDriveResult, Xn as Rollout, Xr as SandboxTerminalAttachOptions, Xt as GpuLeaseExecResult, Y as DriverConfig, Yi as TokenUsage, Yr as SandboxStatus, Yt as GpuLeaseExecOptions, Z as DriverType, Zi as UpdateUserOptions, Zn as RolloutChildResult, Zr as SandboxTerminalCreateOptions, Zt as GpuLeaseManager, _ as BatchBackend, _i as SessionExecutionStatus, _n as NetworkManager, _r as SandboxFleetDispatchResponse, _t as FileRenameResult, aa as WriteManyFile, ai as SandboxTraceOptions, an as IntelligenceReportCompareTo, ar as SandboxConfig, at as EgressManager, b as BatchRunRequest, bi as SessionInfo, bn as PermissionsManager, br as SandboxFleetInfo, bt as FileTreeOptions, c as AttachGpuLeaseOptions, ca as BatchEvent, ci as SearchOptions, cr as SandboxCreateReceipt, ct as EventStreamOptions, d as BackendConfig, da as BatchTaskUsage, di as SendSessionMessageOptions, dn as ListSandboxFleetOptions, dr as SandboxEnvironment, dt as ExecResult, ea as UsageInfo, ei as SandboxTerminalRequestOptions, en as HostAgentDriverConfig, er as RolloutStartResult, f as BackendInfo, fa as PublicBatchRunRequest, fi as SendSessionMessageRequest, fn as ListSandboxOptions, fr as SandboxEvent, ft as FileInfo, g as BackendStatus, gi as SessionExecutionInfo, gn as NetworkConfig, gr as SandboxFleetDispatchFailureClass, gt as FileReadResult, h as BackendRuntimeConfigUpdate, hi as SessionEventStreamOptions, hn as MkdirOptions, hr as SandboxFleetCostEstimate, ht as FileReadError, ia as WriteFileOptions, ii as SandboxTraceExport, in as IntelligenceReportBudget, ir as SSHCredentials, it as EgressDenial, j as CompletedTurnResult, ji as SnapshotOptions, jn as ProcessStatus, jr as SandboxFleetTraceBundle, jt as FleetExecDispatchOptions, ki as SnapshotIdempotency, kn as ProcessSignal, kr as SandboxFleetPolicy, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, la as BatchEventDataMap, li as SecretInfo, ln as ListMessagesOptions, lr as SandboxDeleteAcknowledgement, lt as ExactProcessSpawnOptions, m as BackendMcpServerStatus, ma as parseBackendType, mi as SessionBackendCredentials, mn as McpServerConfig, mr as SandboxFleetArtifactSpec, mt as FileReadBatchResult, n as AccessPolicyRule, na as WaitForRolloutOptions, ni as SandboxTraceBundle, nn as InstalledTool, nr as RolloutTurnPart, nt as EffectiveBackendProfile, oa as WriteManyOptions, oi as SandboxUser, on as IntelligenceReportSubjectType, or as SandboxConnection, ot as EgressPolicy, p as BackendManager, pa as BackendType, pi as SentSessionMessage, pn as MAX_EGRESS_DENIALS_LIMIT, pr as SandboxFleetArtifact, pt as FileReadBatchOptions, q as DownloadProgress, qi as TeePublicKeyResponse, qn as RenameOptions, qr as SandboxRuntimeCapabilities, qt as GpuLeaseBilling, r as AddUserOptions, ra as WorkspaceOperationLookup, ri as SandboxTraceEvent, rn as IntelligenceReport, rr as SSHCommandDescriptor, rt as EffectiveBackendSource, sa as BatchBackendStats, si as SearchMatch, sn as IntelligenceReportWindow, sr as SandboxCreateOutcome, st as EnsureDevServerOptions, t as AcceleratorKind, ta as WaitForOptions, ti as SandboxTerminals, tn as HostAgentRuntimeBackend, tr as RolloutStatus, tt as EffectiveBackend, u as BackendCapabilities, ua as BatchSidecarGroup, ui as SecretsManager, un as ListOptions, ur as SandboxDeleteOutcome, ut as ExecOptions, v as BatchResult, vi as SessionFailureReason, vn as NonHostAgentDriverConfig, vr as SandboxFleetDriverCapability, vt as FileSystem, w as ChunkedUploadOptions, wi as SessionMessageInputPart, wn as Process, wr as SandboxFleetMachineRecord, wt as FileWriteResult, x as BatchTask, xi as SessionInterruptOptions, xn as PreviewLinkInfo, xr as SandboxFleetIntelligenceEnvelope, xt as FileTreeResult, y as BatchRunOptions, yi as SessionForkOptions, yn as PermissionLevel, yr as SandboxFleetDriverTimings, yt as FileTreeFile, z as CreateSessionOptions, zi as TaskSessionCommitResult, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceSnapshotResult, zt as GPU_LEASE_PROVIDER_NAMES } from "./types-CnnhgS8s.js";
|
|
5
|
+
import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, a as Team, b as backendRegistryEntrySchema, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-otBwUOrK.js";
|
|
6
6
|
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-Bq_z_u6A.js";
|
|
7
7
|
import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "./index-CMLW3u5K.js";
|
|
8
8
|
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-CQOvGddH.js";
|
|
9
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
10
|
-
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
9
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-kV5PiK7G.js";
|
|
10
|
+
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-CDuBQOYX.js";
|
|
11
11
|
import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
|
|
12
12
|
import { AgentProfile, AgentProfile as AgentProfile$1, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileConfigValue, AgentProfileConnection, AgentProfileFileMount, AgentProfileFileMount as AgentProfileFileMount$1, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePermissionValue, AgentProfilePrompt, AgentProfileResourceRef, AgentProfileResources, AgentProfileSecurityPolicy, AgentProfileValidationIssue, AgentProfileValidationResult, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, AgentSubagentProfile, Capability, SANDBOX_SIZE_PRESET_NAMES, SandboxSizePreset } from "@tangle-network/agent-interface";
|
|
13
13
|
import * as _$zod from "zod";
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as backendTypeSchema, g as deriveAgentRunOutcome, h as deriveAgentResultOutcome, m as createAgentRunOutcomeTracker, p as normalizeRuntimeBackendConfig, u as parseSSEStream, v as parseBackendType } from "./runtime-api-
|
|
1
|
+
import { _ as backendTypeSchema, g as deriveAgentRunOutcome, h as deriveAgentResultOutcome, m as createAgentRunOutcomeTracker, p as normalizeRuntimeBackendConfig, u as parseSSEStream, v as parseBackendType } from "./runtime-api-BcLo4lBU.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-C6kn-3zt.js";
|
|
3
|
-
import { _ as parseBackendRegistryResponse, a as splitInlineProfileSkills, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as splitInlineProfileFileMounts, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as validateDeferredProfileFileMounts, p as backendRegistryEntrySchema, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-
|
|
3
|
+
import { _ as parseBackendRegistryResponse, a as splitInlineProfileSkills, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as splitInlineProfileFileMounts, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as validateDeferredProfileFileMounts, p as backendRegistryEntrySchema, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-BbKA0oQY.js";
|
|
4
4
|
import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, c as createInteractiveControlHolderId, l as interactiveSessionIdentityDigest, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-Dv0gbFMu.js";
|
|
5
|
-
import { A as toOtelJson, C as collectAgentResponseText, D as buildTraceExportPayload, O as exportTraceBundle, S as collectAgentFinalMessageText, T as isToolBearingEvent, _ as TerminalStream, a as WorkspaceImages, c as SandboxTaskSession, d as agentInteractiveSessionPromptRequestDigest, f as InteractiveTerminalFrameLog, g as InteractiveSessionController, h as BrowserInteractiveSessionController, k as otelTraceIdForTangleTrace, l as SandboxSession, m as createInteractiveTerminalSession, o as GPU_LEASE_PROVIDER_NAMES, p as createInteractiveTerminalCapture, s as MAX_EGRESS_DENIALS_LIMIT, t as SandboxInstance, u as InteractiveSessionHandle, v as TerminalStreamError, w as getSandboxEventText, x as applySandboxEventText, y as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./sandbox
|
|
5
|
+
import { A as toOtelJson, C as collectAgentResponseText, D as buildTraceExportPayload, O as exportTraceBundle, S as collectAgentFinalMessageText, T as isToolBearingEvent, _ as TerminalStream, a as WorkspaceImages, c as SandboxTaskSession, d as agentInteractiveSessionPromptRequestDigest, f as InteractiveTerminalFrameLog, g as InteractiveSessionController, h as BrowserInteractiveSessionController, k as otelTraceIdForTangleTrace, l as SandboxSession, m as createInteractiveTerminalSession, o as GPU_LEASE_PROVIDER_NAMES, p as createInteractiveTerminalCapture, s as MAX_EGRESS_DENIALS_LIMIT, t as SandboxInstance, u as InteractiveSessionHandle, v as TerminalStreamError, w as getSandboxEventText, x as applySandboxEventText, y as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./sandbox-CVj0AN5M.js";
|
|
6
6
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DQD9kCdN.js";
|
|
7
|
-
import { t as TangleSandboxClient } from "./tangle-
|
|
7
|
+
import { t as TangleSandboxClient } from "./tangle-BfNXEx5D.js";
|
|
8
8
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/confidential.ts
|
|
@@ -1265,13 +1265,14 @@ var SandboxRuntimeApi = class {
|
|
|
1265
1265
|
}
|
|
1266
1266
|
async createSession(options) {
|
|
1267
1267
|
await this.transport.ensureRunning();
|
|
1268
|
+
const backend = normalizeRuntimeBackendConfig(options.backend);
|
|
1268
1269
|
const info = normalizeSessionInfo(await this.json("/agents/sessions", {
|
|
1269
1270
|
method: "POST",
|
|
1270
1271
|
body: JSON.stringify({
|
|
1271
1272
|
...options.sessionId !== void 0 ? { sessionId: options.sessionId } : {},
|
|
1272
1273
|
...options.title !== void 0 ? { title: options.title } : {},
|
|
1273
1274
|
...options.parentId !== void 0 ? { parentID: options.parentId } : {},
|
|
1274
|
-
backend
|
|
1275
|
+
...backend && Object.keys(backend).length > 0 ? { backend } : {}
|
|
1275
1276
|
})
|
|
1276
1277
|
}));
|
|
1277
1278
|
if (!info) throw new ServerError("Session creation response missing session id", 502, {
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $i as UploadProgress, $r as SandboxTerminalManager, A as CommitTaskSessionOptions, B as CreateTaskSessionOptions, Ci as SessionMessage, Ct as FileUsageResult, Jr as SandboxRuntimeHealth, Qr as SandboxTerminalInfo, Ri as TaskSessionChanges, St as FileUsageOptions, T as ChunkedUploadResult, Ur as SandboxPortBinding, Vi as TaskSessionInfo, Zr as SandboxTerminalCreateOptions, _i as SessionExecutionStatus, _t as FileRenameResult, bi as SessionInfo, bt as FileTreeOptions, di as SendSessionMessageOptions, ei as SandboxTerminalRequestOptions, fi as SendSessionMessageRequest, fr as SandboxEvent, gi as SessionExecutionInfo, hi as SessionEventStreamOptions, ia as WriteFileOptions, ln as ListMessagesOptions, mt as FileReadBatchResult, pi as SentSessionMessage, pt as FileReadBatchOptions, qn as RenameOptions, w as ChunkedUploadOptions, wt as FileWriteResult, xt as FileTreeResult, z as CreateSessionOptions, zi as TaskSessionCommitResult } from "./types-
|
|
1
|
+
import { $i as UploadProgress, $r as SandboxTerminalManager, A as CommitTaskSessionOptions, B as CreateTaskSessionOptions, Ci as SessionMessage, Ct as FileUsageResult, Jr as SandboxRuntimeHealth, Qr as SandboxTerminalInfo, Ri as TaskSessionChanges, St as FileUsageOptions, T as ChunkedUploadResult, Ur as SandboxPortBinding, Vi as TaskSessionInfo, Zr as SandboxTerminalCreateOptions, _i as SessionExecutionStatus, _t as FileRenameResult, bi as SessionInfo, bt as FileTreeOptions, di as SendSessionMessageOptions, ei as SandboxTerminalRequestOptions, fi as SendSessionMessageRequest, fr as SandboxEvent, gi as SessionExecutionInfo, hi as SessionEventStreamOptions, ia as WriteFileOptions, ln as ListMessagesOptions, mt as FileReadBatchResult, pi as SentSessionMessage, pt as FileReadBatchOptions, qn as RenameOptions, w as ChunkedUploadOptions, wt as FileWriteResult, xt as FileTreeResult, z as CreateSessionOptions, zi as TaskSessionCommitResult } from "./types-CnnhgS8s.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-CQOvGddH.js";
|
|
3
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
3
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-kV5PiK7G.js";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/chunked-upload.d.ts
|
|
6
6
|
/** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
|
package/dist/runtime.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as uploadChunked, g as deriveAgentRunOutcome, h as deriveAgentResultOutcome, m as createAgentRunOutcomeTracker, t as SandboxRuntimeApi } from "./runtime-api-
|
|
1
|
+
import { a as uploadChunked, g as deriveAgentRunOutcome, h as deriveAgentResultOutcome, m as createAgentRunOutcomeTracker, t as SandboxRuntimeApi } from "./runtime-api-BcLo4lBU.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-C6kn-3zt.js";
|
|
3
3
|
import { n as combineAbortSignals } from "./abort-signal-si1WMfJb.js";
|
|
4
4
|
//#region src/runtime-client.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as TerminalStreamReconnectAuthority, c as MintScopedTokenOptions, h as TerminalReadyInfo, l as ScopedToken, r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-5GNLCsms.js";
|
|
2
2
|
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as InteractiveAttachOptions, f as InteractiveControlClaimAcknowledgement, h as InteractiveSessionStatus, m as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-lRfzpg9t.js";
|
|
3
|
-
import { $ as DurablePlanDecisionResult, A as CommitTaskSessionOptions, Ai as SnapshotInfo, B as CreateTaskSessionOptions, C as BranchOptions, Ci as SessionMessage, D as CodeExecutionResult, Di as SnapshotDeleteAcknowledgement, E as CodeExecutionOptions, Fn as ProvisionEvent, G as DispatchedSession, Gi as TeeAttestationResponse, Gr as SandboxResourceUsage, Gt as GitStatus, Ht as GitCommit, In as ProvisionResult, It as ForkCounts, J as DriveTurnOptions, Jn as RestoreSnapshotOptions, Jr as SandboxRuntimeHealth, Kt as GpuLease, Lt as ForkIdempotency, Mi as SnapshotResult, Mn as PromptInputPart, Nn as PromptOptions, O as CodeLanguage, On as ProcessManager, Pi as StartupDiagnostics, Pn as PromptResult, Q as DurablePlan, Qn as RolloutOptions, Ri as TaskSessionChanges, Rt as ForkLookupOptions, Si as SessionListOptions, Sn as PreviewLinkManager, Ti as SessionResultOptions, Ui as TeeAttestationOptions, Ur as SandboxPortBinding, Vi as TaskSessionInfo, Vr as SandboxInfo, Vt as GitBranch, W as DispatchPromptOptions, Wt as GitDiff, X as DriverInfo, Xi as TurnDriveResult, Xn as Rollout, Xr as SandboxTerminalAttachOptions, Yn as ResumeOptions, Yr as SandboxStatus, Zt as GpuLeaseManager, _n as NetworkManager, aa as WriteManyFile, ai as SandboxTraceOptions, an as IntelligenceReportCompareTo, at as EgressManager, bi as SessionInfo, bn as PermissionsManager, ci as SearchOptions, cn as JsonValue, cr as SandboxCreateReceipt, ct as EventStreamOptions, d as BackendConfig, di as SendSessionMessageOptions, dt as ExecResult, er as RolloutStartResult, fi as SendSessionMessageRequest, fr as SandboxEvent, gi as SessionExecutionInfo, hi as SessionEventStreamOptions, ia as WriteFileOptions, in as IntelligenceReportBudget, ir as SSHCredentials, j as CompletedTurnResult, ji as SnapshotOptions, jr as SandboxFleetTraceBundle, ln as ListMessagesOptions, lr as SandboxDeleteAcknowledgement, na as WaitForRolloutOptions, ni as SandboxTraceBundle, nn as InstalledTool, oa as WriteManyOptions, or as SandboxConnection, p as BackendManager, pi as SentSessionMessage, qi as TeePublicKeyResponse, qr as SandboxRuntimeCapabilities, ra as WorkspaceOperationLookup, rn as IntelligenceReport, rr as SSHCommandDescriptor, si as SearchMatch, sn as IntelligenceReportWindow, ta as WaitForOptions, ti as SandboxTerminals, ut as ExecOptions, vt as FileSystem, wt as FileWriteResult, xi as SessionInterruptOptions, yi as SessionForkOptions, z as CreateSessionOptions, zi as TaskSessionCommitResult } from "./types-
|
|
3
|
+
import { $ as DurablePlanDecisionResult, A as CommitTaskSessionOptions, Ai as SnapshotInfo, B as CreateTaskSessionOptions, C as BranchOptions, Ci as SessionMessage, D as CodeExecutionResult, Di as SnapshotDeleteAcknowledgement, E as CodeExecutionOptions, Fn as ProvisionEvent, G as DispatchedSession, Gi as TeeAttestationResponse, Gr as SandboxResourceUsage, Gt as GitStatus, Ht as GitCommit, In as ProvisionResult, It as ForkCounts, J as DriveTurnOptions, Jn as RestoreSnapshotOptions, Jr as SandboxRuntimeHealth, Kt as GpuLease, Lt as ForkIdempotency, Mi as SnapshotResult, Mn as PromptInputPart, Nn as PromptOptions, O as CodeLanguage, On as ProcessManager, Pi as StartupDiagnostics, Pn as PromptResult, Q as DurablePlan, Qn as RolloutOptions, Ri as TaskSessionChanges, Rt as ForkLookupOptions, Si as SessionListOptions, Sn as PreviewLinkManager, Ti as SessionResultOptions, Ui as TeeAttestationOptions, Ur as SandboxPortBinding, Vi as TaskSessionInfo, Vr as SandboxInfo, Vt as GitBranch, W as DispatchPromptOptions, Wt as GitDiff, X as DriverInfo, Xi as TurnDriveResult, Xn as Rollout, Xr as SandboxTerminalAttachOptions, Yn as ResumeOptions, Yr as SandboxStatus, Zt as GpuLeaseManager, _n as NetworkManager, aa as WriteManyFile, ai as SandboxTraceOptions, an as IntelligenceReportCompareTo, at as EgressManager, bi as SessionInfo, bn as PermissionsManager, ci as SearchOptions, cn as JsonValue, cr as SandboxCreateReceipt, ct as EventStreamOptions, d as BackendConfig, di as SendSessionMessageOptions, dt as ExecResult, er as RolloutStartResult, fi as SendSessionMessageRequest, fr as SandboxEvent, gi as SessionExecutionInfo, hi as SessionEventStreamOptions, ia as WriteFileOptions, in as IntelligenceReportBudget, ir as SSHCredentials, j as CompletedTurnResult, ji as SnapshotOptions, jr as SandboxFleetTraceBundle, ln as ListMessagesOptions, lr as SandboxDeleteAcknowledgement, na as WaitForRolloutOptions, ni as SandboxTraceBundle, nn as InstalledTool, oa as WriteManyOptions, or as SandboxConnection, p as BackendManager, pi as SentSessionMessage, qi as TeePublicKeyResponse, qr as SandboxRuntimeCapabilities, ra as WorkspaceOperationLookup, rn as IntelligenceReport, rr as SSHCommandDescriptor, si as SearchMatch, sn as IntelligenceReportWindow, ta as WaitForOptions, ti as SandboxTerminals, ut as ExecOptions, vt as FileSystem, wt as FileWriteResult, xi as SessionInterruptOptions, yi as SessionForkOptions, z as CreateSessionOptions, zi as TaskSessionCommitResult } from "./types-CnnhgS8s.js";
|
|
4
4
|
import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -1583,8 +1583,8 @@ declare class SandboxInstance {
|
|
|
1583
1583
|
/**
|
|
1584
1584
|
* Ask whether the snapshot bound to an idempotency key is decided.
|
|
1585
1585
|
*
|
|
1586
|
-
* Pass the same options the create carried
|
|
1587
|
-
*
|
|
1586
|
+
* Pass the same options the create carried for an exact-body lookup. Omit
|
|
1587
|
+
* options to read the operation bound to this owner-scoped key.
|
|
1588
1588
|
*/
|
|
1589
1589
|
getSnapshotOperation(idempotencyKey: string, options?: Pick<SnapshotOptions, "tags">): Promise<WorkspaceOperationLookup>;
|
|
1590
1590
|
/**
|
|
@@ -1653,10 +1653,10 @@ declare class SandboxInstance {
|
|
|
1653
1653
|
/**
|
|
1654
1654
|
* Ask whether the fork bound to an idempotency key is decided.
|
|
1655
1655
|
*
|
|
1656
|
-
* Pass the same count and options the fork carried
|
|
1657
|
-
*
|
|
1656
|
+
* Pass the same count and options the fork carried for an exact-body lookup.
|
|
1657
|
+
* Omit options to read the operation bound to this owner-scoped key.
|
|
1658
1658
|
*/
|
|
1659
|
-
getForkOperation(idempotencyKey: string, options
|
|
1659
|
+
getForkOperation(idempotencyKey: string, options?: ForkLookupOptions): Promise<WorkspaceOperationLookup>;
|
|
1660
1660
|
/**
|
|
1661
1661
|
* Speculative rollouts: branch this RUNNING sandbox into `n` copy-on-write
|
|
1662
1662
|
* children, run the SAME agent turn in every child in parallel, and
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as uploadChunked, c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, h as deriveAgentResultOutcome, i as sessionHeaders, m as createAgentRunOutcomeTracker, n as normalizeSessionInfo, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, r as appendSessionIdQuery, t as SandboxRuntimeApi, u as parseSSEStream } from "./runtime-api-
|
|
1
|
+
import { a as uploadChunked, c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, h as deriveAgentResultOutcome, i as sessionHeaders, m as createAgentRunOutcomeTracker, n as normalizeSessionInfo, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, r as appendSessionIdQuery, t as SandboxRuntimeApi, u as parseSSEStream } from "./runtime-api-BcLo4lBU.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-C6kn-3zt.js";
|
|
3
3
|
import { c as createInteractiveControlHolderId, d as interactiveSessionControlReleaseResponseSchema, f as interactiveSessionControlValidationResponseSchema, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, p as interactiveSessionStatusResponseSchema, r as browserInteractiveTerminalEndpoint, s as assertInteractiveSessionRef, u as interactiveSessionControlClaimResponseSchema } from "./browser-interactive-control-controller-Dv0gbFMu.js";
|
|
4
4
|
import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-si1WMfJb.js";
|
|
@@ -3189,6 +3189,23 @@ var WorkspaceImages = class {
|
|
|
3189
3189
|
*
|
|
3190
3190
|
* Represents a single sandbox and provides methods to interact with it.
|
|
3191
3191
|
*/
|
|
3192
|
+
function interpretWorkspaceOperationLookup(body, kind, keyOnly) {
|
|
3193
|
+
const outcome = body?.outcome;
|
|
3194
|
+
if (keyOnly && outcome === "conflict") return {
|
|
3195
|
+
outcome: "unknown",
|
|
3196
|
+
kind
|
|
3197
|
+
};
|
|
3198
|
+
if (outcome !== "found" && outcome !== "not_found" && outcome !== "conflict") return {
|
|
3199
|
+
...body,
|
|
3200
|
+
outcome: "unknown",
|
|
3201
|
+
kind
|
|
3202
|
+
};
|
|
3203
|
+
return {
|
|
3204
|
+
...body,
|
|
3205
|
+
outcome,
|
|
3206
|
+
kind: body?.kind ?? kind
|
|
3207
|
+
};
|
|
3208
|
+
}
|
|
3192
3209
|
function normalizeProvisionStep(raw) {
|
|
3193
3210
|
if (raw === "sidecar-ready") return "runtime-ready";
|
|
3194
3211
|
return raw;
|
|
@@ -6598,8 +6615,8 @@ var SandboxInstance = class SandboxInstance {
|
|
|
6598
6615
|
/**
|
|
6599
6616
|
* Ask whether the snapshot bound to an idempotency key is decided.
|
|
6600
6617
|
*
|
|
6601
|
-
* Pass the same options the create carried
|
|
6602
|
-
*
|
|
6618
|
+
* Pass the same options the create carried for an exact-body lookup. Omit
|
|
6619
|
+
* options to read the operation bound to this owner-scoped key.
|
|
6603
6620
|
*/
|
|
6604
6621
|
async getSnapshotOperation(idempotencyKey, options) {
|
|
6605
6622
|
const response = await this.client.fetch(`/v1/sandboxes/${this.id}/workspace-operations/lookup`, {
|
|
@@ -6607,7 +6624,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
6607
6624
|
body: JSON.stringify({
|
|
6608
6625
|
kind: "checkpoint",
|
|
6609
6626
|
idempotencyKey,
|
|
6610
|
-
request: { tags: options
|
|
6627
|
+
...options === void 0 ? {} : { request: { tags: options.tags } }
|
|
6611
6628
|
})
|
|
6612
6629
|
});
|
|
6613
6630
|
if (!response.ok) {
|
|
@@ -6618,18 +6635,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
6618
6635
|
const body = await response.text();
|
|
6619
6636
|
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
6620
6637
|
}
|
|
6621
|
-
|
|
6622
|
-
const outcome = body?.outcome;
|
|
6623
|
-
if (outcome !== "found" && outcome !== "not_found" && outcome !== "conflict") return {
|
|
6624
|
-
...body,
|
|
6625
|
-
outcome: "unknown",
|
|
6626
|
-
kind: "checkpoint"
|
|
6627
|
-
};
|
|
6628
|
-
return {
|
|
6629
|
-
...body,
|
|
6630
|
-
outcome,
|
|
6631
|
-
kind: body?.kind ?? "checkpoint"
|
|
6632
|
-
};
|
|
6638
|
+
return interpretWorkspaceOperationLookup(await response.json().catch(() => ({})), "checkpoint", options === void 0);
|
|
6633
6639
|
}
|
|
6634
6640
|
/**
|
|
6635
6641
|
* Restore from the latest snapshot in customer-provided storage.
|
|
@@ -6756,8 +6762,8 @@ var SandboxInstance = class SandboxInstance {
|
|
|
6756
6762
|
/**
|
|
6757
6763
|
* Ask whether the fork bound to an idempotency key is decided.
|
|
6758
6764
|
*
|
|
6759
|
-
* Pass the same count and options the fork carried
|
|
6760
|
-
*
|
|
6765
|
+
* Pass the same count and options the fork carried for an exact-body lookup.
|
|
6766
|
+
* Omit options to read the operation bound to this owner-scoped key.
|
|
6761
6767
|
*/
|
|
6762
6768
|
async getForkOperation(idempotencyKey, options) {
|
|
6763
6769
|
const response = await this.client.fetch(`/v1/sandboxes/${this.id}/workspace-operations/lookup`, {
|
|
@@ -6765,11 +6771,11 @@ var SandboxInstance = class SandboxInstance {
|
|
|
6765
6771
|
body: JSON.stringify({
|
|
6766
6772
|
kind: "fork",
|
|
6767
6773
|
idempotencyKey,
|
|
6768
|
-
request: {
|
|
6774
|
+
...options === void 0 ? {} : { request: {
|
|
6769
6775
|
count: options.count,
|
|
6770
6776
|
env: options.env,
|
|
6771
6777
|
metadata: options.metadata
|
|
6772
|
-
}
|
|
6778
|
+
} }
|
|
6773
6779
|
})
|
|
6774
6780
|
});
|
|
6775
6781
|
if (!response.ok) {
|
|
@@ -6780,18 +6786,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
6780
6786
|
const body = await response.text();
|
|
6781
6787
|
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
6782
6788
|
}
|
|
6783
|
-
|
|
6784
|
-
const outcome = body?.outcome;
|
|
6785
|
-
if (outcome !== "found" && outcome !== "not_found" && outcome !== "conflict") return {
|
|
6786
|
-
...body,
|
|
6787
|
-
outcome: "unknown",
|
|
6788
|
-
kind: "fork"
|
|
6789
|
-
};
|
|
6790
|
-
return {
|
|
6791
|
-
...body,
|
|
6792
|
-
outcome,
|
|
6793
|
-
kind: body?.kind ?? "fork"
|
|
6794
|
-
};
|
|
6789
|
+
return interpretWorkspaceOperationLookup(await response.json().catch(() => ({})), "fork", options === void 0);
|
|
6795
6790
|
}
|
|
6796
6791
|
/**
|
|
6797
6792
|
* Speculative rollouts: branch this RUNNING sandbox into `n` copy-on-write
|
|
@@ -7620,6 +7615,12 @@ var SandboxInstance = class SandboxInstance {
|
|
|
7620
7615
|
const turn = await this.findCompletedTurn(turnId, { sessionId: opts.sessionId });
|
|
7621
7616
|
if (turn) return settleTurnDrive(turn.result);
|
|
7622
7617
|
const info = await this._sessionStatus(opts.sessionId);
|
|
7618
|
+
const hasExplicitBackend = opts.backend !== void 0 || opts.model !== void 0;
|
|
7619
|
+
const backend = applyRequestedModel(opts.backend ?? this.defaultRuntimeBackend, opts.model);
|
|
7620
|
+
if (info?.status === "queued" && hasExplicitBackend) await this.createSession({
|
|
7621
|
+
sessionId: opts.sessionId,
|
|
7622
|
+
...backend !== void 0 ? { backend } : {}
|
|
7623
|
+
});
|
|
7623
7624
|
const awaitingFirstTurn = Boolean(info && isSessionAwaitingFirstTurn(info));
|
|
7624
7625
|
if (info && isSessionInFlight(info)) {
|
|
7625
7626
|
const startedAt = info.startedAt ?? info.createdAt;
|
|
@@ -7654,9 +7655,20 @@ var SandboxInstance = class SandboxInstance {
|
|
|
7654
7655
|
}
|
|
7655
7656
|
return settled;
|
|
7656
7657
|
}
|
|
7657
|
-
await this.
|
|
7658
|
-
|
|
7658
|
+
const session = info ? this.session(opts.sessionId) : (await this.createSession({
|
|
7659
|
+
sessionId: opts.sessionId,
|
|
7660
|
+
...backend !== void 0 ? { backend } : {}
|
|
7661
|
+
})).session;
|
|
7662
|
+
const parts = typeof message === "string" ? [{
|
|
7663
|
+
type: "text",
|
|
7664
|
+
text: message
|
|
7665
|
+
}] : message;
|
|
7666
|
+
await session.sendMessage({
|
|
7667
|
+
parts: [...parts],
|
|
7659
7668
|
turnId
|
|
7669
|
+
}, {
|
|
7670
|
+
...opts.timeoutMs !== void 0 ? { timeoutMs: opts.timeoutMs } : {},
|
|
7671
|
+
...opts.signal ? { signal: opts.signal } : {}
|
|
7660
7672
|
});
|
|
7661
7673
|
return { state: "running" };
|
|
7662
7674
|
}
|
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-CDuBQOYX.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-BfNXEx5D.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-C6kn-3zt.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-CVj0AN5M.js";
|
|
3
3
|
//#region src/tangle/abi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tangle Contract ABI Definitions
|
|
@@ -3149,7 +3149,9 @@ interface CreateSessionOptions {
|
|
|
3149
3149
|
sessionId?: string;
|
|
3150
3150
|
title?: string;
|
|
3151
3151
|
parentId?: string;
|
|
3152
|
-
backend
|
|
3152
|
+
/** Optional backend override. An omitted or type-less config uses the
|
|
3153
|
+
* runtime's configured default backend. */
|
|
3154
|
+
backend?: BackendConfig;
|
|
3153
3155
|
}
|
|
3154
3156
|
/** Backend credentials forwarded to the platform if a sandbox must restart. */
|
|
3155
3157
|
interface SessionBackendCredentials {
|
|
@@ -3430,12 +3432,12 @@ interface DispatchedSession {
|
|
|
3430
3432
|
dispatched: boolean;
|
|
3431
3433
|
}
|
|
3432
3434
|
/**
|
|
3433
|
-
* Options for `box.driveTurn()` — one settle/poll/
|
|
3434
|
-
*
|
|
3435
|
-
*
|
|
3436
|
-
*
|
|
3435
|
+
* Options for `box.driveTurn()` — one settle/poll/admit pass over a detached
|
|
3436
|
+
* turn. The first pass creates a session with the requested backend and admits
|
|
3437
|
+
* the turn through `SandboxSession.sendMessage()`. The session owns execution
|
|
3438
|
+
* and gateway replay after the request returns.
|
|
3437
3439
|
*/
|
|
3438
|
-
interface DriveTurnOptions
|
|
3440
|
+
interface DriveTurnOptions {
|
|
3439
3441
|
/** Deterministic session id — required, it is the resume key. Every
|
|
3440
3442
|
* tick for the same logical turn MUST pass the same id so a re-invoke
|
|
3441
3443
|
* after a crash finds the in-flight session instead of starting a
|
|
@@ -3445,6 +3447,14 @@ interface DriveTurnOptions extends DispatchPromptOptions {
|
|
|
3445
3447
|
* Defaults to `sessionId`, which is correct for the one-turn-per-
|
|
3446
3448
|
* session shape detached drivers use. */
|
|
3447
3449
|
turnId?: string;
|
|
3450
|
+
/** Backend bound to the session when the first pass creates it. */
|
|
3451
|
+
backend?: Partial<BackendConfig>;
|
|
3452
|
+
/** Model shorthand folded into `backend.model.model` at session creation. */
|
|
3453
|
+
model?: string;
|
|
3454
|
+
/** Admission request timeout in milliseconds. */
|
|
3455
|
+
timeoutMs?: number;
|
|
3456
|
+
/** Abort the admission request before the sandbox accepts it. */
|
|
3457
|
+
signal?: AbortSignal;
|
|
3448
3458
|
/** Wall-clock cap in milliseconds, measured from the session's
|
|
3449
3459
|
* `startedAt` (falling back to `createdAt`). When a still-running
|
|
3450
3460
|
* session exceeds it, `driveTurn` cancels the session and reports
|
|
@@ -3599,7 +3609,7 @@ interface SandboxDeleteAcknowledgement {
|
|
|
3599
3609
|
*
|
|
3600
3610
|
* - `found`: the key is decided; `state` says how.
|
|
3601
3611
|
* - `not_found`: nothing claimed this key.
|
|
3602
|
-
* - `conflict`:
|
|
3612
|
+
* - `conflict`: an exact-body lookup found a different request body.
|
|
3603
3613
|
* - `unknown`: a request claimed the key and its result is still undecided, or
|
|
3604
3614
|
* the API is too old to answer. Reconcile against real state before retrying.
|
|
3605
3615
|
*/
|
|
@@ -3607,6 +3617,10 @@ interface WorkspaceOperationLookup {
|
|
|
3607
3617
|
outcome: "found" | "not_found" | "conflict" | "unknown";
|
|
3608
3618
|
kind: "checkpoint" | "fork";
|
|
3609
3619
|
state?: "pending" | "succeeded" | "failed";
|
|
3620
|
+
/**
|
|
3621
|
+
* Digest used for the lookup. Exact conflicts use `existingRequestDigest`
|
|
3622
|
+
* for the stored digest. Absent only when key-only lookup finds no record.
|
|
3623
|
+
*/
|
|
3610
3624
|
requestDigest?: string;
|
|
3611
3625
|
existingRequestDigest?: string;
|
|
3612
3626
|
result?: Record<string, unknown>;
|
|
@@ -4586,14 +4600,7 @@ interface McpServerConfig {
|
|
|
4586
4600
|
* ```
|
|
4587
4601
|
*/
|
|
4588
4602
|
interface BackendConfig {
|
|
4589
|
-
/**
|
|
4590
|
-
* Backend type identifier. Optional: a config without one resolves to the
|
|
4591
|
-
* platform's configured default backend server-side. The client still
|
|
4592
|
-
* fills `"opencode"` before the request leaves the process to keep the
|
|
4593
|
-
* wire format stable — remove that fill in the next SDK major so the
|
|
4594
|
-
* server default owns type-less creates end to end.
|
|
4595
|
-
* @default the platform default backend
|
|
4596
|
-
*/
|
|
4603
|
+
/** Backend type identifier. Defaults to the platform's configured backend. */
|
|
4597
4604
|
type?: BackendType;
|
|
4598
4605
|
/**
|
|
4599
4606
|
* Backend profile selection.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -135,10 +135,10 @@
|
|
|
135
135
|
"vitest": "^4.1.5",
|
|
136
136
|
"ws": "^8.20.0",
|
|
137
137
|
"yjs": "13.6.30",
|
|
138
|
-
"@repo/shared": "0.0.0",
|
|
139
138
|
"@tangle-network/cli-agent-registry": "0.3.14",
|
|
140
139
|
"@tangle-network/runtime-contracts": "0.6.4",
|
|
141
|
-
"@tangle-network/sse-core": "0.0.0"
|
|
140
|
+
"@tangle-network/sse-core": "0.0.0",
|
|
141
|
+
"@repo/shared": "0.0.0"
|
|
142
142
|
},
|
|
143
143
|
"scripts": {
|
|
144
144
|
"build": "node scripts/build-dist.mjs",
|