AgentStatusRow: carry active_model + set_status text/timestamp

This commit is contained in:
damocles 2026-09-07 12:46:54 +02:00 committed by mara
commit 5640832116
5 changed files with 46 additions and 0 deletions

View file

@ -64,6 +64,23 @@ pub struct AgentStatusRow {
/// Parent in the topology tree. `None` marks a root-level agent.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub parent: Option<String>,
/// The Claude model the agent's harness is currently using. Mirrors
/// `container_view::ContainerView::active_model`: `None` when the
/// agent has never started a turn, the field is absent from its
/// harness state file, or the container isn't running.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub active_model: Option<String>,
/// The agent's current free-text status, set via the `set_status`
/// tool. `None` when unset or the container isn't running — a
/// stopped agent's on-disk status is a stale snapshot from before
/// the stop (same rule `container_view::read_agent_status_live`
/// applies for every other reader of this data).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub status_text: Option<String>,
/// Unix timestamp (seconds) `status_text` was last set. `None`
/// exactly when `status_text` is `None`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub status_set_at: Option<i64>,
}
/// One matrix identity an agent can act as, surfaced in `GetAgentMeta`'s