Commit Graph

3227 Commits

Author SHA1 Message Date
Dash
201b8473a5 fix(desktop): 保留复制按钮的 PR 显示规则并刷新语言
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-14 22:30:34 +13:00
Dash
c49d953625 feat(desktop): 插件卡片支持复制链接按钮(data-ghost-copy-link)
PR 卡片要像标题栏 PR 浮窗一样提供复制链接。卡片里没有脚本,复制交给宿主:
净化器只在没有动作、外链和归档标记的 button 上放行整串 http(s) 的
data-ghost-copy-link;电脑端露出按钮、换成 App 的复制图标,点击写剪贴板并提示,
不派发 card-action。旧宿主丢弃属性,插件写的隐藏按钮保持隐藏;手机不投影。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-14 21:58:12 +13:00
Lizi
0bd0aa2c0d Merge pull request #10473 from makecindy/fix/subscription-signin-shortcut-20261114
fix(subscriptions): 简化添加订阅账号入口
2026-11-14 12:35:31 +08:00
Lizi
b02653ef4d Merge pull request #10464 from yan-xdt/fix/pnpm11-hoisted-install
build: 升级 pnpm 11 并保留并行安装
2026-11-14 12:35:29 +08:00
MagicLizi
e679b84fe5 chore(repo): merge main and reuse the shared badge font fixture
Merge main at 3a47475952 and resolve the badge-test conflict using its
9cdb6f3a25 bundled-font fixture unchanged. Remove this branch's redundant
DejaVu CI dependency and environment notes. The test, workflow and setup
document now match main; Agent-Net feature files remain unchanged.

Validate the merged tree with Desktop typecheck, 12 badge tests on Windows
and a Linux emoji-fallback container, test hygiene and developer-doc gates.
The real PNG assertion still rejects a black production text mutation.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 11:30:21 +08:00
yan
c720c4a35e fix(build): migrate workspace readers and isolate pnpm global config
Limit workspace selectors to the packages block and read license targets from pnpm-workspace.yaml with a declared YAML dependency. Give each unverified fetch or install a private empty temporary global config with one shared cleanup owner, independent of tracked content and links.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: yan <yan233@xd.com>
2026-11-14 11:25:22 +08:00
yan
49771485c1 build: 升级 pnpm 11 并保留并行安装
Pin pnpm 11.28.9 with the upstream hoisted-copy fix, migrate configuration without changing application dependency resolutions, and keep the existing build-script allowlist. Align managed Make tools and diagnostics, preserve Intel Mac support with the official Node package, and retain configuration and credential isolation for unverified installs and cache warming.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: yan <yan233@xd.com>
2026-11-14 11:25:21 +08:00
MagicLizi
52a992a64f test(desktop): select a text font for Linux badge rendering
Installing DejaVu alone did not fix the Ubuntu runner: the generic font
fallback can still choose color emoji when Segoe UI is absent. Register
the real DejaVu Sans Bold face as the suite's Linux Segoe UI fixture and
remove its registration afterward. Windows keeps its real system font.

