nexus-agents 2.136.0 → 2.138.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 (142) hide show
  1. package/dist/{child-mcp-config-TM6OCARU.js → child-mcp-config-LCWPKOYE.js} +4 -4
  2. package/dist/{chunk-ZLENFXL5.js → chunk-2SWMXQZF.js} +4 -4
  3. package/dist/{chunk-MTE7THMR.js → chunk-52JN2RFG.js} +6 -6
  4. package/dist/{chunk-257QMFTM.js → chunk-5MMHH5WK.js} +3 -3
  5. package/dist/{chunk-66TXNH4S.js → chunk-7KFI6R2M.js} +9 -9
  6. package/dist/{chunk-VY4FZNZA.js → chunk-7QEGSYSU.js} +2 -2
  7. package/dist/{chunk-UH3F4RZB.js → chunk-7QR2RTA4.js} +7 -7
  8. package/dist/{chunk-GWOXPCIF.js → chunk-7XCQJXN4.js} +7 -7
  9. package/dist/{chunk-3WBEEYCS.js → chunk-AL7ZYHAF.js} +4 -4
  10. package/dist/{chunk-WOE5J5M6.js → chunk-AYA7K5F5.js} +4 -4
  11. package/dist/{chunk-3QH2KWLH.js → chunk-D2XWKFZ2.js} +2 -2
  12. package/dist/{chunk-L4QFWOOQ.js → chunk-DHVMSIT5.js} +22 -3
  13. package/dist/chunk-DHVMSIT5.js.map +1 -0
  14. package/dist/{chunk-7E5UXA4U.js → chunk-DKU7O4V2.js} +2 -2
  15. package/dist/{chunk-JK4L2TQ6.js → chunk-DOCEHXLQ.js} +3 -3
  16. package/dist/{chunk-KOVTOPEQ.js → chunk-DTHMBYSV.js} +2 -2
  17. package/dist/{chunk-HMZT2SJK.js → chunk-H3B7H67H.js} +4 -4
  18. package/dist/{chunk-7G63H7ZT.js → chunk-H4ATQPGQ.js} +2 -2
  19. package/dist/{chunk-ESP6U3LW.js → chunk-J2HWO3J3.js} +6 -6
  20. package/dist/{chunk-ZHCEOIEQ.js → chunk-JFKNUEZ7.js} +2 -2
  21. package/dist/{chunk-FIQSOSQU.js → chunk-K62WRHHK.js} +2 -2
  22. package/dist/{chunk-OCJEYHUQ.js → chunk-KWZC5LFC.js} +6 -6
  23. package/dist/{chunk-FHFEC2XM.js → chunk-LMMLLGZZ.js} +2 -2
  24. package/dist/{chunk-VN3CKPEF.js → chunk-MNHNQC7R.js} +3 -3
  25. package/dist/{chunk-FSUZIIOJ.js → chunk-MNXLJ2VX.js} +2 -2
  26. package/dist/{chunk-3AAJWZCR.js → chunk-MXDMJGVG.js} +4 -4
  27. package/dist/{chunk-JVZ7FGWR.js → chunk-NJW5GQUF.js} +3 -3
  28. package/dist/{chunk-5SXGPX34.js → chunk-NL7SZQPW.js} +2 -2
  29. package/dist/{chunk-N67LHY47.js → chunk-NWW7HLRL.js} +93 -33
  30. package/dist/chunk-NWW7HLRL.js.map +1 -0
  31. package/dist/{chunk-CQDGPGTL.js → chunk-NYSOJBF5.js} +3 -3
  32. package/dist/{chunk-5546JU53.js → chunk-PLKWH53F.js} +6 -6
  33. package/dist/{chunk-LCSGGLZZ.js → chunk-Q3EZN3Z2.js} +2 -2
  34. package/dist/{chunk-6JOXXQK2.js → chunk-R5ZQCA37.js} +44 -63
  35. package/dist/{chunk-6JOXXQK2.js.map → chunk-R5ZQCA37.js.map} +1 -1
  36. package/dist/{chunk-UGAKYSDO.js → chunk-RER74KD6.js} +2 -2
  37. package/dist/{chunk-3JSDOBOA.js → chunk-RTBVZCLD.js} +2 -2
  38. package/dist/{chunk-VVBKPRLI.js → chunk-XUH2UFSG.js} +2 -2
  39. package/dist/{chunk-ZII5MDUO.js → chunk-YPGTIJEW.js} +2 -2
  40. package/dist/{chunk-4GVPON4W.js → chunk-ZJ3WGARD.js} +3 -3
  41. package/dist/cli-circuit-breaker-TNV2PBLS.js +14 -0
  42. package/dist/cli.d.ts +1 -1
  43. package/dist/cli.js +117 -66
  44. package/dist/cli.js.map +1 -1
  45. package/dist/{composite-router-PS42433A.js → composite-router-KM4BPVY4.js} +4 -4
  46. package/dist/consensus-vote-PCIFXILX.js +39 -0
  47. package/dist/{consensus-vote-types-Dx4pf3YW.d.ts → consensus-vote-types-Qx_LRxt1.d.ts} +2 -1
  48. package/dist/{context-retriever-NIFXFYPQ.js → context-retriever-MAZKHYRD.js} +11 -11
  49. package/dist/doctor-deep-XCMFGGJ3.js +13 -0
  50. package/dist/{expert-bridge-NY6FAFQH.js → expert-bridge-EA3U3GKU.js} +6 -6
  51. package/dist/factory-FACKN4IN.js +22 -0
  52. package/dist/factory-Y5WCLQDB.js +15 -0
  53. package/dist/{improvement-review-JDSRWFHM.js → improvement-review-F7TKX4LQ.js} +6 -6
  54. package/dist/index.d.ts +6 -6
  55. package/dist/index.js +32 -32
  56. package/dist/{init-opencode-C7U6ZQK3.js → init-opencode-ZYGGEUZN.js} +8 -8
  57. package/dist/issue-triage-NI2ZDVTB.js +17 -0
  58. package/dist/{learning-persistence-EHTHKWR5.js → learning-persistence-M3OTCCNI.js} +3 -3
  59. package/dist/{pr-reviewer-helpers-D47TVXFX.js → pr-reviewer-helpers-L7L6O3VQ.js} +6 -6
  60. package/dist/{registry-command-PVC47NSQ.js → registry-command-K2KWID5D.js} +4 -4
  61. package/dist/{repo-security-plan-76IXMJNC.js → repo-security-plan-PCGHBEGZ.js} +5 -5
  62. package/dist/research-helpers-synthesize-R45KXXNH.js +15 -0
  63. package/dist/{routing-memory-RAYIYIUP.js → routing-memory-TLB5EY7J.js} +4 -4
  64. package/dist/{session-memory-WZCS7WDH.js → session-memory-PUEUWVIN.js} +5 -5
  65. package/dist/{setup-command-O62DVQ2U.js → setup-command-OHM6K4FM.js} +13 -13
  66. package/dist/setup-config-SLFGQ5F2.js +11 -0
  67. package/dist/{setup-custom-api-2PQP6UOT.js → setup-custom-api-SVCRCSKY.js} +5 -5
  68. package/dist/{tool-memory-RAQWOUXV.js → tool-memory-COQWIFB6.js} +8 -8
  69. package/dist/{tool-memory-registry-adapters-Y4EGADHN.js → tool-memory-registry-adapters-DLSE4SQH.js} +3 -3
  70. package/dist/unified-registry-44DIG4XK.js +25 -0
  71. package/dist/{weather-report-TEBEALS7.js → weather-report-WK7TJPMM.js} +4 -4
  72. package/package.json +1 -1
  73. package/dist/chunk-L4QFWOOQ.js.map +0 -1
  74. package/dist/chunk-N67LHY47.js.map +0 -1
  75. package/dist/cli-circuit-breaker-HFFMCA43.js +0 -14
  76. package/dist/consensus-vote-K2SHY4TC.js +0 -39
  77. package/dist/doctor-deep-VQQNT7VN.js +0 -13
  78. package/dist/factory-6A26HIWS.js +0 -15
  79. package/dist/factory-GGSACEWN.js +0 -22
  80. package/dist/issue-triage-7RN74LBU.js +0 -17
  81. package/dist/research-helpers-synthesize-WH4IC36H.js +0 -15
  82. package/dist/setup-config-KEBEUMC3.js +0 -11
  83. package/dist/unified-registry-L5PGLSEI.js +0 -25
  84. /package/dist/{child-mcp-config-TM6OCARU.js.map → child-mcp-config-LCWPKOYE.js.map} +0 -0
  85. /package/dist/{chunk-ZLENFXL5.js.map → chunk-2SWMXQZF.js.map} +0 -0
  86. /package/dist/{chunk-MTE7THMR.js.map → chunk-52JN2RFG.js.map} +0 -0
  87. /package/dist/{chunk-257QMFTM.js.map → chunk-5MMHH5WK.js.map} +0 -0
  88. /package/dist/{chunk-66TXNH4S.js.map → chunk-7KFI6R2M.js.map} +0 -0
  89. /package/dist/{chunk-VY4FZNZA.js.map → chunk-7QEGSYSU.js.map} +0 -0
  90. /package/dist/{chunk-UH3F4RZB.js.map → chunk-7QR2RTA4.js.map} +0 -0
  91. /package/dist/{chunk-GWOXPCIF.js.map → chunk-7XCQJXN4.js.map} +0 -0
  92. /package/dist/{chunk-3WBEEYCS.js.map → chunk-AL7ZYHAF.js.map} +0 -0
  93. /package/dist/{chunk-WOE5J5M6.js.map → chunk-AYA7K5F5.js.map} +0 -0
  94. /package/dist/{chunk-3QH2KWLH.js.map → chunk-D2XWKFZ2.js.map} +0 -0
  95. /package/dist/{chunk-7E5UXA4U.js.map → chunk-DKU7O4V2.js.map} +0 -0
  96. /package/dist/{chunk-JK4L2TQ6.js.map → chunk-DOCEHXLQ.js.map} +0 -0
  97. /package/dist/{chunk-KOVTOPEQ.js.map → chunk-DTHMBYSV.js.map} +0 -0
  98. /package/dist/{chunk-HMZT2SJK.js.map → chunk-H3B7H67H.js.map} +0 -0
  99. /package/dist/{chunk-7G63H7ZT.js.map → chunk-H4ATQPGQ.js.map} +0 -0
  100. /package/dist/{chunk-ESP6U3LW.js.map → chunk-J2HWO3J3.js.map} +0 -0
  101. /package/dist/{chunk-ZHCEOIEQ.js.map → chunk-JFKNUEZ7.js.map} +0 -0
  102. /package/dist/{chunk-FIQSOSQU.js.map → chunk-K62WRHHK.js.map} +0 -0
  103. /package/dist/{chunk-OCJEYHUQ.js.map → chunk-KWZC5LFC.js.map} +0 -0
  104. /package/dist/{chunk-FHFEC2XM.js.map → chunk-LMMLLGZZ.js.map} +0 -0
  105. /package/dist/{chunk-VN3CKPEF.js.map → chunk-MNHNQC7R.js.map} +0 -0
  106. /package/dist/{chunk-FSUZIIOJ.js.map → chunk-MNXLJ2VX.js.map} +0 -0
  107. /package/dist/{chunk-3AAJWZCR.js.map → chunk-MXDMJGVG.js.map} +0 -0
  108. /package/dist/{chunk-JVZ7FGWR.js.map → chunk-NJW5GQUF.js.map} +0 -0
  109. /package/dist/{chunk-5SXGPX34.js.map → chunk-NL7SZQPW.js.map} +0 -0
  110. /package/dist/{chunk-CQDGPGTL.js.map → chunk-NYSOJBF5.js.map} +0 -0
  111. /package/dist/{chunk-5546JU53.js.map → chunk-PLKWH53F.js.map} +0 -0
  112. /package/dist/{chunk-LCSGGLZZ.js.map → chunk-Q3EZN3Z2.js.map} +0 -0
  113. /package/dist/{chunk-UGAKYSDO.js.map → chunk-RER74KD6.js.map} +0 -0
  114. /package/dist/{chunk-3JSDOBOA.js.map → chunk-RTBVZCLD.js.map} +0 -0
  115. /package/dist/{chunk-VVBKPRLI.js.map → chunk-XUH2UFSG.js.map} +0 -0
  116. /package/dist/{chunk-ZII5MDUO.js.map → chunk-YPGTIJEW.js.map} +0 -0
  117. /package/dist/{chunk-4GVPON4W.js.map → chunk-ZJ3WGARD.js.map} +0 -0
  118. /package/dist/{cli-circuit-breaker-HFFMCA43.js.map → cli-circuit-breaker-TNV2PBLS.js.map} +0 -0
  119. /package/dist/{composite-router-PS42433A.js.map → composite-router-KM4BPVY4.js.map} +0 -0
  120. /package/dist/{consensus-vote-K2SHY4TC.js.map → consensus-vote-PCIFXILX.js.map} +0 -0
  121. /package/dist/{context-retriever-NIFXFYPQ.js.map → context-retriever-MAZKHYRD.js.map} +0 -0
  122. /package/dist/{doctor-deep-VQQNT7VN.js.map → doctor-deep-XCMFGGJ3.js.map} +0 -0
  123. /package/dist/{expert-bridge-NY6FAFQH.js.map → expert-bridge-EA3U3GKU.js.map} +0 -0
  124. /package/dist/{factory-6A26HIWS.js.map → factory-FACKN4IN.js.map} +0 -0
  125. /package/dist/{factory-GGSACEWN.js.map → factory-Y5WCLQDB.js.map} +0 -0
  126. /package/dist/{improvement-review-JDSRWFHM.js.map → improvement-review-F7TKX4LQ.js.map} +0 -0
  127. /package/dist/{init-opencode-C7U6ZQK3.js.map → init-opencode-ZYGGEUZN.js.map} +0 -0
  128. /package/dist/{issue-triage-7RN74LBU.js.map → issue-triage-NI2ZDVTB.js.map} +0 -0
  129. /package/dist/{learning-persistence-EHTHKWR5.js.map → learning-persistence-M3OTCCNI.js.map} +0 -0
  130. /package/dist/{pr-reviewer-helpers-D47TVXFX.js.map → pr-reviewer-helpers-L7L6O3VQ.js.map} +0 -0
  131. /package/dist/{registry-command-PVC47NSQ.js.map → registry-command-K2KWID5D.js.map} +0 -0
  132. /package/dist/{repo-security-plan-76IXMJNC.js.map → repo-security-plan-PCGHBEGZ.js.map} +0 -0
  133. /package/dist/{research-helpers-synthesize-WH4IC36H.js.map → research-helpers-synthesize-R45KXXNH.js.map} +0 -0
  134. /package/dist/{routing-memory-RAYIYIUP.js.map → routing-memory-TLB5EY7J.js.map} +0 -0
  135. /package/dist/{session-memory-WZCS7WDH.js.map → session-memory-PUEUWVIN.js.map} +0 -0
  136. /package/dist/{setup-command-O62DVQ2U.js.map → setup-command-OHM6K4FM.js.map} +0 -0
  137. /package/dist/{setup-config-KEBEUMC3.js.map → setup-config-SLFGQ5F2.js.map} +0 -0
  138. /package/dist/{setup-custom-api-2PQP6UOT.js.map → setup-custom-api-SVCRCSKY.js.map} +0 -0
  139. /package/dist/{tool-memory-RAQWOUXV.js.map → tool-memory-COQWIFB6.js.map} +0 -0
  140. /package/dist/{tool-memory-registry-adapters-Y4EGADHN.js.map → tool-memory-registry-adapters-DLSE4SQH.js.map} +0 -0
  141. /package/dist/{unified-registry-L5PGLSEI.js.map → unified-registry-44DIG4XK.js.map} +0 -0
  142. /package/dist/{weather-report-TEBEALS7.js.map → weather-report-WK7TJPMM.js.map} +0 -0
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-2XRPKJKX.js";
6
6
  import {
7
7
  nexusDataPath
8
- } from "./chunk-L4QFWOOQ.js";
8
+ } from "./chunk-DHVMSIT5.js";
9
9
 
