patchcord 0.3.17 → 0.3.18

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.
@@ -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.17",
4
+ "version": "0.3.18",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/bin/patchcord.mjs CHANGED
@@ -171,6 +171,44 @@ if (cmd === "agent") {
171
171
  process.exit(1);
172
172
  }
173
173
 
174
+ const yellow = "\x1b[33m";
175
+
176
+ // Check if already configured
177
+ if (!isCodex) {
178
+ const mcpPath = join(cwd, ".mcp.json");
179
+ if (existsSync(mcpPath)) {
180
+ try {
181
+ const existing = JSON.parse(readFileSync(mcpPath, "utf-8"));
182
+ if (existing.mcpServers?.patchcord) {
183
+ const existingToken = existing.mcpServers.patchcord.headers?.Authorization || "";
184
+ console.log(`\n ${yellow}⚠ Claude Code already configured in this project${r}`);
185
+ console.log(` ${dim}${mcpPath}${r}`);
186
+ const replace = (await ask(` ${dim}Replace? (y/N):${r} `)).trim().toLowerCase();
187
+ if (replace !== "y" && replace !== "yes") {
188
+ console.log("Keeping existing config.");
189
+ rl.close();
190
+ process.exit(0);
191
+ }
192
+ }
193
+ } catch {}
194
+ }
195
+ } else {
196
+ const configPath = join(cwd, ".codex", "config.toml");
197
+ if (existsSync(configPath)) {
198
+ const content = readFileSync(configPath, "utf-8");
199
+ if (content.includes("[mcp_servers.patchcord]")) {
200
+ console.log(`\n ${yellow}⚠ Codex CLI already configured in this project${r}`);
201
+ console.log(` ${dim}${configPath}${r}`);
202
+ const replace = (await ask(` ${dim}Replace? (y/N):${r} `)).trim().toLowerCase();
203
+ if (replace !== "y" && replace !== "yes") {
204
+ console.log("Keeping existing config.");
205
+ rl.close();
206
+ process.exit(0);
207
+ }
208
+ }
209
+ }
210
+ }
211
+
174
212
  let token = "";
175
213
  let identity = "";
176
214
  let serverUrl = "https://mcp.patchcord.dev";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.3.17",
3
+ "version": "0.3.18",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",