AnyBot/docs
王性驊 6a6d905ede fix: 連接器的工具也照「一律詢問」和自動審核——直接操作不再讓連接器一律直接做
連接器(MCP)的步驟由 steps.rs 的 Connector 自己決定問不問:「一律允許」過或直接操作開著就做,
其他一律問。它從來不經自動審核(review_action 只有 OnComputer 叫),所以:
- 直接操作時,連接器的步驟連「一律詢問」規則都不看就做(autonomy-still-asks 說會問;
  預設那條「用我的帳號發文、留言,或傳訊息給別人」對 Slack、GitLab 這類連接器正是要擋的);
- `connector(…)` 樣式規則(autonomy-patterns)對連接器完全沒作用:詢問的不問、允許的照樣問;
- 用一般的話寫的規則也不給審核員看。
修好前的證據:新加的 4 個測試在舊程式全失敗(app 層的那個:用設定的開關打開直接操作、
「一律詢問」寫 connector(calc-direct__add),結果 sum=5、沒跳卡片)。

修法(一處):OnComputer 的第 7 步(自動審核/直接操作)抽成 steps.rs 的 reviewed(),
OnComputer 照舊用它(行為不變),Connector 也用它:第 6 步「一律允許」過的照舊直接做,
沒有的交給 reviewed()——符合「一律詢問」就問、沒有「一律允許」;符合允許就做,結果最後寫
「(自動審核:符合…,直接允許)」;直接操作只看「一律詢問」。用 use_connector_tool 叫的照它
真正的工具名稱比對(簡稱 "add" 也擋得住);審核員讀全部的參數,卡片照舊只列前 160 字(多的寫「…」)。
一律放行照舊全放。
鎖檔:tool_specs_are_locked、approval_decisions_are_characterized 都沒有 diff(工具定義和
decide() 沒動;連接器的決定不在那張表裡)。

交人決定(沒改):「一律允許」過的連接器(每個連接器一條 mcp:名稱,整個連接器的工具都算)不再看規則,
跟指令、檔案一樣照第 6 步先於第 7 步。一般的卡(不符合規則的工具)有「一律允許」,按了之後同一個連接器
符合「一律詢問」樣式的工具也不再問;地圖的 autonomy-patterns 和陷阱照實寫了。要改成樣式規則蓋過
連接器的「一律允許」是產品決定。

獨立審查(乾淨脈絡、照 autonomy/safety/connectors 審 diff):沒有 P0;P1 是 autonomy-patterns 那句
「一定問」沒寫「一律允許」過的例外——已改。P2 已改:審核員只看到前 160 字的參數、直接操作變慢補一條陷阱。
P2 沒改(範圍外,記著):中文名稱的連接器樣式要寫代碼;hook 的「ask」加上規則的卡會跳兩張;
hook 的「allow」省不掉連接器的卡;區網的手機能移除「一律詢問」規則。

功能地圖:autonomy 的「審核、樣式規則」從走不到改成真的步驟「連接器照規則問」(手機開的自動審核+
connector(echo__e0)+審核員),直接操作那一半寫走不到(區網 403)和最接近的測試;connectors、
safety 的陷阱和關卡順序、FEATURES.md 第 16 節和連接器權限跟著改。

已驗證: 全部 cargo test(不帶金鑰、DOCKER_HOST 指到不存在)673 通過,含新的 a_connector_ask_rule_stops_direct_mode、
  a_connector_step_in_direct_mode_is_reviewed_by_the_sentence_rules、a_connector_allow_rule_lets_it_run_and_an_ask_rule_wins、
  rules_about_other_things_leave_a_connector_alone、direct_mode_still_asks_a_connector_step_its_ask_rule_names;
  clippy -D warnings、lint-sh、verify-approval-routing run.sh --replay(跟基準一樣);
  verify-anybot:autonomy 每一步可跑的照 md 原文冷跑全過(target/verify-anybot/20261118-173659,最後的程式),
  connectors、safety 也冷跑全過(-172146、-172210,卡片截斷那一行改之前;它們的參數都不到 160 字),
  另一輪實跑一律放行照樣放行(-171612)
未驗證: 直接操作那一半和「無需詢問直接允許」規則的實機(直接連線的手機打不開直接操作、加不了允許規則,
  要電腦上的視窗或帳號連線),改由 app 層測試用設定的開關走;桌面視窗的卡片樣子(沒開 desktop-shot);
  真的遠端連接器;--ignored 的實機測試(要實機 Mac)
未簽: 動到審批路徑——要人類簽名才能合併,沒有合併、沒有推

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5sXAsDLzxz6UZJgoC
2026-11-18 17:37:53 +08:00
..
demo docs: README 重寫——跟上這一週的功能,圖從現在這版重拍 2026-11-18 08:10:55 +08:00
en version_0_1_1-alpha 2026-11-11 16:19:06 +08:00
feature-map fix: 連接器的工具也照「一律詢問」和自動審核——直接操作不再讓連接器一律直接做 2026-11-18 17:37:53 +08:00
specs 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
architecture.md 傳送: a file or a few words from any device of the account to any other 2026-11-11 10:04:13 +08:00
install.md design: Bot 的電腦的桌面也換成思源黑體(第 14 版),拿掉粉圓 2026-11-16 22:18:32 +08:00
memory.md 記憶: each bot keeps its own, remembers like a person, and decides for itself 2026-11-11 09:35:59 +08:00
multi-device.md 傳送: a file or a few words from any device of the account to any other 2026-11-11 10:04:13 +08:00
plan-2026-11-computer-use.md Plan: smoother computer use and box logins that survive a rebuild 2026-11-06 22:06:49 +08:00
plan-2026-11-engineering.md refactor: 工具呼叫改成 TurnTool trait:28 個工具照原本的順序排成一張清單,不再是一長串 if 2026-11-17 13:43:57 +08:00
plan-2026-11-improvements.md 記憶: a page to see it, a few lines picked while typing, a local model 2026-11-11 07:46:50 +08:00
protocol.md 傳送: a file or a few words from any device of the account to any other 2026-11-11 10:04:13 +08:00
readme-style.md Readmes: the shape top-starred projects use, and no more overflow 2026-11-10 14:14:27 +08:00
release.md make, README and docs: build and install from source 2026-11-04 22:16:45 +08:00
skills.md version_0_1_1-alpha 2026-11-11 16:19:06 +08:00