Expand description
Safe-by-default hooks engine for event-driven command templates.
gestura-core-hooks provides a small hooks system for wiring specific agent
or application events to command templates, while keeping execution tightly
constrained and auditable.
§Safety model
Hooks are intentionally conservative:
- hook execution is opt-in
- configured programs must appear in
allowed_programs - templates are rendered from explicit
HookContextvalues - execution records are captured for inspection and testing
This crate focuses on the hooks data model and execution engine rather than broader pipeline orchestration.
§Main entry points
HookDefinitionandHookCommandTemplate: the declarative hook modelHookEvent: supported events that can trigger hooksHooksSettings: engine configuration including allow-listed programsHookEngine: safe dispatcher that resolves and runs matching hooksHookExecutionRecord: audit-friendly result of a hook run
Structs§
- Hook
Command Template - A command template for a hook.
- Hook
Context - Runtime context provided to hooks.
- Hook
Definition - A single hook definition.
- Hook
Engine - Hook engine.
- Hook
Execution Record - A record of a hook execution.
- Hooks
Settings - Global hooks settings.
- Process
Hook Executor - Executor that spawns local OS processes.
Enums§
- Hook
Event - A hook event.
Traits§
- Hook
Executor - A hook executor.
Functions§
- render_
template - Render
templateby replacing{{key}}placeholders with values invars.
Type Aliases§
- Template
Vars - Template variables map used for hook command rendering.