Immutable, data-only program for a precise Work.
A program is a finite graph of registered operation steps, pure decisions,
bounded repeats, inference steps and terminal nodes. The graph contains no
callback or module selected by authored data. It materializes an ordinary
Spectre.Operation.Definition, so execution, fencing, retry, recovery and
control-plane semantics remain those of the existing operational runtime.
Summary
Functions
Fetches one exact node by its stable id.
Loads a compiled declarative Work module into the same program IR.
Restores a program from canonical data and verifies its digest.
Builds and fully validates a data-driven Work program.
Builds a program or raises with its stable validation reason.
Builds the code-owned operational contract consumed by the shared runtime.
Returns the registered operation IDs required by the program.
Returns exact model-profile IDs pinned by inference nodes.
Returns prompt fragment IDs required by inference nodes.
Returns the complete portable program representation.
Validates registered operation kinds and purity constraints for one Agent.
Validates a user state value against the program's declared schema.
Types
@type program_node() :: map()
@type t() :: %Spectre.Execution.Program{ budget: map(), digest: String.t(), entry: String.t(), id: String.t(), initial: Spectre.Execution.Expression.t(), input: atom(), metadata: map(), migrations: [map()], mutable_paths: [[String.t() | non_neg_integer()]], nodes: %{required(String.t()) => program_node()}, operation_refs: [String.t()], prompt_refs: [String.t()], schema_version: pos_integer(), security: map(), state: atom(), update: atom(), version: pos_integer() | String.t() }
Functions
@spec fetch_node(t(), term()) :: {:ok, program_node()} | {:error, term()}
Fetches one exact node by its stable id.
Loads a compiled declarative Work module into the same program IR.
Restores a program from canonical data and verifies its digest.
Builds and fully validates a data-driven Work program.
Builds a program or raises with its stable validation reason.
@spec operation_definition(t()) :: Spectre.Operation.Definition.t()
Builds the code-owned operational contract consumed by the shared runtime.
Returns the registered operation IDs required by the program.
Returns exact model-profile IDs pinned by inference nodes.
Returns prompt fragment IDs required by inference nodes.
Returns the complete portable program representation.
Validates registered operation kinds and purity constraints for one Agent.
Validates a user state value against the program's declared schema.