adk_plugin_pipeline (erlang_adk v0.7.0)
View SourceCompiled, ordered execution pipeline for Runner-global plugins.
Pipelines are immutable values and therefore cheap to keep in a Runner. Each callback executes in its own monitored lightweight process with a deadline and maximum heap. A callback can never block or exhaust the invocation process indefinitely.
Summary
Functions
Compile plugin descriptors in strict list order.
Return JSON-safe configuration metadata without module configuration.
Run one lifecycle hook through every configured plugin.
Types
-type outcome() :: {continue, term(), [trace_entry()]} | {amend, term(), [trace_entry()]} | {return, term(), [trace_entry()]} | {halt, term(), [trace_entry()]} | {error, term(), [trace_entry()]}.
-opaque pipeline()
-type trace_entry() :: map().
Functions
Compile plugin descriptors in strict list order.
A descriptor has a binary id, an already-existing module atom, and may set mode (observe or intervene), failure_policy (open or closed), timeout_ms, max_heap_words, and config. No string or binary is ever converted to a module atom.
Return JSON-safe configuration metadata without module configuration.
-spec run(pipeline(), adk_plugin:hook(), map(), term()) -> outcome().
Run one lifecycle hook through every configured plugin.
The trace contains only bounded structural status, never callback values or exception text. Fail-open failures are recorded and execution continues; fail-closed failures stop with a typed, secret-free error.