patchcord 0.5.1 → 0.5.2
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/.claude-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/skills/subscribe/SKILL.md +25 -12
package/package.json
CHANGED
|
@@ -68,13 +68,19 @@ then the script is at
|
|
|
68
68
|
description: "patchcord realtime listener (<agent>@<ns>)",
|
|
69
69
|
persistent: true,
|
|
70
70
|
timeout_ms: 3600000,
|
|
71
|
-
command: "exec node \"<absolute-path-to-subscribe.mjs>\" 2>&1 | grep --line-buffered
|
|
71
|
+
command: "exec node \"<absolute-path-to-subscribe.mjs>\" 2>&1 | grep --line-buffered '^PATCHCORD:'"
|
|
72
72
|
)
|
|
73
73
|
```
|
|
74
|
-
The
|
|
75
|
-
(
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
The filter is deliberately narrow: **only** `PATCHCORD:` lines
|
|
75
|
+
(actual message arrivals) become notifications. Everything else the
|
|
76
|
+
script writes — `connected`, `token refreshed`, `cwd=...`,
|
|
77
|
+
`agent=...`, `reconnecting in Nms` — is plumbing the user doesn't
|
|
78
|
+
need to see. Those lines still land in Monitor's output file, so you
|
|
79
|
+
can Read them on demand if something looks off.
|
|
80
|
+
|
|
81
|
+
Crash detection is handled automatically by Monitor itself: when the
|
|
82
|
+
`node` process exits, you get a built-in "stream ended" task
|
|
83
|
+
notification with the exit code. No filter needed for that.
|
|
78
84
|
|
|
79
85
|
6. **Tell the user one short line:**
|
|
80
86
|
"Patchcord listener active — I'll pick up new messages as they arrive."
|
|
@@ -97,18 +103,25 @@ There is no `/patchcord:unsubscribe` command. Tell the user either:
|
|
|
97
103
|
- Run `kill $(cat /tmp/patchcord_subscribe_<namespace>_<agent>.pid)` in
|
|
98
104
|
a terminal.
|
|
99
105
|
|
|
100
|
-
# If
|
|
106
|
+
# If the Monitor stream ends
|
|
101
107
|
|
|
102
|
-
|
|
103
|
-
|
|
108
|
+
That means the subscribe process exited. Before telling the user
|
|
109
|
+
anything, Read the Monitor output file (the path is in the stream-end
|
|
110
|
+
task notification) to see the last stderr lines. The concrete failure
|
|
111
|
+
strings:
|
|
104
112
|
|
|
105
113
|
- `no .mcp.json in <cwd>` — session is not in a patchcord project dir.
|
|
106
|
-
- `token rejected` — bearer in `.mcp.json` is bad;
|
|
107
|
-
dashboard.
|
|
114
|
+
- `token rejected (HTTP 401|403)` — bearer in `.mcp.json` is bad;
|
|
115
|
+
regenerate from the dashboard.
|
|
108
116
|
- `server not configured for realtime` — server hasn't had
|
|
109
117
|
`SUPABASE_JWT_SECRET` / `SUPABASE_ANON_KEY` set. Self-hosted without
|
|
110
118
|
Supabase does not support this feature yet.
|
|
111
119
|
- `namespace not owned` — the token's namespace lost its owner row;
|
|
112
120
|
regenerate from the dashboard.
|
|
113
|
-
- `already running (pid N)` — pidfile guard tripped.
|
|
114
|
-
is active. Report and stop.
|
|
121
|
+
- `already running (pid N)` (exit code 2) — pidfile guard tripped.
|
|
122
|
+
Another subscribe is active. Report and stop.
|
|
123
|
+
|
|
124
|
+
Report the specific cause to the user, do not loop or retry. If the
|
|
125
|
+
process exited cleanly after many successful reconnects with no error
|
|
126
|
+
line, that's either a session close or the user killed it — no action
|
|
127
|
+
needed.
|