typescript-virtual-container 1.4.9 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/.vscode/settings.json +1 -1
  2. package/README.md +141 -89
  3. package/builds/fortune-nyx-v1.5.1-directbash-k6.1.0.mjs +1768 -0
  4. package/builds/fortune-nyx-v1.5.1-ssh-nosftp.js +1768 -0
  5. package/builds/fortune-nyx-v1.5.1-ssh.cjs +1769 -0
  6. package/bun.lock +3 -3
  7. package/dist/SSHMimic/exec.js +2 -2
  8. package/dist/SSHMimic/exec.js.map +1 -1
  9. package/dist/SSHMimic/index.d.ts.map +1 -1
  10. package/dist/SSHMimic/index.js +2 -1
  11. package/dist/SSHMimic/index.js.map +1 -1
  12. package/dist/SSHMimic/sftp.d.ts.map +1 -1
  13. package/dist/SSHMimic/sftp.js +4 -3
  14. package/dist/SSHMimic/sftp.js.map +1 -1
  15. package/dist/VirtualFileSystem/index.d.ts +14 -0
  16. package/dist/VirtualFileSystem/index.d.ts.map +1 -1
  17. package/dist/VirtualFileSystem/index.js +51 -3
  18. package/dist/VirtualFileSystem/index.js.map +1 -1
  19. package/dist/VirtualFileSystem/journal.d.ts.map +1 -1
  20. package/dist/VirtualFileSystem/journal.js +13 -5
  21. package/dist/VirtualFileSystem/journal.js.map +1 -1
  22. package/dist/VirtualShell/shell.js +12 -12
  23. package/dist/VirtualShell/shell.js.map +1 -1
  24. package/dist/VirtualUserManager/index.js +8 -11
  25. package/dist/VirtualUserManager/index.js.map +1 -1
  26. package/dist/commands/apt.js +3 -3
  27. package/dist/commands/apt.js.map +1 -1
  28. package/dist/commands/cd.d.ts.map +1 -1
  29. package/dist/commands/cd.js +2 -1
  30. package/dist/commands/cd.js.map +1 -1
  31. package/dist/commands/helpers.d.ts +1 -1
  32. package/dist/commands/helpers.d.ts.map +1 -1
  33. package/dist/commands/helpers.js +3 -2
  34. package/dist/commands/helpers.js.map +1 -1
  35. package/dist/commands/index.d.ts +1 -1
  36. package/dist/commands/index.d.ts.map +1 -1
  37. package/dist/commands/index.js +1 -1
  38. package/dist/commands/index.js.map +1 -1
  39. package/dist/commands/lsb-release.js +1 -1
  40. package/dist/commands/lsb-release.js.map +1 -1
  41. package/dist/commands/runtime.d.ts +2 -0
  42. package/dist/commands/runtime.d.ts.map +1 -1
  43. package/dist/commands/runtime.js +5 -1
  44. package/dist/commands/runtime.js.map +1 -1
  45. package/dist/modules/linuxRootfs.d.ts +9 -5
  46. package/dist/modules/linuxRootfs.d.ts.map +1 -1
  47. package/dist/modules/linuxRootfs.js +1079 -148
  48. package/dist/modules/linuxRootfs.js.map +1 -1
  49. package/dist/self-standalone.js +22 -12
  50. package/dist/self-standalone.js.map +1 -1
  51. package/docs/assets/hierarchy.js +1 -1
  52. package/docs/classes/HoneyPot.html +9 -9
  53. package/docs/classes/IdleManager.html +8 -8
  54. package/docs/classes/SshClient.html +18 -18
  55. package/docs/classes/VirtualFileSystem.html +34 -34
  56. package/docs/classes/VirtualPackageManager.html +13 -13
  57. package/docs/classes/VirtualSftpServer.html +3 -3
  58. package/docs/classes/VirtualShell.html +28 -28
  59. package/docs/classes/VirtualSshServer.html +5 -5
  60. package/docs/classes/VirtualUserManager.html +27 -27
  61. package/docs/functions/assertDiff.html +2 -2
  62. package/docs/functions/diffSnapshots.html +2 -2
  63. package/docs/functions/formatDiff.html +2 -2
  64. package/docs/functions/getArg.html +2 -2
  65. package/docs/functions/getFlag.html +2 -2
  66. package/docs/functions/ifFlag.html +2 -2
  67. package/docs/hierarchy.html +1 -1
  68. package/docs/index.html +37 -31
  69. package/docs/interfaces/AuditLogEntry.html +3 -3
  70. package/docs/interfaces/CommandContext.html +12 -12
  71. package/docs/interfaces/CommandResult.html +13 -13
  72. package/docs/interfaces/ExecStream.html +6 -6
  73. package/docs/interfaces/HoneyPotStats.html +3 -3
  74. package/docs/interfaces/IdleManagerOptions.html +3 -3
  75. package/docs/interfaces/InstalledPackage.html +11 -11
  76. package/docs/interfaces/NanoEditorSession.html +5 -5
  77. package/docs/interfaces/PackageDefinition.html +14 -14
  78. package/docs/interfaces/PackageFile.html +5 -5
  79. package/docs/interfaces/PasswordChallenge.html +9 -9
  80. package/docs/interfaces/RemoveOptions.html +3 -3
  81. package/docs/interfaces/ShellEnv.html +4 -4
  82. package/docs/interfaces/ShellModule.html +8 -8
  83. package/docs/interfaces/ShellProperties.html +5 -5
  84. package/docs/interfaces/ShellStream.html +7 -7
  85. package/docs/interfaces/SudoChallenge.html +9 -9
  86. package/docs/interfaces/VfsBaseNode.html +7 -7
  87. package/docs/interfaces/VfsDiff.html +6 -6
  88. package/docs/interfaces/VfsDiffEntry.html +4 -4
  89. package/docs/interfaces/VfsDiffModified.html +6 -6
  90. package/docs/interfaces/VfsDirectoryNode.html +8 -8
  91. package/docs/interfaces/VfsFileNode.html +9 -9
  92. package/docs/interfaces/VfsOptions.html +6 -6
  93. package/docs/interfaces/VfsSnapshot.html +3 -3
  94. package/docs/interfaces/VfsSnapshotBaseNode.html +4 -4
  95. package/docs/interfaces/VfsSnapshotDirectoryNode.html +5 -5
  96. package/docs/interfaces/VfsSnapshotFileNode.html +6 -6
  97. package/docs/interfaces/VirtualActiveSession.html +7 -7
  98. package/docs/interfaces/VirtualSftpServerOptions.html +3 -3
  99. package/docs/interfaces/VirtualShellVfsLike.html +3 -3
  100. package/docs/interfaces/VirtualShellVfsOptions.html +3 -3
  101. package/docs/interfaces/WriteFileOptions.html +4 -4
  102. package/docs/modules.html +1 -1
  103. package/docs/types/ArgParseOptions.html +3 -3
  104. package/docs/types/CommandMode.html +2 -2
  105. package/docs/types/CommandOutcome.html +2 -2
  106. package/docs/types/IdleState.html +1 -1
  107. package/docs/types/VfsNodeStats.html +2 -2
  108. package/docs/types/VfsNodeType.html +2 -2
  109. package/docs/types/VfsPersistenceMode.html +2 -2
  110. package/docs/types/VfsSnapshotNode.html +2 -2
  111. package/package.json +6 -5
  112. package/scripts/build-all.mjs +198 -0
  113. package/scripts/build-names.mjs +44 -0
  114. package/src/SSHMimic/exec.ts +2 -2
  115. package/src/SSHMimic/index.ts +2 -1
  116. package/src/SSHMimic/sftp.ts +4 -3
  117. package/src/VirtualFileSystem/index.ts +46 -3
  118. package/src/VirtualFileSystem/journal.ts +12 -5
  119. package/src/VirtualShell/shell.ts +12 -12
  120. package/src/VirtualUserManager/index.ts +11 -11
  121. package/src/commands/apt.ts +3 -3
  122. package/src/commands/cd.ts +2 -1
  123. package/src/commands/helpers.ts +3 -2
  124. package/src/commands/index.ts +1 -1
  125. package/src/commands/lsb-release.ts +1 -1
  126. package/src/commands/runtime.ts +6 -1
  127. package/src/modules/linuxRootfs.ts +1293 -207
  128. package/src/self-standalone.ts +26 -12
  129. package/tests/new-features.test.ts +2 -2
  130. package/tests/sftp.test.ts +13 -13
  131. package/builds/self-standalone.js +0 -1299
  132. package/builds/standalone-wo-sftp.js +0 -1300
  133. package/builds/standalone.cjs +0 -1301
  134. /package/builds/{web-full-api.min.js → fortune-nyx-v1.5.1-web-full.min.js} +0 -0
  135. /package/builds/{web.min.js → fortune-nyx-v1.5.1-web.min.js} +0 -0
