-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhooks.json
More file actions
68 lines (68 loc) · 5.36 KB
/
Copy pathhooks.json
File metadata and controls
68 lines (68 loc) · 5.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
"description": "Plugin hook manifest selected explicitly by .codex-plugin/plugin.json. Commands prefer Codex's PLUGIN_ROOT and retain the legacy CLAUDE_PLUGIN_ROOT alias; a missing runtime root exits cleanly. The standalone installer separately expands hooks/hooks.json into ~/.codex/hooks.json; drift tests keep both wirings aligned.",
"hooks": {
"SessionStart": [
{
"matcher": "startup|resume|clear|compact",
"hooks": [
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/session-start-check.sh\"", "timeout": 5, "additionalContextLimit": 6000 }
]
}
],
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/pre-bash-safety-check.sh\"", "timeout": 3 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/banned-vocab-check.sh\"", "timeout": 3 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/ship-baseline-check.sh\"", "timeout": 8 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/memory-read-check.sh\"", "timeout": 3 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/secrets-scan.sh\"", "timeout": 5 }
]
},
{
"matcher": "apply_patch|Edit|Write",
"hooks": [
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/pre-mutation-journal.sh\"", "timeout": 3 }
]
}
],
"PostToolUse": [
{
"matcher": "Bash|apply_patch|update_plan",
"hooks": [
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/post-tool-journal.sh\"", "timeout": 3 }
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/surface-advisories.sh\"", "timeout": 3, "additionalContextLimit": 1000 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/memory-prompt-hint.sh\"", "timeout": 3, "additionalContextLimit": 1000 }
]
}
],
"Stop": [
{
"hooks": [
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/residue-audit.sh\"", "timeout": 3 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/sandbox-disposal-check.sh\"", "timeout": 3 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/transcript-structure-scan.sh\"", "timeout": 5 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/convention-cite-scan.sh\"", "timeout": 5 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/session-exit-checkpoint.sh\"", "timeout": 5 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/mem-audit.sh\"", "timeout": 5 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/session-summary.sh\"", "timeout": 5 },
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/session-handoff-capture.sh\"", "timeout": 3 }
]
}
],
"SessionEnd": [
{
"hooks": [
{ "type": "command", "command": "agentsmd_plugin_root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; [ -n \"$agentsmd_plugin_root\" ] || exit 0; bash \"$agentsmd_plugin_root/hooks/session-handoff-finalize.sh\"", "timeout": 3 }
]
}
]
}
}