nexus-agents 2.166.2 → 2.167.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 (127) hide show
  1. package/dist/{child-mcp-config-LQ4IKFSN.js → child-mcp-config-X4YLQKGK.js} +2 -2
  2. package/dist/{chunk-6PYVTJZF.js → chunk-2NU774CB.js} +2 -2
  3. package/dist/{chunk-TFYQRAWT.js → chunk-7K5LSUEU.js} +3 -3
  4. package/dist/{chunk-33X5V4PL.js → chunk-7USEQLMS.js} +2 -2
  5. package/dist/{chunk-LUP26FMZ.js → chunk-7YD3TRDX.js} +4 -4
  6. package/dist/{chunk-RBN4WXOA.js → chunk-BB7KSLNA.js} +2 -2
  7. package/dist/{chunk-FKOWIKR4.js → chunk-COIZLMGV.js} +3 -3
  8. package/dist/{chunk-PZ3BB3PO.js → chunk-CURHM4TH.js} +3 -3
  9. package/dist/{chunk-2UMMVKUW.js → chunk-DFCC7FN4.js} +3 -3
  10. package/dist/{chunk-MYNI3CYT.js → chunk-GGYQTV2Y.js} +4 -4
  11. package/dist/{chunk-U43BUJSN.js → chunk-GRWHPG72.js} +7 -7
  12. package/dist/{chunk-RXI5ONP7.js → chunk-GVNY4ZB6.js} +2 -2
  13. package/dist/{chunk-NXJJZEUO.js → chunk-IFSIKGHI.js} +2 -2
  14. package/dist/{chunk-ZNY7MM2J.js → chunk-JKUX73VD.js} +3 -3
  15. package/dist/{chunk-MQUSJVER.js → chunk-KM3YEIEN.js} +4 -4
  16. package/dist/{chunk-SF2AK3JB.js → chunk-O6VL6LA4.js} +2 -2
  17. package/dist/{chunk-YPPYRLDF.js → chunk-PC4Y4VPX.js} +2 -2
  18. package/dist/{chunk-YIEMNZUD.js → chunk-QLZDOEO4.js} +7 -7
  19. package/dist/{chunk-LQ2ABFLI.js → chunk-QPSYBHK6.js} +2 -2
  20. package/dist/{chunk-NBPA4PQD.js → chunk-QV52AXTF.js} +2 -2
  21. package/dist/chunk-QZUG667L.js +56 -0
  22. package/dist/chunk-QZUG667L.js.map +1 -0
  23. package/dist/{chunk-CVLVWHXG.js → chunk-RKIPSMCN.js} +5 -5
  24. package/dist/{chunk-IXZXG2MY.js → chunk-S6HCREYY.js} +12 -62
  25. package/dist/chunk-S6HCREYY.js.map +1 -0
  26. package/dist/{chunk-TZNJCTNQ.js → chunk-SRNAXDOT.js} +2 -2
  27. package/dist/{chunk-3SMFRAX5.js → chunk-STMW5BSR.js} +3 -3
  28. package/dist/{chunk-55NRU7SV.js → chunk-TGAVZ2ZL.js} +8 -8
  29. package/dist/{chunk-JV64QX3Y.js → chunk-UNIDAVVR.js} +2 -2
  30. package/dist/{chunk-MLURL552.js → chunk-USBKBGT3.js} +5 -5
  31. package/dist/{chunk-LKSG75LC.js → chunk-VGEVDF44.js} +4 -4
  32. package/dist/{chunk-YOFRUVPJ.js → chunk-VNVGGM73.js} +2 -2
  33. package/dist/{chunk-2255SARF.js → chunk-XUMLVCFL.js} +2 -2
  34. package/dist/{chunk-JBZMUKT4.js → chunk-ZAPCPHGZ.js} +2 -2
  35. package/dist/{chunk-DUUMMELV.js → chunk-ZIC6ZZFU.js} +3 -3
  36. package/dist/{chunk-3GYRM7D6.js → chunk-ZSUN7BHE.js} +465 -14
  37. package/dist/chunk-ZSUN7BHE.js.map +1 -0
  38. package/dist/{chunk-3HVF4BG4.js → chunk-ZTTUXPBQ.js} +2 -2
  39. package/dist/{chunk-RLRAUL43.js → chunk-ZTWKSN5K.js} +133 -59
  40. package/dist/{chunk-RLRAUL43.js.map → chunk-ZTWKSN5K.js.map} +1 -1
  41. package/dist/{cli-circuit-breaker-5IGBBD7R.js → cli-circuit-breaker-2AAHSCHR.js} +4 -4
  42. package/dist/cli.js +42 -41
  43. package/dist/cli.js.map +1 -1
  44. package/dist/{composite-router-62KI56W6.js → composite-router-WOVGICBS.js} +2 -2
  45. package/dist/{consensus-vote-M4ZELBV4.js → consensus-vote-322S65GQ.js} +16 -15
  46. package/dist/{context-retriever-5UJC5KDZ.js → context-retriever-YMJY6YBJ.js} +11 -8
  47. package/dist/{doctor-deep-7OR5MYMI.js → doctor-deep-DALT3OXC.js} +3 -3
  48. package/dist/{expert-bridge-BNMCDENK.js → expert-bridge-WNV3ST2T.js} +4 -4
  49. package/dist/factory-33HQYVCK.js +23 -0
  50. package/dist/{factory-QLW773DP.js → factory-TLSTFONW.js} +5 -5
  51. package/dist/{improvement-review-KDM6OL25.js → improvement-review-2W6LKP74.js} +5 -5
  52. package/dist/index.d.ts +2 -0
  53. package/dist/index.js +38 -312
  54. package/dist/index.js.map +1 -1
  55. package/dist/{init-opencode-FXKABSGS.js → init-opencode-I4FY4OGP.js} +6 -6
  56. package/dist/{issue-triage-OVX4VSUN.js → issue-triage-CVMVZ3IV.js} +6 -6
  57. package/dist/{pr-reviewer-helpers-VGIBNZBX.js → pr-reviewer-helpers-SAMOVLNJ.js} +4 -4
  58. package/dist/{registry-command-CGMRLZQ2.js → registry-command-5D2DJT53.js} +2 -2
  59. package/dist/{repo-security-plan-TBCMGL5Z.js → repo-security-plan-F7V5SHAQ.js} +3 -3
  60. package/dist/{research-helpers-synthesize-76ZZYWJ5.js → research-helpers-synthesize-F4PV4B4B.js} +4 -4
  61. package/dist/{routing-memory-PZ4LTLXJ.js → routing-memory-G6YBK4WI.js} +2 -2
  62. package/dist/{session-memory-C55R7LGY.js → session-memory-DAJHLPOY.js} +3 -3
  63. package/dist/{setup-command-AVQWHV5L.js → setup-command-S4AOTSY5.js} +12 -11
  64. package/dist/{setup-config-SMRMMT6Z.js → setup-config-HKUWFV5N.js} +3 -3
  65. package/dist/{setup-custom-api-42JXTJHU.js → setup-custom-api-XRUPWEPF.js} +3 -3
  66. package/dist/{tool-memory-LCDNVPFI.js → tool-memory-XJ5VRMNQ.js} +5 -5
  67. package/dist/{unified-registry-XEXWGKV5.js → unified-registry-ETKPTZBU.js} +10 -9
  68. package/dist/{weather-report-DPADAXFN.js → weather-report-TWBLIHPZ.js} +2 -2
  69. package/package.json +1 -1
  70. package/dist/chunk-3GYRM7D6.js.map +0 -1
  71. package/dist/chunk-IXZXG2MY.js.map +0 -1
  72. package/dist/factory-77GX5DG4.js +0 -22
  73. /package/dist/{child-mcp-config-LQ4IKFSN.js.map → child-mcp-config-X4YLQKGK.js.map} +0 -0
  74. /package/dist/{chunk-6PYVTJZF.js.map → chunk-2NU774CB.js.map} +0 -0
  75. /package/dist/{chunk-TFYQRAWT.js.map → chunk-7K5LSUEU.js.map} +0 -0
  76. /package/dist/{chunk-33X5V4PL.js.map → chunk-7USEQLMS.js.map} +0 -0
  77. /package/dist/{chunk-LUP26FMZ.js.map → chunk-7YD3TRDX.js.map} +0 -0
  78. /package/dist/{chunk-RBN4WXOA.js.map → chunk-BB7KSLNA.js.map} +0 -0
  79. /package/dist/{chunk-FKOWIKR4.js.map → chunk-COIZLMGV.js.map} +0 -0
  80. /package/dist/{chunk-PZ3BB3PO.js.map → chunk-CURHM4TH.js.map} +0 -0
  81. /package/dist/{chunk-2UMMVKUW.js.map → chunk-DFCC7FN4.js.map} +0 -0
  82. /package/dist/{chunk-MYNI3CYT.js.map → chunk-GGYQTV2Y.js.map} +0 -0
  83. /package/dist/{chunk-U43BUJSN.js.map → chunk-GRWHPG72.js.map} +0 -0
  84. /package/dist/{chunk-RXI5ONP7.js.map → chunk-GVNY4ZB6.js.map} +0 -0
  85. /package/dist/{chunk-NXJJZEUO.js.map → chunk-IFSIKGHI.js.map} +0 -0
  86. /package/dist/{chunk-ZNY7MM2J.js.map → chunk-JKUX73VD.js.map} +0 -0
  87. /package/dist/{chunk-MQUSJVER.js.map → chunk-KM3YEIEN.js.map} +0 -0
  88. /package/dist/{chunk-SF2AK3JB.js.map → chunk-O6VL6LA4.js.map} +0 -0
  89. /package/dist/{chunk-YPPYRLDF.js.map → chunk-PC4Y4VPX.js.map} +0 -0
  90. /package/dist/{chunk-YIEMNZUD.js.map → chunk-QLZDOEO4.js.map} +0 -0
  91. /package/dist/{chunk-LQ2ABFLI.js.map → chunk-QPSYBHK6.js.map} +0 -0
  92. /package/dist/{chunk-NBPA4PQD.js.map → chunk-QV52AXTF.js.map} +0 -0
  93. /package/dist/{chunk-CVLVWHXG.js.map → chunk-RKIPSMCN.js.map} +0 -0
  94. /package/dist/{chunk-TZNJCTNQ.js.map → chunk-SRNAXDOT.js.map} +0 -0
  95. /package/dist/{chunk-3SMFRAX5.js.map → chunk-STMW5BSR.js.map} +0 -0
  96. /package/dist/{chunk-55NRU7SV.js.map → chunk-TGAVZ2ZL.js.map} +0 -0
  97. /package/dist/{chunk-JV64QX3Y.js.map → chunk-UNIDAVVR.js.map} +0 -0
  98. /package/dist/{chunk-MLURL552.js.map → chunk-USBKBGT3.js.map} +0 -0
  99. /package/dist/{chunk-LKSG75LC.js.map → chunk-VGEVDF44.js.map} +0 -0
  100. /package/dist/{chunk-YOFRUVPJ.js.map → chunk-VNVGGM73.js.map} +0 -0
  101. /package/dist/{chunk-2255SARF.js.map → chunk-XUMLVCFL.js.map} +0 -0
  102. /package/dist/{chunk-JBZMUKT4.js.map → chunk-ZAPCPHGZ.js.map} +0 -0
  103. /package/dist/{chunk-DUUMMELV.js.map → chunk-ZIC6ZZFU.js.map} +0 -0
  104. /package/dist/{chunk-3HVF4BG4.js.map → chunk-ZTTUXPBQ.js.map} +0 -0
  105. /package/dist/{cli-circuit-breaker-5IGBBD7R.js.map → cli-circuit-breaker-2AAHSCHR.js.map} +0 -0
  106. /package/dist/{composite-router-62KI56W6.js.map → composite-router-WOVGICBS.js.map} +0 -0
  107. /package/dist/{consensus-vote-M4ZELBV4.js.map → consensus-vote-322S65GQ.js.map} +0 -0
  108. /package/dist/{context-retriever-5UJC5KDZ.js.map → context-retriever-YMJY6YBJ.js.map} +0 -0
  109. /package/dist/{doctor-deep-7OR5MYMI.js.map → doctor-deep-DALT3OXC.js.map} +0 -0
  110. /package/dist/{expert-bridge-BNMCDENK.js.map → expert-bridge-WNV3ST2T.js.map} +0 -0
  111. /package/dist/{factory-77GX5DG4.js.map → factory-33HQYVCK.js.map} +0 -0
  112. /package/dist/{factory-QLW773DP.js.map → factory-TLSTFONW.js.map} +0 -0
  113. /package/dist/{improvement-review-KDM6OL25.js.map → improvement-review-2W6LKP74.js.map} +0 -0
  114. /package/dist/{init-opencode-FXKABSGS.js.map → init-opencode-I4FY4OGP.js.map} +0 -0
  115. /package/dist/{issue-triage-OVX4VSUN.js.map → issue-triage-CVMVZ3IV.js.map} +0 -0
  116. /package/dist/{pr-reviewer-helpers-VGIBNZBX.js.map → pr-reviewer-helpers-SAMOVLNJ.js.map} +0 -0
  117. /package/dist/{registry-command-CGMRLZQ2.js.map → registry-command-5D2DJT53.js.map} +0 -0
  118. /package/dist/{repo-security-plan-TBCMGL5Z.js.map → repo-security-plan-F7V5SHAQ.js.map} +0 -0
  119. /package/dist/{research-helpers-synthesize-76ZZYWJ5.js.map → research-helpers-synthesize-F4PV4B4B.js.map} +0 -0
  120. /package/dist/{routing-memory-PZ4LTLXJ.js.map → routing-memory-G6YBK4WI.js.map} +0 -0
  121. /package/dist/{session-memory-C55R7LGY.js.map → session-memory-DAJHLPOY.js.map} +0 -0
  122. /package/dist/{setup-command-AVQWHV5L.js.map → setup-command-S4AOTSY5.js.map} +0 -0
  123. /package/dist/{setup-config-SMRMMT6Z.js.map → setup-config-HKUWFV5N.js.map} +0 -0
  124. /package/dist/{setup-custom-api-42JXTJHU.js.map → setup-custom-api-XRUPWEPF.js.map} +0 -0
  125. /package/dist/{tool-memory-LCDNVPFI.js.map → tool-memory-XJ5VRMNQ.js.map} +0 -0
  126. /package/dist/{unified-registry-XEXWGKV5.js.map → unified-registry-ETKPTZBU.js.map} +0 -0
  127. /package/dist/{weather-report-DPADAXFN.js.map → weather-report-TWBLIHPZ.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createLogger
3
- } from "./chunk-PZ3BB3PO.js";
3
+ } from "./chunk-CURHM4TH.js";
4
4
  import "./chunk-AXTD4TFK.js";
5
5
  import "./chunk-DHVMSIT5.js";
6
6
  import "./chunk-ZPWHCABL.js";
@@ -60,4 +60,4 @@ export {
60
60
  generateMcpConfig,
61
61
  getDefaultAllowedTools
62
62
  };
63
- //# sourceMappingURL=child-mcp-config-LQ4IKFSN.js.map
63
+ //# sourceMappingURL=child-mcp-config-X4YLQKGK.js.map
@@ -15,7 +15,7 @@ import {
15
15
  createLogger,
16
16
  err,
17
17
  ok
18
- } from "./chunk-PZ3BB3PO.js";
18
+ } from "./chunk-CURHM4TH.js";
19
19
 
20
20
  // src/adapters/sdk/types.ts
21
21
  var PROVIDER_ENV_KEYS = {
@@ -396,4 +396,4 @@ export {
396
396
  CUSTOM_API_DEFAULT_MODEL,
397
397
  DEFAULTS
398
398
  };
399
- //# sourceMappingURL=chunk-6PYVTJZF.js.map
399
+ //# sourceMappingURL=chunk-2NU774CB.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  loadPapersRegistry
3
- } from "./chunk-YPPYRLDF.js";
3
+ } from "./chunk-PC4Y4VPX.js";
4
4
  import {
5
5
  getErrorMessage
6
- } from "./chunk-PZ3BB3PO.js";
6
+ } from "./chunk-CURHM4TH.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-TFYQRAWT.js.map
879
+ //# sourceMappingURL=chunk-7K5LSUEU.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getRandomProvider,
3
3
  getTimeProvider
4
- } from "./chunk-PZ3BB3PO.js";
4
+ } from "./chunk-CURHM4TH.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-33X5V4PL.js.map
27
+ //# sourceMappingURL=chunk-7USEQLMS.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-RBN4WXOA.js";
4
+ } from "./chunk-BB7KSLNA.js";
5
5
  import {
6
6
  resolveToken
7
- } from "./chunk-JV64QX3Y.js";
7
+ } from "./chunk-UNIDAVVR.js";
8
8
  import {
9
9
  err,
10
10
  ok
11
- } from "./chunk-PZ3BB3PO.js";
11
+ } from "./chunk-CURHM4TH.js";
12
12
 
13
13
  // src/scm/factory.ts
14
14
  async function createScmProvider(config) {
@@ -41,4 +41,4 @@ export {
41
41
  createScmProvider,
42
42
  createGitHubProvider
43
43
  };
44
- //# sourceMappingURL=chunk-LUP26FMZ.js.map
44
+ //# sourceMappingURL=chunk-7YD3TRDX.js.map
@@ -4,7 +4,7 @@ import {
4
4
  err,
5
5
  getErrorMessage,
6
6
  ok
7
- } from "./chunk-PZ3BB3PO.js";
7
+ } from "./chunk-CURHM4TH.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-RBN4WXOA.js.map
266
+ //# sourceMappingURL=chunk-BB7KSLNA.js.map
@@ -2,14 +2,14 @@ import {
2
2
  CircuitBreakerRegistry,
3
3
  CircuitError,
4
4
  mapCliErrorToCategory
5
- } from "./chunk-RXI5ONP7.js";
5
+ } from "./chunk-GVNY4ZB6.js";
6
6
  import {
7
7
  createLogger,
8
8
  err,
9
9
  getFallbackChainForCategory,
10
10
  getTimeProvider,
11
11
  ok
12
- } from "./chunk-PZ3BB3PO.js";
12
+ } from "./chunk-CURHM4TH.js";
13
13
 
14
14
  // src/cli-adapters/cli-circuit-breaker.ts
15
15
  var CATEGORY_TO_FALLBACK = {
@@ -152,4 +152,4 @@ export {
152
152
  CliCircuitBreakerIntegration,
153
153
  createCliCircuitBreakerIntegration
154
154
  };
155
- //# sourceMappingURL=chunk-FKOWIKR4.js.map
155
+ //# sourceMappingURL=chunk-COIZLMGV.js.map
@@ -2619,7 +2619,7 @@ function setDefaultRegistry(registry) {
2619
2619
  }
2620
2620
  async function reloadDefaultRegistry() {
2621
2621
  globalRegistry = buildDefaultRegistry();
2622
- const { resetGlobalRegistry } = await import("./unified-registry-XEXWGKV5.js");
2622
+ const { resetGlobalRegistry } = await import("./unified-registry-ETKPTZBU.js");
2623
2623
  resetGlobalRegistry();
2624
2624
  return globalRegistry;
2625
2625
  }
@@ -14357,7 +14357,7 @@ var CompositeRouter = class _CompositeRouter {
14357
14357
  */
14358
14358
  async consultUnifiedContext(task) {
14359
14359
  try {
14360
- const { getContextForTask, inferTaskCategory } = await import("./context-retriever-5UJC5KDZ.js");
14360
+ const { getContextForTask, inferTaskCategory } = await import("./context-retriever-YMJY6YBJ.js");
14361
14361
  const ctx = await getContextForTask({
14362
14362
  task: task.content,
14363
14363
  category: inferTaskCategory(task.content),
@@ -15946,4 +15946,4 @@ export {
15946
15946
  AgentCapability,
15947
15947
  OrchestratorError
15948
15948
  };
15949
- //# sourceMappingURL=chunk-PZ3BB3PO.js.map
15949
+ //# sourceMappingURL=chunk-CURHM4TH.js.map
@@ -4,14 +4,14 @@ import {
4
4
  planOptionalParams,
5
5
  requireApiKey,
6
6
  validateApiKeyPresence
7
- } from "./chunk-NXJJZEUO.js";
7
+ } from "./chunk-IFSIKGHI.js";
8
8
  import {
9
9
  ModelCapability,
10
10
  err,
11
11
  getCliModelName,
12
12
  getTokenEstimator,
13
13
  ok
14
- } from "./chunk-PZ3BB3PO.js";
14
+ } from "./chunk-CURHM4TH.js";
15
15
 
16
16
  // src/adapters/openai-types.ts
17
17
  var OPENAI_MODELS = {
@@ -609,4 +609,4 @@ export {
609
609
  OpenAIAdapter,
610
610
  createOpenAIAdapter
611
611
  };
612
- //# sourceMappingURL=chunk-2UMMVKUW.js.map
612
+ //# sourceMappingURL=chunk-DFCC7FN4.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createAutoAdapter
3
- } from "./chunk-IXZXG2MY.js";
3
+ } from "./chunk-S6HCREYY.js";
4
4
  import {
5
5
  mapModelErrorToCategory
6
- } from "./chunk-RXI5ONP7.js";
6
+ } from "./chunk-GVNY4ZB6.js";
7
7
  import {
8
8
  CLI_NAMES,
9
9
  CircularBuffer,
@@ -24,7 +24,7 @@ import {
24
24
  ok,
25
25
  recordRateLimitEvent,
26
26
  toRateLimitError
27
- } from "./chunk-PZ3BB3PO.js";
27
+ } from "./chunk-CURHM4TH.js";
28
28
 
29
29
  // src/agents/collaboration/event-bus-helpers.ts
30
30
  import { randomUUID } from "crypto";
@@ -1041,4 +1041,4 @@ export {
1041
1041
  getGlobalRegistry,
1042
1042
  resetGlobalRegistry
1043
1043
  };
1044
- //# sourceMappingURL=chunk-MYNI3CYT.js.map
1044
+ //# sourceMappingURL=chunk-GGYQTV2Y.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  resolveCliSlot
3
- } from "./chunk-3HVF4BG4.js";
3
+ } from "./chunk-ZTTUXPBQ.js";
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider,
7
7
  isRateLimitText
