@xemahq/ui-kernel 0.9.2 → 0.11.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 (392) hide show
  1. package/dist/lib/biome-host/agent-validation.d.ts.map +1 -1
  2. package/dist/lib/biome-host/agent-validation.js +26 -13
  3. package/dist/lib/biome-host/agent-validation.js.map +1 -1
  4. package/dist/lib/biome-host/biome-registry.d.ts.map +1 -1
  5. package/dist/lib/biome-host/biome-registry.js +27 -10
  6. package/dist/lib/biome-host/biome-registry.js.map +1 -1
  7. package/dist/lib/biome-host/biome-scope-hooks.d.ts.map +1 -1
  8. package/dist/lib/biome-host/biome-scope-hooks.js +2 -1
  9. package/dist/lib/biome-host/biome-scope-hooks.js.map +1 -1
  10. package/dist/lib/biome-host/biome-scoped-query.d.ts.map +1 -1
  11. package/dist/lib/biome-host/biome-scoped-query.js +5 -3
  12. package/dist/lib/biome-host/biome-scoped-query.js.map +1 -1
  13. package/dist/lib/biome-host/frontend-biome.d.ts +1 -1
  14. package/dist/lib/biome-host/frontend-biome.d.ts.map +1 -1
  15. package/dist/lib/biome-host/host-bridge.d.ts +1 -1
  16. package/dist/lib/biome-host/host-bridge.d.ts.map +1 -1
  17. package/dist/lib/biome-host/host-bridge.js.map +1 -1
  18. package/dist/lib/biome-host/i18n-hooks.d.ts.map +1 -1
  19. package/dist/lib/biome-host/i18n-hooks.js.map +1 -1
  20. package/dist/lib/biome-host/index.d.ts +0 -1
  21. package/dist/lib/biome-host/index.d.ts.map +1 -1
  22. package/dist/lib/biome-host/index.js +0 -1
  23. package/dist/lib/biome-host/index.js.map +1 -1
  24. package/dist/lib/biome-host/realtime-hooks.d.ts.map +1 -1
  25. package/dist/lib/biome-host/realtime-hooks.js.map +1 -1
  26. package/dist/lib/biome-host/session-contributions.d.ts +10 -5
  27. package/dist/lib/biome-host/session-contributions.d.ts.map +1 -1
  28. package/dist/lib/biome-host/use-mutation-with-error-toast.d.ts.map +1 -1
  29. package/dist/lib/biome-host/use-mutation-with-error-toast.js +3 -2
  30. package/dist/lib/biome-host/use-mutation-with-error-toast.js.map +1 -1
  31. package/dist/lib/biome-host/use-page-state.d.ts.map +1 -1
  32. package/dist/lib/biome-host/use-page-state.js +19 -10
  33. package/dist/lib/biome-host/use-page-state.js.map +1 -1
  34. package/dist/lib/capabilities/capability-provider.d.ts +1 -1
  35. package/dist/lib/capabilities/capability-provider.d.ts.map +1 -1
  36. package/dist/lib/capabilities/capability-provider.js +2 -2
  37. package/dist/lib/capabilities/capability-provider.js.map +1 -1
  38. package/dist/lib/capabilities/use-capability.d.ts +1 -1
  39. package/dist/lib/capabilities/use-capability.d.ts.map +1 -1
  40. package/dist/lib/capabilities/use-capability.js +2 -1
  41. package/dist/lib/capabilities/use-capability.js.map +1 -1
  42. package/dist/lib/contribution-registry/contribution-registry.d.ts.map +1 -1
  43. package/dist/lib/contribution-registry/contribution-registry.js +2 -1
  44. package/dist/lib/contribution-registry/contribution-registry.js.map +1 -1
  45. package/dist/lib/system-bus/deeplink.d.ts.map +1 -1
  46. package/dist/lib/system-bus/deeplink.js +4 -2
  47. package/dist/lib/system-bus/deeplink.js.map +1 -1
  48. package/dist/lib/system-bus/host-ports.d.ts +2 -2
  49. package/dist/lib/system-bus/host-ports.d.ts.map +1 -1
  50. package/dist/lib/system-bus/intent-registry.d.ts.map +1 -1
  51. package/dist/lib/system-bus/intent-registry.js +6 -3
  52. package/dist/lib/system-bus/intent-registry.js.map +1 -1
  53. package/dist/lib/system-bus/intents.d.ts +1 -1
  54. package/dist/lib/system-bus/intents.d.ts.map +1 -1
  55. package/dist/lib/system-bus/palette.d.ts +1 -1
  56. package/dist/lib/system-bus/palette.d.ts.map +1 -1
  57. package/dist/lib/system-bus/system-bus-builder.d.ts.map +1 -1
  58. package/dist/lib/system-bus/system-bus-builder.js +1 -1
  59. package/dist/lib/system-bus/system-bus-builder.js.map +1 -1
  60. package/dist/lib/system-bus/windows.d.ts +1 -1
  61. package/dist/lib/system-bus/windows.d.ts.map +1 -1
  62. package/dist/offline/outbox.d.ts +1 -0
  63. package/dist/offline/outbox.d.ts.map +1 -1
  64. package/dist/offline/outbox.js +4 -1
  65. package/dist/offline/outbox.js.map +1 -1
  66. package/dist/offline/react-hooks.d.ts +1 -1
  67. package/dist/offline/react-hooks.d.ts.map +1 -1
  68. package/dist/offline/react-hooks.js.map +1 -1
  69. package/dist/org-db/components/DbResultTable.d.ts.map +1 -1
  70. package/dist/org-db/components/DbResultTable.js +15 -6
  71. package/dist/org-db/components/DbResultTable.js.map +1 -1
  72. package/dist/registry/lib/agent-validation-host.d.ts.map +1 -1
  73. package/dist/registry/lib/agent-validation-host.js +1 -1
  74. package/dist/registry/lib/agent-validation-host.js.map +1 -1
  75. package/dist/registry/lib/biome-slot.d.ts.map +1 -1
  76. package/dist/registry/lib/biome-slot.js +5 -3
  77. package/dist/registry/lib/biome-slot.js.map +1 -1
  78. package/dist/registry/lib/primitives/SessionEventCard.d.ts.map +1 -1
  79. package/dist/registry/lib/primitives/SessionEventCard.js +14 -2
  80. package/dist/registry/lib/primitives/SessionEventCard.js.map +1 -1
  81. package/dist/registry/lib/primitives/SessionEventTimeline.d.ts.map +1 -1
  82. package/dist/registry/lib/primitives/SessionEventTimeline.js +6 -3
  83. package/dist/registry/lib/primitives/SessionEventTimeline.js.map +1 -1
  84. package/dist/registry/lib/primitives/SessionTabbedDrawer.d.ts.map +1 -1
  85. package/dist/registry/lib/primitives/SessionTabbedDrawer.js +10 -5
  86. package/dist/registry/lib/primitives/SessionTabbedDrawer.js.map +1 -1
  87. package/dist/registry/lib/session-context-builder.d.ts +10 -2
  88. package/dist/registry/lib/session-context-builder.d.ts.map +1 -1
  89. package/dist/registry/lib/session-context-builder.js +14 -7
  90. package/dist/registry/lib/session-context-builder.js.map +1 -1
  91. package/dist/registry/lib/session-context-provider.d.ts +1 -1
  92. package/dist/registry/lib/session-context-provider.d.ts.map +1 -1
  93. package/dist/registry/lib/session-context-provider.js.map +1 -1
  94. package/dist/registry/lib/session-selectors.d.ts.map +1 -1
  95. package/dist/registry/lib/session-selectors.js +35 -20
  96. package/dist/registry/lib/session-selectors.js.map +1 -1
  97. package/dist/session/comments/CommentRail.d.ts.map +1 -1
  98. package/dist/session/comments/CommentRail.js.map +1 -1
  99. package/dist/session/shell/SessionWorkspaceShell.d.ts.map +1 -1
  100. package/dist/session/shell/SessionWorkspaceShell.js.map +1 -1
  101. package/dist/session-kit/approvals/ApprovalCard.d.ts.map +1 -1
  102. package/dist/session-kit/approvals/ApprovalCard.js +6 -2
  103. package/dist/session-kit/approvals/ApprovalCard.js.map +1 -1
  104. package/dist/session-kit/approvals/ApprovalsCenter.d.ts.map +1 -1
  105. package/dist/session-kit/approvals/ApprovalsCenter.js +6 -3
  106. package/dist/session-kit/approvals/ApprovalsCenter.js.map +1 -1
  107. package/dist/session-kit/combobox/Combobox.d.ts.map +1 -1
  108. package/dist/session-kit/combobox/Combobox.js +20 -6
  109. package/dist/session-kit/combobox/Combobox.js.map +1 -1
  110. package/dist/session-kit/display/MD.d.ts.map +1 -1
  111. package/dist/session-kit/display/MD.js +7 -4
  112. package/dist/session-kit/display/MD.js.map +1 -1
  113. package/dist/ui/branding/app-branding-provider.d.ts.map +1 -1
  114. package/dist/ui/branding/app-branding-provider.js.map +1 -1
  115. package/dist/ui/branding/sanitize.d.ts.map +1 -1
  116. package/dist/ui/branding/sanitize.js +12 -6
  117. package/dist/ui/branding/sanitize.js.map +1 -1
  118. package/dist/ui/capture/document-preview.d.ts +1 -1
  119. package/dist/ui/capture/document-preview.d.ts.map +1 -1
  120. package/dist/ui/capture/document-preview.js +8 -6
  121. package/dist/ui/capture/document-preview.js.map +1 -1
  122. package/dist/ui/capture/field-spec-to-zod.d.ts.map +1 -1
  123. package/dist/ui/capture/field-spec-to-zod.js +45 -16
  124. package/dist/ui/capture/field-spec-to-zod.js.map +1 -1
  125. package/dist/ui/capture/field-spec-validate.d.ts.map +1 -1
  126. package/dist/ui/capture/field-spec-validate.js +79 -38
  127. package/dist/ui/capture/field-spec-validate.js.map +1 -1
  128. package/dist/ui/capture/field-spec.d.ts.map +1 -1
  129. package/dist/ui/capture/field-spec.js +17 -6
  130. package/dist/ui/capture/field-spec.js.map +1 -1
  131. package/dist/ui/capture/schema-field-input.d.ts.map +1 -1
  132. package/dist/ui/capture/schema-field-input.js +23 -18
  133. package/dist/ui/capture/schema-field-input.js.map +1 -1
  134. package/dist/ui/capture/schema-form.d.ts +1 -1
  135. package/dist/ui/capture/schema-form.d.ts.map +1 -1
  136. package/dist/ui/capture/schema-form.js +7 -6
  137. package/dist/ui/capture/schema-form.js.map +1 -1
  138. package/dist/ui/capture/use-prefill.d.ts.map +1 -1
  139. package/dist/ui/capture/use-prefill.js +32 -14
  140. package/dist/ui/capture/use-prefill.js.map +1 -1
  141. package/dist/ui/capture/use-schema-validation.d.ts +1 -1
  142. package/dist/ui/capture/use-schema-validation.d.ts.map +1 -1
  143. package/dist/ui/capture/use-schema-validation.js +13 -8
  144. package/dist/ui/capture/use-schema-validation.js.map +1 -1
  145. package/dist/ui/capture/use-wizard.d.ts.map +1 -1
  146. package/dist/ui/capture/use-wizard.js +23 -8
  147. package/dist/ui/capture/use-wizard.js.map +1 -1
  148. package/dist/ui/capture/value-format.d.ts.map +1 -1
  149. package/dist/ui/capture/value-format.js +6 -3
  150. package/dist/ui/capture/value-format.js.map +1 -1
  151. package/dist/ui/capture/wizard.d.ts.map +1 -1
  152. package/dist/ui/capture/wizard.js +3 -3
  153. package/dist/ui/capture/wizard.js.map +1 -1
  154. package/dist/ui/charts/bar-chart.d.ts +1 -1
  155. package/dist/ui/charts/bar-chart.d.ts.map +1 -1
  156. package/dist/ui/charts/bar-chart.js +1 -1
  157. package/dist/ui/charts/bar-chart.js.map +1 -1
  158. package/dist/ui/charts/chart-frame.d.ts +2 -2
  159. package/dist/ui/charts/chart-frame.d.ts.map +1 -1
  160. package/dist/ui/charts/chart-frame.js +4 -3
  161. package/dist/ui/charts/chart-frame.js.map +1 -1
  162. package/dist/ui/charts/chart-utils.d.ts.map +1 -1
  163. package/dist/ui/charts/chart-utils.js +32 -14
  164. package/dist/ui/charts/chart-utils.js.map +1 -1
  165. package/dist/ui/charts/donut-chart.d.ts +1 -1
  166. package/dist/ui/charts/donut-chart.d.ts.map +1 -1
  167. package/dist/ui/charts/donut-chart.js +7 -3
  168. package/dist/ui/charts/donut-chart.js.map +1 -1
  169. package/dist/ui/charts/line-chart.d.ts +1 -1
  170. package/dist/ui/charts/line-chart.d.ts.map +1 -1
  171. package/dist/ui/charts/line-chart.js +7 -4
  172. package/dist/ui/charts/line-chart.js.map +1 -1
  173. package/dist/ui/charts/sparkline.d.ts +1 -1
  174. package/dist/ui/charts/sparkline.d.ts.map +1 -1
  175. package/dist/ui/charts/sparkline.js +10 -6
  176. package/dist/ui/charts/sparkline.js.map +1 -1
  177. package/dist/ui/chrome/AsyncBoundary.d.ts +2 -2
  178. package/dist/ui/chrome/AsyncBoundary.d.ts.map +1 -1
  179. package/dist/ui/chrome/AsyncBoundary.js +3 -3
  180. package/dist/ui/chrome/AsyncBoundary.js.map +1 -1
  181. package/dist/ui/chrome/EmptyState.d.ts +19 -8
  182. package/dist/ui/chrome/EmptyState.d.ts.map +1 -1
  183. package/dist/ui/chrome/EmptyState.js +6 -4
  184. package/dist/ui/chrome/EmptyState.js.map +1 -1
  185. package/dist/ui/chrome/RecordCardList.d.ts +19 -0
  186. package/dist/ui/chrome/RecordCardList.d.ts.map +1 -0
  187. package/dist/ui/chrome/RecordCardList.js +12 -0
  188. package/dist/ui/chrome/RecordCardList.js.map +1 -0
  189. package/dist/ui/chrome/page-shell.d.ts.map +1 -1
  190. package/dist/ui/chrome/page-shell.js +9 -3
  191. package/dist/ui/chrome/page-shell.js.map +1 -1
  192. package/dist/ui/chrome/status-badge.d.ts.map +1 -1
  193. package/dist/ui/chrome/status-badge.js +1 -1
  194. package/dist/ui/chrome/status-badge.js.map +1 -1
  195. package/dist/ui/design-tokens.d.ts +4 -6
  196. package/dist/ui/design-tokens.d.ts.map +1 -1
  197. package/dist/ui/design-tokens.js +17 -11
  198. package/dist/ui/design-tokens.js.map +1 -1
  199. package/dist/ui/index.d.ts +1 -0
  200. package/dist/ui/index.d.ts.map +1 -1
  201. package/dist/ui/index.js +1 -0
  202. package/dist/ui/index.js.map +1 -1
  203. package/dist/ui/primitives/async-combobox.d.ts.map +1 -1
  204. package/dist/ui/primitives/async-combobox.js +4 -2
  205. package/dist/ui/primitives/async-combobox.js.map +1 -1
  206. package/dist/ui/primitives/badge.d.ts +2 -2
  207. package/dist/ui/primitives/badge.d.ts.map +1 -1
  208. package/dist/ui/primitives/badge.js +3 -3
  209. package/dist/ui/primitives/badge.js.map +1 -1
  210. package/dist/ui/primitives/button.d.ts +2 -2
  211. package/dist/ui/primitives/button.d.ts.map +1 -1
  212. package/dist/ui/primitives/button.js +5 -5
  213. package/dist/ui/primitives/button.js.map +1 -1
  214. package/dist/ui/primitives/overflow-tabs.d.ts.map +1 -1
  215. package/dist/ui/primitives/overflow-tabs.js +19 -12
  216. package/dist/ui/primitives/overflow-tabs.js.map +1 -1
  217. package/dist/ui/primitives/preview-device-frame.js +8 -4
  218. package/dist/ui/primitives/preview-device-frame.js.map +1 -1
  219. package/dist/ui/primitives/tag-multi-select.d.ts.map +1 -1
  220. package/dist/ui/primitives/tag-multi-select.js +10 -5
  221. package/dist/ui/primitives/tag-multi-select.js.map +1 -1
  222. package/dist/ui/primitives/url-preview-chrome.d.ts.map +1 -1
  223. package/dist/ui/primitives/url-preview-chrome.js.map +1 -1
  224. package/dist/vista/GenericCatalogueSurface.d.ts.map +1 -1
  225. package/dist/vista/GenericCatalogueSurface.js +5 -3
  226. package/dist/vista/GenericCatalogueSurface.js.map +1 -1
  227. package/dist/vista/VistaPanel.d.ts.map +1 -1
  228. package/dist/vista/VistaPanel.js +8 -4
  229. package/dist/vista/VistaPanel.js.map +1 -1
  230. package/dist/vista/html/CustomUiFrame.d.ts.map +1 -1
  231. package/dist/vista/html/CustomUiFrame.js +2 -1
  232. package/dist/vista/html/CustomUiFrame.js.map +1 -1
  233. package/dist/vista/html/custom-ui-frame-bridge.d.ts.map +1 -1
  234. package/dist/vista/html/custom-ui-frame-bridge.js +6 -3
  235. package/dist/vista/html/custom-ui-frame-bridge.js.map +1 -1
  236. package/dist/vista/html/custom-ui-intents.d.ts.map +1 -1
  237. package/dist/vista/html/custom-ui-intents.js +13 -15
  238. package/dist/vista/html/custom-ui-intents.js.map +1 -1
  239. package/dist/vista/surface-catalogue.d.ts.map +1 -1
  240. package/dist/vista/surface-catalogue.js +6 -3
  241. package/dist/vista/surface-catalogue.js.map +1 -1
  242. package/dist/vista/surfaces/FormSurface.d.ts.map +1 -1
  243. package/dist/vista/surfaces/FormSurface.js +20 -7
  244. package/dist/vista/surfaces/FormSurface.js.map +1 -1
  245. package/dist/vista/surfaces/TableSurface.d.ts.map +1 -1
  246. package/dist/vista/surfaces/TableSurface.js +2 -1
  247. package/dist/vista/surfaces/TableSurface.js.map +1 -1
  248. package/dist/vista/surfaces/blob-surfaces.d.ts.map +1 -1
  249. package/dist/vista/surfaces/blob-surfaces.js +7 -2
  250. package/dist/vista/surfaces/blob-surfaces.js.map +1 -1
  251. package/dist/vista/surfaces/elicitation-transport.d.ts.map +1 -1
  252. package/dist/vista/surfaces/elicitation-transport.js +14 -7
  253. package/dist/vista/surfaces/elicitation-transport.js.map +1 -1
  254. package/dist/vista/surfaces/file-surface-utils.d.ts.map +1 -1
  255. package/dist/vista/surfaces/file-surface-utils.js +8 -4
  256. package/dist/vista/surfaces/file-surface-utils.js.map +1 -1
  257. package/dist/vista/surfaces/register-surfaces.js +2 -1
  258. package/dist/vista/surfaces/register-surfaces.js.map +1 -1
  259. package/dist/vista/surfaces/text-surfaces.d.ts +1 -1
  260. package/dist/vista/surfaces/text-surfaces.d.ts.map +1 -1
  261. package/dist/vista/surfaces/text-surfaces.js +13 -7
  262. package/dist/vista/surfaces/text-surfaces.js.map +1 -1
  263. package/dist/vista/use-vista-tabs.d.ts.map +1 -1
  264. package/dist/vista/use-vista-tabs.js +8 -4
  265. package/dist/vista/use-vista-tabs.js.map +1 -1
  266. package/dist/vista/vista-code-renderer.d.ts.map +1 -1
  267. package/dist/vista/vista-code-renderer.js.map +1 -1
  268. package/dist/vista/vista-file-source.d.ts.map +1 -1
  269. package/dist/vista/vista-file-source.js +9 -5
  270. package/dist/vista/vista-file-source.js.map +1 -1
  271. package/dist/vista/vista-form-host.d.ts.map +1 -1
  272. package/dist/vista/vista-form-host.js +1 -1
  273. package/dist/vista/vista-form-host.js.map +1 -1
  274. package/dist/vista/vista-model.d.ts.map +1 -1
  275. package/dist/vista/vista-model.js +5 -3
  276. package/dist/vista/vista-model.js.map +1 -1
  277. package/dist/vista/vista-open-context.d.ts.map +1 -1
  278. package/dist/vista/vista-open-context.js +1 -1
  279. package/dist/vista/vista-open-context.js.map +1 -1
  280. package/dist/vista/vista-payloads.d.ts.map +1 -1
  281. package/dist/vista/vista-payloads.js +127 -63
  282. package/dist/vista/vista-payloads.js.map +1 -1
  283. package/dist/vista/vista-tabs-manifest.d.ts.map +1 -1
  284. package/dist/vista/vista-tabs-manifest.js +18 -9
  285. package/dist/vista/vista-tabs-manifest.js.map +1 -1
  286. package/dist/vista/vista-tools.d.ts.map +1 -1
  287. package/dist/vista/vista-tools.js +12 -6
  288. package/dist/vista/vista-tools.js.map +1 -1
  289. package/package.json +3 -3
  290. package/src/lib/biome-host/agent-validation.ts +37 -13
  291. package/src/lib/biome-host/biome-registry.ts +48 -13
  292. package/src/lib/biome-host/biome-scope-hooks.ts +3 -1
  293. package/src/lib/biome-host/biome-scoped-query.ts +7 -6
  294. package/src/lib/biome-host/frontend-biome.ts +1 -1
  295. package/src/lib/biome-host/host-bridge.ts +5 -4
  296. package/src/lib/biome-host/i18n-hooks.ts +1 -0
  297. package/src/lib/biome-host/index.ts +0 -1
  298. package/src/lib/biome-host/realtime-hooks.ts +1 -0
  299. package/src/lib/biome-host/session-contributions.ts +22 -19
  300. package/src/lib/biome-host/use-mutation-with-error-toast.ts +4 -2
  301. package/src/lib/biome-host/use-page-state.ts +27 -10
  302. package/src/lib/capabilities/capability-provider.tsx +12 -5
  303. package/src/lib/capabilities/use-capability.ts +8 -4
  304. package/src/lib/contribution-registry/contribution-registry.ts +3 -1
  305. package/src/lib/system-bus/deeplink.ts +14 -4
  306. package/src/lib/system-bus/host-ports.ts +3 -7
  307. package/src/lib/system-bus/intent-registry.ts +12 -8
  308. package/src/lib/system-bus/intents.ts +6 -2
  309. package/src/lib/system-bus/palette.ts +2 -1
  310. package/src/lib/system-bus/system-bus-builder.ts +4 -2
  311. package/src/lib/system-bus/windows.ts +1 -1
  312. package/src/offline/outbox.test.ts +12 -3
  313. package/src/offline/outbox.ts +5 -1
  314. package/src/offline/react-hooks.ts +5 -2
  315. package/src/org-db/components/DbResultTable.tsx +48 -15
  316. package/src/registry/lib/agent-validation-host.ts +1 -2
  317. package/src/registry/lib/biome-slot.tsx +7 -4
  318. package/src/registry/lib/primitives/SessionEventCard.tsx +29 -5
  319. package/src/registry/lib/primitives/SessionEventTimeline.tsx +9 -3
  320. package/src/registry/lib/primitives/SessionTabbedDrawer.tsx +15 -5
  321. package/src/registry/lib/session-context-builder.ts +33 -17
  322. package/src/registry/lib/session-context-provider.tsx +1 -1
  323. package/src/registry/lib/session-selectors.ts +66 -27
  324. package/src/session/comments/CommentRail.tsx +2 -2
  325. package/src/session/shell/SessionWorkspaceShell.tsx +2 -2
  326. package/src/session-kit/approvals/ApprovalCard.tsx +7 -2
  327. package/src/session-kit/approvals/ApprovalsCenter.tsx +13 -4
  328. package/src/session-kit/combobox/Combobox.tsx +42 -11
  329. package/src/session-kit/display/MD.tsx +14 -5
  330. package/src/ui/branding/app-branding-provider.tsx +2 -3
  331. package/src/ui/branding/sanitize.ts +18 -6
  332. package/src/ui/capture/document-preview.tsx +84 -19
  333. package/src/ui/capture/field-spec-to-zod.ts +62 -14
  334. package/src/ui/capture/field-spec-validate.ts +132 -43
  335. package/src/ui/capture/field-spec.test.ts +2 -2
  336. package/src/ui/capture/field-spec.ts +41 -10
  337. package/src/ui/capture/schema-field-input.tsx +218 -38
  338. package/src/ui/capture/schema-form.tsx +54 -13
  339. package/src/ui/capture/use-prefill.ts +50 -17
  340. package/src/ui/capture/use-schema-validation.ts +45 -13
  341. package/src/ui/capture/use-wizard.ts +57 -11
  342. package/src/ui/capture/value-format.ts +14 -4
  343. package/src/ui/capture/wizard.tsx +9 -5
  344. package/src/ui/charts/bar-chart.tsx +8 -4
  345. package/src/ui/charts/chart-frame.tsx +18 -5
  346. package/src/ui/charts/chart-utils.ts +47 -15
  347. package/src/ui/charts/donut-chart.tsx +24 -6
  348. package/src/ui/charts/line-chart.tsx +34 -12
  349. package/src/ui/charts/sparkline.tsx +17 -9
  350. package/src/ui/chrome/AsyncBoundary.tsx +14 -6
  351. package/src/ui/chrome/EmptyState.tsx +116 -43
  352. package/src/ui/chrome/RecordCardList.tsx +98 -0
  353. package/src/ui/chrome/page-shell.tsx +32 -8
  354. package/src/ui/chrome/status-badge.tsx +8 -4
  355. package/src/ui/design-tokens.ts +39 -13
  356. package/src/ui/index.ts +5 -0
  357. package/src/ui/primitives/async-combobox.tsx +7 -3
  358. package/src/ui/primitives/badge.tsx +14 -5
  359. package/src/ui/primitives/button.tsx +13 -6
  360. package/src/ui/primitives/overflow-tabs.tsx +46 -16
  361. package/src/ui/primitives/preview-device-frame.tsx +12 -4
  362. package/src/ui/primitives/tag-multi-select.tsx +30 -9
  363. package/src/ui/primitives/url-preview-chrome.tsx +1 -0
  364. package/src/vista/GenericCatalogueSurface.tsx +7 -5
  365. package/src/vista/VistaPanel.tsx +12 -4
  366. package/src/vista/html/CustomUiFrame.spec.tsx +3 -1
  367. package/src/vista/html/CustomUiFrame.tsx +3 -1
  368. package/src/vista/html/custom-ui-frame-bridge.ts +9 -3
  369. package/src/vista/html/custom-ui-intents.spec.ts +3 -1
  370. package/src/vista/html/custom-ui-intents.ts +19 -15
  371. package/src/vista/surface-catalogue.ts +9 -3
  372. package/src/vista/surfaces/FormSurface.tsx +27 -10
  373. package/src/vista/surfaces/TableSurface.tsx +4 -3
  374. package/src/vista/surfaces/blob-surfaces.tsx +13 -3
  375. package/src/vista/surfaces/elicitation-transport.ts +21 -7
  376. package/src/vista/surfaces/file-surface-utils.ts +11 -4
  377. package/src/vista/surfaces/register-surfaces.tsx +3 -1
  378. package/src/vista/surfaces/text-surfaces.tsx +21 -8
  379. package/src/vista/use-vista-tabs.ts +12 -4
  380. package/src/vista/vista-code-renderer.tsx +6 -5
  381. package/src/vista/vista-file-source.tsx +15 -14
  382. package/src/vista/vista-form-host.tsx +3 -8
  383. package/src/vista/vista-model.ts +10 -3
  384. package/src/vista/vista-open-context.tsx +3 -8
  385. package/src/vista/vista-payloads.ts +186 -63
  386. package/src/vista/vista-tabs-manifest.ts +28 -13
  387. package/src/vista/vista-tools.ts +18 -6
  388. package/dist/lib/biome-host/session-profiles.d.ts +0 -18
  389. package/dist/lib/biome-host/session-profiles.d.ts.map +0 -1
  390. package/dist/lib/biome-host/session-profiles.js +0 -38
  391. package/dist/lib/biome-host/session-profiles.js.map +0 -1
  392. package/src/lib/biome-host/session-profiles.ts +0 -105
@@ -29,7 +29,9 @@ function asRecord(value: unknown): UnknownRecord | null {
29
29
  }
30
30
 
31
31
  function optionalString(value: unknown): string | undefined | null {
32
- if (value === undefined) return undefined;
32
+ if (value === undefined) {
33
+ return undefined;
34
+ }
33
35
  return typeof value === 'string' ? value : null;
34
36
  }
35
37
 
@@ -43,7 +45,9 @@ function exactlyOne(
43
45
  ): Readonly<{ a?: string; b?: string }> | null {
44
46
  const left = typeof a === 'string' ? a : undefined;
45
47
  const right = typeof b === 'string' ? b : undefined;
46
- if ((left === undefined) === (right === undefined)) return null;
48
+ if ((left === undefined) === (right === undefined)) {
49
+ return null;
50
+ }
47
51
  return left === undefined ? { b: right } : { a: left };
48
52
  }
49
53
 
@@ -59,11 +63,17 @@ export interface VistaTextPayload {
59
63
 
60
64
  export function validateTextPayload(raw: unknown): VistaTextPayload | null {
61
65
  const record = asRecord(raw);
62
- if (record === null) return null;
66
+ if (record === null) {
67
+ return null;
68
+ }
63
69
  const source = exactlyOne(record.content, record.path);
64
- if (source === null) return null;
70
+ if (source === null) {
71
+ return null;
72
+ }
65
73
  const language = optionalString(record.language);
66
- if (language === null) return null;
74
+ if (language === null) {
75
+ return null;
76
+ }
67
77
  const base: VistaTextPayload =
68
78
  source.a === undefined ? { path: source.b } : { content: source.a };
69
79
  return language === undefined ? base : { ...base, language };
@@ -83,21 +93,33 @@ export interface VistaBlobPayload {
83
93
 
84
94
  export function validateBlobPayload(raw: unknown): VistaBlobPayload | null {
85
95
  const record = asRecord(raw);
86
- if (record === null) return null;
96
+ if (record === null) {
97
+ return null;
98
+ }
87
99
  const source = exactlyOne(record.url, record.path);
88
- if (source === null) return null;
100
+ if (source === null) {
101
+ return null;
102
+ }
89
103
  const alt = optionalString(record.alt);
90
- if (alt === null) return null;
104
+ if (alt === null) {
105
+ return null;
106
+ }
91
107
  const contentType = optionalString(record.contentType);
92
- if (contentType === null) return null;
108
+ if (contentType === null) {
109
+ return null;
110
+ }
93
111
  const payload: {
94
112
  url?: string;
95
113
  path?: string;
96
114
  alt?: string;
97
115
  contentType?: string;
98
116
  } = source.a === undefined ? { path: source.b } : { url: source.a };
99
- if (alt !== undefined) payload.alt = alt;
100
- if (contentType !== undefined) payload.contentType = contentType;
117
+ if (alt !== undefined) {
118
+ payload.alt = alt;
119
+ }
120
+ if (contentType !== undefined) {
121
+ payload.contentType = contentType;
122
+ }
101
123
  return payload;
102
124
  }
103
125
 
@@ -120,16 +142,24 @@ const PREVIEW_DEVICES: readonly PreviewDevice[] = [
120
142
 
121
143
  export function validateUrlPayload(raw: unknown): VistaUrlPayload | null {
122
144
  const record = asRecord(raw);
123
- if (record === null) return null;
124
- if (typeof record.url !== 'string' || record.url.length === 0) return null;
145
+ if (record === null) {
146
+ return null;
147
+ }
148
+ if (typeof record.url !== 'string' || record.url.length === 0) {
149
+ return null;
150
+ }
125
151
  const payload: { url: string; device?: PreviewDevice; reloadNonce?: number } =
126
152
  { url: record.url };
127
153
  if (record.device !== undefined) {
128
- if (!PREVIEW_DEVICES.includes(record.device as PreviewDevice)) return null;
154
+ if (!PREVIEW_DEVICES.includes(record.device as PreviewDevice)) {
155
+ return null;
156
+ }
129
157
  payload.device = record.device as PreviewDevice;
130
158
  }
131
159
  if (record.reloadNonce !== undefined) {
132
- if (typeof record.reloadNonce !== 'number') return null;
160
+ if (typeof record.reloadNonce !== 'number') {
161
+ return null;
162
+ }
133
163
  payload.reloadNonce = record.reloadNonce;
134
164
  }
135
165
  return payload;
@@ -159,18 +189,30 @@ const SRI_TOKEN = /^sha384-[A-Za-z0-9+/]+={0,2}$/;
159
189
 
160
190
  export function validateHtmlPayload(raw: unknown): VistaHtmlPayload | null {
161
191
  const record = asRecord(raw);
162
- if (record === null) return null;
192
+ if (record === null) {
193
+ return null;
194
+ }
163
195
  const hasDocument = typeof record.document === 'string';
164
196
  const hasChunk = typeof record.compiledOutput === 'string';
165
- if (hasDocument === hasChunk) return null;
166
- if (hasDocument) return { document: record.document as string };
197
+ if (hasDocument === hasChunk) {
198
+ return null;
199
+ }
200
+ if (hasDocument) {
201
+ return { document: record.document as string };
202
+ }
167
203
  // A compiled chunk WITHOUT a well-formed integrity token is rejected: the
168
204
  // CSP hash source is what makes executing it safe, so there is no
169
205
  // "run it unpinned" path.
170
- if (typeof record.integrity !== 'string' || !SRI_TOKEN.test(record.integrity))
206
+ if (
207
+ typeof record.integrity !== 'string' ||
208
+ !SRI_TOKEN.test(record.integrity)
209
+ ) {
171
210
  return null;
211
+ }
172
212
  const styleCss = optionalString(record.styleCss);
173
- if (styleCss === null) return null;
213
+ if (styleCss === null) {
214
+ return null;
215
+ }
174
216
  const payload = {
175
217
  compiledOutput: record.compiledOutput as string,
176
218
  integrity: record.integrity,
@@ -185,8 +227,12 @@ export interface VistaJsonPayload {
185
227
 
186
228
  export function validateJsonPayload(raw: unknown): VistaJsonPayload | null {
187
229
  const record = asRecord(raw);
188
- if (record === null) return null;
189
- if (!('data' in record)) return null;
230
+ if (record === null) {
231
+ return null;
232
+ }
233
+ if (!('data' in record)) {
234
+ return null;
235
+ }
190
236
  return { data: record.data };
191
237
  }
192
238
 
@@ -198,11 +244,18 @@ export interface VistaTablePayload {
198
244
 
199
245
  export function validateTablePayload(raw: unknown): VistaTablePayload | null {
200
246
  const record = asRecord(raw);
201
- if (record === null) return null;
202
- if (!Array.isArray(record.columns) || !Array.isArray(record.rows))
247
+ if (record === null) {
203
248
  return null;
204
- if (!record.columns.every((c) => typeof c === 'string')) return null;
205
- if (!record.rows.every((r) => Array.isArray(r))) return null;
249
+ }
250
+ if (!Array.isArray(record.columns) || !Array.isArray(record.rows)) {
251
+ return null;
252
+ }
253
+ if (!record.columns.every((c) => typeof c === 'string')) {
254
+ return null;
255
+ }
256
+ if (!record.rows.every((r) => Array.isArray(r))) {
257
+ return null;
258
+ }
206
259
  return {
207
260
  columns: record.columns,
208
261
  rows: record.rows as readonly (readonly unknown[])[],
@@ -242,22 +295,36 @@ const CHART_KINDS: readonly string[] = Object.values(VistaChartKind);
242
295
 
243
296
  export function validateChartPayload(raw: unknown): VistaChartPayload | null {
244
297
  const record = asRecord(raw);
245
- if (record === null) return null;
246
- if (typeof record.kind !== 'string' || !CHART_KINDS.includes(record.kind))
298
+ if (record === null) {
247
299
  return null;
248
- if (typeof record.title !== 'string' || record.title.length === 0)
300
+ }
301
+ if (typeof record.kind !== 'string' || !CHART_KINDS.includes(record.kind)) {
302
+ return null;
303
+ }
304
+ if (typeof record.title !== 'string' || record.title.length === 0) {
249
305
  return null;
250
- if (!Array.isArray(record.series) || record.series.length === 0) return null;
306
+ }
307
+ if (!Array.isArray(record.series) || record.series.length === 0) {
308
+ return null;
309
+ }
251
310
  const series: VistaChartSeries[] = [];
252
311
  for (const entry of record.series) {
253
312
  const row = asRecord(entry);
254
- if (row === null || typeof row.name !== 'string') return null;
255
- if (!Array.isArray(row.points)) return null;
313
+ if (row === null || typeof row.name !== 'string') {
314
+ return null;
315
+ }
316
+ if (!Array.isArray(row.points)) {
317
+ return null;
318
+ }
256
319
  const points: VistaChartDatum[] = [];
257
320
  for (const point of row.points) {
258
321
  const p = asRecord(point);
259
- if (p === null || typeof p.label !== 'string') return null;
260
- if (typeof p.value !== 'number') return null;
322
+ if (p === null || typeof p.label !== 'string') {
323
+ return null;
324
+ }
325
+ if (typeof p.value !== 'number') {
326
+ return null;
327
+ }
261
328
  points.push({ label: p.label, value: p.value });
262
329
  }
263
330
  series.push({ name: row.name, points });
@@ -290,21 +357,31 @@ export interface VistaFilesPayload {
290
357
 
291
358
  export function validateFilesPayload(raw: unknown): VistaFilesPayload | null {
292
359
  const record = asRecord(raw);
293
- if (record === null) return null;
294
- if (!Array.isArray(record.files)) return null;
360
+ if (record === null) {
361
+ return null;
362
+ }
363
+ if (!Array.isArray(record.files)) {
364
+ return null;
365
+ }
295
366
  const files: VistaFileEntry[] = [];
296
367
  for (const entry of record.files) {
297
368
  const row = asRecord(entry);
298
- if (row === null || typeof row.path !== 'string') return null;
369
+ if (row === null || typeof row.path !== 'string') {
370
+ return null;
371
+ }
299
372
  const file: { path: string; add?: number; del?: number } = {
300
373
  path: row.path,
301
374
  };
302
375
  if (row.add !== undefined) {
303
- if (typeof row.add !== 'number') return null;
376
+ if (typeof row.add !== 'number') {
377
+ return null;
378
+ }
304
379
  file.add = row.add;
305
380
  }
306
381
  if (row.del !== undefined) {
307
- if (typeof row.del !== 'number') return null;
382
+ if (typeof row.del !== 'number') {
383
+ return null;
384
+ }
308
385
  file.del = row.del;
309
386
  }
310
387
  files.push(file);
@@ -325,7 +402,9 @@ export function validateBiomeRoutePayload(
325
402
  raw: unknown,
326
403
  ): VistaBiomeRoutePayload | null {
327
404
  const record = asRecord(raw);
328
- if (record === null) return null;
405
+ if (record === null) {
406
+ return null;
407
+ }
329
408
  return typeof record.deeplink === 'string' && record.deeplink.length > 0
330
409
  ? { deeplink: record.deeplink }
331
410
  : null;
@@ -338,7 +417,9 @@ export interface VistaObjectPayload {
338
417
 
339
418
  export function validateObjectPayload(raw: unknown): VistaObjectPayload | null {
340
419
  const record = asRecord(raw);
341
- if (record === null) return null;
420
+ if (record === null) {
421
+ return null;
422
+ }
342
423
  return typeof record.ref === 'string' && record.ref.length > 0
343
424
  ? { ref: record.ref }
344
425
  : null;
@@ -354,14 +435,23 @@ export interface VistaGraphPayload {
354
435
 
355
436
  export function validateGraphPayload(raw: unknown): VistaGraphPayload | null {
356
437
  const record = asRecord(raw);
357
- if (record === null) return null;
438
+ if (record === null) {
439
+ return null;
440
+ }
358
441
  const anchorRef = optionalString(record.anchorRef);
359
- if (anchorRef === null) return null;
360
- if (record.depth !== undefined && typeof record.depth !== 'number')
442
+ if (anchorRef === null) {
361
443
  return null;
444
+ }
445
+ if (record.depth !== undefined && typeof record.depth !== 'number') {
446
+ return null;
447
+ }
362
448
  const payload: { anchorRef?: string; depth?: number } = {};
363
- if (anchorRef !== undefined) payload.anchorRef = anchorRef;
364
- if (record.depth !== undefined) payload.depth = record.depth;
449
+ if (anchorRef !== undefined) {
450
+ payload.anchorRef = anchorRef;
451
+ }
452
+ if (record.depth !== undefined) {
453
+ payload.depth = record.depth;
454
+ }
365
455
  return payload;
366
456
  }
367
457
 
@@ -373,7 +463,9 @@ export interface VistaWebPayload {
373
463
 
374
464
  export function validateWebPayload(raw: unknown): VistaWebPayload | null {
375
465
  const record = asRecord(raw);
376
- if (record === null) return null;
466
+ if (record === null) {
467
+ return null;
468
+ }
377
469
  return typeof record.href === 'string' && record.href.startsWith('/')
378
470
  ? { href: record.href }
379
471
  : null;
@@ -436,31 +528,47 @@ export function isValidVistaFormRef(value: unknown): value is string {
436
528
 
437
529
  export function validateFormPayload(raw: unknown): VistaFormPayload | null {
438
530
  const record = asRecord(raw);
439
- if (record === null) return null;
531
+ if (record === null) {
532
+ return null;
533
+ }
440
534
  // The service generates base64url refs. Keeping the accepted alphabet closed
441
535
  // makes the ref safe as exactly one URL path segment; dot segments, slashes,
442
536
  // percent escapes and Unicode lookalikes are all rejected.
443
537
  if (!isValidVistaFormRef(record.ref)) {
444
538
  return null;
445
539
  }
446
- if (typeof record.purpose !== 'string') return null;
540
+ if (typeof record.purpose !== 'string') {
541
+ return null;
542
+ }
447
543
  // Deliberately reject the old contract rather than silently ignoring its
448
544
  // payload-selected network targets.
449
- if ('submitUrl' in record || 'statusUrl' in record) return null;
545
+ if ('submitUrl' in record || 'statusUrl' in record) {
546
+ return null;
547
+ }
450
548
 
451
549
  const fields = validateCaptureFields(record.fields);
452
- if (fields === null) return null;
550
+ if (fields === null) {
551
+ return null;
552
+ }
453
553
 
454
554
  const heading = optionalString(record.heading);
455
- if (heading === null) return null;
555
+ if (heading === null) {
556
+ return null;
557
+ }
456
558
  const submitLabel = optionalString(record.submitLabel);
457
- if (submitLabel === null) return null;
559
+ if (submitLabel === null) {
560
+ return null;
561
+ }
458
562
 
459
563
  let launch: VistaFormLaunch | undefined;
460
564
  if (record.launch !== undefined) {
461
565
  const raw_ = asRecord(record.launch);
462
- if (raw_ === null) return null;
463
- if ('url' in raw_) return null;
566
+ if (raw_ === null) {
567
+ return null;
568
+ }
569
+ if ('url' in raw_) {
570
+ return null;
571
+ }
464
572
  if (
465
573
  typeof raw_.path !== 'string' ||
466
574
  !raw_.path.startsWith('/') ||
@@ -469,9 +577,13 @@ export function validateFormPayload(raw: unknown): VistaFormPayload | null {
469
577
  ) {
470
578
  return null;
471
579
  }
472
- if (typeof raw_.label !== 'string' || raw_.label.length === 0) return null;
580
+ if (typeof raw_.label !== 'string' || raw_.label.length === 0) {
581
+ return null;
582
+ }
473
583
  const hint = optionalString(raw_.hint);
474
- if (hint === null) return null;
584
+ if (hint === null) {
585
+ return null;
586
+ }
475
587
  launch =
476
588
  hint === undefined
477
589
  ? { path: raw_.path, label: raw_.label }
@@ -486,9 +598,15 @@ export function validateFormPayload(raw: unknown): VistaFormPayload | null {
486
598
  submitLabel?: string;
487
599
  launch?: VistaFormLaunch;
488
600
  } = { ref: record.ref, purpose: record.purpose, fields };
489
- if (heading !== undefined) payload.heading = heading;
490
- if (submitLabel !== undefined) payload.submitLabel = submitLabel;
491
- if (launch !== undefined) payload.launch = launch;
601
+ if (heading !== undefined) {
602
+ payload.heading = heading;
603
+ }
604
+ if (submitLabel !== undefined) {
605
+ payload.submitLabel = submitLabel;
606
+ }
607
+ if (launch !== undefined) {
608
+ payload.launch = launch;
609
+ }
492
610
  return payload;
493
611
  }
494
612
 
@@ -501,11 +619,16 @@ export interface VistaAppPayload {
501
619
 
502
620
  export function validateAppPayload(raw: unknown): VistaAppPayload | null {
503
621
  const record = asRecord(raw);
504
- if (record === null) return null;
505
- if (typeof record.appId !== 'string' || record.appId.length === 0)
622
+ if (record === null) {
623
+ return null;
624
+ }
625
+ if (typeof record.appId !== 'string' || record.appId.length === 0) {
506
626
  return null;
627
+ }
507
628
  const path = optionalString(record.path);
508
- if (path === null) return null;
629
+ if (path === null) {
630
+ return null;
631
+ }
509
632
  return path === undefined
510
633
  ? { appId: record.appId }
511
634
  : { appId: record.appId, path };
@@ -67,23 +67,30 @@ export interface VistaTabsManifestOptions {
67
67
  readonly pathPrefix: string;
68
68
  }
69
69
 
70
- function parseEntry(
71
- entry: unknown,
72
- pathPrefix: string,
73
- ): VistaTabSpec | null {
74
- if (!entry || typeof entry !== 'object') return null;
70
+ function parseEntry(entry: unknown, pathPrefix: string): VistaTabSpec | null {
71
+ if (!entry || typeof entry !== 'object') {
72
+ return null;
73
+ }
75
74
  const record = entry as Record<string, unknown>;
76
- if (typeof record.path !== 'string') return null;
75
+ if (typeof record.path !== 'string') {
76
+ return null;
77
+ }
77
78
  // Containment: inside the artifact prefix, and no traversal out of it.
78
- if (!record.path.startsWith(pathPrefix)) return null;
79
- if (record.path.includes('..')) return null;
79
+ if (!record.path.startsWith(pathPrefix)) {
80
+ return null;
81
+ }
82
+ if (record.path.includes('..')) {
83
+ return null;
84
+ }
80
85
  const kind =
81
86
  typeof record.kind === 'string'
82
87
  ? (record.kind as SurfaceKind)
83
88
  : surfaceKindForPath(record.path);
84
89
  // `files` is UI-owned (the pinned file browser) and must never be declared by
85
90
  // the agent — an out-of-set kind rejects the whole manifest.
86
- if (!DECLARABLE_SURFACE_KINDS.includes(kind)) return null;
91
+ if (!DECLARABLE_SURFACE_KINDS.includes(kind)) {
92
+ return null;
93
+ }
87
94
  const label = typeof record.label === 'string' ? record.label : undefined;
88
95
  return label === undefined
89
96
  ? { path: record.path, kind }
@@ -105,14 +112,22 @@ export function parseVistaTabsManifest(
105
112
  } catch {
106
113
  return null;
107
114
  }
108
- if (!parsed || typeof parsed !== 'object') return null;
115
+ if (!parsed || typeof parsed !== 'object') {
116
+ return null;
117
+ }
109
118
  const record = parsed as Record<string, unknown>;
110
- if (record.version !== 1) return null;
111
- if (!Array.isArray(record.tabs)) return null;
119
+ if (record.version !== 1) {
120
+ return null;
121
+ }
122
+ if (!Array.isArray(record.tabs)) {
123
+ return null;
124
+ }
112
125
  const tabs: VistaTabSpec[] = [];
113
126
  for (const entry of record.tabs) {
114
127
  const tab = parseEntry(entry, pathPrefix);
115
- if (tab === null) return null;
128
+ if (tab === null) {
129
+ return null;
130
+ }
116
131
  tabs.push(tab);
117
132
  }
118
133
  const selectedPath =
@@ -142,15 +142,21 @@ export function dispatchVistaTool(
142
142
  switch (tool) {
143
143
  case VistaToolName.Open: {
144
144
  const parsed = VistaOpenArgsSchema.safeParse(args);
145
- if (!parsed.success) return invalid(parsed.error);
145
+ if (!parsed.success) {
146
+ return invalid(parsed.error);
147
+ }
146
148
  return { ok: true, value: { tabId: controller.open(parsed.data) } };
147
149
  }
148
150
  case VistaToolName.Update: {
149
151
  const parsed = VistaUpdateArgsSchema.safeParse(args);
150
- if (!parsed.success) return invalid(parsed.error);
152
+ if (!parsed.success) {
153
+ return invalid(parsed.error);
154
+ }
151
155
  const { tabId, ...patch } = parsed.data;
152
156
  const refusal = refusalFor(controller, tabId);
153
- if (refusal !== null) return refusal;
157
+ if (refusal !== null) {
158
+ return refusal;
159
+ }
154
160
  if (!controller.update(tabId, patch)) {
155
161
  // The tab is listed but not opened-tab-owned: it is a HOST tab, and a
156
162
  // patch to it would be overwritten by the host's next reconcile.
@@ -164,10 +170,14 @@ export function dispatchVistaTool(
164
170
  }
165
171
  case VistaToolName.Close: {
166
172
  const parsed = VistaCloseArgsSchema.safeParse(args);
167
- if (!parsed.success) return invalid(parsed.error);
173
+ if (!parsed.success) {
174
+ return invalid(parsed.error);
175
+ }
168
176
  const { tabId } = parsed.data;
169
177
  const refusal = refusalFor(controller, tabId);
170
- if (refusal !== null) return refusal;
178
+ if (refusal !== null) {
179
+ return refusal;
180
+ }
171
181
  if (!controller.close(tabId)) {
172
182
  return {
173
183
  ok: false,
@@ -179,7 +189,9 @@ export function dispatchVistaTool(
179
189
  }
180
190
  case VistaToolName.List: {
181
191
  const parsed = VistaListArgsSchema.safeParse(args ?? {});
182
- if (!parsed.success) return invalid(parsed.error);
192
+ if (!parsed.success) {
193
+ return invalid(parsed.error);
194
+ }
183
195
  return { ok: true, value: { tabs: controller.list() } };
184
196
  }
185
197
  default:
@@ -1,18 +0,0 @@
1
- export declare const SessionCapabilities: {
2
- readonly HasGit: "hasGit";
3
- readonly HasWorkspaceFiles: "hasWorkspaceFiles";
4
- readonly SupportsKbPush: "supportsKbPush";
5
- readonly HasArtifacts: "hasArtifacts";
6
- readonly SupportsForking: "supportsForking";
7
- readonly SupportsSharing: "supportsSharing";
8
- };
9
- export type SessionCapability = (typeof SessionCapabilities)[keyof typeof SessionCapabilities];
10
- export interface SessionProfileDescriptor {
11
- readonly key: string;
12
- readonly biomeId: string;
13
- readonly label: string;
14
- readonly description?: string;
15
- readonly capabilities: readonly string[];
16
- }
17
- export declare function useSessionProfileDescriptor(biomeId: string | undefined, profileKey: string | undefined): SessionProfileDescriptor;
18
- //# sourceMappingURL=session-profiles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session-profiles.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/session-profiles.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,mBAAmB;;;;;;;CAatB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE,MAAM,WAAW,wBAAwB;IAKvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAcD,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,wBAAwB,CA2B1B"}
@@ -1,38 +0,0 @@
1
- import { useMemo } from 'react';
2
- import { biomeRegistry, useBiomeRegistryRevision } from './biome-registry';
3
- export const SessionCapabilities = {
4
- HasGit: 'hasGit',
5
- HasWorkspaceFiles: 'hasWorkspaceFiles',
6
- SupportsKbPush: 'supportsKbPush',
7
- HasArtifacts: 'hasArtifacts',
8
- SupportsForking: 'supportsForking',
9
- SupportsSharing: 'supportsSharing',
10
- };
11
- export function useSessionProfileDescriptor(biomeId, profileKey) {
12
- const revision = useBiomeRegistryRevision();
13
- return useMemo(() => {
14
- const fallback = {
15
- key: profileKey ?? 'unknown',
16
- biomeId: biomeId ?? 'unknown',
17
- label: profileKey ?? 'Unknown profile',
18
- capabilities: [],
19
- };
20
- if (!profileKey)
21
- return fallback;
22
- let crossPluginMatch;
23
- for (const biome of biomeRegistry.list()) {
24
- for (const profile of biome.session?.profiles ?? []) {
25
- if (profile.key !== profileKey)
26
- continue;
27
- if (biomeId !== null &&
28
- biomeId !== undefined &&
29
- profile.biomeId === biomeId) {
30
- return profile;
31
- }
32
- crossPluginMatch ??= profile;
33
- }
34
- }
35
- return crossPluginMatch ?? fallback;
36
- }, [revision, biomeId, profileKey]);
37
- }
38
- //# sourceMappingURL=session-profiles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session-profiles.js","sourceRoot":"","sources":["../../../src/lib/biome-host/session-profiles.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAU3E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAEjC,MAAM,EAAE,QAAQ;IAEhB,iBAAiB,EAAE,mBAAmB;IAEtC,cAAc,EAAE,gBAAgB;IAEhC,YAAY,EAAE,cAAc;IAE5B,eAAe,EAAE,iBAAiB;IAElC,eAAe,EAAE,iBAAiB;CAC1B,CAAC;AAgCX,MAAM,UAAU,2BAA2B,CACzC,OAA2B,EAC3B,UAA8B;IAE9B,MAAM,QAAQ,GAAG,wBAAwB,EAAE,CAAC;IAC5C,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,MAAM,QAAQ,GAA6B;YACzC,GAAG,EAAE,UAAU,IAAI,SAAS;YAC5B,OAAO,EAAE,OAAO,IAAI,SAAS;YAC7B,KAAK,EAAE,UAAU,IAAI,iBAAiB;YACtC,YAAY,EAAE,EAAE;SACjB,CAAC;QACF,IAAI,CAAC,UAAU;YAAE,OAAO,QAAQ,CAAC;QACjC,IAAI,gBAAsD,CAAC;QAC3D,KAAK,MAAM,KAAK,IAAI,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC;YACzC,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,CAAC;gBACpD,IAAI,OAAO,CAAC,GAAG,KAAK,UAAU;oBAAE,SAAS;gBACzC,IACE,OAAO,KAAK,IAAI;oBAChB,OAAO,KAAK,SAAS;oBACrB,OAAO,CAAC,OAAO,KAAK,OAAO,EAC3B,CAAC;oBACD,OAAO,OAAO,CAAC;gBACjB,CAAC;gBACD,gBAAgB,KAAK,OAAO,CAAC;YAC/B,CAAC;QACH,CAAC;QACD,OAAO,gBAAgB,IAAI,QAAQ,CAAC;IAEtC,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AACtC,CAAC"}