set_status: add get_agent_meta tool for inter-agent status queries
This commit is contained in:
parent
8e8e8a771f
commit
77fdaf0d1e
5 changed files with 153 additions and 2 deletions
|
|
@ -447,6 +447,10 @@ pub enum AgentRequest {
|
|||
/// to `{state_dir}/hyperhive-status` so it survives harness restarts.
|
||||
/// Pass an empty string to clear the status.
|
||||
SetStatus { text: String },
|
||||
/// Fetch the current status of another agent by name. Returns
|
||||
/// `AgentResponse::AgentMeta` with the target's status fields.
|
||||
/// If the agent does not exist or has never set a status, fields are `None`.
|
||||
GetAgentMeta { name: String },
|
||||
/// Cancel an open thread the agent owns: a `Question` they asked
|
||||
/// (returns `[cancelled by <self>]` as the answer to the asker)
|
||||
/// or a `Reminder` they scheduled (hard-deletes the row).
|
||||
|
|
@ -525,6 +529,16 @@ pub enum AgentResponse {
|
|||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
status_set_at: Option<i64>,
|
||||
},
|
||||
/// `GetAgentMeta` result: status metadata for a named agent.
|
||||
/// `status_text` / `status_set_at` are `None` when the agent has
|
||||
/// not set a status or the agent name is unknown.
|
||||
AgentMeta {
|
||||
name: String,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
status_text: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
status_set_at: Option<i64>,
|
||||
},
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
@ -856,6 +870,8 @@ pub enum ManagerRequest {
|
|||
Whoami,
|
||||
/// Mirror of `AgentRequest::SetStatus` on the manager surface.
|
||||
SetStatus { text: String },
|
||||
/// Mirror of `AgentRequest::GetAgentMeta` on the manager surface.
|
||||
GetAgentMeta { name: String },
|
||||
/// Cancel an open thread (question or reminder). Manager surface
|
||||
/// can cancel any row (no owner check) — same dispatch as
|
||||
/// `AgentRequest::CancelLooseEnd` but with privileged auth.
|
||||
|
|
@ -943,4 +959,12 @@ pub enum ManagerResponse {
|
|||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
status_set_at: Option<i64>,
|
||||
},
|
||||
/// Mirror of `AgentResponse::AgentMeta` on the manager surface.
|
||||
AgentMeta {
|
||||
name: String,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
status_text: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
status_set_at: Option<i64>,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue