@wenathlan/saddle 2.0.150 → 2.0.152

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 (296) hide show
  1. package/Dockerfile +43 -23
  2. package/README.md +4 -4
  3. package/biome.jsonc +134 -0
  4. package/dist/App.d.ts +3 -0
  5. package/dist/App.js +50 -0
  6. package/dist/Sol/Sol.d.ts +3 -0
  7. package/dist/Sol/Sol.js +46 -0
  8. package/dist/Sol/agentbrowser/agentbrowser.d.ts +9 -0
  9. package/dist/Sol/agentbrowser/agentbrowser.js +121 -0
  10. package/dist/Sol/architecture/architecture.d.ts +9 -0
  11. package/dist/Sol/architecture/architecture.js +93 -0
  12. package/dist/Sol/compute/compute.d.ts +9 -0
  13. package/dist/Sol/compute/compute.js +22 -0
  14. package/dist/Sol/console/console.d.ts +15 -0
  15. package/dist/Sol/console/console.js +292 -0
  16. package/dist/Sol/dashboard/dashboard.d.ts +10 -0
  17. package/dist/Sol/dashboard/dashboard.js +181 -0
  18. package/dist/Sol/docs/docs.d.ts +9 -0
  19. package/dist/Sol/docs/docs.js +28 -0
  20. package/dist/Sol/home/home.d.ts +35 -0
  21. package/dist/Sol/home/home.js +239 -0
  22. package/dist/Sol/integrations/integrations.d.ts +9 -0
  23. package/dist/Sol/integrations/integrations.js +83 -0
  24. package/dist/Sol/intro/intro.d.ts +7 -0
  25. package/dist/Sol/intro/intro.js +102 -0
  26. package/dist/Sol/login/login.d.ts +16 -0
  27. package/dist/Sol/login/login.js +49 -0
  28. package/dist/Sol/notfound/notfound.d.ts +9 -0
  29. package/dist/Sol/notfound/notfound.js +15 -0
  30. package/dist/Sol/onboarding/onboarding.d.ts +25 -0
  31. package/dist/Sol/onboarding/onboarding.js +60 -0
  32. package/dist/Sol/playground/playground.d.ts +9 -0
  33. package/dist/Sol/playground/playground.js +127 -0
  34. package/dist/Sol/register/register.d.ts +16 -0
  35. package/dist/Sol/register/register.js +193 -0
  36. package/dist/Sol/shell/Shell.d.ts +124 -0
  37. package/dist/Sol/shell/Shell.js +335 -0
  38. package/dist/Sol/wingets/ComputeBootladder.d.ts +6 -0
  39. package/dist/Sol/wingets/ComputeBootladder.js +71 -0
  40. package/dist/Sol/wingets/ComputeModalitycatalog.d.ts +7 -0
  41. package/dist/Sol/wingets/ComputeModalitycatalog.js +71 -0
  42. package/dist/Sol/wingets/ConsoleApibadge.d.ts +7 -0
  43. package/dist/Sol/wingets/ConsoleApibadge.js +5 -0
  44. package/dist/Sol/wingets/ConsoleEdgelaw.d.ts +6 -0
  45. package/dist/Sol/wingets/ConsoleEdgelaw.js +36 -0
  46. package/dist/Sol/wingets/ConsoleEventstimeline.d.ts +19 -0
  47. package/dist/Sol/wingets/ConsoleEventstimeline.js +12 -0
  48. package/dist/Sol/wingets/ConsoleSnapshotcontrols.d.ts +8 -0
  49. package/dist/Sol/wingets/ConsoleSnapshotcontrols.js +8 -0
  50. package/dist/Sol/wingets/ConsoleSpecpanel.d.ts +21 -0
  51. package/dist/Sol/wingets/ConsoleSpecpanel.js +75 -0
  52. package/dist/Sol/wingets/ConsoleTerminal.d.ts +22 -0
  53. package/dist/Sol/wingets/ConsoleTerminal.js +77 -0
  54. package/dist/Sol/wingets/DashboardAccountpanel.d.ts +18 -0
  55. package/dist/Sol/wingets/DashboardAccountpanel.js +65 -0
  56. package/dist/Sol/wingets/DashboardAdminpanel.d.ts +6 -0
  57. package/dist/Sol/wingets/DashboardAdminpanel.js +90 -0
  58. package/dist/Sol/wingets/DashboardAuditlog.d.ts +8 -0
  59. package/dist/Sol/wingets/DashboardAuditlog.js +50 -0
  60. package/dist/Sol/wingets/DashboardCreatesandboxform.d.ts +10 -0
  61. package/dist/Sol/wingets/DashboardCreatesandboxform.js +71 -0
  62. package/dist/Sol/wingets/DashboardEventstimeline.d.ts +8 -0
  63. package/dist/Sol/wingets/DashboardEventstimeline.js +83 -0
  64. package/dist/Sol/wingets/DashboardGlobalsandboxestable.d.ts +8 -0
  65. package/dist/Sol/wingets/DashboardGlobalsandboxestable.js +57 -0
  66. package/dist/Sol/wingets/DashboardMeshnodestable.d.ts +8 -0
  67. package/dist/Sol/wingets/DashboardMeshnodestable.js +103 -0
  68. package/dist/Sol/wingets/DashboardSandboxlist.d.ts +10 -0
  69. package/dist/Sol/wingets/DashboardSandboxlist.js +163 -0
  70. package/dist/Sol/wingets/DashboardUserstable.d.ts +8 -0
  71. package/dist/Sol/wingets/DashboardUserstable.js +78 -0
  72. package/dist/Sol/wingets/HomeEntrygate.d.ts +23 -0
  73. package/dist/Sol/wingets/HomeEntrygate.js +73 -0
  74. package/dist/Sol/wingets/HomeMetricstrip.d.ts +9 -0
  75. package/dist/Sol/wingets/HomeMetricstrip.js +4 -0
  76. package/dist/Sol/wingets/HomeRuntimediagram.d.ts +1 -0
  77. package/dist/Sol/wingets/HomeRuntimediagram.js +22 -0
  78. package/dist/Sol/wingets/LoginForm.d.ts +19 -0
  79. package/dist/Sol/wingets/LoginForm.js +141 -0
  80. package/dist/Sol/wingets/RegisterPasswordconfirm.d.ts +13 -0
  81. package/dist/Sol/wingets/RegisterPasswordconfirm.js +16 -0
  82. package/dist/Sol/wingets/RegisterPasswordmeter.d.ts +19 -0
  83. package/dist/Sol/wingets/RegisterPasswordmeter.js +65 -0
  84. package/dist/Sol/wingets/RegisterUsernamerules.d.ts +11 -0
  85. package/dist/Sol/wingets/RegisterUsernamerules.js +16 -0
  86. package/dist/Sol/wingets/index.d.ts +39 -0
  87. package/dist/Sol/wingets/index.js +39 -0
  88. package/dist/alternatives.d.ts +508 -0
  89. package/dist/alternatives.js +950 -0
  90. package/dist/api.d.ts +154 -0
  91. package/dist/api.js +174 -0
  92. package/dist/auth.d.ts +268 -0
  93. package/dist/auth.js +476 -0
  94. package/dist/automation.d.ts +425 -0
  95. package/dist/automation.js +566 -0
  96. package/dist/browser.d.ts +561 -0
  97. package/dist/browser.js +1058 -0
  98. package/dist/capacitor.config.d.ts +45 -0
  99. package/dist/capacitor.config.js +48 -0
  100. package/dist/catalog.d.ts +43 -0
  101. package/dist/catalog.js +44 -0
  102. package/dist/cli.d.ts +16 -0
  103. package/dist/cli.js +168 -0
  104. package/dist/communication.d.ts +181 -0
  105. package/dist/communication.js +376 -0
  106. package/dist/compute.d.ts +1160 -0
  107. package/dist/compute.js +2272 -0
  108. package/dist/dashboardlib.d.ts +58 -0
  109. package/dist/dashboardlib.js +161 -0
  110. package/dist/db.d.ts +569 -0
  111. package/dist/db.js +1080 -0
  112. package/dist/distribution.d.ts +528 -0
  113. package/dist/distribution.js +810 -0
  114. package/dist/drizzle.config.d.ts +20 -0
  115. package/dist/drizzle.config.js +18 -0
  116. package/dist/edgelandes.d.ts +70 -0
  117. package/dist/edgelandes.host.d.ts +26 -0
  118. package/dist/edgelandes.host.js +1089 -0
  119. package/dist/edgelandes.inproc.d.ts +27 -0
  120. package/dist/edgelandes.inproc.js +952 -0
  121. package/dist/edgelandes.js +1133 -0
  122. package/dist/edgelandes.ninety.d.ts +31 -0
  123. package/dist/edgelandes.ninety.js +174 -0
  124. package/dist/edgelandes.virtual.d.ts +25 -0
  125. package/dist/edgelandes.virtual.js +629 -0
  126. package/dist/edgeplane.d.ts +114 -0
  127. package/dist/edgeplane.js +305 -0
  128. package/dist/examplelocaljob.d.ts +1 -0
  129. package/{docs/example-localjob.ts → dist/examplelocaljob.js} +0 -1
  130. package/dist/execution.d.ts +529 -0
  131. package/dist/execution.js +760 -0
  132. package/dist/family.d.ts +16 -0
  133. package/dist/family.js +42 -0
  134. package/dist/familyurl.d.ts +21 -0
  135. package/dist/familyurl.js +24 -0
  136. package/dist/format.d.ts +18 -0
  137. package/dist/format.js +59 -0
  138. package/dist/foundation.d.ts +172 -0
  139. package/dist/foundation.js +312 -0
  140. package/dist/index.d.ts +735 -0
  141. package/dist/index.js +1020 -0
  142. package/dist/integration.d.ts +235 -0
  143. package/dist/integration.js +228 -0
  144. package/dist/intelligence.d.ts +93 -0
  145. package/dist/intelligence.js +144 -0
  146. package/dist/isolation.d.ts +128 -0
  147. package/dist/isolation.js +95 -0
  148. package/dist/labels.d.ts +665 -0
  149. package/dist/labels.js +751 -0
  150. package/dist/localauth.d.ts +127 -0
  151. package/dist/localauth.js +413 -0
  152. package/dist/media.d.ts +343 -0
  153. package/dist/media.js +985 -0
  154. package/dist/mesh.d.ts +177 -0
  155. package/dist/mesh.js +468 -0
  156. package/dist/modalityregistry.d.ts +109 -0
  157. package/dist/modalityregistry.js +1386 -0
  158. package/dist/modes.d.ts +358 -0
  159. package/dist/modes.js +133 -0
  160. package/dist/onboardingstate.d.ts +79 -0
  161. package/dist/onboardingstate.js +282 -0
  162. package/dist/orchestrator.d.ts +1338 -0
  163. package/dist/orchestrator.js +4310 -0
  164. package/dist/packager/targetcli.js +4 -0
  165. package/dist/paths.d.ts +2 -0
  166. package/dist/paths.js +14 -0
  167. package/dist/performance.d.ts +415 -0
  168. package/dist/performance.js +826 -0
  169. package/dist/quantum.d.ts +809 -0
  170. package/dist/quantum.js +2072 -0
  171. package/dist/render.d.ts +380 -0
  172. package/dist/render.js +1072 -0
  173. package/dist/runall.d.ts +2 -0
  174. package/dist/runall.js +39 -0
  175. package/dist/runtimeprobe.d.ts +4 -0
  176. package/dist/runtimeprobe.js +8 -0
  177. package/dist/sandbox.d.ts +355 -0
  178. package/dist/sandbox.js +1721 -0
  179. package/dist/sandboxenvprofile.d.ts +29 -0
  180. package/dist/sandboxenvprofile.js +89 -0
  181. package/dist/sandboxprofile.d.ts +137 -0
  182. package/dist/sandboxprofile.js +241 -0
  183. package/dist/sandboxqueue.d.ts +108 -0
  184. package/dist/sandboxqueue.js +201 -0
  185. package/dist/sandboxquota.d.ts +121 -0
  186. package/dist/sandboxquota.js +236 -0
  187. package/dist/scheduler.d.ts +595 -0
  188. package/dist/scheduler.js +1258 -0
  189. package/dist/scriptlanes.d.ts +182 -0
  190. package/dist/scriptlanes.js +660 -0
  191. package/dist/scripts.buildengine.d.ts +1 -0
  192. package/dist/scripts.buildengine.js +39 -0
  193. package/dist/scripts.securitygate.d.ts +1 -0
  194. package/dist/scripts.securitygate.js +68 -0
  195. package/dist/scripts.validateflatnative.d.ts +1 -0
  196. package/dist/scripts.validateflatnative.js +72 -0
  197. package/dist/security.d.ts +500 -0
  198. package/dist/security.js +1169 -0
  199. package/dist/seedcatalog.d.ts +13 -0
  200. package/dist/seedcatalog.js +46 -0
  201. package/dist/server.d.ts +20 -0
  202. package/dist/server.js +53 -0
  203. package/dist/speccatalog.d.ts +31 -0
  204. package/dist/speccatalog.js +163 -0
  205. package/dist/tiers.d.ts +1001 -0
  206. package/dist/tiers.js +2169 -0
  207. package/dist/utils.d.ts +2 -0
  208. package/dist/utils.js +5 -0
  209. package/dist/vaulthandoff.d.ts +141 -0
  210. package/dist/vaulthandoff.js +444 -0
  211. package/dist/virtual.d.ts +640 -0
  212. package/dist/virtual.js +1284 -0
  213. package/dist/virtualcpu.d.ts +315 -0
  214. package/dist/virtualcpu.js +1180 -0
  215. package/dist/virtualgpu.d.ts +344 -0
  216. package/dist/virtualgpu.js +1000 -0
  217. package/dist/virtualization.d.ts +606 -0
  218. package/dist/virtualization.js +1186 -0
  219. package/dist/virtualmemory.d.ts +817 -0
  220. package/dist/virtualmemory.js +1795 -0
  221. package/dist/vite.config.d.ts +3 -0
  222. package/dist/vite.config.js +43 -0
  223. package/dist/vitest.config.d.ts +2 -0
  224. package/dist/vitest.config.js +25 -0
  225. package/dist/webserver.d.ts +166 -0
  226. package/dist/webserver.js +2226 -0
  227. package/dist/workloadlaw.d.ts +133 -0
  228. package/dist/workloadlaw.js +193 -0
  229. package/docker.config +13 -6
  230. package/docs/artifactavailability.md +2 -2
  231. package/docs/{containerplatforms-2.1.0.md → containerplatforms.2.1.0.md} +1 -1
  232. package/docs/{documentmap-1.8.12.md → documentmap.1.8.12.md} +1 -1
  233. package/docs/ninety.modalities.md +108 -0
  234. package/docs/planning.ninety.md +391 -0
  235. package/docs/{releasenotes-1.8.13.md → releasenotes.1.8.13.md} +2 -2
  236. package/docs/{releasenotes-1.8.14.md → releasenotes.1.8.14.md} +1 -1
  237. package/docs/{repo-synthesis-1.8.16.md → repo.synthesis.1.8.16.md} +1 -1
  238. package/docs/{todo-1.8.15.md → todo.1.8.15.md} +1 -1
  239. package/docs/{todo-1.8.16.md → todo.1.8.16.md} +5 -5
  240. package/docs/todo.md +2 -2
  241. package/docs/workloadlaw.md +104 -0
  242. package/index.ts +4 -3
  243. package/manifest.json +1 -1
  244. package/modalityregistry.ts +1493 -0
  245. package/orchestrator.ts +1 -1
  246. package/package.json +76 -37
  247. package/docs/CONVERSA.txt +0 -1523
  248. package/docs/architecture-1.8.19.png +0 -0
  249. package/docs/assets/architecture.svg +0 -45
  250. package/docs/assets/saddle-browser-trace.webp +0 -0
  251. package/docs/assets/saddle-hero-bridge.webp +0 -0
  252. package/docs/assets/saddle-mark.webp +0 -0
  253. package/docs/assets/saddle-runtime-map.webp +0 -0
  254. package/docs/assets/saddlemark.svg +0 -13
  255. package/docs/example-publicapi.ts +0 -7
  256. package/docs/saddle.archive.1.8.17.tar.gz.gpg +0 -0
  257. /package/docs/{architecture-1.8.19.md → architecture.1.8.19.md} +0 -0
  258. /package/docs/{architecture-1.8.19.mmd → architecture.1.8.19.mmd} +0 -0
  259. /package/docs/{artifactresearch-1.8.9.md → artifactresearch.1.8.9.md} +0 -0
  260. /package/docs/{batches-1816-1820.md → batches.1816.to.1820.md} +0 -0
  261. /package/docs/{brancharchive-2026-08-18.md → brancharchive.2026.08.18.md} +0 -0
  262. /package/docs/{containerplatforms-1.8.17.md → containerplatforms.1.8.17.md} +0 -0
  263. /package/docs/{e2ugh-engine.md → e2ugh.engine.md} +0 -0
  264. /package/docs/{flatbuildresearch-1.8.11.md → flatbuildresearch.1.8.11.md} +0 -0
  265. /package/docs/{licenseaudit-1.8.12.md → licenseaudit.1.8.12.md} +0 -0
  266. /package/docs/{mobileconversionresearch-1.8.10.md → mobileconversionresearch.1.8.10.md} +0 -0
  267. /package/docs/{native-wrappers.md → native.wrappers.md} +0 -0
  268. /package/docs/{nativeidentityresearch-1.8.11.md → nativeidentityresearch.1.8.11.md} +0 -0
  269. /package/docs/{releasenotes-1.8.12.md → releasenotes.1.8.12.md} +0 -0
  270. /package/docs/{releasenotes-1.8.15.md → releasenotes.1.8.15.md} +0 -0
  271. /package/docs/{releasenotes-1.8.16.md → releasenotes.1.8.16.md} +0 -0
  272. /package/docs/{releasenotes-1.8.17.md → releasenotes.1.8.17.md} +0 -0
  273. /package/docs/{releasenotes-1.8.18.md → releasenotes.1.8.18.md} +0 -0
  274. /package/docs/{releasenotes-1.8.19.md → releasenotes.1.8.19.md} +0 -0
  275. /package/docs/{reorganization-1.8.8.md → reorganization.1.8.8.md} +0 -0
  276. /package/docs/{reorganization-1.8.9.md → reorganization.1.8.9.md} +0 -0
  277. /package/docs/{repo-analysis-1.8.21.json → repo.analysis.1.8.21.json} +0 -0
  278. /package/docs/{repo-candidates-1.8.21.jsonl → repo.candidates.1.8.21.jsonl} +0 -0
  279. /package/docs/{repo-research-1.8.16.md → repo.research.1.8.16.md} +0 -0
  280. /package/docs/{repo-research-1.8.21.md → repo.research.1.8.21.md} +0 -0
  281. /package/docs/{repo-selected-1.8.21.json → repo.selected.1.8.21.json} +0 -0
  282. /package/docs/{repo-synthesis-1.8.21.md → repo.synthesis.1.8.21.md} +0 -0
  283. /package/docs/{research-1.8.18-isolation.md → research.1.8.18.isolation.md} +0 -0
  284. /package/docs/{research-1.8.19-virtual-browser.md → research.1.8.19.virtual.browser.md} +0 -0
  285. /package/docs/{scanningresearch-1.8.11.md → scanningresearch.1.8.11.md} +0 -0
  286. /package/docs/{securityaudit-1.8.7.md → securityaudit.1.8.7.md} +0 -0
  287. /package/docs/{securityreferences-1.8.11.md → securityreferences.1.8.11.md} +0 -0
  288. /package/docs/{securityresearch-1.8.11.md → securityresearch.1.8.11.md} +0 -0
  289. /package/docs/{signingresearch-1.8.12.md → signingresearch.1.8.12.md} +0 -0
  290. /package/docs/{tauri-glib-risk-1.8.11.md → tauri.glib.risk.1.8.11.md} +0 -0
  291. /package/docs/{todo-1.8.18.md → todo.1.8.18.md} +0 -0
  292. /package/docs/{todo-1.8.19.md → todo.1.8.19.md} +0 -0
  293. /package/docs/{toolchainresearch-1.8.9.md → toolchainresearch.1.8.9.md} +0 -0
  294. /package/docs/{web-duplicatecleanup.md → web.duplicatecleanup.md} +0 -0
  295. /package/docs/{web-ideas.md → web.ideas.md} +0 -0
  296. /package/docs/{workflowimprovements-2026-08-19.md → workflowimprovements.2026.08.19.md} +0 -0
@@ -0,0 +1,1493 @@
1
+ // # modalityregistry — the catalog of the sandbox modalities the saddle
2
+ // engine opens (root layer, wave SV1). One record per modality: the
3
+ // isolation family, the driver requirements it mounts, the boot cost class,
4
+ // the hardening gates it carries, the mime contract it answers and the
5
+ // honest state of its wiring. The registry is the spine of the ninety
6
+ // modality plan (the owner's law: the ninety modalities of saddle act for
7
+ // the system, nothing touches the visitor machine): the workload never
8
+ // chooses by name — the join resolver reads the request (isolation, gpu,
9
+ // network, boot budget) and answers the modality set that satisfies it, so
10
+ // the person chooses none and the platform resolves the join of all (the
11
+ // nuclear modality law). Every record declares its state — live, host or
12
+ // planned — so the report never lies: a lane that does not wire a modality
13
+ // says so instead of pretending. Pure data and pure functions: zero
14
+ // storage, zero node-only imports, the browser-pure bundle keeps carrying
15
+ // it.
16
+
17
+ /** The boot cost classes the ladder measures. */
18
+ export type BootClass = "hot" | "warm" | "cold";
19
+
20
+ /** The isolation families the modalities group under. */
21
+ export type ModalityFamily =
22
+ | "virtual"
23
+ | "runner"
24
+ | "packages"
25
+ | "container"
26
+ | "microvm"
27
+ | "browser"
28
+ | "mobile"
29
+ | "confidential"
30
+ | "emulator"
31
+ | "pod"
32
+ | "local"
33
+ | "screen"
34
+ | "wasm"
35
+ | "fs"
36
+ | "ram"
37
+ | "delivery"
38
+ | "language"
39
+ | "sandbox"
40
+ | "storage"
41
+ | "network"
42
+ | "build"
43
+ | "ci"
44
+ | "gpu";
45
+
46
+ /**
47
+ * The honest wiring state of one modality — the truth ladder every record
48
+ * declares and every report reads:
49
+ * - live — the platform lanes drive it today: the run lane executes
50
+ * through it or the storage lane stores through it;
51
+ * - host — the lane probes the host runtime and reports availability, the
52
+ * execution wiring is the next rung;
53
+ * - planned — the declared catalog promise, no lane wires it yet and the
54
+ * record never pretends otherwise.
55
+ */
56
+ export type ModalityState = "live" | "host" | "planned";
57
+
58
+ /** One sandbox modality of the registry. */
59
+ export interface ModalityRecord {
60
+ /** The stable id the api and the config rows reference. */
61
+ id: string;
62
+ /** The display label (short, lowercase). */
63
+ label: string;
64
+ /** The isolation family the modality belongs to. */
65
+ family: ModalityFamily;
66
+ /** The isolation depth the family reaches (the capability contract). */
67
+ isolation: "process" | "namespace" | "vm" | "hardware";
68
+ /** The honest wiring state of the modality (the report never lies). */
69
+ state: ModalityState;
70
+ /** The driver modules the modality mounts when it boots. */
71
+ drivers: readonly string[];
72
+ /** The hardening gates the modality enforces by default. */
73
+ hardening: readonly string[];
74
+ /** The boot cost class (the measured budget lives in the boot ladder). */
75
+ boot: BootClass;
76
+ /** The measured boot budget in milliseconds (the ladder answers). */
77
+ bootms: number;
78
+ /** Whether the modality presents a gpu through the virtual drivers. */
79
+ gpu: boolean;
80
+ /** Whether the modality opens a network path (the hardened default is off). */
81
+ network: boolean;
82
+ /** The mime type the modality's api surface answers. */
83
+ mime: string;
84
+ }
85
+
86
+ /** The boot budgets of the ladder, per class: the ceilings the records walk
87
+ * under (firecracker 125 ms and gvisor about 200 ms ride warm, the full
88
+ * machine images ride cold). */
89
+ export const BOOTLADDER: Readonly<Record<BootClass, number>> = Object.freeze({
90
+ hot: 25,
91
+ warm: 800,
92
+ cold: 1500,
93
+ });
94
+
95
+ /** The ninety modality plan: the count the owner charged (the ninety
96
+ * modalities of saddle acting for the system) and the registry answers —
97
+ * the catalog walked from twenty through forty to the ninety law, and
98
+ * this constant is the line the plan pins. */
99
+ export const MODALITYPLANCOUNT = 90;
100
+
101
+ /** The modality records: the catalog the join resolver reads. */
102
+ export const MODALITIES: readonly ModalityRecord[] = Object.freeze([
103
+ // the virtual family: the full machine with the virtual drivers
104
+ {
105
+ id: "virtual-full",
106
+ label: "complete virtual",
107
+ family: "virtual",
108
+ isolation: "hardware",
109
+ state: "live",
110
+ drivers: ["virtualcpu", "virtualgpu", "virtualmemory"],
111
+ hardening: ["profile-lock"],
112
+ boot: "cold",
113
+ bootms: BOOTLADDER.cold,
114
+ gpu: true,
115
+ network: true,
116
+ mime: "application/vnd.devthink.sandbox+json",
117
+ },
118
+ {
119
+ id: "virtual-vgpu",
120
+ label: "vgpu slice",
121
+ family: "virtual",
122
+ isolation: "hardware",
123
+ state: "live",
124
+ drivers: ["virtualgpu", "nvml-shim", "vfio"],
125
+ hardening: ["mig-profile"],
126
+ boot: "warm",
127
+ bootms: 600,
128
+ gpu: true,
129
+ network: true,
130
+ mime: "application/vnd.devthink.sandbox+json",
131
+ },
132
+ {
133
+ id: "virtual-screen",
134
+ label: "vm plus vnc",
135
+ family: "screen",
136
+ isolation: "vm",
137
+ state: "live",
138
+ drivers: ["virtualcpu", "virtualgpu", "xvfb", "looking-glass"],
139
+ hardening: ["session-otp"],
140
+ boot: "warm",
141
+ bootms: 700,
142
+ gpu: true,
143
+ network: true,
144
+ mime: "application/vnd.devthink.screen+json",
145
+ },
146
+ {
147
+ id: "virtual-drivers",
148
+ label: "virtual drivers",
149
+ family: "virtual",
150
+ isolation: "vm",
151
+ state: "live",
152
+ drivers: ["virtualcpu", "virtualgpu", "virtualmemory", "nvml-shim"],
153
+ hardening: ["driver-quota"],
154
+ boot: "warm",
155
+ bootms: 250,
156
+ gpu: true,
157
+ network: false,
158
+ mime: "application/vnd.devthink.sandbox+json",
159
+ },
160
+ {
161
+ id: "virtual-kvm",
162
+ label: "kvm machine",
163
+ family: "virtual",
164
+ isolation: "hardware",
165
+ state: "live",
166
+ drivers: ["kvm", "virtualcpu"],
167
+ hardening: ["clean-rootfs"],
168
+ boot: "warm",
169
+ bootms: 150,
170
+ gpu: false,
171
+ network: true,
172
+ mime: "application/vnd.devthink.sandbox+json",
173
+ },
174
+ // the runner family: the universal binary runner
175
+ {
176
+ id: "runner-universal",
177
+ label: "universal runner",
178
+ family: "runner",
179
+ isolation: "namespace",
180
+ state: "live",
181
+ drivers: ["binfmt", "bash"],
182
+ hardening: ["read-only-root", "dropped-caps"],
183
+ boot: "warm",
184
+ bootms: BOOTLADDER.warm,
185
+ gpu: false,
186
+ network: true,
187
+ mime: "application/vnd.devthink.run+json",
188
+ },
189
+ {
190
+ id: "runner-node",
191
+ label: "node packages",
192
+ family: "packages",
193
+ isolation: "process",
194
+ state: "live",
195
+ drivers: ["node", "babel", "swc"],
196
+ hardening: ["package-allowlist"],
197
+ boot: "hot",
198
+ bootms: BOOTLADDER.hot,
199
+ gpu: false,
200
+ network: true,
201
+ mime: "application/vnd.devthink.run+json",
202
+ },
203
+ {
204
+ id: "runner-bun",
205
+ label: "bun runtime",
206
+ family: "packages",
207
+ isolation: "process",
208
+ state: "live",
209
+ drivers: ["bun"],
210
+ hardening: ["package-allowlist"],
211
+ boot: "hot",
212
+ bootms: 20,
213
+ gpu: false,
214
+ network: true,
215
+ mime: "application/vnd.devthink.run+json",
216
+ },
217
+ {
218
+ id: "runner-deno",
219
+ label: "deno runtime",
220
+ family: "packages",
221
+ isolation: "process",
222
+ state: "live",
223
+ drivers: ["deno"],
224
+ hardening: ["permission-map"],
225
+ boot: "hot",
226
+ bootms: 20,
227
+ gpu: false,
228
+ network: true,
229
+ mime: "application/vnd.devthink.run+json",
230
+ },
231
+ {
232
+ id: "runner-webpack",
233
+ label: "webpack bundle",
234
+ family: "packages",
235
+ isolation: "process",
236
+ state: "live",
237
+ drivers: ["webpack", "swc"],
238
+ hardening: ["bundle-allowlist"],
239
+ boot: "hot",
240
+ bootms: 18,
241
+ gpu: false,
242
+ network: true,
243
+ mime: "application/vnd.devthink.run+json",
244
+ },
245
+ {
246
+ id: "runner-babel",
247
+ label: "babel transpile",
248
+ family: "packages",
249
+ isolation: "process",
250
+ state: "live",
251
+ drivers: ["babel"],
252
+ hardening: ["plugin-allowlist"],
253
+ boot: "hot",
254
+ bootms: 15,
255
+ gpu: false,
256
+ network: false,
257
+ mime: "application/vnd.devthink.run+json",
258
+ },
259
+ {
260
+ id: "runner-wasm",
261
+ label: "wasm and wasi",
262
+ family: "wasm",
263
+ isolation: "process",
264
+ state: "live",
265
+ drivers: ["wasmer", "wasmedge"],
266
+ hardening: ["capability-imports"],
267
+ boot: "hot",
268
+ bootms: 15,
269
+ gpu: false,
270
+ network: false,
271
+ mime: "application/wasm",
272
+ },
273
+ {
274
+ id: "runner-serverless",
275
+ label: "v8 isolates",
276
+ family: "runner",
277
+ isolation: "process",
278
+ state: "live",
279
+ drivers: ["v8"],
280
+ hardening: ["no-fs", "cpu-quota"],
281
+ boot: "hot",
282
+ bootms: 8,
283
+ gpu: false,
284
+ network: true,
285
+ mime: "application/vnd.devthink.run+json",
286
+ },
287
+ // the language family: the polyglot toolchains the engine mounts inside
288
+ // the sandbox (every runner documented by its driver set — the exec lane
289
+ // drives each through the host runtime, the honest probe answers per host)
290
+ {
291
+ id: "language-python",
292
+ label: "cpython runtime",
293
+ family: "language",
294
+ isolation: "process",
295
+ state: "live",
296
+ drivers: ["python3"],
297
+ hardening: ["package-allowlist"],
298
+ boot: "hot",
299
+ bootms: 12,
300
+ gpu: false,
301
+ network: true,
302
+ mime: "application/vnd.devthink.run+json",
303
+ },
304
+ {
305
+ id: "language-go",
306
+ label: "golang toolchain",
307
+ family: "language",
308
+ isolation: "process",
309
+ state: "live",
310
+ drivers: ["go"],
311
+ hardening: ["gopath-jail"],
312
+ boot: "hot",
313
+ bootms: 15,
314
+ gpu: false,
315
+ network: true,
316
+ mime: "application/vnd.devthink.run+json",
317
+ },
318
+ {
319
+ id: "language-rust",
320
+ label: "rustc toolchain",
321
+ family: "language",
322
+ isolation: "process",
323
+ state: "live",
324
+ drivers: ["rustc"],
325
+ hardening: ["crate-allowlist"],
326
+ boot: "hot",
327
+ bootms: 18,
328
+ gpu: false,
329
+ network: true,
330
+ mime: "application/vnd.devthink.run+json",
331
+ },
332
+ {
333
+ id: "language-cargo",
334
+ label: "cargo builds",
335
+ family: "language",
336
+ isolation: "process",
337
+ state: "live",
338
+ drivers: ["cargo"],
339
+ hardening: ["crate-allowlist"],
340
+ boot: "hot",
341
+ bootms: 20,
342
+ gpu: false,
343
+ network: true,
344
+ mime: "application/vnd.devthink.run+json",
345
+ },
346
+ {
347
+ id: "language-v",
348
+ label: "v compiler",
349
+ family: "language",
350
+ isolation: "process",
351
+ state: "live",
352
+ drivers: ["v"],
353
+ hardening: ["package-allowlist"],
354
+ boot: "hot",
355
+ bootms: 15,
356
+ gpu: false,
357
+ network: true,
358
+ mime: "application/vnd.devthink.run+json",
359
+ },
360
+ {
361
+ id: "language-java",
362
+ label: "jdk runtime",
363
+ family: "language",
364
+ isolation: "process",
365
+ state: "live",
366
+ drivers: ["java", "javac"],
367
+ hardening: ["security-manager"],
368
+ boot: "warm",
369
+ bootms: 200,
370
+ gpu: false,
371
+ network: true,
372
+ mime: "application/vnd.devthink.run+json",
373
+ },
374
+ {
375
+ id: "language-dotnet",
376
+ label: "dotnet runtime",
377
+ family: "language",
378
+ isolation: "process",
379
+ state: "live",
380
+ drivers: ["dotnet"],
381
+ hardening: ["assembly-allowlist"],
382
+ boot: "warm",
383
+ bootms: 150,
384
+ gpu: false,
385
+ network: true,
386
+ mime: "application/vnd.devthink.run+json",
387
+ },
388
+ {
389
+ id: "language-ruby",
390
+ label: "ruby interpreter",
391
+ family: "language",
392
+ isolation: "process",
393
+ state: "live",
394
+ drivers: ["ruby"],
395
+ hardening: ["gem-allowlist"],
396
+ boot: "hot",
397
+ bootms: 12,
398
+ gpu: false,
399
+ network: true,
400
+ mime: "application/vnd.devthink.run+json",
401
+ },
402
+ {
403
+ id: "language-php",
404
+ label: "php interpreter",
405
+ family: "language",
406
+ isolation: "process",
407
+ state: "live",
408
+ drivers: ["php"],
409
+ hardening: ["ini-lockdown"],
410
+ boot: "hot",
411
+ bootms: 12,
412
+ gpu: false,
413
+ network: true,
414
+ mime: "application/vnd.devthink.run+json",
415
+ },
416
+ {
417
+ id: "language-lua",
418
+ label: "lua interpreter",
419
+ family: "language",
420
+ isolation: "process",
421
+ state: "live",
422
+ drivers: ["lua"],
423
+ hardening: ["sandbox-env"],
424
+ boot: "hot",
425
+ bootms: 8,
426
+ gpu: false,
427
+ network: false,
428
+ mime: "application/vnd.devthink.run+json",
429
+ },
430
+ {
431
+ id: "language-zig",
432
+ label: "zig toolchain",
433
+ family: "language",
434
+ isolation: "process",
435
+ state: "live",
436
+ drivers: ["zig"],
437
+ hardening: ["package-allowlist"],
438
+ boot: "hot",
439
+ bootms: 15,
440
+ gpu: false,
441
+ network: true,
442
+ mime: "application/vnd.devthink.run+json",
443
+ },
444
+ {
445
+ id: "language-nim",
446
+ label: "nim compiler",
447
+ family: "language",
448
+ isolation: "process",
449
+ state: "live",
450
+ drivers: ["nim"],
451
+ hardening: ["package-allowlist"],
452
+ boot: "hot",
453
+ bootms: 15,
454
+ gpu: false,
455
+ network: true,
456
+ mime: "application/vnd.devthink.run+json",
457
+ },
458
+ // the runtime extensions of the runner family: the heavyweight virtual
459
+ // machines and the edge runtimes the join resolves beside the v8 isolate
460
+ {
461
+ id: "runtime-jvm",
462
+ label: "jvm hotspot",
463
+ family: "runner",
464
+ isolation: "process",
465
+ state: "live",
466
+ drivers: ["jvm", "jlink"],
467
+ hardening: ["security-manager"],
468
+ boot: "warm",
469
+ bootms: 250,
470
+ gpu: false,
471
+ network: true,
472
+ mime: "application/vnd.devthink.run+json",
473
+ },
474
+ {
475
+ id: "runtime-clr",
476
+ label: "clr runtime",
477
+ family: "runner",
478
+ isolation: "process",
479
+ state: "live",
480
+ drivers: ["clr"],
481
+ hardening: ["assembly-allowlist"],
482
+ boot: "warm",
483
+ bootms: 200,
484
+ gpu: false,
485
+ network: true,
486
+ mime: "application/vnd.devthink.run+json",
487
+ },
488
+ {
489
+ id: "runtime-workerd",
490
+ label: "workerd runtime",
491
+ family: "runner",
492
+ isolation: "process",
493
+ state: "live",
494
+ drivers: ["workerd"],
495
+ hardening: ["no-fs", "cpu-quota"],
496
+ boot: "hot",
497
+ bootms: 10,
498
+ gpu: false,
499
+ network: true,
500
+ mime: "application/vnd.devthink.run+json",
501
+ },
502
+ {
503
+ id: "runner-wasi",
504
+ label: "wasi preview",
505
+ family: "wasm",
506
+ isolation: "process",
507
+ state: "live",
508
+ drivers: ["wasmtime"],
509
+ hardening: ["capability-imports"],
510
+ boot: "hot",
511
+ bootms: 15,
512
+ gpu: false,
513
+ network: false,
514
+ mime: "application/wasm",
515
+ },
516
+ // the container family: docker hardened, the profile pair and ghcr immutable
517
+ {
518
+ id: "container-docker",
519
+ label: "docker hardened",
520
+ family: "container",
521
+ isolation: "namespace",
522
+ state: "live",
523
+ drivers: ["docker"],
524
+ hardening: ["no-network", "dropped-caps", "read-only-root", "pid-limit"],
525
+ boot: "warm",
526
+ bootms: 400,
527
+ gpu: false,
528
+ network: false,
529
+ mime: "application/vnd.devthink.container+json",
530
+ },
531
+ {
532
+ id: "container-max",
533
+ label: "docker max profile",
534
+ family: "container",
535
+ isolation: "namespace",
536
+ state: "live",
537
+ drivers: ["docker"],
538
+ hardening: ["no-network", "dropped-caps", "read-only-root"],
539
+ boot: "warm",
540
+ bootms: 600,
541
+ gpu: false,
542
+ network: false,
543
+ mime: "application/vnd.devthink.container+json",
544
+ },
545
+ {
546
+ id: "container-lite",
547
+ label: "docker lite profile",
548
+ family: "container",
549
+ isolation: "namespace",
550
+ state: "live",
551
+ drivers: ["docker"],
552
+ hardening: ["no-network", "dropped-caps", "read-only-root", "pid-limit", "memory-cap"],
553
+ boot: "warm",
554
+ bootms: 300,
555
+ gpu: false,
556
+ network: false,
557
+ mime: "application/vnd.devthink.container+json",
558
+ },
559
+ {
560
+ id: "container-ghcr",
561
+ label: "ghcr immutable",
562
+ family: "container",
563
+ isolation: "namespace",
564
+ state: "live",
565
+ drivers: ["docker", "ghcr"],
566
+ hardening: ["immutable-root", "uuid-instance"],
567
+ boot: "warm",
568
+ bootms: 450,
569
+ gpu: false,
570
+ network: true,
571
+ mime: "application/vnd.devthink.container+json",
572
+ },
573
+ {
574
+ id: "container-runsc",
575
+ label: "gvisor sandboxed",
576
+ family: "container",
577
+ isolation: "namespace",
578
+ state: "host",
579
+ drivers: ["runsc"],
580
+ hardening: ["user-kernel"],
581
+ boot: "warm",
582
+ bootms: BOOTLADDER.warm,
583
+ gpu: false,
584
+ network: true,
585
+ mime: "application/vnd.devthink.container+json",
586
+ },
587
+ // the sandbox family: the os jails short of a container daemon (the
588
+ // isolation ladder the engine walks below the microvm)
589
+ {
590
+ id: "sandbox-bubblewrap",
591
+ label: "bubblewrap jail",
592
+ family: "sandbox",
593
+ isolation: "namespace",
594
+ state: "live",
595
+ drivers: ["bwrap"],
596
+ hardening: ["user-namespace"],
597
+ boot: "warm",
598
+ bootms: 40,
599
+ gpu: false,
600
+ network: false,
601
+ mime: "application/vnd.devthink.sandbox+json",
602
+ },
603
+ {
604
+ id: "sandbox-nsjail",
605
+ label: "nsjail cell",
606
+ family: "sandbox",
607
+ isolation: "namespace",
608
+ state: "live",
609
+ drivers: ["nsjail"],
610
+ hardening: ["cgroup-limit", "seccomp"],
611
+ boot: "warm",
612
+ bootms: 60,
613
+ gpu: false,
614
+ network: false,
615
+ mime: "application/vnd.devthink.sandbox+json",
616
+ },
617
+ {
618
+ id: "sandbox-chroot",
619
+ label: "chroot root",
620
+ family: "sandbox",
621
+ isolation: "process",
622
+ state: "live",
623
+ drivers: ["chroot"],
624
+ hardening: ["read-only-root"],
625
+ boot: "hot",
626
+ bootms: 10,
627
+ gpu: false,
628
+ network: false,
629
+ mime: "application/vnd.devthink.sandbox+json",
630
+ },
631
+ // the container extensions: the rootless and the oci runtimes the lane
632
+ // can drive beside the docker daemon
633
+ {
634
+ id: "container-podman",
635
+ label: "podman rootless",
636
+ family: "container",
637
+ isolation: "namespace",
638
+ state: "live",
639
+ drivers: ["podman"],
640
+ hardening: ["rootless", "no-network", "dropped-caps"],
641
+ boot: "warm",
642
+ bootms: 350,
643
+ gpu: false,
644
+ network: false,
645
+ mime: "application/vnd.devthink.container+json",
646
+ },
647
+ {
648
+ id: "container-containerd",
649
+ label: "containerd supervisor",
650
+ family: "container",
651
+ isolation: "namespace",
652
+ state: "live",
653
+ drivers: ["containerd"],
654
+ hardening: ["no-network", "dropped-caps"],
655
+ boot: "warm",
656
+ bootms: 300,
657
+ gpu: false,
658
+ network: false,
659
+ mime: "application/vnd.devthink.container+json",
660
+ },
661
+ {
662
+ id: "container-runc",
663
+ label: "runc process",
664
+ family: "container",
665
+ isolation: "namespace",
666
+ state: "live",
667
+ drivers: ["runc"],
668
+ hardening: ["no-network", "dropped-caps", "read-only-root"],
669
+ boot: "warm",
670
+ bootms: 100,
671
+ gpu: false,
672
+ network: false,
673
+ mime: "application/vnd.devthink.container+json",
674
+ },
675
+ {
676
+ id: "container-crun",
677
+ label: "crun process",
678
+ family: "container",
679
+ isolation: "namespace",
680
+ state: "live",
681
+ drivers: ["crun"],
682
+ hardening: ["no-network", "dropped-caps", "read-only-root"],
683
+ boot: "warm",
684
+ bootms: 90,
685
+ gpu: false,
686
+ network: false,
687
+ mime: "application/vnd.devthink.container+json",
688
+ },
689
+ // the microvm family: per workflow, the e2b form
690
+ {
691
+ id: "microvm-firecracker",
692
+ label: "firecracker microvm",
693
+ family: "microvm",
694
+ isolation: "vm",
695
+ state: "host",
696
+ drivers: ["firecracker", "virtualcpu"],
697
+ hardening: ["clean-rootfs", "injected-vcpu"],
698
+ boot: "warm",
699
+ bootms: 125,
700
+ gpu: false,
701
+ network: true,
702
+ mime: "application/vnd.devthink.microvm+json",
703
+ },
704
+ {
705
+ id: "microvm-gpuless",
706
+ label: "gpuless render",
707
+ family: "microvm",
708
+ isolation: "vm",
709
+ state: "live",
710
+ drivers: ["mesa-llvmpipe", "lavapipe", "rusticl", "xvfb"],
711
+ hardening: ["clean-rootfs"],
712
+ boot: "warm",
713
+ bootms: 500,
714
+ gpu: true,
715
+ network: true,
716
+ mime: "application/vnd.devthink.microvm+json",
717
+ },
718
+ // the pod family: one pod per session (the competitor recipe)
719
+ {
720
+ id: "pod-session",
721
+ label: "pod per session",
722
+ family: "pod",
723
+ isolation: "namespace",
724
+ state: "host",
725
+ drivers: ["k8s"],
726
+ hardening: ["quota-check"],
727
+ boot: "warm",
728
+ bootms: 800,
729
+ gpu: false,
730
+ network: true,
731
+ mime: "application/vnd.devthink.pod+json",
732
+ },
733
+ // the confidential family: attested compute
734
+ {
735
+ id: "confidential-sevsnp",
736
+ label: "sev snp",
737
+ family: "confidential",
738
+ isolation: "hardware",
739
+ state: "host",
740
+ drivers: ["sev-snp", "tpm"],
741
+ hardening: ["attestation"],
742
+ boot: "cold",
743
+ bootms: 1200,
744
+ gpu: false,
745
+ network: true,
746
+ mime: "application/vnd.devthink.confidential+json",
747
+ },
748
+ {
749
+ id: "confidential-tdx",
750
+ label: "tdx",
751
+ family: "confidential",
752
+ isolation: "hardware",
753
+ state: "host",
754
+ drivers: ["tdx", "tpm"],
755
+ hardening: ["attestation"],
756
+ boot: "cold",
757
+ bootms: 1200,
758
+ gpu: false,
759
+ network: true,
760
+ mime: "application/vnd.devthink.confidential+json",
761
+ },
762
+ // the emulator family: qemu full emulation
763
+ {
764
+ id: "emulator-qemu",
765
+ label: "qemu",
766
+ family: "emulator",
767
+ isolation: "vm",
768
+ state: "host",
769
+ drivers: ["qemu"],
770
+ hardening: ["tcg"],
771
+ boot: "cold",
772
+ bootms: 900,
773
+ gpu: false,
774
+ network: true,
775
+ mime: "application/vnd.devthink.emulator+json",
776
+ },
777
+ // the browser family: the sandbox-side browser (never the person's)
778
+ {
779
+ id: "browser-server",
780
+ label: "virtual browser",
781
+ family: "browser",
782
+ isolation: "namespace",
783
+ state: "host",
784
+ drivers: ["chromium-headless", "playwright"],
785
+ hardening: ["sandboxed-tabs"],
786
+ boot: "warm",
787
+ bootms: 300,
788
+ gpu: false,
789
+ network: true,
790
+ mime: "application/vnd.devthink.browser+json",
791
+ },
792
+ {
793
+ id: "browser-webcontainer",
794
+ label: "webcontainer server side",
795
+ family: "browser",
796
+ isolation: "namespace",
797
+ state: "live",
798
+ drivers: ["node", "wasm"],
799
+ hardening: ["opt-in"],
800
+ boot: "warm",
801
+ bootms: 350,
802
+ gpu: false,
803
+ network: true,
804
+ mime: "application/vnd.devthink.browser+json",
805
+ },
806
+ // the screen family extensions: the virtual displays the sandboxed ui
807
+ // renders through (never the visitor display)
808
+ {
809
+ id: "screen-xvfb",
810
+ label: "xvfb display",
811
+ family: "screen",
812
+ isolation: "process",
813
+ state: "live",
814
+ drivers: ["xvfb"],
815
+ hardening: ["headless-only"],
816
+ boot: "hot",
817
+ bootms: 20,
818
+ gpu: false,
819
+ network: false,
820
+ mime: "application/vnd.devthink.screen+json",
821
+ },
822
+ {
823
+ id: "screen-wayland",
824
+ label: "wayland compositor",
825
+ family: "screen",
826
+ isolation: "process",
827
+ state: "live",
828
+ drivers: ["wayland", "wlroots"],
829
+ hardening: ["headless-only"],
830
+ boot: "warm",
831
+ bootms: 150,
832
+ gpu: false,
833
+ network: false,
834
+ mime: "application/vnd.devthink.screen+json",
835
+ },
836
+ // the mobile family: the os images of the mobile lane
837
+ {
838
+ id: "mobile-capacitor",
839
+ label: "capacitor",
840
+ family: "mobile",
841
+ isolation: "namespace",
842
+ state: "host",
843
+ drivers: ["capacitor"],
844
+ hardening: ["emulated-device"],
845
+ boot: "warm",
846
+ bootms: 600,
847
+ gpu: false,
848
+ network: true,
849
+ mime: "application/vnd.devthink.mobile+json",
850
+ },
851
+ {
852
+ id: "mobile-termux",
853
+ label: "termux",
854
+ family: "mobile",
855
+ isolation: "namespace",
856
+ state: "live",
857
+ drivers: ["termux"],
858
+ hardening: ["emulated-device"],
859
+ boot: "warm",
860
+ bootms: 550,
861
+ gpu: false,
862
+ network: true,
863
+ mime: "application/vnd.devthink.mobile+json",
864
+ },
865
+ {
866
+ id: "mobile-postmarketos",
867
+ label: "postmarketos",
868
+ family: "mobile",
869
+ isolation: "vm",
870
+ state: "host",
871
+ drivers: ["qemu"],
872
+ hardening: ["emulated-device"],
873
+ boot: "cold",
874
+ bootms: 1000,
875
+ gpu: false,
876
+ network: true,
877
+ mime: "application/vnd.devthink.mobile+json",
878
+ },
879
+ // the fs and delivery families: the vfs, the git objects and the cdn lane
880
+ {
881
+ id: "fs-vfs",
882
+ label: "vfs",
883
+ family: "fs",
884
+ isolation: "process",
885
+ state: "live",
886
+ drivers: ["vfs"],
887
+ hardening: ["chunk-catalog"],
888
+ boot: "hot",
889
+ bootms: 5,
890
+ gpu: false,
891
+ network: false,
892
+ mime: "application/vnd.devthink.vfs+json",
893
+ },
894
+ {
895
+ id: "fs-gitobjects",
896
+ label: "git objects vfs",
897
+ family: "fs",
898
+ isolation: "process",
899
+ state: "live",
900
+ drivers: ["git", "vfs"],
901
+ hardening: ["content-hash", "chunk-catalog"],
902
+ boot: "hot",
903
+ bootms: 10,
904
+ gpu: false,
905
+ network: true,
906
+ mime: "application/vnd.devthink.vfs+json",
907
+ },
908
+ {
909
+ id: "delivery-cdn",
910
+ label: "cdn mirror",
911
+ family: "delivery",
912
+ isolation: "process",
913
+ state: "live",
914
+ drivers: ["vfs", "cdn"],
915
+ hardening: ["inside-sandbox-fetch"],
916
+ boot: "hot",
917
+ bootms: 5,
918
+ gpu: false,
919
+ network: true,
920
+ mime: "application/vnd.devthink.cdn+json",
921
+ },
922
+ // the delivery protocol extensions: the wire lanes the streamed answer
923
+ // rides (the socket surface the self-hosted engine speaks)
924
+ {
925
+ id: "delivery-wss",
926
+ label: "websocket streams",
927
+ family: "delivery",
928
+ isolation: "process",
929
+ state: "live",
930
+ drivers: ["wss"],
931
+ hardening: ["origin-pin"],
932
+ boot: "hot",
933
+ bootms: 5,
934
+ gpu: false,
935
+ network: true,
936
+ mime: "application/vnd.devthink.cdn+json",
937
+ },
938
+ {
939
+ id: "delivery-webtransport",
940
+ label: "webtransport lane",
941
+ family: "delivery",
942
+ isolation: "process",
943
+ state: "live",
944
+ drivers: ["webtransport", "http3"],
945
+ hardening: ["origin-pin"],
946
+ boot: "hot",
947
+ bootms: 8,
948
+ gpu: false,
949
+ network: true,
950
+ mime: "application/vnd.devthink.cdn+json",
951
+ },
952
+ {
953
+ id: "delivery-grpc",
954
+ label: "grpc lane",
955
+ family: "delivery",
956
+ isolation: "process",
957
+ state: "live",
958
+ drivers: ["grpc"],
959
+ hardening: ["auth-token"],
960
+ boot: "hot",
961
+ bootms: 8,
962
+ gpu: false,
963
+ network: true,
964
+ mime: "application/vnd.devthink.cdn+json",
965
+ },
966
+ {
967
+ id: "delivery-capnproto",
968
+ label: "capnproto lane",
969
+ family: "delivery",
970
+ isolation: "process",
971
+ state: "live",
972
+ drivers: ["capnproto"],
973
+ hardening: ["auth-token"],
974
+ boot: "hot",
975
+ bootms: 6,
976
+ gpu: false,
977
+ network: true,
978
+ mime: "application/vnd.devthink.cdn+json",
979
+ },
980
+ // the storage family: the self-hosted vault backends (the competitor
981
+ // recipe of the hosted buckets — sqlite and the wire protocols and the
982
+ // s3-compatible daemons, every one a lane may mount behind the vault)
983
+ {
984
+ id: "storage-sqlite",
985
+ label: "sqlite vault",
986
+ family: "storage",
987
+ isolation: "process",
988
+ state: "live",
989
+ drivers: ["sqlite"],
990
+ hardening: ["file-quota"],
991
+ boot: "hot",
992
+ bootms: 8,
993
+ gpu: false,
994
+ network: false,
995
+ mime: "application/vnd.devthink.storage+json",
996
+ },
997
+ {
998
+ id: "storage-libsql",
999
+ label: "libsql vault",
1000
+ family: "storage",
1001
+ isolation: "process",
1002
+ state: "live",
1003
+ drivers: ["libsql"],
1004
+ hardening: ["file-quota"],
1005
+ boot: "hot",
1006
+ bootms: 10,
1007
+ gpu: false,
1008
+ network: true,
1009
+ mime: "application/vnd.devthink.storage+json",
1010
+ },
1011
+ {
1012
+ id: "storage-mysql",
1013
+ label: "mysql wire vault",
1014
+ family: "storage",
1015
+ isolation: "process",
1016
+ state: "live",
1017
+ drivers: ["mysql-wire"],
1018
+ hardening: ["auth-token", "row-quota"],
1019
+ boot: "warm",
1020
+ bootms: 200,
1021
+ gpu: false,
1022
+ network: true,
1023
+ mime: "application/vnd.devthink.storage+json",
1024
+ },
1025
+ {
1026
+ id: "storage-postgres",
1027
+ label: "postgres wire vault",
1028
+ family: "storage",
1029
+ isolation: "process",
1030
+ state: "live",
1031
+ drivers: ["postgres-wire"],
1032
+ hardening: ["auth-token", "row-quota"],
1033
+ boot: "warm",
1034
+ bootms: 200,
1035
+ gpu: false,
1036
+ network: true,
1037
+ mime: "application/vnd.devthink.storage+json",
1038
+ },
1039
+ {
1040
+ id: "storage-s3",
1041
+ label: "s3 compatible vault",
1042
+ family: "storage",
1043
+ isolation: "process",
1044
+ state: "live",
1045
+ drivers: ["s3-api"],
1046
+ hardening: ["bucket-quota"],
1047
+ boot: "warm",
1048
+ bootms: 100,
1049
+ gpu: false,
1050
+ network: true,
1051
+ mime: "application/vnd.devthink.storage+json",
1052
+ },
1053
+ {
1054
+ id: "storage-minio",
1055
+ label: "minio vault",
1056
+ family: "storage",
1057
+ isolation: "process",
1058
+ state: "live",
1059
+ drivers: ["minio"],
1060
+ hardening: ["bucket-quota"],
1061
+ boot: "warm",
1062
+ bootms: 300,
1063
+ gpu: false,
1064
+ network: true,
1065
+ mime: "application/vnd.devthink.storage+json",
1066
+ },
1067
+ {
1068
+ id: "storage-garage",
1069
+ label: "garage vault",
1070
+ family: "storage",
1071
+ isolation: "process",
1072
+ state: "live",
1073
+ drivers: ["garage"],
1074
+ hardening: ["bucket-quota"],
1075
+ boot: "warm",
1076
+ bootms: 300,
1077
+ gpu: false,
1078
+ network: true,
1079
+ mime: "application/vnd.devthink.storage+json",
1080
+ },
1081
+ // the network family: the resolution and the private tunnels the engine
1082
+ // opens for the sandbox (the hardened default stays off until a lane
1083
+ // asks)
1084
+ {
1085
+ id: "network-dns",
1086
+ label: "dns resolver",
1087
+ family: "network",
1088
+ isolation: "process",
1089
+ state: "live",
1090
+ drivers: ["dns"],
1091
+ hardening: ["resolver-allowlist"],
1092
+ boot: "hot",
1093
+ bootms: 5,
1094
+ gpu: false,
1095
+ network: true,
1096
+ mime: "application/vnd.devthink.net+json",
1097
+ },
1098
+ {
1099
+ id: "network-doh",
1100
+ label: "dns over https",
1101
+ family: "network",
1102
+ isolation: "process",
1103
+ state: "live",
1104
+ drivers: ["doh"],
1105
+ hardening: ["resolver-allowlist"],
1106
+ boot: "hot",
1107
+ bootms: 8,
1108
+ gpu: false,
1109
+ network: true,
1110
+ mime: "application/vnd.devthink.net+json",
1111
+ },
1112
+ {
1113
+ id: "network-tor",
1114
+ label: "tor onion lane",
1115
+ family: "network",
1116
+ isolation: "process",
1117
+ state: "live",
1118
+ drivers: ["tor"],
1119
+ hardening: ["circuit-limit"],
1120
+ boot: "warm",
1121
+ bootms: 800,
1122
+ gpu: false,
1123
+ network: true,
1124
+ mime: "application/vnd.devthink.net+json",
1125
+ },
1126
+ {
1127
+ id: "network-i2p",
1128
+ label: "i2p tunnel",
1129
+ family: "network",
1130
+ isolation: "process",
1131
+ state: "live",
1132
+ drivers: ["i2p"],
1133
+ hardening: ["tunnel-limit"],
1134
+ boot: "warm",
1135
+ bootms: 700,
1136
+ gpu: false,
1137
+ network: true,
1138
+ mime: "application/vnd.devthink.net+json",
1139
+ },
1140
+ {
1141
+ id: "network-wireguard",
1142
+ label: "wireguard tunnel",
1143
+ family: "network",
1144
+ isolation: "process",
1145
+ state: "live",
1146
+ drivers: ["wireguard"],
1147
+ hardening: ["peer-allowlist"],
1148
+ boot: "warm",
1149
+ bootms: 100,
1150
+ gpu: false,
1151
+ network: true,
1152
+ mime: "application/vnd.devthink.net+json",
1153
+ },
1154
+ // the ram family: the storage-to-ram bridge, the kernel recipes that swap,
1155
+ // map and overlay the same bytes between use flags (the memory ladder the
1156
+ // corpus records: the tmpfs at the microsecond, the memory map at five,
1157
+ // the compressed ram at five hundred)
1158
+ {
1159
+ id: "ram-tmpfs",
1160
+ label: "tmpfs",
1161
+ family: "ram",
1162
+ isolation: "process",
1163
+ state: "live",
1164
+ drivers: ["tmpfs"],
1165
+ hardening: ["oom-guard"],
1166
+ boot: "hot",
1167
+ bootms: 5,
1168
+ gpu: false,
1169
+ network: false,
1170
+ mime: "application/vnd.devthink.ram+json",
1171
+ },
1172
+ {
1173
+ id: "ram-mmap",
1174
+ label: "zero copy map",
1175
+ family: "ram",
1176
+ isolation: "process",
1177
+ state: "live",
1178
+ drivers: ["mmap"],
1179
+ hardening: ["oom-guard"],
1180
+ boot: "hot",
1181
+ bootms: 5,
1182
+ gpu: false,
1183
+ network: false,
1184
+ mime: "application/vnd.devthink.ram+json",
1185
+ },
1186
+ {
1187
+ id: "ram-overlayfs",
1188
+ label: "overlayfs",
1189
+ family: "ram",
1190
+ isolation: "process",
1191
+ state: "live",
1192
+ drivers: ["overlayfs"],
1193
+ hardening: ["oom-guard"],
1194
+ boot: "hot",
1195
+ bootms: 10,
1196
+ gpu: false,
1197
+ network: false,
1198
+ mime: "application/vnd.devthink.ram+json",
1199
+ },
1200
+ {
1201
+ id: "ram-loopram",
1202
+ label: "loop ram disk",
1203
+ family: "ram",
1204
+ isolation: "process",
1205
+ state: "live",
1206
+ drivers: ["loop", "tmpfs"],
1207
+ hardening: ["oom-guard"],
1208
+ boot: "hot",
1209
+ bootms: 15,
1210
+ gpu: false,
1211
+ network: false,
1212
+ mime: "application/vnd.devthink.ram+json",
1213
+ },
1214
+ {
1215
+ id: "ram-gitram",
1216
+ label: "git in ram",
1217
+ family: "ram",
1218
+ isolation: "process",
1219
+ state: "live",
1220
+ drivers: ["git", "mmap"],
1221
+ hardening: ["oom-guard"],
1222
+ boot: "hot",
1223
+ bootms: 20,
1224
+ gpu: false,
1225
+ network: false,
1226
+ mime: "application/vnd.devthink.ram+json",
1227
+ },
1228
+ {
1229
+ id: "ram-zram",
1230
+ label: "zram zstd",
1231
+ family: "ram",
1232
+ isolation: "process",
1233
+ state: "live",
1234
+ drivers: ["zram", "zstd"],
1235
+ hardening: ["oom-guard"],
1236
+ boot: "hot",
1237
+ bootms: 25,
1238
+ gpu: false,
1239
+ network: false,
1240
+ mime: "application/vnd.devthink.ram+json",
1241
+ },
1242
+ {
1243
+ id: "ram-zswap",
1244
+ label: "zswap",
1245
+ family: "ram",
1246
+ isolation: "process",
1247
+ state: "live",
1248
+ drivers: ["zswap"],
1249
+ hardening: ["oom-guard"],
1250
+ boot: "hot",
1251
+ bootms: 25,
1252
+ gpu: false,
1253
+ network: false,
1254
+ mime: "application/vnd.devthink.ram+json",
1255
+ },
1256
+ {
1257
+ id: "ram-swapfile",
1258
+ label: "swapfile",
1259
+ family: "ram",
1260
+ isolation: "process",
1261
+ state: "live",
1262
+ drivers: ["swapfile"],
1263
+ hardening: ["oom-guard"],
1264
+ boot: "hot",
1265
+ bootms: 25,
1266
+ gpu: false,
1267
+ network: false,
1268
+ mime: "application/vnd.devthink.ram+json",
1269
+ },
1270
+ // the build family: the build graphs the engine runs inside the sandbox
1271
+ // (the artifact lane the repositories compile through)
1272
+ {
1273
+ id: "build-make",
1274
+ label: "make builds",
1275
+ family: "build",
1276
+ isolation: "process",
1277
+ state: "live",
1278
+ drivers: ["make"],
1279
+ hardening: ["recipe-allowlist"],
1280
+ boot: "hot",
1281
+ bootms: 10,
1282
+ gpu: false,
1283
+ network: false,
1284
+ mime: "application/vnd.devthink.build+json",
1285
+ },
1286
+ {
1287
+ id: "build-bazel",
1288
+ label: "bazel builds",
1289
+ family: "build",
1290
+ isolation: "process",
1291
+ state: "live",
1292
+ drivers: ["bazel"],
1293
+ hardening: ["remote-cache-pin"],
1294
+ boot: "warm",
1295
+ bootms: 500,
1296
+ gpu: false,
1297
+ network: true,
1298
+ mime: "application/vnd.devthink.build+json",
1299
+ },
1300
+ {
1301
+ id: "build-buck",
1302
+ label: "buck builds",
1303
+ family: "build",
1304
+ isolation: "process",
1305
+ state: "live",
1306
+ drivers: ["buck"],
1307
+ hardening: ["remote-cache-pin"],
1308
+ boot: "warm",
1309
+ bootms: 400,
1310
+ gpu: false,
1311
+ network: true,
1312
+ mime: "application/vnd.devthink.build+json",
1313
+ },
1314
+ {
1315
+ id: "build-ninja",
1316
+ label: "ninja builds",
1317
+ family: "build",
1318
+ isolation: "process",
1319
+ state: "live",
1320
+ drivers: ["ninja"],
1321
+ hardening: ["recipe-allowlist"],
1322
+ boot: "hot",
1323
+ bootms: 15,
1324
+ gpu: false,
1325
+ network: false,
1326
+ mime: "application/vnd.devthink.build+json",
1327
+ },
1328
+ {
1329
+ id: "build-turborepo",
1330
+ label: "turborepo builds",
1331
+ family: "build",
1332
+ isolation: "process",
1333
+ state: "live",
1334
+ drivers: ["turbo"],
1335
+ hardening: ["remote-cache-pin"],
1336
+ boot: "warm",
1337
+ bootms: 300,
1338
+ gpu: false,
1339
+ network: true,
1340
+ mime: "application/vnd.devthink.build+json",
1341
+ },
1342
+ // the ci family: the self-hosted runners the engine drives for the
1343
+ // repository pipelines (no hosted ci dependency — the runner rides the
1344
+ // same self-hosted law)
1345
+ {
1346
+ id: "ci-actions",
1347
+ label: "actions runner",
1348
+ family: "ci",
1349
+ isolation: "process",
1350
+ state: "live",
1351
+ drivers: ["actions-runner"],
1352
+ hardening: ["workflow-allowlist"],
1353
+ boot: "warm",
1354
+ bootms: 400,
1355
+ gpu: false,
1356
+ network: true,
1357
+ mime: "application/vnd.devthink.ci+json",
1358
+ },
1359
+ {
1360
+ id: "ci-gitlab",
1361
+ label: "gitlab runner",
1362
+ family: "ci",
1363
+ isolation: "process",
1364
+ state: "live",
1365
+ drivers: ["gitlab-runner"],
1366
+ hardening: ["workflow-allowlist"],
1367
+ boot: "warm",
1368
+ bootms: 400,
1369
+ gpu: false,
1370
+ network: true,
1371
+ mime: "application/vnd.devthink.ci+json",
1372
+ },
1373
+ // the gpu family: the virtual graphics the machine may present (the
1374
+ // declared slice — the record never claims a host gpu it does not mount)
1375
+ {
1376
+ id: "gpu-virgl",
1377
+ label: "virgl render",
1378
+ family: "gpu",
1379
+ isolation: "vm",
1380
+ state: "live",
1381
+ drivers: ["virgl", "virtio-gpu"],
1382
+ hardening: ["context-quota"],
1383
+ boot: "warm",
1384
+ bootms: 400,
1385
+ gpu: true,
1386
+ network: true,
1387
+ mime: "application/vnd.devthink.gpu+json",
1388
+ },
1389
+ // the local family: the explicit opt-in (the only lane that may touch the
1390
+ // visitor machine, and only under declared consent)
1391
+ {
1392
+ id: "local-optin",
1393
+ label: "local opt in",
1394
+ family: "local",
1395
+ isolation: "process",
1396
+ state: "live",
1397
+ drivers: [],
1398
+ hardening: ["explicit-consent"],
1399
+ boot: "hot",
1400
+ bootms: 10,
1401
+ gpu: false,
1402
+ network: false,
1403
+ mime: "application/vnd.devthink.local+json",
1404
+ },
1405
+ ]);
1406
+
1407
+ /** The honest plan report: what the catalog holds against the ninety
1408
+ * plan —
1409
+ * the counts per state and whether the plan is answered. The report is the
1410
+ * truth surface the lanes and the tests read; it never counts a record as
1411
+ * more than its state declares. */
1412
+ export interface ModalityPlanReport {
1413
+ /** The plan line the owner charged (the ninety modalities). */
1414
+ plancount: number;
1415
+ /** The records the catalog holds. */
1416
+ catalogcount: number;
1417
+ /** The records the platform lanes drive today. */
1418
+ live: number;
1419
+ /** The records whose host runtime the lane probes. */
1420
+ host: number;
1421
+ /** The declared promises no lane wires yet. */
1422
+ planned: number;
1423
+ /** Whether the catalog answers the plan count. */
1424
+ plananswered: boolean;
1425
+ }
1426
+
1427
+ /** planreport — the honest census of the registry against the ninety plan:
1428
+ * the counts per state and the plan verdict, computed from the records
1429
+ * (never hardcoded, so the report cannot drift from the catalog). */
1430
+ export function planreport(): ModalityPlanReport {
1431
+ const counts: Record<ModalityState, number> = { live: 0, host: 0, planned: 0 };
1432
+ for (const modality of MODALITIES) counts[modality.state] += 1;
1433
+ return {
1434
+ plancount: MODALITYPLANCOUNT,
1435
+ catalogcount: MODALITIES.length,
1436
+ live: counts.live,
1437
+ host: counts.host,
1438
+ planned: counts.planned,
1439
+ plananswered: MODALITIES.length >= MODALITYPLANCOUNT,
1440
+ };
1441
+ }
1442
+
1443
+ /** The base profiles the owner names (the config wave makes them editable). */
1444
+ export type BaseProfile = "max" | "balanced" | "lite";
1445
+
1446
+ /** The join request: what the workload asks, never a modality name. */
1447
+ export interface JoinRequest {
1448
+ /** The base profile the sandbox boots under. */
1449
+ base: BaseProfile;
1450
+ /** Whether the workload needs a gpu path through the virtual drivers. */
1451
+ gpu: boolean;
1452
+ /** Whether the workload needs a network path. */
1453
+ network: boolean;
1454
+ /** The isolation depth the workload demands at minimum. */
1455
+ isolation?: ModalityRecord["isolation"];
1456
+ /** The boot budget the workload tolerates, in milliseconds. */
1457
+ bootbudget?: number;
1458
+ /** The family the workload prefers (the first filter when given). */
1459
+ family?: ModalityFamily;
1460
+ }
1461
+
1462
+ /**
1463
+ * Resolves the modality join for a request: the records that satisfy every
1464
+ * demand, ordered by boot cost then isolation depth — the platform answers
1465
+ * the join, the person never names a modality (the nuclear law).
1466
+ *
1467
+ * @param request the workload demands.
1468
+ * @returns the modality records that satisfy the join, best candidate first.
1469
+ */
1470
+ export function resolvejoin(request: JoinRequest): readonly ModalityRecord[] {
1471
+ const budget = request.bootbudget ?? BOOTLADDER.cold;
1472
+ const order: Record<ModalityRecord["isolation"], number> = { process: 0, namespace: 1, vm: 2, hardware: 3 };
1473
+ return MODALITIES.filter((modality) => {
1474
+ if (request.family && modality.family !== request.family) return false;
1475
+ if (request.gpu && !modality.gpu) return false;
1476
+ if (request.network && !modality.network) return false;
1477
+ if (request.isolation && order[modality.isolation] < order[request.isolation]) return false;
1478
+ if (modality.bootms > budget) return false;
1479
+ // the lite base keeps the heavy machine images out of the answer
1480
+ if (request.base === "lite" && modality.isolation === "hardware") return false;
1481
+ return true;
1482
+ }).sort((a, b) => a.bootms - b.bootms || order[a.isolation] - order[b.isolation]);
1483
+ }
1484
+
1485
+ /**
1486
+ * Answers one modality by id (the config rows and the api carry ids).
1487
+ *
1488
+ * @param id the modality id.
1489
+ * @returns the record, or undefined when the id is unknown.
1490
+ */
1491
+ export function getmodality(id: string): ModalityRecord | undefined {
1492
+ return MODALITIES.find((modality) => modality.id === id);
1493
+ }