@@ -8,7 +8,7 @@
8
8
  "**/node_modules": true,
9
9
 
10
10
  ".ssh-mimic": true,
11
- ".vfs": true,
11
+ // ".vfs": true,
12
12
  "builds": true,
13
13
  "docs": true,
14
14
  "examples": true,
package/README.md CHANGED
@@ -54,8 +54,12 @@
54
54
  | Mode | Entry point | Use case |
55
55
  |------|-------------|----------|
56
56
  | **SSH/SFTP server** | `VirtualSshServer` / `VirtualSftpServer` | Honeypots, remote testing, training environments |
57
- | **Web shell** | `builds/web.min.js` / `builds/web-full-api.min.js` (ESM) | Embedded terminals, interactive tutorials, browser demos |
58
- | **Standalone CLI** | `builds/self-standalone.js` (single file) | Local shell, one-liner demos, no install required |
57
+ | **Web shell** | <!-- BUILD:web -->
58
+ `builds/fortune-nyx-v1.5.1-web.min.js` / `builds/fortune-nyx-v1.5.1-web-full.min.js`
59
+ <!-- /BUILD:web --> (ESM) | Embedded terminals, interactive tutorials, browser demos |
60
+ | **Standalone CLI** | <!-- BUILD:selfStandalone -->
61
+ `builds/fortune-nyx-v1.5.1-directbash-k6.1.0.mjs`
62
+ <!-- /BUILD:selfStandalone --> (single file) | Local shell, one-liner demos, no install required |
59
63
 
