Repository navigation
fix(plugin): pin the CLI launcher and start MCP from a plugin file - #8
Merged
Merged
Conversation
The plugin directory blocks an unpinned npx launcher and holds an MCP server started through `sh -c` or one that forwards a credential from the user environment. - .mcp.json runs scripts/hwip-mcp.sh: global `hwip mcp` when present, else `npx -y @hwip/cli@0.1.19 mcp`. - hooks/gate.sh pins the same version for the hook fallback; a test keeps the two pins equal. - Drop the env block. The MCP process inherits Claude Code environment, and the CLI reads HWIP_API_KEY or ~/.hwip/config.json itself.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇
.mcp.json→sh ${CLAUDE_PLUGIN_ROOT}/scripts/hwip-mcp.sh. 새 스크립트가 전역hwip있으면hwip mcp, 없으면npx -y @hwip/cli@0.1.19 mcp.hooks/gate.sh훅 폴백도@hwip/cli@0.1.19고정(HWIP_CLI_PIN). 두 핀 일치는tests/test-mcp-launch.sh가 검사..mcp.jsonenv(HWIP_API_KEY: ${HWIP_API_KEY:-}) 삭제.왜 — Anthropic 플러그인 디렉터리 규칙
npx -y @hwip/cli버전 미고정sh -c "if … fi"인라인 실행env로 전달고정 npx 패키지 자체는 디렉터리가 항상 리뷰어 확인(Runs a pinned npx package) — 막힘은 아님.
키 동작 불변 근거
CLAUDECODE·HERDR_*등).HWIP_API_KEYexport 사용자는 그대로, 없으면 CLI 가~/.hwip/config.json.확인
bash tests/run-all.sh→ Suites 17/17.claude plugin validate .통과(남은 경고 = 루트 CLAUDE.md).hwip없는 PATH 에서 스크립트 실행 → npx 0.1.19 가 MCPinitialize응답.운영
@hwip/cli릴리스마다scripts/hwip-mcp.shHWIP_CLI_VERSION과hooks/gate.shHWIP_CLI_PIN을 같이 올린다.🤖 Generated with Claude Code