botmux 2.50.0 → 2.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.en.md +74 -48
  2. package/README.md +67 -44
  3. package/dist/adapters/cli/aiden.js +3 -2
  4. package/dist/adapters/cli/aiden.js.map +1 -1
  5. package/dist/adapters/cli/antigravity.js +2 -2
  6. package/dist/adapters/cli/antigravity.js.map +1 -1
  7. package/dist/adapters/cli/claude-code.d.ts.map +1 -1
  8. package/dist/adapters/cli/claude-code.js +12 -10
  9. package/dist/adapters/cli/claude-code.js.map +1 -1
  10. package/dist/adapters/cli/coco.js +3 -2
  11. package/dist/adapters/cli/coco.js.map +1 -1
  12. package/dist/adapters/cli/codex.js +2 -2
  13. package/dist/adapters/cli/codex.js.map +1 -1
  14. package/dist/adapters/cli/cursor.js +2 -2
  15. package/dist/adapters/cli/cursor.js.map +1 -1
  16. package/dist/adapters/cli/gemini.js +2 -2
  17. package/dist/adapters/cli/gemini.js.map +1 -1
  18. package/dist/adapters/cli/hermes.d.ts.map +1 -1
  19. package/dist/adapters/cli/hermes.js +4 -2
  20. package/dist/adapters/cli/hermes.js.map +1 -1
  21. package/dist/adapters/cli/types.d.ts +2 -0
  22. package/dist/adapters/cli/types.d.ts.map +1 -1
  23. package/dist/bot-registry.d.ts +5 -0
  24. package/dist/bot-registry.d.ts.map +1 -1
  25. package/dist/bot-registry.js +1 -0
  26. package/dist/bot-registry.js.map +1 -1
  27. package/dist/cli.d.ts.map +1 -1
  28. package/dist/cli.js +400 -3
  29. package/dist/cli.js.map +1 -1
  30. package/dist/core/dispatch.d.ts +163 -0
  31. package/dist/core/dispatch.d.ts.map +1 -0
  32. package/dist/core/dispatch.js +212 -0
  33. package/dist/core/dispatch.js.map +1 -0
  34. package/dist/core/worker-pool.d.ts.map +1 -1
  35. package/dist/core/worker-pool.js +2 -0
  36. package/dist/core/worker-pool.js.map +1 -1
  37. package/dist/daemon.d.ts.map +1 -1
  38. package/dist/daemon.js +46 -1
  39. package/dist/daemon.js.map +1 -1
  40. package/dist/im/lark/event-dispatcher.d.ts.map +1 -1
  41. package/dist/im/lark/event-dispatcher.js +22 -5
  42. package/dist/im/lark/event-dispatcher.js.map +1 -1
  43. package/dist/skills/definitions.d.ts.map +1 -1
  44. package/dist/skills/definitions.js +73 -0
  45. package/dist/skills/definitions.js.map +1 -1
  46. package/dist/types.d.ts +8 -0
  47. package/dist/types.d.ts.map +1 -1
  48. package/dist/utils/anchor-serializer.d.ts +11 -0
  49. package/dist/utils/anchor-serializer.d.ts.map +1 -0
  50. package/dist/utils/anchor-serializer.js +49 -0
  51. package/dist/utils/anchor-serializer.js.map +1 -0
  52. package/dist/utils/input-gate.d.ts +31 -0
  53. package/dist/utils/input-gate.d.ts.map +1 -0
  54. package/dist/utils/input-gate.js +27 -0
  55. package/dist/utils/input-gate.js.map +1 -0
  56. package/dist/utils/web-terminal-seed.d.ts +40 -0
  57. package/dist/utils/web-terminal-seed.d.ts.map +1 -0
  58. package/dist/utils/web-terminal-seed.js +46 -0
  59. package/dist/utils/web-terminal-seed.js.map +1 -0
  60. package/dist/worker.js +24 -6
  61. package/dist/worker.js.map +1 -1
  62. package/package.json +1 -1
package/README.en.md CHANGED
@@ -54,6 +54,7 @@ Compared to OpenClaw-style approaches built on Agent SDKs:
54
54
  | Multi-CLI Support | 6 CLIs, switch with one config (Claude Code / Codex / Cursor / Gemini / OpenCode / Antigravity) | Tied to a single SDK, cannot switch CLIs |
55
55
  | Web Terminal | Interactive full terminal, mobile shortcut toolbar, phone/desktop/Lark tri-screen sync | Usually web chat UI or read-only output |
56
56
  | Multi-Bot Collaboration | Multiple bots in same group via @mention routing, isolated processes, different CLIs sparring | Usually single bot |
57
+ | Multi-Topic Collaboration | A lead bot auto-splits the task, opens multiple topics, and dispatches several bots to work in parallel (coder + reviewer), with a Lark task list as the shared progress board | Usually manual one-by-one assignment, no unified progress board |
57
58
  | Terminal Access | tmux attach directly into the CLI process, same as local dev experience | No direct terminal access |
58
59
  | Installation | `npm install -g botmux`, 5-min Lark setup | Easy to install, but more configuration needed |
59
60
 
@@ -72,9 +73,9 @@ Compared to OpenClaw-style approaches built on Agent SDKs:
72
73
 
73
74
  ## 5-Minute Setup
74
75
 
75
- > 💡 **TL;DR**: `npm i -g botmux` → `botmux setup` and **scan two QR codes** to get a working bot → `botmux start`. The 1st scan creates the app and saves the AppID/AppSecret (event subscriptions + bot capability pre-configured); the 2nd scan lets botmux's built-in Feishu Web login **import permissions, configure the redirect URL, and create + submit a publish version automatically**. Steps 4 (permissions) / 5 (redirect) / 6 (publish) below are all done automatically by setup and folded as a manual fallback; pass `--no-open-platform-auto` to skip the second auto-config step.
76
+ > 💡 **TL;DR**: `npm i -g botmux` → `botmux setup` and **scan two QR codes** to get a working bot → `botmux start`. The 1st scan creates the app and saves the AppID/AppSecret (event subscriptions + bot capability pre-configured); the 2nd scan lets botmux's built-in Feishu Web login **import permissions, configure the redirect URL, and create + submit a publish version automatically**. The entire Open Platform config (create app / permissions / redirect / publish) is handled by setup; pass `--no-open-platform-auto` to skip the second auto-config step and use the manual steps folded at the end.
76
77
 
