nexus-agents 4.23.0 → 4.26.3

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 (132) hide show
  1. package/dist/{child-mcp-config-FEK2HK5L.js → child-mcp-config-TUGS6R7G.js} +2 -2
  2. package/dist/{chunk-MSHZHT5X.js → chunk-4Z7HJXDZ.js} +2 -2
  3. package/dist/{chunk-LLGK3NRY.js → chunk-5UGFRPRO.js} +2 -2
  4. package/dist/{chunk-K2DSQJEH.js → chunk-72QXEEC3.js} +6 -6
  5. package/dist/{chunk-OYFKB64X.js → chunk-7GWPLERY.js} +200 -131
  6. package/dist/chunk-7GWPLERY.js.map +1 -0
  7. package/dist/{chunk-NMFXYX7R.js → chunk-7POSQDHD.js} +2 -2
  8. package/dist/chunk-BAXVGVEV.js +7 -0
  9. package/dist/chunk-BAXVGVEV.js.map +1 -0
  10. package/dist/{chunk-3SMGCYGN.js → chunk-BAYBBQKK.js} +2 -2
  11. package/dist/{chunk-R3H46BNY.js → chunk-BQC3QOHD.js} +2 -2
  12. package/dist/{chunk-XQEWXGJ5.js → chunk-COOYB7X3.js} +47 -17
  13. package/dist/chunk-COOYB7X3.js.map +1 -0
  14. package/dist/{chunk-K7RASYIZ.js → chunk-EYBUDKXP.js} +3 -3
  15. package/dist/{chunk-YFDE4AM3.js → chunk-GQDKGV34.js} +7 -7
  16. package/dist/{chunk-EPZCODRK.js → chunk-HCI3SOTV.js} +15 -8
  17. package/dist/chunk-HCI3SOTV.js.map +1 -0
  18. package/dist/{chunk-PUGRS4KW.js → chunk-IFSLM46W.js} +10 -5
  19. package/dist/chunk-IFSLM46W.js.map +1 -0
  20. package/dist/{chunk-LMTBX4GZ.js → chunk-IIQZ77BJ.js} +2 -2
  21. package/dist/{chunk-GGQOP4VK.js → chunk-IWGOE6JT.js} +5 -5
  22. package/dist/{chunk-IC6WLIGJ.js → chunk-JBOKMCJB.js} +4 -4
  23. package/dist/{chunk-HPGPOZG4.js → chunk-K3UKVFL4.js} +5 -5
  24. package/dist/{chunk-LMENHZQ6.js → chunk-KUNQLRUR.js} +4 -4
  25. package/dist/{chunk-2FYFHAI4.js → chunk-MLX4CMGD.js} +2 -2
  26. package/dist/{chunk-AWMXPIMK.js → chunk-MMN77SDX.js} +2 -2
  27. package/dist/{chunk-5KKJKQVE.js → chunk-NSKEVAK2.js} +2 -2
  28. package/dist/{chunk-LSJ2EPOF.js → chunk-OGVHWFYR.js} +17 -4
  29. package/dist/chunk-OGVHWFYR.js.map +1 -0
  30. package/dist/{chunk-32IMMUXP.js → chunk-PHGT3XKE.js} +2 -2
  31. package/dist/{chunk-K2A24T36.js → chunk-QQFPLIJ4.js} +2 -2
  32. package/dist/{chunk-2MPJ7UDR.js → chunk-QQKT5X2M.js} +99 -56
  33. package/dist/chunk-QQKT5X2M.js.map +1 -0
  34. package/dist/{chunk-YVW743K3.js → chunk-RDJWMBUQ.js} +2 -2
  35. package/dist/{chunk-GVLMTQ46.js → chunk-RNOT2H4K.js} +3 -3
  36. package/dist/{chunk-ADC7YEU2.js → chunk-SLDESHM5.js} +90 -43
  37. package/dist/chunk-SLDESHM5.js.map +1 -0
  38. package/dist/{chunk-Z37OVF33.js → chunk-TG5SQK44.js} +2 -2
  39. package/dist/{chunk-EYQUQ2PZ.js → chunk-UBEH2VOU.js} +2 -2
  40. package/dist/{chunk-TXCJMTLN.js → chunk-UDK2A7TX.js} +9 -10
  41. package/dist/chunk-UDK2A7TX.js.map +1 -0
  42. package/dist/{chunk-WJGTRYWS.js → chunk-VFBNMNDY.js} +2 -2
  43. package/dist/{chunk-CMZGRDKF.js → chunk-ZIUPKCRD.js} +2 -2
  44. package/dist/{cli-circuit-breaker-VUWP2GRN.js → cli-circuit-breaker-5PGGNAXR.js} +3 -3
  45. package/dist/cli.js +49 -51
  46. package/dist/cli.js.map +1 -1
  47. package/dist/{composite-router-4F3ZVLJV.js → composite-router-S2YRQVR2.js} +2 -2
  48. package/dist/{consensus-vote-ETJ63JRC.js → consensus-vote-D3ALVGKQ.js} +17 -16
  49. package/dist/{context-retriever-L2LTCKV6.js → context-retriever-G3UORDWI.js} +8 -8
  50. package/dist/{doctor-deep-HPBHFGBZ.js → doctor-deep-QERHI4YH.js} +3 -3
  51. package/dist/{doctor-live-NQ35PQ5B.js → doctor-live-6LCPVDTF.js} +9 -9
  52. package/dist/{expert-bridge-XN5MFZOG.js → expert-bridge-I4VMWOAZ.js} +4 -4
  53. package/dist/{factory-2TJ44P7L.js → factory-4WA3SMPI.js} +5 -5
  54. package/dist/{factory-GVBBWUOE.js → factory-KHYFJ7SI.js} +9 -9
  55. package/dist/{improvement-review-7VJYOI2F.js → improvement-review-DNKRLYEA.js} +6 -5
  56. package/dist/index.d.ts +113 -3
  57. package/dist/index.js +33 -31
  58. package/dist/index.js.map +1 -1
  59. package/dist/{init-opencode-TLVVMG54.js → init-opencode-R4IXHVBI.js} +6 -6
  60. package/dist/issue-triage-MWEG22WT.js +17 -0
  61. package/dist/{pr-reviewer-helpers-4ERCFSZ7.js → pr-reviewer-helpers-P4RCRFEU.js} +4 -4
  62. package/dist/{registry-command-GN2REQQP.js → registry-command-BTVFJEOS.js} +2 -2
  63. package/dist/{repo-security-plan-VPAXEENC.js → repo-security-plan-3KI6NNJ4.js} +3 -3
  64. package/dist/{research-helpers-synthesize-OZOOIEFW.js → research-helpers-synthesize-EY764EKA.js} +4 -4
  65. package/dist/{routing-memory-OF7J3OE4.js → routing-memory-UVFPT6FL.js} +2 -2
  66. package/dist/{session-memory-O5M3CLRX.js → session-memory-VAMUQSGC.js} +3 -3
  67. package/dist/{setup-config-WW5BNLVS.js → setup-config-H426VPM7.js} +3 -3
  68. package/dist/{setup-custom-api-UX4XNOT6.js → setup-custom-api-RFFSTRMT.js} +4 -4
  69. package/dist/setup-data-dir-RZ4KCZR7.js +29 -0
  70. package/dist/{tool-memory-PIBTMGPH.js → tool-memory-PDK7HIEG.js} +5 -5
  71. package/dist/{unified-registry-MUXCSSG5.js → unified-registry-CLZZ46D5.js} +10 -10
  72. package/dist/{weather-report-JOATSJWU.js → weather-report-YZBDIZSV.js} +2 -2
  73. package/package.json +1 -1
  74. package/dist/chunk-2MPJ7UDR.js.map +0 -1
  75. package/dist/chunk-ADC7YEU2.js.map +0 -1
  76. package/dist/chunk-EPZCODRK.js.map +0 -1
  77. package/dist/chunk-LSJ2EPOF.js.map +0 -1
  78. package/dist/chunk-OYFKB64X.js.map +0 -1
  79. package/dist/chunk-PUGRS4KW.js.map +0 -1
  80. package/dist/chunk-TXCJMTLN.js.map +0 -1
  81. package/dist/chunk-XQEWXGJ5.js.map +0 -1
  82. package/dist/issue-triage-YREC36AC.js +0 -17
  83. package/dist/setup-data-dir-KHLK534F.js +0 -28
  84. /package/dist/{child-mcp-config-FEK2HK5L.js.map → child-mcp-config-TUGS6R7G.js.map} +0 -0
  85. /package/dist/{chunk-MSHZHT5X.js.map → chunk-4Z7HJXDZ.js.map} +0 -0
  86. /package/dist/{chunk-LLGK3NRY.js.map → chunk-5UGFRPRO.js.map} +0 -0
  87. /package/dist/{chunk-K2DSQJEH.js.map → chunk-72QXEEC3.js.map} +0 -0
  88. /package/dist/{chunk-NMFXYX7R.js.map → chunk-7POSQDHD.js.map} +0 -0
  89. /package/dist/{chunk-3SMGCYGN.js.map → chunk-BAYBBQKK.js.map} +0 -0
  90. /package/dist/{chunk-R3H46BNY.js.map → chunk-BQC3QOHD.js.map} +0 -0
  91. /package/dist/{chunk-K7RASYIZ.js.map → chunk-EYBUDKXP.js.map} +0 -0
  92. /package/dist/{chunk-YFDE4AM3.js.map → chunk-GQDKGV34.js.map} +0 -0
  93. /package/dist/{chunk-LMTBX4GZ.js.map → chunk-IIQZ77BJ.js.map} +0 -0
  94. /package/dist/{chunk-GGQOP4VK.js.map → chunk-IWGOE6JT.js.map} +0 -0
  95. /package/dist/{chunk-IC6WLIGJ.js.map → chunk-JBOKMCJB.js.map} +0 -0
  96. /package/dist/{chunk-HPGPOZG4.js.map → chunk-K3UKVFL4.js.map} +0 -0
  97. /package/dist/{chunk-LMENHZQ6.js.map → chunk-KUNQLRUR.js.map} +0 -0
  98. /package/dist/{chunk-2FYFHAI4.js.map → chunk-MLX4CMGD.js.map} +0 -0
  99. /package/dist/{chunk-AWMXPIMK.js.map → chunk-MMN77SDX.js.map} +0 -0
  100. /package/dist/{chunk-5KKJKQVE.js.map → chunk-NSKEVAK2.js.map} +0 -0
  101. /package/dist/{chunk-32IMMUXP.js.map → chunk-PHGT3XKE.js.map} +0 -0
  102. /package/dist/{chunk-K2A24T36.js.map → chunk-QQFPLIJ4.js.map} +0 -0
  103. /package/dist/{chunk-YVW743K3.js.map → chunk-RDJWMBUQ.js.map} +0 -0
  104. /package/dist/{chunk-GVLMTQ46.js.map → chunk-RNOT2H4K.js.map} +0 -0
  105. /package/dist/{chunk-Z37OVF33.js.map → chunk-TG5SQK44.js.map} +0 -0
  106. /package/dist/{chunk-EYQUQ2PZ.js.map → chunk-UBEH2VOU.js.map} +0 -0
  107. /package/dist/{chunk-WJGTRYWS.js.map → chunk-VFBNMNDY.js.map} +0 -0
  108. /package/dist/{chunk-CMZGRDKF.js.map → chunk-ZIUPKCRD.js.map} +0 -0
  109. /package/dist/{cli-circuit-breaker-VUWP2GRN.js.map → cli-circuit-breaker-5PGGNAXR.js.map} +0 -0
  110. /package/dist/{composite-router-4F3ZVLJV.js.map → composite-router-S2YRQVR2.js.map} +0 -0
  111. /package/dist/{consensus-vote-ETJ63JRC.js.map → consensus-vote-D3ALVGKQ.js.map} +0 -0
  112. /package/dist/{context-retriever-L2LTCKV6.js.map → context-retriever-G3UORDWI.js.map} +0 -0
  113. /package/dist/{doctor-deep-HPBHFGBZ.js.map → doctor-deep-QERHI4YH.js.map} +0 -0
  114. /package/dist/{doctor-live-NQ35PQ5B.js.map → doctor-live-6LCPVDTF.js.map} +0 -0
  115. /package/dist/{expert-bridge-XN5MFZOG.js.map → expert-bridge-I4VMWOAZ.js.map} +0 -0
  116. /package/dist/{factory-2TJ44P7L.js.map → factory-4WA3SMPI.js.map} +0 -0
  117. /package/dist/{factory-GVBBWUOE.js.map → factory-KHYFJ7SI.js.map} +0 -0
  118. /package/dist/{improvement-review-7VJYOI2F.js.map → improvement-review-DNKRLYEA.js.map} +0 -0
  119. /package/dist/{init-opencode-TLVVMG54.js.map → init-opencode-R4IXHVBI.js.map} +0 -0
  120. /package/dist/{issue-triage-YREC36AC.js.map → issue-triage-MWEG22WT.js.map} +0 -0
  121. /package/dist/{pr-reviewer-helpers-4ERCFSZ7.js.map → pr-reviewer-helpers-P4RCRFEU.js.map} +0 -0
  122. /package/dist/{registry-command-GN2REQQP.js.map → registry-command-BTVFJEOS.js.map} +0 -0
  123. /package/dist/{repo-security-plan-VPAXEENC.js.map → repo-security-plan-3KI6NNJ4.js.map} +0 -0
  124. /package/dist/{research-helpers-synthesize-OZOOIEFW.js.map → research-helpers-synthesize-EY764EKA.js.map} +0 -0
  125. /package/dist/{routing-memory-OF7J3OE4.js.map → routing-memory-UVFPT6FL.js.map} +0 -0
  126. /package/dist/{session-memory-O5M3CLRX.js.map → session-memory-VAMUQSGC.js.map} +0 -0
  127. /package/dist/{setup-config-WW5BNLVS.js.map → setup-config-H426VPM7.js.map} +0 -0
  128. /package/dist/{setup-custom-api-UX4XNOT6.js.map → setup-custom-api-RFFSTRMT.js.map} +0 -0
  129. /package/dist/{setup-data-dir-KHLK534F.js.map → setup-data-dir-RZ4KCZR7.js.map} +0 -0
  130. /package/dist/{tool-memory-PIBTMGPH.js.map → tool-memory-PDK7HIEG.js.map} +0 -0
  131. /package/dist/{unified-registry-MUXCSSG5.js.map → unified-registry-CLZZ46D5.js.map} +0 -0
  132. /package/dist/{weather-report-JOATSJWU.js.map → weather-report-YZBDIZSV.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generateSecurityPlan
3
- } from "./chunk-LLGK3NRY.js";
3
+ } from "./chunk-5UGFRPRO.js";
4
4
  import {
5
5
  analyzeGitHubRepo
6
6
  } from "./chunk-HFOQKCD2.js";
