Files
billion-context/plugins/codex/scripts
Codex Adapter b87732e271 feat: Codex 桌面版插件(Git marketplace + MCP 工具 + 版本同步)
把 billion-context 适配成 Codex 桌面版可安装的插件,并让更新检测可用。

为什么必须是 Git marketplace:
Codex 的 PluginSummary.version 只在 Git 源下才有版本语义;local / npm 源的
version 恒为 null,插件页面永远看不到「有更新」。Git 源会被 Codex 识别成
sourceType=git,走内置的 plugins-marketplace-auto-upgrade 后台拉取上游更新。

改动:
- .agents/plugins/marketplace.json:Codex marketplace 清单,指向 plugins/codex
- plugins/codex/:Codex 插件本体
  - .codex-plugin/plugin.json:清单 + interface(显示名/简介/品牌色/默认提示词)
  - .mcp.json + mcp-server.mjs:注册 bili 的 MCP server(stdio JSON-RPC 转发)
  - scripts/install.ps1:一键安装(CLI 检查 → marketplace → 插件 → enable_mcp_apps)
  - README.md:安装、用法、排障
- scripts/sync-codex-plugin-version.mjs:以 package.json 为唯一真相源,同步所有
  插件清单的版本号(顺带修掉 .claude-plugin 里 0.1.188 的陈旧版本漂移)
- .github/workflows/release.yml:发布前校验并同步清单版本,防止版本号漂移
  再次进入 release

验证(本地实测 Codex 26.1016):
- Git marketplace 装上后 codex mcp list 出现 bili,六个工具可用
  (compress / decompress / search_context / acp_status / acp_cache /
  acp_read_original_image)
- 模拟上游发新版:marketplace upgrade 后已装缓存 1.0.0 → 2.0.0,插件列表
  版本同步推进(即插件页面的「有更新」)
- mcp-server.mjs 在插件目录 / 根目录 / 用户目录三种 cwd 下都能定位入口并握手
2026-10-24 01:50:41 +08:00
..