@llm-dev-ops/agentics-cli 1.4.59 → 1.4.69

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 (452) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/agents.d.ts.map +1 -1
  3. package/dist/commands/agents.js +167 -0
  4. package/dist/commands/agents.js.map +1 -1
  5. package/dist/pipeline/auto-chain.d.ts +1 -0
  6. package/dist/pipeline/auto-chain.d.ts.map +1 -1
  7. package/dist/pipeline/auto-chain.js +124 -37
  8. package/dist/pipeline/auto-chain.js.map +1 -1
  9. package/dist/pipeline/execution-context.d.ts.map +1 -1
  10. package/dist/pipeline/execution-context.js +12 -37
  11. package/dist/pipeline/execution-context.js.map +1 -1
  12. package/dist/pipeline/phase2/phases/adr-generator.d.ts.map +1 -1
  13. package/dist/pipeline/phase2/phases/adr-generator.js +160 -1
  14. package/dist/pipeline/phase2/phases/adr-generator.js.map +1 -1
  15. package/dist/pipeline/phase2/phases/ddd-generator.d.ts.map +1 -1
  16. package/dist/pipeline/phase2/phases/ddd-generator.js +400 -3
  17. package/dist/pipeline/phase2/phases/ddd-generator.js.map +1 -1
  18. package/dist/pipeline/phase2/phases/ddd-quality-gate.d.ts +43 -0
  19. package/dist/pipeline/phase2/phases/ddd-quality-gate.d.ts.map +1 -0
  20. package/dist/pipeline/phase2/phases/ddd-quality-gate.js +413 -0
  21. package/dist/pipeline/phase2/phases/ddd-quality-gate.js.map +1 -0
  22. package/dist/pipeline/phase2/phases/research-dossier.d.ts +0 -13
  23. package/dist/pipeline/phase2/phases/research-dossier.d.ts.map +1 -1
  24. package/dist/pipeline/phase2/phases/research-dossier.js +114 -1
  25. package/dist/pipeline/phase2/phases/research-dossier.js.map +1 -1
  26. package/dist/pipeline/phase2/phases/research-quality-gate.d.ts +48 -0
  27. package/dist/pipeline/phase2/phases/research-quality-gate.d.ts.map +1 -0
  28. package/dist/pipeline/phase2/phases/research-quality-gate.js +322 -0
  29. package/dist/pipeline/phase2/phases/research-quality-gate.js.map +1 -0
  30. package/dist/pipeline/phase2/phases/sparc-quality-gate.d.ts +41 -0
  31. package/dist/pipeline/phase2/phases/sparc-quality-gate.d.ts.map +1 -0
  32. package/dist/pipeline/phase2/phases/sparc-quality-gate.js +350 -0
  33. package/dist/pipeline/phase2/phases/sparc-quality-gate.js.map +1 -0
  34. package/dist/pipeline/phase2/phases/sparc-specification.d.ts +14 -0
  35. package/dist/pipeline/phase2/phases/sparc-specification.d.ts.map +1 -1
  36. package/dist/pipeline/phase2/phases/sparc-specification.js +500 -10
  37. package/dist/pipeline/phase2/phases/sparc-specification.js.map +1 -1
  38. package/dist/pipeline/phase2/phases/tdd-plan-generator.js +1 -1
  39. package/dist/pipeline/phase2/phases/tdd-plan-generator.js.map +1 -1
  40. package/dist/pipeline/phase2/phases/tech-stack-detector.d.ts +72 -0
  41. package/dist/pipeline/phase2/phases/tech-stack-detector.d.ts.map +1 -0
  42. package/dist/pipeline/phase2/phases/tech-stack-detector.js +332 -0
  43. package/dist/pipeline/phase2/phases/tech-stack-detector.js.map +1 -0
  44. package/dist/pipeline/phase2/types.d.ts +2 -0
  45. package/dist/pipeline/phase2/types.d.ts.map +1 -1
  46. package/dist/pipeline/phase3/phases/domain-codegen.d.ts.map +1 -1
  47. package/dist/pipeline/phase3/phases/domain-codegen.js +169 -4
  48. package/dist/pipeline/phase3/phases/domain-codegen.js.map +1 -1
  49. package/dist/pipeline/phase3/phases/test-generator.d.ts.map +1 -1
  50. package/dist/pipeline/phase3/phases/test-generator.js +12 -2
  51. package/dist/pipeline/phase3/phases/test-generator.js.map +1 -1
  52. package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.d.ts.map +1 -1
  53. package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.js +99 -1
  54. package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.js.map +1 -1
  55. package/dist/pipeline/phase4/phases/deployment-generator.d.ts +17 -4
  56. package/dist/pipeline/phase4/phases/deployment-generator.d.ts.map +1 -1
  57. package/dist/pipeline/phase4/phases/deployment-generator.js +364 -44
  58. package/dist/pipeline/phase4/phases/deployment-generator.js.map +1 -1
  59. package/dist/pipeline/phase4/phases/erp-client-generator.d.ts.map +1 -1
  60. package/dist/pipeline/phase4/phases/erp-client-generator.js +27 -15
  61. package/dist/pipeline/phase4/phases/erp-client-generator.js.map +1 -1
  62. package/dist/pipeline/phase4/phases/erp-target-resolver.d.ts.map +1 -1
  63. package/dist/pipeline/phase4/phases/erp-target-resolver.js +49 -2
  64. package/dist/pipeline/phase4/phases/erp-target-resolver.js.map +1 -1
  65. package/dist/pipeline/phase4/phases/http-server-generator.d.ts.map +1 -1
  66. package/dist/pipeline/phase4/phases/http-server-generator.js +263 -3
  67. package/dist/pipeline/phase4/phases/http-server-generator.js.map +1 -1
  68. package/dist/pipeline/phase4/phases/infra-adapter-generator.d.ts.map +1 -1
  69. package/dist/pipeline/phase4/phases/infra-adapter-generator.js +335 -37
  70. package/dist/pipeline/phase4/phases/infra-adapter-generator.js.map +1 -1
  71. package/dist/pipeline/phase4/types.d.ts +3 -1
  72. package/dist/pipeline/phase4/types.d.ts.map +1 -1
  73. package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.d.ts.map +1 -1
  74. package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js +211 -2
  75. package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js.map +1 -1
  76. package/dist/pipeline/phase5-build/phases/implementation-quality-gate.d.ts +54 -0
  77. package/dist/pipeline/phase5-build/phases/implementation-quality-gate.d.ts.map +1 -0
  78. package/dist/pipeline/phase5-build/phases/implementation-quality-gate.js +417 -0
  79. package/dist/pipeline/phase5-build/phases/implementation-quality-gate.js.map +1 -0
  80. package/dist/pipeline/phases/prompt-generator.js +1 -1
  81. package/dist/pipeline/phases/prompt-generator.js.map +1 -1
  82. package/dist/pipeline/ruflo-phase-executor.d.ts +116 -1
  83. package/dist/pipeline/ruflo-phase-executor.d.ts.map +1 -1
  84. package/dist/pipeline/ruflo-phase-executor.js +666 -159
  85. package/dist/pipeline/ruflo-phase-executor.js.map +1 -1
  86. package/dist/pipeline/swarm-orchestrator.d.ts.map +1 -1
  87. package/dist/pipeline/swarm-orchestrator.js +62 -6
  88. package/dist/pipeline/swarm-orchestrator.js.map +1 -1
  89. package/dist/routing/capability-classifier.d.ts +43 -0
  90. package/dist/routing/capability-classifier.d.ts.map +1 -0
  91. package/dist/routing/capability-classifier.js +157 -0
  92. package/dist/routing/capability-classifier.js.map +1 -0
  93. package/dist/routing/composition-engine.d.ts +77 -0
  94. package/dist/routing/composition-engine.d.ts.map +1 -0
  95. package/dist/routing/composition-engine.js +249 -0
  96. package/dist/routing/composition-engine.js.map +1 -0
  97. package/dist/routing/graph-federation.d.ts +71 -0
  98. package/dist/routing/graph-federation.d.ts.map +1 -0
  99. package/dist/routing/graph-federation.js +210 -0
  100. package/dist/routing/graph-federation.js.map +1 -0
  101. package/dist/routing/graph-loader.d.ts +74 -0
  102. package/dist/routing/graph-loader.d.ts.map +1 -0
  103. package/dist/routing/graph-loader.js +383 -0
  104. package/dist/routing/graph-loader.js.map +1 -0
  105. package/dist/routing/graph-router.d.ts +103 -0
  106. package/dist/routing/graph-router.d.ts.map +1 -0
  107. package/dist/routing/graph-router.js +415 -0
  108. package/dist/routing/graph-router.js.map +1 -0
  109. package/dist/routing/graph-validator.d.ts +44 -0
  110. package/dist/routing/graph-validator.d.ts.map +1 -0
  111. package/dist/routing/graph-validator.js +329 -0
  112. package/dist/routing/graph-validator.js.map +1 -0
  113. package/dist/routing/index.d.ts +52 -0
  114. package/dist/routing/index.d.ts.map +1 -0
  115. package/dist/routing/index.js +68 -0
  116. package/dist/routing/index.js.map +1 -0
  117. package/dist/routing/outcome-recorder.d.ts +71 -0
  118. package/dist/routing/outcome-recorder.d.ts.map +1 -0
  119. package/dist/routing/outcome-recorder.js +133 -0
  120. package/dist/routing/outcome-recorder.js.map +1 -0
  121. package/dist/routing/weight-adjuster.d.ts +59 -0
  122. package/dist/routing/weight-adjuster.d.ts.map +1 -0
  123. package/dist/routing/weight-adjuster.js +167 -0
  124. package/dist/routing/weight-adjuster.js.map +1 -0
  125. package/dist/routing/weighted-resolver.d.ts +55 -0
  126. package/dist/routing/weighted-resolver.d.ts.map +1 -0
  127. package/dist/routing/weighted-resolver.js +133 -0
  128. package/dist/routing/weighted-resolver.js.map +1 -0
  129. package/dist/synthesis/ask-artifact-writer.d.ts.map +1 -1
  130. package/dist/synthesis/ask-artifact-writer.js +8 -0
  131. package/dist/synthesis/ask-artifact-writer.js.map +1 -1
  132. package/dist/synthesis/simulation-artifact-generator.d.ts +14 -0
  133. package/dist/synthesis/simulation-artifact-generator.d.ts.map +1 -1
  134. package/dist/synthesis/simulation-artifact-generator.js +224 -1
  135. package/dist/synthesis/simulation-artifact-generator.js.map +1 -1
  136. package/dist/synthesis/simulation-renderers.d.ts.map +1 -1
  137. package/dist/synthesis/simulation-renderers.js +211 -40
  138. package/dist/synthesis/simulation-renderers.js.map +1 -1
  139. package/package.json +3 -1
  140. package/scripts/postinstall.sh +25 -0
  141. package/dist/bundled-agents/connector-hub-agents/package-lock.json +0 -11697
  142. package/dist/bundled-agents/connector-hub-agents/package.json +0 -75
  143. package/dist/bundled-agents/connector-hub-agents/tsconfig.build.json +0 -22
  144. package/dist/bundled-agents/connector-hub-agents/tsconfig.json +0 -57
  145. package/dist/bundled-agents/copilot-agents/functions/.gcloudignore +0 -17
  146. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.d.ts +0 -14
  147. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js +0 -35
  148. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js.map +0 -1
  149. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.d.ts +0 -55
  150. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js +0 -40
  151. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js.map +0 -1
  152. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.d.ts +0 -22
  153. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js +0 -38
  154. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js.map +0 -1
  155. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.d.ts +0 -34
  156. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js +0 -186
  157. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js.map +0 -1
  158. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.d.ts +0 -36
  159. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js +0 -121
  160. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js.map +0 -1
  161. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.d.ts +0 -157
  162. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js +0 -948
  163. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js.map +0 -1
  164. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.d.ts +0 -9
  165. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js +0 -27
  166. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js.map +0 -1
  167. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
  168. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js +0 -50
  169. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js.map +0 -1
  170. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.d.ts +0 -214
  171. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js +0 -91
  172. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js.map +0 -1
  173. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.d.ts +0 -1166
  174. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js +0 -308
  175. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js.map +0 -1
  176. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.d.ts +0 -59
  177. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js +0 -62
  178. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js.map +0 -1
  179. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.d.ts +0 -400
  180. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js +0 -113
  181. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js.map +0 -1
  182. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.d.ts +0 -250
  183. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js +0 -169
  184. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js.map +0 -1
  185. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.d.ts +0 -17
  186. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js +0 -97
  187. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js.map +0 -1
  188. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
  189. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js +0 -246
  190. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js.map +0 -1
  191. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1085
  192. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js +0 -218
  193. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
  194. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -949
  195. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js +0 -253
  196. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
  197. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -657
  198. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js +0 -205
  199. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
  200. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.d.ts +0 -285
  201. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js +0 -106
  202. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js.map +0 -1
  203. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.d.ts +0 -581
  204. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js +0 -136
  205. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js.map +0 -1
  206. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.d.ts +0 -791
  207. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js +0 -225
  208. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js.map +0 -1
  209. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.d.ts +0 -120
  210. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js +0 -535
  211. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js.map +0 -1
  212. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.d.ts +0 -9
  213. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js +0 -18
  214. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js.map +0 -1
  215. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.d.ts +0 -4
  216. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js +0 -9
  217. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js.map +0 -1
  218. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
  219. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
  220. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
  221. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.d.ts +0 -10
  222. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js +0 -25
  223. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js.map +0 -1
  224. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
  225. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
  226. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
  227. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.d.ts +0 -11
  228. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js +0 -25
  229. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js.map +0 -1
  230. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.d.ts +0 -6
  231. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js +0 -15
  232. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js.map +0 -1
  233. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
  234. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
  235. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
  236. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
  237. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
  238. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
  239. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.d.ts +0 -73
  240. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js +0 -192
  241. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js.map +0 -1
  242. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.d.ts +0 -11
  243. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js +0 -25
  244. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js.map +0 -1
  245. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.d.ts +0 -127
  246. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js +0 -483
  247. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js.map +0 -1
  248. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.d.ts +0 -49
  249. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js +0 -125
  250. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js.map +0 -1
  251. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.d.ts +0 -73
  252. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js +0 -192
  253. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js.map +0 -1
  254. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.d.ts +0 -11
  255. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js +0 -27
  256. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js.map +0 -1
  257. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.d.ts +0 -122
  258. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js +0 -645
  259. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js.map +0 -1
  260. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.d.ts +0 -59
  261. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js +0 -156
  262. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js.map +0 -1
  263. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.d.ts +0 -88
  264. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js +0 -246
  265. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js.map +0 -1
  266. package/dist/bundled-agents/copilot-agents/functions/index.js +0 -4
  267. package/dist/bundled-agents/copilot-agents/functions/jest.config.js +0 -29
  268. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.d.ts +0 -14
  269. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js +0 -35
  270. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js.map +0 -1
  271. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.d.ts +0 -27
  272. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js +0 -21
  273. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js.map +0 -1
  274. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.d.ts +0 -22
  275. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js +0 -38
  276. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js.map +0 -1
  277. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.d.ts +0 -34
  278. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js +0 -174
  279. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js.map +0 -1
  280. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.d.ts +0 -27
  281. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js +0 -107
  282. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js.map +0 -1
  283. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.d.ts +0 -157
  284. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js +0 -941
  285. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js.map +0 -1
  286. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.d.ts +0 -9
  287. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js +0 -27
  288. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js.map +0 -1
  289. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
  290. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js +0 -50
  291. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js.map +0 -1
  292. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.d.ts +0 -185
  293. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js +0 -86
  294. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js.map +0 -1
  295. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.d.ts +0 -1081
  296. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js +0 -305
  297. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js.map +0 -1
  298. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.d.ts +0 -59
  299. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js +0 -62
  300. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js.map +0 -1
  301. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.d.ts +0 -315
  302. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js +0 -110
  303. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js.map +0 -1
  304. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.d.ts +0 -250
  305. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js +0 -169
  306. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js.map +0 -1
  307. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.d.ts +0 -16
  308. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js +0 -88
  309. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js.map +0 -1
  310. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
  311. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js +0 -246
  312. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js.map +0 -1
  313. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1000
  314. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js +0 -215
  315. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
  316. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -864
  317. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js +0 -250
  318. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
  319. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -572
  320. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js +0 -202
  321. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
  322. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.d.ts +0 -496
  323. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js +0 -133
  324. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js.map +0 -1
  325. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.d.ts +0 -706
  326. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js +0 -222
  327. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js.map +0 -1
  328. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.d.ts +0 -107
  329. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js +0 -360
  330. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js.map +0 -1
  331. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.d.ts +0 -9
  332. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js +0 -18
  333. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js.map +0 -1
  334. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.d.ts +0 -4
  335. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js +0 -9
  336. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js.map +0 -1
  337. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
  338. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
  339. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
  340. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.d.ts +0 -10
  341. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js +0 -25
  342. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js.map +0 -1
  343. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
  344. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
  345. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
  346. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.d.ts +0 -11
  347. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js +0 -25
  348. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js.map +0 -1
  349. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.d.ts +0 -6
  350. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js +0 -15
  351. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js.map +0 -1
  352. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
  353. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
  354. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
  355. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
  356. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
  357. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
  358. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.d.ts +0 -73
  359. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js +0 -192
  360. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js.map +0 -1
  361. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.d.ts +0 -11
  362. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js +0 -25
  363. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js.map +0 -1
  364. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.d.ts +0 -119
  365. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js +0 -421
  366. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js.map +0 -1
  367. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.d.ts +0 -49
  368. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js +0 -125
  369. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js.map +0 -1
  370. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.d.ts +0 -73
  371. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js +0 -192
  372. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js.map +0 -1
  373. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.d.ts +0 -11
  374. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js +0 -27
  375. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js.map +0 -1
  376. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.d.ts +0 -122
  377. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js +0 -645
  378. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js.map +0 -1
  379. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.d.ts +0 -59
  380. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js +0 -156
  381. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js.map +0 -1
  382. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.d.ts +0 -88
  383. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js +0 -246
  384. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js.map +0 -1
  385. package/dist/bundled-agents/copilot-agents/functions/package-lock.json +0 -5473
  386. package/dist/bundled-agents/copilot-agents/functions/package.json +0 -40
  387. package/dist/bundled-agents/copilot-agents/functions/src/claude.ts +0 -71
  388. package/dist/bundled-agents/copilot-agents/functions/src/cors.ts +0 -36
  389. package/dist/bundled-agents/copilot-agents/functions/src/envelope.ts +0 -77
  390. package/dist/bundled-agents/copilot-agents/functions/src/handler.test.ts +0 -340
  391. package/dist/bundled-agents/copilot-agents/functions/src/health.ts +0 -53
  392. package/dist/bundled-agents/copilot-agents/functions/src/index.ts +0 -201
  393. package/dist/bundled-agents/copilot-agents/functions/src/router.ts +0 -148
  394. package/dist/bundled-agents/copilot-agents/functions/tsconfig.json +0 -31
  395. package/dist/bundled-agents/copilot-agents/package-lock.json +0 -11825
  396. package/dist/bundled-agents/copilot-agents/package.json +0 -5
  397. package/dist/bundled-agents/governance-dashboard-agents/package-lock.json +0 -8282
  398. package/dist/bundled-agents/governance-dashboard-agents/package.json +0 -13
  399. package/dist/bundled-agents/orchestrator-agents/functions/contracts/index.js +0 -590
  400. package/dist/bundled-agents/orchestrator-agents/functions/index.js +0 -442
  401. package/dist/bundled-agents/orchestrator-agents/functions/test.js +0 -325
  402. package/dist/bundled-agents/orchestrator-agents/index.js +0 -6
  403. package/dist/bundled-agents/orchestrator-agents/package-lock.json +0 -13254
  404. package/dist/bundled-agents/orchestrator-agents/package.json +0 -20
  405. package/dist/bundled-agents/platform-agents/package-lock.json +0 -1723
  406. package/dist/bundled-agents/platform-agents/package.json +0 -22
  407. package/dist/bundled-agents/platform-agents/src/agents/decision-memo.ts +0 -463
  408. package/dist/bundled-agents/platform-agents/src/agents/decision.ts +0 -234
  409. package/dist/bundled-agents/platform-agents/src/agents/executive-summary.ts +0 -229
  410. package/dist/bundled-agents/platform-agents/src/agents/risk-score.ts +0 -327
  411. package/dist/bundled-agents/platform-agents/src/claude.ts +0 -71
  412. package/dist/bundled-agents/platform-agents/src/cors.ts +0 -24
  413. package/dist/bundled-agents/platform-agents/src/envelope.ts +0 -37
  414. package/dist/bundled-agents/platform-agents/src/health.ts +0 -20
  415. package/dist/bundled-agents/platform-agents/src/index.ts +0 -171
  416. package/dist/bundled-agents/platform-agents/src/router.ts +0 -38
  417. package/dist/bundled-agents/platform-agents/src/text-analysis.ts +0 -238
  418. package/dist/bundled-agents/platform-agents/tsconfig.json +0 -19
  419. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts +0 -3
  420. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts.map +0 -1
  421. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js +0 -43
  422. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js.map +0 -1
  423. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts +0 -3
  424. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts.map +0 -1
  425. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js +0 -30
  426. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js.map +0 -1
  427. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts +0 -3
  428. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts.map +0 -1
  429. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js +0 -53
  430. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js.map +0 -1
  431. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts +0 -3
  432. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts.map +0 -1
  433. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js +0 -51
  434. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js.map +0 -1
  435. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts +0 -3
  436. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts.map +0 -1
  437. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js +0 -36
  438. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js.map +0 -1
  439. package/dist/bundled-agents/sentinel-agents/lib/index.d.ts +0 -2
  440. package/dist/bundled-agents/sentinel-agents/lib/index.d.ts.map +0 -1
  441. package/dist/bundled-agents/sentinel-agents/lib/index.js +0 -70
  442. package/dist/bundled-agents/sentinel-agents/lib/index.js.map +0 -1
  443. package/dist/bundled-agents/sentinel-agents/package-lock.json +0 -12591
  444. package/dist/bundled-agents/sentinel-agents/package.json +0 -62
  445. package/dist/bundled-agents/sentinel-agents/src/agents/alert.ts +0 -46
  446. package/dist/bundled-agents/sentinel-agents/src/agents/anomaly.ts +0 -33
  447. package/dist/bundled-agents/sentinel-agents/src/agents/correlation.ts +0 -56
  448. package/dist/bundled-agents/sentinel-agents/src/agents/drift.ts +0 -54
  449. package/dist/bundled-agents/sentinel-agents/src/agents/rca.ts +0 -38
  450. package/dist/bundled-agents/sentinel-agents/src/claude.ts +0 -71
  451. package/dist/bundled-agents/sentinel-agents/src/index.ts +0 -77
  452. package/dist/bundled-agents/sentinel-agents/tsconfig.json +0 -20
@@ -1,941 +0,0 @@
1
- "use strict";
2
- /**
3
- * Config Validation Agent
4
- *
5
- * Purpose: Validate configuration artifacts for structural and semantic correctness
6
- * Classification: CONFIGURATION_VALIDATION, STATIC_ANALYSIS
7
- * decision_type: config_validation
8
- *
9
- * Scope:
10
- * - Validate schemas
11
- * - Validate semantic constraints
12
- * - Detect missing, conflicting, deprecated, or unsafe values
13
- * - Assess configuration readiness
14
- *
15
- * CONSTITUTION COMPLIANCE:
16
- * ✓ Stateless at runtime
17
- * ✓ Emits exactly ONE DecisionEvent per invocation
18
- * ✓ Persists ONLY via ruvector-service
19
- * ✓ NEVER connects directly to databases
20
- * ✓ NEVER executes SQL
21
- * ✓ NEVER modifies runtime behavior
22
- * ✓ NEVER orchestrates other agents
23
- * ✓ NEVER enforces policy
24
- * ✓ NEVER intercepts execution paths
25
- *
26
- * Must Never:
27
- * - Modify configuration
28
- * - Apply defaults
29
- * - Auto-fix values
30
- * - Enforce policy
31
- * - Block execution
32
- */
33
- Object.defineProperty(exports, "__esModule", { value: true });
34
- exports.ConfigValidationAgent = void 0;
35
- const crypto_1 = require("crypto");
36
- const uuid_1 = require("uuid");
37
- const contracts_1 = require("../contracts");
38
- const AGENT_ID = 'config-validation-agent';
39
- const AGENT_VERSION = '1.0.0';
40
- const DECISION_TYPE = 'config_validation';
41
- /**
42
- * Config Validation Agent Implementation
43
- *
44
- * This agent analyzes configuration artifacts and produces validation reports.
45
- * It is purely analytical - it NEVER modifies, applies defaults, or auto-fixes.
46
- */
47
- class ConfigValidationAgent {
48
- metadata = {
49
- id: AGENT_ID,
50
- name: 'Config Validation Agent',
51
- version: AGENT_VERSION,
52
- classifications: [
53
- contracts_1.AgentClassification.CONFIGURATION_VALIDATION,
54
- contracts_1.AgentClassification.STATIC_ANALYSIS,
55
- ],
56
- decision_type: DECISION_TYPE,
57
- description: 'Validates configuration artifacts for structural and semantic correctness without modification.',
58
- };
59
- persistence;
60
- telemetry;
61
- constructor(persistence, telemetry) {
62
- this.persistence = persistence;
63
- this.telemetry = telemetry;
64
- }
65
- /**
66
- * Validate input against ConfigValidationInputSchema
67
- */
68
- validateInput(input) {
69
- return contracts_1.ConfigValidationInputSchema.parse(input);
70
- }
71
- /**
72
- * Invoke the config validation agent
73
- *
74
- * DETERMINISTIC: Same input always produces same output structure
75
- * STATELESS: No internal state modified
76
- * NON-BLOCKING: Fully async
77
- */
78
- async invoke(input, executionRef) {
79
- const startTime = Date.now();
80
- try {
81
- // Emit telemetry start
82
- this.telemetry.recordStart(AGENT_ID, executionRef, input);
83
- // Perform validation (pure analysis, no side effects)
84
- const output = this.validateConfig(input, startTime);
85
- // Validate output
86
- const validatedOutput = contracts_1.ConfigValidationOutputSchema.parse(output);
87
- // Calculate confidence based on validation completeness
88
- const confidence = this.calculateConfidence(validatedOutput);
89
- // Constraints applied during validation
90
- const constraintsApplied = this.getAppliedConstraints(input);
91
- // Create the DecisionEvent
92
- const event = (0, contracts_1.createDecisionEvent)(AGENT_ID, AGENT_VERSION, DECISION_TYPE, input, validatedOutput, confidence, constraintsApplied, executionRef);
93
- // Persist via ruvector-service (best-effort, non-blocking)
94
- let persistence_status;
95
- try {
96
- await this.persistence.store(event);
97
- persistence_status = { status: 'persisted' };
98
- }
99
- catch (persistError) {
100
- const persistMessage = persistError instanceof Error ? persistError.message : 'Unknown persistence error';
101
- console.error(`[${AGENT_ID}] RuVector persistence failed (non-blocking): ${persistMessage}`);
102
- persistence_status = { status: 'skipped', error: persistMessage };
103
- }
104
- // Emit telemetry success
105
- this.telemetry.recordSuccess(AGENT_ID, executionRef, Date.now() - startTime);
106
- return {
107
- status: 'success',
108
- event,
109
- persistence_status,
110
- };
111
- }
112
- catch (error) {
113
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
114
- const errorCode = this.classifyError(error);
115
- // Emit telemetry failure
116
- this.telemetry.recordFailure(AGENT_ID, executionRef, errorCode, errorMessage);
117
- return (0, contracts_1.createErrorResult)(errorCode, errorMessage, executionRef);
118
- }
119
- }
120
- /**
121
- * Perform configuration validation
122
- *
123
- * This is the core validation logic - purely analytical.
124
- * NEVER modifies, applies defaults, or auto-fixes anything.
125
- */
126
- validateConfig(input, startTime) {
127
- const validationId = (0, uuid_1.v4)();
128
- const options = input.options || {};
129
- // Collect all findings
130
- const findings = [];
131
- // Schema validation
132
- const schemaValidation = this.validateSchema(input, findings);
133
- // Semantic constraint validation
134
- const semanticConstraints = this.checkSemanticConstraints(input, findings);
135
- // Check for deprecated values
136
- const deprecatedValues = options.check_deprecated !== false
137
- ? this.detectDeprecatedValues(input, findings)
138
- : [];
139
- // Check for unsafe configurations
140
- const unsafeConfigs = options.check_security !== false
141
- ? this.detectUnsafeConfigs(input, findings)
142
- : [];
143
- // Check for conflicts
144
- const conflicts = options.check_conflicts !== false
145
- ? this.detectConflicts(input, findings)
146
- : [];
147
- // Check for missing required values
148
- const missingConfigs = options.check_missing !== false
149
- ? this.detectMissingConfigs(input, findings)
150
- : [];
151
- // Assess readiness
152
- const readiness = this.assessReadiness(findings, input);
153
- // Calculate summary
154
- const summary = this.calculateSummary(findings, input);
155
- // Determine overall validity
156
- const valid = this.determineValidity(findings, options.strict || false);
157
- return {
158
- validation_id: validationId,
159
- valid,
160
- schema_validation: schemaValidation,
161
- semantic_constraints: semanticConstraints,
162
- findings,
163
- deprecated_values: deprecatedValues,
164
- unsafe_configs: unsafeConfigs,
165
- conflicts,
166
- missing_configs: missingConfigs,
167
- readiness,
168
- summary,
169
- metadata: {
170
- config_hash: this.hashConfig(input.config),
171
- validated_at: new Date().toISOString(),
172
- validation_duration_ms: Date.now() - startTime,
173
- schema_used: input.schema?.uri,
174
- },
175
- };
176
- }
177
- /**
178
- * Validate against schema if provided
179
- */
180
- validateSchema(input, findings) {
181
- const result = {
182
- valid: true,
183
- findings: [],
184
- };
185
- if (!input.schema) {
186
- // No schema provided - cannot validate schema compliance
187
- findings.push({
188
- finding_id: `schema-001`,
189
- category: 'schema',
190
- severity: 'info',
191
- path: '$',
192
- message: 'No schema provided for validation',
193
- tags: ['schema', 'skipped'],
194
- });
195
- return result;
196
- }
197
- result.schema_id = input.schema.uri;
198
- result.schema_version = input.schema.format;
199
- // Basic type validation based on schema
200
- if (input.schema.content && typeof input.schema.content === 'object') {
201
- const schemaContent = input.schema.content;
202
- this.validateAgainstSchema(input.config, schemaContent, '$', result.findings);
203
- }
204
- result.valid = !result.findings.some(f => f.severity === 'error' || f.severity === 'critical');
205
- findings.push(...result.findings);
206
- return result;
207
- }
208
- /**
209
- * Recursive schema validation
210
- */
211
- validateAgainstSchema(config, schema, path, findings) {
212
- const properties = schema.properties;
213
- const required = schema.required;
214
- // Check required properties
215
- if (required) {
216
- for (const requiredProp of required) {
217
- if (!(requiredProp in config)) {
218
- findings.push({
219
- finding_id: `schema-req-${path}-${requiredProp}`,
220
- category: 'schema',
221
- severity: 'error',
222
- path: `${path}.${requiredProp}`,
223
- message: `Required property '${requiredProp}' is missing`,
224
- expected: 'property to exist',
225
- tags: ['schema', 'required'],
226
- });
227
- }
228
- }
229
- }
230
- // Check property types
231
- if (properties) {
232
- for (const [propName, propSchema] of Object.entries(properties)) {
233
- const value = config[propName];
234
- if (value !== undefined && propSchema.type) {
235
- const actualType = Array.isArray(value) ? 'array' : typeof value;
236
- if (actualType !== propSchema.type && propSchema.type !== 'any') {
237
- findings.push({
238
- finding_id: `schema-type-${path}-${propName}`,
239
- category: 'type_mismatch',
240
- severity: 'error',
241
- path: `${path}.${propName}`,
242
- message: `Type mismatch: expected '${propSchema.type}', got '${actualType}'`,
243
- actual_value: value,
244
- expected: propSchema.type,
245
- tags: ['schema', 'type'],
246
- });
247
- }
248
- }
249
- }
250
- }
251
- }
252
- /**
253
- * Check semantic constraints
254
- */
255
- checkSemanticConstraints(input, findings) {
256
- const constraints = [];
257
- // Built-in semantic checks
258
- constraints.push(this.checkPortRanges(input.config, findings));
259
- constraints.push(this.checkUrlFormats(input.config, findings));
260
- constraints.push(this.checkTimeoutValues(input.config, findings));
261
- constraints.push(this.checkMemoryValues(input.config, findings));
262
- // Custom constraints from input
263
- if (input.context?.constraints) {
264
- for (const customConstraint of input.context.constraints) {
265
- constraints.push(this.evaluateCustomConstraint(customConstraint, input.config, findings));
266
- }
267
- }
268
- return constraints.filter(c => c !== null);
269
- }
270
- /**
271
- * Check port ranges are valid
272
- */
273
- checkPortRanges(config, findings) {
274
- const paths = [];
275
- let passed = true;
276
- const checkValue = (obj, path) => {
277
- if (typeof obj !== 'object' || obj === null)
278
- return;
279
- for (const [key, value] of Object.entries(obj)) {
280
- const currentPath = `${path}.${key}`;
281
- if (key.toLowerCase().includes('port')) {
282
- paths.push(currentPath);
283
- if (typeof value === 'number' && (value < 0 || value > 65535)) {
284
- passed = false;
285
- findings.push({
286
- finding_id: `semantic-port-${currentPath}`,
287
- category: 'semantic',
288
- severity: 'error',
289
- path: currentPath,
290
- message: `Port value ${value} is out of valid range (0-65535)`,
291
- actual_value: value,
292
- expected: '0-65535',
293
- tags: ['semantic', 'port'],
294
- });
295
- }
296
- }
297
- if (typeof value === 'object') {
298
- checkValue(value, currentPath);
299
- }
300
- }
301
- };
302
- checkValue(config, '$');
303
- return {
304
- constraint_id: 'port-range-valid',
305
- name: 'Valid Port Ranges',
306
- description: 'All port values must be between 0 and 65535',
307
- passed,
308
- paths,
309
- };
310
- }
311
- /**
312
- * Check URL formats are valid
313
- */
314
- checkUrlFormats(config, findings) {
315
- const paths = [];
316
- let passed = true;
317
- const urlPattern = /^(https?|wss?|ftp):\/\/[^\s/$.?#].[^\s]*$/i;
318
- const checkValue = (obj, path) => {
319
- if (typeof obj !== 'object' || obj === null)
320
- return;
321
- for (const [key, value] of Object.entries(obj)) {
322
- const currentPath = `${path}.${key}`;
323
- if (key.toLowerCase().includes('url') || key.toLowerCase().includes('endpoint')) {
324
- paths.push(currentPath);
325
- if (typeof value === 'string' && value.length > 0 && !urlPattern.test(value)) {
326
- passed = false;
327
- findings.push({
328
- finding_id: `semantic-url-${currentPath}`,
329
- category: 'semantic',
330
- severity: 'warning',
331
- path: currentPath,
332
- message: `Value '${value}' does not appear to be a valid URL`,
333
- actual_value: value,
334
- expected: 'valid URL format',
335
- tags: ['semantic', 'url'],
336
- });
337
- }
338
- }
339
- if (typeof value === 'object') {
340
- checkValue(value, currentPath);
341
- }
342
- }
343
- };
344
- checkValue(config, '$');
345
- return {
346
- constraint_id: 'url-format-valid',
347
- name: 'Valid URL Formats',
348
- description: 'URL values should be properly formatted',
349
- passed,
350
- paths,
351
- };
352
- }
353
- /**
354
- * Check timeout values are reasonable
355
- */
356
- checkTimeoutValues(config, findings) {
357
- const paths = [];
358
- let passed = true;
359
- const checkValue = (obj, path) => {
360
- if (typeof obj !== 'object' || obj === null)
361
- return;
362
- for (const [key, value] of Object.entries(obj)) {
363
- const currentPath = `${path}.${key}`;
364
- if (key.toLowerCase().includes('timeout')) {
365
- paths.push(currentPath);
366
- if (typeof value === 'number') {
367
- if (value < 0) {
368
- passed = false;
369
- findings.push({
370
- finding_id: `semantic-timeout-neg-${currentPath}`,
371
- category: 'semantic',
372
- severity: 'error',
373
- path: currentPath,
374
- message: `Timeout value ${value} is negative`,
375
- actual_value: value,
376
- expected: 'positive number',
377
- tags: ['semantic', 'timeout'],
378
- });
379
- }
380
- else if (value > 3600000) { // More than 1 hour in ms
381
- findings.push({
382
- finding_id: `semantic-timeout-high-${currentPath}`,
383
- category: 'semantic',
384
- severity: 'warning',
385
- path: currentPath,
386
- message: `Timeout value ${value}ms is unusually high (>1 hour)`,
387
- actual_value: value,
388
- tags: ['semantic', 'timeout', 'suspicious'],
389
- });
390
- }
391
- }
392
- }
393
- if (typeof value === 'object') {
394
- checkValue(value, currentPath);
395
- }
396
- }
397
- };
398
- checkValue(config, '$');
399
- return {
400
- constraint_id: 'timeout-values-valid',
401
- name: 'Valid Timeout Values',
402
- description: 'Timeout values should be positive and reasonable',
403
- passed,
404
- paths,
405
- };
406
- }
407
- /**
408
- * Check memory values are reasonable
409
- */
410
- checkMemoryValues(config, findings) {
411
- const paths = [];
412
- let passed = true;
413
- const checkValue = (obj, path) => {
414
- if (typeof obj !== 'object' || obj === null)
415
- return;
416
- for (const [key, value] of Object.entries(obj)) {
417
- const currentPath = `${path}.${key}`;
418
- if (key.toLowerCase().includes('memory') || key.toLowerCase().includes('heap')) {
419
- paths.push(currentPath);
420
- if (typeof value === 'number' && value < 0) {
421
- passed = false;
422
- findings.push({
423
- finding_id: `semantic-memory-${currentPath}`,
424
- category: 'semantic',
425
- severity: 'error',
426
- path: currentPath,
427
- message: `Memory value ${value} is negative`,
428
- actual_value: value,
429
- expected: 'positive number',
430
- tags: ['semantic', 'memory'],
431
- });
432
- }
433
- }
434
- if (typeof value === 'object') {
435
- checkValue(value, currentPath);
436
- }
437
- }
438
- };
439
- checkValue(config, '$');
440
- return {
441
- constraint_id: 'memory-values-valid',
442
- name: 'Valid Memory Values',
443
- description: 'Memory values should be positive',
444
- passed,
445
- paths,
446
- };
447
- }
448
- /**
449
- * Evaluate a custom constraint
450
- */
451
- evaluateCustomConstraint(constraint, config, findings) {
452
- // Simple path-based check (e.g., "$.database.host exists")
453
- const match = constraint.check.match(/^\$\.([a-zA-Z0-9_.]+)\s+(exists|equals|contains)\s*(.*)$/);
454
- if (!match) {
455
- return {
456
- constraint_id: `custom-${constraint.name.replace(/\s+/g, '-').toLowerCase()}`,
457
- name: constraint.name,
458
- description: constraint.description,
459
- passed: true, // Cannot evaluate, assume passed
460
- paths: [],
461
- failure_detail: 'Could not parse constraint expression',
462
- };
463
- }
464
- const [, pathStr, operator, expectedValue] = match;
465
- const path = pathStr.split('.');
466
- let value = config;
467
- for (const segment of path) {
468
- if (typeof value === 'object' && value !== null && segment in value) {
469
- value = value[segment];
470
- }
471
- else {
472
- value = undefined;
473
- break;
474
- }
475
- }
476
- let passed = false;
477
- const fullPath = `$.${pathStr}`;
478
- switch (operator) {
479
- case 'exists':
480
- passed = value !== undefined;
481
- break;
482
- case 'equals':
483
- passed = String(value) === expectedValue.trim();
484
- break;
485
- case 'contains':
486
- passed = typeof value === 'string' && value.includes(expectedValue.trim());
487
- break;
488
- }
489
- if (!passed) {
490
- findings.push({
491
- finding_id: `custom-${constraint.name.replace(/\s+/g, '-').toLowerCase()}`,
492
- category: 'constraint',
493
- severity: 'warning',
494
- path: fullPath,
495
- message: `Custom constraint '${constraint.name}' failed: ${constraint.description}`,
496
- actual_value: value,
497
- expected: constraint.check,
498
- tags: ['custom', 'constraint'],
499
- });
500
- }
501
- return {
502
- constraint_id: `custom-${constraint.name.replace(/\s+/g, '-').toLowerCase()}`,
503
- name: constraint.name,
504
- description: constraint.description,
505
- passed,
506
- paths: [fullPath],
507
- failure_detail: passed ? undefined : `Expected: ${constraint.check}`,
508
- };
509
- }
510
- /**
511
- * Detect deprecated values
512
- */
513
- detectDeprecatedValues(input, findings) {
514
- const deprecated = [];
515
- const deprecatedKeys = input.context?.deprecated_keys || [];
516
- // Common deprecated patterns
517
- const commonDeprecated = [
518
- { key: 'ssl', replacement: 'tls', since: '2.0.0' },
519
- { key: 'callback', replacement: 'async/await', since: '3.0.0' },
520
- { key: 'masterKey', replacement: 'primaryKey', since: '2.5.0' },
521
- { key: 'whitelist', replacement: 'allowlist', since: '3.0.0' },
522
- { key: 'blacklist', replacement: 'blocklist', since: '3.0.0' },
523
- ];
524
- const checkValue = (obj, path) => {
525
- if (typeof obj !== 'object' || obj === null)
526
- return;
527
- for (const [key, value] of Object.entries(obj)) {
528
- const currentPath = `${path}.${key}`;
529
- const keyLower = key.toLowerCase();
530
- // Check against user-specified deprecated keys
531
- if (deprecatedKeys.includes(key)) {
532
- deprecated.push({
533
- path: currentPath,
534
- value,
535
- });
536
- findings.push({
537
- finding_id: `deprecated-user-${currentPath}`,
538
- category: 'deprecated',
539
- severity: 'warning',
540
- path: currentPath,
541
- message: `Key '${key}' is marked as deprecated`,
542
- actual_value: value,
543
- tags: ['deprecated', 'user-defined'],
544
- });
545
- }
546
- // Check against common deprecated patterns
547
- for (const dep of commonDeprecated) {
548
- if (keyLower.includes(dep.key)) {
549
- deprecated.push({
550
- path: currentPath,
551
- value,
552
- deprecated_since: dep.since,
553
- suggested_replacement: dep.replacement,
554
- });
555
- findings.push({
556
- finding_id: `deprecated-common-${currentPath}`,
557
- category: 'deprecated',
558
- severity: 'info',
559
- path: currentPath,
560
- message: `Key '${key}' may use deprecated terminology. Consider using '${dep.replacement}' instead.`,
561
- actual_value: value,
562
- tags: ['deprecated', 'common-pattern'],
563
- });
564
- }
565
- }
566
- if (typeof value === 'object') {
567
- checkValue(value, currentPath);
568
- }
569
- }
570
- };
571
- checkValue(input.config, '$');
572
- return deprecated;
573
- }
574
- /**
575
- * Detect unsafe configurations
576
- */
577
- detectUnsafeConfigs(input, findings) {
578
- const unsafe = [];
579
- const checkValue = (obj, path) => {
580
- if (typeof obj !== 'object' || obj === null)
581
- return;
582
- for (const [key, value] of Object.entries(obj)) {
583
- const currentPath = `${path}.${key}`;
584
- const keyLower = key.toLowerCase();
585
- // Check for hardcoded secrets
586
- if (this.looksLikeSecret(keyLower, value)) {
587
- unsafe.push({
588
- path: currentPath,
589
- value: '[REDACTED]',
590
- concern_type: 'hardcoded_secret',
591
- severity: 'critical',
592
- risk_description: 'Potential hardcoded secret detected in configuration',
593
- cwe_reference: 'CWE-798',
594
- });
595
- findings.push({
596
- finding_id: `unsafe-secret-${currentPath}`,
597
- category: 'unsafe',
598
- severity: 'critical',
599
- path: currentPath,
600
- message: 'Potential hardcoded secret detected',
601
- actual_value: '[REDACTED]',
602
- doc_reference: 'https://cwe.mitre.org/data/definitions/798.html',
603
- tags: ['security', 'secret', 'hardcoded'],
604
- });
605
- }
606
- // Check for debug mode in production
607
- if (keyLower.includes('debug') && value === true && input.context?.environment === 'prod') {
608
- unsafe.push({
609
- path: currentPath,
610
- value,
611
- concern_type: 'debug_enabled',
612
- severity: 'high',
613
- risk_description: 'Debug mode enabled in production environment',
614
- });
615
- findings.push({
616
- finding_id: `unsafe-debug-${currentPath}`,
617
- category: 'unsafe',
618
- severity: 'error',
619
- path: currentPath,
620
- message: 'Debug mode enabled in production environment',
621
- actual_value: value,
622
- tags: ['security', 'debug', 'production'],
623
- });
624
- }
625
- // Check for insecure protocols
626
- if (typeof value === 'string' && value.startsWith('http://') && !value.includes('localhost')) {
627
- unsafe.push({
628
- path: currentPath,
629
- value,
630
- concern_type: 'insecure_protocol',
631
- severity: 'medium',
632
- risk_description: 'Insecure HTTP protocol used instead of HTTPS',
633
- });
634
- findings.push({
635
- finding_id: `unsafe-http-${currentPath}`,
636
- category: 'unsafe',
637
- severity: 'warning',
638
- path: currentPath,
639
- message: 'Insecure HTTP protocol used',
640
- actual_value: value,
641
- tags: ['security', 'protocol', 'http'],
642
- });
643
- }
644
- // Check for overly permissive settings
645
- if (keyLower.includes('cors') && (value === '*' || value === true)) {
646
- unsafe.push({
647
- path: currentPath,
648
- value,
649
- concern_type: 'overly_permissive',
650
- severity: 'medium',
651
- risk_description: 'CORS configuration is overly permissive',
652
- });
653
- findings.push({
654
- finding_id: `unsafe-cors-${currentPath}`,
655
- category: 'unsafe',
656
- severity: 'warning',
657
- path: currentPath,
658
- message: 'CORS configuration is overly permissive',
659
- actual_value: value,
660
- tags: ['security', 'cors', 'permissive'],
661
- });
662
- }
663
- if (typeof value === 'object') {
664
- checkValue(value, currentPath);
665
- }
666
- }
667
- };
668
- checkValue(input.config, '$');
669
- return unsafe;
670
- }
671
- /**
672
- * Check if a key/value pair looks like a secret
673
- */
674
- looksLikeSecret(key, value) {
675
- const secretPatterns = ['password', 'secret', 'apikey', 'api_key', 'token', 'credential', 'private'];
676
- if (!secretPatterns.some(p => key.includes(p))) {
677
- return false;
678
- }
679
- if (typeof value !== 'string') {
680
- return false;
681
- }
682
- // Skip environment variable references
683
- if (value.startsWith('${') || value.startsWith('$') || value.includes('env.')) {
684
- return false;
685
- }
686
- // Skip placeholders
687
- if (value.includes('<') || value.includes('>') || value === '' || value === 'null') {
688
- return false;
689
- }
690
- // If it looks like an actual value, flag it
691
- return value.length > 5;
692
- }
693
- /**
694
- * Detect configuration conflicts
695
- */
696
- detectConflicts(input, findings) {
697
- const conflicts = [];
698
- // Check for mutually exclusive settings
699
- const mutuallyExclusive = [
700
- ['$.ssl.enabled', '$.tls.enabled'],
701
- ['$.database.replica', '$.database.single'],
702
- ['$.cache.redis', '$.cache.memcached'],
703
- ];
704
- for (const [path1, path2] of mutuallyExclusive) {
705
- const value1 = this.getValueAtPath(input.config, path1);
706
- const value2 = this.getValueAtPath(input.config, path2);
707
- if (value1 === true && value2 === true) {
708
- conflicts.push({
709
- conflict_id: `mutual-${path1}-${path2}`,
710
- conflict_type: 'mutually_exclusive',
711
- conflicting_paths: [path1, path2],
712
- description: `${path1} and ${path2} are mutually exclusive but both enabled`,
713
- severity: 'error',
714
- });
715
- findings.push({
716
- finding_id: `conflict-mutual-${path1}`,
717
- category: 'conflict',
718
- severity: 'error',
719
- path: path1,
720
- message: `Mutually exclusive with ${path2}`,
721
- related_paths: [path2],
722
- tags: ['conflict', 'mutually-exclusive'],
723
- });
724
- }
725
- }
726
- return conflicts;
727
- }
728
- /**
729
- * Detect missing required configurations
730
- */
731
- detectMissingConfigs(input, findings) {
732
- const missing = [];
733
- // Common required configurations
734
- const commonRequired = [
735
- { path: '$.database.host', type: 'string', level: 'required', desc: 'Database host address' },
736
- { path: '$.server.port', type: 'number', level: 'recommended', desc: 'Server port number' },
737
- ];
738
- for (const req of commonRequired) {
739
- const value = this.getValueAtPath(input.config, req.path);
740
- if (value === undefined) {
741
- missing.push({
742
- path: req.path,
743
- expected_type: req.type,
744
- requirement_level: req.level,
745
- description: req.desc,
746
- });
747
- findings.push({
748
- finding_id: `missing-${req.path}`,
749
- category: 'missing',
750
- severity: req.level === 'required' ? 'error' : 'warning',
751
- path: req.path,
752
- message: `${req.level === 'required' ? 'Required' : 'Recommended'} configuration missing: ${req.desc}`,
753
- expected: req.type,
754
- tags: ['missing', req.level],
755
- });
756
- }
757
- }
758
- return missing;
759
- }
760
- /**
761
- * Get value at a JSONPath-like path
762
- */
763
- getValueAtPath(obj, path) {
764
- const segments = path.replace('$.', '').split('.');
765
- let value = obj;
766
- for (const segment of segments) {
767
- if (typeof value === 'object' && value !== null && segment in value) {
768
- value = value[segment];
769
- }
770
- else {
771
- return undefined;
772
- }
773
- }
774
- return value;
775
- }
776
- /**
777
- * Assess overall readiness
778
- */
779
- assessReadiness(findings, input) {
780
- const critical = findings.filter(f => f.severity === 'critical').length;
781
- const errors = findings.filter(f => f.severity === 'error').length;
782
- const warnings = findings.filter(f => f.severity === 'warning').length;
783
- let status;
784
- let score;
785
- if (critical > 0) {
786
- status = 'critical_issues';
787
- score = 0.1;
788
- }
789
- else if (errors > 0) {
790
- status = 'not_ready';
791
- score = 0.3;
792
- }
793
- else if (warnings > 0) {
794
- status = 'ready_with_warnings';
795
- score = 0.7;
796
- }
797
- else {
798
- status = 'ready';
799
- score = 1.0;
800
- }
801
- // Calculate category scores
802
- const categoryScores = {};
803
- const categories = ['schema', 'semantic', 'security', 'compatibility'];
804
- for (const category of categories) {
805
- const categoryFindings = findings.filter(f => f.category === category || f.tags.includes(category));
806
- const categoryErrors = categoryFindings.filter(f => f.severity === 'error' || f.severity === 'critical').length;
807
- categoryScores[category] = categoryErrors === 0 ? 1.0 : Math.max(0, 1 - (categoryErrors * 0.2));
808
- }
809
- return {
810
- status,
811
- score,
812
- category_scores: categoryScores,
813
- blocking_issues: findings
814
- .filter(f => f.severity === 'critical' || f.severity === 'error')
815
- .map(f => f.message),
816
- warnings: findings
817
- .filter(f => f.severity === 'warning')
818
- .map(f => f.message),
819
- recommendations: this.generateRecommendations(findings),
820
- };
821
- }
822
- /**
823
- * Generate recommendations (informational only)
824
- */
825
- generateRecommendations(findings) {
826
- const recommendations = [];
827
- if (findings.some(f => f.category === 'deprecated')) {
828
- recommendations.push('Review and update deprecated configuration keys');
829
- }
830
- if (findings.some(f => f.category === 'unsafe')) {
831
- recommendations.push('Review security-related findings before deployment');
832
- }
833
- if (findings.some(f => f.category === 'missing')) {
834
- recommendations.push('Consider providing values for missing recommended configurations');
835
- }
836
- return recommendations;
837
- }
838
- /**
839
- * Calculate summary statistics
840
- */
841
- calculateSummary(findings, input) {
842
- const byCategory = {};
843
- for (const finding of findings) {
844
- byCategory[finding.category] = (byCategory[finding.category] || 0) + 1;
845
- }
846
- return {
847
- total_findings: findings.length,
848
- by_severity: {
849
- critical: findings.filter(f => f.severity === 'critical').length,
850
- error: findings.filter(f => f.severity === 'error').length,
851
- warning: findings.filter(f => f.severity === 'warning').length,
852
- info: findings.filter(f => f.severity === 'info').length,
853
- },
854
- by_category: byCategory,
855
- paths_checked: this.countPaths(input.config),
856
- constraints_checked: 4 + (input.context?.constraints?.length || 0),
857
- };
858
- }
859
- /**
860
- * Count total paths in config
861
- */
862
- countPaths(obj, count = 0) {
863
- if (typeof obj !== 'object' || obj === null)
864
- return count;
865
- for (const value of Object.values(obj)) {
866
- count++;
867
- if (typeof value === 'object' && value !== null) {
868
- count = this.countPaths(value, count);
869
- }
870
- }
871
- return count;
872
- }
873
- /**
874
- * Determine overall validity
875
- */
876
- determineValidity(findings, strict) {
877
- if (strict) {
878
- return !findings.some(f => f.severity !== 'info');
879
- }
880
- return !findings.some(f => f.severity === 'critical' || f.severity === 'error');
881
- }
882
- /**
883
- * Hash configuration for tracking
884
- */
885
- hashConfig(config) {
886
- const normalized = JSON.stringify(config, Object.keys(config).sort());
887
- return (0, crypto_1.createHash)('sha256').update(normalized).digest('hex').substring(0, 16);
888
- }
889
- /**
890
- * Calculate confidence based on validation completeness
891
- */
892
- calculateConfidence(output) {
893
- let confidence = 0.8; // Base confidence
894
- // Boost if schema was validated
895
- if (output.schema_validation.schema_id) {
896
- confidence += 0.1;
897
- }
898
- // Reduce for many findings
899
- if (output.summary.total_findings > 10) {
900
- confidence -= 0.1;
901
- }
902
- // Reduce for critical issues
903
- if (output.summary.by_severity.critical > 0) {
904
- confidence -= 0.2;
905
- }
906
- return Math.min(1.0, Math.max(0.0, confidence));
907
- }
908
- /**
909
- * Get constraints applied during validation
910
- */
911
- getAppliedConstraints(input) {
912
- const constraints = [
913
- 'read_only_analysis',
914
- 'no_modification',
915
- 'no_defaults_applied',
916
- 'no_auto_fix',
917
- 'no_policy_enforcement',
918
- 'no_execution_blocking',
919
- ];
920
- if (input.options?.strict) {
921
- constraints.push('strict_mode');
922
- }
923
- return constraints;
924
- }
925
- /**
926
- * Classify error for proper error code
927
- */
928
- classifyError(error) {
929
- if (error instanceof Error) {
930
- if (error.name === 'ZodError') {
931
- return contracts_1.AgentErrorCodes.VALIDATION_FAILED;
932
- }
933
- if (error.message.includes('persistence') || error.message.includes('ruvector')) {
934
- return contracts_1.AgentErrorCodes.PERSISTENCE_ERROR;
935
- }
936
- }
937
- return contracts_1.AgentErrorCodes.PROCESSING_ERROR;
938
- }
939
- }
940
- exports.ConfigValidationAgent = ConfigValidationAgent;
941
- //# sourceMappingURL=config-validation-agent.js.map