nexus-agents 2.169.0 → 2.171.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 (129) hide show
  1. package/dist/{child-mcp-config-FJRGAMUU.js → child-mcp-config-NW4JZFWC.js} +2 -2
  2. package/dist/{chunk-CHF63T3L.js → chunk-25CWEJ2M.js} +4 -4
  3. package/dist/{chunk-MCT7JJF6.js → chunk-4KVAHGMB.js} +2 -2
  4. package/dist/{chunk-NT3KCLT6.js → chunk-5UDKUPZB.js} +7 -7
  5. package/dist/{chunk-DSMSYENI.js → chunk-76Q63KJM.js} +2 -2
  6. package/dist/{chunk-TB26XNJH.js → chunk-7AJWIOMT.js} +2 -2
  7. package/dist/{chunk-ZXFIBDT3.js → chunk-AJIDYCQG.js} +3 -3
  8. package/dist/{chunk-HNNSCTOI.js → chunk-B4XT3B2E.js} +2 -2
  9. package/dist/{chunk-BWG54OJS.js → chunk-BTH745HU.js} +2 -2
  10. package/dist/{chunk-SX4E2W3Z.js → chunk-CEDSYAAI.js} +2 -2
  11. package/dist/{chunk-3ON2P4WL.js → chunk-DLVDFJXU.js} +4 -4
  12. package/dist/{chunk-7S43YASS.js → chunk-DYFF72HX.js} +3 -3
  13. package/dist/{chunk-ROCNXZBC.js → chunk-E53VLN73.js} +8 -8
  14. package/dist/{chunk-5O4JRXNQ.js → chunk-FU2FRL46.js} +2 -2
  15. package/dist/{chunk-4G5W5EPU.js → chunk-GJRLIANS.js} +7 -7
  16. package/dist/{chunk-OOFPDA3B.js → chunk-IC3NZHPT.js} +2 -2
  17. package/dist/{chunk-PZF67XDY.js → chunk-IK7POCXO.js} +3 -3
  18. package/dist/{chunk-IQC2K3KY.js → chunk-KP4ZXW3B.js} +3 -3
  19. package/dist/{chunk-Q3UMNYV2.js → chunk-LFKCJQ7G.js} +4 -4
  20. package/dist/{chunk-W76DOL27.js → chunk-O4J34GZT.js} +2 -2
  21. package/dist/{chunk-WB33EPTV.js → chunk-PP5QL4EJ.js} +5 -5
  22. package/dist/{chunk-QXSR5KPG.js → chunk-QBCWORAK.js} +3 -3
  23. package/dist/{chunk-XGNB7LQB.js → chunk-QBOTSJ7S.js} +235 -20
  24. package/dist/chunk-QBOTSJ7S.js.map +1 -0
  25. package/dist/{chunk-JCJHQSAY.js → chunk-QFS5VOB6.js} +2 -2
  26. package/dist/{chunk-RO23OT47.js → chunk-RAK6PTNM.js} +2 -2
  27. package/dist/{chunk-R46SBPLH.js → chunk-RQGORCFM.js} +5 -5
  28. package/dist/{chunk-CD2NZFAI.js → chunk-S66XOAMZ.js} +2 -2
  29. package/dist/{chunk-EQRN5FRZ.js → chunk-SCHMBRK4.js} +3 -3
  30. package/dist/{chunk-T3VD32JY.js → chunk-SUWN54CK.js} +2 -2
  31. package/dist/{chunk-F6HJJG3E.js → chunk-SZ3CRNPI.js} +8 -8
  32. package/dist/{chunk-3JH3FMEJ.js → chunk-Y7JDXVJA.js} +2 -2
  33. package/dist/{chunk-N7FIUFQL.js → chunk-YIQ5Z7LV.js} +44 -118
  34. package/dist/chunk-YIQ5Z7LV.js.map +1 -0
  35. package/dist/{chunk-P7MYTCE6.js → chunk-Z5GJ4FXW.js} +4 -4
  36. package/dist/{chunk-HAVBBSYN.js → chunk-ZSWXEDI6.js} +2 -2
  37. package/dist/{cli-circuit-breaker-FJQXDC5M.js → cli-circuit-breaker-UWJNXHLC.js} +4 -4
  38. package/dist/cli.js +40 -40
  39. package/dist/{composite-router-UQTCPADM.js → composite-router-ULDZRQGO.js} +2 -2
  40. package/dist/{consensus-vote-FEDF24T5.js → consensus-vote-KF6M7NZJ.js} +15 -15
  41. package/dist/{context-retriever-TIJGFLGO.js → context-retriever-73PNAWES.js} +8 -8
  42. package/dist/{doctor-deep-EULAHWTK.js → doctor-deep-LURSTTF7.js} +3 -3
  43. package/dist/{expert-bridge-7HQ54XYU.js → expert-bridge-VWS3NBL3.js} +4 -4
  44. package/dist/{factory-RW2ROEDS.js → factory-KPJ2EG63.js} +5 -5
  45. package/dist/{factory-QZZQVDGQ.js → factory-MYJYONBQ.js} +8 -8
  46. package/dist/{improvement-review-DGQPADKS.js → improvement-review-APOK4U3Z.js} +5 -5
  47. package/dist/index.d.ts +151 -1
  48. package/dist/index.js +389 -155
  49. package/dist/index.js.map +1 -1
  50. package/dist/{init-opencode-MK2NUEWH.js → init-opencode-Y7WPFCY7.js} +5 -5
  51. package/dist/{issue-triage-RVDZEM53.js → issue-triage-4P3TDIJQ.js} +6 -6
  52. package/dist/{pr-reviewer-helpers-TKXJBDT6.js → pr-reviewer-helpers-4JX2LEVZ.js} +4 -4
  53. package/dist/{registry-command-VXXKVZ3H.js → registry-command-CTYTYRXF.js} +2 -2
  54. package/dist/{repo-security-plan-YCTKRAGA.js → repo-security-plan-4CXBXLAY.js} +3 -3
  55. package/dist/{research-helpers-synthesize-4L6SXYQU.js → research-helpers-synthesize-23OXMV47.js} +4 -4
  56. package/dist/{routing-memory-INY5DC2P.js → routing-memory-AWCOIW27.js} +2 -2
  57. package/dist/security/ast-rules/command-exec-go.yml +15 -0
  58. package/dist/security/ast-rules/dangerous-eval-python.yml +8 -0
  59. package/dist/security/ast-rules/shell-injection-python.yml +13 -0
  60. package/dist/{session-memory-TQMLN67N.js → session-memory-P53QXKGV.js} +3 -3
  61. package/dist/{setup-command-FT5LBTSR.js → setup-command-IRW76CNQ.js} +13 -13
  62. package/dist/{setup-config-U3WLC5OO.js → setup-config-B7WLUMUU.js} +3 -3
  63. package/dist/{setup-custom-api-2E4MZ5MF.js → setup-custom-api-B6QGKSEY.js} +3 -3
  64. package/dist/{tool-memory-IV5BVIV4.js → tool-memory-QUFVINHN.js} +5 -5
  65. package/dist/{unified-registry-6LFTI4MG.js → unified-registry-4NOWT2MU.js} +9 -9
  66. package/dist/{weather-report-7NZ6D4C7.js → weather-report-MCLS5MFZ.js} +2 -2
  67. package/package.json +4 -1
  68. package/src/security/ast-rules/command-exec-go.yml +15 -0
  69. package/src/security/ast-rules/dangerous-eval-python.yml +8 -0
  70. package/src/security/ast-rules/fixtures/sample.go +33 -0
  71. package/src/security/ast-rules/fixtures/sample.py +41 -0
  72. package/src/security/ast-rules/shell-injection-python.yml +13 -0
  73. package/dist/chunk-N7FIUFQL.js.map +0 -1
  74. package/dist/chunk-XGNB7LQB.js.map +0 -1
  75. /package/dist/{child-mcp-config-FJRGAMUU.js.map → child-mcp-config-NW4JZFWC.js.map} +0 -0
  76. /package/dist/{chunk-CHF63T3L.js.map → chunk-25CWEJ2M.js.map} +0 -0
  77. /package/dist/{chunk-MCT7JJF6.js.map → chunk-4KVAHGMB.js.map} +0 -0
  78. /package/dist/{chunk-NT3KCLT6.js.map → chunk-5UDKUPZB.js.map} +0 -0
  79. /package/dist/{chunk-DSMSYENI.js.map → chunk-76Q63KJM.js.map} +0 -0
  80. /package/dist/{chunk-TB26XNJH.js.map → chunk-7AJWIOMT.js.map} +0 -0
  81. /package/dist/{chunk-ZXFIBDT3.js.map → chunk-AJIDYCQG.js.map} +0 -0
  82. /package/dist/{chunk-HNNSCTOI.js.map → chunk-B4XT3B2E.js.map} +0 -0
  83. /package/dist/{chunk-BWG54OJS.js.map → chunk-BTH745HU.js.map} +0 -0
  84. /package/dist/{chunk-SX4E2W3Z.js.map → chunk-CEDSYAAI.js.map} +0 -0
  85. /package/dist/{chunk-3ON2P4WL.js.map → chunk-DLVDFJXU.js.map} +0 -0
  86. /package/dist/{chunk-7S43YASS.js.map → chunk-DYFF72HX.js.map} +0 -0
  87. /package/dist/{chunk-ROCNXZBC.js.map → chunk-E53VLN73.js.map} +0 -0
  88. /package/dist/{chunk-5O4JRXNQ.js.map → chunk-FU2FRL46.js.map} +0 -0
  89. /package/dist/{chunk-4G5W5EPU.js.map → chunk-GJRLIANS.js.map} +0 -0
  90. /package/dist/{chunk-OOFPDA3B.js.map → chunk-IC3NZHPT.js.map} +0 -0
  91. /package/dist/{chunk-PZF67XDY.js.map → chunk-IK7POCXO.js.map} +0 -0
  92. /package/dist/{chunk-IQC2K3KY.js.map → chunk-KP4ZXW3B.js.map} +0 -0
  93. /package/dist/{chunk-Q3UMNYV2.js.map → chunk-LFKCJQ7G.js.map} +0 -0
  94. /package/dist/{chunk-W76DOL27.js.map → chunk-O4J34GZT.js.map} +0 -0
  95. /package/dist/{chunk-WB33EPTV.js.map → chunk-PP5QL4EJ.js.map} +0 -0
  96. /package/dist/{chunk-QXSR5KPG.js.map → chunk-QBCWORAK.js.map} +0 -0
  97. /package/dist/{chunk-JCJHQSAY.js.map → chunk-QFS5VOB6.js.map} +0 -0
  98. /package/dist/{chunk-RO23OT47.js.map → chunk-RAK6PTNM.js.map} +0 -0
  99. /package/dist/{chunk-R46SBPLH.js.map → chunk-RQGORCFM.js.map} +0 -0
  100. /package/dist/{chunk-CD2NZFAI.js.map → chunk-S66XOAMZ.js.map} +0 -0
  101. /package/dist/{chunk-EQRN5FRZ.js.map → chunk-SCHMBRK4.js.map} +0 -0
  102. /package/dist/{chunk-T3VD32JY.js.map → chunk-SUWN54CK.js.map} +0 -0
  103. /package/dist/{chunk-F6HJJG3E.js.map → chunk-SZ3CRNPI.js.map} +0 -0
  104. /package/dist/{chunk-3JH3FMEJ.js.map → chunk-Y7JDXVJA.js.map} +0 -0
  105. /package/dist/{chunk-P7MYTCE6.js.map → chunk-Z5GJ4FXW.js.map} +0 -0
  106. /package/dist/{chunk-HAVBBSYN.js.map → chunk-ZSWXEDI6.js.map} +0 -0
  107. /package/dist/{cli-circuit-breaker-FJQXDC5M.js.map → cli-circuit-breaker-UWJNXHLC.js.map} +0 -0
  108. /package/dist/{composite-router-UQTCPADM.js.map → composite-router-ULDZRQGO.js.map} +0 -0
  109. /package/dist/{consensus-vote-FEDF24T5.js.map → consensus-vote-KF6M7NZJ.js.map} +0 -0
  110. /package/dist/{context-retriever-TIJGFLGO.js.map → context-retriever-73PNAWES.js.map} +0 -0
  111. /package/dist/{doctor-deep-EULAHWTK.js.map → doctor-deep-LURSTTF7.js.map} +0 -0
  112. /package/dist/{expert-bridge-7HQ54XYU.js.map → expert-bridge-VWS3NBL3.js.map} +0 -0
  113. /package/dist/{factory-QZZQVDGQ.js.map → factory-KPJ2EG63.js.map} +0 -0
  114. /package/dist/{factory-RW2ROEDS.js.map → factory-MYJYONBQ.js.map} +0 -0
  115. /package/dist/{improvement-review-DGQPADKS.js.map → improvement-review-APOK4U3Z.js.map} +0 -0
  116. /package/dist/{init-opencode-MK2NUEWH.js.map → init-opencode-Y7WPFCY7.js.map} +0 -0
  117. /package/dist/{issue-triage-RVDZEM53.js.map → issue-triage-4P3TDIJQ.js.map} +0 -0
  118. /package/dist/{pr-reviewer-helpers-TKXJBDT6.js.map → pr-reviewer-helpers-4JX2LEVZ.js.map} +0 -0
  119. /package/dist/{registry-command-VXXKVZ3H.js.map → registry-command-CTYTYRXF.js.map} +0 -0
  120. /package/dist/{repo-security-plan-YCTKRAGA.js.map → repo-security-plan-4CXBXLAY.js.map} +0 -0
  121. /package/dist/{research-helpers-synthesize-4L6SXYQU.js.map → research-helpers-synthesize-23OXMV47.js.map} +0 -0
  122. /package/dist/{routing-memory-INY5DC2P.js.map → routing-memory-AWCOIW27.js.map} +0 -0
  123. /package/dist/{session-memory-TQMLN67N.js.map → session-memory-P53QXKGV.js.map} +0 -0
  124. /package/dist/{setup-command-FT5LBTSR.js.map → setup-command-IRW76CNQ.js.map} +0 -0
  125. /package/dist/{setup-config-U3WLC5OO.js.map → setup-config-B7WLUMUU.js.map} +0 -0
  126. /package/dist/{setup-custom-api-2E4MZ5MF.js.map → setup-custom-api-B6QGKSEY.js.map} +0 -0
  127. /package/dist/{tool-memory-IV5BVIV4.js.map → tool-memory-QUFVINHN.js.map} +0 -0
  128. /package/dist/{unified-registry-6LFTI4MG.js.map → unified-registry-4NOWT2MU.js.map} +0 -0
  129. /package/dist/{weather-report-7NZ6D4C7.js.map → weather-report-MCLS5MFZ.js.map} +0 -0
