@evomap/evolver 1.89.15 → 1.89.18

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 (90) hide show
  1. package/README.ja-JP.md +1 -1
  2. package/README.ko-KR.md +1 -1
  3. package/README.md +1 -1
  4. package/README.zh-CN.md +1 -1
  5. package/index.js +89 -17
  6. package/package.json +1 -1
  7. package/src/adapters/claudeCode.js +38 -9
  8. package/src/adapters/codex.js +2 -2
  9. package/src/adapters/hookAdapter.js +38 -2
  10. package/src/adapters/scripts/evolver-session-start.js +182 -2
  11. package/src/atp/atpExecute.js +3 -1
  12. package/src/atp/hubClient.js +5 -3
  13. package/src/atp/serviceHelper.js +3 -2
  14. package/src/config.js +11 -3
  15. package/src/evolve/guards.js +1 -1
  16. package/src/evolve/pipeline/collect.js +1 -1
  17. package/src/evolve/pipeline/dispatch.js +1 -1
  18. package/src/evolve/pipeline/enrich.js +1 -1
  19. package/src/evolve/pipeline/hub.js +1 -1
  20. package/src/evolve/pipeline/select.js +1 -1
  21. package/src/evolve/pipeline/signals.js +1 -1
  22. package/src/evolve/utils.js +1 -1
  23. package/src/evolve.js +1 -1
  24. package/src/gep/a2aProtocol.js +1 -1
  25. package/src/gep/antiAbuseTelemetry.js +1 -1
  26. package/src/gep/autoDistillConv.js +1 -1
  27. package/src/gep/autoDistillLlm.js +1 -1
  28. package/src/gep/candidateEval.js +1 -1
  29. package/src/gep/candidates.js +1 -1
  30. package/src/gep/cliContracts.js +37 -1
  31. package/src/gep/contentHash.js +1 -1
  32. package/src/gep/conversationDistiller.js +1 -1
  33. package/src/gep/conversationSniffer.js +1 -1
  34. package/src/gep/crypto.js +1 -1
  35. package/src/gep/curriculum.js +1 -1
  36. package/src/gep/deviceId.js +1 -1
  37. package/src/gep/directoryClient.js +7 -3
  38. package/src/gep/envFingerprint.js +1 -1
  39. package/src/gep/epigenetics.js +1 -1
  40. package/src/gep/execBridge.js +1 -1
  41. package/src/gep/explore.js +1 -1
  42. package/src/gep/hash.js +1 -1
  43. package/src/gep/hostErrorClassifier.js +34 -0
  44. package/src/gep/hubFetch.js +1 -1
  45. package/src/gep/hubReview.js +1 -1
  46. package/src/gep/hubSearch.js +1 -1
  47. package/src/gep/hubVerify.js +1 -1
  48. package/src/gep/issueReporter.js +5 -4
  49. package/src/gep/learningSignals.js +1 -1
  50. package/src/gep/memoryGraph.js +1 -1
  51. package/src/gep/memoryGraphAdapter.js +1 -1
  52. package/src/gep/mutation.js +1 -1
  53. package/src/gep/narrativeMemory.js +1 -1
  54. package/src/gep/oauthLogin.js +3 -5
  55. package/src/gep/openPRRegistry.js +1 -1
  56. package/src/gep/paths.js +20 -0
  57. package/src/gep/personality.js +1 -1
  58. package/src/gep/policyCheck.js +1 -1
  59. package/src/gep/privacyClient.js +28 -10
  60. package/src/gep/prompt.js +1 -1
  61. package/src/gep/recallInject.js +1 -1
  62. package/src/gep/recallVerifier.js +1 -1
  63. package/src/gep/reflection.js +1 -1
  64. package/src/gep/savingsCore.js +1 -1
  65. package/src/gep/selector.js +1 -1
  66. package/src/gep/signals.js +37 -15
  67. package/src/gep/skillDistiller.js +1 -1
  68. package/src/gep/skillPublisher.js +8 -3
  69. package/src/gep/solidify.js +1 -1
  70. package/src/gep/strategy.js +1 -1
  71. package/src/gep/taskReceiver.js +3 -2
  72. package/src/gep/tokenSavings.js +1 -1
  73. package/src/gep/validator/index.js +7 -2
  74. package/src/gep/validator/reporter.js +7 -2
  75. package/src/gep/validator/stakeBootstrap.js +7 -2
  76. package/src/gep/workspaceKeychain.js +1 -1
  77. package/src/ops/lifecycle.js +501 -31
  78. package/src/proxy/clientSettings.js +405 -0
  79. package/src/proxy/extensions/traceControl.js +1 -1
  80. package/src/proxy/index.js +10 -5
  81. package/src/proxy/inject.js +1 -1
  82. package/src/proxy/lifecycle/manager.js +82 -16
  83. package/src/proxy/mailbox/state.js +207 -0
  84. package/src/proxy/mailbox/store.js +164 -64
  85. package/src/proxy/router/messages_route.js +4 -3
  86. package/src/proxy/server/http.js +40 -6
  87. package/src/proxy/sync/inbound.js +31 -12
  88. package/src/proxy/sync/outbound.js +157 -22
  89. package/src/proxy/trace/extractor.js +1 -1
  90. package/src/proxy/trace/usage.js +1 -1