@@ -21,10 +21,10 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-TXCJMTLN.js";
24
+ } from "./chunk-UDK2A7TX.js";
25
25
  import {
26
26
  executeExpert
27
- } from "./chunk-YFDE4AM3.js";
27
+ } from "./chunk-GQDKGV34.js";
28
28
  import {
29
29
  JobStatusSchema,
30
30
  abortJob,
@@ -46,24 +46,24 @@ import {
46
46
  simulationDeniedResult,
47
47
  toJobSummary,
48
48
  writeJobCancelled
49
- } from "./chunk-XQEWXGJ5.js";
49
+ } from "./chunk-COOYB7X3.js";
50
50
  import {
51
51
  allOf
52
52
  } from "./chunk-OQB3XC5O.js";
53
53
  import {
54
54
  normalizeTopicToCanonical,
55
55
  synthesizeResearch
56
- } from "./chunk-PUGRS4KW.js";
56
+ } from "./chunk-IFSLM46W.js";
57
57
  import {
58
58
  IssueTriage
59
- } from "./chunk-K2DSQJEH.js";
59
+ } from "./chunk-72QXEEC3.js";
60
60
  import {
61
61
  resolveEnvMode,
62
62
  sanitizeInput
63
- } from "./chunk-MSHZHT5X.js";
63
+ } from "./chunk-4Z7HJXDZ.js";
64
64
  import {
65
65
  withPrerequisite
66
- } from "./chunk-GVLMTQ46.js";
66
+ } from "./chunk-RNOT2H4K.js";
67
67
  import {
68
68
  NOOP_NOTIFIER,
69
69
  RateLimiter,
@@ -87,18 +87,18 @@ import {
87
87
  withAuditTrail,
88
88
  withProgressHeartbeat,
89
89
  wrapToolWithTimeout
90
- } from "./chunk-LSJ2EPOF.js";
90
+ } from "./chunk-OGVHWFYR.js";
91
91
  import {
92
92
  createAuditTrail,
93
93
  createGraphAuditBridge,
94
94
  emitPipelinePolicyEvent
95
- } from "./chunk-32IMMUXP.js";
95
+ } from "./chunk-PHGT3XKE.js";
96
96
  import {
97
97
  EventTopics,
98
98
  createEvent,
99
99
  getGlobalEventBus,
100
100
  getGlobalRegistry
101
- } from "./chunk-IC6WLIGJ.js";
101
+ } from "./chunk-JBOKMCJB.js";
102
102
  import {
103
103
  IDENTIFIER_RE,
104
104
  LANG_VALUES,
@@ -131,29 +131,29 @@ import {
131
131
  parseRegistry,
132
132
  sourceExistsInRegistry,
133
133
  summarizeContextForPrompt
134
- } from "./chunk-HPGPOZG4.js";
134
+ } from "./chunk-K3UKVFL4.js";
135
135
  import {
136
136
  loadPapersRegistry,
137
137
  loadTechniquesRegistry,
138
138
  resolveInsideRoot
139
- } from "./chunk-YVW743K3.js";
139
+ } from "./chunk-RDJWMBUQ.js";
140
140
  import {
141
141
  getTokenEnvVars,
142
142
  resolveToken
143
- } from "./chunk-Z37OVF33.js";
143
+ } from "./chunk-TG5SQK44.js";
144
144
  import {
145
145
  DEFAULT_RELEVANCE_CONFIG,
146
146
  MemoryImportance,
147
147
  calculateTextJaccardSimilarity,
148
148
  getToolMemory
149
- } from "./chunk-ADC7YEU2.js";
149
+ } from "./chunk-SLDESHM5.js";
150
150
  import {
151
151
  STOPWORDS,
152
152
  truncateWithInfo
153
153
  } from "./chunk-6T3EPABN.js";
