@superbased/observer 1.6.23 → 1.6.25
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/README.md +55 -17
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -76,13 +76,18 @@ the [main repo](https://github.com/marmutapp/superbased-observer).
|
|
|
76
76
|
## Five-minute quickstart
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
# 1) Install
|
|
79
|
+
# 1) Install. `observer init` is OPTIONAL — only run it if you want
|
|
80
|
+
# the MCP server registered with your AI clients (gives them
|
|
81
|
+
# on-demand tools like check_file_freshness / get_cost_summary
|
|
82
|
+
# at the cost of ~1,800 tokens of schema per turn).
|
|
80
83
|
npm install -g @superbased/observer
|
|
81
|
-
observer init # interactive: pick clients
|
|
84
|
+
observer init # OPTIONAL — interactive: pick clients;
|
|
85
|
+
# writes MCP + codex proxy-route into AI client configs.
|
|
86
|
+
# Skip this step for an MCP-free install.
|
|
82
87
|
|
|
83
|
-
# 2) Start the long-running services (
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
# 2) Start the long-running services (proxy + watcher + dashboard).
|
|
89
|
+
# Auto-registers HOOKS for every detected AI tool on first launch.
|
|
90
|
+
observer start &
|
|
86
91
|
|
|
87
92
|
# 3) Engage the proxy by pointing your AI client at the local URL.
|
|
88
93
|
# See "Per-AI-client setup" for the matching env var.
|
|
@@ -95,6 +100,17 @@ xdg-open http://127.0.0.1:8081/ # Linux
|
|
|
95
100
|
start http://127.0.0.1:8081/ # Windows
|
|
96
101
|
```
|
|
97
102
|
|
|
103
|
+
**What `start` does vs what `init` adds:**
|
|
104
|
+
|
|
105
|
+
| Step | Hooks | Proxy listening | Watcher | Dashboard | MCP in AI clients | Codex proxy route |
|
|
106
|
+
|---|---|---|---|---|---|---|
|
|
107
|
+
| `observer start` alone | auto-registers ✓ | ✓ | ✓ | ✓ | — | — |
|
|
108
|
+
| `observer init` + `observer start` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
109
|
+
| `observer init --skip-mcp` + `start` | ✓ | ✓ | ✓ | ✓ | — | ✓ |
|
|
110
|
+
|
|
111
|
+
MCP and codex routing are explicit-only because both write per-client
|
|
112
|
+
config files. Hooks self-heal on every `start`.
|
|
113
|
+
|
|
98
114
|
After ten minutes of normal AI-coding usage, the dashboard will be
|
|
99
115
|
populated with cost over time, per-tool activity, compression
|
|
100
116
|
savings, and stale-reread waste signals.
|
|
@@ -120,8 +136,9 @@ env var that matches your client(s); both can coexist on one machine.
|
|
|
120
136
|
| **Google Antigravity** | (no proxy yet) | Encrypted protobuf — `~/.gemini/antigravity/conversations/*.pb` (Linux-native) and the matching Windows-side path on WSL2. Observer ships a per-OS Chromium-pattern `oscrypt` key fetcher (macOS Keychain / libsecret / DPAPI / WSL2-via-PowerShell helper) and a multi-cipher try-loop for local decryption. Sessions whose ciphers don't validate locally fall back to the language_server's `GetCascadeTrajectory` gRPC endpoint via a built-in helper (`antigravity-bridge.exe` on WSL2 / native gRPC elsewhere) — extracts model + per-turn token counts + Tier 0–6 ToolEvents (file views, artifact edits/writes, user prompts, assistant text, run_command terminal snapshots, structured plan steps, final summaries). State index + per-conversation title/workspace URI read from `state.vscdb` + `state.vscdb.backup`. Tagged `Source=jsonl, Reliability=approximate`. |
|
|
121
137
|
| **Gemini CLI** | (no proxy yet) | JSONL or single-object JSON — `~/.gemini/tmp/<hash>/chats/session-*.{json,jsonl}`. Dual-format dispatch: legacy single-object JSON (size-based cursor, cline-style) and proposed JSONL event records (byte-offset cursor, issue [#15292](https://github.com/google-gemini/gemini-cli/issues/15292)). Action mapping covers `read_file` / `write_file` / `edit_file` / `run_command` / `search_files` / `web_fetch` and arbitrary MCP tool calls. Project root falls back through tool-call `cwd` → `~/.gemini/history/<hash>/.git/config` worktree pointer → synthetic `[gemini-cli:<hash>]` key (promoted via ON CONFLICT DO UPDATE on `sessions.project_id` once a future scan supplies a real cwd). Tagged `Source=jsonl, Reliability=approximate`. |
|
|
122
138
|
|
|
123
|
-
**JSONL-only** clients are captured passively by the watcher
|
|
124
|
-
|
|
139
|
+
**JSONL-only** clients are captured passively by the watcher whenever
|
|
140
|
+
`observer start` is running. Hooks self-heal on every `start`, so a
|
|
141
|
+
fresh install captures the JSONL side without any `init` step. You won't see real-time cost numbers
|
|
125
142
|
for them on the Compression tab (those need the proxy), but every tool
|
|
126
143
|
call shows up on Sessions / Actions / Discovery / Tools / Patterns and
|
|
127
144
|
the JSONL-derived token counts feed the Cost tab. Reliability tagging
|
|
@@ -177,8 +194,9 @@ Watch `~/.claude/projects/`, `~/.codex/sessions/`,
|
|
|
177
194
|
(and the matching Antigravity index `state.vscdb`), etc. for new
|
|
178
195
|
session log lines. Normalize per-client tool names to a shared
|
|
179
196
|
taxonomy (`read_file`, `run_command`, `spawn_subagent`, …) and write
|
|
180
|
-
them into the actions table.
|
|
181
|
-
`
|
|
197
|
+
them into the actions table. Active whenever `observer start` is
|
|
198
|
+
running; hooks self-heal on each start so no separate `init` step is
|
|
199
|
+
required for capture.
|
|
182
200
|
|
|
183
201
|
For Antigravity (which stores conversations as encrypted protobufs),
|
|
184
202
|
observer ships a per-OS `oscrypt` key fetcher (Chromium Safe Storage
|
|
@@ -231,14 +249,23 @@ Compression, Discovery, Patterns. See [Dashboard tour](#dashboard-tour).
|
|
|
231
249
|
|
|
232
250
|
Static HTML + Chart.js. No analytics, no external requests.
|
|
233
251
|
|
|
234
|
-
### 5. MCP server (stdio)
|
|
252
|
+
### 5. MCP server (stdio) — opt-in via `observer init`
|
|
235
253
|
|
|
236
|
-
|
|
254
|
+
13 read-only tools the AI client itself can call mid-conversation —
|
|
237
255
|
`check_file_freshness`, `get_last_test_result`, `search_past_outputs`,
|
|
238
|
-
etc.
|
|
256
|
+
etc. (plus `retrieve_stashed` when the proxy stash is configured).
|
|
257
|
+
Powers cross-client tool sharing: if Claude Code ran `go test`,
|
|
239
258
|
Cursor's MCP query for the latest test result will return Claude
|
|
240
259
|
Code's run. See [MCP tools reference](#mcp-tools-reference).
|
|
241
260
|
|
|
261
|
+
**Lifecycle**: the MCP server is a stdio subprocess spawned by your
|
|
262
|
+
AI tool — not by the observer daemon. It's registered into each AI
|
|
263
|
+
client's MCP config only when you run `observer init`. `observer
|
|
264
|
+
start` alone does NOT register the MCP server. Adds roughly 1,800
|
|
265
|
+
tokens of tool-schema overhead per AI-client turn; opt out with
|
|
266
|
+
`observer init --skip-mcp` (registers hooks only) or by simply not
|
|
267
|
+
running `init`.
|
|
268
|
+
|
|
242
269
|
|
|
243
270
|
## Dashboard tour
|
|
244
271
|
|
|
@@ -469,10 +496,13 @@ explaining the actual algorithm.
|
|
|
469
496
|
|
|
470
497
|
## MCP tools reference
|
|
471
498
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
499
|
+
Once you've run `observer init` (it's opt-in — `observer start`
|
|
500
|
+
alone does NOT register the MCP server), every connected AI client
|
|
501
|
+
gets these 13 tools registered as an MCP server — plus
|
|
502
|
+
`retrieve_stashed` when the proxy stash is configured. They're
|
|
503
|
+
**read-only** queries against the unified database, so any agent
|
|
504
|
+
can read any other agent's recorded work — true cross-platform
|
|
505
|
+
tool-call sharing.
|
|
476
506
|
|
|
477
507
|
| Tool | Purpose |
|
|
478
508
|
|-----------------------------------|---------|
|
|
@@ -488,10 +518,18 @@ recorded work — true cross-platform tool-call sharing.
|
|
|
488
518
|
| `get_project_patterns` | High-confidence patterns derived from this project's history |
|
|
489
519
|
| `get_cost_summary` | Daily / per-model / per-session cost rollups |
|
|
490
520
|
| `get_redundancy_report` | Stale rereads, repeated commands, cross-tool overlap for the project |
|
|
521
|
+
| `list_actions_around` | ±N actions adjacent to a pivot `action_id` — browse a session's local timeline cheaply |
|
|
522
|
+
| `retrieve_stashed` _(conditional)_| Pulls original bytes of a tool_result the proxy compressed away. Only registered when `[compression.conversation].stash` is configured. |
|
|
523
|
+
|
|
524
|
+
**Cost trade-off**: with the MCP registered, the AI client sends the
|
|
525
|
+
full tool-schema payload (~7.2 KB / ~1,800 tokens) in its system
|
|
526
|
+
context on every turn — whether or not the model actually invokes
|
|
527
|
+
any tool. To eliminate this overhead, run `observer init --skip-mcp`
|
|
528
|
+
(registers hooks only) or skip `init` entirely.
|
|
491
529
|
|
|
492
530
|
**Cross-tool sharing**: when `observer init` registers the MCP server
|
|
493
531
|
with Claude Code AND Cursor (and Codex…), all of them call the same
|
|
494
|
-
|
|
532
|
+
tools against the same database. Cursor's `get_last_test_result`
|
|
495
533
|
returns Claude Code's last test run; Codex's `check_file_freshness`
|
|
496
534
|
reflects edits made by Cursor.
|
|
497
535
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superbased/observer",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.25",
|
|
4
4
|
"description": "SuperBased Observer — capture, normalize, compress, and analyze AI coding tool activity across Claude Code, Codex, Cursor, Cline/Roo, and Copilot.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"LICENSE"
|
|
37
37
|
],
|
|
38
38
|
"optionalDependencies": {
|
|
39
|
-
"@superbased/observer-linux-x64": "1.6.
|
|
40
|
-
"@superbased/observer-linux-arm64": "1.6.
|
|
41
|
-
"@superbased/observer-darwin-x64": "1.6.
|
|
42
|
-
"@superbased/observer-darwin-arm64": "1.6.
|
|
43
|
-
"@superbased/observer-win32-x64": "1.6.
|
|
39
|
+
"@superbased/observer-linux-x64": "1.6.25",
|
|
40
|
+
"@superbased/observer-linux-arm64": "1.6.25",
|
|
41
|
+
"@superbased/observer-darwin-x64": "1.6.25",
|
|
42
|
+
"@superbased/observer-darwin-arm64": "1.6.25",
|
|
43
|
+
"@superbased/observer-win32-x64": "1.6.25"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"test": "node bin/observer.js --version"
|