Repository navigation
[PR] feat(pi): pi.commands — configurable slash-command registration surface - #5659
Conversation
The four bili pi-plugin slash commands (/acp, /acp-cache, /acp-rule, /acp-fleet) register unconditionally today. pi.commands makes the surface user-ownable: - default ["acp", "acp-cache"]: status + cache reconciliation stay on, the rarer /acp-rule and /acp-fleet leave the completion list - true = all four; [] or false = none; explicit lists keep known names (deduped, unknown entries warn once and drop — §7.3 no-silent-drop) - read at session start, so an edit applies to the next session - pure UI surface: acp_cache / acp_rule tools stay model-available
…warn flags Review nits pushed per owner rule (小问题直接修), PR ranxianglei#5659: - src/agent/pi.ts: align the four pi.commands gates with their block (9->10 spaces) - src/agent/pi-subagents.ts: move the new exports below the imports; drop the "(ranxianglei#5055-adjacent)" reference on DEFAULT_PI_COMMANDS (the two-command default is this PR's design decision, not ranxianglei#5055's); split the one-shot stderr flag into warnedUnknownPiCommands / warnedWrongTypePiCommands so each warning class fires once independently instead of cross-suppressing - tests/pi-commands.test.ts: wrong-type case now asserts its own warning (one-shot, own flag) instead of skipping it as unassertable
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— open+closed issue/PR 检索无其他 pi.commands 条目。但发现 PR 内夹带的 5 个 decide-lane 提交与 PR #5055(同作者,head 标签: 🔶 需要决策背景一句话: #5659 在 pi.commands 功能之上叠了 5 个未合入的 decide-lane 提交( 待决问题: 两条工作线怎么分开? 选项:
推荐 A。不决定的默认行为: PR 保持打开不动,参考分支留存作材料,等你的回复。 注: 我尝试直接把瘦身栈推到 Review 结论(结构化八问)
行为变更披露(旧值→新值+原因): 旧 = 四个命令无条件全部注册;新 = 默认只注册 已做验证与处置
|
e591675 to
f9733be
Compare
|
Done — option A executed.
On the §7.4 default-surface call: I intend the two-command default ( |
(ai: vllm-qwen/qwen3.8-27b) 拆分已核实(不是采信,是重新拉取验证):
关于默认面: 我同意维持两命令默认 标签: 收工判定: review 通过,可进入合并流程 —— 剩余门禁只有两个:CI 在新 head 上绿 + owner 合并时对默认面的点头。 |
|
修复ci失败 |
…m seed (ranxianglei#5659) Two CI gates on the pi.commands head: - unused-exports flagged PiCommandName as INTERNAL_ONLY (used only within src/agent/pi-subagents.ts): drop the leading export, keep the type. - docs-sync: CONFIGURATION.md/.zh-CN.md were hand-edited instead of regenerated from website/config-reference/server.yaml; run 'node tools/gen-config-docs.mjs generate' and commit its output (field-table row + env-map row in both languages). Verified locally: check-unused-exports clean, tsc --noEmit clean, tests/pi-commands.test.ts + tests/pi-subagents-wiring.test.ts 24/24.
(ai: vllm-qwen/qwen3.8-27b) CI 已修复,直接推到了 PR 分支(maintainer edits 是开着的):head 坏在哪(f9733be5 head 上两个 gate,其余全绿/skipped):
提交: 本地验证(该提交上实测): check-unused-exports clean · tsc --noEmit clean · tests/pi-commands.test.ts + tests/pi-subagents-wiring.test.ts 共 24/24 通过。 剩余门禁:CI 在 |
(ai: vllm-qwen/qwen3.8-27b) 补充确认:CI 在 |
🔶 需要决策 PR #5659(pi.commands)CI 红了,卡在一个需要你拍板的默认行为变更上。 先交代现状:
根因(已定位到行): 但
为什么我不能自己拍板: 选项:
我的建议:A —— 这是作者在这个 PR 里明确写进配置文档的设计意图(seed 描述白纸黑字写了默认关掉这两个冷门命令),改动最小,能力也没丢。如果没人回复,我就按 A 执行(把 8 条老测试改成显式开启 acp-rule),并在最终报告里按规范标注这条用户可见的默认变更(旧值→新值+原因)。若你更在意「升级零行为漂移」,就选 B,我改成保持四个全开。 已打 |
(ai: vllm-qwen/qwen3.8-27b) 本轮 CI 修复小结(七问):
|
…nxianglei#5659) The new two-command default (acp, acp-cache) left /acp-rule unregistered, breaking the eight pre-existing /acp-rule registration tests in tests/plugin-agent.test.ts. Set BILI_CONFIG_FILE with pi.commands: true at module setup so this file keeps its original full-surface expectations; env restored on exit like the file's existing HOME/proxy handling.
(ai: vllm-qwen/qwen3.8-27b) 进度汇报(进程曾被强制重启,已恢复并继续): 第一轮修复已确认生效: 但全量测试 lane 又红了,已定位并修掉——不是继承性失败(master 测试 lane 全绿),是本 PR 自己漏的相邻路径:
剩余门禁:CI 在 |
|
解决冲突后可合并 |
…esolution) # Conflicts: # CONFIGURATION.md # CONFIGURATION.zh-CN.md
[bot] 🏷 冲突已解决,新 head 冲突来源:分支基线是旧 master 解法:两份 md 取 master 版(桩文件),然后跑本仓库自己的生成器 合并树本地验证(全部实测):
八问
CI 在新 head 上运行中,绿了就可以合。 |
(ai: vllm-qwen/qwen3.8-27b) Headline: the reported merge conflict is already resolved — by a concurrent "sync master into feat/pi-commands" commit that landed while I was investigating. I verified it live against the newest master and deliberately pushed nothing, to avoid fighting the branch (another process is actively driving it, and master is moving fast). Operational note for whoever touches this PR next: it's a cross-repo PR — the real head is 本轮处理小结(七问):
|
(ai: vllm-qwen/qwen3.8-27b) Follow-up confirmation (repeat trigger): re-verified live — there is no conflict. GitHub's own API reports 本轮处理小结(七问):
|
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1105-master.7d18b7a # this exact build
npm install -g billion-context@master # always the newest merged build
|
…anxianglei#5970 retained folds, ranxianglei#5978 anthropic egress tail, ranxianglei#5981 truncated compress receipt Advances the base from 33d4951 to 7d18b7a (15 commits, 35 files). Four files overlap with this lane: src/plugin.ts, src/server/relay.ts and the two generated docs. All four auto-merged; upstream added `noteTruncatedUpstream` calls inside the plugin pipelines it already touches, while the lane's strip gates live elsewhere in the same files. Notable upstream commits adopted: - 0f93793 feat(pi): pi.commands — configurable slash-command registration surface - 4f80702 fix: recover retained compression blocks against fork replay - 8c98898 fix(anthropic): never send an outbound body that ends on an assistant turn - adc863a fix: tell the model to re-issue a compress whose args were cut in transit - 38e6b07 fix: bound the lost-in-transit re-issue advice with the session breaker - d1b2d8f fix: 会话历史按真实维度拦死 — count gate + 32MiB ingest cost band - fa447f9 fix: exempt image-bearing bodies from the ingest cost band - 33bec44 fix(launcher): force-takeover the wedged same-lane proxy holding the canonical port - 2826c51 fix(launcher): field-tune wedged-takeover timings + quiet win32 ESRCH alarm
Summary
The four bili pi-plugin slash commands (
/acp,/acp-cache,/acp-rule,/acp-fleet) register unconditionally today.pi.commandsmakes that surface user-ownable:["acp", "acp-cache"]— the status panel and the cache-reconciliation report stay on; the rarer/acp-ruleand/acp-fleetleave the slash-completion list.trueregisters all four;[]orfalseregisters none; an explicit array keeps known names (deduped; unknown entries warn once on stderr and drop — the §7.3 never-silently-drop rule).session_start, so a config edit applies to the next session — no proxy restart.acp_cache/acp_rulestay model-available) or touches the proxy.{ "pi": { "commands": ["acp"], "subagents": false } }Why default to two of four
Status (
/acp) and cache reconciliation (/acp-cache) are the two entry points a user needs regularly once compression is running./acp-rulemirrors theacp_ruletool (niche, and off unlesscompress.rules.enabled), and/acp-fleetis only meaningful with the acp_delegate surface enabled — yet today both sit in every user's completion list even whenpi.subagents: falsehas the whole delegate surface turned off. Keeping the default at the two universally useful commands matches what the surface actually is: a completion-list hygiene knob, not a feature gate.truerestores the old full surface for anyone who wants it.Implementation
src/config.ts:pi.commands?: readonly string[] | booleanon thepisection (+ docs).src/agent/pi-subagents.ts:resolvePiCommands()/piCommandsEnabled()— pure resolution + per-session-start file read; gates theacp-fleetregistration.src/agent/pi.ts: theacp/acp-cache/acp-ruleregistrations gated by the same set.website/config-reference/server.yamlseed entry (config-surface-guard green).Tests
tests/pi-commands.test.ts(new): default surface,[]/false→ none,true→ all four, explicit list dedupe + unknown-entry one-shot warning, wrong-type fallback, and per-call file reads (edits apply without restart).tests/pi-subagents-wiring.test.ts: existing fleet-registration tests now setpi.commandsexplicitly (default no longer includesacp-fleet).All hermetic, no live proxy involved.