@mutmutco/kimi-plugin 4.2.4 → 4.2.6
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/.kimi-plugin/plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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);
|
|
@@ -97,10 +97,14 @@ jobs:
|
|
|
97
97
|
# cache policy is declared on runner-node-toolchain (cache + cache-restore-max-mb). Per-job
|
|
98
98
|
# NPM_CONFIG_CACHE above is the org default; unbounded Actions cache blobs can exhaust mmi-live
|
|
99
99
|
# disks mid-extract before the real check runs (Jerv-Hub SQLCipher gate, ~4.3GB restore).
|
|
100
|
+
# MMI-Hub#5871: declare the npm MAJOR rather than inheriting whatever the runner's node bundles.
|
|
101
|
+
# A bare major, never an exact patch (it goes stale and then prescribes downgrading operator
|
|
102
|
+
# hosts toward it, #5862) and never `latest` (it takes the next major silently, #4782).
|
|
100
103
|
- if: ${{ '{{GATE_RUNTIME}}' == 'node' }}
|
|
101
104
|
uses: mutmutco/MMI-Hub/.github/actions/runner-node-toolchain@{{GATE_RUNNER_SHA}}
|
|
102
105
|
with:
|
|
103
106
|
node-version: 24
|
|
107
|
+
npm-version: '12'
|
|
104
108
|
- if: ${{ '{{GATE_RUNTIME}}' == 'python' }}
|
|
105
109
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
106
110
|
with: { python-version: '{{GATE_PY_VERSION}}' }
|
package/skills/release/SKILL.md
CHANGED
|
@@ -187,13 +187,37 @@ Treating doctor's exit code as the gate halts a healthy train on cosmetic drift
|
|
|
187
187
|
operator to ignore doctor's exit code entirely.
|
|
188
188
|
|
|
189
189
|
**`mmi-cli devops release --apply` and `mmi-cli devops rcand --apply` now run an active npm-major preflight
|
|
190
|
-
before any branch/tag mutation (#5666).** They read the repo's expected CI npm
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
190
|
+
before any branch/tag mutation (#5666).** They read the repo's expected CI npm, in this order (#5866):
|
|
191
|
+
an explicit `npm-version:` on the gate's `runner-node-toolchain` step; else the infra gate's exact node pin
|
|
192
|
+
through the bundled-npm map (only for an estate that still carries a retired pre-#5870 pin); else the
|
|
193
|
+
publish workflow's own npm pin (`npm install -g npm@12`, the #5870 retirement shape). Local `npm -v`
|
|
194
|
+
must match that npm **major**; a
|
|
195
|
+
mismatch refuses `--apply` before any repository write.
|
|
196
|
+
|
|
197
|
+
**Check which side is wrong before repairing (#5862).** The receipt names one direction — move the machine
|
|
198
|
+
to the pin — and that is only right when the pin is current. Compare it against the registry first:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
npm view npm version # what npm is actually at
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
A pin **behind** latest is fixed by a PR moving the pin, not by a machine-global downgrade that every
|
|
205
|
+
release host then inherits. The pin is coordinated, so move all of it together: on Jerv-Hub the same
|
|
206
|
+
version lives in `publish.yml`, `DISTRIBUTION_NPM_VERSION`, `package.json` `packageManager`, and a
|
|
207
|
+
workflow-contract test. Prefer declaring a bare **major** (`npm@12`) over an exact patch — an exact pin
|
|
208
|
+
goes stale and then prescribes downgrades, and `latest` silently takes the next major.
|
|
209
|
+
|
|
210
|
+
**Bumping the pin can break workflow code that reads npm output (#5862).** `npm pack --json` changed shape
|
|
211
|
+
between majors (npm ≤10 a top-level array, npm ≥11 a name-keyed object) and npm 12 prints the `prepare`
|
|
212
|
+
lifecycle script's stdout ahead of the document, so `JSON.parse(stdout)` throws. An inline
|
|
213
|
+
`const [entry] = JSON.parse(pack.json)` in a workflow step is the hazard — on Jerv-Hub it failed **after**
|
|
214
|
+
`npm publish` had already succeeded, leaving the GitHub Release assets and the Gateway deploy undone. Repo
|
|
215
|
+
scripts that already tolerate both shapes (`scripts/distribution-assembly.mjs`, #4741) are the fix; audit
|
|
216
|
+
inline workflow parsing before bumping.
|
|
217
|
+
|
|
218
|
+
When the machine genuinely is the wrong side, the receipt's repair (`npm install -g npm@<CI major>`, then
|
|
219
|
+
`node -v && npm -v`, then rerun the same release command) preserves Node and avoids routing a
|
|
220
|
+
machine-global mutation through the train.
|
|
197
221
|
|
|
198
222
|
**A local `npm ci` failure during the fold on a lockfile CI already accepted is an npm-major mismatch, not a
|
|
199
223
|
bad lockfile (#4578).** Before touching the lockfile, compare toolchains:
|
|
@@ -214,10 +238,10 @@ BEFORE inspecting package contents (deleted dir, malformed `package.json`, missi
|
|
|
214
238
|
```bash
|
|
215
239
|
npm -v
|
|
216
240
|
# green gate npm from the gate log's `node -v && npm -v` toolchain-preflight line (#3446),
|
|
217
|
-
# the exact node pin
|
|
241
|
+
# the gate's declared `npm-version:`, or an exact node pin that maps to a bundled npm,
|
|
218
242
|
# or the publish workflow npm pin when gate.yml has no bundled npm (#5666)
|
|
219
243
|
```
|
|
220
|
-
When local npm differs from the green gate (e.g. local npm
|
|
244
|
+
When local npm differs from the green gate (e.g. local npm 11 vs CI's 12), align local npm
|
|
221
245
|
(`npm install -g npm@<gate npm>`) and rerun the train — do not rewrite the publish surface for an
|
|
222
246
|
npm-internal missing module.
|
|
223
247
|
|
|
@@ -539,6 +563,20 @@ The one remaining caveat: `--watch` blocks only on deploy-model-named runs, not
|
|
|
539
563
|
deploys — those you conclude from the `workflowRuns` list yourself. Any `failure` there is a failed release
|
|
540
564
|
deploy even when the train reported success — flag it loudly and fix it before calling the release healthy.
|
|
541
565
|
|
|
566
|
+
**Identify WHICH run is red before believing the wording (#5872).** The release pushes the tag and the
|
|
567
|
+
branch seconds apart, so an ordinary repo CI gate lands on the release SHA too — it is enumerated
|
|
568
|
+
alongside the deploy and publish runs, and a red one reads out as
|
|
569
|
+
`deploy/publish on the release SHA FAILED`. On Jerv-Hub v3.4.4 that sentence appeared while `publish.yml`
|
|
570
|
+
was green and npm was already serving 3.4.4: the red entry was a `gate` push run that had raced the
|
|
571
|
+
shared runner's npm cache (the same SHA's tag-push gate passed, and a re-run passed). A red build gate
|
|
572
|
+
**holds the release unverified but is not a publish failure** — and on Jerv-Hub it defers the fail-closed
|
|
573
|
+
Gateway phase (#5699) until the gate is green, so it must be re-run and the release resumed, not
|
|
574
|
+
re-tagged. Read the run NAMES in `workflowRuns` first:
|
|
575
|
+
|
|
576
|
+
- `deploy.yml` / `publish.yml` / `tenant-deploy.yml` / `jerv-gateway` — a real deploy or publish verdict.
|
|
577
|
+
- `gate` (or any repo CI workflow) on a `push` event — ordinary CI that happens to share the SHA. Re-run
|
|
578
|
+
it; nothing about the published artifact is in question.
|
|
579
|
+
|
|
542
580
|
**Hub releases announce to Slack (#883).** Hub scope is **only** `mutmutco/MMI-Hub`: the commits/PRs on
|
|
543
581
|
`origin/main..origin/development`, this repo's `deploy.yml` + `publish.yml`, and Hub tooling (`mmi-cli`,
|
|
544
582
|
skills, plugin, registry, central workflows). Do **not** read another repo's board (`mmi-cli oracle board` / `/mmi`
|
|
@@ -655,6 +693,14 @@ Collect the backgrounded prod-deploy watch from Step 4 (it has typically finishe
|
|
|
655
693
|
healthy (the central deploy workflow smoke step / a health check); **red** → report the failure prominently and flag
|
|
656
694
|
that the release shipped on a failed deploy (re-run just the deploy — `main` is already correct).
|
|
657
695
|
|
|
696
|
+
**Say which run is red, never just "deploy/publish failed" (#5872).** `--resume` reports a single
|
|
697
|
+
`deployStatus` for every run on the release SHA, so a flaky repo CI gate that shares that SHA is reported
|
|
698
|
+
in the language of a failed publication — the operator is told publication failed while npm is serving
|
|
699
|
+
the version. Before writing that into a report, name the workflow: a red `deploy.yml` / `publish.yml` /
|
|
700
|
+
`tenant-deploy.yml` / `jerv-gateway` is a real deploy or publish failure; a red `gate` on a `push` event
|
|
701
|
+
is ordinary CI. Both hold the release unverified and both are fixed by re-running that run and resuming —
|
|
702
|
+
neither is ever fixed by re-tagging — but only the first means anything about the artifact.
|
|
703
|
+
|
|
658
704
|
**This distribution verifier is Hub-only.** It assumes the Hub release fold has already committed its
|
|
659
705
|
generated artifacts. Non-Hub `registry-publish` repositories must not run `release-distribution.mjs
|
|
660
706
|
verify`: use their own release-workflow evidence and the publish-visibility contract below.
|