Commit Graph

255 Commits

Author SHA1 Message Date
王性驊 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
王性驊 63e1f5383f fix: 手機網頁——圖表讀法同桌面、看得到數字、不破版;通知開關;加入主畫面說明
- ```chart 讀法照 pages.rs chart()(只寫圖型、中文圖型名、只有標題、# 註解、|---|、缺格補 0)
- 只有一片的圓餅畫成整圈;頭尾標籤不被切;折線與多系列長條有 y 軸、每張圖附數據表;
  圖照手機寬度畫(字 12–13px);負數長條不壓標籤;圓餅圖例再多項都畫得到
- stats 漲跌與桌面同一條規則(trend = pages.rs stat_trend)
- 通知開關顯示和動作都看帳號伺服器上的訂閱;連不上時照手機上的訂閱並說明
- 「加入主畫面」說明是一條編號清單;manifest 改紙色

已驗證: node 從 index.html 抽出的程式跑 65 個圖表案例、9 個通知開關情境;無頭瀏覽器 390px 深淺截圖
未驗證: iOS/Android 實機
2026-11-16 21:33:35 +08:00
王性驊 d1207d788b fix: 看畫面的票——連結裡的票一開頁就換掉,斷線重連每次換新票
- 帳號伺服器:票只在發出後 10 分鐘內能開新連線;已連上的畫面在要票的手機還登入時一直開著;
  新增 /relay/screen-ticket/renew,換票時舊票當場作廢(最後一次使用後 10 分鐘內才換得到)
- screen.html:開頁先換掉連結裡的票;每次重連前換新票(區網用新的一次性票);
  換不到時手機用自己的登入重新要,電腦開的頁面顯示「連結已過期」並停止重試(不再無限 401)

已驗證: relay 22 測試全過(新增票證輪換測試,含 WebSocket 升級的實際狀態碼)、
node 模擬 13 種重連情境
未驗證: 部署後實機(需 make update-server)
2026-11-16 21:33:35 +08:00
王性驊 6695787989 fix: Bot 的電腦——瀏覽器埠、更新重試、螢幕對錯、看畫面不被收掉、make update-box、鎖檔
- browser_open_port 回傳並探測轉接後的本機埠(原本拿盒子裡的埠探本機:收工不收分頁,
  本機開著 9222 時還會關到自己 Chrome 的分頁)
- 自動更新重試:等待從失敗那一刻算(30/60/90…,上限 150 秒),連續失敗 5 次就停;
  自動重試不再另存快照;按「更新」重新計次
- 看畫面記下實際連上的螢幕;打字用該連線自己的螢幕,螢幕沒開就不打(不再開出看不到的新螢幕)
- box/screen:有人連著 VNC 埠的螢幕不算閒置;鎖檔改唯讀開啟,open_screens 以 bot 身分執行
  (root 建的鎖讓 Bot 開螢幕一直 ERROR=busy);box 第 13 版
- make update-box 改請 AnyBot 自己更新(anybot --update-box),用它內建的版本和設定的 Docker 主機

已驗證: cargo test 全過(新增瀏覽器埠、退避上限、螢幕對錯、被看著不收掉等測試)、clippy 無新警告、
lint-sh、bash -n
未驗證: 需要 Docker 的實機重建、盒子裡實際 reap、anybot --update-box 實跑
2026-11-16 21:33:35 +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 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 e03ec4a90c 圖表與數字卡改成閱讀向排版(Notion 風):色板、直接標數、排序、手機原生圖
研究依據(2026-10 Supernova 11 設計系統調查、IBM Carbon 資料視覺化規範、
Atlassian chart tokens、shadcn/ui chart、Tufte data-ink、EEA/Sheffield 準則):
預設單色、分類色≤6固定序、只留淡水平參考線、直接標數取代圖例與座標軸、
長條按大小排序(自有順序的標籤不排)、顏色只給意義(漲綠跌紅附箭頭)。

- theme.rs:新增 chart_cat 六色(明暗各一組,低飽和藍紫青橙粉灰)、grid、up
- 桌面圖表卡:網格只剩淡水平線;單系列長條把數字標在條上、不畫 y 軸;
  長條自動由大到小排序(月/季/年/W1/Q1/數字等自然序標籤不排);
  多條線在線尾標系列名(取代圖例);stats 數字卡大字、↑/+綠 ↓/−紅
- Mermaid:白底卡節點、細灰連線、同套六色圓餅(house_theme)
- 手機:```chart 原本掉成純文字——現在畫原生 SVG,規則與色板和桌面同款;
  stats 卡改白卡描邊、大字、漲綠跌紅;代幣進 :root/dark
