Skip to content

fix(plugin): pin the CLI launcher and start MCP from a plugin file - #8

Merged
tak-bro merged 1 commit into
mainfrom
fix/directory-launchers
Nov 5, 2026
Merged

tak-bro merged 1 commit into
mainfrom
fix/directory-launchers

Conversation

@tak-bro

@tak-bro tak-bro commented Nov 5, 2026

Copy link
Copy Markdown
Member

무엇

  • .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.json env(HWIP_API_KEY: ${HWIP_API_KEY:-}) 삭제.

왜 — Anthropic 플러그인 디렉터리 규칙

이전 판정
npx -y @hwip/cli 버전 미고정 Blocks (Unpinned npx launcher)
sh -c "if … fi" 인라인 실행 리뷰어 보류
사용자 env 의 키를 env 로 전달 리뷰어 보류

고정 npx 패키지 자체는 디렉터리가 항상 리뷰어 확인(Runs a pinned npx package) — 막힘은 아님.

키 동작 불변 근거

  • 실행 중 hwip MCP 프로세스 env 를 보니 Claude 의 env 전체 상속(CLAUDECODE·HERDR_* 등). HWIP_API_KEY export 사용자는 그대로, 없으면 CLI 가 ~/.hwip/config.json.

확인

  • bash tests/run-all.sh → Suites 17/17.
  • claude plugin validate . 통과(남은 경고 = 루트 CLAUDE.md).
  • hwip 없는 PATH 에서 스크립트 실행 → npx 0.1.19 가 MCP initialize 응답.

운영

  • @hwip/cli 릴리스마다 scripts/hwip-mcp.sh HWIP_CLI_VERSION 과 hooks/gate.sh HWIP_CLI_PIN 을 같이 올린다.

🤖 Generated with Claude Code

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.
@tak-bro
tak-bro merged commit 6503760 into main Nov 5, 2026
2 checks passed
@tak-bro
tak-bro deleted the fix/directory-launchers branch November 5, 2026 06:01
tak-bro added a commit that referenced this pull request Nov 6, 2026
Existing installs only update when the version changes. #7 (listing icon)
and #8 (pinned CLI launcher, MCP start from a plugin file) shipped without
a bump, so installed 0.1.2 never received them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant