Skip to main content

Module needs_key

Module needs_key 

Source
Expand description

A moved agent that waits for its route’s Vault key takes the route once the key is in the Vault (model_gateway::pending_route, docs/specs/SPEC_MOVE_AN_AGENT_TO_ANOTHER_COMPUTER_2026_11_24.md 7.3). Run whenever the Vault announces a change, so a key the person adds from the request, the Vault pane or anywhere else is found.

Functions§

relaunch 🔒
A pane of the agent that runs already is on its harness’s own sign-in: the route’s gateway environment is installed only when a pane starts (launch::carry_for_block), so saving the choice would leave it there until someone restarted it. Each such pane is restarted at the end of its turn, as for any change of route, and the relaunch gives it the route. A pane that is not running, or is a one-shot (a container agent’s), reads the route when it starts.
relaunch_off_the_runtime 🔒
The Vault announces a change from async handlers, and a restart can wait on a pane’s controller (a lock, and for an idle pane a stop and a start): it runs on a blocking thread, as a route switch’s does, so adding a key never holds up a runtime worker.
settle_all 🔒
Settles every agent that waits for a route: the ones whose key is here now take their route. Tells the windows when one did, so the Needs a key tag leaves its tile.
settle_each 🔒
Settles each agent that waits: whether anything changed (the windows are told), and the agents that took their route, the only ones whose panes are restarted onto it. key_present says whether the Vault has a key, by label.