@paigy/mcp 0.40.23 → 0.40.25
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 +38 -23
- package/dist/{chunk-BNMMRKEY.js → chunk-2ROD77AW.js} +1 -1
- package/dist/{chunk-PR7ROBN4.js → chunk-EJYXBEWN.js} +959 -621
- package/dist/{chunk-JLRBZZNT.js → chunk-GHSB2VP6.js} +752 -517
- package/dist/chunk-RK5LT7NH.js +110 -0
- package/dist/{chunk-HKODQKUV.js → chunk-UAVXYNLV.js} +9 -9
- package/dist/{dist-B7AOS5TG.js → dist-NMHU2UNG.js} +19 -7
- package/dist/enable.js +3 -3
- package/dist/index.js +18 -7
- package/dist/listen.js +85 -17
- package/dist/onboard.js +4 -4
- package/dist/slot.js +1 -1
- package/dist/stalled.js +3 -3
- package/dist/statusline.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,7 +117,7 @@ Then pair: `PAIGY_AGENT=gemini npx -p @paigy/mcp@latest paigy-mcp-onboard`.
|
|
|
117
117
|
## Tools
|
|
118
118
|
|
|
119
119
|
One catalog, on every transport (2026-09-11): the agent tools are `AGENT_TOOLS` in
|
|
120
|
-
`packages/schema/src/tools.ts` —
|
|
120
|
+
`packages/schema/src/tools.ts` — who_is_working, contact, manage_goals, claim_goal,
|
|
121
121
|
get_goal, update_goal — and both this server and the hosted MCP
|
|
122
122
|
(`apps/api/src/mcp`) publish that list and dispatch it through the SDK's one `runTool`.
|
|
123
123
|
This server adds only onboard, pair and unpair, the tools that mint and delete the token
|
|
@@ -125,10 +125,12 @@ file this machine holds. See the [SDK contract](../../packages/sdk/README.md) fo
|
|
|
125
125
|
single-Goal start shape. Notification returns immediately. Call holds one cancellable
|
|
126
126
|
~45-second window here (the hosted transport returns after one read); continue with
|
|
127
127
|
contact({deliveryId}) without sending another ask. Durable Entries and accepted answers can
|
|
128
|
-
repeat on reads;
|
|
129
|
-
user started toward you, an answer relayed to something you asked, a handoff) without
|
|
130
|
-
consuming any of it, and claim_goal is the catch-up for
|
|
131
|
-
|
|
128
|
+
repeat on reads; contact with nothing to send receives what is addressed to you (a request the
|
|
129
|
+
user started toward you, an answer relayed to something you asked, a handoff, a question you owe) without
|
|
130
|
+
consuming any of it until you acknowledge it (`ackEventIds`), and claim_goal is the catch-up for
|
|
131
|
+
your own Goals. manage_goals creates, edits, assigns, organizes and closes work, a change at a
|
|
132
|
+
time. Bookkeeping (`operationId`, the manage request id, the revision an edit was read at) is
|
|
133
|
+
minted here, never asked of the model. Retired
|
|
132
134
|
reply-lease/ACK/work/callback tools and hidden notification aliases are rejected.
|
|
133
135
|
|
|
134
136
|
The standalone listener below is still a **legacy host and target-release blocker**.
|
|
@@ -154,7 +156,7 @@ wake channel and reads what is waiting on every nudge. Keep it alive past the te
|
|
|
154
156
|
with `paigy-listen --install` (launchd on macOS, systemd user unit on Linux;
|
|
155
157
|
`--uninstall` removes it).
|
|
156
158
|
|
|
157
|
-
The read is `
|
|
159
|
+
The read is `receive` (behind `contact({})`) — the open Deliveries addressed to this agent — and it
|
|
158
160
|
**consumes nothing**: no lease, no acknowledgement, and the same read twice returns the
|
|
159
161
|
same list. So the daemon hands the launcher what it found and stops there; claiming is
|
|
160
162
|
the agent's own first act (`claim_goal`), because the daemon shares this machine's
|
|
@@ -184,26 +186,39 @@ Goal" from "an empty id".
|
|
|
184
186
|
PAIGY_ON_WAKE='claude -p "Handle the Paigy work in $PAIGY_WORK — claim_goal first, and read a Goal you do not recognize with get_goal."' \
|
|
185
187
|
npx -y -p @paigy/mcp paigy-listen --install
|
|
186
188
|
|
|
187
|
-
# Codex
|
|
188
|
-
|
|
189
|
-
|
|
189
|
+
# Codex terminal session: no custom script and no new conversation.
|
|
190
|
+
# CODEX_THREAD_ID is inherited from the running session.
|
|
191
|
+
npx -y -p @paigy/mcp@latest paigy-listen --brief
|
|
190
192
|
```
|
|
191
193
|
|
|
192
194
|
### A session that starts listening (`listen`, #2265)
|
|
193
195
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
196
|
+
Run `listen` to obtain the exact background command for the current session. For Codex,
|
|
197
|
+
`paigy-listen` reads `CODEX_THREAD_ID`, checks that the installed `codex queue` supports
|
|
198
|
+
`--thread` and `--message`, then queues a wake into that existing conversation. It uses
|
|
199
|
+
argument arrays, never interpolates user text into a shell, and never starts another
|
|
200
|
+
conversation. Two threads in the same folder have separate listener marks and checkpoints.
|
|
201
|
+
Onboarding forwards the thread identifier into the MCP environment; `listen` forwards it
|
|
202
|
+
into the listener command explicitly. Re-running onboarding repairs an existing Paigy allowlist while preserving custom variables; restart the MCP server to inherit the repaired environment. An older slot-wide listener is reported as already receiving until deliberately stopped, so upgrades do not start a second subscriber.
|
|
203
|
+
|
|
204
|
+
`PAIGY_ON_WAKE` remains an explicit override with its original per-sweep behavior: an
|
|
205
|
+
existing script may ignore boot or timer events. Without a supported adapter, the listener
|
|
206
|
+
still prints events, but reports only `receiving`; a process being alive does not prove it
|
|
207
|
+
can resume an agent. `listening` with a ready adapter means the command is available, and
|
|
208
|
+
`lastQueuedAt` records its last successful exit. Neither claims that the agent read or
|
|
209
|
+
handled a reply. Queue errors are visible in listener output and in `listen` status.
|
|
210
|
+
|
|
211
|
+
Native Codex wakes coalesce unchanged backlog, including across listener restarts. The listener compares source Entry IDs and accepted Answer timestamps on the bounded list of pending review Goals; its own progress and claims are excluded. A later reply is new evidence even if its words are identical. Failed handoffs remain retryable
|
|
212
|
+
on the existing timer, next nudge or reconnect; discovery never claims or acknowledges
|
|
213
|
+
work. Queue commands are serialized, so a burst becomes one fresh discovery read after
|
|
214
|
+
an in-flight handoff. A command accepted just before a process crash may be queued again;
|
|
215
|
+
the resumed agent must still read and acknowledge actual evidence through Paigy.
|
|
216
|
+
|
|
217
|
+
A managed Paigy session carries `PAIGY_HARNESS` and keeps its existing delivery pump;
|
|
218
|
+
it does not start another listener. `PAIGY_SESSION_ID` binds API requests and alone does
|
|
219
|
+
not establish harness delivery. Other hosts need a supported wake command or a host that
|
|
220
|
+
actually surfaces watched-task output. Use a session listener for Codex, not `--install`:
|
|
221
|
+
the service is machine-wide and has no current conversation.
|
|
207
222
|
|
|
208
223
|
`$PAIGY_TEXT` is whatever the user said, expanded inside a shell command — keep it
|
|
209
224
|
quoted, as above. For anything longer than a one-liner, point `PAIGY_ON_WAKE` at a
|
|
@@ -218,7 +233,7 @@ codex exec "Paigy goal $PAIGY_GOAL_ID. claim_goal it first. The user said: $PAIG
|
|
|
218
233
|
## Stalled work (turn-end hook — Claude Code, Codex, Gemini CLI, Antigravity)
|
|
219
234
|
|
|
220
235
|
An agent that goes quiet leaves its Goals behind. Three things hand it that work back, all
|
|
221
|
-
reading one rule (no progress for 3 days, `COLD_AFTER_MS`): `
|
|
236
|
+
reading one rule (no progress for 3 days, `COLD_AFTER_MS`): `contact({})` lists it under
|
|
222
237
|
`stalled`, `paigy-listen` carries it in `PAIGY_WORK` (and launches for it on boot), and this
|
|
223
238
|
hook holds a session's turn end once a day to list it. One program, four tools:
|
|
224
239
|
|