Skip to content

verify-install 的 ZCode 探测无法解析当前 plugins list --json 输出形状 #104

Description

@mindcarver

结果与范围

在 #102 交付的合并后三端核对中发现的前置缺陷(非 #102 引入,#103 差异未触碰该路径):

  • scripts/verify-install.mjs 的 inspectPlugin 对 ZCode 执行 zcode plugins list --json 后按 response?.plugins 读取插件列表;当前已安装的 ZCode CLI 返回顶层裸数组(28 个插件对象,含 id、enabled、version、rootPath、skillCount、hookDetails 字段),response.plugins 为 undefined,于是检查器落入 plugin command JSON must be an array → 状态 UNVERIFIED。
  • 连锁影响:refresh-install.mjs --platform zcode 的前置只读检查同样无法确认安装(“Thinloop must already be installed and enabled; no installation or enablement was attempted”),版本刷新与后续核验都被阻断;当前已安装 Thinloop ZCode 插件停留在 0.17.0(源码已合并 0.17.1,缓存根 ~/.zcode/cli/plugins/cache/thinloop/thinloop/0.17.0,marketplace thinloop)。
  • 需要确认 ZCode CLI 输出形状变更的版本边界(对象包裹 → 裸数组),并让检查器兼容真实形状或按 CLI 版本分派;fixture 测试中的 pluginRunner mock 使用 { plugins: [...] } 包裹形状,未覆盖真实裸数组。

复现

zcode plugins list --json | python3 -c "import json,sys; d=json.load(sys.stdin); print(type(d).__name__)"
# list
node scripts/verify-install.mjs --platform zcode
# [UNVERIFIED] ZCode - plugin: UNVERIFIED - plugin command JSON must be an array

验收与任务

  • A1:verify-install --platform zcode 在本机能解析裸数组输出并按既有字段核对 enabled/version/rootPath/skillCount/hookDetails。
  • T1:修正解析形状并补充真实形状的回归 fixture;refresh-install --platform zcode 恢复可用后把已安装插件刷新到当前源码版本并复验。

验证

  • A1:尚未执行。

完成审计

  • 验收闭合:A1 待验证。
  • 实施账目:T1 待完成。
  • 交付状态:待实施与独立验收。

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions