patchcord 0.3.12 → 0.3.13
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/.claude-plugin/plugin.json +1 -1
- package/bin/patchcord.mjs +15 -12
- package/package.json +1 -1
|
@@ -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.
|
|
4
|
+
"version": "0.3.13",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "ppravdin"
|
|
7
7
|
},
|
package/bin/patchcord.mjs
CHANGED
|
@@ -60,8 +60,11 @@ if (cmd === "install") {
|
|
|
60
60
|
const installed = run(`claude plugin list`)?.includes("patchcord");
|
|
61
61
|
installed ? run(`claude plugin update patchcord`) : run(`claude plugin install patchcord`);
|
|
62
62
|
|
|
63
|
+
console.log(` ✓ Plugin installed`);
|
|
64
|
+
|
|
63
65
|
// Block OAuth tool leakage from claude.ai web connector
|
|
64
66
|
const claudeSettings = join(process.env.HOME || "", ".claude", "settings.json");
|
|
67
|
+
let settingsOk = false;
|
|
65
68
|
if (existsSync(claudeSettings)) {
|
|
66
69
|
try {
|
|
67
70
|
const settings = JSON.parse(readFileSync(claudeSettings, "utf-8"));
|
|
@@ -69,12 +72,10 @@ if (cmd === "install") {
|
|
|
69
72
|
if (!settings.permissions.allow) settings.permissions.allow = [];
|
|
70
73
|
if (!settings.permissions.deny) settings.permissions.deny = [];
|
|
71
74
|
let changed = false;
|
|
72
|
-
// Allow patchcord MCP tools without prompts
|
|
73
75
|
if (!settings.permissions.allow.includes("mcp__patchcord__*")) {
|
|
74
76
|
settings.permissions.allow.push("mcp__patchcord__*");
|
|
75
77
|
changed = true;
|
|
76
78
|
}
|
|
77
|
-
// Block OAuth tool leakage (both casings)
|
|
78
79
|
for (const pattern of ["mcp__claude_ai_Patchcord__*", "mcp__claude_ai_patchcord__*"]) {
|
|
79
80
|
if (!settings.permissions.deny.includes(pattern)) {
|
|
80
81
|
settings.permissions.deny.push(pattern);
|
|
@@ -84,22 +85,24 @@ if (cmd === "install") {
|
|
|
84
85
|
if (changed) {
|
|
85
86
|
writeFileSync(claudeSettings, JSON.stringify(settings, null, 2) + "\n");
|
|
86
87
|
}
|
|
88
|
+
settingsOk = true;
|
|
89
|
+
console.log(` ✓ Permissions configured`);
|
|
87
90
|
} catch (e) {
|
|
88
|
-
console.log(` ✗
|
|
89
|
-
console.log(`
|
|
90
|
-
console.log(`
|
|
91
|
+
console.log(` ✗ Settings update failed — invalid JSON in ${claudeSettings}`);
|
|
92
|
+
console.log(` ${e.message}`);
|
|
93
|
+
console.log(` Fix the JSON and re-run: npx patchcord@latest install`);
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
// Enable statusline
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
if (settingsOk) {
|
|
99
|
+
const enableScript = join(pluginRoot, "scripts", "enable-statusline.sh");
|
|
100
|
+
if (existsSync(enableScript)) {
|
|
101
|
+
const slArg = fullStatusline ? " --full" : "";
|
|
102
|
+
run(`bash "${enableScript}"${slArg}`);
|
|
103
|
+
console.log(` ✓ Statusline${fullStatusline ? " (full)" : ""} enabled`);
|
|
104
|
+
}
|
|
99
105
|
}
|
|
100
|
-
|
|
101
|
-
console.log(` ✓ Plugin installed${fullStatusline ? " (full statusline)" : ""}`);
|
|
102
|
-
console.log(` ✓ OAuth tool leakage blocked`);
|
|
103
106
|
installedSomething = true;
|
|
104
107
|
}
|
|
105
108
|
|