Skip to main content

Module plugins

Module plugins 

Source
Expand description

Engine plugins namespace: discovery, custom-operation dispatch, cache keys.

Custom operations (spec 31): a plugin operation like acme.echo is callable through invoke(), RPC, HTTP, SDKs, and FFI with no per-transport code — the fallback arm in invoke routes unknown acme.* ids here. Provenance (spec 25): every plugin output is wrapped with its origin. Failure policy (spec 26): required = hard error, warn/optional = skip with a structured diagnostic. Cache keys (spec 27) include the plugin lock so upgrades invalidate ranking-dependent caches automatically.

Structs§

ActivePlugins
ExtensionOrder
Deterministic extension order (§19): priority ascending, plugin id ascending, then before/after DAG edges. Unknown references and cycles are startup errors — never silent misordering.

Functions§

active
cache_key_fragment
call_operation
Dispatch a plugin-provided operation. Returns (output, diagnostic): warn/optional failures yield the engine error + a diagnostic instead of failing the call — the host records what was skipped (spec 26).
commit_contribution
Commit a validated batch: entities, relationships, evidence in order. Validate-then-commit keeps broken plugins from half-writing the model.
context_sections
Context-section contributions (§17 Context): every context-section:* extension renders one markdown section into the task pack.
lock_entries
order_extensions
validate_contribution
Validate a plugin contribution batch (§24): entity ids and kinds present, relationship endpoints resolve within (batch entities + graph), custom ontology namespaced plugin:<id>/..., evidence ids present.