nexus-agents 8.18.0 → 8.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/{ast-rule-runner-AJAWZQNS.js → ast-rule-runner-27XDHRZH.js} +3 -3
  2. package/dist/{child-mcp-config-JQCVNB3Y.js → child-mcp-config-ONSFGNNH.js} +2 -2
  3. package/dist/{chunk-N3TMUOHG.js → chunk-2TTPWF25.js} +3 -3
  4. package/dist/{chunk-A62DB47B.js → chunk-3P5H74AV.js} +8 -8
  5. package/dist/{chunk-JYMFL4M6.js → chunk-3YC6CEI5.js} +2 -2
  6. package/dist/{chunk-LMJ7BKIL.js → chunk-4XNZKWKQ.js} +2 -2
  7. package/dist/{chunk-5OTOOVOF.js → chunk-4YMUPCRS.js} +5 -5
  8. package/dist/{chunk-6T3EPABN.js → chunk-7LP6VJRP.js} +6 -1
  9. package/dist/{chunk-6T3EPABN.js.map → chunk-7LP6VJRP.js.map} +1 -1
  10. package/dist/{chunk-2LQAHGNZ.js → chunk-C7CSLODO.js} +7 -7
  11. package/dist/{chunk-KQRF4ZHX.js → chunk-CFAN2FPY.js} +2 -2
  12. package/dist/{chunk-V2XWRKIJ.js → chunk-CQ4CFPLB.js} +8 -8
  13. package/dist/{chunk-KUKQ7UHD.js → chunk-DLWCNFEX.js} +4 -4
  14. package/dist/{chunk-ETMIOP3R.js → chunk-GNB4GPLQ.js} +2 -2
  15. package/dist/{chunk-KJFX7JUP.js → chunk-HN7EDIAH.js} +6 -6
  16. package/dist/{chunk-R3QNEXOU.js → chunk-ICKUT5LH.js} +2 -2
  17. package/dist/{chunk-XVAXLGKZ.js → chunk-J5QYHZW2.js} +9 -9
  18. package/dist/{chunk-GWQE5MBQ.js → chunk-K7QRRVKW.js} +2 -2
  19. package/dist/{chunk-KUR6TV4G.js → chunk-KJN5RWXY.js} +68 -7
  20. package/dist/chunk-KJN5RWXY.js.map +1 -0
  21. package/dist/{chunk-CQK5SIEX.js → chunk-KY3U2XEW.js} +3 -3
  22. package/dist/{chunk-NBXYA5O6.js → chunk-LZ6WZJRH.js} +3 -3
  23. package/dist/{chunk-6ZU3FUAX.js → chunk-LZU4O6RT.js} +2 -2
  24. package/dist/{chunk-46V3G76B.js → chunk-P7FSB7X2.js} +4 -4
  25. package/dist/{chunk-JXHRZRKU.js → chunk-Q225YMZK.js} +4 -4
  26. package/dist/{chunk-PBVNGI67.js → chunk-Q2M77IPR.js} +2 -2
  27. package/dist/{chunk-D7WQNTAK.js → chunk-Q76C5PG7.js} +2 -2
  28. package/dist/{chunk-JEOQY42Z.js → chunk-QFI5WT2Y.js} +5 -5
  29. package/dist/{chunk-IJH2U2QL.js → chunk-RIIWLQYM.js} +2 -2
  30. package/dist/{chunk-QBU2RG7U.js → chunk-SLLW6DVZ.js} +2 -2
  31. package/dist/{chunk-I4EHDJTI.js → chunk-TCTKOFNL.js} +2 -2
  32. package/dist/{chunk-ZB7XPHFZ.js → chunk-UCIRVMOZ.js} +2 -2
  33. package/dist/chunk-VAED5NBQ.js +7 -0
  34. package/dist/{chunk-DBGIP6GK.js → chunk-VLNPDWIW.js} +2 -2
  35. package/dist/{chunk-ZXLF3NDV.js → chunk-WGYETY6P.js} +2 -2
  36. package/dist/{chunk-4U555SVX.js → chunk-WQPPT2JF.js} +9 -7
  37. package/dist/chunk-WQPPT2JF.js.map +1 -0
  38. package/dist/{chunk-EPVPVG25.js → chunk-XYJFJP4Q.js} +36 -36
  39. package/dist/{chunk-R7V4C5UL.js → chunk-ZECI6UI2.js} +2 -2
  40. package/dist/{chunk-2T2MSN7B.js → chunk-ZUK5BG3Q.js} +2 -2
  41. package/dist/{cli-circuit-breaker-2LQZLFVP.js → cli-circuit-breaker-FOPLEQK6.js} +3 -3
  42. package/dist/cli.js +90 -104
  43. package/dist/cli.js.map +1 -1
  44. package/dist/{composite-router-XNVULYDV.js → composite-router-OSASGOMV.js} +2 -2
  45. package/dist/{consensus-vote-2WLWZOVR.js → consensus-vote-FJVB6TK6.js} +18 -18
  46. package/dist/{context-retriever-GWAJG6XT.js → context-retriever-7VPUIRVT.js} +9 -9
  47. package/dist/{doctor-deep-ZATGXGNC.js → doctor-deep-ZBNAR3QG.js} +3 -3
  48. package/dist/{doctor-live-L264NFJO.js → doctor-live-VIHVWQGF.js} +9 -9
  49. package/dist/{expert-bridge-KCQ457YZ.js → expert-bridge-ESJHWQ2Z.js} +4 -4
  50. package/dist/{factory-S2SVFA6W.js → factory-HFHYJ4P6.js} +9 -9
  51. package/dist/{factory-FFKHIV6Q.js → factory-HUUB4OWA.js} +5 -5
  52. package/dist/{improvement-review-ASVQR6VY.js → improvement-review-DG4Y3J43.js} +6 -6
  53. package/dist/index.js +33 -33
  54. package/dist/{init-opencode-CDW4DAWF.js → init-opencode-VZKXSO72.js} +6 -6
  55. package/dist/issue-triage-66FWR2FL.js +17 -0
  56. package/dist/{pr-reviewer-helpers-PMRGV7IL.js → pr-reviewer-helpers-BINKSJSV.js} +8 -4
  57. package/dist/{registry-command-4Y7RJH47.js → registry-command-GCO7IPDP.js} +2 -2
  58. package/dist/{repo-security-plan-XZ6YBLUE.js → repo-security-plan-QTGNCDI7.js} +3 -3
  59. package/dist/{research-helpers-synthesize-OKCOMCE2.js → research-helpers-synthesize-KYDHWP7C.js} +4 -4
  60. package/dist/{routing-memory-QUA5ORUA.js → routing-memory-VMCHRNSE.js} +2 -2
  61. package/dist/{session-memory-XKHKWRP3.js → session-memory-MX2G4K2A.js} +3 -3
  62. package/dist/{setup-config-NMVR2OBN.js → setup-config-QKYFUR3C.js} +3 -3
  63. package/dist/{setup-custom-api-VV3FT66F.js → setup-custom-api-5CDXK3RY.js} +4 -4
  64. package/dist/setup-data-dir-ZA4QHCIO.js +29 -0
  65. package/dist/{tool-memory-MCIIYDQR.js → tool-memory-WUZ66O4K.js} +6 -6
  66. package/dist/{unified-registry-LPSJ2KMV.js → unified-registry-EZ3QUCIO.js} +10 -10
  67. package/dist/{weather-report-KHFJ756C.js → weather-report-MUUYKM7C.js} +2 -2
  68. package/package.json +1 -1
  69. package/dist/chunk-4U555SVX.js.map +0 -1
  70. package/dist/chunk-KUR6TV4G.js.map +0 -1
  71. package/dist/chunk-WIG2XETC.js +0 -7
  72. package/dist/issue-triage-4RX3UV2B.js +0 -17
  73. package/dist/setup-data-dir-OYYLDXTP.js +0 -29
  74. /package/dist/{ast-rule-runner-AJAWZQNS.js.map → ast-rule-runner-27XDHRZH.js.map} +0 -0
  75. /package/dist/{child-mcp-config-JQCVNB3Y.js.map → child-mcp-config-ONSFGNNH.js.map} +0 -0
  76. /package/dist/{chunk-N3TMUOHG.js.map → chunk-2TTPWF25.js.map} +0 -0
  77. /package/dist/{chunk-A62DB47B.js.map → chunk-3P5H74AV.js.map} +0 -0
  78. /package/dist/{chunk-JYMFL4M6.js.map → chunk-3YC6CEI5.js.map} +0 -0
  79. /package/dist/{chunk-LMJ7BKIL.js.map → chunk-4XNZKWKQ.js.map} +0 -0
  80. /package/dist/{chunk-5OTOOVOF.js.map → chunk-4YMUPCRS.js.map} +0 -0
  81. /package/dist/{chunk-2LQAHGNZ.js.map → chunk-C7CSLODO.js.map} +0 -0
  82. /package/dist/{chunk-KQRF4ZHX.js.map → chunk-CFAN2FPY.js.map} +0 -0
  83. /package/dist/{chunk-V2XWRKIJ.js.map → chunk-CQ4CFPLB.js.map} +0 -0
  84. /package/dist/{chunk-KUKQ7UHD.js.map → chunk-DLWCNFEX.js.map} +0 -0
  85. /package/dist/{chunk-ETMIOP3R.js.map → chunk-GNB4GPLQ.js.map} +0 -0
  86. /package/dist/{chunk-KJFX7JUP.js.map → chunk-HN7EDIAH.js.map} +0 -0
  87. /package/dist/{chunk-R3QNEXOU.js.map → chunk-ICKUT5LH.js.map} +0 -0
  88. /package/dist/{chunk-XVAXLGKZ.js.map → chunk-J5QYHZW2.js.map} +0 -0
  89. /package/dist/{chunk-GWQE5MBQ.js.map → chunk-K7QRRVKW.js.map} +0 -0
  90. /package/dist/{chunk-CQK5SIEX.js.map → chunk-KY3U2XEW.js.map} +0 -0
  91. /package/dist/{chunk-NBXYA5O6.js.map → chunk-LZ6WZJRH.js.map} +0 -0
  92. /package/dist/{chunk-6ZU3FUAX.js.map → chunk-LZU4O6RT.js.map} +0 -0
  93. /package/dist/{chunk-46V3G76B.js.map → chunk-P7FSB7X2.js.map} +0 -0
  94. /package/dist/{chunk-JXHRZRKU.js.map → chunk-Q225YMZK.js.map} +0 -0
  95. /package/dist/{chunk-PBVNGI67.js.map → chunk-Q2M77IPR.js.map} +0 -0
  96. /package/dist/{chunk-D7WQNTAK.js.map → chunk-Q76C5PG7.js.map} +0 -0
  97. /package/dist/{chunk-JEOQY42Z.js.map → chunk-QFI5WT2Y.js.map} +0 -0
  98. /package/dist/{chunk-IJH2U2QL.js.map → chunk-RIIWLQYM.js.map} +0 -0
  99. /package/dist/{chunk-QBU2RG7U.js.map → chunk-SLLW6DVZ.js.map} +0 -0
  100. /package/dist/{chunk-I4EHDJTI.js.map → chunk-TCTKOFNL.js.map} +0 -0
  101. /package/dist/{chunk-ZB7XPHFZ.js.map → chunk-UCIRVMOZ.js.map} +0 -0
  102. /package/dist/{chunk-WIG2XETC.js.map → chunk-VAED5NBQ.js.map} +0 -0
  103. /package/dist/{chunk-DBGIP6GK.js.map → chunk-VLNPDWIW.js.map} +0 -0
  104. /package/dist/{chunk-ZXLF3NDV.js.map → chunk-WGYETY6P.js.map} +0 -0
  105. /package/dist/{chunk-EPVPVG25.js.map → chunk-XYJFJP4Q.js.map} +0 -0
  106. /package/dist/{chunk-R7V4C5UL.js.map → chunk-ZECI6UI2.js.map} +0 -0
  107. /package/dist/{chunk-2T2MSN7B.js.map → chunk-ZUK5BG3Q.js.map} +0 -0
  108. /package/dist/{cli-circuit-breaker-2LQZLFVP.js.map → cli-circuit-breaker-FOPLEQK6.js.map} +0 -0
  109. /package/dist/{composite-router-XNVULYDV.js.map → composite-router-OSASGOMV.js.map} +0 -0
  110. /package/dist/{consensus-vote-2WLWZOVR.js.map → consensus-vote-FJVB6TK6.js.map} +0 -0
  111. /package/dist/{context-retriever-GWAJG6XT.js.map → context-retriever-7VPUIRVT.js.map} +0 -0
  112. /package/dist/{doctor-deep-ZATGXGNC.js.map → doctor-deep-ZBNAR3QG.js.map} +0 -0
  113. /package/dist/{doctor-live-L264NFJO.js.map → doctor-live-VIHVWQGF.js.map} +0 -0
  114. /package/dist/{expert-bridge-KCQ457YZ.js.map → expert-bridge-ESJHWQ2Z.js.map} +0 -0
  115. /package/dist/{factory-FFKHIV6Q.js.map → factory-HFHYJ4P6.js.map} +0 -0
  116. /package/dist/{factory-S2SVFA6W.js.map → factory-HUUB4OWA.js.map} +0 -0
  117. /package/dist/{improvement-review-ASVQR6VY.js.map → improvement-review-DG4Y3J43.js.map} +0 -0
  118. /package/dist/{init-opencode-CDW4DAWF.js.map → init-opencode-VZKXSO72.js.map} +0 -0
  119. /package/dist/{issue-triage-4RX3UV2B.js.map → issue-triage-66FWR2FL.js.map} +0 -0
  120. /package/dist/{pr-reviewer-helpers-PMRGV7IL.js.map → pr-reviewer-helpers-BINKSJSV.js.map} +0 -0
  121. /package/dist/{registry-command-4Y7RJH47.js.map → registry-command-GCO7IPDP.js.map} +0 -0
  122. /package/dist/{repo-security-plan-XZ6YBLUE.js.map → repo-security-plan-QTGNCDI7.js.map} +0 -0
  123. /package/dist/{research-helpers-synthesize-OKCOMCE2.js.map → research-helpers-synthesize-KYDHWP7C.js.map} +0 -0
  124. /package/dist/{routing-memory-QUA5ORUA.js.map → routing-memory-VMCHRNSE.js.map} +0 -0
  125. /package/dist/{session-memory-XKHKWRP3.js.map → session-memory-MX2G4K2A.js.map} +0 -0
  126. /package/dist/{setup-config-NMVR2OBN.js.map → setup-config-QKYFUR3C.js.map} +0 -0
  127. /package/dist/{setup-custom-api-VV3FT66F.js.map → setup-custom-api-5CDXK3RY.js.map} +0 -0
  128. /package/dist/{setup-data-dir-OYYLDXTP.js.map → setup-data-dir-ZA4QHCIO.js.map} +0 -0
  129. /package/dist/{tool-memory-MCIIYDQR.js.map → tool-memory-WUZ66O4K.js.map} +0 -0
  130. /package/dist/{unified-registry-LPSJ2KMV.js.map → unified-registry-EZ3QUCIO.js.map} +0 -0
  131. /package/dist/{weather-report-KHFJ756C.js.map → weather-report-MUUYKM7C.js.map} +0 -0
