8 Commits
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
2d90e5decd |
feat: 交付確認——Bot 傳的檔案記下在哪台裝置顯示、點開沒,沒顯示出來叫醒 Bot 一次
起因:Bot 產了一張圖、send_file 回報成功、Bot 一直說「已完成」,但圖一直沒出現在使用者
的聊天裡,系統完全不知道。「完成」改成:你看得到、能用,而且系統知道你收到了。
- 附件有身分:attach::store/store_bytes 給每個附件一個編號(舊資料讀得進來,沒有回報的
附件寫出來跟以前一字不差);螢幕電腦把路徑換成本機副本時編號不變,回報一律用編號。
- 三層狀態記在大腦那則附件上:已在聊天 → 已在某台裝置顯示 → 點開了,或「顯示失敗」加
原因;每筆記哪台裝置和時間,同一台同一種只記第一次,最多 12 筆。記號和「已顯示/已
點開」只看擁有者自己的裝置;團隊成員、管理員的裝置只記下(最多 4 筆)、不叫醒。
- 誰回報:
- 手機:POST api/bots/<id>/seen(團隊成員也可以)。圖片真的載入、在畫面裡、頁面在前面
才算顯示;預覽真的畫出來(文字、表格、圖、PDF 的頁、能播的錄音影片)或存到手機才算
點開;大腦回 404/422/500 或圖片再抓一次還是解不開算失敗;斷線、408、429、502–504
算網路問題、不算。不排隊,每次開頁面每個附件每種只報一次。
- 大腦自己的視窗(「這台電腦」):卡片在畫面裡停留 0.8 秒、視窗在前面才算顯示(聊天剛
打開時從頂端畫的那一格、「回到最新訊息」捲過去的不算);點開算點開;檔案不見了算失敗。
- 螢幕電腦:api/sync/act 的 seen(大腦用它的名字記,另開執行緒送、不擋其他訊息);抓大腦
檔案被回 404 算失敗(以前完全不報),網路斷了不算。
- 裝置名稱、原因都由大腦從固定的字選,頁面送來的字不會原樣進到 Bot 那裡。
- 同步:remote_signature、msg_sig、聊天存檔的 chat_mark 都算進回報;message_json 對 Bot 傳
的附件輸出 id、delivery、seen。
- 畫面:Bot 傳來的附件下面一個灰色小記號——✓ 已在聊天、✓✓ 已在某台裝置顯示、點開過的
✓✓ 是強調色;手機點記號跳出清單、電腦版滑過看清單(每台裝置、時間、顯示/點開/失敗和
原因)。使用者自己附的檔案沒有記號。失敗不另外跳字;手機上解不開的圖也顯示原本的
「這張圖讀不到」(以前是一塊空白)。
- Bot 知道:send_file 的結果改成「已放進聊天(…附件 <編號>)…不要說使用者已經看到」;之後
的回合結果後面帶一行〔交付狀態:…〕(日期寫死,不會每天變);系統提示加一句以那個狀態
為準、使用者問收到沒照它回答。
- 叫醒:擁有者的裝置回報顯示失敗、而且還沒有擁有者的裝置顯示過,叫醒那個 Bot 一次(新的
「[交付]」標籤,視窗和手機的 WAKE_TAGS 一起改),只寫附件編號和副檔名、哪台、為什麼
(不寫檔名:檔名可能來自外面,這則訊息帶著擁有者的信任開一輪),請它換方式交付。只在
「傳出這個檔案的那一輪是擁有者開的」時叫醒:訊息管道的人、團隊成員、別的 Bot 要的檔案、
群組聊天、給使用者看畫面的截圖、支線帶回的檔案都只記下。擁有者上次說話之後最多兩次;
Bot 在忙、叫醒在排隊時別台顯示了就取消。
- docs/feature-map/deliver.md 新增子功能 deliver-confirm、使用者怎麼到、三條 verify-anybot
步驟、陷阱;FEATURES.md 同步。verify-anybot 的假模型照規則回答時多記 tool_results(這個
請求裡每個工具結果的結尾),用來證明 Bot 讀到〔交付狀態〕。
合進主線(接在手機、螢幕電腦「沒網路照樣能用」之後)
- 手機頁面:apiOnce 用主線那行(已經帶 e.status、e.unsure);離開聊天先存一份、回到聊天看
畫面裡的附件,兩個都留。螢幕電腦:兩邊新增的測試都留,離線那輪的測試附件補上新欄位。
- 合併後跑 deliver.md 時發現(以前就有、離線那輪重畫變多後才明顯):手機聊天每次重畫,
圖片都先退回檔名再載入、長高,「停在最新訊息」只在重畫那一刻判斷,幾張圖之後最新那則
被推到畫面外、也就永遠不算「顯示」。改成:已經讀到的圖重畫時直接沿用;停在底部時,
內容在畫完之後變高(圖片載入)也跟著停在底部,往上捲在讀的不動;比螢幕高的問題卡留在
它的問題那裡,不被拉到底。FEATURES.md 同步。
已驗證: cargo test 全綠(主程式 767,含 featuremap::、layout_audit::、tool_specs_are_locked、
approval_decisions_are_characterized;新增 attach、deliver_ui 6 條、remote、mirror_ui、
remote_ui、app 的 group_history 與系統提示、layout_audit 的記號滑過清單);verify-anybot
deliver.md 全部步驟照貼從頭跑過(傳檔預覽、機密不傳、伺服器上打不開、沒登入沒有發佈、
交付確認顯示/點開/Bot 讀到狀態、顯示失敗叫醒一次且重開後仍是一次),另手動驗過刪掉大腦
副本後手機記「大腦上找不到這個檔案」、已點開的不叫醒;十輪乾淨脈絡獨立審查,最後一輪無
P0/P1。
合進主線後:cargo test 774 通過;verify-approval-routing --replay 跟合併前一樣(AllSurfaces 通過、
replay 10 個都過,「改過了」的 5 段在 HEAD 就是如此);verify-anybot 在新的 scratch 上把
deliver.md、phone.md、cards.md 全部步驟各從頭跑過都通過(含「沒網路也打得開」「斷線又回來」、
問題卡一題一題走);另外實跑:往上捲在讀時,新傳來的圖不會把畫面拉回底部。合併的部分另做
一輪乾淨脈絡獨立審查:沒有 P0/P1,兩條 P2(高的問題卡被拉到底、重畫先用原檔)已修,一條
P2(超過 40 張圖時錯誤處理掛得晚,不會誤報)留著。
未驗證: 真的 iPhone/Android(Safari 的 IntersectionObserver、主畫面 App)——要實機;螢幕電腦
連大腦的真實路徑——要另一台登入同帳號的 AnyBot;桌面視窗的記號與 0.8 秒停留——要開視窗
(ABV_ALLOW_WINDOW,要使用者同意),只有行程內繪圖測試;團隊成員、管理員經帳號伺服器
回報——要帳號伺服器與第二個帳號。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5JgTkqJjkgMtrEXrn
|
|
|
|
e644d88446 |
perf+fix: 舊電腦也輕、連上才進去、送出不重複、小模型說了就做、智慧模式常開、提早壓縮
畫面省資源(舊 Intel Mac) - 聊天紀錄改成共用、寫入時才複製(src/shared.rs):側欄和聊天每一格不再複製整份聊天(約 13 MB/格) - Markdown 解析、程式碼上色依內容快取,只有串流中的那則重算 - 用內建顯示晶片(wgpu LowPower),雙 GPU 的 Mac 不再喚醒獨顯;WGPU_POWER_PREF 照樣優先 - 所有轉圈圖示限每秒 20 次(egui 內建 Spinner 跑滿刷新率);淡入、彩帶、跳轉高亮也限速 - 頭像共用一個眨眼時鐘、捲出畫面的不畫;你不在(視窗不在前面或 90 秒沒動)不眨眼 - ioreg 移出畫面執行緒;Bot 工作中每 5 秒存一次(原 2 秒) - 螢幕電腦的大腦副本每 5 秒在背景寫一次(原本每次同步都在畫面執行緒寫整份) - 手機狀態裡的指令輸出先截短再遮罩金鑰 連線(螢幕電腦 ↔ 大腦) - 連上、拿到最新資料才進去:之前整個視窗停在「正在連到「…」…」,連不上 10 秒以上可改回這台自己的 Bot - 重開只補差異:副本旁記下版本與這台在大腦的名字;第一次拉取帶 config=1、不等新消息 - 漏收一次回應只補差異(大腦保留上一份 Seen),不再整份重抓 - 送出不重複:POST 只在根本沒送出去時才重試;訊息與動作帶編號、斷線自己重送約 100 秒,大腦同一個只做一次;改動依 (client, seq) 只做一次,seq 從時鐘起算 - 斷一下還能送(排隊),真的送不到文字放回輸入框;按過的允許卡片 30 秒內不再跳出 - 獨立審查修正:動作編號加上這次啟動的標記(沿用 client 時不再撞號被當重送);等待頁以「收到第一個回答」為準、設定讀不出來照樣進去並說原因、等滿 10 秒就有離開鈕;整份重抓失敗會再要;上一次拉取失敗時帶 retry,大腦從上一份算差異;去重表滿了淘汰最舊的 - 手機頁在背景時不重畫訊息,回到前景再畫 小模型持續做(src/agent/followthrough.rs) - 回答說了要做什麼卻沒呼叫工具、或問「要我現在就開始嗎?」:告訴模型、下一步安靜地跑;動手才顯示,標記「〔到此為止〕」或又只說一次都不顯示;連兩次、一輪 12 次為限;最後一句提到刪除、付款、寄出、關機這類收不回來的事一律不提醒 - OpenCode Go 模型清單改讀新格式 api/recommended_api(舊的 endpoint 照讀) 智慧模式常開 - 預設開、/smart off 與手機都關不掉(只有管理員鎖時關);設定頁只剩逾時滑桿 30–1800 秒;輸入列不再有它的圖示 token 壓縮提早 - 門檻 70→60%(進行中 65%);估算改成英數 3.5 字元一 token;一個要求做很多步時主動把這一輪較早的步驟寫成摘要(至少 10 則),不等模型說太長 feature-map:chat.md 新增 chat-followthrough(含步驟)、chat-compact 6 成、chat-steps;autonomy.md 智慧模式一直開著(步驟改寫);account.md 連上才進去、重送與去重;settings/safety/phone 同步。FEATURES.md 同步。 已驗證: cargo test 739 通過、clippy 無新警告(含 featuremap:: 11 項、layout_audit::、新增 followthrough/shared/mirror 去重與漏收補差異測試);verify-anybot:chat.md「/ 指令」(/context 寫「到 60% 會自動」)、「說了就做」(只說「我把它整理成一頁做法文件。」後同一輪接著執行 echo ft-done 並收尾,模型那層收到提醒)、autonomy.md「智慧模式一直開著」(/smart off 回不能關,重開後 smart_mode 仍 true);審查修正後三步重跑結果相同;ctl down 無殘留;乾淨脈絡獨立審查 1 次(P0×1、P1×1 已修) 未驗證: 手機頁面畫面那一層(這台沒有 Google Chrome,無頭手機頁面開不起來,改走同一個大腦的手機 API);螢幕電腦連大腦的實際路徑(要帳號伺服器與第二台電腦:等待頁、重開續傳、斷線重送只在單元測試);真 Intel Mac 的 CPU/風扇與 LowPower GPU 實測;真的小模型(muse-spark 等)是否照提醒動手;動到審批路徑(智慧模式常開)需實機測試+人類簽名,本輪不發佈 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
|
|
|
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) |
|
|
|
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> |
|
|
|
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 |
|
|
|
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> |
|
|
|
7391e3a101 | Texture caches capped; big previews decode off the UI thread; helper processes reaped | |
|
|
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 |