Commit Graph

11 Commits

Author SHA1 Message Date
王性驊 ace27374e6 傻瓜安裝:伺服器 sh AnyBot/install.sh server 再 make update-server 就好(自動裝 Docker、自己選網址——Tailscale 用 http、區網用自己的憑證、有 Tailscale 憑證用它的名字——自己產生邀請碼和所有金鑰,中間不問問題,沒有終端機也跑得完);不用先開帳號:大腦管理員(compose 的 brains,anybot --brains)看到有人用邀請碼註冊,就替那個帳號開一個雲端大腦 anybot-brain-帳號(自己的資料卷、帳號伺服器發的登入,伺服器不存密碼),停了叫醒、重開機回來;第一個註冊的是擁有者,只有它的大腦有伺服器上的 Docker(Bot 的電腦),其他人的大腦拿掉 NET_RAW、限記憶體、CPU、程序數,最多 20 個;更新後換成新版時新的先在舊的旁邊建好,Docker 拒絕的話舊的照常在跑,舊的確定停了才換、換不成放回舊的,管理員中途被停掉下次接回來,一直失敗的帳號隔 1、2、4…分鐘最多半小時再試。電腦登入有雲端大腦的伺服器時,先等它上線(最多約一分半)再當它的螢幕和手腳,不把自己當大腦。帳號伺服器只相信 Caddy(帶暗號)說的請求來源,大腦自己寫 X-Forwarded-For 繞不過註冊、登入的次數限制;舊的 Caddyfile 更新時自動補上那一行(舊版 mawk 也行),Caddy 檢查過才換上。
順手修:Anthropic 回「錯誤 400:Invalid signature in thinking block」時這一輪不再停下來:舊的思考內容對不上就請它丟掉(thinking-binding-controls)或拿掉重送,聊天紀錄裡也一起丟掉,之後不再撞到;手機帳號登入的一個偶發失敗的測試。

功能地圖新增 server 區(models 和地圖的 README 跟著改),FEATURES、README.md、docs/multi-device.md 也改了;計畫在 docs/plan-2026-11-install.md(S8 App 信任伺服器的憑證、S9 伺服器上裝手腳還沒做)。

已驗證: cargo test(902)、relay cargo test(29)、bash -n;在 nobledesktop 上的隔離測試機(Ubuntu 24.04、全新安裝):一般使用者 install.sh server+make update-server 不給任何設定就跑完、兩個帳號註冊後各自有雲端大腦且在線、只有擁有者的大腦連得到 Docker、偽造 X-Forwarded-For 被擋、ANYBOT_BRAINS_SKIP 停掉指定帳號、重開機後全部回來、舊版伺服器(有自己的大腦)更新後保留原本的大腦並補上 Caddyfile、程式更新只換一次、只改 .env 不換、Docker 拒絕建立時舊的照常在跑、這次的更新(大腦管理員就緒、amy 換成新版在線、沒有殘留);Debian 10 的 mawk 1.3.3 補 Caddyfile;Anthropic 真的帳號:舊思考內容對不上時這一輪照常回答、丟掉的有回報;七輪獨立審查,最後兩輪沒有 P0/P1。
未驗證: 公開網址(有網域、DNS)那條路(要真的網域);Mac App 用帳號登入後等雲端大腦再當螢幕只跑了測試(ignored 的實機測試要真的伺服器);更新中途按 Ctrl-C 把管理員開回來只讀過程式沒實際按。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2uBHmbnuWBhNzjbJm
2026-11-23 08:09:02 +08:00
王性驊 1eb88a9a60 公測前第二輪:區網直連改 HTTPS、手腳只聽大腦簽過的指令、更新驗簽章、聊天各存各的檔、視窗沒在前面也照常運作(提示音不再等你切回來)
- 區網直連:同一個埠用這台電腦自己做的憑證說 HTTPS(lantls),區網的 http 轉到 https,本機和 Tailscale 仍可用 http
- 配對碼後面帶一段不經過帳號伺服器的密鑰,大腦給手腳的指令都簽章(綁電腦、時間、只能用一次)
- deploy/update.sh、install.sh、install.ps1:記住簽章公鑰後,新版不是它簽的就不裝;make sign-setup 啟用
- state.json 只剩設定,聊天存 chats/bot-<id>.json,有變才寫;金鑰密封存檔
- 帳號伺服器:閒置連線少醒、讀取緩衝變小、請求開頭 15 秒沒送完就斷;本機壓測沒有洩漏
- 視窗縮小/被蓋住時照樣處理 Bot 的事件;任務完成也響提示音;Mac 關掉 App Nap
- 團隊成員在 Bot 忙時的訊息排隊不丟、群組沒有 @ 時看擅長分派、手機可改個人檔案
- setup.sh 對 root Docker 提出警告;收到停止訊號先收尾

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3a7riWESpv471gDgC
2026-11-14 00:40:16 +08:00
王性驊 f9a261959c version_0_1_1-alpha 2026-11-11 16:19:06 +08:00
王性驊 983a2c2f02 install.sh: stop dying on macOS at the compile step
"$RUST_HOST;" is one variable name to macOS /bin/sh (bash 3.2): it
swallows the first byte of the full-width punctuation, so with set -u a
plain \`sh install.sh app\` aborted at [3/4] with "RUST_HOST\*: unbound
variable". Four such lines in install.sh, one in the server setup.
Brace them, add make lint-sh (sh -n for every shipped script plus a
check for this pattern) so it stays fixed.
2026-11-10 14:32:56 +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
王性驊 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
王性驊 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
王性驊 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
王性驊 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
王性驊 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