Skip to main content

Module plugin

Module plugin 

Source

Structs§

HookGate
Combined verdict across all responding hooks for one event.
HookResponse
One enabled hook’s parsed response to a hook event. Most hooks print nothing and exit 0 — that’s an HookDecision::Allow with no extras, so pre-contract hooks keep working unchanged.
PluginCapabilityPreview
A summary of what a plugin declares it will do, shown before install/enable. These are advisory disclosures for informed consent, not an enforced sandbox (see PluginManifest::capabilities).
PluginManifest

Enums§

HookDecision
Allow-or-deny verdict parsed from a hook’s stdout / exit status.

Functions§

aggregate_hook_responses
Aggregate hook responses: first deny wins, last updated_input wins, contexts concatenate in order.
install_plugin_from_path
plugin_capability_preview
run_plugin_hooks
Run every enabled plugin’s hooks for event, returning their parsed responses (empty when no plugin responds — most events, most hooks). Callers that gate on the result aggregate via aggregate_hook_responses; fire-and-forget callers keep ignoring the return value.
validate_plugin_manifest
write_plugin_lockfile