Skip to content

feat(permissions): 支持外部可写目录 - #3587

Merged
MagicLizi merged 22 commits into
makecindy:mainfrom
zqchris:external-writable-dirs
Aug 29, 2026
Merged

feat(permissions): 支持外部可写目录#3587
MagicLizi merged 22 commits into
makecindy:mainfrom
zqchris:external-writable-dirs

Conversation

@zqchris

@zqchris zqchris commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

这次改了什么

摘要

让用户在不启用“完全访问”的情况下,把工作区外的指定目录明确授权为可读写目录。该能力由 Cindy Core 统一持有,并接入 Claude Code、Codex 与 Pi 三套 harness;Auto-review 会区分主工作目录、只读引用目录和额外可写目录。

同时修复目录授权热更新期间的审核竞态:如果用户在审核器返回前替换或撤销目录授权,旧的自动允许结论会立即失效,本次操作回到用户确认,不会沿用过期权限。

变更类型

  • feat 新功能
  • fix 缺陷修复
  • refactor / perf 重构或性能优化
  • docs / test / chore 文档、测试或工程维护
  • 其他:

范围

  • 关联 Issue / 需求:用户需要在非“完全访问”权限下读写工作区外的自选目录。
  • 本 PR 包含:
    • 新建任务与已有任务中的“额外可写目录”选择、展示、移除和持久化。
    • Desktop IPC、数据库、device-link 与会话恢复链路中的 writableDirs
    • Claude Code、Codex、Pi 三套 harness 的运行时目录授权与 Auto-review 根目录分类。
    • 授权新增、替换、撤销、审核中撤权、只读/可写目录重叠和系统/凭证路径红线测试。
    • Pi 持久子会话的权限快照同步。
  • 明确不包含:任意目录默认放行、把只读引用目录升级为可写、绕过高风险命令或系统目录确认。
  • 用户可见变化:在目录选择入口中可以明确选择“可写目录”;Auto 模式可静默完成该目录内的安全读写,撤销后立即恢复审核。
  • 是否存在 breaking change:无。新增字段均为可选或带默认值;旧客户端/旧会话仍按原只读目录语义工作。

UI 变化

  • 引用的设计规范:docs/design-rules/DESIGN.md §1 Visual Theme & Atmosphere、§2 Colors & Semantic Tokens、§4 Component Stylings。目录入口复用现有菜单、图标、间距和语义颜色,不新增平行组件或硬编码色值;Light/Dark 均沿用现有 token。

怎么验证的

自动验证

pnpm test:unit:related
结果:Desktop、Mobile、device-link、lizi-mcps、orca-workflow 全部通过;Maker Core 2268 个用例通过,Auto-review、三 harness、授权替换/撤销与 Pi 子会话相关用例全部通过。

Maker Core 剩余一个 Pi xAI 集成用例受当前 main 刚 pin 的 Pi 0.84.3 影响稳定超时;其后的 BYOM 失败是该超时残留临时目录造成的级联,单独复跑通过。对照验证:同一份 upstream/main 用本机旧 0.83.0 二进制通过,显式换成仓库 pin 的 0.84.3 后复现相同超时,因此与本 PR 功能无关。

pnpm --filter desktop run --if-present typecheck
结果:通过。

pnpm --filter desktop db:validate
结果:通过,0000..0099 journal/snapshot/SQL 对齐,无 schema drift,companion scripts 均为 CommonJS。

pnpm --filter desktop test:migration-replay
结果:6/6 通过。

pnpm check:i18n && pnpm check:i18n-glossary && pnpm check:brand-terminology
结果:通过;只有仓库现有的非阻断告警。

pnpm check:dco
结果:通过,PR 范围 1 个 commit 已签署 DCO。

git diff --check
结果:通过。

手工验证

不涉及:本轮未启动 Cindy Desktop DEV/Electron;权限行为通过三套 harness 的真实审核入口测试和数据库 replay 验证。

未执行的验证

  • 未做 Desktop 实机点击验收,原因是本会话未获启动 Desktop DEV 的授权。
  • 未修复 Pi 0.84.3 的 xAI 集成超时;它可在未包含本 PR 改动的 upstream/main 上复现,属于独立主干问题。

风险

风险分类

  • 无已知风险
  • SQLite / migration
  • system prompt
  • 协议兼容
  • 权限 / 安全 / 用户数据
  • 存量插件兼容(批准状态 / 指纹 / manifest 校验 / 安装布局 / 包格式)
  • 原生层 / fingerprint / OTA
  • 跨平台差异
  • 其他:

影响与回滚

  • 影响范围:Desktop 本地会话记录、device-link 会话参数,以及 Claude Code、Codex、Pi 的目录授权与 Auto-review。
  • SQLite:0099 只向 sessions 添加带默认值的 writable_dirs;companion script 会先检查列是否存在,可安全 replay。回滚旧客户端时该列保留但不会被读取,不丢失其它会话数据。
  • 协议兼容:writableDirs 为可选字段,未提供时等价于空数组;旧端仍保持原行为。
  • 权限安全:额外可写目录必须由用户显式选择;只读目录不会因出现在 workspace roots 中获得写权限;系统目录与凭证路径仍逐次确认;授权热更新会使在途旧审核结论失效。
  • 跨平台:路径归属继续复用现有 macOS firmlink、Windows 路径与真实路径重叠判定;对应单测已覆盖。
  • 回滚 / 降级方式:回退应用代码即可恢复旧 UI 与旧 harness 行为;数据库新增列可保留,避免破坏已落地数据。

提交前检查

  • 已 review 完整 diff
  • 每个 commit 都带 DCO 签名(git commit -s,见 DCO
  • UI 改动已在「UI 变化」注明引用的设计规范章节
  • 未提交凭证、令牌或授权文件
  • 已补充必要文档(本功能无需新增独立用户文档)
  • 已确认测试结果或说明未执行原因

Pi system prompt 行为确认

  • 已批准行为:为让 Pi 在规划与调用工具时理解用户明确授予的目录边界,工作目录与外部可写目录的路径说明会通过 appendSections 进入 Pi 的 appendSystemPrompt
  • 隐私影响:这些目录路径会成为 Pi 模型上下文的一部分,并可能发送给用户当前配置的模型服务商;它不额外读取或注入目录内文件内容。
  • 安全边界:这段提示只提供模型上下文,不构成授权凭证,也不扩大运行时权限。写入、编辑、删除仍由宿主按 canonical/real path、writableRoots、系统目录、凭证路径及高风险命令规则审核;撤权后的旧运行时权限仍必须失效。
  • 验收口径:三套 harness 的权限一致性以宿主执行边界为准,不能用 system prompt 替代或绕过审核。Chris 于 2026-08-29 明确批准当前注入方式,本 PR 不移除或改写该行为。

Windows PowerShell pipeline 删除边界确认

  • 范围裁决feat(permissions): 支持外部可写目录 #3587 负责 Windows PowerShell pipeline 删除目标的 fail-closed;不扩展授权协议、平台入口、事务边界或 session 生命周期。
  • 安全口径Remove-Item 等写 cmdlet 的目标由 pipeline 提供时,上游路径必须经过与普通 shell 写目标一致的最近存在祖先 realpath 检查。真实目标越出 writableRoots、落入系统目录或凭证路径、远端执行端无法提供真实路径证据、目标或授权根解析失败时,一律 prompt-each-time,不得由轻量审核静默批准。
  • 现有实现证据:当前 head 的 pipelineFedWriteTargetNeedsConsent 已复用 writeTargetNeedsConsent 的 host realpath / unavailable fail-closed 链路;该实现由 commit a496b675 引入。
  • 测试决策:共享 Auto-review 回归已覆盖授权根内 symlink/junction 指向区外后经 Get-ChildItem ... | Remove-Item -Recurse 删除、远端不可解析、系统/凭证/悬空链接、合法授权根内清理及 cwd 未知。fixture 在 Windows 使用 junction;当前 head 的 Windows unit shards 已通过。Chris 于 2026-08-29 明确批准本口径。

Bootstrap writableDirs 授权来源确认

  • 范围裁决feat(permissions): 支持外部可写目录 #3587maker:create-session、携带 lazy-create 参数的 maker:send 及 active-Orca rehydrate,只允许激活 Main 已接受并写入 SQLite 的既有 writableDirs 子集。
  • 安全口径:Renderer/device-link payload 中自报的 writableDirs 不是授权来源。bootstrap 必须在 runtime 创建前以会话 SQLite 真值完整替换调用方值;无持久化授权时清空。过滤后需要收窄既有授权但持久化失败时,必须 fail closed,不得创建带分裂授权状态的 runtime。
  • 现有实现证据:当前 head 的 prepareDirectoryGrantsForBootstrap 已在唯一 bootstrapSession 中、maker.createSession 之前执行;direct create、lazy-send 与 rehydrate 均复用该入口。该边界由 commit 68dccf27a 落地。
  • 测试决策:Desktop 回归已覆盖无 DB grant 丢弃 caller roots、以 DB grant 替换 caller roots、过滤后持久化失败阻止启动、重启稳定恢复、远端不使用本机 SQLite,以及 helper 必须先于 runtime 创建的 wiring;当前 head 的 Desktop/Windows/Linux CI 均已通过。extraDirs 的既有只读引用校验不在本裁决中升级为可写授权。Chris 于 2026-08-29 明确批准本口径。

全部 Shell 写目标真实路径确认

  • 范围裁决feat(permissions): 支持外部可写目录 #3587 覆盖共享 Auto-review 能提取出的全部 shell 写目标,包括重定向、cpmvinstallteesedperl -i、归档/下载落盘、PowerShell 写 cmdlet 与 pipeline。三套 harness 必须共用同一边界。
  • 安全口径:目标词法上命中 writableRoots 后,必须在实际执行主机同时解析目标与授权根的最近存在祖先 realpath。真实目标越出命中的授权根、落入系统目录或凭证路径、目标/授权根无法解析,或远端执行端无法提供真实路径证据时,一律 prompt-each-time;普通词法区外写仍保持既有灰区,不得被真实路径反向洗绿。
  • 现有实现证据:commit a496b675 已让 systemWriteTargetsInSegment 和 PowerShell pipeline 将所有已提取目标统一交给 writeTargetNeedsConsent;Pi、Claude、Codex 的远端入口均标记 unavailable 并复用共享 reviewAction
  • 测试决策:共享 symlink/junction fixture 已覆盖 echo >cpteesed -i、PowerShell Set-Content 与 pipeline 越界,合法授权根内写保持既有判档;远端不可取证覆盖 cp fail-closed,三 harness remote wiring 亦有回归。当前 head 的 maker-core、Linux 与 Windows CI 已通过。无法静态提取目标的解释器或自定义命令仍至少进入 reviewer 灰区,不会因本规则成为自动批准。Chris 于 2026-08-29 明确批准本口径。

授权回滚失败安全关闭确认

  • 生命周期裁决:目录授权更新持久化失败后,先恢复 runtime 与持久化镜像的旧授权;只要任一回滚失败,就立即关闭受影响 session 的 live runtime。SQLite/UI 保持最后成功持久化的旧授权,请求返回失败;下次发送按 SQLite 真值懒重建。不得删除任务、消息或把失败的新授权写回。
  • 适用范围:本地与 device-link 的 extraDirswritableDirs 更新共用该语义,并在同一 session 锁内执行。关闭直接调用 Main 的 maker.closeSession(sessionId),不经会重入锁的 IPC。
  • 现有实现证据:commit f5b7303aapplyRemoteDirectoryGrantUpdate 已在 persistence rollback 与首次 runtime apply rollback 两个失败分支调用注入的 terminate()register.ts 为本地和远端统一注入 maker.closeSession(sessionId),AggregateError 保留原始持久化、回滚及关闭错误。
  • 测试决策:Desktop 回归直接覆盖持久化失败 + runtime 回滚失败时 terminate 一次,以及回滚成功时不得 terminate;本次定向 6/6 通过,当前 head 的 Desktop/Linux/Windows CI 已通过。Chris 于 2026-08-29 明确批准本安全关闭语义。

Main 签发 writable grant 授权模型确认

  • 授权裁决:Renderer 只能请求可写目录,不能凭原始绝对路径授予权限。每个本地新增 writable root 必须先由 Main 原生目录 picker 签发 grant,再由对应授权入口成功消费;保留或撤销既有授权不要求新 picker。
  • grant 约束:grant 绑定 IPC sender、session scope、lexical path 与选择时 realpath,5 分钟过期、一次性消费、批量全有或全无;消费时重做 realpath,symlink/junction 换靶 fail-closed。
  • 入口边界:本地 setter 与 local-db create 必须消费 grant;raw local-db update 禁止修改目录授权;bootstrap/lazy/rehydrate 只使用 SQLite 持久化子集;SSH/device-link 只允许保留或撤销执行端已有授权,不能使用控制端 picker 新增远端 root。
  • 现有实现证据:commit a496b675 落地 Main picker grant、setter/create 消费与 DB update gate;commit 68dccf27a 补齐 bootstrap/持久化和远端边界。当前 head 已封住无 picker 的 raw-path 扩权。
  • 测试决策:回归覆盖无 grant、每个新增 root、单次消费、跨 session/跨 sender、保留/撤销、过期与链接换靶、草稿预留 session id、DB create/update gate、bootstrap 丢弃 caller roots及远端拒绝新增。本次定向 13/13 通过,当前 Desktop/Linux/Windows CI 已通过。
  • 明确边界:grant 的 session scope 由同一受信 Renderer 在打开专用 picker 时提供,Main 以该 scope 和 sender 绑定并在消费端校验;当前模型不额外从 Main UI 状态推断“屏幕上当前任务”。即使 Renderer 受污染,也不能绕过用户实际完成的原生 picker 或凭任意 raw path 铸造 grant。Chris 于 2026-08-29 明确批准本模型。

Mobile 控制面范围裁决

  • 不纳入 feat(permissions): 支持外部可写目录 #3587:本 PR 的产品入口是 Desktop 的外部可写目录选择、展示、撤销、持久化与三套 harness 执行边界;不新增 Mobile UI、协议消费者或移动端授权管理。
  • 安全理由:Mobile 当前不能通过本功能新增 writable root,因此缺少手机端查看/撤销入口不构成授权绕过。已授予目录仍可在 Desktop 查看和撤销,执行端三套 harness 继续按同一宿主权限边界运行。
  • 产品判断:手机远程控制桌面任务不意味着每个 Desktop 权限功能都必须在同一 PR 提供移动端控制面。Mobile 查看/撤销属于独立的跨端体验议题,不作为 feat(permissions): 支持外部可写目录 #3587 的合并 blocker;本裁决不自动创建后续任务。Chris 于 2026-08-29 明确认为把 Mobile 纳入本 PR 属于过度扩展。

Pi 目录授权持久化窗口确认

  • 并发裁决:Pi 的目录授权以“权限快照成功落盘且仍为最新代际”为激活点。requested roots 与当前 runtime roots 不一致期间,所有进入 Auto-review 的动作都必须回到逐次用户确认,不得使用旧 reviewer 结论或新请求意图静默放行。
  • 状态转换:更新前已开始的审核由 generation 变化作废;落盘中的新审核由 pending-persistence fence fail closed;落盘成功后才切换 mutable roots;最新写入失败时 requested snapshot 回滚到最后持久化 roots,后续审核恢复使用旧授权。连续更新仍由既有 session 内串行链与 latest-generation 规则收敛。
  • 实现证据:commit 48beafd 在 Pi reviewAutoAction 前后同时检查目录授权是否仍在持久化,封住 generation 已更新但 mutableWritableDirs 尚未提交的窗口;不改变 Mobile、授权协议或其它 harness。
  • 测试证据:Pi dispatcher 回归新增“落盘阻塞期间 reviewer 不得被调用并转用户确认”和“落盘失败后继续使用最后持久化 writable roots”两条用例;该文件 99/99 通过,Maker Core typecheck 通过。相关测试其余失败仅为已知无关的语音代理 401、Pi xAI 60 秒超时及其 BYOM 临时目录残留。Chris 于 2026-08-29 明确选择本 PR fail-closed。

悬空链接写目标 fail-closed 确认

  • 范围裁决feat(permissions): 支持外部可写目录 #3587 直接封住“授权目录内悬空 symlink 指向区外尚不存在文件”的写入绕过;限定 Maker Core 的 Claude structured write、共享 shell 路径审核与 Pi bridge 三个既有解析点,不扩展授权协议或产品入口。
  • 安全口径:目标 realpath 失败时必须先 lstat 目标本身。目标词法实体存在但无法解析(悬空/循环链接或权限错误)即返回不可证明并转逐次用户确认;只有目标确实不存在时才允许继续解析最近存在祖先。
  • 实现证据:commit 6c880f8 在三个执行/审核文件中加入 exact-target lstat fence,共 21 行非测试代码。
  • 测试证据:Claude、共享 shell 与 Pi bridge 均新增直接写悬空链接本身的回归;定向 350/350 通过,Maker Core typecheck 通过。相关测试除既知 Pi xAI 60 秒超时及其 BYOM 临时目录残留外均通过,Desktop、Mobile、device-link、lizi-mcps 与 orca-workflow 全绿。Chris 于 2026-08-29 明确选择在当前 PR 修复。

本地只读/可写目录更新串行化确认

  • 事务边界:本地 SET_EXTRA_DIRS 与 SET_WRITABLE_DIRS 和 device-link 共用同一个 withSendToSessionLock(sessionId)。读取两类最新 SQLite 授权、冲突过滤、runtime 应用、持久化与失败回滚均在该锁内完成。
  • 并发语义:两个窗口同时提交只读父/可写子或可写父/只读子时,后进入者必须基于前一更新完成后的完整授权状态重新校验;不得同时保留重叠授权。
  • 失败语义:runtime 应用或持久化失败会恢复该 axis 的旧授权;回滚无法证明成功时关闭 live session,SQLite/UI 保持最后成功状态,不新增权限。
  • 实现证据:commit a496b67 将本地两类 setter 收敛到 applyDirectoryGrants 和同一 session 串行链;f5b7303a 提供原子应用、持久化与回滚 helper。当前 head 无需额外产品代码。
  • 测试证据:双向并发重叠更新、runtime/DB 一致性、持久化失败回滚及 handler wiring 定向测试 29/29 通过。

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
@zqchris
zqchris requested a review from a team as a code owner August 28, 2026 17:42
@zqchris
zqchris marked this pull request as draft August 28, 2026 17:43
@zqchris
zqchris marked this pull request as ready for review August 28, 2026 17:44
@greptile-apps

greptile-apps Bot commented Aug 28, 2026

Copy link
Copy Markdown

Greptile Summary

本 PR 为会话增加工作区外的显式可写目录授权,并将其贯通 Desktop 持久化、device-link、会话恢复以及 Claude Code、Codex、Pi 的运行时权限审核。

  • 新增 writable_dirs 数据库字段、迁移脚本及会话映射
  • 新增可写目录选择、展示、移除和远程同步流程
  • 为三套 agent harness 增加可写根和授权热更新 generation
  • 当前 Pi 写入路径仍存在通过符号链接越过新增授权边界的问题

Confidence Score: 3/5

该 PR 在修复外部可写目录的符号链接边界绕过前不宜合并,因为 Pi 可静默批准写入授权范围外的系统或凭证路径。

新增 writableRoots 扩大了自动批准写入范围,但路径审核只检查字面包含关系,Pi 执行前也没有对解析后的真实目标重新应用完整的系统、凭证及授权根边界。

Files Needing Attention: packages/maker-core/src/agents/pi/index.ts, packages/maker-core/src/agents/shared/auto-review.ts, packages/maker-core/src/agents/pi/cindy-bridge-source.ts

Security Review

新增外部可写目录在 Pi 自动审核中使用词法路径归属判断,且执行前没有按真实目标重新验证完整写入边界;授权目录内的符号链接可使写操作落到系统或凭证路径。

Important Files Changed

Filename Overview
packages/maker-core/src/agents/pi/index.ts 接入动态 writableRoots 与权限 generation,但新增可写根可通过符号链接将自动批准的写入导向授权范围外。
packages/maker-core/src/agents/shared/auto-review.ts 扩展 writableRoots 分类及审核上下文;文件写入边界仍采用不解析符号链接的词法判断。
apps/desktop/src/main/maker-ipc/register.ts 新增可写目录创建、更新、冲突排除和恢复链路,未发现独立阻断问题。
apps/desktop/src/main/maker-ipc/extraDirsValidator.ts 增加只读与可写授权冲突排除,但验证后仍保留原始路径,无法作为真实写入边界。
apps/desktop/src/main/localDb/schema.ts 为会话增加带空数组默认值的 writable_dirs 字段,与映射和迁移保持一致。
apps/desktop/src/renderer/features/cc-agent/CCAgentSessionView.tsx 为已有会话增加可写目录更新及实际接受子集的持久化处理。
packages/device-link/src/allowlist.ts 将新的会话级可写目录设置通道加入默认拒绝的远程调用白名单。

Sequence Diagram

sequenceDiagram
  participant U as 用户
  participant D as Desktop 授权
  participant P as Pi 工具调用
  participant R as Auto-review
  participant F as 文件系统
  U->>D: 授权外部 writableDir
  D->>P: 传递 writableRoots
  P->>R: write/edit 原始路径
  R->>R: 词法判断路径位于 writableRoot
  R-->>P: allow
  P->>F: 沿符号链接写入真实目标
Loading
Prompt To Fix All With AI
### Issue 1
packages/maker-core/src/agents/pi/index.ts:4005-4006
**符号链接绕过可写边界**

当外部可写目录本身或其子项包含指向授权范围外的符号链接时,`write`/`edit` 的原始路径会通过词法包含检查并被静默允许,而执行前没有按解析后的真实目标重新检查系统、凭证及可写根边界,导致 Pi 可以修改用户未授权的文件。**验证方式:**已追踪原始 `input.path` 从新增 `writableRoots` 审核到 Pi 写工具执行的完整路径,并确认真实路径检查只覆盖 agent home、subagent run 和只读根。

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(permissions): 支持外部可写目录" | Re-trigger Greptile

Comment thread packages/maker-core/src/agents/pi/index.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: 2d8caf5823

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/desktop/src/main/maker-ipc/register.ts Outdated
Comment thread apps/desktop/src/main/maker-ipc/extraDirsValidator.ts Outdated
Comment thread apps/desktop/src/renderer/features/cc-agent/CCAgentSessionView.tsx Outdated
Comment thread apps/desktop/src/renderer/features/cc-agent/NewMakerDraftRoute.tsx Outdated
@MagicLizi

Copy link
Copy Markdown
Contributor

@zqchris 👋 这个 PR 还有 5 条 review conversation 没 resolve(packages/maker-core/src/agents/pi/index.ts / apps/desktop/src/main/maker-ipc/register.ts / apps/desktop/src/main/maker-ipc/extraDirsValidator.ts / apps/desktop/src/renderer/features/cc-agent/CCAgentSessionView.tsx / apps/desktop/src/renderer/features/cc-agent/NewMakerDraftRoute.tsx),auto-review 因此暂时跳过、没法继续审查 / 合并。

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

@MagicLizi MagicLizi added status:ci-failed CI 失败(review-pr 自动维护,仅展示) touches:core 改动碰到架构核心路径(review-pr 自动维护,仅展示) touches:large-diff 改动量较大(review-pr 自动维护,仅展示) touches:product-ui 改动碰到产品 / UI 面(review-pr 自动维护,仅展示) touches:redline 改动碰到红线路径(updater / DB schema 等,review-pr 自动维护,仅展示) labels Aug 28, 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: 8dfb311f91

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/desktop/src/renderer/features/cc-agent/CCAgentSessionView.tsx 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: 27cd5715bf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/maker-core/src/agents/claude-code/index.ts
Comment thread apps/desktop/src/renderer/features/cc-agent/CCAgentSessionView.tsx 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: c701ce7194

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/maker-core/src/agents/shared/auto-review.ts
@MagicLizi

Copy link
Copy Markdown
Contributor

@zqchris 👋 这个 PR 还有 6 条 review conversation 没 resolve(apps/desktop/src/main/maker-ipc/register.ts / apps/desktop/src/main/maker-ipc/extraDirsValidator.ts / apps/desktop/src/renderer/features/cc-agent/CCAgentSessionView.tsx / packages/maker-core/src/agents/claude-code/index.ts / packages/maker-core/src/agents/shared/auto-review.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。

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

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
@MagicLizi MagicLizi added status:awaiting-bot-review 等外部审查机器人表态(review-pr 自动维护,仅展示) and removed status:ci-failed CI 失败(review-pr 自动维护,仅展示) labels Aug 28, 2026

@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: 2a656f56a1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/maker-core/src/agents/codex/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: ea63d2602d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/desktop/src/main/maker-ipc/register.ts Outdated
Comment thread packages/device-link/src/allowlist.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: 4cd859e17d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/maker-core/src/agents/shared/auto-review.ts
Comment thread packages/maker-core/src/agents/pi/index.ts
@MagicLizi

Copy link
Copy Markdown
Contributor

@zqchris 👋 这个 PR 还有 8 条 review conversation 没 resolve(apps/desktop/src/main/maker-ipc/register.ts / packages/maker-core/src/agents/claude-code/index.ts / packages/maker-core/src/agents/shared/auto-review.ts / packages/maker-core/src/agents/codex/index.ts / packages/device-link/src/allowlist.ts 等),auto-review 因此暂时跳过、没法继续审查 / 合并。

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

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

Copy link
Copy Markdown
Contributor

@zqchris 👋 这个 PR 还有 10 条 review conversation 没 resolve(apps/desktop/src/main/maker-ipc/register.ts / packages/device-link/src/allowlist.ts / packages/maker-core/src/agents/pi/index.ts / apps/desktop/src/renderer/components/new-chat/ChatInput.tsx / apps/desktop/src/main/maker-host/auto-permission-reviewer.ts 等),auto-review 因此暂时跳过、没法继续审查 / 合并。

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

@MagicLizi MagicLizi added status:awaiting-bot-review 等外部审查机器人表态(review-pr 自动维护,仅展示) and removed status:ci-failed CI 失败(review-pr 自动维护,仅展示) labels Aug 28, 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: dcc11584a9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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

Copy link
Copy Markdown
Contributor

@zqchris 👋 这个 PR 还有 8 条 review conversation 没 resolve(apps/desktop/src/main/maker-ipc/register.ts / packages/device-link/src/allowlist.ts / packages/maker-core/src/agents/pi/index.ts / apps/desktop/src/renderer/features/cc-agent/CCAgentSessionView.tsx / packages/maker-core/src/agents/shared/auto-review.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。

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

@MagicLizi MagicLizi added status:ci-failed CI 失败(review-pr 自动维护,仅展示) and removed status:awaiting-bot-review 等外部审查机器人表态(review-pr 自动维护,仅展示) labels Aug 28, 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: a496b6757e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/desktop/src/main/maker-ipc/makerSendTransaction.ts Outdated
Comment thread apps/desktop/src/main/maker-ipc/register.ts Outdated
@MagicLizi

Copy link
Copy Markdown
Contributor

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

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

@MagicLizi MagicLizi added status:awaiting-bot-review 等外部审查机器人表态(review-pr 自动维护,仅展示) and removed status:ci-failed CI 失败(review-pr 自动维护,仅展示) labels Aug 28, 2026
@MagicLizi

Copy link
Copy Markdown
Contributor

命中 UI 路径(apps/desktop/src/renderer/components/layout/GlobalDropImportListener.tsx / apps/desktop/src/renderer/components/layout/MainLayout.tsx / apps/desktop/src/renderer/components/new-chat/AtMentionPanel.tsx 等)但 description 未附界面效果证据——建议补充改动后效果:截图/录屏,或改动后界面的 HTML 页面(```html 代码块、.html 附件或在线预览链接),便于确认界面符合 DESIGN.md 设计规范

缺证据不阻断合并。

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
@MagicLizi MagicLizi added status:ci-failed CI 失败(review-pr 自动维护,仅展示) and removed status:awaiting-bot-review 等外部审查机器人表态(review-pr 自动维护,仅展示) status:ci-failed CI 失败(review-pr 自动维护,仅展示) labels Aug 29, 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.

审查未通过:当前 head 有 2 条 P1,请先修再推。

P1 apps/mobile/src/session/SessionMenuSheet.tsx:708
功能类改动(外部可写目录)未在 PR Description 写明 SSH / device-link / 手机入口三选一(docs/dev-rules/remote-and-mobile-adaptation.md)。当前手机侧只露出 extraDirs 只读根,没有对应的 writableDirs 入口,远程/手机无法完成这项能力。请在 Description 写清入口,并补上手机侧可写目录 UI,或明确声明本能力本轮不上手机并给出豁免理由。

P1 packages/maker-core/src/agents/pi/index.ts:2337
writePermissionFile 在磁盘 persist 完成前就递增 autoReviewDirectoryGeneration,而 mutableWritableDirs 要等 persist 成功且 generation 未变才更新。reviewAutoAction(约 2823 行)用当前 mutableWritableDirs 组 Auto-review 请求,再用 generation 比对决定是否沿用裁决。中间窗口里 Auto-review 可能按过期 writable roots 放行,persist 完成后 generation 对得上,于是把基于旧根的放行当成有效。请把 generation 递增与 mutableWritableDirs 更新绑在同一成功 persist 点上,或让 Auto-review 在 generation 已变、dirs 尚未跟上时一律 ask。

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: 48beafd931

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/maker-core/src/agents/claude-code/index.ts
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
@MagicLizi MagicLizi added the status:awaiting-bot-review 等外部审查机器人表态(review-pr 自动维护,仅展示) label Aug 29, 2026

@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: 6c880f8939

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/desktop/src/main/maker-ipc/writableDirectoryPickerGrant.ts
Comment thread apps/desktop/src/main/maker-ipc/register.ts
Comment thread apps/desktop/src/main/localDb/ipc/sessions.ts
@MagicLizi MagicLizi removed the status:awaiting-bot-review 等外部审查机器人表态(review-pr 自动维护,仅展示) label Aug 29, 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.

审查通过:可写目录 schema/IPC/preload/device-link allowlist 与 UI 对齐,migration 0099 与测试覆盖到位,未发现 P0/P1。

@MagicLizi
MagicLizi merged commit c1c7bdb into makecindy:main Aug 29, 2026
11 of 12 checks passed
@MagicLizi

Copy link
Copy Markdown
Contributor

把外部可写目录从 schema 一路接到 IPC、preload 和 device-link allowlist,手机和桌面之后能用同一套权限边界。谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

touches:core 改动碰到架构核心路径(review-pr 自动维护,仅展示) touches:large-diff 改动量较大(review-pr 自动维护,仅展示) touches:product-ui 改动碰到产品 / UI 面(review-pr 自动维护,仅展示) touches:redline 改动碰到红线路径(updater / DB schema 等,review-pr 自动维护,仅展示)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants