Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

fix(host): only answers to requests pass the network rules

leepokai649648c28030
diff --git a/host/crates/network/src/node/mod.rs b/host/crates/network/src/node/mod.rs
index 99cc5df4..f345155e 100644
--- a/host/crates/network/src/node/mod.rs
+++ b/host/crates/network/src/node/mod.rs
@@ -59,7 +59,7 @@ struct Inner {
taken: Mutex<VecDeque<String>>,
/// Who may write to this computer's agents (`rules`).
rules: Mutex<Vec<Rule>>,
- /// Letters this computer sent, newest kept, and to whom: an answer to one passes the rules.
+ /// Requests this computer sent, newest kept, and to whom: an answer to one passes the rules.
asked: Mutex<VecDeque<(String, EndpointId)>>,
outbox: Mutex<Vec<outbox::Queued>>,
inbox: mpsc::Sender<Message>,
@@ -310,7 +310,8 @@ impl Node {
let local = id == self.id();
let envelope = letter.seal(wire::now_ms());
wire::check(&envelope)?;
- if !local {
+ // A request, which an answer may come back to past the other computer's rules.
+ if !local && envelope.wake && envelope.reply_to.is_none() {
self.inner.asked(&envelope.id, id);
}
let name = |id: &EndpointId| roster.as_ref().map_or_else(|| "this computer".into(), |r| r.name(id));