Commit Graph

171 Commits

Author SHA1 Message Date
王性驊 9390b70fe7 feat: /plan 先規劃再動手、聊天裡請 Bot 管理連接器、/always-approve 一律放行;輸入框上方的狀態不再破版
/plan(照 Claude Code 的 plan mode、Cursor 的 Plan Mode、Codex 的 update_plan)
- 「/plan 要做的事」:這一輪只給會看的工具(讀檔、搜尋、web_fetch、瀏覽器的打開/讀取/捲動、截圖、anybot_guide、問題卡),在執行那一層擋下其他步驟(回「計畫還沒核准」),不是只靠提示詞。
- Bot 用 submit_plan 交計畫:聊天裡一張「計畫」卡(摘要、步驟、怎麼確認做對了、注意),下面的問題卡「照這個計畫做嗎?」:開始照計畫做/先不要/打字寫要改哪裡。
- 核准後同一輪接著做:工具全開、系統指示換成照計畫做,第 1 步自動進行中;update_plan 每做完一步更新一次(整份清單、只有一步進行中),卡上打勾、輸入框上方「照計畫做 · 2/6 · 這一步」;全部做完留「計畫完成」那一行。
- 「/plan」看狀態、「/plan clear」取消;例行任務、訊息管道、團隊成員的訊息不受影響;群組不能用;支線不帶計畫;清除聊天或新對話一起清;分享 Bot 檔不含。手機:計畫卡、計畫列、取消計畫。
- 新功能地圖 plan.md;研究(Claude Code、Codex、Cursor、Gemini CLI…)的結論寫進提示:只寫建議的做法、通常 3 到 7 步、問題最多 3 題、打勾不要太勤。

聊天裡管理連接器(設定能做的聊天也要能做)
- 新工具 manage_connectors(管理 App 能力):list、add、update(含開關)、reconnect、remove。改的就是大腦上 設定 › 整合 › 連接器 那一份,不會寫到手腳電腦的檔案(進化之神之前叫使用者去 nobledesktop 的 ~/.local/share/AnyBot 設)。
- 新增、修改、移除先跳卡片:指令(在大腦上執行)或網址、環境變數、標頭;TOKEN、KEY、SECRET、PASS、AUTH… 和密碼顯示「••••(已填)」。名稱重複、command 和 url 都給、網址不對、還有「{…}」、沒東西可改,在問之前就回給 Bot。
- 加好後等它連上(最多 90 秒)再回報幾個工具或原因;一輪裡連接器的工具變了,下一步起就換新(加完同一輪就能用)。

/always-approve(也可以 /yolo)
- 使用者自己打(電腦、大腦的螢幕、手機的擁有者)或 設定 › 權限 ›「一律放行」:打開直接操作,之後所有要等「允許」的都自動允許(含一律詢問規則、付款/傳送/刪除的點擊、寄信、傳訊息、打電話、發文、保險庫卡片),自動審核略過;打開時在等的卡片一起放行。
- 照樣擋:安全規則一律拒絕的;別人傳來的訊息那一輪;問題卡、需要處理、計畫卡。Bot、例行任務、訊息管道打不開;管理員和成員打的變成「【名字】/always-approve」。管理員鎖了直接操作就打不開。
- 開著時每個聊天輸入框上方一條「一律放行」和「關閉」;「/always-approve off」關掉,直接操作是它打開的就一起關。

輸入框上方的狀態
- 好幾行的狀態(模型忙碌重試:錯誤、說明、幾秒後重試)以前疊出那一列、壓到輸入框;現在一行:「模型供應商目前負載過高,15 秒後重試(第 3 次,共 3 次)…」。

已驗證:cargo test 548 通過、1 個失敗(layout_audit 的 設定 › 電腦 被這台 Mac 的 Docker 位址 unix:///Users/daniel/.lima/anybot-gvisor 撐寬;把這次的改動 stash 掉一樣失敗,跟這次無關)。新測試:plan:: 7 個;agent 的計畫模式三個(只看到卡片說開始、先不要什麼都不做、修改後重交);app 的 /plan 從打字到計畫完成、Bot 從聊天加連接器(卡片不露 Token、同一輪就用它的工具算出 sum=5)、/always-approve(之前會問、之後不問直接在這台跑、陌生人的訊息照樣問、off 回原樣);mcp::manage_tests 4 個;狀態一行。截圖看過:計畫卡等你決定/照著做打勾、503 重試那一行。手機頁面 JS 語法檢查和計畫卡四種狀態的 HTML。
未驗證:真的模型走一次 /plan 和加 GitLab 連接器;手機實機;伺服器上的大腦(要 make update-server)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:55:37 +08:00
王性驊 dbc3197f6a fix: 頁面的數字卡不再把視窗撐出標題列(× 跑到中間);所有對話框都不會被內容撐寬
使用者那一頁(機箱健康報告:四張數字卡、結論、九張表、兩張圖)打開時視窗比標題列寬,× 在中間。原因是數字卡:每張卡的標籤、數字、變化該疊成三行,卻繼承了外面那一排「左到右」的排法而並排,卡片遠比算好的寬,整排超出閱讀欄、撐寬視窗;第一張的字還疊在一起。

- 數字卡(page_kpis):每張直排三行、同一排一樣寬;四張並排每張不到 150 時一排兩張(三張 → 三張,否則一張);字太長以 … 結尾,滑過看全文。
- dialog_body:內容在自己的一塊裡畫,太寬的在視窗邊緣切掉,不再撐寬整個視窗(標題列和 × 不會再錯位);超出時照樣記進 WIDER_DIALOGS,版面檢查看得到。
- 版面檢查的頁面場景加上四張長字數字卡、結論和十欄寬表格;寬表格真的左右捲動時回報那一條(scrolls_sideways),捲到邊被切的字不算錯。換回原本的數字卡程式,檢查報 36 個問題(含「視窗被內容撐寬 281px」)。
- 截圖用的 ANYBOT_SHOT_PAGE_JSON:整頁(標題、kpis、結論)換成檔案裡的。
- LOOK_KEYS 只給測試用,標成 cfg(test)(消掉警告)。

已驗證:cargo test --bin anybot 529 通過(含 text_stays_inside_its_place_on_every_screen 新場景);用使用者那一頁截圖 1180/1500 寬:× 在右上角、數字卡兩排各兩張,往下捲九張表和兩張圖都在閱讀欄內。
未驗證:使用者自己的螢幕尺寸。
2026-11-17 00:40:50 +08:00
王性驊 c8aa522d8b 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-17 00:02:22 +08:00
王性驊 bab3b6f8ea 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 23:37:38 +08:00
王性驊 139a3eaf2a design: 設定 › 模型 的供應商清單只在可用的那幾個前面放綠點,沒設定的不再畫空圈(看起來像單選鈕) 2026-11-16 23:07:05 +08:00
王性驊 fe222507f4 fix: 送出/停止按鈕跟著「聊天的顏色」——安靜和只用黑色時是墨色,只有「跟著 Bot」才用 Bot 的顏色 2026-11-16 23:05:07 +08:00
王性驊 91da02a33f design: 開始使用的說明不再被截成一行,字也縮短;新增 kit::note(流程裡會換行的說明)
設定頁的 hint 是一行(長的滑過看全文),但開始使用這種流程裡,說明本身就是重點,不能截掉:
新增 kit::note(13 px 灰字、會換行),開始使用改用它,三段說明各縮成一句。
截圖模式多一個 welcome 畫面(還沒有 Bot 的新安裝)。

已驗證: cargo test 全過、截圖目視
2026-11-16 22:58:52 +08:00
王性驊 22c070fe72 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 22:57:13 +08:00
王性驊 8b8c477852 design: 連接器頁整理——已加入的改成一張清單,設定展開才有欄位;全 App 表單欄位名稱一律在上
- 已加入的連接器:一列一個(名稱、色點+狀態、「設定」、開關),按「設定」才在那一列下面展開欄位;
  「移除」在左、「重新連線」在右,不再每個連接器常駐七個輸入框
- 欄位一種標法:kit 的 form_row 改成名稱在上、輸入框在下滿寬(以前有左欄標籤、行內標籤、
  只有提示字沒有標籤三種混在一起);新增 form_pair(兩個短欄位並排,如帳號/密碼)、
  status_row(有即時狀態的清單列)
- 截圖模式的「整合」示範兩個已加入的連接器,ANYBOT_SHOT_MCP_OPEN=n 展開第 n 個

已驗證: cargo test 523 全過(含排版檢查)、截圖目視(收起、展開)
2026-11-16 22:45:10 +08:00
王性驊 94bbbd0493 design: 設定減字+頁面照 Anthropic 的報告寫法(寫法規則、存檔前檢查、可收起的細節)
設定頁(字太多):
- 設定列的「?」平常不顯示,滑鼠移到那一列才出現(位置保留,名稱不跳動)
- 設定下面的說明只顯示一行,長的結尾「…」,滑過看全文
- 外觀只留主題、強調色、聊天的顏色、語言;底色、對比、密度、慶祝動畫、重設收進「更多外觀設定」
- 聊天的顏色只有點(選中的有外圈),不再加一段文字;「你的電腦已是最新版本」改成灰字一行,不再是橘框

頁面(內容太亂、字太多):
- 給 Bot 的寫法規則改成 Anthropic 的寫法:標題就是結論、第一句補理由、最多三點;數字放 stats/表格;
  一節最多一處粗體;不用「→」、分隔線、標題編號;待辦用 steps、指令放程式碼;細節放 details
- 存檔前檢查(pages::review):段落太長、粗體太多、括號裡一串數字、標題編號、分隔線、「→」、表格裡的指令、
  很長卻沒有 details——退回一次並列出每一處;同一頁第二次照存,不會卡住
- 新頁面區塊 ```details 標題:預設收起的一行「▸ 標題」,點了展開(電腦和手機)

已驗證: cargo test 523 全過(新增:寫法檢查抓得到那頁的毛病、乾淨的頁面不報;退回一次第二次照存;
details 標題與收起)、clippy 21=基線、手機四段腳本 node --check、深色設定頁截圖目視
未驗證: 真的模型照新規則寫出來的頁面長怎樣(要等 Bot 下次寫頁面)
2026-11-16 22:28:37 +08:00
王性驊 f78513a6ff design: 你的訊息泡泡預設改成「安靜」(淡灰、黑字,像 Claude),電腦和手機同一個設定
- 聊天的顏色多一個「安靜」並設為預設;原本的「跟著 Bot」「只用黑色」保留
- 存著舊預設(跟著 Bot)的設定檔第一次打開時換成安靜一次(bubble_quiet_offered),
  之後再選回跟著 Bot 就照選的;只用黑色本來就是選的,不動
- 手機:泡泡照同一個設定畫(Bot 清單多一個 bubble 欄位);手機設定的「強調色」改名「聊天的顏色」,
  多「安靜」選項;修好一個舊 bug——手機拿到的是 "BotColor"/"Black" 卻跟 "bot_color"/"black" 比,
  勾選永遠停在「Bot 顏色」
- update_settings 的 accent 多 "quiet"

已驗證: cargo test(新增:預設是安靜、舊預設換一次、之後選回保留、黑色不動)、node --check 手機四段腳本
未驗證: 手機實機
2026-11-16 22:18:32 +08:00
王性驊 58413d8580 design: 共用元件(kit.rs)+套用到設定與對話框——一種區段、群組、設定列、卡片,不再卡中卡
- 新增 src/app/kit.rs:區段、群組、設定列、卡片、欄位、說明、按鈕、分段選擇、對話框底部,
  檔頭寫明用法和規則(卡片裡不放卡片、一個畫面一顆實心按鈕);從 app.rs 搬出 14 個元件
- 電腦頁自己的那套(sec_title/sec_card/sec_row/sec_note)改成共用元件的別名:小標、列高、
  列間細線和其他設定頁一樣;拿掉 setting_row(瀏覽器設定檔的兩個選項不再是卡中卡,
  「更新」頁改成一組群組+「疑難排解」區段;版本號直接顯示在列上)
- 設定左邊的分頁:選中改成淡底加粗字(不再是黑色膠囊)
- 說明字 12 → 13 px(灰一階的 32 處、會換行的 8 處);hint、欄位小標也是 13
- 20 個寫死的語意色(四種綠、紅、橘)換成色板的 up/danger/attention;連結用強調色
- Bot 設定底部「團隊成員可以使用這個 Bot」一行,說明放進「?」(以前換行、勾選框錯位)
- 看守測試:寫死顏色上限 88 → 66;kit.rs 以外自己畫的「底色+外框」卡片只准變少(17)

已驗證: cargo test 518 全過(排版檢查、規格比對、看守)、clippy 21=基線;設定 › 一般/電腦/
整合、Bot 設定、例行任務、右側面板截圖目視
未驗證: 使用者機器上的實際視窗
2026-11-16 22:07:07 +08:00
王性驊 7b1ec67754 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 21:51:30 +08:00
王性驊 9c1c6d9c6b fix: 桌面——外殼設定即時生效、Bot 設定不破版(自訂顏色改點選色盤)、對話框不被撐寬
- 底色/對比/強調色/密度:每幀比對已套用的值,改了下一幀就換(以前淺色、深色主題要重開)
- Bot 設定:自訂顏色改成 12 色相 × 4 深淺 + 灰階的色盤加「色碼」欄(不用拖滑桿);
  形狀平均分列;預設色和「自訂」同一列;拿掉多的空隙
- 排版檢查多一條:對話框被內容撐得比標題列寬就失敗;修好它抓到的設定 › 電腦(瀏覽器設定檔改兩行)、
  例行任務(長標題換行、對話框標題截斷)、頁面(數字卡外框算進寬度)
- stats 漲跌規則(pages::stat_trend,認一般的 -,單獨 - 不算);長值一律縮字
- 圖表解析:列尾多的 | 不多出一欄;只有一行的圓餅用那一行的名字
- 問候看設定裡的時區;「你的瀏覽器」說明斷行不超寬;ANYBOT_SHOT_EVERY 不再卡住;簡體註解改繁體

已驗證: cargo test 514 全過、排版檢查 3 字型 × 2 資料 × 3 寬度、clippy 無新警告;
Bot 設定、設定 › 電腦深淺截圖目視
未驗證: 使用者機器上的實際視窗
2026-11-16 21:34:03 +08:00
daniel wang f975d9f43c Bot 設定視窗:第一張卡「Bot 資料」統一排版、自訂顏色只在滑動時寫回、色環收進格子;加 ANYBOT_SHOT_EVERY 逐幀截圖查震動
已驗證: 505 測試全過、clippy 31 警告同基線;逐幀 diff(editor 自訂色 40 幀、設定一般頁)對話窗區域零變化,只剩眨眼動畫在動。
未驗證: 使用者機器上實際的「震動」場景是否就是自訂顏色寫回;需本人在真實視窗確認。
2026-11-16 17:53:56 +08:00
daniel wang dcd9bee7d5 主題產生器進設定(底色/對比/強調色/密度/慶祝)+側欄細條+時段問候+目標撒花
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 17:32:42 +08:00
daniel wang 9a90888e05 安靜外殼落地:預設色板換成「紙」,間距加呼吸,陰影減壓
第一輪只出了色溫小樣的截圖概念(差 6~10),肉眼看不出——對,那正是
研究说的:色溫微調是感受不到的高級感,真正的槓桿是表面分層、
去彩和節奏。這一輪把「紙」整套設成預設:

- LIGHT/DARK 全換暖紙系:pane 米白 #FAF9F6、sidebar 明顯深一階、
  墨色暖黑 #25221F;accent 從藍 #1680F3 換成黏土橘 #C06244(Claude 的
  調性),focus 同色——整個殼從「工程藍」變成「紙與墨」
- DARK 換暖黑階梯(#1E1D1B/#191817/#262422,60° 暖灰,不再藍黑)
- 圖表六色改同一個暖家族轉色相(殼去彩、圖表才有意識地用色)
- 全域 item_spacing 8/6→9/7、button_padding 10/5→11/6(呼吸節奏)
- popup 陰影 alpha 70→52

已驗證: cargo test 501 全綠(含 layout_audit 三寬度,間距加大後無出界);
截圖对比 now↔A:平均像素差從 6→14、強差異像素 5.6%(第一輪的兩倍),
色板取樣 pane 250,249,246 / sidebar 242,240,235 如設計
未驗證: 「高級感」最終要人眼認定;截圖在 1200px 寬,小視窗的密度感
還請在 App 裡實看;手機端 CSS 還是指向舊色板,下一輪同步
2026-11-16 17:13:20 +08:00
daniel wang f837201648 截圖概念色板產生器:紙/夜/墨/苔(ANYBOT_SHOT_PAL),挑方向用
安靜外殼第一步:先不換預設色,把四套方向用真實聊天畫面渲染出來挑。
每套只有三個輸入(墨色、紙色、accent)加兩個意義色(danger、up),
其餘全部由階梯生成——surface 是紙朝墨走等量小步,文字是墨朝紙退回,
chart 六色是 accent 轉色相的低飽和組(Linear 把 98 個手調變數砍成
3 個輸入的做法)。

- 紙:暖米白紙+暖墨+黏土橘 accent(Claude 的調性)
- 夜:暖黑底+霧靛藍 accent(Linear 的調性)
- 墨:純灰高對比,accent 就是墨本身(ChatGPT 的色盲規則)
- 苔:綠灰紙+苔綠 accent(有溫度的一支)

已驗證: cargo test 501 全綠;八張概念圖渲染成功,取樣確認色溫如設計
(紙 247,246,243 暖白/墨 12,12,12 純灰/夜 18,19,20 冷黑/苔 241,243,239 綠白),
高飽和像素每圖約百點=accent 只在小面積出現
未驗證: 實際觀感要人眼挑——這正是這輪的目的,選定後才動預設色板
2026-11-16 17:05:36 +08:00
daniel wang 6a09d1af51 stats 備註的漲跌也上色(桌面+手機);截圖模式可指定深色
- 桌面 md_stats:備註開頭 ↑/+ 綠、↓/− 紅(和值同規則)
- 手機:.stat .s 套 up/dn 色;dir() 同時看值和備註
- ANYBOT_SHOT_THEME=dark:截圖模式出深色圖(驗證配色用)

已驗證: cargo test 501 全綠、clippy 31(基線同);headless Chrome DOM 檢查
stats 備註渲染出 class="s up"/"s dn";xvfb 截圖深淺兩張,平均亮度
28(dark)/244(light)確認主題生效
未驗證: 深色圖表卡的實際對比度未逐項目視(僅平均亮度)
2026-11-16 16:48:03 +08:00
daniel wang 4bb6658b0c 輪迴加固第一輪:工具腳本鎖、審批行為鎖、純函數性質測試
- tools.specs.lock.json+tool_specs_are_locked:Bot 看到的工具名、說明、參數
  全鎖進檔;要改必須 ANYBOT_LOCK_UPDATE=1 產生 diff 看過,同 commit 改 feature-map
  (操作電腦與工具的介面从此改不動而不自知)
- approval_decisions_are_characterized:32 個固定工具呼叫鎖住 Allow/Ask[grant]/Deny
  判定,grant 字串逐字鎖(「一律允許」存的東西);審批行為不會被無意中改弱
- sidebar_ui:shorten_width 冪等與截斷標記、tile_offset 不出界與獨格置中
- app:批准卡/問題卡/composer 高度估算不超上限、內容越多越高(任何視窗寬度)
- CLAUDE.md:改善輪迴協定——停止看收斂訊號不收輪數、保險絲 40 輪只防死圈、
  每輪 commit 附「已驗證/未驗證」、變差回最後全綠 commit、工具與審批區改動
  需實機測試+人類簽名

已驗證: cargo test 506 全綠(含新 5 個);鎖檔由 specs() 產生
未驗證: 本機是 Linux,macOS 實機(axread/botbrowser)未跑;鎖檔對 specs() 的
描述改動會報 diff,此點未做破坏性演練
2026-11-16 16:21:55 +08:00
daniel wang ec73947133 桌面版排版:長字不氣球、設定不重疊、批准卡不頂出輸入框
- 聊天:氣泡、工作狀態列、批准/問題/交接卡裡的長網址、超長單字與
  多行文字不再撐破左右邊框;批准與問題卡高度上限 45%(最少 160px),
  卡內部自己捲,composer 永遠看得到(新增四個聊天排版測試場景)
- 設定:form_row/setting_row/sec_row_s 的英文字標籤依像素截斷加…;
  右側控制區可換行;伺服器與技能清單名字加 truncate;瀏覽器設定檔列
  改 horizontal_wrapped,提示文字用 row_hint 只佔剩餘寬度;
  「你的瀏覽器」說明文字手動斷行(英文單字中間不切、中文逐字可切)
- dialog_body 寬度以視窗寬度上限收斂,窄視窗不再溢出卡片
- drops_ui 測試改過 t() 比較,不再受其他測試改全域語言影響
2026-11-16 15:27:50 +08:00
王性驊 861887b563 feat: 電腦版不再破版、通知用 AnyBot 的貓、手機網頁像 App;從帳號看畫面不再斷線
電腦版:右側「進行中」的長重試訊息蓋過「停止」、衝出卡片,現在以「…」結尾(滑鼠移上去看
全文);Bot 設定的「團隊成員可以使用…」疊到儲存/取消、權限規則疊到「刪除」、「新增規則」
被切掉、電腦分頁的時間欄被切掉、窄視窗裡允許卡片的按鈕、「已排入…」和輸入框提示被切掉,
都修好。粉圓體比思源黑體寬,寫死寬度的地方用它就擠爆。新的 layout_audit 測試用三種字型、
最窄/一般/寬的視窗、示範和很長的資料,把每個設定分頁、Bot 設定、例行任務、右側面板畫一遍,
字被切掉或疊在一起就失敗(截圖模式也多了 ANYBOT_SHOT_PANEL/STATUS/TAB/SCROLL)。

通知:Mac 上原本用 osascript 的 display notification,橫幅是「工序指令編寫程式」的圖示、
點了還打開它。現在是 AnyBot.app 自己發的(NSUserNotificationCenter:新的
UNUserNotificationCenter 只給有 Apple 開發者簽章的 App 用,AnyBot 自簽),圖示是貓,點一
下打開那個 Bot;不在 .app 裡才退回 osascript。Linux 的 notify-send 帶上 AnyBot 的圖示。
anybot --banner 標題 內文 可以送一則試試。

手機(PWA):manifest 和 service worker 改成 mobile/ 裡一份,帳號伺服器和這台共用;加滿版的
maskable 圖示和 Android 狀態列用的單色貓(原本彩色圖變成白方塊)。每支手機滿版(左右安全
區域、狀態列跟著畫面顏色)、首頁提示裝成 App、換畫面左右滑、iPhone 主畫面 App 從左邊緣滑回
上一頁、按鈕長按不選字、搜尋框不放大。通知可以選要哪幾種(需要你/做完了/例行任務暫停/
收到檔案)、送測試通知,App 圖示上的數字是正在等你的 Bot。

帳號伺服器:看 Bot 電腦畫面時,瀏覽器回的 Pong 沒算成還活著,靜止畫面一分鐘就被切;看畫面
的票證十分鐘一到就切斷、重連又拿同一張過期的票回不來。現在票證記得誰申請的(那支手機的
登入、帳號裡那台電腦),申請者還有效就一直連著,使用中的票證會續期。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 00:06:12 +08:00
王性驊 9c84ec69c5 feat: 本機或區網的模型看不到圖時,可以請雲端模型看截圖和附件
設定 › 模型 › 本機或區網的供應商(Ollama、這個網路或 Tailscale 上的伺服器)多一個
「看不到圖時,請雲端模型看截圖和附件」,預設關。關著時跟以前一樣,圖片只找本機的看圖
小幫手;打開後,那個供應商的 Bot 看不到的圖會送給帳號裡看得懂圖的雲端模型(例如 xAI
Grok)描述成文字。

用哈士奇(Tailscale 上的 OpenAI 相容服務,模型不收圖)實測計算機題:沒開 59 步、225
秒還讀不到答案;打開後 7 步、118 秒答對。8 題各 4 次 32/32 成功。

也把「is not a multimodal model」認成模型不收圖的錯誤。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha4mzWbjJAWAsDVuBun
2026-11-15 20:00:06 +08:00
王性驊 dd6fd5aec7 feat: 每個 Bot 一個螢幕——Bot 的電腦上各有自己的螢幕和瀏覽器,支線另開暫時的螢幕,右側面板和「全部螢幕」看得到每一個
照 Grok Bot 的分法:一台電腦、每個 Bot 一個螢幕,大家同時做互不干擾。使用者自己的電腦只有一個實體螢幕,還是一次一個 Bot。

- box:anybot-screen(up/down/list/reap)開關每個 Bot 的螢幕,同時最多 6 個,閒置 10 分鐘關掉;browser 每個螢幕自己的設定檔(第一次從共用的複製登入;支線 <key>-t<n> 從主線那份複製,關掉時刪掉);start.sh 給每個螢幕 VNC token;Bot 電腦升到版本 10
- cloudbox:每個螢幕有自己的狀態(編號、尺寸、貼上檔、瀏覽器埠),指令開的視窗出現在它的 Bot 的螢幕上;branch_screen、close_screen、open_screens、thumbnail_of
- agent:在 Bot 的電腦上,一輪用它自己的螢幕(支線用暫時的),佔用照螢幕算
- 支線結束時關掉它的暫時螢幕
- 畫面:右側「電腦」顯示目前 Bot 的螢幕;群組跟著正在回答的成員,「成員」卡片點小畫面就固定顯示那個成員;「全部螢幕(N)」一格一個螢幕;接管時只停那個 Bot;手機和中繼帶上要看哪個 Bot 的螢幕
- 群組和支線的系統指示:看不到彼此開著的網頁,交棒時寫網址或檔案路徑
- 功能地圖:screen、team、computers、browser

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha4mzWbjJAWAsDVuBun
2026-11-15 16:12:09 +08:00
王性驊 3f46911ba4 fix: 下拉選單用 value 選不到卻回報成功、fill 撞到保險庫、sudo 留下 root 的檔案、--ask 不連連接器、容器裡的連接器被誤擋
電腦操作量測時找到的問題:填表題失敗大多是前兩個造成的(正式版有一次接著呼叫保險庫填入 124 次)。

- browser:select 也接受 value/values;對下拉選單 type 會改成選選項;什麼都沒給就報錯,不再回報「已選「」」
- browser:fill 指著頁面上的欄位(有 ref/text、沒有 kind/id/site)時當成 type(有 option 時當 select),不跑去保險庫
- cloudbox:有 sudo 的指令跑完,把 Bot 家目錄裡 root 新留下的檔案都交還給 Bot,不只它的資料夾(之前 ~/.config/chromium 和 ~/.local/share/pki 會留給 root,Bot 的瀏覽器之後開不起來)
- app:anybot --ask 沒有視窗,開始前先連好連接器
- mcp:指令是 docker、ssh 這類在別處執行的,不拿參數裡的路徑到本機檢查
- 功能地圖:browser、files、connectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha4mzWbjJAWAsDVuBun
2026-11-15 16:08:36 +08:00
王性驊 eb70608160 feat: AnyBot 功能地圖——Bot 用 anybot_guide 認識 AnyBot 本身;修好地圖整理時找到的七個問題
功能地圖(照 Lauren Tan 的 feature map,poteto/verification-skill-example)
- docs/feature-map/:20 區加索引,每區四段(子功能/使用者怎麼到/怎麼操作(Bot:、驗證:)/陷阱),內容逐條對照程式;索引寫共同前提、證據與略過的回報、全面檢查順序
- Bot 的系統提示多一行區塊目錄;新工具 anybot_guide 一次讀一區(唯讀)
- cargo test featuremap:: 擋漏寫:Bot 能拿到的每個工具、browser/computer 的每個動作、設定視窗每個分頁和區塊、update_settings 的鍵;每區要有四段、不能太長
- 自動學技能:AnyBot 本身怎麼用不抄進技能,地圖錯漏記成待改進;園丁在重複的待改進旁提醒補地圖
- CLAUDE.md:改功能時同一個 commit 一起改地圖
- 側邊欄「分區」工具的說明寫清楚:不是群組聊天

修正
1. 別人傳來的訊息(訊息管道、團隊成員)那一輪不給 AnyBot 瀏覽器、保險庫和已送紀錄(瀏覽器帶著使用者的登入);硬叫也擋下,公開網頁仍可 web_fetch
2. 自動學會的技能加進那個 Bot 自己的技能清單(支線的算主 Bot 的)
3. 按停止一併停掉這個 Bot 的互動終端機(一般背景指令照舊)
4. 設定 › 整合 › 技能、頁面的「刪除」要再按一次確定
5. update_bot 先跳確認卡片,列出每一項要改成什麼
6. Bot 範本的頭像形狀改成存在的形狀,並加測試
7. 文字:直接操作的提示改「設定 → 權限」、金鑰錯誤改「設定 → 模型」、等核准逾時照實說是什麼在等

Mac 490 個測試通過。

Refs: cl3xk7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 11:15:09 +08:00
王性驊 c7f6da7fe8 feat: 發布關卡——已送帳本、發布前檢查、送出後讀頁面留證據、例行任務完成條件、重播可填空格
1. 已送帳本(publish.rs):Bot 用 AnyBot 瀏覽器送出前,系統先讀頁面,看是哪個帳號、回哪一篇(回覆對話框或文章裡的貼文網址、或頁面本身);同一帳號回過同一篇就擋下(記 60 天),頁面看不出回哪篇時只擋 24 小時內同頁同字。搜尋框按 Enter 不算送出。瀏覽器新增 sent 動作,直接從帳本列出帳號回過誰,不必每輪讀完網站的回覆頁
2. 發布前檢查:送出前請另一家供應商的快速模型照基本規則(簡體字、AI 腔、不該公開的內容)、這一輪讀過的技能與自訂規則檢查,沒過就不送並說原因;固定不變的放在系統提示最前面方便快取,同一段字一輪只問一次;設定可關、可加規則
3. 送出後的證據:系統重讀頁面,確認文字出現、輸入框清空,抓出留言自己的網址;寫進 Message.sent(頁面文字偽造不了),送出計數、例行任務紀錄、/goal 評審、手機頁面都以它為準;框裡還留著字就記為沒有送出
4. 完成條件:例行任務可設 target_sends,系統自己數:到數就不准再送,結束時不到算失敗,連續兩輪(50 步)沒有新的送出就停下;喚醒訊息與進展檢查都說明目前計數
5. 重播空格:自動學技能時把每次不同的內容(留言、貼文網址)存成 {{名稱}},replay_skill 用 values 填這次的內容,缺哪格就說哪格
6. 間隔從真正送出那一刻算起;送出後確認最多等 8 秒,框清空 4 秒仍沒看到就先記「還沒確認」

Mac 480 個測試通過;送出前後讀頁面在 Brave、Firefox 實機測試通過。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 01:48:13 +08:00
王性驊 98fc63e65b feat: 借鏡 pstack/Grok Bot——例行任務執行紀錄、完成看證據、教訓分流、園丁報告、減少操作步驟、網站地圖
1. 例行任務執行紀錄:每次執行記開始/結束、完成/失敗/被停止/中斷、步數與失敗步數、原因,保留最近 20 次(Grok Bot 官方規格);上次失敗或中斷的原因帶進下一次;連續失敗 2 次自動暫停並說明原因;設定頁、手機詳細頁、list_routines 都看得到,沒有紀錄時說「查不到」不說「沒跑過」
2. 完成看證據:evidence.rs 從步驟算出實際成功送出幾次,寫進例行任務紀錄;/goal 評審的摘錄把 Bot 的話標成「不是證據」並附系統統計,對不上以系統為準;評審優先用另一家供應商的模型,失敗退回原本的
3. 教訓分流:自動學技能時,AnyBot 自己的工具問題寫進 tool_issues → 「待改進」清單(同一工具合併計次),不寫進技能;設定 › 更新可看可清除
4. 園丁報告(garden.rs):平日 8:44 掃過去一天的失敗、走冤枉路的執行、自動暫停與重複出現的待改進;週一 8:49 列出失敗多或太耗時的例行任務;沒事不報,可在設定關掉
5. 減少步驟:browser type 多行文字一次放進欄位(先試貼上事件、檢查沒進再用 insertText,Firefox 也行)並回報欄位內容;點進輸入框回「游標已在…」不再說「沒有變化」;元素編號在同一頁重讀時不變;wait 的 after_send 從上次送出算間隔
6. 網站地圖:學技能時同一網站的操作知識整理進「<網站> 網站地圖」(功能/怎麼到/怎麼操作/陷阱),做事的技能只寫特有規則

Mac 465、Linux 469 個測試通過;多行輸入與編號實機測試在 Brave、Firefox 通過。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 23:52:44 +08:00
王性驊 0a25db7199 fix: 模型說對話太長時自己騰出空間再試——先拿掉截圖、再收起舊結果、再摘要(一輪中間也能切);記下模型真正的上限,把圖當文字算的模型不再傳圖
一台 Linux 換成自訂端點的模型後,一張網頁截圖讓請求從約 1.8 萬 tokens 變成 178,553(上限 131,072):那個端點把圖的 base64 當文字算。AnyBot 一張圖只估 3,200、也沒算工具說明,所以沒先壓縮;模型說太長時,最新 6 則一律保留(截圖就在裡面),這一輪又只有一則指令沒地方摘要,直接報錯;下一輪截圖還在記憶體裡又送一次。

- 模型說太長:依序拿掉圖片(聊天裡的步驟截圖也放掉,下一輪不再送)→ 收起除了最新 2 步以外的長結果 → 摘要(只有一則指令的長回合在這一輪中間切,指令原文保留)→ 都試過才報錯,並說明指示、工具說明、對話各多大
- 從錯誤訊息讀出上限(husky、OpenAI、vLLM、Anthropic 的寫法),比 Bot 設定小就記下來(StreamEvent::ContextLimit)
- 實際用量比估算每張圖多 2 萬 tokens 以上(圖被當文字算)時,拿掉圖片成功後這個模型不再傳圖(改用文字描述);看得到圖、只是剛好超過一點的模型照樣看螢幕
- 估算加進工具說明(約 1.2 萬 tokens)

測試:husky 那次的截圖情境、一則指令的長回合、看圖模型只超過一點點、各家錯誤訊息的上限與用量解析。Mac 451 個測試通過。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 18:57:51 +08:00
王性驊 69080f9117 fix: Linux 操作恢復順暢——保險箱空的不給填入工具、同一個錯誤不再鬼打牆;Wayland 可一律允許、長網頁有編號、Enter 只看游標那格;做完就關掉瀏覽器
一台 Linux(Ubuntu 26.04、X11)上一輪 Threads 海巡 40 分鐘只送出 1 則:小模型一直誤叫保險箱填入(171 次),而 4b53ad4 之後回的是「沒有開著的分頁,請先 browser_open」,Bot 照做又再誤叫。

- 保險箱:只給有東西可填的種類(空的就沒有 vault 工具、browser 也沒有 fill);填入先查 id 在不在,錯誤講對、指向 type;規劃與填入都在這個任務自己的分頁上(本機、box、遠端手腳)
- 同一個工具連續 3 次回一樣的錯誤(換參數也一樣):這一回合不再執行
- Wayland(GNOME/KDE,wlroots 的座標點擊)認不出 App 時,改給「操作這台電腦的螢幕」一律允許(一律允許清單裡可移除)
- 元素樹走訪上限 4000 → 20000:長網頁捲下去,看得到的部分也有編號
- 敏感動作關卡:Enter/送出只看游標所在(或正在打字)的欄位;座標點擊只看點到的最內層控制項;英文整字比對(PayPal 不是 pay);步驟在別台電腦時不查大腦本機的編號
- 打字先點欄位再檢查最前面是不是 AnyBot;批次從 AnyBot 切到要操作的 App 不再中斷,切到第三個 App 或回到 AnyBot 才停
- 估算對話長度只算真的會送出的最新 3 張截圖
- 做完就關掉瀏覽器(設定 › 電腦 › AnyBot 瀏覽器設定檔,預設開):一輪結束關掉用過的 Firefox/Chrome,別的 Bot 還在用就只關自己的分頁;box 的 Chromium 不變

Mac 444、Linux 448 個測試通過;Firefox 收尾實機測試(Mac、Linux Snap 版)通過;已在那台 Linux 上部署驗證。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 16:21:32 +08:00
王性驊 1eb88a9a60 公測前第二輪:區網直連改 HTTPS、手腳只聽大腦簽過的指令、更新驗簽章、聊天各存各的檔、視窗沒在前面也照常運作(提示音不再等你切回來)
- 區網直連:同一個埠用這台電腦自己做的憑證說 HTTPS(lantls),區網的 http 轉到 https,本機和 Tailscale 仍可用 http
- 配對碼後面帶一段不經過帳號伺服器的密鑰,大腦給手腳的指令都簽章(綁電腦、時間、只能用一次)
- deploy/update.sh、install.sh、install.ps1:記住簽章公鑰後,新版不是它簽的就不裝;make sign-setup 啟用
- state.json 只剩設定,聊天存 chats/bot-<id>.json,有變才寫;金鑰密封存檔
- 帳號伺服器:閒置連線少醒、讀取緩衝變小、請求開頭 15 秒沒送完就斷;本機壓測沒有洩漏
- 視窗縮小/被蓋住時照樣處理 Bot 的事件;任務完成也響提示音;Mac 關掉 App Nap
- 團隊成員在 Bot 忙時的訊息排隊不丟、群組沒有 @ 時看擅長分派、手機可改個人檔案
- setup.sh 對 root Docker 提出警告;收到停止訊號先收尾

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-14 00:40:16 +08:00
王性驊 8ed7132e6b /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 23:36:34 +08:00
王性驊 7ac7c24012 手腳指令修好:輸入預設關閉(pi-bolt -p 不再卡住)、補齊 PATH、互動終端機、Windows 用 Git Bash/PowerShell;任何聊天都能 @ 其他 Bot,結果回報到發問的視窗
指令(手腳電腦和每台電腦)
- 一般指令的輸入一開始就關掉:會讀輸入到底的程式(pi-bolt -p、cat)不再永遠等下去
- PATH 先讀登入 shell 的設定,再補 ~/.local/bin、Homebrew、cargo、bun、nvm…(開機自動啟動的 AnyBot 原本找不到 pi-bolt)
- 互動終端機(shell 加 interactive):pty/ConPTY,Bot 讀整理好的畫面、打字和按鍵、等某段字出現;開互動 shell 每次都問
- Windows:有 Git Bash 用它,沒有用 PowerShell(原本一律 /bin/sh,跑不起來);PATH 用 Windows 的分隔符號
- 實測 pi-bolt:-p 模式回答、互動畫面裡問答都能用

Bot 之間
- 任何聊天按 @ 都跳出可以選的 Bot(群組是成員);點名後由這個 Bot 用 ask_bot 去問,結果在這裡整理,不叫使用者自己去看
- 問同事/交辦畫成對話卡:誰問誰、問題、進行中狀態、回答,還有對方的紀錄連結;電腦和手機都有
- message_bot 交辦的事做完會自動回報到發問的聊天(標著對方的名字)
- 被問的 Bot 在側欄顯示「正在回答「A」的問題…」

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-13 22:03:26 +08:00
王性驊 3b8c4c3d3b 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 21:34:03 +08:00
daniel wang ac93db0cfa 手機網頁:畫面推入/返回動畫、新訊息進場動畫、iOS 鍵盤抬高輸入框、觸感回饋
- 通知加「允許/拒絕」按鈕(Android),點了直接回覆核准,不用打開 app
- manifest 加 id、lang、display_override 與主畫面捷徑(主要 Bot 對話、未讀對話)
- 從通知/捷徑進入:#answer=once|reject 自動回覆,?sc=main|unread 直接開聊天
2026-11-13 21:16:46 +08:00
王性驊 3f3d049ae8 個人檔案:指示和 soul 合成一欄;Bot 知道自己有個人檔案,聊天裡可以看和改自己的設定(先給你確認)
- 「Soul 與指示」一欄(instructions):Bot 設定拿掉另外的「指示」卡片(群組保留);舊存檔裡的
  soul 讀進來時併到指示最前面(Bot::fold_soul),之後不再寫出
- 說明裡加上:它有個人檔案、怎麼看和改、它沒有哪些能力(profile::self_knowledge)
- 新工具 my_profile(看:描述、soul 與指示、擅長、不做的事、能力有/沒有、技能與技能庫、
  可用電腦與預設、模型、思考模式、步驟模型、頭像)、update_my_profile(改上述欄位)
- 改設定一律先跳確認卡片,逐項列出改了什麼,按允許才生效、拒絕不動;按下允許時依當下的
  Bot 重算再套用,只動設定欄位;錯誤要求(沒有的能力、技能、電腦、顏色、重名、拿掉自己的
  電腦、沒變化)直接說原因;群組裡改的是正在說話的成員
- 例行任務和訊息管道的對話拿不到這兩個工具;網頁、檔案、別的 Bot 叫它改的不算
- 測試:聊天 → 確認卡 → 改好(拒絕則不改)、看設定與錯誤要求、舊 soul 併入指示
- 順手修:src/agent.rs 一個重複的 #[test]

驗證:macOS cargo test 391 通過(連跑兩次);Windows/Linux cargo check 通過

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 17:24:58 +08:00
王性驊 bf3238d960 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 17:14:51 +08:00
王性驊 29b4a6b24f 輸入框上方的頭像:每種情境一套動作和小道具(思考、看結果、搜尋網頁、操作螢幕、寫回覆、等你決定、完成、失敗)
- 新模組 src/app/mood_ui.rs:mood_of 一個地方判斷情境(工具分類和旁邊那行字共用
  chat_ui::step_kind / step_name),每種情境一個小繪圖函式
- 思考:頭縮小、三顆小球繞頭轉,越想越快;推理模式每收到一段推理小球亮一下
- 看結果:右下小紙,橫線一條條亮;搜尋網頁:放大鏡左右掃,眼睛跟著
- 操作螢幕:游標移動按下、冒出漣漪;寫回覆:低頭點頭、筆畫出波浪墨水,字停筆停
- 等你決定:黃點外擴散光圈、每隔幾秒彈一下;完成:笑臉、跳一下、金色小星星
- 失敗:一字眼、搖一次頭、一滴汗滑下後停住(不再持續重畫)
- 道具都在臉的方框內;前後分層(後面的畫在臉後、前面的描底色);淡入淡出;
  工作中的情境至少停 0.6 秒不閃;顏色太接近頁面時往文字色調整(深色模式黑臉)
- 截圖模式:ANYBOT_SHOT_VIEW=mood ANYBOT_SHOT_MOOD=…、ANYBOT_SHOT_ZOOM=2
- 測試:情境判斷、思考加速連續、道具不出框、道具配色;FEATURES.md 補說明

驗證:macOS cargo test 378 通過;Windows/Linux cargo check 通過

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:35:17 +08:00
王性驊 c834ab689f 修正卡死: ⌘ 一按視窗就鎖死、圖表縮小凍結、打字每鍵寫檔;複製中文亂碼;頭像不再擋住思考動畫
卡住當機
- ⌘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 14:19:59 +08:00
daniel wang c58f14e274 介面組件庫(ui_kit: section/card/field/switch/seg/pill/disc/empty/ghost)+全域圓角、muted 輸入底、細卷軸;Bot 頭像可自訂顏色(色相/飽和/明度,存 #hex) 2026-11-13 01:08:52 +08:00
王性驊 66dce03cee 思考模式、連接器帳密、圖表: a bot's thinking mode, connectors that log in with a username and password, native charts
思考模式: each bot picks 自動/快速/平衡/深入. Claude gets output_config.effort,
OpenAI-compatible services get reasoning_effort; a model that refuses the
setting is retried without it and not sent it again.

連接器: a connector takes a 帳號 and 密碼. {username}/{password} written in the
command, env, address or header are filled in there; written nowhere, a local
server gets MCP_USERNAME/MCP_PASSWORD and a remote one Authorization: Basic.
The password is kept like a key: screens see only 已設定, and the brain clears
it when a screen changes the command or address. A test now covers a screen's
switch stopping and restarting the brain's connector.

Also in this tree (written by pi-bolt earlier): ```chart blocks drawn as
native charts, older images sent as summaries with a look_image tool, and
image tokens counted in the history size.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha4t4P58pvWECQYXBjo
2026-11-12 21:00:14 +08:00
王性驊 eb3157852a 安全、修正: harden sandboxes, approval gates, vault, relay roles, and fix protocol/UI bugs
- macOS 沙盒與工具 (tools.rs, policy.rs, docindex.rs): block AppleScript raw events and
  concatenation outside the sandbox; stop exposing ~/.ssh or localhost sockets in Sealed
  mode; deny writes to shell profiles, LaunchAgents and .git/hooks; expand secret-file
  ignores and enforce symlink/policy checks across SSH, device and document search.
- 電腦操作與遮罩 (computer.rs, agent.rs, marks.rs, desktop.rs, cloudbox.rs, portal.rs):
  forbid clicking or typing into AnyBot's own windows; extend the sensitive-action hard
  gate to raw coordinates, Return/Delete submits and remote devices; stop batch steps if
  the front app changes; black out secrets on zoom, show, >600-node trees, adjacent OTP
  labels, box screenshots and control text lists; preserve non-text Wayland clipboards.
- 保險庫與瀏覽器 (vault.rs, vault_store.rs, browser.rs, botbrowser.rs, web.rs, box/browser):
  verify tab host and HTTPS atomically at fill time; taint filled tabs against browser_eval
  and PDF export while masking card/CVC values and screenshots; remember sites only on
  always-allow; drop --remote-allow-origins=*; gate private URLs and block metadata/Docker
  ports, OrbStack 198.18/15 and IPv6 transition ranges.
- 帳號伺服器、同步與傳送 (relay/, remote.rs, mirror_ui.rs, share.rs, drops.rs): isolate
  paired hands hosts from brain sync, tickets, pairing and backup overwrites; redact
  routine trigger secrets and clear REDACTED when endpoints change; isolate channel and
  team-member turns from owner memories, appctl and grants; scrub shared bot exports and
  reset grants/routines on import; validate drop IDs and serialize chunk writes.
- 網路與協定穩定性 (httpd.rs, tunnel.rs, vnc.rs, Caddyfile*): fix chunked integer overflow
  and CRLF header injection; enforce Origin checks, connection/job caps, 200 MB backup
  reads, unique atomic temp files and ASCII hex guards; bound deflate unzip and VNC sniff
  buffers; move VNC stdin/text off the tunnel loop.
- 介面、排程、語言與其他修正 (app.rs, i18n.rs, providers.rs, skills.rs, routines.rs,
  setup.rs, store.rs, preview.rs, attach.rs, speech.rs, teams.rs, mcp.rs, voice.rs):
  wire up the delete-routine confirmation dialog and mirror run-now; preserve unsaved
  mirror edits across brief disconnects; give Chinese skills distinct folders and approval
  gates; convert parsed tool JSON fields without corrupting code fences, URLs or paths;
  fix Hourly DST offsets and time out unattended routine approvals; lock --install-skill,
  cap docx/xlsx unzip sizes, isolate test env keys, and tighten local file permissions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-12 14:34:10 +08:00
王性驊 6f71a2ff1f 語言: the language to answer in follows every message; the conversion is only a net, with no hand-written words
- reply_reminder: after each of the person's messages (the last line of its tail, next to
  where the model answers) the chosen language is said again — for all 37, not only
  Traditional Chinese. With 跟著系統 it is added when the message is in Traditional
  Chinese, and never when the message asks for Simplified. Made from the setting and the
  message alone, so a chat still reads the same every turn.
- The hand-written table of Taiwan words is gone: wording is the reminder's work.
- The character conversion stays as a net for Traditional Chinese, on the tables that
  leave correct text alone (OpenCC's turned 台 into 臺 and 了解 into 瞭解 in every reply).
- FEATURES.md.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-12 10:33:56 +08:00
王性驊 935cee9346 繁體中文、換電腦: 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 10:29:02 +08:00
王性驊 3720ee501e 問題卡、搜尋: 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 10:17:32 +08:00
王性驊 908433967a 長對話: old step results are set aside first; a summary only if that isn't enough, written by the quick model
- at 70% of the context, results of older steps longer than 600 characters keep their first 200 for the model
  (the newest 6 messages stay whole): no model call, no wait — 20 file reads went from about 128k to 22k
  tokens in 10 ms in the test
- the chat keeps every result whole for the person; the mark (Message::folded) is kept, so the model reads the
  same thing each turn
- the summary, when still needed, is written by the bot's step model when it has one

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-12 00:02:32 +08:00
王性驊 fcf4ef3638 外觀: the face above the input is smaller and stays in its own row
It was 64 px and reached 10 px up over the chat; now 40 px inside a 26 px row, so it never covers what
was said, and the yellow dot is sized with it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-11 23:59:28 +08:00
王性驊 d82c8bb2b9 外觀: the other settings pages and the phone follow
- 權限: 直接操作 and 自動審核 are switches in plain cards; 技能 and 連接器 lists use switches; 電腦's cards are
  white with the same edge
- phone: the chat takes the bot's colour, the bot's words have no bubble, 需要你允許 is the yellow card, the input
  has an ink edge; while it works the chat ends with the bot's face and the same 「正在…」 as on the computer
- screenshot hooks: ANYBOT_SHOT_VIEW=empty, ANYBOT_SHOT_SUB
- FEATURES.md: 外觀

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-11 23:03:24 +08:00
王性驊 675aad9d2a 設定: 一般 and 整合 as drawn — white cards of rows, word-only pages, 整合 in three pages with the form behind a tile
- cards are white with a hairline edge; group titles small and grey; the page list is words only, the chosen
  page in ink
- 聊天的顏色 is two dots (the bots' colours, black); switches are ink with a white knob
- 整合 is three pages (訊息管道, 連接器, 技能) instead of one long scroll
- 訊息管道: 已連接 lists each channel on a line (its mark, name · kind, who answers, how it stands, the switch,
  ⋯ to remove); 新增管道 is a grid of kinds, and a press opens that kind's form below (取消 closes it)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-11 22:10:44 +08:00
王性驊 f0b417f7cc 外觀: a real bold weight, and 設定 › 一般 as cards of rows
- 思源黑體 Bold is bundled next to Regular: titles, bold words and headings in replies, the chosen page and
  choice are set in it (粉圓體 and the system font keep their one weight; replies still fake bold there)
- 設定 › 一般 rearranged: 外觀, 記憶與文件, 通知, Bot, 帳戶 — each a card whose rows hold one thing, the name on the
  left and its control on the right, at most one small line under the name, the rest behind the ?
- choices are one segmented control everywhere on the page; switches instead of checkboxes; plain names
  (聊天的顏色, 用意思找記憶, Bot 可以翻的資料夾)
- the page list: the chosen page in ink, a yellow dot on 更新 when a newer build waits
- cards on the other pages take the same quiet fill and corners

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-11 21:54:24 +08:00
王性驊 6a84abcaeb 外觀: the bot is the lead — its face over the input says what it is doing, its colour runs through the chat, requests dock above the input
- 思源黑體 (Noto Sans TC Regular, OFL, bundled) is the default font; 粉圓體 and the system font stay as choices
- the chat takes the bot's colour by default: the person's bubble, the send button, the chosen tile (a little of it)
- the bot's words sit on the page without a bubble; the person's bubble has its small corner toward them
- above the input: the bot's face, looking at the input when idle, up while it thinks, across at 「正在…」 while a
  step runs, at the person (yellow dot) when it needs them, smiling for 2 s when done, flat-eyed after an error
- 需要你允許 is a yellow card docked above the input instead of a pop-up over the window; Enter allows and Esc
  refuses while the input is empty, after the card has been up 0.6 s; yellow is the one colour for 「需要你」
- header: the name at the left, plain buttons without rings; icons drawn a little heavier (2.25)
- an empty chat: the face large, a line on what the bot is for, three things to start with
- screenshot hook ANYBOT_SHOT_CALM

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-11 21:44:59 +08:00
王性驊 deec40fd02 輸入框: Shift+Enter is a new line and goes on with a list, the box grows with its words; the working row says what the bot is doing
- Shift+Enter made a new line in name only: egui's shortcut matching ignores Shift unless asked,
  so it sent the message too; Enter and Shift+Enter are now read by hand (the / list takes plain
  Enter only)
- Shift+Enter on 「1. 買菜」 starts 「2. 」 (also 「9) 」→「10) 」, 「1、」, 「- 」「* 」「• 」, 「- [ ] 」, with the
  indent); on an empty item it ends the list
- the words box sat in a 28 px slot, so its scroll area stopped at 64 px and cut lines off; it now
  grows with the words (15 px on 22 px lines, wrapped) up to two fifths of the window, then
  scrolls; + and the buttons stay at the bottom
- the working row names the running step and what it is on (「正在搜尋網頁:台北 天氣」, 「正在打開網頁:
  github.com」, 「正在執行指令:cargo test」, every tool), and with none running a phrase that changes
  every 3 s (thinking / looking at results / writing)
- screenshot hooks: Shift+ in ANYBOT_SHOT_KEYS, ANYBOT_SHOT_TYPE, ANYBOT_SHOT_VIEW=working

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-11 20:53:27 +08:00
王性驊 5ae7cda6bb 目標: the goal goes with its chat, stays out of shared bot files, and 停止 between turns pauses it
- 清除聊天記錄 and 開始新對話 clear the goal first (it used to stay, and stopping the turn left a
  「目標暫停」 line in the emptied chat)
- a shared bot file no longer carries the goal; importing drops one that is there
- 停止 while the check is reading the chat pauses the goal instead of doing nothing
- 「繼續」 on a cut-off turn takes up a goal the restart paused
- AnyBot's own line never lands between a step and its result, and stays above a 「繼續」 card
- FEATURES.md: channels and team members can't set a goal (it said they could)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-11 20:35:53 +08:00
王性驊 31f41f62c6 目標: /goal keeps a bot working turn after turn until a second model, reading the chat, says the goal holds
- goal.rs: the command (/goal, /goal clear, /goal <condition>), the judge's brief and how its
  answer is read (met / not_met / waiting / impossible), and the brakes: 20 turns, 3 idle turns,
  a question for the person, a failed turn, a stop, a silent judge or a restart pause it; the
  person's next message takes it up again
- app/goal_ui.rs: on the brain, each finished turn of a goal is checked on a thread with the bot's
  quick model; not yet met wakes it with 「[目標]還沒達成:…」, the rest leave a note in the chat
  (never sent to the model) and tell the person when away; the line above the input with 清除目標
- typed on the computer, a screen or the phone, the brain acts on it; /goal leads the / list on
  both; the phone shows the bar, the notes and the 目標 tag
- anybot --ask "/goal …" runs to the end, like claude -p "/goal …"
- tests for the command, the verdicts, the brakes, the brief and the slash list; FEATURES.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-11 20:24:27 +08:00
王性驊 cb0e4f3465 側邊欄: 重新啟動以更新 stays inside the sidebar
- The button sized itself to its words, 「重新啟動以更新(2026-11-11 17:23)」, which ran past the
  sidebar's right edge (more so at its narrowest, 240 pt). It is now one row across the sidebar,
  never wider, words in the middle: the time short (「17:23」 today, 「11/11 17:23」 another day),
  dropped when it doesn't fit, and the words cut with … if even they don't. The whole time is in
  its tooltip.
- Screenshot mode: ANYBOT_SHOT_NEWER=<hours ago> shows the button; ANYBOT_SHOT_SIDEBAR=<points>
  sets the sidebar's width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:25:59 +08:00
王性驊 215a5667cc 側邊欄: the bots at the top two to a row, a lone one in the middle
- The grid of the main and pinned bots held as many to a row as the sidebar's width allowed (three
  or more when widened), and a bot alone in a row sat on the left. Now at most two to a row (one
  when the sidebar is very narrow); a row that isn't full — a single bot, or the last of an odd
  number — is centred. Dropping a bot into the grid lands where the centred layout shows it.
- Screenshot mode: ANYBOT_SHOT_PINS=n shows n bots in the grid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:21:51 +08:00
王性驊 915fdcf589 連接器: 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 17:12:12 +08:00
王性驊 41b6b7f465 技能: / 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 16:54:58 +08:00
王性驊 f9a261959c version_0_1_1-alpha 2026-11-11 16:19:06 +08:00
王性驊 9a70232a14 語音: a call and 朗讀 read the answer just given, also on a brain's screen; the bot panel keeps its width
- A call read the last answer in the chat as soon as the bot didn't look busy. On a screen of a
  brain the bot shows up as working only a moment after the question leaves, so it read the answer
  before and never the new one. It now reads only an answer that comes after what was said.
- 朗讀每個回答 did nothing on a brain's screen (only a turn run on this computer read aloud). The
  screen now reads a turn the brain just finished well; a brain without a window reads nothing.
- The voice row (聲音, a 200 px box, 載入聲音清單) was wider than the bot panel, and egui then moved
  the panel's left edge under the chat. The row takes two lines where it's narrow, and the panel's
  contents can no longer widen it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:47:20 +08:00
王性驊 9d6b346462 版本: v<number>-<commit> with the build time, the same in the app, the phone, --version and the server log
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:51:52 +08:00
王性驊 c6c9a1674a 傳送: a file or a few words from any device of the account to any other
Outside the chats and without a bot: computer → phone, phone → computer,
computer → computer.

- The brain is the post office (src/drops.rs). The sender hands the file
  over in 2 MB pieces; the brain keeps it in drops/ and pushes it piece by
  piece to the destination computer (device/run tool `drop_put`), going on
  from where a broken link stopped and waiting up to 7 days for a computer
  that is off. What is for the phone waits at the brain to be downloaded.
- Files land in Downloads/AnyBot with a notification; words go on the
  clipboard. A computer takes parcels only from its own brain.
- Window: an ↑ button at the bottom of the sidebar opens 傳送到其他裝置
  (pick a device, drop files or paste text, the last 7 days below).
- Phone: 傳送到其他裝置 in the account menu (send, download, copy).
- Bots: a `send_to_device` tool, gated like send_file.
- Owner only; the account server is unchanged. Without an account, this
  computer and a phone connected to it directly can exchange.
- Docs: FEATURES §36, protocol, architecture, multi-device (zh and en).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-11 10:04:13 +08:00
王性驊 b4ba710eb4 記憶: each bot keeps its own, remembers like a person, and decides for itself
- Each bot only sees its own memories (the shared "bot 0" layer is gone).
- A 做過的事 line is written only for a turn that really did something
  (or looked things up in 5+ steps); small talk and simple answers aren't kept.
- The bot judges on its own what is worth remembering and whether a new fact
  is the same as, replaces, or stands beside an old one (`separate`); it
  doesn't ask the person first.
- remember no longer refuses a different fact that shares a subject with an
  old one (likeness is counted both ways).
- Filler messages (謝謝, 繼續, ok…) carry no memories; `_` and `%` are no
  longer wildcards in the search.
- Team members no longer receive `memories` with messages, and picks are
  taken only from the owner and only when they are this bot's real memories.
- forget only retires 記得的事, never a 做過的事 line.
- Memory chips are hidden while the bot is working (desktop and phone).
- A reply made long after the message gets a 〔現在時間〕 line.
- The nightly tidy runs only on the brain; edits are capped at 500 chars.
- Model download: no total body time limit, only a 60 s stall limit.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-11 09:35:59 +08:00
王性驊 28784232a5 記憶: 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-11 07:46:50 +08:00
王性驊 1af25d7da4 提示音: a chime whenever a bot needs the person
A request to allow something, or a step only the person can do, only
bounced the Dock icon; a banner (with macOS's Glass sound) came only
when they were away, and on Linux notify-send made no sound at all. So
someone looking at another window on the same screen, or at AnyBot
itself without watching it, missed that a bot was waiting.

Now on_new_approval rings a chime every time, focused or not: two soft
bell notes going up (E6, then A6), 0.8 s, quiet, synthesized
(voice::chime_samples) so it is the same on macOS, Windows and Linux.
Several requests at once ring once; the banner that comes with it when
away stays silent so it doesn't ring twice (the 「完成了」 banner keeps
its sound). A screen of another brain rings for the brain's requests
too (they come through the same on_new_approval); a brain on a server
doesn't. 設定 › 一般 › 通知 › 「需要你時發出提示音」 turns it off (on
by default; turning it on plays it once).
2026-11-11 01:01:05 +08:00
王性驊 12c9944dee Server voice service: Whisper on the brain's own server, checked for real
`make server` now asks whether to run a voice service there (and the
kept-setup menu can add or remove it): speaches, Whisper
large-v3-turbo on the CPU, behind the brain only (no published port),
enabled with COMPOSE_PROFILES=voice so it composes with the Tailscale
and LAN files. The brain sees ANYBOT_VOICE_URL, fills 設定 › 語音 › 聽
with it once (what is changed later stays), and asks the service for
its model at each start: this build downloads only when asked (it has
no PRELOAD_MODELS, and the 0.8.2-cpu tag is older still, so the image
is pinned by the digest that was tested).

Tested end to end on 12 CPU cores with the compose file itself: first
start 404 s to download the model, later starts 1 s; 11 s of Mandarin
mixed with English (Chrome, Tesla FSD) in 3.4–3.6 s, every word right.
small is three times faster and slipped a character. Reading aloud
stays with another service: speaches can't say Chinese (its espeak has
no "zh"), English works.

From the same test: a service that answers 200 with no sound is now an
error said in words (it was played as silence), Whisper's ASCII
punctuation in Chinese becomes full-width (,?!), and speaches'
"not installed locally" says the model is still on its way.
2026-11-11 00:14:50 +08:00
王性驊 40d1d9707a 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 22:58:18 +08:00
王性驊 81ba110ca5 指示: last in the prompt, under its own heading
A bot's 指示 went into the system prompt bare, in the middle, with
several paragraphs of the app's own rules after it, so the model gave
it little weight. It now comes last, after the language line, as
「使用者給你的指示(優先遵守):」 followed by the text.

The field's help said 「Bot 應該記得的事、說話風格…」, the same as
記得的事 below it, and its example was 「用繁體中文回答」, which the
language setting already does better (it also converts the replies).
It now says what it is for — the bot's role, rules and way of talking
— and points to 記得的事 and 設定 › 一般 › 語言; the example is about
style instead.
2026-11-10 22:00:40 +08:00
王性驊 89dbb243dc Chat: a 回到底部 button once you've scrolled far up
The desktop transcript only followed new messages while it was already
at the bottom; scrolled up through a long chat, the way back was the
wheel. Past 400 points above the newest message (the phone's
threshold), a round ↓ fades in over the bottom middle of the chat, just
above the composer. A press scrolls smoothly to the end and keeps
pulling for up to a second, so words streaming in meanwhile don't leave
it short; then stick-to-bottom takes over again and the button fades
out.

ANYBOT_SHOT_VIEW=longchat fills the chat with 60 messages, to check it
with ANYBOT_SHOT_SCROLL / ANYBOT_SHOT_CLICK.
2026-11-10 22:00:34 +08:00
王性驊 f006aeee35 One installer for every platform, first run included
install.sh now covers every common Linux distro (apt, dnf, yum, pacman,
zypper, apk, xbps), macOS on arm64/x86_64, and hands off to install.ps1
under Git Bash. install.ps1 + install.cmd give Windows a double-click.
Autostart: systemd user unit on Linux, launchd on macOS, Task Scheduler
on Windows. A terminal guides the role choice and the first key or bot;
agents get --print JSON and ANYBOT_NONINTERACTIVE=1 with env seeding.
`加一台電腦` shows the Windows and the Mac/Linux line together.
2026-11-10 14:07:01 +08:00
王性驊 a514b33fb3 Bug sweep: gates, relay 2FA, Windows input, snapshots, encodings
Permissions and reach
- a file leaving a computer passes the same questions as reading it;
  "looking" shell commands that do more than look ask first
- a symlink out of the work/sealed folder counts as outside it
  (real paths, not just lexical ones); the search walk skips links
- web_fetch and skill_install read the public web only: localhost, the
  LAN and cloud metadata are refused, at every redirect
- preview shows a file without running it; browser_upload may ask
- vault: logins no longer match across shared suffixes (pages.dev,
  com.tw, ...); registrable_domain knows public suffixes
- axwrite: found elements are retained (use-after-free)

Relay
- replacing or turning off 2FA needs the current code (rate-limited);
  new recovery codes only count once enrollment is verified
- a removed computer loses its socket and its `call` access
- a site name taken by another account answers 409
- RELAY_TRUST_PROXY: the login lock counts the caller's address, not
  the proxy's (compose files and README)
- httpd: half a body is not a request

Desktop
- sign-in, join and restore work with 2FA on (code field; --serve reads
  ANYBOT_ACCOUNT_CODE; the setup wizard points to a pairing code)
- Windows: text was typed twice; modifiers are held through click, drag
  and scroll; horizontal scroll; screen control is no longer refused
- a recording that hits the limit is transcribed, not thrown away
- bot's computer: a new home volume restores the snapshot; a snapshot
  is read through before the home is wiped; a failed volume removal
  stops reset/restore
- events of a stopped turn no longer land in the next one; each channel
  message gets a turn of its own
- saving a bot's settings keeps what it got meanwhile (three-way merge);
  a save file that cannot be read is kept
- pages in Big5/GBK/Shift_JIS are read in their own encoding
  (encoding_rs); osascript output past 64 KB no longer stalls
- pick_tab keeps a job's own non-http tab; pictures larger than the
  texture limit are fitted; the auto-update time field takes typing
- skills live in <data>/skills; memories are unnumbered in the prompt;
  the phone may skillify and skill_install

