erosolar-cli 2.1.203 → 2.1.204

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 (45) hide show
  1. package/dist/core/agentOrchestrator.d.ts +16 -4
  2. package/dist/core/agentOrchestrator.d.ts.map +1 -1
  3. package/dist/core/agentOrchestrator.js +181 -61
  4. package/dist/core/agentOrchestrator.js.map +1 -1
  5. package/dist/core/errors/errorTypes.d.ts +0 -6
  6. package/dist/core/errors/errorTypes.d.ts.map +1 -1
  7. package/dist/core/errors/errorTypes.js +0 -26
  8. package/dist/core/errors/errorTypes.js.map +1 -1
  9. package/dist/shell/interactiveShell.d.ts +0 -1
  10. package/dist/shell/interactiveShell.d.ts.map +1 -1
  11. package/dist/shell/interactiveShell.js +43 -50
  12. package/dist/shell/interactiveShell.js.map +1 -1
  13. package/package.json +1 -1
  14. package/dist/core/LazyLoader.d.ts +0 -129
  15. package/dist/core/LazyLoader.d.ts.map +0 -1
  16. package/dist/core/LazyLoader.js +0 -240
  17. package/dist/core/LazyLoader.js.map +0 -1
  18. package/dist/core/alphaZeroOrchestrator.d.ts +0 -140
  19. package/dist/core/alphaZeroOrchestrator.d.ts.map +0 -1
  20. package/dist/core/alphaZeroOrchestrator.js +0 -418
  21. package/dist/core/alphaZeroOrchestrator.js.map +0 -1
  22. package/dist/core/checkpoint.d.ts +0 -76
  23. package/dist/core/checkpoint.d.ts.map +0 -1
  24. package/dist/core/checkpoint.js +0 -278
  25. package/dist/core/checkpoint.js.map +0 -1
  26. package/dist/core/costTracker.d.ts +0 -87
  27. package/dist/core/costTracker.d.ts.map +0 -1
  28. package/dist/core/costTracker.js +0 -285
  29. package/dist/core/costTracker.js.map +0 -1
  30. package/dist/core/isolatedVerifier.d.ts +0 -40
  31. package/dist/core/isolatedVerifier.d.ts.map +0 -1
  32. package/dist/core/isolatedVerifier.js +0 -129
  33. package/dist/core/isolatedVerifier.js.map +0 -1
  34. package/dist/core/responseVerifier.d.ts +0 -98
  35. package/dist/core/responseVerifier.d.ts.map +0 -1
  36. package/dist/core/responseVerifier.js +0 -509
  37. package/dist/core/responseVerifier.js.map +0 -1
  38. package/dist/core/securityAssessment.d.ts +0 -91
  39. package/dist/core/securityAssessment.d.ts.map +0 -1
  40. package/dist/core/securityAssessment.js +0 -580
  41. package/dist/core/securityAssessment.js.map +0 -1
  42. package/dist/core/verification.d.ts +0 -137
  43. package/dist/core/verification.d.ts.map +0 -1
  44. package/dist/core/verification.js +0 -323
  45. package/dist/core/verification.js.map +0 -1
@@ -5538,14 +5538,15 @@ export class InteractiveShell {
5538
5538
  return;
5539
5539
  }
5540
5540
  const choice = Number.parseInt(trimmed, 10);
