metheus-governance-mcp-cli 0.2.52 → 0.2.54

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
@@ -20,23 +20,54 @@ Compatibility note: legacy command alias `metheus-governance-mcp` is still suppo
20
20
  npm install -g metheus-governance-mcp-cli@latest
21
21
  ```
22
22
 
23
- Install creates a local Telegram settings template here:
23
+ Install creates local provider settings templates here:
24
24
 
25
25
  - `~/.metheus/telegram.env`
26
+ - `~/.metheus/slack.env`
27
+ - `~/.metheus/kakaotalk.env`
28
+ - `~/.metheus/bot-runner.json`
26
29
 
27
- This file is for the local Telegram bot secret only.
30
+ These files are for local provider bot secrets only.
28
31
 
29
32
  - Store locally:
30
33
  - `TELEGRAM_BOT_TOKEN`
31
- - Server-side Metheus stores project Telegram destination metadata separately:
32
- - `chat_id`
34
+ - `SLACK_BOT_TOKEN`
35
+ - `KAKAOTALK_BOT_TOKEN`
36
+ - Server-side Metheus stores project chat destination metadata separately:
37
+ - provider
38
+ - `chat_id` / channel / room identifier
33
39
  - label / active state
34
- - Do not put project `chat_id` in the local Telegram env file.
40
+ - Do not put project chat destination identifiers in local env files.
35
41
 
36
- Example template:
42
+ Example templates:
37
43
 
38
44
  ```env
45
+ # ~/.metheus/telegram.env
39
46
  TELEGRAM_BOT_TOKEN=
47
+
48
+ # ~/.metheus/slack.env
49
+ SLACK_BOT_TOKEN=
50
+
51
+ # ~/.metheus/kakaotalk.env
52
+ KAKAOTALK_BOT_TOKEN=
53
+ ```
54
+
55
+ Runner template:
56
+
57
+ ```json
58
+ {
59
+ "version": 1,
60
+ "routes": [
61
+ {
62
+ "name": "telegram-monitor",
63
+ "enabled": false,
64
+ "project_id": "<project_uuid>",
65
+ "provider": "telegram",
66
+ "role": "monitor",
67
+ "command": "metheus-governance-mcp-cli local-bot-bridge --client codex --no-update"
68
+ }
69
+ ]
70
+ }
40
71
  ```
41
72
 
42
73
  ## One command bootstrap (recommended)
@@ -69,11 +100,33 @@ Recommended for Codex/Claude/Gemini/Antigravity/Cursor multi-workspace sessions:
69
100
  metheus-governance-mcp-cli setup --project-id <project_uuid> --ctxpack-key "<ctxpack_key>" --base-url https://metheus.gesiaplatform.com --workspace-dir auto
70
101
  ```
71
102
 
72
- `setup` also ensures the local Telegram template exists:
103
+ `setup` also ensures local provider templates exist:
73
104
 
74
105
  - `~/.metheus/telegram.env`
106
+ - `~/.metheus/slack.env`
107
+ - `~/.metheus/kakaotalk.env`
108
+ - `~/.metheus/bot-runner.json`
109
+
110
+ Fill only provider bot tokens 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.
111
+
112
+ `~/.metheus/bot-runner.json` is the local automation profile for:
113
+ - which project to watch
114
+ - which provider/role bot profile to use
115
+ - which local AI command to run on new archived chat messages
75
116
 
76
- Fill only the bot token locally. Project Telegram `chat_id` destinations should be managed on the Metheus server as project Telegram destinations, not as local env values and not inside Chat Hooks.
117
+ Built-in helper command:
118
+
119
+ ```bash
120
+ metheus-governance-mcp-cli local-bot-bridge --client codex --no-update
121
+ ```
122
+
123
+ Supported `--client` values:
124
+ - `codex`
125
+ - `claude`
126
+ - `gemini`
127
+ - `sample`
128
+
129
+ Use `sample` first for smoke tests before switching to a real AI client.
77
130
 
78
131
  Gemini CLI note:
