@holmes-lab/holmes-kit 0.35.7 → 0.35.8

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 CHANGED
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
  <!-- @implements A-SPEC-209 -->
8
+ ## [0.35.8] - 2026-10-06
9
+
10
+ ### Added
11
+
12
+ - **Codex sessions can start with the Holmes banner** (A-SPEC-751.6). Measured on codex-cli 0.160.0: Codex calls a
13
+ trusted SessionStart hook and passes its context to the model. On a machine with a runtime registry,
14
+ `runtime-binding setup --activate-hooks codex` (or `activate_hooks: ["codex"]` of the `runtime_binding` tool) now
15
+ writes `codex-session-start.js` beside the registry and adds one SessionStart entry to the workspace's project
16
+ hooks file `.codex/hooks.json`. Without activation no entry is added, and the user-level hooks file — shared by
17
+ every workspace — never gains one. An existing entry that runs a package's `session-start.js` directly is routed
18
+ to the wrapper. The entry runs only after you trust it in Codex (`/hooks`); a session start is not a gate, and
19
+ whatever goes wrong in it the wrapper exits 0 with no output. Not wired by `init`, and not for Antigravity, which
20
+ passes no hook output to the model.
21
+
8
22
  ## [0.35.7] - 2026-10-05
9
23
 
10
24
  ### Fixed
package/README.md CHANGED
@@ -24,6 +24,7 @@ Measured at `173b99650442` (specs `sha256:215f84d4e9f4`) — reproduce with `hol
24
24
  ### 🛡️ Currently Supported Features (Production Features)
25
25
 
26
26
  - **The protected store is recognised however a shell command spells it** *(new in 0.35.2 — security fix, upgrade recommended)*: through 0.35.1 a path into `.ax/specs`, `.ax/ledger`, `.ax/approvals` or `.ax/state` written directly after a shell expansion, a variable, or a character the shell removes at run time was not seen as protected, so a removal, move or overwrite of governance state could pass the gate. The store spelling now counts wherever it appears in a command, and an output redirect to a computed target is not a read. Reads still pass. A directory that merely ends in `.ax` and has a child named like the store's is judged as the store. Limit: a path assembled so the spelling never appears in the command text is outside this rule.
27
+ - **The session-start banner in Codex** *(new in 0.35.8)*: with a runtime registry, `runtime-binding setup --activate-hooks codex` (or the `runtime_binding` tool) adds a SessionStart entry to the workspace's `.codex/hooks.json`, so a Codex session starts by being told which Holmes build governs it and whether autonomous approval is on — as Claude Code sessions are. It runs after you trust it in Codex's `/hooks`. Antigravity passes no hook output to the model, so nothing is wired there.
27
28
  - **The Stop hook leaves other repositories alone** *(new in 0.35.7 — upgrade recommended for Codex users)*: Codex wires the Holmes Stop hook at user level, so it is called in every repository on the machine. Through 0.35.6 it blocked the end of a turn in a repository that is not a Holmes project (`[ART-1] … no @implements anchor`). It now answers nothing where no project can be found; inside a project nothing changes.
28
29
  - **Re-apply a registered runtime binding without leaving the session** *(new in 0.35.6)*: the MCP tool `runtime_binding` previews and applies the plan `runtime-binding setup` would make for the registered workspace, including `activate_hooks`. It never chooses a build — it uses the package the operator registry already names — and it writes only when you answer approve in the approval dialog, which shows the plan digest and the files. No answer, a denial, a client without the dialog, or autonomous approval write nothing and leave the usual queue request. Native hook trust in Codex is still given in Codex's `/hooks`.
29
30
  - **`doctor` shows when a checkout's hooks are not the ones its sessions run** *(new in 0.35.5)*: when you develop Holmes-Kit itself with sessions routed to a released install, the `development hooks` row compares the compiled files and has both hook programs judge the same payloads, so a hook change that is not live yet is visible instead of assumed. In the same release, `runtime-binding setup` refuses a plan that would write the Codex gate where Codex has it switched off *(security fix — if you ran setup with 0.35.2–0.35.4, check `doctor` for `FAIL codex user hooks`)*.
package/dist/.build-id CHANGED
@@ -1 +1 @@
1
- d2e28281-muvdpxtn
1
+ 60474c12-muvgbymb
@@ -41,7 +41,7 @@ exports.registryOwnedWiring = registryOwnedWiring;
41
41
  exports.runtimeBindingStatus = runtimeBindingStatus;
42
42
  exports.runRuntimeBinding = runRuntimeBinding;
43
43
  exports.trackedWorkspacePaths = trackedWorkspacePaths;
44
- // @implements A-SPEC-752.10, A-SPEC-752.9, A-SPEC-751.5, A-SPEC-751, A-SPEC-752, A-SPEC-752.7, A-SPEC-752.8
44
+ // @implements A-SPEC-752.10, A-SPEC-752.9, A-SPEC-751.5, A-SPEC-751.6, A-SPEC-751, A-SPEC-752, A-SPEC-752.7, A-SPEC-752.8
45
45
  const fs = __importStar(require("node:fs"));
46
46
  const os = __importStar(require("node:os"));
47
47
  const path = __importStar(require("node:path"));
@@ -251,7 +251,7 @@ function runRuntimeBinding(opts) {
251
251
  const sessionStartWrapper = path.join(dir, 'claude-session-start.js');
252
252
  add(sessionStartWrapper, `// @implements A-SPEC-751.5\nrequire('./dispatch.js').runDispatch(${JSON.stringify({ registryPath: destination, harness: 'claude', entry: 'session-start' })});\n`);
253
253
  const sessionStartCommand = runtimeHookCommand(destination, 'claude', 'session-start');
254
- const routeSessionStart = (file) => {
254
+ const routeSessionStart = (file, routed = sessionStartCommand) => {
255
255
  const raw = planned.get(file)?.after ?? readOptional(file);
256
256
  if (raw === null)
257
257
  return;
@@ -264,10 +264,10 @@ function runRuntimeBinding(opts) {
264
264
  if (!object(group) || !Array.isArray(group.hooks))
265
265
  continue;
266
266
  for (const hook of group.hooks) {
267
- if (!object(hook) || typeof hook.command !== 'string' || hook.command === sessionStartCommand)
267
+ if (!object(hook) || typeof hook.command !== 'string' || hook.command === routed)
268
268
  continue;
269
269
  if (/dist[/\\]+holmes[/\\]+hooks[/\\]+session-start\.js/.test(hook.command)) {
270
- hook.command = sessionStartCommand;
270
+ hook.command = routed;
271
271
  changed = true;
272
272
  }
273
273
  }
@@ -275,6 +275,23 @@ function runRuntimeBinding(opts) {
275
275
  if (changed)
276
276
  add(file, json(doc));
277
277
  };
278
+ // @implements A-SPEC-751.6 — Codex delivers a trusted SessionStart hook's context to the model (measured 2026-10-06).
279
+ // The wrapper is always written; the entry is added only to the workspace's project hooks file and only under
280
+ // explicit activation — the user-level file is shared by every workspace on the machine. Not a gate: Codex's
281
+ // switched-off keys are not consulted and the entry never makes a plan a conflict.
282
+ add(path.join(dir, 'codex-session-start.js'), `// @implements A-SPEC-751.6\nrequire('./dispatch.js').runDispatch(${JSON.stringify({ registryPath: destination, harness: 'codex', entry: 'session-start' })});\n`);
283
+ const codexSessionStartCommand = runtimeHookCommand(destination, 'codex', 'session-start');
284
+ const addCodexSessionStart = (file) => {
285
+ const doc = document(planned.get(file)?.after ?? readOptional(file), file);
286
+ if (doc.hooks !== undefined && !object(doc.hooks))
287
+ throw new Error(`Invalid hooks configuration: ${file}`);
288
+ const groups = doc.hooks?.SessionStart;
289
+ if (groups !== undefined && !Array.isArray(groups))
290
+ throw new Error(`Invalid SessionStart hook groups: ${file}`);
291
+ if ((groups ?? []).some((g) => object(g) && Array.isArray(g.hooks) && g.hooks.some((h) => object(h) && h.command === codexSessionStartCommand)))
292
+ return;
293
+ add(file, json({ ...doc, hooks: { ...(doc.hooks ?? {}), SessionStart: [...(groups ?? []), { hooks: [{ type: 'command', command: codexSessionStartCommand, timeout: 30 }] }] } }));
294
+ };
278
295
  const command = (harness, entry) => runtimeHookCommand(destination, harness, entry);
279
296
  const owns = (cmd) => {
280
297
  if (typeof cmd !== 'string')
@@ -557,6 +574,10 @@ function runRuntimeBinding(opts) {
557
574
  }
558
575
  }
559
576
  native(path.join(root, agents_1.CODEX_PLUGIN_DIR, 'hooks.json'), 'codex', false);
577
+ // @implements A-SPEC-751.6 — after the Codex lifecycles are planned, so the entry joins the planned document.
578
+ codexFiles.forEach((f) => routeSessionStart(f, codexSessionStartCommand));
579
+ if (activate.has('codex'))
580
+ addCodexSessionStart(codexFiles[1]);
560
581
  const claudeFiles = [path.join(home, '.claude/settings.json'), path.join(root, '.claude/settings.local.json'), path.join(root, '.claude/settings.json')];
561
582
  const claudeDocs = claudeFiles.map((f) => document(readOptional(f), f));
562
583
  const claudeEvents = claudeFiles.map(() => new Set());
@@ -567,7 +588,7 @@ function runRuntimeBinding(opts) {
567
588
  claudeEvents[existing >= 0 ? existing : activate.has('claude') ? 1 : empty >= 0 ? empty : 1].add(event);
568
589
  }
569
590
  claudeFiles.forEach((f, i) => native(f, 'claude', claudeEvents[i]));
570
- claudeFiles.forEach(routeSessionStart);
591
+ claudeFiles.forEach((f) => routeSessionStart(f));
571
592
  mcp(path.join(root, '.mcp.json'), 'claude');
572
593
  mcp(path.join(root, '.agents/mcp_config.json'), 'antigravity');
573
594
  const agyUser = (0, agents_1.agyUserHooksPath)(home);
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.runDispatch = runDispatch;
37
- // @implements A-SPEC-751, A-SPEC-751.1, A-SPEC-751.5, A-SPEC-754
37
+ // @implements A-SPEC-751, A-SPEC-751.1, A-SPEC-751.5, A-SPEC-751.6, A-SPEC-754
38
38
  const path = __importStar(require("node:path"));
39
39
  const node_child_process_1 = require("node:child_process");
40
40
  const binding_1 = require("./binding");
@@ -92,8 +92,10 @@ async function runDispatch(opts) {
92
92
  // standard output (the reason goes to standard error). It never emits a refusal and never holds a session up.
93
93
  if (opts.entry === 'session-start') {
94
94
  try {
95
- if (opts.harness !== 'claude')
96
- throw new Error('session-start is routed for claude only');
95
+ // @implements A-SPEC-751.6 — Codex delivers a trusted SessionStart hook's context to the model (measured
96
+ // 2026-10-06); Antigravity passes no output shape on, so nothing is routed for it.
97
+ if (opts.harness !== 'claude' && opts.harness !== 'codex')
98
+ throw new Error('session-start is routed for claude and codex only');
97
99
  const budget = (0, hook_process_1.boundedHookBudget)(opts.hookBudgetMs, hook_process_1.HOOK_BUDGET_MS);
98
100
  const input = await hookInput(budget);
99
101
  const hints = hintsFromInput(input);
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.35.7",
4
+ "version": "0.35.8",
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",