patchcord 0.3.66 → 0.3.67

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 +50 -11
  2. package/package.json +1 -1
package/bin/patchcord.mjs CHANGED
@@ -649,7 +649,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
649
649
  const configPath = join(codexDir, "config.toml");
650
650
  let existing = existsSync(configPath) ? readFileSync(configPath, "utf-8") : "";
651
651
  // Remove old patchcord config block if present
652
- existing = existing.replace(/\[mcp_servers\.patchcord\]\n(?:(?!\[)[^\n]*\n?)*/g, "").replace(/\n{3,}/g, "\n\n").trim();
652
+ existing = existing.replace(/\[mcp_servers\.patchcord[-\w]*\]\n(?:(?!\[)[^\n]*\n?)*/g, "").replace(/\n{3,}/g, "\n\n").trim();
653
653
  existing = existing.trimEnd() + `\n\n[mcp_servers.patchcord-codex]\nurl = "${serverUrl}/mcp/bearer"\nhttp_headers = { "Authorization" = "Bearer ${token}", "X-Patchcord-Machine" = "${hostname}" }\ntool_timeout_sec = 300\n`;
654
654
  writeFileSync(configPath, existing);
655
655
  // Clean up any PATCHCORD_TOKEN we previously wrote to .env
@@ -673,18 +673,57 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
673
673
  const oldSkillPath = join(cwd, ".agents", "skills", "patchcord", "SKILL.md");
674
674
  if (existsSync(oldSkillPath)) { unlinkSync(oldSkillPath); }
675
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 });
679
- const codexSkillSrc = readFileSync(join(pluginRoot, "skills", "codex", "SKILL.md"), "utf-8");
680
- writeFileSync(join(globalSkillDir, "SKILL.md"), codexSkillSrc);
681
- const globalWaitDir = join(homedir(), ".agents", "skills", "patchcord-wait");
682
- mkdirSync(globalWaitDir, { recursive: true });
683
- const waitSkillSrc = readFileSync(join(pluginRoot, "skills", "wait", "SKILL.md"), "utf-8");
684
- writeFileSync(join(globalWaitDir, "SKILL.md"), waitSkillSrc);
676
+ // Install Codex plugin at ~/.agents/plugins/patchcord/ (personal marketplace)
677
+ const pluginVersion = JSON.parse(readFileSync(join(pluginRoot, "package.json"), "utf-8")).version;
678
+ const marketplaceDir = join(homedir(), ".agents", "plugins");
679
+ const pluginDir = join(marketplaceDir, "patchcord");
680
+ mkdirSync(join(pluginDir, ".codex-plugin"), { recursive: true });
681
+ mkdirSync(join(pluginDir, "skills", "patchcord"), { recursive: true });
682
+ mkdirSync(join(pluginDir, "skills", "patchcord-wait"), { recursive: true });
683
+ writeFileSync(join(pluginDir, ".codex-plugin", "plugin.json"), JSON.stringify({
684
+ name: "patchcord",
685
+ version: pluginVersion,
686
+ description: "Cross-machine agent messaging — connect Codex, Claude Code, claude.ai, ChatGPT, and other agents across projects and machines.",
687
+ author: { name: "ppravdin", url: "https://patchcord.dev" },
688
+ homepage: "https://patchcord.dev",
689
+ repository: "https://github.com/ppravdin/patchcord",
690
+ license: "MIT",
691
+ keywords: ["messaging", "agents", "mcp"],
692
+ skills: "./skills/",
693
+ interface: {
694
+ displayName: "Patchcord",
695
+ shortDescription: "Cross-machine agent messaging",
696
+ longDescription: "Connect AI agents across machines and platforms. Send messages between Codex, Claude Code, claude.ai, ChatGPT, and other MCP-connected agents.",
697
+ developerName: "ppravdin",
698
+ category: "Productivity",
699
+ capabilities: ["Read", "Write"],
700
+ websiteURL: "https://patchcord.dev",
701
+ defaultPrompt: ["Check patchcord inbox for messages from other agents"],
702
+ },
703
+ }, null, 2) + "\n");
704
+ writeFileSync(join(pluginDir, "skills", "patchcord", "SKILL.md"),
705
+ readFileSync(join(pluginRoot, "skills", "codex", "SKILL.md"), "utf-8"));
706
+ writeFileSync(join(pluginDir, "skills", "patchcord-wait", "SKILL.md"),
707
+ readFileSync(join(pluginRoot, "skills", "wait", "SKILL.md"), "utf-8"));
708
+
709
+ // Personal marketplace entry (relative path from marketplace root)
710
+ const marketplacePath = join(marketplaceDir, "marketplace.json");
711
+ let marketplace = { name: "patchcord", interface: { displayName: "Patchcord" }, plugins: [] };
712
+ if (existsSync(marketplacePath)) {
713
+ try { marketplace = JSON.parse(readFileSync(marketplacePath, "utf-8")); } catch {}
714
+ }
715
+ if (!marketplace.plugins) marketplace.plugins = [];
716
+ marketplace.plugins = marketplace.plugins.filter(p => p.name !== "patchcord");
717
+ marketplace.plugins.push({
718
+ name: "patchcord",
719
+ source: { source: "local", path: "./patchcord" },
720
+ policy: { installation: "INSTALLED_BY_DEFAULT", authentication: "ON_INSTALL" },
721
+ category: "Productivity",
722
+ });
723
+ writeFileSync(marketplacePath, JSON.stringify(marketplace, null, 2) + "\n");
685
724
 
686
725
  console.log(`\n ${green}✓${r} Codex configured: ${dim}${configPath}${r}`);
687
- console.log(` ${green}✓${r} Skills installed: ${dim}@patchcord${r}, ${dim}@patchcord-wait${r} (global)`);
726
+ console.log(` ${green}✓${r} Plugin installed: ${dim}@patchcord${r}, ${dim}@patchcord-wait${r}`);
688
727
  } else {
689
728
  // Claude Code: write .mcp.json (MCP server only — channel plugin disabled)
690
729
  const mcpPath = join(cwd, ".mcp.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.3.66",
3
+ "version": "0.3.67",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",