patchcord 0.6.11 → 0.6.12

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.11",
4
+ "version": "0.6.12",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/bin/patchcord.mjs CHANGED
@@ -177,7 +177,73 @@ function _purgeLegacyKimiProjectConfig(dir) {
177
177
  } catch {}
178
178
  }
179
179
 
180
- // Insert-or-update mcp_servers.patchcord in a Hermes ~/.hermes/config.yaml,
180
+ // Cursor indexes skills from multiple trees. Leftover Codex globals
181
+ // (~/.agents/skills/patchcord*) and Claude colon-named plugin skills bundled
182
+ // inside cursor-agent's node_modules/patchcord both register duplicate slash
183
+ // commands (/patchcordinbox vs /patchcord-inbox). Keep only skills-cursor.
184
+ function _purgeCursorSkillDuplicates() {
185
+ const staleNames = [
186
+ "patchcord",
187
+ "patchcord-inbox",
188
+ "patchcord-wait",
189
+ "patchcord-subscribe",
190
+ "patchcordinbox",
191
+ "patchcordwait",
192
+ "patchcordsubscribe",
193
+ "patchcord:inbox",
194
+ "patchcord:wait",
195
+ "patchcord:subscribe",
196
+ ];
197
+ for (const root of [
198
+ join(HOME, ".agents", "skills"),
199
+ join(HOME, ".cursor", "skills-cursor"),
200
+ ]) {
201
+ for (const name of staleNames) {
202
+ const d = join(root, name);
203
+ if (!existsSync(d)) continue;
204
+ try { rmSync(d, { recursive: true, force: true }); } catch {}
205
+ }
206
+ }
207
+ // cursor-agent ships patchcord@* with Claude plugin skills/ — Cursor must not
208
+ // index those; only per-project skills-cursor copies are valid for Cursor CLI.
209
+ const cursorAgentRoot = join(HOME, ".local", "share", "cursor-agent");
210
+ if (existsSync(cursorAgentRoot)) {
211
+ const walk = (dir, depth = 0) => {
212
+ if (depth > 8) return;
213
+ let entries;
214
+ try { entries = readdirSync(dir, { withFileTypes: true }); } catch { return; }
215
+ for (const ent of entries) {
216
+ const p = join(dir, ent.name);
217
+ if (ent.isDirectory()) {
218
+ if (ent.name === "patchcord" && dir.endsWith("node_modules")) {
219
+ for (const pluginSkill of ["inbox", "wait", "subscribe"]) {
220
+ const sd = join(p, "skills", pluginSkill);
221
+ if (existsSync(sd)) {
222
+ try { rmSync(sd, { recursive: true, force: true }); } catch {}
223
+ }
224
+ }
225
+ continue;
226
+ }
227
+ walk(p, depth + 1);
228
+ }
229
+ }
230
+ };
231
+ walk(cursorAgentRoot);
232
+ }
233
+ const syncManifest = join(HOME, ".cursor", "skills-cursor", ".sync-manifest.json");
234
+ if (existsSync(syncManifest)) {
235
+ try {
236
+ const obj = JSON.parse(readFileSync(syncManifest, "utf-8"));
237
+ if (obj?.skills) {
238
+ for (const stale of ["patchcord", "patchcordinbox", "patchcordwait", "patchcordsubscribe", "patchcord:inbox", "patchcord:wait", "patchcord:subscribe"]) {
239
+ delete obj.skills[stale];
240
+ }
241
+ writeFileSync(syncManifest, JSON.stringify(obj, null, 2) + "\n");
242
+ }
243
+ } catch {}
244
+ }
245
+ }
246
+
181
247
  // preserving the rest of the user's YAML. Block-style only (what Hermes writes).
182
248
  function upsertHermesConfig(existing, url, token) {
183
249
  const block = [
@@ -1782,6 +1848,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
1782
1848
  const cursorSkillsRoot = join(HOME, ".cursor", "skills-cursor");
1783
1849
  const hasCursorAgent = run("which cursor-agent");
1784
1850
  if (hasCursorAgent || existsSync(cursorSkillsRoot)) {
1851
+ _purgeCursorSkillDuplicates();
1785
1852
  mkdirSync(cursorSkillsRoot, { recursive: true });
1786
1853
  const cursorInboxDir = join(cursorSkillsRoot, "patchcord-inbox");
1787
1854
  const cursorWaitDir = join(cursorSkillsRoot, "patchcord-wait");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.6.11",
3
+ "version": "0.6.12",
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"