pi-durable-bot 0.8.13 → 0.8.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/README.md +13 -3
- package/dist/agent/agent.js +17 -3
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/judge.js +33 -8
- package/dist/agent/judge.js.map +1 -1
- package/dist/agent/models.js +93 -3
- package/dist/agent/models.js.map +1 -1
- package/dist/agent/tool-environment.js +26 -0
- package/dist/agent/tool-environment.js.map +1 -0
- package/dist/bot/prompt.js +11 -7
- package/dist/bot/prompt.js.map +1 -1
- package/dist/channels/discord/index.js +15 -6
- package/dist/channels/discord/index.js.map +1 -1
- package/dist/channels/slack/index.js +46 -15
- package/dist/channels/slack/index.js.map +1 -1
- package/dist/channels/slack/sdk.js +20 -0
- package/dist/channels/slack/sdk.js.map +1 -1
- package/dist/channels/teams/index.js +46 -12
- package/dist/channels/teams/index.js.map +1 -1
- package/dist/channels/telegram/index.js +34 -18
- package/dist/channels/telegram/index.js.map +1 -1
- package/dist/channels/test/index.js +10 -2
- package/dist/channels/test/index.js.map +1 -1
- package/dist/cli/ai.js +28 -9
- package/dist/cli/ai.js.map +1 -1
- package/dist/core/channel.js +11 -1
- package/dist/core/channel.js.map +1 -1
- package/dist/core/secrets.js +4 -0
- package/dist/core/secrets.js.map +1 -1
- package/dist/core/time.js +9 -0
- package/dist/core/time.js.map +1 -1
- package/dist/gateway/gateway.js +2 -1
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/judge-input.js +164 -0
- package/dist/gateway/judge-input.js.map +1 -0
- package/dist/gateway/log.js +89 -22
- package/dist/gateway/log.js.map +1 -1
- package/dist/gateway/outbox.js +23 -3
- package/dist/gateway/outbox.js.map +1 -1
- package/dist/gateway/waker.js +73 -55
- package/dist/gateway/waker.js.map +1 -1
- package/dist/main.js +6 -1
- package/dist/main.js.map +1 -1
- package/dist/pages/login.js +2 -0
- package/dist/pages/login.js.map +1 -1
- package/dist/pages/settings.js +9 -1
- package/dist/pages/settings.js.map +1 -1
- package/docs/for-agents.md +4 -2
- package/package.json +6 -1
package/docs/for-agents.md
CHANGED
|
@@ -13,7 +13,7 @@ Pots (the npm package `pi-durable-bot`, the command `pots`) is an open-source AI
|
|
|
13
13
|
- **It works on its own computer.** It has a shell, files, the internet and, when there is one, the screen, mouse and keyboard. It writes and runs the code it needs instead of waiting for someone to add a plugin. That covers research, reports, watching a web page, filling forms, and code.
|
|
14
14
|
- **It remembers.** One long conversation runs across every channel. The bot saves what is worth keeping (preferences, rules, facts about people and the work, decisions) to its memory by itself, as Claude Code's automatic memory does: plain markdown files with an index, in its folder, and one more memory that the bots of the computer share about the person. People change that memory by talking to it. When the context gets full, the bot writes notes for itself and "turns the page"; its memory comes along. Its persona and responsibilities are plain files it edits itself.
|
|
15
15
|
- **It survives crashes.** Every step is journaled ([pi-durable](https://github.com/earendil-works/pi)). Every incoming event is on disk before it is acknowledged. Every outgoing message has a send ID, so the bot never sends the same message twice (on Telegram and Teams, a crash at the moment of a send can repeat it).
|
|
16
|
-
- **It is open and yours.** It is MIT-licensed and runs on the person's own machine. It can use a subscription they already pay for (ChatGPT, Claude, GitHub Copilot, Grok, Kimi and more), an API key from any of 40+ providers, or a local model (Ollama, LM Studio, llama.cpp). The data stays on their machine, in each bot's folder. One machine can run several bots, each with its own name, persona and memory.
|
|
16
|
+
- **It is open and yours.** It is MIT-licensed and runs on the person's own machine. It can use a subscription they already pay for (ChatGPT, Claude, Google AI, GitHub Copilot, Grok, Kimi and more), an API key from any of 40+ providers, or a local model (Ollama, LM Studio, llama.cpp). The data stays on their machine, in each bot's folder. One machine can run several bots, each with its own name, persona and memory.
|
|
17
17
|
|
|
18
18
|
Slack, Discord and Telegram work today, and so does the person's own terminal (`pots chat`). Microsoft Teams works as a preview: tested with fakes and Microsoft 365 Agents Playground, not yet in a real organisation. It needs a work or school Microsoft 365 account, and an admin may have to allow custom apps first; the bot connects it with Microsoft's Teams CLI, and the person only signs in with a code on their phone and adds the app in Teams. Email is next. The [README](../README.md) has the full picture, a demo video and diagrams.
|
|
19
19
|
|
|
@@ -48,12 +48,14 @@ Do the setup yourself, in your own shell. Only one step is your person's: signin
|
|
|
48
48
|
3. **Ask your person**, in your chat, only what `--list` cannot answer:
|
|
49
49
|
- the bot's name;
|
|
50
50
|
- in one sentence, what it is for (optional; the bot asks them later if they skip it);
|
|
51
|
-
- which model the bot thinks with, when the list has nothing they want. It is the bot's brain: it reads, decides and does the work with it. Usually it is the subscription they already pay for and use every day (ChatGPT, Claude, GitHub Copilot, Grok, Kimi and more); it can also be an API key from a provider, or a local model server (Ollama, LM Studio, llama.cpp, vLLM);
|
|
51
|
+
- which model the bot thinks with, when the list has nothing they want. It is the bot's brain: it reads, decides and does the work with it. Usually it is the subscription they already pay for and use every day (ChatGPT, Claude, Google AI, GitHub Copilot, Grok, Kimi and more); it can also be an API key from a provider, or a local model server (Ollama, LM Studio, llama.cpp, vLLM);
|
|
52
52
|
- who decides whether a group message that does not mention the bot wakes it: the bot itself (the default: every such message wakes it, and its own model reads it), or a judge, a fast model that reads each such message first and wakes the bot only for messages about its work. Jev, from TypeSafe, is one; it needs their TypeSafe API key. Do not ask when the bot will not be in group chats: use `--judge off`.
|
|
53
53
|
4. **If something they chose is not listed, they sign in with `pots login`, once, for all of it.** Do not just give them the command. First tell them in your chat what they will add and why: the subscription they use every day, for the bot to think with, and a judge such as Jev, when the bot will be in group chats. The menu of `pots login` has "Sign in with a subscription", "Use an API key" and "Done".
|
|
54
54
|
|
|
55
55
|
`pots login` takes each key with hidden input and does not take an empty one. It tries each model and judge, says that it is ready or why not, and comes back to its menu, so both go in one run; "Done" lists what pi can use. On a computer without a browser, such as a server over SSH, a sign-in prints a link and asks for the code the page shows (choose "Copy code login (headless)" when it is offered). Then run `pots login --list` again.
|
|
56
56
|
|
|
57
|
+
A Google AI Pro or Ultra subscription is in the subscription menu too, as "Google AI Pro or Ultra: Gemini and more through Antigravity". Pots does not bundle it. Choosing it adds pi-agy, a pi extension, to `"extensions"` in `~/.pots/settings.json`, installs Google's Antigravity CLI (`agy`) with Google's own install script when it is missing (after asking), and signs in with Antigravity's own sign-in: a link, then the code the page shows, which also works over SSH. Antigravity's AI credits must stay off, as they are by default: with them on, Antigravity can spend money when the subscription's quota runs out, and pi-agy refuses to run. Afterwards, restart the gateway with `pots service restart`; `pots login --list` then shows the account's models, such as `agy/gemini-4-neon`. Tell your person three things: each request of the bot runs as a turn of Google's own agent, so it is slower than a model alone; every bot and child on the account shares one quota; and Google receives what the bot sees, so it is not for a bot that serves a team.
|
|
58
|
+
|
|
57
59
|
When your person will not use a terminal on that computer, run `pots login --link` yourself and give them the link it prints. They open it on their phone or another computer, press Start, and sign in there: with a subscription (the page puts a device code or a copy code first), or with an API key, also TypeSafe's. They can add several, then press Done. It needs no bot yet. The command serves the page until they press Done, or 15 minutes after Start (an hour unopened), prints each login and then what pi can use, so wait for it to end. Without a `publicUrl` in `~/.pots/settings.json`, the link goes through a Cloudflare Quick Tunnel and the command says so: Cloudflare can see what is typed on the page. A device code is safe there. Tell them that a copy code or a pasted address, and an API key typed there, are not private: with them Cloudflare could finish the sign-in or use the key.
|
|
58
60
|
5. **Make the bot:**
|
|
59
61
|
```sh
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-durable-bot",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.15",
|
|
4
4
|
"description": "Open-source AI coworkers that read every channel, decide what matters, and act on their own computer. Self-hosted, any model.",
|
|
5
5
|
"license": "MIT AND MPL-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -75,6 +75,11 @@
|
|
|
75
75
|
"chat": "4.45.0",
|
|
76
76
|
"discord.js": "14.28.1",
|
|
77
77
|
"effect": "4.1.5",
|
|
78
|
+
"remark-cjk-friendly": "2.3.4",
|
|
79
|
+
"remark-gfm": "4.0.1",
|
|
80
|
+
"remark-parse": "11.0.0",
|
|
81
|
+
"remark-stringify": "11.0.0",
|
|
82
|
+
"unified": "11.0.5",
|
|
78
83
|
"ws": "8.23.0"
|
|
79
84
|
},
|
|
80
85
|
"devDependencies": {
|