@lobu/runtime-server 24.8.0 → 24.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/dist/catalogs/automations.json +2 -2
  2. package/dist/catalogs/connectors.json +99 -10
  3. package/dist/catalogs/skills.json +1 -1
  4. package/dist/component.json +1 -1
  5. package/dist/connectors/README.md +6 -2
  6. package/dist/connectors/github.ts +16 -3
  7. package/dist/connectors/market_quotes.ts +388 -91
  8. package/dist/connectors/postgres.ts +60 -38
  9. package/dist/connectors/whatsapp-web-adapter.js +41 -10
  10. package/dist/connectors/whatsapp-web-helpers.ts +12 -2
  11. package/dist/connectors/whatsapp_web.ts +18 -2
  12. package/dist/connectors/x-dm-adapter.js +55 -21
  13. package/dist/connectors/x.ts +1 -1
  14. package/dist/db/migrations/20261109010000_workspace_navigation.sql +14 -0
  15. package/dist/db/migrations/20261110010000_view_resources.sql +11 -0
  16. package/dist/db/migrations/20261112210000_instance_identity.sql +18 -0
  17. package/dist/dependencies.bun.lock +88 -86
  18. package/dist/embeddings-server.mjs +38 -5
  19. package/dist/owletto/dist/assets/_-CYvj1y65.js +3 -0
  20. package/dist/owletto/dist/assets/_-CeLTSYYY.js +2 -0
  21. package/dist/owletto/dist/assets/_agentId-BB5E-L6T.js +2 -0
  22. package/dist/owletto/dist/assets/_agentId-DN0EwMAC.js +2 -0
  23. package/dist/owletto/dist/assets/_automationId-DvUl9CSd.js +2 -0
  24. package/dist/owletto/dist/assets/_connectorKey._connectionId-CVKfL9AG.js +2 -0
  25. package/dist/owletto/dist/assets/_connectorKey.index-Cv6FzK1v.js +2 -0
  26. package/dist/owletto/dist/assets/{_conversationId-OJrZjd0o.js → _conversationId-CPpNySjO.js} +2 -2
  27. package/dist/owletto/dist/assets/_eventId-DZKicuq6.js +2 -0
  28. package/dist/owletto/dist/assets/_owner-Dauk3YuD.js +3 -0
  29. package/dist/owletto/dist/assets/_shape-cKrEID3T.js +2 -0
  30. package/dist/owletto/dist/assets/_slug-DJx_8fsV.js +2 -0
  31. package/dist/owletto/dist/assets/_viewKey-CPVzVKEf.js +2 -0
  32. package/dist/owletto/dist/assets/_viewKey-CW8gexOQ.js +2 -0
  33. package/dist/owletto/dist/assets/accept-invitation-Dwq1GAnG.js +2 -0
  34. package/dist/owletto/dist/assets/activity-route-location-C1jcXC7v.js +2 -0
  35. package/dist/owletto/dist/assets/activity-route-view-D78Wj0RH.js +2 -0
  36. package/dist/owletto/dist/assets/agent-connect-pages-DoI9UR0a.js +4 -0
  37. package/dist/owletto/dist/assets/{agent-editor-form-CDAHRNWl.js → agent-editor-form-DlavYg2q.js} +2 -2
  38. package/dist/owletto/dist/assets/{agent-loading-shells-BupiSjR-.js → agent-loading-shells-DYqQphN7.js} +2 -2
  39. package/dist/owletto/dist/assets/agent-permissions-matrix-C1L8IcYR.js +2 -0
  40. package/dist/owletto/dist/assets/{agent-skill-context-B0ZYVE3n.js → agent-skill-context-D1nMrVod.js} +2 -2
  41. package/dist/owletto/dist/assets/{agent-subpage-shell-ByU0xhXn.js → agent-subpage-shell-2w7vTeXw.js} +2 -2
  42. package/dist/owletto/dist/assets/{agent-thread-DiVKn1WX.js → agent-thread-BopD-2k1.js} +2 -2
  43. package/dist/owletto/dist/assets/{app._appId-BQWElSoP.js → app._appId-BXeFXW1w.js} +2 -2
  44. package/dist/owletto/dist/assets/{assist-composer-igTXq3DL.js → assist-composer-CL5x8pNt.js} +2 -2
  45. package/dist/owletto/dist/assets/automation-run-now-MtxUTfzd.js +2 -0
  46. package/dist/owletto/dist/assets/{callback-Dmaio9CX.js → callback-BgfwP1Eo.js} +2 -2
  47. package/dist/owletto/dist/assets/{card-rE4Ctuy6.js → card-DtLIFq7D.js} +2 -2
  48. package/dist/owletto/dist/assets/{claim-BN17CPYh.js → claim-CT3hYVMF.js} +2 -2
  49. package/dist/owletto/dist/assets/{client-activity-scopes-B7xVaUA-.js → client-activity-scopes-BPbRX-Pe.js} +2 -2
  50. package/dist/owletto/dist/assets/{client-rows-B3LULJxW.js → client-rows-vrNA6FLs.js} +2 -2
  51. package/dist/owletto/dist/assets/clients-xnzZeEdZ.js +2 -0
  52. package/dist/owletto/dist/assets/{code-editor-UppEMWpt.js → code-editor-mrKkAfcE.js} +2 -2
  53. package/dist/owletto/dist/assets/connect-NUCSay8X.js +2 -0
  54. package/dist/owletto/dist/assets/{connect-menu-B9u86bb2.js → connect-menu-C6iVtuSo.js} +2 -2
  55. package/dist/owletto/dist/assets/connect._clientId-Cp-d9Q5b.js +2 -0
  56. package/dist/owletto/dist/assets/{connected._clientId-CaF-ZWlZ.js → connected._clientId-ROfVgp9h.js} +2 -2
  57. package/dist/owletto/dist/assets/connection-BMz740Wi.js +2 -0
  58. package/dist/owletto/dist/assets/{connection-feed-detail-CJYqryAV.js → connection-feed-detail-0VAJiZTP.js} +2 -2
  59. package/dist/owletto/dist/assets/connector-page-shell-BFv21yuv.js +2 -0
  60. package/dist/owletto/dist/assets/{connector-provenance-CW4CXtCz.js → connector-provenance-b59RfBtk.js} +2 -2
  61. package/dist/owletto/dist/assets/connectors-nYS31lO2.js +2 -0
  62. package/dist/owletto/dist/assets/consent-cPRF9JQv.js +2 -0
  63. package/dist/owletto/dist/assets/{copy-button-1ALlvZU1.js → copy-button-C3wMMv63.js} +2 -2
  64. package/dist/owletto/dist/assets/{core.esm-6koO33th.js → core.esm-C9QlSrgK.js} +3 -3
  65. package/dist/owletto/dist/assets/{create-kUevP9Xx.js → create-ASRN3Obq.js} +2 -2
  66. package/dist/owletto/dist/assets/create-CBcodaSO.js +2 -0
  67. package/dist/owletto/dist/assets/create-CGOWfMk4.js +2 -0
  68. package/dist/owletto/dist/assets/{create-automation-form-BhujNbRr.js → create-automation-form-CLicoPH5.js} +3 -3
  69. package/dist/owletto/dist/assets/create._connectorKey-s4xkktTC.js +2 -0
  70. package/dist/owletto/dist/assets/{custom-guardrail-edits-B_aCgvoZ.js → custom-guardrail-edits-BUL7nmuO.js} +2 -2
  71. package/dist/owletto/dist/assets/{definition-comparison-3zKUSTt8.js → definition-comparison-4UYMI6BK.js} +2 -2
  72. package/dist/owletto/dist/assets/{detail-page-skeleton-BmxqqIsH.js → detail-page-skeleton-C8v3rJXK.js} +2 -2
  73. package/dist/owletto/dist/assets/device-BBwsOi7q.js +2 -0
  74. package/dist/owletto/dist/assets/device-pin-tombstone-Bcpe7nAA.js +2 -0
  75. package/dist/owletto/dist/assets/{device._deviceId-Dqtmb1Xp.js → device._deviceId-DLT4jh0Z.js} +2 -2
  76. package/dist/owletto/dist/assets/{dynamic-schema-form-D3KnzCsW.js → dynamic-schema-form-BDT8x0Vg.js} +2 -2
  77. package/dist/owletto/dist/assets/entity-options-B9hm9V87.js +2 -0
  78. package/dist/owletto/dist/assets/entity-page-DZjzQ2V4.js +2 -0
  79. package/dist/owletto/dist/assets/entity-pages-BWBpttz3.js +2 -0
  80. package/dist/owletto/dist/assets/entity-schema-graph-lMMx3HhR.js +2 -0
  81. package/dist/owletto/dist/assets/{entity-type-page-CouHZbc9.js → entity-type-page-CkQm0yEu.js} +2 -2
  82. package/dist/owletto/dist/assets/event-detail-CkzfakTK.js +2 -0
  83. package/dist/owletto/dist/assets/events-feed-DmRzikZW.js +2 -0
  84. package/dist/owletto/dist/assets/filter-editors-CQoSj-20.js +3 -0
  85. package/dist/owletto/dist/assets/{full-page-spinner-B7A6Ycyi.js → full-page-spinner-CYyCnKve.js} +2 -2
  86. package/dist/owletto/dist/assets/index-BE7eb2kE.js +2 -0
  87. package/dist/owletto/dist/assets/index-BFR0uiKY.js +2 -0
  88. package/dist/owletto/dist/assets/{index-DXfYVs5m.js → index-BS5Ty3tf.js} +2 -2
  89. package/dist/owletto/dist/assets/index-C38OzBpB.js +2 -0
  90. package/dist/owletto/dist/assets/{index-BztXeLBN.js → index-C3hz9tzx.js} +2 -2
  91. package/dist/owletto/dist/assets/index-CDyFQ32o.js +2 -0
  92. package/dist/owletto/dist/assets/{index-B-dZruj6.js → index-CUndAH6o.js} +2 -2
  93. package/dist/owletto/dist/assets/index-CiKysEhV.js +2 -0
  94. package/dist/owletto/dist/assets/index-DByaMzsG.js +7906 -0
  95. package/dist/owletto/dist/assets/index-DfdinB7B.js +2 -0
  96. package/dist/owletto/dist/assets/index-DgMM4Zt5.css +1 -0
  97. package/dist/owletto/dist/assets/index-Xk711gVC.js +2 -0
  98. package/dist/owletto/dist/assets/index-ittfA0k8.js +2 -0
  99. package/dist/owletto/dist/assets/{json-diff-CJK-gzCt.js → json-diff-mcDgyct_.js} +2 -2
  100. package/dist/owletto/dist/assets/{list-skeleton-bQAZ0hQp.js → list-skeleton-DsYGUHxi.js} +2 -2
  101. package/dist/owletto/dist/assets/login-EoLq136v.js +2 -0
  102. package/dist/owletto/dist/assets/{logout-H0F3IfiO.js → logout-gLgEQOiX.js} +2 -2
  103. package/dist/owletto/dist/assets/{member-scope-gate-Doic_6qX.js → member-scope-gate-vvkgSAb2.js} +2 -2
  104. package/dist/owletto/dist/assets/memory-browse-page-DvDtwrEI.js +74 -0
  105. package/dist/owletto/dist/assets/{model-selector-BrfaDwIg.js → model-selector-D3vSMLO2.js} +2 -2
  106. package/dist/owletto/dist/assets/needs-you-list-B5Bgd05M.js +2 -0
  107. package/dist/owletto/dist/assets/new-BPW3V0Y1.js +2 -0
  108. package/dist/owletto/dist/assets/new-Bk_flKQO.js +2 -0
  109. package/dist/owletto/dist/assets/new-C5HtQdM_.js +2 -0
  110. package/dist/owletto/dist/assets/new-dLXsCHBd.js +2 -0
  111. package/dist/owletto/dist/assets/organization-DBfgBkzq.js +2 -0
  112. package/dist/owletto/dist/assets/peek-pane-content-c2PG3TEX.js +2 -0
  113. package/dist/owletto/dist/assets/{pending-seed-DYYOoCvj.js → pending-seed-CBhx2Ql-.js} +2 -2
  114. package/dist/owletto/dist/assets/{proposal-review-shell-BVwOMoq9.js → proposal-review-shell-B-jYcKfB.js} +2 -2
  115. package/dist/owletto/dist/assets/public-shell-ready-D8TijlRY.js +2 -0
  116. package/dist/owletto/dist/assets/record-activity-DnRVOrG2.js +2 -0
  117. package/dist/owletto/dist/assets/{record-session-KuEDuF3S.js → record-session-CAmGHMyM.js} +2 -2
  118. package/dist/owletto/dist/assets/{renderer-ucwCQmBk.js → renderer-olRv_HMI.js} +3 -3
  119. package/dist/owletto/dist/assets/reset-password-B9_xi8Pq.js +2 -0
  120. package/dist/owletto/dist/assets/{run-initiator-8vdkq-3o.js → run-initiator-DhE5v4z0.js} +2 -2
  121. package/dist/owletto/dist/assets/runs-C8sZQr4o.js +2 -0
  122. package/dist/owletto/dist/assets/runs-list-CwtH-wmk.js +2 -0
  123. package/dist/owletto/dist/assets/{schema-value-CefbtPIY.js → schema-value-zTJGE4eh.js} +3 -3
  124. package/dist/owletto/dist/assets/scoped-feed-bar-BKyJSa3_.js +2 -0
  125. package/dist/owletto/dist/assets/{settings-DvzkRYQy.js → settings-z02cvVS3.js} +2 -2
  126. package/dist/owletto/dist/assets/source-record-panels-CGmKIJdN.js +2 -0
  127. package/dist/owletto/dist/assets/{status-variants-BxHtpMOj.js → status-variants-DyRCXBzM.js} +2 -2
  128. package/dist/owletto/dist/assets/subDays-D8nHthaS.js +2 -0
  129. package/dist/owletto/dist/assets/{table-1O-ik4_O.js → table-C637cQxG.js} +2 -2
  130. package/dist/owletto/dist/assets/use-automations-CgWNoYio.js +2 -0
  131. package/dist/owletto/dist/assets/use-login-redirect-tDdhXTpt.js +2 -0
  132. package/dist/owletto/dist/assets/{use-mention-search-CA-evCDf.js → use-mention-search-D-kIKchD.js} +2 -2
  133. package/dist/owletto/dist/assets/view-param-filters-CUCj9Df-.js +2 -0
  134. package/dist/owletto/dist/assets/views-access-required-C35Dyt91.js +2 -0
  135. package/dist/owletto/dist/index.html +19 -12
  136. package/dist/server-main.bundle.mjs +6964 -4213
  137. package/npm-shrinkwrap.json +423 -406
  138. package/package.json +1 -1
  139. package/vendor/connector-sdk/dist/connector-types.d.ts +29 -2
  140. package/vendor/connector-sdk/dist/index.d.ts +1 -0
  141. package/vendor/connector-sdk/dist/index.js +1 -0
  142. package/vendor/connector-sdk/dist/ip-reachability.d.ts +1 -1
  143. package/vendor/connector-sdk/dist/ip-reachability.js +1 -1
  144. package/vendor/connector-sdk/dist/logger.d.ts +1 -1
  145. package/vendor/connector-sdk/dist/logger.js +1 -1
  146. package/vendor/connector-sdk/dist/reaction-client-types.d.ts +3 -1
  147. package/vendor/connector-sdk/dist/retry.d.ts +1 -1
  148. package/vendor/connector-sdk/dist/retry.js +1 -1
  149. package/vendor/connector-sdk/dist/source-withheld-error.d.ts +16 -0
  150. package/vendor/connector-sdk/dist/source-withheld-error.js +19 -0
  151. package/vendor/connector-sdk/package.json +1 -1
  152. package/vendor/core/dist/classify-error.d.ts +4 -5
  153. package/vendor/core/dist/classify-error.js +10 -10
  154. package/vendor/core/dist/contracts/tools/collection-presentation.d.ts +17 -1
  155. package/vendor/core/dist/contracts/tools/collection-presentation.js +27 -3
  156. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +67 -3
  157. package/vendor/core/dist/contracts/tools/manage-automations.js +38 -9
  158. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +1 -1
  159. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +8 -0
  160. package/vendor/core/dist/contracts/tools/manage-entity.js +11 -3
  161. package/vendor/core/dist/contracts/tools/manage-views.d.ts +249 -7
  162. package/vendor/core/dist/contracts/tools/manage-views.js +83 -21
  163. package/vendor/core/dist/contracts/tools/navigation.d.ts +248 -0
  164. package/vendor/core/dist/contracts/tools/navigation.js +284 -0
  165. package/vendor/core/dist/contracts/tools/save-memory.d.ts +11 -1
  166. package/vendor/core/dist/contracts/tools/save-memory.js +25 -3
  167. package/vendor/core/dist/contracts/tools/search-memory.js +1 -1
  168. package/vendor/core/dist/contracts/tools/view-attach.d.ts +7 -0
  169. package/vendor/core/dist/contracts/tools/view-attach.js +15 -0
  170. package/vendor/core/dist/contracts/tools/view-content-hash.d.ts +4 -1
  171. package/vendor/core/dist/contracts/tools/view-content-hash.js +4 -2
  172. package/vendor/core/dist/contracts/tools/view-definition.d.ts +2 -0
  173. package/vendor/core/dist/contracts/tools/view-definition.js +52 -0
  174. package/vendor/core/dist/contracts/tools/view-host.d.ts +68 -0
  175. package/vendor/core/dist/contracts/tools/view-host.js +28 -1
  176. package/vendor/core/dist/contracts/tools/view-scope.d.ts +31 -0
  177. package/vendor/core/dist/contracts/tools/view-scope.js +45 -0
  178. package/vendor/core/dist/credentials.d.ts +12 -0
  179. package/vendor/core/dist/credentials.js +1 -0
  180. package/vendor/core/dist/errors.d.ts +17 -24
  181. package/vendor/core/dist/errors.js +19 -26
  182. package/vendor/core/dist/types.d.ts +0 -6
  183. package/vendor/core/dist/worker/auth.d.ts +5 -0
  184. package/vendor/core/dist/worker/auth.js +15 -4
  185. package/vendor/core/package.json +11 -1
  186. package/vendor/postgres/cf/src/connection.js +7 -2
  187. package/vendor/postgres/cjs/src/connection.js +7 -2
  188. package/vendor/postgres/src/connection.js +7 -2
  189. package/vendor/views/dist/api.d.ts +30 -5
  190. package/vendor/views/dist/api.js +22 -8
  191. package/vendor/views/dist/bridge.d.ts +17 -0
  192. package/vendor/views/dist/bridge.js +49 -1
  193. package/vendor/views/dist/components.d.ts +27 -5
  194. package/vendor/views/dist/components.js +57 -7
  195. package/vendor/views/dist/embed.d.ts +98 -0
  196. package/vendor/views/dist/embed.js +418 -0
  197. package/vendor/views/dist/index.d.ts +3 -1
  198. package/vendor/views/dist/index.js +1 -0
  199. package/vendor/views/dist/native.d.ts +33 -1
  200. package/vendor/views/dist/native.js +3 -0
  201. package/vendor/views/package.json +1 -1
  202. package/dist/owletto/dist/assets/_-B0tmXZ86.js +0 -2
  203. package/dist/owletto/dist/assets/_-DwXULq4r.js +0 -3
  204. package/dist/owletto/dist/assets/_agentId-B1dNkhnr.js +0 -2
  205. package/dist/owletto/dist/assets/_agentId-sYjvnBaB.js +0 -2
  206. package/dist/owletto/dist/assets/_automationId-Bnw_CnT_.js +0 -2
  207. package/dist/owletto/dist/assets/_connectorKey._connectionId-D7Z8DQ-B.js +0 -2
  208. package/dist/owletto/dist/assets/_connectorKey.index-DM5MTO8c.js +0 -2
  209. package/dist/owletto/dist/assets/_eventId-CfB0_2zK.js +0 -2
  210. package/dist/owletto/dist/assets/_owner-BDvTUY0a.js +0 -3
  211. package/dist/owletto/dist/assets/_shape-BZidoJMB.js +0 -2
  212. package/dist/owletto/dist/assets/_slug-R989vOiM.js +0 -2
  213. package/dist/owletto/dist/assets/_viewKey-BDUSrpe5.js +0 -2
  214. package/dist/owletto/dist/assets/_viewKey-BnFqh5-t.js +0 -2
  215. package/dist/owletto/dist/assets/accept-invitation-BC-ZIsrf.js +0 -2
  216. package/dist/owletto/dist/assets/activity-route-view-CN2dOiCD.js +0 -2
  217. package/dist/owletto/dist/assets/agent-connect-pages-CdDjrHjn.js +0 -4
  218. package/dist/owletto/dist/assets/agent-permissions-matrix-ju7L2M0l.js +0 -2
  219. package/dist/owletto/dist/assets/automation-detail-content-BJwRU6qT.js +0 -2
  220. package/dist/owletto/dist/assets/clients-CydgUHrc.js +0 -2
  221. package/dist/owletto/dist/assets/connect-OdHpIVV9.js +0 -2
  222. package/dist/owletto/dist/assets/connect._clientId-EI1tcdSE.js +0 -2
  223. package/dist/owletto/dist/assets/connection-D8ZAMHBT.js +0 -2
  224. package/dist/owletto/dist/assets/connector-boxes-BWPXijAk.js +0 -2
  225. package/dist/owletto/dist/assets/connector-page-shell-C23dWdKz.js +0 -2
  226. package/dist/owletto/dist/assets/connectors-Bp08_KPq.js +0 -2
  227. package/dist/owletto/dist/assets/consent-_PpYI1cT.js +0 -2
  228. package/dist/owletto/dist/assets/create-DULVO0HS.js +0 -2
  229. package/dist/owletto/dist/assets/create-Drx9tcnG.js +0 -2
  230. package/dist/owletto/dist/assets/create._connectorKey-N6fhcIPy.js +0 -2
  231. package/dist/owletto/dist/assets/device-D2eUt_nr.js +0 -2
  232. package/dist/owletto/dist/assets/device-pin-tombstone-BFPbTM_o.js +0 -2
  233. package/dist/owletto/dist/assets/entity-options-IUdQ-64R.js +0 -2
  234. package/dist/owletto/dist/assets/entity-page-B3Im65EI.js +0 -2
  235. package/dist/owletto/dist/assets/entity-pages-DJNSQrfB.js +0 -2
  236. package/dist/owletto/dist/assets/event-detail-CvaRN1qB.js +0 -2
  237. package/dist/owletto/dist/assets/events-feed-DwOkLk6A.js +0 -2
  238. package/dist/owletto/dist/assets/filter-editors-DQ5V4Cvh.js +0 -2
  239. package/dist/owletto/dist/assets/home-stream-Bg97PUBJ.js +0 -2
  240. package/dist/owletto/dist/assets/home-toolbar-CpCcHA6z.js +0 -2
  241. package/dist/owletto/dist/assets/index-9PGnv4-5.js +0 -2
  242. package/dist/owletto/dist/assets/index-C2TCKJDP.js +0 -7901
  243. package/dist/owletto/dist/assets/index-C7QM3aqU.js +0 -2
  244. package/dist/owletto/dist/assets/index-CWn46a4y.js +0 -2
  245. package/dist/owletto/dist/assets/index-CxJONizf.js +0 -2
  246. package/dist/owletto/dist/assets/index-DJhb3li3.js +0 -2
  247. package/dist/owletto/dist/assets/index-DY-YGnCe.js +0 -2
  248. package/dist/owletto/dist/assets/index-j3v7ITPb.js +0 -2
  249. package/dist/owletto/dist/assets/index-oiy6ygaI.js +0 -2
  250. package/dist/owletto/dist/assets/index-pEgtAY1t.js +0 -2
  251. package/dist/owletto/dist/assets/index-xAvK3IyQ.css +0 -1
  252. package/dist/owletto/dist/assets/login-DLqL54Rk.js +0 -2
  253. package/dist/owletto/dist/assets/memory-browse-page-CUea2Llz.js +0 -74
  254. package/dist/owletto/dist/assets/new-5GkxlOuQ.js +0 -2
  255. package/dist/owletto/dist/assets/new-BiA4DGoN.js +0 -2
  256. package/dist/owletto/dist/assets/new-M-MX_T5C.js +0 -2
  257. package/dist/owletto/dist/assets/organization-CLrcmgNK.js +0 -2
  258. package/dist/owletto/dist/assets/peek-pane-content-B29OcHwm.js +0 -2
  259. package/dist/owletto/dist/assets/public-shell-ready-BbjPgh3k.js +0 -2
  260. package/dist/owletto/dist/assets/record-activity-BCpNKaUo.js +0 -2
  261. package/dist/owletto/dist/assets/reset-password-BkiAmXZW.js +0 -2
  262. package/dist/owletto/dist/assets/runs-B_iywKWb.js +0 -2
  263. package/dist/owletto/dist/assets/runs-list-CJJFRhTl.js +0 -2
  264. package/dist/owletto/dist/assets/schema-type-editor-panel-C4e8pq1A.js +0 -2
  265. package/dist/owletto/dist/assets/scoped-feed-bar-CapleZvS.js +0 -2
  266. package/dist/owletto/dist/assets/source-record-panels-LJIWGtHb.js +0 -2
  267. package/dist/owletto/dist/assets/subDays-DwIOMzYC.js +0 -2
  268. package/dist/owletto/dist/assets/use-automations-lV8PuE8L.js +0 -2
  269. package/dist/owletto/dist/assets/use-login-redirect-CfCbEeJR.js +0 -2
  270. package/dist/owletto/dist/assets/view-param-filters-Bp84PUMd.js +0 -2
  271. package/dist/owletto/dist/assets/views-access-required-BerT4Z1d.js +0 -2
  272. /package/vendor/postgres/{.bun-tag-c81dacd34e959a7a → .bun-tag-652f2580b8090d71} +0 -0
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isEventAttachment = isEventAttachment;
4
4
  exports.matchesCollection = matchesCollection;
