nexus-agents 2.153.0 → 2.154.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 (121) hide show
  1. package/dist/{child-mcp-config-A7CWNREQ.js → child-mcp-config-5TDFQBX4.js} +2 -2
  2. package/dist/{chunk-HIVRYAIJ.js → chunk-22MKYE4Y.js} +2 -2
  3. package/dist/{chunk-C6S6L5WB.js → chunk-3P5WC7AV.js} +195 -45
  4. package/dist/chunk-3P5WC7AV.js.map +1 -0
  5. package/dist/{chunk-T2SGTVB4.js → chunk-52UVXXYA.js} +2 -2
  6. package/dist/{chunk-447YUGJD.js → chunk-6LFKY2NE.js} +8 -8
  7. package/dist/{chunk-LIW44IKG.js → chunk-7TFBRAV7.js} +4 -4
  8. package/dist/{chunk-UBWBNKJ2.js → chunk-7ZBXMLTJ.js} +2 -2
  9. package/dist/{chunk-XXBQ2XV4.js → chunk-BMHQATIA.js} +2 -2
  10. package/dist/{chunk-CMAQI2SJ.js → chunk-CBGVR52X.js} +3 -3
  11. package/dist/{chunk-XXSV26SY.js → chunk-D4N7KBBT.js} +4 -4
  12. package/dist/{chunk-AXKMXLOH.js → chunk-DJTWGM7I.js} +2 -2
  13. package/dist/{chunk-7ZMOF54O.js → chunk-DZCMTSNS.js} +3 -3
  14. package/dist/{chunk-YLSSR3DV.js → chunk-F42V2BKN.js} +2 -2
  15. package/dist/{chunk-JYHSZDKL.js → chunk-F5R53HDK.js} +7 -7
  16. package/dist/{chunk-HTXQVLOI.js → chunk-GCZHEGDC.js} +5 -5
  17. package/dist/{chunk-4QRPK34N.js → chunk-IZVRLJIX.js} +2 -2
  18. package/dist/{chunk-G3MSANLH.js → chunk-J2P7FOEZ.js} +2 -2
  19. package/dist/{chunk-XSA7VZCU.js → chunk-KBHRWQBL.js} +2 -2
  20. package/dist/{chunk-NZNLBIJD.js → chunk-MY22I2FD.js} +4 -4
  21. package/dist/{chunk-YJRZZBRO.js → chunk-N3Y6J2FL.js} +14 -5
  22. package/dist/{chunk-YJRZZBRO.js.map → chunk-N3Y6J2FL.js.map} +1 -1
  23. package/dist/{chunk-BNFSOOH2.js → chunk-O25A3VXX.js} +2 -2
  24. package/dist/{chunk-MREJKQHH.js → chunk-PRMXFOWF.js} +7 -7
  25. package/dist/{chunk-CBFG63WO.js → chunk-QERDNK6B.js} +5 -5
  26. package/dist/{chunk-GXZJC4FG.js → chunk-QJC2XU2B.js} +4 -4
  27. package/dist/{chunk-EJXJNWV6.js → chunk-RW5ZE7IC.js} +7 -7
  28. package/dist/{chunk-CD7FU55Z.js → chunk-SRT2VLNP.js} +2 -2
  29. package/dist/{chunk-XQ5LT7GT.js → chunk-TWXCQOZN.js} +3 -3
  30. package/dist/{chunk-T24ADN3G.js → chunk-V7DS6V3U.js} +3 -3
  31. package/dist/{chunk-MF7KPK3C.js → chunk-VC7EUQH4.js} +2 -2
  32. package/dist/{chunk-M4YN3U3P.js → chunk-VHRF6VOS.js} +2 -2
  33. package/dist/{chunk-HQLZ7ORH.js → chunk-XDYOJQKC.js} +2 -2
  34. package/dist/{chunk-GMQH2I4P.js → chunk-XNW3W2OU.js} +3 -3
  35. package/dist/{chunk-3D3CARMV.js → chunk-ZFUFS44V.js} +2 -2
  36. package/dist/{chunk-D7D24TFI.js → chunk-ZLNGFULQ.js} +5 -5
  37. package/dist/{chunk-LXTTRYAT.js → chunk-ZVGM3MPI.js} +3 -3
  38. package/dist/{cli-circuit-breaker-JJ3RM63D.js → cli-circuit-breaker-G7NRAWQE.js} +4 -4
  39. package/dist/cli.js +41 -41
  40. package/dist/{composite-router-UAHBWEKB.js → composite-router-7S2MLIHW.js} +2 -2
  41. package/dist/{consensus-vote-VPHFIIMN.js → consensus-vote-CQBTPJRD.js} +15 -15
  42. package/dist/{context-retriever-SVEJE3IX.js → context-retriever-FTLRG2N6.js} +8 -8
  43. package/dist/{doctor-deep-U6LGEU4O.js → doctor-deep-VU5VELP2.js} +3 -3
  44. package/dist/{expert-bridge-Z4P6SWIU.js → expert-bridge-MJJDMA6Z.js} +4 -4
  45. package/dist/{factory-COS3CBV3.js → factory-2XKATTCM.js} +8 -8
  46. package/dist/{factory-P7LP5K4O.js → factory-RS462DMM.js} +5 -5
  47. package/dist/{improvement-review-3UXQ24DI.js → improvement-review-CCE655BZ.js} +5 -5
  48. package/dist/index.d.ts +56 -3
  49. package/dist/index.js +30 -30
  50. package/dist/{init-opencode-2IPKWKDI.js → init-opencode-3QHEWOJV.js} +6 -6
  51. package/dist/{issue-triage-LMG76MBJ.js → issue-triage-QOD3WWIM.js} +6 -6
  52. package/dist/{pr-reviewer-helpers-BNOJJ2CP.js → pr-reviewer-helpers-7IE2EX6M.js} +4 -4
  53. package/dist/{registry-command-KJJG7WH6.js → registry-command-PFOEWIKM.js} +2 -2
  54. package/dist/{repo-security-plan-AT5IYRHN.js → repo-security-plan-ELSKPBOD.js} +3 -3
  55. package/dist/{research-helpers-synthesize-OFOJXMLR.js → research-helpers-synthesize-DTNUWPRP.js} +4 -4
  56. package/dist/{routing-memory-JRCIBKFH.js → routing-memory-VBJMY6PE.js} +2 -2
  57. package/dist/{session-memory-IKTVC2GW.js → session-memory-BFT6O2F7.js} +3 -3
  58. package/dist/{setup-command-4WFSYJK2.js → setup-command-EWIFNU6P.js} +11 -11
  59. package/dist/{setup-config-QXCFHJAE.js → setup-config-ZC2AJ4IN.js} +3 -3
  60. package/dist/{setup-custom-api-VRZVWZ4U.js → setup-custom-api-6ALI76FS.js} +3 -3
  61. package/dist/{tool-memory-MZZVY7F3.js → tool-memory-KJAOR22P.js} +5 -5
  62. package/dist/{unified-registry-XZW6KIY2.js → unified-registry-SMGX7OMN.js} +9 -9
  63. package/dist/{weather-report-64YXR6VN.js → weather-report-GLZ2LI7V.js} +2 -2
  64. package/package.json +1 -1
  65. package/dist/chunk-C6S6L5WB.js.map +0 -1
  66. /package/dist/{child-mcp-config-A7CWNREQ.js.map → child-mcp-config-5TDFQBX4.js.map} +0 -0
  67. /package/dist/{chunk-HIVRYAIJ.js.map → chunk-22MKYE4Y.js.map} +0 -0
  68. /package/dist/{chunk-T2SGTVB4.js.map → chunk-52UVXXYA.js.map} +0 -0
  69. /package/dist/{chunk-447YUGJD.js.map → chunk-6LFKY2NE.js.map} +0 -0
  70. /package/dist/{chunk-LIW44IKG.js.map → chunk-7TFBRAV7.js.map} +0 -0
  71. /package/dist/{chunk-UBWBNKJ2.js.map → chunk-7ZBXMLTJ.js.map} +0 -0
  72. /package/dist/{chunk-XXBQ2XV4.js.map → chunk-BMHQATIA.js.map} +0 -0
  73. /package/dist/{chunk-CMAQI2SJ.js.map → chunk-CBGVR52X.js.map} +0 -0
  74. /package/dist/{chunk-XXSV26SY.js.map → chunk-D4N7KBBT.js.map} +0 -0
  75. /package/dist/{chunk-AXKMXLOH.js.map → chunk-DJTWGM7I.js.map} +0 -0
  76. /package/dist/{chunk-7ZMOF54O.js.map → chunk-DZCMTSNS.js.map} +0 -0
  77. /package/dist/{chunk-YLSSR3DV.js.map → chunk-F42V2BKN.js.map} +0 -0
  78. /package/dist/{chunk-JYHSZDKL.js.map → chunk-F5R53HDK.js.map} +0 -0
  79. /package/dist/{chunk-HTXQVLOI.js.map → chunk-GCZHEGDC.js.map} +0 -0
  80. /package/dist/{chunk-4QRPK34N.js.map → chunk-IZVRLJIX.js.map} +0 -0
  81. /package/dist/{chunk-G3MSANLH.js.map → chunk-J2P7FOEZ.js.map} +0 -0
  82. /package/dist/{chunk-XSA7VZCU.js.map → chunk-KBHRWQBL.js.map} +0 -0
  83. /package/dist/{chunk-NZNLBIJD.js.map → chunk-MY22I2FD.js.map} +0 -0
  84. /package/dist/{chunk-BNFSOOH2.js.map → chunk-O25A3VXX.js.map} +0 -0
  85. /package/dist/{chunk-MREJKQHH.js.map → chunk-PRMXFOWF.js.map} +0 -0
  86. /package/dist/{chunk-CBFG63WO.js.map → chunk-QERDNK6B.js.map} +0 -0
  87. /package/dist/{chunk-GXZJC4FG.js.map → chunk-QJC2XU2B.js.map} +0 -0
  88. /package/dist/{chunk-EJXJNWV6.js.map → chunk-RW5ZE7IC.js.map} +0 -0
  89. /package/dist/{chunk-CD7FU55Z.js.map → chunk-SRT2VLNP.js.map} +0 -0
  90. /package/dist/{chunk-XQ5LT7GT.js.map → chunk-TWXCQOZN.js.map} +0 -0
  91. /package/dist/{chunk-T24ADN3G.js.map → chunk-V7DS6V3U.js.map} +0 -0
  92. /package/dist/{chunk-MF7KPK3C.js.map → chunk-VC7EUQH4.js.map} +0 -0
  93. /package/dist/{chunk-M4YN3U3P.js.map → chunk-VHRF6VOS.js.map} +0 -0
  94. /package/dist/{chunk-HQLZ7ORH.js.map → chunk-XDYOJQKC.js.map} +0 -0
  95. /package/dist/{chunk-GMQH2I4P.js.map → chunk-XNW3W2OU.js.map} +0 -0
  96. /package/dist/{chunk-3D3CARMV.js.map → chunk-ZFUFS44V.js.map} +0 -0
  97. /package/dist/{chunk-D7D24TFI.js.map → chunk-ZLNGFULQ.js.map} +0 -0
  98. /package/dist/{chunk-LXTTRYAT.js.map → chunk-ZVGM3MPI.js.map} +0 -0
  99. /package/dist/{cli-circuit-breaker-JJ3RM63D.js.map → cli-circuit-breaker-G7NRAWQE.js.map} +0 -0
  100. /package/dist/{composite-router-UAHBWEKB.js.map → composite-router-7S2MLIHW.js.map} +0 -0
  101. /package/dist/{consensus-vote-VPHFIIMN.js.map → consensus-vote-CQBTPJRD.js.map} +0 -0
  102. /package/dist/{context-retriever-SVEJE3IX.js.map → context-retriever-FTLRG2N6.js.map} +0 -0
  103. /package/dist/{doctor-deep-U6LGEU4O.js.map → doctor-deep-VU5VELP2.js.map} +0 -0
  104. /package/dist/{expert-bridge-Z4P6SWIU.js.map → expert-bridge-MJJDMA6Z.js.map} +0 -0
  105. /package/dist/{factory-COS3CBV3.js.map → factory-2XKATTCM.js.map} +0 -0
  106. /package/dist/{factory-P7LP5K4O.js.map → factory-RS462DMM.js.map} +0 -0
  107. /package/dist/{improvement-review-3UXQ24DI.js.map → improvement-review-CCE655BZ.js.map} +0 -0
  108. /package/dist/{init-opencode-2IPKWKDI.js.map → init-opencode-3QHEWOJV.js.map} +0 -0
  109. /package/dist/{issue-triage-LMG76MBJ.js.map → issue-triage-QOD3WWIM.js.map} +0 -0
  110. /package/dist/{pr-reviewer-helpers-BNOJJ2CP.js.map → pr-reviewer-helpers-7IE2EX6M.js.map} +0 -0
  111. /package/dist/{registry-command-KJJG7WH6.js.map → registry-command-PFOEWIKM.js.map} +0 -0
  112. /package/dist/{repo-security-plan-AT5IYRHN.js.map → repo-security-plan-ELSKPBOD.js.map} +0 -0
  113. /package/dist/{research-helpers-synthesize-OFOJXMLR.js.map → research-helpers-synthesize-DTNUWPRP.js.map} +0 -0
  114. /package/dist/{routing-memory-JRCIBKFH.js.map → routing-memory-VBJMY6PE.js.map} +0 -0
  115. /package/dist/{session-memory-IKTVC2GW.js.map → session-memory-BFT6O2F7.js.map} +0 -0
  116. /package/dist/{setup-command-4WFSYJK2.js.map → setup-command-EWIFNU6P.js.map} +0 -0
  117. /package/dist/{setup-config-QXCFHJAE.js.map → setup-config-ZC2AJ4IN.js.map} +0 -0
  118. /package/dist/{setup-custom-api-VRZVWZ4U.js.map → setup-custom-api-6ALI76FS.js.map} +0 -0
  119. /package/dist/{tool-memory-MZZVY7F3.js.map → tool-memory-KJAOR22P.js.map} +0 -0
  120. /package/dist/{unified-registry-XZW6KIY2.js.map → unified-registry-SMGX7OMN.js.map} +0 -0
  121. /package/dist/{weather-report-64YXR6VN.js.map → weather-report-GLZ2LI7V.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createLogger
3
- } from "./chunk-YJRZZBRO.js";
3
+ } from "./chunk-N3Y6J2FL.js";
4
4
  import "./chunk-NL7SZQPW.js";
