Skip to main content

Module executor

Module executor 

Source

Structs§

DaemonExecutor
Per-HookConfig long-lived child. One executor owns one child at a time; fires are serialized through a single connection mutex (NDJSON request → NDJSON response). On framing error or child exit, the connection is dropped and the next fire reconnects with exponential backoff.
ExecExecutor
Subprocess-per-fire executor. Spawns a fresh child for every event; closes stdin to signal “no more input”; reads stdout to EOF and parses a single HookDecision.
ExecutorMetrics
Per-executor metrics surfaced by ai-memory doctor.
ExecutorRegistry
Maps HookConfigArc<dyn HookExecutor>. Built once per hooks.toml load (see src/hooks/config.rs::spawn_reload_task) and held behind the same Arc<RwLock<…>> that owns the config snapshot. G5’s chain runner consumes the registry’s outputs.

Enums§

ExecutorError
Errors surfaced by the executor layer. Hand-rolled Display + Error per the v0.7 lesson (no thiserror in this crate’s hot dependency tree).

Traits§

HookExecutor
Trait every executor implementation satisfies. fire is the single hot-path method G5 will iterate over when stitching chains together.

Type Aliases§

Result
Result alias used across the executor surface.