fix(worklog): 修正 auto 模式的 CLI 判斷 #41

Merged
admin merged 3 commits from develop into master 2026-07-28 08:14:33 +00:00
Showing only changes of commit 7b04cc6be6 - Show all commits
+17 -1
View File
@@ -1,11 +1,27 @@
{ {
"hooks": { "hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "rel='scripts/role/role_load.sh'; own='generic'; root=\"${CLAUDE_PLUGIN_ROOT:-}\"; if [ -n \"$root\" ] && [ -f \"$root/$rel\" ]; then exec \"$root/$rel\"; fi; for base in \"$HOME/.claude/plugins/cache\" \"$HOME/.codex/plugins/cache\"; do for dir in \"$base/$own/jsc\" \"$base\"; do s=$(find \"$dir\" -path \"*/jsc/*/$rel\" -type f 2>/dev/null | sort -V | tail -n 1); if [ -n \"$s\" ]; then exec \"$s\"; fi; done; done; exit 0",
"timeout": 20
}
]
}
],
"Stop": [ "Stop": [
{ {
"hooks": [ "hooks": [
{ {
"type": "command", "type": "command",
"command": "root=\"${CLAUDE_PLUGIN_ROOT:-}\"; if [ -z \"$root\" ]; then script=$(find \"$HOME/.codex/plugins/cache/doc/jsc\" -path '*/scripts/worklog/worklog.sh' -type f 2>/dev/null | sort -V | tail -n 1); [ -n \"$script\" ] && exec \"$script\"; else exec \"$root/scripts/worklog/worklog.sh\"; fi", "command": "rel='scripts/worklog/worklog.sh'; own='doc'; root=\"${CLAUDE_PLUGIN_ROOT:-}\"; if [ -n \"$root\" ] && [ -f \"$root/$rel\" ]; then exec \"$root/$rel\"; fi; for base in \"$HOME/.claude/plugins/cache\" \"$HOME/.codex/plugins/cache\"; do for dir in \"$base/$own/jsc\" \"$base\"; do s=$(find \"$dir\" -path \"*/jsc/*/$rel\" -type f 2>/dev/null | sort -V | tail -n 1); if [ -n \"$s\" ]; then exec \"$s\"; fi; done; done; exit 0",
"timeout": 60
},
{
"type": "command",
"command": "rel='scripts/role/role_capture.sh'; own='generic'; root=\"${CLAUDE_PLUGIN_ROOT:-}\"; if [ -n \"$root\" ] && [ -f \"$root/$rel\" ]; then exec \"$root/$rel\"; fi; for base in \"$HOME/.claude/plugins/cache\" \"$HOME/.codex/plugins/cache\"; do for dir in \"$base/$own/jsc\" \"$base\"; do s=$(find \"$dir\" -path \"*/jsc/*/$rel\" -type f 2>/dev/null | sort -V | tail -n 1); if [ -n \"$s\" ]; then exec \"$s\"; fi; done; done; exit 0",
"timeout": 60 "timeout": 60
} }
] ]