- write_page 說明:排版由渲染器接手,Bot 專心把圖標題寫成結論
- 功能地圖 pages.md/FEATURES.md 同步;layout_audit 新增「頁面(圖表)」場景

已驗證: cargo test 501 全綠;layout_audit 全綠(新場景含長條排序/多線/圓餅/stats,
664/1000/1440 三寬度無出界無疊字);手機 chartMd 用 node 跑 8 個案例(排序、
自然序不排、線尾標名、圓餅佔比、tooltip、千分位、壞輸入回空)全過;
ANYBOT_SHOT=page 截圖肉眼確認
未驗證: 手機端只在 node 驗證圖表產生器,未實機開網頁看 SVG 渲染;
Mermaid 新主題未逐圖型(gantt/gitGraph)目視;深色模式截圖未拍
2026-11-16 16:43:55 +08:00
daniel wang 3c0b4d2bec fix: 手機 App 破版——工作中狀態不再凸出、卡片裡程式碼和表格在卡內橫捲、太高的允許/問題卡在卡面裡往下捲(輸入框不被頂出螢幕) 2026-11-16 13:17:25 +08:00
daniel wang b917480af1 更新 Bot 的電腦: 忙碌時按更新會排隊,閒下來自動執行;失敗自動重試(越錯越慢) 2026-11-16 11:47:11 +08:00
王性驊 5912ec6886 fix: 接管、打字、看畫面都只動自己那個螢幕;開著畫面的螢幕不會被收掉
每個 Bot 一個螢幕說好了「接管時只有它停手,別的 Bot 照做」,程式沒有照做:
任何人對任何螢幕動滑鼠打字,LAST_INPUT 是全域的一顆,所有 Bot 的電腦步驟都停
8 秒。現在記在每顆螢幕自己的按鍵時間上,person_active 只看自己那顆;電腦步驟
(computer_run)問的是自己正在用的那顆。

在 viewer 打的字(中文輸入、貼上的文字)以前永遠進共用螢幕(DISPLAY=:1),Bot
自己的螢幕收不到。現在 relay 在 vtext 上帶上這個 viewer 是替哪個 Bot 開的,
tunnel/remote 換成螢幕 key,vnc::person_typed 在 on_screen 裡貼進那個螢幕。
新 relay+舊大腦會退回共用螢幕(=舊行為),新大腦+舊 relay 也是,不會斷話。

開著畫面看的那顆螢幕不再被 10 分鐘閒置收掉:連上時 touch 一次,viewer 活著每
60 秒 touch 一次(靜止畫面不送 frame,不能掛在讀取迴圈上)。

瀏覽器那條路的螢幕已滿提示:screen_cdp_port 把 anybot-screen 的 stderr 丟了,
FULL= 進不了錯誤字串,screen_full 認不到——加 2>&1(computer 那條路早就有)。

瀏覽器清單和收工清分頁不再無端開螢幕:新增 browser_open_port 只讀 env 檔、
從不 up(老映像照 screen_sh 的規則退回共用埠),running_port 改用它;Bot 一輪
工作要用瀏覽器時照樣會開(ensure 走 browser_running)。

「開啟電腦」不再凍視窗:查「有哪些螢幕開著」的 docker 呼叫(5 秒)從 UI 執行
緒搬進背景工作。功能地圖:開著看畫面的不算閒置;viewer 打的字進正在看的螢幕。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:59:27 +08:00
王性驊 5144259c8e feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器
Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的
box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用
程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open
粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了
chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是
說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal,
說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。

LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器
Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄
都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩
一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。

實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時
記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設;
工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能
移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住
瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。

box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案
管理員。映像檔約 1.67 GB。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 10:55:05 +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
王性驊 cf05b4edf5 fix: Bot 的電腦上網頁上傳圖片送不出去;看畫面時可以跟自己的電腦複製貼上
Threads 加相片在 Bot 的電腦上一直「點不到」:Chromium 開的 GTK 檔案視窗高 822、螢幕只有
800,又沒有 GNOME 的設定服務,「取消」「開啟」放在視窗最下面、被螢幕和工作列蓋住,圖片選
得到卻永遠送不出去(完整的 Linux 桌面按鈕在頂端,所以正常)。現在 GTK 的對話框把按鈕放在
頂端的標題列,檔案視窗預設比螢幕小。在同一版映像實測:點上傳 → 進 Pictures → 選圖 → Open,
頁面收到 1 個檔案。

