patchcord 0.3.32 → 0.3.34

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 +11 -15
  2. package/package.json +1 -1
package/bin/patchcord.mjs CHANGED
@@ -470,26 +470,17 @@ if (!cmd || cmd === "install" || cmd === "agent") {
470
470
  Authorization: `Bearer ${token}`,
471
471
  },
472
472
  };
473
- // Auto-approve patchcord tools (skip confirmation dialogs)
474
- if (!geminiSettings.tools) geminiSettings.tools = {};
475
- if (!geminiSettings.tools.allowed) geminiSettings.tools.allowed = [];
476
- const patchcordTools = [
477
- "mcp_patchcord_inbox", "mcp_patchcord_send_message", "mcp_patchcord_reply",
478
- "mcp_patchcord_wait_for_message", "mcp_patchcord_attachment",
479
- "mcp_patchcord_recall", "mcp_patchcord_unsend",
480
- ];
481
- for (const t of patchcordTools) {
482
- if (!geminiSettings.tools.allowed.includes(t)) {
483
- geminiSettings.tools.allowed.push(t);
484
- }
473
+ // Clean up deprecated tools.allowed if present (removed in Gemini CLI 1.0)
474
+ if (geminiSettings.tools?.allowed) {
475
+ geminiSettings.tools.allowed = geminiSettings.tools.allowed.filter(t => !t.startsWith("mcp_patchcord_"));
476
+ if (geminiSettings.tools.allowed.length === 0) delete geminiSettings.tools;
485
477
  }
486
478
  mkdirSync(join(process.env.HOME || "", ".gemini"), { recursive: true });
487
479
  writeFileSync(geminiPath, JSON.stringify(geminiSettings, null, 2) + "\n");
488
480
  console.log(`\n ${green}✓${r} Gemini CLI configured: ${dim}${geminiPath}${r}`);
489
- console.log(` ${green}✓${r} Tool auto-approval configured`);
490
481
  console.log(` ${yellow}Global config — all Gemini CLI projects share this agent.${r}`);
491
482
  } else if (isCodex) {
492
- // Codex: copy skill + write config
483
+ // Codex: copy skill + write config + install slash commands
493
484
  const dest = join(cwd, ".agents", "skills", "patchcord");
494
485
  mkdirSync(dest, { recursive: true });
495
486
  cpSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), join(dest, "SKILL.md"));
@@ -502,8 +493,13 @@ if (!cmd || cmd === "install" || cmd === "agent") {
502
493
  existing = existing.trimEnd() + `\n\n[mcp_servers.patchcord]\nurl = "${serverUrl}/mcp/bearer"\nhttp_headers = { "Authorization" = "Bearer ${token}", "X-Patchcord-Client-Type" = "codex" }\n`;
503
494
  writeFileSync(configPath, existing);
504
495
  }
496
+ // Slash commands (.codex/prompts/)
497
+ const codexPromptsDir = join(codexDir, "prompts");
498
+ mkdirSync(codexPromptsDir, { recursive: true });
499
+ cpSync(join(pluginRoot, "skills", "inbox", "SKILL.md"), join(codexPromptsDir, "patchcord.md"));
500
+ cpSync(join(pluginRoot, "skills", "wait", "SKILL.md"), join(codexPromptsDir, "patchcord-wait.md"));
505
501
  console.log(`\n ${green}✓${r} Codex configured: ${dim}${configPath}${r}`);
506
- console.log(` ${green}✓${r} Skill installed`);
502
+ console.log(` ${green}✓${r} Slash commands: ${dim}/patchcord${r}, ${dim}/patchcord-wait${r}`);
507
503
  } else {
508
504
  // Claude Code: write .mcp.json
509
505
  const mcpPath = join(cwd, ".mcp.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.3.32",
3
+ "version": "0.3.34",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",