问题
source.js 中的 CLAUDIAN_COMPAT 只映射了精确版本 "2.0.41":
const CLAUDIAN_COMPAT = Object.freeze({
"2.0.41": "internal-v1",
});
ClaudianAdapter.detect() 用 CLAUDIAN_COMPAT[version] 精确查找,导致任何其他 Claudian 版本(例如当前的 2.1.2)都被判定为 compatible = false,Agent 任务直接进入 blocked 状态(提示"Claudian 2.1.2 当前暂未适配")——即使该版本已具备适配器所需的全部接口。
复现步骤
- 安装 Claudian 2.1.2(或任意非 2.0.41 的版本)
- 运行任一 Agent 任务
- 任务状态为
blocked,错误为"当前暂未适配"
建议
把精确匹配改为 semver 范围判断(如 >= 2.0.41 或 ^2.0.41),并保留 detect() 中已有的能力探测(typeof claudian.ensureViewOpen === "function"、typeof claudian.getView === "function")作为兜底:
- 向后兼容 2.0.41
- 小版本升级(2.1.x、2.2.x 等)不再误报 blocked
- 接口确实不兼容时,能力探测仍能拦截,不会伪装成功
现状(本地 workaround)
在编译产物 main.js 的 CLAUDIAN_COMPAT 中追加 "2.1.2": "internal-v1" 后,Claudian 2.1.2 可正常执行任务。但每次插件更新都会覆盖该补丁。
问题
source.js中的CLAUDIAN_COMPAT只映射了精确版本"2.0.41":ClaudianAdapter.detect()用CLAUDIAN_COMPAT[version]精确查找,导致任何其他 Claudian 版本(例如当前的 2.1.2)都被判定为compatible = false,Agent 任务直接进入blocked状态(提示"Claudian 2.1.2 当前暂未适配")——即使该版本已具备适配器所需的全部接口。复现步骤
blocked,错误为"当前暂未适配"建议
把精确匹配改为 semver 范围判断(如
>= 2.0.41或^2.0.41),并保留detect()中已有的能力探测(typeof claudian.ensureViewOpen === "function"、typeof claudian.getView === "function")作为兜底:现状(本地 workaround)
在编译产物
main.js的CLAUDIAN_COMPAT中追加"2.1.2": "internal-v1"后,Claudian 2.1.2 可正常执行任务。但每次插件更新都会覆盖该补丁。