Skip to main content

Module plugin

Module plugin 

Source
Expand description

Plugin system — JSON-RPC 2.0 interface + lifecycle hooks.

Two extension surfaces:

  1. JSON-RPC methods (existing) — regular plugin methods
  2. Lifecycle hooks — intercept tool calls, session events, etc.

Re-exports§

pub use crate::agent::hooks::HookDecision;

Structs§

HookManager
Central hook manager — dispatches events to all registered hooks
LoggingLifecycleHook
Logging hook — traces every lifecycle event
MethodSpec
Method specification
PluginContext
Plugin context — passed to plugins during registration, allows tool registration
PluginError
Plugin error
PluginInfo
PluginRegistry
Plugin registry — manage installed plugins
SessionNoteLifecycleHook
Append short session notes on agent completion.
ShellPlugin
JSON-RPC plugin exposing shell when policy.allow_plugin_shell is enabled.

Enums§

LifecycleEvent
Events that lifecycle hooks can intercept

Traits§

LifecycleHook
A lifecycle hook — registered by plugins or core
Plugin
Plugin trait — implement this to extend aclaw with JSON-RPC methods
PostToolHook
Hook that observes tool results (logging, metrics, auditing)
PreToolHook
Hook that can block tool execution based on custom logic