patchcord 0.3.31 → 0.3.33

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.
Files changed (2) hide show
  1. package/bin/patchcord.mjs +59 -20
  2. package/package.json +1 -1
package/bin/patchcord.mjs CHANGED
@@ -109,29 +109,58 @@ if (!cmd || cmd === "install" || cmd === "agent") {
109
109
  }
110
110
 
111
111
  // Cursor
112
- const cursorSkillDir = join(process.env.HOME || "", ".cursor", "skills-cursor", "patchcord");
113
112
  const cursorSkillsRoot = join(process.env.HOME || "", ".cursor", "skills-cursor");
114
- if (existsSync(cursorSkillsRoot) && !existsSync(cursorSkillDir)) {
115
- mkdirSync(cursorSkillDir, { recursive: true });
116
- cpSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), join(cursorSkillDir, "SKILL.md"));
117
- globalChanges.push("Cursor skill installed");
113
+ if (existsSync(cursorSkillsRoot)) {
114
+ const cursorSkillDir = join(cursorSkillsRoot, "patchcord");
115
+ const cursorWaitDir = join(cursorSkillsRoot, "patchcord-wait");
116
+ let cursorChanged = false;
117
+ if (!existsSync(cursorSkillDir)) {
118
+ mkdirSync(cursorSkillDir, { recursive: true });
119
+ cpSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), join(cursorSkillDir, "SKILL.md"));
120
+ cursorChanged = true;
121
+ }
122
+ if (!existsSync(cursorWaitDir)) {
123
+ mkdirSync(cursorWaitDir, { recursive: true });
124
+ cpSync(join(pluginRoot, "skills", "wait", "SKILL.md"), join(cursorWaitDir, "SKILL.md"));
125
+ cursorChanged = true;
126
+ }
127
+ if (cursorChanged) globalChanges.push("Cursor skills installed");
118
128
  }
119
129
 
120
130
  // Windsurf
121
- const windsurfSkillDir = join(process.env.HOME || "", ".codeium", "windsurf", "skills", "patchcord");
122
- const windsurfSkillsRoot = join(process.env.HOME || "", ".codeium", "windsurf", "skills");
123
- if (existsSync(join(process.env.HOME || "", ".codeium", "windsurf")) && !existsSync(windsurfSkillDir)) {
124
- mkdirSync(windsurfSkillDir, { recursive: true });
125
- cpSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), join(windsurfSkillDir, "SKILL.md"));
126
- globalChanges.push("Windsurf skill installed");
131
+ if (existsSync(join(process.env.HOME || "", ".codeium", "windsurf"))) {
132
+ const windsurfSkillDir = join(process.env.HOME || "", ".codeium", "windsurf", "skills", "patchcord");
133
+ const windsurfWaitDir = join(process.env.HOME || "", ".codeium", "windsurf", "skills", "patchcord-wait");
134
+ let windsurfChanged = false;
135
+ if (!existsSync(windsurfSkillDir)) {
136
+ mkdirSync(windsurfSkillDir, { recursive: true });
137
+ cpSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), join(windsurfSkillDir, "SKILL.md"));
138
+ windsurfChanged = true;
139
+ }
140
+ if (!existsSync(windsurfWaitDir)) {
141
+ mkdirSync(windsurfWaitDir, { recursive: true });
142
+ cpSync(join(pluginRoot, "skills", "wait", "SKILL.md"), join(windsurfWaitDir, "SKILL.md"));
143
+ windsurfChanged = true;
144
+ }
145
+ if (windsurfChanged) globalChanges.push("Windsurf skills installed");
127
146
  }
128
147
 
129
148
  // Gemini CLI
130
- const geminiSkillDir = join(process.env.HOME || "", ".gemini", "skills", "patchcord");
131
- if (existsSync(join(process.env.HOME || "", ".gemini")) && !existsSync(geminiSkillDir)) {
132
- mkdirSync(geminiSkillDir, { recursive: true });
133
- cpSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), join(geminiSkillDir, "SKILL.md"));
134
- globalChanges.push("Gemini CLI skill installed");
149
+ if (existsSync(join(process.env.HOME || "", ".gemini"))) {
150
+ const geminiSkillDir = join(process.env.HOME || "", ".gemini", "skills", "patchcord");
151
+ const geminiWaitDir = join(process.env.HOME || "", ".gemini", "skills", "patchcord-wait");
152
+ let geminiChanged = false;
153
+ if (!existsSync(geminiSkillDir)) {
154
+ mkdirSync(geminiSkillDir, { recursive: true });
155
+ cpSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), join(geminiSkillDir, "SKILL.md"));
156
+ geminiChanged = true;
157
+ }
158
+ if (!existsSync(geminiWaitDir)) {
159
+ mkdirSync(geminiWaitDir, { recursive: true });
160
+ cpSync(join(pluginRoot, "skills", "wait", "SKILL.md"), join(geminiWaitDir, "SKILL.md"));
161
+ geminiChanged = true;
162
+ }
163
+ if (geminiChanged) globalChanges.push("Gemini CLI skills installed");
135
164
  }
136
165
 
137
166
  // Codex CLI
@@ -417,9 +446,14 @@ if (!cmd || cmd === "install" || cmd === "agent") {
417
446
  mkdirSync(join(process.env.HOME || "", ".codeium", "windsurf"), { recursive: true });
418
447
  writeFileSync(wsPath, JSON.stringify(wsConfig, null, 2) + "\n");
419
448
  }
449
+ // Install workflows as slash commands (.windsurf/workflows/) — per-project
450
+ const wsWorkflowDir = join(cwd, ".windsurf", "workflows");
451
+ mkdirSync(wsWorkflowDir, { recursive: true });
452
+ cpSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), join(wsWorkflowDir, "patchcord.md"));
453
+ cpSync(join(pluginRoot, "skills", "wait", "SKILL.md"), join(wsWorkflowDir, "patchcord-wait.md"));
420
454
  console.log(`\n ${green}✓${r} Windsurf configured: ${dim}${wsPath}${r}`);
421
- console.log(` ${yellow}Global config all Windsurf projects share this agent.${r}`);
422
- console.log(` ${dim}Windsurf does not support per-project MCP configs.${r}`);
455
+ console.log(` ${green}✓${r} Workflows installed: ${dim}/patchcord${r}, ${dim}/patchcord-wait${r}`);
456
+ console.log(` ${yellow}MCP config is global all Windsurf projects share this agent.${r}`);
423
457
  } else if (isGemini) {
424
458
  // Gemini CLI: global only (~/.gemini/settings.json)
425
459
  const geminiPath = join(process.env.HOME || "", ".gemini", "settings.json");
@@ -455,7 +489,7 @@ if (!cmd || cmd === "install" || cmd === "agent") {
455
489
  console.log(` ${green}✓${r} Tool auto-approval configured`);
456
490
  console.log(` ${yellow}Global config — all Gemini CLI projects share this agent.${r}`);
457
491
  } else if (isCodex) {
458
- // Codex: copy skill + write config
492
+ // Codex: copy skill + write config + install slash commands
459
493
  const dest = join(cwd, ".agents", "skills", "patchcord");
460
494
  mkdirSync(dest, { recursive: true });
461
495
  cpSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), join(dest, "SKILL.md"));
@@ -468,8 +502,13 @@ if (!cmd || cmd === "install" || cmd === "agent") {
468
502
  existing = existing.trimEnd() + `\n\n[mcp_servers.patchcord]\nurl = "${serverUrl}/mcp/bearer"\nhttp_headers = { "Authorization" = "Bearer ${token}", "X-Patchcord-Client-Type" = "codex" }\n`;
469
503
  writeFileSync(configPath, existing);
470
504
  }
505
+ // Slash commands (.codex/prompts/)
506
+ const codexPromptsDir = join(codexDir, "prompts");
507
+ mkdirSync(codexPromptsDir, { recursive: true });
508
+ cpSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), join(codexPromptsDir, "patchcord.md"));
509
+ cpSync(join(pluginRoot, "skills", "wait", "SKILL.md"), join(codexPromptsDir, "patchcord-wait.md"));
471
510
  console.log(`\n ${green}✓${r} Codex configured: ${dim}${configPath}${r}`);
472
- console.log(` ${green}✓${r} Skill installed`);
511
+ console.log(` ${green}✓${r} Slash commands: ${dim}/patchcord${r}, ${dim}/patchcord-wait${r}`);
473
512
  } else {
474
513
  // Claude Code: write .mcp.json
475
514
  const mcpPath = join(cwd, ".mcp.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.3.31",
3
+ "version": "0.3.33",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",