@lobu/runtime-server 24.1.1 → 24.3.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 (322) hide show
  1. package/dist/catalogs/connectors.json +175 -39
  2. package/dist/catalogs/skills.json +2 -2
  3. package/dist/component.json +1 -1
  4. package/dist/connectors/gchat.ts +31 -1
  5. package/dist/connectors/google_gmail.ts +70 -41
  6. package/dist/connectors/google_gmail_references.ts +406 -0
  7. package/dist/connectors/linkedin-inbox-adapter.js +107 -36
  8. package/dist/connectors/linkedin-inbox.ts +13 -0
  9. package/dist/connectors/linkedin.ts +1 -1
  10. package/dist/connectors/postgres.ts +14 -8
  11. package/dist/connectors/reddit.ts +171 -5
  12. package/dist/connectors/whatsapp-web-adapter.js +147 -61
  13. package/dist/connectors/whatsapp-web-helpers.ts +6 -2
  14. package/dist/connectors/whatsapp_web.ts +48 -17
  15. package/dist/connectors/x-dm-adapter.js +252 -35
  16. package/dist/connectors/x.ts +189 -13
  17. package/dist/db/migrations/20261020140000_view_attachments_by_page.sql +3 -1
  18. package/dist/db/migrations/20261024050000_events_source_reference_arrival.sql +27 -0
  19. package/dist/db/migrations/20261026000000_turn_write_receipts.sql +36 -0
  20. package/dist/db/migrations/20261026190000_federated_relationship_endpoints.sql +143 -0
  21. package/dist/dependencies.bun.lock +137 -202
  22. package/dist/embeddings-server.mjs +81 -11
  23. package/dist/guest.bundle.js +62 -25
  24. package/dist/owletto/dist/assets/_-XKF0m81R.js +3 -0
  25. package/dist/owletto/dist/assets/_-e8MbEBtw.js +2 -0
  26. package/dist/owletto/dist/assets/_agentId-Cv9goIFf.js +2 -0
  27. package/dist/owletto/dist/assets/_agentId-emObu67X.js +2 -0
  28. package/dist/owletto/dist/assets/_automationId-CfFFAYK1.js +2 -0
  29. package/dist/owletto/dist/assets/_connectorKey._connectionId-D6NKXSOE.js +2 -0
  30. package/dist/owletto/dist/assets/_connectorKey.index-DFrkLLTU.js +2 -0
  31. package/dist/owletto/dist/assets/_conversationId-D3vuAQPe.js +2 -0
  32. package/dist/owletto/dist/assets/_eventId-BV5SQaUA.js +2 -0
  33. package/dist/owletto/dist/assets/_name-DjtJMop4.js +2 -0
  34. package/dist/owletto/dist/assets/_owner-oBX68rb9.js +3 -0
  35. package/dist/owletto/dist/assets/_shape-C4lLPAwI.js +2 -0
  36. package/dist/owletto/dist/assets/_skillKey-Cw-7q6hI.js +2 -0
  37. package/dist/owletto/dist/assets/_slug-B2g5qzn3.js +2 -0
  38. package/dist/owletto/dist/assets/_viewKey-CIKGCtdK.js +2 -0
  39. package/dist/owletto/dist/assets/_viewKey-Dx4kJo7o.js +2 -0
  40. package/dist/owletto/dist/assets/accept-invitation-38lHBvjO.js +2 -0
  41. package/dist/owletto/dist/assets/activity-route-view-voRYSM3a.js +2 -0
  42. package/dist/owletto/dist/assets/agent-card-controls-DiU7Un5w.js +2 -0
  43. package/dist/owletto/dist/assets/{agent-client-setup-list-BlXB4SE5.js → agent-client-setup-list-Bkyw22GW.js} +4 -4
  44. package/dist/owletto/dist/assets/agent-connect-pages-CpBxQCpx.js +2 -0
  45. package/dist/owletto/dist/assets/{agent-editor-form-DsSoeQeF.js → agent-editor-form-QrIDroFL.js} +2 -2
  46. package/dist/owletto/dist/assets/agent-guardrails-route-CyoGSxcZ.js +2 -0
  47. package/dist/owletto/dist/assets/{agent-loading-shells-B7v6Cffw.js → agent-loading-shells-CamDtzHY.js} +2 -2
  48. package/dist/owletto/dist/assets/agent-permissions-matrix-CgsQ8BK_.js +2 -0
  49. package/dist/owletto/dist/assets/{agent-skill-context-DFucg4c4.js → agent-skill-context-lWbXKEm1.js} +2 -2
  50. package/dist/owletto/dist/assets/agent-skills-route-D-w3tY_2.js +2 -0
  51. package/dist/owletto/dist/assets/agent-subpage-shell-CLqpn5Tb.js +2 -0
  52. package/dist/owletto/dist/assets/{agent-thread-D38STyeu.js → agent-thread-CsRexwTv.js} +4 -4
  53. package/dist/owletto/dist/assets/agents-DzH_FFKU.js +2 -0
  54. package/dist/owletto/dist/assets/agents-workbench-CmGrMvPC.js +2 -0
  55. package/dist/owletto/dist/assets/app-bridge-C4nPtae3.js +121 -0
  56. package/dist/owletto/dist/assets/app._appId-BO7G38fL.js +2 -0
  57. package/dist/owletto/dist/assets/automation-detail-content-DMYxs6F6.js +2 -0
  58. package/dist/owletto/dist/assets/automations-DzH_FFKU.js +2 -0
  59. package/dist/owletto/dist/assets/calendar-DDCCSPW6.js +2 -0
  60. package/dist/owletto/dist/assets/callback-DFciMR8u.js +2 -0
  61. package/dist/owletto/dist/assets/{card-jzhQrMDP.js → card-BCsbrdGs.js} +2 -2
  62. package/dist/owletto/dist/assets/{claim-B-wq745Q.js → claim-BRua2b_7.js} +2 -2
  63. package/dist/owletto/dist/assets/client-activity-scopes-BLIy1Zc3.js +2 -0
  64. package/dist/owletto/dist/assets/client-rows-DiJQ5D1z.js +2 -0
  65. package/dist/owletto/dist/assets/clients-8-EpRjsm.js +2 -0
  66. package/dist/owletto/dist/assets/{code-editor-CEqoCky-.js → code-editor-BFZa4EIt.js} +3 -3
  67. package/dist/owletto/dist/assets/connect-C0cHE9Xl.js +2 -0
  68. package/dist/owletto/dist/assets/connect-menu-D2K4tmvW.js +2 -0
  69. package/dist/owletto/dist/assets/connect._clientId-D4EG5a0v.js +2 -0
  70. package/dist/owletto/dist/assets/connected._clientId-DhoCT6sT.js +2 -0
  71. package/dist/owletto/dist/assets/connected._clientId.activity-Dn4qw2Us.js +2 -0
  72. package/dist/owletto/dist/assets/connected._clientId.index-BTI5JXA3.js +2 -0
  73. package/dist/owletto/dist/assets/connection-X9VU9Ijm.js +2 -0
  74. package/dist/owletto/dist/assets/connection-feed-detail-B6ydKasK.js +2 -0
  75. package/dist/owletto/dist/assets/connections-browser-BMV8bf54.js +2 -0
  76. package/dist/owletto/dist/assets/connector-boxes-DqZA-FdG.js +2 -0
  77. package/dist/owletto/dist/assets/{connector-provenance-D-ECOlMJ.js → connector-provenance-BIg8P8WY.js} +2 -2
  78. package/dist/owletto/dist/assets/connector-scope-lists-CJYz53YF.js +2 -0
  79. package/dist/owletto/dist/assets/{connectors-CH4KBZyT.js → connectors-BroKpwhB.js} +2 -2
  80. package/dist/owletto/dist/assets/{consent-C9ZpHb7V.js → consent-fzLN-Qy7.js} +2 -2
  81. package/dist/owletto/dist/assets/copy-button-Df7QXE0w.js +2 -0
  82. package/dist/owletto/dist/assets/{core.esm-BupT3V0i.js → core.esm-A1UnFbGs.js} +2 -2
  83. package/dist/owletto/dist/assets/create-BjwsYarn.js +2 -0
  84. package/dist/owletto/dist/assets/create-Dzr4mlr0.js +2 -0
  85. package/dist/owletto/dist/assets/create-automation-form-DHW6OUoS.js +3 -0
  86. package/dist/owletto/dist/assets/create-c94SPL21.js +2 -0
  87. package/dist/owletto/dist/assets/create._connectorKey-DLLn2nej.js +2 -0
  88. package/dist/owletto/dist/assets/{cronstrue-CWImw-kf.js → cronstrue-xxpD1P2-.js} +2 -2
  89. package/dist/owletto/dist/assets/{device-D-7WBe9E.js → device-C3AEoL5c.js} +2 -2
  90. package/dist/owletto/dist/assets/{device-pin-tombstone-2U0UMu3_.js → device-pin-tombstone-B_te59GE.js} +2 -2
  91. package/dist/owletto/dist/assets/device._deviceId-ZU09qrot.js +2 -0
  92. package/dist/owletto/dist/assets/elk-worker.min-BENGc9gn.js +23 -0
  93. package/dist/owletto/dist/assets/{entity-avatar-mdh7Kq5D.js → entity-avatar-CEV4ttUQ.js} +2 -2
  94. package/dist/owletto/dist/assets/entity-options-DJv2EhVV.js +2 -0
  95. package/dist/owletto/dist/assets/entity-page-BUghWZ1s.js +2 -0
  96. package/dist/owletto/dist/assets/entity-type-page-Lf6ONdpf.js +2 -0
  97. package/dist/owletto/dist/assets/event-card-CBlsG32u.js +2 -0
  98. package/dist/owletto/dist/assets/event-detail-BKSGEOdW.js +2 -0
  99. package/dist/owletto/dist/assets/events-feed-VfU4csn2.js +2 -0
  100. package/dist/owletto/dist/assets/feed-event-kinds-BYuZCoU4.js +2 -0
  101. package/dist/owletto/dist/assets/filter-bar-COU0sBFQ.js +2 -0
  102. package/dist/owletto/dist/assets/{full-page-spinner-BVbcpW3R.js → full-page-spinner-C1Q_jEzD.js} +2 -2
  103. package/dist/owletto/dist/assets/guardrails-6ZJv1uzM.js +2 -0
  104. package/dist/owletto/dist/assets/identity-BaFLmbSo.js +2 -0
  105. package/dist/owletto/dist/assets/index-008wj-Pz.js +7950 -0
  106. package/dist/owletto/dist/assets/index-BaetvYLa.js +2 -0
  107. package/dist/owletto/dist/assets/index-BiEf5xOE.css +1 -0
  108. package/dist/owletto/dist/assets/{index-CxF2XXzl.js → index-BrDP4PCs.js} +2 -2
  109. package/dist/owletto/dist/assets/index-BuXIeK7D.js +2 -0
  110. package/dist/owletto/dist/assets/index-CAVcR9za.js +2 -0
  111. package/dist/owletto/dist/assets/index-CMLfWGPU.js +2 -0
  112. package/dist/owletto/dist/assets/index-D0YEYP7N.js +2 -0
  113. package/dist/owletto/dist/assets/index-DFyBbp7b.js +2 -0
  114. package/dist/owletto/dist/assets/{index-D7gHOpfg.js → index-DNtYqkiA.js} +2 -2
  115. package/dist/owletto/dist/assets/index-DQxzeM37.js +2 -0
  116. package/dist/owletto/dist/assets/index-DkO0nPex.js +2 -0
  117. package/dist/owletto/dist/assets/index-KlRId0g6.js +2 -0
  118. package/dist/owletto/dist/assets/index-Ywnqi4A6.js +2 -0
  119. package/dist/owletto/dist/assets/index-wHFQv1aT.js +12 -0
  120. package/dist/owletto/dist/assets/index-xnxhf3Op.js +2 -0
  121. package/dist/owletto/dist/assets/{index-BTlx9K_t.js → index-yIub2xUM.js} +2 -2
  122. package/dist/owletto/dist/assets/json-diff-LE_vNZrM.js +4 -0
  123. package/dist/owletto/dist/assets/{list-skeleton-CepswBka.js → list-skeleton-Kzxi2OXB.js} +2 -2
  124. package/dist/owletto/dist/assets/login-DWOT6jtS.js +2 -0
  125. package/dist/owletto/dist/assets/logout-Dt_VDilG.js +2 -0
  126. package/dist/owletto/dist/assets/{member-scope-gate-DD4YBFn-.js → member-scope-gate-De75CR7W.js} +2 -2
  127. package/dist/owletto/dist/assets/memory-browse-page-p2vIbfkC.js +74 -0
  128. package/dist/owletto/dist/assets/{model-selector-CDrAjH31.js → model-selector-3l9lY50C.js} +2 -2
  129. package/dist/owletto/dist/assets/model-udnQ_S43.js +2 -0
  130. package/dist/owletto/dist/assets/models-CQj7GIOp.js +2 -0
  131. package/dist/owletto/dist/assets/new-BOwIHkre.js +2 -0
  132. package/dist/owletto/dist/assets/{new-ktz9Cs_P.js → new-BbdwuJPm.js} +2 -2
  133. package/dist/owletto/dist/assets/new-DTuFCQhV.js +2 -0
  134. package/dist/owletto/dist/assets/{oauth-workspace-access-lZNZ9gul.js → oauth-workspace-access-QPo4YwRX.js} +2 -2
  135. package/dist/owletto/dist/assets/organization-BDzjnqPf.js +2 -0
  136. package/dist/owletto/dist/assets/peek-pane-content-D7yt0PrA.js +2 -0
  137. package/dist/owletto/dist/assets/permissions-CfoY4WFY.js +2 -0
  138. package/dist/owletto/dist/assets/proposal-review-shell-CVkLnnKo.js +2 -0
  139. package/dist/owletto/dist/assets/public-shell-ready-DXUTTGGp.js +2 -0
  140. package/dist/owletto/dist/assets/record-activity-BXhvJbd9.js +2 -0
  141. package/dist/owletto/dist/assets/{record-session-Pbr5czGw.js → record-session-D07szzqN.js} +2 -2
  142. package/dist/owletto/dist/assets/renderer-AJxSmE3-.js +97 -0
  143. package/dist/owletto/dist/assets/reset-password-kRYyQuTY.js +2 -0
  144. package/dist/owletto/dist/assets/runs-lG2ChtOt.js +2 -0
  145. package/dist/owletto/dist/assets/runs-panel-LnGpHCAQ.js +2 -0
  146. package/dist/owletto/dist/assets/schema-type-editor-panel-C_Es0qDf.js +2 -0
  147. package/dist/owletto/dist/assets/settings-CEAOg7fr.js +2 -0
  148. package/dist/owletto/dist/assets/settings-gGYXbFfd.js +2 -0
  149. package/dist/owletto/dist/assets/skills-BOL5c_Tk.js +2 -0
  150. package/dist/owletto/dist/assets/source-record-panels-CjFPgKKJ.js +2 -0
  151. package/dist/owletto/dist/assets/status-dot-CSBtKT4g.js +2 -0
  152. package/dist/owletto/dist/assets/table-DHM-vCxP.js +2 -0
  153. package/dist/owletto/dist/assets/use-automations-C4TSie1i.js +2 -0
  154. package/dist/owletto/dist/assets/{use-mention-search-Dcunv4L0.js → use-mention-search-PfZrNbu_.js} +4 -4
  155. package/dist/owletto/dist/assets/use-scroll-sentinel-D-fJx_Md.js +2 -0
  156. package/dist/owletto/dist/assets/view-param-filters-DkX4YdDT.js +2 -0
  157. package/dist/owletto/dist/assets/views-access-required-2ubIf_3N.js +2 -0
  158. package/dist/owletto/dist/index.html +2 -2
  159. package/dist/server-main.bundle.mjs +137007 -132255
  160. package/npm-shrinkwrap.json +723 -1095
  161. package/package.json +7 -10
  162. package/vendor/@better-auth-kysely-adapter/LICENSE.md +20 -0
  163. package/vendor/@better-auth-kysely-adapter/README.md +17 -0
  164. package/vendor/@better-auth-kysely-adapter/dist/bun-sqlite-dialect-DoOVo4ja.mjs +123 -0
  165. package/vendor/@better-auth-kysely-adapter/dist/d1-sqlite-dialect-Cru74LbR.mjs +133 -0
  166. package/vendor/@better-auth-kysely-adapter/dist/index.d.mts +116 -0
  167. package/vendor/@better-auth-kysely-adapter/dist/index.mjs +719 -0
  168. package/vendor/@better-auth-kysely-adapter/dist/node-sqlite-dialect.d.mts +27 -0
  169. package/vendor/@better-auth-kysely-adapter/dist/node-sqlite-dialect.mjs +123 -0
  170. package/vendor/@better-auth-kysely-adapter/dist/sqlite-introspector-DSCAP82F.mjs +90 -0
  171. package/vendor/@better-auth-kysely-adapter/package.json +52 -0
  172. package/vendor/connector-sdk/dist/browser-requirement.js +1 -1
  173. package/vendor/connector-sdk/dist/connector-types.d.ts +34 -1
  174. package/vendor/connector-sdk/dist/index.d.ts +3 -1
  175. package/vendor/connector-sdk/dist/index.js +4 -0
  176. package/vendor/connector-sdk/dist/redact.d.ts +10 -0
  177. package/vendor/connector-sdk/dist/redact.js +130 -0
  178. package/vendor/connector-sdk/dist/types.d.ts +2 -1
  179. package/vendor/connector-sdk/package.json +6 -1
  180. package/vendor/core/dist/agent-tooling.d.ts +8 -0
  181. package/vendor/core/dist/agent-tooling.js +9 -1
  182. package/vendor/core/dist/capabilities.d.ts +1 -1
  183. package/vendor/core/dist/capabilities.js +5 -0
  184. package/vendor/core/dist/connector-query-errors.d.ts +6 -0
  185. package/vendor/core/dist/connector-query-errors.js +4 -0
  186. package/vendor/core/dist/contracts/entity-reference.d.ts +3 -0
  187. package/vendor/core/dist/contracts/entity-reference.js +31 -0
  188. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +3 -0
  189. package/vendor/core/dist/contracts/tools/manage-automations.js +4 -1
  190. package/vendor/core/dist/contracts/tools/manage-connections.js +1 -1
  191. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +2 -2
  192. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +117 -34
  193. package/vendor/core/dist/contracts/tools/manage-entity.js +47 -14
  194. package/vendor/core/dist/contracts/tools/manage-operations.d.ts +13 -4
  195. package/vendor/core/dist/contracts/tools/manage-operations.js +19 -7
  196. package/vendor/core/dist/contracts/tools/read-knowledge.d.ts +6 -1
  197. package/vendor/core/dist/contracts/tools/read-knowledge.js +20 -1
  198. package/vendor/core/dist/contracts/tools/view-attach.d.ts +1 -1
  199. package/vendor/core/dist/contracts/tools/view-runtime.d.ts +2 -0
  200. package/vendor/core/dist/contracts/tools/view-runtime.js +3 -1
  201. package/vendor/core/dist/contracts/worker/device-automation.d.ts +4 -9
  202. package/vendor/core/dist/contracts/worker/device-automation.js +10 -15
  203. package/vendor/core/dist/contracts/worker/protocol.d.ts +20 -0
  204. package/vendor/core/dist/contracts/worker/protocol.js +20 -0
  205. package/vendor/core/dist/errors.d.ts +0 -20
  206. package/vendor/core/dist/errors.js +1 -25
  207. package/vendor/core/dist/otel.js +38 -10
  208. package/vendor/core/dist/reserved.d.ts +6 -3
  209. package/vendor/core/dist/reserved.js +6 -3
  210. package/vendor/core/dist/utils/ajv.js +3 -1
  211. package/vendor/core/dist/worker/auth.d.ts +3 -2
  212. package/vendor/core/package.json +31 -5
  213. package/vendor/postgres/.bun-tag-22d644c2873790db +0 -0
  214. package/vendor/postgres/cf/src/query.js +3 -1
  215. package/vendor/postgres/cjs/src/query.js +3 -1
  216. package/vendor/postgres/src/query.js +3 -1
  217. package/vendor/views/dist/api.js +31 -7
  218. package/vendor/views/dist/bridge.d.ts +2 -1
  219. package/vendor/views/dist/bridge.js +10 -1
  220. package/vendor/views/package.json +1 -1
  221. package/dist/owletto/dist/assets/_-BorucF19.js +0 -3
  222. package/dist/owletto/dist/assets/_-CkGyNi0G.js +0 -2
  223. package/dist/owletto/dist/assets/_agentId-BrhcaxUk.js +0 -2
  224. package/dist/owletto/dist/assets/_agentId-DgRrCE2B.js +0 -2
  225. package/dist/owletto/dist/assets/_automationId-DSrZIYcs.js +0 -2
  226. package/dist/owletto/dist/assets/_connectorKey._connectionId-DWxv1uoi.js +0 -2
  227. package/dist/owletto/dist/assets/_connectorKey.index-BTP5ijdT.js +0 -2
  228. package/dist/owletto/dist/assets/_conversationId-98Y3RuRO.js +0 -2
  229. package/dist/owletto/dist/assets/_deploymentId-B1UWPY0i.js +0 -2
  230. package/dist/owletto/dist/assets/_eventId-BAnr8g8z.js +0 -2
  231. package/dist/owletto/dist/assets/_name-BUfFO_A0.js +0 -2
  232. package/dist/owletto/dist/assets/_owner-C79BwQ0I.js +0 -3
  233. package/dist/owletto/dist/assets/_shape-Ep6JpyFX.js +0 -2
  234. package/dist/owletto/dist/assets/_skillKey-B24alBfT.js +0 -2
  235. package/dist/owletto/dist/assets/_slug-DbPdDc-5.js +0 -2
  236. package/dist/owletto/dist/assets/_viewKey-DDUxjjFD.js +0 -2
  237. package/dist/owletto/dist/assets/_viewKey-hdpq3RoX.js +0 -2
  238. package/dist/owletto/dist/assets/accept-invitation-UXU5Fx2G.js +0 -2
  239. package/dist/owletto/dist/assets/activity-route-view-D7ORHntE.js +0 -2
  240. package/dist/owletto/dist/assets/agent-card-controls-CplnPhbv.js +0 -2
  241. package/dist/owletto/dist/assets/agent-connect-pages-BmknviTI.js +0 -2
  242. package/dist/owletto/dist/assets/agent-guardrails-route-TdvvIc_J.js +0 -2
  243. package/dist/owletto/dist/assets/agent-permissions-matrix-BkZu1LYE.js +0 -2
  244. package/dist/owletto/dist/assets/agent-skills-route-B3vvvZZe.js +0 -2
  245. package/dist/owletto/dist/assets/agent-subpage-shell-CZJvnjNC.js +0 -2
  246. package/dist/owletto/dist/assets/agents-DAOln24A.js +0 -2
  247. package/dist/owletto/dist/assets/agents-workbench-DJ67GZ93.js +0 -2
  248. package/dist/owletto/dist/assets/app-bridge-BCm4muqj.js +0 -128
  249. package/dist/owletto/dist/assets/app._appId-Cp78oEZ9.js +0 -2
  250. package/dist/owletto/dist/assets/automation-detail-content-DSwbRpbx.js +0 -2
  251. package/dist/owletto/dist/assets/automations-DAOln24A.js +0 -2
  252. package/dist/owletto/dist/assets/callback-CBexCo3F.js +0 -2
  253. package/dist/owletto/dist/assets/client-rows-BYbsXGy9.js +0 -2
  254. package/dist/owletto/dist/assets/clients-BhNl1tVq.js +0 -2
  255. package/dist/owletto/dist/assets/connect-wx-qqLir.js +0 -2
  256. package/dist/owletto/dist/assets/connect._clientId-kk0_4Svo.js +0 -2
  257. package/dist/owletto/dist/assets/connected._clientId-QR8o-7M5.js +0 -2
  258. package/dist/owletto/dist/assets/connected._clientId.activity-BqprYeOX.js +0 -2
  259. package/dist/owletto/dist/assets/connected._clientId.index-DhRoSzBr.js +0 -2
  260. package/dist/owletto/dist/assets/connection-CNm2ukrI.js +0 -2
  261. package/dist/owletto/dist/assets/connection-feed-detail-WcGCA6qY.js +0 -2
  262. package/dist/owletto/dist/assets/connections-browser-CrtnAs0Q.js +0 -2
  263. package/dist/owletto/dist/assets/connector-scope-lists-CRFEpSvk.js +0 -2
  264. package/dist/owletto/dist/assets/conversations-table-D_HOe1jN.js +0 -2
  265. package/dist/owletto/dist/assets/create-C4lptGWj.js +0 -2
  266. package/dist/owletto/dist/assets/create-CCjZxIkK.js +0 -2
  267. package/dist/owletto/dist/assets/create-DkgUQAbB.js +0 -2
  268. package/dist/owletto/dist/assets/create-automation-form-Bpy92SM5.js +0 -3
  269. package/dist/owletto/dist/assets/create._connectorKey-D6Kc-YQ3.js +0 -2
  270. package/dist/owletto/dist/assets/deployments-C5hvipQh.js +0 -2
  271. package/dist/owletto/dist/assets/deployments-CPpFAd_w.js +0 -2
  272. package/dist/owletto/dist/assets/deployments-body-DGII20dQ.js +0 -2
  273. package/dist/owletto/dist/assets/device._deviceId-Bn37UpWH.js +0 -2
  274. package/dist/owletto/dist/assets/entity-options-Clz_WXK-.js +0 -2
  275. package/dist/owletto/dist/assets/entity-page-D3e4iPle.js +0 -2
  276. package/dist/owletto/dist/assets/entity-type-page-DebN1vCM.js +0 -2
  277. package/dist/owletto/dist/assets/event-detail-DV_zfWnC.js +0 -2
  278. package/dist/owletto/dist/assets/events-feed-DO3IiJO2.js +0 -2
  279. package/dist/owletto/dist/assets/filter-editors-Bwhqj7lY.js +0 -2
  280. package/dist/owletto/dist/assets/guardrails-BiJollCA.js +0 -2
  281. package/dist/owletto/dist/assets/identity-HCFWtdaI.js +0 -2
  282. package/dist/owletto/dist/assets/index-8wxsyxqt.js +0 -2
  283. package/dist/owletto/dist/assets/index-9YuSRymd.js +0 -7950
  284. package/dist/owletto/dist/assets/index-B3c-0eZG.js +0 -2
  285. package/dist/owletto/dist/assets/index-B64PGxQm.js +0 -2
  286. package/dist/owletto/dist/assets/index-BSH07yVD.css +0 -1
  287. package/dist/owletto/dist/assets/index-BX0EA_oB.js +0 -2
  288. package/dist/owletto/dist/assets/index-CDz3-ieP.js +0 -12
  289. package/dist/owletto/dist/assets/index-CdJJaQDX.js +0 -2
  290. package/dist/owletto/dist/assets/index-CfT_W8Vo.js +0 -2
  291. package/dist/owletto/dist/assets/index-D3WHeGql.js +0 -2
  292. package/dist/owletto/dist/assets/index-DB1iWI_a.js +0 -2
  293. package/dist/owletto/dist/assets/index-DMNzF8Lf.js +0 -2
  294. package/dist/owletto/dist/assets/index-DyB3IzOA.js +0 -2
  295. package/dist/owletto/dist/assets/index-Vcq4gwWv.js +0 -2
  296. package/dist/owletto/dist/assets/index-fgAJydgX.js +0 -2
  297. package/dist/owletto/dist/assets/json-diff-DIN5Jhfx.js +0 -4
  298. package/dist/owletto/dist/assets/login-DxGYyE4n.js +0 -2
  299. package/dist/owletto/dist/assets/logout-Bkzc7J44.js +0 -2
  300. package/dist/owletto/dist/assets/memory-browse-page-BnuhLJ6X.css +0 -1
  301. package/dist/owletto/dist/assets/memory-browse-page-D_UlBa27.js +0 -103
  302. package/dist/owletto/dist/assets/models-BAVeysNq.js +0 -2
  303. package/dist/owletto/dist/assets/new-C2av0diq.js +0 -2
  304. package/dist/owletto/dist/assets/new-snm1ctHn.js +0 -2
  305. package/dist/owletto/dist/assets/organization-Cb0W823y.js +0 -2
  306. package/dist/owletto/dist/assets/peek-pane-content-BNR9ImQY.js +0 -2
  307. package/dist/owletto/dist/assets/permissions-Dv39zWKt.js +0 -2
  308. package/dist/owletto/dist/assets/proposal-review-shell-CFhOqCLf.js +0 -2
  309. package/dist/owletto/dist/assets/public-shell-ready-DqX8AXfw.js +0 -2
  310. package/dist/owletto/dist/assets/recent-QhnLDU1_.js +0 -2
  311. package/dist/owletto/dist/assets/record-activity-ZJntBfN_.js +0 -2
  312. package/dist/owletto/dist/assets/record-field-peek-Brh1IQGy.js +0 -2
  313. package/dist/owletto/dist/assets/reset-password-CzZw6RcC.js +0 -2
  314. package/dist/owletto/dist/assets/runs-panel-C0_DNTcq.js +0 -2
  315. package/dist/owletto/dist/assets/runs-table-B1APZv7d.js +0 -2
  316. package/dist/owletto/dist/assets/schema-value-normalization-CKdPjdPC.js +0 -97
  317. package/dist/owletto/dist/assets/settings-CgZ5Z7wD.js +0 -2
  318. package/dist/owletto/dist/assets/settings-VDNiffKU.js +0 -2
  319. package/dist/owletto/dist/assets/skills-DgDGscm5.js +0 -2
  320. package/dist/owletto/dist/assets/source-record-panels-BdfOVPWn.js +0 -2
  321. package/dist/owletto/dist/assets/view-param-filters-B0quibBi.js +0 -2
  322. /package/vendor/{postgres/.bun-tag-2f292c6554a8475e → @better-auth-kysely-adapter/.bun-tag-abf95749a412716} +0 -0
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PROVIDER_WINDOWED_QUOTA = exports.PROVIDER_BALANCE_EXHAUSTED = exports.AGENT_ERRORS = exports.AgentErrorCode = exports.ConfigError = exports.ConversationOwnedElsewhereError = exports.OrchestratorError = exports.ErrorCode = exports.WorkspaceError = exports.WorkerError = exports.BaseError = void 0;
3
+ exports.PROVIDER_WINDOWED_QUOTA = exports.PROVIDER_BALANCE_EXHAUSTED = exports.AGENT_ERRORS = exports.AgentErrorCode = exports.ConfigError = exports.OrchestratorError = exports.ErrorCode = exports.WorkspaceError = exports.WorkerError = exports.BaseError = void 0;
4
4
  exports.getErrorMessage = getErrorMessage;
5
5
  exports.toAgentErrorCode = toAgentErrorCode;
6
6
  /**
@@ -93,30 +93,6 @@ class OrchestratorError extends BaseError {
93
93
  }
94
94
  }
95
95
  exports.OrchestratorError = OrchestratorError;
96
- /**
97
- * Thrown when a worker spawn is declined because another replica already holds
98
- * the per-conversation lock for this turn — i.e. another pod legitimately OWNS
99
- * this conversation turn and is running it to completion.
100
- *
101
- * This is NOT a failure. It is the cross-pod "handled elsewhere" signal. Under
102
- * N>1 app replicas both pods drain the shared `thread_message` queue and race to
103
- * spawn the same per-conversation worker; exactly one wins the advisory lock.
104
- * The loser MUST drop silently — no user-facing error, no Critical log, no
105
- * retry (the winner holds the lock for the entire worker subprocess lifetime, so
106
- * retrying can never win). The winning pod discharges the shared turn-liveness
107
- * marker on its successful reply, so the user still receives the answer.
108
- *
109
- * Distinguished by type (not a magic message string) so the orchestrator can
110
- * tell "owned by another pod" apart from a genuine worker-startup failure (OOM,
111
- * spawn failure, bad config) which MUST still surface an error to the user.
112
- */
113
- class ConversationOwnedElsewhereError extends BaseError {
114
- constructor() {
115
- super(...arguments);
116
- this.name = "ConversationOwnedElsewhereError";
117
- }
118
- }
119
- exports.ConversationOwnedElsewhereError = ConversationOwnedElsewhereError;
120
96
  class ConfigError extends BaseError {
121
97
  constructor() {
122
98
  super(...arguments);
@@ -16,10 +16,6 @@ exports.getTraceparent = getTraceparent;
16
16
  const api_1 = require("@opentelemetry/api");
17
17
  Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function () { return api_1.SpanKind; } });