154
154
  import {
155
155
  createSessionMemory
156
- } from "./chunk-R3H46BNY.js";
156
+ } from "./chunk-BQC3QOHD.js";
157
157
  import {
158
158
  BUILT_IN_EXPERTS,
159
159
  BuiltInExpertTypeSchema,
@@ -171,25 +171,25 @@ import {
171
171
  getAvailableClis,
172
172
  sleep,
173
173
  withTimeout
174
- } from "./chunk-EPZCODRK.js";
174
+ } from "./chunk-HCI3SOTV.js";
175
175
  import {
176
176
  BaseAdapter,
177
177
  createStream,
178
178
  requireApiKey,
179
179
  validateApiKeyPresence
180
- } from "./chunk-WJGTRYWS.js";
180
+ } from "./chunk-VFBNMNDY.js";
181
181
  import {
182
182
  DEFAULTS
183
- } from "./chunk-K2A24T36.js";
183
+ } from "./chunk-QQFPLIJ4.js";
184
184
  import {
185
185
  getAvailabilityCache,
186
186
  getCliForModelId,
187
187
  resolveFallback
188
- } from "./chunk-CMZGRDKF.js";
188
+ } from "./chunk-ZIUPKCRD.js";
189
189
  import {
190
190
  generateHyphenId,
191
191
  generateUUID
192
- } from "./chunk-LMTBX4GZ.js";
192
+ } from "./chunk-IIQZ77BJ.js";
193
193
  import {
194
194
  AGENT_ROUTER_TIMEOUTS,
195
195
  API_TIMEOUTS,
@@ -293,7 +293,7 @@ import {
293
293
  selectStrategyByManifest,
294
294
  toExpertTaskAnalysisResult,
295
295
  withStep
296
- } from "./chunk-OYFKB64X.js";
296
+ } from "./chunk-7GWPLERY.js";
297
297
  import {
298
298
  ensureLearningDir,
299
299
  getMetaOutcomesFile,
@@ -6585,6 +6585,11 @@ function buildAggregatedResult(input) {
6585
6585
  // the safe direction and says it is a placeholder.
6586
6586
  averageConfidence: 0,
6587
6587
  confidenceMeasured: false,
6588
+ // Nothing here compares results against each other: `TaskResult` carries
6589
+ // neither the `confidence` nor the `expertId` that the sibling
6590
+ // aggregator's conflict resolution needs. An empty list from a
6591
+ // comparison that never ran must not read as agreement (#4854).
6592
+ conflictsDetected: false,
6588
6593
  // #4743: shared with result-aggregator so the two cannot drift — they
6589
6594
  // were duplicate expressions computing the same thing.
6590
6595
  ...summarizeTokenUsage(results.map((r) => r.metadata)),
@@ -15102,7 +15107,7 @@ var ResultAggregator = class {
15102
15107
  resultCount: input.results.length
15103
15108
  });
15104
15109
  const strategy = determineStrategy(input.pattern);
15105
- const { output: aggregatedOutput, conflicts } = this.applyStrategy(strategy, input);
15110
+ const { output: aggregatedOutput, ...outcome } = this.applyStrategy(strategy, input);
15106
15111
  const qualityScore = this.qualityScorer(input.results, aggregatedOutput);
15107
15112
  const qualityCheck = this.checkQuality(qualityScore);
15108
15113
  if (!qualityCheck.ok) return err(qualityCheck.error);
@@ -15110,26 +15115,44 @@ var ResultAggregator = class {
15110
15115
  input.results,
15111
15116
  aggregatedOutput,
15112
15117
  strategy,
15113
- conflicts,
15118
+ outcome,
15114
15119
  qualityScore
15115
15120
  );
15116
15121
  this.logger.info("Aggregation complete", {
15117
15122
  strategy,
15118
15123
  qualityScore: result.qualityScore,
15119
- conflictCount: conflicts.length
15124
+ conflictCount: outcome.conflicts.length
15120
15125
  });
15121
15126
  return ok(result);
15122
15127
  }
