thebird 1.2.91 → 1.2.92

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 (2) hide show
  1. package/CLAUDE.md +18 -0
  2. package/package.json +1 -1
package/CLAUDE.md CHANGED
@@ -171,6 +171,24 @@ Run examples against real Gemini API to validate message translation.
171
171
  - `stripUnsupported(params, caps)` — removes unsupported features, returns warnings
172
172
  - Defaults: streaming, toolUse, vision, systemMessage = true; jsonMode = false
173
173
 
174
+ ## Chat Observability (docs/)
175
+
176
+ `docs/kilo-http-stream.js` emits rich events via `PART_HANDLERS` dispatch table (kilo HTTP + opencode SSE unified):
177
+ - `status` — lifecycle (connecting, session id, POST status, mirror step)
178
+ - `model-info` — { providerID, modelID } actually routed to (may differ from requested when gm agent plugin hijacks)
179
+ - `text-delta` / `reasoning-delta` — accumulating growth
180
+ - `tool-event` — { toolName, status, input, output, error, id } from `part.type === 'tool'` state
181
+ - `file-event` / `file-mirrored` — agent file writes / sandbox mirror results
182
+ - `step-start` / `step-finish` — { id, tokens?, cost? } boundaries
183
+ - `unknown-part` — diagnostic for unhandled part.type
184
+
185
+ `window.__debug.agent` permanent registry (populated by `agent-chat.js`):
186
+ `{ provider, model, modelActual, providerActual, active, startedAt, finishedAt, durationMs, textChars, reasoningChars, toolCalls, files, steps, lastTool, lastError, events: [...rolling 300] }`
187
+
188
+ Per-provider rolling logs: `window.__debug.kilo.events`, `window.__debug.opencode.events`.
189
+
190
+ UI consumes via 3 channels: `onChunk(delta)` text streaming | `onEvent(ev)` badge rendering via `renderEvent()` dispatch table in `docs/chat-providers.js` | 4Hz poll on `window.__debug.agent` → `#agent-stats` strip (live counters).
191
+
174
192
  ## Files
175
193
 
176
194
  - `lib/convert.js`: Message/tool translation logic
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thebird",
3
- "version": "1.2.91",
3
+ "version": "1.2.92",
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"