polydev-ai 1.8.88 → 1.8.90

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.
@@ -470,6 +470,7 @@ To re-login: npx polydev-ai`
470
470
 
471
471
  console.error('[Polydev] Login successful, token saved');
472
472
 
473
+ // Wait 7 seconds before closing server (gives time for 5s auto-close countdown + buffer)
473
474
  setTimeout(() => {
474
475
  server.close();
475
476
  resolve({
@@ -497,7 +498,7 @@ To re-login: npx polydev-ai`
497
498
  }]
498
499
  }
499
500
  });
500
- }, 500);
501
+ }, 7000);
501
502
  } else {
502
503
  res.writeHead(400, { 'Content-Type': 'text/plain' });
503
504
  res.end('Invalid or missing token');
@@ -589,16 +590,15 @@ After login, restart your IDE.`
589
590
  }
590
591
 
591
592
  try {
592
- // Fetch account status and CLI status in parallel
593
+ // Fetch account status from simple REST endpoint (not JSON-RPC)
593
594
  const [accountResponse, cliStatus] = await Promise.all([
594
- fetch('https://www.polydev.ai/api/mcp', {
595
+ fetch('https://www.polydev.ai/api/auth/status', {
595
596
  method: 'POST',
596
597
  headers: {
597
598
  'Content-Type': 'application/json',
598
599
  'Authorization': `Bearer ${this.userToken}`,
599
600
  'User-Agent': 'polydev-stdio-wrapper/1.0.0'
600
- },
601
- body: JSON.stringify({ action: 'check_status' })
601
+ }
602
602
  }),
603
603
  this.cliManager?.getQuickStatus?.() || null
604
604
  ]);
@@ -894,6 +894,16 @@ Error: ${error.message}`
894
894
  }
895
895
  .secondary-btn:hover { background: #fafafa; }
896
896
  .note { color: #999; font-size: 11px; margin-top: 16px; }
897
+ .countdown {
898
+ color: #666; font-size: 12px; margin-top: 8px;
899
+ display: flex; align-items: center; justify-content: center; gap: 6px;
900
+ }
901
+ .countdown-spinner {
902
+ width: 12px; height: 12px; border: 2px solid #e5e5e5;
903
+ border-top-color: #666; border-radius: 50%;
904
+ animation: spin 1s linear infinite;
905
+ }
906
+ @keyframes spin { to { transform: rotate(360deg); } }
897
907
  </style>
898
908
  </head>
899
909
  <body>
@@ -938,8 +948,29 @@ Error: ${error.message}`
938
948
  </a>
939
949
  <button onclick="window.close()" class="secondary-btn">Close Window</button>
940
950
 
941
- <p class="note">Restart your IDE to use the new token</p>
951
+ <p class="note">✓ Token saved. Restart your IDE to activate.</p>
952
+ <div class="countdown" id="countdown">
953
+ <div class="countdown-spinner"></div>
954
+ <span>Closing in <strong id="seconds">5</strong>s...</span>
955
+ </div>
942
956
  </div>
957
+ <script>
958
+ // Auto-close countdown
959
+ let seconds = 5;
960
+ const interval = setInterval(() => {
961
+ seconds--;
962
+ document.getElementById('seconds').textContent = seconds;
963
+ if (seconds <= 0) {
964
+ clearInterval(interval);
965
+ document.getElementById('countdown').innerHTML = 'Closing...';
966
+ window.close();
967
+ // Fallback: if window.close() doesn't work, hide countdown
968
+ setTimeout(() => {
969
+ document.getElementById('countdown').innerHTML = 'You can close this tab now.';
970
+ }, 500);
971
+ }
972
+ }, 1000);
973
+ </script>
943
974
  </body>
944
975
  </html>`;
945
976
  }
@@ -1396,7 +1427,7 @@ Error: ${error.message}`
1396
1427
  if (this._cliDetectionReady && !this._cliDetectionComplete) {
1397
1428
  console.error('[Stdio Wrapper] Waiting for initial CLI detection to complete...');
1398
1429
  await this._cliDetectionReady;
1399
- console.error('[Stdio Wrapper] CLI detection ready, proceeding with request');
1430
+ console.error('[Polydev] CLI detection ready, proceeding with request');
1400
1431
  }
1401
1432
 
1402
1433
  const results = await this.cliManager.forceCliDetection();
@@ -2372,6 +2403,7 @@ Error: ${error.message}`
2372
2403
 
2373
2404
  console.error('[Polydev] Login successful, token saved');
2374
2405
 
2406
+ // Wait 7 seconds before closing server (gives time for 5s auto-close countdown + buffer)
2375
2407
  setTimeout(() => {
2376
2408
  server.close();
2377
2409
  resolve({
@@ -2399,7 +2431,7 @@ Error: ${error.message}`
2399
2431
  }]
2400
2432
  }
2401
2433
  });
2402
- }, 500);
2434
+ }, 7000);
2403
2435
  } else {
2404
2436
  res.writeHead(400, { 'Content-Type': 'text/plain' });
2405
2437
  res.end('Invalid or missing token');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.8.88",
3
+ "version": "1.8.90",
4
4
  "engines": {
5
5
  "node": ">=20.x <=22.x"
6
6
  },