@holmes-lab/holmes-kit 0.19.0 → 0.19.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 +120 -0
- package/dist/.build-id +1 -1
- package/dist/holmes/cli/agents.d.ts +22 -0
- package/dist/holmes/cli/agents.js +76 -1
- package/dist/holmes/cli/approve.js +6 -1
- package/dist/holmes/cli/doctor.d.ts +51 -1
- package/dist/holmes/cli/doctor.js +211 -36
- package/dist/holmes/cli/index.js +7 -1
- package/dist/holmes/cli/init.js +12 -0
- package/dist/holmes/cli/native-deps.d.ts +65 -0
- package/dist/holmes/cli/native-deps.js +131 -0
- package/dist/holmes/cpg/cycle-observation.d.ts +65 -0
- package/dist/holmes/cpg/cycle-observation.js +146 -0
- package/dist/holmes/governance/approval-queue.d.ts +23 -4
- package/dist/holmes/governance/approval-queue.js +44 -6
- package/dist/holmes/hooks/stop.d.ts +15 -0
- package/dist/holmes/hooks/stop.js +46 -3
- package/dist/holmes/mcp/handlers.d.ts +2 -0
- package/dist/holmes/mcp/handlers.js +29 -2
- package/dist/holmes/mcp/maintenance-analyze.d.ts +37 -0
- package/dist/holmes/mcp/maintenance-analyze.js +73 -1
- package/dist/holmes/mcp/maintenance-evidence.d.ts +41 -0
- package/dist/holmes/mcp/maintenance-evidence.js +71 -4
- package/dist/holmes/project/install-scripts-policy.d.ts +76 -0
- package/dist/holmes/project/install-scripts-policy.js +131 -0
- package/dist/holmes/project/npx-bin.d.ts +6 -0
- package/dist/holmes/project/npx-bin.js +10 -0
- package/dist/holmes/review/failed-test-names.d.ts +19 -0
- package/dist/holmes/review/failed-test-names.js +43 -0
- package/dist/holmes/review/run-replay.d.ts +23 -0
- package/dist/holmes/review/run-replay.js +30 -0
- package/dist/holmes/review/test-runner.d.ts +27 -0
- package/dist/holmes/review/test-runner.js +59 -3
- package/docs/install-guide.md +54 -5
- package/package.json +4 -1
package/docs/install-guide.md
CHANGED
|
@@ -91,19 +91,63 @@ Your npm metadata cache predates the release — measured minutes after publishi
|
|
|
91
91
|
registry already listed the version while a default-cache install still refused it. Add
|
|
92
92
|
`--prefer-online`, or retry in a few minutes.
|
|
93
93
|
|
|
94
|
+
### npm 12: `better-sqlite3` has no binary and nothing failed
|
|
95
|
+
|
|
96
|
+
npm 12 (and npm ≥ 11.19) **blocks dependency install scripts by default** and skips them
|
|
97
|
+
silently: `npm ci` exits 0, `better-sqlite3` never runs `prebuild-install`, and the first
|
|
98
|
+
`require` dies with "Could not locate the bindings file". Measured 2026-09-09 (Windows 11,
|
|
99
|
+
npm 12.0.1, Node 24.19.0). `npx holmes-kit doctor` names this cause as `scripts-blocked` and prints
|
|
100
|
+
the commands below; do not reinstall — a reinstall reproduces the same state.
|
|
101
|
+
|
|
102
|
+
Only **one** package needs its script: `better-sqlite3`. The 8 tree-sitter packages are also
|
|
103
|
+
listed as blocked, but they load from their shipped `prebuilds/` without the script (measured on
|
|
104
|
+
all 8), so they are deliberately NOT approved. This repository's `package.json` therefore carries
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
"allowScripts": { "better-sqlite3@12.11.1": true }
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
pinned to the lockfile version, so a dependency bump forces a fresh review (a test fails until the
|
|
111
|
+
pin is updated). Recovery, by how you installed — on Windows use the `.cmd` spellings (see below):
|
|
112
|
+
|
|
113
|
+
| Layout | Commands |
|
|
114
|
+
|---|---|
|
|
115
|
+
| A project that depends on holmes-kit | `npm install-scripts approve better-sqlite3@12.11.1` then `npm rebuild better-sqlite3 --foreground-scripts` (from the project root; this writes the pin into YOUR package.json) |
|
|
116
|
+
| This repository checkout | already approved — `npm rebuild better-sqlite3 --foreground-scripts` if the binary is missing |
|
|
117
|
+
| Global (`npm install -g`) | `npm rebuild -g better-sqlite3 --foreground-scripts --allow-scripts=better-sqlite3` — a per-command flag scoped to one package; no npm config is changed. Target the dependency: `rebuild -g @holmes-lab/holmes-kit` re-links the bin and dies `EEXIST` under npm 12 (measured). If this fails `EPERM` under `C:\Program Files\nodejs`, your prefix is protected — see "Before `npm install -g`" above |
|
|
118
|
+
| Bare `npx` | not repairable in place — do a local install and use the first row |
|
|
119
|
+
|
|
120
|
+
Never use `--dangerously-allow-all-scripts` or a global `allow-scripts` config: the point of the
|
|
121
|
+
policy is that only the reviewed package runs code at install time. Older npm 11 (measured 11.6.2)
|
|
122
|
+
ignores the `allowScripts` field and runs scripts as before; npm 11.19 honours it exactly like 12.
|
|
123
|
+
|
|
124
|
+
### Windows: `npm`/`npx` are blocked by the PowerShell execution policy
|
|
125
|
+
|
|
126
|
+
`npm`, `npx` and `holmes-kit` resolve to `.ps1` shims first, and a `Restricted`/`AllSigned`
|
|
127
|
+
policy refuses them (PSSecurityException). The `.cmd` shims always run: `npm.cmd`, `npx.cmd`.
|
|
128
|
+
doctor emits `.cmd` commands on Windows and appends the policy note when it can observe a
|
|
129
|
+
blocking policy. Do not change the execution policy to fix this.
|
|
130
|
+
|
|
94
131
|
### `better-sqlite3` fails to build
|
|
95
132
|
|
|
96
133
|
The one dependency that may need a toolchain. The 8 tree-sitter grammars ship prebuilt binaries
|
|
97
134
|
(`darwin-arm64`, `darwin-x64`, `linux-x64`, `win32-x64`) and compile nothing; `better-sqlite3`
|
|
98
135
|
downloads a prebuild at install time and **falls back to compiling** when none matches your
|
|
99
|
-
platform and Node ABI.
|
|
136
|
+
platform and Node ABI. doctor reports this as `build-failed` — with the approval in place, the
|
|
137
|
+
script ran and left no binary — and names what it can observe on Windows (Python on PATH, Visual
|
|
138
|
+
Studio C++ Build Tools, a space in the install path). It cannot observe a failed prebuild
|
|
139
|
+
download; rerun with `--foreground-scripts` to see the script's own output. If it compiles, you
|
|
140
|
+
need:
|
|
100
141
|
|
|
101
142
|
| Platform | Toolchain |
|
|
102
143
|
|---|---|
|
|
103
|
-
| Windows | Visual Studio Build Tools (C++ workload) |
|
|
144
|
+
| Windows | Visual Studio Build Tools (C++ workload) + Python 3 on PATH; prefer an install path without spaces |
|
|
104
145
|
| macOS | Xcode Command Line Tools (`xcode-select --install`) |
|
|
105
146
|
| Alpine | `apk add --no-cache python3 make g++` |
|
|
106
147
|
|
|
148
|
+
A binary that exists but fails with `NODE_MODULE_VERSION` was built for another Node — doctor
|
|
149
|
+
calls that `abi-mismatch`; rebuild against the Node you run.
|
|
150
|
+
|
|
107
151
|
### `spawn sh ENOENT` during a git-URL install
|
|
108
152
|
|
|
109
153
|
`npm i -g git+ssh://…` is not a supported path: npm 11 clones the repository into its cache and
|
|
@@ -117,15 +161,20 @@ npx holmes-kit doctor # local install
|
|
|
117
161
|
holmes-kit doctor # global install
|
|
118
162
|
```
|
|
119
163
|
|
|
120
|
-
Expect `
|
|
164
|
+
Expect `0 fail` on a healthy install (a few `warn` lines are normal — measured `12 pass, 4 warn,
|
|
165
|
+
0 fail` on a Windows source checkout). The lines that matter most:
|
|
121
166
|
|
|
122
167
|
- `global prefix` — whether `-g` would work on this machine, and the remedy if not
|
|
123
|
-
- `tree-sitter grammars`
|
|
168
|
+
- `tree-sitter grammars` — every grammar actually PARSES in a fresh process (`8 grammars parse`)
|
|
169
|
+
- `better-sqlite3` — loads and runs a `:memory:` query; on FAIL the detail names the cause
|
|
170
|
+
(`scripts-blocked`, `abi-mismatch`, `build-failed`, or `unknown` with the raw error) and the fix
|
|
171
|
+
is the exact command for your install layout
|
|
124
172
|
|
|
125
173
|
## What we deliberately do NOT do
|
|
126
174
|
|
|
127
175
|
| Idea | Why not |
|
|
128
176
|
|---|---|
|
|
129
|
-
| A `postinstall` script that prints guidance |
|
|
177
|
+
| A `postinstall` script that prints guidance | Under npm 12 it would be blocked like any other install script, and it forfeits this package's property of running no install scripts of its own |
|
|
178
|
+
| Approving the tree-sitter grammars in `allowScripts` | Measured unnecessary — they load from shipped prebuilds — and every extra approval is code that runs at install time |
|
|
130
179
|
| Recommending `npx @holmes-lab/holmes-kit init` with no install | `init` writes wiring with absolute paths; under bare `npx` those point into the npx cache and break when it is pruned |
|
|
131
180
|
| Fixing your npm prefix from inside the package | A package rewriting your npm configuration is exactly the supply-chain behaviour this guide warns about |
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"//": "@implements A-SPEC-209",
|
|
3
3
|
"name": "@holmes-lab/holmes-kit",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.3",
|
|
5
5
|
"description": "Holmes-Kit — deterministic Agentic Software Engineering (ASE) harness with causal traceability (spec chain + D-CPG + RTM + phase guardrail)",
|
|
6
6
|
"main": "dist/holmes/mcp/server.js",
|
|
7
7
|
"types": "dist/holmes/mcp/server.d.ts",
|
|
@@ -85,5 +85,8 @@
|
|
|
85
85
|
},
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
|
+
},
|
|
89
|
+
"allowScripts": {
|
|
90
|
+
"better-sqlite3@12.11.1": true
|
|
88
91
|
}
|
|
89
92
|
}
|