Commit Graph

24 Commits

Author SHA1 Message Date
Dash
350f112a45 fix(mobile): clean up Metro log and owner record on Ctrl-C
sim-start now handles SIGINT/SIGTERM/SIGHUP by forwarding them to Metro, so
the launcher stays alive for Metro's exit callback instead of dying first.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 21:11:51 +13:00
Dash
1065df1bc5 fix(mobile): per-launch private Metro log, full writes, no device-link allowlist
Each Metro launch writes its log in a fresh mkdtemp directory recorded in the
port owner record, so logcheck only reads that launch's log and never a
predictable path. Short writes discard the log like failed ones. device-link
warnings are no longer known: relay errors can hide auth failures.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 20:48:00 +13:00
Dash
d115916e19 fix(mobile): stop the whole Metro tree when the owner record cannot be written
On Windows the spawned child is only the pnpm/cmd wrapper. Reuse the
tree-aware terminateMetro path and wait for it before exiting.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 20:34:28 +13:00
Dash
5b8e0f5b2d fix(mobile): narrow the no-listener allowlist and stop Metro when ownership cannot be recorded
Only the three observed missing-listener events are known warnings. sim-start
registers log cleanup before writing the owner record, and stops Metro and
removes its log when that write fails.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 20:22:36 +13:00
Dash
1f09a5bb3d fix(mobile): delete the Metro log when its Metro exits
The raw output may carry credentials and logcheck already rejects a stopped
Metro, so sim-start removes the log on child exit and on spawn errors.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 20:09:59 +13:00
Dash
88e2fb9cb0 fix(mobile): reject Metro logs not written for the running launch
sim-start writes a launch id into the log header and the Metro owner record
(null when the log could not be created). logcheck reports unknown unless
they match, so an old log that could be neither replaced nor deleted cannot
pass.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 19:30:52 +13:00
Dash
eb865b7f92 feat(mobile): check Metro logs after simulator verification
sim:start now writes Metro output to apps/mobile/logs/metro-<port>.log, and
mobile:sim:logcheck reports what happened after the latest entry bundle: ERROR
and failed bundles fail, unlisted warnings must be reported, and an unknown
state is not a pass. Add the check to the simulator verification rules.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 17:37:40 +13:00
Dash
68a43f429e docs(mobile): document parallel simulators via RCT_jsLocation
The simulator guide claimed the iOS debug app only ever loads Metro on 8081,
so agents concluded two worktrees could not run on two simulators at once.
React Native first reads the per-device RCT_jsLocation default and only
falls back to 8081 when that Metro does not answer.

Document how the app picks Metro, the two silent fallbacks, the parallel
device recipe (rebuild --udid, start --port, point the device, verify with
whoami --udid --port and the build label, clean up), and what is still
unverified on Android. Align the dev rules and sim-start comments.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 01:47:24 +13:00
Dash
93933624fe feat(dev): 桌面与手机共用的免登录 UI 模拟数据(--mock)
- @cindy/maker-shared/ui-mock:两端共用的演示项目与任务(桌面数据库行格式)
- Desktop:restart --mock 使用独立 ui-mock 沙箱,首次免账号进入并补齐模拟任务
- Mobile:sim:start/whoami/rebuild 支持 --mock,visual mock 改用共享数据
- 文档:docs/dev-rules/ui-mock-data.md,并在启动说明与 AGENTS 索引中链接

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-24 14:01:03 +13:00
Dash
9018f7c47a fix(mobile): 统一模拟器启动身份校验并保留依赖现场 (#4599)
* fix(mobile): 统一模拟器启动身份校验并保留依赖现场

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

* fix(mobile): 复用模拟器 UDID 参数解析并修正文档示例

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-09-17 17:01:22 +07:00
Yecheng Fu
d895395501 fix(mobile): 修复 E2E 登录前置断链 (#4401)
* [mobile] fix: restore deterministic Maestro login and flow checks

Signed-off-by: Yecheng Fu <yechengfu1987@gmail.com>

* [mobile] test: record iPhone Simulator login evidence

Signed-off-by: Yecheng Fu <yechengfu1987@gmail.com>

---------

Signed-off-by: Yecheng Fu <yechengfu1987@gmail.com>
2026-09-16 12:16:06 +07:00
DavidShen
e232909f44 fix(mobile): track Metro environment fingerprint
Signed-off-by: DavidShen <david@xd.com>
2026-09-09 04:06:18 +08:00
DavidShen
b00f836cce fix(mobile): 校验首次听写选区与 Metro 区域
Signed-off-by: DavidShen <david@xd.com>
2026-09-09 03:41:59 +08:00
DavidShen
875a1bf55c fix(mobile): 完善听写停止和 Windows 模拟器环境
Signed-off-by: DavidShen <david@xd.com>
2026-09-09 03:41:54 +08:00
DavidShen
7e97a68fd9 fix(mobile): 修复 Windows Metro 归属探测
Signed-off-by: DavidShen <david@xd.com>
2026-09-09 03:41:54 +08:00
DavidShen
a146eb5041 fix(dev): 修复 Windows 移动端调试与测试门禁
Signed-off-by: DavidShen <david@xd.com>
2026-08-31 14:54:34 +08:00
Dash
09634e456b fix(mobile): 让 --takeover 能清掉孤儿 Metro 和脏 worktree (#3235)
--takeover 原先要求对方 worktree 的磁盘指纹仍等于 Metro 启动时的
注入值。目录已删或启动后改过文件时会误拒,8081 被占死。确认是
Cindy Metro 后即可接管;未知进程仍然 fail closed。

Signed-off-by: Dash <dashhuang@gmail.com>
2026-08-22 18:46:53 +08:00
Dash
c578913605 fix(mobile): harden Simulator Metro takeover after rebase
Keep --takeover fail-closed for foreign Metro processes, allow restarting a stale current-worktree Metro, and keep whoami --json compatible with the exact Simulator target added on main.

Signed-off-by: Dash <dashhuang@gmail.com>
2026-08-17 13:04:09 +12:00
Dash
3dc0b608c9 fix(mobile): close Metro takeover safety gaps
Signed-off-by: Dash <dashhuang@gmail.com>
2026-08-17 13:02:31 +12:00
Dash
3136c2a06e fix(mobile): verify Metro source before takeover
Signed-off-by: Dash <dashhuang@gmail.com>
2026-08-17 13:02:31 +12:00
Dash
2f86c0402a feat(mobile): add safe simulator Metro handoff
Signed-off-by: Dash <dashhuang@gmail.com>
2026-08-17 13:02:13 +12:00
bobo
12c216d426 feat(auth): route organization sign-in by auth region (#748)
* feat(auth): route organization sign-in by auth region

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

* fix(auth): confirm organization realm switches after discovery

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

* fix(auth): address final realm routing review

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

* fix(auth): close final realm review gaps

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

* fix(auth): reconnect desktop clients on realm change

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

* fix(auth): keep deferred retries in the correct realm

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

* fix(auth): bind pending push revocation to its realm

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

* fix(mobile): cancel stale push opt-out sync

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

* fix(auth): authenticate realm-bound push revocation

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

* fix(auth): keep cross-realm transitions client-side

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

* fix(mobile): reject stale realm activation

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

---------

Signed-off-by: xd-bobo <caojianbo@xd.com>
2026-07-28 20:32:59 +08:00
Dash
6ca0cfc0a6 feat(region): 将 Global 设为默认区域 (#475)
* feat: 将 Global 设为默认区域

Signed-off-by: Dash <dashhuang@gmail.com>

* fix(region): 让本地入口与测试显式使用区域

Signed-off-by: Dash <dashhuang@gmail.com>

* fix(region): 同步本地构建身份并改进清单错误

Signed-off-by: Dash <dashhuang@gmail.com>

---------

Signed-off-by: Dash <dashhuang@gmail.com>
2026-07-26 09:21:10 +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