Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

Wolf/macro coder in all channels (#5795)

Wolf Mermelsteind7e73a141d5e
diff --git a/crates/channels/src/domain/side_effects.rs b/crates/channels/src/domain/side_effects.rs
index fb555aad38..3eadb94776 100644
--- a/crates/channels/src/domain/side_effects.rs
+++ b/crates/channels/src/domain/side_effects.rs
@@ -94,9 +94,10 @@ fn active_bot_mention_ids(
.map(|id| id.bot_id())
})
.collect();
- // Macro AI is a code-defined system bot available in every channel; it
- // has no participant row.
+ // Code-defined system bots are available in every channel and have no
+ // participant rows.
active_bot_ids.insert(bot_id::MACRO_AI_BOT_ID);
+ active_bot_ids.insert(bot_id::MACRO_CODER_BOT_ID);
bot_mention_ids(mentions)
.into_iter()
diff --git a/crates/channels/src/domain/side_effects/test.rs b/crates/channels/src/domain/side_effects/test.rs
index d5ff0a8595..a2150f509a 100644
--- a/crates/channels/src/domain/side_effects/test.rs
+++ b/crates/channels/src/domain/side_effects/test.rs
@@ -1604,6 +1604,7 @@ fn broker_events_map_message_posted_mentions_per_entity() {
.into_storage_id()
.to_string();
let macro_ai_principal = bot_id::MACRO_AI_BOT_ID.into_storage_id().to_string();
+ let macro_coder_principal = bot_id::MACRO_CODER_BOT_ID.into_storage_id().to_string();
let uninstalled_bot_principal = BotId::new_from_uuid(Uuid::new_v4())
.into_storage_id()
.to_string();
@@ -1618,6 +1619,8 @@ fn broker_events_map_message_posted_mentions_per_entity() {
mention(BOT_MENTION_ENTITY_TYPE, &bot_principal),
// Macro AI surfaced through the user-mention UI still counts.
mention("user", &macro_ai_principal),
+ // Macro Coder is globally available without a participant row.
+ mention(BOT_MENTION_ENTITY_TYPE, &macro_coder_principal),
// A valid bot principal that is not installed emits nothing.
mention(BOT_MENTION_ENTITY_TYPE, &uninstalled_bot_principal),
// A bot-tagged mention with a malformed id emits nothing.
@@ -1628,8 +1631,8 @@ fn broker_events_map_message_posted_mentions_per_entity() {
mention("user", "macro|[email protected]"),
mention("document", "doc-1"),
],
- // Macro AI needs no participant row: it is a code-defined system bot
- // available in every channel.
+ // System bots need no participant rows: they are available in every
+ // channel.
&[bot_principal.as_str()],
));
@@ -1666,6 +1669,7 @@ fn broker_events_map_message_posted_mentions_per_entity() {
vec![
("bot".to_string(), bot_principal),
("user".to_string(), macro_ai_principal),
+ ("bot".to_string(), macro_coder_principal),
("user".to_string(), "macro|[email protected]".to_string()),
("user".to_string(), "macro|[email protected]".to_string()),
("document".to_string(), "doc-1".to_string()),