nexus-agents 2.55.1 → 2.57.0

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 (106) hide show
  1. package/dist/{adaptive-memory-SUNFPY2W.js → adaptive-memory-TSZEJUJC.js} +3 -3
  2. package/dist/{chunk-4FVISCDB.js → chunk-6QU4DJYW.js} +2 -2
  3. package/dist/{chunk-NYNBDP7M.js → chunk-7Y36JLES.js} +2 -2
  4. package/dist/{chunk-FWSTXEG2.js → chunk-AFSIP6JH.js} +99 -23
  5. package/dist/chunk-AFSIP6JH.js.map +1 -0
  6. package/dist/{chunk-BPMQRYGU.js → chunk-BOZ26RIB.js} +283 -79
  7. package/dist/chunk-BOZ26RIB.js.map +1 -0
  8. package/dist/{chunk-VKZKC4SM.js → chunk-EDGG3RQE.js} +2 -2
  9. package/dist/{chunk-2SPRLBOS.js → chunk-EZXOJZYE.js} +2 -2
  10. package/dist/{chunk-W5AJRK4U.js → chunk-GMOGKX4E.js} +2 -2
  11. package/dist/chunk-H43PABG4.js +402 -0
  12. package/dist/chunk-H43PABG4.js.map +1 -0
  13. package/dist/{chunk-IOU7F5PH.js → chunk-K7EA5OV4.js} +2 -2
  14. package/dist/chunk-NUBSJGQZ.js +14 -0
  15. package/dist/chunk-NUBSJGQZ.js.map +1 -0
  16. package/dist/{chunk-KRIFBGWZ.js → chunk-PTGBJFSD.js} +3 -3
  17. package/dist/{chunk-EKYT4NMD.js → chunk-QGZBCD2A.js} +24 -9
  18. package/dist/chunk-QGZBCD2A.js.map +1 -0
  19. package/dist/{chunk-XYCS5X3H.js → chunk-QNYNQ257.js} +422 -72
  20. package/dist/chunk-QNYNQ257.js.map +1 -0
  21. package/dist/{chunk-UOUJZIKH.js → chunk-R2Y57PM3.js} +38 -15
  22. package/dist/chunk-R2Y57PM3.js.map +1 -0
  23. package/dist/{chunk-RSUCXOQM.js → chunk-SXWZS2V4.js} +26 -53
  24. package/dist/chunk-SXWZS2V4.js.map +1 -0
  25. package/dist/{chunk-JERFBN73.js → chunk-TC46TRLR.js} +7 -17
  26. package/dist/chunk-TC46TRLR.js.map +1 -0
  27. package/dist/{chunk-3IDJSFWT.js → chunk-TFEFN37P.js} +2 -2
  28. package/dist/{chunk-Q5TKQWOI.js → chunk-V5CGWMYL.js} +2 -2
  29. package/dist/{chunk-TCQNNY4J.js → chunk-XEMRMZUN.js} +4 -4
  30. package/dist/chunk-Y7CD6AZW.js +2136 -0
  31. package/dist/chunk-Y7CD6AZW.js.map +1 -0
  32. package/dist/{chunk-R66AWJJ7.js → chunk-YU4NABXM.js} +2 -2
  33. package/dist/{chunk-KVWHK72T.js → chunk-ZL3IBCH6.js} +2356 -3687
  34. package/dist/chunk-ZL3IBCH6.js.map +1 -0
  35. package/dist/{chunk-VLVHPC72.js → chunk-ZUWOFHNC.js} +6 -6
  36. package/dist/{cli-circuit-breaker-7MCMHSDY.js → cli-circuit-breaker-SL73NWX2.js} +4 -4
  37. package/dist/cli.d.ts +9 -2
  38. package/dist/cli.js +468 -311
  39. package/dist/cli.js.map +1 -1
  40. package/dist/{composite-router-LXFOSMSE.js → composite-router-A7URDW4X.js} +2 -2
  41. package/dist/{consensus-vote-G6H532ME.js → consensus-vote-CQ2JP6DC.js} +9 -8
  42. package/dist/{doctor-deep-RKMOZSIS.js → doctor-deep-VN6KMUCG.js} +3 -3
  43. package/dist/{expert-bridge-KHHE42JP.js → expert-bridge-LT7PKUPS.js} +3 -3
  44. package/dist/{factory-KRNR7XHD.js → factory-FA7WDPZW.js} +5 -5
  45. package/dist/{factory-JVN47MFN.js → factory-FZ2KSVYC.js} +4 -4
  46. package/dist/index.d.ts +324 -16
  47. package/dist/index.js +84 -68
  48. package/dist/index.js.map +1 -1
  49. package/dist/{issue-triage-O3C7P66H.js → issue-triage-YYTE6KTC.js} +4 -4
  50. package/dist/{mcp-config-QRERKGR4.js → mcp-config-34XMRM64.js} +3 -3
  51. package/dist/{mobimem-FAOAXV3B.js → mobimem-QDBP37H7.js} +2 -2
  52. package/dist/model-registry.generated.json +17033 -0
  53. package/dist/registry-command-S46JJ2SX.js +580 -0
  54. package/dist/registry-command-S46JJ2SX.js.map +1 -0
  55. package/dist/{repo-security-plan-AZ5HMGFC.js → repo-security-plan-C3LLE3Z7.js} +3 -3
  56. package/dist/research-helpers-synthesize-NVQIWLQL.js +11 -0
  57. package/dist/{routing-memory-MXF45FXT.js → routing-memory-W3YWMLJM.js} +2 -2
  58. package/dist/{session-memory-HL5XDBIL.js → session-memory-DWF5Z2LC.js} +3 -3
  59. package/dist/{setup-command-B6AFJGZB.js → setup-command-6EJONTOU.js} +10 -7
  60. package/dist/{setup-config-PWK6WHMG.js → setup-config-JA5IX53Q.js} +3 -3
  61. package/dist/{setup-custom-api-XAWKRDWV.js → setup-custom-api-CSB26HWD.js} +7 -5
  62. package/dist/setup-custom-api-CSB26HWD.js.map +1 -0
  63. package/dist/{weather-report-XZ5CENHE.js → weather-report-YQSLX4MS.js} +2 -2
  64. package/package.json +1 -1
  65. package/dist/chunk-BPMQRYGU.js.map +0 -1
  66. package/dist/chunk-EKYT4NMD.js.map +0 -1
  67. package/dist/chunk-FWSTXEG2.js.map +0 -1
  68. package/dist/chunk-JERFBN73.js.map +0 -1
  69. package/dist/chunk-KVWHK72T.js.map +0 -1
  70. package/dist/chunk-OC7RMLN2.js +0 -839
  71. package/dist/chunk-OC7RMLN2.js.map +0 -1
  72. package/dist/chunk-RSUCXOQM.js.map +0 -1
  73. package/dist/chunk-UOUJZIKH.js.map +0 -1
  74. package/dist/chunk-XYCS5X3H.js.map +0 -1
  75. package/dist/research-helpers-synthesize-TFZIXBX3.js +0 -10
  76. package/dist/setup-custom-api-XAWKRDWV.js.map +0 -1
  77. /package/dist/{adaptive-memory-SUNFPY2W.js.map → adaptive-memory-TSZEJUJC.js.map} +0 -0
  78. /package/dist/{chunk-4FVISCDB.js.map → chunk-6QU4DJYW.js.map} +0 -0
  79. /package/dist/{chunk-NYNBDP7M.js.map → chunk-7Y36JLES.js.map} +0 -0
  80. /package/dist/{chunk-VKZKC4SM.js.map → chunk-EDGG3RQE.js.map} +0 -0
  81. /package/dist/{chunk-2SPRLBOS.js.map → chunk-EZXOJZYE.js.map} +0 -0
  82. /package/dist/{chunk-W5AJRK4U.js.map → chunk-GMOGKX4E.js.map} +0 -0
  83. /package/dist/{chunk-IOU7F5PH.js.map → chunk-K7EA5OV4.js.map} +0 -0
  84. /package/dist/{chunk-KRIFBGWZ.js.map → chunk-PTGBJFSD.js.map} +0 -0
  85. /package/dist/{chunk-3IDJSFWT.js.map → chunk-TFEFN37P.js.map} +0 -0
  86. /package/dist/{chunk-Q5TKQWOI.js.map → chunk-V5CGWMYL.js.map} +0 -0
  87. /package/dist/{chunk-TCQNNY4J.js.map → chunk-XEMRMZUN.js.map} +0 -0
  88. /package/dist/{chunk-R66AWJJ7.js.map → chunk-YU4NABXM.js.map} +0 -0
  89. /package/dist/{chunk-VLVHPC72.js.map → chunk-ZUWOFHNC.js.map} +0 -0
  90. /package/dist/{cli-circuit-breaker-7MCMHSDY.js.map → cli-circuit-breaker-SL73NWX2.js.map} +0 -0
  91. /package/dist/{composite-router-LXFOSMSE.js.map → composite-router-A7URDW4X.js.map} +0 -0
  92. /package/dist/{consensus-vote-G6H532ME.js.map → consensus-vote-CQ2JP6DC.js.map} +0 -0
  93. /package/dist/{doctor-deep-RKMOZSIS.js.map → doctor-deep-VN6KMUCG.js.map} +0 -0
  94. /package/dist/{expert-bridge-KHHE42JP.js.map → expert-bridge-LT7PKUPS.js.map} +0 -0
  95. /package/dist/{factory-JVN47MFN.js.map → factory-FA7WDPZW.js.map} +0 -0
  96. /package/dist/{factory-KRNR7XHD.js.map → factory-FZ2KSVYC.js.map} +0 -0
  97. /package/dist/{issue-triage-O3C7P66H.js.map → issue-triage-YYTE6KTC.js.map} +0 -0
  98. /package/dist/{mcp-config-QRERKGR4.js.map → mcp-config-34XMRM64.js.map} +0 -0
  99. /package/dist/{mobimem-FAOAXV3B.js.map → mobimem-QDBP37H7.js.map} +0 -0
  100. /package/dist/{repo-security-plan-AZ5HMGFC.js.map → repo-security-plan-C3LLE3Z7.js.map} +0 -0
  101. /package/dist/{research-helpers-synthesize-TFZIXBX3.js.map → research-helpers-synthesize-NVQIWLQL.js.map} +0 -0
  102. /package/dist/{routing-memory-MXF45FXT.js.map → routing-memory-W3YWMLJM.js.map} +0 -0
  103. /package/dist/{session-memory-HL5XDBIL.js.map → session-memory-DWF5Z2LC.js.map} +0 -0
  104. /package/dist/{setup-command-B6AFJGZB.js.map → setup-command-6EJONTOU.js.map} +0 -0
  105. /package/dist/{setup-config-PWK6WHMG.js.map → setup-config-JA5IX53Q.js.map} +0 -0
  106. /package/dist/{weather-report-XZ5CENHE.js.map → weather-report-YQSLX4MS.js.map} +0 -0
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createGitHubProvider,
3
3
  createScmProvider
