@tangle-network/sandbox 0.60.36 → 0.60.37-develop.20261011082415.1815a0e

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.
@@ -1,7 +1,7 @@
1
- import { _ as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-Dw9YNtU4.js";
1
+ import { _ as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-PrV7qtTE.js";
2
2
  import { D as CodeExecutionResult, E as CodeExecutionOptions, Ji as SessionInfo, Jr as SandboxFleetParent, O as CodeLanguage, Xi as SessionListOptions, d as BackendConfig, k as CodeResultPart, oo as BackendType } from "../types-C0XwJqxx.js";
3
- import { i as Sandbox } from "../client-CO5ShEdk.js";
4
- import { u as PreviewAuthorizer } from "../preview-DNAuiZly.js";
3
+ import { i as Sandbox } from "../client-BVZv8JbS.js";
4
+ import { u as PreviewAuthorizer } from "../preview-CFHnG116.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";
@@ -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-DjryqUiY.js";
2
2
  import { E as assertCurrentBackendType } from "../interactive-controller-Dxt5sW2N.js";
3
3
  import { h as StateError, l as NotFoundError, v as ValidationError } from "../errors-Cq4hMysQ.js";
4
- import { n as Sandbox } from "../client-B8OutXq2.js";
5
- import { t as SandboxInstance } from "../sandbox-CfGVI_xk.js";
4
+ import { n as Sandbox } from "../client-CGbGnrBO.js";
5
+ import { t as SandboxInstance } from "../sandbox-uwsfBoYj.js";
6
6
  import { z } from "zod";
7
7
  //#region src/agent/instances.ts
8
8
  const managers = /* @__PURE__ */ new WeakMap();
@@ -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-DNAuiZly.js";
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-CFHnG116.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,4 +1,4 @@
1
- import { l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-Dw9YNtU4.js";
1
+ import { l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-PrV7qtTE.js";
2
2
  import { $r as SandboxFleetToken, Ar as SandboxFleetAgent, B as CreateSandboxOptions, Bt as FleetDispatchStreamOptions, Ca as TokenRefreshHandler, En as ListSandboxOptions, F as CreateIntelligenceReportOptions, Ft as FleetAgentResult, G as DeleteMatchingSandboxesFilter, Gr as SandboxFleetManifest, Gt as FleetMachineId, Ht as FleetDriveTurnRequest, I as CreateRequestOptions, Ir as SandboxFleetDispatchResponse, Jn as PromptResult, Jr as SandboxFleetParent, Jt as FleetRunEvent, K as DeleteMatchingSandboxesOptions, Kn as PromptInputPart, Kt as FleetPromptDispatchOptions, L as CreateSandboxFleetOptions, Lr as SandboxFleetDriverCapability, Lt as FleetDispatchCancelResult, M as ConversationTurnOptions, Mr as SandboxFleetArtifact, N as ConversationTurnResult, Nr as SandboxFleetArtifactSpec, Nt as FleetAgentId, Or as SandboxEnvironment, Pr as SandboxFleetCostEstimate, Qr as SandboxFleetSpend, R as CreateSandboxFleetTokenOptions, Ri as SecretsManager, Rt as FleetDispatchResultBuffer, Si as SandboxShapesInfo, Tn as ListSandboxFleetOptions, Ur as SandboxFleetMachineRecord, Ut as FleetExecDispatchOptions, Vt as FleetDriveTurnOutcome, Wr as SandboxFleetMachineSpec, Wt as FleetExecDispatchResult, Xr as SandboxFleetPolicy, Yt as FleetRunOptions, _i as SandboxRunGeneration, _n as IntelligenceReport, ar as ReapExpiredSandboxFleetsResult, b as BatchRunRequest, br as SandboxConfig, ca as SshKeysManager, ci as SandboxFleetWorkspaceSnapshotResult, d as BackendConfig, ei as SandboxFleetTraceBundle, er as PublicTemplateInfo, fa as SubscriptionInfo, ii as SandboxFleetUsage, ir as ReapExpiredSandboxFleetsOptions, ka as UsageInfo, l as AttachSandboxFleetMachineOptions, li as SandboxIdentity, nr as PublishPublicTemplateOptions, oi as SandboxFleetWorkspaceReconcileResult, or as ReconcileSandboxFleetsOptions, q as DeleteMatchingSandboxesResult, qn as PromptOptions, qr as SandboxFleetOperationsSummary, qt as FleetPromptDispatchResult, ri as SandboxFleetTraceOptions, rr as PublishPublicTemplateVersionOptions, si as SandboxFleetWorkspaceRestoreResult, sr as ReconcileSandboxFleetsResult, to as BatchEvent, tr as PublicTemplateVersionInfo, ui as SandboxInfo, v as BatchResult, vn as IntelligenceReportBudget, vt as ExecOptions, xn as IntelligenceReportWindow, y as BatchRunOptions, yn as IntelligenceReportCompareTo, yt as ExecResult, z as CreateSandboxFleetWithCoordinatorOptions, zr as SandboxFleetInfo, zt as FleetDispatchResultBufferOptions } from "./types-C0XwJqxx.js";
3
3
  import { l as ScopedToken, s as MintInteractiveSessionTokenOptions } from "./terminal-stream-CV1pMSKC.js";
4
4
  import { I as LinesClient } from "./lines-DQmR5ypP.js";
@@ -2,7 +2,7 @@ import { r as backendTypeSchema } from "./backend-types-C7b_Gpa0.js";
2
2
  import { D as foldModelRoutingFields, E as assertCurrentBackendType, M as withProfileHarness, S as encodePromptForWire, T as applyRequestedModel, k as normalizeRuntimeBackendConfig, s as requestInteractiveSessionToken, w as parseSSEStream } from "./interactive-controller-Dxt5sW2N.js";
3
3
  import { _ as TimeoutError, b as parseResponseError, c as NetworkError, d as QuotaError, l as NotFoundError, m as ServerError, p as SandboxError, s as NON_RETRYABLE_CREATE_QUOTA_REASONS, t as AuthError, u as PartialFailureError, v as ValidationError, x as readResponseJson, y as parseErrorResponse } from "./errors-Cq4hMysQ.js";
4
4
  import { f as combineAbortSignals } from "./browser-interactive-control-controller-BJf0P_J4.js";
5
- import { A as exportTraceBundle, C as splitInlineProfileFileMounts, D as normalizeSandboxShape, E as normalizeConnection, O as rewrapResponse, T as validateDeferredProfileFileMounts, a as normalizeStartupDiagnostics, i as normalizeSandboxCreateReceipt, n as createSandboxInstanceFromResponse, r as normalizeCaptureProof, w as splitInlineProfileSkills } from "./sandbox-CfGVI_xk.js";
5
+ import { A as exportTraceBundle, C as splitInlineProfileFileMounts, D as normalizeSandboxShape, E as normalizeConnection, O as rewrapResponse, T as validateDeferredProfileFileMounts, a as normalizeStartupDiagnostics, i as normalizeSandboxCreateReceipt, n as createSandboxInstanceFromResponse, r as normalizeCaptureProof, w as splitInlineProfileSkills } from "./sandbox-uwsfBoYj.js";
6
6
  import { LinesClient } from "./lines.js";
7
7
  import { agentProfileSchema } from "@tangle-network/agent-interface";
8
8
  import { z } from "zod";
@@ -3323,11 +3323,11 @@ function withRequestContextHeaders(response, path, method) {
3323
3323
  return rewrapResponse(response, headers);
3324
3324
  }
3325
3325
  async function resolveLocalCliAuthFiles(backendType) {
3326
- const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-D-_fMdNS.js");
3326
+ const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-Bs0An6Cw.js");
3327
3327
  return discoverLocalCliAuthFiles(backendType);
3328
3328
  }
3329
3329
  async function describeLocalCliAuthExpectation(backendType) {
3330
- const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-D-_fMdNS.js");
3330
+ const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-Bs0An6Cw.js");
3331
3331
  return describe(backendType);
3332
3332
  }
3333
3333
  async function hydrateLocalCliBackendAuth(backend, baseUrl, trustLocalCliAuth) {
package/dist/core.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-Dw9YNtU4.js";
1
+ import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages, v as ProfileFileDeliveryReport } from "./sandbox-PrV7qtTE.js";
2
2
  import { An as NetworkConfig, B as CreateSandboxOptions, Ba as ManagedProcessResumeOptions, Ci as SandboxStatus, Fn as PreviewLinkInfo, Ha as ManagedProcessState, Ia as ManagedProcessClient, In as PreviewLinkManager, Kn as PromptInputPart, La as ManagedProcessJobs, Ln as PreviewLinkWaitOptions, M as ConversationTurnOptions, N as ConversationTurnResult, Qi as SessionMessageAdmission, Ra as ManagedProcessOptions, Ua as SandboxEnvRecovery, Va as ManagedProcessSpec, Wa as SandboxEnvRecoveryView, br as SandboxConfig, ui as SandboxInfo, vt as ExecOptions, yt as ExecResult, za as ManagedProcessRecord } from "./types-C0XwJqxx.js";
3
3
  import { A as LineSenderVerification, B as profileChannelReference, C as LineReplyCodeInput, G as LineApplicationResult, H as LINE_APPLICATION_REQUEST_MAX_BYTES, I as LinesClient, J as parseLineApplicationRequest, K as LineApplicationState, O as LineSendInput, S as LineReplyCode, U as LineApplication, V as LINE_APPLICATION_REPLY_MAX_CHARS, W as LineApplicationRequest, Y as parseLineApplicationResult, a as LineApplicationAttachOptions, b as LineProvider, c as LineAttachmentReauthorization, d as LineInstanceAttachOptions, f as LineInstanceCreate, h as LineMemberInstance, j as LineSenderVerificationStart, k as LineSendReceipt, l as LineExecutionKey, m as LineMember, n as LineAgentRolePolicy, q as LineApplicationView, s as LineAttachment, t as Line, x as LineReminderPreferences, y as LineNumberInventory, z as lineInstanceKey } from "./lines-DQmR5ypP.js";
4
- import { A as BackendRegistryEntry, C as InstancesClient, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, _ as EnsureInstanceOptions, b as InstanceRecord, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, v as HostedInstance, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-CO5ShEdk.js";
4
+ import { A as BackendRegistryEntry, C as InstancesClient, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, _ as EnsureInstanceOptions, b as InstanceRecord, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, v as HostedInstance, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-BVZv8JbS.js";
5
5
  import { a as FileWriteConflictError, b as ValidationError, c as NotFoundError, f as SandboxError, g as StateError, h as ServerError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, p as SandboxErrorJson, s as NetworkError, t as AuthError, u as QuotaError, y as TimeoutError } from "./errors-CRssX9qs.js";
6
6
 
7
7
  //#region src/core.d.ts
@@ -11,4 +11,4 @@ import { a as FileWriteConflictError, b as ValidationError, c as NotFoundError,
11
11
  * still inspect the host receipt and their own customer/workspace binding. */
12
12
  declare const ISOLATED_CREATION_ATTESTATION_VERSION: 1;
13
13
  //#endregion
14
- export { AuthError, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, CapabilityError, type ConversationTurnOptions, type ConversationTurnResult, type CreateSandboxOptions, type EnsureInstanceOptions, type ExecOptions, type ExecResult, FileWriteConflictError, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, type InstanceProfile, type InstanceRecord, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, type Line, type LineAgentRolePolicy, type LineApplication, type LineApplicationAttachOptions, type LineApplicationRequest, type LineApplicationResult, type LineApplicationState, type LineApplicationView, type LineAttachment, type LineAttachmentReauthorization, type LineExecutionKey, type LineInstanceAttachOptions, type LineInstanceCreate, type LineMember, type LineMemberInstance, type LineNumberInventory, type LineProvider, type LineReminderPreferences, type LineReplyCode, type LineReplyCodeInput, type LineSendInput, type LineSendReceipt, type LineSenderVerification, type LineSenderVerificationStart, LinesClient, ManagedProcessClient, type ManagedProcessJobs, type ManagedProcessOptions, type ManagedProcessRecord, type ManagedProcessResumeOptions, type ManagedProcessSpec, type ManagedProcessState, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, type PromptInputPart, QuotaError, Sandbox, type SandboxConfig, type SandboxEnvRecovery, type SandboxEnvRecoveryView, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, type SessionMessageAdmission, StateError, TimeoutError, ValidationError, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference };
14
+ export { AuthError, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, CapabilityError, type ConversationTurnOptions, type ConversationTurnResult, type CreateSandboxOptions, type EnsureInstanceOptions, type ExecOptions, type ExecResult, FileWriteConflictError, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, type InstanceProfile, type InstanceRecord, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, type Line, type LineAgentRolePolicy, type LineApplication, type LineApplicationAttachOptions, type LineApplicationRequest, type LineApplicationResult, type LineApplicationState, type LineApplicationView, type LineAttachment, type LineAttachmentReauthorization, type LineExecutionKey, type LineInstanceAttachOptions, type LineInstanceCreate, type LineMember, type LineMemberInstance, type LineNumberInventory, type LineProvider, type LineReminderPreferences, type LineReplyCode, type LineReplyCodeInput, type LineSendInput, type LineSendReceipt, type LineSenderVerification, type LineSenderVerificationStart, LinesClient, ManagedProcessClient, type ManagedProcessJobs, type ManagedProcessOptions, type ManagedProcessRecord, type ManagedProcessResumeOptions, type ManagedProcessSpec, type ManagedProcessState, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, type ProfileFileDeliveryReport, type PromptInputPart, QuotaError, Sandbox, type SandboxConfig, type SandboxEnvRecovery, type SandboxEnvRecoveryView, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, type SessionMessageAdmission, StateError, TimeoutError, ValidationError, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference };
package/dist/core.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { _ as TimeoutError, a as FileWriteConflictError, c as NetworkError, d as QuotaError, h as StateError, l as NotFoundError, m as ServerError, n as CapabilityError, p as SandboxError, t as AuthError, u as PartialFailureError, v as ValidationError } from "./errors-Cq4hMysQ.js";
2
- import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-B8OutXq2.js";
3
- import { o as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-CfGVI_xk.js";
2
+ import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-CGbGnrBO.js";
3
+ import { o as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-uwsfBoYj.js";
4
4
  import { LinesClient, lineInstanceKey, profileChannelReference } from "./lines.js";
5
5
  import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-Cq6dJLBD.js";
6
6
  //#region src/core.ts
@@ -1,4 +1,4 @@
1
- import { n as HttpClient, r as SandboxInstance } from "./sandbox-Dw9YNtU4.js";
1
+ import { n as HttpClient, r as SandboxInstance } from "./sandbox-PrV7qtTE.js";
2
2
  import { B as CreateSandboxOptions } from "./types-C0XwJqxx.js";
3
3
 
4
4
  //#region src/tangle/abi.d.ts
package/dist/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { A as InteractiveStopCommand, B as SandboxInteractionConflict, C as InteractiveSessionHandleOptions, D as InteractiveSessionRef, E as InteractiveSessionInfo, F as InteractiveTerminalFrameLog, G as CONTROL_PLANE_MCP_SERVER_NAME, H as SandboxInteractionResult, I as InteractiveTerminalMetadata, J as SandboxMcpEndpoint, K as SANDBOX_MCP_SERVER_NAME, L as createInteractiveTerminalCapture, M as RespondToPermissionOptions, N as agentInteractiveSessionPromptRequestDigest, O as InteractiveSessionStartOptions, P as InteractiveTerminalCapture, R as createInteractiveTerminalSession, S as InteractiveSessionHandle, T as InteractiveSessionIncarnationId, U as BuildControlPlaneMcpConfigOptions, V as SandboxInteractionResolution, W as BuildSandboxMcpConfigOptions, X as buildControlPlaneMcpConfig, Y as SandboxMcpServerEntry, Z as buildSandboxMcpConfig, _ as SandboxSession, a as WorkspaceImagePublishRequestOptions, b as InteractivePromptCommand, c as TraceExportFormat, d as buildTraceExportPayload, f as exportTraceBundle, g as RawEvidenceExport, h as SandboxTaskSession, i as WorkspaceImagePublishInput, j as InterruptResult, k as InteractiveSessionStartResult, l as TraceExportResult, m as toOtelJson, o as WorkspaceImagePublishResult, p as otelTraceIdForTangleTrace, q as SandboxMcpConfig, r as SandboxInstance, s as WorkspaceImages, t as ForkAcknowledgement, u as TraceExportSink, v as AgentInteractiveTerminalSession, w as InteractiveSessionHost, x as InteractiveSessionControlClaim, y as InteractiveControlClaimRequest, z as SandboxInteractionCommandResult } from "./sandbox-Dw9YNtU4.js";
1
+ import { $ as BuildSandboxMcpConfigOptions, A as InteractiveSessionControlClaim, B as InterruptResult, C as materializeProfileFileMounts, D as AgentInteractiveTerminalSession, E as validateDeferredProfileFileMounts, F as InteractiveSessionInfo, G as InteractiveTerminalMetadata, H as agentInteractiveSessionPromptRequestDigest, I as InteractiveSessionRef, J as SandboxInteractionCommandResult, K as createInteractiveTerminalCapture, L as InteractiveSessionStartOptions, M as InteractiveSessionHandleOptions, N as InteractiveSessionHost, O as InteractiveControlClaimRequest, P as InteractiveSessionIncarnationId, Q as BuildControlPlaneMcpConfigOptions, R as InteractiveSessionStartResult, S as SplitInlineProfileSkillsResult, T as splitInlineProfileSkills, U as InteractiveTerminalCapture, V as RespondToPermissionOptions, W as InteractiveTerminalFrameLog, X as SandboxInteractionResolution, Y as SandboxInteractionConflict, Z as SandboxInteractionResult, _ as SandboxSession, a as WorkspaceImagePublishRequestOptions, at as buildControlPlaneMcpConfig, b as MaterializeProfileFileMountsResult, c as TraceExportFormat, d as buildTraceExportPayload, et as CONTROL_PLANE_MCP_SERVER_NAME, f as exportTraceBundle, g as RawEvidenceExport, h as SandboxTaskSession, i as WorkspaceImagePublishInput, it as SandboxMcpServerEntry, j as InteractiveSessionHandle, k as InteractivePromptCommand, l as TraceExportResult, m as toOtelJson, nt as SandboxMcpConfig, o as WorkspaceImagePublishResult, ot as buildSandboxMcpConfig, p as otelTraceIdForTangleTrace, q as createInteractiveTerminalSession, r as SandboxInstance, rt as SandboxMcpEndpoint, s as WorkspaceImages, t as ForkAcknowledgement, tt as SANDBOX_MCP_SERVER_NAME, u as TraceExportSink, v as ProfileFileDeliveryReport, w as splitInlineProfileFileMounts, x as SplitInlineProfileFileMountsResult, y as MaterializeProfileFileMountsOptions, z as InteractiveStopCommand } from "./sandbox-PrV7qtTE.js";
2
2
  import { $ as DownloadOptions, $a as PublicBatchRunRequest, $i as SessionMessageInputPart, $n as PublicProfileConflict, $r as SandboxFleetToken, $t as GPU_LEASE_PROVIDER_NAMES, A as CommitTaskSessionOptions, Aa as WaitForOptions, Ai as SandboxTraceBundle, An as NetworkConfig, Ar as SandboxFleetAgent, At as FileUsageOptions, B as CreateSandboxOptions, Ba as ManagedProcessResumeOptions, Bi as SendSessionMessageRequest, Bn as ProcessListOptions, Br as SandboxFleetIntelligenceEnvelope, Bt as FleetDispatchStreamOptions, C as BranchOptions, Ca as TokenRefreshHandler, Ci as SandboxStatus, Cn as ListMessagesOptions, Cr as SandboxCreateReceipt, Ct as FileReadError, Da as UploadOptions, Di as SandboxTerminalManager, Dn as MAX_EGRESS_DENIALS_LIMIT, Dr as SandboxEgressUsage, Dt as FileTreeFile, Ea as UpdateUserOptions, Ei as SandboxTerminalInfo, En as ListSandboxOptions, Er as SandboxDeleteOutcome, Et as FileSystem, F as CreateIntelligenceReportOptions, Fa as WriteManyOptions, Fi as SearchMatch, Fn as PreviewLinkInfo, Fr as SandboxFleetDispatchFailureClass, Ft as FleetAgentResult, G as DeleteMatchingSandboxesFilter, Ga as RawEvidenceArchiveManifest, Gi as SessionExecutionStatus, Gn as ProcessStatus, Gr as SandboxFleetManifest, Gt as FleetMachineId, H as CreateTaskSessionOptions, Ha as ManagedProcessState, Hi as SessionBackendCredentials, Hn as ProcessManager, Hr as SandboxFleetMachineMeteredUsage, Ht as FleetDriveTurnRequest, I as CreateRequestOptions, Ia as ManagedProcessClient, Ii as SearchOptions, In as PreviewLinkManager, Ir as SandboxFleetDispatchResponse, It as FleetAgentRunStatus, J as DeleteOptions, Ja as RawEvidenceNativeFile, Ji as SessionInfo, Jn as PromptResult, Jr as SandboxFleetParent, Jt as FleetRunEvent, K as DeleteMatchingSandboxesOptions, Ka as RawEvidenceDirectoryExport, Ki as SessionFailureReason, Kn as PromptInputPart, Kr as SandboxFleetManifestMachine, Kt as FleetPromptDispatchOptions, L as CreateSandboxFleetOptions, La as ManagedProcessJobs, Li as SecretInfo, Ln as PreviewLinkWaitOptions, Lr as SandboxFleetDriverCapability, Lt as FleetDispatchCancelResult, M as ConversationTurnOptions, Ma as WorkspaceOperationLookup, Mi as SandboxTraceExport, Mn as NonHostAgentDriverConfig, Mr as SandboxFleetArtifact, Mt as FileWriteResult, N as ConversationTurnResult, Na as WriteFileOptions, Ni as SandboxTraceOptions, Nn as PermissionLevel, Nr as SandboxFleetArtifactSpec, Nt as FleetAgentId, Oa as UploadProgress, Oi as SandboxTerminalRequestOptions, On as McpServerConfig, Or as SandboxEnvironment, Ot as FileTreeOptions, P as CreateGpuLeaseOptions, Pa as WriteManyFile, Pi as SandboxUser, Pn as PermissionsManager, Pr as SandboxFleetCostEstimate, Pt as FleetAgentPlacement, Q as DispatchedSession, Qi as SessionMessageAdmission, Qn as ProvisionStep, Qr as SandboxFleetSpend, Qt as ForkLookupOptions, Ra as ManagedProcessOptions, Ri as SecretsManager, Rn as Process, Rr as SandboxFleetDriverTimings, Rt as FleetDispatchResultBuffer, S as BatchTaskResult, Sa as TeePublicKeyResponse, Si as SandboxShapesInfo, Sr as SandboxCreateOutcome, St as FileReadBatchResult, T as ChunkedUploadResult, Ta as TurnDriveResult, Ti as SandboxTerminalCreateOptions, Tn as ListSandboxFleetOptions, Tr as SandboxDeleteOptions, Tt as FileRenameResult, U as DeleteMatchingSandboxOutcome, Ua as SandboxEnvRecovery, Ui as SessionEventStreamOptions, Un as ProcessSignal, Ur as SandboxFleetMachineRecord, Ut as FleetExecDispatchOptions, V as CreateSessionOptions, Va as ManagedProcessSpec, Vi as SentSessionMessage, Vn as ProcessLogEntry, Vr as SandboxFleetMachine, Vt as FleetDriveTurnOutcome, W as DeleteMatchingSandboxResult, Wa as SandboxEnvRecoveryView, Wi as SessionExecutionInfo, Wn as ProcessSpawnOptions, Wr as SandboxFleetMachineSpec, X as DirectoryPermission, Xa as RawEvidenceRecordsFile, Xi as SessionListOptions, Xn as ProvisionResult, Xr as SandboxFleetPolicy, Xt as ForkCounts, Y as DevServerInfo, Ya as RawEvidencePayloadFile, Yi as SessionInterruptOptions, Yn as ProvisionEvent, Yr as SandboxFleetPlacement, Yt as FleetRunOptions, Z as DispatchPromptOptions, Zi as SessionMessage, Zn as ProvisionStatus, Zr as SandboxFleetProfileRef, Zt as ForkIdempotency, _ as BatchBackend, _a as TaskSessionProfile, _i as SandboxRunGeneration, _n as IntelligenceReport, _r as RolloutTurnPart, _t as ExactProcessSpawnOptions, aa as SnapshotInfo, ai as SandboxFleetWorkspace, an as GitStatus, ao as ALL_BACKEND_TYPES, ar as ReapExpiredSandboxFleetsResult, at as DriverType, b as BatchRunRequest, ba as TeeAttestationResponse, bi as SandboxShape, bn as IntelligenceReportSubjectType, br as SandboxConfig, bt as FileInfo, c as AttachGpuLeaseOptions, ci as SandboxFleetWorkspaceSnapshotResult, cn as GpuLeaseCommandResult, cr as RenameOptions, d as BackendConfig, da as StorageConfig, di as SandboxIntelligenceEnvelope, dn as GpuLeaseManager, dr as Rollout, dt as EffectiveBackendSource, ea as SessionResultOptions, ei as SandboxFleetTraceBundle, en as GitAuth, eo as BatchBackendStats, er as PublicTemplateInfo, et as DownloadProgress, f as BackendInfo, fa as SubscriptionInfo, fi as SandboxPortBinding, fn as GpuLeaseProviderName, fr as RolloutChildResult, ft as EgressDenial, g as BackendStatus, ga as TaskSessionInfo, gi as SandboxResources, gn as InstalledTool, gr as RolloutStatus, gt as EventStreamOptions, h as BackendRuntimeConfigUpdate, ha as TaskSessionFileChange, hi as SandboxResourceUsage, hn as HostAgentRuntimeBackend, hr as RolloutStartResult, ht as EnsureDevServerOptions, ia as SnapshotIdempotency, ii as SandboxFleetUsage, in as GitDiff, io as BatchTaskUsage, ir as ReapExpiredSandboxFleetsOptions, it as DriverInfo, j as CompletedTurnResult, ja as WaitForRolloutOptions, ji as SandboxTraceEvent, jn as NetworkManager, jr as SandboxFleetAgentSpec, jt as FileUsageResult, ka as UsageInfo, ki as SandboxTerminals, kn as MkdirOptions, kr as SandboxEvent, kt as FileTreeResult, l as AttachSandboxFleetMachineOptions, la as StartupDiagnostics, li as SandboxIdentity, ln as GpuLeaseExecOptions, lt as EffectiveBackend, m as BackendMcpServerStatus, ma as TaskSessionCommitResult, mi as SandboxRemovalState, mn as HostAgentDriverConfig, mr as RolloutScorer, mt as EgressPolicy, n as AccessPolicyRule, na as SnapshotDeleteAcknowledgement, ni as SandboxFleetTraceExport, nn as GitCommit, no as BatchEventDataMap, nr as PublishPublicTemplateOptions, nt as DriveTurnOptions, oa as SnapshotOptions, oi as SandboxFleetWorkspaceReconcileResult, on as GpuLease, oo as BackendType, or as ReconcileSandboxFleetsOptions, ot as DurablePlan, p as BackendManager, pa as TaskSessionChanges, pi as SandboxPortPreviewLink, pn as GpuLeaseStatus, pr as RolloutOptions, pt as EgressManager, q as DeleteMatchingSandboxesResult, qa as RawEvidenceExportOptions, qi as SessionForkOptions, qn as PromptOptions, qr as SandboxFleetOperationsSummary, qt as FleetPromptDispatchResult, r as AddUserOptions, ra as SnapshotDeleteOutcome, ri as SandboxFleetTraceOptions, rn as GitConfig, ro as BatchSidecarGroup, rr as PublishPublicTemplateVersionOptions, rt as DriverConfig, sa as SnapshotResult, si as SandboxFleetWorkspaceRestoreResult, sn as GpuLeaseBilling, so as parseBackendType, sr as ReconcileSandboxFleetsResult, st as DurablePlanDecisionResult, t as AcceleratorKind, ta as SessionStatus, ti as SandboxFleetTraceEvent, tn as GitBranch, to as BatchEvent, tr as PublicTemplateVersionInfo, tt as DownloadResult, u as BackendCapabilities, ua as StartupOperation, ui as SandboxInfo, un as GpuLeaseExecResult, ut as EffectiveBackendProfile, v as BatchResult, va as TeeAttestationOptions, vi as SandboxRuntimeCapabilities, vn as IntelligenceReportBudget, vr as SSHCommandDescriptor, vt as ExecOptions, w as ChunkedUploadOptions, wa as TokenUsage, wi as SandboxTerminalAttachOptions, wn as ListOptions, wr as SandboxDeleteAcknowledgement, wt as FileReadResult, x as BatchTask, xa as TeePublicKey, xi as SandboxShapePreset, xn as IntelligenceReportWindow, xr as SandboxConnection, xt as FileReadBatchOptions, y as BatchRunOptions, ya as TeeAttestationReport, yi as SandboxRuntimeHealth, yn as IntelligenceReportCompareTo, yr as SSHCredentials, yt as ExecResult, z as CreateSandboxFleetWithCoordinatorOptions, za as ManagedProcessRecord, zi as SendSessionMessageOptions, zn as ProcessInfo, zr as SandboxFleetInfo, zt as FleetDispatchResultBufferOptions } from "./types-C0XwJqxx.js";
3
3
  import { c as MintScopedTokenOptions, d as TERMINAL_WS_ECHO_SUBPROTOCOL, f as TerminalExitInfo, g as TerminalStreamAuthFormat, h as TerminalReadyInfo, i as TerminalStreamOptions, l as ScopedToken, m as TerminalOutputMessage, n as TerminalStreamError, o as TerminalStreamToken, p as TerminalInteractiveSessionIdentity, r as TerminalStreamHandlers, s as MintInteractiveSessionTokenOptions, t as TerminalStream, u as ScopedTokenScope } from "./terminal-stream-CV1pMSKC.js";
4
4
  import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as interactiveSessionIdentityDigest, f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, 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-JUW3gOGH.js";
5
5
  import { a as InteractiveSessionControllerOptions, i as InteractiveSessionController, n as BrowserInteractiveSessionControllerOptions, o as InteractiveSessionControllerTransport, r as InteractiveAttachRequest, t as BrowserInteractiveSessionController } from "./interactive-controller-DNbLzamS.js";
6
6
  import { A as LineSenderVerification, B as profileChannelReference, C as LineReplyCodeInput, D as LineRole, E as LineRespondView, F as LineVoiceOptions, G as LineApplicationResult, H as LINE_APPLICATION_REQUEST_MAX_BYTES, I as LinesClient, J as parseLineApplicationRequest, K as LineApplicationState, M as LineThread, N as LineTransport, O as LineSendInput, P as LineVoice, R as SandboxLines, S as LineReplyCode, T as LineRespondAgent, U as LineApplication, V as LINE_APPLICATION_REPLY_MAX_CHARS, W as LineApplicationRequest, Y as parseLineApplicationResult, _ as LineMemberSpec, a as LineApplicationAttachOptions, b as LineProvider, c as LineAttachmentReauthorization, d as LineInstanceAttachOptions, f as LineInstanceCreate, g as LineMemberPatch, h as LineMemberInstance, i as LineAllowanceSubject, j as LineSenderVerificationStart, k as LineSendReceipt, l as LineExecutionKey, m as LineMember, n as LineAgentRolePolicy, o as LineAttachOptions, p as LineLimits, q as LineApplicationView, r as LineAllowance, s as LineAttachment, t as Line, u as LineFromConnectionInput, v as LineMessage, w as LineReplyGate, x as LineReminderPreferences, y as LineNumberInventory, z as lineInstanceKey } from "./lines-DQmR5ypP.js";
7
- import { A as BackendRegistryEntry, C as InstancesClient, D as ParsedSSEEvent, E as ParseSSEStreamOptions, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, O as parseSSEStream, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, S as InstanceStart, T as SandboxFleetClient, _ as EnsureInstanceOptions, a as Team, b as InstanceRecord, c as SessionBroadcastEvent, d as RunPlacement, f as RunPlacementRecord, g as RunsHttpClient, h as RunsClient, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, l as SessionBroadcastResult, m as RunWaitOptions, n as IntelligenceClient, o as TeamInvitation, p as RunRecord, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as RunOptions, v as HostedInstance, w as SandboxFleet, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-CO5ShEdk.js";
7
+ import { A as BackendRegistryEntry, C as InstancesClient, D as ParsedSSEEvent, E as ParseSSEStreamOptions, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, O as parseSSEStream, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, S as InstanceStart, T as SandboxFleetClient, _ as EnsureInstanceOptions, a as Team, b as InstanceRecord, c as SessionBroadcastEvent, d as RunPlacement, f as RunPlacementRecord, g as RunsHttpClient, h as RunsClient, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, l as SessionBroadcastResult, m as RunWaitOptions, n as IntelligenceClient, o as TeamInvitation, p as RunRecord, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as RunOptions, v as HostedInstance, w as SandboxFleet, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-BVZv8JbS.js";
8
8
  import { _ as StreamInterruptedError, a as FileWriteConflictError, b as ValidationError, c as NotFoundError, d as ResumeEnvRequiredError, f as SandboxError, g as StateError, h as ServerError, i as EgressProxyRecoveryError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, o as KeyBudgetExhaustedError, p as SandboxErrorJson, r as EdgeNotReadyError, s as NetworkError, t as AuthError, u as QuotaError, v as StreamInterruptionReason, y as TimeoutError } from "./errors-CRssX9qs.js";
9
9
  import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-BgmgfYZZ.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-DHuHjNie.js";
11
11
  import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-C0CsZPED.js";
12
- import { b as TangleSandboxClientConfig, h as TangleSandboxClient } from "./index-DdUzvzA_.js";
12
+ import { b as TangleSandboxClientConfig, h as TangleSandboxClient } from "./index-C8zV32IL.js";
13
13
  import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
14
- import { AgentProfile, AgentProfile as AgentProfile$1, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileConfigValue, AgentProfileConnection, AgentProfileFileMount, AgentProfileFileMount as AgentProfileFileMount$1, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePermissionValue, AgentProfilePrompt, AgentProfileResourceRef, AgentProfileResources, AgentProfileSecurityPolicy, AgentProfileValidationIssue, AgentProfileValidationResult, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, AgentSubagentProfile, Capability, SANDBOX_SIZE_PRESET_NAMES, SandboxSizePreset } from "@tangle-network/agent-interface";
14
+ import { AgentProfile, AgentProfile as AgentProfile$1, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileConfigValue, AgentProfileConnection, AgentProfileFileMount, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePermissionValue, AgentProfilePrompt, AgentProfileResourceRef, AgentProfileResources, AgentProfileSecurityPolicy, AgentProfileValidationIssue, AgentProfileValidationResult, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, AgentSubagentProfile, Capability, SANDBOX_SIZE_PRESET_NAMES, SandboxSizePreset } from "@tangle-network/agent-interface";
15
15
  import { z } from "zod";
16
16
 
17
17
  //#region src/attestation-heartbeat.d.ts
@@ -4098,79 +4098,6 @@ interface ManageGpuLeasePolicy {
4098
4098
  }
4099
4099
  declare function createManageSandboxesTool(client: Sandbox, options?: ManageSandboxesToolOptions): ManageSandboxesTool;
4100
4100
  //#endregion
4101
- //#region src/profile-file-mounts.d.ts
4102
- interface SplitInlineProfileFileMountsResult {
4103
- leanProfile: AgentProfile$1;
4104
- deferredFiles: AgentProfileFileMount$1[];
4105
- }
4106
- interface MaterializeProfileFileMountsOptions extends WriteManyOptions {
4107
- /** Recovered handles refuse to replace files with different content or modes. */
4108
- existingFiles?: "replace" | "allow-identical";
4109
- /** Hard timeout per exec fallback command. */
4110
- execTimeoutMs?: number;
4111
- /**
4112
- * Absolute sandbox paths the file API may write directly. Relative paths are
4113
- * file API eligible when safe. `~/...` resolves through the fixed agent home
4114
- * when that prefix is allowed. Other absolute paths use exec.
4115
- */
4116
- fileApiAbsolutePrefixes?: readonly string[];
4117
- }
4118
- interface MaterializeProfileFileMountsResult {
4119
- written: number;
4120
- viaFileApi: number;
4121
- viaExec: number;
4122
- /** Files delivered through {@link FileSystem.uploadData} because their
4123
- * serialized content does not fit a gateway-safe single-shot write. */
4124
- viaUpload: number;
4125
- }
4126
- /**
4127
- * The sandbox surface mount delivery uses. SandboxInstance satisfies it; the
4128
- * types come from ./types.js so this module never imports ./sandbox.js, which
4129
- * imports it.
4130
- */
4131
- type ProfileFileMountBox = {
4132
- exec(command: string, options?: ExecOptions): Promise<ExecResult>;
4133
- fs?: Pick<FileSystem, "supportsWriteMode" | "writeMany"> & {
4134
- /**
4135
- * Optional chunked-upload capability. Only required when a deferred
4136
- * inline mount's decoded content exceeds the gateway-safe single-shot
4137
- * write ceiling — {@link materializeProfileFileMounts} fails loud
4138
- * (naming the oversized mount) rather than attempting a single-shot
4139
- * write the wire would reject.
4140
- */
4141
- uploadData?: FileSystem["uploadData"];
4142
- };
4143
- };
4144
- /**
4145
- * Synchronous pre-flight validation of deferred inline mounts: the same
4146
- * content/path rules {@link materializeProfileFileMounts} enforces, runnable
4147
- * BEFORE a sandbox is provisioned. create() calls this ahead of its POST so
4148
- * client-detectable bad input (traversal paths, control characters,
4149
- * non-string content) fails without paying for a sandbox that would only be
4150
- * orphaned by the post-provision throw.
4151
- */
4152
- declare function validateDeferredProfileFileMounts(files: readonly AgentProfileFileMount$1[]): void;
4153
- interface SplitInlineProfileSkillsResult {
4154
- /** Profile with inline skill refs removed (github refs kept — they resolve
4155
- * server-side). Suitable for the create body, whose wire cap the full skill
4156
- * corpus would exceed. */
4157
- leanProfile: AgentProfile$1;
4158
- /** How many inline skill refs were stripped. Zero means nothing to defer. */
4159
- deferredSkillCount: number;
4160
- }
4161
- /**
4162
- * Split inline `resources.skills` out of a profile the way
4163
- * {@link splitInlineProfileFileMounts} splits inline files: the returned
4164
- * `leanProfile` drops them so the create POST fits its wire cap. Unlike file
4165
- * mounts, skills are NOT materialized to disk here — they are harness-specific
4166
- * (each turn's harness needs them in its own dir), so they must ride the
4167
- * per-turn profile. The full profile is delivered once (create-time priming)
4168
- * and referenced by hash thereafter.
4169
- */
4170
- declare function splitInlineProfileSkills(profile: AgentProfile$1): SplitInlineProfileSkillsResult;
4171
- declare function splitInlineProfileFileMounts(profile: AgentProfile$1): SplitInlineProfileFileMountsResult;
4172
- declare function materializeProfileFileMounts(box: ProfileFileMountBox, files: readonly AgentProfileFileMount$1[], options?: MaterializeProfileFileMountsOptions): Promise<MaterializeProfileFileMountsResult>;
4173
- //#endregion
4174
4101
  //#region src/resources.d.ts
4175
4102
  /** The concrete cpu/memory/disk for each named tier. */
4176
4103
  type SizePresetResources = Required<Pick<SandboxResources, "cpuCores" | "memoryMB" | "diskGB">>;
@@ -4471,4 +4398,4 @@ interface RouterEvalMatrixCaseResult {
4471
4398
  }
4472
4399
  declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
4473
4400
  //#endregion
4474
- export { ALL_BACKEND_TYPES, type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentInteractiveTerminalSession, 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 AgentRunCancellationAcknowledgement, type AgentRunCancellationRequest, type AgentRunOutcome, type AgentRunOutcomeTracker, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendMcpServerStatus, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, type BackendRuntimeConfigUpdate, 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, BrowserInteractiveSessionControlController, type BrowserInteractiveSessionControlControllerOptions, BrowserInteractiveSessionController, type BrowserInteractiveSessionControllerOptions, 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 ConversationTurnOptions, type ConversationTurnResult, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteMatchingSandboxOutcome, type DeleteMatchingSandboxResult, type DeleteMatchingSandboxesFilter, type DeleteMatchingSandboxesOptions, type DeleteMatchingSandboxesResult, type DeleteOptions, type DevServerInfo, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DownloadResult, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type DurablePlan, type DurablePlanDecisionResult, EdgeNotReadyError, type EffectiveBackend, type EffectiveBackendProfile, type EffectiveBackendSource, type EgressDenial, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EnsureDevServerOptions, type EnsureInstanceOptions, 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 FleetAgentId, type FleetAgentPlacement, type FleetAgentResult, type FleetAgentRunStatus, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetDriveTurnOutcome, type FleetDriveTurnRequest, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, type FleetPromptDispatchResult, type FleetRunEvent, type FleetRunOptions, type ForkAcknowledgement, type ForkCounts, type ForkIdempotency, type ForkLookupOptions, 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, HostedInstance, INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, type InstanceProfile, type InstanceRecord, InstanceRestartingError, type InstanceStart, InstancesClient, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAttachOptions, type InteractiveAttachRequest, type InteractiveControlClaimAcknowledgement, type InteractiveControlClaimOptions, type InteractiveControlClaimRequest, type InteractivePromptCommand, type InteractiveRequestOptions, type InteractiveSessionControlClaim, InteractiveSessionControlController, type InteractiveSessionControlControllerOptions, type InteractiveSessionControlTransport, InteractiveSessionController, type InteractiveSessionControllerOptions, type InteractiveSessionControllerTransport, InteractiveSessionHandle, type InteractiveSessionHandleOptions, type InteractiveSessionHost, type InteractiveSessionIdentity, type InteractiveSessionIncarnationId, type InteractiveSessionInfo, InteractiveSessionNotRunningError, type InteractiveSessionRef, type InteractiveSessionStartOptions, type InteractiveSessionStartResult, type InteractiveSessionStatus, type InteractiveStopCommand, type InteractiveTerminalCapture, InteractiveTerminalFrameLog, type InteractiveTerminalMetadata, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, KeyBudgetExhaustedError, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, type Line, type LineAgentRolePolicy, type LineAllowance, type LineAllowanceSubject, type LineApplication, type LineApplicationAttachOptions, type LineApplicationRequest, type LineApplicationResult, type LineApplicationState, type LineApplicationView, type LineAttachOptions, type LineAttachment, type LineAttachmentReauthorization, type LineExecutionKey, type LineFromConnectionInput, type LineInstanceAttachOptions, type LineInstanceCreate, type LineLimits, type LineMember, type LineMemberInstance, type LineMemberPatch, type LineMemberSpec, type LineMessage, type LineNumberInventory, type LineProvider, type LineReminderPreferences, type LineReplyCode, type LineReplyCodeInput, type LineReplyGate, type LineRespondAgent, type LineRespondView, type LineRole, type LineSendInput, type LineSendReceipt, type LineSenderVerification, type LineSenderVerificationStart, type LineThread, type LineTransport, type LineVoice, type LineVoiceOptions, LinesClient, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, MAX_EGRESS_DENIALS_LIMIT, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, ManagedProcessClient, type ManagedProcessJobs, type ManagedProcessOptions, type ManagedProcessRecord, type ManagedProcessResumeOptions, type ManagedProcessSpec, type ManagedProcessState, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintInteractiveSessionTokenOptions, 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 PublicProfileConflict, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type RawEvidenceArchiveManifest, type RawEvidenceDirectoryExport, type RawEvidenceExport, type RawEvidenceExportOptions, type RawEvidenceNativeFile, type RawEvidencePayloadFile, type RawEvidenceRecordsFile, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, ResumeEnvRequiredError, 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 RunOptions, type RunPlacement, type RunPlacementRecord, type RunRecord, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, type RunWaitOptions, RunsClient, type RunsHttpClient, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, Sandbox, type SandboxConfig, type SandboxConnection, type SandboxCreateOutcome, type SandboxCreateReceipt, type SandboxDeleteAcknowledgement, type SandboxDeleteOptions, type SandboxDeleteOutcome, type SandboxEgressUsage, type SandboxEnvRecovery, type SandboxEnvRecoveryView, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetAgent, type SandboxFleetAgentSpec, 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 SandboxFleetParent, type SandboxFleetPlacement, type SandboxFleetPolicy, type SandboxFleetProfileRef, type SandboxFleetSpend, 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 SandboxInteractionCommandResult, type SandboxInteractionConflict, type SandboxInteractionResolution, type SandboxInteractionResult, SandboxLines, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxRemovalState, type SandboxResourceUsage, type SandboxResources, type SandboxRunGeneration, type SandboxRuntimeCapabilities, type SandboxRuntimeHealth, SandboxSession, type SandboxShape, type SandboxShapePreset, type SandboxShapesInfo, 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 SessionExecutionInfo, type SessionExecutionStatus, type SessionFailureReason, type SessionForkOptions, type SessionInfo, type SessionInterruptOptions, type SessionListOptions, type SessionMessage, type SessionMessageAdmission, type SessionMessageInputPart, type SessionResultOptions, type SessionStatus, type SnapshotDeleteAcknowledgement, type SnapshotDeleteOutcome, type SnapshotIdempotency, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, StreamInterruptedError, type StreamInterruptionReason, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, 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 TerminalInteractiveSessionIdentity, type TerminalOutputMessage, 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 WorkspaceOperationLookup, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, browserInteractiveControlHolderId, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createAgentRunOutcomeTracker, createBatchResultAccumulator, createConfidentialSandbox, createInteractiveControlHolderId, createInteractiveTerminalCapture, createInteractiveTerminalSession, createManageSandboxesTool, deriveAgentResultOutcome, deriveAgentRunOutcome, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, agentInteractiveSessionPromptRequestDigest as interactivePromptRequestDigest, interactiveSessionIdentityDigest, isBackendRegistryInteractionKind, isToolBearingEvent, lineInstanceKey, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseBackendType, parseCollaborationDocumentId, parseLineApplicationRequest, parseLineApplicationResult, parseSSEStream, profileChannelReference, projectAgentTerminalRecord, requestedPublicProfileDigest, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
4401
+ export { ALL_BACKEND_TYPES, type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentInteractiveTerminalSession, 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 AgentRunCancellationAcknowledgement, type AgentRunCancellationRequest, type AgentRunOutcome, type AgentRunOutcomeTracker, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendMcpServerStatus, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, type BackendRuntimeConfigUpdate, 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, BrowserInteractiveSessionControlController, type BrowserInteractiveSessionControlControllerOptions, BrowserInteractiveSessionController, type BrowserInteractiveSessionControllerOptions, 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 ConversationTurnOptions, type ConversationTurnResult, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteMatchingSandboxOutcome, type DeleteMatchingSandboxResult, type DeleteMatchingSandboxesFilter, type DeleteMatchingSandboxesOptions, type DeleteMatchingSandboxesResult, type DeleteOptions, type DevServerInfo, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DownloadResult, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type DurablePlan, type DurablePlanDecisionResult, EdgeNotReadyError, type EffectiveBackend, type EffectiveBackendProfile, type EffectiveBackendSource, type EgressDenial, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EnsureDevServerOptions, type EnsureInstanceOptions, 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 FleetAgentId, type FleetAgentPlacement, type FleetAgentResult, type FleetAgentRunStatus, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetDriveTurnOutcome, type FleetDriveTurnRequest, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, type FleetPromptDispatchResult, type FleetRunEvent, type FleetRunOptions, type ForkAcknowledgement, type ForkCounts, type ForkIdempotency, type ForkLookupOptions, 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, HostedInstance, INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, type InstanceProfile, type InstanceRecord, InstanceRestartingError, type InstanceStart, InstancesClient, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAttachOptions, type InteractiveAttachRequest, type InteractiveControlClaimAcknowledgement, type InteractiveControlClaimOptions, type InteractiveControlClaimRequest, type InteractivePromptCommand, type InteractiveRequestOptions, type InteractiveSessionControlClaim, InteractiveSessionControlController, type InteractiveSessionControlControllerOptions, type InteractiveSessionControlTransport, InteractiveSessionController, type InteractiveSessionControllerOptions, type InteractiveSessionControllerTransport, InteractiveSessionHandle, type InteractiveSessionHandleOptions, type InteractiveSessionHost, type InteractiveSessionIdentity, type InteractiveSessionIncarnationId, type InteractiveSessionInfo, InteractiveSessionNotRunningError, type InteractiveSessionRef, type InteractiveSessionStartOptions, type InteractiveSessionStartResult, type InteractiveSessionStatus, type InteractiveStopCommand, type InteractiveTerminalCapture, InteractiveTerminalFrameLog, type InteractiveTerminalMetadata, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, KeyBudgetExhaustedError, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, type Line, type LineAgentRolePolicy, type LineAllowance, type LineAllowanceSubject, type LineApplication, type LineApplicationAttachOptions, type LineApplicationRequest, type LineApplicationResult, type LineApplicationState, type LineApplicationView, type LineAttachOptions, type LineAttachment, type LineAttachmentReauthorization, type LineExecutionKey, type LineFromConnectionInput, type LineInstanceAttachOptions, type LineInstanceCreate, type LineLimits, type LineMember, type LineMemberInstance, type LineMemberPatch, type LineMemberSpec, type LineMessage, type LineNumberInventory, type LineProvider, type LineReminderPreferences, type LineReplyCode, type LineReplyCodeInput, type LineReplyGate, type LineRespondAgent, type LineRespondView, type LineRole, type LineSendInput, type LineSendReceipt, type LineSenderVerification, type LineSenderVerificationStart, type LineThread, type LineTransport, type LineVoice, type LineVoiceOptions, LinesClient, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, MAX_EGRESS_DENIALS_LIMIT, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, ManagedProcessClient, type ManagedProcessJobs, type ManagedProcessOptions, type ManagedProcessRecord, type ManagedProcessResumeOptions, type ManagedProcessSpec, type ManagedProcessState, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintInteractiveSessionTokenOptions, 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 ProfileFileDeliveryReport, type PromptInputPart, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicProfileConflict, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type RawEvidenceArchiveManifest, type RawEvidenceDirectoryExport, type RawEvidenceExport, type RawEvidenceExportOptions, type RawEvidenceNativeFile, type RawEvidencePayloadFile, type RawEvidenceRecordsFile, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, ResumeEnvRequiredError, 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 RunOptions, type RunPlacement, type RunPlacementRecord, type RunRecord, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, type RunWaitOptions, RunsClient, type RunsHttpClient, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, Sandbox, type SandboxConfig, type SandboxConnection, type SandboxCreateOutcome, type SandboxCreateReceipt, type SandboxDeleteAcknowledgement, type SandboxDeleteOptions, type SandboxDeleteOutcome, type SandboxEgressUsage, type SandboxEnvRecovery, type SandboxEnvRecoveryView, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetAgent, type SandboxFleetAgentSpec, 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 SandboxFleetParent, type SandboxFleetPlacement, type SandboxFleetPolicy, type SandboxFleetProfileRef, type SandboxFleetSpend, 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 SandboxInteractionCommandResult, type SandboxInteractionConflict, type SandboxInteractionResolution, type SandboxInteractionResult, SandboxLines, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxRemovalState, type SandboxResourceUsage, type SandboxResources, type SandboxRunGeneration, type SandboxRuntimeCapabilities, type SandboxRuntimeHealth, SandboxSession, type SandboxShape, type SandboxShapePreset, type SandboxShapesInfo, 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 SessionExecutionInfo, type SessionExecutionStatus, type SessionFailureReason, type SessionForkOptions, type SessionInfo, type SessionInterruptOptions, type SessionListOptions, type SessionMessage, type SessionMessageAdmission, type SessionMessageInputPart, type SessionResultOptions, type SessionStatus, type SnapshotDeleteAcknowledgement, type SnapshotDeleteOutcome, type SnapshotIdempotency, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, StreamInterruptedError, type StreamInterruptionReason, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, 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 TerminalInteractiveSessionIdentity, type TerminalOutputMessage, 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 WorkspaceOperationLookup, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, browserInteractiveControlHolderId, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createAgentRunOutcomeTracker, createBatchResultAccumulator, createConfidentialSandbox, createInteractiveControlHolderId, createInteractiveTerminalCapture, createInteractiveTerminalSession, createManageSandboxesTool, deriveAgentResultOutcome, deriveAgentRunOutcome, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, agentInteractiveSessionPromptRequestDigest as interactivePromptRequestDigest, interactiveSessionIdentityDigest, isBackendRegistryInteractionKind, isToolBearingEvent, lineInstanceKey, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseBackendType, parseCollaborationDocumentId, parseLineApplicationRequest, parseLineApplicationResult, parseSSEStream, profileChannelReference, projectAgentTerminalRecord, requestedPublicProfileDigest, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { i as parseBackendType, r as backendTypeSchema, t as ALL_BACKEND_TYPES } from "./backend-types-C7b_Gpa0.js";
2
2
  import { A as requestedPublicProfileDigest, F as deriveAgentResultOutcome, I as deriveAgentRunOutcome, L as projectAgentTerminalRecord, P as createAgentRunOutcomeTracker, a as TERMINAL_WS_ECHO_SUBPROTOCOL, i as TerminalStreamError, k as normalizeRuntimeBackendConfig, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, w as parseSSEStream } from "./interactive-controller-Dxt5sW2N.js";
3
3
  import { _ as TimeoutError, a as FileWriteConflictError, c as NetworkError, d as QuotaError, f as ResumeEnvRequiredError, g as StreamInterruptedError, h as StateError, i as EgressProxyRecoveryError, l as NotFoundError, m as ServerError, n as CapabilityError, o as KeyBudgetExhaustedError, p as SandboxError, r as EdgeNotReadyError, t as AuthError, u as PartialFailureError, v as ValidationError } from "./errors-Cq4hMysQ.js";
4
- import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, r as RunsClient, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-B8OutXq2.js";
4
+ import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, r as RunsClient, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-CGbGnrBO.js";
5
5
  import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as createInteractiveControlHolderId, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-BJf0P_J4.js";
6
- import { A as exportTraceBundle, C as splitInlineProfileFileMounts, M as toOtelJson, S as materializeProfileFileMounts, T as validateDeferredProfileFileMounts, _ as collectAgentFinalMessageText, b as isToolBearingEvent, c as MAX_EGRESS_DENIALS_LIMIT, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as applySandboxEventText, h as createInteractiveTerminalSession, j as otelTraceIdForTangleTrace, k as buildTraceExportPayload, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as WorkspaceImages, p as InteractiveTerminalFrameLog, s as GPU_LEASE_PROVIDER_NAMES, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as splitInlineProfileSkills, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-CfGVI_xk.js";
6
+ import { A as exportTraceBundle, C as splitInlineProfileFileMounts, M as toOtelJson, S as materializeProfileFileMounts, T as validateDeferredProfileFileMounts, _ as collectAgentFinalMessageText, b as isToolBearingEvent, c as MAX_EGRESS_DENIALS_LIMIT, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as applySandboxEventText, h as createInteractiveTerminalSession, j as otelTraceIdForTangleTrace, k as buildTraceExportPayload, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as WorkspaceImages, p as InteractiveTerminalFrameLog, s as GPU_LEASE_PROVIDER_NAMES, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as splitInlineProfileSkills, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-uwsfBoYj.js";
7
7
  import { LinesClient, SandboxLines, lineInstanceKey, profileChannelReference } from "./lines.js";
8
8
  import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DaWEv29D.js";
9
9
  import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-Cq6dJLBD.js";
10
- import { s as TangleSandboxClient } from "./tangle-Dt4FMrZs.js";
10
+ import { s as TangleSandboxClient } from "./tangle-B06VSOdG.js";
11
11
  import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
12
12
  import { z } from "zod";
13
13
  //#region src/confidential.ts
@@ -1,6 +1,6 @@
1
- import { r as SandboxInstance } from "./sandbox-Dw9YNtU4.js";
1
+ import { r as SandboxInstance } from "./sandbox-PrV7qtTE.js";
2
2
  import { Fn as PreviewLinkInfo, ht as EnsureDevServerOptions } from "./types-C0XwJqxx.js";
3
- import { i as Sandbox } from "./client-CO5ShEdk.js";
3
+ import { i as Sandbox } from "./client-BVZv8JbS.js";
4
4
 
5
5
  //#region src/agent/preview-operations.d.ts
6
6
  type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
@@ -4,7 +4,7 @@ import { a as TerminalStreamReconnectAuthority, c as MintScopedTokenOptions, h a
4
4
  import { f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-JUW3gOGH.js";
5
5
  import { r as InteractiveAttachRequest } from "./interactive-controller-DNbLzamS.js";
6
6
  import { R as SandboxLines } from "./lines-DQmR5ypP.js";
7
- import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentProfile, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
7
+ import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentProfile, AgentProfileFileMount, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
8
8
  import { z } from "zod";
9
9
 
10
10
  //#region src/mcp.d.ts
@@ -332,6 +332,103 @@ declare class InteractiveSessionHandle {
332
332
  stopLifecycle(options?: InteractiveRequestOptions): Promise<AgentInteractiveSessionStopAcknowledgement>;
333
333
  }
334
334
  //#endregion
335
+ //#region src/profile-file-mounts.d.ts
336
+ interface SplitInlineProfileFileMountsResult {
337
+ leanProfile: AgentProfile;
338
+ deferredFiles: AgentProfileFileMount[];
339
+ }
340
+ interface MaterializeProfileFileMountsOptions extends WriteManyOptions {
341
+ /** Recovered handles refuse to replace files with different content or modes. */
342
+ existingFiles?: "replace" | "allow-identical";
343
+ /** Hard timeout per exec fallback command. */
344
+ execTimeoutMs?: number;
345
+ /**
346
+ * Absolute sandbox paths the file API may write directly. Relative paths are
347
+ * file API eligible when safe. `~/...` resolves through the fixed agent home
348
+ * when that prefix is allowed. Other absolute paths use exec.
349
+ */
350
+ fileApiAbsolutePrefixes?: readonly string[];
351
+ }
352
+ interface MaterializeProfileFileMountsResult {
353
+ written: number;
354
+ viaFileApi: number;
355
+ viaExec: number;
356
+ /** Files delivered through {@link FileSystem.uploadData} because their
357
+ * serialized content does not fit a gateway-safe single-shot write. */
358
+ viaUpload: number;
359
+ }
360
+ /**
361
+ * The sandbox surface mount delivery uses. SandboxInstance satisfies it; the
362
+ * types come from ./types.js so this module never imports ./sandbox.js, which
363
+ * imports it.
364
+ */
365
+ type ProfileFileMountBox = {
366
+ exec(command: string, options?: ExecOptions): Promise<ExecResult>;
367
+ fs?: Pick<FileSystem, "supportsWriteMode" | "writeMany"> & {
368
+ /**
369
+ * Optional chunked-upload capability. Only required when a deferred
370
+ * inline mount's decoded content exceeds the gateway-safe single-shot
371
+ * write ceiling — {@link materializeProfileFileMounts} fails loud
372
+ * (naming the oversized mount) rather than attempting a single-shot
373
+ * write the wire would reject.
374
+ */
375
+ uploadData?: FileSystem["uploadData"];
376
+ };
377
+ /**
378
+ * Optional box runtime HTTP transport — the same fetch `/agents/profiles`
379
+ * rides. Backs the profile-bundle cache claim/publish protocol; a box
380
+ * without it (foreign implementations, tests) always takes the legacy
381
+ * staged path and never claims or publishes.
382
+ */
383
+ runtimeFetch?: (endpoint: string, init?: RequestInit) => Promise<Response>;
384
+ };
385
+ /**
386
+ * Synchronous pre-flight validation of deferred inline mounts: the same
387
+ * content/path rules {@link materializeProfileFileMounts} enforces, runnable
388
+ * BEFORE a sandbox is provisioned. create() calls this ahead of its POST so
389
+ * client-detectable bad input (traversal paths, control characters,
390
+ * non-string content) fails without paying for a sandbox that would only be
391
+ * orphaned by the post-provision throw.
392
+ */
393
+ declare function validateDeferredProfileFileMounts(files: readonly AgentProfileFileMount[]): void;
394
+ interface SplitInlineProfileSkillsResult {
395
+ /** Profile with inline skill refs removed (github refs kept — they resolve
396
+ * server-side). Suitable for the create body, whose wire cap the full skill
397
+ * corpus would exceed. */
398
+ leanProfile: AgentProfile;
399
+ /** How many inline skill refs were stripped. Zero means nothing to defer. */
400
+ deferredSkillCount: number;
401
+ }
402
+ /**
403
+ * Split inline `resources.skills` out of a profile the way
404
+ * {@link splitInlineProfileFileMounts} splits inline files: the returned
405
+ * `leanProfile` drops them so the create POST fits its wire cap. Unlike file
406
+ * mounts, skills are NOT materialized to disk here — they are harness-specific
407
+ * (each turn's harness needs them in its own dir), so they must ride the
408
+ * per-turn profile. The full profile is delivered once (create-time priming)
409
+ * and referenced by hash thereafter.
410
+ */
411
+ declare function splitInlineProfileSkills(profile: AgentProfile): SplitInlineProfileSkillsResult;
412
+ declare function splitInlineProfileFileMounts(profile: AgentProfile): SplitInlineProfileFileMountsResult;
413
+ declare function materializeProfileFileMounts(box: ProfileFileMountBox, files: readonly AgentProfileFileMount[], options?: MaterializeProfileFileMountsOptions): Promise<MaterializeProfileFileMountsResult>;
414
+ //#endregion
415
+ //#region src/profile-file-delivery.d.ts
416
+ /**
417
+ * How the last successful profile file preparation was satisfied, so a caller
418
+ * can report the cost of the prepare phase per turn:
419
+ * - `receipt`: this handle already delivered the bundle to this incarnation;
420
+ * - `hit`: the host cache linked every file in-box;
421
+ * - `partial`: the cache linked some files and the rest were delivered;
422
+ * - `miss`: every file was delivered, then published to the host cache;
423
+ * - `legacy`: the box has no cache API, so every file was delivered.
424
+ */
425
+ interface ProfileFileDeliveryReport {
426
+ outcome: "receipt" | "hit" | "partial" | "miss" | "legacy";
427
+ files: number;
428
+ deliveredFiles: number;
429
+ durationMs: number;
430
+ }
431
+ //#endregion
335
432
  //#region src/session.d.ts
336
433
  type RawEvidenceAttempt = {
337
434
  executionId: string;
@@ -1119,6 +1216,12 @@ declare class SandboxInstance {
1119
1216
  * object passed as a per-turn override — is compared correctly: unchanged
1120
1217
  * content references by hash, changed content sends inline.
1121
1218
  */
1219
+ /**
1220
+ * How this handle's most recent profile file preparation was satisfied
1221
+ * (host cache hit, partial, miss, legacy delivery, or a held receipt) and
1222
+ * how long it took. Undefined until a profile with file mounts is prepared.
1223
+ */
1224
+ get lastProfileFileDelivery(): ProfileFileDeliveryReport | undefined;
1122
1225
  /** @internal Shared create/turn delivery; caller policy decides how to expose failures. */
1123
1226
  materializeProfileFiles(profile: AgentProfile, signal?: AbortSignal, existingFiles?: "replace" | "allow-identical"): Promise<AgentProfile>;
1124
1227
  private buildRunBackendBody;
@@ -1875,7 +1978,15 @@ declare class SandboxInstance {
1875
1978
  private ensureRunning;
1876
1979
  private ensureRunningForPrompt;
1877
1980
  private assertFilesystemIncarnationReady;
1878
- private runtimeFetch;
1981
+ /**
1982
+ * One authenticated runtime HTTP call for this sandbox, relative endpoint
1983
+ * (`/agents/...`), scoped to the current filesystem incarnation. This is
1984
+ * the transport `/agents/profiles` rides and the box surface mount
1985
+ * delivery uses for profile-bundle cache claim/publish.
1986
+ */
1987
+ runtimeFetch(path: string, options?: RequestInit, fetchOptions?: {
1988
+ timeoutMs?: number;
1989
+ }): Promise<Response>;
1879
1990
  /**
1880
1991
  * Delegates to the shared `parseSSEStream` in `lib/sse-parser.ts`
1881
1992
  * — one canonical SSE implementation for the whole SDK. The
@@ -2179,4 +2290,4 @@ declare class SandboxInstance {
2179
2290
  }): Promise<DurablePlanDecisionResult>;
2180
2291
  }
2181
2292
  //#endregion
2182
- export { InteractiveStopCommand as A, SandboxInteractionConflict as B, InteractiveSessionHandleOptions as C, InteractiveSessionRef as D, InteractiveSessionInfo as E, InteractiveTerminalFrameLog as F, CONTROL_PLANE_MCP_SERVER_NAME as G, SandboxInteractionResult as H, InteractiveTerminalMetadata as I, SandboxMcpEndpoint as J, SANDBOX_MCP_SERVER_NAME as K, createInteractiveTerminalCapture as L, RespondToPermissionOptions as M, agentInteractiveSessionPromptRequestDigest as N, InteractiveSessionStartOptions as O, InteractiveTerminalCapture as P, createInteractiveTerminalSession as R, InteractiveSessionHandle as S, InteractiveSessionIncarnationId as T, BuildControlPlaneMcpConfigOptions as U, SandboxInteractionResolution as V, BuildSandboxMcpConfigOptions as W, buildControlPlaneMcpConfig as X, SandboxMcpServerEntry as Y, buildSandboxMcpConfig as Z, SandboxSession as _, WorkspaceImagePublishRequestOptions as a, InteractivePromptCommand as b, TraceExportFormat as c, buildTraceExportPayload as d, exportTraceBundle as f, RawEvidenceExport as g, SandboxTaskSession as h, WorkspaceImagePublishInput as i, InterruptResult as j, InteractiveSessionStartResult as k, TraceExportResult as l, toOtelJson as m, HttpClient as n, WorkspaceImagePublishResult as o, otelTraceIdForTangleTrace as p, SandboxMcpConfig as q, SandboxInstance as r, WorkspaceImages as s, ForkAcknowledgement as t, TraceExportSink as u, AgentInteractiveTerminalSession$1 as v, InteractiveSessionHost as w, InteractiveSessionControlClaim as x, InteractiveControlClaimRequest as y, SandboxInteractionCommandResult as z };
2293
+ export { BuildSandboxMcpConfigOptions as $, InteractiveSessionControlClaim as A, InterruptResult as B, materializeProfileFileMounts as C, AgentInteractiveTerminalSession$1 as D, validateDeferredProfileFileMounts as E, InteractiveSessionInfo as F, InteractiveTerminalMetadata as G, agentInteractiveSessionPromptRequestDigest as H, InteractiveSessionRef as I, SandboxInteractionCommandResult as J, createInteractiveTerminalCapture as K, InteractiveSessionStartOptions as L, InteractiveSessionHandleOptions as M, InteractiveSessionHost as N, InteractiveControlClaimRequest as O, InteractiveSessionIncarnationId as P, BuildControlPlaneMcpConfigOptions as Q, InteractiveSessionStartResult as R, SplitInlineProfileSkillsResult as S, splitInlineProfileSkills as T, InteractiveTerminalCapture as U, RespondToPermissionOptions as V, InteractiveTerminalFrameLog as W, SandboxInteractionResolution as X, SandboxInteractionConflict as Y, SandboxInteractionResult as Z, SandboxSession as _, WorkspaceImagePublishRequestOptions as a, buildControlPlaneMcpConfig as at, MaterializeProfileFileMountsResult as b, TraceExportFormat as c, buildTraceExportPayload as d, CONTROL_PLANE_MCP_SERVER_NAME as et, exportTraceBundle as f, RawEvidenceExport as g, SandboxTaskSession as h, WorkspaceImagePublishInput as i, SandboxMcpServerEntry as it, InteractiveSessionHandle as j, InteractivePromptCommand as k, TraceExportResult as l, toOtelJson as m, HttpClient as n, SandboxMcpConfig as nt, WorkspaceImagePublishResult as o, buildSandboxMcpConfig as ot, otelTraceIdForTangleTrace as p, createInteractiveTerminalSession as q, SandboxInstance as r, SandboxMcpEndpoint as rt, WorkspaceImages as s, ForkAcknowledgement as t, SANDBOX_MCP_SERVER_NAME as tt, TraceExportSink as u, ProfileFileDeliveryReport as v, splitInlineProfileFileMounts as w, SplitInlineProfileFileMountsResult as x, MaterializeProfileFileMountsOptions as y, InteractiveStopCommand as z };
@@ -9,6 +9,10 @@ import { AgentExactRunControlRefSchema, AgentInteractiveSessionAttachSchema, Age
9
9
  import { z } from "zod";
10
10
  import { AgentInteractiveSessionControlClaimSchema as AgentInteractiveSessionControlClaimSchema$1, AgentInteractiveSessionPromptAcknowledgementSchema as AgentInteractiveSessionPromptAcknowledgementSchema$1, AgentInteractiveSessionRefSchema as AgentInteractiveSessionRefSchema$1, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema as AgentInteractiveSessionStopAcknowledgementSchema$1 } from "@tangle-network/agent-interface/environment-interactive-control";
11
11
  import { readTokenCostUsd, readTokenUsage } from "@tangle-network/agent-core";
12
+ import { createHash } from "node:crypto";
13
+ import { constants } from "node:fs";
14
+ import "node:path";
15
+ import "node:fs/promises";
12
16
  //#region src/trace-exporter.ts
13
17
  function buildTraceExportPayload(bundle, format = "tangle", serviceName = "tangle-sandbox") {
14
18
  if (format === "tangle") return bundle;
@@ -327,7 +331,7 @@ const UNDECIDED_WRITE_STATUSES = new Set([
327
331
  504
328
332
  ]);
329
333
  const PROFILE_FILE_MOUNT_PACE_MS = 0;
330
- const PROFILE_BIN_DIR_RE = /(^|\/)(s?bin)\//;
334
+ const PROFILE_BIN_DIR_RE$1 = /(^|\/)(s?bin)\//;
331
335
  const PROFILE_AGENT_HOME = ["/home", "agent"].join("/");
332
336
  /**
333
337
  * Wire budget for a single-shot `POST /files/write` of a mount.
@@ -476,8 +480,27 @@ function fileApiTarget(mount, absolutePrefixes) {
476
480
  if (mount.path.length === 0) return null;
477
481
  return mount.path;
478
482
  }
483
+ /**
484
+ * The delivery target exactly as the staged manifest's `path` computes it:
485
+ * the file-API target when the box exposes writeMany, else the mount path.
486
+ * The publish manifest's `target` must match this byte-for-byte — the host
487
+ * re-admits delivered bundles by reading the bytes at these paths.
488
+ */
489
+ function profileFileDeliveryTarget(box, mount) {
490
+ return stagedProfileFileTarget(box, mount, DEFAULT_PROFILE_FILE_API_ABSOLUTE_PREFIXES);
491
+ }
492
+ function stagedProfileFileTarget(box, mount, absolutePrefixes) {
493
+ return typeof box.fs?.writeMany === "function" ? fileApiTarget(mount, absolutePrefixes) ?? mount.path : mount.path;
494
+ }
495
+ /**
496
+ * The exact content bytes of an inline mount — the bytes the staged
497
+ * manifest's sha256 covers and the bundle manifest's `sizeBytes` sums.
498
+ */
499
+ function inlineProfileFileContent(mount) {
500
+ return inlineContent(mount);
501
+ }
479
502
  function isExecutableProfileFile(mount) {
480
- return mount.executable ?? PROFILE_BIN_DIR_RE.test(mount.path);
503
+ return mount.executable ?? PROFILE_BIN_DIR_RE$1.test(mount.path);
481
504
  }
482
505
  function profileFileMode(mount) {
483
506
  return isExecutableProfileFile(mount) ? 493 : void 0;
@@ -808,7 +831,8 @@ async function materializeAbsentProfileFiles(box, files, options) {
808
831
  const stage = `.sandbox-profile-${globalThis.crypto.randomUUID()}`;
809
832
  const absolutePrefixes = normalizeAbsolutePrefixes(options.fileApiAbsolutePrefixes ?? DEFAULT_PROFILE_FILE_API_ABSOLUTE_PREFIXES);
810
833
  const manifest = await Promise.all(files.map(async (mount) => ({
811
- path: typeof box.fs?.writeMany === "function" ? fileApiTarget(mount, absolutePrefixes) ?? mount.path : mount.path,
834
+ path: stagedProfileFileTarget(box, mount, absolutePrefixes),
835
+ mountPath: mount.path,
812
836
  sha256: await sha256Hex(inlineContent(mount)),
813
837
  mode: profileFileMode(mount) ?? 420
814
838
  })));
@@ -2050,35 +2074,367 @@ function waitForReconnect(ms, signal) {
2050
2074
  signal?.addEventListener("abort", onAbort, { once: true });
2051
2075
  });
2052
2076
  }
2077
+ const CODEX_SYSTEM_PROMPT_FILE = ".codex/system-prompt.md";
2078
+ const OPENCODE_APPEND_SYSTEM_PROMPT_FILE = ".opencode/agent-system-prompt.md";
2079
+ const OPENCODE_CONFIG_FILE = "opencode.json";
2080
+ /** Project context file each harness actually reads from cwd. NEVER a constant. */
2081
+ const CONTEXT_FILE = {
2082
+ "claude-code": "CLAUDE.md",
2083
+ nanoclaw: "CLAUDE.md",
2084
+ codex: "AGENTS.md",
2085
+ opencode: ".opencode/profile-instructions.md",
2086
+ "kimi-code": "AGENTS.md",
2087
+ pi: "AGENTS.md",
2088
+ prime: "AGENTS.md",
2089
+ gemini: "GEMINI.md",
2090
+ hermes: "HERMES.md",
2091
+ openclaw: "AGENTS.md"
2092
+ };
2093
+ /**
2094
+ * The paths a profile resource may never mount.
2095
+ *
2096
+ * Codex names no system-prompt file of its own — `model_instructions_file`
2097
+ * takes whatever path it is given — and opencode names none either, since it
2098
+ * reads exactly the files its config lists. All three names below were chosen
2099
+ * here, so a file already at one of them is this materializer's own output from
2100
+ * an earlier application into the same workspace, and a mount there could not
2101
+ * survive the next application.
2102
+ *
2103
+ * That is an inference from the path name, not verified provenance: nothing
2104
+ * checks the existing bytes are prior materializer output, so a workspace that
2105
+ * carried a foreign file at one of these invented names is overwritten on the
2106
+ * first application. Accepted cost of stateless multi-turn re-application,
2107
+ * bounded by the names being ones no harness or user convention uses.
2108
+ */
2109
+ const MATERIALIZER_RESERVED_PATHS = new Set([
2110
+ CODEX_SYSTEM_PROMPT_FILE,
2111
+ OPENCODE_APPEND_SYSTEM_PROMPT_FILE,
2112
+ CONTEXT_FILE.opencode
2113
+ ]);
2114
+ /** Every path any harness reads as its project context file. */
2115
+ const CONTEXT_FILE_PATHS = new Set(Object.values(CONTEXT_FILE));
2116
+ /**
2117
+ * The context files this package owns by MARKER rather than by name:
2118
+ * `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `HERMES.md`.
2119
+ *
2120
+ * Each is a documented name a repository can already carry, so the name proves
2121
+ * nothing. A generated one carries the line {@link markMaterializerContextFile}
2122
+ * writes, and only that line lets the next materialization replace it.
2123
+ *
2124
+ * opencode's context file is absent because it is a RESERVED name this package
2125
+ * invented, already owned by the name alone.
2126
+ */
2127
+ const MATERIALIZER_CONTEXT_PATHS = new Set([...CONTEXT_FILE_PATHS].filter((path) => !MATERIALIZER_RESERVED_PATHS.has(path)));
2128
+ new Set([
2129
+ ...MATERIALIZER_RESERVED_PATHS,
2130
+ ...MATERIALIZER_CONTEXT_PATHS,
2131
+ OPENCODE_CONFIG_FILE
2132
+ ]);
2133
+ /** The one provenance token every generated-file marker carries. */
2134
+ const MATERIALIZER_MARKER = "tangle-agent-profile-materialize: generated";
2135
+ `${MATERIALIZER_MARKER}`;
2136
+ const MATERIALIZER_CONTEXT_MARKER_NOTE = "do not edit; the next profile materialization replaces this file";
2137
+ `${MATERIALIZER_MARKER}`;
2138
+ `${MATERIALIZER_CONTEXT_MARKER_NOTE}`;
2139
+ //#endregion
2140
+ //#region ../../../packages/agent-profile-materialize/dist/workspace-files.js
2141
+ const compareStrings = (a, b) => a < b ? -1 : a > b ? 1 : 0;
2142
+ constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | (typeof constants.O_NOFOLLOW === "number" ? constants.O_NOFOLLOW : 0);
2143
+ //#endregion
2144
+ //#region ../../../packages/agent-profile-materialize/dist/plan-types.js
2145
+ /**
2146
+ * The subset of {@link BINDABLE_LAUNCH_CONTROLS} the plan HANDS OVER rather than
2147
+ * executes: controls a caller reaches only by composing the harness's own
2148
+ * configuration, so no file, flag or env var the plan writes can touch them.
2149
+ *
2150
+ * - `opencode.agent-prompt` — opencode's `agent.<name>.prompt` config field,
2151
+ * the one control that replaces its built-in provider prompt. It binds to a
2152
+ * SINGLE agent, and the agent is chosen at launch. A caller that builds
2153
+ * opencode's config itself and picks the agent there reads neither
2154
+ * `plan.files` nor `plan.flags`, so for that one the plan names the control
2155
+ * and hands over the text in {@link WorkspacePlan.systemPromptBinding}.
2156
+ *
2157
+ * Every other bindable control names a capability the plan still lowers itself
2158
+ * once the caller has declared the plan's launch inputs really reach the spawn.
2159
+ */
2160
+ const EXECUTOR_SYSTEM_PROMPT_BINDINGS = ["opencode.agent-prompt"];
2161
+ new Set(EXECUTOR_SYSTEM_PROMPT_BINDINGS);
2162
+ /**
2163
+ * Launcher controls an executor can declare it OWNS via `materializeProfile`'s
2164
+ * `binds` option.
2165
+ *
2166
+ * Some harness controls live outside any workspace: opencode's exact
2167
+ * system-prompt replacement (`agent.<name>.prompt`) binds to the ONE agent
2168
+ * whoever starts the process selects, which a plan-forwarding executor cannot
2169
+ * guarantee — so the plan refuses the intent (harnessSystemPromptIntents in
2170
+ * @tangle-network/agent-interface answers `replace: false` for opencode).
2171
+ *
2172
+ * The two declarations describe the two executor shapes that CAN reach it, and
2173
+ * each gets the lowering it can actually apply:
2174
+ *
2175
+ * - `systemPrompt` — the executor applies the plan's launch flags to the
2176
+ * spawn it owns, so the plan writes the generated `mode: primary` agent and
2177
+ * selects it with `--agent`.
2178
+ * - `opencode.agent-prompt` — the executor composes opencode's own config and
2179
+ * picks the agent there, reading neither plan files nor plan flags, so the
2180
+ * plan hands the text over in {@link WorkspacePlan.systemPromptBinding}
2181
+ * instead of writing a workspace agent that would never be selected.
2182
+ *
2183
+ * They are mutually exclusive claims about the same caller: declaring both is a
2184
+ * caller bug, not a broader capability.
2185
+ */
2186
+ const BINDABLE_LAUNCH_CONTROLS = ["systemPrompt", ...EXECUTOR_SYSTEM_PROMPT_BINDINGS];
2187
+ new Set(BINDABLE_LAUNCH_CONTROLS);
2188
+ new TextDecoder("utf-8", {
2189
+ fatal: true,
2190
+ ignoreBOM: true
2191
+ });
2192
+ //#endregion
2193
+ //#region ../../../packages/agent-profile-materialize/dist/resource-resolution.js
2194
+ function describeUnresolvedRef(r) {
2195
+ const name = typeof r.name === "string" ? r.name : void 0;
2196
+ const path = typeof r.path === "string" ? r.path : void 0;
2197
+ if (name && path) return `"${name}" (${path})`;
2198
+ if (name) return `"${name}"`;
2199
+ if (path) return `"${path}"`;
2200
+ return "resource";
2201
+ }
2202
+ /** Resolve inline bytes already present on the profile. Remote resources must
2203
+ * be resolved by {@link resolveAgentProfileResources} before materialization.
2204
+ *
2205
+ * FAIL-CLOSED: a ref that declares `kind: "inline"` is asserting its bytes are
2206
+ * already resolved, so missing/non-string `content` is a caller bug, not an
2207
+ * empty file — silently coercing it (`String(content ?? "")`) would produce a
2208
+ * file that "looks provisioned, loads nothing", exactly the trap this module's
2209
+ * docstring warns against. */
2210
+ function resolveInlineRef(ref) {
2211
+ const r = ref;
2212
+ if (typeof r.content === "string") return {
2213
+ name: String(r.name ?? r.path ?? "resource"),
2214
+ content: r.content
2215
+ };
2216
+ if (r.kind === "inline") throw new Error(`Profile resource ${describeUnresolvedRef(r)} declares kind "inline" but has no string content`);
2217
+ return null;
2218
+ }
2219
+ Object.freeze({ async get() {} });
2220
+ //#endregion
2221
+ //#region ../../../packages/agent-profile-materialize/dist/profile-bundle-key.js
2222
+ const PROFILE_BUNDLE_SCHEMA = "agent-profile-bundle/v1";
2223
+ const PROFILE_BIN_DIR_RE = /(^|\/)(s?bin)\//;
2224
+ /**
2225
+ * Derive the canonical bundle file entry for one inline mount. The sha256 is
2226
+ * computed over the exact inline content bytes and the mode mirrors the SDK's
2227
+ * `profileFileMode`/`isExecutableProfileFile`: `mount.executable` wins when
2228
+ * present, otherwise a path under a `bin/` or `sbin/` directory is executable.
2229
+ * A mount whose resource is not inline is a caller bug and throws, matching
2230
+ * the fail-closed discipline of {@link resolveInlineRef}.
2231
+ */
2232
+ function profileBundleFileEntry(mount) {
2233
+ const resolved = resolveInlineRef(mount.resource);
2234
+ if (resolved === null) throw new Error(`profileBundleFileEntry: ${mount.path} requires an inline resource`);
2235
+ const executable = mount.executable ?? PROFILE_BIN_DIR_RE.test(mount.path);
2236
+ return {
2237
+ mountPath: mount.path,
2238
+ sha256: createHash("sha256").update(resolved.content, "utf8").digest("hex"),
2239
+ mode: executable ? 493 : 420
2240
+ };
2241
+ }
2242
+ /**
2243
+ * The canonical file table: one entry per mount, sorted by (mountPath, sha256)
2244
+ * so any array order of the same mounts produces the same table.
2245
+ */
2246
+ function profileBundleFileTable(mounts) {
2247
+ return mounts.map(profileBundleFileEntry).sort((left, right) => left.mountPath !== right.mountPath ? compareStrings(left.mountPath, right.mountPath) : compareStrings(left.sha256, right.sha256));
2248
+ }
2249
+ /**
2250
+ * The content-addressed bundle key. The digest covers EXACTLY the schema
2251
+ * version and, per file, the logical mount path, the sha256 of the content
2252
+ * bytes, and the full file mode — the same image-content-hash discipline as
2253
+ * scripts/ci/image-content-hash.mjs: hash exactly the inputs that determine
2254
+ * the cached bytes (and their placement semantics), nothing more. Any profile
2255
+ * change — content, path, or mode — produces a new key; anything else
2256
+ * (mount order, transport-only target paths, timestamps) does not.
2257
+ */
2258
+ function profileFileBundleKey(mounts) {
2259
+ return canonicalCandidateDigest({
2260
+ schema: PROFILE_BUNDLE_SCHEMA,
2261
+ files: profileBundleFileTable(mounts)
2262
+ });
2263
+ }
2053
2264
  //#endregion
2054
2265
  //#region src/profile-file-delivery.ts
2266
+ const PROFILE_BUNDLE_CLAIM_ENDPOINT = "/agents/profile-bundle/claim";
2267
+ const PROFILE_BUNDLE_PUBLISH_ENDPOINT = "/agents/profile-bundle/publish";
2268
+ /**
2269
+ * Wall-clock ceiling for one claim/publish round trip. The cache is an
2270
+ * optimization: a stalled box must fall back to (or skip) delivery, never
2271
+ * hold create() hostage.
2272
+ */
2273
+ const PROFILE_BUNDLE_HTTP_TIMEOUT_MS = 1e4;
2274
+ /**
2275
+ * Answers that mean the box predates the cache API: no route, a route that
2276
+ * rejects the method, or a recognized-but-unimplemented handler. Remembered
2277
+ * per box handle so an old box is never probed twice.
2278
+ */
2279
+ const PROFILE_BUNDLE_API_GONE_STATUSES = new Set([
2280
+ 404,
2281
+ 405,
2282
+ 501
2283
+ ]);
2284
+ function profileBundleDebug(message, data = {}) {
2285
+ if (globalThis.process?.env?.TANGLE_SANDBOX_SDK_PROFILE_BUNDLE_DEBUG !== "1") return;
2286
+ console.debug(`[sandbox-sdk] profile bundle: ${message}`, data);
2287
+ }
2288
+ async function withProfileBundleTimeout(work, what) {
2289
+ let timer;
2290
+ try {
2291
+ return await Promise.race([work, new Promise((_, reject) => {
2292
+ const timeoutError = /* @__PURE__ */ new Error(`${what} timed out after ${PROFILE_BUNDLE_HTTP_TIMEOUT_MS}ms`);
2293
+ timer = setTimeout(() => reject(timeoutError), PROFILE_BUNDLE_HTTP_TIMEOUT_MS);
2294
+ timer.unref?.();
2295
+ })]);
2296
+ } finally {
2297
+ if (timer !== void 0) clearTimeout(timer);
2298
+ }
2299
+ }
2300
+ function buildPublishManifest(box, deferredFiles, bundle) {
2301
+ const byMountPath = new Map(deferredFiles.map((mount) => [mount.path, mount]));
2302
+ const encoder = new TextEncoder();
2303
+ let sizeBytes = 0;
2304
+ const files = profileBundleFileTable(deferredFiles).map((entry) => {
2305
+ const mount = byMountPath.get(entry.mountPath);
2306
+ if (!mount) throw new Error(`profile bundle manifest: no mount for ${entry.mountPath}`);
2307
+ sizeBytes += encoder.encode(inlineProfileFileContent(mount)).byteLength;
2308
+ return {
2309
+ ...entry,
2310
+ target: profileFileDeliveryTarget(box, mount)
2311
+ };
2312
+ });
2313
+ return {
2314
+ schema: PROFILE_BUNDLE_SCHEMA,
2315
+ bundle,
2316
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
2317
+ sizeBytes,
2318
+ files
2319
+ };
2320
+ }
2055
2321
  /** Successful immutable mount delivery is scoped to one filesystem incarnation. */
2056
2322
  var ProfileFileDelivery = class {
2057
2323
  delivered;
2324
+ /** The most recent successful preparation with file mounts; undefined until one. */
2325
+ lastReport;
2058
2326
  pending = Promise.resolve();
2327
+ unsupportedBoxes = /* @__PURE__ */ new WeakSet();
2059
2328
  prepare(box, profile, signal, existingFiles = "allow-identical") {
2060
2329
  const { leanProfile, deferredFiles } = splitInlineProfileFileMounts(structuredClone(profile));
2061
2330
  validateDeferredProfileFileMounts(deferredFiles);
2062
2331
  if (deferredFiles.length === 0) return Promise.resolve(leanProfile);
2332
+ const bundle = profileFileBundleKey(deferredFiles);
2063
2333
  const prepared = this.pending.then(async () => {
2064
2334
  signal?.throwIfAborted();
2335
+ const startedAt = Date.now();
2336
+ let delivery = {
2337
+ outcome: "receipt",
2338
+ deliveredFiles: 0
2339
+ };
2065
2340
  const incarnation = box.filesystemIncarnationId;
2066
- const fingerprint = canonicalCandidateDigest(deferredFiles);
2067
- if (incarnation === void 0 || this.delivered?.incarnation !== incarnation || this.delivered.fingerprint !== fingerprint) {
2341
+ if (incarnation === void 0 || this.delivered?.incarnation !== incarnation || this.delivered.fingerprint !== bundle) {
2068
2342
  this.delivered = void 0;
2069
- await materializeProfileFileMounts(box, deferredFiles, { existingFiles });
2343
+ delivery = await this.deliverProfileFiles(box, deferredFiles, bundle, existingFiles);
2070
2344
  if (box.filesystemIncarnationId !== incarnation) throw new StateError("Filesystem incarnation changed during profile file delivery", box.filesystemIncarnationId ?? "unknown", incarnation ?? "unknown");
2071
2345
  if (incarnation !== void 0) this.delivered = {
2072
2346
  incarnation,
2073
- fingerprint
2347
+ fingerprint: bundle
2074
2348
  };
2075
2349
  }
2076
2350
  signal?.throwIfAborted();
2351
+ this.lastReport = {
2352
+ ...delivery,
2353
+ files: deferredFiles.length,
2354
+ durationMs: Date.now() - startedAt
2355
+ };
2077
2356
  return leanProfile;
2078
2357
  });
2079
2358
  this.pending = prepared.then(() => {}, () => {});
2080
2359
  return prepared;
2081
2360
  }
2361
+ async deliverProfileFiles(box, deferredFiles, bundle, existingFiles) {
2362
+ const claim = await this.claimProfileBundle(box, deferredFiles, bundle);
2363
+ if (claim.kind === "legacy") {
2364
+ await materializeProfileFileMounts(box, deferredFiles, { existingFiles });
2365
+ return {
2366
+ outcome: "legacy",
2367
+ deliveredFiles: deferredFiles.length
2368
+ };
2369
+ }
2370
+ const remaining = deferredFiles.filter((mount) => claim.missing.has(mount.path));
2371
+ if (remaining.length === 0) return {
2372
+ outcome: "hit",
2373
+ deliveredFiles: 0
2374
+ };
2375
+ await materializeProfileFileMounts(box, remaining, { existingFiles });
2376
+ await this.publishProfileBundle(box, deferredFiles, bundle);
2377
+ return {
2378
+ outcome: remaining.length === deferredFiles.length ? "miss" : "partial",
2379
+ deliveredFiles: remaining.length
2380
+ };
2381
+ }
2382
+ async claimProfileBundle(box, deferredFiles, bundle) {
2383
+ if (typeof box.runtimeFetch !== "function" || this.unsupportedBoxes.has(box)) return { kind: "legacy" };
2384
+ const table = profileBundleFileTable(deferredFiles);
2385
+ try {
2386
+ const response = await withProfileBundleTimeout(box.runtimeFetch(PROFILE_BUNDLE_CLAIM_ENDPOINT, {
2387
+ method: "POST",
2388
+ headers: { "content-type": "application/json" },
2389
+ body: JSON.stringify({
2390
+ bundle,
2391
+ files: table.map(({ mountPath, sha256 }) => ({
2392
+ mountPath,
2393
+ sha256
2394
+ }))
2395
+ })
2396
+ }), "profile bundle claim");
2397
+ if (PROFILE_BUNDLE_API_GONE_STATUSES.has(response.status)) {
2398
+ this.unsupportedBoxes.add(box);
2399
+ profileBundleDebug("box predates the bundle cache API", { status: response.status });
2400
+ return { kind: "legacy" };
2401
+ }
2402
+ if (!response.ok) {
2403
+ profileBundleDebug("claim refused; legacy delivery this turn", { status: response.status });
2404
+ return { kind: "legacy" };
2405
+ }
2406
+ const body = await response.json();
2407
+ if (body.status === "hit") return {
2408
+ kind: "claimed",
2409
+ missing: /* @__PURE__ */ new Set()
2410
+ };
2411
+ const claimed = new Set(table.map(({ mountPath }) => mountPath));
2412
+ if (body.status !== "miss" || !Array.isArray(body.missing) || !body.missing.every((mountPath) => typeof mountPath === "string" && claimed.has(mountPath))) throw new Error("Malformed profile bundle claim response");
2413
+ return {
2414
+ kind: "claimed",
2415
+ missing: new Set(body.missing)
2416
+ };
2417
+ } catch (error) {
2418
+ profileBundleDebug("claim failed; legacy delivery this turn", { error: error instanceof Error ? error.message : String(error) });
2419
+ return { kind: "legacy" };
2420
+ }
2421
+ }
2422
+ async publishProfileBundle(box, deferredFiles, bundle) {
2423
+ if (typeof box.runtimeFetch !== "function" || this.unsupportedBoxes.has(box)) return;
2424
+ try {
2425
+ const response = await withProfileBundleTimeout(box.runtimeFetch(PROFILE_BUNDLE_PUBLISH_ENDPOINT, {
2426
+ method: "POST",
2427
+ headers: { "content-type": "application/json" },
2428
+ body: JSON.stringify({
2429
+ bundle,
2430
+ manifest: buildPublishManifest(box, deferredFiles, bundle)
2431
+ })
2432
+ }), "profile bundle publish");
2433
+ if (!response.ok) profileBundleDebug("publish refused", { status: response.status });
2434
+ } catch (error) {
2435
+ profileBundleDebug("publish failed", { error: error instanceof Error ? error.message : String(error) });
2436
+ }
2437
+ }
2082
2438
  };
2083
2439
  //#endregion
2084
2440
  //#region ../../../packages/runtime-contracts/dist/interactive-session-http.js
@@ -4824,6 +5180,14 @@ var SandboxInstance = class SandboxInstance {
4824
5180
  * object passed as a per-turn override — is compared correctly: unchanged
4825
5181
  * content references by hash, changed content sends inline.
4826
5182
  */
5183
+ /**
5184
+ * How this handle's most recent profile file preparation was satisfied
5185
+ * (host cache hit, partial, miss, legacy delivery, or a held receipt) and
5186
+ * how long it took. Undefined until a profile with file mounts is prepared.
5187
+ */
5188
+ get lastProfileFileDelivery() {
5189
+ return this.profileFiles.lastReport;
5190
+ }
4827
5191
  /** @internal Shared create/turn delivery; caller policy decides how to expose failures. */
4828
5192
  materializeProfileFiles(profile, signal, existingFiles = "allow-identical") {
4829
5193
  return this.profileFiles.prepare(this, profile, signal, existingFiles);
@@ -7711,6 +8075,12 @@ var SandboxInstance = class SandboxInstance {
7711
8075
  assertFilesystemIncarnationReady() {
7712
8076
  if (this.filesystemIncarnationReadiness !== "ready") throw new StateError("Sandbox filesystem incarnation is not ready", this.status, "running with a ready filesystem incarnation");
7713
8077
  }
8078
+ /**
8079
+ * One authenticated runtime HTTP call for this sandbox, relative endpoint
8080
+ * (`/agents/...`), scoped to the current filesystem incarnation. This is
8081
+ * the transport `/agents/profiles` rides and the box surface mount
8082
+ * delivery uses for profile-bundle cache claim/publish.
8083
+ */
7714
8084
  async runtimeFetch(path, options, fetchOptions) {
7715
8085
  this.assertFilesystemIncarnationReady();
7716
8086
  const url = `/v1/sandboxes/${encodeURIComponent(this.id)}/runtime${path}`;
@@ -1,2 +1,2 @@
1
- import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as ITangleJobsAbi, T as SandboxCreateResponseParamTypes, _ as JOB_SANDBOX_DELETE, a as fetchQuote, b as TangleSandboxClientConfig, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as JOB_SANDBOX_CREATE, 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 TANGLE_CHAIN_ID, w as SandboxCreateParamTypes, x as AgentSandboxBlueprintAbi, y as TANGLE_JOBS_CONTRACT } from "../index-DdUzvzA_.js";
1
+ import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as ITangleJobsAbi, T as SandboxCreateResponseParamTypes, _ as JOB_SANDBOX_DELETE, a as fetchQuote, b as TangleSandboxClientConfig, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as JOB_SANDBOX_CREATE, 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 TANGLE_CHAIN_ID, w as SandboxCreateParamTypes, x as AgentSandboxBlueprintAbi, y as TANGLE_JOBS_CONTRACT } from "../index-C8zV32IL.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 };
@@ -1,2 +1,2 @@
1
- import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as JOB_SANDBOX_DELETE, f as TANGLE_CHAIN_ID, g as JsonResponseParamTypes, h as ITangleJobsAbi, i as jobQuoteDigest, l as OperatorSessionError, m as AgentSandboxBlueprintAbi, n as fetchQuote, o as validateQuote, p as TANGLE_JOBS_CONTRACT, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as JOB_SANDBOX_CREATE, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-Dt4FMrZs.js";
1
+ import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as JOB_SANDBOX_DELETE, f as TANGLE_CHAIN_ID, g as JsonResponseParamTypes, h as ITangleJobsAbi, i as jobQuoteDigest, l as OperatorSessionError, m as AgentSandboxBlueprintAbi, n as fetchQuote, o as validateQuote, p as TANGLE_JOBS_CONTRACT, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as JOB_SANDBOX_CREATE, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-B06VSOdG.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,5 +1,5 @@
1
1
  import { x as readResponseJson } from "./errors-Cq4hMysQ.js";
2
- import { n as createSandboxInstanceFromResponse } from "./sandbox-CfGVI_xk.js";
2
+ import { n as createSandboxInstanceFromResponse } from "./sandbox-uwsfBoYj.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-B7_9Hl_z.js";
4
4
  //#region src/tangle/abi.ts
5
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "0.60.36",
3
+ "version": "0.60.37-develop.20261011082415.1815a0e",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -151,7 +151,7 @@
151
151
  "yjs": "13.6.30",
152
152
  "@products/sandbox-test-utils": "0.0.0",
153
153
  "@repo/shared": "0.0.0",
154
- "@tangle-network/agent-profile-materialize": "0.22.4",
154
+ "@tangle-network/agent-profile-materialize": "0.23.0",
155
155
  "@tangle-network/cli-agent-registry": "0.6.2",
156
156
  "@tangle-network/runtime-contracts": "0.16.0",
157
157
  "@tangle-network/sdk": "4.0.3",
@@ -1,7 +1,7 @@
1
1
  import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-Br8s2y4r.js";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
- import { homedir } from "node:os";
4
3
  import { join } from "node:path";
4
+ import { homedir } from "node:os";
5
5
  //#region ../../../packages/cli-agent-registry/dist/local-cli-auth.mjs
6
6
  const DEFAULT_MODE = 384;
7
7
  function readAuthFile(sourcePath, targetPath) {