patchcord 0.3.12 → 0.3.14

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.12",
4
+ "version": "0.3.14",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/bin/patchcord.mjs CHANGED
@@ -41,7 +41,13 @@ 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");
44
+ console.log(`
45
+ ___ ____ ___ ____ _ _ ____ ____ ____ ___
46
+ |__] |__| | | |__| | | | |__/ | \\
47
+ | | | | |___ | | |___ |__| | \\ |__/
48
+
49
+ Messenger for AI agents.
50
+ `);
45
51
 
46
52
  let installedSomething = false;
47
53
 
@@ -60,8 +66,11 @@ if (cmd === "install") {
60
66
  const installed = run(`claude plugin list`)?.includes("patchcord");
61
67
  installed ? run(`claude plugin update patchcord`) : run(`claude plugin install patchcord`);
62
68
 
69
+ console.log(` ✓ Plugin installed`);
70
+
63
71
  // Block OAuth tool leakage from claude.ai web connector
64
72
  const claudeSettings = join(process.env.HOME || "", ".claude", "settings.json");
73
+ let settingsOk = false;
65
74
  if (existsSync(claudeSettings)) {
66
75
  try {
67
76
  const settings = JSON.parse(readFileSync(claudeSettings, "utf-8"));
@@ -69,12 +78,10 @@ if (cmd === "install") {
69
78
  if (!settings.permissions.allow) settings.permissions.allow = [];
70
79
  if (!settings.permissions.deny) settings.permissions.deny = [];
71
80
  let changed = false;
72
- // Allow patchcord MCP tools without prompts
73
81
  if (!settings.permissions.allow.includes("mcp__patchcord__*")) {
74
82
  settings.permissions.allow.push("mcp__patchcord__*");
75
83
  changed = true;
76
84
  }
77
- // Block OAuth tool leakage (both casings)
78
85
  for (const pattern of ["mcp__claude_ai_Patchcord__*", "mcp__claude_ai_patchcord__*"]) {
79
86
  if (!settings.permissions.deny.includes(pattern)) {
80
87
  settings.permissions.deny.push(pattern);
@@ -84,22 +91,24 @@ if (cmd === "install") {
84
91
  if (changed) {
85
92
  writeFileSync(claudeSettings, JSON.stringify(settings, null, 2) + "\n");
86
93
  }
94
+ settingsOk = true;
95
+ console.log(` ✓ Permissions configured`);
87
96
  } catch (e) {
88
- console.log(` ✗ Failed to update ${claudeSettings}`);
89
- console.log(` Fix: your settings.json has invalid JSON (${e.message})`);
90
- console.log(` Patchcord permissions were NOT configured. Fix the JSON and re-run install.`);
97
+ console.log(` ✗ Settings update failed — invalid JSON in ${claudeSettings}`);
98
+ console.log(` ${e.message}`);
99
+ console.log(` Fix the JSON and re-run: npx patchcord@latest install`);
91
100
  }
92
101
  }
93
102
 
94
103
  // Enable statusline
95
- const enableScript = join(pluginRoot, "scripts", "enable-statusline.sh");
96
- if (existsSync(enableScript)) {
97
- const slArg = fullStatusline ? " --full" : "";
98
- run(`bash "${enableScript}"${slArg}`);
104
+ if (settingsOk) {
105
+ const enableScript = join(pluginRoot, "scripts", "enable-statusline.sh");
106
+ if (existsSync(enableScript)) {
107
+ const slArg = fullStatusline ? " --full" : "";
108
+ run(`bash "${enableScript}"${slArg}`);
109
+ console.log(` ✓ Statusline${fullStatusline ? " (full)" : ""} enabled`);
110
+ }
99
111
  }
100
-
101
- console.log(` ✓ Plugin installed${fullStatusline ? " (full statusline)" : ""}`);
102
- console.log(` ✓ OAuth tool leakage blocked`);
103
112
  installedSomething = true;
104
113
  }
105
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.3.12",
3
+ "version": "0.3.14",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",