5
5
  import "./chunk-DHVMSIT5.js";
6
6
  import "./chunk-ZPWHCABL.js";
@@ -60,4 +60,4 @@ export {
60
60
  generateMcpConfig,
61
61
  getDefaultAllowedTools
62
62
  };
63
- //# sourceMappingURL=child-mcp-config-A7CWNREQ.js.map
63
+ //# sourceMappingURL=child-mcp-config-5TDFQBX4.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getErrorMessage,
5
5
  getTimeProvider,
6
6
  ok
7
- } from "./chunk-YJRZZBRO.js";
7
+ } from "./chunk-N3Y6J2FL.js";
8
8
 
9
9
  // src/context/session-memory.ts
10
10
  import * as fs from "fs";
@@ -352,4 +352,4 @@ export {
352
352
  SessionMemory,
353
353
  createSessionMemory
354
354
  };
355
- //# sourceMappingURL=chunk-HIVRYAIJ.js.map
355
+ //# sourceMappingURL=chunk-22MKYE4Y.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generateSecurityPlan
3
- } from "./chunk-T2SGTVB4.js";
3
+ } from "./chunk-52UVXXYA.js";
4
4
  import {
5
5
  analyzeGitHubRepo
6
6
  } from "./chunk-HFOQKCD2.js";
@@ -18,10 +18,10 @@ import {
18
18
  DEFAULT_TASK_TTL_MS,
19
19
  DEFAULT_TOOL_RATE_LIMITS,
20
20
  clampTaskTtl
21
- } from "./chunk-EJXJNWV6.js";
21
+ } from "./chunk-RW5ZE7IC.js";
22
22
  import {
23
23
  executeExpert
24
- } from "./chunk-JYHSZDKL.js";
24
+ } from "./chunk-F5R53HDK.js";
25
25
  import {
26
26
  JobStatusSchema,
27
27
  abortJob,
@@ -41,21 +41,21 @@ import {
41
41
  toJobSummary,
42
42
  warnIfSimulatedOutsideTests,
43
43
  writeJobCancelled
44
- } from "./chunk-447YUGJD.js";
44
+ } from "./chunk-6LFKY2NE.js";
45
45
  import {
46
46
  normalizeTopicToCanonical,
47
47
  synthesizeResearch
48
- } from "./chunk-7ZMOF54O.js";
48
+ } from "./chunk-DZCMTSNS.js";
49
49
  import {
50
50
  IssueTriage
51
- } from "./chunk-CBFG63WO.js";
51
+ } from "./chunk-QERDNK6B.js";
52
52
  import {
53
53
  resolveEnvMode,
54
54
  sanitizeInput
55
- } from "./chunk-MF7KPK3C.js";
55
+ } from "./chunk-VC7EUQH4.js";
56
56
  import {
57
57
  withPrerequisite
58
- } from "./chunk-XQ5LT7GT.js";
58
+ } from "./chunk-TWXCQOZN.js";
59
59
  import {
60
60
  NOOP_NOTIFIER,
61
61
  RateLimiter,
@@ -78,12 +78,12 @@ import {
78
78
  withAuditTrail,
79
79
  withProgressHeartbeat,
80
80
  wrapToolWithTimeout
81
- } from "./chunk-LXTTRYAT.js";
81
+ } from "./chunk-ZVGM3MPI.js";
82
82
  import {
83
83
  createAuditTrail,
84
84
  createGraphAuditBridge,
85
85
  emitPipelinePolicyEvent
86
- } from "./chunk-HQLZ7ORH.js";
86
+ } from "./chunk-XDYOJQKC.js";
87
87
  import {
88
88
  addResearchPaper,
89
89
  addSourceToRegistry,
@@ -111,15 +111,15 @@ import {
111
111
  parseRegistry,
112
112
  sourceExistsInRegistry,
113
113
  summarizeContextForPrompt
114
- } from "./chunk-D7D24TFI.js";
114
+ } from "./chunk-ZLNGFULQ.js";
115
115
  import {
116
116
  getTokenEnvVars,
117
117
  resolveToken
118
- } from "./chunk-G3MSANLH.js";
118
+ } from "./chunk-J2P7FOEZ.js";
119
119
  import {
120
120
  loadPapersRegistry,
121
121
  loadTechniquesRegistry
122
- } from "./chunk-4QRPK34N.js";
122
+ } from "./chunk-IZVRLJIX.js";
123
123
  import {
124
124
  resolveInsideRoot
125
125
  } from "./chunk-NUBSJGQZ.js";
