patchcord 0.6.12 → 0.6.13

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.12",
4
+ "version": "0.6.13",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/bin/patchcord.mjs CHANGED
@@ -177,16 +177,14 @@ function _purgeLegacyKimiProjectConfig(dir) {
177
177
  } catch {}
178
178
  }
179
179
 
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.
180
+ // Cursor slash menu duplicates come from (a) stale combined/no-hyphen dirs under
181
+ // skills-cursor and (b) Claude colon-named plugin skills bundled inside
182
+ // cursor-agent's node_modules/patchcord. NEVER touch ~/.agents/skills — that tree
183
+ // is Codex/Antigravity-owned (global + per-project); Cursor update must not
184
+ // delete other harnesses' skills.
184
185
  function _purgeCursorSkillDuplicates() {
185
- const staleNames = [
186
+ const staleCursorOnly = [
186
187
  "patchcord",
187
- "patchcord-inbox",
188
- "patchcord-wait",
189
- "patchcord-subscribe",
190
188
  "patchcordinbox",
191
189
  "patchcordwait",
192
190
  "patchcordsubscribe",
@@ -194,15 +192,11 @@ function _purgeCursorSkillDuplicates() {
194
192
  "patchcord:wait",
195
193
  "patchcord:subscribe",
196
194
  ];
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
- }
195
+ const cursorSkillsRoot = join(HOME, ".cursor", "skills-cursor");
196
+ for (const name of staleCursorOnly) {
197
+ const d = join(cursorSkillsRoot, name);
198
+ if (!existsSync(d)) continue;
199
+ try { rmSync(d, { recursive: true, force: true }); } catch {}
206
200
  }
207
201
  // cursor-agent ships patchcord@* with Claude plugin skills/ — Cursor must not
208
202
  // index those; only per-project skills-cursor copies are valid for Cursor CLI.
@@ -244,6 +238,23 @@ function _purgeCursorSkillDuplicates() {
244
238
  }
245
239
  }
246
240
 
241
+ // Codex global skills live at ~/.agents/skills/ (not Cursor). Refresh on
242
+ // update so a mistaken Cursor-only purge cannot leave Codex without @patchcord.
243
+ function _restoreCodexGlobalSkills() {
244
+ const codexConfig = join(HOME, ".codex", "config.toml");
245
+ if (!existsSync(codexConfig)) return;
246
+ const globalSkillDir = join(HOME, ".agents", "skills", "patchcord");
247
+ const globalWaitDir = join(HOME, ".agents", "skills", "patchcord-wait");
248
+ try {
249
+ mkdirSync(globalSkillDir, { recursive: true });
250
+ writeFileSync(join(globalSkillDir, "SKILL.md"),
251
+ readFileSync(join(pluginRoot, "per-project-skills", "codex", "SKILL.md"), "utf-8"));
252
+ mkdirSync(globalWaitDir, { recursive: true });
253
+ writeFileSync(join(globalWaitDir, "SKILL.md"),
254
+ readFileSync(join(pluginRoot, "skills", "wait", "SKILL.md"), "utf-8"));
255
+ } catch {}
256
+ }
257
+
247
258
  // preserving the rest of the user's YAML. Block-style only (what Hermes writes).
248
259
  function upsertHermesConfig(existing, url, token) {
249
260
  const block = [
@@ -2249,6 +2260,9 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
2249
2260
  globalChanges.push(`Codex stop hook ${hookAlreadyExisted ? "updated" : "installed"}`);
2250
2261
  }
2251
2262
 
2263
+ _restoreCodexGlobalSkills();
2264
+ globalChanges.push("Codex global skills refreshed");
2265
+
2252
2266
  writeFileSync(codexConfig, globalCodexContent);
2253
2267
  }
2254
2268
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.6.12",
3
+ "version": "0.6.13",
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"