@@ -15,7 +15,7 @@ import {
15
15
  createLogger,
16
16
  err,
17
17
  ok
18
- } from "./chunk-QXSR5KPG.js";
18
+ } from "./chunk-QBCWORAK.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-JCJHQSAY.js.map
399
+ //# sourceMappingURL=chunk-QFS5VOB6.js.map
@@ -4,7 +4,7 @@ import {
4
4
  err,
5
5
  getErrorMessage,
6
6
  ok
7
- } from "./chunk-QXSR5KPG.js";
7
+ } from "./chunk-QBCWORAK.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-RO23OT47.js.map
266
+ //# sourceMappingURL=chunk-RAK6PTNM.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-RO23OT47.js";
4
+ } from "./chunk-RAK6PTNM.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-SX4E2W3Z.js";
14
+ } from "./chunk-CEDSYAAI.js";
15
15
  import {
16
16
  emitPolicyEvent
17
- } from "./chunk-BWG54OJS.js";
17
+ } from "./chunk-BTH745HU.js";
18
18
  import {
19
19
  CLI_SUBPROCESS_TIMEOUTS,
20
20
  createLogger,
21
21
  err,
22
22
  getTimeProvider,
23
23
  ok
24
- } from "./chunk-QXSR5KPG.js";
24
+ } from "./chunk-QBCWORAK.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-R46SBPLH.js.map
1214
+ //# sourceMappingURL=chunk-RQGORCFM.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getErrorMessage
3
- } from "./chunk-QXSR5KPG.js";
3
+ } from "./chunk-QBCWORAK.js";
4
4
 
