Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Every request to OpenRouter tells it to use only model providers that do not col
- **No swap or core dumps.** The included systemd unit and Docker command forbid both, so history cannot reach disk that way.
- **Memory is freed, not wiped.** An expired message is dropped and Go's garbage collector reclaims its memory, but the bytes may linger until overwritten, and someone with root access to the host could read them from the running process.
- **What features save, on disk.** Features save state only through the core, one file each in the state directory (`/var/lib/private/signalbot`), so everything the bot keeps on disk is listed here.
- **Schedules are kept on disk.** Each `/schedule` saves, in `schedules.json` in the state directory (`/var/lib/private/signalbot`), the scheduling user's ID, the group's ID and its name when scheduled (if it's for a group), the time and repeat, and the text to post, until the user deletes it with `/schedule del`. The file also keeps, for each user who has scheduled, the last schedule number they were given, so numbers are never reused; it stays after their schedules are deleted. A one-off dropped because the bot was down is deleted, and its user is told in their DM, with the first 80 characters of its text. Besides today's spending and, with an addon, `mcp.json` (both below), nothing else the bot keeps is written to disk; an addon's own `addons/<name>` directory is the addon's (below).
- **Schedules are kept on disk.** Each `/schedule` saves, in `schedules.json` in the state directory (`/var/lib/private/signalbot`), the scheduling user's ID, the group's ID and its name when scheduled (if it's for a group), the time and repeat, and the text to post, until the user deletes it with `/schedule del`. The file also keeps, for each user who has scheduled, the last schedule number they were given, so numbers are never reused; it stays after their schedules are deleted. A one-off dropped because the bot was down is deleted, and its user is told in their DM, with the first 80 characters of its text. Besides today's spending, with an addon `mcp.json` (both below), and a Telegram DM's reply keyboard an addon set (`keyboards.json`: its labels and commands, under a SHA-256 hash of the chat, which could be matched by trying every ID, until another post takes it away), nothing else the bot keeps is written to disk; an addon's own `addons/<name>` directory is the addon's (below).
- **Today's spending, on disk.** With a daily budget (`DAILY_BUDGET`, on by default), `budget.json` in the state directory holds today's date and, for each chat that used the model today, what it spent and whether it was told it reached the limit. Chats are stored under a SHA-256 hash of their ID, so the file holds no phone numbers, account IDs or group IDs as such. A hash of a phone number could be matched by trying every number, so treat the file as you would the schedules. Each day's file replaces the last.
- **Addon state, on disk.** With an MCP server configured as an addon, `mcp.json` in the state directory holds what is listed under [Addons](#addons). Without one, the file is never written.
- **Recent attachments, in memory only.** So that "@bot summarise this" in reply to someone's file can fetch the original, the bot remembers, for each group message and each DM from an allowed sender with attachments, the attachments' IDs, file names, types and sizes, never their content, under the chat, sender and time. Each is forgotten after a day, or sooner when 2,000 newer messages are remembered, and a restart clears them all. On Signal the bot also keeps a copy of each picture it sent (a chart, a picture it made), content and all, for at most a day and 32 MB in all, since signal-cli keeps none: a reply quoting it then shows the model the picture rather than Signal's small thumbnail. A delete of that message from the account's linked device drops it, and a restart clears them all.
Expand Down Expand Up @@ -89,8 +89,9 @@ An addon is a program the bot runs on its own machine, as an [MCP server](docs/F
- `watch` sends the messages its watch matches (GeoGuess: map links and coordinates during a round), with the same; nothing else said in the chat. A pattern that would match ordinary chat is refused, so there is no feed of everything. A reply watch sends replies to the addon's own messages that ask the bot, such as answers to a quiz, whatever they say;
- `names` adds each sender's display name. Without it, the addon writes a pseudonym where a name goes, and the bot puts in the name it last saw that person use in that chat, kept in memory for a day;
- `global_ids` gives a person the same pseudonym in every chat, so the addon can link them across groups;
- `post` and `react` send nothing: they let it post and react, only in a chat where it was used in the last day;
- `model` lets it ask the bot's model, with the bot's key: the addon's prompts, and whatever it put in them from the chat, go to the model provider, as chat with the bot does, and what they cost counts toward that chat's `DAILY_BUDGET`. The bot logs only each request's outcome, time, size and cost, never the prompt or the answer.
- `post` and `react` send nothing: they let it post and react, only in a chat where it was used in the last day, or with `announce` any chat that used one of its commands, until that chat leaves `chats`;
- a press of a button under one of its posts (Telegram) sends the button's data and who pressed it, as a pseudonym, as a command does;
- `model` lets it ask the bot's model, with the bot's key: the addon's prompts, and whatever it put in them from the chat, go to the model provider, as chat with the bot does, and what they cost counts toward that chat's `DAILY_BUDGET`; only for a chat that used the addon in the last day, never one `announce` alone keeps open. The bot logs only each request's outcome, time, size and cost, never the prompt or the answer.
- **What the addon keeps** is its own, outside what this page lists for the bot, in the directory its `…_STATE_DIR` names (GeoGuess: `GEO_STATE_DIR`): by default `addons/<server name>` in the state directory (`/var/lib/private/signalbot/addons/geo`), which the addon creates and writes, never the bot. Read its own documentation.
- **Deletes and edits are not passed on.** A message an addon took stays with the addon if its sender later deletes it for everyone. An edit of one is passed on, as a new version.
- **Taken messages are kept nowhere by the bot:** not in history, not as context (so `GROUP_CONTEXT=false` makes no difference to them), not in the log. The addon still gets them.
Expand All @@ -100,11 +101,12 @@ An addon is a program the bot runs on its own machine, as an [MCP server](docs/F
| Item | Kept for |
|---|---|
| The pseudonym secret | Until `mcp.json` is deleted, which gives everyone new pseudonyms |
| Chats an addon may post in: the chat's pseudonym and its real ID | 24 hours after the addon was last used there |
| Chats an addon may post in: the chat's pseudonym and its real ID | 24 hours after the addon was last used there; with `announce`, until the chat leaves `chats` or `announce` is turned off |
| Live watches: the chat's pseudonym, the pattern, and the times of the bot's messages with the command's pictures, and for a reply watch of the addon's messages | Until the watch ends, at most `watch_max` (24 hours at most) |
| Messages a watch took: the chat's ID, the sender's pseudonym and the message's time, never its text | 48 hours, so a later edit is taken too |
| How far the bot has read each addon's outbox, and the last 1,000 outbox entries' IDs | Replaced on each save; dropped once the server is no longer an addon |
| An addon's last 256 posts, for a later post to reply to: the post's ID, the chat's pseudonym and the time (on Telegram, the ID) of the bot's message, never its text | 24 hours |
| An addon's last 256 posts, for a later post to reply to, react to or edit: the post's ID, the chat's pseudonym and the time (on Telegram, the ID) of the bot's message, never its text | 24 hours |
| An addon's last 1,000 posts with buttons, the same, the tool a press calls, and in a forum topic the group's and the topic's real IDs | 30 days |

Refs to messages (for reactions, a day), display names (a day) and posts waiting to go out are kept in memory only.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A small, [privacy-conscious](PRIVACY.md) chat bot for Signal, through a running
## Features

- Responds to @mentions, replies to its messages, and DMs from whitelisted contacts
- Tools: web search, line and pie charts, [pictures](docs/FILES_LINKS_TOOLS_MCP.md#images) (drawings, art, diagrams) with GPT Image 2, and your own [MCP connectors](docs/FILES_LINKS_TOOLS_MCP.md#mcp-connectors)
- Tools: web search, line charts (by day, or by the hour within a day) and pie charts, [pictures](docs/FILES_LINKS_TOOLS_MCP.md#images) (drawings, art, diagrams) with GPT Image 2, and your own [MCP connectors](docs/FILES_LINKS_TOOLS_MCP.md#mcp-connectors)
- [`/schedule`](docs/SCHEDULING.md) a reminder or command, once or repeating
- [Custom MCP servers](docs/FILES_LINKS_TOOLS_MCP.md#addons) such as [GeoGuess](https://github.com/robdevops/GeoGuess), [TriviaQuiz](https://github.com/robdevops/TriviaQuiz), [SongGuess](https://github.com/robdevops/SongGuess), or roll your own
- Understands [files](docs/FILES_LINKS_TOOLS_MCP.md#files) (PDFs, text and code, Word, Excel and PowerPoint) and the [pages you link to](docs/FILES_LINKS_TOOLS_MCP.md#links), and if the model supports it, images, stickers, voice notes and other audio
Expand Down
Loading
Loading