Commit 2c4e2e6
authored
feat(mcode-island)!: rewrite plugin manifest for mcode 0.4.0+ runtime (v1.0.0) (#38)
The previous mcode-island v0.3.x used the `io.minimax.mcode` extension
schema with a flat `{command, args, timeout}` hook shape, served from a
top-level `plugin.json`. mcode 0.4.0+ ships a new Claude Code-compatible
plugin format: `.claude-plugin/plugin.json` with inline
`{matcher, hooks: [{type, command, args, timeout}]}` shapes, nested
under a top-level `hooks` object, and a separate `skills` field for
SKILL.md discovery.
This commit:
- Migrates the manifest to the v0.4.0+ format at
`.claude-plugin/plugin.json`
- Inlines all 12 hook events (SessionStart, SessionEnd,
UserPromptSubmit, PreToolUse, PostToolUse, Stop, PreCompact,
Notification, SubagentStart, SubagentStop, PermissionRequest,
PermissionDenied)
- Adds `skills: ["./skills"]` with a top-level `skills/SKILL.md` so
mcode 0.4.2's plugin reader can resolve the manifest path. A
sub-directory path (e.g. `skills: ["./skills/mcode-island"]`) is
silently dropped by mcode 0.4.2's snapshot builder, verified to
emit `LOCAL_PLUGIN_NO_SUPPORTED_CAPABILITY` and remove the plugin
from the snapshot, so no hook fires
- Keeps `skills/mcode-island/SKILL.md` (a copy at the sub-directory
path) to satisfy the upstream `scripts/lib/validation.mjs` CI check,
which scans `skills/<subdir>/SKILL.md` and rejects plugins that
expose zero Skills or MCP servers
- Bumps the plugin version 0.5.0 -> 1.0.0 to mark the breaking
change (the manifest shape is incompatible with mcode 0.3.x and
below)
The two SKILL.md copies are byte-identical and share the same
frontmatter (`name: mcode-island`). Only the top-level copy is
referenced by the manifest; the sub-directory copy exists solely to
satisfy the upstream validator scan. Removing either would re-break
either the runtime or the CI check, so both are kept.
## Validation
The existing `scripts/smoke.mjs` continues to pass — the manifest
shape is the only thing that moved; the widget, hook scripts, and
5h-usage detector are unchanged in behaviour. End-to-end install /
activate / uninstall on mcode 0.4.0+ is identical to v0.3.x except
for the new `.claude-plugin/plugin.json` path.
## Test evidence
Verified on mcode 0.4.2 (Windows 11, PowerShell 5.1):
| Configuration | Hook fire? |
| ------------------------------------------ | --------------- |
| `skills: ["./skills/mcode-island"]` (deep) | no (silent drop) |
| `skills: ["./skills"]` + top-level SKILL.md | yes (12 events) |
With the new manifest:
- `~/.minimax/plugins/mcode-island/.claude-plugin/plugin.json` parsed
by mcode's `claude-plugin-reader.ts:25-71` shape
- All 12 hook events fire: `status.json` `source: "hook"`, message
carries the tool name + path (e.g. `Bash : Get-Content ...`)
- The previous chunk-injection workaround (used during investigation
to work around the bug, now archived under `_archive/patch-toolkit/`
in the local install) is no longer needed — the schema fix is
sufficient on its own
## Design compliance
- Skill-only plugin: 0 npm dependencies, no `mcp.json`, no
`package.json`
- Disclosure re-confirmed in the manifest `description` field:
no credentials, no network, no telemetry, no third-party services
- One plugin, one commit, one branch (this branch:
`proposal/mcode-island-0.4-hooks-rebuilt`)
- Atomic: this commit is the entire v0.4.0 rewrite; no mixed
changes
- Commit body follows the 8/19 convention (English + Validation +
Test evidence + Design compliance sections)
Co-authored-by: antianqi <antianqi@users.noreply.github.com>1 parent 276d407 commit 2c4e2e6
2 files changed
Lines changed: 526 additions & 0 deletions
Lines changed: 285 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
0 commit comments