ui-gateway 0.0.0-stage → 0.1.1

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 (494) hide show
  1. package/AGENTS.md +185 -0
  2. package/CHANGELOG.md +28 -0
  3. package/CODE_OF_CONDUCT.md +121 -0
  4. package/CONTRIBUTING.md +65 -0
  5. package/LICENSE +21 -0
  6. package/NON-GOALS.md +23 -0
  7. package/README.md +384 -2
  8. package/SECURITY.md +34 -0
  9. package/SKILL.md +229 -0
  10. package/dist/evals/src/baseline.d.ts +101 -0
  11. package/dist/evals/src/baseline.d.ts.map +1 -0
  12. package/dist/evals/src/baseline.js +683 -0
  13. package/dist/evals/src/baseline.js.map +1 -0
  14. package/dist/evals/src/calibration-svg.d.ts +11 -0
  15. package/dist/evals/src/calibration-svg.d.ts.map +1 -0
  16. package/dist/evals/src/calibration-svg.js +84 -0
  17. package/dist/evals/src/calibration-svg.js.map +1 -0
  18. package/dist/evals/src/golden.d.ts +36 -0
  19. package/dist/evals/src/golden.d.ts.map +1 -0
  20. package/dist/evals/src/golden.js +62 -0
  21. package/dist/evals/src/golden.js.map +1 -0
  22. package/dist/evals/src/local-llm.d.ts +78 -0
  23. package/dist/evals/src/local-llm.d.ts.map +1 -0
  24. package/dist/evals/src/local-llm.js +314 -0
  25. package/dist/evals/src/local-llm.js.map +1 -0
  26. package/dist/evals/src/metrics.d.ts +115 -0
  27. package/dist/evals/src/metrics.d.ts.map +1 -0
  28. package/dist/evals/src/metrics.js +166 -0
  29. package/dist/evals/src/metrics.js.map +1 -0
  30. package/dist/packages/adapters/src/angular/index.d.ts +5 -0
  31. package/dist/packages/adapters/src/angular/index.d.ts.map +1 -0
  32. package/dist/packages/adapters/src/angular/index.js +87 -0
  33. package/dist/packages/adapters/src/angular/index.js.map +1 -0
  34. package/dist/packages/adapters/src/angular/manifest.d.ts +3 -0
  35. package/dist/packages/adapters/src/angular/manifest.d.ts.map +1 -0
  36. package/dist/packages/adapters/src/angular/manifest.js +156 -0
  37. package/dist/packages/adapters/src/angular/manifest.js.map +1 -0
  38. package/dist/packages/adapters/src/antd/index.d.ts +5 -0
  39. package/dist/packages/adapters/src/antd/index.d.ts.map +1 -0
  40. package/dist/packages/adapters/src/antd/index.js +76 -0
  41. package/dist/packages/adapters/src/antd/index.js.map +1 -0
  42. package/dist/packages/adapters/src/antd/manifest.d.ts +3 -0
  43. package/dist/packages/adapters/src/antd/manifest.d.ts.map +1 -0
  44. package/dist/packages/adapters/src/antd/manifest.js +174 -0
  45. package/dist/packages/adapters/src/antd/manifest.js.map +1 -0
  46. package/dist/packages/adapters/src/bootstrap/index.d.ts +5 -0
  47. package/dist/packages/adapters/src/bootstrap/index.d.ts.map +1 -0
  48. package/dist/packages/adapters/src/bootstrap/index.js +87 -0
  49. package/dist/packages/adapters/src/bootstrap/index.js.map +1 -0
  50. package/dist/packages/adapters/src/bootstrap/manifest.d.ts +3 -0
  51. package/dist/packages/adapters/src/bootstrap/manifest.d.ts.map +1 -0
  52. package/dist/packages/adapters/src/bootstrap/manifest.js +157 -0
  53. package/dist/packages/adapters/src/bootstrap/manifest.js.map +1 -0
  54. package/dist/packages/adapters/src/chakra/index.d.ts +5 -0
  55. package/dist/packages/adapters/src/chakra/index.d.ts.map +1 -0
  56. package/dist/packages/adapters/src/chakra/index.js +81 -0
  57. package/dist/packages/adapters/src/chakra/index.js.map +1 -0
  58. package/dist/packages/adapters/src/chakra/manifest.d.ts +3 -0
  59. package/dist/packages/adapters/src/chakra/manifest.d.ts.map +1 -0
  60. package/dist/packages/adapters/src/chakra/manifest.js +641 -0
  61. package/dist/packages/adapters/src/chakra/manifest.js.map +1 -0
  62. package/dist/packages/adapters/src/conformance.d.ts +25 -0
  63. package/dist/packages/adapters/src/conformance.d.ts.map +1 -0
  64. package/dist/packages/adapters/src/conformance.js +118 -0
  65. package/dist/packages/adapters/src/conformance.js.map +1 -0
  66. package/dist/packages/adapters/src/imports.d.ts +7 -0
  67. package/dist/packages/adapters/src/imports.d.ts.map +1 -0
  68. package/dist/packages/adapters/src/imports.js +24 -0
  69. package/dist/packages/adapters/src/imports.js.map +1 -0
  70. package/dist/packages/adapters/src/index.d.ts +15 -0
  71. package/dist/packages/adapters/src/index.d.ts.map +1 -0
  72. package/dist/packages/adapters/src/index.js +15 -0
  73. package/dist/packages/adapters/src/index.js.map +1 -0
  74. package/dist/packages/adapters/src/local.d.ts +6 -0
  75. package/dist/packages/adapters/src/local.d.ts.map +1 -0
  76. package/dist/packages/adapters/src/local.js +136 -0
  77. package/dist/packages/adapters/src/local.js.map +1 -0
  78. package/dist/packages/adapters/src/mantine/index.d.ts +5 -0
  79. package/dist/packages/adapters/src/mantine/index.d.ts.map +1 -0
  80. package/dist/packages/adapters/src/mantine/index.js +81 -0
  81. package/dist/packages/adapters/src/mantine/index.js.map +1 -0
  82. package/dist/packages/adapters/src/mantine/manifest.d.ts +3 -0
  83. package/dist/packages/adapters/src/mantine/manifest.d.ts.map +1 -0
  84. package/dist/packages/adapters/src/mantine/manifest.js +522 -0
  85. package/dist/packages/adapters/src/mantine/manifest.js.map +1 -0
  86. package/dist/packages/adapters/src/mui/index.d.ts +5 -0
  87. package/dist/packages/adapters/src/mui/index.d.ts.map +1 -0
  88. package/dist/packages/adapters/src/mui/index.js +80 -0
  89. package/dist/packages/adapters/src/mui/index.js.map +1 -0
  90. package/dist/packages/adapters/src/mui/manifest.d.ts +3 -0
  91. package/dist/packages/adapters/src/mui/manifest.d.ts.map +1 -0
  92. package/dist/packages/adapters/src/mui/manifest.js +390 -0
  93. package/dist/packages/adapters/src/mui/manifest.js.map +1 -0
  94. package/dist/packages/adapters/src/registry.d.ts +22 -0
  95. package/dist/packages/adapters/src/registry.d.ts.map +1 -0
  96. package/dist/packages/adapters/src/registry.js +61 -0
  97. package/dist/packages/adapters/src/registry.js.map +1 -0
  98. package/dist/packages/adapters/src/shadcn/index.d.ts +5 -0
  99. package/dist/packages/adapters/src/shadcn/index.d.ts.map +1 -0
  100. package/dist/packages/adapters/src/shadcn/index.js +79 -0
  101. package/dist/packages/adapters/src/shadcn/index.js.map +1 -0
  102. package/dist/packages/adapters/src/shadcn/manifest.d.ts +3 -0
  103. package/dist/packages/adapters/src/shadcn/manifest.d.ts.map +1 -0
  104. package/dist/packages/adapters/src/shadcn/manifest.js +470 -0
  105. package/dist/packages/adapters/src/shadcn/manifest.js.map +1 -0
  106. package/dist/packages/adapters/src/solid/index.d.ts +5 -0
  107. package/dist/packages/adapters/src/solid/index.d.ts.map +1 -0
  108. package/dist/packages/adapters/src/solid/index.js +87 -0
  109. package/dist/packages/adapters/src/solid/index.js.map +1 -0
  110. package/dist/packages/adapters/src/solid/manifest.d.ts +3 -0
  111. package/dist/packages/adapters/src/solid/manifest.d.ts.map +1 -0
  112. package/dist/packages/adapters/src/solid/manifest.js +156 -0
  113. package/dist/packages/adapters/src/solid/manifest.js.map +1 -0
  114. package/dist/packages/adapters/src/svelte/index.d.ts +5 -0
  115. package/dist/packages/adapters/src/svelte/index.d.ts.map +1 -0
  116. package/dist/packages/adapters/src/svelte/index.js +77 -0
  117. package/dist/packages/adapters/src/svelte/index.js.map +1 -0
  118. package/dist/packages/adapters/src/svelte/manifest.d.ts +3 -0
  119. package/dist/packages/adapters/src/svelte/manifest.d.ts.map +1 -0
  120. package/dist/packages/adapters/src/svelte/manifest.js +157 -0
  121. package/dist/packages/adapters/src/svelte/manifest.js.map +1 -0
  122. package/dist/packages/adapters/src/tokens.d.ts +9 -0
  123. package/dist/packages/adapters/src/tokens.d.ts.map +1 -0
  124. package/dist/packages/adapters/src/tokens.js +257 -0
  125. package/dist/packages/adapters/src/tokens.js.map +1 -0
  126. package/dist/packages/adapters/src/types.d.ts +58 -0
  127. package/dist/packages/adapters/src/types.d.ts.map +1 -0
  128. package/dist/packages/adapters/src/types.js +4 -0
  129. package/dist/packages/adapters/src/types.js.map +1 -0
  130. package/dist/packages/adapters/src/vue/index.d.ts +5 -0
  131. package/dist/packages/adapters/src/vue/index.d.ts.map +1 -0
  132. package/dist/packages/adapters/src/vue/index.js +78 -0
  133. package/dist/packages/adapters/src/vue/index.js.map +1 -0
  134. package/dist/packages/adapters/src/vue/manifest.d.ts +3 -0
  135. package/dist/packages/adapters/src/vue/manifest.d.ts.map +1 -0
  136. package/dist/packages/adapters/src/vue/manifest.js +159 -0
  137. package/dist/packages/adapters/src/vue/manifest.js.map +1 -0
  138. package/dist/packages/design-md/src/compile.d.ts +12 -0
  139. package/dist/packages/design-md/src/compile.d.ts.map +1 -0
  140. package/dist/packages/design-md/src/compile.js +213 -0
  141. package/dist/packages/design-md/src/compile.js.map +1 -0
  142. package/dist/packages/design-md/src/dtcg.d.ts +23 -0
  143. package/dist/packages/design-md/src/dtcg.d.ts.map +1 -0
  144. package/dist/packages/design-md/src/dtcg.js +77 -0
  145. package/dist/packages/design-md/src/dtcg.js.map +1 -0
  146. package/dist/packages/design-md/src/index.d.ts +6 -0
  147. package/dist/packages/design-md/src/index.d.ts.map +1 -0
  148. package/dist/packages/design-md/src/index.js +6 -0
  149. package/dist/packages/design-md/src/index.js.map +1 -0
  150. package/dist/packages/design-md/src/parse.d.ts +22 -0
  151. package/dist/packages/design-md/src/parse.d.ts.map +1 -0
  152. package/dist/packages/design-md/src/parse.js +206 -0
  153. package/dist/packages/design-md/src/parse.js.map +1 -0
  154. package/dist/packages/design-md/src/satisfiability.d.ts +20 -0
  155. package/dist/packages/design-md/src/satisfiability.d.ts.map +1 -0
  156. package/dist/packages/design-md/src/satisfiability.js +125 -0
  157. package/dist/packages/design-md/src/satisfiability.js.map +1 -0
  158. package/dist/packages/design-md/src/types.d.ts +75 -0
  159. package/dist/packages/design-md/src/types.d.ts.map +1 -0
  160. package/dist/packages/design-md/src/types.js +9 -0
  161. package/dist/packages/design-md/src/types.js.map +1 -0
  162. package/dist/packages/gateway/src/acceptance.d.ts +5 -0
  163. package/dist/packages/gateway/src/acceptance.d.ts.map +1 -0
  164. package/dist/packages/gateway/src/acceptance.js +68 -0
  165. package/dist/packages/gateway/src/acceptance.js.map +1 -0
  166. package/dist/packages/gateway/src/composition.d.ts +20 -0
  167. package/dist/packages/gateway/src/composition.d.ts.map +1 -0
  168. package/dist/packages/gateway/src/composition.js +468 -0
  169. package/dist/packages/gateway/src/composition.js.map +1 -0
  170. package/dist/packages/gateway/src/confidence.d.ts +10 -0
  171. package/dist/packages/gateway/src/confidence.d.ts.map +1 -0
  172. package/dist/packages/gateway/src/confidence.js +31 -0
  173. package/dist/packages/gateway/src/confidence.js.map +1 -0
  174. package/dist/packages/gateway/src/gateway.d.ts +73 -0
  175. package/dist/packages/gateway/src/gateway.d.ts.map +1 -0
  176. package/dist/packages/gateway/src/gateway.js +808 -0
  177. package/dist/packages/gateway/src/gateway.js.map +1 -0
  178. package/dist/packages/gateway/src/index.d.ts +7 -0
  179. package/dist/packages/gateway/src/index.d.ts.map +1 -0
  180. package/dist/packages/gateway/src/index.js +7 -0
  181. package/dist/packages/gateway/src/index.js.map +1 -0
  182. package/dist/packages/gateway/src/layers.d.ts +34 -0
  183. package/dist/packages/gateway/src/layers.d.ts.map +1 -0
  184. package/dist/packages/gateway/src/layers.js +294 -0
  185. package/dist/packages/gateway/src/layers.js.map +1 -0
  186. package/dist/packages/gateway/src/validate.d.ts +74 -0
  187. package/dist/packages/gateway/src/validate.d.ts.map +1 -0
  188. package/dist/packages/gateway/src/validate.js +241 -0
  189. package/dist/packages/gateway/src/validate.js.map +1 -0
  190. package/dist/packages/kb/src/bundle-size.d.ts +31 -0
  191. package/dist/packages/kb/src/bundle-size.d.ts.map +1 -0
  192. package/dist/packages/kb/src/bundle-size.js +62 -0
  193. package/dist/packages/kb/src/bundle-size.js.map +1 -0
  194. package/dist/packages/kb/src/entry.d.ts +534 -0
  195. package/dist/packages/kb/src/entry.d.ts.map +1 -0
  196. package/dist/packages/kb/src/entry.js +97 -0
  197. package/dist/packages/kb/src/entry.js.map +1 -0
  198. package/dist/packages/kb/src/index.d.ts +6 -0
  199. package/dist/packages/kb/src/index.d.ts.map +1 -0
  200. package/dist/packages/kb/src/index.js +6 -0
  201. package/dist/packages/kb/src/index.js.map +1 -0
  202. package/dist/packages/kb/src/ingest.d.ts +33 -0
  203. package/dist/packages/kb/src/ingest.d.ts.map +1 -0
  204. package/dist/packages/kb/src/ingest.js +137 -0
  205. package/dist/packages/kb/src/ingest.js.map +1 -0
  206. package/dist/packages/kb/src/kb.d.ts +66 -0
  207. package/dist/packages/kb/src/kb.d.ts.map +1 -0
  208. package/dist/packages/kb/src/kb.js +189 -0
  209. package/dist/packages/kb/src/kb.js.map +1 -0
  210. package/dist/packages/kb/src/telemetry.d.ts +54 -0
  211. package/dist/packages/kb/src/telemetry.d.ts.map +1 -0
  212. package/dist/packages/kb/src/telemetry.js +242 -0
  213. package/dist/packages/kb/src/telemetry.js.map +1 -0
  214. package/dist/packages/matcher/src/anthropic.d.ts +26 -0
  215. package/dist/packages/matcher/src/anthropic.d.ts.map +1 -0
  216. package/dist/packages/matcher/src/anthropic.js +113 -0
  217. package/dist/packages/matcher/src/anthropic.js.map +1 -0
  218. package/dist/packages/matcher/src/index.d.ts +67 -0
  219. package/dist/packages/matcher/src/index.d.ts.map +1 -0
  220. package/dist/packages/matcher/src/index.js +227 -0
  221. package/dist/packages/matcher/src/index.js.map +1 -0
  222. package/dist/packages/matcher/src/scaffold.d.ts +35 -0
  223. package/dist/packages/matcher/src/scaffold.d.ts.map +1 -0
  224. package/dist/packages/matcher/src/scaffold.js +343 -0
  225. package/dist/packages/matcher/src/scaffold.js.map +1 -0
  226. package/dist/packages/matcher/src/score.d.ts +31 -0
  227. package/dist/packages/matcher/src/score.d.ts.map +1 -0
  228. package/dist/packages/matcher/src/score.js +141 -0
  229. package/dist/packages/matcher/src/score.js.map +1 -0
  230. package/dist/packages/matcher/src/select.d.ts +54 -0
  231. package/dist/packages/matcher/src/select.d.ts.map +1 -0
  232. package/dist/packages/matcher/src/select.js +148 -0
  233. package/dist/packages/matcher/src/select.js.map +1 -0
  234. package/dist/packages/orchestrator/src/handoff-builder.d.ts +58 -0
  235. package/dist/packages/orchestrator/src/handoff-builder.d.ts.map +1 -0
  236. package/dist/packages/orchestrator/src/handoff-builder.js +162 -0
  237. package/dist/packages/orchestrator/src/handoff-builder.js.map +1 -0
  238. package/dist/packages/orchestrator/src/index.d.ts +3 -0
  239. package/dist/packages/orchestrator/src/index.d.ts.map +1 -0
  240. package/dist/packages/orchestrator/src/index.js +3 -0
  241. package/dist/packages/orchestrator/src/index.js.map +1 -0
  242. package/dist/packages/orchestrator/src/orchestrator.d.ts +32 -0
  243. package/dist/packages/orchestrator/src/orchestrator.d.ts.map +1 -0
  244. package/dist/packages/orchestrator/src/orchestrator.js +124 -0
  245. package/dist/packages/orchestrator/src/orchestrator.js.map +1 -0
  246. package/dist/packages/profile/src/conflicts.d.ts +18 -0
  247. package/dist/packages/profile/src/conflicts.d.ts.map +1 -0
  248. package/dist/packages/profile/src/conflicts.js +151 -0
  249. package/dist/packages/profile/src/conflicts.js.map +1 -0
  250. package/dist/packages/profile/src/detect.d.ts +14 -0
  251. package/dist/packages/profile/src/detect.d.ts.map +1 -0
  252. package/dist/packages/profile/src/detect.js +325 -0
  253. package/dist/packages/profile/src/detect.js.map +1 -0
  254. package/dist/packages/profile/src/fs-utils.d.ts +18 -0
  255. package/dist/packages/profile/src/fs-utils.d.ts.map +1 -0
  256. package/dist/packages/profile/src/fs-utils.js +104 -0
  257. package/dist/packages/profile/src/fs-utils.js.map +1 -0
  258. package/dist/packages/profile/src/index.d.ts +8 -0
  259. package/dist/packages/profile/src/index.d.ts.map +1 -0
  260. package/dist/packages/profile/src/index.js +8 -0
  261. package/dist/packages/profile/src/index.js.map +1 -0
  262. package/dist/packages/profile/src/local-components.d.ts +17 -0
  263. package/dist/packages/profile/src/local-components.d.ts.map +1 -0
  264. package/dist/packages/profile/src/local-components.js +148 -0
  265. package/dist/packages/profile/src/local-components.js.map +1 -0
  266. package/dist/packages/profile/src/registry.d.ts +32 -0
  267. package/dist/packages/profile/src/registry.d.ts.map +1 -0
  268. package/dist/packages/profile/src/registry.js +56 -0
  269. package/dist/packages/profile/src/registry.js.map +1 -0
  270. package/dist/packages/profile/src/skill-layer-context.d.ts +37 -0
  271. package/dist/packages/profile/src/skill-layer-context.d.ts.map +1 -0
  272. package/dist/packages/profile/src/skill-layer-context.js +172 -0
  273. package/dist/packages/profile/src/skill-layer-context.js.map +1 -0
  274. package/dist/packages/profile/src/skills.d.ts +16 -0
  275. package/dist/packages/profile/src/skills.d.ts.map +1 -0
  276. package/dist/packages/profile/src/skills.js +133 -0
  277. package/dist/packages/profile/src/skills.js.map +1 -0
  278. package/dist/packages/protocol/src/canonical.d.ts +18 -0
  279. package/dist/packages/protocol/src/canonical.d.ts.map +1 -0
  280. package/dist/packages/protocol/src/canonical.js +54 -0
  281. package/dist/packages/protocol/src/canonical.js.map +1 -0
  282. package/dist/packages/protocol/src/clock.d.ts +15 -0
  283. package/dist/packages/protocol/src/clock.d.ts.map +1 -0
  284. package/dist/packages/protocol/src/clock.js +28 -0
  285. package/dist/packages/protocol/src/clock.js.map +1 -0
  286. package/dist/packages/protocol/src/coverage.d.ts +7 -0
  287. package/dist/packages/protocol/src/coverage.d.ts.map +1 -0
  288. package/dist/packages/protocol/src/coverage.js +17 -0
  289. package/dist/packages/protocol/src/coverage.js.map +1 -0
  290. package/dist/packages/protocol/src/errors.d.ts +24 -0
  291. package/dist/packages/protocol/src/errors.d.ts.map +1 -0
  292. package/dist/packages/protocol/src/errors.js +60 -0
  293. package/dist/packages/protocol/src/errors.js.map +1 -0
  294. package/dist/packages/protocol/src/event-log.d.ts +137 -0
  295. package/dist/packages/protocol/src/event-log.d.ts.map +1 -0
  296. package/dist/packages/protocol/src/event-log.js +270 -0
  297. package/dist/packages/protocol/src/event-log.js.map +1 -0
  298. package/dist/packages/protocol/src/events.d.ts +86 -0
  299. package/dist/packages/protocol/src/events.d.ts.map +1 -0
  300. package/dist/packages/protocol/src/events.js +182 -0
  301. package/dist/packages/protocol/src/events.js.map +1 -0
  302. package/dist/packages/protocol/src/hashing.d.ts +6 -0
  303. package/dist/packages/protocol/src/hashing.d.ts.map +1 -0
  304. package/dist/packages/protocol/src/hashing.js +14 -0
  305. package/dist/packages/protocol/src/hashing.js.map +1 -0
  306. package/dist/packages/protocol/src/index.d.ts +13 -0
  307. package/dist/packages/protocol/src/index.d.ts.map +1 -0
  308. package/dist/packages/protocol/src/index.js +13 -0
  309. package/dist/packages/protocol/src/index.js.map +1 -0
  310. package/dist/packages/protocol/src/lease.d.ts +6 -0
  311. package/dist/packages/protocol/src/lease.d.ts.map +1 -0
  312. package/dist/packages/protocol/src/lease.js +21 -0
  313. package/dist/packages/protocol/src/lease.js.map +1 -0
  314. package/dist/packages/protocol/src/schemas.d.ts +8875 -0
  315. package/dist/packages/protocol/src/schemas.d.ts.map +1 -0
  316. package/dist/packages/protocol/src/schemas.js +536 -0
  317. package/dist/packages/protocol/src/schemas.js.map +1 -0
  318. package/dist/packages/protocol/src/semantic.d.ts +19 -0
  319. package/dist/packages/protocol/src/semantic.d.ts.map +1 -0
  320. package/dist/packages/protocol/src/semantic.js +245 -0
  321. package/dist/packages/protocol/src/semantic.js.map +1 -0
  322. package/dist/packages/protocol/src/state-machine.d.ts +12 -0
  323. package/dist/packages/protocol/src/state-machine.d.ts.map +1 -0
  324. package/dist/packages/protocol/src/state-machine.js +67 -0
  325. package/dist/packages/protocol/src/state-machine.js.map +1 -0
  326. package/dist/packages/protocol/src/wireframe.d.ts +5 -0
  327. package/dist/packages/protocol/src/wireframe.d.ts.map +1 -0
  328. package/dist/packages/protocol/src/wireframe.js +23 -0
  329. package/dist/packages/protocol/src/wireframe.js.map +1 -0
  330. package/dist/packages/transports/src/cli.d.ts +3 -0
  331. package/dist/packages/transports/src/cli.d.ts.map +1 -0
  332. package/dist/packages/transports/src/cli.js +349 -0
  333. package/dist/packages/transports/src/cli.js.map +1 -0
  334. package/dist/packages/transports/src/http.d.ts +27 -0
  335. package/dist/packages/transports/src/http.d.ts.map +1 -0
  336. package/dist/packages/transports/src/http.js +176 -0
  337. package/dist/packages/transports/src/http.js.map +1 -0
  338. package/dist/packages/transports/src/index.d.ts +7 -0
  339. package/dist/packages/transports/src/index.d.ts.map +1 -0
  340. package/dist/packages/transports/src/index.js +7 -0
  341. package/dist/packages/transports/src/index.js.map +1 -0
  342. package/dist/packages/transports/src/label.d.ts +6 -0
  343. package/dist/packages/transports/src/label.d.ts.map +1 -0
  344. package/dist/packages/transports/src/label.js +47 -0
  345. package/dist/packages/transports/src/label.js.map +1 -0
  346. package/dist/packages/transports/src/mcp.d.ts +16 -0
  347. package/dist/packages/transports/src/mcp.d.ts.map +1 -0
  348. package/dist/packages/transports/src/mcp.js +112 -0
  349. package/dist/packages/transports/src/mcp.js.map +1 -0
  350. package/dist/packages/transports/src/resources.d.ts +9 -0
  351. package/dist/packages/transports/src/resources.d.ts.map +1 -0
  352. package/dist/packages/transports/src/resources.js +83 -0
  353. package/dist/packages/transports/src/resources.js.map +1 -0
  354. package/dist/packages/transports/src/runtime.d.ts +17 -0
  355. package/dist/packages/transports/src/runtime.d.ts.map +1 -0
  356. package/dist/packages/transports/src/runtime.js +22 -0
  357. package/dist/packages/transports/src/runtime.js.map +1 -0
  358. package/dist/packages/transports/src/tools.d.ts +30 -0
  359. package/dist/packages/transports/src/tools.d.ts.map +1 -0
  360. package/dist/packages/transports/src/tools.js +731 -0
  361. package/dist/packages/transports/src/tools.js.map +1 -0
  362. package/dist/packages/verifier/src/ast.d.ts +33 -0
  363. package/dist/packages/verifier/src/ast.d.ts.map +1 -0
  364. package/dist/packages/verifier/src/ast.js +147 -0
  365. package/dist/packages/verifier/src/ast.js.map +1 -0
  366. package/dist/packages/verifier/src/coverage.d.ts +2 -0
  367. package/dist/packages/verifier/src/coverage.d.ts.map +1 -0
  368. package/dist/packages/verifier/src/coverage.js +2 -0
  369. package/dist/packages/verifier/src/coverage.js.map +1 -0
  370. package/dist/packages/verifier/src/index.d.ts +8 -0
  371. package/dist/packages/verifier/src/index.d.ts.map +1 -0
  372. package/dist/packages/verifier/src/index.js +8 -0
  373. package/dist/packages/verifier/src/index.js.map +1 -0
  374. package/dist/packages/verifier/src/lint.d.ts +18 -0
  375. package/dist/packages/verifier/src/lint.d.ts.map +1 -0
  376. package/dist/packages/verifier/src/lint.js +87 -0
  377. package/dist/packages/verifier/src/lint.js.map +1 -0
  378. package/dist/packages/verifier/src/page.d.ts +32 -0
  379. package/dist/packages/verifier/src/page.d.ts.map +1 -0
  380. package/dist/packages/verifier/src/page.js +529 -0
  381. package/dist/packages/verifier/src/page.js.map +1 -0
  382. package/dist/packages/verifier/src/render-axe-impl.d.ts +21 -0
  383. package/dist/packages/verifier/src/render-axe-impl.d.ts.map +1 -0
  384. package/dist/packages/verifier/src/render-axe-impl.js +107 -0
  385. package/dist/packages/verifier/src/render-axe-impl.js.map +1 -0
  386. package/dist/packages/verifier/src/render-axe.d.ts +43 -0
  387. package/dist/packages/verifier/src/render-axe.d.ts.map +1 -0
  388. package/dist/packages/verifier/src/render-axe.js +78 -0
  389. package/dist/packages/verifier/src/render-axe.js.map +1 -0
  390. package/dist/packages/verifier/src/tsc.d.ts +42 -0
  391. package/dist/packages/verifier/src/tsc.d.ts.map +1 -0
  392. package/dist/packages/verifier/src/tsc.js +228 -0
  393. package/dist/packages/verifier/src/tsc.js.map +1 -0
  394. package/dist/packages/verifier/src/verify.d.ts +31 -0
  395. package/dist/packages/verifier/src/verify.d.ts.map +1 -0
  396. package/dist/packages/verifier/src/verify.js +173 -0
  397. package/dist/packages/verifier/src/verify.js.map +1 -0
  398. package/dist/scripts/calibration.d.ts +2 -0
  399. package/dist/scripts/calibration.d.ts.map +1 -0
  400. package/dist/scripts/calibration.js +45 -0
  401. package/dist/scripts/calibration.js.map +1 -0
  402. package/dist/scripts/e2e-demo.d.ts +2 -0
  403. package/dist/scripts/e2e-demo.d.ts.map +1 -0
  404. package/dist/scripts/e2e-demo.js +104 -0
  405. package/dist/scripts/e2e-demo.js.map +1 -0
  406. package/dist/scripts/fetch-bundle-sizes.d.ts +7 -0
  407. package/dist/scripts/fetch-bundle-sizes.d.ts.map +1 -0
  408. package/dist/scripts/fetch-bundle-sizes.js +73 -0
  409. package/dist/scripts/fetch-bundle-sizes.js.map +1 -0
  410. package/dist/scripts/fix-imports.d.ts +2 -0
  411. package/dist/scripts/fix-imports.d.ts.map +1 -0
  412. package/dist/scripts/fix-imports.js +59 -0
  413. package/dist/scripts/fix-imports.js.map +1 -0
  414. package/dist/scripts/mcp-config.d.ts +3 -0
  415. package/dist/scripts/mcp-config.d.ts.map +1 -0
  416. package/dist/scripts/mcp-config.js +66 -0
  417. package/dist/scripts/mcp-config.js.map +1 -0
  418. package/dist/scripts/test-bundlephobia.d.ts +2 -0
  419. package/dist/scripts/test-bundlephobia.d.ts.map +1 -0
  420. package/dist/scripts/test-bundlephobia.js +10 -0
  421. package/dist/scripts/test-bundlephobia.js.map +1 -0
  422. package/dist/vitest.config.d.ts +3 -0
  423. package/dist/vitest.config.d.ts.map +1 -0
  424. package/dist/vitest.config.js +26 -0
  425. package/dist/vitest.config.js.map +1 -0
  426. package/evals/fixtures/blind-consensus.json +198 -0
  427. package/evals/fixtures/blind-labeling-nonauthor.json +338 -0
  428. package/evals/fixtures/blind-labeling.json +455 -0
  429. package/evals/fixtures/blind-labels.json +149 -0
  430. package/evals/fixtures/design-md/default.md +24 -0
  431. package/evals/fixtures/design-md/existing-chakra.md +20 -0
  432. package/evals/fixtures/design-md/existing-mantine.md +20 -0
  433. package/evals/fixtures/design-md/existing-mui.md +21 -0
  434. package/evals/fixtures/golden-set.json +4222 -0
  435. package/evals/fixtures/labels.jsonl +5 -0
  436. package/evals/fixtures/projects/existing-chakra/package.json +12 -0
  437. package/evals/fixtures/projects/existing-mantine/package.json +11 -0
  438. package/evals/fixtures/projects/existing-mui/AGENTS.md +5 -0
  439. package/evals/fixtures/projects/existing-mui/package.json +12 -0
  440. package/evals/fixtures/projects/existing-mui/src/components/StatusCard.tsx +16 -0
  441. package/evals/fixtures/projects/existing-shadcn/components.json +16 -0
  442. package/evals/fixtures/projects/existing-shadcn/package.json +14 -0
  443. package/evals/fixtures/projects/existing-shadcn/src/components/ui/button.tsx +5 -0
  444. package/evals/fixtures/projects/existing-shadcn/src/components/ui/card.tsx +10 -0
  445. package/evals/fixtures/projects/existing-shadcn/tailwind.config.ts +7 -0
  446. package/evals/fixtures/projects/existing-shadcn/tsconfig.json +15 -0
  447. package/evals/fixtures/projects/greenfield-react/package.json +13 -0
  448. package/evals/fixtures/site/dashboard.html +349 -0
  449. package/evals/fixtures/thresholds.json +11 -0
  450. package/evals/out/agent-report.json +2722 -0
  451. package/evals/out/baseline-report.json +7093 -0
  452. package/evals/out/calibration.json +147 -0
  453. package/evals/out/eval-report.json +5338 -0
  454. package/evals/out/groq-baseline-report.json +1010 -0
  455. package/evals/out/groq-run.log +1118 -0
  456. package/evals/package.json +10 -0
  457. package/evals/src/agent-eval.test.ts +18 -0
  458. package/evals/src/agent-eval.ts +222 -0
  459. package/evals/src/baseline.ts +850 -0
  460. package/evals/src/blind-labeling-cli.ts +74 -0
  461. package/evals/src/blind-labeling.ts +382 -0
  462. package/evals/src/calibration-svg.ts +105 -0
  463. package/evals/src/create-blind-subset.ts +91 -0
  464. package/evals/src/evals.test.ts +354 -0
  465. package/evals/src/golden.ts +104 -0
  466. package/evals/src/index.ts +6 -0
  467. package/evals/src/local-llm.ts +371 -0
  468. package/evals/src/merge-blind-labels.ts +73 -0
  469. package/evals/src/metrics.ts +281 -0
  470. package/evals/src/mutations.ts +244 -0
  471. package/evals/src/page-a11y-eval.ts +3372 -0
  472. package/evals/src/page-real-eval.ts +389 -0
  473. package/evals/src/run-agent-evals.ts +49 -0
  474. package/evals/src/run-claude-evals.ts +49 -0
  475. package/evals/src/run-evals.ts +82 -0
  476. package/evals/src/run-groq-evals.ts +104 -0
  477. package/evals/src/run-phase9.ts +48 -0
  478. package/evals/src/run-simulated-evals.ts +45 -0
  479. package/evals/src/site-eval.ts +161 -0
  480. package/evals/src/test-support.ts +16 -0
  481. package/package.json +147 -4
  482. package/references/composition-apis.md +108 -0
  483. package/references/design-md.md +134 -0
  484. package/references/errors.md +94 -0
  485. package/references/handoff.md +188 -0
  486. package/references/outcomes.md +114 -0
  487. package/references/patterns.md +136 -0
  488. package/references/tools.md +385 -0
  489. package/scripts/calibration.ts +64 -0
  490. package/scripts/e2e-demo.ts +112 -0
  491. package/scripts/fetch-bundle-sizes.ts +106 -0
  492. package/scripts/fix-imports.ts +67 -0
  493. package/scripts/mcp-config.ts +90 -0
  494. package/scripts/test-bundlephobia.ts +11 -0
