@tangle-network/sandbox 0.12.2-develop.20260726033513.aa4b682 → 0.13.0-develop.20260726072320.8402d7e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { d as serializeForSidecar, l as normalizeRuntimeBackendConfig } from "./runtime-api-XhAv6YiH.js";
1
+ import { l as normalizeRuntimeBackendConfig } from "./runtime-api-BFtk4_HK.js";
2
2
  import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as StateError } from "./errors-D9fFOWX9.js";
3
- import { _ as otelTraceIdForTangleTrace, a as TERMINAL_WS_ECHO_SUBPROTOCOL, c as SandboxTaskSession, d as applySandboxEventText, f as collectAgentResponseText, g as exportTraceBundle, h as buildTraceExportPayload, i as WorkspaceImages, l as SandboxSession, o as TerminalStream, p as getSandboxEventText, s as TerminalStreamError, t as SandboxInstance, u as InteractiveSessionHandle, v as toOtelJson, y as parseSSEStream } from "./sandbox-D77F7Yja.js";
4
- import { a as splitInlineProfileSkills, c as SandboxFleetClient, d as SANDBOX_SIZE_PRESET_NAMES, f as resolveSandboxResources, i as splitInlineProfileFileMounts, l as DEFAULT_SANDBOX_SIZE, n as SandboxClient, o as validateDeferredProfileFileMounts, p as sandboxResourcesForSize, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as SANDBOX_SIZE_PRESETS } from "./client-B1cU2xzD.js";
3
+ import { _ as otelTraceIdForTangleTrace, a as TERMINAL_WS_ECHO_SUBPROTOCOL, c as SandboxTaskSession, d as applySandboxEventText, f as collectAgentResponseText, g as exportTraceBundle, h as buildTraceExportPayload, i as WorkspaceImages, l as SandboxSession, o as TerminalStream, p as getSandboxEventText, s as TerminalStreamError, t as SandboxInstance, u as InteractiveSessionHandle, v as toOtelJson, y as parseSSEStream } from "./sandbox-DXuuroty.js";
4
+ import { a as splitInlineProfileSkills, c as SandboxFleetClient, i as splitInlineProfileFileMounts, n as SandboxClient, o as validateDeferredProfileFileMounts, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient } from "./client-DS8qSxCp.js";
5
5
  import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DdD_rFZQ.js";
