metheus-governance-mcp-cli 0.2.60 → 0.2.62
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 +33 -7
- package/cli.mjs +2068 -6861
- package/lib/auth-flow.mjs +966 -0
- package/lib/client-registration.mjs +311 -0
- package/lib/doctor-checks.mjs +261 -0
- package/lib/doctor-report.mjs +50 -0
- package/lib/gateway-transport.mjs +160 -0
- package/lib/local-ai-adapters.mjs +14 -2
- package/lib/local-project-dispatch.mjs +172 -0
- package/lib/local-tool-shims.mjs +169 -0
- package/lib/project-tools.mjs +735 -0
- package/lib/provider-local-transport.mjs +353 -0
- package/lib/provider-support.mjs +60 -0
- package/lib/proxy-auth.mjs +77 -0
- package/lib/proxy-gateway-request.mjs +102 -0
- package/lib/proxy-response-pipeline.mjs +94 -0
- package/lib/proxy-stdio.mjs +175 -0
- package/lib/proxy-tool-helpers.mjs +597 -0
- package/lib/runner-data.mjs +297 -0
- package/lib/runner-delivery.mjs +267 -0
- package/lib/runner-execution.mjs +310 -0
- package/lib/runner-helpers.mjs +181 -0
- package/lib/runner-orchestration.mjs +232 -0
- package/lib/runner-runtime.mjs +241 -0
- package/lib/runner-trigger.mjs +174 -0
- package/lib/selftest-runner-scenarios.mjs +516 -0
- package/lib/selftest-support.mjs +113 -0
- package/lib/selftest-telegram-e2e.mjs +424 -0
- package/lib/setup-context.mjs +60 -0
- package/lib/setup-registration.mjs +145 -0
- package/lib/workspace-context.mjs +379 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ Runner template:
|
|
|
84
84
|
"mentions_only": true,
|
|
85
85
|
"direct_messages": true,
|
|
86
86
|
"reply_to_bot_messages": true,
|
|
87
|
-
"ignore_edited_messages":
|
|
87
|
+
"ignore_edited_messages": true
|
|
88
88
|
},
|
|
89
89
|
"archive_policy": {
|
|
90
90
|
"mirror_replies": true,
|
|
@@ -182,6 +182,7 @@ Guardrail note:
|
|
|
182
182
|
|
|
183
183
|
```bash
|
|
184
184
|
metheus-governance-mcp-cli doctor --project-id <project_uuid> --base-url https://metheus.gesiaplatform.com
|
|
185
|
+
metheus-governance-mcp-cli doctor --project-id <project_uuid> --base-url https://metheus.gesiaplatform.com --strict true
|
|
185
186
|
```
|
|
186
187
|
|
|
187
188
|
Checks:
|
|
@@ -190,6 +191,7 @@ Checks:
|
|
|
190
191
|
- local bot runner v2 config validity
|
|
191
192
|
- project workspace mapping presence
|
|
192
193
|
- role profile -> local CLI availability
|
|
194
|
+
- route dry-run / trigger-policy safety warnings
|
|
193
195
|
- local provider token presence for active project destinations
|
|
194
196
|
- codex/claude/gemini/antigravity/cursor registration state
|
|
195
197
|
- gateway `tools/list` reachability
|
|
@@ -197,16 +199,25 @@ Checks:
|
|
|
197
199
|
- ctxpack auto sync status
|
|
198
200
|
- smoke calls: `workitem.list`, `evidence.list`, `decision.list`
|
|
199
201
|
|
|
202
|
+
`--strict true` upgrades local runner route safety warnings into failures.
|
|
203
|
+
Use it for production validation before enabling long-running bot routes.
|
|
204
|
+
|
|
200
205
|
Direct bot posting:
|
|
201
206
|
- `me.send-bot-message` uses local provider tokens from `~/.metheus/<provider>.env`
|
|
202
207
|
- it does not use a server-stored bot token
|
|
203
208
|
- the destination identifier is resolved from the current project's saved Chat Destinations on the Metheus server
|
|
204
209
|
- if multiple active destinations exist for the same provider, pass `destination_id` or `destination_label`
|
|
210
|
+
- pass `dry_run_delivery=true` to preview the resolved bot/destination locally without sending the provider message
|
|
205
211
|
- direct local delivery is implemented today for:
|
|
206
212
|
- Telegram
|
|
207
213
|
- Slack
|
|
208
214
|
- KakaoTalk profiles and destinations can be stored now, but direct local delivery is not implemented yet
|
|
209
215
|
|
|
216
|
+
Provider support matrix in this CLI:
|
|
217
|
+
- `telegram`: local token verification, direct local delivery, typing, reply-to-message, and automatic inbound runner are implemented
|
|
218
|
+
- `slack`: local token verification and direct local delivery are implemented, but automatic inbound runner is not
|
|
219
|
+
- `kakaotalk`: local config can be stored, but token verification, direct local delivery, and automatic inbound runner are not implemented
|
|
220
|
+
|
|
210
221
|
## Local bot runner
|
|
211
222
|
|
|
212
223
|
The local runner closes the loop:
|
|
@@ -224,23 +235,28 @@ Execution model:
|
|
|
224
235
|
- runner resolves `project_id -> workspace_dir`
|
|
225
236
|
- runner resolves server bot role to a local `role_profile`
|
|
226
237
|
- runner executes the mapped client adapter (`codex` / `claude` / `gemini`)
|
|
227
|
-
- legacy `command` remains
|
|
238
|
+
- legacy `command` remains readable for migration, but execution is disabled by default unless `METHEUS_ALLOW_LEGACY_RUNNER_COMMAND=1`
|
|
228
239
|
|
|
229
240
|
Commands:
|
|
230
241
|
|
|
231
242
|
```bash
|
|
232
|
-
metheus-governance-mcp-cli runner once
|
|
233
|
-
metheus-governance-mcp-cli runner start
|
|
243
|
+
metheus-governance-mcp-cli runner once --route-name telegram-monitor
|
|
244
|
+
metheus-governance-mcp-cli runner start --route-name telegram-monitor
|
|
234
245
|
```
|
|
235
246
|
|
|
236
|
-
|
|
247
|
+
Recommended operational path:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
metheus-governance-mcp-cli runner once --route-name telegram-monitor --dry-run-delivery true
|
|
251
|
+
metheus-governance-mcp-cli runner start --route-name telegram-monitor
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Debug/selection overrides:
|
|
237
255
|
|
|
238
256
|
```bash
|
|
239
257
|
metheus-governance-mcp-cli runner once --project-id <project_uuid> --provider telegram --role monitor
|
|
240
258
|
metheus-governance-mcp-cli runner start --project-id <project_uuid> --provider telegram --role monitor --poll-interval-ms 5000
|
|
241
|
-
metheus-governance-mcp-cli runner start --project-id <project_uuid> --provider telegram --role monitor --mentions-only true
|
|
242
259
|
metheus-governance-mcp-cli runner once --project-id <project_uuid> --provider telegram --role monitor --role-profile review
|
|
243
|
-
metheus-governance-mcp-cli runner once --project-id <project_uuid> --provider telegram --role monitor --command "python C:\\path\\to\\reply.py"
|
|
244
260
|
```
|
|
245
261
|
|
|
246
262
|
Recommended production path:
|
|
@@ -262,6 +278,11 @@ Role profile fields:
|
|
|
262
278
|
- `permission_mode`: `read_only`, `workspace_write`, `danger_full_access`
|
|
263
279
|
- `reasoning_effort`: `low`, `medium`, `high`
|
|
264
280
|
|
|
281
|
+
Role profile note:
|
|
282
|
+
- Claude maps `reasoning_effort` to `--effort`.
|
|
283
|
+
- Codex maps `reasoning_effort` to `-c model_reasoning_effort="..."`.
|
|
284
|
+
- Gemini CLI still has no dedicated effort flag, so the runner keeps the value in env/prompt context for policy parity.
|
|
285
|
+
|
|
265
286
|
Trigger policy fields:
|
|
266
287
|
- `mentions_only`: in groups, react only when the bot is mentioned or when a message replies to the bot
|
|
267
288
|
- `direct_messages`: allow or block private chat messages
|
|
@@ -299,14 +320,19 @@ Notes:
|
|
|
299
320
|
- `runner once` processes the most recent pending archived inbound message
|
|
300
321
|
- `runner start` keeps polling and stores per-route cursor state in `~/.metheus/bot-runner-state.json`
|
|
301
322
|
- first start primes the cursor to the latest inbound message and does not reply to old backlog
|
|
323
|
+
- when inline filters match a configured route in `~/.metheus/bot-runner.json`, the runner reuses that route's canonical name/destination and state cursor instead of creating a new anonymous route key
|
|
324
|
+
- stale anonymous route keys in `~/.metheus/bot-runner-state.json` are auto-migrated to the matching configured route when possible; `doctor` warns if ambiguous legacy keys still remain
|
|
325
|
+
- `--dry-run-delivery true` resolves the real bot and destination but skips provider send and archive mirror writes
|
|
302
326
|
- when `trigger_policy.mentions_only=true`, unmentioned group messages are archived but skipped for reply generation
|
|
303
327
|
- mirrored bot replies are deduped by `chat_id + message_id`
|
|
304
328
|
- provider bot messages are ignored during inbound import by default
|
|
305
329
|
- `local-bot-bridge` reads stdin JSON from the runner and can call Codex/Claude/Gemini for you
|
|
330
|
+
- `route.command` fallback is disabled by default; enable it only temporarily with `METHEUS_ALLOW_LEGACY_RUNNER_COMMAND=1`
|
|
306
331
|
- today this automation path is implemented for Telegram end-to-end
|
|
307
332
|
- set `METHEUS_TELEGRAM_API_BASE_URL=http://127.0.0.1:<port>` only for local mock or regression testing; normal usage should keep the default Telegram API base
|
|
308
333
|
- Slack can use direct local send, but automatic inbound runner flow is not completed yet
|
|
309
334
|
- KakaoTalk config can be stored now, but direct send/runner flow is not implemented yet
|
|
335
|
+
- `doctor` now reports provider support for both enabled runner routes and active project chat destinations
|
|
310
336
|
|
|
311
337
|
## Use in MCP
|
|
312
338
|
|