patchcord 0.5.112 → 0.5.113
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 +18 -19
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -1586,33 +1586,32 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1586
1586
|
const geminiSkillDir = join(HOME, ".gemini", "skills", "patchcord");
|
|
1587
1587
|
const geminiWaitDir = join(HOME, ".gemini", "skills", "patchcord-wait");
|
|
1588
1588
|
const geminiCmdDir = join(HOME, ".gemini", "commands");
|
|
1589
|
+
const geminiLegacyCmd = join(geminiCmdDir, "patchcord.toml"); // single-command file from older installs
|
|
1589
1590
|
if (mcpConfigured) {
|
|
1590
1591
|
let geminiChanged = false;
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
geminiChanged = true;
|
|
1606
|
-
}
|
|
1607
|
-
if (geminiChanged) globalChanges.push("Gemini CLI skills + commands installed");
|
|
1592
|
+
// Refresh to the CURRENT plugin version (overwrite, not create-if-absent)
|
|
1593
|
+
// so skill/gate fixes reach machines that already have an older copy.
|
|
1594
|
+
const seedFile = (dest, src) => {
|
|
1595
|
+
mkdirSync(dirname(dest), { recursive: true });
|
|
1596
|
+
const want = readFileSync(src, "utf-8");
|
|
1597
|
+
let cur = ""; try { cur = readFileSync(dest, "utf-8"); } catch {}
|
|
1598
|
+
if (cur !== want) { writeFileSync(dest, want); geminiChanged = true; }
|
|
1599
|
+
};
|
|
1600
|
+
seedFile(join(geminiSkillDir, "SKILL.md"), join(pluginRoot, "skills", "inbox", "SKILL.md"));
|
|
1601
|
+
seedFile(join(geminiWaitDir, "SKILL.md"), join(pluginRoot, "skills", "wait", "SKILL.md"));
|
|
1602
|
+
seedFile(join(geminiCmdDir, "inbox.toml"), join(pluginRoot, "commands", "inbox.toml"));
|
|
1603
|
+
seedFile(join(geminiCmdDir, "wait.toml"), join(pluginRoot, "commands", "wait.toml"));
|
|
1604
|
+
if (existsSync(geminiLegacyCmd)) { try { unlinkSync(geminiLegacyCmd); geminiChanged = true; } catch {} }
|
|
1605
|
+
if (geminiChanged) globalChanges.push("Gemini/Antigravity patchcord skills + commands refreshed");
|
|
1608
1606
|
} else if (!mcpUnknown) {
|
|
1609
1607
|
// Definitively no patchcord MCP under ~/.gemini → remove any previously
|
|
1610
|
-
// seeded skill so a bare Gemini/Antigravity session has nothing
|
|
1608
|
+
// seeded skill/commands so a bare Gemini/Antigravity session has nothing
|
|
1609
|
+
// to act on (incl. the legacy patchcord.toml command).
|
|
1611
1610
|
let removed = false;
|
|
1612
1611
|
for (const d of [geminiSkillDir, geminiWaitDir]) {
|
|
1613
1612
|
if (existsSync(d)) { try { rmSync(d, { recursive: true, force: true }); removed = true; } catch {} }
|
|
1614
1613
|
}
|
|
1615
|
-
for (const f of [join(geminiCmdDir, "inbox.toml"), join(geminiCmdDir, "wait.toml")]) {
|
|
1614
|
+
for (const f of [join(geminiCmdDir, "inbox.toml"), join(geminiCmdDir, "wait.toml"), geminiLegacyCmd]) {
|
|
1616
1615
|
if (existsSync(f)) { try { unlinkSync(f); removed = true; } catch {} }
|
|
1617
1616
|
}
|
|
1618
1617
|
if (removed) globalChanges.push("Removed stale Gemini/Antigravity patchcord skills (no patchcord MCP configured there)");
|