* feat(bots): 伙伴跨设备存在:任意电脑换主力电脑、完整历史与附件、合并 Cindy
伙伴属于账号,主力电脑只决定 Agent 在哪台电脑上运行(cloud-companions.md 2026-10-16 裁决)。
- 任何一台电脑或手机都能换主力电脑:本机交出、经 device-link 请在线的主力电脑交出
(maker:companion-cloud:targets / hand-over,caps 2),或在这台电脑继续;聊天顶部显示
「在「X」上运行」。伙伴还在回复时可等回复完或停止后再换。
- 伙伴列表每个伙伴一行;已接入云端的 Cindy 不再进按电脑合并的旧入口。
- 房间保存完整对话:补传开始同步前的历史,接管导入全部对话,读取按消息时间排序。
- 主人发送的附件随对话上传到房间,其他设备可打开,换电脑时下载。
- 待办、例行任务、工作台作为伙伴偏好上传,换电脑时恢复。
- 合并多台电脑上的 Cindy(只认 Cindy 预设),同名内容另存一份不覆盖,其余停用。
- 头像只把单个字符画成文字;读过的头像经媒体总仓缓存,显示前先读本机。
- 伙伴工具 get_teammate_home / move_teammate_home。
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): keep offline chats like online and only prompt when a send is stuck
- Mirror every visible user row to the cloud room: owner input marked
autoReviewUserText was dropped, so the cloud view lost the owner's own
messages. Other sources get a 〔来自…〕 label; only hidden continuations
(autoResume, bot coordination, delegated continuation) stay local.
- Mobile: a cloud companion opens its normal (cached) chat even when its main
computer looks offline; the list and header show no offline text or dot.
The connection banner is suppressed and, once an outbox message has waited
15 s for the main computer, a notice offers to continue on another computer.
Only cloud-only rows open the cloud conversation directly.
- Desktop: cloud companions show no offline status in the sidebar; an open chat
stays for 15 s while the main computer is unreachable before switching to the
cloud conversation with "continue on this computer".
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): merge only after each copy synced, keep every same-name entry, and fix review findings
- Merge: each copy's home first sends what it has not sent yet (locally, or over the new
maker:companion-cloud:flush; busy → BUSY; unreachable/older homes merge from the cloud), and
copies are disabled only after everything, the kept task's history included, is in, so a
failed merge can run again.
- Same-name memories/skills probe for a free renamed name (-2, -3…) instead of overwriting;
merged routines get stable ids of their own; a merged todo with a taken key gets a stable key.
- Todos: a todo that left the travelling window is cleared from the cloud, but its tombstone no
longer deletes the local copy (deletes travel as marks); a travelled legacy todo is linked back
to its workbench entry by id instead of growing a twin.
- Workbench: a workbench this computer synced before is replaced by the cloud's (a tombstone
included), an unsynced one still joins.
- Mirror: a first sync before a hand-over also uploads the older history.
- Cloud view: room files load near the view, two at a time; avatar copies that failed are retried.
- i18n: use 对话 for chat history per the glossary.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): fail a merge without the kept task, and fence avatar copies to the account
- importHistory throws when the kept Cindy has no canonical task here, so the copies stay active
and the merge can run again instead of retiring them with nothing imported.
- The avatar cache captures the account and its database before downloading; a copy finishing
after an account switch is not written into the next account, and in-flight downloads and
retry pauses are kept per account.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): read the workbench strictly for the cloud
A damaged or unreadable workbench.json now fails the companion read (marked unread) instead of
reading as an empty workbench, so the uploader never tombstones the cloud copy and a hand-over
waits instead of moving without it.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): re-check each copy right before retiring it in a merge
A copy's flush now counts only when no turn started during it, and right before retiring the
merged copies each one is synced again and its cloud mark (newest preference revision and room
message) compared with what the merge read. A copy that got busy or added anything meanwhile
stops the merge with every copy active; running it again brings the rest.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): only a file that can never come becomes a name; compare whole preference lists
- One classifier (isTransientAttachmentFailure) decides, for the mirror upload, the take-over
download and the merge's carry-over alike: a file that may still come (network, 5xx, timeout,
expired signed address) fails the step so the retry brings it; only one that never will (too
large, gone, refused) stays a name in the text.
- The merge's before/after mark compares every preference key with its revision (revisions count
per key) plus the newest room message, so a new, changed or removed preference is noticed.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): migrate only from the whole room, and tell a gone file from a failing server
- A take-over or a merge reads the room to its first message (readAllRoomMessages complete mode),
failing on a cursor that does not move instead of treating a partial read as the history; the
cloud view keeps its page limit.
- A failed media download keeps its HTTP status, so a file that is gone (4xx) becomes a name
while a failing server (5xx) is retried.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(bots): remove a workbench folder by its computer and path
A folder on another computer (cloud companions) is removed with its deviceId and matched as
stored, so a Windows path is not rewritten by this Mac's path rules and removing this computer's
folder never removes another computer's entry at the same path. The companion's own remove tool
matches this computer's folders only.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): a conflicting main task fails a full sync instead of counting as sent
canonicalSession returns null only when the companion has no main task yet; conflicting canonical
links throw COMPANION_TASK_CONFLICT, so a hand-over or merge flush stops (sources stay active)
and the background mirror retries, rather than treating this computer's history as uploaded.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): ask to resume a paused Cindy instead of failing a merge part way
A paused copy is not synced, so a merge with a paused kept or merged Cindy (here or on its own
computer) now answers PAUSED, shown as "resume it in its settings, then merge", instead of an
offline or generic failure.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): commit imported history images before writing the message
A take-over imports a room message only after its images are committed to the task; a failed
commit fails the import while the message is still absent, so the retry downloads and commits
again instead of leaving recyclable cache images behind an imported message.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): publish name and avatar before the final value pass of a hand-over
The avatar upload can take a while; an edit made meanwhile was missed because the last
zero-write pass came before it. The values now go last, so that pass is the last await before
the busy check and the move.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): retry an expired signed media address instead of keeping a name
401/403 from the object store on a signed upload or download (MEDIA_UPLOAD_FAILED /
MEDIA_DOWNLOAD_FAILED) is an expired signature, signed again on the next try; the chat server
refusing a file and a 404 stay permanent and keep the file's name.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(companion): give every merged todo and routine an id of its own per source
Copies of Cindy can hold the same todo id (todos made from the same old workbench entry), so a
later source replaced the kept or earlier one. Merged todos and routines now take a stable id
derived from the kept companion, the source and the original id; a rerun derives the same ids.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* docs(companion): state why rebuilt preference keys are never tombstoned
After the state file is lost, deletions of memories, skills, routines, workbench entries and
todos that left the travelling window stay in the cloud until the next take-over brings them
back; tombstoning keys from the server could delete the only copy when the state was lost in
the middle of a take-over.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* test(bots): find the other computer's folder by path, not by drive
On Windows this computer's own temporary folder is on C: too, so the first folder starting with
C: was the local one.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
---------
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>