@@ -109,6 +109,8 @@ SURFACES=(
109109 " pkg/chocolatey/tools/chocolateyInstall.ps1|release"
110110 " pkg/scoop/codebase-memory-mcp.json|release"
111111 " pkg/homebrew/Formula/codebase-memory-mcp.rb|release"
112+ " plugin/.claude-plugin/plugin.json|release"
113+ " plugin/.mcp.json|release"
112114 " pkg/aur/PKGBUILD|pin:0.8.1"
113115 " pkg/aur/.SRCINFO|pin:0.8.1"
114116)
@@ -163,6 +165,12 @@ versions_in() {
163165 # cannot see it, because the version keyword is in the function NAME.
164166 grep -oE ' return "[0-9]+\.[0-9]+\.[0-9]+"' " $path " |
165167 grep -oE ' [0-9]+\.[0-9]+\.[0-9]+'
168+ # npm package-spec form: the Claude Code plugin launches the server as
169+ # `npx -y codebase-memory-mcp@X.Y.Z`, and that pin is the version every
170+ # plugin user actually runs. No declaration keyword sits next to it, so
171+ # without this form plugin/.mcp.json reads as a surface with no claim.
172+ grep -oE ' codebase-memory-mcp@[0-9]+\.[0-9]+\.[0-9]+' " $path " |
173+ grep -oE ' [0-9]+\.[0-9]+\.[0-9]+$'
166174 } | sort -u
167175}
168176
280288# this contract exists to prevent, and every check above would still pass. The
281289# sweep pattern is deliberately BROADER than the extractors in section 3: if the
282290# two shared a regex, a claim form the extractors cannot see would be invisible
283- # to the sweep as well.
291+ # to the sweep as well. The Claude Code plugin tree (plugin/, .claude-plugin/) is
292+ # swept too: a later plugin file that pins `codebase-memory-mcp@X.Y.Z` (a hook
293+ # command, say) must be registered here, or it would go stale unchecked.
284294while IFS= read -r path; do
285295 [[ -z " $path " ]] && continue
286296 for entry in " ${SURFACES[@]} " ; do
@@ -293,8 +303,8 @@ while IFS= read -r path; do
293303 " SURFACES so it stays in step with the release, or to EXEMPT with a" \
294304 " note saying what its number actually is."
295305done < <(
296- git grep -IlE ' (version|pkgver|releases/(download|tag)/v)[^0-9]{0,16}[0-9]+\.[0-9]+\.[0-9]+|return "[0-9]+\.[0-9]+\.[0-9]+"' \
297- -- server.json pkg tests/test_version_metadata_contract.sh 2> /dev/null || true
306+ git grep -IlE ' (version|pkgver|releases/(download|tag)/v)[^0-9]{0,16}[0-9]+\.[0-9]+\.[0-9]+|return "[0-9]+\.[0-9]+\.[0-9]+"|codebase-memory-mcp@[0-9]+\.[0-9]+\.[0-9]+ ' \
307+ -- server.json pkg plugin .claude-plugin tests/test_version_metadata_contract.sh 2> /dev/null || true
298308)
299309
300310if (( failures > 0 )) ; then
0 commit comments