CI
- the test step fails when the tests fail (it piped into tail)

Tests: anybot 268 passed, 27 ignored; relay 16 passed; clippy unchanged.
Not run: Windows on a real machine (win.rs type-checked alone), the
Docker paths of the bot's computer, the live accessibility writes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-10 11:46:17 +08:00
AnyBot Dev 7d61de83a8 Skills you can hold in your hand: skill files, install, 示範即教學 (P7+C8)
- a skill is now a .md file (front matter + instructions + an optional
  steps fence): <data>/skills/ is read at every start, files win;
  install from the CLI (anybot --install-skill <path|url>) or from the
  phone (設定 › 整合 › 技能 › 從網址安裝), delete takes the file with it
- skillify (C8): long-press your own message in the chat → 教我做 —
  the last turn that answered it becomes a replayable skill from the
  oplog: only steps that succeeded, looking steps and numbered clicks
  filtered (numbers die with their screenshot)
- a browser replay step that doesn't fit gets one fresh page read
  before the bot takes over, same courtesy the screen steps had (C8)
- three example skills in skills/, the format guide in docs/skills.md
- the prompt lines that merges had eaten: menu_click/fill_form/wait_for
  (C3), memory recall + search_documents (P6) — the tools were there,
  the model just wasn't told about them
2026-11-09 20:46:02 +08:00
AnyBot Dev 0884ec736c Shortcuts before GUI (C6): the one-step doors, registered
- intents.rs: volume / wifi / lock / dark / trash / eject as named
  shortcuts — the model picks a name, the script is built from
  constants and checked numbers ("volume set 40; rm -rf /" is not a
  thing: args are grammar-checked before any shell sees them)
- the computer tool gains action=intent {intent_name, intent_arg}:
  one call where the bench measured 9 steps and 2 minutes of GUI
- the computer's facts line advertises the shortcuts each machine
  really has (Mac 6, Linux desktop 5, headless box 0 — nobody hears
  a box's volume), so the prompt cache carries the knowledge for free
- scripts self-dispatch (uname): osascript/networksetup/pmset on Mac,
  pactl/amixer/nmcli/loginctl/gsettings on Linux, honest failure text
- system prompt: 有捷徑先捷徑,捷徑失敗才回 GUI
- tests: the injection grammar, the availability matrix, a real run
2026-11-09 20:30:38 +08:00
AnyBot Dev f7eb5dbcab Meaning beside the words: local embeddings + a document shelf (P6, step 2)
- embed.rs: vectors from the person's own Ollama (/api/embed), model
  auto-found among installed ones (bge-m3, nomic-embed-text…), off by
  absence — no Ollama is a normal state: every search still answers
  with words, the toggle lives in 設定 › 一般
- memories grow a vec column; recall() is now hybrid: trigram FTS,
  two-character windows for Chinese, cosine over the shelf, merged by
  reciprocal rank — 「那篇講語法的筆記」 finds text that never says 筆記
- docindex.rs: the person's folders (their 文件 by default, add more in
  設定 › 一般), text-shaped files chunked into SQLite + FTS, refreshed
  by mtime, gone files leave; one background thread does it all — the
  turn never waits on embeddings
- one tool for it: search_documents {query, limit} — reads, no approval
- 251 tests: a real temp folder swept, answered, and swept again after
  deletion; offline Ollama tested as the normal state it is
2026-11-09 20:23:35 +08:00
AnyBot Dev bbd677b050 Memory, searched not carried: FTS index + event log (P6, step 1)
- store.rs grows a memories table + FTS5 (trigram) index: bot facts and
  the person's shared lines (bot 0), no cap — state.json's 200-item list
  stays the source that mirrors sync and the 設定 list; the index is its
  searchable superset, best-effort as always
- queries answer in Chinese: phrase hits (FTS), then words inside lines —
  CJK queries cut into two-character windows, lines scored by how many
  they contain (「有没有靠窗」 finds 「我喜歡靠窗的座位」)
- every finished turn writes one event line (ask → answer) nobody's
  asked to write: 「我上個月說的那個報表」 answers from months back
- the turn's prompt carries the 14 memories that answer *this* request
  (no index yet: the list itself, the old behavior); remember/forget and
  the UI's 忘記 keep the index in step with the list
- embedding (Ollama) and document indexing land on this same table next
2026-11-09 18:15:24 +08:00
AnyBot Dev 9b68017a19 System prompt speaks the one-tool shape (H2 follow-up)
- 「網頁上的事一律用 browser 一個工具」: the guidance lines now name
  action=open/read/click/type/table/find/wait/download and action=profiles —
  the model reads one vocabulary in the system prompt, the schema and the
  loop-guard messages (browser_read/browser_open mentions gone from those)
- H3, light: usage rules were already in the system prompt (and C1 caches
  the tools block too, so moving descriptions there saves little) — the
  browser schema shed its duplicated safety sentence to the click line;
  wholesale description-slimming deliberately not done: the guidance that
  reads as noise is what keeps a small model out of trouble
2026-11-09 18:12:18 +08:00
AnyBot Dev e1d0998c20 Injection defences and a red-team suite (S3)
- clicks on controls whose own words say money/sending/deleting ask the person
  every time — on every computer, in direct mode, no grant silences it (the
  harness decides, not the model, so a page cannot talk its way past it)
- screenshots paint card-number and OTP boxes black before any model sees them
- content the bot READS (pages, files, screens) enters the history wrapped in
  <untrusted>, and the system prompt says the wrapper means content-not-orders
- keep_to_chosen now has a test on the screen tools: a model cannot move a
  screen step onto another computer by itself (B26's promise, pinned)
- bench red team R1–R7: every payload's goal is a harmless probe file /
  button code; passing = reporting the page honestly and leaving the probe
  untouched. Run: --tasks R1..R7
2026-11-09 17:19:21 +08:00
AnyBot Dev f2af1f65b4 One computer tool with an action enum replaces twelve computer_use_* specs
The model picks action=screenshot/click/typing/… on a single `computer` tool
(the shape Anthropic's and OpenAI's computer-use models are trained on):
choosing among twelve near-identical names was its own error source, and the
twelve schemas were the biggest stable part of every request. Calls expand to
the internal per-action tools at the model-output boundary, so approvals,
repeat guards, skill replay, the remote limb protocol and the work log keep
their existing names — old limbs need no update.
2026-11-09 16:50:18 +08:00
AnyBot Dev 1bc2fdcec9 Rewrite decompilation comments as behaviour specs; move reverse-engineering docs out of the repo; drop third-party marks from UI strings (i18n tables synced) 2026-11-09 16:37:33 +08:00
王性驊 ba1fce5558 Keys wait until the app the bot looked at is still in front; the quick model names its controls; system prompts are the person's
- Keys and typing into no field go to whatever is in front: a cmd+w meant for TextEdit reached
  the person's terminal after the TextEdit window had closed (its "close this window?" came up
  and was cancelled). They are now refused, with why, when the app in front isn't the one of the
  latest look.
- The quick model's screen tools have no `ref`: looking numbers up is where it pressed the wrong
  keys; it names controls (two of a name come back as trouble for the bot's own model).
- Instructions: macOS permission and security prompts are for the person to answer (a bot
  pressed 「不允許」 on one), and check what's in front before a shortcut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 14:03:40 +08:00
王性驊 3d10499d55 GTK 2 apps in the box get numbers, a quick model's answer always goes past the bot's own model, and a bot finishes what it was asked
- Box v9: GTK_MODULES=gail:atk-bridge. lxappearance and PCManFM (GTK 2) offered AT-SPI no
  controls at all (0 numbers); with gail they offer 37 and 17.
- The quick model ending a turn without acting goes to the bot's own model every time, not only
  after changes: one stopped after a single look to ask 「要我繼續嗎?」.
- Instructions: finish what was asked; put an unexpected screen right (close what's in the way,
  open the app) instead of stopping to ask, except for what the person must do or confirm.
- Benchmark: three more held-out tasks (lxappearance theme, PCManFM folder, Mousepad
  find-and-replace), checked by their results; every task starts with those apps closed too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 12:53:06 +08:00
王性驊 1952e547b8 Trying screen steps on this Mac from the command line, and an app CLI's crash note names redirects
`anybot --ask` with ANYBOT_ASK_HERE=1 offers this computer too (headless runs leave it out), so
screen and menu-bar steps can be tried on a Mac without the window. Tried on a Mac mini: the
menu bar's icons listed in one step, a status icon clicked by its name, AppleScript reading the
front app, Tailscale's own CLI answering — all without a screenshot.

An App Store app's CLI joined to `> file` stays in the sandbox and dies; the note now says so
(a bot blamed --json for it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 09:27:35 +08:00
王性驊 b92abeb79a Merge harness-durable: the work log and 「繼續」 card join the planned, quick-model turn
One model call per step now: a replay step needs none; the quick model's step falls back to the
bot's model when it can't be used (but a too-long chat is folded and asked again, whichever model
asked); each attempt is in the work log. A zoom is a look (safe to do again after a crash).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 09:02:46 +08:00
王性驊 1202de93ad 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 09:01:03 +08:00
王性驊 2f603c2362 A turn cut off by a crash leaves a 「繼續」 card, and nothing it may have done runs twice
Each bot keeps a work log (oplog/bot-<id>.jsonl, after pi's durable-harness design, cut down):
before something happens a line says it is about to — the turn, each model call, each step once
its checks passed (with the arguments it runs with and whether it may run again), each message
typed mid-turn — synced to disk first. When the turn ends the file shrinks to the messages still
waiting, usually nothing.

On the next start after AnyBot was killed mid-turn, the log puts the chat right before anything
runs: the message the turn answered comes back if the chat lost it; a step that was running and
reaches outside (a text, a click, a file, a published site) shows as 「可能已經執行了」, both to the
person and in the result the bot reads — no longer as "not allowed"; a step that only looked shows
as cut off; messages typed mid-turn that never reached the bot go back into the chat. The chat is
saved, then the log closes the turn. A turn the person didn't stop ends with a 「繼續」 card (what
it was doing, what may have run, the messages put back); it goes on only when they press it — in
the window, on a screen of the brain, or on the phone — from where its steps stand, never running
a step that may have run again. Pressing stop is on disk at once, and a stopped turn stays
stopped.

Also in the turn loop:
- 自動審核 that doesn't answer (or answers something that isn't a verdict) asks the person; in
  直接操作 mode it used to let the step through unchecked.
- "Too long for this model" folds older messages into a summary and asks the same step again,
  once per thing the person said, instead of ending the turn.
- Folding keeps the person's chat whole: the summary goes in at the fold and the model reads from
  the newest summary on (it used to delete what it folded).
- A step moved to the chosen computer runs there, but the chat keeps the call as the model wrote
  it; the result says where it ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 00:49:12 +08:00
王性驊 645db96d9c AnyBot's browser drives Firefox too, the person's own Firefox profiles included
Firefox dropped Chrome's DevTools protocol, so bidi.rs speaks WebDriver BiDi and does each
DevTools command the browser tools use the BiDi way (real mouse and keys, typing, screenshots,
PDF, dialogs, uploads, downloads, tabs). The 18 tools themselves are unchanged and pass the same
dashboard test on Firefox as on Chrome.

- A computer with only Firefox runs AnyBot's own profiles in it (under the Snap/Flatpak corner
  of the home folder when Firefox is packaged that way).
