@paigy/mcp 0.40.17 → 0.40.20

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
@@ -215,19 +215,48 @@ script and branch on `$PAIGY_EVENT` there:
215
215
  codex exec "Paigy goal $PAIGY_GOAL_ID. claim_goal it first. The user said: $PAIGY_TEXT. Reply with contact when done."
216
216
  ```
217
217
 
218
- ## Stalled work (Claude Code stop hook)
218
+ ## Stalled work (turn-end hook — Claude Code, Codex, Gemini CLI, Antigravity)
219
219
 
220
220
  An agent that goes quiet leaves its Goals behind. Three things hand it that work back, all
221
221
  reading one rule (no progress for 3 days, `COLD_AFTER_MS`): `check_replies` lists it under
222
222
  `stalled`, `paigy-listen` carries it in `PAIGY_WORK` (and launches for it on boot), and this
223
- hook holds a Claude Code session's stop once a day to list it:
223
+ hook holds a session's turn end once a day to list it. One program, four tools:
224
+
225
+ **Claude Code** (`~/.claude/settings.json`) — installed by the paigy plugin:
224
226
 
225
227
  ```json
226
228
  { "hooks": { "Stop": [{ "hooks": [{ "type": "command", "command": "npx -y -p @paigy/mcp paigy-stalled" }] }] } }
227
229
  ```
228
230
 
231
+ **Codex** (`~/.codex/config.toml`) — its `Stop` event takes the same `{ decision, reason }`, so
232
+ the same program serves it. Written for you when you pair from another tool:
233
+
234
+ ```toml
235
+ [[hooks.Stop]]
236
+
237
+ [[hooks.Stop.hooks]]
238
+ type = "command"
239
+ command = "npx -y -p @paigy/mcp@latest paigy-stalled --agent codex"
240
+ timeout = 60
241
+ ```
242
+
243
+ **Gemini CLI / Antigravity** (`~/.gemini/settings.json`, `~/.gemini/antigravity-cli/settings.json`)
244
+ — the turn-end event there is `AfterAgent`, and the reminder also arrives as a `systemMessage`,
245
+ which is the field that event promises will reach somebody:
246
+
247
+ ```json
248
+ { "hooks": { "AfterAgent": [{ "matcher": "*", "hooks": [{ "name": "paigy-stalled", "type": "command",
249
+ "command": "npx -y -p @paigy/mcp@latest paigy-stalled --agent antigravity", "timeout": 60000 }] }] } }
250
+ ```
251
+
252
+ `--agent <slot>` is not optional outside Claude Code: a hook is not the MCP server, so it never
253
+ inherits the `PAIGY_AGENT` that server was registered with, and without the flag it reads this
254
+ session's own slot — a different identity, with no stalled work of its own. Pass the same value as
255
+ the tool's MCP registration (`codex`, `antigravity`, or whatever you set `PAIGY_AGENT` to).
256
+
229
257
  It is silent when nothing is stalled, when the stop is already being continued by a hook, and
230
- after it has reminded that session once today.
258
+ after it has reminded that session once today. Codex's older `notify` program is not a place for
259
+ this: it is spawned fire-and-forget with stdio null, so nothing it prints can reach the agent.
231
260
 
232
261
  ## Statusline (Claude Code)
233
262