@massu/core 1.16.3 → 2.1.0
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 +135 -0
- package/dist/cli.js +2453 -1187
- package/dist/hooks/auto-learning-pipeline.js +265 -48
- package/dist/hooks/classify-failure.js +264 -47
- package/dist/hooks/cost-tracker.js +261 -44
- package/dist/hooks/fix-detector.js +270 -53
- package/dist/hooks/incident-pipeline.js +259 -42
- package/dist/hooks/intent-suggester.js +261 -44
- package/dist/hooks/memory-recall.js +401 -50
- package/dist/hooks/post-edit-context.js +263 -46
- package/dist/hooks/post-tool-use.js +287 -170
- package/dist/hooks/pre-compact.js +261 -44
- package/dist/hooks/pre-delete-check.js +265 -48
- package/dist/hooks/pre-tool-use-gate.js +265 -48
- package/dist/hooks/quality-event.js +261 -44
- package/dist/hooks/rule-enforcement-pipeline.js +260 -43
- package/dist/hooks/security-gate.js +261 -44
- package/dist/hooks/session-end.js +1442 -339
- package/dist/hooks/session-start.js +618 -274
- package/dist/hooks/user-prompt.js +287 -70
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,141 @@ 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.1.0] - 2026-07-22
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **Zero-onus hook Node bootstrap — `@massu/core` now makes ITSELF run under a compatible
|
|
18
|
+
Node instead of crashing.** `2.0.0` removed the native `better-sqlite3` ABI for Node
|
|
19
|
+
`>= 22.13` by defaulting to `node:sqlite`, but three residual gaps remained: a sub-floor
|
|
20
|
+
Node still broke a bare hook, the installer permitted the hook and MCP-server launchers to
|
|
21
|
+
diverge, and `doctor` verified hooks were *configured* but never that they *execute*. This
|
|
22
|
+
release closes all three (CR-70):
|
|
23
|
+
- **Self-bootstrapping launcher.** A single chokepoint at the top of the CLI
|
|
24
|
+
(`bootstrapNodeOrExit`, above the subcommand dispatch, so it covers both the `hook-runner`
|
|
25
|
+
and MCP-server paths) checks the running Node against the floor. At or above the floor it
|
|
26
|
+
is a no-op single version compare; below the floor it discovers a compatible Node from a
|
|
27
|
+
**strict absolute-path allowlist** (nvm / fnm / volta install dirs + Homebrew kegs —
|
|
28
|
+
never bare `PATH`/`which`) and re-execs under it with full stdin/stdout/exit-code
|
|
29
|
+
fidelity. If no compatible Node exists it fails **loud** with a copy-paste install remedy
|
|
30
|
+
— never a silent hook crash. Opt out with `MASSU_NO_NODE_BOOTSTRAP=1` (still fails loud
|
|
31
|
+
below the floor).
|
|
32
|
+
- **Installer launch symmetry.** The `.mcp.json` server command and the hook commands are
|
|
33
|
+
locked to one launch mechanism (`npx -y @massu/core@<version>`, the hook only appending
|
|
34
|
+
`hook-runner <name>`), so the wrapped-server / bare-hooks asymmetry that masked the
|
|
35
|
+
original incident cannot be reintroduced.
|
|
36
|
+
- **Truthful hook health.** `massu doctor` now runs a real canary hook end-to-end under the
|
|
37
|
+
current Node and reports **RED** on any runtime failure (`ERR_DLOPEN_FAILED`, non-zero
|
|
38
|
+
exit, timeout) — extending the truthful-doctor probe from database construction to hook
|
|
39
|
+
execution.
|
|
40
|
+
|
|
41
|
+
Zero customer action required: upgrading `@massu/core` is the entire fix. Enforced by five
|
|
42
|
+
drift-guards + pattern-scanner Checks 47/48/49 (CR-70). Plan:
|
|
43
|
+
`plan-2026-07-22-zero-onus-hook-node-bootstrap`. Incident:
|
|
44
|
+
`docs/incidents/2026-07-22-native-abi-hooks-bare-node-launch.md`.
|
|
45
|
+
|
|
46
|
+
## [2.0.1] - 2026-07-22
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- **`massu doctor` now recognizes hooks committed in `.claude/settings.json`, not only
|
|
51
|
+
`.claude/settings.local.json`.** Claude Code reads and merges both files, but doctor's
|
|
52
|
+
"Hooks Config" and "Shell Hooks" checks inspected only `settings.local.json` — so a project
|
|
53
|
+
that version-controls its hooks in the committed `settings.json` (the norm for a shared/
|
|
54
|
+
governance config) reported "No hooks configured" and an overall **UNHEALTHY** verdict even
|
|
55
|
+
though every hook was wired and firing. Both checks now count the union of hooks across
|
|
56
|
+
`settings.json` + `settings.local.json`. Guarded by `doctor-hooks-config.test.ts`.
|
|
57
|
+
|
|
58
|
+
## [2.0.0] - 2026-07-21
|
|
59
|
+
|
|
60
|
+
**Breaking release.** The local database engine now defaults to Node's built-in
|
|
61
|
+
`node:sqlite` instead of the native `better-sqlite3`, and the minimum Node version is
|
|
62
|
+
raised to **22.13.0**. This ends the Node-ABI-mismatch failure class structurally — the
|
|
63
|
+
default install has no compiled native module to `dlopen`, so a Node upgrade can never
|
|
64
|
+
again silently break memory storage.
|
|
65
|
+
|
|
66
|
+
### Changed
|
|
67
|
+
|
|
68
|
+
- **BREAKING: minimum Node is now `>=22.13.0`** (drops 20 and 21). `node:sqlite` ships
|
|
69
|
+
flag-free with FTS5 only from 22.13; earlier 22.x (22.0–22.12) are not supported. A
|
|
70
|
+
preflight check fails loudly with the required version if you run an older Node.
|
|
71
|
+
- **BREAKING: the default local DB engine is now `node:sqlite` (native-free)** (CR-69,
|
|
72
|
+
`plan-memory-system-to-100-percent` WS4 / Layer 2). Every database open routes through a
|
|
73
|
+
single adapter (`db-driver.ts`) that constructs Node's built-in SQLite — no native
|
|
74
|
+
compile, no ABI, no `prebuild-install`. `better-sqlite3` is retained as an **opt-in
|
|
75
|
+
fallback**: set `MASSU_DB_ENGINE=better-sqlite3` to route through the CR-65 self-healing
|
|
76
|
+
native loader instead. Storage format is unchanged and byte-compatible in both
|
|
77
|
+
directions — existing databases open as-is under either engine. Enforced by a dual-engine
|
|
78
|
+
parity test (derived from the live schema), a drift-guard, and pattern-scanner Check 46.
|
|
79
|
+
`massu doctor` now reports the active engine and proves it by constructing a DB and
|
|
80
|
+
running `SELECT 1`.
|
|
81
|
+
|
|
82
|
+
### Migration
|
|
83
|
+
|
|
84
|
+
- Most installs need no action — a fresh `npm install -g @massu/core@2.0.0` on Node
|
|
85
|
+
`>=22.13` switches to `node:sqlite` automatically and reads your existing database
|
|
86
|
+
unchanged. If you must stay on the native engine (e.g. an environment pinned below Node
|
|
87
|
+
22.13 that you cannot upgrade), set `MASSU_DB_ENGINE=better-sqlite3` — but the supported
|
|
88
|
+
path is to upgrade Node.
|
|
89
|
+
|
|
90
|
+
### Infrastructure
|
|
91
|
+
|
|
92
|
+
- **G-6 anti-vacuity registration for this release's guard pile** (no `@massu/core` runtime
|
|
93
|
+
change, `plan-2026-07-21-g6-wave-2-unpushed-pile-registration`). Registers a can-fail proof
|
|
94
|
+
for every enforcement guard shipped by WS3 / Slice 5 (CR-67) / CR-68 / WS4 (CR-69) — 14
|
|
95
|
+
pattern-scanner shell fail-points (Checks 44/45/46) + 32 vitest source-plant proofs — plus
|
|
96
|
+
re-pins 3 stale non-guard exempts and hardens 3 T-3 symbol-grep predicates (Check 44 d/e →
|
|
97
|
+
AST call-site checks). Makes pre-push `[22/22]` (the G-6 anti-vacuity meta-gate) green.
|
|
98
|
+
|
|
99
|
+
## [1.17.0] - 2026-07-21
|
|
100
|
+
|
|
101
|
+
The memory system is now feature-complete: cross-repo sharing and the opt-in file
|
|
102
|
+
renderer land here, both fail-closed and default-off. This is the last release on the
|
|
103
|
+
`better-sqlite3` engine and the last to support Node 20/21 — the next major (`2.0.0`)
|
|
104
|
+
switches the local database to Node's built-in `node:sqlite` and raises the Node floor.
|
|
105
|
+
|
|
106
|
+
### Added
|
|
107
|
+
|
|
108
|
+
- **Cross-repo memory sharing — local-first, opt-in, fail-closed** (`plan-memory-system-to-100-percent`
|
|
109
|
+
Slice 5, CR-67). A durable memory can now travel from one repo to another, but **nothing crosses a
|
|
110
|
+
repo boundary without a human act on both sides, and nothing that crosses is ever treated as an
|
|
111
|
+
instruction.** Export is an explicit human `massu memory share` that produces a signed, secret-refusing
|
|
112
|
+
envelope (it refuses rather than redacts) written to `~/.massu/shared/`, outside every repo. The
|
|
113
|
+
receiving side never auto-applies: `massu memory accept` materializes the memory only after
|
|
114
|
+
**re-verifying the retained signed envelope bytes** (a stored "verified" boolean is never treated as
|
|
115
|
+
authority), and until then the item surfaces in recall as a zero-content pointer; once accepted it
|
|
116
|
+
surfaces as fenced, provenance-headed data. New CLI verbs: `massu memory review | accept | refuse |
|
|
117
|
+
share | trust` (accept/refuse are CLI-only — never a tool the model can invoke). Both opt-ins default
|
|
118
|
+
**OFF**, so a dormant install shares and mints nothing. Three-layer enforcement: code apply-gates +
|
|
119
|
+
`shared-memory-*` drift-guards + pattern-scanner Check 44.
|
|
120
|
+
- **Opt-in memory file-renderer** (`plan-memory-system-to-100-percent` WS3, CR-61). Massu can render
|
|
121
|
+
selected durable memories into a managed region of your memory files. It is **off by default**
|
|
122
|
+
(`memory.files.renderEnabled: false`) and the human always wins: the file on disk is the standing
|
|
123
|
+
source of truth, Massu **never writes a file it cannot prove it authored** (authorship is a per-install
|
|
124
|
+
keyed HMAC, never a public body-hash) and **never un-deletes a file the human deleted** — an absent
|
|
125
|
+
memory directory is a no-op. Tombstones live in the memory corpus, not the database.
|
|
126
|
+
|
|
127
|
+
### Fixed
|
|
128
|
+
|
|
129
|
+
- **Memory ingestion no longer mints noise, and the writer only renders memory-worthy facts**
|
|
130
|
+
(`plan-memory-system-to-100-percent` WS3 prerequisites). A cluster of ingestion defects that would
|
|
131
|
+
have polluted the corpus the moment the renderer was enabled: Massu stopped mining tool-call
|
|
132
|
+
responses for spurious "decisions"; a hook double-fire that recorded every event twice was ended
|
|
133
|
+
(one settings layer now owns the hooks); `massu memory prune-noise` expires accumulated ingestion
|
|
134
|
+
noise (expire, never hard-delete); and the file-renderer now writes only memory-worthy fact types,
|
|
135
|
+
never raw session telemetry.
|
|
136
|
+
|
|
137
|
+
### Infrastructure
|
|
138
|
+
|
|
139
|
+
- **CR-68 — every session handoff must be turn-key** (internal governance; no shipped `@massu/core`
|
|
140
|
+
runtime change). A `RECAP`/`HANDOFF` must carry a Next-Session Runbook that spells out Vehicle,
|
|
141
|
+
Steps, Stop gates, and a verifiable Acceptance check per open item — never a bare "Operator TODO"
|
|
142
|
+
list. Enforced by a completeness script + drift-guard + pattern-scanner Check 45 (VR-HANDOFF).
|
|
143
|
+
- **CR-62 — a bug the machine finds produces the same artifacts as one a human reports** (internal
|
|
144
|
+
governance). Any fix that closes a silent-failure or data-loss class now ships an incident doc, a
|
|
145
|
+
drift-guard, and a memory entry in the same push, enforced at pre-push (VR-INCIDENT-COVERAGE) —
|
|
146
|
+
closing the class where audit-discovered defects were fixed and forgotten with no durable trail.
|
|
147
|
+
|
|
13
148
|
## [1.16.3] - 2026-07-15
|
|
14
149
|
|
|
15
150
|
### Fixed
|