patchcord 0.3.8 → 0.3.10

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "patchcord",
3
3
  "description": "Cross-machine agent messaging with auto-inbox checking. Agents automatically respond to messages from other agents without human intervention.",
4
- "version": "0.3.8",
4
+ "version": "0.3.10",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/bin/patchcord.mjs CHANGED
@@ -41,12 +41,14 @@ if (cmd === "install") {
41
41
  const fullStatusline = flags.includes("--full");
42
42
  const { readFileSync, writeFileSync } = await import("fs");
43
43
 
44
+ console.log("Patchcord — setting up agent messaging\n");
45
+
44
46
  let installedSomething = false;
45
47
 
46
48
  // ── Claude Code ──
47
49
  const hasClaude = run("which claude");
48
50
  if (hasClaude) {
49
- console.log("Found Claude Code. Installing patchcord plugin...");
51
+ console.log(`\n🔧 Claude Code`);
50
52
 
51
53
  // Register npm package as a local marketplace (idempotent)
52
54
  const marketplaceExists = run(`claude plugin marketplace list`)?.includes("patchcord");
@@ -63,13 +65,24 @@ if (cmd === "install") {
63
65
  if (existsSync(claudeSettings)) {
64
66
  try {
65
67
  const settings = JSON.parse(readFileSync(claudeSettings, "utf-8"));
66
- const deny = settings.permissions?.deny || [];
67
- if (!deny.includes("mcp__claude_ai_Patchcord__*")) {
68
- if (!settings.permissions) settings.permissions = {};
69
- if (!settings.permissions.deny) settings.permissions.deny = [];
70
- settings.permissions.deny.push("mcp__claude_ai_Patchcord__*");
68
+ if (!settings.permissions) settings.permissions = {};
69
+ if (!settings.permissions.allow) settings.permissions.allow = [];
70
+ if (!settings.permissions.deny) settings.permissions.deny = [];
71
+ let changed = false;
72
+ // Allow patchcord MCP tools without prompts
73
+ if (!settings.permissions.allow.includes("mcp__patchcord__*")) {
74
+ settings.permissions.allow.push("mcp__patchcord__*");
75
+ changed = true;
76
+ }
77
+ // Block OAuth tool leakage (both casings)
78
+ for (const pattern of ["mcp__claude_ai_Patchcord__*", "mcp__claude_ai_patchcord__*"]) {
79
+ if (!settings.permissions.deny.includes(pattern)) {
80
+ settings.permissions.deny.push(pattern);
81
+ changed = true;
82
+ }
83
+ }
84
+ if (changed) {
71
85
  writeFileSync(claudeSettings, JSON.stringify(settings, null, 2) + "\n");
72
- console.log("✓ Blocked OAuth tool leakage from claude.ai web connector.");
73
86
  }
74
87
  } catch {
75
88
  // Non-fatal — settings.json might be malformed
@@ -83,37 +96,37 @@ if (cmd === "install") {
83
96
  run(`bash "${enableScript}"${slArg}`);
84
97
  }
85
98
 
86
- console.log(`✓ Claude Code plugin installed.${fullStatusline ? " Full statusline enabled." : ""}`);
99
+ console.log(` ✓ Plugin installed${fullStatusline ? " (full statusline)" : ""}`);
100
+ console.log(` ✓ OAuth tool leakage blocked`);
87
101
  installedSomething = true;
88
102
  }
89
103
 
90
104
  // ── Codex CLI ──
91
105
  const codexConfig = join(process.env.HOME || "", ".codex", "config.toml");
92
106
  if (existsSync(codexConfig)) {
93
- console.log("Found Codex CLI config.");
94
-
95
- // Disable patchcord as ChatGPT app (prevents OAuth identity conflict)
96
107
  const content = readFileSync(codexConfig, "utf-8");
97
108
  if (!content.includes("[apps.patchcord]")) {
98
109
  writeFileSync(codexConfig, content.trimEnd() + "\n\n[apps.patchcord]\nenabled = false\n");
99
- console.log("✓ Disabled patchcord ChatGPT app in Codex (prevents identity conflict).");
100
110
  }
101
-
111
+ console.log(`\n🔧 Codex CLI`);
112
+ console.log(` ✓ ChatGPT app conflict prevented`);
102
113
  installedSomething = true;
103
114
  }
104
115
 
105
116
  if (!installedSomething) {
106
- console.log(`No Claude Code or Codex CLI detected.
117
+ console.log(`No Claude Code or Codex CLI found on this machine.
107
118
 
108
119
  Install one first:
109
- Claude Code: https://claude.ai/code
110
- Codex CLI: npm install -g @openai/codex
120
+ Claude Code https://claude.ai/code
121
+ Codex CLI npm install -g @openai/codex
111
122
 
112
123
  Then run: npx patchcord@latest install`);
113
124
  process.exit(1);
114
125
  }
115
126
 
116
- console.log(`\nRun "npx patchcord@latest agent" in each project to set up MCP.`);
127
+ console.log(`\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`);
128
+ console.log(`Next: cd into your project and run:`);
129
+ console.log(` npx patchcord@latest agent`);
117
130
  process.exit(0);
118
131
  }
119
132
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",