patchcord 0.5.128 → 0.5.129

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "patchcord",
3
3
  "description": "Cross-machine agent messaging. Messages from other agents land in the inbox and wake the agent to reply.",
4
- "version": "0.5.128",
4
+ "version": "0.5.129",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.5.128",
3
+ "version": "0.5.129",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "scripts": {
6
6
  "version": "node scripts/sync-plugin-version.mjs && git add .claude-plugin/plugin.json"
@@ -426,18 +426,17 @@ function runOnce(ticket, baseUrl, token, refreshTicket) {
426
426
  try {
427
427
  const fresh = await refreshTicket();
428
428
  currentJwt = fresh.jwt;
429
- // Socket-level auth update (phoenix topic) what Supabase
430
- // actually uses for the connection's own JWT expiry check.
431
- // Without this, the server closes the socket at the original
432
- // JWT's exp regardless of per-channel updates.
433
- ws.send(
434
- JSON.stringify({
435
- topic: "phoenix",
436
- event: "access_token",
437
- payload: { access_token: currentJwt },
438
- ref: String(ref++),
439
- })
440
- );
429
+ // NO socket-level "phoenix" topic update. Verified live against
430
+ // production Realtime: the reserved "phoenix" topic has no joined
431
+ // channel behind it, so any non-heartbeat event sent there
432
+ // including access_token is rejected with a phx_reply
433
+ // {status:"error", reason:"unmatched topic"}, every time. Per
434
+ // Supabase's own protocol, access_token is a per-channel-only
435
+ // event; there is no socket-level refresh mechanism. Sending it
436
+ // here previously triggered that error on every refresh cycle
437
+ // (~8min), which the generic phx_reply-error handler below treated
438
+ // as fatal and force-reconnected on — a full disconnect/rejoin
439
+ // cycle every ~8 minutes, forever, on every subscribe listener.
441
440
  // Channel-level updates — matches supabase-js's setAuth() pattern.
442
441
  for (const topic of fresh.topics) {
443
442
  ws.send(