agentic-qe 3.3.4 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (457) hide show
  1. package/.claude/agents/v3/qe-queen-coordinator.md +332 -166
  2. package/.claude/helpers/statusline-v3.cjs +85 -42
  3. package/.claude/skills/qcsd-ideation-swarm/SKILL.md +7 -4
  4. package/README.md +71 -2
  5. package/package.json +1 -1
  6. package/scripts/cloud-db-config.json +10 -5
  7. package/scripts/merge-v3-to-root.sql +48 -0
  8. package/v3/CHANGELOG.md +156 -0
  9. package/v3/README.md +118 -1
  10. package/v3/assets/agents/v3/qe-queen-coordinator.md +332 -166
  11. package/v3/assets/skills/qcsd-ideation-swarm/SKILL.md +7 -4
  12. package/v3/dist/adapters/a2a/agent-cards/generator.d.ts +153 -0
  13. package/v3/dist/adapters/a2a/agent-cards/generator.d.ts.map +1 -0
  14. package/v3/dist/adapters/a2a/agent-cards/generator.js +478 -0
  15. package/v3/dist/adapters/a2a/agent-cards/generator.js.map +1 -0
  16. package/v3/dist/adapters/a2a/agent-cards/schema.d.ts +274 -0
  17. package/v3/dist/adapters/a2a/agent-cards/schema.d.ts.map +1 -0
  18. package/v3/dist/adapters/a2a/agent-cards/schema.js +135 -0
  19. package/v3/dist/adapters/a2a/agent-cards/schema.js.map +1 -0
  20. package/v3/dist/adapters/a2a/agent-cards/validator.d.ts +514 -0
  21. package/v3/dist/adapters/a2a/agent-cards/validator.d.ts.map +1 -0
  22. package/v3/dist/adapters/a2a/agent-cards/validator.js +555 -0
  23. package/v3/dist/adapters/a2a/agent-cards/validator.js.map +1 -0
  24. package/v3/dist/adapters/a2a/auth/index.d.ts +23 -0
  25. package/v3/dist/adapters/a2a/auth/index.d.ts.map +1 -0
  26. package/v3/dist/adapters/a2a/auth/index.js +85 -0
  27. package/v3/dist/adapters/a2a/auth/index.js.map +1 -0
  28. package/v3/dist/adapters/a2a/auth/jwt-utils.d.ts +215 -0
  29. package/v3/dist/adapters/a2a/auth/jwt-utils.d.ts.map +1 -0
  30. package/v3/dist/adapters/a2a/auth/jwt-utils.js +314 -0
  31. package/v3/dist/adapters/a2a/auth/jwt-utils.js.map +1 -0
  32. package/v3/dist/adapters/a2a/auth/middleware.d.ts +173 -0
  33. package/v3/dist/adapters/a2a/auth/middleware.d.ts.map +1 -0
  34. package/v3/dist/adapters/a2a/auth/middleware.js +300 -0
  35. package/v3/dist/adapters/a2a/auth/middleware.js.map +1 -0
  36. package/v3/dist/adapters/a2a/auth/oauth-provider.d.ts +308 -0
  37. package/v3/dist/adapters/a2a/auth/oauth-provider.d.ts.map +1 -0
  38. package/v3/dist/adapters/a2a/auth/oauth-provider.js +573 -0
  39. package/v3/dist/adapters/a2a/auth/oauth-provider.js.map +1 -0
  40. package/v3/dist/adapters/a2a/auth/routes.d.ts +244 -0
  41. package/v3/dist/adapters/a2a/auth/routes.d.ts.map +1 -0
  42. package/v3/dist/adapters/a2a/auth/routes.js +496 -0
  43. package/v3/dist/adapters/a2a/auth/routes.js.map +1 -0
  44. package/v3/dist/adapters/a2a/auth/scopes.d.ts +219 -0
  45. package/v3/dist/adapters/a2a/auth/scopes.d.ts.map +1 -0
  46. package/v3/dist/adapters/a2a/auth/scopes.js +292 -0
  47. package/v3/dist/adapters/a2a/auth/scopes.js.map +1 -0
  48. package/v3/dist/adapters/a2a/auth/token-store.d.ts +278 -0
  49. package/v3/dist/adapters/a2a/auth/token-store.d.ts.map +1 -0
  50. package/v3/dist/adapters/a2a/auth/token-store.js +453 -0
  51. package/v3/dist/adapters/a2a/auth/token-store.js.map +1 -0
  52. package/v3/dist/adapters/a2a/discovery/agent-health.d.ts +226 -0
  53. package/v3/dist/adapters/a2a/discovery/agent-health.d.ts.map +1 -0
  54. package/v3/dist/adapters/a2a/discovery/agent-health.js +426 -0
  55. package/v3/dist/adapters/a2a/discovery/agent-health.js.map +1 -0
  56. package/v3/dist/adapters/a2a/discovery/discovery-service.d.ts +296 -0
  57. package/v3/dist/adapters/a2a/discovery/discovery-service.d.ts.map +1 -0
  58. package/v3/dist/adapters/a2a/discovery/discovery-service.js +520 -0
  59. package/v3/dist/adapters/a2a/discovery/discovery-service.js.map +1 -0
  60. package/v3/dist/adapters/a2a/discovery/file-watcher.d.ts +166 -0
  61. package/v3/dist/adapters/a2a/discovery/file-watcher.d.ts.map +1 -0
  62. package/v3/dist/adapters/a2a/discovery/file-watcher.js +385 -0
  63. package/v3/dist/adapters/a2a/discovery/file-watcher.js.map +1 -0
  64. package/v3/dist/adapters/a2a/discovery/hot-reload-service.d.ts +226 -0
  65. package/v3/dist/adapters/a2a/discovery/hot-reload-service.d.ts.map +1 -0
  66. package/v3/dist/adapters/a2a/discovery/hot-reload-service.js +433 -0
  67. package/v3/dist/adapters/a2a/discovery/hot-reload-service.js.map +1 -0
  68. package/v3/dist/adapters/a2a/discovery/index.d.ts +18 -0
  69. package/v3/dist/adapters/a2a/discovery/index.d.ts.map +1 -0
  70. package/v3/dist/adapters/a2a/discovery/index.js +54 -0
  71. package/v3/dist/adapters/a2a/discovery/index.js.map +1 -0
  72. package/v3/dist/adapters/a2a/discovery/metrics.d.ts +200 -0
  73. package/v3/dist/adapters/a2a/discovery/metrics.d.ts.map +1 -0
  74. package/v3/dist/adapters/a2a/discovery/metrics.js +371 -0
  75. package/v3/dist/adapters/a2a/discovery/metrics.js.map +1 -0
  76. package/v3/dist/adapters/a2a/discovery/routes.d.ts +184 -0
  77. package/v3/dist/adapters/a2a/discovery/routes.d.ts.map +1 -0
  78. package/v3/dist/adapters/a2a/discovery/routes.js +453 -0
  79. package/v3/dist/adapters/a2a/discovery/routes.js.map +1 -0
  80. package/v3/dist/adapters/a2a/index.d.ts +18 -0
  81. package/v3/dist/adapters/a2a/index.d.ts.map +1 -0
  82. package/v3/dist/adapters/a2a/index.js +139 -0
  83. package/v3/dist/adapters/a2a/index.js.map +1 -0
  84. package/v3/dist/adapters/a2a/jsonrpc/envelope.d.ts +312 -0
  85. package/v3/dist/adapters/a2a/jsonrpc/envelope.d.ts.map +1 -0
  86. package/v3/dist/adapters/a2a/jsonrpc/envelope.js +554 -0
  87. package/v3/dist/adapters/a2a/jsonrpc/envelope.js.map +1 -0
  88. package/v3/dist/adapters/a2a/jsonrpc/errors.d.ts +244 -0
  89. package/v3/dist/adapters/a2a/jsonrpc/errors.d.ts.map +1 -0
  90. package/v3/dist/adapters/a2a/jsonrpc/errors.js +365 -0
  91. package/v3/dist/adapters/a2a/jsonrpc/errors.js.map +1 -0
  92. package/v3/dist/adapters/a2a/jsonrpc/index.d.ts +14 -0
  93. package/v3/dist/adapters/a2a/jsonrpc/index.d.ts.map +1 -0
  94. package/v3/dist/adapters/a2a/jsonrpc/index.js +59 -0
  95. package/v3/dist/adapters/a2a/jsonrpc/index.js.map +1 -0
  96. package/v3/dist/adapters/a2a/jsonrpc/methods.d.ts +400 -0
  97. package/v3/dist/adapters/a2a/jsonrpc/methods.d.ts.map +1 -0
  98. package/v3/dist/adapters/a2a/jsonrpc/methods.js +249 -0
  99. package/v3/dist/adapters/a2a/jsonrpc/methods.js.map +1 -0
  100. package/v3/dist/adapters/a2a/notifications/index.d.ts +60 -0
  101. package/v3/dist/adapters/a2a/notifications/index.d.ts.map +1 -0
  102. package/v3/dist/adapters/a2a/notifications/index.js +99 -0
  103. package/v3/dist/adapters/a2a/notifications/index.js.map +1 -0
  104. package/v3/dist/adapters/a2a/notifications/retry-queue.d.ts +225 -0
  105. package/v3/dist/adapters/a2a/notifications/retry-queue.d.ts.map +1 -0
  106. package/v3/dist/adapters/a2a/notifications/retry-queue.js +449 -0
  107. package/v3/dist/adapters/a2a/notifications/retry-queue.js.map +1 -0
  108. package/v3/dist/adapters/a2a/notifications/signature.d.ts +133 -0
  109. package/v3/dist/adapters/a2a/notifications/signature.d.ts.map +1 -0
  110. package/v3/dist/adapters/a2a/notifications/signature.js +244 -0
  111. package/v3/dist/adapters/a2a/notifications/signature.js.map +1 -0
  112. package/v3/dist/adapters/a2a/notifications/subscription-store.d.ts +243 -0
  113. package/v3/dist/adapters/a2a/notifications/subscription-store.d.ts.map +1 -0
  114. package/v3/dist/adapters/a2a/notifications/subscription-store.js +486 -0
  115. package/v3/dist/adapters/a2a/notifications/subscription-store.js.map +1 -0
  116. package/v3/dist/adapters/a2a/notifications/webhook-service.d.ts +257 -0
  117. package/v3/dist/adapters/a2a/notifications/webhook-service.d.ts.map +1 -0
  118. package/v3/dist/adapters/a2a/notifications/webhook-service.js +542 -0
  119. package/v3/dist/adapters/a2a/notifications/webhook-service.js.map +1 -0
  120. package/v3/dist/adapters/a2a/tasks/index.d.ts +16 -0
  121. package/v3/dist/adapters/a2a/tasks/index.d.ts.map +1 -0
  122. package/v3/dist/adapters/a2a/tasks/index.js +33 -0
  123. package/v3/dist/adapters/a2a/tasks/index.js.map +1 -0
  124. package/v3/dist/adapters/a2a/tasks/task-manager.d.ts +306 -0
  125. package/v3/dist/adapters/a2a/tasks/task-manager.d.ts.map +1 -0
  126. package/v3/dist/adapters/a2a/tasks/task-manager.js +562 -0
  127. package/v3/dist/adapters/a2a/tasks/task-manager.js.map +1 -0
  128. package/v3/dist/adapters/a2a/tasks/task-router.d.ts +270 -0
  129. package/v3/dist/adapters/a2a/tasks/task-router.d.ts.map +1 -0
  130. package/v3/dist/adapters/a2a/tasks/task-router.js +574 -0
  131. package/v3/dist/adapters/a2a/tasks/task-router.js.map +1 -0
  132. package/v3/dist/adapters/a2a/tasks/task-store.d.ts +251 -0
  133. package/v3/dist/adapters/a2a/tasks/task-store.d.ts.map +1 -0
  134. package/v3/dist/adapters/a2a/tasks/task-store.js +468 -0
  135. package/v3/dist/adapters/a2a/tasks/task-store.js.map +1 -0
  136. package/v3/dist/adapters/a2ui/accessibility/aria-attributes.d.ts +294 -0
  137. package/v3/dist/adapters/a2ui/accessibility/aria-attributes.d.ts.map +1 -0
  138. package/v3/dist/adapters/a2ui/accessibility/aria-attributes.js +447 -0
  139. package/v3/dist/adapters/a2ui/accessibility/aria-attributes.js.map +1 -0
  140. package/v3/dist/adapters/a2ui/accessibility/index.d.ts +83 -0
  141. package/v3/dist/adapters/a2ui/accessibility/index.d.ts.map +1 -0
  142. package/v3/dist/adapters/a2ui/accessibility/index.js +155 -0
  143. package/v3/dist/adapters/a2ui/accessibility/index.js.map +1 -0
  144. package/v3/dist/adapters/a2ui/accessibility/keyboard-nav.d.ts +177 -0
  145. package/v3/dist/adapters/a2ui/accessibility/keyboard-nav.d.ts.map +1 -0
  146. package/v3/dist/adapters/a2ui/accessibility/keyboard-nav.js +638 -0
  147. package/v3/dist/adapters/a2ui/accessibility/keyboard-nav.js.map +1 -0
  148. package/v3/dist/adapters/a2ui/accessibility/wcag-validator.d.ts +186 -0
  149. package/v3/dist/adapters/a2ui/accessibility/wcag-validator.d.ts.map +1 -0
  150. package/v3/dist/adapters/a2ui/accessibility/wcag-validator.js +816 -0
  151. package/v3/dist/adapters/a2ui/accessibility/wcag-validator.js.map +1 -0
  152. package/v3/dist/adapters/a2ui/catalog/component-schemas.d.ts +227 -0
  153. package/v3/dist/adapters/a2ui/catalog/component-schemas.d.ts.map +1 -0
  154. package/v3/dist/adapters/a2ui/catalog/component-schemas.js +1090 -0
  155. package/v3/dist/adapters/a2ui/catalog/component-schemas.js.map +1 -0
  156. package/v3/dist/adapters/a2ui/catalog/index.d.ts +55 -0
  157. package/v3/dist/adapters/a2ui/catalog/index.d.ts.map +1 -0
  158. package/v3/dist/adapters/a2ui/catalog/index.js +100 -0
  159. package/v3/dist/adapters/a2ui/catalog/index.js.map +1 -0
  160. package/v3/dist/adapters/a2ui/catalog/qe-catalog.d.ts +456 -0
  161. package/v3/dist/adapters/a2ui/catalog/qe-catalog.d.ts.map +1 -0
  162. package/v3/dist/adapters/a2ui/catalog/qe-catalog.js +413 -0
  163. package/v3/dist/adapters/a2ui/catalog/qe-catalog.js.map +1 -0
  164. package/v3/dist/adapters/a2ui/catalog/standard-catalog.d.ts +581 -0
  165. package/v3/dist/adapters/a2ui/catalog/standard-catalog.d.ts.map +1 -0
  166. package/v3/dist/adapters/a2ui/catalog/standard-catalog.js +409 -0
  167. package/v3/dist/adapters/a2ui/catalog/standard-catalog.js.map +1 -0
  168. package/v3/dist/adapters/a2ui/data/bound-value.d.ts +252 -0
  169. package/v3/dist/adapters/a2ui/data/bound-value.d.ts.map +1 -0
  170. package/v3/dist/adapters/a2ui/data/bound-value.js +403 -0
  171. package/v3/dist/adapters/a2ui/data/bound-value.js.map +1 -0
  172. package/v3/dist/adapters/a2ui/data/index.d.ts +14 -0
  173. package/v3/dist/adapters/a2ui/data/index.d.ts.map +1 -0
  174. package/v3/dist/adapters/a2ui/data/index.js +41 -0
  175. package/v3/dist/adapters/a2ui/data/index.js.map +1 -0
  176. package/v3/dist/adapters/a2ui/data/json-pointer-resolver.d.ts +187 -0
  177. package/v3/dist/adapters/a2ui/data/json-pointer-resolver.d.ts.map +1 -0
  178. package/v3/dist/adapters/a2ui/data/json-pointer-resolver.js +425 -0
  179. package/v3/dist/adapters/a2ui/data/json-pointer-resolver.js.map +1 -0
  180. package/v3/dist/adapters/a2ui/data/reactive-store.d.ts +241 -0
  181. package/v3/dist/adapters/a2ui/data/reactive-store.d.ts.map +1 -0
  182. package/v3/dist/adapters/a2ui/data/reactive-store.js +461 -0
  183. package/v3/dist/adapters/a2ui/data/reactive-store.js.map +1 -0
  184. package/v3/dist/adapters/a2ui/index.d.ts +17 -0
  185. package/v3/dist/adapters/a2ui/index.d.ts.map +1 -0
  186. package/v3/dist/adapters/a2ui/index.js +119 -0
  187. package/v3/dist/adapters/a2ui/index.js.map +1 -0
  188. package/v3/dist/adapters/a2ui/integration/agui-sync.d.ts +259 -0
  189. package/v3/dist/adapters/a2ui/integration/agui-sync.d.ts.map +1 -0
  190. package/v3/dist/adapters/a2ui/integration/agui-sync.js +559 -0
  191. package/v3/dist/adapters/a2ui/integration/agui-sync.js.map +1 -0
  192. package/v3/dist/adapters/a2ui/integration/index.d.ts +11 -0
  193. package/v3/dist/adapters/a2ui/integration/index.d.ts.map +1 -0
  194. package/v3/dist/adapters/a2ui/integration/index.js +23 -0
  195. package/v3/dist/adapters/a2ui/integration/index.js.map +1 -0
  196. package/v3/dist/adapters/a2ui/integration/surface-state-bridge.d.ts +209 -0
  197. package/v3/dist/adapters/a2ui/integration/surface-state-bridge.d.ts.map +1 -0
  198. package/v3/dist/adapters/a2ui/integration/surface-state-bridge.js +545 -0
  199. package/v3/dist/adapters/a2ui/integration/surface-state-bridge.js.map +1 -0
  200. package/v3/dist/adapters/a2ui/renderer/component-builder.d.ts +227 -0
  201. package/v3/dist/adapters/a2ui/renderer/component-builder.d.ts.map +1 -0
  202. package/v3/dist/adapters/a2ui/renderer/component-builder.js +488 -0
  203. package/v3/dist/adapters/a2ui/renderer/component-builder.js.map +1 -0
  204. package/v3/dist/adapters/a2ui/renderer/index.d.ts +16 -0
  205. package/v3/dist/adapters/a2ui/renderer/index.d.ts.map +1 -0
  206. package/v3/dist/adapters/a2ui/renderer/index.js +50 -0
  207. package/v3/dist/adapters/a2ui/renderer/index.js.map +1 -0
  208. package/v3/dist/adapters/a2ui/renderer/message-types.d.ts +299 -0
  209. package/v3/dist/adapters/a2ui/renderer/message-types.d.ts.map +1 -0
  210. package/v3/dist/adapters/a2ui/renderer/message-types.js +187 -0
  211. package/v3/dist/adapters/a2ui/renderer/message-types.js.map +1 -0
  212. package/v3/dist/adapters/a2ui/renderer/surface-generator.d.ts +210 -0
  213. package/v3/dist/adapters/a2ui/renderer/surface-generator.d.ts.map +1 -0
  214. package/v3/dist/adapters/a2ui/renderer/surface-generator.js +586 -0
  215. package/v3/dist/adapters/a2ui/renderer/surface-generator.js.map +1 -0
  216. package/v3/dist/adapters/a2ui/renderer/templates/accessibility-surface.d.ts +149 -0
  217. package/v3/dist/adapters/a2ui/renderer/templates/accessibility-surface.d.ts.map +1 -0
  218. package/v3/dist/adapters/a2ui/renderer/templates/accessibility-surface.js +414 -0
  219. package/v3/dist/adapters/a2ui/renderer/templates/accessibility-surface.js.map +1 -0
  220. package/v3/dist/adapters/a2ui/renderer/templates/coverage-surface.d.ts +95 -0
  221. package/v3/dist/adapters/a2ui/renderer/templates/coverage-surface.d.ts.map +1 -0
  222. package/v3/dist/adapters/a2ui/renderer/templates/coverage-surface.js +231 -0
  223. package/v3/dist/adapters/a2ui/renderer/templates/coverage-surface.js.map +1 -0
  224. package/v3/dist/adapters/a2ui/renderer/templates/index.d.ts +12 -0
  225. package/v3/dist/adapters/a2ui/renderer/templates/index.d.ts.map +1 -0
  226. package/v3/dist/adapters/a2ui/renderer/templates/index.js +16 -0
  227. package/v3/dist/adapters/a2ui/renderer/templates/index.js.map +1 -0
  228. package/v3/dist/adapters/a2ui/renderer/templates/security-surface.d.ts +121 -0
  229. package/v3/dist/adapters/a2ui/renderer/templates/security-surface.d.ts.map +1 -0
  230. package/v3/dist/adapters/a2ui/renderer/templates/security-surface.js +367 -0
  231. package/v3/dist/adapters/a2ui/renderer/templates/security-surface.js.map +1 -0
  232. package/v3/dist/adapters/a2ui/renderer/templates/test-results-surface.d.ts +104 -0
  233. package/v3/dist/adapters/a2ui/renderer/templates/test-results-surface.d.ts.map +1 -0
  234. package/v3/dist/adapters/a2ui/renderer/templates/test-results-surface.js +294 -0
  235. package/v3/dist/adapters/a2ui/renderer/templates/test-results-surface.js.map +1 -0
  236. package/v3/dist/adapters/ag-ui/backpressure-handler.d.ts +201 -0
  237. package/v3/dist/adapters/ag-ui/backpressure-handler.d.ts.map +1 -0
  238. package/v3/dist/adapters/ag-ui/backpressure-handler.js +399 -0
  239. package/v3/dist/adapters/ag-ui/backpressure-handler.js.map +1 -0
  240. package/v3/dist/adapters/ag-ui/event-adapter.d.ts +360 -0
  241. package/v3/dist/adapters/ag-ui/event-adapter.d.ts.map +1 -0
  242. package/v3/dist/adapters/ag-ui/event-adapter.js +1083 -0
  243. package/v3/dist/adapters/ag-ui/event-adapter.js.map +1 -0
  244. package/v3/dist/adapters/ag-ui/event-batcher.d.ts +242 -0
  245. package/v3/dist/adapters/ag-ui/event-batcher.d.ts.map +1 -0
  246. package/v3/dist/adapters/ag-ui/event-batcher.js +444 -0
  247. package/v3/dist/adapters/ag-ui/event-batcher.js.map +1 -0
  248. package/v3/dist/adapters/ag-ui/event-types.d.ts +450 -0
  249. package/v3/dist/adapters/ag-ui/event-types.d.ts.map +1 -0
  250. package/v3/dist/adapters/ag-ui/event-types.js +173 -0
  251. package/v3/dist/adapters/ag-ui/event-types.js.map +1 -0
  252. package/v3/dist/adapters/ag-ui/index.d.ts +17 -0
  253. package/v3/dist/adapters/ag-ui/index.d.ts.map +1 -0
  254. package/v3/dist/adapters/ag-ui/index.js +47 -0
  255. package/v3/dist/adapters/ag-ui/index.js.map +1 -0
  256. package/v3/dist/adapters/ag-ui/json-patch-utils.d.ts +136 -0
  257. package/v3/dist/adapters/ag-ui/json-patch-utils.d.ts.map +1 -0
  258. package/v3/dist/adapters/ag-ui/json-patch-utils.js +574 -0
  259. package/v3/dist/adapters/ag-ui/json-patch-utils.js.map +1 -0
  260. package/v3/dist/adapters/ag-ui/json-patch.d.ts +241 -0
  261. package/v3/dist/adapters/ag-ui/json-patch.d.ts.map +1 -0
  262. package/v3/dist/adapters/ag-ui/json-patch.js +726 -0
  263. package/v3/dist/adapters/ag-ui/json-patch.js.map +1 -0
  264. package/v3/dist/adapters/ag-ui/state-delta-cache.d.ts +218 -0
  265. package/v3/dist/adapters/ag-ui/state-delta-cache.d.ts.map +1 -0
  266. package/v3/dist/adapters/ag-ui/state-delta-cache.js +422 -0
  267. package/v3/dist/adapters/ag-ui/state-delta-cache.js.map +1 -0
  268. package/v3/dist/adapters/ag-ui/state-manager.d.ts +249 -0
  269. package/v3/dist/adapters/ag-ui/state-manager.d.ts.map +1 -0
  270. package/v3/dist/adapters/ag-ui/state-manager.js +511 -0
  271. package/v3/dist/adapters/ag-ui/state-manager.js.map +1 -0
  272. package/v3/dist/adapters/ag-ui/stream-controller.d.ts +195 -0
  273. package/v3/dist/adapters/ag-ui/stream-controller.d.ts.map +1 -0
  274. package/v3/dist/adapters/ag-ui/stream-controller.js +481 -0
  275. package/v3/dist/adapters/ag-ui/stream-controller.js.map +1 -0
  276. package/v3/dist/adapters/index.d.ts +4 -0
  277. package/v3/dist/adapters/index.d.ts.map +1 -1
  278. package/v3/dist/adapters/index.js +89 -0
  279. package/v3/dist/adapters/index.js.map +1 -1
  280. package/v3/dist/cli/bundle.js +1507 -425
  281. package/v3/dist/coordination/consensus/providers/claude-provider.js +1 -1
  282. package/v3/dist/coordination/consensus/providers/gemini-provider.js +1 -1
  283. package/v3/dist/coordination/consensus/providers/openai-provider.js +1 -1
  284. package/v3/dist/init/init-wizard.d.ts.map +1 -1
  285. package/v3/dist/init/init-wizard.js +19 -4
  286. package/v3/dist/init/init-wizard.js.map +1 -1
  287. package/v3/dist/init/migration/config-migrator.d.ts.map +1 -1
  288. package/v3/dist/init/migration/config-migrator.js +15 -1
  289. package/v3/dist/init/migration/config-migrator.js.map +1 -1
  290. package/v3/dist/init/phases/05-learning.js +1 -1
  291. package/v3/dist/init/phases/05-learning.js.map +1 -1
  292. package/v3/dist/init/self-configurator.d.ts +7 -0
  293. package/v3/dist/init/self-configurator.d.ts.map +1 -1
  294. package/v3/dist/init/self-configurator.js +23 -27
  295. package/v3/dist/init/self-configurator.js.map +1 -1
  296. package/v3/dist/integrations/ruvector/interfaces.js +1 -1
  297. package/v3/dist/integrations/ruvector/interfaces.js.map +1 -1
  298. package/v3/dist/kernel/index.d.ts +1 -1
  299. package/v3/dist/kernel/index.d.ts.map +1 -1
  300. package/v3/dist/kernel/index.js +3 -1
  301. package/v3/dist/kernel/index.js.map +1 -1
  302. package/v3/dist/kernel/plugin-loader.d.ts.map +1 -1
  303. package/v3/dist/kernel/plugin-loader.js +6 -1
  304. package/v3/dist/kernel/plugin-loader.js.map +1 -1
  305. package/v3/dist/kernel/unified-memory.d.ts +123 -0
  306. package/v3/dist/kernel/unified-memory.d.ts.map +1 -1
  307. package/v3/dist/kernel/unified-memory.js +258 -2
  308. package/v3/dist/kernel/unified-memory.js.map +1 -1
  309. package/v3/dist/learning/qe-unified-memory.js +1 -1
  310. package/v3/dist/learning/qe-unified-memory.js.map +1 -1
  311. package/v3/dist/learning/real-qe-reasoning-bank.js +2 -2
  312. package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
  313. package/v3/dist/learning/sqlite-persistence.d.ts +1 -1
  314. package/v3/dist/learning/sqlite-persistence.js +1 -1
  315. package/v3/dist/learning/sqlite-persistence.js.map +1 -1
  316. package/v3/dist/learning/v2-to-v3-migration.d.ts +2 -2
  317. package/v3/dist/learning/v2-to-v3-migration.d.ts.map +1 -1
  318. package/v3/dist/learning/v2-to-v3-migration.js +2 -2
  319. package/v3/dist/learning/v2-to-v3-migration.js.map +1 -1
  320. package/v3/dist/mcp/bundle.js +63075 -53304
  321. package/v3/dist/mcp/entry.d.ts +5 -0
  322. package/v3/dist/mcp/entry.d.ts.map +1 -1
  323. package/v3/dist/mcp/entry.js +36 -0
  324. package/v3/dist/mcp/entry.js.map +1 -1
  325. package/v3/dist/mcp/http-server.d.ts +95 -0
  326. package/v3/dist/mcp/http-server.d.ts.map +1 -0
  327. package/v3/dist/mcp/http-server.js +833 -0
  328. package/v3/dist/mcp/http-server.js.map +1 -0
  329. package/v3/dist/mcp/protocol-server.d.ts +6 -0
  330. package/v3/dist/mcp/protocol-server.d.ts.map +1 -1
  331. package/v3/dist/mcp/protocol-server.js +40 -0
  332. package/v3/dist/mcp/protocol-server.js.map +1 -1
  333. package/v3/dist/mcp/transport/index.d.ts +25 -3
  334. package/v3/dist/mcp/transport/index.d.ts.map +1 -1
  335. package/v3/dist/mcp/transport/index.js +22 -4
  336. package/v3/dist/mcp/transport/index.js.map +1 -1
  337. package/v3/dist/mcp/transport/sse/connection-manager.d.ts +84 -0
  338. package/v3/dist/mcp/transport/sse/connection-manager.d.ts.map +1 -0
  339. package/v3/dist/mcp/transport/sse/connection-manager.js +271 -0
  340. package/v3/dist/mcp/transport/sse/connection-manager.js.map +1 -0
  341. package/v3/dist/mcp/transport/sse/index.d.ts +10 -0
  342. package/v3/dist/mcp/transport/sse/index.d.ts.map +1 -0
  343. package/v3/dist/mcp/transport/sse/index.js +15 -0
  344. package/v3/dist/mcp/transport/sse/index.js.map +1 -0
  345. package/v3/dist/mcp/transport/sse/sse-transport.d.ts +56 -0
  346. package/v3/dist/mcp/transport/sse/sse-transport.d.ts.map +1 -0
  347. package/v3/dist/mcp/transport/sse/sse-transport.js +381 -0
  348. package/v3/dist/mcp/transport/sse/sse-transport.js.map +1 -0
  349. package/v3/dist/mcp/transport/sse/types.d.ts +237 -0
  350. package/v3/dist/mcp/transport/sse/types.d.ts.map +1 -0
  351. package/v3/dist/mcp/transport/sse/types.js +37 -0
  352. package/v3/dist/mcp/transport/sse/types.js.map +1 -0
  353. package/v3/dist/mcp/transport/websocket/connection-manager.d.ts +143 -0
  354. package/v3/dist/mcp/transport/websocket/connection-manager.d.ts.map +1 -0
  355. package/v3/dist/mcp/transport/websocket/connection-manager.js +522 -0
  356. package/v3/dist/mcp/transport/websocket/connection-manager.js.map +1 -0
  357. package/v3/dist/mcp/transport/websocket/index.d.ts +10 -0
  358. package/v3/dist/mcp/transport/websocket/index.d.ts.map +1 -0
  359. package/v3/dist/mcp/transport/websocket/index.js +19 -0
  360. package/v3/dist/mcp/transport/websocket/index.js.map +1 -0
  361. package/v3/dist/mcp/transport/websocket/types.d.ts +354 -0
  362. package/v3/dist/mcp/transport/websocket/types.d.ts.map +1 -0
  363. package/v3/dist/mcp/transport/websocket/types.js +49 -0
  364. package/v3/dist/mcp/transport/websocket/types.js.map +1 -0
  365. package/v3/dist/mcp/transport/websocket/websocket-transport.d.ts +77 -0
  366. package/v3/dist/mcp/transport/websocket/websocket-transport.d.ts.map +1 -0
  367. package/v3/dist/mcp/transport/websocket/websocket-transport.js +622 -0
  368. package/v3/dist/mcp/transport/websocket/websocket-transport.js.map +1 -0
  369. package/v3/dist/memory/crdt/convergence-tracker.d.ts +59 -0
  370. package/v3/dist/memory/crdt/convergence-tracker.d.ts.map +1 -0
  371. package/v3/dist/memory/crdt/convergence-tracker.js +325 -0
  372. package/v3/dist/memory/crdt/convergence-tracker.js.map +1 -0
  373. package/v3/dist/memory/crdt/crdt-store.d.ts +55 -0
  374. package/v3/dist/memory/crdt/crdt-store.d.ts.map +1 -0
  375. package/v3/dist/memory/crdt/crdt-store.js +582 -0
  376. package/v3/dist/memory/crdt/crdt-store.js.map +1 -0
  377. package/v3/dist/memory/crdt/g-counter.d.ts +47 -0
  378. package/v3/dist/memory/crdt/g-counter.d.ts.map +1 -0
  379. package/v3/dist/memory/crdt/g-counter.js +134 -0
  380. package/v3/dist/memory/crdt/g-counter.js.map +1 -0
  381. package/v3/dist/memory/crdt/index.d.ts +52 -0
  382. package/v3/dist/memory/crdt/index.d.ts.map +1 -0
  383. package/v3/dist/memory/crdt/index.js +66 -0
  384. package/v3/dist/memory/crdt/index.js.map +1 -0
  385. package/v3/dist/memory/crdt/lww-register.d.ts +40 -0
  386. package/v3/dist/memory/crdt/lww-register.d.ts.map +1 -0
  387. package/v3/dist/memory/crdt/lww-register.js +133 -0
  388. package/v3/dist/memory/crdt/lww-register.js.map +1 -0
  389. package/v3/dist/memory/crdt/or-set.d.ts +62 -0
  390. package/v3/dist/memory/crdt/or-set.d.ts.map +1 -0
  391. package/v3/dist/memory/crdt/or-set.js +336 -0
  392. package/v3/dist/memory/crdt/or-set.js.map +1 -0
  393. package/v3/dist/memory/crdt/pn-counter.d.ts +53 -0
  394. package/v3/dist/memory/crdt/pn-counter.d.ts.map +1 -0
  395. package/v3/dist/memory/crdt/pn-counter.js +147 -0
  396. package/v3/dist/memory/crdt/pn-counter.js.map +1 -0
  397. package/v3/dist/memory/crdt/types.d.ts +397 -0
  398. package/v3/dist/memory/crdt/types.d.ts.map +1 -0
  399. package/v3/dist/memory/crdt/types.js +12 -0
  400. package/v3/dist/memory/crdt/types.js.map +1 -0
  401. package/v3/dist/memory/index.d.ts +5 -2
  402. package/v3/dist/memory/index.d.ts.map +1 -1
  403. package/v3/dist/memory/index.js +5 -2
  404. package/v3/dist/memory/index.js.map +1 -1
  405. package/v3/dist/performance/benchmarks.d.ts +215 -0
  406. package/v3/dist/performance/benchmarks.d.ts.map +1 -0
  407. package/v3/dist/performance/benchmarks.js +516 -0
  408. package/v3/dist/performance/benchmarks.js.map +1 -0
  409. package/v3/dist/performance/ci-gates.d.ts +149 -0
  410. package/v3/dist/performance/ci-gates.d.ts.map +1 -0
  411. package/v3/dist/performance/ci-gates.js +425 -0
  412. package/v3/dist/performance/ci-gates.js.map +1 -0
  413. package/v3/dist/performance/index.d.ts +18 -0
  414. package/v3/dist/performance/index.d.ts.map +1 -0
  415. package/v3/dist/performance/index.js +26 -0
  416. package/v3/dist/performance/index.js.map +1 -0
  417. package/v3/dist/performance/optimizer.d.ts +323 -0
  418. package/v3/dist/performance/optimizer.d.ts.map +1 -0
  419. package/v3/dist/performance/optimizer.js +592 -0
  420. package/v3/dist/performance/optimizer.js.map +1 -0
  421. package/v3/dist/performance/profiler.d.ts +195 -0
  422. package/v3/dist/performance/profiler.d.ts.map +1 -0
  423. package/v3/dist/performance/profiler.js +369 -0
  424. package/v3/dist/performance/profiler.js.map +1 -0
  425. package/v3/dist/performance/run-gates.d.ts +23 -0
  426. package/v3/dist/performance/run-gates.d.ts.map +1 -0
  427. package/v3/dist/performance/run-gates.js +122 -0
  428. package/v3/dist/performance/run-gates.js.map +1 -0
  429. package/v3/dist/sync/claude-flow-bridge.d.ts +1 -1
  430. package/v3/dist/sync/claude-flow-bridge.js +1 -1
  431. package/v3/dist/sync/interfaces.d.ts +6 -0
  432. package/v3/dist/sync/interfaces.d.ts.map +1 -1
  433. package/v3/dist/sync/interfaces.js +34 -47
  434. package/v3/dist/sync/interfaces.js.map +1 -1
  435. package/v3/dist/sync/readers/sqlite-reader.d.ts +1 -1
  436. package/v3/dist/sync/readers/sqlite-reader.js +1 -1
  437. package/v3/dist/testing/index.d.ts +6 -0
  438. package/v3/dist/testing/index.d.ts.map +1 -0
  439. package/v3/dist/testing/index.js +7 -0
  440. package/v3/dist/testing/index.js.map +1 -0
  441. package/v3/dist/testing/load/agent-load-tester.d.ts +221 -0
  442. package/v3/dist/testing/load/agent-load-tester.d.ts.map +1 -0
  443. package/v3/dist/testing/load/agent-load-tester.js +566 -0
  444. package/v3/dist/testing/load/agent-load-tester.js.map +1 -0
  445. package/v3/dist/testing/load/bottleneck-analyzer.d.ts +150 -0
  446. package/v3/dist/testing/load/bottleneck-analyzer.d.ts.map +1 -0
  447. package/v3/dist/testing/load/bottleneck-analyzer.js +442 -0
  448. package/v3/dist/testing/load/bottleneck-analyzer.js.map +1 -0
  449. package/v3/dist/testing/load/index.d.ts +17 -0
  450. package/v3/dist/testing/load/index.d.ts.map +1 -0
  451. package/v3/dist/testing/load/index.js +23 -0
  452. package/v3/dist/testing/load/index.js.map +1 -0
  453. package/v3/dist/testing/load/metrics-collector.d.ts +275 -0
  454. package/v3/dist/testing/load/metrics-collector.d.ts.map +1 -0
  455. package/v3/dist/testing/load/metrics-collector.js +475 -0
  456. package/v3/dist/testing/load/metrics-collector.js.map +1 -0
  457. package/v3/package.json +5 -1
@@ -0,0 +1,1090 @@
1
+ /**
2
+ * A2UI Component JSON Schemas
3
+ *
4
+ * JSON Schema definitions for validating A2UI components.
5
+ * Provides schema validation for both standard and QE-specific components.
6
+ *
7
+ * @module adapters/a2ui/catalog/component-schemas
8
+ */
9
+ // ============================================================================
10
+ // Shared Schema Definitions
11
+ // ============================================================================
12
+ /**
13
+ * BoundValue schema - supports static, dynamic, or combined binding
14
+ */
15
+ export const BOUND_VALUE_SCHEMA = {
16
+ description: 'A value that can be static, dynamic (bound to data model), or combined',
17
+ oneOf: [
18
+ {
19
+ type: 'object',
20
+ description: 'Static literal value',
21
+ properties: {
22
+ literalString: {},
23
+ },
24
+ required: ['literalString'],
25
+ additionalProperties: false,
26
+ },
27
+ {
28
+ type: 'object',
29
+ description: 'Dynamic path binding (JSON Pointer RFC 6901)',
30
+ properties: {
31
+ path: {
32
+ type: 'string',
33
+ pattern: '^/',
34
+ description: 'JSON Pointer path to data model',
35
+ },
36
+ },
37
+ required: ['path'],
38
+ additionalProperties: false,
39
+ },
40
+ {
41
+ type: 'object',
42
+ description: 'Combined value with default and dynamic binding',
43
+ properties: {
44
+ literalString: {},
45
+ path: {
46
+ type: 'string',
47
+ pattern: '^/',
48
+ },
49
+ },
50
+ required: ['literalString', 'path'],
51
+ additionalProperties: false,
52
+ },
53
+ ],
54
+ };
55
+ /**
56
+ * String BoundValue schema
57
+ */
58
+ export const BOUND_STRING_SCHEMA = {
59
+ ...BOUND_VALUE_SCHEMA,
60
+ description: 'A string value that can be static or dynamic',
61
+ };
62
+ /**
63
+ * Number BoundValue schema
64
+ */
65
+ export const BOUND_NUMBER_SCHEMA = {
66
+ ...BOUND_VALUE_SCHEMA,
67
+ description: 'A number value that can be static or dynamic',
68
+ };
69
+ /**
70
+ * Boolean BoundValue schema
71
+ */
72
+ export const BOUND_BOOLEAN_SCHEMA = {
73
+ ...BOUND_VALUE_SCHEMA,
74
+ description: 'A boolean value that can be static or dynamic',
75
+ };
76
+ /**
77
+ * Component children schema
78
+ */
79
+ export const COMPONENT_CHILDREN_SCHEMA = {
80
+ description: 'Component children - static list or dynamic template',
81
+ oneOf: [
82
+ {
83
+ type: 'object',
84
+ description: 'Explicit list of child component IDs',
85
+ properties: {
86
+ explicitList: {
87
+ type: 'array',
88
+ items: { type: 'string' },
89
+ description: 'Array of component IDs',
90
+ },
91
+ },
92
+ required: ['explicitList'],
93
+ additionalProperties: false,
94
+ },
95
+ {
96
+ type: 'object',
97
+ description: 'Template for dynamic children generation',
98
+ properties: {
99
+ template: {
100
+ type: 'object',
101
+ properties: {
102
+ dataBinding: {
103
+ type: 'string',
104
+ pattern: '^/',
105
+ description: 'JSON Pointer path to array data',
106
+ },
107
+ componentId: {
108
+ type: 'string',
109
+ description: 'Component ID to use as template',
110
+ },
111
+ },
112
+ required: ['dataBinding', 'componentId'],
113
+ additionalProperties: false,
114
+ },
115
+ },
116
+ required: ['template'],
117
+ additionalProperties: false,
118
+ },
119
+ ],
120
+ };
121
+ /**
122
+ * Accessibility attributes schema
123
+ */
124
+ export const ACCESSIBILITY_SCHEMA = {
125
+ type: 'object',
126
+ description: 'Accessibility attributes for components',
127
+ properties: {
128
+ role: { type: 'string', description: 'ARIA role' },
129
+ label: { type: 'string', description: 'Accessible label (aria-label)' },
130
+ describedBy: { type: 'string', description: 'ID of element describing this component' },
131
+ live: {
132
+ type: 'string',
133
+ enum: ['off', 'polite', 'assertive'],
134
+ description: 'Live region behavior',
135
+ },
136
+ expanded: { type: 'boolean', description: 'Whether the element is expanded' },
137
+ selected: { type: 'boolean', description: 'Whether the element is selected' },
138
+ disabled: { type: 'boolean', description: 'Whether the element is disabled' },
139
+ tabIndex: { type: 'number', description: 'Tab index for keyboard navigation' },
140
+ },
141
+ additionalProperties: false,
142
+ };
143
+ /**
144
+ * Component action schema
145
+ */
146
+ export const ACTION_SCHEMA = {
147
+ description: 'Action configuration for interactive components',
148
+ oneOf: [
149
+ { type: 'string', description: 'Simple action name' },
150
+ {
151
+ type: 'object',
152
+ properties: {
153
+ name: { type: 'string', description: 'Action name' },
154
+ parameters: {
155
+ type: 'object',
156
+ description: 'Action parameters',
157
+ additionalProperties: BOUND_VALUE_SCHEMA,
158
+ },
159
+ },
160
+ required: ['name'],
161
+ additionalProperties: false,
162
+ },
163
+ ],
164
+ };
165
+ // ============================================================================
166
+ // Standard Component Schemas
167
+ // ============================================================================
168
+ /**
169
+ * Row component schema
170
+ */
171
+ export const ROW_SCHEMA = {
172
+ $id: 'https://a2ui.org/schemas/components/row',
173
+ type: 'object',
174
+ description: 'Horizontal layout container',
175
+ properties: {
176
+ type: { const: 'row' },
177
+ children: COMPONENT_CHILDREN_SCHEMA,
178
+ spacing: { type: 'number', minimum: 0, description: 'Spacing between children in pixels' },
179
+ alignment: {
180
+ type: 'string',
181
+ enum: ['start', 'center', 'end', 'stretch'],
182
+ description: 'Cross-axis alignment',
183
+ },
184
+ justifyContent: {
185
+ type: 'string',
186
+ enum: ['start', 'center', 'end', 'space-between', 'space-around', 'space-evenly'],
187
+ description: 'Main-axis alignment',
188
+ },
189
+ wrap: { type: 'boolean', description: 'Whether to wrap children' },
190
+ accessibility: ACCESSIBILITY_SCHEMA,
191
+ },
192
+ required: ['type', 'children'],
193
+ additionalProperties: false,
194
+ };
195
+ /**
196
+ * Column component schema
197
+ */
198
+ export const COLUMN_SCHEMA = {
199
+ $id: 'https://a2ui.org/schemas/components/column',
200
+ type: 'object',
201
+ description: 'Vertical layout container',
202
+ properties: {
203
+ type: { const: 'column' },
204
+ children: COMPONENT_CHILDREN_SCHEMA,
205
+ spacing: { type: 'number', minimum: 0, description: 'Spacing between children in pixels' },
206
+ alignment: {
207
+ type: 'string',
208
+ enum: ['start', 'center', 'end', 'stretch'],
209
+ description: 'Cross-axis alignment',
210
+ },
211
+ justifyContent: {
212
+ type: 'string',
213
+ enum: ['start', 'center', 'end', 'space-between', 'space-around', 'space-evenly'],
214
+ description: 'Main-axis alignment',
215
+ },
216
+ accessibility: ACCESSIBILITY_SCHEMA,
217
+ },
218
+ required: ['type', 'children'],
219
+ additionalProperties: false,
220
+ };
221
+ /**
222
+ * List component schema
223
+ */
224
+ export const LIST_SCHEMA = {
225
+ $id: 'https://a2ui.org/schemas/components/list',
226
+ type: 'object',
227
+ description: 'Scrollable list container',
228
+ properties: {
229
+ type: { const: 'list' },
230
+ children: COMPONENT_CHILDREN_SCHEMA,
231
+ itemTemplate: { type: 'string', description: 'Template component ID' },
232
+ orientation: {
233
+ type: 'string',
234
+ enum: ['vertical', 'horizontal'],
235
+ default: 'vertical',
236
+ },
237
+ spacing: { type: 'number', minimum: 0 },
238
+ showDividers: { type: 'boolean' },
239
+ accessibility: ACCESSIBILITY_SCHEMA,
240
+ },
241
+ required: ['type', 'children'],
242
+ additionalProperties: false,
243
+ };
244
+ /**
245
+ * Text component schema
246
+ */
247
+ export const TEXT_SCHEMA = {
248
+ $id: 'https://a2ui.org/schemas/components/text',
249
+ type: 'object',
250
+ description: 'Text display component',
251
+ properties: {
252
+ type: { const: 'text' },
253
+ text: BOUND_STRING_SCHEMA,
254
+ style: {
255
+ type: 'string',
256
+ enum: ['body', 'heading', 'caption', 'code', 'label'],
257
+ },
258
+ weight: {
259
+ type: 'string',
260
+ enum: ['normal', 'bold', 'light'],
261
+ },
262
+ color: BOUND_STRING_SCHEMA,
263
+ maxLines: { type: 'number', minimum: 1 },
264
+ selectable: { type: 'boolean' },
265
+ usageHint: {
266
+ type: 'string',
267
+ enum: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'span'],
268
+ },
269
+ accessibility: ACCESSIBILITY_SCHEMA,
270
+ },
271
+ required: ['type', 'text'],
272
+ additionalProperties: false,
273
+ };
274
+ /**
275
+ * Image component schema
276
+ */
277
+ export const IMAGE_SCHEMA = {
278
+ $id: 'https://a2ui.org/schemas/components/image',
279
+ type: 'object',
280
+ description: 'Image display component',
281
+ properties: {
282
+ type: { const: 'image' },
283
+ src: BOUND_STRING_SCHEMA,
284
+ alt: { type: 'string', description: 'Alternative text for accessibility' },
285
+ width: { type: 'number', minimum: 0 },
286
+ height: { type: 'number', minimum: 0 },
287
+ fit: {
288
+ type: 'string',
289
+ enum: ['contain', 'cover', 'fill', 'none', 'scale-down'],
290
+ },
291
+ placeholder: { type: 'string' },
292
+ accessibility: ACCESSIBILITY_SCHEMA,
293
+ },
294
+ required: ['type', 'src', 'alt'],
295
+ additionalProperties: false,
296
+ };
297
+ /**
298
+ * Icon component schema
299
+ */
300
+ export const ICON_SCHEMA = {
301
+ $id: 'https://a2ui.org/schemas/components/icon',
302
+ type: 'object',
303
+ description: 'Icon display component',
304
+ properties: {
305
+ type: { const: 'icon' },
306
+ name: { type: 'string', description: 'Icon name from the icon set' },
307
+ size: { type: 'string', enum: ['small', 'medium', 'large'] },
308
+ color: { type: 'string' },
309
+ ariaLabel: { type: 'string' },
310
+ accessibility: ACCESSIBILITY_SCHEMA,
311
+ },
312
+ required: ['type', 'name'],
313
+ additionalProperties: false,
314
+ };
315
+ /**
316
+ * Divider component schema
317
+ */
318
+ export const DIVIDER_SCHEMA = {
319
+ $id: 'https://a2ui.org/schemas/components/divider',
320
+ type: 'object',
321
+ description: 'Visual separator',
322
+ properties: {
323
+ type: { const: 'divider' },
324
+ orientation: {
325
+ type: 'string',
326
+ enum: ['horizontal', 'vertical'],
327
+ default: 'horizontal',
328
+ },
329
+ thickness: { type: 'number', minimum: 0 },
330
+ color: { type: 'string' },
331
+ margin: { type: 'number', minimum: 0 },
332
+ accessibility: ACCESSIBILITY_SCHEMA,
333
+ },
334
+ required: ['type'],
335
+ additionalProperties: false,
336
+ };
337
+ /**
338
+ * Button component schema
339
+ */
340
+ export const BUTTON_SCHEMA = {
341
+ $id: 'https://a2ui.org/schemas/components/button',
342
+ type: 'object',
343
+ description: 'Clickable button component',
344
+ properties: {
345
+ type: { const: 'button' },
346
+ label: BOUND_STRING_SCHEMA,
347
+ action: ACTION_SCHEMA,
348
+ variant: {
349
+ type: 'string',
350
+ enum: ['primary', 'secondary', 'danger', 'outlined', 'text'],
351
+ },
352
+ disabled: BOUND_BOOLEAN_SCHEMA,
353
+ loading: BOUND_BOOLEAN_SCHEMA,
354
+ icon: { type: 'string' },
355
+ iconPosition: { type: 'string', enum: ['start', 'end'] },
356
+ accessibility: ACCESSIBILITY_SCHEMA,
357
+ },
358
+ required: ['type', 'label', 'action'],
359
+ additionalProperties: false,
360
+ };
361
+ /**
362
+ * TextField component schema
363
+ */
364
+ export const TEXT_FIELD_SCHEMA = {
365
+ $id: 'https://a2ui.org/schemas/components/textField',
366
+ type: 'object',
367
+ description: 'Text input field',
368
+ properties: {
369
+ type: { const: 'textField' },
370
+ value: BOUND_STRING_SCHEMA,
371
+ label: { type: 'string' },
372
+ placeholder: { type: 'string' },
373
+ onChange: { type: 'string' },
374
+ inputType: {
375
+ type: 'string',
376
+ enum: ['text', 'email', 'password', 'number', 'tel', 'url', 'search'],
377
+ },
378
+ required: { type: 'boolean' },
379
+ multiline: { type: 'boolean' },
380
+ rows: { type: 'number', minimum: 1 },
381
+ maxLength: { type: 'number', minimum: 0 },
382
+ disabled: BOUND_BOOLEAN_SCHEMA,
383
+ pattern: { type: 'string' },
384
+ validationMessage: { type: 'string' },
385
+ helperText: { type: 'string' },
386
+ accessibility: ACCESSIBILITY_SCHEMA,
387
+ },
388
+ required: ['type', 'value'],
389
+ additionalProperties: false,
390
+ };
391
+ /**
392
+ * CheckBox component schema
393
+ */
394
+ export const CHECKBOX_SCHEMA = {
395
+ $id: 'https://a2ui.org/schemas/components/checkBox',
396
+ type: 'object',
397
+ description: 'Boolean toggle checkbox',
398
+ properties: {
399
+ type: { const: 'checkBox' },
400
+ checked: BOUND_BOOLEAN_SCHEMA,
401
+ label: { type: 'string' },
402
+ onChange: { type: 'string' },
403
+ disabled: BOUND_BOOLEAN_SCHEMA,
404
+ indeterminate: BOUND_BOOLEAN_SCHEMA,
405
+ accessibility: ACCESSIBILITY_SCHEMA,
406
+ },
407
+ required: ['type', 'checked'],
408
+ additionalProperties: false,
409
+ };
410
+ /**
411
+ * DateTimeInput component schema
412
+ */
413
+ export const DATE_TIME_INPUT_SCHEMA = {
414
+ $id: 'https://a2ui.org/schemas/components/dateTimeInput',
415
+ type: 'object',
416
+ description: 'Date/time picker input',
417
+ properties: {
418
+ type: { const: 'dateTimeInput' },
419
+ value: BOUND_STRING_SCHEMA,
420
+ mode: { type: 'string', enum: ['date', 'time', 'datetime'] },
421
+ enableDate: { type: 'boolean' },
422
+ enableTime: { type: 'boolean' },
423
+ minDate: { type: 'string', format: 'date-time' },
424
+ maxDate: { type: 'string', format: 'date-time' },
425
+ label: { type: 'string' },
426
+ onChange: { type: 'string' },
427
+ disabled: BOUND_BOOLEAN_SCHEMA,
428
+ accessibility: ACCESSIBILITY_SCHEMA,
429
+ },
430
+ required: ['type', 'value'],
431
+ additionalProperties: false,
432
+ };
433
+ /**
434
+ * Slider component schema
435
+ */
436
+ export const SLIDER_SCHEMA = {
437
+ $id: 'https://a2ui.org/schemas/components/slider',
438
+ type: 'object',
439
+ description: 'Range slider input',
440
+ properties: {
441
+ type: { const: 'slider' },
442
+ value: BOUND_NUMBER_SCHEMA,
443
+ min: { type: 'number' },
444
+ max: { type: 'number' },
445
+ step: { type: 'number', minimum: 0 },
446
+ label: { type: 'string' },
447
+ onChange: { type: 'string' },
448
+ disabled: BOUND_BOOLEAN_SCHEMA,
449
+ showTicks: { type: 'boolean' },
450
+ showValue: { type: 'boolean' },
451
+ accessibility: ACCESSIBILITY_SCHEMA,
452
+ },
453
+ required: ['type', 'value', 'min', 'max'],
454
+ additionalProperties: false,
455
+ };
456
+ /**
457
+ * Card component schema
458
+ */
459
+ export const CARD_SCHEMA = {
460
+ $id: 'https://a2ui.org/schemas/components/card',
461
+ type: 'object',
462
+ description: 'Elevated container card',
463
+ properties: {
464
+ type: { const: 'card' },
465
+ children: COMPONENT_CHILDREN_SCHEMA,
466
+ title: BOUND_STRING_SCHEMA,
467
+ subtitle: BOUND_STRING_SCHEMA,
468
+ elevation: { type: 'number', minimum: 0, maximum: 5 },
469
+ clickable: { type: 'boolean' },
470
+ onClick: { type: 'string' },
471
+ headerImage: BOUND_STRING_SCHEMA,
472
+ accessibility: ACCESSIBILITY_SCHEMA,
473
+ },
474
+ required: ['type', 'children'],
475
+ additionalProperties: false,
476
+ };
477
+ /**
478
+ * Tab configuration schema
479
+ */
480
+ export const TAB_CONFIG_SCHEMA = {
481
+ type: 'object',
482
+ properties: {
483
+ label: { type: 'string' },
484
+ content: { type: 'string' },
485
+ icon: { type: 'string' },
486
+ disabled: { type: 'boolean' },
487
+ },
488
+ required: ['label', 'content'],
489
+ additionalProperties: false,
490
+ };
491
+ /**
492
+ * Tabs component schema
493
+ */
494
+ export const TABS_SCHEMA = {
495
+ $id: 'https://a2ui.org/schemas/components/tabs',
496
+ type: 'object',
497
+ description: 'Tabbed container',
498
+ properties: {
499
+ type: { const: 'tabs' },
500
+ tabs: {
501
+ type: 'array',
502
+ items: TAB_CONFIG_SCHEMA,
503
+ minItems: 1,
504
+ },
505
+ selectedIndex: BOUND_NUMBER_SCHEMA,
506
+ orientation: {
507
+ type: 'string',
508
+ enum: ['horizontal', 'vertical'],
509
+ },
510
+ onTabChange: { type: 'string' },
511
+ accessibility: ACCESSIBILITY_SCHEMA,
512
+ },
513
+ required: ['type', 'tabs'],
514
+ additionalProperties: false,
515
+ };
516
+ /**
517
+ * Modal component schema
518
+ */
519
+ export const MODAL_SCHEMA = {
520
+ $id: 'https://a2ui.org/schemas/components/modal',
521
+ type: 'object',
522
+ description: 'Overlay dialog',
523
+ properties: {
524
+ type: { const: 'modal' },
525
+ children: COMPONENT_CHILDREN_SCHEMA,
526
+ title: { type: 'string' },
527
+ open: BOUND_BOOLEAN_SCHEMA,
528
+ onClose: { type: 'string' },
529
+ dismissible: { type: 'boolean' },
530
+ size: {
531
+ type: 'string',
532
+ enum: ['small', 'medium', 'large', 'fullscreen'],
533
+ },
534
+ accessibility: ACCESSIBILITY_SCHEMA,
535
+ },
536
+ required: ['type', 'children', 'open'],
537
+ additionalProperties: false,
538
+ };
539
+ // ============================================================================
540
+ // QE Component Schemas
541
+ // ============================================================================
542
+ /**
543
+ * CoverageGauge component schema
544
+ */
545
+ export const COVERAGE_GAUGE_SCHEMA = {
546
+ $id: 'https://aqe.io/schemas/components/coverageGauge',
547
+ type: 'object',
548
+ description: 'Circular gauge showing coverage percentage',
549
+ properties: {
550
+ type: { const: 'qe:coverageGauge' },
551
+ coverage: BOUND_NUMBER_SCHEMA,
552
+ target: { type: 'number', minimum: 0, maximum: 100 },
553
+ showLabel: { type: 'boolean' },
554
+ size: { type: 'string', enum: ['small', 'medium', 'large'] },
555
+ colorScheme: { type: 'string', enum: ['default', 'traffic-light', 'monochrome'] },
556
+ label: BOUND_STRING_SCHEMA,
557
+ coverageType: {
558
+ type: 'string',
559
+ enum: ['line', 'branch', 'function', 'statement', 'overall'],
560
+ },
561
+ animated: { type: 'boolean' },
562
+ showTrend: { type: 'boolean' },
563
+ previousCoverage: BOUND_NUMBER_SCHEMA,
564
+ accessibility: ACCESSIBILITY_SCHEMA,
565
+ },
566
+ required: ['type', 'coverage'],
567
+ additionalProperties: false,
568
+ };
569
+ /**
570
+ * TestStatusBadge component schema
571
+ */
572
+ export const TEST_STATUS_BADGE_SCHEMA = {
573
+ $id: 'https://aqe.io/schemas/components/testStatusBadge',
574
+ type: 'object',
575
+ description: 'Badge showing test execution status',
576
+ properties: {
577
+ type: { const: 'qe:testStatusBadge' },
578
+ status: {
579
+ oneOf: [
580
+ { type: 'string', enum: ['passed', 'failed', 'skipped', 'running', 'pending'] },
581
+ BOUND_VALUE_SCHEMA,
582
+ ],
583
+ },
584
+ count: BOUND_NUMBER_SCHEMA,
585
+ duration: BOUND_NUMBER_SCHEMA,
586
+ size: { type: 'string', enum: ['small', 'medium', 'large'] },
587
+ showCount: { type: 'boolean' },
588
+ showDuration: { type: 'boolean' },
589
+ showIcon: { type: 'boolean' },
590
+ onClick: { type: 'string' },
591
+ accessibility: ACCESSIBILITY_SCHEMA,
592
+ },
593
+ required: ['type', 'status'],
594
+ additionalProperties: false,
595
+ };
596
+ /**
597
+ * VulnerabilityCard component schema
598
+ */
599
+ export const VULNERABILITY_CARD_SCHEMA = {
600
+ $id: 'https://aqe.io/schemas/components/vulnerabilityCard',
601
+ type: 'object',
602
+ description: 'Card displaying security vulnerability details',
603
+ properties: {
604
+ type: { const: 'qe:vulnerabilityCard' },
605
+ severity: {
606
+ oneOf: [
607
+ { type: 'string', enum: ['critical', 'high', 'medium', 'low', 'info'] },
608
+ BOUND_VALUE_SCHEMA,
609
+ ],
610
+ },
611
+ title: BOUND_STRING_SCHEMA,
612
+ cveId: BOUND_STRING_SCHEMA,
613
+ description: BOUND_STRING_SCHEMA,
614
+ details: BOUND_VALUE_SCHEMA,
615
+ remediation: BOUND_STRING_SCHEMA,
616
+ expandable: { type: 'boolean' },
617
+ expanded: BOUND_BOOLEAN_SCHEMA,
618
+ actionLabel: { type: 'string' },
619
+ onAction: { type: 'string' },
620
+ onDismiss: { type: 'string' },
621
+ accessibility: ACCESSIBILITY_SCHEMA,
622
+ },
623
+ required: ['type', 'severity', 'title'],
624
+ additionalProperties: false,
625
+ };
626
+ /**
627
+ * QualityGateIndicator component schema
628
+ */
629
+ export const QUALITY_GATE_INDICATOR_SCHEMA = {
630
+ $id: 'https://aqe.io/schemas/components/qualityGateIndicator',
631
+ type: 'object',
632
+ description: 'Traffic light indicator for quality gates',
633
+ properties: {
634
+ type: { const: 'qe:qualityGateIndicator' },
635
+ status: {
636
+ oneOf: [
637
+ { type: 'string', enum: ['passed', 'failed', 'warning', 'unknown'] },
638
+ BOUND_VALUE_SCHEMA,
639
+ ],
640
+ },
641
+ metrics: BOUND_VALUE_SCHEMA,
642
+ name: BOUND_STRING_SCHEMA,
643
+ showMetrics: { type: 'boolean' },
644
+ showValues: { type: 'boolean' },
645
+ style: { type: 'string', enum: ['traffic-light', 'badge', 'detailed'] },
646
+ onClick: { type: 'string' },
647
+ lastEvaluated: BOUND_STRING_SCHEMA,
648
+ accessibility: ACCESSIBILITY_SCHEMA,
649
+ },
650
+ required: ['type', 'status', 'metrics'],
651
+ additionalProperties: false,
652
+ };
653
+ /**
654
+ * A11yFindingCard component schema
655
+ */
656
+ export const A11Y_FINDING_CARD_SCHEMA = {
657
+ $id: 'https://aqe.io/schemas/components/a11yFindingCard',
658
+ type: 'object',
659
+ description: 'Card for accessibility violations',
660
+ properties: {
661
+ type: { const: 'qe:a11yFindingCard' },
662
+ wcagLevel: {
663
+ oneOf: [{ type: 'string', enum: ['A', 'AA', 'AAA'] }, BOUND_VALUE_SCHEMA],
664
+ },
665
+ rule: BOUND_STRING_SCHEMA,
666
+ element: BOUND_STRING_SCHEMA,
667
+ impact: {
668
+ oneOf: [
669
+ { type: 'string', enum: ['critical', 'serious', 'moderate', 'minor'] },
670
+ BOUND_VALUE_SCHEMA,
671
+ ],
672
+ },
673
+ description: BOUND_STRING_SCHEMA,
674
+ details: BOUND_VALUE_SCHEMA,
675
+ expandable: { type: 'boolean' },
676
+ expanded: BOUND_BOOLEAN_SCHEMA,
677
+ suggestion: BOUND_STRING_SCHEMA,
678
+ helpUrl: BOUND_STRING_SCHEMA,
679
+ onAction: { type: 'string' },
680
+ accessibility: ACCESSIBILITY_SCHEMA,
681
+ },
682
+ required: ['type', 'wcagLevel', 'rule', 'impact'],
683
+ additionalProperties: false,
684
+ };
685
+ /**
686
+ * TestTimeline component schema
687
+ */
688
+ export const TEST_TIMELINE_SCHEMA = {
689
+ $id: 'https://aqe.io/schemas/components/testTimeline',
690
+ type: 'object',
691
+ description: 'Timeline visualization of test execution',
692
+ properties: {
693
+ type: { const: 'qe:testTimeline' },
694
+ events: BOUND_VALUE_SCHEMA,
695
+ duration: BOUND_NUMBER_SCHEMA,
696
+ startTime: BOUND_STRING_SCHEMA,
697
+ endTime: BOUND_STRING_SCHEMA,
698
+ showLabels: { type: 'boolean' },
699
+ showDuration: { type: 'boolean' },
700
+ orientation: { type: 'string', enum: ['horizontal', 'vertical'] },
701
+ onEventClick: { type: 'string' },
702
+ zoom: BOUND_NUMBER_SCHEMA,
703
+ filterStatus: {
704
+ type: 'array',
705
+ items: {
706
+ type: 'string',
707
+ enum: ['passed', 'failed', 'skipped', 'running', 'pending'],
708
+ },
709
+ },
710
+ groupBySuite: { type: 'boolean' },
711
+ accessibility: ACCESSIBILITY_SCHEMA,
712
+ },
713
+ required: ['type', 'events'],
714
+ additionalProperties: false,
715
+ };
716
+ /**
717
+ * DefectDensityChart component schema
718
+ */
719
+ export const DEFECT_DENSITY_CHART_SCHEMA = {
720
+ $id: 'https://aqe.io/schemas/components/defectDensityChart',
721
+ type: 'object',
722
+ description: 'Visualization of defect density metrics',
723
+ properties: {
724
+ type: { const: 'qe:defectDensityChart' },
725
+ data: BOUND_VALUE_SCHEMA,
726
+ chartType: { type: 'string', enum: ['bar', 'heatmap', 'treemap'] },
727
+ title: BOUND_STRING_SCHEMA,
728
+ colorScheme: { type: 'string', enum: ['default', 'severity', 'monochrome'] },
729
+ showValues: { type: 'boolean' },
730
+ onModuleClick: { type: 'string' },
731
+ accessibility: ACCESSIBILITY_SCHEMA,
732
+ },
733
+ required: ['type', 'data'],
734
+ additionalProperties: false,
735
+ };
736
+ /**
737
+ * FlakySummary component schema
738
+ */
739
+ export const FLAKY_SUMMARY_SCHEMA = {
740
+ $id: 'https://aqe.io/schemas/components/flakySummary',
741
+ type: 'object',
742
+ description: 'Summary of flaky test analysis',
743
+ properties: {
744
+ type: { const: 'qe:flakySummary' },
745
+ flakyCount: BOUND_NUMBER_SCHEMA,
746
+ totalTests: BOUND_NUMBER_SCHEMA,
747
+ topFlaky: BOUND_VALUE_SCHEMA,
748
+ showTopFlaky: { type: 'boolean' },
749
+ topCount: { type: 'number', minimum: 1 },
750
+ onTestClick: { type: 'string' },
751
+ accessibility: ACCESSIBILITY_SCHEMA,
752
+ },
753
+ required: ['type', 'flakyCount', 'totalTests'],
754
+ additionalProperties: false,
755
+ };
756
+ // ============================================================================
757
+ // Schema Registry
758
+ // ============================================================================
759
+ /**
760
+ * All standard component schemas
761
+ */
762
+ export const STANDARD_COMPONENT_SCHEMAS = {
763
+ row: ROW_SCHEMA,
764
+ column: COLUMN_SCHEMA,
765
+ list: LIST_SCHEMA,
766
+ text: TEXT_SCHEMA,
767
+ image: IMAGE_SCHEMA,
768
+ icon: ICON_SCHEMA,
769
+ divider: DIVIDER_SCHEMA,
770
+ button: BUTTON_SCHEMA,
771
+ textField: TEXT_FIELD_SCHEMA,
772
+ checkBox: CHECKBOX_SCHEMA,
773
+ dateTimeInput: DATE_TIME_INPUT_SCHEMA,
774
+ slider: SLIDER_SCHEMA,
775
+ card: CARD_SCHEMA,
776
+ tabs: TABS_SCHEMA,
777
+ modal: MODAL_SCHEMA,
778
+ };
779
+ /**
780
+ * All QE component schemas
781
+ */
782
+ export const QE_COMPONENT_SCHEMAS = {
783
+ 'qe:coverageGauge': COVERAGE_GAUGE_SCHEMA,
784
+ 'qe:testStatusBadge': TEST_STATUS_BADGE_SCHEMA,
785
+ 'qe:vulnerabilityCard': VULNERABILITY_CARD_SCHEMA,
786
+ 'qe:qualityGateIndicator': QUALITY_GATE_INDICATOR_SCHEMA,
787
+ 'qe:a11yFindingCard': A11Y_FINDING_CARD_SCHEMA,
788
+ 'qe:testTimeline': TEST_TIMELINE_SCHEMA,
789
+ 'qe:defectDensityChart': DEFECT_DENSITY_CHART_SCHEMA,
790
+ 'qe:flakySummary': FLAKY_SUMMARY_SCHEMA,
791
+ };
792
+ /**
793
+ * Combined catalog of all component schemas
794
+ */
795
+ export const ALL_COMPONENT_SCHEMAS = {
796
+ ...STANDARD_COMPONENT_SCHEMAS,
797
+ ...QE_COMPONENT_SCHEMAS,
798
+ };
799
+ /**
800
+ * Check if a value matches a JSON schema type
801
+ */
802
+ function matchesType(value, type) {
803
+ const actualType = typeof value;
804
+ const types = Array.isArray(type) ? type : [type];
805
+ return types.some((t) => {
806
+ if (t === 'array')
807
+ return Array.isArray(value);
808
+ if (t === 'null')
809
+ return value === null;
810
+ if (t === 'integer')
811
+ return Number.isInteger(value);
812
+ return actualType === t;
813
+ });
814
+ }
815
+ /**
816
+ * Validate a BoundValue
817
+ */
818
+ function validateBoundValue(value, path) {
819
+ const errors = [];
820
+ if (typeof value !== 'object' || value === null) {
821
+ errors.push({
822
+ path,
823
+ message: 'BoundValue must be an object',
824
+ code: 'INVALID_BOUND_VALUE',
825
+ expected: 'object',
826
+ actual: typeof value,
827
+ });
828
+ return errors;
829
+ }
830
+ const obj = value;
831
+ const hasLiteralString = 'literalString' in obj;
832
+ const hasPath = 'path' in obj;
833
+ if (!hasLiteralString && !hasPath) {
834
+ errors.push({
835
+ path,
836
+ message: 'BoundValue must have either literalString or path property',
837
+ code: 'MISSING_BOUND_VALUE_PROPERTY',
838
+ });
839
+ }
840
+ if (hasPath && typeof obj.path !== 'string') {
841
+ errors.push({
842
+ path: `${path}.path`,
843
+ message: 'path must be a string',
844
+ code: 'INVALID_PATH_TYPE',
845
+ expected: 'string',
846
+ actual: typeof obj.path,
847
+ });
848
+ }
849
+ if (hasPath && typeof obj.path === 'string' && !obj.path.startsWith('/')) {
850
+ errors.push({
851
+ path: `${path}.path`,
852
+ message: 'path must be a valid JSON Pointer starting with /',
853
+ code: 'INVALID_JSON_POINTER',
854
+ actual: obj.path,
855
+ });
856
+ }
857
+ return errors;
858
+ }
859
+ /**
860
+ * Validate component children
861
+ */
862
+ function validateChildren(children, path) {
863
+ const errors = [];
864
+ if (typeof children !== 'object' || children === null) {
865
+ errors.push({
866
+ path,
867
+ message: 'children must be an object',
868
+ code: 'INVALID_CHILDREN',
869
+ expected: 'object',
870
+ actual: typeof children,
871
+ });
872
+ return errors;
873
+ }
874
+ const obj = children;
875
+ if ('explicitList' in obj) {
876
+ if (!Array.isArray(obj.explicitList)) {
877
+ errors.push({
878
+ path: `${path}.explicitList`,
879
+ message: 'explicitList must be an array',
880
+ code: 'INVALID_EXPLICIT_LIST',
881
+ expected: 'array',
882
+ actual: typeof obj.explicitList,
883
+ });
884
+ }
885
+ else if (!obj.explicitList.every((id) => typeof id === 'string')) {
886
+ errors.push({
887
+ path: `${path}.explicitList`,
888
+ message: 'explicitList items must be strings',
889
+ code: 'INVALID_EXPLICIT_LIST_ITEM',
890
+ });
891
+ }
892
+ }
893
+ else if ('template' in obj) {
894
+ const template = obj.template;
895
+ if (typeof template !== 'object' || template === null) {
896
+ errors.push({
897
+ path: `${path}.template`,
898
+ message: 'template must be an object',
899
+ code: 'INVALID_TEMPLATE',
900
+ });
901
+ }
902
+ else {
903
+ if (typeof template.dataBinding !== 'string') {
904
+ errors.push({
905
+ path: `${path}.template.dataBinding`,
906
+ message: 'dataBinding must be a string',
907
+ code: 'INVALID_DATA_BINDING',
908
+ });
909
+ }
910
+ if (typeof template.componentId !== 'string') {
911
+ errors.push({
912
+ path: `${path}.template.componentId`,
913
+ message: 'componentId must be a string',
914
+ code: 'INVALID_COMPONENT_ID',
915
+ });
916
+ }
917
+ }
918
+ }
919
+ else {
920
+ errors.push({
921
+ path,
922
+ message: 'children must have either explicitList or template property',
923
+ code: 'MISSING_CHILDREN_PROPERTY',
924
+ });
925
+ }
926
+ return errors;
927
+ }
928
+ /**
929
+ * Validate a component against its schema
930
+ */
931
+ export function validateComponent(component, componentType) {
932
+ const errors = [];
933
+ // Check if component is an object
934
+ if (typeof component !== 'object' || component === null) {
935
+ return {
936
+ valid: false,
937
+ errors: [
938
+ {
939
+ path: '',
940
+ message: 'Component must be an object',
941
+ code: 'INVALID_COMPONENT',
942
+ expected: 'object',
943
+ actual: typeof component,
944
+ },
945
+ ],
946
+ componentType,
947
+ };
948
+ }
949
+ const comp = component;
950
+ const schema = ALL_COMPONENT_SCHEMAS[componentType];
951
+ if (!schema) {
952
+ return {
953
+ valid: false,
954
+ errors: [
955
+ {
956
+ path: 'type',
957
+ message: `Unknown component type: ${componentType}`,
958
+ code: 'UNKNOWN_COMPONENT_TYPE',
959
+ actual: componentType,
960
+ },
961
+ ],
962
+ componentType,
963
+ };
964
+ }
965
+ // Check required properties
966
+ if (schema.required) {
967
+ for (const prop of schema.required) {
968
+ if (!(prop in comp)) {
969
+ errors.push({
970
+ path: prop,
971
+ message: `Missing required property: ${prop}`,
972
+ code: 'MISSING_REQUIRED_PROPERTY',
973
+ expected: prop,
974
+ });
975
+ }
976
+ }
977
+ }
978
+ // Validate properties
979
+ if (schema.properties) {
980
+ for (const [propName, propValue] of Object.entries(comp)) {
981
+ const propSchema = schema.properties[propName];
982
+ if (!propSchema && schema.additionalProperties === false) {
983
+ errors.push({
984
+ path: propName,
985
+ message: `Unknown property: ${propName}`,
986
+ code: 'UNKNOWN_PROPERTY',
987
+ actual: propName,
988
+ });
989
+ continue;
990
+ }
991
+ if (propSchema) {
992
+ // Validate type
993
+ if (propSchema.type && !matchesType(propValue, propSchema.type)) {
994
+ errors.push({
995
+ path: propName,
996
+ message: `Invalid type for ${propName}`,
997
+ code: 'INVALID_TYPE',
998
+ expected: Array.isArray(propSchema.type) ? propSchema.type.join(' | ') : propSchema.type,
999
+ actual: typeof propValue,
1000
+ });
1001
+ }
1002
+ // Validate enum
1003
+ if (propSchema.enum && !propSchema.enum.includes(propValue)) {
1004
+ errors.push({
1005
+ path: propName,
1006
+ message: `Invalid value for ${propName}`,
1007
+ code: 'INVALID_ENUM_VALUE',
1008
+ expected: propSchema.enum.join(' | '),
1009
+ actual: String(propValue),
1010
+ });
1011
+ }
1012
+ // Validate const
1013
+ if (propSchema.const !== undefined && propValue !== propSchema.const) {
1014
+ errors.push({
1015
+ path: propName,
1016
+ message: `Value must be ${propSchema.const}`,
1017
+ code: 'INVALID_CONST_VALUE',
1018
+ expected: String(propSchema.const),
1019
+ actual: String(propValue),
1020
+ });
1021
+ }
1022
+ // Validate number constraints
1023
+ if (typeof propValue === 'number') {
1024
+ if (propSchema.minimum !== undefined && propValue < propSchema.minimum) {
1025
+ errors.push({
1026
+ path: propName,
1027
+ message: `Value must be >= ${propSchema.minimum}`,
1028
+ code: 'VALUE_TOO_SMALL',
1029
+ expected: `>= ${propSchema.minimum}`,
1030
+ actual: String(propValue),
1031
+ });
1032
+ }
1033
+ if (propSchema.maximum !== undefined && propValue > propSchema.maximum) {
1034
+ errors.push({
1035
+ path: propName,
1036
+ message: `Value must be <= ${propSchema.maximum}`,
1037
+ code: 'VALUE_TOO_LARGE',
1038
+ expected: `<= ${propSchema.maximum}`,
1039
+ actual: String(propValue),
1040
+ });
1041
+ }
1042
+ }
1043
+ // Validate BoundValue properties
1044
+ if (propSchema.oneOf && propSchema.oneOf.some((s) => s.properties?.literalString || s.properties?.path)) {
1045
+ errors.push(...validateBoundValue(propValue, propName));
1046
+ }
1047
+ // Validate children
1048
+ if (propName === 'children') {
1049
+ errors.push(...validateChildren(propValue, propName));
1050
+ }
1051
+ }
1052
+ }
1053
+ }
1054
+ return {
1055
+ valid: errors.length === 0,
1056
+ errors,
1057
+ componentType,
1058
+ };
1059
+ }
1060
+ /**
1061
+ * Get schema for a component type
1062
+ */
1063
+ export function getComponentSchema(type) {
1064
+ return ALL_COMPONENT_SCHEMAS[type];
1065
+ }
1066
+ /**
1067
+ * Check if a component type has a schema
1068
+ */
1069
+ export function hasComponentSchema(type) {
1070
+ return type in ALL_COMPONENT_SCHEMAS;
1071
+ }
1072
+ /**
1073
+ * Get all registered component types
1074
+ */
1075
+ export function getAllComponentTypes() {
1076
+ return Object.keys(ALL_COMPONENT_SCHEMAS);
1077
+ }
1078
+ /**
1079
+ * Get standard component types
1080
+ */
1081
+ export function getStandardComponentTypes() {
1082
+ return Object.keys(STANDARD_COMPONENT_SCHEMAS);
1083
+ }
1084
+ /**
1085
+ * Get QE component types
1086
+ */
1087
+ export function getQEComponentTypes() {
1088
+ return Object.keys(QE_COMPONENT_SCHEMAS);
1089
+ }
1090
+ //# sourceMappingURL=component-schemas.js.map