@wenathlan/saddle 2.0.162 → 2.0.164

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