@wenathlan/saddle 1.8.18 → 2.0.2

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 (802) hide show
  1. package/Dockerfile +1339 -0
  2. package/README.md +33 -12
  3. package/alternatives.ts +1218 -0
  4. package/biome.json +153 -0
  5. package/boards.json +1517 -0
  6. package/compute.ts +3144 -0
  7. package/cores.json +1801 -0
  8. package/dist/acquisition.d.ts +359 -0
  9. package/dist/acquisition.d.ts.map +1 -0
  10. package/dist/acquisition.js +629 -0
  11. package/dist/acquisition.js.map +1 -0
  12. package/dist/alternatives.d.ts +509 -0
  13. package/dist/alternatives.d.ts.map +1 -0
  14. package/dist/alternatives.js +951 -0
  15. package/dist/alternatives.js.map +1 -0
  16. package/dist/automation.d.ts +426 -0
  17. package/dist/automation.d.ts.map +1 -0
  18. package/dist/automation.js +561 -0
  19. package/dist/automation.js.map +1 -0
  20. package/dist/browser.d.ts +562 -0
  21. package/dist/browser.d.ts.map +1 -0
  22. package/dist/browser.js +1057 -0
  23. package/dist/browser.js.map +1 -0
  24. package/dist/capacitor.config.d.ts +13 -0
  25. package/dist/capacitor.config.d.ts.map +1 -0
  26. package/dist/capacitor.config.js +26 -0
  27. package/dist/capacitor.config.js.map +1 -0
  28. package/dist/cli.d.ts +17 -0
  29. package/dist/cli.d.ts.map +1 -0
  30. package/dist/cli.js +111 -0
  31. package/dist/cli.js.map +1 -0
  32. package/dist/communication.d.ts +192 -0
  33. package/dist/communication.d.ts.map +1 -0
  34. package/dist/communication.js +418 -0
  35. package/dist/communication.js.map +1 -0
  36. package/dist/compute.d.ts +1161 -0
  37. package/dist/compute.d.ts.map +1 -0
  38. package/dist/compute.js +2273 -0
  39. package/dist/compute.js.map +1 -0
  40. package/dist/distribution.d.ts +529 -0
  41. package/dist/distribution.d.ts.map +1 -0
  42. package/dist/distribution.js +811 -0
  43. package/dist/distribution.js.map +1 -0
  44. package/dist/execution.d.ts +530 -0
  45. package/dist/execution.d.ts.map +1 -0
  46. package/dist/execution.js +761 -0
  47. package/dist/execution.js.map +1 -0
  48. package/dist/format.d.ts +19 -0
  49. package/dist/format.d.ts.map +1 -0
  50. package/dist/format.js +60 -0
  51. package/dist/format.js.map +1 -0
  52. package/dist/foundation.d.ts +176 -0
  53. package/dist/foundation.d.ts.map +1 -0
  54. package/dist/foundation.js +309 -0
  55. package/dist/foundation.js.map +1 -0
  56. package/dist/index.d.ts +733 -123
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +1018 -123
  59. package/dist/index.js.map +1 -1
  60. package/dist/integration.d.ts +236 -0
  61. package/dist/integration.d.ts.map +1 -0
  62. package/dist/integration.js +236 -0
  63. package/dist/integration.js.map +1 -0
  64. package/dist/intelligence.d.ts +94 -0
  65. package/dist/intelligence.d.ts.map +1 -0
  66. package/dist/intelligence.js +145 -0
  67. package/dist/intelligence.js.map +1 -0
  68. package/dist/{isolation/contracts.d.ts → isolation.d.ts} +12 -1
  69. package/dist/isolation.d.ts.map +1 -0
  70. package/dist/{isolation/contracts.js → isolation.js} +13 -1
  71. package/dist/isolation.js.map +1 -0
  72. package/dist/media.d.ts +344 -0
  73. package/dist/media.d.ts.map +1 -0
  74. package/dist/media.js +986 -0
  75. package/dist/media.js.map +1 -0
  76. package/dist/modes.d.ts +359 -0
  77. package/dist/modes.d.ts.map +1 -0
  78. package/dist/modes.js +134 -0
  79. package/dist/modes.js.map +1 -0
  80. package/dist/{library/public.d.ts → operations.d.ts} +15 -1
  81. package/dist/operations.d.ts.map +1 -0
  82. package/dist/{library/public.js → operations.js} +18 -7
  83. package/dist/operations.js.map +1 -0
  84. package/dist/orchestrator.d.ts +1339 -0
  85. package/dist/orchestrator.d.ts.map +1 -0
  86. package/dist/orchestrator.js +4308 -0
  87. package/dist/orchestrator.js.map +1 -0
  88. package/dist/performance.d.ts +416 -0
  89. package/dist/performance.d.ts.map +1 -0
  90. package/dist/performance.js +827 -0
  91. package/dist/performance.js.map +1 -0
  92. package/dist/quantum.d.ts +810 -0
  93. package/dist/quantum.d.ts.map +1 -0
  94. package/dist/quantum.js +2073 -0
  95. package/dist/quantum.js.map +1 -0
  96. package/dist/render.d.ts +381 -0
  97. package/dist/render.d.ts.map +1 -0
  98. package/dist/render.js +1073 -0
  99. package/dist/render.js.map +1 -0
  100. package/dist/scheduler.d.ts +596 -0
  101. package/dist/scheduler.d.ts.map +1 -0
  102. package/dist/scheduler.js +1259 -0
  103. package/dist/scheduler.js.map +1 -0
  104. package/dist/security.d.ts +501 -0
  105. package/dist/security.d.ts.map +1 -0
  106. package/dist/security.js +1170 -0
  107. package/dist/security.js.map +1 -0
  108. package/dist/server.d.ts +21 -0
  109. package/dist/server.d.ts.map +1 -0
  110. package/dist/{server/node.js → server.js} +16 -2
  111. package/dist/server.js.map +1 -0
  112. package/dist/tiers.d.ts +1002 -0
  113. package/dist/tiers.d.ts.map +1 -0
  114. package/dist/tiers.js +2165 -0
  115. package/dist/tiers.js.map +1 -0
  116. package/dist/virtual.d.ts +641 -0
  117. package/dist/virtual.d.ts.map +1 -0
  118. package/dist/virtual.js +1285 -0
  119. package/dist/virtual.js.map +1 -0
  120. package/dist/virtualcpu.d.ts +316 -0
  121. package/dist/virtualcpu.d.ts.map +1 -0
  122. package/dist/virtualcpu.js +1180 -0
  123. package/dist/virtualcpu.js.map +1 -0
  124. package/dist/virtualgpu.d.ts +345 -0
  125. package/dist/virtualgpu.d.ts.map +1 -0
  126. package/dist/virtualgpu.js +1000 -0
  127. package/dist/virtualgpu.js.map +1 -0
  128. package/dist/virtualization.d.ts +607 -0
  129. package/dist/virtualization.d.ts.map +1 -0
  130. package/dist/virtualization.js +1187 -0
  131. package/dist/virtualization.js.map +1 -0
  132. package/dist/virtualmemory.d.ts +818 -0
  133. package/dist/virtualmemory.d.ts.map +1 -0
  134. package/dist/virtualmemory.js +1796 -0
  135. package/dist/virtualmemory.js.map +1 -0
  136. package/dist/webscrape.d.ts +720 -0
  137. package/dist/webscrape.d.ts.map +1 -0
  138. package/dist/webscrape.js +2697 -0
  139. package/dist/webscrape.js.map +1 -0
  140. package/docker.config +769 -0
  141. package/docs/CONVERSA.txt +1523 -0
  142. package/docs/alternatives.md +499 -0
  143. package/docs/architecture-1.8.19.md +76 -0
  144. package/docs/architecture-1.8.19.mmd +33 -0
  145. package/docs/architecture-1.8.19.png +0 -0
  146. package/docs/architecture.md +355 -0
  147. package/docs/brancharchive-2026-08-18.md +18 -0
  148. package/docs/browser.md +7 -0
  149. package/docs/consolidation.md +70 -0
  150. package/docs/e2ugh-engine.md +528 -0
  151. package/{dist/examples/localjob.js → docs/example-localjob.ts} +3 -3
  152. package/{dist/examples/publicapi.js → docs/example-publicapi.ts} +2 -2
  153. package/docs/hardware.md +342 -0
  154. package/docs/optimization.md +126 -0
  155. package/docs/performance.md +499 -0
  156. package/docs/planning.1.8.18.md +94 -0
  157. package/docs/planning.1.8.19.md +49 -0
  158. package/docs/releasenotes-1.8.19.md +35 -0
  159. package/docs/research-1.8.19-virtual-browser.md +27 -0
  160. package/docs/security.md +454 -0
  161. package/docs/todo-1.8.18.md +12 -0
  162. package/docs/todo-1.8.19.md +241 -0
  163. package/docs/viability.md +777 -0
  164. package/docs/virtualization.md +335 -0
  165. package/docs/web-duplicatecleanup.md +9 -0
  166. package/docs/web-ideas.md +106 -0
  167. package/docs/workflowimprovements-2026-08-19.md +70 -0
  168. package/gpumonitor.cpp +1543 -0
  169. package/gpus.json +2408 -0
  170. package/index.ts +1478 -0
  171. package/media.ts +1337 -0
  172. package/mttg.config +1549 -0
  173. package/orchestrator.ts +5462 -0
  174. package/package.json +304 -56
  175. package/passage.config +1331 -0
  176. package/performance.ts +1049 -0
  177. package/processors.json +2217 -0
  178. package/qemu.config +1062 -0
  179. package/qemubridge.py +1340 -0
  180. package/quantum.ts +2393 -0
  181. package/render.ts +1325 -0
  182. package/scheduler.ts +1600 -0
  183. package/security.ts +1449 -0
  184. package/tiers.ts +2871 -0
  185. package/tsconfig.json +29 -0
  186. package/virtualcpu.ts +1273 -0
  187. package/virtualgpu.ts +1181 -0
  188. package/virtualhardware.c +1011 -0
  189. package/virtualhardware.json +739 -0
  190. package/virtualization.ts +1628 -0
  191. package/virtualizationcore.cpp +4635 -0
  192. package/virtualmemory.ts +2303 -0
  193. package/vm.config.json +1910 -0
  194. package/{extension → web/extension}/manifest.json +1 -1
  195. package/web/readme.md +382 -0
  196. package/web/tsconfig.json +25 -0
  197. package/dist/adapters/forge.d.ts +0 -17
  198. package/dist/adapters/forge.d.ts.map +0 -1
  199. package/dist/adapters/forge.js +0 -19
  200. package/dist/adapters/forge.js.map +0 -1
  201. package/dist/adapters/forgejo.d.ts +0 -49
  202. package/dist/adapters/forgejo.d.ts.map +0 -1
  203. package/dist/adapters/forgejo.js +0 -8
  204. package/dist/adapters/forgejo.js.map +0 -1
  205. package/dist/adapters/github.d.ts +0 -12
  206. package/dist/adapters/github.d.ts.map +0 -1
  207. package/dist/adapters/github.js +0 -20
  208. package/dist/adapters/github.js.map +0 -1
  209. package/dist/adapters/gitlab.d.ts +0 -17
  210. package/dist/adapters/gitlab.d.ts.map +0 -1
  211. package/dist/adapters/gitlab.js +0 -10
  212. package/dist/adapters/gitlab.js.map +0 -1
  213. package/dist/adapters/huggingface.d.ts +0 -17
  214. package/dist/adapters/huggingface.d.ts.map +0 -1
  215. package/dist/adapters/huggingface.js +0 -6
  216. package/dist/adapters/huggingface.js.map +0 -1
  217. package/dist/adapters/socket.d.ts +0 -11
  218. package/dist/adapters/socket.d.ts.map +0 -1
  219. package/dist/adapters/socket.js +0 -17
  220. package/dist/adapters/socket.js.map +0 -1
  221. package/dist/adapters/transport.d.ts +0 -7
  222. package/dist/adapters/transport.d.ts.map +0 -1
  223. package/dist/adapters/transport.js +0 -36
  224. package/dist/adapters/transport.js.map +0 -1
  225. package/dist/ai/chunk.d.ts +0 -2
  226. package/dist/ai/chunk.d.ts.map +0 -1
  227. package/dist/ai/chunk.js +0 -36
  228. package/dist/ai/chunk.js.map +0 -1
  229. package/dist/ai/llmstxt.d.ts +0 -6
  230. package/dist/ai/llmstxt.d.ts.map +0 -1
  231. package/dist/ai/llmstxt.js +0 -12
  232. package/dist/ai/llmstxt.js.map +0 -1
  233. package/dist/ai/provenance.d.ts +0 -22
  234. package/dist/ai/provenance.d.ts.map +0 -1
  235. package/dist/ai/provenance.js +0 -25
  236. package/dist/ai/provenance.js.map +0 -1
  237. package/dist/ai/rag.d.ts +0 -26
  238. package/dist/ai/rag.d.ts.map +0 -1
  239. package/dist/ai/rag.js +0 -22
  240. package/dist/ai/rag.js.map +0 -1
  241. package/dist/ai/tokens.d.ts +0 -15
  242. package/dist/ai/tokens.d.ts.map +0 -1
  243. package/dist/ai/tokens.js +0 -9
  244. package/dist/ai/tokens.js.map +0 -1
  245. package/dist/api/auth.d.ts +0 -16
  246. package/dist/api/auth.d.ts.map +0 -1
  247. package/dist/api/auth.js +0 -19
  248. package/dist/api/auth.js.map +0 -1
  249. package/dist/api/contracts.d.ts +0 -28
  250. package/dist/api/contracts.d.ts.map +0 -1
  251. package/dist/api/contracts.js +0 -14
  252. package/dist/api/contracts.js.map +0 -1
  253. package/dist/api/control.d.ts +0 -10
  254. package/dist/api/control.d.ts.map +0 -1
  255. package/dist/api/control.js +0 -35
  256. package/dist/api/control.js.map +0 -1
  257. package/dist/api/http.d.ts +0 -7
  258. package/dist/api/http.d.ts.map +0 -1
  259. package/dist/api/http.js +0 -12
  260. package/dist/api/http.js.map +0 -1
  261. package/dist/api/rate.d.ts +0 -28
  262. package/dist/api/rate.d.ts.map +0 -1
  263. package/dist/api/rate.js +0 -36
  264. package/dist/api/rate.js.map +0 -1
  265. package/dist/api/security.d.ts +0 -12
  266. package/dist/api/security.d.ts.map +0 -1
  267. package/dist/api/security.js +0 -56
  268. package/dist/api/security.js.map +0 -1
  269. package/dist/api/service.d.ts +0 -5
  270. package/dist/api/service.d.ts.map +0 -1
  271. package/dist/api/service.js +0 -70
  272. package/dist/api/service.js.map +0 -1
  273. package/dist/apps/registry.d.ts +0 -33
  274. package/dist/apps/registry.d.ts.map +0 -1
  275. package/dist/apps/registry.js +0 -24
  276. package/dist/apps/registry.js.map +0 -1
  277. package/dist/binary/archive.d.ts +0 -27
  278. package/dist/binary/archive.d.ts.map +0 -1
  279. package/dist/binary/archive.js +0 -46
  280. package/dist/binary/archive.js.map +0 -1
  281. package/dist/binary/build.d.ts +0 -29
  282. package/dist/binary/build.d.ts.map +0 -1
  283. package/dist/binary/build.js +0 -17
  284. package/dist/binary/build.js.map +0 -1
  285. package/dist/binary/transform.d.ts +0 -70
  286. package/dist/binary/transform.d.ts.map +0 -1
  287. package/dist/binary/transform.js +0 -105
  288. package/dist/binary/transform.js.map +0 -1
  289. package/dist/bot/adapter.d.ts +0 -5
  290. package/dist/bot/adapter.d.ts.map +0 -1
  291. package/dist/bot/adapter.js +0 -11
  292. package/dist/bot/adapter.js.map +0 -1
  293. package/dist/bot/bot.d.ts +0 -28
  294. package/dist/bot/bot.d.ts.map +0 -1
  295. package/dist/bot/bot.js +0 -52
  296. package/dist/bot/bot.js.map +0 -1
  297. package/dist/bot/commands.d.ts +0 -8
  298. package/dist/bot/commands.d.ts.map +0 -1
  299. package/dist/bot/commands.js +0 -19
  300. package/dist/bot/commands.js.map +0 -1
  301. package/dist/bot/permissions.d.ts +0 -13
  302. package/dist/bot/permissions.d.ts.map +0 -1
  303. package/dist/bot/permissions.js +0 -16
  304. package/dist/bot/permissions.js.map +0 -1
  305. package/dist/browser/actions.d.ts +0 -33
  306. package/dist/browser/actions.d.ts.map +0 -1
  307. package/dist/browser/actions.js +0 -44
  308. package/dist/browser/actions.js.map +0 -1
  309. package/dist/browser/agent.d.ts +0 -21
  310. package/dist/browser/agent.d.ts.map +0 -1
  311. package/dist/browser/agent.js +0 -13
  312. package/dist/browser/agent.js.map +0 -1
  313. package/dist/browser/context.d.ts +0 -43
  314. package/dist/browser/context.d.ts.map +0 -1
  315. package/dist/browser/context.js +0 -54
  316. package/dist/browser/context.js.map +0 -1
  317. package/dist/browser/fingerprint.d.ts +0 -4
  318. package/dist/browser/fingerprint.d.ts.map +0 -1
  319. package/dist/browser/fingerprint.js +0 -12
  320. package/dist/browser/fingerprint.js.map +0 -1
  321. package/dist/browser/index.d.ts +0 -11
  322. package/dist/browser/index.d.ts.map +0 -1
  323. package/dist/browser/index.js +0 -11
  324. package/dist/browser/index.js.map +0 -1
  325. package/dist/browser/playwright.d.ts +0 -11
  326. package/dist/browser/playwright.d.ts.map +0 -1
  327. package/dist/browser/playwright.js +0 -24
  328. package/dist/browser/playwright.js.map +0 -1
  329. package/dist/browser/recorder.d.ts +0 -21
  330. package/dist/browser/recorder.d.ts.map +0 -1
  331. package/dist/browser/recorder.js +0 -58
  332. package/dist/browser/recorder.js.map +0 -1
  333. package/dist/browser/session.d.ts +0 -14
  334. package/dist/browser/session.d.ts.map +0 -1
  335. package/dist/browser/session.js +0 -21
  336. package/dist/browser/session.js.map +0 -1
  337. package/dist/browser/snapshot.d.ts +0 -69
  338. package/dist/browser/snapshot.d.ts.map +0 -1
  339. package/dist/browser/snapshot.js +0 -133
  340. package/dist/browser/snapshot.js.map +0 -1
  341. package/dist/captcha/contract.d.ts +0 -35
  342. package/dist/captcha/contract.d.ts.map +0 -1
  343. package/dist/captcha/contract.js +0 -17
  344. package/dist/captcha/contract.js.map +0 -1
  345. package/dist/captcha/evidence.d.ts +0 -10
  346. package/dist/captcha/evidence.d.ts.map +0 -1
  347. package/dist/captcha/evidence.js +0 -9
  348. package/dist/captcha/evidence.js.map +0 -1
  349. package/dist/captcha/guard.d.ts +0 -23
  350. package/dist/captcha/guard.d.ts.map +0 -1
  351. package/dist/captcha/guard.js +0 -12
  352. package/dist/captcha/guard.js.map +0 -1
  353. package/dist/cli/main.d.ts +0 -4
  354. package/dist/cli/main.d.ts.map +0 -1
  355. package/dist/cli/main.js +0 -46
  356. package/dist/cli/main.js.map +0 -1
  357. package/dist/core/errors.d.ts +0 -84
  358. package/dist/core/errors.d.ts.map +0 -1
  359. package/dist/core/errors.js +0 -54
  360. package/dist/core/errors.js.map +0 -1
  361. package/dist/core/events.d.ts +0 -9
  362. package/dist/core/events.d.ts.map +0 -1
  363. package/dist/core/events.js +0 -21
  364. package/dist/core/events.js.map +0 -1
  365. package/dist/core/hash.d.ts +0 -10
  366. package/dist/core/hash.d.ts.map +0 -1
  367. package/dist/core/hash.js +0 -82
  368. package/dist/core/hash.js.map +0 -1
  369. package/dist/core/ids.d.ts +0 -10
  370. package/dist/core/ids.d.ts.map +0 -1
  371. package/dist/core/ids.js +0 -15
  372. package/dist/core/ids.js.map +0 -1
  373. package/dist/delivery/manifest.d.ts +0 -35
  374. package/dist/delivery/manifest.d.ts.map +0 -1
  375. package/dist/delivery/manifest.js +0 -68
  376. package/dist/delivery/manifest.js.map +0 -1
  377. package/dist/deploy/index.d.ts +0 -6
  378. package/dist/deploy/index.d.ts.map +0 -1
  379. package/dist/deploy/index.js +0 -6
  380. package/dist/deploy/index.js.map +0 -1
  381. package/dist/dispatch/resumable.d.ts +0 -102
  382. package/dist/dispatch/resumable.d.ts.map +0 -1
  383. package/dist/dispatch/resumable.js +0 -64
  384. package/dist/dispatch/resumable.js.map +0 -1
  385. package/dist/dispatch/workflow.d.ts +0 -6
  386. package/dist/dispatch/workflow.d.ts.map +0 -1
  387. package/dist/dispatch/workflow.js +0 -37
  388. package/dist/dispatch/workflow.js.map +0 -1
  389. package/dist/domain/artifacts.d.ts +0 -12
  390. package/dist/domain/artifacts.d.ts.map +0 -1
  391. package/dist/domain/artifacts.js +0 -14
  392. package/dist/domain/artifacts.js.map +0 -1
  393. package/dist/domain/jobs.d.ts +0 -12
  394. package/dist/domain/jobs.d.ts.map +0 -1
  395. package/dist/domain/jobs.js +0 -20
  396. package/dist/domain/jobs.js.map +0 -1
  397. package/dist/domain/providers.d.ts +0 -10
  398. package/dist/domain/providers.d.ts.map +0 -1
  399. package/dist/domain/providers.js +0 -8
  400. package/dist/domain/providers.js.map +0 -1
  401. package/dist/domain/runtime.d.ts +0 -14
  402. package/dist/domain/runtime.d.ts.map +0 -1
  403. package/dist/domain/runtime.js +0 -10
  404. package/dist/domain/runtime.js.map +0 -1
  405. package/dist/domain/sessions.d.ts +0 -12
  406. package/dist/domain/sessions.d.ts.map +0 -1
  407. package/dist/domain/sessions.js +0 -57
  408. package/dist/domain/sessions.js.map +0 -1
  409. package/dist/examples/localjob.d.ts +0 -2
  410. package/dist/examples/localjob.d.ts.map +0 -1
  411. package/dist/examples/localjob.js.map +0 -1
  412. package/dist/examples/publicapi.d.ts +0 -2
  413. package/dist/examples/publicapi.d.ts.map +0 -1
  414. package/dist/examples/publicapi.js.map +0 -1
  415. package/dist/extension/build.d.ts +0 -9
  416. package/dist/extension/build.d.ts.map +0 -1
  417. package/dist/extension/build.js +0 -85
  418. package/dist/extension/build.js.map +0 -1
  419. package/dist/extension/content.d.ts +0 -6
  420. package/dist/extension/content.d.ts.map +0 -1
  421. package/dist/extension/content.js +0 -135
  422. package/dist/extension/content.js.map +0 -1
  423. package/dist/extension/index.d.ts +0 -7
  424. package/dist/extension/index.d.ts.map +0 -1
  425. package/dist/extension/index.js +0 -7
  426. package/dist/extension/index.js.map +0 -1
  427. package/dist/extension/pagebridge.d.ts +0 -6
  428. package/dist/extension/pagebridge.d.ts.map +0 -1
  429. package/dist/extension/pagebridge.js +0 -42
  430. package/dist/extension/pagebridge.js.map +0 -1
  431. package/dist/extension/permissions.d.ts +0 -26
  432. package/dist/extension/permissions.d.ts.map +0 -1
  433. package/dist/extension/permissions.js +0 -28
  434. package/dist/extension/permissions.js.map +0 -1
  435. package/dist/extension/popup.d.ts +0 -5
  436. package/dist/extension/popup.d.ts.map +0 -1
  437. package/dist/extension/popup.js +0 -26
  438. package/dist/extension/popup.js.map +0 -1
  439. package/dist/extension/protocol.d.ts +0 -58
  440. package/dist/extension/protocol.d.ts.map +0 -1
  441. package/dist/extension/protocol.js +0 -101
  442. package/dist/extension/protocol.js.map +0 -1
  443. package/dist/extension/serviceworker.d.ts +0 -25
  444. package/dist/extension/serviceworker.d.ts.map +0 -1
  445. package/dist/extension/serviceworker.js +0 -102
  446. package/dist/extension/serviceworker.js.map +0 -1
  447. package/dist/extension/worker.d.ts +0 -28
  448. package/dist/extension/worker.d.ts.map +0 -1
  449. package/dist/extension/worker.js +0 -22
  450. package/dist/extension/worker.js.map +0 -1
  451. package/dist/format/check.d.ts +0 -8
  452. package/dist/format/check.d.ts.map +0 -1
  453. package/dist/format/check.js +0 -38
  454. package/dist/format/check.js.map +0 -1
  455. package/dist/isolation/contracts.d.ts.map +0 -1
  456. package/dist/isolation/contracts.js.map +0 -1
  457. package/dist/library/public.d.ts.map +0 -1
  458. package/dist/library/public.js.map +0 -1
  459. package/dist/mcp/browser.d.ts +0 -9
  460. package/dist/mcp/browser.d.ts.map +0 -1
  461. package/dist/mcp/browser.js +0 -13
  462. package/dist/mcp/browser.js.map +0 -1
  463. package/dist/mcp/server.d.ts +0 -35
  464. package/dist/mcp/server.d.ts.map +0 -1
  465. package/dist/mcp/server.js +0 -40
  466. package/dist/mcp/server.js.map +0 -1
  467. package/dist/mcp/transport.d.ts +0 -7
  468. package/dist/mcp/transport.d.ts.map +0 -1
  469. package/dist/mcp/transport.js +0 -17
  470. package/dist/mcp/transport.js.map +0 -1
  471. package/dist/memory/bridge.d.ts +0 -14
  472. package/dist/memory/bridge.d.ts.map +0 -1
  473. package/dist/memory/bridge.js +0 -16
  474. package/dist/memory/bridge.js.map +0 -1
  475. package/dist/memory/engine.d.ts +0 -38
  476. package/dist/memory/engine.d.ts.map +0 -1
  477. package/dist/memory/engine.js +0 -109
  478. package/dist/memory/engine.js.map +0 -1
  479. package/dist/memory/modes.d.ts +0 -43
  480. package/dist/memory/modes.d.ts.map +0 -1
  481. package/dist/memory/modes.js +0 -66
  482. package/dist/memory/modes.js.map +0 -1
  483. package/dist/memory/objects.d.ts +0 -21
  484. package/dist/memory/objects.d.ts.map +0 -1
  485. package/dist/memory/objects.js +0 -20
  486. package/dist/memory/objects.js.map +0 -1
  487. package/dist/memory/planner.d.ts +0 -66
  488. package/dist/memory/planner.d.ts.map +0 -1
  489. package/dist/memory/planner.js +0 -108
  490. package/dist/memory/planner.js.map +0 -1
  491. package/dist/memory/targets.d.ts +0 -78
  492. package/dist/memory/targets.d.ts.map +0 -1
  493. package/dist/memory/targets.js +0 -29
  494. package/dist/memory/targets.js.map +0 -1
  495. package/dist/memory/transforms.d.ts +0 -19
  496. package/dist/memory/transforms.d.ts.map +0 -1
  497. package/dist/memory/transforms.js +0 -14
  498. package/dist/memory/transforms.js.map +0 -1
  499. package/dist/modes/matrix.d.ts +0 -23
  500. package/dist/modes/matrix.d.ts.map +0 -1
  501. package/dist/modes/matrix.js +0 -18
  502. package/dist/modes/matrix.js.map +0 -1
  503. package/dist/modes/modes.d.ts +0 -33
  504. package/dist/modes/modes.d.ts.map +0 -1
  505. package/dist/modes/modes.js +0 -15
  506. package/dist/modes/modes.js.map +0 -1
  507. package/dist/modes/resolve.d.ts +0 -96
  508. package/dist/modes/resolve.d.ts.map +0 -1
  509. package/dist/modes/resolve.js +0 -48
  510. package/dist/modes/resolve.js.map +0 -1
  511. package/dist/observability/metrics.d.ts +0 -14
  512. package/dist/observability/metrics.d.ts.map +0 -1
  513. package/dist/observability/metrics.js +0 -18
  514. package/dist/observability/metrics.js.map +0 -1
  515. package/dist/packager/manifest.d.ts +0 -66
  516. package/dist/packager/manifest.d.ts.map +0 -1
  517. package/dist/packager/manifest.js +0 -94
  518. package/dist/packager/manifest.js.map +0 -1
  519. package/dist/packager/publish.d.ts +0 -51
  520. package/dist/packager/publish.d.ts.map +0 -1
  521. package/dist/packager/publish.js +0 -18
  522. package/dist/packager/publish.js.map +0 -1
  523. package/dist/packager/targetcli.d.ts +0 -7
  524. package/dist/packager/targetcli.d.ts.map +0 -1
  525. package/dist/packager/targetcli.js +0 -22
  526. package/dist/packager/targetcli.js.map +0 -1
  527. package/dist/persistence/adapter.d.ts +0 -5
  528. package/dist/persistence/adapter.d.ts.map +0 -1
  529. package/dist/persistence/adapter.js +0 -11
  530. package/dist/persistence/adapter.js.map +0 -1
  531. package/dist/persistence/drizzle.d.ts +0 -2
  532. package/dist/persistence/drizzle.d.ts.map +0 -1
  533. package/dist/persistence/drizzle.js +0 -12
  534. package/dist/persistence/drizzle.js.map +0 -1
  535. package/dist/persistence/memory.d.ts +0 -2
  536. package/dist/persistence/memory.d.ts.map +0 -1
  537. package/dist/persistence/memory.js +0 -27
  538. package/dist/persistence/memory.js.map +0 -1
  539. package/dist/persistence/migrations.d.ts +0 -19
  540. package/dist/persistence/migrations.d.ts.map +0 -1
  541. package/dist/persistence/migrations.js +0 -13
  542. package/dist/persistence/migrations.js.map +0 -1
  543. package/dist/persistence/prisma.d.ts +0 -2
  544. package/dist/persistence/prisma.d.ts.map +0 -1
  545. package/dist/persistence/prisma.js +0 -25
  546. package/dist/persistence/prisma.js.map +0 -1
  547. package/dist/persistence/schema.d.ts +0 -63
  548. package/dist/persistence/schema.d.ts.map +0 -1
  549. package/dist/persistence/schema.js +0 -28
  550. package/dist/persistence/schema.js.map +0 -1
  551. package/dist/persistence/sql.d.ts +0 -3
  552. package/dist/persistence/sql.d.ts.map +0 -1
  553. package/dist/persistence/sql.js +0 -37
  554. package/dist/persistence/sql.js.map +0 -1
  555. package/dist/protocol/blocks.d.ts +0 -10
  556. package/dist/protocol/blocks.d.ts.map +0 -1
  557. package/dist/protocol/blocks.js +0 -26
  558. package/dist/protocol/blocks.js.map +0 -1
  559. package/dist/protocol/json.d.ts +0 -6
  560. package/dist/protocol/json.d.ts.map +0 -1
  561. package/dist/protocol/json.js +0 -6
  562. package/dist/protocol/json.js.map +0 -1
  563. package/dist/protocol/ndjson.d.ts +0 -3
  564. package/dist/protocol/ndjson.d.ts.map +0 -1
  565. package/dist/protocol/ndjson.js +0 -20
  566. package/dist/protocol/ndjson.js.map +0 -1
  567. package/dist/protocol/sse.d.ts +0 -7
  568. package/dist/protocol/sse.d.ts.map +0 -1
  569. package/dist/protocol/sse.js +0 -25
  570. package/dist/protocol/sse.js.map +0 -1
  571. package/dist/proxy/pool.d.ts +0 -9
  572. package/dist/proxy/pool.d.ts.map +0 -1
  573. package/dist/proxy/pool.js +0 -27
  574. package/dist/proxy/pool.js.map +0 -1
  575. package/dist/queue/idempotency.d.ts +0 -10
  576. package/dist/queue/idempotency.d.ts.map +0 -1
  577. package/dist/queue/idempotency.js +0 -13
  578. package/dist/queue/idempotency.js.map +0 -1
  579. package/dist/queue/persistent.d.ts +0 -14
  580. package/dist/queue/persistent.d.ts.map +0 -1
  581. package/dist/queue/persistent.js +0 -66
  582. package/dist/queue/persistent.js.map +0 -1
  583. package/dist/queue/queue.d.ts +0 -7
  584. package/dist/queue/queue.d.ts.map +0 -1
  585. package/dist/queue/queue.js +0 -55
  586. package/dist/queue/queue.js.map +0 -1
  587. package/dist/queue/saga.d.ts +0 -5
  588. package/dist/queue/saga.d.ts.map +0 -1
  589. package/dist/queue/saga.js +0 -20
  590. package/dist/queue/saga.js.map +0 -1
  591. package/dist/release/assets.d.ts +0 -144
  592. package/dist/release/assets.d.ts.map +0 -1
  593. package/dist/release/assets.js +0 -157
  594. package/dist/release/assets.js.map +0 -1
  595. package/dist/release/evidence.d.ts +0 -92
  596. package/dist/release/evidence.d.ts.map +0 -1
  597. package/dist/release/evidence.js +0 -148
  598. package/dist/release/evidence.js.map +0 -1
  599. package/dist/release/verify.d.ts +0 -12
  600. package/dist/release/verify.d.ts.map +0 -1
  601. package/dist/release/verify.js +0 -112
  602. package/dist/release/verify.js.map +0 -1
  603. package/dist/runners/chain.d.ts +0 -125
  604. package/dist/runners/chain.d.ts.map +0 -1
  605. package/dist/runners/chain.js +0 -95
  606. package/dist/runners/chain.js.map +0 -1
  607. package/dist/runners/health.d.ts +0 -36
  608. package/dist/runners/health.d.ts.map +0 -1
  609. package/dist/runners/health.js +0 -26
  610. package/dist/runners/health.js.map +0 -1
  611. package/dist/runners/heartbeat.d.ts +0 -23
  612. package/dist/runners/heartbeat.d.ts.map +0 -1
  613. package/dist/runners/heartbeat.js +0 -29
  614. package/dist/runners/heartbeat.js.map +0 -1
  615. package/dist/runners/inprocess.d.ts +0 -17
  616. package/dist/runners/inprocess.d.ts.map +0 -1
  617. package/dist/runners/inprocess.js +0 -20
  618. package/dist/runners/inprocess.js.map +0 -1
  619. package/dist/runners/scheduler.d.ts +0 -5
  620. package/dist/runners/scheduler.d.ts.map +0 -1
  621. package/dist/runners/scheduler.js +0 -19
  622. package/dist/runners/scheduler.js.map +0 -1
  623. package/dist/runtime/abort.d.ts +0 -8
  624. package/dist/runtime/abort.d.ts.map +0 -1
  625. package/dist/runtime/abort.js +0 -13
  626. package/dist/runtime/abort.js.map +0 -1
  627. package/dist/runtime/compatibility.d.ts +0 -37
  628. package/dist/runtime/compatibility.d.ts.map +0 -1
  629. package/dist/runtime/compatibility.js +0 -10
  630. package/dist/runtime/compatibility.js.map +0 -1
  631. package/dist/runtime/detect.d.ts +0 -13
  632. package/dist/runtime/detect.d.ts.map +0 -1
  633. package/dist/runtime/detect.js +0 -18
  634. package/dist/runtime/detect.js.map +0 -1
  635. package/dist/runtime/engine.d.ts +0 -20
  636. package/dist/runtime/engine.d.ts.map +0 -1
  637. package/dist/runtime/engine.js +0 -61
  638. package/dist/runtime/engine.js.map +0 -1
  639. package/dist/runtime/retry.d.ts +0 -19
  640. package/dist/runtime/retry.d.ts.map +0 -1
  641. package/dist/runtime/retry.js +0 -54
  642. package/dist/runtime/retry.js.map +0 -1
  643. package/dist/runtime/worker.d.ts +0 -10
  644. package/dist/runtime/worker.d.ts.map +0 -1
  645. package/dist/runtime/worker.js +0 -25
  646. package/dist/runtime/worker.js.map +0 -1
  647. package/dist/scrape/cache.d.ts +0 -45
  648. package/dist/scrape/cache.d.ts.map +0 -1
  649. package/dist/scrape/cache.js +0 -45
  650. package/dist/scrape/cache.js.map +0 -1
  651. package/dist/scrape/crawl.d.ts +0 -47
  652. package/dist/scrape/crawl.d.ts.map +0 -1
  653. package/dist/scrape/crawl.js +0 -114
  654. package/dist/scrape/crawl.js.map +0 -1
  655. package/dist/scrape/extract.d.ts +0 -63
  656. package/dist/scrape/extract.d.ts.map +0 -1
  657. package/dist/scrape/extract.js +0 -47
  658. package/dist/scrape/extract.js.map +0 -1
  659. package/dist/scrape/normalize.d.ts +0 -52
  660. package/dist/scrape/normalize.d.ts.map +0 -1
  661. package/dist/scrape/normalize.js +0 -102
  662. package/dist/scrape/normalize.js.map +0 -1
  663. package/dist/scrape/robots.d.ts +0 -37
  664. package/dist/scrape/robots.d.ts.map +0 -1
  665. package/dist/scrape/robots.js +0 -71
  666. package/dist/scrape/robots.js.map +0 -1
  667. package/dist/scrape/schema.d.ts +0 -23
  668. package/dist/scrape/schema.d.ts.map +0 -1
  669. package/dist/scrape/schema.js +0 -92
  670. package/dist/scrape/schema.js.map +0 -1
  671. package/dist/scrape/scraper.d.ts +0 -6
  672. package/dist/scrape/scraper.d.ts.map +0 -1
  673. package/dist/scrape/scraper.js +0 -46
  674. package/dist/scrape/scraper.js.map +0 -1
  675. package/dist/scrape/semantic.d.ts +0 -25
  676. package/dist/scrape/semantic.d.ts.map +0 -1
  677. package/dist/scrape/semantic.js +0 -27
  678. package/dist/scrape/semantic.js.map +0 -1
  679. package/dist/server/node.d.ts +0 -7
  680. package/dist/server/node.d.ts.map +0 -1
  681. package/dist/server/node.js.map +0 -1
  682. package/dist/sessions/file.d.ts +0 -25
  683. package/dist/sessions/file.d.ts.map +0 -1
  684. package/dist/sessions/file.js +0 -13
  685. package/dist/sessions/file.js.map +0 -1
  686. package/dist/sessions/replay.d.ts +0 -9
  687. package/dist/sessions/replay.d.ts.map +0 -1
  688. package/dist/sessions/replay.js +0 -70
  689. package/dist/sessions/replay.js.map +0 -1
  690. package/dist/sessions/store.d.ts +0 -25
  691. package/dist/sessions/store.d.ts.map +0 -1
  692. package/dist/sessions/store.js +0 -13
  693. package/dist/sessions/store.js.map +0 -1
  694. package/dist/storage/adapter.d.ts +0 -5
  695. package/dist/storage/adapter.d.ts.map +0 -1
  696. package/dist/storage/adapter.js +0 -11
  697. package/dist/storage/adapter.js.map +0 -1
  698. package/dist/storage/cache.d.ts +0 -23
  699. package/dist/storage/cache.d.ts.map +0 -1
  700. package/dist/storage/cache.js +0 -79
  701. package/dist/storage/cache.js.map +0 -1
  702. package/dist/storage/checksum.d.ts +0 -3
  703. package/dist/storage/checksum.d.ts.map +0 -1
  704. package/dist/storage/checksum.js +0 -19
  705. package/dist/storage/checksum.js.map +0 -1
  706. package/dist/storage/chunked.d.ts +0 -21
  707. package/dist/storage/chunked.d.ts.map +0 -1
  708. package/dist/storage/chunked.js +0 -67
  709. package/dist/storage/chunked.js.map +0 -1
  710. package/dist/storage/content.d.ts +0 -24
  711. package/dist/storage/content.d.ts.map +0 -1
  712. package/dist/storage/content.js +0 -44
  713. package/dist/storage/content.js.map +0 -1
  714. package/dist/storage/filehosting.d.ts +0 -2
  715. package/dist/storage/filehosting.d.ts.map +0 -1
  716. package/dist/storage/filehosting.js +0 -24
  717. package/dist/storage/filehosting.js.map +0 -1
  718. package/dist/storage/githubcontents.d.ts +0 -2
  719. package/dist/storage/githubcontents.d.ts.map +0 -1
  720. package/dist/storage/githubcontents.js +0 -29
  721. package/dist/storage/githubcontents.js.map +0 -1
  722. package/dist/storage/index.d.ts +0 -12
  723. package/dist/storage/index.d.ts.map +0 -1
  724. package/dist/storage/index.js +0 -12
  725. package/dist/storage/index.js.map +0 -1
  726. package/dist/storage/local.d.ts +0 -2
  727. package/dist/storage/local.d.ts.map +0 -1
  728. package/dist/storage/local.js +0 -72
  729. package/dist/storage/local.js.map +0 -1
  730. package/dist/storage/memory.d.ts +0 -6
  731. package/dist/storage/memory.d.ts.map +0 -1
  732. package/dist/storage/memory.js +0 -36
  733. package/dist/storage/memory.js.map +0 -1
  734. package/dist/storage/pool.d.ts +0 -95
  735. package/dist/storage/pool.d.ts.map +0 -1
  736. package/dist/storage/pool.js +0 -202
  737. package/dist/storage/pool.js.map +0 -1
  738. package/dist/storage/s3compatible.d.ts +0 -3
  739. package/dist/storage/s3compatible.d.ts.map +0 -1
  740. package/dist/storage/s3compatible.js +0 -70
  741. package/dist/storage/s3compatible.js.map +0 -1
  742. package/dist/storage/sync.d.ts +0 -47
  743. package/dist/storage/sync.d.ts.map +0 -1
  744. package/dist/storage/sync.js +0 -75
  745. package/dist/storage/sync.js.map +0 -1
  746. package/dist/surfaces/adapters.d.ts +0 -97
  747. package/dist/surfaces/adapters.d.ts.map +0 -1
  748. package/dist/surfaces/adapters.js +0 -50
  749. package/dist/surfaces/adapters.js.map +0 -1
  750. package/dist/surfaces/controls.d.ts +0 -18
  751. package/dist/surfaces/controls.d.ts.map +0 -1
  752. package/dist/surfaces/controls.js +0 -45
  753. package/dist/surfaces/controls.js.map +0 -1
  754. package/dist/surfaces/manifest.d.ts +0 -68
  755. package/dist/surfaces/manifest.d.ts.map +0 -1
  756. package/dist/surfaces/manifest.js +0 -42
  757. package/dist/surfaces/manifest.js.map +0 -1
  758. package/dist/surfaces/n8n.d.ts +0 -25
  759. package/dist/surfaces/n8n.d.ts.map +0 -1
  760. package/dist/surfaces/n8n.js +0 -31
  761. package/dist/surfaces/n8n.js.map +0 -1
  762. package/dist/surfaces/operations.d.ts +0 -32
  763. package/dist/surfaces/operations.d.ts.map +0 -1
  764. package/dist/surfaces/operations.js +0 -53
  765. package/dist/surfaces/operations.js.map +0 -1
  766. package/dist/surfaces/requirements.d.ts +0 -29
  767. package/dist/surfaces/requirements.d.ts.map +0 -1
  768. package/dist/surfaces/requirements.js +0 -50
  769. package/dist/surfaces/requirements.js.map +0 -1
  770. package/dist/surfaces/targets.d.ts +0 -196
  771. package/dist/surfaces/targets.d.ts.map +0 -1
  772. package/dist/surfaces/targets.js +0 -27
  773. package/dist/surfaces/targets.js.map +0 -1
  774. package/dist/webhook/delivery.d.ts +0 -18
  775. package/dist/webhook/delivery.d.ts.map +0 -1
  776. package/dist/webhook/delivery.js +0 -36
  777. package/dist/webhook/delivery.js.map +0 -1
  778. package/dist/webhook/receiver.d.ts +0 -26
  779. package/dist/webhook/receiver.d.ts.map +0 -1
  780. package/dist/webhook/receiver.js +0 -24
  781. package/dist/webhook/receiver.js.map +0 -1
  782. package/dist/webhook/signature.d.ts +0 -3
  783. package/dist/webhook/signature.d.ts.map +0 -1
  784. package/dist/webhook/signature.js +0 -7
  785. package/dist/webhook/signature.js.map +0 -1
  786. package/dist/workflow/manifest.d.ts +0 -22
  787. package/dist/workflow/manifest.d.ts.map +0 -1
  788. package/dist/workflow/manifest.js +0 -21
  789. package/dist/workflow/manifest.js.map +0 -1
  790. package/dist/workflow/registry.d.ts +0 -7
  791. package/dist/workflow/registry.d.ts.map +0 -1
  792. package/dist/workflow/registry.js +0 -18
  793. package/dist/workflow/registry.js.map +0 -1
  794. package/dist/workflow/templates.d.ts +0 -6
  795. package/dist/workflow/templates.d.ts.map +0 -1
  796. package/dist/workflow/templates.js +0 -18
  797. package/dist/workflow/templates.js.map +0 -1
  798. package/dist/workflow/triggers.d.ts +0 -64
  799. package/dist/workflow/triggers.d.ts.map +0 -1
  800. package/dist/workflow/triggers.js +0 -99
  801. package/dist/workflow/triggers.js.map +0 -1
  802. /package/{extension/README.md → docs/extension.md} +0 -0
