Skip to content

[Bug] 插件启用/禁用/卸载状态写入配置后不被读取:已卸载内置插件缓存被自动重建、禁用插件技能/MCP 仍进入会话(3.14.4,macOS arm64,无条件复现) #914

Description

@shangshuo

[Bug] 插件启用/禁用/卸载状态正确写入配置,但不被 seeding / 会话发现层应用(3.14.4,macOS arm64,无条件复现)

English summary: Plugin enable/disable/uninstall operations succeed via RPC and persist correctly to ~/.zcode/cli/config.json (plugins.enabledPlugins / plugins.suppressedBuiltins / per-skill skills entries), but seeding and session discovery never apply them: uninstalled built-ins are silently re-materialized into the plugin cache, and disabled plugins still contribute skills and MCP servers to every new session. Reproduces unconditionally at user scope — no project-level config exists on this machine (all workspace parent dirs checked), so this is not the merge-overwrite trigger of #249, though the two cases likely share the same resolver area.

环境

  • ZCode Desktop 3.14.4,macOS(Apple Silicon,darwin 24.6.0)
  • 官方渠道登录;与模型通道无关(纯客户端侧问题)

摘要

设置 → 插件管理 中的启用/禁用/卸载操作:RPC 全部返回成功(plugin-management.setPluginEnabled / uninstallPlugin → OK),状态正确写入 ~/.zcode/cli/config.json,但:

  1. 界面无变化:插件始终显示在原位置、始终为启用状态(列表来自同一套无视状态的发现结果);
  2. 已"卸载"的内置插件被重新物化:suppressedBuiltins 中的插件(pdf / presentations / spreadsheets)在每次重启后缓存目录 mtime 均被刷新、内容原样重建;
  3. 手动删除缓存也会被秒速恢复:应用运行中移除 ~/.zcode/cli/plugins/cache/zcode-plugins-official/<plugin>/<version>/ 目录后,约 2 分钟内被自动完整重建(实测 44 个文件、含 SKILL.md),期间无任何界面操作、无重启;
  4. 禁用插件的组件仍进入会话:完全重启(全新进程组)后的新会话仍加载被禁用插件的全部技能(模型可见技能清单与 / 菜单中均在),并且仍尝试连接已禁用插件的 MCP——日志中连续多条 mcp.server.failed,mcpServerName: "plugin:image-search:image_search"(该插件在 enabledPlugins 中已为 false)。

复现步骤(100% 复现,两次完整重启结果一致)

  1. 设置 → 插件管理,对内置插件执行卸载(或对任意插件切换禁用),界面提示成功;
  2. 确认 ~/.zcode/cli/config.json 中 plugins.suppressedBuiltins / plugins.enabledPlugins 已正确写入;
  3. 完全退出并重启应用(确认全部进程为新启动);
  4. 观察上述 1–4 全部发生。

同族问题:按路径禁用技能同样不生效

在 config.json 的 skills 段对上述插件技能的 SKILL.md 绝对路径写入 "enable": false(12 条),完全重启后的新会话仍正常加载这些技能。

排除的因素

推测的根因方向

应用包内存在本应生效的种子化检查逻辑("官方市场的内置插件若在 suppressedBuiltins 中则跳过物化"),但运行时管线未触达该检查——疑似 3.14.4 插件管线的回归或改造时遗漏接线。suppressedBuiltins、enabledPlugins、skills.enable 三条状态路径均不被读取,但写入端(plugin-management RPC → config.json)完全正常。

期望行为

  • suppressedBuiltins 中的内置插件不再被物化,不向会话贡献技能 / MCP / commands;
  • enabledPlugins 为 false 的插件的组件不出现在会话中;
  • skills 段按绝对路径的 enable: false 生效;
  • 设置界面展示的状态与实际一致。

实际行为

如上;用户侧当前没有任何配置手段可以真正移除或禁用内置插件。

备注

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions