@mutmutco/kilo-plugin 4.2.4 → 4.2.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/kilo-plugin",
3
- "version": "4.2.4",
3
+ "version": "4.2.5",
4
4
  "mmiCompat": "4.x",
5
5
  "description": "MMI workflow skills and org gates delivery.",
6
6
  "author": {
@@ -322,7 +322,12 @@ export function analyzeGhLadder(command) {
322
322
  replacement: hit.replacement,
323
323
  mapped,
324
324
  reason:
325
- `Command ladder (#2347): use \`${hit.replacement}\` instead of raw \`gh ${hit.object} ${hit.verb}\`. ` +
325
+ `Command ladder (#2347): use \`${hit.replacement}\` instead of raw \`gh ${hit.object} ${hit.verb}\` ` +
326
+ // #5858: the deny aborts the ENTIRE tool call, and the remedy line below invites retrying only
327
+ // the corrected verb — the one retry that cannot work when a heredoc wrote the body file in the
328
+ // same call. It fails with ENOENT, which reads as a path bug, not as a discarded write. Same
329
+ // sentence, same position, as the test-policy guard (#5726).
330
+ 'the ENTIRE command was aborted before execution; no segment ran, so any file write or other step batched into the same call was NOT applied — re-run those steps separately. ' +
326
331
  runLine +
327
332
  'mmi-cli is the required path for covered board/issue/PR writes in org repos. ' +
328
333
  'Genuine gaps stay allowed: gh api reads, gh project, gh issue/pr view|list|close|edit, gh pr checks, gh auth/repo/workflow/run. ' +
@@ -8,8 +8,10 @@
8
8
  //
9
9
  // One extractor, used by every edit-shaped hook, so a new host contract is taught in one place.
10
10
 
11
- /** Tool names that mean "this call writes files". */
12
- export const EDIT_TOOL_NAMES = new Set(['Edit', 'Write', 'apply_patch', 'ApplyPatch']);
11
+ /** Tool names that mean "this call writes files". `StrReplace` is Cursor's in-place edit tool: it
12
+ * carries its target in `tool_input.path` and was outside this set, so even once the adapter matched
13
+ * it the gate would have read a non-edit tool and allowed (#5852). */
14
+ export const EDIT_TOOL_NAMES = new Set(['Edit', 'Write', 'apply_patch', 'ApplyPatch', 'StrReplace']);
13
15
 
14
16
  export function isEditTool(toolName) {
15
17
  return typeof toolName === 'string' && EDIT_TOOL_NAMES.has(toolName);
package/server.mjs CHANGED
@@ -5,13 +5,14 @@
5
5
  // that translation lives in a thin per-host shell, not in the gates. server.mjs is that shell for Kilo:
6
6
  // every hook translates the Kilo camelCase hook input into the snake_case shape and replays it through
7
7
  // scripts/hook-run.mjs, the same named-policy launcher every active host uses. The launcher stamps
8
- // MMI_HOOK_SURFACE=kilo (which also engages the shared redactor's rewrite channel) and owns the
9
- // fail-closed fallback for crashed deny gates.
8
+ // MMI_HOOK_SURFACE=kilo and owns the fail-closed fallback for crashed deny gates.
10
9
  //
11
10
  // Kilo's contract differences, all confirmed on a real host (see plans/2026-07-31-kilo-code-plugin-port.md):
12
11
  // - blocking a tool = throwing from `tool.execute.before`
13
- // - rewriting output = mutating `output.output` in `tool.execute.after`, and `output.text` in
14
- // `experimental.text.complete` — a WORKING redactor, unlike Codex/Kimi
12
+ // - the host CAN rewrite output `output.output` in `tool.execute.after`, `output.text` in
13
+ // `experimental.text.complete` — but this module registers NEITHER. The post-tool redaction gate
14
+ // was retired with #5079, so what ships is two PreToolUse gates and nothing else; the surface's
15
+ // declared `postToolOutput`/`finalOutput` are `unsupported` and that is the honest ceiling (#5851)
15
16
  // - tool names are lowercase (`bash`, `write`, `edit`, `patch`, `glob`, `grep`, `read`) and the bash
16
17
  // args carry `command`, the write args carry `filePath`
17
18
  // - npm lifecycle scripts are disabled, so first-run provisioning lives here, is idempotent and