@theronap/cortex-mcp 0.9.162 → 0.9.163
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/lib/editors/claude.mjs +19 -1
- package/package.json +1 -1
package/lib/editors/claude.mjs
CHANGED
|
@@ -114,7 +114,25 @@ export function mergeClaudeSettings(existing, spec) {
|
|
|
114
114
|
// ⚠ Matcher is '' (every tool). The block only appears on three surfaces, so the filtering is
|
|
115
115
|
// server-side and this stays a cheap no-op elsewhere: it reads its stdin, finds no marker, exits 0.
|
|
116
116
|
s.hooks.PostToolUse = Array.isArray(s.hooks.PostToolUse) ? s.hooks.PostToolUse : []
|
|
117
|
-
|
|
117
|
+
// 🔴 THIS HOOK DOES NOT FOLLOW `spec`, AND THE REASON IS A DEFECT THIS FILE SHIPPED ONCE.
|
|
118
|
+
//
|
|
119
|
+
// `spec` pins @stable, which is what desktop-wired seats deliberately follow. But a hook wired at
|
|
120
|
+
// a version that does not HAVE its subcommand does not fail quietly: an older client given an
|
|
121
|
+
// unknown subcommand falls through to the MCP-server default and prints
|
|
122
|
+
// `cortex-mcp: CORTEX_TOKEN is required`. Wired under `spec` on 2026-09-21, when @stable was
|
|
123
|
+
// 0.9.156 and this subcommand landed in 0.9.162, that meant an ERROR after EVERY TOOL CALL —
|
|
124
|
+
// noise rather than silence, which is worse than the feature simply being absent.
|
|
125
|
+
//
|
|
126
|
+
// So the rule, stated because it generalises to the next hook somebody adds: A HOOK MUST NEVER BE
|
|
127
|
+
// WIRED AT A SPEC THAT CANNOT EXECUTE IT. A version floor is the narrowest way to hold that, and
|
|
128
|
+
// npx resolves a semver range (verified 2026-09-21 against a real invocation, not assumed).
|
|
129
|
+
//
|
|
130
|
+
// ⚠ And it uses the CANONICAL name. Every other command here carries `cortex-mcp` for
|
|
131
|
+
// compatibility with frozen launchd/cron scripts on unreachable machines (ADR-0033) — but a
|
|
132
|
+
// BRAND-NEW hook has no frozen scripts to be compatible with, so there is no reason to mint more
|
|
133
|
+
// references to the retiring name. New wiring uses the name the product actually has.
|
|
134
|
+
const ARRIVALS_MIN_VERSION = '0.9.162'
|
|
135
|
+
const arrivalsCmd = markCommand(`npx -y @theronap/agnoclast-mcp@^${ARRIVALS_MIN_VERSION} arrivals-notice`)
|
|
118
136
|
for (const pg of s.hooks.PostToolUse) {
|
|
119
137
|
if (Array.isArray(pg.hooks)) pg.hooks = pg.hooks.filter((h) => !isManagedSubcommand(h.command, 'arrivals-notice'))
|
|
120
138
|
}
|
package/package.json
CHANGED