Skip to main content

Module wait

Module wait 

Source
Expand description

agents wait — block until an agent reaches the REQUESTED status: exactly one of --inactive (the agent is done — the original behavior, now explicit) or --active (the agent is up).

Takes an instance hierarchy or a tag (the agents enqueue selector shape — a plain ref has no live identity to wait on and errors). The wait is uncapped either way — it blocks until the target reaches the requested status, however long that takes, and a target ALREADY in that status returns immediately.

--inactive:

  • Instance: subscribe to the AIH lock’s release; a free lock returns immediately.
  • Un-upgraded (GROUPED) tag: the tag lock’s holder is the spawn materializing the tag. If nobody holds it, nothing is materializing it — return immediately. Otherwise subscribe to its release, re-resolve the tag (the spawn flow upgrades GROUPED→BOUND strictly before releasing the tag lock, so a still-GROUPED tag after release is a systemic invariant violation and errors fatally), then fall through to the instance wait on the freshly bound hierarchy.

--active:

  • Instance: resolves when the AIH holds its instance lock — the live-registry Activated edge; already-held returns immediately.
  • Tag: a BOUND tag waits on its hierarchy as above; a GROUPED tag first waits for the tag to BIND (someone spawns it), then for the bound agent to be up.

One use among many: a plugin daemon can gate its actions on its agent being up by running agents wait --active before acting.

Success is the bare "Ok" sentinel either way.

Modules§

request_schema
response_schema

Structs§

Args
Command
ListenerExecution
One /listen broadcast run of agents wait: the actual Request, the producer’s AgentArguments, and the unary response future. See crate::cli::broadcast_listener.
Request

Enums§

Path
Schema

Functions§

execute
execute_transform

Type Aliases§

Response
Success-only: the wait completed — the target reached the requested status.