Expand description
How many images an agent’s conversation holds, read from its transcript. A model that cannot read images
(catalog::Model::images) must not be picked for a conversation that still holds one, and the pane’s own count
only sees the part of the feed it has loaded, so srv counts in the transcript store, which keeps all of it.
An image reaches the harness as the <attached_files> list srv appends to the user’s message (attachments::prompt):
a found one as N. name — <path>.send.<image extension>, a missing one as - name.png — (no longer available).
Only user lines are read, so an agent’s own text that quotes such a list counts for nothing.
Functions§
- count_
in_ zone - The images in the user messages of
zone’s transcript; 0 when there is none. - counted
- What the last finished count of
zonefound: a floor for the transcript as it is now, andNonebefore the first count. It reads nothing, so a caller with a deadline can ask it wherecount_in_zonewould first read the whole file (a big agent’s transcript is gigabytes). - forget
- Drops what was counted in
zone, for a transcript rewritten in place (history repair): the file keeps its creation time and may not be shorter, so nothing else tells the next count that its bytes are not the ones it read. - images_
in_ line - The images one transcript line lists, if it is a user message.
- warm
- Counts
zonein the background, socountedhas an answer once it finishes and the next count reads only what was added since. Nothing starts while a count of the zone is already running.