nexus-agents 2.97.1 → 2.99.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 (118) hide show
  1. package/dist/{child-mcp-config-WVPJIK2J.js → child-mcp-config-OWCVT4NN.js} +2 -2
  2. package/dist/{chunk-D3OT7TOA.js → chunk-3XSEFOI5.js} +3 -3
  3. package/dist/{chunk-KKVH3PDK.js → chunk-5T6S6HFY.js} +4 -4
  4. package/dist/{chunk-T5TYWM5S.js → chunk-5WY3N7VX.js} +2 -2
  5. package/dist/{chunk-6IN4MKDA.js → chunk-6IHEDRKI.js} +7 -7
  6. package/dist/{chunk-674NONPG.js → chunk-A7XUXJWL.js} +2 -2
  7. package/dist/{chunk-HZGHPBTV.js → chunk-AH67WRET.js} +2 -2
  8. package/dist/{chunk-T7IIFT3B.js → chunk-AN3IGMJT.js} +10 -10
  9. package/dist/{chunk-WXDWDGVL.js → chunk-BKUKBOGV.js} +2 -2
  10. package/dist/{chunk-GERVGPTF.js → chunk-BO6QUVXI.js} +2 -2
  11. package/dist/{chunk-OSHCOBDK.js → chunk-CJODZY4U.js} +2 -2
  12. package/dist/{chunk-HIWO2WWP.js → chunk-DLNCQO6L.js} +2 -2
  13. package/dist/{chunk-ML4IF3PS.js → chunk-EM7NUGMG.js} +22 -5
  14. package/dist/{chunk-ML4IF3PS.js.map → chunk-EM7NUGMG.js.map} +1 -1
  15. package/dist/{chunk-N5656LE3.js → chunk-HBZUXO4Q.js} +2 -2
  16. package/dist/{chunk-NTBVUWU4.js → chunk-HFNHJZOK.js} +2 -2
  17. package/dist/{chunk-EY7LL4F4.js → chunk-J545CO5K.js} +2 -2
  18. package/dist/{chunk-65LE457J.js → chunk-J76KHBF3.js} +2 -2
  19. package/dist/{chunk-5LGAPYX7.js → chunk-JFFI54DW.js} +12 -2
  20. package/dist/{chunk-5LGAPYX7.js.map → chunk-JFFI54DW.js.map} +1 -1
  21. package/dist/{chunk-JTQLV374.js → chunk-M774MKHE.js} +3 -2
  22. package/dist/chunk-M774MKHE.js.map +1 -0
  23. package/dist/{chunk-FB6AQ2SF.js → chunk-O6EXYWHP.js} +428 -212
  24. package/dist/chunk-O6EXYWHP.js.map +1 -0
  25. package/dist/{chunk-SAUBPHQ7.js → chunk-Q3IFS7UA.js} +4 -4
  26. package/dist/{chunk-HWCMNFIS.js → chunk-SU7RKNIZ.js} +3 -3
  27. package/dist/{chunk-7BLBXITB.js → chunk-T5KDRR2I.js} +3 -3
  28. package/dist/{chunk-FDTIRCSL.js → chunk-UWQ3BALH.js} +2 -2
  29. package/dist/{chunk-E43RUPLP.js → chunk-V2C2MC6H.js} +3 -3
  30. package/dist/{chunk-SZNNT2DH.js → chunk-VD4TXDMR.js} +2 -2
  31. package/dist/{chunk-5F7LHFAU.js → chunk-VPH2M5H7.js} +7 -7
  32. package/dist/{chunk-Y4TTYQUK.js → chunk-WHFCVKAV.js} +5 -5
  33. package/dist/{chunk-JX6VL7JF.js → chunk-WYDK6V7W.js} +3 -3
  34. package/dist/{chunk-UNOOL6EN.js → chunk-XO25FS24.js} +2 -2
  35. package/dist/{chunk-P2BKWVKF.js → chunk-YREYQSYA.js} +3 -3
  36. package/dist/chunk-YREYQSYA.js.map +1 -0
  37. package/dist/{chunk-IHKPGTF3.js → chunk-ZOBDTJNG.js} +4 -4
  38. package/dist/{chunk-OKRTOMKX.js → chunk-ZPCDZMLK.js} +2 -2
  39. package/dist/{cli-circuit-breaker-STKW4DTL.js → cli-circuit-breaker-IPNNNVIT.js} +4 -4
  40. package/dist/cli.js +41 -39
  41. package/dist/cli.js.map +1 -1
  42. package/dist/{composite-router-POFAM7T4.js → composite-router-JJNQIHX6.js} +2 -2
  43. package/dist/{consensus-vote-F6HORSU6.js → consensus-vote-5D7FNWYM.js} +13 -13
  44. package/dist/{context-retriever-H22L3WFV.js → context-retriever-2MOJ446P.js} +6 -6
  45. package/dist/{doctor-deep-HGAC6N5Y.js → doctor-deep-D6E5IWXB.js} +3 -3
  46. package/dist/{expert-bridge-IAQPOJAQ.js → expert-bridge-EOVHUCJ4.js} +4 -4
  47. package/dist/{factory-ZIZYUDKH.js → factory-NJRJAZKK.js} +5 -5
  48. package/dist/{factory-P2SQS7UM.js → factory-UCRIJY6Y.js} +5 -5
  49. package/dist/{improvement-review-G2HAMGZP.js → improvement-review-IWV2BMR7.js} +4 -4
  50. package/dist/index.js +28 -28
  51. package/dist/{init-opencode-RHCYZDZW.js → init-opencode-PB4G7RJR.js} +5 -5
  52. package/dist/{issue-triage-VVNQIQW5.js → issue-triage-EMYHDDTR.js} +5 -5
  53. package/dist/{pr-reviewer-helpers-UN7RDPDN.js → pr-reviewer-helpers-DZQDKMMF.js} +4 -4
  54. package/dist/{registry-command-OVRRKYHO.js → registry-command-AX7Z4K4W.js} +47 -243
  55. package/dist/registry-command-AX7Z4K4W.js.map +1 -0
  56. package/dist/{repo-security-plan-X74TBYOV.js → repo-security-plan-N2GNWFER.js} +3 -3
  57. package/dist/{research-helpers-synthesize-OSP6FGNV.js → research-helpers-synthesize-OKNU245Z.js} +3 -3
  58. package/dist/{routing-memory-5T5QJF47.js → routing-memory-3QXWGWB5.js} +2 -2
  59. package/dist/{session-memory-X7CJ6X4A.js → session-memory-AK4AJXGI.js} +3 -3
  60. package/dist/{setup-command-7KP3O3P3.js → setup-command-PHTP43V7.js} +11 -11
  61. package/dist/{setup-config-YVIKUNOB.js → setup-config-ANAFKZGE.js} +3 -3
  62. package/dist/{setup-custom-api-FLV4SELI.js → setup-custom-api-FUA2ZUDD.js} +4 -4
  63. package/dist/{tool-memory-QNEAKRKV.js → tool-memory-ZP3EMUP5.js} +5 -5
  64. package/dist/{weather-report-SUVIXWKI.js → weather-report-54XDO6GO.js} +2 -2
  65. package/package.json +1 -1
  66. package/dist/chunk-FB6AQ2SF.js.map +0 -1
  67. package/dist/chunk-JTQLV374.js.map +0 -1
  68. package/dist/chunk-P2BKWVKF.js.map +0 -1
  69. package/dist/registry-command-OVRRKYHO.js.map +0 -1
  70. /package/dist/{child-mcp-config-WVPJIK2J.js.map → child-mcp-config-OWCVT4NN.js.map} +0 -0
  71. /package/dist/{chunk-D3OT7TOA.js.map → chunk-3XSEFOI5.js.map} +0 -0
  72. /package/dist/{chunk-KKVH3PDK.js.map → chunk-5T6S6HFY.js.map} +0 -0
  73. /package/dist/{chunk-T5TYWM5S.js.map → chunk-5WY3N7VX.js.map} +0 -0
  74. /package/dist/{chunk-6IN4MKDA.js.map → chunk-6IHEDRKI.js.map} +0 -0
  75. /package/dist/{chunk-674NONPG.js.map → chunk-A7XUXJWL.js.map} +0 -0
  76. /package/dist/{chunk-HZGHPBTV.js.map → chunk-AH67WRET.js.map} +0 -0
  77. /package/dist/{chunk-T7IIFT3B.js.map → chunk-AN3IGMJT.js.map} +0 -0
  78. /package/dist/{chunk-WXDWDGVL.js.map → chunk-BKUKBOGV.js.map} +0 -0
  79. /package/dist/{chunk-GERVGPTF.js.map → chunk-BO6QUVXI.js.map} +0 -0
  80. /package/dist/{chunk-OSHCOBDK.js.map → chunk-CJODZY4U.js.map} +0 -0
  81. /package/dist/{chunk-HIWO2WWP.js.map → chunk-DLNCQO6L.js.map} +0 -0
  82. /package/dist/{chunk-N5656LE3.js.map → chunk-HBZUXO4Q.js.map} +0 -0
  83. /package/dist/{chunk-NTBVUWU4.js.map → chunk-HFNHJZOK.js.map} +0 -0
  84. /package/dist/{chunk-EY7LL4F4.js.map → chunk-J545CO5K.js.map} +0 -0
  85. /package/dist/{chunk-65LE457J.js.map → chunk-J76KHBF3.js.map} +0 -0
  86. /package/dist/{chunk-SAUBPHQ7.js.map → chunk-Q3IFS7UA.js.map} +0 -0
  87. /package/dist/{chunk-HWCMNFIS.js.map → chunk-SU7RKNIZ.js.map} +0 -0
  88. /package/dist/{chunk-7BLBXITB.js.map → chunk-T5KDRR2I.js.map} +0 -0
  89. /package/dist/{chunk-FDTIRCSL.js.map → chunk-UWQ3BALH.js.map} +0 -0
  90. /package/dist/{chunk-E43RUPLP.js.map → chunk-V2C2MC6H.js.map} +0 -0
  91. /package/dist/{chunk-SZNNT2DH.js.map → chunk-VD4TXDMR.js.map} +0 -0
  92. /package/dist/{chunk-5F7LHFAU.js.map → chunk-VPH2M5H7.js.map} +0 -0
  93. /package/dist/{chunk-Y4TTYQUK.js.map → chunk-WHFCVKAV.js.map} +0 -0
  94. /package/dist/{chunk-JX6VL7JF.js.map → chunk-WYDK6V7W.js.map} +0 -0
  95. /package/dist/{chunk-UNOOL6EN.js.map → chunk-XO25FS24.js.map} +0 -0
  96. /package/dist/{chunk-IHKPGTF3.js.map → chunk-ZOBDTJNG.js.map} +0 -0
  97. /package/dist/{chunk-OKRTOMKX.js.map → chunk-ZPCDZMLK.js.map} +0 -0
  98. /package/dist/{cli-circuit-breaker-STKW4DTL.js.map → cli-circuit-breaker-IPNNNVIT.js.map} +0 -0
  99. /package/dist/{composite-router-POFAM7T4.js.map → composite-router-JJNQIHX6.js.map} +0 -0
  100. /package/dist/{consensus-vote-F6HORSU6.js.map → consensus-vote-5D7FNWYM.js.map} +0 -0
  101. /package/dist/{context-retriever-H22L3WFV.js.map → context-retriever-2MOJ446P.js.map} +0 -0
  102. /package/dist/{doctor-deep-HGAC6N5Y.js.map → doctor-deep-D6E5IWXB.js.map} +0 -0
  103. /package/dist/{expert-bridge-IAQPOJAQ.js.map → expert-bridge-EOVHUCJ4.js.map} +0 -0
  104. /package/dist/{factory-P2SQS7UM.js.map → factory-NJRJAZKK.js.map} +0 -0
  105. /package/dist/{factory-ZIZYUDKH.js.map → factory-UCRIJY6Y.js.map} +0 -0
  106. /package/dist/{improvement-review-G2HAMGZP.js.map → improvement-review-IWV2BMR7.js.map} +0 -0
  107. /package/dist/{init-opencode-RHCYZDZW.js.map → init-opencode-PB4G7RJR.js.map} +0 -0
  108. /package/dist/{issue-triage-VVNQIQW5.js.map → issue-triage-EMYHDDTR.js.map} +0 -0
  109. /package/dist/{pr-reviewer-helpers-UN7RDPDN.js.map → pr-reviewer-helpers-DZQDKMMF.js.map} +0 -0
  110. /package/dist/{repo-security-plan-X74TBYOV.js.map → repo-security-plan-N2GNWFER.js.map} +0 -0
  111. /package/dist/{research-helpers-synthesize-OSP6FGNV.js.map → research-helpers-synthesize-OKNU245Z.js.map} +0 -0
  112. /package/dist/{routing-memory-5T5QJF47.js.map → routing-memory-3QXWGWB5.js.map} +0 -0
  113. /package/dist/{session-memory-X7CJ6X4A.js.map → session-memory-AK4AJXGI.js.map} +0 -0
  114. /package/dist/{setup-command-7KP3O3P3.js.map → setup-command-PHTP43V7.js.map} +0 -0
  115. /package/dist/{setup-config-YVIKUNOB.js.map → setup-config-ANAFKZGE.js.map} +0 -0
  116. /package/dist/{setup-custom-api-FLV4SELI.js.map → setup-custom-api-FUA2ZUDD.js.map} +0 -0
  117. /package/dist/{tool-memory-QNEAKRKV.js.map → tool-memory-ZP3EMUP5.js.map} +0 -0
  118. /package/dist/{weather-report-SUVIXWKI.js.map → weather-report-54XDO6GO.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createLogger
3
- } from "./chunk-JTQLV374.js";
3
+ } from "./chunk-M774MKHE.js";
4
4
  import "./chunk-CH7QIDHQ.js";
5
5
  import "./chunk-PR4QN5HX.js";
6
6
 
@@ -59,4 +59,4 @@ export {
59
59
  generateMcpConfig,
60
60
  getDefaultAllowedTools
61
61
  };
62
- //# sourceMappingURL=child-mcp-config-WVPJIK2J.js.map
62
+ //# sourceMappingURL=child-mcp-config-OWCVT4NN.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  getToolMemory
3
- } from "./chunk-IHKPGTF3.js";
3
+ } from "./chunk-ZOBDTJNG.js";
4
4
  import {
5
5
  CLI_NAMES,
6
6
  StrategyDistiller,
7
7
  createLogger,
8
8
  getOutcomeStore,
9
9
  registerPersistentDistillerFactory
10
- } from "./chunk-JTQLV374.js";
10
+ } from "./chunk-M774MKHE.js";
11
11
  import {
12
12
  ensureLearningDir,
13
13
  getRulesFile
@@ -273,4 +273,4 @@ export {
273
273
  inferTaskCategory,
274
274
  summarizeContextForPrompt
275
275
  };
276
- //# sourceMappingURL=chunk-D3OT7TOA.js.map
276
+ //# sourceMappingURL=chunk-3XSEFOI5.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-EY7LL4F4.js";
4
+ } from "./chunk-J545CO5K.js";
5
5
  import {
6
6
  ROLE_DEFAULT_TRUST,
7
7
  ReputationCache,
@@ -11,13 +11,13 @@ import {
11
11
  gateWithReputation,
12
12
  resolveReputationGatingMode,
13
13
  sanitizeInput
14
- } from "./chunk-SZNNT2DH.js";
14
+ } from "./chunk-VD4TXDMR.js";
15
15
  import {
16
16
  createLogger,
17
17
  err,
18
18
  getTimeProvider,
19
19
  ok
20
- } from "./chunk-JTQLV374.js";
20
+ } from "./chunk-M774MKHE.js";
21
21
 
22
22
  // src/security/trust-classifier.ts
23
23
  function mapAuthorAssociation(association) {
@@ -1368,4 +1368,4 @@ export {
1368
1368
  IssueTriage,
1369
1369
  createIssueTriage
1370
1370
  };
1371
- //# sourceMappingURL=chunk-KKVH3PDK.js.map
1371
+ //# sourceMappingURL=chunk-5T6S6HFY.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getErrorMessage,
9
9
  ok,
10
10
  parseBoolEnv
11
- } from "./chunk-JTQLV374.js";
11
+ } from "./chunk-M774MKHE.js";
12
12
 
13
13
  // src/cli/research-helpers-synthesize.ts
14
14
  import { z } from "zod";
@@ -1015,4 +1015,4 @@ export {
1015
1015
  AttributedInsightSchema,
1016
1016
  synthesizeResearch
1017
1017
  };
1018
- //# sourceMappingURL=chunk-T5TYWM5S.js.map
1018
+ //# sourceMappingURL=chunk-5WY3N7VX.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  resolveCliSlot
3
- } from "./chunk-N5656LE3.js";
3
+ } from "./chunk-HBZUXO4Q.js";
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider,
7
7
  isRateLimitText
8
- } from "./chunk-JTQLV374.js";
8
+ } from "./chunk-M774MKHE.js";
9
9
 
