nexus-agents 7.0.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/{child-mcp-config-ORXLS5HP.js → child-mcp-config-V2ESGPZ4.js} +7 -7
  2. package/dist/{chunk-RBF64DXJ.js → chunk-2S7Q7GHX.js} +5 -5
  3. package/dist/{chunk-6E2M3P5A.js → chunk-3GMYW66U.js} +14 -14
  4. package/dist/{chunk-4OW67KT2.js → chunk-4HXPNLZS.js} +6 -6
  5. package/dist/{chunk-W4Q5NZYZ.js → chunk-4QHAMZLU.js} +3 -3
  6. package/dist/{chunk-KSQSWEFH.js → chunk-54Z2II7G.js} +21 -11
  7. package/dist/chunk-54Z2II7G.js.map +1 -0
  8. package/dist/{chunk-UJPVBDYG.js → chunk-5FBPGOKA.js} +24 -24
  9. package/dist/chunk-5FBPGOKA.js.map +1 -0
  10. package/dist/{chunk-RSMG2DPB.js → chunk-64GMIUM5.js} +5 -5
  11. package/dist/{chunk-RLBJTZHA.js → chunk-AHTOZ2UR.js} +2 -2
  12. package/dist/{chunk-JNZ3D5B5.js → chunk-AL5E5T3O.js} +4 -4
  13. package/dist/{chunk-3CGUPSBW.js → chunk-BKAUGBSF.js} +2 -2
  14. package/dist/{chunk-XREG2HTQ.js → chunk-BSWLRSOG.js} +4 -4
  15. package/dist/{chunk-JJT7NVNY.js → chunk-CHU7NTUR.js} +4 -4
  16. package/dist/{chunk-UVO673OY.js → chunk-DBDXS7PE.js} +3 -3
  17. package/dist/{chunk-VYAXMVI5.js → chunk-DEYXS6IZ.js} +5 -5
  18. package/dist/{chunk-VYAXMVI5.js.map → chunk-DEYXS6IZ.js.map} +1 -1
  19. package/dist/{chunk-HFOQKCD2.js → chunk-DGWT7DXX.js} +3 -3
  20. package/dist/{chunk-HFOQKCD2.js.map → chunk-DGWT7DXX.js.map} +1 -1
  21. package/dist/{chunk-LVYRGNOC.js → chunk-DWUF5YWG.js} +2 -2
  22. package/dist/{chunk-VVXHIUFQ.js → chunk-EGWPONTU.js} +6 -6
  23. package/dist/{chunk-SS5FADQN.js → chunk-EXAULYXZ.js} +19 -19
  24. package/dist/{chunk-K2AWJGQO.js → chunk-FSY2TYFX.js} +8 -8
  25. package/dist/{chunk-6GYTTWNM.js → chunk-FVHUWXM2.js} +2 -2
  26. package/dist/{chunk-ZGEDIKAM.js → chunk-FW2FBZBD.js} +4 -4
  27. package/dist/{chunk-ZD4VEHEG.js → chunk-H6BUSSTF.js} +2 -2
  28. package/dist/{chunk-D6TL5GZV.js → chunk-HKKLVWRO.js} +5 -5
  29. package/dist/{chunk-GBHJ37V3.js → chunk-ITCKXMOH.js} +4 -4
  30. package/dist/{chunk-Y742U2YM.js → chunk-J7SPTP2E.js} +119 -104
  31. package/dist/chunk-J7SPTP2E.js.map +1 -0
  32. package/dist/{chunk-KJWD2V4K.js → chunk-JFE3JT5Q.js} +7 -7
  33. package/dist/chunk-KRG23W3T.js +7 -0
  34. package/dist/{chunk-33FI7W3G.js → chunk-L2PDPA23.js} +3 -3
  35. package/dist/{chunk-XZEYSIGG.js → chunk-LOKTE5WE.js} +4 -4
  36. package/dist/{chunk-HA2MM4C2.js → chunk-LOYIV3HG.js} +234 -225
  37. package/dist/chunk-LOYIV3HG.js.map +1 -0
  38. package/dist/{chunk-Q6IODDEA.js → chunk-LVSKLVYC.js} +12 -12
  39. package/dist/{chunk-Q6IODDEA.js.map → chunk-LVSKLVYC.js.map} +1 -1
  40. package/dist/{chunk-JEAKVUWM.js → chunk-M6E5E7QV.js} +3 -3
  41. package/dist/{chunk-OGHEKPLD.js → chunk-MM223CVS.js} +10 -10
  42. package/dist/{chunk-6Q3KSZVI.js → chunk-MWS56UFF.js} +2 -2
  43. package/dist/{chunk-PDMWQ2NK.js → chunk-OYWFWMLH.js} +58 -41
  44. package/dist/chunk-OYWFWMLH.js.map +1 -0
  45. package/dist/{chunk-S2Z7CME3.js → chunk-PXJ6CB5V.js} +2 -2
  46. package/dist/{chunk-Y5GYBP52.js → chunk-QTDUIXOJ.js} +4 -4
  47. package/dist/{chunk-7U7HAYPB.js → chunk-R4B4UJ6F.js} +25 -59
  48. package/dist/chunk-R4B4UJ6F.js.map +1 -0
  49. package/dist/{chunk-QAHGHWC7.js → chunk-WIJ5J7AH.js} +23 -23
  50. package/dist/{chunk-BTWKDT4F.js → chunk-YJ7Q2NHE.js} +20 -20
  51. package/dist/{chunk-IWTK6FDT.js → chunk-ZTPBXWA7.js} +4 -4
  52. package/dist/{cli-circuit-breaker-5FYJDS5O.js → cli-circuit-breaker-YFHX4FN2.js} +5 -5
  53. package/dist/cli.js +378 -379
  54. package/dist/cli.js.map +1 -1
  55. package/dist/{codebase-search-RHBGEWXK.js → codebase-search-3D4TW3KR.js} +2 -2
  56. package/dist/{composite-router-GE24MYPP.js → composite-router-224FZMI2.js} +4 -4
  57. package/dist/{consensus-vote-355WNDBN.js → consensus-vote-57SKG3EN.js} +22 -22
  58. package/dist/{context-retriever-3OO6N4V6.js → context-retriever-CCVDD7TO.js} +12 -12
  59. package/dist/{dist-IKZ53APZ.js → dist-JK32DFHT.js} +2 -2
  60. package/dist/doctor-deep-37II5V7H.js +13 -0
  61. package/dist/{doctor-live-J7JIZH3T.js → doctor-live-VXQOZW37.js} +13 -13
  62. package/dist/{expert-bridge-PWRVRFDG.js → expert-bridge-7LGHU7IL.js} +6 -6
  63. package/dist/factory-5URERSHK.js +25 -0
  64. package/dist/factory-SF6ZPN6D.js +15 -0
  65. package/dist/{improvement-review-PO4LS6GO.js → improvement-review-2AFBFUQX.js} +8 -8
  66. package/dist/index.d.ts +75 -57
  67. package/dist/index.js +65 -76
  68. package/dist/index.js.map +1 -1
  69. package/dist/{init-opencode-GDPE4U65.js → init-opencode-ZFCKUI2N.js} +10 -10
  70. package/dist/issue-triage-IVYGGNB4.js +17 -0
  71. package/dist/{learning-persistence-7O5QYDM7.js → learning-persistence-7N5SZHNX.js} +3 -3
  72. package/dist/{pr-reviewer-helpers-KBOP72XG.js → pr-reviewer-helpers-TS2HJMZR.js} +6 -6
  73. package/dist/{registry-command-ZK4NQ2MX.js → registry-command-M6LXKNEY.js} +7 -7
  74. package/dist/{repo-analyze-UJOWFGNM.js → repo-analyze-DI65XOTQ.js} +2 -2
  75. package/dist/{repo-security-plan-SZU4O2TN.js → repo-security-plan-LS5GCASE.js} +6 -6
  76. package/dist/research-helpers-synthesize-NQMSFDMD.js +14 -0
  77. package/dist/{routing-memory-2SMMUPTB.js → routing-memory-BBHAEJUL.js} +4 -4
  78. package/dist/{session-memory-YQQVPLKM.js → session-memory-GYIEP7MM.js} +5 -5
  79. package/dist/setup-config-YIQ7ZZT3.js +11 -0
  80. package/dist/{setup-custom-api-ZSBUIJID.js → setup-custom-api-CHISHJZV.js} +7 -7
  81. package/dist/setup-data-dir-KQKFLBKQ.js +29 -0
  82. package/dist/tool-memory-TGNVGKUT.js +22 -0
  83. package/dist/tool-memory-registry-adapters-35IPCJLV.js +12 -0
  84. package/dist/unified-registry-D4QCQ36Z.js +26 -0
  85. package/dist/{weather-report-6AVPMHHM.js → weather-report-ZLQGZUDL.js} +4 -4
  86. package/package.json +4 -8
  87. package/dist/chunk-7U7HAYPB.js.map +0 -1
  88. package/dist/chunk-HA2MM4C2.js.map +0 -1
  89. package/dist/chunk-KSQSWEFH.js.map +0 -1
  90. package/dist/chunk-MNG6VKJP.js +0 -7
  91. package/dist/chunk-PDMWQ2NK.js.map +0 -1
  92. package/dist/chunk-UJPVBDYG.js.map +0 -1
  93. package/dist/chunk-Y742U2YM.js.map +0 -1
  94. package/dist/doctor-deep-6WHVRRVQ.js +0 -13
  95. package/dist/factory-3BZDQQYM.js +0 -25
  96. package/dist/factory-UFKRSADE.js +0 -15
  97. package/dist/issue-triage-2LNYGQRJ.js +0 -17
  98. package/dist/research-helpers-synthesize-QY3DDHTD.js +0 -14
  99. package/dist/setup-config-LMZE4IRV.js +0 -11
  100. package/dist/setup-data-dir-O2EABCPO.js +0 -29
  101. package/dist/tool-memory-GUPG2M25.js +0 -22
  102. package/dist/tool-memory-registry-adapters-IMRSOAAV.js +0 -12
  103. package/dist/unified-registry-RPT4O3XB.js +0 -26
  104. package/scripts/postinstall.js +0 -12
  105. /package/dist/{child-mcp-config-ORXLS5HP.js.map → child-mcp-config-V2ESGPZ4.js.map} +0 -0
  106. /package/dist/{chunk-RBF64DXJ.js.map → chunk-2S7Q7GHX.js.map} +0 -0
  107. /package/dist/{chunk-6E2M3P5A.js.map → chunk-3GMYW66U.js.map} +0 -0
  108. /package/dist/{chunk-4OW67KT2.js.map → chunk-4HXPNLZS.js.map} +0 -0
  109. /package/dist/{chunk-W4Q5NZYZ.js.map → chunk-4QHAMZLU.js.map} +0 -0
  110. /package/dist/{chunk-RSMG2DPB.js.map → chunk-64GMIUM5.js.map} +0 -0
  111. /package/dist/{chunk-RLBJTZHA.js.map → chunk-AHTOZ2UR.js.map} +0 -0
  112. /package/dist/{chunk-JNZ3D5B5.js.map → chunk-AL5E5T3O.js.map} +0 -0
  113. /package/dist/{chunk-3CGUPSBW.js.map → chunk-BKAUGBSF.js.map} +0 -0
  114. /package/dist/{chunk-XREG2HTQ.js.map → chunk-BSWLRSOG.js.map} +0 -0
  115. /package/dist/{chunk-JJT7NVNY.js.map → chunk-CHU7NTUR.js.map} +0 -0
  116. /package/dist/{chunk-UVO673OY.js.map → chunk-DBDXS7PE.js.map} +0 -0
  117. /package/dist/{chunk-LVYRGNOC.js.map → chunk-DWUF5YWG.js.map} +0 -0
  118. /package/dist/{chunk-VVXHIUFQ.js.map → chunk-EGWPONTU.js.map} +0 -0
  119. /package/dist/{chunk-SS5FADQN.js.map → chunk-EXAULYXZ.js.map} +0 -0
  120. /package/dist/{chunk-K2AWJGQO.js.map → chunk-FSY2TYFX.js.map} +0 -0
  121. /package/dist/{chunk-6GYTTWNM.js.map → chunk-FVHUWXM2.js.map} +0 -0
  122. /package/dist/{chunk-ZGEDIKAM.js.map → chunk-FW2FBZBD.js.map} +0 -0
  123. /package/dist/{chunk-ZD4VEHEG.js.map → chunk-H6BUSSTF.js.map} +0 -0
  124. /package/dist/{chunk-D6TL5GZV.js.map → chunk-HKKLVWRO.js.map} +0 -0
  125. /package/dist/{chunk-GBHJ37V3.js.map → chunk-ITCKXMOH.js.map} +0 -0
  126. /package/dist/{chunk-KJWD2V4K.js.map → chunk-JFE3JT5Q.js.map} +0 -0
  127. /package/dist/{chunk-MNG6VKJP.js.map → chunk-KRG23W3T.js.map} +0 -0
  128. /package/dist/{chunk-33FI7W3G.js.map → chunk-L2PDPA23.js.map} +0 -0
  129. /package/dist/{chunk-XZEYSIGG.js.map → chunk-LOKTE5WE.js.map} +0 -0
  130. /package/dist/{chunk-JEAKVUWM.js.map → chunk-M6E5E7QV.js.map} +0 -0
  131. /package/dist/{chunk-OGHEKPLD.js.map → chunk-MM223CVS.js.map} +0 -0
  132. /package/dist/{chunk-6Q3KSZVI.js.map → chunk-MWS56UFF.js.map} +0 -0
  133. /package/dist/{chunk-S2Z7CME3.js.map → chunk-PXJ6CB5V.js.map} +0 -0
  134. /package/dist/{chunk-Y5GYBP52.js.map → chunk-QTDUIXOJ.js.map} +0 -0
  135. /package/dist/{chunk-QAHGHWC7.js.map → chunk-WIJ5J7AH.js.map} +0 -0
  136. /package/dist/{chunk-BTWKDT4F.js.map → chunk-YJ7Q2NHE.js.map} +0 -0
  137. /package/dist/{chunk-IWTK6FDT.js.map → chunk-ZTPBXWA7.js.map} +0 -0
  138. /package/dist/{cli-circuit-breaker-5FYJDS5O.js.map → cli-circuit-breaker-YFHX4FN2.js.map} +0 -0
  139. /package/dist/{codebase-search-RHBGEWXK.js.map → codebase-search-3D4TW3KR.js.map} +0 -0
  140. /package/dist/{composite-router-GE24MYPP.js.map → composite-router-224FZMI2.js.map} +0 -0
  141. /package/dist/{consensus-vote-355WNDBN.js.map → consensus-vote-57SKG3EN.js.map} +0 -0
  142. /package/dist/{context-retriever-3OO6N4V6.js.map → context-retriever-CCVDD7TO.js.map} +0 -0
  143. /package/dist/{dist-IKZ53APZ.js.map → dist-JK32DFHT.js.map} +0 -0
  144. /package/dist/{doctor-deep-6WHVRRVQ.js.map → doctor-deep-37II5V7H.js.map} +0 -0
  145. /package/dist/{doctor-live-J7JIZH3T.js.map → doctor-live-VXQOZW37.js.map} +0 -0
  146. /package/dist/{expert-bridge-PWRVRFDG.js.map → expert-bridge-7LGHU7IL.js.map} +0 -0
  147. /package/dist/{factory-3BZDQQYM.js.map → factory-5URERSHK.js.map} +0 -0
  148. /package/dist/{factory-UFKRSADE.js.map → factory-SF6ZPN6D.js.map} +0 -0
  149. /package/dist/{improvement-review-PO4LS6GO.js.map → improvement-review-2AFBFUQX.js.map} +0 -0
  150. /package/dist/{init-opencode-GDPE4U65.js.map → init-opencode-ZFCKUI2N.js.map} +0 -0
  151. /package/dist/{issue-triage-2LNYGQRJ.js.map → issue-triage-IVYGGNB4.js.map} +0 -0
  152. /package/dist/{learning-persistence-7O5QYDM7.js.map → learning-persistence-7N5SZHNX.js.map} +0 -0
  153. /package/dist/{pr-reviewer-helpers-KBOP72XG.js.map → pr-reviewer-helpers-TS2HJMZR.js.map} +0 -0
  154. /package/dist/{registry-command-ZK4NQ2MX.js.map → registry-command-M6LXKNEY.js.map} +0 -0
  155. /package/dist/{repo-analyze-UJOWFGNM.js.map → repo-analyze-DI65XOTQ.js.map} +0 -0
  156. /package/dist/{repo-security-plan-SZU4O2TN.js.map → repo-security-plan-LS5GCASE.js.map} +0 -0
  157. /package/dist/{research-helpers-synthesize-QY3DDHTD.js.map → research-helpers-synthesize-NQMSFDMD.js.map} +0 -0
  158. /package/dist/{routing-memory-2SMMUPTB.js.map → routing-memory-BBHAEJUL.js.map} +0 -0
  159. /package/dist/{session-memory-YQQVPLKM.js.map → session-memory-GYIEP7MM.js.map} +0 -0
  160. /package/dist/{setup-config-LMZE4IRV.js.map → setup-config-YIQ7ZZT3.js.map} +0 -0
  161. /package/dist/{setup-custom-api-ZSBUIJID.js.map → setup-custom-api-CHISHJZV.js.map} +0 -0
  162. /package/dist/{setup-data-dir-O2EABCPO.js.map → setup-data-dir-KQKFLBKQ.js.map} +0 -0
  163. /package/dist/{tool-memory-GUPG2M25.js.map → tool-memory-TGNVGKUT.js.map} +0 -0
  164. /package/dist/{tool-memory-registry-adapters-IMRSOAAV.js.map → tool-memory-registry-adapters-35IPCJLV.js.map} +0 -0
  165. /package/dist/{unified-registry-RPT4O3XB.js.map → unified-registry-D4QCQ36Z.js.map} +0 -0
  166. /package/dist/{weather-report-6AVPMHHM.js.map → weather-report-ZLQGZUDL.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  generateSecurityPlan
3
- } from "./chunk-VYAXMVI5.js";
3
+ } from "./chunk-DEYXS6IZ.js";
4
4
  import {
5
5
  analyzeGitHubRepo
6
- } from "./chunk-HFOQKCD2.js";
6
+ } from "./chunk-DGWT7DXX.js";
7
7
  import {
8
8
  CodebaseIndex,
9
9
  DEFAULT_INDEX_MAX_DEPTH,
@@ -12,7 +12,7 @@ import {
12
12
  extractSymbolIndexResult,
13
13
  extractSymbols,
14
14
  findSourceFiles
15
- } from "./chunk-RSMG2DPB.js";
15
+ } from "./chunk-64GMIUM5.js";
16
16
  import {
17
17
  FINDING_SEVERITY_LEVELS,
18
18
  SARIF_LEVEL_MAP,
@@ -21,10 +21,10 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-UJPVBDYG.js";
24
+ } from "./chunk-5FBPGOKA.js";
25
25
  import {
26
26
  executeExpert
27
- } from "./chunk-KJWD2V4K.js";
27
+ } from "./chunk-JFE3JT5Q.js";
28
28
  import {
29
29
  JobStatusSchema,
30
30
  VOTER_ROLES,
@@ -47,24 +47,24 @@ import {
47
47
  simulationDeniedResult,
48
48
  toJobSummary,
49
49
  writeJobCancelled
50
- } from "./chunk-SS5FADQN.js";
50
+ } from "./chunk-EXAULYXZ.js";
51
51
  import {
52
52
  allOf
53
53
  } from "./chunk-OQB3XC5O.js";
54
54
  import {
55
55
  normalizeTopicToCanonical,
56
56
  synthesizeResearch
57
- } from "./chunk-UVO673OY.js";
57
+ } from "./chunk-DBDXS7PE.js";
58
58
  import {
59
59
  IssueTriage
60
- } from "./chunk-Q6IODDEA.js";
60
+ } from "./chunk-LVSKLVYC.js";
61
61
  import {
62
62
  resolveEnvMode,
63
63
  sanitizeInput
64
- } from "./chunk-RLBJTZHA.js";
64
+ } from "./chunk-AHTOZ2UR.js";
65
65
  import {
66
66
  withPrerequisite
67
- } from "./chunk-6E2M3P5A.js";
67
+ } from "./chunk-3GMYW66U.js";
68
68
  import {
69
69
  NOOP_NOTIFIER,
70
70
  RateLimiter,
@@ -78,6 +78,7 @@ import {
78
78
  getToolAnnotations,
79
79
  getToolTimeout,
80
80
  measuredTrustTier,
81
+ sanitizeToolInput,
81
82
  toSdkCallback,
82
83
  toSdkCallbackWithBudgetCheck,
83
84
  toolError,
@@ -88,18 +89,18 @@ import {
88
89
  withAuditTrail,
89
90
  withProgressHeartbeat,
90
91
  wrapToolWithTimeout
91
- } from "./chunk-PDMWQ2NK.js";
92
+ } from "./chunk-OYWFWMLH.js";
92
93
  import {
93
94
  createAuditTrail,
94
95
  createGraphAuditBridge,
95
96
  emitPipelinePolicyEvent
96
- } from "./chunk-6Q3KSZVI.js";
97
+ } from "./chunk-MWS56UFF.js";
97
98
  import {
98
99
  EventTopics,
99
100
  createEvent,
100
101
  getGlobalEventBus,
101
102
  getGlobalRegistry
102
- } from "./chunk-D6TL5GZV.js";
103
+ } from "./chunk-HKKLVWRO.js";
103
104
  import {
104
105
  IDENTIFIER_RE,
105
106
  LANG_VALUES,
@@ -132,29 +133,29 @@ import {
132
133
  parseRegistry,
133
134
  sourceExistsInRegistry,
134
135
  summarizeContextForPrompt
135
- } from "./chunk-QAHGHWC7.js";
136
+ } from "./chunk-WIJ5J7AH.js";
136
137
  import {
137
138
  loadPapersRegistry,
138
139
  loadTechniquesRegistry,
139
140
  resolveInsideRoot
140
- } from "./chunk-K2AWJGQO.js";
141
+ } from "./chunk-FSY2TYFX.js";
141
142
  import {
142
143
  getTokenEnvVars,
143
144
  resolveToken
144
- } from "./chunk-XZEYSIGG.js";
145
+ } from "./chunk-LOKTE5WE.js";
145
146
  import {
146
147
  DEFAULT_RELEVANCE_CONFIG,
147
148
  MemoryImportance,
148
149
  calculateTextJaccardSimilarity,
149
150
  getToolMemory
150
- } from "./chunk-7U7HAYPB.js";
151
+ } from "./chunk-R4B4UJ6F.js";
151
152
  import {
152
153
  STOPWORDS,
153
154
  truncateWithInfo
154
155
  } from "./chunk-6T3EPABN.js";
155
156
  import {
156
157
  createSessionMemory
157
- } from "./chunk-JNZ3D5B5.js";
158
+ } from "./chunk-AL5E5T3O.js";
158
159
  import {
159
160
  BUILT_IN_EXPERTS,
160
161
  BuiltInExpertTypeSchema,
@@ -163,7 +164,7 @@ import {
163
164
  } from "./chunk-43SVUIPL.js";
164
165
  import {
165
166
  getMemoryRegistry
166
- } from "./chunk-KSQSWEFH.js";
167
+ } from "./chunk-54Z2II7G.js";
167
168
  import {
168
169
  CliDetectionCache,
169
170
  asRecord,
@@ -172,25 +173,25 @@ import {
172
173
  getAvailableClis,
173
174
  sleep,
174
175
  withTimeout
175
- } from "./chunk-BTWKDT4F.js";
176
+ } from "./chunk-YJ7Q2NHE.js";
176
177
  import {
177
178
  BaseAdapter,
178
179
  createStream,
179
180
  requireApiKey,
180
181
  validateApiKeyPresence
181
- } from "./chunk-LVYRGNOC.js";
182
+ } from "./chunk-DWUF5YWG.js";
182
183
  import {
183
184
  DEFAULTS
184
- } from "./chunk-ZD4VEHEG.js";
185
+ } from "./chunk-H6BUSSTF.js";
185
186
  import {
186
187
  getAvailabilityCache,
187
188
  getCliForModelId,
188
189
  resolveFallback
189
- } from "./chunk-6GYTTWNM.js";
190
+ } from "./chunk-FVHUWXM2.js";
190
191
  import {
191
192
  generateHyphenId,
192
193
  generateUUID
193
- } from "./chunk-33FI7W3G.js";
194
+ } from "./chunk-L2PDPA23.js";
194
195
  import {
195
196
  AGENT_ROUTER_TIMEOUTS,
196
197
  API_TIMEOUTS,
@@ -296,18 +297,18 @@ import {
296
297
  selectStrategyByManifest,
297
298
  toExpertTaskAnalysisResult,
298
299
  withStep
299
- } from "./chunk-Y742U2YM.js";
300
+ } from "./chunk-J7SPTP2E.js";
300
301
  import {
301
302
  ensureLearningDir,
302
303
  getMetaOutcomesFile,
303
304
  isPersistenceEnabled
304
- } from "./chunk-GBHJ37V3.js";
305
+ } from "./chunk-ITCKXMOH.js";
305
306
  import {
306
307
  findRepoRoot,
307
308
  getNexusDataDir,
308
309
  nexusDataPath,
309
310
  nexusDataPathEnsure
310
- } from "./chunk-OGHEKPLD.js";
311
+ } from "./chunk-MM223CVS.js";
311
312
 
