Expand description
Plugin system — JSON-RPC 2.0 interface + lifecycle hooks.
Two extension surfaces:
- JSON-RPC methods (existing) — regular plugin methods
- Lifecycle hooks — intercept tool calls, session events, etc.
Re-exports§
pub use crate::agent::hooks::HookDecision;
Structs§
- Hook
Manager - Central hook manager — dispatches events to all registered hooks
- Logging
Lifecycle Hook - Logging hook — traces every lifecycle event
- Method
Spec - Method specification
- Plugin
Context - Plugin context — passed to plugins during registration, allows tool registration
- Plugin
Error - Plugin error
- Plugin
Info - Plugin
Registry - Plugin registry — manage installed plugins
- Session
Note Lifecycle Hook - Append short session notes on agent completion.
- Shell
Plugin - JSON-RPC plugin exposing
shellwhenpolicy.allow_plugin_shellis enabled.
Enums§
- Lifecycle
Event - Events that lifecycle hooks can intercept
Traits§
- Lifecycle
Hook - A lifecycle hook — registered by plugins or core
- Plugin
- Plugin trait — implement this to extend aclaw with JSON-RPC methods
- Post
Tool Hook - Hook that observes tool results (logging, metrics, auditing)
- PreTool
Hook - Hook that can block tool execution based on custom logic