Skip to content

v0.9.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Dec 04:07
· 8 commits to main since this release

WhatsApp is a channel, as a preview, through Meta's WhatsApp Business Cloud API, by GotinhaAzul. Pots moves to pi 1.8.0, and at its first start each bot's bot.sqlite moves to a new schema that earlier versions of Pots cannot open: keep a copy if you may want to go back. A bare URL next to Chinese text becomes a correct link on Slack, Discord, Telegram and Teams. A send whose answer Slack or Teams lost is not posted twice. A wake the bot did not take is handed over again at once, not at the next start, and six small bugs are fixed. After a failed backfill, Slack and Discord no longer lose the messages they had not read yet. The README has a table of what works in each chat app.

Added

  • WhatsApp channel (a preview). The channel type whatsapp connects a business phone number through Meta's WhatsApp Business Cloud API, by GotinhaAzul. Each conversation is one person's DM with the number; there are no groups. Meta posts each message to a webhook on Pots' page server, so the computer needs a public address that stays the same (settings.json's publicUrl). Pots checks Meta's signature with the app secret and stores each message before it answers 200; a message Meta could not deliver while the gateway was down comes when Meta sends it again, for up to 7 days. The new whatsapp-channel skill says how to connect: the person makes a Meta app and gives the bot its access token, app secret, phone number ID and a verify token of the bot's choice, into a secrets file without the bot seeing them, and sets the callback address that the gateway prints.
    • Meta's terms limit what the bot may be there. Since 15 January 2026, the WhatsApp Business Solution Terms ("AI Providers") bar general-purpose AI assistants from the WhatsApp Business Platform when the assistant is the main thing the number offers, except for users in the European Economic Area, Brazil and Türkiye. A bot that answers a business's own customers or team about that business is fine; a general personal assistant is not, and Meta can suspend the number at once. The skill tells the bot to say this to the person before they make the Meta app.
    • What comes in. Text, pictures, documents, audio, video, stickers, locations, quote replies, reactions (WhatsApp keeps one per person and message, so a new one replaces the old one in the log too), presses of reply buttons as interaction events, a WhatsApp Flow's answers as a form event, and a send that WhatsApp could not deliver, as a system event on that message in the person's DM. Files are downloaded only from WhatsApp's own hosts. People are known by their business-scoped user ID (BSUID), also those who show a username instead of their phone number; a person who changes their number gets a new DM, and a notice in the old one says where. Messages for another number of the same Meta app are kept and answered from that number.
    • What goes out. Text up to 4096 characters, in WhatsApp's own formatting (headings become bold lines, a link its text and address; no tables), a reply that quotes the message it answers, reactions, and the typing sign, which also marks the person's message read. call reaches any Graph API endpoint of the number with the token kept inside, for files by a public address, up to 3 reply buttons, templates and the rest; messages sent this way are logged as the bot's own.
    • What WhatsApp does not let a bot do. No groups, edits, deletes or history. A business may write to a person only within 24 hours of their last message; after that only a pre-approved template, which Pots does not send by itself, and a send fails with an error that says so. Since 1 October 2026, the first 1,000 replies a month for each number are free and Meta charges for the rest. A crash at the moment of a send can send it twice, as on Telegram.
    • Tested against a fake Graph API with Meta's documented payloads, and live on Meta's test number with a person's WhatsApp: Meta's webhook check and signature, text, a picture and a PDF, reactions added, replaced and removed, quote replies, the typing sign, BSUIDs, a message sent while the gateway was down, and a failed send shown in the DM. Delivery of the bot's messages is not tested yet: Meta took them, but lets a new business send only once it is verified (error 131031).
  • What works in each chat app. The README has a new Channels section: one table of group chats, teams, bots hearing each other, buttons and forms, and missed messages for each app, and one row per app of what it does, what it cannot do and how it connects. docs/for-agents.md says which app to suggest. The telegram-channel skill says how to turn on Telegram's Bot-to-Bot Communication Mode, without which a bot gets no other bot's messages.

