Expand description
Script-based callbacks — run shell or Python scripts as lifecycle hooks.
ScriptCallback wraps an external script that receives JSON on stdin and
returns JSON on stdout. The builder uses this to bridge config-specified
script paths into Rust closure callbacks.
§Protocol
Input (stdin):
{ "hook": "before_loop", "session_id": "...", "loop_id": "...", ... }Output (stdout) for before_* hooks:
{ "allow": true }Output (stdout) for after_* hooks:
Any JSON (logged but not acted upon).
Structs§
- Script
Callback - A callback that executes an external script (shell or Python).
Enums§
- Script
Callback Error - Errors from script callback execution.
Functions§
- is_
script_ path - Returns true if a string looks like a script path (for config detection).