10
10
  // src/pipeline/expert-bridge.ts
11
11
  function resolveCliFromModelString(model) {
@@ -21,7 +21,7 @@ async function getMcpConfigPath() {
21
21
  if (cachedMcpConfigPath !== null) return cachedMcpConfigPath;
22
22
  mcpConfigInitPromise ??= (async () => {
23
23
  try {
24
- const { generateMcpConfig } = await import("./child-mcp-config-WVPJIK2J.js");
24
+ const { generateMcpConfig } = await import("./child-mcp-config-OWCVT4NN.js");
25
25
  const config = await generateMcpConfig();
26
26
  cachedMcpConfigPath = config.configPath;
27
27
  cachedMcpConfigCleanup = config.cleanup;
@@ -71,8 +71,8 @@ var routerInitPromise = null;
71
71
  async function getRouter() {
72
72
  if (cachedRouter !== null) return cachedRouter;
73
73
  routerInitPromise ??= (async () => {
74
- const { createAllAdapters } = await import("./factory-ZIZYUDKH.js");
75
- const { createCompositeRouter } = await import("./composite-router-POFAM7T4.js");
74
+ const { createAllAdapters } = await import("./factory-NJRJAZKK.js");
75
+ const { createCompositeRouter } = await import("./composite-router-JJNQIHX6.js");
76
76
  const adapters = createAllAdapters();
77
77
  if (adapters.size === 0) {
78
78
  routerInitPromise = null;
@@ -80,7 +80,7 @@ async function getRouter() {
80
80
  }
81
81
  cachedRouter = adaptCompositeRouter(createCompositeRouter(adapters));
82
82
  try {
83
- const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-STKW4DTL.js");
83
+ const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-IPNNNVIT.js");
84
84
  cachedCircuitBreaker = createCliCircuitBreakerIntegration([...adapters.values()]);
85
85
  } catch (error) {
86
86
  const msg = error instanceof Error ? error.message : String(error);
@@ -185,4 +185,4 @@ export {
185
185
  shutdownExpertBridge,
186
186
  executeExpert
187
187
  };
188
- //# sourceMappingURL=chunk-6IN4MKDA.js.map
188
+ //# sourceMappingURL=chunk-6IHEDRKI.js.map
@@ -5,7 +5,7 @@ import {
5
5
  getErrorMessage,
6
6
  getTimeProvider,
7
7
  ok
8
- } from "./chunk-JTQLV374.js";
8
+ } from "./chunk-M774MKHE.js";
9
9
 
10
10
  // src/cli-adapters/circuit-breaker-types.ts
11
11
  var CircuitErrorCode = {
@@ -354,4 +354,4 @@ export {
354
354
  CircuitBreakerRegistry,
355
355
  mapCliErrorToCategory
356
356
  };
357
- //# sourceMappingURL=chunk-674NONPG.js.map
357
+ //# sourceMappingURL=chunk-A7XUXJWL.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getRandomProvider,
3
3
  getTimeProvider
4
- } from "./chunk-JTQLV374.js";
4
+ } from "./chunk-M774MKHE.js";
5
5
 
6
6
  // src/utils/id-utils.ts
7
7
  import { randomUUID } from "crypto";
@@ -24,4 +24,4 @@ export {
24
24
  generateHyphenId,
25
25
  generateUUID
26
26
  };
27
- //# sourceMappingURL=chunk-HZGHPBTV.js.map
27
+ //# sourceMappingURL=chunk-AH67WRET.js.map
@@ -4,12 +4,12 @@ import {
4
4
  createStream,
5
5
  requireApiKey,
6
6
  validateApiKeyPresence
7
- } from "./chunk-GERVGPTF.js";
7
+ } from "./chunk-BO6QUVXI.js";
8
8
  import {
9
9
  CUSTOM_API_BASE_URL_ENV,
10
10
  PROVIDER_ENV_KEYS,
11
11
  validateCustomApiBaseUrl
12
- } from "./chunk-65LE457J.js";
12
+ } from "./chunk-J76KHBF3.js";
13
13
  import {
14
14
  NOOP_NOTIFIER,
15
15
  createMcpNotifier,
@@ -21,16 +21,16 @@ import {
21
21
  toolSuccess,
22
22
  withProgressHeartbeat,
23
23
  wrapToolWithTimeout
24
- } from "./chunk-5LGAPYX7.js";
24
+ } from "./chunk-JFFI54DW.js";
25
25
  import {
26
26
  getToolMemory
27
- } from "./chunk-IHKPGTF3.js";
27
+ } from "./chunk-ZOBDTJNG.js";
28
28
  import {
29
29
  getDefaultAvailableModelsCache
30
- } from "./chunk-OSHCOBDK.js";
30
+ } from "./chunk-CJODZY4U.js";
31
31
  import {
32
32
  CUSTOM_API_DEFAULT_MODEL
33
- } from "./chunk-UNOOL6EN.js";
33
+ } from "./chunk-XO25FS24.js";
34
34
  import {
35
35
  createCliAdapter,
36
36
  createCliDetectionCache,
@@ -39,7 +39,7 @@ import {
39
39
  isCliAvailable,
40
40
  sanitizeOutput,
41
41
  withTimeout
42
- } from "./chunk-ML4IF3PS.js";
42
+ } from "./chunk-EM7NUGMG.js";
43
43
  import {
44
44
  AgentError,
45
45
  CLI_NAMES,
@@ -78,7 +78,7 @@ import {
78
78
  resolveCliAlias,
79
79
  resolveVoteTimeout,
80
80
  toRateLimitError
81
- } from "./chunk-JTQLV374.js";
81
+ } from "./chunk-M774MKHE.js";
82
82
  import {
83
83
  ensureLearningDir,
84
84
  getOutcomesFile,
@@ -6996,7 +6996,7 @@ async function processVotesWithCascade(engineVotes, opts) {
6996
6996
  var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
6997
6997
  async function runContrarianCheck(proposal, log) {
6998
6998
  try {
6999
- const { executeExpert } = await import("./expert-bridge-IAQPOJAQ.js");
6999
+ const { executeExpert } = await import("./expert-bridge-EOVHUCJ4.js");
7000
7000
  const prompt = [
7001
7001
  "You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
7002
7002
  "Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
@@ -7487,4 +7487,4 @@ export {
7487
7487
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
7488
7488
  registerConsensusVoteTool
7489
7489
  };
7490
- //# sourceMappingURL=chunk-T7IIFT3B.js.map
7490
+ //# sourceMappingURL=chunk-AN3IGMJT.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider
7
- } from "./chunk-JTQLV374.js";
7
+ } from "./chunk-M774MKHE.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-WXDWDGVL.js.map
724
+ //# sourceMappingURL=chunk-BKUKBOGV.js.map
@@ -10,7 +10,7 @@ import {
10
10
  getTokenEstimator,
11
11
  isRateLimitLikeError,
12
12
  ok
13
- } from "./chunk-JTQLV374.js";
13
+ } from "./chunk-M774MKHE.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-GERVGPTF.js.map
710
+ //# sourceMappingURL=chunk-BO6QUVXI.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createLogger
3
- } from "./chunk-JTQLV374.js";
3
+ } from "./chunk-M774MKHE.js";
4
4
 
5
5
  // src/config/available-models-cache.ts
6
6
  var logger = createLogger({ component: "available-models-cache" });
@@ -150,4 +150,4 @@ export {
150
150
  getDefaultAvailableModelsCache,
151
151
  setDefaultAvailableModelsCache
152
152
  };
153
- //# sourceMappingURL=chunk-OSHCOBDK.js.map
153
+ //# sourceMappingURL=chunk-CJODZY4U.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getErrorMessage,
5
5
  getTimeProvider,
6
6
  ok
7
- } from "./chunk-JTQLV374.js";
7
+ } from "./chunk-M774MKHE.js";
8
8
 
9
9
  // src/context/session-memory.ts
10
10
  import * as fs from "fs";
@@ -351,4 +351,4 @@ export {
351
351
  SessionMemory,
352
352
  createSessionMemory
353
353
  };
354
- //# sourceMappingURL=chunk-HIWO2WWP.js.map
354
+ //# sourceMappingURL=chunk-DLNCQO6L.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CliCircuitBreaker,
3
3
  DEFAULT_CIRCUIT_BREAKER_CONFIG
4
- } from "./chunk-674NONPG.js";
4
+ } from "./chunk-A7XUXJWL.js";
5
5
  import {
6
6
  generateHyphenId
7
- } from "./chunk-HZGHPBTV.js";
7
+ } from "./chunk-AH67WRET.js";
8
8
  import {
9
9
  CLI_SUBPROCESS_TIMEOUTS,
10
10
  CLI_TIMEOUTS,
@@ -27,7 +27,7 @@ import {
27
27
  getTimeProvider,
28
28
  isRateLimitText,
29
29
  ok
30
- } from "./chunk-JTQLV374.js";
30
+ } from "./chunk-M774MKHE.js";
31
31
 