8
- } from "./chunk-PZ3BB3PO.js";
8
+ } from "./chunk-CURHM4TH.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-LQ4IKFSN.js");
24
+ const { generateMcpConfig } = await import("./child-mcp-config-X4YLQKGK.js");
25
25
  const config = await generateMcpConfig();
26
26
  cachedMcpConfigPath = config.configPath;
27
27
  cachedMcpConfigCleanup = config.cleanup;
@@ -93,8 +93,8 @@ var routerInitPromise = null;
93
93
  async function getRouter() {
94
94
  if (cachedRouter !== null) return cachedRouter;
95
95
  routerInitPromise ??= (async () => {
96
- const { createAllAdapters } = await import("./factory-77GX5DG4.js");
97
- const { createCompositeRouter } = await import("./composite-router-62KI56W6.js");
96
+ const { createAllAdapters } = await import("./factory-33HQYVCK.js");
97
+ const { createCompositeRouter } = await import("./composite-router-WOVGICBS.js");
98
98
  const adapters = createAllAdapters();
99
99
  if (adapters.size === 0) {
100
100
  routerInitPromise = null;
@@ -102,7 +102,7 @@ async function getRouter() {
102
102
  }
103
103
  cachedRouter = adaptCompositeRouter(createCompositeRouter(adapters));
104
104
  try {
105
- const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-5IGBBD7R.js");
105
+ const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-2AAHSCHR.js");
106
106
  cachedCircuitBreaker = createCliCircuitBreakerIntegration([...adapters.values()]);
107
107
  } catch (error) {
108
108
  const msg = error instanceof Error ? error.message : String(error);
@@ -213,4 +213,4 @@ export {
213
213
  tokenSplitFromUsage,
214
214
  executeExpert
215
215
  };
216
- //# sourceMappingURL=chunk-U43BUJSN.js.map
216
+ //# sourceMappingURL=chunk-GRWHPG72.js.map
@@ -5,7 +5,7 @@ import {
5
5
  getErrorMessage,
6
6
  getTimeProvider,
7
7
  ok
8
- } from "./chunk-PZ3BB3PO.js";
8
+ } from "./chunk-CURHM4TH.js";
9
9
 
10
10
  // src/cli-adapters/circuit-breaker-types.ts
11
11
  var CircuitErrorCode = {
@@ -375,4 +375,4 @@ export {
375
375
  mapCliErrorToCategory,
376
376
  mapModelErrorToCategory
377
377
  };
378
- //# sourceMappingURL=chunk-RXI5ONP7.js.map
378
+ //# sourceMappingURL=chunk-GVNY4ZB6.js.map
@@ -11,7 +11,7 @@ import {
11
11
  isRateLimitLikeError,
12
12
  lookupInTreeCapability,
13
13
  ok
14
- } from "./chunk-PZ3BB3PO.js";
14
+ } from "./chunk-CURHM4TH.js";
15
15
 
16
16
  // src/config/model-parameter-support.ts
17
17
  function parseClaudeMajorMinor(bareId) {
@@ -828,4 +828,4 @@ export {
828
828
  DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
829
829
  collectStream
830
830
  };
831
- //# sourceMappingURL=chunk-NXJJZEUO.js.map
831
+ //# sourceMappingURL=chunk-IFSIKGHI.js.map
@@ -9,11 +9,11 @@ import {
9
9
  gateWithReputation,
10
10
  resolveReputationGatingMode,
11
11
  sanitizeInput
12
- } from "./chunk-TZNJCTNQ.js";
12
+ } from "./chunk-SRNAXDOT.js";
13
13
  import {
14
14
  createLogger,
15
15
  getTimeProvider
16
- } from "./chunk-PZ3BB3PO.js";
16
+ } from "./chunk-CURHM4TH.js";
17
17
 
18
18
  // src/dogfooding/pr-reviewer-helpers.ts
19
19
  import { randomUUID } from "crypto";
@@ -288,4 +288,4 @@ export {
288
288
  formatReviewComment,
289
289
  createFailedReview
290
290
  };
291
- //# sourceMappingURL=chunk-ZNY7MM2J.js.map
291
+ //# sourceMappingURL=chunk-JKUX73VD.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-6T3EPABN.js";
6
6
  import {
7
7
  SessionMemory
8
- } from "./chunk-LQ2ABFLI.js";
8
+ } from "./chunk-QPSYBHK6.js";
9
9
  import {
10
10
  StatsOnlyAdapter,
11
11
  ensureSharedMemoryRegistry
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-KSQSWEFH.js";
16
16
  import {
17
17
  generateId
18
- } from "./chunk-33X5V4PL.js";
18
+ } from "./chunk-7USEQLMS.js";
19
19
  import {
20
20
  ErrorCode,
21
21
  NexusError,
@@ -28,7 +28,7 @@ import {
28
28
  getTimeProvider,
29
29
  ok,
30
30
  setSharedMobiMemDbPathResolver
31
- } from "./chunk-PZ3BB3PO.js";
31
+ } from "./chunk-CURHM4TH.js";
32
32
  import {
33
33
  nexusDataPath
34
34
  } from "./chunk-DHVMSIT5.js";
@@ -5552,4 +5552,4 @@ export {
5552
5552
  reinitializeMemoryBackends,
5553
5553
  ToolMemoryManager
5554
5554
  };
5555
- //# sourceMappingURL=chunk-MQUSJVER.js.map
5555
+ //# sourceMappingURL=chunk-KM3YEIEN.js.map
@@ -2,7 +2,7 @@ import {
2
2
  TASK_CATEGORIES,
3
3
  getAdaptiveBonus,
4
4
  getOutcomeStore
5
- } from "./chunk-PZ3BB3PO.js";
5
+ } from "./chunk-CURHM4TH.js";
6
6
 
7
7
  // src/cli/doctor-deep.ts
8
8
  var CLI_NAMES = ["claude", "gemini", "codex", "opencode"];
@@ -106,4 +106,4 @@ export {
106
106
  runDeepDiagnostics,
107
107
  formatDeepDiagnostics
108
108
  };
109
- //# sourceMappingURL=chunk-SF2AK3JB.js.map
109
+ //# sourceMappingURL=chunk-O6VL6LA4.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getErrorMessage,
9
9
  ok,
10
10
  parseBoolEnv
11
- } from "./chunk-PZ3BB3PO.js";
11
+ } from "./chunk-CURHM4TH.js";
12
12
 