15128
+ /**
15129
+ * `conflictsDetected` travels with the conflict list because only one of
15130
+ * these branches compares anything (#4854). `select_best`, `consensus` and
15131
+ * `sequential_chain` pick or concatenate; an empty list from them is the
15132
+ * absence of a check, not the absence of disagreement.
15133
+ */
15123
15134
  applyStrategy(strategy, input) {
15124
15135
  switch (strategy) {
15125
15136
  case "merge":
15126
15137
  return this.mergeResults(input.results);
15127
15138
  case "select_best":
15128
- return { output: selectBest(input.results, input.reviews), conflicts: [] };
15139
+ return {
15140
+ output: selectBest(input.results, input.reviews),
15141
+ conflicts: [],
15142
+ conflictsDetected: false
15143
+ };
15129
15144
  case "consensus":
15130
- return { output: buildConsensus(input.results, input.votes), conflicts: [] };
15145
+ return {
15146
+ output: buildConsensus(input.results, input.votes),
15147
+ conflicts: [],
15148
+ conflictsDetected: false
15149
+ };
15131
15150
  case "sequential_chain":
15132
- return { output: chainSequential(input.results), conflicts: [] };
15151
+ return {
15152
+ output: chainSequential(input.results),
15153
+ conflicts: [],
15154
+ conflictsDetected: false
15155
+ };
15133
15156
  }
15134
15157
  }
