Cyclium.StrategyConfig (Cyclium v0.5.2)

Copy Markdown View Source

Resolves the strategy_config an episode runs under.

Order:

  1. the config registered for the exact {actor_id, expectation_id} pair (:persistent_term, set by the Actor DSL at boot);
  2. the first config registered for the actor under any expectation (non-deterministic for a multi-expectation actor; prefer passing the expectation id);
  3. the strategy_config column of the actor's cyclium_agent_definitions row, only for actors the dynamic loader started on this node.

Step 3 is gated on purpose. A definition row named after a compiled actor must not be able to supply that actor's tool allow-list, system prompt or policy; compiled actors get their config from code or nothing.

Summary

Functions

Whether the dynamic loader started actor_id on this node.

Record that the dynamic loader owns actor_id on this node.

Forget that actor_id is dynamic (after the loader stops it).

Functions

dynamic_actor?(actor_id)

@spec dynamic_actor?(atom() | binary()) :: boolean()

Whether the dynamic loader started actor_id on this node.

load(actor_id, expectation_id \\ nil)

@spec load(atom() | binary(), atom() | binary() | nil) :: map()

mark_dynamic(actor_id)

@spec mark_dynamic(atom() | binary()) :: :ok

Record that the dynamic loader owns actor_id on this node.

unmark_dynamic(actor_id)

@spec unmark_dynamic(atom() | binary()) :: :ok

Forget that actor_id is dynamic (after the loader stops it).