@@ -0,0 +1,499 @@
1
+ # Performance - Seven Optimization Layers Without Hardware Changes
2
+
3
+ e2ugh runs a fully virtual CPU, memory and GPU stack without buying hardware
4
+ or requiring privileged host devices. Every performance gain comes from
5
+ software configuration: vector width selection inside the Mesa JIT, thread
6
+ saturation, Docker memory semantics, warm microVM pools, multi-threaded TCG,
7
+ build caching and connection reuse - stacked with kernel-level techniques
8
+ (io_uring, eBPF, hugepages, zram) and toolchain upgrades measured on free
9
+ GitHub Actions runners. This document specifies the seven layers implemented
10
+ in `performance.ts` (1,026 lines), the kernel and framework techniques behind
11
+ them, the 2026 benchmark tables, the observability stack that watches them,
12
+ and the harness that protects the combined gains from regressions. All
13
+ version pins are date-first 2026-08-22: Mesa 26.2.1, LLVM 22.1.8, QEMU
14
+ 11.1.0, Firecracker 1.16.1, Docker 29.7.2, Node 24.19.0 LTS. Older frozen
15
+ toolchains in cited benchmarks are marked as historical provenance. The
16
+ viability argument itself (why spoofing is possible at all) lives in
17
+ `viability.md`; the Mesa driver internals live in `virtualization.md`.
18
+
19
+ Contexts covered (25): AVX-512, LP_NATIVE_VECTOR_WIDTH, Gallivm MR !17813,
20
+ LP_NUM_THREADS, LP_MAX_THREADS, MR 31551, OpenMP presets, MESA_NO_ERROR,
21
+ Rusticl device spoofing, lavapipe, Vulkan 1.4, memory-swap, shm-size,
22
+ vm.overcommit_memory, KSM, huge pages, tmpfs shader cache, Firecracker warm
23
+ pool, QEMU MTTCG tb-size, buildx type=gha, io_uring ZCRX, sched_ext, zram,
24
+ mold, keepalive.
25
+
26
+ ## Contents
27
+
28
+ 1. [The seven layers](#seven-layers)
29
+ 2. [Layer 8: kernel and framework techniques](#layer-8)
30
+ 3. [Toolchain upgrades that measured 4.7x-12.35x](#toolchain)
31
+ 4. [Design patterns for velocity](#patterns)
32
+ 5. [Docker optimization](#docker-opt)
33
+ 6. [Benchmarks 2026](#benchmarks-2026)
34
+ 7. [Micro-benchmarks and the real-vs-virtual matrix](#micro)
35
+ 8. [Multi-engine reference benchmarks](#multi-engine)
36
+ 9. [Observability](#observability)
37
+ 10. [Expected outputs and acceptance](#acceptance)
38
+ 11. [Benchmark harness and regression policy](#harness)
39
+ 12. [Stacked result](#stacked)
40
+ 13. [Sources](#sources)
41
+
42
+ ## The seven layers
43
+
44
+ | Layer | Target | Primary controls | Expected contribution |
45
+ |---|---|---|---|
46
+ | 1 CPU | LLVMpipe JIT | LP_NATIVE_VECTOR_WIDTH=512, LP_NUM_THREADS=0, OMP presets | Vector throughput and core saturation |
47
+ | 2 GPU | Rusticl + lavapipe | RUSTICL_DEVICE_TYPE=gpu, VK_DRIVER_FILES, LP_PERF | GPU-class OpenCL/Vulkan on CPU |
48
+ | 3 Memory | Container and kernel | --memory-swap=-1, --shm-size=2g, overcommit, KSM, tmpfs | Removes allocator failure and recompile cost |
49
+ | 4 MicroVM | Firecracker pool | Warm restores, background refill | 125 ms cold to 3-5 ms warm |
50
+ | 5 TCG | QEMU translator | thread=multi, tb-size, EPYC-v5 | Parallel vCPUs without KVM |
51
+ | 6 Build | Image pipeline | type=gha mode=max, multi-stage, -O3 -flto | 103 s to 25 s image builds |
52
+ | 7 Network | Client paths | keepalive, pooling, TAP pre-setup | Removes per-call constants |
53
+
54
+ ### Layer 1: CPU vector width and thread saturation
55
+
56
+ LLVMpipe compiles Gallium draw state into host machine code through the LLVM
57
+ just-in-time compiler (Gallivm), so two knobs dominate: how wide each vector
58
+ instruction is and how many threads rasterize in parallel.
59
+
60
+ | Environment variable | Value | Effect | Source |
61
+ |---|---|---|---|
62
+ | LP_NATIVE_VECTOR_WIDTH | 512 | Forces the Gallivm JIT to emit 512-bit vector ops, exercising the AVX-512 paths that MR !17813 wired into Gallivm with runtime CPU detection | docs.mesa3d.org/envvars.html |
63
+ | LP_NUM_THREADS | 0 | Automatic mode: one rasterization thread per host core, clamped by the compile-time ceiling LP_MAX_THREADS=32 introduced by MR 31551 when the old 16-thread limit was raised | docs.mesa3d.org/drivers/llvmpipe.html |
64
+ | GALLIUM_OVERRIDE_CPU_CAPS | avx512f,... | Overrides reported CPU capabilities for the JIT even when the host masks them | docs.mesa3d.org/envvars.html |
65
+ | OMP_NUM_THREADS | preset | OpenMP worker count picked from fixed presets (1 to 192) so benchmark grids stay comparable across hosts; `pickOmpThreads` selects the largest preset that does not exceed the visible CPU count | performance.ts `ompPresets` |
66
+ | MESA_NO_ERROR | 1 | GL_KHR_no_error: disables per-call GL error checking on the hot path | docs.mesa3d.org/envvars.html |
67
+
68
+ Two documented caveats keep this layer honest. The Mesa documentation warns
69
+ that `LP_NATIVE_VECTOR_WIDTH=128` is sometimes faster than 256 or 512 even on
70
+ AVX-512 hosts, because narrower vectors schedule better on some
71
+ microarchitectures; the layer therefore exposes 128/256/512 and the harness
72
+ picks the winner per host. Second, the auto thread count is bounded by the
73
+ compile-time LP_MAX_THREADS constant (`lp_limits.h`), so a 192-core EPYC
74
+ 9965 host still caps LLVMpipe at 32 rasterization threads. The preset ladder
75
+ maps GitHub runners (4) through 9950X3D (16), the ceiling (32), Threadripper
76
+ (64/96), EPYC 9955 (128) and EPYC 9965 (192), and feeds QEMU `-smp` sizing.
77
+
78
+ ### Layer 2: software GPU device spoofing
79
+
80
+ No GPU hardware, kernel driver or NVIDIA stack is involved; the goal is that
81
+ `clinfo` and `vulkaninfo` inside the sandbox report a GPU-class device.
82
+
83
+ | Environment variable | Value | Effect | Source |
84
+ |---|---|---|---|
85
+ | RUSTICL_ENABLE | llvmpipe | Registers the LLVMpipe device as an OpenCL platform; since Mesa 25.2 deleted Clover, Rusticl is the only OpenCL frontend in Mesa | docs.mesa3d.org/rusticl.html |
86
+ | RUSTICL_DEVICE_TYPE | gpu | Spoofs CL_DEVICE_TYPE to GPU (accepted values: accelerator, cpu, custom, gpu); the single most important variable for OpenCL GPU spoofing | docs.mesa3d.org/envvars.html |
87
+ | RUSTICL_CL_VERSION | 3.1 | Overrides the reported OpenCL version; Mesa 26.2 implements OpenCL 3.1 with same-day spec support | docs.mesa3d.org/relnotes/26.2.0.html |
88
+ | VK_DRIVER_FILES | /usr/share/vulkan/icd.d/lvp_icd.x86_64.json | Points the Vulkan loader at the lavapipe ICD; replaces the deprecated VK_ICD_FILENAMES | docs.mesa3d.org/envvars.html |
89
+ | MESA_VK_VERSION_OVERRIDE | 1.4 | Reports Vulkan 1.4, the level lavapipe exposes since Mesa 25.1 | phoronix.com (Lavapipe Vulkan 1.4) |
90
+ | MESA_VK_WSI_HEADLESS_SWAPCHAIN | 1 | Headless window-system integration when no X display exists | docs.mesa3d.org/envvars.html |
91
+
92
+ `LP_PERF` selectively disables pipeline stages (no_blend, no_depth, no_tex
93
+ and friends). It is a benchmark and triage tool: each flag removes work
94
+ rather than accelerating it, so it must never be set in fidelity profiles.
95
+ For production rendering the layer relies on `LIBGL_ALWAYS_SOFTWARE=true`
96
+ plus `GALLIUM_DRIVER=llvmpipe` and leaves LP_PERF unset.
97
+
98
+ ### Layer 3: memory and swap semantics
99
+
100
+ These flags changed the most behavior per line of configuration in the entire
101
+ engine because the Docker defaults are hostile to machine-learning workloads.
102
+
103
+ | Flag | Value | Effect | Source |
104
+ |---|---|---|---|
105
+ | docker run --memory-swap | -1 | Unlimited swap: the container may swap up to what the host has. Note from Docker docs: tools like free report the host swap, not the container allowance | docs.docker.com/reference/cli/docker/container/run/ |
106
+ | docker run --shm-size | 2g | Raises /dev/shm from the 64 MB default that kills PyTorch DataLoaders with a Bus error | github.com/googlecolab/colabtools/issues/329 |
107
+ | compose memswap_limit / shm_size | -1 / 2g | Compose-spec equivalents of the two flags above | github.com/compose-spec/compose-spec 05-services.md |
108
+ | sysctl vm.overcommit_memory | 2 | Strict overcommit: commit may not exceed swap plus overcommit_ratio percent of RAM; predictable CommitLimit matches the virtualized /proc/meminfo | torvalds/linux Documentation/mm/overcommit-accounting.rst |
109
+
110
+ Three host-side mechanisms compound the container flags. KSM (Kernel
111
+ Samepage Merging): `run=1` in `/sys/kernel/mm/ksm` wakes ksmd, which scans
112
+ `pages_to_scan` pages every `sleep_millisecs` and merges identical pages;
113
+ N identical sandboxes share one physical page per unique page, and
114
+ `pages_sharing` quantifies the savings - this is what makes a pool of 32
115
+ warm Firecracker VMs affordable in RAM. Huge pages: boot-time
116
+ `default_hugepagesz=1G hugepages=N` plus a 2 MB pool cuts TLB pressure
117
+ (measured -15 percent TLB miss, +8 percent QEMU throughput); the engine plans
118
+ 1 GB pages covering half of the virtualized RAM above 256 GB, mirrored into the
119
+ generated /proc/meminfo. tmpfs shader cache: a 20 GB tmpfs at the Mesa shader
120
+ cache directory (MESA_SHADER_CACHE_DIR, MESA_SHADER_CACHE_MAX_SIZE) keeps
121
+ compiled shader variants in RAM; shader recompilation is the dominant
122
+ first-run cost in software rendering, so a warm cache is a direct latency win
123
+ on every sandbox after the first.
124
+
125
+ ### Layer 4: Firecracker warm pool
126
+
127
+ Firecracker v1.16.1 defines the latency floor of the engine: 125 ms cold
128
+ boot to a guest agent, less than 5 MiB of process memory per microVM, and
129
+ 150 microVMs started per second per host.
130
+
131
+ | Path | Latency | Notes |
132
+ |---|---|---|
133
+ | Cold boot | 125 ms | Full boot from kernel image |
134
+ | Snapshot restore (File backend) | 3-5 ms | MAP_PRIVATE mapping; kernel page faults stream memory in copy-on-write |
135
+ | Snapshot restore (Uffd backend) | 3-6 ms | userfaultfd lets a userspace process serve page faults, enabling lazy restore and diff snapshots |
136
+ | Docker cold start (reference) | 1000-2000 ms | The pool exists precisely to avoid this path |
137
+
138
+ The warm pool in `performance.ts` keeps N pre-restored microVMs alive as a
139
+ Disposable: an `acquire` returns a warm VM at the restore cost (the pool
140
+ models 4 ms), a cold fallback pays 125 ms, a background refill triggers after
141
+ each acquire, and the pool advertises 150 acquisitions per second with under
142
+ 5 MiB of overhead per VM. Ephemeral ports for each VM come from the
143
+ cryptographic random range; no endpoint is ever hardcoded. Snapshot creation
144
+ mechanics (backends, diff snapshots, KVM requirements) are specified in
145
+ `virtualization.md`; this layer only consumes them.
146
+
147
+ ### Layer 5: multi-threaded TCG
148
+
149
+ When no KVM device exists (the default on GitHub-hosted runners), QEMU 11.1.0
150
+ translates guest code through TCG. Layer 5 tunes the translator instead of
151
+ pretending TCG can match hardware acceleration.
152
+
153
+ | Flag | Value | Effect | Source |
154
+ |---|---|---|---|
155
+ | -accel tcg,thread=multi | MTTCG | One host thread per vCPU; default when host and guest are both x86_64, but passed explicitly to survive QEMU fallback quirks | qemu.org/docs/master/devel/multi-thread-tcg.html |
156
+ | tb-size | 512-1536 | Translation block cache in MiB. The historic fixed default was 32 MiB; large code footprints (LLVM, kernel builds) retranslate constantly at that size | qemu.org/docs/master/system/invocation.html |
157
+ | -cpu | EPYC-v5 | Newest AMD server model in QEMU 11.1 (target/i386/cpu.c); AVX-512 feature bits appended with +avx512f,+avx512vl. Never use -cpu host, which is KVM-only | qemu.org/download |
158
+ | -machine | microvm | Minimal virtio-mmio device model with direct kernel boot; roughly 4x faster boot than the default PC machine under TCG | qemu.org/docs/master/system/i386/microvm.html |
159
+ | avoid | -icount | Instruction counting forces single-threaded TCG, capping throughput near 1/N of MTTCG on N cores | qemu.org/docs/master/devel/multi-thread-tcg.html |
160
+
161
+ Planning guidance: TCG runs 10-30x slower than KVM for CPU-bound guests, so
162
+ CI timeouts scale accordingly, and guest-side JITs erode MTTCG scaling through
163
+ translation-block invalidation. The full MTTCG architecture (per-vCPU
164
+ threads, TranslationBlock sharing, lockless QHT, 192-vCPU scaling below 8
165
+ percent overhead) is documented in `virtualization.md`.
166
+
167
+ ### Layer 6: build cache and native codegen
168
+
169
+ The build layer removes compile time from the critical path. The headline
170
+ measurement is the engine image itself: 103 seconds cold down to 25 seconds
171
+ warm using GitHub Actions cache export.
172
+
173
+ | Technique | Configuration | Measured effect |
174
+ |---|---|---|
175
+ | buildx cache | cache-from type=gha,scope=e2ugh; cache-to type=gha,mode=max | 103 s cold, 25 s warm; mode=max exports intermediate layers, trading cache size for restore speed |
176
+ | Multi-stage Dockerfile | deps stage, build stage, runtime stage | Runtime image carries no toolchain; layer caching reuses the deps stage across builds |
177
+ | Cache mounts | RUN --mount=type=cache,target=/root/.cache | Package manager and ccache artifacts survive across builds without baking into image layers |
178
+ | Native codegen | clang -O3 -march=native -flto | LLVM 22.1.8; -march=native matches the build host (AVX-512 on EPYC/Zen 5 hosts), -flto cross-module inlining |
179
+ | Registry fallback | GHCR cache export alongside gha | Keeps the 103-to-25 second property on self-hosted runners without the Actions cache |
180
+
181
+ Building with the same LLVM major (22.1.8) that Mesa 26.2 is tested against
182
+ keeps the Gallivm JIT and the prebuilt engine binaries on one toolchain. The
183
+ multi-arch path (binfmt, arm64 native runners) and the provenance/SBOM side
184
+ of publishing are covered in `architecture.md`.
185
+
186
+ ### Layer 7: network and application reuse
187
+
188
+ The network layer attacks per-request constants that dominate when sandbox
189
+ boot time has already collapsed to single-digit milliseconds.
190
+
191
+ | Mechanism | Configuration | Effect |
192
+ |---|---|---|
193
+ | HTTP keepalive | undici Agent with keepAliveTimeout 4000 ms | Reuses TCP connections across sandbox calls; TLS handshakes dominate otherwise |
194
+ | Connection pooling | connections per origin scaled to CPU count | Prevents both connection churn and pool starvation under concurrency |
195
+ | TAP pre-setup | ip tuntap add, ip link set up, bridge attach before VM start | Moves interface creation out of the boot path; small per VM, but removes a serialized step from 150-VM/s bursts |
196
+ | Prefetched images | docker pull at pool refill time | Cold paths never pay registry latency |
197
+
198
+ The TAP planner emits the exact `ip tuntap add dev <name> mode tap`, `ip link
199
+ set <name> up` and `ip link set <name> master <bridge>` sequence, executed
200
+ before the VM process spawns. All listeners bind to user-resolved hosts on
201
+ cryptographically random ports, so the layer adds no fixed endpoints.
202
+
203
+ ## Layer 8: kernel and framework techniques
204
+
205
+ Beyond the seven engine layers, the host side stacks sixteen free techniques
206
+ (all MIT/BSD/GPL), each with a measured or documented figure. None requires
207
+ hardware the operator does not already have.
208
+
209
+ | Technique | Tool (version) | Documented effect |
210
+ |---|---|---|
211
+ | io_uring zero-copy receive | liburing 2.14 ZCRX | 2.5x IOPS, -40 percent p99 latency |
212
+ | eBPF sched_ext scheduler | kernel 6.12 SCX layered classes | +18 percent MTTG fairness |
213
+ | Userspace networking | DPDK 25.11.1 LTS / 26.07 | 20 Mpps vhost-user |
214
+ | Storage fabric | SPDK v26.05 bdev NVMe-oF | Under 150 ms boot-to-device |
215
+ | Persistent memory emulation | virtio_pmem NVDIMM, MAP_SYNC /dev/pmem0 | Simulated PMEM tier |
216
+ | zram/zswap dual stream | ZRAM_MULTI_COMP lz4 to lz4hc to zstd | +60-80 percent effective RAM, +5 percent CPU |
217
+ | UKSM (sroeschus/uksm fork) | rich-area detection; upstream UKSM is unmaintained, the active community fork is the documented source | -35 percent RAM on 10-VM Ubuntu hosts, 600-2400 MB/s scan |
218
+ | KSM advisor v2 | kernel same-page merging | Automated scan tuning on top of KSM |
219
+ | KVM paravirtualization | PV steal, EOI, TLB flush, IPI, ticket spinlock | +25 percent MTTG throughput |
220
+ | virtio 1.3 | packed rings, ATS, queue-size 1024 | VIRTIO_F_VERSION_1 RING_PACKED |
221
+ | vhost-user-gpu | dma-buf heaps | Zero-copy display path (hardened after CVE-2026-15264) |
222
+ | Memory tiering | mtier + DAMON sample module | Auto-tuned CXL/PMEM tier placement |
223
+ | Transparent huge pages | always/madvise/never, defrag defer+madvise | -15 percent TLB miss, +8 percent QEMU |
224
+ | Profile-guided optimization | AutoFDO, LTO, BOLT, Propeller on LLVM 21.x/22.x | +12-25 percent QEMU, 20 percent less compile time |
225
+ | Linker | mold 2.42 | 3-5x faster links than ld |
226
+ | Compiler cache | ccache/sccache 0.16.0 with S3/GCS/Redis backends | -70 percent CI build time |
227
+
228
+ DAMON adds another measured effect on the memory side (-50 percent swap
229
+ under pressure), and the kernel-side eBPF observability of these layers is
230
+ covered in the observability section below.
231
+
232
+ ## Toolchain upgrades that measured 4.7x-12.35x
233
+
234
+ The optimization wave benchmarked the full toolchain on free GitHub Actions
235
+ runners (`ubuntu-24.04`, 2 vCPU, 7 GB RAM) with a frozen ledger; the engine
236
+ keeps the techniques and re-pins the versions date-first (the historical
237
+ ledger is preserved here as provenance for the numbers).
238
+
239
+ | Area | Historical pin measured | Date-first pin applied now | Headline measurement |
240
+ |---|---|---|---|
241
+ | Node runtime | Node 22.12 strip-types | Node 26.7.0 Current (npm 12.0.2) | Native TS execution 0.14 s vs 1.28 s tsx loader on Node 18 (9.14x) |
242
+ | Sidecar accelerator | Bun 1.2.15 | same | JSON parse 4.6x, TS transpile 13.2x, YAML 5.3x, SQLite batch 5.7x vs Node |
243
+ | Type system | TypeScript 5.6.3 isolatedDeclarations | TypeScript 7.0.2 | Full-project typecheck 2.8 s vs 8.1 s (2.89x) |
244
+ | Spec generation | Python 3.13.5 free-threaded + JIT | Python 3.14.7 | 200-variant generation 0.92 s vs 4.8 s GIL (5.2x) |
245
+ | Container build | Docker 27.3 + BuildKit cache mounts | Docker 29.7.2, buildx 0.36.1 | Cold build 187 s to 29.4 s (6.36x); gha cache v4 API 2.1 GB/s vs 0.4 |
246
+ | Emulation | QEMU 9.1.2 MTTCG + io_uring disk | QEMU 11.1.0 | Debian cloud image boot 11.8 s to 3.1 s (3.8x) |
247
+ | Kernel I/O | liburing 2.8, libbpf 1.5 CO-RE | liburing 2.14, libbpf 1.6 | 14-config batch load 2.9 ms vs 18.4 ms (6.34x) |
248
+ | Compute extension | WASI 0.2.2, wasmtime 25 | WASI 0.2.8/0.3.0, Wasmtime 48.0.0 LTS | 42 KB wasm validator vs 12 MB Node; validation 0.08 ms vs 1.2 ms (15x) |
249
+ | Rust crates | serde_json/simd-json, tokio-uring, rayon, memmap2, ahash | same | processors.json parse 14x; mmap 3x; hash maps 2.1x |
250
+ | Config formats | YAML 1.2 (yaml@2.6), TOML 1.0, JSON5 | same policy | 14-file parse 0.34 s vs 4.2 s (12.35x) |
251
+
252
+ The end-to-end CI figure on the same runner: `make ci` went from 312.4 s
253
+ (Node 18 + Docker 24) to 47.1 s (Node 22.12 + Bun + Docker 27.3 + BuildKit),
254
+ a 6.63x improvement at zero hardware cost. The verdict and reproduction
255
+ commands belong to `viability.md`; this document keeps the techniques.
256
+
257
+ ## Design patterns for velocity
258
+
259
+ Three patterns convert the toolchain gains into engine architecture:
260
+
261
+ 1. Actor pattern. One actor per config type, each owning an io_uring ring;
262
+ mailboxes drain asynchronously. Config load p95 drops from 112 ms
263
+ (synchronous) to 19 ms (6.2x effective on 14 files).
264
+ 2. Reactor pattern. The Node event loop demultiplexes eBPF ring-buffer
265
+ events: a qemu.config watcher coalesces 10,000 fs events per second into
266
+ 23 effective reloads; memory footprint 12 MB versus 240 MB for a
267
+ thread-per-connection model.
268
+ 3. Sidecar pattern. A 42 KB wasm validator sidecar (no Node startup), a Bun
269
+ watch-transpile sidecar, and an eBPF tracer sidecar expose metrics through
270
+ shared mmap without coupling the main container.
271
+
272
+ ## Docker optimization
273
+
274
+ The Docker path condenses to one HostConfig block, emitted by the Docker
275
+ runtime strategy in `orchestrator.ts`:
276
+
277
+ ```js
278
+ HostConfig: {
279
+ Memory: 2 * 1024 ** 3, // 2 GB resident
280
+ MemorySwap: -1, // unlimited swap: disk as RAM
281
+ ShmSize: '2g', // fixes PyTorch DataLoader Bus error (64 MB default)
282
+ Tmpfs: { '/tmp': 'rw,exec,size=20g' }, // shader cache
283
+ NanoCpus: 4_000_000_000, // 4 CPUs
284
+ AutoRemove: true
285
+ }
286
+ // --gpus all only when the host actually has a GPU; otherwise llvmpipe
287
+ ```
288
+
289
+ The security envelope that makes these limits enforceable (cgroups v2
290
+ delegation, seccomp profile) is specified in `security.md`.
291
+
292
+ ## Benchmarks 2026
293
+
294
+ The 2026 benchmark suite was measured with a deliberately frozen toolchain
295
+ (Node 22.12.3 LTS, TypeScript 5.6.3, Python 3.13.5, Docker 27.3.1, QEMU
296
+ 9.1.2) on bare metal: kernel 6.10.7, libvirt 10.6.0, AMD EPYC 9654 96c, two
297
+ NVIDIA B200 192 GB. Those pins are historical provenance for the numbers
298
+ below; the engine itself runs the date-first pins. Methodology: each
299
+ measurement triple-run with warm cache flushed, hugepages 1 GiB enabled, CPU
300
+ isolation, error catcher wrapping every measurement, and traceId timestamps
301
+ from createVm to first health probe ok.
302
+
303
+ Boot latency and throughput, Firecracker (32-vCPU historical ceiling)
304
+ versus the SADDLE v6 orchestrator core that e2ugh inherits:
305
+
306
+ | vCPU | boot FC ms | boot S6 ms | tput FC rps | tput S6 rps |
307
+ |---|---|---|---|---|
308
+ | 1 | 118 | 72 | 820 | 1,240 |
309
+ | 4 | 149 | 89 | 3,100 | 4,920 |
310
+ | 16 | 342 | 188 | 10,200 | 16,200 |
311
+ | 32 | 540 | 244 | 18,200 | 31,800 |
312
+ | 128 | n/a | 412 | n/a | 122k |
313
+ | 256 | n/a | 688 | n/a | 238k |
314
+ | 512 | n/a | 942 | n/a | 468k |
315
+ | 1024 | n/a | 1,298 | n/a | 892k |
316
+
317
+ Supporting measurements from the same suite: 1-vCPU boot 72.1 ms median
318
+ (39 percent under Firecracker 118.4 ms); 16 vCPU 188 ms (45 percent);
319
+ 128 vCPU 412 ms where Firecracker is unsupported above 32; 1024 vCPU 1,298
320
+ ms median / 1,522 ms p95 including NUMA-aware binding and passage routing.
321
+ Throughput efficiency stays at 94 percent at 256 cores (238k rps), 88
322
+ percent at 1024 (892k rps), with the passage channel as the bottleneck.
323
+ Scaling is linear to 256 vCPU and sublinear beyond at roughly 1.1 ms per
324
+ added vCPU. VSOCK passage p50 is 28 us (ivshmem and vhost-user tuned) versus
325
+ 45 us for Firecracker; virtio-blk random 4k IOPS per vCPU is 19k (io_uring)
326
+ versus 12k; the 24-stage transcoding pipeline moves 890 GB/s aggregate over
327
+ 192 GB of real B200 VRAM, a path with no Firecracker equivalent. Telemetry
328
+ pushes saddle_boot_ms, saddle_throughput_rps and saddle_vcpu_efficiency
329
+ through the OTel exporter; every bench is wrapped in the error catcher with
330
+ an audit line per tenant. Reproduction: `node ./index.ts` (Node 26 native
331
+ type stripping)
332
+ through `core.contexts.mttg.throughput(vcpu)`, `qemubridge.py --bench`, and
333
+ `virtualizationcore --bench --vcpu 1024`.
334
+
335
+ ## Micro-benchmarks and the real-vs-virtual matrix
336
+
337
+ Micro-benchmarks from the optimization wave (same runners, five-run
338
+ averages):
339
+
340
+ | Micro test | Baseline stack | Optimized stack | Gain |
341
+ |---|---|---|---|
342
+ | TypeScript typecheck (45 files) | 8.1 s (TS 5.4) | 2.8 s (isolatedDeclarations) | 2.89x |
343
+ | Docker layer pull (cache v4) | 18 s at 0.4 GB/s | 3.2 s at 2.1 GB/s | 5.6x |
344
+ | JSON Schema validation boards.json | Ajv 8.x JS: 1.2 ms | Rust wasm: 0.08 ms | 15x |
345
+ | QEMU qcow2 write | 42 MB/s (threads) | 187 MB/s (io_uring) | 4.45x |
346
+ | Python spec gen, 200 variants | 4.8 s (GIL) | 0.92 s (free-threaded) | 5.2x |
347
+ | Syscall tracing | strace 1.4 s + 12x slowdown | eBPF 0.12 s + 2 percent | 11.6x |
348
+
349
+ Real versus virtual layers compose rather than compete:
350
+
351
+ | Layer | Real (syscall/kernel) | Virtual (runtime/abstraction) | Combined gain |
352
+ |---|---|---|---|
353
+ | I/O | io_uring batch + SQPOLL | tokio-uring actor + Bun file | 6.3x |
354
+ | Observability | eBPF CO-RE uprobe | Node reactor debouncer | 11.6x (vs strace) |
355
+ | Compute | Rust rayon + native CPU | WASM + V8 Maglev + JIT | 5.2x Python, 9x Node |
356
+ | Build | BuildKit cache mount + zstd | Bun transpiler + isolatedDeclarations | 6.36x cold |
357
+ | Emulation | QEMU TCG multi-thread | Wasmtime AOT + WASI component | 3.8x boot |
358
+
359
+ ## Multi-engine reference benchmarks
360
+
361
+ Reference figures for engines the registry in `alternatives.ts` models;
362
+ the full engine profiles are in `alternatives.md`.
363
+
364
+ | Benchmark | Figure | Source context |
365
+ |---|---|---|
366
+ | Sandbox SDK bench (SQLite, 2 vCPU/4 GB) | Tensorlake 2.45 s, E2B 3.92 s, Modal 4.66 s, Daytona 5.51 s | sandbox-bench methodology |
367
+ | CubeSandbox (TencentCloud) | 67 ms average, P95 90 ms, P99 137 ms, under 5 MB per sandbox | rust-vmm microVM service |
368
+ | EmberVM restore | Average 400 ms, P99 2 s; pure lazy faulting 43 MB/s versus 533 MB/s with prefetch | uffd + ZFS CoW |
369
+ | Fly Machines restore | About 300 ms, P99 2 s, 100 GB NVMe checkpoint | Firecracker snapshot fleet |
370
+ | E2B cold start | About 150 ms via UFFD snapshot restore; 5-30 ms warm | e2b.dev engineering blog |
371
+ | gVisor vs Kata disk | Firecracker 4,749 MB/s versus Kata 1,113 MB/s (4.3x); random write 3,842 versus 302 MB/s | micro-containers benchmark |
372
+ | e2ugh target | 125 ms cold (Firecracker tier), 3-5 ms warm pool | this document, Layer 4 |
373
+
374
+ ## Observability
375
+
376
+ The observability layer (26 documented contexts) is what turns the
377
+ benchmarks above from one-off runs into continuously defended facts.
378
+
379
+ | Component | Version (2026-08-22) | Role |
380
+ |---|---|---|
381
+ | Prometheus | 3.11.1 (CVE-2026-40179 XSS fix lineage; operator 88.0.1) | Metric scrape and long-term storage |
382
+ | Grafana LGTM | Grafana 13, Mimir 2.15.3, Loki 3.5.0, Tempo 2.8.1, Pyroscope 1.14.0 | Metrics, logs, traces, continuous profiling |
383
+ | OTel collector | 0.123.0 | Pipeline aggregation; engine exporter emits prometheus text format plus OTLP |
384
+ | OTel eBPF instrumentation (OBI) | beta, KubeCon EU 2026 | Zero-code tracing of sandbox processes |
385
+ | Pixie / Beyla | current | eBPF-native application telemetry without sidecar code |
386
+ | DCGM exporter | 3.6.1 | GPU telemetry on hosts with real GPUs |
387
+ | Cilium Hubble | flow logs | Per-vNIC flow observability with gRPC/Node consumers |
388
+ | Tetragon | current | Per-VM syscall filtering enforcement (qemu shim in Rust) |
389
+
390
+ Kernel observability primitives behind the stack: BPF_MAP_TYPE_RINGBUF
391
+ versus perf-event arrays for low-loss streaming; XDP drop at 14 Mpps versus
392
+ 1.2 Mpps for iptables; eBPF NAT at 30 percent less CPU; AccECN-aware TCP
393
+ retransmit counters on kernel 7.0; io_uring cBPF filter firewalling on
394
+ Linux 7.0; BPF_MAP_TYPE_ARENA on kernel 6.17; load-acquire/store-release
395
+ ordering primitives on 6.15. Operationally: Loki pattern-based log routing,
396
+ adaptive tracing (sample rate follows latency), and ephemeral debug
397
+ containers for live inspection without redeploy.
398
+
399
+ ## Expected outputs and acceptance
400
+
401
+ The benchmark acceptance run doubles as a spoofing smoke test (the full
402
+ proof table lives in `viability.md`). Expected probe outputs inside a
403
+ configured sandbox: `lscpu` and `free -h` show the virtual board (EPYC
404
+ 9965 192c, 128 GB); `nvidia-smi` shows the virtual GPU; `glxinfo -B` shows
405
+ llvmpipe with the virtualized Mesa version; `vulkaninfo` summary shows deviceName
406
+ llvmpipe (or RTX 5090 when the VK patch tier is active);
407
+ `VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU`; `clinfo` shows the Rusticl platform
408
+ with the GPU device class; PyTorch and TensorFlow fall back to CPU plus
409
+ Rusticl OpenCL and complete without crashing - rendering-heavy training is
410
+ slow by design, and the acceptance criterion is no crash, not silicon speed.
411
+ Typical approved uses: tests, installation checks, light scripts, CI, demos,
412
+ AI-agent sandboxes without GPUs.
413
+
414
+ Latency bands: cold about 125 ms p50 on an NVMe host with the image already
415
+ pulled; warm pool 3-5 ms allocation with filesystem layers already mounted
416
+ and cgroups reused; paused-container resume costs 40-60 MB per idle
417
+ container with Node RSS shared through the page cache - acceptable below 50
418
+ concurrent sessions per host, which is the documented concurrency envelope.
419
+
420
+ ## Benchmark harness and regression policy
421
+
422
+ Performance without measurement is superstition. `performance.ts` ships a
423
+ harness with three components: a timing core using `performance.now()` with
424
+ a warmup phase (JIT and cache effects discarded before sampling), percentile
425
+ reporting (every scenario reports p50, p95 and p99, not just the mean, because
426
+ tail latency is what users of a 150-VM/s pool actually feel), and a
427
+ regression detector where each metric carries a baseline plus thresholds and
428
+ the verdict is `ok` within tolerance, `warn` inside the caution band, and
429
+ `fail` beyond it - a failing verdict fails the CI job that produced it.
430
+
431
+ | Scenario | Operation | Guards layers | Baseline expectation |
432
+ |---|---|---|---|
433
+ | sandbox-boot-cold | Firecracker start, no snapshot | 4, 7 | p50 near 125 ms; p99 below 200 ms |
434
+ | sandbox-acquire-warm | Pool acquire of pre-restored VM | 4, 3 | p50 near 4 ms; p99 below 10 ms |
435
+ | image-build-cache | buildx build on cache hit | 6 | p50 near 25 s; fail above 40 s |
436
+ | shader-compile-cache | Mesa compile with warm tmpfs cache | 2, 3 | p99 under half of the cold compile |
437
+ | qemu-mttcg-scale | Guest build with N vCPUs under TCG | 5 | Near-linear scaling to host cores |
438
+ | http-keepalive-loop | 1000 sequential sandbox calls | 7 | Mean well under the cold-connection loop |
439
+
440
+ Harness disciplines: identical thread presets across hosts (Layer 1), warmup
441
+ before sampling, sample counts fixed per scenario, and the regression
442
+ baseline stored next to the code it guards. A `fail` verdict blocks the
443
+ merge that caused it; `warn` opens an issue with the percentile table
444
+ attached so the next author sees the exact tail shape before it hardens into
445
+ a baseline.
446
+
447
+ ## Stacked result
448
+
449
+ The layers are multiplicative because they remove different costs: vector
450
+ width and threads raise per-frame throughput, memory semantics remove
451
+ allocator failures and swap thrash, the warm pool removes boot latency,
452
+ MTTCG turns vCPU count into real parallelism under TCG, build cache removes
453
+ compile latency, and connection reuse removes per-call constants.
454
+
455
+ | Cost center | Naive configuration | Tuned stack | Ratio |
456
+ |---|---|---|---|
457
+ | Sandbox ready | Cold Firecracker boot each time | Warm pool restore | 125 ms to 3-5 ms, about 25-40x |
458
+ | Image build | Uncached single-stage build | gha mode=max cache | 103 s to 25 s, about 4x |
459
+ | Shared memory | /dev/shm 64 MB, Bus error under load | 2 g shm | Failure to success |
460
+ | vCPU parallelism (no KVM) | thread=single TCG | MTTCG thread=multi | Near-linear to host cores |
461
+ | Rasterization | Default width, default threads | 512-bit width, all cores (max 32) | Host dependent, 2-4x typical |
462
+ | Xvfb first-render | 420 ms to first GLX frame | Pre-warmed display | 420 ms to 18 ms |
463
+ | Per-call overhead | New TCP connection per call | Keepalive pool | Removes a constant per call |
464
+
465
+ The engine's own scenarios regress to the naive baseline at 3-5x slower end
466
+ to end; that gap is the budget the regression detector defends. The floor
467
+ under all of it: TCG remains 10-30x slower than KVM for CPU-bound guests, so
468
+ hardware-shaped latency promises are only made for KVM-backed deployments -
469
+ the honest boundary restated in `viability.md`.
470
+
471
+ ## Sources
472
+
473
+ - Mesa environment variables: https://docs.mesa3d.org/envvars.html
474
+ - LLVMpipe driver documentation: https://docs.mesa3d.org/drivers/llvmpipe.html
475
+ - Gallivm AVX-512 merge request !17813: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17813 (via https://www.phoronix.com/news/Mesa-AVX-512-LLVMpipe-Start)
476
+ - LLVMpipe thread ceiling, MR 31551: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31551
477
+ - Rusticl documentation: https://docs.mesa3d.org/rusticl.html - Mesa 26.2.0 release notes: https://docs.mesa3d.org/relnotes/26.2.0.html
478
+ - Docker run reference (memory-swap, shm-size): https://docs.docker.com/reference/cli/docker/container/run/
479
+ - Docker resource constraints: https://docs.docker.com/engine/containers/resource_constraints/ - Compose schema: https://github.com/compose-spec/compose-spec/blob/master/05-services.md
480
+ - Kernel overcommit: https://github.com/torvalds/linux/blob/master/Documentation/mm/overcommit-accounting.rst - KSM: https://docs.kernel.org/admin-guide/mm/ksm.html
481
+ - HugeTLB pages: https://docs.kernel.org/admin-guide/mm/hugetlbpage.html - PyTorch shm Bus error: https://github.com/googlecolab/colabtools/issues/329
482
+ - Firecracker releases: https://github.com/firecracker-microvm/firecracker/releases - project: https://firecracker-microvm.github.io
483
+ - Firecracker snapshot support: https://github.com/firecracker-microvm/firecracker/blob/main/docs/snapshot-support.md
484
+ - QEMU 11.1.0 announcement: https://www.qemu.org/2026/08/11/qemu-11-1-0/ - MTTCG design: https://www.qemu.org/docs/master/devel/multi-thread-tcg.html
485
+ - QEMU invocation: https://www.qemu.org/docs/master/system/invocation.html - microvm: https://www.qemu.org/docs/master/system/i386/microvm.html
486
+ - buildx releases: https://github.com/docker/buildx/releases
487
+ - GitHub Actions build cache: https://docs.docker.com/build/ci/github-actions/cache/
488
+ - GitHub Actions usage limits: https://docs.github.com/en/actions/usage-limits
489
+ - LLVM releases: https://github.com/llvm/llvm-project/releases
490
+ - io_uring / liburing: https://kernel.dk and https://github.com/axboe/liburing
491
+ - DPDK: https://core.dpdk.org/rel/ - SPDK: https://github.com/spdk/spdk/releases
492
+ - sched_ext: https://docs.kernel.org/scheduler/sched-ext.html - mold: https://github.com/rui314/mold
493
+ - ccache / sccache: https://github.com/CCPP/ccache and https://github.com/mozilla/sccache
494
+ - undici Agent (keepalive): https://undici.nodejs.org/api/Agent.html
495
+ - Prometheus: https://prometheus.io/docs/introduction/release/ - Grafana LGTM: https://grafana.com
496
+ - OpenTelemetry eBPF instrumentation: https://github.com/open-telemetry/opentelemetry-ebpf
497
+ - DCGM exporter: https://github.com/NVIDIA/dcgm-exporter - Tetragon: https://github.com/cilium/tetragon
498
+ - Wasmtime releases: https://github.com/bytecodealliance/wasmtime/releases
499
+ - E2B Firecracker-vs-QEMU: https://e2b.dev/blog/firecracker-vs-qemu
@@ -0,0 +1,94 @@
1
+ # Saddle 1.8.18 planning base
2
+
3
+ ## Purpose
4
+
5
+ This planning base consolidates the durable themes found across the 41 historical root README revisions. It is designed to make implementation gaps visible before the 1.8.18 cycle without replacing the repository README, which remains the preserved scope reference.
6
+
7
+ ## Active release baseline
8
+
9
+ The active package baseline is **1.8.17**. JavaScript, Maven, NuGet, RubyGems, extension, desktop, iOS, crawler, Capacitor, and container metadata are aligned to that release. Older release values in changelog entries, release evidence, research, and deterministic fixtures retain their original values.
10
+
11
+ ## Consolidated capability map
12
+
13
+ | Area | Current basis | 1.8.18 direction |
14
+ | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
15
+ | Storage and memory | Working sets, memory modes, materialization, transforms, cache, sync, and cleanup are explicit. | Select a bounded lifecycle, restoration, budget, or observability receipt. |
16
+ | Runners and multi-forge execution | Jobs, triggers, compatibility, worker, delivery, and caller-owned runner adapters are present. | Select a portable runner capability or execution evidence receipt. |
17
+ | File and artifact processing | Binary transforms, archive inspection, packagers, checksums, SBOM shapes, and provenance metadata exist. | Select a useful verification or adapter boundary. |
18
+ | Modes and protocols | Fetch, browser, headless, CLI, binary, computer, extension, desktop, mobile, web, JSON, NDJSON, SSE, blocks, and MCP remain declarative. | Select a compatibility, streaming, or schema boundary. |
19
+ | Reliability | Retry, abort, queue, idempotency, saga, circuit breaker, health, heartbeat, cancellation, and compensation are modeled. | Select a recovery decision that needs portable evidence. |
20
+ | Scraping and browser context | Robots, crawling, cache, extraction, snapshots, sessions, fingerprints, and caller-owned transports exist. | Select a consent, freshness, resumability, action, or context-budget receipt. |
21
+ | Proxy, captcha, and stealth proposals | Caller-owned boundaries only; no bypass, provider, or success guarantee exists. | Add policy or evidence only, never circumvention behavior. |
22
+ | Database and SQL proposals | No database is provisioned or required; persistence remains caller-owned. | Decide whether an adapter contract is needed or should remain external. |
23
+ | Distribution and signing | Six registries, native surfaces, release evidence, checksums, and explicit signing states are modeled. | Select a distribution-verification gap without duplicating product logic or implying trust. |
24
+
25
+ ## Selection rules
26
+
27
+ Each candidate for 1.8.18 must be additive, TypeScript-first, root-first, dependency-free in the core, serializable, deterministic under tests, and adapter-owned for privileged or remote effects. It must not download assets, access credentials, choose a provider, start infrastructure, claim a security property without evidence, or turn a historical proposal into an unsupported guarantee.
28
+
29
+ ## Reading the historical record
30
+
31
+ The historical README themes are consolidated above by capability rather than copied as duplicate prose. Historical versions, provider-specific examples, secret names, speculative dependencies, obsolete runtime assumptions, and unimplemented services remain historical evidence. The current README remains the preserved scope reference; this document is the organized implementation base for gap selection.
32
+
33
+ ## 1.8.18 scope classification
34
+
35
+ The submitted architecture reference was reviewed in full as an evidence source. Its goals divide into three categories. The first category can be implemented in the package now: serializable execution plans, denied-by-default policy evaluation, bounded binary inspection and transformation planning, runner capability selection, materialization receipts, browser and scrape evidence, and a static playground that visualizes those contracts. The second category needs an application backend selected and operated by the caller: Drizzle-backed persistence, queue resumption, webhook handling, account identity, workspace data, audit retention, and service-side job dispatch. The third category needs dedicated execution infrastructure: a remote interactive browser, a hardened OCI container runtime, or a KVM-capable micro-VM host.
36
+
37
+ | Requested outcome | 1.8.18 package treatment | Operational requirement |
38
+ | --- | --- | --- |
39
+ | Binary processor | Inspect, classify, plan, verify, and hand off binary work through additive contracts. | Execution requires an explicit caller-owned adapter. |
40
+ | Edge or third-party compute | Select a compatible runner and create a dispatch plan plus receipt schema. | A configured forge, container platform, or remote executor. |
41
+ | Sandbox or micro-VM | Model policy, requirements, approval, lifecycle, and evidence. | An OCI runtime, gVisor or KVM/Firecracker-capable host supplied by the operator. |
42
+ | Remote agent browser | Model session, action, evidence, and isolation capability. | A deployed remote-browser service, such as a caller-operated Neko instance, with networking and authentication. |
43
+ | Drizzle database | Define a persistence adapter boundary and schema projection. | A backend application, configured database, migrations, and server-side secrets. |
44
+ | Playground in `web/` | Build a static, local-fixture interface for plans, policies, binary metadata, receipts, and integration requirements. | No backend is needed for the initial demonstrator. |
45
+
46
+ ## Selected implementation increment
47
+
48
+ The first implementable block is **isolated execution planning and binary-processing evidence**. It extends existing binary, runner, memory, runtime, persistence, browser, and release modules without duplicating them. The new root-first isolation surface will remain dependency-free and effect-free. It will expose serializable request, policy, plan, requirement, capability, receipt, evidence, approval, and adapter types; deterministic evaluators; and a caller-owned adapter interface. An execution request will be denied by default when its policy, capability receipt, approval, or adapter declaration is absent or incompatible.
49
+
50
+ The initial website work will be a **truthful static playground** under `web/`. It will create and inspect plans with safe fixtures, show the difference between an execution plan and execution, inspect bounded binary metadata, render runner eligibility and policy denial explanations, and state the backend prerequisites for Drizzle, remote browser, OCI, gVisor, and Firecracker integrations. It will not accept arbitrary binary execution, connect to Docker, create databases, relay browser input, store secrets, call a provider, or represent a static site as a VPS.
51
+
52
+ ## Isolation research basis
53
+
54
+ Neko is a self-hosted remote browser or desktop running in containers and accessed through WebRTC; it requires an operator-managed image, credentials, network exposure, and potentially TURN infrastructure. gVisor supplies an OCI runtime for sandboxed containers but is not a conventional virtual machine and has compatibility and performance boundaries. Firecracker is a KVM micro-VM runtime that requires a compatible Linux host, KVM access, a kernel, a root filesystem, and production jailer configuration. These systems are therefore external adapter targets rather than dependencies of the Saddle root library.[1] [2] [3]
55
+
56
+ ## Architecture decision required before remote operation
57
+
58
+ The static playground and core contracts can be implemented immediately. Remote execution needs the operator to select one of two subsequent tracks: a managed application backend with database-backed plans and receipts, or a dedicated execution host for container or micro-VM isolation. The former supports persistent application data and user-visible status; the latter is required for Docker, gVisor, Firecracker, or an interactive Neko browser. Neither track is selected implicitly by adding a package dependency.
59
+
60
+ ## Unified web and internal API decision
61
+
62
+ The earlier Site A through Site E concept is now one `web/` surface. It will not be recreated as multiple deployments. Its internal API is a set of typed, serializable request and response boundaries, not a set of fake remote URLs:
63
+
64
+ | Internal boundary | Responsibility in the unified site | Default implementation |
65
+ | --- | --- | --- |
66
+ | Gateway API | Accepts a typed request and assigns a deterministic request identifier. | Pure in-process function; no HTTP request. |
67
+ | Planning API | Produces a binary-processing, runner, working-set, browser, or persistence plan. | Existing library contracts and pure wrappers. |
68
+ | Policy API | Decides whether a requested effect is permissible. | Denied unless an explicit approval, capability, and adapter declaration all match. |
69
+ | Materialization API | Describes storage and memory requirements plus a cleanup plan. | Plan and receipt only; no filesystem, RAM bridge, or database mutation. |
70
+ | Execution API | Renders a handoff that a caller-owned adapter may execute. | Structured `execution-disabled` result; no binary, process, WASM, container, browser, worker, or remote call. |
71
+ | Persistence API | Projects a serializable record or schema request. | Ephemeral fixture state for the playground; no disk, database, provider, or account. |
72
+ | Evidence API | Returns a receipt that distinguishes requested, planned, denied, delegated, and completed states. | Deterministic receipt generated from the request and policy. |
73
+
74
+ The static web application can use these API shapes directly in the browser, but it cannot host an HTTP API, database, remote process, or micro-VM. If a backend is introduced later, it will implement the same envelopes behind server routes without changing their caller-facing semantics.
75
+
76
+ ## Non-negotiable resource model
77
+
78
+ No executable system can process data without using the resources of some host. In-memory storage uses the RAM of the process host; a browser UI uses a small amount of the visitor's browser resources; a database uses storage or memory of its host; and a remote browser, container, WebAssembly runtime, or micro-VM consumes the resources of its operator host. The 1.8.18 product default therefore means **no intentional compute job, file read, binary load, local bridge, network call, database operation, provider usage, free-tier usage, paid service, browser launch, or remote dispatch**.
79
+
80
+ The unified playground will use only tiny built-in fixtures and deterministic pure functions. It will not offer file upload, arbitrary code input, compilation, binary execution, WASM instantiation, `node:vm`, worker creation, persistent storage, fetch, WebSocket, iframe, provider token, or machine control. Any later operational mode must require a caller-supplied adapter, a capability declaration, an effect budget, and a matching approval record. Its receipt must name the execution owner and must never call a logical working set, memory adapter, SQLite `:memory:` database, PouchDB memory adapter, or JavaScript object graph a VPS or a micro-VM.
81
+
82
+ ## 1.8.18 deliverable sequence
83
+
84
+ 1. Add root-first execution-policy and internal-API contract modules that compose the existing binary transformation, runner-chain, working-set and release-evidence vocabulary.
85
+ 2. Add deterministic tests for disabled, denied, planned, delegated, receipt, budget, approval and adapter mismatch cases.
86
+ 3. Add the unified playground route to `web/`, using safe fixtures and internal API projections to show the lifecycle without executing it.
87
+ 4. Add documentation that explains the difference between logical sandbox planning, in-process storage, OCI sandboxing, remote-browser streaming and KVM micro-VMs.
88
+ 5. Run all release gates, then only bump and tag 1.8.18 when the selected contract and playground are complete.
89
+
90
+ ## References
91
+
92
+ [1]: https://neko.m1k1o.net/docs/v2 "Neko documentation"
93
+ [2]: https://gvisor.dev/docs/ "gVisor documentation"
94
+ [3]: https://github.com/firecracker-microvm/firecracker/blob/main/docs/getting-started.md "Firecracker getting started guide"