Commit Graph

63 Commits

Author SHA1 Message Date
王性驊 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
王性驊 db028b0b5b Merge branch 'computer-names': every computer by name, the person's computer, hand-off, Wayland screenshot fix, E2E tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 20:57:14 +08:00
王性驊 c87d598e64 E2E: remote screenshot, click and typing; a Linux Wayland run with a full runtime folder
remote_e2e.py: with E2E_SCREENSHOT=1 a screenshot of the hands comes back to the model as a
JPEG; with E2E_TYPE=1 also a click, typing (Chinese too) and Enter in a terminal there. The fake
model no longer takes a screenshot's picture message for the person speaking. E2E_APP picks the
app to open. deploy/test/wayland: the same test on a headless sway in Docker whose
XDG_RUNTIME_DIR is full (31/31).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 20:28:52 +08:00
王性驊 70444c683c Wayland screenshots can't crash the desktop when /run/user is full
The screenshot buffer was a sparse file in XDG_RUNTIME_DIR. With that folder full
(a 1.6 GB Hyprland log), Hyprland wrote the pixels into pages that couldn't exist
and died with SIGBUS in CScreenshareFrame::copyShm. Now the buffer is a memfd with
every page reserved up front; with no room the screenshot fails in AnyBot instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 20:06:46 +08:00
王性驊 e44614736f 「我的電腦」 follows the computer the person types on, also mid-turn and after a restart
A turn started from the phone (not a computer) kept 「don't know」 for its whole run: a message
typed on the Mac while it waited on a hand-off had its 「我的電腦」 moved to the bot's own computer.
Each step now asks which computer the person last typed on, and the brain keeps it beside its
data (person-computer.txt) across restarts. remote_e2e: a second computer, and a mid-turn
message from the other one (fails without the fix); 28 checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:41:49 +08:00
王性驊 61e0531d32 One AnyBot icon everywhere; the phone page fills the screen and shows the app's bot faces
- New icon: the bot's cloud body and slanted eyes (as in the app's avatars) on a dark tile —
  the Mac/Linux app, browser tabs, iPhone home screen (PNG: it ignores SVG), Android and
  notifications. The web had its own ring-and-dot.
- anybot --write-icon out.png size [file.svg] draws any SVG (for the web PNGs).
- Phone: lists that reach the bottom keep their last row above the home bar and Safari's
  toolbar (it looked cut off); bots show their shape, colour and eyes instead of a letter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:20:29 +08:00
王性驊 ad0234d0ce Phone: the computer list waits for a brain that is restarting and goes in by itself (it sat on 離線 until tapped)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:07:43 +08:00
王性驊 60f4fa7411 Reading or using an app without 輔助使用 asks for it and says so in words (it answered PERM_DENIED and asked nobody)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 18:50:08 +08:00
王性驊 d52def0f46 A click by number reads as the element it is in the question (點 e7(按鈕「7」)), not (0, 0)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 18:25:46 +08:00
王性驊 102746d9e8 A brain's box can go by its own name (ANYBOT_BOX_NAME); the server's brain takes over its old box under anybot-brain-box
A desktop AnyBot left on the server (older build) took "anybot-box" for its own and paused it
every ~20 s as idle while the brain woke it: the bots' computer kept showing as asleep. The
brain now renames its box once (files are in the volume, kept by name) and uses that name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 18:20:45 +08:00
王性驊 06801f549d Remote brain: a computer that just came on is known at once; an offline computer is said, not swapped; snapshots survive an open browser; end-to-end test
- The brain looked the account's computers up once a minute: for up to a minute after the Mac
  came on, 「我的電腦」 was unknown and steps went elsewhere. Now every 15 s, and at once when a
  message comes from a computer it doesn't know yet.
- A step naming a computer that is off says so in words instead of running on the chosen one
  with a note that the person hadn't asked.
- Snapshots: tar's 'file changed' (the open browser) is not a failure; browser caches are left
  out; ten minutes for a large home folder.
- box_end_to_end clicks the terminal where it opened; restore only with ANYBOT_TEST_RESTORE=1.
- deploy/test/remote_e2e.py: account server + headless brain + hands + scripted model, 27 checks
  (computers, redirect, agent-desktop on the hands, hand-off 3 ways, phone view, sync copy,
  edits, hands offline/back, brain restart, clear). anybot --sample-state for such tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 18:14:23 +08:00
