feat: add set_status MCP tool and status field to whoami/dashboard (closes #325)
This commit is contained in:
parent
6f3b56ad84
commit
fe2933b213
8 changed files with 170 additions and 16 deletions
|
|
@ -443,6 +443,10 @@ pub enum AgentRequest {
|
|||
/// identity after a rename or session-continue boundary where the
|
||||
/// system-prompt-substituted label is no longer reliable.
|
||||
Whoami,
|
||||
/// Set a free-text status string visible on the dashboard. Persisted
|
||||
/// to `{state_dir}/hyperhive-status` so it survives harness restarts.
|
||||
/// Pass an empty string to clear the status.
|
||||
SetStatus { text: 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).
|
||||
|
|
@ -507,12 +511,15 @@ pub enum AgentResponse {
|
|||
/// hive-c0re is running against. `role` is `"agent"` for
|
||||
/// sub-agents (the only path that reaches this variant of the
|
||||
/// response). `hyperhive_rev` is `None` only when the configured
|
||||
/// flake URL has no canonical path.
|
||||
/// flake URL has no canonical path. `status_text` is the last
|
||||
/// value written via `SetStatus`, or `None` if none has been set.
|
||||
Whoami {
|
||||
name: String,
|
||||
role: String,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
hyperhive_rev: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
status_text: Option<String>,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -843,6 +850,8 @@ pub enum ManagerRequest {
|
|||
/// Manager-flavour self-introspection. Same wire shape as
|
||||
/// `AgentRequest::Whoami`, but `role` is always `"manager"`.
|
||||
Whoami,
|
||||
/// Mirror of `AgentRequest::SetStatus` on the manager surface.
|
||||
SetStatus { text: 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.
|
||||
|
|
@ -925,5 +934,7 @@ pub enum ManagerResponse {
|
|||
role: String,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
hyperhive_rev: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
status_text: Option<String>,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue