Skip to content

fix: bili claude/codex auto-inject native MCP tools by default (#290) - #291

Merged
ranxianglei merged 1 commit into
masterfrom
2026-08-27_claude-default-mcp-injection
Aug 27, 2026
Merged

fix: bili claude/codex auto-inject native MCP tools by default (#290)#291
ranxianglei merged 1 commit into
masterfrom
2026-08-27_claude-default-mcp-injection

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

Fixes #290bili claude (and bili codex) ran in pure wire/service mode by default because native MCP tool injection was opt-in (BILI_LAUNCHER_PLUGIN=1).

Change

  • launcherInjectMcp() now defaults to on for claude/codex: BILI_LAUNCHER_PLUGIN !== "0". Both flag paths were already verified (claude 2.1.227 / codex 0.147.0) and soaked since 08-16; the code comment documented this exact flip as the plan.
  • BILI_LAUNCHER_PLUGIN=0 is the kill switch back to pure wire mode (for hosts older than the verified versions).
  • Launcher log line updated to reflect the new default.
  • Tests + CONFIGURATION.md / CONFIGURATION.zh-CN.md updated to match.

pi/omp/opencode/dsh behavior unchanged (already auto-inject native plugins); hermes stays wire-only.

Checks

  • npm run typecheck
  • npm test ✓ (657 pass)
  • npm run build

Close #290. BILI_LAUNCHER_PLUGIN now defaults to on for claude/codex
(both flags verified on claude 2.1.227 / codex 0.147.0 and soaked since
08-16); set BILI_LAUNCHER_PLUGIN=0 to force pure wire mode.
@github-actions

Copy link
Copy Markdown

📦 Built Package Artifact

Branch: 2026-08-27_claude-default-mcp-injection (c803c52)

Option A — Install from npm PR tag (recommended)

npm install -g billion-context@pr-291

Each push to this PR publishes a new version under the pr-291 npm tag.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr291.tgz
npm install -g package

This comment is automatically updated on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 ework agent · vllm-qwen/qwen3.8-27b

[bot] PR 已 review(分支 2026-08-27_claude-default-mcp-injection,单 commit c803c52,4 个文件)。LGTM,本地复跑全部通过:

改动核对

  • src/launcher.ts:388 launcherInjectMcp()=== "1"!== "0"。语义正确——claude/codex 默认注入,BILI_LAUNCHER_PLUGIN=0 是唯一关闭路径;pi/omp/opencode/hermes/dsh 排除逻辑未动,hermes 仍纯 wire。
  • 日志行:注入时提示 disable with BILI_LAUNCHER_PLUGIN=0,关闭时提示退回 wire 模式。console.error 与 launcher.ts 既有模式一致(该文件已有 16 处,属 CLI 侧启动器,符合 AGENTS.md 例外)。
  • 测试:tests/launcher-plugin-mode.test.ts 断言全部翻转(默认开 / 0 关 / 1 仍开 / pi 排除),覆盖完整。
  • 文档:CONFIGURATION.md 与 zh-CN 的环境变量表、启动器矩阵、plugin install 说明四处同步更新,中英一致。全仓 grep 确认 BILI_LAUNCHER_PLUGIN 无遗漏引用(devlog 为历史工作日志,不改是对的)。

本地检查(本分支上实跑)

  • npm run typecheck
  • npm test ✓ 657/657 pass
  • npm run build ✓(已确认 dist/index.js 含新 !== "0" 语义)

合规性

  • package.json / package-lock.json 未动,version 保持 0.1.57 ✓(非 release 分支不动 version)
  • 分支命名符合 YYYY-MM-DD_short-title

两个小提醒(非阻塞)

  1. commit message 是 feat: 而 PR 标题是 fix:——语义上默认翻转叫 feat: 也说得通,不影响合并。
  2. 这是用户可见的默认行为变更:所有现有 bili claude / bili codex 用户的 spawn 参数会变化。建议 release PR 的 CHANGELOG / release notes 里明确写一句"claude/codex 默认启用原生 MCP 注入,老版本宿主可用 BILI_LAUNCHER_PLUGIN=0 回退"。

按 AGENTS.md,合并由人工操作,我不会 merge。

@ranxianglei ranxianglei mentioned this pull request Aug 27, 2026
@ranxianglei
ranxianglei merged commit dbc896c into master Aug 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bili claude 没有自动注入native插件导致用的纯服务模式

1 participant