metheus-governance-mcp-cli 0.2.101 → 0.2.103

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.
package/README.md CHANGED
@@ -31,9 +31,9 @@ Install creates local provider settings templates here:
31
31
  These files are for local provider bot secrets, local transport options, and optional per-bot local AI binding.
32
32
 
33
33
  - Store locally:
34
- - Telegram-wide settings in `~/.metheus/telegram-bots/_global.env`
35
- - `TELEGRAM_BOT_TOKEN` as a legacy Telegram fallback in `_global.env`
36
- - one Telegram bot file per entry in `~/.metheus/telegram-bots/<server-bot-name>.env`
34
+ - Telegram-wide settings in `~/.metheus/telegram-bots/global.env`
35
+ - `TELEGRAM_BOT_TOKEN` as a legacy Telegram fallback in `global.env`
36
+ - one Telegram bot file per entry in `~/.metheus/telegram-bots/<ServerBotName>.env`
37
37
  - `SLACK_BOT_TOKEN`
38
38
  - `KAKAOTALK_BOT_TOKEN`
39
39
  - Server-side Metheus stores project chat destination metadata separately:
@@ -41,12 +41,13 @@ These files are for local provider bot secrets, local transport options, and opt
41
41
  - `chat_id` / channel / room identifier
42
42
  - label / active state
43
43
  - Do not put project chat destination identifiers in local env files.
44
- - Telegram-wide settings now live in `telegram-bots/_global.env`; Telegram per-bot secrets and AI fields live in `telegram-bots/*.env`.
44
+ - Telegram-wide settings now live in `telegram-bots/global.env`; Telegram per-bot secrets and server metadata live in `telegram-bots/*.env`.
45
+ - Grouped server bots also persist `TELEGRAM_BOT_SERVER_ROLE_IDS`, so the local file keeps the exact role-to-server-bot-id mapping instead of pretending that one grouped bot has only one server UUID.
45
46
 
46
47
  Example templates:
47
48
 
48
49
  ```env
49
- # ~/.metheus/telegram-bots/_global.env
50
+ # ~/.metheus/telegram-bots/global.env
50
51
  TELEGRAM_API_BASE_URL=
51
52
  TELEGRAM_AUTO_CLEAR_WEBHOOK=true
52
53
  TELEGRAM_ALLOWED_UPDATES=message,edited_message
@@ -57,9 +58,13 @@ TELEGRAM_BOT_TOKEN=
57
58
  ```
58
59
 
59
60
  ```env
60
- # ~/.metheus/telegram-bots/ryoai_bot.env
61
- TELEGRAM_BOT_NAME=ryoai_bot
62
- TELEGRAM_BOT_SERVER_BOT_ID=
61
+ # ~/.metheus/telegram-bots/RyoAI_bot.env
62
+ TELEGRAM_BOT_SERVER_BOT_ID=<server_bot_uuid>
63
+ TELEGRAM_BOT_SERVER_NAME=RyoAI_bot
64
+ TELEGRAM_BOT_SERVER_ROLES=monitor,review,worker,approval
65
+ TELEGRAM_BOT_SERVER_ROLE_IDS=monitor:<uuid>,review:<uuid>,worker:<uuid>,approval:<uuid>
66
+ # Optional fallback only when server bot binding is unavailable
67
+ # TELEGRAM_BOT_USERNAME=ryoai_bot
63
68
  TELEGRAM_BOT_TOKEN=
64
69
  TELEGRAM_BOT_ROLE_PROFILE=
65
70
  TELEGRAM_BOT_AI_CLIENT=
@@ -169,10 +174,12 @@ metheus-governance-mcp-cli setup --project-id <project_uuid> --ctxpack-key "<ctx
169
174
  - `~/.metheus/kakaotalk.env`
170
175
  - `~/.metheus/bot-runner.json`
171
176
 
177
+ Bootstrap or setup does not create one file per server bot automatically. Per-bot Telegram files are created later when you run `bot add`, `bot verify`, or `bot edit` against a real server bot identity.
178
+
172
179
  When Telegram local config already exists, bootstrap/setup keeps your secrets but auto-normalizes the layout to the latest split structure:
173
180
 
174
- - Telegram-wide settings stay in `~/.metheus/telegram-bots/_global.env`
175
- - per-bot secrets move to `~/.metheus/telegram-bots/<server-bot-name>.env`
181
+ - Telegram-wide settings stay in `~/.metheus/telegram-bots/global.env`
182
+ - per-bot secrets move to `~/.metheus/telegram-bots/<ServerBotName>.env`
176
183
  - stale inline keys such as `TELEGRAM_BOT_<NAME>_BOT_*` are rewritten into generic per-bot keys
177
184
 
178
185
  Fill provider bot secrets and provider-local transport options locally. Project chat destination identifiers should be managed on the Metheus server as project chat destinations, not as local env values and not inside legacy Chat Hooks/webhooks.
@@ -182,7 +189,7 @@ Fill provider bot secrets and provider-local transport options locally. Project
182
189
  - which provider/role bot profile to use
183
190
  - which `project_id -> workspace_dir` mapping to apply locally
184
191
  - which role profile maps to which local CLI/model/permission/reasoning policy
185
- - which server bot maps to which local LLM execution profile via `telegram-bots/_global.env`, `telegram-bots/*.env`, or fallback `bot_bindings`
192
+ - which server bot maps to which local LLM execution profile via `telegram-bots/global.env`, `telegram-bots/*.env`, or fallback `bot_bindings`
186
193
 
187
194
  Built-in helper command for legacy fallback/testing:
188
195
 
@@ -223,15 +230,15 @@ Direct commands:
223
230
 
224
231
  ```bash
225
232
  metheus-governance-mcp-cli bot list
226
- metheus-governance-mcp-cli bot show --provider telegram --bot-key ryoai_bot
233
+ metheus-governance-mcp-cli bot show --provider telegram --bot-name RyoAI_bot
227
234
  metheus-governance-mcp-cli bot add --provider telegram
228
235
  metheus-governance-mcp-cli bot edit
229
236
  metheus-governance-mcp-cli bot edit --provider telegram
230
237
  metheus-governance-mcp-cli bot remove --provider telegram
231
- metheus-governance-mcp-cli bot set-default --provider telegram --bot-key ryoai_bot
232
- metheus-governance-mcp-cli bot migrate --provider telegram --bot-key ryoai_bot
238
+ metheus-governance-mcp-cli bot set-default --provider telegram --bot-name RyoAI_bot
239
+ metheus-governance-mcp-cli bot migrate --provider telegram --bot-name RyoAI_bot
233
240
  metheus-governance-mcp-cli bot global --provider telegram
234
- metheus-governance-mcp-cli bot verify --provider telegram --bot-key ryoai_bot
241
+ metheus-governance-mcp-cli bot verify --provider telegram --bot-name RyoAI_bot
235
242
  ```
236
243
 
237
244
  Behavior:
@@ -258,9 +265,12 @@ Behavior:
258
265
  - `bot set-default` without flags starts a guided numbered flow: provider -> bot entry -> confirm default change.
259
266
  - `bot verify` without flags starts a guided numbered flow: provider -> bot entry -> output format.
260
267
  - `bot remove` without flags starts a guided numbered flow: provider -> bot entry -> confirm removal.
261
- - Telegram stores one bot file per entry under `~/.metheus/telegram-bots/<server-bot-name>.env` with generic fields:
262
- - `TELEGRAM_BOT_NAME`
268
+ - Telegram stores one bot file per entry under `~/.metheus/telegram-bots/<ServerBotName>.env` with generic fields:
263
269
  - `TELEGRAM_BOT_SERVER_BOT_ID`
270
+ - `TELEGRAM_BOT_SERVER_NAME`
271
+ - `TELEGRAM_BOT_SERVER_ROLES`
272
+ - `TELEGRAM_BOT_SERVER_ROLE_IDS`
273
+ - `TELEGRAM_BOT_USERNAME` only as a fallback when server bot binding is unavailable
264
274
  - `TELEGRAM_BOT_TOKEN`
265
275
  - `TELEGRAM_BOT_ROLE_PROFILE`
266
276
  - `TELEGRAM_BOT_AI_CLIENT`
@@ -270,6 +280,7 @@ Behavior:
270
280
  - Slack and KakaoTalk currently use a single local token entry per provider in this command flow.
271
281
  - `bot verify` checks the configured local token, cross-checks the server bot binding, prints the effective runtime role profile summary that the runner will use, and shows which local runner routes currently point at this bot entry.
272
282
  - `bot show` prints one local bot entry in detail, including grouped role summaries when one server bot name expands to multiple roles and any linked local runner routes.
283
+ - In `bot show` and `bot verify`, `stored_*` fields come from the local env file and `live_server_*` fields come from the current server `me/bots` response.
273
284
  - `bot global` edits Telegram-wide local settings such as API base URL, allowed updates, and default bot key.
274
285
  - `bot set-default` updates `TELEGRAM_DEFAULT_BOT_KEY`.
275
286
  - `bot migrate` moves legacy `TELEGRAM_BOT_TOKEN` into a named Telegram bot entry.
@@ -280,16 +291,16 @@ Non-interactive examples:
280
291
  metheus-governance-mcp-cli bot global --provider telegram --non-interactive true --api-base-url http://127.0.0.1:8999/telegram --auto-clear-webhook false --allowed-updates message,edited_message,channel_post
281
292
  metheus-governance-mcp-cli bot add --provider telegram --non-interactive true --server-bot-id <server_bot_uuid> --token <telegram_bot_token> --default true
282
293
  metheus-governance-mcp-cli bot add --provider telegram --non-interactive true --server-bot-id <server_bot_uuid> --token <telegram_bot_token> --ai-client gpt --ai-model "gpt-5.4" --ai-permission-mode read_only --ai-reasoning-effort low
283
- metheus-governance-mcp-cli bot edit --provider telegram --bot-key ryoai_bot --non-interactive true --ai-client claude --ai-model "Sonnet 4.6r" --ai-permission-mode danger_full_access --ai-reasoning-effort high
284
- metheus-governance-mcp-cli bot set-default --provider telegram --bot-key ryoai_bot --non-interactive true
285
- metheus-governance-mcp-cli bot migrate --provider telegram --bot-key ryoai_bot --server-bot-id <server_bot_uuid> --bot-name <telegram_username> --role-profile monitor --ai-client gpt --ai-permission-mode read_only --ai-reasoning-effort low --non-interactive true
286
- metheus-governance-mcp-cli bot remove --provider telegram --bot-key ryoai_bot --non-interactive true
287
- metheus-governance-mcp-cli bot verify --provider telegram --bot-key ryoai_bot --json true
294
+ metheus-governance-mcp-cli bot edit --provider telegram --bot-name RyoAI_bot --non-interactive true --ai-client claude --ai-model "Sonnet 4.6r" --ai-permission-mode danger_full_access --ai-reasoning-effort high
295
+ metheus-governance-mcp-cli bot set-default --provider telegram --bot-name RyoAI_bot --non-interactive true
296
+ metheus-governance-mcp-cli bot migrate --provider telegram --bot-name RyoAI_bot --server-bot-id <server_bot_uuid> --role-profile monitor --ai-client gpt --ai-permission-mode read_only --ai-reasoning-effort low --non-interactive true
297
+ metheus-governance-mcp-cli bot remove --provider telegram --bot-name RyoAI_bot --non-interactive true
298
+ metheus-governance-mcp-cli bot verify --provider telegram --bot-name RyoAI_bot --json true
288
299
  ```
289
300
 
290
- For direct Telegram adds, the CLI can derive the local entry key from the matched server bot name. You no longer need `--bot-key` or `--username` in the normal server-bound path. Treat `--bot-key` as an advanced override only when you intentionally want a different local suffix.
301
+ For direct Telegram adds, the CLI derives the local file name from the matched server bot name. You normally do not need `--bot-key` or `--username`. Treat `--bot-key` as an advanced compatibility selector only when you intentionally need to target an older local selector directly.
291
302
 
292
- For direct Telegram edits, `--bot-key` still identifies which saved local entry to update. If one server bot name expands to multiple roles such as `approval / worker / review / monitor`, prefer the guided `bot edit` flow so you can keep the current grouped settings, edit one role only, or walk every role in sequence instead of forcing one entry-level AI override.
303
+ For direct Telegram edits, prefer `--bot-name` or `--bot-id` because server bot identity is the source of truth. Use `--bot-key` only when you intentionally need the advanced local selector. If one server bot name expands to multiple roles such as `approval / worker / review / monitor`, prefer the guided `bot edit` flow so you can keep the current grouped settings, edit one role only, or walk every role in sequence instead of forcing one entry-level AI override.
293
304
 
294
305
  Current support status:
295
306
 
@@ -371,6 +382,7 @@ Execution model:
371
382
  Commands:
372
383
 
373
384
  ```bash
385
+ metheus-governance-mcp-cli runner list
374
386
  metheus-governance-mcp-cli runner once --route-name telegram-monitor
375
387
  metheus-governance-mcp-cli runner start --route-name telegram-monitor
376
388
  ```
@@ -397,7 +409,7 @@ Recommended production path:
397
409
  - keep `project_mappings.<project_id>.workspace_dir` aligned to that teammate's actual local project folder
398
410
  - let `ctxpack pull` or project connection refresh the mapping automatically
399
411
  - keep per-role execution policy under `role_profiles`
400
- - keep Telegram-wide binding defaults in `~/.metheus/telegram-bots/_global.env`
412
+ - keep Telegram-wide binding defaults in `~/.metheus/telegram-bots/global.env`
401
413
  - use `bot_bindings` in `bot-runner.json` only as local fallback/override
402
414
  - runner resolution order is: explicit `route.role_profile` -> provider env bot binding -> `bot_bindings` -> server bot role -> `route.role`
403
415
 
@@ -470,7 +482,7 @@ Notes:
470
482
  - `local-bot-bridge` reads stdin JSON from the runner and can call Codex/Claude/Gemini for you
471
483
  - `route.command` fallback is disabled by default; enable it only temporarily with `METHEUS_ALLOW_LEGACY_RUNNER_COMMAND=1`
472
484
  - today this automation path is implemented for Telegram end-to-end
473
- - prefer `TELEGRAM_API_BASE_URL=` inside `~/.metheus/telegram-bots/_global.env` for local Telegram API overrides; `METHEUS_TELEGRAM_API_BASE_URL` remains a process-level fallback mainly for mock/regression testing
485
+ - prefer `TELEGRAM_API_BASE_URL=` inside `~/.metheus/telegram-bots/global.env` for local Telegram API overrides; `METHEUS_TELEGRAM_API_BASE_URL` remains a process-level fallback mainly for mock/regression testing
474
486
  - Slack can use direct local send, but automatic inbound runner flow is not completed yet
475
487
  - KakaoTalk config can be stored now, but direct send/runner flow is not implemented yet
476
488
  - `doctor` now reports provider support for both enabled runner routes and active project chat destinations