@superbased/observer 1.29.0 → 1.31.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 +20 -34
- package/README.template.md +6 -11
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
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 **
|
|
13
|
+
coding tool call across **33 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,
|
|
@@ -21,14 +21,9 @@ reconciles the *exact* tokens your provider billed (net input, cache
|
|
|
21
21
|
JSONL-derived estimate. No telemetry, no cloud, no data leaves your
|
|
22
22
|
machine.
|
|
23
23
|
|
|
24
|
-
**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
observability — admin-server-first: OTLP trace/span capture, evals,
|
|
28
|
-
and an LLM-as-judge input-admission guardrail for an application you
|
|
29
|
-
host. Most installs only ever use Plane B; see the [main
|
|
30
|
-
repo](https://github.com/superbasedapp/observer#readme) for
|
|
31
|
-
the full two-plane explainer.
|
|
24
|
+
**One local binary.** SuperBased captures, normalizes, and analyzes
|
|
25
|
+
every AI coding tool call on your machine: proxy-accurate cost,
|
|
26
|
+
compression, cache tracking, and session handoff.
|
|
32
27
|
|
|
33
28
|
<p align="center">
|
|
34
29
|
<img src="https://github.com/superbasedapp/observer/raw/main/docs/assets/infographics/one-local-path.png" alt="One local path for AI coding activity" width="780">
|
|
@@ -39,7 +34,7 @@ the full two-plane explainer.
|
|
|
39
34
|
- [Install](#install)
|
|
40
35
|
- [Five-minute quickstart](#five-minute-quickstart)
|
|
41
36
|
- [Zero-setup cost report: `observer usage`](#zero-setup-cost-report-observer-usage)
|
|
42
|
-
- [
|
|
37
|
+
- [One local binary](#one-local-binary)
|
|
43
38
|
- [Per-AI-client setup](#per-ai-client-setup)
|
|
44
39
|
- [Architecture in detail](#architecture-in-detail)
|
|
45
40
|
- [Dashboard tour](#dashboard-tour)
|
|
@@ -220,20 +215,12 @@ opt-in (`observer init --statusline`) — never automatic. See
|
|
|
220
215
|
[`docs/observer-statusline.md`](https://github.com/superbasedapp/observer/blob/main/docs/observer-statusline.md)
|
|
221
216
|
for the full reference.
|
|
222
217
|
|
|
223
|
-
##
|
|
224
|
-
|
|
225
|
-
Everything below this line
|
|
226
|
-
compression, cache, MCP tools
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
proxy-accurate cost and cache numbers, with an optional team rollup
|
|
230
|
-
server for org-wide spend visibility. The same binary also ships
|
|
231
|
-
**Plane A: general LLM-app observability**, admin-server-first — OTLP
|
|
232
|
-
trace/span capture, evals, and an LLM-as-judge input-admission
|
|
233
|
-
guardrail for an application *you* host, whose end users route
|
|
234
|
-
through SuperBased. Most installs only ever touch Plane B; Plane A is
|
|
235
|
-
opt-in and unrelated to your own coding-agent traffic. Full explainer:
|
|
236
|
-
[superbased.app/docs/getting-started/two-planes](https://superbased.app/docs/getting-started/two-planes).
|
|
218
|
+
## One local binary
|
|
219
|
+
|
|
220
|
+
Everything below this line (proxy routing, per-client capture,
|
|
221
|
+
compression, cache, MCP tools) is what this package is for: a local
|
|
222
|
+
node that watches your own AI coding tools and gives you
|
|
223
|
+
proxy-accurate cost and cache numbers, on your own machine.
|
|
237
224
|
|
|
238
225
|
## Per-AI-client setup
|
|
239
226
|
|
|
@@ -292,6 +279,7 @@ table below is the full per-client reference.
|
|
|
292
279
|
| **Kilo Code CLI (current)** | (no proxy route yet — base-URL env vars are not honored; a project-scoped `kilo.json` provider `baseURL` override reaches the proxy, but the Gateway provider's model-catalog calls share that base URL and have no upstream there — see `docs/kilo-code-adapter.md`) | SQLite — `~/.local/share/kilo/kilo.db` on every OS (Kilo intentionally mirrors XDG; Windows does NOT use `%APPDATA%`). The new `@kilocode/cli` (npm) is a fork of sst/opencode and uses the same `message`/`part`/`todo` tables shape with Kilo additions (`project`, `workspace`, `event`, `session_message`, `account`, `permission`, `session_share`). Captures **token counts + model + cost** per assistant message from `message.data.tokens = {total, input, output, reasoning, cache: {read, write}}`. Tool name coverage inherits OpenCode's surface (`read` → `read_file`, `bash` → `run_command`, `websearch` → `web_search`, etc.). Tagged `Source=jsonl, Reliability=approximate`. |
|
|
293
280
|
| **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`. |
|
|
294
281
|
| **Hermes Agent** ([Nous Research](https://github.com/NousResearch/hermes-agent)) | (provider-routed; uses your existing `ANTHROPIC_BASE_URL` / `OPENAI_BASE_URL` when set) | Hooks + SQLite — Python plugin at `~/.hermes/plugins/superbased-observer/` registers `post_tool_call` / `post_api_request` / `on_session_start` / `on_session_end` / `subagent_stop` callbacks (fire-and-forget via `observer hook hermes`); the watcher walks `~/.hermes/state.db` (schema v14, `messages.active = 1` filter) and emits `ToolEvent` + `TokenEvent` rows via `modernc.org/sqlite`. 70+ Hermes tools fold into the normalized action set (`read_file` / `write_file` / `patch` / `terminal` / `search_files` / `web_search` / `web_extract` / `browser_*` / `delegate_task` / `todo` / `clarify` / `memory` + `mcp_call` fall-through). Token bundles lifted from `post_api_request.usage{input/output/cache/reasoning_tokens}`; OpenRouter `:suffix` tails (`:free`, `:beta`, `:fast`) preserved so the dashboard distinguishes paid vs free tiers. Install via `observer init --hermes`; backfill via `observer backfill --hermes-rescan`. Tagged `Source=jsonl, Reliability=approximate`. |
|
|
282
|
+
| **Junie** (JetBrains) | (no proxy yet) | Event-sourced JSONL — `~/.junie/sessions/<id>/events.jsonl` on every OS (resumes with `junie --session-id <id>`). Each line is a typed envelope (`SessionA2uxEvent` wrapping `event.agentEvent.kind`); Terminal/FileChanges/Result blocks recur under a stable `stepId` (IN_PROGRESS to COMPLETED/FAILED to a completion rebroadcast) and are collapsed by `stepId`. Captures user prompts, `run_command` / `write_file` / `edit_file` / `task_complete` actions, and per-call **model + NET input tokens + provider-stated cost** from `LlmResponseMetadataEvent.modelUsage[]`. Project root from the session's `CurrentDirectoryUpdatedEvent` with a `sessions/index.jsonl` `projectDir` fallback. Never reads `secure_credentials.json` / `trust/`. Tagged `Source=jsonl, Reliability=accurate`. |
|
|
295
283
|
|
|
296
284
|
**JSONL-only** clients are captured passively by the watcher whenever
|
|
297
285
|
`observer start` is running. Hooks self-heal on every `start`, so a
|
|
@@ -619,7 +607,7 @@ how well your sessions are reusing provider-cached prefixes.
|
|
|
619
607
|
|
|
620
608
|
Two capture paths feed the same engine; both write the same three
|
|
621
609
|
local-only tables (`cache_segments`, `cache_entries`, `cache_events`;
|
|
622
|
-
migrations 036 + 037 —
|
|
610
|
+
migrations 036 + 037 — node-local only, never leaving the machine, pinned by
|
|
623
611
|
`tests/invariant/privacy_test.go::TestSelectUnpushedSinceExcludesCacheTables`):
|
|
624
612
|
|
|
625
613
|
1. **Tier-1 (proxy)** — point your AI client at the local proxy
|
|
@@ -823,7 +811,7 @@ one-click install rather than failing. Dashboard launching is gated by
|
|
|
823
811
|
`[handoff].allow_dashboard_launch` (default `true`).
|
|
824
812
|
|
|
825
813
|
(The count is twenty-two *launchers*, not the adapter count — observer
|
|
826
|
-
tracks
|
|
814
|
+
tracks 33 adapters in total, but only these twenty-two ship a
|
|
827
815
|
first-class terminal launcher.)
|
|
828
816
|
|
|
829
817
|
### Attach-by-default
|
|
@@ -1240,10 +1228,9 @@ What makes it different from standalone command-guards:
|
|
|
1240
1228
|
crossings can push out through desktop toast notifications
|
|
1241
1229
|
(`[guard.alerts] desktop = true`) and outbound webhooks — generic,
|
|
1242
1230
|
Slack, Discord, or PagerDuty (`[[guard.cloud.webhooks]]` for guard
|
|
1243
|
-
events
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
cap. Nothing fires until you configure it.
|
|
1231
|
+
events) — each behind its own opt-in, routed through one egress
|
|
1232
|
+
worker with an endpoint allowlist and a payload cap. Nothing fires
|
|
1233
|
+
until you configure it.
|
|
1247
1234
|
- **Optional process observability.** `[observer.process]` (opt-in,
|
|
1248
1235
|
off by default) attaches the OS-level process tree — Linux eBPF or
|
|
1249
1236
|
Windows ETW — beneath each captured session, for runtime side
|
|
@@ -1255,8 +1242,7 @@ most adapters are watcher-channel and can only flag post-hoc; the
|
|
|
1255
1242
|
proxy scan only covers proxy-routed clients. The full capability
|
|
1256
1243
|
matrix is on the dashboard's Security page, and the no-network
|
|
1257
1244
|
invariant holds — nothing leaves your machine unless you opt into
|
|
1258
|
-
|
|
1259
|
-
individually.
|
|
1245
|
+
OTel export or the cloud alerting tier, each individually.
|
|
1260
1246
|
|
|
1261
1247
|
Quick start:
|
|
1262
1248
|
|
|
@@ -1268,7 +1254,7 @@ observer guard enable --enforce # flip to enforce when ready
|
|
|
1268
1254
|
```
|
|
1269
1255
|
|
|
1270
1256
|
Full reference: [superbased.app/docs/guides/security-guard](https://superbased.app/docs/guides/security-guard)
|
|
1271
|
-
(concepts, modes, the observe→enforce path,
|
|
1257
|
+
(concepts, modes, the observe→enforce path, the honest
|
|
1272
1258
|
"what guard does NOT do" list). The rule catalog, policy-authoring cookbook,
|
|
1273
1259
|
enforce runbook, and SOC 2 / NIST compliance mapping ship as
|
|
1274
1260
|
`docs/guard-rules.md`, `docs/guard-policy-authoring.md`,
|
|
@@ -1584,7 +1570,7 @@ handler, dashboard, MCP server, and CLI never make an outbound network
|
|
|
1584
1570
|
call on observer's behalf. The only code paths that touch the network
|
|
1585
1571
|
are the optional API proxy (which forwards **your** requests unchanged
|
|
1586
1572
|
to the AI provider you already use) and a handful of explicit opt-in
|
|
1587
|
-
features (message-summary LLM, codeintel MCP
|
|
1573
|
+
features (message-summary LLM, codeintel MCP).
|
|
1588
1574
|
|
|
1589
1575
|
The full privacy statement — what observer stores, what it reads,
|
|
1590
1576
|
what it never stores, the explicit list of outbound-network call sites
|
package/README.template.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
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 **
|
|
13
|
+
coding tool call across **33 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,
|
|
@@ -21,14 +21,9 @@ reconciles the *exact* tokens your provider billed (net input, cache
|
|
|
21
21
|
JSONL-derived estimate. No telemetry, no cloud, no data leaves your
|
|
22
22
|
machine.
|
|
23
23
|
|
|
24
|
-
**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
observability — admin-server-first: OTLP trace/span capture, evals,
|
|
28
|
-
and an LLM-as-judge input-admission guardrail for an application you
|
|
29
|
-
host. Most installs only ever use Plane B; see the [main
|
|
30
|
-
repo](https://github.com/superbasedapp/observer#readme) for
|
|
31
|
-
the full two-plane explainer.
|
|
24
|
+
**One local binary.** SuperBased captures, normalizes, and analyzes
|
|
25
|
+
every AI coding tool call on your machine: proxy-accurate cost,
|
|
26
|
+
compression, cache tracking, and session handoff.
|
|
32
27
|
|
|
33
28
|
<p align="center">
|
|
34
29
|
<img src="https://github.com/superbasedapp/observer/raw/main/docs/assets/infographics/one-local-path.png" alt="One local path for AI coding activity" width="780">
|
|
@@ -39,7 +34,7 @@ the full two-plane explainer.
|
|
|
39
34
|
- [Install](#install)
|
|
40
35
|
- [Five-minute quickstart](#five-minute-quickstart)
|
|
41
36
|
- [Zero-setup cost report: `observer usage`](#zero-setup-cost-report-observer-usage)
|
|
42
|
-
- [
|
|
37
|
+
- [One local binary](#one-local-binary)
|
|
43
38
|
- [Per-AI-client setup](#per-ai-client-setup)
|
|
44
39
|
- [Architecture in detail](#architecture-in-detail)
|
|
45
40
|
- [Dashboard tour](#dashboard-tour)
|
|
@@ -300,7 +295,7 @@ handler, dashboard, MCP server, and CLI never make an outbound network
|
|
|
300
295
|
call on observer's behalf. The only code paths that touch the network
|
|
301
296
|
are the optional API proxy (which forwards **your** requests unchanged
|
|
302
297
|
to the AI provider you already use) and a handful of explicit opt-in
|
|
303
|
-
features (message-summary LLM, codeintel MCP
|
|
298
|
+
features (message-summary LLM, codeintel MCP).
|
|
304
299
|
|
|
305
300
|
The full privacy statement — what observer stores, what it reads,
|
|
306
301
|
what it never stores, the explicit list of outbound-network call sites
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superbased/observer",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Claude Code cost tracking, Cursor token usage, Codex spend — AI coding agent observability across
|
|
3
|
+
"version": "1.31.0",
|
|
4
|
+
"description": "Claude Code cost tracking, Cursor token usage, Codex spend — AI coding agent observability across 33 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.
|
|
46
|
-
"@superbased/observer-linux-arm64": "1.
|
|
47
|
-
"@superbased/observer-darwin-x64": "1.
|
|
48
|
-
"@superbased/observer-darwin-arm64": "1.
|
|
49
|
-
"@superbased/observer-win32-x64": "1.
|
|
45
|
+
"@superbased/observer-linux-x64": "1.31.0",
|
|
46
|
+
"@superbased/observer-linux-arm64": "1.31.0",
|
|
47
|
+
"@superbased/observer-darwin-x64": "1.31.0",
|
|
48
|
+
"@superbased/observer-darwin-arm64": "1.31.0",
|
|
49
|
+
"@superbased/observer-win32-x64": "1.31.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"test": "node bin/observer.js --version"
|