Commit Graph

40 Commits

Author SHA1 Message Date
王性驊 f72c164d34 工作流多了 OpenBot 那些節點和觸發器:觸發器可以是手動、定時、Webhook、GitHub(和例行任務的事件觸發同一套);新增節點可以搜尋、分三組——輸入:提示詞、素材;步驟:LLM、助手、圖片、影片;流程:條件(是/否兩條路)、審批、輸出。重複的併掉:檢查就是條件,交付和通知你併成一個輸出。
- 觸發器:event(triggers::Trigger)跟排程二選一。Webhook 給呼叫網址(/hooks/<1000000+工作流 id>)和密碼、可複製、換一組;GitHub 給存放庫、事件(PR 合併、CI 失敗…)、Token;其他事件(Slack、新信、行事曆…)用 workflow 工具的 trigger 設,格式跟 create_routine 一樣。監看共用 channels_ui 的 triggers_poll(Watch 的 bot 0、id 1000000+工作流 id);發生了什麼放進那次執行的 input,交給第一步。
- 節點:提示詞(一段話當成上一步的結果)、素材(檔案,下一個 Bot 步驟收到附件;從聊天裡的檔案挑,大腦這台也可以選檔案)、LLM(直接呼叫模型,不用 Bot、不用工具,可選「供應商:模型」和系統提示詞,在背景執行緒跑,回來時下一次 tick 接著走)、助手(原本的 Bot 步驟)、圖片/影片(請 Bot 用自己的工具做出檔案、send_file 交出來)、條件(原本的檢查:是/否兩個點各拉線,邊帶 port;不成立而「否」沒接就停下說原因;沒走的那條路標成「沒走這條路」)、審批(原本的等你確認)、輸出(放進哪個聊天、要不要通知;舊的交付和通知你照樣跑、在右邊改時變成輸出)。
- 選到的卡片上面有「複製」「刪除」;助手、LLM、圖片、影片、條件有「試跑這一步」(只跑這一步,用前一步上次的結果,螢幕電腦也是交給大腦跑)。
- workflow 工具:kind 多了 prompt、material、llm、image、video、condition、output(deliver、notify、check、step 照舊收),trigger、files、model、system、notify、port(after 一個條件時走是或否)、connect 可以帶第三個值 yes/no;show 寫出「是:#5;否:#6」。
- 示範資料多一個工作流(ANYBOT_SHOT_TAB=2);功能地圖 workflow 補新的節點、觸發器和一步驗證,FEATURES 同步。

已驗證: cargo test 865 過(新:a_bot_builds_branches_and_the_new_kinds——工具建出提示詞、LLM、條件、圖片、輸出、Webhook 觸發,是/否 的邊和跳過的步驟,錯的觸發整次不留,舊名字變輸出;a_run_goes_through_the_new_kinds——事件的內容進第一步、提示詞交出去、素材變成附件、條件成立時跳過「否」那條、連不到的模型讓 LLM 那步失敗並說原因);clippy 沒有新的。截圖:新工作流的卡片(GitHub 觸發、提示詞、LLM、條件的是/否、圖片、審批、輸出)、可搜尋分三組的新增節點、觸發器右邊的 GitHub 設定、條件右邊的設定和卡片上的複製/刪除。
未驗證: 真的 GitHub/Webhook 觸發一次(要 token 和真的事件)、真的模型回答 LLM 步驟、Bot 真的做出圖片或影片(scratch 只有假模型);workflow.md 前五步這次沒重跑(指令沒變,只改了看到的名稱)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2uBHmbnuWBhNzjbJm
2026-11-21 20:31:38 +08:00
王性驊 4bdc1267d2 市集(計畫 C1,照 OpenBot 市集的排版):側邊欄左下角的格子圖示打開「市集」視窗(以前直接跳到 設定 › 整合 › 連接器 › 瀏覽市集)。左欄「搜尋市集」、三個分頁「連接器」(8)「技能」(內建 8+Anthropic 開源 8)「Bot 範本」(5),下面「已安裝」列加入的連接器(綠點、關掉灰點、有問題紅點寫「有問題」)和技能(最多 8 個,多的「還有 N」),點一列打開設定裡它自己的頁。右邊那類一句說明;沒在搜尋時先一排三張「精選」(還沒加入的排前面),再來「全部」卡片,至少 300 寬、一排放得下幾張就幾張:圖示(連接器名字第一個字、技能星星、範本是那個頭像)、名字、誰的(官方/內建/Anthropic/範本,要金鑰的多「要金鑰」)、一行說明,右上一顆按鈕——連接器「加入」(要金鑰的打開設定裡填好的「新增連接器」)、內建技能「加入」、Anthropic 技能「安裝」(背景裝、一次一個,結果綠字或紅字寫在說明下面)、範本「建立」(建好 Bot、打開 Bot 設定);已經有的灰字「已加入」。
按鈕和 設定 › 整合 走同一段程式:從 channels_ui 抽出 mcp_market_add、skill_add_builtin,skill_install 改成 pub(super)。卡片的按鈕放在子 Ui 裡(ui.put 會推動這一排的游標,卡片間距變兩倍、最右邊一張被切掉,截圖看到後改的);卡片區的高度照欄位剩下的算(說明下面多一行結果時不會超出對話框)。圖示顏色用 Bot 的顏色表(avatar::color),不新增調色盤外的顏色。layout_audit 多一景「市集」;截圖多 ANYBOT_SHOT_VIEW=market。

