patchcord 0.5.127 → 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.
- package/.claude-plugin/plugin.json +1 -1
- package/bin/patchcord.mjs +10 -4
- package/package.json +1 -1
- package/scripts/subscribe.mjs +11 -12
package/bin/patchcord.mjs
CHANGED
|
@@ -1690,10 +1690,15 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1690
1690
|
// (~/.gemini/settings.json) while Antigravity is PER-PROJECT
|
|
1691
1691
|
// (<project>/.agents/mcp_config.json). So the shared global skill must be
|
|
1692
1692
|
// seeded ONLY off Gemini CLI's global config — never off an Antigravity config.
|
|
1693
|
-
// A patchcord entry in the global ~/.gemini/antigravity(-cli)/mcp_config.json
|
|
1694
|
-
//
|
|
1695
|
-
//
|
|
1696
|
-
//
|
|
1693
|
+
// A patchcord entry in the global ~/.gemini/antigravity(-cli)/mcp_config.json or
|
|
1694
|
+
// ~/.gemini/config/mcp_config.json (Antigravity's post-migration global path —
|
|
1695
|
+
// confirmed live via the sibling ~/.gemini/config/.migrated marker; the older
|
|
1696
|
+
// two paths are its predecessors) is a leaked per-project token: it makes agy
|
|
1697
|
+
// load the patchcord MCP (and its "check inbox first" instruction) in EVERY
|
|
1698
|
+
// project, and it kept this skill seeded everywhere. We strip that leak below
|
|
1699
|
+
// and gate the skill on Gemini only. Keep all three paths in sync — a prior
|
|
1700
|
+
// fix (a36809c) covered only the first two and missed the migrated path,
|
|
1701
|
+
// leaving leaks there uncleaned.
|
|
1697
1702
|
if (existsSync(join(HOME, ".gemini"))) {
|
|
1698
1703
|
// Remove any leaked patchcord server from Antigravity's GLOBAL configs so a
|
|
1699
1704
|
// per-project token stops hijacking every agy session. Preserve other MCP
|
|
@@ -1701,6 +1706,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1701
1706
|
for (const agGlobal of [
|
|
1702
1707
|
join(HOME, ".gemini", "antigravity", "mcp_config.json"),
|
|
1703
1708
|
join(HOME, ".gemini", "antigravity-cli", "mcp_config.json"),
|
|
1709
|
+
join(HOME, ".gemini", "config", "mcp_config.json"),
|
|
1704
1710
|
]) {
|
|
1705
1711
|
if (!existsSync(agGlobal)) continue;
|
|
1706
1712
|
try {
|
package/package.json
CHANGED
package/scripts/subscribe.mjs
CHANGED
|
@@ -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
|
-
//
|
|
430
|
-
//
|
|
431
|
-
//
|
|
432
|
-
//
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
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(
|