10
10
  // src/mcp/tools/tool-memory-registry-adapters.ts
11
11
  var DEFAULT_SEARCH_LIMIT = 10;
@@ -89,4 +89,4 @@ export {
89
89
  StatsOnlyAdapter,
90
90
  ensureSharedMemoryRegistry
91
91
  };
92
- //# sourceMappingURL=chunk-UGAKYSDO.js.map
92
+ //# sourceMappingURL=chunk-RER74KD6.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider
7
- } from "./chunk-OCJEYHUQ.js";
7
+ } from "./chunk-KWZC5LFC.js";
8
8
 
9
9
  // src/mcp/tools/scanner-registry-fetcher.ts
10
10
  import { z } from "zod";
@@ -721,4 +721,4 @@ export {
721
721
  generateSecurityPlan,
722
722
  buildPlanFromAnalysis
723
723
  };
724
- //# sourceMappingURL=chunk-3JSDOBOA.js.map
724
+ //# sourceMappingURL=chunk-RTBVZCLD.js.map
@@ -4,7 +4,7 @@ import {
4
4
  err,
5
5
  getErrorMessage,
6
6
  ok
7
- } from "./chunk-OCJEYHUQ.js";
7
+ } from "./chunk-KWZC5LFC.js";
8
8
 
9
9
  // src/scm/types.ts
10
10
  var ScmError = class extends Error {
@@ -263,4 +263,4 @@ export {
263
263
  ScmError,
264
264
  GitHubProvider
265
265
  };
266
- //# sourceMappingURL=chunk-VVBKPRLI.js.map
266
+ //# sourceMappingURL=chunk-XUH2UFSG.js.map
@@ -10,7 +10,7 @@ import {
10
10
  getTokenEstimator,
11
11
  isRateLimitLikeError,
12
12
  ok
13
- } from "./chunk-OCJEYHUQ.js";
13
+ } from "./chunk-KWZC5LFC.js";
14
14
 
15
15
  // src/adapters/base-adapter.ts
16
16
  var AdapterModelError = class extends ModelError {
@@ -707,4 +707,4 @@ export {
707
707
  DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
708
708
  collectStream
709
709
  };
710
- //# sourceMappingURL=chunk-ZII5MDUO.js.map
710
+ //# sourceMappingURL=chunk-YPGTIJEW.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  loadPapersRegistry
3
- } from "./chunk-ZHCEOIEQ.js";
3
+ } from "./chunk-JFKNUEZ7.js";
4
4
  import {
5
5
  getErrorMessage
6
- } from "./chunk-OCJEYHUQ.js";
6
+ } from "./chunk-KWZC5LFC.js";
7
7
 
8
8
  // src/cli/research-helpers-synthesize.ts
9
9
  import { z } from "zod";
@@ -876,4 +876,4 @@ export {
876
876
  AttributedInsightSchema,
877
877
  synthesizeResearch
878
878
  };
879
- //# sourceMappingURL=chunk-4GVPON4W.js.map
879
+ //# sourceMappingURL=chunk-ZJ3WGARD.js.map
@@ -0,0 +1,14 @@
1
+ import {
2
+ CliCircuitBreakerIntegration,
3
+ createCliCircuitBreakerIntegration
4
+ } from "./chunk-NYSOJBF5.js";
5
+ import "./chunk-H4ATQPGQ.js";
6
+ import "./chunk-KWZC5LFC.js";
7
+ import "./chunk-NL7SZQPW.js";
8
+ import "./chunk-DHVMSIT5.js";
9
+ import "./chunk-ZPWHCABL.js";
10
+ export {
11
+ CliCircuitBreakerIntegration,
12
+ createCliCircuitBreakerIntegration
13
+ };
14
+ //# sourceMappingURL=cli-circuit-breaker-TNV2PBLS.js.map
package/dist/cli.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { C as CliNameLiteral, e as VoteThreshold, E as ErrorPolicy } from './consensus-vote-types-Dx4pf3YW.js';
2
+ import { C as CliNameLiteral, e as VoteThreshold, E as ErrorPolicy } from './consensus-vote-types-Qx_LRxt1.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  buildOpenAICompatAdapters,
4
4
  readOpenAICompatEnv
5
- } from "./chunk-WOE5J5M6.js";
5
+ } from "./chunk-AYA7K5F5.js";
6
6
  import {
7
7
  calculateConsensus,
8
8
  countByCategory,
@@ -17,13 +17,13 @@ import {
17
17
  generateSummary,
18
18
  parseFindings,
19
19
  sumFindings
20
- } from "./chunk-JK4L2TQ6.js";
21
- import "./chunk-LCSGGLZZ.js";
20
+ } from "./chunk-DOCEHXLQ.js";
21
+ import "./chunk-Q3EZN3Z2.js";
22
22
  import {
23
23
  setupCommandAsync,
24
24
  verifyCommand
25
- } from "./chunk-MTE7THMR.js";
26
- import "./chunk-VY4FZNZA.js";
25
+ } from "./chunk-52JN2RFG.js";
26
+ import "./chunk-7QEGSYSU.js";
27
27
  import {
28
28
  AuthHandler,
29
29
  DEFAULT_EXPERTS,
@@ -142,9 +142,9 @@ import {
142
142
  validateCommand,
143
143
  validateWorkflow,
144
144
  wrapInMarkdownFence
145
- } from "./chunk-6JOXXQK2.js";
146
- import "./chunk-257QMFTM.js";
147
- import "./chunk-3JSDOBOA.js";
145
+ } from "./chunk-R5ZQCA37.js";
146
+ import "./chunk-5MMHH5WK.js";
147
+ import "./chunk-RTBVZCLD.js";
148
148
  import "./chunk-HFOQKCD2.js";
149
149
  import "./chunk-3ACDP4E6.js";
150
150
  import {
@@ -170,11 +170,11 @@ import {
170
170
  loadConfig,
171
171
  runDoctor,
172
172
  validateNexusEnv
173
- } from "./chunk-66TXNH4S.js";
174
- import "./chunk-CQDGPGTL.js";
173
+ } from "./chunk-7KFI6R2M.js";
174
+ import "./chunk-NYSOJBF5.js";
175
175
  import {
176
176
  shutdownExpertBridge
177
- } from "./chunk-UH3F4RZB.js";
177
+ } from "./chunk-7QR2RTA4.js";
178
178
  import {
179
179
  ConsensusVoteInputSchema,
180
180
  DEFAULT_VOTE_TIMEOUT_MS,
@@ -183,25 +183,25 @@ import {
183
183
  VoteThresholdSchema,
184
184
  executeVoting,
185
185
  registerConsensusVoteTool
186
- } from "./chunk-N67LHY47.js";
186
+ } from "./chunk-NWW7HLRL.js";
187
187
  import {
188
188
  loadUsageEvents,
189
189
  rollupByModel
190
- } from "./chunk-VN3CKPEF.js";
190
+ } from "./chunk-MNHNQC7R.js";
191
191
  import {
192
192
  synthesizeResearch
193
- } from "./chunk-4GVPON4W.js";
193
+ } from "./chunk-ZJ3WGARD.js";
194
194
  import {
195
195
  classifyTrust,
196
196
  createFullGitHubProvider,
197
197
  evaluatePolicy,
198
198
  parsePRUrl
199
- } from "./chunk-3AAJWZCR.js";
200
- import "./chunk-VVBKPRLI.js";
199
+ } from "./chunk-MXDMJGVG.js";
200
+ import "./chunk-XUH2UFSG.js";
201
201
  import {
202
202
  ReputationCache,
203
203
  sanitizeInput
204
- } from "./chunk-FSUZIIOJ.js";
204
+ } from "./chunk-MNXLJ2VX.js";
205
205
  import {
206
206
  ImprovementReviewInputSchema,
207
207
  calculateFitnessScore,
@@ -215,10 +215,10 @@ import {
215
215
  registerImprovementReviewTool,
216
216
  runImprovementReview,
217
217
  scanForSecrets
218
- } from "./chunk-3WBEEYCS.js";
218
+ } from "./chunk-AL7ZYHAF.js";
219
219
  import {
220
220
  createDefaultPolicyFirewall
221
- } from "./chunk-JVZ7FGWR.js";
221
+ } from "./chunk-NJW5GQUF.js";
222
222
  import {
223
223
  PaperStatusSchema,
224
224
  createResearchIssue,
@@ -241,45 +241,45 @@ import {
241
241
  loadSourcesRegistry,
242
242
  rankDiscoveredItems,
243
243
  saveSourcesRegistry
244
- } from "./chunk-5546JU53.js";
244
+ } from "./chunk-PLKWH53F.js";
245
245
  import {
246
246
  resolveToken
247
- } from "./chunk-FHFEC2XM.js";
247
+ } from "./chunk-LMMLLGZZ.js";
248
248
  import {
249
249
  loadPapersRegistry,
250
250
  loadTechniquesRegistry,
251
251
  savePapersRegistry
252
- } from "./chunk-ZHCEOIEQ.js";
252
+ } from "./chunk-JFKNUEZ7.js";
253
253
  import "./chunk-NUBSJGQZ.js";
254
254
  import {
255
255
  MemoryError,
256
256
  shutdownToolMemory
257
- } from "./chunk-ESP6U3LW.js";
257
+ } from "./chunk-J2HWO3J3.js";
258
258
  import {
259
259
  capitalize,
260
260
  capitalizeKebab,
261
261
  truncateSentence
262
262
  } from "./chunk-6T3EPABN.js";
263
- import "./chunk-3QH2KWLH.js";
263
+ import "./chunk-D2XWKFZ2.js";
264
264
  import "./chunk-ZM4O442V.js";
265
- import "./chunk-UGAKYSDO.js";
265
+ import "./chunk-RER74KD6.js";
266
266
  import "./chunk-2XRPKJKX.js";
267
267
  import {
268
268
  createUnifiedRegistry
269
- } from "./chunk-HMZT2SJK.js";
269
+ } from "./chunk-H3B7H67H.js";
270
270
  import {
271
271
  createAllAdapters,
272
272
  getAvailableClis,
273
273
  isRecord,
274
274
  probeAllClis
275
- } from "./chunk-GWOXPCIF.js";
276
- import "./chunk-ZII5MDUO.js";
275
+ } from "./chunk-7XCQJXN4.js";
276
+ import "./chunk-YPGTIJEW.js";
277
277
  import {
278
278
  DEFAULTS
279
- } from "./chunk-7E5UXA4U.js";
280
- import "./chunk-7G63H7ZT.js";
281
- import "./chunk-KOVTOPEQ.js";
282
- import "./chunk-FIQSOSQU.js";
279
+ } from "./chunk-DKU7O4V2.js";
280
+ import "./chunk-H4ATQPGQ.js";
281
+ import "./chunk-DTHMBYSV.js";
282
+ import "./chunk-K62WRHHK.js";
283
283
  import {
284
284
  API_TIMEOUTS,
285
285
  AgentCapability,
@@ -353,8 +353,8 @@ import {
353
353
  validateTimeout,
354
354
  writeEmptyLine,
355
355
  writeLine
356
- } from "./chunk-OCJEYHUQ.js";
357
- import "./chunk-5SXGPX34.js";
356
+ } from "./chunk-KWZC5LFC.js";
357
+ import "./chunk-NL7SZQPW.js";
358
358
  import {
359
359
  applyPortableMode,
360
360
  detectSandbox,
@@ -362,8 +362,9 @@ import {
362
362
  getPerRepoSubdirs,
363
363
  nexusDataPath,
364
364
  nexusSharedPath,
365
- sessionsDbPath
366
- } from "./chunk-L4QFWOOQ.js";
365
+ sessionsDbPath,
366
+ setActiveWorkspaceRoot
367
+ } from "./chunk-DHVMSIT5.js";
367
368
  import "./chunk-ZPWHCABL.js";
368
369
 
369
370
  // src/cli/cli-log-bootstrap.ts
@@ -4026,7 +4027,7 @@ ${file.patch}
4026
4027
  violations: policyResult.violations
4027
4028
  });
4028
4029
  }
4029
- const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-D47TVXFX.js");
4030
+ const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-L7L6O3VQ.js");
4030
4031
  const body = formatReviewComment2(result);
4031
4032
  const postResult = await provider.createReview(pr.prNumber, body, result.decision);
