patchcord 0.5.13 → 0.5.14

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.13",
4
+ "version": "0.5.14",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/bin/patchcord.mjs CHANGED
@@ -366,12 +366,23 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
366
366
  }
367
367
  rl.close();
368
368
  } else {
369
- // Check if patchcord is already configured — offer to update URL without re-auth
369
+ // Check if patchcord is already configured — offer to update URL without re-auth.
370
+ // When --tool=<slug> is set, we ONLY look at the config file that <slug>
371
+ // would itself write to. Other tools' existing configs in the same project
372
+ // are not a "we already have patchcord here" signal — the user is explicit
373
+ // about which tool they're setting up, the question "Add another agent?"
374
+ // makes no sense across tool boundaries (claude_code already configured
375
+ // doesn't change anything about installing codex).
370
376
  let existingToken = "";
371
377
  let existingConfigFile = "";
372
378
  const mcpJsonPath = join(cwd, ".mcp.json");
373
379
  const codexTomlPath = join(cwd, ".codex", "config.toml");
374
- if (existsSync(mcpJsonPath)) {
380
+
381
+ const slugForCheck = toolSlug ? toolSlug.replace(/-/g, "_") : "";
382
+ const checkMcpJson = !slugForCheck || slugForCheck === "claude_code";
383
+ const checkCodexToml = !slugForCheck || slugForCheck === "codex";
384
+
385
+ if (checkMcpJson && existsSync(mcpJsonPath)) {
375
386
  try {
376
387
  const existing = JSON.parse(readFileSync(mcpJsonPath, "utf-8"));
377
388
  const pt = existing?.mcpServers?.patchcord;
@@ -381,7 +392,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
381
392
  }
382
393
  } catch {}
383
394
  }
384
- if (!existingToken && existsSync(codexTomlPath)) {
395
+ if (!existingToken && checkCodexToml && existsSync(codexTomlPath)) {
385
396
  try {
386
397
  const content = readFileSync(codexTomlPath, "utf-8");
387
398
  const match = content.match(/Bearer\s+([^\s"]+)/);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.5.13",
3
+ "version": "0.5.14",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",