@paigy/mcp 0.19.0 → 0.20.0

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/dist/index.js +20 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -334,13 +334,32 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
334
334
  throw e;
335
335
  }
336
336
  });
337
+ var CLIENT_LABELS = {
338
+ "claude-code": "Claude Code",
339
+ "claude-ai": "Claude",
340
+ cursor: "Cursor",
341
+ "cursor-vscode": "Cursor",
342
+ windsurf: "Windsurf",
343
+ cline: "Cline",
344
+ "roo-cline": "Roo Code",
345
+ continue: "Continue",
346
+ vscode: "VS Code",
347
+ "visual studio code": "VS Code",
348
+ zed: "Zed"
349
+ };
350
+ function suggestedAgentName() {
351
+ if (process.env.PAIGY_AGENT) return process.env.PAIGY_AGENT;
352
+ const raw = server.getClientVersion?.()?.name;
353
+ if (!raw) return void 0;
354
+ return CLIENT_LABELS[raw.toLowerCase()] ?? raw.replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
355
+ }
337
356
  async function handleTool(request) {
338
357
  switch (request.params.name) {
339
358
  case "pair": {
340
359
  const { device_code } = PairSchema.parse(request.params.arguments ?? {});
341
360
  if (!device_code) {
342
361
  const { keyFile, offer } = startE2ee();
343
- const code = await requestCode(void 0, offer);
362
+ const code = await requestCode(suggestedAgentName(), offer);
344
363
  saveKeyFile({ ...keyFile, userCode: code.user_code });
345
364
  writeSurface("pairing code", code.user_code, code.expires_in);
346
365
  startBackgroundPair(code.device_code, code.expires_in * 1e3);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paigy/mcp",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Paigy MCP server — a voice inbox for your AI agents. Lets an agent notify a user and await their reply.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,9 +36,9 @@
36
36
  "tsup": "^8.3.5",
37
37
  "typescript": "^5.7.2",
38
38
  "vitest": "^2.1.8",
39
- "@paigy/crypto": "0.0.0",
40
39
  "@paigy/sdk": "0.1.0",
41
- "@paigy/schema": "0.0.0"
40
+ "@paigy/schema": "0.0.0",
41
+ "@paigy/crypto": "0.0.0"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsup",