fix(broker): route all wakes through sqlite, remove transient ping buffer
This commit is contained in:
parent
bd0e4d1012
commit
fac326aa35
9 changed files with 84 additions and 215 deletions
|
|
@ -391,11 +391,7 @@ impl Surface for AgentSurface {
|
|||
async fn wake_external(socket: &Path, from: String, body: String) -> Result<()> {
|
||||
let resp: AgentResponse = client::request(
|
||||
socket,
|
||||
&AgentRequest::Wake {
|
||||
from,
|
||||
body,
|
||||
transient: false,
|
||||
},
|
||||
&AgentRequest::Wake { from, body },
|
||||
)
|
||||
.await?;
|
||||
match resp {
|
||||
|
|
|
|||
|
|
@ -818,7 +818,6 @@ async fn poll_once(
|
|||
let req = hive_sh4re::Request::Wake {
|
||||
from: "forge".to_owned(),
|
||||
body,
|
||||
transient: false,
|
||||
};
|
||||
let deliver_result = crate::client::request::<_, hive_sh4re::Response>(socket, &req)
|
||||
.await
|
||||
|
|
|
|||
|
|
@ -11,9 +11,8 @@ use crate::turn_stats::TurnStatRow;
|
|||
/// Assemble the per-turn wake prompt string. The role/tools/etc. live in the
|
||||
/// system prompt; this is just the wake signal body. `id` is the broker row
|
||||
/// id, rendered as a `[msg #<id>]` marker so the agent can reference it in
|
||||
/// `ack_until` (transient pings carry the sentinel 0 and render without it).
|
||||
/// `unread` is the inbox depth after this message was popped. `redelivered`
|
||||
/// prepends a "may already be handled" banner.
|
||||
/// `ack_until`. `unread` is the inbox depth after this message was popped.
|
||||
/// `redelivered` prepends a "may already be handled" banner.
|
||||
#[must_use]
|
||||
pub fn format_wake_prompt(
|
||||
id: i64,
|
||||
|
|
|
|||
Loading…
Reference in a new issue