@holmes-lab/holmes-kit 0.35.7 → 0.35.9

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,31 @@ 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.9] - 2026-10-06
9
+
10
+ ### Security
11
+
12
+ - **The single-key approval screen shows in full what it asks about** (A-SPEC-497.4). In `holmes-kit approve --watch`
13
+ on a terminal, an item whose subject did not fit its row was shown as `… (258자 잘림)` and one keypress approved
14
+ it — most of the command was never on the screen. Such an item's full text is now printed before the keys are
15
+ offered, and `v` shows the details of any item without deciding anything (`[a]approve [v]details [d]deny
16
+ [q]question [s]skip`). The text comes from the same escaped, capped renderer the line-based screen's `[v]` uses.
17
+ `holmes-kit approve --status` shows recent outcomes if you want to review what was approved this way.
18
+
19
+ ## [0.35.8] - 2026-10-06
20
+
21
+ ### Added
22
+
23
+ - **Codex sessions can start with the Holmes banner** (A-SPEC-751.6). Measured on codex-cli 0.160.0: Codex calls a
24
+ trusted SessionStart hook and passes its context to the model. On a machine with a runtime registry,
25
+ `runtime-binding setup --activate-hooks codex` (or `activate_hooks: ["codex"]` of the `runtime_binding` tool) now
26
+ writes `codex-session-start.js` beside the registry and adds one SessionStart entry to the workspace's project
27
+ hooks file `.codex/hooks.json`. Without activation no entry is added, and the user-level hooks file — shared by
28
+ every workspace — never gains one. An existing entry that runs a package's `session-start.js` directly is routed
29
+ to the wrapper. The entry runs only after you trust it in Codex (`/hooks`); a session start is not a gate, and
30
+ whatever goes wrong in it the wrapper exits 0 with no output. Not wired by `init`, and not for Antigravity, which
31
+ passes no hook output to the model.
32
+
8
33
  ## [0.35.7] - 2026-10-05
9
34
 
10
35
  ### 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
+ f3d900b3-muvjdy3u
@@ -14,7 +14,7 @@ export interface KeyStream {
14
14
  * rejects with AbortError: leaving is not deciding. No deadline anywhere: the MAIN LANE's whole
15
15
  * point is that a human terminal can wait forever (H-SPEC-497).
16
16
  */
17
- export declare function decideByKey(stream: KeyStream, _item: Pick<PendingRequest, 'id'>): Promise<'granted' | 'denied' | 'skipped' | {
17
+ export declare function decideByKey(stream: KeyStream, _item: Pick<PendingRequest, 'id'>, onView?: () => void): Promise<'granted' | 'denied' | 'skipped' | {
18
18
  question: string;
19
19
  }>;
20
20
  /**
@@ -5,7 +5,7 @@ exports.decideByKey = decideByKey;
5
5
  exports.presentByKey = presentByKey;
6
6
  exports.defaultWaitIdle = defaultWaitIdle;
7
7
  exports.runWatch = runWatch;
8
- // @implements A-SPEC-262.2
8
+ // @implements A-SPEC-262.2, A-SPEC-497.4
9
9
  //
10
10
  // The RESIDENCE of the decision surface. S-262.1 made the surface's CONTENT (transcript-zero
11
11
  // references, context, one-key/batch); this is a thin polling loop over that content, so a request
@@ -16,6 +16,8 @@ exports.runWatch = runWatch;
16
16
  // existing runInteractive, and waits between polls when the queue is empty.
17
17
  const approval_queue_1 = require("../governance/approval-queue");
18
18
  const approve_1 = require("./approve");
19
+ const approve_context_1 = require("./approve-context");
20
+ const screen_safe_1 = require("./screen-safe");
19
21
  // @implements A-SPEC-497.2
20
22
  /**
21
23
  * ONE raw keypress decides an item — a/d/q/s; q collects one follow-up line (the question).
@@ -23,7 +25,7 @@ const approve_1 = require("./approve");
23
25
  * rejects with AbortError: leaving is not deciding. No deadline anywhere: the MAIN LANE's whole
24
26
  * point is that a human terminal can wait forever (H-SPEC-497).
25
27
  */
26
- function decideByKey(stream, _item) {
28
+ function decideByKey(stream, _item, onView) {
27
29
  return new Promise((resolve, reject) => {
28
30
  let questionMode = false;
29
31
  let line = '';
@@ -69,6 +71,11 @@ function decideByKey(stream, _item) {
69
71
  questionMode = true;
70
72
  continue;
71
73
  }
74
+ // @implements A-SPEC-497.4 — seeing is not deciding: the details are shown and the same item keeps waiting.
75
+ if (ch === 'v' && onView) {
76
+ onView();
77
+ continue;
78
+ }
72
79
  // any other key: not a decision — keep listening
73
80
  }
74
81
  };
@@ -85,8 +92,14 @@ function decideByKey(stream, _item) {
85
92
  async function presentByKey(root, io, actor, stream, state) {
86
93
  for (const p of state.pending) {
87
94
  io.print(`\n─ ${(0, approve_1.subjectCells)('─ ', p)}`);
88
- io.print('[a]approve [d]deny [q]question [s]skip > ');
89
- const d = await decideByKey(stream, p);
95
+ // @implements A-SPEC-497.4 — owner report 2026-10-05: the row ended in a notice that 258 characters were cut, and one key approved it. A
96
+ // clipped subject is a subject the operator did not see, so it is shown in full before any key is offered; `v`
97
+ // shows the details of any item. The renderer is the line-based screen's own `[v]` — nothing is rendered here.
98
+ const details = () => io.print((0, approve_context_1.renderDecisionContext)(root, p));
99
+ if ((0, screen_safe_1.isClipped)(p.target, (0, approve_1.subjectRoom)('─ ', p)))
100
+ details();
101
+ io.print('[a]approve [v]details [d]deny [q]question [s]skip > ');
102
+ const d = await decideByKey(stream, p, details);
90
103
  if (d === 'granted') {
91
104
  const r = (0, approve_1.grantRequest)(root, p.id, { actor });
92
105
  io.print(r.ok ? `✓ approved — ${(0, approve_1.subjectCells)('✓ approved — ', p)}` : `✗ ${r.reason}`);
@@ -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.9",
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",