信標自己講「這一份是誰」——vendor 還是 plugin 快取

leo 的雲端驗收整整卡了一輪在這個問題上:同一台機器可能有兩份 ISEP,
兩份都會印信標,版本號一樣時分不出誰在說話。而「閘從哪一份走」正是決定
「另一份能不能拆」的唯一判準。

總管上一版設計的判準(叫雲端跑 env | grep CLAUDE_PLUGIN_ROOT)也是錯的:
那個變數是 hook 呼叫當下才注入的,在 Bash 工具的 env 裡本來就看不到
⇒ 空輸出不代表沒載入,那個探針從一開始就答不了這題。

改法:讓路徑自己講。快取在 plugins/cache/ 底下,vendor 的在 repo 的 .claude/ 底下。

三向實測:
  /root/.claude/plugins/cache/inkstone/isep/0.3.9  → 來源:plugin(marketplace 裝的)
  /home/user/inkstoneco/.claude/isep               → 來源:vendor(repo 裡的複製本)
  其他路徑                                          → 來源不明(不假裝知道)

inkstone/InkStoneCo#57
This commit is contained in:
2026-08-23 21:02:45 +08:00
parent 1b95388a0f
commit 2f43ecc346
2 changed files with 15 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "isep",
"description": "InkStone Environment Plugin —— leo 的 Claude Code 環境唯一真相源:43 支機械閘(53 條註冊,白話盤點見 docs/hooks-inventory.md)、7 支 slash command、2 支 skill、27 支腳本,外加治理規範與標籤真相源。本機與雲端裝同一份,沒有子集。",
"version": "0.3.8",
"version": "0.3.9",
"keywords": [
"inkstone",
"guardrails",