Repository navigation
feat: 解耦原生 Codex CLI 选择 / decouple native Codex CLI selection - #469
VirgilMing wants to merge 1 commit into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📜 Recent review details
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
6eec7ce to
8fabda4
Compare
ea45887 to
7f756b3
Compare
增加 --codex-cli,优先于继承的 CODEX_CLI_PATH;未指定时保留平台默认行为。 显式 CLI 不依赖包内文件或 Desktop 管理的缓存,无效路径直接报错,拒绝 Shim 自引用。 保留受管环境再次调用的原生转发目标,并补齐 inspect 来源诊断、回归测试和中英文文档。 Add --codex-cli ahead of inherited CODEX_CLI_PATH while preserving platform defaults. Explicit CLIs do not require packaged files or the Desktop-managed cache; invalid paths fail and Shim recursion is rejected. Preserve native forwarding targets on managed reentry and add inspect provenance, regression tests, and bilingual documentation.
7f756b3 to
1a91d0b
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
摘要
当用户为 Codex Desktop 选择独立更新的原生 Codex CLI 时,codexhost 受管启动此前仍会使用安装探测决定的包内 CLI 或 Desktop 缓存。本 PR 将原生 CLI 选择与 Desktop 安装识别分开。
launch和inspect增加--codex-cli,优先于非空的继承CODEX_CLI_PATH;未指定时保留各平台默认选择。CODEX_CLI_PATH替换为 Shim 前解析和校验显式目标。显式选择不要求包内 CLI 或 Windows Desktop 缓存存在;无效路径直接报错。CODEXHOST_STOCK_CODEX_PATH传递选中的原生 CLI;inspect文本和 JSON 区分包内路径、执行路径和选择来源,控制台兼容缺少新增字段的旧 schema v1。Desktop 安装身份与资源仍按现有规则校验。此配置适用于本地原生 Codex CLI;外部 Harness 继续使用各自的 Adapter 和原生接口。
验证
本地环境:Gentoo Linux x86-64,Node.js 26.11.1,Rust 1.99.0。GitHub CI 使用仓库指定的 Node.js 22.22.0 和 Rust 1.97.1。
cargo test --locked -p codexhost-platform -p codexhost-launcher:120 项通过(65 项 Launcher、4 项 CLI 集成、51 项 Platform)。npm run test:typescript -- packages/console-server/test/installation.test.ts packages/console-server/test/diagnostic-report.test.ts packages/host-runtime/test/runtime-maintenance.test.ts packages/update-manager/test/update-manager.test.ts packages/update-manager/test/updater-ready.test.ts:33 项通过;1 项仅 Windows 的测试在本地跳过。npm run typecheck、npm run lint(含包边界检查)、npm run format:check、Platform/Launcher 全目标 clippy 和git diff --check。1aa9f65d为唯一父提交;PR 保持一个功能提交,差异仅涉及原生 CLI 选择的 13 个文件。跨平台 CI:本次提交的 CI 已全部通过:Linux x64、Linux ARM64、macOS 和 Windows,含各平台配置的 Rust 检查及 Linux npm 包 smoke 验证。
Summary
Managed codexhost launches previously kept using the packaged native Codex CLI or Desktop cache selected by installation discovery, even when a user wanted an independently updated CLI. This PR separates native CLI selection from Desktop installation discovery.
--codex-clitolaunchandinspect, ahead of nonempty inheritedCODEX_CLI_PATH; preserve platform defaults without an override.CODEXHOST_STOCK_CODEX_PATH. Report packaged paths, executable paths, and selection provenance in text and JSONinspectoutput, accepting older schema v1 launchers without the additive fields.Desktop identity and resource validation retain their existing rules. This setting applies to the local native Codex CLI; external Harnesses continue using their own Adapters and native interfaces.
Validation
Local environment: Gentoo Linux x86-64, Node.js 26.11.1, Rust 1.99.0. GitHub CI uses the repository's Node.js 22.22.0 and Rust 1.97.1.
1aa9f65dis the sole parent; the PR contains one feature commit limited to the 13 native CLI selection files.Cross-platform CI: the run for this commit passed on Linux x64, Linux ARM64, macOS, and Windows, including each lane's Rust checks and Linux npm package smoke validation.
关联问题 / Related issues
无 / N/A.