@tangle-network/sandbox 0.11.1-develop.20260723202021.eaa5626 → 0.11.1-develop.20260723224636.7272ac4
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-D7FQfaJD.js → client-BCNrDjvA.js} +1 -1
- package/dist/{client-B5tDSu0B.d.ts → client-iZbD-9Ks.d.ts} +1 -1
- package/dist/core.d.ts +2 -2
- package/dist/core.js +2 -2
- package/dist/{index-pXH860fQ.d.ts → index-Bhx4EQca.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/{sandbox-DNwEDLwq.js → sandbox-CWeFm9Hj.js} +26 -4
- package/dist/{sandbox-Cu6bg70c.d.ts → sandbox-hbYwu_Ot.d.ts} +7 -0
- package/dist/session-gateway/index.d.ts +5 -17
- package/dist/session-gateway/index.js +1 -24
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-D_Xpw5HW.js → tangle-C8CaT3tE.js} +1 -1
- package/package.json +2 -2
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as CodeExecutionResult, E as CodeResultPart, S as CodeExecutionOptions, w as CodeLanguage } from "../types-C67osezQ.js";
|
|
2
|
-
import { n as SandboxInstance } from "../sandbox-
|
|
3
|
-
import { i as SandboxClient } from "../client-
|
|
2
|
+
import { n as SandboxInstance } from "../sandbox-hbYwu_Ot.js";
|
|
3
|
+
import { i as SandboxClient } from "../client-iZbD-9Ks.js";
|
|
4
4
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
5
5
|
|
|
6
6
|
//#region src/agent/tools/_specs.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as encodeTextForWire, i as SANDBOX_PROXY_REQUEST_MAX_BYTES, o as combineAbortSignals, s as encodePromptForWire } from "./runtime-api-XhAv6YiH.js";
|
|
2
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-D9fFOWX9.js";
|
|
3
|
-
import { g as exportTraceBundle, m as normalizeConnection, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, y as parseSSEStream } from "./sandbox-
|
|
3
|
+
import { g as exportTraceBundle, m as normalizeConnection, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, y as parseSSEStream } from "./sandbox-CWeFm9Hj.js";
|
|
4
4
|
//#region src/resources.ts
|
|
5
5
|
/**
|
|
6
6
|
* Compute tiers, ordered smallest → largest. Defined HERE (not imported from
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $t as ListSandboxOptions, A as CreateIntelligenceReportOptions, An as ReapExpiredSandboxFleetsResult, Cr as SandboxInfo, Ct as FleetPromptDispatchOptions, Dn as PublishPublicTemplateOptions, En as PublicTemplateVersionInfo, F as CreateSandboxOptions, Fi as UsageInfo, Gt as IntelligenceReportBudget, Hi as BatchEvent, Jn as SandboxEnvironment, Jt as IntelligenceReportWindow, Kn as SandboxClientConfig, Kt as IntelligenceReportCompareTo, M as CreateSandboxFleetOptions, Mn as ReconcileSandboxFleetsResult, N as CreateSandboxFleetTokenOptions, On as PublishPublicTemplateVersionOptions, Or as SandboxProfileSummary, P as CreateSandboxFleetWithCoordinatorOptions, Qn as SandboxFleetCostEstimate, Qt as ListSandboxFleetOptions, Sr as SandboxFleetWorkspaceSnapshotResult, St as FleetMachineId, Tn as PublicTemplateInfo, Wt as IntelligenceReport, Xn as SandboxFleetArtifact, Zn as SandboxFleetArtifactSpec, Zr as SecretsManager, _ as BatchTask, _r as SandboxFleetTraceOptions, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, bn as PromptResult, br as SandboxFleetWorkspaceReconcileResult, bt as FleetExecDispatchOptions, dr as SandboxFleetOperationsSummary, er as SandboxFleetDispatchResponse, fi as SshKeysManager, g as BatchRunRequest, gi as SubscriptionInfo, gt as FleetDispatchCancelResult, h as BatchRunOptions, j as CreateRequestOptions, jn as ReconcileSandboxFleetsOptions, ki as TokenRefreshHandler, kn as ReapExpiredSandboxFleetsOptions, lr as SandboxFleetManifest, m as BatchResult, mr as SandboxFleetTraceBundle, nt as ExecResult, p as BatchOptions, pr as SandboxFleetToken, rr as SandboxFleetInfo, sr as SandboxFleetMachineRecord, tr as SandboxFleetDriverCapability, tt as ExecOptions, vn as PromptInputPart, vr as SandboxFleetUsage, vt as FleetDispatchResultBufferOptions, wt as FleetPromptDispatchResult, xr as SandboxFleetWorkspaceRestoreResult, xt as FleetExecDispatchResult, yn as PromptOptions, yt as FleetDispatchStreamOptions } from "./types-C67osezQ.js";
|
|
2
|
-
import { c as TraceExportResult, l as TraceExportSink, n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
2
|
+
import { c as TraceExportResult, l as TraceExportSink, n as SandboxInstance, t as HttpClient } from "./sandbox-hbYwu_Ot.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sse-parser.d.ts
|
|
5
5
|
/**
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cr as SandboxInfo, F as CreateSandboxOptions, Kn as SandboxClientConfig, Pr as SandboxStatus, cn as PreviewLinkInfo, ln as PreviewLinkManager, nt as ExecResult, rn as NetworkConfig, tt as ExecOptions } from "./types-C67osezQ.js";
|
|
2
|
-
import { a as WorkspaceImagePublishResult, i as WorkspaceImagePublishRequestOptions, n as SandboxInstance, o as WorkspaceImages, r as WorkspaceImagePublishInput } from "./sandbox-
|
|
3
|
-
import { i as SandboxClient } from "./client-
|
|
2
|
+
import { a as WorkspaceImagePublishResult, i as WorkspaceImagePublishRequestOptions, n as SandboxInstance, o as WorkspaceImages, r as WorkspaceImagePublishInput } from "./sandbox-hbYwu_Ot.js";
|
|
3
|
+
import { i as SandboxClient } from "./client-iZbD-9Ks.js";
|
|
4
4
|
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-C8HMx78o.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, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages };
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-D9fFOWX9.js";
|
|
2
|
-
import { i as WorkspaceImages, t as SandboxInstance } from "./sandbox-
|
|
3
|
-
import { n as SandboxClient } from "./client-
|
|
2
|
+
import { i as WorkspaceImages, t as SandboxInstance } from "./sandbox-CWeFm9Hj.js";
|
|
3
|
+
import { n as SandboxClient } from "./client-BCNrDjvA.js";
|
|
4
4
|
export { AuthError, CapabilityError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { $ as EventStreamOptions, $i as TerminalStreamOptions, $n as SandboxFleetDispatchFailureClass, $r as SendSessionMessageRequest, $t as ListSandboxOptions, A as CreateIntelligenceReportOptions, Ai as ToolsConfig, An as ReapExpiredSandboxFleetsResult, Ar as SandboxResources, At as GitDiff, B as DirectoryPermission, Bi as WriteManyOptions, Bn as RolloutStartResult, Br as SandboxTerminals, Bt as GpuType, Ca as validateAgentProfileSecurity, Ci as TaskSessionProfile, Cn as ProvisionStatus, Cr as SandboxInfo, Ct as FleetPromptDispatchOptions, D as CommitTaskSessionOptions, Di as TeePublicKey, Dn as PublishPublicTemplateOptions, Dr as SandboxPortPreviewLink, Dt as GitBranch, Ei as TeeAttestationResponse, En as PublicTemplateVersionInfo, Er as SandboxPortBinding, Et as GitAuth, F as CreateSandboxOptions, Fi as UsageInfo, Fr as SandboxTerminalAttachOptions, Ft as GpuLeaseExecOptions, G as DriveTurnOptions, Gi as BatchTaskUsage, Gn as SSHCredentials, Gr as SandboxUser, Gt as IntelligenceReportBudget, H as DispatchedSession, Hi as BatchEvent, Hn as RolloutTurnPart, Hr as SandboxTraceEvent, Ht as HostAgentRuntimeBackend, I as CreateSessionOptions, Ii as WaitForOptions, In as Rollout, Ir as SandboxTerminalCreateOptions, It as GpuLeaseExecResult, J as DriverType, Ji as TerminalReadyInfo, Jn as SandboxEnvironment, Jr as SearchMatch, Jt as IntelligenceReportWindow, K as DriverConfig, Ki as TERMINAL_WS_ECHO_SUBPROTOCOL, Kn as SandboxClientConfig, Kr as ScopedToken, Kt as IntelligenceReportCompareTo, L as CreateTaskSessionOptions, Li as WaitForRolloutOptions, Ln as RolloutChildResult, Lr as SandboxTerminalInfo, Lt as GpuLeaseManager, M as CreateSandboxFleetOptions, Mi as UpdateUserOptions, Mn as ReconcileSandboxFleetsResult, Mr as SandboxRuntimeProfile, Mt as GpuLease, Ni as UploadOptions, Nn as RenameOptions, Nr as SandboxRuntimeProfileList, Nt as GpuLeaseBilling, O as CompletedTurnResult, Oi as TeePublicKeyResponse, On as PublishPublicTemplateVersionOptions, Or as SandboxProfileSummary, Ot as GitCommit, P as CreateSandboxFleetWithCoordinatorOptions, Pi as UploadProgress, Pr as SandboxStatus, Pt as GpuLeaseCommandResult, Q as EnsureDevServerOptions, Qi as TerminalStreamHandlers, Qn as SandboxFleetCostEstimate, Qr as SendSessionMessageOptions, Qt as ListSandboxFleetOptions, R as DeleteOptions, Ri as WriteFileOptions, Rn as RolloutOptions, Rr as SandboxTerminalManager, Rt as GpuLeaseProviderName, Sa as mergeAgentProfiles, Si as TaskSessionInfo, Sn as ProvisionResult, Sr as SandboxFleetWorkspaceSnapshotResult, St as FleetMachineId, T as CodeResult, Ti as TeeAttestationReport, Tn as PublicTemplateInfo, Tr as SandboxPermissionsConfig, Tt as GPU_LEASE_PROVIDER_NAMES, U as DownloadOptions, Ui as BatchEventDataMap, Un as RunCodeOptions, Ur as SandboxTraceExport, Ut as InstalledTool, V as DispatchPromptOptions, Vi as BatchBackendStats, Vn as RolloutStatus, Vr as SandboxTraceBundle, Vt as HostAgentDriverConfig, W as DownloadProgress, Wi as BatchSidecarGroup, Wn as SSHCommandDescriptor, Wr as SandboxTraceOptions, Wt as IntelligenceReport, X as EgressManager, Xi as TerminalStreamAuthFormat, Xn as SandboxFleetArtifact, Xr as SecretInfo, Xt as ListMessagesOptions, Yi as TerminalStream, Yn as SandboxEvent, Yr as SearchOptions, Z as EgressPolicy, Zi as TerminalStreamError, Zn as SandboxFleetArtifactSpec, Zr as SecretsManager, Zt as ListOptions, _ as BatchTask, _a as agentProfileSchema, _i as TaskOptions, _n as ProcessStatus, _r as SandboxFleetTraceOptions, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, aa as AgentProfileFileMount, ai as SessionListOptions, an as NonHostAgentDriverConfig, ar as SandboxFleetMachine, at as FileReadBatchResult, b as ChunkedUploadOptions, ba as defineGitHubResource, bi as TaskSessionCommitResult, bn as PromptResult, br as SandboxFleetWorkspaceReconcileResult, bt as FleetExecDispatchOptions, c as BackendInfo, ca as AgentProfilePermissionValue, ci as SessionStatus, cn as PreviewLinkInfo, cr as SandboxFleetMachineSpec, ct as FileRenameResult, d as BackendType, da as AgentProfileResources, di as SnapshotResult, dn as ProcessInfo, dr as SandboxFleetOperationsSummary, dt as FileTreeOptions, ea as TerminalStreamToken, ei as SentSessionMessage, en as McpServerConfig, er as SandboxFleetDispatchResponse, et as ExactProcessSpawnOptions, f as BatchBackend, fa as AgentProfileSecurityPolicy, fn as ProcessListOptions, fr as SandboxFleetPolicy, ft as FileTreeResult, g as BatchRunRequest, ga as Capability, gi as SubscriptionInfo, gn as ProcessSpawnOptions, gr as SandboxFleetTraceExport, gt as FleetDispatchCancelResult, h as BatchRunOptions, ha as AgentSubagentProfile, hi as StorageConfig, hn as ProcessSignal, hr as SandboxFleetTraceEvent, ht as FileWriteResult, i as AttachGpuLeaseOptions, ia as AgentProfileConnection, ii as SessionInfo, in as NetworkManager, ir as SandboxFleetIntelligenceEnvelope, it as FileReadBatchOptions, j as CreateRequestOptions, ji as TurnDriveResult, jn as ReconcileSandboxFleetsOptions, jr as SandboxRuntimeHealth, jt as GitStatus, k as CreateGpuLeaseOptions, ki as TokenRefreshHandler, kn as ReapExpiredSandboxFleetsOptions, kr as SandboxResourceUsage, kt as GitConfig, l as BackendManager, la as AgentProfilePrompt, li as SnapshotInfo, ln as PreviewLinkManager, lr as SandboxFleetManifest, lt as FileSystem, m as BatchResult, ma as AgentProfileValidationResult, mi as StartupOperation, mn as ProcessManager, mr as SandboxFleetTraceBundle, mt as FileUsageResult, n as AccessPolicyRule, na as AgentProfileCapabilities, ni as SessionEventStreamOptions, nn as MkdirOptions, nr as SandboxFleetDriverTimings, nt as ExecResult, o as BackendCapabilities, oa as AgentProfileMcpServer, oi as SessionMessage, on as PermissionLevel, or as SandboxFleetMachineMeteredUsage, ot as FileReadError, p as BatchOptions, pa as AgentProfileValidationIssue, pi as StartupDiagnostics, pn as ProcessLogEntry, pr as SandboxFleetToken, pt as FileUsageOptions, q as DriverInfo, qi as TerminalExitInfo, qn as SandboxConnection, qr as ScopedTokenScope, qt as IntelligenceReportSubjectType, r as AddUserOptions, ra as AgentProfileConfidential, ri as SessionForkOptions, rn as NetworkConfig, rr as SandboxFleetInfo, rt as FileInfo, s as BackendConfig, sa as AgentProfileModelHints, si as SessionMessageInputPart, sn as PermissionsManager, sr as SandboxFleetMachineRecord, st as FileReadResult, t as AcceleratorKind, ta as AgentProfile, ti as SessionBackendCredentials, tn as MintScopedTokenOptions, tr as SandboxFleetDriverCapability, tt as ExecOptions, u as BackendStatus, ua as AgentProfileResourceRef, ui as SnapshotOptions, un as Process, ur as SandboxFleetManifestMachine, ut as FileTreeFile, v as BatchTaskResult, va as capabilitySchema, vi as TaskResult, vr as SandboxFleetUsage, vt as FleetDispatchResultBufferOptions, wi as TeeAttestationOptions, wn as ProvisionStep, wr as SandboxIntelligenceEnvelope, x as ChunkedUploadResult, xa as defineInlineResource, xi as TaskSessionFileChange, xn as ProvisionEvent, xr as SandboxFleetWorkspaceRestoreResult, y as BranchOptions, ya as defineAgentProfile, yi as TaskSessionChanges, yn as PromptOptions, yr as SandboxFleetWorkspace, yt as FleetDispatchStreamOptions, z as DevServerInfo, zi as WriteManyFile, zn as RolloutScorer, zr as SandboxTerminalRequestOptions, zt as GpuLeaseStatus } from "./types-C67osezQ.js";
|
|
2
|
-
import { A as SandboxMcpEndpoint, C as RespondToPermissionOptions, D as CONTROL_PLANE_MCP_SERVER_NAME, E as BuildSandboxMcpConfigOptions, M as buildControlPlaneMcpConfig, N as buildSandboxMcpConfig, O as SANDBOX_MCP_SERVER_NAME, S as InterruptResult, T as BuildControlPlaneMcpConfigOptions, _ as InteractiveAuthFile, a as WorkspaceImagePublishResult, b as InteractiveSessionInfo, c as TraceExportResult, d as exportTraceBundle, f as otelTraceIdForTangleTrace, g as InteractiveAttachOptions, h as SandboxSession, i as WorkspaceImagePublishRequestOptions, j as SandboxMcpServerEntry, k as SandboxMcpConfig, l as TraceExportSink, m as SandboxTaskSession, n as SandboxInstance, o as WorkspaceImages, p as toOtelJson, r as WorkspaceImagePublishInput, s as TraceExportFormat, u as buildTraceExportPayload, v as InteractiveSessionHandle, w as StartInteractiveOptions, x as InteractiveSessionStatus, y as InteractiveSessionHost } from "./sandbox-
|
|
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-
|
|
2
|
+
import { A as SandboxMcpEndpoint, C as RespondToPermissionOptions, D as CONTROL_PLANE_MCP_SERVER_NAME, E as BuildSandboxMcpConfigOptions, M as buildControlPlaneMcpConfig, N as buildSandboxMcpConfig, O as SANDBOX_MCP_SERVER_NAME, S as InterruptResult, T as BuildControlPlaneMcpConfigOptions, _ as InteractiveAuthFile, a as WorkspaceImagePublishResult, b as InteractiveSessionInfo, c as TraceExportResult, d as exportTraceBundle, f as otelTraceIdForTangleTrace, g as InteractiveAttachOptions, h as SandboxSession, i as WorkspaceImagePublishRequestOptions, j as SandboxMcpServerEntry, k as SandboxMcpConfig, l as TraceExportSink, m as SandboxTaskSession, n as SandboxInstance, o as WorkspaceImages, p as toOtelJson, r as WorkspaceImagePublishInput, s as TraceExportFormat, u as buildTraceExportPayload, v as InteractiveSessionHandle, w as StartInteractiveOptions, x as InteractiveSessionStatus, y as InteractiveSessionHost } from "./sandbox-hbYwu_Ot.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-iZbD-9Ks.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
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-C8HMx78o.js";
|
|
7
|
-
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
7
|
+
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-Bhx4EQca.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
1
|
import { d as serializeForSidecar, l as normalizeRuntimeBackendConfig } from "./runtime-api-XhAv6YiH.js";
|
|
2
2
|
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as StateError } from "./errors-D9fFOWX9.js";
|
|
3
|
-
import { _ as otelTraceIdForTangleTrace, a as TERMINAL_WS_ECHO_SUBPROTOCOL, c as SandboxTaskSession, d as applySandboxEventText, f as collectAgentResponseText, g as exportTraceBundle, h as buildTraceExportPayload, i as WorkspaceImages, l as SandboxSession, o as TerminalStream, p as getSandboxEventText, s as TerminalStreamError, t as SandboxInstance, u as InteractiveSessionHandle, v as toOtelJson, y as parseSSEStream } from "./sandbox-
|
|
4
|
-
import { a as splitInlineProfileSkills, c as SandboxFleetClient, d as SANDBOX_SIZE_PRESET_NAMES, f as resolveSandboxResources, i as splitInlineProfileFileMounts, l as DEFAULT_SANDBOX_SIZE, n as SandboxClient, o as validateDeferredProfileFileMounts, p as sandboxResourcesForSize, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as SANDBOX_SIZE_PRESETS } from "./client-
|
|
3
|
+
import { _ as otelTraceIdForTangleTrace, a as TERMINAL_WS_ECHO_SUBPROTOCOL, c as SandboxTaskSession, d as applySandboxEventText, f as collectAgentResponseText, g as exportTraceBundle, h as buildTraceExportPayload, i as WorkspaceImages, l as SandboxSession, o as TerminalStream, p as getSandboxEventText, s as TerminalStreamError, t as SandboxInstance, u as InteractiveSessionHandle, v as toOtelJson, y as parseSSEStream } from "./sandbox-CWeFm9Hj.js";
|
|
4
|
+
import { a as splitInlineProfileSkills, c as SandboxFleetClient, d as SANDBOX_SIZE_PRESET_NAMES, f as resolveSandboxResources, i as splitInlineProfileFileMounts, l as DEFAULT_SANDBOX_SIZE, n as SandboxClient, o as validateDeferredProfileFileMounts, p as sandboxResourcesForSize, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as SANDBOX_SIZE_PRESETS } from "./client-BCNrDjvA.js";
|
|
5
5
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DdD_rFZQ.js";
|
|
6
|
-
import { t as TangleSandboxClient } from "./tangle-
|
|
6
|
+
import { t as TangleSandboxClient } from "./tangle-C8CaT3tE.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) {
|
|
@@ -999,6 +999,7 @@ const WORKSPACE_IMAGE_REQUEST_ATTEMPTS = 2;
|
|
|
999
999
|
const MAX_WORKSPACE_IMAGE_RESPONSE_BYTES = 64 * 1024;
|
|
1000
1000
|
const MAX_TIMER_DELAY_MS = 2147483647;
|
|
1001
1001
|
const IDEMPOTENCY_KEY_PATTERN = /^[A-Za-z0-9_-]{16,128}$/;
|
|
1002
|
+
const MAX_WORKSPACE_IMAGE_EXPOSED_PORTS = 64;
|
|
1002
1003
|
function createIdempotencyKey() {
|
|
1003
1004
|
const crypto = globalThis.crypto;
|
|
1004
1005
|
if (crypto?.randomUUID) return crypto.randomUUID();
|
|
@@ -1075,7 +1076,8 @@ const WORKSPACE_IMAGE_RESULT_KEYS = [
|
|
|
1075
1076
|
"contextBytes",
|
|
1076
1077
|
"contextEntries",
|
|
1077
1078
|
"buildDurationMs",
|
|
1078
|
-
"pushDurationMs"
|
|
1079
|
+
"pushDurationMs",
|
|
1080
|
+
"exposedPorts"
|
|
1079
1081
|
];
|
|
1080
1082
|
const SHA256_DIGEST_PATTERN = /^sha256:[a-f0-9]{64}$/;
|
|
1081
1083
|
const IMAGE_TAG_PATTERN = /^[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}$/;
|
|
@@ -1085,11 +1087,30 @@ function isRecord(value) {
|
|
|
1085
1087
|
function isNonNegativeSafeInteger(value) {
|
|
1086
1088
|
return Number.isSafeInteger(value) && Number(value) >= 0;
|
|
1087
1089
|
}
|
|
1090
|
+
function parseExposedPorts(value) {
|
|
1091
|
+
if (!Array.isArray(value) || value.length > MAX_WORKSPACE_IMAGE_EXPOSED_PORTS) return;
|
|
1092
|
+
const ports = [];
|
|
1093
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1094
|
+
for (const entry of value) {
|
|
1095
|
+
if (!isRecord(entry) || Object.keys(entry).length !== 2) return void 0;
|
|
1096
|
+
const { port, protocol } = entry;
|
|
1097
|
+
if (typeof port !== "number" || !Number.isSafeInteger(port) || port < 1 || port > 65535 || protocol !== "tcp" && protocol !== "udp" && protocol !== "sctp") return;
|
|
1098
|
+
const identity = `${port}/${protocol}`;
|
|
1099
|
+
if (seen.has(identity)) return void 0;
|
|
1100
|
+
seen.add(identity);
|
|
1101
|
+
ports.push({
|
|
1102
|
+
port,
|
|
1103
|
+
protocol
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
return ports;
|
|
1107
|
+
}
|
|
1088
1108
|
function parseWorkspaceImagePublishResult(value, repository) {
|
|
1089
1109
|
if (!isRecord(value)) return void 0;
|
|
1090
1110
|
if (Object.keys(value).length !== WORKSPACE_IMAGE_RESULT_KEYS.length || !WORKSPACE_IMAGE_RESULT_KEYS.every((key) => Object.hasOwn(value, key))) return;
|
|
1091
|
-
const { image, taggedImage, digest, imageId, sizeBytes, contextBytes, contextEntries, buildDurationMs, pushDurationMs } = value;
|
|
1092
|
-
|
|
1111
|
+
const { image, taggedImage, digest, imageId, sizeBytes, contextBytes, contextEntries, buildDurationMs, pushDurationMs, exposedPorts } = value;
|
|
1112
|
+
const parsedExposedPorts = parseExposedPorts(exposedPorts);
|
|
1113
|
+
if (typeof image !== "string" || typeof taggedImage !== "string" || typeof digest !== "string" || typeof imageId !== "string" || !SHA256_DIGEST_PATTERN.test(digest) || !SHA256_DIGEST_PATTERN.test(imageId) || image !== `${repository}@${digest}` || !taggedImage.startsWith(`${repository}:`) || !IMAGE_TAG_PATTERN.test(taggedImage.slice(repository.length + 1)) || !isNonNegativeSafeInteger(sizeBytes) || !isNonNegativeSafeInteger(contextBytes) || !isNonNegativeSafeInteger(contextEntries) || !isNonNegativeSafeInteger(buildDurationMs) || !isNonNegativeSafeInteger(pushDurationMs) || !parsedExposedPorts) return;
|
|
1093
1114
|
return {
|
|
1094
1115
|
image,
|
|
1095
1116
|
taggedImage,
|
|
@@ -1099,7 +1120,8 @@ function parseWorkspaceImagePublishResult(value, repository) {
|
|
|
1099
1120
|
contextBytes,
|
|
1100
1121
|
contextEntries,
|
|
1101
1122
|
buildDurationMs,
|
|
1102
|
-
pushDurationMs
|
|
1123
|
+
pushDurationMs,
|
|
1124
|
+
exposedPorts: parsedExposedPorts
|
|
1103
1125
|
};
|
|
1104
1126
|
}
|
|
1105
1127
|
/** Builds and publishes the current sandbox workspace from trusted hosts. */
|
|
@@ -471,6 +471,11 @@ declare function toOtelJson(bundle: TraceExportBundle, serviceName?: string): Js
|
|
|
471
471
|
declare function otelTraceIdForTangleTrace(traceId: string): string;
|
|
472
472
|
//#endregion
|
|
473
473
|
//#region ../../../packages/runtime-contracts/dist/workspace-image-types.d.ts
|
|
474
|
+
/** A port declared by the published OCI image. */
|
|
475
|
+
interface WorkspaceImageExposedPort {
|
|
476
|
+
port: number;
|
|
477
|
+
protocol: "tcp" | "udp" | "sctp";
|
|
478
|
+
}
|
|
474
479
|
/** Successful workspace image publication returned by the Sandbox API. */
|
|
475
480
|
interface WorkspaceImagePublishResult$1 {
|
|
476
481
|
/** Immutable registry reference. */
|
|
@@ -484,6 +489,8 @@ interface WorkspaceImagePublishResult$1 {
|
|
|
484
489
|
contextEntries: number;
|
|
485
490
|
buildDurationMs: number;
|
|
486
491
|
pushDurationMs: number;
|
|
492
|
+
/** Network ports from the final image configuration, not source inspection. */
|
|
493
|
+
exposedPorts: WorkspaceImageExposedPort[];
|
|
487
494
|
}
|
|
488
495
|
//#endregion
|
|
489
496
|
//#region src/workspace-images.d.ts
|
|
@@ -65,7 +65,6 @@ interface ServerMessageBase {
|
|
|
65
65
|
*/
|
|
66
66
|
type ServerMessage = (ServerMessageBase & {
|
|
67
67
|
type: "connection.established";
|
|
68
|
-
messageType?: string;
|
|
69
68
|
data: {
|
|
70
69
|
sessionId: string;
|
|
71
70
|
hydratedCount?: number;
|
|
@@ -92,6 +91,7 @@ type ServerMessage = (ServerMessageBase & {
|
|
|
92
91
|
data: {
|
|
93
92
|
sandboxId: string;
|
|
94
93
|
error?: string;
|
|
94
|
+
reason?: string;
|
|
95
95
|
};
|
|
96
96
|
}) | (ServerMessageBase & {
|
|
97
97
|
type: "runtime.reconnecting";
|
|
@@ -113,11 +113,6 @@ type ServerMessage = (ServerMessageBase & {
|
|
|
113
113
|
containerId?: string;
|
|
114
114
|
reason: string;
|
|
115
115
|
};
|
|
116
|
-
}) | (ServerMessageBase & {
|
|
117
|
-
type: "container.ready";
|
|
118
|
-
data: {
|
|
119
|
-
sandboxId?: string;
|
|
120
|
-
};
|
|
121
116
|
}) | (ServerMessageBase & {
|
|
122
117
|
type: "runtime.ready";
|
|
123
118
|
data: {
|
|
@@ -142,8 +137,7 @@ type ServerMessage = (ServerMessageBase & {
|
|
|
142
137
|
}) | (ServerMessageBase & {
|
|
143
138
|
type: "agent.event";
|
|
144
139
|
channel: string;
|
|
145
|
-
data: unknown;
|
|
146
|
-
sequenceId?: number;
|
|
140
|
+
data: unknown;
|
|
147
141
|
}) | (ServerMessageBase & {
|
|
148
142
|
type: "replay.start";
|
|
149
143
|
total: number;
|
|
@@ -198,15 +192,11 @@ interface PortEventData {
|
|
|
198
192
|
processName?: string;
|
|
199
193
|
}
|
|
200
194
|
/**
|
|
201
|
-
* Inbound WebSocket frame
|
|
202
|
-
*
|
|
203
|
-
* top-level `channel` plus arbitrary extra fields. `handleMessage`
|
|
204
|
-
* normalizes a `RawWireMessage` into a `ServerMessage` before dispatch:
|
|
205
|
-
* `type` and `data` are mutable here because normalization rewrites them.
|
|
195
|
+
* Inbound WebSocket frame. `handleMessage` validates its message type before
|
|
196
|
+
* dispatching it to the typed session protocol.
|
|
206
197
|
*/
|
|
207
198
|
interface RawWireMessage {
|
|
208
199
|
type?: string;
|
|
209
|
-
messageType?: string;
|
|
210
200
|
channel?: string;
|
|
211
201
|
data?: unknown;
|
|
212
202
|
id?: string;
|
|
@@ -214,10 +204,9 @@ interface RawWireMessage {
|
|
|
214
204
|
code?: string;
|
|
215
205
|
timestamp?: number;
|
|
216
206
|
seq?: number;
|
|
217
|
-
sequenceId?: number;
|
|
218
207
|
[key: string]: unknown;
|
|
219
208
|
}
|
|
220
|
-
/** Every inbound frame after
|
|
209
|
+
/** Every inbound frame after its message type has been validated. */
|
|
221
210
|
interface NormalizedServerMessage extends RawWireMessage {
|
|
222
211
|
type: string;
|
|
223
212
|
}
|
|
@@ -281,7 +270,6 @@ interface SessionGatewayEventHandlers {
|
|
|
281
270
|
onRuntimeConnected?: (sandboxId: string, baseUrl: string) => void;
|
|
282
271
|
onRuntimeDisconnected?: (sandboxId: string, error?: string) => void;
|
|
283
272
|
onRuntimeNotFound?: (sessionId: string, containerId: string | undefined, reason: string) => void;
|
|
284
|
-
onContainerReady?: (sandboxId: string) => void;
|
|
285
273
|
onRuntimeReady?: (data: {
|
|
286
274
|
sandboxId: string;
|
|
287
275
|
sessionId: string;
|
|
@@ -89,14 +89,6 @@ const CONTROL_MESSAGE_TYPES = new Set([
|
|
|
89
89
|
"terminal.input.error",
|
|
90
90
|
"heartbeat"
|
|
91
91
|
]);
|
|
92
|
-
const WIRE_TYPE_MAP = {
|
|
93
|
-
"sidecar.connected": "runtime.connected",
|
|
94
|
-
"sidecar.disconnected": "runtime.disconnected",
|
|
95
|
-
"sidecar.not_found": "runtime.not_found",
|
|
96
|
-
"sidecar.ready": "runtime.ready",
|
|
97
|
-
"sidecar.reconnecting": "runtime.reconnecting",
|
|
98
|
-
"sidecar.removed": "runtime.removed"
|
|
99
|
-
};
|
|
100
92
|
function acceptedSubscriptionChannels(acknowledgement) {
|
|
101
93
|
if (acknowledgement.denied?.length) {
|
|
102
94
|
const reasons = acknowledgement.denied.map(({ channel, reason }) => `${channel}: ${reason}`).join(", ");
|
|
@@ -548,25 +540,17 @@ var SessionGatewayClient = class {
|
|
|
548
540
|
this.messagesReceived++;
|
|
549
541
|
try {
|
|
550
542
|
const raw = JSON.parse(data);
|
|
551
|
-
if (!raw.type && raw.messageType) raw.type = raw.messageType;
|
|
552
543
|
if (typeof raw.type !== "string") {
|
|
553
544
|
invokeClientCallback("onError", () => this.handlers.onError?.("Session gateway frame is missing a message type", "INVALID_MESSAGE"), void 0);
|
|
554
545
|
return;
|
|
555
546
|
}
|
|
556
|
-
if (WIRE_TYPE_MAP[raw.type] !== void 0) raw.type = WIRE_TYPE_MAP[raw.type];
|
|
557
547
|
if (raw.data && typeof raw.data === "object") {
|
|
558
548
|
const d = raw.data;
|
|
559
|
-
if (d.sidecarId !== void 0 && d.sandboxId === void 0) d.sandboxId = d.sidecarId;
|
|
560
549
|
if (raw.type === "error") {
|
|
561
550
|
if (raw.message === void 0 && typeof d.message === "string") raw.message = d.message;
|
|
562
551
|
if (raw.code === void 0 && typeof d.code === "string") raw.code = d.code;
|
|
563
552
|
}
|
|
564
553
|
}
|
|
565
|
-
if (raw.seq === void 0 && typeof raw.sequenceId === "number") raw.seq = raw.sequenceId;
|
|
566
|
-
if (raw.type === "agent.event" && !raw.data && raw.channel) {
|
|
567
|
-
const { type, messageType, channel, id, seq, sequenceId, timestamp, ...rest } = raw;
|
|
568
|
-
raw.data = rest;
|
|
569
|
-
}
|
|
570
554
|
const message = raw;
|
|
571
555
|
if (CONTROL_MESSAGE_TYPES.has(message.type)) {
|
|
572
556
|
if (message.type === "pong") this.handlePong(message.timestamp);
|
|
@@ -633,13 +617,6 @@ var SessionGatewayClient = class {
|
|
|
633
617
|
case "runtime.not_found":
|
|
634
618
|
this.handlers.onRuntimeNotFound?.(message.data.sessionId, message.data.containerId, message.data.reason);
|
|
635
619
|
break;
|
|
636
|
-
case "container.ready": {
|
|
637
|
-
const data = message.data;
|
|
638
|
-
const id = data.sandboxId ?? data.sidecarId;
|
|
639
|
-
if (id) this.handlers.onContainerReady?.(id);
|
|
640
|
-
else this.handlers.onError?.("container.ready event received without sandboxId", "invalid_payload");
|
|
641
|
-
break;
|
|
642
|
-
}
|
|
643
620
|
case "runtime.ready":
|
|
644
621
|
this.handlers.onRuntimeReady?.(message.data);
|
|
645
622
|
break;
|
|
@@ -652,7 +629,7 @@ var SessionGatewayClient = class {
|
|
|
652
629
|
case "agent.event":
|
|
653
630
|
this.eventsReceived++;
|
|
654
631
|
this.trackExecutionContext(message.data);
|
|
655
|
-
this.handlers.onAgentEvent?.(message.channel, message.data, message.seq
|
|
632
|
+
this.handlers.onAgentEvent?.(message.channel, message.data, message.seq);
|
|
656
633
|
break;
|
|
657
634
|
case "replay.start":
|
|
658
635
|
this.isReplaying = true;
|
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-Bhx4EQca.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-C8CaT3tE.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as parseErrorResponse } from "./errors-D9fFOWX9.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-CWeFm9Hj.js";
|
|
3
3
|
//#region src/tangle/abi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tangle Contract ABI Definitions
|
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.20260723224636.7272ac4",
|
|
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",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@tangle-network/agent-core": "0.4.19",
|
|
91
|
-
"@tangle-network/agent-interface": "0.
|
|
91
|
+
"@tangle-network/agent-interface": "0.32.0"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@mastra/core": "^1.36.0",
|