借鏡 LazyBoy2 的 box:跑 vncconfig,看畫面時剪貼簿跟使用者的電腦同步(共用螢幕和每個
Bot 自己的螢幕都是);websockify 每 30 秒送心跳,中間的代理不會切掉只在看的連線。

Bot 的電腦升到第 11 版(設定 › 電腦「更新 Bot 的電腦」)。功能地圖:網頁上傳檔案用
browser 的 upload。

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
王性驊 f9a261959c version_0_1_1-alpha 2026-11-11 16:19:06 +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
王性驊 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
王性驊 04e744aa14 make update: pull, rebuild and restart what this computer runs
Updating meant knowing which of three ways applied: run install.sh
again (app, hands), anybot setup --refresh-service (the background
service), or git pull plus docker compose up --build in deploy/server.
deploy/update.sh does it per part, and make has a target for each:

  make update          whatever is installed here (server, app, hands)
  make update-app      swap the app; restart its background service
  make update-hands    Linux: swap, restart the systemd unit, check it
                       is still up 3 s later (a crash loop looks active
                       for a moment)
  make update-server   docker compose up -d --build, as .env sets it up

Each pulls first (--ff-only; a conflict stops it rather than installing
the old version), and carries on with the new deploy/update.sh when the
pull changed it. PULL=0 installs this checkout as it is. Small Linux
machines compile one crate per 2 GB, like install.sh. An open app
window is told to reopen; it keeps the old copy until then.
2026-11-10 22:00:48 +08:00
王性驊 818e551e6b One computer-and-phone still, and the README stops advertising its style guide
The phone shot stood alone as a 300px column, so it read as cut off at
one side. The desktop approval card and the phone sign-in are now one
composite (docs/demo/composite.py), and every README still is dark and
2x-captured, so the page reads as one product.

The document table lists user-facing documents; the README style notes
stay in docs/ for whoever edits the README.
2026-11-10 14:21:06 +08:00
王性驊 81449be33d Readmes: the shape top-starred projects use, and no more overflow
Studied OpenClaw, ollama, Dify, AnythingLLM, Meetily, LobeHub, n8n:
logo, one-line pitch, language bar, badges, hero shot, install in the
first third as fenced blocks, quick start, architecture, a two-column
document table, short closing sections.

Both READMEs now follow that. What was breaking the page: a three-column
install table holding a 90-character URL (URLs cannot wrap, so the table
pushed the page sideways) and a 1414px PowerShell line inside a code
block. Install moved to code fences, the long line is wrapped, the
Windows hands snippet is one statement per line, and screenshots are
re-taken at 2x and downscaled to 960 px so they fit the ~980 px document
column and stay sharp on Retina. docs/readme-style.md records the rules
and how to check the render locally (marked + headless Chrome, measure
scrollWidth and pre.scrollWidth).
2026-11-10 14:14:27 +08:00
王性驊 dba6df198e Readmes: lead with the picture, and take the pictures fresh
Both languages now open with what AnyBot does, in plain words, before
the install table and the flow diagram. The four stills are re-taken
from this build (shots/readme/) and tracked, since the READMEs point at
them; the old shots/ stayed ignored.
2026-11-10 14:07:02 +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
AnyBot Dev ef44db4645 Plan: M5 complete (C6, P5, C5, P7+C8, C9 engine) 2026-11-09 20:51:33 +08:00
AnyBot Dev f829957b75 Windows has hands now (C9, engine)
- src/win.rs: the same mac:: API the harness drives, on Win32 —
  SendInput mouse (absolute, multi-click, drag, wheel), keyboard
  (macOS key codes mapped to VK, unicode text, modifiers), GDI BitBlt
  screenshot, WindowFromPoint/GetForegroundWindow for window_at and
  front_app; compiles clean against the windows crate for
  x86_64-pc-windows-msvc (API-checked, no hardware here)
- the control tree was already speaking agent-desktop-windows
- intents answer honestly on Windows ("捷徑目前是 macOS/Linux 的")
  and don't advertise themselves from the facts line
- CI: a report-only Windows compile job for wherever a Windows runner lives
- needs a real machine: multi-monitor coordinates, high-DPI, UIA-number
  clicks, Chinese input
