Commit Graph

276 Commits

Author SHA1 Message Date
Lizi
95263fb5e0 Merge pull request #6344 from makecindy/fix/remote-agent-codex-sandbox-paths
fix(remote-agent): 转换 Codex 沙箱权限里的路径,两端系统不同时非完全访问档也能执行
2026-10-18 00:57:03 +08:00
fmfsaisai
d748021b2a fix(remote-agent): 沙箱用户目录对不上时用本机的,盘符按 Agent 的路径约定判断
- userHomeDir 对不上虚拟工作区时换成本机用户目录,不再删掉:Codex 缺了它会把 ~/… 规则当解析失败、一律拒绝读取。
- file:///C:/… 只在 Agent 是 Windows 时才去掉盘符前的 /;POSIX Agent 的 /C:/secret 是普通路径,禁止条目照常保留。

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
2026-10-17 22:45:09 +08:00
fmfsaisai
a863da6099 fix(remote-agent): 没映射上的沙箱禁止 glob 一律保留,不再依赖绝对路径判断
此前按"像不像绝对路径"决定是否丢弃没映射上的 glob,\*.pem、a:*.pem 这类相对禁止规则会被误判丢掉。
现在禁止 glob 一律原样保留(相对的由本机按工作目录解释,Agent 主机的绝对路径在本机匹配不到东西);
读写 glob 只在明确是绝对路径时丢弃,判断不准只会少放。

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
2026-10-17 22:33:33 +08:00
Chris
f08f5abf07 Merge upstream/main into import-bot-row
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-17 21:31:58 +08:00
fmfsaisai
bd8383b3bb fix(remote-agent): 转换 Codex 沙箱权限里的路径,非完全访问档在两端系统不同时也能执行
Codex 在非完全访问档下给 process/start 与 fs/* 带 sandbox,其中目录和权限条目是 Agent
所在电脑看到的 file URI。原样转给任务所在电脑的 exec-server,两端系统不同时被拒
(invalid sandbox permission path URI)。中继现在把虚拟工作区内的路径换成本机路径,
Agent 那台电脑自己的目录只丢读写授权、保留本机合法的禁止条目,只收不放。

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
2026-10-17 21:22:21 +08:00
Chris
1864b3b0ad feat(bots): 导入伙伴时消息机器人单独勾选,并从原 Agent 停用后由伙伴接管
- 预览新增 bots 分类:Hermes 覆盖 Telegram / Discord / 飞书 / 企业微信 / 钉钉,
  OpenClaw 覆盖 Telegram / Discord / 飞书,只列给账号实际路由到的 Agent;
  其它 Agent 共用的机器人默认不勾,来源里已停用的标「原来已停用」。
- 主人推断:唯一允许用户 / home 频道 / 唯一管理员;2–5 个候选拆成互斥选项,
  更多或没有则标「需处理」。
- botTakeover:先确认伙伴可接,再用来源原生命令关掉开关并回读确认;Hermes
  按 gateway_state 判断是否在线,必要时 gateway restart(parked profile 从不重启)
  并轮询到放手;随后建伙伴连接,失败则还原原开关。进度写入回执可断点续接,
  命令参数不带任何凭证。
- 新 client primitive companion-import-bots-v1 门控:旧控制端仍按原 connections
  路径导入,不停来源。Desktop 与 Mobile 界面、五语言文案与文档同步更新。

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-17 21:03:57 +08:00
Lizi
0fcdaf6968 Merge pull request #6323 from makecindy/dash/mobile-html-preview-flash
fix(html-preview): 减少重复打开闪动并在后台校验后更新页面
2026-10-17 20:32:42 +08:00
Lizi
f5f50bdabb Merge pull request #6287 from makecindy/feat/remote-agent-session-limits
feat(remote-agent): 支持设置每台设备和整机远程任务数量上限
2026-10-17 19:37:02 +08:00
Dash
9c77652474 fix(html-preview): 后台更新保留当前内页导航
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-18 00:36:37 +13:00
Dash
abb6249062 fix(html-preview): 减少重复打开闪动并在后台校验后更新页面
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-18 00:36:36 +13:00
Lizi
91f1c5d6b5 Merge pull request #6325 from makecindy/dash/weak-network-followups
fix: 修复大文本预览并减少弱网下重复同步与后台争用
2026-10-17 19:34:11 +08:00
Lizi
2380e85e8f Merge pull request #6322 from makecindy/dash/provider-group-model-cooldown
fix(provider-group): 按模型隔离限额冷却,避免误封整台电脑
2026-10-17 18:54:00 +08:00
Dash
8bc30ef559 fix(mobile): 校验当前订阅确认并限制传输诊断日志预算
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 23:45:51 +13:00
Dash
d28d4d5e17 fix(mobile): 合并任务恢复读取并补充弱网传输统计
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 23:45:51 +13:00
Dash
bb68157ddc fix: 修复大文本预览并减少弱网后台争用和诊断噪声
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 23:45:51 +13:00
Dash
7832800fbe fix(provider-group): 按模型隔离限额冷却
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 22:49:16 +13:00
Dash
3cd2c5925e fix(usage): 修正三种 harness 的 token 速度计量与收尾显示
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 22:31:31 +13:00
Dash
231aef386b fix(files): 移除跨请求后台复验合并
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 19:58:33 +13:00
Dash
630074901b fix(files): 拒绝交付复验不一致的导出结果
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 19:43:59 +13:00
Dash
9faaf17594 merge(main): 合并 HTML 弱网预览并收敛缓存刷新
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 19:13:04 +13:00
Dash
4ba3c93031 fix(preview): 合入主干并对齐缓存预览的取消与后台校验
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 17:53:40 +13:00
Lizi
3cdd240883 Merge pull request #6288 from makecindy/dash/weak-network-preview
fix(device-link): 改善弱网传输与远程网页预览恢复
2026-10-17 12:38:02 +08:00
Dash
532ed255a8 fix(mobile): preserve cached bytes and release consumed staging files
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 16:22:49 +13:00
Dash
16229d33f0 fix(files): 修复共享取件兼容并复验 HTML 缓存
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 16:01:32 +13:00
Dash
83be7aaac3 perf(files): 统一远程文件缓存并后台检查更新
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 16:01:31 +13:00
Dash
999794f71e fix(chat): 收紧缓存覆盖顺序并保护实时正文
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 15:50:30 +13:00
Dash
b73b8e7c02 fix(device-link): 改善弱网传输与远程网页预览恢复
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 10:29:22 +08:00
Dash
06abdd38f6 fix(chat): 保留完成补读目标并用本地序号接管缓存
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 15:21:27 +13:00
Dash
06df3c9ad7 fix(chat): 统一桌面和手机任务缓存更新与完成补读
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 14:57:10 +13:00
Lizi
78a5b2e045 Merge pull request #6284 from makecindy/dash/shared-request-compression
perf(device-link): 复用设备压缩并按字节判断收益
2026-10-17 09:30:35 +08:00
fmfsaisai
8a3e7a116c Merge origin/main into feat/remote-agent-session-limits
Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
2026-10-17 09:25:35 +08:00
Lizi
7aabec3868 feat(desktop): add provider usage history for shared providers (#6279)
* feat(desktop): add provider usage history for shared providers

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(desktop): bound provider usage history expansion

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(desktop): scope published remote approval requests

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(docs): restrict usage preview filter state updates

Signed-off-by: Lizi <jiali@magiclizi.com>

---------

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-17 09:07:50 +08:00
fmfsaisai
be08631e7c fix(remote-agent): preserve limit overrides and keep idle runs alive
Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
2026-10-17 08:59:38 +08:00
Dash
a73d42db2b refactor(device-link): 将压缩复用收缩为设备传输
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 13:35:12 +13:00
Dash
295a0678a6 perf(transport): 复用设备压缩并压缩模型大请求
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 13:35:11 +13:00
fmfsaisai
99892c476b feat(remote-agent): 支持配置每台设备和整机任务数量上限
Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
2026-10-17 08:30:36 +08:00
Dash
48a8321cb6 feat(bots): 伙伴跨设备存在:任意电脑换主力电脑、完整历史与附件、合并 Cindy (#6257)
* 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>
2026-10-17 05:18:59 +08:00
fmfsaisai
a5c4c4a3fe fix(remote-agent): Agent 在 Windows、任务在 Mac 时命令与报错里的路径转换
Agent 跑在 Windows、任务在 Mac / Linux 时:
- Agent 按 bash 规矩把双引号里的 Windows 路径写成 `"C:\\Users\\..."`,转换只认单个分隔符,
  命令原样送到 Mac 执行而找不到目录。Agent 写回本机的方向(命令、正文、写回文件)现在也认
  转义的 `\\` 分隔符;后面不是目录名的 `\\` 仍按转义原样保留。
- Mac 的报错里带着这段 Windows 路径回给 Agent 时,`\Users` 被当成本机的 `/Users` 再投影一遍,
  Agent 看到一串乱掉的路径。Mac / Linux 路径现在只认 `/` 分隔符,紧跟盘符的 `C:/Users` 也不再匹配。

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
2026-10-16 22:46:26 +08:00
Dash
3ef0ca1e30 fix(desktop): 隔离长期图片预算并阻止清理后迟到写回
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 02:05:22 +13:00
Lizi
8252935c73 Merge pull request #6205 from makecindy/dash/remote-file-performance
perf(device-link): 复用独立文件长连接并持久缓存远程文件
2026-10-16 20:27:13 +08:00
Lizi
53b2c99854 Merge pull request #6224 from zqchris/cindy/silent-hopper
fix(helper): 支持跨设备归档与取消归档任务
2026-10-16 19:48:46 +08:00
Dash
8d21c8bb98 fix(device-link): allow owner-safe file connection teardown after cancellation
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 00:11:27 +13:00
Dash
b26e6badd5 fix(device-link): derive SSH versions from stable remote identity
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 00:07:15 +13:00
Dash
73815e1976 fix(mobile): 路径采样不依赖调试记录开关
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 00:07:14 +13:00
Dash
5b38d896ef perf(device-link): 复用独立文件长连接并持久缓存远程文件
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 00:07:13 +13:00
Lizi
007af518ea Merge pull request #5857 from zqchris/fix/remote-device-version-delete
fix(device-link): 显示设备版本并支持确认删除在线设备
2026-10-16 18:18:11 +08:00
zqchris
8964db9d31 fix(helper): preserve uncertain remote status write outcomes
Signed-off-by: zqchris <chrisz83@gmail.com>
2026-10-16 17:24:02 +08:00
zqchris
84c9fa6694 fix(helper): support cross-device session unarchive
Signed-off-by: zqchris <chrisz83@gmail.com>
2026-10-16 17:13:38 +08:00
Lizi
8dc47a6c77 fix(remote-agent): 保留文件路径写法并修复远程文件链接 (#6180)
* fix(remote-agent): preserve file path spellings and remote links

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(remote-agent): preserve shell and plan path semantics

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(remote-agent): align reverse path mapping with file resolution

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(remote-agent): retain originals for Codex write handles

Signed-off-by: Lizi <jiali@magiclizi.com>

* Revert "fix(remote-agent): retain originals for Codex write handles"

This reverts commit 373ae71f72.

Signed-off-by: Lizi <jiali@magiclizi.com>

* test(remote-agent): verify pinned Codex file write protocol

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(remote-agent): normalize junction path projections

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(remote-agent): cover portable junction paths

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(remote-agent): preserve command and alias boundaries

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(remote-agent): map quoted PATH lists without changing filenames

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(remote-agent): preserve quoted cmd PATH lists

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(remote-agent): recognize common environment path lists

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(remote-agent): preserve dynamic path suffixes in scripts

Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(remote-agent): preserve unchanged dynamic path spellings

Signed-off-by: Lizi <jiali@magiclizi.com>

---------

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-16 15:18:30 +08:00
zqchris
96142eac07 fix(device-link): prevent deleted devices returning from cold cache
Signed-off-by: zqchris <chrisz83@gmail.com>
2026-10-16 14:31:54 +08:00