@massu/core 2.5.4 → 2.5.6
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 +66 -0
- package/dist/cli.js +505 -407
- package/dist/hooks/auto-learning-pipeline.js +26 -2
- package/dist/hooks/classify-failure.js +53 -656
- package/dist/hooks/cost-tracker.js +26 -2
- package/dist/hooks/fix-detector.js +30 -4
- package/dist/hooks/incident-pipeline.js +26 -2
- package/dist/hooks/intent-suggester.js +26 -2
- package/dist/hooks/memory-recall.js +26 -2
- package/dist/hooks/post-edit-context.js +26 -2
- package/dist/hooks/post-tool-use.js +26 -2
- package/dist/hooks/pre-compact.js +26 -2
- package/dist/hooks/pre-delete-check.js +405 -71
- package/dist/hooks/pre-tool-use-gate.js +196 -223
- package/dist/hooks/quality-event.js +26 -2
- package/dist/hooks/rule-enforcement-pipeline.js +26 -2
- package/dist/hooks/security-gate.js +570 -181
- package/dist/hooks/session-end.js +1081 -354
- package/dist/hooks/session-start.js +26 -2
- package/dist/hooks/user-prompt.js +26 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,72 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
10
10
|
> redistributed under the **Apache License 2.0**. Full license + NOTICE:
|
|
11
11
|
> `packages/core/assets/embedder/MODEL-LICENSE`.
|
|
12
12
|
|
|
13
|
+
## [2.5.6] - 2026-11-09
|
|
14
|
+
|
|
15
|
+
### Security
|
|
16
|
+
|
|
17
|
+
- **The safety gate blocks again.** In 2.5.2 through 2.5.5 the PreToolUse gate that `massu init`
|
|
18
|
+
installs warned about everything it should have blocked and then let the call run: commands
|
|
19
|
+
that read `.env` and other secret files, piping a download into a shell, `rm -rf /`, disk
|
|
20
|
+
formatting and writes to `/etc/passwd`. Claude Code blocks a tool call only when the hook exits
|
|
21
|
+
with code 2; the gate printed "BLOCKED" and exited 0. It now exits 2 for every blocking
|
|
22
|
+
finding. **Upgrade, then run `massu init` again** so your settings pick up the change below.
|
|
23
|
+
- **A gate that fails now blocks.** `massu init` sets Claude Code's `"onFailure": "block"`
|
|
24
|
+
(Claude Code 2.1.295 or later) on the gate, so a gate that crashes, times out or prints invalid
|
|
25
|
+
output blocks the call instead of letting it through. On older Claude Code, the `massu-hook`
|
|
26
|
+
launcher and `hook-runner` turn a crashed gate into a block.
|
|
27
|
+
- **The older hook names decide too.** Settings written before 1.12.0 may still name the
|
|
28
|
+
`security-gate` and `pre-delete-check` hooks. They used to warn only; they now make the same
|
|
29
|
+
decision as the gate.
|
|
30
|
+
- **More secret files are recognised:** secrets data files under any name, such as
|
|
31
|
+
`config.secrets.yaml` or `app.secret.json`. Source files such as `secrets.ts` are still allowed.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **The gate no longer refuses good calls under load.** A slow-arriving tool call could be
|
|
36
|
+
denied as "Unexpected end of JSON input" and pass on retry. The gate now reads its whole
|
|
37
|
+
input before deciding.
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- **`massu_cost_feature` reports real data.** Each session's priced cost is split across the
|
|
42
|
+
registered features whose files it touched, in proportion to those touches; activity on files
|
|
43
|
+
that belong to no registered feature is shown as `(no registered feature)`, so the rows add up
|
|
44
|
+
to the sessions' total. Sessions whose cost is unknown are left out.
|
|
45
|
+
|
|
46
|
+
## [2.5.5] - 2026-11-09
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- **Replies no longer wait for the session-end hook.** `massu init` ran the session-end
|
|
51
|
+
hook at the end of every reply, and it blocked: measured 11-15 seconds per reply (up to 21)
|
|
52
|
+
on a long session. It now runs in the background (Claude Code's `async` hook option) and
|
|
53
|
+
limits itself, because Claude Code sets no time limit on a background hook. Each run has a
|
|
54
|
+
20-second budget (`MASSU_SESSION_END_BUDGET_MS`) and skips, and reports, work it has no time
|
|
55
|
+
for. A watchdog ends a run that overruns. Two runs for the same session never overlap: the
|
|
56
|
+
second asks the first to go again. A run after the first in a session takes about 0.4 seconds.
|
|
57
|
+
Run `massu init` again to pick up the background setting.
|
|
58
|
+
- **Session cost is now real.** Every stored session cost was 0 tokens. The transcript reader
|
|
59
|
+
dropped each response's token counts, and only the first reply of a session could be stored
|
|
60
|
+
at all. Cost is now calculated for each response at its own model's published price,
|
|
61
|
+
including 5-minute and 1-hour cache writes, fast mode, US-only routing, and Claude Haiku
|
|
62
|
+
5.5's higher rate for prompts over 100,000 tokens. Each response is counted once, though a
|
|
63
|
+
transcript repeats it across several lines. A model with no known price is reported as
|
|
64
|
+
unknown, never guessed; the old fallback charged $3/$15 and counted cache reads as free.
|
|
65
|
+
- **Old cost records repair themselves.** Sessions whose transcripts are still on disk are
|
|
66
|
+
recalculated in the background; the rest show "unknown" instead of $0. `massu_cost_session`
|
|
67
|
+
and `massu_cost_trend` say which sessions are unknown or only partly priced.
|
|
68
|
+
- **Price overrides add to the built-in list instead of replacing it.** An
|
|
69
|
+
`analytics.cost.models` entry in `massu.config.yaml` now overrides one model. Before, any
|
|
70
|
+
entry discarded the built-in prices, so every other model was charged the fallback rate. A
|
|
71
|
+
new optional `cache_write_1h_per_million` sets the 1-hour cache-write price.
|
|
72
|
+
- **A failed cloud sync no longer queues a second copy of the item.** Retrying a queued item
|
|
73
|
+
that failed again added a duplicate to the queue each time. Items the time budget can't
|
|
74
|
+
reach now wait for the next run with their retry count unchanged.
|
|
75
|
+
|
|
76
|
+
The memory database moves to schema version 2 (new cost columns). Massu backs the database up
|
|
77
|
+
before changing its schema, as before.
|
|
78
|
+
|
|
13
79
|
## [2.5.4] - 2026-11-08
|
|
14
80
|
|
|
15
81
|
### Fixed
|