@tangle-network/sandbox 1.0.160 → 1.0.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +2 -2
- package/dist/agent/preview.d.ts +1 -1
- package/dist/{client-Cgtoc5Qn.js → client-EqkFJstx.js} +1 -1
- package/dist/{client-Bz-fIi1a.d.ts → client-X0EfXGzX.d.ts} +1 -1
- package/dist/{core-B7oXknE8.js → core-D6HUTcWA.js} +1 -1
- package/dist/core.d.ts +2 -2
- package/dist/core.js +3 -3
- package/dist/{index-B-Dgmq5F.d.ts → index-Cqjh5kS1.d.ts} +39 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/{preview-CsSq1z1E.d.ts → preview-B7o37y7R.d.ts} +2 -2
- package/dist/{sandbox-FbGj_5Fa.js → sandbox-CJaZ2eLs.js} +15 -8
- package/dist/select-seat-command.d.ts +1 -1
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-ZWXQhImy.js → tangle-Coo11OLc.js} +178 -4
- package/package.json +5 -5
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-
|
|
1
|
+
import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-Cqjh5kS1.js";
|
|
2
2
|
import { Bt as SandboxFleetParent, Ha as CodeExecutionResult, Ua as CodeLanguage, Ur as CodeExecutionOptions, Wa as CodeResultPart, ga as BackendConfig, ia as SessionListOptions, na as SessionInfo, wo as BackendType } from "../types-CCRfg8oS.js";
|
|
3
|
-
import { t as Sandbox } from "../client-
|
|
4
|
-
import { u as PreviewAuthorizer } from "../preview-
|
|
3
|
+
import { t as Sandbox } from "../client-X0EfXGzX.js";
|
|
4
|
+
import { u as PreviewAuthorizer } from "../preview-B7o37y7R.js";
|
|
5
5
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
6
6
|
import { JSONSchema } from "zod/v4/core";
|
|
7
7
|
import { ToolSet } from "ai";
|
package/dist/agent/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-tBlLJqTb.js";
|
|
2
2
|
import { O as assertCurrentBackendType } from "../interactive-controller-C3DDPykv.js";
|
|
3
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
3
|
+
import { t as SandboxInstance } from "../sandbox-CJaZ2eLs.js";
|
|
4
4
|
import { C as StateError, E as ValidationError, g as NotFoundError } from "../errors-BUzH7U1D.js";
|
|
5
|
-
import { t as Sandbox } from "../client-
|
|
5
|
+
import { t as Sandbox } from "../client-EqkFJstx.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/agent/instances.ts
|
|
8
8
|
const managers = /* @__PURE__ */ new WeakMap();
|
package/dist/agent/preview.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-
|
|
1
|
+
import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-B7o37y7R.js";
|
|
2
2
|
export { AgentPreviewError, AgentPreviewOptions, PREVIEW_MCP_ALIAS, PREVIEW_TOOLS, PreviewAuthorizationRequest, PreviewAuthorizer, PreviewExecutionContext, PreviewTool, PublishAgentPreviewOptions, assertPreviewId, ensureAgentPreview, getAgentPreview, listAgentPreviews, previewOperationTool, previewToolsForProfile, publishAgentPreview, removeAgentPreview, resolveSelfSandbox, servePreviewMcp };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as normalizeRuntimeBackendConfig, D as applyRequestedModel, E as isBrowserRuntime, H as backendTypeSchema, N as withProfileHarness, O as assertCurrentBackendType, P as withoutCreateOnlyModelFields, S as encodePromptForWire, o as requestInteractiveSessionToken } from "./interactive-controller-C3DDPykv.js";
|
|
2
2
|
import { r as agentProfileSchema } from "./profile-schema-C1KpT-wS.js";
|
|
3
|
-
import { A as normalizeSandboxCreateReceipt, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeProxySecretReceipt, G as isCapacityShortageCreateError, H as createRetryDelayMs, I as normalizeSandboxShape, J as isRetryableCreateError, K as isDeployWindowCreateError, L as CAPACITY_ETA_MARGIN_MS, M as parseStopPhase, N as normalizeConnection, O as isRetryableProfileFileMaterializeFailure, P as normalizeEgressPolicyFields, R as CAPACITY_ETA_WAIT_MAX_MS, T as splitInlineProfileFileMounts, U as extendableDeadline, V as DEPLOY_WINDOW_RETRY_MS, W as generateIdempotencyKey, d as sandboxLedgerUsd, j as normalizeStartupDiagnostics, k as normalizeCaptureProof, n as createSandboxInstanceFromResponse, o as exportTraceBundle, q as isRateLimitCreateError } from "./sandbox-
|
|
3
|
+
import { A as normalizeSandboxCreateReceipt, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeProxySecretReceipt, G as isCapacityShortageCreateError, H as createRetryDelayMs, I as normalizeSandboxShape, J as isRetryableCreateError, K as isDeployWindowCreateError, L as CAPACITY_ETA_MARGIN_MS, M as parseStopPhase, N as normalizeConnection, O as isRetryableProfileFileMaterializeFailure, P as normalizeEgressPolicyFields, R as CAPACITY_ETA_WAIT_MAX_MS, T as splitInlineProfileFileMounts, U as extendableDeadline, V as DEPLOY_WINDOW_RETRY_MS, W as generateIdempotencyKey, d as sandboxLedgerUsd, j as normalizeStartupDiagnostics, k as normalizeCaptureProof, n as createSandboxInstanceFromResponse, o as exportTraceBundle, q as isRateLimitCreateError } from "./sandbox-CJaZ2eLs.js";
|
|
4
4
|
import { D as isInsideReservedDir, E as ValidationError, F as SANDBOX_AGENT_HOME, S as ServerError, T as TimeoutError, _ as PartialFailureError, a as AuthError, g as NotFoundError, h as NetworkError, i as readResponseJson, n as parseErrorResponse, r as parseResponseError, x as SandboxError } from "./errors-BUzH7U1D.js";
|
|
5
5
|
import { r as combineAbortSignals, t as abortableSleep } from "./abort-signal-Cu4F2VVz.js";
|
|
6
6
|
import { t as fetchSandboxApi } from "./api-request-DNrodWdz.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as TraceExportResult, H as MaterializeProfileFileMountsOptions, O as SandboxInstance, U as MaterializeProfileFileMountsResult, W as ProfileFileMountBox, j as TraceExportSink } from "./index-
|
|
1
|
+
import { A as TraceExportResult, H as MaterializeProfileFileMountsOptions, O as SandboxInstance, U as MaterializeProfileFileMountsResult, W as ProfileFileMountBox, j as TraceExportSink } from "./index-Cqjh5kS1.js";
|
|
2
2
|
import { G as AgentProfileConfidential, J as AgentProfileMcpServer, K as AgentProfileConfigValue, U as AgentProfile, X as AgentProfileSeat, Y as AgentProfileMetadata, b as SandboxSizePreset, bt as SandboxError, c as MintInteractiveSessionTokenOptions, k as AgentInteractiveSessionRef, q as AgentProfileFileMount, u as ScopedToken } from "./terminal-stream-types-C6N_wrmY.js";
|
|
3
3
|
import { $ as CreateSandboxFleetOptions, $t as SandboxFleetWorkspaceRestoreResult, A as SandboxIdentity, Bt as SandboxFleetParent, Ci as IntelligenceReportWindow, Di as SandboxEvent, Dn as SandboxResources, Ei as PromptResult, En as SandboxConfig, Et as SandboxFleetCostEstimate, Ft as SandboxFleetMachineRecord, Ga as ExecResult, Gr as ManagedProcessOptions, Gt as SandboxFleetToken, Ht as SandboxFleetPolicy, It as SandboxFleetMachineSpec, Jr as ManagedProcessRecord, Kr as ManagedProcessResumeOptions, Kt as SandboxFleetTraceBundle, Lt as SandboxFleetManifest, M as UsageInfo, Ma as GpuLeaseProviderName, Nt as SandboxFleetMachine, On as SandboxShapesInfo, Ot as SandboxFleetDispatchResponse, Pi as TurnBackendConfig, Q as AttachSandboxFleetMachineOptions, Qt as SandboxFleetWorkspaceReconcileResult, Ri as ConversationTurnOptions, St as SandboxFleetAgent, T as SshKeysManager, Ti as PromptOptions, Tn as CreateSandboxOptions, Tt as SandboxFleetArtifactSpec, Wr as ManagedProcessJobs, Wt as SandboxFleetSpend, X as FleetDriveTurnRequest, Xr as HttpClient, Xt as SandboxFleetUsage, Y as FleetDriveTurnOutcome, Yn as DownloadResult, Yr as ManagedProcessSpec, Yt as SandboxFleetTraceOptions, Z as TokenRefreshHandler, Zr as SdkTimingHook, _o as PublicBatchRunRequestInput, _t as ListSandboxFleetOptions, a as DeleteMatchingSandboxesResult, an as SandboxInfo, bi as IntelligenceReportBudget, bn as TeeAttestationResponse, bt as ReconcileSandboxFleetsOptions, cn as SandboxRunGeneration, ct as FleetDispatchResultBufferOptions, dt as FleetExecDispatchResult, en as SandboxFleetWorkspaceSnapshotResult, et as CreateSandboxFleetTokenOptions, fi as CreateIntelligenceReportOptions, ft as FleetMachineId, ga as BackendConfig, go as PublicBatchRunRequest, gt as FleetRunOptions, ht as FleetRunEvent, i as DeleteMatchingSandboxesOptions, it as FleetAgentResult, j as SubscriptionInfo, jn as SandboxShapePreset, jt as SandboxFleetInfo, kt as SandboxFleetDriverCapability, lt as FleetDispatchStreamOptions, mt as FleetPromptDispatchResult, nt as FleetAgentId, ot as FleetDispatchCancelResult, po as BatchResult, pt as FleetPromptDispatchOptions, qn as DownloadOptions, r as DeleteMatchingSandboxesFilter, si as BatchRunOptions, st as FleetDispatchResultBuffer, tn as ListSandboxOptions, tt as CreateSandboxFleetWithCoordinatorOptions, ut as FleetExecDispatchOptions, vt as ReapExpiredSandboxFleetsOptions, w as SecretsManager, wa as SecretBindingOptions, wi as PromptInputPart, wn as CreateRequestOptions, wr as SandboxEnvironment, wt as SandboxFleetArtifact, xi as IntelligenceReportCompareTo, xt as ReconcileSandboxFleetsResult, yi as IntelligenceReport, yn as TeeAttestationReport, yo as BatchEvent, yr as ExecOptions, yt as ReapExpiredSandboxFleetsResult, zi as ConversationTurnResult, zt as SandboxFleetOperationsSummary } from "./types-CCRfg8oS.js";
|
|
4
4
|
import { t as LinesClient } from "./lines-BbOFiDng.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as agentProfileSchema } from "./profile-schema-C1KpT-wS.js";
|
|
2
|
-
import { Y as canonicalAgentProfileDigest } from "./sandbox-
|
|
2
|
+
import { Y as canonicalAgentProfileDigest } from "./sandbox-CJaZ2eLs.js";
|
|
3
3
|
import { E as ValidationError, s as CapabilityError, x as SandboxError } from "./errors-BUzH7U1D.js";
|
|
4
4
|
import { n as awaitWithAbort } from "./abort-signal-Cu4F2VVz.js";
|
|
5
5
|
import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-CwJjUmvo-3J2DDPxW.js";
|
package/dist/core.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as WorkspaceImages, O as SandboxInstance, V as ProfileFileDeliveryReport, z as WorkspaceImagePublishRequestOptions } from "./index-
|
|
1
|
+
import { B as WorkspaceImages, O as SandboxInstance, V as ProfileFileDeliveryReport, z as WorkspaceImagePublishRequestOptions } from "./index-Cqjh5kS1.js";
|
|
2
2
|
import { Ct as ServerError, Dt as TimeoutError, Ot as ValidationError, St as SandboxFailureDetail, _t as ProfileFileMountPathError, bt as SandboxError, gt as PartialFailureError, ht as NotFoundError, it as AuthError, mt as NetworkError, ot as CapabilityError, rt as parseErrorResponse, ut as FileWriteConflictError, vt as QuotaError, wt as StateError, xt as SandboxErrorJson } from "./terminal-stream-types-C6N_wrmY.js";
|
|
3
3
|
import { En as SandboxConfig, Ga as ExecResult, Gr as ManagedProcessOptions, H as PreviewLinkInfo, Ia as WorkspaceImagePublishInput, In as NetworkConfig, Ja as SandboxEnvRecoveryView, Jr as ManagedProcessRecord, Kr as ManagedProcessResumeOptions, La as WorkspaceImagePublishResult, Ri as ConversationTurnOptions, Tn as CreateSandboxOptions, U as PreviewLinkManager, W as PreviewLinkWaitOptions, Wr as ManagedProcessJobs, Yr as ManagedProcessSpec, an as SandboxInfo, kn as SandboxStatus, oa as SessionMessageAdmission, qa as SandboxEnvRecovery, qr as ManagedProcessState, wi as PromptInputPart, yr as ExecOptions, zi as ConversationTurnResult } from "./types-CCRfg8oS.js";
|
|
4
4
|
import { D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, l as LineApplicationAttachOptions, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, t as LinesClient, w as LineNumberInventory, y as LineMember } from "./lines-BbOFiDng.js";
|
|
5
|
-
import { Ct as InstanceRestartingError, Dt as sandboxFailureKind, Et as SandboxFailureKind, St as InstanceRecord, Tt as InstancesClient, _t as gatewaySeatTransport, an as backendRegistryEntrySchema, bt as HostedInstance, cn as isBackendRegistryInteractionKind, ct as SandboxResolvedSeat, dt as SeatOwnerReply, en as BackendRegistryCapabilities, ft as SeatOwnerTransport, gt as createSelectSeat, ht as SeatSelectionRequest, in as backendRegistryCapabilitiesSchema, ln as parseBackendRegistryResponse, lt as SandboxSeatCredentials, mt as SeatSelectionError, nn as BackendRegistryInteractionKind, on as backendRegistryInteractionKindSchema, ot as ISOLATED_CREATION_ATTESTATION_VERSION, pt as SeatResolutionObservation, rn as BackendRegistryResponse, sn as backendRegistryResponseSchema, st as CreateSelectSeatOptions, t as Sandbox, tn as BackendRegistryEntry, un as parseBackendRegistryResponseBody, ut as SandboxSeatSelectionInput, vt as ManagedProcessClient, xt as InstanceProfile, yt as EnsureInstanceOptions } from "./client-
|
|
5
|
+
import { Ct as InstanceRestartingError, Dt as sandboxFailureKind, Et as SandboxFailureKind, St as InstanceRecord, Tt as InstancesClient, _t as gatewaySeatTransport, an as backendRegistryEntrySchema, bt as HostedInstance, cn as isBackendRegistryInteractionKind, ct as SandboxResolvedSeat, dt as SeatOwnerReply, en as BackendRegistryCapabilities, ft as SeatOwnerTransport, gt as createSelectSeat, ht as SeatSelectionRequest, in as backendRegistryCapabilitiesSchema, ln as parseBackendRegistryResponse, lt as SandboxSeatCredentials, mt as SeatSelectionError, nn as BackendRegistryInteractionKind, on as backendRegistryInteractionKindSchema, ot as ISOLATED_CREATION_ATTESTATION_VERSION, pt as SeatResolutionObservation, rn as BackendRegistryResponse, sn as backendRegistryResponseSchema, st as CreateSelectSeatOptions, t as Sandbox, tn as BackendRegistryEntry, un as parseBackendRegistryResponseBody, ut as SandboxSeatSelectionInput, vt as ManagedProcessClient, xt as InstanceProfile, yt as EnsureInstanceOptions } from "./client-X0EfXGzX.js";
|
|
6
6
|
import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-DVZ9NJM0.js";
|
|
7
7
|
export { AuthError, BackendRegistryCapabilities, BackendRegistryEntry, BackendRegistryInteractionKind, BackendRegistryResponse, CapabilityError, ConversationTurnOptions, ConversationTurnResult, CreateSandboxOptions, CreateSelectSeatOptions, EnsureInstanceOptions, ExecOptions, ExecResult, FileWriteConflictError, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, InstanceProfile, InstanceRecord, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, Line, LineAgentRolePolicy, LineApplication, LineApplicationAttachOptions, LineApplicationRequest, LineApplicationResult, LineApplicationState, LineApplicationView, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineImage, LineInstanceAttachOptions, LineInstanceCreate, LineMember, LineMemberInstance, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyCode, LineReplyCodeInput, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LinesClient, ManagedProcessClient, ManagedProcessJobs, ManagedProcessOptions, ManagedProcessRecord, ManagedProcessResumeOptions, ManagedProcessSpec, ManagedProcessState, NetworkConfig, NetworkError, NotFoundError, PartialFailureError, PreviewLinkInfo, PreviewLinkManager, PreviewLinkWaitOptions, ProfileFileDeliveryReport, ProfileFileMountPathError, PromptInputPart, PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient, QuotaError, Sandbox, SandboxConfig, SandboxEnvRecovery, SandboxEnvRecoveryView, SandboxError, SandboxErrorJson, SandboxFailureDetail, SandboxFailureKind, SandboxInfo, SandboxInstance, SandboxResolvedSeat, SandboxSeatCredentials, SandboxSeatSelectionInput, SandboxStatus, SeatOwnerReply, SeatOwnerTransport, SeatResolutionObservation, SeatSelectionError, SeatSelectionRequest, ServerError, SessionMessageAdmission, StateError, TimeoutError, ValidationError, WorkspaceImagePublishInput, WorkspaceImagePublishRequestOptions, WorkspaceImagePublishResult, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, createSelectSeat, gatewaySeatTransport, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference, sandboxFailureKind };
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-
|
|
1
|
+
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-CJaZ2eLs.js";
|
|
2
2
|
import { C as StateError, E as ValidationError, S as ServerError, T as TimeoutError, _ as PartialFailureError, a as AuthError, d as FileWriteConflictError, g as NotFoundError, h as NetworkError, n as parseErrorResponse, s as CapabilityError, v as ProfileFileMountPathError, x as SandboxError, y as QuotaError } from "./errors-BUzH7U1D.js";
|
|
3
|
-
import { a as InstancesClient, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, p as isBackendRegistryInteractionKind, r as HostedInstance, t as Sandbox, u as backendRegistryEntrySchema } from "./client-
|
|
3
|
+
import { a as InstancesClient, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, p as isBackendRegistryInteractionKind, r as HostedInstance, t as Sandbox, u as backendRegistryEntrySchema } from "./client-EqkFJstx.js";
|
|
4
4
|
import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-2fj8i5qd.js";
|
|
5
5
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
6
|
-
import { a as LINE_APPLICATION_REPLY_MAX_CHARS, c as parseLineApplicationResult, i as gatewaySeatTransport, l as sandboxFailureKind, n as SeatSelectionError, o as LINE_APPLICATION_REQUEST_MAX_BYTES, r as createSelectSeat, s as parseLineApplicationRequest, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-
|
|
6
|
+
import { a as LINE_APPLICATION_REPLY_MAX_CHARS, c as parseLineApplicationResult, i as gatewaySeatTransport, l as sandboxFailureKind, n as SeatSelectionError, o as LINE_APPLICATION_REQUEST_MAX_BYTES, r as createSelectSeat, s as parseLineApplicationRequest, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-D6HUTcWA.js";
|
|
7
7
|
export { AuthError, CapabilityError, FileWriteConflictError, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, LinesClient, ManagedProcessClient, NetworkError, NotFoundError, PartialFailureError, ProfileFileMountPathError, PublicTemplatePublishError, PublicTemplatesClient, QuotaError, Sandbox, SandboxError, SandboxInstance, SeatSelectionError, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, createSelectSeat, gatewaySeatTransport, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference, sandboxFailureKind };
|
|
@@ -1758,9 +1758,39 @@ declare abstract class SandboxTurnCapabilities extends SandboxSessionCapabilitie
|
|
|
1758
1758
|
}
|
|
1759
1759
|
//#endregion
|
|
1760
1760
|
//#region src/sandbox-snapshots.d.ts
|
|
1761
|
-
interface
|
|
1761
|
+
interface SnapshotRestoreJobStatusResponse {
|
|
1762
1762
|
jobId: string;
|
|
1763
|
-
status: "pending";
|
|
1763
|
+
status: "pending" | "running" | "completed" | "failed";
|
|
1764
|
+
progress?: number;
|
|
1765
|
+
result?: {
|
|
1766
|
+
success: boolean;
|
|
1767
|
+
snapshotId?: string;
|
|
1768
|
+
error?: string;
|
|
1769
|
+
durationMs?: number;
|
|
1770
|
+
/**
|
|
1771
|
+
* The restored snapshot, carried on the completion. A restore names a
|
|
1772
|
+
* snapshot that existed BEFORE it ran, so this is the whole answer — the
|
|
1773
|
+
* Absent when the job did not know the snapshot's metadata; the caller
|
|
1774
|
+
* then falls back to the list.
|
|
1775
|
+
*/
|
|
1776
|
+
snapshot?: {
|
|
1777
|
+
snapshotId: string;
|
|
1778
|
+
createdAt: string;
|
|
1779
|
+
sizeBytes?: number;
|
|
1780
|
+
tags: string[];
|
|
1781
|
+
}; /** Where the restore's wall went; diagnostics only, never read for control flow. */
|
|
1782
|
+
phaseMs?: Record<string, number>;
|
|
1783
|
+
};
|
|
1784
|
+
createdAt: string;
|
|
1785
|
+
completedAt?: string;
|
|
1786
|
+
/**
|
|
1787
|
+
* The sandbox as `GET /v1/sandboxes/{id}` answers it, carried on the poll
|
|
1788
|
+
* that observes a successful completion. A restore suspends, swaps the
|
|
1789
|
+
* filesystem and resumes, so the box the caller holds is stale in status,
|
|
1790
|
+
* incarnation and connection until it is read again; this is that read,
|
|
1791
|
+
* answered by the same poll. Present on every successful completion.
|
|
1792
|
+
*/
|
|
1793
|
+
sandbox?: Record<string, unknown>;
|
|
1764
1794
|
}
|
|
1765
1795
|
declare abstract class SandboxSnapshotCapabilities extends SandboxTurnCapabilities {
|
|
1766
1796
|
#private;
|
|
@@ -1826,7 +1856,13 @@ declare abstract class SandboxSnapshotCapabilities extends SandboxTurnCapabiliti
|
|
|
1826
1856
|
* Files outside the requested paths are left untouched.
|
|
1827
1857
|
*/
|
|
1828
1858
|
restorePaths(snapshotId: string, paths: string[]): Promise<SnapshotResult>;
|
|
1829
|
-
|
|
1859
|
+
/** One restore request; a 202 is settled from its job (held to its end). */
|
|
1860
|
+
private restoreSnapshot;
|
|
1861
|
+
/**
|
|
1862
|
+
* Settle a restore from its job's status. The restore's own 202, held to
|
|
1863
|
+
* the job's end, is the first status read; only an unfinished one polls.
|
|
1864
|
+
*/
|
|
1865
|
+
protected waitForSnapshotRestore(snapshotId: string, accepted: SnapshotRestoreJobStatusResponse): Promise<SnapshotResult>;
|
|
1830
1866
|
protected waitForSnapshotVisible(snapshotId: string, fallback?: Partial<SnapshotResult>): Promise<SnapshotResult>;
|
|
1831
1867
|
/**
|
|
1832
1868
|
* Restore from the latest snapshot in customer-provided storage.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as SandboxInteractionResult, A as TraceExportResult, B as WorkspaceImages, Ct as CONTROL_PLANE_MCP_SERVER_NAME, D as ForkAcknowledgement, Dt as SandboxMcpServerEntry, Et as SandboxMcpEndpoint, F as toOtelJson, G as SplitInlineProfileFileMountsResult, H as MaterializeProfileFileMountsOptions, I as SandboxTaskSession, J as splitInlineProfileSkills, K as SplitInlineProfileSkillsResult, L as RawEvidenceExport, M as buildTraceExportPayload, N as exportTraceBundle, O as SandboxInstance, Ot as buildControlPlaneMcpConfig, P as otelTraceIdForTangleTrace, Q as SandboxInteractionResolution, R as SandboxSession, St as BuildSandboxMcpConfigOptions, Tt as SandboxMcpConfig, U as MaterializeProfileFileMountsResult, V as ProfileFileDeliveryReport, X as SandboxInteractionCommandResult, Y as validateDeferredProfileFileMounts, Z as SandboxInteractionConflict, _t as createInteractiveTerminalCapture, at as InteractiveSessionHost, bt as SandboxOperationFailedError, ct as InteractiveSessionRef, dt as InteractiveStopCommand, et as InteractiveControlClaimRequest, ft as InterruptResult, gt as InteractiveTerminalMetadata, h as TangleSandboxClient, ht as InteractiveTerminalFrameLog, it as InteractiveSessionHandleOptions, j as TraceExportSink, k as TraceExportFormat, kt as buildSandboxMcpConfig, lt as InteractiveSessionStartOptions, mt as InteractiveTerminalCapture, nt as InteractiveSessionControlClaim, ot as InteractiveSessionIncarnationId, pt as RespondToPermissionOptions, q as splitInlineProfileFileMounts, rt as InteractiveSessionHandle, st as InteractiveSessionInfo, tt as InteractivePromptCommand, ut as InteractiveSessionStartResult, v as TangleSandboxClientConfig, vt as createInteractiveTerminalSession, wt as SANDBOX_MCP_SERVER_NAME, xt as BuildControlPlaneMcpConfigOptions, yt as SandboxOperation, z as WorkspaceImagePublishRequestOptions } from "./index-
|
|
1
|
+
import { $ as SandboxInteractionResult, A as TraceExportResult, B as WorkspaceImages, Ct as CONTROL_PLANE_MCP_SERVER_NAME, D as ForkAcknowledgement, Dt as SandboxMcpServerEntry, Et as SandboxMcpEndpoint, F as toOtelJson, G as SplitInlineProfileFileMountsResult, H as MaterializeProfileFileMountsOptions, I as SandboxTaskSession, J as splitInlineProfileSkills, K as SplitInlineProfileSkillsResult, L as RawEvidenceExport, M as buildTraceExportPayload, N as exportTraceBundle, O as SandboxInstance, Ot as buildControlPlaneMcpConfig, P as otelTraceIdForTangleTrace, Q as SandboxInteractionResolution, R as SandboxSession, St as BuildSandboxMcpConfigOptions, Tt as SandboxMcpConfig, U as MaterializeProfileFileMountsResult, V as ProfileFileDeliveryReport, X as SandboxInteractionCommandResult, Y as validateDeferredProfileFileMounts, Z as SandboxInteractionConflict, _t as createInteractiveTerminalCapture, at as InteractiveSessionHost, bt as SandboxOperationFailedError, ct as InteractiveSessionRef, dt as InteractiveStopCommand, et as InteractiveControlClaimRequest, ft as InterruptResult, gt as InteractiveTerminalMetadata, h as TangleSandboxClient, ht as InteractiveTerminalFrameLog, it as InteractiveSessionHandleOptions, j as TraceExportSink, k as TraceExportFormat, kt as buildSandboxMcpConfig, lt as InteractiveSessionStartOptions, mt as InteractiveTerminalCapture, nt as InteractiveSessionControlClaim, ot as InteractiveSessionIncarnationId, pt as RespondToPermissionOptions, q as splitInlineProfileFileMounts, rt as InteractiveSessionHandle, st as InteractiveSessionInfo, tt as InteractivePromptCommand, ut as InteractiveSessionStartResult, v as TangleSandboxClientConfig, vt as createInteractiveTerminalSession, wt as SANDBOX_MCP_SERVER_NAME, xt as BuildControlPlaneMcpConfigOptions, yt as SandboxOperation, z as WorkspaceImagePublishRequestOptions } from "./index-Cqjh5kS1.js";
|
|
2
2
|
import { At as SandboxCreateReceipt, Ct as ServerError, Dt as TimeoutError, Et as StreamInterruptionReason, N as AgentInteractiveTerminalSession, Ot as ValidationError, P as agentInteractiveSessionPromptRequestDigest, St as SandboxFailureDetail, Tt as StreamInterruptedError, _ as TerminalReadyTimings, _t as ProfileFileMountPathError, a as TerminalStreamOptions, at as BranchFanoutExceedsHostError, b as SandboxSizePreset, bt as SandboxError, c as MintInteractiveSessionTokenOptions, ct as EdgeNotReadyError, d as ScopedTokenScope, dt as GpuProviderNotConfiguredError, f as TERMINAL_WS_ECHO_SUBPROTOCOL, ft as GpuProviderRequirement, g as TerminalReadyInfo, gt as PartialFailureError, h as TerminalOutputMessage, ht as NotFoundError, i as TerminalStreamHandlers, it as AuthError, kt as SandboxCreateOutcome, l as MintScopedTokenOptions, lt as EgressProxyRecoveryError, m as TerminalInteractiveSessionIdentity, mt as NetworkError, n as TerminalStreamApiKey, nt as TerminalStreamError, ot as CapabilityError, p as TerminalExitInfo, pt as KeyBudgetExhaustedError, r as TerminalStreamBearerToken, rt as parseErrorResponse, s as TerminalStreamToken, st as CompliancePlacementError, t as TerminalAttachTimings, u as ScopedToken, ut as FileWriteConflictError, v as TerminalStreamAuthFormat, vt as QuotaError, wt as StateError, xt as SandboxErrorJson, y as SANDBOX_SIZE_PRESET_NAMES, yt as ResumeEnvRequiredError } from "./terminal-stream-types-C6N_wrmY.js";
|
|
3
3
|
import { $ as CreateSandboxFleetOptions, $a as RawEvidenceBoxDirectoryExport, $i as SessionExecutionStatus, $n as FileReadError, $r as ForkCounts, $t as SandboxFleetWorkspaceRestoreResult, A as SandboxIdentity, Aa as ProvisionStatus, Ai as SandboxTraceEvent, An as SandboxShape, Ar as DriverInfo, At as SandboxFleetDriverTimings, B as ProcessSignal, Ba as ProcessStatus, Bi as CreateSessionOptions, Bn as EgressDenial, Br as HostAgentDriverConfig, Bt as SandboxFleetParent, C as WorkspaceOperationLookup, Ca as RouterRoutingOptions, Ci as IntelligenceReportWindow, Cn as TerminalStream, Co as ALL_BACKEND_TYPES, Cr as PublishPublicTemplateVersionOptions, Ct as SandboxFleetAgentSpec, D as ProvisionResult, Da as RolloutScorer, Di as SandboxEvent, Dn as SandboxResources, Do as EffectiveBackendSource, Dr as CreateGpuLeaseOptions, Dt as SandboxFleetDispatchFailureClass, E as ProvisionEvent, Ea as RolloutChildResult, Ei as PromptResult, En as SandboxConfig, Eo as EffectiveBackendProfile, Er as AttachGpuLeaseOptions, Et as SandboxFleetCostEstimate, F as EnsureDevServerOptions, Fa as GpuLeaseStatus, Fi as CommitTaskSessionOptions, Fn as EgressManager, Fr as GpuLeaseExecOptions, Ft as SandboxFleetMachineRecord, G as GitBranch, Ga as ExecResult, Gi as ListMessagesOptions, Gn as ChunkedUploadResult, Gr as ManagedProcessOptions, Gt as SandboxFleetToken, H as PreviewLinkInfo, Hi as DispatchPromptOptions, Hn as GitAuth, Hr as NonHostAgentDriverConfig, Ht as SandboxFleetPolicy, I as ExactProcessSpawnOptions, Ia as WorkspaceImagePublishInput, Ii as CompletedTurnPayload, In as NetworkConfig, Ir as GpuLeaseExecResult, It as SandboxFleetMachineSpec, J as GitStatus, Ja as SandboxEnvRecoveryView, Ji as SendSessionMessageRequest, Jn as DownloadProgress, Jr as ManagedProcessRecord, Jt as SandboxFleetTraceExport, K as GitCommit, Ki as PublicProfileConflict, Kn as DeleteOptions, Kr as ManagedProcessResumeOptions, Kt as SandboxFleetTraceBundle, L as Process, La as WorkspaceImagePublishResult, Li as CompletedTurnResult, Ln as NetworkManager, Lr as GpuLeaseManager, Lt as SandboxFleetManifest, M as UsageInfo, Ma as GpuLeaseProviderName, Mi as SandboxTraceOptions, Mn as SandboxResourceUsage, Mr as GpuLease, Mt as SandboxFleetIntelligenceEnvelope, N as WaitForOptions, Na as GpuLeaseProviderState, Ni as TokenUsage, Nn as SandboxRuntimeCapabilities, Nr as GpuLeaseBilling, Nt as SandboxFleetMachine, O as ProvisionStep, Oa as RolloutStatus, Oi as SandboxIntelligenceEnvelope, On as SandboxShapesInfo, Oo as parseBackendType, Or as DockerDriverConfig, Ot as SandboxFleetDispatchResponse, P as DevServerInfo, Pa as GpuLeaseProviderStatus, Pi as TurnBackendConfig, Pn as StorageConfig, Pr as GpuLeaseCommandResult, Pt as SandboxFleetMachineMeteredUsage, Q as AttachSandboxFleetMachineOptions, Qa as RawEvidenceBoxArchiveManifest, Qi as SessionExecutionInfo, Qn as FileReadBatchResult, Qr as BranchOptions, Qt as SandboxFleetWorkspaceReconcileResult, R as ProcessLogEntry, Ra as ProcessInfo, Ri as ConversationTurnOptions, Rn as SandboxEgressUsage, Rr as GpuLeaseProviders, Rt as SandboxFleetManifestMachine, S as StopOptions, Sa as McpServerConfig, Si as IntelligenceReportSubjectType, Sn as TeePublicKeyResponse, So as BatchTaskUsage, Sr as PublishPublicTemplateOptions, St as SandboxFleetAgent, Ta as SecretInfo, Ti as PromptOptions, Tn as CreateSandboxOptions, To as EffectiveBackend, Tr as AcceleratorKind, Tt as SandboxFleetArtifactSpec, U as PreviewLinkManager, Ui as DispatchedSession, Un as GitConfig, Ut as SandboxFleetProfileRef, V as ProcessSpawnOptions, Va as SessionStatus, Vi as CreateTaskSessionOptions, Vn as MAX_EGRESS_DENIALS_LIMIT, Vr as HostAgentRuntimeBackend, Vt as SandboxFleetPlacement, W as PreviewLinkWaitOptions, Wi as DriveTurnOptions, Wn as ChunkedUploadOptions, Wr as ManagedProcessJobs, Wt as SandboxFleetSpend, X as FleetDriveTurnRequest, Xa as RawEvidenceArchiveManifest, Xi as SessionBackendCredentials, Xn as FileInfo, Xt as SandboxFleetUsage, Y as FleetDriveTurnOutcome, Ya as NativeStoreHomeCopy, Yi as SentSessionMessage, Yn as DownloadResult, Yr as ManagedProcessSpec, Yt as SandboxFleetTraceOptions, Z as TokenRefreshHandler, Za as RawEvidenceArchiveManifestNative, Zi as SessionEventStreamOptions, Zn as FileReadBatchOptions, Zt as SandboxFleetWorkspace, _ as SnapshotInfo, _a as BackendInfo, _n as StartupOperation, _o as PublicBatchRunRequestInput, _r as SearchMatch, _t as ListSandboxFleetOptions, a as DeleteMatchingSandboxesResult, aa as SessionMessage, ai as WaitForRolloutOptions, an as SandboxInfo, ao as RawEvidenceRecordsFile, ar as FileTreeResult, at as FleetAgentRunStatus, b as SnapshotRemoteSync, ba as BackendRuntimeConfigUpdate, bi as IntelligenceReportBudget, bn as TeeAttestationResponse, bo as BatchEventDataMap, br as PublicTemplateInfo, bt as ReconcileSandboxFleetsOptions, c as SandboxDeleteOptions, ca as SessionResultOptions, cn as SandboxRunGeneration, cr as FileWriteResult, ct as FleetDispatchResultBufferOptions, d as SandboxOperationKind, da as TaskSessionFileChange, dn as SandboxTerminalCreateOptions, do as declaredSecretBaseToken, dr as RenameOptions, ea as SessionFailureReason, ei as ForkIdempotency, en as SandboxFleetWorkspaceSnapshotResult, eo as RawEvidenceBoxExportOptions, er as FileReadResult, f as SandboxOperationState, fa as TaskSessionInfo, fi as CreateIntelligenceReportOptions, fn as SandboxTerminalInfo, fo as parseDeclaredSecretsEnv, fr as UploadOptions, ft as FleetMachineId, g as SnapshotIdempotency, ga as BackendConfig, gi as DurablePlanFollowUpResume, gn as StartupDiagnostics, gr as WriteManyOptions, gt as FleetRunOptions, h as SnapshotDeleteOutcome, ha as BackendCapabilities, hi as DurablePlanDecisionResult, hn as SandboxTerminals, ho as BatchTaskInput, hr as WriteManyFile, ht as FleetRunEvent, i as DeleteMatchingSandboxesOptions, ia as SessionListOptions, ii as RolloutStartResult, in as SandboxConnection, io as RawEvidencePayloadFile, ir as FileTreeOptions, it as FleetAgentResult, j as SubscriptionInfo, ja as GPU_LEASE_PROVIDER_NAMES, ji as SandboxTraceExport, jn as SandboxShapePreset, jr as DriverType, jt as SandboxFleetInfo, ka as RolloutTurnPart, ki as SandboxTraceBundle, kn as SandboxStatus, kr as DriverConfig, kt as SandboxFleetDriverCapability, l as SandboxDeleteOutcome, la as TaskSessionChanges, ln as SandboxRuntimeHealth, lo as DECLARED_SECRET_HOSTS_ENV_VAR, lr as ListOptions, lt as FleetDispatchStreamOptions, m as SnapshotDeleteAcknowledgement, ma as TurnDriveResult, mi as DurablePlanDecisionOptions, mn as SandboxTerminalRequestOptions, mo as BatchTaskResult, mr as WriteFileOptions, mt as FleetPromptDispatchResult, n as DeleteMatchingSandboxResult, na as SessionInfo, ni as Rollout, nn as SSHCommandDescriptor, no as RawEvidenceExportOptions, nr as FileSystem, nt as FleetAgentId, oa as SessionMessageAdmission, oi as BatchBackend, on as SandboxPortBinding, or as FileUsageOptions, ot as FleetDispatchCancelResult, p as SandboxRemovalState, pa as TaskSessionProfile, pi as DurablePlan, pn as SandboxTerminalManager, po as BatchResult, pr as UploadProgress, pt as FleetPromptDispatchOptions, q as GitDiff, qa as SandboxEnvRecovery, qi as SendSessionMessageOptions, qn as DownloadOptions, qr as ManagedProcessState, qt as SandboxFleetTraceEvent, r as DeleteMatchingSandboxesFilter, ra as SessionInterruptOptions, ri as RolloutOptions, rn as SSHCredentials, ro as RawEvidenceNativeFile, rr as FileTreeFile, rt as FleetAgentPlacement, s as SandboxDeleteAcknowledgement, sa as SessionMessageInputPart, si as BatchRunOptions, sn as SandboxPortPreviewLink, so as baseProxyToken, sr as FileUsageResult, st as FleetDispatchResultBuffer, t as DeleteMatchingSandboxOutcome, ta as SessionForkOptions, ti as ForkLookupOptions, tn as ListSandboxOptions, to as RawEvidenceDirectoryExport, tr as FileRenameResult, tt as CreateSandboxFleetWithCoordinatorOptions, u as SandboxOperationInfo, ua as TaskSessionCommitResult, un as SandboxTerminalAttachOptions, uo as assertDeclaredSecretsHeld, ur as MkdirOptions, ut as FleetExecDispatchOptions, v as SnapshotOptions, va as BackendManager, vi as EventStreamOptions, vn as TeeAttestationOptions, vo as BatchBackendStats, vr as SearchOptions, vt as ReapExpiredSandboxFleetsOptions, w as SecretsManager, wa as SecretBindingOptions, wi as PromptInputPart, wn as CreateRequestOptions, wo as BackendType, wr as SandboxEnvironment, wt as SandboxFleetArtifact, x as SnapshotResult, xa as BackendStatus, xi as IntelligenceReportCompareTo, xn as TeePublicKey, xo as BatchSidecarGroup, xr as PublicTemplateVersionInfo, xt as ReconcileSandboxFleetsResult, ya as BackendMcpServerStatus, yi as IntelligenceReport, yn as TeeAttestationReport, yo as BatchEvent, yr as ExecOptions, yt as ReapExpiredSandboxFleetsResult, z as ProcessManager, za as ProcessListOptions, zi as ConversationTurnResult, zn as EgressPolicy, zr as GpuLeaseProvidersOptions, zt as SandboxFleetOperationsSummary } from "./types-CCRfg8oS.js";
|
|
4
4
|
import { A as LineRespondAgent, B as LineVoiceOptions, C as LineMessage, D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, L as LineThread, M as LineRole, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, R as LineTransport, S as LineMemberSpec, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, c as LineAllowanceSubject, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, j as LineRespondView, k as LineReplyGate, l as LineApplicationAttachOptions, m as LineFromConnectionInput, n as SandboxLines, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, s as LineAllowance, t as LinesClient, u as LineAttachOptions, v as LineLimits, w as LineNumberInventory, x as LineMemberPatch, y as LineMember, z as LineVoice } from "./lines-BbOFiDng.js";
|
|
5
5
|
import { _ as InteractiveSessionStatus, a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as interactiveSessionIdentityDigest, f as InteractiveAttachOptions, g as InteractiveRequestOptions, h as InteractiveObserveOptions, i as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as InteractiveSessionNotRunningError, m as InteractiveControlClaimOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimAcknowledgement, r as browserInteractiveControlHolderId, s as InteractiveSessionControlTransport, t as BrowserInteractiveSessionControlController, u as createInteractiveControlHolderId } from "./browser-interactive-control-controller-CxQBcgj3.js";
|
|
6
6
|
import { a as InteractiveSessionControllerOptions, i as InteractiveSessionController, n as BrowserInteractiveSessionControllerOptions, o as InteractiveSessionControllerTransport, r as InteractiveAttachRequest, t as BrowserInteractiveSessionController } from "./interactive-controller-NB7OwefY.js";
|
|
7
|
-
import { $ as ImageBuildClient, $t as IntelligenceClient, A as buildTangleRouterResponsesWebSearchRequest, At as CreateConfidentialSandboxOptions, B as MANAGE_SANDBOXES_TOOL_NAME, Bt as TeeAttestationHeartbeatSample, C as RunTangleRouterEvalMatrixInSandboxOptions, Ct as InstanceRestartingError, D as RouterSearchConfigOptions, Dt as sandboxFailureKind, E as RouterSearchConfig, Et as SandboxFailureKind, F as SANDBOX_SIZE_PRESETS, Ft as validateBatchRunRequest, G as manageSandboxesInputSchema, Gt as ParseSSEStreamOptions, H as ManageSandboxesTool, Ht as BuildProgressEvent, I as resolveSandboxResources, It as normalizeRuntimeBackendConfig, J as collectAgentFinalMessageText, Jt as CreateTeamOptions, K as downloadFile, Kt as ParsedSSEEvent, L as sandboxResourcesForSize, Lt as requestedPublicProfileDigest, M as buildTangleRouterSearchProfile, Mt as generateAttestationNonce, N as fetchTangleRouterSearchConfig, Nt as BatchResultAccumulator, O as TangleSearchProvider, Ot as ConfidentialSandboxResult, P as DEFAULT_SANDBOX_SIZE, Pt as createBatchResultAccumulator, Q as Image, Qt as TeamMember, R as materializeProfileFileMounts, Rt as TeeAttestationHeartbeat, S as RouterImportedRunResponse, St as InstanceRecord, T as runTangleRouterEvalMatrixInSandbox, Tt as InstancesClient, U as ManageSandboxesToolOptions, Ut as ImageSpec, V as ManageSandboxesInput, Vt as startTeeAttestationHeartbeat, W as createManageSandboxesTool, Wt as DEFAULT_MAX_EXECUTION_TTL_MS, X as getSandboxEventText, Xt as Team, Y as collectAgentResponseText, Yt as InviteTeamMemberOptions, Z as isToolBearingEvent, Zt as TeamInvitation, _ as RouterEvalMatrixPayload, _t as gatewaySeatTransport, a as SessionBroadcastEvent, an as backendRegistryEntrySchema, at as generateDockerfile, b as RouterEvalMatrixScenario, bt as HostedInstance, c as RunPlacement, cn as isBackendRegistryInteractionKind, ct as SandboxResolvedSeat, d as RunWaitOptions, dt as SeatOwnerReply, en as BackendRegistryCapabilities, et as ImageBuildClientConfig, f as RunsClient, ft as SeatOwnerTransport, g as RouterEvalMatrixHarness, gt as createSelectSeat, h as RouterEvalMatrixCaseResult, ht as SeatSelectionRequest, i as terminalUpgradeHeadersSupported, in as backendRegistryCapabilitiesSchema, it as ImageBuilder, j as buildTangleRouterSearchBackend, jt as createConfidentialSandbox, k as buildTangleRouterEvalMatrixRequest, kt as ConfidentialTeeType, l as RunPlacementRecord, ln as parseBackendRegistryResponse, lt as SandboxSeatCredentials, m as RouterEvalMatrixAgentProfile, mt as SeatSelectionError, n as SandboxFleetClient, nn as BackendRegistryInteractionKind, nt as ImageBuildOptions, o as SessionBroadcastResult, on as backendRegistryInteractionKindSchema, ot as ISOLATED_CREATION_ATTESTATION_VERSION, p as RunsHttpClient, pt as SeatResolutionObservation, q as applySandboxEventText, qt as parseSSEStream, r as SandboxFleet, rn as BackendRegistryResponse, rt as ImageBuildResult, s as RunOptions, sn as backendRegistryResponseSchema, st as CreateSelectSeatOptions, t as Sandbox, tn as BackendRegistryEntry, tt as ImageBuildFetchClient, u as RunRecord, un as parseBackendRegistryResponseBody, ut as SandboxSeatSelectionInput, v as RouterEvalMatrixSandboxBox, vt as ManagedProcessClient, w as RunTangleRouterEvalMatrixInSandboxResult, wt as InstanceStart, x as RouterEvalMatrixSuiteResponse, xt as InstanceProfile, y as RouterEvalMatrixSandboxClient, yt as EnsureInstanceOptions, z as MANAGE_SANDBOXES_PARAMETERS, zt as TeeAttestationHeartbeatOptions } from "./client-
|
|
7
|
+
import { $ as ImageBuildClient, $t as IntelligenceClient, A as buildTangleRouterResponsesWebSearchRequest, At as CreateConfidentialSandboxOptions, B as MANAGE_SANDBOXES_TOOL_NAME, Bt as TeeAttestationHeartbeatSample, C as RunTangleRouterEvalMatrixInSandboxOptions, Ct as InstanceRestartingError, D as RouterSearchConfigOptions, Dt as sandboxFailureKind, E as RouterSearchConfig, Et as SandboxFailureKind, F as SANDBOX_SIZE_PRESETS, Ft as validateBatchRunRequest, G as manageSandboxesInputSchema, Gt as ParseSSEStreamOptions, H as ManageSandboxesTool, Ht as BuildProgressEvent, I as resolveSandboxResources, It as normalizeRuntimeBackendConfig, J as collectAgentFinalMessageText, Jt as CreateTeamOptions, K as downloadFile, Kt as ParsedSSEEvent, L as sandboxResourcesForSize, Lt as requestedPublicProfileDigest, M as buildTangleRouterSearchProfile, Mt as generateAttestationNonce, N as fetchTangleRouterSearchConfig, Nt as BatchResultAccumulator, O as TangleSearchProvider, Ot as ConfidentialSandboxResult, P as DEFAULT_SANDBOX_SIZE, Pt as createBatchResultAccumulator, Q as Image, Qt as TeamMember, R as materializeProfileFileMounts, Rt as TeeAttestationHeartbeat, S as RouterImportedRunResponse, St as InstanceRecord, T as runTangleRouterEvalMatrixInSandbox, Tt as InstancesClient, U as ManageSandboxesToolOptions, Ut as ImageSpec, V as ManageSandboxesInput, Vt as startTeeAttestationHeartbeat, W as createManageSandboxesTool, Wt as DEFAULT_MAX_EXECUTION_TTL_MS, X as getSandboxEventText, Xt as Team, Y as collectAgentResponseText, Yt as InviteTeamMemberOptions, Z as isToolBearingEvent, Zt as TeamInvitation, _ as RouterEvalMatrixPayload, _t as gatewaySeatTransport, a as SessionBroadcastEvent, an as backendRegistryEntrySchema, at as generateDockerfile, b as RouterEvalMatrixScenario, bt as HostedInstance, c as RunPlacement, cn as isBackendRegistryInteractionKind, ct as SandboxResolvedSeat, d as RunWaitOptions, dt as SeatOwnerReply, en as BackendRegistryCapabilities, et as ImageBuildClientConfig, f as RunsClient, ft as SeatOwnerTransport, g as RouterEvalMatrixHarness, gt as createSelectSeat, h as RouterEvalMatrixCaseResult, ht as SeatSelectionRequest, i as terminalUpgradeHeadersSupported, in as backendRegistryCapabilitiesSchema, it as ImageBuilder, j as buildTangleRouterSearchBackend, jt as createConfidentialSandbox, k as buildTangleRouterEvalMatrixRequest, kt as ConfidentialTeeType, l as RunPlacementRecord, ln as parseBackendRegistryResponse, lt as SandboxSeatCredentials, m as RouterEvalMatrixAgentProfile, mt as SeatSelectionError, n as SandboxFleetClient, nn as BackendRegistryInteractionKind, nt as ImageBuildOptions, o as SessionBroadcastResult, on as backendRegistryInteractionKindSchema, ot as ISOLATED_CREATION_ATTESTATION_VERSION, p as RunsHttpClient, pt as SeatResolutionObservation, q as applySandboxEventText, qt as parseSSEStream, r as SandboxFleet, rn as BackendRegistryResponse, rt as ImageBuildResult, s as RunOptions, sn as backendRegistryResponseSchema, st as CreateSelectSeatOptions, t as Sandbox, tn as BackendRegistryEntry, tt as ImageBuildFetchClient, u as RunRecord, un as parseBackendRegistryResponseBody, ut as SandboxSeatSelectionInput, v as RouterEvalMatrixSandboxBox, vt as ManagedProcessClient, w as RunTangleRouterEvalMatrixInSandboxResult, wt as InstanceStart, x as RouterEvalMatrixSuiteResponse, xt as InstanceProfile, y as RouterEvalMatrixSandboxClient, yt as EnsureInstanceOptions, z as MANAGE_SANDBOXES_PARAMETERS, zt as TeeAttestationHeartbeatOptions } from "./client-X0EfXGzX.js";
|
|
8
8
|
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-BGpRnTPY.js";
|
|
9
9
|
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-Dslyq85a.js";
|
|
10
10
|
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-Dqcr9p97.js";
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { A as normalizeRuntimeBackendConfig, B as TERMINAL_WS_ECHO_SUBPROTOCOL, G as parseBackendType, H as backendTypeSchema, I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, U as isolationPrincipalSchema, V as ALL_BACKEND_TYPES, i as terminalUpgradeHeadersSupported, j as requestedPublicProfileDigest, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, z as projectAgentTerminalRecord } from "./interactive-controller-C3DDPykv.js";
|
|
2
2
|
import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, k as agentInteractiveSessionPromptRequestDigest, l as createInteractiveControlHolderId, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-BYbNLahH.js";
|
|
3
3
|
import { i as SANDBOX_SIZE_PRESET_NAMES, r as agentProfileSchema, t as agentProfileConfidentialSchema } from "./profile-schema-C1KpT-wS.js";
|
|
4
|
-
import { C as SandboxOperationFailedError, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, S as SandboxOperation, T as splitInlineProfileFileMounts, _ as collectAgentFinalMessageText, a as buildTraceExportPayload, b as isToolBearingEvent, c as toOtelJson, f as InteractiveSessionHandle, g as applySandboxEventText, h as createInteractiveTerminalSession, i as MAX_EGRESS_DENIALS_LIMIT, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as exportTraceBundle, p as InteractiveTerminalFrameLog, r as WorkspaceImages, s as otelTraceIdForTangleTrace, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as materializeProfileFileMounts, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-
|
|
4
|
+
import { C as SandboxOperationFailedError, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, S as SandboxOperation, T as splitInlineProfileFileMounts, _ as collectAgentFinalMessageText, a as buildTraceExportPayload, b as isToolBearingEvent, c as toOtelJson, f as InteractiveSessionHandle, g as applySandboxEventText, h as createInteractiveTerminalSession, i as MAX_EGRESS_DENIALS_LIMIT, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as exportTraceBundle, p as InteractiveTerminalFrameLog, r as WorkspaceImages, s as otelTraceIdForTangleTrace, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as materializeProfileFileMounts, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-CJaZ2eLs.js";
|
|
5
5
|
import { C as StateError, E as ValidationError, S as ServerError, T as TimeoutError, _ as PartialFailureError, a as AuthError, b as ResumeEnvRequiredError, c as CompliancePlacementError, d as FileWriteConflictError, f as GpuProviderNotConfiguredError, g as NotFoundError, h as NetworkError, l as EdgeNotReadyError, n as parseErrorResponse, o as BranchFanoutExceedsHostError, p as KeyBudgetExhaustedError, s as CapabilityError, t as TerminalStreamError, u as EgressProxyRecoveryError, v as ProfileFileMountPathError, w as StreamInterruptedError, x as SandboxError, y as QuotaError } from "./errors-BUzH7U1D.js";
|
|
6
|
-
import { _ as createBatchResultAccumulator, a as InstancesClient, c as runtimeWorkspaceCwdSchema, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, g as IntelligenceClient, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, n as RunsClient, o as SandboxFleetClient, p as isBackendRegistryInteractionKind, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as backendRegistryEntrySchema, v as validateBatchRunRequest } from "./client-
|
|
6
|
+
import { _ as createBatchResultAccumulator, a as InstancesClient, c as runtimeWorkspaceCwdSchema, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, g as IntelligenceClient, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, n as RunsClient, o as SandboxFleetClient, p as isBackendRegistryInteractionKind, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as backendRegistryEntrySchema, v as validateBatchRunRequest } from "./client-EqkFJstx.js";
|
|
7
7
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DIIJHGQY.js";
|
|
8
8
|
import { t as parseSSEStream } from "./sse-parser-DrI47LyG.js";
|
|
9
9
|
import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-2fj8i5qd.js";
|
|
10
10
|
import { t as downloadFile } from "./file-download-Bo3IypMO.js";
|
|
11
11
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
12
|
-
import { a as LINE_APPLICATION_REPLY_MAX_CHARS, c as parseLineApplicationResult, i as gatewaySeatTransport, l as sandboxFailureKind, n as SeatSelectionError, o as LINE_APPLICATION_REQUEST_MAX_BYTES, r as createSelectSeat, s as parseLineApplicationRequest, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-
|
|
13
|
-
import { s as TangleSandboxClient } from "./tangle-
|
|
12
|
+
import { a as LINE_APPLICATION_REPLY_MAX_CHARS, c as parseLineApplicationResult, i as gatewaySeatTransport, l as sandboxFailureKind, n as SeatSelectionError, o as LINE_APPLICATION_REQUEST_MAX_BYTES, r as createSelectSeat, s as parseLineApplicationRequest, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-D6HUTcWA.js";
|
|
13
|
+
import { s as TangleSandboxClient } from "./tangle-Coo11OLc.js";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
//#region ../../../packages/runtime-contracts/dist/model-key-proxy.js
|
|
16
16
|
const MANAGED_MODEL_KEY_SENTINEL = "proxy-managed-per-request";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as SandboxInstance } from "./index-
|
|
1
|
+
import { O as SandboxInstance } from "./index-Cqjh5kS1.js";
|
|
2
2
|
import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-CCRfg8oS.js";
|
|
3
|
-
import { t as Sandbox } from "./client-
|
|
3
|
+
import { t as Sandbox } from "./client-X0EfXGzX.js";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/preview-operations.d.ts
|
|
6
6
|
type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
|
|
@@ -10036,29 +10036,34 @@ var SandboxSnapshotCapabilities = class extends SandboxTurnCapabilities {
|
|
|
10036
10036
|
return interpretWorkspaceOperationLookup(await response.json().catch(() => ({})), "checkpoint");
|
|
10037
10037
|
}
|
|
10038
10038
|
async revertToSnapshot(snapshotId) {
|
|
10039
|
-
|
|
10040
|
-
const data = await readResponseJson(response);
|
|
10041
|
-
if (response.status === 202) return this.waitForSnapshotRestore(snapshotId, data);
|
|
10042
|
-
return toSnapshotResult(data, state(this).profileProvenance);
|
|
10039
|
+
return this.restoreSnapshot(snapshotId, {});
|
|
10043
10040
|
}
|
|
10044
10041
|
/**
|
|
10045
10042
|
* Replace selected workspace-relative paths from a whole-workspace snapshot.
|
|
10046
10043
|
* Files outside the requested paths are left untouched.
|
|
10047
10044
|
*/
|
|
10048
10045
|
async restorePaths(snapshotId, paths) {
|
|
10049
|
-
|
|
10046
|
+
return this.restoreSnapshot(snapshotId, { body: JSON.stringify({ paths }) });
|
|
10047
|
+
}
|
|
10048
|
+
/** One restore request; a 202 is settled from its job (held to its end). */
|
|
10049
|
+
async restoreSnapshot(snapshotId, init) {
|
|
10050
|
+
const response = await state(this).client.fetch(`/v1/sandboxes/${this.id}/snapshots/${encodeURIComponent(snapshotId)}/restore?waitMs=${SNAPSHOT_RESTORE_HOLD_MS}`, {
|
|
10050
10051
|
method: "POST",
|
|
10051
|
-
|
|
10052
|
+
...init
|
|
10052
10053
|
}, { timeoutMs: SNAPSHOT_RESTORE_TIMEOUT_MS });
|
|
10053
10054
|
const data = await readResponseJson(response);
|
|
10054
10055
|
if (response.status === 202) return this.waitForSnapshotRestore(snapshotId, data);
|
|
10055
10056
|
return toSnapshotResult(data, state(this).profileProvenance);
|
|
10056
10057
|
}
|
|
10058
|
+
/**
|
|
10059
|
+
* Settle a restore from its job's status. The restore's own 202, held to
|
|
10060
|
+
* the job's end, is the first status read; only an unfinished one polls.
|
|
10061
|
+
*/
|
|
10057
10062
|
async waitForSnapshotRestore(snapshotId, accepted) {
|
|
10058
10063
|
const deadline = Date.now() + SNAPSHOT_RESTORE_TIMEOUT_MS;
|
|
10064
|
+
let status = accepted;
|
|
10065
|
+
let polledAt = 0;
|
|
10059
10066
|
while (Date.now() < deadline) {
|
|
10060
|
-
const polledAt = Date.now();
|
|
10061
|
-
const status = await readResponseJson(await state(this).client.fetch(`/v1/sandboxes/${this.id}/snapshots/jobs/${encodeURIComponent(accepted.jobId)}?waitMs=${SNAPSHOT_RESTORE_HOLD_MS}`));
|
|
10062
10067
|
if (status.status === "failed" || status.result?.success === false) throw new ServerError(status.result?.error ?? `Snapshot restore job ${accepted.jobId} failed`);
|
|
10063
10068
|
if (status.status === "completed") {
|
|
10064
10069
|
this.applyLifecycleResponse(status.sandbox ?? null);
|
|
@@ -10073,6 +10078,8 @@ var SandboxSnapshotCapabilities = class extends SandboxTurnCapabilities {
|
|
|
10073
10078
|
}
|
|
10074
10079
|
const heldMs = Date.now() - polledAt;
|
|
10075
10080
|
if (heldMs < SNAPSHOT_RESTORE_POLL_FLOOR_MS) await this.sleep(SNAPSHOT_RESTORE_POLL_FLOOR_MS - heldMs);
|
|
10081
|
+
polledAt = Date.now();
|
|
10082
|
+
status = await readResponseJson(await state(this).client.fetch(`/v1/sandboxes/${this.id}/snapshots/jobs/${encodeURIComponent(accepted.jobId)}?waitMs=${SNAPSHOT_RESTORE_HOLD_MS}`));
|
|
10076
10083
|
}
|
|
10077
10084
|
throw new TimeoutError(SNAPSHOT_RESTORE_TIMEOUT_MS);
|
|
10078
10085
|
}
|
package/dist/tangle/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_JOBS_CONTRACT, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as TANGLE_CHAIN_ID, h as TangleSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TangleSandboxClientConfig, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-
|
|
1
|
+
import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_JOBS_CONTRACT, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as TANGLE_CHAIN_ID, h as TangleSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TangleSandboxClientConfig, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-Cqjh5kS1.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JobQuoteDetails, JsonResponseParamTypes, OperatorChallenge, OperatorSession, OperatorSessionError, OperatorSessionToken, QuoteDomain, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, SignMessage, SignedQuote, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, TangleSandboxClientConfig, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-
|
|
1
|
+
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-Coo11OLc.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
1
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-CJaZ2eLs.js";
|
|
2
2
|
import { i as readResponseJson } from "./errors-BUzH7U1D.js";
|
|
3
3
|
import { _ as rotlBH, a as anumber, b as rotlSL, d as createXOFer, g as u32, h as toBytes$1, l as createHasher, m as swap32IfBE, n as abytes, o as aoutput, r as aexists, s as clean, t as Hash, v as rotlBL, x as split, y as rotlSH } from "./utils-vaFoyyiO.js";
|
|
4
4
|
//#region ../../../packages/runtime-contracts/dist/tangle-blueprint-abi.js
|
|
@@ -630,6 +630,125 @@ var TangleChainClient = class {
|
|
|
630
630
|
}
|
|
631
631
|
};
|
|
632
632
|
//#endregion
|
|
633
|
+
//#region src/tangle/azure-attestation.ts
|
|
634
|
+
var AzureAttestationError = class extends Error {
|
|
635
|
+
constructor(sandboxId, reason) {
|
|
636
|
+
super(`Azure attestation was refused for sandbox ${sandboxId}: ${reason}`);
|
|
637
|
+
this.name = "AzureAttestationError";
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
/** True when `issuer` is an https Azure Attestation host with no path or userinfo. */
|
|
641
|
+
function isAzureAttestationIssuer(issuer) {
|
|
642
|
+
return azureOrigin(issuer) !== null;
|
|
643
|
+
}
|
|
644
|
+
async function assertAzureProductionToken(sandboxId, token, attestationNonce) {
|
|
645
|
+
const header = decodePart$1(sandboxId, token, 0);
|
|
646
|
+
if (header.alg !== "RS256") throw new AzureAttestationError(sandboxId, "token must use RS256");
|
|
647
|
+
if (header.crit != null && (!Array.isArray(header.crit) || header.crit.length > 0)) throw new AzureAttestationError(sandboxId, "token has an unsupported critical header");
|
|
648
|
+
if (!header.kid) throw new AzureAttestationError(sandboxId, "token has no signing key");
|
|
649
|
+
const origin = azureOrigin(decodePart$1(sandboxId, token, 1).iss ?? "");
|
|
650
|
+
if (!origin) throw new AzureAttestationError(sandboxId, "issuer was not Azure Attestation");
|
|
651
|
+
if (!await verifyRs256$1(sandboxId, token, await signingKey$1(sandboxId, origin, header.kid))) throw new AzureAttestationError(sandboxId, "signature was not made by Azure Attestation");
|
|
652
|
+
const claims = decodePart$1(sandboxId, token, 1);
|
|
653
|
+
const now = Math.floor(Date.now() / 1e3);
|
|
654
|
+
if (typeof claims.exp !== "number" || !Number.isInteger(claims.exp) || claims.exp + 60 < now) throw new AzureAttestationError(sandboxId, "token is expired");
|
|
655
|
+
if (claims.nbf !== void 0 && (typeof claims.nbf !== "number" || !Number.isInteger(claims.nbf) || claims.nbf > now + 60)) throw new AzureAttestationError(sandboxId, "token is not valid yet");
|
|
656
|
+
if (azureOrigin(claims.iss ?? "") !== origin) throw new AzureAttestationError(sandboxId, "issuer was not Azure Attestation");
|
|
657
|
+
productionClaims(sandboxId, claims);
|
|
658
|
+
const vm = claims["x-ms-runtime"]?.["vm-configuration"];
|
|
659
|
+
if (vm && vm["secure-boot"] !== true) throw new AzureAttestationError(sandboxId, "secure boot is not enabled");
|
|
660
|
+
if (attestationNonce) nonceMatches(sandboxId, claims, attestationNonce);
|
|
661
|
+
}
|
|
662
|
+
function productionClaims(sandboxId, claims) {
|
|
663
|
+
if (claims["x-ms-ver"] !== "1.0") throw new AzureAttestationError(sandboxId, "token version is not 1.0");
|
|
664
|
+
if (claims["x-ms-compliance-status"] !== "azure-compliant-cvm") throw new AzureAttestationError(sandboxId, "token is not an Azure-compliant confidential VM");
|
|
665
|
+
if (claims["x-ms-attestation-type"] === "sevsnpvm") {
|
|
666
|
+
if (claims["x-ms-sevsnpvm-is-debuggable"] !== false) throw new AzureAttestationError(sandboxId, "SEV-SNP token is debuggable");
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
if (claims["x-ms-attestation-type"] === "tdxvm") {
|
|
670
|
+
if (claims.dbgstat !== "disabled" || claims.tdx_td_attributes_debug !== false) throw new AzureAttestationError(sandboxId, "TDX token is debuggable");
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
throw new AzureAttestationError(sandboxId, "token is not a confidential VM attestation");
|
|
674
|
+
}
|
|
675
|
+
function nonceMatches(sandboxId, claims, attestationNonce) {
|
|
676
|
+
const presented = (claims.nonce ?? claims.rp_data ?? "").trim().replace(/^0x/i, "").toLowerCase();
|
|
677
|
+
const direct = attestationNonce.trim().replace(/^0x/i, "").toLowerCase();
|
|
678
|
+
const padded = paddedNonceHex(attestationNonce);
|
|
679
|
+
if (presented.length > 0 && (presented === direct || presented === padded)) return;
|
|
680
|
+
throw new AzureAttestationError(sandboxId, "nonce did not match the caller challenge");
|
|
681
|
+
}
|
|
682
|
+
function paddedNonceHex(nonce) {
|
|
683
|
+
const hex = nonce.trim().replace(/^0x/i, "");
|
|
684
|
+
if (hex.length % 2 !== 0 || hex.length < 64 || hex.length > 128 || !/^[0-9a-fA-F]+$/.test(hex)) return null;
|
|
685
|
+
const bytes = hex.length / 2;
|
|
686
|
+
if (bytes < 32 || bytes > 64) return null;
|
|
687
|
+
return `${hex}${"0".repeat((64 - bytes) * 2)}`.toLowerCase();
|
|
688
|
+
}
|
|
689
|
+
function azureOrigin(issuer) {
|
|
690
|
+
let url;
|
|
691
|
+
try {
|
|
692
|
+
url = new URL(issuer);
|
|
693
|
+
} catch {
|
|
694
|
+
return null;
|
|
695
|
+
}
|
|
696
|
+
if (url.protocol !== "https:") return null;
|
|
697
|
+
if (url.username || url.password || url.port) return null;
|
|
698
|
+
if (url.pathname !== "/" && url.pathname !== "") return null;
|
|
699
|
+
if (url.search || url.hash) return null;
|
|
700
|
+
const host = url.hostname;
|
|
701
|
+
if (!host.endsWith(".attest.azure.net") || host.length <= 17 || host.split(".").some((label) => label.length === 0)) return null;
|
|
702
|
+
return `https://${host}`;
|
|
703
|
+
}
|
|
704
|
+
function decodePart$1(sandboxId, token, index) {
|
|
705
|
+
const encoded = token.split(".")[index];
|
|
706
|
+
if (!encoded) throw new AzureAttestationError(sandboxId, "evidence is not a JWT");
|
|
707
|
+
try {
|
|
708
|
+
return JSON.parse(new TextDecoder().decode(base64Url$1(encoded)));
|
|
709
|
+
} catch {
|
|
710
|
+
throw new AzureAttestationError(sandboxId, "evidence is not a JWT");
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
async function signingKey$1(sandboxId, origin, kid) {
|
|
714
|
+
const response = await fetch(`${origin}/certs`, {
|
|
715
|
+
redirect: "error",
|
|
716
|
+
signal: AbortSignal.timeout(1e4)
|
|
717
|
+
});
|
|
718
|
+
if (!response.ok) throw new AzureAttestationError(sandboxId, "attestation key fetch failed");
|
|
719
|
+
const key = (await response.json()).keys?.find((candidate) => candidate.kid === kid && (candidate.kty === void 0 || candidate.kty === "RSA") && (candidate.alg === void 0 || candidate.alg === "RS256") && typeof candidate.n === "string" && candidate.n.length > 0 && typeof candidate.e === "string" && candidate.e.length > 0);
|
|
720
|
+
if (!key) throw new AzureAttestationError(sandboxId, "attestation signing key was not published");
|
|
721
|
+
return key;
|
|
722
|
+
}
|
|
723
|
+
async function verifyRs256$1(sandboxId, token, jwk) {
|
|
724
|
+
const [header, payload, signature] = token.split(".");
|
|
725
|
+
if (!header || !payload || !signature || !jwk.n || !jwk.e) return false;
|
|
726
|
+
const subtle = globalThis.crypto?.subtle;
|
|
727
|
+
if (!subtle) throw new AzureAttestationError(sandboxId, "attestation verification is unavailable");
|
|
728
|
+
try {
|
|
729
|
+
const key = await subtle.importKey("jwk", {
|
|
730
|
+
kty: "RSA",
|
|
731
|
+
n: jwk.n,
|
|
732
|
+
e: jwk.e,
|
|
733
|
+
alg: "RS256",
|
|
734
|
+
ext: true
|
|
735
|
+
}, {
|
|
736
|
+
name: "RSASSA-PKCS1-v1_5",
|
|
737
|
+
hash: "SHA-256"
|
|
738
|
+
}, false, ["verify"]);
|
|
739
|
+
return await subtle.verify("RSASSA-PKCS1-v1_5", key, base64Url$1(signature), new TextEncoder().encode(`${header}.${payload}`));
|
|
740
|
+
} catch {
|
|
741
|
+
return false;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
function base64Url$1(encoded) {
|
|
745
|
+
const padded = encoded.replace(/-/g, "+").replace(/_/g, "/") + "=".repeat((4 - encoded.length % 4) % 4);
|
|
746
|
+
const binary = atob(padded);
|
|
747
|
+
const bytes = new Uint8Array(binary.length);
|
|
748
|
+
for (let i = 0; i < binary.length; i += 1) bytes[i] = binary.charCodeAt(i);
|
|
749
|
+
return bytes;
|
|
750
|
+
}
|
|
751
|
+
//#endregion
|
|
633
752
|
//#region src/tangle/gcp-attestation.ts
|
|
634
753
|
/**
|
|
635
754
|
* Verify a Google Confidential Space token before a Tangle create returns.
|
|
@@ -640,7 +759,7 @@ var TangleChainClient = class {
|
|
|
640
759
|
*/
|
|
641
760
|
const ISSUER = "https://confidentialcomputing.googleapis.com";
|
|
642
761
|
const JWKS_URL = "https://www.googleapis.com/service_accounts/v1/metadata/jwk/signer@confidentialspace-sign.iam.gserviceaccount.com";
|
|
643
|
-
const MAX_EVIDENCE_BYTES = 8192;
|
|
762
|
+
const MAX_EVIDENCE_BYTES$1 = 8192;
|
|
644
763
|
var GcpAttestationError = class extends Error {
|
|
645
764
|
constructor(sandboxId, reason) {
|
|
646
765
|
super(`GCP attestation was refused for sandbox ${sandboxId}: ${reason}`);
|
|
@@ -653,7 +772,7 @@ async function assertGcpProductionToken(sandboxId, teeAttestationJson) {
|
|
|
653
772
|
if (!evidence) return;
|
|
654
773
|
const token = compactJwt(evidence);
|
|
655
774
|
if (!token) return;
|
|
656
|
-
if (evidence.length > MAX_EVIDENCE_BYTES) throw new GcpAttestationError(sandboxId, "evidence is too large");
|
|
775
|
+
if (evidence.length > MAX_EVIDENCE_BYTES$1) throw new GcpAttestationError(sandboxId, "evidence is too large");
|
|
657
776
|
const header = decodePart(sandboxId, token, 0);
|
|
658
777
|
if (header.alg !== "RS256") throw new GcpAttestationError(sandboxId, "token must use RS256");
|
|
659
778
|
if ((header.crit?.length ?? 0) > 0) throw new GcpAttestationError(sandboxId, "token has an unsupported critical header");
|
|
@@ -670,6 +789,28 @@ async function assertGcpProductionToken(sandboxId, teeAttestationJson) {
|
|
|
670
789
|
if (claims.secboot !== true || claims.swname !== "CONFIDENTIAL_SPACE") throw new GcpAttestationError(sandboxId, "token is not a secure-boot Confidential Space token");
|
|
671
790
|
if (claims.hwmodel !== "GCP_AMD_SEV" && claims.hwmodel !== "GCP_AMD_SEV_SNP") throw new GcpAttestationError(sandboxId, "hardware model is not AMD SEV");
|
|
672
791
|
}
|
|
792
|
+
/** A compact JWT found in attestation evidence, or null when the evidence is not one. */
|
|
793
|
+
function confidentialJwt(teeAttestationJson) {
|
|
794
|
+
const evidence = jwtEvidence(teeAttestationJson);
|
|
795
|
+
if (!evidence) return null;
|
|
796
|
+
const token = compactJwt(evidence);
|
|
797
|
+
if (!token) return null;
|
|
798
|
+
return {
|
|
799
|
+
evidence,
|
|
800
|
+
token
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
/** Issuer claim from an unverified payload. Used only to choose a verifier. */
|
|
804
|
+
function unverifiedIssuer(token) {
|
|
805
|
+
try {
|
|
806
|
+
const encoded = token.split(".")[1];
|
|
807
|
+
if (!encoded) return null;
|
|
808
|
+
const claims = JSON.parse(new TextDecoder().decode(base64Url(encoded)));
|
|
809
|
+
return typeof claims.iss === "string" ? claims.iss : null;
|
|
810
|
+
} catch {
|
|
811
|
+
return null;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
673
814
|
function jwtEvidence(raw) {
|
|
674
815
|
if (!raw) return null;
|
|
675
816
|
let parsed;
|
|
@@ -758,6 +899,39 @@ function byteOk(value) {
|
|
|
758
899
|
return typeof value === "number" && Number.isInteger(value) && value >= 0 && value <= 255;
|
|
759
900
|
}
|
|
760
901
|
//#endregion
|
|
902
|
+
//#region src/tangle/cloud-attestation.ts
|
|
903
|
+
/**
|
|
904
|
+
* Choose the attestation check from the token issuer.
|
|
905
|
+
*
|
|
906
|
+
* Google Confidential Space and Microsoft Azure Attestation tokens are
|
|
907
|
+
* refused when they do not verify. Any other JWT is refused. Evidence that
|
|
908
|
+
* is not a JWT, including a Nitro document or a DCAP or SNP quote, is left
|
|
909
|
+
* alone: this client does not reimplement those verifiers.
|
|
910
|
+
*/
|
|
911
|
+
const GOOGLE_ISSUER = "https://confidentialcomputing.googleapis.com";
|
|
912
|
+
const MAX_EVIDENCE_BYTES = 8192;
|
|
913
|
+
var CloudAttestationError = class extends Error {
|
|
914
|
+
constructor(sandboxId, reason) {
|
|
915
|
+
super(`Attestation was refused for sandbox ${sandboxId}: ${reason}`);
|
|
916
|
+
this.name = "CloudAttestationError";
|
|
917
|
+
}
|
|
918
|
+
};
|
|
919
|
+
async function assertProductionAttestation(sandboxId, teeAttestationJson, attestationNonce) {
|
|
920
|
+
const jwt = confidentialJwt(teeAttestationJson);
|
|
921
|
+
if (!jwt) return;
|
|
922
|
+
if (jwt.evidence.length > MAX_EVIDENCE_BYTES) throw new CloudAttestationError(sandboxId, "evidence is too large");
|
|
923
|
+
const issuer = unverifiedIssuer(jwt.token);
|
|
924
|
+
if (issuer === GOOGLE_ISSUER) {
|
|
925
|
+
await assertGcpProductionToken(sandboxId, teeAttestationJson);
|
|
926
|
+
return;
|
|
927
|
+
}
|
|
928
|
+
if (issuer && isAzureAttestationIssuer(issuer)) {
|
|
929
|
+
await assertAzureProductionToken(sandboxId, jwt.token, attestationNonce);
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
932
|
+
throw new CloudAttestationError(sandboxId, "attestation token issuer is not a supported confidential computing authority");
|
|
933
|
+
}
|
|
934
|
+
//#endregion
|
|
761
935
|
//#region src/tangle/operator-auth.ts
|
|
762
936
|
const SESSION_REFRESH_MARGIN_MS = 6e4;
|
|
763
937
|
var OperatorSessionError = class extends Error {
|
|
@@ -1039,7 +1213,7 @@ var TangleSandboxClient = class {
|
|
|
1039
1213
|
teePublicKeyJson: wireEntry.teePublicKeyJson ?? responseJson.teePublicKeyJson,
|
|
1040
1214
|
attestationNonce: attestationNonceFromOptions(createOptions) ?? wireEntry.attestationNonce
|
|
1041
1215
|
};
|
|
1042
|
-
await
|
|
1216
|
+
await assertProductionAttestation(sandboxId, entry.teeAttestationJson, entry.attestationNonce);
|
|
1043
1217
|
this.#sandboxes.set(sandboxId, entry);
|
|
1044
1218
|
if (tangleSecrets && Object.keys(tangleSecrets).length > 0) await this.injectSecrets(sandboxId, tangleSecrets);
|
|
1045
1219
|
return createSandboxInstanceFromResponse(this, sandboxInfoFromEntry(entry));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.162",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -156,12 +156,12 @@
|
|
|
156
156
|
"@products/sandbox-test-utils": "0.0.0",
|
|
157
157
|
"@repo/shared": "0.0.0",
|
|
158
158
|
"@tangle-network/agent-profile-materialize": "0.27.1",
|
|
159
|
-
"@tangle-network/
|
|
160
|
-
"@tangle-network/
|
|
159
|
+
"@tangle-network/cli-agent-registry": "0.15.0",
|
|
160
|
+
"@tangle-network/runtime-contracts": "0.20.0"
|
|
161
161
|
},
|
|
162
162
|
"tangleRelease": {
|
|
163
|
-
"sourceSha": "
|
|
164
|
-
"mergedAt": "2026-10-
|
|
163
|
+
"sourceSha": "cda91dff0079b4e2902b8de4f47a86697eceeb34",
|
|
164
|
+
"mergedAt": "2026-10-31T19:20:11-06:00"
|
|
165
165
|
},
|
|
166
166
|
"scripts": {
|
|
167
167
|
"build": "node scripts/build-dist.mjs",
|