77
- ### Step 1: Install botmux
78
+ ### 1. Install botmux
78
79
 
79
80
  ```bash
80
81
  npm install -g botmux
@@ -82,24 +83,22 @@ npm install -g botmux
82
83
 
83
84
  > Requires **Node.js ≥ 20**, with at least one AI coding CLI installed and authenticated (`claude` / `codex` / `cursor-agent` / `gemini` / `opencode` / `coco` / `agy` on your PATH). Installing **tmux** too is recommended (enables session persistence automatically).
84
85
 
85
- ### Step 2: Create the App & Configure (`botmux setup`)
86
+ ### 2. Create the App & Configure (`botmux setup`)
86
87
 
87
88
  Run `botmux setup` and follow the interactive menu:
88
89
 
89
90
  1. **New config**: type `1` and press Enter (with an existing config, type `2` to add a bot).
90
- 2. **Create the bot**:
91
- - Type `1` → **Scan-to-create (recommended)**: scan with the Lark mobile app and a PersonalAgent app is created with AppID/AppSecret persisted automatically, **with event subscriptions + bot capability pre-configured** — no manual browser navigation. Uses the official `@larksuiteoapi/node-sdk` device flow.
92
- - Type `2` → **Manual**: go to the [Lark Open Platform](https://open.larkoffice.com/app), create a "Custom App", copy **App ID / App Secret** from "Credentials & Basic Info", and paste them back.
91
+ 2. **Create the bot**: type `1` → **Scan-to-create (recommended)**: scan with the Lark mobile app and a PersonalAgent app is created with AppID/AppSecret persisted automatically, **with event subscriptions + bot capability pre-configured** — no manual browser navigation. Uses the official `@larksuiteoapi/node-sdk` device flow. (You can also type `2` to paste AppID/Secret manually — see "Create the app manually" folded below.)
93
92
  3. **Pick the CLI**: choose the CLI to bridge (e.g. type `1` for Claude Code).
94
93
  4. **Default working dir**: usually the **parent directory** of your git projects (e.g. `~/projects`); new topics scan **downward** for git repos (up to 3 levels). Avoid `~` (too many folders to traverse).
95
94
 
96
- > ⚠️ **Currently only Feishu (feishu.cn) tenants are supported.** If scan detects a Lark international (larksuite.com) tenant, setup aborts the daemon runtime (Lark Client/WSClient/event-dispatcher) hasn't been wired up for the `larksuite.com` domain yet. A follow-up PR will add full Lark support.
95
+ Then comes the **2nd scan**: botmux's built-in Feishu Web login automatically imports permissions, configures the `http://127.0.0.1:9768/callback` redirect URL, and creates + submits a publish version. On failure it falls back and prints the manual steps (folded below) without affecting the config already written; importing only part of the permissions still counts as success add the rest later on the Open Platform.
97
96
 
98
- At the end, setup validates credentials with a `tenant_access_token` call (only writing `bots.json` on success), writes the full scope JSON to `~/.botmux/lark-scopes.json`, and prints a one-line clipboard copy command plus deep-links to each remaining step.
97
+ > ⚠️ **Currently only Feishu (feishu.cn) tenants are supported.** If scan detects a Lark international (larksuite.com) tenant, setup aborts — the daemon runtime (Lark Client/WSClient/event-dispatcher) hasn't been wired up for the `larksuite.com` domain yet. A follow-up PR will add full Lark support.
99
98
 
100
- ![Create App](docs/setup/create-app.png)
99
+ At the end, setup validates credentials with a `tenant_access_token` call (only writing `bots.json` on success) and writes the full scope JSON to `~/.botmux/lark-scopes.json` for reference.
101
100
 
102
- ### Step 3: Start
101
+ ### 3. Start
103
102
 
104
103
  ```bash
105
104
  botmux start
@@ -107,14 +106,34 @@ botmux start
107
106
 
108
107
  > `start` re-validates credentials before forking workers; missing scopes only WARN, they don't block the daemon. If you later need to verify the event subscription, Lark requires the daemon to be running so it can detect the WebSocket connection.
109
108
 
109
+ ### 4. Create a Group and Start Chatting
110
+
111
+ 1. Create a **topic-enabled group** in Lark
112
+ 2. Open group settings → Group Bots → add the bot you just created
113
+ 3. Send a message in the group — the bot responds automatically
114
+
115
+ ![Add bot to group](docs/setup/add-bot-to-group.png)
116
+
117
+ ### 5. Enable Boot-time Autostart (recommended)
118
+
119
+ After confirming the bot can send/receive messages, run:
120
+
121
+ ```bash
122
+ botmux autostart enable
123
+ ```
124
+
125
+ This registers the daemon with your user init system (macOS launchd / Linux user systemd) — **no sudo needed**. It restarts automatically on reboot. See [CLI Commands § Autostart](#autostart) below.
126
+
110
127
  <details>
111
- <summary><b>Manual Open Platform config: permissions / redirect / publish (fallback)</b> —— botmux setup does these automatically (during the 2nd scan); expand only if auto-config failed or you want to verify manually</summary>
128
+ <summary><b>Manual Open Platform config: create app / permissions / redirect / publish (fallback)</b> —— handled automatically by botmux setup during the 2nd scan; expand only if auto-config failed or you want to verify manually</summary>
112
129
 
113
130
  <br>
114
131
 
115
- ### Step 4: Add Permissions
132
+ **Create the app manually**: go to the [Lark Open Platform](https://open.larkoffice.com/app), create a "Custom App", copy **App ID / App Secret** from "Credentials & Basic Info", and in `botmux setup`'s "Create the bot" step choose `2` to paste them back.
116
133
 
117
- Run the copy-to-clipboard command setup printed, then go to "Permissions & Scopes" → "Batch Import/Export" and paste. Submit for review — visibility "only me" auto-approves.
134
+ ![Create App](docs/setup/create-app.png)
135
+
136
+ **Add permissions**: run the copy-to-clipboard command setup printed, then go to "Permissions & Scopes" → "Batch Import/Export" and paste. Submit for review — visibility "only me" auto-approves.
118
137
 
119
138
  ![Permissions](docs/setup/permissions.png)
120
139
 
@@ -131,52 +150,27 @@ cat ~/.botmux/lark-scopes.json
131
150
  base64 -w0 < ~/.botmux/lark-scopes.json | awk 'BEGIN{printf "\033]52;c;"}{printf "%s",$0}END{printf "\a"}'
132
151
  ```
