AnyBot/FEATURES.md

2560 lines
244 KiB
Markdown
Raw Normal View History

# AnyBot 功能說明書(完整版)
AnyBot 是一個桌面聊天 App,介面和運作方式照 Grok Bot 重做。最大的不同是:**每個 Bot 都可以換 AI 供應商**,可以是 xAI Grok、OpenAI、Claude、Google Gemini、OpenRouter、Ollama(本機),或任何 OpenAI 相容的服務。
這份文件列出 App 目前所有的功能和細節:
- 「」裡的字是畫面上或 Bot 收到的原文。
- 數字是程式實際使用的值。
- 標「估計值」的數字是我自己定的,因為原版裡找不到那個數字。
---
## 目錄
1. 視窗與版面
2. 左側 Bot 清單(側邊欄)
3. Bot 選單(右鍵/「⋯」)
4. 聊天頂部
5. 聊天內容
6. 輸入框
7. 允許請求(卡片與彈出視窗)
8. 直接操作模式
9. Bot 設定/建立 Bot
10. 設定視窗(一般/AI 供應商/電腦/自動審核)
11. AI 供應商
12. 回覆的串流、思考與錯誤
13. 一個回合怎麼運作(步驟、插話、喚醒、結束)
14. 長對話整理成摘要
15. 自動審核
16. 許可關卡的完整順序
17. 三種電腦
18. 檔案與指令工具
19. 安全規則:哪些直接做、先問、拒絕
20. 背景指令
21. 網頁工具
22. AnyBot 自己的瀏覽器與設定檔
23. 讀取你自己的瀏覽器
24. 操作螢幕(滑鼠、鍵盤、截圖、接管、示範教學)
25. 例行任務
26. Bot 可以直接操作 App 的功能
27. 通知
28. 版本、更新與重新啟動
29. 管理員鎖定
30. 存下來的資料
31. 第一次啟動的 Bot
32. 外觀:頭像、顏色、主題、字型
33. Bot 收到的系統指示
34. 鍵盤快速鍵
35. 示範/截圖模式
36. 手機、帳號、雲端主機
37. 字型、語言、設定分類、右側面板
38. 還沒做的功能
---
## 1. 視窗與版面
- **視窗**
- 標題:「AnyBot」
- 開啟時大小:1180 × 780
- 最小寬度:664(側邊欄 240 加聊天區 424)
- 最小高度:480
- **版面**:左邊是 Bot 清單(側邊欄),右邊是目前選中 Bot 的聊天。
- **側邊欄寬度**
- 預設 280 px,拖動時可在 240 到 400 px 之間調整。
- 拖到不足 210 px,會收成 88 px 寬的「頭像直欄」。
- 收起後要拖到超過 220 px 才會再展開。中間留這段緩衝,是為了避免在邊界上一直切換。
- 怎麼拖:滑鼠移到側邊欄右緣左右 3 px 內,游標會變成左右箭頭;滑過或拖動時,右緣會出現 2 px 的分隔線。
- **聊天內容**
- 最寬 720 px,置中,兩側合計至少留 48 px。
- 聊天區最小寬度 424 px。
- **「設定」和「Bot 設定」視窗**
- 視窗上下合計保留 80 px,不會超出畫面(估計值)。
- 內容太長時可以在視窗裡捲動。
- **自動儲存**
- 有變更就存檔。
- Bot 回覆進行中時,最多每 2 秒存一次。
- 關閉 App 時,會先停掉所有進行中的回覆和背景指令,再存檔。
- **畫面更新頻率**
- 閒置時每 15 秒更新一次,讓例行任務的時鐘繼續走。
- 回覆進行中或正在抓模型清單時,每 100 毫秒更新一次。
---
## 2. 左側 Bot 清單(側邊欄)
### 展開時
- **頂列**
- 「◧」:提示「收合側邊欄」。
- 粗體「AnyBot」,15 px。
- 「+」:提示「新 Bot」。
- **搜尋**
- 灰底圓角框,左邊有「🔍」,提示文字「搜尋 Bot」。
- 比對 Bot 的名稱和描述,不分大小寫。
- 沒有符合的 Bot 時顯示「沒有相符的 Bot」。
- **分組**(小標題 12 px 灰字,空的組不顯示)
- 「主要 Bot」:只有一個。
- 「已釘選的 Bot」
- 「Bot」:其餘全部。
- **每一列 Bot**(高 46 px,圓角 10 px)
- 選中時有底色,滑過時有淡底色。
- 左邊是 28 px 頭像。
- 第一行:名稱,14 px。
- 第二行(12 px)依狀態顯示:
- Bot 工作中且在等你允許:「需要你允許」,強調色。
- Bot 工作中:「正在輸入…」
- 閒置時:最後一則訊息的第一行。沒有訊息時顯示「供應商簡稱·模型」,例如「Grok·grok-4」。
- 名稱或第二行太長時,在右側狀態點前截斷,結尾加「…」。
- 右側狀態點:
- 等你允許:強調色實心點(半徑 5.5 px)外加一圈淡色光環(半徑 8 px)。
- 有未讀訊息:強調色小點(半徑 4 px)。
- 工作中:灰色小點(半徑 4 px)。
- 點一下會切到這個 Bot,清除未讀,並把聊天捲到最底。
- 按右鍵會打開 Bot 選單(第 3 節)。
- **底部**
- 「⚙ 設定」按鈕,高 30 px。
- 最下面是「版本 YYYY-MM-DD HH:MM」,10.5 px 灰字。版本就是這份程式建好的時間;不知道時顯示「?」。
- 有新版本時多一顆強調色按鈕「⬆ 重新啟動以更新(新版本時間)」,按下立刻換成新版。按鈕佔滿側邊欄一整排、不會超出:時間今天的只寫「17:23」,別天寫「11/11 17:23」;放不下就不寫時間,再放不下就截成「…」。完整時間在滑過時看。
### 收合成直欄時
- 寬 88 px。
- 最上面依序是「◨」(提示「展開側邊欄」)和「+」(提示「新 Bot」)。
- 頭像依「主要 Bot、已釘選、其他」的順序排列:
- 每格 56×48 px,頭像 32 px。
- 選中或滑過時有底色,圓角 10 px。
- 右上角小點:有未讀是強調色,工作中是灰色。
- 滑過會顯示名稱;按右鍵會打開同一份 Bot 選單。
- 最下面是「⚙」(提示「設定」)。
- 收合或展開的狀態會被記住。
問題卡、搜尋: the bot asks with a card; every chat is searched; a refusal holds for the turn - 問題卡 (ask_person, src/ask.rs): up to 6 questions on a card above the input, one at a time — a choice (one click moves on), several choices, or a field that arrives filled for the person to correct; 「自己回答」 on every question, 上一題 and 略過. The turn waits; a message typed instead leaves the card unanswered. Travels as an approval of kind Question (questions as JSON) with a new answer Answered, so the window, a screen of another brain and the phone draw the same card. - 搜尋所有聊天 (src/find.rs): the sidebar's search also lists what the person and the bots said in every chat, past conversations included, and attachment names; newest first, 40 at most. A click opens the bot (bringing a past conversation back first), scrolls to the message and lights it for a moment. - 拒絕後停下: a step the person refused is refused for them when it comes back unchanged in the same turn — no second card, no second review — until they write again. - The bot's instructions: stop after a refusal instead of trying another way; before sending, posting, buying or deleting, check the person's own messages asked for exactly that, and ask with the card when they didn't. - 直接操作 no longer answers a hand-off (or a question) on the person's behalf. - The repeated-step check leaves questions to the person alone. - Screenshot views `ask` and `find`; FEATURES.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-12 02:17:32 +00:00
### 搜尋所有聊天(原版 v0.70;2026-11-12)
- 側邊欄上面的放大鏡:提示文字改成「搜尋 Bot 和訊息」。打字時,上面照舊列出名字或說明相符的 Bot,下面多一區「訊息」。
- 找的範圍:每個 Bot 目前的對話和「過去的對話」裡,你和 Bot 說的話,以及附加檔案的檔名(標「檔案:」)。工具的結果和摘要不找(讀過一次的網頁會把別的都蓋掉)。不分大小寫。
- 每一筆兩行:Bot 的名字(在過去的對話裡的加「· 過去的對話」)和時間(「剛剛」「昨天 09:33」「11/3」),下面是那句話裡相符處前後的一行,你說的前面加「你:」。最新的在最上面,最多列 40 筆,超過會提示多打幾個字。
- 點一筆:打開那個 Bot,聊天捲到那則訊息,並用黃色亮一下(約 1.8 秒淡掉)。在過去的對話裡的,會先把那段對話換回來(目前的對話收進「過去的對話」最上面);那個 Bot 正在工作時不換,改提示「「(名字)」正在工作。等它做完,再打開過去的對話。」
- 連到別台大腦的電腦上也能用(找的是大腦的聊天)。手機版還沒有。
---
## 3. Bot 選單(右鍵選單和聊天頂部的「⋯」共用)
- 「編輯 Bot…」
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- 「記憶…」:打開這個 Bot 的記憶頁(見第 24 節「記憶」)。
- 「重新啟動這個 Bot」
- 提示文字:「卡住時用:停止它目前的工作和背景指令,聊天記錄和檔案都會保留」。
- 會停掉這個 Bot 目前的工作、待允許的請求和背景指令,並把做到一半的回覆標成「中斷」,之後可以按「重新產生」重試。
- 完成後顯示「已重新啟動「名稱」。」。有停掉背景指令時改為「已重新啟動「名稱」,也停止了 N 個背景指令。」
- 「釘選到側邊欄」或「取消釘選」
- 「設為主要 Bot」:只有不是主要 Bot 的才會出現。
- 「清除聊天記錄」:先停止工作再清空,不會跳確認。
- 分隔線
- 「刪除 Bot」:紅字,會先跳確認視窗。
- 標題「刪除 Bot?」,內文「這會刪除「名稱」和它的聊天記錄。此操作無法復原。」
- 按鈕「取消」和紅底「刪除」。
- 刪除時會先停掉它的工作。
- 刪到一個都不剩時,會自動建一個全新的初始 Bot。
- 刪掉的是主要 Bot 或目前選中的 Bot 時,改成清單第一個 Bot。
---
## 4. 聊天頂部
- **左邊**
- 30 px 頭像,提示「編輯 Bot 頭像」,點了打開 Bot 設定。
- 名稱,粗體 15 px。
- 描述,12 px 灰字。沒有描述時顯示「新增描述…」。
- **右邊**(從右到左)
- 「⋯」:打開 Bot 選單。
- 「Bot 設定」
- 「例行任務」:有例行任務時加上數量,例如「例行任務 2」。
- 依 Bot 狀態多一個標示:
- 在等你允許:強調色膠囊按鈕「● 需要你允許」,提示「打開請求視窗」,按下會重新叫出彈出視窗。
- 只是在工作:灰字「工作中…」。
- 標題列底部有 1 px 分隔線。
- 沒有選任何 Bot 時,畫面中間顯示「未選取 Bot」。
---
## 5. 聊天內容
### 還沒有任何訊息時
- 置中顯示:
- 72 px 大頭像。
- 名稱,22 px 粗體。
- 描述。
- 「使用 供應商·模型」,12 px 灰字。
- 有打開電腦工具時,多一行:「可以在「工作資料夾」裡查看、修改檔案和執行指令,動手前會先問你」。
- 這家供應商需要金鑰卻還沒設定時,顯示按鈕「設定 (供應商) 的 API 金鑰」,按下直接打開「設定 → AI 供應商」,並選好這家。
### 你的訊息
- 靠右的氣泡,圓角 18 px,左右內距 14 px,最寬佔可用寬度的 75%。只有一行時約高 36 px。
- 文字 16 px,行高 27 px。
- 氣泡顏色(設定 › 一般 › 聊天的顏色):
- 「安靜」(預設):淡灰的氣泡、一般的黑字,像 Claude。
- 「跟著 Bot」:用那個 Bot 的顏色配白字(Bot 本身是黑色時用黑色氣泡)。
- 「只用黑色」:黑色氣泡。
- 最後一則是你的訊息、而且 Bot 沒有在回覆時(例如 App 在回覆前被關掉),下方會出現小字「還沒有回覆」和小按鈕「重新傳送」。
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- 這則訊息有帶記憶給模型時,氣泡下方有小字「帶了 N 條記憶」,提示「這則訊息送給模型時附上的記憶」。點開列出是哪幾條,旁邊有「打開記憶頁」。
### Bot 的回覆
- 左邊 24 px 小頭像,內容在淺灰氣泡裡,圓角 18 px。
- 支援簡單排版:
- 標題(# / ## / ###):17 px 粗體,行高 24 px。
- 項目符號(- 或 *):依縮排往內縮。
- 整行粗體(**…**)。
- 程式碼區塊(```):灰底,圓角 8 px,等寬字 13 px,行高 18 px。
- 其他行內的 ** 和 ` 符號會被拿掉。
- 出錯時用紅字,加很淡的紅底。
### 思考過程
- 還沒出現第一個字時,顯示斜體灰字「思考中…」。
- 有思考內容時,變成可以展開的「思考過程」,預設收起,13 px。
- 正在重試時,改顯示重試的狀態文字(第 12 節)。
### 工具步驟(每一步一行)
- 開頭的狀態圖示:
- 「●」等你允許,強調色。
- 「…」執行中。
- 「✓」完成。
- 「–」被拒絕或已停止。
- 「×」失敗,紅色。
- 接著是工具名稱(13 px),然後是等寬灰字的動作說明(12 px,最多 90 字)。
- 有指定電腦時,說明後面加「 ·電腦名稱」。
### 工具結果
- 緊接在那一步下面,縮排 32 px。
- 標題是「結果:第一行(最多 60 字)」,預設收起。
- 展開後是灰底等寬字,最多顯示 6,000 字。
### 摘要
- 舊對話被整理過時,會出現有框、可以展開的「📝 較早的對話已整理成摘要」。
### 回覆下方的小按鈕
- 只出現在 Bot 的最終回覆下面,不會夾在步驟中間。
- 「複製」:複製回覆文字。
- 「重新產生」:只有最後一則有。會刪掉最後一則你的訊息之後的內容,再重新回答。
Bot 之間溝通:ask_bot 問同事並等回答、群組 @點名、共用頁面/「關於你」記憶/教技能;修正插話丟附件、Enter 核准失效等 問同事(ask_bot) - A 問 B 並等它回答:問題放進 B 自己的聊天,B 用自己的模型、工具、記憶和電腦做,最後的回覆交回 A - 最多轉 3 手、不能互等(避免卡死)、對方忙就排隊(10 分鐘逾時)、停止 A 時 B 也停 - message_bot 也加轉手上限;別的 Bot 叫的不算使用者的話(改不了自己的設定) 群組 @點名 - 「@名字」只叫被點到的成員回答;成員在回覆裡 @ 別人就接著說(一輪最多 8 則) - 電腦和手機的輸入框打 @ 會列出成員 - 修正:每個成員帶自己的記憶;成員回覆的每一步都記得是誰說的 共用資源 - Bot 可以讀其他 Bot 的頁面(只能讀,改要請作者改) - 共用的「關於你」記憶:每個 Bot 都帶著,記憶頁可切換查看、編輯;外人的訊息不帶 - teach_skill:把自己會的技能教給同事(先問你);同事名冊列出每個 Bot 會的技能 修正 - 插話(Bot 工作中傳訊息)會帶附件:聊天有檔案卡片,模型看得到圖片;當機復原也帶著 - 輸入框有焦點、框是空的時 Enter 允許待核准的步驟(原本被當成空白送出吃掉) - 大腦的螢幕連不到大腦時,引用、附件、記憶不會先被用掉 - 「還原上一個答案」存在 Bot 上:重開還在,連大腦的畫面和手機都能還原;停止的回合也留著 - Bot 忙時被叫醒(例行任務、message_bot、觸發器)改成排隊開自己的一輪,不再壓成純文字插話 - 停止時結果已回來的步驟標成完成;輸入法剛選字的那一格不送出 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 13:34:03 +00:00
- 「還原上一個答案」:重新產生之後才出現在 ⋯ 裡,把被蓋掉的舊答案放回原位(每個 Bot 一層)。被停止、只有步驟沒有文字的那一輪也留著。存在 Bot 身上:關掉程式也還在,連大腦的電腦畫面和手機(訊息的「更多」)也能還原;你傳下一則訊息後就不能還原了(會放錯位置)。分享 Bot 的檔案不含它。
- 小字「供應商·模型」,11 px,表示這則是哪個模型寫的。
修正卡死: ⌘ 一按視窗就鎖死、圖表縮小凍結、打字每鍵寫檔;複製中文亂碼;頭像不再擋住思考動畫 卡住當機 - ⌘1–⌘9(Win/Linux 為 Ctrl)在 ctx.input 裡又呼叫 ctx.input,egui 的 Context 被鎖兩次, 按住 ⌘(⌘C、⌘V、⌘Tab)視窗就永遠不動;改為只讀一次(bot_jump_key),加回歸測試 - 圖表 x 軸格線固定每 1 一條,縮小後一幀要畫上百萬條(凍結、記憶體爆);改為最多約 40 條, 滾輪不再被圖表吃掉(⌘/Ctrl+滾輪或雙指縮放) - 草稿每打一個字就同步重寫整個 state.json(含 fsync);改為停手 1.5 秒後才存,結尾空白也 不再造成每幀存檔 複製(三個系統) - Mac:pbcopy 從 Finder/Dock 開時沒有 UTF-8 語系,中文變亂碼;指定 UTF-8 - ⌘C 攔截只拿 CopyText,不再丟掉開連結、複製圖片、Linux 中鍵選取等指令(且只在 Mac 攔) - Windows:改用 Win32 剪貼簿(arboard,獨立執行緒),不再走 clip.exe(缺 BOM、多一個 NUL) - Linux:依 WAYLAND_DISPLAY/DISPLAY 選 wl-copy 或 xclip/xsel,都沒有時退回視窗剪貼簿 其他 - 頁面目錄點了不跳(標題位置從未記錄);目錄搜尋框按 Esc 會關掉整頁 - 圖表:單一系列欄名被 String::max 換成「數值」;同尺寸無標題的圖共用縮放;inf/NaN 不入圖 - KPI 卡片寬度未扣內距而超出欄寬 - 「還原上一個答案」在送出新訊息後會插錯位置;重試錯誤回覆不再存可還原的版本 - 手機:長輪詢回來時已切到別的聊天,不再把上一個聊天的訊息畫進來 - 輸入框上方頭像:思考時頭稍微縮小,三顆小球繞著頭轉(後面的從頭後經過、前面的壓在頭上並描邊), 不再被頭像蓋住 - 刪除未使用的 src/app/ui_kit.rs 驗證:macOS cargo test 374 通過(relay 18 通過);Windows/Linux cargo check 通過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:19:59 +00:00
- **複製走系統工具,不會凍結視窗**:所有複製鈕(回覆、程式碼、頁面 Markdown、ID、網址)和選取後的 ⌘C,都交給系統的小程式寫剪貼簿(Mac 的 pbcopy、Windows 的 clip、Linux 的 wl-copy/xclip),不碰視窗程式庫自己的剪貼簿——macOS 的文字服務出問題時(系統助理當掉),原本的做法會在寫剪貼簿的瞬間整個視窗卡住(按複製就當機);現在最慢也只是那一次複製沒成功。寫入在單獨的執行緒上跑,畫面不等待。
### 特殊文字
- 「(已停止)」:按停止時,回覆還完全沒有內容。
- 「(沒有回應內容)」:回覆結束了,但沒有文字也沒有任何步驟。
- 「(這次的回應被中斷了,可能是 App 關閉或重新啟動。按「重新產生」再試一次。)」:App 關閉時還在回覆,下次打開時會修成這句。
### 卡住偵測
- 「模型未能及時開始回應。請重試。」:每一步開始後 120 秒內沒有任何回應(估計值)。
- 「回應中斷:模型超過 35 秒沒有送出任何內容。」:已經開始輸出後,又安靜超過 35 秒。
修正卡死: ⌘ 一按視窗就鎖死、圖表縮小凍結、打字每鍵寫檔;複製中文亂碼;頭像不再擋住思考動畫 卡住當機 - ⌘1–⌘9(Win/Linux 為 Ctrl)在 ctx.input 裡又呼叫 ctx.input,egui 的 Context 被鎖兩次, 按住 ⌘(⌘C、⌘V、⌘Tab)視窗就永遠不動;改為只讀一次(bot_jump_key),加回歸測試 - 圖表 x 軸格線固定每 1 一條,縮小後一幀要畫上百萬條(凍結、記憶體爆);改為最多約 40 條, 滾輪不再被圖表吃掉(⌘/Ctrl+滾輪或雙指縮放) - 草稿每打一個字就同步重寫整個 state.json(含 fsync);改為停手 1.5 秒後才存,結尾空白也 不再造成每幀存檔 複製(三個系統) - Mac:pbcopy 從 Finder/Dock 開時沒有 UTF-8 語系,中文變亂碼;指定 UTF-8 - ⌘C 攔截只拿 CopyText,不再丟掉開連結、複製圖片、Linux 中鍵選取等指令(且只在 Mac 攔) - Windows:改用 Win32 剪貼簿(arboard,獨立執行緒),不再走 clip.exe(缺 BOM、多一個 NUL) - Linux:依 WAYLAND_DISPLAY/DISPLAY 選 wl-copy 或 xclip/xsel,都沒有時退回視窗剪貼簿 其他 - 頁面目錄點了不跳(標題位置從未記錄);目錄搜尋框按 Esc 會關掉整頁 - 圖表:單一系列欄名被 String::max 換成「數值」;同尺寸無標題的圖共用縮放;inf/NaN 不入圖 - KPI 卡片寬度未扣內距而超出欄寬 - 「還原上一個答案」在送出新訊息後會插錯位置;重試錯誤回覆不再存可還原的版本 - 手機:長輪詢回來時已切到別的聊天,不再把上一個聊天的訊息畫進來 - 輸入框上方頭像:思考時頭稍微縮小,三顆小球繞著頭轉(後面的從頭後經過、前面的壓在頭上並描邊), 不再被頭像蓋住 - 刪除未使用的 src/app/ui_kit.rs 驗證:macOS cargo test 374 通過(relay 18 通過);Windows/Linux cargo check 通過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:19:59 +00:00
- 紅色的錯誤氣泡下面直接有一個〔重試〕按鈕,點它就是重新產生這一個回合。
- 等你允許或工具在執行時,不算卡住。
### 自動捲動
- 送出訊息、切換 Bot、按「前往聊天」時,會捲到最底並停在底部。
---
## 6. 輸入框
### 外觀
- 外框圓角 20 px;正在輸入時框線變深。
- 提示文字「傳訊息給 (Bot 名稱)」。
- 從一行開始,跟著內容長高,最高 160 px,再多就在框內捲動。
修正卡死: ⌘ 一按視窗就鎖死、圖表縮小凍結、打字每鍵寫檔;複製中文亂碼;頭像不再擋住思考動畫 卡住當機 - ⌘1–⌘9(Win/Linux 為 Ctrl)在 ctx.input 裡又呼叫 ctx.input,egui 的 Context 被鎖兩次, 按住 ⌘(⌘C、⌘V、⌘Tab)視窗就永遠不動;改為只讀一次(bot_jump_key),加回歸測試 - 圖表 x 軸格線固定每 1 一條,縮小後一幀要畫上百萬條(凍結、記憶體爆);改為最多約 40 條, 滾輪不再被圖表吃掉(⌘/Ctrl+滾輪或雙指縮放) - 草稿每打一個字就同步重寫整個 state.json(含 fsync);改為停手 1.5 秒後才存,結尾空白也 不再造成每幀存檔 複製(三個系統) - Mac:pbcopy 從 Finder/Dock 開時沒有 UTF-8 語系,中文變亂碼;指定 UTF-8 - ⌘C 攔截只拿 CopyText,不再丟掉開連結、複製圖片、Linux 中鍵選取等指令(且只在 Mac 攔) - Windows:改用 Win32 剪貼簿(arboard,獨立執行緒),不再走 clip.exe(缺 BOM、多一個 NUL) - Linux:依 WAYLAND_DISPLAY/DISPLAY 選 wl-copy 或 xclip/xsel,都沒有時退回視窗剪貼簿 其他 - 頁面目錄點了不跳(標題位置從未記錄);目錄搜尋框按 Esc 會關掉整頁 - 圖表:單一系列欄名被 String::max 換成「數值」;同尺寸無標題的圖共用縮放;inf/NaN 不入圖 - KPI 卡片寬度未扣內距而超出欄寬 - 「還原上一個答案」在送出新訊息後會插錯位置;重試錯誤回覆不再存可還原的版本 - 手機:長輪詢回來時已切到別的聊天,不再把上一個聊天的訊息畫進來 - 輸入框上方頭像:思考時頭稍微縮小,三顆小球繞著頭轉(後面的從頭後經過、前面的壓在頭上並描邊), 不再被頭像蓋住 - 刪除未使用的 src/app/ui_kit.rs 驗證:macOS cargo test 374 通過(relay 18 通過);Windows/Linux cargo check 通過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:19:59 +00:00
- 每個 Bot 各自保留打到一半的草稿;草稿會跟著存檔,重新啟動或切 Bot 都不会吃掉打到一半的字。
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
### 上方:記憶小卡片
- 打字停 300 ms,就在這個 Bot 的記憶裡找跟草稿有關的,在輸入框上方排成一列小卡片,最多 8 張。左邊是「帶入記憶」,點了打開記憶頁。
- 分數 0.5 以上的預先勾好。點一下卡片就加入或拿掉。滑過去看全文、種類、日期、相關度,以及「點一下:這次帶上」或「點一下:這次不帶」。
- 最右邊小字「帶 N 條,約 T token」,一條都沒勾時是「這次不帶」。
- 送出時把勾的那幾條一起送出,存在這則訊息上。沒等到卡片就送出時,由 Bot 那邊自己挑(分數 0.55 以上,最多 3 條)。
- 釘選的記憶不會出現在這裡,因為每次都會帶。分數怎麼算見 [docs/memory.md](docs/memory.md)。
### 左下:模型選擇器
- 顯示「供應商簡稱·模型 ▾」。供應商簡稱有:Grok、OpenAI、Claude、Gemini、OpenRouter、Ollama、自訂。
- 打開後:
- 最上面是說明「選擇這個 Bot 用來思考的模型」。
- 每家供應商一個子選單。目前用的那家前面有「✓ 」;沒有金鑰的標「(未設定金鑰)」。
- 子選單列出模型:已經抓過清單就用抓到的,沒有就用內建的起始清單。預設模型排第一。
- 最後是「其他模型…」:換成這家的預設模型,並打開 Bot 設定讓你自己輸入。
### 右下:送出/停止按鈕(32 px 圓形)
- 有字時:「↑」,提示「傳送(Enter)」。
- Bot 工作中、輸入框是空的:「■」,提示「停止」。
- Bot 工作中、輸入框有字:「↑」,提示「補充給正在進行的工作(Enter)」。
- 沒字又沒在工作:變灰,按不下去。
### 按鍵
- Enter 送出,Shift+Enter 換行(以前 Shift+Enter 也會送出:egui 的快捷鍵比對不管 Shift,現在兩個鍵分開讀)。/ 清單開著時,Enter/Tab 帶入技能,Shift+Enter 照樣換行。
- **清單自己長出來**:在「1. 買菜」這一行按 Shift+Enter,下一行自動是「2. 」;「9) 」之後是「10) 」,「1、」之後是「2、」,「- 」「* 」「• 」照樣接下去,「- [x] 」之後是「- [ ] 」,縮排也一樣。在還沒寫字的「3. 」上再按一次 Shift+Enter,就把「3. 」拿掉、結束清單(像備忘錄)。游標在一項中間時,後面的字移到新的一項;「1.5 公斤」「2026年」「-1 度」這種不算清單。
- **輸入框跟著字長高**:一行時還是 44 px 的膠囊;字多了(換行或一行太長自動折行)就往上長,最多長到視窗高度的 4 成(120–360 px),再多就在框裡捲動。字跟聊天一樣大(15 px、行高 22 px),多行也好讀;+、麥克風和送出鈕都貼在底部。
- 用注音、拼音等輸入法選字時按 Enter,不會誤送出。
- 送出後游標留在輸入框。
### Bot 工作中繼續打字(插話)
- 新訊息不會另開一輪,而是插進正在進行的工作,Bot 下一步就會看到。
Bot 之間溝通:ask_bot 問同事並等回答、群組 @點名、共用頁面/「關於你」記憶/教技能;修正插話丟附件、Enter 核准失效等 問同事(ask_bot) - A 問 B 並等它回答:問題放進 B 自己的聊天,B 用自己的模型、工具、記憶和電腦做,最後的回覆交回 A - 最多轉 3 手、不能互等(避免卡死)、對方忙就排隊(10 分鐘逾時)、停止 A 時 B 也停 - message_bot 也加轉手上限;別的 Bot 叫的不算使用者的話(改不了自己的設定) 群組 @點名 - 「@名字」只叫被點到的成員回答;成員在回覆裡 @ 別人就接著說(一輪最多 8 則) - 電腦和手機的輸入框打 @ 會列出成員 - 修正:每個成員帶自己的記憶;成員回覆的每一步都記得是誰說的 共用資源 - Bot 可以讀其他 Bot 的頁面(只能讀,改要請作者改) - 共用的「關於你」記憶:每個 Bot 都帶著,記憶頁可切換查看、編輯;外人的訊息不帶 - teach_skill:把自己會的技能教給同事(先問你);同事名冊列出每個 Bot 會的技能 修正 - 插話(Bot 工作中傳訊息)會帶附件:聊天有檔案卡片,模型看得到圖片;當機復原也帶著 - 輸入框有焦點、框是空的時 Enter 允許待核准的步驟(原本被當成空白送出吃掉) - 大腦的螢幕連不到大腦時,引用、附件、記憶不會先被用掉 - 「還原上一個答案」存在 Bot 上:重開還在,連大腦的畫面和手機都能還原;停止的回合也留著 - Bot 忙時被叫醒(例行任務、message_bot、觸發器)改成排隊開自己的一輪,不再壓成純文字插話 - 停止時結果已回來的步驟標成完成;輸入法剛選字的那一格不送出 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 13:34:03 +00:00
- 附上的圖片和檔案也一起插進去:聊天裡有檔案卡片,模型看得到圖片和檔案位置(以前只有文字進去,圖片直接消失)。電腦、手機都一樣;當機重開後放回聊天的補充也帶著檔案。
- 這一輪剛好結束、來不及插入時,會自動變成下一輪(也帶著檔案)。
- 按停止時,還沒被讀到的補充會被丟掉。
Bot 之間溝通:ask_bot 問同事並等回答、群組 @點名、共用頁面/「關於你」記憶/教技能;修正插話丟附件、Enter 核准失效等 問同事(ask_bot) - A 問 B 並等它回答:問題放進 B 自己的聊天,B 用自己的模型、工具、記憶和電腦做,最後的回覆交回 A - 最多轉 3 手、不能互等(避免卡死)、對方忙就排隊(10 分鐘逾時)、停止 A 時 B 也停 - message_bot 也加轉手上限;別的 Bot 叫的不算使用者的話(改不了自己的設定) 群組 @點名 - 「@名字」只叫被點到的成員回答;成員在回覆裡 @ 別人就接著說(一輪最多 8 則) - 電腦和手機的輸入框打 @ 會列出成員 - 修正:每個成員帶自己的記憶;成員回覆的每一步都記得是誰說的 共用資源 - Bot 可以讀其他 Bot 的頁面(只能讀,改要請作者改) - 共用的「關於你」記憶:每個 Bot 都帶著,記憶頁可切換查看、編輯;外人的訊息不帶 - teach_skill:把自己會的技能教給同事(先問你);同事名冊列出每個 Bot 會的技能 修正 - 插話(Bot 工作中傳訊息)會帶附件:聊天有檔案卡片,模型看得到圖片;當機復原也帶著 - 輸入框有焦點、框是空的時 Enter 允許待核准的步驟(原本被當成空白送出吃掉) - 大腦的螢幕連不到大腦時,引用、附件、記憶不會先被用掉 - 「還原上一個答案」存在 Bot 上:重開還在,連大腦的畫面和手機都能還原;停止的回合也留著 - Bot 忙時被叫醒(例行任務、message_bot、觸發器)改成排隊開自己的一輪,不再壓成純文字插話 - 停止時結果已回來的步驟標成完成;輸入法剛選字的那一格不送出 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 13:34:03 +00:00
### 大腦的螢幕連不到大腦時
- 按送出會說「連不到大腦,訊息沒有送出。」,打的字、引用、附件和勾選的記憶都留在輸入框,連上後再按一次就好(以前引用、附件和記憶會先被用掉,只剩文字)。
### 輸入框下方的小字(11 px 置中,擇一顯示)
修正卡死: ⌘ 一按視窗就鎖死、圖表縮小凍結、打字每鍵寫檔;複製中文亂碼;頭像不再擋住思考動畫 卡住當機 - ⌘1–⌘9(Win/Linux 為 Ctrl)在 ctx.input 裡又呼叫 ctx.input,egui 的 Context 被鎖兩次, 按住 ⌘(⌘C、⌘V、⌘Tab)視窗就永遠不動;改為只讀一次(bot_jump_key),加回歸測試 - 圖表 x 軸格線固定每 1 一條,縮小後一幀要畫上百萬條(凍結、記憶體爆);改為最多約 40 條, 滾輪不再被圖表吃掉(⌘/Ctrl+滾輪或雙指縮放) - 草稿每打一個字就同步重寫整個 state.json(含 fsync);改為停手 1.5 秒後才存,結尾空白也 不再造成每幀存檔 複製(三個系統) - Mac:pbcopy 從 Finder/Dock 開時沒有 UTF-8 語系,中文變亂碼;指定 UTF-8 - ⌘C 攔截只拿 CopyText,不再丟掉開連結、複製圖片、Linux 中鍵選取等指令(且只在 Mac 攔) - Windows:改用 Win32 剪貼簿(arboard,獨立執行緒),不再走 clip.exe(缺 BOM、多一個 NUL) - Linux:依 WAYLAND_DISPLAY/DISPLAY 選 wl-copy 或 xclip/xsel,都沒有時退回視窗剪貼簿 其他 - 頁面目錄點了不跳(標題位置從未記錄);目錄搜尋框按 Esc 會關掉整頁 - 圖表:單一系列欄名被 String::max 換成「數值」;同尺寸無標題的圖共用縮放;inf/NaN 不入圖 - KPI 卡片寬度未扣內距而超出欄寬 - 「還原上一個答案」在送出新訊息後會插錯位置;重試錯誤回覆不再存可還原的版本 - 手機:長輪詢回來時已切到別的聊天,不再把上一個聊天的訊息畫進來 - 輸入框上方頭像:思考時頭稍微縮小,三顆小球繞著頭轉(後面的從頭後經過、前面的壓在頭上並描邊), 不再被頭像蓋住 - 刪除未使用的 src/app/ui_kit.rs 驗證:macOS cargo test 374 通過(relay 18 通過);Windows/Linux cargo check 通過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:19:59 +00:00
- 有系統提示時:強調色提示,加「知道了」可以關掉;不點它,它也會在 8 秒後自己消失。提示和「已排入 N 條訊息」各佔一行,不會互相擠掉。
- 閒置時:「Enter 傳送 · Shift+Enter 換行」。
- 工作中:「工作中也可以繼續打字,Bot 會在下一步看到 · Shift+Enter 換行」。
- 有排入的補充時:「已排入「最新一則前 30 字」,Bot 會在下一步看到」。多於一則時:「已排入「…」 等 N 則,Bot 會在下一步看到」。
---
## 7. 允許請求(聊天裡的卡片和彈出視窗內容相同)
### 標題(依情況)
- 「允許 (Bot) 使用電腦工具嗎?」:這個 Bot 的電腦工具還沒打開。
- 「允許 (Bot) 在你的電腦上執行任務嗎?」:「在這台電腦上執行」還沒打開。
- 「允許 (Bot) (動作)嗎?」或「允許 (Bot) 在 (電腦) 上(動作)嗎?」:一般動作。
### 說明文字
- 電腦工具還沒打開:「它想做的事:」
- 「在這台電腦上執行」還沒打開:「它想在你的電腦上執行:」
- 接著是灰底等寬字框,顯示細節,例如要執行的指令。
- 有指定電腦、而標題沒說在哪裡時,加一行「在:(電腦名稱)」。
### 按鈕
- 主要按鈕:「允許」。
- 一律允許的按鈕(字都很短,會打開什麼寫在滑過的說明裡):
- 電腦工具還沒打開時:「一律允許」,打開這個 Bot 的電腦工具。
- 你的電腦還沒允許時:「一律允許」,打開「在這台電腦上執行」。
- 一般動作:「一律允許(類別)」,會記到這個 Bot 的「一律允許」清單。類別有:
- 「修改檔案」
- 「讀取瀏覽器分頁」
- 「讀取工作資料夾以外」
- 指令類直接顯示指令,例如「npm install」
- 沒有可以記住的類別時,不顯示這顆按鈕。
- 「拒絕」。
design: 全畫面審查第一輪——修傳送按鈕破版、提示改灰、等你的卡片統一、允許卡片精簡、頁面卡片一張、Bot 設定進階收起 依 Anthropic 的設計原則逐一看過 39 個畫面,這一輪改: - 傳送到其他裝置:「移除/複製/再試一次」寫死寬度,字一大就斷成兩行——改成照字量寬 - 輸入框下的提示(已排入…、已複製…)用強調色像錯誤——改成灰字 - 等你的卡片統一成 kit::needs_you_card(允許、問題、交給你處理):同一種黃;「需要處理」以前是強調色框看起來像紅色 - 允許卡片:一句「它想在你的電腦上執行:」+指令,三個短按鈕「允許/一律允許/拒絕」(一律允許會打開什麼放在滑過說明), 「直接操作」改成灰字一行;標題字級回到規格(藏著的 17/14) - 聊天裡的頁面卡片:一張精簡卡(圖示、標題一次、一行重點、一行灰字),以前標題出現兩次加四行預覽 - Bot 設定:電腦操作/能力/技能/記憶 預設收起,一行顯示目前怎麼設(kit::fold_title); 「執行步驟用的模型」「思考模式」改成名稱在上、說明在「?」(kit::form_row_help),不再兩段灰字 - 權限:「新增規則」那列不再撐滿剩下的高度(大片空白) - 看守:自己畫的卡片上限 17 → 13 已驗證: cargo test 523 全過(排版檢查、規格看守)、改過的畫面截圖目視
2026-11-16 14:57:13 +00:00
- 「⚡ 之後都直接操作,不再一個個問」(灰字,不搶主要按鈕;以前是橘色的「全部允許,之後直接操作」)
- 只在「直接操作」還沒開、而且管理員沒鎖住時出現。
- 提示文字:「打開「直接操作」:Bot 可以直接使用這台電腦和瀏覽器,不再一個個問你。危險指令、密碼檔和你的「一律詢問」規則仍會擋下來。可在設定 → 電腦關掉。」
- 按下會允許這一筆,並打開直接操作(第 8 節)。
### 聊天裡的卡片
- 縮排 32 px,2 px 強調色外框,圓角 14 px。
### 彈出視窗
- 會自己跳出來,背後整個畫面變暗。淺色主題暗 70,深色主題暗 120(透明度 0–255)。
- 視窗寬 440 px,置中稍微偏上 20 px,有 2 px 強調色外框、圓角 16 px 和陰影。
- 頂部:28 px 頭像加「(Bot) 正在等你決定」。同時有多筆時再加「(還有 N 個請求)」;目前畫面上的 Bot 優先顯示。
- 底部:
- 「前往聊天」:只有請求來自別的 Bot 時才有,按下會切過去。
- 「稍後再決定」:提示「先關掉這個視窗;聊天裡的卡片還在,Bot 會一直等你」。
- 有新請求時,Dock 圖示會跳動。你不在 App 前面而且通知有開時,還會跳 macOS 通知,標題「(Bot) 需要你允許」。
- 有新請求時(要你允許某件事,或要你親自處理一個步驟)會響一聲提示音,就算你正在看 AnyBot 也會響:上行的兩聲「叮—咚」,約 0.8 秒、音量不大,Mac、Windows、Linux 都一樣(程式自己合成,不用音檔)。好幾個請求同時進來只響一次;跳 macOS 通知時,通知本身就不再另外響。連到別台大腦的電腦也會響(請求來自大腦時一樣);伺服器上的大腦不響。在「設定 › 一般 › 通知 › 需要你時發出提示音」可以關掉,打開時會先響一次讓你聽。
問題卡、搜尋: the bot asks with a card; every chat is searched; a refusal holds for the turn - 問題卡 (ask_person, src/ask.rs): up to 6 questions on a card above the input, one at a time — a choice (one click moves on), several choices, or a field that arrives filled for the person to correct; 「自己回答」 on every question, 上一題 and 略過. The turn waits; a message typed instead leaves the card unanswered. Travels as an approval of kind Question (questions as JSON) with a new answer Answered, so the window, a screen of another brain and the phone draw the same card. - 搜尋所有聊天 (src/find.rs): the sidebar's search also lists what the person and the bots said in every chat, past conversations included, and attachment names; newest first, 40 at most. A click opens the bot (bringing a past conversation back first), scrolls to the message and lights it for a moment. - 拒絕後停下: a step the person refused is refused for them when it comes back unchanged in the same turn — no second card, no second review — until they write again. - The bot's instructions: stop after a refusal instead of trying another way; before sending, posting, buying or deleting, check the person's own messages asked for exactly that, and ask with the card when they didn't. - 直接操作 no longer answers a hand-off (or a question) on the person's behalf. - The repeated-step check leaves questions to the person alone. - Screenshot views `ask` and `find`; FEATURES.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-12 02:17:32 +00:00
### 問題卡(原版的 question card;2026-11-12)
- Bot 需要你做決定或補資料時,用 `ask_person` 在輸入框上方放一張黃色卡片問你,不再把一串問題寫成文字。這一回合會停下來等你。
- 一次最多 6 題,卡片一題一題走,左上寫「(Bot) 問你 · 2/3」。每題可以是:
- **單選**:最多 8 個選項,點一下就選好並跳到下一題;最後一題點了就送出。
- **複選**(標「可以選好幾個」):打勾幾個都行,再按「下一題」或「送出」。
- **填寫**:沒有選項,只有一個輸入框。Bot 已經知道的會先填好(例如訂位人姓名),你只要改;游標一開始就在框裡,Enter 往下一題。
- 每題下面都有「自己回答」的輸入框:單選時它取代選項,複選時加在選的後面。
- 按鈕:「下一題/送出」(這題有答案才能按)、「上一題」、「略過」。送出時若有哪題還沒答,會回到那一題。
- 「略過」:Bot 收到「使用者略過了這張問題卡」,照它最合理的判斷繼續,或說明少了答案做不了哪一部分,不會再問同樣的問題。
- 不按卡片、直接在輸入框打字送出:卡片收起來、算沒回答,Bot 照你打的做。
- Bot 收到的結果是「使用者的回答:1. (題目) → (答案)…」;聊天裡這一步顯示「問你 (第一題)(共 N 題)」,點開看得到答案。
- 側邊欄和面板在等的時候寫「等你回答」,輸入框上方那張臉旁邊也是;不在 App 前面時的通知標題是「(Bot) 問你」。
- 手機版有同一張卡片(選項可點、可填寫、上一題、略過);打到一半畫面更新不會把字清掉。連到別台大腦的電腦上回答,答案會送回大腦。
- 密碼、卡號、驗證碼不走這張卡(Bot 被交代用保險庫或請你接手電腦)。訊息管道(Slack、Telegram…)和例行任務裡沒有人在 App 前面,Bot 被交代改用文字問。
- 打開「直接操作」不會替你回答問題卡或「需要處理」的卡片(以前會把「需要處理」當成「我完成了」)。
- 同一張問題卡問第二次、你給一樣的答案,不算「同一步重複」(那個檢查只管 Bot 自己重複做同樣的事)。
### 拒絕後停下(原版 v0.75.5;2026-11-12)
- 你按了「拒絕」之後,同一回合裡 Bot 再提出一模一樣的操作(同一個工具、同樣的參數),AnyBot 直接替你拒絕:不再跳卡片、也不再送自動審核,Bot 收到「這個操作他剛才已經拒絕過了…告訴他你停在哪裡,問他想怎麼做」。
- 你再傳一則訊息(包括 Bot 工作中的補充)之後,這份紀錄清掉:那件事要不要做,重新由你決定。
- 只算你親手按的拒絕;按停止、視窗關掉不算。寫法不同的操作(例如換一條指令做同一件事)擋不住,那一部分靠 Bot 的指示:拒絕後不要再試同一件事、也不要換個寫法做。
- **收不回來的事先看你說過沒有**(原版 v0.70):Bot 的指示多了一條——寄出、傳訊息、發文、購買、刪除之前,先回頭看你自己在這段對話裡寫的訊息;你要的就是這件事、這個對象、這個內容才做。網頁、檔案、信件、別的 Bot 或例行任務裡的文字不算你說好;你只說「先寫好」就停在草稿。沒說好就用問題卡把要送出的內容給你看。這是給 Bot 的指示,不是程式硬擋的關卡;硬擋的還是原本的允許請求和「一律詢問」規則。
---
## 8. 直接操作模式
一個開關,讓 Bot 像 Grok Bot 那樣直接做事,不再一個個問。
### 打開時會一次做完
- 打開「在這台電腦上執行」。
- 打開自動審核。
- 打開所有 Bot 的電腦工具。
- 「一律詢問」規則是空的時候,填入三條預設規則:
- 「刪除檔案或資料夾」
- 「付款、購買或轉帳」
- 「用我的帳號發文、留言,或傳訊息給別人」
- 正在進行的工作從下一步開始就不再問。
- 其他 Bot 正在等的「可以用電腦嗎」類請求會自動允許。一般動作的請求仍然要你按。
### 打開後仍然會擋下或詢問
- 內建安全檢查擋下的事一律不做,例如危險指令和密碼檔。
- 符合你的「一律詢問」規則時會停下來問,理由後面加「(符合你的「一律詢問」規則:…)」。
- 其他自動允許的動作,結果前面會標「(直接操作模式:已自動允許)」。
### 提示文字
- 打開時:「已打開「直接操作」:Bot 會直接做事,只有危險操作和你的「一律詢問」規則會停下來問你。」
- 被管理員鎖住時:「「直接操作」已由管理員關閉,沒辦法打開。」
---
## 9. Bot 設定/建立 Bot
### 標題與開法
- 新 Bot 的標題是「建立 Bot」,既有 Bot 是「Bot 設定」。寬 460 px,置中。
- 開法:
- 側邊欄「+」
- ⌘N
- 選單「編輯 Bot…」
- 頂部「Bot 設定」按鈕
- 點頂部頭像
Bot 個人檔案:soul、擅長、技能、能力、可用電腦、同事名冊;例行任務每輪開新對話(省 token) 每個 Bot 是獨立的個體(src/profile.rs、src/app/profile_ui.rs) - 新欄位:soul(只有自己讀,放在提示最前面)、擅長、不找它做的事、會的技能、能力、可以用的電腦 - 同事名冊:每個 Bot 的提示裡一行一個其他 Bot(簡介、擅長、不找它、在哪幾台電腦),不含別人的 soul 和記憶;順序固定,吃得到快取 - 能力 11 類(上網、瀏覽器、螢幕、檔案與指令、Mac App、連接器、電話簡訊 X、例行任務、頁面、 合作、管理 App):沒勾的工具不提供、規則不寫進提示;硬叫會被 agent 擋下並說該找誰 - 技能:說明只列自己會的,use_skill 只讀得到自己的;自己學會的自動算它的 - 可以用的電腦:自己的電腦一定可以;預設電腦不在名單時回到自己的電腦,不誤報「沒有連線」; 其他畫面也拿得到完整電腦清單來勾;匯出 Bot 不帶電腦名單和草稿 - 舊 Bot 全部勾選(None = 全部),行為不變 - 例行任務:每輪只從那則訊息讀起(Message::fresh),提醒先讀頁面/查記憶;聊天畫面不變, 使用者自己的下一則照樣看整段 - 順手修:角色說明結尾的「。」不再變成「。。」 - 實測(照建議勾能力):明日之星固定內容 ~21.7k → ~11.5k token、FSD ~25.5k → ~13.2k; 例行任務每輪歷史最多 ~70k → 幾百 連接器(MCP) - 實測三個連接器都能用(本機用 AnyBot 自己的 MCP client):time(get_current_time)、 fetch(讀 example.com)、SccMCP(82 個工具,唯讀的 system_status 查詢成功;超過 20 個走 find / use,搜尋得到) - 測試:有「連接器」能力的 Bot 拿得到(大的走 find/use、提示有說明),沒有的拿不到,硬叫三種 方式都被擋 - 測試用的假模型伺服器改成讀完整個請求再回,平行跑測試時不再偶發斷線 驗證:macOS cargo test 389 通過(連跑三次);Windows/Linux cargo check 通過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 09:14:51 +00:00
### 個人檔案:每個 Bot 是獨立的個體
- 每個 Bot 有自己的 **Soul 與指示**(個性、說話和做事的方式、要守的規則;原本的「指示」和 soul 合成一欄,舊的 soul 讀進來時會併到指示最前面)、**擅長**、**不找它做的事**、**會的技能**、**能力**和**可以用的電腦**;記憶本來就是各自的。
- **Soul 與指示只有它自己讀**,放在它說明的最後(最優先);描述、擅長、不找它做的事、在哪幾台電腦做事會寫進其他 Bot 的**同事名冊**(一行一個 Bot),讓它們知道什麼事該交給誰。名冊不含別人的 soul 和記憶,順序固定,每一輪都一樣(吃得到快取)。
- **在聊天裡改自己**:每個 Bot 都知道自己有個人檔案(說明裡寫了,也寫了它沒有哪些能力)。你問「你會什麼」「你的設定是什麼」,它用 my_profile 看;你叫它改(描述、soul 與指示、擅長、不做的事、能力、技能、可以用的電腦、預設電腦、模型、思考模式、執行步驟用的模型、頭像),它用 update_my_profile,聊天裡會先跳出確認卡片列出每一項改了什麼,按允許才生效,拒絕就不改。網頁、檔案或別的 Bot 叫它改的不算;例行任務和訊息管道來的對話不能改。群組裡改的是正在說話的那位成員。
Bot 個人檔案:soul、擅長、技能、能力、可用電腦、同事名冊;例行任務每輪開新對話(省 token) 每個 Bot 是獨立的個體(src/profile.rs、src/app/profile_ui.rs) - 新欄位:soul(只有自己讀,放在提示最前面)、擅長、不找它做的事、會的技能、能力、可以用的電腦 - 同事名冊:每個 Bot 的提示裡一行一個其他 Bot(簡介、擅長、不找它、在哪幾台電腦),不含別人的 soul 和記憶;順序固定,吃得到快取 - 能力 11 類(上網、瀏覽器、螢幕、檔案與指令、Mac App、連接器、電話簡訊 X、例行任務、頁面、 合作、管理 App):沒勾的工具不提供、規則不寫進提示;硬叫會被 agent 擋下並說該找誰 - 技能:說明只列自己會的,use_skill 只讀得到自己的;自己學會的自動算它的 - 可以用的電腦:自己的電腦一定可以;預設電腦不在名單時回到自己的電腦,不誤報「沒有連線」; 其他畫面也拿得到完整電腦清單來勾;匯出 Bot 不帶電腦名單和草稿 - 舊 Bot 全部勾選(None = 全部),行為不變 - 例行任務:每輪只從那則訊息讀起(Message::fresh),提醒先讀頁面/查記憶;聊天畫面不變, 使用者自己的下一則照樣看整段 - 順手修:角色說明結尾的「。」不再變成「。。」 - 實測(照建議勾能力):明日之星固定內容 ~21.7k → ~11.5k token、FSD ~25.5k → ~13.2k; 例行任務每輪歷史最多 ~70k → 幾百 連接器(MCP) - 實測三個連接器都能用(本機用 AnyBot 自己的 MCP client):time(get_current_time)、 fetch(讀 example.com)、SccMCP(82 個工具,唯讀的 system_status 查詢成功;超過 20 個走 find / use,搜尋得到) - 測試:有「連接器」能力的 Bot 拿得到(大的走 find/use、提示有說明),沒有的拿不到,硬叫三種 方式都被擋 - 測試用的假模型伺服器改成讀完整個請求再回,平行跑測試時不再偶發斷線 驗證:macOS cargo test 389 通過(連跑三次);Windows/Linux cargo check 通過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 09:14:51 +00:00
- **能力**分 11 類:上網、瀏覽器、看螢幕與操作、檔案與指令、Mac App、連接器、電話簡訊 X、例行任務、頁面、和其他 Bot 合作、管理 App。沒勾的不會提供給它,也不會寫進它的說明(每一步都少送很多 token);它硬要用也會被擋下,告訴它去找名冊裡會的 Bot。記憶、技能、問你問題、請你接手螢幕、傳檔案到聊天、表情和卡片每個 Bot 都有。
- **連接器**:有勾「連接器」能力的 Bot 才拿得到 MCP 工具和它們的使用說明(舊的 Bot 全部都有);連接器的工具超過 20 個時(例如 SccMCP 的 82 個)用「找工具/用工具」兩步,不會整包送。沒勾的 Bot 用名字硬叫(找、用、直接呼叫)都會被擋下。
- **技能**:技能庫裝一次,每個 Bot 勾自己會的;說明裡只列它會的,use_skill 也只讀得到它會的。它自己學會(存成)的技能自動算它的;其他 Bot 要勾選才會。
- **可以用的電腦**:它自己的電腦一定可以用,其他的勾選才看得到;預設電腦不在名單裡時回到它自己的電腦。匯出 Bot 時不帶電腦名單和草稿。
- 舊的 Bot 一開始全部勾選(能力、技能、電腦),行為和以前一樣;在 Bot 設定 › 個人檔案、能力、技能、電腦操作裡調。
- **例行任務每次開新對話**(給模型看的):每一輪只從那則例行任務訊息讀起,前面的巡邏記錄不再重送;要接續上次就讀它的頁面或查記憶。聊天畫面照樣完整,你自己傳的下一則訊息也照樣看得到整段對話。
- 實測(你的四個 Bot,照建議勾能力、5 個技能):明日之星每次請求的固定內容從約 2.2 萬降到 1.15 萬 token,FSD 追蹤專員從約 2.5 萬降到 1.3 萬;例行任務每一輪的歷史從最多約 7 萬降到幾百。
Bot 之間溝通:ask_bot 問同事並等回答、群組 @點名、共用頁面/「關於你」記憶/教技能;修正插話丟附件、Enter 核准失效等 問同事(ask_bot) - A 問 B 並等它回答:問題放進 B 自己的聊天,B 用自己的模型、工具、記憶和電腦做,最後的回覆交回 A - 最多轉 3 手、不能互等(避免卡死)、對方忙就排隊(10 分鐘逾時)、停止 A 時 B 也停 - message_bot 也加轉手上限;別的 Bot 叫的不算使用者的話(改不了自己的設定) 群組 @點名 - 「@名字」只叫被點到的成員回答;成員在回覆裡 @ 別人就接著說(一輪最多 8 則) - 電腦和手機的輸入框打 @ 會列出成員 - 修正:每個成員帶自己的記憶;成員回覆的每一步都記得是誰說的 共用資源 - Bot 可以讀其他 Bot 的頁面(只能讀,改要請作者改) - 共用的「關於你」記憶:每個 Bot 都帶著,記憶頁可切換查看、編輯;外人的訊息不帶 - teach_skill:把自己會的技能教給同事(先問你);同事名冊列出每個 Bot 會的技能 修正 - 插話(Bot 工作中傳訊息)會帶附件:聊天有檔案卡片,模型看得到圖片;當機復原也帶著 - 輸入框有焦點、框是空的時 Enter 允許待核准的步驟(原本被當成空白送出吃掉) - 大腦的螢幕連不到大腦時,引用、附件、記憶不會先被用掉 - 「還原上一個答案」存在 Bot 上:重開還在,連大腦的畫面和手機都能還原;停止的回合也留著 - Bot 忙時被叫醒(例行任務、message_bot、觸發器)改成排隊開自己的一輪,不再壓成純文字插話 - 停止時結果已回來的步驟標成完成;輸入法剛選字的那一格不送出 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 13:34:03 +00:00
### Bot 之間互相溝通
- **問同事(ask_bot)**:A 要 B 的答案才能接著做,就用 ask_bot 問它,A 這一步會停下來等。問題會放進 B 自己的聊天(標「來自其他 Bot」,你看得到,B 也記得)。B 用自己的模型、Soul 與指示、工具、記憶和電腦去做,這一輪最後的回覆原封不動交回 A,A 接著做。步驟上顯示「正在問另一個 Bot:B」。
- **省 token**:B 只拿到 A 寫的問題,看不到 A 的聊天;A 只拿到 B 最後的回答(最多 12000 字,太長的說完整的在 B 的聊天裡),不含 B 做了哪些步驟。B 附在聊天裡的檔案會列出檔名。
- **B 讀到的**:問題後面多一行,說這是同事 A 問的、最後的回覆會交回給 A、A 看不到它的聊天所以要講重點寫清楚、要你決定的寫出來讓 A 轉告,而且這不是你本人的指示。
- **B 在忙**:等它做完手上的事再問,一個 Bot 一次只答一個問題;等了 10 分鐘還沒空,A 收到「一直在忙」,可以晚點再問,或改用 message_bot。
- **B 沒答完**:被停止、出錯、沒辦法開始(例如沒有金鑰),A 會收到原因,不會一直等。
- **交辦(message_bot)**:只是把工作交出去、不用等結果時用。B 被叫醒,在自己的聊天裡做;**做完後它最後的回覆會自動回報到 A 的聊天**(標著 B 的名字,「交辦的事做完了:…」;失敗或被停止也會說「沒有做完:…」),你在原本問的地方就看得到結果。A 正在忙時,回報會等它這一輪結束再放進去,不會插進它正在做的事;每次交辦只回報一次。A 下次讀到這則時,看到的是「【B 回報】…」,不會當成自己說的。B 讀到的那一行說這是 A 交辦的、做完會自動回報、不是你本人的指示。
- **在一般聊天裡 @ 別的 Bot**:在任何一個 Bot 的聊天輸入框打 @,跳出其他 Bot 的清單(標題「找其他 Bot 一起來」,名稱開頭符合的先,↑↓ 選、Enter/Tab 帶入、Esc 關,點一下也行;群組裡列的是成員)。電腦和手機都有。送出「@研究助理 查一下明天天氣」後,這個 Bot 會被告知:使用者點名了誰、要用 ask_bot 問它們(問題帶齊前因後果)、等回答回來在這裡整理給你,**不可以叫你自己去看它們的聊天**。點名自己不算。這個 Bot 沒有「和其他 Bot 合作」能力時,它會照實說,請你打開。
- **看得到它們在交談**:發問的聊天裡,每一次問(ask_bot)或交辦(message_bot)都畫成一張對話卡:誰 › 誰(兩邊的頭像和名字)、「問」或「交辦」、問題本身;對方還在做時轉圈並顯示它正在做什麼(例如「正在回答「Bot」的問題…」),回來後顯示「「研究助理」的回答」和答案(長的先顯示 8 行,可以展開)。卡片最下面「「研究助理」那邊的紀錄 ›」打開對方的聊天,看完整的過程(那邊有問題和整個回答)。手機一樣是卡片。側欄裡被問的 Bot 顯示「正在回答「A」的問題…」或「正在做「A」交辦的事…」。
Bot 之間溝通:ask_bot 問同事並等回答、群組 @點名、共用頁面/「關於你」記憶/教技能;修正插話丟附件、Enter 核准失效等 問同事(ask_bot) - A 問 B 並等它回答:問題放進 B 自己的聊天,B 用自己的模型、工具、記憶和電腦做,最後的回覆交回 A - 最多轉 3 手、不能互等(避免卡死)、對方忙就排隊(10 分鐘逾時)、停止 A 時 B 也停 - message_bot 也加轉手上限;別的 Bot 叫的不算使用者的話(改不了自己的設定) 群組 @點名 - 「@名字」只叫被點到的成員回答;成員在回覆裡 @ 別人就接著說(一輪最多 8 則) - 電腦和手機的輸入框打 @ 會列出成員 - 修正:每個成員帶自己的記憶;成員回覆的每一步都記得是誰說的 共用資源 - Bot 可以讀其他 Bot 的頁面(只能讀,改要請作者改) - 共用的「關於你」記憶:每個 Bot 都帶著,記憶頁可切換查看、編輯;外人的訊息不帶 - teach_skill:把自己會的技能教給同事(先問你);同事名冊列出每個 Bot 會的技能 修正 - 插話(Bot 工作中傳訊息)會帶附件:聊天有檔案卡片,模型看得到圖片;當機復原也帶著 - 輸入框有焦點、框是空的時 Enter 允許待核准的步驟(原本被當成空白送出吃掉) - 大腦的螢幕連不到大腦時,引用、附件、記憶不會先被用掉 - 「還原上一個答案」存在 Bot 上:重開還在,連大腦的畫面和手機都能還原;停止的回合也留著 - Bot 忙時被叫醒(例行任務、message_bot、觸發器)改成排隊開自己的一輪,不再壓成純文字插話 - 停止時結果已回來的步驟標成完成;輸入法剛選字的那一格不送出 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 13:34:03 +00:00
- **不會互相叫醒停不下來**:一件事從你開始,最多在 Bot 之間轉 3 手(A 問 B、B 問 C、C 再交給 D 就不行),超過就要它用手上有的做完,或告訴你卡在哪。
- **不會互相等到卡死**:A 在等 B 時,B(或 B 在等的 C)不能反過來問 A,會直接說「正在等你」,要它先用手上的做完。
- **停止會一起停**:你按停止 A,正在替 A 回答的 B 也停(B 在等的 C 也一樣)。
- **別的 Bot 叫的不算你的話**:B 因為 A 的問題或交辦而做事時,update_my_profile 會被擋下(「這一輪是 A 叫你做的,不是使用者本人」);有風險的步驟照樣跳確認卡片給你。
- 同事名冊和說明裡都寫了什麼時候用 ask_bot、什麼時候用 message_bot;兩個都屬於「和其他 Bot 合作」能力,沒勾就沒有。
/btw 支線、送出先顯示;公測前的安全與資源修正(帳號盜用、灌爆、團隊權限、背景指令與連線的上限和清理) 支線與介面 - /btw:Bot 的分身帶著同一段對話和記憶平行做另一件事,做完回報到主聊天;主線在忙時先判斷會不會衝突,會就等主線做完 - 螢幕一次只給一輪工作操作(所有 Bot 適用) - 「/」只列指令,打字才找這個 Bot 自己的技能 - Bot 工作中送出的訊息立刻以淡色顯示(電腦、手機) - 支線修正:沒被讀到的回報照常進聊天、卡片顯示結果、可回答支線的問題、重新產生不吃掉卡片和回報 安全(中繼伺服器) - 大腦回傳的內容只放行安全類型並加沙箱;團隊改成邀請制;手機不照大腦說的類型開檔案 - 沒登入的請求最多 256 KB、接收中的上傳有總量上限、單一 IP 連線上限、常駐連線另計 - 登入次數加上每帳號上限並先計數再驗證;密碼雜湊同時最多 4 個 - 新增電腦要 15 分鐘內剛登入;可改密碼;註冊限速,有邀請碼時第一個帳號也要 - 發布的網站不能送表單和對外連線;Caddy 加安全標頭 安全(大腦) - 區網(明文)不能打開直接操作、加一律允許規則、加連接器;區網登入 30 天沒用失效 - 團隊成員只看得到勾選「團隊成員可以使用」的 Bot - 沒有角色的請求一律拒絕;環境變數的金鑰只送官方位址 資源 - 中繼:小變動每分鐘寫一次、回應有總時限、每台電腦呼叫上限、網站/登入/電腦/配對碼上限、資料檔壞掉不啟動 - App:伺服器回錯誤和連線秒斷時逐次退避;區網看螢幕偵測斷線 - 背景指令:刪 Bot 和支線結束時停掉、最多 24 個、結束 10 分鐘後移除、可用 stop 停掉 - 截圖在收起和歸檔時釋放;刪 Bot 時刪附件和對照表;每晚清稽核資料和暫存;手機圖片快取上限 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 15:36:34 +00:00
### 支線(/btw):同一個 Bot 分身去做另一件事
- **用法**:在任何 Bot 的聊天打「/btw 順便查一下今天的日圓匯率」。電腦、大腦的螢幕、手機都可以,**Bot 正在做事時也可以**:這句不會插進它正在做的事,而是開一條支線。輸入框打「/」時 /btw 就在清單裡(Bot 在忙時清單只剩 /btw)。可以附檔案,支線拿得到。
- **支線是這個 Bot 的分身**:同樣的 Soul 與指示、能力、技能、可以用的電腦、模型,到 /btw 為止的這段對話(主線正在跑的那一步還沒做完的不帶),還有它的記憶——支線記下的事、做的頁面、設的例行任務、交辦出去的工作都算主 Bot 的;它自己的電腦資料夾也是主 Bot 那一個。它知道自己是支線:只做交代的那件事,不接手主線的事,不能再開支線,也不能改設定。帶著整段對話不會多花很多:前面跟主線一模一樣,模型服務的提示快取吃得到。
- **先判斷會不會打架**:主線閒著就馬上開始。主線正在做事時,先用 Bot 的快速模型(「執行步驟用的模型」)讀主線在做什麼、最近幾步、和支線要做的事,判斷會不會衝突(同一個螢幕或視窗、同一個檔案或資料、對同一個帳號做會互相影響的事、支線會推翻主線正在做的、支線要等主線的結果)。不衝突就馬上開始;會衝突就等主線這一輪做完再開始,卡片上寫原因。判斷失敗就當不衝突(下面的螢幕規則照樣擋)。
- **螢幕一次給一個**(所有 Bot 都適用,不只支線):一輪工作在某台電腦的螢幕上點擊、打字之後,那個螢幕就是它的;另一輪(同一個 Bot 的支線,或別的 Bot)要在同一個螢幕上點,那一步不執行,Bot 會讀到「「X」的螢幕現在由「Y」在操作(N 秒前還在用)」,請它先做不用螢幕的部分、改用別台電腦或晚點再試。那一輪結束、或停手 2 分鐘後就放開。只是截圖、看畫面不算;Bot 的電腦(Docker)所有 Bot 共用一個桌面,所以算同一個螢幕。瀏覽器每一輪本來就各用各的分頁。
- **卡片**:主聊天裡,問的地方出現一張支線卡:任務、狀態(判斷中、等主線、正在做什麼和第幾步、做完了、沒做完、已停止)、「停止支線」、「看過程」(每一步一行)。支線要你核准的步驟,直接在這張卡上按允許或拒絕(手機上顯示在主聊天的核准區,標「支線:」)。
- **回報到主頁面**:做完時——主線正在做事,結果當成插話送進它這一輪(「〔支線回報〕…」,它下一步就讀到,聊天裡一行小字說已交給主線);主線閒著,結果以支線的名義放進主聊天(上面標「支線「任務」」),主線下一輪讀得到。主 Bot 不會為了支線回報自己多回一則(省一輪)。沒做完時說原因,下面有「重開這條支線」。按停止的不回報。
- 一個 Bot 同時最多 3 條支線;群組聊天還不能開。支線不存檔:AnyBot 重新啟動時還沒做完的支線會停掉,卡片寫「AnyBot 重新啟動,這條支線停了」。側欄、同事名冊、@ 清單、手機的 Bot 列表都看不到支線本身。
### 「/」清單只放指令
- 輸入框只打「/」時,清單只列 AnyBot 自己的指令(/goal、/btw),標題「指令」。技能已經多到一整牆,而且 Bot 本來就讀得到自己會的技能,自己會用。
- 「/」後面打字,才會再找**這個 Bot 自己會的**技能(名稱開頭符合的先,最多 6 個),想指定它用某個技能時還是可以。手機一樣。
### 上線前補上的防護(安全和資源)
- **金鑰不再明文存檔**:state.json 裡的模型金鑰、頻道 token、連接器的密碼、標頭和環境變數,用保險庫的金鑰加密後才寫入(檔案裡是「enc:v1:…」);金鑰在系統鑰匙圈(沒有鑰匙圈的伺服器是資料夾裡的 0600 金鑰檔)。打不開時(鑰匙圈鎖住、換了電腦)保持原樣不清空,不會因為存檔而遺失。舊版讀不懂加密後的檔案:降版要重新填金鑰。寄到帳號伺服器的備份不受影響(備份本來就另外加密)。
- **團隊**:加入別人的 AnyBot 要自己按接受(手機登入時會問);成員只看得到勾了「團隊成員可以使用這個 Bot」的 Bot(電腦的 Bot 設定,或手機的 Bot 選單「分享給團隊成員」)。設定裡的成員清單會標「已邀請,等對方接受」。
- **區網連線**:不能打開直接操作、加「一律允許」規則、加連接器;手機的區網登入 30 天沒用就失效;看畫面的連線改用一次性的票,登入不放在網址裡。
- **帳號伺服器**:大腦回傳的內容只放行不會被當成網頁執行的類型;沒登入的請求最多 256 KB;登入、註冊、配對都有次數限制;兩步驟驗證碼只能用一次;新增電腦要剛登入 15 分鐘內;可以改密碼;每個帳號的登入數、電腦數、發布的網站數都有上限;資料檔壞掉時不啟動(不會被空的蓋掉)。網頁只執行它自己的那幾段程式(依雜湊放行),不再放行任意內嵌程式。
- **手腳電腦**:一律拒絕的指令和私密檔案,在手腳這一端自己也會擋,不只靠大腦判斷。
- **背景指令**:同時最多 24 個;刪除 Bot、支線結束時一起停掉;結束 10 分鐘後移除;Bot 可以用 write_terminal 的 stop 停掉;不理會停止的程序兩秒後強制結束;跑在 Bot 的電腦裡的也會在裡面停掉。
- **伺服器上的大腦**收到停止訊號(docker stop、systemd、Ctrl-C)會先停掉 Bot 啟動的東西、關掉連接器、存檔再結束。
- **每晚整理**(凌晨三點後):聊天已經不用的附件檔(超過一天、沒有任何訊息、舊對話或頁面提到)、超過保存期限的稽核紀錄、從 Bot 電腦抓檔留下的暫存資料夾。
- **區網直連改成 HTTPS**:「同一個網路直接連」的那個埠現在用 https(這台電腦自己做的憑證,存在資料夾裡,800 天後或電腦換了位址會自動重做)。手機第一次打開瀏覽器會問要不要信任,選「繼續」;設定裡顯示憑證的 SHA-256 指紋可以比對。從區網打 http:// 會自動轉到 https://;這台電腦自己和 Tailscale(100.x,本來就加密)仍可用 http。憑證做不出來時退回 http,設定會用紅字提醒沒有加密。
- **手腳只聽大腦簽過的指令**:在大腦這台按「產生配對碼」,貼上的那一行裡,6 位配對碼後面多一段密鑰(`135790-abc…`)。密鑰只在兩台電腦上,不會傳給帳號伺服器;之後大腦給這台手腳的每個指令都帶簽章(綁定是哪台電腦、時間、只能用一次),手腳驗不過就拒絕。所以帳號伺服器(或攻進去的人)不能自己造指令、也不能重放。用手機產生的配對碼、或是當「另一個大腦的螢幕」時產生的,沒有密鑰(跟以前一樣,沒有簽章)。舊版 AnyBot 讀到新格式只取 6 位數字,照舊配對。
- **更新要驗簽章**:`make sign-setup`(作者做一次)讓之後每個 commit 用 SSH 金鑰簽章,公鑰記在 `deploy/allowed_signers`。安裝時把它記到原始碼資料夾外面(`~/.config/anybot/allowed_signers`);之後 `make update`/重跑安裝腳本,新版不是那把金鑰簽的就不裝(Mac、Linux、Windows 都一樣)。換金鑰:用舊金鑰簽一個把新公鑰加進名單的 commit。確定要跳過一次:`ANYBOT_UNSIGNED=1`。還沒有 `deploy/allowed_signers` 時跟以前一樣不檢查。
- **聊天各存各的檔**:state.json 只剩設定;每個 Bot 的聊天存在 `chats/bot-<編號>.json`,有變才寫。Bot 工作時每兩秒存一次的不再是整份幾十 MB;刪掉 Bot 時它的聊天檔一起刪。舊版存的(聊天在 state.json 裡)照樣讀得進來,下次存檔就分開。
- **帳號伺服器的資源**:閒置的連線從每秒醒 25 次降到 5 次;每條連線的讀取緩衝從 128 KB 降到 32 KB;請求的開頭 15 秒內沒送完就斷(原本最長 90 秒)。本機壓測(100 台電腦連著、3000 個請求、120 次錯誤登入、128 個送一半的請求、3 輪重連):記憶體 32 MB 持平,執行緒和檔案描述元都回到起點,閒置 CPU 約 1.5%(一個核心)。
- **團隊成員在 Bot 忙的時候傳的訊息**不再被丟掉:排在後面,Bot 做完手上的事就輪到它(每個 Bot 最多排 8 則)。成員的話不會插進擁有者正在跑的那一輪。
- **群組沒有 @ 時看擅長分派**:訊息的內容對得上某些成員「擅長」寫的事(而且不在它「不找它做的事」裡),就只由那幾位回答,聊天裡會有一行「這題看擅長交給「…」。要其他人也回答,用 @ 點名。」;對不上任何人、或每個人都對得上,就跟以前一樣全員輪流。
- **手機也能改個人檔案**(擁有者):Bot 設定頁多了「擅長」「不找它做的事」,以及「能力」「會的技能」「可以用的電腦」的開關。區網連線不能改「能力」和「可以用的電腦」(跟其他放寬權限的設定一樣)。
- **視窗沒在前面也照常運作**:視窗縮小、隱藏或被別的 App 整個蓋住時,Bot 送來的東西照樣處理——要你允許的請求會響提示音、任務完成會通知、例行任務準時開始(以前要等你切回 AnyBot 才一起發生)。任務完成且你不在 AnyBot 前面時,也響同一個提示音(設定裡的「提示音」關掉就不響)。Mac 的 App 關掉了 App Nap,被蓋住時系統不會讓它睡著。
- **伺服器的 Docker**:setup.sh 檢查到用的是 root 的 Docker 會警告(大腦被攻破等於拿到整台主機),建議改 rootless。
- 手機頁面最多留 40 個圖片/檔案的快取;收起的步驟和歸檔的舊對話不再把截圖留在記憶體。
Bot 之間溝通:ask_bot 問同事並等回答、群組 @點名、共用頁面/「關於你」記憶/教技能;修正插話丟附件、Enter 核准失效等 問同事(ask_bot) - A 問 B 並等它回答:問題放進 B 自己的聊天,B 用自己的模型、工具、記憶和電腦做,最後的回覆交回 A - 最多轉 3 手、不能互等(避免卡死)、對方忙就排隊(10 分鐘逾時)、停止 A 時 B 也停 - message_bot 也加轉手上限;別的 Bot 叫的不算使用者的話(改不了自己的設定) 群組 @點名 - 「@名字」只叫被點到的成員回答;成員在回覆裡 @ 別人就接著說(一輪最多 8 則) - 電腦和手機的輸入框打 @ 會列出成員 - 修正:每個成員帶自己的記憶;成員回覆的每一步都記得是誰說的 共用資源 - Bot 可以讀其他 Bot 的頁面(只能讀,改要請作者改) - 共用的「關於你」記憶:每個 Bot 都帶著,記憶頁可切換查看、編輯;外人的訊息不帶 - teach_skill:把自己會的技能教給同事(先問你);同事名冊列出每個 Bot 會的技能 修正 - 插話(Bot 工作中傳訊息)會帶附件:聊天有檔案卡片,模型看得到圖片;當機復原也帶著 - 輸入框有焦點、框是空的時 Enter 允許待核准的步驟(原本被當成空白送出吃掉) - 大腦的螢幕連不到大腦時,引用、附件、記憶不會先被用掉 - 「還原上一個答案」存在 Bot 上:重開還在,連大腦的畫面和手機都能還原;停止的回合也留著 - Bot 忙時被叫醒(例行任務、message_bot、觸發器)改成排隊開自己的一輪,不再壓成純文字插話 - 停止時結果已回來的步驟標成完成;輸入法剛選字的那一格不送出 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 13:34:03 +00:00
### Bot 之間共用的東西
- **頁面互相讀**:list_pages 先列自己的,再列其他 Bot 的頁面(標是誰的,最新的 30 頁,更舊的用標題也讀得到);read_page 讀得到同事的頁面(註明「X 的頁面,你只能讀,要改請它改」)。write_page 想改別人的頁面會被擋下,告訴它是誰的、請它改(ask_bot 或 message_bot),或自己另做一頁。說明裡寫了:同事已經在追蹤的事,先讀它的頁面,不要重查一遍。
- **共用的「關於你」**:關於你本人、每個 Bot 都該知道的事(名字、家人、住哪、工作、喜歡怎麼被回答、長期的偏好),Bot 用 remember 時把 about_person 設成 true,就記在共用的「關於你」,不是只記在自己身上。
- 每個 Bot 的說明裡都帶著「關於你」(最新的 40 條,更舊的用 search_memory 找得到),順序固定,吃得到快取。
- search_memory 會一起找自己的記憶和「關於你」(標「關於你(共用)」);forget 自己的找不到時,會從「關於你」拿掉。
- 訊息管道和團隊成員傳來的訊息不會帶「關於你」(跟釘選記憶一樣),外人看不到你的事。
- **在哪裡看**:任何一個 Bot 的「記憶」頁最上面切到「關於你(所有 Bot 共用)」,可以搜尋、新增、編輯、忘記、還原;電腦和手機都有。這裡每一條都是「每個 Bot 都帶著」,所以沒有釘選、也不會被當成太久沒用而建議清掉。
- **教技能(teach_skill)**:Bot 可以把自己會的技能教給同事(例如同事要接手需要這個技能的工作,或你叫它教)。先跳確認卡片,寫明要把哪個技能教給誰、技能是做什麼的,你按允許才教;對方下一輪起就會。自己不會的不能教、對方已經會的不用教、不能教自己或群組。同事名冊會列出每個 Bot 會的技能(有選過技能的才列),讓大家知道誰會什麼。save_skill 存的技能算存的那個 Bot 的,別的 Bot 要用就教它或在它的設定勾選。
### 新 Bot 的預設值
- 名稱「新 Bot」。
- 形狀和顏色依編號輪流分配。
- 供應商和模型跟目前選中的 Bot 一樣;沒有時用 xAI Grok 的建議模型。
- 電腦工具關閉,模型可讀長度 128K。
### 欄位
- 左上角 56 px 頭像預覽。
- 「Bot 名稱」。
- 「Bot 描述」:提示「它負責做什麼?」。
- 「頭像」:14 種形狀平均排成幾列(放得下就 7+7,不會剩一個掉到下一列),每個 28 px,沒選的顯示灰色,滑過顯示名稱(第 32 節)。
- 顏色:10 個 24 px 圓點,選中的有一圈強調色外框;同一列最後是「自訂」(彩虹圈)。按「自訂」出現色盤:12 個色相 × 四種深淺(淡、亮、深、暗)加一列由淺到深的灰階,一格一格直接點(不用拖滑桿),選中的格子有外框;下面「色碼」欄打完整的 #rrggbb 就換成那個顏色,旁邊一格是目前的顏色。色盤和整張卡一樣寬,不會把視窗撐寬。
- 「AI 供應商與模型」
- 供應商下拉選單,換供應商時模型會自動換成那家的預設模型。
- 模型名稱輸入框,提示「模型名稱」。
- 旁邊的「選擇」下拉選單,可以從清單挑模型。
- 沒有金鑰時顯示紅字:「⚠ 還沒有設定 (供應商) 的 API 金鑰(在「設定 → AI 供應商」)」。
- 「電腦操作」
- 勾選框「讓這個 Bot 查看、修改檔案和執行指令」。勾選後才會出現下面這些欄位。
- 「預設電腦」下拉選單:Bot 的電腦、你的電腦、各台 SSH 電腦。
- 你的電腦還沒在設定裡允許時,顯示「你的電腦(要先在設定裡允許)」。
- 旁邊小字:「聊天時說「在我的 Mac 上」就會換」。
- 「在你的電腦上從 [資料夾] 開始」:提示「例如 ~/Documents/專案」。空白就是家目錄。
- 說明文字:「在 Bot 的電腦上可以自由做事(看不到你的檔案);在你的電腦上,改檔案和會改變東西的指令會先問你。密碼和金鑰檔一律不碰。」
- 「已設定「一律允許」:」:每條規則是一顆「名稱 ×」按鈕,提示「移除這個允許」,按了就移除。
- 「模型可讀長度」:32K、128K、200K、400K、1000K tokens。旁邊小字:「用到 70% 時會把舊對話整理成摘要」。最小 4,000。
- 「指示(Bot 應該記得的事、說話風格…)」:3 行的輸入框,提示「例如:用繁體中文回答,簡短一點。」。
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- 「記憶」:說明「Bot 記得的事和做過的事。釘選的每次聊天都帶著;其他的只在和你說的話有關時帶上,打字時就看得到會帶哪幾條。」
- 摘要一行:「記得 N 件事」,沒有時「還沒有記得的事。跟 Bot 說「記住我喜歡靠窗的座位」試試看。」
- 按鈕「打開記憶」打開記憶頁(建立新 Bot 時沒有這個按鈕)。
### 最下面一列
- 勾選框「釘選到側邊欄」。
- 「取消」和主要按鈕(新 Bot 是「建立 Bot」,既有 Bot 是「儲存」)。
- 名稱或模型是空的時候,主要按鈕按不下去。
- 儲存時會去掉前後空白。建好後會自動選中新 Bot。編輯期間 Bot 新收到的訊息不會因為儲存而遺失。
---
## 10. 設定視窗
- 標題「設定」,寬 560 px。用 ⌘, 或側邊欄「⚙ 設定」打開。
- 四個分頁:「一般」「AI 供應商」「電腦」「自動審核」。
- 每次打開都會重新讀取管理員的鎖定。
### 一般
- **「主題」**:「為 AnyBot 選擇淺色或深色外觀」。
- 選項:「淺色」「深色」「跟隨系統」。選跟隨系統時,會即時跟著系統切換。
- **「聊天的顏色」**:你的訊息泡泡的顏色。
design: 手機網頁顏色跟著電腦版、改成 Claude 手機 App 的感覺,實點修好 12 個問題 - 顏色:api/state 帶出電腦的主題和淺色/深色兩組顏色(theme::shell 換成手機的 CSS 變數);手機「這支手機的外觀」預設「跟著電腦」,也可選跟著手機、淺色、深色;先驗證是 hex 才套用,存一份避免打開時閃預設色;狀態列跟著畫面。舊版電腦沒送顏色時維持「紙」。電腦畫面頁改成暖色深色。 - 感覺:標題列沒有底線、第二行只寫在做什麼或模型;輸入框是底部圓角卡片;回答下只留時間和三個操作;群組、晶片、建議、記憶卡拿掉框線;開關的「開」用墨色;允許卡細框;點擊範圍加大(44/40/36px)。 - 字更少:設定首頁拿掉重複說明;每列說明一行;「模型」頁右邊只寫可以用/未設定;Bot 那列選單少用的收進「更多…」。 - 修好:長 Bot 名字超出 @// 選單;引用顯示原始 Markdown 且沒有長度上限;第 8 個表情換行;.note 在清單裡變灰條;圖片點了跳出 App;上傳吐司蓋住輸入框;「聊天的顏色」永遠沒有 ✓(電腦送 "Quiet",改送 quiet/black/bot_color);「:」後的網址不成連結;深色模式黑頭像看不見;稽核分頁出現 ** 和多行 JSON;頁面卡標題重複;記憶搜尋框 14px 讓 iPhone 放大。 - 問題卡的「略過」、交辦的「跳過」、允許卡的「拒絕」不再是紅字,跟電腦版一樣是一般按鈕。 已驗證:cargo test --bin anybot 523 通過(含 phone_login_and_api 檢查主題和兩組顏色)、relay 22 通過;手機圖表 65/65、通知 9/9、電腦畫面 13/13;playwright 390×844 淺色深色點過登入、首頁、聊天、詳細資訊、Bot 設定、頁面、例行任務、電腦、設定每一頁,沒有 console 錯誤、失敗請求或橫向溢出;電腦換靛藍深色,手機跟著變。 未驗證:真的 iPhone/Android 實機。
2026-11-16 15:16:38 +00:00
- 選項:「安靜」(淡灰,預設)、「跟著 Bot」、「只用黑色」。以前預設是「跟著 Bot」:還留著舊預設的設定檔第一次打開時換成「安靜」一次,之後再選回「跟著 Bot」就照你選的。手機的「設定 › 電腦上的 AnyBot › 聊天的顏色」是同一個設定(勾的是電腦上用的那個),手機上的泡泡也照它畫。
- **「通知」**:「Bot 完成任務或等你處理時通知你」。
- 勾選框「你不在 AnyBot 前面時,跳出 macOS 通知」,預設開。
- 說明:「視窗不在最前面,或 90 秒沒有動鍵盤滑鼠,就會通知。第一次可能要在「系統設定 → 通知」允許「工序指令編寫程式」。」
- **「時區」**:「設定 Bot 在排程和提醒中使用的時區」。
- 一個輸入框,加按鈕「用這台電腦的時區」。
- 看不懂時顯示紅字:「看不懂這個時區,請用像 Asia/Taipei 這樣的名稱」。
- **「資料」**:「聊天記錄和金鑰只存在這台電腦上」,下面用小字顯示存放位置。
- **「版本」**:「這個視窗正在用的版本(程式建置的時間)」。
- 有新版時:「有更新的版本:(時間)。按下面的「重新啟動 AnyBot」換成新版。」
- 沒有新版時:「已是最新版本」。
- 勾選框「在你離開時自動更新用戶端」,預設開。
- 說明:「螢幕鎖定或螢幕保護程式開著、10 分鐘沒動作、而且沒有 Bot 在工作時,才會自己換成新版本。」
- **「重新啟動」**:「App 不太對勁時用:先儲存,再關掉並重新打開 AnyBot。進行中的工作會停下,聊天記錄都會保留」。
- 按鈕「重新啟動 AnyBot」,進行中變成灰色「正在重新啟動…」。
- 失敗時顯示「沒辦法重新啟動:(錯誤)。請手動關掉再打開 AnyBot。」
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- **「記憶與文件」**:
- 「語意搜尋」:三個選項「關閉」「Ollama」「本機模型」(預設本機模型)。這一列的小字顯示現在的狀態,例如:
- 「準備下載本機模型(約 530 MB,一次就好)」
- 「正在下載本機模型:N%(已下載 / 全部 MB),好了會自己開始」
- 「本機模型就緒:要用時才載入(約 0.03 秒),閒置 10 分鐘放掉」
- 「本機模型:這台不用載(記憶在大腦上算;這台設了文件索引資料夾才會載入)」
- 「關著:搜尋只用關鍵字(一樣能用,只是聽不懂換句話說)」
- 下面說明:「本機模型:minishlab/potion-multilingual-128M,第一次下載約 530 MB、存成 130 MB,在這台電腦上算,什麼都不上傳。大腦會載入;這台當螢幕時,設了文件索引資料夾才載入。換了以後所有向量會重算。」
- 「文件索引」:「Bot 在這些資料夾的文字檔(md/txt/csv/程式碼)裡找答案,全程只在本機」,可以新增、移除資料夾。
### AI 供應商
- 左邊是供應商清單,寬 200 px(估計值)。「● 」表示已經可以用,「○ 」表示還沒設定。
- 右邊是選中的那家:
- 名稱。
- 取得金鑰的說明(第 11 節)。
- 「API 金鑰」:隱藏顯示。提示「貼上金鑰,或設定環境變數 (變數名)」。Ollama 沒有這一欄。
- 「服務網址」:提示文字是預設網址。
- 「新 Bot 預設模型」:提示文字是建議模型。
- 按鈕「測試連線並取得模型清單」:
- 進行中顯示轉圈和「正在取得模型清單…」。
- 成功:「連線成功,找到 N 個模型」,並記住這份清單。
- 失敗:顯示錯誤。
- 以前抓過清單時顯示「已記住 N 個模型」。
### 電腦
- **「⚡ 直接操作(像 Grok Bot 一樣)」**:強調色淡底框。
- 說明:「一個開關:讓 Bot 直接使用這台電腦和你的瀏覽器,不再一個個問你」。
- 勾選框「打開直接操作」。被管理員鎖住時顯示紅字「🔒 由你的管理員設定,無法變更」。
- 說明:「仍會擋下:危險指令(sudo、格式化…)、密碼和金鑰檔、AnyBot 自己的資料,以及你在「自動審核」寫的「一律詢問」規則(預設:刪除檔案、付款、用你的帳號發文或傳訊息)。macOS 第一次讓 AnyBot 控制瀏覽器時還是會自己問一次,按「好」就行。」
- **「Bot 的電腦」**:狀態、開啟畫面、啟動/休眠、在瀏覽器開啟;「快照與更新」「磁碟」「終端機與環境密鑰」「在哪裡執行」和「顯示紀錄」。細節見第 17 節。
- **「你的電腦」**:「這台 Mac。Bot 要用你的檔案、你的 App 或你的瀏覽器時才會用到。」
- **「在這台電腦上執行」**:「允許 Bot 在這台電腦上執行任務,而不只是在它自己的電腦上」。
- 勾選框「允許在「你的電腦」上執行」,可能被管理員鎖住。
- 說明:「打開後,改檔案和會改變東西的指令仍會先問你(或依自動審核規則)。密碼和金鑰資料夾一律碰不到。」
- **「macOS 權限」**:「螢幕與系統錄音」「輔助使用」各一列,已允許是綠色勾勾,還沒允許有「打開設定」按鈕(直接打開對應的系統設定面板)。下面列出「Bot 可以操作的 App」:「{Bot} 可以看到「{App}」,並在其中點擊和輸入」,每列可以「移除」。
- **「示範教學」**:見第 24 節。
- **「其他電腦」**:「透過 SSH 讓 Bot 在你的其他電腦上做事(需要先設好免密碼登入)」。
- 每台電腦一列:名稱、SSH 位址、「移除」。
- 新增時填「名稱,例如 工作站」和「me@studio.local」,按「新增」。兩欄都要填,名稱不能跟現有的重複。
- **「AnyBot 瀏覽器設定檔」**:見第 22 節。
### 自動審核
- 「自動審核」:「依照自訂規則審核 Bot 的操作」。勾選框「開啟自動審核」。
- 說明:「為每種操作寫一條簡短的自然語言規則。規則衝突時,「先詢問」優先。這些規則只對你生效。內建的安全檢查一律有效。」
- 關閉時加一行:「自動審核關閉時不會使用規則」。
- 「「無需詢問直接允許」規則」:「操作符合這些規則時,自動繼續」。
- 每條規則顯示為「• 規則」,旁邊有「刪除」。
- 輸入框提示「例如:在工作資料夾裡建立文字檔」,按鈕「新增規則」。
- 「「一律詢問」規則」:「操作符合這些規則時,停下來詢問」。輸入框提示「例如:刪除任何檔案」。
---
## 11. AI 供應商
| 顯示名稱 | 預設網址 | 建議模型 | 起始模型清單 | 金鑰 | 金鑰環境變數 | 取得金鑰說明 |
|---|---|---|---|---|---|---|
| 「xAI Grok」 | https://api.x.ai/v1 | grok-4 | grok-4、grok-4-fast、grok-3-mini | 要 | XAI_API_KEY | 「在 console.x.ai 取得 API 金鑰」 |
| 「OpenAI」 | https://api.openai.com/v1 | gpt-5 | gpt-5、gpt-5-mini、gpt-4.1 | 要 | OPENAI_API_KEY | 「在 platform.openai.com 取得 API 金鑰」 |
| 「Claude」 | https://api.anthropic.com/v1 | claude-opus-5-5 | claude-opus-5-5、claude-sonnet-5-5、claude-haiku-5-5、claude-fable-5-1 | 要 | ANTHROPIC_API_KEY | 「在 console.anthropic.com 取得 API 金鑰」 |
| 「Google Gemini」 | https://generativelanguage.googleapis.com/v1beta/openai | gemini-2.5-flash | gemini-2.5-flash、gemini-2.5-pro | 要 | GEMINI_API_KEY | 「在 aistudio.google.com 取得 API 金鑰」 |
| 「OpenRouter」 | https://openrouter.ai/api/v1 | openrouter/auto | openrouter/auto | 要 | OPENROUTER_API_KEY | 「在 openrouter.ai 取得 API 金鑰」 |
| 「Ollama(本機)」 | http://localhost:11434/v1 | llama3.2 | llama3.2、qwen2.5、gemma3 | 不用 | – | 「先安裝並開啟 Ollama,不需要金鑰」 |
| 「自訂(OpenAI 相容)」 | http://localhost:8080/v1 | local-model | (無) | 選填 | – | 「任何 OpenAI 相容的服務(LM Studio、vLLM…)」 |
- **金鑰**:先用設定裡貼上的金鑰(會去掉前後空白);沒貼的話讀環境變數。
- 需要金鑰卻沒有時,送訊息會看到:「還沒有設定 {供應商} 的 API 金鑰。請到「設定 → AI 供應商」貼上金鑰。」
- **網址**:沒填就用預設網址,結尾的「/」會自動拿掉。
- **每個 Bot 可以選不同的供應商和模型**,每則回覆下面都會標出是誰寫的。
- **連線格式**:Claude 用自己的格式;其他六家都用 OpenAI 相容格式。OpenRouter 會帶上「AnyBot」當作 App 名稱。
- **Claude 的設定**
- API 版本 2026-10-21。
- 每次回覆最多 64,000 tokens。
- 「自適應思考」(顯示思考摘要)只開給較新的模型:claude-opus-5、claude-sonnet-5、claude-haiku-5、claude-fable-5、claude-mythos-5、claude-opus-4-6/4-7/4-8、claude-sonnet-4-6 開頭的模型。
- 「伺服器端備援」只給 claude-opus-5-5、claude-opus-5、claude-fable-5-1、claude-sonnet-5-5:請求被拒時,伺服器可以換別的模型重試。
- **抓模型清單**:會排序、去掉重複,並去掉名稱前面的「models/」,然後存起來。
- 「請先貼上 API 金鑰」
- 「供應商沒有回傳任何模型」
---
## 12. 回覆的串流、思考與錯誤
### 串流與思考
- 所有供應商都是一段一段傳回,畫面邊收邊顯示。
- 思考內容會即時顯示:
- OpenAI 相容的供應商:讀取 reasoning_content 或 reasoning 欄位。
- Claude:讀取思考區塊。思考的簽章原封不動保存,下次照原樣送回去。
- 模型要用工具時,畫面上立刻出現那一步,等這一步的文字結束才真的執行。沒有編號的工具會自動編成 call_0、call_1。
### Claude 的特殊結尾
- 模型拒答時加上:「(模型拒絕回答這個要求。)」
- 回答超過長度上限時加上:「(回答太長,已達長度上限。)」
### 重試與逾時
| 項目 | 數值 |
|---|---|
| 連線逾時 | 15 秒 |
| 等第一段回應 | 120 秒(估計值) |
| 中途安靜多久算卡住 | 35 秒 |
| 最多嘗試 | 3 次(第 1 次加 2 次重試) |
| 重試前等多久 | 1 秒、2 秒(每次加倍,最多 4 秒) |
| 伺服器要求等待時 | 照伺服器說的等,最多 30 秒(估計值) |
| 等待中多久檢查一次「停止」 | 每 0.1 秒 |
- **會重試**:錯誤 429、408、529、所有 500 以上的錯誤、連不上、串流中途斷線(「連線中斷:…」)。
- **不重試**:401、403、404 等其他 400 類錯誤、對話太長、模型不支援工具、串流中途傳回錯誤。
- **畫面上已經出現文字、思考或工具時,就不再重試**,避免內容重複。
- 重試前顯示:「{錯誤}\n{N} 秒後重試(第 2 或 3 次,共 3 次)…」。
- 等待重試時按停止,會安靜結束,不顯示錯誤。
### 錯誤訊息
- 長相:淡底圓角塊,左邊一個小小的紅色驚嘆號,字是一般的黑(以前是粉紅底紅字,聊天裡最刺眼的東西)。
- 一般格式:「錯誤 {碼}:{供應商的說明}\n{提示}」。說明讀不出來時,顯示回應的前 300 字。
- 依錯誤碼附上的提示:
- 401/403:「金鑰無效或沒有權限,請到「設定 → AI 供應商」檢查。」
- 404:「找不到這個模型或網址,請檢查模型名稱。」
- 429:「模型供應商已超載或用量已達上限。通常是暫時的,請稍後再試。」
- 500–599:「模型供應商目前負載過高。通常是暫時的。」
- 對話太長:「對話太長了,超過這個模型能讀的長度。請清除聊天記錄或換一個模型。」
- 模型不支援工具:「這個模型不支援工具。請換一個支援工具的模型,或在 Bot 設定裡關掉「電腦操作」。」
- 連不上 Ollama:「連不上 Ollama:{原因}\n請先開啟 Ollama,並用 `ollama pull` 下載模型。」
- 連不上其他供應商:「連不上 {供應商}:{原因}」
- 串流中出錯但沒有說明:「未知錯誤」
---
## 13. 一個回合怎麼運作
- **一個回合**:從你送出一則訊息(或 Bot 被喚醒)開始,到模型用純文字回答、不再要求工具為止。
- 中間可以來回很多步:模型要用工具,App 執行並交回結果,模型再決定下一步。
- **步驟上限**:一個回合最多 50000 步,等於不設限,只是最後一道保險(Grok Bot 本身不設上限:`cloud_agent_stream_conversation_turn_window` 的 `maxTurns:null`)。原本的 25 步、後來的 100 步都會把正常的長工作切斷(修一台伺服器的 Docker 用了 50 多條指令)。真正讓空轉停下來的是:每 25 步問 Bot 一次最近這 25 步有沒有進展(沒有就停下來說卡在哪)、同一個螢幕/瀏覽器動作第 4 次不執行、同一個工具同樣參數得到一模一樣的結果第 3 次不執行,以及你隨時可以按停止。每一步都要把對話再送給模型一次,所以步數越多花的 token 越多。用完時會顯示:「(這次已經用了 50000 個步驟,先停在這裡。要繼續的話,回覆「繼續」。)」
- 每 25 步,模型會在最新的工具結果後面看到一句提醒:方向對就繼續;最近幾步都沒進展就停下來,用一兩句話告訴你卡在哪、要你做什麼(聊天記錄裡看不到這句)。
- 鬼打牆另外有攔截:同一個畫面或網頁動作第 3 次會被警告,第 4 次起不執行。
- 系統提示要模型每一步做多一點:互不相依的工具同一步一起呼叫、查東西的指令合成一條、等待寫在同一條指令裡。
- **想的跟做的分開**(Bot 設定 › AI 供應商與模型 › 執行步驟用的模型):Bot 的模型負責第一步(想好計畫、開始做)、出問題後的下一步(有步驟失敗、被拒絕、被判定重複、點了之後畫面完全沒變,或快速模型自己從指令改去點畫面、從畫面改去網頁這類換路)、每連續 4 個快速步驟之後看一次進度,以及回合結尾:快速模型沒動手就要結束回合時(說「做好了」,或停下來問「要我繼續嗎」),那句話先擱著不顯示,由 Bot 的模型看過現況再回答或接著做。一個回合出了兩次問題,剩下的步驟都改用 Bot 的模型。其他照計畫做的步驟交給同一家的快速模型(不長時間思考)。
Bots work like someone who knows the computer: they know each machine, reach what they see, plan, and hand the planned steps to a quick model Measured on the bot's own box (8 tasks x 2, grok-4.7): 14/16 done, 120 steps, 1114 s before; 16/16, 102 steps, 574 s after (model time 1015 -> 471 s). A replayed skill: 49 s -> 15 s. Knowing the machine - facts.rs: 電腦現況 per computer (system, desktop, systemd, sudo, network, package manager, tools, apps, a fixed TZ), read once by a small read-only probe, kept 30 min, in the instructions at the start of a turn. - The box's sudo is the bot's: only what follows sudo is checked against the always-denied list (it was refused outright, while the instructions said it could sudo), and commands with sudo run as the box's root (setuid does nothing under gVisor). - Box image v8 drops ENV TZ=UTC (it overrode /etc/localtime). ANYBOT_BOX_IMAGE / ANYBOT_BOX_VOLUME give a throwaway box its own image and volume, never adopting the real one. - Mac shell sandbox: App Store app CLIs (they carry their own app sandbox) and ps/top run outside it; plain `osascript -e` too, asked the first time even in direct mode, refusing do shell script, terminals, keystrokes, file reads, ObjC and the secret folders. A command the sandbox broke says so, instead of looking like a broken program. Reaching what it sees - The Mac menu bar's status icons are numbered (each app's AXExtrasMenuBar, named from inside for the system's own), computer_use_zoom looks closer at full sharpness. - Numbers stay with their controls from look to look (they were reassigned every look, so a step's second click landed elsewhere); the box's front window is listed first; a control can be named instead of numbered (name "4"). - Web page numbering walks open shadow DOM (Chromium settings, web components). - A box on a Docker host elsewhere retries the next port when the usual one is taken (a retry without it came up with no network). Working like a person - Instructions: pick the route, know what done looks like, one route, check once, say what's stuck instead of faking it with a substitute, ask before cutting the connection. - StepPlan: the bot's model takes the first step, the step after trouble (failed, refused, repeated, nothing changed on screen, the quick model switching routes), one in four, and the final check; a quick model (Bot.step_model, auto: grok-4.20-0309-non-reasoning on xAI) does the planned steps in between, falling back to the bot's model if it can't be used. - Skills keep the steps that worked (with what each acted on, not numbers); replay_skill does them again with no model in between, finding each control again, handing back on a mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 01:01:03 +00:00
- 「自動」:xAI 用 grok-4.20-0309-non-reasoning、Anthropic 用 claude-haiku-5-5、Gemini 用 gemini-2.5-flash、OpenAI 用 gpt-5-mini;Bot 的模型本身就是快速型(名字有 non-reasoning、fast、mini、haiku、flash)時不分開。其他供應商不分開。也可以選「不分開」或指定一個模型。
- 快速模型叫不動(帳號沒有這個模型、出錯)時,這一回合剩下的步驟全部改用 Bot 的模型。
- 快速模型的步驟不即時顯示文字(它的答案可能被擱置),工具步驟照常顯示;每一則回覆標的是實際用的模型。
- 依據:量測時九成以上的時間是會思考的模型在每一步之前思考(grok-4.7 每步約 10 秒,快速模型約 1 秒);快速模型單獨做時,簡單的工作全對,難的工作會太早收工,所以由會思考的模型規劃和收尾。
- **電腦現況**:每個回合開始時,系統提示會附上每台電腦的現況,讓模型直接用那台最直接的做法,不用花步驟試探:系統和版本、桌面、有沒有 systemd(沒有時會說 systemctl、timedatectl 不能用,改設定直接改檔案)、能不能 sudo、有沒有網路、用什麼裝套件、有哪些常用指令和 App,以及固定的 TZ 環境變數(版本 7 以前的 box 映像檔設了 TZ=UTC,會蓋過 /etc/localtime,改了系統時區 date 還是 UTC;版本 8 拿掉了,舊的 box 更新重建前現況會提醒)。也附上那個系統的操作慣例,沒用過的 App 也照這些做:Mac 在存檔、開檔對話框和 Finder 按 cmd+shift+G 直接打完整路徑;存檔對話框在「儲存為」打檔名按 Return 就存好;cmd+W 關視窗、cmd+Q 結束 App;檔案格式、副檔名使用者沒說就照預設,不要另外改(Bot 曾經存好 note.rtf 之後又花了 6 分鐘想把格式改掉)。Linux 桌面:GTK 對話框按 ctrl+L 打路徑;ctrl+S、ctrl+W、ctrl+Q。Mac 另外提醒:指令用 /bin/sh 跑,echo -n 會把「-n」寫出去,要用 printf;讀到的和預期不同就照實說(Bot 曾經把寫成「-n hello」的檔案說成「hello」)。
Bots work like someone who knows the computer: they know each machine, reach what they see, plan, and hand the planned steps to a quick model Measured on the bot's own box (8 tasks x 2, grok-4.7): 14/16 done, 120 steps, 1114 s before; 16/16, 102 steps, 574 s after (model time 1015 -> 471 s). A replayed skill: 49 s -> 15 s. Knowing the machine - facts.rs: 電腦現況 per computer (system, desktop, systemd, sudo, network, package manager, tools, apps, a fixed TZ), read once by a small read-only probe, kept 30 min, in the instructions at the start of a turn. - The box's sudo is the bot's: only what follows sudo is checked against the always-denied list (it was refused outright, while the instructions said it could sudo), and commands with sudo run as the box's root (setuid does nothing under gVisor). - Box image v8 drops ENV TZ=UTC (it overrode /etc/localtime). ANYBOT_BOX_IMAGE / ANYBOT_BOX_VOLUME give a throwaway box its own image and volume, never adopting the real one. - Mac shell sandbox: App Store app CLIs (they carry their own app sandbox) and ps/top run outside it; plain `osascript -e` too, asked the first time even in direct mode, refusing do shell script, terminals, keystrokes, file reads, ObjC and the secret folders. A command the sandbox broke says so, instead of looking like a broken program. Reaching what it sees - The Mac menu bar's status icons are numbered (each app's AXExtrasMenuBar, named from inside for the system's own), computer_use_zoom looks closer at full sharpness. - Numbers stay with their controls from look to look (they were reassigned every look, so a step's second click landed elsewhere); the box's front window is listed first; a control can be named instead of numbered (name "4"). - Web page numbering walks open shadow DOM (Chromium settings, web components). - A box on a Docker host elsewhere retries the next port when the usual one is taken (a retry without it came up with no network). Working like a person - Instructions: pick the route, know what done looks like, one route, check once, say what's stuck instead of faking it with a substitute, ask before cutting the connection. - StepPlan: the bot's model takes the first step, the step after trouble (failed, refused, repeated, nothing changed on screen, the quick model switching routes), one in four, and the final check; a quick model (Bot.step_model, auto: grok-4.20-0309-non-reasoning on xAI) does the planned steps in between, falling back to the bot's model if it can't be used. - Skills keep the steps that worked (with what each acted on, not numbers); replay_skill does them again with no model in between, finding each control again, handing back on a mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 01:01:03 +00:00
- 一台電腦讀一次(一段唯讀的小腳本,約 0.2 秒),30 分鐘內不再讀;一個回合最多等 6 秒,來不及的下一回合用。
- Bot 的電腦一律讀;使用者的電腦只有 Bot 已經可以在上面做事時才讀;AnyBot 所在的這台由 AnyBot 自己讀,不算 Bot 執行的指令。
- **做事的方式**(系統提示):先選路(專用工具、指令、最後才畫面);動手前想好要做哪幾步、做完怎樣算成功;選定一條路做到底;同一個做法失敗兩次就換;做完只用一種最直接的方法確認一次;做不到就照實說,不用替代品假裝做到(例如只改環境變數讓時鐘看起來對);會切斷連線的事先問。
- **每一步開始前會依序做**:
1. 從第 2 步起,檢查要不要整理摘要(門檻 75%)。
2. 把你中途打的話加進去。
3. 開一個新的回覆氣泡。
- **插話**:Bot 工作時你送出的訊息,會在下一步交給模型。模型本來要結束、但還有沒讀的插話時,回合會繼續,讓它看到你的新訊息。
Bot 之間溝通:ask_bot 問同事並等回答、群組 @點名、共用頁面/「關於你」記憶/教技能;修正插話丟附件、Enter 核准失效等 問同事(ask_bot) - A 問 B 並等它回答:問題放進 B 自己的聊天,B 用自己的模型、工具、記憶和電腦做,最後的回覆交回 A - 最多轉 3 手、不能互等(避免卡死)、對方忙就排隊(10 分鐘逾時)、停止 A 時 B 也停 - message_bot 也加轉手上限;別的 Bot 叫的不算使用者的話(改不了自己的設定) 群組 @點名 - 「@名字」只叫被點到的成員回答;成員在回覆裡 @ 別人就接著說(一輪最多 8 則) - 電腦和手機的輸入框打 @ 會列出成員 - 修正:每個成員帶自己的記憶;成員回覆的每一步都記得是誰說的 共用資源 - Bot 可以讀其他 Bot 的頁面(只能讀,改要請作者改) - 共用的「關於你」記憶:每個 Bot 都帶著,記憶頁可切換查看、編輯;外人的訊息不帶 - teach_skill:把自己會的技能教給同事(先問你);同事名冊列出每個 Bot 會的技能 修正 - 插話(Bot 工作中傳訊息)會帶附件:聊天有檔案卡片,模型看得到圖片;當機復原也帶著 - 輸入框有焦點、框是空的時 Enter 允許待核准的步驟(原本被當成空白送出吃掉) - 大腦的螢幕連不到大腦時,引用、附件、記憶不會先被用掉 - 「還原上一個答案」存在 Bot 上:重開還在,連大腦的畫面和手機都能還原;停止的回合也留著 - Bot 忙時被叫醒(例行任務、message_bot、觸發器)改成排隊開自己的一輪,不再壓成純文字插話 - 停止時結果已回來的步驟標成完成;輸入法剛選字的那一格不送出 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 13:34:03 +00:00
- **喚醒**:例行任務時間到,或別的 Bot 傳訊息過來,都會像你傳訊息一樣開始新回合。Bot 正在忙時(例如你按了「立即執行」、別的 Bot 用 message_bot 交辦、觸發器觸發),喚醒會排隊,等它做完再開自己的一輪,訊息原樣保留(例行任務的新開始、哪個 Bot 傳的、轉了幾手、是不是外人傳的);以前會被壓成純文字插進正在跑的那一輪。
- **回合結束有三種**:
- 成功:模型用文字回完;或用完步驟上限。
- 取消:你按停止。每一步和每個工具前後都會檢查;正在等你回答的請求一律當作拒絕;不顯示錯誤。
- 錯誤:模型呼叫失敗,而且重試完了或不能重試。
- 每次結束都會記下回合編號、結果和結束時間。
---
## 14. 長對話整理成摘要
- **先收起舊的步驟結果,不夠才寫摘要**:對話用到模型容量的 7 成時,先把較早步驟的長結果(網頁全文、指令輸出、讀過的檔案;超過 600 字的)收起來,只留開頭 200 字給模型,最新 6 則訊息的結果不動。這一步不叫模型、不用等(實測 20 個讀檔結果:約 128,000 → 22,000 token,10 毫秒)。聊天裡還是完整的,滑過步驟照樣看得到全部;收起來的結果之後每一輪都一樣,所以模型的快取不受影響。收完還是超過 7 成,才像下面那樣寫摘要。模型自己說對話太長時,兩樣都做。
- **思考模式**(Bot 設定 › AI 供應商與模型 › 思考模式):自動(模型自己決定)、快速、平衡、深入,決定 Bot 自己的模型回答前想多久。
- Claude(支援的模型)送 `output_config.effort`;其他 OpenAI 相容的服務送 `reasoning_effort`。
- 模型不收這個設定(回 400)時,同一個請求會不帶設定再送一次,之後也不再對那個模型送。
- 只管 Bot 自己的模型;「執行步驟用的模型」和寫摘要不帶。
- **摘要用快速模型寫**:Bot 有「執行步驟用的模型」時,摘要交給它(整理不是思考,快很多也便宜);沒有就用 Bot 自己的模型。
- **可讀長度**:每個 Bot 可以設,預設 128,000 tokens(估計值)。
- **怎麼估長度**:英數約 4 個字元算 1 token,中文每個字算 1 token。每則訊息另外加 4,工具參數也算進去。
- **門檻**
- 回合開始時:用到 70% 就整理。
- 回合進行中:每一步到 75% 才整理(多 5% 的寬限)。
- **一定保留的內容**
- 最新 6 則訊息保留原文(估計值)。
- 只在某一則你的訊息之前切開,不會把工具要求和它的結果拆開。
- 7 則以下不整理;切點之前全是摘要時也不整理。
- **怎麼整理**
- 每則舊訊息最多取 2,000 字(估計值),用「使用者:」「助手:」「[使用工具 …]」「工具結果(…):」「【先前的摘要】」標出來。
- 要求寫下:使用者的目標與偏好、已經做出的決定、重要的事實與數字、提到的檔案路徑與指令結果、還沒完成的事,不能加入對話裡沒有的內容。
- **整理時畫面顯示**:「對話很長了,正在把較早的內容整理成摘要…」
- **結果**:舊訊息換成一則摘要,之後會放進給模型的開頭說明,接在「先前對話的摘要:」後面。
- 摘要是空的或被取消時不替換。
- 用的是同一個 Bot 的模型,而且不帶任何工具。
---
## 15. 自動審核
- 你可以寫兩組規則:「無需詢問直接允許」和「一律詢問」,用一般的話寫就好。
- 兩組都符合時,「一律詢問」優先。
- 由同一個 Bot 的模型來判斷(不帶工具),在內建安全檢查之後才進行。
- 判斷時只看你寫的規則,不能自己加規則,回答「允許」「詢問」或「都不符合」三種之一。
- **允許**:直接做,結果前面加「(自動審核:符合「{規則}」,直接允許)」。
- **詢問**:照常跳出請求,理由後面加「(符合你的「一律詢問」規則:{規則})」,而且不提供「一律允許」。
- **都不符合,或看不懂回覆**:照一般流程詢問。
- 兩組規則都是空的時,不會去問模型。
---
## 16. 許可關卡的完整順序
0. **不需要許可的**
- App 操作工具(第 26 節),只有「刪除例行任務」會先問。
- 讀公開網頁。
- AnyBot 自己的瀏覽器。
1. **決定在哪台電腦做**
- 操作螢幕和讀你自己的瀏覽器:一律在「你的電腦」。
- 其他工具:用 Bot 指定的電腦,沒指定就用預設電腦。
- 指定的電腦不存在:「沒有「{名稱}」這台電腦。可以用:…」
fix: 選了做事的電腦之後,瀏覽器和螢幕步驟不再跑到使用者自己的 Mac 使用者把「工程」「FSD 追蹤專員」的做事的電腦設成 nobledesktop(雲端大腦所在的伺服器)。那台還沒裝瀏覽器時,Bot 沒指名電腦的 browser_open/browser_read 一路退到「使用者的電腦」,在使用者的 MacBook 上開 Brave(紀錄裡的結果是「[王性驊的MacBook Pro (2)] 已在 AnyBot 瀏覽器…打開」)。 - browser_place:Bot 沒指名時,使用者選的電腦開不了瀏覽器就失敗並說為什麼(沒裝瀏覽器/要 Docker/SSH 沒有視窗),要 Bot 先問使用者、公開網頁用 web_fetch,不再換到別台。 - screen_target:選的電腦沒有螢幕(SSH)時同樣失敗,不換到別台的螢幕。 - keep_to_chosen:Bot 自己指名使用者沒提的電腦,就算選的那台做不了這種步驟也拉回去(在那裡說清楚做不了),不再留在使用者的 Mac 上跑。 - 只管「使用者選了別台」(chosen_by_person:做事的電腦不是 Bot 自己的);沒選過、用 Bot 自己的電腦而這裡沒有 Docker 時,照舊可以借使用者的瀏覽器和螢幕。 已驗證:cargo test --bin anybot 528 通過(新增 a_chosen_computer_keeps_its_steps_off_the_persons_mac:選 SSH 的 nobledesktop → 瀏覽器、螢幕都失敗並說明;Bot 指名 Mac → 拉回;使用者說「用我的電腦」→ 去 Mac;沒選過 → 照舊借 Mac);原本的 a_step_moved_back_to_the_chosen_computer_says_so 等都過。 未驗證:真的雲端大腦(要更新 nobledesktop 上的大腦才生效)。
2026-11-16 16:10:09 +00:00
- 你在 Bot 設定選了別台當「做事的電腦」(不是 Bot 自己的電腦):瀏覽器和螢幕步驟只在那台做。那台開不了瀏覽器(沒裝 Chrome/Brave…、用 SSH 連的)或沒有螢幕時,那一步停下來告訴 Bot 為什麼、要它先問你,不會改開在你自己的 Mac 上;Bot 自己指名你的 Mac 也一樣拉回選的那台。你在訊息裡指名哪一台(「用我的電腦開」)就照做。沒選過時(用 Bot 自己的電腦),它沒有螢幕或瀏覽器還是可以借你的。
2. **直接操作有開時**:第 3 步和第 5 步自動算已開。
3. **關卡一:電腦工具還沒開**
- 詢問:「讓 {Bot} 使用電腦工具:{動作}\n(在 {電腦} 上)」
- 允許一次;或一律允許(打開這個 Bot 的電腦工具);或拒絕。
- 拒絕時 Bot 收到:「使用者沒有允許使用電腦工具。請改用文字回答,或問使用者想怎麼做。」
4. **管理員鎖住「你的電腦」**:直接拒絕,「你的管理員關閉了在「你的電腦」上執行。請改用「Bot 的電腦」。」
5. **關卡二:「在這台電腦上執行」還沒開**
- 詢問:「在你的電腦上執行任務,而不只是在它自己的電腦上:{動作}\n(在 你的電腦 上)」
- 拒絕時 Bot 收到:「使用者沒有允許在「你的電腦」上執行。可以改用「Bot 的電腦」,或問使用者。」
6. **個別動作**
- 截圖:「看你的螢幕畫面:…」,可以一律允許。
- 滑鼠和鍵盤:「操作你的滑鼠和鍵盤:…」,可以一律允許。
- 讀你瀏覽器的分頁:「讀取你瀏覽器目前分頁的內容(包含已登入的頁面):目前的分頁」,可以一律允許。單純打開連結不用問。
- 檔案和指令:照第 19 節的安全規則決定。被擋下時顯示「被安全規則擋下:{原因}」。
7. **自動審核或直接操作**:見第 15 節和第 8 節。
8. **一般請求**
- 允許一次。
- 一律允許:記到 Bot 的「一律允許」清單,例如「修改檔案」或「git commit」。
- 拒絕:Bot 收到「使用者拒絕了這個操作。請不要再試同樣的操作,改問使用者想怎麼做。」
- 等你回答時,每 0.2 秒檢查一次有沒有按停止;按停止就等於拒絕。
9. **工具狀態**:等待中、執行中、完成、被拒、失敗。結果開頭會標電腦名稱,例如「[你的電腦] …」。
---
## 17. 三種電腦
| 名稱 | 是什麼 |
|---|---|
| 「Bot 的電腦」 | 一台真的 Linux 電腦(Debian 桌面、Chromium、終端機),所有 Bot 共用,每個 Bot 有自己的資料夾 `/home/bot/bot-編號`。跑在 Docker 裡,可以是這台 Mac 或你的伺服器。預設電腦。沒有 Docker 時,退回成一個封閉的資料夾(沒有桌面)。 |
| 「你的電腦」 | 這台 Mac,從工作資料夾開始(預設是家目錄)。要先打開「在這台電腦上執行」,或每次允許。讀你的瀏覽器一定用這台。 |
| SSH 電腦 | 你自己加的其他電腦,每台有名稱、位址(例如 me@studio.local)和起始資料夾(沒填就用對方的家目錄)。 |
- 聊天時說「在我的 Mac 上」,Bot 就會換到「你的電腦」。
- 清單順序:Bot 的電腦、你的電腦、各台 SSH 電腦。
### Bot 的電腦(照原版的雲端電腦做)
原版每個帳戶有一台雲端電腦(box):Linux 容器裡的 X11 桌面,用 xdotool 操作,透過 noVNC(埠 6080)觀看。AnyBot 用同樣的做法:
- **狀態**(設定頁和畫面視窗都有狀態圓點):
- 「尚未建立」→ 第一次用到時「建立中」(第一次會先做映像檔,要幾分鐘)
- 「休眠中」→ 用到時「喚醒中」
- 「連線中」→「執行中」
- 「正在備份/正在建立/正在搬移資料/正在拆除舊電腦/正在清除資料/正在從快照還原」(更新進行中)
- 「發生問題」:下一次用到時會自動重新啟動
- **自動喚醒和休眠**:Bot 用到時自動喚醒;閒置 15 分鐘(估計值)而且沒有 Bot 在用、沒有人在看畫面,就先存快照再休眠。
- **健康檢查**:每 20 秒看一次,單次最多等 3 秒(原版 /health 的逾時)。
- **Bot 在上面的權限**:這是它自己的電腦,所以指令、改檔案、操作螢幕都不用問你;只有「一律不允許」的指令(例如格式化)還是會擋。可以 `sudo` 安裝套件。
- **開機時間**:最多等 60 秒(估計值)。
- **桌面**(第 12 版起,照 LazyBoy2 的 box;以前是 fluxbox,只有右鍵選單和一條細工作列,不好用):XFCE(xfwm4 視窗、xfdesktop 桌布、xfce4-panel 工作列,沒有工作階段管理員)。下方工作列:「應用程式」選單、「瀏覽器」、「檔案管理員」、「終端機」、開著的視窗、時鐘;桌面按右鍵也有應用程式選單。應用程式選單只有一層:瀏覽器、檔案管理員、終端機、文字編輯器、影像檢視器(Bot 另外裝的程式出現在「其他」);沒有 XFCE 的設定選項(每次開機照映像檔重放,而且大多要 XFCE 的設定服務才會生效)。這三個是 AnyBot 加的(LazyBoy2 沒有):檔案管理員是 Thunar(有縮圖;在檔案上按兩下:文字檔開文字編輯器 Mousepad、圖片開影像檢視器 Ristretto、PDF 和網頁開瀏覽器;按右鍵「在此開啟終端機」開在那個資料夾),側邊欄和網頁上傳檔案的視窗都有「下載」(/home/bot/Downloads,Bot 下載的檔案在這裡);瀏覽器下載完按「在資料夾中顯示」會開檔案管理員。工作列鎖住:按右鍵沒有移除、移動、屬性(只剩「面板 › 登出/說明/關於」);「登出」只會關掉工作列,一秒後自己回來。新視窗開在螢幕中間。網頁上傳檔案的視窗每次開機設成螢幕的七成寬、四分之三高(GTK 要同時記著位置才會照記住的大小開;沒有時照字型算,粉圓 12 號算出 1342×1029,比螢幕大,「開啟」掉到螢幕外)。Arc-Dark 深色主題、Papirus 圖示、思源黑體(Noto Sans CJK TC,和 AnyBot 視窗同一套字;第 14 版起,以前是粉圓),選單、瀏覽器和網頁語言都是繁體中文(LANG=zh_TW.UTF-8,沒設 LC_ALL,單一指令還能用 LANG=C),時區台北(/etc/localtime,沒有 TZ 變數)。選單裡瀏覽器和終端機各只有一個:瀏覽器一律是 `anybot-browser`,終端機是 `anybot-terminal`(xfce4-terminal,一個視窗一個程式,用桌面的 D-Bus)。開機就在共用螢幕開好瀏覽器,設定檔第一次用時開說明頁「這是 Bot 的電腦」。桌面設定每次開機都照映像檔重放。每個 Bot 自己的螢幕也是同一套桌面(各自的 D-Bus 和 xfconfd,讀同一份設定)。工作列和桌布不在 Bot 截圖的編號裡(看得到,但清單只列在用的視窗)。`docker stop` 時先讓瀏覽器正常關掉(最多 5 秒),剛登入的 cookie 才會寫進磁碟。
### 快照與三種更新(原版的規則)
- **儲存快照**:把整個 `/home/bot`(略過 .cache)壓縮存到這台 Mac。休眠前和「重建電腦」前會自動存。設定頁顯示「上次快照:月/日 時:分」。
- **「重建電腦」**:「你的檔案和登入資訊會保留,但已安裝的應用程式和套件會被移除。所有 Bot 會一起更新。」
- 有 Bot 正在用這台電腦時會拒絕:「有 Bot 正在用這台電腦,等它做完再重建」。按下確認時會先停掉正在工作的 Bot,聊天會保留。
- 步驟:正在備份(存快照)→ 正在建立(更新映像檔、換上新電腦)→ 正在搬移資料(確認原本的檔案還在、新電腦能連線)。
- **「從快照復原」**:「從你上次儲存的快照重新啟動它。最近的變更可能會遺失,已安裝的 App 會被移除。你的 Bot、檔案和登入資訊都是安全的。」
- 步驟:正在拆除舊電腦 → 正在建立 → 正在從快照還原;放回檔案後最多等 90 秒、每 2 秒確認一次結果(取自原版)。
- 還沒有快照時按鈕是灰的。
- **「重設電腦」**(紅色按鈕):全部清空,換一台全新的電腦。步驟:正在拆除舊電腦 → 正在清除資料 → 正在建立。
- **同時只能有一個更新**:再按會顯示「已經有一個更新在進行中」。開始後就不能取消。
- **忙碌時按更新會排隊**:有 Bot 正在用電腦時按「更新」(或排程更新遇到忙碌),會被擋下並記住這次請求(「已排隊,它一閒下來就自動更新」);電腦沒人用滿一分鐘就自動開始。自動更新失敗會自動重試,等的時間從失敗那一刻算、每次多等 30 秒(30、60、90 秒…;以前從開始更新算,重建要好幾分鐘,等於失敗完馬上又來),重試沿用第一次存的快照(以前每試一次就多存一份整個家目錄,保留一週,會把磁碟塞滿);連續失敗 5 次就不再自動重試(記錄寫「更新連續失敗 5 次」),處理好原因再按「更新」或等排程重來。成功後歸零。
- **命令列更新**:`make update-box`(就是 `anybot --update-box`)等於按「更新」:AnyBot 開著就請它做(通常 20 秒內接手,回一句話:開始了、已排隊、已經是最新、這台不是大腦),沒開就自己做完再結束;伺服器上請伺服器的大腦做(`docker compose exec`)。永遠用裝好的 AnyBot 帶的電腦版本和它設定的 Docker 主機(Lima、ssh://、伺服器的)。以前它照原始碼另外建映像、用預設的 docker:版本跟大腦帶的不同,大腦一分鐘內就換回自己的版本;大腦設了別的 Docker 主機時還建錯地方。要新版的電腦,先更新 AnyBot 本身(make update、make update-server),它會自己把電腦換新。
- **中斷了會接續**:更新做到一半 App 被關掉,下次打開時,如果紀錄在 10 分鐘內、而且電腦不正常,就自動接續;超過 10 分鐘就清掉紀錄,電腦正常時也不重做(都取自原版)。
- 進度在設定頁用步驟列和進度條顯示。
- **新版本與排程更新**(原版:「有新映像檔就在指定的當地時間自動更新,錯過有一小時的補執行時間」):
- AnyBot 裡帶著的電腦版本比正在跑的新時,「快照與更新」最上面出現強調色框「有新版的 Bot 的電腦」和「現在更新」(打開「重建電腦」的確認)。每 30 秒檢查一次(估計值)。
- 勾選「有新版本時,自動在每天 [03:00] 更新」:到了那個時間、有新版、沒有 Bot 在用,就自動做「重建電腦」;每天最多一次。錯過時間的話一小時內還會補做,超過就等隔天。時間格式錯誤時顯示「請用 時:分,例如 03:00」。
### 磁碟
- 「檢查用量」:顯示磁碟剩餘空間和最大的幾個資料夾。
- 「請 Bot 提出清理方案」:把「檢查 Bot 的電腦的磁碟使用情況,並提出安全的清理方案供我核准」放進主要 Bot 的輸入框,由你按送出。
### 終端機與環境密鑰
- 給指令用的帳密,例如 CRM_API_TOKEN。Bot 執行指令時會變成環境變數。
- 名稱要大寫字母開頭,只能用 A–Z、0–9 和 _(原版規則);輸入時自動轉成大寫。
- 值只能寫入、不能讀出:清單只顯示名稱和「••••••••」,可以「取代」或「刪除」。
- 每個值最多 32 KB、最多 100 個(估計值)。存在這台 Mac 上,只有你的帳號能讀。
- Bot 的系統指示只會告訴它有哪些名稱,並提醒它不要把值印出來。
### 在哪裡執行
- 預設是這台 Mac 的 Docker(OrbStack 或 Docker Desktop)。
- 可以填 Docker 主機,例如 `ssh://me@server`(Tailscale 的機器名稱也行),Bot 的電腦就會在那台主機上;看畫面時 AnyBot 會自己開 SSH 通道。
- **容器隔離**(設定 › 電腦 › 在哪裡執行):標準(runc:容器和 Docker 主機共用核心,Chromium 關掉自己的沙盒,容器是唯一那道牆)或強隔離(gVisor/runsc:電腦有自己的虛擬核心,權限全拿掉只留開機要的幾個,Chromium 的沙盒打開,兩道牆)。Docker 主機沒有 gVisor 時強隔離不能選;設定是強隔離、主機卻沒有 gVisor 時(例如換了 Docker 主機)先用標準開機並寫進紀錄,不會整台開不起來。那一列顯示電腦實際用的是哪種,和設定不同時提示按「更新」。Mac 上用 `deploy/mac/gvisor-vm.sh` 建一台自帶 Docker+gVisor 的 Lima 虛擬機(4 GB;虛擬機沒開時 AnyBot 會自己開,例如 Mac 重開機後;虛擬機用過的記憶體 Mac 拿不回來,開越大就長越大,以前 6 GB 會整個長滿。腳本也關掉虛擬機用不到的數據機、磁碟自動掛載、多路徑儲存服務,約 70 MB),這台 AnyBot 設定成連到別的大腦(當螢幕)時,從一開始就不開自己的電腦和虛擬機(Bot 用的是大腦那邊的電腦,只借這台的畫面、瀏覽器和 App):啟動時看設定就知道,已經開著的馬上停掉,虛擬機裡沒有別的東西在跑就連虛擬機一起關掉,把記憶體還給 Mac。螢幕上也不跑「保住資料卷」的小容器、排程更新和「上次更新被中斷就接著做」。設定成用這台自己當大腦時才開,變回大腦時兩個都會自己開回來(第一次多等 30–60 秒)。虛擬機也不跟著 Mac 開機,交給 AnyBot 需要時自己開。`gvisor-migrate.sh` 把原本的檔案和登入搬過去(AnyBot 要先完全退出)。實測(Mac 上的 Lima VM):開機、畫面、VNC、無障礙編號、xdotool、截圖都正常;13 個 Chromium 程序都沒有 --no-sandbox,網頁程序 seccomp=2、有自己的命名空間;每一步 exec 55–69 ms、截圖 95 ms。
- 換位置後會在新的地方重新建立;舊檔案可以先「儲存快照」,換過去再「從快照復原」。
- **「網路流量改走這台 Mac」**(原版:網路流量可以改走你的本機電腦,「僅對新連線生效」,管理員可以關掉):打開後,Bot 的電腦之後執行的指令會經過這台 Mac 上的代理伺服器出去(例如要連公司內網或 VPN 才看得到的服務)。代理只聽這台 Mac 自己(127.0.0.1),用原版的埠 8791,被占用就往後找。設定頁顯示經過的連線數。Bot 的電腦在別的主機上時不能用。管理員可以用 `defaults write com.anybot.AnyBot AllowBoxTrafficViaThisMac false` 鎖住,這時顯示「🔒 由你的管理員設定,無法變更」。
### 看畫面、取得控制權(像同事一樣看,需要時接手)
- 核心只有三件事:Bot 操作它的電腦;你像同事一樣即時看它在做什麼;它需要你(登入、驗證碼)時你接手幫忙。看和接手用 **VNC(noVNC)**:只傳畫面上變了的地方,每個滑鼠移動和按鍵即時送過去,手機可以用觸控。原版也是用 noVNC 看 box。
- **在哪裡看**:手機網頁的「看 Bot 的電腦」、需要處理卡片的「接管」,Mac 和其他電腦的「看畫面」「開啟電腦」都打開同一個網頁 `/screen`(電腦上在瀏覽器開)。
- 大腦在別台(伺服器):網頁在帳號伺服器上,VNC 經過帳號伺服器和大腦的長連線到大腦的 Bot 的電腦。電腦上的 App 會先向帳號伺服器要一個看畫面的票放在連結裡(不用在瀏覽器登入);手機網頁用自己的登入要票。只有擁有者和管理員能看。
- 票會出現在網址裡(瀏覽紀錄、記錄檔),所以:網頁一打開就把連結裡的票換成新的,連結裡那張當場作廢;每次斷線重連前再換一張;票只在發出後 10 分鐘內能開新的連線,已經連上的畫面只要當初要票的手機還登入著(或那台電腦還在帳號裡)就一直開著。斷線後 10 分鐘內回來換得到新票;超過 10 分鐘,手機網頁用自己的登入重新要,電腦開的網頁則顯示「這個畫面連結已過期」(不再一直重試),回 AnyBot 再開一次就好。「登出所有裝置」會讓所有畫面立刻斷掉。
- 同一個網路的手機(不經帳號伺服器):同一個網頁,連 AnyBot 自己的 `/api/vnc`。
- 這台電腦自己的 Bot 的電腦:直接開它的 noVNC。
- **網頁**:最上面是返回、電腦名稱、狀態(即時觀看/你在操作)和「接管/交還給 Bot」。預設只看,按「接管」才會把你的滑鼠鍵盤送過去;需要處理卡片的「接管」直接打開接管。接管時有「打字」:打中文或任何語言(貼進目前的視窗,就是畫面上這個螢幕:那個 Bot 的螢幕沒開、看到的是共用桌面時就打在共用桌面;畫面關掉後打的字不會另外開一個看不到的螢幕),還有 Enter、Esc、Tab、⌫。斷線會自己重連(每次用新的票)。
- **你在操作時 Bot 會等**:你點擊或按鍵後 8 秒內,在你正在看的那個螢幕上做事的 Bot,滑鼠鍵盤操作會收到「使用者正在自己操作這台電腦」(別的螢幕上的 Bot 照做)。開著看畫面的螢幕不算閒置、不會被收掉,不管從哪裡開的(第 13 版起 Bot 的電腦自己看有沒有人連著)。不用另外按什麼;停下 8 秒它就繼續。需要處理卡片的「接管」會讓 Bot 一直等,直到你按「我完成了」或「跳過」。
- **VNC 密碼不出大腦**:大腦用 Bot 的電腦自己的 VNC 密碼登入,給看的人的是「不用密碼」;能連到這裡的人已經過帳號伺服器(或手機密碼)。
- 以前的做法(每 0.45~1 秒拍一張 1 MB 的圖、解開再壓、經過帳號伺服器傳;點擊另走一條路)已經拆掉。
---
## 18. 檔案與指令工具
除了「查看背景指令」,每個工具都可以指定在哪台電腦做。
在 Bot 的電腦和 SSH 電腦上,這些工具在那台電腦裡執行;寫檔案時內容從標準輸入送過去,所以任何文字都能寫;「修改檔案」也能只換掉一段(先讀出來、確認那段只出現一次,再整個寫回)。
### 「查看資料夾」(list_dir)
- 資料夾排在前面,名稱後面加「/」;檔案排在後面,附上大小(B、KB、MB)。依名稱排序,不分大小寫。
- 最多列 2,000 項,超過時顯示「…還有 N 項」。
- 空資料夾顯示「(空資料夾)」。
- 私密檔案自動隱藏。
### 「搜尋檔案」(search)
- 參數:要找的文字(必填)、資料夾、是否只列檔名。
- 結果格式:「路徑:行號:內容」。
- 電腦有裝 ripgrep 時:
- 可以用正規表示式。
- 每行最多 300 欄。
- 略過 .git、.env、.pem、.key。
- 沒裝 ripgrep 時:
- 改用一般比對,不分大小寫。
- 略過 node_modules、target 和私密檔案。
- 最多找 25 秒、10,000 行,只回傳前 2,000 行。
- 可能看到的訊息:
- 「…結果太多,只列出前 2000 行(共 N 行以上)」
- 「…搜尋超過 25 秒,結果可能不完整」
- 「沒有找到」
- 「請給要搜尋的文字」
### 「讀取檔案」(read_file)
- 從第幾行開始(預設 1),讀幾行(預設 2,000,估計值)。每行前面加行號。
- 檔案最大 8 MB(8,388,608 位元組)。前 8,000 位元組裡出現空字元,就當作不是文字檔。
- 可能看到的訊息:
- 「…還有 N 行(用 offset=M 繼續讀)」
- 「(空檔案)」
- 「X 太大了(大小),最多讀 8 MB」
- 「X 不是文字檔」
- 「X 是資料夾,請用 list_dir」
- 「找不到 X」
### 「修改檔案」(edit_file)
- 把舊文字換成新文字,舊文字必須在檔案裡剛好出現 1 次。
- 舊文字留空時,建立新檔或整個覆寫,需要時會自動建立上層資料夾。
- 成功時:「已建立 X(N 行)」「已覆寫 X(N 行)」「已修改 X」。
- 失敗時:
- 「在 X 裡找不到要替換的文字」
- 「要替換的文字在 X 出現了 N 次,請多給一些前後文讓它只出現一次」
### 「執行指令」(shell)
- 在工作資料夾裡執行,不接受鍵盤輸入。
- 輸出:保留開頭和結尾各 6,000 字,中間顯示「…(中間省略 N 個字)…」(估計值)。總共不到 12,000 字時全部保留。
- 結果:
- 沒有輸出:「(完成,沒有輸出)」
- 失敗:「結束代碼 N」加上輸出
- 無法執行:「無法執行:…」
- 按停止:「已停止(連同它啟動的程式)」
- 預設等 30 秒(估計值,最多可設 10 分鐘)。還沒跑完時不會中斷,而是移到背景繼續跑:「指令跑了超過 N 秒,已移到背景繼續執行(背景指令 #編號)。用 read_terminal 查看進度。目前的輸出:…」
- 執行前會從環境裡拿掉 6 種 AI 金鑰,指令拿不到你的金鑰。
- **輸入一開始就是關著的**(跟從 /dev/null 讀一樣):會把輸入讀到底的程式馬上往下做,不會一直等。以前輸入一直開著,`pi-bolt -p "…"` 在等輸入結束,永遠不回答;`cat`、把腳本餵給 python 也一樣卡住。會問問題的程式用參數答掉(-y、--yes)。
- **指令列的 AI 工具**(Claude Code、pi-bolt、codex、gemini…):Bot 用它們的非互動模式交代整件事(`claude -p "…"`、`pi-bolt -p "…"`、`codex exec "…"`),結果直接回來;做很久就放背景,用 read_terminal 的 wait_ms 等。實測:手腳電腦的 PATH 只有系統目錄時,`pi-bolt -p` 也找得到、會回答。
- **找得到你裝的指令**:AnyBot 開機自動啟動時(Mac 的登入項目、Linux 的 systemd),拿不到你終端機裡的 PATH,`~/.local/bin` 這種地方不在裡面,pi-bolt、Claude Code 都「找不到指令」。現在先讀你登入 shell 的 PATH(最多等 3 秒),再補上常見的地方:~/.local/bin、~/bin、~/.cargo/bin、~/.bun/bin、~/.deno/bin、~/.npm-global/bin、~/.volta/bin、~/go/bin、nvm 最新的 Node、/opt/homebrew/bin、/usr/local/bin、/opt/local/bin、/snap/bin。Windows 補上 %APPDATA%\npm、~\.local\bin、~\.cargo\bin、~\.bun\bin、scoop、WinGet、Node.js、Git,而且用 Windows 的分隔符號(以前用「:」接起來,Windows 上整個 PATH 都壞掉)。
- **Windows**:以前一律用 /bin/sh 跑,Windows 上沒有這個程式,每個指令都「無法執行」。現在有 Git Bash 就用它(Bot 寫的是 sh 語法),沒有就用 PowerShell;不會每個指令跳一個黑色視窗。
### 互動終端機(shell 加 interactive: true)
- 給一定要真的終端機的程式:自己的全螢幕介面(pi-bolt、Claude Code 的對話畫面)、要回答的問題、編輯器。程式跑在虛擬終端機裡(Mac、Linux 是 pty,Windows 是 ConPTY),120 欄 × 40 列;Bot 的電腦(Docker)用 `docker exec -it`,SSH 用 `ssh -tt`;手腳電腦在那台開。
- Bot 讀到的是**畫面**,跟人看到的一樣(終端機的控制碼已經畫成文字,連續的空行壓成一行)。開好時先等它的第一個畫面(安靜 1.2 秒,最多 15 秒),回報「已在互動終端機 #N 執行…現在的畫面」。很快就結束的程式直接回最後的畫面。
- **write_terminal**:打字(換行就是按 Enter,文字和 Enter 分開送,免得被當成貼上)和按鍵(keys:enter、tab、shift-tab、esc、backspace、delete、space、上下左右、home、end、pageup、pagedown、ctrl-任何字母),之後等畫面安靜下來(預設最多 4 秒,wait_ms 可到 120 秒)再回報畫面。close 是按 ctrl-d。
- **一般指令不能打字**:對一般指令用 write_terminal,會說它的輸入一開始就關了,要互動就用 interactive 重新執行,能用參數就用參數。
- **開一個互動的 shell 每次都問你**:bash、zsh、sh、fish、PowerShell、cmd… 開在互動終端機裡,之後 Bot 在裡面打的指令不會再一條一條經過規則,所以每次都跳確認卡片,而且沒有「一律允許」。`bash -c '…'`、`sh 腳本.sh` 這種跑完就結束的照一般規則。
- 按停止、重新啟動 Bot、關掉 App 時,互動終端機和它啟動的程式一起停掉。
- 實測 pi-bolt:開好看得到它的開頭畫面,打「19 加 4 等於多少」按 Enter,畫面上出現「23」。
### 「查看背景指令」(read_terminal)
- 一律不用問。
- 顯示:
- 「背景指令 #N:指令」
- 「狀態:已結束(代碼 C)」或「還在執行:N 個程式,CPU 時間 X.X 秒,記憶體 M MB」
- 最新的輸出;互動終端機是它現在的畫面
- **wait_ms**(最多 120 秒):等它有新的東西、而且安靜下來再回來;**until**:某段字一出現就回來(並說「已出現」或「還沒出現」);結束了也馬上回來。不用一直重查。在手腳電腦上最多等 25 秒(中繼站 35 秒就放棄)。
- 編號不存在時:「沒有背景指令 #N」。
---
## 19. 安全規則:哪些直接做、先問、拒絕
判斷順序是:拒絕 → 私密檔案 → 允許 → 詢問。用 ; | || & && 或換行串在一起的指令,會先拆開、一段一段判斷。
### 私密檔案(Bot 不能讀也不能改)
- AnyBot 自己的資料資料夾(金鑰存在這裡)
- .git 資料夾
- .ssh、.gnupg、Library/Keychains
- .env、.env.*、.netrc、credentials
- .pem、.key 檔
- id_rsa、id_ed25519 開頭的檔案
### 在「你的電腦」上
- **讀取類工具**(查看資料夾、搜尋、讀取檔案)
- 工作資料夾裡:直接做。
- 工作資料夾外:先問「讀取工作資料夾以外的地方:路徑」,可以一律允許。
- 私密檔案:拒絕,「「路徑」是私密或系統檔案,Bot 不能讀取。」
- **修改檔案**
- 工作資料夾裡:問「修改檔案:路徑」,可以一律允許。
- 工作資料夾外:問「修改工作資料夾以外的檔案:路徑」,不能一律允許。
- 私密檔案:拒絕。
- **指令**
- 一律拒絕:sudo、su、rm -rf /、rm -rf ~、mkfs、dd、shutdown、reboot、diskutil erase、chmod -R 777 /。訊息是「「X」這類指令一律不允許。」
- 碰到私密檔案:拒絕,「指令碰到私密或系統檔案:X」。
- 含有看不出內容的子指令($( )、反引號、eval、exec、source、「.」,或引號沒關好):一律問「執行指令(含有隱藏的子指令,無法自動判斷):…」,不能一律允許。
- 不用問的 24 種唯讀指令:ls、pwd、cat、head、tail、wc、echo、rg、grep、find、file、stat、du、df、date、which、tree、sort、uniq、diff、git status、git diff、git log、git show。每一段都是唯讀或已允許、而且沒有用「>」寫入檔案,才直接執行。
- 其他指令:問「執行指令:…」。
- 一律允許會記住指令的第一個字。
- git、npm、pnpm、yarn、cargo、brew、pip、pip3、python3、docker、go 這 11 種會記住前兩個字,例如「npm install」。
### 沙盒(macOS 有提供時)
Bots work like someone who knows the computer: they know each machine, reach what they see, plan, and hand the planned steps to a quick model Measured on the bot's own box (8 tasks x 2, grok-4.7): 14/16 done, 120 steps, 1114 s before; 16/16, 102 steps, 574 s after (model time 1015 -> 471 s). A replayed skill: 49 s -> 15 s. Knowing the machine - facts.rs: 電腦現況 per computer (system, desktop, systemd, sudo, network, package manager, tools, apps, a fixed TZ), read once by a small read-only probe, kept 30 min, in the instructions at the start of a turn. - The box's sudo is the bot's: only what follows sudo is checked against the always-denied list (it was refused outright, while the instructions said it could sudo), and commands with sudo run as the box's root (setuid does nothing under gVisor). - Box image v8 drops ENV TZ=UTC (it overrode /etc/localtime). ANYBOT_BOX_IMAGE / ANYBOT_BOX_VOLUME give a throwaway box its own image and volume, never adopting the real one. - Mac shell sandbox: App Store app CLIs (they carry their own app sandbox) and ps/top run outside it; plain `osascript -e` too, asked the first time even in direct mode, refusing do shell script, terminals, keystrokes, file reads, ObjC and the secret folders. A command the sandbox broke says so, instead of looking like a broken program. Reaching what it sees - The Mac menu bar's status icons are numbered (each app's AXExtrasMenuBar, named from inside for the system's own), computer_use_zoom looks closer at full sharpness. - Numbers stay with their controls from look to look (they were reassigned every look, so a step's second click landed elsewhere); the box's front window is listed first; a control can be named instead of numbered (name "4"). - Web page numbering walks open shadow DOM (Chromium settings, web components). - A box on a Docker host elsewhere retries the next port when the usual one is taken (a retry without it came up with no network). Working like a person - Instructions: pick the route, know what done looks like, one route, check once, say what's stuck instead of faking it with a substitute, ask before cutting the connection. - StepPlan: the bot's model takes the first step, the step after trouble (failed, refused, repeated, nothing changed on screen, the quick model switching routes), one in four, and the final check; a quick model (Bot.step_model, auto: grok-4.20-0309-non-reasoning on xAI) does the planned steps in between, falling back to the bot's model if it can't be used. - Skills keep the steps that worked (with what each acted on, not numbers); replay_skill does them again with no model in between, finding each control again, handing back on a mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 01:01:03 +00:00
- 所有指令都在沙盒裡跑,下面三種例外(只在你的電腦上;Bot 自己的電腦一律在沙盒裡)。
- 指令碰不到這些地方:AnyBot 的資料、.ssh、.gnupg、Library/Keychains、.aws、.config/gcloud。
Bots work like someone who knows the computer: they know each machine, reach what they see, plan, and hand the planned steps to a quick model Measured on the bot's own box (8 tasks x 2, grok-4.7): 14/16 done, 120 steps, 1114 s before; 16/16, 102 steps, 574 s after (model time 1015 -> 471 s). A replayed skill: 49 s -> 15 s. Knowing the machine - facts.rs: 電腦現況 per computer (system, desktop, systemd, sudo, network, package manager, tools, apps, a fixed TZ), read once by a small read-only probe, kept 30 min, in the instructions at the start of a turn. - The box's sudo is the bot's: only what follows sudo is checked against the always-denied list (it was refused outright, while the instructions said it could sudo), and commands with sudo run as the box's root (setuid does nothing under gVisor). - Box image v8 drops ENV TZ=UTC (it overrode /etc/localtime). ANYBOT_BOX_IMAGE / ANYBOT_BOX_VOLUME give a throwaway box its own image and volume, never adopting the real one. - Mac shell sandbox: App Store app CLIs (they carry their own app sandbox) and ps/top run outside it; plain `osascript -e` too, asked the first time even in direct mode, refusing do shell script, terminals, keystrokes, file reads, ObjC and the secret folders. A command the sandbox broke says so, instead of looking like a broken program. Reaching what it sees - The Mac menu bar's status icons are numbered (each app's AXExtrasMenuBar, named from inside for the system's own), computer_use_zoom looks closer at full sharpness. - Numbers stay with their controls from look to look (they were reassigned every look, so a step's second click landed elsewhere); the box's front window is listed first; a control can be named instead of numbered (name "4"). - Web page numbering walks open shadow DOM (Chromium settings, web components). - A box on a Docker host elsewhere retries the next port when the usual one is taken (a retry without it came up with no network). Working like a person - Instructions: pick the route, know what done looks like, one route, check once, say what's stuck instead of faking it with a substitute, ask before cutting the connection. - StepPlan: the bot's model takes the first step, the step after trouble (failed, refused, repeated, nothing changed on screen, the quick model switching routes), one in four, and the final check; a quick model (Bot.step_model, auto: grok-4.20-0309-non-reasoning on xAI) does the planned steps in between, falling back to the bot's model if it can't be used. - Skills keep the steps that worked (with what each acted on, not numbers); replay_skill does them again with no model in between, finding each control again, handing back on a mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 01:01:03 +00:00
- 例外,在沙盒外跑:
- App Store 版 App 自己的指令列(`/Applications/X.app/Contents/MacOS/…`,單獨一條指令、程式帶 Apple 的 App 沙盒):在 AnyBot 的沙盒裡兩層沙盒會衝突、程式一開就當(例如 Tailscale 的指令列),它自己的 App 沙盒一樣讀不到上面那些地方。
- `ps`、`top`,單獨或只接 grep、head、awk 這類不讀檔的過濾:它們要系統權限(setuid),沙盒裡一律「Operation not permitted」。
- AppleScript:單獨一條 `osascript -e '…'`(不能跑腳本檔、JavaScript、heredoc),而且不含 do shell script、run script、終端機、keystroke、讀檔、ObjC、祕密資料夾的名字。在沙盒裡 AppleScript 指揮別的 App 一律被拒(-10004)。第一次會先問你,直接操作模式也問,選「一律允許」之後不再問。
- 被沙盒擋下時(setuid 程式、-10004、App 的指令列當掉),結果後面會附一句說明是沙盒擋的、改用什麼,Bot 不會當成電腦壞了一直重試。
### 在「Bot 的電腦」上
- 指令只檢查上面那 10 種一律拒絕的,其他都直接做。沙盒會把它關在自己的資料夾裡,看不到也寫不到家目錄的其他地方。
- box 裡每個 App 都開著無障礙介面(`GTK_MODULES=gail:atk-bridge`):GTK 2 的 App(lxappearance、PCManFM 和很多舊工具)少了 gail 就一個編號都沒有,只能看圖猜座標(box 版本 9 起)。
Bots work like someone who knows the computer: they know each machine, reach what they see, plan, and hand the planned steps to a quick model Measured on the bot's own box (8 tasks x 2, grok-4.7): 14/16 done, 120 steps, 1114 s before; 16/16, 102 steps, 574 s after (model time 1015 -> 471 s). A replayed skill: 49 s -> 15 s. Knowing the machine - facts.rs: 電腦現況 per computer (system, desktop, systemd, sudo, network, package manager, tools, apps, a fixed TZ), read once by a small read-only probe, kept 30 min, in the instructions at the start of a turn. - The box's sudo is the bot's: only what follows sudo is checked against the always-denied list (it was refused outright, while the instructions said it could sudo), and commands with sudo run as the box's root (setuid does nothing under gVisor). - Box image v8 drops ENV TZ=UTC (it overrode /etc/localtime). ANYBOT_BOX_IMAGE / ANYBOT_BOX_VOLUME give a throwaway box its own image and volume, never adopting the real one. - Mac shell sandbox: App Store app CLIs (they carry their own app sandbox) and ps/top run outside it; plain `osascript -e` too, asked the first time even in direct mode, refusing do shell script, terminals, keystrokes, file reads, ObjC and the secret folders. A command the sandbox broke says so, instead of looking like a broken program. Reaching what it sees - The Mac menu bar's status icons are numbered (each app's AXExtrasMenuBar, named from inside for the system's own), computer_use_zoom looks closer at full sharpness. - Numbers stay with their controls from look to look (they were reassigned every look, so a step's second click landed elsewhere); the box's front window is listed first; a control can be named instead of numbered (name "4"). - Web page numbering walks open shadow DOM (Chromium settings, web components). - A box on a Docker host elsewhere retries the next port when the usual one is taken (a retry without it came up with no network). Working like a person - Instructions: pick the route, know what done looks like, one route, check once, say what's stuck instead of faking it with a substitute, ask before cutting the connection. - StepPlan: the bot's model takes the first step, the step after trouble (failed, refused, repeated, nothing changed on screen, the quick model switching routes), one in four, and the final check; a quick model (Bot.step_model, auto: grok-4.20-0309-non-reasoning on xAI) does the planned steps in between, falling back to the bot's model if it can't be used. - Skills keep the steps that worked (with what each acted on, not numbers); replay_skill does them again with no model in between, finding each control again, handing back on a mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 01:01:03 +00:00
- Docker 的 Bot 電腦(box)上 sudo 是 Bot 自己的(box 給它免密碼 sudo,可以裝套件、改系統設定):只檢查 sudo 後面接的指令,`sudo rm -rf /`、`sudo mkfs`、`sudo su` 一樣拒絕;含 sudo 的指令用容器裡的 root 執行(gVisor 裡 setuid 不起作用)。以前 sudo 在 box 上也一律拒絕,和「可以 sudo 安裝套件」的說明互相矛盾,Bot 會一直繞路。
- 自己資料夾裡的檔案可以自由讀和改。
- 資料夾外:拒絕,「{Bot} 看不到這台電腦上的其他檔案(路徑)。要處理你的檔案,請用「你的電腦」。」
### 在 SSH 電腦上
- 連線不會問密碼,最多等 15 秒。有起始資料夾時會先切過去。
- 查看資料夾、讀檔、搜尋、查看背景指令:直接做。
- 修改檔案:問「修改 {電腦} 上的檔案:路徑」,而且只能整個寫入。否則會看到「在 {電腦} 上只能整個寫入檔案(old_text 留空),或用 shell 修改。」
- 指令:套用跟本機一樣的規則,問「在 {電腦} 上執行指令:…」。
---
## 20. 背景指令
- **「輸入到背景指令」(write_terminal)**:原版可以把輸入傳給執行中的指令。指令在等你回答(例如「name?」「y/n」)時,Bot 用它把文字送進去,`\n` 代表按 Enter;`close` 會結束輸入(像 Ctrl-D)。送出後等 0.4 秒,回傳最新輸出。指令已經結束時會說「背景指令 #N 已經結束了」。
- 一個指令連同它啟動的所有程式,最多追蹤 4,096 個。統計程式數量、CPU 時間和記憶體。
- 停止時從最新的程式開始,依序把整棵程式樹停掉。
- 關閉 App 時,會停掉所有背景指令。「重新啟動這個 Bot」只停那個 Bot 的背景指令,並回報停了幾個。
---
## 21. 網頁工具
### 「讀取網頁」(web_fetch)
- 讀公開頁面,不帶登入,不用許可。
- 網址:
- 沒寫 https:// 會自動補上。
- 有空白或沒有「.」時不接受:「「X」看起來不是網址」。
- 空白:「請給網址」。
- 限制:
- 最多等 20 秒。
- 最多下載 3,000,000 位元組(估計值)。
- 最多回傳 20,000 字(估計值),超過時結尾加「…(後面還有,已截斷)」。
Whole control flow checked against real chats: what the bot sees is what is there, every step lands, nothing done twice Web - web_fetch kept pages with a <header> only up to it (taken for <head>): articles came back as their menus. - browser_open waits for the page to load and returns it like browser_read (one step fewer per page); actions wait for the page to hold still instead of fixed 1-2.5 s sleeps; one way to reach the tab. The bot's computer (box v6) - Numbers only on what can be seen: clipped to the window and the page's visible area, none under another app's window (a link scrolled under the toolbar was numbered on Back). - press_key with a typed character no longer swallows the keys after it (xdotool type --args 1). - The person's input through noVNC/TigerVNC is noticed again (fence, continuous updates, QEMU keys). - "Nothing changed" only after clicks, scrolls and drags; long text is pasted; one screen step at a time; one docker inspect per step when the box is known ready; poppler-utils for long PDFs. - One typing path and fewer round trips (stdin variant, unused picture path, extra batch execs gone). The person's computers - Linux: the window system's front app when it has one, and the reason when there is none (was 「」); hidden and off-screen controls get no number; wording no longer names a tool that doesn't exist. The loop - Without Docker, the bot's own computer runs no commands where there is no sandbox (Linux, Windows): it was a plain shell on the brain itself, keys in reach, asked nothing. - The bot's own computer is re-checked each step; unreachable computers are failures, not safety blocks; no direct-mode note on every result; an empty reply is asked again; scrolling and keys aren't counted as going in circles; steps aren't moved to a computer that can't do them. - One finish() for every step's result, keep_grant(), dead appctl list_computers/SERVING and the impossible server branches removed; duplicated prompt instructions merged. Tests: 162 (Mac) / 166 (Linux) unit; real box drills 6/6 on box v6; a brain without Chrome browses on its box; remote E2E 28/28. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 09:44:59 +00:00
- 會拿掉程式碼、樣式和 `<head>`(只認完整的標籤名:`<header>` 不是 head,以前會把有 header 的網站截斷成只剩選單),把段落、標題、清單、表格列分行,表格儲存格之間空一格,特殊符號轉回一般文字。
- 輸出:「網址:…」「標題:…」加內文。
- 可能看到的訊息:
Whole control flow checked against real chats: what the bot sees is what is there, every step lands, nothing done twice Web - web_fetch kept pages with a <header> only up to it (taken for <head>): articles came back as their menus. - browser_open waits for the page to load and returns it like browser_read (one step fewer per page); actions wait for the page to hold still instead of fixed 1-2.5 s sleeps; one way to reach the tab. The bot's computer (box v6) - Numbers only on what can be seen: clipped to the window and the page's visible area, none under another app's window (a link scrolled under the toolbar was numbered on Back). - press_key with a typed character no longer swallows the keys after it (xdotool type --args 1). - The person's input through noVNC/TigerVNC is noticed again (fence, continuous updates, QEMU keys). - "Nothing changed" only after clicks, scrolls and drags; long text is pasted; one screen step at a time; one docker inspect per step when the box is known ready; poppler-utils for long PDFs. - One typing path and fewer round trips (stdin variant, unused picture path, extra batch execs gone). The person's computers - Linux: the window system's front app when it has one, and the reason when there is none (was 「」); hidden and off-screen controls get no number; wording no longer names a tool that doesn't exist. The loop - Without Docker, the bot's own computer runs no commands where there is no sandbox (Linux, Windows): it was a plain shell on the brain itself, keys in reach, asked nothing. - The bot's own computer is re-checked each step; unreachable computers are failures, not safety blocks; no direct-mode note on every result; an empty reply is asked again; scrolling and keys aren't counted as going in circles; steps aren't moved to a computer that can't do them. - One finish() for every step's result, keep_grant(), dead appctl list_computers/SERVING and the impossible server branches removed; duplicated prompt instructions merged. Tests: 162 (Mac) / 166 (Linux) unit; real box drills 6/6 on box v6; a brain without Chrome browses on its box; remote E2E 28/28. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 09:44:59 +00:00
- 網站回應 400 以上:「網站回應 N。如果這個頁面要登入,請改用 browser_open。」
- 文字少於 200 字:「(頁面幾乎沒有文字,可能要登入或靠程式載入。可以改用 browser_open 打開,它會等頁面載入再回傳內容。)」
### 瀏覽器工具
Whole control flow checked against real chats: what the bot sees is what is there, every step lands, nothing done twice Web - web_fetch kept pages with a <header> only up to it (taken for <head>): articles came back as their menus. - browser_open waits for the page to load and returns it like browser_read (one step fewer per page); actions wait for the page to hold still instead of fixed 1-2.5 s sleeps; one way to reach the tab. The bot's computer (box v6) - Numbers only on what can be seen: clipped to the window and the page's visible area, none under another app's window (a link scrolled under the toolbar was numbered on Back). - press_key with a typed character no longer swallows the keys after it (xdotool type --args 1). - The person's input through noVNC/TigerVNC is noticed again (fence, continuous updates, QEMU keys). - "Nothing changed" only after clicks, scrolls and drags; long text is pasted; one screen step at a time; one docker inspect per step when the box is known ready; poppler-utils for long PDFs. - One typing path and fewer round trips (stdin variant, unused picture path, extra batch execs gone). The person's computers - Linux: the window system's front app when it has one, and the reason when there is none (was 「」); hidden and off-screen controls get no number; wording no longer names a tool that doesn't exist. The loop - Without Docker, the bot's own computer runs no commands where there is no sandbox (Linux, Windows): it was a plain shell on the brain itself, keys in reach, asked nothing. - The bot's own computer is re-checked each step; unreachable computers are failures, not safety blocks; no direct-mode note on every result; an empty reply is asked again; scrolling and keys aren't counted as going in circles; steps aren't moved to a computer that can't do them. - One finish() for every step's result, keep_grant(), dead appctl list_computers/SERVING and the impossible server branches removed; duplicated prompt instructions merged. Tests: 162 (Mac) / 166 (Linux) unit; real box drills 6/6 on box v6; a brain without Chrome browses on its box; remote E2E 28/28. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 09:44:59 +00:00
- 「在瀏覽器打開」(browser_open):參數是網址和設定檔。等頁面載入完成(最多 12 秒,看載入狀態、網址和文字停下來,不是固定秒數),直接回傳和 browser_read 一樣的內容(最多 12,000 字,加上可以點的編號),所以打開後不用再讀一次。
- 點擊、輸入、按鍵、選擇、捲動、上一頁之後:等頁面停下來就回來(頁面有變且穩定,或 0.5–0.9 秒內沒有開始變),最多 4 秒;以前是固定 1–2.5 秒。
- 「讀取瀏覽器分頁」(browser_read):最多讀多少字(預設 20,000,最多 40,000),加上設定檔。
Bots work like someone who knows the computer: they know each machine, reach what they see, plan, and hand the planned steps to a quick model Measured on the bot's own box (8 tasks x 2, grok-4.7): 14/16 done, 120 steps, 1114 s before; 16/16, 102 steps, 574 s after (model time 1015 -> 471 s). A replayed skill: 49 s -> 15 s. Knowing the machine - facts.rs: 電腦現況 per computer (system, desktop, systemd, sudo, network, package manager, tools, apps, a fixed TZ), read once by a small read-only probe, kept 30 min, in the instructions at the start of a turn. - The box's sudo is the bot's: only what follows sudo is checked against the always-denied list (it was refused outright, while the instructions said it could sudo), and commands with sudo run as the box's root (setuid does nothing under gVisor). - Box image v8 drops ENV TZ=UTC (it overrode /etc/localtime). ANYBOT_BOX_IMAGE / ANYBOT_BOX_VOLUME give a throwaway box its own image and volume, never adopting the real one. - Mac shell sandbox: App Store app CLIs (they carry their own app sandbox) and ps/top run outside it; plain `osascript -e` too, asked the first time even in direct mode, refusing do shell script, terminals, keystrokes, file reads, ObjC and the secret folders. A command the sandbox broke says so, instead of looking like a broken program. Reaching what it sees - The Mac menu bar's status icons are numbered (each app's AXExtrasMenuBar, named from inside for the system's own), computer_use_zoom looks closer at full sharpness. - Numbers stay with their controls from look to look (they were reassigned every look, so a step's second click landed elsewhere); the box's front window is listed first; a control can be named instead of numbered (name "4"). - Web page numbering walks open shadow DOM (Chromium settings, web components). - A box on a Docker host elsewhere retries the next port when the usual one is taken (a retry without it came up with no network). Working like a person - Instructions: pick the route, know what done looks like, one route, check once, say what's stuck instead of faking it with a substitute, ask before cutting the connection. - StepPlan: the bot's model takes the first step, the step after trouble (failed, refused, repeated, nothing changed on screen, the quick model switching routes), one in four, and the final check; a quick model (Bot.step_model, auto: grok-4.20-0309-non-reasoning on xAI) does the planned steps in between, falling back to the bot's model if it can't be used. - Skills keep the steps that worked (with what each acted on, not numbers); replay_skill does them again with no model in between, finding each control again, handing back on a mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 01:01:03 +00:00
- 編號也包含 web component 裡的東西(打開的 shadow DOM,一層層往下找,例如 Chromium 的設定頁、YouTube、很多用元件框架做的網站),排列順序照畫面上的位置:元件本身、它 shadow DOM 裡顯示的東西、再來是它自己的子元素。照編號點、照文字找、畫編號框都看得到這些。
- 「瀏覽器設定檔」(browser_profiles):列出、新增、切換。
### 用哪個瀏覽器
- 有裝 Chrome 類瀏覽器或 Firefox 時,用 AnyBot 自己的瀏覽器。只有設定檔選「你的瀏覽器」時,才用你平常的瀏覽器。
- 都沒裝時,一律用你自己的瀏覽器。
### 原版「從 Chrome 複製登入」
- 原版已經拿掉這個功能,所以 AnyBot 也沒有做,Bot 也被交代不要提。
---
## 22. AnyBot 自己的瀏覽器與設定檔
### 用哪個瀏覽器
- 依序找第一個有裝的:Google Chrome、Brave Browser、Microsoft Edge、Chromium。
- 這些都沒有、但有 Firefox 時(例如只有 Firefox 的 Linux 電腦),用 Firefox。
- 用 AnyBot 自己的資料夾打開,不會影響你平常的瀏覽器,也不用改任何瀏覽器設定。
- Snap 或 Flatpak 版的 Firefox 只能讀家目錄裡它自己的角落,所以 AnyBot 的 Firefox 設定檔放在那裡(例如 `~/snap/firefox/common/AnyBot`)。
- 略過首次使用畫面和「設為預設瀏覽器」的詢問。
### Firefox
- Firefox 不支援 Chrome 的控制方式(DevTools),所以改用 W3C 標準的 WebDriver BiDi。
- 每個工具用到的 Chrome 指令,都換成對應的 BiDi 指令:真的滑鼠點擊和按鍵、打字(中文也一樣,一個字一個字按)、截圖、存 PDF、網頁對話框、上傳、下載、分頁。
- 所以 18 個瀏覽器工具在 Firefox 上用法完全一樣,跑同一套測試。
- 下載:Firefox 支援指定位置時存到「下載項目/AnyBot」;不支援時看 Firefox 自己的下載資料夾。
- **你自己的 Firefox 設定檔**也是選項,用 Firefox 顯示的名字,後面加「(Firefox)」,例如「阿金(Firefox)」。
- 名字從 Firefox 的設定檔清單讀(`profiles.ini`,以及新版設定檔切換器的 SQLite 清單)。
- 只說「阿金」或「Firefox 阿金」也找得到(只有一個符合,而且沒有 AnyBot 自己的同名設定檔時)。
- Firefox 開著之後就不能被接手控制,所以要由 AnyBot 打開。這個設定檔已經用平常的方式開著時:「「X」的 Firefox 視窗已經開著,但不是 AnyBot 打開的,AnyBot 沒辦法操作它。請使用者先關掉這個設定檔的 Firefox 視窗(登入都會留著),再讓 AnyBot 打開它…」
- 關掉後 AnyBot 用可以操作的方式重新打開,登入都還在。Firefox 會顯示被遠端控制的標記(機器人圖示)。
- AnyBot 不會移除它們;設定裡沒有「移除」按鈕,旁邊寫「你自己的 Firefox 設定檔:要讓 Bot 用,請從這裡開啟(先關掉它原本的視窗)」。
- AnyBot 自己的設定檔名字不能有「Firefox」。
### 數字
- 「預設」設定檔用本機連接埠 9333(估計值)。其他設定檔由瀏覽器自己挑空的連接埠,再由 AnyBot 讀回來。
- 等待時間:
- 等瀏覽器開好:最多 20 秒。
- 讀一頁:最多 20 秒。
- 打開網址後:等 3 秒再讀。
- 已經開著時,用新分頁打開。
### 設定檔
- 「預設」是第一個,登入狀態一直保留。
- 其他設定檔各自有資料夾和登入,例如「工作」「私人」。
- 「你的瀏覽器」代表你平常的 Chrome(第 23 節)。也聽得懂「你的 chrome」「我的 chrome」「我的瀏覽器」「my chrome」這些說法。
- 順序:「預設」排第一,其他依名稱,「你的瀏覽器」排最後。
- 「使用中」的設定檔會被記住;找不到時回到「預設」。找設定檔不分大小寫。
- 在某個設定檔打開網址,那個設定檔就會變成使用中。
### 名稱規則
- 不能空白:「請給設定檔名稱」
- 最多 30 字(估計值):「設定檔名稱最多 30 個字」
- 不能用保留名稱:「「X」是留給你自己瀏覽器的名字,請換一個」
- 不能有 / 或 :,也不能用 . 開頭:「設定檔名稱不能有 / 或 : 也不能用 . 開頭」
### 新增、切換、列出、移除
- **新增**:名稱已經存在時沿用,不重複建立。新增後自動切過去。
- 「已新增並切換到設定檔「X」(全新的,還沒登入任何網站)…」
- **切換**:「已切換到「X」,之後的 browser_open / browser_read 都用它。」
- 切到「你的瀏覽器」時補一句:「(使用者平常的瀏覽器:請使用者在那裡切到想要的 Chrome 設定檔)」
- **列出**:「AnyBot 瀏覽器的設定檔:A、B(使用中)…。每個設定檔有自己的登入。」
- **移除**:只有你能在設定裡移除,Bot 不行。
- 「預設」和「你的瀏覽器」不能移除:「「X」不能移除」。
- 視窗還開著:「「X」的視窗還開著,請先關掉它再移除。」
- 移除的是使用中的設定檔時,會回到「預設」。
- **設定檔不存在**:「AnyBot 瀏覽器沒有叫「X」的設定檔。現有:…。要新的可以用 browser_profiles 新增(action: add)。」
### 設定 → 電腦 → 「AnyBot 瀏覽器設定檔」
- 說明:「每個設定檔是一個獨立的瀏覽器視窗,有自己的登入(例如工作和私人帳號)。Bot 會用「使用中」的那個,你也可以在聊天裡叫它換。」
- 每個設定檔一列:
- 單選按鈕,使用中的那個旁邊標「使用中」。
- 「開啟視窗」:提示「打開這個設定檔的瀏覽器視窗,在裡面登入網站」。
- 開啟中:「正在打開「X」…」
- 成功:「已打開「X」的視窗。在裡面登入一次,之後會記住。」
- 已經開著時,把它的分頁帶到前面。
- 「移除」:「預設」沒有這顆。按下後變成紅字「確定移除(登入也會刪掉)」和「取消」,移除後顯示「已移除「X」。」
- 「你的瀏覽器」那列:
- 說明「你平常的 Chrome,切到哪個設定檔就讀哪個」。
- 已有權限時顯示「✓ 輔助使用已打開」;沒有時是按鈕「打開輔助使用」。
- 新增:輸入框提示「新設定檔名稱,例如 工作」,按「新增設定檔」。
- 成功:「已新增「X」並設為使用中。按「開啟視窗」登入你要的網站。」
- 沒有任何 Chrome 類瀏覽器時,只顯示:「需要 Chrome、Brave、Edge 或 Chromium 才能用 AnyBot 自己的瀏覽器。」
- 底部說明:「選「你的瀏覽器」:Bot 像 Grok Bot 一樣從畫面讀你平常的 Chrome(macOS 會請你打開一次「輔助使用」),你在 Chrome 切到哪個設定檔,它就看哪個;讀之前會先問你。其他的是 AnyBot 自己的視窗,各自登入一次就好。」
### 打開和讀取
- 打開成功:「已在 AnyBot 瀏覽器({瀏覽器},設定檔「X」)打開 {網址}。接著用 browser_read 讀內容。如果頁面要登入,請使用者在那個視窗登入一次,之後會記住。」
- 讀取的是最近用的那個一般分頁。輸出:「瀏覽器:AnyBot 瀏覽器(…,設定檔「X」)」「標題:」「網址:」加內文。
- 頁面少於 1,500 字,又有 log in、sign in 或「登入」字樣時,加上「(這頁看起來要登入。請使用者在 AnyBot 瀏覽器視窗登入一次,之後就會記住。)」
- 可能看到的錯誤:
- 「這台電腦沒有 Chrome、Brave、Edge 或 Chromium,沒辦法開 AnyBot 自己的瀏覽器。」
- 「{瀏覽器} 沒有及時打開…請再試一次。」
- 「AnyBot 瀏覽器沒有開著的分頁,請先用 browser_open 打開網址。」
- 「讀取頁面太久了」
- 「頁面拒絕讀取:…」
---
## 23. 讀取你自己的瀏覽器(「你的瀏覽器」)
### 選哪個瀏覽器
- 候選:Google Chrome、Arc、Microsoft Edge、Brave Browser、Chromium、Safari。
- 優先選畫面上看得到、而且最前面的瀏覽器視窗。
- 透明、沒有大小的視窗,以及選單列小工具都不算。
- 列出視窗最多等 10 秒。
- 沒有看得到的視窗時,用第一個正在執行的瀏覽器;都沒在執行時,有裝 Chrome 就用 Chrome,否則用 Safari。
### 打開網址
- Chrome 類瀏覽器:網址交給你平常的視窗,不會跑到 AnyBot 的視窗。
- 打開後等 4 秒(估計值)。
- 成功:「已在 {瀏覽器} 打開 {網址}。接著可以用 browser_read 讀這個分頁。」
### 讀取:先用「輔助使用」(跟原版小幫手一樣的方法)
- 不用改任何瀏覽器設定。你在 Chrome 開著哪個設定檔的視窗,就讀哪個。
- 需要 macOS 的「輔助使用」權限,macOS 會自己問。
- 沒開時,AnyBot 會打開那個設定頁並說:「macOS 還沒讓 AnyBot 使用「輔助使用」,所以看不到你的瀏覽器。我已經打開「系統設定 → 隱私權與安全性 → 輔助使用」:把 AnyBot(或「終端機」)打開,然後再叫我試一次。只要開一次。」
- 只會讀你自己的瀏覽器,不會讀到 AnyBot 自己的視窗。
- Chrome 和 Electron 類 App 的特別處理(規則取自原版):
- 怎麼判斷:App 識別碼是 com.google.Chrome、com.github.Electron,或以 com.google.Chrome. 開頭;或是 Electron 程式;或 App 裡含有 Electron Framework、Chromium Embedded Framework、Google Chrome Framework 其中之一。
- 這類 App 會先打開兩個輔助使用開關(AXManualAccessibility、AXEnhancedUserInterface),網頁文字才看得到。
- 讀的是最前面視窗裡的網頁:標題、網址,連續的文字合成一行。
- 限制(估計值):
- 最多 20,000 個元素、80 層。
- 試 5 次,每次隔 0.7 秒。
- 每次最多等 2 秒。
- 成功:「瀏覽器:{瀏覽器}(你的瀏覽器)」「標題:」「網址:」加內文。
- 可能看到的錯誤:
- 「你的瀏覽器現在沒有打開的視窗」
- 「讀不到「標題」的頁面內容」
- 「你的瀏覽器沒有開著。請先打開它(或叫我用 browser_open 打開網址)。」
### 讀不到時改用 AppleScript
- 讀最前面分頁的標題、網址和文字。最多等 90 秒,讓你有時間回答 macOS 的詢問。
- 等太久:「等瀏覽器回應太久了(macOS 可能在問你要不要允許,請看看螢幕)」
- 讀不到文字時,仍會給標題和網址,加上「(讀不到頁面文字)」和說明:
- 被擋下控制權:自動打開「自動化」設定頁,並說「macOS 擋下了 AnyBot 控制 {瀏覽器}。我已經幫你打開「系統設定 → 隱私權與安全性 → 自動化」:在 AnyBot(或「終端機」)底下打開「{瀏覽器}」,然後再叫我試一次。」
- Safari:「Safari 還沒允許讀取網頁內容:請在 Safari 選單「開發 → 允許來自 Apple 事件的 JavaScript」打開…」
- Chrome 類:「{瀏覽器} 還沒允許讀取網頁內容:請在 {瀏覽器} 選單「檢視 → 開發人員 → 允許來自 Apple 事件的 JavaScript」打開,然後再叫我試一次。」
- Bot 被交代絕對不要主動叫你去改這些選單。只有在最後的備用方法也失敗時,才會照實轉告。
---
## 24. 操作螢幕(滑鼠、鍵盤、截圖)
fix: 選了做事的電腦之後,瀏覽器和螢幕步驟不再跑到使用者自己的 Mac 使用者把「工程」「FSD 追蹤專員」的做事的電腦設成 nobledesktop(雲端大腦所在的伺服器)。那台還沒裝瀏覽器時,Bot 沒指名電腦的 browser_open/browser_read 一路退到「使用者的電腦」,在使用者的 MacBook 上開 Brave(紀錄裡的結果是「[王性驊的MacBook Pro (2)] 已在 AnyBot 瀏覽器…打開」)。 - browser_place:Bot 沒指名時,使用者選的電腦開不了瀏覽器就失敗並說為什麼(沒裝瀏覽器/要 Docker/SSH 沒有視窗),要 Bot 先問使用者、公開網頁用 web_fetch,不再換到別台。 - screen_target:選的電腦沒有螢幕(SSH)時同樣失敗,不換到別台的螢幕。 - keep_to_chosen:Bot 自己指名使用者沒提的電腦,就算選的那台做不了這種步驟也拉回去(在那裡說清楚做不了),不再留在使用者的 Mac 上跑。 - 只管「使用者選了別台」(chosen_by_person:做事的電腦不是 Bot 自己的);沒選過、用 Bot 自己的電腦而這裡沒有 Docker 時,照舊可以借使用者的瀏覽器和螢幕。 已驗證:cargo test --bin anybot 528 通過(新增 a_chosen_computer_keeps_its_steps_off_the_persons_mac:選 SSH 的 nobledesktop → 瀏覽器、螢幕都失敗並說明;Bot 指名 Mac → 拉回;使用者說「用我的電腦」→ 去 Mac;沒選過 → 照舊借 Mac);原本的 a_step_moved_back_to_the_chosen_computer_says_so 等都過。 未驗證:真的雲端大腦(要更新 nobledesktop 上的大腦才生效)。
2026-11-16 16:10:09 +00:00
- 有螢幕的電腦:Bot 自己的電腦(Linux 桌面,Docker)、這台電腦、帳號裡其他開了「裝置連結」的電腦。每個螢幕工具都有 `computer` 參數;沒指定時用 Bot 的預設電腦(你選的那台沒有螢幕時停下來說,不換到別台的螢幕)。
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
- **看:截圖上每個能點的東西都框起來、標了編號。** Bot 拿到的截圖上,每個按鈕、連結、輸入框、選單項目都有編號,另外附同樣編號的清單(例如「[21] 連結「Profile」」)。編號來自系統的無障礙資訊(Mac 的 AX、Linux 的 AT-SPI;Bot 的電腦裡網頁內容也有,Chromium 開了無障礙),所以網頁上的小圖示也有編號。只有被別的視窗擋住的按鈕不給編號(Mac 上逐一檢查最上層的視窗是不是同一個 App),免得點到別的 App。
- Linux 上用前景視窗所屬程式的執行檔名稱去找 App(agent-desktop 認的是這個):Snap 版 Firefox 的視窗類別是「firefox_firefox」,程式是「firefox」,以前因此找不到、只剩一張沒有編號的截圖。
- Linux 上一個編號都沒有、而且桌面的無障礙開關(AT-SPI 的 IsEnabled)是關著時,AnyBot 會把它打開(跟螢幕閱讀器一樣),並告訴 Bot:「這台的無障礙介面原本是關著的,AnyBot 剛把它打開:之後打開的 App 才會有編號,已經開著的 App 要關掉重開。網頁請改用 browser_* 工具。」
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
- **動手:照編號點,只有一種方式(真的滑鼠和鍵盤)。** 點編號就是點那個東西的正中央;圖上沒編號的東西才用 x、y。Mac 用 CoreGraphics,Linux 用 X11/Wayland(desk.rs),Bot 的電腦用 xdotool。(以前 Bot 看圖猜座標,曾把一塊空白當成選單項目連點十次。)
- **每個動作做完自動附上新的編號截圖**(點、打字、按鍵、捲動、拖曳、移動滑鼠、打開 App;先等 0.5 秒讓畫面穩定),Bot 不用再花一步截圖確認。拍不到畫面時(Mac 還沒開「螢幕與系統錄音」),改附最前面 App 的清單(含文字)。
- **不鬼打牆**:動作後畫面和上一步完全一樣,結果會寫「畫面和上一步完全一樣:這一步沒有點到東西」,並叫 Bot 換編號、換方法或請人幫忙。同一步(點擊座標相差不到 16 像素也算)在一個回合裡做第 3 次會加警告,第 4 次起不執行,直接叫它換方法。
- 在 Bot 的電腦上:一個動作只開一次 `docker exec`(動作、按鈕清單和之後的畫面在同一個指令裡,約 0.4 秒)。桌面是一個 TigerVNC(畫面和 VNC 合一,取代 Xvfb+x11vnc),開機就啟動無障礙服務(AT-SPI),瀏覽器一律由 `anybot-browser` 開(同一個設定檔和 CDP、網頁開放無障礙、同時開兩個不會搶設定檔;做法取自 XBot 的 box)。這台電腦比 AnyBot 舊時(第 4 版起),大腦會在沒人用一分鐘後自己更新它(檔案和登入保留),不用問你;英文一個鍵一個鍵打,中文和表情符號用剪貼簿貼上(終端機用 Shift+Insert,其他程式用 Ctrl+V),所以任何程式都打得進去;⌘ 當成 Ctrl。不用 `xdotool mousemove --sync`:滑鼠已經在那個位置時它會一直等(同一點點兩次會卡兩分鐘)。
One way to act on a screen: a real click or keystroke, wherever the bot looked - Acting by an app's number (read_app's e7) is now a real click at that control's spot, the same path as screenshot coordinates. agent-desktop only reads; its own actions (a second set with its own key names and failures: no typing in terminals, "/" and "`" failing off the main thread) are gone, with computer_use_select, background clicks and press_key's app. - Every action comes back with the screen after it (or, with no picture allowed, the front app's numbered controls), so the bot no longer spends a step on a screenshot to check. - Coordinates map without remembering a screenshot: the picture's size depends only on the screen. The phone's taps go straight to the screen as the person's, in the pixels of the picture it was sent; they used to borrow the bot's last screenshot scale and landed 1.25x off on the bots' computer, or failed with "screenshot first". - Mac typing pastes (⌘V, clipboard put back): with 注音 on, text sent as key events vanished while return arrived, so commands typed into a terminal ran empty. Bare printing keys ("slash", "r") are typed the same way; keys like "slash" and "grave" have names. - The bots' Docker computer: one docker exec per step (action, settle, picture), never `mousemove --sync` (it waits forever when the pointer is already there: a second click on the same spot hung two minutes), open_app (chromium = the browser browser_* drive, xterm). Tests: box_screen_is_exact (real Docker: bot and phone coordinates exact, same spot twice in under 2 s, ASCII + Chinese + named key typed), Calculator by numbers and Terminal typing under 注音 through the signed app, remote_e2e 28/28, Linux build + 151 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:51:19 +00:00
- 需要看得懂圖片的模型;看不懂圖片時用按鈕清單。
### 原版的九個工具
One way to act on a screen: a real click or keystroke, wherever the bot looked - Acting by an app's number (read_app's e7) is now a real click at that control's spot, the same path as screenshot coordinates. agent-desktop only reads; its own actions (a second set with its own key names and failures: no typing in terminals, "/" and "`" failing off the main thread) are gone, with computer_use_select, background clicks and press_key's app. - Every action comes back with the screen after it (or, with no picture allowed, the front app's numbered controls), so the bot no longer spends a step on a screenshot to check. - Coordinates map without remembering a screenshot: the picture's size depends only on the screen. The phone's taps go straight to the screen as the person's, in the pixels of the picture it was sent; they used to borrow the bot's last screenshot scale and landed 1.25x off on the bots' computer, or failed with "screenshot first". - Mac typing pastes (⌘V, clipboard put back): with 注音 on, text sent as key events vanished while return arrived, so commands typed into a terminal ran empty. Bare printing keys ("slash", "r") are typed the same way; keys like "slash" and "grave" have names. - The bots' Docker computer: one docker exec per step (action, settle, picture), never `mousemove --sync` (it waits forever when the pointer is already there: a second click on the same spot hung two minutes), open_app (chromium = the browser browser_* drive, xterm). Tests: box_screen_is_exact (real Docker: bot and phone coordinates exact, same spot twice in under 2 s, ASCII + Chinese + named key typed), Calculator by numbers and Terminal typing under 注音 through the signed app, remote_e2e 28/28, Linux build + 151 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:51:19 +00:00
computer_use_screenshot、click、mouse_move、mouse_button(按住/放開)、drag、scroll、typing、press_key、check_permissions。另外兩個:
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
- **(已併入截圖)「讀 App 畫面」**:按鈕清單現在就在每張截圖裡,不再是另一個工具。很長的內容(終端機的整段捲動紀錄)留開頭 160 字和結尾 400 字。
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
- **「打開 App」(computer_use_open_app)**:打開或叫到最前面,顯示的名字也可以(「計算機」→ Calculator)。Bot 的電腦上:chromium(瀏覽器,就是 browser_* 在用的那個,不會開第二個)、終端機(xfce4-terminal,跟工作列的「終端機」一樣;第 11 版以前是 xterm,xterm 照名字還打得開)、檔案管理員(也認「檔案總管」「Files」「Finder」等,開 Thunar,從家目錄開始)或其他程式名稱;回覆用 Bot 說的名字(「已打開「檔案管理員」」)。
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
- **(已拿掉)「按住或放開滑鼠」**:拖曳已經涵蓋。
- **「檢查螢幕權限」(computer_use_check_permissions)**:回報「螢幕錄製:已允許/還沒允許」「輔助使用(滑鼠和鍵盤):…」,不會跳出系統視窗。Bot 的電腦上一律可以。
### 逐個 App 授權(原版:「Grok Bot 可以看到 {app},並在其中點擊和輸入」)
- 看螢幕(截圖)問一次「看你的螢幕畫面」。
- 點擊、打字、捲動、拖曳時,AnyBot 先找出會落在哪個 App:點的位置底下的視窗,打字和按鍵則是最前面的 App。第一次碰到某個 App 會問:「讓 {Bot} 看到「{App}」,並在其中點擊和輸入:{動作}」。選「一律允許」就記成這個 Bot 對這個 App 的授權;設定頁可以移除。
- 直接操作模式下不問。
### 接管與停止(你的 Mac)
- Bot 在你的 Mac 上動滑鼠或鍵盤時,螢幕最上方中間會浮出一條橫幅(永遠在最上層,不會被其他視窗蓋住):紅點「{Bot} 正在操作你的電腦」,右邊「取得控制權」和「停止」。最後一個動作後 8 秒(估計值)自動收起。
- **取得控制權**:橫幅變成「你正在操作,Bot 已暫停」,按鈕變「交還給 Bot」。這段時間 Bot 的滑鼠鍵盤動作會被擋下,它會收到「使用者正在自己操作這台電腦(已取得控制權)。請等他交還控制權後再操作」。截圖仍可以。
- **停止**:直接停掉那個 Bot 這一回合的工作。
### 示範教學(原版:「錄下你執行任務的過程。{Bot} 會學習這些步驟,之後可以自行再次執行。」)
- 在設定 → 電腦 →「示範教學」,替目前選的 Bot 輸入任務名稱(例如「匯出本月報表」),按「開始錄製」。
- 設定視窗會關掉,螢幕上方出現「{Bot} 正在觀看並學習 分:秒」(紅點閃爍),右邊「完成」「取消」。
- 照平常的方式操作。AnyBot 只「聽」點擊、打字和捲動,不會擋住或改變你的操作;點在 AnyBot 自己視窗上的不算。
- 錄製時每 0.5 秒拍一張螢幕畫面(寬 1280,需要「螢幕與系統錄音」權限),完成後用 ffmpeg 合成影片(原版也是用 ffmpeg 錄影);沒有 ffmpeg 時保留每一步的畫面。每一步都留一張「做這一步之前」的畫面。
- 示範卡片上有「播放錄影」,展開步驟後每一步有「畫面」可以打開。
- Bot 有新工具「view_demo_step」(示範名稱+第幾步),可以看那一步當時的畫面,照著找按鈕;不用問你。
- 按「完成」後整理成步驟,例如:
1. 切到「Safari」,在「Safari」點 (50, 25)
2. 在「Safari」輸入「hi」(打錯刪掉的字會一起刪掉)
3. 按 return
4. 按 cmd+c
5. 切到「備忘錄」,在「備忘錄」連點 2 下 (150, 100)(0.4 秒內同一個位置算連點,估計值)
6. 在「備忘錄」往下捲動(1.5 秒內連續的捲動算一次,估計值)
- 座標換算成截圖上的位置,Bot 可以直接用。
- 聊天上方顯示「已記下「名稱」(N 個步驟)。之後跟 Bot 說「照示範做 名稱」就可以。」
- 每個 Bot 的示範列在卡片下面,可以展開看步驟或刪除;同名的會被新的取代。
- Bot 的系統指示會附上它學過的示範,並提醒它每一步先截圖確認、畫面不同就找對應的按鈕。
- 第一次需要 macOS「輸入監控」權限:沒開時 AnyBot 會打開那個設定頁,並說「macOS 還沒讓 AnyBot 觀看你的操作。我已經打開「系統設定 → 隱私權與安全性 → 輸入監控」:把 AnyBot(或「終端機」)打開,再按一次「開始錄製」。」
### 權限
- 截圖要「螢幕與系統錄音」權限。沒開時,AnyBot 會打開那個設定頁並說:「macOS 還沒讓 AnyBot 錄製螢幕,所以看不到畫面。我已經打開「系統設定 → 隱私權與安全性 → 螢幕與系統錄音」:把 AnyBot(或「終端機」)打開,再叫我試一次。只要開一次。」
- 滑鼠和鍵盤要「輔助使用」權限,沒開時的說法類似。
- 在 AnyBot 裡:
- 第一次看螢幕會問一次(「看你的螢幕畫面」)。
- 第一次動滑鼠或鍵盤也會問一次(「操作你的滑鼠和鍵盤」)。
- 兩者都可以一律允許;直接操作模式下不問。
### 座標
One way to act on a screen: a real click or keystroke, wherever the bot looked - Acting by an app's number (read_app's e7) is now a real click at that control's spot, the same path as screenshot coordinates. agent-desktop only reads; its own actions (a second set with its own key names and failures: no typing in terminals, "/" and "`" failing off the main thread) are gone, with computer_use_select, background clicks and press_key's app. - Every action comes back with the screen after it (or, with no picture allowed, the front app's numbered controls), so the bot no longer spends a step on a screenshot to check. - Coordinates map without remembering a screenshot: the picture's size depends only on the screen. The phone's taps go straight to the screen as the person's, in the pixels of the picture it was sent; they used to borrow the bot's last screenshot scale and landed 1.25x off on the bots' computer, or failed with "screenshot first". - Mac typing pastes (⌘V, clipboard put back): with 注音 on, text sent as key events vanished while return arrived, so commands typed into a terminal ran empty. Bare printing keys ("slash", "r") are typed the same way; keys like "slash" and "grave" have names. - The bots' Docker computer: one docker exec per step (action, settle, picture), never `mousemove --sync` (it waits forever when the pointer is already there: a second click on the same spot hung two minutes), open_app (chromium = the browser browser_* drive, xterm). Tests: box_screen_is_exact (real Docker: bot and phone coordinates exact, same spot twice in under 2 s, ASCII + Chinese + named key typed), Calculator by numbers and Terminal typing under 注音 through the signed app, remote_e2e 28/28, Linux build + 151 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:51:19 +00:00
- 用截圖上的像素位置。截圖的大小只看螢幕大小(長邊 1,024),所以換算不用記「上一張截圖」:還沒截圖也能點,每個 Bot、手機看到的都是同一個尺寸。
- 例如寬 1,470 點的螢幕送出寬 1,024 的圖,圖上 (512, 333) 就是螢幕上的 (735, 478)。
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
- 或用截圖上的編號(ref):點那個控制項的中心。那個 App 不在最前面時先把它叫到前面,免得點到蓋在上面的視窗。
One way to act on a screen: a real click or keystroke, wherever the bot looked - Acting by an app's number (read_app's e7) is now a real click at that control's spot, the same path as screenshot coordinates. agent-desktop only reads; its own actions (a second set with its own key names and failures: no typing in terminals, "/" and "`" failing off the main thread) are gone, with computer_use_select, background clicks and press_key's app. - Every action comes back with the screen after it (or, with no picture allowed, the front app's numbered controls), so the bot no longer spends a step on a screenshot to check. - Coordinates map without remembering a screenshot: the picture's size depends only on the screen. The phone's taps go straight to the screen as the person's, in the pixels of the picture it was sent; they used to borrow the bot's last screenshot scale and landed 1.25x off on the bots' computer, or failed with "screenshot first". - Mac typing pastes (⌘V, clipboard put back): with 注音 on, text sent as key events vanished while return arrived, so commands typed into a terminal ran empty. Bare printing keys ("slash", "r") are typed the same way; keys like "slash" and "grave" have names. - The bots' Docker computer: one docker exec per step (action, settle, picture), never `mousemove --sync` (it waits forever when the pointer is already there: a second click on the same spot hung two minutes), open_app (chromium = the browser browser_* drive, xterm). Tests: box_screen_is_exact (real Docker: bot and phone coordinates exact, same spot twice in under 2 s, ASCII + Chinese + named key typed), Calculator by numbers and Terminal typing under 注音 through the signed app, remote_e2e 28/28, Linux build + 151 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:51:19 +00:00
- 手機網頁看螢幕時:Bot 的電腦送原尺寸畫面,這台電腦送和 Bot 一樣大小的截圖;手機點的位置照它拿到的那張畫面換算,是「你」在操作(不經過 Bot 的工具,你取得控制權時也照樣能點)。以前手機的點擊借用 Bot 上一張截圖的比例,點 Bot 的電腦會偏到右下(多 1.25 倍)或要求先截圖。
- 你自己的滑鼠和鍵盤不會被凍住。
### 「看你的螢幕」(computer_use_screenshot)
- 只拍主螢幕,沒有快門聲。
- 長邊縮到 1,024,例如 2940×1912 會變成 1024×666;短邊不小於 8。
- JPEG 品質依序試 85、70、55,取第一個小於 1 MB(1,048,576 位元組)的。這些都取自原版。
- 只把最近 3 張截圖給模型看(估計值),較早的改成「(較早的截圖已省略)」。截圖不會存到硬碟。
- 成功:「你的螢幕截圖(寬×高)。之後的座標請用這張圖上的像素位置。」
Bots work like someone who knows the computer: they know each machine, reach what they see, plan, and hand the planned steps to a quick model Measured on the bot's own box (8 tasks x 2, grok-4.7): 14/16 done, 120 steps, 1114 s before; 16/16, 102 steps, 574 s after (model time 1015 -> 471 s). A replayed skill: 49 s -> 15 s. Knowing the machine - facts.rs: 電腦現況 per computer (system, desktop, systemd, sudo, network, package manager, tools, apps, a fixed TZ), read once by a small read-only probe, kept 30 min, in the instructions at the start of a turn. - The box's sudo is the bot's: only what follows sudo is checked against the always-denied list (it was refused outright, while the instructions said it could sudo), and commands with sudo run as the box's root (setuid does nothing under gVisor). - Box image v8 drops ENV TZ=UTC (it overrode /etc/localtime). ANYBOT_BOX_IMAGE / ANYBOT_BOX_VOLUME give a throwaway box its own image and volume, never adopting the real one. - Mac shell sandbox: App Store app CLIs (they carry their own app sandbox) and ps/top run outside it; plain `osascript -e` too, asked the first time even in direct mode, refusing do shell script, terminals, keystrokes, file reads, ObjC and the secret folders. A command the sandbox broke says so, instead of looking like a broken program. Reaching what it sees - The Mac menu bar's status icons are numbered (each app's AXExtrasMenuBar, named from inside for the system's own), computer_use_zoom looks closer at full sharpness. - Numbers stay with their controls from look to look (they were reassigned every look, so a step's second click landed elsewhere); the box's front window is listed first; a control can be named instead of numbered (name "4"). - Web page numbering walks open shadow DOM (Chromium settings, web components). - A box on a Docker host elsewhere retries the next port when the usual one is taken (a retry without it came up with no network). Working like a person - Instructions: pick the route, know what done looks like, one route, check once, say what's stuck instead of faking it with a substitute, ask before cutting the connection. - StepPlan: the bot's model takes the first step, the step after trouble (failed, refused, repeated, nothing changed on screen, the quick model switching routes), one in four, and the final check; a quick model (Bot.step_model, auto: grok-4.20-0309-non-reasoning on xAI) does the planned steps in between, falling back to the bot's model if it can't be used. - Skills keep the steps that worked (with what each acted on, not numbers); replay_skill does them again with no model in between, finding each control again, handing back on a mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 01:01:03 +00:00
- Mac 選單列右上角的圖示(Wi‑Fi、控制中心、時鐘、Tailscale、LINE…)也有編號,叫「選單列圖示」:從每個 App 的 AXExtrasMenuBar 讀,系統自己的圖示用它裡面那一層的字(「Wi‑Fi,已連接,3格」),同時問 8 個 App,一次約 0.3 秒;15 秒內用上次讀的,過期就在背景重讀,不讓截圖等。
- Mac 最前面那個 App 自己的選單(「檔案」「編輯」「格式」…)也有編號,叫「選單」;拉下來的選單、從它打開的子選單、按右鍵出來的選單,裡面的項目叫「選單項目」,有快捷鍵的會寫「快捷鍵 option+shift+cmd+s」,下次可以直接按。同一個位置按住 option 才會出現的項目(「複製」底下的「儲存為⋯」)不另外編號,寫在看得到的那個旁邊:「按住 option 時這裡是「儲存為⋯」」。每次看畫面直接讀(文字編輯約 0.05–0.13 秒),App 0.25 秒不回應就略過。以前這些都沒有編號,Bot 要放大截圖或自己寫 osascript 去找。
- 讀不到最前面 App 視窗裡的按鈕時(App 沒回應、正好在切換),清單照樣列出選單列,但會先說「讀不到最前面「某某」視窗裡的按鈕(原因):下面只有選單列」。以前只寫「「」上可以操作的東西」,Bot 不知道視窗沒讀到,猜了 8 分鐘的名字。
- 只有圖示的控制項沒有名字時,用它的說明當名字(存檔對話框的展開鈕「顯示較多選項」);展開鈕、顏色、日期這幾種控制項也有編號了(以前沒有,Bot 只能照座標點,常點不到)。
Bots work like someone who knows the computer: they know each machine, reach what they see, plan, and hand the planned steps to a quick model Measured on the bot's own box (8 tasks x 2, grok-4.7): 14/16 done, 120 steps, 1114 s before; 16/16, 102 steps, 574 s after (model time 1015 -> 471 s). A replayed skill: 49 s -> 15 s. Knowing the machine - facts.rs: 電腦現況 per computer (system, desktop, systemd, sudo, network, package manager, tools, apps, a fixed TZ), read once by a small read-only probe, kept 30 min, in the instructions at the start of a turn. - The box's sudo is the bot's: only what follows sudo is checked against the always-denied list (it was refused outright, while the instructions said it could sudo), and commands with sudo run as the box's root (setuid does nothing under gVisor). - Box image v8 drops ENV TZ=UTC (it overrode /etc/localtime). ANYBOT_BOX_IMAGE / ANYBOT_BOX_VOLUME give a throwaway box its own image and volume, never adopting the real one. - Mac shell sandbox: App Store app CLIs (they carry their own app sandbox) and ps/top run outside it; plain `osascript -e` too, asked the first time even in direct mode, refusing do shell script, terminals, keystrokes, file reads, ObjC and the secret folders. A command the sandbox broke says so, instead of looking like a broken program. Reaching what it sees - The Mac menu bar's status icons are numbered (each app's AXExtrasMenuBar, named from inside for the system's own), computer_use_zoom looks closer at full sharpness. - Numbers stay with their controls from look to look (they were reassigned every look, so a step's second click landed elsewhere); the box's front window is listed first; a control can be named instead of numbered (name "4"). - Web page numbering walks open shadow DOM (Chromium settings, web components). - A box on a Docker host elsewhere retries the next port when the usual one is taken (a retry without it came up with no network). Working like a person - Instructions: pick the route, know what done looks like, one route, check once, say what's stuck instead of faking it with a substitute, ask before cutting the connection. - StepPlan: the bot's model takes the first step, the step after trouble (failed, refused, repeated, nothing changed on screen, the quick model switching routes), one in four, and the final check; a quick model (Bot.step_model, auto: grok-4.20-0309-non-reasoning on xAI) does the planned steps in between, falling back to the bot's model if it can't be used. - Skills keep the steps that worked (with what each acted on, not numbers); replay_skill does them again with no model in between, finding each control again, handing back on a mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 01:01:03 +00:00
### 「放大看」(computer_use_zoom)
- 參數:最新截圖上的 x、y、width、height。從螢幕原本的清晰度切那一塊、放大(長邊最多 1,024,最多放大 4 倍),給選單列圖示、小字、小按鈕用。
- 結果說明放大圖上的點怎麼換回一般截圖的座標;有編號的東西還是照編號點。
- 你的電腦、Bot 的電腦、帳號裡其他電腦都可以用;算「看」,和截圖用同一個允許。
### 「點一下」(computer_use_click)
- 參數:x、y、左/右/中鍵、點幾下(1–3)、修飾鍵。
- 先移過去,按下後停 0.03 秒再放開;連點時每下隔 0.08 秒(取自原版)。
One way to act on a screen: a real click or keystroke, wherever the bot looked - Acting by an app's number (read_app's e7) is now a real click at that control's spot, the same path as screenshot coordinates. agent-desktop only reads; its own actions (a second set with its own key names and failures: no typing in terminals, "/" and "`" failing off the main thread) are gone, with computer_use_select, background clicks and press_key's app. - Every action comes back with the screen after it (or, with no picture allowed, the front app's numbered controls), so the bot no longer spends a step on a screenshot to check. - Coordinates map without remembering a screenshot: the picture's size depends only on the screen. The phone's taps go straight to the screen as the person's, in the pixels of the picture it was sent; they used to borrow the bot's last screenshot scale and landed 1.25x off on the bots' computer, or failed with "screenshot first". - Mac typing pastes (⌘V, clipboard put back): with 注音 on, text sent as key events vanished while return arrived, so commands typed into a terminal ran empty. Bare printing keys ("slash", "r") are typed the same way; keys like "slash" and "grave" have names. - The bots' Docker computer: one docker exec per step (action, settle, picture), never `mousemove --sync` (it waits forever when the pointer is already there: a second click on the same spot hung two minutes), open_app (chromium = the browser browser_* drive, xterm). Tests: box_screen_is_exact (real Docker: bot and phone coordinates exact, same spot twice in under 2 s, ASCII + Chinese + named key typed), Calculator by numbers and Terminal typing under 注音 through the signed app, remote_e2e 28/28, Linux build + 151 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:51:19 +00:00
- 結果:「已點 (x, y)。」或「已點 e7(按鈕「7」)。」,加上新畫面。
### 「打字」(computer_use_typing)
One way to act on a screen: a real click or keystroke, wherever the bot looked - Acting by an app's number (read_app's e7) is now a real click at that control's spot, the same path as screenshot coordinates. agent-desktop only reads; its own actions (a second set with its own key names and failures: no typing in terminals, "/" and "`" failing off the main thread) are gone, with computer_use_select, background clicks and press_key's app. - Every action comes back with the screen after it (or, with no picture allowed, the front app's numbered controls), so the bot no longer spends a step on a screenshot to check. - Coordinates map without remembering a screenshot: the picture's size depends only on the screen. The phone's taps go straight to the screen as the person's, in the pixels of the picture it was sent; they used to borrow the bot's last screenshot scale and landed 1.25x off on the bots' computer, or failed with "screenshot first". - Mac typing pastes (⌘V, clipboard put back): with 注音 on, text sent as key events vanished while return arrived, so commands typed into a terminal ran empty. Bare printing keys ("slash", "r") are typed the same way; keys like "slash" and "grave" have names. - The bots' Docker computer: one docker exec per step (action, settle, picture), never `mousemove --sync` (it waits forever when the pointer is already there: a second click on the same spot hung two minutes), open_app (chromium = the browser browser_* drive, xterm). Tests: box_screen_is_exact (real Docker: bot and phone coordinates exact, same spot twice in under 2 s, ASCII + Chinese + named key typed), Calculator by numbers and Terminal typing under 注音 through the signed app, remote_e2e 28/28, Linux build + 151 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:51:19 +00:00
- 任何語言都可以,包括中文。可以給 ref(先點那個欄位);submit=true 打完再按 return。
- 每段最多 20 個字元單位,不會把一個字切斷。每段按下後停 0.035 秒再放開,段與段之間隔 0.02 秒(取自原版)。
- 結果:「已打字(N 個字)。」
### 「按鍵」(computer_use_press_key)
- 例如 return、tab、escape、delete、up、cmd+c、cmd+shift+t、cmd+space。
- 多個鍵用空白分開,依序按,例如「cmd+a delete」。
- 每個鍵按住 0.035 秒,鍵與鍵之間隔 0.02 秒(取自原版)。可以指定按多久,最多 5 秒。
- 可用的鍵:
- return/enter、tab、space、delete/backspace、escape、forwarddelete、home、end、pageup、pagedown、方向鍵、F1–F12。
One way to act on a screen: a real click or keystroke, wherever the bot looked - Acting by an app's number (read_app's e7) is now a real click at that control's spot, the same path as screenshot coordinates. agent-desktop only reads; its own actions (a second set with its own key names and failures: no typing in terminals, "/" and "`" failing off the main thread) are gone, with computer_use_select, background clicks and press_key's app. - Every action comes back with the screen after it (or, with no picture allowed, the front app's numbered controls), so the bot no longer spends a step on a screenshot to check. - Coordinates map without remembering a screenshot: the picture's size depends only on the screen. The phone's taps go straight to the screen as the person's, in the pixels of the picture it was sent; they used to borrow the bot's last screenshot scale and landed 1.25x off on the bots' computer, or failed with "screenshot first". - Mac typing pastes (⌘V, clipboard put back): with 注音 on, text sent as key events vanished while return arrived, so commands typed into a terminal ran empty. Bare printing keys ("slash", "r") are typed the same way; keys like "slash" and "grave" have names. - The bots' Docker computer: one docker exec per step (action, settle, picture), never `mousemove --sync` (it waits forever when the pointer is already there: a second click on the same spot hung two minutes), open_app (chromium = the browser browser_* drive, xterm). Tests: box_screen_is_exact (real Docker: bot and phone coordinates exact, same spot twice in under 2 s, ASCII + Chinese + named key typed), Calculator by numbers and Terminal typing under 注音 through the signed app, remote_e2e 28/28, Linux build + 151 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:51:19 +00:00
- a–z、0–9 和常見符號,也可以寫名字:slash、comma、period、semicolon、quote、minus、equal、grave、bracketleft/bracketright、backslash。
- 不是按鍵的單一字元(「@」「?」)直接打出來。
- 修飾鍵:cmd、shift、option、control(也聽得懂 command、alt、ctrl 等寫法)。
- 錯誤:「不認得「X」這個鍵」「不認得「X」這個修飾鍵」。
### 其他操作
- **「捲動」(computer_use_scroll)**
- 往上、下、左、右,預設 3 格,最多 50 格。
- 結果:「已捲動 {方向} N 格。」
- **「移動滑鼠」(computer_use_mouse_move)**
- 例如讓滑過才出現的選單顯示出來。
- 結果:「已移動滑鼠。」
- **「拖曳」(computer_use_drag)**
- 沿著一串點拖過去,第一點按下、最後一點放開,每步隔 8 毫秒(估計值)。
- 至少要兩個點。
- 結果:「已拖曳(N 個點)。」
---
### Mac 內建 App(原版的裝置工具,名稱一樣)
| 工具 | 做什麼 | 權限 |
|---|---|---|
| ios_read_reminders | 看提醒事項(可指定清單、關鍵字、是否含已完成) | 每個 App 問一次「讀取你的「提醒事項」」 |
| ios_write_reminders | 新增、修改、完成、刪除提醒事項 | 問「修改你的「提醒事項」」,可一律允許 |
| mobile_read_calendar | 看某段時間的行程 | 讀取:問一次 |
| mobile_write_calendar | 新增、修改、刪除行程(沒給結束時間就排 1 小時) | 修改:可一律允許 |
| mobile_read_contacts | 用名字、電子郵件或電話找人,最多 50 筆(原版一次 50 筆) | 讀取:問一次 |
| mac_read_notes | 搜尋備忘錄,或讀一則(最多 20,000 字,原版的上限) | 讀取:問一次 |
| mac_write_notes | 新增(要有標題)或接在某則後面(要給 id 和目前的標題;標題變了會請 Bot 重讀) | 修改:可一律允許 |
| mac_read_mail | 搜尋郵件(關鍵字、信箱、只看未讀、最近幾天),或讀一封(最多 20,000 字) | 讀取:問一次 |
| mac_draft_mail | 在「郵件」打開草稿(新信要有收件人;也可以回覆某封),由你自己按寄出 | 修改:可一律允許 |
| mac_send_mail | 直接寄出 | **每一封都問**,沒有「一律允許」,直接操作模式也一樣 |
| mac_mail_accounts | 列出郵件帳號和地址 | 讀取:問一次 |
| mac_send_message | 用「訊息」傳 iMessage/簡訊 | **每一則都問** |
- 透過 macOS 的自動化執行,第一次用到每個 App 時 macOS 會自己問一次。被拒絕時 AnyBot 會打開「系統設定 → 隱私權與安全性 → 自動化」並說明要打開哪個 App。
- 每次最多等 30 秒(原版 30 秒)。
- 搜尋郵件時最多看最近 300 封(估計值,郵件 App 的腳本很慢)。
---
### 附加檔案和圖片
- 輸入框左下角「+」:打開 Finder 選檔案(可以一次選很多個)。也可以把檔案拖到視窗上(整個視窗會變淡,顯示「放開以附加檔案」),或在輸入框按 ⌘V 貼上剪貼簿裡的圖片(例如 ⌃⇧⌘4 截的圖)。
- 等著送出的附件排在輸入框上方:圖片顯示縮圖,其他檔案顯示檔名和大小,每個都有 × 可以拿掉。只有附件、沒有文字也可以送出。
- 每個附件會複製一份到 AnyBot 的資料夾,原檔搬走也不影響聊天。最大 50 MB(估計值)。資料夾不能直接附加。
- 送給模型時:
- 圖片:縮成跟截圖一樣(長邊 1024、最大 1 MB),跟你的文字一起送(OpenAI 相容和 Claude 兩種格式都支援)。HEIC、TIFF 等先用 macOS 轉檔。
- 文字檔、程式碼:直接讀內容;Word、RTF、Pages、HTML 用 macOS 的 textutil 轉成文字;PDF 在有 pdftotext 時讀內容。每個最多 20,000 字。
- 其他檔案:告訴 Bot 檔案在哪裡,讓它用工具處理。
- 「Bot 的電腦」正在執行時,附件也會放進那個 Bot 的資料夾 `附件/`,並告訴 Bot 位置。
- 聊天裡你的訊息上方顯示附件;點一下用預設的 App 打開。
- Bot 工作中送出附件時,文字內容會補充給正在進行的工作(圖片要等下一回合)。
Voice: its own 設定 › 語音, run by the brain for every screen and the phone Voice was three implementations that broke on their own: speech to text borrowed the OpenAI key (so with only Grok set up the mic recorded, then failed), OpenAI's models it hard-coded stop on 2027-02-26, read aloud was macOS `say` or espeak-ng (silently nothing on Windows, where espeak isn't installed), and the phone used the browser's own recognition. Now: - 設定 › 語音 has 聽 and 說, each a service: off, OpenAI-compatible (OpenAI, Groq, a Whisper server of your own: the address decides), xAI or ElevenLabs. An empty key borrows 設定 › 模型's for the same service. Each side says 可以用 or what it lacks; 聽 has 試試看 (record a sentence, show what was heard), 說 has 試聽 and the voice list. speech.rs does the calls; xAI's both ways were checked for real (Mandarin read, then heard back, in Traditional characters). - The brain does it all: the phone POSTs its recording (MediaRecorder) to /api/voice/transcribe, screens to /api/sync/voice/transcribe; answers come back as MP3 from …/voice/speech and are played on the device (rodio; an <audio> on the phone, 「唸出來」 in a message's menu). Keys stay on the brain (the voice keys are redacted for screens like the others). - No service, no voice anywhere: the mic, 語音聊天, 會議錄音 and 朗讀 only appear once 聽 (and 說) can be called; the phone's state says which. Without voice the send arrow just rests where 語音聊天 was. - 會議錄音 is uploaded to the brain, which turns it into text in the background and hands it to the bot itself: a meeting is longer than the 35 s the account lets a request wait, and a brain on a server has no window (the jobs are polled in background()). - Recognisers answer Mandarin in Simplified: in a Traditional Chinese window or phone the text becomes Traditional with Taiwan wording. - Older saves: whoever had an OpenAI key keeps voice input (聽 = OpenAI); everyone else starts with it off. Bots' macOS voice names are cleared. 對話詳細資訊's 加入會議 started plain voice input; it starts a meeting now.
2026-11-10 14:58:18 +00:00
### 語音設定(設定 › 語音)
- 語音是獨立的設定,分成「聽」(把你說的話轉成文字)和「說」(把回答唸出來),各自選一個服務:關閉、OpenAI 相容(OpenAI、Groq、自己架的 Whisper 伺服器,看網址)、xAI(Grok)、ElevenLabs。
- 金鑰留空時,借用「設定 › 模型」裡同一家的金鑰(xAI;OpenAI 的網址才借 OpenAI 的)。自己架的伺服器可以不用金鑰。
- 全部在大腦處理:每台電腦和手機只負責錄音和播放,錄音送到大腦轉文字,朗讀的聲音也由大腦產生,所以每一台的結果都一樣;金鑰只放在大腦。
- **沒有設定時,麥克風、語音聊天、會議錄音、朗讀都不會出現**;設定好就自動出現在每台電腦和手機上。
fix: 選聲音改成一個選單;搜尋框不再搶走輸入框的游標;側欄選中的 Bot 拿掉左邊色條 - 聲音(對話詳細資訊 › 語音聊天、設定 › 語音 › 說):原本是「聲音」字+「載入聲音清單」鈕+要自己打代號的框,載入後又多一個不顯示目前選擇的「選一個…」。現在和速度、語言一樣是一列一個選單:第一項「預設(eve)」,下面是服務的聲音(ElevenLabs 顯示名字),選了試唸一句;清單在那一列出現時就拿(每種「說」設定一次)。拿不到時選單裡寫一行原因,可以直接輸入名稱或「再試一次」。 - egui 的選單停在打開時的高度,清單或錯誤後來才到時下面被切掉:內容到了就在選單畫出前清掉它記住的大小,重新量一次。 - 語音服務的錯誤不再貼原始 JSON:金鑰被拒(含 xAI 用 400 回的)只說「不接受這把金鑰」,其他取服務回的 message。各服務不選時用的聲音集中在 speech::usual_voice。 - 側欄搜尋:搜尋框開著而且是空的時候,每一格都把游標拿回去,點輸入框打字的字會跑進搜尋框。改成只在按 🔍(下一格)或 ⌘F 時給一次。 - 側欄選中的 Bot 不再有強調色細條,只有淺底(比滑過深一階)。 已驗證:cargo test --bin anybot 525 通過(新增 a_refusal_reads_as_words_not_json、each_service_says_which_voice_it_uses_unasked);截圖:面板與設定的聲音選單(載入中打開、載入後打開都看得到輸入框和「再試一次」)、打開搜尋後點輸入框打「你好」留在輸入框、按 🔍 直接打「台南」進搜尋框、選中列沒有色條。 未驗證:用真的 xAI/ElevenLabs 金鑰載入清單和試唸。
2026-11-16 15:37:38 +00:00
- 每一邊顯示「✓ 可以用」或缺什麼;「聽」有「試試看(說一句話)」,「說」有「聲音」選單和「試聽」。
- 「聲音」選單(這裡和每個 Bot 的 對話詳細資訊 › 語音聊天 是同一種):第一項「預設(eve)」(括號裡是不選時用的那個:Bot 的預設是這裡選的聲音,這裡的預設是服務自己的,OpenAI 是 alloy、xAI 是 eve;ElevenLabs 沒有預設,要選一個,沒選時寫「還沒選」),下面是服務列出的聲音(ElevenLabs 顯示名字)。清單在那一列出現時就去拿,每種「說」設定拿一次。選了會用那個聲音試唸一句。拿不到清單時(金鑰不對、自己架的服務沒有清單),選單裡寫一行原因(金鑰被拒時只說「不接受這把金鑰」,不貼服務回的原文),下面可以直接輸入聲音名稱,並有「再試一次」。
Voice: its own 設定 › 語音, run by the brain for every screen and the phone Voice was three implementations that broke on their own: speech to text borrowed the OpenAI key (so with only Grok set up the mic recorded, then failed), OpenAI's models it hard-coded stop on 2027-02-26, read aloud was macOS `say` or espeak-ng (silently nothing on Windows, where espeak isn't installed), and the phone used the browser's own recognition. Now: - 設定 › 語音 has 聽 and 說, each a service: off, OpenAI-compatible (OpenAI, Groq, a Whisper server of your own: the address decides), xAI or ElevenLabs. An empty key borrows 設定 › 模型's for the same service. Each side says 可以用 or what it lacks; 聽 has 試試看 (record a sentence, show what was heard), 說 has 試聽 and the voice list. speech.rs does the calls; xAI's both ways were checked for real (Mandarin read, then heard back, in Traditional characters). - The brain does it all: the phone POSTs its recording (MediaRecorder) to /api/voice/transcribe, screens to /api/sync/voice/transcribe; answers come back as MP3 from …/voice/speech and are played on the device (rodio; an <audio> on the phone, 「唸出來」 in a message's menu). Keys stay on the brain (the voice keys are redacted for screens like the others). - No service, no voice anywhere: the mic, 語音聊天, 會議錄音 and 朗讀 only appear once 聽 (and 說) can be called; the phone's state says which. Without voice the send arrow just rests where 語音聊天 was. - 會議錄音 is uploaded to the brain, which turns it into text in the background and hands it to the bot itself: a meeting is longer than the 35 s the account lets a request wait, and a brain on a server has no window (the jobs are polled in background()). - Recognisers answer Mandarin in Simplified: in a Traditional Chinese window or phone the text becomes Traditional with Taiwan wording. - Older saves: whoever had an OpenAI key keeps voice input (聽 = OpenAI); everyone else starts with it off. Bots' macOS voice names are cleared. 對話詳細資訊's 加入會議 started plain voice input; it starts a meeting now.
2026-11-10 14:58:18 +00:00
- 中文辨識結果會轉成繁體和台灣用語(xAI 和 Whisper 常回簡體);日文不轉。
- 從舊版升級:原本有 OpenAI 金鑰(語音輸入本來就能用)的人,「聽」自動設成 OpenAI;其他人預設關閉。舊的 macOS 聲音名稱(美佳…)會清掉。
- OpenAI 的轉文字模型依序試 gpt-transcribe、gpt-4o-mini-transcribe、whisper-1(後兩個 OpenAI 在 2027-02-26 停用)。
- 伺服器上的大腦可以自己架語音服務(`make server` 會問):Whisper 在 CPU 上轉文字,大腦第一次啟動時自動把「聽」設成它(之後改掉就不再動)。它不會念中文,「說」請另外選。
- 服務回了 200 卻沒有聲音(例如不支援那個語言)時,會說「沒有產生聲音」,不會靜靜地什麼都沒唸。
Voice: its own 設定 › 語音, run by the brain for every screen and the phone Voice was three implementations that broke on their own: speech to text borrowed the OpenAI key (so with only Grok set up the mic recorded, then failed), OpenAI's models it hard-coded stop on 2027-02-26, read aloud was macOS `say` or espeak-ng (silently nothing on Windows, where espeak isn't installed), and the phone used the browser's own recognition. Now: - 設定 › 語音 has 聽 and 說, each a service: off, OpenAI-compatible (OpenAI, Groq, a Whisper server of your own: the address decides), xAI or ElevenLabs. An empty key borrows 設定 › 模型's for the same service. Each side says 可以用 or what it lacks; 聽 has 試試看 (record a sentence, show what was heard), 說 has 試聽 and the voice list. speech.rs does the calls; xAI's both ways were checked for real (Mandarin read, then heard back, in Traditional characters). - The brain does it all: the phone POSTs its recording (MediaRecorder) to /api/voice/transcribe, screens to /api/sync/voice/transcribe; answers come back as MP3 from …/voice/speech and are played on the device (rodio; an <audio> on the phone, 「唸出來」 in a message's menu). Keys stay on the brain (the voice keys are redacted for screens like the others). - No service, no voice anywhere: the mic, 語音聊天, 會議錄音 and 朗讀 only appear once 聽 (and 說) can be called; the phone's state says which. Without voice the send arrow just rests where 語音聊天 was. - 會議錄音 is uploaded to the brain, which turns it into text in the background and hands it to the bot itself: a meeting is longer than the 35 s the account lets a request wait, and a brain on a server has no window (the jobs are polled in background()). - Recognisers answer Mandarin in Simplified: in a Traditional Chinese window or phone the text becomes Traditional with Taiwan wording. - Older saves: whoever had an OpenAI key keeps voice input (聽 = OpenAI); everyone else starts with it off. Bots' macOS voice names are cleared. 對話詳細資訊's 加入會議 started plain voice input; it starts a meeting now.
2026-11-10 14:58:18 +00:00
### 語音輸入
Voice: its own 設定 › 語音, run by the brain for every screen and the phone Voice was three implementations that broke on their own: speech to text borrowed the OpenAI key (so with only Grok set up the mic recorded, then failed), OpenAI's models it hard-coded stop on 2027-02-26, read aloud was macOS `say` or espeak-ng (silently nothing on Windows, where espeak isn't installed), and the phone used the browser's own recognition. Now: - 設定 › 語音 has 聽 and 說, each a service: off, OpenAI-compatible (OpenAI, Groq, a Whisper server of your own: the address decides), xAI or ElevenLabs. An empty key borrows 設定 › 模型's for the same service. Each side says 可以用 or what it lacks; 聽 has 試試看 (record a sentence, show what was heard), 說 has 試聽 and the voice list. speech.rs does the calls; xAI's both ways were checked for real (Mandarin read, then heard back, in Traditional characters). - The brain does it all: the phone POSTs its recording (MediaRecorder) to /api/voice/transcribe, screens to /api/sync/voice/transcribe; answers come back as MP3 from …/voice/speech and are played on the device (rodio; an <audio> on the phone, 「唸出來」 in a message's menu). Keys stay on the brain (the voice keys are redacted for screens like the others). - No service, no voice anywhere: the mic, 語音聊天, 會議錄音 and 朗讀 only appear once 聽 (and 說) can be called; the phone's state says which. Without voice the send arrow just rests where 語音聊天 was. - 會議錄音 is uploaded to the brain, which turns it into text in the background and hands it to the bot itself: a meeting is longer than the 35 s the account lets a request wait, and a brain on a server has no window (the jobs are polled in background()). - Recognisers answer Mandarin in Simplified: in a Traditional Chinese window or phone the text becomes Traditional with Taiwan wording. - Older saves: whoever had an OpenAI key keeps voice input (聽 = OpenAI); everyone else starts with it off. Bots' macOS voice names are cleared. 對話詳細資訊's 加入會議 started plain voice input; it starts a meeting now.
2026-11-10 14:58:18 +00:00
- 輸入框的麥克風圖示(設定好「聽」才有):按一下開始錄音,變成紅色閃爍的「● 分:秒 完成」;再按一下停止,顯示「轉成文字…」,完成後文字放進輸入框(接在原本的文字後面),由你檢查後送出。
- Mac 用內建的錄音功能,不用另外安裝;第一次 macOS 會問麥克風權限,被拒絕時 AnyBot 會打開「系統設定 → 隱私權與安全性 → 麥克風」。手機用瀏覽器錄音。
- 最長 10 分鐘(估計值),到了自動停止。
Voice: its own 設定 › 語音, run by the brain for every screen and the phone Voice was three implementations that broke on their own: speech to text borrowed the OpenAI key (so with only Grok set up the mic recorded, then failed), OpenAI's models it hard-coded stop on 2027-02-26, read aloud was macOS `say` or espeak-ng (silently nothing on Windows, where espeak isn't installed), and the phone used the browser's own recognition. Now: - 設定 › 語音 has 聽 and 說, each a service: off, OpenAI-compatible (OpenAI, Groq, a Whisper server of your own: the address decides), xAI or ElevenLabs. An empty key borrows 設定 › 模型's for the same service. Each side says 可以用 or what it lacks; 聽 has 試試看 (record a sentence, show what was heard), 說 has 試聽 and the voice list. speech.rs does the calls; xAI's both ways were checked for real (Mandarin read, then heard back, in Traditional characters). - The brain does it all: the phone POSTs its recording (MediaRecorder) to /api/voice/transcribe, screens to /api/sync/voice/transcribe; answers come back as MP3 from …/voice/speech and are played on the device (rodio; an <audio> on the phone, 「唸出來」 in a message's menu). Keys stay on the brain (the voice keys are redacted for screens like the others). - No service, no voice anywhere: the mic, 語音聊天, 會議錄音 and 朗讀 only appear once 聽 (and 說) can be called; the phone's state says which. Without voice the send arrow just rests where 語音聊天 was. - 會議錄音 is uploaded to the brain, which turns it into text in the background and hands it to the bot itself: a meeting is longer than the 35 s the account lets a request wait, and a brain on a server has no window (the jobs are polled in background()). - Recognisers answer Mandarin in Simplified: in a Traditional Chinese window or phone the text becomes Traditional with Taiwan wording. - Older saves: whoever had an OpenAI key keeps voice input (聽 = OpenAI); everyone else starts with it off. Bots' macOS voice names are cleared. 對話詳細資訊's 加入會議 started plain voice input; it starts a meeting now.
2026-11-10 14:58:18 +00:00
### 會議錄音
- Bot 選單或對話詳細資訊的「加入會議」:最長 2 小時。結束後錄音交給大腦,大腦在背景轉成文字,再把文字記錄當附件交給這個 Bot 整理重點、決定和待辦(不受帳號伺服器一次 35 秒的限制)。轉不成時,Bot 的對話裡會說原因。
### 朗讀回答
Voice: its own 設定 › 語音, run by the brain for every screen and the phone Voice was three implementations that broke on their own: speech to text borrowed the OpenAI key (so with only Grok set up the mic recorded, then failed), OpenAI's models it hard-coded stop on 2027-02-26, read aloud was macOS `say` or espeak-ng (silently nothing on Windows, where espeak isn't installed), and the phone used the browser's own recognition. Now: - 設定 › 語音 has 聽 and 說, each a service: off, OpenAI-compatible (OpenAI, Groq, a Whisper server of your own: the address decides), xAI or ElevenLabs. An empty key borrows 設定 › 模型's for the same service. Each side says 可以用 or what it lacks; 聽 has 試試看 (record a sentence, show what was heard), 說 has 試聽 and the voice list. speech.rs does the calls; xAI's both ways were checked for real (Mandarin read, then heard back, in Traditional characters). - The brain does it all: the phone POSTs its recording (MediaRecorder) to /api/voice/transcribe, screens to /api/sync/voice/transcribe; answers come back as MP3 from …/voice/speech and are played on the device (rodio; an <audio> on the phone, 「唸出來」 in a message's menu). Keys stay on the brain (the voice keys are redacted for screens like the others). - No service, no voice anywhere: the mic, 語音聊天, 會議錄音 and 朗讀 only appear once 聽 (and 說) can be called; the phone's state says which. Without voice the send arrow just rests where 語音聊天 was. - 會議錄音 is uploaded to the brain, which turns it into text in the background and hands it to the bot itself: a meeting is longer than the 35 s the account lets a request wait, and a brain on a server has no window (the jobs are polled in background()). - Recognisers answer Mandarin in Simplified: in a Traditional Chinese window or phone the text becomes Traditional with Taiwan wording. - Older saves: whoever had an OpenAI key keeps voice input (聽 = OpenAI); everyone else starts with it off. Bots' macOS voice names are cleared. 對話詳細資訊's 加入會議 started plain voice input; it starts a meeting now.
2026-11-10 14:58:18 +00:00
- 對話詳細資訊 › 語音聊天 ›「朗讀每個回答」(設定好「說」才有):這個 Bot 每次回答完就唸出來。標題、粗體、連結會整理成好唸的文字,程式碼只說「程式碼略過」;太長的回答只唸前 4,000 字。
- 每個 Bot 可以有自己的聲音(留空就用語音設定的)、速度、語言。
- 手機:長按 Bot 的訊息 →「唸出來」。
### 通話模式(即時語音對話)
Voice: its own 設定 › 語音, run by the brain for every screen and the phone Voice was three implementations that broke on their own: speech to text borrowed the OpenAI key (so with only Grok set up the mic recorded, then failed), OpenAI's models it hard-coded stop on 2027-02-26, read aloud was macOS `say` or espeak-ng (silently nothing on Windows, where espeak isn't installed), and the phone used the browser's own recognition. Now: - 設定 › 語音 has 聽 and 說, each a service: off, OpenAI-compatible (OpenAI, Groq, a Whisper server of your own: the address decides), xAI or ElevenLabs. An empty key borrows 設定 › 模型's for the same service. Each side says 可以用 or what it lacks; 聽 has 試試看 (record a sentence, show what was heard), 說 has 試聽 and the voice list. speech.rs does the calls; xAI's both ways were checked for real (Mandarin read, then heard back, in Traditional characters). - The brain does it all: the phone POSTs its recording (MediaRecorder) to /api/voice/transcribe, screens to /api/sync/voice/transcribe; answers come back as MP3 from …/voice/speech and are played on the device (rodio; an <audio> on the phone, 「唸出來」 in a message's menu). Keys stay on the brain (the voice keys are redacted for screens like the others). - No service, no voice anywhere: the mic, 語音聊天, 會議錄音 and 朗讀 only appear once 聽 (and 說) can be called; the phone's state says which. Without voice the send arrow just rests where 語音聊天 was. - 會議錄音 is uploaded to the brain, which turns it into text in the background and hands it to the bot itself: a meeting is longer than the 35 s the account lets a request wait, and a brain on a server has no window (the jobs are polled in background()). - Recognisers answer Mandarin in Simplified: in a Traditional Chinese window or phone the text becomes Traditional with Taiwan wording. - Older saves: whoever had an OpenAI key keeps voice input (聽 = OpenAI); everyone else starts with it off. Bots' macOS voice names are cleared. 對話詳細資訊's 加入會議 started plain voice input; it starts a meeting now.
2026-11-10 14:58:18 +00:00
- 輸入框右邊的語音聊天按鈕(「聽」和「說」都設定好才有):開始後不用按任何鍵。AnyBot 一直聽,你講完(安靜 1.2 秒,估計值)就停止錄音、轉成文字、送給 Bot;Bot 回答後唸出來,唸完再繼續聽。30 秒沒人說話就繼續等下一句。
- 輸入框旁顯示目前在做什麼:「正在聽… / 聽懂中… / 想一下… / 正在說…」,按紅色按鈕結束。
- Bot 要你允許某個操作時,會等你按完再繼續。聲音偵測用錄音的音量(大於 −38 dB 算有說話,估計值)。
- 是「聽 → 回答 → 唸」的輪流方式,不能在 Bot 說話時插話(按結束可以打斷)。
### 分享 Bot(匯出、匯入)
- Bot 選單(右鍵或「⋯」)→「匯出 Bot(分享給別人)…」:選位置存成 `.anybot` 檔。帶走外觀、供應商和模型、指示、例行任務、示範的步驟;**不會**帶走聊天記錄、API 金鑰、Token(例行任務的 token、apiKey、secret 會清空)、你的「一律允許」授權、示範的錄影和畫面。
- 「匯入 Bot…」:選 `.anybot` 檔,變成一個新的 Bot。事件觸發的例行任務會先暫停,因為需要新主人自己的 Token;匯入後會提醒。檔案來自較新版本時會請你先更新。
### 訊息管道(Slack、Discord、Telegram)
- 設定 → 「訊息管道」。原版有 Slack、Teams、Discord 和訊息管道;它靠自己的伺服器接收訊息。AnyBot 沒有對外的網址,所以用你自己的 Bot Token 定期去看新訊息:
- Slack:每 3 秒看一次指定頻道(估計值),回覆在原訊息的討論串。提到 Bot 的「@Bot」會被拿掉。
- Discord:每 3 秒看一次指定頻道,回覆時引用原訊息;超過 2,000 字自動分段。
- Telegram:長輪詢(等 25 秒),可以只回某個聊天 ID,留空就回所有私訊;超過 4,096 字自動分段。
- 其他 Bot 的訊息和自己的訊息都不回;第一次連上時從「現在」開始,不會回覆舊訊息。
- 收到訊息時,指定的 Bot 會收到「💬 Slack「客服群」的 小明:…」並開始工作,就像你傳訊息給它;它在工作中時會插進同一回合。回合成功結束後,它最後的回答會自動傳回去;出錯時傳「抱歉,這次沒有完成,請再試一次。」;你按停止就不回。
- Bot 的系統指示會告訴它:對方不是使用者本人,要簡潔、不要透露你的私人資料,要動到你的電腦或帳號前先確認。
- 每個管道一張卡片:種類、名稱、狀態點(綠色「已連上,等待新訊息(收到 N 則)」,紅色顯示錯誤)、「開啟」勾選、「移除」,以及由哪個 Bot 回覆。
- 新增:選 Telegram/Slack/Discord,填名稱、回覆的 Bot、Token(每種都有怎麼拿 Token 的說明)、頻道或聊天 ID;「測試 Token」會顯示連上的帳號名稱。
- AnyBot 開著時才會收訊息。
- **Mac「訊息」(iMessage/簡訊)**:讀這台 Mac 的訊息資料庫看新訊息(要給 AnyBot「完全取用磁碟」權限),用「訊息」回覆;可以只回某個電話或 Apple ID。
- **郵件**:每 30 秒看「郵件」的未讀信(可以指定信箱),讀完整封後交給 Bot,回信主旨自動加「Re:」,寄回寄件人。
- **Microsoft Teams**:用你自己的 Microsoft 帳號登入,不需要公開網址。填 Entra 應用程式(用戶端)ID 和租用戶(留空 = 公司或學校帳號),按「登入 Microsoft」:AnyBot 打開微軟的登入頁並顯示代碼,你輸入代碼、登入後就完成(裝置碼登入)。之後每 5 秒看一次聊天(`chat:<聊天 ID>`)或頻道(`<團隊 ID>/<頻道 ID>`),在聊天裡回覆、在頻道裡回在討論串。Bot 以你的身分回覆;微軟換發的新登入權杖會自動保存。
---
### 連接器(MCP)
- 設定 →「連接器」。接上 Model Context Protocol 伺服器,Bot 就能用它的工具(原版的 MCP 用戶端)。
- 本機伺服器填指令(例如 `npx -y @modelcontextprotocol/server-filesystem ~/Documents`)加環境變數;遠端伺服器填網址(Streamable HTTP,JSON 或 SSE 回應都可以)加標頭。
- 每個連接器一張卡:狀態點(「已連上,N 個工具」/錯誤原因)、開啟、移除、「給 Bot 的使用說明」(原版的 MCP 自訂說明,會放進 Bot 的系統指示)。下面列出所有可以用的工具。
- 工具名稱給模型看時是 `mcp__<連接器>__<工具>`(最多 64 字;中文名稱的連接器用一段固定代碼)。
- **帳號和密碼**:「新增連接器」表單和每張連接器卡片都有「帳號」「密碼」兩欄(給用帳號密碼登入的伺服器,例如公司內部系統)。卡片上改了就會用新的重新連線。
- 在指令、環境變數、網址或標頭裡寫「{username}」「{password}」,帳號密碼就填在那裡,例如環境變數 `SCC_USER={username} SCC_PASS={password}`。
- 都沒寫:本機伺服器收到環境變數 `MCP_USERNAME`、`MCP_PASSWORD`(自己設了同名變數的話用自己的);遠端伺服器收到 `Authorization: Basic …`(自己有 Authorization 標頭的話不加)。
- 密碼跟金鑰一樣:螢幕只看得到「已設定」,不會拿到內容;在螢幕上改指令或網址時,大腦會把密碼清掉(不然會被送到新的位址)。
- **螢幕上的開關就是大腦上的開關**:看大腦時,連接器的開關關掉,大腦就停掉那個伺服器、Bot 沒有它的工具;再打開,大腦用它自己留著的金鑰和密碼重新接上。狀態那一行顯示的是大腦上的結果(接不上會說原因)。
- 權限:每個連接器第一次被用時問「使用連接器「X」的工具:…」,可以一律允許;直接操作模式下不問。
- 工具回傳的文字、圖片都會交給 Bot;一次最多等 120 秒(估計值)。
### 記憶、技能、範本
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- **記憶**:每個 Bot 有三種記憶。完整設計(存在哪、分數怎麼算、送給模型的內容、每晚整理、API)見 [docs/memory.md](docs/memory.md)。
- 「記得的事」:跟 Bot 說「記住我喜歡靠窗的座位」,它會用 remember 記下來;「忘記…」用 forget。每個 Bot 最多 200 條、每條 500 字(估計值)。要不要記由 Bot 自己判斷(之後還用得到的才記),不會問你,記了只在回答最後帶一句「(記下了:…)」。已經有很像的一條時不會重複記,由 Bot 自己決定:同一件事就不記、是更新就用 `replaces` 取代舊的(舊的不會再帶)、是不同的事就兩條都留。每個 Bot 只有自己的記憶。
- 「做過的事」:有動手做事的回合(改了東西,或查資料 5 步以上)做完自動記一行(你問了什麼、結果是什麼)。閒聊和簡單問答不記。
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- 「整理過的」:每晚凌晨 3 點後,在大腦上把超過 30 天的做過的事壓成每週一行,例如「11/3–11/9 做過的事(14 件):整理照片 ×3、追蹤 FSD ×5…」;每週那行超過半年再壓成每月一行。壓掉的原文放進「最近刪除」30 天。記得的事永遠不會自動刪。
- **帶多少**:釘選的記憶每次都帶;其他的只帶跟這則訊息有關的,打字時就在輸入框上方看得到,可以自己勾(第 6 節)。沒人勾時自動挑,最多 3 條。帶過的同一段聊天裡不再重複帶。
- **翻記憶**(search_memory):帶來的不夠時,Bot 自己查,回傳附日期。只是看,不用核准。
- **找的方法**:中文斷詞(jieba,加上連續兩字)加本機語意模型,全部在自己的電腦上算,不上傳。
- **記憶頁**:Bot 選單「記憶…」或 Bot 設定的「打開記憶」打開。
- 最上面:記得的事、做過的事、釘選、最近刪除各幾條;「釘選的每次都帶(約 N token);其他的只在相關時帶,最多 3 條」;三個資料庫檔的大小;語意搜尋的狀態。
- 搜尋框「搜尋記憶(打字就找)」,下面顯示「共 N 條(搜尋 X 毫秒)」;新增框「新增一條要記得的事」加按鈕「記住」。
- 篩選:全部/記得的事/做過的事/釘選/最近刪除。
- 「整理建議」卡:
- 「這兩條很像:「…」/「…」」:「合併(留下較新的)」「兩條都留著」。
- 「N 條記得的事半年沒被帶入過,可能過時了」:「看看是哪些」「全部忘記」。
- 「N 條做過的事超過 30 天,可以壓成每週一行」:「現在整理」。
- 小字:「每晚也會自動整理;壓掉的原文放在「最近刪除」30 天。」
- 每條顯示種類、日期、「帶過 N 次 · 上次…」或「還沒被帶入過」;按鈕「釘選」「編輯」「忘記」,在最近刪除裡是「還原」。最近刪除的最下面有「清空最近刪除」。
- 一次顯示 60 條,按「再顯示 N」看更多。
- **技能**:教 Bot 一套做法後請它「存成技能」(save_skill),所有 Bot 共用;系統指示只列名稱和一句說明,Bot 要用時先用 use_skill 讀完整做法。設定 →「連接器」頁的「技能」卡可以刪除。
技能: / in the input picks one; on a brain's screen the brain adds, installs and deletes them; 設定 › 整合's lists keep their buttons clear - Typing / at the start of the input (computer and phone) lists the skills that are on: names that start with what is typed first, then names containing it, then descriptions (「/簡報」 finds pptx). A click, or ↑↓ and Enter/Tab, puts 「/name 」 in the input; Esc closes the list. Sent, the brain recognises 「/name」 and adds a line after the message telling the model to read that skill with use_skill first, so a phone or a message channel gets it too; a / that names no skill (a path) gets nothing. The phone asks the brain for the list again at each new /, so a skill added since is there. - On a screen, 加入 / 安裝 / 刪除 ran on the screen's own disk and only the list entry reached the brain: a GitHub skill's scripts stayed on the screen's computer, an install also pushed every skill in that computer's folder into the brain's list, and a deleted skill's folder stayed on the brain and came back at its next start. These now go to the brain (/api/sync/skill, the phone's own 「skill」 action): it fetches an address itself, a folder or .md file on the screen's computer goes up whole with its files, and a delete takes the folder too. 「把這台的 Bot 搬到大腦」 hands over skills the same way. A refused package leaves no folder behind. - 技能, 技能市集 and 連接器市集 rows: a long description took the whole row and 開啟 / 檢視 / 刪除 / 已加入 / 安裝 were drawn over it. The buttons are laid out first and the description ends in … before them (the whole of it on hover). - Screenshot mode: ANYBOT_SHOT_KEYS="ArrowDown@60;Enter@64" presses keys at given frames. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:54:58 +00:00
- **技能在大腦上**:Bot 在大腦上跑,技能也從大腦的硬碟讀。所以在大腦的螢幕(連到大腦的電腦)上,設定 › 整合的「加入」「安裝」「刪除」都請大腦做:GitHub/網址由大腦自己下載;填這台電腦上的資料夾或 .md 檔,就在這台讀好,連同 scripts/、references/ 和其他附檔整包交給大腦;刪除時大腦連資料夾一起刪,大腦重開也不會再冒出來。「開啟」照舊是一般的設定同步。「把這台的 Bot 搬到大腦」時,這台有、大腦沒有的技能也是整包交過去(連同開關和可重播的步驟)。手機本來就是請大腦做。大腦是舊版時,螢幕上的這些動作會說要先更新大腦。
/btw 支線、送出先顯示;公測前的安全與資源修正(帳號盜用、灌爆、團隊權限、背景指令與連線的上限和清理) 支線與介面 - /btw:Bot 的分身帶著同一段對話和記憶平行做另一件事,做完回報到主聊天;主線在忙時先判斷會不會衝突,會就等主線做完 - 螢幕一次只給一輪工作操作(所有 Bot 適用) - 「/」只列指令,打字才找這個 Bot 自己的技能 - Bot 工作中送出的訊息立刻以淡色顯示(電腦、手機) - 支線修正:沒被讀到的回報照常進聊天、卡片顯示結果、可回答支線的問題、重新產生不吃掉卡片和回報 安全(中繼伺服器) - 大腦回傳的內容只放行安全類型並加沙箱;團隊改成邀請制;手機不照大腦說的類型開檔案 - 沒登入的請求最多 256 KB、接收中的上傳有總量上限、單一 IP 連線上限、常駐連線另計 - 登入次數加上每帳號上限並先計數再驗證;密碼雜湊同時最多 4 個 - 新增電腦要 15 分鐘內剛登入;可改密碼;註冊限速,有邀請碼時第一個帳號也要 - 發布的網站不能送表單和對外連線;Caddy 加安全標頭 安全(大腦) - 區網(明文)不能打開直接操作、加一律允許規則、加連接器;區網登入 30 天沒用失效 - 團隊成員只看得到勾選「團隊成員可以使用」的 Bot - 沒有角色的請求一律拒絕;環境變數的金鑰只送官方位址 資源 - 中繼:小變動每分鐘寫一次、回應有總時限、每台電腦呼叫上限、網站/登入/電腦/配對碼上限、資料檔壞掉不啟動 - App:伺服器回錯誤和連線秒斷時逐次退避;區網看螢幕偵測斷線 - 背景指令:刪 Bot 和支線結束時停掉、最多 24 個、結束 10 分鐘後移除、可用 stop 停掉 - 截圖在收起和歸檔時釋放;刪 Bot 時刪附件和對照表;每晚清稽核資料和暫存;手機圖片快取上限 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 15:36:34 +00:00
- **用 / 指定技能**(現在只打「/」只列指令,打字後才找這個 Bot 自己的技能,見「「/」清單只放指令」):輸入框第一個字打「/」,上面就列出開著的技能(名稱開頭符合的先、名稱含有的次之、再來是說明裡有的,例如「/簡報」找到 pptx);點一下,或 ↑↓ 選、Enter/Tab 帶入,輸入框變成「/pptx 」接著打要做的事,Esc 關掉清單。電腦和手機都有,Bot 正在做事時不列(那時打的字會併進正在做的事)。送出後由大腦認出「/名稱」,在這則訊息後面替模型加一行「使用者用 /pptx 指定了技能「pptx」:先用 use_skill 讀出它的完整做法」,所以從手機、訊息管道打的也算;不是技能名稱的(例如 /Users/… 路徑)不加。新加的技能(技能市集、GitHub 安裝、Bot 存的或自己學會的、「教我做」)馬上就在清單裡:電腦直接讀技能名單(大腦的螢幕讀的是大腦同步過來的那份);手機每次打出新的「/」會向大腦再拿一次名單,拿到前先列手上已有的。篩選本身不連網,也不多送東西給模型(技能清單本來就在系統指示裡)。
- **/goal 目標**(照 Claude Code 的 /goal 做):給 Bot 一個「做到什麼程度才算完成」的條件,它就一輪接一輪做下去,不用每一步都叫它。關鍵是**做事的模型不能自己宣布完成**:每一輪結束後,另一個模型(Bot 的「執行步驟用的模型」,通常是快速模型;設成「關閉」就用 Bot 自己的模型)只看這段對話(Bot 說的話、用了哪些工具、工具回了什麼),判斷條件成立了沒有。
- **用法**:「/goal 所有測試都通過,而且 clippy 沒有新的警告」設定並馬上開始做(已經有目標就換掉);「/goal」看目前的目標、做了多久、檢查了幾輪、最近一次檢查的理由;「/goal clear」清除(stop、off、reset、none、cancel、清除、取消、停止也可以)。在 / 清單最上面,標「指令和技能」。電腦、大腦的螢幕、手機打的都算,由大腦處理;訊息管道(Slack、Telegram…)和團隊成員打的不算指令,別人不能替你設目標。條件最多 4000 字;群組聊天還不能設目標。「清除聊天記錄」和「開始新對話」會連目標一起清掉;分享 Bot 的檔案不含目標。
主題產生器進設定(底色/對比/強調色/密度/慶祝)+側欄細條+時段問候+目標撒花 Quiet Shell 收尾四件(A3/B2/B3/C/D),一次落地: - C 產生器:theme::shell(tone, accent, contrast, dark)——三個旋紐生成整個殼 (表面=紙朝墨等距階梯、文字=墨回紙、圖表六色=強調色轉色相);設定 › 一般 外觀新增 底色(冷→暖)、對比(0.75→1.35,拉整個殼的階層一起調)、強調色 (黏土/靛藍/苔綠/藍綠/玫紅/琥珀/石板/墨黑)、重設。預設=紙,舊設定檔 serde 補預設。ANYBOT_SHOT_SHELL=tone,accent,contrast 出概念圖 - B3 密度:寬鬆(9/7)/緊湊(8/5) 全域間距開關 - B2 側欄:選中 Bot 不再整條深底——強調色 3px 細條+淺底(Linear 式) - D1 撒花:只在 /goal 目標達成時,該聊天上撒 1.4 秒彩帶(chart_cat 六色, 淡出收尾);設定 › 一般「慶祝動畫」可關;純裝飾,不擋任何操作 - D3 問候:新對話依時段先問「早安/午安/晚上好/夜深了」 - 淺深判定改成亮度函數 theme::is_dark(原先拿 pane 和 LIGHT 常數比對—— 底色旋紐一調就破);markdown 連結色、灰字、遮罩四處跟著改 - 手機 theme-color meta 換紙色;元件庫調查:egui_dock/notify/shadcn-egui 都不引入(自有設計系統+鎖 egui 版本),缺的取色器用八點自家版 已驗證: cargo test 505 全綠(新增 theme 產生器 5 測:預設=紙、對比單調、 冷暖心跳、is_dark 跟旋紐不跟常數;含 layout_audit 三寬度新設定區塊不破版); clippy 31=基線;截圖取樣:冷灰 pane(246,245,247)、紙 pane(248,247,245)、 側欄黏土細條 52px、墨黑殼 0px(強調色確實跟隨)、深色苔綠 152px 未驗證: 撒花只在真 /goal 達成出現,截圖模式不渲染(未目視彩帶飛的樣子, 落點/速度未調校);i18n 新字串(早安/靛藍等)靠自動翻譯,英日語未逐條核; 手機端不吃旋紐(只有 meta 色),自訂色手機同步是下一輪
2026-11-16 09:32:42 +00:00
- **檢查的結果**:還沒達成 → AnyBot 自己送出一則標「目標」的「還沒達成:(理由)」開始下一輪,理由就是下一步該做什麼;達成 → 聊天裡一行「目標達成:…(N 輪 · 多久)」,目標清掉,這個聊天上撒一下彩帶(慶祝動畫,設定 › 一般可關);做不到 → 「目標做不到,已清除:…」;Bot 在等你回答或動手(登入、付款、做決定)→「目標暫停,等你回覆:…」,不會一直空轉。
- **煞車**(比 Claude Code 嚴,因為 AnyBot 一輪可以做很多步、用的是你自己的金鑰):一個目標做 20 輪還沒達成就暫停問你;連續 3 輪都沒有用任何工具(只是在說話)就暫停;這一輪出錯、你按了停止(兩輪之間正在檢查時按也算)、檢查的模型沒回應、AnyBot 重新啟動過,也都是暫停。重新啟動後按中斷卡片上的「繼續」,目標也跟著接下去。暫停時目標還在,**傳一句話(例如「繼續」)就接著做**,用完 20 輪的再給 20 輪;不要了就 /goal clear。
- **看得到的地方**:輸入框上方一行「目標進行中 · 12 分 · 3 輪」(檢查時是「正在檢查有沒有達成…」,暫停時是「目標暫停 · 原因」),滑過去看條件和最近一次的理由,右邊「清除目標」;窄視窗時字會縮成「…」,不會擠掉按鈕。AnyBot 自己的那幾行(達成、暫停、狀態)在聊天中間用小字顯示,不是 Bot 的話,**不會送給模型**,也不算檢查的證據。手機一樣,大腦的螢幕看到的是大腦同步過來的。
- **通知**:目標進行中的每一輪不再各通知一次「完成了」;達成、做不到、暫停時才通知(你不在電腦前時,手機也會收到),例如「Master 達成目標了」「Master 在等你回覆」。
- **模型讀到的**:你的「/goal …」後面多一行,說明這是目標、每輪會有另一個模型檢查,所以要用實際的結果證明(指令輸出、測試結果、檔案內容、畫面),需要你做什麼就直接問;「還沒達成」那則後面也提醒它接著做。檢查用的模型讀的是從設定目標那則訊息起的對話(太長就讀最新的約 24000 字;每個工具結果留開頭和結尾,測試的總結通常在最後),並知道已經第幾輪、做了多久,所以條件裡寫「最多 10 輪」也算數。
- **權限不變**:要你核准的步驟照樣停下來等;要放著讓它自己做完,Bot 要開「直接操作」或「自動審核」(Claude Code 也要配 auto mode)。
- **終端機**:`anybot --ask "/goal …"` 會一直做到達成、做不到或暫停才結束(像 `claude -p "/goal …"`),最長 ANYBOT_ASK_SECS 秒(預設 900)。
- 實測(假的 OpenAI 相容模型,獨立的大腦):「兩步」的目標第一輪檢查說還差第二步,AnyBot 自己開第二輪,第二輪後判定達成;永遠沒進展的目標在第 3 輪暫停;要登入的目標判定在等使用者而暫停,回一句「我登入了」後接著做並達成;目標的那幾行沒有出現在任何一次送給模型的內容裡。
- **外觀(Bot 是主角)**:介面本身安靜(黑、白、灰),顏色和動作都留給 Bot。
design: 一套設計規格(電腦和手機同值)+讀的文字改成 Claude/Notion 的文件樣式 依 Claude 的設計原則:定一套字級並守住、卡片樣式按角色用、重複的元素一致。 - 字型:只留思源黑體(介面)+新加思源宋體(回答、頁面內文和標題,SIL OFL); 拿掉粉圓體和「系統字型」選項、粉圓單一粗細的「粗體畫兩次」補丁;Mermaid 圖改用思源黑體; fonts/OFL.txt 補上思源黑體/宋體的版權 - 規格(theme.rs fs/sp/radius、手機 :root --fs-* --sp-* --r-*):字級 12/13/14/16/18/22/28、 閱讀行高 1.7、間距 4–32、圓角 6/10/14;桌面 253 個寫死字級、166 個寫死圓角換成規格名稱, 手機 167 個字級、79 個圓角、19 個色碼換成變數 - 看守測試:桌面和手機數字要一樣;畫面程式裡不准再寫死字級和圓角,寫死的顏色只准減少(88) - 讀的文字:聊天 16 px 宋體行高 27、頁面同;標題 # 22 / ## 18 / ### 16;表格只有橫細線、 表頭灰色粗體、數字欄靠右;提示框淡底無邊條只有小標上色;程式碼淡底無框;數字卡只留細框 - 頁面視窗:宋體大標題、一行小字資訊、現況當開頭段落、結論是安靜的提示框;目錄收成一行 「▸ 目錄 · N 節」(⌘F 展開);刪除移到左邊,不再貼著「完成」;閱讀欄 680 - 圓餅圖拿掉黑色外圈、字照規格 已驗證: cargo test 518 全過(含排版檢查、規格比對、看守測試;看守測試故意放一個寫死字級確認會擋)、 clippy 21=基線;桌面頁面、聊天、表格原解析度截圖目視;手機 390 px 深淺截圖、node 圖表 65/通知 9 未驗證: 使用者機器上的實際視窗;iOS/Android 實機的宋體備援(手機用系統宋體,沒有就退回 serif)
2026-11-16 13:51:30 +00:00
- **字型**:介面用思源黑體(Noto Sans TC),讀的文字——Bot 的回答、頁面內文和標題——用思源宋體(Noto Serif TC),像 Claude 的回答一樣是書的字;兩種都有 Regular 和 Bold,包在 App 裡,每台電腦看起來一樣。程式碼用系統的等寬字。沒有字型選項。
- **你的訊息是淡灰泡泡**(預設「安靜」;設定 › 一般 › 聊天的顏色可以改成「跟著 Bot」:你的訊息泡泡、送出鈕、側邊欄選中的那格用 Bot 的顏色,或「只用黑色」)。Bot 的回覆不用泡泡,像文件一樣排在頁面上,只有錯誤訊息有泡泡。
- **輸入框上方的臉**:Bot 的臉從輸入框後面探出來,旁邊一句話說它在做什麼(原本對話最後的轉圈那一行搬到這裡)。眼睛就是狀態:待命時往下看輸入框;在想時往上、慢慢左右飄;有步驟在跑時看著旁邊那句「正在…」;需要你時看著你,臉上多一個黃點,旁邊寫「等你決定」;做完笑兩秒;上一輪出錯時眼睛變兩條橫線。新對話時沒有這張小臉(臉是中間那張大的)。
- **每種情境一套動作和一個小道具**(都在臉自己的方框裡,不會碰到旁邊的字;從頭後經過的畫在臉後面,在前面的壓在臉上、描一圈底色,所以頭像不會擋住動畫;換情境時淡入淡出,步驟很快連續切換時至少停 0.6 秒,不會一直閃):
- 思考(還沒開始寫、沒有步驟):頭稍微縮小,三顆小球繞著頭轉;想越久轉得越快;推理模式每收到一段推理,小球亮一下。
- 看結果(做完步驟、還沒開始寫):右下一張小紙,橫線一條條亮起來,眼睛跟著往下讀。
- 搜尋、讀網頁:一支放大鏡在臉下半部左右掃,眼睛跟著它。
- 看螢幕、點擊:小游標移到一個地方按下去,按的地方冒出一圈漣漪。
- 寫回覆:低頭點頭,一枝筆在臉下畫出一行波浪墨水;字停下來時筆也停。
- 等你決定/回答:看著你,黃點外面一圈光慢慢擴散,每隔幾秒輕輕彈一下。
- 完成:笑臉、跳一下,五顆金色小星星輪流冒出來再消失(約 2 秒)。
- 失敗:眼睛變一字、搖一次頭,一滴汗滑下來後停住(之後不再動,不耗電)。
- 其他步驟(指令、檔案、記憶…)目前還是看著旁邊那句話;道具顏色太接近頁面(深色模式的黑臉、淺色模式的白臉)時會往文字顏色調亮或調暗。
Bot 之間溝通:ask_bot 問同事並等回答、群組 @點名、共用頁面/「關於你」記憶/教技能;修正插話丟附件、Enter 核准失效等 問同事(ask_bot) - A 問 B 並等它回答:問題放進 B 自己的聊天,B 用自己的模型、工具、記憶和電腦做,最後的回覆交回 A - 最多轉 3 手、不能互等(避免卡死)、對方忙就排隊(10 分鐘逾時)、停止 A 時 B 也停 - message_bot 也加轉手上限;別的 Bot 叫的不算使用者的話(改不了自己的設定) 群組 @點名 - 「@名字」只叫被點到的成員回答;成員在回覆裡 @ 別人就接著說(一輪最多 8 則) - 電腦和手機的輸入框打 @ 會列出成員 - 修正:每個成員帶自己的記憶;成員回覆的每一步都記得是誰說的 共用資源 - Bot 可以讀其他 Bot 的頁面(只能讀,改要請作者改) - 共用的「關於你」記憶:每個 Bot 都帶著,記憶頁可切換查看、編輯;外人的訊息不帶 - teach_skill:把自己會的技能教給同事(先問你);同事名冊列出每個 Bot 會的技能 修正 - 插話(Bot 工作中傳訊息)會帶附件:聊天有檔案卡片,模型看得到圖片;當機復原也帶著 - 輸入框有焦點、框是空的時 Enter 允許待核准的步驟(原本被當成空白送出吃掉) - 大腦的螢幕連不到大腦時,引用、附件、記憶不會先被用掉 - 「還原上一個答案」存在 Bot 上:重開還在,連大腦的畫面和手機都能還原;停止的回合也留著 - Bot 忙時被叫醒(例行任務、message_bot、觸發器)改成排隊開自己的一輪,不再壓成純文字插話 - 停止時結果已回來的步驟標成完成;輸入法剛選字的那一格不送出 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 13:34:03 +00:00
- **需要你允許**:不再是蓋住整個視窗的彈出視窗,改成固定在輸入框上方的黃色卡片,上面的聊天照樣看得到,下面的輸入框照樣可以打字告訴它怎麼改。輸入框空著時 Enter 允許、Esc 拒絕(卡片出現 0.6 秒後才算,免得原本要按的 Enter 誤答);游標在輸入框裡也一樣(以前輸入框先把 Enter 當成「送出」拿走,框是空的什麼都沒送出,也沒有允許)。框裡有字時 Enter 照樣是送出。要你親自處理的步驟(接管畫面)還是聊天裡的卡片。
- **黃色只代表「需要你」**:允許卡片、臉上的黃點、側邊欄 Bot 上的黃點、設定裡「更新」旁的黃點(有新版)。有新訊息是強調色(黏土橘)小點。
- **標題列**:Bot 的名字在左邊(按一下開對話詳細資訊),右邊「分享」和「⋯」不再有圓框;圖示線條粗一點(2.25)。
- **新對話**:Bot 的臉放大、依時段的問候(早安/午安/晚上好/夜深了;看的是 設定 › 一般 的時區,不是這台電腦的系統時區)、一句「嗨,我是 …」和它的描述,下面三個可以直接點的開頭(點了把字放進輸入框)。
- **設定**:左邊分頁只有文字,選中的淡底粗字;每組設定一張白色細框卡片,一列一件事(左邊名稱、右邊控制項,名稱下最多一行小字,其餘說明在「?」裡);選項是分段按鈕,開關是黑軌白鈕。「一般」的名稱改成白話(聊天的顏色、用意思找記憶、Bot 可以翻的資料夾)。「整合」分成三頁(訊息管道、連接器、技能);訊息管道先列「已連接」(標記、名稱 · 種類、誰回覆、狀態、開關、⋯ 裡移除),「新增管道」是八個方塊,點了才在下面打開那一種的表單。權限頁的「直接操作」「自動審核」也是開關。
design: 手機網頁顏色跟著電腦版、改成 Claude 手機 App 的感覺,實點修好 12 個問題 - 顏色:api/state 帶出電腦的主題和淺色/深色兩組顏色(theme::shell 換成手機的 CSS 變數);手機「這支手機的外觀」預設「跟著電腦」,也可選跟著手機、淺色、深色;先驗證是 hex 才套用,存一份避免打開時閃預設色;狀態列跟著畫面。舊版電腦沒送顏色時維持「紙」。電腦畫面頁改成暖色深色。 - 感覺:標題列沒有底線、第二行只寫在做什麼或模型;輸入框是底部圓角卡片;回答下只留時間和三個操作;群組、晶片、建議、記憶卡拿掉框線;開關的「開」用墨色;允許卡細框;點擊範圍加大(44/40/36px)。 - 字更少:設定首頁拿掉重複說明;每列說明一行;「模型」頁右邊只寫可以用/未設定;Bot 那列選單少用的收進「更多…」。 - 修好:長 Bot 名字超出 @// 選單;引用顯示原始 Markdown 且沒有長度上限;第 8 個表情換行;.note 在清單裡變灰條;圖片點了跳出 App;上傳吐司蓋住輸入框;「聊天的顏色」永遠沒有 ✓(電腦送 "Quiet",改送 quiet/black/bot_color);「:」後的網址不成連結;深色模式黑頭像看不見;稽核分頁出現 ** 和多行 JSON;頁面卡標題重複;記憶搜尋框 14px 讓 iPhone 放大。 - 問題卡的「略過」、交辦的「跳過」、允許卡的「拒絕」不再是紅字,跟電腦版一樣是一般按鈕。 已驗證:cargo test --bin anybot 523 通過(含 phone_login_and_api 檢查主題和兩組顏色)、relay 22 通過;手機圖表 65/65、通知 9/9、電腦畫面 13/13;playwright 390×844 淺色深色點過登入、首頁、聊天、詳細資訊、Bot 設定、頁面、例行任務、電腦、設定每一頁,沒有 console 錯誤、失敗請求或橫向溢出;電腦換靛藍深色,手機跟著變。 未驗證:真的 iPhone/Android 實機。
2026-11-16 15:16:38 +00:00
- **手機**:顏色跟電腦一樣(設定 › 一般 › 外觀 的主題、底色、強調色、對比都照著穿;手機的「外觀」預設「跟著電腦」,也可以選跟著手機、淺色、深色)。你的訊息泡泡照「聊天的顏色」(預設淡灰)、Bot 的回覆不用泡泡、允許卡片是黃色細框、輸入框是底部一張圓角卡片;工作中在對話最後顯示 Bot 的小臉和跟電腦上一樣的那句「正在…」。
- **自己進化**:一件事做了 5 步以上(操作電腦、網頁、指令,不算記憶和設定),回答完後在背景回頭看一次:這是在網站或程式上動手操作的事(填表、發文、回留言、上傳下載、改設定),就把這次真的成功的最短做法存成技能(用畫面上的名字,不寫編號和座標;繞路和失敗寫成「注意」;使用者說過的偏好寫進去);已經有同一件事的技能就合併成更好的一版,照著做而且很順就不動。回覆下面會多一行「(學會了新做法「…」)」或「(把做法「…」更新了)」。系統指示要 Bot 開始做事前先看技能清單、有符合的先 use_skill。實測(httpbin 訂 pizza,真的 Grok):第一次 11 步學到技能;第二次先讀技能、10 步 24 秒一次做完,回頭看後判斷不用改。
Bots work like someone who knows the computer: they know each machine, reach what they see, plan, and hand the planned steps to a quick model Measured on the bot's own box (8 tasks x 2, grok-4.7): 14/16 done, 120 steps, 1114 s before; 16/16, 102 steps, 574 s after (model time 1015 -> 471 s). A replayed skill: 49 s -> 15 s. Knowing the machine - facts.rs: 電腦現況 per computer (system, desktop, systemd, sudo, network, package manager, tools, apps, a fixed TZ), read once by a small read-only probe, kept 30 min, in the instructions at the start of a turn. - The box's sudo is the bot's: only what follows sudo is checked against the always-denied list (it was refused outright, while the instructions said it could sudo), and commands with sudo run as the box's root (setuid does nothing under gVisor). - Box image v8 drops ENV TZ=UTC (it overrode /etc/localtime). ANYBOT_BOX_IMAGE / ANYBOT_BOX_VOLUME give a throwaway box its own image and volume, never adopting the real one. - Mac shell sandbox: App Store app CLIs (they carry their own app sandbox) and ps/top run outside it; plain `osascript -e` too, asked the first time even in direct mode, refusing do shell script, terminals, keystrokes, file reads, ObjC and the secret folders. A command the sandbox broke says so, instead of looking like a broken program. Reaching what it sees - The Mac menu bar's status icons are numbered (each app's AXExtrasMenuBar, named from inside for the system's own), computer_use_zoom looks closer at full sharpness. - Numbers stay with their controls from look to look (they were reassigned every look, so a step's second click landed elsewhere); the box's front window is listed first; a control can be named instead of numbered (name "4"). - Web page numbering walks open shadow DOM (Chromium settings, web components). - A box on a Docker host elsewhere retries the next port when the usual one is taken (a retry without it came up with no network). Working like a person - Instructions: pick the route, know what done looks like, one route, check once, say what's stuck instead of faking it with a substitute, ask before cutting the connection. - StepPlan: the bot's model takes the first step, the step after trouble (failed, refused, repeated, nothing changed on screen, the quick model switching routes), one in four, and the final check; a quick model (Bot.step_model, auto: grok-4.20-0309-non-reasoning on xAI) does the planned steps in between, falling back to the bot's model if it can't be used. - Skills keep the steps that worked (with what each acted on, not numbers); replay_skill does them again with no model in between, finding each control again, handing back on a mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 01:01:03 +00:00
- **重播學會的做法**(replay_skill):存技能時,模型會挑出這次真的成功、必要、會改變東西的步驟(不含截圖、讀取這類只是看的步驟、不含繞路和失敗),連同每一步點的是哪個東西(「勾選框「自動更新」」,不是編號)一起存下來;內容每次不同的工作(發文的文字、回覆的留言)不存步驟。技能清單裡標「可重播,N 步」。
- 要做的事和技能一模一樣時,Bot 叫 replay_skill,AnyBot 就一步一步照做,中間不問模型:畫面上的步驟在最近的畫面清單裡找同一種、同名的東西換成現在的編號(值和勾選狀態不算),網頁上的步驟改用字找;找不到時先自動截一次圖再找,還是找不到就停下來,告訴 Bot 停在第幾步、找不到什麼,由它接手。
- 每一步照樣經過核准(有風險的照樣問你);有一步失敗就停,後面不做;做完由 Bot 自己的模型看結果再回答。重播的步驟在聊天裡標「(重播)」。
- **每件事用自己的分頁**:幾個 Bot 共用一個瀏覽器(Bot 的電腦裡的 Chromium)時,每件事只在自己打開或停在的分頁上做(點連結開出的新視窗也算它的),別的事的分頁不會被讀到、點到、列出或關掉;做完只收自己的分頁、留最後那一頁。
- **範本**:側邊欄「+」按右鍵 →「從範本建立」:研究助理、寫作夥伴、電腦助手、客服助理、開發助手,各有角色說明、指示、頭像和顏色。Bot 也能用 create_bot 的 template 參數建立。
### 保險庫(照原版重做,2026-11-04)
- 設定 → 保險庫:「新項目」選單(登入資訊/卡/聯絡資訊/匯入)、分頁(全部/登入資訊/卡片/聯絡資訊,含數量)、搜尋保險庫、每種的空白提示和底部說明。
- **登入資訊**:網站(最多 10 個,子網域也會填)、使用者名稱、密碼、提示。檢視時密碼一律顯示成 ••••,沒有顯示或複製鈕;編輯時密碼留空就不變。
- **卡片**:卡號(檢查碼與卡別)、有效期限、安全碼、持卡人、暱稱、帳單地址(可用聯絡資訊的地址)、提示。存好後卡號鎖定,安全碼不能再看。
- **聯絡資訊**:姓名、地址、多個電話和電子郵件(可設為主要)、標籤、提示。
- **CSV 匯入**:自動辨識 1Password、Chrome/Edge、Safari、Firefox、Bitwarden、LastPass(含卡片),預覽、略過重複、只收 https、進度條可停止、匯入摘要。
- **存放**:這台電腦上的加密檔 vault.bin(AES-256-GCM),金鑰放在系統鑰匙圈(「AnyBot vault key」)。畫面和 Bot 只拿得到不含密碼、卡號、安全碼的資料。以前存在鑰匙圈的 AnyBot 登入會自動搬進來。
- **Bot 的工具**:`vault_list`(只有可看的欄位)、`browser_fill_login`、`browser_fill_card`、`browser_fill_contact`。每次填入都先問;登入用在沒存過的網站會警告「只有在它與已儲存的網站屬於同一服務時才允許。仿冒網站可能會竊取你的密碼。」且不能一律允許;卡片每次都問。付款服務框架(iframe)裡的卡號欄填不進去,會請使用者自己填。
- 還沒做:1Password 服務帳戶連線(原版的「Shared with Grok Bot」保管庫)、安全表單、刷卡相機。
### 檔案預覽、Bot 做的頁面
- Bot 用 `open_for_person` 把它做好的網頁、圖表、報告、圖片、文件在你的螢幕上打開(網址也可以)。在 Bot 的電腦上做的檔案會先複製到這台 Mac。
### 頁面(Bot 做、Bot 持續更新的報告)
- 你請 Bot 追蹤、整理、比較一件之後還會回來看的事(例如「幫我追蹤一下台灣 FSD 狀況」),它用 `write_page` 做成一頁:先寫現況,再寫細節和來源(附日期)。回答裡用「[標題](page:ID)」連到它,回答下面出現頁面卡片(一張精簡卡:頁面圖示、標題、一行它說什麼或這次改了什麼、一行灰字的種類和時間),點一下打開。一個回覆裡每一頁只出一張卡(在最後存的那一步下面);沒存成的寫入(改別的 Bot 的頁面被擋、被寫法檢查退回的那一次)不出卡;手機一樣。
fix: 頁面圖表的數據表不再把頁面視窗撐出畫面;折線離 0 很遠時看得出起伏;長數據表收起 - 數據表原本是 egui Grid,數字欄用「靠右」排版,會拿走那一列剩下的所有寬度:條紋只蓋到第一欄、名稱置中、數字被推到卡片最右邊;有兩欄以上數字(圓餅的「佔比」、多系列)時下一欄從邊外開始,頁面視窗越撐越寬、跑出畫面。改成自己畫的一塊:灰字表頭、每列一條細線、名稱靠左、數字靠右、每欄只有內容那麼寬(和頁面的表格同樣子),太窄先把名稱切成 …,再不夠就在卡片裡左右捲動。 - 超過 6 列的數據表收成「▸ 數據 · N 筆」,點了展開(電腦和手機一樣)。 - 折線的 y 軸不再一律從 0 開始:最小值比資料的高低差還大時照資料範圍畫(1,649–1,796 W 原本是一條貼在頂端的平線);長條一定從 0。規則在 pages::chart_from_zero,手機 chartFromZero 同一條。 - 截圖用的 ANYBOT_SHOT_PAGE_BODY:頁面範例換成檔案裡的 Markdown。 已驗證:cargo test --bin anybot 526 通過(新增 a_line_far_from_zero_fits_its_data_and_bars_start_at_zero);深色截圖 24 小時用電折線(1600–1800 看得出起伏、數據收起、展開後視窗不變寬)、多系列與長條數據表;手機圖表測試 65/65(改成直接讀 index.html)+新規則 8/8;Brave 390 寬深色截圖:折線範圍、收起/展開、沒有橫向溢出。 未驗證:使用者原本那一頁(沒有那份資料)。
2026-11-16 16:02:22 +00:00
- 頁面可以放表格、Mermaid 圖表(圓餅、長條、折線、時間軸…白底卡節點、細灰連線),以及頁面專用的區塊:```stats 數字卡片(數字大字,超過 10 個字的值縮成小一號;值和備註開頭 ↑/+ 綠色、↓/−/- 紅色,「+」「-」後面要緊接著東西才算,單獨一個「-」當作沒資料;電腦和手機同一套規則)、```steps 進度(✓ 完成、◉ 進行中、○ 還沒到)、```chart 原生圖表(bar 長條、line 折線、pie 圓餅;只畫淡水平參考線,長條自動由大到小排序——月份/年份等自有順序的標籤不排;單系列把數字直接標在圖上、不畫 y 軸;多條線在線尾標系列名;懸停看數值、拖曳平移、右鍵框選放大、雙擊還原;長條的 y 軸從 0 開始,折線離 0 很遠時(最小值比資料的高低差還大)照資料範圍畫,起伏才看得出來;圖下自動附數據表,和頁面的表格同一種樣子(灰字表頭、每列一條細線、名稱靠左、數字靠右,每欄只有內容那麼寬,太寬就在卡片裡左右捲動,不會把頁面視窗撐出畫面),超過 6 列收成「▸ 數據 · N 筆」,點了展開;多系列用 `| 1月 | 2月` 當表頭;第一行可以是「圖型 標題」、只寫圖型(bar/line/pie 或 長條/折線/圓餅)或只寫標題,`#` 開頭的行是註解,`|---|` 分隔列略過,少填的格子當 0——電腦和手機同一套讀法;手機看同一頁也畫同樣樣式的原生 SVG 圖:照手機寬度畫、字不會縮小,折線和多系列長條有 y 軸數字(y 軸從不從 0 開始的規則和電腦一樣),圖下同樣附數據表(超過 6 列同樣收起),只有一項的圓餅畫成整圓,圖例項目再多也都畫得到,負數的數字不會壓到下面的標籤)、`> [!NOTE]`/`[!TIP]`/`[!WARNING]`/`[!IMPORTANT]` 提示框。這些區塊在聊天裡也能用。所有圖表(含 Mermaid 圓餅)共用同一套低飽和六色色板,深淺兩主題各一組。
design: 設定減字+頁面照 Anthropic 的報告寫法(寫法規則、存檔前檢查、可收起的細節) 設定頁(字太多): - 設定列的「?」平常不顯示,滑鼠移到那一列才出現(位置保留,名稱不跳動) - 設定下面的說明只顯示一行,長的結尾「…」,滑過看全文 - 外觀只留主題、強調色、聊天的顏色、語言;底色、對比、密度、慶祝動畫、重設收進「更多外觀設定」 - 聊天的顏色只有點(選中的有外圈),不再加一段文字;「你的電腦已是最新版本」改成灰字一行,不再是橘框 頁面(內容太亂、字太多): - 給 Bot 的寫法規則改成 Anthropic 的寫法:標題就是結論、第一句補理由、最多三點;數字放 stats/表格; 一節最多一處粗體;不用「→」、分隔線、標題編號;待辦用 steps、指令放程式碼;細節放 details - 存檔前檢查(pages::review):段落太長、粗體太多、括號裡一串數字、標題編號、分隔線、「→」、表格裡的指令、 很長卻沒有 details——退回一次並列出每一處;同一頁第二次照存,不會卡住 - 新頁面區塊 ```details 標題:預設收起的一行「▸ 標題」,點了展開(電腦和手機) 已驗證: cargo test 523 全過(新增:寫法檢查抓得到那頁的毛病、乾淨的頁面不報;退回一次第二次照存; details 標題與收起)、clippy 21=基線、手機四段腳本 node --check、深色設定頁截圖目視 未驗證: 真的模型照新規則寫出來的頁面長怎樣(要等 Bot 下次寫頁面)
2026-11-16 14:28:37 +00:00
- **細節區塊** ```details 標題:預設收起,只顯示一行灰色「▸ 標題」(沒寫標題就是「細節」),點了展開裡面的 Markdown。讓第一屏只有結論、數字和下一步;證據、長清單、指令收在下面。
- **寫法檢查**:Bot 存頁面時程式先看一遍(Anthropic 的報告寫法:結論先講、句子短、少粗體、數字放卡片或表格、不用裝飾)。段落超過 120 字、一節超過一處粗體、括號裡一串數字、標題編號、分隔線、用「→」帶結論、表格裡放指令、正文很長卻沒有收起的細節——有就退回一次、列出每一處要怎麼改;同一頁第二次照存,不會卡住。
修正卡死: ⌘ 一按視窗就鎖死、圖表縮小凍結、打字每鍵寫檔;複製中文亂碼;頭像不再擋住思考動畫 卡住當機 - ⌘1–⌘9(Win/Linux 為 Ctrl)在 ctx.input 裡又呼叫 ctx.input,egui 的 Context 被鎖兩次, 按住 ⌘(⌘C、⌘V、⌘Tab)視窗就永遠不動;改為只讀一次(bot_jump_key),加回歸測試 - 圖表 x 軸格線固定每 1 一條,縮小後一幀要畫上百萬條(凍結、記憶體爆);改為最多約 40 條, 滾輪不再被圖表吃掉(⌘/Ctrl+滾輪或雙指縮放) - 草稿每打一個字就同步重寫整個 state.json(含 fsync);改為停手 1.5 秒後才存,結尾空白也 不再造成每幀存檔 複製(三個系統) - Mac:pbcopy 從 Finder/Dock 開時沒有 UTF-8 語系,中文變亂碼;指定 UTF-8 - ⌘C 攔截只拿 CopyText,不再丟掉開連結、複製圖片、Linux 中鍵選取等指令(且只在 Mac 攔) - Windows:改用 Win32 剪貼簿(arboard,獨立執行緒),不再走 clip.exe(缺 BOM、多一個 NUL) - Linux:依 WAYLAND_DISPLAY/DISPLAY 選 wl-copy 或 xclip/xsel,都沒有時退回視窗剪貼簿 其他 - 頁面目錄點了不跳(標題位置從未記錄);目錄搜尋框按 Esc 會關掉整頁 - 圖表:單一系列欄名被 String::max 換成「數值」;同尺寸無標題的圖共用縮放;inf/NaN 不入圖 - KPI 卡片寬度未扣內距而超出欄寬 - 「還原上一個答案」在送出新訊息後會插錯位置;重試錯誤回覆不再存可還原的版本 - 手機:長輪詢回來時已切到別的聊天,不再把上一個聊天的訊息畫進來 - 輸入框上方頭像:思考時頭稍微縮小,三顆小球繞著頭轉(後面的從頭後經過、前面的壓在頭上並描邊), 不再被頭像蓋住 - 刪除未使用的 src/app/ui_kit.rs 驗證:macOS cargo test 374 通過(relay 18 通過);Windows/Linux cargo check 通過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:19:59 +00:00
- 頁面是「閱讀排版」:內文排在置中的 720 像素欄位裡,行高 1.55 倍、段落有呼吸空間,不會貼著視窗邊緣;聊天室保持原本的緊湊排版。頁面上的數字表格(2–3 欄、資料不超過 8 列)在寬度夠時會自動左表右圖併排。
design: 一套設計規格(電腦和手機同值)+讀的文字改成 Claude/Notion 的文件樣式 依 Claude 的設計原則:定一套字級並守住、卡片樣式按角色用、重複的元素一致。 - 字型:只留思源黑體(介面)+新加思源宋體(回答、頁面內文和標題,SIL OFL); 拿掉粉圓體和「系統字型」選項、粉圓單一粗細的「粗體畫兩次」補丁;Mermaid 圖改用思源黑體; fonts/OFL.txt 補上思源黑體/宋體的版權 - 規格(theme.rs fs/sp/radius、手機 :root --fs-* --sp-* --r-*):字級 12/13/14/16/18/22/28、 閱讀行高 1.7、間距 4–32、圓角 6/10/14;桌面 253 個寫死字級、166 個寫死圓角換成規格名稱, 手機 167 個字級、79 個圓角、19 個色碼換成變數 - 看守測試:桌面和手機數字要一樣;畫面程式裡不准再寫死字級和圓角,寫死的顏色只准減少(88) - 讀的文字:聊天 16 px 宋體行高 27、頁面同;標題 # 22 / ## 18 / ### 16;表格只有橫細線、 表頭灰色粗體、數字欄靠右;提示框淡底無邊條只有小標上色;程式碼淡底無框;數字卡只留細框 - 頁面視窗:宋體大標題、一行小字資訊、現況當開頭段落、結論是安靜的提示框;目錄收成一行 「▸ 目錄 · N 節」(⌘F 展開);刪除移到左邊,不再貼著「完成」;閱讀欄 680 - 圓餅圖拿掉黑色外圈、字照規格 已驗證: cargo test 518 全過(含排版檢查、規格比對、看守測試;看守測試故意放一個寫死字級確認會擋)、 clippy 21=基線;桌面頁面、聊天、表格原解析度截圖目視;手機 390 px 深淺截圖、node 圖表 65/通知 9 未驗證: 使用者機器上的實際視窗;iOS/Android 實機的宋體備援(手機用系統宋體,沒有就退回 serif)
2026-11-16 13:51:30 +00:00
- 有 3 個以上標題的頁面,標題下面有一行小字「▸ 目錄 · N 節」(不佔第一屏):點了展開成標題清單,每條可點、點了跳到那一節;展開時上面有小搜尋框可以篩標題(⌘F 直接展開並把光標放進去,Esc 離開)。
修正卡死: ⌘ 一按視窗就鎖死、圖表縮小凍結、打字每鍵寫檔;複製中文亂碼;頭像不再擋住思考動畫 卡住當機 - ⌘1–⌘9(Win/Linux 為 Ctrl)在 ctx.input 裡又呼叫 ctx.input,egui 的 Context 被鎖兩次, 按住 ⌘(⌘C、⌘V、⌘Tab)視窗就永遠不動;改為只讀一次(bot_jump_key),加回歸測試 - 圖表 x 軸格線固定每 1 一條,縮小後一幀要畫上百萬條(凍結、記憶體爆);改為最多約 40 條, 滾輪不再被圖表吃掉(⌘/Ctrl+滾輪或雙指縮放) - 草稿每打一個字就同步重寫整個 state.json(含 fsync);改為停手 1.5 秒後才存,結尾空白也 不再造成每幀存檔 複製(三個系統) - Mac:pbcopy 從 Finder/Dock 開時沒有 UTF-8 語系,中文變亂碼;指定 UTF-8 - ⌘C 攔截只拿 CopyText,不再丟掉開連結、複製圖片、Linux 中鍵選取等指令(且只在 Mac 攔) - Windows:改用 Win32 剪貼簿(arboard,獨立執行緒),不再走 clip.exe(缺 BOM、多一個 NUL) - Linux:依 WAYLAND_DISPLAY/DISPLAY 選 wl-copy 或 xclip/xsel,都沒有時退回視窗剪貼簿 其他 - 頁面目錄點了不跳(標題位置從未記錄);目錄搜尋框按 Esc 會關掉整頁 - 圖表:單一系列欄名被 String::max 換成「數值」;同尺寸無標題的圖共用縮放;inf/NaN 不入圖 - KPI 卡片寬度未扣內距而超出欄寬 - 「還原上一個答案」在送出新訊息後會插錯位置;重試錯誤回覆不再存可還原的版本 - 手機:長輪詢回來時已切到別的聊天,不再把上一個聊天的訊息畫進來 - 輸入框上方頭像:思考時頭稍微縮小,三顆小球繞著頭轉(後面的從頭後經過、前面的壓在頭上並描邊), 不再被頭像蓋住 - 刪除未使用的 src/app/ui_kit.rs 驗證:macOS cargo test 374 通過(relay 18 通過);Windows/Linux cargo check 通過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:19:59 +00:00
- 寫頁面時 Bot 會選一種「種類」(data 數據分析/compare 比較評測/decision 決策備忘/howto 教學步驟/timeline 時間線/prose 長文/notes 筆記),第一屏跟著內容走:data 頁頂部放 2–4 張 KPI 數字卡(附漲跌,漲綠跌紅),compare/decision 頁先給一行「結論」卡;種類顯示在頁面標題和聊天卡片的列中。字段全部可省略——沒有數字就不硬湊卡片。
- 要定期追蹤時,Bot 會同時設例行任務:每次先 `read_page`、查新消息,有實質進展才更新頁面並告訴你;沒有就說「沒有新消息」,頁面不動。
- 每次更新保留上一版(最多 10 版),打開頁面後下方「版本紀錄」可以看舊版。也可以複製成 Markdown、存成檔案(到「下載」)、刪除。
- 右側面板「資料庫」最上面列出這個 Bot 的頁面。手機也能看:聊天裡的卡片、頁面連結、完整頁面(圖表由 AnyBot 畫好傳過去)。
- 頁面存在大腦上,螢幕電腦和手機看到的是同一份。
### 生活卡片
- Bot 用 `show_card` 把機票、餐廳或地點、天氣、商品、活動整理成卡片顯示在聊天裡:圖示、標題、副標、最多 12 列「項目/內容」,以及「查看來源 ↗」。
### 聊天:群組、表情回應、引用、討論串、匯出、會議
- **群組聊天**:「+」按右鍵 →「群組聊天(好幾個 Bot 一起回答)」。在 Bot 設定的「群組成員」勾選成員(至少一個)。你傳一則訊息後,成員依序回答,每個用自己的模型、指示、記憶和電腦;每則回答顯示那個 Bot 的頭像。後面的成員看得到前面的回答(標成【名字】,但看不到別人的工具步驟和結果),被要求補充不同觀點、不要重複。某個成員出錯或被停止,這一輪就停下來。輸入框左下角顯示「成員:…」取代模型選單。
Bot 之間溝通:ask_bot 問同事並等回答、群組 @點名、共用頁面/「關於你」記憶/教技能;修正插話丟附件、Enter 核准失效等 問同事(ask_bot) - A 問 B 並等它回答:問題放進 B 自己的聊天,B 用自己的模型、工具、記憶和電腦做,最後的回覆交回 A - 最多轉 3 手、不能互等(避免卡死)、對方忙就排隊(10 分鐘逾時)、停止 A 時 B 也停 - message_bot 也加轉手上限;別的 Bot 叫的不算使用者的話(改不了自己的設定) 群組 @點名 - 「@名字」只叫被點到的成員回答;成員在回覆裡 @ 別人就接著說(一輪最多 8 則) - 電腦和手機的輸入框打 @ 會列出成員 - 修正:每個成員帶自己的記憶;成員回覆的每一步都記得是誰說的 共用資源 - Bot 可以讀其他 Bot 的頁面(只能讀,改要請作者改) - 共用的「關於你」記憶:每個 Bot 都帶著,記憶頁可切換查看、編輯;外人的訊息不帶 - teach_skill:把自己會的技能教給同事(先問你);同事名冊列出每個 Bot 會的技能 修正 - 插話(Bot 工作中傳訊息)會帶附件:聊天有檔案卡片,模型看得到圖片;當機復原也帶著 - 輸入框有焦點、框是空的時 Enter 允許待核准的步驟(原本被當成空白送出吃掉) - 大腦的螢幕連不到大腦時,引用、附件、記憶不會先被用掉 - 「還原上一個答案」存在 Bot 上:重開還在,連大腦的畫面和手機都能還原;停止的回合也留著 - Bot 忙時被叫醒(例行任務、message_bot、觸發器)改成排隊開自己的一輪,不再壓成純文字插話 - 停止時結果已回來的步驟標成完成;輸入法剛選字的那一格不送出 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 13:34:03 +00:00
- **@點名**:打「@名字」只叫被點到的成員回答(點好幾個就照點的順序);沒點名就照舊全部輪一次。名字可以有空格(「@FSD 追蹤專員」),半形 @ 和全形 @ 都可以,英文大小寫不分;名字裡沒有對上任何成員的 @(例如 email 地址)不算。電腦、大腦的螢幕、手機打的都算,由大腦判斷。
- **打 @ 跳出成員清單**:在群組的輸入框最後打 @,上面列出成員和它們的描述(名稱開頭符合的先、含有的次之),↑↓ 選、Enter/Tab 帶入、Esc 關掉,點一下也可以;帶入的是完整名字加一個空格,前面打的字不動。電腦和手機都有,成員正在回答時不列。
- **成員之間 @ 接話**:成員在回覆裡寫「@另一位成員」(請它補充、檢查、回答),被點到的接在它後面說,排在這一輪還沒輪到的成員前面;@ 自己或已經排著的不算。從你傳訊息起,一輪最多 8 則回答,滿了就把話交還給你,不會一直互相點名。成員的說明裡寫了這些規則。
- **每個成員帶自己的記憶**:以前整輪都用第一個回答的成員找到的記憶(後面的成員也看得到它的記憶);現在每個成員回答時只帶自己的,也不留在你的訊息上給別的成員看。
- **每一步都標著是誰說的**:以前成員的回答做了好幾步(用了工具)時,後面的步驟會掉名字,其他成員只看到「其他成員」;現在每一步都記得是哪個成員。
- **表情回應**:滑鼠移到 Bot 的回答上,可以按 👍 ❤️ 😂 🎉 🙏;回應顯示在回答下面,按一下可以拿掉;Bot 下一回合會知道你的回應。
- **引用**:回答下的「引用」:輸入框上方出現「引用:…」(左邊一條強調色),送出時引用的內容會變成 Markdown 引言放在你的訊息前面。
- **討論串**:Bot 選單 →「開始新對話」:目前的對話收起來(用第一則訊息當標題,最多保留 50 個),聊天重新開始;「過去的對話」可以切回任何一個(目前的會先收起來)。
- **匯出文字記錄**:Bot 選單 →「匯出文字記錄…」存成 Markdown(你的訊息、附件名稱、Bot 的回答、工具步驟、摘要)。
- **錄會議**:Bot 選單 →「錄會議…」:用麥克風錄音(最長 2 小時,估計值),頂部顯示紅色「● 正在錄會議 · 結束」。結束後轉成文字記錄,當作附件放進輸入框,並幫你打好「這是剛才會議的文字記錄,請整理:重點、做了哪些決定、待辦事項(誰、做什麼、什麼時候)。」,由你按送出。
## 25. 例行任務
### 每個例行任務記錄的內容
- 編號、標題
- 每次要做什麼
- 排程
- 是否暫停
- 建立時間、上次執行、下次執行
- 用哪台電腦
### 排程可以怎麼設
- 每天/每週/每月/每年,每 N 個單位(預設 1)。
- 每週要選星期幾。
- 每月可以選幾號,或「第 N 個星期幾」(1–4,或最後一個)。
- 每年選月份和日期。
- 時間用 24 小時制(例如 09:00,也接受 7:30)。
- 可以設時區;沒設就用你在設定裡選的時區。
### 自動修正與檢查
- 每 0 個單位會改成 1。
- 每月沒有指定日期:設成 1 日。
- 每年沒有指定月份:設成 1 月。
- 每週沒有指定星期幾:「每週的例行任務要指定星期幾…」
- 時間看不懂:「時間「X」看不懂,請用 24 小時制的 HH:MM,例如 09:00」
- 日期超出範圍:「每月的日期要在 1 到 31 之間」
### 畫面上的描述(照原版文字)
| 情況 | 文字 |
|---|---|
| 每天 | 「每天」 |
| 每 N 天 | 「每N 天」 |
| 每週一到週五 | 「每個工作日」 |
| 每週指定幾天 | 「每週的週一、週三」,每 N 週則為「每N 週的…」 |
| 每月幾號 | 「每月D日」,每 N 個月則為「每N 個月的D日」 |
| 每月第幾個星期幾 | 「每月的第N個星期X」或「每月的最後一個星期X」 |
| 每年 | 「每年M月D日」 |
- 描述後面接時間,例如「每個工作日 09:00」。
- 時區跟這台電腦不同時,結尾加「(時區)」。
### 下次什麼時候跑
- 一定是現在之後的時間。
- 「每 N」從建立那天開始算。
- 遇到月底:
- 31 日在只有 30 天的月份,改在最後一天跑。
- 2 月 29 日只在閏年跑。
- 依例行任務自己的時區計算,最多往後找 5 年。
- 夏令時間:
- 時間重複時,用比較早的那一次。
- 時間不存在時,那天跳過。
- 下次時間顯示成「今天 09:00」「明天 09:00」或「11月5日 09:00」。
### 怎麼觸發
- 每 1 秒檢查一次。
- Bot 忙的時候,等它閒下來再跑;每個 Bot 一次只觸發一個。
- Bot 收到的訊息是「⏰ 例行任務「標題」時間到了:要做的事」,然後像平常一樣工作。
- 如果那個 Bot 不在目前畫面上,會標成未讀。
### 例行任務視窗(頂部「例行任務」按鈕)
- 標題「(Bot) 的例行任務」,寬 480 px。
- 沒有任務時顯示:
- 「例行任務是這個 Bot 依排程重複執行的任務。請在聊天中請它設定一個。」
- 「例如:「每個工作日早上 9 點整理新聞給我」」
- 每張卡片:
- 標題(暫停中的加「已暫停」)。
- 排程,接著是「·下次 (時間)」。
- 要做的事。
- 按鈕:
- 「暫停」/「繼續」:繼續時會重新算下次時間。
- 「立即執行」:會切到這個 Bot 並開始做。
- 「刪除」:紅字。
- 刪除確認視窗:
- 標題「刪除例行任務?」
- 內文「這會刪除例行任務並停止其後續執行。此操作無法復原。」
- 視窗最下面:「要新增或修改,直接在聊天裡告訴 Bot。」
---
### 更多排程寫法(原版有的)
- 「每 N 分鐘」(最少 5 分鐘,估計值,從建立時間開始算)、「每小時」「每 N 小時的 MM 分」。
- 「僅一次」:下一次符合的時間執行一次就停。
- 「左右」(彈性時間):在指定時間前後 15 分鐘內(估計值)的某個固定時刻執行,畫面上寫「09:00左右」。
- 都是在聊天裡請 Bot 設定(create_routine 的 frequency 可以是 minutely、hourly,加上 once、flexible)。
### 事件觸發的例行任務(原版的觸發種類)
在聊天裡跟 Bot 說,例如「PR 合併時幫我寫更新紀錄」「CI 失敗就通知我並查原因」「Slack #部署 有人提到『回滾』時處理」「週會開始前 10 分鐘把議程整理好」。Bot 會用 create_routine 的 trigger 設定:
| 種類 | 怎麼知道發生了 | 可以設定 |
|---|---|---|
| GitHub | 用你的 Token 每 60 秒查存放庫事件和 CI 結果(GitHub 要求的最短間隔) | 存放庫;事件:PR 建立/更新/合併/關閉/留言、CI 通過/失敗、審查核准/要求修改/留言、討論串解決/重新開啟、議題被指派/建立、推送;限定使用者、分支、PR |
| Slack | 每 10 秒看頻道(估計值) | 任何訊息、被 @、提到某個字、有人加上某個表情回應;Token 留空時用「訊息管道」的 Slack Token |
| Linear | 每 60 秒查議題(估計值) | 議題建立、狀態變更;限定團隊 |
| Sentry | 每 60 秒查議題 | 建立、指派、解決、封存、變回未解決、有變更;限定專案 |
| PagerDuty | 每 60 秒查事故 | 觸發、確認、解決、有變更;限定服務 |
| 郵件 | 每 60 秒看「郵件」收件匣 | 寄件人包含、主旨包含 |
| Webhook | AnyBot 在這台 Mac 開一個網址 `POST http://127.0.0.1:8792/hooks/<編號>`,要帶 `Authorization: Bearer <密鑰>`(原版的驗證方式) | 每次呼叫跑一次,呼叫的內容會交給 Bot;密鑰錯誤回 401 |
| 行事曆(跟著行事曆) | 每 30 秒看「行事曆」 | 活動開始時或開始前 N 分鐘;限定行事曆、標題;活動被移到別的時間,會在新時間觸發(原版:「無論行事曆將其移到何時」) |
| 群組 | 裡面任何一個觸發就跑 | 至少兩個觸發條件(原版規則) |
- 觸發時 Bot 會收到「⚡ 例行任務「名稱」被觸發:(發生了什麼)要做的事:…」,像你傳訊息給它一樣開始工作。
- 第一次連上時只記住目前狀態,不會把以前的事件當成新的。AnyBot 開著時才會檢查。
- 「例行任務」視窗顯示「⚡ 觸發條件」和連線狀態(例如「已連上 GitHub,等待事件」或錯誤原因)。暫停的不會檢查。
## 26. Bot 可以直接操作 App 的功能
你可以跟 Bot 說「每天早上 9 點幫我…」「把你換成 Claude」「切成深色模式」,它會自己操作 App。
| 功能 | 做什麼 | 先問嗎 | 完成時說 |
|---|---|---|---|
| 「查看例行任務」 | 列出這個 Bot 的例行任務 | 不用 | 每行「#編號 「標題」:排程 · 下次…/已暫停/沒有下次」;沒有時「還沒有例行任務。」 |
| 「建立例行任務」 | 照標題、內容、排程、電腦建立 | 不用 | 「已建立例行任務 #…」 |
| 「修改例行任務」 | 改標題、內容、排程,或暫停、恢復 | 不用 | 「已更新 #…」 |
| 「刪除例行任務」 | 刪除 | **要先問** | 問:「刪除例行任務:「標題」。這會停止它之後的執行,無法復原。」 |
| 「立即執行例行任務」 | 馬上跑一次 | 不用 | 「已開始執行「標題」」 |
| 「查看 Bot」 | 列出所有 Bot | 不用 | 「「名稱」(主要 Bot)· 供應商 · 模型:描述」 |
| 「建立 Bot」 | 建新的 Bot | 不用 | 「已建立 Bot「名稱」(供應商 · 模型)」 |
| 「修改 Bot」 | 改名稱、描述、指示、供應商、模型、釘選、預設電腦 | 不用 | 「已更新「名稱」的…(現在:供應商 · 模型)」 |
| 「傳訊息給其他 Bot」 | 把工作交給另一個 Bot 並叫醒它 | 不用 | 「已交給「名稱」,它的回覆會出現在它自己的聊天裡。」對方收到「📨 來自「發送者」:內容」 |
| 「查看電腦」 | 列出能用的電腦和狀態 | 不用 | 例如「你的電腦:這台 Mac,已允許」 |
| 「修改設定」 | 改主題、強調色、時區 | 不用 | 「已更新:主題 → …」 |
| 「記住」 | 記下一件事;已經有很像的就先不記,由 Bot 決定不記、用 `replaces` 取代舊的,或用 `separate` 兩條都留 | 不用 | 「記住了:…」「已經記得:…」或「記住了:…(取代了「…」)」 |
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
| 「忘記」 | 把一件記得的事放進「最近刪除」 | 不用 | 「忘記了:…(30 天內可以在「記憶 › 最近刪除」還原)」 |
| 「翻記憶」 | 用意思和字找記得的事、做過的事(search_memory) | 不用 | 每條附日期 |
- **「在這台電腦上執行」只有你能打開,Bot 不能自己打開。**
- **修改 Bot 怎麼找對象**:先找名稱完全一樣的(不分大小寫),找不到再找名稱裡有那幾個字的。只換供應商時,模型會自動改成那家的建議模型。
- **可能看到的錯誤**:
- 「找不到叫「X」的 Bot」
- 「沒有「X」這個供應商」
- 「不能傳訊息給自己」
- 「「X」不是有效的時區名稱(例如 Asia/Taipei)」
- 「沒有要改的項目」
---
## 27. 通知
- **什麼時候通知**:AnyBot 視窗不在最前面,或你 90 秒沒碰鍵盤滑鼠。每 10 秒檢查一次你在不在。
- **Bot 做完時**:標題「(Bot) 完成了」,內文是回覆的第一行(最多 80 字),有 Glass 提示音。
- **Bot 等你允許時**:標題「(Bot) 需要你允許」,Dock 圖示也會跳動。
- 通知內文最多 180 字。
- 可以在「設定 → 一般 → 通知」關掉。
- 通知只在 macOS 上有。
---
## 28. 版本、更新與重新啟動
- **版本就是程式建好的時間**,顯示在側邊欄最下面和「設定 → 一般 → 版本」。
- **偵測新版**:每 10 秒檢查一次程式有沒有換新。有新版時,側邊欄出現「⬆ 重新啟動以更新」。
- **你離開時自動更新**,要同時符合:
- 「在你離開時自動更新用戶端」有開(預設開)。
- 有新版。
- 螢幕鎖定或螢幕保護程式開著。
- 10 分鐘(600 秒)沒動作。
- 沒有 Bot 在工作,也沒有在等你允許的請求。
- **檢查時間**:啟動後 30 秒檢查第一次,之後每 1 小時再加 0–300 秒的隨機延遲。這些數字取自原版。
- **重新啟動**:
1. 先停掉所有工作和背景指令,再存檔。
2. 小幫手每 0.2 秒看一次舊的 App 關了沒,關了才打開新的,不會同時開兩個。
3. 新開的 App 一律用一般模式啟動。
- **中斷修復**:App 關閉時還在回覆的 Bot,下次打開時會改成「(這次的回應被中斷了…)」,還在執行或等待的步驟改成「–」,讓你可以重試,不會看起來一直卡住。
---
## 29. 管理員鎖定
- 公司管理員可以鎖兩個開關:
- 「直接操作」(AllowDirectMode)
- 「在這台電腦上執行」(AllowLocalExecution)
- **設定位置**:
- macOS:系統偏好設定網域 com.anybot.AnyBot,也可以用 MDM 強制。例如 `defaults write com.anybot.AnyBot AllowDirectMode false`。
- 其他系統:家目錄的 .anybot/policy.json。
- **值怎麼解讀**:
- 沒設:你可以自由開關。
- true、1、yes:允許。
- false、0、no:鎖成關閉。
- 其他看不懂的值:也鎖成關閉。
- **被鎖住時**:
- 設定裡顯示「🔒 由你的管理員設定,無法變更」。
- Bot 要用你的電腦時直接被拒,不會問你。
- 每次打開設定都會重新讀取。
---
## 30. 存下來的資料
- **存放位置**:這台電腦的應用程式資料資料夾裡的「AnyBot」資料夾,聊天和金鑰都不會上傳。
- **怎麼寫入**:先寫暫存檔再換名,避免寫到一半壞掉。
- **打不開時**:檔案壞掉或一個 Bot 都沒有時,改用第一次啟動的預設資料。
- **整體設定**(括號內是預設值):
- 主要 Bot(1 號)、選中的 Bot
- 主題(淺色)、強調色(黑色)
- 每家供應商的金鑰、網址、預設模型和抓過的模型清單
- 側邊欄收合與寬度
- 在這台電腦上執行(關)
- SSH 電腦
- 自動審核(關)和兩組規則
- 時區(這台電腦的時區,讀不到就用 Asia/Taipei)
- 通知(開)
- 直接操作(關)
- 自動更新(開)
- **每個 Bot 記錄**:
- 名稱、描述、指示
- 形狀、顏色
- 供應商、模型、釘選
- 訊息、未讀
- 電腦工具開關(預設關)、工作資料夾、一律允許清單
- 可讀長度(預設 128,000)
- 例行任務
- 上一回合的結果
- 預設電腦(預設「Bot 的電腦」)
- **每則訊息記錄**:
- 誰說的、文字、思考內容
- 哪個模型寫的、是不是錯誤
- 工具步驟
- 是不是摘要、喚醒或插話
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- 帶給模型的記憶(你的訊息才有)
- 截圖不存。
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- **記憶和索引**(同一個資料夾裡,詳見 [docs/memory.md](docs/memory.md)):
- `drops/`:「傳送到其他裝置」的東西。大腦上是還沒送達或等手機下載的檔案(`<編號>.bin`)和清單 `index.json`,保留 7 天;每台電腦上是收到一半的檔案(`in-<編號>.part`)和收過什麼 `received.json`(最近 100 筆)。收好的檔案在「下載/AnyBot」,不在這裡。
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- `memory.db`:每個 Bot 的記憶(記得的事、做過的事、整理過的、最近刪除)和它們的向量。每晚在 `backups/memory-日期.db` 備份一份,保留 7 天。
- `docs.db`:文件索引,壞了可以重建。
- `oplog/audit.db`:稽核紀錄,留 30 天。
- `models/potion-multilingual-128M/`:本機語意模型。
- 每個 Bot 的「記得的事」在 `state.json` 裡也有一份副本,給同步和備份用。
- **AnyBot 自己的瀏覽器**:登入資料存在同一個資料夾的 browser 和 browser-profiles 裡,使用中的設定檔記在 browser-profile.txt。
---
## 31. 第一次啟動
第一次打開時沒有任何 Bot,主畫面是「歡迎使用 AnyBot」引導:
1. **連上 AI 模型**:還沒有任何金鑰時,按「設定模型」打開模型設定;有了就打勾,寫出可以用哪一家。
2. **建立你的第一個 Bot**:打開建立 Bot 視窗,預設用剛設好金鑰的那一家。第一個建立的 Bot 就是主要 Bot。
3. **在別台電腦用過 AnyBot?**:「登入帳號」打開帳號設定。
刪掉最後一個 Bot 也會回到這個引導。伺服器(anybot --serve)裝好也是零個 Bot。舊版開過、但五個範例 Bot 從沒用過(沒聊天、沒改名、沒有例行任務和記憶)的資料,更新後會清掉範例,跟新裝一樣。手機頁沒有 Bot 時,請你到電腦上建立。
**登入後自動同步**(設定 → 帳號,按「登入」之後,不用再按別的):
- 帳號裡有另一台開著、自己思考的 AnyBot(不是手腳、不是在看別台的):改用它當大腦,那邊的 Bot 和聊天出現在這台;連上後自動把這台原本的 Bot(連同聊天)、模型金鑰、技能和連接器搬過去,大腦已經有的會略過。
- 沒有:拿帳號裡最新的備份,把這台還沒有的 Bot 加進來(同名而且聊天相同的算已經有),再把合起來的整份備份回帳號。
截圖和測試用的五個範例 Bot(State::samples):Bot、研究助理、寫作夥伴、電腦助手、本機模型。
---
## 32. 外觀:頭像、顏色、主題、字型
### 配色(「紙」:和手機端同一套)
- 淺色:米白紙底、側欄深一階、卡片純白;文字是帶暖調的黑。深色:暖黑三階(不藍黑)。
- 強調色(連結、選中、新訊息點、focus)是黏土橘;殼本身幾乎全灰階,**黃色只代表「需要你」**,紅只代表危險,圖表才有意識地用色(一套暖家族六色,見第 27 節頁面圖表)。
fix: 選聲音改成一個選單;搜尋框不再搶走輸入框的游標;側欄選中的 Bot 拿掉左邊色條 - 聲音(對話詳細資訊 › 語音聊天、設定 › 語音 › 說):原本是「聲音」字+「載入聲音清單」鈕+要自己打代號的框,載入後又多一個不顯示目前選擇的「選一個…」。現在和速度、語言一樣是一列一個選單:第一項「預設(eve)」,下面是服務的聲音(ElevenLabs 顯示名字),選了試唸一句;清單在那一列出現時就拿(每種「說」設定一次)。拿不到時選單裡寫一行原因,可以直接輸入名稱或「再試一次」。 - egui 的選單停在打開時的高度,清單或錯誤後來才到時下面被切掉:內容到了就在選單畫出前清掉它記住的大小,重新量一次。 - 語音服務的錯誤不再貼原始 JSON:金鑰被拒(含 xAI 用 400 回的)只說「不接受這把金鑰」,其他取服務回的 message。各服務不選時用的聲音集中在 speech::usual_voice。 - 側欄搜尋:搜尋框開著而且是空的時候,每一格都把游標拿回去,點輸入框打字的字會跑進搜尋框。改成只在按 🔍(下一格)或 ⌘F 時給一次。 - 側欄選中的 Bot 不再有強調色細條,只有淺底(比滑過深一階)。 已驗證:cargo test --bin anybot 525 通過(新增 a_refusal_reads_as_words_not_json、each_service_says_which_voice_it_uses_unasked);截圖:面板與設定的聲音選單(載入中打開、載入後打開都看得到輸入框和「再試一次」)、打開搜尋後點輸入框打「你好」留在輸入框、按 🔍 直接打「台南」進搜尋框、選中列沒有色條。 未驗證:用真的 xAI/ElevenLabs 金鑰載入清單和試唸。
2026-11-16 15:37:38 +00:00
- 設定 › 一般 › 外觀有三個旋紐:**底色**(藍灰→米白)、**對比**(柔和→鮮明,整個殼的階層、細線、文字深淺一起調)、**強調色**(黏土、靛藍、苔綠、藍綠、玫紅、琥珀、石板、墨黑八色,圖表六色跟著轉);預設就是「紙」。調了立刻整個殼跟著換(淺色、深色、跟著系統都一樣,不用重開)。同處有**密度**(寬鬆/緊湊)和**慶祝動畫**開關;「外殼顏色重設」把三個旋紐歸零。側欄選中的 Bot 只有淺底(比滑過深一階),左邊沒有細條。
主題產生器進設定(底色/對比/強調色/密度/慶祝)+側欄細條+時段問候+目標撒花 Quiet Shell 收尾四件(A3/B2/B3/C/D),一次落地: - C 產生器:theme::shell(tone, accent, contrast, dark)——三個旋紐生成整個殼 (表面=紙朝墨等距階梯、文字=墨回紙、圖表六色=強調色轉色相);設定 › 一般 外觀新增 底色(冷→暖)、對比(0.75→1.35,拉整個殼的階層一起調)、強調色 (黏土/靛藍/苔綠/藍綠/玫紅/琥珀/石板/墨黑)、重設。預設=紙,舊設定檔 serde 補預設。ANYBOT_SHOT_SHELL=tone,accent,contrast 出概念圖 - B3 密度:寬鬆(9/7)/緊湊(8/5) 全域間距開關 - B2 側欄:選中 Bot 不再整條深底——強調色 3px 細條+淺底(Linear 式) - D1 撒花:只在 /goal 目標達成時,該聊天上撒 1.4 秒彩帶(chart_cat 六色, 淡出收尾);設定 › 一般「慶祝動畫」可關;純裝飾,不擋任何操作 - D3 問候:新對話依時段先問「早安/午安/晚上好/夜深了」 - 淺深判定改成亮度函數 theme::is_dark(原先拿 pane 和 LIGHT 常數比對—— 底色旋紐一調就破);markdown 連結色、灰字、遮罩四處跟著改 - 手機 theme-color meta 換紙色;元件庫調查:egui_dock/notify/shadcn-egui 都不引入(自有設計系統+鎖 egui 版本),缺的取色器用八點自家版 已驗證: cargo test 505 全綠(新增 theme 產生器 5 測:預設=紙、對比單調、 冷暖心跳、is_dark 跟旋紐不跟常數;含 layout_audit 三寬度新設定區塊不破版); clippy 31=基線;截圖取樣:冷灰 pane(246,245,247)、紙 pane(248,247,245)、 側欄黏土細條 52px、墨黑殼 0px(強調色確實跟隨)、深色苔綠 152px 未驗證: 撒花只在真 /goal 達成出現,截圖模式不渲染(未目視彩帶飛的樣子, 落點/速度未調校);i18n 新字串(早安/靛藍等)靠自動翻譯,英日語未逐條核; 手機端不吃旋紐(只有 meta 色),自訂色手機同步是下一輪
2026-11-16 09:32:42 +00:00
- 工作完成撒彩帶:只在 /goal 目標達成時(不是每輪結束),落在該 Bot 的聊天上約 1.4 秒;設定 › 一般可關。
### 頭像
- 12 種形狀:圓角方、圓球、膠囊、蛋、六角、寶石、雲、拱門、星星、愛心、盾牌、石頭。
- 每個頭像都有兩隻斜斜的橢圓眼睛:深色身體配白眼,很淺的身體配黑眼。
### Bot 顏色(10 種)
| 名稱 | 色碼 |
|---|---|
| 黑色 | #1C1C1C |
| 紅 | #C82532 |
| 橘 | #D2550A |
| 黃 | #C2730B |
| 綠 | #0D9655 |
| 青 | #0D9381 |
| 藍 | #126FD4 |
| 紫 | #7442D1 |
| 洋紅 | #C82779 |
| 棕 | #86592E |
### 主題配色
淺色和深色都取自原版:淺色來自原版的樣式表,深色來自原版畫面程式裡的深色色票(每種半透明顏色是「文字色 × 原版指定的透明度」)。
| 用途 | 淺色 | 深色 |
|---|---|---|
| 主畫面 | #FFFFFF | #1F1F1F |
| 頂列 | #FCFCFC | #121212 |
| 側邊欄 | #F5F5F5 | #0E0E0E |
| 浮起面板 | #FFFFFF | #161616 |
| 文字 | #1C1C1C | #F5F5F5 |
| 次要文字 | #1C1C1C 約 68% | #F5F5F5 約 66% |
| 第三層文字 | #1C1C1C 約 56% | #F5F5F5 約 54% |
| 你的對話泡泡 | #1C1C1C(白字) | #F5F5F5 約 18%(淺色字,半透明) |
| Bot 對話泡泡 | #1C1C1C 約 6% | #F5F5F5 約 4% |
| 滑過/選中 | 6%/8% | 6%/8% |
| 邊框 | #1C1C1C 約 12% | #F5F5F5 約 10% |
| 焦點框 | #1E86FC | #1884FC |
| 強調色 | #1680F3 | #1884FC |
| 危險/錯誤 | #CD2834 | #FC2C3E |
| 陰影 | 有 | 深色主題沒有陰影(原版設定為 0) |
design: 一套設計規格(電腦和手機同值)+讀的文字改成 Claude/Notion 的文件樣式 依 Claude 的設計原則:定一套字級並守住、卡片樣式按角色用、重複的元素一致。 - 字型:只留思源黑體(介面)+新加思源宋體(回答、頁面內文和標題,SIL OFL); 拿掉粉圓體和「系統字型」選項、粉圓單一粗細的「粗體畫兩次」補丁;Mermaid 圖改用思源黑體; fonts/OFL.txt 補上思源黑體/宋體的版權 - 規格(theme.rs fs/sp/radius、手機 :root --fs-* --sp-* --r-*):字級 12/13/14/16/18/22/28、 閱讀行高 1.7、間距 4–32、圓角 6/10/14;桌面 253 個寫死字級、166 個寫死圓角換成規格名稱, 手機 167 個字級、79 個圓角、19 個色碼換成變數 - 看守測試:桌面和手機數字要一樣;畫面程式裡不准再寫死字級和圓角,寫死的顏色只准減少(88) - 讀的文字:聊天 16 px 宋體行高 27、頁面同;標題 # 22 / ## 18 / ### 16;表格只有橫細線、 表頭灰色粗體、數字欄靠右;提示框淡底無邊條只有小標上色;程式碼淡底無框;數字卡只留細框 - 頁面視窗:宋體大標題、一行小字資訊、現況當開頭段落、結論是安靜的提示框;目錄收成一行 「▸ 目錄 · N 節」(⌘F 展開);刪除移到左邊,不再貼著「完成」;閱讀欄 680 - 圓餅圖拿掉黑色外圈、字照規格 已驗證: cargo test 518 全過(含排版檢查、規格比對、看守測試;看守測試故意放一個寫死字級確認會擋)、 clippy 21=基線;桌面頁面、聊天、表格原解析度截圖目視;手機 390 px 深淺截圖、node 圖表 65/通知 9 未驗證: 使用者機器上的實際視窗;iOS/Android 實機的宋體備援(手機用系統宋體,沒有就退回 serif)
2026-11-16 13:51:30 +00:00
### 設計規格(電腦和手機同一套)
design: 一套設計規格(電腦和手機同值)+讀的文字改成 Claude/Notion 的文件樣式 依 Claude 的設計原則:定一套字級並守住、卡片樣式按角色用、重複的元素一致。 - 字型:只留思源黑體(介面)+新加思源宋體(回答、頁面內文和標題,SIL OFL); 拿掉粉圓體和「系統字型」選項、粉圓單一粗細的「粗體畫兩次」補丁;Mermaid 圖改用思源黑體; fonts/OFL.txt 補上思源黑體/宋體的版權 - 規格(theme.rs fs/sp/radius、手機 :root --fs-* --sp-* --r-*):字級 12/13/14/16/18/22/28、 閱讀行高 1.7、間距 4–32、圓角 6/10/14;桌面 253 個寫死字級、166 個寫死圓角換成規格名稱, 手機 167 個字級、79 個圓角、19 個色碼換成變數 - 看守測試:桌面和手機數字要一樣;畫面程式裡不准再寫死字級和圓角,寫死的顏色只准減少(88) - 讀的文字:聊天 16 px 宋體行高 27、頁面同;標題 # 22 / ## 18 / ### 16;表格只有橫細線、 表頭灰色粗體、數字欄靠右;提示框淡底無邊條只有小標上色;程式碼淡底無框;數字卡只留細框 - 頁面視窗:宋體大標題、一行小字資訊、現況當開頭段落、結論是安靜的提示框;目錄收成一行 「▸ 目錄 · N 節」(⌘F 展開);刪除移到左邊,不再貼著「完成」;閱讀欄 680 - 圓餅圖拿掉黑色外圈、字照規格 已驗證: cargo test 518 全過(含排版檢查、規格比對、看守測試;看守測試故意放一個寫死字級確認會擋)、 clippy 21=基線;桌面頁面、聊天、表格原解析度截圖目視;手機 390 px 深淺截圖、node 圖表 65/通知 9 未驗證: 使用者機器上的實際視窗;iOS/Android 實機的宋體備援(手機用系統宋體,沒有就退回 serif)
2026-11-16 13:51:30 +00:00
依 Claude 的設計原則:定一套字級並守住、卡片樣式按角色用(外框、底色、陰影只給真正獨立的東西)、重複的元素長得一樣。數字在 `src/theme.rs`(`fs` `sp` `radius`)和手機 `mobile/index.html` 的 `:root`(`--fs-*` `--sp-*` `--r-*`),測試會比對兩邊一樣,也不准畫面上再出現規格以外的字級和圓角。
- 字級 7 階:說明 12(時間、標記、圖表軸)、小字 13(說明、次要)、介面 14(按鈕、清單、輸入框、設定列)、閱讀 16(回答、頁面內文、輸入框裡你打的字)、小標 18、中標 22、大標 28。
- 行高:閱讀字 1.7 倍(16 px 字 27 px 行),介面字 20,小字 18,標題 26/30/36。
- 間距:4、8、12、16、24、32。
- 圓角三種:6(標籤、色塊、小控制項)、10(輸入框、按鈕、程式碼、提示框)、14(卡片、對話框、面板);膠囊和圓形全圓。
- 中文和英文用同一套字型(介面思源黑體、閱讀思源宋體),基準線和大小對得齊;缺的字用系統字型(蘋方等)補。程式碼用 **SF Mono**,沒有就用 Menlo。
- 「·」分隔號前後不加空格。
2026-11-16 14:07:07 +00:00
### 共用元件(`src/app/kit.rs`)
每個設定頁、對話框都用同一組元件,不自己畫框:
- **區段**:13 px 灰色粗體小標,上方 24、下方 8(每個設定頁一樣;以前「電腦」頁的小標是另一種淡灰細字)。
- **群組**:一張卡(細框、圓角 14)裝一組設定列,列與列之間一條細線。
- **設定列**:左邊名稱 14 px(可以多一行 13 px 灰色狀態)和「?」說明,右邊開關、選單或按鈕;名稱太長就「…」,不會擠掉右邊。
- **卡片**:一整塊有標題、有欄位的內容(Bot 設定的「Bot 資料」「頭像」等)。**卡片裡不再放卡片**(以前「瀏覽器設定檔」裡的兩個選項各自是一張小卡;「更新」頁每一列都是一張卡)。
design: 設定減字+頁面照 Anthropic 的報告寫法(寫法規則、存檔前檢查、可收起的細節) 設定頁(字太多): - 設定列的「?」平常不顯示,滑鼠移到那一列才出現(位置保留,名稱不跳動) - 設定下面的說明只顯示一行,長的結尾「…」,滑過看全文 - 外觀只留主題、強調色、聊天的顏色、語言;底色、對比、密度、慶祝動畫、重設收進「更多外觀設定」 - 聊天的顏色只有點(選中的有外圈),不再加一段文字;「你的電腦已是最新版本」改成灰字一行,不再是橘框 頁面(內容太亂、字太多): - 給 Bot 的寫法規則改成 Anthropic 的寫法:標題就是結論、第一句補理由、最多三點;數字放 stats/表格; 一節最多一處粗體;不用「→」、分隔線、標題編號;待辦用 steps、指令放程式碼;細節放 details - 存檔前檢查(pages::review):段落太長、粗體太多、括號裡一串數字、標題編號、分隔線、「→」、表格裡的指令、 很長卻沒有 details——退回一次並列出每一處;同一頁第二次照存,不會卡住 - 新頁面區塊 ```details 標題:預設收起的一行「▸ 標題」,點了展開(電腦和手機) 已驗證: cargo test 523 全過(新增:寫法檢查抓得到那頁的毛病、乾淨的頁面不報;退回一次第二次照存; details 標題與收起)、clippy 21=基線、手機四段腳本 node --check、深色設定頁截圖目視 未驗證: 真的模型照新規則寫出來的頁面長怎樣(要等 Bot 下次寫頁面)
2026-11-16 14:28:37 +00:00
- **欄位**:上面 13 px 灰色小標,下面輸入框。**說明**:13 px 灰字、一行(長的滑過看全文;以前 12 px 更淡的灰、整段攤開)。設定列名稱旁的「?」只在滑鼠移到那一列時出現。
2026-11-16 14:07:07 +00:00
- **按鈕**:實心(一個畫面一顆主要動作)、淡底、紅色;刪除這種不能回頭的按兩次。
- 設定左邊的分頁:選中的是淡底加粗字(以前是一整顆黑色膠囊)。
- 測試看守:畫面程式裡自己畫的「底色+外框」卡片只准變少(`kit.rs` 以外)。
design: 一套設計規格(電腦和手機同值)+讀的文字改成 Claude/Notion 的文件樣式 依 Claude 的設計原則:定一套字級並守住、卡片樣式按角色用、重複的元素一致。 - 字型:只留思源黑體(介面)+新加思源宋體(回答、頁面內文和標題,SIL OFL); 拿掉粉圓體和「系統字型」選項、粉圓單一粗細的「粗體畫兩次」補丁;Mermaid 圖改用思源黑體; fonts/OFL.txt 補上思源黑體/宋體的版權 - 規格(theme.rs fs/sp/radius、手機 :root --fs-* --sp-* --r-*):字級 12/13/14/16/18/22/28、 閱讀行高 1.7、間距 4–32、圓角 6/10/14;桌面 253 個寫死字級、166 個寫死圓角換成規格名稱, 手機 167 個字級、79 個圓角、19 個色碼換成變數 - 看守測試:桌面和手機數字要一樣;畫面程式裡不准再寫死字級和圓角,寫死的顏色只准減少(88) - 讀的文字:聊天 16 px 宋體行高 27、頁面同;標題 # 22 / ## 18 / ### 16;表格只有橫細線、 表頭灰色粗體、數字欄靠右;提示框淡底無邊條只有小標上色;程式碼淡底無框;數字卡只留細框 - 頁面視窗:宋體大標題、一行小字資訊、現況當開頭段落、結論是安靜的提示框;目錄收成一行 「▸ 目錄 · N 節」(⌘F 展開);刪除移到左邊,不再貼著「完成」;閱讀欄 680 - 圓餅圖拿掉黑色外圈、字照規格 已驗證: cargo test 518 全過(含排版檢查、規格比對、看守測試;看守測試故意放一個寫死字級確認會擋)、 clippy 21=基線;桌面頁面、聊天、表格原解析度截圖目視;手機 390 px 深淺截圖、node 圖表 65/通知 9 未驗證: 使用者機器上的實際視窗;iOS/Android 實機的宋體備援(手機用系統宋體,沒有就退回 serif)
2026-11-16 13:51:30 +00:00
### 讀的文字(回答和頁面,像 Notion 的文件)
- 段落之間 12(頁面 16)px;標題上方留得比下方多(# 22、## 18、### 16 粗)。
- 表格:沒有直線、沒有斑馬紋;表頭小字灰色粗體,下面一條灰線,每一列下面一條細線;整欄都是數字時靠右對齊(第一欄除外:它是每列的名字或「#」),欄寬就是最寬那格的寬度;比欄寬就在表格裡左右捲。
design: 一套設計規格(電腦和手機同值)+讀的文字改成 Claude/Notion 的文件樣式 依 Claude 的設計原則:定一套字級並守住、卡片樣式按角色用、重複的元素一致。 - 字型:只留思源黑體(介面)+新加思源宋體(回答、頁面內文和標題,SIL OFL); 拿掉粉圓體和「系統字型」選項、粉圓單一粗細的「粗體畫兩次」補丁;Mermaid 圖改用思源黑體; fonts/OFL.txt 補上思源黑體/宋體的版權 - 規格(theme.rs fs/sp/radius、手機 :root --fs-* --sp-* --r-*):字級 12/13/14/16/18/22/28、 閱讀行高 1.7、間距 4–32、圓角 6/10/14;桌面 253 個寫死字級、166 個寫死圓角換成規格名稱, 手機 167 個字級、79 個圓角、19 個色碼換成變數 - 看守測試:桌面和手機數字要一樣;畫面程式裡不准再寫死字級和圓角,寫死的顏色只准減少(88) - 讀的文字:聊天 16 px 宋體行高 27、頁面同;標題 # 22 / ## 18 / ### 16;表格只有橫細線、 表頭灰色粗體、數字欄靠右;提示框淡底無邊條只有小標上色;程式碼淡底無框;數字卡只留細框 - 頁面視窗:宋體大標題、一行小字資訊、現況當開頭段落、結論是安靜的提示框;目錄收成一行 「▸ 目錄 · N 節」(⌘F 展開);刪除移到左邊,不再貼著「完成」;閱讀欄 680 - 圓餅圖拿掉黑色外圈、字照規格 已驗證: cargo test 518 全過(含排版檢查、規格比對、看守測試;看守測試故意放一個寫死字級確認會擋)、 clippy 21=基線;桌面頁面、聊天、表格原解析度截圖目視;手機 390 px 深淺截圖、node 圖表 65/通知 9 未驗證: 使用者機器上的實際視窗;iOS/Android 實機的宋體備援(手機用系統宋體,沒有就退回 serif)
2026-11-16 13:51:30 +00:00
- 提示框(> [!NOTE] / [!TIP] / [!WARNING] / [!IMPORTANT]):同一種淡底圓角塊、沒有邊條;只有小標「說明/提示/注意/重要」依種類上色(灰、綠、黃、紅)。
- 程式碼:淡底圓角塊,沒有外框;引言:左邊一條細灰線、字灰一階;清單項目間 6 px。
- stats 數字卡、圖表卡:只有細外框,不再疊底色。
### 其他
design: 一套設計規格(電腦和手機同值)+讀的文字改成 Claude/Notion 的文件樣式 依 Claude 的設計原則:定一套字級並守住、卡片樣式按角色用、重複的元素一致。 - 字型:只留思源黑體(介面)+新加思源宋體(回答、頁面內文和標題,SIL OFL); 拿掉粉圓體和「系統字型」選項、粉圓單一粗細的「粗體畫兩次」補丁;Mermaid 圖改用思源黑體; fonts/OFL.txt 補上思源黑體/宋體的版權 - 規格(theme.rs fs/sp/radius、手機 :root --fs-* --sp-* --r-*):字級 12/13/14/16/18/22/28、 閱讀行高 1.7、間距 4–32、圓角 6/10/14;桌面 253 個寫死字級、166 個寫死圓角換成規格名稱, 手機 167 個字級、79 個圓角、19 個色碼換成變數 - 看守測試:桌面和手機數字要一樣;畫面程式裡不准再寫死字級和圓角,寫死的顏色只准減少(88) - 讀的文字:聊天 16 px 宋體行高 27、頁面同;標題 # 22 / ## 18 / ### 16;表格只有橫細線、 表頭灰色粗體、數字欄靠右;提示框淡底無邊條只有小標上色;程式碼淡底無框;數字卡只留細框 - 頁面視窗:宋體大標題、一行小字資訊、現況當開頭段落、結論是安靜的提示框;目錄收成一行 「▸ 目錄 · N 節」(⌘F 展開);刪除移到左邊,不再貼著「完成」;閱讀欄 680 - 圓餅圖拿掉黑色外圈、字照規格 已驗證: cargo test 518 全過(含排版檢查、規格比對、看守測試;看守測試故意放一個寫死字級確認會擋)、 clippy 21=基線;桌面頁面、聊天、表格原解析度截圖目視;手機 390 px 深淺截圖、node 圖表 65/通知 9 未驗證: 使用者機器上的實際視窗;iOS/Android 實機的宋體備援(手機用系統宋體,沒有就退回 serif)
2026-11-16 13:51:30 +00:00
- 圓角見上面的設計規格。
- 選取文字的底色是焦點色。連結用強調色。
---
## 33. Bot 收到的系統指示(摘要)
每次回覆前,Bot 都會先收到這些說明:
Bot 之間溝通:ask_bot 問同事並等回答、群組 @點名、共用頁面/「關於你」記憶/教技能;修正插話丟附件、Enter 核准失效等 問同事(ask_bot) - A 問 B 並等它回答:問題放進 B 自己的聊天,B 用自己的模型、工具、記憶和電腦做,最後的回覆交回 A - 最多轉 3 手、不能互等(避免卡死)、對方忙就排隊(10 分鐘逾時)、停止 A 時 B 也停 - message_bot 也加轉手上限;別的 Bot 叫的不算使用者的話(改不了自己的設定) 群組 @點名 - 「@名字」只叫被點到的成員回答;成員在回覆裡 @ 別人就接著說(一輪最多 8 則) - 電腦和手機的輸入框打 @ 會列出成員 - 修正:每個成員帶自己的記憶;成員回覆的每一步都記得是誰說的 共用資源 - Bot 可以讀其他 Bot 的頁面(只能讀,改要請作者改) - 共用的「關於你」記憶:每個 Bot 都帶著,記憶頁可切換查看、編輯;外人的訊息不帶 - teach_skill:把自己會的技能教給同事(先問你);同事名冊列出每個 Bot 會的技能 修正 - 插話(Bot 工作中傳訊息)會帶附件:聊天有檔案卡片,模型看得到圖片;當機復原也帶著 - 輸入框有焦點、框是空的時 Enter 允許待核准的步驟(原本被當成空白送出吃掉) - 大腦的螢幕連不到大腦時,引用、附件、記憶不會先被用掉 - 「還原上一個答案」存在 Bot 上:重開還在,連大腦的畫面和手機都能還原;停止的回合也留著 - Bot 忙時被叫醒(例行任務、message_bot、觸發器)改成排隊開自己的一輪,不再壓成純文字插話 - 停止時結果已回來的步驟標成完成;輸入法剛選字的那一格不送出 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 13:34:03 +00:00
- **身分**:「你是「名稱」。」,加上它的角色描述。主要 Bot 另外知道自己是你的主要窗口,可以問其他 Bot 或把工作交給它們。
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- **使用者的時區。** 不放現在幾點,這樣每次的系統指示都一樣,模型服務的提示快取才會中。現在幾點看最新一則訊息後面的〔送出時間〕。
- **釘選的記憶**(核心記憶),以及怎麼找舊事:先看釘選的和訊息後面的〔相關記憶〕,不夠就用 search_memory,找不到再問你;你的文件用 search_documents。
- **可以直接操作 App**:
- 建立、修改、暫停、刪除例行任務(時間照你的時區)。
- 換模型或供應商、建立 Bot。
- 改主題、強調色、時區。
Bot 之間溝通:ask_bot 問同事並等回答、群組 @點名、共用頁面/「關於你」記憶/教技能;修正插話丟附件、Enter 核准失效等 問同事(ask_bot) - A 問 B 並等它回答:問題放進 B 自己的聊天,B 用自己的模型、工具、記憶和電腦做,最後的回覆交回 A - 最多轉 3 手、不能互等(避免卡死)、對方忙就排隊(10 分鐘逾時)、停止 A 時 B 也停 - message_bot 也加轉手上限;別的 Bot 叫的不算使用者的話(改不了自己的設定) 群組 @點名 - 「@名字」只叫被點到的成員回答;成員在回覆裡 @ 別人就接著說(一輪最多 8 則) - 電腦和手機的輸入框打 @ 會列出成員 - 修正:每個成員帶自己的記憶;成員回覆的每一步都記得是誰說的 共用資源 - Bot 可以讀其他 Bot 的頁面(只能讀,改要請作者改) - 共用的「關於你」記憶:每個 Bot 都帶著,記憶頁可切換查看、編輯;外人的訊息不帶 - teach_skill:把自己會的技能教給同事(先問你);同事名冊列出每個 Bot 會的技能 修正 - 插話(Bot 工作中傳訊息)會帶附件:聊天有檔案卡片,模型看得到圖片;當機復原也帶著 - 輸入框有焦點、框是空的時 Enter 允許待核准的步驟(原本被當成空白送出吃掉) - 大腦的螢幕連不到大腦時,引用、附件、記憶不會先被用掉 - 「還原上一個答案」存在 Bot 上:重開還在,連大腦的畫面和手機都能還原;停止的回合也留著 - Bot 忙時被叫醒(例行任務、message_bot、觸發器)改成排隊開自己的一輪,不再壓成純文字插話 - 停止時結果已回來的步驟標成完成;輸入法剛選字的那一格不送出 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 13:34:03 +00:00
- 問其他 Bot 並等它回答(ask_bot),或只交辦不等(message_bot)。
- 做完要用一句話說結果。
- **上網和瀏覽器**:
- 公開網頁直接讀。
- 要登入的網站(Threads、Instagram、Facebook、Gmail、銀行…)用 AnyBot 瀏覽器打開再讀;遇到登入頁就請你登入一次。
- 絕對不要叫你去改瀏覽器的設定或選單,也不要說可以從 Chrome 複製登入。
- 你要換 profile/設定檔/另一個帳號時,用設定檔工具;想用你平常的 Chrome,就用「你的瀏覽器」。
- **操作你的 Mac 畫面**:截圖看畫面,再點、打字、按鍵、捲動、拖曳,每一步都再截圖確認。用在檔案和網頁工具做不到的事,例如操作其他 App、在 Chrome 切換設定檔。
- **不要說「我沒有瀏覽器或工具」**,要先試。需要權限時 App 會自己跳出來問你。
- **目前的例行任務清單。**
- **能用的電腦**:Bot 的電腦、你的電腦、SSH 電腦,以及預設是哪一台。
- **工作規則**:
- 你說在哪台電腦做就換過去。
- 先看清楚再動手。
- 需要權限時直接用工具,不要叫你自己去改設定。
- 被拒絕就換個方式或問你。
- 跑很久的指令要在背景追蹤,不要重跑。
- 有工具結果證明做完了才能說做完;失敗要照實說。
- **最後是這個 Bot 自己的「指示」。**
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
每則你的訊息送出時,後面會接上〔送出時間:日期(星期)時:分〕;有帶記憶時再接〔相關記憶(AnyBot 依這則訊息找出來的,不一定都用得上):…〕。這段只在送給模型時接上,聊天記錄裡看不到。
---
## 34. 鍵盤快速鍵
| 按鍵 | 作用 |
|---|---|
| ⌘N | 建立 Bot |
| ⌘, | 打開設定 |
修正卡死: ⌘ 一按視窗就鎖死、圖表縮小凍結、打字每鍵寫檔;複製中文亂碼;頭像不再擋住思考動畫 卡住當機 - ⌘1–⌘9(Win/Linux 為 Ctrl)在 ctx.input 裡又呼叫 ctx.input,egui 的 Context 被鎖兩次, 按住 ⌘(⌘C、⌘V、⌘Tab)視窗就永遠不動;改為只讀一次(bot_jump_key),加回歸測試 - 圖表 x 軸格線固定每 1 一條,縮小後一幀要畫上百萬條(凍結、記憶體爆);改為最多約 40 條, 滾輪不再被圖表吃掉(⌘/Ctrl+滾輪或雙指縮放) - 草稿每打一個字就同步重寫整個 state.json(含 fsync);改為停手 1.5 秒後才存,結尾空白也 不再造成每幀存檔 複製(三個系統) - Mac:pbcopy 從 Finder/Dock 開時沒有 UTF-8 語系,中文變亂碼;指定 UTF-8 - ⌘C 攔截只拿 CopyText,不再丟掉開連結、複製圖片、Linux 中鍵選取等指令(且只在 Mac 攔) - Windows:改用 Win32 剪貼簿(arboard,獨立執行緒),不再走 clip.exe(缺 BOM、多一個 NUL) - Linux:依 WAYLAND_DISPLAY/DISPLAY 選 wl-copy 或 xclip/xsel,都沒有時退回視窗剪貼簿 其他 - 頁面目錄點了不跳(標題位置從未記錄);目錄搜尋框按 Esc 會關掉整頁 - 圖表:單一系列欄名被 String::max 換成「數值」;同尺寸無標題的圖共用縮放;inf/NaN 不入圖 - KPI 卡片寬度未扣內距而超出欄寬 - 「還原上一個答案」在送出新訊息後會插錯位置;重試錯誤回覆不再存可還原的版本 - 手機:長輪詢回來時已切到別的聊天,不再把上一個聊天的訊息畫進來 - 輸入框上方頭像:思考時頭稍微縮小,三顆小球繞著頭轉(後面的從頭後經過、前面的壓在頭上並描邊), 不再被頭像蓋住 - 刪除未使用的 src/app/ui_kit.rs 驗證:macOS cargo test 374 通過(relay 18 通過);Windows/Linux cargo check 通過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:19:59 +00:00
| ⌘F | 側邊欄搜尋(頁面開著時是頁面目錄的搜尋框) |
| ⌘1–⌘9 | 切到側邊欄前九個 Bot(順序和眼睛看到的一樣) |
| ↑ | 輸入框空著時,找回你上一則送出的訊息 |
| Enter | 送出(Bot 工作中時是補充給它) |
| Shift+Enter | 換行 |
用輸入法選字時按 Enter,不會誤送出。
---
## 35. 示範/截圖模式
給檢查用的模式,平常不會用到。
- 啟動時加上截圖選項:畫面跑 120 格後存成圖片,然後自動關閉。
- 這個模式下:
- 用示範資料,不會存檔。
- 不發通知、不跑例行任務、不檢查更新,也不讀管理員鎖定。
- 示範內容:
- 台南兩天一夜行程的對話(先用 Grok,再換 Claude)。
- 研究助理的「AI 新聞早報」例行任務(每個工作日 09:00)。
- 電腦助手正在等你允許整理照片的指令「mkdir -p 2026-04 2026-05 2026-06 && mv IMG_04*.jpg 2026-04/」,並排入一則補充「2026-06 的照片先不要動」。
問題卡、搜尋: the bot asks with a card; every chat is searched; a refusal holds for the turn - 問題卡 (ask_person, src/ask.rs): up to 6 questions on a card above the input, one at a time — a choice (one click moves on), several choices, or a field that arrives filled for the person to correct; 「自己回答」 on every question, 上一題 and 略過. The turn waits; a message typed instead leaves the card unanswered. Travels as an approval of kind Question (questions as JSON) with a new answer Answered, so the window, a screen of another brain and the phone draw the same card. - 搜尋所有聊天 (src/find.rs): the sidebar's search also lists what the person and the bots said in every chat, past conversations included, and attachment names; newest first, 40 at most. A click opens the bot (bringing a past conversation back first), scrolls to the message and lights it for a moment. - 拒絕後停下: a step the person refused is refused for them when it comes back unchanged in the same turn — no second card, no second review — until they write again. - The bot's instructions: stop after a refusal instead of trying another way; before sending, posting, buying or deleting, check the person's own messages asked for exactly that, and ask with the card when they didn't. - 直接操作 no longer answers a hand-off (or a question) on the person's behalf. - The repeated-step check leaves questions to the person alone. - Screenshot views `ask` and `find`; FEATURES.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-12 02:17:32 +00:00
- 可以指定要拍的畫面:聊天、設定(AI 供應商)、Bot 設定、選單、收合的側邊欄、例行任務、設定(電腦)、設定(自動審核)、記憶頁(`memory`)、輸入框的記憶小卡片(`composer`,草稿可以用 `ANYBOT_SHOT_DRAFT` 換)、傳送到其他裝置(`drops`)。也可以把彈出視窗藏起來,單獨檢查每個畫面。問題卡(`ask`,三題:單選、複選、預填的欄位)和搜尋(`find`,要找的字用 `ANYBOT_SHOT_FIND`)也可以拍。
---
## 36. 手機、帳號、雲端主機
原版是「大腦在雲端,手機和電腦是裝置」。AnyBot 的做法如下:
- Bot 的大腦留在 AnyBot 裡,可以放在 Mac 上、一直開著的 Mac mini,或雲端主機。
- 另外有一個很小的「帳號伺服器」(薄後端),負責帳號、轉送、裝置清單、加密備份和推播。
- 架設方式見 `relay/README.md`。
### 手機網頁版
- 打開方式:
- 用帳號伺服器時,打開帳號伺服器的網址,用帳號登入;
- 在同一個網路或 Tailscale 時,打開 `http://這台電腦:8793`,用手機密碼登入。
- 可以「加入主畫面」,像 App 一樣全螢幕打開。顏色、強調色跟電腦版的主題走(淺色、深色)。
- 排版照電腦版的側欄和 Grok Bot 的手機版:一層一層往下點,手機的返回手勢回上一層;選單和表單都從下方彈出。
- 首頁(電腦版的側欄):
- 上面一排捷徑:例行任務、頁面、電腦(線上幾台)、設定;可以搜尋 Bot;
- 分區照電腦版:主要 Bot、已釘選的 Bot、你的分區(照電腦版的順序,空的也顯示)、未分區;分區可以收合;
- 每個 Bot 顯示頭像、最後一句話、工作中/等你決定/排隊中、藍點;
- Bot 的「⋯」(或長按):開啟對話、對話詳細資訊、標示已讀/未讀、釘選、移至分區、設為主要 Bot、重新啟動、刪除;
- 分區的「⋯」:重新命名、刪除分區(裡面的 Bot 回到未分區,不會刪 Bot);
- 右上角「+」:建立 Bot、從範本建立、建立群組聊天、新增分區。
- 聊天(電腦版的對話):
- Markdown、程式碼、表格、生活卡片、頁面卡片;日期分隔;群組標出是誰說的;
- 思考過程和工具步驟可以展開,看得到每步的結果;一輪做完會收起來;
- 訊息下方:複製、重新產生;長按:複製、引用回覆、重新產生、重新送出、表情回應;
- 允許請求卡片:允許一次、一律允許、拒絕,以及「全部允許,之後直接操作」;Bot 需要你接手時有電腦畫面縮圖;
- 輸入:工作中再傳是插話(顯示排隊)、空白時送出鍵變停止、附加照片/檔案(最大 30 MB)、拍照、語音輸入、建議問題;
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- 記憶小卡片(擁有者):打字停 300 ms 後出現在輸入框上方,排成一行可以左右滑,和電腦版一樣預先勾好、點一下加入或拿掉;
- 你的訊息下面有「帶了 N 條記憶」,點開看是哪幾條;
- 上方「⋯」:新對話、過去的對話、清除對話、對話詳細資訊、Bot 設定。
記憶: a page to see it, a few lines picked while typing, a local model The memory had grown into a list carried whole, a top-14 recalled by a trigram index and pasted into the system prompt with the clock, and a page that broke its own layout. Nobody could see what went to the model, the prompt cache missed every message, and 「記住」 kept saying the same thing twice. Rebuilt per the spec (docs/memory.md): - Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per finished turn), 整理過的 (rollup). Each keeps pinned, uses, last_used, deleted, superseded_by, span. state.json keeps the facts as the copy that syncs; the page reads SQLite. - Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table (Traditional text goes through Simplified first), weighted share of query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35). score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked, ≥0.55 carried when nobody chose (3 at most). - What the model gets: the system prompt has the time zone and the pinned memories only, the same every turn. Each person message gets 〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in group_history into a transient Message.context, so the beginning of a chat reads the same next turn (cache hits) and the event log, skills and audit see only what was typed. A memory already carried in view isn't carried again; each carry counts a use. - Picks travel with the message: Cmd::Send / POST send / sync act "memories" (empty = none; absent = the brain chooses, once, saved). - remember finds the like one (cos ≥ 0.85 or the same words) and asks for `replaces`; the old one is superseded, never carried. A fact forgotten and remembered again comes back. New search_memory (query, kind), with dates; read-only. - Nightly on the brain, no model: events past 30 days fold into a line per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars, like with like by words or vectors), weeks past 180 days into months; the folded go to 最近刪除 for 30 days. Facts are never removed. The page offers duplicates, facts unused for half a year, and what can fold now. - Local model: minishlab/potion-multilingual-128M through m2v.rs (same token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without tokenizers' 1.1 GB). Converted while downloading: vocab.bin, table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB; ANYBOT_HF_BASE picks a mirror (now passed into the server's brain container too). Loaded when first needed (34 ms), let go after 10 idle minutes. The brain loads it; a screen only with a document folder set; hands and phones never. 設定 › 一般 › 語意搜尋: 本機模型/Ollama/關閉; a new engine clears every vector. - Three files, three connections: memory.db (backed up nightly, 7 kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db hands its memories and documents over once and shrinks (a real one: 172 MB → 16 KB). docs_search scans every chunk now, vectors cached in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of tombstones over 31 MB of text). - API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads answer on the HTTP thread; writes go through phone_act("memory"). - Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with counts, live search, filters, suggestions, per-item kind/date/uses and pin/edit/forget/restore; chips above the composer 300 ms after typing stops, with a token estimate; 「帶了 N 條記憶」 under person messages. The phone has the same as a 記憶 tab, chips and tag. Checked: make test passes (app 297, relay 16), with new tests for the scores and thresholds, Traditional Chinese segmentation, remember's dedupe and replaces, two turns sending the same beginning, no double carry, weekly/monthly folding and the trash, and the audit.db move. Brain idle 37 MB as before, ~230 MB with the model loaded; search on the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on the way (stats re-taking the lock) is fixed and tested. Docs: docs/memory.md has the whole design; FEATURES.md, protocol, architecture (zh/en), multi-device and install say what changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
- 對話詳細資訊:動態、記憶(只有擁有者)、例行任務、資料庫(頁面、記憶、檔案)、電腦、稽核、成員(群組)。
- 「記憶」分頁和電腦版的記憶頁一樣:統計、搜尋、新增、篩選、整理建議、每條的釘選/編輯/忘記/還原。
- Bot 設定:名稱、說明、指示、外型和顏色、模型、電腦、電腦工具開關、上下文長度、允許規則、釘選、主要 Bot、分區、範例、重新啟動、清除對話、刪除。
- 例行任務:新增、編輯(每天/每週幾/每月、時間)、暫停、立刻執行、刪除。
- 頁面:完整頁面(圖表、Mermaid)、舊版本、複製 Markdown、刪除。
修正卡死: ⌘ 一按視窗就鎖死、圖表縮小凍結、打字每鍵寫檔;複製中文亂碼;頭像不再擋住思考動畫 卡住當機 - ⌘1–⌘9(Win/Linux 為 Ctrl)在 ctx.input 裡又呼叫 ctx.input,egui 的 Context 被鎖兩次, 按住 ⌘(⌘C、⌘V、⌘Tab)視窗就永遠不動;改為只讀一次(bot_jump_key),加回歸測試 - 圖表 x 軸格線固定每 1 一條,縮小後一幀要畫上百萬條(凍結、記憶體爆);改為最多約 40 條, 滾輪不再被圖表吃掉(⌘/Ctrl+滾輪或雙指縮放) - 草稿每打一個字就同步重寫整個 state.json(含 fsync);改為停手 1.5 秒後才存,結尾空白也 不再造成每幀存檔 複製(三個系統) - Mac:pbcopy 從 Finder/Dock 開時沒有 UTF-8 語系,中文變亂碼;指定 UTF-8 - ⌘C 攔截只拿 CopyText,不再丟掉開連結、複製圖片、Linux 中鍵選取等指令(且只在 Mac 攔) - Windows:改用 Win32 剪貼簿(arboard,獨立執行緒),不再走 clip.exe(缺 BOM、多一個 NUL) - Linux:依 WAYLAND_DISPLAY/DISPLAY 選 wl-copy 或 xclip/xsel,都沒有時退回視窗剪貼簿 其他 - 頁面目錄點了不跳(標題位置從未記錄);目錄搜尋框按 Esc 會關掉整頁 - 圖表:單一系列欄名被 String::max 換成「數值」;同尺寸無標題的圖共用縮放;inf/NaN 不入圖 - KPI 卡片寬度未扣內距而超出欄寬 - 「還原上一個答案」在送出新訊息後會插錯位置;重試錯誤回覆不再存可還原的版本 - 手機:長輪詢回來時已切到別的聊天,不再把上一個聊天的訊息畫進來 - 輸入框上方頭像:思考時頭稍微縮小,三顆小球繞著頭轉(後面的從頭後經過、前面的壓在頭上並描邊), 不再被頭像蓋住 - 刪除未使用的 src/app/ui_kit.rs 驗證:macOS cargo test 374 通過(relay 18 通過);Windows/Linux cargo check 通過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:19:59 +00:00
- **聊天檔案預覽**(電腦端渲染,手機只看結果):點檔案卡(上面寫格式、大小)打開預覽頁——
- 圖片由電腦解碼後顯示(TIFF、HEIC 這類手機打不開的也看得到);
- **PDF 逐頁渲染**:一次要一頁(電腦渲染成 JPEG),底下「‹ 上一頁/3 / 12/下一頁 ›」,長檔不會一次載死;
- Markdown/Word/HTML 照頁面排版渲染、純文字和 JSON 等寬字體、試算表每個分頁一張表格;
- 音訊、影片在頁內播放(手機瀏覽器的播放器);其他檔案顯示大小和原因,按「儲存到手機」下載;
- 預覽頁上方永遠有下載鈕;對話詳細資訊的檔案清單也點同一個預覽。
- **接管在 App 內打開**:「接管」「看 Bot 的電腦」不再跳頁,整個接管畫面蓋在 App 上;左上 ✕ 或返回手勢關掉(VNC 連線一起斷),右上 ↗ 可在新分頁開。接管時打字列多 ↑ ↓ 鍵,「接管」按鈕接管中變成黃色。
- 設定(擁有者):
- 一般(主題、強調色、時區、通知、語言)、權限(直接操作、自動審核、允許/詢問規則)、整合(訊息管道、MCP 開關和移除);
- 模型:每個服務是否可以用;可以設定或換 API 金鑰、清除金鑰、新 Bot 預設模型。**金鑰只能寫入**,手機永遠看不到原本的金鑰;
- 電腦:Bot 的電腦的狀態和縮圖、開啟電腦、接管、喚醒、儲存快照、檢查用量、更新、自動更新時間、容器隔離、從快照復原/重設(會先確認)、「請 Bot 提出清理方案」(帶到主要 Bot 的對話,先列出不刪除);
- 保險庫:只說明,不傳任何密碼到手機;
- 手機與帳號:直接連線的手機清單,可以登出別支手機;
- 更新:版本和有沒有新版。
- 看電腦畫面:
- 「Bot 的電腦」每秒更新一次畫面;在休眠時按「叫醒」。
- 「這台 Mac」要先在設定裡打開才會出現。
- 操作方式:點一下是左鍵;長按是右鍵;點兩下是雙擊;「右鍵:開」之後每次點都是右鍵。
- 「⌨︎ 打字」可以打中文,會打進目前的視窗;還有 Enter、Esc、Tab、⌫ 和捲動按鈕。
- 右上角頭像:傳送到其他裝置(只有擁有者有,見下面「傳送到其他裝置」)、通知(開關、要通知哪幾種、送一則測試通知;開關顯示的是帳號伺服器上這支手機的狀態,按下去就照它顯示的開或關——帳號伺服器已經沒有這支手機的訂閱時顯示「關閉中」,打開會重新訂閱;連不上帳號伺服器時照這支手機上的設定,種類和測試等連上再改;直接連線的手機會說明收不到推播;iPhone 要先加入主畫面)、安裝成 App(還沒裝時才有)、切換到別台 AnyBot、登出這支手機。
- 手機做的事都交給電腦版原本的功能處理(同一套規則、同一份資料),不是另外寫一套。
- 團隊(用帳號伺服器分享時)權限跟以前一樣:
- 成員只能聊天和附檔;
- 管理員另外可以核准、停止、看和操作電腦畫面、換模型和電腦、新對話、重新產生,也能看對話詳細資訊、例行任務和頁面;
- 建立、修改、刪除 Bot/例行任務/記憶/頁面/分區,以及設定、金鑰、訊息管道、MCP、登出別支手機、快照和重設電腦,只有擁有者能做(手機上也不會顯示這些按鈕)。
- 畫面更新:手機問「有沒有新東西」會等最多 20 秒,有變化就立刻回來,所以不用一直刷新。
修正卡死: ⌘ 一按視窗就鎖死、圖表縮小凍結、打字每鍵寫檔;複製中文亂碼;頭像不再擋住思考動畫 卡住當機 - ⌘1–⌘9(Win/Linux 為 Ctrl)在 ctx.input 裡又呼叫 ctx.input,egui 的 Context 被鎖兩次, 按住 ⌘(⌘C、⌘V、⌘Tab)視窗就永遠不動;改為只讀一次(bot_jump_key),加回歸測試 - 圖表 x 軸格線固定每 1 一條,縮小後一幀要畫上百萬條(凍結、記憶體爆);改為最多約 40 條, 滾輪不再被圖表吃掉(⌘/Ctrl+滾輪或雙指縮放) - 草稿每打一個字就同步重寫整個 state.json(含 fsync);改為停手 1.5 秒後才存,結尾空白也 不再造成每幀存檔 複製(三個系統) - Mac:pbcopy 從 Finder/Dock 開時沒有 UTF-8 語系,中文變亂碼;指定 UTF-8 - ⌘C 攔截只拿 CopyText,不再丟掉開連結、複製圖片、Linux 中鍵選取等指令(且只在 Mac 攔) - Windows:改用 Win32 剪貼簿(arboard,獨立執行緒),不再走 clip.exe(缺 BOM、多一個 NUL) - Linux:依 WAYLAND_DISPLAY/DISPLAY 選 wl-copy 或 xclip/xsel,都沒有時退回視窗剪貼簿 其他 - 頁面目錄點了不跳(標題位置從未記錄);目錄搜尋框按 Esc 會關掉整頁 - 圖表:單一系列欄名被 String::max 換成「數值」;同尺寸無標題的圖共用縮放;inf/NaN 不入圖 - KPI 卡片寬度未扣內距而超出欄寬 - 「還原上一個答案」在送出新訊息後會插錯位置;重試錯誤回覆不再存可還原的版本 - 手機:長輪詢回來時已切到別的聊天,不再把上一個聊天的訊息畫進來 - 輸入框上方頭像:思考時頭稍微縮小,三顆小球繞著頭轉(後面的從頭後經過、前面的壓在頭上並描邊), 不再被頭像蓋住 - 刪除未使用的 src/app/ui_kit.rs 驗證:macOS cargo test 374 通過(relay 18 通過);Windows/Linux cargo check 通過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:19:59 +00:00
- **單趟同步**:開著對話時,狀態檢查順帶把那個對話的訊息帶回來(手機附上簽名,沒變不重傳):Bot 串流輸出時每趟少一個請求,訊息和側欄狀態永遠同一刻。
### 設定 › 手機與帳號
- **AnyBot 帳號**:
- 填帳號伺服器網址、帳號、密碼,可以順便建立新帳號(有邀請碼時要填)。
- 登入後,這台電腦會拿到自己的金鑰,之後保持連線。顯示「已連線」或錯誤原因。
- 電腦不會保存你的密碼,只保存由密碼算出的備份金鑰。
- 可以設定這台電腦在手機上顯示的名字。
- **備份**:
- 「每天自動備份到帳號」(預設開),也可以按「立刻備份」。
- 備份在這台電腦加密後才上傳,伺服器打不開。
- 「從帳號備份還原」:把這台電腦的 Bot 換成帳號裡最新的備份,這台電腦自己的手機和帳號設定不會被蓋掉。
- **同一個網路直接連**:
- 先設定手機密碼(至少 8 個字),再打開「讓手機直接連這台電腦」。
- 會列出所有可以用的網址,包含 Tailscale 的。
- 換密碼會登出所有手機。密碼錯 5 次要等 1 分鐘。
- **手機可以做什麼**(下面兩項預設關閉):
- 從手機看這台電腦的螢幕並操作;
- 裝置連結:讓帳號裡其他的 AnyBot 操作這台電腦。
- **直接連線的裝置**:列出手機和最近使用時間,可以個別登出。
- **帳號裡的電腦**:列出每台 AnyBot 在線或離線。
### 不開視窗執行(`anybot --serve`)
- `anybot --help`(或 `-h`)印出用法就結束;打錯的 `--` 選項也一樣(說「不認得」,結束碼 2)。以前這兩種都會直接打開視窗,用的是真正的資料夾。macOS 自己傳的單橫線參數不受影響。
- Bot、例行任務、事件觸發、訊息管道和手機網頁照常運作,你用手機操作。
- 可以跑在 Mac 或 Linux。Linux 版已在 Docker 裡編譯並測試過。
- 環境變數:
- `ANYBOT_PHONE_PASSWORD`:設定手機密碼並打開直接連線;
- `ANYBOT_ACCOUNT=網址|帳號` 加上 `ANYBOT_ACCOUNT_PASSWORD`:加入帳號,失敗時每 30 秒重試;
- `ANYBOT_HOST_NAME`:在手機上顯示的名字;
- `ANYBOT_RESTORE_FROM_ACCOUNT=1`:第一次啟動時從帳號備份接手;
- `ANYBOT_DATA_DIR`:資料放哪裡;
- `XAI_API_KEY`、`ANTHROPIC_API_KEY` 等:AI 金鑰。
- 在伺服器上,Bot 的系統指示會說明「你的電腦」指的是伺服器本身。要用你的 Mac,就選帳號裡那台電腦的名字。
- 沒有視窗,所以需要你允許的事會推播到手機。
- 部署檔:
- 雲端:`deploy/server/`(帳號伺服器、Caddy、AnyBot 三合一);
- Mac mini:`deploy/mac/com.anybot.serve.plist`。
- 伺服器的網址(`setup.sh` 會問):
- Tailscale:`https://那台.xxx.ts.net`,只有 Tailscale 裡的裝置連得到;
- 自己的網域:憑證自動申請;
- 區網 IP(例如 `https://10.0.0.25`):憑證由伺服器自己簽(Caddy 的 `tls internal`),只有同一個區網連得到;可以和 Tailscale 一起用。
- 每台裝置先信任一次:打開 `http://那台的IP/anybot-ca.crt` 安裝。
- 電腦上的 AnyBot 連帳號伺服器時,除了內建的公開憑證,也認這台電腦自己信任的憑證(系統的憑證清單),所以裝好憑證後 App 也連得上。
- 還沒信任時,App 會直接說要先安裝並信任伺服器的憑證,不只說「憑證不對」。
### 裝置連結(一台 AnyBot 操作另一台)
- 同一個帳號的另一台 AnyBot 打開「裝置連結」後,會出現在這台 Bot 的電腦清單裡,名字就是那台電腦的名字。
- 可以用的工具:檔案、指令、背景指令、九個螢幕工具,以及 Mac App 工具。
- 權限:
- 看螢幕和操作螢幕,第一次用時各問一次(可以一律允許);
- 指令和改檔案的規則跟 SSH 電腦一樣。
- 詢問會出現在發出動作的那台 AnyBot,也就是手機或那台電腦的視窗。原版是在被操作的那台裝置上詢問。
- 經過帳號伺服器,最多等 35 秒(原版的裝置工具等 30 秒)。
繁體中文、換電腦: what a model writes is put into Traditional Chinese whatever the setting's system; a work folder from another computer lands under this home - 繁體中文: converted at the one place every model call comes back (providers::run_step), decided from the request itself: the setting is 繁體中文, or it follows the system and the person writes Traditional. It used to be on only for the explicit setting, so a brain on an English server with 跟著系統 never converted, whatever the instructions said. Not when another language is chosen, nor when the latest message asks for Simplified. - Converted: the reply, the thinking, and steps whose words are for the person (question card, card, page, memory, routine). Left as written: code blocks and `inline code`, a line of Japanese, file names, commands, searches, recipients. - Taiwan wording after the characters: about 55 one-meaning computer terms (網絡→網路, 文件夾→資料夾, 默認→預設…), and zhconv's OpenCC tables on (设置里的 → 設定裡的). - The reply instruction says it too: no Simplified characters, no mainland wording. - 換電腦: a bot's work folder chosen on one computer (/Users/daniel on a Mac) no longer breaks every file and command step on another (Linux, another user). It is sent as ~/… with the folder as chosen alongside; the receiving computer uses the folder if it is there, else the same place under its own home, else its home. - FEATURES.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-12 02:29:02 +00:00
- **工作資料夾換了電腦也能用**(2026-11-12):Bot 的工作資料夾是在某一台上選的(例如 Mac 的 `/Users/daniel/Documents`),換到另一台系統或使用者名稱不同的電腦(Linux 的家目錄在 `/home/…`)時那個路徑不存在,以前檔案和指令工具會全部失敗在「進入資料夾」那一步,Bot 還會回頭問你要改設定還是換電腦。現在自動處理,不問你:
- 送出去時,家目錄底下的資料夾寫成 `~/…`(`/Users/名字/…`、`/home/名字/…`、`C:\Users\名字\…` 都認得),由對方換成它自己的家目錄;原本的路徑也一起送。
- 收到的那台:原本的路徑在這台真的存在就用它;否則用自己家目錄底下同樣的位置;那裡也沒有,就用家目錄。資料夾不存在不再讓工具失敗(跟沒設資料夾時一樣)。
- 兩邊各做一半:大腦更新後,還沒更新的那台也能用(它本來就認得 `~`);那台更新後,連 `~/…` 底下沒有的資料夾也會退回家目錄。
### 傳送到其他裝置(檔案和文字,任意兩台之間)
不經過聊天、也不經過 Bot,把檔案或一段文字從帳號裡任何一台裝置傳到任何另一台:電腦 → 手機、手機 → 電腦、電腦 → 電腦。
- **從電腦傳**:側邊欄底部名字右邊的「↑」按鈕(滑過顯示「傳送檔案或文字到其他裝置」)打開「傳送到其他裝置」(`shots/drops.png`)。
- 最上面一排是帳號裡的其他裝置:大腦那台、每一台螢幕和手腳電腦、「手機」。離線的寫「· 離線」,一樣可以選。預設選上次用的那台,沒有就選第一台在線上的。
- 把檔案拖到視窗上(這個視窗開著時,拖進來的檔案是要傳送的,不會變成聊天附件),或按「選擇檔案…」。一次可以很多個,各自有進度條。
- 下面一行可以貼一段文字或網址,按「傳送」或 Enter。
- 「最近 7 天」列出帳號裡所有傳送:檔名、大小、「誰 → 誰」和狀態。到了這台的檔案有「顯示」(在 Finder 裡選中它),文字有「複製」,沒送達的有「再試一次」,每一列都能「移除」。
- **從手機傳**:左上頭像選單 ›「傳送到其他裝置」。選裝置,「選擇檔案或照片」(可多選),或貼文字按「傳送文字」。下面同樣是最近 7 天的清單。
- **收到時**
- 電腦:檔案放進「下載/AnyBot」資料夾(同名的會變成「檔名 (2)」),跳系統通知「某某 傳來的」,並響提示音(設定裡開著時)。文字會直接放進剪貼簿,通知寫「已複製到剪貼簿」。沒有視窗的電腦(手腳、伺服器)只存檔,不動剪貼簿。
- 手機:收到推播通知(開了通知的話)。打開「傳送到其他裝置」,檔案按「下載」,文字按「複製」。
- 目的地沒開機也可以傳:大腦先收著,那台一上線就送過去(每 15–20 秒試一次),最多保留 7 天。
- **狀態**:正在交給大腦 N% → 等「某台」開機上線,會自動送達 → 傳送中 N% → 已送達(給手機的:在手機的「傳送」裡可以拿 → 手機已下載);沒送達時紅字寫原因。
- **怎麼走的**(`src/drops.rs`)
- 大腦是中繼站。傳的那台把檔案切成 2 MB 一段交給大腦(一段沒到就從大腦說的位置重傳),大腦存在資料資料夾的 `drops/`,再一段一段推給目的地;連線中斷時從對方已經收到的位置接著傳,不用重來。送達後大腦那份就刪掉。
- 給手機的留在大腦上等手機來拿(4 MB 一段),保留 7 天,期間可以重複下載。
- 單一檔案最大 2 GB(估計值);文字最多 10 萬字。資料夾要先壓縮成一個檔案。
- 檔名只留最後一段、去掉開頭的點,所以不會寫到「下載/AnyBot」以外,也不會變成隱藏檔。收到的檔案不會被打開或執行。
- **誰可以用**
- 只有帳號擁有者(手機)和擁有者自己的電腦。團隊的管理員和成員不行。
- 電腦只收「自己的大腦」推來的東西;不用開「裝置連結」也收得到(它只是把檔案放進下載資料夾,不是操作這台電腦)。
- 對方的 AnyBot 還是舊版時,狀態會寫「某台的 AnyBot 要先更新才收得到」,更新後自動送達。
- **沒登入帳號時**:只有這台電腦和直接連到它的手機(同一個網路、手機密碼登入)可以互傳。
- **Bot 也可以傳**:工具 `send_to_device`(步驟顯示「傳到你的另一台裝置」)。你說「把這個檔傳到我的手機」「放到 Mac mini」時,Bot 從它正在用的電腦(或你指定的那台,別台電腦上的檔案最多 20 MB)拿檔案,交給大腦傳過去。檔案離開電腦的規則和 `send_file` 一樣:工作資料夾外的檔案先問你,機密檔案不傳。只是要把結果交給你時,Bot 仍然用 `send_file` 傳進聊天。
- **驗證過的**(2026-11-11,這台 Mac 上開一個測試用的帳號伺服器、一個大腦、一台手腳)
- 手機(用程式模擬)傳 7.5 MB 到手腳電腦:上傳 0.26 秒,全程 2 秒,內容逐位元組相同;傳文字、傳到大腦自己那台也都到了。
- 手腳電腦關掉時傳:狀態是「等它上線」;重新打開後 39 秒內送達(之後把重試間隔從 30 秒改成 15 秒)。
- 電腦走螢幕的路徑傳 23 MB 到大腦:0.7 秒交完,內容相同;電腦傳給手機,手機分段下載後內容相同。
- 手機網頁在 Chrome(手機尺寸)裡實際操作:傳文字、傳 5 MB 檔案、下載 5.3 MB 的檔案都成功。
- 沒有在真的手機、真的跨網路連線、或很慢的網路上試過;中途斷線續傳只有單元測試(模擬第三段沒到)。
- 測試:`drops::tests::a_file_goes_from_one_computer_to_another_through_a_bad_link`、`the_phone_downloads_and_the_brain_keeps_its_own`、`a_computer_takes_only_what_is_sound`、`remote::tests::sending_between_devices_is_the_owners_and_the_brains`、`drops_ui::tests::a_row_says_where_the_parcel_is`;對著真的帳號伺服器跑:`live_send_from_a_screen`(預設不跑)。
### 團隊(分享給其他帳號)
- 在「設定 › 手機與帳號 › 分享給團隊」輸入對方在帳號伺服器上的帳號,選擇成員或管理員,按「分享」。
- 對方用自己的帳號登入手機網頁版後,會看到「{電腦名稱}({你的帳號} 的)」。
- 成員可以做的事:
- 看 Bot 清單和聊天;
- 傳訊息、附加檔案。
- 成員的限制:
- 看不到電腦畫面的按鈕;
- 不能開始新對話;
- 不能停止;
- 允許請求只會顯示「等擁有者或管理員決定」。
- 管理員可以做的事:除了裝置連結以外,和擁有者一樣。
- 成員傳的訊息前面會加上「【帳號】」,Bot 知道是誰在說話。
- 需要允許時,只通知擁有者和管理員。
- 權限同時由帳號伺服器和 AnyBot 兩邊檢查:AnyBot 依帳號伺服器告訴它的角色,自己再拒絕一次。
### 發布網站
- 有登入帳號時,Bot 多一個 `publish_site` 工具,可以把一個 .html 檔,或一個有 index.html 的資料夾,發布成公開網站。
- 網址是 `帳號伺服器/s/{帳號}-{名稱}/`。
- 用同一個名稱再發布會取代舊的。
- 檔案可以在 Bot 的電腦、你的電腦,或 Bot 自己的資料夾。
- 限制:最多 500 個檔案、25 MB;會略過 `.` 開頭的檔案和 node_modules。
- 每個網站名稱第一次發布時會問你:「把 {路徑} 發布成公開網站「{名稱}」(任何知道網址的人都看得到)」,可以選一律允許。
- 安全:發布的網頁在沙盒裡執行(`Content-Security-Policy: sandbox`),讀不到同一個網址下手機版的登入資料。
- 帳號伺服器設了 `ANYBOT_RELAY_PUBLIC_URL` 時,回給 Bot 的是公開網址。
### 通知
以下情況會推播到所有打開通知的手機:
- Bot 需要你允許時;
- 你不在時 Bot 做完事。
「不在」的意思是:沒開視窗、視窗不在最前面,或 90 秒沒動作。用 `anybot --serve` 時一律推播。
推播內容只有手機解得開(Web Push 加密),點通知會直接打開那個 Bot 的聊天。
### 驗證過的
- 單元測試:手機 API 的登入和權限、帳號伺服器的註冊/登入/轉送/備份、推播加密(用手機那一端的方法解開)和簽章、密碼和加密。
- 真實測試,手機用 curl 和 Chrome(手機尺寸)模擬:
- 透過帳號伺服器傳訊息,Bot 要在電腦上執行指令時,手機核准兩次後完成,結果回到手機;
- 自動備份上傳;
- 兩台不開視窗的 AnyBot 用裝置連結,一台叫另一台執行指令並拿回結果;
- 直接連線:密碼錯被拒、看 Bot 的電腦畫面(1280×800 JPEG)、上傳附件、有變化 2 秒內通知;
- Linux 版在 Docker 裡跟帳號伺服器放在同一個 Docker 網路:帳號建立後自動加入,手機看得到 Bot 和 Bot 的電腦畫面。
- 截圖:`shots/phone.png`、`shots/phone-account.png`、`shots/remote.png`。
- 還沒在真的 iPhone 上試過推播通知(需要你的網域和 HTTPS)。
---
### 連接器市集(設定 › 連接器)
- 8 個常用連接器,按「加入」就能用:
- files:讀寫「文件」資料夾;
- memory:知識圖記憶;
- thinking:循序思考;
- fetch:抓網頁;
- git;
- time;
- playwright:瀏覽器自動化;
- github:官方遠端伺服器。
- 需要金鑰的(github)會把下面的「新增連接器」表單填好,補上 Token 再按「新增」。
- 本機的連接器要先安裝 Node.js(npx)或 uv(uvx)。
- 驗證過的:不用金鑰的 7 個都實際下載、透過 AnyBot 的連接器程式連上。
- 工具數:files 14、memory 9、thinking 1、fetch 1、git 12、time 2、playwright 25。
- 用 time 實際查了台北時間。
- 測試是 `cargo test --release -- --ignored marketplace`。
連接器: a 公用市集 of remote servers from the official MCP Registry, on the computer and the phone - 連接器市集 gets a search box over registry.modelcontextprotocol.io (public, with an API): servers reached by address only (a package would have to run on the brain, which may have no Node or uv); old SSE ones are marked as not yet supported, taken-down ones left out. A name that only says "mcp" (com.notion/mcp) reads as whose it is (notion). - 加入 on the computer fills 新增連接器 and scrolls to it: a free name, the address, and the header with the registry's placeholder ("Authorization: Bearer {smithery_api_key}"), shown unmasked with what to put there (the key's description, an address variable's choices). 新增 stays off while a 「{…}」 is left. - The phone: 設定 › 整合 › 從公用市集加入. The brain searches (the phone's page may only talk to its own server; GET /api/mcp/registry, owner only, on the HTTP thread); a pick asks for the key or the address part and the brain adds it (the 「mcp」 action's new `add`). - A server that answers 401 (or a 403 asking for a login) with no key given now says it signs people in with OAuth, which AnyBot can't do yet; with a key, that the key is wrong or old. - mcpservers.org and the like are pages for people behind a browser check, with no list a program may read, so the market uses the registry. - Checked live: 「notion」 finds 6; AWS Knowledge (no key) connects with 5 tools; Notion's own server (OAuth) gives the OAuth sentence. `cargo test -- --ignored registry_search_live`. - Screenshot mode: ANYBOT_SHOT_MCP=<search> shows the 公用市集 after that search. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 09:12:12 +00:00
- **公用市集**:連接器市集下面有搜尋框,搜官方 MCP Registry(registry.modelcontextprotocol.io,公開、有 API)裡用網址連的連接器。
- 只列用網址連的(Streamable HTTP);要在大腦上跑套件的(npm/PyPI)不列,伺服器上的大腦不一定有 Node.js 或 uv。舊式 SSE 的標「還不支援」;下架的不列。
- 電腦上按「加入」會把「新增連接器」表單填好、捲過去:名稱(重複就加「2」)、網址、標頭(例如「Authorization: Bearer {smithery_api_key}」)。還有「{…}」時標頭不遮起來、下面說要換成什麼(金鑰的說明、網址變數可以填的值),換好之前「新增」按不下去。
- 手機:設定 › 整合 ›「從公用市集加入」,打關鍵字,大腦去搜(手機頁面只能連自己的伺服器);點一個,要金鑰的問金鑰、網址有變數的問變數,再請大腦加上。只有擁有者能用。
- 要登入帳號(OAuth)的連接器 AnyBot 還不支援:連線時伺服器回 401(或要求登入的 403)、又沒填金鑰,狀態會說「這個連接器要先登入帳號(OAuth),AnyBot 還不支援」;有填金鑰的話說金鑰不對或過期了。
- mcpservers.org 這類網站是給人看的頁面,有瀏覽器檢查、沒有給程式讀的清單,所以用官方 Registry。
- 驗證過的:搜「notion」拿到 6 個;實際連上 AWS Knowledge(不用金鑰,5 個工具);Notion 官方(OAuth)顯示上面那句話。測試是 `cargo test -- --ignored registry_search_live`。
- github 要你的 Token,沒有測。
### 專屬號碼、打電話、X(設定 › 訊息管道)
- **簡訊(Twilio)**:
- 填「Account SID:Auth Token」和你的 Twilio 號碼。
- 傳到這個號碼的簡訊會交給 Bot,Bot 從同一個號碼回覆。
- 每 3 秒查一次,不需要公開網址;開始之前收到的簡訊不會回。
- **打電話、傳簡訊**:設好 Twilio 後,Bot 多出兩個工具:
- `place_call`:用你的號碼撥出,以中文語音唸兩次訊息;
- `send_sms`。
- **X**:
- 填使用者存取權杖。
- Bot 會每分鐘查一次提及你的貼文,並用回覆的方式回答,長的會接成串。
- Bot 也可以用 `post_to_x` 發文。
- 打電話、傳簡訊、發文每次都會問你,不能設成一律允許,直接操作模式也一樣:
- 「打電話給 {號碼},唸:「{內容}」」
- 「傳簡訊給…」
- 「用你的帳號在 X 發文…」
- 驗證過的:
- 用假的 Twilio 和 X 伺服器檢查要求的格式:Basic 驗證、表單編碼、TwiML 跳脫、回覆的貼文編號。
- 實際跑過一次完整流程:有人傳簡訊進來,Bot 用簡訊回覆;手機核准後 Bot 打出電話。
- 沒有用真的 Twilio 或 X 帳號試過:需要你申請,而且是付費的。
---
## 37. 字型、語言、設定分類、右側面板
### 字型
design: 一套設計規格(電腦和手機同值)+讀的文字改成 Claude/Notion 的文件樣式 依 Claude 的設計原則:定一套字級並守住、卡片樣式按角色用、重複的元素一致。 - 字型:只留思源黑體(介面)+新加思源宋體(回答、頁面內文和標題,SIL OFL); 拿掉粉圓體和「系統字型」選項、粉圓單一粗細的「粗體畫兩次」補丁;Mermaid 圖改用思源黑體; fonts/OFL.txt 補上思源黑體/宋體的版權 - 規格(theme.rs fs/sp/radius、手機 :root --fs-* --sp-* --r-*):字級 12/13/14/16/18/22/28、 閱讀行高 1.7、間距 4–32、圓角 6/10/14;桌面 253 個寫死字級、166 個寫死圓角換成規格名稱, 手機 167 個字級、79 個圓角、19 個色碼換成變數 - 看守測試:桌面和手機數字要一樣;畫面程式裡不准再寫死字級和圓角,寫死的顏色只准減少(88) - 讀的文字:聊天 16 px 宋體行高 27、頁面同;標題 # 22 / ## 18 / ### 16;表格只有橫細線、 表頭灰色粗體、數字欄靠右;提示框淡底無邊條只有小標上色;程式碼淡底無框;數字卡只留細框 - 頁面視窗:宋體大標題、一行小字資訊、現況當開頭段落、結論是安靜的提示框;目錄收成一行 「▸ 目錄 · N 節」(⌘F 展開);刪除移到左邊,不再貼著「完成」;閱讀欄 680 - 圓餅圖拿掉黑色外圈、字照規格 已驗證: cargo test 518 全過(含排版檢查、規格比對、看守測試;看守測試故意放一個寫死字級確認會擋)、 clippy 21=基線;桌面頁面、聊天、表格原解析度截圖目視;手機 390 px 深淺截圖、node 圖表 65/通知 9 未驗證: 使用者機器上的實際視窗;iOS/Android 實機的宋體備援(手機用系統宋體,沒有就退回 serif)
2026-11-16 13:51:30 +00:00
- 介面用 **思源黑體**(Noto Sans TC),讀的文字(回答、頁面)用 **思源宋體**(Noto Serif TC),都是 SIL OFL 1.1 授權,檔案和授權在 `fonts/`,直接包進 App。
- 它們沒有的字,改用系統字型(蘋方)補上。Mermaid 圖表裡的字也是思源黑體。
- 沒有字型選項(以前的粉圓體和「系統字型」已經拿掉)。Bot 的電腦的桌面也是思源黑體(第 14 版起)。
### 語言(跟原版一樣:「選擇 Grok Bot 選單和訊息使用的語言」)
- 可選「自動偵測」(跟 Mac 的語言),或原版同一份 37 種語言清單(原版程式裡的語言表)。
- **選單**:
- 繁體中文:原文。
- 简体中文:全部由 macOS 內建轉換產生。
- English、日本語:翻譯了約 370 個常見字串(側邊欄、聊天頂部、輸入框、右側面板、整個設定頁);較少見的訊息仍是中文。
- 其他語言:選單用英文。
- **Bot 回答**:在指示最後加上「一律用 {語言} 回答」,37 種都適用。
- **回答的語言,三層**(2026-11-12 重做):
1. **指示裡一句**:「一律用 {語言} 回答」。對話一長,這句離模型要回答的地方很遠,容易被蓋過去。
2. **每則訊息後面再說一次**(主要靠這層):你每一則訊息的尾端、「送出時間」那幾行的最後,加上要用的語言——繁體中文是「〔用繁體中文和台灣用語回答,不要用簡體字〕」,简体中文是「〔用简体中文回答〕」,其他語言是「〔Answer in Japanese (日本語)〕」這樣。37 種都有,用語也由模型自己寫對(網路、資料夾),不靠對照表。
- 「自動偵測」時:那則訊息是繁體中文才加(模型自己最常弄錯的就是這個),其他語言不加,模型照你用的語言回答。
- 那則訊息要簡體時(「翻成簡體」)不加。
- 只由設定和那則訊息本身決定,所以同一段對話每回合送出去的內容都一樣(模型的快取不受影響);改語言設定後第一回合會重讀一次。
3. **保險:字的轉換,只管繁體中文**。有些模型(Qwen、Grok,或剛讀過簡體網頁時)還是會漏幾個簡體字,所以模型寫給你看的字,在每一次模型呼叫回來的地方(聊天、摘要、目標檢查…同一個出口)用整套字表轉成繁體。只轉字,沒有手寫的用語表;本來就對的字不動(「台」不會變「臺」,「了解」不會變「瞭解」)。
- 什麼時候轉:語言設「繁體中文」時一律轉;設「自動偵測」時看你怎麼寫——你最近的訊息是繁體就轉,是簡體就不轉,看不出來(只有「你好」這種兩邊都一樣的字,或沒有中文)就照系統語言,不是簡體中文就轉。以前只有設「繁體中文」才轉,而伺服器上的大腦系統語言是英文,「自動偵測」等於完全不轉。
- 什麼時候不轉:語言設成简体中文或其他語言;或你最新一則訊息要簡體,只那一次。說「不要再出簡體」「為什麼一直出簡體」不算要簡體。
- 轉哪些:回覆、思考過程,以及給你看的步驟內容(問題卡、生活卡片、頁面、記住的事、例行任務的名稱和任務)。不轉:檔名、指令、搜尋的字、收件人。
- 不動的地方:程式碼區塊和 `反引號裡的字`(檔案可能真的叫「文档.txt」);有假名的那一行(你要的日文翻譯,「学校」不會變「學校」)。
- 已知的限制:字表偶爾分不出同一個簡體字的兩種繁體(「设置里的」的「里」);這種靠第 2 層讓模型一開始就寫對。
### 設定的分類(照原版)
- 原版共 7 個分頁:一般、整合、電腦、權限、保險庫、用量與帳單、更新。
- AnyBot 用「模型」(你自己的 AI 金鑰)取代「用量與帳單」,每個分頁都有圖示:
- **一般**:
- 帳戶(手機、帳號、團隊、備份,按「管理」進去)
- 外觀(主題、強調色、字型、語言)
- 通知
- Bot(時區)
- 系統(資料位置)
- **模型**:AI 供應商和金鑰。
- **整合**:訊息管道、連接器、連接器市集、技能。
- **電腦**:
- Bot 的電腦
- 在這台電腦上執行
- macOS 權限
- 示範教學
- 其他電腦(SSH)
- 瀏覽器設定檔
- **權限**:直接操作、自動審核、「無需詢問直接允許」和「一律詢問」規則。
- **保險庫**:登入資料。
- **更新**:版本、自動更新、重新啟動。
- 每一項設定都是同一種排法:左邊是名稱加一行說明,右邊是開關或按鈕。
### 聊天頂部和右側面板(照原版實際畫面)
這部分是打開原版 Grok Bot,用 Chrome 偵錯介面截圖並量了尺寸,照著做的(比對圖:`shots/panel-vs-original.png`)。
- **頂部**:沒有標題列。
- 中間:一顆圓角膠囊,裡面是 Bot 頭像和名字,寬度跟名字一樣,高 40。點它打開或關閉「對話詳細資訊」。
- 右邊:
- 「分享」膠囊按鈕,36 高、1 px 淡邊框(匯出 Bot 檔案);
- 「⋯」圓鈕(Bot 選單);
- 有請求時多一顆「● 需要你允許」。
- **輸入框**:右邊有「發起語音聊天」圓鈕,用 Bot 的顏色加聲波圖示,通話中變成紅色停止鈕。
- **對話詳細資訊**(右側面板,寬 280):
- 從上到下:
- 右上角 36 px 圓形 ✕;
- 96 px Bot 頭像(點了編輯 Bot)和名字;
- 兩個小分頁「動態|資料庫」。
- 卡片樣式:圓角 12、1 px 淡邊框、內距 4。每列 36 高:圖示 + 文字 + 「›」。分區標題 13 px,淡色。
- **動態**:
- 進行中:只有工作中或等你允許時才出現,可以停止或打開請求。
- 建議:
- 新增至 Slack:打開 設定 › 整合;
- 建立例行工作:在輸入框預填「幫我建立一個例行任務:」;
- 加入會議:開始或結束錄會議。
- 例行任務:有的時候才出現,點了打開管理視窗。
- 電腦:
- 「Bot 的電腦」和狀態(執行中/休眠中),右邊是**它螢幕的即時縮圖**(`shots/computer-card.png`)。
- 執行中每 3 秒更新縮圖,綠點表示開著。拍縮圖不會把電腦叫醒。
- 休眠時顯示最後一張畫面(變暗),每 30 秒檢查一次。
- 點了打開「Bot 的電腦」視窗,看完整畫面,也可以取得控制權。休眠中會先叫醒。
- 成員:只有群組才有。
- 語音聊天:
fix: 選聲音改成一個選單;搜尋框不再搶走輸入框的游標;側欄選中的 Bot 拿掉左邊色條 - 聲音(對話詳細資訊 › 語音聊天、設定 › 語音 › 說):原本是「聲音」字+「載入聲音清單」鈕+要自己打代號的框,載入後又多一個不顯示目前選擇的「選一個…」。現在和速度、語言一樣是一列一個選單:第一項「預設(eve)」,下面是服務的聲音(ElevenLabs 顯示名字),選了試唸一句;清單在那一列出現時就拿(每種「說」設定一次)。拿不到時選單裡寫一行原因,可以直接輸入名稱或「再試一次」。 - egui 的選單停在打開時的高度,清單或錯誤後來才到時下面被切掉:內容到了就在選單畫出前清掉它記住的大小,重新量一次。 - 語音服務的錯誤不再貼原始 JSON:金鑰被拒(含 xAI 用 400 回的)只說「不接受這把金鑰」,其他取服務回的 message。各服務不選時用的聲音集中在 speech::usual_voice。 - 側欄搜尋:搜尋框開著而且是空的時候,每一格都把游標拿回去,點輸入框打字的字會跑進搜尋框。改成只在按 🔍(下一格)或 ⌘F 時給一次。 - 側欄選中的 Bot 不再有強調色細條,只有淺底(比滑過深一階)。 已驗證:cargo test --bin anybot 525 通過(新增 a_refusal_reads_as_words_not_json、each_service_says_which_voice_it_uses_unasked);截圖:面板與設定的聲音選單(載入中打開、載入後打開都看得到輸入框和「再試一次」)、打開搜尋後點輸入框打「你好」留在輸入框、按 🔍 直接打「台南」進搜尋框、選中列沒有色條。 未驗證:用真的 xAI/ElevenLabs 金鑰載入清單和試唸。
2026-11-16 15:37:38 +00:00
- 聲音:和速度、語言一樣是一列,右邊是選單(「預設(…)」或服務列出的聲音,選了會試唸一句;見「語音設定」);
- 速度:0.75x–2x;
- 語言:自動偵測、中文、English 等,用來轉文字;
- 朗讀每個回答。
- 語音、速度、語言每個 Bot 各自記住,通話和朗讀都會用。
- **資料庫**:
- 列出這個對話的檔案,包括附件和 Bot 打開給你看的檔案,依時間分成「本週」「更早」。
- 每組先列 5 個,可以「展開」。
- 圖示依種類:試算表、影片、圖片、文件。
- 名字太長時保留副檔名,例如「orders_….xlsx」。
- 點了打開檔案。
### 對話內容(照原版實際畫面)
比對圖:`shots/chat-vs-original.png`。
- **Bot 的回答**:
- 灰色泡泡(深色 #212121、淺色 #F1F1F1),靠左,文字由左往右排。
- 沒有頭像、沒有模型名稱,也不列出工具步驟。每次回答是一個泡泡。
- **你的訊息**:照「聊天的顏色」(預設淡灰、黑字;「跟著 Bot」時是 Bot 顏色)的泡泡,靠右,寬度跟著字數;換行時文字一樣由左往右。
- **日期**:兩則訊息隔 30 分鐘以上或跨天時,中間顯示「11月2日週一 上午9:50」,今天只顯示時間。
- **滑過訊息**:泡泡旁出現三個小鈕。
- Bot 的訊息:表情回應(6 個常用加 24 個更多)、回覆(引用到下一則)、⋯。
- ⋯ 裡有:複製、重新產生、顯示步驟(N)、模型名稱。
- 「顯示步驟」會展開這次回答的思考過程和每個工具步驟,滑過步驟會顯示結果。
- 你的訊息:回覆和 ⋯(複製)。
- **AI 也會按表情**:Bot 有 `react` 工具,可以在你最新的訊息按 ❤️、👍、😂、🎉、👀 等,顯示在你的泡泡下面。
- **工作中**:
- 對話最後是一個不停轉的圓環,加上一句有光掃過的狀態,**說它現在在做什麼**,做的事換了字就跟著換:
- 每個工具都有自己的說法,能短短帶到在做什麼就帶(超過 24 字用「…」):「正在搜尋網頁:台北 明天 天氣」(網址是 Google、Bing、DuckDuckGo、Yahoo、百度、Brave 或「…/search?q=…」的搜尋)、「正在打開網頁:github.com」、「正在讀取網頁:example.com」、「正在執行指令:cargo test」、「正在讀取檔案:main.rs」、「正在讀技能:pptx」、「正在用連接器:notion」、「正在翻記憶」、「正在寄出郵件」……
- 操作畫面:「正在看螢幕」「正在點擊」「正在打開 Safari」;在別台電腦上就說是哪台:「正在「Mac mini」上打字」。
- 沒有步驟在跑時,每 3 秒換一句:還沒動手前「正在思考/正在琢磨/正在整理思緒」;做過步驟後「正在看剛才的結果/正在想下一步/正在確認進度」;開始寫回答後「正在寫回覆/正在整理回答」。
- 等你:「需要你的輸入」。樣式不變(同一個圓環和掃光)。大腦的螢幕也一樣(照同步過來的聊天說)。
- 原版的動畫時間:
- 圓環每 1.2 秒轉一圈;
- 文字上的光每 1.4 秒掃過一次;
- 新訊息 240 ms 淡入並往上浮;
- 表情回應 500 ms 彈出,帶一點回彈。
- **檔案**:
- Bot 用 `send_file` 把做好的檔案傳進聊天,你附加的檔案也一樣,顯示成檔案卡片:圖示依種類(試算表綠色、Markdown 紫色、網頁橘色、PDF 紅色、圖片、影片)、檔名(太長時保留副檔名)、大小。
- 點卡片打開預覽(`shots/file-preview.png`):
- 上面是檔名和「22 列」,右上角有「用其他 App 打開」、下載、關閉。
- Excel(xlsx/xls/ods)和 CSV:表格,有列號和標題列,欄寬跟內容走,太長的格子滑過看全文,多個工作表可以切換。
- Markdown:排好版顯示。
- 網頁:「在瀏覽器開啟」,加上網頁的文字。
- 圖片:直接顯示。
- PDF、Word:顯示文字。
- 程式碼、文字:等寬字。
- 卡片(天氣、機票等)照舊顯示在回答下面。
- 深色主題改成原版量到的顏色:聊天背景 #131313、側欄 #101010、卡片 #1F1F1F。
### 左側欄、輸入框、頭像動畫、啟動動畫(照原版)
比對圖:`shots/app-vs-original.png`。
- **左側欄**:
- 右上兩顆 36 px 圓鈕:搜尋(點了才出現搜尋框)和新 Bot(右鍵可以從範本或建群組)。
- 主要 Bot 單獨在最上面:大頭像、右下角橘色★、名字。
- 其他 Bot 照**群組**分:
- + › 新增群組,建立後馬上可以打名字。
- 把 Bot **拖**到別的群組(拖動時目標群組亮框,`shots/sidebar-drag.png`),或用 Bot 選單 › 移到群組。
- 群組標題按右鍵可以重新命名、刪除群組(裡面的 Bot 移到未分區);雙擊標題也能改名。
- 空的群組會留著,顯示「把 Bot 拖進來」;沒分群組的 Bot 在「未分區」。
- 每列 54 px、圓角 12、40 px 頭像、名字 15 px、最後一句 13 px;未讀是藍點,等你允許是強調色的點。
- 最下面是你(縮寫頭像和名字,點了打開設定),右邊是「傳送到其他裝置」(↑,第 36 節)和連接器市集(打開 設定 › 整合,直接捲到市集)。這一列固定在側欄底部,不會被切到。
- + 選單:新增 Bot、新增群組、群組聊天、從範本建立。
- 驗證過的:用模擬點擊確認帳號列、市集鈕、+ 選單、群組右鍵都有反應(`shots/sidebar-clicks.png`),也模擬了拖拉。
- **輸入框**:
- 一條 44 px 的膠囊:+、文字、麥克風,最右邊是 Bot 顏色的圓鈕。空白時是語音聊天,有字時變成 ↑ 送出,工作中而且沒字時是停止。
- + 選單:附加檔案、教它一項任務(直接開始錄示範),以及 AnyBot 的模型選擇。
- 下面不再有提示文字。
- **選單**(照原版,`shots/menu-vs-original.png`):
- 寬 200、圓角 16、每列 32 高、左邊 16 px 圖示、14 px 字。
- 分組之間有細線,「刪除」是紅字加垃圾桶,有下一層的列右邊有「›」。
- Bot 選單:釘選、移至 ›、標示為未讀、設為主要|編輯、開始新對話、過去的對話 ›、錄會議|分享與匯出 ›(匯出 Bot、匯出文字記錄、匯入、複製 ID)|重新啟動、清除、刪除。
- 群組選單:重新命名、上移、下移|刪除。
- 訊息 ⋯:複製、回覆、重新產生、顯示步驟。
- + 選單和模型選擇也是同一種樣式。
- **在對話裡叫 Bot 分群組**:Bot 有 create_group、move_to_group、rename_group、delete_group 工具。例如「建立文宣組,把文案企劃、網研探子、美術設計放進去」。
- **頭像動畫**(照原版頭像引擎的參數):
- 側欄、頂部名字膠囊、右側面板的頭像,都會轉向滑鼠,平滑度和原版一樣(每 1/60 秒追 14%)。
- 每 2.5–6.5 秒眨一次眼(0.18 秒)。
- 點一下 Bot 會彈一下(0.62 秒,先壓扁再拉長)。
- 每個狀態用眼睛表達:平常跟著滑鼠;工作中眼睛慢慢左右掃,像在看東西;等你允許時抬頭看你;做完點個頭(0.5 秒)。不再轉圈、不再有繞圈的小點,所以不會閃。
- 頭像只佔格子的 84%,四周留一點空間。
- **啟動動畫**(`shots/launch-animation.png`):打開 AnyBot 時,主要 Bot 的頭像在畫面中間長大、往左右看一眼、彈一下,名字淡入;1.6 秒後整個淡出到主畫面。動畫進行中點擊不會誤觸。
- **滑過訊息的選單**:表情、⋯ 打開後,即使滑鼠移到選單上,按鈕也不會消失,選單點得到了。
### 視窗大小
- 拉動視窗時,內容會跟著調整:
- 聊天欄寬度跟著視窗變化。
- 頂部的 Bot 名稱和描述太長時用「…」截掉,按鈕不會被擠掉。
- 右側面板在空間夠時並排顯示(寬 280–340 px)。不夠時改成浮在聊天上面,聊天欄不會被擠到看不見。
- 設定和其他對話框不會比視窗寬,左邊的分頁清單也會跟著變窄。
- 一排放不下的選項(例如新增管道的種類)會自動換行。
- 驗證過的:在 680×520(最小)、1000×680、1600×1000 截圖檢查。截圖在 `shots/resize.png`、`shots/narrow.png`、`shots/languages.png`、`shots/panel.png`、`shots/settings.png`。
---
## 37a. 圖示、群組、檔案預覽、跨平台
**圖示**:全部改用 Lucide 圖示(ISC 授權,`icons/lucide/*.svg`,用 resvg 畫成貼圖)。介面和手機網頁版都不再用 emoji 當圖示;只有使用者自己按的表情反應保留 emoji。
**群組**:左側欄群組可以收合(點標題),可以從「⋯」或右鍵選「重新命名 / 上移 / 下移 / 刪除」。Bot 在聊天裡也能用工具 create_group、move_to_group、rename_group、delete_group 管理群組。
**檔案預覽**:和原版一樣分成 11 類(依原版 main-core.cjs 的副檔名表 zc())。
| 類型 | 副檔名 | AnyBot 怎麼顯示 |
|---|---|---|
| 圖片 | png jpg gif webp bmp tiff ico svg(avif heic:macOS 用 sips) | 直接顯示 |
| PDF | pdf | hayro 把每一頁畫出來(最多 300 頁);Bot 讀文字用 pdftotext,沒有就用 pdf-extract |
| 表格 | csv tsv xlsx xls xlsm xlsb ods | 有列號的表格、多個工作表 |
| Word | docx | 直接讀 XML 轉成標題、清單、表格、粗體 |
| Markdown | md markdown mdx | 標題、清單、表格、引言、程式碼 |
| 網頁 | html htm | 轉成有結構的內容,加「在瀏覽器開啟」 |
| JSON | json | 排整齊的文字 |
| 文字和程式碼 | 原版那份 80 多種副檔名的清單,再加上 Dockerfile 等 | 等寬字 |
| 音訊 | mp3 m4a aac wav flac ogg aiff caf(opus:先用 ffmpeg 轉檔) | 在 AnyBot 裡播放、暫停、拖進度 |
| 影片 | mp4 mov m4v webm ogv mkv avi | 第一格畫面(用 ffmpeg 擷取)+播放鍵,用電腦的播放器播 |
| 其他 | | 「用其他 App 打開」 |
用 `ANYBOT_FIXTURES=<資料夾> cargo test --release fixtures -- --ignored --nocapture` 可以一次打開資料夾裡每個檔案,檢查有沒有哪個打不開。截圖模式可以用 `ANYBOT_SHOT_VIEW=fileview ANYBOT_SHOT_FILE=<檔案>` 預覽任何檔案。
**跨平台**:AnyBot 現在在 macOS 和 Linux 上都能完整使用,之後還要支援 Windows。
- 檔案預覽全部用純 Rust 寫,三個平台都能用:hayro、rodio、image、resvg、zip、pdf-extract。
- 打開檔案或網址統一用 `preview::system_open`;「在 Finder 中顯示」統一用 `preview::reveal`。
- 介面和 Bot 說明裡的「這台 Mac」「this Mac」,在 Linux 上會統一換成「這台電腦」(`platform::localize`)。
| 功能 | macOS | Linux |
|---|---|---|
| 看螢幕、點擊、打字、捲動、拖曳(computer_use) | CoreGraphics | 三種桌面自動判斷(`desk.rs`):<br>• X11(x11rb:GetImage 截圖、XTEST 模擬輸入;中文是暫時把字放到一個空按鍵上打出來)<br>• Wayland wlroots 系(sway、Hyprland…,`wl.rs`):wlr-screencopy 截圖、虛擬滑鼠、虛擬鍵盤(自帶鍵盤配置,中文直接打);不用另外允許<br>• Wayland GNOME / KDE(`portal.rs`):遠端桌面 portal 操作、截圖 portal 看畫面。第一次會跳出「遠端桌面」視窗,要打開「允許遠端操作」再按「分享」;GNOME 另會問一次「允許截圖」。portal 第 2 版以上會記住答案。中文經剪貼簿(wl-copy)+ Ctrl+V 貼上 |
| 錄製示範 | CGEventTap | X11 RECORD(Wayland 不讓 App 看別的 App 的輸入,所以只有 Xorg 工作階段能錄) |
| 語音輸入、通話 | AVAudioRecorder | cpal 錄成 WAV(自己判斷有沒有在說話) |
| 唸出回答 | say | espeak-ng |
| 登入資料保險庫 | 鑰匙圈(security) | 系統鑰匙圈(secret-tool:GNOME Keyring / KWallet) |
| 通知 | display notification | notify-send |
| 閒置、鎖定、螢幕保護 | ioreg、pgrep | X11 螢幕保護擴充;Wayland 用 Mutter IdleMonitor(GNOME)或 ext-idle-notify;loginctl |
| 選檔案、存檔視窗 | Finder 對話框 | zenity / kdialog |
| 貼上剪貼簿圖片 | NSPasteboard | xclip / wl-paste |
| 簡體中文介面 | CFStringTransform | zhconv |
| 系統語言、電腦名稱、網路位址 | defaults、scutil、ifconfig | LANG、hostnamectl、ip |
| AnyBot 自己的瀏覽器 | /Applications 裡的 Chrome 等 | /usr/bin、/opt、Snap、Flatpak 裡的 Chrome、Chromium、Brave、Edge |
| Bot 的電腦(Docker) | OrbStack / Docker Desktop | Docker Engine;代理伺服器只接受本機和 Docker 網路的連線 |
**Linux 還不能做的**:
- **Wayland 上錄製示範**:系統不允許,要錄請改選 Xorg 工作階段。
- **Wayland 上「哪個視窗在滑鼠下」**:Wayland 不告訴 App 其他視窗的位置,所以權限提示會寫「目前的 App」。
- **讀你自己瀏覽器的分頁**:Mac 上是透過輔助使用讀的,Linux 改用 AnyBot 自己的瀏覽器設定檔。
- **Mac App 工具**:郵件、行事曆、備忘錄、訊息,只有 Mac 有。
- **在背景點擊、不把視窗拉到前面**:Linux 上會改成一般點擊。
**安裝和測試**:
- `deploy/linux/install.sh`:安裝到 ~/.local,包括選單項目和圖示。加上 `--deps` 會順便安裝系統套件,支援 apt、dnf、pacman。
- `deploy/linux/dev/test.sh`:在 Mac 上用 Docker 裡的 Linux 和虛擬螢幕測試。會跑:
- 全部單元測試;
- 實際操作畫面和錄製示範;
- 鑰匙圈存、讀、刪;
- Wayland(無頭 sway):截圖、點擊、中文打字、快捷鍵、捲動(`wayland_live.sh`);
- 視窗截圖。
- `deploy/linux/dev/gnome/test.sh`:無頭 GNOME 43(Wayland)測 portal 路線:沒開「允許遠端操作」時的提示、英文+中文打進文字框、精準點到小按鈕。測試腳本 `op.py` 扮演使用者回答系統視窗。
- 測試用的指令:
- `anybot --tool <工具> <JSON> …`:直接跑操作電腦的工具;
- `anybot --write-icon out.png 256`:輸出 App 圖示。
## 38. 還沒做的功能
| 功能 | 為什麼 |
|---|---|
| 原版伺服器端的提示詞和模型路由 | 不在 App 裡,拆不到;AnyBot 用自己的系統指示(第 33 節) |
| 邊說邊插話的即時語音 | 原版用 xAI 即時語音服務;AnyBot 的通話模式是輪流說話 |
| 帳單、方案 | 不需要:AnyBot 用你自己的 AI 金鑰 |
| 代你購物與付款 | 刻意不做:會動到你的錢和卡片 |
| 原生 iPhone/Android App | 用手機網頁版,可加到主畫面、收推播通知 |
## 多台電腦:大腦、手腳、螢幕(2026-11-04)
- 帳號裡一台 AnyBot 當大腦(Bot、聊天、記憶、排程都在它上面),其他有視窗的電腦當螢幕(看到、改的都是大腦的 Bot),沒有螢幕的電腦當手腳;同一個帳號的電腦之間即時同步。
- 每台 AnyBot 和帳號伺服器之間保持一條長連線(WebSocket),斷了自動接回;連不到時畫面說明是哪一段。
- 「加一台電腦」給一行 `anybot setup 網址 配對碼`,新電腦不用密碼就接成那個大腦的手腳。
- 看不到圖片的模型:你帳號裡看得到圖的模型會先描述圖片(看圖小幫手)。
- 詳細說明:docs/multi-device.md;技術細節:docs/architecture.md、docs/protocol.md。
## 側邊欄:釘選與分區(照原版重做,2026-11-04)
- 釘選的 Bot 放在最上面的大頭像格子裡(主要 Bot 第一個,有星星)。一排最多兩個:只有一個時放中間,兩個左右排,單數時最後一個自己一排、放中間;側邊欄拉多寬都一樣(很窄時一排一個)。右鍵「釘選/取消釘選」,或把 Bot 拖進格子(第一次拖時出現「拖曳到此處以釘選」);格子內可拖曳排序;拖到分區會取消釘選並移過去。
- 分區:Bot 右鍵「移至 ▸」列出所有分區(含未分區,✓ 目前的)和「建立分區」;還沒有分區時是「移至新分區」。新分區放最上面,名字「新增分區」並直接進入改名(Enter/點別處儲存,Esc 取消)。
- 分區標題右鍵(或 ⋯):重新命名、上移、下移、刪除;未分區只有上移/下移。刪除會先確認「其中的 Bot 會移至 未分區,不會刪除任何 Bot。」只有一個清單時,「Bot」標題右鍵可「建立分區」。
## 對話的 Markdown 與流程圖(2026-11-04)
- 以 pulldown-cmark 解析(表格、刪除線、待辦清單、數學區塊):思源宋體 16 px、標題 22/18/16 px、單一換行照樣換行、粗體(思源宋體的真粗體)、斜體、刪除線、行內程式碼、可點的連結、多層清單、待辦勾選框、引用線、表格(可橫向捲動)、分隔線。
- 程式碼區塊:圓角邊框、上色(註解、字串、數字、關鍵字)、可橫向捲動、滑過時右上角「複製程式碼」,複製後兩秒顯示勾。
- ```mermaid:用純 Rust 的 mermaid-rs-renderer 畫成圖(流程圖、時序圖、類別圖、狀態圖、ER、甘特圖、圓餅圖、心智圖、時間軸…),中文用思源黑體,跟著深淺色主題。回覆還在產生時先顯示原始碼,結束後才畫。點圖可放大檢視(縮放、拖曳、下載 PNG 到「下載項目」)。畫不出來時顯示「無法顯示此圖表」並保留原始碼。
## 其他(2026-11-04)
- **OpenCode Go 供應商**:設定 → 模型 選「OpenCode Go」,貼上 opencode.ai Console 的 Go 金鑰。依官方模型清單自動決定每個模型用 OpenAI 格式(/openai/v1)或 Anthropic 格式(/anthropic/v1);每個 Bot 的對話帶固定的 x-opencode-session。
- **看不到圖片的模型**:模型回「不能收圖片」(例如「At most 0 image(s)」)時,AnyBot 記住這個模型,立刻改成不附圖片重試,截圖的位置換成文字說明,Bot 不會再卡住。