4
- } from "./chunk-TCQNNY4J.js";
4
+ } from "./chunk-XEMRMZUN.js";
5
5
  import {
6
6
  ALLOWED_COMMANDS,
7
7
  ARTIFACT_TYPES,
@@ -15,7 +15,6 @@ import {
15
15
  AgentRunnerError,
16
16
  AgentStateMachine,
17
17
  AnalysisError,
18
- AppConfigSchema,
19
18
  ArchitectureExpert,
20
19
  ArtifactRefSchema,
21
20
  AuditActorSchema,
@@ -31,7 +30,6 @@ import {
31
30
  AuditSeveritySchema,
32
31
  AuditTrail,
33
32
  AuthorizationMethodSchema,
34
- AvailabilityCache,
35
33
  BUILT_IN_RULES,
36
34
  BUILT_IN_TEMPLATES,
37
35
  BaseAgent,
@@ -61,7 +59,6 @@ import {
61
59
  CreateExpertInputSchema,
62
60
  CrossTreeInfoSchema,
63
61
  CrossTreeStrategySchema,
64
- DEFAULTS,
65
62
  DEFAULT_ACTIVATION_OPTIONS,
66
63
  DEFAULT_BUDGET,
67
64
  DEFAULT_CAPABILITIES as DEFAULT_CAPABILITIES2,
@@ -114,8 +111,6 @@ import {
114
111
  Expert,
115
112
  ExpertAssignmentSchema,
116
113
  ExpertCollaborationPattern,
117
- ExpertConfigSchema,
118
- ExpertDefinitionSchema,
119
114
  ExpertDomainSchema,
120
115
  ExpertFactory,
121
116
  ExpertFactoryAdapter,
@@ -157,16 +152,15 @@ import {
157
152
  ListWorkflowsInputSchema,
158
153
  LoadedSkillSetSchema,
159
154
  LockedWriter,
160
- LoggingConfigSchema,
155
+ MAX_DIFF_LENGTH,
161
156
  MAX_EXECUTION_TIME_MS,
157
+ MAX_STRIPPED_ELEMENTS_PER_EVENT,
162
158
  MIN_EXPERTS_FOR_PATTERN,
163
159
  MODEL_CAPABILITIES,
164
160
  MemoryQueryInputSchema,
165
161
  MemoryStatsInputSchema,
166
162
  MemoryWriteInputSchema,
167
- ModelConfigSchema,
168
163
  ModelSelectionSchema,
169
- ModelTiersSchema,
170
164
  NexusAgentExecutor,
171
165
  NodeStateSchema,
172
166
  OrchestrateInputSchema,
@@ -181,6 +175,7 @@ import {
181
175
  PIPELINE_TEMPLATES,
182
176
  PLUGIN_TRUST_LEVELS,
183
177
  PROMPT_DEFINITIONS,
178
+ PR_REVIEW_ROLES,
184
179
  ParallelProtocol,
185
180
  PatchApplicator,
186
181
  PatchApplicatorError,
@@ -192,10 +187,10 @@ import {
192
187
  PluginRegistry,
193
188
  PolicyEngine,
194
189
  PolicyGateSpecSchema,
190
+ PrReviewInputSchema,
195
191
  PredictionWriteError,
196
192
  PredictionWriter,
197
193
  ProtocolFactory,
198
- ProviderConfigSchema,
199
194
  PruningStrategy,
200
195
  QualitySignalsSchema,
201
196
  QueryTraceInputSchema,
@@ -235,7 +230,6 @@ import {
235
230
  SWE_BENCH_SYSTEM_PROMPT,
236
231
  ScoreBreakdownSchema,
237
232
  SearchCodebaseInputSchema,
238
- SecurityConfigSchema,
239
233
  SecurityErrorCodeSchema,
240
234
  SecurityExpert,
241
235
  SelectionError,
@@ -308,13 +302,13 @@ import {
308
302
  VulnerabilitySchema,
309
303
  VulnerabilitySeveritySchema,
310
304
  WaveScheduler,
311
- WorkflowConfigSchema,
312
305
  WorkflowDefinitionSchema,
313
306
  WorkflowDefinitionSchema2,
314
307
  WorkflowInputsSchema,
315
308
  WorkflowOrchestratorAdapter,
316
309
  WorkflowStepSchema,
317
310
  WorkflowStepSchema2,
311
+ aggregatePrDecisions,
318
312
  aggregateResults,
319
313
  analyzeFailures,
320
314
  analyzeTask,
@@ -328,6 +322,7 @@ import {
328
322
  buildEnrichedPrompt,
329
323
  buildHarnessArgs,
330
324
  buildHarnessCommand,
325
+ buildPrReviewProposal,
331
326
  calculateDistributionStats,
332
327
  calculateEstimatedRemaining,
333
328
  calculateMetrics,
@@ -439,7 +434,6 @@ import {
439
434
  curateContext,
440
435
  customReducer,
441
436
  decomposeSpec,
442
- defaultConfig,
443
437
  delegateInputToTaskContract,
444
438
  detectTestFramework,
445
439
  emitCorroborationEvent,
@@ -479,7 +473,6 @@ import {
479
473
  extractRepoFromInstanceId,
480
474
  extractRepoName,
481
475
  extractStateValue,
482
- filterAvailableModels,
483
476
  filterByRepo,
484
477
  filterByVersion,
485
478
  findMissingDependencies,
@@ -488,13 +481,11 @@ import {
488
481
  formatContextForPrompt,
489
482
  formatValidationResult,
490
483
  generateReport,
491
- getAvailabilityCache,
492
484
  getAvailableRoles,
493
485
  getBuiltInTemplates,
494
486
  getBuiltInTemplatesPath,
495
487
  getBuiltInTemplatesWithMetadata,
496
488
  getCapabilitiesForRole,
497
- getCliForModelId,
498
489
  getCompletedInstanceIds,
499
490
  getCompletedSteps,
500
491
  getCpuCores,
@@ -504,11 +495,9 @@ import {
504
495
  getExecutionDuration,
505
496
  getExecutionOrder,
506
497
  getExpertRegistry,
507
- getFallbackChain,
508
498
  getGraphRegistry,
509
499
  getGraphWorkflowList,
510
500
  getInstance,
511
- getKnownNexusVarNames,
512
501
  getMemoryInfo,
513
502
  getPipelinePluginRegistry,
514
503
  getPolicy,
@@ -546,6 +535,7 @@ import {
546
535
  mapResolutionStatus,
547
536
  mapStateToPhase,
548
537
  mapTestStatus,
538
+ mapVoteDecisionToPrDecision,
549
539
  meanConfidenceInterval,
550
540
  orchestrateInputToTaskContract,
551
541
  overwrite,
@@ -579,6 +569,7 @@ import {
579
569
  registerMemoryWriteTool,
580
570
  registerModelsResource,
581
571
  registerOrchestrateTool,
572
+ registerPrReviewTool,
582
573
  registerPrompts,
583
574
  registerQueryTraceTool,
584
575
  registerRegistryImportTool,
@@ -598,11 +589,9 @@ import {
598
589
  registerSearchCodebaseTool,
599
590
  registerTools,
600
591
  registerWeatherReportTool,
601
- resetAvailabilityCache,
602
592
  resetPipelinePluginRegistry,
603
593
  resetRegistry,
604
594
  resolveExpression,
605
- resolveFallback,
606
595
  resolveInput,
607
596
  resolveStringExpressions,
608
597
  resolveV2Config,
@@ -642,7 +631,6 @@ import {
642
631
  validateEnvironment,
643
632
  validateExpressions,
644
633
  validateICTM,
645
- validateNexusEnv,
646
634
  validatePatch,
647
635
  validatePatchFormat,
648
636
  validatePrediction,
@@ -658,12 +646,12 @@ import {
658
646
  validateWorkflowDependencies,
659
647
  withLogging,
660
648
  writePredictions
661
- } from "./chunk-KVWHK72T.js";
649
+ } from "./chunk-ZL3IBCH6.js";
662
650
  import {
663
651
  getTokenEnvVars,
664
652
  hasToken,
665
653
  resolveToken
666
- } from "./chunk-2SPRLBOS.js";
654
+ } from "./chunk-EZXOJZYE.js";
667
655
  import "./chunk-X2M7OF27.js";
668
656
  import {
669
657
  AdapterModelError,
@@ -780,11 +768,11 @@ import {
780
768
  validateApiKeyPresence,
781
769
  validateToolInput,
782
770
  withTimeout
783
- } from "./chunk-BPMQRYGU.js";
771
+ } from "./chunk-BOZ26RIB.js";
784
772
  import {
785
773
  PROVIDER_ENV_KEYS
786
- } from "./chunk-R66AWJJ7.js";
787
- import "./chunk-JERFBN73.js";
774
+ } from "./chunk-YU4NABXM.js";
775
+ import "./chunk-TC46TRLR.js";
788
776
  import {
789
777
  AgentActionSchema,
790
778
  GitHubReviewer,
@@ -817,11 +805,11 @@ import {
817
805
  sanitizeInput,
818
806
  validateAgentAction,
819
807
  validateCorroboration
820
- } from "./chunk-FWSTXEG2.js";
808
+ } from "./chunk-AFSIP6JH.js";
821
809
  import {
822
810
  GitHubProvider,
823
811
  ScmError
824
- } from "./chunk-IOU7F5PH.js";
812
+ } from "./chunk-K7EA5OV4.js";
825
813
  import {
826
814
  FALLBACK_SCANNER_DATA,
827
815
  buildPlanFromAnalysis,
@@ -829,7 +817,7 @@ import {
829
817
  generateSecurityPlan,
830
818
  getRegistryManifest,
831
819
  resolveScannerData
832
- } from "./chunk-Q5TKQWOI.js";
820
+ } from "./chunk-V5CGWMYL.js";
833
821
  import {
834
822
  analyzeGitHubRepo,
835
823
  analyzeRepo,
@@ -840,6 +828,36 @@ import "./chunk-BQ4YXGGQ.js";
840
828
  import {
841
829
  SharedMemoryStore
842
830
  } from "./chunk-ED6VQWNG.js";
831
+ import {
832
+ AppConfigSchema,
833
+ AvailabilityCache,
834
+ ExpertConfigSchema,
835
+ ExpertDefinitionSchema,
836
+ LoggingConfigSchema,
837
+ ModelConfigSchema,
838
+ ModelTiersSchema,
839
+ ProviderConfigSchema,
840
+ SecurityConfigSchema,
841
+ VERSION,
842
+ WorkflowConfigSchema,
843
+ closeServer,
844
+ connectTransport,
845
+ createServer,
846
+ defaultConfig,
847
+ filterAvailableModels,
848
+ getAvailabilityCache,
849
+ getCliForModelId,
850
+ getFallbackChain,
851
+ getKnownNexusVarNames,
852
+ resetAvailabilityCache,
853
+ resolveFallback,
854
+ startStdioServer,
855
+ validateNexusEnv
856
+ } from "./chunk-Y7CD6AZW.js";
857
+ import {
858
+ DEFAULTS
859
+ } from "./chunk-H43PABG4.js";
860
+ import "./chunk-NUBSJGQZ.js";
843
861
  import {
844
862
  BUILT_IN_EXPERTS,
845
863
  BuiltInExpertTypeSchema,
@@ -849,29 +867,22 @@ import {
849
867
  safeValidateExpertConfig,
850
868
  validateExpertConfig
851
869
  } from "./chunk-GJVHRJO2.js";
852
- import {
853
- VERSION,
854
- closeServer,
855
- connectTransport,
856
- createServer,
857
- startStdioServer
858
- } from "./chunk-OC7RMLN2.js";
859
- import "./chunk-NYNBDP7M.js";
870
+ import "./chunk-7Y36JLES.js";
860
871
  import {
861
872
  MemoryError
862
- } from "./chunk-3IDJSFWT.js";
873
+ } from "./chunk-TFEFN37P.js";
863
874
  import "./chunk-633WH2ML.js";
864
875
  import {
865
876
  generateMcpConfig,
866
877
  getDefaultAllowedTools
867
- } from "./chunk-VKZKC4SM.js";
878
+ } from "./chunk-EDGG3RQE.js";
868
879
  import {
869
880
  CliCircuitBreakerIntegration,
870
881
  createCliCircuitBreakerIntegration
871
- } from "./chunk-KRIFBGWZ.js";
882
+ } from "./chunk-PTGBJFSD.js";
872
883
  import {
873
884
  executeExpert
874
- } from "./chunk-VLVHPC72.js";
885
+ } from "./chunk-ZUWOFHNC.js";
875
886
  import {
876
887
  BaseCliAdapter,
877
888
  CLI_TIMEOUT_PROFILES,
@@ -900,8 +911,8 @@ import {
900
911
  isCliAvailable,
901
912
  isRetryableError,
902
913
  sleep
903
- } from "./chunk-RSUCXOQM.js";
904
- import "./chunk-W5AJRK4U.js";
914
+ } from "./chunk-SXWZS2V4.js";
915
+ import "./chunk-GMOGKX4E.js";
905
916
  import {
906
917
  AgentCapability,
907
918
  AgentError,
@@ -952,8 +963,10 @@ import {
952
963
  detectTrend,
953
964
  err,
954
965
  extractNonErrorMessage,
966
+ findCanonicalModel,
955
967
  formatZodError,
956
968
  generateWeatherReport,
969
+ getCliModelName,
957
970
  getErrorMessage,
958
971
  getOutcomeStore,
959
972
  getRandomProvider,
@@ -972,7 +985,7 @@ import {
972
985
  toError,
973
986
  unwrap,
974
987
  unwrapOr
975
- } from "./chunk-UOUJZIKH.js";
988
+ } from "./chunk-R2Y57PM3.js";
976
989
  import {
977
990
  RULES_FILE,
978
991
  ensureLearningDir
@@ -1593,20 +1606,14 @@ var OPENAI_MODELS = {
1593
1606
  GPT_5_2: "gpt-5.2",
1594
1607
  GPT_5_2_INSTANT: "gpt-5.2-chat-latest",
1595
1608
  GPT_5_2_PRO: "gpt-5.2-pro",
1596
- GPT_5_2_CODEX: "gpt-5.2-codex",
1609
+ GPT_5_2_CODEX: getCliModelName("codex-5.2"),
1597
1610
  GPT_4O: "gpt-4o-2024-11-20",
1598
1611
  GPT_4O_MINI: "gpt-4o-mini-2024-07-18",
1599
1612
  GPT_4_TURBO: "gpt-4-turbo-2024-04-09",
1600
1613
  GPT_35_TURBO: "gpt-3.5-turbo-0125"
1601
1614
  };
1602
1615
  var OPENAI_MODEL_ALIASES = {
1603
- // GPT-5.2 aliases
1604
- "gpt-5.2": OPENAI_MODELS.GPT_5_2,
1605
1616
  "gpt-5.2-instant": OPENAI_MODELS.GPT_5_2_INSTANT,
1606
- "gpt-5.2-chat-latest": OPENAI_MODELS.GPT_5_2_INSTANT,
1607
- "gpt-5.2-pro": OPENAI_MODELS.GPT_5_2_PRO,
1608
- "gpt-5.2-codex": OPENAI_MODELS.GPT_5_2_CODEX,
1609
- // GPT-4o aliases
1610
1617
  "gpt-4o": OPENAI_MODELS.GPT_4O,
1611
1618
  "gpt-4o-mini": OPENAI_MODELS.GPT_4O_MINI,
1612
1619
  "gpt-4-turbo": OPENAI_MODELS.GPT_4_TURBO,
@@ -2314,24 +2321,17 @@ import { GoogleGenAI } from "@google/genai";
2314
2321
 
2315
2322
  // src/adapters/gemini-types.ts
2316
2323
  var GEMINI_MODELS = {
2317
- PRO_2_5: "gemini-2.5-pro",
2318
- FLASH_2_5: "gemini-2.5-flash",
2324
+ PRO_2_5: getCliModelName("gemini-pro"),
2325
+ FLASH_2_5: getCliModelName("gemini-flash"),
2326
+ // Legacy — not in canonical registry. Kept for backward compat.
2319
2327
  FLASH_2_0: "gemini-2.0-flash",
2320
2328
  PRO_1_5: "gemini-1.5-pro",
2321
2329
  FLASH_1_5: "gemini-1.5-flash"
2322
2330
  };
2323
2331
  var GEMINI_MODEL_ALIASES = {
2324
- // Gemini 2.5 aliases (current latest)
2325
- "gemini-2.5-pro": GEMINI_MODELS.PRO_2_5,
2326
- "gemini-2.5-flash": GEMINI_MODELS.FLASH_2_5,
2327
- // Gemini 2.0 aliases
2328
2332
  "gemini-2.0-flash": GEMINI_MODELS.FLASH_2_0,
2329
- // Gemini 1.5 aliases
2330
2333
  "gemini-1.5-pro": GEMINI_MODELS.PRO_1_5,
2331
- "gemini-1.5-flash": GEMINI_MODELS.FLASH_1_5,
2332
- // Short aliases (point to latest versions — Gemini 2.5)
2333
- "gemini-flash": GEMINI_MODELS.FLASH_2_5,
2334
- "gemini-pro": GEMINI_MODELS.PRO_2_5
2334
+ "gemini-1.5-flash": GEMINI_MODELS.FLASH_1_5
2335
2335
  };
2336
2336
  var DEFAULT_MAX_TOKENS3 = 8192;
2337
2337
  function mapStopReason3(finishReason) {
@@ -2399,6 +2399,8 @@ function mapToolToFunctionDeclaration(tool) {
2399
2399
  };
2400
2400
  }
2401
2401
  function resolveModelId2(modelId) {
2402
+ const canonical = findCanonicalModel("gemini", modelId);
2403
+ if (canonical?.cliModelName !== void 0) return canonical.cliModelName;
2402
2404
  return GEMINI_MODEL_ALIASES[modelId] ?? modelId;
2403
2405
  }
2404
2406
  function getModelCapabilities3(modelId) {
@@ -4860,7 +4862,7 @@ var HostileInputFirewall = class {
4860
4862
  }
4861
4863
  const result = sanitizeInput(
4862
4864
  meta.content,
4863
- meta.authorAssociation,
4865
+ mapAuthorAssociation(meta.authorAssociation),
4864
4866
  meta.username,
4865
4867
  {
4866
4868
  allowlistedMaintainers: [...this.allowlisted],
@@ -4872,7 +4874,8 @@ var HostileInputFirewall = class {
4872
4874
  source: meta.sourceType,
4873
4875
  wasModified: result.wasModified,
4874
4876
  strippedCount: result.strippedElements.length,
4875
- injectionFlagCount: result.injectionFlags.length
4877
+ injectionFlagCount: result.injectionFlags.length,
4878
+ strippedElements: result.strippedElements.slice(0, MAX_STRIPPED_ELEMENTS_PER_EVENT).map((e) => ({ tag: e.tag, reason: e.reason }))
4876
4879
  });
4877
4880
  }
4878
4881
  return result;
@@ -4940,7 +4943,7 @@ function createPassthroughSanitized(meta) {
4940
4943
  content: meta.content,
4941
4944
  originalLength: meta.content.length,
4942
4945
  trustTier: "3",
4943
- userRole: meta.authorAssociation,
4946
+ userRole: mapAuthorAssociation(meta.authorAssociation),
4944
4947
  injectionFlags: [],
4945
4948
  strippedElements: [],
4946
4949
  wasModified: false,
@@ -4950,7 +4953,7 @@ function createPassthroughSanitized(meta) {
4950
4953
  function createPassthroughClassification(meta) {
4951
4954
  return {
4952
4955
  trustTier: "3",
4953
- userRole: meta.authorAssociation,
4956
+ userRole: mapAuthorAssociation(meta.authorAssociation),
4954
4957
  isAllowlisted: false,
4955
4958
  wasDowngraded: false,
4956
4959
  reason: "Trust classification disabled \u2014 default Tier 3"
@@ -6374,7 +6377,13 @@ var ArtifactStore = class {
6374
6377
  }
6375
6378
  put(artifact) {
6376
6379
  this.validateContentSize(artifact);
6377
- this.evictIfNeeded();
6380
+ const isReplace = this.artifacts.has(artifact.id);
6381
+ if (isReplace) {
6382
+ const idx = this.insertOrder.indexOf(artifact.id);
6383
+ if (idx !== -1) this.insertOrder.splice(idx, 1);
6384
+ } else {
6385
+ this.evictIfNeeded();
6386
+ }
6378
6387
  this.artifacts.set(artifact.id, artifact);
6379
6388
  this.insertOrder.push(artifact.id);
6380
6389
  return { id: artifact.id, type: artifact.type };
@@ -6691,7 +6700,7 @@ function buildVotingInput(plan, config) {
6691
6700
  }
6692
6701
  async function executeSingleVote(plan, config, log) {
6693
6702
  try {
6694
- const { executeVoting } = await import("./consensus-vote-G6H532ME.js");
6703
+ const { executeVoting } = await import("./consensus-vote-CQ2JP6DC.js");
6695
6704
  const input = buildVotingInput(plan, config);
6696
6705
  const result = await executeVoting(input, log);
6697
6706
  return parseVotingResult(result);
@@ -7057,6 +7066,7 @@ export {
7057
7066
  LockedWriter,
7058
7067
  LoggingConfigSchema,
7059
7068
  MANIPULATION_CATEGORY,
7069
+ MAX_DIFF_LENGTH,
7060
7070
  MAX_DYNAMIC_EXPERTS,
7061
7071
  MAX_EXECUTION_TIME_MS,
7062
7072
  MEM0_TARGETS,
@@ -7106,6 +7116,7 @@ export {
7106
7116
  PLUGIN_TRUST_LEVELS,
7107
7117
  PRIVACY_CATEGORY,
7108
7118
  PROMPT_DEFINITIONS,
7119
+ PR_REVIEW_ROLES,
7109
7120
  PairwiseVotingHistorySchema,
7110
7121
  ParallelProtocol,
7111
7122
  ParseError,
@@ -7125,6 +7136,7 @@ export {
7125
7136
  PolicyError,
7126
7137
  PolicyFirewall,
7127
7138
  PolicyGateSpecSchema,
7139
+ PrReviewInputSchema,
7128
7140
  PredictionWriteError,
7129
7141
  PredictionWriter,
7130
7142
  PreferenceRouter,
@@ -7316,6 +7328,7 @@ export {
7316
7328
  WorkflowOrchestratorAdapter,
7317
7329
  WorkflowStepSchema2 as WorkflowStepSchema,
7318
7330
  actorFromContext,
7331
+ aggregatePrDecisions,
7319
7332
  aggregateResults,
7320
7333
  analysisToTaskContract,
7321
7334
  analyzeTask2 as analyzeDelegateTask,
@@ -7336,6 +7349,7 @@ export {
7336
7349
  buildHarnessCommand,
7337
7350
  buildPendingResult,
7338
7351
  buildPlanFromAnalysis,
7352
+ buildPrReviewProposal,
7339
7353
  buildDependencyGraph as buildSkillDependencyGraph,
7340
7354
  buildTimeoutResult,
7341
7355
  calculateDelay,
@@ -7693,6 +7707,7 @@ export {
7693
7707
  mapResolutionStatus,
7694
7708
  mapStateToPhase,
7695
7709
  mapTestStatus,
7710
+ mapVoteDecisionToPrDecision,
7696
7711
  meanConfidenceInterval,
7697
7712
  mergeStreams,
7698
7713
  normalizeRepoId,
@@ -7733,6 +7748,7 @@ export {
7733
7748
  registerMemoryWriteTool,
7734
7749
  registerModelsResource,
7735
7750
  registerOrchestrateTool,
7751
+ registerPrReviewTool,
7736
7752
  registerPrompts,
7737
7753
  registerQueryTraceTool,
7738
7754
  registerRegistryImportTool,