patchcord 0.6.25 → 0.6.26
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/.claude-plugin/plugin.json +1 -1
- package/bin/patchcord.mjs +28 -5
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -335,8 +335,10 @@ function _purgeCursorSkillDuplicates() {
|
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
// Codex global skills live at ~/.agents/skills
|
|
339
|
-
//
|
|
338
|
+
// Codex global skills live at ~/.agents/skills/. Cursor CLI also indexes that
|
|
339
|
+
// tree (no exclude setting — see cursor.com/docs/skills). Use ONE hyphenated
|
|
340
|
+
// wait skill here so Cursor does not also show /patchcordwait (colon) +
|
|
341
|
+
// /patchcord-wait (skills-cursor). Claude plugin skills keep colon names.
|
|
340
342
|
function _restoreCodexGlobalSkills() {
|
|
341
343
|
const codexConfig = join(HOME, ".codex", "config.toml");
|
|
342
344
|
if (!existsSync(codexConfig)) return;
|
|
@@ -347,11 +349,20 @@ function _restoreCodexGlobalSkills() {
|
|
|
347
349
|
writeFileSync(join(globalSkillDir, "SKILL.md"),
|
|
348
350
|
readFileSync(join(pluginRoot, "per-project-skills", "codex", "SKILL.md"), "utf-8"));
|
|
349
351
|
mkdirSync(globalWaitDir, { recursive: true });
|
|
352
|
+
// Shared hyphenated wait (same MCP wait_for_message flow as Cursor).
|
|
350
353
|
writeFileSync(join(globalWaitDir, "SKILL.md"),
|
|
351
|
-
readFileSync(join(pluginRoot, "skills", "wait", "SKILL.md"), "utf-8"));
|
|
354
|
+
readFileSync(join(pluginRoot, "per-project-skills", "cursor", "wait", "SKILL.md"), "utf-8"));
|
|
352
355
|
} catch {}
|
|
353
356
|
}
|
|
354
357
|
|
|
358
|
+
/** True when Codex is on this machine (agents skills would be indexed by Cursor). */
|
|
359
|
+
function _hasCodexAgentsSkills() {
|
|
360
|
+
if (existsSync(join(HOME, ".codex", "config.toml"))) return true;
|
|
361
|
+
if (existsSync(join(HOME, ".agents", "skills", "patchcord"))) return true;
|
|
362
|
+
if (existsSync(join(HOME, ".agents", "skills", "patchcord-wait"))) return true;
|
|
363
|
+
return false;
|
|
364
|
+
}
|
|
365
|
+
|
|
355
366
|
// preserving the rest of the user's YAML. Block-style only (what Hermes writes).
|
|
356
367
|
function upsertHermesConfig(existing, url, token) {
|
|
357
368
|
const block = [
|
|
@@ -1966,16 +1977,28 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1966
1977
|
if (existsSync(staleCursorSkillDir)) {
|
|
1967
1978
|
try { rmSync(staleCursorSkillDir, { recursive: true, force: true }); cursorChanged = true; } catch {}
|
|
1968
1979
|
}
|
|
1980
|
+
// Always install Cursor-specific inbox + subscribe (not in ~/.agents).
|
|
1969
1981
|
mkdirSync(cursorInboxDir, { recursive: true });
|
|
1970
1982
|
cpSync(join(pluginRoot, "per-project-skills", "cursor", "inbox", "SKILL.md"), join(cursorInboxDir, "SKILL.md"));
|
|
1971
1983
|
cursorChanged = true;
|
|
1972
|
-
mkdirSync(cursorWaitDir, { recursive: true });
|
|
1973
|
-
cpSync(join(pluginRoot, "per-project-skills", "cursor", "wait", "SKILL.md"), join(cursorWaitDir, "SKILL.md"));
|
|
1974
1984
|
mkdirSync(cursorSubscribeDir, { recursive: true });
|
|
1975
1985
|
cpSync(
|
|
1976
1986
|
join(pluginRoot, "per-project-skills", "cursor", "subscribe", "SKILL.md"),
|
|
1977
1987
|
join(cursorSubscribeDir, "SKILL.md")
|
|
1978
1988
|
);
|
|
1989
|
+
// Wait is shared MCP flow. If Codex/agents already owns patchcord-wait,
|
|
1990
|
+
// keep ONE copy under ~/.agents (Cursor indexes it) — do NOT also install
|
|
1991
|
+
// skills-cursor/patchcord-wait (duplicate slash). Cursor-only machines
|
|
1992
|
+
// still get wait under skills-cursor.
|
|
1993
|
+
if (_hasCodexAgentsSkills()) {
|
|
1994
|
+
_restoreCodexGlobalSkills();
|
|
1995
|
+
if (existsSync(cursorWaitDir)) {
|
|
1996
|
+
try { rmSync(cursorWaitDir, { recursive: true, force: true }); cursorChanged = true; } catch {}
|
|
1997
|
+
}
|
|
1998
|
+
} else {
|
|
1999
|
+
mkdirSync(cursorWaitDir, { recursive: true });
|
|
2000
|
+
cpSync(join(pluginRoot, "per-project-skills", "cursor", "wait", "SKILL.md"), join(cursorWaitDir, "SKILL.md"));
|
|
2001
|
+
}
|
|
1979
2002
|
if (cursorChanged) globalChanges.push("Cursor skills installed");
|
|
1980
2003
|
|
|
1981
2004
|
if (hasCursorAgent) {
|
package/package.json
CHANGED