5
5
  // src/cli/setup-config.ts
6
6
  import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "fs";
@@ -77,4 +77,4 @@ function ensureBackup(outputPath) {
77
77
  export {
78
78
  runConfigInitSync
79
79
  };
80
- //# sourceMappingURL=chunk-CD2NZFAI.js.map
80
+ //# sourceMappingURL=chunk-S66XOAMZ.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-IQC2K3KY.js";
10
+ } from "./chunk-KP4ZXW3B.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -19,7 +19,7 @@ import {
19
19
  getPipelineEventBus,
20
20
  getTimeProvider,
21
21
  isDeclaredNeverDeprecate
22
- } from "./chunk-QXSR5KPG.js";
22
+ } from "./chunk-QBCWORAK.js";
23
23
  import {
24
24
  getNexusDataDir,
25
25
  nexusDataPath
@@ -2132,4 +2132,4 @@ export {
2132
2132
  runImprovementReview,
2133
2133
  registerImprovementReviewTool
2134
2134
  };
2135
- //# sourceMappingURL=chunk-EQRN5FRZ.js.map
2135
+ //# sourceMappingURL=chunk-SCHMBRK4.js.map
@@ -3,7 +3,7 @@ import {
3
3
  MODEL_IDS,
4
4
  getTimeProvider,
5
5
  resolveModelIdentitySync
6
- } from "./chunk-QXSR5KPG.js";
6
+ } from "./chunk-QBCWORAK.js";
7
7
 
8
8
  // src/config/model-availability.ts
9
9
  var DEFAULT_TTL_MS = 6e4;
@@ -150,4 +150,4 @@ export {
150
150
  resetAvailabilityCache,
151
151
  filterAvailableModels
152
152
  };
153
- //# sourceMappingURL=chunk-T3VD32JY.js.map
153
+ //# sourceMappingURL=chunk-SUWN54CK.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  computeCostDetail
3
- } from "./chunk-TB26XNJH.js";
3
+ } from "./chunk-7AJWIOMT.js";
4
4
  import {
5
5
  DEFAULT_CONSENSUS_CONFIG,
6
6
  DEFAULT_INCREMENTAL_QUORUM_CONFIG,
@@ -18,20 +18,20 @@ import {
18
18
  toolSuccess,
19
19
  withProgressHeartbeat,
20
20
  wrapToolWithTimeout
21
- } from "./chunk-IQC2K3KY.js";
21
+ } from "./chunk-KP4ZXW3B.js";
22
22
  import {
23
23
  getToolMemory
24
- } from "./chunk-Q3UMNYV2.js";
24
+ } from "./chunk-LFKCJQ7G.js";
25
25
  import {
26
26
  createEvent,
27
27
  getGlobalRegistry
28
- } from "./chunk-P7MYTCE6.js";
28
+ } from "./chunk-Z5GJ4FXW.js";
29
29
  import {
30
30
  authRemediation,
31
31
  delay,
32
32
  getAvailableClis,
33
33
  withTimeout
34
- } from "./chunk-NT3KCLT6.js";
34
+ } from "./chunk-5UDKUPZB.js";
35
35
  import {
36
36
  AgentError,
37
37
  CLI_NAMES,
@@ -59,7 +59,7 @@ import {
59
59
  registerPersistentOutcomeStoreFactory,
60
60
  resolveClassGuardMs,
61
61
  resolveVoteTimeout
62
- } from "./chunk-QXSR5KPG.js";
62
+ } from "./chunk-QBCWORAK.js";
63
63
  import {
64
64
  ensureLearningDir,
65
65
  getOutcomesFile
@@ -5866,7 +5866,7 @@ async function processVotesWithCascade(engineVotes, opts) {
5866
5866
  var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
5867
5867
  async function runContrarianCheck(proposal, log) {
5868
5868
  try {
5869
- const { executeExpert } = await import("./expert-bridge-7HQ54XYU.js");
5869
+ const { executeExpert } = await import("./expert-bridge-VWS3NBL3.js");
5870
5870
  const prompt = [
5871
5871
  "You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
5872
5872
  "Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
@@ -6382,4 +6382,4 @@ export {
6382
6382
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
6383
6383
  registerConsensusVoteTool
6384
6384
  };
6385
- //# sourceMappingURL=chunk-F6HJJG3E.js.map
6385
+ //# sourceMappingURL=chunk-SZ3CRNPI.js.map
@@ -2,7 +2,7 @@ import {
2
2
  createLogger,
3
3
  err,
4
4
  ok
5
- } from "./chunk-QXSR5KPG.js";
5
+ } from "./chunk-QBCWORAK.js";
6
6
 
7
7
  // src/scm/token-resolver.ts
8
8
  import { execFile } from "child_process";
@@ -87,4 +87,4 @@ export {
87
87
  hasToken,
88
88
  getTokenEnvVars
89
89
  };
90
- //# sourceMappingURL=chunk-3JH3FMEJ.js.map
90
+ //# sourceMappingURL=chunk-Y7JDXVJA.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generateSecurityPlan
3
- } from "./chunk-HNNSCTOI.js";
3
+ } from "./chunk-B4XT3B2E.js";
4
4
  import {
5
5
  analyzeGitHubRepo
6
6
  } from "./chunk-HFOQKCD2.js";
@@ -21,10 +21,10 @@ import {
21
21
  DEFAULT_TASK_TTL_MS,
22
22
  DEFAULT_TOOL_RATE_LIMITS,
23
23
  clampTaskTtl
24
- } from "./chunk-ROCNXZBC.js";
24
+ } from "./chunk-E53VLN73.js";
25
25
  import {
26
26
  executeExpert
27
- } from "./chunk-4G5W5EPU.js";
27
+ } from "./chunk-GJRLIANS.js";
28
28
  import {
29
29
  JobStatusSchema,
30
30
  abortJob,
@@ -45,21 +45,21 @@ import {
45
45
  simulationDeniedResult,
46
46
  toJobSummary,
47
47
  writeJobCancelled
48
- } from "./chunk-F6HJJG3E.js";
48
+ } from "./chunk-SZ3CRNPI.js";
49
49
  import {
50
50
  normalizeTopicToCanonical,
51
51
  synthesizeResearch
52
- } from "./chunk-7S43YASS.js";
52
+ } from "./chunk-DYFF72HX.js";
53
53
  import {
54
54
  IssueTriage
55
- } from "./chunk-R46SBPLH.js";
55
+ } from "./chunk-RQGORCFM.js";
56
56
  import {
57
57
  resolveEnvMode,
58
58
  sanitizeInput
59
- } from "./chunk-SX4E2W3Z.js";
59
+ } from "./chunk-CEDSYAAI.js";
60
60
  import {
61
61
  withPrerequisite
62
- } from "./chunk-EQRN5FRZ.js";
62
+ } from "./chunk-SCHMBRK4.js";
63
63
  import {
64
64
  NOOP_NOTIFIER,
65
65
  RateLimiter,
@@ -82,13 +82,15 @@ import {
82
82
  withAuditTrail,
83
83
  withProgressHeartbeat,
84
84
  wrapToolWithTimeout
85
- } from "./chunk-IQC2K3KY.js";
85
+ } from "./chunk-KP4ZXW3B.js";
86
86
  import {
87
87
  createAuditTrail,
88
88
  createGraphAuditBridge,
89
89
  emitPipelinePolicyEvent
90
- } from "./chunk-BWG54OJS.js";
90
+ } from "./chunk-BTH745HU.js";
91
91
  import {
92
+ IDENTIFIER_RE,
93
+ LANG_VALUES,
92
94
  addResearchPaper,
93
95
  addSourceToRegistry,
94
96
  computeSourceQualityScore,
@@ -104,26 +106,29 @@ import {
104
106
  discoverSemanticScholar,
105
107
  fetchSource,
106
108
  findOverlaps,
109
+ findUsagesInSource,
107
110
  formatResearchIssueBody,
108
111
  generateStatsJson,
109
112
  getContextForTask,
110
113
  getContextPromptPrefix,
111
114
  getResearchInsightsForTask,
112
115
  getResearchStatus,
116
+ inferLang,
113
117
  inferTaskCategory,
118
+ langToNapi,
114
119
  paperExists,
115
120
  parseRegistry,
116
121
  sourceExistsInRegistry,
117
122
  summarizeContextForPrompt
118
- } from "./chunk-XGNB7LQB.js";
123
+ } from "./chunk-QBOTSJ7S.js";
119
124
  import {
120
125
  getTokenEnvVars,
121
126
  resolveToken
122
- } from "./chunk-3JH3FMEJ.js";
127
+ } from "./chunk-Y7JDXVJA.js";
123
128
  import {
124
129
  loadPapersRegistry,
125
130
  loadTechniquesRegistry
126
- } from "./chunk-HAVBBSYN.js";
131
+ } from "./chunk-ZSWXEDI6.js";
127
132
  import {
128
133
  resolveInsideRoot
129
134
  } from "./chunk-NUBSJGQZ.js";
