adk_agent_instruction (erlang_adk v0.7.0)
View SourceSafe static/dynamic instruction resolution for an agent specification.
Dynamic providers receive a deliberately narrow read-only context. Service handles, credential references, authentication values, and arbitrary runner internals are never passed to provider code. Template placeholders can read only the supplied scoped-state snapshot or an artifact from the exact scope supplied by the runner.
Summary
Functions
Conservative credential-key detector shared by template validation and the dynamic callback's state projection.
Resolve one instruction. Options require timeout_ms, artifact_timeout_ms, and max_bytes.
Types
-type error_reason() :: invalid_instruction | instruction_too_large | invalid_instruction_context | invalid_instruction_callback | instruction_callback_timeout | instruction_callback_failed | instruction_callback_error | invalid_instruction_callback_result | {secret_template_key, binary()} | {instruction_state_not_found, binary()} | {instruction_artifact_not_found, binary()} | {instruction_artifact_unavailable, binary()} | {invalid_instruction_artifact, binary()}.
Functions
-spec compile(binary() | string() | {dynamic, module(), atom()}, pos_integer()) -> {ok, instruction()} | {error, error_reason()}.
Conservative credential-key detector shared by template validation and the dynamic callback's state projection.
-spec resolve(instruction(), map(), map()) -> {ok, binary()} | {error, error_reason()}.
Resolve one instruction. Options require timeout_ms, artifact_timeout_ms, and max_bytes.