From 98781a331fed225f35de6091d9ecc616f561b15c Mon Sep 17 00:00:00 2001 From: Jeffery Date: Thu, 27 Aug 2026 18:49:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(deploy):=20=E9=83=A8=E7=BD=B2=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=9A=84=E9=87=8D=E5=95=9F=E7=8B=80=E6=85=8B=E6=AA=94?= =?UTF-8?q?=E8=B7=AF=E5=BE=91=E6=94=B9=E7=82=BA=E4=B8=80=E6=94=AF=20CLI=20?= =?UTF-8?q?=E4=B8=80=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What:`tools/deploy.sh` 的 `restart` 那一行改印 `$JSC_HOME/restart-required.d/{CLI 代號}`,檔頭註解一併改寫成「轉呼叫 `restart-gate.sh require` 掛上這支 CLI 的閘門」。`tools/write-guides.sh` 產生的更新指引,狀態檔說明改成一支 CLI 一份、重啟只清自己那份、別支的閘門不受影響。`tools/config-spec.tsv` 的 `$JSC_HOME/restart-required` 那一列改成 `$JSC_HOME/restart-required.d` 目錄,說明改為「該 CLI 那份不存在代表這支沒有待重啟的部署」。 Why:`jsc-hooks` 這一輪把狀態檔改成一支 CLI 一份,路徑從單一檔案變成狀態目錄底下的一份。`deploy.sh` 印的是操作者接下來要看的檔案路徑,印錯就指向一個不存在的檔案;`write-guides.sh` 寫出的更新指引是下一輪部署的依據,留著舊路徑會讓人以為刪掉那個檔案就能解除閘門;`config-spec.tsv` 是 `/jsc-cli:doctor` 比對設定落點的依據,路徑對不上就查不到這份執行期暫態。 How:三處都只跟著改路徑與說明,掛閘門的動作本來就是轉呼叫 `jsc-hooks` 的 `restart-gate.sh require`,這裡不重寫一份判定,也不自己組狀態檔內容——路徑與格式的唯一來源留在 `restart-gate.sh`。`config-spec.tsv` 那一列的型別仍是 `global` 的執行期暫態、備份與還原都維持 `none`,欄位數不變。 Who:`jsc-cli:deploy` 的部署收尾與更新指引,對齊 `jsc-hooks` 一支 CLI 一份的重啟狀態檔。 --- tools/config-spec.tsv | 2 +- tools/deploy.sh | 8 ++++---- tools/write-guides.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/config-spec.tsv b/tools/config-spec.tsv index 5a961e1..5dc1d64 100644 --- a/tools/config-spec.tsv +++ b/tools/config-spec.tsv @@ -50,7 +50,7 @@ $JSC_HOME/models.conf file global no - file ask 各 SDLC 階段的偏好模型 $JSC_HOME/html-styles.conf file global no - file ask 各類頁面的 HTML 匯出版型與樣式,專案 .jsc/html-styles 可覆寫 $JSC_HOME/update-guide.md file global no - file manual 這台機器的更新指引,由 jsc-cli/tools/write-guides.sh 產生;缺了就重跑 /jsc-cli:deploy $JSC_HOME/remove-guide.md file global no - file manual 這台機器的移除指引,由 jsc-cli/tools/write-guides.sh 產生;缺了就重跑 /jsc-cli:deploy -$JSC_HOME/restart-required file global no - none - 部署收尾寫下的重啟狀態檔,執行期暫態;不存在代表沒有待重啟的部署,jsc-hooks 讀它提示重啟 +$JSC_HOME/restart-required.d file global no - none - 部署收尾寫下的重啟狀態檔目錄,一支 CLI 一份,執行期暫態;該 CLI 那份不存在代表這支沒有待重啟的部署,jsc-hooks 讀它提示重啟 .jsc/models file project no - file ask 本專案的 SDLC 偏好模型鏈,覆寫 $JSC_HOME/models.conf .jsc/html-styles file project no - file ask 本專案的 HTML 匯出版型與樣式,覆寫 $JSC_HOME/html-styles.conf .claude/settings.json file project no - file manual claude 的專案層設定;jsc hook 由 plugin 的 hooks.json 接線,這裡不該有 jsc 殘留接線 diff --git a/tools/deploy.sh b/tools/deploy.sh index d4845f0..c1795fc 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -19,9 +19,9 @@ # kiro 的執行檔是 kiro-cli;先探測這個版本認不認得 plugin 子指令(部分版本已經完全 # 移除,例:2.18.1),認得才逐一嘗試、失敗才退回複製,不認得就整批直接走複製, # 不逐一撞一次「unrecognized subcommand」才退回。 -# install 或 update 全數成功時,收尾寫一行進 $JSC_HOME/restart-required,代表這台機器有一輪 -# 部署還沒重啟。擋人邏輯不在這裡:由 jsc-hooks 讀這個檔案提示使用者重啟,逃生門 -# JSC_RESTART_GATE=off 也由那邊判讀。 +# install 或 update 全數成功時,收尾轉呼叫 jsc-hooks 的 restart-gate.sh require,掛上這支 CLI +# 的重啟閘門(狀態檔一支 CLI 一份,落在 $JSC_HOME/restart-required.d/{cli})。擋人邏輯不在 +# 這裡:由 jsc-hooks 讀該 CLI 那一份提示使用者重啟,逃生門 JSC_RESTART_GATE=off 也由那邊判讀。 # 更新指引與移除指引由同目錄的 write-guides.sh 產生,一輪部署跑一次,不在這支腳本裡: # 這支腳本的職責是「對單一 CLI 部署」,指引寫的是整台機器的樣貌。 # 環境變數: @@ -93,7 +93,7 @@ mark_restart() { return 0 fi if JSC_CLI="$CLI" sh "$rg" require "$MODE" $DOMAINS Date: Thu, 27 Aug 2026 18:49:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?docs(deploy):=20=E9=83=A8=E7=BD=B2=E8=AA=AA?= =?UTF-8?q?=E6=98=8E=E5=90=8C=E6=AD=A5=E4=B8=80=E6=94=AF=20CLI=20=E4=B8=80?= =?UTF-8?q?=E4=BB=BD=E7=9A=84=E9=87=8D=E5=95=9F=E7=8B=80=E6=85=8B=E6=AA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What:`README.md`「部署留在機器上的檔案」那張表,`$JSC_HOME/restart-required` 那一列改成 `$JSC_HOME/restart-required.d/{cli}`,寫明一支 CLI 一份、內容是四行 key=value,以及路徑與格式的唯一來源在 `jsc-hooks/hooks/restart-gate.sh`。`skills/deploy/SKILL.md` 第 9 步的路徑說明同步改寫,補上「每支 CLI 只讀自己那一份」與「重啟一支只清自己那份、別支的閘門還立著」,全篇維持英文。 Why:這兩份說的是同一件事在不同讀者面前的樣貌——README 給看存取庫的人,技能文件給執行部署的模型。收尾提示裡的路徑是操作者唯一會拿到的線索,寫成舊的單一檔案就對不上機器上的實況,也會讓人以為重啟一支就把全部閘門解除了,那正是這一輪要修掉的錯誤認知。 How:只改說明,第 9 步的完成判準與那句固定的重啟指示都不動。舊表格那一列原本寫「一行一次成功部署」,其實是四行 key=value 的狀態檔,這次一併訂正。路徑與格式指回 `restart-gate.sh`,兩個存取庫不各自維護一份格式說明。 Who:`jsc-cli` 的存取庫說明與 `jsc-cli:deploy` 技能文件,對齊 `jsc-hooks` 的重啟狀態檔設計。 --- README.md | 2 +- skills/deploy/SKILL.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf21f6b..eb2099e 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/meta.git),安 | --- | --- | --- | | `$JSC_HOME/update-guide.md` | install、update 收尾 | 下次更新的依據:偵測到的 CLI、每支的安裝方式與實際指令、marketplace token、domain 清單 | | `$JSC_HOME/remove-guide.md` | install、update 收尾 | 整組移除的依據:各 CLI 的移除指令,加上 `$JSC_HOME`、本地 clone、kiro 技能目錄、rc 檔 `# jsc-config` 段落這些殘留物 | -| `$JSC_HOME/restart-required` | install、update 全數成功時 | 一行一次成功部署(時間戳、CLI、模式、domain 清單)。`jsc-hooks` 讀它提示使用者重啟工作階段,逃生門 `JSC_RESTART_GATE=off` 也在那邊判讀 | +| `$JSC_HOME/restart-required.d/{cli}` | install、update 全數成功時 | 一支 CLI 一份,內容是四行 key=value(`at`、`mode`、`domains`、`cli`)。`jsc-hooks` 只讀當前 CLI 那一份來提示重啟,別支的不影響這一支;逃生門 `JSC_RESTART_GATE=off` 也在那邊判讀。路徑與格式的唯一來源是 `jsc-hooks/hooks/restart-gate.sh`,`deploy.sh` 只轉呼叫它的 `require` | 兩份指引一律整份覆寫,內容依產生當下的偵測結果生成,不寫死。`uninstall` 不產生指引、也不寫重啟狀態檔。 diff --git a/skills/deploy/SKILL.md b/skills/deploy/SKILL.md index a4bd5bb..b4b4248 100644 --- a/skills/deploy/SKILL.md +++ b/skills/deploy/SKILL.md @@ -25,4 +25,4 @@ description: Batch install, update, or uninstall the whole jsc skill set on ever 6. After install or update, call `jsc-hooks:hooks-install` to rewire the hooks. Done when hooks-install reports a wiring result for each detected CLI. 7. After install or update, run `tools/write-guides.sh {mode} {domain}...` **once for the whole machine**, after every CLI in step 5 has finished. It rewrites `$JSC_HOME/update-guide.md` and `$JSC_HOME/remove-guide.md` from the live detection result, so the later update and removal runs have the real commands for this machine. Skip it for `uninstall`: the guides describe an installed skill set. Done when the script printed a `wrote` line for both files. 8. Report the result and any failure reason for every CLI × mode, plus every `skip` line and every CLI that could not be version-checked in step 2. Done when every detected CLI appears in the report with its `result` status. -9. For install or update, close the report with the restart instruction, in these words: 「請關閉目前的工作階段並重新啟動,新的技能內容才會載入」. `deploy.sh` recorded this round in `$JSC_HOME/restart-required` and prints its path on a `restart` line; `jsc-hooks` reads that file and keeps reminding until the restart happens, with `JSC_RESTART_GATE=off` as the escape hatch. Name the two guide paths from step 7 in the same closing block, so the operator knows where this machine's update and removal commands now live. Done when the restart instruction is printed and both guide paths are named. +9. For install or update, close the report with the restart instruction, in these words: 「請關閉目前的工作階段並重新啟動,新的技能內容才會載入」. `deploy.sh` recorded this round in `$JSC_HOME/restart-required.d/{cli}` — one file per CLI — and prints its path on a `restart` line; `jsc-hooks` reads only that CLI's own file and keeps reminding until that CLI restarts, with `JSC_RESTART_GATE=off` as the escape hatch. Restarting one CLI clears its own file and leaves the others' gates standing. Name the two guide paths from step 7 in the same closing block, so the operator knows where this machine's update and removal commands now live. Done when the restart instruction is printed and both guide paths are named. From 2e85dc4978b3a2162631755cadcb1bd74bc221e8 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Thu, 27 Aug 2026 18:49:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?chore(cli):=20=E4=B8=89=E4=BB=BD=20manifest?= =?UTF-8?q?=20=E7=89=88=E6=9C=AC=E5=8D=87=E5=88=B0=200.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What:`plugin.json`、`.claude-plugin/plugin.json`、`.codex-plugin/plugin.json` 的 `version` 從 0.1.9 升到 0.2.0,三份同步,description 不動。 Why:這一輪改的是部署收尾留在機器上的檔案落點——狀態檔從單一檔案變成一支 CLI 一份的狀態目錄,`config-spec.tsv` 這份對外的設定落點清單也跟著改。那是對外可見的契約變更,不只是內部修正,所以走次版號而不是修訂號。版本不升,`version-guard.sh` 與 `jsc-cli:deploy` 都判不出本機還是舊版,機器上就不會被提示更新。 How:只改版號一個欄位。三份必須一致:`plugin.json` 給 marketplace、`.claude-plugin` 給 claude、`.codex-plugin` 給 codex,任一份落後都會讓那一路的版本比對抓錯。這一版的部署工具要搭 `jsc-hooks` 0.2.6 才有一支 CLI 一份的狀態檔,兩者一起發佈。 Who:`jsc-cli` 的三份 plugin manifest,配合這一輪重啟狀態檔路徑的修正發佈。 --- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- plugin.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 55ce6a7..9f525ad 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-cli", - "version": "0.1.9", + "version": "0.2.0", "description": "CLI 偵測、模型能力標籤、子代理派工與技能庫批次部署", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index f5fd7c9..b476f61 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-cli", - "version": "0.1.9", + "version": "0.2.0", "description": "CLI 偵測、模型能力標籤、子代理派工與技能庫批次部署", "skills": "./skills" } diff --git a/plugin.json b/plugin.json index 1b32396..586ffaf 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-cli", - "version": "0.1.9", + "version": "0.2.0", "description": "CLI 偵測、模型能力標籤、子代理派工與技能庫批次部署", "skills": "./skills/" }