@wenathlan/saddle 2.0.153 → 2.0.155

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.
Files changed (307) hide show
  1. package/Dockerfile +139 -55
  2. package/README.md +58 -59
  3. package/browser.ts +482 -0
  4. package/cli.ts +274 -0
  5. package/distribution.ts +731 -0
  6. package/docker.config +29 -8
  7. package/docs/artifactavailability.md +2 -2
  8. package/docs/browser.md +18 -1
  9. package/docs/{containerplatforms.2.1.0.md → containerplatforms210.md} +1 -1
  10. package/docs/{documentmap.1.8.12.md → documentmap1812.md} +1 -1
  11. package/docs/extension.md +13 -2
  12. package/docs/libraryapi.md +1 -1
  13. package/docs/{ninety.modalities.md → ninetymodalities.md} +87 -4
  14. package/docs/{planning.ninety.md → planningninety.md} +6 -6
  15. package/docs/{releasenotes.1.8.13.md → releasenotes1813.md} +2 -2
  16. package/docs/{releasenotes.1.8.14.md → releasenotes1814.md} +1 -1
  17. package/docs/{repo.synthesis.1.8.16.md → reposynthesis1816.md} +1 -1
  18. package/docs/todo.md +2 -2
  19. package/docs/{todo.1.8.15.md → todo1815.md} +1 -1
  20. package/docs/{todo.1.8.16.md → todo1816.md} +5 -5
  21. package/execution.ts +677 -0
  22. package/foundation.ts +314 -0
  23. package/index.ts +35 -27
  24. package/isolation.ts +84 -0
  25. package/modes.ts +170 -0
  26. package/mttg.config +1 -1
  27. package/orchestrator.ts +49 -15
  28. package/package.json +90 -75
  29. package/qemu.config +2 -2
  30. package/sandbox.ts +2094 -0
  31. package/scheduler.ts +1 -1
  32. package/server.ts +52 -0
  33. package/tsconfig.json +11 -12
  34. package/virtual.ts +1105 -0
  35. package/virtualgpu.ts +1 -1
  36. package/virtualization.ts +1 -1
  37. package/workloadlaw.ts +293 -0
  38. package/dist/App.d.ts +0 -5
  39. package/dist/App.js +0 -52
  40. package/dist/Sol/Sol.d.ts +0 -3
  41. package/dist/Sol/Sol.js +0 -46
  42. package/dist/Sol/agentbrowser/agentbrowser.d.ts +0 -9
  43. package/dist/Sol/agentbrowser/agentbrowser.js +0 -121
  44. package/dist/Sol/architecture/architecture.d.ts +0 -9
  45. package/dist/Sol/architecture/architecture.js +0 -93
  46. package/dist/Sol/compute/compute.d.ts +0 -9
  47. package/dist/Sol/compute/compute.js +0 -22
  48. package/dist/Sol/console/console.d.ts +0 -15
  49. package/dist/Sol/console/console.js +0 -292
  50. package/dist/Sol/dashboard/dashboard.d.ts +0 -10
  51. package/dist/Sol/dashboard/dashboard.js +0 -181
  52. package/dist/Sol/docs/docs.d.ts +0 -9
  53. package/dist/Sol/docs/docs.js +0 -28
  54. package/dist/Sol/home/home.d.ts +0 -35
  55. package/dist/Sol/home/home.js +0 -239
  56. package/dist/Sol/integrations/integrations.d.ts +0 -9
  57. package/dist/Sol/integrations/integrations.js +0 -83
  58. package/dist/Sol/intro/intro.d.ts +0 -7
  59. package/dist/Sol/intro/intro.js +0 -102
  60. package/dist/Sol/login/login.d.ts +0 -16
  61. package/dist/Sol/login/login.js +0 -49
  62. package/dist/Sol/notfound/notfound.d.ts +0 -9
  63. package/dist/Sol/notfound/notfound.js +0 -15
  64. package/dist/Sol/onboarding/onboarding.d.ts +0 -25
  65. package/dist/Sol/onboarding/onboarding.js +0 -60
  66. package/dist/Sol/playground/playground.d.ts +0 -9
  67. package/dist/Sol/playground/playground.js +0 -127
  68. package/dist/Sol/register/register.d.ts +0 -16
  69. package/dist/Sol/register/register.js +0 -193
  70. package/dist/Sol/shell/Shell.d.ts +0 -124
  71. package/dist/Sol/shell/Shell.js +0 -335
  72. package/dist/Sol/wingets/ComputeBootladder.d.ts +0 -6
  73. package/dist/Sol/wingets/ComputeBootladder.js +0 -71
  74. package/dist/Sol/wingets/ComputeModalitycatalog.d.ts +0 -7
  75. package/dist/Sol/wingets/ComputeModalitycatalog.js +0 -71
  76. package/dist/Sol/wingets/ConsoleApibadge.d.ts +0 -7
  77. package/dist/Sol/wingets/ConsoleApibadge.js +0 -5
  78. package/dist/Sol/wingets/ConsoleEdgelaw.d.ts +0 -6
  79. package/dist/Sol/wingets/ConsoleEdgelaw.js +0 -36
  80. package/dist/Sol/wingets/ConsoleEventstimeline.d.ts +0 -19
  81. package/dist/Sol/wingets/ConsoleEventstimeline.js +0 -12
  82. package/dist/Sol/wingets/ConsoleSnapshotcontrols.d.ts +0 -8
  83. package/dist/Sol/wingets/ConsoleSnapshotcontrols.js +0 -8
  84. package/dist/Sol/wingets/ConsoleSpecpanel.d.ts +0 -21
  85. package/dist/Sol/wingets/ConsoleSpecpanel.js +0 -75
  86. package/dist/Sol/wingets/ConsoleTerminal.d.ts +0 -22
  87. package/dist/Sol/wingets/ConsoleTerminal.js +0 -77
  88. package/dist/Sol/wingets/DashboardAccountpanel.d.ts +0 -18
  89. package/dist/Sol/wingets/DashboardAccountpanel.js +0 -65
  90. package/dist/Sol/wingets/DashboardAdminpanel.d.ts +0 -6
  91. package/dist/Sol/wingets/DashboardAdminpanel.js +0 -90
  92. package/dist/Sol/wingets/DashboardAuditlog.d.ts +0 -8
  93. package/dist/Sol/wingets/DashboardAuditlog.js +0 -50
  94. package/dist/Sol/wingets/DashboardCreatesandboxform.d.ts +0 -10
  95. package/dist/Sol/wingets/DashboardCreatesandboxform.js +0 -71
  96. package/dist/Sol/wingets/DashboardEventstimeline.d.ts +0 -8
  97. package/dist/Sol/wingets/DashboardEventstimeline.js +0 -83
  98. package/dist/Sol/wingets/DashboardGlobalsandboxestable.d.ts +0 -8
  99. package/dist/Sol/wingets/DashboardGlobalsandboxestable.js +0 -57
  100. package/dist/Sol/wingets/DashboardMeshnodestable.d.ts +0 -8
  101. package/dist/Sol/wingets/DashboardMeshnodestable.js +0 -103
  102. package/dist/Sol/wingets/DashboardSandboxlist.d.ts +0 -10
  103. package/dist/Sol/wingets/DashboardSandboxlist.js +0 -163
  104. package/dist/Sol/wingets/DashboardUserstable.d.ts +0 -8
  105. package/dist/Sol/wingets/DashboardUserstable.js +0 -78
  106. package/dist/Sol/wingets/HomeEntrygate.d.ts +0 -23
  107. package/dist/Sol/wingets/HomeEntrygate.js +0 -73
  108. package/dist/Sol/wingets/HomeMetricstrip.d.ts +0 -9
  109. package/dist/Sol/wingets/HomeMetricstrip.js +0 -4
  110. package/dist/Sol/wingets/HomeRuntimediagram.d.ts +0 -1
  111. package/dist/Sol/wingets/HomeRuntimediagram.js +0 -22
  112. package/dist/Sol/wingets/LoginForm.d.ts +0 -19
  113. package/dist/Sol/wingets/LoginForm.js +0 -141
  114. package/dist/Sol/wingets/RegisterPasswordconfirm.d.ts +0 -13
  115. package/dist/Sol/wingets/RegisterPasswordconfirm.js +0 -16
  116. package/dist/Sol/wingets/RegisterPasswordmeter.d.ts +0 -19
  117. package/dist/Sol/wingets/RegisterPasswordmeter.js +0 -65
  118. package/dist/Sol/wingets/RegisterUsernamerules.d.ts +0 -11
  119. package/dist/Sol/wingets/RegisterUsernamerules.js +0 -16
  120. package/dist/Sol/wingets/index.d.ts +0 -39
  121. package/dist/Sol/wingets/index.js +0 -39
  122. package/dist/alternatives.d.ts +0 -508
  123. package/dist/alternatives.js +0 -950
  124. package/dist/api.d.ts +0 -154
  125. package/dist/api.js +0 -174
  126. package/dist/auth.d.ts +0 -268
  127. package/dist/auth.js +0 -476
  128. package/dist/automation.d.ts +0 -425
  129. package/dist/automation.js +0 -566
  130. package/dist/browser.d.ts +0 -561
  131. package/dist/browser.js +0 -1058
  132. package/dist/capacitor.config.d.ts +0 -45
  133. package/dist/capacitor.config.js +0 -48
  134. package/dist/catalog.d.ts +0 -43
  135. package/dist/catalog.js +0 -44
  136. package/dist/cli.d.ts +0 -16
  137. package/dist/cli.js +0 -168
  138. package/dist/communication.d.ts +0 -181
  139. package/dist/communication.js +0 -376
  140. package/dist/compute.d.ts +0 -1160
  141. package/dist/compute.js +0 -2272
  142. package/dist/dashboardlib.d.ts +0 -58
  143. package/dist/dashboardlib.js +0 -161
  144. package/dist/db.d.ts +0 -569
  145. package/dist/db.js +0 -1080
  146. package/dist/distribution.d.ts +0 -528
  147. package/dist/distribution.js +0 -810
  148. package/dist/drizzle.config.d.ts +0 -20
  149. package/dist/drizzle.config.js +0 -18
  150. package/dist/edgelandes.d.ts +0 -70
  151. package/dist/edgelandes.host.d.ts +0 -26
  152. package/dist/edgelandes.host.js +0 -1089
  153. package/dist/edgelandes.inproc.d.ts +0 -27
  154. package/dist/edgelandes.inproc.js +0 -952
  155. package/dist/edgelandes.js +0 -1133
  156. package/dist/edgelandes.ninety.d.ts +0 -31
  157. package/dist/edgelandes.ninety.js +0 -174
  158. package/dist/edgelandes.virtual.d.ts +0 -25
  159. package/dist/edgelandes.virtual.js +0 -629
  160. package/dist/edgeplane.d.ts +0 -114
  161. package/dist/edgeplane.js +0 -305
  162. package/dist/examplelocaljob.d.ts +0 -1
  163. package/dist/examplelocaljob.js +0 -14
  164. package/dist/execution.d.ts +0 -529
  165. package/dist/execution.js +0 -760
  166. package/dist/family.d.ts +0 -16
  167. package/dist/family.js +0 -42
  168. package/dist/familyurl.d.ts +0 -21
  169. package/dist/familyurl.js +0 -24
  170. package/dist/format.d.ts +0 -18
  171. package/dist/format.js +0 -59
  172. package/dist/foundation.d.ts +0 -172
  173. package/dist/foundation.js +0 -312
  174. package/dist/index.d.ts +0 -735
  175. package/dist/index.js +0 -1020
  176. package/dist/integration.d.ts +0 -235
  177. package/dist/integration.js +0 -228
  178. package/dist/intelligence.d.ts +0 -93
  179. package/dist/intelligence.js +0 -144
  180. package/dist/isolation.d.ts +0 -128
  181. package/dist/isolation.js +0 -95
  182. package/dist/labels.d.ts +0 -665
  183. package/dist/labels.js +0 -751
  184. package/dist/localauth.d.ts +0 -127
  185. package/dist/localauth.js +0 -413
  186. package/dist/media.d.ts +0 -343
  187. package/dist/media.js +0 -985
  188. package/dist/mesh.d.ts +0 -177
  189. package/dist/mesh.js +0 -468
  190. package/dist/modalityregistry.d.ts +0 -109
  191. package/dist/modalityregistry.js +0 -1386
  192. package/dist/modes.d.ts +0 -358
  193. package/dist/modes.js +0 -133
  194. package/dist/onboardingstate.d.ts +0 -79
  195. package/dist/onboardingstate.js +0 -282
  196. package/dist/orchestrator.d.ts +0 -1338
  197. package/dist/orchestrator.js +0 -4310
  198. package/dist/packager/targetcli.js +0 -4
  199. package/dist/paths.d.ts +0 -2
  200. package/dist/paths.js +0 -14
  201. package/dist/performance.d.ts +0 -415
  202. package/dist/performance.js +0 -826
  203. package/dist/quantum.d.ts +0 -809
  204. package/dist/quantum.js +0 -2072
  205. package/dist/render.d.ts +0 -380
  206. package/dist/render.js +0 -1072
  207. package/dist/runall.d.ts +0 -2
  208. package/dist/runall.js +0 -39
  209. package/dist/runtimeprobe.d.ts +0 -4
  210. package/dist/runtimeprobe.js +0 -8
  211. package/dist/sandbox.d.ts +0 -355
  212. package/dist/sandbox.js +0 -1721
  213. package/dist/sandboxenvprofile.d.ts +0 -29
  214. package/dist/sandboxenvprofile.js +0 -89
  215. package/dist/sandboxprofile.d.ts +0 -137
  216. package/dist/sandboxprofile.js +0 -241
  217. package/dist/sandboxqueue.d.ts +0 -108
  218. package/dist/sandboxqueue.js +0 -201
  219. package/dist/sandboxquota.d.ts +0 -121
  220. package/dist/sandboxquota.js +0 -236
  221. package/dist/scheduler.d.ts +0 -595
  222. package/dist/scheduler.js +0 -1258
  223. package/dist/scriptlanes.d.ts +0 -182
  224. package/dist/scriptlanes.js +0 -660
  225. package/dist/scripts.buildengine.d.ts +0 -1
  226. package/dist/scripts.buildengine.js +0 -39
  227. package/dist/scripts.securitygate.d.ts +0 -1
  228. package/dist/scripts.securitygate.js +0 -68
  229. package/dist/scripts.validateflatnative.d.ts +0 -1
  230. package/dist/scripts.validateflatnative.js +0 -72
  231. package/dist/security.d.ts +0 -500
  232. package/dist/security.js +0 -1169
  233. package/dist/seedcatalog.d.ts +0 -13
  234. package/dist/seedcatalog.js +0 -46
  235. package/dist/server.d.ts +0 -20
  236. package/dist/server.js +0 -53
  237. package/dist/speccatalog.d.ts +0 -31
  238. package/dist/speccatalog.js +0 -163
  239. package/dist/tiers.d.ts +0 -1001
  240. package/dist/tiers.js +0 -2169
  241. package/dist/utils.d.ts +0 -2
  242. package/dist/utils.js +0 -5
  243. package/dist/vaulthandoff.d.ts +0 -141
  244. package/dist/vaulthandoff.js +0 -444
  245. package/dist/virtual.d.ts +0 -640
  246. package/dist/virtual.js +0 -1284
  247. package/dist/virtualcpu.d.ts +0 -315
  248. package/dist/virtualcpu.js +0 -1180
  249. package/dist/virtualgpu.d.ts +0 -344
  250. package/dist/virtualgpu.js +0 -1000
  251. package/dist/virtualization.d.ts +0 -606
  252. package/dist/virtualization.js +0 -1186
  253. package/dist/virtualmemory.d.ts +0 -817
  254. package/dist/virtualmemory.js +0 -1795
  255. package/dist/vite.config.d.ts +0 -3
  256. package/dist/vite.config.js +0 -43
  257. package/dist/vitest.config.d.ts +0 -2
  258. package/dist/vitest.config.js +0 -25
  259. package/dist/webserver.d.ts +0 -166
  260. package/dist/webserver.js +0 -2226
  261. package/dist/workloadlaw.d.ts +0 -133
  262. package/dist/workloadlaw.js +0 -193
  263. package/manifest.json +0 -20
  264. package/media.ts +0 -1337
  265. /package/docs/{architecture.1.8.19.md → architecture1819.md} +0 -0
  266. /package/docs/{architecture.1.8.19.mmd → architecture1819.mmd} +0 -0
  267. /package/docs/{artifactresearch.1.8.9.md → artifactresearch189.md} +0 -0
  268. /package/docs/{batches.1816.to.1820.md → batches1816to1820.md} +0 -0
  269. /package/docs/{brancharchive.2026.08.18.md → brancharchive20260818.md} +0 -0
  270. /package/docs/{containerplatforms.1.8.17.md → containerplatforms1817.md} +0 -0
  271. /package/docs/{e2ugh.engine.md → e2ughengine.md} +0 -0
  272. /package/docs/{flatbuildresearch.1.8.11.md → flatbuildresearch1811.md} +0 -0
  273. /package/docs/{licenseaudit.1.8.12.md → licenseaudit1812.md} +0 -0
  274. /package/docs/{mobileconversionresearch.1.8.10.md → mobileconversionresearch1810.md} +0 -0
  275. /package/docs/{nativeidentityresearch.1.8.11.md → nativeidentityresearch1811.md} +0 -0
  276. /package/docs/{native.wrappers.md → nativewrappers.md} +0 -0
  277. /package/docs/{planning.1.8.18.md → planning1818.md} +0 -0
  278. /package/docs/{planning.1.8.19.md → planning1819.md} +0 -0
  279. /package/docs/{planning.engine.md → planningengine.md} +0 -0
  280. /package/docs/{releasenotes.1.8.12.md → releasenotes1812.md} +0 -0
  281. /package/docs/{releasenotes.1.8.15.md → releasenotes1815.md} +0 -0
  282. /package/docs/{releasenotes.1.8.16.md → releasenotes1816.md} +0 -0
  283. /package/docs/{releasenotes.1.8.17.md → releasenotes1817.md} +0 -0
  284. /package/docs/{releasenotes.1.8.18.md → releasenotes1818.md} +0 -0
  285. /package/docs/{releasenotes.1.8.19.md → releasenotes1819.md} +0 -0
  286. /package/docs/{reorganization.1.8.8.md → reorganization188.md} +0 -0
  287. /package/docs/{reorganization.1.8.9.md → reorganization189.md} +0 -0
  288. /package/docs/{repo.analysis.1.8.21.json → repoanalysis1821.json} +0 -0
  289. /package/docs/{repo.candidates.1.8.21.jsonl → repocandidates1821.jsonl} +0 -0
  290. /package/docs/{repo.research.1.8.16.md → reporesearch1816.md} +0 -0
  291. /package/docs/{repo.research.1.8.21.md → reporesearch1821.md} +0 -0
  292. /package/docs/{repo.selected.1.8.21.json → reposelected1821.json} +0 -0
  293. /package/docs/{repo.synthesis.1.8.21.md → reposynthesis1821.md} +0 -0
  294. /package/docs/{research.1.8.18.isolation.md → research1818isolation.md} +0 -0
  295. /package/docs/{research.1.8.19.virtual.browser.md → research1819virtualbrowser.md} +0 -0
  296. /package/docs/{scanningresearch.1.8.11.md → scanningresearch1811.md} +0 -0
  297. /package/docs/{securityaudit.1.8.7.md → securityaudit187.md} +0 -0
  298. /package/docs/{securityreferences.1.8.11.md → securityreferences1811.md} +0 -0
  299. /package/docs/{securityresearch.1.8.11.md → securityresearch1811.md} +0 -0
  300. /package/docs/{signingresearch.1.8.12.md → signingresearch1812.md} +0 -0
  301. /package/docs/{tauri.glib.risk.1.8.11.md → tauriglibrisk1811.md} +0 -0
  302. /package/docs/{todo.1.8.18.md → todo1818.md} +0 -0
  303. /package/docs/{todo.1.8.19.md → todo1819.md} +0 -0
  304. /package/docs/{toolchainresearch.1.8.9.md → toolchainresearch189.md} +0 -0
  305. /package/docs/{web.duplicatecleanup.md → webduplicatecleanup.md} +0 -0
  306. /package/docs/{web.ideas.md → webideas.md} +0 -0
  307. /package/docs/{workflowimprovements.2026.08.19.md → workflowimprovements20260819.md} +0 -0
