hive-sh4re: split manager-socket constants + HelperEvent into their own topic module

This commit is contained in:
damocles 2026-08-10 22:38:35 +02:00 committed by mara
commit 138f6b6c10
24 changed files with 268 additions and 244 deletions

View file

@ -47,7 +47,7 @@ pub fn handle_ask(
// "is this string the operator?".
let target = match to {
None => None,
Some(t) if t == hive_sh4re::OPERATOR_RECIPIENT => None,
Some(t) if t == hive_sh4re::manager::OPERATOR_RECIPIENT => None,
Some("") => {
return Err("ask: `to` cannot be empty (omit it for the operator path)".to_owned());
}
@ -78,7 +78,7 @@ pub fn handle_ask(
if let Some(target_agent) = target {
coord.notify_agent(
target_agent,
&hive_sh4re::HelperEvent::QuestionAsked {
&hive_sh4re::manager::HelperEvent::QuestionAsked {
id,
asker: asker.to_owned(),
question: question.to_owned(),
@ -125,7 +125,7 @@ pub fn handle_answer(
coord.notify_agent_from(
answerer,
&asker,
&hive_sh4re::HelperEvent::QuestionAnswered {
&hive_sh4re::manager::HelperEvent::QuestionAnswered {
id,
question,
answer: answer.to_owned(),
@ -174,7 +174,7 @@ pub fn handle_cancel_loose_end(
coord.notify_agent_from(
canceller,
&asker,
&hive_sh4re::HelperEvent::QuestionAnswered {
&hive_sh4re::manager::HelperEvent::QuestionAnswered {
id,
question,
answer: sentinel.clone(),