patchcord 0.6.24 → 0.6.25

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. Messages from other agents land in the inbox and wake the agent to reply.",
4
- "version": "0.6.24",
4
+ "version": "0.6.25",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/bin/patchcord.mjs CHANGED
@@ -257,11 +257,14 @@ function _purgeLegacyKimiProjectConfig(dir) {
257
257
  } catch {}
258
258
  }
259
259
 
260
- // Cursor slash menu duplicates come from (a) stale combined/no-hyphen dirs under
261
- // skills-cursor and (b) Claude colon-named plugin skills bundled inside
262
- // cursor-agent's node_modules/patchcord. NEVER touch ~/.agents/skills — that tree
263
- // is Codex/Antigravity-owned (global + per-project); Cursor update must not
264
- // delete other harnesses' skills.
260
+ // Cursor slash menu duplicates come from multiple trees Cursor CLI indexes:
261
+ // (a) stale no-hyphen / colon dirs under skills-cursor
262
+ // (b) cursor-agent's bundled node_modules/patchcord both skills/ (Claude
263
+ // colon names /patchcordinbox) AND per-project-skills/cursor (exact
264
+ // dupes of skills-cursor /patchcord-inbox)
265
+ // (c) ~/.agents/skills Codex copies (/patchcord) — Cursor indexes Agent Skills
266
+ // NEVER delete ~/.agents/skills content (Codex owns that tree). We only strip
267
+ // the cursor-agent-bundled copies Cursor should not show.
265
268
  function _purgeCursorSkillDuplicates() {
266
269
  const staleCursorOnly = [
267
270
  "patchcord",
@@ -278,8 +281,22 @@ function _purgeCursorSkillDuplicates() {
278
281
  if (!existsSync(d)) continue;
279
282
  try { rmSync(d, { recursive: true, force: true }); } catch {}
280
283
  }
281
- // cursor-agent ships patchcord@* with Claude plugin skills/ Cursor must not
282
- // index those; only per-project skills-cursor copies are valid for Cursor CLI.
284
+ // Keep ONLY the three hyphenated Cursor skills under skills-cursor.
285
+ // Anything else named patchcord* there is leftover junk.
286
+ if (existsSync(cursorSkillsRoot)) {
287
+ const keep = new Set(["patchcord-inbox", "patchcord-wait", "patchcord-subscribe"]);
288
+ try {
289
+ for (const ent of readdirSync(cursorSkillsRoot, { withFileTypes: true })) {
290
+ if (!ent.isDirectory()) continue;
291
+ if (!/^patchcord/i.test(ent.name)) continue;
292
+ if (keep.has(ent.name)) continue;
293
+ try { rmSync(join(cursorSkillsRoot, ent.name), { recursive: true, force: true }); } catch {}
294
+ }
295
+ } catch {}
296
+ }
297
+ // cursor-agent ships the full npm package. Cursor indexes SKILL.md under it,
298
+ // so strip BOTH skills/ and per-project-skills/ from every bundled copy.
299
+ // Canonical Cursor skills live only in ~/.cursor/skills-cursor/.
283
300
  const cursorAgentRoot = join(HOME, ".local", "share", "cursor-agent");
284
301
  if (existsSync(cursorAgentRoot)) {
285
302
  const walk = (dir, depth = 0) => {
@@ -290,8 +307,8 @@ function _purgeCursorSkillDuplicates() {
290
307
  const p = join(dir, ent.name);
291
308
  if (ent.isDirectory()) {
292
309
  if (ent.name === "patchcord" && dir.endsWith("node_modules")) {
293
- for (const pluginSkill of ["inbox", "wait", "subscribe"]) {
294
- const sd = join(p, "skills", pluginSkill);
310
+ for (const sub of ["skills", "per-project-skills"]) {
311
+ const sd = join(p, sub);
295
312
  if (existsSync(sd)) {
296
313
  try { rmSync(sd, { recursive: true, force: true }); } catch {}
297
314
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.6.24",
3
+ "version": "0.6.25",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "scripts": {
6
6
  "version": "node scripts/sync-plugin-version.mjs && git add .claude-plugin/plugin.json"