nexus-agents 4.22.4 → 4.26.1

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 (151) hide show
  1. package/dist/{child-mcp-config-I3IQVN7P.js → child-mcp-config-TUGS6R7G.js} +5 -5
  2. package/dist/{chunk-RQV5ZUXT.js → chunk-4OW67KT2.js} +2 -2
  3. package/dist/{chunk-7MBFKJJT.js → chunk-4Z7HJXDZ.js} +2 -2
  4. package/dist/{chunk-PLO6VSSN.js → chunk-5D6BGZDT.js} +18 -5
  5. package/dist/chunk-5D6BGZDT.js.map +1 -0
  6. package/dist/{chunk-BZGTZKXY.js → chunk-5UGFRPRO.js} +2 -2
  7. package/dist/{chunk-BTAWCQP6.js → chunk-72QXEEC3.js} +6 -6
  8. package/dist/{chunk-VDEDTAHZ.js → chunk-7D6BYPOX.js} +145 -62
  9. package/dist/chunk-7D6BYPOX.js.map +1 -0
  10. package/dist/{chunk-TBWKMKCX.js → chunk-7GWPLERY.js} +203 -134
  11. package/dist/chunk-7GWPLERY.js.map +1 -0
  12. package/dist/{chunk-5RC54HVU.js → chunk-7POSQDHD.js} +2 -2
  13. package/dist/{chunk-SJPZHT6D.js → chunk-BAYBBQKK.js} +2 -2
  14. package/dist/{chunk-3K3IPRED.js → chunk-BQC3QOHD.js} +2 -2
  15. package/dist/{chunk-I6YC5PIL.js → chunk-EYBUDKXP.js} +3 -3
  16. package/dist/{chunk-HHLCAWAV.js → chunk-GBHJ37V3.js} +2 -2
  17. package/dist/{chunk-VSHQMS37.js → chunk-GQDKGV34.js} +7 -7
  18. package/dist/{chunk-SBWVYOTV.js → chunk-HCI3SOTV.js} +16 -9
  19. package/dist/chunk-HCI3SOTV.js.map +1 -0
  20. package/dist/{chunk-HLVST3JE.js → chunk-I32HTDGT.js} +12 -13
  21. package/dist/chunk-I32HTDGT.js.map +1 -0
  22. package/dist/{chunk-NQ65EKMG.js → chunk-IFSLM46W.js} +16 -6
  23. package/dist/chunk-IFSLM46W.js.map +1 -0
  24. package/dist/{chunk-QQS6FVTQ.js → chunk-IIQZ77BJ.js} +2 -2
  25. package/dist/{chunk-AXG2IGOK.js → chunk-IWGOE6JT.js} +5 -5
  26. package/dist/{chunk-QS5K3PAY.js → chunk-JBOKMCJB.js} +4 -4
  27. package/dist/{chunk-KGFFEQTN.js → chunk-JEAKVUWM.js} +2 -2
  28. package/dist/{chunk-3PVG7CQS.js → chunk-K3UKVFL4.js} +7 -7
  29. package/dist/{chunk-ANVPNLZE.js → chunk-KUNQLRUR.js} +4 -4
  30. package/dist/{chunk-DXWF7V74.js → chunk-LJHRFULQ.js} +4 -4
  31. package/dist/{chunk-RF5N4HME.js → chunk-MLX4CMGD.js} +2 -2
  32. package/dist/{chunk-PX7AYAHF.js → chunk-MMN77SDX.js} +3 -3
  33. package/dist/{chunk-N45MVUY7.js → chunk-NSKEVAK2.js} +2 -2
  34. package/dist/chunk-NSKEVAK2.js.map +1 -0
  35. package/dist/{chunk-NBMWONHE.js → chunk-OGHEKPLD.js} +11 -2
  36. package/dist/{chunk-NBMWONHE.js.map → chunk-OGHEKPLD.js.map} +1 -1
  37. package/dist/{chunk-YSOWQJ5S.js → chunk-PHGT3XKE.js} +2 -2
  38. package/dist/{chunk-RXGHRVL2.js → chunk-QQFPLIJ4.js} +2 -2
  39. package/dist/{chunk-ZRSKNV3E.js → chunk-R2B4CTVD.js} +49 -19
  40. package/dist/chunk-R2B4CTVD.js.map +1 -0
  41. package/dist/{chunk-EPOKODTI.js → chunk-RDJWMBUQ.js} +2 -2
  42. package/dist/{chunk-IBW6CJ4G.js → chunk-SLDESHM5.js} +92 -45
  43. package/dist/chunk-SLDESHM5.js.map +1 -0
  44. package/dist/{chunk-5YBFBXEB.js → chunk-TG5SQK44.js} +2 -2
  45. package/dist/{chunk-6TV765AS.js → chunk-UBEH2VOU.js} +2 -2
  46. package/dist/{chunk-MCCN5UUW.js → chunk-VFBNMNDY.js} +2 -2
  47. package/dist/chunk-WHVXTVWB.js +7 -0
  48. package/dist/chunk-WHVXTVWB.js.map +1 -0
  49. package/dist/{chunk-HWPFUVMS.js → chunk-ZIUPKCRD.js} +2 -2
  50. package/dist/{cli-circuit-breaker-OKOGXUQY.js → cli-circuit-breaker-5PGGNAXR.js} +5 -5
  51. package/dist/cli.js +55 -56
  52. package/dist/cli.js.map +1 -1
  53. package/dist/{composite-router-UFQSYHJF.js → composite-router-S2YRQVR2.js} +4 -4
  54. package/dist/{consensus-vote-65UZRQMY.js → consensus-vote-WJW2MNNX.js} +21 -20
  55. package/dist/{context-retriever-BROUADMF.js → context-retriever-G3UORDWI.js} +11 -11
  56. package/dist/doctor-deep-QERHI4YH.js +13 -0
  57. package/dist/{doctor-live-LBH7XDZX.js → doctor-live-6LCPVDTF.js} +12 -12
  58. package/dist/{expert-bridge-H6ITLZUY.js → expert-bridge-I4VMWOAZ.js} +6 -6
  59. package/dist/factory-4WA3SMPI.js +15 -0
  60. package/dist/factory-KHYFJ7SI.js +25 -0
  61. package/dist/{improvement-review-LJQ2CXAP.js → improvement-review-JISBEESF.js} +8 -7
  62. package/dist/index.d.ts +124 -3
  63. package/dist/index.js +37 -35
  64. package/dist/index.js.map +1 -1
  65. package/dist/{init-opencode-NTS5ZWXU.js → init-opencode-R4IXHVBI.js} +8 -8
  66. package/dist/issue-triage-MWEG22WT.js +17 -0
  67. package/dist/{learning-persistence-SR5F4DSY.js → learning-persistence-7O5QYDM7.js} +3 -3
  68. package/dist/{pr-reviewer-helpers-IAKFHBM6.js → pr-reviewer-helpers-P4RCRFEU.js} +6 -6
  69. package/dist/{registry-command-6HVXEW23.js → registry-command-BTVFJEOS.js} +4 -4
  70. package/dist/{repo-security-plan-MF4E5MG6.js → repo-security-plan-3KI6NNJ4.js} +5 -5
  71. package/dist/research-helpers-synthesize-EY764EKA.js +14 -0
  72. package/dist/{routing-memory-YIKR7EMC.js → routing-memory-UVFPT6FL.js} +4 -4
  73. package/dist/{session-memory-B6TFD55A.js → session-memory-VAMUQSGC.js} +5 -5
  74. package/dist/setup-config-H426VPM7.js +11 -0
  75. package/dist/{setup-custom-api-ATC26B2O.js → setup-custom-api-RFFSTRMT.js} +6 -6
  76. package/dist/setup-data-dir-4QRQ5X6V.js +29 -0
  77. package/dist/{tool-memory-XDUJUM2O.js → tool-memory-PDK7HIEG.js} +8 -8
  78. package/dist/{tool-memory-registry-adapters-UMPIJLHS.js → tool-memory-registry-adapters-IMRSOAAV.js} +3 -3
  79. package/dist/unified-registry-CLZZ46D5.js +26 -0
  80. package/dist/{weather-report-YDYML3JW.js → weather-report-YZBDIZSV.js} +4 -4
  81. package/package.json +1 -1
  82. package/dist/chunk-HLVST3JE.js.map +0 -1
  83. package/dist/chunk-IBW6CJ4G.js.map +0 -1
  84. package/dist/chunk-N45MVUY7.js.map +0 -1
  85. package/dist/chunk-NQ65EKMG.js.map +0 -1
  86. package/dist/chunk-PLO6VSSN.js.map +0 -1
  87. package/dist/chunk-SBWVYOTV.js.map +0 -1
  88. package/dist/chunk-TBWKMKCX.js.map +0 -1
  89. package/dist/chunk-VDEDTAHZ.js.map +0 -1
  90. package/dist/chunk-ZRSKNV3E.js.map +0 -1
  91. package/dist/doctor-deep-SBSUG54R.js +0 -13
  92. package/dist/factory-WJ6AV4WU.js +0 -15
  93. package/dist/factory-ZIYR7YJ3.js +0 -25
  94. package/dist/issue-triage-PM67ACC5.js +0 -17
  95. package/dist/research-helpers-synthesize-2XQBWVG6.js +0 -14
  96. package/dist/setup-config-A5DWVRQB.js +0 -11
  97. package/dist/setup-data-dir-DWMKVY6G.js +0 -28
  98. package/dist/unified-registry-H2NNOXB3.js +0 -26
  99. /package/dist/{child-mcp-config-I3IQVN7P.js.map → child-mcp-config-TUGS6R7G.js.map} +0 -0
  100. /package/dist/{chunk-RQV5ZUXT.js.map → chunk-4OW67KT2.js.map} +0 -0
  101. /package/dist/{chunk-7MBFKJJT.js.map → chunk-4Z7HJXDZ.js.map} +0 -0
  102. /package/dist/{chunk-BZGTZKXY.js.map → chunk-5UGFRPRO.js.map} +0 -0
  103. /package/dist/{chunk-BTAWCQP6.js.map → chunk-72QXEEC3.js.map} +0 -0
  104. /package/dist/{chunk-5RC54HVU.js.map → chunk-7POSQDHD.js.map} +0 -0
  105. /package/dist/{chunk-SJPZHT6D.js.map → chunk-BAYBBQKK.js.map} +0 -0
  106. /package/dist/{chunk-3K3IPRED.js.map → chunk-BQC3QOHD.js.map} +0 -0
  107. /package/dist/{chunk-I6YC5PIL.js.map → chunk-EYBUDKXP.js.map} +0 -0
  108. /package/dist/{chunk-HHLCAWAV.js.map → chunk-GBHJ37V3.js.map} +0 -0
  109. /package/dist/{chunk-VSHQMS37.js.map → chunk-GQDKGV34.js.map} +0 -0
  110. /package/dist/{chunk-QQS6FVTQ.js.map → chunk-IIQZ77BJ.js.map} +0 -0
  111. /package/dist/{chunk-AXG2IGOK.js.map → chunk-IWGOE6JT.js.map} +0 -0
  112. /package/dist/{chunk-QS5K3PAY.js.map → chunk-JBOKMCJB.js.map} +0 -0
  113. /package/dist/{chunk-KGFFEQTN.js.map → chunk-JEAKVUWM.js.map} +0 -0
  114. /package/dist/{chunk-3PVG7CQS.js.map → chunk-K3UKVFL4.js.map} +0 -0
  115. /package/dist/{chunk-ANVPNLZE.js.map → chunk-KUNQLRUR.js.map} +0 -0
  116. /package/dist/{chunk-DXWF7V74.js.map → chunk-LJHRFULQ.js.map} +0 -0
  117. /package/dist/{chunk-RF5N4HME.js.map → chunk-MLX4CMGD.js.map} +0 -0
  118. /package/dist/{chunk-PX7AYAHF.js.map → chunk-MMN77SDX.js.map} +0 -0
  119. /package/dist/{chunk-YSOWQJ5S.js.map → chunk-PHGT3XKE.js.map} +0 -0
  120. /package/dist/{chunk-RXGHRVL2.js.map → chunk-QQFPLIJ4.js.map} +0 -0
  121. /package/dist/{chunk-EPOKODTI.js.map → chunk-RDJWMBUQ.js.map} +0 -0
  122. /package/dist/{chunk-5YBFBXEB.js.map → chunk-TG5SQK44.js.map} +0 -0
  123. /package/dist/{chunk-6TV765AS.js.map → chunk-UBEH2VOU.js.map} +0 -0
  124. /package/dist/{chunk-MCCN5UUW.js.map → chunk-VFBNMNDY.js.map} +0 -0
  125. /package/dist/{chunk-HWPFUVMS.js.map → chunk-ZIUPKCRD.js.map} +0 -0
  126. /package/dist/{cli-circuit-breaker-OKOGXUQY.js.map → cli-circuit-breaker-5PGGNAXR.js.map} +0 -0
  127. /package/dist/{composite-router-UFQSYHJF.js.map → composite-router-S2YRQVR2.js.map} +0 -0
  128. /package/dist/{consensus-vote-65UZRQMY.js.map → consensus-vote-WJW2MNNX.js.map} +0 -0
  129. /package/dist/{context-retriever-BROUADMF.js.map → context-retriever-G3UORDWI.js.map} +0 -0
  130. /package/dist/{doctor-deep-SBSUG54R.js.map → doctor-deep-QERHI4YH.js.map} +0 -0
  131. /package/dist/{doctor-live-LBH7XDZX.js.map → doctor-live-6LCPVDTF.js.map} +0 -0
  132. /package/dist/{expert-bridge-H6ITLZUY.js.map → expert-bridge-I4VMWOAZ.js.map} +0 -0
  133. /package/dist/{factory-WJ6AV4WU.js.map → factory-4WA3SMPI.js.map} +0 -0
  134. /package/dist/{factory-ZIYR7YJ3.js.map → factory-KHYFJ7SI.js.map} +0 -0
  135. /package/dist/{improvement-review-LJQ2CXAP.js.map → improvement-review-JISBEESF.js.map} +0 -0
  136. /package/dist/{init-opencode-NTS5ZWXU.js.map → init-opencode-R4IXHVBI.js.map} +0 -0
  137. /package/dist/{issue-triage-PM67ACC5.js.map → issue-triage-MWEG22WT.js.map} +0 -0
  138. /package/dist/{learning-persistence-SR5F4DSY.js.map → learning-persistence-7O5QYDM7.js.map} +0 -0
  139. /package/dist/{pr-reviewer-helpers-IAKFHBM6.js.map → pr-reviewer-helpers-P4RCRFEU.js.map} +0 -0
  140. /package/dist/{registry-command-6HVXEW23.js.map → registry-command-BTVFJEOS.js.map} +0 -0
  141. /package/dist/{repo-security-plan-MF4E5MG6.js.map → repo-security-plan-3KI6NNJ4.js.map} +0 -0
  142. /package/dist/{research-helpers-synthesize-2XQBWVG6.js.map → research-helpers-synthesize-EY764EKA.js.map} +0 -0
  143. /package/dist/{routing-memory-YIKR7EMC.js.map → routing-memory-UVFPT6FL.js.map} +0 -0
  144. /package/dist/{session-memory-B6TFD55A.js.map → session-memory-VAMUQSGC.js.map} +0 -0
  145. /package/dist/{setup-config-A5DWVRQB.js.map → setup-config-H426VPM7.js.map} +0 -0
  146. /package/dist/{setup-custom-api-ATC26B2O.js.map → setup-custom-api-RFFSTRMT.js.map} +0 -0
  147. /package/dist/{setup-data-dir-DWMKVY6G.js.map → setup-data-dir-4QRQ5X6V.js.map} +0 -0
  148. /package/dist/{tool-memory-XDUJUM2O.js.map → tool-memory-PDK7HIEG.js.map} +0 -0
  149. /package/dist/{tool-memory-registry-adapters-UMPIJLHS.js.map → tool-memory-registry-adapters-IMRSOAAV.js.map} +0 -0
  150. /package/dist/{unified-registry-H2NNOXB3.js.map → unified-registry-CLZZ46D5.js.map} +0 -0
  151. /package/dist/{weather-report-YDYML3JW.js.map → weather-report-YZBDIZSV.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generateSecurityPlan
3
- } from "./chunk-BZGTZKXY.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-HLVST3JE.js";
24
+ } from "./chunk-I32HTDGT.js";
25
25
  import {
26
26
  executeExpert
27
- } from "./chunk-VSHQMS37.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-ZRSKNV3E.js";
49
+ } from "./chunk-R2B4CTVD.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-NQ65EKMG.js";
56
+ } from "./chunk-IFSLM46W.js";
57
57
  import {
58
58
  IssueTriage
59
- } from "./chunk-BTAWCQP6.js";
59
+ } from "./chunk-72QXEEC3.js";
60
60
  import {
61
61
  resolveEnvMode,
62
62
  sanitizeInput
63
- } from "./chunk-7MBFKJJT.js";
63
+ } from "./chunk-4Z7HJXDZ.js";
64
64
  import {
65
65
  withPrerequisite
66
- } from "./chunk-DXWF7V74.js";
66
+ } from "./chunk-LJHRFULQ.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-PLO6VSSN.js";
90
+ } from "./chunk-5D6BGZDT.js";
91
91
  import {
92
92
  createAuditTrail,
93
93
  createGraphAuditBridge,
94
94
  emitPipelinePolicyEvent
95
- } from "./chunk-YSOWQJ5S.js";
95
+ } from "./chunk-PHGT3XKE.js";
96
96
  import {
97
97
  EventTopics,
98
98
  createEvent,
99
99
  getGlobalEventBus,
100
100
  getGlobalRegistry
101
- } from "./chunk-QS5K3PAY.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-3PVG7CQS.js";
134
+ } from "./chunk-K3UKVFL4.js";
135
135
  import {
136
136
  loadPapersRegistry,
137
137
  loadTechniquesRegistry,
138
138
  resolveInsideRoot
139
- } from "./chunk-EPOKODTI.js";
139
+ } from "./chunk-RDJWMBUQ.js";
140
140
  import {
141
141
  getTokenEnvVars,
142
142
  resolveToken
143
- } from "./chunk-5YBFBXEB.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-IBW6CJ4G.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-3K3IPRED.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-SBWVYOTV.js";
174
+ } from "./chunk-HCI3SOTV.js";
175
175
  import {
176
176
  BaseAdapter,
177
177
  createStream,
178
178
  requireApiKey,
179
179
  validateApiKeyPresence
180
- } from "./chunk-MCCN5UUW.js";
180
+ } from "./chunk-VFBNMNDY.js";
181
181
  import {
182
182
  DEFAULTS
183
- } from "./chunk-RXGHRVL2.js";
183
+ } from "./chunk-QQFPLIJ4.js";
184
184
  import {
185
185
  getAvailabilityCache,
186
186
  getCliForModelId,
187
187
  resolveFallback
188
- } from "./chunk-HWPFUVMS.js";
188
+ } from "./chunk-ZIUPKCRD.js";
189
189
  import {
190
190
  generateHyphenId,
191
191
  generateUUID
192
- } from "./chunk-QQS6FVTQ.js";
192
+ } from "./chunk-IIQZ77BJ.js";
193
193
  import {
194
194
  AGENT_ROUTER_TIMEOUTS,
195
195
  API_TIMEOUTS,
@@ -293,18 +293,18 @@ import {
293
293
  selectStrategyByManifest,
294
294
  toExpertTaskAnalysisResult,
295
295
  withStep
296
- } from "./chunk-TBWKMKCX.js";
296
+ } from "./chunk-7GWPLERY.js";
297
297
  import {
298
298
  ensureLearningDir,
299
299
  getMetaOutcomesFile,
300
300
  isPersistenceEnabled
301
- } from "./chunk-HHLCAWAV.js";
301
+ } from "./chunk-GBHJ37V3.js";
302
302
  import {
303
303
  findRepoRoot,
304
304
  getNexusDataDir,
305
305
  nexusDataPath,
306
306
  nexusDataPathEnsure
307
- } from "./chunk-NBMWONHE.js";
307
+ } from "./chunk-OGHEKPLD.js";
308
308
 