6
- import { t as TangleSandboxClient } from "./tangle-DpxmcNGp.js";
7
- import { agentProfileSchema, capabilitySchema, defineAgentProfile, defineGitHubResource, defineInlineResource, mergeAgentProfiles, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
6
+ import { t as TangleSandboxClient } from "./tangle-46aLycNc.js";
7
+ import { SANDBOX_SIZE_PRESET_NAMES } from "@tangle-network/agent-interface";
8
8
  //#region src/confidential.ts
9
9
  function generateAttestationNonce(bytes = 32) {
10
10
  const buffer = new Uint8Array(bytes);
@@ -175,7 +175,7 @@ var Image = class Image {
175
175
  * @example
176
176
  * ```typescript
177
177
  * const image = Image.fromId("sha256:abc123...");
178
- * const box = await client.create({ image: image.id });
178
+ * const box = await client.create({ environment: image.id });
179
179
  * ```
180
180
  */
181
181
  static fromId(imageId) {
@@ -453,7 +453,7 @@ var ImageBuilder = class {
453
453
  * onProgress: (e) => console.log(e.message),
454
454
  * });
455
455
  *
456
- * const box = await client.create({ image: image.id });
456
+ * const box = await client.create({ environment: image.id });
457
457
  * ```
458
458
  */
459
459
  async build(options) {
@@ -654,12 +654,35 @@ function requireString(input, key) {
654
654
  function requireCreateOptions(input) {
655
655
  const value = input.options;
656
656
  if (!value || typeof value !== "object") throw new Error("manageSandboxes requires options");
657
- return rejectUserPolicy(value);
657
+ const createOptions = rejectUserPolicy(value);
658
+ rejectRemovedCreateFields(createOptions);
659
+ return createOptions;
658
660
  }
659
661
  function requireCreateWithCoordinatorOptions(input) {
660
662
  const value = input.options;
661
663
  if (!value || typeof value !== "object") throw new Error("manageSandboxes requires options");
662
- return rejectUserPolicy(value);
664
+ const createOptions = rejectUserPolicy(value);
665
+ rejectRemovedCreateFields(createOptions);
666
+ return createOptions;
667
+ }
668
+ const REMOVED_CREATE_FIELDS = [
669
+ "image",
670
+ "tools",
671
+ "permissions",
672
+ "network"
673
+ ];
674
+ function rejectRemovedCreateFields(options) {
675
+ const candidates = [["defaults", options.defaults], ["coordinator", options.coordinator]];
676
+ for (const collectionName of ["machines", "workers"]) {
677
+ const collection = options[collectionName];
678
+ if (Array.isArray(collection)) collection.forEach((value, index) => {
679
+ candidates.push([`${collectionName}[${index}]`, value]);
680
+ });
681
+ }
682
+ for (const [location, value] of candidates) {
683
+ if (!value || typeof value !== "object" || Array.isArray(value)) continue;
684
+ for (const field of REMOVED_CREATE_FIELDS) if (Object.hasOwn(value, field)) throw new Error(`manageSandboxes ${location}.${field} is not a create option`);
685
+ }
663
686
  }
664
687
  function rejectUserPolicy(options) {
665
688
  if ("policy" in options && options.policy !== void 0) throw new Error("manageSandboxes policy must be supplied by the tool host");
@@ -872,10 +895,6 @@ const fleetMachineSpec = {
872
895
  type: "string",
873
896
  enum: ["coordinator", "worker"]
874
897
  },
875
- image: {
876
- type: "string",
877
- minLength: 1
878
- },
879
898
  environment: {
880
899
  type: "string",
881
900
  minLength: 1
@@ -938,10 +957,6 @@ const MANAGE_SANDBOXES_PARAMETERS = {
938
957
  type: "object",
939
958
  additionalProperties: true,
940
959
  properties: {
941
- image: {
942
- type: "string",
943
- minLength: 1
944
- },
945
960
  environment: {
946
961
  type: "string",
947
962
  minLength: 1
@@ -1062,6 +1077,68 @@ function buildControlPlaneMcpConfig(options) {
1062
1077
  };
1063
1078
  }
1064
1079
  //#endregion
1080
+ //#region src/resources.ts
1081
+ /**
1082
+ * The concrete compute behind each {@link SandboxSizePreset} — the SINGLE source
1083
+ * of truth for what a tier means. `@tangle-network/agent-interface` owns the
1084
+ * tier NAMES (so the lowest layer can reference a size); this owns the numbers.
1085
+ *
1086
+ * Values stay within the sandbox-api default plan caps (8 vCPU / 16 GB / 100 GB)
1087
+ * and keep memory at or above the driver's firecracker-snapshot floor (1536 MB),
1088
+ * so a requested tier is never silently bumped. `diskGB` is in gigabytes;
1089
+ * `memoryMB` in megabytes. The server still clamps every request to the owner's
1090
+ * actual plan limits — these are the unclamped tier definitions, not guarantees.
1091
+ */
1092
+ const SANDBOX_SIZE_PRESETS = {
1093
+ nano: {
1094
+ cpuCores: 1,
1095
+ memoryMB: 2048,
1096
+ diskGB: 5
1097
+ },
1098
+ small: {
1099
+ cpuCores: 2,
1100
+ memoryMB: 4096,
1101
+ diskGB: 10
1102
+ },
1103
+ medium: {
1104
+ cpuCores: 4,
1105
+ memoryMB: 8192,
1106
+ diskGB: 20
1107
+ },
1108
+ large: {
1109
+ cpuCores: 8,
1110
+ memoryMB: 16384,
1111
+ diskGB: 50
1112
+ }
1113
+ };
1114
+ /**
1115
+ * Default tier when a caller provisions without picking a size. The smallest
1116
+ * tier that comfortably runs an agent harness (opencode + a repo clone + a
1117
+ * build) — deliberately NOT a maxed box, so a thin task is cheap by default and
1118
+ * a heavy one opts up explicitly.
1119
+ */
1120
+ const DEFAULT_SANDBOX_SIZE = "small";
1121
+ /** The resources for a named tier, as a fresh object (never the shared preset).
1122
+ * Fails loud on an unknown key rather than spreading `undefined` into an empty
1123
+ * resources object — a silent zero would send no compute request downstream. */
1124
+ function sandboxResourcesForSize(size) {
1125
+ const preset = SANDBOX_SIZE_PRESETS[size];
1126
+ if (!preset) throw new Error(`sandboxResourcesForSize: unknown size preset '${size}' (expected one of ${SANDBOX_SIZE_PRESET_NAMES.join(", ")})`);
1127
+ return { ...preset };
1128
+ }
1129
+ /**
1130
+ * Resolve a caller's size intent to concrete {@link SandboxResources}. Raw
1131
+ * `resources` win (an explicit cpu/memory request is authoritative); else a
1132
+ * named `size` expands to its preset; else `undefined` (the caller applies its
1133
+ * own default). Raw and preset are intentionally exclusive at the schema layer —
1134
+ * if both arrive here, the explicit numbers take precedence rather than being
1135
+ * silently merged.
1136
+ */
1137
+ function resolveSandboxResources(opts) {
1138
+ if (opts.resources) return opts.resources;
1139
+ if (opts.size) return sandboxResourcesForSize(opts.size);
1140
+ }
1141
+ //#endregion
1065
1142
  //#region src/router-search.ts
1066
1143
  const DEFAULT_ROUTER_URL = "https://router.tangle.tools";
1067
1144
  async function fetchTangleRouterSearchConfig(options = {}) {
@@ -1197,7 +1274,6 @@ async function runOneCase(options) {
1197
1274
  const box = await options.sandboxClient.create({
1198
1275
  name: `eval-${safeId(options.scenario.id).slice(0, 40)}`,
1199
1276
  environment: options.harness?.image,
1200
- image: options.harness?.image,
1201
1277
  backend,
1202
1278
  env: materializeHarnessEnv(options.config, options.harness?.envVars, options.apiKey),
1203
1279
  ...options.harness?.gitRepo ? { git: {
@@ -1454,4 +1530,4 @@ function stripUndefined(value) {
1454
1530
  return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => [k, stripUndefined(v)]));
1455
1531
  }
1456
1532
  //#endregion
1457
- export { AuthError, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, DEFAULT_SANDBOX_SIZE, EgressProxyRecoveryError, GPU_LEASE_PROVIDER_NAMES, Image, ImageBuilder, IntelligenceClient, InteractiveSessionHandle, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, NetworkError, NotFoundError, PartialFailureError, QuotaError, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxSession, SandboxTaskSession, ServerError, StateError, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, TerminalStream, TerminalStreamError, TimeoutError, ValidationError, WorkspaceImages, agentProfileSchema, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, capabilitySchema, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateAgentProfileSecurity, validateDeferredProfileFileMounts };
1533
+ export { AuthError, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, DEFAULT_SANDBOX_SIZE, EgressProxyRecoveryError, GPU_LEASE_PROVIDER_NAMES, Image, ImageBuilder, IntelligenceClient, InteractiveSessionHandle, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, NetworkError, NotFoundError, PartialFailureError, QuotaError, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxSession, SandboxTaskSession, ServerError, StateError, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, TerminalStream, TerminalStreamError, TimeoutError, ValidationError, WorkspaceImages, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateDeferredProfileFileMounts };
@@ -18,25 +18,15 @@ function normalizeRuntimeModelOverride(model) {
18
18
  function normalizeRuntimeBackendConfig(backend, options = {}) {
19
19
  if (!backend && !options.model) return void 0;
20
20
  if (backend && LEGACY_QUESTION_ALIAS_KEY in backend) throw new Error(`[sandbox-sdk] backend.${LEGACY_QUESTION_ALIAS_KEY} was removed. Use backend.interactions.question instead.`);
21
- const callerInlineProfile = backend?.inlineProfile;
22
- if (callerInlineProfile !== void 0) console.warn("[sandbox-sdk] backend.inlineProfile is deprecated. Use backend.profile (AgentProfile) instead.");
23
21
  return {
24
22
  ...backend?.type ? { type: backend.type } : {},
25
23
  ...backend?.profile !== void 0 ? { profile: backend.profile } : {},
26
- ...callerInlineProfile !== void 0 ? { inlineProfile: callerInlineProfile } : {},
27
24
  ...backend?.model ? { model: backend.model } : options.model ? { model: normalizeRuntimeModelOverride(options.model) } : {},
28
25
  ...backend?.server ? { server: backend.server } : {},
29
26
  ...backend?.interactions !== void 0 ? { interactions: backend.interactions } : {},
30
27
  ...backend?.metadata !== void 0 ? { metadata: backend.metadata } : {}
31
28
  };
32
29
  }
33
- /**
34
- * @deprecated Canonical profile objects can be sent directly as
35
- * `backend.profile`; this compatibility export now preserves that object.
36
- */
37
- function serializeForSidecar(profile) {
38
- return profile;
39
- }
40
30
  //#endregion
41
31
  //#region src/lib/wire-encoding.ts
42
32
  /**
@@ -682,4 +672,4 @@ function normalizeSessionInfo(raw) {
682
672
  };
683
673
  }
684
674
  //#endregion
685
- export { FILE_DECODED_WRITE_MAX_BYTES as a, encodeTextForWire as c, serializeForSidecar as d, SANDBOX_PROXY_REQUEST_MAX_BYTES as i, normalizeRuntimeBackendConfig as l, normalizeSessionInfo as n, combineAbortSignals as o, uploadChunked as r, encodePromptForWire as s, SandboxRuntimeApi as t, normalizeRuntimeModelOverride as u };
675
+ export { FILE_DECODED_WRITE_MAX_BYTES as a, encodeTextForWire as c, SANDBOX_PROXY_REQUEST_MAX_BYTES as i, normalizeRuntimeBackendConfig as l, normalizeSessionInfo as n, combineAbortSignals as o, uploadChunked as r, encodePromptForWire as s, SandboxRuntimeApi as t, normalizeRuntimeModelOverride as u };
package/dist/runtime.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Br as SandboxTerminalInfo, Ci as TaskSessionCommitResult, D as CommitTaskSessionOptions, Fn as RenameOptions, Hi as WriteFileOptions, Hr as SandboxTerminalRequestOptions, I as CreateSessionOptions, Ir as SandboxRuntimeProfileList, L as CreateTaskSessionOptions, Pr as SandboxRuntimeHealth, Qt as ListMessagesOptions, Ri as UploadProgress, Si as TaskSessionChanges, Ti as TaskSessionInfo, Vr as SandboxTerminalManager, at as FileReadBatchResult, b as ChunkedUploadOptions, ct as FileRenameResult, dt as FileTreeOptions, ft as FileTreeResult, ht as FileWriteResult, it as FileReadBatchOptions, kr as SandboxPortBinding, li as SessionMessage, mt as FileUsageResult, ni as SendSessionMessageRequest, pt as FileUsageOptions, ri as SentSessionMessage, si as SessionInfo, ti as SendSessionMessageOptions, x as ChunkedUploadResult, zr as SandboxTerminalCreateOptions } from "./types-Dph9_dE4.js";
1
+ import { $r as SendSessionMessageOptions, Br as SandboxTerminalRequestOptions, Ci as TaskSessionInfo, D as CommitTaskSessionOptions, Dr as SandboxPortBinding, Fi as UploadProgress, I as CreateSessionOptions, L as CreateTaskSessionOptions, Lr as SandboxTerminalCreateOptions, Mr as SandboxRuntimeHealth, Pn as RenameOptions, Pr as SandboxRuntimeProfileList, Rr as SandboxTerminalInfo, Zt as ListMessagesOptions, ai as SessionInfo, at as FileReadBatchResult, b as ChunkedUploadOptions, bi as TaskSessionChanges, ct as FileRenameResult, dt as FileTreeOptions, ei as SendSessionMessageRequest, ft as FileTreeResult, ht as FileWriteResult, it as FileReadBatchOptions, mt as FileUsageResult, pt as FileUsageOptions, si as SessionMessage, ti as SentSessionMessage, x as ChunkedUploadResult, xi as TaskSessionCommitResult, zi as WriteFileOptions, zr as SandboxTerminalManager } from "./types-DFYV3JSL.js";
2
2
  import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-C8HMx78o.js";
3
3
 
4
4
  //#region src/lib/chunked-upload.d.ts
package/dist/runtime.js CHANGED
@@ -1,4 +1,4 @@
1
- import { o as combineAbortSignals, r as uploadChunked, t as SandboxRuntimeApi } from "./runtime-api-XhAv6YiH.js";
1
+ import { o as combineAbortSignals, r as uploadChunked, t as SandboxRuntimeApi } from "./runtime-api-BFtk4_HK.js";
2
2
  import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-D9fFOWX9.js";
3
3
  //#region src/runtime-client.ts
4
4
  const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
@@ -1,4 +1,4 @@
1
- import { $ as EventStreamOptions, $i as TerminalStream, At as GitCommit, Bi as WaitForOptions, Bn as RolloutOptions, C as CodeExecutionResult, Ci as TaskSessionCommitResult, Cn as ProvisionEvent, D as CommitTaskSessionOptions, Di as TeeAttestationOptions, Er as SandboxInfo, Fi as TurnDriveResult, G as DriveTurnOptions, Gt as InstalledTool, H as DispatchedSession, Hi as WriteFileOptions, Hn as RolloutStartResult, I as CreateSessionOptions, In as RestoreSnapshotOptions, Ir as SandboxRuntimeProfileList, Jt as IntelligenceReportCompareTo, Kn as SSHCommandDescriptor, Kt as IntelligenceReport, L as CreateTaskSessionOptions, Ln as ResumeOptions, Lr as SandboxStatus, Mr as SandboxResourceUsage, Mt as GitDiff, Nt as GitStatus, O as CompletedTurnResult, Pr as SandboxRuntimeHealth, Pt as GpuLease, Qr as SearchOptions, Qt as ListMessagesOptions, Rn as Rollout, Rr as SandboxTerminalAttachOptions, S as CodeExecutionOptions, Si as TaskSessionChanges, Sn as PromptResult, Ti as TaskSessionInfo, Ui as WriteManyFile, Ur as SandboxTerminals, V as DispatchPromptOptions, Vi as WaitForRolloutOptions, Wi as WriteManyOptions, Wr as SandboxTraceBundle, X as EgressManager, Xt as IntelligenceReportWindow, Y as DurablePlan, Yn as SandboxConnection, Yr as ScopedToken, Zn as SandboxEvent, Zr as SearchMatch, Zt as JsonValue, ai as SessionEventStreamOptions, bi as TaskOptions, bn as PromptInputPart, ci as SessionListOptions, dn as PreviewLinkManager, fi as SnapshotInfo, gi as StartupDiagnostics, gn as ProcessManager, gr as SandboxFleetTraceBundle, ht as FileWriteResult, ji as TeePublicKeyResponse, ki as TeeAttestationResponse, kr as SandboxPortBinding, kt as GitBranch, l as BackendManager, li as SessionMessage, ln as PermissionsManager, lt as FileSystem, mi as SnapshotResult, na as TerminalStreamHandlers, ni as SendSessionMessageRequest, nt as ExecResult, oi as SessionForkOptions, on as NetworkManager, pi as SnapshotOptions, q as DriverInfo, qn as SSHCredentials, qr as SandboxTraceOptions, qt as IntelligenceReportBudget, ri as SentSessionMessage, rn as MintScopedTokenOptions, s as BackendConfig, si as SessionInfo, ti as SendSessionMessageOptions, tt as ExecOptions, w as CodeLanguage, wn as ProvisionResult, xi as TaskResult, xn as PromptOptions, y as BranchOptions, zt as GpuLeaseManager } from "./types-Dph9_dE4.js";
1
+ import { $ as EventStreamOptions, $i as TerminalStreamHandlers, $r as SendSessionMessageOptions, Ar as SandboxResourceUsage, At as GitCommit, Bi as WriteManyFile, C as CodeExecutionResult, Ci as TaskSessionInfo, Cn as ProvisionResult, D as CommitTaskSessionOptions, Di as TeeAttestationResponse, Dr as SandboxPortBinding, Fn as RestoreSnapshotOptions, Fr as SandboxStatus, G as DriveTurnOptions, Gn as SSHCommandDescriptor, Gr as SandboxTraceOptions, Gt as IntelligenceReport, H as DispatchedSession, Hr as SandboxTraceBundle, I as CreateSessionOptions, In as ResumeOptions, Ir as SandboxTerminalAttachOptions, Jn as SandboxConnection, Kn as SSHCredentials, Kt as IntelligenceReportBudget, L as CreateTaskSessionOptions, Li as WaitForOptions, Ln as Rollout, Mi as TurnDriveResult, Mr as SandboxRuntimeHealth, Mt as GitDiff, Nt as GitStatus, O as CompletedTurnResult, Pr as SandboxRuntimeProfileList, Pt as GpuLease, Ri as WaitForRolloutOptions, S as CodeExecutionOptions, Sn as ProvisionEvent, Ti as TeeAttestationOptions, Tr as SandboxInfo, V as DispatchPromptOptions, Vi as WriteManyOptions, Vn as RolloutStartResult, Vr as SandboxTerminals, Wt as InstalledTool, X as EgressManager, Xi as TerminalStream, Xn as SandboxEvent, Xr as SearchOptions, Xt as JsonValue, Y as DurablePlan, Yr as SearchMatch, Yt as IntelligenceReportWindow, Zt as ListMessagesOptions, ai as SessionInfo, an as NetworkManager, bi as TaskSessionChanges, bn as PromptOptions, cn as PermissionsManager, di as SnapshotOptions, ei as SendSessionMessageRequest, fi as SnapshotResult, hn as ProcessManager, hr as SandboxFleetTraceBundle, ht as FileWriteResult, ii as SessionForkOptions, ki as TeePublicKeyResponse, kt as GitBranch, l as BackendManager, lt as FileSystem, mi as StartupDiagnostics, nn as MintScopedTokenOptions, nt as ExecResult, oi as SessionListOptions, q as DriverInfo, qr as ScopedToken, qt as IntelligenceReportCompareTo, ri as SessionEventStreamOptions, s as BackendConfig, si as SessionMessage, ti as SentSessionMessage, tt as ExecOptions, ui as SnapshotInfo, un as PreviewLinkManager, vi as TaskOptions, w as CodeLanguage, xi as TaskSessionCommitResult, xn as PromptResult, y as BranchOptions, yi as TaskResult, yn as PromptInputPart, zi as WriteFileOptions, zn as RolloutOptions, zt as GpuLeaseManager } from "./types-DFYV3JSL.js";
2
2
  import { AgentProfile } from "@tangle-network/agent-interface";
3
3
 
4
4
  //#region src/mcp.d.ts
@@ -950,7 +950,7 @@ declare class SandboxInstance {
950
950
  *
951
951
  * @example
952
952
  * ```typescript
953
- * const box = await client.create({ image: "ethereum" });
953
+ * const box = await client.create({ environment: "ethereum" });
954
954
  *
955
955
  * const stream = box.watchProvisioning();
956
956
  * for await (const event of stream) {
@@ -1426,35 +1426,12 @@ declare class SandboxInstance {
1426
1426
  * ```
1427
1427
  */
1428
1428
  restoreFromStorage(storage: SnapshotOptions["storage"], options?: RestoreSnapshotOptions): Promise<SnapshotResult | null>;
1429
- /**
1430
- * @deprecated CRIU checkpoints were removed. To branch live memory into
1431
- * copy-on-write children of a running sandbox use {@link branch}; for durable
1432
- * filesystem state use {@link snapshot}. This method now throws.
1433
- */
1434
- checkpoint(): never;
1435
- /**
1436
- * @deprecated CRIU checkpoints were removed. List durable filesystem state
1437
- * with {@link listSnapshots}. This method now throws.
1438
- */
1439
- listCheckpoints(): never;
1440
- /**
1441
- * @deprecated CRIU checkpoints were removed. This method now throws.
1442
- */
1443
- deleteCheckpoint(): never;
1444
- /**
1445
- * @deprecated Forking from a CRIU checkpoint was removed. Use {@link branch}
1446
- * to fork a running sandbox's live memory into copy-on-write children, or
1447
- * `client.create({ fromSnapshot })` to provision from durable disk state.
1448
- * This method now throws.
1449
- */
1450
- fork(): never;
1451
1429
  /**
1452
1430
  * Branch this RUNNING sandbox into `count` copy-on-write children
1453
- * (Morph Infinibranch parity). Unlike {@link fork} — which rehydrates one
1454
- * sandbox from a CRIU checkpoint — branch forks the live VM's memory into
1455
- * many children at once via Firecracker UFFD copy-on-write: the children
1456
- * share the parent's clean pages instead of each copying full guest
1457
- * memory. The parent stays running.
1431
+ * (Morph Infinibranch parity). Branch forks the live VM's memory into many
1432
+ * children at once via Firecracker UFFD copy-on-write: the children share the
1433
+ * parent's clean pages instead of each copying full guest memory. The parent
1434
+ * stays running.
1458
1435
  *
1459
1436
  * @param count - Number of children to create (must be >= 1).
1460
1437
  * @param options - Per-child overrides.
@@ -1596,10 +1573,10 @@ declare class SandboxInstance {
1596
1573
  */
1597
1574
  private parseSSEStream;
1598
1575
  /**
1599
- * Associate a session ID with a user ID so the Sandbox API can route
1600
- * subsequent WebSocket connections to this sandbox.
1576
+ * Associate a session ID with this sandbox so the Sandbox API can route
1577
+ * subsequent WebSocket connections.
1601
1578
  *
1602
- * @param opts - Session and user identifiers
1579
+ * @param opts - Session and sandbox routing identifiers
1603
1580
  *
1604
1581
  * @example
1605
1582
  * ```typescript
@@ -1610,8 +1587,7 @@ declare class SandboxInstance {
1610
1587
  * ```
1611
1588
  */
1612
1589
  registerSessionMapping(opts: {
1613
- sessionId: string; /** @deprecated Ownership is derived from the Sandbox API key. */
1614
- userId?: string; /** The runtime (sidecar) session id this agent session routes to. */
1590
+ sessionId: string; /** The runtime (sidecar) session id this agent session routes to. */
1615
1591
  runtimeSessionId: string; /** Optional container id for direct routing. */
1616
1592
  sidecarId?: string; /** Optional projectRef so the server can detect a stale sidecar. */
1617
1593
  projectRef?: string;
@@ -1622,8 +1598,7 @@ declare class SandboxInstance {
1622
1598
  * sandbox stays alive.
1623
1599
  */
1624
1600
  unregisterSessionMapping(opts: {
1625
- sessionId: string; /** @deprecated Ownership is derived from the Sandbox API key. */
1626
- userId?: string;
1601
+ sessionId: string;
1627
1602
  }): Promise<{
1628
1603
  success: boolean;
1629
1604
  sessionId: string;
@@ -1,5 +1,5 @@
1
- import { l as normalizeRuntimeBackendConfig, n as normalizeSessionInfo, o as combineAbortSignals, r as uploadChunked, s as encodePromptForWire, t as SandboxRuntimeApi, u as normalizeRuntimeModelOverride } from "./runtime-api-XhAv6YiH.js";
2
- import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, p as parseErrorResponse, s as QuotaError, t as AuthError, u as StateError } from "./errors-D9fFOWX9.js";
1
+ import { l as normalizeRuntimeBackendConfig, n as normalizeSessionInfo, o as combineAbortSignals, r as uploadChunked, s as encodePromptForWire, t as SandboxRuntimeApi, u as normalizeRuntimeModelOverride } from "./runtime-api-BFtk4_HK.js";
2
+ import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, p as parseErrorResponse, s as QuotaError, t as AuthError, u as StateError } from "./errors-D9fFOWX9.js";
3
3
  import { addTokenUsage, readTokenCostUsd, readTokenUsage } from "@tangle-network/agent-core";
4
4
  //#region src/lib/sse-parser.ts
5
5
  /**
@@ -2647,7 +2647,7 @@ var SandboxInstance = class SandboxInstance {
2647
2647
  *
2648
2648
  * @example
2649
2649
  * ```typescript
2650
- * const box = await client.create({ image: "ethereum" });
2650
+ * const box = await client.create({ environment: "ethereum" });
2651
2651
  *
2652
2652
  * const stream = box.watchProvisioning();
2653
2653
  * for await (const event of stream) {
@@ -4561,42 +4561,11 @@ var SandboxInstance = class SandboxInstance {
4561
4561
  };
4562
4562
  }
4563
4563
  /**
4564
- * @deprecated CRIU checkpoints were removed. To branch live memory into
4565
- * copy-on-write children of a running sandbox use {@link branch}; for durable
4566
- * filesystem state use {@link snapshot}. This method now throws.
4567
- */
4568
- checkpoint() {
4569
- throw new CapabilityError("checkpoint() was removed: use branch() to fork live memory into copy-on-write children, or snapshot() for durable disk state", "CHECKPOINT_REMOVED", 410);
4570
- }
4571
- /**
4572
- * @deprecated CRIU checkpoints were removed. List durable filesystem state
4573
- * with {@link listSnapshots}. This method now throws.
4574
- */
4575
- listCheckpoints() {
4576
- throw new CapabilityError("listCheckpoints() was removed: checkpoints no longer exist; use listSnapshots() for durable disk state", "CHECKPOINT_REMOVED", 410);
4577
- }
4578
- /**
4579
- * @deprecated CRIU checkpoints were removed. This method now throws.
4580
- */
4581
- deleteCheckpoint() {
4582
- throw new CapabilityError("deleteCheckpoint() was removed: checkpoints no longer exist", "CHECKPOINT_REMOVED", 410);
4583
- }
4584
- /**
4585
- * @deprecated Forking from a CRIU checkpoint was removed. Use {@link branch}
4586
- * to fork a running sandbox's live memory into copy-on-write children, or
4587
- * `client.create({ fromSnapshot })` to provision from durable disk state.
4588
- * This method now throws.
4589
- */
4590
- fork() {
4591
- throw new CapabilityError("fork() was removed: use branch() to fork live memory into copy-on-write children, or create({ fromSnapshot }) for durable disk state", "FORK_REMOVED", 410);
4592
- }
4593
- /**
4594
4564
  * Branch this RUNNING sandbox into `count` copy-on-write children
4595
- * (Morph Infinibranch parity). Unlike {@link fork} — which rehydrates one
4596
- * sandbox from a CRIU checkpoint — branch forks the live VM's memory into
4597
- * many children at once via Firecracker UFFD copy-on-write: the children
4598
- * share the parent's clean pages instead of each copying full guest
4599
- * memory. The parent stays running.
4565
+ * (Morph Infinibranch parity). Branch forks the live VM's memory into many
4566
+ * children at once via Firecracker UFFD copy-on-write: the children share the
4567
+ * parent's clean pages instead of each copying full guest memory. The parent
4568
+ * stays running.
4600
4569
  *
4601
4570
  * @param count - Number of children to create (must be >= 1).
4602
4571
  * @param options - Per-child overrides.
@@ -5014,10 +4983,10 @@ var SandboxInstance = class SandboxInstance {
5014
4983
  }
5015
4984
  }
5016
4985
  /**
5017
- * Associate a session ID with a user ID so the Sandbox API can route
5018
- * subsequent WebSocket connections to this sandbox.
4986
+ * Associate a session ID with this sandbox so the Sandbox API can route
4987
+ * subsequent WebSocket connections.
5019
4988
  *
5020
- * @param opts - Session and user identifiers
4989
+ * @param opts - Session and sandbox routing identifiers
5021
4990
  *
5022
4991
  * @example
5023
4992
  * ```typescript
@@ -1,2 +1,2 @@
1
- import { a as TANGLE_JOBS_CONTRACT, c as AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-DHhxHd85.js";
1
+ import { a as TANGLE_JOBS_CONTRACT, c as AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-DwjU-4s_.js";
2
2
  export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient, TangleSandboxClientConfig };
@@ -1,2 +1,2 @@
1
- import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-DpxmcNGp.js";
1
+ import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-46aLycNc.js";
2
2
  export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient };
@@ -1,5 +1,5 @@
1
1
  import { p as parseErrorResponse } from "./errors-D9fFOWX9.js";
2
- import { n as createSandboxInstanceFromResponse } from "./sandbox-D77F7Yja.js";
2
+ import { n as createSandboxInstanceFromResponse } from "./sandbox-DXuuroty.js";
3
3
  //#region src/tangle/abi.ts
4
4
  /**
5
5
  * Tangle Contract ABI Definitions
@@ -451,7 +451,7 @@ var TangleChainClient = class {
451
451
  types: SandboxCreateParamTypes,
452
452
  values: [
453
453
  options.name ?? "",
454
- options.image ?? "",
454
+ options.environment ?? "",
455
455
  "",
456
456
  "",
457
457
  options.env ? JSON.stringify(options.env) : "",