mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-07-25 14:22:57 +00:00
- docs/agent-hooks.md: handler reference, lifecycle events, security model - examples/hooks/: 5 runnable JSON configs (audit, lint, block-rm-rf, Discord notify, context injector) - docs/17-changelog.md: Wave 0 entry - Makefile: hooks-specific test targets - CLAUDE.md: cross-reference
23 lines
648 B
JSON
23 lines
648 B
JSON
{
|
|
"event": "session_start",
|
|
"handler_type": "http",
|
|
"scope": "agent",
|
|
"matcher": "",
|
|
"if_expr": "",
|
|
"config": {
|
|
"url": "https://ctx.internal.example.com/hooks/session-bootstrap",
|
|
"headers": {
|
|
"Authorization": "Bearer REPLACE_ME_ENCRYPTED"
|
|
}
|
|
},
|
|
"timeout_ms": 4000,
|
|
"on_timeout": "allow",
|
|
"priority": 50,
|
|
"enabled": true,
|
|
"source": "api",
|
|
"metadata": {
|
|
"notes": "On session_start, fetches project-specific metadata and injects via additionalContext. The remote endpoint should respond with {\"decision\":\"allow\",\"additionalContext\":\"...\"}.",
|
|
"tags": ["context", "session", "bootstrap"]
|
|
}
|
|
}
|