cc-cream 0.3.2 → 0.3.3
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 +9 -0
- package/README.md +16 -4
- package/package.json +1 -1
- package/src/segments.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@ All notable changes to cc-cream are documented here. Format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.3.3] — 2026-05-30
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- **The post-publish `npx` smoke test now uses `--safe-chain-skip-minimum-package-age`** so the `@manual` "npm indexing" scenario works immediately after a release without waiting for the package-age guard to lift (CREAM-elrbkfot).
|
|
13
|
+
- **TTL segment now displays minutes only** (`ttl:60`, `ttl:8`, `ttl:0`) instead of the previous `HH:MM` format (`ttl:01:00`). Simpler to read at a glance; matches the 60-second refresh cadence (CREAM-vhhdhydn).
|
|
14
|
+
|
|
15
|
+
### Documentation
|
|
16
|
+
- **The `cache` segment's `drop` / `drop_recover` config keys are now documented.** They've been live since cache drop-detection shipped but never appeared in the README — the segment catalog listed `cache` as "neutral" with no mention that it turns red on a sharp hit-rate drop, nor that the trip/recover thresholds are configurable. Added a "`cache` drop detection" subsection, surfaced the keys in the example config, and corrected the catalog color note. This is the documentation outcome of CREAM-wwsdavum (configure-via-`/cc-cream:` command), which is otherwise declined as a dup of the deliberately-closed CREAM-udibxkch.
|
|
17
|
+
|
|
9
18
|
## [0.3.2] — 2026-05-30
|
|
10
19
|
|
|
11
20
|
### Fixed
|
package/README.md
CHANGED
|
@@ -160,8 +160,8 @@ message — restart an already-open session to drop it immediately.
|
|
|
160
160
|
> # add --purge to also remove your config
|
|
161
161
|
> ```
|
|
162
162
|
> The npm bin does the same job, but **not always**: a *freshly published* version
|
|
163
|
-
> is blocked by npm's min-package-age safe-chain guard (it reports "
|
|
164
|
-
>
|
|
163
|
+
> is blocked by npm's min-package-age safe-chain guard (it reports "No versions
|
|
164
|
+
> available") until it ages in, so use it only if the cache route isn't handy:
|
|
165
165
|
> ```bash
|
|
166
166
|
> npx -y -p cc-cream cc-cream-setup --uninstall
|
|
167
167
|
> ```
|
|
@@ -210,7 +210,7 @@ cc-cream-setup --check-config # reports unknown keys / out-of-domain values; e
|
|
|
210
210
|
"percentage": "consumed",
|
|
211
211
|
"segments": {
|
|
212
212
|
"ctx": { "on": true, "row": 1, "order": 2, "amber": 30, "orange": 40, "red": 50, "basis": "window", "ceiling": 200000, "display": "basis" },
|
|
213
|
-
"cache": { "on": true, "row": 1, "order": 3 },
|
|
213
|
+
"cache": { "on": true, "row": 1, "order": 3, "drop": 20, "drop_recover": 80 },
|
|
214
214
|
"write": { "on": false, "row": 1, "order": 3.5 },
|
|
215
215
|
"ttl": { "on": true, "row": 1, "order": 4, "amber": 50, "red": 80 },
|
|
216
216
|
"cost": { "on": true, "row": 1, "order": 5 },
|
|
@@ -254,7 +254,7 @@ Colored segments additionally accept threshold keys. Thresholds mark the
|
|
|
254
254
|
| Segment | Default | Example | Meaning | Color |
|
|
255
255
|
|---|---|---|---|---|
|
|
256
256
|
| `ctx` | on, row 1 | `ctx:19% [38k]` | context-window occupancy + input-token magnitude | `<30` green · `30–40` amber · `40–50` orange · `≥50` red |
|
|
257
|
-
| `cache` | on, row 1 | `cache:95%` | last-turn cache hit rate (reads / total tokens) | neutral |
|
|
257
|
+
| `cache` | on, row 1 | `cache:95%` | last-turn cache hit rate (reads / total tokens) | neutral; **red** on a sharp drop (see below) |
|
|
258
258
|
| `write` | **off**, row 1 | `write:4%` | last-turn cache creation rate (new writes / total tokens) | neutral |
|
|
259
259
|
| `ttl` | on, row 1 | `ttl:00:52` | time remaining before cache expires (counts down to 00:00) | `<50%` green · `50–80%` amber · `≥80%` red |
|
|
260
260
|
| `cost` | on, row 1 | `~$4.50` | session cost incl. subagents; `~` = CC's estimate | neutral; hidden when zero |
|
|
@@ -301,6 +301,18 @@ default row via config must land in a zone to appear on row 1.
|
|
|
301
301
|
|
|
302
302
|
Default: `amber: 30`, `orange: 40`, `red: 50` (percent consumed).
|
|
303
303
|
|
|
304
|
+
### `cache` drop detection
|
|
305
|
+
|
|
306
|
+
The `cache` segment stays neutral while the hit rate is healthy, but turns **red**
|
|
307
|
+
when it falls sharply from one turn to the next — a cue that the prompt cache was
|
|
308
|
+
just invalidated (e.g. an edit far back in context forced a re-read). This relies
|
|
309
|
+
on per-session state, so it only fires when `session_id` is present in stdin.
|
|
310
|
+
|
|
311
|
+
- `drop`: percentage-point fall from the previous turn that trips red. Default `20`
|
|
312
|
+
(95% → 74% trips; 95% → 80% does not).
|
|
313
|
+
- `drop_recover`: once tripped, the segment stays red until the hit rate climbs
|
|
314
|
+
back to at least this value. Default `80`.
|
|
315
|
+
|
|
304
316
|
### `ttl` thresholds
|
|
305
317
|
|
|
306
318
|
Default: `amber: 50`, `red: 80` (percent of the resolved TTL consumed).
|
package/package.json
CHANGED
package/src/segments.js
CHANGED
|
@@ -63,7 +63,7 @@ function segTtl(cfg, ttlMin, now, anchorMs) {
|
|
|
63
63
|
if (!isNum(anchorMs)) return null;
|
|
64
64
|
const elapsedMin = Math.floor(Math.max(0, now - anchorMs) / 60000);
|
|
65
65
|
const remainingMin = Math.max(0, ttlMin - elapsedMin);
|
|
66
|
-
const text = `ttl:${
|
|
66
|
+
const text = `ttl:${remainingMin}`;
|
|
67
67
|
const s = cfg.segments.ttl;
|
|
68
68
|
const pctTtl = ttlMin > 0 ? (elapsedMin / ttlMin) * 100 : 0;
|
|
69
69
|
return { text, color: band(pctTtl, s.amber, s.red) };
|