309
309
  // src/config/schemas-core.ts
310
310
  import { z } from "zod";
@@ -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-BROUADMF.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);
@@ -40464,7 +40494,13 @@ function recordDiscoveryOutcome(success, durationMs, errorMsg) {
40464
40494
  const store = getOutcomeStore();
40465
40495
  store.append({
40466
40496
  id: `research-discover-${String(getTimeProvider().now())}-${getRandomProvider().random().toString(36).slice(2, 8)}`,
40467
- cli: DEFAULT_CLI,
40497
+ // #5034: NOT `DEFAULT_CLI`. This tool does not know which CLI served the
40498
+ // work — `model` below is a synthetic label — and hardcoding 'claude'
40499
+ // credited or debited claude in the routing learner on every run.
40500
+ // `'unknown'` is the schema's own unattributed value, which the bandit's
40501
+ // warm-start partitions out instead of replaying (#4935). #5020 fixed
40502
+ // two of these four writers; this is the remainder.
40503
+ cli: "unknown",
40468
40504
  category: "research",
40469
40505
  model: "research-discover",
40470
40506
  success,
@@ -41202,7 +41238,13 @@ function recordTriageOutcome(success, durationMs, errorMsg) {
41202
41238
  const store = getOutcomeStore();
41203
41239
  store.append({
41204
41240
  id: `triage-${String(getTimeProvider().now())}-${getRandomProvider().random().toString(36).slice(2, 8)}`,
41205
- cli: DEFAULT_CLI,
41241
+ // #5034: NOT `DEFAULT_CLI`. This tool does not know which CLI served the
41242
+ // work — `model` below is a synthetic label — and hardcoding 'claude'
41243
+ // credited or debited claude in the routing learner on every run.
41244
+ // `'unknown'` is the schema's own unattributed value, which the bandit's
41245
+ // warm-start partitions out instead of replaying (#4935). #5020 fixed
41246
+ // two of these four writers; this is the remainder.
41247
+ cli: "unknown",
41206
41248
  category: "planning",
41207
41249
  model: "issue-triage",
41208
41250
  success,
@@ -42135,6 +42177,24 @@ var MemoryQueryInputSchema = z80.object({
42135
42177
  limit: z80.number().int().min(1).max(50).optional().default(10).describe("Maximum results to return (default: 10, max: 50)"),
42136
42178
  source: z80.enum(["session", "belief", "agentic", "typed", "adaptive", "all"]).optional().default("all").describe("Filter by memory source (default: all)")
42137
42179
  });
42180
+ function describeBackendCoverage(memory, source) {
42181
+ const optional = [
42182
+ ["agentic", memory.isAgenticMemoryAvailable()],
42183
+ ["adaptive", memory.isAdaptiveMemoryAvailable()],
42184
+ ["typed", memory.isTypedMemoryAvailable()]
42185
+ ];
42186
+ const inScope = (name) => source === "all" || source === name;
42187
+ const searched = [];
42188
+ const unavailable = [];
42189
+ for (const name of ["session", "belief"]) {
42190
+ if (inScope(name)) searched.push(name);
42191
+ }
42192
+ for (const [name, available] of optional) {
42193
+ if (!inScope(name)) continue;
42194
+ (available ? searched : unavailable).push(name);
42195
+ }
42196
+ return { searched, unavailable };
42197
+ }
42138
42198
  var reflectionCache;
42139
42199
  var reflectionAdapter;
42140
42200
  function getReflectiveRetriever(logger59) {
@@ -42177,7 +42237,8 @@ async function executeMemoryQuery(input, logger59) {
42177
42237
  input.query,
42178
42238
  logger59
42179
42239
  );
42180
- 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;
42181
42242
  logger59.debug("Memory query executed", {
42182
42243
  query: input.query,
42183
42244
  effectiveQuery: effectiveQuery !== input.query ? effectiveQuery : void 0,
@@ -42186,12 +42247,16 @@ async function executeMemoryQuery(input, logger59) {
42186
42247
  reflectionSource: reflection?.source,
42187
42248
  reflectionDurationMs: reflection?.durationMs
42188
42249
  });
42250
+ const coverage = describeBackendCoverage(toolMemory, input.source);
42189
42251
  return {
42190
42252
  query: input.query,
42191
42253
  ...expandedQuery !== void 0 ? { expandedQuery } : {},
42192
42254
  results,
42193
42255
  count: results.length,
42194
- source: input.source
42256
+ source: input.source,
42257
+ searched: coverage.searched,
42258
+ unavailable: coverage.unavailable,
42259
+ errored: searchResult.errored
42195
42260
  };
42196
42261
  }
42197
42262
  async function memoryQueryHandler(args, ctx) {
@@ -42227,7 +42292,15 @@ function registerMemoryQueryTool(server, deps) {
42227
42292
  expandedQuery: z80.string().optional(),
42228
42293
  results: z80.array(z80.unknown()),
42229
42294
  count: z80.number(),
42230
- source: z80.string()
42295
+ source: z80.string(),
42296
+ // #4999: the SDK validates structured content against this schema with
42297
+ // `additionalProperties: false`, so a field added to the response and not
42298
+ // declared here makes EVERY call fail with -32602 rather than merely going
42299
+ // unreported. The integration test caught that; the unit tests could not,
42300
+ // because they call the handler directly and never cross the protocol.
42301
+ searched: z80.array(z80.string()),
42302
+ unavailable: z80.array(z80.string()),
42303
+ errored: z80.array(z80.string())
42231
42304
  };
42232
42305
  server.registerTool(
42233
42306
  "memory_query",
@@ -45284,7 +45357,7 @@ async function tryIssueTriage(task) {
45284
45357
  try {
45285
45358
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
45286
45359
  if (issueMatch === null) return null;
45287
- const { createIssueTriage } = await import("./issue-triage-PM67ACC5.js");
45360
+ const { createIssueTriage } = await import("./issue-triage-MWEG22WT.js");
45288
45361
  const triage = createIssueTriage();
45289
45362
  const owner = issueMatch[1] ?? "";
45290
45363
  const num = issueMatch[2] ?? "";
@@ -45312,7 +45385,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
45312
45385
  ]);
45313
45386
  async function classifyWithLLM(task) {
45314
45387
  try {
45315
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-H6ITLZUY.js");
45388
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-I4VMWOAZ.js");
45316
45389
  const prompt = [
45317
45390
  "Classify this task into exactly one pipeline template.",
45318
45391
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -47093,8 +47166,8 @@ var memoryInitPromise = null;
47093
47166
  async function initPipelineMemory() {
47094
47167
  if (cachedMemory !== null) return cachedMemory;
47095
47168
  try {
47096
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-B6TFD55A.js");
47097
- const { getLearningDir } = await import("./learning-persistence-SR5F4DSY.js");
47169
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-VAMUQSGC.js");
47170
+ const { getLearningDir } = await import("./learning-persistence-7O5QYDM7.js");
47098
47171
  const mem = createSessionMemory2(getLearningDir());
47099
47172
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
47100
47173
  cachedMemory = {
@@ -47155,7 +47228,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
47155
47228
  callRecord(routingMemoryCache);
47156
47229
  return;
47157
47230
  }
47158
- routingMemoryInitPromise ??= import("./routing-memory-YIKR7EMC.js").then(({ createRoutingMemory }) => {
47231
+ routingMemoryInitPromise ??= import("./routing-memory-UVFPT6FL.js").then(({ createRoutingMemory }) => {
47159
47232
  routingMemoryCache ??= createRoutingMemory();
47160
47233
  return routingMemoryCache;
47161
47234
  }).catch((error) => {
@@ -47189,7 +47262,7 @@ ${text}` : "";
47189
47262
  }
47190
47263
  async function getWeatherContext() {
47191
47264
  try {
47192
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-YDYML3JW.js");
47265
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-YZBDIZSV.js");
47193
47266
  const report = generateWeatherReport2({ includeAdaptive: true });
47194
47267
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
47195
47268
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -47207,8 +47280,8 @@ ${lines}
47207
47280
  }
47208
47281
  async function getMemoryContext(task) {
47209
47282
  try {
47210
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-B6TFD55A.js");
47211
- const { getLearningDir } = await import("./learning-persistence-SR5F4DSY.js");
47283
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-VAMUQSGC.js");
47284
+ const { getLearningDir } = await import("./learning-persistence-7O5QYDM7.js");
47212
47285
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
47213
47286
  const learnings = memory.searchLearnings(task.slice(0, 200));
47214
47287
  if (learnings.length === 0) return "";
@@ -47326,7 +47399,7 @@ ${contextBlock}`;
47326
47399
  const strategy = config.votingStrategy ?? "higher_order";
47327
47400
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47328
47401
  try {
47329
- const { executeVoting } = await import("./consensus-vote-65UZRQMY.js");
47402
+ const { executeVoting } = await import("./consensus-vote-WJW2MNNX.js");
47330
47403
  const votingResult = await executeVoting(
47331
47404
  {
47332
47405
  proposal: buildVoteProposal(plan, research),
@@ -47765,7 +47838,7 @@ async function searchCodebaseForTask(task) {
47765
47838
  }
47766
47839
  async function queryResearchRegistry(task) {
47767
47840
  try {
47768
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-2XQBWVG6.js");
47841
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-EY764EKA.js");
47769
47842
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
47770
47843
  if (topic === void 0) return null;
47771
47844
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -47836,7 +47909,7 @@ function createScanStageWrapper() {
47836
47909
  try {
47837
47910
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
47838
47911
  if (slug !== void 0) {
47839
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-MF4E5MG6.js");
47912
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-3KI6NNJ4.js");
47840
47913
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
47841
47914
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
47842
47915
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -48602,7 +48675,10 @@ function mapVoteDecisionToPrDecision(voteDecision) {
48602
48675
  var SOFT_BLOCK_REQUEST_CHANGES_THRESHOLD = 3;
48603
48676
  function aggregatePrDecisions(reviews, errorPolicy = "standard") {
48604
48677
  const valid = reviews.filter((r) => r.source !== "error");
48605
- 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");
48606
48682
  const hasVerifiedBlocker = valid.some(
48607
48683
  (r) => r.decision === "request_changes" && r.findings.some((f) => f.verified)
48608
48684
  );
@@ -48615,9 +48691,9 @@ function aggregatePrDecisions(reviews, errorPolicy = "standard") {
48615
48691
  if (errorPolicy === "absolute_quorum") {
48616
48692
  return absoluteQuorumApprove(reviews, valid);
48617
48693
  }
48618
- return { decision: "approve", verified: true };
48694
+ return panelVerdict("approve");
48619
48695
  }
48620
- return { decision: "abstain", verified: true };
48696
+ return panelVerdict("abstain");
48621
48697
  }
48622
48698
  function absoluteQuorumApprove(reviews, valid) {
48623
48699
  const errorCount = reviews.length - valid.length;
@@ -50961,7 +51037,7 @@ var GitHubTaskTracker = class {
50961
51037
  cachedProvider = null;
50962
51038
  async getProvider() {
50963
51039
  if (this.cachedProvider !== null) return this.cachedProvider;
50964
- const { createScmProvider } = await import("./factory-WJ6AV4WU.js");
51040
+ const { createScmProvider } = await import("./factory-4WA3SMPI.js");
50965
51041
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
50966
51042
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
50967
51043
  this.cachedProvider = result.value;
@@ -51874,7 +51950,7 @@ async function probeSource(source, includeModelIds) {
51874
51950
  }
51875
51951
  }
51876
51952
  async function defaultSources(includeOpenRouter) {
51877
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-ZIYR7YJ3.js");
51953
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-KHYFJ7SI.js");
51878
51954
  const adapters = createAllAdapters2();
51879
51955
  return buildDefaultModelSources(adapters, { includeOpenRouter });
51880
51956
  }
@@ -52296,6 +52372,11 @@ function createAnnotationsProxy(server) {
52296
52372
 
52297
52373
  // src/mcp/tools/tool-observability-proxy.ts
52298
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
+ }
52299
52380
  function createToolObservabilityProxy(server, eventBus) {
52300
52381
  return new Proxy(server, {
52301
52382
  get(target, prop, receiver) {
@@ -52322,13 +52403,15 @@ function wrapWithObservability(toolName, cb, eventBus) {
52322
52403
  try {
52323
52404
  const result = await cb(args, extra);
52324
52405
  const durationMs = getTimeProvider().now() - startTime;
52406
+ const failed = result?.isError === true;
52325
52407
  eventBus.emit({
52326
52408
  type: "tool.completed",
52327
52409
  timestamp: getTimeProvider().now(),
52328
52410
  toolName,
52329
52411
  invocationId,
52330
52412
  durationMs,
52331
- success: true
52413
+ success: !failed,
52414
+ ...failed ? { errorMessage: firstTextOf(result) } : {}
52332
52415
  });
52333
52416
  return result;
52334
52417
  } catch (error) {
@@ -55938,4 +56021,4 @@ export {
55938
56021
  shutdownFeedbackSubscriber,
55939
56022
  createEventBusBridge
55940
56023
  };
55941
- //# sourceMappingURL=chunk-VDEDTAHZ.js.map
56024
+ //# sourceMappingURL=chunk-7D6BYPOX.js.map