@unerr-ai/unerr 0.1.6 → 0.1.8
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 +79 -196
- package/dist/cli.js +19821 -16589
- package/package.json +17 -3
- package/dist/__tests__/architecture-guard.test.js +0 -122
- package/dist/__tests__/arg-validator.test.js +0 -205
- package/dist/__tests__/ast-extractor.test.js +0 -203
- package/dist/__tests__/auto-bootstrap.test.js +0 -280
- package/dist/__tests__/background-indexer.test.js +0 -228
- package/dist/__tests__/blast-radius-engine.test.js +0 -200
- package/dist/__tests__/bridge-isolation.test.js +0 -37
- package/dist/__tests__/budget-enforcer.test.js +0 -53
- package/dist/__tests__/cfg-test-detection-perf.test.js +0 -82
- package/dist/__tests__/change-narrative.test.js +0 -190
- package/dist/__tests__/check-commit.test.js +0 -258
- package/dist/__tests__/checksum.test.js +0 -34
- package/dist/__tests__/commit-watcher.test.js +0 -154
- package/dist/__tests__/community-detection.test.js +0 -179
- package/dist/__tests__/community-tools.test.js +0 -299
- package/dist/__tests__/components.test.js +0 -449
- package/dist/__tests__/compression-log.test.js +0 -174
- package/dist/__tests__/compression-quality-monitor.test.js +0 -40
- package/dist/__tests__/config-healer.test.js +0 -165
- package/dist/__tests__/context-ledger.test.js +0 -58
- package/dist/__tests__/convention-detector.test.js +0 -99
- package/dist/__tests__/convention-learner.test.js +0 -86
- package/dist/__tests__/correction-detector.test.js +0 -330
- package/dist/__tests__/daemon-autostart-install.test.js +0 -283
- package/dist/__tests__/daemon-bridge.test.js +0 -222
- package/dist/__tests__/daemon-dashboard.test.js +0 -202
- package/dist/__tests__/daemon-registry.test.js +0 -240
- package/dist/__tests__/daemon-supervisor.test.js +0 -318
- package/dist/__tests__/daemon-version-check.test.js +0 -275
- package/dist/__tests__/decision-point-detector.test.js +0 -98
- package/dist/__tests__/deep-link.test.js +0 -143
- package/dist/__tests__/disallowed-tools.test.js +0 -115
- package/dist/__tests__/drift-tracker.test.js +0 -582
- package/dist/__tests__/durability-scorer.test.js +0 -152
- package/dist/__tests__/efficiency-tracker.test.js +0 -65
- package/dist/__tests__/enrich.test.js +0 -144
- package/dist/__tests__/entity-rewind.test.js +0 -248
- package/dist/__tests__/ephemeral.test.js +0 -111
- package/dist/__tests__/exploration-cost.test.js +0 -93
- package/dist/__tests__/fact-generator.test.js +0 -197
- package/dist/__tests__/file-l0-graph.test.js +0 -244
- package/dist/__tests__/file-logger.test.js +0 -82
- package/dist/__tests__/file-outline.test.js +0 -141
- package/dist/__tests__/file-read-protocol.test.js +0 -188
- package/dist/__tests__/format-encoder.test.js +0 -233
- package/dist/__tests__/git-attribution.test.js +0 -259
- package/dist/__tests__/graph-temporal-joiner.test.js +0 -219
- package/dist/__tests__/health-grade-enhanced.test.js +0 -138
- package/dist/__tests__/health-map-data.test.js +0 -173
- package/dist/__tests__/helpers/mcp-harness.js +0 -45
- package/dist/__tests__/helpers/mcp-harness.test.js +0 -68
- package/dist/__tests__/hook-dedup.test.js +0 -112
- package/dist/__tests__/hook-runner.test.js +0 -253
- package/dist/__tests__/indexer-cfg.test.js +0 -185
- package/dist/__tests__/indexer-cross-file.test.js +0 -172
- package/dist/__tests__/indexer-extraction.test.js +0 -245
- package/dist/__tests__/indexer-incremental.test.js +0 -232
- package/dist/__tests__/indexer-language-expansion.test.js +0 -165
- package/dist/__tests__/init-push.test.js +0 -131
- package/dist/__tests__/instruction-writer.test.js +0 -179
- package/dist/__tests__/intelligence-integration.test.js +0 -217
- package/dist/__tests__/intent-correlator.test.js +0 -175
- package/dist/__tests__/intent-detector.test.js +0 -235
- package/dist/__tests__/intent-encoder.test.js +0 -167
- package/dist/__tests__/java-build-tool-detection.test.js +0 -174
- package/dist/__tests__/layer3-sprint-q.test.js +0 -160
- package/dist/__tests__/layer3-sprint-r.test.js +0 -91
- package/dist/__tests__/layer3-sprint-s.test.js +0 -183
- package/dist/__tests__/layer3-sprint-t.test.js +0 -201
- package/dist/__tests__/layer3-sprint-u.test.js +0 -174
- package/dist/__tests__/layer4-sprint-ba2.test.js +0 -354
- package/dist/__tests__/layer4-sprint-ba4.test.js +0 -84
- package/dist/__tests__/layer4-sprint-vs.test.js +0 -105
- package/dist/__tests__/ledger-chains.test.js +0 -162
- package/dist/__tests__/lifecycle-machine.test.js +0 -226
- package/dist/__tests__/local-chat-provider.test.js +0 -170
- package/dist/__tests__/local-convention-detector.test.js +0 -308
- package/dist/__tests__/local-embeddings.test.js +0 -422
- package/dist/__tests__/local-graph.test.js +0 -540
- package/dist/__tests__/local-indexer.test.js +0 -228
- package/dist/__tests__/local-intelligence-l3.test.js +0 -332
- package/dist/__tests__/local-llm.test.js +0 -253
- package/dist/__tests__/local-mode-offline.test.js +0 -187
- package/dist/__tests__/local-mode-stats.test.js +0 -273
- package/dist/__tests__/local-mode-tui.test.js +0 -343
- package/dist/__tests__/local-parse.test.js +0 -199
- package/dist/__tests__/log-tailer.test.js +0 -208
- package/dist/__tests__/loop-breaker.test.js +0 -276
- package/dist/__tests__/loop-miner.test.js +0 -226
- package/dist/__tests__/mcp-config.test.js +0 -126
- package/dist/__tests__/mcp-content-json.test.js +0 -10
- package/dist/__tests__/mcp-envelope.test.js +0 -124
- package/dist/__tests__/metrics-store.test.js +0 -223
- package/dist/__tests__/native-watcher.test.js +0 -191
- package/dist/__tests__/navigation-hooks-agent-aware.test.js +0 -145
- package/dist/__tests__/negative-knowledge.test.js +0 -116
- package/dist/__tests__/network-boundary.test.js +0 -190
- package/dist/__tests__/network-firewall.test.js +0 -112
- package/dist/__tests__/nudge-invariants.test.js +0 -160
- package/dist/__tests__/nudge-v2.test.js +0 -225
- package/dist/__tests__/offline-rewind.test.js +0 -251
- package/dist/__tests__/open-threads.test.js +0 -89
- package/dist/__tests__/output-compressor.test.js +0 -93
- package/dist/__tests__/pending-violations.test.js +0 -112
- package/dist/__tests__/persistence-effectiveness.test.js +0 -143
- package/dist/__tests__/provider-factory.test.js +0 -42
- package/dist/__tests__/providers.test.js +0 -24
- package/dist/__tests__/proxy.test.js +0 -314
- package/dist/__tests__/query-router.test.js +0 -1018
- package/dist/__tests__/reasoning-quality-route.test.js +0 -138
- package/dist/__tests__/redactor.test.js +0 -120
- package/dist/__tests__/resource-monitor.test.js +0 -57
- package/dist/__tests__/response-envelope.test.js +0 -100
- package/dist/__tests__/risk-classifier.test.js +0 -101
- package/dist/__tests__/risk-signal-scope.test.js +0 -75
- package/dist/__tests__/rule-evaluator.test.js +0 -280
- package/dist/__tests__/scip-decoder.test.js +0 -49
- package/dist/__tests__/scip-downloader.test.js +0 -201
- package/dist/__tests__/scip-merger.test.js +0 -103
- package/dist/__tests__/search-index.test.js +0 -422
- package/dist/__tests__/semantic-enrichment.test.js +0 -360
- package/dist/__tests__/session-brief-builder.test.js +0 -187
- package/dist/__tests__/session-context.test.js +0 -221
- package/dist/__tests__/session-continuity.test.js +0 -144
- package/dist/__tests__/session-dedup.test.js +0 -74
- package/dist/__tests__/session-event-wiring.test.js +0 -206
- package/dist/__tests__/session-events.test.js +0 -149
- package/dist/__tests__/session-legend.test.js +0 -20
- package/dist/__tests__/session-persistence.test.js +0 -131
- package/dist/__tests__/session-resume-block.test.js +0 -107
- package/dist/__tests__/session-resume.test.js +0 -97
- package/dist/__tests__/session-summary-writer.test.js +0 -134
- package/dist/__tests__/shadow-ledger.test.js +0 -203
- package/dist/__tests__/shell-classifier.test.js +0 -151
- package/dist/__tests__/shell-compression-floor.test.js +0 -189
- package/dist/__tests__/shell-compression-v2.test.js +0 -339
- package/dist/__tests__/shell-compressor.test.js +0 -35
- package/dist/__tests__/shell-hooks.test.js +0 -128
- package/dist/__tests__/shell-strategies.test.js +0 -644
- package/dist/__tests__/shell-tee.test.js +0 -133
- package/dist/__tests__/signal-dedup.test.js +0 -158
- package/dist/__tests__/signal-reinforcer.test.js +0 -77
- package/dist/__tests__/signal-scorer.test.js +0 -251
- package/dist/__tests__/signal-show-store.test.js +0 -108
- package/dist/__tests__/smart-truncate.test.js +0 -215
- package/dist/__tests__/snapshot-v2.test.js +0 -113
- package/dist/__tests__/sprint-l1-local-mode.test.js +0 -130
- package/dist/__tests__/sprint-l10-boot.test.js +0 -220
- package/dist/__tests__/sprint-l9-offline-commands.test.js +0 -189
- package/dist/__tests__/sprint-q-persistent-context.test.js +0 -198
- package/dist/__tests__/sprint-s1-wiring.test.js +0 -215
- package/dist/__tests__/sprint-s2-wiring.test.js +0 -256
- package/dist/__tests__/sprint-s3-wiring.test.js +0 -195
- package/dist/__tests__/sprint-s4-wiring.test.js +0 -213
- package/dist/__tests__/sprint-s6-hooks.test.js +0 -222
- package/dist/__tests__/sprint-s7-persistent.test.js +0 -263
- package/dist/__tests__/sprint-s8-value.test.js +0 -167
- package/dist/__tests__/sprint-s9-behavioral.test.js +0 -179
- package/dist/__tests__/sprint3-intelligence.test.js +0 -297
- package/dist/__tests__/sprint5-mcp-server.test.js +0 -136
- package/dist/__tests__/startup-display.test.js +0 -302
- package/dist/__tests__/startup-log-file.test.js +0 -97
- package/dist/__tests__/stash-manager.test.js +0 -229
- package/dist/__tests__/state-detector.test.js +0 -92
- package/dist/__tests__/status-dashboard.test.js +0 -142
- package/dist/__tests__/temporal-facts.test.js +0 -292
- package/dist/__tests__/temporal-routes.test.js +0 -142
- package/dist/__tests__/test-detector.test.js +0 -174
- package/dist/__tests__/theme.test.js +0 -72
- package/dist/__tests__/timeline-agents.test.js +0 -122
- package/dist/__tests__/timeline-bootstrap.test.js +0 -176
- package/dist/__tests__/timeline-filters.test.js +0 -193
- package/dist/__tests__/timeline-markers.test.js +0 -151
- package/dist/__tests__/timeline-routes.test.js +0 -156
- package/dist/__tests__/timeline-store.test.js +0 -171
- package/dist/__tests__/token-counter.test.js +0 -86
- package/dist/__tests__/token-estimator.test.js +0 -96
- package/dist/__tests__/token-flow-api.test.js +0 -239
- package/dist/__tests__/token-flow-instrumentation.test.js +0 -437
- package/dist/__tests__/token-flow-persistence.test.js +0 -356
- package/dist/__tests__/token-flow-routes.test.js +0 -199
- package/dist/__tests__/token-flow.test.js +0 -695
- package/dist/__tests__/tool-clusters.test.js +0 -177
- package/dist/__tests__/transport-mux.test.js +0 -283
- package/dist/__tests__/turn-segmenter.test.js +0 -166
- package/dist/__tests__/uninstall.test.js +0 -141
- package/dist/__tests__/warm-start-policy.test.js +0 -271
- package/dist/__tests__/wire-cap-nudge.test.js +0 -77
- package/dist/__tests__/worker-pool.test.js +0 -101
- package/dist/ui/assets/index-7gl3mIuY.css +0 -1
- package/dist/ui/assets/index-CX4FCWGT.js +0 -10
- package/dist/ui/assets/rolldown-runtime-S-ySWqyJ.js +0 -1
- package/dist/ui/assets/vis-network-NIJHUFI3.js +0 -908
- package/dist/ui/fonts/jetbrains-mono-latin-400-normal.woff +0 -0
- package/dist/ui/icon-wordmark.png +0 -0
- package/dist/ui/icon-wordmark.svg +0 -30
- package/dist/ui/icon.png +0 -0
- package/dist/ui/icon.svg +0 -25
- package/dist/ui/index.html +0 -15
- package/dist/ui/prototype-sandbox/index.html +0 -257
- package/dist/ui/screenshots/activity.png +0 -0
- package/dist/ui/screenshots/code-base-intelligence.png +0 -0
- package/dist/ui/screenshots/dashboard.png +0 -0
- package/dist/ui/screenshots/project-memory.png +0 -0
- package/dist/ui/screenshots/reasoning-quality.png +0 -0
- package/dist/ui/screenshots/reasoning-session.png +0 -0
- package/dist/ui/screenshots/token-session.png +0 -0
- package/dist/ui/screenshots/token-trace-main.png +0 -0
- package/dist/ui/screenshots/token-turn.png +0 -0
- package/dist/ui/unerr-wordmark.png +0 -0
- package/dist/ui/unerr-wordmark.svg +0 -9
- package/dist/ui/unerr.png +0 -0
- package/dist/ui/unerr.svg +0 -25
- package/dist/ui/web-app-manifest-192x192.png +0 -0
- package/dist/ui/web-app-manifest-512x512.png +0 -0
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ Run `unerr` and open the dashboard. Four panes, all live:
|
|
|
48
48
|
|
|
49
49
|
| Pane | Answers the question | Powered by |
|
|
50
50
|
|---|---|---|
|
|
51
|
-
| **Token Optimization** | *How much context did unerr save my agent this session?* — saved vs. delivered, compounding multiplier, breakdown by mechanism (compression, graph hits, skipped re-reads). | Per-turn ledger of every tool call |
|
|
51
|
+
| **Token Optimization** | *How much context did unerr save my agent this session?* — saved vs. delivered, compounding multiplier, breakdown by mechanism (compression, graph hits, skipped re-reads, web fetches). | Per-turn ledger of every tool call |
|
|
52
52
|
| **Reasoning Quality** | *Did the agent actually use what it remembered?* — 4-pillar score across exploration, planning, execution, persistent memory. | 5-turn outcome window per fact/convention |
|
|
53
53
|
| **Codebase Map + Code Intelligence** | *What's the call graph and where are the blast-radius landmines?* — entities, edges, fan-in/out chokepoints, cross-module surprise links. | CozoDB graph (in-process, <5ms) |
|
|
54
54
|
| **Project Memory + Activity** | *What did we already learn, and what was I doing last time?* — facts the agent recorded, sessions stitched into intents, open blockers. | Append-only fact store + timeline.db |
|
|
@@ -57,6 +57,10 @@ The agent reads from the same store through MCP — every claim on the dashboard
|
|
|
57
57
|
|
|
58
58
|
### See it in action
|
|
59
59
|
|
|
60
|
+
<p align="center">
|
|
61
|
+
<img src="https://unerr.dev/open-cli/video/unerr_short.gif" alt="unerr in action" width="720" />
|
|
62
|
+
</p>
|
|
63
|
+
|
|
60
64
|
<table align="center">
|
|
61
65
|
<tr>
|
|
62
66
|
<td align="center" width="240">
|
|
@@ -65,7 +69,7 @@ The agent reads from the same store through MCP — every claim on the dashboard
|
|
|
65
69
|
</td>
|
|
66
70
|
<td align="center" width="240">
|
|
67
71
|
<img src="https://unerr.dev/open-cli/screenshots/token-trace-main.png" alt="unerr token trace — global" width="240" height="150" />
|
|
68
|
-
<br/><sub><strong>Token Trace · global</strong><br/>Aggregate savings across every session, broken down by mechanism (graph, file_read, shell, dedup, format).</sub>
|
|
72
|
+
<br/><sub><strong>Token Trace · global</strong><br/>Aggregate savings across every session, broken down by mechanism (graph, file_read, fetch_url, shell, dedup, format).</sub>
|
|
69
73
|
</td>
|
|
70
74
|
<td align="center" width="240">
|
|
71
75
|
<img src="https://unerr.dev/open-cli/screenshots/token-session.png" alt="unerr token trace — session" width="240" height="150" />
|
|
@@ -106,68 +110,30 @@ The agent reads from the same store through MCP — every claim on the dashboard
|
|
|
106
110
|
|
|
107
111
|
## Quick Start
|
|
108
112
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
npm install -g @unerr-ai/unerr
|
|
113
|
-
```
|
|
113
|
+
Three steps. Step 1 is once per machine; steps 2–3 are per repo.
|
|
114
114
|
|
|
115
|
-
###
|
|
115
|
+
### 1. Install the CLI
|
|
116
116
|
|
|
117
117
|
```bash
|
|
118
|
-
unerr
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
This ensures `unerr` is available in **all** terminal sessions — not just the one you installed from. If your PATH isn't configured correctly (common with nvm, fnm, volta, or pnpm), `unerr doctor` detects the issue and offers to fix it automatically by updating your shell config (`~/.zshrc`, `~/.bashrc`, or `~/.config/fish/config.fish`).
|
|
122
|
-
|
|
123
|
-
> **Why this matters:** Global npm packages are installed to a directory that some shells don't include by default. Without this step, `unerr` might work in your current terminal but fail in new ones — which breaks IDE integrations that spawn `unerr --mcp` in a fresh shell.
|
|
124
|
-
|
|
125
|
-
### 3. Choose your mode
|
|
126
|
-
|
|
127
|
-
<table>
|
|
128
|
-
<tr>
|
|
129
|
-
<th width="50%">Standalone (single repo, simple)</th>
|
|
130
|
-
<th width="50%">Daemon Mode (multi-repo, recommended)</th>
|
|
131
|
-
</tr>
|
|
132
|
-
<tr>
|
|
133
|
-
<td>
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
cd ~/project
|
|
137
|
-
unerr install cursor # install MCP config + skills
|
|
138
|
-
unerr # start per-repo process
|
|
118
|
+
npm install -g @unerr-ai/unerr
|
|
139
119
|
```
|
|
140
120
|
|
|
141
|
-
|
|
121
|
+
Puts the `unerr` binary on your PATH. If the global `npm` directory isn't already in your shell's PATH (common with nvm, fnm, volta, pnpm), run `unerr doctor` once — it patches your shell config and won't need to run again.
|
|
142
122
|
|
|
143
|
-
|
|
144
|
-
<td>
|
|
123
|
+
### 2. Install for your agent (per repo)
|
|
145
124
|
|
|
146
125
|
```bash
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
unerr install cursor # install config + register repo
|
|
150
|
-
# done — IDE auto-connects via unerrd
|
|
126
|
+
cd ~/your-project
|
|
127
|
+
unerr install cursor
|
|
151
128
|
```
|
|
152
129
|
|
|
153
|
-
|
|
130
|
+
Writes the MCP config, skills, hooks, and instructions for that agent in the current repo. Swap `cursor` for any of the [supported agents](#supported-agents): `claude-code`, `windsurf`, `gemini-cli`, `antigravity`, `github-copilot-cli`.
|
|
154
131
|
|
|
155
|
-
|
|
156
|
-
</tr>
|
|
157
|
-
</table>
|
|
158
|
-
|
|
159
|
-
> **Important:** After running `unerr install`, restart your coding AI session (close and reopen the IDE or start a new chat) for unerr to take effect. The agent needs to pick up the newly installed MCP config, skills, and instructions.
|
|
132
|
+
### 3. Restart your IDE
|
|
160
133
|
|
|
161
|
-
|
|
134
|
+
Close and reopen your IDE (or start a new chat session). Your agent picks up unerr through MCP — graph-backed tools, persistent memory, shell compression all available immediately.
|
|
162
135
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
| Command | What it does | What it does NOT do |
|
|
166
|
-
|---------|------|------|
|
|
167
|
-
| `unerr daemon initialize` | Registers unerrd at boot (launchd/systemd/schtasks) + starts it | - |
|
|
168
|
-
| `unerr install <agent>` | MCP config + skills + hooks + instructions + gitignore. If unerrd running: registers the repo | Start unerrd, start per-repo process |
|
|
169
|
-
| `unerr --mcp` | Bridges to running process (standalone or daemon-managed) | Spawn unerrd, register repos, start processes |
|
|
170
|
-
| `unerr` (no args) | Starts a standalone per-repo proxy | Touch the daemon |
|
|
136
|
+
> **Dashboard:** <http://localhost:9847> — open any time to watch token savings, reasoning quality, and the codebase map update as your agent works.
|
|
171
137
|
|
|
172
138
|
### Supported agents
|
|
173
139
|
|
|
@@ -180,11 +146,11 @@ unerr install gemini-cli # → .gemini/settings.json + GEMINI.md + .gemi
|
|
|
180
146
|
unerr install github-copilot-cli # → .copilot/mcp-config.json + .github/copilot-instructions.md + .github/skills/
|
|
181
147
|
```
|
|
182
148
|
|
|
183
|
-
|
|
149
|
+
Install multiple agents in the same repo — each writes its own config:
|
|
184
150
|
|
|
185
151
|
```bash
|
|
186
|
-
unerr install cursor
|
|
187
|
-
unerr install claude-code
|
|
152
|
+
unerr install cursor
|
|
153
|
+
unerr install claude-code
|
|
188
154
|
```
|
|
189
155
|
|
|
190
156
|
> Need manual setup? `unerr install --show-instructions <agent>` prints copy-pasteable steps.
|
|
@@ -206,17 +172,16 @@ unerr install claude-code # skips registration (already done), writes claude-c
|
|
|
206
172
|
</details>
|
|
207
173
|
|
|
208
174
|
<details>
|
|
209
|
-
<summary>What <code>unerr install</code>
|
|
210
|
-
|
|
211
|
-
|
|
|
212
|
-
|
|
213
|
-
| MCP config
|
|
214
|
-
| Skills
|
|
215
|
-
| Instructions
|
|
216
|
-
| Hooks
|
|
217
|
-
|
|
|
218
|
-
|
|
|
219
|
-
| Force tools | Claude Code only: denies built-in Read/Grep/Glob (opt out: `--no-force-tools`) | `.claude/settings.json` |
|
|
175
|
+
<summary>What <code>unerr install</code> writes</summary>
|
|
176
|
+
|
|
177
|
+
| Item | File(s) |
|
|
178
|
+
|------|------|
|
|
179
|
+
| MCP config pointing to `unerr --mcp` | `.mcp.json`, `.cursor/mcp.json`, … |
|
|
180
|
+
| Skills — 12 definitions teaching the agent when to use each tool | `.claude/skills/`, `.cursor/rules/`, … |
|
|
181
|
+
| Instructions — tool-routing table injected into the agent's instruction file | `CLAUDE.md`, `.cursor/rules/unerr-instructions.mdc` |
|
|
182
|
+
| Hooks — shell compression + tool-adoption nudging | `.claude/settings.json`, `.cursor/hooks.json` |
|
|
183
|
+
| Gitignore — keeps `.unerr/` out of commits | `.gitignore` |
|
|
184
|
+
| Force tools (Claude Code only) — denies built-in Read/Grep/Glob so the agent uses graph tools. Opt out with `--no-force-tools`. | `.claude/settings.json` |
|
|
220
185
|
|
|
221
186
|
Idempotent — re-running updates if content changed, skips if identical. Remove with `unerr uninstall`.
|
|
222
187
|
|
|
@@ -232,6 +197,7 @@ Idempotent — re-running updates if content changed, skips if identical. Remove
|
|
|
232
197
|
- **Blast radius before edits** — `get_references` returns every caller. No more confident wrong changes that ripple across services.
|
|
233
198
|
- **Targeted file reads** — `file_read({entity: "fnName"})` returns just that function + relevant conventions/facts, not 2000 lines.
|
|
234
199
|
- **Shell compression** — 11 strategies, 645+ command classifiers. Diffs, errors, logs, test runs, YAML — each compressed differently. **93% average compression** across real-world benchmarks (2 MB → 138 KB). Raw output is kept on disk; the agent can recover it on demand.
|
|
200
|
+
- **Web fetches** — `fetch_url` strips page chrome via Defuddle/Readability, converts to markdown, splits into heading-bounded passages, optionally re-ranks with BM25 when a `prompt` is supplied, and caches by content hash. Replaces built-in WebFetch — **5–10× fewer tokens** per page.
|
|
235
201
|
- **Convention awareness** — naming, structure, import patterns auto-detected and injected into the agent's context.
|
|
236
202
|
- **Tool adoption nudging** — five reinforcement layers (exec nudges, hook interception, instruction injection, skill reminders, default-deny of built-ins on Claude Code) push the agent to use the graph instead of grep.
|
|
237
203
|
|
|
@@ -243,9 +209,9 @@ Idempotent — re-running updates if content changed, skips if identical. Remove
|
|
|
243
209
|
- **Loop prevention** — a circuit breaker fires after repeated failed attempts on the same entity, surfacing the failure mode instead of letting the agent thrash.
|
|
244
210
|
- **Memory-effectiveness scoring** — every fact and convention opens a 5-turn observation window and resolves to a verdict (reinforced / acted_on / caught / ignored / corrected). The Reasoning Quality pane shows the **load-bearing rate** — not just how much the agent remembered, but how much of it actually mattered.
|
|
245
211
|
|
|
246
|
-
###
|
|
212
|
+
### Background behaviors
|
|
247
213
|
|
|
248
|
-
|
|
214
|
+
While unerr is running these activate automatically — no extra commands:
|
|
249
215
|
|
|
250
216
|
- **Architecture guard** — flags structural violations before they ship.
|
|
251
217
|
- **Cascade guard** — warns when an edit has wide blast radius.
|
|
@@ -321,20 +287,23 @@ AI Agent (Claude Code / Cursor / Windsurf / any MCP client)
|
|
|
321
287
|
│
|
|
322
288
|
├── stdio MCP ──→ unerr --mcp (bridge, per IDE session)
|
|
323
289
|
│ │
|
|
324
|
-
│ └── UDS ──→
|
|
290
|
+
│ └── UDS ──→ unerrd (lightweight Node process,
|
|
291
|
+
│ one per machine, auto-spawned)
|
|
325
292
|
│ │
|
|
326
|
-
│
|
|
327
|
-
│
|
|
328
|
-
│
|
|
329
|
-
│
|
|
330
|
-
│
|
|
331
|
-
│
|
|
332
|
-
│
|
|
293
|
+
│ └── per-repo unerr process(es)
|
|
294
|
+
│ │
|
|
295
|
+
│ ├── CozoDB graph (in-process, <5ms)
|
|
296
|
+
│ ├── Fact store (cross-session memory)
|
|
297
|
+
│ ├── Timeline + ledger (every tool call)
|
|
298
|
+
│ ├── File watcher (incremental reindex)
|
|
299
|
+
│ ├── Convention engine
|
|
300
|
+
│ ├── Compression engine (11 strategies, 645+ classifiers)
|
|
301
|
+
│ └── Behavior modules (cascade-guard, loop-breaker, auto-doc…)
|
|
333
302
|
│
|
|
334
|
-
└── Dashboard ──→ http://localhost
|
|
303
|
+
└── Dashboard ──→ http://localhost:9847 (SSE-streamed live)
|
|
335
304
|
```
|
|
336
305
|
|
|
337
|
-
|
|
306
|
+
One local DB per repo. Zero network calls. No API keys. No cloud. Your code never leaves the machine.
|
|
338
307
|
|
|
339
308
|
---
|
|
340
309
|
|
|
@@ -386,6 +355,12 @@ Inline markers the agent emits as it works. Persisted to the shadow ledger and `
|
|
|
386
355
|
| `mark_blocker` | Flags an unresolved obstacle. Carries into the next session's resume strip |
|
|
387
356
|
| `mark_resolution` | Resolves a prior blocker by `marker_id` |
|
|
388
357
|
|
|
358
|
+
### Web Fetch (1)
|
|
359
|
+
|
|
360
|
+
| Tool | What the agent gets |
|
|
361
|
+
|------|-----|
|
|
362
|
+
| `fetch_url` | DOM-extracted markdown of a web page (Defuddle/Readability), split into heading-bounded passages, optionally re-ranked by BM25 against a `prompt`, cached by content hash. Replaces built-in WebFetch — 5–10× fewer tokens. Optional Playwright SPA fallback. |
|
|
363
|
+
|
|
389
364
|
Every response includes `_meta` (latency, risk level, drift status) and inline `ur|<tag>` signals for high-priority guidance (drift, blast-radius warnings, circuit-breaker halts).
|
|
390
365
|
|
|
391
366
|
---
|
|
@@ -394,31 +369,17 @@ Every response includes `_meta` (latency, risk level, drift status) and inline `
|
|
|
394
369
|
<summary><strong>CLI commands</strong></summary>
|
|
395
370
|
|
|
396
371
|
```bash
|
|
397
|
-
unerr
|
|
398
|
-
unerr
|
|
399
|
-
unerr doctor # Check PATH + environment
|
|
400
|
-
unerr
|
|
401
|
-
unerr uninstall # Remove unerr integration from agents in this repo
|
|
402
|
-
unerr status # Show proxy health, entity count, graph age
|
|
372
|
+
unerr install <agent> # MCP config + skills + hooks + instructions for one agent
|
|
373
|
+
unerr uninstall # Remove unerr integration from this repo
|
|
374
|
+
unerr doctor # Check PATH + environment, auto-fix if unerr isn't on all shells
|
|
375
|
+
unerr status # Proxy health, entity count, graph age
|
|
403
376
|
unerr stats # Session statistics (tokens, tool calls, compression)
|
|
404
|
-
```
|
|
405
377
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
```bash
|
|
409
|
-
unerr daemon start # Start the unerrd supervisor
|
|
410
|
-
unerr daemon stop # Gracefully stop unerrd + all managed repos
|
|
411
|
-
unerr daemon status # Show all managed repos, PIDs, memory, idle time
|
|
412
|
-
unerr daemon add <path> # Register a repo (indexes on next access)
|
|
413
|
-
unerr daemon remove <path> # Unregister a repo
|
|
414
|
-
unerr daemon config <path> <k=v> # Set per-repo settings (idleTimeout, javaBuildTool, etc.)
|
|
415
|
-
unerr daemon autostart on|off|status # Manage start-at-login (launchd/systemd/schtasks)
|
|
416
|
-
unerr daemon logs [--repo <path>] [--follow] # Tail daemon/repo logs
|
|
417
|
-
unerr daemon dashboard # Open the unified dashboard in browser
|
|
418
|
-
unerr daemon update # Check for updates, install, restart
|
|
378
|
+
unerr --mcp # Stdio bridge — what your IDE invokes via .mcp.json
|
|
379
|
+
unerr # Start a standalone per-repo proxy (rare — IDE invocation covers this)
|
|
419
380
|
```
|
|
420
381
|
|
|
421
|
-
|
|
382
|
+
`unerr pm …` manages the cross-repo `unerrd` process — see the [reference](#process-manager-command-reference) below.
|
|
422
383
|
|
|
423
384
|
</details>
|
|
424
385
|
|
|
@@ -428,16 +389,17 @@ See the [full command reference](#daemon-command-reference) below.
|
|
|
428
389
|
```
|
|
429
390
|
src/
|
|
430
391
|
entrypoints/ CLI entry + boot state machine
|
|
431
|
-
proxy/ MCP server
|
|
392
|
+
proxy/ Per-repo MCP server, stdio↔UDS bridge, session stats, shell compression
|
|
393
|
+
daemon/ Process manager (unerrd) — registry, supervisor, spawn lock, HTTP API
|
|
432
394
|
intelligence/ CozoDB graph, AST extraction, conventions, rules, search, semantic
|
|
433
395
|
tracking/ Prompt ledger, drift detection, git attribution
|
|
434
396
|
behaviors/ Cascade guard, loop breaker, auto-doc, change narrative…
|
|
435
|
-
commands/ CLI commands (install, status, stats,
|
|
397
|
+
commands/ CLI commands (install, status, stats, pm, debug, …)
|
|
436
398
|
tools/ MCP tool implementations (intelligence + coding)
|
|
437
399
|
hooks/ Claude Code hook system integration
|
|
438
|
-
skills/
|
|
400
|
+
skills/ 12 bundled skill definitions
|
|
439
401
|
server/ + ui/ HTTP API + React (Vite) dashboard
|
|
440
|
-
config/ Agent registry
|
|
402
|
+
config/ Agent registry, MCP config writer, instruction injector
|
|
441
403
|
schemas/ Zod schemas
|
|
442
404
|
```
|
|
443
405
|
|
|
@@ -486,109 +448,30 @@ See [CLAUDE.md](./CLAUDE.md) for full conventions.
|
|
|
486
448
|
|
|
487
449
|
---
|
|
488
450
|
|
|
489
|
-
##
|
|
490
|
-
|
|
491
|
-
The `unerrd` supervisor is a single lightweight process that manages all your registered repositories. It replaces the need to run `unerr` separately in each repo.
|
|
451
|
+
## Process Manager Command Reference
|
|
492
452
|
|
|
493
|
-
|
|
453
|
+
`unerrd` is a lightweight Node process that supervises every registered repo. Your IDE invocation auto-spawns it; it exits cleanly after 30 minutes of no MCP activity. You rarely run these commands directly, but they're here when you want a look under the hood.
|
|
494
454
|
|
|
495
455
|
```bash
|
|
496
|
-
unerr
|
|
497
|
-
unerr
|
|
498
|
-
unerr
|
|
499
|
-
# memory usage, connection count, idle time, update notices
|
|
500
|
-
```
|
|
456
|
+
unerr pm status # PID, uptime, repos, memory, idle countdown
|
|
457
|
+
unerr pm start # Start manually (auto-spawn usually covers this)
|
|
458
|
+
unerr pm stop # Graceful shutdown — stops children, flushes state
|
|
501
459
|
|
|
502
|
-
|
|
460
|
+
unerr pm add <path> # Register a repo (auto-registered on first MCP call)
|
|
461
|
+
unerr pm remove <path> # Unregister a repo
|
|
462
|
+
unerr pm config <path> <key>=<value> # Per-repo settings (idleTimeout, javaBuildTool, …)
|
|
503
463
|
|
|
504
|
-
|
|
505
|
-
unerr
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
# - Detects parent/child directory conflicts
|
|
509
|
-
# - Installs platform auto-start on first add
|
|
510
|
-
|
|
511
|
-
unerr daemon remove <path> # Unregister — stops the child process if running, removes entry
|
|
512
|
-
|
|
513
|
-
unerr daemon config <path> <key>=<value> # Set per-repo settings:
|
|
514
|
-
# idleTimeout=600 seconds before idle sweep stops the repo
|
|
515
|
-
# javaBuildTool=gradle skip detection heuristic
|
|
516
|
-
# autostart=false exclude from warm-start at boot
|
|
517
|
-
```
|
|
518
|
-
|
|
519
|
-
### Auto-Start (Start at Login)
|
|
520
|
-
|
|
521
|
-
```bash
|
|
522
|
-
unerr daemon autostart on # Install platform service:
|
|
523
|
-
# macOS: ~/Library/LaunchAgents/dev.unerr.daemon.plist
|
|
524
|
-
# Linux: ~/.config/systemd/user/unerr-daemon.service
|
|
525
|
-
# Windows: schtasks /create ... (or Startup folder .cmd)
|
|
464
|
+
unerr pm logs # Tail ~/.unerr/logs/unerrd.log
|
|
465
|
+
unerr pm logs --repo <path> # Tail a specific repo's log
|
|
466
|
+
unerr pm logs --bridge --follow # Stream bridge session logs continuously
|
|
467
|
+
unerr pm logs --boot # Most recent spawn sequence only
|
|
526
468
|
|
|
527
|
-
unerr
|
|
528
|
-
unerr daemon autostart status # Show whether auto-start is installed and running
|
|
469
|
+
unerr pm dashboard # Open http://localhost:9847 in your browser
|
|
529
470
|
```
|
|
530
471
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
### Warm Start
|
|
534
|
-
|
|
535
|
-
After boot, the supervisor pre-spawns your Most Recently Used repos at low priority:
|
|
536
|
-
|
|
537
|
-
```bash
|
|
538
|
-
unerr daemon set --warm-start-budget 3 # Max repos to warm-start (default: 3)
|
|
539
|
-
unerr daemon set --warm-start-idle-days 7 # Skip repos inactive for >N days
|
|
540
|
-
unerr daemon set --warm-start-delay-ms 5000 # Delay before warm-start begins
|
|
541
|
-
```
|
|
542
|
-
|
|
543
|
-
Warm-start aborts if the system is on battery or under high load.
|
|
544
|
-
|
|
545
|
-
### Logs
|
|
546
|
-
|
|
547
|
-
```bash
|
|
548
|
-
unerr daemon logs # Tail the supervisor log (~/.unerr/logs/unerrd.log)
|
|
549
|
-
unerr daemon logs --repo <path> # Tail a specific repo's log
|
|
550
|
-
unerr daemon logs --bridge # Tail bridge session logs
|
|
551
|
-
unerr daemon logs --follow # Stream continuously (like tail -f)
|
|
552
|
-
unerr daemon logs -n 50 # Last N lines
|
|
553
|
-
unerr daemon logs --boot # Show only the most recent boot sequence
|
|
554
|
-
```
|
|
555
|
-
|
|
556
|
-
### Dashboard
|
|
557
|
-
|
|
558
|
-
```bash
|
|
559
|
-
unerr daemon dashboard # Opens http://localhost:9847 in your default browser
|
|
560
|
-
```
|
|
561
|
-
|
|
562
|
-
The unified dashboard shows:
|
|
563
|
-
- **Global overview** — all registered repos, their health, active sessions
|
|
564
|
-
- **Repo switcher** — click into any repo for its full intelligence dashboard
|
|
565
|
-
- **Supervisor info** — uptime, memory, warm-start events, version status
|
|
566
|
-
|
|
567
|
-
### Updates
|
|
568
|
-
|
|
569
|
-
```bash
|
|
570
|
-
unerr daemon update # Check npm registry → confirm → stop → install → restart → verify
|
|
571
|
-
unerr daemon dismiss-update <version> # Suppress notification for a specific version
|
|
572
|
-
```
|
|
573
|
-
|
|
574
|
-
Update notifications appear as:
|
|
575
|
-
- A CLI banner on `unerr daemon status` and `unerr` startup
|
|
576
|
-
- A dashboard banner with version diff and changelog link
|
|
577
|
-
- An `_meta["dev.unerr/update_available"]` field in MCP responses (when >2 minor versions behind)
|
|
578
|
-
|
|
579
|
-
Updates are never auto-applied — the agent and supervisor remain stable mid-session.
|
|
580
|
-
|
|
581
|
-
### How auto-spawn works
|
|
582
|
-
|
|
583
|
-
When your IDE opens and spawns `unerr --mcp`:
|
|
584
|
-
|
|
585
|
-
1. Bridge checks for a per-repo UDS socket (`.unerr/state/proxy.sock`)
|
|
586
|
-
2. If not found, queries the supervisor's UDS socket (`~/.unerr/state/unerrd.sock`)
|
|
587
|
-
3. If supervisor isn't running, auto-spawns it as a detached background process
|
|
588
|
-
4. Supervisor ensures the repo is registered and its child process is running
|
|
589
|
-
5. Bridge connects — MCP requests flow through
|
|
472
|
+
**Dashboard** shows the global overview (registered repos, health, active sessions), a repo switcher into each repo's full intelligence dashboard, and process-manager info (uptime, memory, idle countdown).
|
|
590
473
|
|
|
591
|
-
|
|
474
|
+
**Updates** — `npm i -g @unerr-ai/unerr` and restart the IDE. The next bridge invocation re-spawns the manager on the new version.
|
|
592
475
|
|
|
593
476
|
---
|
|
594
477
|
|