@llm-dev-ops/agentics-cli 1.4.47 → 1.4.49

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 (321) hide show
  1. package/dist/cli/index.js +43 -67
  2. package/dist/cli/index.js.map +1 -1
  3. package/dist/pipeline/phase2/phases/ddd-generator.d.ts.map +1 -1
  4. package/dist/pipeline/phase2/phases/ddd-generator.js +59 -30
  5. package/dist/pipeline/phase2/phases/ddd-generator.js.map +1 -1
  6. package/dist/pipeline/phase3/phases/domain-codegen.d.ts.map +1 -1
  7. package/dist/pipeline/phase3/phases/domain-codegen.js +93 -2
  8. package/dist/pipeline/phase3/phases/domain-codegen.js.map +1 -1
  9. package/package.json +1 -1
  10. package/dist/bundled-agents/connector-hub-agents/package-lock.json +0 -11697
  11. package/dist/bundled-agents/connector-hub-agents/package.json +0 -75
  12. package/dist/bundled-agents/connector-hub-agents/tsconfig.build.json +0 -22
  13. package/dist/bundled-agents/connector-hub-agents/tsconfig.json +0 -57
  14. package/dist/bundled-agents/copilot-agents/functions/.gcloudignore +0 -17
  15. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.d.ts +0 -14
  16. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js +0 -35
  17. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js.map +0 -1
  18. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.d.ts +0 -55
  19. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js +0 -40
  20. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js.map +0 -1
  21. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.d.ts +0 -22
  22. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js +0 -38
  23. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js.map +0 -1
  24. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.d.ts +0 -34
  25. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js +0 -186
  26. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js.map +0 -1
  27. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.d.ts +0 -36
  28. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js +0 -121
  29. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js.map +0 -1
  30. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.d.ts +0 -157
  31. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js +0 -948
  32. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js.map +0 -1
  33. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.d.ts +0 -9
  34. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js +0 -27
  35. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js.map +0 -1
  36. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
  37. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js +0 -50
  38. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js.map +0 -1
  39. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.d.ts +0 -214
  40. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js +0 -91
  41. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js.map +0 -1
  42. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.d.ts +0 -1166
  43. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js +0 -308
  44. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js.map +0 -1
  45. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.d.ts +0 -59
  46. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js +0 -62
  47. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js.map +0 -1
  48. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.d.ts +0 -400
  49. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js +0 -113
  50. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js.map +0 -1
  51. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.d.ts +0 -250
  52. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js +0 -169
  53. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js.map +0 -1
  54. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.d.ts +0 -17
  55. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js +0 -97
  56. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js.map +0 -1
  57. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
  58. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js +0 -246
  59. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js.map +0 -1
  60. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1085
  61. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js +0 -218
  62. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
  63. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -949
  64. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js +0 -253
  65. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
  66. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -657
  67. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js +0 -205
  68. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
  69. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.d.ts +0 -285
  70. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js +0 -106
  71. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js.map +0 -1
  72. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.d.ts +0 -581
  73. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js +0 -136
  74. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js.map +0 -1
  75. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.d.ts +0 -791
  76. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js +0 -225
  77. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js.map +0 -1
  78. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.d.ts +0 -120
  79. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js +0 -535
  80. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js.map +0 -1
  81. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.d.ts +0 -9
  82. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js +0 -18
  83. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js.map +0 -1
  84. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.d.ts +0 -4
  85. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js +0 -9
  86. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js.map +0 -1
  87. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
  88. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
  89. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
  90. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.d.ts +0 -10
  91. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js +0 -25
  92. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js.map +0 -1
  93. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
  94. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
  95. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
  96. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.d.ts +0 -11
  97. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js +0 -25
  98. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js.map +0 -1
  99. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.d.ts +0 -6
  100. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js +0 -15
  101. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js.map +0 -1
  102. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
  103. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
  104. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
  105. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
  106. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
  107. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
  108. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.d.ts +0 -73
  109. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js +0 -192
  110. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js.map +0 -1
  111. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.d.ts +0 -11
  112. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js +0 -25
  113. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js.map +0 -1
  114. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.d.ts +0 -127
  115. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js +0 -483
  116. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js.map +0 -1
  117. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.d.ts +0 -49
  118. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js +0 -125
  119. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js.map +0 -1
  120. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.d.ts +0 -73
  121. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js +0 -192
  122. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js.map +0 -1
  123. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.d.ts +0 -11
  124. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js +0 -27
  125. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js.map +0 -1
  126. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.d.ts +0 -122
  127. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js +0 -645
  128. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js.map +0 -1
  129. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.d.ts +0 -59
  130. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js +0 -156
  131. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js.map +0 -1
  132. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.d.ts +0 -88
  133. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js +0 -246
  134. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js.map +0 -1
  135. package/dist/bundled-agents/copilot-agents/functions/index.js +0 -4
  136. package/dist/bundled-agents/copilot-agents/functions/jest.config.js +0 -29
  137. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.d.ts +0 -14
  138. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js +0 -35
  139. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js.map +0 -1
  140. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.d.ts +0 -27
  141. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js +0 -21
  142. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js.map +0 -1
  143. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.d.ts +0 -22
  144. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js +0 -38
  145. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js.map +0 -1
  146. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.d.ts +0 -34
  147. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js +0 -174
  148. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js.map +0 -1
  149. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.d.ts +0 -27
  150. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js +0 -107
  151. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js.map +0 -1
  152. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.d.ts +0 -157
  153. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js +0 -941
  154. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js.map +0 -1
  155. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.d.ts +0 -9
  156. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js +0 -27
  157. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js.map +0 -1
  158. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
  159. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js +0 -50
  160. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js.map +0 -1
  161. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.d.ts +0 -185
  162. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js +0 -86
  163. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js.map +0 -1
  164. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.d.ts +0 -1081
  165. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js +0 -305
  166. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js.map +0 -1
  167. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.d.ts +0 -59
  168. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js +0 -62
  169. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js.map +0 -1
  170. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.d.ts +0 -315
  171. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js +0 -110
  172. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js.map +0 -1
  173. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.d.ts +0 -250
  174. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js +0 -169
  175. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js.map +0 -1
  176. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.d.ts +0 -16
  177. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js +0 -88
  178. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js.map +0 -1
  179. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
  180. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js +0 -246
  181. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js.map +0 -1
  182. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1000
  183. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js +0 -215
  184. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
  185. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -864
  186. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js +0 -250
  187. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
  188. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -572
  189. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js +0 -202
  190. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
  191. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.d.ts +0 -496
  192. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js +0 -133
  193. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js.map +0 -1
  194. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.d.ts +0 -706
  195. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js +0 -222
  196. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js.map +0 -1
  197. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.d.ts +0 -107
  198. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js +0 -360
  199. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js.map +0 -1
  200. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.d.ts +0 -9
  201. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js +0 -18
  202. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js.map +0 -1
  203. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.d.ts +0 -4
  204. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js +0 -9
  205. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js.map +0 -1
  206. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
  207. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
  208. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
  209. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.d.ts +0 -10
  210. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js +0 -25
  211. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js.map +0 -1
  212. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
  213. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
  214. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
  215. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.d.ts +0 -11
  216. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js +0 -25
  217. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js.map +0 -1
  218. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.d.ts +0 -6
  219. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js +0 -15
  220. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js.map +0 -1
  221. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
  222. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
  223. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
  224. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
  225. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
  226. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
  227. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.d.ts +0 -73
  228. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js +0 -192
  229. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js.map +0 -1
  230. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.d.ts +0 -11
  231. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js +0 -25
  232. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js.map +0 -1
  233. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.d.ts +0 -119
  234. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js +0 -421
  235. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js.map +0 -1
  236. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.d.ts +0 -49
  237. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js +0 -125
  238. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js.map +0 -1
  239. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.d.ts +0 -73
  240. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js +0 -192
  241. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js.map +0 -1
  242. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.d.ts +0 -11
  243. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js +0 -27
  244. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js.map +0 -1
  245. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.d.ts +0 -122
  246. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js +0 -645
  247. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js.map +0 -1
  248. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.d.ts +0 -59
  249. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js +0 -156
  250. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js.map +0 -1
  251. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.d.ts +0 -88
  252. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js +0 -246
  253. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js.map +0 -1
  254. package/dist/bundled-agents/copilot-agents/functions/package-lock.json +0 -5473
  255. package/dist/bundled-agents/copilot-agents/functions/package.json +0 -40
  256. package/dist/bundled-agents/copilot-agents/functions/src/claude.ts +0 -71
  257. package/dist/bundled-agents/copilot-agents/functions/src/cors.ts +0 -36
  258. package/dist/bundled-agents/copilot-agents/functions/src/envelope.ts +0 -77
  259. package/dist/bundled-agents/copilot-agents/functions/src/handler.test.ts +0 -340
  260. package/dist/bundled-agents/copilot-agents/functions/src/health.ts +0 -53
  261. package/dist/bundled-agents/copilot-agents/functions/src/index.ts +0 -201
  262. package/dist/bundled-agents/copilot-agents/functions/src/router.ts +0 -148
  263. package/dist/bundled-agents/copilot-agents/functions/tsconfig.json +0 -31
  264. package/dist/bundled-agents/copilot-agents/package-lock.json +0 -11825
  265. package/dist/bundled-agents/copilot-agents/package.json +0 -5
  266. package/dist/bundled-agents/governance-dashboard-agents/package-lock.json +0 -8282
  267. package/dist/bundled-agents/governance-dashboard-agents/package.json +0 -13
  268. package/dist/bundled-agents/orchestrator-agents/functions/contracts/index.js +0 -590
  269. package/dist/bundled-agents/orchestrator-agents/functions/index.js +0 -442
  270. package/dist/bundled-agents/orchestrator-agents/functions/test.js +0 -325
  271. package/dist/bundled-agents/orchestrator-agents/index.js +0 -6
  272. package/dist/bundled-agents/orchestrator-agents/package-lock.json +0 -13254
  273. package/dist/bundled-agents/orchestrator-agents/package.json +0 -20
  274. package/dist/bundled-agents/platform-agents/package-lock.json +0 -1723
  275. package/dist/bundled-agents/platform-agents/package.json +0 -22
  276. package/dist/bundled-agents/platform-agents/src/agents/decision-memo.ts +0 -463
  277. package/dist/bundled-agents/platform-agents/src/agents/decision.ts +0 -234
  278. package/dist/bundled-agents/platform-agents/src/agents/executive-summary.ts +0 -229
  279. package/dist/bundled-agents/platform-agents/src/agents/risk-score.ts +0 -327
  280. package/dist/bundled-agents/platform-agents/src/claude.ts +0 -71
  281. package/dist/bundled-agents/platform-agents/src/cors.ts +0 -24
  282. package/dist/bundled-agents/platform-agents/src/envelope.ts +0 -37
  283. package/dist/bundled-agents/platform-agents/src/health.ts +0 -20
  284. package/dist/bundled-agents/platform-agents/src/index.ts +0 -171
  285. package/dist/bundled-agents/platform-agents/src/router.ts +0 -38
  286. package/dist/bundled-agents/platform-agents/src/text-analysis.ts +0 -238
  287. package/dist/bundled-agents/platform-agents/tsconfig.json +0 -19
  288. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts +0 -3
  289. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts.map +0 -1
  290. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js +0 -43
  291. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js.map +0 -1
  292. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts +0 -3
  293. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts.map +0 -1
  294. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js +0 -30
  295. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js.map +0 -1
  296. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts +0 -3
  297. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts.map +0 -1
  298. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js +0 -53
  299. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js.map +0 -1
  300. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts +0 -3
  301. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts.map +0 -1
  302. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js +0 -51
  303. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js.map +0 -1
  304. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts +0 -3
  305. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts.map +0 -1
  306. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js +0 -36
  307. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js.map +0 -1
  308. package/dist/bundled-agents/sentinel-agents/lib/index.d.ts +0 -2
  309. package/dist/bundled-agents/sentinel-agents/lib/index.d.ts.map +0 -1
  310. package/dist/bundled-agents/sentinel-agents/lib/index.js +0 -70
  311. package/dist/bundled-agents/sentinel-agents/lib/index.js.map +0 -1
  312. package/dist/bundled-agents/sentinel-agents/package-lock.json +0 -12591
  313. package/dist/bundled-agents/sentinel-agents/package.json +0 -62
  314. package/dist/bundled-agents/sentinel-agents/src/agents/alert.ts +0 -46
  315. package/dist/bundled-agents/sentinel-agents/src/agents/anomaly.ts +0 -33
  316. package/dist/bundled-agents/sentinel-agents/src/agents/correlation.ts +0 -56
  317. package/dist/bundled-agents/sentinel-agents/src/agents/drift.ts +0 -54
  318. package/dist/bundled-agents/sentinel-agents/src/agents/rca.ts +0 -38
  319. package/dist/bundled-agents/sentinel-agents/src/claude.ts +0 -71
  320. package/dist/bundled-agents/sentinel-agents/src/index.ts +0 -77
  321. 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