3 min readPlugin author · Integratorv0.9.0a1 stable
What this page covers
The 22-hook surface defined for PR 4-INF.1 and used by the v0.9.0aN
plugin infrastructure. Aligned with
node/src/stigmem_node/plugins/hooks.py.
Do not add hook names beyond this list for v0.9.0a1-compatible plugins.
For a complete package example, start with the Plugin Author Guide.
Handler semantics
Every handler receives a PluginContext as its first positional argument. Hook-site payloads are passed as keyword arguments unless the semantic says a current value is passed positionally.
SemanticRegistryHandler shape · returnvotingfire_votingdef handler(ctx, **kwargs) -> Allow | Deny. Return Allow() or Deny("reason").filter_chainfire_filter_chaindef handler(ctx, value, **kwargs) -> T. The transformed value. Returning None is an error.score_deltafire_score_deltadef handler(ctx, scored_results, **kwargs) -> dict[str, float]. Score deltas keyed by result or fact id. Summed across handlers.fire_and_forgetfire_fire_and_forgetdef handler(ctx, **kwargs) -> None. Audit hooks marked strict raise on handler failure.
Ordering policies
PolicyOrderMeaningcore_firstcore → pluginsCore handlers run first, then plugin handlers in deterministic plugin order.plugins_firstplugins → corePlugin handlers run before any core handlers.core_only_defaultcore baselineCore behavior is the default path; plugins may observe or extend where registered.plugin_onlyplugins onlyOnly plugin handlers run for the hook.
Stable hook surface
HookSemantic · OrderingNotespre_assert_authorizevoting · core_firstAuthorize a fact assertion before validation and persistence.pre_assert_validatevoting · core_firstValidate an assertion payload before transformation.pre_assert_transformfilter_chain · plugins_firstRewrite or normalize the assertion payload.post_assert_persistfire_and_forget · plugin_onlyObserve post-persistence assertion effects.post_assert_propagatefire_and_forget · plugin_onlyObserve propagation scheduling after assertion.post_assert_auditfire_and_forget · core_only_defaultStrict audit hook. Handler failure is surfaced.pre_recall_authorizevoting · core_firstAuthorize a recall request.pre_recall_rewritefilter_chain · plugins_firstRewrite the recall query or request payload.recall_filterfilter_chain · plugins_firstFilter recall candidates or result collections.recall_rankscore_delta · plugins_firstAdd rank score deltas by result or fact id.post_recall_auditfire_and_forget · core_only_defaultStrict audit hook for recall completion.federation_peer_authenticatevoting · core_firstAuthenticate a federation peer.federation_inbound_validatevoting · core_firstValidate inbound federation data.federation_inbound_filterfilter_chain · plugins_firstFilter or rewrite inbound federation facts.federation_outbound_filterfilter_chain · plugins_firstFilter outbound federation payloads.federation_outbound_signfilter_chain · plugins_firstAdd or transform outbound signing material.identity_resolvefilter_chain · core_firstResolve identity context from authentication material.tenant_resolvefilter_chain · core_firstResolve tenant context for a request.capability_checkvoting · core_firstAuthorize capability use.migration_registerfilter_chain · core_only_defaultRegister plugin-owned migrations; must remain namespaced to their declaring plugin.audit_emitfire_and_forget · core_only_defaultStrict audit hook for normalized audit events. Handler failure is surfaced.config_validatevoting · core_firstValidate plugin or node configuration before registration proceeds.
Lifecycle health is not a hook
health_check is a PluginManifest lifecycle callable, not a hook.
It is used by operator inspection and health reporting. It is not
part of the 22-hook PR 4-INF.1 surface and must not appear in the
manifest hooks mapping.