@tangle-network/sandbox 0.11.1-develop.20260718152243.786d70a → 0.11.1-develop.20260718200351.2f5db96
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-zbqfunVS.d.ts → client-L4c2I5tL.d.ts} +2 -2
- package/dist/{client-BPKkPBc0.js → client-yksqE5VH.js} +3 -3
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-DDnuTcZd.js → collaboration-CeNQA9H_.js} +1 -1
- package/dist/core.d.ts +4 -4
- package/dist/core.js +3 -3
- package/dist/{errors-ntvaf0_F.d.ts → errors-B-8AMQdY.d.ts} +1 -1
- package/dist/{errors-Cbs78OlF.js → errors-hbpL_-S6.js} +3 -3
- package/dist/{index-Cy9eyvmJ.d.ts → index-XaVF9qK-.d.ts} +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -6
- package/dist/intelligence/index.js +1 -1
- package/dist/{runtime-api-fqaQ3CN2.js → runtime-api-r8vQVMe4.js} +2 -1
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +2 -2
- package/dist/{sandbox-Bv_ZM6OW.d.ts → sandbox-C0qo2TZO.d.ts} +11 -8
- package/dist/{sandbox-BfmGTfbd.js → sandbox-C8WoMyT0.js} +29 -10
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-DuiNiJxp.js → tangle-m1lRkQlR.js} +2 -2
- package/dist/{types-C5sMDbeg.d.ts → types-DACKEpON.d.ts} +8 -4
- package/package.json +3 -3
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as CodeExecutionOptions, O as CodeExecutionResult, j as CodeResultPart, k as CodeLanguage } from "../types-
|
|
2
|
-
import { n as SandboxInstance } from "../sandbox-
|
|
3
|
-
import { i as SandboxClient } from "../client-
|
|
1
|
+
import { D as CodeExecutionOptions, O as CodeExecutionResult, j as CodeResultPart, k as CodeLanguage } from "../types-DACKEpON.js";
|
|
2
|
+
import { n as SandboxInstance } from "../sandbox-C0qo2TZO.js";
|
|
3
|
+
import { i as SandboxClient } from "../client-L4c2I5tL.js";
|
|
4
4
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
5
5
|
|
|
6
6
|
//#region src/agent/tools/_specs.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $n as SandboxFleetArtifactSpec, An as PublishPublicTemplateVersionOptions, Ar as SandboxProfileSummary, B as CreateSandboxOptions, Cr as SandboxFleetWorkspaceRestoreResult, Ct as FleetExecDispatchOptions, Dn as PublicTemplateInfo, Dt as FleetPromptDispatchResult, Et as FleetPromptDispatchOptions, F as CreateIntelligenceReportOptions, Fi as UsageInfo, I as CreateRequestOptions, Jn as SandboxClientConfig, Jt as IntelligenceReportBudget, L as CreateSandboxFleetOptions, Mn as ReapExpiredSandboxFleetsResult, Nn as ReconcileSandboxFleetsOptions, On as PublicTemplateVersionInfo, Pn as ReconcileSandboxFleetsResult, Qn as SandboxFleetArtifact, R as CreateSandboxFleetTokenOptions, Sn as PromptResult, Sr as SandboxFleetWorkspaceReconcileResult, St as FleetDispatchStreamOptions, Tr as SandboxInfo, Tt as FleetMachineId, Xn as SandboxEnvironment, Yt as IntelligenceReportCompareTo, Zr as SecretsManager, Zt as IntelligenceReportWindow, _ as BatchResult, a as AttachSandboxFleetMachineOptions, ar as SandboxFleetInfo, bn as PromptInputPart, br as SandboxFleetUsage, bt as FleetDispatchResultBuffer, dr as SandboxFleetManifest, er as SandboxFleetCostEstimate, fi as SshKeysManager, g as BatchOptions, gi as SubscriptionInfo, gr as SandboxFleetTraceBundle, hr as SandboxFleetToken, jn as ReapExpiredSandboxFleetsOptions, ki as TokenRefreshHandler, kn as PublishPublicTemplateOptions, lr as SandboxFleetMachineRecord, m as BatchEvent, nn as ListSandboxOptions, nr as SandboxFleetDispatchResponse, ot as ExecOptions, pr as SandboxFleetOperationsSummary, qt as IntelligenceReport, rr as SandboxFleetDriverCapability, st as ExecResult, tn as ListSandboxFleetOptions, v as BatchRunOptions, wr as SandboxFleetWorkspaceSnapshotResult, wt as FleetExecDispatchResult, x as BatchTask, xn as PromptOptions, xt as FleetDispatchResultBufferOptions, y as BatchRunRequest, yr as SandboxFleetTraceOptions, yt as FleetDispatchCancelResult, z as CreateSandboxFleetWithCoordinatorOptions } from "./types-
|
|
2
|
-
import { a as TraceExportSink, i as TraceExportResult, n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
1
|
+
import { $n as SandboxFleetArtifactSpec, An as PublishPublicTemplateVersionOptions, Ar as SandboxProfileSummary, B as CreateSandboxOptions, Cr as SandboxFleetWorkspaceRestoreResult, Ct as FleetExecDispatchOptions, Dn as PublicTemplateInfo, Dt as FleetPromptDispatchResult, Et as FleetPromptDispatchOptions, F as CreateIntelligenceReportOptions, Fi as UsageInfo, I as CreateRequestOptions, Jn as SandboxClientConfig, Jt as IntelligenceReportBudget, L as CreateSandboxFleetOptions, Mn as ReapExpiredSandboxFleetsResult, Nn as ReconcileSandboxFleetsOptions, On as PublicTemplateVersionInfo, Pn as ReconcileSandboxFleetsResult, Qn as SandboxFleetArtifact, R as CreateSandboxFleetTokenOptions, Sn as PromptResult, Sr as SandboxFleetWorkspaceReconcileResult, St as FleetDispatchStreamOptions, Tr as SandboxInfo, Tt as FleetMachineId, Xn as SandboxEnvironment, Yt as IntelligenceReportCompareTo, Zr as SecretsManager, Zt as IntelligenceReportWindow, _ as BatchResult, a as AttachSandboxFleetMachineOptions, ar as SandboxFleetInfo, bn as PromptInputPart, br as SandboxFleetUsage, bt as FleetDispatchResultBuffer, dr as SandboxFleetManifest, er as SandboxFleetCostEstimate, fi as SshKeysManager, g as BatchOptions, gi as SubscriptionInfo, gr as SandboxFleetTraceBundle, hr as SandboxFleetToken, jn as ReapExpiredSandboxFleetsOptions, ki as TokenRefreshHandler, kn as PublishPublicTemplateOptions, lr as SandboxFleetMachineRecord, m as BatchEvent, nn as ListSandboxOptions, nr as SandboxFleetDispatchResponse, ot as ExecOptions, pr as SandboxFleetOperationsSummary, qt as IntelligenceReport, rr as SandboxFleetDriverCapability, st as ExecResult, tn as ListSandboxFleetOptions, v as BatchRunOptions, wr as SandboxFleetWorkspaceSnapshotResult, wt as FleetExecDispatchResult, x as BatchTask, xn as PromptOptions, xt as FleetDispatchResultBufferOptions, y as BatchRunRequest, yr as SandboxFleetTraceOptions, yt as FleetDispatchCancelResult, z as CreateSandboxFleetWithCoordinatorOptions } from "./types-DACKEpON.js";
|
|
2
|
+
import { a as TraceExportSink, i as TraceExportResult, n as SandboxInstance, t as HttpClient } from "./sandbox-C0qo2TZO.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sse-parser.d.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as encodeTextForWire, i as SANDBOX_PROXY_REQUEST_MAX_BYTES, o as combineAbortSignals, s as encodePromptForWire } from "./runtime-api-
|
|
2
|
-
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, o as PartialFailureError, p as parseErrorResponse, t as AuthError } from "./errors-
|
|
3
|
-
import { f as exportTraceBundle, h as parseSSEStream, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, u as normalizeConnection } from "./sandbox-
|
|
1
|
+
import { c as encodeTextForWire, i as SANDBOX_PROXY_REQUEST_MAX_BYTES, o as combineAbortSignals, s as encodePromptForWire } from "./runtime-api-r8vQVMe4.js";
|
|
2
|
+
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, o as PartialFailureError, p as parseErrorResponse, t as AuthError } from "./errors-hbpL_-S6.js";
|
|
3
|
+
import { f as exportTraceBundle, h as parseSSEStream, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, u as normalizeConnection } from "./sandbox-C8WoMyT0.js";
|
|
4
4
|
//#region src/resources.ts
|
|
5
5
|
/**
|
|
6
6
|
* Compute tiers, ordered smallest → largest. Defined HERE (not imported from
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-
|
|
1
|
+
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-CeNQA9H_.js";
|
|
2
2
|
export { CollaborationClient, CollaborationFileBridge, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as TimeoutError, i as NetworkError, p as parseErrorResponse } from "./errors-
|
|
1
|
+
import { d as TimeoutError, i as NetworkError, p as parseErrorResponse } from "./errors-hbpL_-S6.js";
|
|
2
2
|
//#region src/collaboration/client.ts
|
|
3
3
|
const DEFAULT_TIMEOUT_MS = 3e4;
|
|
4
4
|
function normalizeBaseUrl(url) {
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as CreateSandboxOptions, Ir as SandboxStatus, Jn as SandboxClientConfig, Tr as SandboxInfo, dn as PreviewLinkInfo, fn as PreviewLinkManager, on as NetworkConfig, ot as ExecOptions, st as ExecResult } from "./types-
|
|
2
|
-
import { n as SandboxInstance } from "./sandbox-
|
|
3
|
-
import { i as SandboxClient } from "./client-
|
|
4
|
-
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-
|
|
1
|
+
import { B as CreateSandboxOptions, Ir as SandboxStatus, Jn as SandboxClientConfig, Tr as SandboxInfo, dn as PreviewLinkInfo, fn as PreviewLinkManager, on as NetworkConfig, ot as ExecOptions, st as ExecResult } from "./types-DACKEpON.js";
|
|
2
|
+
import { n as SandboxInstance } from "./sandbox-C0qo2TZO.js";
|
|
3
|
+
import { i as SandboxClient } from "./client-L4c2I5tL.js";
|
|
4
|
+
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-B-8AMQdY.js";
|
|
5
5
|
export { AuthError, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, QuotaError, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError };
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-
|
|
2
|
-
import { t as SandboxInstance } from "./sandbox-
|
|
3
|
-
import { n as SandboxClient } from "./client-
|
|
1
|
+
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-hbpL_-S6.js";
|
|
2
|
+
import { t as SandboxInstance } from "./sandbox-C8WoMyT0.js";
|
|
3
|
+
import { n as SandboxClient } from "./client-yksqE5VH.js";
|
|
4
4
|
export { AuthError, CapabilityError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError };
|
|
@@ -52,7 +52,7 @@ declare class NotFoundError extends SandboxError {
|
|
|
52
52
|
readonly resourceType: string;
|
|
53
53
|
/** The resource ID that was not found */
|
|
54
54
|
readonly resourceId: string;
|
|
55
|
-
constructor(resourceType: string, resourceId: string, metadata?: SandboxErrorMetadata);
|
|
55
|
+
constructor(resourceType: string, resourceId: string, metadata?: SandboxErrorMetadata, message?: string, code?: string);
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Account quota or rate limit exceeded.
|
|
@@ -51,8 +51,8 @@ var NotFoundError = class extends SandboxError {
|
|
|
51
51
|
resourceType;
|
|
52
52
|
/** The resource ID that was not found */
|
|
53
53
|
resourceId;
|
|
54
|
-
constructor(resourceType, resourceId, metadata) {
|
|
55
|
-
super(
|
|
54
|
+
constructor(resourceType, resourceId, metadata, message = `${resourceType} not found: ${resourceId}`, code = "NOT_FOUND") {
|
|
55
|
+
super(message, code, 404, metadata);
|
|
56
56
|
this.name = "NotFoundError";
|
|
57
57
|
this.resourceType = resourceType;
|
|
58
58
|
this.resourceId = resourceId;
|
|
@@ -257,7 +257,7 @@ function parseErrorResponse(status, body, context, headers) {
|
|
|
257
257
|
switch (status) {
|
|
258
258
|
case 400: return new ValidationError(message, data.fields, metadata, code);
|
|
259
259
|
case 401: return new AuthError(message, metadata);
|
|
260
|
-
case 404: return new NotFoundError(data.resourceType || "Resource", data.resourceId || "unknown", metadata);
|
|
260
|
+
case 404: return new NotFoundError(data.resourceType || "Resource", data.resourceId || "unknown", metadata, message, code);
|
|
261
261
|
case 408: return new TimeoutError(data.timeoutMs || 3e4, message, metadata);
|
|
262
262
|
case 409: return new StateError(message, data.currentState || "unknown", data.requiredState, metadata, code);
|
|
263
263
|
case 429: return new QuotaError(data.quotaType || "rate_limit", message, data.current, data.limit, metadata);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as CreateSandboxOptions } from "./types-
|
|
2
|
-
import { n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
1
|
+
import { B as CreateSandboxOptions } from "./types-DACKEpON.js";
|
|
2
|
+
import { n as SandboxInstance, t as HttpClient } from "./sandbox-C0qo2TZO.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tangle/abi.d.ts
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as DriverType, $i as AgentProfileValidationIssue, $n as SandboxFleetArtifactSpec, $r as SendSessionMessageRequest, $t as ListMessagesOptions, A as CodeResult, Ai as ToolsConfig, An as PublishPublicTemplateVersionOptions, Ar as SandboxProfileSummary, At as GitBranch, B as CreateSandboxOptions, Bi as WriteManyOptions, Bn as RolloutOptions, Br as SandboxTerminalRequestOptions, Bt as GpuLeaseManager, C as BatchTaskUsage, Ci as TaskSessionProfile, Cn as ProvisionEvent, Cr as SandboxFleetWorkspaceRestoreResult, Ct as FleetExecDispatchOptions, Di as TeePublicKey, Dn as PublicTemplateInfo, Dr as SandboxPermissionsConfig, E as ChunkedUploadResult, Ei as TeeAttestationResponse, En as ProvisionStep, Er as SandboxIntelligenceEnvelope, Et as FleetPromptDispatchOptions, F as CreateIntelligenceReportOptions, Fi as UsageInfo, Fn as RenameOptions, Fr as SandboxRuntimeProfileList, Ft as GpuLease, G as DirectoryPermission, Gi as AgentProfileFileMount, Gn as RunCodeOptions, Gr as SandboxUser, Gt as HostAgentRuntimeBackend, H as CreateTaskSessionOptions, Hi as AgentProfileCapabilities, Hn as RolloutStartResult, Hr as SandboxTraceEvent, Ht as GpuLeaseStatus, I as CreateRequestOptions, Ii as WaitForOptions, Ir as SandboxStatus, It as GpuLeaseBilling, J as DownloadOptions, Ji as AgentProfilePermissionValue, Jn as SandboxClientConfig, Jr as SearchMatch, Jt as IntelligenceReportBudget, K as DispatchPromptOptions, Ki as AgentProfileMcpServer, Kn as SSHCommandDescriptor, Kr as ScopedToken, Kt as InstalledTool, L as CreateSandboxFleetOptions, Li as WaitForRolloutOptions, Lr as SandboxTerminalCreateOptions, Lt as GpuLeaseCommandResult, M as CommitTaskSessionOptions, Mi as UpdateUserOptions, Mn as ReapExpiredSandboxFleetsResult, Mr as SandboxResources, Mt as GitConfig, N as CompletedTurnResult, Ni as UploadOptions, Nn as ReconcileSandboxFleetsOptions, Nr as SandboxRuntimeHealth, Nt as GitDiff, Oi as TeePublicKeyResponse, On as PublicTemplateVersionInfo, Or as SandboxPortBinding, Ot as GPU_LEASE_PROVIDER_NAMES, P as CreateGpuLeaseOptions, Pi as UploadProgress, Pn as ReconcileSandboxFleetsResult, Pr as SandboxRuntimeProfile, Pt as GitStatus, Q as DriverInfo, Qi as AgentProfileSecurityPolicy, Qn as SandboxFleetArtifact, Qr as SendSessionMessageOptions, Ri as WriteFileOptions, Rn as Rollout, Rr as SandboxTerminalInfo, Rt as GpuLeaseExecOptions, S as BatchTaskResult, Si as TaskSessionInfo, Sn as PromptResult, Sr as SandboxFleetWorkspaceReconcileResult, St as FleetDispatchStreamOptions, T as ChunkedUploadOptions, Ti as TeeAttestationReport, Tn as ProvisionStatus, Tr as SandboxInfo, Tt as FleetMachineId, U as DeleteOptions, Ui as AgentProfileConfidential, Un as RolloutStatus, Ur as SandboxTraceExport, Ut as GpuType, V as CreateSessionOptions, Vi as AgentProfile, Vn as RolloutScorer, Vr as SandboxTraceBundle, Vt as GpuLeaseProviderName, W as DevServerInfo, Wi as AgentProfileConnection, Wn as RolloutTurnPart, Wr as SandboxTraceOptions, Wt as HostAgentDriverConfig, X as DriveTurnOptions, Xi as AgentProfileResourceRef, Xn as SandboxEnvironment, Xr as SecretInfo, Xt as IntelligenceReportSubjectType, Y as DownloadProgress, Yi as AgentProfilePrompt, Yn as SandboxConnection, Yr as SearchOptions, Yt as IntelligenceReportCompareTo, Z as DriverConfig, Zi as AgentProfileResources, Zn as SandboxEvent, Zr as SecretsManager, Zt as IntelligenceReportWindow, _ as BatchResult, _i as TaskOptions, _n as ProcessSignal, _r as SandboxFleetTraceEvent, _t as FileTreeResult, a as AttachSandboxFleetMachineOptions, aa as defineAgentProfile, ai as SessionListOptions, an as MkdirOptions, ar as SandboxFleetInfo, at as ExactProcessSpawnOptions, b as BatchSidecarGroup, bi as TaskSessionCommitResult, br as SandboxFleetUsage, bt as FleetDispatchResultBuffer, c as BackendInfo, ca as mergeAgentProfiles, ci as SessionStatus, cn as NonHostAgentDriverConfig, cr as SandboxFleetMachineMeteredUsage, ct as FileInfo, d as BackendType, di as SnapshotResult, dn as PreviewLinkInfo, dr as SandboxFleetManifest, dt as FileReadError, ea as AgentProfileValidationResult, ei as SentSessionMessage, en as ListOptions, er as SandboxFleetCostEstimate, f as BatchBackend, fn as PreviewLinkManager, fr as SandboxFleetManifestMachine, ft as FileReadResult, g as BatchOptions, gi as SubscriptionInfo, gn as ProcessManager, gr as SandboxFleetTraceBundle, gt as FileTreeOptions, h as BatchEventDataMap, hi as StorageConfig, hn as ProcessLogEntry, hr as SandboxFleetToken, ht as FileTreeFile, i as AttachGpuLeaseOptions, ia as capabilitySchema, ii as SessionInfo, in as MintScopedTokenOptions, ir as SandboxFleetDriverTimings, it as EventStreamOptions, ji as TurnDriveResult, jn as ReapExpiredSandboxFleetsOptions, jr as SandboxResourceUsage, jt as GitCommit, ki as TokenRefreshHandler, kn as PublishPublicTemplateOptions, kr as SandboxPortPreviewLink, kt as GitAuth, l as BackendManager, la as validateAgentProfileSecurity, li as SnapshotInfo, ln as PermissionLevel, lr as SandboxFleetMachineRecord, lt as FileReadBatchOptions, m as BatchEvent, mi as StartupOperation, mn as ProcessInfo, mr as SandboxFleetPolicy, mt as FileSystem, n as AccessPolicyRule, na as Capability, ni as SessionEventStreamOptions, nn as ListSandboxOptions, nr as SandboxFleetDispatchResponse, nt as EgressPolicy, o as BackendCapabilities, oa as defineGitHubResource, oi as SessionMessage, on as NetworkConfig, or as SandboxFleetIntelligenceEnvelope, ot as ExecOptions, p as BatchBackendStats, pi as StartupDiagnostics, pn as Process, pr as SandboxFleetOperationsSummary, pt as FileRenameResult, q as DispatchedSession, qi as AgentProfileModelHints, qn as SSHCredentials, qr as ScopedTokenScope, qt as IntelligenceReport, r as AddUserOptions, ra as agentProfileSchema, ri as SessionForkOptions, rn as McpServerConfig, rr as SandboxFleetDriverCapability, rt as EnsureDevServerOptions, s as BackendConfig, sa as defineInlineResource, si as SessionMessageInputPart, sn as NetworkManager, sr as SandboxFleetMachine, st as ExecResult, t as AcceleratorKind, ta as AgentSubagentProfile, ti as SessionBackendCredentials, tn as ListSandboxFleetOptions, tr as SandboxFleetDispatchFailureClass, tt as EgressManager, u as BackendStatus, ui as SnapshotOptions, un as PermissionsManager, ur as SandboxFleetMachineSpec, ut as FileReadBatchResult, v as BatchRunOptions, vi as TaskResult, vn as ProcessSpawnOptions, vr as SandboxFleetTraceExport, vt as FileWriteResult, w as BranchOptions, wi as TeeAttestationOptions, wn as ProvisionResult, wr as SandboxFleetWorkspaceSnapshotResult, x as BatchTask, xi as TaskSessionFileChange, xn as PromptOptions, xr as SandboxFleetWorkspace, xt as FleetDispatchResultBufferOptions, y as BatchRunRequest, yi as TaskSessionChanges, yn as ProcessStatus, yr as SandboxFleetTraceOptions, yt as FleetDispatchCancelResult, z as CreateSandboxFleetWithCoordinatorOptions, zi as WriteManyFile, zn as RolloutChildResult, zr as SandboxTerminalManager, zt as GpuLeaseExecResult } from "./types-
|
|
2
|
-
import { C as SANDBOX_MCP_SERVER_NAME, D as buildControlPlaneMcpConfig, E as SandboxMcpServerEntry, O as buildSandboxMcpConfig, S as CONTROL_PLANE_MCP_SERVER_NAME, T as SandboxMcpEndpoint, _ as InterruptResult, a as TraceExportSink, b as BuildControlPlaneMcpConfigOptions, c as otelTraceIdForTangleTrace, d as SandboxSession, f as InteractiveAuthFile, g as InteractiveSessionStatus, h as InteractiveSessionInfo, i as TraceExportResult, l as toOtelJson, m as InteractiveSessionHost, n as SandboxInstance, o as buildTraceExportPayload, p as InteractiveSessionHandle, r as TraceExportFormat, s as exportTraceBundle, u as SandboxTaskSession, v as RespondToPermissionOptions, w as SandboxMcpConfig, x as BuildSandboxMcpConfigOptions, y as StartInteractiveOptions } from "./sandbox-
|
|
3
|
-
import { a as Team, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, i as SandboxClient, 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 DriverType, $i as AgentProfileValidationIssue, $n as SandboxFleetArtifactSpec, $r as SendSessionMessageRequest, $t as ListMessagesOptions, A as CodeResult, Ai as ToolsConfig, An as PublishPublicTemplateVersionOptions, Ar as SandboxProfileSummary, At as GitBranch, B as CreateSandboxOptions, Bi as WriteManyOptions, Bn as RolloutOptions, Br as SandboxTerminalRequestOptions, Bt as GpuLeaseManager, C as BatchTaskUsage, Ci as TaskSessionProfile, Cn as ProvisionEvent, Cr as SandboxFleetWorkspaceRestoreResult, Ct as FleetExecDispatchOptions, Di as TeePublicKey, Dn as PublicTemplateInfo, Dr as SandboxPermissionsConfig, E as ChunkedUploadResult, Ei as TeeAttestationResponse, En as ProvisionStep, Er as SandboxIntelligenceEnvelope, Et as FleetPromptDispatchOptions, F as CreateIntelligenceReportOptions, Fi as UsageInfo, Fn as RenameOptions, Fr as SandboxRuntimeProfileList, Ft as GpuLease, G as DirectoryPermission, Gi as AgentProfileFileMount, Gn as RunCodeOptions, Gr as SandboxUser, Gt as HostAgentRuntimeBackend, H as CreateTaskSessionOptions, Hi as AgentProfileCapabilities, Hn as RolloutStartResult, Hr as SandboxTraceEvent, Ht as GpuLeaseStatus, I as CreateRequestOptions, Ii as WaitForOptions, Ir as SandboxStatus, It as GpuLeaseBilling, J as DownloadOptions, Ji as AgentProfilePermissionValue, Jn as SandboxClientConfig, Jr as SearchMatch, Jt as IntelligenceReportBudget, K as DispatchPromptOptions, Ki as AgentProfileMcpServer, Kn as SSHCommandDescriptor, Kr as ScopedToken, Kt as InstalledTool, L as CreateSandboxFleetOptions, Li as WaitForRolloutOptions, Lr as SandboxTerminalCreateOptions, Lt as GpuLeaseCommandResult, M as CommitTaskSessionOptions, Mi as UpdateUserOptions, Mn as ReapExpiredSandboxFleetsResult, Mr as SandboxResources, Mt as GitConfig, N as CompletedTurnResult, Ni as UploadOptions, Nn as ReconcileSandboxFleetsOptions, Nr as SandboxRuntimeHealth, Nt as GitDiff, Oi as TeePublicKeyResponse, On as PublicTemplateVersionInfo, Or as SandboxPortBinding, Ot as GPU_LEASE_PROVIDER_NAMES, P as CreateGpuLeaseOptions, Pi as UploadProgress, Pn as ReconcileSandboxFleetsResult, Pr as SandboxRuntimeProfile, Pt as GitStatus, Q as DriverInfo, Qi as AgentProfileSecurityPolicy, Qn as SandboxFleetArtifact, Qr as SendSessionMessageOptions, Ri as WriteFileOptions, Rn as Rollout, Rr as SandboxTerminalInfo, Rt as GpuLeaseExecOptions, S as BatchTaskResult, Si as TaskSessionInfo, Sn as PromptResult, Sr as SandboxFleetWorkspaceReconcileResult, St as FleetDispatchStreamOptions, T as ChunkedUploadOptions, Ti as TeeAttestationReport, Tn as ProvisionStatus, Tr as SandboxInfo, Tt as FleetMachineId, U as DeleteOptions, Ui as AgentProfileConfidential, Un as RolloutStatus, Ur as SandboxTraceExport, Ut as GpuType, V as CreateSessionOptions, Vi as AgentProfile, Vn as RolloutScorer, Vr as SandboxTraceBundle, Vt as GpuLeaseProviderName, W as DevServerInfo, Wi as AgentProfileConnection, Wn as RolloutTurnPart, Wr as SandboxTraceOptions, Wt as HostAgentDriverConfig, X as DriveTurnOptions, Xi as AgentProfileResourceRef, Xn as SandboxEnvironment, Xr as SecretInfo, Xt as IntelligenceReportSubjectType, Y as DownloadProgress, Yi as AgentProfilePrompt, Yn as SandboxConnection, Yr as SearchOptions, Yt as IntelligenceReportCompareTo, Z as DriverConfig, Zi as AgentProfileResources, Zn as SandboxEvent, Zr as SecretsManager, Zt as IntelligenceReportWindow, _ as BatchResult, _i as TaskOptions, _n as ProcessSignal, _r as SandboxFleetTraceEvent, _t as FileTreeResult, a as AttachSandboxFleetMachineOptions, aa as defineAgentProfile, ai as SessionListOptions, an as MkdirOptions, ar as SandboxFleetInfo, at as ExactProcessSpawnOptions, b as BatchSidecarGroup, bi as TaskSessionCommitResult, br as SandboxFleetUsage, bt as FleetDispatchResultBuffer, c as BackendInfo, ca as mergeAgentProfiles, ci as SessionStatus, cn as NonHostAgentDriverConfig, cr as SandboxFleetMachineMeteredUsage, ct as FileInfo, d as BackendType, di as SnapshotResult, dn as PreviewLinkInfo, dr as SandboxFleetManifest, dt as FileReadError, ea as AgentProfileValidationResult, ei as SentSessionMessage, en as ListOptions, er as SandboxFleetCostEstimate, f as BatchBackend, fn as PreviewLinkManager, fr as SandboxFleetManifestMachine, ft as FileReadResult, g as BatchOptions, gi as SubscriptionInfo, gn as ProcessManager, gr as SandboxFleetTraceBundle, gt as FileTreeOptions, h as BatchEventDataMap, hi as StorageConfig, hn as ProcessLogEntry, hr as SandboxFleetToken, ht as FileTreeFile, i as AttachGpuLeaseOptions, ia as capabilitySchema, ii as SessionInfo, in as MintScopedTokenOptions, ir as SandboxFleetDriverTimings, it as EventStreamOptions, ji as TurnDriveResult, jn as ReapExpiredSandboxFleetsOptions, jr as SandboxResourceUsage, jt as GitCommit, ki as TokenRefreshHandler, kn as PublishPublicTemplateOptions, kr as SandboxPortPreviewLink, kt as GitAuth, l as BackendManager, la as validateAgentProfileSecurity, li as SnapshotInfo, ln as PermissionLevel, lr as SandboxFleetMachineRecord, lt as FileReadBatchOptions, m as BatchEvent, mi as StartupOperation, mn as ProcessInfo, mr as SandboxFleetPolicy, mt as FileSystem, n as AccessPolicyRule, na as Capability, ni as SessionEventStreamOptions, nn as ListSandboxOptions, nr as SandboxFleetDispatchResponse, nt as EgressPolicy, o as BackendCapabilities, oa as defineGitHubResource, oi as SessionMessage, on as NetworkConfig, or as SandboxFleetIntelligenceEnvelope, ot as ExecOptions, p as BatchBackendStats, pi as StartupDiagnostics, pn as Process, pr as SandboxFleetOperationsSummary, pt as FileRenameResult, q as DispatchedSession, qi as AgentProfileModelHints, qn as SSHCredentials, qr as ScopedTokenScope, qt as IntelligenceReport, r as AddUserOptions, ra as agentProfileSchema, ri as SessionForkOptions, rn as McpServerConfig, rr as SandboxFleetDriverCapability, rt as EnsureDevServerOptions, s as BackendConfig, sa as defineInlineResource, si as SessionMessageInputPart, sn as NetworkManager, sr as SandboxFleetMachine, st as ExecResult, t as AcceleratorKind, ta as AgentSubagentProfile, ti as SessionBackendCredentials, tn as ListSandboxFleetOptions, tr as SandboxFleetDispatchFailureClass, tt as EgressManager, u as BackendStatus, ui as SnapshotOptions, un as PermissionsManager, ur as SandboxFleetMachineSpec, ut as FileReadBatchResult, v as BatchRunOptions, vi as TaskResult, vn as ProcessSpawnOptions, vr as SandboxFleetTraceExport, vt as FileWriteResult, w as BranchOptions, wi as TeeAttestationOptions, wn as ProvisionResult, wr as SandboxFleetWorkspaceSnapshotResult, x as BatchTask, xi as TaskSessionFileChange, xn as PromptOptions, xr as SandboxFleetWorkspace, xt as FleetDispatchResultBufferOptions, y as BatchRunRequest, yi as TaskSessionChanges, yn as ProcessStatus, yr as SandboxFleetTraceOptions, yt as FleetDispatchCancelResult, z as CreateSandboxFleetWithCoordinatorOptions, zi as WriteManyFile, zn as RolloutChildResult, zr as SandboxTerminalManager, zt as GpuLeaseExecResult } from "./types-DACKEpON.js";
|
|
2
|
+
import { C as SANDBOX_MCP_SERVER_NAME, D as buildControlPlaneMcpConfig, E as SandboxMcpServerEntry, O as buildSandboxMcpConfig, S as CONTROL_PLANE_MCP_SERVER_NAME, T as SandboxMcpEndpoint, _ as InterruptResult, a as TraceExportSink, b as BuildControlPlaneMcpConfigOptions, c as otelTraceIdForTangleTrace, d as SandboxSession, f as InteractiveAuthFile, g as InteractiveSessionStatus, h as InteractiveSessionInfo, i as TraceExportResult, l as toOtelJson, m as InteractiveSessionHost, n as SandboxInstance, o as buildTraceExportPayload, p as InteractiveSessionHandle, r as TraceExportFormat, s as exportTraceBundle, u as SandboxTaskSession, v as RespondToPermissionOptions, w as SandboxMcpConfig, x as BuildSandboxMcpConfigOptions, y as StartInteractiveOptions } from "./sandbox-C0qo2TZO.js";
|
|
3
|
+
import { a as Team, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, i as SandboxClient, 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-L4c2I5tL.js";
|
|
4
4
|
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-CyHojkuA.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-DKzapw-9.js";
|
|
6
|
-
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-
|
|
7
|
-
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
6
|
+
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-B-8AMQdY.js";
|
|
7
|
+
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-XaVF9qK-.js";
|
|
8
8
|
|
|
9
9
|
//#region src/attestation-heartbeat.d.ts
|
|
10
10
|
interface TeeAttestationHeartbeatSample {
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as serializeForSidecar, l as normalizeRuntimeBackendConfig } from "./runtime-api-
|
|
2
|
-
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as StateError } from "./errors-
|
|
3
|
-
import { a as SandboxSession, c as collectAgentResponseText, d as buildTraceExportPayload, f as exportTraceBundle, h as parseSSEStream, i as SandboxTaskSession, l as getSandboxEventText, m as toOtelJson, o as InteractiveSessionHandle, p as otelTraceIdForTangleTrace, s as applySandboxEventText, t as SandboxInstance } from "./sandbox-
|
|
4
|
-
import { a as validateDeferredProfileFileMounts, c as DEFAULT_SANDBOX_SIZE, d as resolveSandboxResources, f as sandboxResourcesForSize, i as splitInlineProfileFileMounts, l as SANDBOX_SIZE_PRESETS, n as SandboxClient, o as SandboxFleet, r as materializeProfileFileMounts, s as SandboxFleetClient, t as IntelligenceClient, u as SANDBOX_SIZE_PRESET_NAMES } from "./client-
|
|
5
|
-
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-
|
|
6
|
-
import { t as TangleSandboxClient } from "./tangle-
|
|
1
|
+
import { d as serializeForSidecar, l as normalizeRuntimeBackendConfig } from "./runtime-api-r8vQVMe4.js";
|
|
2
|
+
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as StateError } from "./errors-hbpL_-S6.js";
|
|
3
|
+
import { a as SandboxSession, c as collectAgentResponseText, d as buildTraceExportPayload, f as exportTraceBundle, h as parseSSEStream, i as SandboxTaskSession, l as getSandboxEventText, m as toOtelJson, o as InteractiveSessionHandle, p as otelTraceIdForTangleTrace, s as applySandboxEventText, t as SandboxInstance } from "./sandbox-C8WoMyT0.js";
|
|
4
|
+
import { a as validateDeferredProfileFileMounts, c as DEFAULT_SANDBOX_SIZE, d as resolveSandboxResources, f as sandboxResourcesForSize, i as splitInlineProfileFileMounts, l as SANDBOX_SIZE_PRESETS, n as SandboxClient, o as SandboxFleet, r as materializeProfileFileMounts, s as SandboxFleetClient, t as IntelligenceClient, u as SANDBOX_SIZE_PRESET_NAMES } from "./client-yksqE5VH.js";
|
|
5
|
+
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-CeNQA9H_.js";
|
|
6
|
+
import { t as TangleSandboxClient } from "./tangle-m1lRkQlR.js";
|
|
7
7
|
import { agentProfileSchema, capabilitySchema, defineAgentProfile, defineGitHubResource, defineInlineResource, mergeAgentProfiles, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
8
8
|
//#region src/confidential.ts
|
|
9
9
|
function generateAttestationNonce(bytes = 32) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as TimeoutError, i as NetworkError, p as parseErrorResponse } from "../errors-
|
|
1
|
+
import { d as TimeoutError, i as NetworkError, p as parseErrorResponse } from "../errors-hbpL_-S6.js";
|
|
2
2
|
//#region src/intelligence/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* `@tangle-network/sandbox/intelligence` — browser-safe typed client for the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, p as parseErrorResponse, s as QuotaError } from "./errors-
|
|
1
|
+
import { c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, p as parseErrorResponse, s as QuotaError } from "./errors-hbpL_-S6.js";
|
|
2
2
|
//#region src/backend-config.ts
|
|
3
3
|
const LEGACY_QUESTION_ALIAS_KEY = ["question", "Channel"].join("");
|
|
4
4
|
function normalizeRuntimeModelOverride(model) {
|
|
@@ -665,6 +665,7 @@ function normalizeSessionInfo(raw) {
|
|
|
665
665
|
"failed",
|
|
666
666
|
"cancelled"
|
|
667
667
|
].includes(status) ? status : "running",
|
|
668
|
+
latestExecutionId: typeof raw.latestExecutionId === "string" && raw.latestExecutionId.length > 0 ? raw.latestExecutionId : void 0,
|
|
668
669
|
backend: typeof raw.backendType === "string" ? raw.backendType : typeof raw.backend === "string" ? raw.backend : void 0,
|
|
669
670
|
model: typeof raw.model === "string" ? raw.model : void 0,
|
|
670
671
|
promptCount: typeof raw.promptCount === "number" ? raw.promptCount : void 0,
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $r as SendSessionMessageRequest, $t as ListMessagesOptions, Br as SandboxTerminalRequestOptions, E as ChunkedUploadResult, Fn as RenameOptions, Fr as SandboxRuntimeProfileList, H as CreateTaskSessionOptions, Lr as SandboxTerminalCreateOptions, M as CommitTaskSessionOptions, Nr as SandboxRuntimeHealth, Or as SandboxPortBinding, Pi as UploadProgress, Qr as SendSessionMessageOptions, Ri as WriteFileOptions, Rr as SandboxTerminalInfo, Si as TaskSessionInfo, T as ChunkedUploadOptions, V as CreateSessionOptions, _t as FileTreeResult, bi as TaskSessionCommitResult, ei as SentSessionMessage, gt as FileTreeOptions, ii as SessionInfo, lt as FileReadBatchOptions, oi as SessionMessage, pt as FileRenameResult, ut as FileReadBatchResult, vt as FileWriteResult, yi as TaskSessionChanges, zr as SandboxTerminalManager } from "./types-
|
|
2
|
-
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-
|
|
1
|
+
import { $r as SendSessionMessageRequest, $t as ListMessagesOptions, Br as SandboxTerminalRequestOptions, E as ChunkedUploadResult, Fn as RenameOptions, Fr as SandboxRuntimeProfileList, H as CreateTaskSessionOptions, Lr as SandboxTerminalCreateOptions, M as CommitTaskSessionOptions, Nr as SandboxRuntimeHealth, Or as SandboxPortBinding, Pi as UploadProgress, Qr as SendSessionMessageOptions, Ri as WriteFileOptions, Rr as SandboxTerminalInfo, Si as TaskSessionInfo, T as ChunkedUploadOptions, V as CreateSessionOptions, _t as FileTreeResult, bi as TaskSessionCommitResult, ei as SentSessionMessage, gt as FileTreeOptions, ii as SessionInfo, lt as FileReadBatchOptions, oi as SessionMessage, pt as FileRenameResult, ut as FileReadBatchResult, vt as FileWriteResult, yi as TaskSessionChanges, zr as SandboxTerminalManager } from "./types-DACKEpON.js";
|
|
2
|
+
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-B-8AMQdY.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/chunked-upload.d.ts
|
|
5
5
|
/** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
|
package/dist/runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as combineAbortSignals, r as uploadChunked, t as SandboxRuntimeApi } from "./runtime-api-
|
|
2
|
-
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-
|
|
1
|
+
import { o as combineAbortSignals, r as uploadChunked, t as SandboxRuntimeApi } from "./runtime-api-r8vQVMe4.js";
|
|
2
|
+
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-hbpL_-S6.js";
|
|
3
3
|
//#region src/runtime-client.ts
|
|
4
4
|
const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
|
|
5
5
|
function requireToken(token) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $r as SendSessionMessageRequest, $t as ListMessagesOptions, At as GitBranch, Bi as WriteManyOptions, Bn as RolloutOptions, Bt as GpuLeaseManager, Cn as ProvisionEvent, D as CodeExecutionOptions, Ei as TeeAttestationResponse, Fr as SandboxRuntimeProfileList, Ft as GpuLease, H as CreateTaskSessionOptions, Hn as RolloutStartResult, Ii as WaitForOptions, In as RestoreSnapshotOptions, Ir as SandboxStatus, Jr as SearchMatch, Jt as IntelligenceReportBudget, K as DispatchPromptOptions, Kn as SSHCommandDescriptor, Kr as ScopedToken, Kt as InstalledTool, Li as WaitForRolloutOptions, Ln as ResumeOptions, M as CommitTaskSessionOptions, N as CompletedTurnResult, Nr as SandboxRuntimeHealth, Nt as GitDiff, O as CodeExecutionResult, Oi as TeePublicKeyResponse, Or as SandboxPortBinding, Pt as GitStatus, Q as DriverInfo, Qr as SendSessionMessageOptions, Qt as JsonValue, Ri as WriteFileOptions, Rn as Rollout, Si as TaskSessionInfo, Sn as PromptResult, Tr as SandboxInfo, V as CreateSessionOptions, Vr as SandboxTraceBundle, Wr as SandboxTraceOptions, X as DriveTurnOptions, Yn as SandboxConnection, Yr as SearchOptions, Yt as IntelligenceReportCompareTo, Zn as SandboxEvent, Zt as IntelligenceReportWindow, _i as TaskOptions, ai as SessionListOptions, bi as TaskSessionCommitResult, bn as PromptInputPart, di as SnapshotResult, ei as SentSessionMessage, et as DurablePlan, fn as PreviewLinkManager, gn as ProcessManager, gr as SandboxFleetTraceBundle, ii as SessionInfo, in as MintScopedTokenOptions, it as EventStreamOptions, ji as TurnDriveResult, jr as SandboxResourceUsage, jt as GitCommit, k as CodeLanguage, l as BackendManager, li as SnapshotInfo, mt as FileSystem, ni as SessionEventStreamOptions, oi as SessionMessage, ot as ExecOptions, pi as StartupDiagnostics, q as DispatchedSession, qn as SSHCredentials, qt as IntelligenceReport, ri as SessionForkOptions, s as BackendConfig, sn as NetworkManager, st as ExecResult, tt as EgressManager, ui as SnapshotOptions, un as PermissionsManager, vi as TaskResult, vt as FileWriteResult, w as BranchOptions, wi as TeeAttestationOptions, wn as ProvisionResult, xn as PromptOptions, yi as TaskSessionChanges, zi as WriteManyFile, zr as SandboxTerminalManager } from "./types-
|
|
1
|
+
import { $r as SendSessionMessageRequest, $t as ListMessagesOptions, At as GitBranch, Bi as WriteManyOptions, Bn as RolloutOptions, Bt as GpuLeaseManager, Cn as ProvisionEvent, D as CodeExecutionOptions, Ei as TeeAttestationResponse, Fr as SandboxRuntimeProfileList, Ft as GpuLease, H as CreateTaskSessionOptions, Hn as RolloutStartResult, Ii as WaitForOptions, In as RestoreSnapshotOptions, Ir as SandboxStatus, Jr as SearchMatch, Jt as IntelligenceReportBudget, K as DispatchPromptOptions, Kn as SSHCommandDescriptor, Kr as ScopedToken, Kt as InstalledTool, Li as WaitForRolloutOptions, Ln as ResumeOptions, M as CommitTaskSessionOptions, N as CompletedTurnResult, Nr as SandboxRuntimeHealth, Nt as GitDiff, O as CodeExecutionResult, Oi as TeePublicKeyResponse, Or as SandboxPortBinding, Pt as GitStatus, Q as DriverInfo, Qr as SendSessionMessageOptions, Qt as JsonValue, Ri as WriteFileOptions, Rn as Rollout, Si as TaskSessionInfo, Sn as PromptResult, Tr as SandboxInfo, V as CreateSessionOptions, Vr as SandboxTraceBundle, Wr as SandboxTraceOptions, X as DriveTurnOptions, Yn as SandboxConnection, Yr as SearchOptions, Yt as IntelligenceReportCompareTo, Zn as SandboxEvent, Zt as IntelligenceReportWindow, _i as TaskOptions, ai as SessionListOptions, bi as TaskSessionCommitResult, bn as PromptInputPart, di as SnapshotResult, ei as SentSessionMessage, et as DurablePlan, fn as PreviewLinkManager, gn as ProcessManager, gr as SandboxFleetTraceBundle, ii as SessionInfo, in as MintScopedTokenOptions, it as EventStreamOptions, ji as TurnDriveResult, jr as SandboxResourceUsage, jt as GitCommit, k as CodeLanguage, l as BackendManager, li as SnapshotInfo, mt as FileSystem, ni as SessionEventStreamOptions, oi as SessionMessage, ot as ExecOptions, pi as StartupDiagnostics, q as DispatchedSession, qn as SSHCredentials, qt as IntelligenceReport, ri as SessionForkOptions, s as BackendConfig, sn as NetworkManager, st as ExecResult, tt as EgressManager, ui as SnapshotOptions, un as PermissionsManager, vi as TaskResult, vt as FileWriteResult, w as BranchOptions, wi as TeeAttestationOptions, wn as ProvisionResult, xn as PromptOptions, yi as TaskSessionChanges, zi as WriteManyFile, zr as SandboxTerminalManager } from "./types-DACKEpON.js";
|
|
2
2
|
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
3
3
|
|
|
4
4
|
//#region src/mcp.d.ts
|
|
@@ -256,7 +256,7 @@ interface SandboxSessionHost extends InteractiveSessionHost {
|
|
|
256
256
|
prompt(message: string | PromptInputPart[], options?: PromptOptions): Promise<PromptResult>;
|
|
257
257
|
_sessionStatus(id: string): Promise<SessionInfo | null>;
|
|
258
258
|
_sessionEvents(id: string, opts?: SessionEventStreamOptions): AsyncGenerator<SandboxEvent>;
|
|
259
|
-
_sessionResult(id: string): Promise<PromptResult>;
|
|
259
|
+
_sessionResult(id: string, session?: SessionInfo): Promise<PromptResult>;
|
|
260
260
|
_sessionCancel(id: string): Promise<void>;
|
|
261
261
|
_sessionDelete(id: string): Promise<void>;
|
|
262
262
|
_sessionSendMessage(id: string, request: SendSessionMessageRequest, options?: SendSessionMessageOptions): Promise<SentSessionMessage>;
|
|
@@ -307,9 +307,10 @@ declare class SandboxSession {
|
|
|
307
307
|
*/
|
|
308
308
|
events(opts?: SessionEventStreamOptions): AsyncGenerator<SandboxEvent>;
|
|
309
309
|
/**
|
|
310
|
-
* Await the session's terminal result.
|
|
311
|
-
* until the session reaches a terminal state,
|
|
312
|
-
* aggregated `PromptResult`.
|
|
310
|
+
* Await the session's terminal result. Reads status and drains events
|
|
311
|
+
* from the latest execution until the session reaches a terminal state,
|
|
312
|
+
* then returns the aggregated `PromptResult`. Event replay makes this safe
|
|
313
|
+
* to call after the execution has already finished.
|
|
313
314
|
*
|
|
314
315
|
* Use this to wait for a session that was started by another caller
|
|
315
316
|
* (e.g. `dispatchPrompt`).
|
|
@@ -327,8 +328,10 @@ declare class SandboxSession {
|
|
|
327
328
|
*/
|
|
328
329
|
prompt(message: string | PromptInputPart[], opts?: PromptOptions): Promise<PromptResult>;
|
|
329
330
|
/**
|
|
330
|
-
*
|
|
331
|
-
*
|
|
331
|
+
* Submit a structured message through the session message endpoint. The
|
|
332
|
+
* returned receipt confirms admission; follow progress with `events()` or
|
|
333
|
+
* await the terminal response with `result()`. Model and message identifiers
|
|
334
|
+
* are translated to the runtime's wire names by the SDK.
|
|
332
335
|
*/
|
|
333
336
|
sendMessage(request: SendSessionMessageRequest, options?: SendSessionMessageOptions): Promise<SentSessionMessage>;
|
|
334
337
|
/**
|
|
@@ -1577,7 +1580,7 @@ declare class SandboxInstance {
|
|
|
1577
1580
|
/** @internal — invoked by SandboxSession.events(). */
|
|
1578
1581
|
_sessionEvents(id: string, opts?: SessionEventStreamOptions, stopOnTurnTerminal?: boolean): AsyncGenerator<SandboxEvent>;
|
|
1579
1582
|
/** @internal — invoked by SandboxSession.result(). */
|
|
1580
|
-
_sessionResult(id: string): Promise<PromptResult>;
|
|
1583
|
+
_sessionResult(id: string, knownSession?: SessionInfo): Promise<PromptResult>;
|
|
1581
1584
|
/**
|
|
1582
1585
|
* @internal — invoked by SandboxSession.cancel(). Void-returning alias of
|
|
1583
1586
|
* `_interrupt`: both abort the in-flight execution via `POST /{id}/abort`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as normalizeRuntimeBackendConfig, n as normalizeSessionInfo, o as combineAbortSignals, r as uploadChunked, s as encodePromptForWire, t as SandboxRuntimeApi, u as normalizeRuntimeModelOverride } from "./runtime-api-
|
|
2
|
-
import { c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, p as parseErrorResponse, s as QuotaError, t as AuthError, u as StateError } from "./errors-
|
|
1
|
+
import { l as normalizeRuntimeBackendConfig, n as normalizeSessionInfo, o as combineAbortSignals, r as uploadChunked, s as encodePromptForWire, t as SandboxRuntimeApi, u as normalizeRuntimeModelOverride } from "./runtime-api-r8vQVMe4.js";
|
|
2
|
+
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, p as parseErrorResponse, s as QuotaError, t as AuthError, u as StateError } from "./errors-hbpL_-S6.js";
|
|
3
3
|
import { addTokenUsage, readTokenCostUsd, readTokenUsage } from "@tangle-network/agent-core";
|
|
4
4
|
//#region src/lib/sse-parser.ts
|
|
5
5
|
/**
|
|
@@ -519,9 +519,10 @@ var SandboxSession = class SandboxSession {
|
|
|
519
519
|
return this.box._sessionEvents(this.id, opts);
|
|
520
520
|
}
|
|
521
521
|
/**
|
|
522
|
-
* Await the session's terminal result.
|
|
523
|
-
* until the session reaches a terminal state,
|
|
524
|
-
* aggregated `PromptResult`.
|
|
522
|
+
* Await the session's terminal result. Reads status and drains events
|
|
523
|
+
* from the latest execution until the session reaches a terminal state,
|
|
524
|
+
* then returns the aggregated `PromptResult`. Event replay makes this safe
|
|
525
|
+
* to call after the execution has already finished.
|
|
525
526
|
*
|
|
526
527
|
* Use this to wait for a session that was started by another caller
|
|
527
528
|
* (e.g. `dispatchPrompt`).
|
|
@@ -551,8 +552,10 @@ var SandboxSession = class SandboxSession {
|
|
|
551
552
|
});
|
|
552
553
|
}
|
|
553
554
|
/**
|
|
554
|
-
*
|
|
555
|
-
*
|
|
555
|
+
* Submit a structured message through the session message endpoint. The
|
|
556
|
+
* returned receipt confirms admission; follow progress with `events()` or
|
|
557
|
+
* await the terminal response with `result()`. Model and message identifiers
|
|
558
|
+
* are translated to the runtime's wire names by the SDK.
|
|
556
559
|
*/
|
|
557
560
|
async sendMessage(request, options) {
|
|
558
561
|
return this.box._sessionSendMessage(this.id, request, options);
|
|
@@ -4578,7 +4581,11 @@ var SandboxInstance = class SandboxInstance {
|
|
|
4578
4581
|
};
|
|
4579
4582
|
}
|
|
4580
4583
|
if (info) {
|
|
4581
|
-
|
|
4584
|
+
if (!info.latestExecutionId) return {
|
|
4585
|
+
state: "failed",
|
|
4586
|
+
error: `session ${opts.sessionId} ${info.status}: no execution result is available`
|
|
4587
|
+
};
|
|
4588
|
+
const result = await this._sessionResult(opts.sessionId, info);
|
|
4582
4589
|
const settled = settleTurnDrive({ ...result });
|
|
4583
4590
|
if (settled.state === "awaiting_plan_decision") return settled;
|
|
4584
4591
|
if (!result.success) return {
|
|
@@ -4656,8 +4663,17 @@ var SandboxInstance = class SandboxInstance {
|
|
|
4656
4663
|
}
|
|
4657
4664
|
}
|
|
4658
4665
|
/** @internal — invoked by SandboxSession.result(). */
|
|
4659
|
-
async _sessionResult(id) {
|
|
4666
|
+
async _sessionResult(id, knownSession) {
|
|
4660
4667
|
const startTime = Date.now();
|
|
4668
|
+
const session = knownSession ?? await this._sessionStatus(id);
|
|
4669
|
+
if (!session) throw new NotFoundError("Session", id, {
|
|
4670
|
+
origin: "runtime",
|
|
4671
|
+
endpoint: `/agents/sessions/${encodeURIComponent(id)}`
|
|
4672
|
+
});
|
|
4673
|
+
if (!session.latestExecutionId) throw new StateError(`Session ${id} has no execution result to await`, session.status, "session with an admitted execution", {
|
|
4674
|
+
origin: "runtime",
|
|
4675
|
+
endpoint: `/agents/sessions/${encodeURIComponent(id)}`
|
|
4676
|
+
}, "SESSION_EXECUTION_MISSING");
|
|
4661
4677
|
let response;
|
|
4662
4678
|
let runError;
|
|
4663
4679
|
let runErrorCode;
|
|
@@ -4668,7 +4684,10 @@ var SandboxInstance = class SandboxInstance {
|
|
|
4668
4684
|
let question;
|
|
4669
4685
|
let plan;
|
|
4670
4686
|
let terminalReached = false;
|
|
4671
|
-
for await (const event of this._sessionEvents(id,
|
|
4687
|
+
for await (const event of this._sessionEvents(id, {
|
|
4688
|
+
since: "0",
|
|
4689
|
+
executionId: session.latestExecutionId
|
|
4690
|
+
}, true)) {
|
|
4672
4691
|
response = applySandboxEventText(response, event);
|
|
4673
4692
|
if (event.type === "result" || event.type === "done") {
|
|
4674
4693
|
const data = event.data;
|
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-XaVF9qK-.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-m1lRkQlR.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
|
-
import { p as parseErrorResponse } from "./errors-
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
1
|
+
import { p as parseErrorResponse } from "./errors-hbpL_-S6.js";
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-C8WoMyT0.js";
|
|
3
3
|
//#region src/tangle/abi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tangle Contract ABI Definitions
|
|
@@ -1744,6 +1744,8 @@ interface SessionInfo {
|
|
|
1744
1744
|
parentId?: string;
|
|
1745
1745
|
/** Current lifecycle state. */
|
|
1746
1746
|
status: SessionStatus;
|
|
1747
|
+
/** Most recent execution id, retained after completion for event replay. */
|
|
1748
|
+
latestExecutionId?: string;
|
|
1747
1749
|
/** Backend identifier (e.g. provider name). */
|
|
1748
1750
|
backend?: string;
|
|
1749
1751
|
/** Model id the session was created with. */
|
|
@@ -1833,14 +1835,16 @@ interface SendSessionMessageOptions {
|
|
|
1833
1835
|
timeoutMs?: number;
|
|
1834
1836
|
signal?: AbortSignal;
|
|
1835
1837
|
}
|
|
1836
|
-
/**
|
|
1838
|
+
/** Receipt returned after a session message is accepted for processing. */
|
|
1837
1839
|
interface SentSessionMessage {
|
|
1838
1840
|
info: {
|
|
1839
1841
|
id: string;
|
|
1840
|
-
role: "
|
|
1841
|
-
timestamp
|
|
1842
|
+
role: "assistant";
|
|
1843
|
+
timestamp: string;
|
|
1842
1844
|
};
|
|
1843
|
-
parts:
|
|
1845
|
+
parts: [];
|
|
1846
|
+
userMessageId: string;
|
|
1847
|
+
processing: true;
|
|
1844
1848
|
}
|
|
1845
1849
|
/** Canonical portable profile attached to a task session. */
|
|
1846
1850
|
type TaskSessionProfile = AgentProfile$1 & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.11.1-develop.
|
|
3
|
+
"version": "0.11.1-develop.20260718200351.2f5db96",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"url": "https://github.com/tangle-network/agent-dev-container/issues"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@tangle-network/agent-core": "
|
|
91
|
-
"@tangle-network/agent-interface": "0.
|
|
90
|
+
"@tangle-network/agent-core": "0.4.19",
|
|
91
|
+
"@tangle-network/agent-interface": "0.31.0"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@mastra/core": "^1.36.0",
|