patchcord 0.3.16 → 0.3.17

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.16",
4
+ "version": "0.3.17",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/bin/patchcord.mjs CHANGED
@@ -150,11 +150,19 @@ if (cmd === "agent") {
150
150
  const rl = createInterface({ input: process.stdin, output: process.stdout });
151
151
  const ask = (q) => new Promise((resolve) => rl.question(q, resolve));
152
152
 
153
- console.log(`\nWhich tool are you setting up?\n`);
154
- console.log(` 1. Claude Code`);
155
- console.log(` 2. Codex CLI\n`);
156
-
157
- const choice = (await ask("Choose (1/2): ")).trim();
153
+ const dim = "\x1b[2m";
154
+ const green = "\x1b[32m";
155
+ const red = "\x1b[31m";
156
+ const cyan = "\x1b[36m";
157
+ const white = "\x1b[37m";
158
+ const bold = "\x1b[1m";
159
+ const r = "\x1b[0m";
160
+
161
+ console.log(`\n${bold}Which tool are you setting up?${r}\n`);
162
+ console.log(` ${cyan}1.${r} Claude Code`);
163
+ console.log(` ${cyan}2.${r} Codex CLI\n`);
164
+
165
+ const choice = (await ask(`${dim}Choose (1/2):${r} `)).trim();
158
166
  const isCodex = choice === "2";
159
167
 
160
168
  if (choice !== "1" && choice !== "2") {
@@ -168,7 +176,7 @@ if (cmd === "agent") {
168
176
  let serverUrl = "https://mcp.patchcord.dev";
169
177
 
170
178
  while (!identity) {
171
- token = (await ask("\nPaste your agent token: ")).trim();
179
+ token = (await ask(`\n${bold}Paste your agent token:${r} `)).trim();
172
180
 
173
181
  if (!token) {
174
182
  console.error("Token is required. Get one from your patchcord dashboard.");
@@ -182,12 +190,12 @@ if (cmd === "agent") {
182
190
  try {
183
191
  const data = JSON.parse(validateResp);
184
192
  identity = `${data.agent_id}@${data.namespace_id}`;
185
- console.log(` ${identity}`);
193
+ console.log(` ${green}✓${r} ${bold}${identity}${r}`);
186
194
  } catch {}
187
195
  }
188
196
  if (!identity) {
189
- console.log(" Token not recognized");
190
- const retry = (await ask("Try again? (Y/n): ")).trim().toLowerCase();
197
+ console.log(` ${red}✗${r} Token not recognized`);
198
+ const retry = (await ask(`${dim}Try again? (Y/n):${r} `)).trim().toLowerCase();
191
199
  if (retry === "n" || retry === "no") {
192
200
  rl.close();
193
201
  process.exit(1);
@@ -195,7 +203,7 @@ if (cmd === "agent") {
195
203
  }
196
204
  }
197
205
 
198
- const customUrl = (await ask("\nCustom server URL? (y/N): ")).trim().toLowerCase();
206
+ const customUrl = (await ask(`\n${dim}Custom server URL? (y/N):${r} `)).trim().toLowerCase();
199
207
  if (customUrl === "y" || customUrl === "yes") {
200
208
  const url = (await ask("Server URL: ")).trim();
201
209
  if (url) serverUrl = url;
@@ -208,7 +216,7 @@ if (cmd === "agent") {
208
216
  try {
209
217
  const data = JSON.parse(resp2);
210
218
  identity = `${data.agent_id}@${data.namespace_id}`;
211
- console.log(` ${identity}`);
219
+ console.log(` ${green}✓${r} ${bold}${identity}${r}`);
212
220
  } catch {}
213
221
  }
214
222
  }
@@ -230,8 +238,8 @@ if (cmd === "agent") {
230
238
  existing = existing.trimEnd() + `\n\n[mcp_servers.patchcord]\nurl = "${serverUrl}/mcp/bearer"\nhttp_headers = { "Authorization" = "Bearer ${token}", "X-Patchcord-Client-Type" = "codex" }\n`;
231
239
  writeFileSync(configPath, existing);
232
240
  }
233
- console.log(`\n Codex configured: ${configPath}`);
234
- console.log(` Skill installed`);
241
+ console.log(`\n ${green}✓${r} Codex configured: ${dim}${configPath}${r}`);
242
+ console.log(` ${green}✓${r} Skill installed`);
235
243
  } else {
236
244
  // Claude Code: write .mcp.json
237
245
  const mcpPath = join(cwd, ".mcp.json");
@@ -259,10 +267,11 @@ if (cmd === "agent") {
259
267
  } else {
260
268
  writeFileSync(mcpPath, JSON.stringify(mcpConfig, null, 2) + "\n");
261
269
  }
262
- console.log(`\n Claude Code configured: ${mcpPath}`);
270
+ console.log(`\n ${green}✓${r} Claude Code configured: ${dim}${mcpPath}${r}`);
263
271
  }
264
272
 
265
- console.log(`\nRestart your session, then run: inbox()`);
273
+ const toolName = isCodex ? "Codex" : "Claude Code";
274
+ console.log(`\n${dim}Restart your ${toolName} session, then run:${r} ${bold}inbox()${r}`);
266
275
  process.exit(0);
267
276
  }
268
277
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",