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.
- package/.vscode/settings.json +1 -1
- package/README.md +141 -89
- package/builds/fortune-nyx-v1.5.1-directbash-k6.1.0.mjs +1768 -0
- package/builds/fortune-nyx-v1.5.1-ssh-nosftp.js +1768 -0
- package/builds/fortune-nyx-v1.5.1-ssh.cjs +1769 -0
- package/bun.lock +3 -3
- package/dist/SSHMimic/exec.js +2 -2
- package/dist/SSHMimic/exec.js.map +1 -1
- package/dist/SSHMimic/index.d.ts.map +1 -1
- package/dist/SSHMimic/index.js +2 -1
- package/dist/SSHMimic/index.js.map +1 -1
- 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/journal.d.ts.map +1 -1
- package/dist/VirtualFileSystem/journal.js +13 -5
- package/dist/VirtualFileSystem/journal.js.map +1 -1
- package/dist/VirtualShell/shell.js +12 -12
- package/dist/VirtualShell/shell.js.map +1 -1
- package/dist/VirtualUserManager/index.js +8 -11
- 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/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/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/classes/HoneyPot.html +9 -9
- package/docs/classes/IdleManager.html +8 -8
- package/docs/classes/SshClient.html +18 -18
- package/docs/classes/VirtualFileSystem.html +34 -34
- package/docs/classes/VirtualPackageManager.html +13 -13
- package/docs/classes/VirtualSftpServer.html +3 -3
- package/docs/classes/VirtualShell.html +28 -28
- package/docs/classes/VirtualSshServer.html +5 -5
- package/docs/classes/VirtualUserManager.html +27 -27
- 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 +2 -2
- package/docs/functions/getFlag.html +2 -2
- package/docs/functions/ifFlag.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +37 -31
- package/docs/interfaces/AuditLogEntry.html +3 -3
- package/docs/interfaces/CommandContext.html +12 -12
- package/docs/interfaces/CommandResult.html +13 -13
- package/docs/interfaces/ExecStream.html +6 -6
- package/docs/interfaces/HoneyPotStats.html +3 -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 +9 -9
- 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 +7 -7
- package/docs/interfaces/VirtualSftpServerOptions.html +3 -3
- package/docs/interfaces/VirtualShellVfsLike.html +3 -3
- package/docs/interfaces/VirtualShellVfsOptions.html +3 -3
- package/docs/interfaces/WriteFileOptions.html +4 -4
- package/docs/modules.html +1 -1
- package/docs/types/ArgParseOptions.html +3 -3
- 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/package.json +6 -5
- package/scripts/build-all.mjs +198 -0
- package/scripts/build-names.mjs +44 -0
- package/src/SSHMimic/exec.ts +2 -2
- package/src/SSHMimic/index.ts +2 -1
- package/src/SSHMimic/sftp.ts +4 -3
- package/src/VirtualFileSystem/index.ts +46 -3
- package/src/VirtualFileSystem/journal.ts +12 -5
- package/src/VirtualShell/shell.ts +12 -12
- package/src/VirtualUserManager/index.ts +11 -11
- package/src/commands/apt.ts +3 -3
- package/src/commands/cd.ts +2 -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/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/builds/self-standalone.js +0 -1299
- package/builds/standalone-wo-sftp.js +0 -1300
- package/builds/standalone.cjs +0 -1301
- /package/builds/{web-full-api.min.js → fortune-nyx-v1.5.1-web-full.min.js} +0 -0
- /package/builds/{web.min.js → fortune-nyx-v1.5.1-web.min.js} +0 -0
package/.vscode/settings.json
CHANGED
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** |
|
|
58
|
-
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
-
|
|
95
|
+
<!-- BUILD:selfStandalone-options -->
|
|
96
|
+
**`fortune-nyx-v1.5.1-directbash-k6.1.0.mjs` options:**
|
|
90
97
|
|
|
91
98
|
```bash
|
|
92
|
-
node
|
|
93
|
-
node
|
|
94
|
-
node
|
|
95
|
-
SSH_MIMIC_HOSTNAME=my-box node
|
|
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
|
-
|
|
119
|
-
| `builds/
|
|
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
|
-
|
|
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
|
|
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
|
|
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/
|
|
1236
|
-
├──
|
|
1237
|
-
|
|
1238
|
-
├── lib64
|
|
1239
|
-
|
|
1240
|
-
├── initrd.img
|
|
1241
|
-
├──
|
|
1242
|
-
├── vmlinuz
|
|
1243
|
-
├──
|
|
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
|
|
1248
|
-
│ ├── vmlinuz-<kernel>
|
|
1249
|
-
│ ├── initrd.img-<kernel>
|
|
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
|
|
1255
|
-
│ ├── random / urandom
|
|
1256
|
-
│ ├── mem
|
|
1270
|
+
│ ├── null / zero / full (0o666)
|
|
1271
|
+
│ ├── random / urandom (0o444)
|
|
1272
|
+
│ ├── mem (0o640)
|
|
1257
1273
|
│ ├── console / tty / tty0 / tty1 / ttyS0
|
|
1258
|
-
│ ├── sda / sda1 / sda2
|
|
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/
|
|
1266
|
-
│ ├──
|
|
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
|
-
│ ├──
|
|
1270
|
-
│ ├──
|
|
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
|
|
1275
|
-
│ ├── fstab
|
|
1276
|
-
│ ├── group
|
|
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
|
|
1279
|
-
│ ├── issue
|
|
1280
|
-
│ ├── locale.conf
|
|
1281
|
-
│ ├── localtime / timezone
|
|
1282
|
-
│ ├── login.defs
|
|
1283
|
-
│ ├──
|
|
1284
|
-
│ ├──
|
|
1285
|
-
│ ├──
|
|
1286
|
-
│ ├──
|
|
1287
|
-
│ ├──
|
|
1288
|
-
│ ├──
|
|
1289
|
-
│
|
|
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
|
-
|
|
1322
|
+
│ └── rclone/
|
|
1296
1323
|
├── srv/
|
|
1297
1324
|
│
|
|
1298
|
-
├── proc/
|
|
1299
|
-
│ ├── boot/log + version
|
|
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/
|
|
1302
|
-
│ │
|
|
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
|
|
1306
|
-
│ ├── 1/
|
|
1307
|
-
│ ├── <pid>/
|
|
1308
|
-
│ ├── cmdline
|
|
1309
|
-
│ ├── cpuinfo
|
|
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
|
|
1313
|
-
│ ├── meminfo
|
|
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
|
|
1318
|
-
│ └── version
|
|
1344
|
+
│ ├── uptime computed from shellStartTime
|
|
1345
|
+
│ └── version Linux <kernel> (fortune@build)
|
|
1319
1346
|
│
|
|
1320
|
-
├── root/
|
|
1321
|
-
│ ├── .
|
|
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/
|
|
1355
|
+
├── run/ (systemd tmpfs runtime)
|
|
1325
1356
|
│ ├── lock/
|
|
1326
1357
|
│ ├── systemd/
|
|
1327
1358
|
│ ├── user/
|
|
1328
1359
|
│ └── utmp
|
|
1329
1360
|
│
|
|
1330
|
-
├── sys/
|
|
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/
|
|
1375
|
+
├── tmp/ (mode 0o1777, sticky)
|
|
1376
|
+
│ └── node-compile-cache/
|
|
1345
1377
|
│
|
|
1346
1378
|
├── usr/
|
|
1347
|
-
│ ├── bin/
|
|
1379
|
+
│ ├── bin/ stubs for all built-in commands (exec builtin <name>)
|
|
1348
1380
|
│ ├── sbin/
|
|
1349
|
-
│ ├── lib/
|
|
1350
|
-
│ ├──
|
|
1351
|
-
│
|
|
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/
|
|
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
|
-
│ └──
|
|
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
|
-
├──
|
|
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
|
-
|
|
1600
|
-
- [x]
|
|
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`
|