@lobu/runtime-server 24.4.0 → 24.6.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 (305) hide show
  1. package/dist/catalogs/connectors.json +342 -4
  2. package/dist/catalogs/skills.json +2 -2
  3. package/dist/component.json +1 -1
  4. package/dist/connectors/linkedin-identity.ts +43 -0
  5. package/dist/connectors/linkedin.ts +154 -3
  6. package/dist/connectors/postgres.ts +77 -48
  7. package/dist/connectors/x-like-follow.ts +329 -0
  8. package/dist/connectors/x.ts +709 -80
  9. package/dist/dependencies.bun.lock +104 -135
  10. package/dist/owletto/dist/assets/_-DT3E3BmS.js +3 -0
  11. package/dist/owletto/dist/assets/_-c1xy7bLu.js +2 -0
  12. package/dist/owletto/dist/assets/_agentId-CTfoi0-7.js +2 -0
  13. package/dist/owletto/dist/assets/_agentId-DV8utajn.js +2 -0
  14. package/dist/owletto/dist/assets/_automationId-DvP3qyYL.js +2 -0
  15. package/dist/owletto/dist/assets/_connectorKey._connectionId-CL5SivCn.js +2 -0
  16. package/dist/owletto/dist/assets/_connectorKey.index-tnMwC67b.js +2 -0
  17. package/dist/owletto/dist/assets/_conversationId-DXN_8m88.js +2 -0
  18. package/dist/owletto/dist/assets/_eventId-SdpFT7jB.js +2 -0
  19. package/dist/owletto/dist/assets/_name-CM1AMywz.js +2 -0
  20. package/dist/owletto/dist/assets/_owner-CaGsXXBW.js +3 -0
  21. package/dist/owletto/dist/assets/_shape-DGAkETDp.js +2 -0
  22. package/dist/owletto/dist/assets/_skillKey-Dd4ZHPY8.js +2 -0
  23. package/dist/owletto/dist/assets/_slug-cRvJQtNo.js +2 -0
  24. package/dist/owletto/dist/assets/_view-B5I7mmkl.js +2 -0
  25. package/dist/owletto/dist/assets/_viewKey-Bwn0dyLo.js +2 -0
  26. package/dist/owletto/dist/assets/_viewKey-YjSYD0wc.js +2 -0
  27. package/dist/owletto/dist/assets/accept-invitation-CQZQ0wwC.js +2 -0
  28. package/dist/owletto/dist/assets/activity-route-view-CZykJXQp.js +2 -0
  29. package/dist/owletto/dist/assets/{agent-card-controls-99mG6H5k.js → agent-card-controls-DuQJhtqp.js} +2 -2
  30. package/dist/owletto/dist/assets/{agent-client-setup-list-kMmqQSrf.js → agent-client-setup-list-CpUTAjXf.js} +2 -2
  31. package/dist/owletto/dist/assets/agent-connect-pages-Br_ycC0z.js +2 -0
  32. package/dist/owletto/dist/assets/agent-editor-form-BXQBFHSv.js +2 -0
  33. package/dist/owletto/dist/assets/agent-guardrails-route-CN7vpC0X.js +2 -0
  34. package/dist/owletto/dist/assets/agent-list-row-BnP6r4pm.js +2 -0
  35. package/dist/owletto/dist/assets/{agent-loading-shells-Dnmb6W5Y.js → agent-loading-shells-_18OREnx.js} +2 -2
  36. package/dist/owletto/dist/assets/{agent-permissions-matrix-CbhXlbgY.js → agent-permissions-matrix-DSjidWHL.js} +2 -2
  37. package/dist/owletto/dist/assets/{agent-skill-context-V__2i6Vl.js → agent-skill-context-1DBn7Xc_.js} +2 -2
  38. package/dist/owletto/dist/assets/agent-skills-route-d5jh3oBR.js +2 -0
  39. package/dist/owletto/dist/assets/agent-tab-intro-DKrC3SQt.js +2 -0
  40. package/dist/owletto/dist/assets/agent-thread-FyEO-y44.js +6 -0
  41. package/dist/owletto/dist/assets/agent-thread-storage-U6htL3ad.js +2 -0
  42. package/dist/owletto/dist/assets/agents-kXojozTU.js +2 -0
  43. package/dist/owletto/dist/assets/agents-workbench-CDpJmUVN.js +2 -0
  44. package/dist/owletto/dist/assets/app._appId-DwNeXRJp.js +2 -0
  45. package/dist/owletto/dist/assets/assist-composer-Mn9EfX4X.js +2 -0
  46. package/dist/owletto/dist/assets/automation-detail-content-Bs3vwAPd.js +2 -0
  47. package/dist/owletto/dist/assets/automation-row-B5Q1B10y.js +2 -0
  48. package/dist/owletto/dist/assets/automation-source-list-Dhucq1sI.js +2 -0
  49. package/dist/owletto/dist/assets/automations-kXojozTU.js +2 -0
  50. package/dist/owletto/dist/assets/{callback-B-CAz-bK.js → callback-9xSHyA12.js} +2 -2
  51. package/dist/owletto/dist/assets/{card-SFtxv9f2.js → card-g4yxo4Hr.js} +2 -2
  52. package/dist/owletto/dist/assets/change-summary-DeuXQEpb.js +2 -0
  53. package/dist/owletto/dist/assets/{claim-DrxIRWKt.js → claim-B98IhDra.js} +2 -2
  54. package/dist/owletto/dist/assets/{client-activity-scopes-boZOHuPW.js → client-activity-scopes-BD2HBo-_.js} +2 -2
  55. package/dist/owletto/dist/assets/{client-rows-BJ2PxM4J.js → client-rows-x_CxeWkP.js} +2 -2
  56. package/dist/owletto/dist/assets/{clients-C7Lnuc3S.js → clients-Cmp0LmOp.js} +2 -2
  57. package/dist/owletto/dist/assets/connect-menu-CezOH3s7.js +2 -0
  58. package/dist/owletto/dist/assets/connect-zUot_0kG.js +2 -0
  59. package/dist/owletto/dist/assets/connect._clientId-nsGxe6yO.js +2 -0
  60. package/dist/owletto/dist/assets/connected._clientId-DnclRRXk.js +2 -0
  61. package/dist/owletto/dist/assets/connected._clientId.activity-CDB8atTX.js +2 -0
  62. package/dist/owletto/dist/assets/connected._clientId.index-DBNP2mZo.js +2 -0
  63. package/dist/owletto/dist/assets/connection-B6fM2KHN.js +2 -0
  64. package/dist/owletto/dist/assets/{connection-feed-detail-D7pnWaFB.js → connection-feed-detail-Ckq-qEbD.js} +2 -2
  65. package/dist/owletto/dist/assets/{connections-browser-DDJQh8Na.js → connections-browser-BXsJqieG.js} +2 -2
  66. package/dist/owletto/dist/assets/{connector-boxes-DDX7Ebc4.js → connector-boxes-CbqSFeVm.js} +2 -2
  67. package/dist/owletto/dist/assets/connector-page-shell-Di6XzkVo.js +2 -0
  68. package/dist/owletto/dist/assets/connector-provenance-BrnasBW4.js +2 -0
  69. package/dist/owletto/dist/assets/{connector-scope-lists-BibdzKl1.js → connector-scope-lists-dQnZARCD.js} +2 -2
  70. package/dist/owletto/dist/assets/connectors-DnOUxX_U.js +2 -0
  71. package/dist/owletto/dist/assets/consent-Byli4yMs.js +2 -0
  72. package/dist/owletto/dist/assets/copy-button-Ddf7lBjZ.js +2 -0
  73. package/dist/owletto/dist/assets/{core.esm-CHnfRiEM.js → core.esm-BsXtvNoI.js} +3 -3
  74. package/dist/owletto/dist/assets/create-B34eskZ_.js +2 -0
  75. package/dist/owletto/dist/assets/create-DLB9sXgU.js +2 -0
  76. package/dist/owletto/dist/assets/create-YdAnh3ml.js +2 -0
  77. package/dist/owletto/dist/assets/create-automation-form-C9PMX7N8.js +3 -0
  78. package/dist/owletto/dist/assets/create._connectorKey-Bz4OYRiC.js +2 -0
  79. package/dist/owletto/dist/assets/definition-comparison-B5WgZILB.js +2 -0
  80. package/dist/owletto/dist/assets/device-DdCoCj-Q.js +2 -0
  81. package/dist/owletto/dist/assets/device-pin-tombstone-B06J7Af1.js +2 -0
  82. package/dist/owletto/dist/assets/device._deviceId-Bh9S4bFp.js +2 -0
  83. package/dist/owletto/dist/assets/dynamic-schema-form-qWSRtOAv.js +2 -0
  84. package/dist/owletto/dist/assets/entity-options-BkU_En_f.js +2 -0
  85. package/dist/owletto/dist/assets/entity-page-BPFDHY8q.js +2 -0
  86. package/dist/owletto/dist/assets/entity-pages-DxgbjLMt.js +2 -0
  87. package/dist/owletto/dist/assets/entity-type-page-D0ghgRgq.js +2 -0
  88. package/dist/owletto/dist/assets/event-card-CjA_dLzq.js +2 -0
  89. package/dist/owletto/dist/assets/event-detail-CmC-DVrK.js +2 -0
  90. package/dist/owletto/dist/assets/{events-feed-BysC9HgU.js → events-feed-CGzA1w3R.js} +2 -2
  91. package/dist/owletto/dist/assets/filter-bar-CQ_oE7a9.js +2 -0
  92. package/dist/owletto/dist/assets/{full-page-spinner-BMiXl54z.js → full-page-spinner-B5xXnKtV.js} +2 -2
  93. package/dist/owletto/dist/assets/guardrails-DkXatmea.js +2 -0
  94. package/dist/owletto/dist/assets/identity-BwJy3ixB.js +2 -0
  95. package/dist/owletto/dist/assets/index-35ehGReZ.js +2 -0
  96. package/dist/owletto/dist/assets/index-B9hYiwBw.js +2 -0
  97. package/dist/owletto/dist/assets/index-BDl1_w6U.js +53 -0
  98. package/dist/owletto/dist/assets/{index-C-WaHj1Y.js → index-BdNR51Ua.js} +2 -2
  99. package/dist/owletto/dist/assets/index-BjcZVe7n.js +7899 -0
  100. package/dist/owletto/dist/assets/{index-B4wXJwQY.js → index-BqAVebvY.js} +2 -2
  101. package/dist/owletto/dist/assets/index-BvK1fS1J.js +2 -0
  102. package/dist/owletto/dist/assets/index-CNEpTkgw.css +1 -0
  103. package/dist/owletto/dist/assets/index-CRc73k1t.js +2 -0
  104. package/dist/owletto/dist/assets/index-CYGaSD3y.js +2 -0
  105. package/dist/owletto/dist/assets/index-CfZGe-zn.js +2 -0
  106. package/dist/owletto/dist/assets/{index-CzoK57xp.js → index-CkiyxW4w.js} +2 -2
  107. package/dist/owletto/dist/assets/index-CzLDNB2E.js +2 -0
  108. package/dist/owletto/dist/assets/index-D-o5iOVd.js +2 -0
  109. package/dist/owletto/dist/assets/index-DjYVV1Ml.js +2 -0
  110. package/dist/owletto/dist/assets/{index-D4-uel59.js → index-TkPy_P_u.js} +2 -2
  111. package/dist/owletto/dist/assets/index-Vcq4gwWv.js +2 -0
  112. package/dist/owletto/dist/assets/index-VyAX-asP.js +2 -0
  113. package/dist/owletto/dist/assets/json-diff-DtZtra_g.js +28 -0
  114. package/dist/owletto/dist/assets/{list-skeleton-Bp4HNgJ9.js → list-skeleton-CIHWCi2a.js} +2 -2
  115. package/dist/owletto/dist/assets/login-TWR0vF4_.js +2 -0
  116. package/dist/owletto/dist/assets/{logout-DxmfsVKD.js → logout-BA5kojS0.js} +2 -2
  117. package/dist/owletto/dist/assets/manage-gear-C-0BAMbC.js +2 -0
  118. package/dist/owletto/dist/assets/{member-scope-gate-vp3FihBD.js → member-scope-gate-BQiRAqtx.js} +2 -2
  119. package/dist/owletto/dist/assets/memory-browse-page-Ba32-vVL.js +74 -0
  120. package/dist/owletto/dist/assets/model-C2q7WDcS.js +2 -0
  121. package/dist/owletto/dist/assets/model-selector-B2cjCn0V.js +2 -0
  122. package/dist/owletto/dist/assets/models-CZkH5gtj.js +2 -0
  123. package/dist/owletto/dist/assets/nav-pill-Bam6s3jj.js +2 -0
  124. package/dist/owletto/dist/assets/new-BJst6K0b.js +2 -0
  125. package/dist/owletto/dist/assets/{new-CvX8_gIb.js → new-Dc5Bbotb.js} +2 -2
  126. package/dist/owletto/dist/assets/new-DgbivfDe.js +2 -0
  127. package/dist/owletto/dist/assets/organization-B9U1L-56.js +2 -0
  128. package/dist/owletto/dist/assets/peek-pane-content-Cq8P38s3.js +2 -0
  129. package/dist/owletto/dist/assets/pending-seed-BP3xHM2d.js +2 -0
  130. package/dist/owletto/dist/assets/permissions-BVlbeY4u.js +2 -0
  131. package/dist/owletto/dist/assets/proposal-review-shell-BED-DO9C.js +2 -0
  132. package/dist/owletto/dist/assets/public-shell-ready-Diq15_QW.js +2 -0
  133. package/dist/owletto/dist/assets/record-activity-CTLwq8s1.js +2 -0
  134. package/dist/owletto/dist/assets/{record-session-CWXnCVln.js → record-session-DOFgdd43.js} +2 -2
  135. package/dist/owletto/dist/assets/renderer-CHPS-1vD.js +96 -0
  136. package/dist/owletto/dist/assets/{reset-password-CFUzxH7m.js → reset-password-BmNM-apc.js} +2 -2
  137. package/dist/owletto/dist/assets/run-activity-link-Dh1YyCfk.js +2 -0
  138. package/dist/owletto/dist/assets/run-initiator-CCxNv0rK.js +2 -0
  139. package/dist/owletto/dist/assets/{runs-BPtQBTRN.js → runs-BntGAKQG.js} +2 -2
  140. package/dist/owletto/dist/assets/runs-panel-BwTVaRsE.js +2 -0
  141. package/dist/owletto/dist/assets/runs-table-CYS1jDdL.js +2 -0
  142. package/dist/owletto/dist/assets/{schema-type-editor-panel-CAhOB648.js → schema-type-editor-panel-v3nR2Oa2.js} +2 -2
  143. package/dist/owletto/dist/assets/schema-value-BFb7jCBo.js +3 -0
  144. package/dist/owletto/dist/assets/settings-DBgT60nY.js +2 -0
  145. package/dist/owletto/dist/assets/settings-DubSpJfg.js +2 -0
  146. package/dist/owletto/dist/assets/skills-DDoeRGhJ.js +2 -0
  147. package/dist/owletto/dist/assets/{source-record-panels-Bh5F4C5K.js → source-record-panels-m8gECt82.js} +2 -2
  148. package/dist/owletto/dist/assets/{status-dot-D3FoDRcc.js → status-dot-BnQPFrcU.js} +2 -2
  149. package/dist/owletto/dist/assets/{table-DFcJRNk7.js → table-DALHuXPE.js} +2 -2
  150. package/dist/owletto/dist/assets/{use-automations-BHoV0dLs.js → use-automations-D9hKpufo.js} +2 -2
  151. package/dist/owletto/dist/assets/use-login-redirect-ciwfc-7A.js +2 -0
  152. package/dist/owletto/dist/assets/{use-mention-search-C3rWLuKm.js → use-mention-search-CJGCatFS.js} +3 -3
  153. package/dist/owletto/dist/assets/use-scroll-sentinel-BWCrmNIB.js +2 -0
  154. package/dist/owletto/dist/assets/view-param-filters-CDvwie_f.js +2 -0
  155. package/dist/owletto/dist/assets/views-access-required-CZ1fvAks.js +2 -0
  156. package/dist/owletto/dist/index.html +2 -2
  157. package/dist/server-main.bundle.mjs +56428 -52475
  158. package/dist/server.bundle.mjs +5 -5
  159. package/dist/verify.mjs +1 -1
  160. package/npm-shrinkwrap.json +277 -311
  161. package/package.json +3 -4
  162. package/vendor/connector-sdk/dist/reaction-client-types.d.ts +8 -2
  163. package/vendor/connector-sdk/dist/reaction-sdk.d.ts +5 -1
  164. package/vendor/connector-sdk/package.json +1 -1
  165. package/vendor/core/dist/contracts/agent-settings.d.ts +61 -6
  166. package/vendor/core/dist/contracts/agent-settings.js +10 -7
  167. package/vendor/core/dist/contracts/tools/manage-agents.d.ts +473 -98
  168. package/vendor/core/dist/contracts/tools/manage-agents.js +111 -2
  169. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +21 -18
  170. package/vendor/core/dist/contracts/tools/manage-automations.js +15 -15
  171. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +2 -2
  172. package/vendor/core/dist/contracts/tools/manage-inference-providers.d.ts +445 -0
  173. package/vendor/core/dist/contracts/tools/manage-inference-providers.js +133 -0
  174. package/vendor/core/dist/contracts/tools/manage-views.d.ts +4 -4
  175. package/vendor/core/dist/contracts/tools/manage-views.js +5 -3
  176. package/vendor/core/dist/contracts/tools/view-host.d.ts +7 -0
  177. package/vendor/core/dist/contracts/tools/view-host.js +28 -0
  178. package/vendor/core/dist/contracts/tools/view-runtime.d.ts +2 -4
  179. package/vendor/core/dist/contracts/tools/view-runtime.js +19 -7
  180. package/vendor/core/dist/contracts/worker/device-automation.js +4 -2
  181. package/vendor/core/dist/error-report.d.ts +73 -0
  182. package/vendor/core/dist/error-report.js +346 -0
  183. package/vendor/core/dist/index.d.ts +3 -1
  184. package/vendor/core/dist/index.js +4 -1
  185. package/vendor/core/dist/logger.js +7 -4
  186. package/vendor/core/dist/otel-fetch.d.ts +19 -0
  187. package/vendor/core/dist/otel-fetch.js +96 -0
  188. package/vendor/core/dist/otel.d.ts +9 -0
  189. package/vendor/core/dist/otel.js +28 -7
  190. package/vendor/core/dist/reserved.d.ts +1 -1
  191. package/vendor/core/dist/reserved.js +6 -4
  192. package/vendor/core/dist/tool-result.d.ts +8 -0
  193. package/vendor/core/dist/tool-result.js +61 -0
  194. package/vendor/core/dist/utils/diagnostic-scrubber.js +1 -1
  195. package/vendor/core/dist/worker/auth.js +4 -0
  196. package/vendor/core/package.json +16 -1
  197. package/vendor/views/dist/api.d.ts +9 -4
  198. package/vendor/views/dist/api.js +33 -2
  199. package/vendor/views/dist/bridge.d.ts +8 -0
  200. package/vendor/views/dist/bridge.js +12 -2
  201. package/vendor/views/dist/components.d.ts +4 -2
  202. package/vendor/views/dist/components.js +29 -14
  203. package/vendor/views/dist/index.d.ts +1 -1
  204. package/vendor/views/dist/index.js +1 -1
  205. package/vendor/views/dist/native.d.ts +327 -0
  206. package/vendor/views/dist/native.js +57 -0
  207. package/vendor/views/package.json +1 -1
  208. package/dist/owletto/dist/assets/_-DIK0ae_S.js +0 -2
  209. package/dist/owletto/dist/assets/_-gTbcArpS.js +0 -3
  210. package/dist/owletto/dist/assets/_agentId-DOmcJZfk.js +0 -2
  211. package/dist/owletto/dist/assets/_agentId-DW6wRCVC.js +0 -2
  212. package/dist/owletto/dist/assets/_automationId-B9IcDYBu.js +0 -2
  213. package/dist/owletto/dist/assets/_connectorKey._connectionId-C6PmMPTA.js +0 -2
  214. package/dist/owletto/dist/assets/_connectorKey.index-BrJ8Pzze.js +0 -2
  215. package/dist/owletto/dist/assets/_conversationId-BpJAeYYW.js +0 -2
  216. package/dist/owletto/dist/assets/_eventId-DarQJo0G.js +0 -2
  217. package/dist/owletto/dist/assets/_name-DtmNTcUm.js +0 -2
  218. package/dist/owletto/dist/assets/_owner-Db8at3hk.js +0 -3
  219. package/dist/owletto/dist/assets/_shape-6iFA8A86.js +0 -2
  220. package/dist/owletto/dist/assets/_skillKey-CXkHn3Nl.js +0 -2
  221. package/dist/owletto/dist/assets/_slug-DBOuBLoX.js +0 -2
  222. package/dist/owletto/dist/assets/_viewKey-DC27aIN9.js +0 -2
  223. package/dist/owletto/dist/assets/_viewKey-DuYDieln.js +0 -2
  224. package/dist/owletto/dist/assets/accept-invitation-BbDCVvur.js +0 -2
  225. package/dist/owletto/dist/assets/activity-route-view-V4ftmSN7.js +0 -2
  226. package/dist/owletto/dist/assets/agent-connect-pages-B-NPTFs6.js +0 -2
  227. package/dist/owletto/dist/assets/agent-editor-form-DfMTSIvj.js +0 -2
  228. package/dist/owletto/dist/assets/agent-guardrails-route-BvGgfd-h.js +0 -2
  229. package/dist/owletto/dist/assets/agent-skills-route-DFXr_bHp.js +0 -2
  230. package/dist/owletto/dist/assets/agent-subpage-shell-DWzljvFb.js +0 -2
  231. package/dist/owletto/dist/assets/agent-thread-DQIr20H-.js +0 -6
  232. package/dist/owletto/dist/assets/agents-CLbeiqTR.js +0 -2
  233. package/dist/owletto/dist/assets/agents-workbench-C8bTa2rv.js +0 -2
  234. package/dist/owletto/dist/assets/app._appId-Bsq40nak.js +0 -2
  235. package/dist/owletto/dist/assets/automation-detail-content-C9Cgr5Zj.js +0 -2
  236. package/dist/owletto/dist/assets/automations-CLbeiqTR.js +0 -2
  237. package/dist/owletto/dist/assets/calendar-DMq3Dtqy.js +0 -2
  238. package/dist/owletto/dist/assets/code-editor-rX0t1g5C.js +0 -16
  239. package/dist/owletto/dist/assets/connect-BcwgytDV.js +0 -2
  240. package/dist/owletto/dist/assets/connect-menu-BF-AlunU.js +0 -2
  241. package/dist/owletto/dist/assets/connect._clientId-sDypRDeN.js +0 -2
  242. package/dist/owletto/dist/assets/connected._clientId-C9OkW1tv.js +0 -2
  243. package/dist/owletto/dist/assets/connected._clientId.activity-Dc6HYr55.js +0 -2
  244. package/dist/owletto/dist/assets/connected._clientId.index-C6qbqgwF.js +0 -2
  245. package/dist/owletto/dist/assets/connection-88YzIBK9.js +0 -2
  246. package/dist/owletto/dist/assets/connector-provenance-Th8ymGec.js +0 -2
  247. package/dist/owletto/dist/assets/connectors-BqwgLUUK.js +0 -2
  248. package/dist/owletto/dist/assets/consent-BR5U7dwb.js +0 -2
  249. package/dist/owletto/dist/assets/copy-button-2swYh4jb.js +0 -2
  250. package/dist/owletto/dist/assets/create-BsPVnRpG.js +0 -2
  251. package/dist/owletto/dist/assets/create-CVPYVOR5.js +0 -2
  252. package/dist/owletto/dist/assets/create-QFjmhOEU.js +0 -2
  253. package/dist/owletto/dist/assets/create-automation-form-DmCOFbRT.js +0 -3
  254. package/dist/owletto/dist/assets/create._connectorKey-DLDDVtLS.js +0 -2
  255. package/dist/owletto/dist/assets/cronstrue-CKwjNYgj.js +0 -2
  256. package/dist/owletto/dist/assets/device-CKup7kvB.js +0 -2
  257. package/dist/owletto/dist/assets/device-pin-tombstone-xGhCTU5_.js +0 -2
  258. package/dist/owletto/dist/assets/device._deviceId-B1H_ivDT.js +0 -2
  259. package/dist/owletto/dist/assets/entity-avatar-HloBoalJ.js +0 -2
  260. package/dist/owletto/dist/assets/entity-options-BSW_EG0W.js +0 -2
  261. package/dist/owletto/dist/assets/entity-page-D-WDWrAe.js +0 -2
  262. package/dist/owletto/dist/assets/entity-type-page-BCBdFndu.js +0 -2
  263. package/dist/owletto/dist/assets/event-card-Mcxv56DG.js +0 -2
  264. package/dist/owletto/dist/assets/event-detail-DXifj49J.js +0 -2
  265. package/dist/owletto/dist/assets/filter-bar-BQm-ubB1.js +0 -2
  266. package/dist/owletto/dist/assets/guardrails-D7W80sJO.js +0 -2
  267. package/dist/owletto/dist/assets/identity-N0cAO9BR.js +0 -2
  268. package/dist/owletto/dist/assets/index-4gCDI7m4.js +0 -7950
  269. package/dist/owletto/dist/assets/index-BNaI5GpS.js +0 -2
  270. package/dist/owletto/dist/assets/index-BUUrHuJJ.js +0 -2
  271. package/dist/owletto/dist/assets/index-BqrvJmLh.js +0 -2
  272. package/dist/owletto/dist/assets/index-CnvQEA5V.js +0 -2
  273. package/dist/owletto/dist/assets/index-Cq7P2c_E.js +0 -2
  274. package/dist/owletto/dist/assets/index-D3omC3Us.js +0 -2
  275. package/dist/owletto/dist/assets/index-DDGdlQrt.css +0 -1
  276. package/dist/owletto/dist/assets/index-DFEW7hMg.js +0 -2
  277. package/dist/owletto/dist/assets/index-DVV-WWuT.js +0 -2
  278. package/dist/owletto/dist/assets/index-DduQ_e9q.js +0 -2
  279. package/dist/owletto/dist/assets/index-DutlI1d-.js +0 -2
  280. package/dist/owletto/dist/assets/index-wHFQv1aT.js +0 -12
  281. package/dist/owletto/dist/assets/json-diff-E5D-NGYT.js +0 -4
  282. package/dist/owletto/dist/assets/login-7F48UJGx.js +0 -2
  283. package/dist/owletto/dist/assets/memory-browse-page-CfDmjhDl.js +0 -74
  284. package/dist/owletto/dist/assets/model-Dn40BUzs.js +0 -2
  285. package/dist/owletto/dist/assets/model-selector-88PJnyTq.js +0 -2
  286. package/dist/owletto/dist/assets/models-BBK_n2RP.js +0 -2
  287. package/dist/owletto/dist/assets/new-4ruWHLR5.js +0 -2
  288. package/dist/owletto/dist/assets/new-gMD1PHTL.js +0 -2
  289. package/dist/owletto/dist/assets/oauth-workspace-access-D9BNmyMY.js +0 -2
  290. package/dist/owletto/dist/assets/organization-BHcp5Pzg.js +0 -2
  291. package/dist/owletto/dist/assets/peek-pane-content-0sa10jER.js +0 -2
  292. package/dist/owletto/dist/assets/permissions-hhxosugv.js +0 -2
  293. package/dist/owletto/dist/assets/proposal-review-shell-B4CSiyLB.js +0 -2
  294. package/dist/owletto/dist/assets/public-shell-ready-CsenJeXa.js +0 -2
  295. package/dist/owletto/dist/assets/record-activity-D7bRaMk2.js +0 -2
  296. package/dist/owletto/dist/assets/renderer-7EGgTVX0.js +0 -97
  297. package/dist/owletto/dist/assets/runs-panel-Bj63_hb9.js +0 -2
  298. package/dist/owletto/dist/assets/settings-Dg6nxKyw.js +0 -2
  299. package/dist/owletto/dist/assets/settings-KJJ6WihO.js +0 -2
  300. package/dist/owletto/dist/assets/skills-ayt06_o2.js +0 -2
  301. package/dist/owletto/dist/assets/use-scroll-sentinel-Ct-jt7O0.js +0 -2
  302. package/dist/owletto/dist/assets/view-param-filters-mKoqDsaD.js +0 -2
  303. package/dist/owletto/dist/assets/views-access-required-DHrDO333.js +0 -2
  304. /package/vendor/@better-auth-kysely-adapter/{.bun-tag-abf95749a412716 → .bun-tag-654b3a002b271269} +0 -0
  305. /package/vendor/postgres/{.bun-tag-22d644c2873790db → .bun-tag-c81dacd34e959a7a} +0 -0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Client spans for outbound `fetch`, from the events Node's built-in undici
