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.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
Merge remote-tracking branch 'origin/dev' into pr-78
leepokai557e5e90d4c6
diff --cc docs/features/chat-messages.mdindex f3b0c7c2,bf1314bc..c2acacf4--- a/docs/features/chat-messages.md+++ b/docs/features/chat-messages.md@@@ -13,12 -13,12 +13,16 @@@ How a bot's work turns into what the usthe old rule: its last text becomes the turn's final message.- Group room turns, `ask_bot` requests and routines reject `send_message`: their reply is theturn's last text, as before (`chat/group.rs`, `chat/team.rs`, `routines`).+ - An `ask_bot` reply stays in the recipient's trace and the request notice; it does+ not also become a message to the user. The requesting bot uses it to answer the user.+ Independent `message_bot` turns report to the user in the recipient's main chat, through+ `send_message` or the final-text fallback, and do not add that report to the request notice.- The rules reach the agent twice: the MCP server's instructions, and the frozen instructionsnapshot (`chat/context.rs`).+- A bot-to-bot exchange (`ask_bot`, `message_bot`) is one compact notice row, "Messaged Owen" /+ "Message from Egan". Its text lives only in the bot conversation sheet it opens; follow-ups+ are normal bubbles. Consecutive exchanges with the same peer in the main chat (either+ direction, trace entries ignored) collapse into one "3 messages with Owen" row ([bot collaboration](bot-collaboration.md#notice-data)).- Clients never stream text into a bubble: the chat shows user messages, `final` agent entries,permission cards and notices (`isChat`). Nothing pops in and out while a turn runs.diff --cc host/src/tui/app/events.rsindex 7c7add57,c34140b5..040bdf9b--- a/host/src/tui/app/events.rs+++ b/host/src/tui/app/events.rs@@@ -50,18 -36,12 +50,19 @@@ impl Appfn on_event(&mut self, v: &Value) {match v["type"].as_str() {- Some("hello") if !v["usage"].is_null() => self.usage = v["usage"].clone(),+ Some("hello") => {+ self.snapshot_floors();+ if !v["usage"].is_null() {+ self.usage = v["usage"].clone();+ }+ }Some("usage") => self.usage = v["usage"].clone(),+ Some("screen") => self.screen = v["screen"].clone(),Some("bot") => self.upsert_bot(&v["bot"]),Some("entry") => {- if let Some((bot, e)) = Entry::parse(&v["entry"]) {+ if let Some((bot, e)) = Entry::parse(&v["entry"])+ && !self.outside_window(&bot, &e)+ {self.entries.entry(bot).or_default().insert(e.seq, e);}}diff --cc host/src/tui/manage/mod.rsindex 480a612b,cfd7b3e8..282cd1ec--- a/host/src/tui/manage/mod.rs+++ b/host/src/tui/manage/mod.rs@@@ -52,31 -48,6 +56,19 @@@ pub enum ReplyChanged,}- pub struct Fact {- pub id: String,- pub content: String,- pub profile: bool,- }-- pub struct MemorySheet {- pub bot: String,- pub facts: Option<Vec<Fact>>,- pub cursor: usize,- }-+/// A read-only conversation between `bot` and `peer`, scrolled from the bottom.+pub struct BotChatSheet {+ pub bot: String,+ pub peer: String,+ /// The host's history; `None` while it loads.+ pub fetched: Option<Vec<Entry>>,+ /// Lines up from the bottom.+ pub scroll: usize,+ /// Set by the last draw, for clamping the scroll and paging.+ pub max_scroll: Cell<usize>,+ pub page: Cell<usize>,+}+pub struct RoutineList {pub bot: String,pub items: Option<Vec<Value>>,diff --cc host/src/tui/manage/replies.rsindex 8c245873,e207be38..cb7d3ac1--- a/host/src/tui/manage/replies.rs+++ b/host/src/tui/manage/replies.rs@@@ -2,8 -2,8 +2,8 @@@use serde_json::{Value, json};-use super::super::app::{After, App, Overlay, Toggle};+use super::super::app::{After, App, Entry, Overlay, Toggle};- use super::{Fact, Reply, Shell, open_browser, s};+ use super::{MemoryMode, Reply, Shell, open_browser, s};impl App {pub(in crate::tui) fn on_sheet_reply(&mut self, r: Reply, res: Result<Value, String>) {@@@ -208,18 -239,11 +251,22 @@@m.error = Some(e);}}+ Reply::BotChat { bot, peer } => {+ for o in &mut self.overlays {+ if let Overlay::BotChat(c) = o+ && c.bot == *bot+ && c.peer == *peer+ {+ c.fetched.get_or_insert_with(Vec::new);+ }+ }+ self.flash(&e);+ }- Reply::Memory(_) | Reply::Routines(_) => {+ Reply::Memory(_)+ | Reply::MemorySaved(_)+ | Reply::MemoryDetail(_)+ | Reply::MemoryExport(_)+ | Reply::Routines(_) => {for o in &mut self.overlays {match o {Overlay::Memory(m) => {diff --cc host/src/tui/view/mod.rsindex cc9bc14e,69355aa3..e48938a2--- a/host/src/tui/view/mod.rs+++ b/host/src/tui/view/mod.rs@@@ -6,9 -6,9 +6,10 @@@// Drawing code reads best with x / y / w / t (theme) / r (rect).#![allow(clippy::many_single_char_names, clippy::similar_names)]+mod bot_chat;mod buffer;mod chat;+ mod computer_access;mod consent;mod forms;mod goto;diff --cc host/tests/team_e2e.rsindex 8cd6b4b5,8ad76842..b3fc8d9e--- a/host/tests/team_e2e.rs+++ b/host/tests/team_e2e.rs@@@ -113,9 -140,16 +140,19 @@@ async fn agent_uses_team_mcp_and_returnassert_eq!(requests.len(), 2);assert!(requests.iter().all(|e| e["data"]["status"] == "completed"));assert_eq!(requests[0]["data"]["delegationId"], requests[1]["data"]["delegationId"]);+ assert!(requests.iter().all(|e| e["data"]["botMessage"]["reply"] == "reply: PERMISSION review the changes"));+ let conversation = host.call("botConversation", json!({"botId": lead, "peerId": reviewer})).await;+ assert_eq!(conversation["entries"].as_array().unwrap().len(), 1);+ let recipient_history = host.call("history", json!({"botId": reviewer})).await;+ assert!(!recipient_history["entries"].as_array().unwrap().iter().any(|e| e["data"]["final"] == true));+ assert!(+ recipient_history["entries"]+ .as_array()+ .unwrap()+ .iter()+ .any(|e| { e["kind"] == "agent" && e["data"]["text"] == "reply: PERMISSION review the changes" }),+ "the reply remains available in the trace"+ );assert!(sync["bots"].as_array().unwrap().iter().all(|b| b["status"] == "idle"));}