32
32
  // src/cli-adapters/subprocess-adapter.ts
33
33
  import { spawn } from "child_process";
@@ -2153,6 +2153,21 @@ var DEFAULT_CODEX_MCP_OPTIONS = {
2153
2153
  trackUsage: true,
2154
2154
  onProgress: void 0
2155
2155
  };
2156
+ var NEXUS_MCP_DEPTH_ENV = "NEXUS_MCP_DEPTH";
2157
+ var MAX_CODEX_MCP_SPAWN_DEPTH = 0;
2158
+ function readMcpDepth(env = process.env) {
2159
+ const raw = Number.parseInt(env[NEXUS_MCP_DEPTH_ENV] ?? "0", 10);
2160
+ return Number.isFinite(raw) && raw > 0 ? raw : 0;
2161
+ }
2162
+ function nextCodexMcpDepthOrThrow(env = process.env) {
2163
+ const depth = readMcpDepth(env);
2164
+ if (depth > MAX_CODEX_MCP_SPAWN_DEPTH) {
2165
+ throw new Error(
2166
+ `Refusing to spawn 'codex mcp-server': already nested inside a nexus-spawned codex MCP context (${NEXUS_MCP_DEPTH_ENV}=${String(depth)}). This breaks the recursive codex\u2194nexus MCP spawn loop (#3350). If you intentionally configured codex to launch nexus-agents as an MCP server, remove that '[mcp_servers.nexus-agents]' entry from ~/.codex/config.toml.`
2167
+ );
2168
+ }
2169
+ return String(depth + 1);
2170
+ }
2156
2171
  function extractTextFromContent(content) {
2157
2172
  if (content === void 0 || content.length === 0) {
2158
2173
  return null;
@@ -2217,11 +2232,13 @@ var CodexMcpAdapter = class extends BaseCliAdapter {
2217
2232
  }
2218
2233
  this.initCapacityTracker();
2219
2234
  this.logger.debug("Initializing Codex MCP connection");
2235
+ const childDepth = nextCodexMcpDepthOrThrow();
2220
2236
  try {
2221
2237
  this.mcpTransport = new StdioClientTransport({
2222
2238
  command: "codex",
2223
2239
  args: ["mcp-server"],
2224
- stderr: "pipe"
2240
+ stderr: "pipe",
2241
+ env: { [NEXUS_MCP_DEPTH_ENV]: childDepth }
2225
2242
  });
2226
2243
  this.client = new Client({ name: "nexus-agents", version: "2.0.0" }, { capabilities: {} });
2227
2244
  await this.client.connect(this.mcpTransport);
@@ -3291,4 +3308,4 @@ export {
3291
3308
  isCliAvailable,
3292
3309
  getAvailableClis
3293
3310
  };
3294
- //# sourceMappingURL=chunk-ML4IF3PS.js.map
3311
+ //# sourceMappingURL=chunk-EM7NUGMG.js.map