3
+ * publishes on `diagnostics_channel`. No monkey-patching: the channels exist
4
+ * whether or not anyone listens, and an unsubscribed channel costs nothing.
5
+ *
6
+ * A span records method, host and a parameterized path (no query string, ids
7
+ * replaced), the response status and duration. A span is recorded only
8
+ * under an active span, so a call joins the trace of the work that made it; a
9
+ * background fetch with no surrounding work would only add a stray root trace
10
+ * per call. Upstream 5xx responses and
11
+ * transport failures are recorded as dependency errors; a 4xx is often an
12
+ * expected answer, so it is kept as an attribute rather than an error.
13
+ */
14
+ import type { Span, Tracer } from "@opentelemetry/api";
15
+ export declare function instrumentFetch(options: {
16
+ tracer: () => Tracer | null;
17
+ recordError: (span: Span, error: unknown) => void;
18
+ }): void;
19
+ //# sourceMappingURL=otel-fetch.d.ts.map
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ /**
3
+ * Client spans for outbound `fetch`, from the events Node's built-in undici
4
+ * publishes on `diagnostics_channel`. No monkey-patching: the channels exist
5
+ * whether or not anyone listens, and an unsubscribed channel costs nothing.
6
+ *
7
+ * A span records method, host and a parameterized path (no query string, ids
8
+ * replaced), the response status and duration. A span is recorded only
9
+ * under an active span, so a call joins the trace of the work that made it; a
10
+ * background fetch with no surrounding work would only add a stray root trace
11
+ * per call. Upstream 5xx responses and
12
+ * transport failures are recorded as dependency errors; a 4xx is often an
13
+ * expected answer, so it is kept as an attribute rather than an error.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.instrumentFetch = instrumentFetch;
20
+ const node_diagnostics_channel_1 = __importDefault(require("node:diagnostics_channel"));
21
+ const api_1 = require("@opentelemetry/api");
22
+ const error_report_1 = require("./error-report");
23
+ const spans = new WeakMap();
24
+ let subscribed = false;
25
+ let activeTracer = () => null;
26
+ let recordFailure = null;
27
+ function pathTemplate(path) {
28
+ const bare = (path ?? "/").split("?")[0] || "/";
29
+ return (0, error_report_1.parameterizeMessage)(bare).replace(/\s+/g, "");
30
+ }
31
+ function host(origin) {
32
+ if (!origin)
33
+ return "unknown";
34
+ try {
35
+ return new URL(origin).host;
36
+ }
37
+ catch {
38
+ return "unknown";
39
+ }
40
+ }
41
+ function instrumentFetch(options) {
42
+ activeTracer = options.tracer;
43
+ recordFailure = options.recordError;
44
+ if (subscribed)
45
+ return;
46
+ subscribed = true;
47
+ node_diagnostics_channel_1.default.subscribe("undici:request:create", (message) => {
48
+ const { request } = message;
49
+ const tracer = activeTracer();
50
+ if (!tracer || !request || !api_1.trace.getSpan(api_1.context.active()))
51
+ return;
52
+ const method = (request.method ?? "GET").toUpperCase();
53
+ const address = host(request.origin);
54
+ const span = tracer.startSpan(`HTTP ${method} ${address}`, {
55
+ kind: api_1.SpanKind.CLIENT,
56
+ attributes: {
57
+ "http.request.method": method,
58
+ "server.address": address,
59
+ "url.template": pathTemplate(request.path),
60
+ },
61
+ });
62
+ spans.set(request, span);
63
+ });
64
+ node_diagnostics_channel_1.default.subscribe("undici:request:headers", (message) => {
65
+ const { request, response } = message;
66
+ const span = spans.get(request);
67
+ if (!span || typeof response?.statusCode !== "number")
68
+ return;
69
+ span.setAttribute("http.response.status_code", response.statusCode);
70
+ if (response.statusCode >= 500) {
71
+ recordFailure?.(span, {
72
+ name: "UpstreamHttpError",
73
+ message: `HTTP ${response.statusCode}`,
74
+ code: "UPSTREAM_5XX",
75
+ });
76
+ }
77
+ });
78
+ node_diagnostics_channel_1.default.subscribe("undici:request:trailers", (message) => {
79
+ const { request } = message;
80
+ const span = spans.get(request);
81
+ if (!span)
82
+ return;
83
+ spans.delete(request);
84
+ span.end();
85
+ });
86
+ node_diagnostics_channel_1.default.subscribe("undici:request:error", (message) => {
87
+ const { request, error } = message;
88
+ const span = spans.get(request);
89
+ if (!span)
90
+ return;
91
+ spans.delete(request);
92
+ recordFailure?.(span, error);
93
+ span.end();
94
+ });
95
+ }
96
+ //# sourceMappingURL=otel-fetch.js.map
@@ -1,6 +1,7 @@
1
1
  import type { Span, Tracer } from "@opentelemetry/api";
2
2
  import { SpanKind, SpanStatusCode } from "@opentelemetry/api";
3
3
  import type { SpanProcessor } from "@opentelemetry/sdk-trace-node";
4
+ import { type DescribeErrorOptions } from "./error-report";
4
5
  export interface OtelConfig {
5
6
  serviceName: string;
6
7
  serviceVersion?: string;
@@ -21,6 +22,14 @@ export declare function getTracer(): Tracer | null;
21
22
  export declare function shutdownTracing(timeoutMs?: number): Promise<void>;
22
23
  export declare function flushTracing(): Promise<void>;
23
24
  export declare function createSpan(name: string, attributes?: Record<string, string | number | boolean>, kind?: SpanKind): Span | null;
25
+ /**
26
+ * Mark a span failed and attach its grouped error report: exception type,
27
+ * parameterized message, frame-only stack, kind and fingerprint. The raw
28
+ * message is never recorded, because it can carry credentials or source data.
29
+ * `scope` defaults to the span's name; pass it when the span was not the
30
+ * reporting boundary.
31
+ */
32
+ export declare function recordError(span: Span | null | undefined, error: unknown, options?: Partial<DescribeErrorOptions>): void;
24
33
  export declare function withSpan<T>(name: string, fn: (span: Span | null) => Promise<T>, attributes?: Record<string, string | number | boolean>): Promise<T>;
25
34
  export declare function getCurrentSpan(): Span | undefined;
26
35
  /** Run `fn` with `span` active, or plainly when tracing produced no span. */
@@ -6,6 +6,7 @@ exports.getTracer = getTracer;
6
6
  exports.shutdownTracing = shutdownTracing;
7
7
  exports.flushTracing = flushTracing;
8
8
  exports.createSpan = createSpan;
9
+ exports.recordError = recordError;
9
10
  exports.withSpan = withSpan;
10
11
  exports.getCurrentSpan = getCurrentSpan;
11
12
  exports.runInSpanContext = runInSpanContext;
@@ -16,7 +17,9 @@ exports.getTraceparent = getTraceparent;
16
17
  const api_1 = require("@opentelemetry/api");
17
18
  Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function () { return api_1.SpanKind; } });
18
19
  Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function () { return api_1.SpanStatusCode; } });
20
+ const error_report_1 = require("./error-report");
19
21
  const logger_1 = require("./logger");
22
+ const otel_fetch_1 = require("./otel-fetch");
20
23
  const trace_context_1 = require("./trace-context");
21
24
  const logger = (0, logger_1.createLogger)("otel");
22
25
  let provider = null;
@@ -91,6 +94,10 @@ function initTracing(config) {
91
94
  // globally registered provider, so a later init would otherwise export
92
95
  // into a provider this call does not own.
93
96
  tracer = provider.getTracer(config.serviceName, config.serviceVersion);
97
+ (0, otel_fetch_1.instrumentFetch)({
98
+ tracer: () => tracer,
99
+ recordError: (span, error) => recordError(span, error, { kind: "dependency" }),
100
+ });
94
101
  logger.info(useCustomProcessors
95
102
  ? `Tracing initialized: ${config.serviceName} (custom span processors)`
96
103
  : `Tracing initialized: ${config.serviceName} -> ${config.otlpEndpoint}`);
@@ -140,6 +147,26 @@ function createSpan(name, attributes, kind = api_1.SpanKind.INTERNAL) {
140
147
  });