王性驊 46c0684cb4 需要處理: a bot hands a step to the person with its computer's live screen in the chat; the window fills to the top; the 電腦 card and viewer keep their text in place
- hand_over_computer (the original's box hand-off card): instruction, live screen with 接管,
  跳過 / 我完成了 / 接管; 我完成了 also in the viewer; a typed message answers it too. Header,
  sidebar and notifications say 等你處理 / 「{name}:需要你」; the phone shows it with 接管.
- Mac: the content reaches the top (no grey title bar); the top strip drags the window.
- Panel 電腦 card: each line stops before the picture; the brain's name on its own line.
- Viewer: buttons first, the title ends in … when narrow; the picture is centred.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 17:29:55 +08:00
王性驊 c3e2e28ec4 Only the brain keeps its box awake: a computer showing another brain leaves its own box alone
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 17:10:05 +08:00
王性驊 ab564f706f The bots' computer never sleeps; a server brain doesn't work on the server; the computer choice lives in the side panel; bots default to their own computer
- No idle pause: an asleep box is woken; its files are saved once a day instead of before sleep.
- A headless brain offers no Local computer; attachments it receives go into the bot's own one.
- 「你的電腦」 kept by older versions means the bot's own computer; only an explicit choice moves it.
- The composer chip moved to the panel's 電腦 card (做事的電腦).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 17:07:04 +08:00
王性驊 5b2c974f3c Mac permissions: ask at most every ten minutes; one fixed signing key keeps them across updates; open apps by their shown name
- Every untrusted step popped macOS's prompt and opened Settings; a remote brain's steps covered
  the screen. Now once per pane per ten minutes.
- Ad hoc signing made each build a new app to macOS, so 輔助使用/螢幕錄製 silently stopped
  working after updates (agent-desktop PERM_DENIED). deploy/mac/sign.sh signs with a local key
  kept in its own keychain under AnyBot's folder.
- computer_use_open_app finds 「計算機」 by display name and says the app opened even when its
  window can't be read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:57:44 +08:00
王性驊 6b0a0babf1 Bot settings: a short hint keeps the computer row inside its card
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:49:39 +08:00
王性驊 3132f8ce91 Every computer goes by its own name; a server brain works on the computer the person uses
- A bot's own computer is 「<bot> 的電腦」; this one and the account's others go by their names.
  The server brain picked 你的電腦 by sorted host id, so a desktop left on the server won.
- 「我的電腦」 is the computer the person typed on (the relay names it); unknown means ask.
- A step moved back to the chosen computer tells the bot so.
- Composer chip and bot settings choose the computer by name; a screen asks the brain.
- A screen's 電腦 card and viewer show the brain's computer, not this one's box.
- A screen's chat copy that falls short asks for everything again instead of appending;
  清除聊天記錄 on a screen clears the brain's chat.
- Model requests to a private address go through the person's computer first.
- Phone typing on the box sends the text the tool reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:28 +08:00
王性驊 2a24606024 A multi-step turn answers once: no narrating between tool calls 2026-11-05 16:16:25 +08:00
王性驊 1a80bfdcc2 An open browser on the box buys it four times the idle time, and an open noVNC viewer keeps it awake: a bot that opened the browser left the person a frozen screen 2026-11-05 16:11:25 +08:00
王性驊 cd3f7b5c72 A bot that is unsure which computer the person means asks first instead of picking one 2026-11-05 16:06:53 +08:00
王性驊 591626408f A server brain without hands calls its server the brain server, and tells the model which computers really exist 2026-11-05 16:03:34 +08:00
王性驊 9d8f7bbead Merge pull request 'Audit fixes: sync chain, box, desktop, install, UI (B1-B30, F1-F5)' (#5) from brain-computers into main
Reviewed-on: #5
2026-11-05 07:52:28 +00:00
王性驊 dabb4113c2 Setup quotes service paths and writes launcher and unit files atomically 2026-11-05 15:48:22 +08:00
王性驊 7391e3a101 Texture caches capped; big previews decode off the UI thread; helper processes reaped 2026-11-05 15:48:22 +08:00
王性驊 21b917b0eb Demo recording keeps its last events off the UI thread; dialogs, screensaver probe and installer traps fixed 2026-11-05 15:48:22 +08:00
王性驊 a8265409a1 Docker calls time out; the box has a VNC key, limits and sandboxed files; X11/Wayland eyes and hands stop leaking 2026-11-05 15:48:22 +08:00
王性驊 5dfb5d1c6c Routines follow the clock in each timezone; channels resume where they stopped; pages find checks the bot 2026-11-05 15:48:22 +08:00
王性驊 ca30f708ed Compaction keeps tool pairs; MCP locks per server; the chosen computer needs whole words to move 2026-11-05 15:48:20 +08:00
王性驊 caa580fce9 Export drops threads; a broken keyring stops with the secret recoverable 2026-11-05 15:48:20 +08:00
王性驊 96174c4776 Stream deltas keep tool-call slots; chunked bodies accepted; portal sessions race-safe 2026-11-05 15:48:20 +08:00
王性驊 4fa5fab870 Remote: per-IP login lock, egress peers and timeouts narrowed; brain-mirror link covered by tests 2026-11-05 15:48:20 +08:00
王性驊 80fa0cb11f Relay locks, rate-limits and answers by the real peer (proxy trust opt-in); phone page follows 2026-11-05 15:48:20 +08:00
王性驊 c1e4994219 Cloud brain uses a model on the person's network through their computer; the chosen computer is where a bot works
- A brain that can't reach a model at a private address (e.g. Qwen at 10.x) sends the request
  through its hands; the hands only forward to addresses on their own network, and only for
  their brain (uses the existing device channel, so the account server is unchanged).
- The computer chosen for a bot is binding: a step naming another computer goes to the chosen
  one unless the person's message names that one (「在我的 Mac 上」).
- Browser steps follow the computer: Bot 的電腦 drives the Chromium on its own desktop (through
  docker exec, no new port), 你的電腦 its browser; before, they always used this computer's.

Checked: on this Mac, Bot 的電腦 browsing opened example.com in the box's Chromium and an
unasked 你的電腦 command ran in the box; 「在我的 Mac 上」 ran on the Mac. Linux brain in Docker
with 10.0.0.0/8 blocked + this Mac as hands: model calls went through the Mac, shell on
你的電腦 answered from the Mac, browser defaulted to the Mac's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 15:00:31 +08:00
王性驊 4c0db53647 Replies in Traditional Chinese when that is the setting; a cloud brain's browser is the person's
- 語言 繁體中文: a reply's Simplified characters are turned into Traditional with Taiwan
  wording (zhconv), since some models (Qwen) slip despite the instruction.
- A brain on a server: browser steps go to the person's computer (its hands) unless the
  server's own browser is named; 你的電腦 is listed first.
- update_bot says the default computer it set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 14:46:42 +08:00
王性驊 94cadca1b8 A brain on a server knows which computer is the person's; the phone page opens the brain in use
- On a server brain whose hands are the person's computer, 你的電腦 is that computer;
  the server itself is 大腦伺服器 (its browser too), so 「我的 Mac」 means the Mac.
- A brain with its own hands no longer lists the account's other brains as computers.
- 查看電腦 lists the computers the bot really has, with their real names.
- Phone page: with several brains on, it opens the one the account's computers use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 14:40:01 +08:00
王性驊 8f79c33b35 Merge branch 'first-run-guide': no starter bots, a guide, sync after signing in
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 14:25:01 +08:00
王性驊 d78e75ebec First start: no bots, a guide instead; signing in syncs this computer and the account
- A new install (desktop or anybot --serve) starts with no bots; the main window shows
  「歡迎使用 AnyBot」: connect a model, make the first bot, or sign in.
- Old data whose five sample bots were never used starts empty too.
- Signing in syncs right away: an online brain of the account is used and this computer's
  bots are moved there; otherwise the backup's missing bots are taken in and backed up again.
- The five sample bots remain only for screenshots and tests (State::samples).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 14:25:01 +08:00
王性驊 5dfb086071 Merge branch 'easy-install': 頁面, Tailscale servers, hands fixes, one-step install updates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 08:53:29 +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
王性驊 b05bec66f4 Pages: phone page fits narrow screens; long stat values a size smaller; ANYBOT_SHOT_PAGE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 08:33:23 +08:00
王性驊 d2f1c76d01 Browser steps that needed a yes ran on the brain, not on the hands named
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 08:24:36 +08:00
王性驊 f2d89ca358 看圖小幫手 also looks at the newest screenshot
A model that can't see pictures got only 「截圖已拍好,但看不到」 for computer_use_screenshot.
Now the newest screenshot is described by a model of the person's that can (windows, text,
buttons and roughly where they are); older screenshots stay a short note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 08:21:34 +08:00
王性驊 cd7a4207cc Browser tools on a brain without a browser go to its hands
A brain on a server has no AnyBot browser, and browser_open/read were sent to it even when
the bot named a 手腳 computer. Now a named computer wins, and with none named the hands'
browser is used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 08:17:07 +08:00
王性驊 370dbd91f7 Hands: their own virtual screen, even next to a logged-in desktop
A service set up without a screen (over SSH, or on Wayland) used to pick up the desktop
session's DISPLAY/WAYLAND_DISPLAY from systemd, so screenshots waited for a 「分享螢幕」
answer nobody could give. Now it starts its own virtual screen; `anybot setup --real-screen`
keeps the desktop. `anybot setup --refresh-service` rewrites the start script after an update
(install.sh runs it), so joined computers pick up such changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 08:10:13 +08:00
王性驊 8615881634 Screens: a brain without a screen of its own uses its hands' screen
computer_use_* name the computer whenever the screen is another computer's, and with no
computer named the step goes to a screen that is really there (the bot's desktop, this
computer's, then a 手腳 computer) instead of a brain's missing one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 08:05:29 +08:00
王性驊 39bd19e9df install.sh: an update needs no sudo when the system packages are already there
Fresh systems still fetch the package lists first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 08:02:57 +08:00
王性驊 c71e8357b8 Hands: screen tools for the account's other computers; one pop-up per step; clearer TLS errors
- The brain's bots get computer_use_* for 手腳 (devices), as the prompt already said; before,
  they only had shell there and fell back to scrot, which can't see a Wayland desktop
- After saying yes in the 「使用電腦工具」 pop-up (it shows the step), that same step isn't asked
  again (sending messages still asks every time)
- A certificate failure says so instead of 「網路連線出了問題」
- install.sh restarts the background AnyBot after an update

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 07:56:19 +08:00
王性驊 2bc573f095 頁面: pages a bot makes and keeps up to date (like the original's tracking pages)
- write_page / read_page / list_pages: Markdown pages with versions (last 10 kept), per bot;
  the reply gets a card (title, fading preview, page icon, 頁面 · 更新時間, 最近更新), and
  [標題](page:ID) links open the page
- The page opens large: summary, what changed, the version picker, 複製 / 存成檔案 / 刪除;
  listed under 資料庫 in the right panel
- Page blocks for richer pages, in the chat's Markdown too: ```stats tiles, ```steps progress,
  > [!NOTE]/[!TIP]/[!WARNING]/[!IMPORTANT] call-outs (with tables and Mermaid charts)
- Phone: the card in chats, page links, a page view with the same blocks; charts drawn by the
  AnyBot as SVG (GET /api/pages/<id>[/chart/<n>]); members may read pages
- Bots are told to make a page for things to track and to update it from a routine only when
  there is real news
- Screenshot views: ANYBOT_SHOT_VIEW=pagecard / page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 01:41:41 +08:00
王性驊 6d6461e4f3 Server setup: Tailscale address instead of a domain, and a no-questions mode
- setup.sh offers the computer's Tailscale address (HTTPS from tailscale serve, Caddy not
  started, nothing open to the internet) — docker-compose.tailscale.yml
- ANYBOT_SETUP_USER / ANYBOT_SETUP_PASSWORD [/ ANYBOT_SETUP_DOMAIN] answer the questions,
  for scripts and deployment tools; install.sh server passes them through

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-05 01:26:33 +08:00
王性驊 71e45f054f Merge pull request 'One-step install: install.sh, fixed Linux and server builds, clearer README' (#4) from easy-install into main
Reviewed-on: #4
2026-11-04 17:10:25 +00:00