Commit Graph

658 Commits

Author SHA1 Message Date
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
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
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
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
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
Lizi
d7b3de5d1e feat(desktop): 远程 Agent——Agent 在同账号另一台电脑运行,任务与文件留在本机
任务、界面、项目文件和命令都在你这台;Agent 进程用那台的程序、登录(含 Claude 订阅)、
供应商与网络运行。新增设备互联通道 maker:remote-agent:v1,你这台始终是发起方(指令 +
按游标拉取),文件与命令经你这台的执行器完成。

- 三种 Agent:Pi 用 cindy-bridge 可替换工具;Claude Code 关闭自带文件/命令工具,换成
  cindy_exec MCP;Codex 用原生 exec-server 执行环境
- Cindy 工具、权限确认、每轮改动对比、保存点回退都在你这台
- 影子目录按真实路径镜像,同步项目与上级目录说明、个人配置
- 换模型/换引擎、协同 Worker、跨任务新建、定时任务按那台的模型目录
- sessions.agent_device_id(migration 0123)记住 Agent 所在电脑
- 分叉、审查、移动项目、复制到其他电脑、导出暂不支持:入口隐藏,主进程拒绝
- 所有新分支只在任务的 Agent 在另一台电脑时生效,本机任务行为不变

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-10-06 16:35:54 +08:00
Dash
1ae5c38fb1 perf(remote): 远程归档乐观更新,不等远程电脑往返 (#5520)
* perf(remote): 远程归档乐观更新,不等远程电脑往返

- 桌面:远程任务归档/恢复走 remoteProjectsStore 状态迁移叠加层,当帧换桶;
  worktree 预检前先隐藏行,需确认时弹窗,取消回滚;写库成功即落返回行,
  写库后的新列表确认前挡住在途旧列表回填;恢复成功释放归档墓碑
- 手机:协同 Worker 归档改为乐观移出并立即回到 Lead,失败回滚;
  会话页元数据写按物理 shard 落乐观补丁;upsertDeviceSession 遵守在途写
- 被控端:Worker 归档的 worktree 回收改为后台调度,不阻塞回执

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

* fix(remote): 远程归档叠加层只认写库后内容确认的列表,Worker 归档成功后对账

- 桌面:叠加层不再凭列表 epoch 或状态 push 让位;写库后的列表须内容一致或该行
  updatedAt 比写库新才撤,被控端合并的旧查询、迟到的旧推送都不能让行复活
- 桌面:侧栏新确认框顶替旧框时先把旧框提前隐藏的行放回列表
- 手机:Worker 归档成功后主动 reseed 该 shard,防归档前发出的读取迟到复活

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

* fix(remote): 叠加层不再依赖 updatedAt 判定,写库后不一致列表只容忍一次

被控端状态写不推进 updatedAt,无法据此区分「被控端合并的旧结果」与「另一控制端
随后又改了」。改为写库后第一份内容对不上的列表容忍一次,之后一律让位,避免叠加层
永远顶住权威状态。

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

* fix(remote): 同一远程任务的状态写按操作顺序串行发出

「全部」筛选里归档后立刻恢复时,两次 patch-meta 可能经直连 / 中继逆序到达被控端,
较早的意图最后落库。对齐本机 beginStatusTransitionWhenReady 与手机写队列,前一笔
结算后再发下一笔;叠加层仍当帧切换。

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

* fix(remote): 预检期间已被恢复取代的远程归档不再写库

「全部」筛选里预先隐藏的远程行仍可见、菜单已变为恢复;用户在 worktree 预检期间
点恢复时,原归档凭据已被取代。runSessionAction 在最后一个 await 之后检查凭据仍是
最新,过时归档直接放弃,以最后一次操作为准。

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-06 15:15:30 +08:00
Dash
377eaa69e9 feat(orca): 协同与任务间消息由发送方选择插话,排队后可转插话或调整顺序 (#5515)
* fix(orca): deliver worker reports into active lead turns

Signed-off-by: wuxudong04 <wuxudong04@meituan.com>

* feat(orca): 协同与任务间消息由发送方选择插话,排队后可转插话或调整顺序

接续 #5376,按 #5505 的结论调整:不设默认插话。

- send_to_worker / send_to_lead 新增可选 delivery(queue | steer,缺省 queue);
  插话成功回 steered,没插成照常直发或排队并说明原因。
- cindy_orca 新增 steer_queued_message / move_queued_message,省略 worker_id
  时作用于调用方自己的队列;get_worker_queue_status 同样可读自身队列。
- cindy_helper 新增 steer_session_queued_message / move_session_queued_message。
- 协调器新增 steerControlInput:共享守卫在异步筛查后、provider 投递前复核,
  不解除用户的队列暂停;provider 接受插话后调用 onSteerAccepted 结清
  Orca 回报,避免重复补报。
- 桌面与手机的协同排队行开放插话按钮(编辑仍禁止)。
- 去掉 Worker 回报自动插进 Lead 当前轮的默认行为;同步 Orca 架构文档。

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

* fix(orca): 插话不跑新轮生命周期,拦截不改走排队,排序遵守编辑锁

- 插话并入对方正在运行的 turn:provider 接受后只释放排队时登记的回调,
  不再运行接管新 turn 的 accepted/commit(避免给在跑的 worker 另建 pending)。
- 输入筛查拦截的插话返回失败,不再回退到普通排队重试;其余未投递才回退。
- send_to_worker 插话成功时 wake_kind 沿用 already-active 并附 steered=true,
  与 Lead 提示词的派发判定一致,无需改动 system 段。
- 模型排序遵守编辑锁,用户正在编辑的行不被移动。

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

* fix(orca): 排序前复核插话中状态,避免误报移动成功

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

---------

Signed-off-by: wuxudong04 <wuxudong04@meituan.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Co-authored-by: wuxudong04 <wuxudong04@meituan.com>
2026-10-06 12:11:23 +08:00
DavidShenXD
2f8ed15f1c feat(desktop): 支持自定义动态壁纸并修复 HDR 下的视频亮度异常 (#5514)
* feat(desktop): support custom video wallpapers and full overlay

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

* feat(desktop): expose literal wallpaper visibility

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

* fix(desktop): stabilize wallpaper video opacity on HDR displays

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

* fix(desktop): guard wallpaper imports and automate compositing coverage

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

* fix(desktop): stream wallpaper video range responses

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

---------

Signed-off-by: david <david@xd.com>
2026-10-06 12:07:27 +08:00
Chris Zhang
757d9797d5 refactor(plugins): 移除内置 iOS 模拟器并引导存量用户迁移 (#5412)
* refactor(plugins): retire embedded iOS simulator with migration guidance

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* fix(plugins): show retirement notices before acknowledging them

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* fix(plugins): include retired state in discovery error types

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* test(worktree): preserve legacy Windows lease path normalization

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

---------

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Co-authored-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-06 09:25:03 +08:00
Dash
56fe057d94 feat(desktop): 远程任务支持把文件夹「下载到本地」 (#5512)
* feat(desktop): 远程任务支持把文件夹「下载到本地」

远程任务聊天里文件夹的「下载并定位本地副本」此前一律报「远端文件不存在」。
现在文件与文件夹都下载到系统「下载」文件夹(重名自动加编号),完成后在文件
管理器中选中;菜单文案改为「下载到本地」。

- 设备互联:被控端新增 remote-op exportDirStart / exportDirStatus(caps 声明
  dirExport),把目录打成 tar(保留符号链接与可执行位),按 2GB 分段推给发起
  下载的控制端,直连附件优先、回落 OSS;控制端收齐后解包。旧被控端提示更新。
- SSH:远端 tar 经 SSH exec 通道流式传回,边收边解包。
- 解包先进隐藏暂存目录,成功才改名;符号链接最后创建且不越出目标目录;
  个别条目失败只跳过并提示。
- 直连附件取件后从收件箱移出,不再滞留 7 天。

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

* fix(desktop): 文件夹下载的背压、分段清理与原子落盘

- SSH 归档流加背压:写不进解包流时暂停读 SSH 通道,drain 后恢复
  (ExecStreamHandle 追加可选 pause/resume)。
- 被控端状态回带已推送分段;控制端下载失败时放弃未取走的直连分段 / OSS 对象,
  不再在收件箱滞留。
- 文件也先落暂存目录;最终名字先排他占位再改名,复制失败不留半截文件,
  并发同名下载不互相覆盖。
- 支持下载工作目录本身。
- 下载进度带请求 id,同一路径的并行请求不串线。

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

* fix(desktop): 下载入口校验调用方,发起方消失即中止,SSH 异常关闭判失败

- maker:chat-file:download 只接受 Cindy 自有页面发起(与 HTML 预览同一判据)。
- 发起窗口关闭或渲染进程崩溃时中止:停止轮询(被控端 2 分钟后自行中止)、
  关闭 SSH 流,不再落盘。
- SSH 通道无退出码(断线)时一律失败,不把可能缺内容的文件夹放进下载文件夹。

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

* fix(desktop): 工作目录本身的识别按 Windows 规则归一

isWorkdirRoot 与 toWorkdirRel 同一套归一(分隔符、. 段、尾分隔符,Windows 大小写
不敏感),C:\repo 与 C:/repo 等写法都能识别为工作目录本身并按目录下载。

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

* fix(desktop): 单个文件下载也随发起方消失而中止

fetchChatFile 接受可选 AbortSignal 并传给底层取回(fetchRemoteBigFile /
fetchRemoteFileToCache);文件夹分段的 OSS 下载同样带上信号;暂存复制完成后
再检查一次,中止后不再放进下载文件夹。

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

* fix(desktop): 中止贯穿工作目录外的文件取回;路径归一覆盖 UNC

- fetchChatFile 工作目录外分支:media:fetch(直连 / 上传)接收调用方中止信号,
  OSS 直下使用缓存层的 transferSignal。
- toWorkdirRel / isWorkdirRoot 改用工作目录入库的同一判据 isWindowsPathLike
  (盘符、UNC \\server 与 //server、长路径前缀),分隔符与大小写统一归一。

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-06 08:11:48 +08:00
DavidShenXD
a5c582f4eb fix(worktree): 修复远程创建失败后的回收与草稿恢复 (#5502)
* fix(worktree): 修复远程创建失败后的回收与草稿恢复

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

* fix(maker-shared): resolve type errors and keep ES2022 compatibility

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

* fix(worktree): cover Claude and Pi startup failure boundaries

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

* fix(worktree): close review gaps in draft persistence and host cleanup

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

* fix(mobile): remove cancelled creation rows after cold recovery

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

* fix(worktree): serialize creation and cancellation across desktop processes

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

* test(mobile): update worktree recovery identity source assertion

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

---------

Signed-off-by: DavidShen <david@xd.com>
2026-10-06 00:43:20 +08:00
Dash
b489a55bb6 fix(maker-core): 工具循环检测放行节奏轮询,疑似命中交辅助模型复核 (#5488)
* fix(maker-core): 工具循环检测放行节奏轮询,疑似命中交辅助模型复核

- 距上一次普通调用开始 ≥30 秒的调用视为在等外部进度,不计入疑似判据,
  只续接完全相同 streak 并照常打断长只读窗口、消耗复核放行额度
- 快速完全相同 30 次、完全相同结果自首个结果起持续 60 分钟、长只读轮转
  不经复核直接中断
- 其余命中改为疑似,由 host 注入的辅助模型后台复核:continue 放行 20 次,
  stop / 失败 / 超时按原样中断;每个 turn 最多 3 次(Claude Code 子代理共用,
  中途切模型不重置);turn 结束、接管、关闭、拆离或疑似模式被打破时作废复核
- Claude Code 与 Pi / Codex 共用 ToolLoopMonitor;Session 的同步观察与复核
  结论共用一个前提判据
- desktop 走共享辅助模型链;证据在未转义原文上按凭证种类整类脱敏后再序列化、
  截断到 400 字符并改写分隔标签;maker-core 只截取有界原文并丢弃截取点处的
  残缺连续串
- 测试中的凭证形态测试桩全部为合成值,运行时拼接,不以字面量入库

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

* fix(maker-core): 证据截取点所在整行丢弃,无换行时丢弃未闭合引号起的内容

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

* fix(maker-core): 复核终态排在结果摘要之后;Claude Code 等人确认期间丢弃复核结论

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

* fix(desktop): 复核信号行不再包含模型产生的工具名

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

* fix(maker-core): 新调用替换被复核的模式时作废进行中的复核

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

* fix(maker-core): 替换调用一开始即作废进行中的复核

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

* fix(maker-core): 复核结论到达时统一校验在途调用;子代理结束后丢弃其结论

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-05 22:20:18 +08:00
Dash
474230a1d9 feat(device-link): 远程任务显示后台任务状态并支持停止 (#5487)
* feat(device-link): 远程任务显示后台任务状态并支持停止

- 远程任务的输入框状态栏读取远程电脑的后台活动与后台任务快照,
  在线、可见且无前台对话时每 15 秒复查,不依赖镜像事件
- 远程白名单放行 maker:agent-task:stop 与 maker:session-background-tasks:stop
  (仅同账号,不进共享任务访客白名单)
- 任务卡、后台任务面板与状态栏的停止按会话归属路由到远程电脑;
  远程电脑版本过旧时提示升级

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

* fix(device-link): 停止按归属解析执行端,丢弃过期的后台状态读取

- 停止前解析会话归属:远程走隧道,本机库确有该会话才走本机,
  归属未解析时拒绝,避免冷启动窗口内本机假成功
- 远程后台状态读取按序号只采用更新的结果,停止成功后作废在途读取

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

* fix(device-link): 远程停止成功后用回执收口任务卡

远程镜像的终态事件可能在断连窗口丢失,停止成功后任务卡与后台任务面板
仍显示运行中。新增 makerChatStore.settleStoppedAgentTasks,复用快照对账的
收口函数,远程会话停止成功即标记 stopped(全部停止收口该会话全部 running
条目);本机会话仍由事件流与快照对账收口。

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

* fix(device-link): 远程全部停止的回执只作用于发起它的会话

视图切到别的远程任务后,旧任务迟到的停止回执不再作废新任务的读取、
清空其后台提示,「停止中」也按发起会话区分。

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

* fix(device-link): 停止回执按任务精确收口,覆盖 PI 子任务

settleStoppedAgentTasks 不再套用快照对账的 claude-code 判据,按停止回执的
taskId / parentToolUseId 精确收口,远程 PI durable 子任务停止成功后同样不再
卡在运行中;全部停止仍只收口 Claude 任务(PI durable 任务可活过会话进程)。

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

* fix(device-link): 共享任务访客不显示后台任务停止入口

新增唯一判据 canManageBackgroundTasks:本机或同账号远程会话才有后台任务管理权;
共享任务访客(房主保留后台任务管理权,访客白名单不放行停止通道)的任务卡、
后台任务面板与状态栏都不给停止入口,状态栏也不读取远程后台状态。

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

* fix(device-link): 远程状态读取登记为后台请求,全部停止发起前冻结收口集合

- maker:session-background-activity / maker:session-background-tasks:list 登记为
  后台 invoke,定时复查不再占用前台槽位、让位于发送与停止等用户操作
- 全部停止在发起请求前捕获待收口任务,回执迟到期间新启动的任务不被误标为 stopped

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

* docs(device-link): 登记远程后台状态读取为后台 invoke

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

* fix(device-link): 远程后台状态读取按归属设备隔离

同一会话的归属设备变化时重启读取、清空旧设备快照,旧设备的在途结果随
effect 失效丢弃,状态栏不再沿用旧设备的后台状态。

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

* refactor(device-link): 远程后台状态 hook 统一以视图标识作唯一判据

快照归属、在途读取、停止回执与「停止中」标记统一按「归属设备 + 会话」的
视图标识判定,同一会话归属设备变化时,旧设备的迟到停止回执不再清空新设备
的提示或作废其读取。

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

* fix(device-link): 停止归属在本机查询落地后再核验远程归属

本机查询在途期间远程注册表完成水合时,停止改走远程,不落到恢复或复制的
本机库中同 id 的会话。

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

* fix(device-link): 远程停止因未连接失败时提示等连接恢复

停止失败提示统一为:远程电脑版本过旧提示升级;未连接 / 超时 / 归属未解析
(复用远程会话列表的瞬态判据 isTransientRemoteError)提示等连接恢复后重试;
其余失败保持静默。新增五语言文案 chat.backgroundActivity.remoteStopDisconnected。

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

* fix(device-link): 远程停止因调度繁忙失败时同样提示稍后重试

DEVICE_LINK_BUSY 与未连接 / 超时 / 归属未解析归为同一档,文案改为通用的
「远程电脑暂时无法响应…请稍后重试」(chat.backgroundActivity.remoteStopUnreachable)。

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

* revert(device-link): 删除 review 中加入的停止回执收口机制

「停止成功后用回执把任务卡标为 stopped」处理的是改动前就存在的远程镜像终态丢失
边界,不是本 PR 的原始目标;围绕它已连续追加 PI、候选集冻结、设备代次等补丁,
reviewer 又要求跨窗口广播。整体删除 makerChatStore.settleStoppedAgentTasks 与
停止模块中的收口逻辑,停止后状态仍由事件流收口,残留「运行中」由既有的离开五分钟
清空兜底。停止模块保留后台任务管理权判据并直接转发到传输层。

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-05 20:08:37 +08:00
Dash
4a998e709d feat(remote-desktop): 桌面远控对齐手机端改进,被控端随连接给操作权,手机仅查看改为本地 (#5492)
* feat(remote-desktop): 桌面远控对齐手机端改进,被控端随连接给操作权,手机仅查看改为本地开关

- 桌面切分辨率不重建视频、记住分辨率、适配后可恢复原始比例并只给同比例尺寸
- 控制类请求经查看器窗口的媒体数据通道发出(主进程仍是唯一发起方)
- 插件配置卡增加打开远程桌面入口;滚轮保留不足 1 像素的滚动量
- 被控端新增 autoControl:连接与切换显示时在同一请求里给出操作权
- 手机仅查看改为本地开关,不再向被控端释放操作权

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

* fix(remote-desktop): 手机进入仅查看时可靠释放被控端按键,在途输入复查仅查看;桌面先启动自动解锁再套用记住的分辨率

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-05 20:01:24 +08:00
Dash
b1e8d7521b fix(providers): 恢复添加向导中连接已有 llama.cpp 服务的入口 (#5499)
* fix(providers): 恢复添加向导中连接已有 llama.cpp 服务的入口

目录中的 llamacpp 预设重新进入「检测到本机服务」/「更多本机服务」分组,
点击后走普通预设连接流程(可改地址、拉取模型并保存为独立连接),
不再被重定向到 Cindy 托管的 llama.cpp。托管入口保持原有行为。

Fixes #5494

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

* fix(providers): 默认地址相同的运行时跟随已编辑地址并更新维护文档

本机服务预设(如 llama.cpp)的 Codex 与 Pi 默认指向同一地址,只改其中一个时
另一个仍停在默认端口。未单独编辑的运行时现在跟随默认地址相同且已编辑的运行时。
同步更新 model-catalog-maintenance.md 中 llama.cpp 两个入口的说明。

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-05 19:21:44 +08:00
Dash
1e004643cf feat(remote-desktop): 手机画中画观看时电脑端自动按省流上限编码,回到全屏恢复原画质 (#5482)
* feat(remote-desktop): 手机画中画观看时电脑端自动按省流上限编码,回到全屏恢复原画质

手机进入画中画(只看、后台观看)时,电脑端在同一路视频上把码率与帧率上限
降到省流档(2 Mbps / 30 帧,运动时保帧率),不重新协商、不改用户选的画质;
回到全屏或恢复操作后立即恢复原档位。画中画期间重新建立的视频连接也直接
按省流上限起步。

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

* docs(remote-desktop): 说明后台观看期间电脑端按省流上限编码

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

* fix(remote-desktop): 后台编码上限按状态对齐,高清画中画静止保清晰,忙碌时不退出后台观看

- 采集页已有的 2 秒心跳顺带对齐编码上限:被拒的调整在下一跳补上,已一致时不调用 setParameters
- 只要有画质设置就跟踪运动,静止时是否保分辨率由当前生效档位决定,高清进画中画后静止画面不再被降分辨率;前台高清行为不变
- 控制请求先做输入忙碌检查,再退出后台观看

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-05 18:17:30 +08:00
Dash
150862b6c1 fix(desktop): 远程桌面隐藏暂停需编码器确认,隐藏后才就绪不断开会话
- viewer-hidden 改走 requestHost 应答:截屏页 setParameters 成功才回复 true,
  失败或租约不符回复 false,被控端据此让 viewerHidden 请求失败,控制端恢复失败时
  按既有路径重建视频,不会停在旧帧。
- pauseWhenHidden=false 的窗口在隐藏后才收到首帧就绪时不再停用会话。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-05 17:33:13 +13:00
Dash
de08657174 feat(desktop): 远程桌面窗口隐藏时暂停视频、保留声音
查看窗口隐藏、最小化、切 Space 或被遮挡持续 1.5 秒后,请求被控端原地停发视频
(encoding.active=false),音频、输入、数据通道与 lease 保持;显示时立即恢复,
恢复失败则重建视频连接。截图中转模式隐藏期间停止拉取。

协议新增可选能力 viewerHidden 与请求 { op: "viewerHidden", lease, hidden },
只在被控端声明能力时发送,新旧版本任意组合均可连接。

同时修正:pauseWhenHidden=false 时原生 hide 仍取消冷打开,避免隐藏的窗口
在首帧后被重新显示并抢焦点。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-05 17:17:54 +13:00
Dash
3cf5e2ebce fix(desktop): 远程桌面窗口隐藏、最小化、切桌面或全屏时不再断开连接
macOS 会把切换 Space、原生全屏切换和窗口被完全遮挡都报告成原生 hide/show,
远程桌面查看器原先在 hide/minimize 时结束会话、show/restore 时重连。
给辅助窗口控制器加 pauseWhenHidden 选项(默认不变),查看器关闭它,
会话只在用户关闭窗口时结束。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-05 15:57:22 +13:00
Dash
0b3c5681e9 fix(device-link): 手机挂起不再误报电脑端未响应,relay 转发卡死时整连接重连 (#5465)
* fix(device-link): 手机挂起不再误报电脑端未响应,relay 转发卡死时整连接重连

- 手机端:发出时已不在前台、或跨越前后台切换的请求超时按不定论处理,不再计入「电脑端未响应」熔断;熔断不打开后,回前台对该电脑的重连不再被探测退避推迟。
- device-link:可靠 ACK 超时时,若该 peer 与另一已就绪 peer 的队头首发以来都没有收到任何对端帧,判定 relay 连接转发方向卡死并重建连接;只有单个 peer 沉默时仍只复位该 peer。

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

* docs(device-link): 记录熔断忽略 App 挂起超时与 relay 卡死重连条件

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

* fix(device-link): 连接级重连要求所有已就绪 peer 都有卡死证据

两台对端同时休眠时,空闲但健康的第三个 peer 拿不出卡死证据,不得因整连接重建被连带断链;补三 peer 用例,并让健康 peer 用例持续 ACK、直接断言其未被复位。

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

* fix(device-link): 活动的旧版控制端同样阻止连接级重连

未协商可靠传输的旧控制端没有队头可供取证;其入站控制方向仍活动时按缺少卡死证据处理,两台可靠对端沉默不得把它连带断开。补对应多 peer 用例。

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

* docs(device-link): 登记旧版出站目标不参与连接级卡死判定的已知边界

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-05 04:38:16 +08:00
Dash
09de409253 feat(remote-desktop): 手机记住桌面分辨率,切换分辨率不重建视频 (#5393)
* feat(remote-desktop): 手机记住桌面分辨率,切换分辨率不重建视频

- 手机按电脑和显示器记住上次选的系统分辨率或「适配此屏幕」尺寸,下次连接在第一帧前恢复;
  选回电脑原分辨率或恢复原始比例时清除记忆。
- 被控端新增可选能力 liveDisplaySwitch:切换显示时请求带 keepVideo,原生画布截屏保留同一条
  视频连接,响应带 videoKept;手机只更新画面布局,不再重新协商视频。回执缺失时按原流程重建。
- 切分辨率不再重复读取模式列表,并在切换的同时预取 ICE 配置。

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

* fix(remote-desktop): 只有截屏页确认原生流仍在时才回报已保留视频

- 切换显示前通知截屏页 display-hold,暂停“5 秒无新帧即停流”,慢的虚拟显示创建(最长约 8 秒)
  不再把视频停掉。
- 切换后 display-swap 改为请求-回复:截屏页确认当前确实是原生截屏且视频轨道仍在才回 true。
  浏览器截屏(未声明鼠标叠加时的 macOS/Windows 默认路径)、流已结束或确认超时都回 false,
  主进程按原流程拆掉重建,手机也跟着重建,不会停在旧显示器上。

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

* test(mobile): 远程桌面分辨率记忆测试改用内存 AsyncStorage

Node >= 25 默认的 webstorage 全局是缺方法的 stub,会顶掉 jsdom 的 localStorage,
新增测试依赖 AsyncStorage 网页 fallback 时在 Node 25 下必挂。按 apps/mobile 惯例
vi.mock 成内存实现,不再依赖运行环境的 localStorage。

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

* fix(mobile): 记住的适配分辨率只在同一窗口尺寸下提前套用

连接前还量不到画面区域,原先只比较横竖方向就复用旧的适配尺寸;折叠屏展开、
分屏或窗口改变尺寸但方向不变时会套用过期的比例。记忆里额外保存适配时的
App 窗口尺寸,只有窗口完全一致才在首帧前套用,否则走首帧后重新测量的路径。

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

* fix(mobile): 记住适配时请求的尺寸,而不是宿主返回的逻辑尺寸

HiDPI 宿主可能用同比例更小的逻辑模式回应 viewerDisplay 请求(带
viewerDisplayRequest 回执)。若把实际尺寸写入记忆,每次重连都会按更小的尺寸
再请求一次,画面越来越小。改为记住请求尺寸,实际尺寸只用于当前画面几何。

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

* fix(mobile): 提前套用记住的分辨率失败时不再中断连接

提前套用是连接前的可选步骤,原先失败就把错误抛给 connect,拆掉整个会话,
绕过了 controlFailure.ts 的分类(控制被抢应降为只看、结果未知应交给下次尝试)。
现在失败时保持当前分辨率继续连接,由首帧后的路径再套用;只有租约已结束
(DESKTOP_LEASE_EXPIRED / DESKTOP_STOPPED),或显示器切换请求本身回复丢失
(几何未知,与手动切换一致)才重建。

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

* fix(mobile): 记住的分辨率切换失败后重建连接,且不再反复重试

显示器切换请求一旦发出,宿主在切换中出错会自行结束租约;此前只把超时和
明确的租约结束当作需要重建,其余错误继续用旧租约连接,随后在 offer/control
阶段失败。现在只有宿主改动前就拒绝的 DESKTOP_VIEW_ONLY / DESKTOP_DISPLAY_BUSY /
DESKTOP_INPUT_BUSY 继续连接,其余一律重建。

提前套用或首帧后套用失败并重建后,本屏不再重试记住的选择,避免持续故障时
新租约反复触发重连。

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-04 18:36:26 +08:00
Chris Zhang
efd6431e82 fix(chat): 接通正式聊天端点并续传升级本地群记录 (#5433)
* fix(chat): wire production transport and resume local group upgrades

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* fix(chat): isolate history failures and restore shared group operations

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* fix(chat): honor server plan workspaces at session startup

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

---------

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Co-authored-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-04 06:31:15 +08:00
Dash
c4d68f0da7 fix(remote-desktop): 转发 offer 时补回旧版 bitrate,修复连旧被控端只能截图中转 (#5435)
桌面远程桌面窗口的主进程会先用 parseRemoteDesktopRequest 校验 renderer 请求,
解析结果只保留画质档位,丢掉了 remoteDesktopVideoSettingsWire 补上的旧 bitrate。
0.1.96 及更早的被控端只认 bitrate,于是每次 offer 都返回 INVALID_REQUEST,
视频重试用尽后停在服务器截图中转。转发前重新套用 wire 形状,并补测试与协议文档。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-04 04:37:20 +08:00
Chris Zhang
dec9afcd3b feat(chat): 接入多人伙伴聊天与主人授权设置 (#5429)
* feat(chat): integrate isolated multi-account companion chat

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* docs(chat): refresh generated design inventory and glossary

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* fix(chat): retry companion results and refresh group state

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* fix(chat): resume subscriptions after history reset

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* fix(i18n): align group chat terminology in Chinese

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* fix(chat): use existing localized thread mention label

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* test: provide MCP source in group privacy fixture

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

* test: align bot reply contract with shared thread actions

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

---------

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Co-authored-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-04 00:49:11 +08:00
Lizi
325eeb6750 Merge pull request #5427 from makecindy/dash/task-copy-destination
feat(task-copy): 未选项目时按任务类型复制到对话或新建项目
2026-10-03 22:09:40 +08:00
Dash
905f7ed4bc feat(agent): 支持本机与在线授权设备的历史发现和搜索 (#5415)
* feat(agent): 支持本机与在线授权设备的历史发现和搜索

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

* fix(history): 在远程分页和搜索排名前过滤隐藏任务

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

* fix(history): filter remote scope before KNN candidate limit

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

* fix(history): avoid probing hidden session IDs

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

* fix(history): scope remote references and search diagnostics

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-03 21:15:25 +08:00
Dash
bcc5a1b92f perf(remote-desktop): 控制请求走媒体直连数据通道 (#5394)
* feat(remote-desktop): 控制请求走媒体直连数据通道

- 被控端新增可选能力 channelRequests:手机把操作权、隐私屏、主机静音、窗口操作、
  分辨率列表、剪贴板同步等小请求经媒体连接的 input-v1 数据通道发送,回复也从通道返回,
  不再每次绕 relay(实测单次从约 0.6–0.9 秒降到几毫秒到几十毫秒)。
- 电脑主进程对通道请求做与 relay 相同的发送方、lease 与撤权校验;白名单外、并发超限或
  回复过大时回错误码而不结束会话,手机改走 relay。旧电脑未声明能力时手机不发通道请求。
- iOS 原生接收器新增 sendRequest(冷更新);网页播放器同样支持,供非原生路径使用。

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

* fix(remote-desktop): 输入积压时不因控制请求断开,媒体回退时及时结束在途请求

- 截屏页先识别通道请求,再对输入批次做 8 个在途上限;输入积压时切换操作权或静音
  会正常回复,不再触发结束会话。
- 手机在媒体回退或重建视频时立即以结果未知结束经通道发出的请求,不再等 8 秒超时,
  也不经 relay 重发。

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-03 19:50:58 +08:00
Dash
90ac8a5fe0 feat(task-copy): 未选项目时按任务类型复制到对话或新建项目
「复制到其他电脑」不再提供含义模糊的「Cindy 默认位置」:对话任务显示「对话」,
副本放进目标电脑的对话工作区;项目任务显示「新建项目」,按源项目相对用户目录的
路径在目标用户目录下新建文件夹(同名加序号,不覆盖),并登记为最近项目。

源端在 manifest 中附带可选 destination,旧目标忽略;旧源端缺省时目标仍放在
task-copies/projects。重试时复用本次复制自己留下的空文件夹。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-04 00:37:40 +13:00
Dash
d460df8c17 fix(mobile): 安卓本地库写满时清理旧消息缓存并重试发送 (#5404)
* fix(mobile): 安卓本地库写满时清理旧消息缓存并重试发送

旧版把消息缓存写在 AsyncStorage,未打开会话的旧副本会占满安卓 6 MiB 库,
导致发件箱写入 SQLITE_FULL、所有任务都无法发送(#5403)。

- 启动时丢弃剩余旧 AsyncStorage 消息条目(可从主机重建,不动文件与其他键)
- 发件箱写入遇到 SQLITE_FULL 先丢弃旧条目再重试一次,仍失败给出本地存储已满提示

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

* fix(mobile): 旧消息缓存改为迁移成文件而非直接丢弃

旧条目里的 mobile-system-* 卡片没有服务端副本,直接删除会永久丢失。
启动与写满重试改为逐条走 getItem 迁移(成功后才删旧值),与同 key 写删
共用队列,登出全清会作废排队中的迁移。

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

* fix(mobile): 已有文件缓存时也清理残留的旧 AsyncStorage 副本

文件已存在时 getItem 直接返回文件,不会删除旧值;回退旧版或此前删除失败
留下的旧条目因此会一直占库。新增 migrateLegacy:已有文件时只删旧值,
否则走原迁移路径。

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-03 15:34:11 +08:00
Chris
b90eaa3e6c fix(mobile): require explicit reselection for closed models
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-03 12:07:39 +08:00
Chris
fc97eaa3ea fix(mobile): send only enabled models and remove catalog paging
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-03 11:44:48 +08:00