@massu/core 1.6.0 → 1.6.1
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/dist/cli.js +255 -1451
- package/dist/hooks/session-start.js +10 -15
- package/docs/AUTHORING-ADAPTERS.md +41 -0
- package/docs/SECURITY.md +39 -0
- package/package.json +3 -3
- package/src/security/registry-pubkey.generated.ts +1 -1
|
@@ -8690,25 +8690,20 @@ init_parse_guard();
|
|
|
8690
8690
|
import { Parser as Parser6 } from "web-tree-sitter";
|
|
8691
8691
|
init_parse_guard();
|
|
8692
8692
|
|
|
8693
|
-
//
|
|
8694
|
-
import {
|
|
8693
|
+
// src/detect/adapters/go-chi.ts
|
|
8694
|
+
import { goChiAdapter } from "@massu/adapter-go-chi";
|
|
8695
8695
|
|
|
8696
|
-
//
|
|
8697
|
-
import {
|
|
8698
|
-
import { Language as Language2, Parser as Parser7 } from "web-tree-sitter";
|
|
8699
|
-
var MAX_AST_FILE_BYTES2 = 1 * 1024 * 1024;
|
|
8696
|
+
// src/detect/adapters/rails.ts
|
|
8697
|
+
import { railsAdapter } from "@massu/adapter-rails";
|
|
8700
8698
|
|
|
8701
|
-
//
|
|
8702
|
-
import {
|
|
8699
|
+
// src/detect/adapters/phoenix.ts
|
|
8700
|
+
import { phoenixAdapter } from "@massu/adapter-phoenix";
|
|
8703
8701
|
|
|
8704
|
-
//
|
|
8705
|
-
import {
|
|
8702
|
+
// src/detect/adapters/aspnet.ts
|
|
8703
|
+
import { aspnetAdapter } from "@massu/adapter-aspnet";
|
|
8706
8704
|
|
|
8707
|
-
//
|
|
8708
|
-
import {
|
|
8709
|
-
|
|
8710
|
-
// ../adapter-spring/dist/index.js
|
|
8711
|
-
import { Parser as Parser12 } from "web-tree-sitter";
|
|
8705
|
+
// src/detect/adapters/spring.ts
|
|
8706
|
+
import { springAdapter } from "@massu/adapter-spring";
|
|
8712
8707
|
|
|
8713
8708
|
// src/detect/codebase-introspector.ts
|
|
8714
8709
|
function introspect(detection, projectRoot) {
|
|
@@ -200,6 +200,47 @@ adapter authors to opt-in to the new shape.
|
|
|
200
200
|
Additive changes (new optional fields on result types, new
|
|
201
201
|
TreeSitterLanguage enum entries) are minor-version compatible.
|
|
202
202
|
|
|
203
|
+
## Manifest sha256 round-trip — what to do when CI fails
|
|
204
|
+
|
|
205
|
+
> Plan 3c Phase 9b P-D-004 runbook excerpt.
|
|
206
|
+
|
|
207
|
+
The `tarball-e2e` CI job runs `adapter-manifest-roundtrip.test.ts` against the
|
|
208
|
+
live registry manifest at `https://registry.massu.ai/adapters/manifest.json`.
|
|
209
|
+
The test rebuilds every workspace adapter's `dist/`, computes the sha256, and
|
|
210
|
+
asserts it matches the manifest's `sha256` entry for that `{package, version}`
|
|
211
|
+
pair.
|
|
212
|
+
|
|
213
|
+
**If the round-trip fails after a workspace adapter source edit**, the
|
|
214
|
+
manifest must be re-signed BEFORE merge. The flow:
|
|
215
|
+
|
|
216
|
+
1. **Verify your edit is intentional.** Run `npm run build` from the repo
|
|
217
|
+
root and inspect `git diff packages/adapter-<f>/dist/`. If the diff is
|
|
218
|
+
non-trivial, the source change is real and needs a manifest re-sign.
|
|
219
|
+
2. **Bump the adapter version** in `packages/adapter-<f>/package.json` (e.g.
|
|
220
|
+
`1.0.0` → `1.0.1` for a bugfix; `1.1.0` for an additive feature). Manifest
|
|
221
|
+
entries are versioned, so re-signing without a version bump would break
|
|
222
|
+
reproducibility for users on the prior version.
|
|
223
|
+
3. **Compute the new sha256** via `node packages/core/scripts/compute-adapter-shasums.mjs`
|
|
224
|
+
(or equivalent) — this writes to `~/.massu/build-shasums.json`.
|
|
225
|
+
4. **Re-sign the manifest.** Run `bash scripts/provision/registry-publish.sh
|
|
226
|
+
path/to/manifest-body.json` — reads the Ed25519 private key from macOS
|
|
227
|
+
Keychain (`massu/registry/signing/private`), produces an envelope, deploys
|
|
228
|
+
to Vercel.
|
|
229
|
+
5. **Re-run the round-trip test locally**: `MASSU_MANIFEST_ROUNDTRIP=1 npm test
|
|
230
|
+
-- adapter-manifest-roundtrip` — should now PASS.
|
|
231
|
+
6. **Commit + open PR**. The CI gate will re-verify against the freshly-deployed
|
|
232
|
+
manifest.
|
|
233
|
+
|
|
234
|
+
If CI fails on a transient registry outage (5xx, DNS, CDN cache miss), the
|
|
235
|
+
test SKIPs cleanly with a console.warn — does NOT fail the job. Re-run the
|
|
236
|
+
job to recover.
|
|
237
|
+
|
|
238
|
+
**Non-monorepo adapter authors** (third-party packages NOT under `packages/adapter-*`):
|
|
239
|
+
the round-trip test SKIPs your package automatically (workspace dir absent in
|
|
240
|
+
the monorepo). Your install-time verification chain runs against the registry
|
|
241
|
+
sha256 directly via `discover.ts:295-360` — that path catches the same drift
|
|
242
|
+
class without requiring the test.
|
|
243
|
+
|
|
203
244
|
## See also
|
|
204
245
|
|
|
205
246
|
- [`SECURITY.md`](./SECURITY.md) — signing model, key rotation, supply-chain risks
|
package/docs/SECURITY.md
CHANGED
|
@@ -240,6 +240,45 @@ per the canonical plan). The maintainer will:
|
|
|
240
240
|
5. Add the affected adapter to the manifest's `unpublished: true` list
|
|
241
241
|
if applicable, so all consumers refuse to load on next refresh.
|
|
242
242
|
|
|
243
|
+
## Migration: 1.5.x → 1.6.0 (workspace adapter publish)
|
|
244
|
+
|
|
245
|
+
> Plan 3c Phase 9b shipped 2026-05-09. See root `CHANGELOG.md` `[1.6.0]`.
|
|
246
|
+
|
|
247
|
+
`1.6.0` is **additive** — end-users on `1.5.x` are unaffected. No
|
|
248
|
+
breaking changes. No config migration. The 5 first-party AST adapters
|
|
249
|
+
(`rails`, `phoenix`, `aspnet`, `spring`, `go-chi`) continue to ship
|
|
250
|
+
CORE-BUNDLED in `@massu/core` itself; zero-config detection still works
|
|
251
|
+
out of the box.
|
|
252
|
+
|
|
253
|
+
What's new for users who want REGISTRY-VERIFIED trust:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
npm install @massu/core@^1.6.0 @massu/adapter-rails@^1.0.0
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
After install, `npx massu adapters list` will show TWO entries for
|
|
260
|
+
`rails`:
|
|
261
|
+
|
|
262
|
+
- `rails` — CORE-BUNDLED (from `@massu/core`'s bundled `dist/detect/adapters/rails.js`).
|
|
263
|
+
- `@massu/adapter-rails` — REGISTRY-VERIFIED (from `node_modules/@massu/adapter-rails/dist/`,
|
|
264
|
+
sha256-cross-checked against the signed manifest at
|
|
265
|
+
`https://registry.massu.ai/adapters/manifest.json`).
|
|
266
|
+
|
|
267
|
+
The two co-exist. Discovery prefers REGISTRY-VERIFIED when present
|
|
268
|
+
(the standalone package opts the user into the more-verified path);
|
|
269
|
+
CORE-BUNDLED remains the fallback. There is no "elevation" — they are
|
|
270
|
+
two distinct trust-class entries.
|
|
271
|
+
|
|
272
|
+
### peerDependency note
|
|
273
|
+
|
|
274
|
+
`@massu/adapter-*@1.0.0` declares `peerDependencies: { "@massu/core": "^1.6.0" }`.
|
|
275
|
+
Users pinning `@massu/core@1.5.x` who install a standalone adapter will
|
|
276
|
+
see an npm peerDep warning (non-fatal). For cleanest UX, upgrade
|
|
277
|
+
`@massu/core` to `^1.6.0` before installing standalone adapters. The
|
|
278
|
+
adapter source is binary-identical between CORE-BUNDLED and
|
|
279
|
+
REGISTRY-VERIFIED — the warning is informational, not a runtime
|
|
280
|
+
incompatibility.
|
|
281
|
+
|
|
243
282
|
## See also
|
|
244
283
|
|
|
245
284
|
- [`AUTHORING-ADAPTERS.md`](./AUTHORING-ADAPTERS.md) — how to write a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@massu/core",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AI Engineering Governance MCP Server - Session memory, knowledge system, feature registry, code intelligence, rule enforcement, tiered tooling (12 free / 72 total), 55+ workflow commands, 11 agents, 20+ patterns",
|
|
6
6
|
"main": "src/server.ts",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"build:adapter-types": "tsc -p tsconfig.adapter-types.json",
|
|
23
23
|
"build:adapter-subpath": "tsx scripts/bundle-adapters.ts --subpath-only",
|
|
24
24
|
"build:bundle-adapters": "tsx scripts/bundle-adapters.ts",
|
|
25
|
-
"build:cli": "esbuild --bundle --platform=node --format=esm --outfile=dist/cli.js src/cli.ts --external:better-sqlite3 --external:yaml --external:zod --external:chokidar --external:proper-lockfile --external:fsevents --external:web-tree-sitter --external:tweetnacl --external:tar --external:smol-toml --external:vscode-languageserver-protocol --banner:js='#!/usr/bin/env node\nimport{createRequire as __cr}from\"module\";const require=__cr(import.meta.url);'",
|
|
26
|
-
"build:hooks": "esbuild --bundle --platform=node --format=esm --outdir=dist/hooks src/hooks/*.ts --external:better-sqlite3 --external:yaml --external:zod --external:chokidar --external:proper-lockfile --external:fsevents --external:web-tree-sitter --external:tweetnacl --external:tar --external:smol-toml --external:vscode-languageserver-protocol --banner:js='import{createRequire as __cr}from\"module\";const require=__cr(import.meta.url);'",
|
|
25
|
+
"build:cli": "esbuild --bundle --platform=node --format=esm --outfile=dist/cli.js src/cli.ts --external:better-sqlite3 --external:yaml --external:zod --external:chokidar --external:proper-lockfile --external:fsevents --external:web-tree-sitter --external:tweetnacl --external:tar --external:smol-toml --external:vscode-languageserver-protocol --external:@massu/adapter-rails --external:@massu/adapter-phoenix --external:@massu/adapter-aspnet --external:@massu/adapter-spring --external:@massu/adapter-go-chi --banner:js='#!/usr/bin/env node\nimport{createRequire as __cr}from\"module\";const require=__cr(import.meta.url);'",
|
|
26
|
+
"build:hooks": "esbuild --bundle --platform=node --format=esm --outdir=dist/hooks src/hooks/*.ts --external:better-sqlite3 --external:yaml --external:zod --external:chokidar --external:proper-lockfile --external:fsevents --external:web-tree-sitter --external:tweetnacl --external:tar --external:smol-toml --external:vscode-languageserver-protocol --external:@massu/adapter-rails --external:@massu/adapter-phoenix --external:@massu/adapter-aspnet --external:@massu/adapter-spring --external:@massu/adapter-go-chi --banner:js='import{createRequire as __cr}from\"module\";const require=__cr(import.meta.url);'",
|
|
27
27
|
"prepublishOnly": "bash ../../scripts/prepublish-check.sh && node ../../scripts/bundle-pubkey.mjs && npm run build",
|
|
28
28
|
"bench:watch": "tsx test/perf/watch-benchmark.ts"
|
|
29
29
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// AUTO-GENERATED by scripts/bundle-pubkey.mjs at 2026-05-
|
|
1
|
+
// AUTO-GENERATED by scripts/bundle-pubkey.mjs at 2026-05-10T21:58:17.622Z.
|
|
2
2
|
// Source pem: packages/core/security/registry-pubkey.pem
|
|
3
3
|
// RAW-bytes sha256: 3b6226d036c472e533110d11a7d0cd2773ce1d7d4f1003517d5bd69c5418ed4c
|
|
4
4
|
// DO NOT EDIT — regenerate via `node scripts/bundle-pubkey.mjs` or
|