@@ -9,8 +9,8 @@ import {
9
9
  getBuiltInAstRulesPath,
10
10
  loadRules,
11
11
  runAstQaRules
12
- } from "./chunk-ZXLF3NDV.js";
13
- import "./chunk-NBXYA5O6.js";
12
+ } from "./chunk-WGYETY6P.js";
13
+ import "./chunk-LZ6WZJRH.js";
14
14
  import "./chunk-7WJGV5DN.js";
15
15
  import "./chunk-J7QCZRVK.js";
16
16
  import "./chunk-ZPWHCABL.js";
@@ -26,4 +26,4 @@ export {
26
26
  loadRules,
27
27
  runAstQaRules
28
28
  };
29
- //# sourceMappingURL=ast-rule-runner-AJAWZQNS.js.map
29
+ //# sourceMappingURL=ast-rule-runner-27XDHRZH.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-DKHBIJO4.js";
4
4
  import {
5
5
  createLogger
6
- } from "./chunk-NBXYA5O6.js";
6
+ } from "./chunk-LZ6WZJRH.js";
7
7
  import "./chunk-7WJGV5DN.js";
8
8
  import "./chunk-J7QCZRVK.js";
9
9
  import "./chunk-ZPWHCABL.js";
@@ -62,4 +62,4 @@ export {
62
62
  generateMcpConfig,
63
63
  getDefaultAllowedTools
64
64
  };
65
- //# sourceMappingURL=child-mcp-config-JQCVNB3Y.js.map
65
+ //# sourceMappingURL=child-mcp-config-ONSFGNNH.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-JXHRZRKU.js";
10
+ } from "./chunk-Q225YMZK.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -20,7 +20,7 @@ import {
20
20
  getTimeProvider,
21
21
  isDeclaredNeverDeprecate,
22
22
  isRegisteredToolName
23
- } from "./chunk-NBXYA5O6.js";
23
+ } from "./chunk-LZ6WZJRH.js";
24
24
  import {
25
25
  getNexusDataDir,
26
26
  nexusDataPath
@@ -2159,4 +2159,4 @@ export {
2159
2159
  runImprovementReview,
2160
2160
  registerImprovementReviewTool
2161
2161
  };
2162
- //# sourceMappingURL=chunk-N3TMUOHG.js.map
2162
+ //# sourceMappingURL=chunk-2TTPWF25.js.map
@@ -5,34 +5,34 @@ import {
5
5
  planOptionalParams,
6
6
  requireApiKey,
7
7
  validateApiKeyPresence
8
- } from "./chunk-R7V4C5UL.js";
8
+ } from "./chunk-ZECI6UI2.js";
9
9
  import {
10
10
  CUSTOM_API_DEFAULT_MODEL
11
- } from "./chunk-R3QNEXOU.js";
11
+ } from "./chunk-ICKUT5LH.js";
12
12
  import {
13
13
  CUSTOM_API_BASE_URL_ENV,
14
14
  PROVIDER_ENV_KEYS,
15
15
  assertCustomApiHostResolvesPublic,
16
16
  validateCustomApiBaseUrl
17
- } from "./chunk-PBVNGI67.js";
17
+ } from "./chunk-Q2M77IPR.js";
18
18
  import {
19
19
  nexusMkdtempSync
20
20
  } from "./chunk-DKHBIJO4.js";
21
21
  import {
22
22
  getAvailabilityCache
23
- } from "./chunk-IJH2U2QL.js";
23
+ } from "./chunk-RIIWLQYM.js";
24
24
  import {
25
25
  extractSystemPrompt
26
26
  } from "./chunk-QZUG667L.js";
27
27
  import {
28
28
  generateHyphenId
29
- } from "./chunk-KQRF4ZHX.js";
29
+ } from "./chunk-CFAN2FPY.js";
30
30
  import {
31
31
  CliCircuitBreaker,
32
32
  DEFAULT_CIRCUIT_BREAKER_CONFIG,
33
33
  getCliCircuitBreakerSnapshot,
34
34
  getDefaultCliCircuitBreakerRegistry
35
- } from "./chunk-6ZU3FUAX.js";
35
+ } from "./chunk-LZU4O6RT.js";
36
36
  import {
37
37
  CLI_SUBPROCESS_TIMEOUTS,
38
38
  CLI_TIMEOUTS,
@@ -72,7 +72,7 @@ import {
72
72
  resolveCliAlias,
73
73
  resolveRetryAfterMs,
74
74
  retryAfterMsFromContext
75
- } from "./chunk-NBXYA5O6.js";
75
+ } from "./chunk-LZ6WZJRH.js";
76
76
 
77
77
  // src/cli-adapters/cli-to-model-adapter.ts
78
78
  var CliToModelAdapter = class {
@@ -4946,4 +4946,4 @@ export {
4946
4946
  SdkAdapter,
4947
4947
  createAutoAdapter
4948
4948
  };
4949
- //# sourceMappingURL=chunk-A62DB47B.js.map
4949
+ //# sourceMappingURL=chunk-3P5H74AV.js.map
@@ -2,7 +2,7 @@ import {
2
2
  createLogger,
3
3
  err,
4
4
  ok
5
- } from "./chunk-NBXYA5O6.js";
5
+ } from "./chunk-LZ6WZJRH.js";
6
6
 
7
7
  // src/scm/token-resolver.ts
8
8
  import { execFile } from "node:child_process";
@@ -87,4 +87,4 @@ export {
87
87
  hasToken,
88
88
  getTokenEnvVars
89
89
  };
90
- //# sourceMappingURL=chunk-JYMFL4M6.js.map
90
+ //# sourceMappingURL=chunk-3YC6CEI5.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getErrorMessage,
5
5
  getTimeProvider,
6
6
  ok
7
- } from "./chunk-NBXYA5O6.js";
7
+ } from "./chunk-LZ6WZJRH.js";
8
8
 
9
9
  // src/context/session-memory.ts
10
10
  import * as fs from "node:fs";
@@ -370,4 +370,4 @@ export {
370
370
  SessionMemory,
371
371
  createSessionMemory
372
372
  };
