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

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 (315) hide show
  1. package/dist/cli/index.js +43 -67
  2. package/dist/cli/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/dist/bundled-agents/connector-hub-agents/package-lock.json +0 -11697
  5. package/dist/bundled-agents/connector-hub-agents/package.json +0 -75
  6. package/dist/bundled-agents/connector-hub-agents/tsconfig.build.json +0 -22
  7. package/dist/bundled-agents/connector-hub-agents/tsconfig.json +0 -57
  8. package/dist/bundled-agents/copilot-agents/functions/.gcloudignore +0 -17
  9. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.d.ts +0 -14
  10. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js +0 -35
  11. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js.map +0 -1
  12. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.d.ts +0 -55
  13. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js +0 -40
  14. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js.map +0 -1
  15. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.d.ts +0 -22
  16. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js +0 -38
  17. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js.map +0 -1
  18. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.d.ts +0 -34
  19. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js +0 -186
  20. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js.map +0 -1
  21. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.d.ts +0 -36
  22. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js +0 -121
  23. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js.map +0 -1
  24. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.d.ts +0 -157
  25. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js +0 -948
  26. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js.map +0 -1
  27. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.d.ts +0 -9
  28. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js +0 -27
  29. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js.map +0 -1
  30. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
  31. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js +0 -50
  32. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js.map +0 -1
  33. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.d.ts +0 -214
  34. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js +0 -91
  35. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js.map +0 -1
  36. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.d.ts +0 -1166
  37. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js +0 -308
  38. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js.map +0 -1
  39. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.d.ts +0 -59
  40. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js +0 -62
  41. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js.map +0 -1
  42. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.d.ts +0 -400
  43. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js +0 -113
  44. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js.map +0 -1
  45. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.d.ts +0 -250
  46. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js +0 -169
  47. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js.map +0 -1
  48. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.d.ts +0 -17
  49. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js +0 -97
  50. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js.map +0 -1
  51. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
  52. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js +0 -246
  53. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js.map +0 -1
  54. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1085
  55. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js +0 -218
  56. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
  57. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -949
  58. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js +0 -253
  59. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
  60. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -657
  61. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js +0 -205
  62. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
  63. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.d.ts +0 -285
  64. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js +0 -106
  65. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js.map +0 -1
  66. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.d.ts +0 -581
  67. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js +0 -136
  68. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js.map +0 -1
  69. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.d.ts +0 -791
  70. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js +0 -225
  71. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js.map +0 -1
  72. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.d.ts +0 -120
  73. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js +0 -535
  74. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js.map +0 -1
  75. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.d.ts +0 -9
  76. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js +0 -18
  77. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js.map +0 -1
  78. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.d.ts +0 -4
  79. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js +0 -9
  80. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js.map +0 -1
  81. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
  82. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
  83. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
  84. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.d.ts +0 -10
  85. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js +0 -25
  86. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js.map +0 -1
  87. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
  88. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
  89. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
  90. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.d.ts +0 -11
  91. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js +0 -25
  92. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js.map +0 -1
  93. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.d.ts +0 -6
  94. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js +0 -15
  95. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js.map +0 -1
  96. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
  97. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
  98. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
  99. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
  100. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
  101. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
  102. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.d.ts +0 -73
  103. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js +0 -192
  104. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js.map +0 -1
  105. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.d.ts +0 -11
  106. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js +0 -25
  107. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js.map +0 -1
  108. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.d.ts +0 -127
  109. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js +0 -483
  110. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js.map +0 -1
  111. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.d.ts +0 -49
  112. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js +0 -125
  113. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js.map +0 -1
  114. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.d.ts +0 -73
  115. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js +0 -192
  116. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js.map +0 -1
  117. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.d.ts +0 -11
  118. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js +0 -27
  119. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js.map +0 -1
  120. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.d.ts +0 -122
  121. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js +0 -645
  122. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js.map +0 -1
  123. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.d.ts +0 -59
  124. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js +0 -156
  125. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js.map +0 -1
  126. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.d.ts +0 -88
  127. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js +0 -246
  128. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js.map +0 -1
  129. package/dist/bundled-agents/copilot-agents/functions/index.js +0 -4
  130. package/dist/bundled-agents/copilot-agents/functions/jest.config.js +0 -29
  131. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.d.ts +0 -14
  132. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js +0 -35
  133. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js.map +0 -1
  134. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.d.ts +0 -27
  135. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js +0 -21
  136. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js.map +0 -1
  137. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.d.ts +0 -22
  138. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js +0 -38
  139. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js.map +0 -1
  140. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.d.ts +0 -34
  141. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js +0 -174
  142. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js.map +0 -1
  143. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.d.ts +0 -27
  144. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js +0 -107
  145. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js.map +0 -1
  146. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.d.ts +0 -157
  147. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js +0 -941
  148. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js.map +0 -1
  149. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.d.ts +0 -9
  150. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js +0 -27
  151. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js.map +0 -1
  152. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
  153. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js +0 -50
  154. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js.map +0 -1
  155. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.d.ts +0 -185
  156. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js +0 -86
  157. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js.map +0 -1
  158. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.d.ts +0 -1081
  159. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js +0 -305
  160. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js.map +0 -1
  161. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.d.ts +0 -59
  162. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js +0 -62
  163. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js.map +0 -1
  164. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.d.ts +0 -315
  165. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js +0 -110
  166. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js.map +0 -1
  167. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.d.ts +0 -250
  168. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js +0 -169
  169. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js.map +0 -1
  170. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.d.ts +0 -16
  171. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js +0 -88
  172. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js.map +0 -1
  173. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
  174. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js +0 -246
  175. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js.map +0 -1
  176. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1000
  177. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js +0 -215
  178. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
  179. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -864
  180. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js +0 -250
  181. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
  182. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -572
  183. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js +0 -202
  184. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
  185. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.d.ts +0 -496
  186. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js +0 -133
  187. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js.map +0 -1
  188. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.d.ts +0 -706
  189. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js +0 -222
  190. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js.map +0 -1
  191. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.d.ts +0 -107
  192. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js +0 -360
  193. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js.map +0 -1
  194. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.d.ts +0 -9
  195. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js +0 -18
  196. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js.map +0 -1
  197. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.d.ts +0 -4
  198. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js +0 -9
  199. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js.map +0 -1
  200. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
  201. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
  202. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
  203. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.d.ts +0 -10
  204. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js +0 -25
  205. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js.map +0 -1
  206. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
  207. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
  208. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
  209. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.d.ts +0 -11
  210. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js +0 -25
  211. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js.map +0 -1
  212. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.d.ts +0 -6
  213. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js +0 -15
  214. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js.map +0 -1
  215. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
  216. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
  217. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
  218. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
  219. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
  220. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
  221. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.d.ts +0 -73
  222. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js +0 -192
  223. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js.map +0 -1
  224. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.d.ts +0 -11
  225. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js +0 -25
  226. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js.map +0 -1
  227. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.d.ts +0 -119
  228. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js +0 -421
  229. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js.map +0 -1
  230. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.d.ts +0 -49
  231. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js +0 -125
  232. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js.map +0 -1
  233. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.d.ts +0 -73
  234. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js +0 -192
  235. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js.map +0 -1
  236. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.d.ts +0 -11
  237. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js +0 -27
  238. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js.map +0 -1
  239. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.d.ts +0 -122
  240. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js +0 -645
  241. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js.map +0 -1
  242. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.d.ts +0 -59
  243. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js +0 -156
  244. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js.map +0 -1
  245. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.d.ts +0 -88
  246. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js +0 -246
  247. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js.map +0 -1
  248. package/dist/bundled-agents/copilot-agents/functions/package-lock.json +0 -5473
  249. package/dist/bundled-agents/copilot-agents/functions/package.json +0 -40
  250. package/dist/bundled-agents/copilot-agents/functions/src/claude.ts +0 -71
  251. package/dist/bundled-agents/copilot-agents/functions/src/cors.ts +0 -36
  252. package/dist/bundled-agents/copilot-agents/functions/src/envelope.ts +0 -77
  253. package/dist/bundled-agents/copilot-agents/functions/src/handler.test.ts +0 -340
  254. package/dist/bundled-agents/copilot-agents/functions/src/health.ts +0 -53
  255. package/dist/bundled-agents/copilot-agents/functions/src/index.ts +0 -201
  256. package/dist/bundled-agents/copilot-agents/functions/src/router.ts +0 -148
  257. package/dist/bundled-agents/copilot-agents/functions/tsconfig.json +0 -31
  258. package/dist/bundled-agents/copilot-agents/package-lock.json +0 -11825
  259. package/dist/bundled-agents/copilot-agents/package.json +0 -5
  260. package/dist/bundled-agents/governance-dashboard-agents/package-lock.json +0 -8282
  261. package/dist/bundled-agents/governance-dashboard-agents/package.json +0 -13
  262. package/dist/bundled-agents/orchestrator-agents/functions/contracts/index.js +0 -590
  263. package/dist/bundled-agents/orchestrator-agents/functions/index.js +0 -442
  264. package/dist/bundled-agents/orchestrator-agents/functions/test.js +0 -325
  265. package/dist/bundled-agents/orchestrator-agents/index.js +0 -6
  266. package/dist/bundled-agents/orchestrator-agents/package-lock.json +0 -13254
  267. package/dist/bundled-agents/orchestrator-agents/package.json +0 -20
  268. package/dist/bundled-agents/platform-agents/package-lock.json +0 -1723
  269. package/dist/bundled-agents/platform-agents/package.json +0 -22
  270. package/dist/bundled-agents/platform-agents/src/agents/decision-memo.ts +0 -463
  271. package/dist/bundled-agents/platform-agents/src/agents/decision.ts +0 -234
  272. package/dist/bundled-agents/platform-agents/src/agents/executive-summary.ts +0 -229
  273. package/dist/bundled-agents/platform-agents/src/agents/risk-score.ts +0 -327
  274. package/dist/bundled-agents/platform-agents/src/claude.ts +0 -71
  275. package/dist/bundled-agents/platform-agents/src/cors.ts +0 -24
  276. package/dist/bundled-agents/platform-agents/src/envelope.ts +0 -37
  277. package/dist/bundled-agents/platform-agents/src/health.ts +0 -20
  278. package/dist/bundled-agents/platform-agents/src/index.ts +0 -171
  279. package/dist/bundled-agents/platform-agents/src/router.ts +0 -38
  280. package/dist/bundled-agents/platform-agents/src/text-analysis.ts +0 -238
  281. package/dist/bundled-agents/platform-agents/tsconfig.json +0 -19
  282. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts +0 -3
  283. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts.map +0 -1
  284. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js +0 -43
  285. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js.map +0 -1
  286. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts +0 -3
  287. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts.map +0 -1
  288. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js +0 -30
  289. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js.map +0 -1
  290. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts +0 -3
  291. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts.map +0 -1
  292. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js +0 -53
  293. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js.map +0 -1
  294. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts +0 -3
  295. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts.map +0 -1
  296. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js +0 -51
  297. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js.map +0 -1
  298. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts +0 -3
  299. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts.map +0 -1
  300. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js +0 -36
  301. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js.map +0 -1
  302. package/dist/bundled-agents/sentinel-agents/lib/index.d.ts +0 -2
  303. package/dist/bundled-agents/sentinel-agents/lib/index.d.ts.map +0 -1
  304. package/dist/bundled-agents/sentinel-agents/lib/index.js +0 -70
  305. package/dist/bundled-agents/sentinel-agents/lib/index.js.map +0 -1
  306. package/dist/bundled-agents/sentinel-agents/package-lock.json +0 -12591
  307. package/dist/bundled-agents/sentinel-agents/package.json +0 -62
  308. package/dist/bundled-agents/sentinel-agents/src/agents/alert.ts +0 -46
  309. package/dist/bundled-agents/sentinel-agents/src/agents/anomaly.ts +0 -33
  310. package/dist/bundled-agents/sentinel-agents/src/agents/correlation.ts +0 -56
  311. package/dist/bundled-agents/sentinel-agents/src/agents/drift.ts +0 -54
  312. package/dist/bundled-agents/sentinel-agents/src/agents/rca.ts +0 -38
  313. package/dist/bundled-agents/sentinel-agents/src/claude.ts +0 -71
  314. package/dist/bundled-agents/sentinel-agents/src/index.ts +0 -77
  315. package/dist/bundled-agents/sentinel-agents/tsconfig.json +0 -20