141
148
  return span;
142
149
  }
150
+ /**
151
+ * Mark a span failed and attach its grouped error report: exception type,
152
+ * parameterized message, frame-only stack, kind and fingerprint. The raw
153
+ * message is never recorded, because it can carry credentials or source data.
154
+ * `scope` defaults to the span's name; pass it when the span was not the
155
+ * reporting boundary.
156
+ */
157
+ function recordError(span, error, options = {}) {
158
+ if (!span)
159
+ return;
160
+ const name = span.name;
161
+ const report = (0, error_report_1.describeError)(error, {
162
+ scope: options.scope ?? (typeof name === "string" ? name : "span"),
163
+ ...(options.kind ? { kind: options.kind } : {}),
164
+ });
165
+ const attributes = (0, error_report_1.errorReportAttributes)(report);
166
+ span.setAttributes(attributes);
167
+ span.addEvent("exception", attributes);
168
+ span.setStatus({ code: api_1.SpanStatusCode.ERROR, message: report.message });
169
+ }
143
170
  async function runInSpan(span, fn) {
144
171
  try {
145
172
  const result = await fn(span);
@@ -147,13 +174,7 @@ async function runInSpan(span, fn) {
147
174
  return result;
148
175
  }
149
176
  catch (error) {
150
- if (span) {
151
- span.setStatus({
152
- code: api_1.SpanStatusCode.ERROR,
153
- message: error instanceof Error ? error.message : String(error),
154
- });
155
- span.recordException(error);
156
- }
177
+ recordError(span, error);
157
178
  throw error;
158
179
  }
159
180
  finally {
@@ -38,7 +38,7 @@ export declare const RESERVED_PATHS_SET: ReadonlySet<string>;
38
38
  * product words that are not knowledge types. Create-time hygiene only — not
39
39
  * hide/prune policy (that is `$` prefix only).
40
40
  */
41
- export declare const RESERVED_ENTITY_TYPE_SLUGS: readonly ["activity", "agents", "connectors", "data", "memory", "members", "settings", "events", "automations", "connections", "sources", "environments", "infrastructure", "inference-providers", "devices", "entity-types", "recent", "chat", "-", "organization", "user", "automation", "content", "source", "connector"];
41
+ export declare const RESERVED_ENTITY_TYPE_SLUGS: readonly ["activity", "agents", "connectors", "data", "memory", "members", "settings", "events", "automations", "connections", "sources", "environments", "infrastructure", "inference-providers", "devices", "entity-types", "recent", "chat", "views", "-", "organization", "user", "automation", "content", "source", "connector"];
42
42
  /**
43
43
  * Whether a proposed entity-type slug is illegal for user/API create.
44
44
  * `$…` is reserved for platform-named types ($member, $resource).
@@ -113,15 +113,17 @@ exports.RESERVED_ENTITY_TYPE_SLUGS = [
113
113
  // Live /$owner/<segment> routes that are NOT owner-nav segments (so they are
114
114
  // absent from OWNER_ROUTE_SEGMENTS). Entity pages render through the
115
115
  // `/$owner/$` splat, which a static segment always outranks, so an entity
116
- // type with one of these slugs is permanently shadowed: `recent` loses its
117
- // list page to /$owner/recent, while `entity-types` and `chat` have no index
118
- // route and instead lose every detail page to /$owner/entity-types/$slug and
119
- // /$owner/chat/$agentId. Create-time hygiene only — deliberately not added to
116
+ // type with one of these slugs is permanently shadowed: `recent` and `chat`
117
+ // lose their list page to the /$owner/recent and /$owner/chat index routes,
118
+ // while `entity-types` and `views` have no index route and instead lose
119
+ // every detail page to /$owner/entity-types/$slug and
120
+ // /$owner/views/$view. Create-time hygiene only — deliberately not added to
120
121
  // OWNER_ROUTE_SEGMENTS, which also feeds the SPA's entity-splat routing
121
122
  // guard and would break any existing entity type already using the slug.
122
123
  "entity-types",
123
124
  "recent",
124
125
  "chat",
126
+ "views",
125
127
  // The web host's view marker (`/<type>/-/views/<key>`): a type stored as `-`
126
128
  // would make its own list page parse as a view path.
127
129
  view_path_1.VIEW_PATH_MARKER,
@@ -0,0 +1,8 @@
1
+ /** Recognize accepted approvals without treating them as completed writes. */
2
+ export declare function isPendingToolApproval(value: unknown): boolean;
3
+ /** Interpret legacy application result values; protocol errors stay with their transport. */
4
+ export declare function getToolResultFailure(actionName: string, value: unknown): {
5
+ message: string;
6
+ result: Record<string, unknown>;
7
+ } | null;
8
+ //# sourceMappingURL=tool-result.d.ts.map
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isPendingToolApproval = isPendingToolApproval;
4
+ exports.getToolResultFailure = getToolResultFailure;
5
+ /** Recognize accepted approvals without treating them as completed writes. */
6
+ function isPendingToolApproval(value) {
7
+ if (!value || typeof value !== "object" || Array.isArray(value))
8
+ return false;
9
+ const result = value;
10
+ return (result.status === "pending_approval" || result.approval_queued === true);
11
+ }
12
+ /** Interpret legacy application result values; protocol errors stay with their transport. */
13
+ function getToolResultFailure(actionName, value) {
14
+ if (!value || typeof value !== "object" || Array.isArray(value))
15
+ return null;
16
+ const result = value;
17
+ const hasError = result.error !== undefined && result.error !== null;
18
+ const summary = result.summary &&
19
+ typeof result.summary === "object" &&
20
+ !Array.isArray(result.summary)
21
+ ? result.summary
22
+ : null;
23
+ const allAggregateItemsFailed = typeof summary?.failed === "number" &&
24
+ summary.failed > 0 &&
25
+ summary.successful === 0;
26
+ // Some mutation policies return `success:false` while durably queueing an
27
+ // approval. That is a non-terminal accepted outcome, not a business failure;
28
+ // callers need its approval URL/run id to continue the workflow.
29
+ const acceptedForApproval = isPendingToolApproval(result);
30
+ const reportsFailure = !acceptedForApproval &&
31
+ (result.success === false ||
32
+ result.ok === false ||
33
+ result.status === "failed" ||
34
+ result.status === "error" ||
35
+ result.status === "timeout" ||
36
+ allAggregateItemsFailed);
37
+ if (!hasError && !reportsFailure)
38
+ return null;
39
+ const failedItem = Array.isArray(result.results)
40
+ ? result.results.find((item) => item !== null &&
41
+ typeof item === "object" &&
42
+ !Array.isArray(item) &&
43
+ item.success === false)
44
+ : undefined;
45
+ const candidates = [
46
+ result.error,
47
+ result.error_message,
48
+ result.message,
49
+ result.reason,
50
+ failedItem?.error,
51
+ failedItem?.error_message,
52
+ failedItem?.message,
53
+ failedItem?.reason,
54
+ ];
55
+ const message = candidates.find((candidate) => typeof candidate === "string" && candidate.trim().length > 0);
56
+ return {
57
+ message: message?.trim() ?? `Action '${actionName}' failed`,
58
+ result,
59
+ };
60
+ }
61
+ //# sourceMappingURL=tool-result.js.map
@@ -223,7 +223,7 @@ function isSecretObjectKey(key) {
223
223
  * the value is a credential, so the whole value is replaced without
224
224
  * inspection. Credential CONTAINERS (`hasCredentialSegment`) are deliberately
225
225
  * excluded — their collapse rule depends on the value type (see the walk),
226
- * and collapsing a map parent would destroy surviving key names the Loki
226
+ * and collapsing a map parent would destroy surviving key names an upstream
227
227
  * connector pre-redacted.
228
228
  */
229
229
  function isStrongSecretKey(key) {
@@ -112,6 +112,10 @@ function parsePositiveIntEnv(name, fallback, allowZero = false) {
112
112
  * Verify and decrypt a worker authentication token
113
113
  */
114
114
  function verifyToken(token, expectedKind) {
115
+ // Routes try a worker token before PAT/OAuth, so most bearers seen here are
116
+ // something else. Only a token in the worker envelope is a failed verify.
117
+ if (!looksLikeWorkerToken(token))
118
+ return null;
115
119
  try {
116
120
  const parsed = JSON.parse((0, encryption_1.decrypt)(token));
117
121
  // Decrypted plaintext is attacker-influenced — `as` would coerce `null`,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobu/core",
3
- "version": "24.4.0",
3
+ "version": "24.6.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Core types and utilities for Lobu agent platform",
6
6
  "repository": {
@@ -136,6 +136,11 @@
136
136
  "import": "./dist/contracts/tools/view-content-hash.js",
137
137
  "require": "./dist/contracts/tools/view-content-hash.js"
138
138
  },
139
+ "./contracts/tools/manage-inference-providers": {
140
+ "types": "./dist/contracts/tools/manage-inference-providers.d.ts",
141
+ "import": "./dist/contracts/tools/manage-inference-providers.js",
142
+ "require": "./dist/contracts/tools/manage-inference-providers.js"
143
+ },
139
144
  "./contracts/tools/manage-auth-profiles": {
140
145
  "types": "./dist/contracts/tools/manage-auth-profiles.d.ts",
141
146
  "import": "./dist/contracts/tools/manage-auth-profiles.js",
@@ -231,6 +236,16 @@
231
236
  "import": "./dist/contracts/tools/view-definition.js",
232
237
  "require": "./dist/contracts/tools/view-definition.js"
233
238
  },
239
+ "./contracts/tools/pagination": {
240
+ "types": "./dist/contracts/tools/pagination.d.ts",
241
+ "import": "./dist/contracts/tools/pagination.js",
242
+ "require": "./dist/contracts/tools/pagination.js"
243
+ },
244
+ "./contracts/tools/view-host": {
245
+ "types": "./dist/contracts/tools/view-host.d.ts",
246
+ "import": "./dist/contracts/tools/view-host.js",
247
+ "require": "./dist/contracts/tools/view-host.js"
248
+ },
234
249
  "./contracts/tools/view-runtime": {
235
250
  "types": "./dist/contracts/tools/view-runtime.d.ts",
236
251
  "import": "./dist/contracts/tools/view-runtime.js",
@@ -12,9 +12,8 @@
12
12
  * - reads: `query_sql`, `query_sdk`, and tools the registry marks
13
13
  * `readOnlyHint` (`read_knowledge`, `get_automation`, `query_metric`, …);
14
14
  * actions: `invoke_view_action`. The web host refuses every other tool, so
15
- * mixed read/write tools such as `manage_connections` are not reachable
16
- * from a view: read that data with a `query_sdk` script
17
- * (`client.connections.list()`) instead.
15
+ * mixed read/write tools require an explicitly admitted read action.
16
+ * Use structured `tool()` arguments for entity and schema reads.
18
17
  * - `setParams` → `ui/update-model-context` `{ structuredContent: { view,
19
18
  * params } }`; the web host mirrors it into the address bar. Hosts without
20
19
  * that capability keep params local to the frame.
@@ -53,6 +52,7 @@
53
52
  * ```
54
53
  */
55
54
  import type { CollectionSelection } from "@lobu/core/contracts/tools/collection-selection";
55
+ import type { EntityGetInput } from "@lobu/core/contracts/tools/manage-entity";
56
56
  import type { ViewAttachment } from "@lobu/core/contracts/tools/manage-views";
57
57
  import { type ReactNode } from "react";
58
58
  import { type ToolResult, ViewBridge } from "./bridge.js";
@@ -167,6 +167,11 @@ export declare function useHost(): {
167
167
  * rejects when the host declines.
168
168
  */
169
169
  openLink: (url: string) => Promise<void>;
170
+ openRecord: (record: EntityGetInput, options?: {
171
+ mode?: "peek" | "page";
172
+ }) => Promise<{
173
+ mode: "peek" | "page";
174
+ }>;
170
175
  /** `inline` as a card on a page, `fullscreen` as the view's own surface.
171
176
  * Render a summary inline and the full view fullscreen. */
172
177
  displayMode: DisplayMode;
@@ -195,7 +200,7 @@ export declare function sql(strings: TemplateStringsArray, ...values: unknown[])
195
200
  export declare function escapeLiteral(value: unknown): string;
196
201
  /** Direct tool read, for a tool the registry marks `readOnlyHint`
197
202
  * (`read_knowledge`, `get_automation`, …). The web host refuses mixed
198
- * read/write tools such as `manage_connections`; use `query_sdk` for those reads. */
203
+ * read/write tools require an explicitly admitted read action. */
199
204
  export interface ToolQuery {
200
205
  kind: "tool";
201
206
  name: string;
@@ -1,7 +1,7 @@
1
1
  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
- import { ViewBridge } from "./bridge.js";
4
+ import { ViewBridge, ViewBridgeError, } from "./bridge.js";
5
5
  export function defineView(def) {
6
6
  if (!def || typeof def.key !== "string" || def.key.length === 0) {
7
7
  throw new Error("defineView({ key, attach, ... }) requires a non-empty key");
@@ -32,6 +32,7 @@ export function useHost() {
32
32
  ready: rt.ready,
33
33
  theme: rt.theme,
34
34
  openLink: rt.openLink,
35
+ openRecord: rt.openRecord,
35
36
  displayMode: rt.displayMode,
36
37
  container: rt.container,
37
38
  requestDisplayMode: rt.requestDisplayMode,
@@ -511,7 +512,7 @@ class RenderBoundary extends Component {
511
512
  render() {
512
513
  if (!this.state.error)
513
514
  return this.props.children;
514
- return (_jsxs("div", { role: "alert", style: { padding: 12, color: "var(--fg)" }, children: ["This view failed to render: ", this.state.error.message] }));
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] }));
515
516
  }
516
517
  }
517
518
  /**
@@ -631,6 +632,34 @@ export function Provider({ def, bridge, children, }) {
631
632
  if (error)
632
633
  throw new Error(error);
633
634
  }, []);
635
+ const openRecord = useCallback(async (record, options) => {
636
+ const b = bridgeRef.current;
637
+ if (!b?.isConnected())
638
+ throw new Error("Not connected to a host");
639
+ try {
640
+ return await b.openRecord(record, options?.mode ?? "peek");
641
+ }
642
+ catch (error) {
643
+ // Only an unsupported extension falls back. A host refusal stays a refusal.
644
+ if (!(error instanceof ViewBridgeError) || error.code !== -32601)
645
+ throw error;
646
+ }
647
+ const response = await b.callTool("manage_entity", {
648
+ ...record,
649
+ action: "get",
650
+ });
651
+ const error = resultError(response);
652
+ if (error)
653
+ throw new Error(error);
654
+ const result = (response.structuredContent ??
655
+ parseTextJson(response));
656
+ if (!result?.entity?.view_url)
657
+ throw new Error("The host did not return a record URL.");
658
+ const failed = resultError(await b.openLink(result.entity.view_url));
659
+ if (failed)
660
+ throw new Error(failed);
661
+ return { mode: "page" };
662
+ }, []);
634
663
  const requestDisplayMode = useCallback(async (mode) => {
635
664
  const b = bridgeRef.current;
636
665
  if (!b?.isConnected())
@@ -649,6 +678,7 @@ export function Provider({ def, bridge, children, }) {
649
678
  dataVersion,
650
679
  callTool,
651
680
  openLink,
681
+ openRecord,
652
682
  displayMode,
653
683
  container,
654
684
  requestDisplayMode,
@@ -663,6 +693,7 @@ export function Provider({ def, bridge, children, }) {
663
693
  dataVersion,
664
694
  callTool,
665
695
  openLink,
696
+ openRecord,
666
697
  displayMode,
667
698
  container,
668
699
  requestDisplayMode,
@@ -13,6 +13,11 @@
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 type { EntityGetInput } from "@lobu/core/contracts/tools/manage-entity";
17
+ export declare class ViewBridgeError extends Error {
18
+ readonly code: number;
19
+ constructor(message: string, code: number);
20
+ }
16
21
  export interface ToolResult {
17
22
  isError?: boolean;
18
23
  structuredContent?: unknown;
@@ -117,6 +122,9 @@ export declare class ViewBridge {
117
122
  * reads `structuredContent`; the boolean-only hook on the card path is
118
123
  * what this deliberately does not copy). */
119
124
  callTool(name: string, args: Record<string, unknown>): Promise<ToolResult>;
125
+ openRecord(record: EntityGetInput, mode: "peek" | "page"): Promise<{
126
+ mode: "peek" | "page";
127
+ }>;
120
128
  /** Read one `resources/read` URI and return the first text payload. The
121
129
  * generic loader uses this to fetch `ui://lobu/views/<key>` through the
122
130
  * host instead of a custom message. */
@@ -13,7 +13,14 @@
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_WORKSPACE_META_KEY } from "@lobu/core/contracts/tools/view-runtime";
16
+ import { VIEW_OPEN_RECORD_METHOD, VIEW_WORKSPACE_META_KEY, } from "@lobu/core/contracts/tools/view-host";
17
+ export class ViewBridgeError extends Error {
18
+ code;
19
+ constructor(message, code) {
20
+ super(message);
21
+ this.code = code;
22
+ }
23
+ }
17
24
  /** Event notifications worth replaying to the mounted guest (context merges
18
25
  * into adopted state instead; anything else is ignored). */
19
26
  const HANDOFF_NOTIFICATIONS = new Set([
@@ -192,6 +199,9 @@ export class ViewBridge {
192
199
  : {}),
193
200
  });
194
201
  }
202
+ openRecord(record, mode) {
203
+ return this.request(VIEW_OPEN_RECORD_METHOD, { record, mode });
204
+ }
195
205
  /** Read one `resources/read` URI and return the first text payload. The
196
206
  * generic loader uses this to fetch `ui://lobu/views/<key>` through the
197
207
  * host instead of a custom message. */
@@ -304,7 +314,7 @@ export class ViewBridge {
304
314
  this.pending.delete(id);
305
315
  clearTimeout(pending.timer);
306
316
  if ("error" in data && isRecord(data.error)) {
307
- pending.reject(new Error(String(data.error.message ?? "Host request failed")));
317
+ pending.reject(new ViewBridgeError(String(data.error.message ?? "Host request failed"), Number(data.error.code)));
308
318
  return;
309
319
  }
310
320
  pending.resolve(data.result);
@@ -135,8 +135,9 @@ export declare function Sparkline({ values, width, height, label, }: {
135
135
  /**
136
136
  * A link the host opens: `href="deal/acme-renewal"` opens that record
137
137
  * (relative links resolve against the workspace root, see
138
- * `useHost().openLink`), a full URL opens a new tab. The sandboxed frame
139
- * cannot navigate itself, so every click goes through the host, modifier
138
+ * `useHost().openLink`). On Lobu hosts, supported same-workspace links open
139
+ * the peek pane; other app links navigate normally and external URLs open a new
140
+ * tab. The sandboxed frame cannot navigate itself, so every click goes through the host, modifier
140
141
  * clicks included; the anchor still shows the resolved address on hover.
141
142
  */
142
143
  export declare function Link({ href, children, }: {
@@ -167,4 +168,5 @@ export declare function TruncatedNotice({ shown, total, }: {
167
168
  }): import("react/jsx-runtime").JSX.Element;
168
169
  /** Format large counts compactly (1.2K, 3.4M). Plain numbers pass through. */
169
170
  export declare function formatCompact(value: number): string;
171
+ export * from "./native.js";
170
172
  //# sourceMappingURL=components.d.ts.map