@tangle-network/sandbox 0.15.3-develop.20260729120224.ad0e824 → 0.15.3-develop.20260729134511.1b3e40f
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-BFjKSTAR.d.ts → client-BSFFShMp.d.ts} +2 -2
- package/dist/{client-doY7g6iX.js → client-DzVMfNxm.js} +3 -3
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-DdD_rFZQ.js → collaboration-CVdLf_4n.js} +1 -1
- package/dist/core.d.ts +5 -5
- package/dist/core.js +4 -4
- package/dist/{errors-BzMmpmqU.d.ts → errors-Bdy5jXzc.d.ts} +8 -1
- package/dist/{errors-D9fFOWX9.js → errors-Bf-A-4SA.js} +31 -1
- package/dist/{index-B3Is-8kz.d.ts → index-BKy2mdq7.d.ts} +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -7
- package/dist/intelligence/index.js +1 -1
- package/dist/{runtime-api-Bage44Xd.js → runtime-api-d1lY25yx.js} +9 -4
- package/dist/runtime.d.ts +3 -3
- package/dist/runtime.js +3 -3
- package/dist/{sandbox-CJr9ovil.js → sandbox-Bnwkvu7K.js} +99 -6
- package/dist/{sandbox-DXxyuhfL.d.ts → sandbox-D61dojnE.d.ts} +3 -1
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-DU9UMwY3.js → tangle-BArHuIYh.js} +2 -2
- package/dist/{types-BZkxpBDM.d.ts → types-BWGnjOVk.d.ts} +63 -2
- package/package.json +3 -3
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CodeResultPart, S as CodeLanguage, b as CodeExecutionOptions, x as CodeExecutionResult } from "../types-
|
|
2
|
-
import { n as SandboxInstance } from "../sandbox-
|
|
3
|
-
import { i as Sandbox } from "../client-
|
|
1
|
+
import { C as CodeResultPart, S as CodeLanguage, b as CodeExecutionOptions, x as CodeExecutionResult } from "../types-BWGnjOVk.js";
|
|
2
|
+
import { n as SandboxInstance } from "../sandbox-D61dojnE.js";
|
|
3
|
+
import { i as Sandbox } from "../client-BSFFShMp.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 { $t as ListSandboxFleetOptions, A as CreateSandboxFleetTokenOptions, An as
|
|
2
|
-
import { c as TraceExportResult, l as TraceExportSink, n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
1
|
+
import { $n as SandboxFleetCostEstimate, $t as ListSandboxFleetOptions, A as CreateSandboxFleetTokenOptions, An as PublishPublicTemplateVersionOptions, Cr as SandboxFleetWorkspaceSnapshotResult, Ct as FleetExecDispatchResult, D as CreateIntelligenceReportOptions, Di as TokenRefreshHandler, Dn as PublicTemplateInfo, Et as FleetPromptDispatchResult, Gt as IntelligenceReport, Kt as IntelligenceReportBudget, M as CreateSandboxOptions, Mn as ReapExpiredSandboxFleetsResult, Ni as UsageInfo, Nn as ReconcileSandboxFleetsOptions, O as CreateRequestOptions, On as PublicTemplateVersionInfo, Pn as ReconcileSandboxFleetsResult, Qn as SandboxFleetArtifactSpec, Sn as PromptResult, Sr as SandboxFleetWorkspaceRestoreResult, St as FleetExecDispatchOptions, Tr as SandboxInfo, Tt as FleetPromptDispatchOptions, Yi as BatchEvent, Yn as SandboxEnvironment, Yr as SecretsManager, Yt as IntelligenceReportWindow, Zn as SandboxFleetArtifact, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, bn as PromptInputPart, bt as FleetDriveTurnOutcome, cr as SandboxFleetMachineRecord, en as ListSandboxOptions, f as BatchResult, fr as SandboxFleetOperationsSummary, gt as FleetDispatchCancelResult, hr as SandboxFleetTraceBundle, ir as SandboxFleetInfo, j as CreateSandboxFleetWithCoordinatorOptions, jn as ReapExpiredSandboxFleetsOptions, k as CreateSandboxFleetOptions, kn as PublishPublicTemplateOptions, m as BatchRunRequest, mi as SubscriptionInfo, mr as SandboxFleetToken, nr as SandboxFleetDriverCapability, nt as ExecResult, p as BatchRunOptions, qn as SandboxConfig, qt as IntelligenceReportCompareTo, tr as SandboxFleetDispatchResponse, tt as ExecOptions, ui as SshKeysManager, ur as SandboxFleetManifest, vr as SandboxFleetTraceOptions, vt as FleetDispatchResultBufferOptions, wr as SandboxIdentity, wt as FleetMachineId, xn as PromptOptions, xr as SandboxFleetWorkspaceReconcileResult, xt as FleetDriveTurnRequest, yr as SandboxFleetUsage, yt as FleetDispatchStreamOptions } from "./types-BWGnjOVk.js";
|
|
2
|
+
import { c as TraceExportResult, l as TraceExportSink, n as SandboxInstance, t as HttpClient } from "./sandbox-D61dojnE.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sse-parser.d.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as combineAbortSignals, d as applyRequestedModel, f as assertCurrentBackendType, l as encodePromptForWire, m as backendTypeSchema, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, u as encodeTextForWire } from "./runtime-api-
|
|
2
|
-
import { a as
|
|
3
|
-
import { g as exportTraceBundle, m as normalizeConnection, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, y as parseSSEStream } from "./sandbox-
|
|
1
|
+
import { c as combineAbortSignals, d as applyRequestedModel, f as assertCurrentBackendType, l as encodePromptForWire, m as backendTypeSchema, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, u as encodeTextForWire } from "./runtime-api-d1lY25yx.js";
|
|
2
|
+
import { a as NetworkError, f as TimeoutError, l as SandboxError, m as parseErrorResponse, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-Bf-A-4SA.js";
|
|
3
|
+
import { g as exportTraceBundle, m as normalizeConnection, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, y as parseSSEStream } from "./sandbox-Bnwkvu7K.js";
|
|
4
4
|
import { agentProfileSchema } from "@tangle-network/agent-interface";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region ../../../packages/runtime-contracts/dist/git-policy.js
|
|
@@ -1,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-CVdLf_4n.js";
|
|
2
2
|
export { CollaborationClient, CollaborationFileBridge, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as NetworkError, f as TimeoutError, m as parseErrorResponse } from "./errors-Bf-A-4SA.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 {
|
|
2
|
-
import { a as WorkspaceImagePublishResult, i as WorkspaceImagePublishRequestOptions, n as SandboxInstance, o as WorkspaceImages, r as WorkspaceImagePublishInput } from "./sandbox-
|
|
3
|
-
import { i as Sandbox } from "./client-
|
|
4
|
-
import { a as
|
|
5
|
-
export { AuthError, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, type PromptInputPart, QuotaError, Sandbox, type SandboxConfig, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages };
|
|
1
|
+
import { M as CreateSandboxOptions, Mr as SandboxStatus, Tr as SandboxInfo, bn as PromptInputPart, dn as PreviewLinkWaitOptions, in as NetworkConfig, ln as PreviewLinkInfo, nt as ExecResult, qn as SandboxConfig, tt as ExecOptions, un as PreviewLinkManager } from "./types-BWGnjOVk.js";
|
|
2
|
+
import { a as WorkspaceImagePublishResult, i as WorkspaceImagePublishRequestOptions, n as SandboxInstance, o as WorkspaceImages, r as WorkspaceImagePublishInput } from "./sandbox-D61dojnE.js";
|
|
3
|
+
import { i as Sandbox } from "./client-BSFFShMp.js";
|
|
4
|
+
import { a as NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-Bdy5jXzc.js";
|
|
5
|
+
export { AuthError, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, FileWriteConflictError, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, type PromptInputPart, QuotaError, Sandbox, type SandboxConfig, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages };
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { n as Sandbox } from "./client-
|
|
3
|
-
import { i as WorkspaceImages, t as SandboxInstance } from "./sandbox-
|
|
4
|
-
export { AuthError, CapabilityError, NetworkError, NotFoundError, PartialFailureError, QuotaError, Sandbox, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages };
|
|
1
|
+
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-Bf-A-4SA.js";
|
|
2
|
+
import { n as Sandbox } from "./client-DzVMfNxm.js";
|
|
3
|
+
import { i as WorkspaceImages, t as SandboxInstance } from "./sandbox-Bnwkvu7K.js";
|
|
4
|
+
export { AuthError, CapabilityError, FileWriteConflictError, NetworkError, NotFoundError, PartialFailureError, QuotaError, Sandbox, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages };
|
|
@@ -102,6 +102,13 @@ declare class StateError extends SandboxError {
|
|
|
102
102
|
readonly requiredState?: string;
|
|
103
103
|
constructor(message: string, currentState: string, requiredState?: string, metadata?: SandboxErrorMetadata, code?: string);
|
|
104
104
|
}
|
|
105
|
+
declare class FileWriteConflictError extends SandboxError {
|
|
106
|
+
readonly path: string;
|
|
107
|
+
readonly currentHash: string | null;
|
|
108
|
+
readonly currentMtime: number | null;
|
|
109
|
+
readonly expectedHash?: string;
|
|
110
|
+
constructor(message: string, path: string, expectedHash: string | undefined, currentHash: string | null, currentMtime: number | null, metadata?: SandboxErrorMetadata);
|
|
111
|
+
}
|
|
105
112
|
declare class EgressProxyRecoveryError extends SandboxError {
|
|
106
113
|
readonly phase: "egress_proxy_recovery";
|
|
107
114
|
constructor(message: string, metadata?: SandboxErrorMetadata);
|
|
@@ -129,4 +136,4 @@ declare class ServerError extends SandboxError {
|
|
|
129
136
|
constructor(message: string, status?: number, metadata?: SandboxErrorMetadata, code?: string);
|
|
130
137
|
}
|
|
131
138
|
//#endregion
|
|
132
|
-
export {
|
|
139
|
+
export { NetworkError as a, QuotaError as c, SandboxFailureDetail as d, ServerError as f, ValidationError as h, FileWriteConflictError as i, SandboxError as l, TimeoutError as m, CapabilityError as n, NotFoundError as o, StateError as p, EgressProxyRecoveryError as r, PartialFailureError as s, AuthError as t, SandboxErrorJson as u };
|
|
@@ -130,6 +130,17 @@ var StateError = class extends SandboxError {
|
|
|
130
130
|
this.requiredState = requiredState;
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
|
+
var FileWriteConflictError = class extends SandboxError {
|
|
134
|
+
expectedHash;
|
|
135
|
+
constructor(message, path, expectedHash, currentHash, currentMtime, metadata) {
|
|
136
|
+
super(message, "FILE_WRITE_CONFLICT", 409, metadata);
|
|
137
|
+
this.path = path;
|
|
138
|
+
this.currentHash = currentHash;
|
|
139
|
+
this.currentMtime = currentMtime;
|
|
140
|
+
this.name = "FileWriteConflictError";
|
|
141
|
+
if (expectedHash !== void 0) this.expectedHash = expectedHash;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
133
144
|
var EgressProxyRecoveryError = class extends SandboxError {
|
|
134
145
|
phase;
|
|
135
146
|
constructor(message, metadata) {
|
|
@@ -218,6 +229,20 @@ function readCapability(data, errorObj) {
|
|
|
218
229
|
const nested = typeof errorObj === "object" && errorObj !== null ? asString(errorObj.capability) : void 0;
|
|
219
230
|
return asString(data.capability) ?? nested;
|
|
220
231
|
}
|
|
232
|
+
function readFileWriteConflictDetails(errorObj) {
|
|
233
|
+
if (typeof errorObj !== "object" || errorObj === null) return void 0;
|
|
234
|
+
const path = asString(errorObj.path);
|
|
235
|
+
const expectedHash = errorObj.expectedHash === void 0 ? void 0 : asString(errorObj.expectedHash);
|
|
236
|
+
const currentHash = errorObj.currentHash === null ? null : asString(errorObj.currentHash);
|
|
237
|
+
const currentMtime = errorObj.currentMtime === null && Object.hasOwn(errorObj, "currentMtime") ? null : typeof errorObj.currentMtime === "number" && Number.isFinite(errorObj.currentMtime) ? errorObj.currentMtime : void 0;
|
|
238
|
+
if (path === void 0 || errorObj.expectedHash !== void 0 && expectedHash === void 0 || currentHash === void 0 || currentMtime === void 0) return;
|
|
239
|
+
return {
|
|
240
|
+
path,
|
|
241
|
+
expectedHash,
|
|
242
|
+
currentHash,
|
|
243
|
+
currentMtime
|
|
244
|
+
};
|
|
245
|
+
}
|
|
221
246
|
function readFailures(data, errorObj) {
|
|
222
247
|
if (Array.isArray(data.failures)) return data.failures.filter(isFailureDetail);
|
|
223
248
|
if (Array.isArray(data.results)) {
|
|
@@ -258,6 +283,11 @@ function parseErrorResponse(status, body, context, headers) {
|
|
|
258
283
|
if (isCapabilityCode(code)) return new CapabilityError(message, code, status, metadata, readCapability(data, errorObj));
|
|
259
284
|
if (isPartialFailureCode(code)) return new PartialFailureError(message, code, status, metadata, readFailures(data, errorObj));
|
|
260
285
|
if (code === "EGRESS_PROXY_RECOVERY_REQUIRED") return new EgressProxyRecoveryError(message, metadata);
|
|
286
|
+
if (code === "FILE_WRITE_CONFLICT") {
|
|
287
|
+
const conflict = readFileWriteConflictDetails(errorObj);
|
|
288
|
+
if (!conflict) return new ServerError(`${message}: malformed FILE_WRITE_CONFLICT response`, 502, metadata, "INVALID_ERROR_RESPONSE");
|
|
289
|
+
return new FileWriteConflictError(message, conflict.path, conflict.expectedHash, conflict.currentHash, conflict.currentMtime, metadata);
|
|
290
|
+
}
|
|
261
291
|
switch (status) {
|
|
262
292
|
case 400: return new ValidationError(message, data.fields, metadata, code);
|
|
263
293
|
case 401: return new AuthError(message, metadata);
|
|
@@ -272,4 +302,4 @@ function parseErrorResponse(status, body, context, headers) {
|
|
|
272
302
|
}
|
|
273
303
|
}
|
|
274
304
|
//#endregion
|
|
275
|
-
export {
|
|
305
|
+
export { NetworkError as a, QuotaError as c, StateError as d, TimeoutError as f, FileWriteConflictError as i, SandboxError as l, parseErrorResponse as m, CapabilityError as n, NotFoundError as o, ValidationError as p, EgressProxyRecoveryError as r, PartialFailureError as s, AuthError as t, ServerError as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as CreateSandboxOptions } from "./types-
|
|
2
|
-
import { n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
1
|
+
import { M as CreateSandboxOptions } from "./types-BWGnjOVk.js";
|
|
2
|
+
import { n as SandboxInstance, t as HttpClient } from "./sandbox-D61dojnE.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 EventStreamOptions, $i as
|
|
2
|
-
import { A as SandboxMcpEndpoint, C as RespondToPermissionOptions, D as CONTROL_PLANE_MCP_SERVER_NAME, E as BuildSandboxMcpConfigOptions, M as buildControlPlaneMcpConfig, N as buildSandboxMcpConfig, O as SANDBOX_MCP_SERVER_NAME, S as InterruptResult, T as BuildControlPlaneMcpConfigOptions, _ as InteractiveAuthFile, a as WorkspaceImagePublishResult, b as InteractiveSessionInfo, c as TraceExportResult, d as exportTraceBundle, f as otelTraceIdForTangleTrace, g as InteractiveAttachOptions, h as SandboxSession, i as WorkspaceImagePublishRequestOptions, j as SandboxMcpServerEntry, k as SandboxMcpConfig, l as TraceExportSink, m as SandboxTaskSession, n as SandboxInstance, o as WorkspaceImages, p as toOtelJson, r as WorkspaceImagePublishInput, s as TraceExportFormat, u as buildTraceExportPayload, v as InteractiveSessionHandle, w as StartInteractiveOptions, x as InteractiveSessionStatus, y as InteractiveSessionHost } from "./sandbox-
|
|
3
|
-
import { a as Team, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, i as Sandbox, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet } from "./client-
|
|
1
|
+
import { $ as EventStreamOptions, $i as PublicBatchRunRequest, $n as SandboxFleetCostEstimate, $r as SessionBackendCredentials, $t as ListSandboxFleetOptions, Ai as UpdateUserOptions, An as PublishPublicTemplateVersionOptions, Ar as SandboxResources, At as GitCommit, B as DownloadOptions, Bi as TerminalExitInfo, Bn as RolloutOptions, Br as SandboxTraceEvent, Bt as GpuLeaseProviderName, Ci as TeeAttestationReport, Cn as ProvisionEvent, Cr as SandboxFleetWorkspaceSnapshotResult, D as CreateIntelligenceReportOptions, Di as TokenRefreshHandler, Dn as PublicTemplateInfo, Dr as SandboxPortBinding, Dt as GPU_LEASE_PROVIDER_NAMES, E as CreateGpuLeaseOptions, Ei as TeePublicKeyResponse, En as ProvisionStep, Er as SandboxIntelligenceEnvelope, F as DeleteOptions, Fi as WaitForRolloutOptions, Fn as RenameOptions, Fr as SandboxTerminalInfo, Ft as GpuLeaseBilling, G as DriverType, Gi as TerminalStreamHandlers, Gn as SSHCommandDescriptor, Gr as ScopedTokenScope, Gt as IntelligenceReport, H as DriveTurnOptions, Hi as TerminalStream, Hn as RolloutStartResult, Hr as SandboxTraceOptions, Ht as HostAgentDriverConfig, I as DevServerInfo, Ii as WriteFileOptions, Ir as SandboxTerminalManager, It as GpuLeaseCommandResult, J as EffectiveBackendProfile, Ji as BatchBackendStats, Jn as SandboxConnection, Jr as SecretInfo, Jt as IntelligenceReportSubjectType, Ki as TerminalStreamOptions, Kn as SSHCredentials, Kr as SearchMatch, Kt as IntelligenceReportBudget, L as DirectoryPermission, Li as WriteManyFile, Lr as SandboxTerminalRequestOptions, Lt as GpuLeaseExecOptions, M as CreateSandboxOptions, Mi as UploadProgress, Mn as ReapExpiredSandboxFleetsResult, Mr as SandboxStatus, Mt as GitDiff, N as CreateSessionOptions, Ni as UsageInfo, Nn as ReconcileSandboxFleetsOptions, Nr as SandboxTerminalAttachOptions, Nt as GitStatus, O as CreateRequestOptions, Oi as TokenUsage, On as PublicTemplateVersionInfo, Or as SandboxPortPreviewLink, Ot as GitAuth, P as CreateTaskSessionOptions, Pi as WaitForOptions, Pn as ReconcileSandboxFleetsResult, Pr as SandboxTerminalCreateOptions, Pt as GpuLease, Q as EnsureDevServerOptions, Qi as BatchTaskUsage, Qn as SandboxFleetArtifactSpec, Qr as SentSessionMessage, Qt as ListOptions, R as DispatchPromptOptions, Ri as WriteManyOptions, Rn as Rollout, Rr as SandboxTerminals, Rt as GpuLeaseExecResult, Si as TeeAttestationOptions, Sn as PromptResult, Sr as SandboxFleetWorkspaceRestoreResult, St as FleetExecDispatchOptions, T as CompletedTurnResult, Ti as TeePublicKey, Tn as ProvisionStatus, Tr as SandboxInfo, Tt as FleetPromptDispatchOptions, U as DriverConfig, Ui as TerminalStreamAuthFormat, Un as RolloutStatus, Ur as SandboxUser, Ut as HostAgentRuntimeBackend, V as DownloadProgress, Vi as TerminalReadyInfo, Vn as RolloutScorer, Vr as SandboxTraceExport, Vt as GpuLeaseStatus, W as DriverInfo, Wi as TerminalStreamError, Wn as RolloutTurnPart, Wr as ScopedToken, Wt as InstalledTool, X as EgressManager, Xi as BatchEventDataMap, Xn as SandboxEvent, Xr as SendSessionMessageOptions, Y as EffectiveBackendSource, Yi as BatchEvent, Yn as SandboxEnvironment, Yr as SecretsManager, Yt as IntelligenceReportWindow, Z as EgressPolicy, Zi as BatchSidecarGroup, Zn as SandboxFleetArtifact, Zr as SendSessionMessageRequest, Zt as ListMessagesOptions, _ as BranchOptions, _i as TaskSessionChanges, _n as ProcessSignal, _r as SandboxFleetTraceExport, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, ai as SessionMessageInputPart, an as NetworkManager, ar as SandboxFleetIntelligenceEnvelope, at as FileReadBatchResult, bi as TaskSessionInfo, bn as PromptInputPart, br as SandboxFleetWorkspace, bt as FleetDriveTurnOutcome, c as BackendInfo, ci as SnapshotOptions, cn as PermissionsManager, cr as SandboxFleetMachineRecord, ct as FileRenameResult, d as BatchBackend, di as StartupDiagnostics, dn as PreviewLinkWaitOptions, dr as SandboxFleetManifestMachine, dt as FileTreeOptions, ea as BackendType, ei as SessionEventStreamOptions, en as ListSandboxOptions, er as SandboxFleetDispatchFailureClass, et as ExactProcessSpawnOptions, f as BatchResult, fi as StartupOperation, fn as Process, fr as SandboxFleetOperationsSummary, ft as FileTreeResult, g as BatchTaskResult, gi as TaskResult, gn as ProcessManager, gr as SandboxFleetTraceEvent, gt as FleetDispatchCancelResult, h as BatchTask, hi as TaskOptions, hn as ProcessLogEntry, hr as SandboxFleetTraceBundle, ht as FileWriteResult, i as AttachGpuLeaseOptions, ii as SessionMessage, in as NetworkConfig, ir as SandboxFleetInfo, it as FileReadBatchOptions, j as CreateSandboxFleetWithCoordinatorOptions, ji as UploadOptions, jn as ReapExpiredSandboxFleetsOptions, jr as SandboxRuntimeHealth, jt as GitConfig, k as CreateSandboxFleetOptions, ki as TurnDriveResult, kn as PublishPublicTemplateOptions, kr as SandboxResourceUsage, kt as GitBranch, l as BackendManager, li as SnapshotResult, ln as PreviewLinkInfo, lr as SandboxFleetMachineSpec, lt as FileSystem, m as BatchRunRequest, mi as SubscriptionInfo, mn as ProcessListOptions, mr as SandboxFleetToken, mt as FileUsageResult, n as AccessPolicyRule, ni as SessionInfo, nn as MintScopedTokenOptions, nr as SandboxFleetDriverCapability, nt as ExecResult, o as BackendCapabilities, oi as SessionStatus, on as NonHostAgentDriverConfig, or as SandboxFleetMachine, ot as FileReadError, p as BatchRunOptions, pi as StorageConfig, pn as ProcessInfo, pr as SandboxFleetPolicy, pt as FileUsageOptions, q as EffectiveBackend, qi as TerminalStreamToken, qn as SandboxConfig, qr as SearchOptions, qt as IntelligenceReportCompareTo, r as AddUserOptions, ri as SessionListOptions, rn as MkdirOptions, rr as SandboxFleetDriverTimings, rt as FileInfo, s as BackendConfig, si as SnapshotInfo, sn as PermissionLevel, sr as SandboxFleetMachineMeteredUsage, st as FileReadResult, t as AcceleratorKind, ti as SessionForkOptions, tn as McpServerConfig, tr as SandboxFleetDispatchResponse, tt as ExecOptions, u as BackendStatus, un as PreviewLinkManager, ur as SandboxFleetManifest, ut as FileTreeFile, v as ChunkedUploadOptions, vi as TaskSessionCommitResult, vn as ProcessSpawnOptions, vr as SandboxFleetTraceOptions, vt as FleetDispatchResultBufferOptions, w as CommitTaskSessionOptions, wi as TeeAttestationResponse, wn as ProvisionResult, wr as SandboxIdentity, wt as FleetMachineId, xi as TaskSessionProfile, xn as PromptOptions, xr as SandboxFleetWorkspaceReconcileResult, xt as FleetDriveTurnRequest, y as ChunkedUploadResult, yi as TaskSessionFileChange, yn as ProcessStatus, yr as SandboxFleetUsage, yt as FleetDispatchStreamOptions, z as DispatchedSession, zi as TERMINAL_WS_ECHO_SUBPROTOCOL, zn as RolloutChildResult, zr as SandboxTraceBundle, zt as GpuLeaseManager } from "./types-BWGnjOVk.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-D61dojnE.js";
|
|
3
|
+
import { a as Team, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, i as Sandbox, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet } from "./client-BSFFShMp.js";
|
|
4
4
|
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-DtRFVx5U.js";
|
|
5
5
|
import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "./index-Cp1KYanB.js";
|
|
6
|
-
import { a as
|
|
7
|
-
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
6
|
+
import { a as NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, r as EgressProxyRecoveryError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-Bdy5jXzc.js";
|
|
7
|
+
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-BKy2mdq7.js";
|
|
8
8
|
import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
|
|
9
9
|
import { AgentProfile, AgentProfile as AgentProfile$1, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileConnection, AgentProfileFileMount, AgentProfileFileMount as AgentProfileFileMount$1, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePermissionValue, AgentProfilePrompt, AgentProfileResourceRef, AgentProfileResources, AgentProfileSecurityPolicy, AgentProfileValidationIssue, AgentProfileValidationResult, AgentSubagentProfile, Capability, SANDBOX_SIZE_PRESET_NAMES, SandboxSizePreset } from "@tangle-network/agent-interface";
|
|
10
10
|
import { z } from "zod";
|
|
@@ -4192,4 +4192,4 @@ interface RouterEvalMatrixCaseResult {
|
|
|
4192
4192
|
}
|
|
4193
4193
|
declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
|
|
4194
4194
|
//#endregion
|
|
4195
|
-
export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileSecurityPolicy, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchResult, type BatchResultAccumulator, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, type Capability, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DevServerInfo, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EffectiveBackend, type EffectiveBackendProfile, type EffectiveBackendSource, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EnsureDevServerOptions, type EventStreamOptions, type ExactProcessSpawnOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileRenameResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileUsageOptions, type FileUsageResult, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetDriveTurnOutcome, type FleetDriveTurnRequest, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAttachOptions, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InteractiveSessionStatus, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type Process, type ProcessInfo, type ProcessListOptions, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptInputPart, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, type Rollout, type RolloutChildResult, type RolloutOptions, type RolloutScorer, type RolloutStartResult, type RolloutStatus, type RolloutTurnPart, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, Sandbox, type SandboxConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxIdentity, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeHealth, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalAttachOptions, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTerminals, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionBroadcastEvent, type SessionBroadcastResult, type SessionEventStreamOptions, type SessionForkOptions, type SessionInfo, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskOptions, type TaskResult, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, type TerminalExitInfo, type TerminalReadyInfo, TerminalStream, type TerminalStreamAuthFormat, TerminalStreamError, type TerminalStreamHandlers, type TerminalStreamOptions, type TerminalStreamToken, TimeoutError, type TokenRefreshHandler, type TokenUsage, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createBatchResultAccumulator, createConfidentialSandbox, createManageSandboxesTool, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
|
|
4195
|
+
export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileSecurityPolicy, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchResult, type BatchResultAccumulator, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, type Capability, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DevServerInfo, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EffectiveBackend, type EffectiveBackendProfile, type EffectiveBackendSource, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EnsureDevServerOptions, type EventStreamOptions, type ExactProcessSpawnOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileRenameResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileUsageOptions, type FileUsageResult, FileWriteConflictError, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetDriveTurnOutcome, type FleetDriveTurnRequest, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAttachOptions, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InteractiveSessionStatus, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, type Process, type ProcessInfo, type ProcessListOptions, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptInputPart, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, type Rollout, type RolloutChildResult, type RolloutOptions, type RolloutScorer, type RolloutStartResult, type RolloutStatus, type RolloutTurnPart, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, Sandbox, type SandboxConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxIdentity, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeHealth, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalAttachOptions, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTerminals, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionBroadcastEvent, type SessionBroadcastResult, type SessionEventStreamOptions, type SessionForkOptions, type SessionInfo, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskOptions, type TaskResult, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, type TerminalExitInfo, type TerminalReadyInfo, TerminalStream, type TerminalStreamAuthFormat, TerminalStreamError, type TerminalStreamHandlers, type TerminalStreamOptions, type TerminalStreamToken, TimeoutError, type TokenRefreshHandler, type TokenUsage, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createBatchResultAccumulator, createConfidentialSandbox, createManageSandboxesTool, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { m as backendTypeSchema, p as normalizeRuntimeBackendConfig } from "./runtime-api-
|
|
2
|
-
import { a as
|
|
3
|
-
import { a as splitInlineProfileSkills, c as SandboxFleetClient, i as splitInlineProfileFileMounts, l as createBatchResultAccumulator, n as Sandbox, o as validateDeferredProfileFileMounts, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as validateBatchRunRequest } from "./client-
|
|
4
|
-
import { _ as 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-
|
|
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 { m as backendTypeSchema, p as normalizeRuntimeBackendConfig } from "./runtime-api-d1lY25yx.js";
|
|
2
|
+
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, r as EgressProxyRecoveryError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-Bf-A-4SA.js";
|
|
3
|
+
import { a as splitInlineProfileSkills, c as SandboxFleetClient, i as splitInlineProfileFileMounts, l as createBatchResultAccumulator, n as Sandbox, o as validateDeferredProfileFileMounts, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as validateBatchRunRequest } from "./client-DzVMfNxm.js";
|
|
4
|
+
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-Bnwkvu7K.js";
|
|
5
|
+
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-CVdLf_4n.js";
|
|
6
|
+
import { t as TangleSandboxClient } from "./tangle-BArHuIYh.js";
|
|
7
7
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
//#region src/confidential.ts
|
|
@@ -1473,4 +1473,4 @@ function stripUndefined(value) {
|
|
|
1473
1473
|
return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => [k, stripUndefined(v)]));
|
|
1474
1474
|
}
|
|
1475
1475
|
//#endregion
|
|
1476
|
-
export { AuthError, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, DEFAULT_SANDBOX_SIZE, EgressProxyRecoveryError, GPU_LEASE_PROVIDER_NAMES, Image, ImageBuilder, IntelligenceClient, InteractiveSessionHandle, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, NetworkError, NotFoundError, PartialFailureError, QuotaError, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, Sandbox, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxSession, SandboxTaskSession, ServerError, StateError, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, TerminalStream, TerminalStreamError, TimeoutError, ValidationError, WorkspaceImages, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createBatchResultAccumulator, createConfidentialSandbox, createManageSandboxesTool, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
|
|
1476
|
+
export { AuthError, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, DEFAULT_SANDBOX_SIZE, EgressProxyRecoveryError, FileWriteConflictError, GPU_LEASE_PROVIDER_NAMES, Image, ImageBuilder, IntelligenceClient, InteractiveSessionHandle, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, NetworkError, NotFoundError, PartialFailureError, QuotaError, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, Sandbox, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxSession, SandboxTaskSession, ServerError, StateError, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, TerminalStream, TerminalStreamError, TimeoutError, ValidationError, WorkspaceImages, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createBatchResultAccumulator, createConfidentialSandbox, createManageSandboxesTool, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as NetworkError, f as TimeoutError, m as parseErrorResponse } from "../errors-Bf-A-4SA.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
|
|
1
|
+
import { a as NetworkError, c as QuotaError, f as TimeoutError, l as SandboxError, m as parseErrorResponse, n as CapabilityError, p as ValidationError, u as ServerError } from "./errors-Bf-A-4SA.js";
|
|
2
2
|
import { agentProfileSchema } from "@tangle-network/agent-interface";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
const ALL_BACKEND_TYPES = Object.values({
|
|
@@ -493,15 +493,20 @@ var SandboxRuntimeApi = class {
|
|
|
493
493
|
appendSessionIdQuery(params, options.sessionId);
|
|
494
494
|
const query = params.toString();
|
|
495
495
|
await this.transport.ensureRunning();
|
|
496
|
-
|
|
496
|
+
const payload = await this.json(`/files/write${query ? `?${query}` : ""}`, {
|
|
497
497
|
method: "POST",
|
|
498
498
|
body: JSON.stringify({
|
|
499
499
|
path,
|
|
500
500
|
content,
|
|
501
501
|
...options.encoding !== void 0 ? { encoding: options.encoding } : {},
|
|
502
|
-
...options.mode !== void 0 ? { mode: options.mode } : {}
|
|
502
|
+
...options.mode !== void 0 ? { mode: options.mode } : {},
|
|
503
|
+
...options.ifHash !== void 0 ? { expectedHash: options.ifHash } : {},
|
|
504
|
+
...options.ifAbsent !== void 0 ? { ifAbsent: options.ifAbsent } : {}
|
|
503
505
|
})
|
|
504
|
-
})
|
|
506
|
+
});
|
|
507
|
+
if ([...options.ifHash !== void 0 ? ["ifHash"] : [], ...options.ifAbsent ? ["ifAbsent"] : []].some((precondition) => !payload.data?.preconditionsApplied?.includes(precondition))) throw new CapabilityError("sidecar does not support write preconditions");
|
|
508
|
+
if (!payload.data) throw new ServerError("Invalid file write response: missing data", 502);
|
|
509
|
+
return payload.data;
|
|
505
510
|
}
|
|
506
511
|
/**
|
|
507
512
|
* Upload in-memory binary or text data to the sandbox over the chunked
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
1
|
+
import { Dr as SandboxPortBinding, Fn as RenameOptions, Fr as SandboxTerminalInfo, Ii as WriteFileOptions, Ir as SandboxTerminalManager, Lr as SandboxTerminalRequestOptions, Mi as UploadProgress, N as CreateSessionOptions, P as CreateTaskSessionOptions, Pr as SandboxTerminalCreateOptions, Qr as SentSessionMessage, Xr as SendSessionMessageOptions, Zr as SendSessionMessageRequest, Zt as ListMessagesOptions, _i as TaskSessionChanges, at as FileReadBatchResult, bi as TaskSessionInfo, ct as FileRenameResult, dt as FileTreeOptions, ft as FileTreeResult, ht as FileWriteResult, ii as SessionMessage, it as FileReadBatchOptions, jr as SandboxRuntimeHealth, mt as FileUsageResult, ni as SessionInfo, pt as FileUsageOptions, v as ChunkedUploadOptions, vi as TaskSessionCommitResult, w as CommitTaskSessionOptions, y as ChunkedUploadResult } from "./types-BWGnjOVk.js";
|
|
2
|
+
import { a as NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-Bdy5jXzc.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/chunked-upload.d.ts
|
|
5
5
|
/** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
|
|
@@ -103,4 +103,4 @@ declare class SandboxRuntimeClient extends SandboxRuntimeApi {
|
|
|
103
103
|
}
|
|
104
104
|
declare function createSandboxRuntimeClient(config: SandboxRuntimeClientConfig): SandboxRuntimeClient;
|
|
105
105
|
//#endregion
|
|
106
|
-
export { AuthError, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, type FileWriteResult, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, ServerError, type SessionMessage, StateError, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, createSandboxRuntimeClient, uploadChunked };
|
|
106
|
+
export { AuthError, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, FileWriteConflictError, type FileWriteResult, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, ServerError, type SessionMessage, StateError, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, createSandboxRuntimeClient, uploadChunked };
|
package/dist/runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as uploadChunked, c as combineAbortSignals, t as SandboxRuntimeApi } from "./runtime-api-
|
|
2
|
-
import { a as
|
|
1
|
+
import { a as uploadChunked, c as combineAbortSignals, t as SandboxRuntimeApi } from "./runtime-api-d1lY25yx.js";
|
|
2
|
+
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-Bf-A-4SA.js";
|
|
3
3
|
//#region src/runtime-client.ts
|
|
4
4
|
const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
|
|
5
5
|
function requireToken(token) {
|
|
@@ -80,4 +80,4 @@ function createSandboxRuntimeClient(config) {
|
|
|
80
80
|
return new SandboxRuntimeClient(config);
|
|
81
81
|
}
|
|
82
82
|
//#endregion
|
|
83
|
-
export { AuthError, CapabilityError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxError, SandboxRuntimeClient, ServerError, StateError, TimeoutError, ValidationError, createSandboxRuntimeClient, uploadChunked };
|
|
83
|
+
export { AuthError, CapabilityError, FileWriteConflictError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxError, SandboxRuntimeClient, ServerError, StateError, TimeoutError, ValidationError, createSandboxRuntimeClient, uploadChunked };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as uploadChunked, c as combineAbortSignals, d as applyRequestedModel, f as assertCurrentBackendType, i as sessionHeaders, l as encodePromptForWire, n as normalizeSessionInfo, p as normalizeRuntimeBackendConfig, r as appendSessionIdQuery, t as SandboxRuntimeApi } from "./runtime-api-
|
|
2
|
-
import { a as
|
|
1
|
+
import { a as uploadChunked, c as combineAbortSignals, d as applyRequestedModel, f as assertCurrentBackendType, i as sessionHeaders, l as encodePromptForWire, n as normalizeSessionInfo, p as normalizeRuntimeBackendConfig, r as appendSessionIdQuery, t as SandboxRuntimeApi } from "./runtime-api-d1lY25yx.js";
|
|
2
|
+
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, l as SandboxError, m as parseErrorResponse, n as CapabilityError, o as NotFoundError, p as ValidationError, t as AuthError, u as ServerError } from "./errors-Bf-A-4SA.js";
|
|
3
3
|
import { readTokenCostUsd, readTokenUsage } from "@tangle-network/agent-core";
|
|
4
4
|
//#region src/lib/sse-parser.ts
|
|
5
5
|
/**
|
|
@@ -1299,6 +1299,7 @@ function normalizePreviewLink(raw) {
|
|
|
1299
1299
|
lastSyncAt: raw.lastSyncAt,
|
|
1300
1300
|
createdAt: raw.createdAt,
|
|
1301
1301
|
updatedAt: raw.updatedAt,
|
|
1302
|
+
lastProbe: raw.lastProbe,
|
|
1302
1303
|
metadata: raw.metadata
|
|
1303
1304
|
};
|
|
1304
1305
|
}
|
|
@@ -1538,6 +1539,23 @@ function parseTextFileReadResponse(body) {
|
|
|
1538
1539
|
return payload.data.content;
|
|
1539
1540
|
}
|
|
1540
1541
|
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
1542
|
+
const PREVIEW_LINK_READY_TIMEOUT_MS = 12e4;
|
|
1543
|
+
const PREVIEW_LINK_READY_POLL_INTERVAL_MS = 2e3;
|
|
1544
|
+
const delayUntilAborted = (ms, signal) => new Promise((resolve, reject) => {
|
|
1545
|
+
if (signal?.aborted) {
|
|
1546
|
+
reject(signal.reason ?? /* @__PURE__ */ new Error("aborted"));
|
|
1547
|
+
return;
|
|
1548
|
+
}
|
|
1549
|
+
const timer = setTimeout(() => {
|
|
1550
|
+
signal?.removeEventListener("abort", onAbort);
|
|
1551
|
+
resolve();
|
|
1552
|
+
}, ms);
|
|
1553
|
+
function onAbort() {
|
|
1554
|
+
clearTimeout(timer);
|
|
1555
|
+
reject(signal?.reason ?? /* @__PURE__ */ new Error("aborted"));
|
|
1556
|
+
}
|
|
1557
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
1558
|
+
});
|
|
1541
1559
|
const SANDBOX_STATUS_FRESHNESS_MS = 1e3;
|
|
1542
1560
|
const sandboxStatusObservedAt = /* @__PURE__ */ new WeakMap();
|
|
1543
1561
|
const directRuntimeInstances = /* @__PURE__ */ new WeakSet();
|
|
@@ -2066,14 +2084,19 @@ var SandboxInstance = class SandboxInstance {
|
|
|
2066
2084
|
path,
|
|
2067
2085
|
content,
|
|
2068
2086
|
encoding: options?.encoding,
|
|
2069
|
-
mode: options?.mode
|
|
2087
|
+
mode: options?.mode,
|
|
2088
|
+
expectedHash: options?.ifHash,
|
|
2089
|
+
ifAbsent: options?.ifAbsent
|
|
2070
2090
|
})
|
|
2071
2091
|
});
|
|
2072
2092
|
if (!response.ok) {
|
|
2073
2093
|
const body = await response.text();
|
|
2074
2094
|
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2075
2095
|
}
|
|
2076
|
-
|
|
2096
|
+
const data = await response.json();
|
|
2097
|
+
if ([...options?.ifHash !== void 0 ? ["ifHash"] : [], ...options?.ifAbsent ? ["ifAbsent"] : []].some((precondition) => !data.data?.preconditionsApplied?.includes(precondition))) throw new CapabilityError("sidecar does not support write preconditions");
|
|
2098
|
+
if (!data.data) throw new ServerError("Invalid file write response: missing data", 502);
|
|
2099
|
+
return data.data;
|
|
2077
2100
|
}
|
|
2078
2101
|
/**
|
|
2079
2102
|
* Write many files in one paced, retry-aware batch — see
|
|
@@ -2093,7 +2116,9 @@ var SandboxInstance = class SandboxInstance {
|
|
|
2093
2116
|
try {
|
|
2094
2117
|
await this.write(file.path, file.content, {
|
|
2095
2118
|
mode: file.mode,
|
|
2096
|
-
encoding: file.encoding
|
|
2119
|
+
encoding: file.encoding,
|
|
2120
|
+
ifHash: file.ifHash,
|
|
2121
|
+
ifAbsent: file.ifAbsent
|
|
2097
2122
|
});
|
|
2098
2123
|
break;
|
|
2099
2124
|
} catch (err) {
|
|
@@ -4052,8 +4077,10 @@ var SandboxInstance = class SandboxInstance {
|
|
|
4052
4077
|
get previewLinks() {
|
|
4053
4078
|
return {
|
|
4054
4079
|
create: (port, options) => this.previewLinkCreate(port, options),
|
|
4080
|
+
get: (previewId) => this.previewLinkGet(previewId),
|
|
4055
4081
|
list: () => this.previewLinkList(),
|
|
4056
|
-
remove: (previewId) => this.previewLinkRemove(previewId)
|
|
4082
|
+
remove: (previewId) => this.previewLinkRemove(previewId),
|
|
4083
|
+
waitUntilReady: (previewId, options) => this.previewLinkWaitUntilReady(previewId, options)
|
|
4057
4084
|
};
|
|
4058
4085
|
}
|
|
4059
4086
|
async previewLinkCreate(port, options) {
|
|
@@ -4080,6 +4107,72 @@ var SandboxInstance = class SandboxInstance {
|
|
|
4080
4107
|
}
|
|
4081
4108
|
return ((await response.json()).previewLinks ?? []).map(normalizePreviewLink);
|
|
4082
4109
|
}
|
|
4110
|
+
async previewLinkGet(previewId, signal) {
|
|
4111
|
+
const response = await this.runtimeFetch(`/preview-links/${encodeURIComponent(previewId)}`, signal ? { signal } : void 0);
|
|
4112
|
+
if (!response.ok) {
|
|
4113
|
+
const body = await response.text();
|
|
4114
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
4115
|
+
}
|
|
4116
|
+
return normalizePreviewLink((await response.json()).previewLink);
|
|
4117
|
+
}
|
|
4118
|
+
async previewLinkWaitUntilReady(previewId, options) {
|
|
4119
|
+
const timeoutMs = options?.timeoutMs ?? PREVIEW_LINK_READY_TIMEOUT_MS;
|
|
4120
|
+
const pollIntervalMs = options?.pollIntervalMs ?? PREVIEW_LINK_READY_POLL_INTERVAL_MS;
|
|
4121
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs < 1) throw new ValidationError("timeoutMs must be at least 1");
|
|
4122
|
+
if (!Number.isFinite(pollIntervalMs) || pollIntervalMs < 1) throw new ValidationError("pollIntervalMs must be at least 1");
|
|
4123
|
+
const endpoint = `/preview-links/${encodeURIComponent(previewId)}`;
|
|
4124
|
+
const startTime = Date.now();
|
|
4125
|
+
let lastProbeCode;
|
|
4126
|
+
while (true) {
|
|
4127
|
+
if (options?.signal?.aborted) throw new TimeoutError(0, "Aborted", {
|
|
4128
|
+
origin: "runtime",
|
|
4129
|
+
endpoint
|
|
4130
|
+
});
|
|
4131
|
+
const remainingBeforeCheckMs = timeoutMs - (Date.now() - startTime);
|
|
4132
|
+
if (remainingBeforeCheckMs < 0) throw new TimeoutError(timeoutMs, `Timed out waiting for preview link ${previewId} to become ready${lastProbeCode ? ` (${lastProbeCode})` : ""}`, {
|
|
4133
|
+
origin: "runtime",
|
|
4134
|
+
endpoint
|
|
4135
|
+
});
|
|
4136
|
+
const requestSignal = options?.signal && timeoutMs > 0 ? AbortSignal.any([options.signal, AbortSignal.timeout(remainingBeforeCheckMs)]) : options?.signal ?? (timeoutMs > 0 ? AbortSignal.timeout(remainingBeforeCheckMs) : void 0);
|
|
4137
|
+
let previewLink;
|
|
4138
|
+
try {
|
|
4139
|
+
previewLink = await this.previewLinkGet(previewId, requestSignal);
|
|
4140
|
+
} catch (error) {
|
|
4141
|
+
if (options?.signal?.aborted) throw new TimeoutError(0, "Aborted", {
|
|
4142
|
+
origin: "runtime",
|
|
4143
|
+
endpoint
|
|
4144
|
+
});
|
|
4145
|
+
if (timeoutMs > 0 && Date.now() - startTime >= timeoutMs) throw new TimeoutError(timeoutMs, `Timed out waiting for preview link ${previewId} to become ready${lastProbeCode ? ` (${lastProbeCode})` : ""}`, {
|
|
4146
|
+
origin: "runtime",
|
|
4147
|
+
endpoint
|
|
4148
|
+
});
|
|
4149
|
+
throw error;
|
|
4150
|
+
}
|
|
4151
|
+
lastProbeCode = previewLink.lastProbe?.code;
|
|
4152
|
+
if (options?.signal?.aborted) throw new TimeoutError(0, "Aborted", {
|
|
4153
|
+
origin: "runtime",
|
|
4154
|
+
endpoint
|
|
4155
|
+
});
|
|
4156
|
+
if (previewLink.status === "ready") return previewLink;
|
|
4157
|
+
if (previewLink.status === "error" || previewLink.status === "disabled") throw new StateError(`Preview link cannot become ready (status: ${previewLink.status})`, previewLink.status, "ready", {
|
|
4158
|
+
origin: "runtime",
|
|
4159
|
+
endpoint
|
|
4160
|
+
}, lastProbeCode ?? "PREVIEW_LINK_UNAVAILABLE");
|
|
4161
|
+
const remainingAfterCheckMs = timeoutMs - (Date.now() - startTime);
|
|
4162
|
+
if (remainingAfterCheckMs <= 0) throw new TimeoutError(timeoutMs, `Timed out waiting for preview link ${previewId} to become ready${lastProbeCode ? ` (${lastProbeCode})` : ""}`, {
|
|
4163
|
+
origin: "runtime",
|
|
4164
|
+
endpoint
|
|
4165
|
+
});
|
|
4166
|
+
try {
|
|
4167
|
+
await delayUntilAborted(Math.min(pollIntervalMs, remainingAfterCheckMs), options?.signal);
|
|
4168
|
+
} catch {
|
|
4169
|
+
throw new TimeoutError(0, "Aborted", {
|
|
4170
|
+
origin: "runtime",
|
|
4171
|
+
endpoint
|
|
4172
|
+
});
|
|
4173
|
+
}
|
|
4174
|
+
}
|
|
4175
|
+
}
|
|
4083
4176
|
async previewLinkRemove(previewId) {
|
|
4084
4177
|
const response = await this.runtimeFetch(`/preview-links/${encodeURIComponent(previewId)}`, { method: "DELETE" });
|
|
4085
4178
|
if (!response.ok) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as EventStreamOptions,
|
|
1
|
+
import { $ as EventStreamOptions, At as GitCommit, Bn as RolloutOptions, Cn as ProvisionEvent, Dr as SandboxPortBinding, Ei as TeePublicKeyResponse, Fi as WaitForRolloutOptions, Gi as TerminalStreamHandlers, Gn as SSHCommandDescriptor, Gt as IntelligenceReport, H as DriveTurnOptions, Hi as TerminalStream, Hn as RolloutStartResult, Hr as SandboxTraceOptions, Ii as WriteFileOptions, In as RestoreSnapshotOptions, Jn as SandboxConnection, K as DurablePlan, Kn as SSHCredentials, Kr as SearchMatch, Kt as IntelligenceReportBudget, Li as WriteManyFile, Ln as ResumeOptions, Mr as SandboxStatus, Mt as GitDiff, N as CreateSessionOptions, Nr as SandboxTerminalAttachOptions, Nt as GitStatus, P as CreateTaskSessionOptions, Pi as WaitForOptions, Pt as GpuLease, Qr as SentSessionMessage, R as DispatchPromptOptions, Ri as WriteManyOptions, Rn as Rollout, Rr as SandboxTerminals, S as CodeLanguage, Si as TeeAttestationOptions, Sn as PromptResult, T as CompletedTurnResult, Tr as SandboxInfo, W as DriverInfo, Wr as ScopedToken, Wt as InstalledTool, X as EgressManager, Xn as SandboxEvent, Xr as SendSessionMessageOptions, Xt as JsonValue, Yt as IntelligenceReportWindow, Zr as SendSessionMessageRequest, Zt as ListMessagesOptions, _ as BranchOptions, _i as TaskSessionChanges, an as NetworkManager, b as CodeExecutionOptions, bi as TaskSessionInfo, bn as PromptInputPart, ci as SnapshotOptions, cn as PermissionsManager, di as StartupDiagnostics, ea as BackendType, ei as SessionEventStreamOptions, gn as ProcessManager, hr as SandboxFleetTraceBundle, ht as FileWriteResult, ii as SessionMessage, jr as SandboxRuntimeHealth, ki as TurnDriveResult, kr as SandboxResourceUsage, kt as GitBranch, l as BackendManager, li as SnapshotResult, lt as FileSystem, ni as SessionInfo, nn as MintScopedTokenOptions, nt as ExecResult, qr as SearchOptions, qt as IntelligenceReportCompareTo, ri as SessionListOptions, s as BackendConfig, si as SnapshotInfo, ti as SessionForkOptions, tt as ExecOptions, un as PreviewLinkManager, vi as TaskSessionCommitResult, w as CommitTaskSessionOptions, wi as TeeAttestationResponse, wn as ProvisionResult, x as CodeExecutionResult, xn as PromptOptions, z as DispatchedSession, zr as SandboxTraceBundle, zt as GpuLeaseManager } from "./types-BWGnjOVk.js";
|
|
2
2
|
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
3
3
|
|
|
4
4
|
//#region src/mcp.d.ts
|
|
@@ -1278,6 +1278,8 @@ declare class SandboxInstance {
|
|
|
1278
1278
|
get previewLinks(): PreviewLinkManager;
|
|
1279
1279
|
private previewLinkCreate;
|
|
1280
1280
|
private previewLinkList;
|
|
1281
|
+
private previewLinkGet;
|
|
1282
|
+
private previewLinkWaitUntilReady;
|
|
1281
1283
|
private previewLinkRemove;
|
|
1282
1284
|
/**
|
|
1283
1285
|
* Get information about the infrastructure driver for this sandbox.
|
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-BKy2mdq7.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-BArHuIYh.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 {
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
1
|
+
import { m as parseErrorResponse } from "./errors-Bf-A-4SA.js";
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-Bnwkvu7K.js";
|
|
3
3
|
//#region src/tangle/abi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tangle Contract ABI Definitions
|
|
@@ -1495,8 +1495,9 @@ interface SandboxConfig {
|
|
|
1495
1495
|
* - `stopped` - Sandbox is paused (can be resumed)
|
|
1496
1496
|
* - `failed` - Sandbox encountered an error
|
|
1497
1497
|
* - `expired` - Sandbox exceeded its lifetime limit
|
|
1498
|
+
* - `deleted` - Sandbox has been deleted
|
|
1498
1499
|
*/
|
|
1499
|
-
type SandboxStatus = "pending" | "provisioning" | "running" | "stopped" | "failed" | "expired";
|
|
1500
|
+
type SandboxStatus = "pending" | "provisioning" | "running" | "stopped" | "failed" | "expired" | "deleted";
|
|
1500
1501
|
/**
|
|
1501
1502
|
* Resource limits for a sandbox.
|
|
1502
1503
|
*/
|
|
@@ -4817,8 +4818,22 @@ interface PreviewLinkInfo {
|
|
|
4817
4818
|
lastSyncAt: string;
|
|
4818
4819
|
createdAt: string;
|
|
4819
4820
|
updatedAt: string;
|
|
4821
|
+
/** Latest safe result from the public delivery check. */
|
|
4822
|
+
lastProbe?: {
|
|
4823
|
+
checkedAt: string;
|
|
4824
|
+
httpStatus?: number;
|
|
4825
|
+
code?: "PREVIEW_INVALID_URL" | "PREVIEW_NETWORK_ERROR" | "PREVIEW_REQUEST_TIMED_OUT" | "PREVIEW_ROUTE_NOT_PUBLISHED" | "PREVIEW_UPSTREAM_UNAVAILABLE";
|
|
4826
|
+
};
|
|
4820
4827
|
metadata?: Record<string, unknown>;
|
|
4821
4828
|
}
|
|
4829
|
+
interface PreviewLinkWaitOptions {
|
|
4830
|
+
/** Maximum time to wait for public delivery. Defaults to 120 seconds. */
|
|
4831
|
+
timeoutMs?: number;
|
|
4832
|
+
/** Delay between public delivery checks. Defaults to 2 seconds. */
|
|
4833
|
+
pollIntervalMs?: number;
|
|
4834
|
+
/** Cancels the wait without cancelling the preview link itself. */
|
|
4835
|
+
signal?: AbortSignal;
|
|
4836
|
+
}
|
|
4822
4837
|
/**
|
|
4823
4838
|
* Preview link management.
|
|
4824
4839
|
*
|
|
@@ -4850,6 +4865,20 @@ interface PreviewLinkManager {
|
|
|
4850
4865
|
protocol?: "tcp" | "udp";
|
|
4851
4866
|
metadata?: Record<string, unknown>;
|
|
4852
4867
|
}): Promise<PreviewLinkInfo>;
|
|
4868
|
+
/**
|
|
4869
|
+
* Refresh one link's public delivery status.
|
|
4870
|
+
*
|
|
4871
|
+
* `ready` means the public route reached the sandbox app. It does not judge
|
|
4872
|
+
* the app's response body or replace application-level health checks.
|
|
4873
|
+
*/
|
|
4874
|
+
get(previewId: string): Promise<PreviewLinkInfo>;
|
|
4875
|
+
/**
|
|
4876
|
+
* Wait until the public route reaches the sandbox app.
|
|
4877
|
+
*
|
|
4878
|
+
* The returned link includes the last safe delivery result. This avoids
|
|
4879
|
+
* browser-side probes, which cannot reliably inspect cross-origin apps.
|
|
4880
|
+
*/
|
|
4881
|
+
waitUntilReady(previewId: string, options?: PreviewLinkWaitOptions): Promise<PreviewLinkInfo>;
|
|
4853
4882
|
/**
|
|
4854
4883
|
* List all preview links for this sandbox.
|
|
4855
4884
|
*/
|
|
@@ -5551,6 +5580,8 @@ interface FileWriteResult {
|
|
|
5551
5580
|
mtime: number;
|
|
5552
5581
|
/** Encoding echoed by runtimes that include it in write responses. */
|
|
5553
5582
|
encoding?: "utf8" | "base64";
|
|
5583
|
+
/** Preconditions the sidecar confirmed it enforced for this write. */
|
|
5584
|
+
preconditionsApplied?: ("ifHash" | "ifAbsent")[];
|
|
5554
5585
|
}
|
|
5555
5586
|
/** Metadata returned after a successful file or directory rename. */
|
|
5556
5587
|
interface FileRenameResult {
|
|
@@ -5725,6 +5756,21 @@ interface WriteManyFile {
|
|
|
5725
5756
|
mode?: number;
|
|
5726
5757
|
/** Encoding of `content` on the wire. */
|
|
5727
5758
|
encoding?: "utf8" | "base64";
|
|
5759
|
+
/**
|
|
5760
|
+
* Only write when the current content SHA-256 matches this value.
|
|
5761
|
+
* Use the hash returned by a prior {@link FileWriteResult} or
|
|
5762
|
+
* {@link FileReadResult}. The SDK detects an old sidecar only after the write
|
|
5763
|
+
* if it does not echo this precondition in `preconditionsApplied`, so the
|
|
5764
|
+
* write may already have occurred before `CapabilityError` is thrown.
|
|
5765
|
+
*/
|
|
5766
|
+
ifHash?: string;
|
|
5767
|
+
/**
|
|
5768
|
+
* Only write when the path does not exist.
|
|
5769
|
+
* The SDK detects an old sidecar only after the write if it does not echo
|
|
5770
|
+
* this precondition in `preconditionsApplied`, so the write may already have
|
|
5771
|
+
* occurred before `CapabilityError` is thrown.
|
|
5772
|
+
*/
|
|
5773
|
+
ifAbsent?: boolean;
|
|
5728
5774
|
}
|
|
5729
5775
|
/** Options for {@link FileSystem.write}. */
|
|
5730
5776
|
interface WriteFileOptions {
|
|
@@ -5734,6 +5780,21 @@ interface WriteFileOptions {
|
|
|
5734
5780
|
encoding?: "utf8" | "base64";
|
|
5735
5781
|
/** Agent session whose workspace and change history receive the write. */
|
|
5736
5782
|
sessionId?: string;
|
|
5783
|
+
/**
|
|
5784
|
+
* Only write when the current content SHA-256 matches this value.
|
|
5785
|
+
* Use the hash returned by a prior {@link FileWriteResult} or
|
|
5786
|
+
* {@link FileReadResult}. The SDK detects an old sidecar only after the write
|
|
5787
|
+
* if it does not echo this precondition in `preconditionsApplied`, so the
|
|
5788
|
+
* write may already have occurred before `CapabilityError` is thrown.
|
|
5789
|
+
*/
|
|
5790
|
+
ifHash?: string;
|
|
5791
|
+
/**
|
|
5792
|
+
* Only write when the path does not exist.
|
|
5793
|
+
* The SDK detects an old sidecar only after the write if it does not echo
|
|
5794
|
+
* this precondition in `preconditionsApplied`, so the write may already have
|
|
5795
|
+
* occurred before `CapabilityError` is thrown.
|
|
5796
|
+
*/
|
|
5797
|
+
ifAbsent?: boolean;
|
|
5737
5798
|
}
|
|
5738
5799
|
/** Options for {@link FileSystem.writeMany}. */
|
|
5739
5800
|
interface WriteManyOptions {
|
|
@@ -6077,4 +6138,4 @@ interface CodeExecutionOptions {
|
|
|
6077
6138
|
idempotencyKey?: string;
|
|
6078
6139
|
}
|
|
6079
6140
|
//#endregion
|
|
6080
|
-
export { EventStreamOptions as $,
|
|
6141
|
+
export { EventStreamOptions as $, PublicBatchRunRequest as $i, SandboxFleetCostEstimate as $n, SessionBackendCredentials as $r, ListSandboxFleetOptions as $t, CreateSandboxFleetTokenOptions as A, UpdateUserOptions as Ai, PublishPublicTemplateVersionOptions as An, SandboxResources as Ar, GitCommit as At, DownloadOptions as B, TerminalExitInfo as Bi, RolloutOptions as Bn, SandboxTraceEvent as Br, GpuLeaseProviderName as Bt, CodeResultPart as C, TeeAttestationReport as Ci, ProvisionEvent as Cn, SandboxFleetWorkspaceSnapshotResult as Cr, FleetExecDispatchResult as Ct, CreateIntelligenceReportOptions as D, TokenRefreshHandler as Di, PublicTemplateInfo as Dn, SandboxPortBinding as Dr, GPU_LEASE_PROVIDER_NAMES as Dt, CreateGpuLeaseOptions as E, TeePublicKeyResponse as Ei, ProvisionStep as En, SandboxIntelligenceEnvelope as Er, FleetPromptDispatchResult as Et, DeleteOptions as F, WaitForRolloutOptions as Fi, RenameOptions as Fn, SandboxTerminalInfo as Fr, GpuLeaseBilling as Ft, DriverType as G, TerminalStreamHandlers as Gi, SSHCommandDescriptor as Gn, ScopedTokenScope as Gr, IntelligenceReport as Gt, DriveTurnOptions as H, TerminalStream as Hi, RolloutStartResult as Hn, SandboxTraceOptions as Hr, HostAgentDriverConfig as Ht, DevServerInfo as I, WriteFileOptions as Ii, RestoreSnapshotOptions as In, SandboxTerminalManager as Ir, GpuLeaseCommandResult as It, EffectiveBackendProfile as J, BatchBackendStats as Ji, SandboxConnection as Jn, SecretInfo as Jr, IntelligenceReportSubjectType as Jt, DurablePlan as K, TerminalStreamOptions as Ki, SSHCredentials as Kn, SearchMatch as Kr, IntelligenceReportBudget as Kt, DirectoryPermission as L, WriteManyFile as Li, ResumeOptions as Ln, SandboxTerminalRequestOptions as Lr, GpuLeaseExecOptions as Lt, CreateSandboxOptions as M, UploadProgress as Mi, ReapExpiredSandboxFleetsResult as Mn, SandboxStatus as Mr, GitDiff as Mt, CreateSessionOptions as N, UsageInfo as Ni, ReconcileSandboxFleetsOptions as Nn, SandboxTerminalAttachOptions as Nr, GitStatus as Nt, CreateRequestOptions as O, TokenUsage as Oi, PublicTemplateVersionInfo as On, SandboxPortPreviewLink as Or, GitAuth as Ot, CreateTaskSessionOptions as P, WaitForOptions as Pi, ReconcileSandboxFleetsResult as Pn, SandboxTerminalCreateOptions as Pr, GpuLease as Pt, EnsureDevServerOptions as Q, BatchTaskUsage as Qi, SandboxFleetArtifactSpec as Qn, SentSessionMessage as Qr, ListOptions as Qt, DispatchPromptOptions as R, WriteManyOptions as Ri, Rollout as Rn, SandboxTerminals as Rr, GpuLeaseExecResult as Rt, CodeLanguage as S, TeeAttestationOptions as Si, PromptResult as Sn, SandboxFleetWorkspaceRestoreResult as Sr, FleetExecDispatchOptions as St, CompletedTurnResult as T, TeePublicKey as Ti, ProvisionStatus as Tn, SandboxInfo as Tr, FleetPromptDispatchOptions as Tt, DriverConfig as U, TerminalStreamAuthFormat as Ui, RolloutStatus as Un, SandboxUser as Ur, HostAgentRuntimeBackend as Ut, DownloadProgress as V, TerminalReadyInfo as Vi, RolloutScorer as Vn, SandboxTraceExport as Vr, GpuLeaseStatus as Vt, DriverInfo as W, TerminalStreamError as Wi, RolloutTurnPart as Wn, ScopedToken as Wr, InstalledTool as Wt, EgressManager as X, BatchEventDataMap as Xi, SandboxEvent as Xn, SendSessionMessageOptions as Xr, JsonValue as Xt, EffectiveBackendSource as Y, BatchEvent as Yi, SandboxEnvironment as Yn, SecretsManager as Yr, IntelligenceReportWindow as Yt, EgressPolicy as Z, BatchSidecarGroup as Zi, SandboxFleetArtifact as Zn, SendSessionMessageRequest as Zr, ListMessagesOptions as Zt, BranchOptions as _, TaskSessionChanges as _i, ProcessSignal as _n, SandboxFleetTraceExport as _r, FleetDispatchResultBuffer as _t, AttachSandboxFleetMachineOptions as a, SessionMessageInputPart as ai, NetworkManager as an, SandboxFleetIntelligenceEnvelope as ar, FileReadBatchResult as at, CodeExecutionOptions as b, TaskSessionInfo as bi, PromptInputPart as bn, SandboxFleetWorkspace as br, FleetDriveTurnOutcome as bt, BackendInfo as c, SnapshotOptions as ci, PermissionsManager as cn, SandboxFleetMachineRecord as cr, FileRenameResult as ct, BatchBackend as d, StartupDiagnostics as di, PreviewLinkWaitOptions as dn, SandboxFleetManifestMachine as dr, FileTreeOptions as dt, BackendType as ea, SessionEventStreamOptions as ei, ListSandboxOptions as en, SandboxFleetDispatchFailureClass as er, ExactProcessSpawnOptions as et, BatchResult as f, StartupOperation as fi, Process as fn, SandboxFleetOperationsSummary as fr, FileTreeResult as ft, BatchTaskResult as g, TaskResult as gi, ProcessManager as gn, SandboxFleetTraceEvent as gr, FleetDispatchCancelResult as gt, BatchTask as h, TaskOptions as hi, ProcessLogEntry as hn, SandboxFleetTraceBundle as hr, FileWriteResult as ht, AttachGpuLeaseOptions as i, SessionMessage as ii, NetworkConfig as in, SandboxFleetInfo as ir, FileReadBatchOptions as it, CreateSandboxFleetWithCoordinatorOptions as j, UploadOptions as ji, ReapExpiredSandboxFleetsOptions as jn, SandboxRuntimeHealth as jr, GitConfig as jt, CreateSandboxFleetOptions as k, TurnDriveResult as ki, PublishPublicTemplateOptions as kn, SandboxResourceUsage as kr, GitBranch as kt, BackendManager as l, SnapshotResult as li, PreviewLinkInfo as ln, SandboxFleetMachineSpec as lr, FileSystem as lt, BatchRunRequest as m, SubscriptionInfo as mi, ProcessListOptions as mn, SandboxFleetToken as mr, FileUsageResult as mt, AccessPolicyRule as n, SessionInfo as ni, MintScopedTokenOptions as nn, SandboxFleetDriverCapability as nr, ExecResult as nt, BackendCapabilities as o, SessionStatus as oi, NonHostAgentDriverConfig as on, SandboxFleetMachine as or, FileReadError as ot, BatchRunOptions as p, StorageConfig as pi, ProcessInfo as pn, SandboxFleetPolicy as pr, FileUsageOptions as pt, EffectiveBackend as q, TerminalStreamToken as qi, SandboxConfig as qn, SearchOptions as qr, IntelligenceReportCompareTo as qt, AddUserOptions as r, SessionListOptions as ri, MkdirOptions as rn, SandboxFleetDriverTimings as rr, FileInfo as rt, BackendConfig as s, SnapshotInfo as si, PermissionLevel as sn, SandboxFleetMachineMeteredUsage as sr, FileReadResult as st, AcceleratorKind as t, SessionForkOptions as ti, McpServerConfig as tn, SandboxFleetDispatchResponse as tr, ExecOptions as tt, BackendStatus as u, SshKeysManager as ui, PreviewLinkManager as un, SandboxFleetManifest as ur, FileTreeFile as ut, ChunkedUploadOptions as v, TaskSessionCommitResult as vi, ProcessSpawnOptions as vn, SandboxFleetTraceOptions as vr, FleetDispatchResultBufferOptions as vt, CommitTaskSessionOptions as w, TeeAttestationResponse as wi, ProvisionResult as wn, SandboxIdentity as wr, FleetMachineId as wt, CodeExecutionResult as x, TaskSessionProfile as xi, PromptOptions as xn, SandboxFleetWorkspaceReconcileResult as xr, FleetDriveTurnRequest as xt, ChunkedUploadResult as y, TaskSessionFileChange as yi, ProcessStatus as yn, SandboxFleetUsage as yr, FleetDispatchStreamOptions as yt, DispatchedSession as z, TERMINAL_WS_ECHO_SUBPROTOCOL as zi, RolloutChildResult as zn, SandboxTraceBundle as zr, GpuLeaseManager as zt };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.15.3-develop.
|
|
3
|
+
"version": "0.15.3-develop.20260729134511.1b3e40f",
|
|
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",
|
|
@@ -127,8 +127,8 @@
|
|
|
127
127
|
"vitest": "^4.1.5",
|
|
128
128
|
"ws": "^8.20.0",
|
|
129
129
|
"yjs": "13.6.30",
|
|
130
|
-
"@
|
|
131
|
-
"@
|
|
130
|
+
"@repo/shared": "0.0.0",
|
|
131
|
+
"@tangle-network/runtime-contracts": "0.3.2"
|
|
132
132
|
},
|
|
133
133
|
"scripts": {
|
|
134
134
|
"build": "node scripts/build-dist.mjs",
|