373
- //# sourceMappingURL=chunk-LMJ7BKIL.js.map
373
+ //# sourceMappingURL=chunk-4XNZKWKQ.js.map
@@ -2,10 +2,10 @@ import {
2
2
  stringifyValue,
3
3
  tokenize,
4
4
  tokenizeFiltered
5
- } from "./chunk-6T3EPABN.js";
5
+ } from "./chunk-7LP6VJRP.js";
6
6
  import {
7
7
  SessionMemory
8
- } from "./chunk-LMJ7BKIL.js";
8
+ } from "./chunk-4XNZKWKQ.js";
9
9
  import {
10
10
  StatsOnlyAdapter,
11
11
  ensureSharedMemoryRegistry
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-YYJFZ7TO.js";
16
16
  import {
17
17
  generateId
18
- } from "./chunk-KQRF4ZHX.js";
18
+ } from "./chunk-CFAN2FPY.js";
19
19
  import {
20
20
  ErrorCode,
21
21
  NexusError,
@@ -29,7 +29,7 @@ import {
29
29
  ok,
30
30
  openSqliteDatabase,
31
31
  setSharedMobiMemDbPathResolver
32
- } from "./chunk-NBXYA5O6.js";
32
+ } from "./chunk-LZ6WZJRH.js";
33
33
  import {
34
34
  nexusDataPath
35
35
  } from "./chunk-J7QCZRVK.js";
@@ -5661,4 +5661,4 @@ export {
5661
5661
  reinitializeMemoryBackends,
5662
5662
  ToolMemoryManager
5663
5663
  };
5664
- //# sourceMappingURL=chunk-5OTOOVOF.js.map
5664
+ //# sourceMappingURL=chunk-4YMUPCRS.js.map
@@ -98,6 +98,10 @@ function capitalizeWords(str) {
98
98
  function capitalizeKebab(str) {
99
99
  return str.split("-").map((word) => capitalize(word)).join(" ");
100
100
  }
101
+ function truncateText(text, maxLength, suffix = "...") {
102
+ if (text.length <= maxLength) return text;
103
+ return text.slice(0, maxLength - suffix.length) + suffix;
104
+ }
101
105
  function truncateWithInfo(text, maxLength) {
102
106
  if (text.length <= maxLength) return text;
103
107
  const truncatedBytes = text.length - maxLength;
@@ -121,7 +125,8 @@ export {
121
125
  capitalize,
122
126
  capitalizeWords,
123
127
  capitalizeKebab,
128
+ truncateText,
124
129
  truncateWithInfo,
125
130
  truncateSentence
126
131
  };
127
- //# sourceMappingURL=chunk-6T3EPABN.js.map
132
+ //# sourceMappingURL=chunk-7LP6VJRP.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/text-utils.ts"],"sourcesContent":["/**\n * nexus-agents/utils - Text Processing Utilities\n *\n * Shared utility functions for text tokenization and processing.\n * Consolidates duplicate code from multiple modules per ADR-0013.\n *\n * Used by:\n * - context/agentic-memory-extraction.ts\n * - context/adaptive-memory-helpers.ts\n * - cli-adapters/agreement-cascade-helpers.ts\n *\n * @module utils/text-utils\n * @see docs/adr/0013-memory-helpers-consolidation.md\n */\n\n// ============================================================================\n// Stopwords\n// ============================================================================\n\n/**\n * Common English stopwords to filter from keyword extraction.\n */\nexport const STOPWORDS = new Set([\n 'a',\n 'an',\n 'and',\n 'are',\n 'as',\n 'at',\n 'be',\n 'by',\n 'for',\n 'from',\n 'has',\n 'he',\n 'in',\n 'is',\n 'it',\n 'its',\n 'of',\n 'on',\n 'or',\n 'that',\n 'the',\n 'to',\n 'was',\n 'were',\n 'will',\n 'with',\n 'this',\n 'but',\n 'they',\n 'have',\n 'had',\n 'what',\n 'when',\n 'where',\n 'who',\n 'which',\n 'why',\n 'how',\n 'all',\n 'each',\n 'every',\n 'both',\n 'few',\n 'more',\n 'most',\n 'other',\n 'some',\n 'such',\n 'no',\n 'nor',\n 'not',\n 'only',\n 'own',\n 'same',\n 'so',\n 'than',\n 'too',\n 'very',\n 'can',\n 'just',\n 'should',\n 'now',\n 'i',\n 'you',\n 'we',\n 'me',\n 'my',\n 'your',\n 'our',\n 'their',\n 'him',\n 'her',\n 'them',\n 'his',\n 'hers',\n 'able',\n]);\n\n// ============================================================================\n// Tokenization\n// ============================================================================\n\n/**\n * Tokenize text into normalized words.\n *\n * Process:\n * 1. Convert to lowercase\n * 2. Replace non-alphanumeric characters with spaces\n * 3. Split on whitespace\n * 4. Filter tokens by minimum length\n *\n * @param text - Input text to tokenize\n * @param minLength - Minimum token length (default: 2)\n * @returns Array of normalized tokens\n */\nexport function tokenize(text: string, minLength = 2): string[] {\n return text\n .toLowerCase()\n .replace(/[^a-z0-9\\s]/g, ' ')\n .split(/\\s+/)\n .filter((t) => t.length >= minLength);\n}\n\n/**\n * Tokenize text and return as a Set for fast lookups.\n *\n * @param text - Input text to tokenize\n * @param minLength - Minimum token length (default: 2)\n * @returns Set of normalized tokens\n */\nexport function tokenizeToSet(text: string, minLength = 2): Set<string> {\n return new Set(tokenize(text, minLength));\n}\n\n/**\n * Tokenize text with stopword filtering.\n *\n * @param text - Input text to tokenize\n * @param minLength - Minimum token length (default: 2)\n * @returns Array of tokens with stopwords removed\n */\nexport function tokenizeFiltered(text: string, minLength = 2): string[] {\n return tokenize(text, minLength).filter((t) => !STOPWORDS.has(t));\n}\n\n// ============================================================================\n// Value Stringification\n// ============================================================================\n\n/**\n * Convert a value to string for text processing.\n *\n * @param value - Value to stringify\n * @returns String representation\n */\nexport function stringifyValue(value: unknown): string {\n if (typeof value === 'string') return value;\n if (value === null || value === undefined) return '';\n return JSON.stringify(value);\n}\n\n// ============================================================================\n// String Capitalization\n// ============================================================================\n\n/**\n * Capitalize the first character of a string.\n *\n * @param str - Input string\n * @returns String with first character uppercased\n * @example capitalize('hello') // 'Hello'\n */\nexport function capitalize(str: string): string {\n if (str.length === 0) return str;\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\n/**\n * Capitalize the first character of each word in a string.\n *\n * @param str - Input string\n * @returns String with each word capitalized\n * @example capitalizeWords('hello world') // 'Hello World'\n */\nexport function capitalizeWords(str: string): string {\n return str\n .split(' ')\n .map((word) => capitalize(word))\n .join(' ');\n}\n\n/**\n * Convert a kebab-case string to Title Case.\n *\n * @param str - Kebab-case string\n * @returns Title Case string with hyphens replaced by spaces\n * @example capitalizeKebab('hello-world') // 'Hello World'\n */\nexport function capitalizeKebab(str: string): string {\n return str\n .split('-')\n .map((word) => capitalize(word))\n .join(' ');\n}\n\n// ============================================================================\n// Text Truncation\n// ============================================================================\n\n/**\n * Truncate text to a maximum length with a suffix.\n *\n * @param text - Input text\n * @param maxLength - Maximum length including suffix\n * @param suffix - Suffix to append when truncated (default: '...')\n * @returns Truncated text with suffix if needed\n * @example truncateText('hello world', 8) // 'hello...'\n */\nexport function truncateText(text: string, maxLength: number, suffix = '...'): string {\n if (text.length <= maxLength) return text;\n return text.slice(0, maxLength - suffix.length) + suffix;\n}\n\n/**\n * Truncate text and include byte count information.\n * Commonly used for output truncation in CLI tools.\n *\n * @param text - Input text\n * @param maxLength - Maximum length before truncation marker\n * @returns Truncated text with byte count info\n * @example truncateWithInfo('hello world...', 5) // 'hello\\n... [truncated 9 bytes]'\n */\nexport function truncateWithInfo(text: string, maxLength: number): string {\n if (text.length <= maxLength) return text;\n const truncatedBytes = text.length - maxLength;\n return `${text.slice(0, maxLength)}\\n... [truncated ${String(truncatedBytes)} bytes]`;\n}\n\n/**\n * Truncate to the first sentence or a maximum length.\n * Useful for extracting descriptions from longer text.\n *\n * @param text - Input text\n * @param maxLength - Maximum length (default: 150)\n * @returns First sentence or truncated text\n * @example truncateSentence('Hello world. More text.', 150) // 'Hello world.'\n */\nexport function truncateSentence(text: string, maxLength = 150): string {\n // Find first sentence ending\n const sentenceEnd = text.search(/[.!?](?:\\s|$)/);\n if (sentenceEnd !== -1 && sentenceEnd < maxLength) {\n return text.slice(0, sentenceEnd + 1).trim();\n }\n // Fall back to truncation\n if (text.length <= maxLength) return text;\n return text.slice(0, maxLength).trim() + '...';\n}\n\n// ============================================================================\n// Line Splitting\n// ============================================================================\n\n/**\n * Split text into lines.\n * Handles both Unix (\\n) and Windows (\\r\\n) line endings.\n *\n * @param text - Input text to split\n * @returns Array of lines (may include empty strings)\n * @example splitLines('a\\nb\\nc') // ['a', 'b', 'c']\n * @example splitLines('a\\n\\nb') // ['a', '', 'b']\n */\nexport function splitLines(text: string): string[] {\n return text.split(/\\r?\\n/);\n}\n\n/**\n * Split text into non-empty lines.\n * Filters out empty lines and whitespace-only lines.\n *\n * @param text - Input text to split\n * @returns Array of non-empty lines\n * @example splitNonEmptyLines('a\\n\\nb\\n \\nc') // ['a', 'b', 'c']\n */\nexport function splitNonEmptyLines(text: string): string[] {\n return text\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter((line) => line.length > 0);\n}\n\n/**\n * Split text into trimmed lines, preserving empty lines.\n * Trims each line but keeps empty lines in the output.\n *\n * @param text - Input text to split\n * @returns Array of trimmed lines\n * @example splitTrimmedLines(' a \\n\\n b ') // ['a', '', 'b']\n */\nexport function splitTrimmedLines(text: string): string[] {\n return text.split(/\\r?\\n/).map((line) => line.trim());\n}\n\n// ============================================================================\n// Sentence/Word Splitting\n// ============================================================================\n\n/**\n * Count the number of sentences in text.\n * Counts sentence-ending punctuation followed by space or end of string.\n *\n * @param text - Input text\n * @returns Number of sentences\n * @example countSentences('Hello world. How are you?') // 2\n */\nexport function countSentences(text: string): number {\n const matches = text.match(/[.!?]+(?:\\s|$)/g);\n return matches !== null ? matches.length : 0;\n}\n\n/**\n * Split text into sentences.\n * Splits on sentence-ending punctuation followed by space.\n *\n * @param text - Input text\n * @returns Array of sentences (trimmed)\n * @example splitSentences('Hello world. How are you?') // ['Hello world.', 'How are you?']\n */\nexport function splitSentences(text: string): string[] {\n // Split on sentence endings followed by space, keeping the punctuation\n return text\n .split(/(?<=[.!?])\\s+/)\n .map((s) => s.trim())\n .filter((s) => s.length > 0);\n}\n\n/**\n * Count the number of words in text.\n * Splits on whitespace and counts non-empty tokens.\n *\n * @param text - Input text\n * @returns Number of words\n * @example countWords('Hello world') // 2\n */\nexport function countWords(text: string): number {\n return text\n .trim()\n .split(/\\s+/)\n .filter((w) => w.length > 0).length;\n}\n"],"mappings":";AAsBO,IAAM,YAAY,oBAAI,IAAI;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAmBM,SAAS,SAAS,MAAc,YAAY,GAAa;AAC9D,SAAO,KACJ,YAAY,EACZ,QAAQ,gBAAgB,GAAG,EAC3B,MAAM,KAAK,EACX,OAAO,CAAC,MAAM,EAAE,UAAU,SAAS;AACxC;AAoBO,SAAS,iBAAiB,MAAc,YAAY,GAAa;AACtE,SAAO,SAAS,MAAM,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC;AAClE;AAYO,SAAS,eAAe,OAAwB;AACrD,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,SAAO,KAAK,UAAU,KAAK;AAC7B;AAaO,SAAS,WAAW,KAAqB;AAC9C,MAAI,IAAI,WAAW,EAAG,QAAO;AAC7B,SAAO,IAAI,OAAO,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC;AAClD;AASO,SAAS,gBAAgB,KAAqB;AACnD,SAAO,IACJ,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,WAAW,IAAI,CAAC,EAC9B,KAAK,GAAG;AACb;AASO,SAAS,gBAAgB,KAAqB;AACnD,SAAO,IACJ,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,WAAW,IAAI,CAAC,EAC9B,KAAK,GAAG;AACb;AA6BO,SAAS,iBAAiB,MAAc,WAA2B;AACxE,MAAI,KAAK,UAAU,UAAW,QAAO;AACrC,QAAM,iBAAiB,KAAK,SAAS;AACrC,SAAO,GAAG,KAAK,MAAM,GAAG,SAAS,CAAC;AAAA,iBAAoB,OAAO,cAAc,CAAC;AAC9E;AAWO,SAAS,iBAAiB,MAAc,YAAY,KAAa;AAEtE,QAAM,cAAc,KAAK,OAAO,eAAe;AAC/C,MAAI,gBAAgB,MAAM,cAAc,WAAW;AACjD,WAAO,KAAK,MAAM,GAAG,cAAc,CAAC,EAAE,KAAK;AAAA,EAC7C;AAEA,MAAI,KAAK,UAAU,UAAW,QAAO;AACrC,SAAO,KAAK,MAAM,GAAG,SAAS,EAAE,KAAK,IAAI;AAC3C;","names":[]}
1
+ {"version":3,"sources":["../src/utils/text-utils.ts"],"sourcesContent":["/**\n * nexus-agents/utils - Text Processing Utilities\n *\n * Shared utility functions for text tokenization and processing.\n * Consolidates duplicate code from multiple modules per ADR-0013.\n *\n * Used by:\n * - context/agentic-memory-extraction.ts\n * - context/adaptive-memory-helpers.ts\n * - cli-adapters/agreement-cascade-helpers.ts\n *\n * @module utils/text-utils\n * @see docs/adr/0013-memory-helpers-consolidation.md\n */\n\n// ============================================================================\n// Stopwords\n// ============================================================================\n\n/**\n * Common English stopwords to filter from keyword extraction.\n */\nexport const STOPWORDS = new Set([\n 'a',\n 'an',\n 'and',\n 'are',\n 'as',\n 'at',\n 'be',\n 'by',\n 'for',\n 'from',\n 'has',\n 'he',\n 'in',\n 'is',\n 'it',\n 'its',\n 'of',\n 'on',\n 'or',\n 'that',\n 'the',\n 'to',\n 'was',\n 'were',\n 'will',\n 'with',\n 'this',\n 'but',\n 'they',\n 'have',\n 'had',\n 'what',\n 'when',\n 'where',\n 'who',\n 'which',\n 'why',\n 'how',\n 'all',\n 'each',\n 'every',\n 'both',\n 'few',\n 'more',\n 'most',\n 'other',\n 'some',\n 'such',\n 'no',\n 'nor',\n 'not',\n 'only',\n 'own',\n 'same',\n 'so',\n 'than',\n 'too',\n 'very',\n 'can',\n 'just',\n 'should',\n 'now',\n 'i',\n 'you',\n 'we',\n 'me',\n 'my',\n 'your',\n 'our',\n 'their',\n 'him',\n 'her',\n 'them',\n 'his',\n 'hers',\n 'able',\n]);\n\n// ============================================================================\n// Tokenization\n// ============================================================================\n\n/**\n * Tokenize text into normalized words.\n *\n * Process:\n * 1. Convert to lowercase\n * 2. Replace non-alphanumeric characters with spaces\n * 3. Split on whitespace\n * 4. Filter tokens by minimum length\n *\n * @param text - Input text to tokenize\n * @param minLength - Minimum token length (default: 2)\n * @returns Array of normalized tokens\n */\nexport function tokenize(text: string, minLength = 2): string[] {\n return text\n .toLowerCase()\n .replace(/[^a-z0-9\\s]/g, ' ')\n .split(/\\s+/)\n .filter((t) => t.length >= minLength);\n}\n\n/**\n * Tokenize text and return as a Set for fast lookups.\n *\n * @param text - Input text to tokenize\n * @param minLength - Minimum token length (default: 2)\n * @returns Set of normalized tokens\n */\nexport function tokenizeToSet(text: string, minLength = 2): Set<string> {\n return new Set(tokenize(text, minLength));\n}\n\n/**\n * Tokenize text with stopword filtering.\n *\n * @param text - Input text to tokenize\n * @param minLength - Minimum token length (default: 2)\n * @returns Array of tokens with stopwords removed\n */\nexport function tokenizeFiltered(text: string, minLength = 2): string[] {\n return tokenize(text, minLength).filter((t) => !STOPWORDS.has(t));\n}\n\n// ============================================================================\n// Value Stringification\n// ============================================================================\n\n/**\n * Convert a value to string for text processing.\n *\n * @param value - Value to stringify\n * @returns String representation\n */\nexport function stringifyValue(value: unknown): string {\n if (typeof value === 'string') return value;\n if (value === null || value === undefined) return '';\n return JSON.stringify(value);\n}\n\n// ============================================================================\n// String Capitalization\n// ============================================================================\n\n/**\n * Capitalize the first character of a string.\n *\n * @param str - Input string\n * @returns String with first character uppercased\n * @example capitalize('hello') // 'Hello'\n */\nexport function capitalize(str: string): string {\n if (str.length === 0) return str;\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\n/**\n * Capitalize the first character of each word in a string.\n *\n * @param str - Input string\n * @returns String with each word capitalized\n * @example capitalizeWords('hello world') // 'Hello World'\n */\nexport function capitalizeWords(str: string): string {\n return str\n .split(' ')\n .map((word) => capitalize(word))\n .join(' ');\n}\n\n/**\n * Convert a kebab-case string to Title Case.\n *\n * @param str - Kebab-case string\n * @returns Title Case string with hyphens replaced by spaces\n * @example capitalizeKebab('hello-world') // 'Hello World'\n */\nexport function capitalizeKebab(str: string): string {\n return str\n .split('-')\n .map((word) => capitalize(word))\n .join(' ');\n}\n\n// ============================================================================\n// Text Truncation\n// ============================================================================\n\n/**\n * Truncate text to a maximum length with a suffix.\n *\n * @param text - Input text\n * @param maxLength - Maximum length including suffix\n * @param suffix - Suffix to append when truncated (default: '...')\n * @returns Truncated text with suffix if needed\n * @example truncateText('hello world', 8) // 'hello...'\n */\nexport function truncateText(text: string, maxLength: number, suffix = '...'): string {\n if (text.length <= maxLength) return text;\n return text.slice(0, maxLength - suffix.length) + suffix;\n}\n\n/**\n * Truncate text and include byte count information.\n * Commonly used for output truncation in CLI tools.\n *\n * @param text - Input text\n * @param maxLength - Maximum length before truncation marker\n * @returns Truncated text with byte count info\n * @example truncateWithInfo('hello world...', 5) // 'hello\\n... [truncated 9 bytes]'\n */\nexport function truncateWithInfo(text: string, maxLength: number): string {\n if (text.length <= maxLength) return text;\n const truncatedBytes = text.length - maxLength;\n return `${text.slice(0, maxLength)}\\n... [truncated ${String(truncatedBytes)} bytes]`;\n}\n\n/**\n * Truncate to the first sentence or a maximum length.\n * Useful for extracting descriptions from longer text.\n *\n * @param text - Input text\n * @param maxLength - Maximum length (default: 150)\n * @returns First sentence or truncated text\n * @example truncateSentence('Hello world. More text.', 150) // 'Hello world.'\n */\nexport function truncateSentence(text: string, maxLength = 150): string {\n // Find first sentence ending\n const sentenceEnd = text.search(/[.!?](?:\\s|$)/);\n if (sentenceEnd !== -1 && sentenceEnd < maxLength) {\n return text.slice(0, sentenceEnd + 1).trim();\n }\n // Fall back to truncation\n if (text.length <= maxLength) return text;\n return text.slice(0, maxLength).trim() + '...';\n}\n\n// ============================================================================\n// Line Splitting\n// ============================================================================\n\n/**\n * Split text into lines.\n * Handles both Unix (\\n) and Windows (\\r\\n) line endings.\n *\n * @param text - Input text to split\n * @returns Array of lines (may include empty strings)\n * @example splitLines('a\\nb\\nc') // ['a', 'b', 'c']\n * @example splitLines('a\\n\\nb') // ['a', '', 'b']\n */\nexport function splitLines(text: string): string[] {\n return text.split(/\\r?\\n/);\n}\n\n/**\n * Split text into non-empty lines.\n * Filters out empty lines and whitespace-only lines.\n *\n * @param text - Input text to split\n * @returns Array of non-empty lines\n * @example splitNonEmptyLines('a\\n\\nb\\n \\nc') // ['a', 'b', 'c']\n */\nexport function splitNonEmptyLines(text: string): string[] {\n return text\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter((line) => line.length > 0);\n}\n\n/**\n * Split text into trimmed lines, preserving empty lines.\n * Trims each line but keeps empty lines in the output.\n *\n * @param text - Input text to split\n * @returns Array of trimmed lines\n * @example splitTrimmedLines(' a \\n\\n b ') // ['a', '', 'b']\n */\nexport function splitTrimmedLines(text: string): string[] {\n return text.split(/\\r?\\n/).map((line) => line.trim());\n}\n\n// ============================================================================\n// Sentence/Word Splitting\n// ============================================================================\n\n/**\n * Count the number of sentences in text.\n * Counts sentence-ending punctuation followed by space or end of string.\n *\n * @param text - Input text\n * @returns Number of sentences\n * @example countSentences('Hello world. How are you?') // 2\n */\nexport function countSentences(text: string): number {\n const matches = text.match(/[.!?]+(?:\\s|$)/g);\n return matches !== null ? matches.length : 0;\n}\n\n/**\n * Split text into sentences.\n * Splits on sentence-ending punctuation followed by space.\n *\n * @param text - Input text\n * @returns Array of sentences (trimmed)\n * @example splitSentences('Hello world. How are you?') // ['Hello world.', 'How are you?']\n */\nexport function splitSentences(text: string): string[] {\n // Split on sentence endings followed by space, keeping the punctuation\n return text\n .split(/(?<=[.!?])\\s+/)\n .map((s) => s.trim())\n .filter((s) => s.length > 0);\n}\n\n/**\n * Count the number of words in text.\n * Splits on whitespace and counts non-empty tokens.\n *\n * @param text - Input text\n * @returns Number of words\n * @example countWords('Hello world') // 2\n */\nexport function countWords(text: string): number {\n return text\n .trim()\n .split(/\\s+/)\n .filter((w) => w.length > 0).length;\n}\n"],"mappings":";AAsBO,IAAM,YAAY,oBAAI,IAAI;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAmBM,SAAS,SAAS,MAAc,YAAY,GAAa;AAC9D,SAAO,KACJ,YAAY,EACZ,QAAQ,gBAAgB,GAAG,EAC3B,MAAM,KAAK,EACX,OAAO,CAAC,MAAM,EAAE,UAAU,SAAS;AACxC;AAoBO,SAAS,iBAAiB,MAAc,YAAY,GAAa;AACtE,SAAO,SAAS,MAAM,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC;AAClE;AAYO,SAAS,eAAe,OAAwB;AACrD,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,SAAO,KAAK,UAAU,KAAK;AAC7B;AAaO,SAAS,WAAW,KAAqB;AAC9C,MAAI,IAAI,WAAW,EAAG,QAAO;AAC7B,SAAO,IAAI,OAAO,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC;AAClD;AASO,SAAS,gBAAgB,KAAqB;AACnD,SAAO,IACJ,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,WAAW,IAAI,CAAC,EAC9B,KAAK,GAAG;AACb;AASO,SAAS,gBAAgB,KAAqB;AACnD,SAAO,IACJ,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,WAAW,IAAI,CAAC,EAC9B,KAAK,GAAG;AACb;AAeO,SAAS,aAAa,MAAc,WAAmB,SAAS,OAAe;AACpF,MAAI,KAAK,UAAU,UAAW,QAAO;AACrC,SAAO,KAAK,MAAM,GAAG,YAAY,OAAO,MAAM,IAAI;AACpD;AAWO,SAAS,iBAAiB,MAAc,WAA2B;AACxE,MAAI,KAAK,UAAU,UAAW,QAAO;AACrC,QAAM,iBAAiB,KAAK,SAAS;AACrC,SAAO,GAAG,KAAK,MAAM,GAAG,SAAS,CAAC;AAAA,iBAAoB,OAAO,cAAc,CAAC;AAC9E;AAWO,SAAS,iBAAiB,MAAc,YAAY,KAAa;AAEtE,QAAM,cAAc,KAAK,OAAO,eAAe;AAC/C,MAAI,gBAAgB,MAAM,cAAc,WAAW;AACjD,WAAO,KAAK,MAAM,GAAG,cAAc,CAAC,EAAE,KAAK;AAAA,EAC7C;AAEA,MAAI,KAAK,UAAU,UAAW,QAAO;AACrC,SAAO,KAAK,MAAM,GAAG,SAAS,EAAE,KAAK,IAAI;AAC3C;","names":[]}
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  resolveCliSlot
3
- } from "./chunk-IJH2U2QL.js";
3
+ } from "./chunk-RIIWLQYM.js";
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider,
7
7
  isRateLimitText
8
- } from "./chunk-NBXYA5O6.js";
8
+ } from "./chunk-LZ6WZJRH.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-JQCVNB3Y.js");
24
+ const { generateMcpConfig } = await import("./child-mcp-config-ONSFGNNH.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-S2SVFA6W.js");
97
- const { createCompositeRouter } = await import("./composite-router-XNVULYDV.js");
96
+ const { createAllAdapters } = await import("./factory-HFHYJ4P6.js");
97
+ const { createCompositeRouter } = await import("./composite-router-OSASGOMV.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-2LQZLFVP.js");
105
+ const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-FOPLEQK6.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-2LQAHGNZ.js.map
216
+ //# sourceMappingURL=chunk-C7CSLODO.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getRandomProvider,
3
3
  getTimeProvider
4
- } from "./chunk-NBXYA5O6.js";
4
+ } from "./chunk-LZ6WZJRH.js";
5
5
 
6
6
  // src/utils/id-utils.ts
7
7
  import { randomUUID } from "node:crypto";
@@ -24,4 +24,4 @@ export {
24
24
  generateHyphenId,
25
25
  generateUUID
26
26
  };
27
- //# sourceMappingURL=chunk-KQRF4ZHX.js.map
27
+ //# sourceMappingURL=chunk-CFAN2FPY.js.map
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  readOpenAICompatEnv
3
- } from "./chunk-JEOQY42Z.js";
3
+ } from "./chunk-QFI5WT2Y.js";
4
4
  import {
5
5
  allOf
6
6
  } from "./chunk-OQB3XC5O.js";
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-WIG2XETC.js";
9
+ } from "./chunk-VAED5NBQ.js";
10
10
  import {
11
11
  capitalize
12
- } from "./chunk-6T3EPABN.js";
12
+ } from "./chunk-7LP6VJRP.js";
13
13
  import {
14
14
  createAllAdapters,
15
15
  probeCli
16
- } from "./chunk-A62DB47B.js";
16
+ } from "./chunk-3P5H74AV.js";
17
17
  import {
18
18
  getNexusTmpDir
19
19
  } from "./chunk-DKHBIJO4.js";
@@ -28,7 +28,7 @@ import {
28
28
  ok,
29
29
  symbols,
30
30
  writeLine
31
- } from "./chunk-NBXYA5O6.js";
31
+ } from "./chunk-LZ6WZJRH.js";
32
32
  import {
33
33
  getLearningDir,
34
34
  getOutcomesFile,
@@ -1220,13 +1220,13 @@ async function runDoctorFix(result) {
1220
1220
  writeLine2("\u2500".repeat(40));
1221
1221
  let fixCount = 0;
1222
1222
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1223
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-OYYLDXTP.js");
1223
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-ZA4QHCIO.js");
1224
1224
  const outcome = describeDataDirFix2(initDataDirectories2());
1225
1225
  writeLine2(outcome.line);
1226
1226
  if (outcome.counted) fixCount++;
1227
1227
  }
1228
1228
  if (!result.configFile.found) {
1229
- const { runConfigInitSync } = await import("./setup-config-NMVR2OBN.js");
1229
+ const { runConfigInitSync } = await import("./setup-config-QKYFUR3C.js");
1230
1230
  const configResult = runConfigInitSync(process.cwd(), false, false);
1231
1231
  if (configResult.success && configResult.created) {
1232
1232
  writeLine2(`\u2713 Generated config: ${configResult.path}`);
@@ -1322,4 +1322,4 @@ export {
1322
1322
  startStdioServer,
1323
1323
  closeServer
1324
1324
  };
1325
- //# sourceMappingURL=chunk-V2XWRKIJ.js.map
1325
+ //# sourceMappingURL=chunk-CQ4CFPLB.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-ETMIOP3R.js";
4
+ } from "./chunk-GNB4GPLQ.js";
5
5
  import {
6
6
  resolveToken
7
- } from "./chunk-JYMFL4M6.js";
7
+ } from "./chunk-3YC6CEI5.js";
8
8
  import {
9
9
  err,
10
10
  ok
11
- } from "./chunk-NBXYA5O6.js";
11
+ } from "./chunk-LZ6WZJRH.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-KUKQ7UHD.js.map
44
+ //# sourceMappingURL=chunk-DLWCNFEX.js.map
@@ -4,7 +4,7 @@ import {
4
4
  err,
5
5
  getErrorMessage,
6
6
  ok
7
- } from "./chunk-NBXYA5O6.js";
7
+ } from "./chunk-LZ6WZJRH.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-ETMIOP3R.js.map
266
+ //# sourceMappingURL=chunk-GNB4GPLQ.js.map
@@ -5,18 +5,18 @@ import {
5
5
  loadTechniquesRegistry,
6
6
  resolveInsideRoot,
7
7
  savePapersRegistry
8
- } from "./chunk-GWQE5MBQ.js";
8
+ } from "./chunk-K7QRRVKW.js";
9
9
  import {
10
10
  resolveToken
11
- } from "./chunk-JYMFL4M6.js";
11
+ } from "./chunk-3YC6CEI5.js";
12
12
  import {
13
13
  getToolMemory
14
- } from "./chunk-5OTOOVOF.js";
14
+ } from "./chunk-4YMUPCRS.js";
15
15
  import {
16
16
  capitalizeWords,
17
17
  tokenizeFiltered,
18
18
  truncateSentence
19
- } from "./chunk-6T3EPABN.js";
19
+ } from "./chunk-7LP6VJRP.js";
20
20
  import {
21
21
  extractSystemPrompt,
22
22
  generateCacheKey,
@@ -40,7 +40,7 @@ import {
40
40
  ok,
41
41
  registerPersistentDistillerFactory,
42
42
  sigmoidConfidence
43
- } from "./chunk-NBXYA5O6.js";
43
+ } from "./chunk-LZ6WZJRH.js";
44
44
  import {
45
45
  ensureLearningDir,
46
46
  getRulesFile
@@ -4186,4 +4186,4 @@ export {
4186
4186
  DEFAULT_CONTEXT_BUDGET_TOKENS,
4187
4187
  getContextPromptPrefix
4188
4188
  };
4189
- //# sourceMappingURL=chunk-KJFX7JUP.js.map
4189
+ //# sourceMappingURL=chunk-HN7EDIAH.js.map
@@ -11,7 +11,7 @@ import {
11
11
  createGetRetryConfig,
12
12
  createGetTimeout,
13
13
  createGetToolRateLimit
14
- } from "./chunk-NBXYA5O6.js";
14
+ } from "./chunk-LZ6WZJRH.js";
15
15
 
16
16
  // src/config/defaults.ts
17
17
  var CUSTOM_API_DEFAULT_MODEL = "gpt-5.5";
@@ -230,4 +230,4 @@ export {
230
230
  CUSTOM_API_DEFAULT_MODEL,
231
231
  DEFAULTS
232
232
  };
233
- //# sourceMappingURL=chunk-R3QNEXOU.js.map
233
+ //# sourceMappingURL=chunk-ICKUT5LH.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computeCostDetail,
3
3
  priceBasisOf
4
- } from "./chunk-D7WQNTAK.js";
4
+ } from "./chunk-Q76C5PG7.js";
5
5
  import {
6
6
  allOf
7
7
  } from "./chunk-OQB3XC5O.js";
@@ -23,25 +23,25 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-JXHRZRKU.js";
26
+ } from "./chunk-Q225YMZK.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-WIG2XETC.js";
29
+ } from "./chunk-VAED5NBQ.js";
30
30
  import {
31
31
  assessPanelIndependence,
32
32
  countDistinctModels,
33
33
  createEvent,
34
34
  getGlobalRegistry
35
- } from "./chunk-46V3G76B.js";
35
+ } from "./chunk-P7FSB7X2.js";
36
36
  import {
37
37
  getToolMemory
38
- } from "./chunk-5OTOOVOF.js";
38
+ } from "./chunk-4YMUPCRS.js";
39
39
  import {
40
40
  authRemediation,
41
41
  delay,
42
42
  getAvailableClis,
43
43
  withTimeout
44
- } from "./chunk-A62DB47B.js";
44
+ } from "./chunk-3P5H74AV.js";
45
45
  import {
46
46
  AgentError,
47
47
  CLI_NAMES,
@@ -69,7 +69,7 @@ import {
69
69
  registerPersistentOutcomeStoreFactory,
70
70
  resolveClassGuardMs,
71
71
  resolveVoteTimeout
72
- } from "./chunk-NBXYA5O6.js";
72
+ } from "./chunk-LZ6WZJRH.js";
73
73
  import {
74
74
  ensureLearningDir,
75
75
  getOutcomesFile
@@ -6415,7 +6415,7 @@ function logPartialProposal(bounded, log) {
6415
6415
  }
6416
6416
  async function runContrarianCheck(proposal, log) {
6417
6417
  try {
6418
- const { executeExpert } = await import("./expert-bridge-KCQ457YZ.js");
6418
+ const { executeExpert } = await import("./expert-bridge-ESJHWQ2Z.js");
6419
6419
  const bounded = boundArtifactForReview(proposal, CONTRARIAN_PROPOSAL_BUDGET, "proposal");
6420
6420
  logPartialProposal(bounded, log);
6421
6421
  const result = await executeExpert("architecture", buildContrarianPrompt(bounded));
@@ -7005,4 +7005,4 @@ export {
7005
7005
  CONSENSUS_VOTE_TOOL_SCHEMA,
7006
7006
  registerConsensusVoteTool
7007
7007
  };
7008
- //# sourceMappingURL=chunk-XVAXLGKZ.js.map
7008
+ //# sourceMappingURL=chunk-J5QYHZW2.js.map
@@ -6,7 +6,7 @@ import {
6
6
  getErrorMessage,
7
7
  ok,
8
8
  parseBoolEnv
9
- } from "./chunk-NBXYA5O6.js";
9
+ } from "./chunk-LZ6WZJRH.js";
10
10
  import {
11
11
  findRepoRoot,
12
12
  getActiveWorkspaceRoot,
@@ -223,4 +223,4 @@ export {
223
223
  loadPapersRegistry,
224
224
  savePapersRegistry
225
225
  };
226
- //# sourceMappingURL=chunk-GWQE5MBQ.js.map
226
+ //# sourceMappingURL=chunk-K7QRRVKW.js.map