@neurodock/cli 0.4.3 → 0.6.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/CHANGELOG.md +128 -0
- package/README.md +40 -12
- package/dist/assets/hooks/neurodock_daemon.py +506 -0
- package/dist/assets/hooks/proactive_guardrail.py +520 -0
- package/dist/commands/install-hooks.d.ts +20 -0
- package/dist/commands/install-hooks.d.ts.map +1 -0
- package/dist/commands/install-hooks.js +356 -0
- package/dist/commands/install-hooks.js.map +1 -0
- package/dist/commands/sync.d.ts +24 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +179 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/update.d.ts +13 -22
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +11 -176
- package/dist/commands/update.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,133 @@
|
|
|
1
1
|
# @neurodock/cli changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
### Fixed — `npm install` was broken for every fresh user (workspace: protocol leaked)
|
|
6
|
+
|
|
7
|
+
`@neurodock/cli@0.6.0` was published with `npm publish`, which does NOT
|
|
8
|
+
rewrite pnpm's `workspace:` protocol into a real semver range. The
|
|
9
|
+
resulting tarball's `package.json` carried:
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
"@neurodock/native-host": "workspace:^0.1.0"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
…which npm/yarn cannot resolve, so the very first `npx --yes
|
|
16
|
+
@neurodock/cli@latest <anything>` failed with `EUNSUPPORTEDPROTOCOL`
|
|
17
|
+
on every fresh machine. The CLI was effectively unpublishable for the
|
|
18
|
+
~14 hours between 0.6.0 hitting npm and this patch.
|
|
19
|
+
|
|
20
|
+
**The fix:** 0.6.1 is published via `pnpm publish`, which rewrites
|
|
21
|
+
the `workspace:` prefix to the real version pinned in the workspace
|
|
22
|
+
(`^0.1.0`). Verified locally by `pnpm pack` + inspecting the
|
|
23
|
+
extracted `package.json`.
|
|
24
|
+
|
|
25
|
+
**Belt-and-braces:** a new release-gate script,
|
|
26
|
+
[`scripts/verify-published-tarball.mjs`](../../scripts/verify-published-tarball.mjs),
|
|
27
|
+
fetches the freshly-published tarball from the registry, runs
|
|
28
|
+
`npx --yes @neurodock/cli@<version> --version` against it from a
|
|
29
|
+
scratch directory, and exits non-zero if resolution fails. Wire this
|
|
30
|
+
into the publish pipeline so the next instance of this bug class
|
|
31
|
+
fails the release instead of poisoning `@latest`.
|
|
32
|
+
|
|
33
|
+
0.6.0 has been deprecated on the registry with a pointer to 0.6.1.
|
|
34
|
+
|
|
35
|
+
No code changes vs 0.6.0. Same surface, same behaviour, just an
|
|
36
|
+
installable tarball.
|
|
37
|
+
|
|
38
|
+
## 0.6.0
|
|
39
|
+
|
|
40
|
+
### Added — `neurodock install-hooks` (proactive guardrails Phases 1 + 3)
|
|
41
|
+
|
|
42
|
+
One command wires NeuroDock's proactive-guardrail layer into a fresh
|
|
43
|
+
install. Bundled self-contained Python scripts ship with the npm
|
|
44
|
+
package — no extra `pip install` step.
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
neurodock install-hooks --self-test
|
|
48
|
+
neurodock install-hooks --install-daemon --self-test
|
|
49
|
+
neurodock install-hooks --uninstall
|
|
50
|
+
neurodock install-hooks --dry-run
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The command:
|
|
54
|
+
|
|
55
|
+
1. Copies `proactive_guardrail.py` to `~/.neurodock/hooks/` (Phase 1
|
|
56
|
+
Claude Code hook; auto-fires chronometric / rumination /
|
|
57
|
+
sycophancy checks on every Nth tool use, banners on stderr).
|
|
58
|
+
2. Copies `neurodock_daemon.py` to the same dir (Phase 3 host-agnostic
|
|
59
|
+
poller; same heuristics, native OS notifications).
|
|
60
|
+
3. Idempotently merges 4 entries into `~/.claude/settings.json`
|
|
61
|
+
(`SessionStart`, `PreToolUse`, `PostToolUse`, `Stop`), preserving
|
|
62
|
+
any existing hooks from other tools.
|
|
63
|
+
4. With `--install-daemon`, registers the daemon at user-login
|
|
64
|
+
autostart: HKCU Run on Windows, LaunchAgent on macOS, systemd
|
|
65
|
+
`--user` unit on Linux.
|
|
66
|
+
5. With `--self-test`, runs both scripts' built-in smoke test to
|
|
67
|
+
verify Python is on PATH and the heuristics fire.
|
|
68
|
+
|
|
69
|
+
**Opt-out:**
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
neurodock install-hooks --uninstall # removes hook + daemon entries
|
|
73
|
+
export NEURODOCK_GUARDRAILS=off # disables without removing
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Fixed — Windows path-escape lockout (regression-pinned)
|
|
77
|
+
|
|
78
|
+
Pre-0.6.0 the hook command written into `settings.json` used
|
|
79
|
+
backslashes on Windows. Bash-style shells (Git Bash / MinGW — what
|
|
80
|
+
Claude Code uses for hooks on Windows) interpret `\U`, `\h`, `\p`
|
|
81
|
+
etc. as escape sequences and strip them, mangling the path to
|
|
82
|
+
`pythonscript.py` and causing every PreToolUse hook to fail, which
|
|
83
|
+
**blocks every tool call** until the user manually edits
|
|
84
|
+
`settings.json`. The 0.0.22 install command hit this. Twice.
|
|
85
|
+
|
|
86
|
+
0.6.0 always normalises the script path to forward slashes (Python
|
|
87
|
+
accepts them on Windows) and always wraps it in double quotes. The
|
|
88
|
+
new install summary also echoes the exact hook command string so the
|
|
89
|
+
bug class can't recur silently.
|
|
90
|
+
|
|
91
|
+
Regression test: `packages/cli/tests/install-hooks.test.ts` pins the
|
|
92
|
+
contract — the test fails if any hook entry contains a backslash in
|
|
93
|
+
its script-path portion.
|
|
94
|
+
|
|
95
|
+
### Internals
|
|
96
|
+
|
|
97
|
+
- New build step `scripts/copy-assets.mjs` copies `src/assets/` into
|
|
98
|
+
`dist/assets/` after `tsc`, so the published npm tarball contains
|
|
99
|
+
the bundled Python scripts.
|
|
100
|
+
- `package.json` `files` array already includes `dist/`, so no
|
|
101
|
+
manifest change needed.
|
|
102
|
+
|
|
103
|
+
## 0.5.0
|
|
104
|
+
|
|
105
|
+
### Changed (breaking)
|
|
106
|
+
|
|
107
|
+
- `neurodock update` now upgrades NeuroDock to the latest version
|
|
108
|
+
(re-installs the six MCP servers via `pip install --upgrade` or
|
|
109
|
+
`uv tool install` and re-wires clients). Previously, `update` only
|
|
110
|
+
re-shaped client config JSON without touching package versions —
|
|
111
|
+
which confused users who expected `update` to behave like every
|
|
112
|
+
other CLI's `update` verb.
|
|
113
|
+
- The previous behavior moved to a new verb: `neurodock sync`. Same
|
|
114
|
+
flags (`--client`, `--dry-run`), same code path, same semantics.
|
|
115
|
+
- The new `update` command accepts the same flags as `install-all`
|
|
116
|
+
(`--client`, `--profile`, `--installer`, `--skip-install`, `--yes`,
|
|
117
|
+
`--dry-run`, `--no-native-host`).
|
|
118
|
+
|
|
119
|
+
### Added
|
|
120
|
+
|
|
121
|
+
- README now has a dedicated `## Update` section documenting the
|
|
122
|
+
one-liner: `npx --yes @neurodock/cli update`.
|
|
123
|
+
|
|
124
|
+
### Migration
|
|
125
|
+
|
|
126
|
+
If you scripted against `neurodock update --client X --dry-run` to
|
|
127
|
+
reconcile client configs, rename the call to `neurodock sync` — the
|
|
128
|
+
old flags still work there. If you wanted package upgrades, the new
|
|
129
|
+
`neurodock update` is what you were looking for.
|
|
130
|
+
|
|
3
131
|
## 0.4.3
|
|
4
132
|
|
|
5
133
|
### Changed
|
package/README.md
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
The `neurodock` installer and diagnostic CLI for [NeuroDock](https://neurodock.org/) — a local-first cognitive substrate for neurodivergent professionals.
|
|
4
4
|
|
|
5
|
-
Status: **v0.
|
|
5
|
+
Status: **v0.6.0**.
|
|
6
6
|
|
|
7
7
|
## Quickstart
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
# From a published package:
|
|
11
|
-
npx --yes @neurodock/cli install-all
|
|
11
|
+
npx --yes @neurodock/cli@latest install-all
|
|
12
12
|
|
|
13
13
|
# Or step-by-step, also from npm:
|
|
14
|
-
npx --yes @neurodock/cli init
|
|
14
|
+
npx --yes @neurodock/cli@latest init
|
|
15
15
|
|
|
16
16
|
# From a fresh clone of the monorepo:
|
|
17
17
|
pnpm install
|
|
@@ -38,7 +38,8 @@ install, `install-all` runs the `pip install` step automatically.
|
|
|
38
38
|
| `neurodock init` | Install MCP servers into Claude Desktop / Claude Code / Cursor (the wiring half of `install-all`). |
|
|
39
39
|
| `neurodock doctor` | Diagnose your install — profile validity, client wiring, tool availability. |
|
|
40
40
|
| `neurodock validate` | Schema-validate a profile file (`~/.neurodock/profile.yaml` by default). |
|
|
41
|
-
| `neurodock update` |
|
|
41
|
+
| `neurodock update` | Upgrade NeuroDock to the latest version — re-installs the six MCP servers via pip/uv and re-wires client configs. |
|
|
42
|
+
| `neurodock sync` | Re-shape stale NeuroDock MCP entries in existing client configs. No package upgrade. Non-NeuroDock entries are preserved. |
|
|
42
43
|
| `neurodock uninstall` | Reverse `init` — remove NeuroDock MCP entries from each client config. Optionally purge `~/.neurodock/`. |
|
|
43
44
|
| `neurodock examples` | Print a copy-pasteable prompt cheat-sheet that exercises every wired NeuroDock MCP tool. |
|
|
44
45
|
| `neurodock host install` | Register the optional Chrome Native Messaging host so the browser extension can read `~/.neurodock/profile.yaml` directly. |
|
|
@@ -51,6 +52,7 @@ install, `install-all` runs the `pip install` step automatically.
|
|
|
51
52
|
| `neurodock plugin enable` | Activate an installed plugin (writes a `.enabled` marker file). |
|
|
52
53
|
| `neurodock plugin disable` | Deactivate an installed plugin without deleting its files. |
|
|
53
54
|
| `neurodock plugin validate` | Schema-validate a plugin manifest without installing. |
|
|
55
|
+
| `neurodock install-hooks` | Wire the proactive-guardrail hook into Claude Code, optionally autostart the Phase 3 daemon. See `--self-test`, `--install-daemon`, `--uninstall`, `--dry-run`. |
|
|
54
56
|
|
|
55
57
|
### `neurodock install-all`
|
|
56
58
|
|
|
@@ -92,21 +94,47 @@ What `init` does, in order:
|
|
|
92
94
|
Idempotent. Re-running with no changes is a no-op. Collisions on a previous
|
|
93
95
|
key are skipped unless `--yes` is supplied.
|
|
94
96
|
|
|
95
|
-
### `neurodock
|
|
97
|
+
### `neurodock update`
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
neurodock update [--client=claude-desktop|claude-code|cursor|all] \
|
|
101
|
+
[--profile=minimal|example] \
|
|
102
|
+
[--installer=uv|pip|auto] \
|
|
103
|
+
[--skip-install] [--yes] [--dry-run] [--no-native-host]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
One-command upgrade. Same code path as `install-all` — re-runs
|
|
107
|
+
`pip install --upgrade` (or `uv tool install`) for every NeuroDock MCP
|
|
108
|
+
server, re-wires the detected MCP clients, and re-registers the
|
|
109
|
+
optional native-messaging host. Exit codes match `install-all`:
|
|
110
|
+
`0` ok, `1` an entrypoint is missing from PATH, `2` init failed.
|
|
111
|
+
|
|
112
|
+
### `neurodock sync`
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
neurodock sync [--client <id>] [--dry-run]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Re-shape stale NeuroDock MCP entries in existing client configs
|
|
119
|
+
(version drift, command/args/cwd changes) without upgrading any
|
|
120
|
+
packages. Non-NeuroDock entries round-trip untouched. Useful when the
|
|
121
|
+
desired wiring shape changed but you don't need a package upgrade.
|
|
122
|
+
|
|
123
|
+
Before 0.5.0 this lived under `neurodock update`. The verb moved
|
|
124
|
+
because users typed `neurodock update` expecting a version upgrade.
|
|
125
|
+
|
|
126
|
+
### `neurodock validate` / `uninstall`
|
|
96
127
|
|
|
97
128
|
```
|
|
98
129
|
neurodock validate [--file <path>] [--strict]
|
|
99
|
-
neurodock update [--client <id>] [--dry-run]
|
|
100
130
|
neurodock uninstall [--client <id>] [--yes] [--purge] [--dry-run]
|
|
101
131
|
```
|
|
102
132
|
|
|
103
133
|
`validate` runs Ajv against `profile.schema.json` and reports field-path
|
|
104
|
-
violations. `
|
|
105
|
-
|
|
106
|
-
`
|
|
107
|
-
|
|
108
|
-
`~/.neurodock/cognitive-graph.sqlite` (default: no). `--purge` deletes
|
|
109
|
-
those without prompting.
|
|
134
|
+
violations. `uninstall` removes NeuroDock entries from every detected
|
|
135
|
+
client config; asks (interactively) whether to delete
|
|
136
|
+
`~/.neurodock/profile.yaml` and `~/.neurodock/cognitive-graph.sqlite`
|
|
137
|
+
(default: no). `--purge` deletes those without prompting.
|
|
110
138
|
|
|
111
139
|
### `neurodock examples`
|
|
112
140
|
|