🤖 Open-source, local-first alternative to Grok Bot, OpenAI dots and Claude Duet. Your own AI bots on any model: GPT, Claude, Gemini, Grok, DeepSeek, Kimi, GLM and 70+ more through one Modelflare key. Reach them in the app, WeChat or Feishu; they remember you, work in the background, run commands and use your computer. Pay per use.
Python ai-agentai-assistantchatbotclaudecomputer-usedeepseekdesktop-appdshelectronfeishugeminigptgrokllmlocal-firstmodelflaremulti-modelopenai-compatiblepersonal-ai-agentwechat
docs: 文档改成全局账号的说法
dyk9898062ce7e815
diff --git a/README.md b/README.mdindex a964355..2079e61 100644--- a/README.md+++ b/README.md@@ -190,7 +190,7 @@ npm start # 本地管理界面:http://127.0.0.1:3600/- **每个机器人三档权限。** *只读*、*工作区*(默认:只能写自己的文件夹,越界先问你)、*完全权限*(不进沙箱;递归删除仍会先问)。- **审批卡片,没有意外。** 越界的操作会停下来,等你回答。- **重启了也会告诉你。** 应用退出或崩溃时还没处理完的消息,下次启动会在原对话里说一声,请你重新发送,不会自动重做。-- **斜杠命令**,如 `/model`、`/reset`,在应用和各个聊天渠道里都能用。+- **斜杠命令**,如 `/model`、`/reset`,在应用和各个聊天渠道里都能用;在聊天渠道里发 `/bot` 可以换机器人。<p align="center"><img src="docs/assets/features/agent-files.gif" alt="机器人整理一个杂乱的文件夹:先列出文件、给出方案,移动工作区之外的文件前弹出审批卡片" width="100%">@@ -320,6 +320,7 @@ Modelflare 会保留请求日志;保留什么、保留多久,见它的[信| 智能体运行时 | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(MIT),作为独立进程运行 || 电脑操作 | [Cua Driver](https://github.com/trycua/cua),随应用打包 || 渠道 | 飞书(长连接 + 流式卡片)、微信(iLink)、Telegram(长轮询)、Slack(Socket Mode)、Discord(Gateway) |+| 数据账号 | Notion(REST API、官方远程 MCP)、飞书消息(用户身份,只读) || 测试与 CI | Vitest、GitHub Actions |# 📝 路线图diff --git a/README_en.md b/README_en.mdindex 86c6e9d..e497c23 100644--- a/README_en.md+++ b/README_en.md@@ -190,7 +190,7 @@ A bot is more than a chat window: it has a persona, a default model, its own wor- **Three permission presets per bot.** *Read-only*, *Workspace* (the default: write inside the bot's own folder, ask before anything outside) and *Full access* (no sandbox; recursive deletes still ask first).- **Approval cards, not surprises.** Out-of-bounds actions stop and wait for your answer.- **Told after a restart.** A message still in progress when the app quit or crashed is flagged in its conversation at the next start, so you can send it again; nothing is redone on its own.-- **Slash commands** such as `/model` and `/reset` work in the app and in every chat channel.+- **Slash commands** such as `/model` and `/reset` work in the app and in every chat channel. In a chat channel, `/bot` switches to another bot.<p align="center"><img src="docs/assets/features/agent-files.gif" alt="A bot tidies a messy folder: it lists the files, proposes a plan, and an approval card asks before moving files outside its workspace" width="100%">@@ -320,6 +320,7 @@ Modelflare keeps request logs; its [Trust Center](https://modelflare.dev/trust?u| Agent runtime | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (MIT), run as a separate process || Computer use | [Cua Driver](https://github.com/trycua/cua), bundled || Channels | Feishu (long connection + streaming cards), WeChat (iLink), Telegram (long polling), Slack (Socket Mode), Discord (Gateway) |+| Data accounts | Notion (REST API, official remote MCP), Feishu messages (user identity, read-only) || Tests and CI | Vitest, GitHub Actions |# 📝 Roadmapdiff --git a/docs/development.md b/docs/development.mdindex 3baa9df..5944571 100644--- a/docs/development.md+++ b/docs/development.md@@ -122,7 +122,7 @@ docker exec amb cat /data/ui-token # 打开 http://<主机>:3600/?token=<令## 界面- 侧栏:机器人列表(头像 + 名称 + 最近一条消息),+ 新建,右键 重命名 / 删除;左下角账户按钮打开设置(`⌘/Ctrl+,`)。-- 对话页:顶部悬浮的机器人名称胶囊打开信息面板(`⌘/Ctrl+⇧+I`:渠道、使用请求、待审批、任务和规则、记忆、最近会话,⚙ 进机器人设置);回复流式显示(Markdown、代码块一键复制),可随时停止(`Esc`);审批与提问以卡片形式出现在对话里;向上翻阅时不会被拉回底部。+- 对话页:顶部悬浮的机器人名称胶囊打开信息面板(`⌘/Ctrl+⇧+I`:默认由它回复的渠道账号、待审批、任务和规则、记忆、最近会话,⚙ 进机器人设置);回复流式显示(Markdown、代码块一键复制),可随时停止(`Esc`);审批与提问以卡片形式出现在对话里;向上翻阅时不会被拉回底部。- 命令面板 `⌘/Ctrl+K`;外观(跟随系统 / 浅色 / 深色)在 设置 → 常规。- 语言:简体中文 / English,设置 → 常规 → 语言(引导页右上角、命令面板里也能切),默认跟随系统(系统语言不是中文也不是英文时用英文)。偏好存在 config.json 的 `ui.lang`,托盘菜单、服务端报错和状态文字、机器人发到微信 / 飞书的系统消息(`/help`、审批提示等)都跟着它;命令行 / Docker 下"跟随系统"看 `AMB_LANG`,再看 `LC_ALL` / `LANG`,都没有时用简体中文。日志、发给模型的提示词和用户自己起的机器人名不翻译。- 界面文案在 `ui/locales/<语言>/<命名空间>.js`,代码里写 `t("命名空间.键", { 参数 })`(`ui/lib/i18n.js`);服务端在 `src/i18n/messages/<命名空间>.ts`,键有类型检查。每个界面请求带 `x-amb-lang`,服务端在这个请求里用同一种语言回话。@@ -151,11 +151,11 @@ docker exec amb cat /data/ui-token # 打开 http://<主机>:3600/?token=<令## 谁能使用机器人-代理跑在你自己的电脑上(甚至可能是完全权限),所以默认**只有主人和你允许的人**能和机器人对话,每个机器人、每个渠道分开算(`src/core/access.ts`):+代理跑在你自己的电脑上(甚至可能是完全权限),所以默认**只有主人和你允许的人**能和机器人对话。按渠道账号分开算,能用这个账号的人可以和任何机器人聊(`src/core/access.ts`):-- **主人**:微信是扫码登录的那个微信;飞书用 App ID / App Secret 连接、不扫码,连上之后**第一个给机器人发单聊消息的人**就是主人(先到先得)——连上后用你自己的飞书给机器人发一句话就完成绑定,这条消息照常回复。扫码时没拿到扫码者的微信也一样。机器人设置 → 谁能使用 里显示飞书主人,点「更换」(要确认)清掉主人,下一个发消息的人成为主人;换一个飞书应用或断开飞书时也会清掉。拒绝过的人不会成为主人。本机的网页对话不受限制。-- **其他人**发消息:只收到一句「你还没有被允许使用这个机器人,已通知主人」(同一个人每小时最多一次),不进队列、不调用模型、不花钱。请求出现在信息面板(允许 / 拒绝),也会带 4 位配对码发给主人(每个机器人每小时最多 3 条;主人 24 小时内在那个渠道说过话才发得出去),主人在聊天里回复「同意 1234」/「拒绝 1234」即可。配对码不会和工具审批的编号撞。被拒绝的人之后发什么都不回。-- 允许名单在 机器人设置 → 谁能使用 里,可以移除(移除后他再发消息会重新申请);`/status` 也会显示。+- **主人**:微信是扫码登录的那个微信;飞书不管是扫码创建应用还是填 App ID / App Secret,连上之后**第一个给机器人发单聊消息的人**就是主人(先到先得)——连上后用你自己的飞书给机器人发一句话就完成绑定,这条消息照常回复。扫码时没拿到扫码者的微信也一样。机器人设置 → 谁能使用 里显示飞书主人,点「更换」(要确认)清掉主人,下一个发消息的人成为主人;换一个飞书应用或断开飞书时也会清掉。拒绝过的人不会成为主人。本机的网页对话不受限制。+- **其他人**发消息:只收到一句「你还没有被允许使用这个机器人,已通知主人」(同一个人每小时最多一次),不进队列、不调用模型、不花钱。请求出现在 设置 › 连接 里这个账号的「管理」(允许 / 拒绝),也会带 4 位配对码发给主人(每个账号每小时最多 3 条;主人 24 小时内在那个渠道说过话才发得出去),主人在聊天里回复「同意 1234」/「拒绝 1234」即可。配对码不会和工具审批的编号撞。被拒绝的人之后发什么都不回。+- 允许名单在 设置 › 连接 里这个账号的「管理」,可以移除(移除后他再发消息会重新申请);`/status` 也会显示。- 升级时,已经和机器人有单聊会话的人自动加入允许名单(标为「升级前已在使用」),不会被拦在外面;换一个微信重新扫码时,原来的主人也留在名单里。- 群聊:目前没有渠道接入群聊(飞书只处理单聊,微信 iLink 没有群),群消息不受名单限制、保持原样;接入群聊时要在 `access.ts` 里补规则。@@ -196,13 +196,17 @@ docker exec amb cat /data/ui-token # 打开 http://<主机>:3600/?token=<令## 飞书应用配置+最省事的办法:设置 › 连接 → 飞书 →「添加账号」,用飞书扫码,自动创建机器人应用,然后在飞书里给它发条消息。++想用已有的企业自建应用,点「用已有应用」,按下面的步骤配置:+1. 打开 [飞书开放平台](https://open.feishu.cn/app) → 创建企业自建应用,添加「机器人」能力。2. 权限管理开通:- `im:message.p2p_msg:readonly`(读取用户发给机器人的单聊消息)- `im:message:send_as_bot`(以应用身份发消息)- `cardkit:card:write`(创建与更新卡片,用于流式回复)- `im:message.history:readonly`(读取会话历史消息:飞书长连接不补推离线时发来的消息,程序启动、断线重连时从历史里补上 7 天内有过来往的单聊里、24 小时内的消息,每个会话最多 20 条;没开也能用,只是补不上,会提示一次)-3. 先在本程序信息面板的「渠道 → 飞书」里填入 App ID / App Secret 并保存(长连接需要程序在线才能保存下一步)。+3. 先在本程序 设置 › 连接 → 飞书 →「添加账号」→「用已有应用」里填入 App ID / App Secret 并保存(长连接需要程序在线才能保存下一步)。4. 事件与回调 → 订阅方式选「**使用长连接接收事件**」,添加事件 `im.message.receive_v1`。5. 发布版本并在可用范围内添加自己,然后用你自己的飞书私聊机器人发一句话:连上后第一个发消息的人就是飞书主人(见「谁能使用机器人」)。@@ -210,7 +214,7 @@ docker exec amb cat /data/ui-token # 打开 http://<主机>:3600/?token=<令## 微信(iLink)-- 信息面板「渠道」→ 微信 → 「扫码登录」,用微信扫描二维码并确认;或命令行 `npm run weixin:login`(终端显示二维码,同时保存 PNG 到数据目录)。+- 设置 › 连接 → 微信 →「添加账号」→「扫码登录」,用微信扫描二维码并确认;或命令行 `npm run weixin:login`(终端显示二维码,同时保存 PNG 到数据目录)。- 登录态、同步游标、context_token 保存在数据目录,重启后自动续用。- 平台限制:用户每发来一条消息后 24 小时内最多可回复 10 条;回复在生成结束后一次发出,超过 4000 字自动分段;生成期间显示“正在输入”。- 图片、文件、视频:用户发来(或引用)的会从微信 CDN 下载解密(单个最大 50 MB)。代理模式下存进机器人工作区的 `inbox/`,消息里写明路径,代理可以读取、处理或当生图的参考图;能看图的模型(Claude、GPT-5/6、Gemini、Grok 4、Kimi K3、Muse Spark 等)同时直接收到图片本身,其余模型只拿到路径。Linux 版代理暂不直接收图(sharp 在 Electron 下会崩溃),只给路径。机器人交付的文件(present)按图片或文件发回微信。diff --git a/docs/development_en.md b/docs/development_en.mdindex b4158ad..59a9f40 100644--- a/docs/development_en.md+++ b/docs/development_en.md@@ -122,7 +122,7 @@ Inside the container the console listens on 0.0.0.0, so token access is enforced## Interface- Sidebar: bot list (avatar + name + latest message), + New, right-click to rename / delete; the account button at the bottom-left opens Settings (`⌘/Ctrl+,`).-- Chat screen: the floating bot-name pill at the top opens the info panel (`⌘/Ctrl+⇧+I`: channels, requests, pending approvals, tasks and rules, memory, recent sessions; ⚙ opens bot settings). Replies stream in (Markdown, one-click copy for code blocks) and can be stopped at any time (`Esc`). Approvals and questions appear as cards in the chat. Scrolling up is never yanked back to the bottom.+- Chat screen: the floating bot-name pill at the top opens the info panel (`⌘/Ctrl+⇧+I`: channel accounts this bot answers by default, pending approvals, tasks and rules, memory, recent sessions; ⚙ opens bot settings). Replies stream in (Markdown, one-click copy for code blocks) and can be stopped at any time (`Esc`). Approvals and questions appear as cards in the chat. Scrolling up is never yanked back to the bottom.- Command palette `⌘/Ctrl+K`; appearance (system / light / dark) is in Settings → General.- Language: 简体中文 / English, in Settings → General → Language (also at the top-right of the onboarding screen and in the command palette). It follows the system by default (English when the system language is neither Chinese nor English). The preference is stored in `ui.lang` in config.json; the tray menu, server error and status messages, and system messages bots send to WeChat / Feishu (`/help`, approval prompts, …) all follow it. On the command line / Docker, "System" means `AMB_LANG`, then `LC_ALL` / `LANG`, falling back to Simplified Chinese. Logs, prompts sent to the model and bot names users chose are not translated.- UI strings live in `ui/locales/<lang>/<namespace>.js` and are used as `t("namespace.key", { params })` (`ui/lib/i18n.js`); server strings live in `src/i18n/messages/<namespace>.ts` with type-checked keys. Every UI request carries `x-amb-lang`, and the server answers that request in the same language.@@ -151,11 +151,11 @@ In agent mode each bot has a file permission preset. Switch it with the permissi## Who can use a bot-The agent runs on your own computer (possibly with full access), so by default **only the owner and people you allow** can talk to a bot, per bot and per channel (`src/core/access.ts`):+The agent runs on your own computer (possibly with full access), so by default **only the owner and people you allow** can talk to a bot. This is counted per channel account, and anyone allowed on an account can talk to any bot (`src/core/access.ts`):-- **Owner**: on WeChat, the account that scanned the QR code. Feishu connects with an App ID and App Secret and no scan, so **the first person to message the bot one-to-one after it is connected** becomes the owner (trust on first use): once it is connected, send the bot one line from your own Feishu, and that message is answered as usual. A WeChat login that did not report the scanner's id works the same way. Bot settings → Who can use shows the Feishu owner; "Change" (after a confirmation) clears the owner so the next person to message becomes the owner. Switching to another Feishu app or disconnecting Feishu clears it too. People who were denied never become the owner. The local web chat is never restricted.-- **Anyone else** gets a single line, "you are not allowed to use this bot yet, the owner has been told" (at most once an hour per person); the message is not queued, no model is called and nothing is spent. The request shows in the info panel (allow / deny) and is sent to the owner with a 4-digit pairing code (at most 3 per bot per hour, and only if the owner spoke on that channel in the last 24 hours); the owner replies `同意 1234` / `拒绝 1234` (or `yes 1234` / `no 1234`) in chat. Pairing codes never collide with tool-approval codes. People who were denied get no reply at all.-- The allowlist is in Bot settings → Who can use; entries can be removed (they can ask again by sending a message). `/status` shows it too.+- **Owner**: on WeChat, the account that scanned the QR code. Feishu has no sign-in of its own, whether you scan to create the app or enter an App ID and App Secret, so **the first person to message the bot one-to-one after it is connected** becomes the owner (trust on first use): once it is connected, send the bot one line from your own Feishu, and that message is answered as usual. A WeChat login that did not report the scanner's id works the same way. Bot settings → Who can use shows the Feishu owner; "Change" (after a confirmation) clears the owner so the next person to message becomes the owner. Switching to another Feishu app or disconnecting Feishu clears it too. People who were denied never become the owner. The local web chat is never restricted.+- **Anyone else** gets a single line, "you are not allowed to use this bot yet, the owner has been told" (at most once an hour per person); the message is not queued, no model is called and nothing is spent. The request shows under Manage for that account in Settings › Connections (allow / deny) and is sent to the owner with a 4-digit pairing code (at most 3 per account per hour, and only if the owner spoke on that channel in the last 24 hours); the owner replies `同意 1234` / `拒绝 1234` (or `yes 1234` / `no 1234`) in chat. Pairing codes never collide with tool-approval codes. People who were denied get no reply at all.+- The allowlist is under Manage for that account in Settings › Connections; entries can be removed (they can ask again by sending a message). `/status` shows it too.- On upgrade, everyone who already had a direct conversation with a bot is put on its allowlist (marked "used before the upgrade"), so nobody is cut off; re-scanning with another WeChat account keeps the previous owner on the list.- Group chats: no channel delivers them today (Feishu handles direct messages only, WeChat iLink has no groups), so group messages are left as they were; rules go into `access.ts` when a channel adds groups.@@ -196,13 +196,17 @@ Each bot can turn computer use on or off, choose a backend and an approval mode## Feishu app setup+The easiest way: Settings › Connections → Feishu → Add account, scan with Feishu to create the bot app, then send it a message in Feishu.++To use a custom enterprise app you already have, choose "Use my own app" and set it up like this:+1. Open the [Feishu Open Platform](https://open.feishu.cn/app) → create a custom enterprise app and add the Bot capability.2. Under Permissions, enable:- `im:message.p2p_msg:readonly` (read one-to-one messages users send to the bot)- `im:message:send_as_bot` (send messages as the app)- `cardkit:card:write` (create and update cards, used for streaming replies)- `im:message.history:readonly` (read chat history: the long connection doesn't re-push messages sent while the app was offline, so on start and after a reconnect the app catches up from history on chats active in the last 7 days, taking messages from the last 24 hours, at most 20 per chat. Without it everything else works, but nothing is caught up, and the app says so once)-3. First enter the App ID / App Secret in this app's info panel → Channels → Feishu and save (the long connection must be online before the next step can be saved).+3. First enter the App ID / App Secret in this app under Settings › Connections → Feishu → Add account → Use my own app, and save (the long connection must be online before the next step can be saved).4. Events & callbacks → subscription mode: "**Receive events through persistent connection**", and add the event `im.message.receive_v1`.5. Publish a version, add yourself to the availability scope, then send the bot one line from your own Feishu: the first person to message it after it is connected becomes its Feishu owner (see "Who can use a bot").@@ -210,7 +214,7 @@ Note: only one-to-one (p2p) chats are handled for now; group messages are ignore## WeChat (iLink)-- Info panel → Channels → WeChat → "Scan to sign in", scan the QR code with WeChat and confirm; or run `npm run weixin:login` (the QR code is shown in the terminal and saved as a PNG in the data directory).+- Settings › Connections → WeChat → Add account → "Scan to log in", scan the QR code with WeChat and confirm; or run `npm run weixin:login` (the QR code is shown in the terminal and saved as a PNG in the data directory).- Sign-in state, sync cursor and context_token are kept in the data directory and resume after a restart.- Platform limits: after each user message, at most 10 replies can be sent within 24 hours; replies are sent in one go once generation finishes and are split above 4000 characters; "typing…" is shown while generating.- Images, files, videos: whatever the user sends (or quotes) is downloaded from the WeChat CDN and decrypted (up to 50 MB each). In agent mode it is saved in the bot workspace's `inbox/` and the message names the path, so the agent can read it, process it or use it as a reference image for generation. Vision-capable models (Claude, GPT-5/6, Gemini, Grok 4, Kimi K3, Muse Spark and others) also receive the image itself; other models only get the path. On Linux the agent does not receive images directly yet (sharp crashes under Electron) and only gets the path. Files the bot delivers (present) go back to WeChat as images or files.diff --git a/docs/privacy.md b/docs/privacy.mdindex 1c81f14..604820d 100644--- a/docs/privacy.md+++ b/docs/privacy.md@@ -26,9 +26,9 @@| Modelflare 登录凭据 | `modelflare-account.json`(权限 600;桌面版用系统钥匙串加密) | 只在刷新令牌时发给 modelflare.dev | Modelflare || API Key | 内置网关的隔离配置 `magpie/config/` | 每次模型请求作为鉴权发给 Modelflare | Modelflare || 微信登录态与同步游标 | 数据目录内(`weixin/` 等) | 与微信 iLink 接口通信时会 | 腾讯微信 |-| 飞书 App ID / Secret | 数据目录内的配置 | 与飞书开放平台建立长连接时会 | 飞书 |+| 飞书聊天账号的 App ID / Secret | `anymodel.db` | 与飞书开放平台建立长连接时会 | 飞书 || Telegram、Slack、Discord 的 token | `anymodel.db` | 与对应平台通信时会 | 你接入的平台 |-| 允许名单与使用请求 | `anymodel.db`:谁能用哪个机器人、陌生人发来的第一条消息(截断,帮你认出是谁) | 不会 | — |+| 允许名单与使用请求 | `anymodel.db`:谁能用哪个渠道账号、陌生人发来的第一条消息(截断,帮你认出是谁) | 不会 | — || 待发送的回复 | `anymodel.db` 的出站队列:还没发出去的消息内容和原因,包括等对方下次发消息再发的微信消息(最多留 7 天;发出去的留 7 天、发不出去的留 30 天后删除) | 发送时会 | 微信 / 飞书 || 后台任务和规则 | `anymodel.db`(任务、规则、运行记录,留 30 天);任务文件夹在 `workspaces/<机器人>/tasks/`,30 天没动过会删除(先在「需要你」里告诉你);它们的会话记录在 `dsh/<机器人>/sessions/`,随任务一起删除 | 运行时会 | 同对话:作为模型请求的上下文,经 Modelflare 发给你选定的供应商 || 设置 | `config.json` | 不会 | — |@@ -91,4 +91,4 @@1. 退出 AnyModelBot(托盘菜单 → 退出)。2. 删除上面表格里的数据目录。Docker:`docker rm -f amb && docker volume rm amb-data`。3. 在 Modelflare 个人资料页的「已授权的应用」里撤销 AnyModelBot 的授权。-4. 如有需要,在飞书开放平台停用你创建的应用,在微信里解除与机器人的绑定;在 Telegram(@BotFather)、Slack、Discord 上删除你创建的机器人。+4. 如有需要,在飞书开放平台停用你创建的应用(包括扫码时自动创建的),在微信里解除与机器人的绑定;在 Telegram(@BotFather)、Slack、Discord 上删除你创建的机器人;在 Notion 的设置里断开 AnyModelBot 的连接,删除你创建的令牌。diff --git a/docs/privacy_en.md b/docs/privacy_en.mdindex e278e9d..729a75b 100644--- a/docs/privacy_en.md+++ b/docs/privacy_en.md@@ -26,9 +26,9 @@ This document explains what AnyModelBot stores where, what leaves your device, a| Modelflare sign-in credential | `modelflare-account.json` (mode 600; encrypted with the system keychain in the desktop app) | Only to modelflare.dev when refreshing tokens | Modelflare || API key | The gateway's isolated config in `magpie/config/` | As authentication on every model request to Modelflare | Modelflare || WeChat sign-in state and sync cursor | Inside the data directory (`weixin/` and others) | When talking to the WeChat iLink API | Tencent WeChat |-| Feishu App ID / Secret | Configuration inside the data directory | When opening the long connection to the Feishu Open Platform | Feishu |+| App ID / Secret of Feishu chat accounts | `anymodel.db` | When opening the long connection to the Feishu Open Platform | Feishu || Telegram, Slack and Discord tokens | `anymodel.db` | When talking to that platform | The platform you connected |-| Allowlist and access requests | `anymodel.db`: who may use which bot, and the first message a stranger sent (truncated, so you can tell who it is) | No | — |+| Allowlist and access requests | `anymodel.db`: who may use which channel account, and the first message a stranger sent (truncated, so you can tell who it is) | No | — || Replies waiting to be sent | `anymodel.db` outbox: unsent message content and the reason, including WeChat messages held until the person writes again (kept up to 7 days; sent ones are deleted after 7 days, undeliverable ones after 30) | When they are sent | WeChat / Feishu || Background tasks and rules | `anymodel.db` (tasks, rules and run logs, kept 30 days); task folders in `workspaces/<bot>/tasks/`, deleted after 30 days unused (you are told first in Needs you); their session files in `dsh/<bot>/sessions/`, deleted with the task | While they run | As for chats: context in model requests, sent through Modelflare to the provider you chose || Settings | `config.json` | No | — |@@ -91,4 +91,4 @@ Besides model requests, the app goes online to:1. Quit AnyModelBot (tray menu → Quit).2. Delete the data directory from the table above. Docker: `docker rm -f amb && docker volume rm amb-data`.3. Revoke AnyModelBot under "Authorized apps" on your Modelflare profile page.-4. If needed, disable the app you created on the Feishu Open Platform, unbind the bot in WeChat, and delete the bots you created on Telegram (@BotFather), Slack and Discord.+4. If needed, disable the apps you created on the Feishu Open Platform (including any created by scanning), unbind the bot in WeChat, delete the bots you created on Telegram (@BotFather), Slack and Discord, and in Notion disconnect AnyModelBot and delete any tokens you created.diff --git a/site/src/i18n/en.ts b/site/src/i18n/en.tsindex e0f89b5..b54ff15 100644--- a/site/src/i18n/en.ts+++ b/site/src/i18n/en.ts@@ -456,6 +456,7 @@ export const en: Dict = {"What you send to the model (including screen content during computer use) travels through the Modelflare gateway to the provider you choose.","Modelflare keeps request logs for a retention period (you can pick 7–365 days in your profile) per its “Data retention” doc; when a request ultimately fails, or a route fails before a fallback succeeds, the gateway keeps one copy of the raw request (without the Authorization header) for troubleshooting and deletes it after 72 hours (same doc).","Messages in Slack, Telegram and Discord pass through those platforms' servers by nature.",+ "If you add a Notion account, what bots read and write goes to Notion, and what they read also goes into model requests.",],guardsTitle: "Safeguards in the code",limitsTitle: "Limits and promises we don't make",diff --git a/site/src/i18n/zh.ts b/site/src/i18n/zh.tsindex f1c4008..e3db8e1 100644--- a/site/src/i18n/zh.ts+++ b/site/src/i18n/zh.ts@@ -462,6 +462,7 @@ export const zh = {"发给模型的内容(含电脑操作时的屏幕内容)经 Modelflare 网关到达你选择的模型厂商。","Modelflare 的请求日志按保留期限保存(可在其个人资料里选 7–365 天),以其文档《数据保留》为准;请求最终失败、或兜底成功前有线路尝试失败时,网关会保存一份原始请求(不含 Authorization 头)用于排障,72 小时后删除(同一文档)。","微信 / 飞书渠道的消息本来就经过这些平台的服务器。",+ "你添加 Notion 或飞书账号后,机器人读写的内容会发给这些服务,读到的内容也会进入模型请求。",],guardsTitle: "代码里的防护",limitsTitle: "边界与没有做的承诺",diff --git a/src/core/access.ts b/src/core/access.tsindex 4ea8847..d3b8bea 100644--- a/src/core/access.ts+++ b/src/core/access.ts@@ -2,10 +2,10 @@* 谁能和机器人对话:默认只有主人。代理跑在用户自己的电脑上(甚至可能是完全权限),陌生人找到机器人也不能驱动它。** - 主人:微信 = 扫码登录的那个微信;飞书、Telegram、Slack、Discord(以及没拿到扫码者的微信)= 连上之后第一个发单聊消息的人- * (先到先得;这条消息照常处理)。机器人设置里可以「更换」:清掉主人,下一个发消息的人成为主人。+ * (先到先得;这条消息照常处理)。设置 › 连接 里可以「更换」:清掉主人,下一个发消息的人成为主人。* - 其他人发消息:登记成使用请求,只回一句"还没被允许"(同一个人每小时最多一次),不进队列、不碰模型、不花钱;* 请求出现在信息面板里,也会带配对码发给主人(每个机器人每小时最多 3 条),主人回复「同意 1234」即可。- * - 允许的人进允许名单,在机器人设置里能看到、能移除;被拒绝的人不再回复。+ * - 允许的人进允许名单,在 设置 › 连接 里能看到、能移除;被拒绝的人不再回复。* - 本机网页控制台本来就可信;群聊目前没有渠道接入(飞书只收单聊,微信 iLink 没有群),保持原样不拦,接入群聊时再定规则。*/import crypto from "node:crypto";@@ -220,7 +220,7 @@ export class AccessControl {}/**- * 更换主人(机器人设置里的「更换」、飞书换了一个应用):清掉这个渠道"第一个发消息"的主人,下一个发单聊消息的人成为主人。+ * 更换主人(设置 › 连接 里的「更换」、飞书换了一个应用):清掉这个渠道"第一个发消息"的主人,下一个发单聊消息的人成为主人。* 原来的主人移出名单(之后发消息要重新被允许,除非他就是下一个发消息的人);keep 时留在允许名单里(扫码拿到了扫码者的微信)。* 扫码登录的微信主人不在这里,重新扫码就换了。*/diff --git a/src/i18n/messages/cli.ts b/src/i18n/messages/cli.tsindex 9753cfd..7bf1f11 100644--- a/src/i18n/messages/cli.ts+++ b/src/i18n/messages/cli.ts@@ -3,7 +3,7 @@ import type { Catalog } from "../types.js";export const zh = {entered: "(已输入)",- done: "完成。运行 npm start 启动;微信请在管理界面的信息面板「渠道」里扫码,或运行 npm run weixin:login。",+ done: "完成。运行 npm start 启动;微信请在管理界面的 设置 › 连接 里扫码,或运行 npm run weixin:login。",title: "anymodel bot 首次设置(数据目录:{dir})",noMagpie: "找不到 magpie 可执行文件,请先运行:npm run setup",alreadyConnected: "Modelflare 已连接(尾号 {tail}{account}),保留现有连接。",@@ -25,7 +25,7 @@ export const zh = {export const en: Catalog<typeof zh> = {entered: "(entered)",- done: "Done. Run npm start to launch. For WeChat, scan the QR code under Channels in the console's info panel, or run npm run weixin:login.",+ done: "Done. Run npm start to launch. For WeChat, scan the QR code in the console under Settings > Connections, or run npm run weixin:login.",title: "anymodel bot first-run setup (data directory: {dir})",noMagpie: "magpie executable not found; run npm run setup first",alreadyConnected: "Modelflare is already connected (key ending {tail}{account}); keeping the existing connection.",