15135
15158
  checkQuality(qualityScore) {
@@ -15142,21 +15165,24 @@ var ResultAggregator = class {
15142
15165
  }
15143
15166
  return ok(void 0);
15144
15167
  }
15145
- buildResult(results, output2, strategy, conflicts, qualityScore) {
15168
+ buildResult(results, output2, strategy, outcome, qualityScore) {
15146
15169
  const usage = summarizeTokenUsage(results.map((r) => r.result.metadata));
15147
15170
  const avgConfidence = results.reduce((s, r) => s + (r.confidence ?? 0.5), 0) / results.length;
15148
15171
  return {
15149
15172
  output: output2,
15150
15173
  strategy,
15151
15174
  qualityScore: Math.round(qualityScore * 100) / 100,
15152
- conflicts,
15175
+ conflicts: outcome.conflicts,
15153
15176
  metadata: {
15154
15177
  resultCount: results.length,
15155
- conflictCount: conflicts.length,
15178
+ conflictCount: outcome.conflicts.length,
15156
15179
  averageConfidence: Math.round(avgConfidence * 100) / 100,
15157
15180
  // Measured: ExpertResult carries confidence, and `aggregate` rejects
15158
15181
  // an empty result list before reaching here (#4831).
15159
15182
  confidenceMeasured: true,
15183
+ // Only the object-merge branch compares anything; every other
15184
+ // strategy returns an empty list without looking (#4854).
15185
+ conflictsDetected: outcome.conflictsDetected,
15160
15186
  ...usage,
15161
15187
  aggregatedAt: getTimeProvider().nowIso()
15162
15188
  }
@@ -15164,21 +15190,25 @@ var ResultAggregator = class {
15164
15190
  }
15165
15191
  /**
15166
15192
  * Merges multiple results into one.
15193
+ *
15194
+ * Only the object branch performs a comparison — strings are unioned
15195
+ * line-by-line, arrays concatenated, and mixed outputs simply collected
15196
+ * under `sources`. Each branch reports whether it looked (#4854).
15167
15197
  */
15168
15198
  mergeResults(results) {
15169
15199
  if (results.length === 1) {
15170
- return { output: results[0]?.result.output, conflicts: [] };
15200
+ return { output: results[0]?.result.output, conflicts: [], conflictsDetected: false };
15171
15201
  }
15172
15202
  const conflicts = [];
15173
15203
  const outputs = results.map((r) => r.result.output);
15174
15204
  if (areAllStrings(outputs)) {
15175
- return { output: mergeStrings(outputs), conflicts };
15205
+ return { output: mergeStrings(outputs), conflicts, conflictsDetected: false };
15176
15206
  }
15177
15207
  if (areAllObjects(outputs)) {
15178
- return mergeObjects(results, outputs, this.conflictResolver);
15208
+ return { ...mergeObjects(results, outputs, this.conflictResolver), conflictsDetected: true };
15179
15209
  }
15180
15210
  if (areAllArrays(outputs)) {
15181
- return { output: mergeArrays(outputs), conflicts };
15211
+ return { output: mergeArrays(outputs), conflicts, conflictsDetected: false };
15182
15212
  }
15183
15213
  const merged = {
15184
15214
  sources: results.map((r) => ({
@@ -15186,7 +15216,7 @@ var ResultAggregator = class {
15186
15216
  output: r.result.output
15187
15217
  }))
15188
15218
  };
15189
- return { output: merged, conflicts };
15219
+ return { output: merged, conflicts, conflictsDetected: false };
15190
15220
  }
15191
15221
  };
15192
15222
  function createResultAggregator(options) {
@@ -29544,7 +29574,7 @@ function execIdFields(executionId) {
29544
29574
  async function populateUnifiedContextOnState(state, options) {
29545
29575
  const taskCandidate = state["task"];
29546
29576
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
29547
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-L2LTCKV6.js");
29577
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-G3UORDWI.js");
29548
29578
  const category = inferTaskCategory2(taskCandidate);
29549
29579
  const executionId = options?.executionId;
29550
29580
  const execFields = execIdFields(executionId);
@@ -42207,7 +42237,8 @@ async function executeMemoryQuery(input, logger59) {
42207
42237
  input.query,
42208
42238
  logger59
42209
42239
  );
42210
- const results = await toolMemory.queryBySource(input.source, effectiveQuery, input.limit);
42240
+ const searchResult = await toolMemory.queryWithStatus(input.source, effectiveQuery, input.limit);
42241
+ const results = searchResult.results;
42211
42242
  logger59.debug("Memory query executed", {
42212
42243
  query: input.query,
42213
42244
  effectiveQuery: effectiveQuery !== input.query ? effectiveQuery : void 0,
@@ -42224,7 +42255,8 @@ async function executeMemoryQuery(input, logger59) {
42224
42255
  count: results.length,
42225
42256
  source: input.source,
42226
42257
  searched: coverage.searched,
42227
- unavailable: coverage.unavailable
42258
+ unavailable: coverage.unavailable,
42259
+ errored: searchResult.errored
42228
42260
  };
42229
42261
  }
42230
42262
  async function memoryQueryHandler(args, ctx) {
@@ -42267,7 +42299,8 @@ function registerMemoryQueryTool(server, deps) {
42267
42299
  // unreported. The integration test caught that; the unit tests could not,
42268
42300
  // because they call the handler directly and never cross the protocol.
42269
42301
  searched: z80.array(z80.string()),
42270
- unavailable: z80.array(z80.string())
42302
+ unavailable: z80.array(z80.string()),
42303
+ errored: z80.array(z80.string())
42271
42304
  };
42272
42305
  server.registerTool(
42273
42306
  "memory_query",
@@ -45324,7 +45357,7 @@ async function tryIssueTriage(task) {
45324
45357
  try {
45325
45358
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
45326
45359
  if (issueMatch === null) return null;
45327
- const { createIssueTriage } = await import("./issue-triage-YREC36AC.js");
45360
+ const { createIssueTriage } = await import("./issue-triage-MWEG22WT.js");
45328
45361
  const triage = createIssueTriage();
45329
45362
  const owner = issueMatch[1] ?? "";
45330
45363
  const num = issueMatch[2] ?? "";
@@ -45352,7 +45385,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
45352
45385
  ]);
45353
45386
  async function classifyWithLLM(task) {
45354
45387
  try {
45355
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-XN5MFZOG.js");
45388
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-I4VMWOAZ.js");
45356
45389
  const prompt = [
45357
45390
  "Classify this task into exactly one pipeline template.",
45358
45391
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -47133,7 +47166,7 @@ var memoryInitPromise = null;
47133
47166
  async function initPipelineMemory() {
47134
47167
  if (cachedMemory !== null) return cachedMemory;
47135
47168
  try {
47136
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-O5M3CLRX.js");
47169
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-VAMUQSGC.js");
47137
47170
  const { getLearningDir } = await import("./learning-persistence-7O5QYDM7.js");
47138
47171
  const mem = createSessionMemory2(getLearningDir());
47139
47172
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -47195,7 +47228,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
47195
47228
  callRecord(routingMemoryCache);
47196
47229
  return;
47197
47230
  }
47198
- routingMemoryInitPromise ??= import("./routing-memory-OF7J3OE4.js").then(({ createRoutingMemory }) => {
47231
+ routingMemoryInitPromise ??= import("./routing-memory-UVFPT6FL.js").then(({ createRoutingMemory }) => {
47199
47232
  routingMemoryCache ??= createRoutingMemory();
47200
47233
  return routingMemoryCache;
47201
47234
  }).catch((error) => {
@@ -47229,7 +47262,7 @@ ${text}` : "";
47229
47262
  }
47230
47263
  async function getWeatherContext() {
47231
47264
  try {
47232
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-JOATSJWU.js");
47265
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-YZBDIZSV.js");
47233
47266
  const report = generateWeatherReport2({ includeAdaptive: true });
47234
47267
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
47235
47268
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -47247,7 +47280,7 @@ ${lines}
47247
47280
  }
47248
47281
  async function getMemoryContext(task) {
47249
47282
  try {
47250
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-O5M3CLRX.js");
47283
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-VAMUQSGC.js");
47251
47284
  const { getLearningDir } = await import("./learning-persistence-7O5QYDM7.js");
47252
47285
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
47253
47286
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -47366,7 +47399,7 @@ ${contextBlock}`;
47366
47399
  const strategy = config.votingStrategy ?? "higher_order";
47367
47400
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47368
47401
  try {
47369
- const { executeVoting } = await import("./consensus-vote-ETJ63JRC.js");
47402
+ const { executeVoting } = await import("./consensus-vote-D3ALVGKQ.js");
47370
47403
  const votingResult = await executeVoting(
47371
47404
  {
47372
47405
  proposal: buildVoteProposal(plan, research),
@@ -47805,7 +47838,7 @@ async function searchCodebaseForTask(task) {
47805
47838
  }
47806
47839
  async function queryResearchRegistry(task) {
47807
47840
  try {
47808
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-OZOOIEFW.js");
47841
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-EY764EKA.js");
47809
47842
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
47810
47843
  if (topic === void 0) return null;
47811
47844
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -47876,7 +47909,7 @@ function createScanStageWrapper() {
47876
47909
  try {
47877
47910
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
47878
47911
  if (slug !== void 0) {
47879
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-VPAXEENC.js");
47912
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-3KI6NNJ4.js");
47880
47913
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
47881
47914
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
47882
47915
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -48642,7 +48675,10 @@ function mapVoteDecisionToPrDecision(voteDecision) {
48642
48675
  var SOFT_BLOCK_REQUEST_CHANGES_THRESHOLD = 3;
48643
48676
  function aggregatePrDecisions(reviews, errorPolicy = "standard") {
48644
48677
  const valid = reviews.filter((r) => r.source !== "error");
48645
- if (valid.length === 0) return { decision: "abstain", verified: true };
48678
+ const complete = () => valid.length === reviews.length;
48679
+ const incompleteReason = `incomplete panel: ${String(valid.length)} of ${String(reviews.length)} voters responded`;
48680
+ const panelVerdict = (decision) => complete() ? { decision, verified: true } : { decision, verified: false, reason: incompleteReason };
48681
+ if (valid.length === 0) return panelVerdict("abstain");
48646
48682
  const hasVerifiedBlocker = valid.some(
48647
48683
  (r) => r.decision === "request_changes" && r.findings.some((f) => f.verified)
48648
48684
  );
@@ -48655,9 +48691,9 @@ function aggregatePrDecisions(reviews, errorPolicy = "standard") {
48655
48691
  if (errorPolicy === "absolute_quorum") {
48656
48692
  return absoluteQuorumApprove(reviews, valid);
48657
48693
  }
48658
- return { decision: "approve", verified: true };
48694
+ return panelVerdict("approve");
48659
48695
  }
48660
- return { decision: "abstain", verified: true };
48696
+ return panelVerdict("abstain");
48661
48697
  }
48662
48698
  function absoluteQuorumApprove(reviews, valid) {
48663
48699
  const errorCount = reviews.length - valid.length;
@@ -51001,7 +51037,7 @@ var GitHubTaskTracker = class {
51001
51037
  cachedProvider = null;
51002
51038
  async getProvider() {
51003
51039
  if (this.cachedProvider !== null) return this.cachedProvider;
51004
- const { createScmProvider } = await import("./factory-2TJ44P7L.js");
51040
+ const { createScmProvider } = await import("./factory-4WA3SMPI.js");
51005
51041
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
51006
51042
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
51007
51043
  this.cachedProvider = result.value;
@@ -51914,7 +51950,7 @@ async function probeSource(source, includeModelIds) {
51914
51950
  }
51915
51951
  }
51916
51952
  async function defaultSources(includeOpenRouter) {
51917
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-GVBBWUOE.js");
51953
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-KHYFJ7SI.js");
51918
51954
  const adapters = createAllAdapters2();
51919
51955
  return buildDefaultModelSources(adapters, { includeOpenRouter });
51920
51956
  }
@@ -52336,6 +52372,11 @@ function createAnnotationsProxy(server) {
52336
52372
 
52337
52373
  // src/mcp/tools/tool-observability-proxy.ts
52338
52374
  var invocationCounter = 0;
52375
+ function firstTextOf(result) {
52376
+ const content = result?.content;
52377
+ const text = content?.find((c) => c.type === "text")?.text;
52378
+ return text ?? "Tool returned an error result with no text content";
52379
+ }
52339
52380
  function createToolObservabilityProxy(server, eventBus) {
52340
52381
  return new Proxy(server, {
52341
52382
  get(target, prop, receiver) {
@@ -52362,13 +52403,15 @@ function wrapWithObservability(toolName, cb, eventBus) {
52362
52403
  try {
52363
52404
  const result = await cb(args, extra);
52364
52405
  const durationMs = getTimeProvider().now() - startTime;
52406
+ const failed = result?.isError === true;
52365
52407
  eventBus.emit({
52366
52408
  type: "tool.completed",
52367
52409
  timestamp: getTimeProvider().now(),
52368
52410
  toolName,
52369
52411
  invocationId,
52370
52412
  durationMs,
52371
- success: true
52413
+ success: !failed,
52414
+ ...failed ? { errorMessage: firstTextOf(result) } : {}
52372
52415
  });
52373
52416
  return result;
52374
52417
  } catch (error) {
@@ -55978,4 +56021,4 @@ export {
55978
56021
  shutdownFeedbackSubscriber,
55979
56022
  createEventBusBridge
55980
56023
  };
55981
- //# sourceMappingURL=chunk-2MPJ7UDR.js.map
56024
+ //# sourceMappingURL=chunk-QQKT5X2M.js.map