claudemd-cli 0.23.16 → 0.23.18

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,22 @@ All notable changes to the `claudemd` plugin. This changelog tracks plugin artif
8
8
  - **Canonical spec version source**: `spec/CLAUDE.md` top-line title (`# AI-CODING-SPEC vX.Y.Z — Core`) + `spec/CLAUDE-changelog.md` top `##` entry.
9
9
  - **Plugin semver vs spec semver** are independent: plugin patch (0.2.0 → 0.2.1) may ship when spec is unchanged (this release); plugin minor (0.1.9 → 0.2.0) ships when spec minor updates (v0.2.0 shipped spec v6.10.0).
10
10
 
11
+ ## [0.23.18] - 2026-06-10
12
+
13
+ **Patch — install/uninstall crashed with a cryptic error on a malformed-but-valid-JSON settings.json.** Spec content unchanged (stays v6.14.1). Continues the end-to-end user-test sweep into the install path.
14
+
15
+ ### Fixed — `unmergeHook` did not tolerate unexpected settings.json shapes
16
+
17
+ - `scripts/lib/settings-merge.js`: `unmergeHook` (run by both install.js and uninstall.js to evict legacy claudemd hook entries) assumed every `settings.hooks[event]` is an array and every block carries a `hooks` array. A hand-edited or third-party-written settings.json can be valid JSON yet have a different shape — an event value that is a string, a block missing its `hooks` array, a `null` block or entry. Pre-fix these threw `Cannot read properties of undefined (reading 'length')`, which install.js/uninstall.js surfaced as `install failed: …` / `uninstall failed: …` during an adopter's first-touch flow (it failed safe — settings.json was never written — but the message pointed nowhere). Fix: skip malformed parts and leave them untouched (never mutate or drop structure claudemd did not write), processing only well-formed blocks. The well-formed path is unchanged — claudemd entries are still evicted, user hooks preserved, emptied blocks/events pruned. Added regression tests 17b (5 malformed shapes → no-op, byte-identical) and 17c (mixed block → evict claudemd, keep user hook).
18
+
19
+ ## [0.23.17] - 2026-06-10
20
+
21
+ **Patch — §8 SAFETY: `dash -c "rm -rf $X"` and other Bourne-family shells were not unwrapped, bypassing the rm-rf-var / npx gate.** Spec content unchanged (stays v6.14.1). Continues the end-to-end user-test sweep into the §8 hook.
22
+
23
+ ### Fixed — indirect-shell unwrap missed dash / ksh / ash
24
+
25
+ - `hooks/pre-bash-safety-check.sh`: `unwrap_indirect` expands `bash -c '<inner>'` / `sh -c` / `zsh -c` / `eval` so the inner command is re-checked for §8 violations, but the shell set was only `bash|sh|zsh`. `dash` — the Debian/Ubuntu default `/bin/sh` — plus `ksh` and `ash` (busybox) were not unwrapped, so `dash -c "rm -rf $X"` (empty `$X` → `rm -rf /…`) and `dash -c 'npx <unpinned>'` sailed through on the most common CI/server platform. This is distinct from the documented best-effort wrapper exclusions (`sudo` / `timeout` / `xargs` / `nice`, which carry the `[allow-rm-rf-var]` escape and are intentionally not covered) — dash/ksh/ash are in the *covered* indirect-shell class and were simply missed. Fix: widen the shell set to `bash|sh|zsh|dash|ksh|ash` in both unwrap regexes, closing the whole Bourne family rather than one instance. Each name stays separator-anchored, so it never matches inside a longer word (`dashboard`, `stash`). csh/tcsh excluded (different `-c` quoting, rare). Added 7 corpus rows (5 deny incl. `dash -lc` and unpinned-npx, 2 pass FP-guards). Corpus 140 → 147.
26
+
11
27
  ## [0.23.16] - 2026-06-10
12
28
 
13
29
  **Patch — cwd→projects-dir encoding silently no-op'd the §11 gate (and 3 more hooks) for paths with a space / `+` / `@`.** Spec content unchanged (stays v6.14.1). Continues the end-to-end user-test sweep.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudemd-cli",
3
- "version": "0.23.16",
3
+ "version": "0.23.18",
4
4
  "description": "Standalone CLI for §10-V banned-vocab + transcript scanning. Companion to the claudemd Claude Code plugin (github.com/sdsrss/claudemd) for use in git pre-commit hooks, GitHub Actions, and other agents.",
5
5
  "type": "module",
6
6
  "bin": {