patchcord 0.3.65 → 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.
Files changed (2) hide show
  1. package/bin/patchcord.mjs +9 -40
  2. 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: copy skill + write config + install slash commands
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");
@@ -679,43 +673,18 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
679
673
  const oldSkillPath = join(cwd, ".agents", "skills", "patchcord", "SKILL.md");
680
674
  if (existsSync(oldSkillPath)) { unlinkSync(oldSkillPath); }
681
675
 
682
- // Install Codex plugin (skills auto-discovered via @patchcord)
683
- const pluginDir = join(homedir(), ".codex", "plugins", "patchcord");
684
- mkdirSync(join(pluginDir, ".codex-plugin"), { recursive: true });
685
- mkdirSync(join(pluginDir, "skills", "patchcord"), { recursive: true });
686
- mkdirSync(join(pluginDir, "skills", "patchcord-wait"), { recursive: true });
687
- // Plugin manifest
688
- writeFileSync(join(pluginDir, ".codex-plugin", "plugin.json"), JSON.stringify({
689
- name: "patchcord",
690
- version: JSON.parse(readFileSync(join(pluginRoot, "package.json"), "utf-8")).version,
691
- description: "Cross-machine agent messaging for Codex",
692
- skills: "./skills/",
693
- }, null, 2) + "\n");
694
- // Skills
676
+ // Install global skills at ~/.agents/skills/ (auto-discovered by Codex)
677
+ const globalSkillDir = join(homedir(), ".agents", "skills", "patchcord");
678
+ mkdirSync(globalSkillDir, { recursive: true });
695
679
  const codexSkillSrc = readFileSync(join(pluginRoot, "skills", "codex", "SKILL.md"), "utf-8");
696
- writeFileSync(join(pluginDir, "skills", "patchcord", "SKILL.md"), codexSkillSrc);
680
+ writeFileSync(join(globalSkillDir, "SKILL.md"), codexSkillSrc);
681
+ const globalWaitDir = join(homedir(), ".agents", "skills", "patchcord-wait");
682
+ mkdirSync(globalWaitDir, { recursive: true });
697
683
  const waitSkillSrc = readFileSync(join(pluginRoot, "skills", "wait", "SKILL.md"), "utf-8");
698
- writeFileSync(join(pluginDir, "skills", "patchcord-wait", "SKILL.md"), waitSkillSrc);
699
-
700
- // Marketplace entry (personal)
701
- const marketplaceDir = join(homedir(), ".agents", "plugins");
702
- mkdirSync(marketplaceDir, { recursive: true });
703
- const marketplacePath = join(marketplaceDir, "marketplace.json");
704
- let marketplace = { name: "patchcord", plugins: [] };
705
- if (existsSync(marketplacePath)) {
706
- try { marketplace = JSON.parse(readFileSync(marketplacePath, "utf-8")); } catch {}
707
- }
708
- marketplace.plugins = (marketplace.plugins || []).filter(p => p.name !== "patchcord");
709
- marketplace.plugins.push({
710
- name: "patchcord",
711
- source: { source: "local", path: join(homedir(), ".codex", "plugins", "patchcord") },
712
- policy: { installation: "INSTALLED_BY_DEFAULT" },
713
- category: "Productivity",
714
- });
715
- writeFileSync(marketplacePath, JSON.stringify(marketplace, null, 2) + "\n");
684
+ writeFileSync(join(globalWaitDir, "SKILL.md"), waitSkillSrc);
716
685
 
717
686
  console.log(`\n ${green}✓${r} Codex configured: ${dim}${configPath}${r}`);
718
- console.log(` ${green}✓${r} Plugin installed: ${dim}@patchcord${r}, ${dim}@patchcord-wait${r}`);
687
+ console.log(` ${green}✓${r} Skills installed: ${dim}@patchcord${r}, ${dim}@patchcord-wait${r} (global)`);
719
688
  } else {
720
689
  // Claude Code: write .mcp.json (MCP server only — channel plugin disabled)
721
690
  const mcpPath = join(cwd, ".mcp.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.3.65",
3
+ "version": "0.3.66",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",