Commit Graph

685 Commits

Author SHA1 Message Date
Lizi
1c2a16e99f Merge pull request #5666 from zqchris/pi-subagent-delegation
fix(pi): 完善子代理控制与结果回传
2026-10-10 02:45:40 +08:00
MagicLizi
adf640a281 Merge branch 'feat/provider-groups': 供应商组第一期——按组分配与自动换电脑
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-10-10 00:45:43 +08:00
Dash
a82e1d9ecb fix(media): 持久保存任务图片并修复旧消息失效引用 (#5661)
* fix(media): 持久保存任务图片并修复旧消息失效引用

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 通过 IPC 确认图片缺失并保留重复引用说明

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 保留跨账号回滚补偿并修正临时目录与加载动效

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 补齐 clientId 历史窗口的图片恢复

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 统一附件与工具图片的缺失诊断

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* test(media): 构造跨平台的无 host 图片 URL

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 统一输出超限图片收口与消息引用提交

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 流式结束后重试图片并避免解码失败循环

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 清理外发图片共用链接的本地目标

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 输出超限附件复用远程任务读取边界

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 导入前拒绝网络路径并明确中断边界

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 正文与附件复用同一次图片导入

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 远程任务复用出站图片引用清理

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(media): 引用清理与任务图片发布共用串行入口

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-10 00:35:39 +08:00
MagicLizi
5dac4c61d7 feat(desktop): 供应商组第一期——按组分配与自动换电脑
一台电脑上的供应商可以把同账号其他电脑、收到的分享里的同一个供应商合成一组:
新任务按组策略(最少占用 / 轮询 / 按顺序 / 按权重,单台并发上限)选一台运行;
那台撞到用量上限、登录失效或连不上时,自动交接到组里下一台并继续,同一轮每台最多试一次,
全部失败才交回原有的报错与额度重置后自动继续。用户在换电脑途中接手时立即停下。

- 组设置与任务绑定按账号存在本机 JSON,不改数据库与远程 Agent 协议
- 设置页新增「供应商组」一行;分享管理页扩成「远程与分享」,上方是供应商组
- 换电脑的活动记录与组不可用错误文案(桌面与手机,五种语言)
- 规则文档 docs/product-rules/provider-groups.md 与交互稿

Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-10-10 00:21:48 +08:00
Lizi
d817306eb8 Merge pull request #5614 from zqchris/restore-server-group-parity
fix(bot-groups): 补齐服务器群聊安排判断与讨论输入
2026-10-10 00:01:26 +08:00
zqchris
fbe445cb83 Merge remote-tracking branch 'upstream/main' into pi-subagent-delegation
Signed-off-by: zqchris <chrisz83@gmail.com>
2026-10-09 23:38:34 +08:00
Chris Zhang
f3225d0798 feat(chat): 支持长期可重复的群邀请与单链接撤销 (#5674)
* feat(chat): support reusable group invitation links and single-link revocation

Signed-off-by: zqchris <chrisz83@gmail.com>

* fix(chat): clear invite revocation wait state after owner generation updates

Signed-off-by: zqchris <chrisz83@gmail.com>

* test(chat): cover invite revocation IPC trust boundary and update local QA

Signed-off-by: zqchris <chrisz83@gmail.com>

* fix(chat): use standard modal layer for invite revocation confirmation

Signed-off-by: zqchris <chrisz83@gmail.com>

---------

Signed-off-by: zqchris <chrisz83@gmail.com>
2026-10-09 21:48:51 +08:00
Chris
a64cab538e Merge main and preserve trusted joins with group parity
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-09 21:47:00 +08:00
Dash
7cdf45d59a perf(mobile): 回首页不再整份重拉各电脑任务列表与自动化索引 (#5668)
* perf(mobile): 回首页不再整份重拉各电脑任务列表与自动化索引

首页被任务页等盖住时保留 sessions 订阅,增量补丁照常进镜像;回首页只补拉可能漏过
推送的电脑(离开期间收到 reseed、拉取失败或离线、离开时已不在同步范围),后台、重连、
离开超过 10 分钟或首轮未完成时仍走整轮重拉。

自动化角标同理:离开期间收到自动化事件的电脑才在回首页时刷新;任务页打开普通任务时,
若当前索引表明它未绑定自动化,就跳过标记已读用的索引读取。

另加 dev-only 的 device-link 按通道流量计数(只计数,不含内容),用于实测。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(mobile): 截断列表与被跳过的角标刷新回首页时补拉

- 列表被 LIST_LIMIT 截断的设备,离开期间收到任何列表推送即判为需重拉:
  截断窗口的成员变化(归档后第 N+1 条、窗口外任务因活动排进来)本地补不全。
- 自动化角标刷新先登记待补刷、成功应用后才清除:hydrate 后的延后刷新因首页失焦
  被跳过、或在途结果被丢弃时,回首页照常补刷。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(mobile): 账号切换前启动的自动化索引扫描不再回填绑定记录

clearSessionScheduleIndexCache 推进缓存代次;扫描完成时代次已变则不写任务绑定记录,
避免旧账号结果在失效版本归零后被新账号误信。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(mobile): 整轮重拉成功提交前保留回首页的整轮标记

退后台、重连、离开过久或首轮未完成时的整轮重拉请求带序号,只有在它之后开始的
loadHome 整轮成功提交才清除;设备清单读取失败或被跳过时,下次回首页仍整轮重拉,
不降级为只补拉设备行。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(mobile): 任务页标记已读后本地应用 read 事件

被控端对已读过的 run 标记为 no-op 时不广播 read;任务页成功标记后在本地应用同一
read 事件,使共享索引缓存失效,首页在前台时刷新、被盖住时登记待补刷,角标不再残留。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(mobile): 整轮重拉请求统一由 startSilentHomeSync 登记

所有整轮同步触发(首次、回前台、重连、需整轮的回首页、依赖变化)都先登记请求再尝试
执行,只由之后开始的 loadHome 整轮成功提交清除。去掉重连 effect、退后台与回首页三处
分散登记;触发时仍聚焦、设备清单返回前失焦退出的整轮同步同样保留请求。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* test(mobile): 自动化事件集中失效断言改认 noteScheduleEventInIndexCache

事件仍经同一入口失效共享索引,只是改由 noteScheduleEventInIndexCache 统一处理并顺带
维护任务页绑定记录;源码断言随之更新。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-09 21:37:39 +08:00
Chris
5ac6bd3fd1 Merge main and adopt strengthened remote catalog test
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-09 21:36:51 +08:00
Dash
923a38762c fix(remote-desktop): 立即关闭本地窗口并兜底断线锁屏 (#5548)
* fix(remote-desktop): 立即关闭本地窗口并由远端兜底断线锁屏

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(remote-desktop): 补齐锁屏偏好与退出恢复时序

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(remote-desktop): sync mobile exit lock preference immediately

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-09 21:04:24 +08:00
Chris
242f6dc8a8 Merge main and preserve group plan and auth recovery behavior
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-09 20:52:10 +08:00
Lizi
9ab1ca4842 Merge pull request #5664 from zqchris/cindy/pensive-noether
fix(bots): deduplicate delegated task completion notifications
2026-10-09 20:14:49 +08:00
Dash
ebf0c1604e feat(agent): 统一 Codex、Claude Code 和 Pi 的异步提问流程 (#5658)
* feat(agent): 统一 Codex、Claude Code 和 Pi 的异步提问流程

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(agent): 修复异步提问卡片结算与同步问题交错

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(maker): 保持异步提问期间的循环与停滞保护

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(agent): isolate async answers and require root provenance

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(codex): 替换异步问题时收起旧卡片

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(codex): 跳过异步提问不投递空答案

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(agent): keep Codex async questions on the native path

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-09 19:57:30 +08:00
bobo
0c0a2e5776 fix(auth): 阻止群聊认证失败触发反复续期 (#5672)
* fix(auth): 阻止群聊认证失败触发反复续期

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(chat): 保留认证退避期间的已完成回复

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(chat): 及时释放被心跳拒绝的待提交执行

Signed-off-by: xd-bobo <caojianbo@xd.com>

---------

Signed-off-by: xd-bobo <caojianbo@xd.com>
2026-10-09 19:57:03 +08:00
Lizi
24f9578d66 Merge pull request #5632 from makecindy/dash/mobile-sent-message-cache
fix(mobile): 保留已发送消息直到本地历史缓存接管
2026-10-09 19:30:18 +08:00
zqchris
a64f86a588 fix(bots): await source ownership across completion notification paths
Signed-off-by: zqchris <chrisz83@gmail.com>
2026-10-09 17:05:25 +08:00
zqchris
ea45fddb8e fix(pi): 完善子代理控制与结果回传
Signed-off-by: zqchris <chrisz83@gmail.com>
2026-10-09 17:05:01 +08:00
zqchris
9fc1b0ebc1 fix(bots): deduplicate delegated task completion notifications
Signed-off-by: zqchris <chrisz83@gmail.com>
2026-10-09 16:37:12 +08:00
Lizi
4967ef4e6c fix(remote-agent): 用量余量读 Agent 所在电脑的账号
远程供应商(远程 Agent)的任务里,桌面底部用量 chip 拿供应商 id 去读任务所在电脑的同名账号,本机没连那个订阅时一直显示「等待配额数据更新」,连了则显示本机账号的余量。

- 桌面:按 Agent 所在电脑(含挂着的换位置意图)选账号:另一台同账号电脑经 device-link 读它的 maker:usage:* 镜像(与模型选择器同一份),远程控制的任务把 Agent 放在第三台读第三台、放在控制端自己读本机;分享来的供应商、共享任务访客、没指定来源时只显示任务价值。
- 手机:任务菜单的账号余量与来源/登录名改读 Agent 所在那台,任务价值与上下文仍读被控电脑;Agent 不在被控电脑时不提供被控电脑的 Codex 限额重置。
- 不新增 channel,wire 不变。

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-09 11:55:49 +08:00
Chris
3bae5ca454 merge: sync latest remote provider changes before delivery
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-09 11:13:23 +08:00
Chris
71a19e315c docs: record phone group acceptance and waiting-plan recovery
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-09 11:09:04 +08:00
Lizi
9fb59bb93c fix(remote-agent): 远程控制下新建任务也能选到第三台电脑的远程供应商
新建任务时选了另一台电脑(B)当任务电脑,模型列表此前只列 B 的供应商,选不到同账号其他电脑开放的远程供应商(只有选本机时才有;手机新建与远控已建任务都能选)。现在与手机新建同口径:B 的 maker:provider:list 带 remoteInvocationEnabled 标记时,模型面板先列 B 的全部供应商,再列其他电脑开放了「允许被远程调用」的供应商;选中后任务仍建在 B 上,maker:create-session 带 agentDeviceId,Agent 在那台运行。

- 草稿的模型目录改按运行 Agent 的电脑;权限档沿用 B 的草稿值,被那台能力清单夹掉时也回落 B 的值、不掺控制端本机偏好。
- 不把那台的模型写进 B 的新建草稿记忆,也不跟 B 推来的档位;选回 B 的模型时照常写穿 B。
- 默认来源解析、提交给 B 的来源与协同 Worker 收窄只用那台开放的供应商。
- 候选电脑去掉 B 本身与控制端自己,不并入本机收到的分享(同远控已建任务);换任务电脑即清空选择,B 的目录暂时读不到时保留已选的电脑。
- 输入框下方在任务位置提示后另显示「Agent 在 X 上运行」,新增 5 语文案。
- 被控端、协议与服务端无改动。

验证:
- desktop typecheck 通过。
- 定向 11 个测试文件 314 条通过;test:unit:related(apps/desktop)通过。
- check:i18n / check:i18n-glossary / check:dev-docs / check:brand-terminology 通过。
- 推送前两轮对抗性 review:首轮无 P0,5 条候选已修复;复核无 P0 / P1。
- 未做三台电脑联调;Light / Dark 未实机目检。

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-09 11:00:36 +08:00
Chris
567ec9a228 merge: sync current main and preserve group parity fixes
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-09 10:34:27 +08:00
Dash
a0327ce33a fix(mobile): 保留已发送消息直到本地历史缓存接管
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-09 15:15:06 +13:00
Chris
c08163a55d docs(chat): record review regression acceptance
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-09 09:10:59 +08:00
Lizi
2a6f9126dd feat(remote-agent): 远程控制另一台电脑的任务时也能选到第三台电脑的远程供应商
A 远控 B 上的已建任务时,模型列表在 B 自己的供应商之后,另列同账号其他电脑开放了「允许被远程调用」的供应商,与手机同口径。选中那台电脑的模型先确认,下一条消息发送时把 Agent 挪过去;Agent 已在第三台电脑时,模型按钮按那台的目录显示,也能改回 B。

B 投影的任务带 agentDeviceId 字段才开放;旧被控端、共享任务访客、SSH 任务维持原样。B 收到的分享与控制端自己作为落点暂不列出,Agent 正在这类位置上时保持原来的 B 目录。被控端、协议与服务端无改动。

验证:
- desktop typecheck 通过。
- 新增 controlledTaskAgentLocation(8 条)与 controlledTaskRemoteAgentPanel(5 条)测试;把 ModelSelector 退回旧实现时面板测试失败 2 条。
- 依赖 ChatInput / ModelSelector / CCAgentSessionView 的 57 个测试文件、1111 条通过。
- check:dev-docs 通过。
- 未做三台电脑联调;Light / Dark 未实机目检。

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-09 02:41:51 +08:00
Chris
689ba044a8 fix(bot-groups): coordinate server planning and attachment delivery
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-08 22:33:21 +08:00
MagicLizi
a5a7ba35b6 feat(mobile): pick remote and shared providers when creating a task
The new-task model sheet on the phone now lists the providers that the
user's other computers open for remote use and the providers shared
with the controlled computer, in the same sections as the in-task
model sheet. Picking one creates the task with agentDeviceId (the same
create-session parameter Desktop uses), so the Agent runs there while
the task and files stay on the controlled computer.

- The pick is kept apart from the draft: the draft's model and source
  keep following the controlled computer's catalog, and the pick is
  folded in at creation (ordinary and goal) for that computer and Agent
  only. Saved drafts restored for editing split it back out.
- The controlled computer's catalog guard and sign-in gate don't apply
  to a remote pick; the computer that runs the Agent checks it on the
  first message.
- Offered only when the controlled computer's provider list carries the
  remoteInvocationEnabled flag (added with remote Agent support), not
  for shared-task guests, and not together with a collaboration draft
  (its first Worker model comes from the controlled computer).
- The model pill shows the remote catalog's model name with the remote
  badge; the accessible name includes the computer name. The optimistic
  session row carries agentDeviceId.

JS only; no native fingerprint inputs change.

Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-10-08 22:01:07 +08:00
Chris
bb6bfb55c8 fix(bot-groups): restore server planning and discussion input parity
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-08 21:51:49 +08:00
Chris
39dc6b00b1 fix(bot-groups): restore plans and member management, diagnose attachment sends
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-08 21:32:32 +08:00
Lizi
2734d64d3e fix(provider-share): let invitees pick shared models; list shares with providers
Invitees could see a shared provider but not select it: their model
picker and send gate also read the owner's agent capabilities, available
agents and agent readiness, and the owner's computer refused everything
but the provider list.

- Owner: provider-share guests may now read maker:get-capabilities,
  maker:list-available-agents and maker:agent:status. Each answer is
  narrowed to the shared provider: capabilities keep only its models,
  available agents only the agents it serves, readiness only
  binaryReady/authReady (no local path or login identity).
- Invitee: the renderer's share:<id> reads pass these channels through.
- Settings: "Providers shared with me" moves from the bottom of the page
  into the provider list as its own group; selecting one shows its
  source, status, the models it offers (read-only) and Leave. "Paste
  share link" sits at the end of the group. The manage-sharing entry
  uses a share icon.

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-08 18:47:57 +08:00
liugaowei
a140aad062 merge: 同步 main 并保留两项协议兼容说明
Signed-off-by: liugaowei <liugaowei@xd.com>
2026-10-08 17:11:49 +08:00
Chris Zhang
f913fbb2c3 fix(bots): 显示持久化入群系统提示 (#5585)
* fix(bots): render persisted group membership notices

Signed-off-by: zqchris <chrisz83@gmail.com>

* fix(bots): preserve system notice fallback and reply semantics

Signed-off-by: zqchris <chrisz83@gmail.com>

---------

Signed-off-by: zqchris <chrisz83@gmail.com>
2026-10-08 16:26:22 +08:00
DavidShenXD
d3873e96e2 fix(desktop): 补齐远程新建菜单的附件、计划模式和插件 (#5570)
* fix(desktop): 补齐远程新建菜单的附件、计划模式和插件

Signed-off-by: DavidShen <david@xd.com>

* fix(desktop): 修复远程菜单测试与计划模式创建边界

Signed-off-by: DavidShen <david@xd.com>

* fix(desktop): bound remote plugin composer catalog

Signed-off-by: DavidShen <david@xd.com>

---------

Signed-off-by: DavidShen <david@xd.com>
2026-10-08 15:36:01 +08:00
Dash
9901baa9f2 fix(auto-review): IM 审阅器看得到用户回复/引用的消息与附件 (#5564)
* fix(auto-review): IM 审阅器看得到用户回复/引用的消息与附件

IM 渠道里用户回复一条消息问「这啥情况」时,Auto 审阅器只拿到「这啥情况」本身,
看不到被回复的消息和图片,指代式提问后的相关查询会被误判拒绝。

- 新增宿主盖章的引用证据(被回复/引用的消息、本条附件数),经 Main 专属的
  MAIN_OWNED_SEND_CONTEXT 进入 appendAutoReviewUserIntent,三个 harness 共用;
  只挂在当前消息上,独立限长,不占用户原话预算,wire 同名字段不收
- 个人 IM(turnRunner)取渠道 adapter 的 replyContext,官方 Hook 取
  source.threadContext 最近一条,统一走 projectAutoReviewUserReferences
- 审阅器把引用放进 <review_input> 之后的独立低信任块并转义,规则写明它不构成
  授权;无引用时审阅 prompt 逐字不变
- 远程 Agent wire 可选透传并在解码时重新投影,旧对端忽略
- 补单测、三个 harness 的 wiring 测试与 live eval 用例;同步规则文档

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(auto-review): 官方 bot 回复目标在截短前取,引用包装不挤占原话预算

- Hook dispatcher 在 normalizeTaskSource 展示截短(只留最早 20 条)之前,从服务端
  原始 source.threadContext 取排除当前请求后的最后一条作为回复目标,单独随
  run.autoReviewReplyTarget 交给 runner;runner 不再从展示数据推断
- 仅为携带引用而包装出的意图对象在限长前还原为原话字符串,接近 2,000 字的
  原话不再因包装被整条省略
- 补长 X 回复链、Slack 不推断与近预算原话的回归测试,同步规则文档

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(auto-review): 官方 bot 回复目标优先按 replyToMessageId 解析

触发消息明确回复某条消息时按 replyToMessageId 找父消息,父消息不在链中不猜;
只有没有回复关系时才回退为排除当前请求后的最后一条。补单测与文档。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(auto-review): 审阅只用 adapter 交给模型的回复投影

个人 IM 不再把 event.replyContext 原值交给审阅器,改用 prepareAgentTurnText
返回的 replyContext:飞书注入扫描拦下的引用以占位传递,未交给模型的回复
(如企业微信、飞书私聊)审阅器也不看。补飞书、Telegram 与 handler 测试并同步文档。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-08 15:23:16 +08:00
Lizi
2656f84618 feat(provider-share): share remote providers with other Cindy users
A user can share any provider that already allows remote use with
users of other Cindy accounts. The Agent keeps running on the sharer's
computer with the sharer's login; the invitee's files and commands stay
on the invitee's computer. Product rules: docs/product-rules/
provider-sharing.md; cross-repo contract: docs/provider-sharing-
contract.md (server side lands in cindy-server).

Sharer (Desktop main):
- one-time 5-minute links, approval with a 4-digit pairing code,
  pause/resume/remove, notifications without the pairing code;
- invitees (provider-share peers) may only use maker:remote-agent:v1
  and a provider list filtered to the shared provider; subscriptions
  and every other channel are refused, late results after revocation
  are rewritten to ACCESS_REVOKED;
- guest isolation for Claude Code, Codex and Pi: open payloads are
  allowlisted (no hooks/env/apiKeyHelper, neutralized out-of-tree @
  imports and ! commands), no host personal config, managed skills,
  roster or contacts rules, guest-only resume, Codex in a separate
  CODEX_HOME with read-only token access, Pi without host context;
- per-invitee, per-model usage in userData/remote-agent (no schema
  change); pausing ends tasks at once, removal also deletes the
  invitee's shadow workspace, attachments and Agent transcripts.

Invitee (Desktop):
- apply dialog from deep links or a pasted link, waiting state with
  the pairing code, withdraw, leave;
- shared providers appear in the model list as
  "{provider} · {device} · 来自 {owner} 的分享"; tasks bind with
  agent_device_id = share:<shareId>;
- cross-region shares (server switch, default off) use identity cards
  and an in-memory share credential on a second relay connection.

Mobile: reads the controlled computer's received shares for the model
list, localizes the new errors, and only says "open on a computer" for
share links (JS only, runtime fingerprint unchanged).

Protocol: Envelope.providerShare scope with capability
provider-share-v1 (append-only; old relays and clients keep same-account
routing), new same-account channel
maker:provider-share:received-catalogs.

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-08 14:31:04 +08:00
liugaowei
9d6e1ee216 fix(billing): 提示预付下一期时暂不能升级
Signed-off-by: liugaowei <liugaowei@xd.com>
2026-10-08 13:35:40 +08:00
Dash
5888d140db fix(desktop): 补齐远程任务三个入口的自动跟进图标 (#5559)
* fix(desktop): 补齐远程任务三个入口的调度绑定图标

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(desktop): 精简远程绑定传输并保留实际触发频率

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-08 12:41:21 +08:00
Dash
10b0f3e01a feat(telegram): 官方 bot 进度、终稿、交互卡与命令菜单改由客户端经 msg.op 发布 (#5550)
* feat(telegram): 官方 bot 运行中进度消息改由客户端渲染、经 msg.op 驱动

checkpoint(第 1 步, 未发布):
- 协议: 新增双向能力 telegram-progress-ops-v1; msg.op 可选 purpose='turn-progress'
  (requestId 必填, 仅 send/edit); msg.op.result 可选 errorCode(服务端拒绝码,
  MESSAGE_OP_ERROR_*)与 channelErrorCode(Telegram 原生 error_code 透传)。
- 官方进度复用个人 bot 同一个过程载体(streamingText 新增 startTelegramProgressCarrier,
  依赖拆成 TelegramProgressDeps / 终稿依赖), 桌面端只实现 msg.op 版 send/edit;
  回执未知时原样重发同 opId 同正文。
- HTML 被拒回落、not modified、429 退避抽到 lizi-im outboundPolicy, 个人 bot 的
  callSend / sendRenderedChunk / editHtml 改为调用同一份判据(行为不变)。
- 单帧上限统一为 TELEGRAM_PROGRESS_FRAME_MAX_CHARS(两侧唯一出处)。
- 未协商时行为不变; turn.progress 照发(续 lease); 终稿仍由服务端发布。
- 台账与协议兼容文档同步。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* feat(telegram): 官方 bot 成功终稿、交互卡与命令菜单改由客户端经 msg.op 发布

checkpoint(第 2 步, 未发布):
- 协议: 新增 telegram-final-ops-v1 / telegram-card-ops-v1 / telegram-commands-v1;
  msg.op purpose 扩为 turn-progress | turn-final | interaction-card(附属字段
  finalPart / interactionId / interactionClosed 由 parse 联动), send 可带 effectId,
  edit 的 buttons:[] 表示清空键盘; turn.end 可带 clientFinal{complete};
  新帧 provider.commands.set; 新拒绝码 TURN_UNAVAILABLE。
- 官方一轮的进度与成功终稿共用个人 bot 同一个 handle(startTelegramTurnCarrier):
  finalize 的 Rich → HTML → 纯文本、分段、落地后删过程消息两侧同源; 附件经 media
  发布。发布前先把 turn.end 写进持久出箱, 未完整确认则 clientFinal.complete=false
  交回服务端重发, 终稿必达不降级。只覆盖普通成功轮次。
- 交互卡用个人 bot 的 layoutTelegramCard 渲染并经 msg.op 发布与收口; 明确被拒时
  回落 interaction.request。
- 官方命令菜单以 botCommands 注册表为准, 按 en/zh/ja/ko 下发; 补官方独有命令的
  五语菜单文案(effort 按术语表用「推理强度」)。
- streamingText 新增可选 sendFinalChunk 与同步 turn carrier 工厂, 个人 bot 行为不变;
  卡片布局从 buildCardPayload 抽成 layoutTelegramCard。
- 台账与协议兼容文档同步。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* refactor(im): 渠道 /stop 与 hook task.cancel 改走统一明确停止

第 3 步批次 1(未发布):
- maker-ipc 新增导出 stopSessionTurnExplicitly: 撤自动续跑与退避簿记、取消上下文
  溢出恢复、暂停 Goal、coordinator.stop(唯一一次 abort + 清待决交互)、等队列快照
  落盘。伙伴群聊 lane 与伙伴委派原来各抄一份内联序列, 改调它。
- 个人 IM stopActiveTurn(含微信)改调它, 不再自己 abort; 官方 hook task.cancel 经
  新增的 stopSessionExplicitly 注入调它; 账号边界中止仍是普通 abort(不暂停 Goal)。
- 新增 docs/dev-rules/im-turn-flow.md(入口账本、状态清单、不变量、状态模型、迁移
  批次与待决项), AGENTS.md 索引与台账同步。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* refactor(im): 个人 IM 与官方 hook 新建任务改经 openSession 模型准入

第 3 步批次 2(未发布):
- 新增 im/shared/openChannelSession.ts: 准入前的路由送进公共入口 openSession(与桌面
  新建任务同一套模型准入 / Git 初始化 / 账号代次校验), 建行回调拿准入后的路由; 只回写
  渠道显式给过的字段。
- 个人 IM sessionRepo.createSession(确定性 id upsert)与 createFreshSession(/new 轮换
  事务)、官方 hook 新任务的 maker.createSession 与 /new 的只建行都经它; 复用 / 接管 /
  复活既有任务不经过准入。准入拒绝时抛出, 由各自既有的渠道失败提示收口。
- live session 仍各自 maker.createSession(改走 bootstrapSession 会新增项目上下文等
  注入, 列为待决)。im-turn-flow 与台账同步。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(telegram): 卡片发布器随轮次收口释放, 附件名对齐服务端上限

- 每轮的卡片发布器在 drain 后从账号切换停止集合里摘掉, 不再只增不减。
- 终稿附件名截到 256 字(服务端执行器上限), 避免整轮终稿因文件名过长交回服务端。
- im-turn-flow: 批次 3–5(排队走 coordinator、一轮流程合并、交互挂起表合一)按 Dash
  决定另开 PR, 记下 coordinator 接管整轮生命周期这一前提与对应的待决行为。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* docs(telegram): 命令菜单按服务端实际实现改为只存内存、每次握手重发

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* docs(telegram): 同步服务端私聊草稿终稿与命令菜单语言口径, 补草稿模式终稿交回测试

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(telegram): 收敛首轮 review —— 带附件终稿交回服务端、停止不受 Goal 落盘阻挡

- 带附件的成功轮次不再由客户端发布终稿(持久出箱只存文本, 上传中途退出会丢附件),
  整轮随 turn.end 交给服务端; 删除客户端 media 发布路径与附件限额判定。
- 客户端正在发布终稿时重连, 不重放出箱里的兜底 turn.end。
- Rich 终稿收到任一确定 4xx(含退避后仍 429)回落 HTML, 与个人 bot 同一判据。
- 统一明确停止与桌面 Stop 同序: 先中止, Goal 落盘失败在中止之后才报错。
- IM 新任务在路由锁内、轮换事务前复核账号代次。
- msg.op purpose 只认自有键, 继承属性名拒收而不抛异常。
- 台账: 官方命令菜单已接线、分发仍在服务端; 终稿口径同步。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(telegram): 一轮的出站 msg.op 只走所属账号代次的连接

drain 超时后仍在途的卡片操作(如 429 退避)、迟到的收口编辑与重试, 都经发送器取连接;
换账号后同名 connectionId 可能已是新账号的连接。卡片发布器、进度 / 终稿载体与旧卡片
路径的发送器改为绑定本轮账号代次, 换账号后视同离线。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(im): 账号代次从读取前算起; 终稿兜底屏障保持到正式 turn.end 入队

- 渠道新建任务在读取旧任务 / 默认配置之前捕获账号(captureChannelAccount; 先 prepare
  再建的沿用 prepare 时捕获的), 经 openChannelSession 带进 openSession 复核。个人 IM
  createSession / `/new` 与官方 hook 新任务同一判据。
- 发布客户端终稿时的「不重放兜底帧」屏障保持到正式 turn.end 进入发送 / 缓冲路径
  (中间还隔着卡片 drain)。
- im-turn-flow.md 不变量补上终稿屏障、停止顺序与「一轮绑定入口时的账号」。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* style(im): openChannelSession 按 prettier 格式化

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(telegram): 终稿段回执未知先有界对账; 出箱写不进兜底时不走客户端终稿

- 终稿段回执未知时同 opId 同正文最多原样重发 2 次(与卡片共用 MSG_OP_UNKNOWN_REPLAYS):
  服务端有应答时回显原结果, 不再因直接交回而多出一份答案; 仍未知才 complete=false 交回。
- 发布前的兜底 turn.end 写不进持久出箱时不发布客户端终稿, 整轮交给服务端。
- 文档: 重放上限与服务端「每个 opId 只重新执行一次」的配合; 终稿必达不变量补全。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* docs(telegram): 协议正本与两端现行契约对齐

- turn-final 只接受文字 send, media 服务端拒收; 带任何附件都不发客户端终稿, turn.end 带
  附件时服务端不认 clientFinal; 私聊草稿模式回 TURN_UNAVAILABLE。
- provider.commands.set: 服务端只存内存、每次握手重发、只管理默认与 zh/ja/ko、全量重写。
- im-turn-flow: 不变量 9 写明清的是 coordinator 队列; §6 登记「停止时同任务已排队的
  hook 请求」随批次 3 再定。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(telegram): task.dispatch 重投时同样不重放正在发布的客户端终稿兜底帧

终稿发布屏障原先只在重连扫描出箱时生效; 服务端重投同一 requestId 时 terminalReplay
分支会立即发出不带 clientFinal 的兜底 turn.end, 让服务端提前接管。两处改用同一判据
isPublishingClientFinal: 重投只回放 ack, 正式帧发布结束后照常发出; 重启后集合为空,
兜底照常重放。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* docs(im): 终稿兜底屏障不变量补上 task.dispatch 重投入口

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(hook): 新任务建行后的补写同样按入口账号复核

create-only 在 openChannelSession 返回后还会补写来源 / 发送时间 / worktree 并广播;
中途换了账号时这些写入会落进新账号的库, 函数却仍报告成功。现在每次补写前复核入口
账号, 变了就报失败; 普通新任务路径的同类补写在账号已变时跳过。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(hook): 普通新任务每次补写前复核账号; clientFinal 契约去掉代发附件旧说法

- 普通新任务建行后的补写(provider、来源、运行时来源表)与新建广播, 每个 await 之后
  都按入口账号复核, 账号变了就停下(原先只在入口判断一次)。
- TurnEndPayload.clientFinal 注释: 只适用于不带附件的轮次, 附件始终随 turn.end 由服务端
  发送, 删去「complete=true 可省略 attachments」的旧说法。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(hook): 新任务派发前复核入口账号, 换账号即终止派发

建行后的补写、附件与上下文准备期间换了账号时, 原先只跳过补写, run() 仍会走到
session.send, 可能在 teardown 之后重新启动旧账号的请求。现在 send 之前复核入口账号,
失效就经既有 catch 统一收尾并回失败。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* docs(im): 账号代次不变量写明 Maker.createSession 内部窗口的边界

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-08 11:51:13 +08:00
Dash
48bfca40df feat(usage-limit): 账号用量上限重置后自动继续,覆盖更多订阅套餐 (#5540)
* feat(usage-limit): 账号用量上限重置后自动继续,覆盖更多订阅套餐

- 普通任务撞上 5 小时 / 周用量上限时照常报错,同时等额度重置;到点仍无人处理
  就自动继续(有产出发续跑指令、零产出重发原文)。横幅显示「将于 X 自动继续 ·
  取消」,手机端同步;替换原「恢复后继续」一次性自动化入口。仅本次运行有效。
- 重置时刻统一按会话所用账号求:错误自带 → 报错原文(Codex try again at、Pi
  ~N min、ChatGPT resets_at)→ 订阅用量快照(ChatGPT / Claude / SuperGrok 按
  provider 的 auth.native)。目标模式共用同一套来源。
- 新增 maker:input:cancel-usage-limit-wait 与可选投影字段 usageLimitWait;
  账号限额不再进入秒级中断重连。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): scope waits to the session model and subscription, tighten lifecycle

- Read only the Codex bucket / Claude scoped window that limits the session model
- Never wait on non-subscription providers even when the error text has a retry time
- Bind waits to the candidate recovery issued at the terminal error; drop in-flight
  resolutions on user action or close; withdraw the hint when eligibility lapses
- Check the renderer sender on the cancel IPC; renderer no longer clears the hint
  optimistically

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): only trust reliable reset times of the limited subscription window

- Goal mode reads error-text reset times through the host, only for subscription sessions
- An exhausted window without a reset time yields no reset time instead of borrowing another
- Ignore windows already past their reset and stale SuperGrok snapshots

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): restore the error when a reset continuation is dropped before dispatch

- Keep a pre-dispatch rollback record for usage-limit continuations (no interrupted-turn token)
- Restore the original error and manual retry from the existing discard / undispatched hooks
- Document that scheduler-origin inputs, including hook channel messages, are not covered

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): withdraw a fired wait when the continuation does not start

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): recognise built-in subscription accounts, commit unconfirmed continuations

- Map the built-in default providers (openai / anthropic / xai) to their subscription family
- Treat a usage-limit continuation as current while its pre-dispatch rollback record exists,
  so an unconfirmed dispatch is committed instead of being restored as retryable
- Do not pass the usage-limit sessionTotal (0) to interrupted-turn bookkeeping

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): only use snapshot reset times when the snapshot confirms the limit

- Return a snapshot reset time only when a window is exhausted; goal's reactive path checks limited too
- Void the snapshot-level reached flag once any window has rolled over

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): judge snapshots by exhausted windows only, withdraw waits on model switch

- Drop snapshot-level reached flags (stale or credits depleted); only an exhausted live window counts
- A user model / source switch withdraws the pending usage-limit wait
- Document that goal mode keeps its persisted usageLimited resume across restarts

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* docs(usage-limit): scope the model-switch withdrawal rule to ordinary tasks

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): match usage windows against the model the session actually runs

Runtime overrides (set_session_runtime / automatic fallback) take precedence over the saved
session model and provider for both ordinary tasks and goal mode.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): never auto-continue a shared-task guest turn

The guest's access may be revoked while waiting; re-sending their instruction hours later is
unsafe, so the error stays for the owner to handle.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* test(usage-limit): pin that guest steers never leave a usage-limit wait

Covers both orderings (steer ack before / after the terminal error); docs mention guest steers.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): goal mode skips local subscription snapshots for SSH sessions

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): withdraw the wait before a user model switch starts

Cancelling after handleSetModel could lose to a continuation that fired during the switch.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): never treat billing depletion as a periodic usage limit

