patchcord 0.3.26 → 0.3.27
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 +12 -23
- 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.27",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "ppravdin"
|
|
7
7
|
},
|
package/bin/patchcord.mjs
CHANGED
|
@@ -233,13 +233,14 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
233
233
|
} catch {}
|
|
234
234
|
}
|
|
235
235
|
} else if (isWindsurf) {
|
|
236
|
-
//
|
|
237
|
-
const wsPath = join(
|
|
236
|
+
// Windsurf is global only
|
|
237
|
+
const wsPath = join(process.env.HOME || "", ".codeium", "windsurf", "mcp_config.json");
|
|
238
238
|
if (existsSync(wsPath)) {
|
|
239
239
|
try {
|
|
240
|
-
const
|
|
240
|
+
const content = readFileSync(wsPath, "utf-8").trim();
|
|
241
|
+
const existing = content ? JSON.parse(content) : {};
|
|
241
242
|
if (existing.mcpServers?.patchcord) {
|
|
242
|
-
console.log(`\n ${yellow}⚠ Windsurf already configured
|
|
243
|
+
console.log(`\n ${yellow}⚠ Windsurf already configured${r}`);
|
|
243
244
|
console.log(` ${dim}${wsPath}${r}`);
|
|
244
245
|
const replace = (await ask(` ${dim}Replace? (y/N):${r} `)).trim().toLowerCase();
|
|
245
246
|
if (replace !== "y" && replace !== "yes") {
|
|
@@ -250,19 +251,6 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
250
251
|
}
|
|
251
252
|
} catch {}
|
|
252
253
|
}
|
|
253
|
-
// Warn about global config conflict
|
|
254
|
-
const globalWs = join(process.env.HOME || "", ".codeium", "windsurf", "mcp_config.json");
|
|
255
|
-
if (existsSync(globalWs)) {
|
|
256
|
-
try {
|
|
257
|
-
const global = JSON.parse(readFileSync(globalWs, "utf-8"));
|
|
258
|
-
if (global.mcpServers?.patchcord) {
|
|
259
|
-
console.log(`\n ${yellow}⚠ Patchcord is also configured globally in Windsurf${r}`);
|
|
260
|
-
console.log(` ${dim}${globalWs}${r}`);
|
|
261
|
-
console.log(` ${yellow}Having both global AND per-project will cause duplicate tool calls.${r}`);
|
|
262
|
-
console.log(` ${dim}Remove patchcord from global: edit ~/.codeium/windsurf/mcp_config.json${r}`);
|
|
263
|
-
}
|
|
264
|
-
} catch {}
|
|
265
|
-
}
|
|
266
254
|
} else {
|
|
267
255
|
const configPath = join(cwd, ".codex", "config.toml");
|
|
268
256
|
if (existsSync(configPath)) {
|
|
@@ -370,10 +358,8 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
370
358
|
console.log(`\n ${green}✓${r} Cursor configured: ${dim}${cursorPath}${r}`);
|
|
371
359
|
console.log(` ${dim}Per-project only — other projects won't see this agent.${r}`);
|
|
372
360
|
} else if (isWindsurf) {
|
|
373
|
-
// Windsurf:
|
|
374
|
-
const
|
|
375
|
-
mkdirSync(wsDir, { recursive: true });
|
|
376
|
-
const wsPath = join(wsDir, "mcp.json");
|
|
361
|
+
// Windsurf: global only (~/.codeium/windsurf/mcp_config.json)
|
|
362
|
+
const wsPath = join(process.env.HOME || "", ".codeium", "windsurf", "mcp_config.json");
|
|
377
363
|
const wsConfig = {
|
|
378
364
|
mcpServers: {
|
|
379
365
|
patchcord: {
|
|
@@ -390,7 +376,8 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
390
376
|
|
|
391
377
|
if (existsSync(wsPath)) {
|
|
392
378
|
try {
|
|
393
|
-
const
|
|
379
|
+
const content = readFileSync(wsPath, "utf-8").trim();
|
|
380
|
+
const existing = content ? JSON.parse(content) : {};
|
|
394
381
|
existing.mcpServers = existing.mcpServers || {};
|
|
395
382
|
existing.mcpServers.patchcord = wsConfig.mcpServers.patchcord;
|
|
396
383
|
writeFileSync(wsPath, JSON.stringify(existing, null, 2) + "\n");
|
|
@@ -398,10 +385,12 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
398
385
|
writeFileSync(wsPath, JSON.stringify(wsConfig, null, 2) + "\n");
|
|
399
386
|
}
|
|
400
387
|
} else {
|
|
388
|
+
mkdirSync(join(process.env.HOME || "", ".codeium", "windsurf"), { recursive: true });
|
|
401
389
|
writeFileSync(wsPath, JSON.stringify(wsConfig, null, 2) + "\n");
|
|
402
390
|
}
|
|
403
391
|
console.log(`\n ${green}✓${r} Windsurf configured: ${dim}${wsPath}${r}`);
|
|
404
|
-
console.log(` ${
|
|
392
|
+
console.log(` ${yellow}Global config — all Windsurf projects share this agent.${r}`);
|
|
393
|
+
console.log(` ${dim}Windsurf does not support per-project MCP configs.${r}`);
|
|
405
394
|
} else if (isCodex) {
|
|
406
395
|
// Codex: copy skill + write config
|
|
407
396
|
const dest = join(cwd, ".agents", "skills", "patchcord");
|