Commit Graph

5 Commits

Author SHA1 Message Date
Lizi
6ef0db1d0b fix(desktop): Pi 不再进正式安装包,公证失败直接暴露 Apple 原因
Pi 此前既走 CDN 运行时下载,又在安装包内保留 resources/pi 作为兜底。
这份包内兜底与 Claude Code / Codex 的分发方式不一致,并且让未签名的
Pi 目录进入 Cindy.app 参加 Apple 公证,是本次 macOS 公证失败的根因。

Pi 分发对齐 CC/CX:
- 移除 forge 的 stagePi() 与 resources/pi 的 extraResource 装包配置,
  以及针对 resources/pi 的 Windows 签名遍历。
- pi-host 只认本次启动已成功准备好的二进制,不再回落到包内路径,也不
  复用上一次的旧缓存;CDN 不可用时 Pi 本次不可用,但不影响 Cindy 启动。
- 补齐发布包不含 Pi 的校验与相关单测,同步法律声明中"随包分发"的表述。

macOS 公证:
- notarytool submit 改 --output-format json 并显式判定 status,不再把
  Invalid 当成功继续 staple。
- 非 Accepted 时保留 zip 供诊断,并拉取 Apple notarization log 打印真实
  失败原因;notarytool 自身非 0 退出时同样从 stdout 救回 submission id
  去拉日志(Invalid 的 exit code 随 Xcode 版本变化)。
- 所有回显与日志对 App 专用密码打码。

验证:pnpm test:unit 全绿(341 tests / 340 pass / 1 skip / 0 fail,
apps/desktop 与 apps/mobile 均 PASS);pnpm --filter desktop typecheck 通过;
git diff --check 通过。Apple 真实公证需下一次 macOS CI 连 Apple 服务验证。

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-08-02 19:38:58 +08:00
Chris
48e3421286 fix(dir-dist): reject files outside the manifest (exact-set match), not just verify listed ones
P1 follow-up to the per-file-hash change on PR #1265. verifyDirDistManifest only iterated
manifest.files, so extra files/symlinks in the dist dir (stale build residue, local pollution)
were never compared against the actual directory contents — verify still returned true,
ensure-agent-binaries skipped the refresh, and stagePi copied the whole directory (including
unverified extra bytes) into the installer. verify now recursively enumerates the directory and
requires the actual set to match the manifest exactly: an extra regular file, a count mismatch,
or any symlink/non-regular entry (a pollution vector writeDirDistManifest never records) fails
verification.

Adds coverage: stray top-level file, stray nested file, and recovery after removal. Full
pnpm test:unit green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-08-01 21:24:42 +08:00
Chris
637d657b3d fix(pi): hash-verify dir-dist assets; keep Pi out of the task-summary one-shot fallback
Two more review follow-ups on PR #1265:

- tools/shared/dir-dist-manifest.mjs: the dir-dist manifest recorded and compared only
  file sizes, so a corrupted or replaced Pi executable/sibling asset of the same byte
  length passed the cache/package gate used by both tools/pi/update.mjs and
  scripts/ensure-agent-binaries.mjs. writeDirDistManifest now records a sha256 per file
  and verifyDirDistManifest re-hashes and compares them (fail-closed: a size-only legacy
  manifest is treated as untrusted and forces a re-download). Complements the archive
  digest pin from the earlier fix.
- sessionTaskSummary.ts: the task-summary one-shot fallback called
  getMaker().oneShot(session.agentKind, ...) directly, so a pinned Pi session threw
  (PiAgent has no oneShot) and the summary was silently left unset. It now skips the
  fallback for agents that can't one-shot. Extracted a shared agentSupportsOneShot()
  predicate in oneShotCandidates.ts and reused it in help.ts (replacing its local set)
  so both one-shot fallbacks share one source of truth.

Adds coverage: same-length tamper and size-only manifests are rejected. Full
`pnpm test:unit` green; desktop typecheck clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-08-01 19:50:39 +08:00
Chris
dfa470610b fix(pi): verify dir-dist assets on install and keep Pi labels in shared mobile views
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-08-01 13:26:08 +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