@lobu/runtime-server 24.8.0 → 24.10.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 (272) hide show
  1. package/dist/catalogs/automations.json +2 -2
  2. package/dist/catalogs/connectors.json +99 -10
  3. package/dist/catalogs/skills.json +1 -1
  4. package/dist/component.json +1 -1
  5. package/dist/connectors/README.md +6 -2
  6. package/dist/connectors/github.ts +16 -3
  7. package/dist/connectors/market_quotes.ts +388 -91
  8. package/dist/connectors/postgres.ts +60 -38
  9. package/dist/connectors/whatsapp-web-adapter.js +41 -10
  10. package/dist/connectors/whatsapp-web-helpers.ts +12 -2
  11. package/dist/connectors/whatsapp_web.ts +18 -2
  12. package/dist/connectors/x-dm-adapter.js +55 -21
  13. package/dist/connectors/x.ts +1 -1
  14. package/dist/db/migrations/20261109010000_workspace_navigation.sql +14 -0
  15. package/dist/db/migrations/20261110010000_view_resources.sql +11 -0
  16. package/dist/db/migrations/20261112210000_instance_identity.sql +18 -0
  17. package/dist/dependencies.bun.lock +88 -86
  18. package/dist/embeddings-server.mjs +38 -5
  19. package/dist/owletto/dist/assets/_-CYvj1y65.js +3 -0
  20. package/dist/owletto/dist/assets/_-CeLTSYYY.js +2 -0
  21. package/dist/owletto/dist/assets/_agentId-BB5E-L6T.js +2 -0
  22. package/dist/owletto/dist/assets/_agentId-DN0EwMAC.js +2 -0
  23. package/dist/owletto/dist/assets/_automationId-DvUl9CSd.js +2 -0
  24. package/dist/owletto/dist/assets/_connectorKey._connectionId-CVKfL9AG.js +2 -0
  25. package/dist/owletto/dist/assets/_connectorKey.index-Cv6FzK1v.js +2 -0
  26. package/dist/owletto/dist/assets/{_conversationId-OJrZjd0o.js → _conversationId-CPpNySjO.js} +2 -2
  27. package/dist/owletto/dist/assets/_eventId-DZKicuq6.js +2 -0
  28. package/dist/owletto/dist/assets/_owner-Dauk3YuD.js +3 -0
  29. package/dist/owletto/dist/assets/_shape-cKrEID3T.js +2 -0
  30. package/dist/owletto/dist/assets/_slug-DJx_8fsV.js +2 -0
  31. package/dist/owletto/dist/assets/_viewKey-CPVzVKEf.js +2 -0
  32. package/dist/owletto/dist/assets/_viewKey-CW8gexOQ.js +2 -0
  33. package/dist/owletto/dist/assets/accept-invitation-Dwq1GAnG.js +2 -0
  34. package/dist/owletto/dist/assets/activity-route-location-C1jcXC7v.js +2 -0
  35. package/dist/owletto/dist/assets/activity-route-view-D78Wj0RH.js +2 -0
  36. package/dist/owletto/dist/assets/agent-connect-pages-DoI9UR0a.js +4 -0
  37. package/dist/owletto/dist/assets/{agent-editor-form-CDAHRNWl.js → agent-editor-form-DlavYg2q.js} +2 -2
  38. package/dist/owletto/dist/assets/{agent-loading-shells-BupiSjR-.js → agent-loading-shells-DYqQphN7.js} +2 -2
  39. package/dist/owletto/dist/assets/agent-permissions-matrix-C1L8IcYR.js +2 -0
  40. package/dist/owletto/dist/assets/{agent-skill-context-B0ZYVE3n.js → agent-skill-context-D1nMrVod.js} +2 -2
  41. package/dist/owletto/dist/assets/{agent-subpage-shell-ByU0xhXn.js → agent-subpage-shell-2w7vTeXw.js} +2 -2
  42. package/dist/owletto/dist/assets/{agent-thread-DiVKn1WX.js → agent-thread-BopD-2k1.js} +2 -2
  43. package/dist/owletto/dist/assets/{app._appId-BQWElSoP.js → app._appId-BXeFXW1w.js} +2 -2
  44. package/dist/owletto/dist/assets/{assist-composer-igTXq3DL.js → assist-composer-CL5x8pNt.js} +2 -2
  45. package/dist/owletto/dist/assets/automation-run-now-MtxUTfzd.js +2 -0
  46. package/dist/owletto/dist/assets/{callback-Dmaio9CX.js → callback-BgfwP1Eo.js} +2 -2
  47. package/dist/owletto/dist/assets/{card-rE4Ctuy6.js → card-DtLIFq7D.js} +2 -2
  48. package/dist/owletto/dist/assets/{claim-BN17CPYh.js → claim-CT3hYVMF.js} +2 -2
  49. package/dist/owletto/dist/assets/{client-activity-scopes-B7xVaUA-.js → client-activity-scopes-BPbRX-Pe.js} +2 -2
  50. package/dist/owletto/dist/assets/{client-rows-B3LULJxW.js → client-rows-vrNA6FLs.js} +2 -2
  51. package/dist/owletto/dist/assets/clients-xnzZeEdZ.js +2 -0
  52. package/dist/owletto/dist/assets/{code-editor-UppEMWpt.js → code-editor-mrKkAfcE.js} +2 -2
  53. package/dist/owletto/dist/assets/connect-NUCSay8X.js +2 -0
  54. package/dist/owletto/dist/assets/{connect-menu-B9u86bb2.js → connect-menu-C6iVtuSo.js} +2 -2
  55. package/dist/owletto/dist/assets/connect._clientId-Cp-d9Q5b.js +2 -0
  56. package/dist/owletto/dist/assets/{connected._clientId-CaF-ZWlZ.js → connected._clientId-ROfVgp9h.js} +2 -2
  57. package/dist/owletto/dist/assets/connection-BMz740Wi.js +2 -0
  58. package/dist/owletto/dist/assets/{connection-feed-detail-CJYqryAV.js → connection-feed-detail-0VAJiZTP.js} +2 -2
  59. package/dist/owletto/dist/assets/connector-page-shell-BFv21yuv.js +2 -0
  60. package/dist/owletto/dist/assets/{connector-provenance-CW4CXtCz.js → connector-provenance-b59RfBtk.js} +2 -2
  61. package/dist/owletto/dist/assets/connectors-nYS31lO2.js +2 -0
  62. package/dist/owletto/dist/assets/consent-cPRF9JQv.js +2 -0
  63. package/dist/owletto/dist/assets/{copy-button-1ALlvZU1.js → copy-button-C3wMMv63.js} +2 -2
  64. package/dist/owletto/dist/assets/{core.esm-6koO33th.js → core.esm-C9QlSrgK.js} +3 -3
  65. package/dist/owletto/dist/assets/{create-kUevP9Xx.js → create-ASRN3Obq.js} +2 -2
  66. package/dist/owletto/dist/assets/create-CBcodaSO.js +2 -0
  67. package/dist/owletto/dist/assets/create-CGOWfMk4.js +2 -0
  68. package/dist/owletto/dist/assets/{create-automation-form-BhujNbRr.js → create-automation-form-CLicoPH5.js} +3 -3
  69. package/dist/owletto/dist/assets/create._connectorKey-s4xkktTC.js +2 -0
  70. package/dist/owletto/dist/assets/{custom-guardrail-edits-B_aCgvoZ.js → custom-guardrail-edits-BUL7nmuO.js} +2 -2
  71. package/dist/owletto/dist/assets/{definition-comparison-3zKUSTt8.js → definition-comparison-4UYMI6BK.js} +2 -2
  72. package/dist/owletto/dist/assets/{detail-page-skeleton-BmxqqIsH.js → detail-page-skeleton-C8v3rJXK.js} +2 -2
  73. package/dist/owletto/dist/assets/device-BBwsOi7q.js +2 -0
  74. package/dist/owletto/dist/assets/device-pin-tombstone-Bcpe7nAA.js +2 -0
  75. package/dist/owletto/dist/assets/{device._deviceId-Dqtmb1Xp.js → device._deviceId-DLT4jh0Z.js} +2 -2
  76. package/dist/owletto/dist/assets/{dynamic-schema-form-D3KnzCsW.js → dynamic-schema-form-BDT8x0Vg.js} +2 -2
  77. package/dist/owletto/dist/assets/entity-options-B9hm9V87.js +2 -0
  78. package/dist/owletto/dist/assets/entity-page-DZjzQ2V4.js +2 -0
  79. package/dist/owletto/dist/assets/entity-pages-BWBpttz3.js +2 -0
  80. package/dist/owletto/dist/assets/entity-schema-graph-lMMx3HhR.js +2 -0
  81. package/dist/owletto/dist/assets/{entity-type-page-CouHZbc9.js → entity-type-page-CkQm0yEu.js} +2 -2
  82. package/dist/owletto/dist/assets/event-detail-CkzfakTK.js +2 -0
  83. package/dist/owletto/dist/assets/events-feed-DmRzikZW.js +2 -0
  84. package/dist/owletto/dist/assets/filter-editors-CQoSj-20.js +3 -0
  85. package/dist/owletto/dist/assets/{full-page-spinner-B7A6Ycyi.js → full-page-spinner-CYyCnKve.js} +2 -2
  86. package/dist/owletto/dist/assets/index-BE7eb2kE.js +2 -0
  87. package/dist/owletto/dist/assets/index-BFR0uiKY.js +2 -0
  88. package/dist/owletto/dist/assets/{index-DXfYVs5m.js → index-BS5Ty3tf.js} +2 -2
  89. package/dist/owletto/dist/assets/index-C38OzBpB.js +2 -0
  90. package/dist/owletto/dist/assets/{index-BztXeLBN.js → index-C3hz9tzx.js} +2 -2
  91. package/dist/owletto/dist/assets/index-CDyFQ32o.js +2 -0
  92. package/dist/owletto/dist/assets/{index-B-dZruj6.js → index-CUndAH6o.js} +2 -2
  93. package/dist/owletto/dist/assets/index-CiKysEhV.js +2 -0
  94. package/dist/owletto/dist/assets/index-DByaMzsG.js +7906 -0
  95. package/dist/owletto/dist/assets/index-DfdinB7B.js +2 -0
  96. package/dist/owletto/dist/assets/index-DgMM4Zt5.css +1 -0
  97. package/dist/owletto/dist/assets/index-Xk711gVC.js +2 -0
  98. package/dist/owletto/dist/assets/index-ittfA0k8.js +2 -0
  99. package/dist/owletto/dist/assets/{json-diff-CJK-gzCt.js → json-diff-mcDgyct_.js} +2 -2
  100. package/dist/owletto/dist/assets/{list-skeleton-bQAZ0hQp.js → list-skeleton-DsYGUHxi.js} +2 -2
  101. package/dist/owletto/dist/assets/login-EoLq136v.js +2 -0
  102. package/dist/owletto/dist/assets/{logout-H0F3IfiO.js → logout-gLgEQOiX.js} +2 -2
  103. package/dist/owletto/dist/assets/{member-scope-gate-Doic_6qX.js → member-scope-gate-vvkgSAb2.js} +2 -2
  104. package/dist/owletto/dist/assets/memory-browse-page-DvDtwrEI.js +74 -0
  105. package/dist/owletto/dist/assets/{model-selector-BrfaDwIg.js → model-selector-D3vSMLO2.js} +2 -2
  106. package/dist/owletto/dist/assets/needs-you-list-B5Bgd05M.js +2 -0
  107. package/dist/owletto/dist/assets/new-BPW3V0Y1.js +2 -0
  108. package/dist/owletto/dist/assets/new-Bk_flKQO.js +2 -0
  109. package/dist/owletto/dist/assets/new-C5HtQdM_.js +2 -0
  110. package/dist/owletto/dist/assets/new-dLXsCHBd.js +2 -0
  111. package/dist/owletto/dist/assets/organization-DBfgBkzq.js +2 -0
  112. package/dist/owletto/dist/assets/peek-pane-content-c2PG3TEX.js +2 -0
  113. package/dist/owletto/dist/assets/{pending-seed-DYYOoCvj.js → pending-seed-CBhx2Ql-.js} +2 -2
  114. package/dist/owletto/dist/assets/{proposal-review-shell-BVwOMoq9.js → proposal-review-shell-B-jYcKfB.js} +2 -2
  115. package/dist/owletto/dist/assets/public-shell-ready-D8TijlRY.js +2 -0
  116. package/dist/owletto/dist/assets/record-activity-DnRVOrG2.js +2 -0
  117. package/dist/owletto/dist/assets/{record-session-KuEDuF3S.js → record-session-CAmGHMyM.js} +2 -2
  118. package/dist/owletto/dist/assets/{renderer-ucwCQmBk.js → renderer-olRv_HMI.js} +3 -3
  119. package/dist/owletto/dist/assets/reset-password-B9_xi8Pq.js +2 -0
  120. package/dist/owletto/dist/assets/{run-initiator-8vdkq-3o.js → run-initiator-DhE5v4z0.js} +2 -2
  121. package/dist/owletto/dist/assets/runs-C8sZQr4o.js +2 -0
  122. package/dist/owletto/dist/assets/runs-list-CwtH-wmk.js +2 -0
  123. package/dist/owletto/dist/assets/{schema-value-CefbtPIY.js → schema-value-zTJGE4eh.js} +3 -3
  124. package/dist/owletto/dist/assets/scoped-feed-bar-BKyJSa3_.js +2 -0
  125. package/dist/owletto/dist/assets/{settings-DvzkRYQy.js → settings-z02cvVS3.js} +2 -2
  126. package/dist/owletto/dist/assets/source-record-panels-CGmKIJdN.js +2 -0
  127. package/dist/owletto/dist/assets/{status-variants-BxHtpMOj.js → status-variants-DyRCXBzM.js} +2 -2
  128. package/dist/owletto/dist/assets/subDays-D8nHthaS.js +2 -0
  129. package/dist/owletto/dist/assets/{table-1O-ik4_O.js → table-C637cQxG.js} +2 -2
  130. package/dist/owletto/dist/assets/use-automations-CgWNoYio.js +2 -0
  131. package/dist/owletto/dist/assets/use-login-redirect-tDdhXTpt.js +2 -0
  132. package/dist/owletto/dist/assets/{use-mention-search-CA-evCDf.js → use-mention-search-D-kIKchD.js} +2 -2
  133. package/dist/owletto/dist/assets/view-param-filters-CUCj9Df-.js +2 -0
  134. package/dist/owletto/dist/assets/views-access-required-C35Dyt91.js +2 -0
  135. package/dist/owletto/dist/index.html +19 -12
  136. package/dist/server-main.bundle.mjs +6964 -4213
  137. package/npm-shrinkwrap.json +423 -406
  138. package/package.json +1 -1
  139. package/vendor/connector-sdk/dist/connector-types.d.ts +29 -2
  140. package/vendor/connector-sdk/dist/index.d.ts +1 -0
  141. package/vendor/connector-sdk/dist/index.js +1 -0
  142. package/vendor/connector-sdk/dist/ip-reachability.d.ts +1 -1
  143. package/vendor/connector-sdk/dist/ip-reachability.js +1 -1
  144. package/vendor/connector-sdk/dist/logger.d.ts +1 -1
  145. package/vendor/connector-sdk/dist/logger.js +1 -1
  146. package/vendor/connector-sdk/dist/reaction-client-types.d.ts +3 -1
  147. package/vendor/connector-sdk/dist/retry.d.ts +1 -1
  148. package/vendor/connector-sdk/dist/retry.js +1 -1
  149. package/vendor/connector-sdk/dist/source-withheld-error.d.ts +16 -0
  150. package/vendor/connector-sdk/dist/source-withheld-error.js +19 -0
  151. package/vendor/connector-sdk/package.json +1 -1
  152. package/vendor/core/dist/classify-error.d.ts +4 -5
  153. package/vendor/core/dist/classify-error.js +10 -10
  154. package/vendor/core/dist/contracts/tools/collection-presentation.d.ts +17 -1
  155. package/vendor/core/dist/contracts/tools/collection-presentation.js +27 -3
  156. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +67 -3
  157. package/vendor/core/dist/contracts/tools/manage-automations.js +38 -9
  158. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +1 -1
  159. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +8 -0
  160. package/vendor/core/dist/contracts/tools/manage-entity.js +11 -3
  161. package/vendor/core/dist/contracts/tools/manage-views.d.ts +249 -7
  162. package/vendor/core/dist/contracts/tools/manage-views.js +83 -21
  163. package/vendor/core/dist/contracts/tools/navigation.d.ts +248 -0
  164. package/vendor/core/dist/contracts/tools/navigation.js +284 -0
  165. package/vendor/core/dist/contracts/tools/save-memory.d.ts +11 -1
  166. package/vendor/core/dist/contracts/tools/save-memory.js +25 -3
  167. package/vendor/core/dist/contracts/tools/search-memory.js +1 -1
  168. package/vendor/core/dist/contracts/tools/view-attach.d.ts +7 -0
  169. package/vendor/core/dist/contracts/tools/view-attach.js +15 -0
  170. package/vendor/core/dist/contracts/tools/view-content-hash.d.ts +4 -1
  171. package/vendor/core/dist/contracts/tools/view-content-hash.js +4 -2
  172. package/vendor/core/dist/contracts/tools/view-definition.d.ts +2 -0
  173. package/vendor/core/dist/contracts/tools/view-definition.js +52 -0
  174. package/vendor/core/dist/contracts/tools/view-host.d.ts +68 -0
  175. package/vendor/core/dist/contracts/tools/view-host.js +28 -1
  176. package/vendor/core/dist/contracts/tools/view-scope.d.ts +31 -0
  177. package/vendor/core/dist/contracts/tools/view-scope.js +45 -0
  178. package/vendor/core/dist/credentials.d.ts +12 -0
  179. package/vendor/core/dist/credentials.js +1 -0
  180. package/vendor/core/dist/errors.d.ts +17 -24
  181. package/vendor/core/dist/errors.js +19 -26
  182. package/vendor/core/dist/types.d.ts +0 -6
  183. package/vendor/core/dist/worker/auth.d.ts +5 -0
  184. package/vendor/core/dist/worker/auth.js +15 -4
  185. package/vendor/core/package.json +11 -1
  186. package/vendor/postgres/cf/src/connection.js +7 -2
  187. package/vendor/postgres/cjs/src/connection.js +7 -2
  188. package/vendor/postgres/src/connection.js +7 -2
  189. package/vendor/views/dist/api.d.ts +30 -5
  190. package/vendor/views/dist/api.js +22 -8
  191. package/vendor/views/dist/bridge.d.ts +17 -0
  192. package/vendor/views/dist/bridge.js +49 -1
  193. package/vendor/views/dist/components.d.ts +27 -5
  194. package/vendor/views/dist/components.js +57 -7
  195. package/vendor/views/dist/embed.d.ts +98 -0
  196. package/vendor/views/dist/embed.js +418 -0
  197. package/vendor/views/dist/index.d.ts +3 -1
  198. package/vendor/views/dist/index.js +1 -0
  199. package/vendor/views/dist/native.d.ts +33 -1
  200. package/vendor/views/dist/native.js +3 -0
  201. package/vendor/views/package.json +1 -1
  202. package/dist/owletto/dist/assets/_-B0tmXZ86.js +0 -2
  203. package/dist/owletto/dist/assets/_-DwXULq4r.js +0 -3
  204. package/dist/owletto/dist/assets/_agentId-B1dNkhnr.js +0 -2
  205. package/dist/owletto/dist/assets/_agentId-sYjvnBaB.js +0 -2
  206. package/dist/owletto/dist/assets/_automationId-Bnw_CnT_.js +0 -2
  207. package/dist/owletto/dist/assets/_connectorKey._connectionId-D7Z8DQ-B.js +0 -2
  208. package/dist/owletto/dist/assets/_connectorKey.index-DM5MTO8c.js +0 -2
  209. package/dist/owletto/dist/assets/_eventId-CfB0_2zK.js +0 -2
  210. package/dist/owletto/dist/assets/_owner-BDvTUY0a.js +0 -3
  211. package/dist/owletto/dist/assets/_shape-BZidoJMB.js +0 -2
  212. package/dist/owletto/dist/assets/_slug-R989vOiM.js +0 -2
  213. package/dist/owletto/dist/assets/_viewKey-BDUSrpe5.js +0 -2
  214. package/dist/owletto/dist/assets/_viewKey-BnFqh5-t.js +0 -2
  215. package/dist/owletto/dist/assets/accept-invitation-BC-ZIsrf.js +0 -2
  216. package/dist/owletto/dist/assets/activity-route-view-CN2dOiCD.js +0 -2
  217. package/dist/owletto/dist/assets/agent-connect-pages-CdDjrHjn.js +0 -4
  218. package/dist/owletto/dist/assets/agent-permissions-matrix-ju7L2M0l.js +0 -2
  219. package/dist/owletto/dist/assets/automation-detail-content-BJwRU6qT.js +0 -2
  220. package/dist/owletto/dist/assets/clients-CydgUHrc.js +0 -2
  221. package/dist/owletto/dist/assets/connect-OdHpIVV9.js +0 -2
  222. package/dist/owletto/dist/assets/connect._clientId-EI1tcdSE.js +0 -2
  223. package/dist/owletto/dist/assets/connection-D8ZAMHBT.js +0 -2
  224. package/dist/owletto/dist/assets/connector-boxes-BWPXijAk.js +0 -2
  225. package/dist/owletto/dist/assets/connector-page-shell-C23dWdKz.js +0 -2
  226. package/dist/owletto/dist/assets/connectors-Bp08_KPq.js +0 -2
  227. package/dist/owletto/dist/assets/consent-_PpYI1cT.js +0 -2
  228. package/dist/owletto/dist/assets/create-DULVO0HS.js +0 -2
  229. package/dist/owletto/dist/assets/create-Drx9tcnG.js +0 -2
  230. package/dist/owletto/dist/assets/create._connectorKey-N6fhcIPy.js +0 -2
  231. package/dist/owletto/dist/assets/device-D2eUt_nr.js +0 -2
  232. package/dist/owletto/dist/assets/device-pin-tombstone-BFPbTM_o.js +0 -2
  233. package/dist/owletto/dist/assets/entity-options-IUdQ-64R.js +0 -2
  234. package/dist/owletto/dist/assets/entity-page-B3Im65EI.js +0 -2
  235. package/dist/owletto/dist/assets/entity-pages-DJNSQrfB.js +0 -2
  236. package/dist/owletto/dist/assets/event-detail-CvaRN1qB.js +0 -2
  237. package/dist/owletto/dist/assets/events-feed-DwOkLk6A.js +0 -2
  238. package/dist/owletto/dist/assets/filter-editors-DQ5V4Cvh.js +0 -2
  239. package/dist/owletto/dist/assets/home-stream-Bg97PUBJ.js +0 -2
  240. package/dist/owletto/dist/assets/home-toolbar-CpCcHA6z.js +0 -2
  241. package/dist/owletto/dist/assets/index-9PGnv4-5.js +0 -2
  242. package/dist/owletto/dist/assets/index-C2TCKJDP.js +0 -7901
  243. package/dist/owletto/dist/assets/index-C7QM3aqU.js +0 -2
  244. package/dist/owletto/dist/assets/index-CWn46a4y.js +0 -2
  245. package/dist/owletto/dist/assets/index-CxJONizf.js +0 -2
  246. package/dist/owletto/dist/assets/index-DJhb3li3.js +0 -2
  247. package/dist/owletto/dist/assets/index-DY-YGnCe.js +0 -2
  248. package/dist/owletto/dist/assets/index-j3v7ITPb.js +0 -2
  249. package/dist/owletto/dist/assets/index-oiy6ygaI.js +0 -2
  250. package/dist/owletto/dist/assets/index-pEgtAY1t.js +0 -2
  251. package/dist/owletto/dist/assets/index-xAvK3IyQ.css +0 -1
  252. package/dist/owletto/dist/assets/login-DLqL54Rk.js +0 -2
  253. package/dist/owletto/dist/assets/memory-browse-page-CUea2Llz.js +0 -74
  254. package/dist/owletto/dist/assets/new-5GkxlOuQ.js +0 -2
  255. package/dist/owletto/dist/assets/new-BiA4DGoN.js +0 -2
  256. package/dist/owletto/dist/assets/new-M-MX_T5C.js +0 -2
  257. package/dist/owletto/dist/assets/organization-CLrcmgNK.js +0 -2
  258. package/dist/owletto/dist/assets/peek-pane-content-B29OcHwm.js +0 -2
  259. package/dist/owletto/dist/assets/public-shell-ready-BbjPgh3k.js +0 -2
  260. package/dist/owletto/dist/assets/record-activity-BCpNKaUo.js +0 -2
  261. package/dist/owletto/dist/assets/reset-password-BkiAmXZW.js +0 -2
  262. package/dist/owletto/dist/assets/runs-B_iywKWb.js +0 -2
  263. package/dist/owletto/dist/assets/runs-list-CJJFRhTl.js +0 -2
  264. package/dist/owletto/dist/assets/schema-type-editor-panel-C4e8pq1A.js +0 -2
  265. package/dist/owletto/dist/assets/scoped-feed-bar-CapleZvS.js +0 -2
  266. package/dist/owletto/dist/assets/source-record-panels-LJIWGtHb.js +0 -2
  267. package/dist/owletto/dist/assets/subDays-DwIOMzYC.js +0 -2
  268. package/dist/owletto/dist/assets/use-automations-lV8PuE8L.js +0 -2
  269. package/dist/owletto/dist/assets/use-login-redirect-CfCbEeJR.js +0 -2
  270. package/dist/owletto/dist/assets/view-param-filters-Bp84PUMd.js +0 -2
  271. package/dist/owletto/dist/assets/views-access-required-BerT4Z1d.js +0 -2
  272. /package/vendor/postgres/{.bun-tag-c81dacd34e959a7a → .bun-tag-652f2580b8090d71} +0 -0
@@ -180,11 +180,16 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
180
180
  : (query = q, query.active = true)
181
181
 
182
182
  build(q)
183
- return write(toBuffer(q))
183
+ const written = write(toBuffer(q))
184
+ // BEGIN must reserve its connection even when this write fills the
185
+ // pipeline or reports backpressure. The hook's result still controls
186
+ // whether the pool may schedule another query on this connection.
187
+ const executed = !q.options.onexecute || q.options.onexecute(connection)
188
+ return written
184
189
  && !q.describeFirst
185
190
  && !q.cursorFn
186
191
  && sent.length < max_pipeline
187
- && (!q.options.onexecute || q.options.onexecute(connection))
192
+ && executed
188
193
  } catch (error) {
189
194
  sent.length === 0 && write(Sync)
190
195
  errored(error)
@@ -178,11 +178,16 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
178
178
  : (query = q, query.active = true)
179
179
 
180
180
  build(q)
181
- return write(toBuffer(q))
181
+ const written = write(toBuffer(q))
182
+ // BEGIN must reserve its connection even when this write fills the
183
+ // pipeline or reports backpressure. The hook's result still controls
184
+ // whether the pool may schedule another query on this connection.
185
+ const executed = !q.options.onexecute || q.options.onexecute(connection)
186
+ return written
182
187
  && !q.describeFirst
183
188
  && !q.cursorFn
184
189
  && sent.length < max_pipeline
185
- && (!q.options.onexecute || q.options.onexecute(connection))
190
+ && executed
186
191
  } catch (error) {
187
192
  sent.length === 0 && write(Sync)
188
193
  errored(error)
@@ -178,11 +178,16 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
178
178
  : (query = q, query.active = true)
179
179
 
180
180
  build(q)
181
- return write(toBuffer(q))
181
+ const written = write(toBuffer(q))
182
+ // BEGIN must reserve its connection even when this write fills the
183
+ // pipeline or reports backpressure. The hook's result still controls
184
+ // whether the pool may schedule another query on this connection.
185
+ const executed = !q.options.onexecute || q.options.onexecute(connection)
186
+ return written
182
187
  && !q.describeFirst
183
188
  && !q.cursorFn
184
189
  && sent.length < max_pipeline
185
- && (!q.options.onexecute || q.options.onexecute(connection))
190
+ && executed
186
191
  } catch (error) {
187
192
  sent.length === 0 && write(Sync)
188
193
  errored(error)
@@ -145,9 +145,33 @@ export interface ViewDefinition {
145
145
  * no attach/detach verbs. */
146
146
  attach: Attachment[];
147
147
  params?: Record<string, ParamDef>;
148
- actions?: Record<string, {
149
- emits: string;
150
- }>;
148
+ actions?: Record<string, ActionDef>;
149
+ /** External origins the view may load images from, such as a map tile
150
+ * server: bare https origins with a public hostname and no path
151
+ * (`"https://tile.openstreetmap.org"`), at most 8. Images only is a
152
+ * save-time check (the validator renders the empty, error and loading
153
+ * states), not a runtime limit: MCP hosts receive these as
154
+ * `resourceDomains`, which also allows scripts, styles, fonts and media
155
+ * from them, and the Lobu web app applies no runtime CSP to views. Declare
156
+ * only image or tile CDN origins you trust. */
157
+ resources?: string[];
158
+ }
159
+ /** A declared action: the event kind it emits, the entity fields it may
160
+ * update, or both (committed in one transaction). */
161
+ export interface ActionDef {
162
+ emits?: string;
163
+ /** Submit `{ entity_id, set: { field: value } }` as the action value. The
164
+ * view must attach to `entityType`. Stamped (x-lobu-stamps) fields are
165
+ * server-owned and refused. */
166
+ updates?: {
167
+ entityType: string;
168
+ fields: string[];
169
+ };
170
+ }
171
+ export interface ActionOptions {
172
+ /** For an `updates` action: metadata field -> the value this view read.
173
+ * The server checks it under the row lock and refuses a stale write (409). */
174
+ expected?: Record<string, unknown>;
151
175
  }
152
176
  export declare function defineView(def: ViewDefinition): ViewDefinition;
153
177
  export declare function useParams(): readonly [
@@ -264,8 +288,9 @@ export interface ActionResult {
264
288
  /** Mint one id for a deliberate submission, retained by its retry closure. */
265
289
  export declare function mintInteractionId(): string;
266
290
  /** Submit a declared action. Failed acknowledgements expose an explicit retry
267
- * that keeps the original value, event subject and interaction id. */
268
- export declare function useAction(name: string): (value?: Record<string, unknown>) => Promise<ActionResult>;
291
+ * that keeps the original value, expected values, event subject and
292
+ * interaction id. */
293
+ export declare function useAction(name: string): (value?: Record<string, unknown>, options?: ActionOptions) => Promise<ActionResult>;
269
294
  export declare function defaultsFor(def: ViewDefinition): Params;
270
295
  export declare function coerceParams(def: ViewDefinition, raw: unknown): Params;
271
296
  export declare function coerceScope(raw: unknown): Scope;
@@ -2,6 +2,7 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Component, createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, } from "react";
3
3
  import { createRoot } from "react-dom/client";
4
4
  import { ViewBridge, ViewBridgeError, } from "./bridge.js";
5
+ import { EmbedProvider, EmbedRegistry } from "./embed.js";
5
6
  export function defineView(def) {
6
7
  if (!def || typeof def.key !== "string" || def.key.length === 0) {
7
8
  throw new Error("defineView({ key, attach, ... }) requires a non-empty key");
@@ -302,13 +303,14 @@ export function mintInteractionId() {
302
303
  return `${Date.now()}-${Math.floor(Math.random() * 1e9)}`;
303
304
  }
304
305
  /** Submit a declared action. Failed acknowledgements expose an explicit retry
305
- * that keeps the original value, event subject and interaction id. */
306
+ * that keeps the original value, expected values, event subject and
307
+ * interaction id. */
306
308
  export function useAction(name) {
307
309
  const rt = useRuntime();
308
310
  if (!rt.def.actions?.[name]) {
309
311
  throw new Error(`Action "${name}" is not declared on view "${rt.def.key}"`);
310
312
  }
311
- return useCallback(async (value = {}) => {
313
+ return useCallback(async (value = {}, options = {}) => {
312
314
  if (!rt.ready) {
313
315
  return {
314
316
  ok: false,
@@ -325,6 +327,9 @@ export function useAction(name) {
325
327
  view: rt.def.key,
326
328
  action: name,
327
329
  value,
330
+ ...(options.expected === undefined
331
+ ? {}
332
+ : { expected: options.expected }),
328
333
  ...(rt.scope.event === undefined
329
334
  ? {}
330
335
  : { scope: { event: rt.scope.event } }),
@@ -446,9 +451,10 @@ function applyTheme(theme) {
446
451
  /**
447
452
  * The MCP Apps standard style variables (`McpUiStyleVariableKey`, protocol
448
453
  * `2026-01-26`). A host sends any subset in `hostContext.styles.variables`;
449
- * the shell's tokens (`--fg`, `--muted`, `--border`, `--accent`, the font and
450
- * radii) derive from them, so a view takes the host's look. Built from the
451
- * spec's own axes rather than imported: the guest carries no ext-apps code.
454
+ * the shell's shadcn tokens (`--foreground`, `--muted-foreground`, `--muted`,
455
+ * `--accent`, `--border`, the font and radii) derive from them, so a view takes
456
+ * the host's look. Built from the spec's own axes rather than imported: the
457
+ * guest carries no ext-apps code.
452
458
  */
453
459
  const SEMANTIC = ["primary", "secondary", "tertiary", "inverse", "ghost"];
454
460
  const STATUS = ["info", "danger", "success", "warning"];
@@ -512,7 +518,7 @@ class RenderBoundary extends Component {
512
518
  render() {
513
519
  if (!this.state.error)
514
520
  return this.props.children;
515
- return (_jsxs("div", { role: "alert", "data-lobu-render-error": "true", style: { padding: 12, color: "var(--fg)" }, children: ["This view failed to render: ", this.state.error.message] }));
521
+ return (_jsxs("div", { role: "alert", "data-lobu-render-error": "true", style: { padding: 12, color: "var(--foreground)" }, children: ["This view failed to render: ", this.state.error.message] }));
516
522
  }
517
523
  }
518
524
  /**
@@ -535,6 +541,10 @@ export function Provider({ def, bridge, children, }) {
535
541
  bridgeRef.current = bridge;
536
542
  if (bridgeRef.current === null)
537
543
  bridgeRef.current = new ViewBridge();
544
+ const embedsRef = useRef(null);
545
+ if (embedsRef.current === null)
546
+ embedsRef.current = new EmbedRegistry(() => bridgeRef.current);
547
+ const embeds = embedsRef.current;
538
548
  useEffect(() => {
539
549
  const b = bridgeRef.current;
540
550
  // Unreachable in practice (the body above always installs a bridge
@@ -565,10 +575,12 @@ export function Provider({ def, bridge, children, }) {
565
575
  };
566
576
  const offCtx = b.onHostContext(adoptContext);
567
577
  const offData = b.onDataChanged(() => setDataVersion((v) => v + 1));
578
+ const offEmbeds = embeds.attach(b);
568
579
  b.connect()
569
580
  .then((ctx) => {
570
581
  adoptContext(ctx);
571
582
  setConnected(true);
583
+ embeds.setConnected(true);
572
584
  setReady(b.hasToolInput());
573
585
  document.documentElement.setAttribute("data-ready", "true");
574
586
  })
@@ -578,8 +590,10 @@ export function Provider({ def, bridge, children, }) {
578
590
  offResult();
579
591
  offCtx();
580
592
  offData();
593
+ offEmbeds();
594
+ embeds.setConnected(false);
581
595
  };
582
- }, [def]);
596
+ }, [def, embeds]);
583
597
  // Report the document height so the host can fit the frame. This lives in
584
598
  // the provider, not `mountView`: the server bootstrap renders the provider
585
599
  // directly, and a frame that never hears a size stays at its minimum height.
@@ -700,7 +714,7 @@ export function Provider({ def, bridge, children, }) {
700
714
  ]);
701
715
  // A host-resolved replacement is a new form, including in MCP hosts that
702
716
  // keep the iframe mounted while delivering the opening result.
703
- return (_jsx(Ctx.Provider, { value: value, children: _jsx(RenderBoundary, { resetKey: `${ready}:${JSON.stringify(scope)}:${JSON.stringify(params)}:${dataVersion}`, children: children }) }, scope.event ?? "unbound"));
717
+ return (_jsx(Ctx.Provider, { value: value, children: _jsx(EmbedProvider, { registry: embeds, children: _jsx(RenderBoundary, { resetKey: `${ready}:${JSON.stringify(scope)}:${JSON.stringify(params)}:${dataVersion}`, children: children }) }) }, scope.event ?? "unbound"));
704
718
  }
705
719
  /** Entry point the compiled bundle calls once. Mounts the component into
706
720
  * `#root` and connects to the host. */
@@ -14,6 +14,7 @@
14
14
  * like the SDK's transport.
15
15
  */
16
16
  import type { EntityGetInput } from "@lobu/core/contracts/tools/manage-entity";
17
+ import { type ViewEmbedSlot, type ViewEmbedStatus, type ViewFocusDirection } from "@lobu/core/contracts/tools/view-host";
17
18
  export declare class ViewBridgeError extends Error {
18
19
  readonly code: number;
19
20
  constructor(message: string, code: number);
@@ -74,6 +75,9 @@ export declare class ViewBridge {
74
75
  private toolCancelledListeners;
75
76
  private hostContextListeners;
76
77
  private dataChangedListeners;
78
+ private embedSizeListeners;
79
+ private embedFocusListeners;
80
+ private focusEnterListeners;
77
81
  /** Set by the first `tool-input` and never cleared: queries must not fire
78
82
  * before it (the host seeds scope + params there; anything read earlier
79
83
  * runs against defaults and double-fetches). */
@@ -103,6 +107,19 @@ export declare class ViewBridge {
103
107
  /** The host saw workspace data change (Lobu hosts only; other hosts never
104
108
  * send it, and reads then refresh on their own triggers). */
105
109
  onDataChanged(listener: () => void): () => void;
110
+ /** A child view's height in a slot (Lobu web host only). */
111
+ onEmbedSize(listener: (id: string, height: number) => void): () => void;
112
+ /** Keyboard focus left a slot's child (Lobu web host only). */
113
+ onEmbedFocus(listener: (id: string, direction: ViewFocusDirection) => void): () => void;
114
+ /** Keyboard focus entered this view as a slot's child (Lobu web host only). */
115
+ onFocusEnter(listener: (direction: ViewFocusDirection) => void): () => void;
116
+ /** Report every slot on screen. Rejects with code -32601 on a host that
117
+ * does not mount embedded views. */
118
+ syncEmbeds(embeds: ViewEmbedSlot[]): Promise<{
119
+ embeds?: ViewEmbedStatus[];
120
+ }>;
121
+ /** Move keyboard focus into a slot's child. */
122
+ focusEmbed(id: string, direction: ViewFocusDirection): Promise<unknown>;
106
123
  /**
107
124
  * Run the `ui/initialize` handshake, then announce readiness. Resolves with
108
125
  * the host context. Rejects when the host answers with an error or stays
@@ -13,7 +13,7 @@
13
13
  * "2.0", method, params }`. Anything else in the inbox is ignored, exactly
14
14
  * like the SDK's transport.
15
15
  */
16
- import { VIEW_OPEN_RECORD_METHOD, VIEW_WORKSPACE_META_KEY, } from "@lobu/core/contracts/tools/view-host";
16
+ import { VIEW_EMBED_FOCUS_NOTIFICATION, VIEW_EMBED_SIZE_NOTIFICATION, VIEW_EMBEDS_FOCUS_METHOD, VIEW_EMBEDS_SYNC_METHOD, VIEW_FOCUS_ENTER_NOTIFICATION, VIEW_OPEN_RECORD_METHOD, VIEW_WORKSPACE_META_KEY, } from "@lobu/core/contracts/tools/view-host";
17
17
  export class ViewBridgeError extends Error {
18
18
  code;
19
19
  constructor(message, code) {
@@ -54,6 +54,9 @@ export class ViewBridge {
54
54
  toolCancelledListeners = new Set();
55
55
  hostContextListeners = new Set();
56
56
  dataChangedListeners = new Set();
57
+ embedSizeListeners = new Set();
58
+ embedFocusListeners = new Set();
59
+ focusEnterListeners = new Set();
57
60
  /** Set by the first `tool-input` and never cleared: queries must not fire
58
61
  * before it (the host seeds scope + params there; anything read earlier
59
62
  * runs against defaults and double-fetches). */
@@ -132,6 +135,30 @@ export class ViewBridge {
132
135
  this.dataChangedListeners.add(listener);
133
136
  return () => this.dataChangedListeners.delete(listener);
134
137
  }
138
+ /** A child view's height in a slot (Lobu web host only). */
139
+ onEmbedSize(listener) {
140
+ this.embedSizeListeners.add(listener);
141
+ return () => this.embedSizeListeners.delete(listener);
142
+ }
143
+ /** Keyboard focus left a slot's child (Lobu web host only). */
144
+ onEmbedFocus(listener) {
145
+ this.embedFocusListeners.add(listener);
146
+ return () => this.embedFocusListeners.delete(listener);
147
+ }
148
+ /** Keyboard focus entered this view as a slot's child (Lobu web host only). */
149
+ onFocusEnter(listener) {
150
+ this.focusEnterListeners.add(listener);
151
+ return () => this.focusEnterListeners.delete(listener);
152
+ }
153
+ /** Report every slot on screen. Rejects with code -32601 on a host that
154
+ * does not mount embedded views. */
155
+ syncEmbeds(embeds) {
156
+ return this.request(VIEW_EMBEDS_SYNC_METHOD, { embeds });
157
+ }
158
+ /** Move keyboard focus into a slot's child. */
159
+ focusEmbed(id, direction) {
160
+ return this.request(VIEW_EMBEDS_FOCUS_METHOD, { id, direction });
161
+ }
135
162
  /**
136
163
  * Run the `ui/initialize` handshake, then announce readiness. Resolves with
137
164
  * the host context. Rejects when the host answers with an error or stays
@@ -354,6 +381,27 @@ export class ViewBridge {
354
381
  listener();
355
382
  break;
356
383
  }
384
+ case VIEW_EMBED_SIZE_NOTIFICATION: {
385
+ if (typeof params.id !== "string" || typeof params.height !== "number")
386
+ break;
387
+ for (const listener of [...this.embedSizeListeners])
388
+ listener(params.id, params.height);
389
+ break;
390
+ }
391
+ case VIEW_EMBED_FOCUS_NOTIFICATION: {
392
+ if (typeof params.id !== "string")
393
+ break;
394
+ const direction = params.direction === "backward" ? "backward" : "forward";
395
+ for (const listener of [...this.embedFocusListeners])
396
+ listener(params.id, direction);
397
+ break;
398
+ }
399
+ case VIEW_FOCUS_ENTER_NOTIFICATION: {
400
+ const direction = params.direction === "backward" ? "backward" : "forward";
401
+ for (const listener of [...this.focusEnterListeners])
402
+ listener(direction);
403
+ break;
404
+ }
357
405
  default:
358
406
  break;
359
407
  }
@@ -8,10 +8,11 @@
8
8
  * what the host returns, plus the honest states (`QueryState.loading`,
9
9
  * `.error`, `.errorCode`, `.truncated`) that `useQuery` reports.
10
10
  *
11
- * Styling follows the shell's theme tokens (`--fg`, `--muted`, `--border`,
12
- * `--accent`, `--font`, `--radius`, `--radius-lg`), which derive from the
13
- * host's MCP Apps style variables and flip with its `.dark` class, so kit
14
- * output takes the host's look without configuration. Theme tokens carry
11
+ * Styling follows the shell's theme tokens (shadcn names: `--foreground`,
12
+ * `--muted-foreground` for secondary text, `--muted`/`--accent` for surfaces,
13
+ * `--border`, `--primary`, `--font-sans`, `--radius`, `--radius-lg`), which
14
+ * derive from the host's MCP Apps style variables and flip with its `.dark`
15
+ * class, so kit output takes the host's look without configuration. Theme tokens carry
15
16
  * light-mode fallbacks; pie series and error accents use fixed colors.
16
17
  *
17
18
  * Server-side compile allowlist: this module is pinned beside `react` and
@@ -144,8 +145,29 @@ export declare function Link({ href, children, }: {
144
145
  href: string;
145
146
  children: ReactNode;
146
147
  }): import("react/jsx-runtime").JSX.Element;
147
- export declare function LoadingState({ text }: {
148
+ export interface SkeletonProps {
149
+ /** CSS width; default the full width. */
150
+ width?: number | string;
151
+ /** CSS height; default one line of text. */
152
+ height?: number | string;
153
+ /** Corner radius; default the host's. */
154
+ radius?: number | string;
155
+ }
156
+ /**
157
+ * A placeholder shaped like what is loading: a pulsing block in the host's
158
+ * muted surface colour. Size it like the content it stands for (a figure,
159
+ * a row, a chart) so the page does not jump when the data lands. Purely
160
+ * visual; announce the wait with `LoadingState` or your own `role="status"`.
161
+ */
162
+ export declare function Skeleton({ width, height, radius, }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
163
+ /**
164
+ * A query's loading state, as skeleton lines in the host's style. `text` is
165
+ * what assistive technology announces; `lines` sets how many lines stand in
166
+ * for the content (default 3).
167
+ */
168
+ export declare function LoadingState({ text, lines, }: {
148
169
  text?: string;
170
+ lines?: number;
149
171
  }): import("react/jsx-runtime").JSX.Element;
150
172
  export declare function EmptyState({ title, hint }: {
151
173
  title: string;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useId, useRef, useState } from "react";
3
3
  import { resolveViewHref, useHost } from "./api.js";
4
- const FONT_STACK = 'var(--font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif)';
4
+ const FONT_STACK = 'var(--font-sans, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif)';
5
5
  const INK = {
6
- color: "var(--fg, #0a0a0a)",
6
+ color: "var(--foreground, #0a0a0a)",
7
7
  fontFamily: FONT_STACK,
8
8
  fontSize: 13,
9
9
  lineHeight: 1.45,
@@ -87,7 +87,7 @@ function PageButton({ disabled, onClick, label, }) {
87
87
  border: "1px solid var(--border, #e5e7eb)",
88
88
  borderRadius: "var(--radius, 6px)",
89
89
  background: "transparent",
90
- color: "var(--fg, #0a0a0a)",
90
+ color: "var(--foreground, #0a0a0a)",
91
91
  padding: "2px 10px",
92
92
  font: "inherit",
93
93
  }, children: label === "Previous page" ? "‹ Prev" : "Next ›" }));
@@ -115,7 +115,7 @@ const FIELD_BOX = {
115
115
  border: "1px solid var(--border, #e5e7eb)",
116
116
  borderRadius: "var(--radius, 6px)",
117
117
  background: "transparent",
118
- color: "var(--fg, #0a0a0a)",
118
+ color: "var(--foreground, #0a0a0a)",
119
119
  padding: "4px 8px",
120
120
  font: "inherit",
121
121
  maxWidth: "100%",
@@ -323,8 +323,58 @@ export function Link({ href, children, }) {
323
323
  /* ------------------------------------------------------------------ */
324
324
  /* Query states — render `useQuery` honestly */
325
325
  /* ------------------------------------------------------------------ */
326
- export function LoadingState({ text = "Loading…" }) {
327
- return (_jsx("p", { role: "status", style: { ...INK, color: "var(--color-text-secondary, #6b7280)" }, children: text }));
326
+ const VISUALLY_HIDDEN = {
327
+ position: "absolute",
328
+ width: 1,
329
+ height: 1,
330
+ overflow: "hidden",
331
+ clip: "rect(0 0 0 0)",
332
+ whiteSpace: "nowrap",
333
+ };
334
+ /** Pulse an element while it is mounted, unless the reader asked for less
335
+ * motion. The kit ships no stylesheet, so the animation runs from script. */
336
+ function usePulse(ref) {
337
+ useEffect(() => {
338
+ const el = ref.current;
339
+ if (!el || typeof el.animate !== "function")
340
+ return;
341
+ if (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)
342
+ return;
343
+ const pulse = el.animate([{ opacity: 1 }, { opacity: 0.45 }, { opacity: 1 }], {
344
+ duration: 1600,
345
+ iterations: Number.POSITIVE_INFINITY,
346
+ easing: "ease-in-out",
347
+ });
348
+ return () => pulse.cancel();
349
+ }, [ref]);
350
+ }
351
+ /**
352
+ * A placeholder shaped like what is loading: a pulsing block in the host's
353
+ * muted surface colour. Size it like the content it stands for (a figure,
354
+ * a row, a chart) so the page does not jump when the data lands. Purely
355
+ * visual; announce the wait with `LoadingState` or your own `role="status"`.
356
+ */
357
+ export function Skeleton({ width = "100%", height = 14, radius, }) {
358
+ const ref = useRef(null);
359
+ usePulse(ref);
360
+ return (_jsx("span", { ref: ref, "aria-hidden": "true", style: {
361
+ display: "block",
362
+ width,
363
+ height,
364
+ borderRadius: radius ?? "var(--radius, 6px)",
365
+ background: "var(--muted, #f3f4f6)",
366
+ } }));
367
+ }
368
+ /**
369
+ * A query's loading state, as skeleton lines in the host's style. `text` is
370
+ * what assistive technology announces; `lines` sets how many lines stand in
371
+ * for the content (default 3).
372
+ */
373
+ export function LoadingState({ text = "Loading…", lines = 3, }) {
374
+ const widths = ["72%", "94%", "56%", "84%", "64%"];
375
+ // Fixed placeholder lines: each keeps its position for the whole wait.
376
+ const placeholders = Array.from({ length: Number.isFinite(lines) ? Math.max(1, Math.floor(lines)) : 3 }, (_, i) => ({ id: `line-${i}`, width: widths[i % widths.length] }));
377
+ return (_jsxs("div", { role: "status", style: { display: "grid", gap: 8, padding: "4px 0" }, children: [_jsx("span", { style: VISUALLY_HIDDEN, children: text }), placeholders.map((line) => (_jsx(Skeleton, { width: line.width, height: 12 }, line.id)))] }));
328
378
  }
329
379
  export function EmptyState({ title, hint }) {
330
380
  return (_jsxs("div", { style: { ...INK, color: "var(--color-text-secondary, #6b7280)" }, children: [_jsx("p", { style: { margin: "4px 0" }, children: title }), hint && _jsx("p", { style: { margin: "0 0 4px", fontSize: 12 }, children: hint })] }));
@@ -344,7 +394,7 @@ export function ErrorState({ message, errorCode, onRetry, }) {
344
394
  border: "1px solid var(--border, #e5e7eb)",
345
395
  borderRadius: "var(--radius, 6px)",
346
396
  background: "transparent",
347
- color: "var(--fg, #0a0a0a)",
397
+ color: "var(--foreground, #0a0a0a)",
348
398
  padding: "2px 10px",
349
399
  font: "inherit",
350
400
  }, children: "Retry" }))] }));
@@ -0,0 +1,98 @@
1
+ /**
2
+ * `<EmbeddedView>` — place another registered view inside this one.
3
+ *
4
+ * The child is never rendered by this frame. The slot reports its position
5
+ * to the host (`lobu/embeds/sync`), and the Lobu web host mounts the child as
6
+ * its own sandboxed frame over the slot: its own bundle, its own view key and
7
+ * actions, the visitor's own session. This frame cannot reach into the child,
8
+ * and the child's param changes stay with that one instance — they never
9
+ * reach this view's params, a sibling, or the address bar.
10
+ *
11
+ * Hosts that do not mount embedded views (other MCP Apps hosts) answer
12
+ * -32601, and the slot says so instead of rendering nothing.
13
+ */
14
+ import { type ViewEmbedParams, type ViewEmbedScope, type ViewFocusDirection } from "@lobu/core/contracts/tools/view-host";
15
+ import { type ReactNode, type RefObject } from "react";
16
+ import { type ViewBridge } from "./bridge.js";
17
+ interface SlotEntry {
18
+ view: string;
19
+ scope: ViewEmbedScope;
20
+ params: ViewEmbedParams;
21
+ element: RefObject<HTMLElement | null>;
22
+ enter: RefObject<HTMLElement | null>;
23
+ after: RefObject<HTMLElement | null>;
24
+ }
25
+ type SlotState = {
26
+ kind: "pending";
27
+ } | {
28
+ kind: "mounted";
29
+ height: number | null;
30
+ } | {
31
+ kind: "refused";
32
+ reason: string;
33
+ } | {
34
+ kind: "unsupported";
35
+ };
36
+ /**
37
+ * The slots of one frame. A change that can move a slot — the page's DOM, a
38
+ * resize, any scroll, an image load, a transition or animation — schedules
39
+ * one measurement on the next animation frame; only a changed picture is
40
+ * sent, carrying all slots (the host's answer is the whole picture, never a
41
+ * diff). Nothing polls: with no change there is no work, and motion keeps
42
+ * measuring each frame only until it ends (bounded by `MOTION_LIMIT_MS`).
43
+ */
44
+ export declare class EmbedRegistry {
45
+ private readonly bridge;
46
+ private slots;
47
+ private states;
48
+ private listeners;
49
+ private frame;
50
+ private unsupported;
51
+ private connected;
52
+ private returning;
53
+ /** Set while focus is being placed on entry from the host, so a slot that
54
+ * is itself the first or last stop passes the same direction on. */
55
+ arrival: ViewFocusDirection | null;
56
+ constructor(bridge: () => ViewBridge | null);
57
+ /** Wire the host's notifications; returns the teardown. */
58
+ attach(bridge: ViewBridge): () => void;
59
+ private observer;
60
+ /** Transitions/animations running now, and when to stop trusting the count. */
61
+ private moving;
62
+ private motionUntil;
63
+ /** The last picture sent; an identical one is not sent again. */
64
+ private sent;
65
+ setConnected(connected: boolean): void;
66
+ register(id: string, entry: SlotEntry): () => void;
67
+ /** Keyboard focus reached the slot: hand it to the child, unless it is
68
+ * coming back out of the child the other way. */
69
+ enter(id: string, direction: ViewFocusDirection): void;
70
+ state(id: string): SlotState;
71
+ subscribe: (listener: () => void) => (() => void);
72
+ private setState;
73
+ schedule(): void;
74
+ private sync;
75
+ }
76
+ /** Installed by the view runtime's provider. */
77
+ export declare function EmbedProvider({ registry, children, }: {
78
+ registry: EmbedRegistry;
79
+ children: ReactNode;
80
+ }): import("react/jsx-runtime").JSX.Element;
81
+ export interface EmbeddedViewProps {
82
+ /** Key of the view to show; it is registered and authorized on its own. */
83
+ view: string;
84
+ /** The child's scope. Omit for a workspace view. */
85
+ scope?: ViewEmbedScope;
86
+ /** The child's starting params. A change here resets the instance to them;
87
+ * the child's own changes stay local to it. */
88
+ params?: Record<string, string | number | boolean>;
89
+ /** Stable instance id; defaults to the slot's position in the tree. */
90
+ id?: string;
91
+ /** Accessible name of the slot. */
92
+ title?: string;
93
+ /** Height reserved until the child reports its own. */
94
+ minHeight?: number;
95
+ }
96
+ export declare function EmbeddedView({ view, scope, params, id: explicitId, title, minHeight, }: EmbeddedViewProps): import("react/jsx-runtime").JSX.Element;
97
+ export {};
98
+ //# sourceMappingURL=embed.d.ts.map