With both fonts installed and an emoji generic fallback, the unchanged
production renderer and old tests reproduce the same pixel failure;
the fixture passes all 12 tests and still rejects black production text.
No production code or assertions change.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 11:23:19 +08:00
MagicLizi
b1dbdc6de2 ci(repo): install text fonts for Linux canvas tests
Ubuntu latest moved the failing unit shard from 24.04 to 26.04. Its only
failure is the unchanged badge PNG test: white digit pixels are zero.
The same test reproduces with only Noto Color Emoji in a Linux container
and all 12 cases pass after installing fonts-dejavu-core. Add the explicit
CI dependency and document it without changing production code or tests.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 11:02:11 +08:00
Lizi
0aff28faed fix(subscriptions): 断开同身份账号后恢复快捷入口
排除已断开的内置池账号,保留其他独立供应商中的同身份账号判断,并补充先红后绿回归。

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-11-14 10:54:49 +08:00
Lizi
36c717e9f8 fix(subscriptions): 简化添加订阅账号入口
移除已登录账号卡片,仅为尚未加入的本机 CLI 账号提供快捷按钮,兼容旧版无账号池记录的连接。

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-11-14 10:41:06 +08:00
MagicLizi
24a6f30196 docs(agent-net): 写明自建中继附件存在中继所在机器
产品规则补充附件存放原则:官方中继存在官方对象存储、新版客户端直传;自建中继(一键部署、本机中转)存在中继所在机器上,不使用官方存储;对端只支持 V1 时继续用 V1 附件方式。协议记录更正兼容表:新客户端在自建中继上会申请直传,由中继回答不同意。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 10:16:09 +08:00
MagicLizi
e9a53c3dbf fix(agent-net): 刚签发的存储读取被拒时报错而不当作附件
缓存的读取地址被拒(403)时客户端会重新向中转申请;刚签发的地址被拒却直接把 OSS 的错误体当作附件返回,downloadMedia 成功、openEncryptedMedia 报成 INVALID_MEDIA_HEADER。现在报 MEDIA_STORAGE_READ_FAILED,与 Mobile 客户端一致。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 09:55:29 +08:00
MagicLizi
941461f9c6 fix(agent-net): 清理删除后迟到的直传写入并先打开存储读取
删除前签发、删除后才到达的直传写入会在偏移 0 重新建出对象,而附件记录已删,
过期清理再也找不到它。存储支持直传时,删除(及超出声明大小)只把记录标为已过期:
双方读到 404、不占配额;过期清理比到期多等 DIRECT_GRANT_MAX_MS(10 分钟)再删一次
对象。直传请求有效期超过该值时按存储故障返回 503。

经中转下载原先先写响应头再打开存储读取,存储故障只能断开连接;现在先打开读取,
故障返回 503 MEDIA_STORAGE_UNAVAILABLE。存储接口注明 append 必须同时绑定长度。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 09:41:29 +08:00
MagicLizi
99b5ea8171 feat(agent-net): 附件支持客户端直传对象存储
中转的附件存储抽象为 RelayMediaStorage,默认仍是本地目录,自建中转与单实例
行为不变。存储提供 direct 时,中转为每块签发绑定位置与 Content-MD5 的预签名
追加、为下载签发预签名读取,客户端直接与存储收发密文,中转只鉴权并以存储中
的长度确认进度;旧客户端照旧经中转读写同一存储。

网络连不上存储时,新客户端经 commit 确认未写入后改走中转,10 分钟内不再尝试
直传;存储明确拒绝时不回退。Mobile 通过新的 md5 选项启用直传。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 09:18:18 +08:00
Dash
f4426ac940 merge: sync main for subscription account placement
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-14 09:50:52 +13:00
MagicLizi
f4733a7d50 Merge remote-tracking branch 'origin/main' into feat/subscription-account-placement
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 02:22:24 +08:00
MagicLizi
78efab80b8 fix(subscriptions): preserve account scope and history across provider moves
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 02:21:16 +08:00
Lizi
5ac9b1270c Merge pull request #10430 from makecindy/feat/agent-net-relay-cluster-hardening
fix(agent-net): 回合服务端验证的多副本中转加固
2026-11-14 01:58:20 +08:00
Lizi
1ad4b75d12 Merge pull request #10427 from makecindy/cindy/steady-hamilton
fix(pi): 回收闲置的伙伴和自动化运行时
2026-11-14 01:11:18 +08:00
MagicLizi
9c32cf8525 fix(agent-net): 从包入口导出 checkMemberUrl
协议记录说明后端可用导出的 checkMemberUrl 预先校验名单 URL,但包入口
没有导出它(package.json 也没有开放 ./cluster 子路径)。补上导出,并加
用例从包入口校验合法与非法地址。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 00:54:51 +08:00
MagicLizi
38485bf6e8 fix(agent-net): 名单无负责者时不承载网络并要求共享附件目录
回合服务端仓同步 PR 评审中发现的两处内核问题:
- 已加入集群的副本在成员名单里找不到某网络的负责者(例如后端因续约失败
  把它从名单移除、名单为空)时,原逻辑回退为「本副本负责全部网络」,会与
  新负责副本同时承载同一网络。现改为不承载:现有会话以 1012 关闭,该网络
  的 HTTP 请求回 503 REPLICA_UNAVAILABLE,WebSocket 升级回 503;加入前的
  启动阶段行为不变。
- 集群模式必须显式配置共享 mediaDir,否则以 CLUSTER_MEDIA_DIR_REQUIRED
  拒绝启动,避免各副本默认写到自己的数据目录、交接后丢附件。

后端合同说明与验证入口同步更新。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 00:46:22 +08:00
MagicLizi
1facff566d fix(agent-net): 回合服务端验证的多副本中转加固
服务端仓同步 PR 用数据库后端和多进程验证多副本时,为内核补充了以下改动,现回合到本仓:

- 共享状态事务被抢先后,按逐次加倍、带随机抖动的间隔重试;否则一个副本持续写入同一文档时,
  另一个副本的写入会 16 次全部落败
- 后端提交失败、重试用尽或附件锁在开始工作前失败时抛出 RelayStateUnavailableError(从包入口导出),
  HTTP 请求返回可重试的 503 CLUSTER_STATE_UNAVAILABLE(原为 500),告警每 10 秒最多记一条
- 多副本过期清理按负责网络逐个小事务提交,不再用一笔覆盖全部网络、易与其他副本冲突的事务
- 新增 GET /ready 就绪探针(离开中返回 503 draining)与 RELAY_CLUSTER_COMPAT 集群合同版本;
  副本间 WebSocket 连接开启 TCP_NODELAY 与 15 秒 keepalive;主机在线查询响应限 16 KiB;
  导出 checkMemberUrl,无法解析的 URL 返回 INVALID_CLUSTER_URL;createClusterRouter 可选 source

服务端仓另有的分享文档全局清理不回合:本仓内核没有对应的清理逻辑。
自建中转与不传 cluster 的官方中转除新增 /ready 外行为不变,不提升 RELAY_VERSION。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 00:11:59 +08:00
MagicLizi
329a9cd9d9 Merge origin/main into feat/subscription-account-placement
Resolve conflicts with #10375 (pooled Codex model discovery, pause guards
for unpooled default logins):

- Keep per-provider account selection and add the per-account Codex
  model membership check for new OpenAI work.
- The unavailable-account check covers both the provider's serving
  accounts and failed per-account model discovery.
- guardAccountSwitch takes both the engine route and the unpooled default
  provider; providerFor returns any pool provider and keeps the unpooled
  default detection.
- Listing providers reads created providers of the kind, then refreshes
  pooled Codex models; created OpenAI providers mirror the pooled models.
