patchcord 0.3.26 → 0.3.28
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 +24 -32
- 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.28",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "ppravdin"
|
|
7
7
|
},
|
package/bin/patchcord.mjs
CHANGED
|
@@ -156,15 +156,6 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
156
156
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
157
157
|
const ask = (q) => new Promise((resolve) => rl.question(q, resolve));
|
|
158
158
|
|
|
159
|
-
// Project directory confirmation
|
|
160
|
-
console.log(`\n${dim}Project folder:${r} ${bold}${cwd}${r}`);
|
|
161
|
-
console.log(`${dim}Patchcord config will be created here. Run this in your project folder.${r}`);
|
|
162
|
-
const proceed = (await ask(`\n${dim}Continue? (Y/n):${r} `)).trim().toLowerCase();
|
|
163
|
-
if (proceed === "n" || proceed === "no") {
|
|
164
|
-
rl.close();
|
|
165
|
-
process.exit(0);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
159
|
console.log(`\n${bold}Which tool are you setting up?${r}\n`);
|
|
169
160
|
console.log(` ${cyan}1.${r} Claude Code`);
|
|
170
161
|
console.log(` ${cyan}2.${r} Codex CLI`);
|
|
@@ -182,6 +173,18 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
182
173
|
process.exit(1);
|
|
183
174
|
}
|
|
184
175
|
|
|
176
|
+
if (isWindsurf) {
|
|
177
|
+
console.log(`\n ${yellow}Note: Windsurf uses global config — applies to all projects.${r}`);
|
|
178
|
+
} else {
|
|
179
|
+
console.log(`\n${dim}Project folder:${r} ${bold}${cwd}${r}`);
|
|
180
|
+
console.log(`${dim}Config will be created here. Run this in your project folder.${r}`);
|
|
181
|
+
const proceed = (await ask(`${dim}Continue? (Y/n):${r} `)).trim().toLowerCase();
|
|
182
|
+
if (proceed === "n" || proceed === "no") {
|
|
183
|
+
rl.close();
|
|
184
|
+
process.exit(0);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
185
188
|
|
|
186
189
|
// Check if already configured
|
|
187
190
|
if (!isCodex) {
|
|
@@ -233,13 +236,14 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
233
236
|
} catch {}
|
|
234
237
|
}
|
|
235
238
|
} else if (isWindsurf) {
|
|
236
|
-
//
|
|
237
|
-
const wsPath = join(
|
|
239
|
+
// Windsurf is global only
|
|
240
|
+
const wsPath = join(process.env.HOME || "", ".codeium", "windsurf", "mcp_config.json");
|
|
238
241
|
if (existsSync(wsPath)) {
|
|
239
242
|
try {
|
|
240
|
-
const
|
|
243
|
+
const content = readFileSync(wsPath, "utf-8").trim();
|
|
244
|
+
const existing = content ? JSON.parse(content) : {};
|
|
241
245
|
if (existing.mcpServers?.patchcord) {
|
|
242
|
-
console.log(`\n ${yellow}⚠ Windsurf already configured
|
|
246
|
+
console.log(`\n ${yellow}⚠ Windsurf already configured${r}`);
|
|
243
247
|
console.log(` ${dim}${wsPath}${r}`);
|
|
244
248
|
const replace = (await ask(` ${dim}Replace? (y/N):${r} `)).trim().toLowerCase();
|
|
245
249
|
if (replace !== "y" && replace !== "yes") {
|
|
@@ -250,19 +254,6 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
250
254
|
}
|
|
251
255
|
} catch {}
|
|
252
256
|
}
|
|
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
257
|
} else {
|
|
267
258
|
const configPath = join(cwd, ".codex", "config.toml");
|
|
268
259
|
if (existsSync(configPath)) {
|
|
@@ -370,10 +361,8 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
370
361
|
console.log(`\n ${green}✓${r} Cursor configured: ${dim}${cursorPath}${r}`);
|
|
371
362
|
console.log(` ${dim}Per-project only — other projects won't see this agent.${r}`);
|
|
372
363
|
} else if (isWindsurf) {
|
|
373
|
-
// Windsurf:
|
|
374
|
-
const
|
|
375
|
-
mkdirSync(wsDir, { recursive: true });
|
|
376
|
-
const wsPath = join(wsDir, "mcp.json");
|
|
364
|
+
// Windsurf: global only (~/.codeium/windsurf/mcp_config.json)
|
|
365
|
+
const wsPath = join(process.env.HOME || "", ".codeium", "windsurf", "mcp_config.json");
|
|
377
366
|
const wsConfig = {
|
|
378
367
|
mcpServers: {
|
|
379
368
|
patchcord: {
|
|
@@ -390,7 +379,8 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
390
379
|
|
|
391
380
|
if (existsSync(wsPath)) {
|
|
392
381
|
try {
|
|
393
|
-
const
|
|
382
|
+
const content = readFileSync(wsPath, "utf-8").trim();
|
|
383
|
+
const existing = content ? JSON.parse(content) : {};
|
|
394
384
|
existing.mcpServers = existing.mcpServers || {};
|
|
395
385
|
existing.mcpServers.patchcord = wsConfig.mcpServers.patchcord;
|
|
396
386
|
writeFileSync(wsPath, JSON.stringify(existing, null, 2) + "\n");
|
|
@@ -398,10 +388,12 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
398
388
|
writeFileSync(wsPath, JSON.stringify(wsConfig, null, 2) + "\n");
|
|
399
389
|
}
|
|
400
390
|
} else {
|
|
391
|
+
mkdirSync(join(process.env.HOME || "", ".codeium", "windsurf"), { recursive: true });
|
|
401
392
|
writeFileSync(wsPath, JSON.stringify(wsConfig, null, 2) + "\n");
|
|
402
393
|
}
|
|
403
394
|
console.log(`\n ${green}✓${r} Windsurf configured: ${dim}${wsPath}${r}`);
|
|
404
|
-
console.log(` ${
|
|
395
|
+
console.log(` ${yellow}Global config — all Windsurf projects share this agent.${r}`);
|
|
396
|
+
console.log(` ${dim}Windsurf does not support per-project MCP configs.${r}`);
|
|
405
397
|
} else if (isCodex) {
|
|
406
398
|
// Codex: copy skill + write config
|
|
407
399
|
const dest = join(cwd, ".agents", "skills", "patchcord");
|