@@ -1,508 +0,0 @@
1
- /**
2
- * alternatives.ts - Virtual Hardware Engine v5
3
- *
4
- * Ten categories of alternative sandbox engines, each one wired through a
5
- * real adapter implementing the shared SandboxEngine interface
6
- * (create/exec/snapshot/destroy/metrics). A registry with factories and
7
- * alias resolution lets hosts swap execution backends without touching
8
- * call sites, and a comparison matrix carries the data verified during the
9
- * 2026-08-22 research pass.
10
- *
11
- * Engine categories (versions verified 2026-08-22):
12
- * 1. wasmtime v48.0.0 - fuel + epoch, WASI 0.3.0 async components
13
- * 2. gvisor release-20260817.0 - runsc, systrap, 10-30% I/O overhead
14
- * 3. kata 4.1.0 - runtime-rs (Rust) default, OpenVMM support
15
- * 4. cloud-hypervisor v53.0 - rust-vmm VMM, offloaded snapshots, vfio-user
16
- * 5. webcontainers - Node.js inside the browser sandbox (StackBlitz)
17
- * 6. daytona - ~90ms stateful sandboxes, self-hosted, MCP
18
- * 7. modal - 100k+ concurrent sandboxes, elastic GPUs
19
- * 8. fly-machines - Firecracker microVMs across ~35 regions
20
- * 9. e2b family - E2B, Morph, Cognitora, Vercel Sandbox
21
- * 10. apple-containers 1.2.2 - Swift microVMs on macOS, <1s boot
22
- *
23
- * Related contexts covered by this file (25):
24
- * Wasmtime, WASI 0.3.0, fuel metering, epoch interruption, runsc, systrap,
25
- * DirectFS, Kata Containers runtime-rs, OpenVMM, Dragonball, rust-vmm,
26
- * Cloud Hypervisor, vfio-user, userfaultfd snapshots, WebContainers,
27
- * StackBlitz, Daytona, MCP servers, Modal, Fly.io Machines, Firecracker,
28
- * E2B, Morph, Vercel Sandbox, Apple Containers.
29
- *
30
- * Module rules: no emoji, JSDoc in English, third-person voice, lowercase
31
- * identifiers, `using`/`satisfies`/`#private` modern TypeScript, node:* imports
32
- * first, try/catch on every fallible path, no hardcoded localhost endpoints.
33
- */
34
- /** Sandbox resource request shared by every engine adapter. */
35
- export interface SandboxSpec {
36
- readonly id?: string;
37
- readonly image?: string;
38
- readonly cpus: number;
39
- readonly memoryMb: number;
40
- readonly command: readonly string[];
41
- readonly timeoutMs?: number;
42
- }
43
- /** Live sandbox reference an adapter returns after a successful create. */
44
- export interface SandboxHandle {
45
- readonly id: string;
46
- readonly engine: string;
47
- readonly port: number;
48
- readonly createdAt: string;
49
- }
50
- /** Result of one exec call: exit code, captured stdout and wall duration. */
51
- export interface ExecResult {
52
- readonly exitCode: number;
53
- readonly stdout: string;
54
- readonly durationMs: number;
55
- }
56
- /** Reference to one persisted snapshot with its backend kind and size. */
57
- export interface SnapshotRef {
58
- readonly sandboxId: string;
59
- readonly backend: 'criu' | 'firecracker-file' | 'firecracker-uffd' | 'ch-offloaded' | 'state-pause' | 'component-image';
60
- readonly sizeMb: number;
61
- }
62
- /** Runtime metrics of one sandbox: boot time, memory, cpus and liveness. */
63
- export interface SandboxMetrics {
64
- readonly bootMs: number;
65
- readonly memoryMiB: number;
66
- readonly cpus: number;
67
- readonly running: boolean;
68
- }
69
- /** Declarative capability sheet every engine adapter advertises. */
70
- export interface SandboxCapabilities {
71
- readonly isolation: 'wasm-sandbox' | 'syscall-interception' | 'microvm' | 'browser' | 'cloud-sandbox' | 'container-vm';
72
- readonly snapshotting: boolean;
73
- readonly networkEgress: boolean;
74
- readonly gpu: boolean;
75
- readonly selfHosted: boolean;
76
- readonly requiresKvm: boolean;
77
- }
78
- /** The common interface every adapter implements. */
79
- export interface SandboxEngine {
80
- readonly id: string;
81
- readonly title: string;
82
- readonly category: string;
83
- readonly version: string;
84
- readonly capabilities: SandboxCapabilities;
85
- create(spec: SandboxSpec): Promise<SandboxHandle>;
86
- exec(sandboxId: string, command: readonly string[]): Promise<ExecResult>;
87
- snapshot(sandboxId: string): Promise<SnapshotRef>;
88
- destroy(sandboxId: string): Promise<void>;
89
- metrics(sandboxId: string): SandboxMetrics;
90
- }
91
- /** Error raised for unknown sandboxes or unsupported capabilities. */
92
- export declare class SandboxEngineError extends Error {
93
- readonly engine: string;
94
- constructor(engine: string, message: string);
95
- }
96
- /** Picks an ephemeral port; the engine never hardcodes endpoints. */
97
- export declare function randomPort(): number;
98
- /**
99
- * Base class consolidating lifecycle bookkeeping so each adapter only
100
- * declares its engine-specific facts and behaviors.
101
- */
102
- declare abstract class BaseEngine implements SandboxEngine {
103
- #private;
104
- abstract readonly id: string;
105
- abstract readonly title: string;
106
- abstract readonly category: string;
107
- abstract readonly version: string;
108
- abstract readonly capabilities: SandboxCapabilities;
109
- /** Documented cold start in milliseconds (used by the latency model). */
110
- protected abstract get coldBootMs(): number;
111
- /** Extra per-call latency the isolation layer adds (0-0.3 for gVisor-like). */
112
- protected abstract get execOverheadRatio(): number;
113
- create(spec: SandboxSpec): Promise<SandboxHandle>;
114
- exec(sandboxId: string, command: readonly string[]): Promise<ExecResult>;
115
- snapshot(sandboxId: string): Promise<SnapshotRef>;
116
- protected abstract snapshotBackend(): SnapshotRef['backend'];
117
- destroy(sandboxId: string): Promise<void>;
118
- metrics(sandboxId: string): SandboxMetrics;
119
- /** Process overhead each sandbox costs on the host. */
120
- protected perSandboxOverheadMiB(): number;
121
- }
122
- /**
123
- * Adapter 1/10 - Wasmtime v48.0.0.
124
- * Runs guest components with fuel metering for deterministic budgets and
125
- * epoch interruption for wall-clock timeouts (~10% overhead, preferred over
126
- * fuel for timeouts). WASI 0.3.0 gives native async; components start with
127
- * deny-by-default capabilities.
128
- */
129
- export declare class WasmtimeEngine extends BaseEngine {
130
- #private;
131
- readonly id: 'wasmtime';
132
- readonly title = "Wasmtime + WASI 0.3 components";
133
- readonly category: 'wasm runtime sandbox';
134
- readonly version: '48.0.0';
135
- readonly capabilities: {
136
- readonly isolation: 'wasm-sandbox';
137
- readonly snapshotting: true;
138
- readonly networkEgress: false;
139
- readonly gpu: false;
140
- readonly selfHosted: true;
141
- readonly requiresKvm: false;
142
- };
143
- /** Sets the per-store fuel budget, the `--fuel` equivalent. */
144
- setFuelBudget(budget: number): this;
145
- /** Sets the epoch deadline used to interrupt runaway guests. */
146
- setEpochDeadline(deadlineMs: number): this;
147
- /**
148
- * Interrupt policy handed to the embedding host: epoch interruption traps
149
- * the guest at the deadline with roughly 10% runtime overhead, which beats
150
- * fuel accounting for wall-clock timeouts.
151
- */
152
- interruptPolicy(): {
153
- deadlineMs: number;
154
- mechanism: 'epoch';
155
- relativeOverhead: number;
156
- };
157
- /** Command line that runs a component under both guards. */
158
- runCommand(componentPath: string): string[];
159
- protected get coldBootMs(): number;
160
- protected get execOverheadRatio(): number;
161
- protected snapshotBackend(): SnapshotRef['backend'];
162
- }
163
- /**
164
- * Adapter 2/10 - gVisor runsc.
165
- * The Sentry intercepts syscalls through the systrap platform (seccomp
166
- * SECCOMP_RET_TRAP delivering SIGSYS), paying 10-30% on I/O-heavy workloads
167
- * (up to 2x on syscall-bound ones). DirectFS narrows the filesystem gap;
168
- * io_uring stays disabled by default for security.
169
- */
170
- export declare class GvisorEngine extends BaseEngine {
171
- #private;
172
- readonly id: 'gvisor';
173
- readonly title = "gVisor runsc (systrap)";
174
- readonly category: 'user-space kernel';
175
- readonly version: 'release-20260817.0';
176
- readonly capabilities: {
177
- readonly isolation: 'syscall-interception';
178
- readonly snapshotting: false;
179
- readonly networkEgress: true;
180
- readonly gpu: false;
181
- readonly selfHosted: true;
182
- readonly requiresKvm: false;
183
- };
184
- setPlatform(platform: 'systrap' | 'ptrace' | 'kvm'): this;
185
- /** daemon.json fragment selecting runsc plus the runtime flag docker uses. */
186
- dockerFlags(): {
187
- daemonJson: string;
188
- runFlag: string[];
189
- platformFlag: string[];
190
- };
191
- /** DirectFS shortens the filesystem path by letting the Sentry talk to the host FD directly. */
192
- get directFsEnabled(): boolean;
193
- /** Documented I/O overhead band relative to runc. */
194
- overheadBand(): {
195
- low: number;
196
- high: number;
197
- syscallBoundWorst: number;
198
- };
199
- protected get coldBootMs(): number;
200
- protected get execOverheadRatio(): number;
201
- protected snapshotBackend(): SnapshotRef['backend'];
202
- }
203
- /**
204
- * Adapter 3/10 - Kata Containers 4.1.0.
205
- * Runtime-rs (the Rust runtime, default since 4.0; the Go runtime is
206
- * deprecated and freezes at bugfix-only) drives hardware-isolated
207
- * microVMs. 4.1 adds OpenVMM support, Cloud Hypervisor VM templates,
208
- * configurable nested virtualization and NVSwitch passthrough via IOMMUFD.
209
- */
210
- export declare class KataEngine extends BaseEngine {
211
- #private;
212
- readonly id: 'kata';
213
- readonly title = "Kata Containers runtime-rs";
214
- readonly category: 'microvm container runtime';
215
- readonly version: '4.1.0';
216
- readonly capabilities: {
217
- readonly isolation: 'container-vm';
218
- readonly snapshotting: true;
219
- readonly networkEgress: true;
220
- readonly gpu: true;
221
- readonly selfHosted: true;
222
- readonly requiresKvm: true;
223
- };
224
- setHypervisor(hypervisor: 'cloud-hypervisor' | 'firecracker' | 'qemu' | 'dragonball' | 'openvmm'): this;
225
- /** kata-runtime configuration fragments for the selected hypervisor. */
226
- configurationToml(): string[];
227
- protected get coldBootMs(): number;
228
- protected get execOverheadRatio(): number;
229
- protected perSandboxOverheadMiB(): number;
230
- protected snapshotBackend(): SnapshotRef['backend'];
231
- }
232
- /**
233
- * Adapter 4/10 - Cloud Hypervisor v53.0.
234
- * Rust VMM built from rust-vmm crates (KVM and MSHV backends). v53 ships an
235
- * offloaded snapshot/restore daemon built on userfaultfd plus vhost-user,
236
- * migratable VFIO devices on the same host (for example mlx5_vfio_pci) and
237
- * experimental vfio-user devices through --user-device socket=<path>.
238
- */
239
- export declare class CloudHypervisorEngine extends BaseEngine {
240
- readonly id: 'cloud-hypervisor';
241
- readonly title = "Cloud Hypervisor (rust-vmm)";
242
- readonly category: 'rust VMM';
243
- readonly version: '53.0';
244
- readonly capabilities: {
245
- readonly isolation: 'microvm';
246
- readonly snapshotting: true;
247
- readonly networkEgress: true;
248
- readonly gpu: true;
249
- readonly selfHosted: true;
250
- readonly requiresKvm: true;
251
- };
252
- /** Command line for a software-isolated guest with the snapshot daemon. */
253
- launchCommand(cpus: number, memoryMb: number): string[];
254
- /** vfio-user device attach command (experimental in v53). */
255
- attachUserDevice(socketPath: string): string[];
256
- protected get coldBootMs(): number;
257
- protected get execOverheadRatio(): number;
258
- protected perSandboxOverheadMiB(): number;
259
- protected snapshotBackend(): SnapshotRef['backend'];
260
- }
261
- /**
262
- * Adapter 5/10 - WebContainers (StackBlitz).
263
- * Runs Node.js and npm entirely inside the browser sandbox over WebAssembly;
264
- * boot is measured in milliseconds and the host contributes zero server
265
- * footprint. The API is a commercial GA product; this adapter models the
266
- * client-side contract (boot, command execution, teardown) for parity with
267
- * server-side engines.
268
- */
269
- export declare class WebContainersEngine extends BaseEngine {
270
- readonly id: 'webcontainers';
271
- readonly title = "WebContainers (Node.js in the browser)";
272
- readonly category: 'browser runtime';
273
- readonly version: 'ga';
274
- readonly capabilities: {
275
- readonly isolation: 'browser';
276
- readonly snapshotting: false;
277
- readonly networkEgress: false;
278
- readonly gpu: false;
279
- readonly selfHosted: false;
280
- readonly requiresKvm: false;
281
- };
282
- /** Client bootstrap snippet the host page evaluates. */
283
- bootstrapSnippet(): string;
284
- protected get coldBootMs(): number;
285
- protected get execOverheadRatio(): number;
286
- protected perSandboxOverheadMiB(): number;
287
- protected snapshotBackend(): SnapshotRef['backend'];
288
- }
289
- /**
290
- * Adapter 6/10 - Daytona.
291
- * Creates stateful sandboxes in ~90ms, exposes MCP (Model Context Protocol)
292
- * servers for agent integration, and can be self-hosted from the open-source
293
- * core (the SaaS adds managed control planes and $200 of free compute).
294
- */
295
- export declare class DaytonaEngine extends BaseEngine {
296
- #private;
297
- readonly id: 'daytona';
298
- readonly title = "Daytona sandboxes";
299
- readonly category: 'self-hosted sandbox platform';
300
- readonly version: 'oss+saas';
301
- readonly capabilities: {
302
- readonly isolation: 'cloud-sandbox';
303
- readonly snapshotting: true;
304
- readonly networkEgress: true;
305
- readonly gpu: false;
306
- readonly selfHosted: true;
307
- readonly requiresKvm: false;
308
- };
309
- /** MCP server descriptor published for agent discovery. */
310
- mcpDescriptor(): {
311
- name: string;
312
- transport: string;
313
- tools: string[];
314
- };
315
- setRegion(region: string): this;
316
- get region(): string;
317
- protected get coldBootMs(): number;
318
- protected get execOverheadRatio(): number;
319
- protected snapshotBackend(): SnapshotRef['backend'];
320
- }
321
- /**
322
- * Adapter 7/10 - Modal.
323
- * Serverless container platform built for AI workloads: 100k+ concurrent
324
- * sandboxes per account, sub-second scheduling, elastic GPUs and sessions
325
- * up to 24 hours. Python-first (JavaScript is secondary), with strong
326
- * cold-start behavior for custom images.
327
- */
328
- export declare class ModalEngine extends BaseEngine {
329
- #private;
330
- readonly id: 'modal';
331
- readonly title = "Modal serverless sandboxes";
332
- readonly category: 'serverless container platform';
333
- readonly version: 'saas';
334
- readonly capabilities: {
335
- readonly isolation: 'cloud-sandbox';
336
- readonly snapshotting: true;
337
- readonly networkEgress: true;
338
- readonly gpu: true;
339
- readonly selfHosted: false;
340
- readonly requiresKvm: false;
341
- };
342
- /** Concurrency ceiling the platform documents per account. */
343
- get concurrencyCeiling(): number;
344
- /** Scheduling latency band: warm functions resume in milliseconds. */
345
- schedulingBand(): {
346
- warmMs: number;
347
- coldMs: number;
348
- maxSessionHours: number;
349
- };
350
- protected get coldBootMs(): number;
351
- protected get execOverheadRatio(): number;
352
- protected snapshotBackend(): SnapshotRef['backend'];
353
- }
354
- /**
355
- * Adapter 8/10 - Fly.io Machines.
356
- * Firecracker microVMs (the same foundation as AWS Lambda and Fargate)
357
- * started and stopped through a global API across roughly 35 regions.
358
- * Machines boot sub-second, snapshot fast and are addressable by private
359
- * network, which makes them a natural multi-region sandbox backend.
360
- */
361
- export declare class FlyMachinesEngine extends BaseEngine {
362
- #private;
363
- readonly id: 'fly-machines';
364
- readonly title = "Fly.io Machines (global Firecracker)";
365
- readonly category: 'global microVM API';
366
- readonly version: 'saas';
367
- readonly capabilities: {
368
- readonly isolation: 'microvm';
369
- readonly snapshotting: true;
370
- readonly networkEgress: true;
371
- readonly gpu: false;
372
- readonly selfHosted: false;
373
- readonly requiresKvm: false;
374
- };
375
- setPrimaryRegion(region: string): this;
376
- /** Region set the API can place machines in (2026 count: about 35). */
377
- regionCount(): number;
378
- get primaryRegion(): string;
379
- protected get coldBootMs(): number;
380
- protected get execOverheadRatio(): number;
381
- protected perSandboxOverheadMiB(): number;
382
- protected snapshotBackend(): SnapshotRef['backend'];
383
- }
384
- /** Member of the E2B-derived family covered by the facts table. */
385
- export type E2bFamilyVariant = 'e2b' | 'morph' | 'cognitora' | 'vercel-sandbox';
386
- /** Verified facts for each member of the E2B family. */
387
- export declare const e2bFamilyFacts: Readonly<Record<E2bFamilyVariant, {
388
- title: string;
389
- coldBootMs: number;
390
- snapshot: boolean;
391
- note: string;
392
- }>>;
393
- /**
394
- * Adapter 9/10 - the E2B family.
395
- * One adapter implementation covers E2B and its direct competitors; the
396
- * variant selects documented cold-start, snapshot support and positioning
397
- * so comparisons stay apples-to-apples.
398
- */
399
- export declare class E2bFamilyEngine extends BaseEngine {
400
- readonly variant: E2bFamilyVariant;
401
- constructor(variant?: E2bFamilyVariant);
402
- get id(): string;
403
- get title(): string;
404
- readonly category: 'AI-first sandbox cloud';
405
- readonly version: 'saas';
406
- get capabilities(): SandboxCapabilities;
407
- positioning(): string;
408
- protected get coldBootMs(): number;
409
- protected get execOverheadRatio(): number;
410
- protected perSandboxOverheadMiB(): number;
411
- protected snapshotBackend(): SnapshotRef['backend'];
412
- }
413
- /**
414
- * Adapter 10/10 - Apple Containers 1.2.2.
415
- * Swift open-source project running each Linux container inside a lightweight
416
- * microVM optimized for Apple Silicon; boot lands under one second. WWDC26
417
- * (2026-06-08) added "container machines" - persistent lightweight Linux
418
- * environments configured through TOML.
419
- */
420
- export declare class AppleContainersEngine extends BaseEngine {
421
- #private;
422
- readonly id: 'apple-containers';
423
- readonly title = "Apple Containers (Swift microVMs on macOS)";
424
- readonly category: 'macOS container runtime';
425
- readonly version: '1.2.2';
426
- readonly capabilities: {
427
- readonly isolation: 'container-vm';
428
- readonly snapshotting: false;
429
- readonly networkEgress: true;
430
- readonly gpu: false;
431
- readonly selfHosted: true;
432
- readonly requiresKvm: false;
433
- };
434
- /** Enables WWDC26 container machines (persistent Linux environments). */
435
- useContainerMachines(enabled: boolean): this;
436
- /** CLI invocation plus TOML config path when machine mode is active. */
437
- runCommand(image: string): string[];
438
- protected get coldBootMs(): number;
439
- protected get execOverheadRatio(): number;
440
- protected perSandboxOverheadMiB(): number;
441
- protected snapshotBackend(): SnapshotRef['backend'];
442
- }
443
- /** Registry entry: identity, category, version and snapshot support. */
444
- export interface EngineDescriptor {
445
- readonly id: string;
446
- readonly title: string;
447
- readonly category: string;
448
- readonly version: string;
449
- readonly snapshotting: boolean;
450
- }
451
- /**
452
- * Factory registry: hosts register constructors, create engines lazily and
453
- * resolve aliases (for example "runsc" resolves to gvisor). Unknown ids
454
- * produce a helpful error listing the closest known ids.
455
- */
456
- export declare class EngineRegistry {
457
- #private;
458
- register(id: string, factory: () => SandboxEngine, aliases?: readonly string[]): this;
459
- /** Creates (or reuses) the engine registered under id or one of its aliases. */
460
- create(id: string): SandboxEngine;
461
- list(): EngineDescriptor[];
462
- get size(): number;
463
- }
464
- /** Registry pre-loaded with all ten engine categories. */
465
- export declare function createDefaultEngineRegistry(): EngineRegistry;
466
- /** One flattened row of the cross-engine comparison matrix. */
467
- export interface ComparisonRow {
468
- readonly engine: string;
469
- readonly category: string;
470
- readonly version: string;
471
- readonly bootMs: number;
472
- readonly overhead: string;
473
- readonly isolation: string;
474
- readonly snapshot: string;
475
- readonly hosting: string;
476
- readonly standout: string;
477
- }
478
- /**
479
- * Comparison matrix with the data verified on 2026-08-22. Boot times are the
480
- * documented figures each adapter models; overhead strings quote the
481
- * measured bands from the engine documentation.
482
- */
483
- export declare const comparisonMatrix: readonly ComparisonRow[];
484
- /** Renders the comparison matrix as a markdown table for docs and CI logs. */
485
- export declare function renderComparisonTable(matrix?: readonly ComparisonRow[]): string;
486
- /** Weighted selection inputs: latency and isolation weights plus hard needs. */
487
- export interface SelectionCriteria {
488
- /** Importance of a low cold-start latency (0-10). */
489
- readonly bootLatency: number;
490
- /** Importance of maximum isolation strength (0-10). */
491
- readonly isolation: number;
492
- /** Requirement weights for specific capabilities. */
493
- readonly needSnapshot: boolean;
494
- readonly needGpu: boolean;
495
- readonly needSelfHosted: boolean;
496
- }
497
- /**
498
- * Scores every registered engine against the criteria and returns them
499
- * ranked with a rationale. Isolation strength ranks hardware microVMs and
500
- * wasm above syscall interception and browser sandboxes; boot latency
501
- * inversely follows the documented cold-start figure.
502
- */
503
- export declare function selectEngine(registry: EngineRegistry, criteria: SelectionCriteria, matrix?: readonly ComparisonRow[]): {
504
- engine: string;
505
- score: number;
506
- rationale: string;
507
- }[];
508
- export {};