-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhooks.py
More file actions
36 lines (30 loc) · 1.36 KB
/
Copy pathhooks.py
File metadata and controls
36 lines (30 loc) · 1.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
"""AI agent integration hooks for the CI daemon.
This module is now a thin router that mounts the lifecycle sub-routers.
All handler implementations live in their respective modules:
- ``hooks_common`` -- HookBody, parse_hook_body, handle_hook_errors, utilities
- ``hooks_session`` -- session-start, session-end
- ``hooks_prompt`` -- prompt-submit, before-prompt
- ``hooks_tool`` -- pre-tool-use, post-tool-use, post-tool-use-failure
- ``hooks_lifecycle`` -- stop, subagent-start/stop, agent-thought, pre-compact, catch-all
"""
from fastapi import APIRouter
from open_agent_kit.features.team.daemon.routes.hooks_lifecycle import (
router as lifecycle_router,
)
from open_agent_kit.features.team.daemon.routes.hooks_prompt import (
router as prompt_router,
)
from open_agent_kit.features.team.daemon.routes.hooks_session import (
router as session_router,
)
from open_agent_kit.features.team.daemon.routes.hooks_tool import (
router as tool_router,
)
router = APIRouter(tags=["hooks"])
# Include sub-routers in order. Specific routes (session, prompt, tool) go
# first; lifecycle router goes LAST because it contains the catch-all {event}
# route that would shadow specific routes if registered earlier.
router.include_router(session_router)
router.include_router(prompt_router)
router.include_router(tool_router)
router.include_router(lifecycle_router)