60
64
  All three modes share the same core: a pure in-memory VFS, a real shell interpreter, a virtual package manager, and a typed programmatic API.
61
65
 
@@ -73,27 +77,31 @@ npm install typescript-virtual-container
73
77
  ### Try instantly (zero install)
74
78
 
75
79
  ```bash
80
+ <!-- BUILD:curl-start -->
76
81
  # Interactive local shell — persists VFS in .vfs/ in the current directory
77
- curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/self-standalone.js -o self-standalone.js && node self-standalone.js && rm -f self-standalone.js
82
+ curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.5.0-directbash-k6.1.0.mjs -o fortune-nyx-directbash.mjs && node fortune-nyx-directbash.mjs && rm -f fortune-nyx-directbash.mjs
78
83
 
79
84
  # SSH server (connect with any SSH client on port 2222)
80
- curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/standalone.js -o standalone.js && node standalone.js && rm -f standalone.js
85
+ curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.5.0-ssh.cjs -o fortune-nyx-ssh.cjs && node fortune-nyx-ssh.cjs && rm -f fortune-nyx-ssh.cjs
81
86
 
82
87
  # SSH server without SFTP (lighter build)
83
- curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/standalone-wo-sftp.js -o standalone.js && node standalone.js && rm -f standalone.js
88
+ curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/fortune-nyx-v1.5.0-ssh-nosftp.js -o fortune-nyx-ssh-nosftp.js && node fortune-nyx-ssh-nosftp.js && rm -f fortune-nyx-ssh-nosftp.js
89
+ <!-- BUILD:curl-end -->
84
90
  ```
85
91
 
86
92
  > [!NOTE]
