Skip to content

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 20:57
· 21 commits to main since this release

A person can take over the bot's screen from a link, on a phone or a computer, do one step, and hand it back. A second or third bot sets itself up as the first one does, and offers to set up a screen of its own. On Linux each command runs in a systemd scope of its own, so a command that runs out of memory no longer takes the gateway and every bot down with it, and what commands leave running stays across a restart.

Added

  • A desktop page: pots page desktop. It gives the bot a one-time link to a page of Pots' own, where one person sees the bot's whole screen and controls it, through the VNC server that shows that screen on its computer. Pots signs in to that server itself, so its password never reaches the browser, a link or a log. Nothing of the desktop shows before the person presses Start, so a link preview cannot open it, and only the browser that pressed Start first can use the link; that browser can open it again, after a reload or a switch to another app, until the link ends. An unopened link stops working after an hour, a started one after 15 minutes (--minutes, up to 60). It goes through the page server's public address, a Quick Tunnel or your own; with a Quick Tunnel the page and the command's note say that Cloudflare can see the screen and every key typed.
  • Made for phones. The picture fills the screen, and nothing else takes room from it. One group of buttons floats on it: the time left, keyboard, more, and Done; it can be dragged to any edge, stands upright on the left or right, and stays where it was put. The bot's words show in full when the picture comes, next to the buttons, for a few seconds, then fold into the first button; a tap on it shows them again, and a tap anywhere else folds them. The start screen shows long words in a calmer type with Start always in sight, and keeps the bot's line breaks: a line that starts with a number or a bullet reads as a list. When the VNC server can change its size, the bot's desktop takes the phone's shape while the person uses it (at least 500 pixels wide), and gets its own size back when the link ends, when the person's browser has been away for 20 seconds, and when Pots stops; after a crash, when the link ends. Pinching zooms the picture, not the page under it. The typing field sends each character as it is typed, also from an input method; with --input password it is a password field that password managers fill, and with --input code phones offer the code from a text message. --area starts a desktop that cannot change size zoomed in on the part that matters. More has Esc, Tab, Enter, arrows, select all, paste, a trackpad mode and the picture's size. On a computer the desktop takes the window's size, the keyboard types straight in, and ⌘ on a Mac becomes Ctrl. The page is in English, or in Chinese for a browser that asks for it.
  • The bot is woken once when the link ends: when the person presses Done or "I can't do it", with their note, and when the link expires, unopened or after Start. It is also woken once when Pots cannot reach the VNC server for the person, at Start or later, while their page tries again by itself. While the link is started, the person holds the bot's screen: the screen commands of every agent on that screen do not run, and say why. pots page list lists desktop links, and pots page unlink ends one at once, with no wake.
  • vnc in bot.json: the port of the VNC server on this computer and the file with its password, in the secrets folder: VNC_PASSWORD= as the password page writes it, or a password file as vncpasswd writes it. A new desktop-page skill says when to use the page, what the person sees, and how to set up a VNC server on Linux (X11, Wayland, or none), macOS and Windows. It also says how a bot sets up a screen of its own on a Linux computer whose desktop other bots use (a virtual desktop with its own D-Bus session bus and browser profile, as systemd user units, so it comes back after a restart), what to know when driving a Linux desktop (an input method can garble typed text; gnome-screenshot can give an old picture), and that a link goes to the person where they will open it.
  • pots bot new gives the new bot a first start, as pots init does. The bot says hello, checks the screen, connects the chat apps the person wants, as an app of its own, and asks which models to use for which work. Its first wake says who made it and where that person is. When a bot made it, from its own shell, the new bot learns that this bot passes messages both ways with pots chat until it joins a chat app, and that it can wake that bot with pots wake --bot when something cannot wait. When other bots already work on the computer, it learns that bots on one screen wait for each other. Where another bot already uses the screen, it asks the person whether to set up a screen of its own, and recommends it: on Linux a virtual desktop such as TigerVNC's Xvnc, which takes about 0.5–1 GB of memory with its own browser, and a one-time package install with sudo when none is installed yet; on macOS and Windows a second screen is not practical, so it tells them that the bots take turns. pots init says the same when it makes another bot.
  • pots bot new waits until the running gateway has started the new bot, so a pots chat --bot <id> right after finds it running.
  • "Add another bot" in the setup page for AI agents (docs/for-agents.md): the person asks a bot they have to make one, or their agent runs pots bot new; the new bot then sets itself up.