package/AGENTS.md ADDED
@@ -0,0 +1,185 @@
1
+ # AGENTS.md
2
+
3
+ Contributor guide for this repository. Read this before changing code, and read
4
+ `SKILL.md` before changing the agent-facing contract.
5
+
6
+ ## What this is
7
+
8
+ UI Gateway turns a design handoff into verified UI component mappings. The
9
+ gateway returns code and typed refusals; it never writes files, installs
10
+ packages or opens pull requests. The agent using the skill is the only writer.
11
+
12
+ Node 22.5+ is required because the event log uses `node:sqlite`.
13
+
14
+ ## Commands
15
+
16
+ ```bash
17
+ npm install
18
+ npm run typecheck
19
+ npm test
20
+ npm run check # typecheck + test
21
+ npm run demo # end-to-end greenfield shadcn + existing MUI
22
+ npm run eval # golden set + stand-in arms
23
+ npm run eval:agent # agent tool contract (build -> validate -> submit)
24
+ npm run eval:claude # requires ANTHROPIC_API_KEY
25
+ npm run eval:groq # requires GROQ_API_KEY
26
+ npm run eval:site # Playwright site eval (installed Chrome)
27
+ npm run eval:page # generated page shell accessibility eval (installed Chrome)
28
+ npm run eval:page:real # real MUI/Chakra/Mantine scaffold + theme browser eval
29
+ npm run calibration # writes docs/calibration.svg
30
+ npm run cli -- <args>
31
+ npm run mcp:config -- --project <target>
32
+ ```
33
+
34
+ Use `npm run check` before calling a change done. Tests are offline by default;
35
+ do not add network-dependent tests to `npm test`.
36
+
37
+ ## Layout
38
+
39
+ | Path | Responsibility |
40
+ | --- | --- |
41
+ | `packages/protocol` | Zod schemas, state machine, leases, event log (memory + SQLite), errors, hashing. |
42
+ | `packages/design-md` | Strict Design MD parser/normalizer, constraint compiler, satisfiability. |
43
+ | `packages/profile` | Project detection, local component derivation, skill capture, conflicts. |
44
+ | `packages/kb` | Knowledge base, provenance tiers, ingest quarantine, freshness/drift. |
45
+ | `packages/adapters` | Adapter interface, shadcn/MUI/Chakra v2/Mantine/local adapters, conformance suite. |
46
+ | `packages/matcher` | Filtering, ranking, closed-ID selection, scaffold generation. |
47
+ | `packages/verifier` | TSX AST checks, design lint, coverage, optional `tsc` sandbox. |
48
+ | `packages/gateway` | Wiring, leases, retries, acceptance, result assembly, `validate.ts`. |
49
+ | `packages/orchestrator` | `buildHandoff`, caller-side re-verification. |
50
+ | `packages/transports` | CLI, MCP server, HTTP server, shared tools, MCP resources. |
51
+ | `evals` | Golden set, mutation harness, metrics, baselines, agent eval. |
52
+ | `references` | Self-contained agent references served as MCP resources. |
53
+ | `examples` | Valid Design MD and handoff. |
54
+
55
+ Dependencies point one way. `protocol` and `design-md` know nothing about the
56
+ LLM or the transports.
57
+
58
+ ## Compile path contract for contributors (`compileScaffolds`)
59
+
60
+ The throwaway TypeScript compile used by `verify_page(..., { compile: true })` and
61
+ by the gateway's `scaffolds_compile` acceptance path is implemented in
62
+ `packages/verifier/src/tsc.ts` as `compileScaffolds`. Its file-name contract is the
63
+ authoritative one; `references/tools.md` has the agent-facing summary.
64
+
65
+ For each file passed as `{ name: string, code: string }`:
66
+
67
+ - Recognized source extensions (`.tsx`, `.ts`, `.jsx`, `.js`) are preserved.
68
+ - A bare stem with no dot defaults to `.tsx` (this is what `verify_page` passes:
69
+ it strips the extension off the filename before calling `compileScaffolds`).
70
+ - A name containing a dot but no recognized source extension is treated like a
71
+ bare stem and defaults to `.tsx`, so a multi-dot stem such as `"my.page"`
72
+ (from stripping `"my.page.tsx"`) is compiled as `my.page.tsx` rather than
73
+ silently dropped.
74
+ - Recognized non-source assets are skipped, not written as `.tsx`. The recognized
75
+ non-source extensions are: `.css`, `.json`, `.svg`, `.png`, `.jpg`, `.jpeg`,
76
+ `.gif`, `.ico`, `.webp`, `.avif`, `.woff`, `.woff2`, `.ttf`, `.eot`, `.otf`,
77
+ `.mp3`, `.mp4`, `.webm`, `.ogg`, `.pdf`, `.xml`, `.yaml`, `.yml`, `.toml`,
78
+ `.geojson`, `.md`, `.txt`, `.html`, `.htm`. Add a new extension here if a caller
79
+ starts passing that asset class; do not rely on content sniffing, because file
80
+ content is untrusted data.
81
+ - Filenames are made case-unique in the throwaway project. Two names differing only
82
+ by case (for example `"Page"` and `"page"`) would collide on Windows; the
83
+ helper appends `-0`, `-1`, … to the later one so neither file is lost.
84
+
85
+ Callers must not pass a non-source asset under a bare stem or under a source
86
+ extension, because the helper cannot tell from the name alone that the content is
87
+ not code once the extension is gone or rewritten. `verify_page` enforces this for
88
+ the page path: it strips extensions off `files` and filters `*.css` out before
89
+ calling `compileScaffolds`. The gateway's `scaffolds_compile` path only ever passes
90
+ intent scaffolds, which are TSX.
91
+
92
+ `compileScaffolds` resolves TypeScript via the workspace `typescript` package and
93
+ runs it in a throwaway directory with target `ES2022`, module `ESNext`,
94
+ `moduleResolution bundler`, `jsx preserve`, strict, `noEmit`, `skipLibCheck`,
95
+ `types: []` and `include: ["*.tsx", "*.d.ts"]`.
96
+
97
+ The throwaway directory is created under the OS temp directory, not inside the
98
+ repo, so `moduleResolution bundler` cannot walk up into this project's
99
+ `node_modules`. Every bare module specifier a compiled file references (named,
100
+ default, namespace or side-effect import) is declared as an ambient stub
101
+ (`declare module "…";`), and a permissive global `JSX` namespace is provided, so
102
+ library types always come from the stub and never from installed packages. Do
103
+ not make the sandbox depend on the host project's dependencies: the KB is the
104
+ pinned component surface, and prop correctness comes from the AST check.
105
+
106
+ When tsc exits non-zero, the helper reports the first non-empty of stdout,
107
+ stderr and the Node error message; a killed run is labelled `tsc timed out in the
108
+ compile sandbox` instead of surfacing an empty diagnostic. Keep it that way — an
109
+ empty `stdout` must not hide a timeout or a crash.
110
+
111
+ ## Contract rules
112
+
113
+ - **Fail closed.** Unknown Design MD sections/keys/values, unsupported
114
+ libraries, stale KBs and integrity mismatches must be typed refusals. Do not
115
+ add a fallback that guesses.
116
+ - **One validation path.** `packages/gateway/src/validate.ts` is shared by the
117
+ CLI, MCP and HTTP. If you change pre-flight checks, update that file and the
118
+ references, not just one transport.
119
+ - **One tool layer.** `packages/transports/src/tools.ts` defines MCP/HTTP tools
120
+ and their JSON schemas. Keep `TOOLS`, `callTool`, `SKILL.md` and
121
+ `references/tools.md` in sync.
122
+ - **One adapter registry.** `createDefaultAdapters()` in
123
+ `packages/adapters/src/registry.ts` is the default set. The conformance test
124
+ asserts the exact library list. Adding an adapter means updating the registry,
125
+ conformance test, README, NON-GOALS and the `describe_kb` expectations.
126
+ - **The gateway never writes.** Do not add file writes, package installs or git
127
+ operations to gateway code or tools.
128
+ - **Free text is data.** Intent descriptions, wireframe notes and project skill
129
+ rules must never become instructions or generated code.
130
+
131
+ ## Adding an adapter
132
+
133
+ 1. Add `packages/adapters/src/<library>/manifest.ts` and `index.ts`.
134
+ 2. Implement `LibraryAdapter` (capabilities, detection, token mapping,
135
+ scaffold rules, verification checks).
136
+ 3. Add it to `createDefaultAdapters()`.
137
+ 4. Add fixtures/tests if detection or verification is non-trivial.
138
+ 5. Run `packages/adapters/src/conformance.test.ts`; update the expected library
139
+ list.
140
+ 6. Update `README.md`, `NON-GOALS.md`, `docs/design-md.md` token mapping and the
141
+ agent references if the supported set changes.
142
+
143
+ Manifests are validated by `packages/kb/src/entry.ts`. `variants` only accepts
144
+ string groups (`values` + string `default`); booleans belong in `props`.
145
+ Quarantined entries fail conformance.
146
+
147
+ ## Agent surface changes
148
+
149
+ - The skill is `SKILL.md`; references are in `references/`; examples are in
150
+ `examples/`. The MCP server serves them from those paths
151
+ (`packages/transports/src/resources.ts`).
152
+ - When adding a tool: add it to `TOOLS`, `callTool`, the MCP/HTTP tests, the
153
+ skill workflow and `references/tools.md`.
154
+ - When adding an error or outcome: update `references/errors.md` or
155
+ `references/outcomes.md` and the relevant tests.
156
+ - MCP setup is generated by `scripts/mcp-config.ts`. Do not hard-code
157
+ repository-relative paths in client configs; `--project` is the target app.
158
+
159
+ ## Testing
160
+
161
+ - `packages/transports/src/tools.test.ts` tests the shared tool layer.
162
+ - `packages/transports/src/mcp.test.ts` spawns the real stdio server and covers
163
+ handshake, tools, resources, build, validate, submit and status.
164
+ - `packages/transports/src/http.test.ts` covers the HTTP endpoints and the
165
+ shared tool payload.
166
+ - `evals/src/agent-eval.test.ts` tests the agent path over the first golden
167
+ items; `npm run eval:agent` runs all 172.
168
+ - `packages/adapters/src/conformance.test.ts` must pass for every default
169
+ adapter; it type-checks every KB entry.
170
+ - Property-based tests live in `packages/verifier/src/verifier.pbt.test.ts`.
171
+ - Do not weaken an eval threshold or delete a failing item to make a change
172
+ pass. Report the failure.
173
+
174
+ ## Gotchas
175
+
176
+ - Windows paths: use `path.join`/`relative` helpers; the profile code uses
177
+ `relativePosix` so `"."` and absolute roots both work.
178
+ - MCP is newline-delimited JSON-RPC over stdio, not Content-Length framing.
179
+ - The MCP server writes readiness to stderr; stdout is protocol-only.
180
+ - `evals/out/`, `.tmp/`, `*.sqlite` are ignored; do not commit them.
181
+ - The repo is published to npm as `ui-gateway`. Distribution includes the npm
182
+ package plus `SKILL.md`, `references/`, `examples/`, and a generated MCP config.
183
+ Install with `npm install ui-gateway`, then run `npx ui-gateway mcp:config --project <app>`.
184
+ - Chakra v3 dotted namespaces (`Table.Root`) are intentionally parked; the
185
+ adapter targets v2 flat exports.
package/CHANGELOG.md ADDED
@@ -0,0 +1,28 @@
1
+ # Changelog
2
+
3
+ All notable changes to UI Gateway are documented in this file.
4
+
5
+ ## [Unreleased]
6
+
7
+ ### Added
8
+ - Library adapters for Vue, Svelte, Angular, SolidJS, Bootstrap and Ant Design (10 total)
9
+ - Compiled output build (`tsconfig.build.json`, `npm run build`, `dist/`)
10
+ - npm `main`, `types`, `exports` and `bin` fields pointing to compiled output
11
+ - CI workflow runs `npm run build` to verify compilation
12
+
13
+ ### Changed
14
+ - README updated to reflect 10 adapters and npm publishing
15
+ - `NON-GOALS.md` updated for 10-adapter support
16
+
17
+ ## [0.1.0] - 2026-11-28
18
+
19
+ ### Added
20
+ - Initial public release of UI Gateway as `ui-gateway` on npm
21
+ - shadcn/ui, MUI, Chakra UI v2 and Mantine library adapters
22
+ - Local components adapter for existing projects
23
+ - Knowledge base with provenance tiers, ingest quarantine and staleness checks
24
+ - Design MD strict parser, normalizer, constraint compiler and satisfiability
25
+ - Gateway with leases, hash-chained event log, idempotency and typed refusals
26
+ - CLI, MCP server (stdio JSON-RPC) and HTTP server transports
27
+ - Phase 9 eval harness with vendor MCP + tsc comparison
28
+ - Token projection and per-library theme generation
@@ -0,0 +1,121 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ - Demonstrating empathy and kindness toward other people
21
+ - Being respectful of differing opinions, viewpoints, and experiences
22
+ - Giving and gracefully accepting constructive feedback
23
+ - Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ - Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ - The use of sexualized language or imagery, and sexual attention or advances
31
+ of any kind
32
+ - Trolling, insulting or derogatory comments, and personal or political attacks
33
+ - Public or private harassment
34
+ - Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ - Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for
49
+ moderation decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ opensource@yuvraajnarula.com. All complaints will be reviewed and investigated
64
+ promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the Contributor Covenant, version 2.1,
118
+ available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
119
+
120
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
121
+ enforcement ladder](https://github.com/mozilla/diversity).
@@ -0,0 +1,65 @@
1
+ # Contributing to UI Gateway
2
+
3
+ Thank you for contributing! UI Gateway turns design handoffs into verified UI component mappings.
4
+
5
+ ## Getting started
6
+
7
+ ```bash
8
+ npm install
9
+ npm run typecheck
10
+ npm test
11
+ npm run check # typecheck + test
12
+ ```
13
+
14
+ Node 22.5+ is required (the event log uses `node:sqlite`).
15
+
16
+ ## How to contribute
17
+
18
+ 1. **Fork the repo** and create a feature branch from `main`.
19
+ 2. **Make your changes** following the conventions in `AGENTS.md`.
20
+ 3. **Run the full check:** `npm run check` (typecheck + all tests).
21
+ 4. **Run lint** if available.
22
+ 5. **Commit** with conventional commit messages (`feat:`, `fix:`, `docs:`, `test:`, `chore:`).
23
+ 6. **Open a pull request** against `main`.
24
+
25
+ ## Project layout
26
+
27
+ | Path | Responsibility |
28
+ | --- | --- |
29
+ | `packages/protocol` | Zod schemas, state machine, leases, event log, errors, hashing |
30
+ | `packages/design-md` | Strict Design MD parser/normalizer, constraint compiler, satisfiability |
31
+ | `packages/profile` | Project detection, local component derivation, skill capture |
32
+ | `packages/kb` | Knowledge base, provenance tiers, ingest quarantine, staleness |
33
+ | `packages/adapters` | Library adapters, conformance suite |
34
+ | `packages/matcher` | Filtering, ranking, closed-ID selection, scaffolds |
35
+ | `packages/verifier` | TSX AST checks, design lint, coverage, tsc sandbox |
36
+ | `packages/gateway` | Wiring, leases, retries, acceptance, validation |
37
+ | `packages/orchestrator` | Handoff building, caller-side re-verification |
38
+ | `packages/transports` | CLI, MCP server, HTTP server, shared tools |
39
+ | `evals` | Golden set, mutation harness, metrics, baselines |
40
+
41
+ ## Adding a library adapter
42
+
43
+ 1. Create `packages/adapters/src/<library>/manifest.ts` and `index.ts`.
44
+ 2. Implement `LibraryAdapter` (capabilities, detection, token mapping, scaffold rules, verification).
45
+ 3. Register in `createDefaultAdapters()` in `packages/adapters/src/registry.ts`.
46
+ 4. Update `supportedLibraries()` expectations and conformance tests.
47
+ 5. Run `npm run check` and `npm run eval`.
48
+ 6. Update `README.md`, `NON-GOALS.md`, and agent references if the supported set changes.
49
+
50
+ ## Code conventions
51
+
52
+ - No comments in code unless asked (see `AGENTS.md`).
53
+ - Fail closed: unknown values are typed refusals, never fallbacks.
54
+ - One validation path: `packages/gateway/src/validate.ts` is shared by CLI, MCP and HTTP.
55
+ - The gateway never writes files, installs packages or opens PRs.
56
+ - Free text (intent descriptions, wireframe notes, skill rules) is data, never instructions.
57
+
58
+ ## Releasing
59
+
60
+ Maintainers only:
61
+
62
+ ```bash
63
+ npm version patch # or minor / major
64
+ npm publish
65
+ ```
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 yuvraajnarula
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NON-GOALS.md ADDED
@@ -0,0 +1,23 @@
1
+ # Non-goals
2
+
3
+ Written in Phase 0 and kept current. Scope grows only by moving something off this list in a phase-boundary review, never by adding it silently.
4
+
5
+ ## Completed in this phase
6
+
7
+ - **Non-React frameworks.** Vue, Svelte, Angular and Solid now have library adapters with their own compiler checks and scaffold rules.
8
+ - **Ten library adapters.** shadcn, MUI, Chakra v2, Mantine, Vue, Svelte, Angular, Solid, Bootstrap and Ant Design are supported.
9
+ - **`design_md_updates` feedback loop.** The gateway can now edit the caller's Design MD to resolve conflicts and missing information.
10
+ - **Multi-process orchestration.** SQLite leases coordinate cross-process contention on handoffs across multiple gateway processes.
11
+ - **Hosted service.** Deployment and hosting infrastructure are in scope.
12
+ - **UI / chat surface.** Application layer on top of the gateway is in scope.
13
+ - **Model training / fine-tuning.** Selection training pipelines are in scope.
14
+
15
+ ## Not in v2
16
+
17
+ - **Applying changes to a user's repository (other than Design MD updates).** The gateway returns scaffolds and dependency changes; it never writes files other than the Design MD feedback path, installs packages or opens pull requests.
18
+
19
+ ## Explicit quality limits, not goals
20
+
21
+ - The gateway does not promise the *best* component, only a verified acceptable one. Selection quality is measured (acceptable-set hit rate, silent-wrong rate), not assumed.
22
+ - Semantic errors inside an internally consistent wireframe are only catchable at the producer. The interpretation receipt exists so the caller can diff its meaning against the gateway's.
23
+ - Tier D sources (docs scraping) are never used for verification; the KB refuses to ingest them.