5
5
  exports.matchesRecord = matchesRecord;
6
+ exports.attachesToEntityType = attachesToEntityType;
6
7
  exports.hasWorkspaceAttachment = hasWorkspaceAttachment;
7
8
  exports.eventAttachmentsFor = eventAttachmentsFor;
8
9
  const collection_selection_1 = require("./collection-selection");
@@ -21,6 +22,20 @@ function matchesRecord(attachment, record) {
21
22
  attachment.record === record.type &&
22
23
  (attachment.id === undefined || attachment.id === record.id));
23
24
  }
25
+ /**
26
+ * Whether the view mounts on records of `typeSlug`: a tab on the type's list
27
+ * or a card on its record pages. With `recordId`, a record card pinned to
28
+ * another id does not count. A collection's `when` narrows what the tab
29
+ * shows, not which records the view is about, so it is ignored here.
30
+ */
31
+ function attachesToEntityType(attach, typeSlug, recordId) {
32
+ return attach.some((attachment) => ("collection" in attachment && attachment.collection === typeSlug) ||
33
+ ("record" in attachment &&
34
+ attachment.record === typeSlug &&
35
+ (recordId === undefined ||
36
+ attachment.id === undefined ||
37
+ attachment.id === recordId)));
38
+ }
24
39
  function hasWorkspaceAttachment(attach) {
25
40
  return attach.some((attachment) => "workspace" in attachment);
26
41
  }
@@ -4,7 +4,7 @@ import type { RetainedSource } from "./source-files";
4
4
  * and the CLI (diff-before-apply): ONE function derives the key on both
5
5
  * sides, never read off whatever carried it. The hash covers the source, the
6
6
  * declared metadata that affects the stored row (name, description, attach,
7
- * params, actions), the retained files and dependencies when present, AND
7
+ * params, actions, resources), the retained files and dependencies when present, AND
8
8
  * the digest of the executable browser bundle. The
9
9
  * bundle matters because the CLI resolves relative imports and view npm deps
10
10
  * where node_modules exists: two different executable artifacts built from
@@ -27,6 +27,9 @@ export interface ViewContentMetadata {
27
27
  attach: unknown;
28
28
  params: unknown;
29
29
  actions: unknown;
30
+ /** Hashed only when non-empty, so a view that declares none keeps the
31
+ * identity it had before views could declare resources. */
32
+ resources: readonly string[];
30
33
  }
31
34
  /**
32
35
  * sha256 of the source plus the declared metadata plus the compiled
@@ -8,7 +8,7 @@ const node_crypto_1 = require("node:crypto");
8
8
  * and the CLI (diff-before-apply): ONE function derives the key on both
9
9
  * sides, never read off whatever carried it. The hash covers the source, the
10
10
  * declared metadata that affects the stored row (name, description, attach,
11
- * params, actions), the retained files and dependencies when present, AND
11
+ * params, actions, resources), the retained files and dependencies when present, AND
12
12
  * the digest of the executable browser bundle. The
13
13
  * bundle matters because the CLI resolves relative imports and view npm deps
14
14
  * where node_modules exists: two different executable artifacts built from
@@ -45,10 +45,12 @@ function contentHash(source, metadata, compiledCode, retainedSource) {
45
45
  const artifactDigest = (0, node_crypto_1.createHash)("sha256")
46
46
  .update(compiledCode, "utf8")
47
47
  .digest("hex");
48
+ const { resources, ...declared } = metadata;
49
+ const hashed = resources.length > 0 ? metadata : declared;
48
50
  const hash = (0, node_crypto_1.createHash)("sha256")
49
51
  .update(source)
50
52
  .update("\n")
51
- .update(stableStringify(metadata ?? null))
53
+ .update(stableStringify(hashed))
52
54
  .update("\n")
53
55
  .update(artifactDigest);
54
56
  if (retainedSource)
@@ -8,6 +8,8 @@ export interface ViewDefinitionRecord {
8
8
  attach: ViewAttachment[];
9
9
  params: Record<string, ViewParamDecl>;
10
10
  actions: Record<string, ViewActionDecl>;
11
+ /** Bare https origins the view may load images from, deduplicated. */
12
+ resources: string[];
11
13
  }