133
152
 
134
- > Scan-created PersonalAgent apps have `im.message.receive_v1` + `card.action.trigger` subscribed and the bot capability enabled out of the box, per botmux maintainer testing. Lark hasn't documented this as stable behavior, so **if the bot receives no messages at all after setup**, see "Step 8: Troubleshoot bot not receiving messages" below for a manual fallback.
135
-
136
- ### Step 5: Add Redirect URL (optional)
153
+ **Add redirect URL (optional)**: if you plan to use `/login` inside Lark to let botmux act on your behalf for docs / calendar / wiki / sheets, add a redirect URL under "Security Settings" "Redirect URL": `http://127.0.0.1:9768/callback`. Skip this if you only need bot messaging.
137
154
 
138
- If you plan to use `/login` inside Lark to let botmux act on your behalf for docs / calendar / wiki / sheets, add a redirect URL under "Security Settings" "Redirect URL":
139
-
140
- ```
141
- http://127.0.0.1:9768/callback
142
- ```
143
-
144
- Skip this step if you only need bot messaging.
145
-
146
- ### Step 6: Publish the App
147
-
148
- Go to "Version Management & Release", click "Create Version" and publish. Set availability to "Visible to me only" for automatic approval.
155
+ **Publish**: go to "Version Management & Release", click "Create Version" and publish. Set availability to "Visible to me only" for automatic approval.
149
156
 
150
157
  ![Publish](docs/setup/publish.png)
151
158
 
152
159
  </details>
153
160
 
154
- ### Step 7: Create a Group and Start Chatting
155
-
156
- 1. Create a **topic-enabled group** in Lark
157
- 2. Go to Group Settings → Bots → Add the bot you just created
158
- 3. Send a message in the group — the bot responds automatically
159
-
160
- ![Add bot to group](docs/setup/add-bot-to-group.png)
161
-
162
- ### Step 8: Troubleshoot — bot not receiving messages (fallback)
163
-
164
- PersonalAgent apps come with event subscriptions and bot capability pre-configured; in normal cases you don't touch this. If the bot **receives no messages at all** after setup (not even DMs), verify these two settings:
165
-
166
- - **Event subscription**: Open Platform → your app → Events & Callbacks → should be subscribed to `im.message.receive_v1` + `card.action.trigger`. If missing, add them manually. Subscription mode must be "Receive via persistent connection" (WebSocket), and the botmux daemon must be running.
167
- - **Bot capability**: Open Platform → your app → Features → Bot should be enabled (it is by default). Adjust name/avatar if needed.
161
+ <details>
162
+ <summary><b>Troubleshoot — bot not receiving messages</b></summary>
168
163
 
169
- After verifying, restart: `botmux restart`.
164
+ <br>
170
165
 
171
- ### Step 9: Enable Boot-time Autostart (recommended)
166
+ PersonalAgent apps come with event subscription + bot capability configured by default, so normally you don't touch this. If the bot **receives no messages at all** (not even DMs) after following the steps above, verify these two:
172
167
 
173
- Once the bot is sending and receiving messages cleanly, run:
168
+ - **Event subscription**: Open Platform your app → Events & Callbacks → should subscribe to `im.message.receive_v1` + `card.action.trigger` (subscribed by default; add manually if missing). The delivery method must be "Receive events via long connection" (WebSocket), with the botmux daemon running.
169
+ - **Bot capability**: Open Platform → your app → Features → Bot should be enabled (on by default); name/avatar are editable.
174
170
 
175
- ```bash
176
- botmux autostart enable
177
- ```
171
+ Then restart the daemon: `botmux restart`.
178
172
 
179
- This registers the daemon with your user's init system (launchd on macOS, user systemd on Linux). **No sudo required.** After a reboot — or after logging back in — the daemon comes up on its own. See [CLI Commands § Boot-time Autostart](#boot-time-autostart) below for the full reference.
173
+ </details>
180
174
 
181
175
  ---
182
176
 
@@ -204,6 +198,34 @@ On mobile/tablet, a floating shortcut toolbar provides Esc, Ctrl+C, Tab, arrow k
204
198
 
205
199
  Run multiple Lark bots on a single machine, each mapped to a different CLI. In the same group chat, messages are routed via @mention — each bot gets its own isolated CLI process. With a single bot in the group, it responds automatically without @. In a regular (non-topic) group, `@<bot1> @<bot2> /t xxx` spawns one independent thread per mentioned bot anchored at the same message. Send `@<bot1> @<bot2> /introduce` once so they register each other's open_id; afterwards each bot can explicitly @-mention the others from within its own session (see [§ Slash Commands](#slash-commands)).
206
200
 
201
+ ### Multi-Topic Collaboration
202
+
203
+ The next level up from "Multi-Bot Collaboration": a lead bot (the **orchestrator**) splits one large task into multiple **sub-projects**, **automatically opens several topics** in the group, dispatches a team of bots into each topic to drive it in parallel (commonly "one writes the code + one reviews"), uses a single **Lark task list** as the shared progress board everyone reads from, and finally collects the results and aggregates them. A single regular group becomes a parallel workbench, and you can see overall progress at a glance from the Lark task panel.
204
+
205
+ **How it runs** — the `botmux-orchestrate` skill walks the orchestrator through the full flow:
206
+
207
+ > Split into sub-projects → propose a "sub-project ↔ bot" assignment → send it to you for **a single approval** (confirmable via card) → create the Lark task list → open each topic and dispatch → collect the reports → aggregate
208
+
209
+ Under the hood, dispatching is done by `botmux dispatch`: it seeds a topic in the group and @-mentions the chosen bots, spawning an independent session for each.
210
+
211
+ ```bash
212
+ botmux dispatch --title "Implement login module" \
213
+ --bot "ou_xxx:Alice:coder" --bot "ou_yyy:Bob:reviewer" \
214
+ --repo /path/to/repo --brief-file /tmp/brief.md
215
+ ```
216
+
217
+ - `--repo <dir>` — presets each sub-bot's working directory (absolute path, must exist on the sub-bot's machine), so the session spawns straight into it and **skips the "select repo" card**.
218
+ - `--standby` — **must be paired with `--repo`** (and cannot be combined with `--into`): sends `/repo` once to bring the bot up in the given directory on standby without a brief; activate it later with `--into ... --brief(-file)`.
219
+ - `--into <topic root>` — return to an existing topic and append one message (activate standby bots / add coordination); still requires `--bot`, and outside standby mode must carry `--brief` or `--brief-file`.
220
+
221
+ When a sub-bot finishes, it reports progress/completion back with `botmux report` from inside its own sub-topic. This routes the report into the orchestrator's **own** session (which still holds full context) instead of @-mentioning the orchestrator inside the sub-topic — where it has no session and the @ would spawn a fresh, context-less one. The orchestrator then aggregates the collected reports.
222
+
223
+ **Collaboration boundaries:**
224
+
225
+ - **"Own" bots in the same deployment trust each other** — the orchestrator can run operate-level commands like `/repo` directly against them (same conversation permissions as your own bots). Authorization for external bots is two-tiered: `/grant @bot` only grants "talk / be spawned by chat-scope" permission (talk-only — it does not touch `allowedUsers` and cannot run operate-level commands); to let an external bot run operate-level commands like `/repo`, add it to `allowedUsers` (or grant operate-level access later). `/introduce` only handles discovery / registering open_id and **grants no permissions**.
226
+ - Sub-bots must already be in the group and @-mentionable (i.e. have the `im:message.group_at_msg.include_bot` permission).
227
+ - A single topic can hold multiple bots, and they @-mention each other to collaborate within the topic (e.g. the coder @-mentions the reviewer once the code is done).
228
+
207
229
  ### Tmux Persistence
208
230
 
209
231
  When tmux is installed, botmux automatically uses it. CLI processes persist inside tmux sessions — all features work unchanged.
@@ -432,6 +454,7 @@ When `~/.botmux/bots.json` already exists, `botmux setup` can add a bot, reconfi
432
454
  "name": "claude-main",
433
455
  "cliId": "claude-code",
434
456
  "model": "sonnet",
457
+ "disableCliBypass": true,
435
458
  "workingDir": "~/projects",
436
459
  "allowedUsers": ["alice@company.com"],
437
460
  "allowedChatGroups": ["oc_xxx_team"]
@@ -454,6 +477,7 @@ When `~/.botmux/bots.json` already exists, `botmux setup` can add a bot, reconfi
454
477
  | `cliId` | No | CLI adapter, defaults to `claude-code` (options: `aiden`, `coco`, `codex`, `codex-app`, `cursor`, `gemini`, `opencode`, `antigravity`, `hermes`) |
455
478
  | `model` | No | Model name used when spawning the CLI. Currently honored by: `claude-code`, `codex`, `coco`, `cursor`, `gemini`, `opencode`; other adapters ignore the field. Leave empty to use the CLI default. `botmux setup` proposes per-CLI candidates plus a free-form Other option. |
456
479
  | `cliPathOverride` | No | Absolute path to the CLI entry, for wrappers / routers; typical use: `ccr`, `claude-w`, `aiden-x-claude`, etc. |
480
+ | `disableCliBypass` | No | Whether to disable botmux's default CLI bypass / weak-sandbox flag injection. Missing or `false` keeps the legacy behavior: botmux still adds flags such as `--yolo`, `--dangerously-*`, `--force`, or `--permission-mode agentFull`. When `true`, botmux stops adding those flags. For a custom approval/sandbox policy, point `cliPathOverride` at a wrapper script that passes the desired CLI-specific args |
457
481
  | `backendType` | No | Session backend: `pty` or `tmux` (auto-detected by default) |
458
482
  | `workingDir` | No | Default working directory, supports comma-separated. The new-topic repo-select card scans for git repos **from this directory downward** (recursive, up to 3 levels), no longer climbing to the parent: point it at a repos root (e.g. `~/projects`) to list every repo beneath it, or at a single repo to list just that repo (and its linked worktrees) |
459
483
  | `defaultWorkingDir` | No | Single-repo default: new topics with no oncall binding and no peer-session inheritance spawn directly here, skipping the repo-select card. `/cd <path>` still switches mid-session; the next new topic falls back to this default. **Difference from `defaultOncall`:** does NOT write `oncallChats` and does NOT change the `canTalk` / `canOperate` permission model |
@@ -503,6 +527,8 @@ When `~/.botmux/bots.json` already exists, `botmux setup` can add a bot, reconfi
503
527
  | `botmux autostart disable` | Unregister boot-time autostart |
504
528
  | `botmux autostart status` | Show autostart status |
505
529
  | `botmux dashboard` | Print a fresh Web Dashboard URL (rotates the token; previous URL becomes invalid) |
