cc-cream 0.3.0 → 0.3.2

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 CHANGED
@@ -6,6 +6,20 @@ All notable changes to cc-cream are documented here. Format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.2] — 2026-05-30
10
+
11
+ ### Fixed
12
+ - **`npm run coverage` (and the pre-push hook) no longer crash on Node ≥ 26.** `c8@11` does `require('yargs/yargs')`, and yargs 17's `exports` map resolves that to an **extensionless** CJS file; under Node 26's `require(ESM)` loader an extensionless file in a `"type": "module"` package is parsed as ESM, throwing `ReferenceError: require is not defined in ES module scope`. This broke the `simple-git-hooks` pre-push gate, forcing `SKIP_SIMPLE_GIT_HOOKS=1` on every push. Pinned yargs to `^18.0.0` via `overrides` — its `./yargs` export is a proper `.mjs` that Node 26 loads cleanly, and `c8@11` works against it unchanged (all 248 scenarios green under coverage). Dev-only; no runtime-dependency or published-package impact.
13
+ - **The uninstall receipt's cache-path escape hatch is now copy-pasteable.** It printed `…/cc-cream/cc-cream/<version>/src/install.js`, but the receipt reaches the user through the `/cc-cream:uninstall` slash command, whose output Claude Code renders as **markdown — which strips `<version>` as an HTML-like tag**. The user saw `cc-cream//src` (empty version) and pasting it failed with `MODULE_NOT_FOUND`, breaking the documented npm-free recovery path exactly when it's needed. The receipt now prints install.js's own resolved absolute path — via the slash command that's the real versioned cache copy — so it's both version-accurate and free of any stripped placeholder. The README uses a markdown-safe `VERSION` placeholder with an `ls` hint to read off the real one (CREAM-rhtrzwss).
14
+
15
+ ### Internal
16
+ - **Internal spec/working docs and the fp-managed `FP_CLAUDE.md` are no longer tracked in git.** `docs/` (PRD, release plan, code-review notes, install-lifecycle notes) and `FP_CLAUDE.md` are local working references, now gitignored and removed from the repo to keep the public tree focused on shipped code. No effect on the published npm package — its `files` allowlist (`src/`, `LICENSE`, `README.md`, `CHANGELOG.md`) never included them.
17
+
18
+ ## [0.3.1] — 2026-05-30
19
+
20
+ ### Fixed
21
+ - **`/cc-cream:setup` and `/cc-cream:uninstall` now actually show their result.** A `!` bang command's output is injected as model *context*, not displayed to the user (Claude Code's design), and the command bodies never told the model to surface it — so the install/uninstall *worked* but the model just replied "ready, what's next?" and the receipt (including how to clear the lingering cache) was never shown, on every model. Both command files now instruct the model to print the command output verbatim.
22
+
9
23
  ## [0.3.0] — 2026-05-30
10
24
 
11
25
  ### Added
package/README.md CHANGED
@@ -151,9 +151,12 @@ message — restart an already-open session to drop it immediately.
151
151
  > `statusLine` line still lingers in `settings.json`.
152
152
  >
153
153
  > To clear that leftover line once the plugin is gone, the **guaranteed** route is
154
- > the copy of the uninstaller still in the cache — npm-free and always present:
154
+ > the copy of the uninstaller still in the cache — npm-free and always present.
155
+ > `VERSION` is the single directory under that path (run the `ls` first to read it
156
+ > off); `/cc-cream:uninstall` also prints the fully-resolved command:
155
157
  > ```bash
156
- > node ~/.claude/plugins/cache/cc-cream/cc-cream/<version>/src/install.js --uninstall
158
+ > ls ~/.claude/plugins/cache/cc-cream/cc-cream/ # e.g. 0.3.1
159
+ > node ~/.claude/plugins/cache/cc-cream/cc-cream/VERSION/src/install.js --uninstall
157
160
  > # add --purge to also remove your config
158
161
  > ```
159
162
  > The npm bin does the same job, but **not always**: a *freshly published* version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-cream",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Claude Code cache/context/cost status-line tool",
5
5
  "directories": {
6
6
  "doc": "docs"
@@ -60,5 +60,8 @@
60
60
  "c8": "^11.0.0",
61
61
  "knip": "^6.14.2",
62
62
  "simple-git-hooks": "^2.13.1"
63
+ },
64
+ "overrides": {
65
+ "yargs": "^18.0.0"
63
66
  }
64
67
  }
package/src/install.js CHANGED
@@ -21,6 +21,12 @@ import { isEntrypoint } from './utils.js';
21
21
 
22
22
  export { writeFileAtomic } from './settings.js';
23
23
 
24
+ // Absolute path of THIS install.js. When the /cc-cream:uninstall slash command
25
+ // runs it, that's the versioned plugin-cache copy — the durable, npm-free
26
+ // escape hatch we advertise in the uninstall receipt (resolved, not guessed, so
27
+ // it carries the real version and no markdown-stripped placeholder).
28
+ const SELF_PATH = fileURLToPath(import.meta.url);
29
+
24
30
  const TRUST_NOTE =
25
31
  'The bar appears on your next message — restart only an already-open session, and the workspace must be trusted.';
26
32
 
@@ -255,18 +261,32 @@ async function uninstall({ purge }) {
255
261
  printUninstallReceipt();
256
262
  }
257
263
 
264
+ // Shorten an absolute path under $HOME to a `~/…` form for display. The shell
265
+ // still expands `~`, so the result stays copy-pasteable.
266
+ function tildeify(p) {
267
+ const home = os.homedir();
268
+ return p === home || p.startsWith(`${home}/`) ? `~${p.slice(home.length)}` : p;
269
+ }
270
+
258
271
  // The closing receipt. No Claude Code host removal path drops our statusLine OR
259
272
  // the version cache, so spell out what's gone, what the host leaves behind, and
260
273
  // the npm-free escape hatch (the lingering cache always has a working install.js).
261
274
  // See project memory cc-cream-plugin-lifecycle-findings.
275
+ //
276
+ // The escape-hatch line prints SELF_PATH — this install.js's real, resolved
277
+ // location — NOT a `<version>` placeholder. The receipt reaches the user through
278
+ // the slash command, whose output Claude Code renders as markdown; `<version>`
279
+ // was silently stripped to an empty segment (cc-cream//src), breaking copy-paste
280
+ // exactly when it's needed (CREAM-rhtrzwss). Via the slash command SELF_PATH IS
281
+ // the versioned cache copy, so the path is both accurate and markdown-safe.
262
282
  function printUninstallReceipt() {
263
283
  console.log('\nDone — the bar disappears on your next message (restart an already-open session to drop it now).');
264
284
  console.log('The host leaves the rest behind; to fully remove cc-cream:');
265
285
  console.log(' • Plugin: /plugin uninstall cc-cream then /plugin marketplace remove cc-cream');
266
286
  console.log(' • Version cache (never auto-removed): rm -rf ~/.claude/plugins/cache/cc-cream');
267
287
  console.log(' • The /cc-cream:* slash commands linger in this session until you restart Claude Code.');
268
- console.log('Already removed the plugin? This same uninstall lives in the cache:');
269
- console.log(' node ~/.claude/plugins/cache/cc-cream/cc-cream/<version>/src/install.js --uninstall [--purge]');
288
+ console.log('Re-run this uninstall later (e.g. the plugin is gone but the bar lingers) — it lives at:');
289
+ console.log(` node ${tildeify(SELF_PATH)} --uninstall [--purge]`);
270
290
  }
271
291
 
272
292
  // `cc-cream-setup --check-config`: lint ~/.claude/cc-cream.json against the