已驗證: cargo test 836 過(theme 的設計檢查、featuremap::、layout_audit:: 含「市集」);clippy 維持 12;scratch 桌面截圖(示範資料):點側邊欄左下角格子圖示打開市集,連接器 8/技能 16/Bot 範本 5,精選三張、全部兩欄不被切;技能分頁精選是還沒加入的(看報快摘、每日打卡、螢幕報表存檔),按「看報快摘」的加入 → 綠字「已加入技能「看報快摘」」、已安裝多「還有 1」、精選換成下一個;Bot 範本按開發助手的「建立」→ 側邊欄多開發助手、Bot 設定打開(名稱、描述、Soul 與指示都填好)。
未驗證: 連接器的「加入」(會跑 npx/uvx 從 npm、PyPI 下載,scratch 不對外連);Anthropic 技能的「安裝」(要連 GitHub);螢幕電腦上從市集加(走 mirror_skill 和大腦,scratch 沒有第二台);詳細頁、試試看、權限、危險區、安裝數、技能鎖檔、手機版還沒做。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2uBHmbnuWBhNzjbJm
2026-11-21 14:46:53 +08:00
王性驊 158b3f80be Merge branch 'integrations-tidy': 連接器、技能改成清單+各自的頁;等你允許的卡片按鍵修正
衝突都是兩邊各加了東西,兩邊都保留:
- mirror_ui:送給螢幕電腦的連接器狀態用有上限的 mcp_state_for_screen,加上 ChatGPT 方案的帳號狀態。
- i18n_table:ChatGPT 方案和連接器/技能頁的翻譯。
- mcp_oauth、remote:兩邊各自新增的測試。

已驗證: 合併後 cargo test 整套連跑 4 次全綠(640)。
未驗證: 實機(允許卡片的 Enter/Esc、ChatGPT 帳號登入與串流、螢幕電腦改連接器名稱)。
審批路徑的改動由使用者要求合併發佈。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3KhvSzysuKUobKUTR
2026-11-17 21:08:21 +08:00
王性驊 e48e1eb214 fix: 任何對話框開著時,Enter/Esc 都不回答等你允許的卡片
- 第七輪審查(有探測測試):只擋了設定視窗;Bot 設定、記憶、例行任務、頁面/檔案檢視、
  傳送、刪除確認等對話框開著、游標不在任何欄位時(按過按鈕或開關就是這樣),Enter 會在
  背後允許等你的步驟,Esc 會拒絕它而不是關對話框。現在任何對話框(egui 的 modal)開著都不回答。
- 沒有選項的問題卡也在任何對話框開著時不搶游標。
- 移除連接器(設定、Bot 的 manage_connectors、手機)時,它的「一律允許」一起刪掉:之後取同名
  的連接器不會繼承。
- 螢幕電腦上改名等大腦回覆時,連接器頁寫「正在請大腦改名…」、欄位暫時不能改(不然送出的修改
  會指著大腦已經改掉的舊名字)。

