thebird 1.2.112 → 1.2.114

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 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/docs/index.html CHANGED
@@ -31,6 +31,7 @@
31
31
  font-family: var(--ff-mono);
32
32
  font-size: 13px;
33
33
  line-height: 1.5;
34
+ height: 100dvh;
34
35
  min-height: 100vh;
35
36
  display: flex;
36
37
  flex-direction: column;
@@ -121,12 +122,24 @@
121
122
  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
122
123
 
123
124
  /* ── page panels ── */
124
- .page-panel { display: none; flex: 1; flex-direction: column; }
125
+ .page-panel { display: none; flex: 1 1 auto; flex-direction: column; min-height: 0; }
125
126
  .page-panel.active { display: flex; }
126
127
 
127
128
  /* ── overview page ── */
128
129
  #page-overview { overflow-y: auto; }
129
130
 
131
+ /* ── live app sizing — flex-fill all the way down ── */
132
+ #page-app .app-embed { flex: 1 1 auto; min-height: 0; }
133
+ #page-app .tui-tabs { flex: 0 0 auto; }
134
+ #page-app #pane-chat,
135
+ #page-app #pane-term,
136
+ #page-app #pane-preview { flex: 1 1 auto; min-height: 0; }
137
+ bird-chat { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; height: 100%; }
138
+ #term-container { width: 100%; height: 100%; min-height: 0; }
139
+ #term-container .xterm,
140
+ #term-container .xterm-viewport,
141
+ #term-container .xterm-screen { width: 100% !important; height: 100% !important; }
142
+
130
143
  /* ── hero ── */
131
144
  .hero {
132
145
  padding: 64px 2ch 48px 2ch;
@@ -677,17 +690,9 @@ function switchPage(p) {
677
690
  document.getElementById('page-' + id).classList.toggle('active', id === p);
678
691
  document.getElementById('ptab-' + id).classList.toggle('active', id === p);
679
692
  });
680
- if (p === 'app') {
681
- document.getElementById('page-app').style.height = (window.innerHeight - 40) + 'px';
682
- }
693
+ if (p === 'app') requestAnimationFrame(() => window.dispatchEvent(new Event('resize')));
683
694
  }
684
695
 
685
- window.addEventListener('resize', () => {
686
- if (document.getElementById('page-app').classList.contains('active')) {
687
- document.getElementById('page-app').style.height = (window.innerHeight - 40) + 'px';
688
- }
689
- });
690
-
691
696
  function copyInstall() {
692
697
  navigator.clipboard?.writeText('npm install acptoapi');
693
698
  const btn = document.querySelector('#install-strip .copy-btn');
@@ -756,6 +761,7 @@ function switchTab(t) {
756
761
  tab.classList.toggle('active', id === t);
757
762
  });
758
763
  if (t === 'preview') refreshPreview();
764
+ if (t === 'term') requestAnimationFrame(() => window.dispatchEvent(new Event('resize')));
759
765
  }
760
766
  window.showPreview = () => switchTab('preview');
761
767
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thebird",
3
- "version": "1.2.112",
3
+ "version": "1.2.114",
4
4
  "description": "Anthropic SDK to Gemini streaming bridge — drop-in proxy that translates Anthropic message format and tool calls to Google Gemini",
5
5
  "scripts": {
6
6
  "start": "node serve.js"