- Restore-test model now one every account lists, since new OpenAI work
  only picks accounts whose own model list has the model.

Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 00:05:58 +08:00
MagicLizi
e2883d83c8 Merge verified current main into quota fix
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-14 00:01:59 +08:00
Dash
9bef6fcf28 Merge main into Host M1 and carry Pi package watcher fix into core
Regenerate the Host channel inventory from the merged sources.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-14 04:55:29 +13:00
Lizi
196262aed7 feat(agent-net): 官方中转支持多副本扩容与滚动更新 (#10400)
* feat(agent-net): 官方中转支持多副本扩容与滚动更新

官方 Agent-Net 中转内核原本只能单进程运行:同账号设备连到不同副本时数据被静默丢弃,
两个副本共用状态文件会互相覆盖,因此既不能扩容,也不能用两个副本轮流更新。

- 按账号网络用 rendezvous 哈希选负责副本,其他副本把请求和 WebSocket 原样转交
- 状态按网络与全局文档分键,乐观提交并核对版本,变更推送到所有副本
- 防重放在集群内统一申领;跨副本查询分享主机的在线状态
- 副本离开时先退出名单,再以 1012 通知设备重连
- 自建中转保持单进程;不传 cluster 时行为不变

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

* fix(agent-net): protect replica handoffs and shared attachment writes

Recheck ownership after asynchronous authentication, serialize attachment I/O across replicas using fresh state, and bound forwarding waits without timing out established WebSockets.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>

* test(agent-net): verify forwarding deadlines without client fallback

Use a raw WebSocket without its own handshake timer, confirm the stalled backend observes EOF, and preserve the established-connection check.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>

* fix(agent-net): 核对跨副本鉴权状态并保留持续上传

在控制入口定向核对最新状态,将后端故障与撤权区分;分别限定连接、流空闲与响应头等待,并按网络过滤和复用分享主机状态查询。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>

---------

Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-13 23:47:49 +08:00
Dash
205ad0a9b4 Merge main into Host M1 integration for account model discovery
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-14 04:44:10 +13:00
DavidShen
06712e967e fix(pi): reclaim idle bot and scheduler runtimes
Preserve native session identity and task resources during idle release.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: DavidShen <david@xd.com>
2026-11-13 23:43:44 +08:00
MagicLizi
2e942729ae Merge current main after final quota combination verification
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-13 23:36:37 +08:00
Lizi
09e7dd0ae5 Merge pull request #10397 from makecindy/cindy/vibrant-feynman
feat(mobile): 支持掌机组合键滚动与 Start 发送文字
2026-11-13 23:07:28 +08:00
Lizi
7e7467931d Merge pull request #10291 from makecindy/feat/im-bot-sidebar-projects
feat(im): IM 机器人的项目就是侧栏的本机项目
2026-11-13 22:52:45 +08:00
Lizi
4e1800c0d5 Merge pull request #6656 from A1aZ/fix/6650-group-voice
fix(desktop): 补齐伙伴主群和话题回复的语音输入
2026-11-13 22:50:23 +08:00
MagicLizi
f5ca503cff fix(openai): restore default account quota without a linked login
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-13 22:08:52 +08:00
MagicLizi
a11646d4cb fix(subscriptions): keep created providers reachable and honor task switches
Review against the original goal (choose which task uses which account):

- Listing providers now reads the accounts of Cindy-created providers
  together with their built-in one. Only the built-in pool was read, so
  after a restart a created provider stayed "not connected" and missing
  from the new-task picker until its settings page was opened.
- Created providers stay in the settings list while signed out, so their
  accounts can be signed in again or the provider deleted.
- Switching an existing task to another provider of the same kind now
  hands the conversation over to that provider's account on the next
  send (the existing pre-send handoff), instead of failing to resume.

Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-13 22:05:36 +08:00
Lizi
f58aada0e2 feat(agent-net): 为节点增加 App 自报标识 (#10360)
* feat(agent-net): 为节点增加 App 自报标识

保留节点来源 App,按 App 显示和分流 Cindy 电脑功能;缺省值维持旧设备行为。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>

* fix(agent-net): 保留旧状态帧省略的 App 标识

从已验目录或同一节点的已知值补齐在线 App 元数据,目录更新同步到已有对等连接。
保留账号清理和显式新值替换,并用真实翻译资源修正设备版本呈现的测试模拟。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>

* fix(agent-net): 设备卡片版本显示实际 App 名

Use the same localized App brand in the topology version subtitle as
in My Devices, and keep legacy Cindy labels unchanged. Cover known,
unknown and omitted App identities with real locale data and UI scenes.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>

---------

Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-13 21:52:17 +08:00
MagicLizi
caf1429fc9 feat(subscriptions): let users choose where subscription accounts go
Same-kind subscription accounts are no longer merged by default
(subscription-account-pools.md, 2026-11-13 decision):

- Upgrade-merged legacy Codex connections are restored as their own
  providers; tasks keep the account they were bound to.
- Each provider assigns and counts only its own accounts. Account
  placement lives in a separate owner file that older clients do not
  rewrite.
- Add Provider asks where another account goes: its own provider
  (default) or a connected provider of the same kind.
- Accounts can be moved, taken out on their own, or a provider merged
  into another one; the CLI default login stays with the built-in.
- Cindy-created GPT and Claude subscription providers (official CLI
  login, one directory per account; the retired Claude connection is
  not revived).
- Helper configure_model_provider gets the same create / add / place /
  merge / remove-provider actions through the shared service.
- Older executing computers reject the new actions; the UI says they
  need an update instead of falling back.

Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-13 21:46:27 +08:00
Lizi
3b29b4f58d Merge pull request #10294 from zqchris/teammate-portable-memory
feat(memory): use project files and skip idle teammate reviews
2026-11-13 21:29:55 +08:00
Lizi
7ea2ba6cce Merge pull request #9331 from Yuewei-LL/fix/windows-deep-link-handoff
fix(desktop): 修复 Windows 提权实例的通用深链跳转
2026-11-13 21:26:58 +08:00
xd-bobo
745acb725f fix(im): forget a removed project's settings and unify Slack defaults
- When a project is removed from the sidebar, or its name passes to
  another folder, the model, permission and source settings stored under
  that name are cleared, so a later project with the same name does not
  inherit them. Channel rows are cleared on the servers through the
  existing mirror.
- Official Slack now reads the same default settings as the other
  official bots. Its own leftover defaults, which had no settings entry,
  are cleared in the same one-time upgrade step.

Signed-off-by: xd-bobo <caojianbo@xd.com>
2026-11-13 21:22:56 +08:00
DavidShen
e9a316ab0f feat(mobile): add handheld trigger scrolling and Start send
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: DavidShen <david@xd.com>
2026-11-13 21:03:24 +08:00
xd-bobo
5a4b6a39bf feat(im): clear the old official-bot defaults on upgrade
The old new-conversation defaults for official bots have had no settings
entry for a while but stayed on disk as the fallback for projects
without their own settings. They are now cleared once at the first start
after upgrade, and the notice asking the user to restore defaults is
removed from the settings page. Projects without their own settings use
the built-in defaults afterwards.

Signed-off-by: xd-bobo <caojianbo@xd.com>
2026-11-13 20:28:46 +08:00
Lizi
b339cf829d Merge pull request #9937 from makecindy/cindy/upbeat-babbage
feat(device-link): send less data between remote controllers and hosts
2026-11-13 20:18:19 +08:00
Dash
b1b26f52a0 Merge main into cindy/host-m1-rc3 for Host services
Preserve the shared Host services and client IPC route. Resolve only
the overlapping assembly, runtime and test changes.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Assisted-by: Cindy (https://cindy.app)
2026-11-14 01:17:35 +13:00
Lizi
569d8a7555 Merge pull request #10378 from makecindy/fix/agent-net-datagram-queue-delay
fix(agent-net): 限制中继停顿时的数据报发送积压
2026-11-13 20:05:32 +08:00
Lizi
a5d3ef2c20 Merge pull request #10355 from yan-xdt/cindy/tranquil-hawking
fix(providers): 恢复共享供应商旧任务的账号与组切换
2026-11-13 20:01:53 +08:00
Alan Z
156e4a2cbc Merge origin/main into fix/6650-group-voice
Keep voice capture guards alongside group stop permissions, and retain both reply-composer and public-Cindy UI scenarios.

Assisted-by: Cindy
Signed-off-by: Alan Z <3347202+A1aZ@users.noreply.github.com>
2026-11-13 19:29:42 +08:00
MagicLizi
dc3f502a27 fix(agent-net): offer the relay queue update to existing deployments
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-13 19:24:51 +08:00
Lizi
e80d8eff12 Merge pull request #10348 from makecindy/fix/agent-net-uplink-keepalive
fix(agent-net): 自动重建失效的中继连接并区分日志设备
2026-11-13 19:10:22 +08:00
MagicLizi
7359e51c7d Merge main into fix/agent-net-datagram-queue-delay
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-11-13 19:06:23 +08:00