@@ -128,14 +128,14 @@ import {
128
128
  MemoryImportance,
129
129
  calculateTextJaccardSimilarity,
130
130
  getToolMemory
131
- } from "./chunk-XXSV26SY.js";
131
+ } from "./chunk-D4N7KBBT.js";
132
132
  import {
133
133
  STOPWORDS,
134
134
  truncateWithInfo
135
135
  } from "./chunk-6T3EPABN.js";
136
136
  import {
137
137
  createSessionMemory
138
- } from "./chunk-HIVRYAIJ.js";
138
+ } from "./chunk-22MKYE4Y.js";
139
139
  import {
140
140
  BUILT_IN_EXPERTS,
141
141
  BuiltInExpertTypeSchema,
@@ -150,7 +150,7 @@ import {
150
150
  createEvent,
151
151
  getGlobalEventBus,
152
152
  getGlobalRegistry
153
- } from "./chunk-NZNLBIJD.js";
153
+ } from "./chunk-MY22I2FD.js";
154
154
  import {
155
155
  CliDetectionCache,
156
156
  asRecord,
@@ -158,19 +158,19 @@ import {
158
158
  getAvailableClis,
159
159
  sleep,
160
160
  withTimeout
161
- } from "./chunk-MREJKQHH.js";
161
+ } from "./chunk-PRMXFOWF.js";
162
162
  import {
163
163
  DEFAULTS
164
- } from "./chunk-AXKMXLOH.js";
164
+ } from "./chunk-DJTWGM7I.js";
165
165
  import {
166
166
  getAvailabilityCache,
167
167
  getCliForModelId,
168
168
  resolveFallback
169
- } from "./chunk-XXBQ2XV4.js";
169
+ } from "./chunk-BMHQATIA.js";
170
170
  import {
171
171
  generateHyphenId,
172
172
  generateUUID
173
- } from "./chunk-3D3CARMV.js";
173
+ } from "./chunk-ZFUFS44V.js";
174
174
  import {
175
175
  AGENT_ROUTER_TIMEOUTS,
176
176
  API_TIMEOUTS,
@@ -262,7 +262,7 @@ import {
262
262
  selectStrategyByManifest,
263
263
  toExpertTaskAnalysisResult,
264
264
  withStep
265
- } from "./chunk-YJRZZBRO.js";
265
+ } from "./chunk-N3Y6J2FL.js";
266
266
  import {
267
267
  ensureLearningDir,
268
268
  getMetaOutcomesFile,
@@ -26297,7 +26297,7 @@ function execIdFields(executionId) {
26297
26297
  async function populateUnifiedContextOnState(state, options) {
26298
26298
  const taskCandidate = state["task"];
26299
26299
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
26300
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-SVEJE3IX.js");
26300
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-FTLRG2N6.js");
26301
26301
  const category = inferTaskCategory2(taskCandidate);
26302
26302
  const executionId = options?.executionId;
26303
26303
  const execFields = execIdFields(executionId);
@@ -41571,7 +41571,7 @@ async function tryIssueTriage(task) {
41571
41571
  try {
41572
41572
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
41573
41573
  if (issueMatch === null) return null;
41574
- const { createIssueTriage } = await import("./issue-triage-LMG76MBJ.js");
41574
+ const { createIssueTriage } = await import("./issue-triage-QOD3WWIM.js");
41575
41575
  const triage = createIssueTriage();
41576
41576
  const owner = issueMatch[1] ?? "";
41577
41577
  const num = issueMatch[2] ?? "";
@@ -41599,7 +41599,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
41599
41599
  ]);
41600
41600
  async function classifyWithLLM(task) {
41601
41601
  try {
41602
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-Z4P6SWIU.js");
41602
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-MJJDMA6Z.js");
41603
41603
  const prompt = [
41604
41604
  "Classify this task into exactly one pipeline template.",
41605
41605
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -43240,7 +43240,7 @@ var memoryInitPromise = null;
43240
43240
  async function initPipelineMemory() {
43241
43241
  if (cachedMemory !== null) return cachedMemory;
43242
43242
  try {
43243
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-IKTVC2GW.js");
43243
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-BFT6O2F7.js");
43244
43244
  const { getLearningDir } = await import("./learning-persistence-M3OTCCNI.js");
43245
43245
  const mem = createSessionMemory2(getLearningDir());
43246
43246
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -43302,7 +43302,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
43302
43302
  callRecord(routingMemoryCache);
43303
43303
  return;
43304
43304
  }
43305
- routingMemoryInitPromise ??= import("./routing-memory-JRCIBKFH.js").then(({ createRoutingMemory }) => {
43305
+ routingMemoryInitPromise ??= import("./routing-memory-VBJMY6PE.js").then(({ createRoutingMemory }) => {
43306
43306
  routingMemoryCache ??= createRoutingMemory();
43307
43307
  return routingMemoryCache;
43308
43308
  }).catch((error) => {
@@ -43336,7 +43336,7 @@ ${text}` : "";
43336
43336
  }
43337
43337
  async function getWeatherContext() {
43338
43338
  try {
43339
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-64YXR6VN.js");
43339
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-GLZ2LI7V.js");
43340
43340
  const report = generateWeatherReport2({ includeAdaptive: true });
43341
43341
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
43342
43342
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -43354,7 +43354,7 @@ ${lines}
43354
43354
  }
43355
43355
  async function getMemoryContext(task) {
43356
43356
  try {
43357
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-IKTVC2GW.js");
43357
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-BFT6O2F7.js");
43358
43358
  const { getLearningDir } = await import("./learning-persistence-M3OTCCNI.js");
43359
43359
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
43360
43360
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -43466,7 +43466,7 @@ ${contextBlock}`;
43466
43466
  const strategy = config.votingStrategy ?? "higher_order";
43467
43467
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
43468
43468
  try {
43469
- const { executeVoting } = await import("./consensus-vote-VPHFIIMN.js");
43469
+ const { executeVoting } = await import("./consensus-vote-CQBTPJRD.js");
43470
43470
  const votingResult = await executeVoting(
43471
43471
  {
43472
43472
  proposal: buildVoteProposal(plan, research),
@@ -43903,7 +43903,7 @@ async function searchCodebaseForTask(task) {
43903
43903
  }
43904
43904
  async function queryResearchRegistry(task) {
43905
43905
  try {
43906
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-OFOJXMLR.js");
43906
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-DTNUWPRP.js");
43907
43907
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
43908
43908
  if (topic === void 0) return null;
43909
43909
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -43974,7 +43974,7 @@ function createScanStageWrapper() {
43974
43974
  try {
43975
43975
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
43976
43976
  if (slug !== void 0) {
43977
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-AT5IYRHN.js");
43977
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-ELSKPBOD.js");
43978
43978
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
43979
43979
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
43980
43980
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -44328,7 +44328,8 @@ function persistPrReviewRecord(opts) {
44328
44328
 
44329
44329
  // src/mcp/tools/pr-review-record-producer.ts
44330
44330
  function buildAndPersist(prNumber, baseSha, args) {
44331
- const { input, aggregate, counts, reviewCount, logger: logger58 } = args;
44331
+ const { input, aggregate, counts, reviewCount, logger: logger58, coverage } = args;
44332
+ const coverageSuffix = coverage?.partial === true ? ` [partial coverage: ${String(coverage.reviewedFiles)}/${String(coverage.totalFiles)} files reviewed, dropped: ${coverage.droppedFiles.join(", ")}]` : "";
44332
44333
  if (reviewedDiffWasTruncated(input.prDiff)) {
44333
44334
  logger58.warn(
44334
44335
  "Reviewed diff exceeds the hash byte cap; content past it is unbound in reviewedDiffHash",
@@ -44348,7 +44349,7 @@ function buildAndPersist(prNumber, baseSha, args) {
44348
44349
  error: counts.errorCount,
44349
44350
  total: reviewCount
44350
44351
  },
44351
- summary: `${aggregate.decision} (${String(counts.approveCount)} approve / ${String(counts.requestChangesCount)} request_changes / ${String(counts.abstainCount)} abstain) \u2014 ${input.prTitle}`,
44352
+ summary: `${aggregate.decision} (${String(counts.approveCount)} approve / ${String(counts.requestChangesCount)} request_changes / ${String(counts.abstainCount)} abstain) \u2014 ${input.prTitle}${coverageSuffix}`,
44352
44353
  logger: logger58
44353
44354
  });
44354
44355
  if (record === void 0) {
@@ -44403,6 +44404,133 @@ function persistReviewRecord(args) {
44403
44404
  }
44404
44405
  }
44405
44406
 
44407
+ // src/mcp/tools/pr-review-diff-budget.ts
44408
+ var SENSITIVE_PATH_PATTERNS = Object.freeze([
44409
+ "auth",
44410
+ "crypto",
44411
+ "secret",
44412
+ "credential",
44413
+ "security",
44414
+ "exec",
44415
+ "spawn",
44416
+ "password",
44417
+ "token",
44418
+ ".env",
44419
+ "permission",
44420
+ "sql"
44421
+ ]);
44422
+ function isSensitivePath(path12) {
44423
+ const lower = path12.toLowerCase();
44424
+ return SENSITIVE_PATH_PATTERNS.some((p) => lower.includes(p));
44425
+ }
44426
+ function byteLen(text) {
44427
+ return Buffer.byteLength(text, "utf-8");
44428
+ }
44429
+ function extractPath(fileText) {
44430
+ const nl = fileText.indexOf("\n");
44431
+ const firstLine = nl === -1 ? fileText : fileText.slice(0, nl);
44432
+ const m = /^diff --git a\/(.+?) b\/(.+)$/.exec(firstLine);
44433
+ if (m !== null) return m[2];
44434
+ return firstLine.replace(/^diff --git\s*/, "").trim();
44435
+ }
44436
+ function splitByFile(diff) {
44437
+ if (diff.length === 0) return [];
44438
+ const headerRe = /^diff --git .*$/gm;
44439
+ const starts = [];
44440
+ let m;
44441
+ while ((m = headerRe.exec(diff)) !== null) {
44442
+ starts.push(m.index);
44443
+ }
44444
+ if (starts.length === 0) {
44445
+ return [{ path: "(unstructured)", text: diff, bytes: byteLen(diff) }];
44446
+ }
44447
+ const files = [];
44448
+ const firstStart = starts[0];
44449
+ if (firstStart > 0) {
44450
+ const text = diff.slice(0, firstStart);
44451
+ files.push({ path: "(preamble)", text, bytes: byteLen(text) });
44452
+ }
44453
+ for (let i = 0; i < starts.length; i++) {
44454
+ const start = starts[i];
44455
+ const end = i + 1 < starts.length ? starts[i + 1] : diff.length;
44456
+ const text = diff.slice(start, end);
44457
+ files.push({ path: extractPath(text), text, bytes: byteLen(text) });
44458
+ }
44459
+ return files;
44460
+ }
44461
+ function truncateWithMarker(file, budget) {
44462
+ const marker = `
44463
+ [... TRUNCATED: file ${file.path} is ${String(file.bytes)} bytes, over the ${String(budget)}-byte review budget; showing a partial prefix \u2014 this file is listed in droppedFiles as partially-seen ...]
44464
+ `;
44465
+ const room = Math.max(0, budget - byteLen(marker));
44466
+ const prefix = Buffer.from(file.text, "utf-8").subarray(0, room).toString("utf-8");
44467
+ return prefix + marker;
44468
+ }
44469
+ function securityFirstPack(files, budget) {
44470
+ const sensitive = files.filter((f) => isSensitivePath(f.path));
44471
+ const rest = files.filter((f) => !isSensitivePath(f.path));
44472
+ const ordered = [...sensitive, ...rest];
44473
+ const segments = [];
44474
+ const reviewedFiles = [];
44475
+ const droppedFiles = [];
44476
+ let used = 0;
44477
+ for (let i = 0; i < ordered.length; i++) {
44478
+ const file = ordered[i];
44479
+ if (used + file.bytes <= budget) {
44480
+ segments.push(file.text);
44481
+ reviewedFiles.push(file.path);
44482
+ used += file.bytes;
44483
+ continue;
44484
+ }
44485
+ if (used === 0) {
44486
+ segments.push(truncateWithMarker(file, budget));
44487
+ reviewedFiles.push(file.path);
44488
+ droppedFiles.push(file.path);
44489
+ } else {
44490
+ droppedFiles.push(file.path);
44491
+ }
44492
+ for (let j = i + 1; j < ordered.length; j++) {
44493
+ droppedFiles.push(ordered[j].path);
44494
+ }
44495
+ break;
44496
+ }
44497
+ return {
44498
+ packed: segments.join(""),
44499
+ reviewedFiles,
44500
+ totalFiles: files.length,
44501
+ droppedFiles,
44502
+ partial: droppedFiles.length > 0
44503
+ };
44504
+ }
44505
+ function packDiffForReview(prDiff, budget) {
44506
+ if (prDiff.length <= budget) {
44507
+ return { coverage: void 0, packedDiff: prDiff, note: "" };
44508
+ }
44509
+ const pack = securityFirstPack(splitByFile(prDiff), budget);
44510
+ const coverage = {
44511
+ reviewedFiles: pack.reviewedFiles.length,
44512
+ totalFiles: pack.totalFiles,
44513
+ droppedFiles: pack.droppedFiles,
44514
+ partial: pack.partial,
44515
+ strategy: "budget"
44516
+ };
44517
+ const note = pack.partial ? `> NOTE: partial review \u2014 ${String(pack.reviewedFiles.length)} of ${String(pack.totalFiles)} files reviewed (security-prioritized; lowest-priority dropped): ${pack.droppedFiles.join(", ")}
44518
+
44519
+ ` : "";
44520
+ return { coverage, packedDiff: pack.packed, note };
44521
+ }
44522
+ function applyPartialCoverageGate(aggregate, coverage) {
44523
+ if (coverage?.partial !== true) return aggregate;
44524
+ if (aggregate.decision === "approve" && aggregate.verified) {
44525
+ return {
44526
+ decision: "abstain",
44527
+ verified: false,
44528
+ reason: `no_quorum: partial diff \u2014 ${String(coverage.reviewedFiles)} of ${String(coverage.totalFiles)} files reviewed`
44529
+ };
44530
+ }
44531
+ return aggregate;
44532
+ }
44533
+
44406
44534
  // src/mcp/tools/pr-review-tool.ts
44407
44535
  var PR_REVIEW_ROLES = [
44408
44536
  "architect",
@@ -44412,13 +44540,16 @@ var PR_REVIEW_ROLES = [
44412
44540
  "scope_steward"
44413
44541
  ];
44414
44542
  var MAX_DIFF_LENGTH = 5e4;
44543
+ var MAX_DIFF_INPUT_LENGTH = 2e6;
44415
44544
  var MAX_REPO_CONTEXT_LENGTH = 2e3;
44416
44545
  var MAX_DESCRIPTION_LENGTH = 1e4;
44417
44546
  var PR_REVIEW_ASYNC_HINT = "A pr_review run fans out to 5 live LLM voters and can exceed the synchronous MCP request timeout. Retry with `dispatch: 'async'` to get a jobId immediately, then poll get_job_result({ jobId }) for the result.";
44418
44547
  var PrReviewInputSchema = z91.object({
44419
44548
  prTitle: z91.string().min(1).max(500).describe("PR title"),
44420
44549
  prDescription: z91.string().max(MAX_DESCRIPTION_LENGTH).optional().describe("PR body / description"),
44421
- prDiff: z91.string().min(1).max(MAX_DIFF_LENGTH).describe(`Unified diff text (max ${String(MAX_DIFF_LENGTH)} chars; truncate before calling)`),
44550
+ prDiff: z91.string().min(1).max(MAX_DIFF_INPUT_LENGTH).describe(
44551
+ `Unified diff text (max ${String(MAX_DIFF_INPUT_LENGTH)} chars). No need to truncate before calling: diffs over ${String(MAX_DIFF_LENGTH)} chars are security-prioritized and PARTIALLY reviewed (lowest-priority whole files dropped; coverage reported on the response, and a partial review can block but never verified-approve).`
44552
+ ),
44422
44553
  repoContext: z91.string().max(MAX_REPO_CONTEXT_LENGTH).optional().describe(
44423
44554
  `Optional one-paragraph repo context (architecture, conventions; max ${String(MAX_REPO_CONTEXT_LENGTH)} chars; trim before calling)`
44424
44555
  ),
@@ -44591,19 +44722,36 @@ function summarizeReviews(reviews) {
44591
44722
  errorCount: reviews.filter((r) => r.source === "error").length
44592
44723
  };
44593
44724
  }
44594
- function aggregateWithTelemetry(reviews, errorPolicy, errorCount, logger58) {
44595
- const aggregate = aggregatePrDecisions(reviews, errorPolicy);
44596
- if (aggregate.reason !== void 0) {
44725
+ function resolveAggregate(reviews, input, errorCount, coverage, logger58) {
44726
+ const preGate = aggregatePrDecisions(reviews, input.errorPolicy);
44727
+ if (preGate.reason !== void 0) {
44597
44728
  logger58.warn("pr_review degraded to no_quorum under absolute_quorum (#4132)", {
44598
- reason: aggregate.reason,
44729
+ reason: preGate.reason,
44599
44730
  errorCount
44600
44731
  });
44601
44732
  }
44733
+ const aggregate = applyPartialCoverageGate(preGate, coverage);
44734
+ if (aggregate !== preGate) {
44735
+ logger58.warn(
44736
+ "pr_review partial review barred from verified-approve \u2014 degraded to no_quorum (#4140)",
44737
+ { reason: aggregate.reason }
44738
+ );
44739
+ }
44602
44740
  return aggregate;
44603
44741
  }
44742
+ function preparePanelProposal(input, logger58) {
44743
+ const { coverage, packedDiff, note } = packDiffForReview(input.prDiff, MAX_DIFF_LENGTH);
44744
+ const body = coverage === void 0 ? input : { ...input, prDiff: packedDiff };
44745
+ if (coverage?.partial === true) {
44746
+ logger58.warn(
44747
+ `pr_review diff over budget \u2014 reviewed ${String(coverage.reviewedFiles)} of ${String(coverage.totalFiles)} files, dropped ${String(coverage.droppedFiles.length)}`
44748
+ );
44749
+ }
44750
+ return { proposal: note + buildPrReviewProposal(body), coverage };
44751
+ }
44604
44752
  async function executePrReviewBody(input, logger58, gatewayAdapters) {
44605
44753
  const start = Date.now();
44606
- const proposal = buildPrReviewProposal(input);
44754
+ const { proposal, coverage } = preparePanelProposal(input, logger58);
44607
44755
  const voteResults = await collectRealVotes({
44608
44756
  roles: PR_REVIEW_ROLES,
44609
44757
  proposal,
@@ -44613,7 +44761,7 @@ async function executePrReviewBody(input, logger58, gatewayAdapters) {
44613
44761
  });
44614
44762
  const reviews = voteResults.map(toPrReviewVote);
44615
44763
  const counts = summarizeReviews(reviews);
44616
- const aggregate = aggregateWithTelemetry(reviews, input.errorPolicy, counts.errorCount, logger58);
44764
+ const aggregate = resolveAggregate(reviews, input, counts.errorCount, coverage, logger58);
44617
44765
  let costSummary;
44618
44766
  try {
44619
44767
  costSummary = recordDecisionCost({
@@ -44631,7 +44779,8 @@ async function executePrReviewBody(input, logger58, gatewayAdapters) {
44631
44779
  aggregate,
44632
44780
  counts,
44633
44781
  reviewCount: reviews.length,
44634
- logger: logger58
44782
+ logger: logger58,
44783
+ ...coverage !== void 0 ? { coverage } : {}
44635
44784
  });
44636
44785
  const response = {
44637
44786
  summary: aggregate.decision,
@@ -44640,7 +44789,8 @@ async function executePrReviewBody(input, logger58, gatewayAdapters) {
44640
44789
  reviews,
44641
44790
  totalDurationMs: Date.now() - start,
44642
44791
  ...costSummary !== void 0 ? { costSummary } : {},
44643
- recordOutcome: recordOutcome3
44792
+ recordOutcome: recordOutcome3,
44793
+ ...coverage !== void 0 ? { coverage } : {}
44644
44794
  };
44645
44795
  return toolSuccess(JSON.stringify(response, null, 2));
44646
44796
  }
@@ -46460,7 +46610,7 @@ var GitHubTaskTracker = class {
46460
46610
  cachedProvider = null;
46461
46611
  async getProvider() {
46462
46612
  if (this.cachedProvider !== null) return this.cachedProvider;
46463
- const { createScmProvider } = await import("./factory-P7LP5K4O.js");
46613
+ const { createScmProvider } = await import("./factory-RS462DMM.js");
46464
46614
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
46465
46615
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
46466
46616
  this.cachedProvider = result.value;
@@ -47233,7 +47383,7 @@ async function probeSource(source, includeModelIds) {
47233
47383
  }
47234
47384
  }
47235
47385
  async function defaultSources(includeOpenRouter) {
47236
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-COS3CBV3.js");
47386
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-2XKATTCM.js");
47237
47387
  const adapters = createAllAdapters2();
47238
47388
  return buildDefaultModelSources(adapters, { includeOpenRouter });
47239
47389
  }
@@ -51296,4 +51446,4 @@ export {
51296
51446
  shutdownFeedbackSubscriber,
51297
51447
  createEventBusBridge
51298
51448
  };
51299
- //# sourceMappingURL=chunk-C6S6L5WB.js.map
51449
+ //# sourceMappingURL=chunk-3P5WC7AV.js.map