patchcord 0.5.38 → 0.5.40
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/bin/patchcord.mjs +7 -2
- package/package.json +1 -1
- package/scripts/subscribe.mjs +3 -0
package/bin/patchcord.mjs
CHANGED
|
@@ -815,12 +815,17 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
815
815
|
console.log(`\n ${green}✓${r} Browser opened.`);
|
|
816
816
|
} else {
|
|
817
817
|
console.log(`\n ${dim}Could not open browser. Open this URL manually:${r}`);
|
|
818
|
-
|
|
818
|
+
// Trailing space before the ANSI reset so terminal URL-detectors
|
|
819
|
+
// don't include any bytes of the reset escape into the URL boundary.
|
|
820
|
+
// (Bug seen 2026-05-13: a terminal clipped one hex char of the
|
|
821
|
+
// session_id producing a 31-char id; the trailing space prevents
|
|
822
|
+
// that ambiguity.)
|
|
823
|
+
console.log(`\n ${cyan}${connectUrl} ${r}\n`);
|
|
819
824
|
}
|
|
820
825
|
} else {
|
|
821
826
|
console.log(`\n ${dim}Can't open a browser on this machine.${r}`);
|
|
822
827
|
console.log(` ${dim}Open this URL on any device:${r}`);
|
|
823
|
-
console.log(`\n ${cyan}${connectUrl}${r}\n`);
|
|
828
|
+
console.log(`\n ${cyan}${connectUrl} ${r}\n`);
|
|
824
829
|
}
|
|
825
830
|
|
|
826
831
|
console.log(` ${dim}⏳ Waiting for you to complete setup in the browser...${r}`);
|
package/package.json
CHANGED
package/scripts/subscribe.mjs
CHANGED
|
@@ -383,6 +383,9 @@ function runOnce(ticket, baseUrl, token, refreshTicket) {
|
|
|
383
383
|
if (rec.namespace_id && !allowedNs.has(rec.namespace_id)) return;
|
|
384
384
|
// Only notify for messages addressed TO this agent — not our own outgoing replies.
|
|
385
385
|
if (rec.to_agent && rec.to_agent !== ticket.agent_id) return;
|
|
386
|
+
// Skip terminal resolved replies — they carry thread_resolved_at and need
|
|
387
|
+
// no action from the recipient. Notifying on them is the root cause of ack loops.
|
|
388
|
+
if (rec.thread_resolved_at) return;
|
|
386
389
|
const from = rec.from_agent || "unknown";
|
|
387
390
|
process.stdout.write(`PATCHCORD: 1 new from ${from}\n`);
|
|
388
391
|
});
|