dreamd-mcp 0.1.0-rc.6 → 0.1.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 +131 -23
- package/bin/dreamd-mcp.js +29 -11
- package/manifest.json +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,28 +7,32 @@ Node shim for the [dreamd](https://github.com/botzrDev/dreamd) MCP server. Downl
|
|
|
7
7
|
Requires a project root sentinel (`.git/`, `Cargo.toml`, `package.json`, or `pyproject.toml`).
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
# 1. Scaffold .agent/
|
|
11
|
-
npx dreamd-mcp
|
|
10
|
+
# 1. Scaffold .agent/ and wire your harness's MCP config
|
|
11
|
+
npx -y dreamd-mcp setup
|
|
12
12
|
|
|
13
13
|
# 2. Start a shared daemon (recommended when multiple agents write)
|
|
14
|
-
npx dreamd-mcp
|
|
14
|
+
npx -y dreamd-mcp watch
|
|
15
15
|
|
|
16
|
-
# 3.
|
|
17
|
-
npx dreamd-mcp
|
|
16
|
+
# 3. Reload the harness — it now spawns the MCP server itself
|
|
17
|
+
npx -y dreamd-mcp
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
> `npx dreamd-mcp` resolves once and then reuses whatever npx first cached —
|
|
22
|
-
> it never re-checks the registry, so it can serve an old version indefinitely.
|
|
23
|
-
> `npx dreamd-mcp@latest` (or `npx --yes dreamd-mcp@<version>`) forces a refresh.
|
|
20
|
+
`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`.
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
> **Leave `npx dreamd-mcp` floating — don't pin.** On a fresh spawn, npx
|
|
23
|
+
> re-resolves the `latest` dist-tag from the registry, so a floating config always
|
|
24
|
+
> starts the current version. Two caveats: a **running** MCP server or `dreamd watch`
|
|
25
|
+
> daemon keeps the version it started with until you restart it, and an **offline**
|
|
26
|
+
> run falls back to the last-cached binary. A hard version pin
|
|
27
|
+
> (`dreamd-mcp@0.1.0-rc.3`) is the one form that never picks up new releases.
|
|
28
|
+
|
|
29
|
+
No Rust installation required. Prebuilt binaries are available for **Linux x86_64** and **macOS x86_64/aarch64** (see `manifest.json`). **Native Windows is out of scope for v0.1** — use WSL2 or a Linux/macOS host (Windows support is planned for v0.1.1).
|
|
26
30
|
|
|
27
31
|
Adapter quickstarts: [Claude Code](https://github.com/botzrDev/dreamd/tree/main/adapters/claude-code) · [Cursor](https://github.com/botzrDev/dreamd/tree/main/adapters/cursor)
|
|
28
32
|
|
|
29
33
|
## Running several agents at once
|
|
30
34
|
|
|
31
|
-
`npx 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 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.
|
|
35
|
+
`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.
|
|
32
36
|
|
|
33
37
|
## Learn more
|
|
34
38
|
|
|
@@ -63,36 +67,140 @@ Set `DREAMD_BIN=/path/to/dreamd` to skip download and use a local build instead
|
|
|
63
67
|
|
|
64
68
|
**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.
|
|
65
69
|
|
|
66
|
-
Build from source:
|
|
70
|
+
Build from source (Linux / macOS only — native Windows is out of scope for v0.1):
|
|
67
71
|
|
|
68
72
|
```sh
|
|
69
73
|
cargo install --path crates/dreamd-cli
|
|
70
74
|
export DREAMD_BIN=~/.cargo/bin/dreamd
|
|
71
75
|
export DREAMD_BIN_ALLOW_UNVERIFIED=1
|
|
72
|
-
npx dreamd-mcp
|
|
76
|
+
npx -y dreamd-mcp
|
|
73
77
|
```
|
|
74
78
|
|
|
79
|
+
> First run prompts once — press `y`, or use `npx -y dreamd-mcp`.
|
|
80
|
+
|
|
75
81
|
## Uninstall / reset
|
|
76
82
|
|
|
77
83
|
`dreamd-mcp` is never installed globally — it runs straight from the npx cache and
|
|
78
84
|
downloads the native binary into a per-version cache. `npm uninstall -g dreamd-mcp`
|
|
79
|
-
is therefore a no-op.
|
|
80
|
-
|
|
85
|
+
is therefore a no-op. There is no `dreamd reset --all` — use `dreamd uninstall`.
|
|
86
|
+
|
|
87
|
+
> **Order:** run uninstall (or the manual cleanup steps) → remove the `dreamd`
|
|
88
|
+
> block from your MCP client config → reload the client.
|
|
89
|
+
|
|
90
|
+
### Uninstall
|
|
81
91
|
|
|
82
92
|
```sh
|
|
83
|
-
#
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
93
|
+
npx -y dreamd-mcp uninstall # or, with a native binary: dreamd uninstall
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
One command: stops local `dreamd mcp` / `dreamd watch` processes, removes the
|
|
97
|
+
daemon socket, unregisters the current project from the registry (skipped with a
|
|
98
|
+
benign note when run outside a project root), and clears the native binary cache
|
|
99
|
+
(`~/.cache/dreamd-mcp`) plus the dreamd-mcp-scoped entries under `~/.npm/_npx`.
|
|
100
|
+
Safe to run twice — a second run succeeds with nothing left to do.
|
|
101
|
+
|
|
102
|
+
| Flag | Effect |
|
|
103
|
+
|---|---|
|
|
104
|
+
| `--keep-caches` | Skip the cache clears |
|
|
105
|
+
| `--all-npx` | Loud: wipe the **entire** `~/.npm/_npx` (every npx-cached package, not just dreamd). Prints a warning before deleting. |
|
|
106
|
+
| `--quiet` / `-q` | Suppress non-essential output |
|
|
107
|
+
|
|
108
|
+
Left in place: `~/.agent/registry.toml`, `~/.agent/dreamd.log`, and every
|
|
109
|
+
project's `.agent/` memory store. To wipe a project's store entirely, see
|
|
110
|
+
[Full fresh store](../../docs/troubleshooting.md#how-do-i-reset-or-clear-memory)
|
|
111
|
+
in the troubleshooting guide — delete `.agent/` and re-run `dreamd init`. That is
|
|
112
|
+
destructive; back up first if the store has value.
|
|
113
|
+
|
|
114
|
+
**Then remove the client config entry.** Delete the `dreamd` MCP server block from
|
|
115
|
+
your harness config (`.mcp.json`, Cursor settings, Cline
|
|
116
|
+
`cline_mcp_settings.json`, …) and reload the client. Until that entry is gone, the
|
|
117
|
+
harness keeps respawning dreamd on the next session — `uninstall` does not edit
|
|
118
|
+
harness configs.
|
|
119
|
+
|
|
120
|
+
### Update
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
npx -y dreamd-mcp update # or: dreamd update
|
|
124
|
+
```
|
|
87
125
|
|
|
88
|
-
|
|
126
|
+
Prints the current version, stops local servers, removes the socket, and clears
|
|
127
|
+
`~/.cache/dreamd-mcp`, then prints the **restart contract**:
|
|
128
|
+
|
|
129
|
+
1. **Stop** local `dreamd mcp` / `dreamd watch` if running — `update` does this
|
|
130
|
+
for you on every non-dry run, and reports whether anything matched.
|
|
131
|
+
2. **Reload your MCP harness** (Claude Code, Cursor, …) so it drops the old
|
|
132
|
+
binary. Until the harness reloads, it keeps the running process alive and you
|
|
133
|
+
stay on the old version.
|
|
134
|
+
3. **Re-run `npx -y dreamd-mcp`** — the floating npx spawn re-resolves `latest`
|
|
135
|
+
and fetches the new binary. Keep the pin floating; a hard version pin never
|
|
136
|
+
picks up new releases.
|
|
137
|
+
|
|
138
|
+
`update` never relaunches anything for you — no OS service, no auto-respawn.
|
|
139
|
+
|
|
140
|
+
| Flag | Effect |
|
|
141
|
+
|---|---|
|
|
142
|
+
| `--dry-run` | Print the current version and the restart contract as a plan; change nothing |
|
|
143
|
+
| `--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 |
|
|
144
|
+
| `--quiet` / `-q` | Suppress non-essential output. Version lines and a one-line reload + re-run reminder still print |
|
|
145
|
+
|
|
146
|
+
`update` does not touch `~/.npm/_npx`. If you built from source with
|
|
147
|
+
`cargo install --path crates/dreamd-cli`, clearing the cache does not replace that
|
|
148
|
+
binary — rebuild it instead.
|
|
149
|
+
|
|
150
|
+
### Manual fallback
|
|
151
|
+
|
|
152
|
+
**Use `npx -y dreamd-mcp uninstall` instead of the recipe below** — it does all
|
|
153
|
+
four steps in one command. (`dreamd update` covers steps 1 and 3 only: it never
|
|
154
|
+
unregisters the project and never touches `~/.npm/_npx`.)
|
|
155
|
+
|
|
156
|
+
Both commands' stop step is scoped: they signal only the `dreamd mcp` /
|
|
157
|
+
`dreamd watch` processes attributable to *this* `$HOME` and *this*
|
|
158
|
+
`~/.cache/dreamd-mcp`. Anything serving another home, another sandbox, or
|
|
159
|
+
another user on the box is left running and named on stderr. A hand-run `pkill`
|
|
160
|
+
has no such scope.
|
|
161
|
+
|
|
162
|
+
If you still want the steps by hand, run the cleanup below (stop processes,
|
|
163
|
+
remove the socket, unregister the project, clear caches), **then** remove the
|
|
164
|
+
`dreamd` block from your MCP client config and reload the client — the same
|
|
165
|
+
order as [Uninstall](#uninstall):
|
|
166
|
+
|
|
167
|
+
```sh
|
|
168
|
+
# 1. Stop your dreamd servers + remove the socket.
|
|
169
|
+
# `-u "$(id -u)"` keeps the signal inside your own account. Never run a bare
|
|
170
|
+
# `pkill -f` for these patterns: it is machine-global and SIGTERMs every
|
|
171
|
+
# matching process on the box, including other users' servers.
|
|
172
|
+
pkill -u "$(id -u)" -f 'dreamd mcp' || true
|
|
173
|
+
pkill -u "$(id -u)" -f 'dreamd watch' || true
|
|
174
|
+
rm -f ~/.agent/dreamd.sock
|
|
175
|
+
|
|
176
|
+
# 2. Unregister the project from the registry (run from the project root)
|
|
177
|
+
dreamd init --uninstall-project
|
|
178
|
+
|
|
179
|
+
# 3. Native binary cache
|
|
89
180
|
rm -rf ~/.cache/dreamd-mcp # macOS/Linux
|
|
90
181
|
# Windows: Remove-Item -Recurse "$env:LOCALAPPDATA\dreamd-mcp\cache"
|
|
182
|
+
|
|
183
|
+
# 4. npx shim cache — delete only _npx dirs whose package.json references
|
|
184
|
+
# dreamd-mcp. npm writes these manifests without a "name" field — the
|
|
185
|
+
# requested package appears as a dependencies key, e.g.
|
|
186
|
+
# {"dependencies":{"dreamd-mcp":"^0.1.0-rc.6"}} — so match the quoted
|
|
187
|
+
# package key, and check each manifest before deleting anything.
|
|
188
|
+
for d in ~/.npm/_npx/*/; do
|
|
189
|
+
[ -f "$d/package.json" ] && grep -q '"dreamd-mcp"' "$d/package.json" && rm -rf "$d"
|
|
190
|
+
done
|
|
191
|
+
# Windows / WSL with Windows Node — same pattern under:
|
|
192
|
+
# "$LOCALAPPDATA/npm-cache/_npx"
|
|
91
193
|
```
|
|
92
194
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
195
|
+
> **Warning:** `rm -rf ~/.npm/_npx` deletes **every** npx-cached package on your
|
|
196
|
+
> machine, not just dreamd. Use the scoped loop — or `dreamd uninstall`, which
|
|
197
|
+
> scopes by default — unless you intend a full npx reset.
|
|
198
|
+
|
|
199
|
+
> **Warning:** step 1 is still coarser than `dreamd uninstall`. `pkill -u` stops
|
|
200
|
+
> at the user boundary, not the home boundary, so if you run dreamd under more
|
|
201
|
+
> than one `$HOME` on the same account — a sandbox, a devcontainer, a test rig —
|
|
202
|
+
> it stops those servers too. `dreamd uninstall` / `dreamd update` signal only
|
|
203
|
+
> what belongs to the `$HOME` you run them under.
|
|
96
204
|
|
|
97
205
|
## License
|
|
98
206
|
|
package/bin/dreamd-mcp.js
CHANGED
|
@@ -63,7 +63,8 @@ function validateRedirect(location, currentUrl) {
|
|
|
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
|
-
'init', 'watch', 'doctor', 'dream', 'reset', '
|
|
66
|
+
'init', 'setup', 'watch', 'doctor', 'dream', 'reset', 'uninstall', 'update',
|
|
67
|
+
'version', 'mcp',
|
|
67
68
|
]);
|
|
68
69
|
|
|
69
70
|
// A recognized first token is forwarded to `dreamd` verbatim; a bare invocation
|
|
@@ -287,20 +288,32 @@ async function main() {
|
|
|
287
288
|
|
|
288
289
|
const target = getPlatformTarget();
|
|
289
290
|
if (!target) {
|
|
290
|
-
process.
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
291
|
+
if (process.platform === 'win32') {
|
|
292
|
+
process.stderr.write(
|
|
293
|
+
`dreamd does not support native Windows in v0.1 (planned for v0.1.1).\n` +
|
|
294
|
+
`Use WSL2 (Ubuntu) or a Linux/macOS host instead.\n` +
|
|
295
|
+
`Prebuilt binaries ship for linux-x64, darwin-x64, and darwin-arm64 only.\n`
|
|
296
|
+
);
|
|
297
|
+
} else {
|
|
298
|
+
process.stderr.write(
|
|
299
|
+
`No prebuilt binary for ${process.platform}/${process.arch}.\n` +
|
|
300
|
+
`Supported platforms: linux-x64, darwin-x64, darwin-arm64.\n` +
|
|
301
|
+
`On a supported OS with a source checkout, you can build with:\n` +
|
|
302
|
+
` cargo install --path crates/dreamd-cli\n` +
|
|
303
|
+
`Then set DREAMD_BIN=/path/to/dreamd and DREAMD_BIN_ALLOW_UNVERIFIED=1 and re-run.\n`
|
|
304
|
+
);
|
|
305
|
+
}
|
|
295
306
|
process.exit(1);
|
|
296
307
|
}
|
|
297
308
|
|
|
298
309
|
const binaryEntry = MANIFEST.binaries[target];
|
|
299
310
|
if (!binaryEntry) {
|
|
300
311
|
process.stderr.write(
|
|
301
|
-
`No prebuilt binary for ${target}
|
|
302
|
-
|
|
303
|
-
|
|
312
|
+
`No prebuilt binary for ${target} in this package's manifest.\n` +
|
|
313
|
+
`Supported platforms: linux-x64, darwin-x64, darwin-arm64.\n` +
|
|
314
|
+
`On a supported OS with a source checkout, you can build with:\n` +
|
|
315
|
+
` cargo install --path crates/dreamd-cli\n` +
|
|
316
|
+
`Then set DREAMD_BIN=/path/to/dreamd and DREAMD_BIN_ALLOW_UNVERIFIED=1 and re-run.\n`
|
|
304
317
|
);
|
|
305
318
|
process.exit(1);
|
|
306
319
|
}
|
|
@@ -321,8 +334,13 @@ async function main() {
|
|
|
321
334
|
|
|
322
335
|
if (require.main === module) {
|
|
323
336
|
main().catch((err) => {
|
|
324
|
-
|
|
325
|
-
|
|
337
|
+
if (err.status !== undefined) {
|
|
338
|
+
process.exitCode = err.status;
|
|
339
|
+
process.stderr.write(`[dreamd-mcp] command exited with code ${err.status}\n`);
|
|
340
|
+
} else {
|
|
341
|
+
process.stderr.write(`[dreamd-mcp] Fatal error: ${err.message}\n`);
|
|
342
|
+
process.exit(1);
|
|
343
|
+
}
|
|
326
344
|
});
|
|
327
345
|
}
|
|
328
346
|
|
package/manifest.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.0
|
|
2
|
+
"version": "0.1.0",
|
|
3
3
|
"binaries": {
|
|
4
4
|
"linux-x86_64": {
|
|
5
|
-
"sha256": "
|
|
5
|
+
"sha256": "50bec1ea64e50201448a41bc0f44d226ac3f13e7fad93047caf8e89f84e454db"
|
|
6
6
|
},
|
|
7
7
|
"darwin-x86_64": {
|
|
8
|
-
"sha256": "
|
|
8
|
+
"sha256": "c219441774139824b84929648fa078950a45cbb91f263ffe632ed78c2037962a"
|
|
9
9
|
},
|
|
10
10
|
"darwin-aarch64": {
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "55b6aee6f10a47451f4a2eef3310d64a72c7ab0d9b172d263e0b46800e62e73e"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dreamd-mcp",
|
|
3
3
|
"mcpName": "io.github.botzrDev/dreamd",
|
|
4
|
-
"version": "0.1.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"description": "npx shim for dreamd MCP server — downloads the right prebuilt Rust binary for your OS/arch",
|
|
6
6
|
"bin": {
|
|
7
7
|
"dreamd-mcp": "bin/dreamd-mcp.js"
|