2026-11-09 20:50:44 +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 410aa75690 Say what the walls are: SECURITY.md + threat model (P5)
- SECURITY.md (zh) + docs/en/security.md: trust boundaries (app /
  box / Docker API / relay / providers), where every secret lives and
  what a thief holding that thing actually gets, the injection layers
  with an honest limit (no absolute defense — the human at the gate
  is the last line), the network surface, the known-limits list and
  hardening advice
- state.json is written 0600: it carries model keys, and now says so
  with its permissions like the vault's key file
- README (zh + en) link it; reporting = private security advisory
2026-11-09 20:33:56 +08:00
AnyBot Dev 5f7efd7dba Plan: P6 complete (step 2: embeddings + document shelf) 2026-11-09 20:23:38 +08:00
AnyBot Dev 9ec47d2067 Plan: M4.5 done (P6 step 1) 2026-11-09 18:15:24 +08:00
AnyBot Dev 4acfd39551 Plan: M4 done (P2/S2/S5 ✅, P4 step 1) 2026-11-09 18:03:46 +08:00
AnyBot Dev 7cf8e00fdf English entry point: README.en.md, docs/en/*, demo recording guide (P2)
- README.en.md: full English front door (install table, quick start,
  deployment, security-in-one-paragraph, license) + a positioning table
  against OpenClaw / OpenHands / Khoj / UI-TARS
- docs/en/{architecture,install,multi-device,protocol}.md: faithful English
  summaries of the Chinese docs, each linking to the canonical version
- docs/demo/README.md: how to record the GIF/MP4 the README reserves space for
- language switch line at the top of the Chinese README
2026-11-09 17:56:16 +08:00
AnyBot Dev b23ac40c0b Relay 2FA: TOTP + recovery codes, argon2id, one-page logout (S2)
- login with 2FA on returns a 5-minute challenge, not a session; the session
  comes from /relay/2fa/verify with an authenticator code — or one of eight
  recovery codes, each good once (hash slot emptied)
- /relay/2fa/enroll hands out the secret (QR) + codes once; enabling completes
  only when a real code proves the app has the secret; disable proves the code
- /relay/sessions/logout kicks every device of the account from one page
- password hashes are argon2id (memory-hard, OWASP parameters); stored PBKDF2
  hashes still sign in — no forced reset, upgrade on next password change
- TOTP is RFC 6238 (vectors pinned in tests); mobile page prompts for the
  second step; protocol.md documents the endpoints
- fixes a double-lock in /relay/me found by the flow test (handlers hold one
  data guard: read through it)
2026-11-09 17:52:42 +08:00
AnyBot Dev adc4759a6b Plan: M3 done (C3/C4/C7/S3) 2026-11-09 17:20:15 +08:00
AnyBot Dev c67b07586d Plan: M1 + M2 (S4, P8, H1, C2) marked done 2026-11-09 16:54:04 +08:00
AnyBot Dev f3c7f45499 Pin the prompt-cache contract: system+tools are built once per turn (facts added before the step loop) 2026-11-09 16:45:56 +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
王性驊 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
王性驊 d3eae415c5 One AnyBot per data folder: a second copy says so instead of opening
Two copies on one folder each keep their own idea of the chats and overwrite each other's saves,
and a second copy starting up would take the first one's open turns in the work log for a crash
and close them. The window, `--serve` and `--ask` now hold an OS file lock on anybot.lock in the
data folder (flock; LockFileEx on Windows), and `anybot setup` holds it while it writes the
settings, after stopping the service and before starting it again.

The lock goes with the process however it ends, so a copy that crashed or was killed never blocks
the next one. A new copy waits up to 5 s for one that is closing (a relaunch, a service restart).
Past that, a second window shows a small notice naming the holder's process and the folder, and
`--serve` / `--ask` say it on stderr and exit 1 (launchd's and systemd's restart then retry). Each
ANYBOT_DATA_DIR has its own lock; a screenshot run doesn't take it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 00:49:42 +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
王性驊 00f6723588 HTTPS on the local network's own IP, with a certificate the server signs itself
setup.sh offers 「區網 IP」 (alone, or next to Tailscale): Caddy serves https://<LAN IP> with its
own small certificate authority (tls internal, default_sni for clients that send no name) and
hands out the root at http://<LAN IP>/anybot-ca.crt for each device to trust once.
docker-compose.lan.yml binds Caddy to that address only, so it sits beside tailscale serve.

The app now accepts, for the account server, the certificates this computer trusts as well as
the built-in public ones (HTTP and the WebSocket alike), so it connects once the root is
trusted; before that it says what to install instead of "the certificate is wrong".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-07 21:27:07 +08:00
王性驊 81e87545cd Each job works on its own tabs; a Lima VM the box lives in is started when it's down
- Bots share a browser (the box's Chromium has one profile). Every step acted on the tab in
  front, so two jobs at once read and clicked on each other's pages and one finishing closed
  the other's. A job (named, and the name rides along to another computer's browser) owns the
  tabs it opens or lands on, popups it clicks open included; its steps use its latest one, and
  another job's tabs are never used, listed or closed. When it ends it closes only its own.
  Real run on the box: two jobs at once each read their own page with the other's in front,
  both tabs survived both endings; a popup was read by the job that opened it.
- A Docker host that is a Lima VM's socket and doesn't answer (the Mac restarted): AnyBot
  starts the VM (limactl start, at most once in 5 minutes), and a step that needs the box
  waits for it. No login item needed. Real run: the VM stopped, AnyBot had it back in 10 s;
  the box then woke on use, still gVisor with Chromium's sandbox.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-07 00:50:29 +08:00
王性驊 4605b317d8 Bot 的電腦 can run under gVisor: its own kernel, Chromium's sandbox back on
容器隔離 in 設定 › 電腦: standard (runc, the container is the only wall, Chromium runs
--no-sandbox) or hardened (runsc: a virtualized kernel, all capabilities dropped but the few
the desktop needs, ANYBOT_BOX_SANDBOX=1 turns Chromium's own sandbox back on). Box image v7.
deploy/mac/gvisor-vm.sh makes a Lima VM with Docker + gVisor for a Mac (started at login),
gvisor-migrate.sh moves the box's files and logins there.

Checked and finished before committing:
- the hardened choice is offered only on a Docker host that has runsc; a box set to it on a
  host without it opens the standard way and says so (it used to not start at all)
- the settings row shows what the box really runs on, and when 更新 is needed
- no swap only under gVisor (a standard box keeps Docker's default)
- the migrate script sees the running Mac app ("AnyBot", not "anybot")
- the VM script starts an existing VM by name, checks runsc and the kernel from the Mac
- the version test says 7

Real run in the Lima VM: desktop, VNC, numbered controls, xdotool and screenshots work; no
Chromium process has --no-sandbox, renderers run with seccomp and their own namespaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-07 00:03:25 +08:00
王性驊 ece88bf2fe Plan: smoother computer use and box logins that survive a rebuild
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 22:06:49 +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
王性驊 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
王性驊 c0dfef0995 Docs: 頁面, Tailscale servers, no-questions install, hands' virtual screen and updates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 08:35:47 +08:00
王性驊 472a004f87 One-step install: install.sh, fixed Linux and server builds, clearer README
- install.sh (curl | sh): app, hands, server and deps modes; installs system packages
  (right names per release, e.g. libasound2t64 on Ubuntu 24.04), Rust via rustup (1.95+),
  Docker for the server; limits parallel compiles on small machines
- Server Docker image: add the ALSA build/runtime packages (the build failed), cache the
  cargo registry and target between rebuilds, JOBS build arg
- 加一台電腦 now gives a line that installs AnyBot on a blank computer before joining it
- Makefile: make deps installs Rust too, make doctor, clear message when Rust is missing/old
- README rewritten: one line per use, getting started, update/remove, troubleshooting,
  deployment options; docs/install.md and multi-device.md follow it
- Tested on fresh ubuntu:24.04 (app) and debian:12 (curl | sh hands) containers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 00:52:10 +08:00
王性驊 867732bd73 make, README and docs: build and install from source
- Makefile: make / run / install / uninstall / deps / test / serve / setup /
  hands / relay-run / server / dist / clean (macOS and Linux).
- README.md and docs/: install (all platforms, data locations, troubleshooting),
  multi-device (brain, hands, screens, pairing, what the offline messages mean),
  architecture (layers, data, security, sync, keys, hands, picture helper),
  protocol (relay and AnyBot endpoints, WebSocket frames, sync ops), release
  (packaging, Gitea Actions, Linux and Mac runners).
- install.sh --deps-only, bundle.sh KEEP_APP=1 (used by make deps / install).
- FEATURES.md: the multi-device part is done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 22:16:45 +08:00