Repository navigation
feat: pi.subagents config home in billion-context.json (#2230) - #2233
Conversation
The built-in pi-lane acp_delegate surface reads its config from bili's own config file (pi.subagents section) instead of pi's acp.json. The four acp.json keys (delegate/delegatePrompt/displayUsage/debug) become a deprecated fallback: still read while the section is absent (one-time warning), ignored once it exists. prompt replaces delegatePrompt; debug is scoped to the sub-agent subsystem. The standalone package reads the same section through its own loader (billion-context-pi-subagents#5) — the file format is the contract, no shared code. Co-Authored-By: Claude <noreply@anthropic.com>
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2311-pr.2233.ca0a82fThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2233.tgz
npm install -g packageInstall instructions are refreshed on each push. |
The docs-sync drift guard (#2107) caught hand-edited generated blocks — the quick-ref and env-map rows now come from the seed in website/config-reference/server.yaml like every other key; the narrative pi section (field table + env overrides) stays hand-written outside the generated blocks.
|
Note: the four red |
…honest smoke test Review fix for #2233 (issue #2230). The old 'scoped debug flag reaches setDebugEnabled' test asserted only tools.length==3, so a broken debug/maxConcurrent mapping would still pass. debug/maxConcurrent have no hermetically observable wiring-level effect (package debug state is module-private; no debug.event fires during session_start), so export piSubagentsAdapter as a test seam and pin the full mapping directly: boolean shorthands, prompt->delegatePrompt rename, displayUsage canonical placement inside delegate.
Review fixes for #2233 (issue #2230), each a one-line correction: - CONFIGURATION.md / .zh-CN.md: the acp.json fallback warning is a single console.error on the host process stderr once per process; it does not go to the bili log or ~/.pi/acp.log (verified: package dist has no such logging path). Doc now says what actually happens. - CLIENTS.md:479 typo 'dele gate tools' -> 'delegate tools'. - server.yaml seed: pi.subagents type '{ subagents?: object | boolean }' violated the nested-key convention (type = value at that path); fixed to 'object | boolean' and regenerated via tools/gen-config-docs.mjs (only the two generated table cells change; i18n check passes).
[bot] 🏷 已拉取分支核对代码 + 本地定向验证 + 逐门 CI 状态,结论如下(结构化七问): 1. 是什么问题:把内置 pi-lane 的 acp_delegate 子代理配置从 pi 的 2. 什么原因导致的:不是 bug,是产品决策(#2230 owner 拍板)——一个产品家族有两个配置家(acp.json 被社区当成 billion-context-pi 的文件),且 acp.json 里有死键让用户困惑。方向成立。 3. 怎么修复的:新增 4. 是否有回归问题:审过的既有行为——(a) 段缺失时 acp.json 回退路径保持原样(wiring 测试 #9/#12 覆盖);(b) 段存在时独占、忽略 acp.json(#12);(c) 映射对照包真实类型 5. 是否破坏缓存:不涉及。改动在插件接线层,不在压缩/wire/cache 路径;prefix cache、增量游标、去重键均不受影响。 6. 是否改了设计方向:无架构转向。是 owner 已批准的配置归属决策落地——bili 拥有自己的配置面、acp.json 变废弃回退、配套包以「文件格式为契约」独立读同一段(无共享代码、本 PR 无跨仓依赖,devDep 仍钉 0.1.1)。 7. 是否引入了新的配置:有——新增顶层块 验证证据:docs-sync / docs-coverage 两门在旧 head(6d458a3) 曾红(手改生成表 + 缺种子),你 commit 7556bf2 补种子+重新生成后——我本地跑 判定:实现正确、范围干净(feat + docs-seed 两个 commit)、映射经包类型核对无误、自研测试有牙且通过、文档双门已绿。唯一红 CI 为 master 继承失败(#2234/#2235),非本 PR 之过。待 #2235 合并后 rebase 本 PR 即可合并;本 PR 本身无需再改,不建议因继承红项而拦。(合并按规由人工执行。) |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.69-master.2f6fe8b # this exact build
npm install -g billion-context@master # always the newest merged build
|
Fixes #2230.
What
The built-in pi-lane acp_delegate surface (
bili piembedded wiring) now reads its config from bili's own config file — thepi.subagentssection of~/.config/billion-context/billion-context.json— instead of pi's~/.pi/acp.json. Companion package PR: billion-context-pi-subagents#5 (the standalone package reads the same section through its own loader; the file format is the contract, no shared code — this bili PR has no dependency on the package release).PiSubagentsFileConfiginsrc/config.ts+piadded toKNOWN_TOP_LEVEL_KEYS.src/agent/pi-subagents.ts):loadConfigFile().pi?.subagentsis primary; the package's acp.json loader stays as a deprecated fallback (one-time console warning when legacy keys are actually used). Boolean shorthand"pi": {"subagents": false}disables the surface.delegatePrompt→prompt;debugis scoped to the sub-agent subsystem (no collision with the top-level proxydebug).Config surface (owner-approved in #2230)
pitop-level block →pi.subagents(enabled/forceEnable/displayUsage/maxDepth/syncTimeoutMinutes/idleTimeoutMinutes/asyncTimeoutMinutes/maxConcurrent/thinkingLevel/agents/notifyIfRead/fleetShortcut/prompt/debug + boolean shorthand).PI_ACP_DELEGATE_*spawn-channel overrides now documented (CONFIGURATION.md/zh env tables + thepisection table) — "document or don't ship".pisection + quick-ref rows + env-mapping rows; CLIENTS.md/zh Pi section pointer; reference/env-vars.md per-process-channel row.Tests
tests/pi-subagents-wiring.test.ts: 8 → 14 — pi.subagents enabled:false drops tools/prompt/shortcut, boolean shorthand, section-owns-config (acp.json ignored when both exist),promptrename replaces the appendix, debug/maxConcurrent passthrough, deprecated-fallback warning asserted (console.error spy). Header now isolatesBILI_CONFIG_FILEtoo.