Expand description
A container agent whose container runs an older agent image than this AgentMux: telling its
pane once, and updating the container when asked (a button in the pane, or Agents update_container). See backend::container::drift for what an update does. Agents update_container with a
container_image also changes which of the two shipped images the agent runs.
Structs§
- Update
Container 🔒Request POST /api/v1/agent/container/update:Agents update_container, for the agent named inagent. Withcontainer_image(one of the two images AgentMux ships) it also changes the image first.
Constants§
- CURRENT 🔒
- The version this AgentMux ships the agent image for.
Functions§
- already_
told 🔒 - broker_
agents_ 🔒changed - change_
image 🔒 set_imagefor the agentnamed(an id or slug, open or not), asked for bycaller. A container agent cannot change an image, its own included: like a container’s limits, that is for a host agent, the steward or the operator.- container_
is_ 🔒gone - Docker answers 404 when the container to remove does not exist.
- current_
image_ 🔒available - Whether this AgentMux’s own agent image of the kind
configured(its storedagent:container_image) can be had: on this machine, or from the registry. When it can’t (a build ahead of its release), a container is on the floating tag because nothing newer exists. - current_
image_ 🔒available_ cached current_image_availablefor the check made on every turn: a registry answer is kept for a while, so a slow or unreachable registry does not delay each message.- first_
report 🔒 - Whether the container named
container_nameruns another image version thancurrent, and has not been reported yet. Marks it reported. - handle_
update_ 🔒container - image_
blocks_ 🔒update - Why an agent configured with
configured(its storedagent:container_image, empty for the default) can’t be moved to this AgentMux’s agent image: it runs its own image, or is pinned to another version. - is_
older 🔒 - Whether version
runningis older thancurrent, comparing their numeric dotted parts (0.59.41<0.60.2). A version that does not parse is not older: it is left alone rather than replaced. - note_
outdated 🔒 - Writes one pane row, and one log line, when an existing container runs another agent image version than this AgentMux.
- set_
image 🔒 - Changes which agent image the container agent
uidruns: the definition (so every later open and the next open pane agree), the open pane’s own record of it, and the container, removed so that the next message creates it from the new image. Only between turns, and only to one of the two images AgentMux ships; an agent’s own image is set by editing its definition in the window. - take_
update_ 🔒gate - The container’s update gate taken exclusively, or None while a turn (or another update) holds it.
- told 🔒
- Containers (by name and running version) whose pane has been told, so one srv run says it once per container.
- update_
for_ 🔒block - Removes
block_id’s container so its next message starts it from this AgentMux’s agent image. Only between turns. Returns the image version the next start uses. - update_
if_ 🔒idle - Moves an idle agent’s container to this AgentMux’s agent image: when it runs an older one, the agent follows the default image (no pin, no image of its own), the current image is already on this machine, and no turn is using the container. The container is removed (workspace, memory and the CLI volume stay; tools installed inside it are installed again) and the pane is told; the start that follows creates it from the current image. Returns whether it did. Anything else leaves the “outdated” row and its button as they are.