已驗證: cargo test 整套連跑 5 次全綠(620);enter_elsewhere_does_not_approve_the_waiting_step 加上
  「別的對話框開著」(拿掉修正時這個測試會失敗);the_brain_renames_… 加上移除時刪一律允許。
未驗證: 實機按 Enter/Esc 的手感;螢幕電腦連真的大腦改名(要兩台機器)。
動到審批路徑(approval_dock):依 CLAUDE.md 需要實機測試+人類簽名,不得自行發佈。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3KhvSzysuKUobKUTR
2026-11-17 19:22:18 +08:00
王性驊 6a4d90d935 fix: 連接器改名不走手機的路、一律允許跟著改名;在別處按 Enter 不再替你允許
- 手機的 /api/act/mcp 不收改名(區網沒加密:讀到一次登入的人可以靠兩次改名,讓別的連接器
  接手某個連接器的「一律允許」)。改名只走螢幕電腦的 /api/sync/mcp-rename。
- 改名時每個 Bot 的「一律允許」(mcp:<名稱>)跟著改到新名字;之後別的連接器取舊名字也不會繼承。
- 螢幕電腦上改名不先改本機:請大腦改,新名字隨大腦的更新回來(期間連接器的頁照舊找得到);
  大腦沒改成,兩邊都還是舊名字。沒改成的原因:還在那一頁寫在頁上,已經離開就用通知說。
- 審批:聊天裡有等你允許的卡片時,在設定視窗或別的輸入框按 Enter,會被當成「允許」
  (main 就有)。現在設定開著、或這一幀開始時游標在別的輸入框,Enter/Esc 不回答卡片。
  一張沒有選項的問題卡也不在設定開著時搶走游標。
- 測試:改名的打字測試改成照欄位 id 給游標(平行的測試會換語言、版面跟著變),
  原因用頁面記下的字比對。這兩個問題是這個測試在整套一起跑時時好時壞找到的。

已驗證: cargo test 整套連跑 8 次全綠(620);新測試 enter_elsewhere_does_not_approve_the_waiting_step、
  a_screen_asks_the_brain_to_rename_a_connector、a_connector_is_never_renamed_through_the_phones_road;
  the_brain_renames_a_connector_for_a_screen(一律允許跟著改)。
未驗證: 螢幕電腦連真的大腦實際改名(要兩台機器)。
動到審批路徑(approval_dock 的 Enter/Esc):依 CLAUDE.md 需要實機測試+人類簽名,不得自行發佈。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3KhvSzysuKUobKUTR
2026-11-17 19:08:59 +08:00
王性驊 a0e1b36a06 fix: 螢幕電腦改連接器名稱改成明確請大腦改,不再從網址猜
- 螢幕電腦上改名:排一個「把 A 改成 B」給大腦(/api/sync/mcp-rename,同一個工人照順序送,
  排在帶新名字的修改之前),大腦改它自己那一個:金鑰、密碼、在清單裡的位置、登入都留著;
  空白或同名、或不是擁有者,拒絕。連不到大腦時不改並說原因。
- 這台電腦自己改名,直接把登入搬過去。
- 拿掉從網址猜改名的兩段(大腦偵測改名、還原密鑰時用網址找):斷線時累積的「刪一個、加一個
  同網址的」可能被當成改名,把登入和密碼配給錯的連接器。還原密鑰回到只看名字(和 main 一樣)。
- feature-map 拿掉「Bot 也能改名」(manage_connectors 沒有改名);FEATURES.md 的順序照畫面。

已驗證: cargo test 全綠;新測試 the_brain_renames_a_connector_for_a_screen(位置、密碼、登入留著,
  同名、空白、非擁有者拒絕);mirror_ui 確認同網址的別的連接器拿不到密碼。
未驗證: 螢幕電腦連真的大腦實際改名(要兩台機器)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3KhvSzysuKUobKUTR
2026-11-17 18:26:52 +08:00
王性驊 406ca12dac fix: 螢幕電腦上改連接器名稱,大腦也把登入搬過去
- 改名的登入搬移改由大腦自己偵測(follow_renames,在 mcp_poll 重新連線之前):舊名字不見、
  同一個網址或指令換了新名字,就把 OAuth 登入和錯誤狀態搬過去。這台、螢幕電腦、Bot 的
  manage_connectors 改名都一樣(以前螢幕電腦上改名,搬的是螢幕電腦自己的檔案,大腦上等於登出)。
- 兩個同網址的連接器一起改名時,各自拿回自己的密鑰(每個舊的只配對一次)。
- 打好的名稱碰到連接器已經在別處被改名或移除時,說明沒有改。

已驗證: cargo test 全綠;新測試 the_brain_moves_a_renamed_connectors_sign_in、mirror_ui 的同網址兩個改名。
未驗證: 螢幕電腦連真的大腦實際改名(要兩台機器)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3KhvSzysuKUobKUTR
2026-11-17 18:17:01 +08:00
王性驊 4d85fa2746 fix: 連接器改名:離開就套用、Esc 取消、登入和金鑰跟著走
- 名稱打到一半就換分頁、換設定分頁、關設定或按側邊欄的市集:當下套用(或拒絕並說原因),
  不再留著、下次按「‹ 連接器」才突然改名。在螢幕電腦上也一樣(每一幀檢查,在提早返回之前)。
- Esc 放回原來的名稱。
- 改名後 OAuth 登入搬到新名字(mcp_oauth::rename),正在進行的登入也跟著;錯誤狀態清掉。
- 螢幕電腦上改名:大腦還原「已設定」的金鑰、標頭、密碼時,舊名字不見了就用相同的網址或指令
  找回原本那一個(網址也改了就不還原,旁邊多一個同網址的複本也不會拿到)。
- 搜尋框沒顯示時不再用舊的搜尋字;改名後不跳回頂端;「確定移除」跟著新名字;提示訊息在新增、
  移除、換頁時清掉;清單只算狀態不重建整份工具清單;螢幕電腦列不完時說「只列出前 N 個」。

已驗證: cargo test 全綠;新測試 a_connector_is_renamed_when_done…(切分頁時套用)、
  esc_puts_a_connectors_name_back、a_renamed_connector_keeps_its_sign_in、mirror_ui 的改名還原金鑰。
未驗證: 螢幕電腦連真的大腦實際改名。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3KhvSzysuKUobKUTR
2026-11-17 18:07:33 +08:00
王性驊 ce55eb1616 fix: 連接器、技能新頁面的審查問題(改名、游標、工具上限、捲動)
- 改連接器名稱:打完按 Enter 或離開欄位才改,空白或跟別的連接器同名就不改並說原因
  (以前每打一個字就改,從 github 刪成 git 會跳到另一個連接器、變成兩個同名);
  名稱還沒打完就按「‹ 連接器」也照樣套用。
- 連接器頁的每個欄位用固定的 id:重新連線時上面的工具清單一下沒了、一下又出現,
  正在打字的欄位不再失去游標。
- 工具 80 個的上限只用在送給螢幕電腦的同步,大腦本機看得到全部和完整說明。
- 換頁時捲回最上面;點 › 也會打開那一列;「確定移除」離開頁面就取消;
  連接器頁只顯示自己的訊息(不再混入訊息管道的);螢幕電腦刪掉最後一個技能也看得到結果。
- 補英、日文翻譯;技能卡的說明不再重複一句;FEATURES.md、connectors.md 跟著改。

已驗證: cargo test 全綠;新的 a_connector_is_renamed_when_done_and_its_field_keeps_the_keyboard
  用模擬點擊和打字驗證改名與游標(拿掉固定 id 時這個測試會失敗)。
未驗證: 螢幕電腦連大腦時的連接器頁、實際長時間連線中改欄位。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3KhvSzysuKUobKUTR
2026-11-17 17:55:32 +08:00
王性驊 c3e615c83c fix: ChatGPT 方案第二輪審查的 P2
- 沒有正常結束的回答(response.incomplete)算失敗,那一步的工具不執行。
- 額度用完後,沒人在看的要求(例行任務、訊息管道、檢查)先不送,直到有一次成功。
- 提早更新 token 遇到網路問題時,手上還有幾分鐘的 token 照用(以前那幾分鐘每個要求都失敗)。
- 大腦的帳號狀態隨同步送到螢幕電腦(不含 token),模型選單、Bot 設定不再一律寫「未登入」。
- 螢幕電腦和手機只打開 https://auth.openai.com/ 的登入頁;手機擋彈出視窗時說明再按一次。
- 登出時憑證打不開、沒辦法撤銷,會告訴使用者去 ChatGPT 設定中斷;兩次撤銷之間隔一秒。
- 登入成功後自動抓一次模型清單。

已驗證: cargo test 全綠(chatgpt::、providers:: 新增用量上限暫停、incomplete、提早更新失敗、只開 OpenAI 登入頁)。
未驗證: 真的 ChatGPT 帳號登入與串流;螢幕電腦、手機實機(同上一個 commit)。審批路徑仍需人類簽名。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3KhvSzysuKUobKUTR
2026-11-17 17:46:09 +08:00
王性驊 fd4aa0d1a0 feat: 連接器、技能改成「清單+各自的頁」,不再一整頁攤開
照 Claude、ChatGPT 設定頁的做法:
- 連接器:最上面「連接器(MCP)」和「瀏覽市集」「新增連接器」兩個按鈕;「已加入」每列只有名稱、
  狀態、開關和 ›。點一列進到它自己的頁:狀態、登入、重新連線、開關,「工具(N)」只列它自己的
  工具(多時可搜尋),「設定」欄位,最下面「移除這個連接器」(再確認一次)。拿掉把所有工具攤在
  一起的「可以用的工具」。市集和新增表單各是一頁;從市集加需要金鑰的,直接打開填好的新增頁;
  新增後到新連接器的頁看它連線。
- 技能:「已加入(N)」每列名稱、一行說明、開關、›(超過 8 個可搜尋);點進去看完整說明、
  可重播步數、隨附檔案、內容和刪除;內建技能包、Anthropic 開源技能、從網址安裝收進「瀏覽市集」頁。
- 螢幕電腦收到的工具清單改成每個連接器最多 80 個(原本全部合計 60 個,大的連接器會把別的擠掉)。
- 截圖模式:ANYBOT_SHOT_MCP_PAGE、ANYBOT_SHOT_SKILL_PAGE、ANYBOT_SHOT_MCP_TOOLS。

已驗證: cargo test 全綠(含 featuremap::、layout_audit:: 新加的五個頁面);截圖看過清單、連接器頁
  (含 12 個工具)、市集、技能清單、技能頁、技能市集。
未驗證: 螢幕電腦連大腦時的連接器頁(工具清單從大腦來);手機的整合頁沒改。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3KhvSzysuKUobKUTR
2026-11-17 17:43:09 +08:00
王性驊 a03f7c7458 feat: ChatGPT 方案——用 ChatGPT 帳號登入,Bot 用你 ChatGPT 方案的額度,不用 API 金鑰
- 新供應商「ChatGPT 方案」(src/chatgpt.rs):照 OpenAI 給開源 App 的 Sign in with ChatGPT。
  第一次登入註冊 AnyBot(dynamic_agent_client → oaiapp_…)並重用;PKCE、state、nonce;
  ID token 驗 RS256 簽章、iss、aud、exp、nonce;沒同意使用方案算登入但不能用(再登入會要求同意)。
- 要求走 Responses API(api.openai.com/v1/responses,store:false、stream:true、instructions),
  token 只送 OpenAI 自己的網址;收到 response.completed 才算完成;額度用完停下來給管理用量連結,
  不重試、不改用 API 金鑰。token 快到期或 401 時更新(一次一個,refresh token 會輪替)。
- 設定 › 模型 › ChatGPT 方案:使用 ChatGPT 繼續、登出、換帳號、打開登入頁、管理用量;
  連到伺服器大腦的螢幕電腦和手機也能登入(登入頁開在自己這台,打不開的那頁網址貼回給大腦)。
- Bot 工具 chatgpt_login(status、login、logout、switch_account;登出和換帳號先問)。
- 修連接器登入:封存的 token 前綴寫錯("sealed:" 實際是 "enc:v1:"),重開 App 後 token
  沒解開就被當成憑證送出,登入等於每次重開都失效。

已驗證: cargo test 全綠(chatgpt::、providers::、appctl::、remote::、mcp_oauth::、featuremap::、layout_audit::);
  授權網址的參數送到 auth.openai.com 沒被拒(302 到登入頁)。
