patchcord 0.3.66 → 0.3.68
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 +56 -7
- 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
|
|
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,67 @@ 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
|
|
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");
|
|
724
|
+
|
|
725
|
+
// Also install global skills (working @patchcord — plugin/read broken in Codex v0.117)
|
|
677
726
|
const globalSkillDir = join(homedir(), ".agents", "skills", "patchcord");
|
|
678
727
|
mkdirSync(globalSkillDir, { recursive: true });
|
|
679
|
-
|
|
680
|
-
|
|
728
|
+
writeFileSync(join(globalSkillDir, "SKILL.md"),
|
|
729
|
+
readFileSync(join(pluginRoot, "skills", "codex", "SKILL.md"), "utf-8"));
|
|
681
730
|
const globalWaitDir = join(homedir(), ".agents", "skills", "patchcord-wait");
|
|
682
731
|
mkdirSync(globalWaitDir, { recursive: true });
|
|
683
|
-
|
|
684
|
-
|
|
732
|
+
writeFileSync(join(globalWaitDir, "SKILL.md"),
|
|
733
|
+
readFileSync(join(pluginRoot, "skills", "wait", "SKILL.md"), "utf-8"));
|
|
685
734
|
|
|
686
735
|
console.log(`\n ${green}✓${r} Codex configured: ${dim}${configPath}${r}`);
|
|
687
|
-
console.log(` ${green}✓${r}
|
|
736
|
+
console.log(` ${green}✓${r} Plugin installed: ${dim}@patchcord${r}, ${dim}@patchcord-wait${r}`);
|
|
688
737
|
} else {
|
|
689
738
|
// Claude Code: write .mcp.json (MCP server only — channel plugin disabled)
|
|
690
739
|
const mcpPath = join(cwd, ".mcp.json");
|