4032
4033
  if (!postResult.ok) {
@@ -17799,7 +17800,7 @@ function startImprovementReviewScheduler(options) {
17799
17800
  let running = false;
17800
17801
  const runOnce = async () => {
17801
17802
  try {
17802
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-JDSRWFHM.js");
17803
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-F7TKX4LQ.js");
17803
17804
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
17804
17805
  const result = await runImprovementReview2(input, { logger: logger19 });
17805
17806
  logger19.info("Scheduled improvement_review complete", {
@@ -18433,6 +18434,53 @@ function registerMcpTools(options) {
18433
18434
  // src/cli-server.ts
18434
18435
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
18435
18436
 
18437
+ // src/mcp/workspace-roots.ts
18438
+ import { existsSync as existsSync22 } from "fs";
18439
+ import { join as join17 } from "path";
18440
+ import { fileURLToPath } from "url";
18441
+ function deriveWorkspaceRootFromRoots(roots) {
18442
+ let first = null;
18443
+ let gitRoot = null;
18444
+ for (const root of roots) {
18445
+ if (typeof root.uri !== "string" || !root.uri.startsWith("file://")) continue;
18446
+ let path21;
18447
+ try {
18448
+ path21 = fileURLToPath(root.uri);
18449
+ } catch {
18450
+ continue;
18451
+ }
18452
+ first ??= path21;
18453
+ if (gitRoot === null && existsSync22(join17(path21, ".git"))) gitRoot = path21;
18454
+ }
18455
+ return gitRoot ?? first;
18456
+ }
18457
+ async function resolveWorkspaceRootFromClient(server, logger19) {
18458
+ const capabilities = server.server.getClientCapabilities();
18459
+ if (capabilities?.roots === void 0) {
18460
+ logger19.debug("MCP client did not declare the roots capability; using cwd/homedir for data dir");
18461
+ return;
18462
+ }
18463
+ try {
18464
+ const result = await server.server.listRoots();
18465
+ const root = deriveWorkspaceRootFromRoots(result.roots);
18466
+ if (root === null) {
18467
+ logger19.debug("MCP client returned no usable file:// roots; using cwd/homedir for data dir");
18468
+ return;
18469
+ }
18470
+ if (setActiveWorkspaceRoot(root)) {
18471
+ logger19.info("Resolved workspace root from MCP client roots", { workspaceRoot: root });
18472
+ } else {
18473
+ logger19.warn("MCP client root failed validation; using cwd/homedir for data dir", {
18474
+ candidate: root
18475
+ });
18476
+ }
18477
+ } catch (error) {
18478
+ logger19.debug("roots/list request failed; using cwd/homedir for data dir", {
18479
+ error: error instanceof Error ? error.message : String(error)
18480
+ });
18481
+ }
18482
+ }
18483
+
18436
18484
  // src/cli/version-check.ts
18437
18485
  import semver from "semver";
18438
18486
  var REGISTRY_LATEST_URL = "https://registry.npmjs.org/nexus-agents/latest";
@@ -19742,7 +19790,7 @@ function adaptConfigToLibrary(config) {
19742
19790
  }
19743
19791
  function createBeliefPromoter() {
19744
19792
  return async (event) => {
19745
- const { getToolMemory } = await import("./tool-memory-RAQWOUXV.js");
19793
+ const { getToolMemory } = await import("./tool-memory-COQWIFB6.js");
19746
19794
  const tm = getToolMemory();
19747
19795
  await tm.recordBelief(
19748
19796
  `skill:${event.name}`,
@@ -20091,6 +20139,9 @@ async function connectToStdioTransport(server, logger19, serverLogger) {
20091
20139
  logger19.setDestination?.("stderr");
20092
20140
  serverLogger.setDestination?.("stderr");
20093
20141
  logger19.info("Connecting to stdio transport");
20142
+ server.server.oninitialized = () => {
20143
+ void resolveWorkspaceRootFromClient(server, serverLogger);
20144
+ };
20094
20145
  const transport = new StdioServerTransport();
20095
20146
  const connectResult = await connectTransport(server, transport, serverLogger);
20096
20147
  if (!connectResult.ok) {
@@ -20595,7 +20646,7 @@ async function handleResearchCommand(args) {
20595
20646
  }
20596
20647
  }
20597
20648
  async function handleRegistryCommand(args) {
20598
- const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-PVC47NSQ.js");
20649
+ const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-K2KWID5D.js");
20599
20650
  const subcommand = args.subcommand;
20600
20651
  if (!isValidRegistrySubcommand(subcommand)) {
20601
20652
  process.stdout.write(`${formatRegistryUsage()}
@@ -20643,7 +20694,7 @@ async function handleVerifyCommand(args) {
20643
20694
  async function handleDoctorCommand(args) {
20644
20695
  const exitCode = await doctorCommand({ fix: args.options.fix });
20645
20696
  if (args.options.deep) {
20646
- const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-VQQNT7VN.js");
20697
+ const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-XCMFGGJ3.js");
20647
20698
  const diag = runDeepDiagnostics2();
20648
20699
  process.stdout.write(formatDeepDiagnostics2(diag) + "\n");
20649
20700
  }
@@ -20693,7 +20744,7 @@ async function runInitPortableFlow(args) {
20693
20744
  return cliExit(result.success ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
20694
20745
  }
20695
20746
  async function runInitOpencodeFlow(args) {
20696
- const { runInitOpencode } = await import("./init-opencode-C7U6ZQK3.js");
20747
+ const { runInitOpencode } = await import("./init-opencode-ZYGGEUZN.js");
20697
20748
  const opencodePath = args.options.opencode;
20698
20749
  if (opencodePath === void 0 || opencodePath === "") {
20699
20750
  process.stderr.write("Error: --opencode requires a path argument.\n");
@@ -20719,7 +20770,7 @@ async function runInitOpencodeFlow(args) {
20719
20770
  return cliExit(EXIT_CODES.SUCCESS);
20720
20771
  }
20721
20772
  async function renderOpencodeValidate(opencodePath) {
20722
- const { runOpencodeValidate } = await import("./init-opencode-C7U6ZQK3.js");
20773
+ const { runOpencodeValidate } = await import("./init-opencode-ZYGGEUZN.js");
20723
20774
  const result = await runOpencodeValidate(opencodePath);
20724
20775
  if (!result.ok) {
20725
20776
  process.stderr.write(`init --opencode --validate: ${result.reason ?? "failed"}
@@ -20758,7 +20809,7 @@ async function handleSetupCommandAsync(args) {
20758
20809
  return cliExitFromStatus(exitCode);
20759
20810
  }
20760
20811
  async function runCustomApiSetup(args) {
20761
- const { configureCustomApi } = await import("./setup-custom-api-2PQP6UOT.js");
20812
+ const { configureCustomApi } = await import("./setup-custom-api-SVCRCSKY.js");
20762
20813
  const baseUrl = args.options.customApi;
20763
20814
  if (baseUrl === void 0) return EXIT_CODES.SERVER_START_FAILED;
20764
20815
  const input = {
@@ -21121,7 +21172,7 @@ function handleScaffoldCommand(args) {
21121
21172
  // src/cli/visualize-summary.ts
21122
21173
  import * as fs17 from "fs";
21123
21174
  import * as path20 from "path";
21124
- import { fileURLToPath } from "url";
21175
+ import { fileURLToPath as fileURLToPath2 } from "url";
21125
21176
  function findPackageRoot(startDir) {
21126
21177
  let dir = startDir;
21127
21178
  for (let i = 0; i < 5; i++) {
@@ -21166,7 +21217,7 @@ var LAYER_DIRS = [
21166
21217
  { name: "Utils", dir: "utils" }
21167
21218
  ];
21168
21219
  function gatherSystemSummary() {
21169
- const thisFile = fileURLToPath(import.meta.url);
21220
+ const thisFile = fileURLToPath2(import.meta.url);
21170
21221
  const pkgRoot = findPackageRoot(path20.dirname(thisFile));
21171
21222
  const srcDir = path20.resolve(pkgRoot, "src");
21172
21223
  const allTs = countFiles(srcDir, /\.ts$/);
@@ -22331,7 +22382,7 @@ function handleStatusCommand2(args) {
22331
22382
 
22332
22383
  // src/cli/scenario-command.ts
22333
22384
  import { readdir as readdir4 } from "fs/promises";
22334
- import { join as join18, resolve as resolve12 } from "path";
22385
+ import { join as join19, resolve as resolve12 } from "path";
22335
22386
 
22336
22387
  // src/testing/e2e/scenario-runner.ts
22337
22388
  import { readFile as readFile7 } from "fs/promises";
@@ -22701,7 +22752,7 @@ async function handleRun(args) {
22701
22752
  return cliExit(EXIT_CODES.SERVER_START_FAILED);
22702
22753
  }
22703
22754
  const runner = createScenarioRunner();
22704
- const fixturePath = join18(FIXTURES_DIR, `${name}${SCENARIO_SUFFIX}`);
22755
+ const fixturePath = join19(FIXTURES_DIR, `${name}${SCENARIO_SUFFIX}`);
22705
22756
  try {
22706
22757
  const fixture = await runner.loadFixture(fixturePath);
22707
22758
  const result = await runner.run(fixture);
@@ -23242,7 +23293,7 @@ function stripRefsPrefix(ref) {
23242
23293
  import { execFile as execFile4 } from "child_process";
23243
23294
  import { promisify as promisify4 } from "util";
23244
23295
  import { writeFile as writeFile6, mkdir as mkdir5 } from "fs/promises";
23245
- import { join as join19, dirname as dirname11 } from "path";
23296
+ import { join as join20, dirname as dirname11 } from "path";
23246
23297
 
23247
23298
  // src/mcp/tools/improvement-remediation-capability.ts
23248
23299
  import { z as z9 } from "zod";
@@ -23401,12 +23452,12 @@ function makeGitWorktreeOps(repoRoot) {
23401
23452
  };
23402
23453
  return {
23403
23454
  async addWorktree(branch, baseBranch) {
23404
- const path21 = join19(repoRoot, ".nexus-worktrees", branch.replace(/\//g, "_"));
23455
+ const path21 = join20(repoRoot, ".nexus-worktrees", branch.replace(/\//g, "_"));
23405
23456
  await git2(["worktree", "add", "-b", branch, path21, baseBranch], repoRoot);
23406
23457
  return path21;
23407
23458
  },
23408
23459
  async writeFileIn(worktreePath, relPath, content) {
23409
- const abs = join19(worktreePath, relPath);
23460
+ const abs = join20(worktreePath, relPath);
23410
23461
  await mkdir5(dirname11(abs), { recursive: true });
23411
23462
  await writeFile6(abs, content, "utf8");
23412
23463
  },
@@ -23607,7 +23658,7 @@ import { createHash as createHash4 } from "crypto";
23607
23658
  import { createHash as createHash3 } from "crypto";
23608
23659
  import { mkdtempSync, mkdirSync as mkdirSync6, writeFileSync as writeFileSync8, rmSync as rmSync2, realpathSync as realpathSync2 } from "fs";
23609
23660
  import { tmpdir } from "os";
23610
- import { dirname as dirname13, join as join20 } from "path";
23661
+ import { dirname as dirname13, join as join21 } from "path";
23611
23662
  import { execFileSync as execFileSync3 } from "child_process";
23612
23663
  import { z as z12 } from "zod";
23613
23664
 
@@ -24056,8 +24107,8 @@ function runGuardsAndPlan(args, logger19) {
24056
24107
  function runInWorktree(run, logger19, options, handle) {
24057
24108
  const fault = options.faultInjector;
24058
24109
  const repoRoot = options.repoRoot ?? process.cwd();
24059
- handle.tempParent = realpathSync2(mkdtempSync(join20(tmpdir(), "codepr-orchestrator-")));
24060
- handle.worktreeRoot = join20(handle.tempParent, "wt");
24110
+ handle.tempParent = realpathSync2(mkdtempSync(join21(tmpdir(), "codepr-orchestrator-")));
24111
+ handle.worktreeRoot = join21(handle.tempParent, "wt");
24061
24112
  git(repoRoot, ["worktree", "add", "--detach", handle.worktreeRoot]);
24062
24113
  fault?.("after-worktree");
24063
24114
  const precheck = precheckChanges(handle.worktreeRoot, run, logger19);
@@ -24876,18 +24927,18 @@ async function handleRemediationReviewCommand(args) {
24876
24927
  }
24877
24928
 
24878
24929
  // src/cli/migrate-command.ts
24879
- import { cpSync, existsSync as existsSync23, mkdirSync as mkdirSync7, readdirSync as readdirSync3 } from "fs";
24930
+ import { cpSync, existsSync as existsSync24, mkdirSync as mkdirSync7, readdirSync as readdirSync3 } from "fs";
24880
24931
  import { homedir } from "os";
24881
- import { join as join21 } from "path";
24932
+ import { join as join22 } from "path";
24882
24933
  var logger18 = createLogger({ component: "migrate-command" });
24883
- var HOMEDIR_DEFAULT_BASE = join21(homedir(), ".nexus-agents");
24934
+ var HOMEDIR_DEFAULT_BASE = join22(homedir(), ".nexus-agents");
24884
24935
  function countItems(dir) {
24885
- if (!existsSync23(dir)) return 0;
24936
+ if (!existsSync24(dir)) return 0;
24886
24937
  try {
24887
24938
  const entries = readdirSync3(dir, { withFileTypes: true });
24888
24939
  let n = 0;
24889
24940
  for (const e of entries) {
24890
- const p = join21(dir, e.name);
24941
+ const p = join22(dir, e.name);
24891
24942
  if (e.isDirectory()) {
24892
24943
  n += countItems(p);
24893
24944
  } else {
@@ -24929,7 +24980,7 @@ function checkEarlyExits(fromBase, toBase, dryRun) {
24929
24980
  summary: "No git repo detected from cwd. Run from inside a repo or pass --to <path> to choose an explicit destination."
24930
24981
  };
24931
24982
  }
24932
- if (!existsSync23(fromBase)) {
24983
+ if (!existsSync24(fromBase)) {
24933
24984
  return {
24934
24985
  fromBase,
24935
24986
  toBase,
@@ -24942,8 +24993,8 @@ function checkEarlyExits(fromBase, toBase, dryRun) {
24942
24993
  return null;
24943
24994
  }
24944
24995
  function planAndExecuteEntry(name, fromBase, toBase, perRepoSet, dryRun) {
24945
- const source = join21(fromBase, name);
24946
- const target = join21(toBase, name);
24996
+ const source = join22(fromBase, name);
24997
+ const target = join22(toBase, name);
24947
24998
  if (!perRepoSet.has(name)) {
24948
24999
  return { subdir: name, status: "skipped-not-per-repo", source, target: "", itemsCopied: 0 };
24949
25000
  }
@@ -24951,7 +25002,7 @@ function planAndExecuteEntry(name, fromBase, toBase, perRepoSet, dryRun) {
24951
25002
  if (items === 0) {
24952
25003
  return { subdir: name, status: "skipped-empty", source, target, itemsCopied: 0 };
24953
25004
  }
24954
- if (existsSync23(target) && readdirSync3(target).length > 0) {
25005
+ if (existsSync24(target) && readdirSync3(target).length > 0) {
24955
25006
  return { subdir: name, status: "skipped-exists", source, target, itemsCopied: 0 };
24956
25007
  }
24957
25008
  if (!dryRun) {
@@ -24963,7 +25014,7 @@ function planAndExecuteEntry(name, fromBase, toBase, perRepoSet, dryRun) {
24963
25014
  function resolveDefaultTarget(cwd) {
24964
25015
  const repoRoot = findRepoRoot(cwd);
24965
25016
  if (repoRoot === null) return null;
24966
- return join21(repoRoot, ".nexus-agents");
25017
+ return join22(repoRoot, ".nexus-agents");
24967
25018
  }
24968
25019
  function formatMigrationResult(result) {
24969
25020
  if (!result.success) {
@@ -25005,7 +25056,7 @@ async function handleMigrateCommand(args) {
25005
25056
  }
25006
25057
 
25007
25058
  // src/cli/first-run-hint.ts
25008
- import { existsSync as existsSync24, mkdirSync as mkdirSync8, writeFileSync as writeFileSync9 } from "fs";
25059
+ import { existsSync as existsSync25, mkdirSync as mkdirSync8, writeFileSync as writeFileSync9 } from "fs";
25009
25060
  import { dirname as dirname14 } from "path";
25010
25061
  var HINT_SUPPRESSED_COMMANDS = /* @__PURE__ */ new Set(["version", "help", "setup"]);
25011
25062
  function firstRunMarkerPath() {
@@ -25016,7 +25067,7 @@ function maybeShowFirstRunHint(command) {
25016
25067
  if (!process.stderr.isTTY) return;
25017
25068
  const marker = firstRunMarkerPath();
25018
25069
  try {
25019
- if (existsSync24(marker)) return;
25070
+ if (existsSync25(marker)) return;
25020
25071
  } catch {
25021
25072
  }
25022
25073
  process.stderr.write(