79
132
  - `gemini mcp` commands require Gemini auth to be configured first (`GEMINI_API_KEY` or `~/.gemini/settings.json` auth).
@@ -105,7 +158,8 @@ metheus-governance-mcp-cli doctor --project-id <project_uuid> --base-url https:/
105
158
 
106
159
  Checks:
107
160
  - auth token status (+ auto refresh attempt)
108
- - local Telegram env token presence
161
+ - local provider env template presence
162
+ - local provider token presence for active project destinations
109
163
  - codex/claude/gemini/antigravity/cursor registration state
110
164
  - gateway `tools/list` reachability
111
165
  - `project.summary` access
@@ -113,10 +167,60 @@ Checks:
113
167
  - smoke calls: `workitem.list`, `evidence.list`, `decision.list`
114
168
 
115
169
  Direct bot posting:
116
- - `me.send-bot-message` uses the local `TELEGRAM_BOT_TOKEN` from `~/.metheus/telegram.env`
170
+ - `me.send-bot-message` uses local provider tokens from `~/.metheus/<provider>.env`
117
171
  - it does not use a server-stored bot token
118
- - the destination `chat_id` is resolved from the current project's saved Chat Destinations on the Metheus server
119
- - if multiple active Telegram destinations exist for the project, pass `destination_id` or `destination_label`
172
+ - the destination identifier is resolved from the current project's saved Chat Destinations on the Metheus server
173
+ - if multiple active destinations exist for the same provider, pass `destination_id` or `destination_label`
174
+ - direct local delivery is implemented today for:
175
+ - Telegram
176
+ - Slack
177
+ - KakaoTalk profiles and destinations can be stored now, but direct local delivery is not implemented yet
178
+
179
+ ## Local bot runner
180
+
181
+ The local runner closes the loop:
182
+
183
+ 1. provider bot receives a room message
184
+ 2. Metheus archives the message into Governance discussion comments
185
+ 3. local runner reads new archived comments
186
+ 4. local AI command generates a reply
187
+ 5. CLI sends the reply back through `me.send-bot-message`
188
+ 6. the sent reply is mirrored back into the archive
189
+
190
+ Commands:
191
+
192
+ ```bash
193
+ metheus-governance-mcp-cli runner once
194
+ metheus-governance-mcp-cli runner start
195
+ ```
196
+
197
+ Common flags:
198
+
199
+ ```bash
200
+ metheus-governance-mcp-cli runner once --project-id <project_uuid> --provider telegram --role monitor --command "node C:\\path\\to\\my-runner.js"
201
+ metheus-governance-mcp-cli runner start --project-id <project_uuid> --provider telegram --role monitor --command "python C:\\path\\to\\reply.py" --poll-interval-ms 5000
202
+ ```
203
+
204
+ Recommended production path:
205
+ - keep provider bot token in `~/.metheus/<provider>.env`
206
+ - keep project room identifier in server-side Chat Destinations
207
+ - keep automation route config in `~/.metheus/bot-runner.json`
208
+
209
+ Runner command contract:
210
+ - stdin: JSON payload containing project, destination, trigger message, and recent context comments
211
+ - stdout:
212
+ - plain text reply, or
213
+ - JSON object like `{"reply":"...","reply_to_message_id":123}`, or
214
+ - JSON skip result like `{"skip":true,"reason":"not actionable"}`
215
+
216
+ Notes:
217
+ - `runner once` processes the most recent pending archived inbound message
218
+ - `runner start` keeps polling and stores per-route cursor state in `~/.metheus/bot-runner-state.json`
219
+ - first start primes the cursor to the latest inbound message and does not reply to old backlog
220
+ - `local-bot-bridge` reads stdin JSON from the runner and can call Codex/Claude/Gemini for you
221
+ - today this automation path is implemented for Telegram end-to-end
222
+ - Slack can use direct local send, but automatic inbound runner flow is not completed yet
223
+ - KakaoTalk config can be stored now, but direct send/runner flow is not implemented yet
120
224
 
121
225
  ## Use in MCP
122
226