mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
52d99f9ea3
Codex CLI v0.115.0+ supports hooks (SessionStart, Stop, UserPromptSubmit, PreToolUse, PostToolUse). Add codex-hooks.json mapping 8 AgentOps hooks to the Codex hook format. The install-codex-plugin.sh script now: - Copies hook scripts to the plugin cache - Installs/merges hooks.json to ~/.codex/hooks.json - Enables codex_hooks feature in config.toml - Upgrades hook_runtime from codex-hookless-fallback to codex-native-hooks Hooks installed: session-start, ao-inject, flywheel-close, prompt-nudge, quality-signals, go-test-precommit, commit-review, ratchet-advance.
64 lines
1.9 KiB
JSON
64 lines
1.9 KiB
JSON
{
|
|
"$schema": "../schemas/hooks-manifest.v1.schema.json",
|
|
"hooks": [
|
|
{
|
|
"name": "agentops-session-start",
|
|
"event": "SessionStart",
|
|
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/session-start.sh",
|
|
"timeout": 10000
|
|
},
|
|
{
|
|
"name": "agentops-inject",
|
|
"event": "SessionStart",
|
|
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/ao-inject.sh",
|
|
"timeout": 10000
|
|
},
|
|
{
|
|
"name": "agentops-flywheel-close",
|
|
"event": "Stop",
|
|
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/ao-flywheel-close.sh",
|
|
"timeout": 15000
|
|
},
|
|
{
|
|
"name": "agentops-prompt-nudge",
|
|
"event": "UserPromptSubmit",
|
|
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/prompt-nudge.sh",
|
|
"timeout": 5000
|
|
},
|
|
{
|
|
"name": "agentops-quality-signals",
|
|
"event": "UserPromptSubmit",
|
|
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/quality-signals.sh",
|
|
"timeout": 3000
|
|
},
|
|
{
|
|
"name": "agentops-go-test-precommit",
|
|
"event": "PreToolUse",
|
|
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/go-test-precommit.sh",
|
|
"matcher": {
|
|
"type": "bash"
|
|
},
|
|
"timeout": 60000
|
|
},
|
|
{
|
|
"name": "agentops-commit-review",
|
|
"event": "PreToolUse",
|
|
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/commit-review-gate.sh",
|
|
"matcher": {
|
|
"type": "bash",
|
|
"pattern": "git commit"
|
|
},
|
|
"timeout": 10000
|
|
},
|
|
{
|
|
"name": "agentops-ratchet-advance",
|
|
"event": "PostToolUse",
|
|
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/ratchet-advance.sh",
|
|
"matcher": {
|
|
"type": "bash"
|
|
},
|
|
"timeout": 5000
|
|
}
|
|
]
|
|
}
|