Skip to content

feat(pi): 支持在 Cindy 中管理 Pi 扩展 - #2771

Merged
MagicLizi merged 69 commits into
makecindy:mainfrom
zqchris:pi-package-compat-parser
Aug 19, 2026
Merged

feat(pi): 支持在 Cindy 中管理 Pi 扩展#2771
MagicLizi merged 69 commits into
makecindy:mainfrom
zqchris:pi-package-compat-parser

Conversation

@zqchris

@zqchris zqchris commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

这次改了什么

摘要

在「设置 → 通用」中新增一行「Pi 扩展设置」入口,点开后可安装、启停、更新和卸载 Cindy 自己管理的 Pi 扩展。已安装扩展使用单行紧凑列表,详情按需展开,安装 5–6 个扩展不会堆成大卡片。

同时修复对话内安装链路:精确整句 pi install npm:context-mode 现在由 Cindy Host 确定性解析并直接进入 Cindy 的受管扩展目录,不再交给模型判断,也不会落入用户自己的 ~/.pi/agent。自然语言安装请求走专用 cindy_pi_extension 工具;模型侧 Bash 会硬拦常见 pi install/update/remove 及其绝对路径、command / exec / env / sudo 包装形式。

原始失败根因

此前对话中的 pi install npm:context-mode 被模型当作普通 shell 命令执行,调用 Pi CLI 的默认用户目录,因而安装到了 ~/.pi/agent,完全绕开了 Cindy 的 pi-package-home、兼容检查和批准状态。这不是展示问题,而是安装链路没有接通。

运行位置与边界

  • Cindy 仍以 --no-extensions 启动 Pi,关闭用户 ~/.pi 和项目目录的隐式扩展发现。
  • 随后只显式加载 Cindy 自有 bridge、subagent、pinned plan-mode,以及用户在 Cindy 中安装并批准的第三方 Pi 扩展。
  • 扩展只安装、保存和运行在执行任务的这台 Cindy 主机上,不传到手机或其他控制端,也不存在 device-link 的“远程扩展目录”。
  • 手机或另一客户端通过 device-link 发起任务时,Pi 进程仍在主机 Cindy 上运行,因此主机已启用的 Pi 扩展正常可用。
  • 独立 SSH remoteHostId 任务不会接收主机本地扩展路径,也不能管理主机扩展。
  • Review 保持隔离,不加载、也不能管理第三方 Pi 扩展。

兼容和安全

  • 支持 npm、Git、本地路径及 Pi convention 目录;识别 Extension、Skill、Prompt、Theme。
  • 解析扩展声明的 Pi 版本范围并检查运行时是否满足。
  • 静态识别 Pi TUI / RPC 能力差异;部分兼容、不支持或未知项仍允许安装,但必须明确告诉用户。
  • notify 会进入 Cindy 消息流;select / confirm / input / editor 会适配成 Cindy 选择卡。定时对话框和其他无法同步的 Pi TUI 能力会安全取消,并向用户说明未显示的能力。
  • Theme 会保留但不加载,因为 Cindy 不使用 Pi 的 TUI 主题。
  • Host 管理通道使用每个 Pi runtime 单独生成的 bearer token,第三方扩展不能只靠伪造 UI title/payload 冒充安装或卸载请求。
  • 设置页只接受本地绝对路径;Pi 任务内的相对路径按任务工作目录解析,避免设置页与任务目录语义混淆。
  • 可执行 Extension 默认停用;安装、重装、更新后撤销旧批准,必须由用户重新确认来源后启用。
  • npm lifecycle scripts 禁用;安装内容受 canonical root、符号链接、扫描数量、深度、字节和耗时上限约束。
  • 包元数据始终按不可信数据处理;精确命令回执和专用工具结果均限制在约 16KB,超限时保留名称、版本、启用状态和资源计数并明确标记详情已截断。
  • 不修改 .cindy 扩展体系及其存量安装、批准或配置。

用户可见变化

  • 用户侧统一称「Pi 扩展」,不叫插件或 Pi 包。
  • 设置 → 通用只有一行入口;管理页分为「安装扩展」和「已安装」。
  • 已安装列表一行一个,显示名称、版本、开关、更新、卸载和展开按钮;窄窗口下有兼容限制时只显示一个告警图标,不把列表撑大。
  • 安装/更新后展示资源兼容性、运行时版本要求、生命周期脚本警告和是否需要批准。
  • Pi 任务启动时固定本次扩展快照;安装、更新、启停影响新建或重启后的 Pi 任务,卸载后已经打开的任务保留旧扩展直到关闭。
  • 扩展注册的斜杠命令只在 Pi Harness 下可用;其他 Harness 不会把它们展示成可执行命令。

UI 变化

  • 引用的设计规范:docs/design-rules/DESIGN.md §4 Buttons / Dialog & Modal、§10 Light / Dark Dual-Mode Delivery Gate 与语义 token、§14.2 Focus Management。
  • 落地方式:设置入口和紧凑列表复用语义颜色与共享按钮/ConfirmDialog;所有新增控件具备 focus-visible;Light / Dark 均已在隔离 Desktop 目检,Windows 复验步骤见下文。
改动后界面 HTML 证据(静态页面,可复制保存为 .html 打开)

以下页面依据当前 SettingsViewPiPackagesSection 的实际结构、文案和状态整理;同时展示设置入口、安装区、紧凑列表、兼容告警、展开详情及管理操作。颜色使用与实现一致的语义变量,并随系统 Light / Dark 切换。

<!doctype html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta name="color-scheme" content="light dark">
  <title>Pi 扩展设置</title>
  <style>
    :root { --bg:#fff; --surface:#f6f7f9; --text:#17181a; --muted:#666b73; --border:#dfe2e7; --warning:#a15c00; }
    @media (prefers-color-scheme: dark) {
      :root { --bg:#18191b; --surface:#222428; --text:#f4f5f7; --muted:#a7abb2; --border:#3a3d43; --warning:#ffbd66; }
    }
    body { margin:0; padding:24px; background:var(--bg); color:var(--text); font:14px system-ui,sans-serif; }
    main { max-width:760px; margin:auto; }
    .entry,.install,.package { border:1px solid var(--border); border-radius:12px; background:var(--surface); }
    .entry,.package-row { display:flex; align-items:center; gap:12px; padding:14px 16px; }
    .entry strong,.package-main { flex:1; }
    .muted { color:var(--muted); }
    .install { display:flex; gap:8px; padding:12px; margin:20px 0; }
    input { flex:1; min-width:0; }
    button,input { padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--bg); color:var(--text); }
    button:focus-visible,input:focus-visible { outline:2px solid Highlight; outline-offset:2px; }
    .actions { display:flex; align-items:center; gap:8px; }
    .warning { color:var(--warning); }
    .details { border-top:1px solid var(--border); padding:12px 16px 16px; }
  </style>
</head>
<body>
<main>
  <section aria-label="设置入口">
    <button class="entry" type="button">
      <span><strong>Pi 扩展设置</strong><br><span class="muted">安装、启停和查看兼容风险</span></span>
      <span aria-hidden="true"></span>
    </button>
  </section>

  <section aria-labelledby="pi-title">
    <h1 id="pi-title">Pi 扩展</h1>
    <form class="install">
      <input aria-label="扩展来源" value="npm:context-mode">
      <button type="submit">安装扩展</button>
    </form>

    <h2>已安装</h2>
    <article class="package">
      <div class="package-row">
        <div class="package-main">
          <strong>context-mode</strong> <code>v1.0.169</code><br>
          <span class="warning" role="status">⚠ 部分能力需要兼容适配</span>
        </div>
        <div class="actions">
          <label><input type="checkbox" checked> 已启用</label>
          <button type="button">更新</button>
          <button type="button">卸载</button>
          <button type="button" aria-expanded="true" aria-controls="compat-details"></button>
        </div>
      </div>
      <div class="details" id="compat-details">
        <strong>兼容详情</strong>
        <p>1 个 Extension · 8 个 Skills</p>
        <p class="warning">notify 部分兼容 · lifecycle scripts 未执行</p>
      </div>
    </article>
  </section>
</main>
</body>
</html>

该静态页面不替代 Windows 实机验收;Windows 复验步骤与剩余风险仍保留在下文。

怎么验证的

真实 context-mode E2E

在隔离 Desktop pi-extension-preview 中完成:

  1. 新建普通 Pi 任务,原样发送 pi install npm:context-mode
  2. 会话文件只有 Cindy 内部安装回执和助手答复,没有任何 Bash 或其他 tool call。
  3. 包安装到隔离 userData 下的 pi-package-home,识别为 context-mode v1.0.169
  4. 识别 1 个 Extension 和 8 个 Skills;Extension 报告 notify 部分兼容及静态分析未完成,lifecycle scripts 未执行。
  5. 重装后 Extension 保持停用;在设置中阅读风险并重新批准启用。
  6. 新建 Pi 任务,扩展斜杠命令进入 Pi 自己的命令目录;真实调用 ctx_stats 成功,返回 context-mode v1.0.169 的当前统计。
  7. 真实验证扩展 notify 消息可进入 Cindy 对话;命令被 Pi 接受后,即使后续 get_state 探测超时也不会把已执行命令误报失败。

未读取、修改或清理用户正式 ~/.pi/agent 中此前误装的内容。

UI 验收

  • Light / Dark 均在隔离 Desktop 真实目检。
  • 已安装 5–6 个扩展时保持单行列表;详情只在用户展开后显示。
  • 安装确认、兼容结果、Extension 启用风险、更新、卸载均真实操作验证。

自动验证

pnpm --filter @cindy/maker-core exec vitest run src/agents/pi/__tests__/cindyBridgeSource.test.ts --pool=forks --maxWorkers=1
13 passed / 1 skipped

pnpm --filter @cindy/maker-core run --if-present typecheck
命令 exit 0;该 package 当前没有 typecheck script,按门禁跳过

pnpm test:unit:related
合并最新 upstream/main 后执行;因分支含 wide files 自动升级为全量 unit。本轮目标测试通过,但本机全量未全绿:Desktop 2 个既有 receipt schema 用例、maker-core 3 个 Pi provenance 用例和 1 个 dotenv symlink 集成用例失败。这些失败在本轮两文件修改前可独立复现,且不依赖本轮改动文件;不把它们包装成已通过。新 head 的 GitHub checks 以 live 结果为准。

pnpm check:dco
通过

node ~/.agents/skills/git-workflow/scripts/pre-pr-freshness.mjs
通过:基底落后 upstream/main 0 个 commit,上游重叠文件 0

git diff --check
通过

另有定向覆盖:确定性整句解析、自然语言专用工具、超大回执截断、Bash 防误装、Review 禁用、SSH remote 禁用、device-link 本机语义、并发 mutation queue、批准撤销、路径和符号链接越界、紧凑列表。

风险

  • 权限 / 安全 / 用户数据
  • system prompt
  • 跨平台差异
  • 第三方 Pi Extension 与 Pi 同进程执行

第三方可执行 Extension 获得批准后可读取 Pi 能访问的文件和环境变量;设置页会在启用前明确提示。Windows 未做实机 UI 目检,最终以本次新 head 的 CI 为准。

提交前检查

  • 已复核完整 diff
  • 每个非 merge commit 带 DCO 签名
  • UI 同时实现 Light / Dark 语义 token
  • 未提交凭证、令牌或授权文件
  • 已记录真实 E2E、自动测试和剩余风险

独立 UI 代码审查第 1 轮修复

  • 首次加载改为 loading / ready / error 三态;失败显示持久错误与重试,不再伪装为空列表。
  • 所有 mutation 控件共享全局串行锁;安装、更新、启停、卸载均显示明确进行中状态。
  • 安装与卸载确认在请求期间保持打开且不可关闭;失败后保留弹窗,可直接重试。
  • 三套自造弹窗统一迁移到共享 ConfirmDialog;兼容详情、三按钮和 loading 复用公共行为。
  • 新增入口、返回、安装、行标题、更新、卸载、展开等键盘 focus-visible。
  • 加入请求世代与卸载保护,只接受最新刷新结果,离页后的迟到回调不再写局部状态。
  • 窄窗告警保留 sr-only 文本,避免只依赖 generic span 的 aria-label。
  • 新增 PiPackagesSection.interactions.test.tsx,覆盖加载失败/重试、跨行 busy、安装与卸载失败重试、启停进度、最新请求胜出和卸载后迟到回调。

Windows 实机复验说明

Windows 尚未做实机 UI 目检;本 PR 的跨平台逻辑、类型检查和单元测试已覆盖,但不能把这些等同于 Windows 视觉验收。复验步骤:

  1. 下载本 PR 当前 HEAD 的 Windows CI 构建产物,使用独立 userData 启动。
  2. 在 Light / Dark 下进入「设置 → 通用 → Pi 扩展设置」,分别以宽窗和窄窗检查入口、单行列表、展开详情与确认框。
  3. 安装 5–6 个扩展并验证列表不膨胀;用 Narrator 检查每行兼容性告警只朗读一次。
  4. 逐项验证安装、更新、启停、卸载的 loading、全局互斥、失败保留弹窗与重试。
  5. 新建 Pi 任务验证已启用扩展及斜杠命令可用,并确认 Review 任务仍不加载第三方 Pi 扩展。

独立 UI 代码审查第 2 轮(已按总控修复)

总控采用修法一:宽屏可见状态文字标记 aria-hidden="true",由 sr-only 作为唯一辅助技术语义源。结构测试同时约束同一 noticeCount 只有一份非 aria-hidden 文本,并确认宽屏可见分支被隐藏于可访问性树。剩余 UI finding:0。

PR 规模构成(pr-size-gate STOP 说明)

本 PR 是一个单一完整目标:让用户在 Cindy 内安装、检查、批准、管理并实际调用 Pi 扩展。规模主要由四个不可拆断的层组成:受管安装与安全边界、Pi runtime 装载与调用、设置管理及兼容提示、端到端与安全回归测试。少任一层都会形成“能装不能用”“能用不能管理”或绕过批准与兼容检查的残缺体验,因此不拆成独立 PR;命中的产品门与架构门均直接服务于该目标。

主干同步后的回归

已合并最新 upstream/main;新增主干提交只改动侧栏设备图标,与本轮 Pi mutation 边界及其测试无重叠。合并后重新通过定向测试、DCO、freshness 与 diff 检查;本机全量 unit 的既有失败已在上方如实列出,不将其写成全绿。

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

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

# Conflicts:
#	apps/desktop/src/main/maker-host/pi-host.ts
@zqchris
zqchris force-pushed the pi-package-compat-parser branch from 80af1f4 to e0ac05a Compare August 15, 2026 12:34
@zqchris zqchris changed the title feat(pi): 支持在 Cindy 中安装和调用 Pi 包 feat(pi): 支持在 Cindy 中管理 Pi 扩展 Aug 15, 2026
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
@zqchris
zqchris marked this pull request as ready for review August 16, 2026 16:43
@zqchris
zqchris requested a review from a team as a code owner August 16, 2026 16:43
@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown

Greptile Summary

本 PR 为 Cindy 增加完整的 Pi 扩展管理能力,并将对话中的扩展安装请求接入主机受管目录。

  • 新增扩展安装、更新、启停、卸载、兼容性分析、批准撤销和文件边界检查。
  • 为 Pi 会话增加受管扩展快照、确定性命令解析、专用管理工具及命令/技能清单。
  • 打通 Desktop、device-link 和移动端的扩展能力展示,同时隔离 Review 与远程 SSH 场景。
  • 在设置页新增紧凑的 Pi 扩展管理界面及对应多语言文案。

Confidence Score: 5/5

当前 follow-up 范围内没有仍需阻止合并的失败,PR 看起来可以安全合并。

没有发现符合 follow-up 发布条件的阻塞性失败,也没有提供需要继续计入合并风险的先前 Greptile 根线程。

Important Files Changed

Filename Overview
apps/desktop/src/main/maker-host/pi-package-store.ts 实现受管 Pi 扩展的安装、状态持久化、资源发现、指纹、边界检查和会话快照。
apps/desktop/src/main/maker-ipc/piPackageMutationIpc.ts 增加 Pi 扩展管理 IPC,并将变更操作接入主机授权和串行执行边界。
packages/maker-core/src/agents/pi/index.ts 将受管扩展快照、确定性管理命令、专用工具和运行时能力清单接入 Pi 会话。
packages/maker-core/src/agents/pi/cindy-bridge-source.ts 扩展 Cindy-Pi bridge,提供带主机令牌的扩展管理工具与受限命令执行行为。
apps/desktop/src/renderer/components/settings/PiPackagesSection.tsx 新增 Pi 扩展安装和管理界面,包括加载、错误、兼容提示、确认及全局 mutation busy 状态。
apps/mobile/src/device-link/mobileMakerTransport.ts 扩展移动端到主机的 Pi 命令与技能清单传输契约,并保持管理操作留在主机侧。

Sequence Diagram

sequenceDiagram
  participant User as 用户
  participant UI as Desktop/Mobile
  participant IPC as Cindy Host IPC
  participant Store as Pi 扩展存储
  participant Pi as Pi Runtime
  User->>UI: 安装或管理 Pi 扩展
  UI->>IPC: 受管扩展请求
  IPC->>Store: 校验来源、授权与文件边界
  Store-->>IPC: 已安装资源与兼容性结果
  IPC-->>UI: 展示状态及批准要求
  User->>UI: 批准并启用
  UI->>IPC: 启用请求
  IPC->>Store: 保存批准状态
  User->>Pi: 新建或重启 Pi 任务
  Pi->>Store: 获取已批准扩展快照
  Store-->>Pi: Extension/Skill/Prompt 路径
  Pi-->>UI: 暴露可用命令与技能
Loading

Reviews (57): Last reviewed commit: "fix(pi): isolate post-copy fingerprint b..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35003330f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/maker-core/src/agents/pi/index.ts
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be311682a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/maker-core/src/agents/pi/index.ts
Comment thread packages/maker-core/src/agents/pi/index.ts Outdated
Comment thread apps/desktop/src/main/maker-host/pi-system-prompt.md Outdated
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5106f2997

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/maker-core/src/agents/pi/cindy-bridge-source.ts
Comment thread packages/maker-core/src/agents/pi/index.ts
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b7a65ce3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/maker-ipc/register.ts
Comment thread packages/maker-core/src/agents/pi/cindy-bridge-source.ts Outdated
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 169f3d1fd2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/renderer/components/settings/PiPackagesSection.tsx
Comment thread apps/desktop/src/main/maker-ipc/register.ts Outdated
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 698d177b8f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/maker-host/pi-package-store.ts Outdated
Comment thread apps/desktop/src/main/maker-host/pi-package-store.ts
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2a91d61e9d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/maker-core/src/agents/pi/index.ts
Comment thread apps/desktop/src/main/maker-host/pi-package-store.ts Outdated
Comment thread apps/desktop/src/main/maker-ipc/register.ts Outdated
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1810b1fe3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/maker-host/pi-package-store.ts
Comment thread apps/desktop/src/main/maker-host/pi-package-store.ts Outdated
Comment thread apps/desktop/src/main/maker-ipc/register.ts Outdated
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b9ddae0f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/maker-host/pi-package-store.ts Outdated
Comment thread apps/desktop/src/main/maker-host/pi-package-store.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ba7264172

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/maker-host/pi-package-store.ts Outdated
@MagicLizi

Copy link
Copy Markdown
Contributor

@zqchris 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/main/maker-host/pi-package-store.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。

如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
@MagicLizi MagicLizi added status:ci-failed CI 失败(review-pr 自动维护,仅展示) and removed status:threads-open 还有未 resolve 的评审讨论(review-pr 自动维护,仅展示) labels Aug 19, 2026
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d222ddc02d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/maker-host/pi-package-store.ts Outdated
@MagicLizi

Copy link
Copy Markdown
Contributor

@zqchris 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/main/maker-host/pi-package-store.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。

如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。

@MagicLizi MagicLizi added status:threads-open 还有未 resolve 的评审讨论(review-pr 自动维护,仅展示) and removed status:ci-failed CI 失败(review-pr 自动维护,仅展示) labels Aug 19, 2026
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
@MagicLizi MagicLizi removed the status:threads-open 还有未 resolve 的评审讨论(review-pr 自动维护,仅展示) label Aug 19, 2026

@MagicLizi MagicLizi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto Review — Heavy tier: APPROVED

安全审查 + 代码审查通过(0 P0/P1)。

验证要点:

  • 3 个安全软命中均为误报(npm scoped identifier 命中 email regex × 2, test fixture forged token × 1)
  • mutation 序列化正确(enqueueMutation + cross-process file lock)
  • allowPiPackageManagement 在 RPC 执行侧做了 runtime check
  • MAIN_OWNED_SEND_CONTEXT symbol-keyed trusted-origin 管道完整
  • 新增依赖 @babel/parser / picomatch / semver 使用安全,无 prototype pollution 向量
  • 恶意代码/数据外发专项:未发现隐藏网络调用或混淆代码

6 条 P2 defense-in-depth 建议(不阻塞合并)已记录。


@MagicLizi
MagicLizi merged commit b584cb4 into makecindy:main Aug 19, 2026
11 checks passed
@MagicLizi

Copy link
Copy Markdown
Contributor

这个 Pi 扩展管理功能的安全架构做得很扎实——mutation 序列化链路、symbol-keyed trusted-origin 校验、sandbox 环境隔离三层防护层层递进,重度审查里没发现任何实际漏洞。合并了 🎉

@MagicLizi MagicLizi removed touches:security 改动碰到安全边界(review-pr 自动维护,仅展示) touches:core 改动碰到架构核心路径(review-pr 自动维护,仅展示) touches:product-ui 改动碰到产品 / UI 面(review-pr 自动维护,仅展示) touches:rules 改动碰到规则 / 规范文档(review-pr 自动维护,仅展示) touches:new-dependency 新增第三方依赖(review-pr 自动维护,仅展示) touches:large-diff 改动量较大(review-pr 自动维护,仅展示) labels Aug 19, 2026
gardenZzz added a commit to gardenZzz/cindy that referenced this pull request Aug 19, 2026
Signed-off-by: GardenX <20606485+gardenZzz@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

makecindy#2771 的 merge/shouldListPiPackageCommands 只认三家引擎,Cursor 作为第四家传入会让 desktop typecheck 失败。非 Pi 仍直接跳过扩展命令。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants