@llm-dev-ops/agentics-cli 1.4.53 → 1.4.55

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