未驗證: 實際用 ChatGPT 帳號登入、同意、Responses 串流與工具呼叫(要真的 ChatGPT 付費帳號和瀏覽器);
  螢幕電腦貼回網址、手機登入(要實機);Windows 的「打開登入頁」。
  動到審批路徑(appctl::needs_approval 的 chatgpt_login):需要實機測試+人類簽名。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 17:23:10 +08:00
王性驊 09d782bc32 fix: 獨立審查找到的問題(二):技能的工具限制、連接器登入、檢查點、監看、目標
技能的 allowed-tools(三個會讓限制失效的):
- 用部分名字讀技能時沒有套上限制;靠左寫的清單(- Read)和帶冒號的項目讀成空的;Read(docs/**) 連改檔也放行,而且 docs/../.. 繞得出去。
- 後讀的技能會把限制換掉(現在第一個的限制留著);browser、computer 寫了卻永遠對不上;參數裡的 ' 把後面全吃掉。
連接器登入:
- token 只認名字不認網址:改了網址或同名重加,舊 token 會送到新的地方。現在綁登入時的網址;移除就登出;登出後連線也斷。
- 連接器給的登入位址沒有檢查:可以指到雲端中繼資料、Docker 管理端點,或非網頁的位址。現在都要是網頁位址、過安全規則;resource 不能是別的網站。
- 鑰匙圈一時打不開時,存別的連接器會把其他 token 清空。
檢查點:還原失敗還是把檢查點丟掉;同一個 Bot 另一段對話改的檔案也被退;監看、例行任務的訊息被當成可以退回的點;紀錄檔沒有鎖。
監看:輸出滿 4 MB 之後就再也不叫;印很多又馬上結束的指令被說成「太多行停掉」。
目標:數字在動的進度(還差 7 → 還差 6)被當成同一個理由而暫停;使用者說繼續後,下一輪又跟暫停前比;做不到也撒彩帶;沒有電腦時評審連網頁都不能看。
其他:fork 技能在群組裡被吃掉(群組沒有支線,改在聊天裡做)。

已驗證:cargo test 613 通過(技能、連接器、檢查點、目標各補了斷言)、clippy -D warnings 乾淨。
沒修:Box/SSH 上非 UTF-8 的檔案檢查點會存壞(edit_file 本來就只處理文字);引用訊息再打指令不算指令(原本就這樣);Windows 的管理員 hook 檔位置一般使用者可能寫得進去(沒辦法在這裡驗)。

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-17 14:24:12 +08:00
王性驊 05085189fc feat: 連接器可以用帳號登入(MCP 的 OAuth:PKCE、自己註冊、resource),在大腦上、Token 加密存
- 照 MCP 2025-06-18:401 指的 resource metadata(RFC 9728)→ 登入伺服器的 metadata(RFC 8414/OpenID)→ 自己註冊(RFC 7591)→ PKCE S256 加 resource(RFC 8707)→ 換 token。
- 瀏覽器回到大腦的 127.0.0.1 臨時連接埠;瀏覽器在別台電腦時,把登入後那頁的網址貼回聊天(manage_connectors login 加 callback)。登入完連接器馬上重新連線。
- 設定 › 整合 › 連接器 的「登入/重新登入」(大腦本機);manage_connectors 多 login、logout(logout 先問)。
- Token 存 connectors/oauth.json,用設定金鑰同一把鑰匙加密、0600,不放連接器清單(會同步到螢幕和手機);快到期或 401 用 refresh token 換新再試一次。
- 登不進去照實說:不讓 App 註冊、不支援 PKCE、登入伺服器的錯誤、10 分鐘逾時、網址用過。

已驗證:cargo test 606 通過(假的 OAuth+MCP 伺服器:檢查 PKCE、resource、scope;瀏覽器回來、貼網址兩種都換到 token;快到期自動換新;網址只能用一次;登入前連接器說要登入、登入後連上拿到工具)、clippy -D warnings 乾淨。
未驗證:真的 Notion/GitHub 等 OAuth 連接器;設定畫面的「登入」鍵打開瀏覽器。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:08:45 +08:00
王性驊 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
王性驊 c53a7241c6 design: 技能、語音、右側面板照共用元件整理——技能列不再一排紅色刪除、語音兩列、未建立的電腦不放黑框
- 技能:已加入的技能一張清單,每列名稱+一行說明+「檢視」+開關;「檢視」在那一列下面展開全文、
  檔案和做法;「刪除」移進展開的內容裡,按兩次確認(以前每列都有紅色刪除,一頁八個);
  技能市集三段安靜清單(加入/安裝或灰字「已加入」),不再重複標題
- 語音:「語音服務」一組兩列「聽(語音轉文字)」「說(朗讀)」,右邊選服務;選了才在下面出現欄位
  (名稱在上);說明進「?」,開頭只留一行
- 右側面板:電腦還沒建立時不放舊的黑色截圖,改成淡底小圖示

已驗證: cargo test 全過(排版檢查、規格看守、功能地圖)、截圖目視(前後對照)
2026-11-16 23:01:35 +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
王性驊 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 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
王性驊 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
王性驊 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 89e280b562 連接器: 帳號密碼填了就作數(蓋掉標頭舊的 Authorization);既有連接器全欄位可編輯、改了就存自動重連 2026-11-12 21:55:50 +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
王性驊 eccdfe6293 合併: nobledesktop's connector work (list_changed refetch, dead servers restart) with the brain's connector fixes
The server's checkout had two unpushed commits (bb46dea, 41aca0a) and a merge of origin left
half done. Both kept: tools are refetched when a server says they changed (stdio and the HTTP
SSE stream), and a stdio server that died between calls is restarted by the half-minute sync.
That sync no longer waits under the table lock for a link a call is using (try_lock), and ends
dropped processes off its thread; a call that finds its link dead drops it (link state, not
the error's words). One test lock for the connection table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5Mk1tvt3gyzfzhDgb
2026-11-12 15:55:35 +08:00
王性驊 f7ce2dae0c 連接器: the brain's connectors work — a screen shows the brain's state, 重新連線, many tools are found instead of sent
- 設定 › 連接器 on a screen showed the screen's own (empty) MCP state: every brain connector read
  「未連線」 and its error never reached the person. The brain now sends its connectors' state with
  each sync; errors from the brain say 「在大腦上:」.
- 重新連線 on each connector (computer, screen → brain, phone); one that is on but not connected is
  tried again each minute; a link that died (process ended, HTTP session expired) is dropped and
  connected again instead of failing every call.
- More than 20 connector tools: none ride along. The model gets find_connector_tool (the list of
  connectors, search by words) and use_connector_tool (runs the found tool, asked like the tool
  itself). A brain with scc (82) + the market's sent ~170 tools / ~120 KB a turn, over the
  128-tool limit of many services.
- A server that doesn't start says why: no Node.js / uv, a folder not on this computer, and the
  last lines it wrote to stderr; it is ended instead of left running.
- The brain image has nodejs/npm, python3 and uv (uvx), caches on /data.
- Moving to a brain leaves connectors that name this computer's folders here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5Mk1tvt3gyzfzhDgb
2026-11-12 15:53:17 +08:00
daniel wang 41aca0a709 連接器: 掛掉的伺服器會自己活過來 — 呼叫發現斷線就踢掉連線、sync 偵測到行程已死就重啟、每半分鐘自動重掃一次,不用手動重連 2026-11-12 15:04:05 +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
王性驊 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
王性驊 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
王性驊 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
王性驊 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
王性驊 f3ccd129d6 The phone page does what the desktop does, laid out like it
A new mobile/index.html in the desktop's (and Grok Bot's) shape: the sidebar
with its sections and folders, the chat with steps, thinking, reactions, quotes
and the approval card, 對話詳細資訊, Bot 設定, routines, pages, computers and
設定. Each action goes to the desktop's own code on the app's thread
(api/act/<what> -> App::phone_act): appctl, set_pinned, restart_bot,
toggle_reaction, box_task, channels_restart and the rest. No new rules.

Keys, channel tokens and the vault never reach the phone; a model key can only
be written. Admins keep what the phone always let them do; making, changing or
deleting bots, routines, memories, pages, folders and settings stays the
owner's. The state the phone polls now carries the sidebar's section order.

Checked by using it on a preview brain: routines, memories, templates, folders,
keys, signing another phone out, approvals and a chat with a fake model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-07 03:05:12 +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
王性驊 d7ee3f5db9 AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.

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