@@ -1,686 +0,0 @@
1
- "use strict";
2
- /**
3
- * Meta-Reasoner Agent
4
- *
5
- * Purpose: Evaluate reasoning quality and consistency across agents
6
- * Classification: META_ANALYSIS, REASONING_QUALITY_ASSESSMENT
7
- * decision_type: meta_reasoning_analysis
8
- *
9
- * Scope:
10
- * - Detect contradictions
11
- * - Assess confidence calibration
12
- * - Identify systemic reasoning issues
13
- *
14
- * CONSTITUTION COMPLIANCE:
15
- * ✓ Stateless at runtime
16
- * ✓ Emits exactly ONE DecisionEvent per invocation
17
- * ✓ Persists ONLY via ruvector-service
18
- * ✓ NEVER connects directly to databases
19
- * ✓ NEVER executes SQL
20
- * ✓ NEVER modifies runtime behavior
21
- * ✓ NEVER orchestrates other agents
22
- * ✓ NEVER enforces policy
23
- * ✓ NEVER intercepts execution paths
24
- *
25
- * Must Never:
26
- * - Override outputs
27
- * - Enforce corrections
28
- * - Execute logic
29
- */
30
- Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.MetaReasonerAgent = void 0;
32
- const uuid_1 = require("uuid");
33
- const contracts_1 = require("../contracts");
34
- const AGENT_ID = 'meta-reasoner-agent';
35
- const AGENT_VERSION = '1.0.0';
36
- const DECISION_TYPE = 'meta_reasoning_analysis';
37
- /**
38
- * Meta-Reasoner Agent Implementation
39
- *
40
- * This agent analyzes reasoning traces from other agents to detect
41
- * contradictions, assess confidence calibration, and identify systemic issues.
42
- * It is purely analytical - it NEVER overrides outputs or enforces corrections.
43
- */
44
- class MetaReasonerAgent {
45
- metadata = {
46
- id: AGENT_ID,
47
- name: 'Meta-Reasoner Agent',
48
- version: AGENT_VERSION,
49
- classifications: [
50
- contracts_1.AgentClassification.META_ANALYSIS,
51
- contracts_1.AgentClassification.REASONING_QUALITY_ASSESSMENT,
52
- ],
53
- decision_type: DECISION_TYPE,
54
- description: 'Evaluates reasoning quality and consistency across agents by detecting contradictions, assessing confidence calibration, and identifying systemic reasoning issues.',
55
- };
56
- persistence;
57
- telemetry;
58
- constructor(persistence, telemetry) {
59
- this.persistence = persistence;
60
- this.telemetry = telemetry;
61
- }
62
- /**
63
- * Validate input against MetaReasonerInputSchema
64
- */
65
- validateInput(input) {
66
- return contracts_1.MetaReasonerInputSchema.parse(input);
67
- }
68
- /**
69
- * Invoke the meta-reasoner agent
70
- *
71
- * DETERMINISTIC: Same input always produces same output structure
72
- * STATELESS: No internal state modified
73
- * NON-BLOCKING: Fully async
74
- */
75
- async invoke(input, executionRef) {
76
- const startTime = Date.now();
77
- try {
78
- // Emit telemetry start
79
- this.telemetry.recordStart(AGENT_ID, executionRef, input);
80
- // Perform meta-reasoning analysis (pure analysis, no side effects)
81
- const output = this.analyzeReasoning(input);
82
- // Validate output
83
- const validatedOutput = contracts_1.MetaReasonerOutputSchema.parse(output);
84
- // Calculate confidence based on analysis quality
85
- const confidence = this.calculateConfidence(validatedOutput, input);
86
- // Constraints applied during analysis
87
- const constraintsApplied = this.getAppliedConstraints(input);
88
- // Create the DecisionEvent
89
- const event = (0, contracts_1.createDecisionEvent)(AGENT_ID, AGENT_VERSION, DECISION_TYPE, input, validatedOutput, confidence, constraintsApplied, executionRef);
90
- // Persist via ruvector-service (best-effort, non-blocking)
91
- let persistence_status;
92
- try {
93
- await this.persistence.store(event);
94
- persistence_status = { status: 'persisted' };
95
- }
96
- catch (persistError) {
97
- const persistMessage = persistError instanceof Error ? persistError.message : 'Unknown persistence error';
98
- console.error(`[${AGENT_ID}] RuVector persistence failed (non-blocking): ${persistMessage}`);
99
- persistence_status = { status: 'skipped', error: persistMessage };
100
- }
101
- // Emit telemetry success
102
- this.telemetry.recordSuccess(AGENT_ID, executionRef, Date.now() - startTime);
103
- return {
104
- status: 'success',
105
- event,
106
- persistence_status,
107
- };
108
- }
109
- catch (error) {
110
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
111
- const errorCode = this.classifyError(error);
112
- // Emit telemetry failure
113
- this.telemetry.recordFailure(AGENT_ID, executionRef, errorCode, errorMessage);
114
- return (0, contracts_1.createErrorResult)(errorCode, errorMessage, executionRef);
115
- }
116
- }
117
- /**
118
- * Perform meta-reasoning analysis on the provided traces
119
- *
120
- * This is the core analysis logic - purely analytical.
121
- * NEVER overrides outputs or enforces corrections.
122
- */
123
- analyzeReasoning(input) {
124
- const analysisId = (0, uuid_1.v4)();
125
- const traces = input.traces;
126
- const scope = input.scope;
127
- // Collect unique agents and decision types
128
- const uniqueAgents = new Set(traces.map(t => t.agent_id));
129
- const uniqueDecisionTypes = new Set(traces.map(t => t.decision_type));
130
- // Calculate time span
131
- const timestamps = traces.map(t => new Date(t.timestamp).getTime()).sort((a, b) => a - b);
132
- const timeSpan = timestamps.length > 0 ? {
133
- earliest: new Date(timestamps[0]).toISOString(),
134
- latest: new Date(timestamps[timestamps.length - 1]).toISOString(),
135
- } : undefined;
136
- // Perform analyses based on scope
137
- const contradictions = scope.detect_contradictions
138
- ? this.detectContradictions(traces)
139
- : [];
140
- const confidenceCalibrations = scope.assess_confidence_calibration
141
- ? this.assessConfidenceCalibration(traces, input.context?.historical_accuracy)
142
- : [];
143
- const systemicIssues = scope.identify_systemic_issues
144
- ? this.identifySystemicIssues(traces)
145
- : [];
146
- // Calculate quality metrics
147
- const qualityMetrics = this.calculateQualityMetrics(traces, contradictions, confidenceCalibrations, systemicIssues);
148
- // Generate key findings
149
- const keyFindings = this.generateKeyFindings(contradictions, confidenceCalibrations, systemicIssues, qualityMetrics);
150
- // Generate summary
151
- const summary = this.generateSummary(traces.length, uniqueAgents.size, contradictions.length, systemicIssues.length, qualityMetrics.overall_score);
152
- // Extract assumptions
153
- const assumptions = this.extractAssumptions(input);
154
- return {
155
- analysis_id: analysisId,
156
- summary,
157
- quality_metrics: qualityMetrics,
158
- contradictions,
159
- confidence_calibrations: confidenceCalibrations,
160
- systemic_issues: systemicIssues,
161
- analysis_metadata: {
162
- total_traces: traces.length,
163
- traces_analyzed: traces.length,
164
- unique_agents: uniqueAgents.size,
165
- unique_decision_types: uniqueDecisionTypes.size,
166
- time_span: timeSpan,
167
- scope_executed: {
168
- contradictions_checked: scope.detect_contradictions,
169
- calibration_assessed: scope.assess_confidence_calibration,
170
- systemic_issues_checked: scope.identify_systemic_issues,
171
- fallacies_checked: scope.detect_fallacies,
172
- completeness_checked: scope.check_completeness,
173
- },
174
- },
175
- key_findings: keyFindings,
176
- assumptions,
177
- version: '1.0.0',
178
- };
179
- }
180
- /**
181
- * Detect contradictions between reasoning traces
182
- */
183
- detectContradictions(traces) {
184
- const contradictions = [];
185
- let contradictionCount = 0;
186
- // Group traces by decision type for comparison
187
- const tracesByType = new Map();
188
- for (const trace of traces) {
189
- const existing = tracesByType.get(trace.decision_type) || [];
190
- existing.push(trace);
191
- tracesByType.set(trace.decision_type, existing);
192
- }
193
- // Check for contradictions within same decision type
194
- for (const [decisionType, typeTraces] of tracesByType) {
195
- if (typeTraces.length < 2)
196
- continue;
197
- // Compare pairs of traces
198
- for (let i = 0; i < typeTraces.length; i++) {
199
- for (let j = i + 1; j < typeTraces.length; j++) {
200
- const trace1 = typeTraces[i];
201
- const trace2 = typeTraces[j];
202
- // Check for confidence contradictions
203
- const confidenceGap = Math.abs(trace1.reported_confidence - trace2.reported_confidence);
204
- if (confidenceGap > 0.5) {
205
- contradictionCount++;
206
- contradictions.push({
207
- contradiction_id: `contradiction-${contradictionCount}`,
208
- type: 'statistical',
209
- severity: confidenceGap > 0.7 ? 'high' : 'medium',
210
- involved_traces: [trace1.execution_ref, trace2.execution_ref],
211
- involved_agents: [trace1.agent_id, trace2.agent_id],
212
- description: `Large confidence gap (${(confidenceGap * 100).toFixed(1)}%) between agents for same decision type "${decisionType}"`,
213
- evidence: [
214
- {
215
- trace_ref: trace1.execution_ref,
216
- excerpt: `Confidence: ${trace1.reported_confidence}`,
217
- relevance: 'First trace confidence value',
218
- },
219
- {
220
- trace_ref: trace2.execution_ref,
221
- excerpt: `Confidence: ${trace2.reported_confidence}`,
222
- relevance: 'Second trace confidence value',
223
- },
224
- ],
225
- finding_confidence: 0.8,
226
- });
227
- }
228
- // Check for constraint contradictions
229
- const constraints1 = new Set(trace1.constraints_applied);
230
- const constraints2 = new Set(trace2.constraints_applied);
231
- const conflictingConstraints = this.findConflictingConstraints(constraints1, constraints2);
232
- if (conflictingConstraints.length > 0) {
233
- contradictionCount++;
234
- contradictions.push({
235
- contradiction_id: `contradiction-${contradictionCount}`,
236
- type: 'contextual',
237
- severity: 'medium',
238
- involved_traces: [trace1.execution_ref, trace2.execution_ref],
239
- involved_agents: [trace1.agent_id, trace2.agent_id],
240
- description: `Conflicting constraints applied for same decision type "${decisionType}"`,
241
- evidence: [
242
- {
243
- trace_ref: trace1.execution_ref,
244
- excerpt: `Constraints: ${Array.from(constraints1).join(', ')}`,
245
- relevance: 'First trace constraints',
246
- },
247
- {
248
- trace_ref: trace2.execution_ref,
249
- excerpt: `Constraints: ${Array.from(constraints2).join(', ')}`,
250
- relevance: 'Second trace constraints',
251
- },
252
- ],
253
- finding_confidence: 0.7,
254
- });
255
- }
256
- }
257
- }
258
- }
259
- // Check for temporal contradictions (same agent, changing conclusions)
260
- const tracesByAgent = new Map();
261
- for (const trace of traces) {
262
- const existing = tracesByAgent.get(trace.agent_id) || [];
263
- existing.push(trace);
264
- tracesByAgent.set(trace.agent_id, existing);
265
- }
266
- for (const [agentId, agentTraces] of tracesByAgent) {
267
- if (agentTraces.length < 2)
268
- continue;
269
- // Sort by timestamp
270
- const sorted = [...agentTraces].sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime());
271
- // Check for rapid confidence fluctuation
272
- for (let i = 1; i < sorted.length; i++) {
273
- const prev = sorted[i - 1];
274
- const curr = sorted[i];
275
- if (prev.decision_type === curr.decision_type) {
276
- const confidenceChange = Math.abs(curr.reported_confidence - prev.reported_confidence);
277
- if (confidenceChange > 0.3) {
278
- contradictionCount++;
279
- contradictions.push({
280
- contradiction_id: `contradiction-${contradictionCount}`,
281
- type: 'temporal',
282
- severity: confidenceChange > 0.5 ? 'high' : 'low',
283
- involved_traces: [prev.execution_ref, curr.execution_ref],
284
- involved_agents: [agentId],
285
- description: `Rapid confidence change (${(confidenceChange * 100).toFixed(1)}%) for agent "${agentId}" on same decision type`,
286
- evidence: [
287
- {
288
- trace_ref: prev.execution_ref,
289
- excerpt: `Earlier confidence: ${prev.reported_confidence} at ${prev.timestamp}`,
290
- relevance: 'Previous confidence value',
291
- },
292
- {
293
- trace_ref: curr.execution_ref,
294
- excerpt: `Later confidence: ${curr.reported_confidence} at ${curr.timestamp}`,
295
- relevance: 'Current confidence value',
296
- },
297
- ],
298
- finding_confidence: 0.75,
299
- });
300
- }
301
- }
302
- }
303
- }
304
- return contradictions;
305
- }
306
- /**
307
- * Find conflicting constraints between two sets
308
- */
309
- findConflictingConstraints(set1, set2) {
310
- const conflicts = [];
311
- // Define known conflicting constraint pairs
312
- const conflictPairs = [
313
- ['strict_validation', 'relaxed_validation'],
314
- ['high_precision', 'high_recall'],
315
- ['fast_execution', 'thorough_analysis'],
316
- ];
317
- for (const [a, b] of conflictPairs) {
318
- if ((set1.has(a) && set2.has(b)) || (set1.has(b) && set2.has(a))) {
319
- conflicts.push(`${a} vs ${b}`);
320
- }
321
- }
322
- return conflicts;
323
- }
324
- /**
325
- * Assess confidence calibration for each agent
326
- */
327
- assessConfidenceCalibration(traces, historicalAccuracy) {
328
- const calibrations = [];
329
- // Group traces by agent
330
- const tracesByAgent = new Map();
331
- for (const trace of traces) {
332
- const existing = tracesByAgent.get(trace.agent_id) || [];
333
- existing.push(trace);
334
- tracesByAgent.set(trace.agent_id, existing);
335
- }
336
- for (const [agentId, agentTraces] of tracesByAgent) {
337
- const confidences = agentTraces.map(t => t.reported_confidence);
338
- const meanConfidence = confidences.reduce((a, b) => a + b, 0) / confidences.length;
339
- const expectedAccuracy = historicalAccuracy?.[agentId];
340
- let calibrationScore;
341
- let assessment;
342
- let calibrationGap;
343
- const recommendations = [];
344
- if (expectedAccuracy !== undefined) {
345
- calibrationGap = meanConfidence - expectedAccuracy;
346
- if (Math.abs(calibrationGap) <= 0.1) {
347
- calibrationScore = 0.9;
348
- assessment = 'well_calibrated';
349
- }
350
- else if (calibrationGap > 0.1) {
351
- calibrationScore = Math.max(0, 1 - calibrationGap);
352
- assessment = 'overconfident';
353
- recommendations.push(`Consider reducing confidence by ~${(calibrationGap * 100).toFixed(0)}%`, 'Review historical accuracy data for calibration');
354
- }
355
- else {
356
- calibrationScore = Math.max(0, 1 + calibrationGap);
357
- assessment = 'underconfident';
358
- recommendations.push(`Consider increasing confidence by ~${(Math.abs(calibrationGap) * 100).toFixed(0)}%`, 'Agent may be underestimating its capabilities');
359
- }
360
- }
361
- else {
362
- // Without historical data, assess based on consistency
363
- const confidenceVariance = this.calculateVariance(confidences);
364
- if (confidenceVariance > 0.1) {
365
- calibrationScore = Math.max(0, 1 - confidenceVariance);
366
- assessment = 'inconsistent';
367
- recommendations.push('Confidence varies significantly across invocations', 'Consider implementing more stable confidence estimation');
368
- }
369
- else {
370
- calibrationScore = 0.7; // Default moderate score without historical data
371
- assessment = 'insufficient_data';
372
- recommendations.push('Historical accuracy data needed for proper calibration assessment', 'Track prediction outcomes to build accuracy baseline');
373
- }
374
- }
375
- calibrations.push({
376
- agent_id: agentId,
377
- calibration_score: calibrationScore,
378
- assessment,
379
- mean_reported_confidence: meanConfidence,
380
- expected_accuracy: expectedAccuracy,
381
- calibration_gap: calibrationGap,
382
- traces_analyzed: agentTraces.length,
383
- recommendations,
384
- });
385
- }
386
- return calibrations;
387
- }
388
- /**
389
- * Calculate variance of an array of numbers
390
- */
391
- calculateVariance(values) {
392
- if (values.length < 2)
393
- return 0;
394
- const mean = values.reduce((a, b) => a + b, 0) / values.length;
395
- const squaredDiffs = values.map(v => Math.pow(v - mean, 2));
396
- return squaredDiffs.reduce((a, b) => a + b, 0) / values.length;
397
- }
398
- /**
399
- * Identify systemic reasoning issues across traces
400
- */
401
- identifySystemicIssues(traces) {
402
- const issues = [];
403
- let issueCount = 0;
404
- // Check for anchoring bias: early traces heavily influencing later ones
405
- const sortedTraces = [...traces].sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime());
406
- if (sortedTraces.length >= 3) {
407
- const earlyConfidence = sortedTraces.slice(0, Math.floor(sortedTraces.length / 3))
408
- .map(t => t.reported_confidence);
409
- const lateConfidence = sortedTraces.slice(-Math.floor(sortedTraces.length / 3))
410
- .map(t => t.reported_confidence);
411
- const earlyMean = earlyConfidence.reduce((a, b) => a + b, 0) / earlyConfidence.length;
412
- const lateMean = lateConfidence.reduce((a, b) => a + b, 0) / lateConfidence.length;
413
- if (Math.abs(earlyMean - lateMean) < 0.05 && this.calculateVariance(earlyConfidence) < 0.01) {
414
- issueCount++;
415
- issues.push({
416
- issue_id: `issue-${issueCount}`,
417
- type: 'anchoring_bias',
418
- severity: 'medium',
419
- affected_agents: [...new Set(traces.map(t => t.agent_id))],
420
- occurrences: sortedTraces.slice(0, 3).map(t => t.execution_ref),
421
- frequency: 'occasional',
422
- description: 'Early confidence values may be anchoring subsequent analyses',
423
- evidence: [
424
- {
425
- trace_ref: sortedTraces[0].execution_ref,
426
- observation: `Early mean confidence: ${earlyMean.toFixed(3)}`,
427
- },
428
- {
429
- trace_ref: sortedTraces[sortedTraces.length - 1].execution_ref,
430
- observation: `Late mean confidence: ${lateMean.toFixed(3)} (minimal drift suggests anchoring)`,
431
- },
432
- ],
433
- impact: 'May reduce adaptability to new information',
434
- finding_confidence: 0.6,
435
- });
436
- }
437
- }
438
- // Check for missing uncertainty acknowledgment
439
- const highConfidenceTraces = traces.filter(t => t.reported_confidence > 0.9);
440
- if (highConfidenceTraces.length > traces.length * 0.5) {
441
- issueCount++;
442
- issues.push({
443
- issue_id: `issue-${issueCount}`,
444
- type: 'missing_uncertainty',
445
- severity: 'medium',
446
- affected_agents: [...new Set(highConfidenceTraces.map(t => t.agent_id))],
447
- occurrences: highConfidenceTraces.slice(0, 5).map(t => t.execution_ref),
448
- frequency: highConfidenceTraces.length > traces.length * 0.7 ? 'pervasive' : 'frequent',
449
- description: 'Majority of traces report very high confidence (>90%), potentially underestimating uncertainty',
450
- evidence: highConfidenceTraces.slice(0, 3).map(t => ({
451
- trace_ref: t.execution_ref,
452
- observation: `Confidence: ${(t.reported_confidence * 100).toFixed(1)}%`,
453
- })),
454
- impact: 'High confidence without uncertainty bounds may lead to overreliance on outputs',
455
- finding_confidence: 0.75,
456
- });
457
- }
458
- // Check for inconsistent criteria across agents
459
- const constraintSets = new Map();
460
- for (const trace of traces) {
461
- const existing = constraintSets.get(trace.decision_type) || new Set();
462
- trace.constraints_applied.forEach(c => existing.add(c));
463
- constraintSets.set(trace.decision_type, existing);
464
- }
465
- for (const [decisionType, constraints] of constraintSets) {
466
- const tracesOfType = traces.filter(t => t.decision_type === decisionType);
467
- const uniqueConstraintCombinations = new Set(tracesOfType.map(t => JSON.stringify([...t.constraints_applied].sort())));
468
- if (uniqueConstraintCombinations.size > 3 && tracesOfType.length > 5) {
469
- issueCount++;
470
- issues.push({
471
- issue_id: `issue-${issueCount}`,
472
- type: 'inconsistent_criteria',
473
- severity: 'low',
474
- affected_agents: [...new Set(tracesOfType.map(t => t.agent_id))],
475
- occurrences: tracesOfType.slice(0, 3).map(t => t.execution_ref),
476
- frequency: 'occasional',
477
- description: `Multiple different constraint sets (${uniqueConstraintCombinations.size}) used for decision type "${decisionType}"`,
478
- evidence: tracesOfType.slice(0, 2).map(t => ({
479
- trace_ref: t.execution_ref,
480
- observation: `Constraints: ${t.constraints_applied.join(', ')}`,
481
- })),
482
- impact: 'May indicate inconsistent evaluation standards',
483
- finding_confidence: 0.65,
484
- });
485
- }
486
- }
487
- return issues;
488
- }
489
- /**
490
- * Calculate overall reasoning quality metrics
491
- */
492
- calculateQualityMetrics(traces, contradictions, calibrations, systemicIssues) {
493
- // Consistency score: penalize for contradictions
494
- const contradictionPenalty = Math.min(contradictions.length * 0.1, 0.5);
495
- const consistencyScore = Math.max(0, 1 - contradictionPenalty);
496
- // Completeness score: based on traces having required fields
497
- const tracesWithConstraints = traces.filter(t => t.constraints_applied.length > 0).length;
498
- const completenessScore = traces.length > 0 ? tracesWithConstraints / traces.length : 0;
499
- // Clarity score: based on calibration quality
500
- const avgCalibrationScore = calibrations.length > 0
501
- ? calibrations.reduce((a, b) => a + b.calibration_score, 0) / calibrations.length
502
- : 0.7;
503
- const clarityScore = avgCalibrationScore;
504
- // Constraint adherence score
505
- const constraintAdherenceScore = traces.length > 0 ? completenessScore : 0;
506
- // Calculate overall score
507
- const overallScore = (consistencyScore * 0.35 +
508
- completenessScore * 0.2 +
509
- clarityScore * 0.25 +
510
- constraintAdherenceScore * 0.2) * (1 - Math.min(systemicIssues.length * 0.05, 0.3));
511
- const uniqueAgents = new Set(traces.map(t => t.agent_id));
512
- return {
513
- overall_score: Math.max(0, Math.min(1, overallScore)),
514
- consistency_score: consistencyScore,
515
- completeness_score: completenessScore,
516
- clarity_score: clarityScore,
517
- constraint_adherence_score: constraintAdherenceScore,
518
- traces_analyzed: traces.length,
519
- agents_analyzed: uniqueAgents.size,
520
- coverage_percentage: 100, // All provided traces are analyzed
521
- };
522
- }
523
- /**
524
- * Generate prioritized key findings
525
- */
526
- generateKeyFindings(contradictions, calibrations, systemicIssues, qualityMetrics) {
527
- const findings = [];
528
- // Critical/high severity contradictions
529
- const criticalContradictions = contradictions.filter(c => c.severity === 'critical' || c.severity === 'high');
530
- if (criticalContradictions.length > 0) {
531
- findings.push({
532
- priority: 1,
533
- category: 'contradiction',
534
- finding: `Found ${criticalContradictions.length} high-severity contradiction(s) requiring attention`,
535
- affected_entities: criticalContradictions.flatMap(c => c.involved_agents),
536
- });
537
- }
538
- // Calibration issues
539
- const poorlyCalibrated = calibrations.filter(c => c.assessment === 'overconfident' || c.assessment === 'underconfident');
540
- if (poorlyCalibrated.length > 0) {
541
- findings.push({
542
- priority: 2,
543
- category: 'calibration',
544
- finding: `${poorlyCalibrated.length} agent(s) show calibration issues (${poorlyCalibrated.map(c => c.assessment).join(', ')})`,
545
- affected_entities: poorlyCalibrated.map(c => c.agent_id),
546
- });
547
- }
548
- // Systemic issues
549
- const severeSystems = systemicIssues.filter(i => i.severity === 'critical' || i.severity === 'high');
550
- if (severeSystems.length > 0) {
551
- findings.push({
552
- priority: 3,
553
- category: 'systemic',
554
- finding: `Identified ${severeSystems.length} systemic issue(s): ${severeSystems.map(i => i.type).join(', ')}`,
555
- affected_entities: severeSystems.flatMap(i => i.affected_agents),
556
- });
557
- }
558
- // Overall quality assessment
559
- if (qualityMetrics.overall_score < 0.5) {
560
- findings.push({
561
- priority: 4,
562
- category: 'quality',
563
- finding: `Overall reasoning quality score is low (${(qualityMetrics.overall_score * 100).toFixed(1)}%)`,
564
- affected_entities: [],
565
- });
566
- }
567
- else if (qualityMetrics.overall_score >= 0.8) {
568
- findings.push({
569
- priority: 10,
570
- category: 'quality',
571
- finding: `Overall reasoning quality is good (${(qualityMetrics.overall_score * 100).toFixed(1)}%)`,
572
- affected_entities: [],
573
- });
574
- }
575
- // Sort by priority
576
- return findings.sort((a, b) => a.priority - b.priority);
577
- }
578
- /**
579
- * Generate summary of the analysis
580
- */
581
- generateSummary(traceCount, agentCount, contradictionCount, issueCount, overallScore) {
582
- const qualityDescriptor = overallScore >= 0.8 ? 'good' :
583
- overallScore >= 0.6 ? 'moderate' :
584
- overallScore >= 0.4 ? 'fair' : 'poor';
585
- let summary = `Meta-reasoning analysis of ${traceCount} trace(s) from ${agentCount} agent(s). `;
586
- summary += `Overall reasoning quality is ${qualityDescriptor} (${(overallScore * 100).toFixed(1)}%). `;
587
- if (contradictionCount > 0) {
588
- summary += `Detected ${contradictionCount} contradiction(s). `;
589
- }
590
- if (issueCount > 0) {
591
- summary += `Identified ${issueCount} systemic issue(s). `;
592
- }
593
- if (contradictionCount === 0 && issueCount === 0) {
594
- summary += `No significant issues detected.`;
595
- }
596
- return summary.trim();
597
- }
598
- /**
599
- * Extract assumptions made during analysis
600
- */
601
- extractAssumptions(input) {
602
- const assumptions = [
603
- 'All provided traces are authentic and unmodified',
604
- 'Timestamps are accurate and timezone-consistent (UTC)',
605
- 'Reported confidence values reflect agent certainty',
606
- ];
607
- if (!input.context?.historical_accuracy) {
608
- assumptions.push('No historical accuracy baseline available - calibration assessment limited');
609
- }
610
- if (input.traces.length < 5) {
611
- assumptions.push('Limited trace count may reduce statistical significance of findings');
612
- }
613
- if (!input.context?.correlation_groups?.length) {
614
- assumptions.push('No correlation groups specified - assuming all traces are independent');
615
- }
616
- return assumptions;
617
- }
618
- /**
619
- * Calculate confidence score based on analysis quality
620
- */
621
- calculateConfidence(output, input) {
622
- let confidence = 0.7; // Base confidence
623
- // Boost for sufficient trace count
624
- if (input.traces.length >= 10) {
625
- confidence += 0.1;
626
- }
627
- else if (input.traces.length >= 5) {
628
- confidence += 0.05;
629
- }
630
- // Boost for multiple agents (cross-validation potential)
631
- if (output.analysis_metadata.unique_agents >= 3) {
632
- confidence += 0.05;
633
- }
634
- // Boost for having historical accuracy data
635
- if (input.context?.historical_accuracy) {
636
- confidence += 0.05;
637
- }
638
- // Reduce for limited scope
639
- const scopeCount = Object.values(output.analysis_metadata.scope_executed)
640
- .filter(Boolean).length;
641
- if (scopeCount < 3) {
642
- confidence -= 0.05;
643
- }
644
- return Math.min(1.0, Math.max(0.0, confidence));
645
- }
646
- /**
647
- * Get constraints applied during analysis
648
- */
649
- getAppliedConstraints(input) {
650
- const constraints = [
651
- 'read_only_analysis',
652
- 'no_output_override',
653
- 'no_correction_enforcement',
654
- 'no_logic_execution',
655
- 'deterministic_output',
656
- 'stateless_processing',
657
- ];
658
- // Add scope-specific constraints
659
- if (input.scope.detect_contradictions) {
660
- constraints.push('contradiction_detection_enabled');
661
- }
662
- if (input.scope.assess_confidence_calibration) {
663
- constraints.push('calibration_assessment_enabled');
664
- }
665
- if (input.scope.identify_systemic_issues) {
666
- constraints.push('systemic_analysis_enabled');
667
- }
668
- return constraints;
669
- }
670
- /**
671
- * Classify error for proper error code
672
- */
673
- classifyError(error) {
674
- if (error instanceof Error) {
675
- if (error.name === 'ZodError') {
676
- return contracts_1.AgentErrorCodes.VALIDATION_FAILED;
677
- }
678
- if (error.message.includes('persistence') || error.message.includes('ruvector')) {
679
- return contracts_1.AgentErrorCodes.PERSISTENCE_ERROR;
680
- }
681
- }
682
- return contracts_1.AgentErrorCodes.PROCESSING_ERROR;
683
- }
684
- }
685
- exports.MetaReasonerAgent = MetaReasonerAgent;
686
- //# sourceMappingURL=meta-reasoner-agent.js.map