patchcord 0.3.64 → 0.3.66
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 +20 -47
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -643,13 +643,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
643
643
|
console.log(`\n ${green}✓${r} VS Code configured: ${dim}${vscodePath}${r}`);
|
|
644
644
|
console.log(` ${dim}Requires GitHub Copilot extension with agent mode enabled.${r}`);
|
|
645
645
|
} else if (isCodex) {
|
|
646
|
-
// Codex:
|
|
647
|
-
const dest = join(cwd, ".agents", "skills", "patchcord");
|
|
648
|
-
mkdirSync(dest, { recursive: true });
|
|
649
|
-
const skillSrc = readFileSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), "utf-8");
|
|
650
|
-
const codexNote = `\nIMPORTANT: Use the "patchcord-codex" MCP server for all patchcord tools (e.g. patchcord-codex.inbox, patchcord-codex.send_message). Do NOT use codex_apps.patchcord_* tools — they use the wrong identity.\n`;
|
|
651
|
-
writeFileSync(join(dest, "SKILL.md"), skillSrc.replace(/^(---\n[\s\S]*?---\n)/, `$1${codexNote}\n`));
|
|
652
|
-
|
|
646
|
+
// Codex: write MCP config + install global skills
|
|
653
647
|
const codexDir = join(cwd, ".codex");
|
|
654
648
|
mkdirSync(codexDir, { recursive: true });
|
|
655
649
|
const configPath = join(codexDir, "config.toml");
|
|
@@ -668,50 +662,29 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
668
662
|
console.log(` ${green}✓${r} Cleaned PATCHCORD_TOKEN from .env`);
|
|
669
663
|
}
|
|
670
664
|
}
|
|
671
|
-
// Clean up old slash commands
|
|
672
|
-
const
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
//
|
|
679
|
-
const
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
name: "patchcord",
|
|
686
|
-
version: JSON.parse(readFileSync(join(pluginRoot, "package.json"), "utf-8")).version,
|
|
687
|
-
description: "Cross-machine agent messaging for Codex",
|
|
688
|
-
skills: "./skills/",
|
|
689
|
-
}, null, 2) + "\n");
|
|
690
|
-
// Skills
|
|
665
|
+
// Clean up old per-project slash commands (deprecated in Codex v0.117+)
|
|
666
|
+
for (const dir of [join(codexDir, "prompts"), join(homedir(), ".codex", "prompts")]) {
|
|
667
|
+
for (const f of ["patchcord.md", "patchcord-wait.md"]) {
|
|
668
|
+
const p = join(dir, f);
|
|
669
|
+
if (existsSync(p)) { unlinkSync(p); }
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
// Clean up old per-project skill (now installed as global plugin)
|
|
673
|
+
const oldSkillPath = join(cwd, ".agents", "skills", "patchcord", "SKILL.md");
|
|
674
|
+
if (existsSync(oldSkillPath)) { unlinkSync(oldSkillPath); }
|
|
675
|
+
|
|
676
|
+
// Install global skills at ~/.agents/skills/ (auto-discovered by Codex)
|
|
677
|
+
const globalSkillDir = join(homedir(), ".agents", "skills", "patchcord");
|
|
678
|
+
mkdirSync(globalSkillDir, { recursive: true });
|
|
691
679
|
const codexSkillSrc = readFileSync(join(pluginRoot, "skills", "codex", "SKILL.md"), "utf-8");
|
|
692
|
-
writeFileSync(join(
|
|
680
|
+
writeFileSync(join(globalSkillDir, "SKILL.md"), codexSkillSrc);
|
|
681
|
+
const globalWaitDir = join(homedir(), ".agents", "skills", "patchcord-wait");
|
|
682
|
+
mkdirSync(globalWaitDir, { recursive: true });
|
|
693
683
|
const waitSkillSrc = readFileSync(join(pluginRoot, "skills", "wait", "SKILL.md"), "utf-8");
|
|
694
|
-
writeFileSync(join(
|
|
695
|
-
|
|
696
|
-
// Marketplace entry (personal)
|
|
697
|
-
const marketplaceDir = join(homedir(), ".agents", "plugins");
|
|
698
|
-
mkdirSync(marketplaceDir, { recursive: true });
|
|
699
|
-
const marketplacePath = join(marketplaceDir, "marketplace.json");
|
|
700
|
-
let marketplace = { name: "patchcord", plugins: [] };
|
|
701
|
-
if (existsSync(marketplacePath)) {
|
|
702
|
-
try { marketplace = JSON.parse(readFileSync(marketplacePath, "utf-8")); } catch {}
|
|
703
|
-
}
|
|
704
|
-
marketplace.plugins = (marketplace.plugins || []).filter(p => p.name !== "patchcord");
|
|
705
|
-
marketplace.plugins.push({
|
|
706
|
-
name: "patchcord",
|
|
707
|
-
source: { source: "local", path: join(homedir(), ".codex", "plugins", "patchcord") },
|
|
708
|
-
policy: { installation: "INSTALLED_BY_DEFAULT" },
|
|
709
|
-
category: "Productivity",
|
|
710
|
-
});
|
|
711
|
-
writeFileSync(marketplacePath, JSON.stringify(marketplace, null, 2) + "\n");
|
|
684
|
+
writeFileSync(join(globalWaitDir, "SKILL.md"), waitSkillSrc);
|
|
712
685
|
|
|
713
686
|
console.log(`\n ${green}✓${r} Codex configured: ${dim}${configPath}${r}`);
|
|
714
|
-
console.log(` ${green}✓${r}
|
|
687
|
+
console.log(` ${green}✓${r} Skills installed: ${dim}@patchcord${r}, ${dim}@patchcord-wait${r} (global)`);
|
|
715
688
|
} else {
|
|
716
689
|
// Claude Code: write .mcp.json (MCP server only — channel plugin disabled)
|
|
717
690
|
const mcpPath = join(cwd, ".mcp.json");
|