From eca467696f28e38d0704a6daa83700b923da779c Mon Sep 17 00:00:00 2001 From: Jeffery Date: Thu, 27 Aug 2026 16:34:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(deploy):=20deploy=20=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E6=94=B6=E5=B0=BE=E5=8A=A0=E4=B8=8A=E7=94=A2=E7=94=9F=E6=8C=87?= =?UTF-8?q?=E5=BC=95=E8=88=87=E8=A6=81=E6=B1=82=E9=87=8D=E5=95=9F=E5=85=A9?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What:`skills/deploy/SKILL.md` 新增兩個步驟並改寫 `description`。新的第 7 步:install 或 update 在所有 CLI 跑完之後,整台機器跑一次 `tools/write-guides.sh {mode} {domain}...`,完成條件是兩份指引都印出 `wrote` 行;原本的回報順延為第 8 步;新的第 9 步:收尾一律印出重啟指示「請關閉目前的工作階段並重新啟動,新的技能內容才會載入」,並把兩份指引的路徑講出來。 Why:兩份指引與重啟提示都是部署收尾的一部分,腳本做得到、技能流程沒寫,就等於沒人會跑。重啟這件事尤其要在收尾講清楚:`deploy.sh` 已經把這一輪記進 `$JSC_HOME/restart-required`,使用者不知道要重啟就會繼續用舊版技能,然後以為部署沒生效。 How:指引那一步明寫「整台機器跑一次」,排在每個 CLI 都跑完之後——第 5 步是一個 CLI 一個子代理,指引寫的卻是整台機器的樣貌,跟著 CLI 跑就會被覆寫成最後一支的內容。`uninstall` 跳過這一步:指引描述的是裝好的技能組。重啟指示用固定字句,不讓每次回報各講一套;`JSC_RESTART_GATE=off` 作為逃生門一併寫出,判讀在 `jsc-hooks`。 Who:`/jsc-cli:deploy` 技能的執行流程與收尾回報。 --- skills/deploy/SKILL.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/skills/deploy/SKILL.md b/skills/deploy/SKILL.md index 657ae63..a4bd5bb 100644 --- a/skills/deploy/SKILL.md +++ b/skills/deploy/SKILL.md @@ -1,6 +1,6 @@ --- name: deploy -description: Batch install, update, or uninstall the whole jsc skill set on every installed AI CLI. Detect CLIs via detect-clis.sh, report every plugin's local-versus-published version first and recommend update when any one of them is behind, then ask the user for the mode via decision tree, then run each CLI's native plugin commands with the unified jsc marketplace (token jsc-{domain}@jsc). Domain list comes from the plugins/meta marketplace.json, never hardcoded. Use for rollout or removal of the jsc plugins; not for a single skill. +description: Batch install, update, or uninstall the whole jsc skill set on every installed AI CLI. Detect CLIs via detect-clis.sh, report every plugin's local-versus-published version first and recommend update when any one of them is behind, then ask the user for the mode via decision tree, then run each CLI's native plugin commands with the unified jsc marketplace (token jsc-{domain}@jsc). Domain list comes from the plugins/meta marketplace.json, never hardcoded. After install or update, write this machine's update and remove guides via write-guides.sh and demand a session restart. Use for rollout or removal of the jsc plugins; not for a single skill. --- # deploy — batch install, update, or uninstall the skill set @@ -23,4 +23,6 @@ description: Batch install, update, or uninstall the whole jsc skill set on ever The marketplace is unified as `jsc`; the install token is `jsc-{domain}@jsc`. Each `plugins[].name` already carries the `jsc-` prefix (e.g. `jsc-ask`) — pass it to `tools/deploy.sh` as-is, prefixed or not; the script normalizes it. Done when the domain list comes from that response and holds at least one name. 5. Run `tools/deploy.sh {mode} {cli} {domain}...` once per detected CLI, passing the whole domain list in one call so the marketplace command runs only once. This step **MUST run as a sub agent** (one sub agent per CLI). The script prints `cmd` and `exit` lines for every command, then one `result` line; `-n` prints the commands without running them. Antigravity cannot install from a Gitea URL, so the script clones each domain into the local plugin directory (`JSC_LOCAL_PLUGINS`, default `$JSC_HOME/plugins`) and installs from that path — keep that clone, because update pulls the same one. That default deliberately avoids a development checkout: when the directory holds uncommitted changes or unpushed commits, the script prints a `skip` line, leaves the tree untouched, and installs the on-disk content. Done when every detected CLI has reported an exit status for every command it ran. 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. 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. +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.