Commit Graph

23 Commits

Author SHA1 Message Date
bobo
b247c2d324 refactor(protocol): 本地化跨端协议包 (#2373)
* refactor(protocol): localize shared protocol packages

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

* fix(protocol): align localized contracts with consumers

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

* fix(protocol): keep model currency optional

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

* fix(protocol): align legacy model and plugin fields

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

* fix(protocol): preserve plugin oauth metadata

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

---------

Signed-off-by: xd-bobo <caojianbo@xd.com>
2026-08-11 15:31:27 +08:00
JiangJiahao
08edd9efa7 Merge upstream/main into feat/issue-397-ios-simulator-native-framebuffer
Signed-off-by: JiangJiahao <jiangjiahao@xd.com>
2026-08-08 20:58:28 +08:00
fmfsaisai
28ad06d094 ci: 并行拆分 Linux 单元测试 (#2177)
* ci: shard Linux unit tests

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* ci: guard protocol before Linux shards

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

---------

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
2026-08-08 19:40:44 +08:00
dependabot[bot]
5de1fc5db1 chore(deps): bump pnpm/action-setup in the actions group (#2118)
Bumps the actions group with 1 update: [pnpm/action-setup](https://github.com/pnpm/action-setup).


Updates `pnpm/action-setup` from 6.0.9 to 6.0.10
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](0ebf47130e...0977fd9972)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-version: 6.0.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-08 12:55:28 +08:00
JustinBao
8970c9cfe8 ci: build model access protocol before checks (#1676)
Signed-off-by: justin <justinbao@outlook.com>
2026-08-08 10:27:26 +08:00
JiangJiahao
ee17ee94c3 Merge remote-tracking branch 'upstream/main' into feat/issue-397-ios-simulator-native-framebuffer
Signed-off-by: JiangJiahao <jiangjiahao@xd.com>

# Conflicts:
#	apps/desktop/src/main/maker-host/index.ts
#	apps/desktop/src/main/usage/__tests__/modelPricing.test.ts
#	apps/desktop/src/main/usage/__tests__/turnCostCalculator.test.ts
#	apps/desktop/src/main/usage/__tests__/usageHistory.test.ts
2026-08-06 13:14:39 +08:00
Kros Dai
168bd4dfdf chore(ci): 更新 code review workflow pin (#1843)
* 🔧 chore(ci): update review workflow pin

- 🔧 track the latest upstream `v1` commit
Signed-off-by: Kros Dai <xdanger@gmail.com>

* 🔧 chore(ci): honor downstream review policy

- 🔧 pin upstream workflow with repository policy support
Signed-off-by: Kros Dai <xdanger@gmail.com>

---------

Signed-off-by: Kros Dai <xdanger@gmail.com>
2026-08-06 11:24:42 +08:00
Chris Zhang
7fcd81e24c ci: reject protocol submodule rollback (#1751)
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Co-authored-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-08-05 18:22:49 +08:00
JiangJiahao
8d2aed5600 Merge upstream/main into feat/issue-397-ios-simulator-native-framebuffer
Signed-off-by: JiangJiahao <jiangjiahao@xd.com>
2026-08-04 14:33:05 +08:00
Lizi
337453df07 Merge pull request #1371 from zqchris/xdt/auto-bimv92
feat(desktop): 插件页全面改版——已安装/推荐分区、卡片主动作三分、一键全部更新、面板收束
2026-08-03 09:16:41 +08:00
Chris Zhang
ca09428adc ci: verify 的 Typecheck desktop 步骤 heap 提升到 8GB (#1403)
desktop tsc 全量 typecheck 峰值内存随仓体增长突破 4GB:2026-08-02 起
所有 PR 的 verify 在 Typecheck desktop 步骤稳定 OOM(exit 134),含纯
mobile 改动的 PR(#1401 与 android-landscape-drawer-crash 分支双重复现,
失败栈均为 node OOMErrorHandler)。

公开仓 ubuntu-latest runner 内存 16GB,8GB heap 安全;本地同款修法
(NODE_OPTIONS=--max-old-space-size=8192)已验证 typecheck 通过。

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Co-authored-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-08-03 02:10:55 +08:00
Chris
45cbd39fd8 fix: address review — 批准绑定入队代际 + 抬高 desktop typecheck 堆上限
扩权批准的代际绑定:
- 代际与账号归属改为**入队时**捕获(上一轮误改成执行时捕获)。等排到自己
  才读当前批次,会让账号切换 / 新批次接管后的旧点击重新绑定到新批次里同
  pluginId 的待确认项上——等于未经批准放行新账号或新 release 的扩权。
  现在代际不符一律作废,账号失配走 voidStaleBatch,绝不改绑。
- 在途批准计数改为**按代际分桶**(inflightByGeneration)。全局单计数下,
  旧代际的在途项会把新批次的收尾拖住:减到 0 时代际已不匹配、跳过收尾,
  新批次就永远不释放 running。每个代际只对自己的桶负责。
- 回归测试补:首项安装进行中切账号并启动新批次 → 旧队列项延迟执行时整体
  作废(install 调用数不变)、新批次的待确认项原封不动仍等用户批准。
  连续批准两项的串行与收尾时序由上一轮用例覆盖。

CI verify 的 typecheck OOM:
desktop 的 tsc 峰值内存已贴着全局 4096MB 上限(本地实测约 4.2GB,
Types ~125 万 / Instantiations ~277 万),runner 上随机 OOM。已排除是本 PR
引入:本 PR 对 apps/desktop/src 净增仅 284 行(3181 插入 / 2897 删除),
移走最大的单个新增测试文件只省 ~5MB、移走 1400 行的插件页组件只省 ~14MB,
skipLibCheck 也早已开启——是整仓类型规模的自然结果,没有单点热点可优化。
给「Typecheck desktop」这一步单独设 6144MB,其它步骤维持全局值。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-08-03 00:50:29 +08:00
DavidShenXD
917d49e677 ci: 并行拆分 Windows 单测门禁 (#1354)
* ci: 并行拆分 Windows 单测门禁

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

* fix(ci): 收窄空分片兼容范围

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

---------

Signed-off-by: david <david@xd.com>
2026-08-02 15:43:24 +08:00
DavidShenXD
2bce883017 test: 建立 Windows 路径单测门禁 (#1348)
* test: 建立 Windows 路径单测门禁

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

* fix(scripts): 统一 Windows worktree 实路径

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

* test(desktop): 覆盖 Windows no-follow 回退

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

* test(desktop): 对齐 Windows 真实路径夹具

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

---------

Signed-off-by: david <david@xd.com>
2026-08-02 13:22:32 +08:00
hushaowu-rh
c240bc7205 feat(device-link): improve continuity after reconnect (#1143)
* feat(device-link): improve continuity after reconnect

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(device-link): harden reconnect continuity

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(device-link): retain offline broadcast tap

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(device-link): clear queued pushes on disconnect

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(device-link): close explicit link queue boundary

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(mobile): invalidate closed device links

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(mobile): require complete reconnect recovery

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(mobile): reconcile authoritative message windows

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(mobile): preserve stable live message tails

Use the host's stable message ordering when reconciling a delayed authoritative latest window so same-timestamp live rows with a larger rowid remain visible.\n\nCo-Authored-By: Claude <noreply@anthropic.com>

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(device-link): cover relay reconnect gaps

Queue subscribed push traffic while the Desktop relay connection is unavailable, and preserve arrival order for same-timestamp live messages whose push frame has no host rowid.\n\nCo-Authored-By: Claude <noreply@anthropic.com>

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(mobile): distinguish retained link state

Track whether a reusable openLink request is still pending so completed retained links cannot indefinitely defer stale mirror cleanup after a DEVICE_OFFLINE verdict.\n\nCo-Authored-By: Claude <noreply@anthropic.com>

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(mobile): retain pending live message tails

Preserve explicitly tracked live assistant identities when an authoritative latest-window fetch resolves at the same timestamp, without retaining stale persisted rows missing from the window.\n\nCo-Authored-By: Claude <noreply@anthropic.com>

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(device-link): close lifecycle reconciliation gaps

Prune untracked stale message tails from authoritative windows, release active topics on revocation, and include accepted topicless modern links in explicit Desktop teardown.\n\nCo-Authored-By: Claude <noreply@anthropic.com>

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* ci: preserve existing PR review workflow

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(mobile): invalidate live ACKs on peer close

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

* fix(device-link): retain modern protocol state

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>

---------

Signed-off-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>
Co-authored-by: Shao-Wu Hu <271197399+hushaowu-rh@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-01 23:30:16 +08:00
Kros Dai
c44dfae6aa 🔧 chore(ci): pin pr-code-review to latest v1 (#1246)
- ⬆️ track upstream krosdai/.github v1 (Opus 5)

Signed-off-by: Kros Dai <xdanger@gmail.com>
2026-08-01 02:12:46 +08:00
Kros Dai
466db34682 ci: 接入 Claude Code 自动 code review (#985)
* ci: 接入 Claude Code 自动 code review

调用 krosdai/.github 的复用 workflow,用法参照 krosdai/scaffold 的调用方,
按本仓惯例做三处收紧:

- 钉死 commit SHA 而非浮动 tag @v1。这是跨 org 的复用 workflow,持有
  pull-requests:write 并决定喂给模型的 prompt,tag 可被上游重新指向。
  dependabot 已开 github-actions 生态,升级 PR 照常来。
- 权限收到被调用 workflow 声明的最小集(actions:read / contents:read /
  id-token:write / pull-requests:write),不带 scaffold 里用不到的 issues:write。
- 不在调用方设 concurrency:被调用 workflow 已按 repo + PR number 分组并
  cancel-in-progress。

新增根目录 REVIEW.md 作为审阅口径。被调用 workflow 的 prompt 写死在上游,
REVIEW.md 是本仓唯一的定制入口,主要解决三件事:

- 严重度映射。上游 prompt 用 P1/P2 且 P3 不报,本仓 development-workflow.md §3
  用 P0/P1/P2 且 P2 不报,两套词表撞了;不映射会把本仓口径的「可选优化」
  当成上游 P2 报上来。
- 划掉与 client-ci 等机器门禁重合的检查项,把有限的 finding 名额留给
  凭证落盘、Electron 进程边界、migration companion 脚本、mobile 冷更
  fingerprint、协议兼容、UI 双模式这些机器查不到的部分。
- 写明评审环境限制(cindy-protocol submodule 未 checkout、fetch-depth 100、
  依赖未安装),避免据此误报文件缺失。

定位为建议性检查,不替代人工 review 与 client-ci;fork PR 一律跳过
(取不到 secrets,且外部分支内容进 prompt 有注入面)。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGFHz5VqmoRC73g72KJYET
Signed-off-by: Claude <noreply@anthropic.com>

* docs(ci): 修正 pr-code-review 前置配置注释的自相矛盾

原注释写「缺任一项本 workflow 会失败」,但紧接着的 ANTHROPIC_BASE_URL 是可选项,
不设会走 api.anthropic.com 默认值。改成按必需/可选分别标注,避免排查时被误导。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGFHz5VqmoRC73g72KJYET
Signed-off-by: Claude <noreply@anthropic.com>

* fix(ci): pr-code-review 排除 dependabot 触发的 run

Dependabot 的分支在本仓,同仓判断拦不住它,但 GitHub 把 Dependabot 触发的
pull_request 当 fork 处理:GITHUB_TOKEN 只读,且 Actions secrets 一律不可见
(只有 Dependabot secrets 可见)。于是 job 会照常启动然后必然失败——拿不到
ANTHROPIC_API_KEY,也拿不到 pull-requests:write 去发评论。

本仓 dependabot 每周巡检 github-actions 与 npm 两个生态,上限 5 个 PR,不排除
就是每周固定几条红。

被调用 workflow 的 allowed_bots 输入解决不了这个:它管的是 claude-code-action
自己的 bot 作者校验,与 GitHub 扣发 secrets 是两层;上游注释也写明要禁 bot 就在
调用方 gate。

判定用 github.actor 而不是 pull_request.user.login:约束的实质是「谁触发了这次
run」。人往 dependabot 分支上推 commit 时 run 由该人触发,secrets 与写权限都正常,
那次 review 应该照跑,用 user.login 会连这种情况一起误杀。

若以后希望 dependabot PR 也过 review,把 ANTHROPIC_API_KEY 以同名加到 Dependabot
secrets,再删掉这一行条件即可。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGFHz5VqmoRC73g72KJYET
Signed-off-by: Claude <noreply@anthropic.com>

* docs(ci): 记录 pr-code-review 内层 action 未 pin 的残余风险

钉住 uses: 那一行锁的是「跑哪份 workflow 文件、什么 prompt、什么权限声明、
什么工具白名单」,锁不住「该文件在运行期拉取并执行哪个版本的 action」。

截至 0838103,被调用文件内部是两个浮动 tag——actions/checkout@v6 与
anthropics/claude-code-action@v1——它们运行在持有 ANTHROPIC_API_KEY 与
pull-requests:write 的 job 里。

由 Codex 在 PR #985 上指出。经确认接受该残余风险:这两个分别是 GitHub 与
Anthropic 的第一方 action,tag 被恶意重指向属于行业级事件,不构成本仓特有的
暴露面;代价是与本仓「全部 action 钉 40 位 SHA」的惯例留了一处不一致。

真正的修法在上游(让 krosdai/.github 把内部 action 钉到 SHA,本仓再 re-pin),
本仓改不掉,故只作显式记录。背景见 PR #985 与安全门 issue #999。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGFHz5VqmoRC73g72KJYET
Signed-off-by: Claude <noreply@anthropic.com>

* docs(review): 更正 REVIEW.md 里「PR 模板结构已被机器门禁覆盖」的错误声明

原文把「PR 模板结构」列进「已被机器门禁逐条断言、不要重复上报」的清单,这是
事实错误。pr-template-rules.yml 带 paths 过滤,只在模板文件、校验脚本或该
workflow 自身变动时才跑;check-pr-template-rules.mjs 校验的是
.github/PULL_REQUEST_TEMPLATE.md 这个模板文件本身的二级标题,从不读取任何
具体 PR 的正文。也就是说某个 PR 缺「怎么验证的」这类必填段落时,机器并不会拦。

仍然让自动 reviewer 略过 PR 叙述质量问题,但把理由改成范围划分(属于人工
review 的范围,不该占用有限的 finding 名额),而不是虚假的覆盖声明。

顺带给保留的「引用的设计规范」字段标注了它的实际生效条件(pr-design-basis
仅在变更命中 UI 路径时校验)。

由 Codex 在 PR #985 上指出。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGFHz5VqmoRC73g72KJYET
Signed-off-by: Claude <noreply@anthropic.com>

* docs(ci): 更正 dependabot 排除注释里关于 pull-requests:write 的错误说法

原注释把排除 dependabot 的原因写成「拿不到 ANTHROPIC_API_KEY,也拿不到
pull-requests:write 去发评论」。后半句不对:GITHUB_TOKEN 对 Dependabot 触发的
run 确实默认只读,但那只是默认值——自 2021-10 起这类 run 会遵循 workflow 的
permissions key,而本文件已经声明了 pull-requests:write。

唯一真正卡住的是 secrets:Actions secrets 对 Dependabot 触发的 run 一律不可见,
只有 Dependabot secrets 可见,所以拿不到 ANTHROPIC_API_KEY。排除的结论不变,
但理由要写准——否则日后有人照这条注释去排查,会往权限方向查错方向。

同时给「如何恢复 dependabot review」的说明补了一句:权限侧不需要额外动作,但这
条链路(Dependabot + reusable workflow + permissions key)没有实机验证过,真要
恢复时先拿一个 dependabot PR 实跑确认。

这处错误在 6587787 的 commit message 里也有,历史无法改写,以本注释为准。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGFHz5VqmoRC73g72KJYET
Signed-off-by: Claude <noreply@anthropic.com>

---------

Signed-off-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-07-30 21:32:03 +08:00
DavidShenXD
45c50e4fbc test(desktop): 分层协调多 worktree 测试资源 (#796)
* 改为纯序列化测试

X-XDT-Session: 73eb7a4d-4a83-442a-8df6-32908f69e0f6
X-XDT-Kind: after-edit
X-XDT-Anchor: 054c0e4a-d152-475d-bd8a-98865b4d92e8
X-XDT-Branch: xdt/auto-49r99t
Signed-off-by: DavidShen <david@xd.com>

* 改造测试目录模板避免资源争抢

X-XDT-Session: 73eb7a4d-4a83-442a-8df6-32908f69e0f6
X-XDT-Kind: after-edit
X-XDT-Anchor: 66d1a5a4-d1ce-4655-9338-e5d78e25b65e
X-XDT-Branch: xdt/auto-49r99t
Signed-off-by: DavidShen <david@xd.com>

* 本轮开始前的未提交改动

X-XDT-Session: 73eb7a4d-4a83-442a-8df6-32908f69e0f6
X-XDT-Kind: before-edit
X-XDT-Anchor: 5bd85d7b-6fd6-491e-94dc-d7b92b4d7a96
X-XDT-Branch: xdt/auto-49r99t
Signed-off-by: DavidShen <david@xd.com>

* 本轮开始前的未提交改动

X-XDT-Session: 73eb7a4d-4a83-442a-8df6-32908f69e0f6
X-XDT-Kind: before-edit
X-XDT-Anchor: 79e78304-4a59-4c9d-9c3b-c4c32d223b36
X-XDT-Branch: xdt/auto-49r99t
Signed-off-by: DavidShen <david@xd.com>

* 完善分层测试锁配置说明

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

* fix(test): 保持 Vitest 分层项目的 tier 排除

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

* fix(test): harden layered test coordination

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

* test(desktop): split real git integration tier

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

* ci(test): run desktop git integration tier

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

* test(desktop): remove artifact capture wait overhead

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

* test: normalize source-contract line endings

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

* fix(test): treat reset lock ports as occupied

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

---------

Signed-off-by: DavidShen <david@xd.com>
2026-07-28 23:23:27 +08:00
JiangJiahao
83ed73368c feat(ios-simulator): implement host-owned native simulator
Signed-off-by: JiangJiahao <jiangjiahao@xd.com>
2026-07-27 17:38:20 +08:00
Lizi
1bed48d65b ci(workflows): 钉死 cindy-protocol submodule 来源再拉取
`.gitmodules` 由 PR 分支提供,fork PR 可以把 cindy-protocol 的 url / path 改成任意
仓库,`git submodule sync` 会照单执行,让第三方内容进入 CI 并被 pnpm install 解析。

在 sync/update 之前加一步来源校验:url 必须是
`https://github.com/makecindy/cindy-protocol.git`、path 必须是 `cindy-protocol`,
读不到(如 `.gitmodules` 被删)同样视为不合格并退出 1。

gitlink 的 commit 同样来自 PR,但来源钉死后只能从 makecindy/cindy-protocol 拉取,
外部无法向该仓库推送,所以取到的一定是本组织的历史;因此只校验来源即可。

现有 CI 全程不使用 secrets、权限为 contents: read,本改动是纵深防御,不改变任何
既有验证步骤。

验证:
- 本地 `pnpm test:unit` 全绿(25 PASS / 6 SKIP / 0 FAIL,退出码 0)
- 校验脚本三种场景实测:正常通过(0)、url 被改(1)、`.gitmodules` 被删(1)
- ci.yml YAML 解析通过,17 个步骤

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Lizi <jiali@magiclizi.com>
2026-07-26 10:27:10 +08:00
Dash
2080c69f53 feat(i18n): 建立术语表体系,统一 19 个产品术语
此前 i18n 只有 key 结构门禁(check-i18n.mjs),没有任何术语一致性保障。实测
162 个英文短语存在多种中文译法,反向 227 条:同一个 scheduler 面板里字段叫
「提示词」、它的校验报错叫「Prompt」;issueTracker 列表按钮写「新建议题」、
点进去页面标题写「新建工单」;中文「额度」同时对应 Balance / Credits / Quota
三个英文概念。

- i18n/glossary.json 为唯一事实源,i18n/GLOSSARY.md 自动生成供人和 agent 查阅
- status 双档:decided 阻断 CI,proposed 只告警,让未拍板的术语可见可讨论
- alsoAllowed 场景化译法:同一个词按语境有不同说法,每条必须写明 when
  (Automation 作模块名是「自动化」,指单条实例是「自动任务」,Computer Use
  语境是「自动操作」)
- checkCase 开关:Issue 这类同时是常用英语单词的术语关闭大小写检查,否则
  prompt 模板里的 "fix the issue" 会被误判
- glossary-baseline.json 冻结 565 条存量,只减不增;已修复却仍挂账会报错

- 新增 check:i18n-glossary(禁用译法 / 大小写形态 / zh-CN 标点 / 文档同步)
- check:i18n 与 check:brand-terminology 此前写好却从未在 CI 跑过,一并挂上
- scripts/shared/glossary-rules.mjs 抽出纯规则函数,26 个单测钉住边界

规则边界由现状数据定,不靠直觉:ja 实测半角冒号 124:78 才是主流(日文 UI
惯例),因此全角标点规则只对 zh-CN 生效。

Session / Chat / Thread 统一为「对话」(440 + 22 + 3 处);「代理」整体废弃,
Agent / Subagent / Proxy 均保留英文;Issue 保留英文(工单 32 + 议题 4);
Credits / Quota / Balance 拆为「点数 / 配额 / 余额」,「额度」退出;
Effort 定为「推理强度」——同类工具 i18n 中断层第一,且跨 provider 中立。

同形异义按 exempt 精确豁免,不做机械替换:ssh-agent 非产品 Agent;SSO 的
「身份提供方」非「模型供应商」;登录态与 WebSocket 语音连接的 session 非产品
「对话」。

6 个直接断言中文文案的测试同步更新期望值——它们是有意的文案锁,其中
mobileCindyVoiceSession.test.ts 正是靠断言抓出了漏网的「语音识别会话」。

验证:pnpm test:unit 全量通过;五个 guard 全 PASS;mobile typecheck 干净。
desktop typecheck 的 2 条错误为 origin/main 既有基线问题(main CI 同样为红),
与本次改动无关,未在本 commit 内修复。

Co-Authored-By: Claude <noreply@anthropic.com>

Signed-off-by: Dash <dashhuang@gmail.com>
2026-07-25 16:25:18 +12:00
Lizi
e76f8623fe ci: 新增 PR 设计依据轻校验(UI 改动需引用设计规范)
- PR 模板「UI 变化」新增必填项「引用的设计规范」,提交前检查同步加勾选项
- 新增 pr-design-basis workflow + scripts/check-pr-design-basis.mjs:
  变更命中 UI 路径时校验该字段非空且引用 docs/design-rules/ 文档,
  或以「不涉及:<理由>」豁免;draft PR 跳过,补填正文自动重跑
- development-workflow.md 注明该 CI 门禁与边界(通过 CI 不代表内容合格)

门禁:pnpm test:unit 通过;独立 reviewer 对抗性 review 两轮,无 P0/P1

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 11:15:26 +08:00
Lizi
bb3f71d084 chore: Cindy 首次开源提交 / initial open-source release
Cindy 是心动网络 (X.D. Network Inc.) 的跨端 AI Agent 客户端。
本次提交包含 Desktop(Electron)、Mobile(Expo)及全部共享 packages
的完整源码,以 Apache-2.0 协议开源。

This is the first public release of Cindy, X.D. Network's cross-platform
AI agent client: the Electron desktop app, the Expo mobile app, and all
shared workspace packages, licensed under Apache-2.0.

- 许可与合规:根 LICENSE(Apache-2.0)+ NOTICE;第三方组件归属声明与
  SPDX SBOM 收口在 docs/legal/notices/,由 pnpm licenses:generate 生成。
- 社区文件:README / CONTRIBUTING / CODE_OF_CONDUCT / SECURITY / SUPPORT
  中英双语;issue / PR 模板与 CI workflow 在 .github/。
- 协议层以公开 submodule 引入:github.com/makecindy/cindy-protocol。
- 提交前已通过仓库门禁:全量 pnpm test:unit 与涉及 package 的 typecheck。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 08:30:44 +08:00