87
93
  > The standalone builds are intended for quick demos and testing. For production use, it's recommended to install the package and import the relevant classes directly in your codebase for better performance, stability, and security.
88
94
 
89
- **`self-standalone.js` options:**
95
+ <!-- BUILD:selfStandalone-options -->
96
+ **`fortune-nyx-v1.5.1-directbash-k6.1.0.mjs` options:**
90
97
 
91
98
  ```bash
92
- node self-standalone.js # boot as root
93
- node self-standalone.js --user alice # boot as alice (prompts for password if set)
94
- node self-standalone.js --user=alice # same, inline form
95
- SSH_MIMIC_HOSTNAME=my-box node self-standalone.js # custom hostname
99
+ node fortune-nyx-v1.5.1-directbash-k6.1.0.mjs # boot as root
100
+ node fortune-nyx-v1.5.1-directbash-k6.1.0.mjs --user alice # boot as alice (prompts for password if set)
101
+ node fortune-nyx-v1.5.1-directbash-k6.1.0.mjs --user=alice # same, inline form
102
+ SSH_MIMIC_HOSTNAME=my-box node fortune-nyx-v1.5.1-directbash-k6.1.0.mjs # custom hostname
96
103
  ```
104
+ <!-- /BUILD:selfStandalone-options -->
97
105
 
98
106
  The VFS is persisted automatically to `.vfs/vfs-snapshot.vfsb` in the current directory — state survives between runs. Delete `.vfs/` to start fresh.
99
107
 
@@ -115,8 +123,10 @@ Two browser bundles are available:
115
123
 
116
124
  | Bundle | Format | Entry point | Use case |
117
125
  |--------|--------|-------------|----------|
118
- | `builds/web.min.js` | ESM | `createWebShell()` | Embedded terminals, modern bundlers |
119
- | `builds/web-full-api.min.js` | ESM | `createVirtualShellShim()` | Full `VirtualShell`-like API in the browser |
126
+ <!-- BUILD:web-table -->
127
+ | `builds/fortune-nyx-v1.5.1-web.min.js` | ESM | `createWebShell()` | Embedded terminals, modern bundlers |
128
+ | `builds/fortune-nyx-v1.5.1-web-full.min.js` | ESM | `createVirtualShellShim()` | Full `VirtualShell`-like API in the browser |
129
+ <!-- /BUILD:web-table -->
120
130
 
121
131
  Both bundles persist the VFS in **IndexedDB** — state survives page reloads.
122
132
 
@@ -126,11 +136,12 @@ bun run web-full-build # → builds/web-full-api.min.js
126
136
  bun run build-all # rebuild everything
127
137
  ```
128
138
 
129
- **`web.min.js`** — lightweight shell with IndexedDB VFS:
139
+ <!-- BUILD:web-options -->
140
+ **`fortune-nyx-v1.5.1-web.min.js`** — lightweight shell with IndexedDB VFS:
130
141
 
131
142
  ```html
132
143
  <script type="module">
133
- import { createWebShell } from "./builds/web.min.js";
144
+ import { createWebShell } from "./builds/fortune-nyx-v1.5.1-web.min.js";
134
145
 
