@superbased/observer 1.26.0 → 1.28.0

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 CHANGED
@@ -10,11 +10,12 @@
10
10
  **Claude Code cost tracking. Cursor token usage. Codex spend.
11
11
  AI coding agent observability — one local tool, proxy-accurate.**
12
12
  SuperBased captures, normalizes, and analyzes every AI
13
- coding tool call across **26 adapters** — Claude Code, Codex, Cursor,
13
+ coding tool call across **29 adapters** — Claude Code, Codex, Cursor,
14
14
  Cline + Cline CLI, GitHub Copilot (VS Code) + Copilot CLI, Gemini CLI,
15
15
  OpenCode, Google Antigravity, Cowork, Nous Research's Hermes Agent,
16
16
  Kilo Code (legacy IDE extension + CLI), Aider, Goose, Devin, OpenClaw,
17
- Pi, and more in one local single-binary tool. An optional API proxy
17
+ Pi, Factory Droid, Open Interpreter, Command Code, and more in one
18
+ local single-binary tool. An optional API proxy
18
19
  reconciles the *exact* tokens your provider billed (net input, cache
19
20
  5m/1h splits, reasoning tokens, long-context surcharges) instead of a
20
21
  JSONL-derived estimate. No telemetry, no cloud, no data leaves your
@@ -37,6 +38,7 @@ the full two-plane explainer.
37
38
 
