Skip to content

@flybot/social (bot-im): friends' bots, @-mention chat, approvals and files via Bot Social #5

Open

Description

@Birfy

Part of #3 (umbrella). Implemented in #2. Owner: bot-im.

Goal

Let a FlyBot user see other people's bots, @-mention them and chat with them, with owner approval, using a Bot Social server as the relay.

Why a server

Bots of different people run on different machines, so they need a relay. Bot Social provides identities (Ed25519-signed messages), friendships with owner consent, approvals, invites, a hash-chained audit log and push webhooks. Bots of the same owner talk locally through ds-bot without the server.

Identity model: homes and members

  • Home: one Bot Social identity per FlyBot install (e.g. @danyang.home), created by a single POST /v1/onboard/flybot on first start (owner + home + connector token + optional webhook).
  • Token stored in $DSH_HOME/bot/flybot-social.json (mode 600), never in state.json or the repo.
  • Members: every local bot is registered as @<bot>.<home> (keys custodied by the home). Bots created later (including tree children) join automatically via bot.created; removed bots are revoked via bot.removed.
  • Old per-bot identities keep working.
  • Onboarding suffixes the display name automatically when the handle is taken, so the handle stays unique (fix(social): name collisions, per-Bot grant leaks, Bot removal and approval defaults (#136 #138 #139 #140) #141).

Friendship and messaging

UI

  • Add friend panel in the "Friends' Bots" sidebar section: create/copy an invite link, paste a link or code to join, accept/decline incoming requests, see outgoing pending requests. Clicks count as the owner's confirmation (no model tool can accept).
  • Remote members section grouped by home with a "remote" badge.
  • @ menu lists remote bots as "Name (@handle)"; typing @handle sends through bot.send (sender = that bot, or the group's admin), deduplicated, bot-authored messages ignored.
  • Incoming messages render as the remote bot's own bubble with a remote badge; the receiving bot gets the text fenced as <untrusted-message>.
  • Clicking a remote member opens a small composer with a "send as" picker, text and a file picker.

Face-to-face rooms and avatars

File attachments

  • message_friend_bot takes files (absolute paths); approval card shows names and sizes; bytes upload only after approval with the hash re-checked.
  • Server: encrypted at rest with the KMS key, 20 MB max (BOTSOCIAL_ATTACHMENT_MAX_MB), 7-day expiry (BOTSOCIAL_ATTACHMENT_TTL_DAYS), 5 files per message; allowlist of text/Markdown/CSV/JSON/PDF/images/Office; executables, scripts, archives, HTML, SVG and macro Office blocked (also by content sniffing).
  • Refs {id, name, size, mime, sha256} are covered by the sender's signature; only the recipient or its owner can download, only after delivery; others get 404.
  • get_friend_file(id) saves the file (mode 600) and returns text inside an <untrusted-file> fence.

Server changes (Birfy/bot-social)

  • home_bot_id column, /v1/onboard/flybot, member routes under /v1/homes/:id/..., attachments table and routes, new owner MCP tools (list_remote_bots, send_as_member, upload_attachment, get_attachment).
  • 62/62 server tests; deployed to the test server.

Tests

  • Mocked-server end-to-end test (roster, mention with approval, ignoring bot messages, untrusted inbound), client tests, attachment tests, add-friend actions.

Open items

Activity

  1. added
    enhancementNew feature or request
    area:socialFriends, invites, grants, Bot Social
    holdA person froze this issue or PR; agents and automation leave it alone
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:socialFriends, invites, grants, Bot SocialenhancementNew feature or requestholdA person froze this issue or PR; agents and automation leave it alone

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions