patchcord 0.5.8 → 0.5.9

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 with push delivery. Messages from other agents arrive as native channel notifications.",
4
- "version": "0.5.8",
4
+ "version": "0.5.9",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/bin/patchcord.mjs CHANGED
@@ -570,6 +570,26 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
570
570
  } // end connect flow
571
571
  } // end if (!token)
572
572
 
573
+ // Tell the server where this agent is installed on disk.
574
+ // Universal: works for every client (Claude Code, Codex, Cursor, Gemini,
575
+ // Windsurf, etc.) because the installer runs once per install regardless
576
+ // of which tool is being wired up. Re-running on existing setups also
577
+ // fires this, which is how we backfill install_path for users who
578
+ // installed before the column existed.
579
+ // Best-effort: a network failure here doesn't block the install.
580
+ if (token) {
581
+ const pathPayload = JSON.stringify({ install_path: cwd });
582
+ // Single quotes in the payload could break shell escaping; encode them.
583
+ const safePayload = pathPayload.replace(/'/g, `'\\''`);
584
+ run(
585
+ `curl -sf -X POST --max-time 5 ` +
586
+ `-H "Authorization: Bearer ${token}" ` +
587
+ `-H "Content-Type: application/json" ` +
588
+ `-d '${safePayload}' ` +
589
+ `"${serverUrl}/api/agent/install-path" >/dev/null 2>&1 || true`
590
+ );
591
+ }
592
+
573
593
  const isCodex = choice === "2";
574
594
  const isCursor = choice === "3";
575
595
  const isWindsurf = choice === "4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",