38
39
  - [Install](#install)
39
40
  - [Five-minute quickstart](#five-minute-quickstart)
41
+ - [Zero-setup cost report: `observer usage`](#zero-setup-cost-report-observer-usage)
40
42
  - [Two planes, one binary](#two-planes-one-binary)
41
43
  - [Per-AI-client setup](#per-ai-client-setup)
42
44
  - [Architecture in detail](#architecture-in-detail)
@@ -102,6 +104,23 @@ the [main repo](https://github.com/superbasedapp/observer).
102
104
 
103
105
  ## Five-minute quickstart
104
106
 
107
+ **No install at all, just a cost table:**
108
+
109
+ ```bash
110
+ npx @superbased/observer # a 30-day cost table, right now
111
+ npx @superbased/observer usage # the explicit, same-thing form
112
+ ```
113
+
114
+ On a fresh machine with no SuperBased state yet, bare `npx
115
+ @superbased/observer` scans each detected AI tool's own local session
116
+ files into a throwaway temp database, prints one tool × model cost
117
+ table, and deletes the database again — no daemon, no config written,
118
+ no network call. See [Zero-setup cost report](#zero-setup-cost-report-observer-usage)
119
+ below for what it does and doesn't do.
120
+
121
+ **For the full local tool** — proxy-accurate tokens, live dashboard,
122
+ conversation compression, cache tracking:
123
+
105
124
  ```bash
106
125
  # 1) Install.
107
126
  npm install -g @superbased/observer
@@ -142,6 +161,65 @@ MCP and codex routing are explicit-only because both write per-client
142
161
  config files. Hooks self-heal on every `start`.
143
162
 
144
163
 
164
+ ## Zero-setup cost report: `observer usage`
165
+
166
+ Before `observer start` and the daemon, there's a one-shot path for
167
+ "how much have I spent so far": `observer usage` reads each detected
168
+ AI tool's own local session files (JSONL / SQLite — the same files
169
+ the watcher normally tails), rolls up the last 30 days into one
170
+ tool × model cost table, and prints it. Everything it reads goes into
171
+ a throwaway database in a temp directory (foreign-mount adapter
172
+ mirrors — e.g. WSL reading a Windows-side tool store — land there too),
173
+ deleted again when the command exits — it never creates or touches
174
+ `~/.observer`, never writes any AI tool's config, and never opens a
175
+ socket. Pricing is embedded in the binary (the same rate sheet the
176
+ dashboard's Cost tab uses), so the whole run makes zero network calls.
177
+
178
+ On a fresh machine with no SuperBased state yet — no
179
+ `~/.observer/observer.db` and no `~/.observer/config.toml` — running
180
+ bare `observer` with no arguments runs this same report instead of the
181
+ usual welcome screen. Set `OBSERVER_ONESHOT=off` to always get the
182
+ welcome screen instead; a default-config daemon can't run without
183
+ first creating one of those two files, so there's no separate "is a
184
+ daemon listening" check — no port probe, no network activity at all.
185
+ Once either file exists on the machine, the fallthrough stops firing
186
+ on its own and bare `observer` goes back to the welcome screen —
187
+ `observer usage` stays available as an explicit command regardless.
188
+
189
+ The report is honest about its own limits: reliability is **log
190
+ tier** — parsed from each tool's own self-reported counts, not the
191
+ wire-accurate numbers the proxy captures — and every dollar figure is
192
+ labeled `estimated list price, not invoiced`. When it's ready for
193
+ more, `observer start` is the next step: it keeps the proxy, the
194
+ watcher, and the dashboard running so cost, cache, and compression
195
+ numbers stay current instead of being recomputed from scratch on
196
+ every invocation.
197
+
198
+ Flags: `--since` (`7d`/`30d`/`90d`/`all`/an RFC3339 timestamp, default
199
+ `30d`), `--group-by` (`tool-model`/`tool`/`model`/`day`), `--tool`,
200
+ `--budget` (wall-clock cap on the scan only, default `30s`, `0` =
201
+ unlimited — on expiry the table still prints with a `partial:`
202
+ footer), `--json`, and `--keep-db <path>` to keep the scratch database
203
+ instead of deleting it. See `observer usage --help` for the full
204
+ reference.
205
+
206
+ ## A wordmarked one-line status: `observer statusline`
207
+
208
+ For an always-on glance instead of an on-demand report, `observer
209
+ statusline` prints exactly one line — a short `▞ superbased` wordmark plus
210
+ (when the data is available that invocation) the current session's
211
+ cost, today's total observed spend, and the active model name — sized
212
+ for a terminal prompt (Claude Code's `statusLine` contract) or any host
213
+ tool that execs a command and reads its stdout. It's fail-open by
214
+ design: with no daemon running it degrades to the wordmark alone (and
215
+ makes no network call of any kind to find that out), and with a daemon
216
+ running the only network-shaped call it makes is a bounded loopback
217
+ request to that same-machine daemon. Every dollar figure is an
218
+ estimated list-price total, not an invoiced amount. Registration is
219
+ opt-in (`observer init --statusline`) — never automatic. See
220
+ [`docs/observer-statusline.md`](https://github.com/superbasedapp/observer/blob/main/docs/observer-statusline.md)
221
+ for the full reference.
222
+
145
223
  ## Two planes, one binary
146
224
 
147
225
  Everything below this line — proxy routing, per-client capture,
@@ -732,9 +810,10 @@ two people type at once.
732
810
 
733
811
  ### Launch any supported AI CLI as a real terminal
734
812
 
735
- Nineteen CLI launchers — claude, codex, opencode, cursor, copilot-cli,
813
+ Twenty-two CLI launchers — claude, codex, opencode, cursor, copilot-cli,
736
814
  kilo, cline-cli, hermes, gemini, openclaw, pi, antigravity, qwen,
737
- kiro, grok, kimi, devin, qoder, goose start from the dashboard's
815
+ kiro, grok, kimi, devin, qoder, goose, droid, open-interpreter,
816
+ command-code — start from the dashboard's
738
817
  **Launch here** control or from the command line as `observer <verb>`
739
818
  (`observer claude`, `observer codex`, and so on). Each opens a **real
740
819
  PTY** — a native pseudo-terminal on Linux and macOS, and a native
@@ -743,9 +822,9 @@ tool's binary isn't on your `$PATH`, the launcher offers a guided
743
822
  one-click install rather than failing. Dashboard launching is gated by
744
823
  `[handoff].allow_dashboard_launch` (default `true`).
745
824
 
746
- (The count is nineteen *launchers*, not the adapter count — observer
747
- tracks 26 adapters in total, but only these nineteen ship a first-class
748
- terminal launcher.)
825
+ (The count is twenty-two *launchers*, not the adapter count — observer
826
+ tracks 29 adapters in total, but only these twenty-two ship a
827
+ first-class terminal launcher.)
749
828
 
750
829
  ### Attach-by-default
751
830
 
@@ -820,13 +899,14 @@ paired remote device the grid is read-only.
820
899
 
821
900
  ### Restarts & continuity
822
901
 
823
- claude and codex **auto-resume the same transcript** after a daemon
824
- restart — a verified native resume, so the conversation continues where
825
- it left off. Every other tool's attached session ends when the daemon
826
- restarts; to pick the work back up, fork it with
827
- `observer <verb> --continue-from <session-id>`. That opens a new session
828
- id and seeds a distilled handover of the prior session as its first
829
- prompt it works for all nineteen launchers.
902
+ Twenty-one of the twenty-two launchers **auto-resume the same
903
+ transcript** after a daemon restart — a verified native resume, so the
904
+ conversation continues where it left off. openclaw is the sole holdout:
905
+ its resume is picker-only, so its attached session ends when the daemon
906
+ restarts. To pick any session back up including openclaw's — fork it
907
+ with `observer <verb> --continue-from <session-id>`. That opens a new
908
+ session id and seeds a distilled handover of the prior session as its
909
+ first prompt — it works for all twenty-two launchers.
830
910
 
831
911
  ### Remote posture
832
912
 
@@ -10,11 +10,12 @@
10
10
  **Claude Code cost tracking. Cursor token usage. Codex spend.
11
11
  AI coding agent observability — one local tool, proxy-accurate.**
12
12
  SuperBased captures, normalizes, and analyzes every AI
13
- coding tool call across **26 adapters** — Claude Code, Codex, Cursor,
13
+ coding tool call across **29 adapters** — Claude Code, Codex, Cursor,
14
14
  Cline + Cline CLI, GitHub Copilot (VS Code) + Copilot CLI, Gemini CLI,
15
15
  OpenCode, Google Antigravity, Cowork, Nous Research's Hermes Agent,
16
16
  Kilo Code (legacy IDE extension + CLI), Aider, Goose, Devin, OpenClaw,
17
- Pi, and more in one local single-binary tool. An optional API proxy
17
+ Pi, Factory Droid, Open Interpreter, Command Code, and more in one
18
+ local single-binary tool. An optional API proxy
18
19
  reconciles the *exact* tokens your provider billed (net input, cache
19
20
  5m/1h splits, reasoning tokens, long-context surcharges) instead of a
20
21
  JSONL-derived estimate. No telemetry, no cloud, no data leaves your
@@ -37,6 +38,7 @@ the full two-plane explainer.
37
38
 
38
39
  - [Install](#install)
39
40
  - [Five-minute quickstart](#five-minute-quickstart)
41
+ - [Zero-setup cost report: `observer usage`](#zero-setup-cost-report-observer-usage)
40
42
  - [Two planes, one binary](#two-planes-one-binary)
41
43
  - [Per-AI-client setup](#per-ai-client-setup)
42
44
  - [Architecture in detail](#architecture-in-detail)
@@ -102,6 +104,23 @@ the [main repo](https://github.com/superbasedapp/observer).
102
104
 
103
105
  ## Five-minute quickstart
104
106
 
107
+ **No install at all, just a cost table:**
108
+
109
+ ```bash
110
+ npx @superbased/observer # a 30-day cost table, right now
111
+ npx @superbased/observer usage # the explicit, same-thing form
112
+ ```
113
+
114
+ On a fresh machine with no SuperBased state yet, bare `npx
115
+ @superbased/observer` scans each detected AI tool's own local session
116
+ files into a throwaway temp database, prints one tool × model cost
117
+ table, and deletes the database again — no daemon, no config written,
118
+ no network call. See [Zero-setup cost report](#zero-setup-cost-report-observer-usage)
119
+ below for what it does and doesn't do.
120
+
121
+ **For the full local tool** — proxy-accurate tokens, live dashboard,
122
+ conversation compression, cache tracking:
123
+
105
124
  ```bash
106
125
  # 1) Install.
107
126
  npm install -g @superbased/observer
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@superbased/observer",
3
- "version": "1.26.0",
4
- "description": "Claude Code cost tracking, Cursor token usage, Codex spend — AI coding agent observability across 26 adapters, proxy-accurate token counts and cost.",
3
+ "version": "1.28.0",
4
+ "description": "Claude Code cost tracking, Cursor token usage, Codex spend — AI coding agent observability across 29 adapters, proxy-accurate token counts and cost.",
5
5
  "keywords": [
6
6
  "ai",
7
7
  "observability",
@@ -42,11 +42,11 @@
42
42
  "LICENSE"
43
43
  ],
44
44
  "optionalDependencies": {
45
- "@superbased/observer-linux-x64": "1.26.0",
46
- "@superbased/observer-linux-arm64": "1.26.0",
47
- "@superbased/observer-darwin-x64": "1.26.0",
48
- "@superbased/observer-darwin-arm64": "1.26.0",
49
- "@superbased/observer-win32-x64": "1.26.0"
45
+ "@superbased/observer-linux-x64": "1.28.0",
46
+ "@superbased/observer-linux-arm64": "1.28.0",
47
+ "@superbased/observer-darwin-x64": "1.28.0",
48
+ "@superbased/observer-darwin-arm64": "1.28.0",
49
+ "@superbased/observer-win32-x64": "1.28.0"
50
50
  },
51
51
  "scripts": {
52
52
  "test": "node bin/observer.js --version"