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,403 @@
1
+ /**
2
+ * BoundValue Resolution and Utilities
3
+ *
4
+ * Provides resolution of BoundValue types (LiteralValue, PathValue, CombinedValue)
5
+ * against data contexts, with dependency tracking and type inference.
6
+ *
7
+ * @module adapters/a2ui/data/bound-value
8
+ */
9
+ import { resolvePointer, isParentPointer, } from './json-pointer-resolver.js';
10
+ // ============================================================================
11
+ // Type Guards
12
+ // ============================================================================
13
+ /**
14
+ * Check if a value is a LiteralValue
15
+ */
16
+ export function isLiteralValue(value) {
17
+ return (typeof value === 'object' &&
18
+ value !== null &&
19
+ 'literalString' in value &&
20
+ !('path' in value));
21
+ }
22
+ /**
23
+ * Check if a value is a PathValue
24
+ */
25
+ export function isPathValue(value) {
26
+ return (typeof value === 'object' &&
27
+ value !== null &&
28
+ 'path' in value &&
29
+ typeof value.path === 'string' &&
30
+ !('literalString' in value));
31
+ }
32
+ /**
33
+ * Check if a value is a CombinedValue
34
+ */
35
+ export function isCombinedValue(value) {
36
+ return (typeof value === 'object' &&
37
+ value !== null &&
38
+ 'literalString' in value &&
39
+ 'path' in value &&
40
+ typeof value.path === 'string');
41
+ }
42
+ /**
43
+ * Check if a value is any BoundValue type
44
+ */
45
+ export function isBoundValue(value) {
46
+ return isLiteralValue(value) || isPathValue(value) || isCombinedValue(value);
47
+ }
48
+ /**
49
+ * Check if children is an ExplicitListChildren
50
+ */
51
+ export function isExplicitListChildren(children) {
52
+ return (typeof children === 'object' &&
53
+ children !== null &&
54
+ 'explicitList' in children &&
55
+ Array.isArray(children.explicitList));
56
+ }
57
+ /**
58
+ * Check if children is a TemplateChildren
59
+ */
60
+ export function isTemplateChildren(children) {
61
+ return (typeof children === 'object' &&
62
+ children !== null &&
63
+ 'template' in children &&
64
+ typeof children.template === 'object' &&
65
+ 'dataBinding' in children.template &&
66
+ 'componentId' in children.template);
67
+ }
68
+ // ============================================================================
69
+ // Factory Functions
70
+ // ============================================================================
71
+ /**
72
+ * Create a static LiteralValue
73
+ */
74
+ export function createLiteralValue(value) {
75
+ return { literalString: value };
76
+ }
77
+ /**
78
+ * Create a dynamic PathValue
79
+ */
80
+ export function createPathValue(path) {
81
+ if (!path.startsWith('/') && path !== '') {
82
+ throw new Error(`Path must start with '/' or be empty, got: "${path}"`);
83
+ }
84
+ return { path };
85
+ }
86
+ /**
87
+ * Create a CombinedValue with default and binding
88
+ */
89
+ export function createCombinedValue(defaultValue, path) {
90
+ if (!path.startsWith('/') && path !== '') {
91
+ throw new Error(`Path must start with '/' or be empty, got: "${path}"`);
92
+ }
93
+ return { literalString: defaultValue, path };
94
+ }
95
+ /**
96
+ * Create ExplicitListChildren
97
+ */
98
+ export function createExplicitListChildren(componentIds) {
99
+ return { explicitList: [...componentIds] };
100
+ }
101
+ /**
102
+ * Create TemplateChildren
103
+ */
104
+ export function createTemplateChildren(dataBinding, componentId, keyPath) {
105
+ const config = {
106
+ dataBinding,
107
+ componentId,
108
+ };
109
+ if (keyPath !== undefined) {
110
+ return {
111
+ template: { ...config, keyPath },
112
+ };
113
+ }
114
+ return { template: config };
115
+ }
116
+ // ============================================================================
117
+ // BoundValue Resolver Implementation
118
+ // ============================================================================
119
+ /**
120
+ * BoundValue Resolver
121
+ *
122
+ * Resolves BoundValue types against data contexts with support for:
123
+ * - LiteralValue: Returns static value directly
124
+ * - PathValue: Resolves JSON Pointer path against data
125
+ * - CombinedValue: Tries path first, falls back to literal
126
+ */
127
+ export class BoundValueResolver {
128
+ config;
129
+ constructor(config = {}) {
130
+ this.config = {
131
+ strictMode: false,
132
+ ...config,
133
+ };
134
+ }
135
+ /**
136
+ * Resolve a BoundValue against a data context
137
+ *
138
+ * Resolution rules:
139
+ * 1. LiteralValue: return literalString directly
140
+ * 2. PathValue: resolve path against data
141
+ * 3. CombinedValue: try path first, fall back to literalString
142
+ *
143
+ * @param boundValue - The BoundValue to resolve
144
+ * @param data - The data context to resolve against
145
+ * @returns The resolved value, or undefined if not found
146
+ */
147
+ resolve(boundValue, data) {
148
+ // CombinedValue - try path first, fall back to literalString
149
+ // Check this first since it has both properties
150
+ if (isCombinedValue(boundValue)) {
151
+ const pathResult = resolvePointer(data, boundValue.path);
152
+ if (pathResult !== undefined) {
153
+ return pathResult;
154
+ }
155
+ return boundValue.literalString;
156
+ }
157
+ // LiteralValue - return static value
158
+ if (isLiteralValue(boundValue)) {
159
+ return boundValue.literalString;
160
+ }
161
+ // PathValue - resolve path against data
162
+ if (isPathValue(boundValue)) {
163
+ const result = resolvePointer(data, boundValue.path);
164
+ if (result === undefined && this.config.strictMode) {
165
+ throw new Error(`Path not found: ${boundValue.path}`);
166
+ }
167
+ return result ?? this.config.defaultValue;
168
+ }
169
+ // Unknown format - return undefined
170
+ return undefined;
171
+ }
172
+ /**
173
+ * Check if a BoundValue depends on a specific path
174
+ *
175
+ * A BoundValue depends on a path if:
176
+ * - It's a PathValue and its path equals or is a child of the given path
177
+ * - It's a CombinedValue and its path equals or is a child of the given path
178
+ *
179
+ * @param boundValue - The BoundValue to check
180
+ * @param path - The path to check dependency against
181
+ * @returns True if the BoundValue depends on the path
182
+ */
183
+ dependsOn(boundValue, path) {
184
+ // LiteralValue has no dependencies
185
+ if (isLiteralValue(boundValue)) {
186
+ return false;
187
+ }
188
+ const boundPath = isPathValue(boundValue)
189
+ ? boundValue.path
190
+ : boundValue.path;
191
+ // Exact match
192
+ if (boundPath === path) {
193
+ return true;
194
+ }
195
+ // Check if path is a parent of boundPath
196
+ if (isParentPointer(path, boundPath)) {
197
+ return true;
198
+ }
199
+ // Check if boundPath is a parent of path (value at boundPath would change)
200
+ if (isParentPointer(boundPath, path)) {
201
+ return true;
202
+ }
203
+ return false;
204
+ }
205
+ /**
206
+ * Get all paths a BoundValue depends on
207
+ *
208
+ * @param boundValue - The BoundValue to analyze
209
+ * @returns Array of paths the BoundValue depends on
210
+ */
211
+ getDependencies(boundValue) {
212
+ // CombinedValue has both, check first
213
+ if (isCombinedValue(boundValue)) {
214
+ return [boundValue.path];
215
+ }
216
+ if (isPathValue(boundValue)) {
217
+ return [boundValue.path];
218
+ }
219
+ // LiteralValue has no dependencies
220
+ return [];
221
+ }
222
+ /**
223
+ * Resolve template children to instances
224
+ *
225
+ * @param children - TemplateChildren configuration
226
+ * @param data - Data context containing the array
227
+ * @returns Array of resolved template child instances
228
+ */
229
+ resolveTemplateChildren(children, data) {
230
+ const { dataBinding, componentId, keyPath } = children.template;
231
+ // Resolve the array data
232
+ const arrayData = resolvePointer(data, dataBinding);
233
+ if (!Array.isArray(arrayData)) {
234
+ return [];
235
+ }
236
+ // Map each item to a resolved child
237
+ return arrayData.map((itemData, index) => {
238
+ // Resolve key if keyPath is provided
239
+ let key;
240
+ if (keyPath) {
241
+ // keyPath is relative to the item
242
+ const keyValue = resolvePointer(itemData, keyPath);
243
+ if (keyValue !== undefined) {
244
+ key = String(keyValue);
245
+ }
246
+ }
247
+ // Generate a unique ID for this instance
248
+ const id = key
249
+ ? `${componentId}-${key}`
250
+ : `${componentId}-${index}`;
251
+ return {
252
+ id,
253
+ templateId: componentId,
254
+ itemData,
255
+ index,
256
+ key,
257
+ };
258
+ });
259
+ }
260
+ }
261
+ /**
262
+ * Create a BoundValue resolver with the given configuration
263
+ */
264
+ export function createBoundValueResolver(config) {
265
+ return new BoundValueResolver(config);
266
+ }
267
+ // ============================================================================
268
+ // Utility Functions
269
+ // ============================================================================
270
+ /**
271
+ * Get the static value from a BoundValue (if available)
272
+ *
273
+ * @param boundValue - The BoundValue to extract from
274
+ * @returns The static value, or undefined if not a literal/combined
275
+ */
276
+ export function getStaticValue(boundValue) {
277
+ if (isLiteralValue(boundValue) || isCombinedValue(boundValue)) {
278
+ return boundValue.literalString;
279
+ }
280
+ return undefined;
281
+ }
282
+ /**
283
+ * Get the binding path from a BoundValue (if available)
284
+ *
285
+ * @param boundValue - The BoundValue to extract from
286
+ * @returns The path, or undefined if not a path/combined
287
+ */
288
+ export function getBindingPath(boundValue) {
289
+ if (isPathValue(boundValue) || isCombinedValue(boundValue)) {
290
+ return boundValue.path;
291
+ }
292
+ return undefined;
293
+ }
294
+ /**
295
+ * Check if a BoundValue has a dynamic binding
296
+ *
297
+ * @param boundValue - The BoundValue to check
298
+ * @returns True if the value has a path binding
299
+ */
300
+ export function hasDynamicBinding(boundValue) {
301
+ return isPathValue(boundValue) || isCombinedValue(boundValue);
302
+ }
303
+ /**
304
+ * Check if a BoundValue has a static default
305
+ *
306
+ * @param boundValue - The BoundValue to check
307
+ * @returns True if the value has a literalString
308
+ */
309
+ export function hasStaticDefault(boundValue) {
310
+ return isLiteralValue(boundValue) || isCombinedValue(boundValue);
311
+ }
312
+ /**
313
+ * Convert a raw value to the appropriate BoundValue type
314
+ *
315
+ * - If the value has literalString and path, returns CombinedValue
316
+ * - If the value has only literalString, returns LiteralValue
317
+ * - If the value has only path, returns PathValue
318
+ * - Otherwise, wraps the value in a LiteralValue
319
+ *
320
+ * @param value - The value to convert
321
+ * @returns A BoundValue
322
+ */
323
+ export function toBoundValue(value) {
324
+ if (isBoundValue(value)) {
325
+ return value;
326
+ }
327
+ return createLiteralValue(value);
328
+ }
329
+ /**
330
+ * Extract all BoundValue paths from a component properties object
331
+ *
332
+ * @param properties - Component properties object
333
+ * @returns Array of unique paths used in the properties
334
+ */
335
+ export function extractBoundPaths(properties) {
336
+ const paths = new Set();
337
+ function traverse(value) {
338
+ if (value === null || value === undefined) {
339
+ return;
340
+ }
341
+ if (isBoundValue(value)) {
342
+ const path = getBindingPath(value);
343
+ if (path) {
344
+ paths.add(path);
345
+ }
346
+ return;
347
+ }
348
+ if (isTemplateChildren(value)) {
349
+ paths.add(value.template.dataBinding);
350
+ return;
351
+ }
352
+ if (Array.isArray(value)) {
353
+ for (const item of value) {
354
+ traverse(item);
355
+ }
356
+ return;
357
+ }
358
+ if (typeof value === 'object') {
359
+ for (const key of Object.keys(value)) {
360
+ traverse(value[key]);
361
+ }
362
+ }
363
+ }
364
+ traverse(properties);
365
+ return Array.from(paths);
366
+ }
367
+ /**
368
+ * Deep resolve all BoundValues in a properties object
369
+ *
370
+ * @param properties - Component properties object
371
+ * @param data - Data context to resolve against
372
+ * @param resolver - BoundValue resolver to use
373
+ * @returns Properties object with all BoundValues resolved
374
+ */
375
+ export function resolveAllBoundValues(properties, data, resolver = new BoundValueResolver()) {
376
+ function resolveValue(value) {
377
+ if (value === null || value === undefined) {
378
+ return value;
379
+ }
380
+ if (isBoundValue(value)) {
381
+ return resolver.resolve(value, data);
382
+ }
383
+ if (isExplicitListChildren(value)) {
384
+ return value;
385
+ }
386
+ if (isTemplateChildren(value)) {
387
+ return resolver.resolveTemplateChildren(value, data);
388
+ }
389
+ if (Array.isArray(value)) {
390
+ return value.map(resolveValue);
391
+ }
392
+ if (typeof value === 'object') {
393
+ const result = {};
394
+ for (const key of Object.keys(value)) {
395
+ result[key] = resolveValue(value[key]);
396
+ }
397
+ return result;
398
+ }
399
+ return value;
400
+ }
401
+ return resolveValue(properties);
402
+ }
403
+ //# sourceMappingURL=bound-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bound-value.js","sourceRoot":"","sources":["../../../../src/adapters/a2ui/data/bound-value.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,cAAc,EAEd,eAAe,GAEhB,MAAM,4BAA4B,CAAC;AA2GpC,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,cAAc,CAAI,KAAc;IAC9C,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,eAAe,IAAI,KAAK;QACxB,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,CACnB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,MAAM,IAAI,KAAK;QACf,OAAQ,KAAmB,CAAC,IAAI,KAAK,QAAQ;QAC7C,CAAC,CAAC,eAAe,IAAI,KAAK,CAAC,CAC5B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAI,KAAc;IAC/C,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,eAAe,IAAI,KAAK;QACxB,MAAM,IAAI,KAAK;QACf,OAAQ,KAAuB,CAAC,IAAI,KAAK,QAAQ,CAClD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAI,KAAc;IAC5C,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAAiB;IAEjB,OAAO,CACL,OAAO,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QACvD,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACjC,CAAC;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,MAAM,GAA4B,EAAE,CAAC;YAC3C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAgC,CAAC,EAAE,CAAC;gBAChE,MAAM,CAAC,GAAG,CAAC,GAAG,YAAY,CAAE,KAAiC,CAAC,GAAG,CAAC,CAAC,CAAC;YACtE,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,YAAY,CAAC,UAAU,CAA4B,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A2UI Data Binding Module
3
+ *
4
+ * Provides data binding infrastructure for A2UI including:
5
+ * - JSON Pointer (RFC 6901) parsing and resolution
6
+ * - BoundValue types and resolution
7
+ * - Reactive data store with subscriptions
8
+ *
9
+ * @module adapters/a2ui/data
10
+ */
11
+ export { JsonPointerError, type JsonPointerErrorCode, type ResolveResult, escapeSegment, unescapeSegment, parseJsonPointer, buildJsonPointer, isValidPointer, resolvePointer, resolvePointerWithInfo, pointerExists, setAtPointer, deleteAtPointer, getAllPaths, isParentPointer, getParentPointer, getPointerKey, joinPointers, getRelativePath, } from './json-pointer-resolver.js';
12
+ export { type LiteralValue, type PathValue, type CombinedValue, type BoundValue, type ExplicitListChildren, type TemplateChildrenConfig, type TemplateChildren, type ComponentChildren, type ResolvedTemplateChild, type BoundValueResolverConfig, type IBoundValueResolver, isLiteralValue, isPathValue, isCombinedValue, isBoundValue, isExplicitListChildren, isTemplateChildren, createLiteralValue, createPathValue, createCombinedValue, createExplicitListChildren, createTemplateChildren, BoundValueResolver, createBoundValueResolver, getStaticValue, getBindingPath, hasDynamicBinding, hasStaticDefault, toBoundValue, extractBoundPaths, resolveAllBoundValues, } from './bound-value.js';
13
+ export { type ChangeCallback, type GlobalChangeCallback, type StoreChange, type BatchUpdate, type Subscription, type ReactiveStoreConfig, type IReactiveStore, ReactiveStore, createReactiveStore, createComputed, createSelector, combineStores, } from './reactive-store.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/a2ui/data/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,EAEL,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAGlB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EAGX,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,eAAe,GAChB,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EAGxB,cAAc,EACd,WAAW,EACX,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAGlB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,EAGtB,kBAAkB,EAClB,wBAAwB,EAGxB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EAGnB,aAAa,EACb,mBAAmB,EAGnB,cAAc,EACd,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * A2UI Data Binding Module
3
+ *
4
+ * Provides data binding infrastructure for A2UI including:
5
+ * - JSON Pointer (RFC 6901) parsing and resolution
6
+ * - BoundValue types and resolution
7
+ * - Reactive data store with subscriptions
8
+ *
9
+ * @module adapters/a2ui/data
10
+ */
11
+ // ============================================================================
12
+ // JSON Pointer (RFC 6901)
13
+ // ============================================================================
14
+ export {
15
+ // Error types
16
+ JsonPointerError,
17
+ // Core functions
18
+ escapeSegment, unescapeSegment, parseJsonPointer, buildJsonPointer, isValidPointer, resolvePointer, resolvePointerWithInfo, pointerExists, setAtPointer, deleteAtPointer, getAllPaths,
19
+ // Path utilities
20
+ isParentPointer, getParentPointer, getPointerKey, joinPointers, getRelativePath, } from './json-pointer-resolver.js';
21
+ // ============================================================================
22
+ // BoundValue Types and Resolution
23
+ // ============================================================================
24
+ export {
25
+ // Type guards
26
+ isLiteralValue, isPathValue, isCombinedValue, isBoundValue, isExplicitListChildren, isTemplateChildren,
27
+ // Factory functions
28
+ createLiteralValue, createPathValue, createCombinedValue, createExplicitListChildren, createTemplateChildren,
29
+ // Resolver
30
+ BoundValueResolver, createBoundValueResolver,
31
+ // Utilities
32
+ getStaticValue, getBindingPath, hasDynamicBinding, hasStaticDefault, toBoundValue, extractBoundPaths, resolveAllBoundValues, } from './bound-value.js';
33
+ // ============================================================================
34
+ // Reactive Store
35
+ // ============================================================================
36
+ export {
37
+ // Store implementation
38
+ ReactiveStore, createReactiveStore,
39
+ // Utilities
40
+ createComputed, createSelector, combineStores, } from './reactive-store.js';
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapters/a2ui/data/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E;AAE/E,OAAO;AACL,cAAc;AACd,gBAAgB;AAIhB,iBAAiB;AACjB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW;AAEX,iBAAiB;AACjB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,eAAe,GAChB,MAAM,4BAA4B,CAAC;AAEpC,+EAA+E;AAC/E,kCAAkC;AAClC,+EAA+E;AAE/E,OAAO;AAcL,cAAc;AACd,cAAc,EACd,WAAW,EACX,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,kBAAkB;AAElB,oBAAoB;AACpB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB;AAEtB,WAAW;AACX,kBAAkB,EAClB,wBAAwB;AAExB,YAAY;AACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E,OAAO;AAUL,uBAAuB;AACvB,aAAa,EACb,mBAAmB;AAEnB,YAAY;AACZ,cAAc,EACd,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,187 @@
1
+ /**
2
+ * JSON Pointer Resolver (RFC 6901)
3
+ *
4
+ * Implements RFC 6901 JSON Pointer specification for resolving,
5
+ * setting, and manipulating data within nested objects.
6
+ *
7
+ * @see https://www.rfc-editor.org/rfc/rfc6901
8
+ * @module adapters/a2ui/data/json-pointer-resolver
9
+ */
10
+ /**
11
+ * Error thrown for invalid JSON Pointer operations
12
+ */
13
+ export declare class JsonPointerError extends Error {
14
+ readonly pointer: string;
15
+ readonly code: JsonPointerErrorCode;
16
+ constructor(message: string, pointer: string, code: JsonPointerErrorCode);
17
+ }
18
+ /**
19
+ * JSON Pointer error codes
20
+ */
21
+ export type JsonPointerErrorCode = 'INVALID_POINTER_FORMAT' | 'INVALID_ARRAY_INDEX' | 'PATH_NOT_FOUND' | 'INVALID_ESCAPE_SEQUENCE' | 'CANNOT_SET_ON_PRIMITIVE';
22
+ /**
23
+ * Result of a JSON Pointer resolution
24
+ */
25
+ export interface ResolveResult<T> {
26
+ /** Whether the resolution was successful */
27
+ readonly found: boolean;
28
+ /** The resolved value (undefined if not found) */
29
+ readonly value: T | undefined;
30
+ /** The parent object containing the final segment */
31
+ readonly parent?: unknown;
32
+ /** The final segment key */
33
+ readonly key?: string | number;
34
+ }
35
+ /**
36
+ * Escape a JSON Pointer segment according to RFC 6901
37
+ *
38
+ * ~ -> ~0
39
+ * / -> ~1
40
+ *
41
+ * @param segment - The segment to escape
42
+ * @returns Escaped segment
43
+ */
44
+ export declare function escapeSegment(segment: string): string;
45
+ /**
46
+ * Unescape a JSON Pointer segment according to RFC 6901
47
+ *
48
+ * ~0 -> ~
49
+ * ~1 -> /
50
+ *
51
+ * @param segment - The escaped segment
52
+ * @returns Unescaped segment
53
+ */
54
+ export declare function unescapeSegment(segment: string): string;
55
+ /**
56
+ * Parse a JSON Pointer string into path segments
57
+ *
58
+ * @param pointer - JSON Pointer string (must start with '/' or be empty)
59
+ * @returns Array of path segments
60
+ * @throws {JsonPointerError} If pointer format is invalid
61
+ *
62
+ * @example
63
+ * parseJsonPointer('/metrics/coverage/line') -> ['metrics', 'coverage', 'line']
64
+ * parseJsonPointer('/users/0/name') -> ['users', '0', 'name']
65
+ * parseJsonPointer('') -> []
66
+ */
67
+ export declare function parseJsonPointer(pointer: string): string[];
68
+ /**
69
+ * Build a JSON Pointer string from path segments
70
+ *
71
+ * @param segments - Array of path segments
72
+ * @returns JSON Pointer string
73
+ *
74
+ * @example
75
+ * buildJsonPointer(['metrics', 'coverage']) -> '/metrics/coverage'
76
+ * buildJsonPointer([]) -> ''
77
+ */
78
+ export declare function buildJsonPointer(segments: string[]): string;
79
+ /**
80
+ * Validate a JSON Pointer string format
81
+ *
82
+ * @param pointer - String to validate
83
+ * @returns True if valid JSON Pointer format
84
+ */
85
+ export declare function isValidPointer(pointer: string): boolean;
86
+ /**
87
+ * Resolve a JSON Pointer against a data object
88
+ *
89
+ * @param data - The data object to resolve against
90
+ * @param pointer - JSON Pointer string
91
+ * @returns The resolved value, or undefined if not found
92
+ *
93
+ * @example
94
+ * const data = { metrics: { coverage: { line: 85 } } };
95
+ * resolvePointer(data, '/metrics/coverage/line') -> 85
96
+ * resolvePointer(data, '/metrics/unknown') -> undefined
97
+ */
98
+ export declare function resolvePointer<T = unknown>(data: unknown, pointer: string): T | undefined;
99
+ /**
100
+ * Resolve a JSON Pointer with additional information about the resolution
101
+ *
102
+ * @param data - The data object to resolve against
103
+ * @param pointer - JSON Pointer string
104
+ * @returns Resolution result with found flag, value, parent, and key
105
+ */
106
+ export declare function resolvePointerWithInfo<T = unknown>(data: unknown, pointer: string): ResolveResult<T>;
107
+ /**
108
+ * Check if a JSON Pointer path exists in the data
109
+ *
110
+ * @param data - The data object to check
111
+ * @param pointer - JSON Pointer string
112
+ * @returns True if the path exists
113
+ */
114
+ export declare function pointerExists(data: unknown, pointer: string): boolean;
115
+ /**
116
+ * Set a value at a JSON Pointer location
117
+ *
118
+ * @param data - The data object to modify (must be an object or array)
119
+ * @param pointer - JSON Pointer string
120
+ * @param value - The value to set
121
+ * @throws {JsonPointerError} If the path cannot be set
122
+ *
123
+ * @example
124
+ * const data = { metrics: { coverage: 75 } };
125
+ * setAtPointer(data, '/metrics/coverage', 85);
126
+ * // data.metrics.coverage is now 85
127
+ */
128
+ export declare function setAtPointer(data: unknown, pointer: string, value: unknown): void;
129
+ /**
130
+ * Delete a value at a JSON Pointer location
131
+ *
132
+ * @param data - The data object to modify
133
+ * @param pointer - JSON Pointer string
134
+ * @returns True if the value was deleted, false if it didn't exist
135
+ */
136
+ export declare function deleteAtPointer(data: unknown, pointer: string): boolean;
137
+ /**
138
+ * Get all paths in a data object as JSON Pointers
139
+ *
140
+ * @param data - The data object to traverse
141
+ * @param maxDepth - Maximum depth to traverse (default: 10)
142
+ * @returns Array of JSON Pointer strings
143
+ */
144
+ export declare function getAllPaths(data: unknown, maxDepth?: number): string[];
145
+ /**
146
+ * Check if a pointer is a parent of another pointer
147
+ *
148
+ * @param parent - Potential parent pointer
149
+ * @param child - Potential child pointer
150
+ * @returns True if parent is an ancestor of child
151
+ *
152
+ * @example
153
+ * isParentPointer('/metrics', '/metrics/coverage') -> true
154
+ * isParentPointer('/metrics/coverage', '/metrics') -> false
155
+ */
156
+ export declare function isParentPointer(parent: string, child: string): boolean;
157
+ /**
158
+ * Get the parent pointer of a given pointer
159
+ *
160
+ * @param pointer - JSON Pointer string
161
+ * @returns Parent pointer, or undefined for root
162
+ */
163
+ export declare function getParentPointer(pointer: string): string | undefined;
164
+ /**
165
+ * Get the last segment (key) of a pointer
166
+ *
167
+ * @param pointer - JSON Pointer string
168
+ * @returns The last segment, or undefined for root
169
+ */
170
+ export declare function getPointerKey(pointer: string): string | undefined;
171
+ /**
172
+ * Join two pointers together
173
+ *
174
+ * @param base - Base pointer
175
+ * @param relative - Relative pointer to append
176
+ * @returns Combined pointer
177
+ */
178
+ export declare function joinPointers(base: string, relative: string): string;
179
+ /**
180
+ * Create a relative pointer from an absolute pointer to another
181
+ *
182
+ * @param from - Starting pointer
183
+ * @param to - Target pointer
184
+ * @returns Relative segments needed to go from 'from' to 'to'
185
+ */
186
+ export declare function getRelativePath(from: string, to: string): string[];
187
+ //# sourceMappingURL=json-pointer-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-pointer-resolver.d.ts","sourceRoot":"","sources":["../../../../src/adapters/a2ui/data/json-pointer-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;GAEG;AACH,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