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
fix(ios): show the bot's avatar on alerts for bots the app hasn't seen
leepokai8f78045eba94
diff --git a/apps/ios/NotificationService/NotificationService.swift b/apps/ios/NotificationService/NotificationService.swiftindex 8b56ea60..ce995917 100644--- a/apps/ios/NotificationService/NotificationService.swift+++ b/apps/ios/NotificationService/NotificationService.swift@@ -29,14 +29,15 @@ final class NotificationService: UNNotificationServiceExtension {}/// A communication notification shows the bot's face in place of the app icon; a group- /// message shows the group's face with the speaking member's on it. Without the bot in this- /// account's snapshot (or if the system refuses), the plain notification stays.+ /// message shows the group's face with the speaking member's on it. Faces come with the alert,+ /// or (from an older host) from this account's snapshot; without either, or if the system+ /// refuses, the plain notification stays.private static func fromBot(_ content: UNMutableNotificationContent, alert: PushAlert, botId: String?, computerId: String, ctx: String) -> UNNotificationContent {let store = SharedStore.activeContext- guard let botId, store.id == ctx else { return content }- let bots = store.bots.filter { $0.computerId == computerId }.map(\.bot)- guard let chat = bots.first(where: { $0.id == botId }) else { return content }- let members = bots.filter { chat.members.contains($0.id) }+ let snapshot = store.id == ctx ? store.bots.filter { $0.computerId == computerId }.map(\.bot) : []+ let bots = (alert.faces ?? []) + snapshot+ guard let botId, let chat = bots.first(where: { $0.id == botId }) else { return content }+ let members = chat.members.compactMap { id in bots.first { $0.id == id } }let conversation = "\(computerId)/\(chat.id)"let intent: INSendMessageIntentdiff --git a/docs/design/push-and-live-activity.md b/docs/design/push-and-live-activity.mdindex f37c01c5..f0d0de75 100644--- a/docs/design/push-and-live-activity.md+++ b/docs/design/push-and-live-activity.md@@ -35,7 +35,7 @@ flowchart LR- `relay/` holds the APNs signing key, opens opaque tickets and selects the APNs environment/topic. It has no notification decryption key.- `cloud/` handles accounts and the encrypted connection. It is a separate service from the APNs Worker; no new Durable Object or D1 table is needed for this change.- The notification extension decrypts the title, optional subtitle and body using the account context's shared Keychain key. This is local work and does not require a network fetch. [Apple notification content modification](https://developer.apple.com/documentation/usernotifications/modifying-content-in-newly-delivered-notifications)-- The extension then turns the alert into a communication notification (`INSendMessageIntent`) so the banner shows the bot's avatar instead of the app icon. A group alert carries the speaking member (`from`, sealed with the text) and shows as a group conversation: the group's avatar and name, with the member as sender. The avatar is drawn locally from the widget snapshot in the App Group (shape and color only); a bot missing from the active account's snapshot keeps the plain banner. Needs the app's Communication Notifications entitlement and `NSUserActivityTypes: INSendMessageIntent`. [Apple communication notifications](https://developer.apple.com/documentation/usernotifications/implementing-communication-notifications)+- The extension then turns the alert into a communication notification (`INSendMessageIntent`) so the banner shows the bot's avatar instead of the app icon. A group alert carries the speaking member (`from`, sealed with the text) and shows as a group conversation: the group's avatar and name, with the member as sender. The sealed alert carries `faces` (name, shape and color of the chat, its first two members and the speaker), so a bot created while the app was closed still gets its avatar; alerts from an older host fall back to the widget snapshot in the App Group, and a bot in neither keeps the plain banner. Needs the app's Communication Notifications entitlement and `NSUserActivityTypes: INSendMessageIntent`. [Apple communication notifications](https://developer.apple.com/documentation/usernotifications/implementing-communication-notifications)- ActivityKit renders both Lock Screen and Dynamic Island. A separate Dynamic Island Worker or event API is unnecessary. APNs updates use a dedicated activity token, not the normal notification token. [Apple ActivityKit push updates](https://developer.apple.com/documentation/ActivityKit/starting-and-updating-live-activities-with-activitykit-push-notifications)Remote activity content contains only `status`, empty `activity`, and `startedAt`. Foreground app updates may show the current step from the encrypted connection; a remote update clears that free text. The notification service extension is not an ActivityKit decryption stage. The UI therefore does not promise private task summaries in background Live Activities. Bot identity and its deep link are set locally when starting the activity.diff --git a/host/src/remote/push.rs b/host/src/remote/push.rsindex 56229372..3c403826 100644--- a/host/src/remote/push.rs+++ b/host/src/remote/push.rs@@ -88,6 +88,22 @@ fn purge_dead_tickets(hub: &Hub) {}}+/// The chat, its first two members (a group's avatar) and the speaker, just enough for the phone+/// to draw their faces even when its roster copy is older than the bot.+fn faces(hub: &Hub, bot: &BotConfig, from: Option<&str>) -> Vec<Value> {+ let face = |c: &BotConfig| {+ json!({"id": c.id, "kind": c.kind, "members": c.members, "name": c.name,+ "avatarColor": c.avatar_color, "avatarShape": c.avatar_shape})+ };+ let mut ids: Vec<&str> = bot.members.iter().take(2).map(String::as_str).collect();+ if let Some(from) = from.filter(|f| *f != bot.id && !ids.contains(f)) {+ ids.push(from);+ }+ std::iter::once(face(bot))+ .chain(ids.into_iter().filter_map(|id| hub.store.bot(id).ok().flatten()).map(|r| face(&r.config)))+ .collect()+}+/// `bot` is the chat the alert opens; `from` is the member bot speaking when that chat is a group.pub fn notify(hub: &Hub, bot: &BotConfig, from: Option<&str>, title: &str, body: &str, kind: AlertKind) {purge_dead_tickets(hub);@@ -114,6 +130,7 @@ pub fn notify(hub: &Hub, bot: &BotConfig, from: Option<&str>, title: &str, body:if let Some(from) = from.filter(|f| *f != bot.id) {secret["from"] = from.into();}+ secret["faces"] = faces(hub, bot, from).into();let secret = secret.to_string();let computer_id = hub.identity.computer_id();let mut notifications = Vec::new();diff --git a/kit/Sources/CodyncKit/Models/PushAlert.swift b/kit/Sources/CodyncKit/Models/PushAlert.swiftindex bc9d7e23..59088a8f 100644--- a/kit/Sources/CodyncKit/Models/PushAlert.swift+++ b/kit/Sources/CodyncKit/Models/PushAlert.swift@@ -7,4 +7,7 @@ public struct PushAlert: Decodable, Sendable {public let body: String/// The member bot speaking, when the alert is for a group chat.public let from: String?+ /// The chat, its first members and the speaker: names and avatars only, sent with the alert+ /// so a bot the phone hasn't seen yet still shows its face.+ public let faces: [Bot]?}