@@ -1,3 +1,5 @@
1
+ var { isHostClientError } = require('./hostErrorClassifier');
2
+
1
3
  // Opportunity signal names (shared with mutation.js and personality.js).
2
4
  var OPPORTUNITY_SIGNALS = [
3
5
  'user_feature_request',
@@ -618,6 +620,12 @@ function extractSignals({ recentSessionTranscript, todayLog, memorySnippet, user
618
620
 
619
621
  var history = analyzeRecentHistory(recentEvents || []);
620
622
 
623
+ // Is the recent failure corpus dominated by an unrecoverable host/LLM client
624
+ // error (4xx: malformed request / auth / quota)? Such failures are the host
625
+ // Agent's provider config, not the Gene -- they must not feed the
626
+ // failure-loop streak / ban_gene path below (#571, follow-up to #534).
627
+ var hostClientError = isHostClientError(corpus);
628
+
621
629
  var errorHit = /\[error\]|error:|exception:|iserror":true|"status":\s*"error"|"status":\s*"failed"|错误\s*[::]|异常\s*[::]|报错\s*[::]|失败\s*[::]/.test(lower);
622
630
 
623
631
  // Layer 1: Regex (deterministic, 0ms)
@@ -696,28 +704,42 @@ function extractSignals({ recentSessionTranscript, todayLog, memorySnippet, user
696
704
 
697
705
  // Failure streak awareness
698
706
  if (history.consecutiveFailureCount >= 3) {
699
- signals.push('consecutive_failure_streak_' + history.consecutiveFailureCount);
700
- if (history.consecutiveFailureCount >= 5) {
701
- signals.push('failure_loop_detected');
702
- var topGene = null;
703
- var topGeneCount = 0;
704
- var gfEntries = Object.entries(history.geneFreq);
705
- for (var gfi = 0; gfi < gfEntries.length; gfi++) {
706
- if (gfEntries[gfi][1] > topGeneCount) {
707
- topGeneCount = gfEntries[gfi][1];
708
- topGene = gfEntries[gfi][0];
707
+ if (hostClientError) {
708
+ // Non-Gene-attributable: an unrecoverable host/LLM 4xx is driving the
709
+ // streak. Surface an actionable signal pointing at the host LLM config
710
+ // and skip the streak/ban path so we never ban an innocent Gene or trip
711
+ // failure_loop_detected (#571).
712
+ if (!signals.includes('host_llm_client_error')) signals.push('host_llm_client_error');
713
+ } else {
714
+ signals.push('consecutive_failure_streak_' + history.consecutiveFailureCount);
715
+ if (history.consecutiveFailureCount >= 5) {
716
+ signals.push('failure_loop_detected');
717
+ var topGene = null;
718
+ var topGeneCount = 0;
719
+ var gfEntries = Object.entries(history.geneFreq);
720
+ for (var gfi = 0; gfi < gfEntries.length; gfi++) {
721
+ if (gfEntries[gfi][1] > topGeneCount) {
722
+ topGeneCount = gfEntries[gfi][1];
723
+ topGene = gfEntries[gfi][0];
724
+ }
725
+ }
726
+ if (topGene) {
727
+ signals.push('ban_gene:' + topGene);
709
728
  }
710
- }
711
- if (topGene) {
712
- signals.push('ban_gene:' + topGene);
713
729
  }
714
730
  }
715
731
  }
716
732
 
717
733
  // High failure ratio in recent history (>= 75% failed in last 8 cycles)
718
734
  if (history.recentFailureRatio >= 0.75) {
719
- signals.push('high_failure_ratio');
720
- signals.push('force_innovation_after_repair_loop');
735
+ if (hostClientError) {
736
+ // Same rationale as the streak block: a host/LLM 4xx is not the Gene's
737
+ // fault, so do not force innovation away from it (#571).
738
+ if (!signals.includes('host_llm_client_error')) signals.push('host_llm_client_error');
739
+ } else {
740
+ signals.push('high_failure_ratio');
741
+ signals.push('force_innovation_after_repair_loop');
742
+ }
721
743
  }
722
744
 
723
745
  // Plateau detection: recent scores trending down or stagnant.