thebird 1.2.112 → 1.2.113
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/AGENTS.md +21 -0
- package/package.json +1 -1
package/AGENTS.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## thebird Virtual Filesystem Architecture
|
|
2
|
+
|
|
3
|
+
### defaults.json as idbSnapshot Seed
|
|
4
|
+
|
|
5
|
+
`defaults.json` is a 46KB single-line JSON blob that seeds `window.__debug.idbSnapshot` — the virtual filesystem visible inside thebird's web-based shell. This is NOT the source for running JavaScript modules. Actual modules (app.js, terminal.js, shell.js, vendor bundles, etc.) load from `docs/*.js` over HTTP via the web server.
|
|
6
|
+
|
|
7
|
+
The virtual FS uses a flat mount object: `{'lib/client.js': {...}, 'sys/node-builtins.js': {...}}` directly, no nested directory tree. WebContainer mounts this structure at shell startup.
|
|
8
|
+
|
|
9
|
+
### System vs User Namespace
|
|
10
|
+
|
|
11
|
+
- **System internals** (85+ files): app.js, terminal.js, shell.js, lib/*, vendor/*, node-builtins.js, builtins, etc. → prefix with `sys/`
|
|
12
|
+
- **User-facing project**: README.md, index.html, style.css, package.json → prefix with `home/`
|
|
13
|
+
- **Shell context**: `ctx.cwd` defaults to `/home` (set in shell.js:27)
|
|
14
|
+
|
|
15
|
+
This convention separates implementation from user project namespace. When adding new system features visible in the virtual FS, use `sys/` prefix. Starter content for users goes under `home/`.
|
|
16
|
+
|
|
17
|
+
### Agent Tool Filtering & Preview Behavior
|
|
18
|
+
|
|
19
|
+
- **agent-chat.js `list_files` tool**: defaults to `prefix='home/'` to show only user project files. Agents can explicitly request `prefix:'sys/'` to access system internals, but the default privacy-filters system away from user view.
|
|
20
|
+
- **Preview pane** (`docs/index.html` `refreshPreview`): prefers `home/index.html` over root `index.html`, ignores all `sys/*.html` files. UX isolation of system from user-visible preview.
|
|
21
|
+
|
package/package.json
CHANGED