polydev-ai 1.8.81 → 1.8.83
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/login.js +93 -28
- package/mcp/manifest.json +2 -2
- package/mcp/stdio-wrapper.js +117 -18
- package/package.json +1 -1
package/mcp/login.js
CHANGED
|
@@ -444,49 +444,114 @@ function getSuccessHTML() {
|
|
|
444
444
|
<html>
|
|
445
445
|
<head>
|
|
446
446
|
<meta charset="utf-8">
|
|
447
|
-
<title>Polydev -
|
|
447
|
+
<title>Polydev - Login Successful</title>
|
|
448
448
|
<style>
|
|
449
449
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
450
|
-
body {
|
|
451
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
452
|
-
display: flex; justify-content: center; align-items: center;
|
|
453
|
-
height: 100vh; background: #
|
|
450
|
+
body {
|
|
451
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
452
|
+
display: flex; justify-content: center; align-items: center;
|
|
453
|
+
min-height: 100vh; background: #fafafa;
|
|
454
|
+
padding: 20px;
|
|
454
455
|
}
|
|
455
|
-
.container {
|
|
456
|
-
text-align: center; padding:
|
|
457
|
-
background: white; border-radius:
|
|
458
|
-
|
|
456
|
+
.container {
|
|
457
|
+
text-align: center; padding: 40px; max-width: 480px; width: 100%;
|
|
458
|
+
background: white; border-radius: 12px;
|
|
459
|
+
border: 1px solid #e5e5e5;
|
|
459
460
|
}
|
|
460
|
-
.logo {
|
|
461
|
-
|
|
462
|
-
|
|
461
|
+
.logo {
|
|
462
|
+
width: 64px; height: 64px; margin: 0 auto 16px;
|
|
463
|
+
background: #111; border-radius: 14px;
|
|
463
464
|
display: flex; align-items: center; justify-content: center;
|
|
464
|
-
margin: 0 auto 24px; font-size: 24px;
|
|
465
465
|
}
|
|
466
|
-
|
|
467
|
-
|
|
466
|
+
.logo svg { width: 36px; height: 36px; }
|
|
467
|
+
.brand { font-size: 24px; font-weight: 700; color: #111; margin-bottom: 4px; letter-spacing: -0.5px; }
|
|
468
|
+
.tagline { color: #666; font-size: 13px; margin-bottom: 24px; }
|
|
469
|
+
.success-badge {
|
|
470
|
+
display: inline-flex; align-items: center; gap: 8px;
|
|
471
|
+
background: #f0fdf4; color: #166534; padding: 10px 20px;
|
|
472
|
+
border-radius: 6px; font-weight: 600; font-size: 14px;
|
|
473
|
+
margin-bottom: 28px; border: 1px solid #bbf7d0;
|
|
474
|
+
}
|
|
475
|
+
.success-badge svg { width: 18px; height: 18px; }
|
|
476
|
+
.section { text-align: left; margin-bottom: 20px; }
|
|
477
|
+
.section-title { font-size: 11px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
|
|
478
|
+
.api-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
|
|
479
|
+
.api-item {
|
|
480
|
+
padding: 10px; background: #fafafa; border-radius: 6px;
|
|
481
|
+
font-size: 12px; color: #333; text-align: center; border: 1px solid #eee;
|
|
482
|
+
}
|
|
468
483
|
.steps {
|
|
469
|
-
background: #
|
|
470
|
-
margin: 20px
|
|
484
|
+
background: #fafafa; border-radius: 8px; padding: 14px;
|
|
485
|
+
margin-bottom: 20px; text-align: left; border: 1px solid #eee;
|
|
471
486
|
}
|
|
472
|
-
.step { color: #
|
|
487
|
+
.step { color: #333; font-size: 12px; margin-bottom: 8px; display: flex; gap: 10px; }
|
|
473
488
|
.step:last-child { margin-bottom: 0; }
|
|
474
|
-
|
|
475
|
-
|
|
489
|
+
.step-num {
|
|
490
|
+
width: 18px; height: 18px; background: #111; color: white;
|
|
491
|
+
border-radius: 50%; font-size: 10px; font-weight: 600;
|
|
492
|
+
display: flex; align-items: center; justify-content: center; flex-shrink: 0;
|
|
493
|
+
}
|
|
494
|
+
code { background: #eee; padding: 2px 6px; border-radius: 4px; font-size: 11px; }
|
|
495
|
+
.divider { height: 1px; background: #eee; margin: 24px 0; }
|
|
496
|
+
.action-btn {
|
|
497
|
+
display: block; width: 100%; padding: 12px 20px;
|
|
498
|
+
background: #111; color: white; border: none; border-radius: 8px;
|
|
499
|
+
font-size: 14px; font-weight: 600; cursor: pointer;
|
|
500
|
+
text-decoration: none; margin-bottom: 10px;
|
|
501
|
+
transition: background 0.2s;
|
|
502
|
+
}
|
|
503
|
+
.action-btn:hover { background: #333; }
|
|
504
|
+
.secondary-btn {
|
|
505
|
+
display: block; width: 100%; padding: 10px 20px;
|
|
506
|
+
background: white; color: #333; border: 1px solid #ddd; border-radius: 8px;
|
|
507
|
+
font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none;
|
|
508
|
+
}
|
|
509
|
+
.secondary-btn:hover { background: #fafafa; }
|
|
510
|
+
.note { color: #999; font-size: 11px; margin-top: 16px; }
|
|
476
511
|
</style>
|
|
477
512
|
</head>
|
|
478
513
|
<body>
|
|
479
514
|
<div class="container">
|
|
480
|
-
<div class="logo">
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
515
|
+
<div class="logo">
|
|
516
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
517
|
+
<path d="M12 2L2 7L12 12L22 7L12 2Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
518
|
+
<path d="M2 17L12 22L22 17" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
519
|
+
<path d="M2 12L12 17L22 12" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
520
|
+
</svg>
|
|
521
|
+
</div>
|
|
522
|
+
<div class="brand">Polydev</div>
|
|
523
|
+
<div class="tagline">Multi-Model AI Perspectives</div>
|
|
524
|
+
|
|
525
|
+
<div class="success-badge">
|
|
526
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
527
|
+
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>
|
|
528
|
+
<polyline points="22 4 12 14.01 9 11.01"/>
|
|
529
|
+
</svg>
|
|
530
|
+
Login Successful
|
|
531
|
+
</div>
|
|
532
|
+
|
|
533
|
+
<div class="section">
|
|
534
|
+
<div class="section-title">API Models Available</div>
|
|
535
|
+
<div class="api-grid">
|
|
536
|
+
<div class="api-item">GPT-5.2</div>
|
|
537
|
+
<div class="api-item">Claude Opus</div>
|
|
538
|
+
<div class="api-item">Gemini 3</div>
|
|
539
|
+
<div class="api-item">Grok 4.1</div>
|
|
540
|
+
</div>
|
|
541
|
+
</div>
|
|
542
|
+
|
|
484
543
|
<div class="steps">
|
|
485
|
-
<div class="step">1
|
|
486
|
-
<div class="step">2
|
|
487
|
-
<div class="step">3
|
|
544
|
+
<div class="step"><span class="step-num">1</span>Restart terminal or run <code>source ~/.zshrc</code></div>
|
|
545
|
+
<div class="step"><span class="step-num">2</span>Start your IDE (Claude Code, Cursor, etc.)</div>
|
|
546
|
+
<div class="step"><span class="step-num">3</span>Use <code>get_perspectives</code> tool</div>
|
|
488
547
|
</div>
|
|
489
|
-
|
|
548
|
+
|
|
549
|
+
<a href="https://www.polydev.ai/dashboard/models" target="_blank" class="action-btn">
|
|
550
|
+
Configure API Keys
|
|
551
|
+
</a>
|
|
552
|
+
<button onclick="window.close()" class="secondary-btn">Close Window</button>
|
|
553
|
+
|
|
554
|
+
<p class="note">Your token has been saved automatically</p>
|
|
490
555
|
</div>
|
|
491
556
|
</body>
|
|
492
557
|
</html>`;
|
package/mcp/manifest.json
CHANGED
package/mcp/stdio-wrapper.js
CHANGED
|
@@ -411,7 +411,7 @@ class StdioMCPWrapper {
|
|
|
411
411
|
result: {
|
|
412
412
|
content: [{
|
|
413
413
|
type: 'text',
|
|
414
|
-
text: `Already authenticated.\n\nYour token is configured. Use get_perspectives to query multiple AI models.\n\nTo re-login, run in terminal: npx polydev-ai
|
|
414
|
+
text: `Already authenticated.\n\nYour token is configured. Use get_perspectives to query multiple AI models.\n\nTo re-login, run in terminal: npx polydev-ai`
|
|
415
415
|
}]
|
|
416
416
|
}
|
|
417
417
|
});
|
|
@@ -680,33 +680,133 @@ class StdioMCPWrapper {
|
|
|
680
680
|
* Get login success HTML page
|
|
681
681
|
*/
|
|
682
682
|
getLoginSuccessHTML() {
|
|
683
|
+
// Get CLI status for display
|
|
684
|
+
const cliStatus = this.cliManager ? this.cliManager.getCachedStatus() : {};
|
|
685
|
+
const detectedCLIs = Object.entries(cliStatus)
|
|
686
|
+
.filter(([_, status]) => status && status.available)
|
|
687
|
+
.map(([id, status]) => ({
|
|
688
|
+
name: id === 'claude_code' ? 'Claude Code' :
|
|
689
|
+
id === 'codex_cli' ? 'Codex CLI' :
|
|
690
|
+
id === 'gemini_cli' ? 'Gemini CLI' : id,
|
|
691
|
+
authenticated: status.authenticated
|
|
692
|
+
}));
|
|
693
|
+
|
|
694
|
+
const cliListHTML = detectedCLIs.length > 0
|
|
695
|
+
? detectedCLIs.map(cli =>
|
|
696
|
+
`<div class="cli-item"><span class="cli-dot ${cli.authenticated ? 'green' : 'yellow'}"></span>${cli.name}</div>`
|
|
697
|
+
).join('')
|
|
698
|
+
: '<div class="cli-item"><span class="cli-dot gray"></span>No local CLIs detected</div>';
|
|
699
|
+
|
|
683
700
|
return `<!DOCTYPE html>
|
|
684
701
|
<html>
|
|
685
702
|
<head>
|
|
686
703
|
<meta charset="utf-8">
|
|
687
|
-
<title>Polydev -
|
|
704
|
+
<title>Polydev - Login Successful</title>
|
|
688
705
|
<style>
|
|
689
706
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
690
|
-
body {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
.
|
|
697
|
-
|
|
707
|
+
body {
|
|
708
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
709
|
+
display: flex; justify-content: center; align-items: center;
|
|
710
|
+
min-height: 100vh; background: #fafafa;
|
|
711
|
+
padding: 20px;
|
|
712
|
+
}
|
|
713
|
+
.container {
|
|
714
|
+
text-align: center; padding: 40px; max-width: 480px; width: 100%;
|
|
715
|
+
background: white; border-radius: 12px;
|
|
716
|
+
border: 1px solid #e5e5e5;
|
|
717
|
+
}
|
|
718
|
+
.logo {
|
|
719
|
+
width: 64px; height: 64px; margin: 0 auto 16px;
|
|
720
|
+
background: #111; border-radius: 14px;
|
|
721
|
+
display: flex; align-items: center; justify-content: center;
|
|
722
|
+
}
|
|
723
|
+
.logo svg { width: 36px; height: 36px; }
|
|
724
|
+
.brand { font-size: 24px; font-weight: 700; color: #111; margin-bottom: 4px; letter-spacing: -0.5px; }
|
|
725
|
+
.tagline { color: #666; font-size: 13px; margin-bottom: 24px; }
|
|
726
|
+
.success-badge {
|
|
727
|
+
display: inline-flex; align-items: center; gap: 8px;
|
|
728
|
+
background: #f0fdf4; color: #166534; padding: 10px 20px;
|
|
729
|
+
border-radius: 6px; font-weight: 600; font-size: 14px;
|
|
730
|
+
margin-bottom: 28px; border: 1px solid #bbf7d0;
|
|
731
|
+
}
|
|
732
|
+
.success-badge svg { width: 18px; height: 18px; }
|
|
733
|
+
.section { text-align: left; margin-bottom: 20px; }
|
|
734
|
+
.section-title { font-size: 11px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
|
|
735
|
+
.cli-item {
|
|
736
|
+
display: flex; align-items: center; gap: 10px;
|
|
737
|
+
padding: 10px 12px; background: #fafafa; border-radius: 6px;
|
|
738
|
+
margin-bottom: 6px; font-size: 13px; color: #333; border: 1px solid #eee;
|
|
739
|
+
}
|
|
740
|
+
.cli-dot { width: 8px; height: 8px; border-radius: 50%; }
|
|
741
|
+
.cli-dot.green { background: #22c55e; }
|
|
742
|
+
.cli-dot.yellow { background: #eab308; }
|
|
743
|
+
.cli-dot.gray { background: #d4d4d4; }
|
|
744
|
+
.api-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
|
|
745
|
+
.api-item {
|
|
746
|
+
padding: 10px; background: #fafafa; border-radius: 6px;
|
|
747
|
+
font-size: 12px; color: #333; text-align: center; border: 1px solid #eee;
|
|
748
|
+
}
|
|
749
|
+
.divider { height: 1px; background: #eee; margin: 24px 0; }
|
|
750
|
+
.action-btn {
|
|
751
|
+
display: block; width: 100%; padding: 12px 20px;
|
|
752
|
+
background: #111; color: white; border: none; border-radius: 8px;
|
|
753
|
+
font-size: 14px; font-weight: 600; cursor: pointer;
|
|
754
|
+
text-decoration: none; margin-bottom: 10px;
|
|
755
|
+
transition: background 0.2s;
|
|
756
|
+
}
|
|
757
|
+
.action-btn:hover { background: #333; }
|
|
758
|
+
.secondary-btn {
|
|
759
|
+
display: block; width: 100%; padding: 10px 20px;
|
|
760
|
+
background: white; color: #333; border: 1px solid #ddd; border-radius: 8px;
|
|
761
|
+
font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none;
|
|
762
|
+
}
|
|
763
|
+
.secondary-btn:hover { background: #fafafa; }
|
|
764
|
+
.note { color: #999; font-size: 11px; margin-top: 16px; }
|
|
698
765
|
</style>
|
|
699
766
|
</head>
|
|
700
767
|
<body>
|
|
701
768
|
<div class="container">
|
|
702
|
-
<div class="logo">
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
769
|
+
<div class="logo">
|
|
770
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
771
|
+
<path d="M12 2L2 7L12 12L22 7L12 2Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
772
|
+
<path d="M2 17L12 22L22 17" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
773
|
+
<path d="M2 12L12 17L22 12" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
774
|
+
</svg>
|
|
775
|
+
</div>
|
|
776
|
+
<div class="brand">Polydev</div>
|
|
777
|
+
<div class="tagline">Multi-Model AI Perspectives</div>
|
|
778
|
+
|
|
779
|
+
<div class="success-badge">
|
|
780
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
781
|
+
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>
|
|
782
|
+
<polyline points="22 4 12 14.01 9 11.01"/>
|
|
783
|
+
</svg>
|
|
784
|
+
Login Successful
|
|
785
|
+
</div>
|
|
786
|
+
|
|
787
|
+
<div class="section">
|
|
788
|
+
<div class="section-title">Local CLI Tools (Free)</div>
|
|
789
|
+
\${cliListHTML}
|
|
708
790
|
</div>
|
|
709
|
-
|
|
791
|
+
|
|
792
|
+
<div class="section">
|
|
793
|
+
<div class="section-title">API Models Available</div>
|
|
794
|
+
<div class="api-grid">
|
|
795
|
+
<div class="api-item">GPT-5.2</div>
|
|
796
|
+
<div class="api-item">Claude Opus</div>
|
|
797
|
+
<div class="api-item">Gemini 3</div>
|
|
798
|
+
<div class="api-item">Grok 4.1</div>
|
|
799
|
+
</div>
|
|
800
|
+
</div>
|
|
801
|
+
|
|
802
|
+
<div class="divider"></div>
|
|
803
|
+
|
|
804
|
+
<a href="https://www.polydev.ai/dashboard/models" target="_blank" class="action-btn">
|
|
805
|
+
Configure API Keys
|
|
806
|
+
</a>
|
|
807
|
+
<button onclick="window.close()" class="secondary-btn">Close Window</button>
|
|
808
|
+
|
|
809
|
+
<p class="note">Restart your IDE to use the new token</p>
|
|
710
810
|
</div>
|
|
711
811
|
</body>
|
|
712
812
|
</html>`;
|
|
@@ -2196,7 +2296,6 @@ class StdioMCPWrapper {
|
|
|
2196
2296
|
|
|
2197
2297
|
if (response.ok) {
|
|
2198
2298
|
const data = await response.json();
|
|
2199
|
-
this.isAuthenticated = true;
|
|
2200
2299
|
const credits = data.credits_remaining?.toLocaleString() || 0;
|
|
2201
2300
|
const tier = data.subscription_tier || 'Free';
|
|
2202
2301
|
|