@tangle-network/sandbox 0.9.3 → 0.9.4-develop.20260627151756.06a2afc
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 +2 -2
- package/dist/{client-BBZ7YLmq.js → client-B8iqCNnm.js} +1 -1
- package/dist/{client-D3FqPlde.d.ts → client-QRSrhhlr.d.ts} +1 -1
- package/dist/core.d.ts +2 -2
- package/dist/core.js +2 -2
- package/dist/{index-Dy1fHLYz.d.ts → index-DXa7OlnO.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/{sandbox-B55j2q9K.d.ts → sandbox-C2x9Yumw.d.ts} +26 -29
- package/dist/{sandbox-joKtQ5y3.js → sandbox-DgWaRMlI.js} +77 -31
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-DM0o66lW.js → tangle-C2uTDxJ0.js} +1 -1
- package/package.json +3 -3
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as SandboxClient } from "../client-
|
|
1
|
+
import { G as CodeExecutionOptions, K as CodeExecutionResult, Y as CodeResultPart, n as SandboxInstance, q as CodeLanguage } from "../sandbox-C2x9Yumw.js";
|
|
2
|
+
import { i as SandboxClient } from "../client-QRSrhhlr.js";
|
|
3
3
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/tools/_specs.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as encodePromptForWire, l as exportTraceBundle, p as parseSSEStream, s as normalizeConnection, t as SandboxInstance } from "./sandbox-
|
|
1
|
+
import { f as encodePromptForWire, l as exportTraceBundle, p as parseSSEStream, s as normalizeConnection, t as SandboxInstance } from "./sandbox-DgWaRMlI.js";
|
|
2
2
|
import { d as ValidationError, f as parseErrorResponse, i as NotFoundError, r as NetworkError, t as AuthError, u as TimeoutError } from "./errors-DZsfJUuc.js";
|
|
3
3
|
//#region src/resources.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as CreateSandboxFleetOptions, $n as SandboxFleetTraceBundle, A as AttachSandboxFleetMachineOptions, B as BatchTask, Bn as SandboxFleetDriverCapability, Cn as PublishPublicTemplateVersionOptions, Ct as FleetDispatchStreamOptions, Dn as ReconcileSandboxFleetsResult, Dt as FleetPromptDispatchOptions, En as ReconcileSandboxFleetsOptions, Et as FleetMachineId, Fn as SandboxFleetArtifact, Gr as TokenRefreshHandler, Gt as IntelligenceReportWindow, Hn as SandboxFleetInfo, Ht as IntelligenceReportBudget, In as SandboxFleetArtifactSpec, Jn as SandboxFleetManifest, Jt as ListSandboxFleetOptions, Kn as SandboxFleetMachineRecord, L as BatchEvent, Ln as SandboxFleetCostEstimate, Lr as SubscriptionInfo, Nn as SandboxEnvironment, Nr as SshKeysManager, Ot as FleetPromptDispatchResult, Q as CreateRequestOptions, Qn as SandboxFleetToken, R as BatchOptions, Sn as PublishPublicTemplateOptions, St as FleetDispatchResultBufferOptions, Tn as ReapExpiredSandboxFleetsResult, Tt as FleetExecDispatchResult, Ut as IntelligenceReportCompareTo, Vt as IntelligenceReport, Xn as SandboxFleetOperationsSummary, Yt as ListSandboxOptions, Z as CreateIntelligenceReportOptions, Zr as UsageInfo, _t as ExecResult, a as TraceExportSink, ar as SandboxFleetWorkspaceReconcileResult, bn as PublicTemplateInfo, bt as FleetDispatchCancelResult, cr as SandboxInfo, et as CreateSandboxFleetTokenOptions, gt as ExecOptions, hn as PromptResult, i as TraceExportResult, jn as SandboxClientConfig, mn as PromptOptions, n as SandboxInstance, nr as SandboxFleetTraceOptions, nt as CreateSandboxOptions, or as SandboxFleetWorkspaceRestoreResult, pn as PromptInputPart, rr as SandboxFleetUsage, sr as SandboxFleetWorkspaceSnapshotResult, t as HttpClient, tt as CreateSandboxFleetWithCoordinatorOptions, wn as ReapExpiredSandboxFleetsOptions, wr as SecretsManager, wt as FleetExecDispatchOptions, xn as PublicTemplateVersionInfo, xt as FleetDispatchResultBuffer, z as BatchResult, zn as SandboxFleetDispatchResponse } from "./sandbox-C2x9Yumw.js";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/sse-parser.d.ts
|
|
4
4
|
/**
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as SandboxClient } from "./client-
|
|
1
|
+
import { $t as NetworkConfig, _t as ExecResult, an as PreviewLinkManager, cr as SandboxInfo, gt as ExecOptions, in as PreviewLinkInfo, jn as SandboxClientConfig, n as SandboxInstance, nt as CreateSandboxOptions, pr as SandboxStatus } from "./sandbox-C2x9Yumw.js";
|
|
2
|
+
import { i as SandboxClient } from "./client-QRSrhhlr.js";
|
|
3
3
|
import { a as PartialFailureError, c as SandboxErrorJson, d as StateError, f as TimeoutError, i as NotFoundError, l as SandboxFailureDetail, n as CapabilityError, o as QuotaError, p as ValidationError, r as NetworkError, s as SandboxError, t as AuthError, u as ServerError } from "./errors-1Se5ATyZ.js";
|
|
4
4
|
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 { t as SandboxInstance } from "./sandbox-
|
|
1
|
+
import { t as SandboxInstance } from "./sandbox-DgWaRMlI.js";
|
|
2
2
|
import { a as PartialFailureError, c as ServerError, d as ValidationError, i as NotFoundError, l as StateError, n as CapabilityError, o as QuotaError, r as NetworkError, s as SandboxError, t as AuthError, u as TimeoutError } from "./errors-DZsfJUuc.js";
|
|
3
|
-
import { n as SandboxClient } from "./client-
|
|
3
|
+
import { n as SandboxClient } from "./client-B8iqCNnm.js";
|
|
4
4
|
export { AuthError, CapabilityError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $n as
|
|
2
|
-
import { a as Team, c as SandboxFleet, d as ParsedSSEEvent, f as parseSSEStream, i as SandboxClient, l as SandboxFleetClient, n as IntelligenceClient, o as TeamInvitation, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as ParseSSEStreamOptions } from "./client-
|
|
1
|
+
import { $ as CreateSandboxFleetOptions, $n as SandboxFleetTraceBundle, $r as WriteFileOptions, $t as NetworkConfig, A as AttachSandboxFleetMachineOptions, An as SSHCredentials, Ar as SnapshotInfo, At as ForkResult, B as BatchTask, Bn as SandboxFleetDriverCapability, Br as TeeAttestationOptions, Bt as InstalledTool, C as SandboxMcpEndpoint, Cn as PublishPublicTemplateVersionOptions, Cr as SecretInfo, Ct as FleetDispatchStreamOptions, D as AcceleratorKind, Dn as ReconcileSandboxFleetsResult, Dr as SessionListOptions, Dt as FleetPromptDispatchOptions, E as buildSandboxMcpConfig, En as ReconcileSandboxFleetsOptions, Er as SessionInfo, Et as FleetMachineId, F as BackendStatus, Fn as SandboxFleetArtifact, Fr as StartupOperation, Ft as GitDiff, Gn as SandboxFleetMachineMeteredUsage, Gr as TokenRefreshHandler, Gt as IntelligenceReportWindow, H as CheckpointInfo, Hn as SandboxFleetInfo, Hr as TeeAttestationResponse, Ht as IntelligenceReportBudget, I as BackendType, In as SandboxFleetArtifactSpec, Ir as StorageConfig, It as GitStatus, J as CodeResult, Jn as SandboxFleetManifest, Jr as UpdateUserOptions, Jt as ListSandboxFleetOptions, Kn as SandboxFleetMachineRecord, Kr as ToolsConfig, Kt as ListMessagesOptions, L as BatchEvent, Ln as SandboxFleetCostEstimate, Lr as SubscriptionInfo, Lt as GpuType, M as BackendConfig, Mn as SandboxConnection, Mr as SnapshotResult, Mt as GitBranch, N as BackendInfo, Nn as SandboxEnvironment, Nt as GitCommit, O as AccessPolicyRule, On as RunCodeOptions, Or as SessionMessage, P as BackendManager, Pn as SandboxEvent, Pr as StartupDiagnostics, Pt as GitConfig, Qn as SandboxFleetToken, Qr as WaitForOptions, Qt as MkdirOptions, R as BatchOptions, Rn as SandboxFleetDispatchFailureClass, Rr as TaskOptions, Rt as HostAgentDriverConfig, S as SandboxMcpConfig, Sn as PublishPublicTemplateOptions, Sr as SearchOptions, St as FleetDispatchResultBufferOptions, T as buildControlPlaneMcpConfig, Tn as ReapExpiredSandboxFleetsResult, Tr as SessionEventStreamOptions, U as CheckpointOptions, Un as SandboxFleetIntelligenceEnvelope, Ur as TeePublicKey, Ut as IntelligenceReportCompareTo, V as BatchTaskResult, Vn as SandboxFleetDriverTimings, Vr as TeeAttestationReport, Vt as IntelligenceReport, W as CheckpointResult, Wn as SandboxFleetMachine, Wr as TeePublicKeyResponse, Wt as IntelligenceReportSubjectType, X as CompletedTurnResult, Xn as SandboxFleetOperationsSummary, Xr as UploadProgress, Xt as McpServerConfig, Yn as SandboxFleetManifestMachine, Yr as UploadOptions, Yt as ListSandboxOptions, Z as CreateIntelligenceReportOptions, Zn as SandboxFleetPolicy, Zr as UsageInfo, Zt as MintScopedTokenOptions, _ as StartInteractiveOptions, _i as defineGitHubResource, _n as ProvisionResult, _r as SandboxTraceOptions, _t as ExecResult, a as TraceExportSink, ai as AgentProfileConnection, an as PreviewLinkManager, ar as SandboxFleetWorkspaceReconcileResult, at as DispatchPromptOptions, b as CONTROL_PLANE_MCP_SERVER_NAME, bn as PublicTemplateInfo, br as ScopedTokenScope, bt as FleetDispatchCancelResult, c as otelTraceIdForTangleTrace, ci as AgentProfileModelHints, cn as ProcessLogEntry, cr as SandboxInfo, ct as DownloadProgress, d as InteractiveAuthFile, di as AgentProfileResourceRef, dn as ProcessSpawnOptions, dr as SandboxResourceUsage, dt as DriverInfo, ei as WriteManyFile, en as NetworkManager, er as SandboxFleetTraceEvent, f as InteractiveSessionHandle, fi as AgentProfileResources, fn as ProcessStatus, fr as SandboxResources, ft as DriverType, g as RespondToPermissionOptions, gi as defineAgentProfile, gn as ProvisionEvent, gr as SandboxTraceExport, gt as ExecOptions, h as InterruptResult, hi as AgentSubagentProfile, hn as PromptResult, hr as SandboxTraceEvent, ht as EventStreamOptions, i as TraceExportResult, ii as AgentProfileConfidential, in as PreviewLinkInfo, ir as SandboxFleetWorkspace, it as DirectoryPermission, j as BackendCapabilities, jn as SandboxClientConfig, jr as SnapshotOptions, jt as GitAuth, k as AddUserOptions, kn as SSHCommandDescriptor, kr as SessionStatus, kt as ForkOptions, l as toOtelJson, li as AgentProfilePermissionValue, ln as ProcessManager, lr as SandboxIntelligenceEnvelope, lt as DriveTurnOptions, m as InteractiveSessionInfo, mi as AgentProfileValidationResult, mn as PromptOptions, mr as SandboxTraceBundle, mt as EgressPolicy, n as SandboxInstance, ni as AgentProfile, nn as PermissionLevel, nr as SandboxFleetTraceOptions, nt as CreateSandboxOptions, o as buildTraceExportPayload, oi as AgentProfileFileMount, on as Process, or as SandboxFleetWorkspaceRestoreResult, ot as DispatchedSession, p as InteractiveSessionHost, pi as AgentProfileValidationIssue, pr as SandboxStatus, pt as EgressManager, qn as SandboxFleetMachineSpec, qr as TurnDriveResult, qt as ListOptions, r as TraceExportFormat, ri as AgentProfileCapabilities, rn as PermissionsManager, rr as SandboxFleetUsage, rt as DeleteOptions, s as exportTraceBundle, si as AgentProfileMcpServer, sn as ProcessInfo, sr as SandboxFleetWorkspaceSnapshotResult, st as DownloadOptions, ti as WriteManyOptions, tn as NonHostAgentDriverConfig, tr as SandboxFleetTraceExport, tt as CreateSandboxFleetWithCoordinatorOptions, u as SandboxSession, ui as AgentProfilePrompt, un as ProcessSignal, ur as SandboxPermissionsConfig, ut as DriverConfig, v as BuildControlPlaneMcpConfigOptions, vi as defineInlineResource, vn as ProvisionStatus, vr as SandboxUser, vt as FileInfo, w as SandboxMcpServerEntry, wn as ReapExpiredSandboxFleetsOptions, wr as SecretsManager, wt as FleetExecDispatchOptions, x as SANDBOX_MCP_SERVER_NAME, xn as PublicTemplateVersionInfo, xr as SearchMatch, xt as FleetDispatchResultBuffer, y as BuildSandboxMcpConfigOptions, yi as mergeAgentProfiles, yn as ProvisionStep, yr as ScopedToken, yt as FileSystem, z as BatchResult, zn as SandboxFleetDispatchResponse, zr as TaskResult, zt as HostAgentRuntimeBackend } from "./sandbox-C2x9Yumw.js";
|
|
2
|
+
import { a as Team, c as SandboxFleet, d as ParsedSSEEvent, f as parseSSEStream, i as SandboxClient, l as SandboxFleetClient, n as IntelligenceClient, o as TeamInvitation, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as ParseSSEStreamOptions } from "./client-QRSrhhlr.js";
|
|
3
3
|
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-D-2pH_70.js";
|
|
4
4
|
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-D7bwmNs8.js";
|
|
5
5
|
import { a as PartialFailureError, c as SandboxErrorJson, d as StateError, f as TimeoutError, i as NotFoundError, l as SandboxFailureDetail, n as CapabilityError, o as QuotaError, p as ValidationError, r as NetworkError, s as SandboxError, t as AuthError, u as ServerError } from "./errors-1Se5ATyZ.js";
|
|
6
|
-
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
6
|
+
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-DXa7OlnO.js";
|
|
7
7
|
|
|
8
8
|
//#region src/attestation-heartbeat.d.ts
|
|
9
9
|
interface TeeAttestationHeartbeatSample {
|
|
@@ -907,4 +907,4 @@ interface RouterEvalMatrixCaseResult {
|
|
|
907
907
|
}
|
|
908
908
|
declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
|
|
909
909
|
//#endregion
|
|
910
|
-
export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchEvent, type BatchOptions, type BatchResult, type BatchTask, type BatchTaskResult, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, type CheckpointInfo, type CheckpointOptions, type CheckpointResult, type CodeResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateIntelligenceReportOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EgressManager, type EgressPolicy, type EventStreamOptions, type ExecOptions, type ExecResult, type FileInfo, type FileSystem, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, type ForkOptions, type ForkResult, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuType, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type
|
|
910
|
+
export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchEvent, type BatchOptions, type BatchResult, type BatchTask, type BatchTaskResult, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, type CheckpointInfo, type CheckpointOptions, type CheckpointResult, type CodeResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateIntelligenceReportOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EgressManager, type EgressPolicy, type EventStreamOptions, type ExecOptions, type ExecResult, type FileInfo, type FileSystem, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, type ForkOptions, type ForkResult, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuType, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type Process, type ProcessInfo, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RespondToPermissionOptions, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunCodeOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPermissionsConfig, type SandboxResourceUsage, type SandboxResources, SandboxSession, type SandboxSizePreset, type SandboxStatus, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, ServerError, type SessionEventStreamOptions, type SessionInfo, type SessionListOptions, type SessionMessage, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskOptions, type TaskResult, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, TimeoutError, type TokenRefreshHandler, type ToolsConfig, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, startTeeAttestationHeartbeat, toOtelJson };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as collectAgentResponseText, c as buildTraceExportPayload, d as toOtelJson, h as serializeForSidecar, i as applySandboxEventText, l as exportTraceBundle, m as normalizeRuntimeBackendConfig, n as SandboxSession, o as getSandboxEventText, p as parseSSEStream, r as InteractiveSessionHandle, t as SandboxInstance, u as otelTraceIdForTangleTrace } from "./sandbox-
|
|
1
|
+
import { a as collectAgentResponseText, c as buildTraceExportPayload, d as toOtelJson, h as serializeForSidecar, i as applySandboxEventText, l as exportTraceBundle, m as normalizeRuntimeBackendConfig, n as SandboxSession, o as getSandboxEventText, p as parseSSEStream, r as InteractiveSessionHandle, t as SandboxInstance, u as otelTraceIdForTangleTrace } from "./sandbox-DgWaRMlI.js";
|
|
2
2
|
import { a as PartialFailureError, c as ServerError, d as ValidationError, i as NotFoundError, l as StateError, n as CapabilityError, o as QuotaError, r as NetworkError, s as SandboxError, t as AuthError, u as TimeoutError } from "./errors-DZsfJUuc.js";
|
|
3
|
-
import { a as DEFAULT_SANDBOX_SIZE, c as resolveSandboxResources, i as SandboxFleetClient, l as sandboxResourcesForSize, n as SandboxClient, o as SANDBOX_SIZE_PRESETS, r as SandboxFleet, s as SANDBOX_SIZE_PRESET_NAMES, t as IntelligenceClient } from "./client-
|
|
3
|
+
import { a as DEFAULT_SANDBOX_SIZE, c as resolveSandboxResources, i as SandboxFleetClient, l as sandboxResourcesForSize, n as SandboxClient, o as SANDBOX_SIZE_PRESETS, r as SandboxFleet, s as SANDBOX_SIZE_PRESET_NAMES, t as IntelligenceClient } from "./client-B8iqCNnm.js";
|
|
4
4
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-BxlfZ2Uh.js";
|
|
5
|
-
import { t as TangleSandboxClient } from "./tangle-
|
|
5
|
+
import { t as TangleSandboxClient } from "./tangle-C2uTDxJ0.js";
|
|
6
6
|
import { defineAgentProfile, defineGitHubResource, defineInlineResource, mergeAgentProfiles } from "@tangle-network/agent-interface";
|
|
7
7
|
//#region src/confidential.ts
|
|
8
8
|
function generateAttestationNonce(bytes = 32) {
|
|
@@ -3818,6 +3818,13 @@ interface WriteManyFile {
|
|
|
3818
3818
|
path: string;
|
|
3819
3819
|
/** File content (UTF-8). */
|
|
3820
3820
|
content: string;
|
|
3821
|
+
/** Unix mode bits applied after write, e.g. 0o755. */
|
|
3822
|
+
mode?: number;
|
|
3823
|
+
}
|
|
3824
|
+
/** Options for {@link FileSystem.write}. */
|
|
3825
|
+
interface WriteFileOptions {
|
|
3826
|
+
/** Unix mode bits applied after write, e.g. 0o755. */
|
|
3827
|
+
mode?: number;
|
|
3821
3828
|
}
|
|
3822
3829
|
/** Options for {@link FileSystem.writeMany}. */
|
|
3823
3830
|
interface WriteManyOptions {
|
|
@@ -3828,6 +3835,8 @@ interface WriteManyOptions {
|
|
|
3828
3835
|
maxRetries?: number;
|
|
3829
3836
|
}
|
|
3830
3837
|
interface FileSystem {
|
|
3838
|
+
/** True when write/writeMany honor Unix mode bits such as 0o755. */
|
|
3839
|
+
supportsWriteMode?: true;
|
|
3831
3840
|
/**
|
|
3832
3841
|
* Read a file's contents as a string.
|
|
3833
3842
|
* For binary files, use download() instead.
|
|
@@ -3845,7 +3854,7 @@ interface FileSystem {
|
|
|
3845
3854
|
* @param path - Path to file (relative to workspace)
|
|
3846
3855
|
* @param content - Content to write
|
|
3847
3856
|
*/
|
|
3848
|
-
write(path: string, content: string): Promise<void>;
|
|
3857
|
+
write(path: string, content: string, options?: WriteFileOptions): Promise<void>;
|
|
3849
3858
|
/**
|
|
3850
3859
|
* Write many files in one paced, retry-aware batch.
|
|
3851
3860
|
*
|
|
@@ -3856,7 +3865,7 @@ interface FileSystem {
|
|
|
3856
3865
|
* (quota / server / network / timeout, honoring a server `retryAfterMs`).
|
|
3857
3866
|
* Fail-loud: the first file that cannot be written after its retries throws,
|
|
3858
3867
|
* and the rest are not attempted. Relative paths resolve from the workspace
|
|
3859
|
-
* root.
|
|
3868
|
+
* root. Pass `mode: 0o755` on files that should be executable.
|
|
3860
3869
|
*
|
|
3861
3870
|
* @example
|
|
3862
3871
|
* ```typescript
|
|
@@ -4254,25 +4263,8 @@ interface InteractiveSessionInfo {
|
|
|
4254
4263
|
}
|
|
4255
4264
|
/** Decision passed to `respondToPermission`. */
|
|
4256
4265
|
interface RespondToPermissionOptions {
|
|
4257
|
-
/** The human's decision for the awaiting permission
|
|
4266
|
+
/** The human's decision for the awaiting permission interaction. */
|
|
4258
4267
|
response: "allow" | "deny";
|
|
4259
|
-
/**
|
|
4260
|
-
* Optional audit metadata recorded alongside the decision (e.g. the
|
|
4261
|
-
* reviewer's identity or a reason string). Opaque to the sandbox.
|
|
4262
|
-
*/
|
|
4263
|
-
metadata?: Record<string, unknown>;
|
|
4264
|
-
}
|
|
4265
|
-
/** Result of `respondToPermission`. Mirrors the sidecar route contract. */
|
|
4266
|
-
interface PermissionResponseResult {
|
|
4267
|
-
/** The decision was persisted for audit. Always true on success. */
|
|
4268
|
-
recorded: true;
|
|
4269
|
-
/**
|
|
4270
|
-
* True iff a live ACP `request_permission` was awaiting this decision and
|
|
4271
|
-
* it was forwarded to the running agent. `false` means record-only — the
|
|
4272
|
-
* request already resolved (e.g. timed out to the allowlist fallback) or
|
|
4273
|
-
* the backend does not surface live permission requests.
|
|
4274
|
-
*/
|
|
4275
|
-
forwarded: boolean;
|
|
4276
4268
|
}
|
|
4277
4269
|
/** Result of `interrupt`. */
|
|
4278
4270
|
interface InterruptResult {
|
|
@@ -4329,7 +4321,7 @@ interface SandboxSessionHost extends InteractiveSessionHost {
|
|
|
4329
4321
|
_sessionEvents(id: string, opts?: SessionEventStreamOptions): AsyncGenerator<SandboxEvent>;
|
|
4330
4322
|
_sessionResult(id: string): Promise<PromptResult>;
|
|
4331
4323
|
_sessionCancel(id: string): Promise<void>;
|
|
4332
|
-
_respondToPermission(id: string, permissionID: string, options: RespondToPermissionOptions): Promise<
|
|
4324
|
+
_respondToPermission(id: string, permissionID: string, options: RespondToPermissionOptions): Promise<void>;
|
|
4333
4325
|
_interrupt(id: string): Promise<InterruptResult>;
|
|
4334
4326
|
_answerQuestion(id: string, answers: Record<string, string[]>): Promise<void>;
|
|
4335
4327
|
}
|
|
@@ -4398,11 +4390,11 @@ declare class SandboxSession {
|
|
|
4398
4390
|
*/
|
|
4399
4391
|
interactive(): InteractiveSessionHandle;
|
|
4400
4392
|
/**
|
|
4401
|
-
* Resolve a pending permission
|
|
4402
|
-
* `allow`/`deny` to
|
|
4403
|
-
*
|
|
4393
|
+
* Resolve a pending permission interaction the agent raised mid-turn,
|
|
4394
|
+
* forwarding `allow`/`deny` to the blocked agent through the unified
|
|
4395
|
+
* interaction channel. Throws if no matching permission is outstanding.
|
|
4404
4396
|
*/
|
|
4405
|
-
respondToPermission(permissionID: string, options: RespondToPermissionOptions): Promise<
|
|
4397
|
+
respondToPermission(permissionID: string, options: RespondToPermissionOptions): Promise<void>;
|
|
4406
4398
|
/**
|
|
4407
4399
|
* Interrupt the session's current execution without deleting it. Returns
|
|
4408
4400
|
* `{ cancelled: false }` when nothing was running — the no-op is reported
|
|
@@ -4718,7 +4710,7 @@ declare class SandboxInstance {
|
|
|
4718
4710
|
* await box.write("/tmp/config.json", JSON.stringify(config));
|
|
4719
4711
|
* ```
|
|
4720
4712
|
*/
|
|
4721
|
-
write(path: string, content: string): Promise<void>;
|
|
4713
|
+
write(path: string, content: string, options?: WriteFileOptions): Promise<void>;
|
|
4722
4714
|
/**
|
|
4723
4715
|
* Write many files in one paced, retry-aware batch — see
|
|
4724
4716
|
* {@link FileSystem.writeMany}. Each file goes through {@link write}; a small
|
|
@@ -5516,11 +5508,16 @@ declare class SandboxInstance {
|
|
|
5516
5508
|
/** @internal — invoked by InteractiveSessionHandle.stop(). */
|
|
5517
5509
|
_stopInteractive(id: string): Promise<void>;
|
|
5518
5510
|
/** @internal — invoked by SandboxSession.respondToPermission(). */
|
|
5519
|
-
_respondToPermission(id: string, permissionID: string, options: RespondToPermissionOptions): Promise<
|
|
5511
|
+
_respondToPermission(id: string, permissionID: string, options: RespondToPermissionOptions): Promise<void>;
|
|
5520
5512
|
/** @internal — invoked by SandboxSession.interrupt(). */
|
|
5521
5513
|
_interrupt(id: string): Promise<InterruptResult>;
|
|
5522
|
-
/**
|
|
5514
|
+
/**
|
|
5515
|
+
* @internal — invoked by SandboxSession.answer(). Resolves the session's
|
|
5516
|
+
* outstanding question interaction and posts the answer through the
|
|
5517
|
+
* interaction response route. The positional answer arrays map onto the
|
|
5518
|
+
* question's `answerSpec` fields in order.
|
|
5519
|
+
*/
|
|
5523
5520
|
_answerQuestion(id: string, answers: Record<string, string[]>): Promise<void>;
|
|
5524
5521
|
}
|
|
5525
5522
|
//#endregion
|
|
5526
|
-
export {
|
|
5523
|
+
export { CreateSandboxFleetOptions as $, SandboxFleetTraceBundle as $n, WriteFileOptions as $r, NetworkConfig as $t, AttachSandboxFleetMachineOptions as A, SSHCredentials as An, SnapshotInfo as Ar, ForkResult as At, BatchTask as B, SandboxFleetDriverCapability as Bn, TeeAttestationOptions as Br, InstalledTool as Bt, SandboxMcpEndpoint as C, PublishPublicTemplateVersionOptions as Cn, SecretInfo as Cr, FleetDispatchStreamOptions as Ct, AcceleratorKind as D, ReconcileSandboxFleetsResult as Dn, SessionListOptions as Dr, FleetPromptDispatchOptions as Dt, buildSandboxMcpConfig as E, ReconcileSandboxFleetsOptions as En, SessionInfo as Er, FleetMachineId as Et, BackendStatus as F, SandboxFleetArtifact as Fn, StartupOperation as Fr, GitDiff as Ft, CodeExecutionOptions as G, SandboxFleetMachineMeteredUsage as Gn, TokenRefreshHandler as Gr, IntelligenceReportWindow as Gt, CheckpointInfo as H, SandboxFleetInfo as Hn, TeeAttestationResponse as Hr, IntelligenceReportBudget as Ht, BackendType as I, SandboxFleetArtifactSpec as In, StorageConfig as Ir, GitStatus as It, CodeResult as J, SandboxFleetManifest as Jn, UpdateUserOptions as Jr, ListSandboxFleetOptions as Jt, CodeExecutionResult as K, SandboxFleetMachineRecord as Kn, ToolsConfig as Kr, ListMessagesOptions as Kt, BatchEvent as L, SandboxFleetCostEstimate as Ln, SubscriptionInfo as Lr, GpuType as Lt, BackendConfig as M, SandboxConnection as Mn, SnapshotResult as Mr, GitBranch as Mt, BackendInfo as N, SandboxEnvironment as Nn, SshKeysManager as Nr, GitCommit as Nt, AccessPolicyRule as O, RunCodeOptions as On, SessionMessage as Or, FleetPromptDispatchResult as Ot, BackendManager as P, SandboxEvent as Pn, StartupDiagnostics as Pr, GitConfig as Pt, CreateRequestOptions as Q, SandboxFleetToken as Qn, WaitForOptions as Qr, MkdirOptions as Qt, BatchOptions as R, SandboxFleetDispatchFailureClass as Rn, TaskOptions as Rr, HostAgentDriverConfig as Rt, SandboxMcpConfig as S, PublishPublicTemplateOptions as Sn, SearchOptions as Sr, FleetDispatchResultBufferOptions as St, buildControlPlaneMcpConfig as T, ReapExpiredSandboxFleetsResult as Tn, SessionEventStreamOptions as Tr, FleetExecDispatchResult as Tt, CheckpointOptions as U, SandboxFleetIntelligenceEnvelope as Un, TeePublicKey as Ur, IntelligenceReportCompareTo as Ut, BatchTaskResult as V, SandboxFleetDriverTimings as Vn, TeeAttestationReport as Vr, IntelligenceReport as Vt, CheckpointResult as W, SandboxFleetMachine as Wn, TeePublicKeyResponse as Wr, IntelligenceReportSubjectType as Wt, CompletedTurnResult as X, SandboxFleetOperationsSummary as Xn, UploadProgress as Xr, McpServerConfig as Xt, CodeResultPart as Y, SandboxFleetManifestMachine as Yn, UploadOptions as Yr, ListSandboxOptions as Yt, CreateIntelligenceReportOptions as Z, SandboxFleetPolicy as Zn, UsageInfo as Zr, MintScopedTokenOptions as Zt, StartInteractiveOptions as _, defineGitHubResource as _i, ProvisionResult as _n, SandboxTraceOptions as _r, ExecResult as _t, TraceExportSink as a, AgentProfileConnection as ai, PreviewLinkManager as an, SandboxFleetWorkspaceReconcileResult as ar, DispatchPromptOptions as at, CONTROL_PLANE_MCP_SERVER_NAME as b, PublicTemplateInfo as bn, ScopedTokenScope as br, FleetDispatchCancelResult as bt, otelTraceIdForTangleTrace as c, AgentProfileModelHints as ci, ProcessLogEntry as cn, SandboxInfo as cr, DownloadProgress as ct, InteractiveAuthFile as d, AgentProfileResourceRef as di, ProcessSpawnOptions as dn, SandboxResourceUsage as dr, DriverInfo as dt, WriteManyFile as ei, NetworkManager as en, SandboxFleetTraceEvent as er, CreateSandboxFleetTokenOptions as et, InteractiveSessionHandle as f, AgentProfileResources as fi, ProcessStatus as fn, SandboxResources as fr, DriverType as ft, RespondToPermissionOptions as g, defineAgentProfile as gi, ProvisionEvent as gn, SandboxTraceExport as gr, ExecOptions as gt, InterruptResult as h, AgentSubagentProfile as hi, PromptResult as hn, SandboxTraceEvent as hr, EventStreamOptions as ht, TraceExportResult as i, AgentProfileConfidential as ii, PreviewLinkInfo as in, SandboxFleetWorkspace as ir, DirectoryPermission as it, BackendCapabilities as j, SandboxClientConfig as jn, SnapshotOptions as jr, GitAuth as jt, AddUserOptions as k, SSHCommandDescriptor as kn, SessionStatus as kr, ForkOptions as kt, toOtelJson as l, AgentProfilePermissionValue as li, ProcessManager as ln, SandboxIntelligenceEnvelope as lr, DriveTurnOptions as lt, InteractiveSessionInfo as m, AgentProfileValidationResult as mi, PromptOptions as mn, SandboxTraceBundle as mr, EgressPolicy as mt, SandboxInstance as n, AgentProfile as ni, PermissionLevel as nn, SandboxFleetTraceOptions as nr, CreateSandboxOptions as nt, buildTraceExportPayload as o, AgentProfileFileMount as oi, Process as on, SandboxFleetWorkspaceRestoreResult as or, DispatchedSession as ot, InteractiveSessionHost as p, AgentProfileValidationIssue as pi, PromptInputPart as pn, SandboxStatus as pr, EgressManager as pt, CodeLanguage as q, SandboxFleetMachineSpec as qn, TurnDriveResult as qr, ListOptions as qt, TraceExportFormat as r, AgentProfileCapabilities as ri, PermissionsManager as rn, SandboxFleetUsage as rr, DeleteOptions as rt, exportTraceBundle as s, AgentProfileMcpServer as si, ProcessInfo as sn, SandboxFleetWorkspaceSnapshotResult as sr, DownloadOptions as st, HttpClient as t, WriteManyOptions as ti, NonHostAgentDriverConfig as tn, SandboxFleetTraceExport as tr, CreateSandboxFleetWithCoordinatorOptions as tt, SandboxSession as u, AgentProfilePrompt as ui, ProcessSignal as un, SandboxPermissionsConfig as ur, DriverConfig as ut, BuildControlPlaneMcpConfigOptions as v, defineInlineResource as vi, ProvisionStatus as vn, SandboxUser as vr, FileInfo as vt, SandboxMcpServerEntry as w, ReapExpiredSandboxFleetsOptions as wn, SecretsManager as wr, FleetExecDispatchOptions as wt, SANDBOX_MCP_SERVER_NAME as x, PublicTemplateVersionInfo as xn, SearchMatch as xr, FleetDispatchResultBuffer as xt, BuildSandboxMcpConfigOptions as y, mergeAgentProfiles as yi, ProvisionStep as yn, ScopedToken as yr, FileSystem as yt, BatchResult as z, SandboxFleetDispatchResponse as zn, TaskResult as zr, HostAgentRuntimeBackend as zt };
|
|
@@ -699,9 +699,9 @@ var SandboxSession = class {
|
|
|
699
699
|
return new InteractiveSessionHandle(this.box, this.id);
|
|
700
700
|
}
|
|
701
701
|
/**
|
|
702
|
-
* Resolve a pending permission
|
|
703
|
-
* `allow`/`deny` to
|
|
704
|
-
*
|
|
702
|
+
* Resolve a pending permission interaction the agent raised mid-turn,
|
|
703
|
+
* forwarding `allow`/`deny` to the blocked agent through the unified
|
|
704
|
+
* interaction channel. Throws if no matching permission is outstanding.
|
|
705
705
|
*/
|
|
706
706
|
async respondToPermission(permissionID, options) {
|
|
707
707
|
return this.box._respondToPermission(this.id, permissionID, options);
|
|
@@ -929,15 +929,26 @@ function detectHubApproval(toolInvocations) {
|
|
|
929
929
|
};
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
|
-
/** Read
|
|
932
|
+
/** Read an `interaction` event (kind `question`) into an awaiting-question requirement. */
|
|
933
933
|
function readQuestionEvent(data) {
|
|
934
|
-
const
|
|
935
|
-
if (
|
|
934
|
+
const request = data.request;
|
|
935
|
+
if (!request || request.kind !== "question" || typeof request.id !== "string") return;
|
|
936
936
|
return {
|
|
937
|
-
questionId,
|
|
938
|
-
questions:
|
|
937
|
+
questionId: request.id,
|
|
938
|
+
questions: questionsFromAnswerSpec(request)
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
|
+
/** Reconstruct the prompt/options shape from a question interaction's answerSpec. */
|
|
942
|
+
function questionsFromAnswerSpec(request) {
|
|
943
|
+
return request.answerSpec.fields.map((field) => field.type === "select" ? {
|
|
944
|
+
question: field.label,
|
|
945
|
+
options: field.options.map((o) => ({
|
|
946
|
+
label: o.label,
|
|
947
|
+
description: o.description
|
|
948
|
+
})),
|
|
949
|
+
multiSelect: field.multi === true
|
|
950
|
+
} : { question: field.label });
|
|
951
|
+
}
|
|
941
952
|
/**
|
|
942
953
|
* Convert a thrown error into an in-band `error` SandboxEvent so a streaming
|
|
943
954
|
* generator can surface a failure as an event followed by a terminal `done`
|
|
@@ -1397,13 +1408,14 @@ var SandboxInstance = class SandboxInstance {
|
|
|
1397
1408
|
* await box.write("/tmp/config.json", JSON.stringify(config));
|
|
1398
1409
|
* ```
|
|
1399
1410
|
*/
|
|
1400
|
-
async write(path, content) {
|
|
1411
|
+
async write(path, content, options) {
|
|
1401
1412
|
await this.ensureRunning();
|
|
1402
1413
|
const response = await this.runtimeFetch("/files/write", {
|
|
1403
1414
|
method: "POST",
|
|
1404
1415
|
body: JSON.stringify({
|
|
1405
1416
|
path,
|
|
1406
|
-
content
|
|
1417
|
+
content,
|
|
1418
|
+
mode: options?.mode
|
|
1407
1419
|
})
|
|
1408
1420
|
});
|
|
1409
1421
|
if (!response.ok) {
|
|
@@ -1427,7 +1439,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
1427
1439
|
if (started && paceMs > 0) await delay(paceMs);
|
|
1428
1440
|
started = true;
|
|
1429
1441
|
try {
|
|
1430
|
-
await this.write(file.path, file.content);
|
|
1442
|
+
await this.write(file.path, file.content, { mode: file.mode });
|
|
1431
1443
|
break;
|
|
1432
1444
|
} catch (err) {
|
|
1433
1445
|
if (isTransientWriteError(err) && attempt < maxRetries) {
|
|
@@ -1468,7 +1480,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
1468
1480
|
}
|
|
1469
1481
|
if (event.type === "result") toolInvocations = readToolInvocations(event.data) ?? toolInvocations;
|
|
1470
1482
|
if (event.type === "result" || event.type === "done") terminalReached = true;
|
|
1471
|
-
if (event.type === "
|
|
1483
|
+
if (event.type === "interaction") question = readQuestionEvent(event.data) ?? question;
|
|
1472
1484
|
if (event.type === "trace.id") traceId = event.data.traceId;
|
|
1473
1485
|
if (event.type === "error") runError = event.data.message;
|
|
1474
1486
|
}
|
|
@@ -1858,7 +1870,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
1858
1870
|
}
|
|
1859
1871
|
if (event.type === "done" && costUsd === void 0) costUsd = readTokenCostUsd(event.data);
|
|
1860
1872
|
if (event.type === "result" || event.type === "done") terminalReached = true;
|
|
1861
|
-
if (event.type === "
|
|
1873
|
+
if (event.type === "interaction") question = readQuestionEvent(event.data) ?? question;
|
|
1862
1874
|
if (event.type === "trace.id") traceId = event.data.traceId;
|
|
1863
1875
|
if (event.type === "error") runError = event.data.message;
|
|
1864
1876
|
}
|
|
@@ -2213,8 +2225,9 @@ var SandboxInstance = class SandboxInstance {
|
|
|
2213
2225
|
*/
|
|
2214
2226
|
get fs() {
|
|
2215
2227
|
return {
|
|
2228
|
+
supportsWriteMode: true,
|
|
2216
2229
|
read: (path) => this.read(path),
|
|
2217
|
-
write: (path, content) => this.write(path, content),
|
|
2230
|
+
write: (path, content, options) => this.write(path, content, options),
|
|
2218
2231
|
writeMany: (files, options) => this.writeMany(files, options),
|
|
2219
2232
|
search: (query, options) => this.search(query, options),
|
|
2220
2233
|
upload: (localPath, remotePath, options) => this.fsUpload(localPath, remotePath, options),
|
|
@@ -2242,6 +2255,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
2242
2255
|
const formData = new FormData();
|
|
2243
2256
|
formData.append("file", new Blob([new Uint8Array(fileBuffer)]), fileName);
|
|
2244
2257
|
formData.append("path", remotePath);
|
|
2258
|
+
if (options?.permissions !== void 0) formData.append("mode", String(options.permissions));
|
|
2245
2259
|
const response = await this.runtimeFetch("/fs/upload", {
|
|
2246
2260
|
method: "POST",
|
|
2247
2261
|
body: formData,
|
|
@@ -4225,7 +4239,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
4225
4239
|
const data = event.data;
|
|
4226
4240
|
toolInvocations = readToolInvocations(data) ?? toolInvocations;
|
|
4227
4241
|
}
|
|
4228
|
-
if (event.type === "
|
|
4242
|
+
if (event.type === "interaction") question = readQuestionEvent(event.data) ?? question;
|
|
4229
4243
|
if (event.type === "trace.id") traceId = event.data.traceId;
|
|
4230
4244
|
if (event.type === "error") runError = event.data.message;
|
|
4231
4245
|
if (event.type === "done" || event.type === "result") {
|
|
@@ -4307,23 +4321,22 @@ var SandboxInstance = class SandboxInstance {
|
|
|
4307
4321
|
/** @internal — invoked by SandboxSession.respondToPermission(). */
|
|
4308
4322
|
async _respondToPermission(id, permissionID, options) {
|
|
4309
4323
|
await this.ensureRunning();
|
|
4310
|
-
const
|
|
4324
|
+
const body = options.response === "allow" ? {
|
|
4325
|
+
id: permissionID,
|
|
4326
|
+
outcome: "accepted",
|
|
4327
|
+
data: { grant: "allow_once" }
|
|
4328
|
+
} : {
|
|
4329
|
+
id: permissionID,
|
|
4330
|
+
outcome: "declined"
|
|
4331
|
+
};
|
|
4332
|
+
const response = await this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/interactions`, {
|
|
4311
4333
|
method: "POST",
|
|
4312
|
-
body: JSON.stringify(
|
|
4313
|
-
response: options.response,
|
|
4314
|
-
metadata: options.metadata
|
|
4315
|
-
})
|
|
4334
|
+
body: JSON.stringify(body)
|
|
4316
4335
|
});
|
|
4317
4336
|
if (!response.ok) {
|
|
4318
|
-
const
|
|
4319
|
-
throw parseErrorResponse(response.status,
|
|
4337
|
+
const errBody = await response.text();
|
|
4338
|
+
throw parseErrorResponse(response.status, errBody, void 0, response.headers);
|
|
4320
4339
|
}
|
|
4321
|
-
const data = (await response.json())?.data;
|
|
4322
|
-
if (!data || typeof data.forwarded !== "boolean" || data.recorded !== true) throw new ServerError("Permission response missing data", 502, {
|
|
4323
|
-
endpoint: `/agents/sessions/${encodeURIComponent(id)}/permissions/${encodeURIComponent(permissionID)}`,
|
|
4324
|
-
origin: "runtime"
|
|
4325
|
-
});
|
|
4326
|
-
return data;
|
|
4327
4340
|
}
|
|
4328
4341
|
/** @internal — invoked by SandboxSession.interrupt(). */
|
|
4329
4342
|
async _interrupt(id) {
|
|
@@ -4336,12 +4349,45 @@ var SandboxInstance = class SandboxInstance {
|
|
|
4336
4349
|
}
|
|
4337
4350
|
return { cancelled: (await response.json()).data?.cancelled === true };
|
|
4338
4351
|
}
|
|
4339
|
-
/**
|
|
4352
|
+
/**
|
|
4353
|
+
* @internal — invoked by SandboxSession.answer(). Resolves the session's
|
|
4354
|
+
* outstanding question interaction and posts the answer through the
|
|
4355
|
+
* interaction response route. The positional answer arrays map onto the
|
|
4356
|
+
* question's `answerSpec` fields in order.
|
|
4357
|
+
*/
|
|
4340
4358
|
async _answerQuestion(id, answers) {
|
|
4341
4359
|
await this.ensureRunning();
|
|
4342
|
-
const
|
|
4360
|
+
const listResp = await this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/interactions`, { method: "GET" });
|
|
4361
|
+
if (!listResp.ok) {
|
|
4362
|
+
const body = await listResp.text();
|
|
4363
|
+
throw parseErrorResponse(listResp.status, body, void 0, listResp.headers);
|
|
4364
|
+
}
|
|
4365
|
+
const outstanding = ((await listResp.json()).data?.interactions ?? []).find((r) => r.kind === "question");
|
|
4366
|
+
if (!outstanding) throw new Error("No outstanding question to answer for this session");
|
|
4367
|
+
const positional = Object.values(answers);
|
|
4368
|
+
const data = {};
|
|
4369
|
+
outstanding.answerSpec.fields.forEach((field, index) => {
|
|
4370
|
+
const raw = answers[field.name] ?? answers[String(index)] ?? positional[index] ?? [];
|
|
4371
|
+
switch (field.type) {
|
|
4372
|
+
case "select":
|
|
4373
|
+
data[field.name] = raw;
|
|
4374
|
+
break;
|
|
4375
|
+
case "number":
|
|
4376
|
+
data[field.name] = Number(raw[0] ?? 0);
|
|
4377
|
+
break;
|
|
4378
|
+
case "boolean":
|
|
4379
|
+
data[field.name] = raw[0] === "true";
|
|
4380
|
+
break;
|
|
4381
|
+
default: data[field.name] = raw[0] ?? "";
|
|
4382
|
+
}
|
|
4383
|
+
});
|
|
4384
|
+
const response = await this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/interactions`, {
|
|
4343
4385
|
method: "POST",
|
|
4344
|
-
body: JSON.stringify({
|
|
4386
|
+
body: JSON.stringify({
|
|
4387
|
+
id: outstanding.id,
|
|
4388
|
+
outcome: "accepted",
|
|
4389
|
+
data
|
|
4390
|
+
})
|
|
4345
4391
|
});
|
|
4346
4392
|
if (!response.ok) {
|
|
4347
4393
|
const body = await response.text();
|
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-DXa7OlnO.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-C2uTDxJ0.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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4-develop.20260627151756.06a2afc",
|
|
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",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"url": "https://github.com/tangle-network/agent-dev-container/issues"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@tangle-network/agent-core": "^0.3.
|
|
86
|
-
"@tangle-network/agent-interface": "^0.
|
|
85
|
+
"@tangle-network/agent-core": "^0.3.3",
|
|
86
|
+
"@tangle-network/agent-interface": "^0.13.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@mastra/core": "^1.36.0",
|