@superbased/observer 1.7.23 → 1.7.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 +81 -20
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -55,6 +55,12 @@ A note for shared / CI machines where `npm install -g` may need
|
|
|
55
55
|
`sudo`: see [Troubleshooting → EACCES](#npm-install--g-fails-with-eacces-permission-denied)
|
|
56
56
|
for user-writable-prefix and version-manager fixes.
|
|
57
57
|
|
|
58
|
+
> **Python users:** `pip install superbased-observer` ships the
|
|
59
|
+
> same binary; version numbers are kept in lock-step. See
|
|
60
|
+
> [the PyPI page](https://pypi.org/project/superbased-observer/).
|
|
61
|
+
> Don't install both globally — whichever directory comes first on
|
|
62
|
+
> `$PATH` wins, which gets confusing if their versions drift.
|
|
63
|
+
|
|
58
64
|
Pre-built binaries ship for:
|
|
59
65
|
|
|
60
66
|
| Platform | Architecture |
|
|
@@ -551,7 +557,7 @@ a content-aware compressor. Six compressors:
|
|
|
551
557
|
| Mechanism | What it does | When it fires |
|
|
552
558
|
|-----------|--------------|---------------|
|
|
553
559
|
| **json** | Replaces every scalar value with a type sentinel (`"<string>"`, `"<number>"`, …) preserving structure (keys, arrays, nesting). Arrays of length > 1 collapse to one element with `_len: N`. | API responses, structured logs, telemetry exports. JSON tool_results are usually the biggest savings target. |
|
|
554
|
-
| **code** | Heuristic skeleton: keeps top-of-file imports + signature lines (function / method / class / struct / interface / type), drops bodies. | Source code files. **
|
|
560
|
+
| **code** | Heuristic skeleton: keeps top-of-file imports + signature lines (function / method / class / struct / interface / type), drops bodies. | Source code files. **On by default** as of v1.7.23 for the `claude-code` recipe (V7-24 empirical winner). |
|
|
555
561
|
| **logs** | Two-pass: collapses adjacent identical lines to `<line> [×N]`, then head+tail-truncates to 200 lines if still long. | Log-shaped output — `go test ./...`, `npm run build`, polling/retry loops. Lossless on distinct lines; only the truncate pass is lossy. |
|
|
556
562
|
| **text** | Catch-all for content not classified as code/json/logs/diff/html. Head+tail truncation: keeps 40 + 40 lines on inputs over 80 lines. | Markdown bodies, README excerpts, narrative descriptions. |
|
|
557
563
|
| **diff** | Strips unified-diff context beyond ±1 line of each change. Keeps every header, every `+`/`-` line, drops the rest with elision markers. | `git diff`, patch tool outputs. Lossless on changes; lossy only on the cheap-to-rebuild context. |
|
|
@@ -640,6 +646,53 @@ summary model: `summary_model` for Anthropic, `openai_summary_model` for
|
|
|
640
646
|
OpenAI/Codex), and `[compression.conversation.compaction]`. The full knob
|
|
641
647
|
reference lives in `docs/compression-modes.md`.
|
|
642
648
|
|
|
649
|
+
### Measured savings (v1.7.23)
|
|
650
|
+
|
|
651
|
+
We A/B every shipped recipe against an OFF baseline on a real refactor
|
|
652
|
+
workload (`lumen` TypeScript codebase, 408-line Zustand store →
|
|
653
|
+
4 domain sub-stores) on the v1.7.22 binary tip. The numbers below are
|
|
654
|
+
the **most recent statistically-meaningful measurements**.
|
|
655
|
+
|
|
656
|
+
**Pick a recipe based on which model you're running:**
|
|
657
|
+
|
|
658
|
+
| Recipe | Use when your model is… | Workload | n | Δ vs OFF (mean cost) | What's compressed |
|
|
659
|
+
|---|---|---|---|---|---|
|
|
660
|
+
| **`claude-code`** *(default)* | Any Anthropic Claude model — `claude-sonnet-4-6`, `claude-opus-4-7`, `claude-haiku-4-5`, … | Refactor, Claude Sonnet 4.6 via Claude Code 2.1.158 | n=8 B vs n=4 OFF | **−6.9%** (CV 7.6%; tighter than OFF's 7.5%) | json + logs + code bodies; cache-aware; stash disabled |
|
|
661
|
+
| **`codex-variant`** | OpenAI's `-codex` reasoning fork — `gpt-5.3-codex`, `gpt-5.4-codex`, `gpt-5-codex-agent`, anything matching `*-codex*` | Refactor, gpt-5.3-codex | n=10 B vs n=10 OFF | **−10%** ($0.270 vs $0.300) | Tools-defs trim; cache-aware; no per-type compression |
|
|
662
|
+
| **`codex-safe`** | Plain OpenAI GPT under the codex CLI — `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.5`, `gpt-4o`, any non-`-codex` | Refactor, gpt-5.4 + `apply_patch` | n=3 B vs n=4 OFF | not statistically distinguishable on this workload | logs only; cache-aware |
|
|
663
|
+
|
|
664
|
+
The word **"variant"** in `codex-variant` refers to the *model variant* (the `-codex` reasoning fork of GPT), NOT a variant of the codex CLI. Both codex recipes are for the codex CLI; they differ only in which model family they assume. `codex-safe` is so named because plain GPT models tolerate logs trimming safely — it's not "safer than codex-variant."
|
|
665
|
+
|
|
666
|
+
**Honest caveats:**
|
|
667
|
+
|
|
668
|
+
- **Workload-dependent.** The `codex-safe` row on gpt-5.4 was
|
|
669
|
+
inconclusive because the test workload used `apply_patch` (classified
|
|
670
|
+
as `code`, not `logs`) so `compress_types=["logs"]` never fired —
|
|
671
|
+
the proxy was a functional no-op and the cost variance was session
|
|
672
|
+
noise. A Bash-heavy workload would tell a different story.
|
|
673
|
+
- **`claude-code` requires `ENABLE_TOOL_SEARCH=true`** in your shell.
|
|
674
|
+
Without it, Claude Code's SDK disables ToolSearch under
|
|
675
|
+
`ANTHROPIC_BASE_URL` and eager-inlines all MCP schemas (~+21K
|
|
676
|
+
tokens per turn). The proxy then becomes a net loss instead of
|
|
677
|
+
the −6.9% above. Setup steps cover this; verify with
|
|
678
|
+
`printenv ENABLE_TOOL_SEARCH`.
|
|
679
|
+
- **`stash` stays disabled by default for Anthropic** (V7-25 finding:
|
|
680
|
+
+25% cost on n=1 due to prefix-cache miss; stash markers break
|
|
681
|
+
Anthropic's content-hash cache). Operators can opt in for a measured
|
|
682
|
+
workload but should A/B their own.
|
|
683
|
+
- **Historic claims of higher savings are retracted.** The v1.4.38
|
|
684
|
+
release notes cited −14.8%; the project itself walked that back
|
|
685
|
+
after a deeper repro showed it was within noise. The numbers above
|
|
686
|
+
are the post-retraction floor.
|
|
687
|
+
|
|
688
|
+
**Reproduce it yourself:**
|
|
689
|
+
|
|
690
|
+
```bash
|
|
691
|
+
# Full methodology, raw arm data, per-arm cost rows, and a reproducer
|
|
692
|
+
# script live in this repo:
|
|
693
|
+
docs/v1.7.23-compression-savings-empirical-2026-06-01.md
|
|
694
|
+
```
|
|
695
|
+
|
|
643
696
|
|
|
644
697
|
## Cost and token math
|
|
645
698
|
|
|
@@ -981,25 +1034,33 @@ port = 8082 # in config.toml
|
|
|
981
1034
|
|
|
982
1035
|
## Security and privacy
|
|
983
1036
|
|
|
984
|
-
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1037
|
+
**Local-only. No telemetry. No remote anything.** The watcher, hook
|
|
1038
|
+
handler, dashboard, MCP server, and CLI never make an outbound network
|
|
1039
|
+
call on observer's behalf. The only code paths that touch the network
|
|
1040
|
+
are the optional API proxy (which forwards **your** requests unchanged
|
|
1041
|
+
to the AI provider you already use) and a handful of explicit opt-in
|
|
1042
|
+
features (message-summary LLM, codegraph MCP, Teams org-server).
|
|
1043
|
+
|
|
1044
|
+
The full privacy statement — what observer stores, what it reads,
|
|
1045
|
+
what it never stores, the explicit list of outbound-network call sites
|
|
1046
|
+
gated behind config, and how to verify "no telemetry" yourself with
|
|
1047
|
+
`grep`, `strings`, and a network-namespaced shell — lives in
|
|
1048
|
+
[`PRIVACY.md`](https://github.com/marmutapp/superbased-observer/blob/main/PRIVACY.md).
|
|
1049
|
+
|
|
1050
|
+
Operational shorthand:
|
|
1051
|
+
|
|
1052
|
+
- **Local-only HTTP.** The proxy and dashboard bind to `127.0.0.1`
|
|
1053
|
+
by default. Don't bind to `0.0.0.0` unless you've thought about
|
|
1054
|
+
it — there's no auth.
|
|
1055
|
+
- **Secrets scrubbing.** Tool inputs and outputs pass through
|
|
1056
|
+
`internal/scrub/` before persistence; review the regex set if your
|
|
1057
|
+
secrets follow non-default formats.
|
|
1058
|
+
- **Database.** `~/.observer/observer.db` is a SQLite file with the
|
|
1059
|
+
same security posture as your `~/.claude/` and `~/.codex/` session
|
|
1060
|
+
logs (which already hold the same content). Encrypt the disk if
|
|
1061
|
+
your threat model needs that.
|
|
1062
|
+
- **Full delete.** `rm -rf ~/.observer/` removes everything observer
|
|
1063
|
+
ever stored — no traces elsewhere on your system.
|
|
1003
1064
|
|
|
1004
1065
|
|
|
1005
1066
|
## Source, contributing, license
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superbased/observer",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.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.7.
|
|
40
|
-
"@superbased/observer-linux-arm64": "1.7.
|
|
41
|
-
"@superbased/observer-darwin-x64": "1.7.
|
|
42
|
-
"@superbased/observer-darwin-arm64": "1.7.
|
|
43
|
-
"@superbased/observer-win32-x64": "1.7.
|
|
39
|
+
"@superbased/observer-linux-x64": "1.7.25",
|
|
40
|
+
"@superbased/observer-linux-arm64": "1.7.25",
|
|
41
|
+
"@superbased/observer-darwin-x64": "1.7.25",
|
|
42
|
+
"@superbased/observer-darwin-arm64": "1.7.25",
|
|
43
|
+
"@superbased/observer-win32-x64": "1.7.25"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"test": "node bin/observer.js --version"
|