Jidoka.Agent.Spec.Controls (Jidoka v0.9.0)

Copy Markdown View Source

Policy controls attached to a Jidoka agent definition.

Summary

Functions

Normalizes an existing control set, keyword list, or map.

Builds an agent control set from keyword or map attributes.

Builds an agent control set and raises if the attributes are invalid.

Returns the Zoi schema for agent controls.

Types

t()

@type t() :: %Jidoka.Agent.Spec.Controls{
  inputs: [term()],
  max_turns: nil | nil | integer(),
  metadata: map(),
  operations: [term()],
  outputs: [term()],
  timeout_ms: nil | nil | integer()
}

Functions

from_input(controls)

@spec from_input(t() | keyword() | map()) :: {:ok, t()} | {:error, term()}

Normalizes an existing control set, keyword list, or map.

new(attrs \\ [])

@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}

Builds an agent control set from keyword or map attributes.

new!(attrs \\ [])

@spec new!(keyword() | map()) :: t()

Builds an agent control set and raises if the attributes are invalid.

schema()

@spec schema() :: Zoi.schema()

Returns the Zoi schema for agent controls.