12
14
  /**
13
15
  * Read `export const view = defineView({...})` out of a view module, without
@@ -47,6 +47,18 @@ function readViewDefinition(js) {
47
47
  throw new Error(`${at}: ${message}`);
48
48
  }
49
49
  const def = raw;
50
+ for (const [name, action] of Object.entries(def.actions ?? {})) {
51
+ if (action.emits === undefined && action.updates === undefined) {
52
+ throw new Error(`defineView.actions.${name}: declare emits, updates, or both`);
53
+ }
54
+ }
55
+ const resources = [...new Set(def.resources ?? [])];
56
+ for (const entry of resources) {
57
+ const problem = imageOriginProblem(entry);
58
+ if (problem) {
59
+ throw new Error(`defineView.resources: ${JSON.stringify(entry)} ${problem}`);
60
+ }
61
+ }
50
62
  return {
51
63
  key: def.key,
52
64
  name: def.name?.trim() ? def.name : def.key,
@@ -54,8 +66,48 @@ function readViewDefinition(js) {
54
66
  attach: def.attach,
55
67
  params: def.params ?? {},
56
68
  actions: def.actions ?? {},
69
+ resources,
57
70
  };
58
71
  }
72
+ /**
73
+ * Why `entry` is not a declarable image origin, or null when it is: exactly
74
+ * `https://<host>[:port]` as the URL parser prints the origin (so no path,
75
+ * query, fragment, userinfo, uppercase or default port), with a public
76
+ * multi-label hostname. Localhost, IP literals and single-label hosts would
77
+ * point a viewer's browser at their own machine or network.
78
+ */
79
+ function imageOriginProblem(entry) {
80
+ let url;
81
+ try {
82
+ url = new URL(entry);
83
+ }
84
+ catch {
85
+ return "is not a URL; write an origin like https://tiles.example.com";
86
+ }
87
+ if (url.protocol !== "https:")
88
+ return "must use https";
89
+ if (url.hostname.includes("*"))
90
+ return "cannot use a wildcard; list each origin";
91
+ if (url.origin !== entry) {
92
+ return `must be a bare origin with no path, query, fragment or credentials; write ${url.origin}`;
93
+ }
94
+ const host = url.hostname;
95
+ // The URL parser brackets every IPv6 literal and rewrites any host whose
96
+ // last label is numeric into IPv4, so these two checks cover IP literals.
97
+ const labels = host.split(".");
98
+ const last = labels[labels.length - 1] ?? "";
99
+ const numeric = last !== "" && [...last].every((c) => c >= "0" && c <= "9");
100
+ if (host.startsWith("[") || numeric) {
101
+ return "must name a host, not an IP address";
102
+ }
103
+ if (host === "localhost" || host.endsWith(".localhost")) {
104
+ return "must be a public host, not localhost";
105
+ }
106
+ if (labels.length < 2 || labels.some((label) => label === "")) {
107
+ return "must be a fully qualified public hostname";
108
+ }
109
+ return null;
110
+ }
59
111
  function defineViewLocalName(body) {
60
112
  for (const statement of body) {
61
113
  if (statement.type !== "ImportDeclaration")
@@ -1,7 +1,75 @@
1
+ import type { CollectionSelection } from "./collection-selection";
1
2
  /** Browser bridge routing hints, never authority. */
2
3
  export declare const VIEW_WORKSPACE_META_KEY = "lobu/view-workspace";
3
4
  export declare const VIEW_OPEN_RECORD_METHOD = "lobu/open-record";
4
5
  /** A mixed read/write tool is admitted only for these fixed read actions.
5
6
  * The server still applies the visiting user's authorization and org scope. */
6
7
  export declare function isViewRead(tool: string, args: Record<string, unknown> | undefined): boolean;
8
+ /**
9
+ * Embedded views: a view places another, independently registered view in a
10
+ * slot. The guest only reports where its slots are; the web host mounts each
11
+ * child as its own sandboxed frame over the slot, with the visitor's session,
12
+ * its own view key and its own actions — the parent never hosts the child's
13
+ * code, so it cannot speak for it. A host that does not implement the methods
14
+ * answers -32601 and the guest says so in the slot.
15
+ */
16
+ /** guest → host request: the slots on screen now. Answered per slot. */
17
+ export declare const VIEW_EMBEDS_SYNC_METHOD = "lobu/embeds/sync";
18
+ /** guest → host request: keyboard focus moves into a slot's child, `{ id,
19
+ * direction? }`; `direction` says which way the visitor was tabbing. */
20
+ export declare const VIEW_EMBEDS_FOCUS_METHOD = "lobu/embeds/focus";
21
+ /** host → guest: a child's height, so the slot reserves its space. */
22
+ export declare const VIEW_EMBED_SIZE_NOTIFICATION = "lobu/notifications/embed-size";
23
+ /** host → guest: keyboard focus left a child; continue after or before it. */
24
+ export declare const VIEW_EMBED_FOCUS_NOTIFICATION = "lobu/notifications/embed-focus";
25
+ /** host → child guest: keyboard focus entered this embedded view, `{ direction
26
+ * }`; it lands on the first control going forward, the last going backward,
27
+ * so entering a child is one Tab, never a stop on its empty document. */
28
+ export declare const VIEW_FOCUS_ENTER_NOTIFICATION = "lobu/notifications/focus-enter";
29
+ export type ViewFocusDirection = "forward" | "backward";
30
+ /** Child frames one view may show at once. */
31
+ export declare const VIEW_EMBED_MAX_COUNT = 8;
32
+ /** Nesting below the page's own view: a child may embed, a grandchild may not. */
33
+ export declare const VIEW_EMBED_MAX_DEPTH = 2;
34
+ /** Params one slot may pass to its child. */
35
+ export declare const VIEW_EMBED_MAX_PARAMS = 20;
36
+ export type ViewEmbedParams = Record<string, string | number | boolean>;
37
+ /** The child's subject, combined by the same rule as `open_view`'s scope
38
+ * (`viewScopeShapeError`); `entity` may also be a source key, which then
39
+ * needs `type`. The collection selection is the host-owned list filter —
40
+ * never one of the child's own params. */
41
+ export interface ViewEmbedScope {
42
+ type?: string;
43
+ entity?: number | string;
44
+ event?: number;
45
+ collection?: CollectionSelection;
46
+ }
47
+ export interface ViewEmbedBox {
48
+ x: number;
49
+ y: number;
50
+ width: number;
51
+ height: number;
52
+ }
53
+ /** One slot as the guest reports it; `rect` is in the guest's viewport.
54
+ * `rect.clip` is the part of it the guest actually shows — inside every
55
+ * scrolling or clipping ancestor, and outside any dialog or menu laid over
56
+ * it — so the host never lets the child cover the parent's own controls.
57
+ * Absent means all of it; an empty box means none. */
58
+ export interface ViewEmbedSlot {
59
+ id: string;
60
+ view: string;
61
+ scope: ViewEmbedScope;
62
+ params: ViewEmbedParams;
63
+ rect: ViewEmbedBox & {
64
+ clip?: ViewEmbedBox;
65
+ };
66
+ }
67
+ export type ViewEmbedStatus = {
68
+ id: string;
69
+ status: "mounted";
70
+ } | {
71
+ id: string;
72
+ status: "refused";
73
+ reason: "cycle" | "depth" | "limit" | "invalid";
74
+ };
7
75
  //# sourceMappingURL=view-host.d.ts.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VIEW_OPEN_RECORD_METHOD = exports.VIEW_WORKSPACE_META_KEY = void 0;
3
+ exports.VIEW_EMBED_MAX_PARAMS = exports.VIEW_EMBED_MAX_DEPTH = exports.VIEW_EMBED_MAX_COUNT = exports.VIEW_FOCUS_ENTER_NOTIFICATION = exports.VIEW_EMBED_FOCUS_NOTIFICATION = exports.VIEW_EMBED_SIZE_NOTIFICATION = exports.VIEW_EMBEDS_FOCUS_METHOD = exports.VIEW_EMBEDS_SYNC_METHOD = exports.VIEW_OPEN_RECORD_METHOD = exports.VIEW_WORKSPACE_META_KEY = void 0;
4
4
  exports.isViewRead = isViewRead;
5
5
  /** Browser bridge routing hints, never authority. */
6
6
  exports.VIEW_WORKSPACE_META_KEY = "lobu/view-workspace";
@@ -27,4 +27,31 @@ function isViewRead(tool, args) {
27
27
  args?.schema_type === "entity_type" &&
28
28
  (args.action === "list" || args.action === "get"));
29
29
  }
30
+ /**
31
+ * Embedded views: a view places another, independently registered view in a
32
+ * slot. The guest only reports where its slots are; the web host mounts each
33
+ * child as its own sandboxed frame over the slot, with the visitor's session,
34
+ * its own view key and its own actions — the parent never hosts the child's
35
+ * code, so it cannot speak for it. A host that does not implement the methods
36
+ * answers -32601 and the guest says so in the slot.
37
+ */
38
+ /** guest → host request: the slots on screen now. Answered per slot. */
39
+ exports.VIEW_EMBEDS_SYNC_METHOD = "lobu/embeds/sync";
40
+ /** guest → host request: keyboard focus moves into a slot's child, `{ id,
41
+ * direction? }`; `direction` says which way the visitor was tabbing. */
42
+ exports.VIEW_EMBEDS_FOCUS_METHOD = "lobu/embeds/focus";
43
+ /** host → guest: a child's height, so the slot reserves its space. */
44
+ exports.VIEW_EMBED_SIZE_NOTIFICATION = "lobu/notifications/embed-size";
45
+ /** host → guest: keyboard focus left a child; continue after or before it. */
46
+ exports.VIEW_EMBED_FOCUS_NOTIFICATION = "lobu/notifications/embed-focus";
47
+ /** host → child guest: keyboard focus entered this embedded view, `{ direction
48
+ * }`; it lands on the first control going forward, the last going backward,
49
+ * so entering a child is one Tab, never a stop on its empty document. */
50
+ exports.VIEW_FOCUS_ENTER_NOTIFICATION = "lobu/notifications/focus-enter";
51
+ /** Child frames one view may show at once. */
52
+ exports.VIEW_EMBED_MAX_COUNT = 8;
53
+ /** Nesting below the page's own view: a child may embed, a grandchild may not. */
54
+ exports.VIEW_EMBED_MAX_DEPTH = 2;
55
+ /** Params one slot may pass to its child. */
56
+ exports.VIEW_EMBED_MAX_PARAMS = 20;
30
57
  //# sourceMappingURL=view-host.js.map
@@ -0,0 +1,31 @@
1
+ import { type Static } from "@sinclair/typebox";
2
+ export declare const ViewKeySchema: import("@sinclair/typebox").TString;
3
+ export declare const ViewScopeSchema: import("@sinclair/typebox").TObject<{
4
+ collection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
5
+ search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
6
+ filters: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
7
+ field: import("@sinclair/typebox").TString;
8
+ op: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"eq">, import("@sinclair/typebox").TLiteral<"neq">]>;
9
+ value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>;
10
+ }>, import("@sinclair/typebox").TObject<{
11
+ field: import("@sinclair/typebox").TString;
12
+ op: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"lt">, import("@sinclair/typebox").TLiteral<"lte">, import("@sinclair/typebox").TLiteral<"gt">, import("@sinclair/typebox").TLiteral<"gte">]>;
13
+ value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
14
+ }>]>>>;
15
+ segment: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
16
+ }>>;
17
+ type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
18
+ entity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
19
+ event: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
20
+ }>;
21
+ export type ViewScopeInput = Static<typeof ViewScopeSchema>;
22
+ /** Which scope fields combine. `open_view`, a navigation entry and an
23
+ * embedded view all apply this one rule, so a scope one accepts the others
24
+ * accept too. Null when the combination is valid. */
25
+ export declare function viewScopeShapeError(scope: {
26
+ type?: unknown;
27
+ entity?: unknown;
28
+ event?: unknown;
29
+ collection?: unknown;
30
+ }): string | null;
31
+ //# sourceMappingURL=view-scope.d.ts.map
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ViewScopeSchema = exports.ViewKeySchema = void 0;
4
+ exports.viewScopeShapeError = viewScopeShapeError;
5
+ const typebox_1 = require("@sinclair/typebox");
6
+ const collection_selection_1 = require("./collection-selection");
7
+ // A view key names the module: lowercase, dashes, 1-64 chars. The folder is
8
+ // only a convention — the key is the identity (no `custom:<name>` prefix).
9
+ exports.ViewKeySchema = typebox_1.Type.String({
10
+ pattern: "^[a-z0-9][a-z0-9-]{0,63}$",
11
+ minLength: 1,
12
+ maxLength: 64,
13
+ description: "View key, e.g. 'pipeline'.",
14
+ });
15
+ // What a view opens for: `open_view`'s scope, and a navigation entry's. The
16
+ // page it lands on follows from the view's attachments; scope is never
17
+ // inferred from where a link sits.
18
+ exports.ViewScopeSchema = typebox_1.Type.Object({
19
+ collection: typebox_1.Type.Optional(collection_selection_1.CollectionSelectionSchema),
20
+ type: typebox_1.Type.Optional(typebox_1.Type.String({
21
+ minLength: 1,
22
+ description: "Entity-type slug the view opens for.",
23
+ })),
24
+ entity: typebox_1.Type.Optional(typebox_1.Type.Integer({ description: "Entity id the view opens for." })),
25
+ event: typebox_1.Type.Optional(typebox_1.Type.Integer({
26
+ description: "Event id the view opens for. It names the event's supersede lineage, so the view shows the current version, and it opens at /events/<id>/-/views/<key>.",
27
+ })),
28
+ }, {
29
+ description: "Required unless the view is attached to the workspace. Pass scope.type, scope.entity, or scope.event to select its subject.",
30
+ });
31
+ /** Which scope fields combine. `open_view`, a navigation entry and an
32
+ * embedded view all apply this one rule, so a scope one accepts the others
33
+ * accept too. Null when the combination is valid. */
34
+ function viewScopeShapeError(scope) {
35
+ if (scope.collection !== undefined &&
36
+ (!scope.type || scope.entity !== undefined || scope.event !== undefined)) {
37
+ return "Collection selection requires scope.type without entity or event";
38
+ }
39
+ if (scope.event !== undefined &&
40
+ (scope.type !== undefined || scope.entity !== undefined)) {
41
+ return "scope.event names the view's subject on its own; drop scope.type and scope.entity";
42
+ }
43
+ return null;
44
+ }
45
+ //# sourceMappingURL=view-scope.js.map
@@ -53,6 +53,18 @@ export declare function normalizeCredential<C extends BaseCredential = BaseCrede
53
53
  export declare function readCredentialStore<C extends BaseCredential = BaseCredential>(file: string, defaultContextName: string): Promise<CredentialStore<C>>;
