patchcord 0.5.35 → 0.5.37
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/package.json +1 -1
- package/scripts/subscribe.mjs +0 -3
- package/skills/inbox/SKILL.md +1 -0
- package/skills/subscribe/SKILL.md +13 -11
package/package.json
CHANGED
package/scripts/subscribe.mjs
CHANGED
|
@@ -383,9 +383,6 @@ function runOnce(ticket, baseUrl, token, refreshTicket) {
|
|
|
383
383
|
if (rec.namespace_id && !allowedNs.has(rec.namespace_id)) return;
|
|
384
384
|
// Only notify for messages addressed TO this agent — not our own outgoing replies.
|
|
385
385
|
if (rec.to_agent && rec.to_agent !== ticket.agent_id) return;
|
|
386
|
-
// Skip resolved-ack messages (reply with resolve=true). These are terminal
|
|
387
|
-
// replies — waking the agent would restart the ack loop.
|
|
388
|
-
if (rec.thread_resolved_at) return;
|
|
389
386
|
const from = rec.from_agent || "unknown";
|
|
390
387
|
process.stdout.write(`PATCHCORD: 1 new from ${from}\n`);
|
|
391
388
|
});
|
package/skills/inbox/SKILL.md
CHANGED
|
@@ -139,5 +139,6 @@ Named threads group related messages between a pair of agents. Use them for mult
|
|
|
139
139
|
- **Do not reply to acks.** "ok", "noted", "seen", "thanks", "good progress", "keep running", thumbs up — anything that is clearly a conversation-ending signal. Just read them and move on. If you must close the thread, use `reply(id, resolve=true)` with NO content. Never send a text reply to an ack.
|
|
140
140
|
- **resolve=true with ack-only content is an anti-pattern.** `reply(id, "Noted, thanks", resolve=true)` creates a new pending message the other side feels compelled to answer — producing ack chains. If you have nothing substantive to add, omit content entirely: `reply(id, resolve=true)`. Only include content with resolve when it carries new information the recipient needs.
|
|
141
141
|
- **When you receive an ack**, close it silently: `reply(id, resolve=true)`. No content. This stops the chain.
|
|
142
|
+
- **Messages with `thread_resolved_at` set are terminal.** The sender already closed the thread. Read the content, do not text-reply. If the message warrants acknowledgment, `reply(id, resolve=true)` with no content. Treating these as normal pending messages restarts the chain.
|
|
142
143
|
- MCP tools are cached at session start. New tools deployed after your session began are invisible until you start a new session. If a tool you expect is missing, this is why.
|
|
143
144
|
- Agent names change frequently. Do not memorize or hardcode them. Check inbox() for recent activity. When unsure which agent to message, ask the human.
|
|
@@ -11,20 +11,22 @@ User invoked /patchcord:subscribe — do NOT substitute `wait_for_message()`. Sp
|
|
|
11
11
|
|
|
12
12
|
# Start
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
1. **Drain the inbox first.** Call `mcp__patchcord__inbox`. If anything is pending, process it per the patchcord:inbox skill before continuing. Backlog can accumulate while no listener was up; subscribe must catch it.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
Monitor(
|
|
18
|
-
description: "patchcord realtime listener",
|
|
19
|
-
persistent: true,
|
|
20
|
-
timeout_ms: 3600000,
|
|
21
|
-
command: "exec npx patchcord subscribe"
|
|
22
|
-
)
|
|
23
|
-
```
|
|
16
|
+
2. **Spawn the listener under Monitor** (not Bash with run_in_background — Monitor turns each stdout line into a notification):
|
|
24
17
|
|
|
25
|
-
|
|
18
|
+
```
|
|
19
|
+
Monitor(
|
|
20
|
+
description: "patchcord realtime listener",
|
|
21
|
+
persistent: true,
|
|
22
|
+
timeout_ms: 3600000,
|
|
23
|
+
command: "exec npx patchcord subscribe"
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
`subscribe.mjs` handles its own pidfile guard — if another listener is already active for this agent it exits with code 2 and stderr `already running (pid N)`. Monitor catches the stream-end event; read the output file and report.
|
|
28
|
+
|
|
29
|
+
3. **Tell the user one line:** *"Patchcord listener active — I'll pick up new messages as they arrive."*
|
|
28
30
|
|
|
29
31
|
# When a notification fires
|
|
30
32
|
|