Repository navigation
fix(wrapper): wrapperCli 写绝对路径时按文件名识别 aiden / cjadk / ttadk - #3079
Merged
Merged
Conversation
识别网关启动器只比较 wrapperCli 首 token 是否恰好等于 aiden / cjadk / ttadk, 写成 /opt/.../aiden x claude 时不剥 --settings,Aiden 拒参退出;cjadk codex 不改写 -c、 不关交互选择器,ttadk 不注入 -m / --skip-check。 新增 wrapperIdentityTokens:首 token 只取文件名,只用于识别;spawn 和 resume 命令仍用配置里的原始路径。worker 里 aiden codex 的升级弹窗、shim、resume 重绘和会话推理强度控件的判断一并改用它。写命令名的老配置行为不变。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
November 7, 2026 16:22
原用例的输入走通用 aiden 分支(剥 botmux 注入的 -c)也得到同样的 bin/args, 把 buildWrappedLaunch 的 aiden x codex 判断换回按原始首 token 比较时照样绿。 补一组带 model_reasoning_effort 与 shim 目录的输入:只有走 aiden codex 分支 才会由 shim launch 启动、把绝对路径的 aiden 作为参数传入并带上推理强度环境变量。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
Author
|
评审补充的修改(head 4fa9584 → e59ad0b) 在 4fa9584 上评审:源码改动正确,与 master 的合并树无冲突。变异验证时发现一条新用例区分不了修复前后,已补测试并同步 master:
非阻断建议(可后续跟进): 这是自动评审的初步意见,最终以维护者审阅为准。 |
|
🚀 Released in v3.59.0 |
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.
现象
用户把
wrapperCli写成启动器的绝对路径(如/opt/.../aiden x claude)后,botmux 把自己注入的--settings原样传给 Aiden,Aiden 拒绝该参数后退出,会话起不来。写成aiden x claude则正常。根因
识别网关启动器只比较
wrapperCli拆出的首 token 是否恰好等于aiden/cjadk/ttadk(isAidenWrapper/isCjadkWrapper/isTtadkWrapper、buildWrappedLaunch的aiden x codex分支,以及 worker 里几处直接比字符串的判断)。首 token 是绝对路径时全部落空,走了通用前缀分支:--settings,Aiden 拒参退出(本次反馈);-c直接到 Aiden,1.8.38+ 拒收;-c不改写成--config,被 cjadk 当成--command吞掉;也不设CJADK_INTERACTIVE=0;-m <model> --skip-check,卡在交互式选模型菜单。改动
wrapperIdentityTokens(wrapperCli):同parseWrapperCli,但首 token 只取文件名(按最后一个/切;该文件也被 Dashboard 前端引用,不引node:path)。只用于识别,spawn 仍用配置里的原始首 token。cli-selection.ts的 aiden / cjadk / ttadk 识别、wrapperLaunchEnv、buildWrappedLaunch的aiden x codex/ ttadk 分支改用它。ttadk改为配置里的首 token(写命令名时与原来完全一致),否则配的绝对路径会被丢掉。wrapperIdentityTokens比较。影响面
aiden x claude/cjadk codex/ttadk claude等)的现有配置:识别结果和 spawn 参数与原来完全一致。aiden-beta、cjadk2、ttadk-dev,或目录名含 aiden)不识别,仍是通用前缀。wrapperCli字符串匹配选项,绝对路径配置仍显示为自定义前缀,未改。测试
test/cli-selection.test.ts新增「wrapper launcher written as an absolute path」6 条:识别只取文件名;绝对路径 aiden x claude 剥--settings且 spawn 原路径;aiden x codex 走 aiden 改写;cjadk codex 改--config并带CJADK_INTERACTIVE=0;ttadk 注入-m/--skip-check、spawn 与 resume 用原路径;相似文件名不误识别。test/deferred-suspend.test.ts新增 1 条:绝对路径aiden x codex提供推理强度控件,aiden-beta不提供。cli-selection.ts换回 master(只保留一个不取文件名的wrapperIdentityTokens导出)→ 5 条红;wrapper !== 'aiden x codex'→ 新增的控件用例红;aiden就算 → 相似文件名用例红。bun run build、tsc --noEmit通过;引用这些函数的 11 个测试文件(cli-selection / deferred-suspend / aiden-codex-worker-wiring / tmux-backend-env / command-handler / sandbox-wrapper-handoff 等)共 985 条全绿。🤖 Generated with Claude Code