A bounded, data-only optimizer parameter.
Parameters use stable string IDs and one of the supported kinds. Their values are restricted to JSON data with string map keys so optimizer state can be hashed, persisted, and inspected without capturing executable runners, credentials, atoms, or other runtime terms.
Summary
Functions
Returns the deterministic content digest for a kind and JSON value.
Returns a data-only representation suitable for JSON persistence.
Returns every parameter kind supported by the contract.
Loads and verifies a persisted parameter representation.
Builds a parameter after validating its stable ID and data-only value.
Types
@type json_value() :: nil | boolean() | number() | String.t() | [json_value()] | %{required(String.t()) => json_value()}
@type kind() ::
:instruction
| :demos
| :config
| :playbook
| :tool_description
| :tool_schema
| :artifact
@type t() :: %Imp.Optimizer.Parameter{ digest: String.t(), id: String.t(), kind: kind(), value: json_value() }
Functions
@spec content_digest(kind() | String.t(), json_value()) :: String.t()
Returns the deterministic content digest for a kind and JSON value.
Returns a data-only representation suitable for JSON persistence.
@spec kinds() :: [kind()]
Returns every parameter kind supported by the contract.
Loads and verifies a persisted parameter representation.
@spec new(String.t(), kind() | String.t(), json_value()) :: t()
Builds a parameter after validating its stable ID and data-only value.