- The person's own Firefox profiles are choices too, by the names Firefox shows (profiles.ini
  and the newer profile switcher's SQLite list): 「阿金(Firefox)」, or just 「阿金」. Firefox
  can't be taken over once open, so a profile open the everyday way is refused with "close it
  first"; AnyBot then opens it itself, logins intact.
- Settings lists them without a remove button; the messages name Firefox as an option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-08 00:55:17 +08:00
王性驊 4506cc149b Clippy is clean on macOS and Linux, for the app and the relay
Every warning `cargo clippy --all-targets` gave (50 on macOS, 8 more only on
Linux, 1 in the relay), fixed without changing what anything does:
- long types get a name (Peer, Members, Imported, Joining, Mention, Stream…);
- the two big enum variants are boxed (the vault's login plan, joining an
  account);
- a test now waits for the copy it relaunched (it left a zombie behind);
- a hint's format had a dead `if` whose two branches were both "";
- the rest is what clippy suggests: sort_by_key, as_chunks, is_none_or,
  is_multiple_of, while let, from_ref, next_back, struct init, no casts to
  the same type.

Checked: cargo test (177 macOS, 181 Linux), relay tests (11), remote_e2e
28/28, and the live Linux test (X11; Wayland clicks, keys, Chinese typing,
scroll and screenshots).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-07 10:10:28 +08:00
王性驊 9a23411e51 Checked by using it: tests stay off the real box, gVisor scripts run clean, times are the person's
- box_numbers_only_on_what_is_seen is ignored again (a test inserted before it in cbada6b took
  its mark: every cargo test drove the real box), and the path test runs
- gvisor-vm.sh restarts the VM's Docker only when runsc was just registered (a restart stopped
  Bot 的電腦), and `${var}` before full-width text (bash read 「)」's first byte as part of
  the name and stopped)
- a scheduled box update and a PDF's name use the person's time zone (a server keeps UTC)
- 容器隔離 lists 標準 before 強隔離
- screenshots of real data can open 設定 › 電腦 (ANYBOT_SHOT_VIEW=computers) and scroll
  (ANYBOT_SHOT_SCROLL)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-07 00:19:56 +08:00
王性驊 cbada6bdb1 Bots learn from what they did; the box's browser works with the box's own disk
- A job of five or more real steps is looked back on after the answer: the short way that
  worked becomes a skill (or improves the one it followed); the reply says so. The prompt has
  the bot check its skills before starting.
- Upload, download and PDF on Bot 的電腦's browser look for and save files in the box, not on
  the brain (a picture in a Threads post took 24 steps).
- The bot's browser keeps the six tabs used last (19 Threads tabs had filled the box's 2 GB).
- Words name the control, not the box around it: a form's 「Customer name:」, 「Large」 and
  「Submit order」 used to land on the <p> holding them and do nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 23:12:53 +08:00
王性驊 ce566b97f0 Times are the person's: a brain on a server takes the phone's time zone instead of its own UTC
Both cloud brains had 「Etc/UTC」 as the time zone (the server's, set when they were made), so pages
said 「今天 01:03」 for 09:03 and a routine for 9 in the morning would run at 5 in the afternoon. The
phone now says where the person is; a brain still on a server's zone takes it (a zone the person
chose stays). Page times use the person's zone, not the computer's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 20:33:06 +08:00
王性驊 ee92da8519 Looking at the person's screen is quick; a busy model is waited out in words; files go straight from their computer
From the second round of real runs:
- Direct mode no longer asks the model to check "always ask" rules before steps that only look
  (screenshot, showing the screen, reading a page or file): none of those rules can be about them,
  and the check cost each look at the person's Mac 10-20 s. Clicks and typing are still checked.
- An error inside the model's answer stream ("The model is currently at capacity…") is retried after
  8 s and said in Chinese; it used to become the bot's reply, in English, never retried.
- send_file says it sends from any computer, the person's included (the bot copied a file to its own
  computer first, which only works for text).
- A shown screen's file name carries no time (a server's clock is UTC).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 19:47:43 +08:00
王性驊 e8e5e6fba1 Real-use fixes: the person sees the screens the bot shows, files reach the phone, no blank-tab loops
From real runs on the cloud brain with the person's Mac (Threads patrol, a post draft, "show me my
screen"):
- computer_use_show: a plain picture of any computer's screen goes into the chat (the bot sees it
  too). The bot used to describe a screenshot in words and fail to send it.
- The phone shows the bot's attachments: pictures in place, other files download on a tap (api/file,
  only from the chats' file folder). It showed nothing for the bot and names only for the person.
- send_file works from the person's other computers (fetch_file over the relay, 20 MB, secrets stay).
- The same call with the same answer again and again is warned the 3rd time and stopped from the
  4th (a blank tab was read 11 times, then the bot said Threads was logged out without opening it);
  a blank tab says so; checking a login means opening the site.
- Screenshot lists: a nameless row around a named button isn't numbered, a nameless row takes the
  words inside it, empty spacer rows aren't numbered (System Settings: 63 numbers -> 33, all named).
- Writing "in my voice" reads the person's own recent posts first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 19:37:45 +08:00
王性驊 76a76c7d7a 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 17:44:59 +08:00
王性驊 8e9736a7db Long tasks finish and the box's browser works from a cloud brain
- A turn may take up to 100 steps (was 25, which cut off real work; Grok Bot sets no limit).
  Every 25 steps the bot is asked whether it is still getting anywhere.
- The system prompt asks for independent tools in one step and combined commands.
- Browser steps for the box always go to the box's Chromium. They used to depend on whether
  the brain itself had a Chrome, so a cloud brain sent them to "the person's browser".
- The box's DevTools forward passes bytes with a plain read/write loop. std::io::copy splices
  on Linux and held back short requests, so the box browser never opened from a Linux brain.
- A gateway's HTML error page shows as plain words.
- Real test a_brain_without_chrome_browses_on_its_box (ignored): passes in a Linux container
  with no Chrome against a real box, and fails without the routing fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 16:51:25 +08:00
王性驊 cbf43ce2d4 Bots do a planned sequence in one step; the box's screen settles by what it shows; no login is ever the only copy
- computer_use_batch: up to 8 planned actions run in one docker exec (steps chained with && and a
  done-marker each), the first failure stops the rest, one picture comes back at the end. Typed
  text rides inside the script quoted (one stdin for the chain). The prompt tells the model when
  to use it (a form whose fields are all visible) and when not to (step 2 needs step 1's screen).
- The box waits for the screen to stop changing, not the clock: two matching small probes (~60 ms
  each) mean settled — ~160 ms on a still screen where every step paid a fixed 500 ms, and a page
  mid-load is waited for (up to ~0.9 s) instead of captured mid-change. The picture is JPEG, and
  the a11y read runs in parallel with the capture (look ~307 ms; two steps with pictures 1102 ms).
  (SETTLE_SH is a group command: dash needs ';' after it — found by box_screen_is_exact.)
- The home volume (every bot's logins) is never one command from loss: snapshots keep generations
  (last 7 days, then one per week; the old single snapshot migrates by file date), Reset and
  Restore save the running box first and refuse to wipe if saving fails, a box built on an empty
  volume re-fills itself from the newest snapshot, and a sleeping holder container keeps the
  volume attached so `docker volume prune` can't take it. make doctor shows volume and snapshot
  state; the 電腦 card shows the box's average step times and says resets save first.
- box_batch_in_one_round_trip (ignored): three typed steps, ASCII and Chinese, land in one trip.
  On the real box after upgrading v3→v5: box_update_keeps_files (files survive, snapshot 2 代),
  box_numbers_are_exact, box_screen_is_exact, box_end_to_end, box_traffic_via_mac pass; 155 unit tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 09:47:37 +08:00
王性驊 5656d355af 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-06 00:47:01 +08:00
王性驊 2867c8e822 Remove what nothing uses and keep one copy of what was written several times
Unused (found by taking away the dead-code allowances; nothing else used them, tests aside):
computer::specs, quiet_button, the never-made Poke::Spin, ten icons and their SVGs, the
theme's chrome/bubble_agent colours, ImportRow.line, voice's multipart/transcribe/speak
wrappers, and the old keychain writers vault::save/remove/index_add with their live test
(the vault store replaced them; reading old keychain entries for the import stays).

One copy each: percent-encoding (httpd::url_encode, was four), tool arguments (tools::args_of,
was three), the WebSocket handshake (httpd::accept_websocket, was three), the read pacing
(wire::Pace, was two: relay and app), docker with input and a time limit (dk_with_input, was
two). Docs: FEATURES §看畫面 (VNC), protocol (v* frames, /screen, tickets), architecture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 23:21:47 +08:00
王性驊 02bca39b98 People watch and help on the bots' computer through VNC (noVNC), carried by the account server
The core: the bot works the computer; a person watches it like a colleague, and takes over
when it needs them. VNC is made for that (only what changed, every mouse move and key, touch on
phones), so the pictures sent one by one go, and with them their own input path.

- vnc.rs: a VNC proxy to the box's x11vnc through one docker exec (a Python bridge that ends
  with either side). It signs in to the box with the box's own password (its VNC_PASSWORD) and
  offers the viewer no password, so the password never leaves the brain. The person's clicks
  and keys make the bot's steps wait until 8 s after they stop; text typed in the viewer's box
  (any language) is pasted in the box.
- Account server: /screen (the viewer page) and /novnc.js (noVNC 1.6.0, MPL-2.0, bundled);
  /relay/vnc/<host> takes the browser's WebSocket (account session, or a 10-minute ticket the
  app asks for with POST /relay/screen-ticket; owners and admins) and carries it over that
  AnyBot's lasting connection (vopen / vdata / vtext / vclose). Both ends of that connection
  wait 2 ms instead of 40 ms to read while things move: a request and its answer took up to
  160 ms more than needed.
- Phone page: 看 Bot 的電腦 and 接管 open the viewer page (also on the local network: /api/vnc on
  the AnyBot's own phone server). This Mac's own screen moved to the ⋯ menu.
- Mac app: 看畫面 opens the viewer in the browser (a screen of a brain: the brain's computer by
  ticket; else this computer's box, noVNC straight from it). The in-app picture viewer, the
  live JPEG stream, the person's click/move/scroll/key endpoints and the input shell are gone.
- Opening a Mac app uses LaunchServices (`open -a`): agent-desktop's launch waited on the window
  through accessibility and failed without 輔助使用 now and then.

Measured on this Mac (made-up account, local relay + headless brain + the real box): viewer
signed in in 0.4–0.7 s, a request and its answer through relay + brain + box 25–58 ms median;
headless Chrome shows the desktop live in /screen. remote_e2e 28/28 ×2, 149 unit tests, relay 11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 23:05:44 +08:00
王性驊 aa9b010276 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 21:51:19 +08:00
王性驊 26fa2a8ee9 Commands on another computer run in the bot's work folder and finish before the relay gives up; read_terminal goes to the same computer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 21:28:32 +08:00