repoint remind/cancel_loose_end/get_loose_ends to the local reminder socket (#2635 inc 1)
This commit is contained in:
parent
8b35b8c4af
commit
e8d101d663
2 changed files with 59 additions and 15 deletions
|
|
@ -304,8 +304,10 @@ pub(super) async fn matrix_unread_summary() -> Option<Vec<MatrixRoomUnread>> {
|
|||
/// best-effort, single-shot (no retry, unlike the broker's
|
||||
/// `client::request_retried`): this socket lives in the SAME container, so
|
||||
/// a connect failure means the harness itself isn't up, which a retry
|
||||
/// won't fix within a tool call's budget. Shared by [`local_todos`] and
|
||||
/// [`mark_local_todo_done`].
|
||||
/// won't fix within a tool call's budget. Shared by [`local_todos`],
|
||||
/// [`mark_local_todo_done`], and [`local_reminders`]; `remind`/
|
||||
/// `cancel_loose_end`(reminder) in `mod.rs` dial it directly since their
|
||||
/// happy path is a plain `Ok`/`Err`, not a `Vec<LooseEnd>` to merge.
|
||||
pub(super) async fn dial_agent_socket(
|
||||
req: &hive_agent_sock::Request,
|
||||
) -> Option<hive_agent_sock::Response> {
|
||||
|
|
@ -335,6 +337,16 @@ pub(super) async fn local_todos() -> Option<Vec<hive_sh4re::LooseEnd>> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Query the harness's in-agent socket for this agent's local pending
|
||||
/// reminders (#2635 inc 1 — was a broker query before reminders moved
|
||||
/// in-container). Same best-effort contract as [`local_todos`].
|
||||
pub(super) async fn local_reminders() -> Option<Vec<hive_sh4re::LooseEnd>> {
|
||||
match dial_agent_socket(&hive_agent_sock::Request::ListReminders).await? {
|
||||
hive_agent_sock::Response::LooseEnds { loose_ends } => Some(loose_ends),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Mark one of this agent's local todos (loose-ends v2) done by id, via
|
||||
/// the harness's in-agent socket — reachable through `cancel_loose_end`
|
||||
/// kind `"todo"` so clearing a todo never has to shell out through a
|
||||
|
|
|
|||
Loading…
Reference in a new issue