Windows 安装器:可选生成 CLI service shim - #87
Open
534A4D21 wants to merge 2 commits into
Open
Conversation
Qjzn
requested changes
Sep 7, 2026
Qjzn
left a comment
Owner
There was a problem hiding this comment.
暂不建议合入 main。主要阻塞点:
- -CreateCliShim 安装路径会无条件 Set-Content 到 %USERPROFILE%.local\bin\cx-codex.cmd,如果用户已有同名命令,会被覆盖。
- 卸载侧已经有“非 CX-Codex shim 保留”的保护,但安装侧缺少同等级的所有权校验,因此风险不对称。
- 建议补齐:安装时检测已有 shim;若不是当前 CX-Codex 管理的 shim,则保留并输出 warning,或增加显式 -ForceCliShim 才允许覆盖;同时补一个 smoke 用例覆盖“已有外部 shim 不被覆盖”和“已有 CX-Codex shim 可更新”。
补充:main 的依赖安全告警已通过 #89 组合处理;本 PR 后续 rebase 到最新 main 后再重新跑 CI。
534A4D21
force-pushed
the
codex/cli-shim
branch
from
September 8, 2026 08:22
f77578e to
fe370e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更摘要
-CreateCliShimcx-codex.cmd,指向受管的 Release CLI背景与方案
官方 Windows 安装器目前会生成
cx-codex-start.cmd,但没有提供简洁的cx-codexCLI 命令。本变更增加可选 shim,且不安装 npm 全局包。指定
-CreateCliShim后,安装器会生成:%USERPROFILE%\.local\bin\cx-codex.cmd该 shim 调用当前受管安装目录中的:
%LOCALAPPDATA%\CX-Codex\dist-cli\index.js默认安装行为保持不变。卸载时,仅当 shim 内容明确指向当前受管的 CX-Codex 安装目录才会删除;如果检测到是其他来源,则保留并提示。
验证结果
release-capabilities.jsonJSON 解析通过git diff --check通过