fix(worklog): 修正 Codex stop hook 執行路徑 #40

Merged
admin merged 3 commits from develop into master 2026-07-27 09:19:15 +00:00
Member

變更內容

  • README 的 GitHub Copilot CLI 安裝/更新/移除說明改用實際 plugin 指令:marketplace add/update/removeplugin install/update/uninstall
  • 修正 Codex 會載入 hooks/hooks.json 時誤執行 Claude Code 專用 ${CLAUDE_PLUGIN_ROOT} 路徑的問題;Claude 用 CLAUDE_PLUGIN_ROOT,Codex fallback 到 ~/.codex/plugins/cache/doc/jsc 找已安裝的 worklog 腳本。
  • worklog.sh 新增 WORKLOG_CLI=auto|claude|codex|agy|opencode|copilot,摘要執行器依 README 定義的 headless CLI 指令執行:claude -pcodex execagy -popencode runcopilot -p
  • transcript.py 新增 Codex session JSONL payload 格式解析,支援 user/assistant/tool/result 片段抽取與耗時估算。
  • 更新 README 與 skills/worklog/SKILL.md 的 worklog 支援矩陣,明確標示 Codex 可執行 Stop hook 且摘要 CLI 可切換。
  • plugin 版本升至 0.2.5

AI Review Resolve

  • 已依 $jsc:code-review-resolve --target master 檢查 .gitea/ai-review/findings/.gitea/ai-review/findings.json
  • 本次 doc repo 沒有待處理 findings。

驗證

  • python3 -m json.tool hooks/hooks.json >/dev/null
  • python3 -m json.tool plugin.json .claude-plugin/plugin.json .codex-plugin/plugin.json >/dev/null(逐檔執行)
  • bash -n scripts/worklog/worklog.sh
  • PYTHONDONTWRITEBYTECODE=1 python3 -m py_compile scripts/worklog/transcript.py scripts/worklog/wiki_api.py
  • python3 scripts/worklog/transcript.py extract <Codex session jsonl> 可抽出 user/assistant/tool/result 片段
  • python3 scripts/worklog/transcript.py duration <Codex session jsonl> 可輸出耗時(測得 16 分鐘
  • WORKLOG_CLI=opencode 在 CLI 缺失時記錄警告並 exit 0
  • WORKLOG_CLI=auto 在 hook input 空值時記錄警告並 exit 0
  • hook command 在 Codex 環境可定位目前安裝 cache 的 scripts/worklog/worklog.sh
  • git diff --check
## 變更內容 - README 的 GitHub Copilot CLI 安裝/更新/移除說明改用實際 plugin 指令:`marketplace add/update/remove`、`plugin install/update/uninstall`。 - 修正 Codex 會載入 `hooks/hooks.json` 時誤執行 Claude Code 專用 `${CLAUDE_PLUGIN_ROOT}` 路徑的問題;Claude 用 `CLAUDE_PLUGIN_ROOT`,Codex fallback 到 `~/.codex/plugins/cache/doc/jsc` 找已安裝的 worklog 腳本。 - `worklog.sh` 新增 `WORKLOG_CLI=auto|claude|codex|agy|opencode|copilot`,摘要執行器依 README 定義的 headless CLI 指令執行:`claude -p`、`codex exec`、`agy -p`、`opencode run`、`copilot -p`。 - `transcript.py` 新增 Codex session JSONL `payload` 格式解析,支援 user/assistant/tool/result 片段抽取與耗時估算。 - 更新 README 與 `skills/worklog/SKILL.md` 的 worklog 支援矩陣,明確標示 Codex 可執行 Stop hook 且摘要 CLI 可切換。 - plugin 版本升至 `0.2.5`。 ## AI Review Resolve - 已依 `$jsc:code-review-resolve --target master` 檢查 `.gitea/ai-review/findings/` 與 `.gitea/ai-review/findings.json`。 - 本次 doc repo 沒有待處理 findings。 ## 驗證 - `python3 -m json.tool hooks/hooks.json >/dev/null` - `python3 -m json.tool plugin.json .claude-plugin/plugin.json .codex-plugin/plugin.json >/dev/null`(逐檔執行) - `bash -n scripts/worklog/worklog.sh` - `PYTHONDONTWRITEBYTECODE=1 python3 -m py_compile scripts/worklog/transcript.py scripts/worklog/wiki_api.py` - `python3 scripts/worklog/transcript.py extract <Codex session jsonl>` 可抽出 user/assistant/tool/result 片段 - `python3 scripts/worklog/transcript.py duration <Codex session jsonl>` 可輸出耗時(測得 `16 分鐘`) - `WORKLOG_CLI=opencode` 在 CLI 缺失時記錄警告並 `exit 0` - `WORKLOG_CLI=auto` 在 hook input 空值時記錄警告並 `exit 0` - hook command 在 Codex 環境可定位目前安裝 cache 的 `scripts/worklog/worklog.sh` - `git diff --check`
jiantw83 added 2 commits 2026-07-27 08:51:24 +00:00
jiantw83 added 1 commit 2026-07-27 09:09:31 +00:00
admin approved these changes 2026-07-27 09:19:13 +00:00
admin merged commit 4f76c40c1b into master 2026-07-27 09:19:15 +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/doc#40