metheus-governance-mcp-cli 0.2.80 → 0.2.82

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
@@ -259,8 +259,8 @@ Non-interactive examples:
259
259
  ```bash
260
260
  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
261
261
  metheus-governance-mcp-cli bot add --provider telegram --non-interactive true --server-bot-id <server_bot_uuid> --token <telegram_bot_token> --default true
262
- metheus-governance-mcp-cli bot add --provider telegram --non-interactive true --server-bot-id <server_bot_uuid> --token <telegram_bot_token> --ai-client codex --ai-model gpt-5-codex --ai-permission-mode read_only --ai-reasoning-effort low
263
- metheus-governance-mcp-cli bot edit --provider telegram --bot-key ryoai_bot --non-interactive true --ai-client claude --ai-model claude-sonnet-4 --ai-permission-mode danger_full_access --ai-reasoning-effort high
262
+ 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
263
+ 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
264
264
  metheus-governance-mcp-cli bot set-default --provider telegram --bot-key main --non-interactive true
265
265
  metheus-governance-mcp-cli bot migrate --provider telegram --bot-key main --server-bot-id <server_bot_uuid> --bot-name <telegram_username> --role-profile monitor --ai-client codex --ai-permission-mode read_only --ai-reasoning-effort low --non-interactive true
266
266
  metheus-governance-mcp-cli bot remove --provider telegram --bot-key main --non-interactive true
@@ -624,12 +624,21 @@ function telegramEntryDisplayName(entry) {
624
624
  return String(current.key || "").trim() || "(unnamed)";
625
625
  }
626
626
 
627
+ function displayLocalAIClientName(clientName) {
628
+ const normalized = String(clientName || "").trim().toLowerCase();
629
+ if (normalized === "codex" || normalized === "gpt") return "GPT";
630
+ if (normalized === "claude") return "Claude";
631
+ if (normalized === "gemini") return "Gemini";
632
+ if (normalized === "sample") return "Sample";
633
+ return String(clientName || "").trim();
634
+ }
635
+
627
636
  function telegramEntryDisplayDescription(entry) {
628
637
  const current = safeObject(entry);
629
638
  const detail = [
630
639
  current.key ? `key:${current.key}` : "",
631
640
  current.serverBotID ? `server:${current.serverBotID}` : "",
632
- current.client ? `AI:${current.client}` : "",
641
+ current.client ? `AI:${displayLocalAIClientName(current.client)}` : "",
633
642
  ].filter(Boolean);
634
643
  return detail.join(" ");
635
644
  }
@@ -936,7 +945,7 @@ function renderBotListPayload(provider, state, deps) {
936
945
  function formatRoleProfileOutputLine(profile) {
937
946
  const current = safeObject(profile);
938
947
  return [
939
- current.client ? `client=${current.client}` : "client=(blank)",
948
+ current.client ? `client=${displayLocalAIClientName(current.client)}` : "client=(blank)",
940
949
  current.model ? `model=${current.model}` : "model=(blank)",
941
950
  current.permissionMode ? `permission=${current.permissionMode}` : "permission=(blank)",
942
951
  current.reasoningEffort ? `reasoning=${current.reasoningEffort}` : "reasoning=(blank)",
@@ -1056,7 +1065,7 @@ function printBotList(provider, state, deps) {
1056
1065
  ` username: ${entry.username ? `@${entry.username}` : "-"}`,
1057
1066
  ` token: ${entry.token ? maskSecret(entry.token) : "-"}`,
1058
1067
  ` role_profile: ${entry.roleProfile || "-"}`,
1059
- ` ai_client: ${entry.client || "-"}`,
1068
+ ` ai_client: ${entry.client ? displayLocalAIClientName(entry.client) : "-"}`,
1060
1069
  ` model: ${entry.model || "-"}`,
1061
1070
  ` permission_mode: ${entry.permissionMode || "-"}`,
1062
1071
  ` reasoning_effort: ${entry.reasoningEffort || "-"}`,
@@ -1084,7 +1093,7 @@ function printBotShow(provider, state, entry, deps, extras = {}) {
1084
1093
  process.stdout.write(` username: ${selectedEntry.username ? `@${selectedEntry.username}` : "-"}\n`);
1085
1094
  process.stdout.write(` token: ${selectedEntry.token ? maskSecret(selectedEntry.token) : "(not configured)"}\n`);
1086
1095
  process.stdout.write(` role_profile: ${selectedEntry.roleProfile || "-"}\n`);
1087
- process.stdout.write(` ai_client: ${selectedEntry.client || "-"}\n`);
1096
+ process.stdout.write(` ai_client: ${selectedEntry.client ? displayLocalAIClientName(selectedEntry.client) : "-"}\n`);
1088
1097
  process.stdout.write(` ai_model: ${selectedEntry.model || "-"}\n`);
1089
1098
  process.stdout.write(` permission_mode: ${selectedEntry.permissionMode || "-"}\n`);
1090
1099
  process.stdout.write(` reasoning_effort: ${selectedEntry.reasoningEffort || "-"}\n`);
@@ -1442,7 +1451,7 @@ async function promptAIClient(ui, deps, defaultValue = "") {
1442
1451
  const clients = ensureArray(deps.supportedLocalAIClients || []);
1443
1452
  const options = [
1444
1453
  { value: "", label: "(blank)", description: "leave AI client empty" },
1445
- ...clients.map((client) => ({ value: client, label: client })),
1454
+ ...clients.map((client) => ({ value: client, label: displayLocalAIClientName(client) || client })),
1446
1455
  ];
1447
1456
  const selectedIndex = Math.max(0, options.findIndex((item) => item.value === String(defaultValue || "").trim()));
1448
1457
  const selected = await promptChoice(ui, "Select AI client", options, { defaultIndex: selectedIndex });
@@ -1453,18 +1462,21 @@ function suggestedAIModelsForClient(clientName) {
1453
1462
  const normalizedClient = String(clientName || "").trim().toLowerCase();
1454
1463
  if (normalizedClient === "codex") {
1455
1464
  return [
1456
- { value: "gpt-5-codex", label: "gpt-5-codex", description: "recommended Codex model" },
1465
+ { value: "GPT-5.4", label: "GPT-5.4", description: "recommended GPT model" },
1466
+ { value: "GPT-5.3-CODEX", label: "GPT-5.3-CODEX", description: "stable GPT codex-style model" },
1467
+ { value: "GPT-5.3-CODEX-Spark", label: "GPT-5.3-CODEX-Spark", description: "faster GPT codex-style model" },
1457
1468
  ];
1458
1469
  }
1459
1470
  if (normalizedClient === "claude") {
1460
1471
  return [
1461
- { value: "claude-sonnet-4", label: "claude-sonnet-4", description: "recommended Claude model" },
1462
- { value: "claude-3.7-sonnet", label: "claude-3.7-sonnet", description: "older Claude Sonnet variant" },
1472
+ { value: "Sonnet 4.6r", label: "Sonnet 4.6r", description: "recommended Claude Sonnet model" },
1473
+ { value: "Haiku 4.5", label: "Haiku 4.5", description: "faster Claude Haiku model" },
1474
+ { value: "Opus 4.6", label: "Opus 4.6", description: "highest-capability Claude model" },
1463
1475
  ];
1464
1476
  }
1465
1477
  if (normalizedClient === "gemini") {
1466
1478
  return [
1467
- { value: "gemini-2.5-pro", label: "gemini-2.5-pro", description: "recommended Gemini model" },
1479
+ { value: "Gemini 3.1 Pro", label: "Gemini 3.1 Pro", description: "recommended Gemini model" },
1468
1480
  ];
1469
1481
  }
1470
1482
  if (normalizedClient === "sample") {
@@ -1607,7 +1619,7 @@ function currentRoleProfileState(roleName, deps) {
1607
1619
  function formatRoleProfileSummary(profile) {
1608
1620
  const current = safeObject(profile);
1609
1621
  return [
1610
- current.client ? `client:${current.client}` : "client:(blank)",
1622
+ current.client ? `client:${displayLocalAIClientName(current.client)}` : "client:(blank)",
1611
1623
  current.model ? `model:${current.model}` : "model:(blank)",
1612
1624
  current.permissionMode ? `permission:${current.permissionMode}` : "permission:(blank)",
1613
1625
  current.reasoningEffort ? `reasoning:${current.reasoningEffort}` : "reasoning:(blank)",
@@ -1937,7 +1949,7 @@ async function buildTelegramEntrySelectionRows(entries, flags, deps) {
1937
1949
  const descriptionParts = [
1938
1950
  current.key ? `local:${current.key}` : "",
1939
1951
  current.serverBotID ? `server:${current.serverBotID}` : "",
1940
- current.client ? `AI:${current.client}` : "",
1952
+ current.client ? `AI:${displayLocalAIClientName(current.client)}` : "",
1941
1953
  ].filter(Boolean);
1942
1954
  return {
1943
1955
  value: current.key,
@@ -2411,7 +2423,7 @@ async function verifyProviderEntry(ui, provider, flags, deps) {
2411
2423
  provider === "telegram" ? `bot_key: ${envConfig.botKey || "-"}` : "",
2412
2424
  provider === "telegram" ? `server_bot_id: ${envConfig.serverBotID || "-"}` : "",
2413
2425
  provider === "telegram" ? `role_profile: ${envConfig.roleProfile || "-"}` : "",
2414
- provider === "telegram" ? `ai_client: ${envConfig.client || "-"}` : "",
2426
+ provider === "telegram" ? `ai_client: ${envConfig.client ? displayLocalAIClientName(envConfig.client) : "-"}` : "",
2415
2427
  provider === "telegram" ? `ai_model: ${envConfig.model || "-"}` : "",
2416
2428
  provider === "telegram" ? `permission_mode: ${envConfig.permissionMode || "-"}` : "",
2417
2429
  provider === "telegram" ? `reasoning_effort: ${envConfig.reasoningEffort || "-"}` : "",
@@ -358,6 +358,9 @@ function runSampleAdapter(payload) {
358
358
 
359
359
  export function normalizeLocalAIClientName(rawValue, fallback = DEFAULT_LOCAL_AI_CLIENT) {
360
360
  const value = String(rawValue || "").trim().toLowerCase();
361
+ if (["gpt", "openai-gpt", "openai"].includes(value)) {
362
+ return "codex";
363
+ }
361
364
  if (SUPPORTED_LOCAL_AI_CLIENTS.includes(value)) {
362
365
  return value;
363
366
  }
@@ -364,14 +364,14 @@ export async function runSelftestBotCommands(push, deps) {
364
364
  "3", // select role to edit: worker
365
365
  "2", // worker: edit settings
366
366
  "3", // worker AI client: claude
367
- "2", // worker AI model: claude-sonnet-4
367
+ "2", // worker AI model: Sonnet 4.6r
368
368
  "4", // worker permission: danger_full_access
369
369
  "4", // worker reasoning: high
370
370
  "y", // edit another role
371
371
  "3", // select role to edit: approval
372
372
  "2", // approval: edit settings
373
373
  "4", // approval AI client: gemini
374
- "2", // approval AI model: gemini-2.5-pro
374
+ "2", // approval AI model: Gemini 3.1 Pro
375
375
  "4", // approval permission: danger_full_access
376
376
  "4", // approval reasoning: high
377
377
  "n", // stop editing roles
@@ -388,13 +388,13 @@ export async function runSelftestBotCommands(push, deps) {
388
388
  const groupedRunnerConfigPath = path.join(tempHome, ".metheus", "bot-runner.json");
389
389
  const groupedRunnerConfig = readJSON(fs.readFileSync(groupedRunnerConfigPath, "utf8"));
390
390
  push(
391
- "bot_edit_grouped_server_roles_updates_role_profiles",
391
+ "bot_edit_grouped_server_roles_updates_role_profiles",
392
392
  String(safeObject(safeObject(groupedRunnerConfig.role_profiles || {}).worker).client || "") === "claude"
393
- && String(safeObject(safeObject(groupedRunnerConfig.role_profiles || {}).worker).model || "") === "claude-sonnet-4"
393
+ && String(safeObject(safeObject(groupedRunnerConfig.role_profiles || {}).worker).model || "") === "Sonnet 4.6r"
394
394
  && String(safeObject(safeObject(groupedRunnerConfig.role_profiles || {}).worker).permission_mode || "") === "danger_full_access"
395
395
  && String(safeObject(safeObject(groupedRunnerConfig.role_profiles || {}).worker).reasoning_effort || "") === "high"
396
396
  && String(safeObject(safeObject(groupedRunnerConfig.role_profiles || {}).approval).client || "") === "gemini"
397
- && String(safeObject(safeObject(groupedRunnerConfig.role_profiles || {}).approval).model || "") === "gemini-2.5-pro",
397
+ && String(safeObject(safeObject(groupedRunnerConfig.role_profiles || {}).approval).model || "") === "Gemini 3.1 Pro",
398
398
  `worker=${JSON.stringify(safeObject(safeObject(groupedRunnerConfig.role_profiles || {}).worker))} approval=${JSON.stringify(safeObject(safeObject(groupedRunnerConfig.role_profiles || {}).approval))}`,
399
399
  );
400
400
 
@@ -503,7 +503,7 @@ export async function runSelftestBotCommands(push, deps) {
503
503
  "2", // change AI client
504
504
  "4", // gemini
505
505
  "2", // change AI model
506
- "2", // gemini model: gemini-2.5-pro
506
+ "2", // gemini model: Gemini 3.1 Pro
507
507
  "2", // change permission mode
508
508
  "3", // workspace_write
509
509
  "2", // change reasoning effort
@@ -522,7 +522,7 @@ export async function runSelftestBotCommands(push, deps) {
522
522
  push(
523
523
  "bot_edit_guided_prompts_update_ai_binding_fields",
524
524
  String(guidedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_CLIENT || "") === "gemini"
525
- && String(guidedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_MODEL || "") === "gemini-2.5-pro"
525
+ && String(guidedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_MODEL || "") === "Gemini 3.1 Pro"
526
526
  && String(guidedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_PERMISSION_MODE || "") === "workspace_write"
527
527
  && String(guidedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_REASONING_EFFORT || "") === "medium",
528
528
  `client=${String(guidedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_CLIENT || "")} model=${String(guidedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_MODEL || "")}`,
@@ -537,7 +537,7 @@ export async function runSelftestBotCommands(push, deps) {
537
537
  "--non-interactive", "true",
538
538
  "--token", "selftest-edited-token",
539
539
  "--client", "claude",
540
- "--model", "claude-3.7-sonnet",
540
+ "--model", "Sonnet 4.6r",
541
541
  "--permission-mode", "workspace_write",
542
542
  "--reasoning-effort", "medium",
543
543
  ],
@@ -548,7 +548,7 @@ export async function runSelftestBotCommands(push, deps) {
548
548
  "bot_edit_updates_ai_binding_fields",
549
549
  String(editedState.TELEGRAM_BOT_MONITORSELFTESTBOT_TOKEN || "") === "selftest-edited-token"
550
550
  && String(editedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_CLIENT || "") === "claude"
551
- && String(editedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_MODEL || "") === "claude-3.7-sonnet"
551
+ && String(editedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_MODEL || "") === "Sonnet 4.6r"
552
552
  && String(editedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_PERMISSION_MODE || "") === "workspace_write"
553
553
  && String(editedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_REASONING_EFFORT || "") === "medium",
554
554
  `client=${String(editedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_CLIENT || "")} model=${String(editedState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_MODEL || "")}`,
@@ -683,8 +683,8 @@ export async function runSelftestBotCommands(push, deps) {
683
683
  "--timeout-seconds", "5",
684
684
  "--server-bot-id", mock.bots[0].id,
685
685
  "--token", "selftest-main-token",
686
- "--ai-client", "codex",
687
- "--ai-model", "gpt-5-codex",
686
+ "--ai-client", "gpt",
687
+ "--ai-model", "GPT-5.4",
688
688
  "--ai-permission-mode", "read_only",
689
689
  "--ai-reasoning-effort", "low",
690
690
  "--verify", "true",
@@ -697,7 +697,7 @@ export async function runSelftestBotCommands(push, deps) {
697
697
  String(aliasAddState.TELEGRAM_BOT_MONITORSELFTESTBOT_SERVER_BOT_ID || "") === mock.bots[0].id
698
698
  && String(aliasAddState.TELEGRAM_BOT_MONITORSELFTESTBOT_USERNAME || "") === ""
699
699
  && String(aliasAddState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_CLIENT || "") === "codex"
700
- && String(aliasAddState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_MODEL || "") === "gpt-5-codex"
700
+ && String(aliasAddState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_MODEL || "") === "GPT-5.4"
701
701
  && String(aliasAddState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_PERMISSION_MODE || "") === "read_only"
702
702
  && String(aliasAddState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_REASONING_EFFORT || "") === "low",
703
703
  `client=${String(aliasAddState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_CLIENT || "")} model=${String(aliasAddState.TELEGRAM_BOT_MONITORSELFTESTBOT_AI_MODEL || "")}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metheus-governance-mcp-cli",
3
- "version": "0.2.80",
3
+ "version": "0.2.82",
4
4
  "description": "Metheus Governance MCP CLI (setup + stdio proxy)",
5
5
  "type": "module",
6
6
  "files": [