@machinen/runtime 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/API.md CHANGED
@@ -1,11 +1,171 @@
1
1
  # @machinen/runtime
2
2
 
3
+ ## Contents
4
+
5
+ ### Boot a VM
6
+
7
+ - [`boot`](#boot)
8
+ - [`BootOptions`](#bootoptions)
9
+ - [`attach`](#attach)
10
+ - [`AttachOptions`](#attachoptions)
11
+ - [`bootPty`](#bootpty)
12
+ - [`PtyBootOptions`](#ptybootoptions)
13
+ - [`PtyVmHandle`](#ptyvmhandle)
14
+ - [`VmHandle`](#vmhandle)
15
+ - [`ImageConfig`](#imageconfig)
16
+ - [`autoSizeMemoryMib`](#autosizememorymib)
17
+ - [`resolveVmmBinary`](#resolvevmmbinary)
18
+ - [`warmImageConfigCache`](#warmimageconfigcache)
19
+ - [`measureFirstByte`](#measurefirstbyte)
20
+
21
+ ### Run code in a VM
22
+
23
+ - [`VsockExec`](#vsockexec)
24
+ - [`VsockExecOptions`](#vsockexecoptions)
25
+ - [`VsockExecResult`](#vsockexecresult)
26
+ - [`VsockExecPtyHandle`](#vsockexecptyhandle)
27
+ - [`VsockExecPtyOptions`](#vsockexecptyoptions)
28
+ - [`VsockExecPtyResult`](#vsockexecptyresult)
29
+
30
+ ### Snapshot, restore, fork
31
+
32
+ - [`restore`](#restore)
33
+ - [`RestoreOptions`](#restoreoptions)
34
+ - [`ForkOptions`](#forkoptions)
35
+ - [`SnapshotOptions`](#snapshotoptions)
36
+ - [`SnapshotResult`](#snapshotresult)
37
+ - [`SnapshotMeta`](#snapshotmeta)
38
+ - [`bootSnapshotPath`](#bootsnapshotpath)
39
+ - [`writeBootSnapshot`](#writebootsnapshot)
40
+ - [`detachedLogRoot`](#detachedlogroot)
41
+
42
+ ### Provision base images
43
+
44
+ - [`provision`](#provision)
45
+ - [`ProvisionOptions`](#provisionoptions)
46
+ - [`ProvisionResult`](#provisionresult)
47
+ - [`resolveBaseDtb`](#resolvebasedtb)
48
+ - [`resolveBaseKernel`](#resolvebasekernel)
49
+ - [`resolveBaseRootfs`](#resolvebaserootfs)
50
+ - [`ensureRootfsImage`](#ensurerootfsimage)
51
+ - [`EnsureRootfsImageOptions`](#ensurerootfsimageoptions)
52
+ - [`markRootfsImageClean`](#markrootfsimageclean)
53
+ - [`rootfsImgCacheDir`](#rootfsimgcachedir)
54
+ - [`resolveMke2fs`](#resolvemke2fs)
55
+
56
+ ### Mount files
57
+
58
+ - [`VsockFiles`](#vsockfiles)
59
+ - [`VsockFilesOptions`](#vsockfilesoptions)
60
+ - [`WriteFileOptions`](#writefileoptions)
61
+ - [`buildWriteFileCmd`](#buildwritefilecmd)
62
+ - [`buildWriteFileCmds`](#buildwritefilecmds)
63
+ - [`ensureMountDiskImage`](#ensuremountdiskimage)
64
+ - [`ensureMountDiskUpper`](#ensuremountdiskupper)
65
+ - [`markMountDiskImageClean`](#markmountdiskimageclean)
66
+ - [`mountdiskImgCacheDir`](#mountdiskimgcachedir)
67
+ - [`resolveMksquashfs`](#resolvemksquashfs)
68
+ - [`EnsureMountDiskImageOptions`](#ensuremountdiskimageoptions)
69
+ - [`EnsureMountDiskImageResult`](#ensuremountdiskimageresult)
70
+ - [`EnsureMountDiskUpperOptions`](#ensuremountdiskupperoptions)
71
+ - [`EnsureMountDiskUpperResult`](#ensuremountdiskupperresult)
72
+
73
+ ### Share secrets
74
+
75
+ - [`VsockSecrets`](#vsocksecrets)
76
+ - [`VsockSecretsOptions`](#vsocksecretsoptions)
77
+
78
+ ### Terminal control
79
+
80
+ - [`VsockWinsize`](#vsockwinsize)
81
+ - [`VsockWinsizeOptions`](#vsockwinsizeoptions)
82
+
83
+ ### Manage running VMs
84
+
85
+ - [`list`](#list)
86
+ - [`registryRoot`](#registryroot)
87
+ - [`RegistryEntry`](#registryentry)
88
+ - [`runGc`](#rungc)
89
+ - [`GcResult`](#gcresult)
90
+ - [`RunGcOptions`](#rungcoptions)
91
+ - [`validatePid`](#validatepid)
92
+ - [`PidStatus`](#pidstatus)
93
+
94
+ ### Multiplex sandboxes
95
+
96
+ - [`Sandboxes`](#sandboxes)
97
+ - [`Supervisor`](#supervisor)
98
+ - [`SandboxEntry`](#sandboxentry)
99
+ - [`OnOutputListener`](#onoutputlistener)
100
+ - [`SupervisorOptions`](#supervisoroptions)
101
+
102
+ ### Memory introspection
103
+
104
+ - [`MemoryStats`](#memorystats)
105
+ - [`checkForkBackpressure`](#checkforkbackpressure)
106
+ - [`CheckForkBackpressureOptions`](#checkforkbackpressureoptions)
107
+ - [`DEFAULT_FREE_MEMORY_THRESHOLD`](#default_free_memory_threshold)
108
+ - [`readHostFreeBytes`](#readhostfreebytes)
109
+ - [`readHostTotalBytes`](#readhosttotalbytes)
110
+ - [`readHostRssBytes`](#readhostrssbytes)
111
+ - [`readHostRssBytesMulti`](#readhostrssbytesmulti)
112
+ - [`RssTarget`](#rsstarget)
113
+ - [`readBalloonStats`](#readballoonstats)
114
+ - [`BalloonCounters`](#ballooncounters)
115
+ - [`STATS_FILE_SIZE`](#stats_file_size)
116
+
117
+ ### Logging
118
+
119
+ - [`ChunkLogEvent`](#chunklogevent)
120
+ - [`LogEvent`](#logevent)
121
+ - [`OnLog`](#onlog)
122
+ - [`PhaseLogEvent`](#phaselogevent)
123
+
124
+ ### Initramfs (advanced)
125
+
126
+ - [`mkinitramfsBundle`](#mkinitramfsbundle)
127
+ - [`mkinitramfsTinyBundle`](#mkinitramfstinybundle)
128
+ - [`mkinitramfsRootfs`](#mkinitramfsrootfs)
129
+ - [`mkinitramfsWorkspace`](#mkinitramfsworkspace)
130
+ - [`mkinitramfsMinimal`](#mkinitramfsminimal)
131
+ - [`mkinitramfsCli`](#mkinitramfscli)
132
+ - [`PackBundleOptions`](#packbundleoptions)
133
+ - [`PackTinyBundleOptions`](#packtinybundleoptions)
134
+ - [`PackRootfsOptions`](#packrootfsoptions)
135
+ - [`PackMinimalOptions`](#packminimaloptions)
136
+ - [`PackWorkspaceOptions`](#packworkspaceoptions)
137
+
138
+ ### Errors
139
+
140
+ - [`MachinenError`](#machinenerror)
141
+ - [`BootError`](#booterror)
142
+ - [`ExecError`](#execerror)
143
+ - [`SnapshotError`](#snapshoterror)
144
+ - [`ProvisionError`](#provisionerror)
145
+ - [`RegistryError`](#registryerror)
146
+ - [`FilesError`](#fileserror)
147
+ - [`MountError`](#mounterror)
148
+ - [`SecretsError`](#secretserror)
149
+ - [`WinsizeError`](#winsizeerror)
150
+ - [`SandboxError`](#sandboxerror)
151
+ - [`CacheError`](#cacheerror)
152
+ - [`GvproxyError`](#gvproxyerror)
153
+ - [`MkinitramfsError`](#mkinitramfserror)
154
+ - [`ParseError`](#parseerror)
155
+ - [`ErrorCode`](#errorcode)
156
+ - [`MachinenErrorOptions`](#machinenerroroptions)
157
+ - [`isMachinenError`](#ismachinenerror)
158
+ - [`formatMachinenError`](#formatmachinenerror)
159
+
160
+ ### Internal
161
+
162
+ - [`_internal`](#_internal)
163
+
164
+
3
165
  ## Classes
4
166
 
5
167
  ### MachinenError
6
168
 
7
- Defined in: [errors.ts:145](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L145)
8
-
9
169
  Base class for every error raised by @machinen/runtime and
10
170
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
11
171
  underlying cause via the standard `Error.cause` mechanism.
@@ -37,8 +197,6 @@ underlying cause via the standard `Error.cause` mechanism.
37
197
 
38
198
  > **new MachinenError**(`code`, `message`, `opts?`): [`MachinenError`](#machinenerror)
39
199
 
40
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
41
-
42
200
  ###### Parameters
43
201
 
44
202
  ###### code
@@ -67,20 +225,14 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
67
225
 
68
226
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
69
227
 
70
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
71
-
72
228
  ##### retryable
73
229
 
74
230
  > `readonly` **retryable**: `boolean`
75
231
 
76
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
77
-
78
232
  ***
79
233
 
80
234
  ### BootError
81
235
 
82
- Defined in: [errors.ts:158](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L158)
83
-
84
236
  Base class for every error raised by @machinen/runtime and
85
237
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
86
238
  underlying cause via the standard `Error.cause` mechanism.
@@ -95,8 +247,6 @@ underlying cause via the standard `Error.cause` mechanism.
95
247
 
96
248
  > **new BootError**(`code`, `message`, `opts?`): [`BootError`](#booterror)
97
249
 
98
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
99
-
100
250
  ###### Parameters
101
251
 
102
252
  ###### code
@@ -125,8 +275,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
125
275
 
126
276
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
127
277
 
128
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
129
-
130
278
  ###### Inherited from
131
279
 
132
280
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -135,8 +283,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
135
283
 
136
284
  > `readonly` **retryable**: `boolean`
137
285
 
138
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
139
-
140
286
  ###### Inherited from
141
287
 
142
288
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -145,8 +291,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
145
291
 
146
292
  ### ExecError
147
293
 
148
- Defined in: [errors.ts:159](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L159)
149
-
150
294
  Base class for every error raised by @machinen/runtime and
151
295
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
152
296
  underlying cause via the standard `Error.cause` mechanism.
@@ -161,8 +305,6 @@ underlying cause via the standard `Error.cause` mechanism.
161
305
 
162
306
  > **new ExecError**(`code`, `message`, `opts?`): [`ExecError`](#execerror)
163
307
 
164
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
165
-
166
308
  ###### Parameters
167
309
 
168
310
  ###### code
@@ -191,8 +333,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
191
333
 
192
334
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
193
335
 
194
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
195
-
196
336
  ###### Inherited from
197
337
 
198
338
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -201,8 +341,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
201
341
 
202
342
  > `readonly` **retryable**: `boolean`
203
343
 
204
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
205
-
206
344
  ###### Inherited from
207
345
 
208
346
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -211,8 +349,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
211
349
 
212
350
  ### SnapshotError
213
351
 
214
- Defined in: [errors.ts:160](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L160)
215
-
216
352
  Base class for every error raised by @machinen/runtime and
217
353
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
218
354
  underlying cause via the standard `Error.cause` mechanism.
@@ -227,8 +363,6 @@ underlying cause via the standard `Error.cause` mechanism.
227
363
 
228
364
  > **new SnapshotError**(`code`, `message`, `opts?`): [`SnapshotError`](#snapshoterror)
229
365
 
230
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
231
-
232
366
  ###### Parameters
233
367
 
234
368
  ###### code
@@ -257,8 +391,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
257
391
 
258
392
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
259
393
 
260
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
261
-
262
394
  ###### Inherited from
263
395
 
264
396
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -267,8 +399,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
267
399
 
268
400
  > `readonly` **retryable**: `boolean`
269
401
 
270
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
271
-
272
402
  ###### Inherited from
273
403
 
274
404
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -277,8 +407,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
277
407
 
278
408
  ### ProvisionError
279
409
 
280
- Defined in: [errors.ts:161](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L161)
281
-
282
410
  Base class for every error raised by @machinen/runtime and
283
411
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
284
412
  underlying cause via the standard `Error.cause` mechanism.
@@ -293,8 +421,6 @@ underlying cause via the standard `Error.cause` mechanism.
293
421
 
294
422
  > **new ProvisionError**(`code`, `message`, `opts?`): [`ProvisionError`](#provisionerror)
295
423
 
296
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
297
-
298
424
  ###### Parameters
299
425
 
300
426
  ###### code
@@ -323,8 +449,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
323
449
 
324
450
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
325
451
 
326
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
327
-
328
452
  ###### Inherited from
329
453
 
330
454
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -333,8 +457,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
333
457
 
334
458
  > `readonly` **retryable**: `boolean`
335
459
 
336
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
337
-
338
460
  ###### Inherited from
339
461
 
340
462
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -343,8 +465,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
343
465
 
344
466
  ### RegistryError
345
467
 
346
- Defined in: [errors.ts:162](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L162)
347
-
348
468
  Base class for every error raised by @machinen/runtime and
349
469
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
350
470
  underlying cause via the standard `Error.cause` mechanism.
@@ -359,8 +479,6 @@ underlying cause via the standard `Error.cause` mechanism.
359
479
 
360
480
  > **new RegistryError**(`code`, `message`, `opts?`): [`RegistryError`](#registryerror)
361
481
 
362
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
363
-
364
482
  ###### Parameters
365
483
 
366
484
  ###### code
@@ -389,8 +507,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
389
507
 
390
508
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
391
509
 
392
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
393
-
394
510
  ###### Inherited from
395
511
 
396
512
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -399,8 +515,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
399
515
 
400
516
  > `readonly` **retryable**: `boolean`
401
517
 
402
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
403
-
404
518
  ###### Inherited from
405
519
 
406
520
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -409,8 +523,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
409
523
 
410
524
  ### FilesError
411
525
 
412
- Defined in: [errors.ts:163](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L163)
413
-
414
526
  Base class for every error raised by @machinen/runtime and
415
527
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
416
528
  underlying cause via the standard `Error.cause` mechanism.
@@ -425,8 +537,6 @@ underlying cause via the standard `Error.cause` mechanism.
425
537
 
426
538
  > **new FilesError**(`code`, `message`, `opts?`): [`FilesError`](#fileserror)
427
539
 
428
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
429
-
430
540
  ###### Parameters
431
541
 
432
542
  ###### code
@@ -455,8 +565,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
455
565
 
456
566
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
457
567
 
458
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
459
-
460
568
  ###### Inherited from
461
569
 
462
570
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -465,8 +573,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
465
573
 
466
574
  > `readonly` **retryable**: `boolean`
467
575
 
468
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
469
-
470
576
  ###### Inherited from
471
577
 
472
578
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -475,8 +581,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
475
581
 
476
582
  ### MountError
477
583
 
478
- Defined in: [errors.ts:164](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L164)
479
-
480
584
  Base class for every error raised by @machinen/runtime and
481
585
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
482
586
  underlying cause via the standard `Error.cause` mechanism.
@@ -491,8 +595,6 @@ underlying cause via the standard `Error.cause` mechanism.
491
595
 
492
596
  > **new MountError**(`code`, `message`, `opts?`): [`MountError`](#mounterror)
493
597
 
494
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
495
-
496
598
  ###### Parameters
497
599
 
498
600
  ###### code
@@ -521,8 +623,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
521
623
 
522
624
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
523
625
 
524
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
525
-
526
626
  ###### Inherited from
527
627
 
528
628
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -531,8 +631,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
531
631
 
532
632
  > `readonly` **retryable**: `boolean`
533
633
 
534
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
535
-
536
634
  ###### Inherited from
537
635
 
538
636
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -541,8 +639,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
541
639
 
542
640
  ### SecretsError
543
641
 
544
- Defined in: [errors.ts:165](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L165)
545
-
546
642
  Base class for every error raised by @machinen/runtime and
547
643
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
548
644
  underlying cause via the standard `Error.cause` mechanism.
@@ -557,8 +653,6 @@ underlying cause via the standard `Error.cause` mechanism.
557
653
 
558
654
  > **new SecretsError**(`code`, `message`, `opts?`): [`SecretsError`](#secretserror)
559
655
 
560
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
561
-
562
656
  ###### Parameters
563
657
 
564
658
  ###### code
@@ -587,8 +681,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
587
681
 
588
682
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
589
683
 
590
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
591
-
592
684
  ###### Inherited from
593
685
 
594
686
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -597,8 +689,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
597
689
 
598
690
  > `readonly` **retryable**: `boolean`
599
691
 
600
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
601
-
602
692
  ###### Inherited from
603
693
 
604
694
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -607,8 +697,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
607
697
 
608
698
  ### WinsizeError
609
699
 
610
- Defined in: [errors.ts:166](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L166)
611
-
612
700
  Base class for every error raised by @machinen/runtime and
613
701
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
614
702
  underlying cause via the standard `Error.cause` mechanism.
@@ -623,8 +711,6 @@ underlying cause via the standard `Error.cause` mechanism.
623
711
 
624
712
  > **new WinsizeError**(`code`, `message`, `opts?`): [`WinsizeError`](#winsizeerror)
625
713
 
626
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
627
-
628
714
  ###### Parameters
629
715
 
630
716
  ###### code
@@ -653,8 +739,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
653
739
 
654
740
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
655
741
 
656
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
657
-
658
742
  ###### Inherited from
659
743
 
660
744
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -663,8 +747,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
663
747
 
664
748
  > `readonly` **retryable**: `boolean`
665
749
 
666
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
667
-
668
750
  ###### Inherited from
669
751
 
670
752
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -673,8 +755,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
673
755
 
674
756
  ### SandboxError
675
757
 
676
- Defined in: [errors.ts:167](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L167)
677
-
678
758
  Base class for every error raised by @machinen/runtime and
679
759
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
680
760
  underlying cause via the standard `Error.cause` mechanism.
@@ -689,8 +769,6 @@ underlying cause via the standard `Error.cause` mechanism.
689
769
 
690
770
  > **new SandboxError**(`code`, `message`, `opts?`): [`SandboxError`](#sandboxerror)
691
771
 
692
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
693
-
694
772
  ###### Parameters
695
773
 
696
774
  ###### code
@@ -719,8 +797,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
719
797
 
720
798
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
721
799
 
722
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
723
-
724
800
  ###### Inherited from
725
801
 
726
802
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -729,8 +805,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
729
805
 
730
806
  > `readonly` **retryable**: `boolean`
731
807
 
732
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
733
-
734
808
  ###### Inherited from
735
809
 
736
810
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -739,8 +813,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
739
813
 
740
814
  ### CacheError
741
815
 
742
- Defined in: [errors.ts:168](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L168)
743
-
744
816
  Base class for every error raised by @machinen/runtime and
745
817
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
746
818
  underlying cause via the standard `Error.cause` mechanism.
@@ -755,8 +827,6 @@ underlying cause via the standard `Error.cause` mechanism.
755
827
 
756
828
  > **new CacheError**(`code`, `message`, `opts?`): [`CacheError`](#cacheerror)
757
829
 
758
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
759
-
760
830
  ###### Parameters
761
831
 
762
832
  ###### code
@@ -785,8 +855,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
785
855
 
786
856
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
787
857
 
788
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
789
-
790
858
  ###### Inherited from
791
859
 
792
860
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -795,8 +863,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
795
863
 
796
864
  > `readonly` **retryable**: `boolean`
797
865
 
798
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
799
-
800
866
  ###### Inherited from
801
867
 
802
868
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -805,8 +871,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
805
871
 
806
872
  ### GvproxyError
807
873
 
808
- Defined in: [errors.ts:169](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L169)
809
-
810
874
  Base class for every error raised by @machinen/runtime and
811
875
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
812
876
  underlying cause via the standard `Error.cause` mechanism.
@@ -821,8 +885,6 @@ underlying cause via the standard `Error.cause` mechanism.
821
885
 
822
886
  > **new GvproxyError**(`code`, `message`, `opts?`): [`GvproxyError`](#gvproxyerror)
823
887
 
824
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
825
-
826
888
  ###### Parameters
827
889
 
828
890
  ###### code
@@ -851,8 +913,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
851
913
 
852
914
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
853
915
 
854
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
855
-
856
916
  ###### Inherited from
857
917
 
858
918
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -861,8 +921,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
861
921
 
862
922
  > `readonly` **retryable**: `boolean`
863
923
 
864
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
865
-
866
924
  ###### Inherited from
867
925
 
868
926
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -871,8 +929,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
871
929
 
872
930
  ### MkinitramfsError
873
931
 
874
- Defined in: [errors.ts:170](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L170)
875
-
876
932
  Base class for every error raised by @machinen/runtime and
877
933
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
878
934
  underlying cause via the standard `Error.cause` mechanism.
@@ -887,8 +943,6 @@ underlying cause via the standard `Error.cause` mechanism.
887
943
 
888
944
  > **new MkinitramfsError**(`code`, `message`, `opts?`): [`MkinitramfsError`](#mkinitramfserror)
889
945
 
890
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
891
-
892
946
  ###### Parameters
893
947
 
894
948
  ###### code
@@ -917,8 +971,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
917
971
 
918
972
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
919
973
 
920
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
921
-
922
974
  ###### Inherited from
923
975
 
924
976
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -927,8 +979,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
927
979
 
928
980
  > `readonly` **retryable**: `boolean`
929
981
 
930
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
931
-
932
982
  ###### Inherited from
933
983
 
934
984
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -937,8 +987,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
937
987
 
938
988
  ### ParseError
939
989
 
940
- Defined in: [errors.ts:171](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L171)
941
-
942
990
  Base class for every error raised by @machinen/runtime and
943
991
  @machinen/cli. Carries a flat `code`, a `retryable` hint, and the
944
992
  underlying cause via the standard `Error.cause` mechanism.
@@ -953,8 +1001,6 @@ underlying cause via the standard `Error.cause` mechanism.
953
1001
 
954
1002
  > **new ParseError**(`code`, `message`, `opts?`): [`ParseError`](#parseerror)
955
1003
 
956
- Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L149)
957
-
958
1004
  ###### Parameters
959
1005
 
960
1006
  ###### code
@@ -983,8 +1029,6 @@ Defined in: [errors.ts:149](https://github.com/redwoodjs/machinen/blob/main/pack
983
1029
 
984
1030
  > `readonly` **code**: [`ErrorCode`](#errorcode-1)
985
1031
 
986
- Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L146)
987
-
988
1032
  ###### Inherited from
989
1033
 
990
1034
  [`MachinenError`](#machinenerror).[`code`](#code)
@@ -993,8 +1037,6 @@ Defined in: [errors.ts:146](https://github.com/redwoodjs/machinen/blob/main/pack
993
1037
 
994
1038
  > `readonly` **retryable**: `boolean`
995
1039
 
996
- Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L147)
997
-
998
1040
  ###### Inherited from
999
1041
 
1000
1042
  [`MachinenError`](#machinenerror).[`retryable`](#retryable-1)
@@ -1003,8 +1045,6 @@ Defined in: [errors.ts:147](https://github.com/redwoodjs/machinen/blob/main/pack
1003
1045
 
1004
1046
  ### Sandboxes
1005
1047
 
1006
- Defined in: [multiplex.ts:39](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L39)
1007
-
1008
1048
  Registry of live sandboxes. Thread-safe in the sense that there's
1009
1049
  only one runtime thread anyway; the class just bookkeeps handles +
1010
1050
  their scrollback rings so the supervisor doesn't need to.
@@ -1015,8 +1055,6 @@ their scrollback rings so the supervisor doesn't need to.
1015
1055
 
1016
1056
  > **new Sandboxes**(`opts?`): [`Sandboxes`](#sandboxes)
1017
1057
 
1018
- Defined in: [multiplex.ts:51](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L51)
1019
-
1020
1058
  ###### Parameters
1021
1059
 
1022
1060
  ###### opts?
@@ -1035,8 +1073,6 @@ Defined in: [multiplex.ts:51](https://github.com/redwoodjs/machinen/blob/main/pa
1035
1073
 
1036
1074
  > `readonly` **scrollbackBytes**: `number`
1037
1075
 
1038
- Defined in: [multiplex.ts:49](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L49)
1039
-
1040
1076
  Maximum bytes retained per sandbox for replay on attach. The ring
1041
1077
  keeps only the most recent chunk up to this limit — a reasonable
1042
1078
  trade between "see enough context to know what's going on" and
@@ -1048,8 +1084,6 @@ trade between "see enough context to know what's going on" and
1048
1084
 
1049
1085
  > **add**(`id`, `vm`): `void`
1050
1086
 
1051
- Defined in: [multiplex.ts:55](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L55)
1052
-
1053
1087
  ###### Parameters
1054
1088
 
1055
1089
  ###### id
@@ -1068,8 +1102,6 @@ Defined in: [multiplex.ts:55](https://github.com/redwoodjs/machinen/blob/main/pa
1068
1102
 
1069
1103
  > **remove**(`id`): `void`
1070
1104
 
1071
- Defined in: [multiplex.ts:79](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L79)
1072
-
1073
1105
  Remove a sandbox. Does not kill the VM — call `vm.kill()` first.
1074
1106
 
1075
1107
  ###### Parameters
@@ -1086,8 +1118,6 @@ Remove a sandbox. Does not kill the VM — call `vm.kill()` first.
1086
1118
 
1087
1119
  > **list**(): `object`[]
1088
1120
 
1089
- Defined in: [multiplex.ts:84](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L84)
1090
-
1091
1121
  ###### Returns
1092
1122
 
1093
1123
  `object`[]
@@ -1096,8 +1126,6 @@ Defined in: [multiplex.ts:84](https://github.com/redwoodjs/machinen/blob/main/pa
1096
1126
 
1097
1127
  > **get**(`id`): [`SandboxEntry`](#sandboxentry)
1098
1128
 
1099
- Defined in: [multiplex.ts:91](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L91)
1100
-
1101
1129
  ###### Parameters
1102
1130
 
1103
1131
  ###### id
@@ -1112,8 +1140,6 @@ Defined in: [multiplex.ts:91](https://github.com/redwoodjs/machinen/blob/main/pa
1112
1140
 
1113
1141
  > **send**(`id`, `data`): `boolean`
1114
1142
 
1115
- Defined in: [multiplex.ts:96](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L96)
1116
-
1117
1143
  Write `data` to the sandbox's stdin. No-op if the id is unknown.
1118
1144
 
1119
1145
  ###### Parameters
@@ -1134,8 +1160,6 @@ Write `data` to the sandbox's stdin. No-op if the id is unknown.
1134
1160
 
1135
1161
  > **onOutput**(`id`, `fn`): () => `void`
1136
1162
 
1137
- Defined in: [multiplex.ts:110](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L110)
1138
-
1139
1163
  Subscribe to `id`'s output. Returns an unsubscribe function. The
1140
1164
  listener fires only for NEW bytes produced after the subscription
1141
1165
  — use `get(id).scrollback` to replay history if you want it.
@@ -1158,8 +1182,6 @@ listener fires only for NEW bytes produced after the subscription
1158
1182
 
1159
1183
  ### Supervisor
1160
1184
 
1161
- Defined in: [multiplex.ts:176](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L176)
1162
-
1163
1185
  A minimal text-driven multiplexer. Runs until `.stop()` is called
1164
1186
  or the input stream ends.
1165
1187
 
@@ -1178,8 +1200,6 @@ Hit `Ctrl-] Ctrl-]` (two 0x1D bytes in a row) to detach.
1178
1200
 
1179
1201
  > **new Supervisor**(`opts`): [`Supervisor`](#supervisor)
1180
1202
 
1181
- Defined in: [multiplex.ts:192](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L192)
1182
-
1183
1203
  ###### Parameters
1184
1204
 
1185
1205
  ###### opts
@@ -1196,16 +1216,12 @@ Defined in: [multiplex.ts:192](https://github.com/redwoodjs/machinen/blob/main/p
1196
1216
 
1197
1217
  > `readonly` **sandboxes**: [`Sandboxes`](#sandboxes)
1198
1218
 
1199
- Defined in: [multiplex.ts:177](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L177)
1200
-
1201
1219
  #### Methods
1202
1220
 
1203
1221
  ##### run()
1204
1222
 
1205
1223
  > **run**(): `Promise`\<`void`\>
1206
1224
 
1207
- Defined in: [multiplex.ts:206](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L206)
1208
-
1209
1225
  Run until stopped. Resolves when input ends or stop() is called.
1210
1226
 
1211
1227
  ###### Returns
@@ -1216,8 +1232,6 @@ Run until stopped. Resolves when input ends or stop() is called.
1216
1232
 
1217
1233
  > **stop**(): `void`
1218
1234
 
1219
- Defined in: [multiplex.ts:223](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L223)
1220
-
1221
1235
  Programmatic stop (e.g. from a test).
1222
1236
 
1223
1237
  ###### Returns
@@ -1228,8 +1242,6 @@ Programmatic stop (e.g. from a test).
1228
1242
 
1229
1243
  > **attach**(`id`): `void`
1230
1244
 
1231
- Defined in: [multiplex.ts:233](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L233)
1232
-
1233
1245
  Attach to `id`. Throws if id doesn't exist.
1234
1246
 
1235
1247
  ###### Parameters
@@ -1246,8 +1258,6 @@ Attach to `id`. Throws if id doesn't exist.
1246
1258
 
1247
1259
  > **detach**(): `void`
1248
1260
 
1249
- Defined in: [multiplex.ts:262](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L262)
1250
-
1251
1261
  ###### Returns
1252
1262
 
1253
1263
  `void`
@@ -1256,16 +1266,12 @@ Defined in: [multiplex.ts:262](https://github.com/redwoodjs/machinen/blob/main/p
1256
1266
 
1257
1267
  ### VsockWinsize
1258
1268
 
1259
- Defined in: [winsize.ts:37](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/winsize.ts#L37)
1260
-
1261
1269
  #### Methods
1262
1270
 
1263
1271
  ##### connect()
1264
1272
 
1265
1273
  > `static` **connect**(`udsPath`, `opts?`): `Promise`\<[`VsockWinsize`](#vsockwinsize)\>
1266
1274
 
1267
- Defined in: [winsize.ts:59](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/winsize.ts#L59)
1268
-
1269
1275
  Open a host Unix socket and keep retrying until the vsock bridge
1270
1276
  + guest agent wire themselves up. Resolves once the TCP-like
1271
1277
  connect completes — the agent may still be registering the
@@ -1290,8 +1296,6 @@ buffered by the bridge's connection table.
1290
1296
 
1291
1297
  > **send**(`cols`, `rows`): `void`
1292
1298
 
1293
- Defined in: [winsize.ts:86](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/winsize.ts#L86)
1294
-
1295
1299
  Send a new size. Idempotent against the most recent send — repeats
1296
1300
  are dropped so a chatty SIGWINCH doesn't spam the bridge.
1297
1301
 
@@ -1313,8 +1317,6 @@ are dropped so a chatty SIGWINCH doesn't spam the bridge.
1313
1317
 
1314
1318
  > **close**(): `void`
1315
1319
 
1316
- Defined in: [winsize.ts:98](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/winsize.ts#L98)
1317
-
1318
1320
  ###### Returns
1319
1321
 
1320
1322
  `void`
@@ -1323,24 +1325,18 @@ Defined in: [winsize.ts:98](https://github.com/redwoodjs/machinen/blob/main/pack
1323
1325
 
1324
1326
  ### BalloonCounters
1325
1327
 
1326
- Defined in: [balloon-stats.ts:23](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/balloon-stats.ts#L23)
1327
-
1328
1328
  #### Properties
1329
1329
 
1330
1330
  ##### bytesReported
1331
1331
 
1332
1332
  > **bytesReported**: `number`
1333
1333
 
1334
- Defined in: [balloon-stats.ts:25](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/balloon-stats.ts#L25)
1335
-
1336
1334
  Total bytes the balloon device has reclaimed via reporting.
1337
1335
 
1338
1336
  ##### bytesInflated
1339
1337
 
1340
1338
  > **bytesInflated**: `number`
1341
1339
 
1342
- Defined in: [balloon-stats.ts:32](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/balloon-stats.ts#L32)
1343
-
1344
1340
  Total bytes the inflate queue has seen. We don't drive inflate
1345
1341
  (`num_pages` stays 0), so this stays at 0 in well-behaved
1346
1342
  deployments — non-zero means a buggy/hostile guest is pushing
@@ -1350,8 +1346,6 @@ pages into the balloon on its own.
1350
1346
 
1351
1347
  > **hostPhysFootprintBytes**: `number`
1352
1348
 
1353
- Defined in: [balloon-stats.ts:42](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/balloon-stats.ts#L42)
1354
-
1355
1349
  Latest sample of this VMM's Darwin `phys_footprint` (the metric
1356
1350
  that backs Activity Monitor's "Memory" column and excludes
1357
1351
  `MADV_FREE_REUSABLE` pages). Refreshed every ~500 ms by a
@@ -1364,16 +1358,12 @@ Darwin-equivalent metric and the runtime reads
1364
1358
 
1365
1359
  ### MachinenErrorOptions
1366
1360
 
1367
- Defined in: [errors.ts:128](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L128)
1368
-
1369
1361
  #### Properties
1370
1362
 
1371
1363
  ##### retryable?
1372
1364
 
1373
1365
  > `optional` **retryable?**: `boolean`
1374
1366
 
1375
- Defined in: [errors.ts:135](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L135)
1376
-
1377
1367
  True if retrying the same call could plausibly succeed (transient
1378
1368
  network blip, upstream fetch, vsock agent not listening yet). False
1379
1369
  for misconfiguration (missing binary, bad mount path, invalid
@@ -1383,40 +1373,30 @@ port).
1383
1373
 
1384
1374
  > `optional` **cause?**: `unknown`
1385
1375
 
1386
- Defined in: [errors.ts:137](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L137)
1387
-
1388
1376
  Underlying error preserved via the standard `Error.cause` chain.
1389
1377
 
1390
1378
  ***
1391
1379
 
1392
1380
  ### VsockExecOptions
1393
1381
 
1394
- Defined in: [exec.ts:38](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L38)
1395
-
1396
1382
  #### Properties
1397
1383
 
1398
1384
  ##### connectTimeoutMs?
1399
1385
 
1400
1386
  > `optional` **connectTimeoutMs?**: `number`
1401
1387
 
1402
- Defined in: [exec.ts:40](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L40)
1403
-
1404
1388
  How long to keep retrying the UDS connect. Default 30s.
1405
1389
 
1406
1390
  ##### retryMs?
1407
1391
 
1408
1392
  > `optional` **retryMs?**: `number`
1409
1393
 
1410
- Defined in: [exec.ts:42](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L42)
1411
-
1412
1394
  Poll interval in ms while retrying. Default 250.
1413
1395
 
1414
1396
  ##### execTimeoutMs?
1415
1397
 
1416
1398
  > `optional` **execTimeoutMs?**: `number`
1417
1399
 
1418
- Defined in: [exec.ts:49](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L49)
1419
-
1420
1400
  Wall-clock ceiling for the spawned command. Default 5 minutes.
1421
1401
  Pass `null` (or `Infinity`) to disable — appropriate for
1422
1402
  long-running siblings (dev servers, file watchers, log tailers)
@@ -1426,8 +1406,6 @@ that should live for the VM's lifetime. Mirrors `boot({ timeoutMs: null })`.
1426
1406
 
1427
1407
  > `optional` **onStdout?**: (`chunk`) => `void`
1428
1408
 
1429
- Defined in: [exec.ts:51](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L51)
1430
-
1431
1409
  Called with each stdout chunk as it arrives (pass-through tee).
1432
1410
 
1433
1411
  ###### Parameters
@@ -1444,8 +1422,6 @@ Called with each stdout chunk as it arrives (pass-through tee).
1444
1422
 
1445
1423
  > `optional` **onStderr?**: (`chunk`) => `void`
1446
1424
 
1447
- Defined in: [exec.ts:53](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L53)
1448
-
1449
1425
  Called with each stderr chunk as it arrives (pass-through tee).
1450
1426
 
1451
1427
  ###### Parameters
@@ -1462,56 +1438,40 @@ Called with each stderr chunk as it arrives (pass-through tee).
1462
1438
 
1463
1439
  ### VsockExecResult
1464
1440
 
1465
- Defined in: [exec.ts:56](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L56)
1466
-
1467
1441
  #### Properties
1468
1442
 
1469
1443
  ##### exitCode
1470
1444
 
1471
1445
  > **exitCode**: `number`
1472
1446
 
1473
- Defined in: [exec.ts:57](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L57)
1474
-
1475
1447
  ##### stdout
1476
1448
 
1477
1449
  > **stdout**: `string`
1478
1450
 
1479
- Defined in: [exec.ts:58](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L58)
1480
-
1481
1451
  ##### stderr
1482
1452
 
1483
1453
  > **stderr**: `string`
1484
1454
 
1485
- Defined in: [exec.ts:59](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L59)
1486
-
1487
1455
  ***
1488
1456
 
1489
1457
  ### VsockExecPtyOptions
1490
1458
 
1491
- Defined in: [exec.ts:160](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L160)
1492
-
1493
1459
  #### Properties
1494
1460
 
1495
1461
  ##### cols
1496
1462
 
1497
1463
  > **cols**: `number`
1498
1464
 
1499
- Defined in: [exec.ts:162](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L162)
1500
-
1501
1465
  Initial window size; the guest passes this to forkpty()'s winp.
1502
1466
 
1503
1467
  ##### rows
1504
1468
 
1505
1469
  > **rows**: `number`
1506
1470
 
1507
- Defined in: [exec.ts:163](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L163)
1508
-
1509
1471
  ##### stdin
1510
1472
 
1511
1473
  > **stdin**: `Readable`
1512
1474
 
1513
- Defined in: [exec.ts:169](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L169)
1514
-
1515
1475
  Host-side input source. Each `data` chunk is forwarded as an
1516
1476
  `I <n>\n<bytes>` frame. Caller wires `process.stdin` (in raw
1517
1477
  mode) here for an interactive shell.
@@ -1520,8 +1480,6 @@ mode) here for an interactive shell.
1520
1480
 
1521
1481
  > **stdout**: `Writable`
1522
1482
 
1523
- Defined in: [exec.ts:174](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L174)
1524
-
1525
1483
  Host-side sink for PTY master output (`O <n>\n<bytes>` frames).
1526
1484
  Caller wires `process.stdout`.
1527
1485
 
@@ -1529,38 +1487,28 @@ Caller wires `process.stdout`.
1529
1487
 
1530
1488
  > `optional` **connectTimeoutMs?**: `number`
1531
1489
 
1532
- Defined in: [exec.ts:176](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L176)
1533
-
1534
1490
  Connect timeout (ms). Default 5000 — agent should already be up.
1535
1491
 
1536
1492
  ***
1537
1493
 
1538
1494
  ### VsockExecPtyResult
1539
1495
 
1540
- Defined in: [exec.ts:179](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L179)
1541
-
1542
1496
  #### Properties
1543
1497
 
1544
1498
  ##### exitCode
1545
1499
 
1546
1500
  > **exitCode**: `number`
1547
1501
 
1548
- Defined in: [exec.ts:180](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L180)
1549
-
1550
1502
  ***
1551
1503
 
1552
1504
  ### VsockExecPtyHandle
1553
1505
 
1554
- Defined in: [exec.ts:183](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L183)
1555
-
1556
1506
  #### Properties
1557
1507
 
1558
1508
  ##### result
1559
1509
 
1560
1510
  > `readonly` **result**: `Promise`\<[`VsockExecPtyResult`](#vsockexecptyresult)\>
1561
1511
 
1562
- Defined in: [exec.ts:185](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L185)
1563
-
1564
1512
  Resolves with the workload's exit code once X arrives.
1565
1513
 
1566
1514
  #### Methods
@@ -1569,8 +1517,6 @@ Resolves with the workload's exit code once X arrives.
1569
1517
 
1570
1518
  > **resize**(`cols`, `rows`): `void`
1571
1519
 
1572
- Defined in: [exec.ts:187](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L187)
1573
-
1574
1520
  Send a TIOCSWINSZ update. Hook from host's SIGWINCH.
1575
1521
 
1576
1522
  ###### Parameters
@@ -1591,8 +1537,6 @@ Send a TIOCSWINSZ update. Hook from host's SIGWINCH.
1591
1537
 
1592
1538
  > **cancel**(): `void`
1593
1539
 
1594
- Defined in: [exec.ts:189](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L189)
1595
-
1596
1540
  Disconnect; agent will SIGHUP the workload.
1597
1541
 
1598
1542
  ###### Returns
@@ -1603,38 +1547,28 @@ Disconnect; agent will SIGHUP the workload.
1603
1547
 
1604
1548
  ### VsockFilesOptions
1605
1549
 
1606
- Defined in: [files.ts:26](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/files.ts#L26)
1607
-
1608
1550
  #### Properties
1609
1551
 
1610
1552
  ##### timeoutMs?
1611
1553
 
1612
1554
  > `optional` **timeoutMs?**: `number`
1613
1555
 
1614
- Defined in: [files.ts:28](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/files.ts#L28)
1615
-
1616
1556
  How long to retry the UDS connect. Default 5s.
1617
1557
 
1618
1558
  ##### retryMs?
1619
1559
 
1620
1560
  > `optional` **retryMs?**: `number`
1621
1561
 
1622
- Defined in: [files.ts:29](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/files.ts#L29)
1623
-
1624
1562
  ##### excludes?
1625
1563
 
1626
1564
  > `optional` **excludes?**: `string`[]
1627
1565
 
1628
- Defined in: [files.ts:31](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/files.ts#L31)
1629
-
1630
1566
  Forwarded to `tar --exclude=PATTERN`. Repeat per pattern.
1631
1567
 
1632
1568
  ***
1633
1569
 
1634
1570
  ### GcResult
1635
1571
 
1636
- Defined in: [gc.ts:22](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/gc.ts#L22)
1637
-
1638
1572
  Per-entry record of what `runGc` did (or would do, with dryRun).
1639
1573
 
1640
1574
  #### Properties
@@ -1643,58 +1577,42 @@ Per-entry record of what `runGc` did (or would do, with dryRun).
1643
1577
 
1644
1578
  > **pid**: `number`
1645
1579
 
1646
- Defined in: [gc.ts:23](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/gc.ts#L23)
1647
-
1648
1580
  ##### name?
1649
1581
 
1650
1582
  > `optional` **name?**: `string`
1651
1583
 
1652
- Defined in: [gc.ts:24](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/gc.ts#L24)
1653
-
1654
1584
  ##### status
1655
1585
 
1656
1586
  > **status**: [`PidStatus`](#pidstatus)
1657
1587
 
1658
- Defined in: [gc.ts:25](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/gc.ts#L25)
1659
-
1660
1588
  ##### removedPaths
1661
1589
 
1662
1590
  > **removedPaths**: `string`[]
1663
1591
 
1664
- Defined in: [gc.ts:27](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/gc.ts#L27)
1665
-
1666
1592
  Paths removed (or that would be removed under `dryRun`).
1667
1593
 
1668
1594
  ##### failedPaths
1669
1595
 
1670
1596
  > **failedPaths**: `string`[]
1671
1597
 
1672
- Defined in: [gc.ts:29](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/gc.ts#L29)
1673
-
1674
1598
  Paths the gc tried to rm but couldn't (already gone, EPERM, …).
1675
1599
 
1676
1600
  ##### registryRemoved
1677
1601
 
1678
1602
  > **registryRemoved**: `boolean`
1679
1603
 
1680
- Defined in: [gc.ts:31](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/gc.ts#L31)
1681
-
1682
1604
  True if the registry entry was (or would be) dropped.
1683
1605
 
1684
1606
  ***
1685
1607
 
1686
1608
  ### RunGcOptions
1687
1609
 
1688
- Defined in: [gc.ts:34](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/gc.ts#L34)
1689
-
1690
1610
  #### Properties
1691
1611
 
1692
1612
  ##### dryRun?
1693
1613
 
1694
1614
  > `optional` **dryRun?**: `boolean`
1695
1615
 
1696
- Defined in: [gc.ts:39](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/gc.ts#L39)
1697
-
1698
1616
  When true, list what would be cleaned without touching the disk
1699
1617
  or registry. Used by `machinen gc --dry-run` and tests.
1700
1618
 
@@ -1702,8 +1620,6 @@ or registry. Used by `machinen gc --dry-run` and tests.
1702
1620
 
1703
1621
  > `optional` **pid?**: `number`
1704
1622
 
1705
- Defined in: [gc.ts:44](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/gc.ts#L44)
1706
-
1707
1623
  Only act on this single entry (skip everything else in the
1708
1624
  registry). Used by `machinen stop` after killing a specific VM.
1709
1625
 
@@ -1711,16 +1627,12 @@ registry). Used by `machinen stop` after killing a specific VM.
1711
1627
 
1712
1628
  ### CheckForkBackpressureOptions
1713
1629
 
1714
- Defined in: [host-mem.ts:103](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/host-mem.ts#L103)
1715
-
1716
1630
  #### Properties
1717
1631
 
1718
1632
  ##### threshold
1719
1633
 
1720
1634
  > **threshold**: `number`
1721
1635
 
1722
- Defined in: [host-mem.ts:110](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/host-mem.ts#L110)
1723
-
1724
1636
  Fraction of host total memory that must remain free for a fork
1725
1637
  to proceed. Pass `0` (or any non-positive number) to disable the
1726
1638
  gate entirely. Capped at `1` — `0.5` already means "refuse
@@ -1730,8 +1642,6 @@ unless half the host is free."
1730
1642
 
1731
1643
  > `optional` **readFree?**: () => `Promise`\<`number`\>
1732
1644
 
1733
- Defined in: [host-mem.ts:112](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/host-mem.ts#L112)
1734
-
1735
1645
  Pluggable for tests; defaults to [readHostFreeBytes](#readhostfreebytes).
1736
1646
 
1737
1647
  ###### Returns
@@ -1742,24 +1652,18 @@ Pluggable for tests; defaults to [readHostFreeBytes](#readhostfreebytes).
1742
1652
 
1743
1653
  > `optional` **totalBytes?**: `number`
1744
1654
 
1745
- Defined in: [host-mem.ts:114](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/host-mem.ts#L114)
1746
-
1747
1655
  Pluggable for tests; defaults to [readHostTotalBytes](#readhosttotalbytes).
1748
1656
 
1749
1657
  ***
1750
1658
 
1751
1659
  ### ChunkLogEvent
1752
1660
 
1753
- Defined in: [log.ts:19](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/log.ts#L19)
1754
-
1755
1661
  #### Properties
1756
1662
 
1757
1663
  ##### source
1758
1664
 
1759
1665
  > **source**: `"guest-console"` \| `"exec-stdout"` \| `"exec-stderr"`
1760
1666
 
1761
- Defined in: [log.ts:26](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/log.ts#L26)
1762
-
1763
1667
  Where the chunk came from:
1764
1668
  - `guest-console` — kernel / PL011 console bytes (VMM stderr)
1765
1669
  - `exec-stdout` — stdout of an exec invocation
@@ -1769,94 +1673,70 @@ Where the chunk came from:
1769
1673
 
1770
1674
  > `optional` **cmd?**: `string`
1771
1675
 
1772
- Defined in: [log.ts:28](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/log.ts#L28)
1773
-
1774
1676
  Command string; set when `source` is `exec-stdout` or `exec-stderr`.
1775
1677
 
1776
1678
  ##### chunk
1777
1679
 
1778
1680
  > **chunk**: `Buffer`
1779
1681
 
1780
- Defined in: [log.ts:30](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/log.ts#L30)
1781
-
1782
1682
  Raw bytes as they arrive — not line-split, not decoded.
1783
1683
 
1784
1684
  ***
1785
1685
 
1786
1686
  ### PhaseLogEvent
1787
1687
 
1788
- Defined in: [log.ts:33](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/log.ts#L33)
1789
-
1790
1688
  #### Properties
1791
1689
 
1792
1690
  ##### source
1793
1691
 
1794
1692
  > **source**: `"phase"`
1795
1693
 
1796
- Defined in: [log.ts:34](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/log.ts#L34)
1797
-
1798
1694
  ##### kind
1799
1695
 
1800
1696
  > **kind**: `"boot"` \| `"provision"` \| `"snapshot"` \| `"restore"`
1801
1697
 
1802
- Defined in: [log.ts:36](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/log.ts#L36)
1803
-
1804
1698
  Which runtime entry point produced these phases.
1805
1699
 
1806
1700
  ##### phases
1807
1701
 
1808
1702
  > **phases**: `ReadonlyMap`\<`string`, `number`\>
1809
1703
 
1810
- Defined in: [log.ts:38](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/log.ts#L38)
1811
-
1812
1704
  Phase name → wall-clock ms. Insertion order = timeline order.
1813
1705
 
1814
1706
  ##### totalMs
1815
1707
 
1816
1708
  > **totalMs**: `number`
1817
1709
 
1818
- Defined in: [log.ts:40](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/log.ts#L40)
1819
-
1820
1710
  Wall-clock between PhaseTimer construction and flush.
1821
1711
 
1822
1712
  ***
1823
1713
 
1824
1714
  ### PackBundleOptions
1825
1715
 
1826
- Defined in: [mkinitramfs.ts:326](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L326)
1827
-
1828
1716
  #### Properties
1829
1717
 
1830
1718
  ##### bundle
1831
1719
 
1832
1720
  > **bundle**: `string`
1833
1721
 
1834
- Defined in: [mkinitramfs.ts:328](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L328)
1835
-
1836
1722
  Bundle directory with rootfs/ + machinen-config.json.
1837
1723
 
1838
1724
  ##### out
1839
1725
 
1840
1726
  > **out**: `string`
1841
1727
 
1842
- Defined in: [mkinitramfs.ts:330](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L330)
1843
-
1844
1728
  Path to the initramfs cpio to write.
1845
1729
 
1846
1730
  ##### base?
1847
1731
 
1848
1732
  > `optional` **base?**: `string`
1849
1733
 
1850
- Defined in: [mkinitramfs.ts:332](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L332)
1851
-
1852
1734
  Optional base rootfs tarball (rootfs-debian-arm64.tar.gz).
1853
1735
 
1854
1736
  ##### mount?
1855
1737
 
1856
1738
  > `optional` **mount?**: `object`
1857
1739
 
1858
- Defined in: [mkinitramfs.ts:339](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L339)
1859
-
1860
1740
  A single host directory copied into the guest between the base
1861
1741
  tarball and the bundle's rootfs. Bundle files win on path
1862
1742
  collisions. The caller is responsible for validating host exists
@@ -1874,8 +1754,6 @@ and is a directory, and that guest lives under `/mnt/`. See #64.
1874
1754
 
1875
1755
  > `optional` **env?**: `Record`\<`string`, `string`\>
1876
1756
 
1877
- Defined in: [mkinitramfs.ts:346](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L346)
1878
-
1879
1757
  Extra env vars to merge into the bundle's machinen-config.json `env`
1880
1758
  field before packing. The bundle's on-disk env wins on key collision
1881
1759
  (same precedence as the mount overlay — bundle always gets the last
@@ -1885,24 +1763,18 @@ word). See #89.
1885
1763
 
1886
1764
  > `optional` **excludes?**: `string`[]
1887
1765
 
1888
- Defined in: [mkinitramfs.ts:348](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L348)
1889
-
1890
1766
  fnmatch patterns matched against each rootfs-relative path.
1891
1767
 
1892
1768
  ##### initPath?
1893
1769
 
1894
1770
  > `optional` **initPath?**: `string`
1895
1771
 
1896
- Defined in: [mkinitramfs.ts:350](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L350)
1897
-
1898
1772
  Optional path to the compiled /init. Default: ../microvm/test-fixtures/init relative to this file.
1899
1773
 
1900
1774
  ##### fuseAgentPath?
1901
1775
 
1902
1776
  > `optional` **fuseAgentPath?**: `string`
1903
1777
 
1904
- Defined in: [mkinitramfs.ts:356](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L356)
1905
-
1906
1778
  Optional host path to the compiled fuse-agent binary. When set,
1907
1779
  the binary is injected at `/fuse-agent` (mode 0755) inside the
1908
1780
  initramfs so /init can fork it per live-share mount. See #78.
@@ -1911,8 +1783,6 @@ initramfs so /init can fork it per live-share mount. See #78.
1911
1783
 
1912
1784
  > `optional` **execAgentPath?**: `string`
1913
1785
 
1914
- Defined in: [mkinitramfs.ts:362](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L362)
1915
-
1916
1786
  Optional path to the compiled /exec-agent. Default: same dir as
1917
1787
  /init under packages/microvm/test-fixtures/. Used to override the
1918
1788
  stale /exec-agent that may live in a re-provisioned base tarball.
@@ -1921,40 +1791,30 @@ stale /exec-agent that may live in a re-provisioned base tarball.
1921
1791
 
1922
1792
  ### PackTinyBundleOptions
1923
1793
 
1924
- Defined in: [mkinitramfs.ts:497](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L497)
1925
-
1926
1794
  #### Properties
1927
1795
 
1928
1796
  ##### bundle
1929
1797
 
1930
1798
  > **bundle**: `string`
1931
1799
 
1932
- Defined in: [mkinitramfs.ts:499](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L499)
1933
-
1934
1800
  Bundle directory with machinen-config.json. The bundle's rootfs/ is ignored — the on-disk rootfs is on /dev/vda.
1935
1801
 
1936
1802
  ##### out
1937
1803
 
1938
1804
  > **out**: `string`
1939
1805
 
1940
- Defined in: [mkinitramfs.ts:501](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L501)
1941
-
1942
1806
  Path to the initramfs cpio to write.
1943
1807
 
1944
1808
  ##### env?
1945
1809
 
1946
1810
  > `optional` **env?**: `Record`\<`string`, `string`\>
1947
1811
 
1948
- Defined in: [mkinitramfs.ts:503](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L503)
1949
-
1950
1812
  Extra env merged into the bundle's machinen-config.json. Bundle keys win on collision.
1951
1813
 
1952
1814
  ##### mountGuest?
1953
1815
 
1954
1816
  > `optional` **mountGuest?**: `string`
1955
1817
 
1956
- Defined in: [mkinitramfs.ts:511](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L511)
1957
-
1958
1818
  Guest mountpoint for the `--mount` overlay (#272). When set, the
1959
1819
  cpio carries `/etc/machinen-mountdisk-guest` with this path so
1960
1820
  /init knows where to layer the squashfs+ext4 overlay after the
@@ -1965,156 +1825,112 @@ not in the cpio. Must be an absolute path under `/mnt/`.
1965
1825
 
1966
1826
  > `optional` **initPath?**: `string`
1967
1827
 
1968
- Defined in: [mkinitramfs.ts:513](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L513)
1969
-
1970
1828
  Optional override for the compiled /init. Default: ../microvm/test-fixtures/init relative to this file.
1971
1829
 
1972
1830
  ##### fuseAgentPath?
1973
1831
 
1974
1832
  > `optional` **fuseAgentPath?**: `string`
1975
1833
 
1976
- Defined in: [mkinitramfs.ts:515](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L515)
1977
-
1978
1834
  Optional path to the compiled fuse-agent; staged at /fuse-agent when set.
1979
1835
 
1980
1836
  ***
1981
1837
 
1982
1838
  ### PackRootfsOptions
1983
1839
 
1984
- Defined in: [mkinitramfs.ts:560](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L560)
1985
-
1986
1840
  #### Properties
1987
1841
 
1988
1842
  ##### rootfs
1989
1843
 
1990
1844
  > **rootfs**: `string`
1991
1845
 
1992
- Defined in: [mkinitramfs.ts:561](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L561)
1993
-
1994
1846
  ##### out
1995
1847
 
1996
1848
  > **out**: `string`
1997
1849
 
1998
- Defined in: [mkinitramfs.ts:562](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L562)
1999
-
2000
1850
  ##### config?
2001
1851
 
2002
1852
  > `optional` **config?**: `string`
2003
1853
 
2004
- Defined in: [mkinitramfs.ts:563](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L563)
2005
-
2006
1854
  ##### excludes?
2007
1855
 
2008
1856
  > `optional` **excludes?**: `string`[]
2009
1857
 
2010
- Defined in: [mkinitramfs.ts:564](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L564)
2011
-
2012
1858
  ##### initPath?
2013
1859
 
2014
1860
  > `optional` **initPath?**: `string`
2015
1861
 
2016
- Defined in: [mkinitramfs.ts:565](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L565)
2017
-
2018
1862
  ***
2019
1863
 
2020
1864
  ### PackMinimalOptions
2021
1865
 
2022
- Defined in: [mkinitramfs.ts:582](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L582)
2023
-
2024
1866
  #### Properties
2025
1867
 
2026
1868
  ##### out
2027
1869
 
2028
1870
  > **out**: `string`
2029
1871
 
2030
- Defined in: [mkinitramfs.ts:583](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L583)
2031
-
2032
1872
  ##### initPath?
2033
1873
 
2034
1874
  > `optional` **initPath?**: `string`
2035
1875
 
2036
- Defined in: [mkinitramfs.ts:584](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L584)
2037
-
2038
1876
  ##### config?
2039
1877
 
2040
1878
  > `optional` **config?**: `string`
2041
1879
 
2042
- Defined in: [mkinitramfs.ts:585](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L585)
2043
-
2044
1880
  ***
2045
1881
 
2046
1882
  ### PackWorkspaceOptions
2047
1883
 
2048
- Defined in: [mkinitramfs.ts:603](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L603)
2049
-
2050
1884
  #### Properties
2051
1885
 
2052
1886
  ##### workspace
2053
1887
 
2054
1888
  > **workspace**: `string`
2055
1889
 
2056
- Defined in: [mkinitramfs.ts:604](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L604)
2057
-
2058
1890
  ##### out
2059
1891
 
2060
1892
  > **out**: `string`
2061
1893
 
2062
- Defined in: [mkinitramfs.ts:605](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L605)
2063
-
2064
1894
  ##### mountpoint?
2065
1895
 
2066
1896
  > `optional` **mountpoint?**: `string`
2067
1897
 
2068
- Defined in: [mkinitramfs.ts:607](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L607)
2069
-
2070
1898
  Directory name inside the cpio (default `workspace`).
2071
1899
 
2072
1900
  ##### excludes?
2073
1901
 
2074
1902
  > `optional` **excludes?**: `Iterable`\<`string`\>
2075
1903
 
2076
- Defined in: [mkinitramfs.ts:609](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L609)
2077
-
2078
1904
  Basename-matched excludes. Default: DEFAULT_WORKSPACE_EXCLUDES.
2079
1905
 
2080
1906
  ##### maxMb?
2081
1907
 
2082
1908
  > `optional` **maxMb?**: `number`
2083
1909
 
2084
- Defined in: [mkinitramfs.ts:611](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L611)
2085
-
2086
1910
  Max final size in MiB (default 500). Throws if exceeded.
2087
1911
 
2088
1912
  ***
2089
1913
 
2090
1914
  ### EnsureMountDiskImageOptions
2091
1915
 
2092
- Defined in: [mountdisk-img.ts:120](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L120)
2093
-
2094
1916
  #### Properties
2095
1917
 
2096
1918
  ##### cacheDir?
2097
1919
 
2098
1920
  > `optional` **cacheDir?**: `string`
2099
1921
 
2100
- Defined in: [mountdisk-img.ts:122](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L122)
2101
-
2102
1922
  Override the cache directory. Default: `~/.cache/machinen/mountdisk`.
2103
1923
 
2104
1924
  ##### force?
2105
1925
 
2106
1926
  > `optional` **force?**: `boolean`
2107
1927
 
2108
- Defined in: [mountdisk-img.ts:124](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L124)
2109
-
2110
1928
  Force re-materialization. Mostly for debugging the materializer.
2111
1929
 
2112
1930
  ##### onPhase?
2113
1931
 
2114
1932
  > `optional` **onPhase?**: (`name`, `ms`) => `void`
2115
1933
 
2116
- Defined in: [mountdisk-img.ts:131](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L131)
2117
-
2118
1934
  Sub-phase callback for the caller's PhaseTimer. Fires for each
2119
1935
  measurable internal step: `manifest-hash`, `mksquashfs`,
2120
1936
  `staging-rename`. The caller usually does
@@ -2138,40 +1954,30 @@ measurable internal step: `manifest-hash`, `mksquashfs`,
2138
1954
 
2139
1955
  ### EnsureMountDiskImageResult
2140
1956
 
2141
- Defined in: [mountdisk-img.ts:134](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L134)
2142
-
2143
1957
  #### Properties
2144
1958
 
2145
1959
  ##### lowerPath
2146
1960
 
2147
1961
  > **lowerPath**: `string`
2148
1962
 
2149
- Defined in: [mountdisk-img.ts:136](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L136)
2150
-
2151
1963
  Absolute path to the cached squashfs lower.
2152
1964
 
2153
1965
  ##### key
2154
1966
 
2155
1967
  > **key**: `string`
2156
1968
 
2157
- Defined in: [mountdisk-img.ts:138](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L138)
2158
-
2159
1969
  Tree-manifest sha256 — also the cache key. Useful for tests.
2160
1970
 
2161
1971
  ***
2162
1972
 
2163
1973
  ### EnsureMountDiskUpperOptions
2164
1974
 
2165
- Defined in: [mountdisk-img.ts:275](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L275)
2166
-
2167
1975
  #### Properties
2168
1976
 
2169
1977
  ##### sizeBytes?
2170
1978
 
2171
1979
  > `optional` **sizeBytes?**: `number`
2172
1980
 
2173
- Defined in: [mountdisk-img.ts:282](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L282)
2174
-
2175
1981
  Target size in bytes. Default 4 GiB. Sparse, so unused capacity
2176
1982
  costs nothing on the host disk. Mirrors `rootDiskSizeBytes` —
2177
1983
  over-provision to give the guest room to write without
@@ -2181,68 +1987,48 @@ having to grow the file mid-VM.
2181
1987
 
2182
1988
  ### EnsureMountDiskUpperResult
2183
1989
 
2184
- Defined in: [mountdisk-img.ts:285](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L285)
2185
-
2186
1990
  #### Properties
2187
1991
 
2188
1992
  ##### upperPath
2189
1993
 
2190
1994
  > **upperPath**: `string`
2191
1995
 
2192
- Defined in: [mountdisk-img.ts:287](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L287)
2193
-
2194
1996
  Absolute path to the per-VM ext4 upper image.
2195
1997
 
2196
1998
  ##### sizeBytes
2197
1999
 
2198
2000
  > **sizeBytes**: `number`
2199
2001
 
2200
- Defined in: [mountdisk-img.ts:289](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L289)
2201
-
2202
2002
  Size in bytes the file was allocated at.
2203
2003
 
2204
2004
  ***
2205
2005
 
2206
2006
  ### SandboxEntry
2207
2007
 
2208
- Defined in: [multiplex.ts:23](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L23)
2209
-
2210
2008
  #### Properties
2211
2009
 
2212
2010
  ##### id
2213
2011
 
2214
2012
  > **id**: `string`
2215
2013
 
2216
- Defined in: [multiplex.ts:24](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L24)
2217
-
2218
2014
  ##### vm
2219
2015
 
2220
2016
  > **vm**: [`VmHandle`](#vmhandle)
2221
2017
 
2222
- Defined in: [multiplex.ts:25](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L25)
2223
-
2224
2018
  ##### scrollback
2225
2019
 
2226
2020
  > **scrollback**: `Buffer`
2227
2021
 
2228
- Defined in: [multiplex.ts:26](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L26)
2229
-
2230
2022
  ##### addedAt
2231
2023
 
2232
2024
  > `readonly` **addedAt**: `number`
2233
2025
 
2234
- Defined in: [multiplex.ts:27](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L27)
2235
-
2236
2026
  ***
2237
2027
 
2238
2028
  ### OnOutputListener()
2239
2029
 
2240
- Defined in: [multiplex.ts:30](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L30)
2241
-
2242
2030
  > **OnOutputListener**(`chunk`, `source`): `void`
2243
2031
 
2244
- Defined in: [multiplex.ts:31](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L31)
2245
-
2246
2032
  #### Parameters
2247
2033
 
2248
2034
  ##### chunk
@@ -2261,48 +2047,36 @@ Defined in: [multiplex.ts:31](https://github.com/redwoodjs/machinen/blob/main/pa
2261
2047
 
2262
2048
  ### SupervisorOptions
2263
2049
 
2264
- Defined in: [multiplex.ts:140](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L140)
2265
-
2266
2050
  #### Properties
2267
2051
 
2268
2052
  ##### sandboxes
2269
2053
 
2270
2054
  > **sandboxes**: [`Sandboxes`](#sandboxes)
2271
2055
 
2272
- Defined in: [multiplex.ts:142](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L142)
2273
-
2274
2056
  Registry to draw sandboxes from.
2275
2057
 
2276
2058
  ##### input?
2277
2059
 
2278
2060
  > `optional` **input?**: `ReadableStream`
2279
2061
 
2280
- Defined in: [multiplex.ts:144](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L144)
2281
-
2282
2062
  Input byte stream. Defaults to `process.stdin`.
2283
2063
 
2284
2064
  ##### output?
2285
2065
 
2286
2066
  > `optional` **output?**: `Writable`
2287
2067
 
2288
- Defined in: [multiplex.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L146)
2289
-
2290
2068
  Output byte stream. Defaults to `process.stdout`.
2291
2069
 
2292
2070
  ##### commandPrefix?
2293
2071
 
2294
2072
  > `optional` **commandPrefix?**: `string`
2295
2073
 
2296
- Defined in: [multiplex.ts:148](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L148)
2297
-
2298
2074
  Prefix for slash-commands. Default `/`.
2299
2075
 
2300
2076
  ##### rawTtyOnAttach?
2301
2077
 
2302
2078
  > `optional` **rawTtyOnAttach?**: `boolean`
2303
2079
 
2304
- Defined in: [multiplex.ts:154](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L154)
2305
-
2306
2080
  Flip the terminal into raw mode while a sandbox is attached, and
2307
2081
  restore it on detach. Enabled by default when `input` is a TTY.
2308
2082
  Set to `false` in tests where `input` is a plain PassThrough.
@@ -2311,8 +2085,6 @@ Set to `false` in tests where `input` is a plain PassThrough.
2311
2085
 
2312
2086
  > `optional` **forwardResize?**: `boolean`
2313
2087
 
2314
- Defined in: [multiplex.ts:160](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/multiplex.ts#L160)
2315
-
2316
2088
  Forward SIGWINCH on the parent process (terminal resize) to any
2317
2089
  attached sandbox that implements `.resize(cols, rows)`. Enabled
2318
2090
  by default when `output` is a TTY.
@@ -2321,8 +2093,6 @@ by default when `output` is a TTY.
2321
2093
 
2322
2094
  ### RssTarget
2323
2095
 
2324
- Defined in: [proc-rss.ts:35](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/proc-rss.ts#L35)
2325
-
2326
2096
  A pid plus the absolute path to its stats file (when available).
2327
2097
 
2328
2098
  #### Properties
@@ -2331,14 +2101,10 @@ A pid plus the absolute path to its stats file (when available).
2331
2101
 
2332
2102
  > **pid**: `number`
2333
2103
 
2334
- Defined in: [proc-rss.ts:36](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/proc-rss.ts#L36)
2335
-
2336
2104
  ##### statsPath?
2337
2105
 
2338
2106
  > `optional` **statsPath?**: `string`
2339
2107
 
2340
- Defined in: [proc-rss.ts:43](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/proc-rss.ts#L43)
2341
-
2342
2108
  MACHINEN_STATS_FILE path for this VMM (registry entry's
2343
2109
  `statsPath`). On Darwin we read `phys_footprint` from this file
2344
2110
  in preference to `ps -o rss=`. Optional / undefined for arbitrary
@@ -2348,16 +2114,12 @@ pids that aren't machinen-managed; those fall back to ps.
2348
2114
 
2349
2115
  ### ProvisionOptions
2350
2116
 
2351
- Defined in: [provision.ts:55](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L55)
2352
-
2353
2117
  #### Properties
2354
2118
 
2355
2119
  ##### base?
2356
2120
 
2357
2121
  > `optional` **base?**: `string`
2358
2122
 
2359
- Defined in: [provision.ts:65](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L65)
2360
-
2361
2123
  Path to the base rootfs tarball to start from. Typically the
2362
2124
  `rootfs-debian-arm64.tar.gz` produced by
2363
2125
  `scripts/build-base-assets.sh` or shipped in a machinen release.
@@ -2370,8 +2132,6 @@ cache at `~/.machinen/@machinen/runtime@<version>/bases/debian-arm64/`).
2370
2132
 
2371
2133
  > **install**: (`vm`) => `Promise`\<`void`\>
2372
2134
 
2373
- Defined in: [provision.ts:70](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L70)
2374
-
2375
2135
  User-supplied provisioning steps. Runs inside the guest via vsock.
2376
2136
 
2377
2137
  ###### Parameters
@@ -2388,8 +2148,6 @@ User-supplied provisioning steps. Runs inside the guest via vsock.
2388
2148
 
2389
2149
  > **out**: `string`
2390
2150
 
2391
- Defined in: [provision.ts:76](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L76)
2392
-
2393
2151
  Output path for the resulting rootfs tarball. Will be overwritten.
2394
2152
  Consumed via `boot({ image: out })`.
2395
2153
 
@@ -2397,8 +2155,6 @@ Consumed via `boot({ image: out })`.
2397
2155
 
2398
2156
  > `optional` **cmd?**: `string`[]
2399
2157
 
2400
- Defined in: [provision.ts:84](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L84)
2401
-
2402
2158
  Default cmd baked into the image as `/machinen-config.json`.
2403
2159
  When the image is later booted via `boot({ image })` without a
2404
2160
  user-supplied `cmd`, the guest runs this. User-supplied `cmd` on
@@ -2408,8 +2164,6 @@ user-supplied `cmd`, the guest runs this. User-supplied `cmd` on
2408
2164
 
2409
2165
  > `optional` **env?**: `Record`\<`string`, `string`\>
2410
2166
 
2411
- Defined in: [provision.ts:91](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L91)
2412
-
2413
2167
  Default guest env baked into the image alongside `cmd`. Merged
2414
2168
  with `boot({ env })` at boot time, with the caller's `env`
2415
2169
  overriding on key collision.
@@ -2418,8 +2172,6 @@ overriding on key collision.
2418
2172
 
2419
2173
  > `optional` **binary?**: `string`
2420
2174
 
2421
- Defined in: [provision.ts:97](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L97)
2422
-
2423
2175
  Optional VMM binary path. Same lookup rules as `boot()` — if
2424
2176
  omitted, resolves `@machinen/vmm-<arch>-<os>`.
2425
2177
 
@@ -2427,16 +2179,12 @@ omitted, resolves `@machinen/vmm-<arch>-<os>`.
2427
2179
 
2428
2180
  > `optional` **cwd?**: `string`
2429
2181
 
2430
- Defined in: [provision.ts:100](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L100)
2431
-
2432
2182
  Working directory. Defaults to process.cwd().
2433
2183
 
2434
2184
  ##### scratchDiskSizeBytes?
2435
2185
 
2436
2186
  > `optional` **scratchDiskSizeBytes?**: `number`
2437
2187
 
2438
- Defined in: [provision.ts:107](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L107)
2439
-
2440
2188
  Size of the scratch disk used to ferry the tarball from guest to
2441
2189
  host. Must be larger than the expected post-install rootfs size.
2442
2190
  Default: 1 GiB (sparse, so it doesn't actually take that space).
@@ -2445,8 +2193,6 @@ Default: 1 GiB (sparse, so it doesn't actually take that space).
2445
2193
 
2446
2194
  > `optional` **timeoutMs?**: `number`
2447
2195
 
2448
- Defined in: [provision.ts:114](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L114)
2449
-
2450
2196
  Wall-clock ceiling for the whole build. If the install hook plus
2451
2197
  the final archive + shutdown doesn't finish in this window, we
2452
2198
  SIGKILL the VMM and fail. Default: 10 minutes.
@@ -2455,8 +2201,6 @@ SIGKILL the VMM and fail. Default: 10 minutes.
2455
2201
 
2456
2202
  > `optional` **vmmEnv?**: `Record`\<`string`, `string`\>
2457
2203
 
2458
- Defined in: [provision.ts:121](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L121)
2459
-
2460
2204
  Extra env passed to the VMM process on the host side. Useful for
2461
2205
  dev overrides like `MACHINEN_BOOT_TEST`. Distinct from `env`,
2462
2206
  which bakes guest-workload env into the produced image.
@@ -2465,8 +2209,6 @@ which bakes guest-workload env into the produced image.
2465
2209
 
2466
2210
  > `optional` **kernel?**: `string`
2467
2211
 
2468
- Defined in: [provision.ts:129](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L129)
2469
-
2470
2212
  Path to the guest kernel. Optional — when omitted, `provision()`
2471
2213
  resolves it via `resolveBaseKernel()` (MACHINEN_ASSETS_DIR override,
2472
2214
  falling back to the `@machinen/cli` cache). Same semantics as
@@ -2476,8 +2218,6 @@ falling back to the `@machinen/cli` cache). Same semantics as
2476
2218
 
2477
2219
  > `optional` **dtb?**: `string`
2478
2220
 
2479
- Defined in: [provision.ts:135](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L135)
2480
-
2481
2221
  Path to the guest DTB. Optional — when omitted, resolved via
2482
2222
  `resolveBaseDtb()` from the same fallback chain as `kernel`.
2483
2223
 
@@ -2485,8 +2225,6 @@ Path to the guest DTB. Optional — when omitted, resolved via
2485
2225
 
2486
2226
  > `optional` **onLog?**: [`OnLog`](#onlog)
2487
2227
 
2488
- Defined in: [provision.ts:143](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L143)
2489
-
2490
2228
  Streaming log callback — fires for every byte of guest output
2491
2229
  during the build: guest kernel console, every `vm.exec()` call
2492
2230
  the install hook makes, and the internal tar / poweroff execs.
@@ -2496,124 +2234,90 @@ See `LogEvent.source` to tell them apart. See #83.
2496
2234
 
2497
2235
  ### ProvisionResult
2498
2236
 
2499
- Defined in: [provision.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L146)
2500
-
2501
2237
  #### Properties
2502
2238
 
2503
2239
  ##### imagePath
2504
2240
 
2505
2241
  > **imagePath**: `string`
2506
2242
 
2507
- Defined in: [provision.ts:148](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L148)
2508
-
2509
2243
  Absolute path to the output tarball.
2510
2244
 
2511
2245
  ##### sizeBytes
2512
2246
 
2513
2247
  > **sizeBytes**: `number`
2514
2248
 
2515
- Defined in: [provision.ts:151](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L151)
2516
-
2517
2249
  Size of the output tarball in bytes.
2518
2250
 
2519
2251
  ##### elapsedMs
2520
2252
 
2521
2253
  > **elapsedMs**: `number`
2522
2254
 
2523
- Defined in: [provision.ts:154](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L154)
2524
-
2525
2255
  Wall-clock time from build() entry to return.
2526
2256
 
2527
2257
  ***
2528
2258
 
2529
2259
  ### PtyBootOptions
2530
2260
 
2531
- Defined in: [pty.ts:91](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L91)
2532
-
2533
2261
  #### Properties
2534
2262
 
2535
2263
  ##### binary
2536
2264
 
2537
2265
  > **binary**: `string`
2538
2266
 
2539
- Defined in: [pty.ts:93](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L93)
2540
-
2541
2267
  Absolute or cwd-relative path to the binary to fork.
2542
2268
 
2543
2269
  ##### env?
2544
2270
 
2545
2271
  > `optional` **env?**: `Record`\<`string`, `string`\>
2546
2272
 
2547
- Defined in: [pty.ts:95](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L95)
2548
-
2549
2273
  Extra env. Merged over process.env.
2550
2274
 
2551
2275
  ##### cwd?
2552
2276
 
2553
2277
  > `optional` **cwd?**: `string`
2554
2278
 
2555
- Defined in: [pty.ts:96](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L96)
2556
-
2557
2279
  ##### args?
2558
2280
 
2559
2281
  > `optional` **args?**: `string`[]
2560
2282
 
2561
- Defined in: [pty.ts:97](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L97)
2562
-
2563
2283
  ##### cols?
2564
2284
 
2565
2285
  > `optional` **cols?**: `number`
2566
2286
 
2567
- Defined in: [pty.ts:99](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L99)
2568
-
2569
2287
  Initial terminal size. Defaults to 80x24.
2570
2288
 
2571
2289
  ##### rows?
2572
2290
 
2573
2291
  > `optional` **rows?**: `number`
2574
2292
 
2575
- Defined in: [pty.ts:100](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L100)
2576
-
2577
2293
  ##### name?
2578
2294
 
2579
2295
  > `optional` **name?**: `string`
2580
2296
 
2581
- Defined in: [pty.ts:102](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L102)
2582
-
2583
2297
  TERM value. Default `xterm-256color` — the CC banner wants colors.
2584
2298
 
2585
2299
  ***
2586
2300
 
2587
2301
  ### PtyVmHandle
2588
2302
 
2589
- Defined in: [pty.ts:105](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L105)
2590
-
2591
2303
  #### Properties
2592
2304
 
2593
2305
  ##### pid
2594
2306
 
2595
2307
  > `readonly` **pid**: `number`
2596
2308
 
2597
- Defined in: [pty.ts:106](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L106)
2598
-
2599
2309
  ##### stdin
2600
2310
 
2601
2311
  > `readonly` **stdin**: `Writable`
2602
2312
 
2603
- Defined in: [pty.ts:107](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L107)
2604
-
2605
2313
  ##### stdout
2606
2314
 
2607
2315
  > `readonly` **stdout**: `Readable`
2608
2316
 
2609
- Defined in: [pty.ts:108](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L108)
2610
-
2611
2317
  ##### stderr
2612
2318
 
2613
2319
  > `readonly` **stderr**: `Readable`
2614
2320
 
2615
- Defined in: [pty.ts:110](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L110)
2616
-
2617
2321
  Same stream as `stdout`. A pty merges stdout + stderr in the kernel.
2618
2322
 
2619
2323
  #### Methods
@@ -2622,8 +2326,6 @@ Same stream as `stdout`. A pty merges stdout + stderr in the kernel.
2622
2326
 
2623
2327
  > **resize**(`cols`, `rows`): `void`
2624
2328
 
2625
- Defined in: [pty.ts:112](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L112)
2626
-
2627
2329
  Tell the kernel the terminal is now `cols`x`rows`. Triggers SIGWINCH in the child.
2628
2330
 
2629
2331
  ###### Parameters
@@ -2644,8 +2346,6 @@ Tell the kernel the terminal is now `cols`x`rows`. Triggers SIGWINCH in the chil
2644
2346
 
2645
2347
  > **wait**(): `Promise`\<\{ `code`: `number`; `signal`: `Signals`; \}\>
2646
2348
 
2647
- Defined in: [pty.ts:113](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L113)
2648
-
2649
2349
  ###### Returns
2650
2350
 
2651
2351
  `Promise`\<\{ `code`: `number`; `signal`: `Signals`; \}\>
@@ -2654,8 +2354,6 @@ Defined in: [pty.ts:113](https://github.com/redwoodjs/machinen/blob/main/package
2654
2354
 
2655
2355
  > **kill**(): `Promise`\<`void`\>
2656
2356
 
2657
- Defined in: [pty.ts:114](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L114)
2658
-
2659
2357
  ###### Returns
2660
2358
 
2661
2359
  `Promise`\<`void`\>
@@ -2664,8 +2362,6 @@ Defined in: [pty.ts:114](https://github.com/redwoodjs/machinen/blob/main/package
2664
2362
 
2665
2363
  > **output**(): `Promise`\<`string`\>
2666
2364
 
2667
- Defined in: [pty.ts:115](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L115)
2668
-
2669
2365
  ###### Returns
2670
2366
 
2671
2367
  `Promise`\<`string`\>
@@ -2674,8 +2370,6 @@ Defined in: [pty.ts:115](https://github.com/redwoodjs/machinen/blob/main/package
2674
2370
 
2675
2371
  > **errorOutput**(): `Promise`\<`string`\>
2676
2372
 
2677
- Defined in: [pty.ts:117](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L117)
2678
-
2679
2373
  Alias of output() — a pty gives us one merged stream.
2680
2374
 
2681
2375
  ###### Returns
@@ -2686,48 +2380,36 @@ Alias of output() — a pty gives us one merged stream.
2686
2380
 
2687
2381
  ### RegistryEntry
2688
2382
 
2689
- Defined in: [registry.ts:42](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L42)
2690
-
2691
2383
  #### Properties
2692
2384
 
2693
2385
  ##### pid
2694
2386
 
2695
2387
  > **pid**: `number`
2696
2388
 
2697
- Defined in: [registry.ts:44](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L44)
2698
-
2699
2389
  PID of the VMM process on this host — primary key.
2700
2390
 
2701
2391
  ##### name?
2702
2392
 
2703
2393
  > `optional` **name?**: `string`
2704
2394
 
2705
- Defined in: [registry.ts:46](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L46)
2706
-
2707
2395
  Optional human-friendly name (from `boot({ name })`). Path-shaped allowed.
2708
2396
 
2709
2397
  ##### socketPath
2710
2398
 
2711
2399
  > **socketPath**: `string`
2712
2400
 
2713
- Defined in: [registry.ts:48](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L48)
2714
-
2715
2401
  Host-side vsock UDS the exec-agent is reachable on.
2716
2402
 
2717
2403
  ##### imagePath?
2718
2404
 
2719
2405
  > `optional` **imagePath?**: `string`
2720
2406
 
2721
- Defined in: [registry.ts:50](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L50)
2722
-
2723
2407
  Path to the image the VM was booted from (diagnostic only).
2724
2408
 
2725
2409
  ##### diskPath?
2726
2410
 
2727
2411
  > `optional` **diskPath?**: `string`
2728
2412
 
2729
- Defined in: [registry.ts:56](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L56)
2730
-
2731
2413
  Host-side path of the scratch disk attached to the guest. Used by
2732
2414
  `attach().snapshot()` so an attach-owned handle can find the
2733
2415
  guest-side scratch disk that backs the in-VM dump.
@@ -2736,8 +2418,6 @@ guest-side scratch disk that backs the in-VM dump.
2736
2418
 
2737
2419
  > `optional` **forkedFrom?**: `string`
2738
2420
 
2739
- Defined in: [registry.ts:61](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L61)
2740
-
2741
2421
  Absolute path to the snapshot directory this VM was forked from
2742
2422
  (set by `restore({ snapDir })`). Visible in `ls`; informational.
2743
2423
 
@@ -2745,8 +2425,6 @@ Absolute path to the snapshot directory this VM was forked from
2745
2425
 
2746
2426
  > `optional` **bootLogPath?**: `string`
2747
2427
 
2748
- Defined in: [registry.ts:69](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L69)
2749
-
2750
2428
  Path to the one-shot boot-console snapshot written at detach time
2751
2429
  (issue #150 phase 2). Only set on entries booted with
2752
2430
  `--detached`; live post-detach console bytes are dropped on the
@@ -2757,8 +2435,6 @@ of the boot sequence on a detached VM.
2757
2435
 
2758
2436
  > `optional` **cleanupPaths?**: `string`[]
2759
2437
 
2760
- Defined in: [registry.ts:78](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L78)
2761
-
2762
2438
  Per-boot artifacts that need to be removed when the VMM exits.
2763
2439
  Today the in-process exit hook handles this for non-detached
2764
2440
  boots. After detach (#150 phase 2) the parent is gone before the
@@ -2770,8 +2446,6 @@ file (per-boot disk image) or a directory (bundle / vsock UDS).
2770
2446
 
2771
2447
  > `optional` **vmmExe?**: `string`
2772
2448
 
2773
- Defined in: [registry.ts:86](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L86)
2774
-
2775
2449
  Absolute path to the VMM binary that was spawned. `machinen gc`
2776
2450
  compares this against `/proc/<pid>/exe` (Linux) or `ps -o comm=`
2777
2451
  (macOS) before treating an entry as live — without it, a recycled
@@ -2782,8 +2456,6 @@ to `kill(pid, 0)` and the entry would be kept around forever.
2782
2456
 
2783
2457
  > `optional` **gvproxyPid?**: `number`
2784
2458
 
2785
- Defined in: [registry.ts:95](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L95)
2786
-
2787
2459
  PID of the gvproxy process spawned alongside this VMM (issue #150
2788
2460
  phase 2 PR3). Recorded so `machinen stop` can SIGTERM gvproxy at
2789
2461
  the same time as the VMM, and so `machinen gc` can validate /
@@ -2795,8 +2467,6 @@ pre-set by the caller).
2795
2467
 
2796
2468
  > `optional` **gvproxyExe?**: `string`
2797
2469
 
2798
- Defined in: [registry.ts:102](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L102)
2799
-
2800
2470
  Absolute path to the gvproxy binary spawned for this VM. Used by
2801
2471
  `machinen stop` for the same anti-recycling check the VMM gets
2802
2472
  via `vmmExe` — we don't want to SIGTERM whatever process inherits
@@ -2806,8 +2476,6 @@ gvproxy's pid weeks later.
2806
2476
 
2807
2477
  > `optional` **portForward?**: `object`[]
2808
2478
 
2809
- Defined in: [registry.ts:109](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L109)
2810
-
2811
2479
  Host→guest port forwards configured at boot/fork time. Surfaced
2812
2480
  in `machinen ls` so users can see which host port maps to which
2813
2481
  VM without re-reading the launch command. Undefined when the VM
@@ -2829,8 +2497,6 @@ was booted without `-p` / `portForward: []`.
2829
2497
 
2830
2498
  > `optional` **memoryCeilingMib?**: `number`
2831
2499
 
2832
- Defined in: [registry.ts:119](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L119)
2833
-
2834
2500
  Guest RAM ceiling in MiB, as resolved by `boot()` (either the
2835
2501
  caller's `memory:` option or `autoSizeMemoryMib()` for this host
2836
2502
  — see #263 phase A). Surfaced in `machinen ls` (MEM column) and
@@ -2843,8 +2509,6 @@ computed our own.
2843
2509
 
2844
2510
  > `optional` **statsPath?**: `string`
2845
2511
 
2846
- Defined in: [registry.ts:128](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L128)
2847
-
2848
2512
  Absolute path to the shared stats file the VMM writes balloon
2849
2513
  counters to (#274). 16 bytes, mmaped MAP_SHARED on the VMM side
2850
2514
  via `MACHINEN_STATS_FILE`. Persisted so an attach-owned handle
@@ -2856,8 +2520,6 @@ env var).
2856
2520
 
2857
2521
  > `optional` **lazyPagesTotal?**: `number`
2858
2522
 
2859
- Defined in: [registry.ts:135](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L135)
2860
-
2861
2523
  Total pages the lazy-pages rewriter (#266) marked PE_LAZY when
2862
2524
  the VM was restored. Set on restore-derived entries, undefined
2863
2525
  for plain boots and eager restores. Surfaced via
@@ -2867,8 +2529,6 @@ for plain boots and eager restores. Surfaced via
2867
2529
 
2868
2530
  > `optional` **lazyPagesMountRoot?**: `string`
2869
2531
 
2870
- Defined in: [registry.ts:143](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L143)
2871
-
2872
2532
  Absolute path under which the lazy-restore FUSE mount serves
2873
2533
  `pages-*.img` reads. The mount-server tracks bytes served below
2874
2534
  this prefix; `vm.memoryStats()` divides that by 4096 and
@@ -2879,8 +2539,6 @@ Undefined when the VM wasn't lazy-restored.
2879
2539
 
2880
2540
  > `optional` **mountDisk?**: `object`
2881
2541
 
2882
- Defined in: [registry.ts:154](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L154)
2883
-
2884
2542
  #272: when the VM was booted with `mount: { host, guest }`, the
2885
2543
  runtime materialized a squashfs RO lower + ext4 RW upper. Persist
2886
2544
  those host paths so an attach-owned `vm.snapshot()` /
@@ -2906,8 +2564,6 @@ silently boots without the overlay.
2906
2564
 
2907
2565
  > `optional` **liveMounts?**: `object`[]
2908
2566
 
2909
- Defined in: [registry.ts:170](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L170)
2910
-
2911
2567
  #273: live-share FUSE mounts (`liveMounts: [...]` at boot) the
2912
2568
  VM was started with. Persisted so an attach-owned `vm.snapshot()`
2913
2569
  / `vm.fork()` can record the same `meta.liveMounts` block in the
@@ -2934,8 +2590,6 @@ to bind anything).
2934
2590
 
2935
2591
  > `optional` **liveMountServers?**: `object`[]
2936
2592
 
2937
- Defined in: [registry.ts:181](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L181)
2938
-
2939
2593
  #150 phase 3: pids + exes of the detached mount-server helpers
2940
2594
  spawned alongside this VMM, one per live-mount. The helpers die
2941
2595
  with the VMM via `pdeathsig --watch-pid` already, but `machinen
@@ -2957,24 +2611,18 @@ without `liveMounts`.
2957
2611
 
2958
2612
  > **startedAt**: `number`
2959
2613
 
2960
- Defined in: [registry.ts:183](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L183)
2961
-
2962
2614
  ms epoch when the entry was created.
2963
2615
 
2964
2616
  ***
2965
2617
 
2966
2618
  ### EnsureRootfsImageOptions
2967
2619
 
2968
- Defined in: [rootfs-img.ts:134](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/rootfs-img.ts#L134)
2969
-
2970
2620
  #### Properties
2971
2621
 
2972
2622
  ##### cacheDir?
2973
2623
 
2974
2624
  > `optional` **cacheDir?**: `string`
2975
2625
 
2976
- Defined in: [rootfs-img.ts:139](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/rootfs-img.ts#L139)
2977
-
2978
2626
  Override the cache directory. Default: `~/.cache/machinen/rootfs`.
2979
2627
  Useful for tests.
2980
2628
 
@@ -2982,8 +2630,6 @@ Useful for tests.
2982
2630
 
2983
2631
  > `optional` **force?**: `boolean`
2984
2632
 
2985
- Defined in: [rootfs-img.ts:144](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/rootfs-img.ts#L144)
2986
-
2987
2633
  Force re-materialization even if a cached image is already present.
2988
2634
  Mostly for debugging the materializer.
2989
2635
 
@@ -2991,8 +2637,6 @@ Mostly for debugging the materializer.
2991
2637
 
2992
2638
  > `optional` **sizeMultiplier?**: `number`
2993
2639
 
2994
- Defined in: [rootfs-img.ts:154](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/rootfs-img.ts#L154)
2995
-
2996
2640
  Slack multiplier above the unpacked tarball size when sizing the
2997
2641
  ext4 filesystem. Default: 2.5 — leaves enough room for the guest
2998
2642
  to install a few hundred MB of packages on top of the base rootfs
@@ -3005,8 +2649,6 @@ to fill the filesystem.
3005
2649
 
3006
2650
  > `optional` **minSizeBytes?**: `number`
3007
2651
 
3008
- Defined in: [rootfs-img.ts:162](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/rootfs-img.ts#L162)
3009
-
3010
2652
  Minimum image size in bytes. The materializer enforces at least
3011
2653
  this for small rootfs where the multiplier alone would leave
3012
2654
  insufficient room for a real workload. Default: 2 GiB — boot-time
@@ -3017,8 +2659,6 @@ insufficient room for a real workload. Default: 2 GiB — boot-time
3017
2659
 
3018
2660
  > `optional` **sizeBytes?**: `number`
3019
2661
 
3020
- Defined in: [rootfs-img.ts:170](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/rootfs-img.ts#L170)
3021
-
3022
2662
  Absolute target size in bytes. When set, overrides `sizeMultiplier`
3023
2663
  and `minSizeBytes` entirely — fresh materializations get exactly
3024
2664
  this size, cached `.img`s smaller than this are sparse-extended
@@ -3029,8 +2669,6 @@ For the user-facing `boot({ rootDiskSizeBytes })` knob (#131).
3029
2669
 
3030
2670
  > `optional` **onPhase?**: (`name`, `ms`) => `void`
3031
2671
 
3032
- Defined in: [rootfs-img.ts:178](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/rootfs-img.ts#L178)
3033
-
3034
2672
  Sub-phase callback for the caller's PhaseTimer (#233 follow-up).
3035
2673
  Fires for each measurable internal step: `sha256`, `e2fsck`,
3036
2674
  `sparse-extend`, `tar-extract`, `mke2fs`, `gunzip-prebake`. The
@@ -3055,40 +2693,30 @@ the breakdown shows up alongside the parent phase.
3055
2693
 
3056
2694
  ### VsockSecretsOptions
3057
2695
 
3058
- Defined in: [secrets.ts:26](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/secrets.ts#L26)
3059
-
3060
2696
  #### Properties
3061
2697
 
3062
2698
  ##### timeoutMs?
3063
2699
 
3064
2700
  > `optional` **timeoutMs?**: `number`
3065
2701
 
3066
- Defined in: [secrets.ts:28](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/secrets.ts#L28)
3067
-
3068
2702
  How long to keep retrying the UDS connect. Default 10s.
3069
2703
 
3070
2704
  ##### retryMs?
3071
2705
 
3072
2706
  > `optional` **retryMs?**: `number`
3073
2707
 
3074
- Defined in: [secrets.ts:30](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/secrets.ts#L30)
3075
-
3076
2708
  Poll interval in ms while retrying. Default 250.
3077
2709
 
3078
2710
  ***
3079
2711
 
3080
2712
  ### VmHandle
3081
2713
 
3082
- Defined in: [vm-handle.ts:16](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L16)
3083
-
3084
2714
  #### Properties
3085
2715
 
3086
2716
  ##### pid
3087
2717
 
3088
2718
  > `readonly` **pid**: `number`
3089
2719
 
3090
- Defined in: [vm-handle.ts:23](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L23)
3091
-
3092
2720
  PID of the host-side VMM process — primary identifier across
3093
2721
  boot/attach. Kernel-unique while alive; reused after exit, so
3094
2722
  pass it to `attach({ pid })` while the VM is live (or use
@@ -3098,36 +2726,26 @@ pass it to `attach({ pid })` while the VM is live (or use
3098
2726
 
3099
2727
  > `readonly` `optional` **name?**: `string`
3100
2728
 
3101
- Defined in: [vm-handle.ts:25](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L25)
3102
-
3103
2729
  Optional human-friendly name passed to `boot({ name })`.
3104
2730
 
3105
2731
  ##### stdin
3106
2732
 
3107
2733
  > `readonly` **stdin**: `Writable`
3108
2734
 
3109
- Defined in: [vm-handle.ts:26](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L26)
3110
-
3111
2735
  ##### stdout
3112
2736
 
3113
2737
  > `readonly` **stdout**: `Readable`
3114
2738
 
3115
- Defined in: [vm-handle.ts:27](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L27)
3116
-
3117
2739
  ##### stderr
3118
2740
 
3119
2741
  > `readonly` **stderr**: `Readable`
3120
2742
 
3121
- Defined in: [vm-handle.ts:28](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L28)
3122
-
3123
2743
  #### Methods
3124
2744
 
3125
2745
  ##### wait()
3126
2746
 
3127
2747
  > **wait**(): `Promise`\<\{ `code`: `number`; `signal`: `Signals`; \}\>
3128
2748
 
3129
- Defined in: [vm-handle.ts:31](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L31)
3130
-
3131
2749
  Resolves when the VM process exits. Rejects on timeout.
3132
2750
 
3133
2751
  ###### Returns
@@ -3138,8 +2756,6 @@ Resolves when the VM process exits. Rejects on timeout.
3138
2756
 
3139
2757
  > **kill**(): `Promise`\<`void`\>
3140
2758
 
3141
- Defined in: [vm-handle.ts:34](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L34)
3142
-
3143
2759
  Send SIGKILL to the VM. Resolves once it's really gone.
3144
2760
 
3145
2761
  ###### Returns
@@ -3150,8 +2766,6 @@ Send SIGKILL to the VM. Resolves once it's really gone.
3150
2766
 
3151
2767
  > **detach**(): `Promise`\<`void`\>
3152
2768
 
3153
- Defined in: [vm-handle.ts:42](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L42)
3154
-
3155
2769
  Drop this host-side handle without killing the VMM. The VM keeps
3156
2770
  running and can be re-attached from another process. For locally-
3157
2771
  booted handles this closes captured streams; `wait()` and
@@ -3165,8 +2779,6 @@ booted handles this closes captured streams; `wait()` and
3165
2779
 
3166
2780
  > **output**(): `Promise`\<`string`\>
3167
2781
 
3168
- Defined in: [vm-handle.ts:50](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L50)
3169
-
3170
2782
  Buffer stdout until the process exits; return it as a UTF-8 string.
3171
2783
  Capped at ~1 MiB tail — long-running VMs keep only the most recent
3172
2784
  bytes (issue #150). Sufficient for kernel boot console + test
@@ -3180,8 +2792,6 @@ assertions; not a full transcript.
3180
2792
 
3181
2793
  > **errorOutput**(): `Promise`\<`string`\>
3182
2794
 
3183
- Defined in: [vm-handle.ts:53](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L53)
3184
-
3185
2795
  Same as `output()` but for stderr (where guest console lands).
3186
2796
 
3187
2797
  ###### Returns
@@ -3192,8 +2802,6 @@ Same as `output()` but for stderr (where guest console lands).
3192
2802
 
3193
2803
  > **exec**(`cmd`, `opts?`): `Promise`\<[`VsockExecResult`](#vsockexecresult)\>
3194
2804
 
3195
- Defined in: [vm-handle.ts:64](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L64)
3196
-
3197
2805
  Run a shell command inside the guest via the vsock exec-agent. Throws
3198
2806
  BootError on non-zero exit; callers who want to inspect failure
3199
2807
  should use `execRaw`.
@@ -3220,8 +2828,6 @@ automatically by `boot()` unless the caller pre-set MACHINEN_VSOCK.
3220
2828
 
3221
2829
  > **execRaw**(`cmd`, `opts?`): `Promise`\<[`VsockExecResult`](#vsockexecresult)\>
3222
2830
 
3223
- Defined in: [vm-handle.ts:67](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L67)
3224
-
3225
2831
  Like `exec()` but returns non-zero exit codes instead of throwing.
3226
2832
 
3227
2833
  ###### Parameters
@@ -3242,8 +2848,6 @@ Like `exec()` but returns non-zero exit codes instead of throwing.
3242
2848
 
3243
2849
  > **execPty**(`cmd`, `opts`): [`VsockExecPtyHandle`](#vsockexecptyhandle)
3244
2850
 
3245
- Defined in: [vm-handle.ts:80](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L80)
3246
-
3247
2851
  Run a shell command inside a pseudoterminal. Bidirectional bytes
3248
2852
  flow between `opts.stdin` and `opts.stdout`; the returned handle's
3249
2853
  `.resize(cols, rows)` propagates window-size changes (hook your
@@ -3272,8 +2876,6 @@ untranslated bytes. See #133.
3272
2876
 
3273
2877
  > **writeFile**(`guestPath`, `contents`, `opts?`): `Promise`\<`void`\>
3274
2878
 
3275
- Defined in: [vm-handle.ts:101](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L101)
3276
-
3277
2879
  Write `contents` to `guestPath` inside the VM. Convenience over
3278
2880
  `vm.exec(...)` for the common "drop a config file from the host"
3279
2881
  case — no quoting/heredoc gymnastics, binary-safe via base64.
@@ -3316,8 +2918,6 @@ EXEC_VSOCK_UNAVAILABLE | EXEC_NONZERO_EXIT |
3316
2918
 
3317
2919
  > **snapshot**(`opts`): `Promise`\<[`SnapshotResult`](#snapshotresult)\>
3318
2920
 
3319
- Defined in: [vm-handle.ts:147](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L147)
3320
-
3321
2921
  Freeze this VM with CRIU and write a snapshot bundle into
3322
2922
  `opts.outDir`. The bundle is a directory containing:
3323
2923
 
@@ -3375,8 +2975,6 @@ and the bundle can be restored into a sibling VM (`vm.fork()`).
3375
2975
 
3376
2976
  > **memoryStats**(): `Promise`\<[`MemoryStats`](#memorystats-1)\>
3377
2977
 
3378
- Defined in: [vm-handle.ts:176](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L176)
3379
-
3380
2978
  Read the host's view of this VM's memory: the ceiling the VMM was
3381
2979
  sized at, the host RSS the VMM is currently holding, the bytes
3382
2980
  the virtio-balloon device has reported back to the host, and the
@@ -3411,8 +3009,6 @@ Pure read, no side effects. The numbers come from:
3411
3009
 
3412
3010
  > **fork**(`opts?`): `Promise`\<[`VmHandle`](#vmhandle)\>
3413
3011
 
3414
- Defined in: [vm-handle.ts:199](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L199)
3415
-
3416
3012
  Snapshot this VM without killing it and immediately restore the
3417
3013
  bundle into a new sibling VM. Both source and fork keep running,
3418
3014
  independently addressable. See #216.
@@ -3447,8 +3043,6 @@ written to a temp dir and removed when the fork exits.
3447
3043
 
3448
3044
  ### MemoryStats
3449
3045
 
3450
- Defined in: [vm-handle.ts:206](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L206)
3451
-
3452
3046
  Host-observable memory state for one VM (#274). All four fields are
3453
3047
  snapshots of "now" — call `memoryStats()` again to refresh.
3454
3048
 
@@ -3458,8 +3052,6 @@ snapshots of "now" — call `memoryStats()` again to refresh.
3458
3052
 
3459
3053
  > **ceilingMib**: `number`
3460
3054
 
3461
- Defined in: [vm-handle.ts:215](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L215)
3462
-
3463
3055
  Ceiling the VMM was sized at (MiB). The actual RSS climbs into
3464
3056
  this on demand and is reclaimed by the balloon (#263 phase B);
3465
3057
  the ceiling itself is fixed for the lifetime of the VM. `null`
@@ -3471,8 +3063,6 @@ number we don't own.
3471
3063
 
3472
3064
  > **hostRssBytes**: `number`
3473
3065
 
3474
- Defined in: [vm-handle.ts:221](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L221)
3475
-
3476
3066
  Resident bytes the host kernel sees the VMM holding. `null`
3477
3067
  when the VMM has exited or `/proc/<pid>/status` / `ps` couldn't
3478
3068
  be read.
@@ -3481,8 +3071,6 @@ be read.
3481
3071
 
3482
3072
  > **balloonInflatedBytes**: `number`
3483
3073
 
3484
- Defined in: [vm-handle.ts:230](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L230)
3485
-
3486
3074
  Bytes the virtio-balloon device has reclaimed via free-page
3487
3075
  reporting since the VMM started. Strictly increases over the
3488
3076
  VMM's lifetime; if `hostRssBytes` is well below ceiling, balloon
@@ -3494,8 +3082,6 @@ without that env var.
3494
3082
 
3495
3083
  > **lazyPagesPending**: `number`
3496
3084
 
3497
- Defined in: [vm-handle.ts:237](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L237)
3498
-
3499
3085
  Pages the lazy-restore path (#266) has registered as PE_LAZY but
3500
3086
  the guest hasn't faulted in yet. Approximated as
3501
3087
  `entriesFlagged - bytesServedFromPagesImg / 4096`, clamped to
@@ -3505,40 +3091,30 @@ the guest hasn't faulted in yet. Approximated as
3505
3091
 
3506
3092
  ### WriteFileOptions
3507
3093
 
3508
- Defined in: [vm-handle.ts:240](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L240)
3509
-
3510
3094
  #### Properties
3511
3095
 
3512
3096
  ##### mode?
3513
3097
 
3514
3098
  > `optional` **mode?**: `number`
3515
3099
 
3516
- Defined in: [vm-handle.ts:242](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L242)
3517
-
3518
3100
  Octal mode for the destination file (e.g. `0o755`). Default: leave as-is.
3519
3101
 
3520
3102
  ##### recursive?
3521
3103
 
3522
3104
  > `optional` **recursive?**: `boolean`
3523
3105
 
3524
- Defined in: [vm-handle.ts:244](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L244)
3525
-
3526
3106
  `mkdir -p` the parent directory before writing. Default: true.
3527
3107
 
3528
3108
  ##### append?
3529
3109
 
3530
3110
  > `optional` **append?**: `boolean`
3531
3111
 
3532
- Defined in: [vm-handle.ts:246](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L246)
3533
-
3534
3112
  Append to the file instead of overwriting. Default: false.
3535
3113
 
3536
3114
  ***
3537
3115
 
3538
3116
  ### SnapshotOptions
3539
3117
 
3540
- Defined in: [vm-handle.ts:260](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L260)
3541
-
3542
3118
  Options for `vm.snapshot(opts)`.
3543
3119
 
3544
3120
  Live-share mount note (#273): VMs booted with `liveMounts: [...]`
@@ -3555,8 +3131,6 @@ the `liveMounts` doc on `BootOptions` for the full contract.
3555
3131
 
3556
3132
  > **outDir**: `string`
3557
3133
 
3558
- Defined in: [vm-handle.ts:266](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L266)
3559
-
3560
3134
  Directory the snapshot bundle is written to. Created if missing
3561
3135
  and required to be empty (or absent) so a previous snapshot
3562
3136
  can't be silently overwritten.
@@ -3565,8 +3139,6 @@ can't be silently overwritten.
3565
3139
 
3566
3140
  > `optional` **dumpCmd?**: `string`
3567
3141
 
3568
- Defined in: [vm-handle.ts:271](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L271)
3569
-
3570
3142
  Command to run in the guest to trigger the CRIU dump. Defaults to
3571
3143
  `/sbin/machinen-dump`.
3572
3144
 
@@ -3574,8 +3146,6 @@ Command to run in the guest to trigger the CRIU dump. Defaults to
3574
3146
 
3575
3147
  > `optional` **timeoutMs?**: `number`
3576
3148
 
3577
- Defined in: [vm-handle.ts:276](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L276)
3578
-
3579
3149
  Wall-clock ceiling for the dump + shutdown. If the VMM hasn't exited
3580
3150
  in this window we SIGKILL it and fail. Default 90s.
3581
3151
 
@@ -3583,8 +3153,6 @@ in this window we SIGKILL it and fail. Default 90s.
3583
3153
 
3584
3154
  > `optional` **onLog?**: [`OnLog`](#onlog)
3585
3155
 
3586
- Defined in: [vm-handle.ts:282](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L282)
3587
-
3588
3156
  Streaming log callback — fires for every byte the dump emits
3589
3157
  (guest console + the dump exec). See #83. When both the snapshot
3590
3158
  call and `boot({ onLog })` have a callback set, both fire.
@@ -3593,8 +3161,6 @@ call and `boot({ onLog })` have a callback set, both fire.
3593
3161
 
3594
3162
  > `optional` **leaveRunning?**: `boolean`
3595
3163
 
3596
- Defined in: [vm-handle.ts:291](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L291)
3597
-
3598
3164
  Pass `--leave-running` to `criu dump` so the source workload
3599
3165
  survives the snapshot. The VMM stays up after the dump; success
3600
3166
  is signalled by the dump exec returning 0 instead of by VMM exit.
@@ -3606,8 +3172,6 @@ Default: false (current destructive snapshot behavior).
3606
3172
 
3607
3173
  > `optional` **tcpClose?**: `boolean`
3608
3174
 
3609
- Defined in: [vm-handle.ts:301](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L301)
3610
-
3611
3175
  Omit `--tcp-established` from `criu dump`. Restored sockets come
3612
3176
  back in CLOSED state — the workload sees ECONNRESET on first
3613
3177
  I/O, which is the right semantic when the dump is the source for
@@ -3620,48 +3184,36 @@ Default: false (preserve TCP — current snapshot/restore behavior).
3620
3184
 
3621
3185
  ### SnapshotResult
3622
3186
 
3623
- Defined in: [vm-handle.ts:304](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L304)
3624
-
3625
3187
  #### Properties
3626
3188
 
3627
3189
  ##### snapDir
3628
3190
 
3629
3191
  > **snapDir**: `string`
3630
3192
 
3631
- Defined in: [vm-handle.ts:306](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L306)
3632
-
3633
3193
  Absolute path to the snapshot bundle directory.
3634
3194
 
3635
3195
  ##### imgDir
3636
3196
 
3637
3197
  > **imgDir**: `string`
3638
3198
 
3639
- Defined in: [vm-handle.ts:308](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L308)
3640
-
3641
3199
  Absolute path to the CRIU image directory inside the bundle.
3642
3200
 
3643
3201
  ##### elapsedMs
3644
3202
 
3645
3203
  > **elapsedMs**: `number`
3646
3204
 
3647
- Defined in: [vm-handle.ts:310](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L310)
3648
-
3649
3205
  Time from `snapshot()` entry to VMM exit, in milliseconds.
3650
3206
 
3651
3207
  ##### consoleLog
3652
3208
 
3653
3209
  > **consoleLog**: `string`
3654
3210
 
3655
- Defined in: [vm-handle.ts:312](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L312)
3656
-
3657
3211
  Guest console output captured during the dump.
3658
3212
 
3659
3213
  ***
3660
3214
 
3661
3215
  ### SnapshotMeta
3662
3216
 
3663
- Defined in: [vm-handle.ts:319](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L319)
3664
-
3665
3217
  On-disk shape of the bundle's `meta.json`. Read by `restore()`
3666
3218
  to reconstruct the source VM's name when registering the fork.
3667
3219
 
@@ -3671,16 +3223,12 @@ to reconstruct the source VM's name when registering the fork.
3671
3223
 
3672
3224
  > `optional` **sourceName?**: `string`
3673
3225
 
3674
- Defined in: [vm-handle.ts:321](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L321)
3675
-
3676
3226
  Name passed to `boot({ name })` when the source VM was started.
3677
3227
 
3678
3228
  ##### sourceImage?
3679
3229
 
3680
3230
  > `optional` **sourceImage?**: `string`
3681
3231
 
3682
- Defined in: [vm-handle.ts:330](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L330)
3683
-
3684
3232
  Absolute path of the rootfs tarball the source VM was booted with
3685
3233
  (`boot({ image })` or its restored equivalent). `restore()` uses
3686
3234
  this as the default rootfs, so the same-host quickstart works
@@ -3692,16 +3240,12 @@ explicit `image` override.
3692
3240
 
3693
3241
  > **snappedAt**: `number`
3694
3242
 
3695
- Defined in: [vm-handle.ts:332](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L332)
3696
-
3697
3243
  ms epoch when `vm.snapshot()` returned.
3698
3244
 
3699
3245
  ##### mountDisk?
3700
3246
 
3701
3247
  > `optional` **mountDisk?**: `object`
3702
3248
 
3703
- Defined in: [vm-handle.ts:342](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L342)
3704
-
3705
3249
  #272: when the source VM was booted with `mount: { host, guest }`,
3706
3250
  the snapshot bundle includes both halves of the overlay so a
3707
3251
  restore (same- or cross-host) can mount the same overlay without
@@ -3726,8 +3270,6 @@ consulting the host source dir.
3726
3270
 
3727
3271
  > `optional` **liveMounts?**: `object`[]
3728
3272
 
3729
- Defined in: [vm-handle.ts:366](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L366)
3730
-
3731
3273
  #273: live-share FUSE mounts (`liveMounts: [...]` at boot) the
3732
3274
  source VM had at snapshot time. Unlike `mountDisk`, no bytes are
3733
3275
  captured — `host` is the path on the host that was being live-
@@ -3762,8 +3304,6 @@ users remap with the override knob.
3762
3304
 
3763
3305
  ### ForkOptions
3764
3306
 
3765
- Defined in: [vm-handle.ts:384](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L384)
3766
-
3767
3307
  Fork = `vm.snapshot({ leaveRunning: true })` + `restore(...)` rolled
3768
3308
  into one call. The shape mirrors `RestoreOptions` (so anything you
3769
3309
  could pass to `restore()` works on a fork) plus two fork-only knobs:
@@ -3788,8 +3328,6 @@ instead of the boot/restore ones.
3788
3328
 
3789
3329
  > `optional` **outDir?**: `string`
3790
3330
 
3791
- Defined in: [vm-handle.ts:391](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L391)
3792
-
3793
3331
  If set, the snapshot bundle is written here and kept after the
3794
3332
  fork exits — re-restore from this path to spawn another sibling.
3795
3333
  If omitted, the bundle is written to a temp dir and removed
@@ -3799,8 +3337,6 @@ when the fork's VMM exits.
3799
3337
 
3800
3338
  > `optional` **tcpKeep?**: `boolean`
3801
3339
 
3802
- Defined in: [vm-handle.ts:398](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L398)
3803
-
3804
3340
  Default false: omit `--tcp-established` from the dump so the
3805
3341
  fork sees ECONNRESET on sockets the source had open. Set true
3806
3342
  to clone live TCP state into the fork (both VMs then race on
@@ -3810,8 +3346,6 @@ the same connection — only correct in narrow scenarios).
3810
3346
 
3811
3347
  > `optional` **name?**: `string`
3812
3348
 
3813
- Defined in: [vm-handle.ts:403](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L403)
3814
-
3815
3349
  Name for the forked VM. When omitted, restore()'s auto-naming
3816
3350
  kicks in: `<sourceName>/<fork.pid>`.
3817
3351
 
@@ -3823,8 +3357,6 @@ kicks in: `<sourceName>/<fork.pid>`.
3823
3357
 
3824
3358
  > `optional` **portForward?**: `object`[]
3825
3359
 
3826
- Defined in: [vm-handle.ts:409](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L409)
3827
-
3828
3360
  Host→guest port forwards for the fork. NOT inherited from the
3829
3361
  source — host ports are global and source + fork would race on
3830
3362
  the same bind. Pass explicitly when the fork needs forwards.
@@ -3849,8 +3381,6 @@ the same bind. Pass explicitly when the fork needs forwards.
3849
3381
 
3850
3382
  > `optional` **timeoutMs?**: `number`
3851
3383
 
3852
- Defined in: [vm-handle.ts:418](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L418)
3853
-
3854
3384
  Wall-clock ceiling for the restored fork's `wait()`. Defaults to
3855
3385
  `null` (forever) — forks are typically long-lived sibling VMs and
3856
3386
  interactive sessions can sit idle. Set a finite deadline if you
@@ -3866,8 +3396,6 @@ configurable here.
3866
3396
 
3867
3397
  > `optional` **onLog?**: [`OnLog`](#onlog)
3868
3398
 
3869
- Defined in: [vm-handle.ts:423](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L423)
3870
-
3871
3399
  Streaming log callback for the snapshot half. Same shape as
3872
3400
  `vm.snapshot({ onLog })`. Also used by the restore boot.
3873
3401
 
@@ -3879,8 +3407,6 @@ Streaming log callback for the snapshot half. Same shape as
3879
3407
 
3880
3408
  > `optional` **lazy?**: `boolean`
3881
3409
 
3882
- Defined in: [vm-handle.ts:437](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L437)
3883
-
3884
3410
  Opt into lazy-pages restore for the fork — vsock-FUSE-mounted
3885
3411
  bundle + `criu restore --lazy-pages`. Default false: the runtime
3886
3412
  packs the CRIU image into a tar on `/dev/vdb` and the guest does
@@ -3901,8 +3427,6 @@ phase 3); the runtime falls back to eager in that case.
3901
3427
 
3902
3428
  > `optional` **freeMemoryThreshold?**: `number`
3903
3429
 
3904
- Defined in: [vm-handle.ts:453](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm-handle.ts#L453)
3905
-
3906
3430
  Backpressure gate (#274). Fraction of host total memory that must
3907
3431
  be free before `vm.fork()` is allowed to proceed; if `MemAvailable`
3908
3432
  (Linux) / `vm_stat free+speculative+purgeable` (Darwin) drops below
@@ -3921,8 +3445,6 @@ edge).
3921
3445
 
3922
3446
  > `optional` **env?**: `Record`\<`string`, `string`\>
3923
3447
 
3924
- Defined in: [vm/boot.ts:89](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L89)
3925
-
3926
3448
  Env vars exposed to the guest workload. Packed into the synthesized
3927
3449
  `/machinen-config.json`. Distinct from `vmmEnv`, which only affects
3928
3450
  the host-side VMM process.
@@ -3935,8 +3457,6 @@ the host-side VMM process.
3935
3457
 
3936
3458
  > `optional` **guestCwd?**: `string`
3937
3459
 
3938
- Defined in: [vm/boot.ts:101](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L101)
3939
-
3940
3460
  Working directory for the guest cmd. Lands as `cwd` in the
3941
3461
  synthesized `/machinen-config.json`; `/init` calls `chdir()` to
3942
3462
  this path before exec'ing the cmd. Useful with `mount` /
@@ -3955,8 +3475,6 @@ image-baked `cwd` is overridden by this field when both are set.
3955
3475
 
3956
3476
  > `optional` **rootDisk?**: `string` \| `boolean`
3957
3477
 
3958
- Defined in: [vm/boot.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L146)
3959
-
3960
3478
  Boot the guest with the rootfs on a virtio-blk device (`/dev/vda`)
3961
3479
  instead of inflating the whole rootfs into a RAM-backed tmpfs via
3962
3480
  the initramfs. See #114.
@@ -3985,8 +3503,6 @@ running the user cmd. Materialization needs `mke2fs` (or
3985
3503
 
3986
3504
  > `optional` **rootDiskSizeBytes?**: `number`
3987
3505
 
3988
- Defined in: [vm/boot.ts:163](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L163)
3989
-
3990
3506
  Absolute target size (bytes) for the materialized rootdisk image.
3991
3507
  Defaults to `max(2 GiB, treeBytes * 2.5)` — generous enough that
3992
3508
  boot-time `npm install -g <large package>` / `apt install ...`
@@ -4010,8 +3526,6 @@ image is taken as-is) or `rootDisk: false`. See #131.
4010
3526
 
4011
3527
  > `optional` **forkedFrom?**: `string`
4012
3528
 
4013
- Defined in: [vm/boot.ts:176](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L176)
4014
-
4015
3529
  Bookkeeping: absolute path to the snapshot bundle this VM was
4016
3530
  forked from. Set by `restore({ snapDir })`; visible in
4017
3531
  `machinen ls`. Plain `boot()` leaves it undefined.
@@ -4024,8 +3538,6 @@ forked from. Set by `restore({ snapDir })`; visible in
4024
3538
 
4025
3539
  > `optional` **mount?**: `object`
4026
3540
 
4027
- Defined in: [vm/boot.ts:203](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L203)
4028
-
4029
3541
  A single host directory exposed to the guest as a writable
4030
3542
  filesystem rooted under `/mnt/<guest>/`. Guest writes survive
4031
3543
  snapshot/restore but never leak to the host source dir.
@@ -4067,8 +3579,6 @@ relocation; same shape), #272 (this overlay relocation).
4067
3579
 
4068
3580
  > `optional` **mountDiskUpperSizeBytes?**: `number`
4069
3581
 
4070
- Defined in: [vm/boot.ts:213](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L213)
4071
-
4072
3582
  Absolute target size (bytes) for the per-VM ext4 RW upper of
4073
3583
  the `--mount` overlay (#272). Sparse, so unused capacity costs
4074
3584
  nothing on the host disk. Mirrors `rootDiskSizeBytes` (#131) —
@@ -4085,8 +3595,6 @@ Must be a positive multiple of 4096. Default 4 GiB.
4085
3595
 
4086
3596
  > `optional` **liveMounts?**: `object`[]
4087
3597
 
4088
- Defined in: [vm/boot.ts:272](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L272)
4089
-
4090
3598
  Host directories exposed to the guest as live-share FUSE mounts
4091
3599
  (#78). Unlike `mount` (copy-once into the boot rootfs), these stay
4092
3600
  connected to the host: the guest reads on demand via a vsock FUSE
@@ -4147,8 +3655,6 @@ inputs you don't need write-through on.
4147
3655
 
4148
3656
  > `optional` **binary?**: `string`
4149
3657
 
4150
- Defined in: [vm/boot.ts:286](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L286)
4151
-
4152
3658
  Absolute or cwd-relative path to the VMM binary. Optional —
4153
3659
  if omitted, `boot()` resolves it via `resolveVmmBinary()`.
4154
3660
 
@@ -4160,8 +3666,6 @@ if omitted, `boot()` resolves it via `resolveVmmBinary()`.
4160
3666
 
4161
3667
  > `optional` **cwd?**: `string`
4162
3668
 
4163
- Defined in: [vm/boot.ts:288](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L288)
4164
-
4165
3669
  Working directory for the VMM (for finding fixture files).
4166
3670
 
4167
3671
  ###### Inherited from
@@ -4172,8 +3676,6 @@ Working directory for the VMM (for finding fixture files).
4172
3676
 
4173
3677
  > `optional` **args?**: `string`[]
4174
3678
 
4175
- Defined in: [vm/boot.ts:290](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L290)
4176
-
4177
3679
  Extra argv for the VMM.
4178
3680
 
4179
3681
  ###### Inherited from
@@ -4184,8 +3686,6 @@ Extra argv for the VMM.
4184
3686
 
4185
3687
  > `optional` **kernel?**: `string`
4186
3688
 
4187
- Defined in: [vm/boot.ts:292](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L292)
4188
-
4189
3689
  Path to the guest kernel Image. Forwarded as `MACHINEN_KERNEL`.
4190
3690
 
4191
3691
  ###### Inherited from
@@ -4196,8 +3696,6 @@ Path to the guest kernel Image. Forwarded as `MACHINEN_KERNEL`.
4196
3696
 
4197
3697
  > `optional` **dtb?**: `string`
4198
3698
 
4199
- Defined in: [vm/boot.ts:294](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L294)
4200
-
4201
3699
  Path to the guest device-tree blob. Forwarded as `MACHINEN_DTB`.
4202
3700
 
4203
3701
  ###### Inherited from
@@ -4208,8 +3706,6 @@ Path to the guest device-tree blob. Forwarded as `MACHINEN_DTB`.
4208
3706
 
4209
3707
  > `optional` **memory?**: `number`
4210
3708
 
4211
- Defined in: [vm/boot.ts:307](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L307)
4212
-
4213
3709
  Guest RAM ceiling, in MiB (decimal integer; no unit suffixes). The
4214
3710
  VMM reads this as `MACHINEN_MEMORY` (#263 phase A). Defaults to
4215
3711
  `min(host_ram_mib / 2, 16384)` with a floor of 512 — sized for
@@ -4229,8 +3725,6 @@ need to set it.
4229
3725
 
4230
3726
  > `optional` **pdeathsig?**: `boolean`
4231
3727
 
4232
- Defined in: [vm/boot.ts:318](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L318)
4233
-
4234
3728
  Wrap the VMM through the parent-death shim so it dies with this
4235
3729
  runtime process. Default true — the right answer for the common
4236
3730
  "boot, do work, exit" CLI flow.
@@ -4248,8 +3742,6 @@ shim catches the CLI exit and SIGTERMs the fork mid-startup.
4248
3742
 
4249
3743
  > `optional` **vmmEnv?**: `Record`\<`string`, `string`\>
4250
3744
 
4251
- Defined in: [vm/boot.ts:328](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L328)
4252
-
4253
3745
  Env passed to the VMM process on the host side (not exposed to the
4254
3746
  guest workload). Mostly for dev/test flags like `MACHINEN_BOOT_TEST`.
4255
3747
 
@@ -4261,8 +3753,6 @@ guest workload). Mostly for dev/test flags like `MACHINEN_BOOT_TEST`.
4261
3753
 
4262
3754
  > `optional` **detached?**: `boolean`
4263
3755
 
4264
- Defined in: [vm/boot.ts:361](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L361)
4265
-
4266
3756
  Detach the VMM from the runtime parent so the parent can exit
4267
3757
  while the VM keeps running (issue #150 phase 2). When set, `boot()`
4268
3758
  blocks only until the guest produces its first console byte
@@ -4294,8 +3784,6 @@ the registry entry stays live, the vsock UDS is still listening.
4294
3784
 
4295
3785
  > `optional` **image?**: `string`
4296
3786
 
4297
- Defined in: [vm/restore.ts:53](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/restore.ts#L53)
4298
-
4299
3787
  Override the rootfs image used for the restore boot. Defaults
4300
3788
  to whatever caller passes through `image`-equivalent — but
4301
3789
  `restore()` always needs a base rootfs in the initramfs to
@@ -4310,16 +3798,12 @@ release rootfs path here.
4310
3798
 
4311
3799
  ### AttachOptions
4312
3800
 
4313
- Defined in: [vm/attach.ts:18](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/attach.ts#L18)
4314
-
4315
3801
  #### Properties
4316
3802
 
4317
3803
  ##### pid?
4318
3804
 
4319
3805
  > `optional` **pid?**: `number`
4320
3806
 
4321
- Defined in: [vm/attach.ts:24](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/attach.ts#L24)
4322
-
4323
3807
  Look up a VM by the host pid of its VMM process. Kernel-unique
4324
3808
  while alive; mutually exclusive with `name`. Exactly one of
4325
3809
  `pid` / `name` is required.
@@ -4328,16 +3812,12 @@ while alive; mutually exclusive with `name`. Exactly one of
4328
3812
 
4329
3813
  > `optional` **name?**: `string`
4330
3814
 
4331
- Defined in: [vm/attach.ts:26](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/attach.ts#L26)
4332
-
4333
3815
  Look up a VM by the name passed to `boot({ name })`.
4334
3816
 
4335
3817
  ##### onLog?
4336
3818
 
4337
3819
  > `optional` **onLog?**: [`OnLog`](#onlog)
4338
3820
 
4339
- Defined in: [vm/attach.ts:33](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/attach.ts#L33)
4340
-
4341
3821
  Streaming log callback — fires for every byte of output from execs
4342
3822
  made through the returned handle. See #83. Guest kernel console is
4343
3823
  not available on attach handles (it belongs to the process that
@@ -4347,16 +3827,12 @@ called `boot()`), so only `exec-stdout` / `exec-stderr` sources fire.
4347
3827
 
4348
3828
  ### BootOptions
4349
3829
 
4350
- Defined in: [vm/boot.ts:70](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L70)
4351
-
4352
3830
  #### Properties
4353
3831
 
4354
3832
  ##### image?
4355
3833
 
4356
3834
  > `optional` **image?**: `string`
4357
3835
 
4358
- Defined in: [vm/boot.ts:77](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L77)
4359
-
4360
3836
  Path to a rootfs tarball to boot from (e.g. the output of
4361
3837
  `provision()`, or `rootfs-debian-arm64.tar.gz` shipped in releases).
4362
3838
  Paired with `cmd` — both required, or neither (test-mode binary
@@ -4366,8 +3842,6 @@ boots and snapshot-only restores both skip initramfs packing).
4366
3842
 
4367
3843
  > `optional` **cmd?**: `string`[]
4368
3844
 
4369
- Defined in: [vm/boot.ts:83](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L83)
4370
-
4371
3845
  Command to run inside the guest. Packed into the synthesized
4372
3846
  `/machinen-config.json`. Paired with `image` — both required, or
4373
3847
  neither.
@@ -4376,8 +3850,6 @@ neither.
4376
3850
 
4377
3851
  > `optional` **env?**: `Record`\<`string`, `string`\>
4378
3852
 
4379
- Defined in: [vm/boot.ts:89](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L89)
4380
-
4381
3853
  Env vars exposed to the guest workload. Packed into the synthesized
4382
3854
  `/machinen-config.json`. Distinct from `vmmEnv`, which only affects
4383
3855
  the host-side VMM process.
@@ -4386,8 +3858,6 @@ the host-side VMM process.
4386
3858
 
4387
3859
  > `optional` **guestCwd?**: `string`
4388
3860
 
4389
- Defined in: [vm/boot.ts:101](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L101)
4390
-
4391
3861
  Working directory for the guest cmd. Lands as `cwd` in the
4392
3862
  synthesized `/machinen-config.json`; `/init` calls `chdir()` to
4393
3863
  this path before exec'ing the cmd. Useful with `mount` /
@@ -4402,8 +3872,6 @@ image-baked `cwd` is overridden by this field when both are set.
4402
3872
 
4403
3873
  > `optional` **snapshot?**: `string` \| `false`
4404
3874
 
4405
- Defined in: [vm/boot.ts:124](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L124)
4406
-
4407
3875
  Attach a scratch virtio-blk device (`/dev/vdb`, or `/dev/vda` on
4408
3876
  pre-#114 layouts) so this VM can be CRIU-snapshotted later via
4409
3877
  `vm.snapshot()`. Three forms:
@@ -4429,8 +3897,6 @@ pre-#114 layouts) so this VM can be CRIU-snapshotted later via
4429
3897
 
4430
3898
  > `optional` **rootDisk?**: `string` \| `boolean`
4431
3899
 
4432
- Defined in: [vm/boot.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L146)
4433
-
4434
3900
  Boot the guest with the rootfs on a virtio-blk device (`/dev/vda`)
4435
3901
  instead of inflating the whole rootfs into a RAM-backed tmpfs via
4436
3902
  the initramfs. See #114.
@@ -4455,8 +3921,6 @@ running the user cmd. Materialization needs `mke2fs` (or
4455
3921
 
4456
3922
  > `optional` **rootDiskSizeBytes?**: `number`
4457
3923
 
4458
- Defined in: [vm/boot.ts:163](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L163)
4459
-
4460
3924
  Absolute target size (bytes) for the materialized rootdisk image.
4461
3925
  Defaults to `max(2 GiB, treeBytes * 2.5)` — generous enough that
4462
3926
  boot-time `npm install -g <large package>` / `apt install ...`
@@ -4476,8 +3940,6 @@ image is taken as-is) or `rootDisk: false`. See #131.
4476
3940
 
4477
3941
  > `optional` **name?**: `string`
4478
3942
 
4479
- Defined in: [vm/boot.ts:170](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L170)
4480
-
4481
3943
  Optional name to register this VM under (`attach({ name })`
4482
3944
  lookup key). Path-shaped strings ("worker/9012") are allowed.
4483
3945
  Names are unique while live — `boot()` throws
@@ -4487,8 +3949,6 @@ Names are unique while live — `boot()` throws
4487
3949
 
4488
3950
  > `optional` **forkedFrom?**: `string`
4489
3951
 
4490
- Defined in: [vm/boot.ts:176](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L176)
4491
-
4492
3952
  Bookkeeping: absolute path to the snapshot bundle this VM was
4493
3953
  forked from. Set by `restore({ snapDir })`; visible in
4494
3954
  `machinen ls`. Plain `boot()` leaves it undefined.
@@ -4497,8 +3957,6 @@ forked from. Set by `restore({ snapDir })`; visible in
4497
3957
 
4498
3958
  > `optional` **mount?**: `object`
4499
3959
 
4500
- Defined in: [vm/boot.ts:203](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L203)
4501
-
4502
3960
  A single host directory exposed to the guest as a writable
4503
3961
  filesystem rooted under `/mnt/<guest>/`. Guest writes survive
4504
3962
  snapshot/restore but never leak to the host source dir.
@@ -4536,8 +3994,6 @@ relocation; same shape), #272 (this overlay relocation).
4536
3994
 
4537
3995
  > `optional` **mountDiskUpperSizeBytes?**: `number`
4538
3996
 
4539
- Defined in: [vm/boot.ts:213](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L213)
4540
-
4541
3997
  Absolute target size (bytes) for the per-VM ext4 RW upper of
4542
3998
  the `--mount` overlay (#272). Sparse, so unused capacity costs
4543
3999
  nothing on the host disk. Mirrors `rootDiskSizeBytes` (#131) —
@@ -4550,8 +4006,6 @@ Must be a positive multiple of 4096. Default 4 GiB.
4550
4006
 
4551
4007
  > `optional` **liveMounts?**: `object`[]
4552
4008
 
4553
- Defined in: [vm/boot.ts:272](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L272)
4554
-
4555
4009
  Host directories exposed to the guest as live-share FUSE mounts
4556
4010
  (#78). Unlike `mount` (copy-once into the boot rootfs), these stay
4557
4011
  connected to the host: the guest reads on demand via a vsock FUSE
@@ -4608,8 +4062,6 @@ inputs you don't need write-through on.
4608
4062
 
4609
4063
  > `optional` **portForward?**: `object`[]
4610
4064
 
4611
- Defined in: [vm/boot.ts:278](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L278)
4612
-
4613
4065
  Host -> guest TCP port forwards installed via gvproxy's control
4614
4066
  API. Each entry maps `hostPort` on the host (bound to `hostAddr`,
4615
4067
  default `127.0.0.1`) to `guestPort` inside the guest.
@@ -4630,8 +4082,6 @@ default `127.0.0.1`) to `guestPort` inside the guest.
4630
4082
 
4631
4083
  > `optional` **binary?**: `string`
4632
4084
 
4633
- Defined in: [vm/boot.ts:286](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L286)
4634
-
4635
4085
  Absolute or cwd-relative path to the VMM binary. Optional —
4636
4086
  if omitted, `boot()` resolves it via `resolveVmmBinary()`.
4637
4087
 
@@ -4639,40 +4089,30 @@ if omitted, `boot()` resolves it via `resolveVmmBinary()`.
4639
4089
 
4640
4090
  > `optional` **cwd?**: `string`
4641
4091
 
4642
- Defined in: [vm/boot.ts:288](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L288)
4643
-
4644
4092
  Working directory for the VMM (for finding fixture files).
4645
4093
 
4646
4094
  ##### args?
4647
4095
 
4648
4096
  > `optional` **args?**: `string`[]
4649
4097
 
4650
- Defined in: [vm/boot.ts:290](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L290)
4651
-
4652
4098
  Extra argv for the VMM.
4653
4099
 
4654
4100
  ##### kernel?
4655
4101
 
4656
4102
  > `optional` **kernel?**: `string`
4657
4103
 
4658
- Defined in: [vm/boot.ts:292](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L292)
4659
-
4660
4104
  Path to the guest kernel Image. Forwarded as `MACHINEN_KERNEL`.
4661
4105
 
4662
4106
  ##### dtb?
4663
4107
 
4664
4108
  > `optional` **dtb?**: `string`
4665
4109
 
4666
- Defined in: [vm/boot.ts:294](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L294)
4667
-
4668
4110
  Path to the guest device-tree blob. Forwarded as `MACHINEN_DTB`.
4669
4111
 
4670
4112
  ##### memory?
4671
4113
 
4672
4114
  > `optional` **memory?**: `number`
4673
4115
 
4674
- Defined in: [vm/boot.ts:307](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L307)
4675
-
4676
4116
  Guest RAM ceiling, in MiB (decimal integer; no unit suffixes). The
4677
4117
  VMM reads this as `MACHINEN_MEMORY` (#263 phase A). Defaults to
4678
4118
  `min(host_ram_mib / 2, 16384)` with a floor of 512 — sized for
@@ -4688,8 +4128,6 @@ need to set it.
4688
4128
 
4689
4129
  > `optional` **pdeathsig?**: `boolean`
4690
4130
 
4691
- Defined in: [vm/boot.ts:318](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L318)
4692
-
4693
4131
  Wrap the VMM through the parent-death shim so it dies with this
4694
4132
  runtime process. Default true — the right answer for the common
4695
4133
  "boot, do work, exit" CLI flow.
@@ -4703,8 +4141,6 @@ shim catches the CLI exit and SIGTERMs the fork mid-startup.
4703
4141
 
4704
4142
  > `optional` **timeoutMs?**: `number`
4705
4143
 
4706
- Defined in: [vm/boot.ts:323](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L323)
4707
-
4708
4144
  Milliseconds to wait in `wait()` before giving up and rejecting.
4709
4145
  Defaults to 60s. Pass `null` to wait forever.
4710
4146
 
@@ -4712,8 +4148,6 @@ Defaults to 60s. Pass `null` to wait forever.
4712
4148
 
4713
4149
  > `optional` **vmmEnv?**: `Record`\<`string`, `string`\>
4714
4150
 
4715
- Defined in: [vm/boot.ts:328](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L328)
4716
-
4717
4151
  Env passed to the VMM process on the host side (not exposed to the
4718
4152
  guest workload). Mostly for dev/test flags like `MACHINEN_BOOT_TEST`.
4719
4153
 
@@ -4721,8 +4155,6 @@ guest workload). Mostly for dev/test flags like `MACHINEN_BOOT_TEST`.
4721
4155
 
4722
4156
  > `optional` **onLog?**: [`OnLog`](#onlog)
4723
4157
 
4724
- Defined in: [vm/boot.ts:336](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L336)
4725
-
4726
4158
  Streaming log callback — fires for every byte of guest output:
4727
4159
  kernel console (VMM stderr) and every exec invocation made through
4728
4160
  the returned handle. See `LogEvent.source` to tell them apart. See
@@ -4733,8 +4165,6 @@ the returned handle. See `LogEvent.source` to tell them apart. See
4733
4165
 
4734
4166
  > `optional` **detached?**: `boolean`
4735
4167
 
4736
- Defined in: [vm/boot.ts:361](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L361)
4737
-
4738
4168
  Detach the VMM from the runtime parent so the parent can exit
4739
4169
  while the VM keeps running (issue #150 phase 2). When set, `boot()`
4740
4170
  blocks only until the guest produces its first console byte
@@ -4762,8 +4192,6 @@ the registry entry stays live, the vsock UDS is still listening.
4762
4192
 
4763
4193
  ### RestoreOptions
4764
4194
 
4765
- Defined in: [vm/restore.ts:40](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/restore.ts#L40)
4766
-
4767
4195
  #### Extends
4768
4196
 
4769
4197
  - `Omit`\<[`BootOptions`](#bootoptions), `"snapshot"` \| `"image"` \| `"cmd"` \| `"name"`\>
@@ -4774,8 +4202,6 @@ Defined in: [vm/restore.ts:40](https://github.com/redwoodjs/machinen/blob/main/p
4774
4202
 
4775
4203
  > `optional` **env?**: `Record`\<`string`, `string`\>
4776
4204
 
4777
- Defined in: [vm/boot.ts:89](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L89)
4778
-
4779
4205
  Env vars exposed to the guest workload. Packed into the synthesized
4780
4206
  `/machinen-config.json`. Distinct from `vmmEnv`, which only affects
4781
4207
  the host-side VMM process.
@@ -4788,8 +4214,6 @@ the host-side VMM process.
4788
4214
 
4789
4215
  > `optional` **guestCwd?**: `string`
4790
4216
 
4791
- Defined in: [vm/boot.ts:101](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L101)
4792
-
4793
4217
  Working directory for the guest cmd. Lands as `cwd` in the
4794
4218
  synthesized `/machinen-config.json`; `/init` calls `chdir()` to
4795
4219
  this path before exec'ing the cmd. Useful with `mount` /
@@ -4808,8 +4232,6 @@ image-baked `cwd` is overridden by this field when both are set.
4808
4232
 
4809
4233
  > `optional` **rootDisk?**: `string` \| `boolean`
4810
4234
 
4811
- Defined in: [vm/boot.ts:146](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L146)
4812
-
4813
4235
  Boot the guest with the rootfs on a virtio-blk device (`/dev/vda`)
4814
4236
  instead of inflating the whole rootfs into a RAM-backed tmpfs via
4815
4237
  the initramfs. See #114.
@@ -4838,8 +4260,6 @@ running the user cmd. Materialization needs `mke2fs` (or
4838
4260
 
4839
4261
  > `optional` **rootDiskSizeBytes?**: `number`
4840
4262
 
4841
- Defined in: [vm/boot.ts:163](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L163)
4842
-
4843
4263
  Absolute target size (bytes) for the materialized rootdisk image.
4844
4264
  Defaults to `max(2 GiB, treeBytes * 2.5)` — generous enough that
4845
4265
  boot-time `npm install -g <large package>` / `apt install ...`
@@ -4863,8 +4283,6 @@ image is taken as-is) or `rootDisk: false`. See #131.
4863
4283
 
4864
4284
  > `optional` **forkedFrom?**: `string`
4865
4285
 
4866
- Defined in: [vm/boot.ts:176](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L176)
4867
-
4868
4286
  Bookkeeping: absolute path to the snapshot bundle this VM was
4869
4287
  forked from. Set by `restore({ snapDir })`; visible in
4870
4288
  `machinen ls`. Plain `boot()` leaves it undefined.
@@ -4877,8 +4295,6 @@ forked from. Set by `restore({ snapDir })`; visible in
4877
4295
 
4878
4296
  > `optional` **mount?**: `object`
4879
4297
 
4880
- Defined in: [vm/boot.ts:203](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L203)
4881
-
4882
4298
  A single host directory exposed to the guest as a writable
4883
4299
  filesystem rooted under `/mnt/<guest>/`. Guest writes survive
4884
4300
  snapshot/restore but never leak to the host source dir.
@@ -4920,8 +4336,6 @@ relocation; same shape), #272 (this overlay relocation).
4920
4336
 
4921
4337
  > `optional` **mountDiskUpperSizeBytes?**: `number`
4922
4338
 
4923
- Defined in: [vm/boot.ts:213](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L213)
4924
-
4925
4339
  Absolute target size (bytes) for the per-VM ext4 RW upper of
4926
4340
  the `--mount` overlay (#272). Sparse, so unused capacity costs
4927
4341
  nothing on the host disk. Mirrors `rootDiskSizeBytes` (#131) —
@@ -4938,8 +4352,6 @@ Must be a positive multiple of 4096. Default 4 GiB.
4938
4352
 
4939
4353
  > `optional` **liveMounts?**: `object`[]
4940
4354
 
4941
- Defined in: [vm/boot.ts:272](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L272)
4942
-
4943
4355
  Host directories exposed to the guest as live-share FUSE mounts
4944
4356
  (#78). Unlike `mount` (copy-once into the boot rootfs), these stay
4945
4357
  connected to the host: the guest reads on demand via a vsock FUSE
@@ -5000,8 +4412,6 @@ inputs you don't need write-through on.
5000
4412
 
5001
4413
  > `optional` **portForward?**: `object`[]
5002
4414
 
5003
- Defined in: [vm/boot.ts:278](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L278)
5004
-
5005
4415
  Host -> guest TCP port forwards installed via gvproxy's control
5006
4416
  API. Each entry maps `hostPort` on the host (bound to `hostAddr`,
5007
4417
  default `127.0.0.1`) to `guestPort` inside the guest.
@@ -5026,8 +4436,6 @@ default `127.0.0.1`) to `guestPort` inside the guest.
5026
4436
 
5027
4437
  > `optional` **binary?**: `string`
5028
4438
 
5029
- Defined in: [vm/boot.ts:286](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L286)
5030
-
5031
4439
  Absolute or cwd-relative path to the VMM binary. Optional —
5032
4440
  if omitted, `boot()` resolves it via `resolveVmmBinary()`.
5033
4441
 
@@ -5039,8 +4447,6 @@ if omitted, `boot()` resolves it via `resolveVmmBinary()`.
5039
4447
 
5040
4448
  > `optional` **cwd?**: `string`
5041
4449
 
5042
- Defined in: [vm/boot.ts:288](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L288)
5043
-
5044
4450
  Working directory for the VMM (for finding fixture files).
5045
4451
 
5046
4452
  ###### Inherited from
@@ -5051,8 +4457,6 @@ Working directory for the VMM (for finding fixture files).
5051
4457
 
5052
4458
  > `optional` **args?**: `string`[]
5053
4459
 
5054
- Defined in: [vm/boot.ts:290](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L290)
5055
-
5056
4460
  Extra argv for the VMM.
5057
4461
 
5058
4462
  ###### Inherited from
@@ -5063,8 +4467,6 @@ Extra argv for the VMM.
5063
4467
 
5064
4468
  > `optional` **kernel?**: `string`
5065
4469
 
5066
- Defined in: [vm/boot.ts:292](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L292)
5067
-
5068
4470
  Path to the guest kernel Image. Forwarded as `MACHINEN_KERNEL`.
5069
4471
 
5070
4472
  ###### Inherited from
@@ -5075,8 +4477,6 @@ Path to the guest kernel Image. Forwarded as `MACHINEN_KERNEL`.
5075
4477
 
5076
4478
  > `optional` **dtb?**: `string`
5077
4479
 
5078
- Defined in: [vm/boot.ts:294](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L294)
5079
-
5080
4480
  Path to the guest device-tree blob. Forwarded as `MACHINEN_DTB`.
5081
4481
 
5082
4482
  ###### Inherited from
@@ -5087,8 +4487,6 @@ Path to the guest device-tree blob. Forwarded as `MACHINEN_DTB`.
5087
4487
 
5088
4488
  > `optional` **memory?**: `number`
5089
4489
 
5090
- Defined in: [vm/boot.ts:307](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L307)
5091
-
5092
4490
  Guest RAM ceiling, in MiB (decimal integer; no unit suffixes). The
5093
4491
  VMM reads this as `MACHINEN_MEMORY` (#263 phase A). Defaults to
5094
4492
  `min(host_ram_mib / 2, 16384)` with a floor of 512 — sized for
@@ -5108,8 +4506,6 @@ need to set it.
5108
4506
 
5109
4507
  > `optional` **pdeathsig?**: `boolean`
5110
4508
 
5111
- Defined in: [vm/boot.ts:318](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L318)
5112
-
5113
4509
  Wrap the VMM through the parent-death shim so it dies with this
5114
4510
  runtime process. Default true — the right answer for the common
5115
4511
  "boot, do work, exit" CLI flow.
@@ -5127,8 +4523,6 @@ shim catches the CLI exit and SIGTERMs the fork mid-startup.
5127
4523
 
5128
4524
  > `optional` **timeoutMs?**: `number`
5129
4525
 
5130
- Defined in: [vm/boot.ts:323](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L323)
5131
-
5132
4526
  Milliseconds to wait in `wait()` before giving up and rejecting.
5133
4527
  Defaults to 60s. Pass `null` to wait forever.
5134
4528
 
@@ -5140,8 +4534,6 @@ Defaults to 60s. Pass `null` to wait forever.
5140
4534
 
5141
4535
  > `optional` **vmmEnv?**: `Record`\<`string`, `string`\>
5142
4536
 
5143
- Defined in: [vm/boot.ts:328](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L328)
5144
-
5145
4537
  Env passed to the VMM process on the host side (not exposed to the
5146
4538
  guest workload). Mostly for dev/test flags like `MACHINEN_BOOT_TEST`.
5147
4539
 
@@ -5153,8 +4545,6 @@ guest workload). Mostly for dev/test flags like `MACHINEN_BOOT_TEST`.
5153
4545
 
5154
4546
  > `optional` **onLog?**: [`OnLog`](#onlog)
5155
4547
 
5156
- Defined in: [vm/boot.ts:336](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L336)
5157
-
5158
4548
  Streaming log callback — fires for every byte of guest output:
5159
4549
  kernel console (VMM stderr) and every exec invocation made through
5160
4550
  the returned handle. See `LogEvent.source` to tell them apart. See
@@ -5169,8 +4559,6 @@ the returned handle. See `LogEvent.source` to tell them apart. See
5169
4559
 
5170
4560
  > `optional` **detached?**: `boolean`
5171
4561
 
5172
- Defined in: [vm/boot.ts:361](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L361)
5173
-
5174
4562
  Detach the VMM from the runtime parent so the parent can exit
5175
4563
  while the VM keeps running (issue #150 phase 2). When set, `boot()`
5176
4564
  blocks only until the guest produces its first console byte
@@ -5202,8 +4590,6 @@ the registry entry stays live, the vsock UDS is still listening.
5202
4590
 
5203
4591
  > **snapDir**: `string`
5204
4592
 
5205
- Defined in: [vm/restore.ts:45](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/restore.ts#L45)
5206
-
5207
4593
  Snapshot bundle directory produced by `vm.snapshot()`.
5208
4594
  Must contain `img/<crius>` and `meta.json`.
5209
4595
 
@@ -5211,8 +4597,6 @@ Must contain `img/<crius>` and `meta.json`.
5211
4597
 
5212
4598
  > `optional` **image?**: `string`
5213
4599
 
5214
- Defined in: [vm/restore.ts:53](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/restore.ts#L53)
5215
-
5216
4600
  Override the rootfs image used for the restore boot. Defaults
5217
4601
  to whatever caller passes through `image`-equivalent — but
5218
4602
  `restore()` always needs a base rootfs in the initramfs to
@@ -5223,8 +4607,6 @@ release rootfs path here.
5223
4607
 
5224
4608
  > `optional` **name?**: `string`
5225
4609
 
5226
- Defined in: [vm/restore.ts:59](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/restore.ts#L59)
5227
-
5228
4610
  Optional explicit name for the restored VM. When omitted, the
5229
4611
  fork is auto-named `<sourceName>/<pid>` after spawn so it stays
5230
4612
  unique under the source's namespace.
@@ -5233,8 +4615,6 @@ unique under the source's namespace.
5233
4615
 
5234
4616
  > `optional` **lazy?**: `boolean`
5235
4617
 
5236
- Defined in: [vm/restore.ts:75](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/restore.ts#L75)
5237
-
5238
4618
  Opt into lazy-pages restore — bundle is vsock-FUSE-mounted into
5239
4619
  the guest read-only and `criu restore --lazy-pages` faults pages
5240
4620
  on demand (#266). Default false: the runtime packs the CRIU
@@ -5253,24 +4633,18 @@ merge.
5253
4633
 
5254
4634
  ### VsockWinsizeOptions
5255
4635
 
5256
- Defined in: [winsize.ts:30](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/winsize.ts#L30)
5257
-
5258
4636
  #### Properties
5259
4637
 
5260
4638
  ##### timeoutMs?
5261
4639
 
5262
4640
  > `optional` **timeoutMs?**: `number`
5263
4641
 
5264
- Defined in: [winsize.ts:32](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/winsize.ts#L32)
5265
-
5266
4642
  How long to keep retrying the UDS connect. Default 10s.
5267
4643
 
5268
4644
  ##### retryMs?
5269
4645
 
5270
4646
  > `optional` **retryMs?**: `number`
5271
4647
 
5272
- Defined in: [winsize.ts:34](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/winsize.ts#L34)
5273
-
5274
4648
  Poll interval in ms while retrying. Default 250.
5275
4649
 
5276
4650
  ## Type Aliases
@@ -5279,24 +4653,18 @@ Poll interval in ms while retrying. Default 250.
5279
4653
 
5280
4654
  > **ErrorCode** = *typeof* [`ErrorCode`](#errorcode)\[keyof *typeof* [`ErrorCode`](#errorcode)\]
5281
4655
 
5282
- Defined in: [errors.ts:23](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L23)
5283
-
5284
4656
  ***
5285
4657
 
5286
4658
  ### LogEvent
5287
4659
 
5288
4660
  > **LogEvent** = [`ChunkLogEvent`](#chunklogevent) \| [`PhaseLogEvent`](#phaselogevent)
5289
4661
 
5290
- Defined in: [log.ts:43](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/log.ts#L43)
5291
-
5292
4662
  ***
5293
4663
 
5294
4664
  ### OnLog
5295
4665
 
5296
4666
  > **OnLog** = (`evt`) => `void`
5297
4667
 
5298
- Defined in: [log.ts:45](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/log.ts#L45)
5299
-
5300
4668
  #### Parameters
5301
4669
 
5302
4670
  ##### evt
@@ -5313,8 +4681,6 @@ Defined in: [log.ts:45](https://github.com/redwoodjs/machinen/blob/main/packages
5313
4681
 
5314
4682
  > **PidStatus** = `"alive"` \| `"dead"` \| `"recycled"`
5315
4683
 
5316
- Defined in: [pid-validate.ts:44](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pid-validate.ts#L44)
5317
-
5318
4684
  Result of `validatePid` — easy to switch on at the call site.
5319
4685
 
5320
4686
  ***
@@ -5323,8 +4689,6 @@ Result of `validatePid` — easy to switch on at the call site.
5323
4689
 
5324
4690
  > **ImageConfig** = `object`
5325
4691
 
5326
- Defined in: [vm/image-config.ts:19](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/image-config.ts#L19)
5327
-
5328
4692
  Shape of the optional `./machinen-config.json` baked into a rootfs
5329
4693
  tarball by `provision({ cmd, env })`. `boot()` reads it via
5330
4694
  `readImageConfig()` so callers don't need to re-pass `cmd`/`env` on
@@ -5337,36 +4701,26 @@ tarball-producing tool can pre-populate the lookup cache.
5337
4701
 
5338
4702
  > `optional` **cmd?**: `string`[]
5339
4703
 
5340
- Defined in: [vm/image-config.ts:19](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/image-config.ts#L19)
5341
-
5342
4704
  ##### env?
5343
4705
 
5344
4706
  > `optional` **env?**: `Record`\<`string`, `string`\>
5345
4707
 
5346
- Defined in: [vm/image-config.ts:19](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/image-config.ts#L19)
5347
-
5348
4708
  ##### cwd?
5349
4709
 
5350
4710
  > `optional` **cwd?**: `string`
5351
4711
 
5352
- Defined in: [vm/image-config.ts:19](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/image-config.ts#L19)
5353
-
5354
4712
  ## Variables
5355
4713
 
5356
4714
  ### STATS\_FILE\_SIZE
5357
4715
 
5358
4716
  > `const` **STATS\_FILE\_SIZE**: `24` = `24`
5359
4717
 
5360
- Defined in: [balloon-stats.ts:21](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/balloon-stats.ts#L21)
5361
-
5362
4718
  ***
5363
4719
 
5364
4720
  ### ErrorCode
5365
4721
 
5366
4722
  > `const` **ErrorCode**: `object`
5367
4723
 
5368
- Defined in: [errors.ts:23](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L23)
5369
-
5370
4724
  #### Type Declaration
5371
4725
 
5372
4726
  ##### BOOT\_VMM\_MISSING
@@ -5639,8 +4993,6 @@ Defined in: [errors.ts:23](https://github.com/redwoodjs/machinen/blob/main/packa
5639
4993
 
5640
4994
  > `const` **VsockExec**: `object`
5641
4995
 
5642
- Defined in: [exec.ts:62](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/exec.ts#L62)
5643
-
5644
4996
  #### Type Declaration
5645
4997
 
5646
4998
  ##### run()
@@ -5717,8 +5069,6 @@ surfacing — not a transient bring-up race like the `run()` path.
5717
5069
 
5718
5070
  > `const` **VsockFiles**: `object`
5719
5071
 
5720
- Defined in: [files.ts:34](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/files.ts#L34)
5721
-
5722
5072
  #### Type Declaration
5723
5073
 
5724
5074
  ##### push()
@@ -5786,8 +5136,6 @@ Stream a tar of `guestPath` from the guest and untar into
5786
5136
 
5787
5137
  > `const` **DEFAULT\_FREE\_MEMORY\_THRESHOLD**: `0.01` = `0.01`
5788
5138
 
5789
- Defined in: [host-mem.ts:101](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/host-mem.ts#L101)
5790
-
5791
5139
  Default fraction of host memory we require to be free before
5792
5140
  `vm.fork()` is allowed to proceed. The gate exists to keep a
5793
5141
  runaway script from OOM-killing arbitrary host processes — not
@@ -5808,8 +5156,6 @@ loops; anything looser stops being a meaningful gate.
5808
5156
 
5809
5157
  > `const` **VsockSecrets**: `object`
5810
5158
 
5811
- Defined in: [secrets.ts:33](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/secrets.ts#L33)
5812
-
5813
5159
  #### Type Declaration
5814
5160
 
5815
5161
  ##### send()
@@ -5847,8 +5193,6 @@ the guest agent skips entries that don't match.
5847
5193
 
5848
5194
  > `const` **\_internal**: `object`
5849
5195
 
5850
- Defined in: [vm/index.ts:53](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/index.ts#L53)
5851
-
5852
5196
  #### Type Declaration
5853
5197
 
5854
5198
  ##### collect
@@ -5893,8 +5237,6 @@ Defined in: [vm/index.ts:53](https://github.com/redwoodjs/machinen/blob/main/pac
5893
5237
 
5894
5238
  > **readBalloonStats**(`path`): [`BalloonCounters`](#ballooncounters)
5895
5239
 
5896
- Defined in: [balloon-stats.ts:54](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/balloon-stats.ts#L54)
5897
-
5898
5240
  Read the balloon-stats file at `path`. Returns `null` when:
5899
5241
  - the file is missing (VMM was launched without
5900
5242
  `MACHINEN_STATS_FILE`, or the path is stale),
@@ -5919,8 +5261,6 @@ Read the balloon-stats file at `path`. Returns `null` when:
5919
5261
 
5920
5262
  > **detachedLogRoot**(): `string`
5921
5263
 
5922
- Defined in: [detached-log.ts:28](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/detached-log.ts#L28)
5923
-
5924
5264
  Default directory for `<pid>.boot.log` snapshots. Honors
5925
5265
  `MACHINEN_DETACHED_LOG_DIR` so tests can scope writes to a tmpdir
5926
5266
  without scribbling under `$HOME`.
@@ -5935,8 +5275,6 @@ without scribbling under `$HOME`.
5935
5275
 
5936
5276
  > **bootSnapshotPath**(`pid`): `string`
5937
5277
 
5938
- Defined in: [detached-log.ts:33](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/detached-log.ts#L33)
5939
-
5940
5278
  Path the next snapshot for `pid` will be written to.
5941
5279
 
5942
5280
  #### Parameters
@@ -5955,8 +5293,6 @@ Path the next snapshot for `pid` will be written to.
5955
5293
 
5956
5294
  > **writeBootSnapshot**(`path`, `contents`): `boolean`
5957
5295
 
5958
- Defined in: [detached-log.ts:44](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/detached-log.ts#L44)
5959
-
5960
5296
  Atomically write the captured boot console to `path`. Best-effort:
5961
5297
  a failure here must not block the detach — the VMM is already
5962
5298
  running and the boot succeeded, so a missing snapshot is a
@@ -5983,8 +5319,6 @@ success, `false` if the write was skipped or failed.
5983
5319
 
5984
5320
  > **isMachinenError**(`err`, `code?`): `err is MachinenError`
5985
5321
 
5986
- Defined in: [errors.ts:177](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L177)
5987
-
5988
5322
  Narrowing type guard. Pass a specific `code` to check both identity
5989
5323
  and discriminant in one call.
5990
5324
 
@@ -6008,8 +5342,6 @@ and discriminant in one call.
6008
5342
 
6009
5343
  > **formatMachinenError**(`err`): `string`
6010
5344
 
6011
- Defined in: [errors.ts:186](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/errors.ts#L186)
6012
-
6013
5345
  Format a MachinenError for CLI stderr. Shows the code inline and walks
6014
5346
  the `cause` chain. Used by the CLI's unified `handleError`; exported so
6015
5347
  library callers can adopt the same format if they want to.
@@ -6030,8 +5362,6 @@ library callers can adopt the same format if they want to.
6030
5362
 
6031
5363
  > **runGc**(`opts?`): [`GcResult`](#gcresult)[]
6032
5364
 
6033
- Defined in: [gc.ts:52](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/gc.ts#L52)
6034
-
6035
5365
  Walk the registry; for each entry that's dead or pid-recycled,
6036
5366
  remove its cleanupPaths + bootLog + registry entry. Returns one
6037
5367
  result per entry processed (live entries are skipped silently).
@@ -6052,8 +5382,6 @@ result per entry processed (live entries are skipped silently).
6052
5382
 
6053
5383
  > **readHostFreeBytes**(): `Promise`\<`number`\>
6054
5384
 
6055
- Defined in: [host-mem.ts:34](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/host-mem.ts#L34)
6056
-
6057
5385
  Bytes of memory the OS reports as available right now. "Available"
6058
5386
  is the loose union the kernel exposes:
6059
5387
  - Linux → /proc/meminfo MemAvailable (post-3.14 kernels — every
@@ -6077,8 +5405,6 @@ is the loose union the kernel exposes:
6077
5405
 
6078
5406
  > **readHostTotalBytes**(): `number`
6079
5407
 
6080
- Defined in: [host-mem.ts:49](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/host-mem.ts#L49)
6081
-
6082
5408
  Total physical memory in bytes. Thin wrapper over `os.totalmem()`
6083
5409
  exported alongside the free reader so tests and the backpressure
6084
5410
  check pull both numbers from the same module.
@@ -6093,8 +5419,6 @@ check pull both numbers from the same module.
6093
5419
 
6094
5420
  > **checkForkBackpressure**(`opts`): `Promise`\<`void`\>
6095
5421
 
6096
- Defined in: [host-mem.ts:124](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/host-mem.ts#L124)
6097
-
6098
5422
  Refuse a fork when the host is under memory pressure. Throws
6099
5423
  `BootError("FORK_MEMORY_BACKPRESSURE")` when free < total *
6100
5424
  threshold, modeled on the throw-immediately shape of #267's
@@ -6117,8 +5441,6 @@ retry policy.
6117
5441
 
6118
5442
  > **mkinitramfsBundle**(`opts`): `void`
6119
5443
 
6120
- Defined in: [mkinitramfs.ts:365](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L365)
6121
-
6122
5444
  #### Parameters
6123
5445
 
6124
5446
  ##### opts
@@ -6135,8 +5457,6 @@ Defined in: [mkinitramfs.ts:365](https://github.com/redwoodjs/machinen/blob/main
6135
5457
 
6136
5458
  > **mkinitramfsTinyBundle**(`opts`): `void`
6137
5459
 
6138
- Defined in: [mkinitramfs.ts:539](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L539)
6139
-
6140
5460
  Build the tiny initramfs used by every user-facing boot() (#119).
6141
5461
 
6142
5462
  Layout:
@@ -6173,8 +5493,6 @@ straight into /dev/vda without a finit_module pass.
6173
5493
 
6174
5494
  > **mkinitramfsRootfs**(`opts`): `void`
6175
5495
 
6176
- Defined in: [mkinitramfs.ts:568](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L568)
6177
-
6178
5496
  #### Parameters
6179
5497
 
6180
5498
  ##### opts
@@ -6191,8 +5509,6 @@ Defined in: [mkinitramfs.ts:568](https://github.com/redwoodjs/machinen/blob/main
6191
5509
 
6192
5510
  > **mkinitramfsMinimal**(`opts`): `void`
6193
5511
 
6194
- Defined in: [mkinitramfs.ts:588](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L588)
6195
-
6196
5512
  #### Parameters
6197
5513
 
6198
5514
  ##### opts
@@ -6209,8 +5525,6 @@ Defined in: [mkinitramfs.ts:588](https://github.com/redwoodjs/machinen/blob/main
6209
5525
 
6210
5526
  > **mkinitramfsWorkspace**(`opts`): `void`
6211
5527
 
6212
- Defined in: [mkinitramfs.ts:614](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L614)
6213
-
6214
5528
  #### Parameters
6215
5529
 
6216
5530
  ##### opts
@@ -6227,8 +5541,6 @@ Defined in: [mkinitramfs.ts:614](https://github.com/redwoodjs/machinen/blob/main
6227
5541
 
6228
5542
  > **mkinitramfsCli**(`argv`): `void`
6229
5543
 
6230
- Defined in: [mkinitramfs.ts:796](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mkinitramfs.ts#L796)
6231
-
6232
5544
  Invoked by the CLI shim at packages/microvm/test-fixtures/assets/mkinitramfs.ts.
6233
5545
  Kept argv-compatible with the old Python script so shell fixtures
6234
5546
  (smoke.sh, try.sh, handoff.sh) don't need deeper changes.
@@ -6249,8 +5561,6 @@ Kept argv-compatible with the old Python script so shell fixtures
6249
5561
 
6250
5562
  > **mountdiskImgCacheDir**(): `string`
6251
5563
 
6252
- Defined in: [mountdisk-img.ts:78](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L78)
6253
-
6254
5564
  Default cache root: `~/.cache/machinen/mountdisk`.
6255
5565
 
6256
5566
  #### Returns
@@ -6263,8 +5573,6 @@ Default cache root: `~/.cache/machinen/mountdisk`.
6263
5573
 
6264
5574
  > **markMountDiskImageClean**(`imgPath`): `void`
6265
5575
 
6266
- Defined in: [mountdisk-img.ts:94](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L94)
6267
-
6268
5576
  Mark a cached squashfs lower as "cleanly released," same idiom as
6269
5577
  `markRootfsImageClean()`. The lower is read-only inside the guest
6270
5578
  so corruption is unlikely, but a host crash mid-write during the
@@ -6288,8 +5596,6 @@ No-op when the image doesn't exist. Failures are swallowed.
6288
5596
 
6289
5597
  > **ensureMountDiskImage**(`hostAbs`, `opts?`): [`EnsureMountDiskImageResult`](#ensuremountdiskimageresult)
6290
5598
 
6291
- Defined in: [mountdisk-img.ts:165](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L165)
6292
-
6293
5599
  Resolve `hostAbs` to a content-addressed squashfs lower image,
6294
5600
  materializing it on first call. Returns the absolute path to the
6295
5601
  cached `.sqfs`.
@@ -6335,8 +5641,6 @@ BOOT_MOUNTDISK_TOOL_MISSING when no mksquashfs
6335
5641
 
6336
5642
  > **ensureMountDiskUpper**(`opts?`): [`EnsureMountDiskUpperResult`](#ensuremountdiskupperresult)
6337
5643
 
6338
- Defined in: [mountdisk-img.ts:308](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L308)
6339
-
6340
5644
  Materialize a per-VM ext4 RW upper image for the mount overlay.
6341
5645
  Each call returns a fresh sparse file in `tmpdir()` — the upper is
6342
5646
  specific to one VM and gets cleaned up alongside the per-boot
@@ -6370,8 +5674,6 @@ BOOT_MOUNTDISK_TOOL_MISSING when no mke2fs is
6370
5674
 
6371
5675
  > **resolveMksquashfs**(): `string`
6372
5676
 
6373
- Defined in: [mountdisk-img.ts:355](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/mountdisk-img.ts#L355)
6374
-
6375
5677
  Resolve the mksquashfs binary path using the same lookup order as
6376
5678
  `ensureMountDiskImage` itself: env override → bundled package →
6377
5679
  PATH → Homebrew opt prefix. Returns `undefined` when no binary is
@@ -6387,8 +5689,6 @@ available.
6387
5689
 
6388
5690
  > **validatePid**(`pid`, `expected`): [`PidStatus`](#pidstatus)
6389
5691
 
6390
- Defined in: [pid-validate.ts:60](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pid-validate.ts#L60)
6391
-
6392
5692
  Return whether the running process at `pid` is still our VMM.
6393
5693
 
6394
5694
  - `alive` — pid is alive AND the exe + start-time match.
@@ -6428,8 +5728,6 @@ behaviour we had before.
6428
5728
 
6429
5729
  > **readHostRssBytes**(`pid`, `statsPath?`): `number`
6430
5730
 
6431
- Defined in: [proc-rss.ts:47](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/proc-rss.ts#L47)
6432
-
6433
5731
  RSS bytes for one pid, or null if not readable.
6434
5732
 
6435
5733
  #### Parameters
@@ -6452,8 +5750,6 @@ RSS bytes for one pid, or null if not readable.
6452
5750
 
6453
5751
  > **readHostRssBytesMulti**(`targets`): `Map`\<`number`, `number`\>
6454
5752
 
6455
- Defined in: [proc-rss.ts:67](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/proc-rss.ts#L67)
6456
-
6457
5753
  Bulk variant for `machinen ls`: one syscall (Linux) or one
6458
5754
  subprocess (Darwin) for every live VM, instead of N. Pids that
6459
5755
  can't be read are simply absent from the result map — caller
@@ -6475,8 +5771,6 @@ readonly (`number` \| [`RssTarget`](#rsstarget))[]
6475
5771
 
6476
5772
  > **resolveBaseRootfs**(`explicit?`, `cwd?`): `string`
6477
5773
 
6478
- Defined in: [provision.ts:203](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L203)
6479
-
6480
5774
  Resolve the path to the base rootfs tarball, in the same order
6481
5775
  `provision()` itself does:
6482
5776
 
@@ -6516,8 +5810,6 @@ PROVISION_BASE_NOT_FOUND | PROVISION_ASSETS_DIR_INVALID
6516
5810
 
6517
5811
  > **resolveBaseKernel**(`explicit?`, `cwd?`): `string`
6518
5812
 
6519
- Defined in: [provision.ts:226](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L226)
6520
-
6521
5813
  Resolve the path to the guest kernel Image. Same fallback chain as
6522
5814
  `resolveBaseRootfs`: explicit → `MACHINEN_ASSETS_DIR/Image-arm64` →
6523
5815
  `@machinen/cli` cache at `<base>/Image`. Exported for callers that
@@ -6548,8 +5840,6 @@ PROVISION_KERNEL_NOT_FOUND |
6548
5840
 
6549
5841
  > **resolveBaseDtb**(`explicit?`, `cwd?`): `string`
6550
5842
 
6551
- Defined in: [provision.ts:248](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L248)
6552
-
6553
5843
  Resolve the path to the guest DTB. Same fallback chain as
6554
5844
  `resolveBaseRootfs`: explicit → `MACHINEN_ASSETS_DIR/virt-arm64.dtb` →
6555
5845
  `@machinen/cli` cache at `<base>/virt.dtb`.
@@ -6579,8 +5869,6 @@ PROVISION_DTB_NOT_FOUND |
6579
5869
 
6580
5870
  > **provision**(`opts`): `Promise`\<[`ProvisionResult`](#provisionresult)\>
6581
5871
 
6582
- Defined in: [provision.ts:328](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/provision.ts#L328)
6583
-
6584
5872
  Boot the base rootfs, run the user install hook, and freeze the
6585
5873
  resulting filesystem state to a new tarball at `opts.out`.
6586
5874
 
@@ -6611,8 +5899,6 @@ see `boot()` — propagated from the inner boot
6611
5899
 
6612
5900
  > **bootPty**(`opts`): [`PtyVmHandle`](#ptyvmhandle)
6613
5901
 
6614
- Defined in: [pty.ts:125](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/pty.ts#L125)
6615
-
6616
5902
  Fork `binary` under a new pty pair. The returned handle is wire-
6617
5903
  compatible with `VmHandle` from index.ts so the existing Sandboxes
6618
5904
  registry can hold it.
@@ -6633,8 +5919,6 @@ registry can hold it.
6633
5919
 
6634
5920
  > **registryRoot**(): `string`
6635
5921
 
6636
- Defined in: [registry.ts:192](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L192)
6637
-
6638
5922
  Absolute path to the registry root. Honors `MACHINEN_REGISTRY_DIR`
6639
5923
  so tests can point at a scratch dir without stomping on real entries.
6640
5924
 
@@ -6648,8 +5932,6 @@ so tests can point at a scratch dir without stomping on real entries.
6648
5932
 
6649
5933
  > **list**(): [`RegistryEntry`](#registryentry)[]
6650
5934
 
6651
- Defined in: [registry.ts:378](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/registry.ts#L378)
6652
-
6653
5935
  List all registry entries whose pid is still alive. Prunes stale
6654
5936
  entries (pid no longer alive) and orphaned name pins as a side
6655
5937
  effect, so a crashed VMM doesn't leave a stuck record behind.
@@ -6664,8 +5946,6 @@ effect, so a crashed VMM doesn't leave a stuck record behind.
6664
5946
 
6665
5947
  > **rootfsImgCacheDir**(): `string`
6666
5948
 
6667
- Defined in: [rootfs-img.ts:85](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/rootfs-img.ts#L85)
6668
-
6669
5949
  Default cache root: `~/.cache/machinen/rootfs`.
6670
5950
 
6671
5951
  #### Returns
@@ -6678,8 +5958,6 @@ Default cache root: `~/.cache/machinen/rootfs`.
6678
5958
 
6679
5959
  > **markRootfsImageClean**(`imgPath`): `void`
6680
5960
 
6681
- Defined in: [rootfs-img.ts:105](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/rootfs-img.ts#L105)
6682
-
6683
5961
  Mark a cached rootfs image as "cleanly released" by writing the
6684
5962
  sentinel that `ensureRootfsImage()` looks for on the next boot.
6685
5963
  Called by the runtime after a VMM child exits without a signal —
@@ -6707,8 +5985,6 @@ but never wrong.
6707
5985
 
6708
5986
  > **ensureRootfsImage**(`tarPath`, `opts?`): `string`
6709
5987
 
6710
- Defined in: [rootfs-img.ts:204](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/rootfs-img.ts#L204)
6711
-
6712
5988
  Resolve `tarPath` to a cached ext4 `.img`, materializing it on first
6713
5989
  call. Returns the absolute path to the cached image.
6714
5990
 
@@ -6753,8 +6029,6 @@ ROOTFS_IMG_TOOL_MISSING (no e2fsprogs found)
6753
6029
 
6754
6030
  > **resolveMke2fs**(): `string`
6755
6031
 
6756
- Defined in: [rootfs-img.ts:717](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/rootfs-img.ts#L717)
6757
-
6758
6032
  Resolve the mke2fs binary path using the same lookup order as
6759
6033
  `ensureRootfsImage` itself: env override → bundled package → PATH →
6760
6034
  Homebrew keg-only. Returns `undefined` when no binary is available
@@ -6773,8 +6047,6 @@ resolve the binary through the same lookup chain.
6773
6047
 
6774
6048
  > **attach**(`opts`): `Promise`\<[`VmHandle`](#vmhandle)\>
6775
6049
 
6776
- Defined in: [vm/attach.ts:49](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/attach.ts#L49)
6777
-
6778
6050
  Reconnect to a running VM registered by an earlier `boot()` call
6779
6051
  (possibly from a different process). Returns a `VmHandle` that can
6780
6052
  `exec()`, `snapshot()`, and `kill()` the remote VM via the vsock
@@ -6805,8 +6077,6 @@ REGISTRY_VM_NOT_FOUND
6805
6077
 
6806
6078
  > **boot**(`opts?`): `Promise`\<[`VmHandle`](#vmhandle)\>
6807
6079
 
6808
- Defined in: [vm/boot.ts:383](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/boot.ts#L383)
6809
-
6810
6080
  Boot a microVM and return a handle to interact with it.
6811
6081
 
6812
6082
  #### Parameters
@@ -6836,8 +6106,6 @@ BOOT_VMM_MISSING | BOOT_VMM_PACKAGE_BROKEN |
6836
6106
 
6837
6107
  > **measureFirstByte**(`vm`): `Promise`\<`number`\>
6838
6108
 
6839
- Defined in: [vm/fork.ts:138](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/fork.ts#L138)
6840
-
6841
6109
  Time-to-first-output-byte for a boot. Useful for measuring how
6842
6110
  much the snapshot path is (or isn't) buying us.
6843
6111
 
@@ -6857,8 +6125,6 @@ much the snapshot path is (or isn't) buying us.
6857
6125
 
6858
6126
  > **autoSizeMemoryMib**(`hostBytes?`): `number`
6859
6127
 
6860
- Defined in: [vm/helpers.ts:54](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/helpers.ts#L54)
6861
-
6862
6128
  #### Parameters
6863
6129
 
6864
6130
  ##### hostBytes?
@@ -6875,8 +6141,6 @@ Defined in: [vm/helpers.ts:54](https://github.com/redwoodjs/machinen/blob/main/p
6875
6141
 
6876
6142
  > **resolveVmmBinary**(): `string`
6877
6143
 
6878
- Defined in: [vm/helpers.ts:86](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/helpers.ts#L86)
6879
-
6880
6144
  Locate the VMM binary using the same lookup order as `@machinen/cli`:
6881
6145
  1. `MACHINEN_VMM` env var (dev-mode override)
6882
6146
  2. `require.resolve("@machinen/vmm-<arch>-<os>")` → `binary` export
@@ -6897,8 +6161,6 @@ BOOT_VMM_MISSING | BOOT_VMM_PACKAGE_BROKEN
6897
6161
 
6898
6162
  > **buildWriteFileCmd**(`guestPath`, `contents`, `opts?`): `string`
6899
6163
 
6900
- Defined in: [vm/helpers.ts:197](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/helpers.ts#L197)
6901
-
6902
6164
  Build the shell pipeline that `vm.writeFile()` ships through the
6903
6165
  exec-agent. Stays single-line so it works against the legacy EXEC
6904
6166
  opcode too (no need for the EXEC2 multi-line frame, which only newer
@@ -6936,8 +6198,6 @@ Returns a single cmd string. For payloads that would exceed Linux's
6936
6198
 
6937
6199
  > **buildWriteFileCmds**(`guestPath`, `contents`, `opts?`): `string`[]
6938
6200
 
6939
- Defined in: [vm/helpers.ts:239](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/helpers.ts#L239)
6940
-
6941
6201
  Plan the cmd sequence `vm.writeFile()` issues for `contents`.
6942
6202
  Small payloads (base64 ≤ `WRITE_FILE_B64_CHUNK_BYTES`) collapse to a
6943
6203
  single cmd identical to `buildWriteFileCmd`'s output. Larger payloads
@@ -6968,8 +6228,6 @@ end, so no individual cmd line approaches `MAX_ARG_STRLEN`.
6968
6228
 
6969
6229
  > **warmImageConfigCache**(`imagePath`, `config`): `void`
6970
6230
 
6971
- Defined in: [vm/image-config.ts:61](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/image-config.ts#L61)
6972
-
6973
6231
  Pre-populate the image-config cache for a freshly-written tarball.
6974
6232
  Lets `provision()` (and other tarball producers) skip the slow
6975
6233
  `tar -xzOf` lookup that the next `boot()` would otherwise pay —
@@ -7001,8 +6259,6 @@ none was baked).
7001
6259
 
7002
6260
  > **restore**(`opts`): `Promise`\<[`VmHandle`](#vmhandle)\>
7003
6261
 
7004
- Defined in: [vm/restore.ts:112](https://github.com/redwoodjs/machinen/blob/main/packages/runtime/src/vm/restore.ts#L112)
7005
-
7006
6262
  Restore a microVM from a snapshot bundle produced by
7007
6263
  `vm.snapshot({ outDir })`. Reads the bundle's `meta.json` to
7008
6264
  recover the source name, tars the CRIU image directory into a