135
146
  const shell = createWebShell("web-vm", {
136
147
  vfs: { databaseName: "virtual-env-js", storeName: "vfs" },
@@ -142,11 +153,11 @@ bun run build-all # rebuild everything
142
153
  </script>
143
154
  ```
144
155
 
145
- **`web-full-api.min.js`** — mirrors the `VirtualShell` programmatic API:
156
+ **`fortune-nyx-v1.5.1-web-full.min.js`** — mirrors the `VirtualShell` programmatic API:
146
157
 
147
158
  ```html
148
159
  <script type="module">
149
- import { createVirtualShellShim } from "./builds/web-full-api.min.js";
160
+ import { createVirtualShellShim } from "./builds/fortune-nyx-v1.5.1-web-full.min.js";
150
161
 
151
162
  const shell = createVirtualShellShim("web-vm");
152
163
  await shell.ensureInitialized();
@@ -154,6 +165,7 @@ bun run build-all # rebuild everything
154
165
  console.log(shell.getVfs().readFile("/app/file.txt")); // hello
155
166
  </script>
156
167
  ```
168
+ <!-- /BUILD:web-options -->
157
169
 
158
170
  **Run the demo locally:**
159
171
 
@@ -221,6 +233,9 @@ console.log(r.stdout);
221
233
  <details>
222
234
  <summary><strong>API Reference</strong></summary>
223
235
 
236
+ <!-- https://itsrealfortune.fr/typescript-virtual-container/ -->
237
+ API reference for all core classes and utilities. Designed for quick lookup while developing with the library. More extensive documentation, examples, and guides are available in <a href="https://itsrealfortune.fr/typescript-virtual-container/">the documentation</a>.
238
+
224
239
  ### `VirtualSshServer`
225
240
 
226
241
  ```typescript
@@ -1230,104 +1245,120 @@ On every `VirtualShell` init, a realistic Linux hierarchy is bootstrapped idempo
1230
1245
 
1231
1246
  ```
1232
1247
  /
1233
- ├── bin -> usr/bin (symlink, Debian-style)
1234
- ├── sbin -> usr/sbin (symlink, Debian-style)
1235
- ├── lib/ (ELF stub)
1236
- ├── lib/modules/
1237
- ├── lib/x86_64-linux-gnu/
1238
- ├── lib64 -> usr/lib64 (symlink, Debian-style)
1239
- ├── initrd.img -> boot/initrd.img-<kernel>
1240
- ├── initrd.img.old -> boot/initrd.img-<prev>
1241
- ├── vmlinuz -> boot/vmlinuz-<kernel>
1242
- ├── vmlinuz.old -> boot/vmlinuz-<prev>
1243
- ├── lost+found/ (mode 0o700, ext4 fsck dir)
1248
+ ├── bin -> /usr/bin (symlink, Debian-style)
1249
+ ├── sbin -> /usr/sbin (symlink, Debian-style)
1250
+ ├── lib/ (ELF stub)
1251
+ ├── modules/
1252
+ │ └── x86_64-linux-gnu/
1253
+ ├── lib64/
1254
+ │ └── ld-linux-x86-64.so.2 (stub, 0o755)
1255
+ ├── initrd.img -> /boot/initrd.img-<kernel>
1256
+ ├── initrd.img.old -> /boot/initrd.img-<kernel>
1257
+ ├── vmlinuz -> /boot/vmlinuz-<kernel>
1258
+ ├── vmlinuz.old -> /boot/vmlinuz-<kernel>
1259
+ ├── lost+found/ (mode 0o700, ext4 fsck dir)
1244
1260
 
1245
1261
  ├── boot/
1246
1262
  │ ├── grub/
1247
- │ │ └── grub.cfg virtual bootloader config
1248
- │ ├── vmlinuz-<kernel> kernel stub
1249
- │ ├── initrd.img-<kernel> initrd stub
1263
+ │ │ └── grub.cfg virtual bootloader config
1264
+ │ ├── vmlinuz-<kernel> kernel stub
1265
+ │ ├── initrd.img-<kernel> initrd stub
1250
1266
  │ ├── System.map-<kernel>
1251
1267
  │ └── config-<kernel>
1252
1268
 
1253
1269
  ├── dev/
1254
- │ ├── null / zero / full (0o666)
1255
- │ ├── random / urandom (0o444)
1256
- │ ├── mem (0o640)
1270
+ │ ├── null / zero / full (0o666)
1271
+ │ ├── random / urandom (0o444)
1272
+ │ ├── mem (0o640)
1257
1273
  │ ├── console / tty / tty0 / tty1 / ttyS0
1258
- │ ├── sda / sda1 / sda2 block device stubs
1274
+ │ ├── sda / sda1 / sda2 block device stubs
1259
1275
  │ ├── loop0-loop7 + loop-control
1260
1276
  │ ├── stdin / stdout / stderr
1261
1277
  │ ├── pts/
1262
1278
  │ └── shm/
1263
1279
 
1264
1280
  ├── etc/
1265
- │ ├── apt/sources.list + sources.list.d/
1266
- │ ├── cron.d/
1281
+ │ ├── apt/
1282
+ ├── sources.list
1283
+ │ │ ├── sources.list.d/
1284
+ │ │ ├── trusted.gpg.d/
1285
+ │ │ ├── keyrings/
1286
+ │ │ └── apt.conf.d/70debconf
1287
+ │ ├── cron.d/ + cron.daily/ + cron.hourly/ + cron.weekly/ + cron.monthly/
1288
+ │ ├── default/locale
1267
1289
  │ ├── init.d/
1268
- │ ├── ld.so.conf + ld.so.conf.d/x86_64-linux-gnu.conf
1269
- │ ├── network/interfaces lo + eth0 (DHCP)
1270
- │ ├── pam.d/ common-auth|account|password|session + sshd
1290
+ │ ├── ld.so.conf + ld.so.conf.d/x86_64-linux-gnu.conf + fakeroot.conf
1291
+ │ ├── netplan/01-netcfg.yaml
1292
+ │ ├── network/interfaces lo + eth0 (DHCP)
1293
+ │ ├── pam.d/ common-auth|account|password|session · sshd · login · sudo
1271
1294
  │ ├── security/limits.conf + access.conf
1272
- │ ├── sudoers (0o440) + sudoers.d/
1273
- │ ├── systemd/system/
1274
- │ ├── debian_version 12.0
1275
- │ ├── fstab UUID stubs + tmpfs entries
1276
- │ ├── group synced from VirtualUserManager
1295
+ │ ├── sudoers (0o440) + sudoers.d/README
1296
+ │ ├── systemd/system/ + systemd/network/ + systemd/system.conf
1297
+ │ ├── debian_version nyx/stable
1298
+ │ ├── fstab UUID stubs + tmpfs entries
1299
+ │ ├── group synced from VirtualUserManager
1277
1300
  │ ├── hostname
1278
- │ ├── hosts 127.0.0.1 + ::1 + VM hostname
1279
- │ ├── issue login banner
1280
- │ ├── locale.conf LANG=en_US.UTF-8
1281
- │ ├── localtime / timezone UTC
1282
- │ ├── login.defs UID_MIN=1000 SHA512
1283
- │ ├── motd uses ShellProperties
1284
- │ ├── os-release NAME="Fortune GNU/Linux" + ShellProperties
1285
- │ ├── passwd synced from VirtualUserManager
1286
- │ ├── profile PATH + PS1 defaults
1287
- │ ├── resolv.conf 1.1.1.1 + 8.8.8.8
1288
- │ ├── shadow (mode 0o640, fake hashes)
1289
- └── shells /bin/sh /bin/bash /usr/bin/bash
1301
+ │ ├── hosts 127.0.0.1 + ::1 + VM hostname
1302
+ │ ├── issue + issue.net login banner
1303
+ │ ├── locale.conf + locale.gen LANG=en_US.UTF-8
1304
+ │ ├── localtime / timezone UTC
1305
+ │ ├── login.defs UID_MIN=1000 SHA512
1306
+ │ ├── lsb-release Fortune GNU/Linux + ShellProperties
1307
+ │ ├── motd uses ShellProperties
1308
+ │ ├── nsswitch.conf
1309
+ │ ├── os-release NAME="Fortune GNU/Linux" + ShellProperties
1310
+ │ ├── passwd synced from VirtualUserManager
1311
+ │ ├── profile PATH + PS1 defaults
1312
+ ├── resolv.conf 1.1.1.1 + 8.8.8.8
1313
+ │ ├── shadow (mode 0o640, fake hashes)
1314
+ │ └── shells /bin/sh /bin/bash /usr/bin/bash
1290
1315
 
1291
1316
  ├── home/
1317
+ │ └── <user>/
1318
+ │ └── README.txt created on first login
1292
1319
  ├── media/
1293
1320
  ├── mnt/
1294
1321
  ├── opt/
1295
- ├── snap/bin/
1322
+ │ └── rclone/
1296
1323
  ├── srv/
1297
1324
 
1298
- ├── proc/ kernel simulation engine (refreshed on demand)
1299
- │ ├── boot/log + version kernel boot sequence
1325
+ ├── proc/ kernel simulation engine (refreshed on demand)
1326
+ │ ├── boot/log + version kernel boot sequence
1300
1327
  │ ├── net/dev + if_inet6 + tcp + tcp6
1301
- │ ├── sys/kernel/ hostname, ostype, osrelease, pid_max,
1302
- │ │ threads-max, randomize_va_space, dmesg_restrict
1328
+ │ ├── sys/kernel/ hostname, ostype, osrelease, pid_max,
1329
+ │ │ threads-max, randomize_va_space, dmesg_restrict
1303
1330
  │ ├── sys/net/ipv4/ip_forward
1304
1331
  │ ├── sys/vm/swappiness + overcommit_memory
1305
- │ ├── self/mounts mirrors most recent session's /proc/<pid>/
1306
- │ ├── 1/ init (cmdline, comm, stat, status, environ, fd/, fdinfo/)
1307
- │ ├── <pid>/ one subtree per active session (TTY-derived PID)
1308
- │ ├── cmdline kernel boot args
1309
- │ ├── cpuinfo real host CPU passthrough
1332
+ │ ├── self/mounts mirrors most recent session's /proc/<pid>/
1333
+ │ ├── 1/ init (cmdline, comm, stat, status, environ, fd/, fdinfo/)
1334
+ │ ├── <pid>/ one subtree per active session (TTY-derived PID)
1335
+ │ ├── cmdline kernel boot args
1336
+ │ ├── cpuinfo real host CPU passthrough
1310
1337
  │ ├── filesystems
1311
1338
  │ ├── hostname
1312
- │ ├── loadavg computed dynamically
1313
- │ ├── meminfo real host memory (Total/Free/Available/Buffers/Cached/Swap)
1339
+ │ ├── loadavg computed dynamically
1340
+ │ ├── meminfo real host memory (Total/Free/Available/Buffers/Cached/Swap)
1314
1341
  │ ├── mounts
1315
1342
  │ ├── partitions
1316
1343
  │ ├── swaps
1317
- │ ├── uptime computed from shellStartTime
1318
- │ └── version Linux <kernel> (fortune@build)
1344
+ │ ├── uptime computed from shellStartTime
1345
+ │ └── version Linux <kernel> (fortune@build)
1319
1346
 
1320
- ├── root/ (mode 0o700)
1321
- │ ├── .bashrc colored PS1, PATH, ll/la aliases
1347
+ ├── root/ (mode 0o700)
1348
+ │ ├── .ssh/ (mode 0o700)
1349
+ │ ├── .config/pip/pip.conf break-system-packages = true
1350
+ │ ├── .local/share/
1351
+ │ ├── .bash_logout
1352
+ │ ├── .bashrc colored PS1, PATH, ll/la/l aliases
1322
1353
  │ └── .profile
1323
1354
 
1324
- ├── run/ (systemd tmpfs runtime)
1355
+ ├── run/ (systemd tmpfs runtime)
1325
1356
  │ ├── lock/
1326
1357
  │ ├── systemd/
1327
1358
  │ ├── user/
1328
1359
  │ └── utmp
1329
1360
 
1330
- ├── sys/ sysfs graph — deterministic, seeded from hostname (fnv1a)
1361
+ ├── sys/ sysfs graph — deterministic, seeded from hostname (fnv1a)
1331
1362
  │ ├── class/net/
1332
1363
  │ ├── devices/virtual/dmi/id/
1333
1364
  │ │ ├── bios_vendor / bios_version / bios_date
@@ -1341,32 +1372,51 @@ On every `VirtualShell` init, a realistic Linux hierarchy is bootstrapped idempo
1341
1372
  │ ├── osrelease
1342
1373
  │ └── ostype
1343
1374
 
1344
- ├── tmp/ (mode 0o1777, sticky)
1375
+ ├── tmp/ (mode 0o1777, sticky)
1376
+ │ └── node-compile-cache/
1345
1377
 
1346
1378
  ├── usr/
1347
- │ ├── bin/ stubs for all built-in commands (exec builtin <name>)
1379
+ │ ├── bin/ stubs for all built-in commands (exec builtin <name>)
1348
1380
  │ ├── sbin/
1349
- │ ├── lib/ + lib64/
1350
- │ ├── local/bin|lib|share/
1351
- └── share/doc|man/man1/
1381
+ │ ├── lib/
1382
+ ├── x86_64-linux-gnu/
1383
+ │ ├── python3/dist-packages/
1384
+ │ │ ├── python3.12/
1385
+ │ │ └── jvm/java-21-openjdk-amd64/
1386
+ │ ├── local/bin|lib|share|include|sbin/
1387
+ │ └── share/
1388
+ │ ├── doc/
1389
+ │ ├── man/man1|man5|man8/
1390
+ │ ├── ca-certificates/
1391
+ │ ├── common-licenses/
1392
+ │ └── zoneinfo/
1352
1393
 
1353
1394
  └── var/
1354
- ├── cache/apt/archives/
1395
+ ├── cache/
1396
+ │ ├── apt/archives/partial/
1397
+ │ ├── debconf/
1398
+ │ ├── fontconfig/
1399
+ │ ├── ldconfig/
1400
+ │ └── PackageKit/
1355
1401
  ├── lib/
1356
- │ ├── apt/lists/
1402
+ │ ├── apt/lists/partial/
1403
+ │ ├── dpkg/
1404
+ │ │ ├── info/
1405
+ │ │ ├── updates/
1406
+ │ │ ├── alternatives/
1407
+ │ │ ├── available
1408
+ │ │ └── status managed by VirtualPackageManager
1357
1409
  │ ├── misc/
1358
- │ └── dpkg/
1359
- │ ├── available
1360
- │ ├── info/
1361
- │ └── status managed by VirtualPackageManager
1410
+ │ └── systemd/
1362
1411
  ├── log/
1363
1412
  │ ├── apt/history.log + term.log
1364
1413
  │ ├── auth.log
1365
1414
  │ ├── dpkg.log
1415
+ │ ├── journal/
1366
1416
  │ ├── kern.log
1417
+ │ ├── private/
1367
1418
  │ └── syslog
1368
- ├── mail/
1369
- ├── run -> /run (legacy symlink)
1419
+ ├── run -> /run (legacy symlink)
1370
1420
  ├── spool/cron/
1371
1421
  └── tmp/
1372
1422
  ```
@@ -1596,8 +1646,10 @@ Open:
1596
1646
  - [x] `/proc/self` and `/proc/<pid>` per-session entries
1597
1647
  - [x] Snapshot diff tooling — `diffSnapshots`, `formatDiff`, `assertDiff`
1598
1648
  - [x] `node`/`python3`/`npm`/`npx` — package-gated virtual REPL stubs
1599
- - [x] Web shell bundles (`web.min.js`, `web-full-api.min.js`) — fully browser-native with IndexedDB VFS
1600
- - [x] Self-standalone CLI (`self-standalone.js`) — single-file interactive shell, per-user history, tab completion
1649
+ <!-- BUILD:changelog -->
1650
+ - [x] Web shell bundles (`fortune-nyx-v1.5.1-web.min.js`, `fortune-nyx-v1.5.1-web-full.min.js`) — fully browser-native with IndexedDB VFS
1651
+ - [x] Self-standalone CLI (`fortune-nyx-v1.5.1-directbash-k6.1.0.mjs`) — single-file interactive shell, per-user history, tab completion
1652
+ <!-- /BUILD:changelog -->
1601
1653
  - [x] 120+ `man` pages — all built-in commands documented via `man <cmd>`
1602
1654
  - [x] Shared `tokenize.ts` — unified tokenizer for shell parser and runtime (eliminates duplication)
1603
1655
  - [x] `PasswordChallenge` type — generic interactive password flow for `adduser`, `passwd`, `deluser`