18
18
  Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function () { return api_1.SpanStatusCode; } });
19
- const exporter_trace_otlp_grpc_1 = require("@opentelemetry/exporter-trace-otlp-grpc");
20
- const resources_1 = require("@opentelemetry/resources");
21
- const sdk_trace_node_1 = require("@opentelemetry/sdk-trace-node");
22
- const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
23
19
  const logger_1 = require("./logger");
24
20
  const logger = (0, logger_1.createLogger)("otel");
25
21
  let provider = null;
@@ -33,18 +29,50 @@ function initTracing(config) {
33
29
  logger.debug("Tracing disabled (no OTEL_EXPORTER_OTLP_ENDPOINT configured)");
34
30
  return;
35
31
  }
36
- const resource = (0, resources_1.resourceFromAttributes)({
37
- [semantic_conventions_1.ATTR_SERVICE_NAME]: config.serviceName,
38
- [semantic_conventions_1.ATTR_SERVICE_VERSION]: config.serviceVersion || "1.0.0",
32
+ // Bare require (not createRequire(__filename)): tsc emits CJS with a native
33
+ // require, bun provides one for src TS, and the server ESM bundle banner
34
+ // defines `const require = __createRequire(import.meta.url)` for exactly
35
+ // these calls — while __filename has no shim there and would throw.
36
+ let exporterCtor;
37
+ let resourceFromAttributes;
38
+ let NodeTracerProvider;
39
+ let SimpleSpanProcessor;
40
+ let ATTR_SERVICE_NAME;
41
+ let ATTR_SERVICE_VERSION;
42
+ try {
43
+ exporterCtor =
44
+ require("@opentelemetry/exporter-trace-otlp-grpc").OTLPTraceExporter;
45
+ resourceFromAttributes =
46
+ require("@opentelemetry/resources").resourceFromAttributes;
47
+ ({
48
+ NodeTracerProvider,
49
+ SimpleSpanProcessor,
50
+ } = require("@opentelemetry/sdk-trace-node"));
51
+ ({
52
+ ATTR_SERVICE_NAME,
53
+ ATTR_SERVICE_VERSION,
54
+ } = require("@opentelemetry/semantic-conventions"));
55
+ }
56
+ catch (err) {
57
+ // Only a missing module means the optional peers aren't installed. A
58
+ // genuine load failure inside an installed OTel module (e.g. grpc native
59
+ // init) must surface as-is, not misreport as "not installed".
60
+ if (err?.code !== "MODULE_NOT_FOUND")
61
+ throw err;
62
+ throw new Error("Tracing is enabled (OTEL_EXPORTER_OTLP_ENDPOINT or enabled: true) but the optional OpenTelemetry peer dependencies are not installed (@opentelemetry/exporter-trace-otlp-grpc, @opentelemetry/resources, @opentelemetry/sdk-trace-node, @opentelemetry/semantic-conventions). Install them explicitly to enable tracing, or leave the endpoint unset to run without tracing.");
63
+ }
64
+ const resource = resourceFromAttributes({
65
+ [ATTR_SERVICE_NAME]: config.serviceName,
66
+ [ATTR_SERVICE_VERSION]: config.serviceVersion || "1.0.0",
39
67
  });
40
- const exporter = new exporter_trace_otlp_grpc_1.OTLPTraceExporter({
68
+ const exporter = new exporterCtor({
41
69
  url: config.otlpEndpoint,
42
70
  timeoutMillis: 30000,
43
71
  });
44
72
  // SimpleSpanProcessor exports immediately — workers are short-lived
45
- provider = new sdk_trace_node_1.NodeTracerProvider({
73
+ provider = new NodeTracerProvider({
46
74
  resource,
47
- spanProcessors: [new sdk_trace_node_1.SimpleSpanProcessor(exporter)],
75
+ spanProcessors: [new SimpleSpanProcessor(exporter)],
48
76
  });
49
77
  provider.register();
50
78
  tracer = api_1.trace.getTracer(config.serviceName, config.serviceVersion);
@@ -90,9 +90,12 @@ export declare const SANDBOX_ROW_KEY_PREFIX = "sandbox:";
90
90
  */
91
91
  export declare const SANDBOX_PROVIDER_KEY_PREFIX = "sandbox-provider:";
92
92
  /**
93
- * Path segments under `/connectors/` that are real routes, not connector keys:
93
+ * Path segments under `/connectors/` reserved from connector keys:
94
94
  * `/connectors/device/{id}`, `/connectors/client/{id}`, `/connectors/app/{id}`,
95
- * plus the static `create` flow and `deployments` pages.
95
+ * plus the static `create` flow. `deployments` is no longer a route (the
96
+ * audit feed now lives in the workspace Events page and the redirect was
97
+ * removed) but stays reserved so a stale `/connectors/deployments` bookmark always lands
98
+ * on the not-installed fallback instead of a connector that took the name.
96
99
  *
97
100
  * Model providers and sandboxes are namespaced INTO the `$connectorKey` param
98
101
  * with a `prefix:` because they share that one detail route. Devices, clients
@@ -104,7 +107,7 @@ export declare const SANDBOX_PROVIDER_KEY_PREFIX = "sandbox-provider:";
104
107
  */
105
108
  export declare const CONNECTOR_SUBROUTE_SEGMENTS: readonly ["device", "client", "app", "create", "deployments"];
106
109
  /**
107
- * Whether a connector key would be shadowed by a `/connectors/*` subroute.
110
+ * Whether a connector key is reserved under `/connectors/*`.
108
111
  * Compared lowercased: the router matches static segments case-insensitively
109
112
  * (no `caseSensitive` option is set), so `Device` is shadowed like `device`.
110
113
  */
@@ -195,9 +195,12 @@ exports.SANDBOX_ROW_KEY_PREFIX = "sandbox:";
195
195
  */
196
196
  exports.SANDBOX_PROVIDER_KEY_PREFIX = "sandbox-provider:";
197
197
  /**
198
- * Path segments under `/connectors/` that are real routes, not connector keys:
198
+ * Path segments under `/connectors/` reserved from connector keys:
199
199
  * `/connectors/device/{id}`, `/connectors/client/{id}`, `/connectors/app/{id}`,
200
- * plus the static `create` flow and `deployments` pages.
200
+ * plus the static `create` flow. `deployments` is no longer a route (the
201
+ * audit feed now lives in the workspace Events page and the redirect was
202
+ * removed) but stays reserved so a stale `/connectors/deployments` bookmark always lands
203
+ * on the not-installed fallback instead of a connector that took the name.
201
204
  *
202
205
  * Model providers and sandboxes are namespaced INTO the `$connectorKey` param
203
206
  * with a `prefix:` because they share that one detail route. Devices, clients
@@ -215,7 +218,7 @@ exports.CONNECTOR_SUBROUTE_SEGMENTS = [
215
218
  "deployments",
216
219
  ];
217
220
  /**
218
- * Whether a connector key would be shadowed by a `/connectors/*` subroute.
221
+ * Whether a connector key is reserved under `/connectors/*`.
219
222
  * Compared lowercased: the router matches static segments case-insensitively
220
223
  * (no `caseSensitive` option is set), so `Device` is shadowed like `device`.
221
224
  */
@@ -50,7 +50,9 @@ function formatAjvError(error) {
50
50
  case "type":
51
51
  return `${field}: must be ${error.params.type}`;
52
52
  case "required":
53
- return `missing required field: ${error.params.missingProperty}`;
53
+ // A nested object reports `required` at the object's own path; name the
54
+ // field from the root so `ref/backend_node_id` is not read as `backend_node_id`.
55
+ return `missing required field: ${error.instancePath ? `${field}/` : ""}${error.params.missingProperty}`;
54
56
  case "format":
55
57
  return `${field}: must be a valid ${error.params.format}`;
56
58
  case "minimum":
@@ -44,12 +44,13 @@ export interface WorkerTokenData {
44
44
  timestamp: number;
45
45
  platform?: string;
46
46
  /**
47
- * Headless run origin (`platformMetadata.source`, e.g. automation-run /
47
+ * Turn origin (`platformMetadata.source`, e.g. automation-run /
48
48
  * scheduled-job / connector-repair / internal). Carried so interaction
49
49
  * cards emitted from a headless turn can be stamped headless and exempted
50
50
  * from the SSE-owner gate — no browser SSE connection exists on any pod for
51
51
  * a headless run, so an owner-gated card would dead-letter. Absent for
52
- * interactive (browser-driven) runs.
52
+ * interactive (browser-driven) runs. `followup` marks a chat follow-up: not
53
+ * headless, and still decided by its chat sender.
53
54
  */
54
55
  source?: string;
55
56
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobu/core",
3
- "version": "24.1.1",
3
+ "version": "24.3.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Core types and utilities for Lobu agent platform",
6
6
  "repository": {
@@ -66,6 +66,11 @@
66
66
  "import": "./dist/utils/ajv.js",
67
67
  "require": "./dist/utils/ajv.js"
68
68
  },
69
+ "./diagnostic-scrubber": {
70
+ "types": "./dist/utils/diagnostic-scrubber.d.ts",
71
+ "import": "./dist/utils/diagnostic-scrubber.js",
72
+ "require": "./dist/utils/diagnostic-scrubber.js"
73
+ },
69
74
  "./contracts/tools/manage-connections": {
70
75
  "types": "./dist/contracts/tools/manage-connections.d.ts",
71
76
  "import": "./dist/contracts/tools/manage-connections.js",
@@ -240,18 +245,39 @@
240
245
  "types": "./dist/contracts/tools/source-files.d.ts",
241
246
  "import": "./dist/contracts/tools/source-files.js",
242
247
  "require": "./dist/contracts/tools/source-files.js"
248
+ },
249
+ "./contracts/entity-reference": {
250
+ "types": "./dist/contracts/entity-reference.d.ts",
251
+ "import": "./dist/contracts/entity-reference.js",
252
+ "require": "./dist/contracts/entity-reference.js"
243
253
  }
244
254
  },
245
255
  "dependencies": {
246
256
  "@opentelemetry/api": "^1.9.0",
247
- "@opentelemetry/exporter-trace-otlp-grpc": "^0.222.0",
248
- "@opentelemetry/resources": "^2.11.0",
249
- "@opentelemetry/sdk-trace-node": "^2.11.0",
250
- "@opentelemetry/semantic-conventions": "^1.28.0",
251
257
  "@sinclair/typebox": "^0.34.41",
252
258
  "acorn": "^8.16.0",
253
259
  "ajv": "^8.17.1",
254
260
  "ajv-formats": "^3.0.1",
255
261
  "winston": "^3.17.0"
262
+ },
263
+ "peerDependencies": {
264
+ "@opentelemetry/exporter-trace-otlp-grpc": "^0.221.0",
265
+ "@opentelemetry/resources": "^2.10.0",
266
+ "@opentelemetry/sdk-trace-node": "^2.10.0",
267
+ "@opentelemetry/semantic-conventions": "^1.28.0"
268
+ },
269
+ "peerDependenciesMeta": {
270
+ "@opentelemetry/exporter-trace-otlp-grpc": {
271
+ "optional": true
272
+ },
273
+ "@opentelemetry/resources": {
274
+ "optional": true
275
+ },
276
+ "@opentelemetry/sdk-trace-node": {
277
+ "optional": true
278
+ },
279
+ "@opentelemetry/semantic-conventions": {
280
+ "optional": true
281
+ }
256
282
  }
257
283
  }
File without changes
@@ -50,7 +50,9 @@ export class Query extends Promise {
50
50
  }
51
51
 
52
52
  cancel() {
53
- return this.canceller && (this.canceller(this), this.canceller = null)
53
+ // Cancellation uses a separate connection and is best effort. Its failure
54
+ // must not escape as an unhandled rejection; the statement settles itself.
55
+ return this.canceller && (this.canceller(this).catch(() => {}), this.canceller = null)
54
56
  }
55
57
 
56
58
  simple() {
@@ -50,7 +50,9 @@ const Query = module.exports.Query = class Query extends Promise {
50
50
  }
51
51
 
52
52
  cancel() {
53
- return this.canceller && (this.canceller(this), this.canceller = null)
53
+ // Cancellation uses a separate connection and is best effort. Its failure
54
+ // must not escape as an unhandled rejection; the statement settles itself.
55
+ return this.canceller && (this.canceller(this).catch(() => {}), this.canceller = null)
54
56
  }
55
57
 
56
58
  simple() {
@@ -50,7 +50,9 @@ export class Query extends Promise {
50
50
  }
51
51
 
52
52
  cancel() {
53
- return this.canceller && (this.canceller(this), this.canceller = null)
53
+ // Cancellation uses a separate connection and is best effort. Its failure
54
+ // must not escape as an unhandled rejection; the statement settles itself.
55
+ return this.canceller && (this.canceller(this).catch(() => {}), this.canceller = null)
54
56
  }
55
57
 
56
58
  simple() {
@@ -207,6 +207,12 @@ export function useQuery(query, options = {}) {
207
207
  // answer already on screen, drops a result.
208
208
  const readSeq = useRef(0);
209
209
  const shownSeq = useRef(0);
210
+ // A data change while a read is still answering waits for it and then reads
211
+ // once more, so a burst of writes costs one follow-up read instead of one
212
+ // concurrent read per write.
213
+ const reading = useRef(0);
214
+ const owed = useRef(false);
215
+ const [followUp, setFollowUp] = useState(0);
210
216
  const key = query === null
211
217
  ? null
212
218
  : typeof query === "string"
@@ -214,11 +220,12 @@ export function useQuery(query, options = {}) {
214
220
  : query.kind === "tool"
215
221
  ? `tool:${query.name}:${JSON.stringify(query.args)}`
216
222
  : `sql:${query.text}`;
217
- // biome-ignore lint/correctness/useExhaustiveDependencies: key is the stable identity of query (listing query itself refetches every render); rt.callTool is stable; tick and rt.dataVersion are the intentional refetch triggers.
223
+ // biome-ignore lint/correctness/useExhaustiveDependencies: key is the stable identity of query (listing query itself refetches every render); rt.callTool is stable; tick, rt.dataVersion and followUp are the intentional refetch triggers.
218
224
  useEffect(() => {
219
225
  // A skipped query is idle, even when the previous request is in flight.
220
226
  if (key === null) {
221
227
  lastRead.current = null;
228
+ owed.current = false;
222
229
  setState((s) => (s.loading ? { ...s, loading: false } : s));
223
230
  return;
224
231
  }
@@ -231,17 +238,33 @@ export function useQuery(query, options = {}) {
231
238
  lastRead.current.tick === tick) {
232
239
  return;
233
240
  }
241
+ const last = lastRead.current;
242
+ const background = last?.key === key &&
243
+ last.tick === tick &&
244
+ (last.dataVersion !== rt.dataVersion || last.followUp !== followUp);
245
+ lastRead.current = { key, dataVersion: rt.dataVersion, tick, followUp };
246
+ if (background && reading.current !== 0) {
247
+ owed.current = true;
248
+ return;
249
+ }
234
250
  const seq = ++readSeq.current;
251
+ reading.current = seq;
252
+ owed.current = false;
235
253
  const show = (next) => {
236
254
  if (lastRead.current?.key !== key || seq < shownSeq.current)
237
255
  return;
238
256
  shownSeq.current = seq;
239
257
  setState(next);
240
258
  };
241
- const background = lastRead.current?.key === key &&
242
- lastRead.current.tick === tick &&
243
- lastRead.current.dataVersion !== rt.dataVersion;
244
- lastRead.current = { key, dataVersion: rt.dataVersion, tick };
259
+ const settle = () => {
260
+ if (reading.current !== seq)
261
+ return;
262
+ reading.current = 0;
263
+ if (owed.current && lastRead.current?.key === key) {
264
+ owed.current = false;
265
+ setFollowUp((n) => n + 1);
266
+ }
267
+ };
245
268
  if (!background)
246
269
  setState((s) => ({ ...s, loading: true }));
247
270
  const q = query;
@@ -264,8 +287,9 @@ export function useQuery(query, options = {}) {
264
287
  truncatedColumns: [],
265
288
  loading: false,
266
289
  });
267
- });
268
- }, [key, rt.ready, tick, rt.dataVersion, live]);
290
+ })
291
+ .finally(settle);
292
+ }, [key, rt.ready, tick, rt.dataVersion, followUp, live]);
269
293
  const refetch = useCallback(() => setTick((t) => t + 1), []);
270
294
  return { ...state, refetch };
271
295
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hand-written MCP Apps guest transport for Lobu views.
3
3
  *
4
- * Zero dependencies on purpose: the spike measured zod + MCP SDK + ext-apps at
4
+ * No protocol SDK dependencies: the spike measured zod + MCP SDK + ext-apps at
5
5
  * 378 KB of a 577 KB view bundle, so the guest speaks the wire protocol
6
6
  * directly instead of importing `@modelcontextprotocol/ext-apps`. The method
7
7
  * names below mirror that SDK (protocol version `2026-01-26`): the host side
@@ -73,6 +73,7 @@ export declare class ViewBridge {
73
73
  * before it (the host seeds scope + params there; anything read earlier
74
74
  * runs against defaults and double-fetches). */
75
75
  private toolInputReceived;
76
+ private workspace;
76
77
  private hostContext;
77
78
  private didConnect;
78
79
  private handoff;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hand-written MCP Apps guest transport for Lobu views.
3
3
  *
4
- * Zero dependencies on purpose: the spike measured zod + MCP SDK + ext-apps at
4
+ * No protocol SDK dependencies: the spike measured zod + MCP SDK + ext-apps at
5
5
  * 378 KB of a 577 KB view bundle, so the guest speaks the wire protocol
6
6
  * directly instead of importing `@modelcontextprotocol/ext-apps`. The method
7
7
  * names below mirror that SDK (protocol version `2026-01-26`): the host side
@@ -13,6 +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_WORKSPACE_META_KEY } from "@lobu/core/contracts/tools/view-runtime";
16
17
  /** Event notifications worth replaying to the mounted guest (context merges
17
18
  * into adopted state instead; anything else is ignored). */
18
19
  const HANDOFF_NOTIFICATIONS = new Set([
@@ -50,6 +51,7 @@ export class ViewBridge {
50
51
  * before it (the host seeds scope + params there; anything read earlier
51
52
  * runs against defaults and double-fetches). */
52
53
  toolInputReceived = false;
54
+ workspace = null;
53
55
  hostContext = {};
54
56
  didConnect = false;
55
57
  handoff = null;
@@ -159,6 +161,8 @@ export class ViewBridge {
159
161
  if (isRecord(h.toolInput)) {
160
162
  this.toolInputReceived = true;
161
163
  const args = h.toolInput;
164
+ this.workspace =
165
+ typeof args.organization === "string" ? args.organization : null;
162
166
  for (const listener of [...this.toolInputListeners])
163
167
  listener(args);
164
168
  }
@@ -183,6 +187,9 @@ export class ViewBridge {
183
187
  return this.request("tools/call", {
184
188
  name,
185
189
  arguments: args,
190
+ ...(this.workspace
191
+ ? { _meta: { [VIEW_WORKSPACE_META_KEY]: this.workspace } }
192
+ : {}),
186
193
  });
187
194
  }
188
195
  /** Read one `resources/read` URI and return the first text payload. The
@@ -307,6 +314,8 @@ export class ViewBridge {
307
314
  case "ui/notifications/tool-input": {
308
315
  this.toolInputReceived = true;
309
316
  const args = isRecord(params.arguments) ? params.arguments : {};
317
+ this.workspace =
318
+ typeof args.organization === "string" ? args.organization : null;
310
319
  for (const listener of [...this.toolInputListeners])
311
320
  listener(args);
312
321
  break;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobu/views",
3
- "version": "24.1.1",
3
+ "version": "24.3.0",
4
4
  "description": "Authoring runtime for Lobu views — React modules rendered in the sandboxed MCP Apps frame",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,3 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/entity-page-D3e4iPle.js","assets/index-9YuSRymd.js","assets/index-BSH07yVD.css","assets/record-activity-ZJntBfN_.js","assets/filter-editors-Bwhqj7lY.js","assets/connection-label-BobuYiAG.js","assets/source-record-panels-BdfOVPWn.js","assets/events-feed-DO3IiJO2.js","assets/conversations-table-D_HOe1jN.js","assets/clients-BhNl1tVq.js","assets/schema-value-normalization-CKdPjdPC.js","assets/card-jzhQrMDP.js","assets/client-rows-BYbsXGy9.js","assets/agent-loading-shells-B7v6Cffw.js","assets/member-scope-gate-DD4YBFn-.js","assets/record-field-peek-Brh1IQGy.js","assets/record-session-Pbr5czGw.js","assets/entity-avatar-mdh7Kq5D.js","assets/view-param-filters-B0quibBi.js","assets/app-bridge-BCm4muqj.js"])))=>i.map(i=>d[i]);
2
- import{al as x,am as m,an as p,ao as y,i as j,m as P,j as e,r as g,ap as R,l as f,_ as v}from"./index-9YuSRymd.js";import{P as r}from"./public-shell-ready-DqX8AXfw.js";const E=f(async()=>({default:(await v(async()=>{const{EntityPage:s}=await import("./entity-page-D3e4iPle.js");return{EntityPage:s}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))).EntityPage}));function l(){return e.jsx("div",{"data-public-loading":"true",children:e.jsx(R,{})})}function S(){const{owner:s,_splat:c}=x.useParams(),a=m(c||""),d=a?.viewKey,{path:u}=p(s,a?.entityPath),{data:t,isLoading:n,error:i}=y(u,{slug:s},{includeBootstrap:!0}),{session:h,isReady:o}=j();return P({active:!n&&o&&!h&&(!!i||!t),owner:s}),n||!o&&!t?e.jsx(l,{}):i||!t||!t.entity?e.jsxs(e.Fragment,{children:[e.jsx(r,{}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Not Found"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"We couldn't resolve this path."})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(r,{}),e.jsx(g.Suspense,{fallback:e.jsx(l,{}),children:e.jsx(E,{namespace:t.workspace,path:t.path,entity:t.entity,viewKey:d})})]})}export{S as component};
3
- //# sourceMappingURL=_-BorucF19.js.map
@@ -1,2 +0,0 @@
1
- import{c3 as t,j as p,c4 as m}from"./index-9YuSRymd.js";import{A as e}from"./activity-route-view-D7ORHntE.js";import"./record-activity-ZJntBfN_.js";import"./filter-editors-Bwhqj7lY.js";import"./connection-label-BobuYiAG.js";import"./source-record-panels-BdfOVPWn.js";import"./events-feed-DO3IiJO2.js";import"./conversations-table-D_HOe1jN.js";import"./clients-BhNl1tVq.js";import"./schema-value-normalization-CKdPjdPC.js";import"./card-jzhQrMDP.js";import"./client-rows-BYbsXGy9.js";import"./agent-loading-shells-B7v6Cffw.js";import"./member-scope-gate-DD4YBFn-.js";import"./public-shell-ready-DqX8AXfw.js";function w(){const{owner:o,_splat:r}=t.useParams(),i=t.useSearch();return p.jsx(e,{owner:o,search:i,entityScope:m(r||"").path})}export{w as component};
2
- //# sourceMappingURL=_-CkGyNi0G.js.map
@@ -1,2 +0,0 @@
1
- import{hd as r,j as e}from"./index-9YuSRymd.js";import{A as n}from"./agents-workbench-DJ67GZ93.js";import"./agent-editor-form-DsSoeQeF.js";import"./model-selector-CDrAjH31.js";import"./proposal-review-shell-CFhOqCLf.js";function i(){const{owner:o,agentId:t}=r.useParams();return e.jsx(n,{owner:o,agentId:t})}export{i as component};
2
- //# sourceMappingURL=_agentId-BrhcaxUk.js.map
@@ -1,2 +0,0 @@
1
- import{o as L,gd as y,r as u,ge as C,j as n,Q as D,gf as S,i as P,bh as R,a_ as E,aR as M,bb as N,ch as O,gg as Q,gh as $,bo as B,w as _}from"./index-9YuSRymd.js";import{L as z,A as F}from"./agent-thread-D38STyeu.js";import{A as H,C as U}from"./agent-loading-shells-B7v6Cffw.js";import"./app-bridge-BCm4muqj.js";import"./use-mention-search-Dcunv4L0.js";import"./index-Vcq4gwWv.js";import"./events-feed-DO3IiJO2.js";import"./conversations-table-D_HOe1jN.js";import"./clients-BhNl1tVq.js";import"./schema-value-normalization-CKdPjdPC.js";import"./card-jzhQrMDP.js";function W({owner:t,agent:s,threadId:e,afterMessagesContent:d,className:r,initialDraft:p,newChatRequested:m=!1,preventAutoNavigate:g}){const o=L(),i=s.agentId,{data:a=[]}=y(i,{orgSlug:t}),[l,x]=u.useState(()=>C()),[h,A]=u.useState(null);u.useEffect(()=>{!m||e||(x(C()),A(null),o({to:".",search:(f=>{const{new:b,...w}=f;return w}),replace:!0}))},[m,e,o]);const v=u.useMemo(()=>!h||a.some(f=>f.id===h.id)?a:[h,...a],[a,h]),c=e??l,T=!e||!v.some(f=>f.id===e),j=u.useCallback(()=>{if(v.some(b=>b.id===c))return;A({id:c,title:`Conversation ${v.length+1}`,createdAt:Date.now(),updatedAt:Date.now()});const f=S(t,i,c);o({...f,replace:!0})},[v,c,o,t,i]),k=u.useCallback(()=>{T&&!g&&j()},[T,j,g]);return n.jsx("div",{className:D("flex min-h-0 flex-1 flex-col",r),children:n.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:n.jsx(z,{agentId:i,workspaceSlug:t,thread:c,loadHistory:!!e,onFirstUserMessage:k,initialDraft:p,children:n.jsx(F,{afterMessagesContent:d})},`${i}:${c}`)})})}function q({owner:t,agentId:s,threadId:e,initialDraft:d,newChatRequested:r,afterMessagesContent:p,preventAutoNavigate:m}){const{isAuthenticated:g}=P(),{isMember:o,isLoading:i}=R(),a=g&&o,{data:l=[],isLoading:x}=E({enabled:a}),h=s??null,A=l.find(c=>c.agentId===h)??null;return a&&x||i?n.jsx(H,{}):A?n.jsx(W,{owner:t,agent:A,threadId:e,initialDraft:d,newChatRequested:r,afterMessagesContent:p,preventAutoNavigate:m,className:"min-h-0 flex-1 overflow-hidden"}):n.jsx(M,{icon:N,title:"Agent not found",description:"This agent may have been removed."})}function G(t){return[...t].sort((s,e)=>e.updatedAt-s.updatedAt)[0]}function J({owner:t,agentId:s,threadId:e,initialDraft:d,forceComposer:r=!1,newChatRequested:p=!1,afterMessagesContent:m,preventAutoNavigate:g}){const o=L(),{data:i=[],isLoading:a}=O(Q(t,s,{strict:!1})),l=u.useMemo(()=>G(i),[i]);return u.useEffect(()=>{if(e||r||a||!l)return;const x=S(t,s,l.id);o({...x,replace:!0})},[s,a,l,o,t,e,r]),!e&&!r&&(a||l)?n.jsx(U,{}):n.jsx(q,{owner:t,agentId:s,threadId:e,initialDraft:d,newChatRequested:p,afterMessagesContent:m,preventAutoNavigate:g})}function ie(){const{owner:t,agentId:s}=$.useParams(),{threadId:e}=B({strict:!1}),{new:d,prompt:r}=_({strict:!1});return n.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 pt-2.5 pb-4 lg:px-6 lg:pb-6",children:n.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col",children:n.jsx(J,{owner:t,agentId:s,threadId:e,initialDraft:r,forceComposer:!e,newChatRequested:!!d})})})}export{ie as component};
2
- //# sourceMappingURL=_agentId-DgRrCE2B.js.map
@@ -1,2 +0,0 @@
1
- import{o as N,n as A,ao as b,i as k,bh as L,e7 as C,j as t,B as n,gK as y,bb as R,S as _,L as $,b9 as D,h2 as u,ai as O}from"./index-9YuSRymd.js";import{A as z}from"./automation-detail-content-DSwbRpbx.js";import"./create-automation-form-Bpy92SM5.js";import"./cronstrue-CWImw-kf.js";import"./entity-options-Clz_WXK-.js";import"./connection-label-BobuYiAG.js";import"./model-selector-CDrAjH31.js";import"./skill-editor-D_W3QlRz.js";import"./code-editor-CEqoCky-.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./use-mention-search-Dcunv4L0.js";import"./proposal-review-shell-CFhOqCLf.js";import"./json-diff-DIN5Jhfx.js";import"./deployments-C5hvipQh.js";import"./events-feed-DO3IiJO2.js";import"./conversations-table-D_HOe1jN.js";import"./clients-BhNl1tVq.js";import"./schema-value-normalization-CKdPjdPC.js";import"./card-jzhQrMDP.js";function P({owner:e,automationId:o,view:a,runId:s}){const r=N(),{orgContext:p,hasOrgContext:x}=A(),{data:h,isLoading:m}=b(`/${e}`,p),{isAuthenticated:g}=k(),{isLoading:c}=L(),f=h?.workspace?.id??"",v=g?!x||m||c:m||c,i=C(o,void 0,f).data?.automation,j=i?.automation_name??"Automation",l=()=>void r({to:"/$owner/automations",params:{owner:e}}),d=()=>void r({to:"/$owner/automations/$automationId",params:{owner:e,automationId:o},search:{view:"activity",run_id:void 0}}),w=!s&&a==="definition";return t.jsx("div",{className:"flex flex-1 flex-col gap-6 px-4 pt-2.5 pb-8 lg:px-6",children:t.jsxs("div",{className:"mx-auto flex w-full min-w-0 max-w-3xl flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsxs(n,{type:"button",variant:"ghost",size:"sm",className:"h-8 gap-1.5 text-muted-foreground hover:text-foreground",onClick:l,children:[t.jsx(y,{className:"h-3.5 w-3.5"}),"Automations"]}),t.jsxs("h1",{className:"flex min-w-0 items-center gap-2 truncate font-display text-xl font-semibold",children:[t.jsx(R,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),v&&!i?t.jsx(_,{className:"h-5 w-40"}):s?"Review change":j]})]}),s?null:w?t.jsx(n,{type:"button",variant:"ghost",size:"sm",className:"h-8 text-muted-foreground hover:text-foreground",onClick:d,children:"Done"}):t.jsx(n,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 gap-1.5",children:t.jsxs($,{to:"/$owner/automations/$automationId",params:{owner:e,automationId:o},search:{view:"definition",run_id:void 0},children:[t.jsx(D,{className:"h-3.5 w-3.5"}),"Edit"]})})]}),t.jsx(z,{owner:e,agentId:i?.managed_agent_id??null,automationId:o,view:a,runId:s,onDone:s?l:d})]})})}function ot(){const{owner:e,automationId:o}=u.useParams(),a=u.useSearch();return t.jsx(O,{owner:e,children:()=>t.jsx(P,{owner:e,automationId:o,view:a.view,runId:a.run_id})})}export{ot as component};
2
- //# sourceMappingURL=_automationId-DSrZIYcs.js.map
@@ -1,2 +0,0 @@
1
- import{iD as I,j as e,ai as J,o as U,aA as q,d7 as z,cg as Q,cP as X,S as A,B as Y,L as p,aB as Z,im as K,io as ee,aP as ne,gb as h,ih as se,g9 as ae,aW as oe,i4 as te,ga as ie,ht as E,aJ as ce,x as re}from"./index-9YuSRymd.js";import{R as de,c as le,C as me}from"./device-pin-tombstone-2U0UMu3_.js";import{a as pe}from"./connector-provenance-D-ECOlMJ.js";import{f as ue,C as he,F as xe,a as fe,b as ve,A as je,c as Ce}from"./connection-feed-detail-WcGCA6qY.js";import{S as De,g as Ne}from"./runs-table-B1APZv7d.js";import{c as ge}from"./connection-label-BobuYiAG.js";import"./runs-panel-C0_DNTcq.js";import"./filter-editors-Bwhqj7lY.js";import"./connector-scope-lists-CRFEpSvk.js";import"./entity-options-Clz_WXK-.js";function ye(){const{owner:l,connectorKey:n,connectionId:v}=I.useParams(),{addFeed:o,feedId:c,settings:x,auth_result:t}=I.useSearch();return e.jsx(J,{owner:l,children:m=>e.jsx($e,{organizationId:m.organizationId,ownerSlug:m.ownerSlug,isWorkspaceLoading:m.isWorkspaceLoading,connectorKey:n,connectionId:Number(v),showAddFeed:o===!0,feedId:c,openSettings:x===!0,authResult:t})})}function $e({organizationId:l,ownerSlug:n,isWorkspaceLoading:v,connectorKey:o,connectionId:c,showAddFeed:x,feedId:t,openSettings:m,authResult:R}){const y=U(),{data:B=[]}=q(),{data:P=[],isLoading:M,isError:j,refetch:T}=z(l??"",{connectorKey:o,connectionIds:[c]}),{data:g=[]}=Q(l??""),{data:W=[],isLoading:O,isError:S,refetch:H}=X(t?c:null),s=P.find(i=>i.id===c),a=g.find(i=>i.key===o),r=t?W.find(i=>i.id===t):null;if(v||M||t&&O||!l)return e.jsxs("div",{className:"flex flex-1 flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[e.jsx(A,{className:"h-7 w-56"}),e.jsx(A,{className:"h-4 w-24"})]}),e.jsx(de,{})]});if(j||t&&S)return e.jsxs("div",{role:"alert",className:"space-y-2",children:[e.jsxs("p",{children:["Could not load this ",j?"connection":"feed","."]}),e.jsx(Y,{variant:"outline",size:"sm",onClick:()=>void(j?T():H()),children:"Retry"})]});if(!s)return e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found."}),e.jsxs(p,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:o},className:"mt-2 inline-block text-sm text-primary hover:underline",children:["Back to ",a?.name??o]})]});const $=ge({...s,connector_name:s.connector_name??a?.name??null}),C=!t&&!x,V=()=>void y({to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:n,connectorKey:o,connectionId:String(c)},search:{},replace:!0});let u,f=$,_,k,D;t?r?(f=ue(r,a),r.store==="channel_messages"?(u=e.jsx(he,{feed:r,hideHeader:!0}),D="chat channel"):(_=e.jsx(xe,{feed:r,ownerSlug:n}),k=e.jsx(fe,{feed:r}),u=e.jsx(ve,{feed:r,connectorDef:a,ownerSlug:n}))):(u=e.jsx("p",{className:"text-sm text-muted-foreground",children:"Feed not found."}),f="Feed"):x&&(u=e.jsx(je,{onClose:V,organizationId:l,connections:[s],connectorDefinitions:g}),f="Add feed",D=Ce);const d=B.find(i=>i.id===s.device_worker_id&&Z(i,n)),w=d?K(d):void 0,N=w?ee(n,w,ne()):void 0,F=[e.jsx(p,{to:"/$owner/connectors",params:{owner:n},className:h,children:"Connectors"},"connectors"),...d&&N?[e.jsx(p,{to:"/$owner/connectors/app/$appId",params:{owner:n,appId:N.id},className:h,children:N.name},"app"),e.jsx(p,{to:"/$owner/connectors/device/$deviceId",params:{owner:n,deviceId:d.id},className:h,children:se(d)},"device")]:[e.jsx(p,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:o},search:{},className:h,children:a?.name??o},"connector")]];C||F.push(e.jsx(p,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:n,connectorKey:o,connectionId:String(c)},search:{},className:h,children:$},"connection"));const b=C?le(s):null,G=D??b??void 0,L=e.jsx(ae,{breadcrumb:e.jsx(ie,{crumbs:F}),icon:a?e.jsx(oe,{icon:a.icon,name:a.name,faviconDomain:a.favicon_domain??te(a.auth_schema)}):null,title:f,status:_??e.jsx(De,{status:Ne(s.status),showDot:!0,children:s.status}),meta:k,caption:G,captionTone:b?"error":"muted"});return C?d&&a&&ce(a)?e.jsx(re,{to:"/$owner/connectors/device/$deviceId",params:{owner:n,deviceId:d.id},search:{connection:s.id,settings:m||void 0},hash:`connection-${s.id}`,replace:!0}):e.jsxs(E,{header:L,children:[e.jsx(pe,{connectorDef:a,connectorKey:o,ownerSlug:n,deviceWorkerId:s.device_worker_id,deviceLabel:s.device_label}),e.jsx(me,{embedded:!0,connection:s,connectorDef:a,ownerSlug:n,openSettings:m,authResult:R},s.id)]}):e.jsx(E,{header:L,children:e.jsx("div",{className:"mt-0",children:u})})}export{ye as component};
2
- //# sourceMappingURL=_connectorKey._connectionId-DWxv1uoi.js.map