Skip to main content

Module agent_refs

Module agent_refs 

Source
Expand description

Definition-source registry keyed by agent_instance_hierarchy: EITHER the RemotePath the agent’s WF was fetched from, OR the inline WF spec itself — exactly one per row.

Single function: upsert — blind, last-write-wins, no read-before-write (mirrors super::agent_continuations). Two writers:

  • agents spawn, for spawns by SPEC only (never via tag or AIH), at the moment the AIH lock is acquired (first-chunk identity capture).
  • The log writer, whenever a chunk carries agent_inline (the first chunk of every agent completion, at any tier/nesting): agent_remote present → AgentRefValue::Remote, else AgentRefValue::Inline.

No read API today — write-only scaffolding for surfacing agent definition sources (e.g. agents instances get) later.

Enums§

AgentRefValue
One row’s payload: the remote path’s wire string, or the inline WF spec as JSON.

Functions§

upsert
Insert-or-replace the definition source for an AIH. Blind: prior values are overwritten unconditionally, whichever variant they held.