Changed

  • The pages skill and the prompt point to the desktop page, and the prompt's choices for a computer without a desktop say that the person signs in to a virtual desktop from a desktop page link, with no SSH tunnel or open port.
  • A wake from a page link says that the link was used or ended, since not every such wake is an answer now.
  • ws is a dependency of Pots, for the desktop page's WebSocket. It was installed with Pots before, through other packages.
  • Linux: each command runs in a systemd scope of its own. Where a systemd user manager runs (a desktop, or a server with lingering), every command of bash, screen and a routine runs in its own scope, in app-pots-<id>.slice, about 25 ms more per command. When memory runs out, systemd-oomd or the kernel stops the command that uses it, not the gateway with every bot in it: before, a heavy command, or the tabs of a browser a bot started, counted against the service, and systemd-oomd could kill the whole service with all its bots. What a command leaves running when it returns, such as a browser or a dev server, now keeps running when Pots restarts after an upgrade or a crash, and the bot's next wake lists it with its processes, so the bot decides when to stop it; a command Pots still waits on is stopped, with what it started. Stopping the service on purpose (systemctl --user stop pots, pots service uninstall) stops all of it. The prompt tells the bot these facts and the scopes' names. Elsewhere commands run as before.
  • Linux: the service has OOMPolicy=continue. When the kernel kills one process of the service for memory, such as an MCP server, the gateway goes on instead of restarting. pots service restart adds the line to a unit an older version wrote.
  • The prompt tells the bot how to make another bot: pots bot new --about …, then pass messages between it and the person until it has a chat app of its own, starting with who asked for it and where. It used to say only that a new folder with a bot.json is a new bot, so a bot made the folder itself, and the new bot got no first start. The screen facts now also say that bots that share a screen wait for each other, and that a screen per bot works best.
  • The bot confirms before an action that may cost money. Its actions still need no approval, with one exception that the prompt now gives: before an action, it makes sure whether the action may cost money, and if it may, it confirms with the person before it does it.
  • A token file for each bot. The Slack, Discord and Telegram skills, the pages skill and the prompt name the file for the bot, such as slack-<bot ID>.env, instead of one fixed slack.env, which another bot on the computer may already use: a second bot that followed the old text could write over the first one's tokens. Files that bots use now stay as they are. The Slack skill also says how to give the app an icon, which a manifest cannot do.
  • pots chat -m prints first what the bot sent since the last time, such as a new bot's hello, or what the bot sent after the last pots chat -m ended. Before, it printed only the answers to its own message.
  • A mistyped command gets the command it most likely means, for example pots bot new Ada for pots bots new Ada, instead of the whole help.
  • The bot knows that plain text is only one way to reply. Its prompt says that pages, and the channel's own buttons, menus, forms and tables, often read and answer better, so it chooses what fits each time, and that a reply that runs to several messages goes out one message after another, since messages sent at the same time can arrive out of order.

What's Changed

  • Run each command in a systemd scope of its own, and keep what commands leave across restarts by @Crokily in #48
  • Let a person take over the bot's screen from a link: the desktop page by @Crokily in #49
  • Guide a second or third bot: a first start for pots bot new, a token file per bot, a screen of its own by @Crokily in #50
  • Tell the bot that plain text is only one way to reply, and to send multi-part replies one after another by @Crokily in #43

Full Changelog: v0.7.2...v0.8.0