530
+ | `botmux dispatch` | Open a sub-project topic and @-mention the chosen bots to spawn their sessions (the dispatch command for [Multi-Topic Collaboration](#multi-topic-collaboration); supports `--title`, repeatable `--bot`, `--brief` / `--brief-file`, `--repo`, `--standby`, `--into`, with `--chat-id` / `--session-id` as advanced overrides; see `botmux dispatch --help`) |
531
+ | `botmux report` | From inside a dispatched sub-project session, report progress/completion back to the orchestrator's own session ([Multi-Topic Collaboration](#multi-topic-collaboration); routes the report into the orchestrator's context-rich thread instead of @-mentioning it in the sub-topic; `--content-file` to read the report from a file; see `botmux report --help`) |
506
532
 
507
533
  ### Boot-time Autostart
508
534
 
package/README.md CHANGED
@@ -58,6 +58,7 @@ botmux 不重新实现 Agent 能力,而是直接桥接已有的 AI 编程 CLI
58
58
  | 多 CLI 支持 | 6 种 CLI 一键切换(Claude Code / Codex / Cursor / Gemini / OpenCode / Antigravity) | 绑定单一 SDK,无法切换 CLI |
59
59
  | Web 终端 | 可交互的完整终端,移动端快捷键工具栏,手机/电脑/飞书三端同步 | 通常仅 Web 聊天界面或只读输出 |
60
60
  | 多机器人协作 | 多 bot 同群 @mention 路由,独立进程隔离,不同 CLI 赛博斗蛐蛐 | 通常单机器人 |
61
+ | 多话题协作模式 | 主 bot 自动拆任务、开多话题、派多 bot 并行协作(coder+reviewer),飞书任务清单当共享进度板 | 通常需人工逐个分派、无统一进度板 |
61
62
  | 终端直连 | tmux attach 直接进入 CLI 进程,和本地开发体验一致 | 无法直接操作底层终端 |
62
63
  | 安装部署 | `npm install -g botmux`,5 分钟飞书配置即可使用 | 安装简单,但配置项较多 |
63
64
 
@@ -86,6 +87,32 @@ botmux 不重新实现 Agent 能力,而是直接桥接已有的 AI 编程 CLI
86
87
 
87
88
  同一台机器上可运行多个飞书机器人,每个机器人可对应不同的 CLI。同一群聊中通过 @mention 路由消息,仅有一个机器人时无需 @ 自动响应;多机器人时 `@<bot1> @<bot2> /t xxx` 可让每个被 @ 的机器人在同一条消息上各自独立开新话题。先发一次 `@<bot1> @<bot2> /introduce` 让它们互相登记 open_id,之后各 bot 就能在自己的会话里显式 @mention 对方协作(见 [§ 斜杠命令](#斜杠命令))。
88
89
 
90
+ ### 多话题协作模式
91
+
92
+ 「多机器人协作」的升级版:主 bot(**编排者**)把一个大任务拆成多个**子项目**,在群里**自动开多条话题**,每条话题派一组 bot 并行推进(常见「一个写代码 + 一个 review」),用一张**飞书任务清单**当所有人共享的进度板,最后由主 bot 收齐汇总。一个普通群就是一个并行工作台,你在飞书任务面板一眼看完成度。
93
+
94
+ **怎么跑** —— `botmux-orchestrate` skill 教编排者走完整流程:
95
+
96
+ > 拆子项目 → 提一版「子项目 ↔ bot」分配 → 发给你**一次审批**(可用卡片确认) → 建飞书任务清单 → 逐个开话题派活 → 收齐回报 → 汇总
97
+
98
+ 底层派活靠 `botmux dispatch`:在群里种一条话题、把指定 bot @ 进去各起独立会话。
99
+
100
+ ```bash
101
+ botmux dispatch --title "实现登录模块" \
102
+ --bot "ou_xxx:Alice:coder" --bot "ou_yyy:Bob:reviewer" \
103
+ --repo /path/to/repo --brief-file /tmp/brief.md
104
+ ```
105
+
106
+ - `--repo <目录>` —— 预设子 bot 的工作目录(绝对路径,需在子 bot 所在机器上存在),起会话直接进去、**免手点「选仓库」卡**。
107
+ - `--standby` —— **必须配 `--repo`**(且不能与 `--into` 同用):只发一次 `/repo` 把 bot 拉起到指定目录待命、不派简报,之后用 `--into ... --brief(-file)` 激活派活。
108
+ - `--into <话题root>` —— 回到已有话题追加一条(激活待命的 bot / 追加协调);仍需 `--bot`,且非 standby 时必须带 `--brief` 或 `--brief-file`。
109
+
110
+ **协作边界**:
111
+
112
+ - **同部署的「自家」bot 之间互信** —— 编排者能直接对它们跑 `/repo` 等 operate 级命令(与自家 bot 的对话权限一致)。外部 bot 的授权分两层:`/grant @bot` 只给「对话 / 被 chat-scope 拉起」的权限(talk-only,不碰 `allowedUsers`、跑不了 operate 级命令);要让外部 bot 跑 `/repo` 等 operate 级命令,需把它列进 `allowedUsers`(或后续 operate 级授权)。`/introduce` 只负责发现 / 登记 open_id,**不授予任何权限**。
113
+ - 子 bot 须已在群里、可被 @(具备 `im:message.group_at_msg.include_bot` 权限)。
114
+ - 一条话题可放多个 bot,它们在话题内互相 @ 协作(如 coder 写完 @ reviewer 审)。
115
+
89
116
  ### Tmux 会话常驻
90
117
 
91
118
  安装 tmux 后自动启用。CLI 进程常驻在 tmux session 内,所有功能不受影响。
@@ -179,9 +206,9 @@ CLI 进入 botmux 会话时自动获得 `~/.botmux/bin` 在 PATH 中,以及一
179
206
 
180
207
  ## 5 分钟快速接入
181
208
 
182
- > 💡 **TL;DR**:`npm i -g botmux` → `botmux setup`,**扫两次码**就能建好一个可用机器人 → `botmux start`。第 1 次扫码建应用、拿到 AppID/AppSecret(事件订阅 + bot 能力默认已配好);第 2 次扫码让 botmux 内置的飞书 Web 登录**自动导入权限、配置重定向 URL、创建并提交发布版本**。下面的 Step 4 权限 / Step 5 重定向 / Step 6 发版都已由 setup 默认自动完成、折叠为手动备用;加 `--no-open-platform-auto` 可跳过第二次自动配置、改走手动。
209
+ > 💡 **TL;DR**:`npm i -g botmux` → `botmux setup`,**扫两次码**就能建好一个可用机器人 → `botmux start`。第 1 次扫码建应用、拿到 AppID/AppSecret(事件订阅 + bot 能力默认已配好);第 2 次扫码让 botmux 内置的飞书 Web 登录**自动导入权限、配置重定向 URL、创建并提交发布版本**。整个开放平台配置(建应用 / 权限 / 重定向 / 发版)都已由 setup 默认完成;加 `--no-open-platform-auto` 可跳过第二次自动配置、改走文末折叠的手动步骤。
183
210
 
184
- ### Step 1: 安装 botmux
211
+ ### 1. 安装 botmux
185
212
 
186
213
  ```bash
187
214
  npm install -g botmux
@@ -189,24 +216,22 @@ npm install -g botmux
189
216
 
190
217
  > 要求 **Node.js ≥ 20**,且本地已装好并登录至少一种 AI 编程 CLI(`claude` / `codex` / `cursor-agent` / `gemini` / `opencode` / `coco` / `agy` 等在 PATH 中)。推荐顺手装 **tmux**(装了自动启用会话常驻)。
191
218
 
192
- ### Step 2: 创建应用并配置(`botmux setup`)
219
+ ### 2. 创建应用并配置(`botmux setup`)
193
220
 
194
221
  跑 `botmux setup`,按交互菜单一步步选:
195
222
 
196
223
  1. **新建配置**:输入 `1` 回车(已有配置时输入 `2` 添加机器人)。
197
- 2. **创建机器人**:
198
- - 输入 `1` → **扫码创建(推荐)**:飞书扫码完成后自动建出 PersonalAgent 应用并落盘 AppID/AppSecret,**事件订阅 + bot 能力默认已配好**,无需手动浏览器创建。底层走 `@larksuiteoapi/node-sdk` 官方 device flow。
199
- - 输入 `2` → **手动创建**:去 [飞书开放平台](https://open.larkoffice.com/app) 建「企业自建应用」,在「凭证与基础信息」复制 **App ID / App Secret** 回来粘贴。
224
+ 2. **创建机器人**:输入 `1` → **扫码创建(推荐)**,飞书扫码完成后自动建出 PersonalAgent 应用并落盘 AppID/AppSecret,**事件订阅 + bot 能力默认已配好**,无需手动浏览器创建。底层走 `@larksuiteoapi/node-sdk` 官方 device flow。(也可输入 `2` 手动粘贴 AppID/Secret,见文末折叠的「手动创建应用」。)
200
225
  3. **选择 CLI**:选本次要接入的 CLI(如接 Claude Code 就选 `1`)。
201
226
  4. **默认工作目录**:通常填 git 项目的**父级目录**(如 `~/projects`),新话题会从该目录**向下**查找 git 仓库(最多 3 层);尽量别填 `~`(要遍历太多文件夹)。
202
227
 
203
- > ⚠️ **目前仅支持飞书 (feishu.cn) 租户**。扫码检测到 Lark 国际版 (larksuite.com) 会中止 setup —— daemon runtime (Lark Client/WSClient/event-dispatcher 等) 需要一并接入 lark 域,会在单独 PR 跟进。
228
+ 接着进入**第 2 次扫码**:botmux 内置的飞书 Web 登录会自动导入权限、配置 `http://127.0.0.1:9768/callback` 重定向 URL、创建并提交发布版本。失败会自动回退并打印手动步骤(见文末折叠),不影响已写入的配置;权限只导入了一部分也算成功,缺的可事后到开放平台补。
204
229
 
205
- setup 末尾会用 `tenant_access_token` 校验凭证(通过才落盘 `bots.json`),并把完整权限 JSON 写到 `~/.botmux/lark-scopes.json` + 打印一键复制命令 + 各步骤深链。
230
+ > ⚠️ **目前仅支持飞书 (feishu.cn) 租户**。扫码检测到 Lark 国际版 (larksuite.com) 会中止 setup —— daemon runtime (Lark Client/WSClient/event-dispatcher 等) 需要一并接入 lark 域,会在单独 PR 跟进。
206
231
 
207
- ![扫码建应用](docs/setup/create-app.png)
232
+ setup 末尾会用 `tenant_access_token` 校验凭证(通过才落盘 `bots.json`),并把完整权限 JSON 写到 `~/.botmux/lark-scopes.json` 备查。
208
233
 
209
- ### Step 3: 启动
234
+ ### 3. 启动
210
235
 
211
236
  ```bash
212
237
  botmux start
@@ -214,14 +239,34 @@ botmux start
214
239
 
215
240
  > start 前再校验一次凭证;权限未配齐不会阻塞 daemon,只 WARN。如果之后需要确认事件订阅,飞书后台会要求 daemon 已在跑才能识别长连接。
216
241
 
242
+ ### 4. 建群开聊
243
+
244
+ 1. 飞书中创建一个**话题群**
245
+ 2. 进入群设置 → 群机器人 → 添加刚创建的机器人
246
+ 3. 在群里发消息,机器人自动响应
247
+
248
+ ![添加机器人到群](docs/setup/add-bot-to-group.png)
249
+
250
+ ### 5. 开机自启(推荐)
251
+
252
+ 确认机器人能正常收发消息之后,跑一次:
253
+
254
+ ```bash
255
+ botmux autostart enable
256
+ ```
257
+
258
+ 把 daemon 注册到当前用户的 init 系统(macOS launchd / Linux user systemd),**不需要 sudo**。重启机器自动起来。详见下方 [CLI 命令 § 开机自启](#开机自启)。
259
+
217
260
  <details>
218
- <summary><b>手动配置开放平台:权限 / 重定向 / 发版(备用)</b> —— 这三步 botmux setup 默认已自动完成(扫第二次码时),仅在自动配置失败、或想手动核对时展开</summary>
261
+ <summary><b>手动配置开放平台:建应用 / 权限 / 重定向 / 发版(备用)</b> —— 默认由 botmux setup 扫第二次码时自动完成,仅在自动配置失败、或想手动核对时展开</summary>
219
262
 
220
263
  <br>
221
264
 
222
- ### Step 4: 添加权限
265
+ **手动创建应用**:去 [飞书开放平台](https://open.larkoffice.com/app) 建「企业自建应用」,在「凭证与基础信息」复制 **App ID / App Secret**,在 `botmux setup` 的「创建机器人」步骤选 `2` 粘贴回来。
223
266
 
224
- setup 完成后,按 terminal 提示的一键复制命令把权限 JSON 复制到剪贴板,进入「权限管理」→「批量导入/导出权限」粘贴 → 提交审批。可用性范围选「仅自己可见」会自动通过:
267
+ ![创建应用](docs/setup/create-app.png)
268
+
269
+ **添加权限**:按 terminal 提示的一键复制命令把权限 JSON 复制到剪贴板,进入「权限管理」→「批量导入/导出权限」粘贴 → 提交审批。可用性范围选「仅自己可见」会自动通过:
225
270
 
226
271
  ![权限管理](docs/setup/permissions.png)
227
272
 
@@ -238,35 +283,18 @@ cat ~/.botmux/lark-scopes.json
238
283
  base64 -w0 < ~/.botmux/lark-scopes.json | awk 'BEGIN{printf "\033]52;c;"}{printf "%s",$0}END{printf "\a"}'
239
284
  ```
240
285
 
241
- > 扫码建出来的 PersonalAgent 应用,botmux 维护者实测默认已订阅 `im.message.receive_v1` + `card.action.trigger` 并开通 bot 能力,所以主线流程不再要求手动配。但飞书没在公开文档里承诺这是稳定行为,**如果配好后机器人完全收不到消息**,参见下方「Step 8: 机器人收不到消息时的自查」。
242
-
243
- ### Step 5: 添加重定向 URL(按需)
244
-
245
- 如果之后要在飞书里 `/login` 让 botmux 以你的身份调云文档/日历/Wiki 等 API,进入「安全设置」→「重定向 URL」填入:
246
-
247
- ```
248
- http://127.0.0.1:9768/callback
249
- ```
250
-
251
- 只用 bot 收发消息的话这一步可以跳过。
286
+ **添加重定向 URL(按需)**:如果之后要在飞书里 `/login` botmux 以你的身份调云文档/日历/Wiki API,进入「安全设置」→「重定向 URL」填入 `http://127.0.0.1:9768/callback`。只用 bot 收发消息的话这一步可以跳过。
252
287
 
253
- ### Step 6: 发版
254
-
255
- 进入「版本管理与发布」,点击「创建版本」并发布。可用性范围选择「仅自己可见」即可自动通过审核。
288
+ **发版**:进入「版本管理与发布」,点击「创建版本」并发布。可用性范围选择「仅自己可见」即可自动通过审核。
256
289
 
257
290
  ![发版](docs/setup/publish.png)
258
291
 
259
292
  </details>
260
293
 
261
- ### Step 7: 建群开聊
262
-
263
- 1. 飞书中创建一个**话题群**
264
- 2. 进入群设置 → 群机器人 → 添加刚创建的机器人
265
- 3. 在群里发消息,机器人自动响应
266
-
267
- ![添加机器人到群](docs/setup/add-bot-to-group.png)
294
+ <details>
295
+ <summary><b>机器人收不到消息时的自查</b></summary>
268
296
 
269
- ### Step 8: 机器人收不到消息时的自查(fallback)
297
+ <br>
270
298
 
271
299
  PersonalAgent 默认配好事件订阅 + bot 能力,正常情况下不用动。如果按上面步骤走完 bot **完全收不到任何消息**(连私聊都不回),分别确认这两项:
272
300
 
@@ -275,15 +303,7 @@ PersonalAgent 默认配好事件订阅 + bot 能力,正常情况下不用动
275
303
 
276
304
  确认后重启 daemon:`botmux restart`。
277
305
 
278
- ### Step 9: 开机自启(推荐)
279
-
280
- 确认机器人能正常收发消息之后,跑一次:
281
-
282
- ```bash
283
- botmux autostart enable
284
- ```
285
-
286
- 把 daemon 注册到当前用户的 init 系统(macOS launchd / Linux user systemd),**不需要 sudo**。重启机器自动起来。详见下方 [CLI 命令 § 开机自启](#开机自启)。
306
+ </details>
287
307
 
288
308
  ---
289
309
 
@@ -425,6 +445,7 @@ botmux autostart enable
425
445
  | `botmux autostart disable` | 注销开机自启 |
426
446
  | `botmux autostart status` | 查看自启状态 |
427
447
  | `botmux dashboard` | 输出一次 Web Dashboard URL(每次刷 token,旧链接立即失效) |
448
+ | `botmux dispatch` | 开一条子项目话题、把指定 bot @ 进去拉起会话([多话题协作模式](#多话题协作模式)的派活命令;支持 `--repo`/`--standby`/`--into`,`--chat-id`/`--session-id` 为高级覆盖项,见 `botmux dispatch --help`) |
428
449
 
429
450
  ### Workflow 子命令(实验性运维)
430
451
 
@@ -537,6 +558,7 @@ botmux setup
537
558
  "name": "claude-main",
538
559
  "cliId": "claude-code",
539
560
  "model": "sonnet",
561
+ "disableCliBypass": true,
540
562
  "workingDir": "~/projects",
541
563
  "allowedUsers": ["alice@company.com"],
542
564
  "allowedChatGroups": ["oc_xxx_team"]
@@ -559,6 +581,7 @@ botmux setup
559
581
  | `cliId` | 否 | CLI 适配器,默认 `claude-code`(可选:`aiden`、`coco`、`codex`、`codex-app`、`cursor`、`gemini`、`opencode`、`antigravity`、`hermes`) |
560
582
  | `model` | 否 | 启动 CLI 时使用的模型名;留空走 CLI 默认。当前会注入到支持模型参数的适配器:`claude-code` / `codex` / `coco` / `cursor` / `gemini` / `opencode`;其它适配器会忽略该字段 |
561
583
  | `cliPathOverride` | 否 | CLI 入口的绝对路径,用于套 wrapper / router;典型场景:ccr、claude-w、aiden-x-claude 等自定义入口 |
584
+ | `disableCliBypass` | 否 | 是否禁用 botmux 默认注入的 CLI bypass / 弱沙箱参数。未配置或 `false` 时保持兼容旧逻辑,botmux 会继续添加 `--yolo`、`--dangerously-*`、`--force`、`--permission-mode agentFull` 等参数;设为 `true` 时不再自动添加这些参数。如需自定义 approval/sandbox 策略,可通过 `cliPathOverride` 指向 wrapper 脚本自行传入 |
562
585
  | `backendType` | 否 | 会话后端:`pty` 或 `tmux`(默认自动检测) |
563
586
  | `workingDir` | 否 | 默认工作目录,支持逗号分隔多个目录。新话题的 repo 选择卡片会**从该目录自身向下**递归查找 git 仓库(最多 3 层),不再向上扫父目录:指向仓库集合根目录(如 `~/projects`)即列出其下所有仓库,指向单个仓库则只列该仓库(及其 linked worktrees) |
564
587
  | `defaultWorkingDir` | 否 | 单仓库默认目录:新话题在无 oncall 绑定 / 无同群兄弟 session 时直接进入该目录,跳过 repo 选择卡片。`/cd <path>` 仍可临时切换;下一个新话题回到该默认值。**与 `defaultOncall` 的区别**:不写 `oncallChats`、不修改 `canTalk`/`canOperate` 权限模型 |
@@ -8,13 +8,14 @@ export function createAidenAdapter(pathOverride) {
8
8
  return {
9
9
  id: 'aiden',
10
10
  resolvedBin: bin,
11
- buildArgs({ sessionId, resume }) {
11
+ buildArgs({ sessionId, resume, disableCliBypass }) {
12
12
  const args = [];
13
13
  if (resume) {
14
14
  args.push('--resume', sessionId);
15
15
  }
16
16
  // Aiden auto-generates session id for new sessions
17
- args.push('--permission-mode', 'agentFull');
17
+ if (!disableCliBypass)
18
+ args.push('--permission-mode', 'agentFull');
18
19
  return args;
19
20
  },
20
21
  buildResumeCommand({ sessionId }) {
@@ -1 +1 @@
1
- {"version":3,"file":"aiden.js","sourceRoot":"","sources":["../../../src/adapters/cli/aiden.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvD,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,YAAqB;IACtD,MAAM,GAAG,GAAG,cAAc,CAAC,YAAY,IAAI,OAAO,CAAC,CAAC;IACpD,OAAO;QACL,EAAE,EAAE,OAAO;QACX,WAAW,EAAE,GAAG;QAEhB,SAAS,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE;YAC7B,MAAM,IAAI,GAAa,EAAE,CAAC;YAC1B,IAAI,MAAM,EAAE,CAAC;gBAC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AAkB,CAAC"}
@@ -135,8 +135,8 @@ export function createAntigravityAdapter(pathOverride) {
135
135
  return {
136
136
  id: 'antigravity',
137
137
  resolvedBin: bin,
138
- buildArgs({ resume, resumeSessionId }) {
139
- const args = ['--dangerously-skip-permissions'];
138
+ buildArgs({ resume, resumeSessionId, disableCliBypass }) {
139
+ const args = disableCliBypass ? [] : ['--dangerously-skip-permissions'];
140
140
  // Resume: only when we have agy's own conversation UUID. We never
141
141
  // map botmux's sessionId here because agy generates its own id at
142
142
  // spawn time and ignores any value we'd pass — `--conversation`
@@ -1 +1 @@
1
- {"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../../src/adapters/cli/antigravity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,eAAe,CAAC,CAAC;AAEpF,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,eAAe,CAAC,IAAY;IACnC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IAChC,IAAI,CAAC;QAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;IAAC,CAAC;IA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CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,UAAU,CAiXzE;AAED,eAAO,MAAM,MAAM,gCAA0B,CAAC"}
@@ -397,7 +397,7 @@ export function createClaudeCodeAdapter(pathOverride) {
397
397
  // botmux sessionId for the first-turn case where they coincide.
398
398
  return `claude --resume ${cliSessionId ?? sessionId}`;
399
399
  },
400
- buildArgs({ sessionId, resume, resumeSessionId, botName, botOpenId, locale, model }) {
400
+ buildArgs({ sessionId, resume, resumeSessionId, botName, botOpenId, locale, model, disableCliBypass }) {
401
401
  const args = [];
402
402
  if (resume) {
403
403
  args.push('--resume', resumeSessionId ?? sessionId);
@@ -408,15 +408,17 @@ export function createClaudeCodeAdapter(pathOverride) {
408
408
  if (model && model.trim()) {
409
409
  args.push('--model', model.trim());
410
410
  }
411
- args.push('--dangerously-skip-permissions');
412
- // 内联 --settings JSON 作用域仅限本次 spawn,不会写入用户全局 ~/.claude/settings.json。
413
- // 注意:askUserQuestion hook 不在这里注入——它要写全局 settings.json(见下方
414
- // hookInstall),这样 adopt 模式(botmux 接管的是别处已启动、拿不到本 --settings
415
- // claude 会话)才能让那条会话读到 hook。
416
- args.push('--settings', JSON.stringify({
417
- skipDangerousModePermissionPrompt: true,
418
- permissions: { defaultMode: 'bypassPermissions' },
419
- }));
411
+ if (!disableCliBypass) {
412
+ args.push('--dangerously-skip-permissions');
413
+ // 内联 --settings JSON 作用域仅限本次 spawn,不会写入用户全局 ~/.claude/settings.json
414
+ // 注意:askUserQuestion hook 不在这里注入——它要写全局 settings.json(见下方
415
+ // hookInstall),这样 adopt 模式(botmux 接管的是别处已启动、拿不到本 --settings
416
+ // 的 claude 会话)才能让那条会话读到 hook。
417
+ args.push('--settings', JSON.stringify({
418
+ skipDangerousModePermissionPrompt: true,
419
+ permissions: { defaultMode: 'bypassPermissions' },
420
+ }));
421
+ }
420
422
  args.push('--disallowed-tools', 'EnterPlanMode,ExitPlanMode');
421
423
  // Inject botmux's built-in skills as a plugin scoped to THIS session only.
422
424
  // Keeps them out of the user's global ~/.claude/skills so a standalone