dreamd-mcp 1.2.0 → 1.2.1

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
@@ -1,225 +1,177 @@
1
1
  # dreamd-mcp
2
2
 
3
- Local-first memory for AI coding agents. One `.agent/` folder in your repo, shared by Claude Code, Cursor and Cline over MCP. What one agent learns, the next already knows. Plain files you can `cat`, `grep` and `git diff`.
3
+ **Agent memory you can trace and undo.** Every lesson cites the events it came from. `blame` shows which memories drove an answer. `forget` removes a bad memory and the lesson state built on it, with a receipt. `git revert` rolls back a whole learning cycle.
4
+
5
+ dreamd is local-first, long-term memory for AI agents, served over MCP to Claude Code, Cursor, Cline and other MCP-aware harnesses. Memory lives in `.agent/` in your repo as JSONL and Markdown and is committed with your code, so you review what agents learned the way you review code.
4
6
 
5
7
  Source, docs and issues: **[github.com/botzrDev/dreamd](https://github.com/botzrDev/dreamd)**
6
8
 
7
- This package is the Node shim for the dreamd MCP server. It downloads the right prebuilt binary for your OS/arch and starts the MCP server over stdio.
9
+ ```sh
10
+ npx -y dreamd-mcp setup # scaffold .agent/ and wire your harness
11
+ npx -y dreamd-mcp # MCP server (stdio): what the harness spawns
12
+ ```
8
13
 
9
- ## Install
14
+ ## Trace and remove a bad memory
10
15
 
11
- Requires a project root sentinel (`.git/`, `Cargo.toml`, `package.json`, or `pyproject.toml`).
16
+ Say an agent keeps repeating advice you know is wrong.
12
17
 
13
18
  ```sh
14
- # 1. Scaffold .agent/ and wire your harness's MCP config
15
- npx -y dreamd-mcp setup
19
+ # 1. Find the memories behind the answer (ids, timestamps, skill_action, BM25, salience, score)
20
+ npx -y dreamd-mcp blame "deploy without tests" --explain
16
21
 
17
- # 2. Start a shared daemon (recommended when multiple agents write)
18
- npx -y dreamd-mcp watch
22
+ # 2. Read the lesson and the events it cites, and check the provenance ledger
23
+ cat .agent/semantic/LESSONS.md
24
+ npx -y dreamd-mcp doctor --provenance
19
25
 
20
- # 3. Reload the harness — it now spawns the MCP server itself
21
- npx -y dreamd-mcp
26
+ # 3. Preview, then remove the bad event. Stop `dreamd watch` and your
27
+ # harness's MCP server first: forget refuses while another writer holds the project.
28
+ npx -y dreamd-mcp forget evt_... --dry-run
29
+ npx -y dreamd-mcp forget evt_... --proof forget-receipt.json
30
+
31
+ # 4. Review the change like code
32
+ git diff .agent/
22
33
  ```
23
34
 
24
- The prebuilt binaries this shim downloads serve MCP over stdio only. The opt-in Streamable HTTP transport (`dreamd mcp --bind`, unauthenticated) needs a source build with `--features mcp-http`; see [docs/mcp-transports.md](https://github.com/botzrDev/dreamd/blob/main/docs/mcp-transports.md).
35
+ | Step | What it does |
36
+ |---|---|
37
+ | Cite | Every lesson in `.agent/semantic/LESSONS.md` cites the episodic events it was promoted from. The provenance ledger records which event fed which lesson and index entry |
38
+ | `blame <query>` | Lists the stored memories behind a recall. `--explain` adds the salience factors for each hit; `--json` prints one array |
39
+ | `doctor --provenance` | Recomputes the ledger's Merkle root and lists orphan, missing and corrupt edges. Read-only |
40
+ | `forget <event-id>` | Removes the event and the lesson state that names it. `--dry-run` writes nothing; `--proof <path>` writes a `forget-receipt/1.0` file |
41
+ | `git revert` | Each learning cycle commits its output as `dreamd: cycle YYYY-MM-DD`. Revert that commit with the daemon stopped, then run `npx -y dreamd-mcp doctor --repair` to rebuild the recall index |
25
42
 
26
- `setup` prompts when it has a TTY; in scripts pass `--yes` with `--harness claude|cursor|both|none`. It writes each MCP config as 2-space pretty-printed JSON with a trailing newline and does **not** preserve your original formatting, so an existing `.mcp.json` / `.cursor/mcp.json` can come back reformatted — other MCP servers in the file are kept. `npx -y dreamd-mcp init` remains the scaffold-only primitive (store, no harness config), same as `setup --no-write-mcp`.
43
+ After a `forget`, `doctor --provenance` reports the removed event's old ledger edges as orphans and exits 1. That is expected: the ledger is append-only, so it keeps the record that the event once existed.
27
44
 
28
- > **Leave `npx dreamd-mcp` floating — don't pin.** On a fresh spawn, npx
29
- > re-resolves the `latest` dist-tag from the registry, so a floating config always
30
- > starts the current version. Two caveats: a **running** MCP server or `dreamd watch`
31
- > daemon keeps the version it started with until you restart it, and an **offline**
32
- > run falls back to the last-cached binary. A hard version pin
33
- > (`dreamd-mcp@<version>`) is the one form that never picks up new releases.
45
+ **What dreamd does not do.** It does not detect or block poisoned writes, and it does not filter injected lesson content ([SECURITY.md](https://github.com/botzrDev/dreamd/blob/main/SECURITY.md)). `source_harness` is asserted by the caller, not verified. The provenance ledger and the forget receipt are unsigned. dreamd makes bad memory traceable and removable; it does not make it impossible.
34
46
 
35
- No Rust installation required; the shim needs Node 18 or later and `tar` on `PATH`. Prebuilt binaries are available for **Linux x86_64** and **macOS x86_64/aarch64** (see `manifest.json`). The binary is downloaded once from the matching GitHub release into `~/.cache/dreamd-mcp/<version>/` and its SHA-256 is checked against `manifest.json` before every run. On any other platform the shim exits 1.
47
+ ## How agents learn
36
48
 
37
- **This shim ships no Windows binary.** On native Windows `npx -y dreamd-mcp` exits 1 and points you at WSL2. A `dreamd.exe` built from source (or taken from the `windows-x86_64.tar.gz` asset of a GitHub release, when that release has one) runs learn, the dream cycle, and the Tantivy index. `dreamd watch` serves loopback TCP with a bearer token. Start that daemon before `dreamd mcp`. The directory flush follows the Unix call order and is not a power-loss proof ([docs/windows.md](https://github.com/botzrDev/dreamd/blob/main/docs/windows.md)).
49
+ Agents write episodes (what happened, how painful it was, how important) through the MCP tool `append_node` and recall them with `search_nodes`; each hit carries its source harness. A learning cycle (`dreamd dream`) clusters episodes by `skill_action`, promotes a recurring pattern into a lesson in `LESSONS.md` that cites its events, and commits the result to your project's git repo (skipped if either file has uncommitted edits). Recall ranks episodes and lessons with BM25 × salience (age decay, pain, importance, recurrence). Preview the next cycle with `npx -y dreamd-mcp dream --dry`.
38
50
 
39
- ## Commands
51
+ ## Install
40
52
 
41
- `npx -y dreamd-mcp` with no arguments starts the MCP server over stdio. When the first argument is one of the commands below, the whole argument list is forwarded to the native `dreamd` binary unchanged:
53
+ Requires a project root sentinel (`.git/`, `Cargo.toml`, `package.json`, or `pyproject.toml`), Node 18 or later, and `tar` on `PATH`. No Rust needed.
42
54
 
43
- ```text
44
- blame, doctor, dream, forget, init, mcp, memory, reset, salience-drift,
45
- service, setup, uninstall, update, vectors, version, watch
55
+ ```sh
56
+ npx -y dreamd-mcp setup # 1. scaffold .agent/ and wire your harness's MCP config
57
+ npx -y dreamd-mcp watch # 2. shared daemon, recommended when several agents write
58
+ # 3. reload the harness: it now spawns `npx -y dreamd-mcp` itself
46
59
  ```
47
60
 
48
- Any other first argument is passed to `dreamd mcp` (so `npx -y dreamd-mcp --project-root /abs/path` works). That also means the native commands missing from the list — `status`, `recall`, `score`, `archive`, `migrate` — are **not** reachable through the shim; they need a `dreamd` binary on `PATH` (`cargo install --path crates/dreamd-cli` from a source checkout). A leading `--help` / `-h` or `--version` / `-V` is answered by the shim itself; `npx -y dreamd-mcp version` prints the native binary's build info.
49
-
50
- Adapter quickstarts: [Claude Code](https://github.com/botzrDev/dreamd/tree/main/adapters/claude-code) · [Cursor](https://github.com/botzrDev/dreamd/tree/main/adapters/cursor)
61
+ `setup` prompts when it has a TTY; in scripts pass `--yes` with `--harness claude|cursor|both|none`. It rewrites each MCP config as 2-space pretty-printed JSON, so an existing `.mcp.json` or `.cursor/mcp.json` can come back reformatted; other MCP servers in the file are kept. `npx -y dreamd-mcp init` scaffolds the store only, same as `setup --no-write-mcp`. Adapter quickstarts: [Claude Code](https://github.com/botzrDev/dreamd/tree/main/adapters/claude-code) · [Cursor](https://github.com/botzrDev/dreamd/tree/main/adapters/cursor) · [Cline](https://github.com/botzrDev/dreamd/tree/main/adapters/cline)
51
62
 
52
- ## Running several agents at once
63
+ **Several agents at once.** `npx -y dreamd-mcp` connects to a shared daemon if one is running, and otherwise runs a standalone in-process server. Sequential use across tools is safe. To point several agents at the same project simultaneously, start one daemon per machine with `npx -y dreamd-mcp watch` so every write goes through a single serialized writer.
53
64
 
54
- `npx -y dreamd-mcp` auto-connects to a shared daemon if one is running, and otherwise runs a standalone in-process server. Sequential use across tools is safe. If you point **several agents at the same project simultaneously**, start one shared daemon per machine with `npx -y dreamd-mcp watch` (or the native `dreamd watch`) so every agent routes through a single serialized writer. See the [project README](https://github.com/botzrDev/dreamd#quick-start--30-seconds) for the full footprint and crash-safety notes.
65
+ **Platforms.** Prebuilt binaries cover Linux x86_64 and macOS x86_64/aarch64 (see `manifest.json`). Linux x86_64 is one static binary with no glibc requirement, checked on Ubuntu 20.04, Ubuntu 22.04, Debian 12 and Alpine 3.20; Linux arm64 has no prebuilt binary. The binary is downloaded once from the matching GitHub release into `~/.cache/dreamd-mcp/<version>/`, and its SHA-256 is checked against `manifest.json` before every run. On any other platform the shim exits 1. The prebuilt binaries serve MCP over stdio only; the opt-in Streamable HTTP transport needs a source build ([docs/mcp-transports.md](https://github.com/botzrDev/dreamd/blob/main/docs/mcp-transports.md)).
55
66
 
56
- ## Learn more
67
+ **Windows.** This shim ships no Windows binary: on native Windows `npx -y dreamd-mcp` exits 1 and points you at WSL2. A `dreamd.exe` built from source runs learn, the learning cycle and the Tantivy index; start `dreamd watch` before `dreamd mcp` ([docs/windows.md](https://github.com/botzrDev/dreamd/blob/main/docs/windows.md)).
57
68
 
58
- - [GUIDE.md](https://github.com/botzrDev/dreamd/blob/main/GUIDE.md) — 20-minute tutorial walkthrough
59
- - [SPEC.md](https://github.com/botzrDev/dreamd/blob/main/SPEC.md) — on-disk `.agent/` contract
60
- - [docs/troubleshooting.md](https://github.com/botzrDev/dreamd/blob/main/docs/troubleshooting.md) — common failures
61
-
62
- ## Official MCP Registry
69
+ > **Leave `npx dreamd-mcp` floating; don't pin.** On a fresh spawn, npx re-resolves the `latest` dist-tag, so a floating config always starts the current version. A running MCP server or `dreamd watch` daemon keeps the version it started with until you restart it, and an offline run falls back to the last-cached binary.
63
70
 
64
- `server.json` holds the metadata for the [official MCP Registry](https://registry.modelcontextprotocol.io) entry `io.github.botzrDev/dreamd`. The registry serves metadata only — it points at the npm package, so the matching version must already be public on npm before publishing.
65
-
66
- Anyone (including CI) can check the metadata. Validation is non-mutating: it neither authenticates nor writes to the registry.
67
-
68
- ```sh
69
- # from packages/dreamd-mcp
70
- mcp-publisher validate server.json
71
- ```
71
+ ## Commands
72
72
 
73
- Publication is owner-only. `mcp-publisher login github` must authenticate as a GitHub identity authorized for the `botzrDev` namespace — the registry derives the `io.github.botzrDev/*` namespace from that identity and rejects the publish otherwise.
73
+ `npx -y dreamd-mcp` with no arguments starts the MCP server over stdio. When the first argument is one of these, the whole argument list goes to the native `dreamd` binary unchanged:
74
74
 
75
- ```sh
76
- mcp-publisher login github
77
- mcp-publisher publish server.json
78
- curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.botzrDev%2Fdreamd"
75
+ ```text
76
+ archive, blame, doctor, dream, forget, init, mcp, memory, migrate, recall,
77
+ reset, salience-drift, score, service, setup, status, uninstall, update,
78
+ vectors, version, watch
79
79
  ```
80
80
 
81
- The `curl` query is read-only and confirms the entry is live. Publishing is deliberately not automated in CI — no workflow holds registry credentials.
82
-
83
- ## Override (development only)
84
-
85
- Set `DREAMD_BIN=/path/to/dreamd` to skip download and use a local build instead of the cached release binary. Because this bypasses sha256 verification, you must also set `DREAMD_BIN_ALLOW_UNVERIFIED=1` to confirm — `DREAMD_BIN` on its own is refused.
86
-
87
- **Warning:** when `DREAMD_BIN` is set, sha256 verification is skipped. Use this only for local development — never point production MCP configs at an unverified binary.
81
+ Any other first argument is passed to `dreamd mcp` (so `npx -y dreamd-mcp --project-root /abs/path` works). A leading `--help` / `-h` or `--version` / `-V` is answered by the shim itself; `npx -y dreamd-mcp version` prints the native binary's build info.
88
82
 
89
- Build from source (Linux, macOS, or Windows):
83
+ ## Update
90
84
 
91
85
  ```sh
92
- cargo install --path crates/dreamd-cli
93
- export DREAMD_BIN=~/.cargo/bin/dreamd
94
- export DREAMD_BIN_ALLOW_UNVERIFIED=1
95
- npx -y dreamd-mcp
86
+ npx -y dreamd-mcp update # or: dreamd update
96
87
  ```
97
88
 
98
- > First run prints a local-only privacy disclosure. `setup` prompts for harness choice when it has a TTY.
89
+ `update` stops this `$HOME`'s local `dreamd mcp` / `dreamd watch` processes, removes the socket and clears `~/.cache/dreamd-mcp`. Then reload your MCP harness so it drops the old process, and re-run `npx -y dreamd-mcp` to fetch the new binary. It never relaunches anything for you. `--dry-run` prints the plan and changes nothing; `--restart` makes the stop step explicit; `--quiet` / `-q` trims output. It does not touch `~/.npm/_npx`, and it does not replace a binary you built with `cargo install`.
99
90
 
100
91
  ## Uninstall / reset
101
92
 
102
- `dreamd-mcp` is never installed globally — it runs straight from the npx cache and
103
- downloads the native binary into a per-version cache. `npm uninstall -g dreamd-mcp`
104
- is therefore a no-op. There is no `dreamd reset --all` — use `dreamd uninstall`.
105
-
106
- > **Order:** run uninstall (or the manual cleanup steps) → remove the `dreamd`
107
- > block from your MCP client config → reload the client.
108
-
109
- ### Uninstall
93
+ `dreamd-mcp` is never installed globally, so `npm uninstall -g dreamd-mcp` is a no-op. There is no `dreamd reset --all`; use `dreamd uninstall`.
110
94
 
111
95
  ```sh
112
- npx -y dreamd-mcp uninstall # or, with a native binary: dreamd uninstall
96
+ npx -y dreamd-mcp uninstall # prompts for y when stdin is a tty
97
+ npx -y dreamd-mcp uninstall --yes # no prompt; the form to use in a script
113
98
  ```
114
99
 
115
- One command: stops local `dreamd mcp` / `dreamd watch` processes, removes the
116
- daemon socket, unregisters the current project from the registry (skipped with a
117
- benign note when run outside a project root), and clears the native binary cache
118
- (`~/.cache/dreamd-mcp`) plus the dreamd-mcp-scoped entries under `~/.npm/_npx`.
119
- Safe to run twice — a second run succeeds with nothing left to do.
100
+ It stops this `$HOME`'s local `dreamd mcp` / `dreamd watch` processes, removes the daemon socket, unregisters the current project from the registry (skipped with a note outside a project root), and clears `~/.cache/dreamd-mcp` plus the dreamd-mcp entries under `~/.npm/_npx`. Without a tty and without `--yes` it exits 2 and changes nothing. A second run succeeds with nothing left to do.
120
101
 
121
102
  | Flag | Effect |
122
103
  |---|---|
104
+ | `--yes` | Skip the confirmation prompt. Required when stdin is not a tty. `--quiet` does not imply it |
123
105
  | `--keep-caches` | Skip the cache clears |
124
- | `--all-npx` | Loud: wipe the **entire** `~/.npm/_npx` (every npx-cached package, not just dreamd). Prints a warning before deleting. |
106
+ | `--all-npx` | Wipe the **entire** `~/.npm/_npx` (every npx-cached package, not just dreamd), after a warning |
125
107
  | `--quiet` / `-q` | Suppress non-essential output |
126
108
 
127
- Left in place: `~/.agent/registry.toml`, `~/.agent/dreamd.log`, and every
128
- project's `.agent/` memory store. To wipe a project's store entirely, see
129
- [Full fresh store](https://github.com/botzrDev/dreamd/blob/main/docs/troubleshooting.md#how-do-i-reset-or-clear-memory)
130
- in the troubleshooting guide — delete `.agent/` and re-run `npx -y dreamd-mcp init`. That is
131
- destructive; back up first if the store has value.
132
-
133
- **Then remove the client config entry.** Delete the `dreamd` MCP server block from
134
- your harness config (`.mcp.json`, Cursor settings, Cline
135
- `cline_mcp_settings.json`, …) and reload the client. Until that entry is gone, the
136
- harness keeps respawning dreamd on the next session — `uninstall` does not edit
137
- harness configs.
109
+ Left in place: `~/.agent/registry.toml`, `~/.agent/dreamd.log`, every project's `.agent/` store, and the login service (remove that with `dreamd service uninstall`). To wipe a project's store, delete `.agent/` and re-run `npx -y dreamd-mcp init` ([troubleshooting](https://github.com/botzrDev/dreamd/blob/main/docs/troubleshooting.md#how-do-i-reset-or-clear-memory)); back it up first if it has value.
138
110
 
139
- ### Update
140
-
141
- ```sh
142
- npx -y dreamd-mcp update # or: dreamd update
143
- ```
144
-
145
- Prints the current version, stops local servers, removes the socket, and clears
146
- `~/.cache/dreamd-mcp`, then prints the **restart contract**:
147
-
148
- 1. **Stop** local `dreamd mcp` / `dreamd watch` if running — `update` does this
149
- for you on every non-dry run, and reports whether anything matched.
150
- 2. **Reload your MCP harness** (Claude Code, Cursor, …) so it drops the old
151
- binary. Until the harness reloads, it keeps the running process alive and you
152
- stay on the old version.
153
- 3. **Re-run `npx -y dreamd-mcp`** — the floating npx spawn re-resolves `latest`
154
- and fetches the new binary. Keep the pin floating; a hard version pin never
155
- picks up new releases.
156
-
157
- `update` never relaunches anything for you — no OS service, no auto-respawn.
158
-
159
- | Flag | Effect |
160
- |---|---|
161
- | `--dry-run` | Print the current version and the restart contract as a plan; change nothing |
162
- | `--restart` | Explicitly stop local `dreamd mcp` / `dreamd watch` and say so. Same stop that already runs by default — the flag makes the step loud, and is a no-op if nothing is running |
163
- | `--quiet` / `-q` | Suppress non-essential output. Version lines and a one-line reload + re-run reminder still print |
164
-
165
- `update` does not touch `~/.npm/_npx`. If you built from source with
166
- `cargo install --path crates/dreamd-cli`, clearing the cache does not replace that
167
- binary — rebuild it instead.
111
+ **Then remove the client config entry.** `uninstall` does not edit harness configs. Delete the `dreamd` block from `.mcp.json`, Cursor settings or Cline `cline_mcp_settings.json` and reload the client, or the harness respawns dreamd next session.
168
112
 
169
113
  ### Manual fallback
170
114
 
171
- **Use `npx -y dreamd-mcp uninstall` instead of the recipe below** — it does all
172
- four steps in one command. (`dreamd update` covers steps 1 and 3 only: it never
173
- unregisters the project and never touches `~/.npm/_npx`.)
174
-
175
- Both commands' stop step is scoped: they signal only the `dreamd mcp` /
176
- `dreamd watch` processes attributable to *this* `$HOME` and *this*
177
- `~/.cache/dreamd-mcp`. Anything serving another home, another sandbox, or
178
- another user on the box is left running and named on stderr. A hand-run `pkill`
179
- has no such scope.
180
-
181
- If you still want the steps by hand, run the cleanup below (stop processes,
182
- remove the socket, unregister the project, clear caches), **then** remove the
183
- `dreamd` block from your MCP client config and reload the client — the same
184
- order as [Uninstall](#uninstall):
115
+ Prefer `npx -y dreamd-mcp uninstall`: its stop step signals only processes that belong to this `$HOME` and this `~/.cache/dreamd-mcp`. If you still want the steps by hand, run these, then remove the client config entry as above:
185
116
 
186
117
  ```sh
187
- # 1. Stop your dreamd servers + remove the socket.
188
- # `-u "$(id -u)"` keeps the signal inside your own account. Never run a bare
189
- # `pkill -f` for these patterns: it is machine-global and SIGTERMs every
190
- # matching process on the box, including other users' servers.
118
+ # 1. Stop your dreamd servers and remove the socket. `-u "$(id -u)"` keeps the
119
+ # signal inside your account; a bare `pkill -f` hits every user's servers.
191
120
  pkill -u "$(id -u)" -f 'dreamd mcp' || true
192
121
  pkill -u "$(id -u)" -f 'dreamd watch' || true
193
122
  rm -f ~/.agent/dreamd.sock
194
123
 
195
- # 2. Unregister the project from the registry (run from the project root)
124
+ # 2. Unregister the project (from the project root). The store stays.
196
125
  dreamd init --uninstall-project
197
126
 
198
127
  # 3. Native binary cache
199
128
  rm -rf ~/.cache/dreamd-mcp # macOS/Linux
200
129
  # Windows: Remove-Item -Recurse "$env:LOCALAPPDATA\dreamd-mcp\cache"
201
130
 
202
- # 4. npx shim cache — delete only _npx dirs whose package.json references
203
- # dreamd-mcp. npm writes these manifests without a "name" field — the
204
- # requested package appears as a dependencies key, e.g.
205
- # {"dependencies":{"dreamd-mcp":"^0.1.0-rc.6"}} — so match the quoted
206
- # package key, and check each manifest before deleting anything.
131
+ # 4. npx cache: delete only _npx dirs whose package.json names dreamd-mcp
207
132
  for d in ~/.npm/_npx/*/; do
208
133
  [ -f "$d/package.json" ] && grep -q '"dreamd-mcp"' "$d/package.json" && rm -rf "$d"
209
134
  done
210
- # Windows / WSL with Windows Node — same pattern under:
211
- # "$LOCALAPPDATA/npm-cache/_npx"
135
+ # Windows / WSL with Windows Node: same loop under "$LOCALAPPDATA/npm-cache/_npx"
136
+ ```
137
+
138
+ > **Warning:** `pkill -u` stops at the user boundary, not the home boundary, so it also stops dreamd servers you run under another `$HOME` on the same account (a sandbox, a devcontainer). `rm -rf ~/.npm/_npx` deletes every npx-cached package, not just dreamd.
139
+
140
+ ## Override (development only)
141
+
142
+ Set `DREAMD_BIN=/path/to/dreamd` to use a local build instead of the cached release binary. This skips SHA-256 verification, so you must also set `DREAMD_BIN_ALLOW_UNVERIFIED=1`; `DREAMD_BIN` on its own is refused. Never point production MCP configs at an unverified binary.
143
+
144
+ ```sh
145
+ cargo install --path crates/dreamd-cli
146
+ export DREAMD_BIN=~/.cargo/bin/dreamd
147
+ export DREAMD_BIN_ALLOW_UNVERIFIED=1
148
+ npx -y dreamd-mcp
149
+ ```
150
+
151
+ ## Official MCP Registry
152
+
153
+ `server.json` holds the metadata for the [official MCP Registry](https://registry.modelcontextprotocol.io) entry `io.github.botzrDev/dreamd`. The registry serves metadata only and points at the npm package, so the matching version must already be public on npm.
154
+
155
+ ```sh
156
+ # from packages/dreamd-mcp: non-mutating check, anyone (including CI) can run it
157
+ mcp-publisher validate server.json
158
+
159
+ # owner-only: must authenticate as a GitHub identity authorized for botzrDev
160
+ mcp-publisher login github
161
+ mcp-publisher publish server.json
162
+ curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.botzrDev%2Fdreamd"
212
163
  ```
213
164
 
214
- > **Warning:** `rm -rf ~/.npm/_npx` deletes **every** npx-cached package on your
215
- > machine, not just dreamd. Use the scoped loop — or `dreamd uninstall`, which
216
- > scopes by default — unless you intend a full npx reset.
165
+ Publishing is deliberately not automated; no workflow holds registry credentials.
166
+
167
+ ## Learn more
217
168
 
218
- > **Warning:** step 1 is still coarser than `dreamd uninstall`. `pkill -u` stops
219
- > at the user boundary, not the home boundary, so if you run dreamd under more
220
- > than one `$HOME` on the same account — a sandbox, a devcontainer, a test rig —
221
- > it stops those servers too. `dreamd uninstall` / `dreamd update` signal only
222
- > what belongs to the `$HOME` you run them under.
169
+ - [GUIDE.md](https://github.com/botzrDev/dreamd/blob/main/GUIDE.md): 20-minute walkthrough, including inspect and undo
170
+ - [docs/provenance.md](https://github.com/botzrDev/dreamd/blob/main/docs/provenance.md): provenance ledger format and what `doctor --provenance` checks
171
+ - [docs/observability.md](https://github.com/botzrDev/dreamd/blob/main/docs/observability.md): recall citations, `blame`, counterfactual recall and salience drift
172
+ - [SECURITY.md](https://github.com/botzrDev/dreamd/blob/main/SECURITY.md): threat model, including the lesson-injection surface
173
+ - [SPEC.md](https://github.com/botzrDev/dreamd/blob/main/SPEC.md): on-disk `.agent/` contract
174
+ - [docs/troubleshooting.md](https://github.com/botzrDev/dreamd/blob/main/docs/troubleshooting.md): common failures
223
175
 
224
176
  ## License
225
177
 
package/bin/dreamd-mcp.js CHANGED
@@ -59,13 +59,13 @@ function validateRedirect(location, currentUrl) {
59
59
  return next.toString();
60
60
  }
61
61
 
62
- // Native `dreamd` subcommands. KEEP IN SYNC with the clap `Command` enum in
62
+ // Native `dreamd` subcommands. Keep in sync with the clap `Command` enum in
63
63
  // crates/dreamd-cli/src/cli.rs — adding a `dreamd` subcommand without adding it
64
64
  // here silently routes `npx dreamd-mcp <newcmd>` to `dreamd mcp <newcmd>`.
65
65
  const DREAMD_SUBCOMMANDS = new Set([
66
66
  'init', 'setup', 'watch', 'doctor', 'dream', 'reset', 'service', 'uninstall', 'update',
67
67
  'version', 'mcp', 'blame', 'salience-drift', 'memory', 'forget',
68
- 'vectors',
68
+ 'vectors', 'archive', 'migrate', 'recall', 'score', 'status',
69
69
  ]);
70
70
 
71
71
  // A recognized first token is forwarded to `dreamd` verbatim; a bare invocation
@@ -76,8 +76,8 @@ function resolveDreamdArgs(args) {
76
76
  }
77
77
 
78
78
  // Leading top-level flags the shim answers itself (no binary download). Only the
79
- // FIRST token counts: `npx dreamd-mcp init --help` still routes to the binary.
80
- // We handle these in the shim rather than forwarding because `dreamd mcp <flag>`
79
+ // first token counts: `npx dreamd-mcp init --help` still routes to the binary.
80
+ // The shim handles these rather than forwarding them because `dreamd mcp <flag>`
81
81
  // is a clap error, and the native `dreamd --help` prints `dreamd` usage — wrong
82
82
  // invocation for an npx user.
83
83
  function topLevelFlag(args) {
@@ -112,8 +112,8 @@ Environment:
112
112
  `;
113
113
 
114
114
  function getPlatformTarget() {
115
- // v0.1 ships linux-x86_64 + darwin; Windows is out of scope until v0.1.1
116
- // (AGENTS.md). Cache helpers below still tolerate win32 paths defensively.
115
+ // Prebuilt targets are linux-x86_64 and darwin; the shim has no prebuilt
116
+ // Windows binary. Cache helpers below still tolerate win32 paths defensively.
117
117
  const { platform, arch } = process;
118
118
  if (platform === 'linux' && arch === 'x64') return 'linux-x86_64';
119
119
  if (platform === 'darwin' && arch === 'x64') return 'darwin-x86_64';
@@ -240,7 +240,7 @@ async function ensureBinary(target, binaryPath, expectedSha256) {
240
240
  throw new Error('extracted binary escaped the extraction dir');
241
241
  }
242
242
 
243
- // Verify BEFORE promoting into the cache. Throw (not exit) so `finally`
243
+ // Verify before promoting into the cache. Throw (not exit) so `finally`
244
244
  // still cleans up; the exec-gate verify at the call site stays for cache hits.
245
245
  if (sha256File(extracted) !== expectedSha256) {
246
246
  throw new Error(
@@ -347,6 +347,7 @@ if (require.main === module) {
347
347
  }
348
348
 
349
349
  module.exports = {
350
+ DREAMD_SUBCOMMANDS,
350
351
  resolveDreamdArgs,
351
352
  topLevelFlag,
352
353
  isAllowedRedirectHost,
package/manifest.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
- "version": "1.2.0",
2
+ "version": "1.2.1",
3
3
  "binaries": {
4
4
  "linux-x86_64": {
5
- "sha256": "7f7ccbcf6aed006773bdc42e26edeeff8f0ccd53c05d14a210a324dc10c32f02"
5
+ "sha256": "0483bc11f39e82da2e5252ed827ea2bdd731f036efa1d54bcb026324357f9df6"
6
6
  },
7
7
  "darwin-x86_64": {
8
- "sha256": "1fc3ad05741db068e778480ed777afa4027e2063a5e63cb85c5ff211979a5fd6"
8
+ "sha256": "6e773089e9d10d18dd42e51e656076dddb26451d2d4a9b40207a83e4efbd028c"
9
9
  },
10
10
  "darwin-aarch64": {
11
- "sha256": "04ebe064656bd2fd2126323791b7de2296a3504850b8d3829f4f56e7f251d826"
11
+ "sha256": "34424620ab1c64bda9bf5e16eee44d3b9a8fa40e5031cc21fce127a1c979263d"
12
12
  }
13
13
  }
14
14
  }
package/package.json CHANGED
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "name": "dreamd-mcp",
3
3
  "mcpName": "io.github.botzrDev/dreamd",
4
- "version": "1.2.0",
5
- "description": "Local-first memory for AI coding agents. One .agent/ folder shared by Claude Code, Cursor and Cline over MCP. Plain files, no vector DB.",
4
+ "version": "1.2.1",
5
+ "description": "Agent memory you can audit. Every lesson cites its source; trace a bad memory and remove it with a receipt. Local-first MCP server for Claude Code, Cursor and Cline.",
6
6
  "keywords": [
7
7
  "mcp",
8
8
  "mcp-server",
9
9
  "model-context-protocol",
10
10
  "memory",
11
11
  "agent-memory",
12
+ "long-term-memory",
12
13
  "ai-agents",
13
- "coding-agents",
14
+ "provenance",
15
+ "audit",
14
16
  "claude-code",
15
17
  "cursor",
16
18
  "cline",