13
13
  // src/cli/research-helpers-io.ts
14
14
  import * as fs2 from "fs/promises";
@@ -146,4 +146,4 @@ export {
146
146
  loadPapersRegistry,
147
147
  savePapersRegistry
148
148
  };
149
- //# sourceMappingURL=chunk-YPPYRLDF.js.map
149
+ //# sourceMappingURL=chunk-PC4Y4VPX.js.map
@@ -7,10 +7,10 @@ import {
7
7
  import {
8
8
  createAllAdapters,
9
9
  probeCli
10
- } from "./chunk-IXZXG2MY.js";
10
+ } from "./chunk-S6HCREYY.js";
11
11
  import {
12
12
  DEFAULTS
13
- } from "./chunk-6PYVTJZF.js";
13
+ } from "./chunk-2NU774CB.js";
14
14
  import {
15
15
  CliNameSchema,
16
16
  DEFAULT_CAPABILITIES,
@@ -27,7 +27,7 @@ import {
27
27
  ok,
28
28
  symbols,
29
29
  writeLine
30
- } from "./chunk-PZ3BB3PO.js";
30
+ } from "./chunk-CURHM4TH.js";
31
31
  import {
32
32
  getLearningDir,
33
33
  getOutcomesFile,
@@ -43,7 +43,7 @@ import {
43
43
  } from "./chunk-DHVMSIT5.js";
44
44
 
45
45
  // src/version.ts
46
- var VERSION = true ? "2.166.2" : "dev";
46
+ var VERSION = true ? "2.167.0" : "dev";
47
47
 
48
48
  // src/config/schemas-core.ts
49
49
  import { z } from "zod";
@@ -2159,7 +2159,7 @@ async function runDoctorFix(result) {
2159
2159
  writeLine2("\u2500".repeat(40));
2160
2160
  let fixCount = 0;
2161
2161
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2162
- const { runSetup } = await import("./setup-command-AVQWHV5L.js");
2162
+ const { runSetup } = await import("./setup-command-S4AOTSY5.js");
2163
2163
  const setupResult = runSetup({
2164
2164
  skipMcp: true,
2165
2165
  skipRules: true,
@@ -2173,7 +2173,7 @@ async function runDoctorFix(result) {
2173
2173
  }
2174
2174
  }
2175
2175
  if (!result.configFile.found) {
2176
- const { runConfigInitSync } = await import("./setup-config-SMRMMT6Z.js");
2176
+ const { runConfigInitSync } = await import("./setup-config-HKUWFV5N.js");
2177
2177
  const configResult = runConfigInitSync(process.cwd(), false, false);
2178
2178
  if (configResult.success && configResult.created) {
2179
2179
  writeLine2(`\u2713 Generated config: ${configResult.path}`);
@@ -2272,4 +2272,4 @@ export {
2272
2272
  startStdioServer,
2273
2273
  closeServer
2274
2274
  };
2275
- //# sourceMappingURL=chunk-YIEMNZUD.js.map
2275
+ //# sourceMappingURL=chunk-QLZDOEO4.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getErrorMessage,
5
5
  getTimeProvider,
6
6
  ok
7
- } from "./chunk-PZ3BB3PO.js";
7
+ } from "./chunk-CURHM4TH.js";
8
8
 
9
9
  // src/context/session-memory.ts
10
10
  import * as fs from "fs";
@@ -352,4 +352,4 @@ export {
352
352
  SessionMemory,
353
353
  createSessionMemory
354
354
  };
355
- //# sourceMappingURL=chunk-LQ2ABFLI.js.map
355
+ //# sourceMappingURL=chunk-QPSYBHK6.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTimeProvider
3
- } from "./chunk-PZ3BB3PO.js";
3
+ } from "./chunk-CURHM4TH.js";
4
4
 
5
5
  // src/security/audit-trail.ts
6
6
  var MAX_EVENTS = 1e4;
@@ -205,4 +205,4 @@ export {
205
205
  createGraphAuditBridge,
206
206
  createAuditTrail
207
207
  };
208
- //# sourceMappingURL=chunk-NBPA4PQD.js.map
208
+ //# sourceMappingURL=chunk-QV52AXTF.js.map
@@ -0,0 +1,56 @@
1
+ // src/context/token-counter-helpers.ts
2
+ import "@anthropic-ai/sdk";
3
+ function generateCacheKey(content, provider, model) {
4
+ const contentStr = typeof content === "string" ? content : JSON.stringify(content);
5
+ return `${provider}:${model ?? "default"}:${contentStr}`;
6
+ }
7
+ function messagesToAnthropicFormat(messages) {
8
+ return messages.filter((m) => m.role !== "system").map((m) => {
9
+ const role = m.role === "user" ? "user" : "assistant";
10
+ if (typeof m.content === "string") {
11
+ return { role, content: m.content };
12
+ }
13
+ const content = m.content.map((block) => {
14
+ if (block.type === "text") {
15
+ return { type: "text", text: block.text };
16
+ }
17
+ if (block.type === "tool_use") {
18
+ return {
19
+ type: "tool_use",
20
+ id: block.id,
21
+ name: block.name,
22
+ input: block.input
23
+ };
24
+ }
25
+ if (block.type === "tool_result") {
26
+ return {
27
+ type: "tool_result",
28
+ tool_use_id: block.tool_use_id,
29
+ content: block.content
30
+ };
31
+ }
32
+ return {
33
+ type: "image",
34
+ source: block.source
35
+ };
36
+ });
37
+ return { role, content };
38
+ });
39
+ }
40
+ function extractSystemPrompt(messages) {
41
+ const systemMsg = messages.find((m) => m.role === "system");
42
+ if (systemMsg === void 0) {
43
+ return void 0;
44
+ }
45
+ if (typeof systemMsg.content === "string") {
46
+ return systemMsg.content;
47
+ }
48
+ return systemMsg.content.filter((b) => b.type === "text").map((b) => b.text).join("\n");
49
+ }
50
+
51
+ export {
52
+ generateCacheKey,
53
+ messagesToAnthropicFormat,
54
+ extractSystemPrompt
55
+ };
56
+ //# sourceMappingURL=chunk-QZUG667L.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/context/token-counter-helpers.ts"],"sourcesContent":["/**\n * nexus-agents/context - Token Counter Helpers\n *\n * Internal helper functions for token counting.\n *\n * @module context/token-counter-helpers\n */\n\nimport Anthropic from '@anthropic-ai/sdk';\nimport type { Message } from '../core/index.js';\nimport type { TokenCounterProvider } from './token-counter-types.js';\n\n/**\n * Generates a cache key from content.\n */\nexport function generateCacheKey(\n content: string | Message[],\n provider: TokenCounterProvider | 'estimate',\n model?: string\n): string {\n const contentStr = typeof content === 'string' ? content : JSON.stringify(content);\n return `${provider}:${model ?? 'default'}:${contentStr}`;\n}\n\n/**\n * Converts Message[] to Anthropic MessageParam[] format.\n */\nexport function messagesToAnthropicFormat(messages: Message[]): Anthropic.MessageParam[] {\n return messages\n .filter((m) => m.role !== 'system')\n .map((m) => {\n const role = m.role === 'user' ? 'user' : 'assistant';\n if (typeof m.content === 'string') {\n return { role, content: m.content };\n }\n // Map content blocks\n const content = m.content.map((block) => {\n if (block.type === 'text') {\n return { type: 'text' as const, text: block.text };\n }\n if (block.type === 'tool_use') {\n return {\n type: 'tool_use' as const,\n id: block.id,\n name: block.name,\n input: block.input,\n };\n }\n if (block.type === 'tool_result') {\n return {\n type: 'tool_result' as const,\n tool_use_id: block.tool_use_id,\n content: block.content,\n };\n }\n // Image type - handle source type properly\n return {\n type: 'image' as const,\n source: block.source as Anthropic.ImageBlockParam['source'],\n };\n });\n return { role, content };\n });\n}\n\n/**\n * Extracts system prompt from messages if present.\n */\nexport function extractSystemPrompt(messages: Message[]): string | undefined {\n const systemMsg = messages.find((m) => m.role === 'system');\n if (systemMsg === undefined) {\n return undefined;\n }\n if (typeof systemMsg.content === 'string') {\n return systemMsg.content;\n }\n return systemMsg.content\n .filter((b): b is { type: 'text'; text: string } => b.type === 'text')\n .map((b) => b.text)\n .join('\\n');\n}\n"],"mappings":";AAQA,OAAsB;AAOf,SAAS,iBACd,SACA,UACA,OACQ;AACR,QAAM,aAAa,OAAO,YAAY,WAAW,UAAU,KAAK,UAAU,OAAO;AACjF,SAAO,GAAG,QAAQ,IAAI,SAAS,SAAS,IAAI,UAAU;AACxD;AAKO,SAAS,0BAA0B,UAA+C;AACvF,SAAO,SACJ,OAAO,CAAC,MAAM,EAAE,SAAS,QAAQ,EACjC,IAAI,CAAC,MAAM;AACV,UAAM,OAAO,EAAE,SAAS,SAAS,SAAS;AAC1C,QAAI,OAAO,EAAE,YAAY,UAAU;AACjC,aAAO,EAAE,MAAM,SAAS,EAAE,QAAQ;AAAA,IACpC;AAEA,UAAM,UAAU,EAAE,QAAQ,IAAI,CAAC,UAAU;AACvC,UAAI,MAAM,SAAS,QAAQ;AACzB,eAAO,EAAE,MAAM,QAAiB,MAAM,MAAM,KAAK;AAAA,MACnD;AACA,UAAI,MAAM,SAAS,YAAY;AAC7B,eAAO;AAAA,UACL,MAAM;AAAA,UACN,IAAI,MAAM;AAAA,UACV,MAAM,MAAM;AAAA,UACZ,OAAO,MAAM;AAAA,QACf;AAAA,MACF;AACA,UAAI,MAAM,SAAS,eAAe;AAChC,eAAO;AAAA,UACL,MAAM;AAAA,UACN,aAAa,MAAM;AAAA,UACnB,SAAS,MAAM;AAAA,QACjB;AAAA,MACF;AAEA,aAAO;AAAA,QACL,MAAM;AAAA,QACN,QAAQ,MAAM;AAAA,MAChB;AAAA,IACF,CAAC;AACD,WAAO,EAAE,MAAM,QAAQ;AAAA,EACzB,CAAC;AACL;AAKO,SAAS,oBAAoB,UAAyC;AAC3E,QAAM,YAAY,SAAS,KAAK,CAAC,MAAM,EAAE,SAAS,QAAQ;AAC1D,MAAI,cAAc,QAAW;AAC3B,WAAO;AAAA,EACT;AACA,MAAI,OAAO,UAAU,YAAY,UAAU;AACzC,WAAO,UAAU;AAAA,EACnB;AACA,SAAO,UAAU,QACd,OAAO,CAAC,MAA2C,EAAE,SAAS,MAAM,EACpE,IAAI,CAAC,MAAM,EAAE,IAAI,EACjB,KAAK,IAAI;AACd;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-RBN4WXOA.js";
4
+ } from "./chunk-BB7KSLNA.js";
5
5
  import {
6
6
  ROLE_DEFAULT_TRUST,
7
7
  ReputationCache,
@@ -11,17 +11,17 @@ import {
11
11
  gateWithReputation,
12
12
  resolveReputationGatingMode,
13
13
  sanitizeInput
14
- } from "./chunk-TZNJCTNQ.js";
14
+ } from "./chunk-SRNAXDOT.js";
15
15
  import {
16
16
  emitPolicyEvent
17
- } from "./chunk-NBPA4PQD.js";
17
+ } from "./chunk-QV52AXTF.js";
18
18
  import {
19
19
  CLI_SUBPROCESS_TIMEOUTS,
20
20
  createLogger,
21
21
  err,
22
22
  getTimeProvider,
23
23
  ok
24
- } from "./chunk-PZ3BB3PO.js";
24
+ } from "./chunk-CURHM4TH.js";
25
25
 
26
26
  // src/security/trust-classifier.ts
27
27
  function mapAuthorAssociation(association) {
@@ -1211,4 +1211,4 @@ export {
1211
1211
  IssueTriage,
1212
1212
  createIssueTriage
1213
1213
  };
1214
- //# sourceMappingURL=chunk-CVLVWHXG.js.map
1214
+ //# sourceMappingURL=chunk-RKIPSMCN.js.map