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.

fix(agent-trigger): keep rdkafka out of the self-hosted daemon (#6040)

Wolf Mermelstein0b5b4b9396d9
diff --git a/crates/agent_trigger/Cargo.toml b/crates/agent_trigger/Cargo.toml
index 86e1d1437a..4038e22912 100644
--- a/crates/agent_trigger/Cargo.toml
+++ b/crates/agent_trigger/Cargo.toml
@@ -4,13 +4,20 @@ name = "agent_trigger"
publish = false
version = "0.1.0"
+[features]
+# Lexical / fast-model adapters. Off by default: `lexical_client` pulls
+# models_search → models_soup → notification → rdkafka, and the self-hosted
+# daemon only needs domain events from this crate. Services that construct
+# the adapters enable this; do not add it to coding_agent_worker.
+outbound = ["dep:agent", "dep:ai_usage", "dep:lexical_client"]
+
[dependencies]
-agent = { path = "../agent" }
+agent = { path = "../agent", optional = true }
agent_session = { path = "../agent_session" }
-ai_usage = { path = "../ai_usage" }
+ai_usage = { path = "../ai_usage", optional = true }
anyhow = { workspace = true }
bot_id = { path = "../bot_id" }
-lexical_client = { path = "../lexical_client" }
+lexical_client = { path = "../lexical_client", optional = true }
channels = { path = "../channels", features = ["ports"] }
chrono = { workspace = true }
# Only the domain vocabulary (`Event`, `MacroEvent`, `TopicEvent`). Asking for
diff --git a/crates/agent_trigger/src/lib.rs b/crates/agent_trigger/src/lib.rs
index 006b073cae..0cbf22f98e 100644
--- a/crates/agent_trigger/src/lib.rs
+++ b/crates/agent_trigger/src/lib.rs
@@ -1,2 +1,3 @@
pub mod domain;
+#[cfg(feature = "outbound")]
pub mod outbound;
diff --git a/services/agent_harness_service/Cargo.toml b/services/agent_harness_service/Cargo.toml
index bcef07b90b..0864294d16 100644
--- a/services/agent_harness_service/Cargo.toml
+++ b/services/agent_harness_service/Cargo.toml
@@ -20,7 +20,7 @@ agent_inmem = { path = "../../crates/agent_inmem" }
ai_tools = { path = "../../crates/ai_tools" }
agent_runtime_protocol = { path = "../../crates/agent_runtime_protocol", features = ["utoipa"] }
agent_session = { path = "../../crates/agent_session" }
-agent_trigger = { path = "../../crates/agent_trigger" }
+agent_trigger = { path = "../../crates/agent_trigger", features = ["outbound"] }
ai_usage = { path = "../../crates/ai_usage" }
aws-sdk-sqs = { workspace = true }
bot_id = { path = "../../crates/bot_id" }
diff --git a/services/agent_trigger_service/Cargo.toml b/services/agent_trigger_service/Cargo.toml
index a326c46605..7bd7a8a6c3 100644
--- a/services/agent_trigger_service/Cargo.toml
+++ b/services/agent_trigger_service/Cargo.toml
@@ -10,7 +10,7 @@ path = "src/main.rs"
[dependencies]
agent_session = { path = "../../crates/agent_session" }
-agent_trigger = { path = "../../crates/agent_trigger" }
+agent_trigger = { path = "../../crates/agent_trigger", features = ["outbound"] }
ai_usage = { path = "../../crates/ai_usage" }
anyhow = { workspace = true }
bots = { path = "../../crates/bots", default-features = false, features = ["outbound", "ports"] }