Changed

  • Bare URLs next to Chinese text become correct links. On Slack, a URL right after Chinese text or a full-width colon (链接:https://…) was no link, and on Slack, Discord, Telegram and Teams, Chinese punctuation right after a URL (https://…,看看) was taken into it. Now a bare http(s) URL that touches Chinese, Japanese or Korean text or full-width punctuation is ended at that punctuation, and each channel writes it the way its app reads it: <url> on Slack, Discord and Teams, and [url](url) on Telegram, only where the app would get it wrong. Letters stay in the URL (/wiki/東京), and code, links and the rest of the text are not changed. When the explicit links would push a message over its app's limit, it goes as it was. Feishu, Lark and WeChat need no change.
  • The prompt names WhatsApp, and says less about links. The channel types in the main agent's and children's prompt add "whatsapp (WhatsApp, a preview: one person's DM with the business number, inside WhatsApp's 24-hour window)", its limit of 4096 characters and the whatsapp-channel skill. The sentence "A bare URL that touches other text, such as Chinese characters or punctuation, often does not become a link or takes that text into the link: leave a space on both sides of it, or write text." becomes "Letters right after a bare URL, such as Chinese characters, go into the link on most apps: leave a space after it." The README and docs/for-agents.md list WhatsApp as a preview.
  • A feature that pi's modules no longer give says so. Pots uses some modules of pi that its packages do not export. When a pi upgrade moved one, prompt cache warming, ChatGPT images or the spans of model requests turned off without a word. Now the gateway's output says once per process, for example prompt cache warming is off: what it needs of pi was not found, with pi's version and the error. pots mcp takes what it needs from pi's public exports.
  • pi 1.8.0 (was 1.6.1). What the bot gains:
    • MCP servers of the new stateless revision. pi speaks MCP 2026-07-28 with a server that refuses initialize, and follows its changes of tools; "protocol": "2026-07-28" in mcp.json uses it with a server that speaks both. With "$schema": "https://pi.dev/schemas/mcp.schema.json" in mcp.json, an editor checks and completes it.
    • Long commands on Windows. A bash command longer than about 8 KB, or of words on separate lines, ran only in part under Git Bash, with exit code 0. pi-durable now gives Git Bash the command in an environment variable.
    • More failures are tried again: Google's MALFORMED_RESPONSE, Amazon Bedrock's "Too many tokens" and a gateway's upstream SSE stream failed. OpenCode Go's limit on the size of a request now compacts the conversation instead.
    • Models. With the ChatGPT login, a long conversation no longer sends its whole history again at each turn. Gemini 3 and later on hosts that give URL-safe thought signatures, Claude's thinking through OpenRouter, DeepSeek's prompt updates and Groq's tool calls without an optional argument no longer fail. New judges: jev-1.14, gemini-decision-1 and gpt-6-luna-decision on OpenCode Go and Zen, and Baseten's decision models. Radius's image models, and OpenRouter's that answer only on /images, make images in codemode.
    • A second sign-in while the gateway runs. A second ChatGPT, Claude or Radius sign-in on the login page could fail with "State mismatch." and wait until it timed out.
    • Images. A picture whose bytes are of another type than it says (a BMP named WebP) is converted before it goes to the model; an animated PNG goes as its first frame.
    • On Windows, an MCP server's command with its arguments in it ("npx -y foo") now fails, as on Linux: put the arguments in args (cross-spawn 7.1.2, a security fix).
  • The send tool says where a send can still post twice. Its description said "Sent exactly once, also across restarts". It now says "Sent once, also across restarts; on some channels, a crash or a lost connection at the moment of the send can post it twice." pots send --id's help says the same. The README and docs/for-agents.md list where: never on Slack; on Telegram, Teams, WeChat and WhatsApp; on Discord when the bot is back more than a few minutes later; on Feishu and Lark more than an hour later.
  • WeChat: the person writes once after binding. On 2026-12-04, a greeting a bot sent right after the binding got a message ID from WeChat and never arrived. The wechat-channel skill now tells the bot to ask the person to write to it once in WeChat after they bind.
  • For contributors: AGENTS.md has a rule that what pi-durable keeps (conversations, submissions, tasks, children) is stored only there, not copied into Pots' own tables. npm run check also finds unused code: knip, and TypeScript's noUnusedLocals and noUnusedParameters.
  • At the upgrade, the prompts of the main agent and of children change, so each bot's prompt cache is written once more. At its first start, pi-durable moves each bot.sqlite to its schema version 3 (0.8 s for a 1 GB file); an earlier Pots then refuses to open it ("SQLite schema version 3 is newer than supported version 2"), so going back needs a copy of bot.sqlite from before the upgrade. A bot whose model pi no longer knows (such as opencode/kimi-k2.7-code, which pi 1.8.0 removed) does not start, and its bot.sqlite stays as it was until its model is changed. pi's code mode sandbox changed: a codemode script that runs while the gateway restarts does not go on after it, and the agent gets "The script cannot resume". One new dependency, @earendil-works/pi-images, comes with pi-durable.

Fixed

  • One send posts once on Slack and Teams, also when the platform's answer is lost. When Slack took a post but its answer timed out or the connection broke, the Slack SDK posted it again, and the message showed twice; Teams did the same after a timeout and some 5xx answers. Now, on Slack, a post whose answer did not come is not tried again blindly: the channel first looks for it by its send ID, and posts again only when the look worked and found nothing. On Teams, a post that went out and got no answer, a closed connection or a 5xx answer fails with "the message may have been sent, so it was not sent again"; too many requests and a connection never made are still tried again.
  • A wake the bot did not take is handed over again at once. When the hand-over of a wake to the bot failed, the wake waited until the next gateway start, and later wakes of the same place went first: a DM could stay unanswered until a restart. Now it is handed over again after 1, 2, 4, 8 and 16 seconds with the same ID, so the bot never gets it twice, and the place's next wake waits for it. spec/Inbox.tla checks it.
  • Slack and Discord keep where an unfinished backfill began. They kept it only in memory: when a place's backfill failed, or the gateway stopped during one, the next start began after the place's newest logged message, and a live message logged meanwhile moved that past the messages not yet read, which were lost without a sign. Now they keep it in the channel's state file, as Teams and Feishu do, until the place was read to the end.
  • A Telegram button press gets the time it was received. Telegram gives a press no time, and a press replayed after a crash got the time of the replay.
  • Six small bugs from a code review.
    • A bot.json whose change failed part way is applied again, also when the old file is put back; before, that did nothing until a restart.
    • After a crash, a gateway.pid whose number another program now uses no longer counts as a running gateway: pots start refused, and on Windows pots service stop could stop that program. The process must run pots start.
    • A send ID that comes again before its send finished sends its first text to its first place, not the new caller's text to the old place.
    • The columns that earlier versions lack are added in one transaction, so two processes that open an old bot.sqlite at once no longer fail with "duplicate column".
    • The files with which the tests make a gateway crash or wait, such as crash-after-send in a bot folder, work only in the tests' gateways; before, one could stop a real gateway.
    • When two password pages write the same secrets file, a crash no longer opens the first one's link again.

What's Changed

  • README: what works in each chat app by @Crokily in #122
  • AGENTS.md: state that pi-durable keeps is stored only there by @Crokily in #123
  • Say once when a feature is off because pi moved a module it does not export by @Crokily in #124
  • Bare URLs next to Chinese text become correct links by @Crokily in #126
  • A wake the bot did not take is handed over again, with its ID, before the place's next one by @Crokily in #127
  • One send posts once on Slack and Teams, also when the platform's answer is lost by @Crokily in #125
  • WhatsApp channel, through Meta's WhatsApp Business Cloud API by @GotinhaAzul in #119
  • Fix six small bugs: bot.json reapply, stale gateway.pid, send ID reuse, migrations, crash files, claim lines by @Crokily in #128
  • Say where a send can still post twice by @Crokily in #132
  • wechat-channel skill: the person writes first after binding by @Crokily in #134
  • Slack and Discord keep where an unfinished backfill began; a Telegram button press gets the time it was received by @Crokily in #129
  • pi 1.8.0 by @Crokily in #133
  • npm run check finds unused code: knip, noUnusedLocals and noUnusedParameters by @Crokily in #136

Full Changelog: v0.8.19...v0.9.0