@@ -132,14 +137,14 @@ import {
132
137
  MemoryImportance,
133
138
  calculateTextJaccardSimilarity,
134
139
  getToolMemory
135
- } from "./chunk-Q3UMNYV2.js";
140
+ } from "./chunk-LFKCJQ7G.js";
136
141
  import {
137
142
  STOPWORDS,
138
143
  truncateWithInfo
139
144
  } from "./chunk-6T3EPABN.js";
140
145
  import {
141
146
  createSessionMemory
142
- } from "./chunk-W76DOL27.js";
147
+ } from "./chunk-O4J34GZT.js";
143
148
  import {
144
149
  BUILT_IN_EXPERTS,
145
150
  BuiltInExpertTypeSchema,
@@ -154,7 +159,7 @@ import {
154
159
  createEvent,
155
160
  getGlobalEventBus,
156
161
  getGlobalRegistry
157
- } from "./chunk-P7MYTCE6.js";
162
+ } from "./chunk-Z5GJ4FXW.js";
158
163
  import {
159
164
  CliDetectionCache,
160
165
  asRecord,
@@ -162,19 +167,19 @@ import {
162
167
  getAvailableClis,
163
168
  sleep,
164
169
  withTimeout
165
- } from "./chunk-NT3KCLT6.js";
170
+ } from "./chunk-5UDKUPZB.js";
166
171
  import {
167
172
  DEFAULTS
168
- } from "./chunk-JCJHQSAY.js";
173
+ } from "./chunk-QFS5VOB6.js";
169
174
  import {
170
175
  getAvailabilityCache,
171
176
  getCliForModelId,
172
177
  resolveFallback
173
- } from "./chunk-T3VD32JY.js";
178
+ } from "./chunk-SUWN54CK.js";
174
179
  import {
175
180
  generateHyphenId,
176
181
  generateUUID
177
- } from "./chunk-OOFPDA3B.js";
182
+ } from "./chunk-IC3NZHPT.js";
178
183
  import {
179
184
  AGENT_ROUTER_TIMEOUTS,
180
185
  API_TIMEOUTS,
@@ -266,7 +271,7 @@ import {
266
271
  selectStrategyByManifest,
267
272
  toExpertTaskAnalysisResult,
268
273
  withStep
269
- } from "./chunk-QXSR5KPG.js";
274
+ } from "./chunk-QBCWORAK.js";
270
275
  import {
271
276
  ensureLearningDir,
272
277
  getMetaOutcomesFile,
@@ -12400,6 +12405,10 @@ var logger4 = createLogger({ component: "self-debug-protocol" });
12400
12405
  // src/agents/collaboration/ast-fixer.ts
12401
12406
  import { Project, SyntaxKind, Node } from "ts-morph";
12402
12407
 
12408
+ // src/agents/collaboration/ast-rewrites.ts
12409
+ import { parse } from "@ast-grep/napi";
12410
+ var FIXER_LANG = langToNapi("typescript");
12411
+
12403
12412
  // src/agents/collaboration/agent-message-router-types.ts
12404
12413
  var DEFAULT_ROUTER_CONFIG = {
12405
12414
  timeoutMs: AGENT_ROUTER_TIMEOUTS.defaultMs,
@@ -26301,7 +26310,7 @@ function execIdFields(executionId) {
26301
26310
  async function populateUnifiedContextOnState(state, options) {
26302
26311
  const taskCandidate = state["task"];
26303
26312
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
26304
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-TIJGFLGO.js");
26313
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-73PNAWES.js");
26305
26314
  const category = inferTaskCategory2(taskCandidate);
26306
26315
  const executionId = options?.executionId;
26307
26316
  const execFields = execIdFields(executionId);
@@ -39851,17 +39860,13 @@ function registerExtractSymbolsTool(server, deps) {
39851
39860
 
39852
39861
  // src/mcp/tools/search-usages-tool.ts
39853
39862
  import { readFile as readFile3 } from "fs/promises";
39854
- import { extname as extname3, relative, resolve as resolve9, sep as sep5 } from "path";
39863
+ import { relative, resolve as resolve9, sep as sep5 } from "path";
39855
39864
  import { z as z81 } from "zod";
39856
- import { Lang, parse as parse2 } from "@ast-grep/napi";
39857
39865
  var DEFAULT_USAGES_LIMIT = 50;
39858
39866
  var MAX_USAGES_LIMIT = 500;
39859
39867
  var DEFAULT_USAGES_MAX_DEPTH = 24;
39860
39868
  var MAX_USAGES_MAX_DEPTH = 64;
39861
39869
  var MAX_FILES_SCANNED = 5e3;
39862
- var MAX_SNIPPET_CHARS = 200;
39863
- var IDENTIFIER_RE = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
39864
- var LANG_VALUES = ["typescript", "tsx", "javascript"];
39865
39870
  var SearchUsagesInputSchema = z81.object({
39866
39871
  symbol: z81.string().min(1).max(200).regex(IDENTIFIER_RE, "symbol must be a single JS identifier (letters, digits, _ or $)").describe("Identifier to find usages/call-sites of (a single JS identifier)"),
39867
39872
  path: z81.string().min(1).max(500).optional().describe("Restrict to a single source file (takes precedence over dir)"),
@@ -39874,85 +39879,6 @@ var SearchUsagesInputSchema = z81.object({
39874
39879
  ),
39875
39880
  maxDepth: z81.number().int().min(1).max(MAX_USAGES_MAX_DEPTH).optional().describe(`Directory walk depth for dir scope (default ${String(DEFAULT_USAGES_MAX_DEPTH)}).`)
39876
39881
  });
39877
- var DECLARATION_PARENT_KINDS = /* @__PURE__ */ new Set([
39878
- "function_declaration",
39879
- "generator_function_declaration",
39880
- "class_declaration",
39881
- "interface_declaration",
39882
- "type_alias_declaration",
39883
- "enum_declaration",
39884
- "function_signature",
39885
- "method_definition",
39886
- "abstract_method_signature"
39887
- ]);
39888
- var IMPORT_PARENT_KINDS = /* @__PURE__ */ new Set([
39889
- "import_specifier",
39890
- "namespace_import",
39891
- "import_clause"
39892
- ]);
39893
- function langToNapi(lang) {
39894
- if (lang === "tsx") return Lang.Tsx;
39895
- if (lang === "javascript") return Lang.JavaScript;
39896
- return Lang.TypeScript;
39897
- }
39898
- function escapeRegex2(value) {
39899
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
39900
- }
39901
- function isDeclaredName(declarator, node) {
39902
- const name = declarator.field("name");
39903
- return name !== null && name.id() === node.id();
39904
- }
39905
- function classifyIdentifier(node) {
39906
- const parent = node.parent();
39907
- if (parent === null) return "reference";
39908
- const pk = String(parent.kind());
39909
- if (DECLARATION_PARENT_KINDS.has(pk)) return null;
39910
- if (pk === "variable_declarator") return isDeclaredName(parent, node) ? null : "reference";
39911
- if (IMPORT_PARENT_KINDS.has(pk)) return "import";
39912
- if (pk === "call_expression") return "call";
39913
- if (pk === "new_expression") return "new";
39914
- return "reference";
39915
- }
39916
- function classifyProperty(node) {
39917
- const member = node.parent();
39918
- const grandparent = member === null ? null : member.parent();
39919
- if (grandparent !== null && String(grandparent.kind()) === "call_expression")
39920
- return "method-call";
39921
- return "reference";
39922
- }
39923
- function toMatch(node, kind, lines) {
39924
- const { start } = node.range();
39925
- const rawLine = lines[start.line] ?? node.text();
39926
- return {
39927
- line: start.line + 1,
39928
- column: start.column + 1,
39929
- kind,
39930
- snippet: rawLine.trim().slice(0, MAX_SNIPPET_CHARS)
39931
- };
39932
- }
39933
- function findUsagesInSource(symbol, src, lang) {
39934
- if (!IDENTIFIER_RE.test(symbol)) return [];
39935
- const root = parse2(langToNapi(lang), src).root();
39936
- const lines = src.split("\n");
39937
- const out = [];
39938
- for (const node of root.findAll(symbol)) {
39939
- const kind = classifyIdentifier(node);
39940
- if (kind !== null) out.push(toMatch(node, kind, lines));
39941
- }
39942
- const propRule = {
39943
- rule: { kind: "property_identifier", regex: `^${escapeRegex2(symbol)}$` }
39944
- };
39945
- for (const node of root.findAll(propRule)) {
39946
- out.push(toMatch(node, classifyProperty(node), lines));
39947
- }
39948
- return out.sort((a, b) => a.line - b.line || a.column - b.column);
39949
- }
39950
- function inferLang(file) {
39951
- const ext = extname3(file).toLowerCase();
39952
- if (ext === ".tsx" || ext === ".jsx") return "tsx";
39953
- if (ext === ".js" || ext === ".mjs" || ext === ".cjs") return "javascript";
39954
- return "typescript";
39955
- }
39956
39882
  function resolveWithinCwd(target) {
39957
39883
  const resolved = resolve9(target);
39958
39884
  const cwdRoot = resolve9(".");
@@ -41885,7 +41811,7 @@ async function tryIssueTriage(task) {
41885
41811
  try {
41886
41812
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
41887
41813
  if (issueMatch === null) return null;
41888
- const { createIssueTriage } = await import("./issue-triage-RVDZEM53.js");
41814
+ const { createIssueTriage } = await import("./issue-triage-4P3TDIJQ.js");
41889
41815
  const triage = createIssueTriage();
41890
41816
  const owner = issueMatch[1] ?? "";
41891
41817
  const num = issueMatch[2] ?? "";
@@ -41913,7 +41839,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
41913
41839
  ]);
41914
41840
  async function classifyWithLLM(task) {
41915
41841
  try {
41916
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-7HQ54XYU.js");
41842
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-VWS3NBL3.js");
41917
41843
  const prompt = [
41918
41844
  "Classify this task into exactly one pipeline template.",
41919
41845
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -43554,7 +43480,7 @@ var memoryInitPromise = null;
43554
43480
  async function initPipelineMemory() {
43555
43481
  if (cachedMemory !== null) return cachedMemory;
43556
43482
  try {
43557
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-TQMLN67N.js");
43483
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-P53QXKGV.js");
43558
43484
  const { getLearningDir } = await import("./learning-persistence-6D5GGT7D.js");
43559
43485
  const mem = createSessionMemory2(getLearningDir());
43560
43486
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -43616,7 +43542,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
43616
43542
  callRecord(routingMemoryCache);
43617
43543
  return;
43618
43544
  }
43619
- routingMemoryInitPromise ??= import("./routing-memory-INY5DC2P.js").then(({ createRoutingMemory }) => {
43545
+ routingMemoryInitPromise ??= import("./routing-memory-AWCOIW27.js").then(({ createRoutingMemory }) => {
43620
43546
  routingMemoryCache ??= createRoutingMemory();
43621
43547
  return routingMemoryCache;
43622
43548
  }).catch((error) => {
@@ -43650,7 +43576,7 @@ ${text}` : "";
43650
43576
  }
43651
43577
  async function getWeatherContext() {
43652
43578
  try {
43653
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-7NZ6D4C7.js");
43579
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-MCLS5MFZ.js");
43654
43580
  const report = generateWeatherReport2({ includeAdaptive: true });
43655
43581
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
43656
43582
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -43668,7 +43594,7 @@ ${lines}
43668
43594
  }
43669
43595
  async function getMemoryContext(task) {
43670
43596
  try {
43671
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-TQMLN67N.js");
43597
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-P53QXKGV.js");
43672
43598
  const { getLearningDir } = await import("./learning-persistence-6D5GGT7D.js");
43673
43599
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
43674
43600
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -43783,7 +43709,7 @@ ${contextBlock}`;
43783
43709
  const strategy = config.votingStrategy ?? "higher_order";
43784
43710
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
43785
43711
  try {
43786
- const { executeVoting } = await import("./consensus-vote-FEDF24T5.js");
43712
+ const { executeVoting } = await import("./consensus-vote-KF6M7NZJ.js");
43787
43713
  const votingResult = await executeVoting(
43788
43714
  {
43789
43715
  proposal: buildVoteProposal(plan, research),
@@ -44224,7 +44150,7 @@ async function searchCodebaseForTask(task) {
44224
44150
  }
44225
44151
  async function queryResearchRegistry(task) {
44226
44152
  try {
44227
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-4L6SXYQU.js");
44153
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-23OXMV47.js");
44228
44154
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
44229
44155
  if (topic === void 0) return null;
44230
44156
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -44295,7 +44221,7 @@ function createScanStageWrapper() {
44295
44221
  try {
44296
44222
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
44297
44223
  if (slug !== void 0) {
44298
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-YCTKRAGA.js");
44224
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-4CXBXLAY.js");
44299
44225
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
44300
44226
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
44301
44227
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -47255,7 +47181,7 @@ var GitHubTaskTracker = class {
47255
47181
  cachedProvider = null;
47256
47182
  async getProvider() {
47257
47183
  if (this.cachedProvider !== null) return this.cachedProvider;
47258
- const { createScmProvider } = await import("./factory-RW2ROEDS.js");
47184
+ const { createScmProvider } = await import("./factory-KPJ2EG63.js");
47259
47185
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
47260
47186
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
47261
47187
  this.cachedProvider = result.value;
@@ -48062,7 +47988,7 @@ async function probeSource(source, includeModelIds) {
48062
47988
  }
48063
47989
  }
48064
47990
  async function defaultSources(includeOpenRouter) {
48065
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-QZZQVDGQ.js");
47991
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-MYJYONBQ.js");
48066
47992
  const adapters = createAllAdapters2();
48067
47993
  return buildDefaultModelSources(adapters, { includeOpenRouter });
48068
47994
  }
@@ -52133,4 +52059,4 @@ export {
52133
52059
  shutdownFeedbackSubscriber,
52134
52060
  createEventBusBridge
52135
52061
  };
52136
- //# sourceMappingURL=chunk-N7FIUFQL.js.map
52062
+ //# sourceMappingURL=chunk-YIQ5Z7LV.js.map