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.
- package/.vscode/settings.json +1 -1
- package/README.md +118 -80
- package/builds/self-standalone.mjs +1768 -0
- package/builds/standalone-wo-sftp.js +735 -268
- package/builds/standalone.cjs +734 -267
- package/builds/web-full-api.min.js +0 -1
- package/builds/web.min.js +0 -1
- package/bun.lock +3 -3
- package/dist/Honeypot/index.d.ts +6 -0
- package/dist/Honeypot/index.d.ts.map +1 -1
- package/dist/Honeypot/index.js +20 -0
- package/dist/Honeypot/index.js.map +1 -1
- package/dist/SSHMimic/exec.js +2 -2
- package/dist/SSHMimic/exec.js.map +1 -1
- package/dist/SSHMimic/index.d.ts +6 -5
- package/dist/SSHMimic/index.d.ts.map +1 -1
- package/dist/SSHMimic/index.js +8 -6
- package/dist/SSHMimic/index.js.map +1 -1
- package/dist/SSHMimic/sftp.d.ts +1 -0
- package/dist/SSHMimic/sftp.d.ts.map +1 -1
- package/dist/SSHMimic/sftp.js +4 -3
- package/dist/SSHMimic/sftp.js.map +1 -1
- package/dist/VirtualFileSystem/index.d.ts +14 -0
- package/dist/VirtualFileSystem/index.d.ts.map +1 -1
- package/dist/VirtualFileSystem/index.js +51 -3
- package/dist/VirtualFileSystem/index.js.map +1 -1
- package/dist/VirtualFileSystem/internalTypes.d.ts +4 -0
- package/dist/VirtualFileSystem/internalTypes.d.ts.map +1 -1
- package/dist/VirtualFileSystem/journal.d.ts +1 -0
- package/dist/VirtualFileSystem/journal.d.ts.map +1 -1
- package/dist/VirtualFileSystem/journal.js +11 -5
- package/dist/VirtualFileSystem/journal.js.map +1 -1
- package/dist/VirtualShell/idleManager.d.ts +6 -2
- package/dist/VirtualShell/idleManager.d.ts.map +1 -1
- package/dist/VirtualShell/idleManager.js +10 -6
- package/dist/VirtualShell/idleManager.js.map +1 -1
- package/dist/VirtualShell/index.d.ts +13 -1
- package/dist/VirtualShell/index.d.ts.map +1 -1
- package/dist/VirtualShell/index.js +10 -5
- package/dist/VirtualShell/index.js.map +1 -1
- package/dist/VirtualShell/shell.js +12 -12
- package/dist/VirtualShell/shell.js.map +1 -1
- package/dist/VirtualUserManager/index.d.ts +4 -2
- package/dist/VirtualUserManager/index.d.ts.map +1 -1
- package/dist/VirtualUserManager/index.js +8 -12
- package/dist/VirtualUserManager/index.js.map +1 -1
- package/dist/commands/apt.js +3 -3
- package/dist/commands/apt.js.map +1 -1
- package/dist/commands/cd.d.ts.map +1 -1
- package/dist/commands/cd.js +2 -1
- package/dist/commands/cd.js.map +1 -1
- package/dist/commands/command-helpers.d.ts +5 -2
- package/dist/commands/command-helpers.d.ts.map +1 -1
- package/dist/commands/command-helpers.js.map +1 -1
- package/dist/commands/helpers.d.ts +1 -1
- package/dist/commands/helpers.d.ts.map +1 -1
- package/dist/commands/helpers.js +3 -2
- package/dist/commands/helpers.js.map +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +1 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/lsb-release.js +1 -1
- package/dist/commands/lsb-release.js.map +1 -1
- package/dist/commands/runtime.d.ts +2 -0
- package/dist/commands/runtime.d.ts.map +1 -1
- package/dist/commands/runtime.js +5 -1
- package/dist/commands/runtime.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/linuxRootfs.d.ts +9 -5
- package/dist/modules/linuxRootfs.d.ts.map +1 -1
- package/dist/modules/linuxRootfs.js +1079 -148
- package/dist/modules/linuxRootfs.js.map +1 -1
- package/dist/self-standalone.js +22 -12
- package/dist/self-standalone.js.map +1 -1
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/HoneyPot.html +9 -9
- package/docs/classes/IdleManager.html +12 -9
- package/docs/classes/SshClient.html +18 -18
- package/docs/classes/VirtualFileSystem.html +34 -42
- package/docs/classes/VirtualPackageManager.html +13 -13
- package/docs/classes/VirtualSftpServer.html +3 -3
- package/docs/classes/VirtualShell.html +33 -29
- package/docs/classes/VirtualSshServer.html +12 -7
- package/docs/classes/VirtualUserManager.html +30 -30
- package/docs/functions/assertDiff.html +2 -2
- package/docs/functions/diffSnapshots.html +2 -2
- package/docs/functions/formatDiff.html +2 -2
- package/docs/functions/getArg.html +3 -3
- package/docs/functions/getFlag.html +2 -2
- package/docs/functions/ifFlag.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +11 -9
- package/docs/interfaces/AuditLogEntry.html +3 -3
- package/docs/interfaces/CommandContext.html +13 -13
- package/docs/interfaces/CommandResult.html +13 -13
- package/docs/interfaces/ExecStream.html +6 -6
- package/docs/interfaces/HoneyPotStats.html +5 -3
- package/docs/interfaces/IdleManagerOptions.html +3 -3
- package/docs/interfaces/InstalledPackage.html +11 -11
- package/docs/interfaces/NanoEditorSession.html +5 -5
- package/docs/interfaces/PackageDefinition.html +14 -14
- package/docs/interfaces/PackageFile.html +5 -5
- package/docs/interfaces/PasswordChallenge.html +16 -0
- package/docs/interfaces/RemoveOptions.html +3 -3
- package/docs/interfaces/ShellEnv.html +4 -4
- package/docs/interfaces/ShellModule.html +8 -8
- package/docs/interfaces/ShellProperties.html +5 -5
- package/docs/interfaces/ShellStream.html +7 -7
- package/docs/interfaces/SudoChallenge.html +9 -9
- package/docs/interfaces/VfsBaseNode.html +7 -7
- package/docs/interfaces/VfsDiff.html +6 -6
- package/docs/interfaces/VfsDiffEntry.html +4 -4
- package/docs/interfaces/VfsDiffModified.html +6 -6
- package/docs/interfaces/VfsDirectoryNode.html +8 -8
- package/docs/interfaces/VfsFileNode.html +9 -9
- package/docs/interfaces/VfsOptions.html +6 -6
- package/docs/interfaces/VfsSnapshot.html +3 -3
- package/docs/interfaces/VfsSnapshotBaseNode.html +4 -4
- package/docs/interfaces/VfsSnapshotDirectoryNode.html +5 -5
- package/docs/interfaces/VfsSnapshotFileNode.html +6 -6
- package/docs/interfaces/VirtualActiveSession.html +12 -0
- package/docs/interfaces/VirtualSftpServerOptions.html +7 -0
- package/docs/interfaces/VirtualShellVfsLike.html +15 -0
- package/docs/interfaces/VirtualShellVfsOptions.html +3 -0
- package/docs/interfaces/WriteFileOptions.html +4 -4
- package/docs/modules.html +1 -1
- package/docs/types/ArgParseOptions.html +4 -0
- package/docs/types/CommandMode.html +2 -2
- package/docs/types/CommandOutcome.html +2 -2
- package/docs/types/IdleState.html +1 -1
- package/docs/types/VfsNodeStats.html +2 -2
- package/docs/types/VfsNodeType.html +2 -2
- package/docs/types/VfsPersistenceMode.html +2 -2
- package/docs/types/VfsSnapshotNode.html +2 -2
- package/examples/web.min.js +0 -1
- package/package.json +11 -11
- package/scripts/generate-manuals-bundle.mjs +1 -1
- package/scripts/publish-package.sh +1 -1
- package/src/Honeypot/index.ts +24 -0
- package/src/SSHMimic/exec.ts +2 -2
- package/src/SSHMimic/index.ts +9 -6
- package/src/SSHMimic/sftp.ts +10 -3
- package/src/VirtualFileSystem/index.ts +46 -3
- package/src/VirtualFileSystem/internalTypes.ts +4 -0
- package/src/VirtualFileSystem/journal.ts +11 -5
- package/src/VirtualShell/idleManager.ts +10 -6
- package/src/VirtualShell/index.ts +18 -3
- package/src/VirtualShell/shell.ts +12 -12
- package/src/VirtualUserManager/index.ts +15 -13
- package/src/commands/apt.ts +3 -3
- package/src/commands/cd.ts +2 -1
- package/src/commands/command-helpers.ts +5 -1
- package/src/commands/helpers.ts +3 -2
- package/src/commands/index.ts +1 -1
- package/src/commands/lsb-release.ts +1 -1
- package/src/commands/runtime.ts +6 -1
- package/src/index.ts +5 -1
- package/src/modules/linuxRootfs.ts +1293 -207
- package/src/self-standalone.ts +26 -12
- package/tests/new-features.test.ts +2 -2
- package/tests/sftp.test.ts +13 -13
- package/typedoc.json +45 -0
- package/builds/self-standalone.js +0 -1300
- package/builds/self-standalone.js.map +0 -7
- package/builds/standalone-wo-sftp.js.map +0 -7
- package/builds/standalone.cjs.map +0 -7
- package/builds/web-full-api.min.js.map +0 -7
- package/builds/web.min.js.map +0 -7
package/.vscode/settings.json
CHANGED
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.
|
|
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.
|
|
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.
|
|
89
|
+
**`self-standalone.mjs` options:**
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
|
-
node self-standalone.
|
|
93
|
-
node self-standalone.
|
|
94
|
-
node self-standalone.
|
|
95
|
-
SSH_MIMIC_HOSTNAME=my-box node self-standalone.
|
|
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
|
|
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/
|
|
1236
|
-
├──
|
|
1237
|
-
|
|
1238
|
-
├── lib64
|
|
1239
|
-
|
|
1240
|
-
├── initrd.img
|
|
1241
|
-
├──
|
|
1242
|
-
├── vmlinuz
|
|
1243
|
-
├──
|
|
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
|
|
1248
|
-
│ ├── vmlinuz-<kernel>
|
|
1249
|
-
│ ├── initrd.img-<kernel>
|
|
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
|
|
1255
|
-
│ ├── random / urandom
|
|
1256
|
-
│ ├── mem
|
|
1258
|
+
│ ├── null / zero / full (0o666)
|
|
1259
|
+
│ ├── random / urandom (0o444)
|
|
1260
|
+
│ ├── mem (0o640)
|
|
1257
1261
|
│ ├── console / tty / tty0 / tty1 / ttyS0
|
|
1258
|
-
│ ├── sda / sda1 / sda2
|
|
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/
|
|
1266
|
-
│ ├──
|
|
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
|
-
│ ├──
|
|
1270
|
-
│ ├──
|
|
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
|
|
1275
|
-
│ ├── fstab
|
|
1276
|
-
│ ├── group
|
|
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
|
|
1279
|
-
│ ├── issue
|
|
1280
|
-
│ ├── locale.conf
|
|
1281
|
-
│ ├── localtime / timezone
|
|
1282
|
-
│ ├── login.defs
|
|
1283
|
-
│ ├──
|
|
1284
|
-
│ ├──
|
|
1285
|
-
│ ├──
|
|
1286
|
-
│ ├──
|
|
1287
|
-
│ ├──
|
|
1288
|
-
│ ├──
|
|
1289
|
-
│
|
|
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
|
-
|
|
1310
|
+
│ └── rclone/
|
|
1296
1311
|
├── srv/
|
|
1297
1312
|
│
|
|
1298
|
-
├── proc/
|
|
1299
|
-
│ ├── boot/log + version
|
|
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/
|
|
1302
|
-
│ │
|
|
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
|
|
1306
|
-
│ ├── 1/
|
|
1307
|
-
│ ├── <pid>/
|
|
1308
|
-
│ ├── cmdline
|
|
1309
|
-
│ ├── cpuinfo
|
|
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
|
|
1313
|
-
│ ├── meminfo
|
|
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
|
|
1318
|
-
│ └── version
|
|
1332
|
+
│ ├── uptime computed from shellStartTime
|
|
1333
|
+
│ └── version Linux <kernel> (fortune@build)
|
|
1319
1334
|
│
|
|
1320
|
-
├── root/
|
|
1321
|
-
│ ├── .
|
|
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/
|
|
1343
|
+
├── run/ (systemd tmpfs runtime)
|
|
1325
1344
|
│ ├── lock/
|
|
1326
1345
|
│ ├── systemd/
|
|
1327
1346
|
│ ├── user/
|
|
1328
1347
|
│ └── utmp
|
|
1329
1348
|
│
|
|
1330
|
-
├── sys/
|
|
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/
|
|
1363
|
+
├── tmp/ (mode 0o1777, sticky)
|
|
1364
|
+
│ └── node-compile-cache/
|
|
1345
1365
|
│
|
|
1346
1366
|
├── usr/
|
|
1347
|
-
│ ├── bin/
|
|
1367
|
+
│ ├── bin/ stubs for all built-in commands (exec builtin <name>)
|
|
1348
1368
|
│ ├── sbin/
|
|
1349
|
-
│ ├── lib/
|
|
1350
|
-
│ ├──
|
|
1351
|
-
│
|
|
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/
|
|
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
|
-
│ └──
|
|
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
|
-
├──
|
|
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.
|
|
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`
|