5541
- if (!Number.isFinite(choice)) {
5542
- display.showWarning('Please enter a valid number.');
5541
+ const optionCount = pending.options.length;
5542
+ if (!Number.isFinite(choice) || choice < 1 || choice > optionCount) {
5543
+ display.showWarning(`Enter a number between 1 and ${optionCount}.`);
5543
5544
  this.syncRendererInput();
5544
5545
  return;
5545
5546
  }
5546
5547
  const option = pending.options[choice - 1];
5547
5548
  if (!option) {
5548
- display.showWarning('That option is not available.');
5549
+ display.showWarning(`Enter a number between 1 and ${optionCount}.`);
5549
5550
  this.syncRendererInput();
5550
5551
  return;
5551
5552
  }
@@ -5558,8 +5559,9 @@ export class InteractiveShell {
5558
5559
  return;
5559
5560
  }
5560
5561
  const trimmed = input.trim();
5562
+ const optionCount = pending.options.length;
5561
5563
  if (!trimmed) {
5562
- display.showWarning('Enter a number, type "back", or type "cancel".');
5564
+ display.showWarning(`Enter 1-${optionCount}, "back", or "cancel".`);
5563
5565
  this.syncRendererInput();
5564
5566
  return;
5565
5567
  }
@@ -5576,14 +5578,14 @@ export class InteractiveShell {
5576
5578
  return;
5577
5579
  }
5578
5580
  const choice = Number.parseInt(trimmed, 10);
5579
- if (!Number.isFinite(choice)) {
5580
- display.showWarning('Please enter a valid number.');
5581
+ if (!Number.isFinite(choice) || choice < 1 || choice > optionCount) {
5582
+ display.showWarning(`Enter 1-${optionCount}, "back", or "cancel".`);
5581
5583
  this.syncRendererInput();
5582
5584
  return;
5583
5585
  }
5584
5586
  const preset = pending.options[choice - 1];
5585
5587
  if (!preset) {
5586
- display.showWarning('That option is not available.');
5588
+ display.showWarning(`Enter 1-${optionCount}, "back", or "cancel".`);
5587
5589
  this.syncRendererInput();
5588
5590
  return;
5589
5591
  }
@@ -5621,8 +5623,9 @@ export class InteractiveShell {
5621
5623
  return;
5622
5624
  }
5623
5625
  const trimmed = input.trim();
5626
+ const optionCount = pending.options.length;
5624
5627
  if (!trimmed) {
5625
- display.showWarning('Enter a number or type cancel.');
5628
+ display.showWarning(`Enter 1-${optionCount} or "cancel".`);
5626
5629
  this.syncRendererInput();
5627
5630
  return;
5628
5631
  }
@@ -5634,18 +5637,21 @@ export class InteractiveShell {
5634
5637
  return;
5635
5638
  }
5636
5639
  const choice = Number.parseInt(trimmed, 10);
5637
- if (!Number.isFinite(choice)) {
5638
- display.showWarning('Please enter a valid number.');
5640
+ if (!Number.isFinite(choice) || choice < 1 || choice > optionCount) {
5641
+ display.showWarning(`Enter 1-${optionCount} or "cancel".`);
5639
5642
  this.syncRendererInput();
5640
5643
  return;
5641
5644
  }
5642
5645
  const secret = pending.options[choice - 1];
5643
5646
  if (!secret) {
5644
- display.showWarning('That option is not available.');
5647
+ display.showWarning(`Enter 1-${optionCount} or "cancel".`);
5645
5648
  this.syncRendererInput();
5646
5649
  return;
5647
5650
  }
5648
- this.showInlinePanel([`Enter a new value for ${secret.label} or type "cancel".`]);
5651
+ this.showInlinePanel([
5652
+ `Enter new ${secret.label} or "cancel" to keep current value.`,
5653
+ theme.ui.muted('Paste your API key - input is hidden for security.'),
5654
+ ]);
5649
5655
  this.pendingInteraction = { type: 'secret-input', secret };
5650
5656
  this.terminalInput.setSecretMode(true);
5651
5657
  this.syncRendererInput();
@@ -7037,12 +7043,18 @@ Return ONLY JSON array:
7037
7043
  if (this.renderer) {
7038
7044
  this.renderer.hideCompactingStatus();
7039
7045
  }
7040
- // Show the Claude Code style separator: ══ Conversation compacted · ctrl+o for history ═
7046
+ // Format token savings for display
7047
+ const tokenSavingsText = bestTokenSavings >= 1000
7048
+ ? `${(bestTokenSavings / 1000).toFixed(1)}k`
7049
+ : String(bestTokenSavings);
7050
+ const percentText = Math.round(bestPercentSavings);
7051
+ // Show the Claude Code style separator with savings info
7052
+ const compactMessage = `Conversation compacted · freed ${tokenSavingsText} tokens (${percentText}%) · ctrl+o for history`;
7041
7053
  if (this.renderer) {
7042
- this.renderer.addCompactBlock('', 'Conversation compacted · ctrl+o for history');
7054
+ this.renderer.addCompactBlock('', compactMessage);
7043
7055
  }
7044
7056
  else {
7045
- display.showSystemMessage('══ Conversation compacted · ctrl+o for history ═');
7057
+ display.showSystemMessage(`══ ${compactMessage} ═`);
7046
7058
  }
7047
7059
  this.recordContextCompaction({
7048
7060
  timestamp: Date.now(),
@@ -7389,34 +7401,30 @@ Return ONLY JSON array:
7389
7401
  const secret = info.secret ?? null;
7390
7402
  const providerLabel = info.provider ? this.providerLabel(info.provider) : 'the selected provider';
7391
7403
  const portalLink = this.getApiKeyPortalLink(secret, info.provider);
7404
+ const isMissing = info.type === 'missing';
7392
7405
  if (!secret) {
7393
7406
  this.pendingSecretRetry = null;
7394
- const guidance = 'Run "/secrets" to configure the required API key or export it (e.g., EXPORT KEY=value) before launching the CLI.';
7395
- const baseMessage = info.type === 'missing'
7396
- ? `An API key is required before using ${providerLabel}.`
7407
+ const baseMessage = isMissing
7408
+ ? `API key required for ${providerLabel}.`
7397
7409
  : `API authentication failed for ${providerLabel}.`;
7398
- const portalHelp = portalLink ? ` Get a key: ${portalLink}` : '';
7399
- display.showWarning(`${baseMessage} ${guidance}${portalHelp}`.trim());
7400
- if (portalLink) {
7401
- display.showSystemMessage(`Purchase or generate a key to continue: ${portalLink}`);
7402
- }
7410
+ const action = portalLink
7411
+ ? `Get a key at ${portalLink} then run /secrets to set it.`
7412
+ : 'Run /secrets to configure it.';
7413
+ display.showWarning(`${baseMessage} ${action}`);
7403
7414
  return;
7404
7415
  }
7405
- const isMissing = info.type === 'missing';
7406
- if (!isMissing && info.message && info.message.trim()) {
7407
- display.showWarning(info.message.trim());
7408
- }
7409
- const prefix = isMissing
7410
- ? `${secret.label} is required before you can use ${providerLabel}.`
7411
- : `${secret.label} appears to be invalid for ${providerLabel}.`;
7412
- display.showWarning(prefix);
7413
- if (portalLink) {
7414
- display.showSystemMessage(`Acquire or top up ${secret.label}: ${portalLink}`);
7415
- }
7416
+ // Show single consolidated error message
7417
+ const action = isMissing ? 'is required' : 'appears invalid';
7418
+ const portalHelp = portalLink ? ` Get one at ${portalLink}` : '';
7419
+ display.showWarning(`${secret.label} ${action} for ${providerLabel}.${portalHelp}`);
7416
7420
  this.pendingSecretRetry = retryAction ?? null;
7417
7421
  this.pendingInteraction = { type: 'secret-input', secret };
7418
7422
  this.terminalInput.setSecretMode(true);
7419
- this.showSecretGuidance(secret, isMissing, portalLink);
7423
+ this.showInlinePanel([
7424
+ `Enter new ${secret.label} or "cancel" to abort.`,
7425
+ theme.ui.muted('Paste your API key - input is hidden for security.'),
7426
+ theme.ui.muted('I will retry your request automatically after you set it.'),
7427
+ ]);
7420
7428
  }
7421
7429
  getApiKeyPortalLink(secret, provider) {
7422
7430
  const key = secret?.id ?? provider ?? null;
@@ -7440,21 +7448,6 @@ Return ONLY JSON array:
7440
7448
  return null;
7441
7449
  }
7442
7450
  }
7443
- showSecretGuidance(secret, promptForInput, portalLink) {
7444
- const lines = [];
7445
- if (promptForInput) {
7446
- lines.push(`Enter a new value for ${secret.label} or type "cancel".`);
7447
- }
7448
- else {
7449
- lines.push(`Update the stored value for ${secret.label} or type "cancel".`);
7450
- }
7451
- if (portalLink) {
7452
- lines.push(`Get a fresh key: ${portalLink}`);
7453
- }
7454
- lines.push('Paste it here to resume and I will retry the pending action automatically.');
7455
- lines.push(`Run "/secrets" anytime to manage credentials or export ${secret.envVar}=<value> before launching the CLI.`);
7456
- display.showSystemMessage(lines.join('\n'));
7457
- }
7458
7451
  colorizeDropdownLine(text, index) {
7459
7452
  if (!DROPDOWN_COLORS.length) {
7460
7453
  return text;