Skip to main content

resolve_cspace

Function resolve_cspace 

Source
pub fn resolve_cspace(
    cspace_hint: Option<&str>,
    persona_role: Option<&str>,
    default_template: Option<&str>,
    agent_id: AgentId,
) -> CSpace
Expand description

Resolve an agent’s initial CSpace from the available context.

§Arguments

  • cspace_hint — Optional hint string from the Seed. Can be a known template name (“worker”, “standard”, “operator”, “supervisor”) or a JSON object describing custom capabilities.
  • persona_role — The role field of the assigned persona, if any.
  • default_template — Optional override for the fallback template name. Defaults to “worker” if not specified.
  • agent_id — The agent that will own the resolved CSpace.

§Priority

  1. cspace_hint (if present and non-empty)
  2. persona_role (if present and matches a known role)
  3. default_template or "worker" as fallback