feat(#2635): wire harness-local questions mirror (inc2 pt2)
This commit is contained in:
parent
9471201698
commit
e5ef5a72be
8 changed files with 465 additions and 191 deletions
|
|
@ -1,9 +1,9 @@
|
|||
//! Wire types for the *in-agent* socket, served by the hive-agent harness
|
||||
//! to the in-container producers (matrix / bash MCP daemons) and
|
||||
//! `forge_notify`. Carries the loose-ends-v2 *todo* op family plus the
|
||||
//! harness-local *reminder* op family; more in-agent request families may
|
||||
//! be added over time (the socket is deliberately named for the agent,
|
||||
//! not the todos).
|
||||
//! harness-local *reminder* and *question* op families; more in-agent
|
||||
//! request families may be added over time (the socket is deliberately
|
||||
//! named for the agent, not the todos).
|
||||
//!
|
||||
//! Distinct from `hive-core-agent-sock`, the *host*-served core↔agent
|
||||
//! protocol on `/run/hive/mcp.sock`: this socket never leaves the
|
||||
|
|
@ -91,6 +91,30 @@ pub enum Request {
|
|||
/// deferred `compact_pending` flag the operator's button sets (consumed
|
||||
/// at the next turn boundary), so it never races a live claude process.
|
||||
Compact,
|
||||
/// Mirror an outstanding question this agent asked (`ask()` succeeded).
|
||||
/// `target` is who it's waiting on (`"operator"` when asked with
|
||||
/// `to: None`). Part of the questions-mirror increment — see
|
||||
/// `hive-agent::questions`.
|
||||
RecordAskedQuestion {
|
||||
id: i64,
|
||||
target: String,
|
||||
question: String,
|
||||
},
|
||||
/// Mirror an outstanding question this agent was asked (a
|
||||
/// `question_asked` system event arrived in the inbox). `asker` is who's
|
||||
/// waiting on this agent for a reply.
|
||||
RecordAnsweringQuestion {
|
||||
id: i64,
|
||||
asker: String,
|
||||
question: String,
|
||||
},
|
||||
/// Drop the mirror row for `id` (either role) — the question resolved
|
||||
/// from this agent's side (answered, or the `question_answered` event
|
||||
/// for a question this agent asked arrived).
|
||||
ClearQuestion { id: i64 },
|
||||
/// List this agent's mirrored questions (both roles) — single-agent
|
||||
/// scope, same shape as `ListReminders`.
|
||||
ListQuestions,
|
||||
}
|
||||
|
||||
/// A response on the in-agent socket. Serialised with a `kind` tag,
|
||||
|
|
@ -102,8 +126,8 @@ pub enum Response {
|
|||
Ok,
|
||||
/// Op succeeded and touched `count` rows (clear / mark-done).
|
||||
Acked { count: u64 },
|
||||
/// `ListTodos` / `ListReminders` result (the latter wraps each row as
|
||||
/// [`LooseEnd::Reminder`]).
|
||||
/// `ListTodos` / `ListReminders` / `ListQuestions` result (each wraps
|
||||
/// its rows as the matching [`LooseEnd`] variant).
|
||||
LooseEnds { loose_ends: Vec<LooseEnd> },
|
||||
/// `CountPendingReminders` result.
|
||||
PendingRemindersCount { count: u64 },
|
||||
|
|
|
|||
Loading…
Reference in a new issue