patchcord 0.3.65 → 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.
- package/bin/patchcord.mjs +33 -25
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -643,19 +643,13 @@ 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");
|
|
656
650
|
let existing = existsSync(configPath) ? readFileSync(configPath, "utf-8") : "";
|
|
657
651
|
// Remove old patchcord config block if present
|
|
658
|
-
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();
|
|
659
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`;
|
|
660
654
|
writeFileSync(configPath, existing);
|
|
661
655
|
// Clean up any PATCHCORD_TOKEN we previously wrote to .env
|
|
@@ -679,37 +673,51 @@ 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
|
|
683
|
-
const
|
|
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");
|
|
684
680
|
mkdirSync(join(pluginDir, ".codex-plugin"), { recursive: true });
|
|
685
681
|
mkdirSync(join(pluginDir, "skills", "patchcord"), { recursive: true });
|
|
686
682
|
mkdirSync(join(pluginDir, "skills", "patchcord-wait"), { recursive: true });
|
|
687
|
-
// Plugin manifest
|
|
688
683
|
writeFileSync(join(pluginDir, ".codex-plugin", "plugin.json"), JSON.stringify({
|
|
689
684
|
name: "patchcord",
|
|
690
|
-
version:
|
|
691
|
-
description: "Cross-machine agent messaging
|
|
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
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
|
+
},
|
|
693
703
|
}, null, 2) + "\n");
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
writeFileSync(join(pluginDir, "skills", "patchcord", "SKILL.md"),
|
|
697
|
-
|
|
698
|
-
writeFileSync(join(pluginDir, "skills", "patchcord-wait", "SKILL.md"), waitSkillSrc);
|
|
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"));
|
|
699
708
|
|
|
700
|
-
//
|
|
701
|
-
const marketplaceDir = join(homedir(), ".agents", "plugins");
|
|
702
|
-
mkdirSync(marketplaceDir, { recursive: true });
|
|
709
|
+
// Personal marketplace entry (relative path from marketplace root)
|
|
703
710
|
const marketplacePath = join(marketplaceDir, "marketplace.json");
|
|
704
|
-
let marketplace = { name: "patchcord", plugins: [] };
|
|
711
|
+
let marketplace = { name: "patchcord", interface: { displayName: "Patchcord" }, plugins: [] };
|
|
705
712
|
if (existsSync(marketplacePath)) {
|
|
706
713
|
try { marketplace = JSON.parse(readFileSync(marketplacePath, "utf-8")); } catch {}
|
|
707
714
|
}
|
|
708
|
-
marketplace.plugins
|
|
715
|
+
if (!marketplace.plugins) marketplace.plugins = [];
|
|
716
|
+
marketplace.plugins = marketplace.plugins.filter(p => p.name !== "patchcord");
|
|
709
717
|
marketplace.plugins.push({
|
|
710
718
|
name: "patchcord",
|
|
711
|
-
source: { source: "local", path:
|
|
712
|
-
policy: { installation: "INSTALLED_BY_DEFAULT" },
|
|
719
|
+
source: { source: "local", path: "./patchcord" },
|
|
720
|
+
policy: { installation: "INSTALLED_BY_DEFAULT", authentication: "ON_INSTALL" },
|
|
713
721
|
category: "Productivity",
|
|
714
722
|
});
|
|
715
723
|
writeFileSync(marketplacePath, JSON.stringify(marketplace, null, 2) + "\n");
|