typescript-virtual-container 1.4.8 → 1.5.0

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 (173) hide show
  1. package/.vscode/settings.json +1 -1
  2. package/README.md +118 -80
  3. package/builds/self-standalone.mjs +1768 -0
  4. package/builds/standalone-wo-sftp.js +735 -268
  5. package/builds/standalone.cjs +734 -267
  6. package/builds/web-full-api.min.js +0 -1
  7. package/builds/web.min.js +0 -1
  8. package/bun.lock +3 -3
  9. package/dist/Honeypot/index.d.ts +6 -0
  10. package/dist/Honeypot/index.d.ts.map +1 -1
  11. package/dist/Honeypot/index.js +20 -0
  12. package/dist/Honeypot/index.js.map +1 -1
  13. package/dist/SSHMimic/exec.js +2 -2
  14. package/dist/SSHMimic/exec.js.map +1 -1
  15. package/dist/SSHMimic/index.d.ts +6 -5
  16. package/dist/SSHMimic/index.d.ts.map +1 -1
  17. package/dist/SSHMimic/index.js +8 -6
  18. package/dist/SSHMimic/index.js.map +1 -1
  19. package/dist/SSHMimic/sftp.d.ts +1 -0
  20. package/dist/SSHMimic/sftp.d.ts.map +1 -1
  21. package/dist/SSHMimic/sftp.js +4 -3
  22. package/dist/SSHMimic/sftp.js.map +1 -1
  23. package/dist/VirtualFileSystem/index.d.ts +14 -0
  24. package/dist/VirtualFileSystem/index.d.ts.map +1 -1
  25. package/dist/VirtualFileSystem/index.js +51 -3
  26. package/dist/VirtualFileSystem/index.js.map +1 -1
  27. package/dist/VirtualFileSystem/internalTypes.d.ts +4 -0
  28. package/dist/VirtualFileSystem/internalTypes.d.ts.map +1 -1
  29. package/dist/VirtualFileSystem/journal.d.ts +1 -0
  30. package/dist/VirtualFileSystem/journal.d.ts.map +1 -1
  31. package/dist/VirtualFileSystem/journal.js +11 -5
  32. package/dist/VirtualFileSystem/journal.js.map +1 -1
  33. package/dist/VirtualShell/idleManager.d.ts +6 -2
  34. package/dist/VirtualShell/idleManager.d.ts.map +1 -1
  35. package/dist/VirtualShell/idleManager.js +10 -6
  36. package/dist/VirtualShell/idleManager.js.map +1 -1
  37. package/dist/VirtualShell/index.d.ts +13 -1
  38. package/dist/VirtualShell/index.d.ts.map +1 -1
  39. package/dist/VirtualShell/index.js +10 -5
  40. package/dist/VirtualShell/index.js.map +1 -1
  41. package/dist/VirtualShell/shell.js +12 -12
  42. package/dist/VirtualShell/shell.js.map +1 -1
  43. package/dist/VirtualUserManager/index.d.ts +4 -2
  44. package/dist/VirtualUserManager/index.d.ts.map +1 -1
  45. package/dist/VirtualUserManager/index.js +8 -12
  46. package/dist/VirtualUserManager/index.js.map +1 -1
  47. package/dist/commands/apt.js +3 -3
  48. package/dist/commands/apt.js.map +1 -1
  49. package/dist/commands/cd.d.ts.map +1 -1
  50. package/dist/commands/cd.js +2 -1
  51. package/dist/commands/cd.js.map +1 -1
  52. package/dist/commands/command-helpers.d.ts +5 -2
  53. package/dist/commands/command-helpers.d.ts.map +1 -1
  54. package/dist/commands/command-helpers.js.map +1 -1
  55. package/dist/commands/helpers.d.ts +1 -1
  56. package/dist/commands/helpers.d.ts.map +1 -1
  57. package/dist/commands/helpers.js +3 -2
  58. package/dist/commands/helpers.js.map +1 -1
  59. package/dist/commands/index.d.ts +1 -1
  60. package/dist/commands/index.d.ts.map +1 -1
  61. package/dist/commands/index.js +1 -1
  62. package/dist/commands/index.js.map +1 -1
  63. package/dist/commands/lsb-release.js +1 -1
  64. package/dist/commands/lsb-release.js.map +1 -1
  65. package/dist/commands/runtime.d.ts +2 -0
  66. package/dist/commands/runtime.d.ts.map +1 -1
  67. package/dist/commands/runtime.js +5 -1
  68. package/dist/commands/runtime.js.map +1 -1
  69. package/dist/index.d.ts +5 -2
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js.map +1 -1
  72. package/dist/modules/linuxRootfs.d.ts +9 -5
  73. package/dist/modules/linuxRootfs.d.ts.map +1 -1
  74. package/dist/modules/linuxRootfs.js +1079 -148
  75. package/dist/modules/linuxRootfs.js.map +1 -1
  76. package/dist/self-standalone.js +22 -12
  77. package/dist/self-standalone.js.map +1 -1
  78. package/docs/assets/hierarchy.js +1 -1
  79. package/docs/assets/navigation.js +1 -1
  80. package/docs/assets/search.js +1 -1
  81. package/docs/classes/HoneyPot.html +9 -9
  82. package/docs/classes/IdleManager.html +12 -9
  83. package/docs/classes/SshClient.html +18 -18
  84. package/docs/classes/VirtualFileSystem.html +34 -42
  85. package/docs/classes/VirtualPackageManager.html +13 -13
  86. package/docs/classes/VirtualSftpServer.html +3 -3
  87. package/docs/classes/VirtualShell.html +33 -29
  88. package/docs/classes/VirtualSshServer.html +12 -7
  89. package/docs/classes/VirtualUserManager.html +30 -30
  90. package/docs/functions/assertDiff.html +2 -2
  91. package/docs/functions/diffSnapshots.html +2 -2
  92. package/docs/functions/formatDiff.html +2 -2
  93. package/docs/functions/getArg.html +3 -3
  94. package/docs/functions/getFlag.html +2 -2
  95. package/docs/functions/ifFlag.html +2 -2
  96. package/docs/hierarchy.html +1 -1
  97. package/docs/index.html +11 -9
  98. package/docs/interfaces/AuditLogEntry.html +3 -3
  99. package/docs/interfaces/CommandContext.html +13 -13
  100. package/docs/interfaces/CommandResult.html +13 -13
  101. package/docs/interfaces/ExecStream.html +6 -6
  102. package/docs/interfaces/HoneyPotStats.html +5 -3
  103. package/docs/interfaces/IdleManagerOptions.html +3 -3
  104. package/docs/interfaces/InstalledPackage.html +11 -11
  105. package/docs/interfaces/NanoEditorSession.html +5 -5
  106. package/docs/interfaces/PackageDefinition.html +14 -14
  107. package/docs/interfaces/PackageFile.html +5 -5
  108. package/docs/interfaces/PasswordChallenge.html +16 -0
  109. package/docs/interfaces/RemoveOptions.html +3 -3
  110. package/docs/interfaces/ShellEnv.html +4 -4
  111. package/docs/interfaces/ShellModule.html +8 -8
  112. package/docs/interfaces/ShellProperties.html +5 -5
  113. package/docs/interfaces/ShellStream.html +7 -7
  114. package/docs/interfaces/SudoChallenge.html +9 -9
  115. package/docs/interfaces/VfsBaseNode.html +7 -7
  116. package/docs/interfaces/VfsDiff.html +6 -6
  117. package/docs/interfaces/VfsDiffEntry.html +4 -4
  118. package/docs/interfaces/VfsDiffModified.html +6 -6
  119. package/docs/interfaces/VfsDirectoryNode.html +8 -8
  120. package/docs/interfaces/VfsFileNode.html +9 -9
  121. package/docs/interfaces/VfsOptions.html +6 -6
  122. package/docs/interfaces/VfsSnapshot.html +3 -3
  123. package/docs/interfaces/VfsSnapshotBaseNode.html +4 -4
  124. package/docs/interfaces/VfsSnapshotDirectoryNode.html +5 -5
  125. package/docs/interfaces/VfsSnapshotFileNode.html +6 -6
  126. package/docs/interfaces/VirtualActiveSession.html +12 -0
  127. package/docs/interfaces/VirtualSftpServerOptions.html +7 -0
  128. package/docs/interfaces/VirtualShellVfsLike.html +15 -0
  129. package/docs/interfaces/VirtualShellVfsOptions.html +3 -0
  130. package/docs/interfaces/WriteFileOptions.html +4 -4
  131. package/docs/modules.html +1 -1
  132. package/docs/types/ArgParseOptions.html +4 -0
  133. package/docs/types/CommandMode.html +2 -2
  134. package/docs/types/CommandOutcome.html +2 -2
  135. package/docs/types/IdleState.html +1 -1
  136. package/docs/types/VfsNodeStats.html +2 -2
  137. package/docs/types/VfsNodeType.html +2 -2
  138. package/docs/types/VfsPersistenceMode.html +2 -2
  139. package/docs/types/VfsSnapshotNode.html +2 -2
  140. package/examples/web.min.js +0 -1
  141. package/package.json +11 -11
  142. package/scripts/generate-manuals-bundle.mjs +1 -1
  143. package/scripts/publish-package.sh +1 -1
  144. package/src/Honeypot/index.ts +24 -0
  145. package/src/SSHMimic/exec.ts +2 -2
  146. package/src/SSHMimic/index.ts +9 -6
  147. package/src/SSHMimic/sftp.ts +10 -3
  148. package/src/VirtualFileSystem/index.ts +46 -3
  149. package/src/VirtualFileSystem/internalTypes.ts +4 -0
  150. package/src/VirtualFileSystem/journal.ts +11 -5
  151. package/src/VirtualShell/idleManager.ts +10 -6
  152. package/src/VirtualShell/index.ts +18 -3
  153. package/src/VirtualShell/shell.ts +12 -12
  154. package/src/VirtualUserManager/index.ts +15 -13
  155. package/src/commands/apt.ts +3 -3
  156. package/src/commands/cd.ts +2 -1
  157. package/src/commands/command-helpers.ts +5 -1
  158. package/src/commands/helpers.ts +3 -2
  159. package/src/commands/index.ts +1 -1
  160. package/src/commands/lsb-release.ts +1 -1
  161. package/src/commands/runtime.ts +6 -1
  162. package/src/index.ts +5 -1
  163. package/src/modules/linuxRootfs.ts +1293 -207
  164. package/src/self-standalone.ts +26 -12
  165. package/tests/new-features.test.ts +2 -2
  166. package/tests/sftp.test.ts +13 -13
  167. package/typedoc.json +45 -0
  168. package/builds/self-standalone.js +0 -1300
  169. package/builds/self-standalone.js.map +0 -7
  170. package/builds/standalone-wo-sftp.js.map +0 -7
  171. package/builds/standalone.cjs.map +0 -7
  172. package/builds/web-full-api.min.js.map +0 -7
  173. package/builds/web.min.js.map +0 -7
