cc-cream 0.1.9 → 0.1.11
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 +10 -0
- package/README.md +4 -3
- package/package.json +2 -2
- package/src/install.js +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to cc-cream are documented here. Format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.1.11] — 2026-05-29
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **Status bar could pin to an old version when a non-semver cache dir exists** (CREAM-kxwhbwzq). The plugin-mode statusLine self-resolves the highest installed version with `ls -1d …/cc-cream/*/ | sort -V | tail -1`. `sort -V` sorts directory *names*, so a git-sha install dir (e.g. `c83650b6360f/`) sorts after every `0.1.x` and got picked — pinning the bar to whatever version that dir held (observed: 0.1.3), with `/plugin update` unable to move off it. The command now filters to semver-named dirs (`grep -E '/[0-9]+(\.[0-9]+)+/$'`) before `sort -V`, so a stray non-numeric dir can't hijack version selection. Re-run `/cc-cream:setup` once (or reinstall) to rewrite the statusLine with the hardened command.
|
|
11
|
+
|
|
12
|
+
## [0.1.10] — 2026-05-29
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- **Setup reminder after plugin install** (CREAM-cpcwjkxi). Installing the plugin makes the commands available but can't wire the status bar (Claude Code has no install hook to write `settings.json`), so users saw no bar and didn't know to run `/cc-cream:setup`. A `SessionStart` hook (`hooks/hooks.json`, auto-discovered) now emits a one-line `systemMessage` nudging the user to run `/cc-cream:setup` — but **only while cc-cream's statusLine is absent**, so it self-silences once setup runs. `systemMessage` is shown to the user and adds **nothing** to the model context (zero tokens). Degrades safely: missing `settings.json` → nudge; malformed → silent; always exits 0. Biome now also lints `hooks/`.
|
|
16
|
+
|
|
7
17
|
## [0.1.9] — 2026-05-29
|
|
8
18
|
|
|
9
19
|
### Fixed
|
package/README.md
CHANGED
|
@@ -72,9 +72,10 @@ Then wire it into your settings in one step:
|
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
The `/cc-cream:setup` command runs the consent installer, which writes the
|
|
75
|
-
`statusLine` block to `~/.claude/settings.json`.
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
`statusLine` block to `~/.claude/settings.json`. Until you run it, cc-cream
|
|
76
|
+
prints a one-line reminder at the start of each session (it stops once the bar
|
|
77
|
+
is wired). Updates are automatic: when `/plugin update` drops a new version into
|
|
78
|
+
the cache, the next render picks it up without any further action.
|
|
78
79
|
|
|
79
80
|
### Option 2 — npm
|
|
80
81
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-cream",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Claude Code cache/context/cost status-line tool",
|
|
5
5
|
"directories": {
|
|
6
6
|
"doc": "docs"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"lint": "biome lint src/",
|
|
9
|
+
"lint": "biome lint src/ hooks/",
|
|
10
10
|
"knip": "knip",
|
|
11
11
|
"validate": "command -v claude >/dev/null 2>&1 && claude plugin validate . || echo 'cc-cream: claude CLI not found — skipping plugin validation'",
|
|
12
12
|
"pretest": "npm run lint && npm run knip && npm run validate",
|
package/src/install.js
CHANGED
|
@@ -23,10 +23,13 @@ const TRUST_NOTE =
|
|
|
23
23
|
// `nodePath` is the ABSOLUTE node binary, resolved once at setup time — the
|
|
24
24
|
// statusLine subprocess may not inherit the user's PATH, so a bare `node` is
|
|
25
25
|
// unsafe. The `-d .../*/` glob yields directory paths with a trailing slash, so
|
|
26
|
-
// `src/cc-cream.js` concatenates directly. `
|
|
27
|
-
//
|
|
26
|
+
// `src/cc-cream.js` concatenates directly. The `grep` keeps ONLY semver-named
|
|
27
|
+
// dirs (e.g. `0.1.10/`) before `sort -V | tail -1` picks the highest — without
|
|
28
|
+
// it, a non-numeric cache dir (a git-sha install like `c83650b6360f/`) sorts
|
|
29
|
+
// last and pins the bar to whatever version that happens to be, defeating
|
|
30
|
+
// auto-update. With it, `/plugin update` is applied live with no re-run of setup.
|
|
28
31
|
export function autoUpdateCommand(nodePath) {
|
|
29
|
-
return `${nodePath} "$(ls -1d "\${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/plugins/cache/*/cc-cream/*/ 2>/dev/null | sort -V | tail -1)src/cc-cream.js"`;
|
|
32
|
+
return `${nodePath} "$(ls -1d "\${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/plugins/cache/*/cc-cream/*/ 2>/dev/null | grep -E '/[0-9]+(\\.[0-9]+)+/$' | sort -V | tail -1)src/cc-cream.js"`;
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
// `desired` is considered already installed if it matches the planned command
|