Share the billing-depletion check between the usage-limit classifier (goal and ordinary tasks)
and the reset-time parser, so quota wording on a billing error no longer schedules a wait.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): ignore zone-less clock times from SSH session errors

Remote Codex reports 'try again at 3:05 PM' in the remote host's local time; only relative,
zoned or structured reset times are used for SSH sessions.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(usage-limit): never auto-wait on a usage limit while the task is shared

Per Dash (2026-10-08): ordinary tasks and goal mode stay on the error / usageLimited for the
owner to resume when the task is currently shared; a wait that becomes shared does not resume
at the reset time. Goal overload retries are unaffected.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-08 08:40:08 +08:00
Dash
cd064bdef3 fix(files): 补齐远程直传进度并统一下载与预览提示 (#5531)
* fix(files): 远程下载提示显示进度速度并使用运行图标

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(files): 分发共享取回进度并限制请求标识长度

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(files): 补齐直传字节进度并统一预览与下载展示

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(files): 回退等待期间恢复准备提示并刷新设计清单

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-07 22:00:40 +08:00
Dash
8bbe0bee93 fix(auth): 完善凭证恢复与限流等待指引 (#5545)
* fix(auth): 完善凭证存储异常恢复与登录指引

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* docs(design): refresh inventory after credential recovery changes

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(auth): 显示登录限流等待时间并区分恢复指引

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(auth): 保留限流前的登录步骤与输入

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(auth): 统一登录入口的限流时间投影

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(auth): 重载登录页时保留限流截止时间

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(auth): preserve observed backend failure across login reset

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-07 21:58:57 +08:00
Lizi
9c43794085 fix(remote-agent): run hosted commands with the local environment
Commands that a remote Agent runs on the task's computer now inherit the
full Desktop environment, the same as local agents: real home, temp dir,
SSH agent, git / gh / npm config and the user's own variables.

The previous isolation (fake HOME/USERPROFILE/APPDATA, user "agent",
PATH rewritten to junction links, credential-like variables stripped)
broke git identity, SSH, gh login and npm-style shims such as pnpm.cmd,
while the real home stayed reachable through the virtual path. Path
virtualization stays: PATH directories not already covered by an alias
are registered when the virtual root is set, and ~ resolves to the real
home.

Signed-off-by: Lizi <lizi@xd.com>
2026-10-07 18:35:28 +08:00
Lizi
c551b15aa2 fix(remote-agent): isolate hosted workspace paths
Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-07 13:16:49 +08:00
Lizi
6ed04a977b chore(claude): upgrade Agent SDK and align Desktop entrypoint
Upgrade Claude Agent SDK from 0.2.112 to 0.3.292 and Anthropic SDK to 0.93.0. Use claude-desktop consistently across local and SSH sessions. Preserve remote HOME/PATH with an explicit sanitized environment merge, and bump the remote manager bundle to 0.0.11 without changing protocol v5. Keep the bundled Claude Code runtime pinned at 2.1.280. Update third-party disclosures.

Validation: 1,787 targeted tests passed (4 existing skips); maker-core, cc-manager and Desktop type checks passed. Compare old/new SDKs against the real Windows CLI with a loopback model: tools, MCP, skills/hooks, permissions, subagents/background tasks, interruption, resume/fork/rewind and usage pass. The bundled manager also passes local RPC runtime checks. Real subscription accounts, macOS/Linux and real SSH hosts are not exercised.
Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-07 12:59:08 +08:00
Lizi
fa16b2747a feat(remote-agent): add transparent virtual workspace
Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-07 11:35:55 +08:00
Lizi
efed9e4354 feat(remote-agent): 对齐手机模型列表并支持任务中途换电脑
手机模型列表按电脑展示远程供应商,沿用桌面单波纹加点的来源标记。同设备换模型直接切换,跨设备先确认,再在下一条消息发送时落地位置与模型选择。

桌面已建任务支持通过选模型更换 Agent 所在电脑。选择时核对目标设备的供应商与模型,换位置使用完整交接和新原生会话,并记录位置边界。保持旧调用参数兼容,共享任务访客不开放换电脑。

验证:
- desktop 与 mobile typecheck 通过。
- Mobile 完整单测:653 个文件、8214 条测试通过,1 个文件 / 12 条测试跳过。
- Desktop 切换及远程模块:307 条通过,12 条跳过;扩展范围有 4 条失败,涉及未改动的代码:2 条 Windows 符号链接 EPERM,2 条影子工作区清理断言失败。清理测试单独复跑仍失败,其实现、测试及运行时依赖与 HEAD 一致。
- check:i18n、check:i18n-glossary、check:dev-docs、mobile test:scope 与 diff --check 通过。
- 未做双电脑联调及 Light / Dark 真机目检;效果图为布局示意。

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-07 10:32:34 +08:00
Lizi
dcf3337576 feat(desktop): 远程 Agent 改在模型列表里选,供应商可逐个设置「允许被远程调用」
远程 Agent 的入口从设备菜单挪到模型选择器:左侧栏在本机供应商之后按电脑分段列出其他电脑
上的供应商,选中那里的模型 = Agent 在那台电脑运行,任务和文件仍在本机;选回本机模型即回本机。
远程供应商用同一个图标位的远程 Logo(品牌图形 + 右上角单道波纹和一个点)。

供应商级授权「允许被远程调用」:
- 拥有订阅的那台电脑在「设置 → 模型供应商」里逐个打开,默认关;没开「允许远程控制」或
  供应商未连接时不显示。授权按账号存在本地,凭证与路由细节不出那台电脑。
- maker:provider:list 每条供应商附带 remoteInvocationEnabled,只作标记不裁剪目录:远程控制
  与手机仍看到全部供应商;远程 Agent 入口(左侧栏、换模型、协同 Worker、定时任务)只用已开放
  的供应商,一个都没开的电脑不出现。
- 运行 Agent 的那台是最终裁决方:启动时把来源落到已开放的供应商并显式启动,显式换来源时核对,
  关掉后进行中的这一轮照常结束、下一条消息被拒,统一回 REMOTE_AGENT_PROVIDER_NOT_ALLOWED,
  控制端按 chat.remoteError 提示去那台电脑打开开关或换模型。

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-07 09:17:02 +08:00
Lizi
ea7655ef6c Merge origin/main into feat/remote-agent 2026-10-06 16:36:05 +08:00