polydev-ai 1.9.50 → 1.9.52

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.
package/mcp/manifest.json CHANGED
@@ -259,6 +259,10 @@
259
259
  "feedback_text": {
260
260
  "type": "string",
261
261
  "description": "Optional: why you ranked them this way"
262
+ },
263
+ "base_model": {
264
+ "type": "string",
265
+ "description": "IMPORTANT: Identify yourself — pass YOUR model name/ID (e.g. 'claude-opus-4-6', 'claude-sonnet-4-5', 'gpt-5.3-codex', 'gemini-3-pro'). This tracks which AI judge made the ranking."
262
266
  }
263
267
  },
264
268
  "required": ["ranked_models"]
@@ -459,7 +459,51 @@ Token will be saved automatically after login.`
459
459
  if (toolName === 'get_perspectives' || toolName === 'polydev.get_perspectives') {
460
460
  return await this.handleGetPerspectivesWithCLIs(params, id);
461
461
  }
462
-
462
+
463
+ // Enrich rank_perspectives with IDE + base model info before forwarding
464
+ if (toolName === 'rank_perspectives' || toolName === 'polydev.rank_perspectives') {
465
+ if (params.arguments) {
466
+ // Always inject IDE info from MCP clientInfo (set during initialize handshake)
467
+ // Known clientInfo.name values from MCP clients:
468
+ // claude-code, Claude Desktop, cursor, windsurf, cline, continue,
469
+ // github-copilot-developer, vscode, jetbrains
470
+ if (!params.arguments.ide && this.clientInfo?.name) {
471
+ params.arguments.ide = this.clientInfo.name;
472
+ if (this.clientInfo.version) {
473
+ params.arguments.ide_version = this.clientInfo.version;
474
+ }
475
+ }
476
+
477
+ // If model didn't self-identify, infer base_model from IDE name
478
+ // Note: This is a fallback — the model's own self-report (from tool args) is preferred
479
+ if (!params.arguments.base_model && this.clientInfo?.name) {
480
+ const ideName = (this.clientInfo.name || '').toLowerCase();
481
+ // Map IDE name → likely base model family (not specific model version)
482
+ if (ideName.includes('claude')) {
483
+ params.arguments.base_model = 'claude'; // Could be opus, sonnet, haiku
484
+ } else if (ideName.includes('cursor')) {
485
+ params.arguments.base_model = 'cursor'; // Could be claude, gpt, etc.
486
+ } else if (ideName.includes('windsurf') || ideName.includes('codeium')) {
487
+ params.arguments.base_model = 'windsurf';
488
+ } else if (ideName.includes('cline')) {
489
+ params.arguments.base_model = 'cline';
490
+ } else if (ideName.includes('continue')) {
491
+ params.arguments.base_model = 'continue';
492
+ } else if (ideName.includes('codex')) {
493
+ params.arguments.base_model = 'codex';
494
+ } else if (ideName.includes('gemini')) {
495
+ params.arguments.base_model = 'gemini';
496
+ } else {
497
+ params.arguments.base_model = ideName;
498
+ }
499
+ }
500
+
501
+ if (!params.arguments.client_id) {
502
+ params.arguments.client_id = 'stdio-wrapper';
503
+ }
504
+ }
505
+ }
506
+
463
507
  // Handle CLI tools locally (support both prefixed and unprefixed names)
464
508
  if (this.isCliTool(toolName)) {
465
509
  return await this.handleLocalCliTool(request);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.9.50",
3
+ "version": "1.9.52",
4
4
  "engines": {
5
5
  "node": ">=20.x <=22.x"
6
6
  },
@@ -78,7 +78,7 @@
78
78
  "marked": "^16.2.1",
79
79
  "next": "^15.5.7",
80
80
  "open": "^11.0.0",
81
- "polydev-ai": "^1.8.90",
81
+ "polydev-ai": "^1.9.51",
82
82
  "posthog-js": "^1.157.2",
83
83
  "prismjs": "^1.30.0",
84
84
  "react": "^18.3.1",