@@ -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
@@ -55,7 +55,7 @@
55
55
  |------|-------------|----------|
56
56
  | **SSH/SFTP server** | `VirtualSshServer` / `VirtualSftpServer` | Honeypots, remote testing, training environments |
57
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 |
58
+ | **Standalone CLI** | `builds/self-standalone.mjs` (single file) | Local shell, one-liner demos, no install required |
59
59
 
60
60
  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
61
 
@@ -74,7 +74,7 @@ npm install typescript-virtual-container
74
74
 
75
75
  ```bash
76
76
  # 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
77
+ curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-container/refs/heads/main/builds/self-standalone.mjs -o self-standalone.mjs && node self-standalone.mjs && rm -f self-standalone.mjs
78
78
 
79
79
  # SSH server (connect with any SSH client on port 2222)
80
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
@@ -86,13 +86,13 @@ curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-cont
86
86
  > [!NOTE]
87
87
  > 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
88
 
89
- **`self-standalone.js` options:**
89
+ **`self-standalone.mjs` options:**
90
90
 
91
91
  ```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
92
+ node self-standalone.mjs # boot as root
93
+ node self-standalone.mjs --user alice # boot as alice (prompts for password if set)
94
+ node self-standalone.mjs --user=alice # same, inline form
95
+ SSH_MIMIC_HOSTNAME=my-box node self-standalone.mjs # custom hostname
96
96
  ```
97
97
 
98
98
  The VFS is persisted automatically to `.vfs/vfs-snapshot.vfsb` in the current directory — state survives between runs. Delete `.vfs/` to start fresh.
@@ -221,6 +221,9 @@ console.log(r.stdout);
221
221
  <details>
222
222
  <summary><strong>API Reference</strong></summary>
223
223
 
224
+ <!-- https://itsrealfortune.fr/typescript-virtual-container/ -->
225
+ 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>.
226
+
224
227
  ### `VirtualSshServer`
225
228
 
226
229
  ```typescript
@@ -1102,7 +1105,7 @@ Type `help` in the shell for a grouped, colorized listing. Type `help <command>`
1102
1105
  | `su [user]` | | Switch user |
1103
1106
  | `sudo <cmd>` | `-i` | Run as root |
1104
1107
 
1105
- **ℹ️ All 91 built-in commands include complete JSDoc documentation** with `@category` and `@params` tags. See [src/commands/](src/commands/) for source code and inline documentation.
1108
+ **ℹ️ All 91 built-in commands include complete JSDoc documentation** with `@category` and `@params` tags. See [src/commands/](https://github.com/itsrealfortune/typescript-virtual-container/tree/main/src/commands) for source code and inline documentation.
1106
1109
 
1107
1110
  Custom commands: `shell.addCommand(name, params, callback)`.
1108
1111
 
@@ -1230,104 +1233,120 @@ On every `VirtualShell` init, a realistic Linux hierarchy is bootstrapped idempo
1230
1233
 
1231
1234
  ```
1232
1235
  /
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)
1236
+ ├── bin -> /usr/bin (symlink, Debian-style)
1237
+ ├── sbin -> /usr/sbin (symlink, Debian-style)
1238
+ ├── lib/ (ELF stub)
1239
+ ├── modules/
1240
+ │ └── x86_64-linux-gnu/
1241
+ ├── lib64/
1242
+ │ └── ld-linux-x86-64.so.2 (stub, 0o755)
1243
+ ├── initrd.img -> /boot/initrd.img-<kernel>
1244
+ ├── initrd.img.old -> /boot/initrd.img-<kernel>
1245
+ ├── vmlinuz -> /boot/vmlinuz-<kernel>
1246
+ ├── vmlinuz.old -> /boot/vmlinuz-<kernel>
1247
+ ├── lost+found/ (mode 0o700, ext4 fsck dir)
1244
1248
 
1245
1249
  ├── boot/
1246
1250
  │ ├── grub/
1247
- │ │ └── grub.cfg virtual bootloader config
1248
- │ ├── vmlinuz-<kernel> kernel stub
1249
- │ ├── initrd.img-<kernel> initrd stub
1251
+ │ │ └── grub.cfg virtual bootloader config
1252
+ │ ├── vmlinuz-<kernel> kernel stub
1253
+ │ ├── initrd.img-<kernel> initrd stub
1250
1254
  │ ├── System.map-<kernel>
1251
1255
  │ └── config-<kernel>
1252
1256
 
1253
1257
  ├── dev/
1254
- │ ├── null / zero / full (0o666)
1255
- │ ├── random / urandom (0o444)
1256
- │ ├── mem (0o640)
1258
+ │ ├── null / zero / full (0o666)
1259
+ │ ├── random / urandom (0o444)
1260
+ │ ├── mem (0o640)
1257
1261
  │ ├── console / tty / tty0 / tty1 / ttyS0
1258
- │ ├── sda / sda1 / sda2 block device stubs
1262
+ │ ├── sda / sda1 / sda2 block device stubs
1259
1263
  │ ├── loop0-loop7 + loop-control
1260
1264
  │ ├── stdin / stdout / stderr
1261
1265
  │ ├── pts/
1262
1266
  │ └── shm/
1263
1267
 
1264
1268
  ├── etc/
1265
- │ ├── apt/sources.list + sources.list.d/
1266
- │ ├── cron.d/
1269
+ │ ├── apt/
1270
+ ├── sources.list
1271
+ │ │ ├── sources.list.d/
1272
+ │ │ ├── trusted.gpg.d/
1273
+ │ │ ├── keyrings/
1274
+ │ │ └── apt.conf.d/70debconf
1275
+ │ ├── cron.d/ + cron.daily/ + cron.hourly/ + cron.weekly/ + cron.monthly/
1276
+ │ ├── default/locale
1267
1277
  │ ├── 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
1278
+ │ ├── ld.so.conf + ld.so.conf.d/x86_64-linux-gnu.conf + fakeroot.conf
1279
+ │ ├── netplan/01-netcfg.yaml
1280
+ │ ├── network/interfaces lo + eth0 (DHCP)
1281
+ │ ├── pam.d/ common-auth|account|password|session · sshd · login · sudo
1271
1282
  │ ├── 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
1283
+ │ ├── sudoers (0o440) + sudoers.d/README
1284
+ │ ├── systemd/system/ + systemd/network/ + systemd/system.conf
1285
+ │ ├── debian_version nyx/stable
1286
+ │ ├── fstab UUID stubs + tmpfs entries
1287
+ │ ├── group synced from VirtualUserManager
1277
1288
  │ ├── 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
1289
+ │ ├── hosts 127.0.0.1 + ::1 + VM hostname
1290
+ │ ├── issue + issue.net login banner
1291
+ │ ├── locale.conf + locale.gen LANG=en_US.UTF-8
1292
+ │ ├── localtime / timezone UTC
1293
+ │ ├── login.defs UID_MIN=1000 SHA512
1294
+ │ ├── lsb-release Fortune GNU/Linux + ShellProperties
1295
+ │ ├── motd uses ShellProperties
1296
+ │ ├── nsswitch.conf
1297
+ │ ├── os-release NAME="Fortune GNU/Linux" + ShellProperties
1298
+ │ ├── passwd synced from VirtualUserManager
1299
+ │ ├── profile PATH + PS1 defaults
1300
+ ├── resolv.conf 1.1.1.1 + 8.8.8.8
1301
+ │ ├── shadow (mode 0o640, fake hashes)
1302
+ │ └── shells /bin/sh /bin/bash /usr/bin/bash
1290
1303
 
1291
1304
  ├── home/
1305
+ │ └── <user>/
1306
+ │ └── README.txt created on first login
1292
1307
  ├── media/
1293
1308
  ├── mnt/
1294
1309
  ├── opt/
1295
- ├── snap/bin/
1310
+ │ └── rclone/
1296
1311
  ├── srv/
1297
1312
 
1298
- ├── proc/ kernel simulation engine (refreshed on demand)
1299
- │ ├── boot/log + version kernel boot sequence
1313
+ ├── proc/ kernel simulation engine (refreshed on demand)
1314
+ │ ├── boot/log + version kernel boot sequence
1300
1315
  │ ├── net/dev + if_inet6 + tcp + tcp6
1301
- │ ├── sys/kernel/ hostname, ostype, osrelease, pid_max,
1302
- │ │ threads-max, randomize_va_space, dmesg_restrict
1316
+ │ ├── sys/kernel/ hostname, ostype, osrelease, pid_max,
1317
+ │ │ threads-max, randomize_va_space, dmesg_restrict
1303
1318
  │ ├── sys/net/ipv4/ip_forward
1304
1319
  │ ├── 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
1320
+ │ ├── self/mounts mirrors most recent session's /proc/<pid>/
1321
+ │ ├── 1/ init (cmdline, comm, stat, status, environ, fd/, fdinfo/)
1322
+ │ ├── <pid>/ one subtree per active session (TTY-derived PID)
1323
+ │ ├── cmdline kernel boot args
1324
+ │ ├── cpuinfo real host CPU passthrough
1310
1325
  │ ├── filesystems
1311
1326
  │ ├── hostname
1312
- │ ├── loadavg computed dynamically
1313
- │ ├── meminfo real host memory (Total/Free/Available/Buffers/Cached/Swap)
1327
+ │ ├── loadavg computed dynamically
1328
+ │ ├── meminfo real host memory (Total/Free/Available/Buffers/Cached/Swap)
1314
1329
  │ ├── mounts
1315
1330
  │ ├── partitions
1316
1331
  │ ├── swaps
1317
- │ ├── uptime computed from shellStartTime
1318
- │ └── version Linux <kernel> (fortune@build)
1332
+ │ ├── uptime computed from shellStartTime
1333
+ │ └── version Linux <kernel> (fortune@build)
1319
1334
 
1320
- ├── root/ (mode 0o700)
1321
- │ ├── .bashrc colored PS1, PATH, ll/la aliases
1335
+ ├── root/ (mode 0o700)
1336
+ │ ├── .ssh/ (mode 0o700)
1337
+ │ ├── .config/pip/pip.conf break-system-packages = true
1338
+ │ ├── .local/share/
1339
+ │ ├── .bash_logout
1340
+ │ ├── .bashrc colored PS1, PATH, ll/la/l aliases
1322
1341
  │ └── .profile
1323
1342
 
1324
- ├── run/ (systemd tmpfs runtime)
1343
+ ├── run/ (systemd tmpfs runtime)
1325
1344
  │ ├── lock/
1326
1345
  │ ├── systemd/
1327
1346
  │ ├── user/
1328
1347
  │ └── utmp
1329
1348
 
1330
- ├── sys/ sysfs graph — deterministic, seeded from hostname (fnv1a)
1349
+ ├── sys/ sysfs graph — deterministic, seeded from hostname (fnv1a)
1331
1350
  │ ├── class/net/
1332
1351
  │ ├── devices/virtual/dmi/id/
1333
1352
  │ │ ├── bios_vendor / bios_version / bios_date
@@ -1341,32 +1360,51 @@ On every `VirtualShell` init, a realistic Linux hierarchy is bootstrapped idempo
1341
1360
  │ ├── osrelease
1342
1361
  │ └── ostype
1343
1362
 
1344
- ├── tmp/ (mode 0o1777, sticky)
1363
+ ├── tmp/ (mode 0o1777, sticky)
1364
+ │ └── node-compile-cache/
1345
1365
 
1346
1366
  ├── usr/
1347
- │ ├── bin/ stubs for all built-in commands (exec builtin <name>)
1367
+ │ ├── bin/ stubs for all built-in commands (exec builtin <name>)
1348
1368
  │ ├── sbin/
1349
- │ ├── lib/ + lib64/
1350
- │ ├── local/bin|lib|share/
1351
- └── share/doc|man/man1/
1369
+ │ ├── lib/
1370
+ ├── x86_64-linux-gnu/
1371
+ │ ├── python3/dist-packages/
1372
+ │ │ ├── python3.12/
1373
+ │ │ └── jvm/java-21-openjdk-amd64/
1374
+ │ ├── local/bin|lib|share|include|sbin/
1375
+ │ └── share/
1376
+ │ ├── doc/
1377
+ │ ├── man/man1|man5|man8/
1378
+ │ ├── ca-certificates/
1379
+ │ ├── common-licenses/
1380
+ │ └── zoneinfo/
1352
1381
 
1353
1382
  └── var/
1354
- ├── cache/apt/archives/
1383
+ ├── cache/
1384
+ │ ├── apt/archives/partial/
1385
+ │ ├── debconf/
1386
+ │ ├── fontconfig/
1387
+ │ ├── ldconfig/
1388
+ │ └── PackageKit/
1355
1389
  ├── lib/
1356
- │ ├── apt/lists/
1390
+ │ ├── apt/lists/partial/
1391
+ │ ├── dpkg/
1392
+ │ │ ├── info/
1393
+ │ │ ├── updates/
1394
+ │ │ ├── alternatives/
1395
+ │ │ ├── available
1396
+ │ │ └── status managed by VirtualPackageManager
1357
1397
  │ ├── misc/
1358
- │ └── dpkg/
1359
- │ ├── available
1360
- │ ├── info/
1361
- │ └── status managed by VirtualPackageManager
1398
+ │ └── systemd/
1362
1399
  ├── log/
1363
1400
  │ ├── apt/history.log + term.log
1364
1401
  │ ├── auth.log
1365
1402
  │ ├── dpkg.log
1403
+ │ ├── journal/
1366
1404
  │ ├── kern.log
1405
+ │ ├── private/
1367
1406
  │ └── syslog
1368
- ├── mail/
1369
- ├── run -> /run (legacy symlink)
1407
+ ├── run -> /run (legacy symlink)
1370
1408
  ├── spool/cron/
1371
1409
  └── tmp/
1372
1410
  ```
@@ -1597,7 +1635,7 @@ Open:
1597
1635
  - [x] Snapshot diff tooling — `diffSnapshots`, `formatDiff`, `assertDiff`
1598
1636
  - [x] `node`/`python3`/`npm`/`npx` — package-gated virtual REPL stubs
1599
1637
  - [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
1638
+ - [x] Self-standalone CLI (`self-standalone.mjs`) — single-file interactive shell, per-user history, tab completion
1601
1639
  - [x] 120+ `man` pages — all built-in commands documented via `man <cmd>`
1602
1640
  - [x] Shared `tokenize.ts` — unified tokenizer for shell parser and runtime (eliminates duplication)
1603
1641
  - [x] `PasswordChallenge` type — generic interactive password flow for `adduser`, `passwd`, `deluser`