312
313
  // src/config/schemas-core.ts
313
314
  import { z } from "zod";
@@ -1415,8 +1416,8 @@ function getConfigManager() {
1415
1416
  }
1416
1417
 
1417
1418
  // src/config/config-loader.ts
1418
- import { readFileSync, existsSync } from "fs";
1419
- import { resolve, join } from "path";
1419
+ import { readFileSync, existsSync } from "node:fs";
1420
+ import { resolve, join } from "node:path";
1420
1421
  import * as yaml from "yaml";
1421
1422
  var DEFAULT_CONFIG_FILE = "nexus-agents.yaml";
1422
1423
  var ALTERNATE_CONFIG_FILE = "nexus-agents.yml";
@@ -1952,7 +1953,7 @@ var RateLimiter2 = class {
1952
1953
  * Sleeps for the specified duration.
1953
1954
  */
1954
1955
  sleep(ms) {
1955
- return new Promise((resolve22) => setTimeout(resolve22, ms));
1956
+ return new Promise((resolve21) => setTimeout(resolve21, ms));
1956
1957
  }
1957
1958
  /**
1958
1959
  * Returns the current number of available tokens.
@@ -2212,7 +2213,7 @@ var AbortError = class extends Error {
2212
2213
  function raceAbort(promise, signal) {
2213
2214
  if (signal === void 0) return promise;
2214
2215
  if (signal.aborted) return Promise.reject(new AbortError());
2215
- return new Promise((resolve22, reject) => {
2216
+ return new Promise((resolve21, reject) => {
2216
2217
  const onAbort = () => {
2217
2218
  reject(new AbortError());
2218
2219
  };
@@ -2220,7 +2221,7 @@ function raceAbort(promise, signal) {
2220
2221
  promise.then(
2221
2222
  (value) => {
2222
2223
  signal.removeEventListener("abort", onAbort);
2223
- resolve22(value);
2224
+ resolve21(value);
2224
2225
  },
2225
2226
  (error) => {
2226
2227
  signal.removeEventListener("abort", onAbort);
@@ -5180,13 +5181,13 @@ function makeCancelError(taskId) {
5180
5181
  }
5181
5182
  function executeWithTimeout(params) {
5182
5183
  const { task, maxDurationMs, executeTask, transformError, signal } = params;
5183
- return new Promise((resolve22) => {
5184
+ return new Promise((resolve21) => {
5184
5185
  let settled = false;
5185
5186
  const settle = (result) => {
5186
5187
  if (settled) return;
5187
5188
  settled = true;
5188
5189
  clearTimeout(timeoutId);
5189
- resolve22(result);
5190
+ resolve21(result);
5190
5191
  };
5191
5192
  const timeoutId = setTimeout(() => {
5192
5193
  settle(
@@ -9951,10 +9952,6 @@ function wrapInMarkdownFence(diagram, title) {
9951
9952
  return parts.join("\n");
9952
9953
  }
9953
9954
 
9954
- // src/utils/resolve-project-root.ts
9955
- import { existsSync as existsSync2 } from "fs";
9956
- import { dirname, join as join2, resolve as resolve2 } from "path";
9957
-
9958
9955
  // src/agents/tech-lead-collaboration.ts
9959
9956
  var DEFAULT_COLLAB_CONFIG = {
9960
9957
  enableCollaborativeSynthesis: true,
@@ -10693,13 +10690,13 @@ var WaveScheduler = class {
10693
10690
  }
10694
10691
  async withTimeout(promise, timeoutMs, taskId) {
10695
10692
  if (timeoutMs <= 0) return promise;
10696
- return new Promise((resolve22, reject) => {
10693
+ return new Promise((resolve21, reject) => {
10697
10694
  const timer = setTimeout(() => {
10698
10695
  reject(new Error(`Task ${taskId} timed out after ${String(timeoutMs)}ms`));
10699
10696
  }, timeoutMs);
10700
10697
  promise.then((result) => {
10701
10698
  clearTimeout(timer);
10702
- resolve22(result);
10699
+ resolve21(result);
10703
10700
  }).catch((error) => {
10704
10701
  clearTimeout(timer);
10705
10702
  reject(error instanceof Error ? error : new Error(String(error)));
@@ -16248,7 +16245,7 @@ var STOP_WORDS2 = /* @__PURE__ */ new Set([
16248
16245
  ]);
16249
16246
 
16250
16247
  // src/agents/skills/skill-library.ts
16251
- import { randomUUID } from "crypto";
16248
+ import { randomUUID } from "node:crypto";
16252
16249
 
16253
16250
  // src/agents/skills/skill-search.ts
16254
16251
  function extractKeywords2(text, stopWords) {
@@ -17975,7 +17972,7 @@ var ManifestSchema2 = z32.object({
17975
17972
  });
17976
17973
  async function resolveImportPath(source) {
17977
17974
  if (source.startsWith("./") || source.startsWith("/") || source.startsWith("../")) {
17978
- const pathModule = await import("path");
17975
+ const pathModule = await import("node:path");
17979
17976
  return pathModule.resolve(process.cwd(), source);
17980
17977
  }
17981
17978
  return source;
@@ -18479,8 +18476,8 @@ var Semaphore = class {
18479
18476
  this.available -= 1;
18480
18477
  return Promise.resolve();
18481
18478
  }
18482
- return new Promise((resolve22) => {
18483
- this.waiters.push(resolve22);
18479
+ return new Promise((resolve21) => {
18480
+ this.waiters.push(resolve21);
18484
18481
  });
18485
18482
  }
18486
18483
  release() {
@@ -18825,8 +18822,8 @@ function createContextItem(id, content, source, relevance, timestamp) {
18825
18822
  }
18826
18823
 
18827
18824
  // src/agents/wave-checkpoint-persistence.ts
18828
- import * as fs from "fs";
18829
- import * as path from "path";
18825
+ import * as fs from "node:fs";
18826
+ import * as path from "node:path";
18830
18827
 
18831
18828
  // src/agents/wave-checkpoint-types.ts
18832
18829
  import { z as z39 } from "zod";
@@ -18887,7 +18884,7 @@ var DEFAULT_SICA_CONFIG2 = {
18887
18884
  };
18888
18885
 
18889
18886
  // src/agents/self-improving/sica-version-manager.ts
18890
- import { randomUUID as randomUUID2 } from "crypto";
18887
+ import { randomUUID as randomUUID2 } from "node:crypto";
18891
18888
  var SicaVersionManager = class {
18892
18889
  config;
18893
18890
  logger;
@@ -19139,10 +19136,10 @@ var SicaVersionManager = class {
19139
19136
  };
19140
19137
 
19141
19138
  // src/agents/self-improving/sica-agent.ts
19142
- import { randomUUID as randomUUID4 } from "crypto";
19139
+ import { randomUUID as randomUUID4 } from "node:crypto";
19143
19140
 
19144
19141
  // src/agents/self-improving/sica-agent-helpers.ts
19145
- import { randomUUID as randomUUID3 } from "crypto";
19142
+ import { randomUUID as randomUUID3 } from "node:crypto";
19146
19143
  function estimateQuality(result) {
19147
19144
  const output2 = result.output;
19148
19145
  if (typeof output2 !== "string") return 0.5;
@@ -20863,7 +20860,7 @@ function calculateCompactionScore(hubAgents) {
20863
20860
  }
20864
20861
 
20865
20862
  // src/agents/orchestration/puppeteer-helpers.ts
20866
- import { randomUUID as randomUUID5 } from "crypto";
20863
+ import { randomUUID as randomUUID5 } from "node:crypto";
20867
20864
  function generateSessionId() {
20868
20865
  return `puppeteer-${randomUUID5().slice(0, 8)}`;
20869
20866
  }
@@ -21129,7 +21126,7 @@ function createPolicyForMode(policyMode) {
21129
21126
  }
21130
21127
 
21131
21128
  // src/agents/orchestration/puppeteer-events.ts
21132
- import { randomUUID as randomUUID6 } from "crypto";
21129
+ import { randomUUID as randomUUID6 } from "node:crypto";
21133
21130
  var PuppeteerTopics = {
21134
21131
  /** Orchestration session started */
21135
21132
  STARTED: "puppeteer.started",
@@ -21904,9 +21901,9 @@ var ExpertPool = class {
21904
21901
  if (this.active < this.capacity) {
21905
21902
  return this.issuePermit();
21906
21903
  }
21907
- return new Promise((resolve22, reject) => {
21904
+ return new Promise((resolve21, reject) => {
21908
21905
  const timer = setTimeout(() => {
21909
- const idx = this.queue.findIndex((e) => e.resolve === resolve22);
21906
+ const idx = this.queue.findIndex((e) => e.resolve === resolve21);
21910
21907
  if (idx !== -1) {
21911
21908
  this.queue.splice(idx, 1);
21912
21909
  }
@@ -21916,7 +21913,7 @@ var ExpertPool = class {
21916
21913
  )
21917
21914
  );
21918
21915
  }, this.acquireTimeoutMs);
21919
- this.queue.push({ resolve: resolve22, reject, timer });
21916
+ this.queue.push({ resolve: resolve21, reject, timer });
21920
21917
  });
21921
21918
  }
21922
21919
  /** Release a permit back to the pool. */
@@ -22278,8 +22275,8 @@ function getTopologicalOrder(workflow) {
22278
22275
  }
22279
22276
 
22280
22277
  // src/workflows/workflow-parser.ts
22281
- import * as fs2 from "fs/promises";
22282
- import * as path2 from "path";
22278
+ import * as fs2 from "node:fs/promises";
22279
+ import * as path2 from "node:path";
22283
22280
  import * as yaml2 from "yaml";
22284
22281
  var MAX_FILE_SIZE_BYTES = 1024 * 1024;
22285
22282
  var SUPPORTED_EXTENSIONS2 = [".yaml", ".yml", ".json"];
@@ -22500,8 +22497,8 @@ var TaskQueue = class {
22500
22497
  if (this.cancelled) {
22501
22498
  return Promise.reject(new Error("Queue has been cancelled"));
22502
22499
  }
22503
- return new Promise((resolve22, reject) => {
22504
- this.queue.push({ task, resolve: resolve22, reject });
22500
+ return new Promise((resolve21, reject) => {
22501
+ this.queue.push({ task, resolve: resolve21, reject });
22505
22502
  this.processNext();
22506
22503
  });
22507
22504
  }
@@ -22777,16 +22774,16 @@ async function executeStepWithTimeout(step, context, stepExecutor, signal) {
22777
22774
  return executeWithTimeout2(step, stepContext, stepExecutor, stepTimeout, startTime);
22778
22775
  }
22779
22776
  function executeWithTimeout2(step, context, executor, timeout, startTime) {
22780
- return new Promise((resolve22) => {
22777
+ return new Promise((resolve21) => {
22781
22778
  const timeoutId = setTimeout(() => {
22782
- resolve22(createTimeoutResult(step.id, getTimeProvider().now() - startTime, timeout));
22779
+ resolve21(createTimeoutResult(step.id, getTimeProvider().now() - startTime, timeout));
22783
22780
  }, timeout);
22784
22781
  executor(step, context).then((result) => {
22785
22782
  clearTimeout(timeoutId);
22786
- resolve22(result);
22783
+ resolve21(result);
22787
22784
  }).catch((error) => {
22788
22785
  clearTimeout(timeoutId);
22789
- resolve22(createErrorResult(step.id, getTimeProvider().now() - startTime, error));
22786
+ resolve21(createErrorResult(step.id, getTimeProvider().now() - startTime, error));
22790
22787
  });
22791
22788
  });
22792
22789
  }
@@ -23038,11 +23035,11 @@ var TEMPLATE_KEYWORDS = {
23038
23035
  };
23039
23036
 
23040
23037
  // src/workflows/template-loader.ts
23041
- import { readFile as readFile2, readdir, stat as stat2 } from "fs/promises";
23042
- import { existsSync as existsSync4 } from "fs";
23043
- import { join as join4, basename, extname as extname2, resolve as resolve5, sep } from "path";
23044
- import { fileURLToPath } from "url";
23045
- import { dirname as dirname2 } from "path";
23038
+ import { readFile as readFile2, readdir, stat as stat2 } from "node:fs/promises";
23039
+ import { existsSync as existsSync3 } from "node:fs";
23040
+ import { join as join3, basename, extname as extname2, resolve as resolve4, sep } from "node:path";
23041
+ import { fileURLToPath } from "node:url";
23042
+ import { dirname } from "node:path";
23046
23043
  import { parse as parseYaml2 } from "yaml";
23047
23044
  function validatePath3(userPath, allowedRoot) {
23048
23045
  const resolved = resolveInsideRoot(userPath, allowedRoot);
@@ -23050,7 +23047,7 @@ function validatePath3(userPath, allowedRoot) {
23050
23047
  return {
23051
23048
  ok: false,
23052
23049
  error: new SecurityError("Path traversal detected: path escapes allowed root directory", {
23053
- context: { userPath, allowedRoot: resolve5(allowedRoot) }
23050
+ context: { userPath, allowedRoot: resolve4(allowedRoot) }
23054
23051
  })
23055
23052
  };
23056
23053
  }
@@ -23058,32 +23055,32 @@ function validatePath3(userPath, allowedRoot) {
23058
23055
  }
23059
23056
  function getBuiltInTemplatesPath() {
23060
23057
  const currentFile = fileURLToPath(import.meta.url);
23061
- const currentDir = dirname2(currentFile);
23058
+ const currentDir = dirname(currentFile);
23062
23059
  if (currentFile.includes(`${sep}dist${sep}`) || currentFile.endsWith(`${sep}dist`)) {
23063
23060
  const distIndex = currentFile.lastIndexOf(`${sep}dist${sep}`);
23064
23061
  if (distIndex !== -1) {
23065
23062
  const distDir = currentFile.substring(0, distIndex + 5);
23066
- const bundledPath = join4(distDir, "workflows", "templates");
23067
- if (existsSync4(bundledPath)) {
23063
+ const bundledPath = join3(distDir, "workflows", "templates");
23064
+ if (existsSync3(bundledPath)) {
23068
23065
  return bundledPath;
23069
23066
  }
23070
23067
  }
23071
23068
  }
23072
23069
  const possiblePaths = [
23073
23070
  // Unbundled: relative to template-loader.ts in src/workflows/
23074
- join4(currentDir, "templates"),
23071
+ join3(currentDir, "templates"),
23075
23072
  // Bundled: relative to dist/ directory
23076
- join4(currentDir, "workflows", "templates"),
23073
+ join3(currentDir, "workflows", "templates"),
23077
23074
  // Bundled chunk: may be in dist/ with workflows/templates as sibling
23078
- join4(dirname2(currentDir), "workflows", "templates"),
23079
- join4(dirname2(currentDir), "dist", "workflows", "templates")
23075
+ join3(dirname(currentDir), "workflows", "templates"),
23076
+ join3(dirname(currentDir), "dist", "workflows", "templates")
23080
23077
  ];
23081
23078
  for (const path12 of possiblePaths) {
23082
- if (existsSync4(path12)) {
23079
+ if (existsSync3(path12)) {
23083
23080
  return path12;
23084
23081
  }
23085
23082
  }
23086
- return join4(currentDir, "templates");
23083
+ return join3(currentDir, "templates");
23087
23084
  }
23088
23085
  function createValidationError(errors) {
23089
23086
  const firstError = errors[0];
@@ -23165,7 +23162,7 @@ async function loadTemplatesFromDirectory(directoryPath) {
23165
23162
  const templates = [];
23166
23163
  const errors = [];
23167
23164
  try {
23168
- const resolvedDirectory = resolve5(directoryPath);
23165
+ const resolvedDirectory = resolve4(directoryPath);
23169
23166
  const stats = await stat2(resolvedDirectory);
23170
23167
  if (!stats.isDirectory()) {
23171
23168
  errors.push(new ParseError(`${resolvedDirectory} is not a directory`));
@@ -25185,9 +25182,9 @@ function withLogging(toolName, handler3, logger58) {
25185
25182
  }
25186
25183
 
25187
25184
  // src/mcp/middleware/auth-handler.ts
25188
- import { randomBytes, timingSafeEqual } from "crypto";
25189
- import { readFileSync as readFileSync3, writeFileSync, existsSync as existsSync5, mkdirSync as mkdirSync2 } from "fs";
25190
- import { dirname as dirname3 } from "path";
25185
+ import { randomBytes, timingSafeEqual } from "node:crypto";
25186
+ import { readFileSync as readFileSync3, writeFileSync, existsSync as existsSync4, mkdirSync as mkdirSync2 } from "node:fs";
25187
+ import { dirname as dirname2 } from "node:path";
25191
25188
  var DEFAULT_AUTH_SUBDIR = "auth";
25192
25189
  var DEFAULT_TOKEN_FILE = "server-token";
25193
25190
  var TOKEN_LENGTH_BYTES = 32;
@@ -25199,7 +25196,7 @@ function generateSecureToken() {
25199
25196
  }
25200
25197
  function readStoredToken(tokenPath) {
25201
25198
  try {
25202
- if (!existsSync5(tokenPath)) {
25199
+ if (!existsSync4(tokenPath)) {
25203
25200
  return void 0;
25204
25201
  }
25205
25202
  return readFileSync3(tokenPath, "utf-8").trim();
@@ -25208,8 +25205,8 @@ function readStoredToken(tokenPath) {
25208
25205
  }
25209
25206
  }
25210
25207
  function writeToken(tokenPath, token) {
25211
- const dir = dirname3(tokenPath);
25212
- if (!existsSync5(dir)) {
25208
+ const dir = dirname2(tokenPath);
25209
+ if (!existsSync4(dir)) {
25213
25210
  mkdirSync2(dir, { recursive: true, mode: 448 });
25214
25211
  }
25215
25212
  writeFileSync(tokenPath, token + "\n", { mode: 384 });
@@ -25367,7 +25364,7 @@ async function withToolError(prefix, logger58, fn) {
25367
25364
  }
25368
25365
 
25369
25366
  // src/mcp/middleware/spawn-depth-guard.ts
25370
- import { AsyncLocalStorage } from "async_hooks";
25367
+ import { AsyncLocalStorage } from "node:async_hooks";
25371
25368
  var logger13 = createLogger({ component: "spawn-depth-guard" });
25372
25369
  var MAX_SPAWN_DEPTH = 3;
25373
25370
  var depthStorage = new AsyncLocalStorage();
@@ -25769,7 +25766,7 @@ function createInteractionGraph() {
25769
25766
  }
25770
25767
 
25771
25768
  // src/observability/swarm-observer.ts
25772
- import { randomUUID as randomUUID7 } from "crypto";
25769
+ import { randomUUID as randomUUID7 } from "node:crypto";
25773
25770
 
25774
25771
  // src/observability/swarm-observer-helpers.ts
25775
25772
  function calculateSeverity(queuedMessages, blockedAgents) {
@@ -28848,7 +28845,7 @@ var RunWorkflowInputSchema = z56.object({
28848
28845
  });
28849
28846
 
28850
28847
  // src/mcp/tools/run-workflow-helpers.ts
28851
- import { resolve as resolve6, sep as sep2 } from "path";
28848
+ import { resolve as resolve5, sep as sep2 } from "node:path";
28852
28849
  function isFilePath(template) {
28853
28850
  return template.includes("/") || template.includes("\\") || template.endsWith(".yaml") || template.endsWith(".yml");
28854
28851
  }
@@ -28861,9 +28858,9 @@ function validateWorkflowPath(userPath, allowedRoots) {
28861
28858
  })
28862
28859
  };
28863
28860
  }
28864
- const resolvedPath = resolve6(userPath);
28861
+ const resolvedPath = resolve5(userPath);
28865
28862
  for (const root of allowedRoots) {
28866
- const resolvedRoot = resolve6(root);
28863
+ const resolvedRoot = resolve5(root);
28867
28864
  if (resolvedPath === resolvedRoot || resolvedPath.startsWith(resolvedRoot + sep2)) {
28868
28865
  return { ok: true, value: resolvedPath };
28869
28866
  }
@@ -28871,7 +28868,7 @@ function validateWorkflowPath(userPath, allowedRoots) {
28871
28868
  return {
28872
28869
  ok: false,
28873
28870
  error: new SecurityError("Path traversal detected: path escapes allowed directories", {
28874
- context: { userPath, allowedDirectories: allowedRoots.map((r) => resolve6(r)) }
28871
+ context: { userPath, allowedDirectories: allowedRoots.map((r) => resolve5(r)) }
28875
28872
  })
28876
28873
  };
28877
28874
  }
@@ -29047,11 +29044,11 @@ function formatValidationErrors(validation) {
29047
29044
  }
29048
29045
 
29049
29046
  // src/mcp/tools/run-workflow.ts
29050
- import { randomUUID as randomUUID8 } from "crypto";
29047
+ import { randomUUID as randomUUID8 } from "node:crypto";
29051
29048
  function resolveExecutionEngineOrError(deps, workflowName) {
29052
29049
  try {
29053
- const resolve22 = deps.resolveExecutionEngine ?? (() => deps.workflowEngine);
29054
- return { ok: true, value: resolve22() };
29050
+ const resolve21 = deps.resolveExecutionEngine ?? (() => deps.workflowEngine);
29051
+ return { ok: true, value: resolve21() };
29055
29052
  } catch (error) {
29056
29053
  const message = error instanceof Error ? error.message : String(error);
29057
29054
  deps.logger?.error(
@@ -29692,7 +29689,7 @@ function execIdFields(executionId) {
29692
29689
  async function populateUnifiedContextOnState(state, options) {
29693
29690
  const taskCandidate = state["task"];
29694
29691
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
29695
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-3OO6N4V6.js");
29692
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-CCVDD7TO.js");
29696
29693
  const category = inferTaskCategory2(taskCandidate);
29697
29694
  const executionId = options?.executionId;
29698
29695
  const execFields = execIdFields(executionId);
@@ -30189,13 +30186,13 @@ function dedupe(ids) {
30189
30186
  return [...new Set(ids)];
30190
30187
  }
30191
30188
  async function withTimeout3(promise, ms) {
30192
- return new Promise((resolve22, reject) => {
30189
+ return new Promise((resolve21, reject) => {
30193
30190
  const timer = setTimeout(() => {
30194
30191
  reject(new Error(`Node timed out after ${String(ms)}ms`));
30195
30192
  }, ms);
30196
30193
  promise.then((result) => {
30197
30194
  clearTimeout(timer);
30198
- resolve22(result);
30195
+ resolve21(result);
30199
30196
  }).catch((error) => {
30200
30197
  clearTimeout(timer);
30201
30198
  reject(error instanceof Error ? error : new Error(String(error)));
@@ -31119,14 +31116,14 @@ function emitPipelineStageEvent(prefix, stage, status, details) {
31119
31116
  }
31120
31117
 
31121
31118
  // src/pipeline/trace-writer.ts
31122
- import { mkdir, writeFile, rename, unlink } from "fs/promises";
31123
- import { join as join5 } from "path";
31119
+ import { mkdir, writeFile, rename, unlink } from "node:fs/promises";
31120
+ import { join as join4 } from "node:path";
31124
31121
  var logger22 = createLogger({ component: "TraceWriter" });
31125
31122
  var MAX_BUFFER_SIZE = 5e4;
31126
31123
  var TraceWriter = class {
31127
31124
  constructor(bus, options) {
31128
31125
  this.options = options;
31129
- this.runDir = join5(options.runsDir, options.runId);
31126
+ this.runDir = join4(options.runsDir, options.runId);
31130
31127
  this.maxBuffer = options.maxBufferSize ?? MAX_BUFFER_SIZE;
31131
31128
  this.unsubscribe = bus.subscribe({}, (event) => {
31132
31129
  if (!this.stopped) {
@@ -31148,7 +31145,7 @@ var TraceWriter = class {
31148
31145
  if (this.buffer.length === 0) return;
31149
31146
  await mkdir(this.runDir, { recursive: true });
31150
31147
  const lines = this.buffer.map((e) => JSON.stringify(e)).join("\n");
31151
- const tracePath = join5(this.runDir, "trace.jsonl");
31148
+ const tracePath = join4(this.runDir, "trace.jsonl");
31152
31149
  const traceTmp = `${tracePath}.tmp.${String(process.pid)}`;
31153
31150
  try {
31154
31151
  await writeFile(traceTmp, lines + "\n", "utf-8");
@@ -31161,7 +31158,7 @@ var TraceWriter = class {
31161
31158
  throw err2;
31162
31159
  }
31163
31160
  const indexContent = this.buildIndex();
31164
- const indexPath = join5(this.runDir, "index.md");
31161
+ const indexPath = join4(this.runDir, "index.md");
31165
31162
  const indexTmp = `${indexPath}.tmp.${String(process.pid)}`;
31166
31163
  try {
31167
31164
  await writeFile(indexTmp, indexContent, "utf-8");
@@ -31585,7 +31582,7 @@ function createDefaultPolicyEngine() {
31585
31582
  }
31586
31583
 
31587
31584
  // src/pipeline/task-contract-builders.ts
31588
- import { randomUUID as randomUUID9 } from "crypto";
31585
+ import { randomUUID as randomUUID9 } from "node:crypto";
31589
31586
  function buildBaseTaskContract(input) {
31590
31587
  const now = Date.now();
31591
31588
  return {
@@ -31795,7 +31792,7 @@ async function executeOrchestratePipeline(task) {
31795
31792
  }
31796
31793
 
31797
31794
  // src/orchestration/orchestrator-factory.ts
31798
- import { randomUUID as randomUUID10 } from "crypto";
31795
+ import { randomUUID as randomUUID10 } from "node:crypto";
31799
31796
 
31800
31797
  // src/orchestration/orchestrator-adapters.ts
31801
31798
  function generateId2(prefix) {
@@ -32649,11 +32646,11 @@ function createMockOrchestrator() {
32649
32646
  async function raceAgainstDeadline(promise, deadlineMs, onTimeout) {
32650
32647
  const startedAt = Date.now();
32651
32648
  let timer;
32652
- const timeoutP = new Promise((resolve22, reject) => {
32649
+ const timeoutP = new Promise((resolve21, reject) => {
32653
32650
  timer = setTimeout(
32654
32651
  () => {
32655
32652
  try {
32656
- resolve22(onTimeout(Date.now() - startedAt));
32653
+ resolve21(onTimeout(Date.now() - startedAt));
32657
32654
  } catch (err2) {
32658
32655
  reject(err2 instanceof Error ? err2 : new Error(String(err2)));
32659
32656
  }
@@ -32784,7 +32781,7 @@ function createSicaOrchestratorAdapter(sicaAgent, _logger) {
32784
32781
  }
32785
32782
 
32786
32783
  // src/mcp/tools/research-auto-catalog.ts
32787
- import * as fs3 from "fs";
32784
+ import * as fs3 from "node:fs";
32788
32785
  import { z as z61 } from "zod";
32789
32786
  var CATALOG_SUBDIR = "research";
32790
32787
  var CATALOG_FILE = "pending-catalog.json";
@@ -33856,11 +33853,11 @@ function createWorkerTask(entry, taskIndex, waveNumber, opts) {
33856
33853
  const staggerSlot = taskIndex % opts.maxConcurrency;
33857
33854
  const staggerMs = staggerSlot * opts.staggerDelayMs;
33858
33855
  if (staggerMs > 0) {
33859
- await new Promise((resolve22) => setTimeout(resolve22, staggerMs));
33856
+ await new Promise((resolve21) => setTimeout(resolve21, staggerMs));
33860
33857
  }
33861
33858
  const spacingDelay = opts.failureTracker.getSpacingDelay(entry.role);
33862
33859
  if (spacingDelay > 0) {
33863
- await new Promise((resolve22) => setTimeout(resolve22, spacingDelay));
33860
+ await new Promise((resolve21) => setTimeout(resolve21, spacingDelay));
33864
33861
  }
33865
33862
  const timeoutMs = opts.options.workerTimeoutMs ?? getExpertTaskTimeout(entry.subTask);
33866
33863
  const result = await executeSafe({
@@ -33912,7 +33909,7 @@ async function maybeDelayForRateLimit(results, waveIdx, totalWaves) {
33912
33909
  );
33913
33910
  if (hasRateLimit) {
33914
33911
  logger27.warn("Rate-limit detected \u2014 delaying next wave", { delayMs: RATE_LIMIT_WAVE_DELAY_MS });
33915
- await new Promise((resolve22) => setTimeout(resolve22, RATE_LIMIT_WAVE_DELAY_MS));
33912
+ await new Promise((resolve21) => setTimeout(resolve21, RATE_LIMIT_WAVE_DELAY_MS));
33916
33913
  }
33917
33914
  }
33918
33915
  function emitWaveStarted(ctx, workerCount, roles) {
@@ -34010,7 +34007,7 @@ async function maybeRetryAfterTriage(opts) {
34010
34007
  }
34011
34008
  const useAltCli = triage.action === "retry_different_cli" && altExecuteWorker !== void 0;
34012
34009
  if (triage.action === "retry_different_cli") {
34013
- await new Promise((resolve22) => setTimeout(resolve22, RATE_LIMIT_SPACING_MS));
34010
+ await new Promise((resolve21) => setTimeout(resolve21, RATE_LIMIT_SPACING_MS));
34014
34011
  }
34015
34012
  const retryTimeout = triage.action === "extend_timeout" ? Math.min(timeoutMs * TIMEOUT_EXTENSION_FACTOR, MAX_WORKER_TIMEOUT_MS) : timeoutMs;
34016
34013
  const retryExecutor = useAltCli ? altExecuteWorker : executeWorker;
@@ -35617,7 +35614,7 @@ function resolveAccessPolicyMode(env = process.env) {
35617
35614
  }
35618
35615
 
35619
35616
  // src/security/access-constraint-deriver/deriver.ts
35620
- import { createHash as createHash2 } from "crypto";
35617
+ import { createHash as createHash2 } from "node:crypto";
35621
35618
 
35622
35619
  // src/security/access-constraint-deriver/cache.ts
35623
35620
  var DEFAULT_MAX_ENTRIES = 256;
@@ -36166,8 +36163,8 @@ function createDurableAuditTrail(auditLogger) {
36166
36163
  }
36167
36164
 
36168
36165
  // src/context/structured-task-state.ts
36169
- import * as fs4 from "fs";
36170
- import * as path3 from "path";
36166
+ import * as fs4 from "node:fs";
36167
+ import * as path3 from "node:path";
36171
36168
 
36172
36169
  // src/context/structured-task-state-types.ts
36173
36170
  import { z as z65 } from "zod";
@@ -39876,11 +39873,11 @@ function registerExecuteExpertTool(server, deps) {
39876
39873
  import { z as z70 } from "zod";
39877
39874
 
39878
39875
  // src/research/negative-results.ts
39879
- import { readFileSync as readFileSync6 } from "fs";
39880
- import { resolve as resolve8 } from "path";
39876
+ import { readFileSync as readFileSync6 } from "node:fs";
39877
+ import { resolve as resolve7 } from "node:path";
39881
39878
  import yaml3 from "yaml";
39882
39879
  var logger34 = createLogger({ component: "negative-results" });
39883
- var REGISTRY_PATH = resolve8("docs/research/registry/negative-results.yaml");
39880
+ var REGISTRY_PATH = resolve7("docs/research/registry/negative-results.yaml");
39884
39881
  var cachedResults;
39885
39882
  function loadNegativeResults() {
39886
39883
  if (cachedResults !== void 0) return cachedResults;
@@ -41431,7 +41428,7 @@ function recordTriageOutcome(success, durationMs, errorMsg) {
41431
41428
 
41432
41429
  // src/mcp/tools/run-graph-workflow.ts
41433
41430
  import { z as z78 } from "zod";
41434
- import { randomUUID as randomUUID11 } from "crypto";
41431
+ import { randomUUID as randomUUID11 } from "node:crypto";
41435
41432
  var RunGraphWorkflowInputSchema = z78.object({
41436
41433
  workflow: z78.string().min(1).max(100).describe("Name of the predefined graph workflow to execute"),
41437
41434
  inputs: z78.record(z78.string(), z78.unknown()).optional().default({}).describe("Input values for the workflow"),
@@ -42169,7 +42166,7 @@ function suggestImprovement(criterion) {
42169
42166
 
42170
42167
  // src/mcp/tools/execute-spec-tool.ts
42171
42168
  import { z as z79 } from "zod";
42172
- import { randomUUID as randomUUID12 } from "crypto";
42169
+ import { randomUUID as randomUUID12 } from "node:crypto";
42173
42170
  var ExecuteSpecInputSchema = z79.object({
42174
42171
  spec: z79.string().min(1).max(5e4).describe("Markdown specification to execute"),
42175
42172
  dryRun: z79.boolean().optional().default(false).describe("Parse and decompose only"),
@@ -43150,7 +43147,7 @@ function registerRepoSecurityPlanTool(server, deps) {
43150
43147
  }
43151
43148
 
43152
43149
  // src/mcp/tools/search-codebase-tool.ts
43153
- import { resolve as resolve9, sep as sep3 } from "path";
43150
+ import { resolve as resolve8, sep as sep3 } from "node:path";
43154
43151
  import { z as z90 } from "zod";
43155
43152
  var SearchCodebaseInputSchema = z90.object({
43156
43153
  query: z90.string().min(1).max(200).describe("Search query (symbol name, keyword, or pattern)"),
@@ -43205,8 +43202,8 @@ async function getIndex(dir, maxDepth) {
43205
43202
  return promise;
43206
43203
  }
43207
43204
  function resolveSearchDir(directory) {
43208
- const dir = resolve9(directory ?? process.cwd());
43209
- const cwdRoot = resolve9(".");
43205
+ const dir = resolve8(directory ?? process.cwd());
43206
+ const cwdRoot = resolve8(".");
43210
43207
  if (dir !== cwdRoot && !dir.startsWith(cwdRoot + sep3)) {
43211
43208
  return { error: `Path traversal denied: directory must be within ${cwdRoot}` };
43212
43209
  }
@@ -43304,7 +43301,7 @@ function registerSearchCodebaseTool(server, deps) {
43304
43301
  }
43305
43302
 
43306
43303
  // src/mcp/tools/extract-symbols-tool.ts
43307
- import { extname as extname3, resolve as resolve10, sep as sep4 } from "path";
43304
+ import { extname as extname3, resolve as resolve9, sep as sep4 } from "node:path";
43308
43305
  import { z as z91 } from "zod";
43309
43306
 
43310
43307
  // src/core/task-analysis/tool-refusal-gap.ts
@@ -43426,8 +43423,8 @@ async function extractSymbolsHandler(args, ctx) {
43426
43423
  });
43427
43424
  }
43428
43425
  const { filePath, mode, maxChars, maxSymbols } = parsed.data;
43429
- const resolvedPath = resolve10(filePath);
43430
- const cwdRoot = resolve10(".");
43426
+ const resolvedPath = resolve9(filePath);
43427
+ const cwdRoot = resolve9(".");
43431
43428
  if (resolvedPath !== cwdRoot && !resolvedPath.startsWith(cwdRoot + sep4)) {
43432
43429
  return toolStructuredError({
43433
43430
  errorCategory: "permission",
@@ -43510,8 +43507,8 @@ function registerExtractSymbolsTool(server, deps) {
43510
43507
  }
43511
43508
 
43512
43509
  // src/mcp/tools/search-usages-tool.ts
43513
- import { readFile as readFile3 } from "fs/promises";
43514
- import { relative, resolve as resolve11, sep as sep5 } from "path";
43510
+ import { readFile as readFile3 } from "node:fs/promises";
43511
+ import { relative, resolve as resolve10, sep as sep5 } from "node:path";
43515
43512
  import { z as z92 } from "zod";
43516
43513
  var DEFAULT_USAGES_LIMIT = 50;
43517
43514
  var MAX_USAGES_LIMIT = 500;
@@ -43531,8 +43528,8 @@ var SearchUsagesInputSchema = z92.object({
43531
43528
  maxDepth: z92.number().int().min(1).max(MAX_USAGES_MAX_DEPTH).optional().describe(`Directory walk depth for dir scope (default ${String(DEFAULT_USAGES_MAX_DEPTH)}).`)
43532
43529
  });
43533
43530
  function resolveWithinCwd(target) {
43534
- const resolved = resolve11(target);
43535
- const cwdRoot = resolve11(".");
43531
+ const resolved = resolve10(target);
43532
+ const cwdRoot = resolve10(".");
43536
43533
  if (resolved !== cwdRoot && !resolved.startsWith(cwdRoot + sep5)) {
43537
43534
  return { error: `Path traversal denied: scope must be within ${cwdRoot}` };
43538
43535
  }
@@ -43542,7 +43539,7 @@ async function resolveFileScope(input) {
43542
43539
  if (input.path !== void 0) {
43543
43540
  const guard2 = resolveWithinCwd(input.path);
43544
43541
  if ("error" in guard2) return guard2;
43545
- return { files: [guard2.resolved], root: resolve11(".") };
43542
+ return { files: [guard2.resolved], root: resolve10(".") };
43546
43543
  }
43547
43544
  const guard = resolveWithinCwd(input.dir ?? process.cwd());
43548
43545
  if ("error" in guard) return guard;
@@ -43637,8 +43634,8 @@ function registerSearchUsagesTool(server, deps) {
43637
43634
  }
43638
43635
 
43639
43636
  // src/mcp/tools/query-trace-tool.ts
43640
- import { readFile as readFile4, stat as stat3 } from "fs/promises";
43641
- import { join as join7, resolve as resolve12, sep as sep6 } from "path";
43637
+ import { readFile as readFile4, stat as stat3 } from "node:fs/promises";
43638
+ import { join as join6, resolve as resolve11, sep as sep6 } from "node:path";
43642
43639
  import { z as z93 } from "zod";
43643
43640
  var QueryTraceInputSchema = z93.object({
43644
43641
  runId: z93.string().min(1).max(128).regex(/^[a-zA-Z0-9_-]+$/, "runId must be alphanumeric, hyphens, or underscores").describe("Run ID to query traces for"),
@@ -43686,9 +43683,9 @@ var EMPTY_RESPONSE = {
43686
43683
  };
43687
43684
  async function queryTraceFromDisk(input, runsDir) {
43688
43685
  const dir = runsDir ?? getDefaultRunsDir();
43689
- const tracePath = join7(dir, input.runId, "trace.jsonl");
43690
- const resolvedDir = resolve12(dir);
43691
- const resolvedTrace = resolve12(tracePath);
43686
+ const tracePath = join6(dir, input.runId, "trace.jsonl");
43687
+ const resolvedDir = resolve11(dir);
43688
+ const resolvedTrace = resolve11(tracePath);
43692
43689
  if (!resolvedTrace.startsWith(resolvedDir + sep6) && resolvedTrace !== resolvedDir) {
43693
43690
  return { runId: input.runId, ...EMPTY_RESPONSE };
43694
43691
  }
@@ -44308,8 +44305,8 @@ var AuditQueryCriteriaSchema = z97.object({
44308
44305
  });
44309
44306
 
44310
44307
  // src/audit/audit-storage-queries.ts
44311
- import * as fs5 from "fs";
44312
- import * as readline from "readline";
44308
+ import * as fs5 from "node:fs";
44309
+ import * as readline from "node:readline";
44313
44310
  function matchesTimeRange(event, criteria) {
44314
44311
  if (criteria.startTime !== void 0 && new Date(event.timestamp) < criteria.startTime)
44315
44312
  return false;
@@ -44389,8 +44386,8 @@ var InMemoryAuditStorage = class {
44389
44386
  };
44390
44387
 
44391
44388
  // src/audit/audit-storage.ts
44392
- import * as fs6 from "fs";
44393
- import * as path4 from "path";
44389
+ import * as fs6 from "node:fs";
44390
+ import * as path4 from "node:path";
44394
44391
  function validateLogDir(logDir, allowedRoot) {
44395
44392
  const resolvedRoot = path4.resolve(allowedRoot);
44396
44393
  const resolvedLogDir = path4.resolve(allowedRoot, logDir);
@@ -44565,27 +44562,27 @@ var FileAuditStorage = class _FileAuditStorage {
44565
44562
  const data = this.writeBuffer.join("");
44566
44563
  this.writeBuffer = [];
44567
44564
  const stream = this.writeStream;
44568
- return new Promise((resolve22, reject) => {
44565
+ return new Promise((resolve21, reject) => {
44569
44566
  stream.write(data, (err2) => {
44570
44567
  if (err2 !== void 0 && err2 !== null) {
44571
44568
  reject(new AuditError("Failed to flush audit log", { cause: err2 }));
44572
44569
  } else {
44573
- resolve22();
44570
+ resolve21();
44574
44571
  }
44575
44572
  });
44576
44573
  });
44577
44574
  }
44578
44575
  async close() {
44579
44576
  await this.flush();
44580
- return new Promise((resolve22) => {
44577
+ return new Promise((resolve21) => {
44581
44578
  if (this.writeStream === null) {
44582
- resolve22();
44579
+ resolve21();
44583
44580
  return;
44584
44581
  }
44585
44582
  this.writeStream.end(() => {
44586
44583
  this.writeStream = null;
44587
44584
  this.logger.info("Audit storage closed");
44588
- resolve22();
44585
+ resolve21();
44589
44586
  });
44590
44587
  });
44591
44588
  }
@@ -44619,7 +44616,7 @@ var FileAuditStorage = class _FileAuditStorage {
44619
44616
  };
44620
44617
 
44621
44618
  // src/audit/audit-logger.ts
44622
- import * as crypto from "crypto";
44619
+ import * as crypto from "node:crypto";
44623
44620
 
44624
44621
  // src/audit/tier-transition-hash.ts
44625
44622
  function hasTierTransitionPayload(event) {
@@ -45572,7 +45569,7 @@ async function tryIssueTriage(task) {
45572
45569
  try {
45573
45570
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
45574
45571
  if (issueMatch === null) return null;
45575
- const { createIssueTriage } = await import("./issue-triage-2LNYGQRJ.js");
45572
+ const { createIssueTriage } = await import("./issue-triage-IVYGGNB4.js");
45576
45573
  const triage = createIssueTriage();
45577
45574
  const owner = issueMatch[1] ?? "";
45578
45575
  const num = issueMatch[2] ?? "";
@@ -45600,7 +45597,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
45600
45597
  ]);
45601
45598
  async function classifyWithLLM(task) {
45602
45599
  try {
45603
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-PWRVRFDG.js");
45600
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-7LGHU7IL.js");
45604
45601
  const prompt = [
45605
45602
  "Classify this task into exactly one pipeline template.",
45606
45603
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -45706,8 +45703,8 @@ function ensureRunnableTemplate(template, stages) {
45706
45703
  }
45707
45704
 
45708
45705
  // src/pipeline/pipeline-checkpoint.ts
45709
- import * as fs7 from "fs";
45710
- import * as path5 from "path";
45706
+ import * as fs7 from "node:fs";
45707
+ import * as path5 from "node:path";
45711
45708
  import { z as z98 } from "zod";
45712
45709
  var logger40 = createLogger({ component: "pipeline-checkpoint" });
45713
45710
  var SESSION_ID_REGEX = /^[a-zA-Z0-9_-]{1,128}$/;
@@ -46691,13 +46688,13 @@ function resolveConfidence(rule) {
46691
46688
  }
46692
46689
 
46693
46690
  // src/mcp/tools/security-scan.ts
46694
- import * as path6 from "path";
46691
+ import * as path6 from "node:path";
46695
46692
  var logger43 = createLogger({ component: "security-scan" });
46696
46693
  var SCAN_TIMEOUT_MS = 3e5;
46697
46694
  async function isSemgrepAvailable() {
46698
46695
  try {
46699
- const { execFile: execFile2 } = await import("child_process");
46700
- const { promisify: promisify2 } = await import("util");
46696
+ const { execFile: execFile2 } = await import("node:child_process");
46697
+ const { promisify: promisify2 } = await import("node:util");
46701
46698
  const exec2 = promisify2(execFile2);
46702
46699
  await exec2("semgrep", ["--version"], { timeout: 1e4 });
46703
46700
  return true;
@@ -46706,8 +46703,8 @@ async function isSemgrepAvailable() {
46706
46703
  }
46707
46704
  }
46708
46705
  async function runSemgrep(targetDir, rulesets) {
46709
- const { execFile: execFile2 } = await import("child_process");
46710
- const { promisify: promisify2 } = await import("util");
46706
+ const { execFile: execFile2 } = await import("node:child_process");
46707
+ const { promisify: promisify2 } = await import("node:util");
46711
46708
  const exec2 = promisify2(execFile2);
46712
46709
  const args = ["--sarif", "--quiet", ...rulesets.flatMap((r) => ["--config", r]), targetDir];
46713
46710
  const { stdout } = await exec2("semgrep", args, {
@@ -46920,8 +46917,8 @@ var OSV_DEPENDENCY_CAP = 20;
46920
46917
  async function runOsvCheck(targetDir, enabled) {
46921
46918
  if (!enabled) return OSV_EMPTY;
46922
46919
  try {
46923
- const fs13 = await import("fs");
46924
- const path12 = await import("path");
46920
+ const fs13 = await import("node:fs");
46921
+ const path12 = await import("node:path");
46925
46922
  const pkgPath = path12.join(targetDir, "package.json");
46926
46923
  if (!fs13.existsSync(pkgPath)) return OSV_EMPTY;
46927
46924
  const pkg = JSON.parse(fs13.readFileSync(pkgPath, "utf-8"));
@@ -46980,8 +46977,8 @@ function buildScanSummary(total, blocking, osvCount, osv, sarifParseErrors = 0)
46980
46977
  }
46981
46978
 
46982
46979
  // src/security/quality-gate-commands.ts
46983
- import { existsSync as existsSync10, readFileSync as readFileSync8 } from "fs";
46984
- import { join as join10 } from "path";
46980
+ import { existsSync as existsSync9, readFileSync as readFileSync8 } from "node:fs";
46981
+ import { join as join9 } from "node:path";
46985
46982
  var LOCKFILES = [
46986
46983
  { file: "pnpm-lock.yaml", manager: "pnpm" },
46987
46984
  { file: "yarn.lock", manager: "yarn" },
@@ -46996,13 +46993,13 @@ var SCRIPT_CANDIDATES = {
46996
46993
  };
46997
46994
  function detectPackageManager(projectDir) {
46998
46995
  for (const { file, manager } of LOCKFILES) {
46999
- if (existsSync10(join10(projectDir, file))) return manager;
46996
+ if (existsSync9(join9(projectDir, file))) return manager;
47000
46997
  }
47001
46998
  return "npm";
47002
46999
  }
47003
47000
  function readScripts(projectDir) {
47004
- const manifest = join10(projectDir, "package.json");
47005
- if (!existsSync10(manifest)) return void 0;
47001
+ const manifest = join9(projectDir, "package.json");
47002
+ if (!existsSync9(manifest)) return void 0;
47006
47003
  try {
47007
47004
  const parsed = JSON.parse(readFileSync8(manifest, "utf-8"));
47008
47005
  if (typeof parsed !== "object" || parsed === null) return void 0;
@@ -47045,8 +47042,8 @@ function resolveCheckCommand(projectDir, check) {
47045
47042
  async function runCommandCheck(name, command, args, cwd) {
47046
47043
  const start = Date.now();
47047
47044
  try {
47048
- const { execFile: execFile2 } = await import("child_process");
47049
- const { promisify: promisify2 } = await import("util");
47045
+ const { execFile: execFile2 } = await import("node:child_process");
47046
+ const { promisify: promisify2 } = await import("node:util");
47050
47047
  const exec2 = promisify2(execFile2);
47051
47048
  await exec2(command, [...args], { timeout: 12e4, cwd });
47052
47049
  return {
@@ -47291,8 +47288,8 @@ var memoryInitPromise = null;
47291
47288
  async function initPipelineMemory() {
47292
47289
  if (cachedMemory !== null) return cachedMemory;
47293
47290
  try {
47294
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-YQQVPLKM.js");
47295
- const { getLearningDir } = await import("./learning-persistence-7O5QYDM7.js");
47291
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-GYIEP7MM.js");
47292
+ const { getLearningDir } = await import("./learning-persistence-7N5SZHNX.js");
47296
47293
  const mem = createSessionMemory2(getLearningDir());
47297
47294
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
47298
47295
  cachedMemory = {
@@ -47353,7 +47350,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
47353
47350
  callRecord(routingMemoryCache);
47354
47351
  return;
47355
47352
  }
47356
- routingMemoryInitPromise ??= import("./routing-memory-2SMMUPTB.js").then(({ createRoutingMemory }) => {
47353
+ routingMemoryInitPromise ??= import("./routing-memory-BBHAEJUL.js").then(({ createRoutingMemory }) => {
47357
47354
  routingMemoryCache ??= createRoutingMemory();
47358
47355
  return routingMemoryCache;
47359
47356
  }).catch((error) => {
@@ -47387,7 +47384,7 @@ ${text}` : "";
47387
47384
  }
47388
47385
  async function getWeatherContext() {
47389
47386
  try {
47390
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-6AVPMHHM.js");
47387
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-ZLQGZUDL.js");
47391
47388
  const report = generateWeatherReport2({ includeAdaptive: true });
47392
47389
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
47393
47390
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -47405,8 +47402,8 @@ ${lines}
47405
47402
  }
47406
47403
  async function getMemoryContext(task) {
47407
47404
  try {
47408
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-YQQVPLKM.js");
47409
- const { getLearningDir } = await import("./learning-persistence-7O5QYDM7.js");
47405
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-GYIEP7MM.js");
47406
+ const { getLearningDir } = await import("./learning-persistence-7N5SZHNX.js");
47410
47407
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
47411
47408
  const learnings = memory.searchLearnings(task.slice(0, 200));
47412
47409
  if (learnings.length === 0) return "";
@@ -47524,7 +47521,7 @@ ${contextBlock}`;
47524
47521
  const strategy = config.votingStrategy ?? "higher_order";
47525
47522
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47526
47523
  try {
47527
- const { executeVoting } = await import("./consensus-vote-355WNDBN.js");
47524
+ const { executeVoting } = await import("./consensus-vote-57SKG3EN.js");
47528
47525
  const votingResult = await executeVoting(
47529
47526
  {
47530
47527
  proposal: buildVoteProposal(plan, research),
@@ -47938,7 +47935,7 @@ function createScaffoldStageWrapper() {
47938
47935
  }
47939
47936
  async function searchCodebaseForTask(task) {
47940
47937
  try {
47941
- const { CodebaseIndex: CodebaseIndex2 } = await import("./codebase-search-RHBGEWXK.js");
47938
+ const { CodebaseIndex: CodebaseIndex2 } = await import("./codebase-search-3D4TW3KR.js");
47942
47939
  const index = new CodebaseIndex2(process.cwd());
47943
47940
  const terms = task.toLowerCase().split(/\s+/).filter((w) => w.length > 4).slice(0, 3);
47944
47941
  if (terms.length === 0) return null;
@@ -47953,7 +47950,7 @@ async function searchCodebaseForTask(task) {
47953
47950
  }
47954
47951
  async function queryResearchRegistry(task) {
47955
47952
  try {
47956
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-QY3DDHTD.js");
47953
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-NQMSFDMD.js");
47957
47954
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
47958
47955
  if (topic === void 0) return null;
47959
47956
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -48005,7 +48002,7 @@ function createAnalyzeStageWrapper() {
48005
48002
  true
48006
48003
  );
48007
48004
  }
48008
- const { analyzeGitHubRepo: analyzeGitHubRepo2 } = await import("./repo-analyze-UJOWFGNM.js");
48005
+ const { analyzeGitHubRepo: analyzeGitHubRepo2 } = await import("./repo-analyze-DI65XOTQ.js");
48009
48006
  const analysis = await analyzeGitHubRepo2({ repo: slug, depth: "deep" });
48010
48007
  const summary = `Language: ${String(analysis.language)}, Framework: ${String(analysis.framework)}, CI: ${String(analysis.ciProvider)}, Security: ${analysis.securityTooling.join(", ") || "none"}`;
48011
48008
  return output(PIPELINE_STATE_KEYS.RESEARCH, summary, getTimeProvider().now() - start, true);
@@ -48024,7 +48021,7 @@ function createScanStageWrapper() {
48024
48021
  try {
48025
48022
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
48026
48023
  if (slug !== void 0) {
48027
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-SZU4O2TN.js");
48024
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-LS5GCASE.js");
48028
48025
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
48029
48026
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
48030
48027
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -48065,7 +48062,7 @@ function createAuditStageRegistry() {
48065
48062
 
48066
48063
  // src/mcp/tools/pr-review-tool.ts
48067
48064
  import { z as z102 } from "zod";
48068
- import { randomUUID as randomUUID13 } from "crypto";
48065
+ import { randomUUID as randomUUID13 } from "node:crypto";
48069
48066
 
48070
48067
  // src/mcp/tools/pr-review-findings.ts
48071
48068
  import { parse as parseYaml3 } from "yaml";
@@ -48148,7 +48145,7 @@ var FINDINGS_FORMAT_INSTRUCTIONS = `If you have one or more findings (claims tha
48148
48145
  A finding only triggers request_changes if ALL FOUR gate checks are 'passed' AND named_assertion is substantive (>10 chars, naming a concrete failure). Findings missing any of those surface as informational only \u2014 they do not block the merge. This is the #2225 verification gate; the 2026-04-25 audit found a 100% false-positive rate when this gate was not enforced.`;
48149
48146
 
48150
48147
  // src/audit/reviewed-diff-hash.ts
48151
- import * as crypto2 from "crypto";
48148
+ import * as crypto2 from "node:crypto";
48152
48149
  var MAX_REVIEWED_DIFF_BYTES = 5e4;
48153
48150
  var CANONICAL_GIT_DIFF_ARGS = Object.freeze([
48154
48151
  "-c",
@@ -48175,11 +48172,11 @@ function reviewedDiffWasTruncated(diff) {
48175
48172
  }
48176
48173
 
48177
48174
  // src/audit/pr-review-record-store.ts
48178
- import { appendFileSync as appendFileSync4, existsSync as existsSync11, mkdirSync as mkdirSync6, readFileSync as readFileSync9 } from "fs";
48179
- import { dirname as dirname4, isAbsolute, join as join11, resolve as resolve15 } from "path";
48175
+ import { appendFileSync as appendFileSync4, existsSync as existsSync10, mkdirSync as mkdirSync6, readFileSync as readFileSync9 } from "node:fs";
48176
+ import { dirname as dirname3, isAbsolute, join as join10, resolve as resolve14 } from "node:path";
48180
48177
 
48181
48178
  // src/audit/pr-review-record.ts
48182
- import * as crypto3 from "crypto";
48179
+ import * as crypto3 from "node:crypto";
48183
48180
  import { z as z101 } from "zod";
48184
48181
  var PrReviewVerdictSchema = z101.enum(["approve", "request_changes", "abstain"]);
48185
48182
  var PrReviewVoteCountsSchema = z101.object({
@@ -48351,7 +48348,7 @@ function assertNotSourceCheckoutWrite(filePath) {
48351
48348
  if (!isUnderTestRunner()) return;
48352
48349
  const here = findRepoRoot(process.cwd());
48353
48350
  if (here === null) return;
48354
- if (resolve15(filePath) !== resolve15(join11(here, PR_REVIEW_RECORDS_REL_PATH))) return;
48351
+ if (resolve14(filePath) !== resolve14(join10(here, PR_REVIEW_RECORDS_REL_PATH))) return;
48355
48352
  throw new Error(
48356
48353
  `Refusing to write ${filePath} from a test run (#4415): this is the source checkout's tracked, hash-chained audit file, and a fabricated record that chains cleanly is indistinguishable from a real verdict. Pass repoPath to a throwaway repo, or set NEXUS_PR_REVIEW_RECORDS_PATH.`
48357
48354
  );
@@ -48359,20 +48356,20 @@ function assertNotSourceCheckoutWrite(filePath) {
48359
48356
  function resolvePrReviewRecordsPath(repoPathOverride) {
48360
48357
  const envPath = process.env[PR_REVIEW_RECORDS_PATH_ENV];
48361
48358
  if (envPath !== void 0 && envPath.trim() !== "") {
48362
- return isAbsolute(envPath) ? envPath : resolve15(envPath);
48359
+ return isAbsolute(envPath) ? envPath : resolve14(envPath);
48363
48360
  }
48364
48361
  if (repoPathOverride !== void 0 && repoPathOverride.trim() !== "") {
48365
48362
  const overrideRoot = findRepoRoot(repoPathOverride);
48366
- if (overrideRoot !== null) return join11(overrideRoot, PR_REVIEW_RECORDS_REL_PATH);
48363
+ if (overrideRoot !== null) return join10(overrideRoot, PR_REVIEW_RECORDS_REL_PATH);
48367
48364
  }
48368
48365
  const root = findRepoRoot(process.cwd());
48369
48366
  if (root === null) return void 0;
48370
- return join11(root, PR_REVIEW_RECORDS_REL_PATH);
48367
+ return join10(root, PR_REVIEW_RECORDS_REL_PATH);
48371
48368
  }
48372
48369
  function readPrReviewRecords(filePath) {
48373
48370
  const records = [];
48374
48371
  const invalidLines = [];
48375
- if (!existsSync11(filePath)) return { records, invalidLines };
48372
+ if (!existsSync10(filePath)) return { records, invalidLines };
48376
48373
  const lines = readFileSync9(filePath, "utf-8").split("\n").filter((l) => l.trim() !== "");
48377
48374
  for (const [i, line] of lines.entries()) {
48378
48375
  try {
@@ -48386,7 +48383,7 @@ function readPrReviewRecords(filePath) {
48386
48383
  return { records, invalidLines };
48387
48384
  }
48388
48385
  function readPrReviewLedgerTip(filePath, logger58) {
48389
- if (!existsSync11(filePath)) return { maxSequence: -1, lastHash: void 0 };
48386
+ if (!existsSync10(filePath)) return { maxSequence: -1, lastHash: void 0 };
48390
48387
  try {
48391
48388
  const { records } = readPrReviewRecords(filePath);
48392
48389
  if (records.length === 0) return { maxSequence: -1, lastHash: void 0 };
@@ -48412,7 +48409,7 @@ function persistPrReviewRecord(opts) {
48412
48409
  }
48413
48410
  assertNotSourceCheckoutWrite(filePath);
48414
48411
  try {
48415
- mkdirSync6(dirname4(filePath), { recursive: true });
48412
+ mkdirSync6(dirname3(filePath), { recursive: true });
48416
48413
  const { maxSequence, lastHash } = readPrReviewLedgerTip(filePath, logger58);
48417
48414
  const record = buildPrReviewRecord({
48418
48415
  ...opts,
@@ -48829,32 +48826,45 @@ function absoluteQuorumApprove(reviews, valid) {
48829
48826
  return { decision: "approve", verified: true };
48830
48827
  }
48831
48828
  function buildPrReviewProposal(input) {
48829
+ const sanitizeResult = sanitizeToolInput({
48830
+ prTitle: input.prTitle,
48831
+ prDescription: input.prDescription,
48832
+ prDiff: input.prDiff,
48833
+ repoContext: input.repoContext
48834
+ });
48835
+ const safe = sanitizeResult.sanitized;
48832
48836
  const parts = [];
48833
48837
  parts.push(`# Pull Request Review
48834
48838
  `);
48835
- parts.push(`**Title:** ${input.prTitle}
48839
+ if (sanitizeResult.commentsRemoved > 0) {
48840
+ parts.push(
48841
+ `> **Note:** ${String(sanitizeResult.commentsRemoved)} HTML comment(s) were removed from the untrusted fields below before you saw them (#5258). Comments are invisible in rendered markdown, so they are stripped rather than trusted. This is routine \u2014 GitHub's default PR template contains one \u2014 and is not by itself evidence of an attack.
48842
+ `
48843
+ );
48844
+ }
48845
+ parts.push(`**Title:** ${safe.prTitle}
48836
48846
  `);
48837
48847
  if (input.baseRef !== void 0 && input.headRef !== void 0) {
48838
48848
  parts.push(`**Branches:** ${input.headRef} \u2192 ${input.baseRef}
48839
48849
  `);
48840
48850
  }
48841
- if (input.repoContext !== void 0 && input.repoContext !== "") {
48851
+ if (safe.repoContext !== void 0 && safe.repoContext !== "") {
48842
48852
  parts.push(`
48843
48853
  **Repo context:**
48844
- ${input.repoContext}
48854
+ ${safe.repoContext}
48845
48855
  `);
48846
48856
  }
48847
- if (input.prDescription !== void 0 && input.prDescription !== "") {
48857
+ if (safe.prDescription !== void 0 && safe.prDescription !== "") {
48848
48858
  parts.push(`
48849
48859
  **Description:**
48850
- ${input.prDescription}
48860
+ ${safe.prDescription}
48851
48861
  `);
48852
48862
  }
48853
48863
  parts.push(`
48854
48864
  ## Diff
48855
48865
 
48856
48866
  \`\`\`diff
48857
- ${input.prDiff}
48867
+ ${safe.prDiff}
48858
48868
  \`\`\`
48859
48869
  `);
48860
48870
  parts.push(`
@@ -49343,8 +49353,8 @@ function registerVendorPublishingAuditTool(server, deps) {
49343
49353
 
49344
49354
  // src/mcp/tools/compare-data-feeds.ts
49345
49355
  import { z as z105 } from "zod";
49346
- import * as path7 from "path";
49347
- import * as fs8 from "fs";
49356
+ import * as path7 from "node:path";
49357
+ import * as fs8 from "node:fs";
49348
49358
  import * as yaml4 from "yaml";
49349
49359
  var CompareDataFeedsInputSchema = z105.object({
49350
49360
  feedAPath: z105.string().min(1).max(1e3).describe("Filesystem path to feed A (YAML or JSON, auto-detected by extension)"),
@@ -49644,7 +49654,7 @@ function registerQueryTaskStateTool(server, deps) {
49644
49654
  import { z as z109 } from "zod";
49645
49655
 
49646
49656
  // src/mcp/tools/ci-health-log.ts
49647
- import { appendFileSync as appendFileSync5, existsSync as existsSync13, readFileSync as readFileSync11, statSync as statSync2, writeFileSync as writeFileSync3 } from "fs";
49657
+ import { appendFileSync as appendFileSync5, existsSync as existsSync12, readFileSync as readFileSync11, statSync as statSync2, writeFileSync as writeFileSync3 } from "node:fs";
49648
49658
  import { z as z108 } from "zod";
49649
49659
 
49650
49660
  // src/mcp/tools/ci-health-types.ts
@@ -49911,7 +49921,7 @@ function registerCiHealthCheckTool(server, deps) {
49911
49921
  }
49912
49922
 
49913
49923
  // src/mcp/tools/quality-gate-tool.ts
49914
- import { statSync as statSync3 } from "fs";
49924
+ import { statSync as statSync3 } from "node:fs";
49915
49925
  import { z as z110 } from "zod";
49916
49926
  var QualityCheckSchema = z110.enum(["typecheck", "lint", "tests", "build", "security"]);
49917
49927
  var DEFAULT_CHECKS = ["typecheck", "lint", "tests"];
@@ -50030,8 +50040,8 @@ function registerRunQualityGateTool(server, deps) {
50030
50040
  }
50031
50041
 
50032
50042
  // src/mcp/tools/verify-audit-chain-tool.ts
50033
- import * as fs9 from "fs/promises";
50034
- import * as path8 from "path";
50043
+ import * as fs9 from "node:fs/promises";
50044
+ import * as path8 from "node:path";
50035
50045
  import { z as z111 } from "zod";
50036
50046
  var VerifyAuditChainInputSchema = z111.object({
50037
50047
  logDir: z111.string().min(1).max(512).describe(
@@ -50154,9 +50164,9 @@ var RESEARCH_BUDGET_MS = 2e4;
50154
50164
  var RESEARCH_TIMED_OUT = /* @__PURE__ */ Symbol("research-budget-exceeded");
50155
50165
  async function withResearchBudget(p, ms) {
50156
50166
  let timer;
50157
- const budget = new Promise((resolve22) => {
50167
+ const budget = new Promise((resolve21) => {
50158
50168
  timer = setTimeout(() => {
50159
- resolve22(RESEARCH_TIMED_OUT);
50169
+ resolve21(RESEARCH_TIMED_OUT);
50160
50170
  }, ms);
50161
50171
  });
50162
50172
  try {
@@ -50258,7 +50268,7 @@ function registerSuggestResearchTasksTool(server, deps) {
50258
50268
 
50259
50269
  // src/mcp/tools/run-tool.ts
50260
50270
  import { z as z116 } from "zod";
50261
- import { randomUUID as randomUUID17 } from "crypto";
50271
+ import { randomUUID as randomUUID17 } from "node:crypto";
50262
50272
 
50263
50273
  // src/orchestration/meta-dispatcher.ts
50264
50274
  var MetaDispatchError = class extends Error {
@@ -50476,7 +50486,7 @@ function classifyDispatchError(err2) {
50476
50486
  }
50477
50487
 
50478
50488
  // src/orchestration/meta-orchestrator.ts
50479
- import { randomUUID as randomUUID14 } from "crypto";
50489
+ import { randomUUID as randomUUID14 } from "node:crypto";
50480
50490
 
50481
50491
  // src/orchestration/meta-orchestrator-routing.ts
50482
50492
  function reasoningFor(selection, routing) {
@@ -50651,7 +50661,7 @@ function createMetaOrchestrator(options) {
50651
50661
  }
50652
50662
 
50653
50663
  // src/orchestration/meta-shadow-selector.ts
50654
- import { appendFileSync as appendFileSync6, existsSync as existsSync14, readFileSync as readFileSync12 } from "fs";
50664
+ import { appendFileSync as appendFileSync6, existsSync as existsSync13, readFileSync as readFileSync12 } from "node:fs";
50655
50665
  import { z as z113 } from "zod";
50656
50666
  var SHADOW_STRATEGY_ARMS = [
50657
50667
  "single-shot",
@@ -50776,7 +50786,7 @@ function hydrateShadowSelector(selector) {
50776
50786
  const hydratable = selector;
50777
50787
  if (typeof hydratable.recordFromContext !== "function") return 0;
50778
50788
  const file = getMetaOutcomesFile();
50779
- if (!existsSync14(file)) return 0;
50789
+ if (!existsSync13(file)) return 0;
50780
50790
  let replayed = 0;
50781
50791
  try {
50782
50792
  const cutoff = Date.now() - HYDRATE_LOOKBACK_MS;
@@ -51145,17 +51155,17 @@ function evaluateMetaStrategyReadiness(result, config = DEFAULT_META_STRATEGY_RE
51145
51155
 
51146
51156
  // src/mcp/tools/dev-pipeline-tool.ts
51147
51157
  import { z as z114 } from "zod";
51148
- import * as fs11 from "fs";
51149
- import * as path10 from "path";
51150
- import { randomUUID as randomUUID15 } from "crypto";
51158
+ import * as fs11 from "node:fs";
51159
+ import * as path10 from "node:path";
51160
+ import { randomUUID as randomUUID15 } from "node:crypto";
51151
51161
 
51152
51162
  // src/pipeline/task-tracker.ts
51153
- import * as fs10 from "fs";
51154
- import * as path9 from "path";
51163
+ import * as fs10 from "node:fs";
51164
+ import * as path9 from "node:path";
51155
51165
  var logger48 = createLogger({ component: "task-tracker" });
51156
51166
  async function exec(cmd, args, timeout = 15e3) {
51157
- const { execFile: execFile2 } = await import("child_process");
51158
- const { promisify: promisify2 } = await import("util");
51167
+ const { execFile: execFile2 } = await import("node:child_process");
51168
+ const { promisify: promisify2 } = await import("node:util");
51159
51169
  const run = promisify2(execFile2);
51160
51170
  const { stdout } = await run(cmd, [...args], { timeout });
51161
51171
  return stdout.trim();
@@ -51168,7 +51178,7 @@ var GitHubTaskTracker = class {
51168
51178
  cachedProvider = null;
51169
51179
  async getProvider() {
51170
51180
  if (this.cachedProvider !== null) return this.cachedProvider;
51171
- const { createScmProvider } = await import("./factory-UFKRSADE.js");
51181
+ const { createScmProvider } = await import("./factory-SF6ZPN6D.js");
51172
51182
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
51173
51183
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
51174
51184
  this.cachedProvider = result.value;
@@ -51558,9 +51568,9 @@ function registerDevPipelineTool(server, deps) {
51558
51568
 
51559
51569
  // src/mcp/tools/pipeline-tool.ts
51560
51570
  import { z as z115 } from "zod";
51561
- import * as fs12 from "fs";
51562
- import * as path11 from "path";
51563
- import { randomUUID as randomUUID16 } from "crypto";
51571
+ import * as fs12 from "node:fs";
51572
+ import * as path11 from "node:path";
51573
+ import { randomUUID as randomUUID16 } from "node:crypto";
51564
51574
  var PIPELINE_ASYNC_HINT = "A full run_pipeline run 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.";
51565
51575
  var PipelineInputSchema = z115.object({
51566
51576
  /** The task to execute. */
@@ -52083,7 +52093,7 @@ async function probeSource(source, includeModelIds) {
52083
52093
  }
52084
52094
  }
52085
52095
  async function defaultSources(includeOpenRouter) {
52086
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-3BZDQQYM.js");
52096
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-5URERSHK.js");
52087
52097
  const adapters = createAllAdapters2();
52088
52098
  return buildDefaultModelSources(adapters, { includeOpenRouter });
52089
52099
  }
@@ -52186,7 +52196,7 @@ var VoterEvalVerdictQuerySchema = z118.object({
52186
52196
 
52187
52197
  // src/mcp/tools/supply-chain-tradeoff-panel.ts
52188
52198
  import { z as z119 } from "zod";
52189
- import { randomUUID as randomUUID18 } from "crypto";
52199
+ import { randomUUID as randomUUID18 } from "node:crypto";
52190
52200
  var DEFAULT_AXES = [
52191
52201
  "build_time_determinism",
52192
52202
  "supply_chain_risk",
@@ -53926,7 +53936,6 @@ var ResponseCacheConfigSchema = z124.object({
53926
53936
  });
53927
53937
 
53928
53938
  // src/cli-adapters/response-cache-utils.ts
53929
- import { createHash as createHash6 } from "crypto";
53930
53939
  var logger51 = createLogger({ component: "ResponseCacheUtils" });
53931
53940
 
53932
53941
  // src/cli-adapters/unified-routing-types.ts
@@ -54026,7 +54035,7 @@ var FeedbackCollectorConfigSchema = z126.object({
54026
54035
  });
54027
54036
 
54028
54037
  // src/learning/outcome-feedback-helpers.ts
54029
- import { randomUUID as randomUUID19 } from "crypto";
54038
+ import { randomUUID as randomUUID19 } from "node:crypto";
54030
54039
  function countOutcomesByClass(outcomes) {
54031
54040
  const counts = {
54032
54041
  success: 0,
@@ -54345,7 +54354,7 @@ var DEFAULT_FEEDBACK_INTEGRATION_CONFIG = {
54345
54354
  };
54346
54355
 
54347
54356
  // src/learning/feedback-integration.ts
54348
- import { randomUUID as randomUUID20 } from "crypto";
54357
+ import { randomUUID as randomUUID20 } from "node:crypto";
54349
54358
  var STEP_QUALITY_SCORING = {
54350
54359
  /** Base score for successful steps. */
54351
54360
  successBase: 0.8,
@@ -55095,9 +55104,9 @@ function getPolicy(id) {
55095
55104
  }
55096
55105
 
55097
55106
  // src/security/sandbox/sandbox-executor.ts
55098
- import { execFile } from "child_process";
55099
- import { promisify } from "util";
55100
- import { resolve as resolve21, normalize as normalize2, sep as sep12 } from "path";
55107
+ import { execFile } from "node:child_process";
55108
+ import { promisify } from "node:util";
55109
+ import { resolve as resolve20, normalize as normalize2, sep as sep12 } from "node:path";
55101
55110
  var execFileAsync = promisify(execFile);
55102
55111
  var logger53 = createLogger({ component: "sandbox-executor" });
55103
55112
  function parseExecError(error) {
@@ -55177,9 +55186,9 @@ var PolicySandboxExecutor = class {
55177
55186
  */
55178
55187
  validateCwd(cwd, policy) {
55179
55188
  if (cwd === void 0) return null;
55180
- const normalizedCwd = normalize2(resolve21(cwd));
55189
+ const normalizedCwd = normalize2(resolve20(cwd));
55181
55190
  const isAllowed = policy.pathRules.some((rule) => {
55182
- const normalizedRule = normalize2(resolve21(rule.path));
55191
+ const normalizedRule = normalize2(resolve20(rule.path));
55183
55192
  const isUnderRule = normalizedCwd === normalizedRule || normalizedCwd.startsWith(normalizedRule + sep12);
55184
55193
  return isUnderRule && rule.access !== "none";
55185
55194
  });
@@ -56155,4 +56164,4 @@ export {
56155
56164
  shutdownFeedbackSubscriber,
56156
56165
  createEventBusBridge
56157
56166
  };
56158
- //# sourceMappingURL=chunk-HA2MM4C2.js.map
56167
+ //# sourceMappingURL=chunk-LOYIV3HG.js.map