fix(codex-deploy): 保留 CLI 自身快取相容路徑 #40

Merged
admin merged 1 commits from fix/codex-cli-cache-compat into develop 2026-08-28 10:32:38 +00:00
Member

摘要

  • 需求描述:避免 Codex 更新 jsc-cli 後,正在執行的舊 deploy.sh 失去自己的 helper 腳本路徑。
  • 計畫名稱:無
  • 計畫頁:無
  • 分析頁:無

變更內容

檔案 為什麼改
tools/deploy.sh Codex update 時同時保留舊版 jsc-cli 與 jsc-hooks cache 路徑。
skills/deploy/SKILL.md 補上 jsc-cli 與 jsc-hooks 都要保留相容連結的規則。
README.md 補上部署工具會保護自身 helper 腳本路徑。
plugin.json、.claude-plugin/plugin.json、.codex-plugin/plugin.json 同步 jsc-cli 版本。

設計重點

  • jsc-cli 更新後立刻補舊版 cache symlink,讓後續 check-requires.sh 還能被目前執行中的部署流程找到。
  • jsc-hooks 更新後仍保留舊 hook_run_id 需要的 cache symlink。
  • 只覆蓋不存在或已是 symlink 的舊路徑;實體舊目錄不覆蓋。

測試結果

  • find tools -type f -name '*.sh' -exec sh -n {} \;:通過。
  • python3 -m json.tool plugin.json、.claude-plugin/plugin.json、.codex-plugin/plugin.json:通過。
  • git diff --check:通過。
  • /root/plugins/hooks/hooks/comment-scope.sh sweep:通過。
  • 使用臨時 CODEX_HOME 與假的 codex 指令模擬 jsc-cli、jsc-hooks 舊版 cache 被移走:兩者都輸出 compat,且舊版路徑成功連到新版路徑。

前置 Push Request

  • 無
## 摘要 - 需求描述:避免 Codex 更新 `jsc-cli` 後,正在執行的舊 `deploy.sh` 失去自己的 helper 腳本路徑。 - 計畫名稱:無 - 計畫頁:無 - 分析頁:無 ## 變更內容 | 檔案 | 為什麼改 | | --- | --- | | `tools/deploy.sh` | Codex update 時同時保留舊版 `jsc-cli` 與 `jsc-hooks` cache 路徑。 | | `skills/deploy/SKILL.md` | 補上 `jsc-cli` 與 `jsc-hooks` 都要保留相容連結的規則。 | | `README.md` | 補上部署工具會保護自身 helper 腳本路徑。 | | `plugin.json`、`.claude-plugin/plugin.json`、`.codex-plugin/plugin.json` | 同步 jsc-cli 版本。 | ## 設計重點 - `jsc-cli` 更新後立刻補舊版 cache symlink,讓後續 `check-requires.sh` 還能被目前執行中的部署流程找到。 - `jsc-hooks` 更新後仍保留舊 hook_run_id 需要的 cache symlink。 - 只覆蓋不存在或已是 symlink 的舊路徑;實體舊目錄不覆蓋。 ## 測試結果 - `find tools -type f -name '*.sh' -exec sh -n {} \;`:通過。 - `python3 -m json.tool plugin.json`、`.claude-plugin/plugin.json`、`.codex-plugin/plugin.json`:通過。 - `git diff --check`:通過。 - `/root/plugins/hooks/hooks/comment-scope.sh sweep`:通過。 - 使用臨時 `CODEX_HOME` 與假的 `codex` 指令模擬 `jsc-cli`、`jsc-hooks` 舊版 cache 被移走:兩者都輸出 `compat`,且舊版路徑成功連到新版路徑。 ## 前置 Push Request - 無
jiantw83 added 1 commit 2026-08-28 10:31:27 +00:00
admin approved these changes 2026-08-28 10:32:35 +00:00
admin merged commit 369e6e59f6 into develop 2026-08-28 10:32:38 +00:00
admin deleted branch fix/codex-cli-cache-compat 2026-08-28 10:32:38 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: plugins/cli#40