2 Commits
Author SHA1 Message Date
ci-check cefa60ea47 fix(codex-plugin): installer config corruption, dead probes, shell robustness (#4449)
Review alignment for #4449:

- install.ps1: read/write config.toml through [System.IO.File] instead of
  Get/Set-Content — PS 5.1 Get-Content decodes as ANSI/GBK and would write
  mojibake back over non-ASCII (e.g. Chinese comments); Set-Content -Encoding
  UTF8 adds a BOM under 5.1 (double-BOM edge). Also resolve codex once up
  front with a clear error instead of invoking a potentially null command.
- mcp-server.mjs: the header comment listed the probe priority in the wrong
  order (code prefers the repo layout over a possibly-stale global install —
  keep the code, fix the comment); drop two candidate paths that can never
  resolve ('npm prefix -g' joined as an install dir, and an _npx layout that
  does not match npx's real <hash>/node_modules structure) — zero behavior
  change; handle child spawn 'error' instead of crashing on an unhandled event.
- .mcp.json: pass through XDG_CONFIG_HOME/XDG_DATA_HOME/XDG_STATE_HOME/TMPDIR
  alongside HOME for Linux/macOS completeness.
- README.md: list all four lookup tiers in the troubleshooting section.
2026-10-24 03:55:09 +08:00
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