Repository navigation
fix(skills): 恢复 botmux-send 按需指引 - #477
Merged
Merged
Conversation
LucasIcarus
marked this pull request as ready for review
July 16, 2026 08:35
Wenne
pushed a commit
to Wenne/botmux
that referenced
this pull request
Jul 28, 2026
`/repo <name>` / 选仓卡 / 跳过 / mid-session 切仓在无 buffered 输入时会空启动 CLI,但 session 上没有任何状态记录「CLI 已起、尚未接收真实用户轮」。下游只能 用 `ds.worker` 活没活当代理判据,于是首条真实业务消息被当 follow-up 处理, PR deepcoldy#477 的 opening routing 与 built-in skill discovery 永远进不了首个真实 turn。 新增持久化 `Session.initialUserTurnPending` 与 `core/initial-user-turn.ts` (mark/is/claim/release,claim 为同步读-改-写,保证并发首消息只有一个 opener)。 live-worker 与 worker-null/refork 两条投递分支统一:pending 时走 `buildNewTopicCliInput`,完整透传 sender / mentions / attachments / availableBots / bot identity / locale / whiteboard / substituteTrigger / Codex App text+application+message context;投递失败或被拒时归还状态。 refork 的 `resume` 增加守卫,避免 resume 一个从未产生真实轮的 CLI 会话。 顺带统一卡片路径:原先在同样场景下会 `buildNewTopicCliInput('')` 发一个空 `<user_message>` 开场,与 `/repo` 文本路径行为不一致,现改为同样空启动 + 打标记。 Claude-Session: https://claude.ai/code/session_01S13JmEqSSHFZTwmyRjD7Cm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prompt注入模式的首轮 compact catalog 中恢复botmux-send的“复杂发送”发现入口;完整约 14 KB skill 仍只在匹配后通过botmux skill show botmux-send按需读取。JSON.stringify/ JSON 转义再传位置参数;多行正文使用 quoted heredoc / stdin,Windows 场景使用 UTF-8--content-file。发现
botmux send的普通正文路径按原始字符串发送:位置参数直接拼接,stdin /--content-file原样读取;只有--card-json/--card-file的卡片输入按 JSON 解析。因此 shell 和 botmux 不会把二次转义后的字面量\n自动还原成换行。botmux send "第一行\n第二行"。但 feat(skills): 内置技能改可选注入模式(global|prompt|off,默认 prompt),根治 codex 等全局 CLI 泄漏 #389(07-07)为避免 Codex 等 CLI 污染全局 skills 目录,将默认改为prompt,同时把 send/history/quoted/bots 都视为 routing 已覆盖并排除出 compact catalog。botmux-send中关于正文来源、Markdown、附件/卡片、mention、跨群、PowerShell 编码等完整规则失去可发现入口。它与最近问题变频繁的时间点吻合,但这是代码路径与时间线推断,不是 telemetry 已证明的因果关系。决策与取舍
prompt,不恢复全局安装;dashboard 的prompt | global | off三档与 per-bot 配置语义不变。prompt新会话首轮增加一行约 282/302 bytes(中/英文)的 send trigger,并收窄到“首次复杂发送 / 多行或结构化 Markdown / 附件卡片 / mention / 跨群 / attention”;不会常驻注入 14,183-byte 全文。\n都存在歧义,自动改写会破坏现有行为。此次只修正发现链路和输入契约说明。影响面
prompt+ 全局 skillsDir CLI:Codex、Gemini、OpenCode、Cursor、Coco、Traex、Pi、Oh My Pi、MTR、Kiro CLI 走首轮 inline catalog;Genius、Grok 走 system-prompt catalog,均新增同一条精简入口。global、off、Claude-family dynamic 注入的模式解析和安装行为不变;所有使用共享 routing 的 CLI 会看到更明确的 anti-double-escape 文案。验证
git diff --check:通过。pnpm exec vitest run --project unit test/builtin-skills.test.ts test/skill-injection-mode.test.ts test/prompt-builder.test.ts test/cli-adapters.test.ts:4 files / 389 tests passed。pnpm build:通过(tsc + dashboard bundle)。pnpm test:8192 passed / 1 failed。唯一失败为 upstream/master 现有test/dashboard-monitoring-ui.test.ts断言仍要求.ui-info-pop-floating { pointer-events: none },而 upstream 当前样式已为auto;本 PR 未修改 dashboard 文件,单独复跑同样失败。pnpm daemon:restart启动验证:6 个 daemon/dashboard 进程均 online;随后已恢复原 canonical checkout 的 live wrapper。