54
54
  /** Read one context's credential (null when absent/corrupt). */
55
55
  export declare function readContextCredential<C extends BaseCredential = BaseCredential>(file: string, contextName: string, defaultContextName: string): Promise<C | null>;
56
+ /**
57
+ * Atomically write `data` to `file` with 0600 perms. Writes to a sibling temp
58
+ * file (same dir, so `rename` is on the same filesystem and therefore atomic on
59
+ * POSIX), chmods the temp BEFORE the rename so the published file never has a
60
+ * window of looser perms, then renames over the target. This makes concurrent
61
+ * writers (CLI `lobu login` + the server's token-refresh write-back) safe: each
62
+ * writer commits its whole-file image in a single atomic `rename`, so a reader
63
+ * always sees one writer's complete file — never a half-written / interleaved
64
+ * one. (Last-writer-wins on the rename; we don't merge, but neither writer can
65
+ * corrupt the store.)
66
+ */
67
+ export declare function atomicWriteFile(file: string, data: string): Promise<void>;
56
68
  /**
57
69
  * Write one context's credential into the store, preserving other contexts.
58
70
  * The write is atomic (temp-file + `rename`) so a concurrent writer (e.g. the
@@ -16,6 +16,7 @@ exports.CREDENTIAL_REFRESH_BUFFER_MS = void 0;
16
16
  exports.normalizeCredential = normalizeCredential;
17
17
  exports.readCredentialStore = readCredentialStore;
18
18
  exports.readContextCredential = readContextCredential;
19
+ exports.atomicWriteFile = atomicWriteFile;
19
20
  exports.writeContextCredential = writeContextCredential;
20
21
  exports.deleteContextCredential = deleteContextCredential;
21
22
  exports.credentialNeedsRefresh = credentialNeedsRefresh;
@@ -140,22 +140,17 @@ export declare const AGENT_ERRORS: Record<AgentErrorCode, AgentErrorSpec>;
140
140
  * Provider says: the key is VALID, the account just cannot spend — a balance,
141
141
  * credit, or billing-limit wall rather than a windowed rate limit.
142
142
  *
143
- * The native turn classifier maps this wording to
144
- * `PROVIDER_QUOTA_EXHAUSTED`, while `providerQuotaResetNotBefore` parks
145
- * an Automation for a day on the same wording. They were maintained as separate
146
- * literals and drifted in both directions: the parker learned OpenAI's
147
- * "no credits remaining" while the classifier did not, and the classifier
148
- * matched "insufficient quota" while the parker's
149
- * list did not. Because the server gates on the code the worker assigns, the
150
- * first drift silently disabled BOTH the day-park and the provider-health
151
- * writeback for OpenAI balance exhaustion (observed in prod 2026-08-05). This
152
- * union closes both — which deliberately promotes reset-less "insufficient
153
- * quota" wording (OpenAI/Azure billing) into the day-park; the retry-horizon
154
- * guard in `balanceExhaustedNotBefore` keeps windowed 429s out of it.
143
+ * `classifyErrorMessage` maps this wording to `PROVIDER_QUOTA_EXHAUSTED`, and
144
+ * the device daemon stops an OpenCode run that is retrying it, since no retry
145
+ * clears an empty balance. It lives in core because separate copies of this
146
+ * list drifted in both directions: one learned OpenAI's "no credits remaining"
147
+ * while the classifier did not, and the classifier matched "insufficient
148
+ * quota" while the other did not, which left OpenAI balance exhaustion
149
+ * unclassified in prod (2026-08-05). This union closes both.
155
150
  *
156
151
  * Keep this to balance/billing wording only. Windowed limits ("too many
157
- * requests", a bare 429) classify as quota too, but must NOT day-park — they
158
- * self-heal, often within the minute.
152
+ * requests", a bare 429) classify as quota too, but they self-heal, often
153
+ * within the minute, so they belong in {@link PROVIDER_WINDOWED_QUOTA}.
159
154
  */
160
155
  export declare const PROVIDER_BALANCE_EXHAUSTED: RegExp;
161
156
  /**
@@ -165,17 +160,15 @@ export declare const PROVIDER_BALANCE_EXHAUSTED: RegExp;
165
160
  *
166
161
  * Hoisted here for exactly the reason {@link PROVIDER_BALANCE_EXHAUSTED} was.
167
162
  * This alternation was maintained as three independent literals — the turn
168
- * classifier (`classify-error.ts`), the device schedule parker
169
- * (`deviceProviderQuotaResetNotBefore`) and the server's own `INFRA_PATTERNS`
170
- * — and drifted the same way the balance list did: the device parker learned
171
- * ChatGPT's `usage limit` and the other two did not, so over the 30 days to
172
- * 2026-09-15, 47 runs the provider had refused were recorded as the agent's
173
- * fault, rendered to the user with no remediation CTA, and dodged the
174
- * PROVIDER_* alert.
163
+ * classifier (`classify-error.ts`), a since-removed device schedule check and
164
+ * the server's own `INFRA_PATTERNS` — and drifted the same way the balance
165
+ * list did: the device check learned ChatGPT's `usage limit` and the other two
166
+ * did not, so over the 30 days to 2026-09-15, 47 runs the provider had refused
167
+ * were recorded as the agent's fault, rendered to the user with no remediation
168
+ * CTA, and dodged the PROVIDER_* alert.
175
169
  *
176
- * Keep windowed wording ONLY. These must classify as quota but must NOT reach
177
- * the day-park: they often clear within the minute, and the caller decides the
178
- * horizon from the provider's own named reset.
170
+ * Keep windowed wording ONLY. These classify as quota, but they often clear
171
+ * within the minute, so nothing may treat them as a balance wall.
179
172
  */
180
173
  export declare const PROVIDER_WINDOWED_QUOTA: RegExp;
181
174
  /** Parse an `AgentErrorCode` from an unknown value (payload/DB boundary). */
@@ -179,7 +179,7 @@ exports.AGENT_ERRORS = {
179
179
  // The provider's own finish_reason string is not useful to an end user
180
180
  // ("function_call_filter: MALFORMED_FUNCTION_CALL"), so unlike the other
181
181
  // PROVIDER_* entries this one carries its own text and does NOT relay the
182
- // upstream blob. The raw message stays in the logs / Sentry.
182
+ // upstream blob. The raw message stays in the logs.
183
183
  [AgentErrorCode.PROVIDER_TOOL_CALL_FAILED]: {
184
184
  message: "The model provider rejected its own tool call and ended the turn. This is usually temporary — please try again.",
185
185
  cta: "none",
@@ -211,22 +211,17 @@ exports.AGENT_ERRORS = {
211
211
  * Provider says: the key is VALID, the account just cannot spend — a balance,
212
212
  * credit, or billing-limit wall rather than a windowed rate limit.
213
213
  *
214
- * The native turn classifier maps this wording to
215
- * `PROVIDER_QUOTA_EXHAUSTED`, while `providerQuotaResetNotBefore` parks
216
- * an Automation for a day on the same wording. They were maintained as separate
217
- * literals and drifted in both directions: the parker learned OpenAI's
218
- * "no credits remaining" while the classifier did not, and the classifier
219
- * matched "insufficient quota" while the parker's
220
- * list did not. Because the server gates on the code the worker assigns, the
221
- * first drift silently disabled BOTH the day-park and the provider-health
222
- * writeback for OpenAI balance exhaustion (observed in prod 2026-08-05). This
223
- * union closes both — which deliberately promotes reset-less "insufficient
224
- * quota" wording (OpenAI/Azure billing) into the day-park; the retry-horizon
225
- * guard in `balanceExhaustedNotBefore` keeps windowed 429s out of it.
214
+ * `classifyErrorMessage` maps this wording to `PROVIDER_QUOTA_EXHAUSTED`, and
215
+ * the device daemon stops an OpenCode run that is retrying it, since no retry
216
+ * clears an empty balance. It lives in core because separate copies of this
217
+ * list drifted in both directions: one learned OpenAI's "no credits remaining"
218
+ * while the classifier did not, and the classifier matched "insufficient
219
+ * quota" while the other did not, which left OpenAI balance exhaustion
220
+ * unclassified in prod (2026-08-05). This union closes both.
226
221
  *
227
222
  * Keep this to balance/billing wording only. Windowed limits ("too many
228
- * requests", a bare 429) classify as quota too, but must NOT day-park — they
229
- * self-heal, often within the minute.
223
+ * requests", a bare 429) classify as quota too, but they self-heal, often
224
+ * within the minute, so they belong in {@link PROVIDER_WINDOWED_QUOTA}.
230
225
  */
231
226
  exports.PROVIDER_BALANCE_EXHAUSTED = /credit balance is too low|insufficient (?:credits?|balance|funds|quota)\b|no resource package|billing_hard_limit_reached|payment required|exceeded your current quota|out of credits?\b|no credits remaining/i;
232
227
  /**
@@ -236,19 +231,17 @@ exports.PROVIDER_BALANCE_EXHAUSTED = /credit balance is too low|insufficient (?:
236
231
  *
237
232
  * Hoisted here for exactly the reason {@link PROVIDER_BALANCE_EXHAUSTED} was.
238
233
  * This alternation was maintained as three independent literals — the turn
239
- * classifier (`classify-error.ts`), the device schedule parker
240
- * (`deviceProviderQuotaResetNotBefore`) and the server's own `INFRA_PATTERNS`
241
- * — and drifted the same way the balance list did: the device parker learned
242
- * ChatGPT's `usage limit` and the other two did not, so over the 30 days to
243
- * 2026-09-15, 47 runs the provider had refused were recorded as the agent's
244
- * fault, rendered to the user with no remediation CTA, and dodged the
245
- * PROVIDER_* alert.
234
+ * classifier (`classify-error.ts`), a since-removed device schedule check and
235
+ * the server's own `INFRA_PATTERNS` — and drifted the same way the balance
236
+ * list did: the device check learned ChatGPT's `usage limit` and the other two
237
+ * did not, so over the 30 days to 2026-09-15, 47 runs the provider had refused
238
+ * were recorded as the agent's fault, rendered to the user with no remediation
239
+ * CTA, and dodged the PROVIDER_* alert.
246
240
  *
247
- * Keep windowed wording ONLY. These must classify as quota but must NOT reach
248
- * the day-park: they often clear within the minute, and the caller decides the
249
- * horizon from the provider's own named reset.
241
+ * Keep windowed wording ONLY. These classify as quota, but they often clear
242
+ * within the minute, so nothing may treat them as a balance wall.
250
243
  */
251
- exports.PROVIDER_WINDOWED_QUOTA = /limit exhausted|usage limit|rate[-\s]?limit|quota (?:exceeded|exhausted)|too many requests|\b429\b|resource_exhausted/i;
244
+ exports.PROVIDER_WINDOWED_QUOTA = /limit exhausted|usage limit|(?:you've|you have) hit your weekly limit\b|rate[-\s]?limit|quota (?:exceeded|exhausted)|too many requests|\b429\b|resource_exhausted/i;
252
245
  /** Parse an `AgentErrorCode` from an unknown value (payload/DB boundary). */
253
246
  function toAgentErrorCode(value) {
254
247
  if (typeof value !== "string")
@@ -266,12 +266,6 @@ export interface ThreadResponsePayload {
266
266
  * the provider's sentence; `errorCode` selects the CTA link.
267
267
  */
268
268
  error?: string;
269
- /**
270
- * Original terminal error used only for durable run bookkeeping when an
271
- * output guardrail replaces the user-visible error text. Gateway-owned;
272
- * renderers must never expose this field to clients.
273
- */
274
- bookkeepingError?: string;
275
269
  errorCode?: string;
276
270
  /** Non-secret provider/model targeting for the error CTA. */
277
271
  errorContext?: AgentErrorContext;
@@ -236,6 +236,11 @@ export interface WorkerTokenOptions {
236
236
  nixPackages?: string[];
237
237
  }
238
238
  export declare function generateWorkerToken(userId: string, conversationId: string, deploymentName: string, options: WorkerTokenOptions): string;
239
+ /** Mint a session bearer and advertise the same lifetime the verifier enforces. */
240
+ export declare function generateWorkerTokenWithExpiry(userId: string, conversationId: string, deploymentName: string, options: WorkerTokenOptions): {
241
+ token: string;
242
+ expiresAt: number;
243
+ };
239
244
  /**
240
245
  * Mint deployment-lifetime worker and proxy credentials with one revocation
241
246
  * identity. Revoking the deployment token must also stop its egress.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CHAT_TURN_ACCESS = void 0;
4
4
  exports.looksLikeWorkerToken = looksLikeWorkerToken;
5
5
  exports.generateWorkerToken = generateWorkerToken;
6
+ exports.generateWorkerTokenWithExpiry = generateWorkerTokenWithExpiry;
6
7
  exports.generateWorkerTokenPair = generateWorkerTokenPair;
7
8
  exports.mintGatewayMcpToken = mintGatewayMcpToken;
8
9
  exports.verifyWorkerToken = verifyWorkerToken;
@@ -32,7 +33,7 @@ exports.CHAT_TURN_ACCESS = [
32
33
  "public_visitor",
33
34
  "reply_only",
34
35
  ];
35
- function generateToken(userId, conversationId, deploymentName, options, tokenKind, jti = (0, node_crypto_1.randomUUID)()) {
36
+ function generateToken(userId, conversationId, deploymentName, options, tokenKind, jti = (0, node_crypto_1.randomUUID)(), timestamp = Date.now()) {
36
37
  if (!options.channelId) {
37
38
  throw new Error("channelId is required for worker token generation");
38
39
  }
@@ -47,7 +48,7 @@ function generateToken(userId, conversationId, deploymentName, options, tokenKin
47
48
  connectionId: options.connectionId,
48
49
  responseThreadId: options.responseThreadId,
49
50
  deploymentName,
50
- timestamp: Date.now(),
51
+ timestamp,
51
52
  platform: options.platform,
52
53
  source: options.source,
53
54
  executionMode: options.executionMode,
@@ -72,6 +73,14 @@ function generateToken(userId, conversationId, deploymentName, options, tokenKin
72
73
  function generateWorkerToken(userId, conversationId, deploymentName, options) {
73
74
  return generateToken(userId, conversationId, deploymentName, options, "worker");
74
75
  }
76
+ /** Mint a session bearer and advertise the same lifetime the verifier enforces. */
77
+ function generateWorkerTokenWithExpiry(userId, conversationId, deploymentName, options) {
78
+ const issuedAt = Date.now();
79
+ return {
80
+ token: generateToken(userId, conversationId, deploymentName, options, "worker", (0, node_crypto_1.randomUUID)(), issuedAt),
81
+ expiresAt: workerTokenExpiresAt(issuedAt),
82
+ };
83
+ }
75
84
  /**
76
85
  * Mint deployment-lifetime worker and proxy credentials with one revocation
77
86
  * identity. Revoking the deployment token must also stop its egress.
@@ -108,6 +117,9 @@ function parsePositiveIntEnv(name, fallback, allowZero = false) {
108
117
  return fallback;
109
118
  return raw;
110
119
  }
120
+ function workerTokenExpiresAt(issuedAt) {
121
+ return (issuedAt + parsePositiveIntEnv("WORKER_TOKEN_TTL_MS", 2 * 60 * 60 * 1000));
122
+ }
111
123
  /**
112
124
  * Verify and decrypt a worker authentication token
113
125
  */
@@ -273,10 +285,9 @@ function verifyToken(token, expectedKind) {
273
285
  // WORKER_TOKEN_CLOCK_SKEW_MS. Tokens timestamped further in the future
274
286
  // than the skew are rejected too — otherwise forward drift would grant
275
287
  // an unbounded validity window.
276
- const ttl = parsePositiveIntEnv("WORKER_TOKEN_TTL_MS", 2 * 60 * 60 * 1000);
277
288
  const skewMs = parsePositiveIntEnv("WORKER_TOKEN_CLOCK_SKEW_MS", 30 * 1000, true);
278
289
  const age = Date.now() - data.timestamp;
279
- if (age > ttl + skewMs) {
290
+ if (Date.now() > workerTokenExpiresAt(data.timestamp) + skewMs) {
280
291
  logger.error("Worker token rejected: expired");
281
292
  return null;
282
293
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobu/core",
3
- "version": "24.8.0",
3
+ "version": "24.10.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Core types and utilities for Lobu agent platform",
6
6
  "repository": {
@@ -241,6 +241,16 @@
241
241
  "import": "./dist/contracts/tools/pagination.js",
242
242
  "require": "./dist/contracts/tools/pagination.js"
243
243
  },
244
+ "./contracts/tools/navigation": {
245
+ "types": "./dist/contracts/tools/navigation.d.ts",
246
+ "import": "./dist/contracts/tools/navigation.js",
247
+ "require": "./dist/contracts/tools/navigation.js"
248
+ },
249
+ "./contracts/tools/view-scope": {
250
+ "types": "./dist/contracts/tools/view-scope.d.ts",
251
+ "import": "./dist/contracts/tools/view-scope.js",
252
+ "require": "./dist/contracts/tools/view-scope.js"
253
+ },
244
254
  "./contracts/tools/view-host": {
245
255
  "types": "./dist/contracts/tools/view-host.d.ts",
246
256
  "import": "./dist/contracts/tools/view-host.js",