hive-sh4re: split inbox, container, journal, and schedule wire shapes into their own modules
Closes the #3110 split — lib.rs is now just the crate doc comment and the pub mod list. journal.rs's new doc comment fixes a pre-existing bug: the old JournalPriority doc text in lib.rs was actually half Capability's doc (a leftover from an earlier reorder that moved the code but not the comment above it).
This commit is contained in:
parent
b785f96d30
commit
80f16094f1
30 changed files with 513 additions and 486 deletions
|
|
@ -654,16 +654,17 @@ impl Coordinator {
|
|||
/// after each tick that fires or rearms a row) so the dashboard's
|
||||
/// scheduled-prompts tab updates live without polling.
|
||||
pub fn emit_schedules_snapshot(self: &Arc<Self>) {
|
||||
let mut schedules: Vec<hive_sh4re::WireSchedule> = match self.scheduled_prompts.list() {
|
||||
Ok(rows) => rows
|
||||
.into_iter()
|
||||
.map(crate::socket_server::schedule_to_wire_public)
|
||||
.collect(),
|
||||
Err(e) => {
|
||||
tracing::warn!(error = ?e, "emit_schedules_snapshot: list failed");
|
||||
return;
|
||||
}
|
||||
};
|
||||
let mut schedules: Vec<hive_sh4re::schedule::WireSchedule> =
|
||||
match self.scheduled_prompts.list() {
|
||||
Ok(rows) => rows
|
||||
.into_iter()
|
||||
.map(crate::socket_server::schedule_to_wire_public)
|
||||
.collect(),
|
||||
Err(e) => {
|
||||
tracing::warn!(error = ?e, "emit_schedules_snapshot: list failed");
|
||||
return;
|
||||
}
|
||||
};
|
||||
// Strip ghost targets (destroyed agents) so the dashboard doesn't
|
||||
// render dead columns. Best-effort: if the roster cache is
|
||||
// momentarily contended we emit unfiltered rather than block this
|
||||
|
|
@ -1055,7 +1056,7 @@ impl Coordinator {
|
|||
let old_label = old_parent.as_deref().unwrap_or("<root>");
|
||||
let new_label = new_parent.unwrap_or("<root>");
|
||||
if let Some(op) = old_parent.as_deref() {
|
||||
let _ = self.broker.send(&hive_sh4re::Message {
|
||||
let _ = self.broker.send(&hive_sh4re::inbox::Message {
|
||||
from: hive_sh4re::manager::trusted_sender(hive_sh4re::manager::SYSTEM_SENDER),
|
||||
to: op.to_owned(),
|
||||
body: format!("{child} moved out of your subtree to {new_label}"),
|
||||
|
|
@ -1063,7 +1064,7 @@ impl Coordinator {
|
|||
});
|
||||
}
|
||||
if let Some(np) = new_parent {
|
||||
let _ = self.broker.send(&hive_sh4re::Message {
|
||||
let _ = self.broker.send(&hive_sh4re::inbox::Message {
|
||||
from: hive_sh4re::manager::trusted_sender(hive_sh4re::manager::SYSTEM_SENDER),
|
||||
to: np.to_owned(),
|
||||
body: format!(
|
||||
|
|
@ -1344,7 +1345,7 @@ impl Coordinator {
|
|||
`--continue` session is intact, so prior context is \
|
||||
still in your window."
|
||||
);
|
||||
if let Err(e) = self.broker.send(&hive_sh4re::Message {
|
||||
if let Err(e) = self.broker.send(&hive_sh4re::inbox::Message {
|
||||
from: hive_sh4re::manager::trusted_sender(hive_sh4re::manager::SYSTEM_SENDER),
|
||||
to: name.to_owned(),
|
||||
body,
|
||||
|
|
@ -1492,7 +1493,7 @@ impl Coordinator {
|
|||
return;
|
||||
}
|
||||
};
|
||||
if let Err(e) = self.broker.send(&hive_sh4re::Message {
|
||||
if let Err(e) = self.broker.send(&hive_sh4re::inbox::Message {
|
||||
from: hive_sh4re::manager::trusted_sender(from),
|
||||
to: agent.to_owned(),
|
||||
body,
|
||||
|
|
@ -1514,7 +1515,7 @@ impl Coordinator {
|
|||
if agent_name == from {
|
||||
continue;
|
||||
}
|
||||
if let Err(e) = self.broker.send(&hive_sh4re::Message {
|
||||
if let Err(e) = self.broker.send(&hive_sh4re::inbox::Message {
|
||||
from: hive_sh4re::manager::trusted_sender(from),
|
||||
to: agent_name.clone(),
|
||||
body: broadcast_body.clone(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue