patchcord 0.3.84 → 0.3.85

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.
Files changed (2) hide show
  1. package/bin/patchcord.mjs +21 -20
  2. package/package.json +1 -1
package/bin/patchcord.mjs CHANGED
@@ -391,30 +391,31 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
391
391
  const rlU = createRLU({ input: process.stdin, output: process.stdout });
392
392
  const askU = (q) => new Promise((resolve) => rlU.question(q, resolve));
393
393
 
394
- const updateAnswer = (await askU(` ${bold}Update ${existingToolName} agent? (y/N):${r} `)).trim().toLowerCase();
395
- if (updateAnswer === "y" || updateAnswer === "yes") {
396
- token = existingToken;
397
- if (existingIdentity) {
398
- identity = existingIdentity;
399
- const vResp = validateResp ? JSON.parse(validateResp) : {};
400
- clientType = vResp.client_type || "";
401
- choice = CLIENT_TYPE_MAP[clientType] || "";
402
- console.log(` ${green}✓${r} ${bold}${identity}${r} — token valid`);
403
- } else {
404
- console.log(` ${yellow}⚠${r} Token expired or invalid. Starting fresh setup.`);
405
- token = "";
406
- }
394
+ // Q1: Add another agent? (most likely reason to re-run installer)
395
+ const addAnswer = (await askU(` ${bold}Add another agent to this project? (y/N):${r} `)).trim().toLowerCase();
396
+ if (addAnswer === "y" || addAnswer === "yes") {
407
397
  rlU.close();
398
+ // Drop into browser connect flow — fresh setup for new agent
399
+ token = "";
408
400
  } else {
409
- // Offer to add a different tool
410
- const addAnswer = (await askU(` ${bold}Add another agent to this project? (y/N):${r} `)).trim().toLowerCase();
401
+ // Q2: Update existing agent?
402
+ const updateAnswer = (await askU(` ${bold}Update ${existingToolName} agent? (y/N):${r} `)).trim().toLowerCase();
411
403
  rlU.close();
412
- if (addAnswer === "y" || addAnswer === "yes") {
413
- // Drop into browser connect flow — don't reuse token, fresh setup
414
- token = "";
404
+ if (updateAnswer === "y" || updateAnswer === "yes") {
405
+ token = existingToken;
406
+ if (existingIdentity) {
407
+ identity = existingIdentity;
408
+ const vResp = validateResp ? JSON.parse(validateResp) : {};
409
+ clientType = vResp.client_type || "";
410
+ choice = CLIENT_TYPE_MAP[clientType] || "";
411
+ console.log(` ${green}✓${r} ${bold}${identity}${r} — token valid`);
412
+ } else {
413
+ console.log(` ${yellow}⚠${r} Token expired or invalid. Starting fresh setup.`);
414
+ token = "";
415
+ }
415
416
  } else {
416
- // Both N — nothing to do
417
- console.log(`\n ${dim}Nothing to update.${r}`);
417
+ // Both N — skills already updated by global setup, done
418
+ console.log(`\n ${dim}Skills updated.${r}`);
418
419
  process.exit(0);
419
420
  }
420
421
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.3.84",
3
+ "version": "0.3.85",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",