@lobu/runtime-server 23.0.0 → 24.1.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 (266) hide show
  1. package/dist/catalogs/connectors.json +70 -6
  2. package/dist/catalogs/skills.json +1 -1
  3. package/dist/component.json +1 -1
  4. package/dist/connectors/README.md +1 -1
  5. package/dist/connectors/linkedin-inbox-adapter.js +4 -7
  6. package/dist/connectors/linkedin.ts +53 -34
  7. package/dist/connectors/reddit.ts +92 -20
  8. package/dist/connectors/slack.ts +1 -0
  9. package/dist/connectors/whatsapp-web-adapter.js +41 -11
  10. package/dist/connectors/whatsapp-web-helpers.ts +1 -1
  11. package/dist/connectors/whatsapp_web.ts +2 -2
  12. package/dist/connectors/x-dm-adapter.js +65 -30
  13. package/dist/connectors/x-identity.ts +5 -3
  14. package/dist/db/migrations/20261019120000_retire_identities_of_deleted_entities.sql +21 -0
  15. package/dist/db/migrations/20261020120000_entities_live_metadata_domain.sql +66 -0
  16. package/dist/db/migrations/20261020130000_agents_starters.sql +14 -0
  17. package/dist/db/migrations/20261020140000_view_attachments_by_page.sql +71 -0
  18. package/dist/db/migrations/20261021010000_views_compile_config_hash.sql +16 -0
  19. package/dist/dependencies.bun.lock +64 -61
  20. package/dist/guest.bundle.js +362 -300
  21. package/dist/owletto/dist/assets/_-BorucF19.js +3 -0
  22. package/dist/owletto/dist/assets/_-CkGyNi0G.js +2 -0
  23. package/dist/owletto/dist/assets/_agentId-BrhcaxUk.js +2 -0
  24. package/dist/owletto/dist/assets/_agentId-DgRrCE2B.js +2 -0
  25. package/dist/owletto/dist/assets/_automationId-DSrZIYcs.js +2 -0
  26. package/dist/owletto/dist/assets/_connectorKey._connectionId-DWxv1uoi.js +2 -0
  27. package/dist/owletto/dist/assets/_connectorKey.index-BTP5ijdT.js +2 -0
  28. package/dist/owletto/dist/assets/_conversationId-98Y3RuRO.js +2 -0
  29. package/dist/owletto/dist/assets/{_deploymentId-BuUzGtVL.js → _deploymentId-B1UWPY0i.js} +2 -2
  30. package/dist/owletto/dist/assets/_eventId-BAnr8g8z.js +2 -0
  31. package/dist/owletto/dist/assets/_name-BUfFO_A0.js +2 -0
  32. package/dist/owletto/dist/assets/_owner-C79BwQ0I.js +3 -0
  33. package/dist/owletto/dist/assets/_shape-Ep6JpyFX.js +2 -0
  34. package/dist/owletto/dist/assets/_skillKey-B24alBfT.js +2 -0
  35. package/dist/owletto/dist/assets/_slug-DbPdDc-5.js +2 -0
  36. package/dist/owletto/dist/assets/_viewKey-DDUxjjFD.js +2 -0
  37. package/dist/owletto/dist/assets/_viewKey-hdpq3RoX.js +2 -0
  38. package/dist/owletto/dist/assets/{accept-invitation-w17IFTtf.js → accept-invitation-UXU5Fx2G.js} +2 -2
  39. package/dist/owletto/dist/assets/activity-route-view-D7ORHntE.js +2 -0
  40. package/dist/owletto/dist/assets/{agent-card-controls-mnTN2AZt.js → agent-card-controls-CplnPhbv.js} +2 -2
  41. package/dist/owletto/dist/assets/{agent-client-setup-list-Bg3hBfUV.js → agent-client-setup-list-BlXB4SE5.js} +2 -2
  42. package/dist/owletto/dist/assets/agent-connect-pages-BmknviTI.js +2 -0
  43. package/dist/owletto/dist/assets/agent-editor-form-DsSoeQeF.js +2 -0
  44. package/dist/owletto/dist/assets/{agent-guardrails-route-BOrCXcAl.js → agent-guardrails-route-TdvvIc_J.js} +2 -2
  45. package/dist/owletto/dist/assets/{agent-loading-shells-Dqcvky-k.js → agent-loading-shells-B7v6Cffw.js} +2 -2
  46. package/dist/owletto/dist/assets/{agent-permissions-matrix-BOo_4r_4.js → agent-permissions-matrix-BkZu1LYE.js} +2 -2
  47. package/dist/owletto/dist/assets/{agent-skill-context-CCdvtlmH.js → agent-skill-context-DFucg4c4.js} +2 -2
  48. package/dist/owletto/dist/assets/{agent-skills-route-BUxIswuq.js → agent-skills-route-B3vvvZZe.js} +2 -2
  49. package/dist/owletto/dist/assets/agent-subpage-shell-CZJvnjNC.js +2 -0
  50. package/dist/owletto/dist/assets/agent-thread-D38STyeu.js +6 -0
  51. package/dist/owletto/dist/assets/agents-DAOln24A.js +2 -0
  52. package/dist/owletto/dist/assets/agents-workbench-DJ67GZ93.js +2 -0
  53. package/dist/owletto/dist/assets/app._appId-Cp78oEZ9.js +2 -0
  54. package/dist/owletto/dist/assets/automation-detail-content-DSwbRpbx.js +2 -0
  55. package/dist/owletto/dist/assets/automations-DAOln24A.js +2 -0
  56. package/dist/owletto/dist/assets/callback-CBexCo3F.js +2 -0
  57. package/dist/owletto/dist/assets/{card-Djgp00r_.js → card-jzhQrMDP.js} +2 -2
  58. package/dist/owletto/dist/assets/{claim-BYUZnyMp.js → claim-B-wq745Q.js} +2 -2
  59. package/dist/owletto/dist/assets/client-rows-BYbsXGy9.js +2 -0
  60. package/dist/owletto/dist/assets/{clients-D3Zbjxin.js → clients-BhNl1tVq.js} +2 -2
  61. package/dist/owletto/dist/assets/{code-editor-DHeyRGZI.js → code-editor-CEqoCky-.js} +2 -2
  62. package/dist/owletto/dist/assets/connect-wx-qqLir.js +2 -0
  63. package/dist/owletto/dist/assets/connect._clientId-kk0_4Svo.js +2 -0
  64. package/dist/owletto/dist/assets/connected._clientId-QR8o-7M5.js +2 -0
  65. package/dist/owletto/dist/assets/connected._clientId.activity-BqprYeOX.js +2 -0
  66. package/dist/owletto/dist/assets/connected._clientId.index-DhRoSzBr.js +2 -0
  67. package/dist/owletto/dist/assets/{connection-C3XXFEqh.js → connection-CNm2ukrI.js} +2 -2
  68. package/dist/owletto/dist/assets/{connection-feed-detail-CIJJLDP8.js → connection-feed-detail-WcGCA6qY.js} +2 -2
  69. package/dist/owletto/dist/assets/connections-browser-CrtnAs0Q.js +2 -0
  70. package/dist/owletto/dist/assets/{connector-provenance-8-d8hl10.js → connector-provenance-D-ECOlMJ.js} +2 -2
  71. package/dist/owletto/dist/assets/connector-scope-lists-CRFEpSvk.js +2 -0
  72. package/dist/owletto/dist/assets/connectors-CH4KBZyT.js +2 -0
  73. package/dist/owletto/dist/assets/{consent-CdSvVCgx.js → consent-C9ZpHb7V.js} +2 -2
  74. package/dist/owletto/dist/assets/{conversations-table-BdXoZAfc.js → conversations-table-D_HOe1jN.js} +2 -2
  75. package/dist/owletto/dist/assets/{core.esm-CYvgWCuv.js → core.esm-BupT3V0i.js} +2 -2
  76. package/dist/owletto/dist/assets/create-C4lptGWj.js +2 -0
  77. package/dist/owletto/dist/assets/create-CCjZxIkK.js +2 -0
  78. package/dist/owletto/dist/assets/create-DkgUQAbB.js +2 -0
  79. package/dist/owletto/dist/assets/{create-automation-form-CtSSeYj3.js → create-automation-form-Bpy92SM5.js} +3 -3
  80. package/dist/owletto/dist/assets/create._connectorKey-D6Kc-YQ3.js +2 -0
  81. package/dist/owletto/dist/assets/{cronstrue-n4qGUraE.js → cronstrue-CWImw-kf.js} +2 -2
  82. package/dist/owletto/dist/assets/{deployments-RvUdVkj3.js → deployments-C5hvipQh.js} +2 -2
  83. package/dist/owletto/dist/assets/deployments-CPpFAd_w.js +2 -0
  84. package/dist/owletto/dist/assets/{deployments-body-BMp7UsMo.js → deployments-body-DGII20dQ.js} +2 -2
  85. package/dist/owletto/dist/assets/{device-CPU6CjkJ.js → device-D-7WBe9E.js} +2 -2
  86. package/dist/owletto/dist/assets/device-pin-tombstone-2U0UMu3_.js +2 -0
  87. package/dist/owletto/dist/assets/device._deviceId-Bn37UpWH.js +2 -0
  88. package/dist/owletto/dist/assets/entity-avatar-mdh7Kq5D.js +2 -0
  89. package/dist/owletto/dist/assets/entity-options-Clz_WXK-.js +2 -0
  90. package/dist/owletto/dist/assets/entity-page-D3e4iPle.js +2 -0
  91. package/dist/owletto/dist/assets/entity-type-page-DebN1vCM.js +2 -0
  92. package/dist/owletto/dist/assets/event-detail-DV_zfWnC.js +2 -0
  93. package/dist/owletto/dist/assets/events-feed-DO3IiJO2.js +2 -0
  94. package/dist/owletto/dist/assets/filter-editors-Bwhqj7lY.js +2 -0
  95. package/dist/owletto/dist/assets/{full-page-spinner-DqpH99np.js → full-page-spinner-BVbcpW3R.js} +2 -2
  96. package/dist/owletto/dist/assets/guardrails-BiJollCA.js +2 -0
  97. package/dist/owletto/dist/assets/identity-HCFWtdaI.js +2 -0
  98. package/dist/owletto/dist/assets/index-8wxsyxqt.js +2 -0
  99. package/dist/owletto/dist/assets/index-9YuSRymd.js +7950 -0
  100. package/dist/owletto/dist/assets/index-B3c-0eZG.js +2 -0
  101. package/dist/owletto/dist/assets/index-B64PGxQm.js +2 -0
  102. package/dist/owletto/dist/assets/index-BSH07yVD.css +1 -0
  103. package/dist/owletto/dist/assets/{index-Hio-HRfo.js → index-BTlx9K_t.js} +2 -2
  104. package/dist/owletto/dist/assets/index-BX0EA_oB.js +2 -0
  105. package/dist/owletto/dist/assets/index-CdJJaQDX.js +2 -0
  106. package/dist/owletto/dist/assets/index-CfT_W8Vo.js +2 -0
  107. package/dist/owletto/dist/assets/index-CxF2XXzl.js +2 -0
  108. package/dist/owletto/dist/assets/index-D3WHeGql.js +2 -0
  109. package/dist/owletto/dist/assets/{index-ICgKp3YK.js → index-D7gHOpfg.js} +2 -2
  110. package/dist/owletto/dist/assets/{index-B9uPN6FC.js → index-DB1iWI_a.js} +2 -2
  111. package/dist/owletto/dist/assets/index-DMNzF8Lf.js +2 -0
  112. package/dist/owletto/dist/assets/index-DyB3IzOA.js +2 -0
  113. package/dist/owletto/dist/assets/{index-BQVliQW1.js → index-fgAJydgX.js} +2 -2
  114. package/dist/owletto/dist/assets/{json-diff-DBoag_OS.js → json-diff-DIN5Jhfx.js} +3 -3
  115. package/dist/owletto/dist/assets/{list-skeleton-C_GuoxAH.js → list-skeleton-CepswBka.js} +2 -2
  116. package/dist/owletto/dist/assets/login-DxGYyE4n.js +2 -0
  117. package/dist/owletto/dist/assets/{logout-CLGgeZB7.js → logout-Bkzc7J44.js} +2 -2
  118. package/dist/owletto/dist/assets/member-scope-gate-DD4YBFn-.js +2 -0
  119. package/dist/owletto/dist/assets/memory-browse-page-D_UlBa27.js +103 -0
  120. package/dist/owletto/dist/assets/{model-selector-dAbDgJvx.js → model-selector-CDrAjH31.js} +2 -2
  121. package/dist/owletto/dist/assets/models-BAVeysNq.js +2 -0
  122. package/dist/owletto/dist/assets/new-C2av0diq.js +2 -0
  123. package/dist/owletto/dist/assets/{new-BkdULx2r.js → new-ktz9Cs_P.js} +2 -2
  124. package/dist/owletto/dist/assets/new-snm1ctHn.js +2 -0
  125. package/dist/owletto/dist/assets/{oauth-workspace-access-BxsjwgdH.js → oauth-workspace-access-lZNZ9gul.js} +2 -2
  126. package/dist/owletto/dist/assets/{organization-gxGeDjIV.js → organization-Cb0W823y.js} +2 -2
  127. package/dist/owletto/dist/assets/peek-pane-content-BNR9ImQY.js +2 -0
  128. package/dist/owletto/dist/assets/{permissions-aPHaKLec.js → permissions-Dv39zWKt.js} +2 -2
  129. package/dist/owletto/dist/assets/proposal-review-shell-CFhOqCLf.js +2 -0
  130. package/dist/owletto/dist/assets/public-shell-ready-DqX8AXfw.js +2 -0
  131. package/dist/owletto/dist/assets/{recent-D-65Pgu-.js → recent-QhnLDU1_.js} +2 -2
  132. package/dist/owletto/dist/assets/record-activity-ZJntBfN_.js +2 -0
  133. package/dist/owletto/dist/assets/record-field-peek-Brh1IQGy.js +2 -0
  134. package/dist/owletto/dist/assets/record-session-Pbr5czGw.js +2 -0
  135. package/dist/owletto/dist/assets/{reset-password-uX_V6bip.js → reset-password-CzZw6RcC.js} +2 -2
  136. package/dist/owletto/dist/assets/runs-panel-C0_DNTcq.js +2 -0
  137. package/dist/owletto/dist/assets/runs-table-B1APZv7d.js +2 -0
  138. package/dist/owletto/dist/assets/schema-value-normalization-CKdPjdPC.js +97 -0
  139. package/dist/owletto/dist/assets/settings-CgZ5Z7wD.js +2 -0
  140. package/dist/owletto/dist/assets/settings-VDNiffKU.js +2 -0
  141. package/dist/owletto/dist/assets/skills-DgDGscm5.js +2 -0
  142. package/dist/owletto/dist/assets/{source-record-panels-CPyzlfD1.js → source-record-panels-BdfOVPWn.js} +2 -2
  143. package/dist/owletto/dist/assets/{use-mention-search-By8RZyKW.js → use-mention-search-Dcunv4L0.js} +2 -2
  144. package/dist/owletto/dist/assets/view-param-filters-B0quibBi.js +2 -0
  145. package/dist/owletto/dist/index.html +2 -2
  146. package/dist/server-main.bundle.mjs +4226 -3348
  147. package/npm-shrinkwrap.json +280 -264
  148. package/package.json +6 -5
  149. package/vendor/connector-sdk/package.json +1 -1
  150. package/vendor/core/dist/agent-policy.js +0 -3
  151. package/vendor/core/dist/agent-tooling.d.ts +1 -1
  152. package/vendor/core/dist/agent-tooling.js +3 -1
  153. package/vendor/core/dist/contracts/agent-settings.d.ts +6 -2
  154. package/vendor/core/dist/contracts/agent-settings.js +12 -1
  155. package/vendor/core/dist/contracts/tools/manage-views.d.ts +53 -234
  156. package/vendor/core/dist/contracts/tools/manage-views.js +50 -76
  157. package/vendor/core/dist/contracts/tools/view-attach.d.ts +5 -8
  158. package/vendor/core/dist/contracts/tools/view-attach.js +14 -31
  159. package/vendor/core/dist/contracts/tools/view-definition.d.ts +21 -0
  160. package/vendor/core/dist/contracts/tools/view-definition.js +165 -0
  161. package/vendor/core/dist/contracts/tools/view-runtime.d.ts +74 -0
  162. package/vendor/core/dist/contracts/tools/view-runtime.js +86 -0
  163. package/vendor/core/dist/contracts/worker/protocol.d.ts +39 -2
  164. package/vendor/core/dist/contracts/worker/protocol.js +24 -1
  165. package/vendor/core/dist/index.d.ts +1 -1
  166. package/vendor/core/dist/index.js +2 -1
  167. package/vendor/core/dist/suggestions.d.ts +15 -2
  168. package/vendor/core/dist/suggestions.js +48 -3
  169. package/vendor/core/dist/types.d.ts +26 -0
  170. package/vendor/core/dist/types.js +5 -0
  171. package/vendor/core/package.json +16 -5
  172. package/vendor/postgres/cf/src/connection.js +18 -0
  173. package/vendor/postgres/cjs/src/connection.js +18 -0
  174. package/vendor/postgres/src/connection.js +18 -0
  175. package/vendor/views/dist/api.d.ts +71 -17
  176. package/vendor/views/dist/api.js +200 -35
  177. package/vendor/views/dist/bridge.d.ts +3 -0
  178. package/vendor/views/dist/bridge.js +9 -1
  179. package/vendor/views/dist/components.d.ts +170 -0
  180. package/vendor/views/dist/components.js +361 -0
  181. package/vendor/views/dist/index.d.ts +1 -1
  182. package/vendor/views/package.json +11 -1
  183. package/dist/owletto/dist/assets/_-3J-IrxWk.js +0 -2
  184. package/dist/owletto/dist/assets/_-DYUE3ix4.js +0 -3
  185. package/dist/owletto/dist/assets/_agentId-Bn2IAjIy.js +0 -2
  186. package/dist/owletto/dist/assets/_agentId-Cam7Z0N7.js +0 -2
  187. package/dist/owletto/dist/assets/_automationId-CXEiKVZJ.js +0 -2
  188. package/dist/owletto/dist/assets/_connectorKey._connectionId-CS85l61t.js +0 -2
  189. package/dist/owletto/dist/assets/_connectorKey.index-clVDIyW0.js +0 -2
  190. package/dist/owletto/dist/assets/_conversationId-Ci2k-BuN.js +0 -2
  191. package/dist/owletto/dist/assets/_eventId-B0662F8h.js +0 -2
  192. package/dist/owletto/dist/assets/_name-CwWePlOl.js +0 -2
  193. package/dist/owletto/dist/assets/_owner-dTWkrKsK.js +0 -3
  194. package/dist/owletto/dist/assets/_shape-BtS3y4M9.js +0 -2
  195. package/dist/owletto/dist/assets/_skillKey-Dc9m-nlR.js +0 -2
  196. package/dist/owletto/dist/assets/_slug-DQHutM41.js +0 -2
  197. package/dist/owletto/dist/assets/_viewKey-B30ik8ma.js +0 -2
  198. package/dist/owletto/dist/assets/_viewKey-CUHypQnF.js +0 -2
  199. package/dist/owletto/dist/assets/activity-route-view-CMqYiiKM.js +0 -2
  200. package/dist/owletto/dist/assets/agent-connect-pages-B_vrqLVc.js +0 -2
  201. package/dist/owletto/dist/assets/agent-editor-form-hTs7eO_U.js +0 -2
  202. package/dist/owletto/dist/assets/agent-subpage-shell-D92imvSt.js +0 -2
  203. package/dist/owletto/dist/assets/agent-thread-BJOijbT0.js +0 -6
  204. package/dist/owletto/dist/assets/agents-9XjpDj_S.js +0 -2
  205. package/dist/owletto/dist/assets/agents-workbench-Bt5QCYQ7.js +0 -2
  206. package/dist/owletto/dist/assets/app._appId-CKv7_squ.js +0 -2
  207. package/dist/owletto/dist/assets/automation-detail-content-vUwVumXf.js +0 -2
  208. package/dist/owletto/dist/assets/automations-9XjpDj_S.js +0 -2
  209. package/dist/owletto/dist/assets/callback-BRgcL8gz.js +0 -2
  210. package/dist/owletto/dist/assets/client-rows-EJSKR6z1.js +0 -2
  211. package/dist/owletto/dist/assets/connect-CfsFsy9P.js +0 -2
  212. package/dist/owletto/dist/assets/connect._clientId-DkiC8xos.js +0 -2
  213. package/dist/owletto/dist/assets/connected._clientId-CIXrGOsT.js +0 -2
  214. package/dist/owletto/dist/assets/connected._clientId.activity-Ckdz6I0y.js +0 -2
  215. package/dist/owletto/dist/assets/connected._clientId.index-CNxafNeo.js +0 -2
  216. package/dist/owletto/dist/assets/connections-browser-CKZjzRz6.js +0 -2
  217. package/dist/owletto/dist/assets/connector-scope-lists-CadPVsI3.js +0 -2
  218. package/dist/owletto/dist/assets/connectors-lvLJ30lo.js +0 -2
  219. package/dist/owletto/dist/assets/create-0xW9eXxG.js +0 -2
  220. package/dist/owletto/dist/assets/create-B0qhrrX4.js +0 -2
  221. package/dist/owletto/dist/assets/create-CAfF-yI1.js +0 -2
  222. package/dist/owletto/dist/assets/create._connectorKey-i6xxkWKV.js +0 -2
  223. package/dist/owletto/dist/assets/deployments-4Itm35Xc.js +0 -2
  224. package/dist/owletto/dist/assets/device-pin-tombstone-CrjG7gPo.js +0 -2
  225. package/dist/owletto/dist/assets/device._deviceId-Cs3ZmXWo.js +0 -2
  226. package/dist/owletto/dist/assets/entity-options-uXjgT7y9.js +0 -2
  227. package/dist/owletto/dist/assets/entity-page-Dc0LGr5U.js +0 -2
  228. package/dist/owletto/dist/assets/entity-type-page-CwZxa0BR.js +0 -2
  229. package/dist/owletto/dist/assets/event-detail-ve2d6Gbb.js +0 -2
  230. package/dist/owletto/dist/assets/events-feed-BtvhZF1f.js +0 -2
  231. package/dist/owletto/dist/assets/filter-editors-Cj-v6NtH.js +0 -2
  232. package/dist/owletto/dist/assets/guardrails-HFo2Ut8B.js +0 -2
  233. package/dist/owletto/dist/assets/identity-BigVSBCl.js +0 -2
  234. package/dist/owletto/dist/assets/index-BLEcy9-T.css +0 -1
  235. package/dist/owletto/dist/assets/index-BfedB4Rc.js +0 -2
  236. package/dist/owletto/dist/assets/index-CUw3aKBI.js +0 -2
  237. package/dist/owletto/dist/assets/index-CXhxUkv3.js +0 -2
  238. package/dist/owletto/dist/assets/index-Cr5hwh-C.js +0 -7950
  239. package/dist/owletto/dist/assets/index-CzkTV4ZQ.js +0 -2
  240. package/dist/owletto/dist/assets/index-DKSx8JN_.js +0 -2
  241. package/dist/owletto/dist/assets/index-DVk7Ug0d.js +0 -2
  242. package/dist/owletto/dist/assets/index-DmZuKGf8.js +0 -2
  243. package/dist/owletto/dist/assets/index-cPcroOH0.js +0 -2
  244. package/dist/owletto/dist/assets/index-n7sTbNv4.js +0 -2
  245. package/dist/owletto/dist/assets/index-xiFpcWKv.js +0 -2
  246. package/dist/owletto/dist/assets/login-Ci6ixHuL.js +0 -2
  247. package/dist/owletto/dist/assets/member-scope-gate-B44INDPY.js +0 -2
  248. package/dist/owletto/dist/assets/memory-browse-page-DyQiRvzl.js +0 -103
  249. package/dist/owletto/dist/assets/models-DpVP7ZwX.js +0 -2
  250. package/dist/owletto/dist/assets/new-BUb7AnEW.js +0 -2
  251. package/dist/owletto/dist/assets/new-CHOr-EcI.js +0 -2
  252. package/dist/owletto/dist/assets/peek-pane-content-CHoQHe2H.js +0 -2
  253. package/dist/owletto/dist/assets/proposal-review-shell-UcZr87_Q.js +0 -2
  254. package/dist/owletto/dist/assets/public-shell-ready-DcnlADmj.js +0 -2
  255. package/dist/owletto/dist/assets/record-activity-CBXH6v1d.js +0 -2
  256. package/dist/owletto/dist/assets/renderer-mEDnVW0O.js +0 -97
  257. package/dist/owletto/dist/assets/runs-C0rCgGwX.js +0 -2
  258. package/dist/owletto/dist/assets/runs-panel-Du1JMjg5.js +0 -2
  259. package/dist/owletto/dist/assets/runs-table-syPJ6r6T.js +0 -2
  260. package/dist/owletto/dist/assets/settings-9NkNA1G1.js +0 -2
  261. package/dist/owletto/dist/assets/settings-E-10sLQX.js +0 -2
  262. package/dist/owletto/dist/assets/skills-D2Ri9b4f.js +0 -2
  263. package/dist/owletto/dist/assets/status-dot-B-EWMgq6.js +0 -2
  264. package/dist/owletto/dist/assets/tabs-DqIIkCX-.js +0 -2
  265. package/dist/owletto/dist/assets/view-param-filters-CqLZQrnO.js +0 -2
  266. /package/vendor/postgres/{.bun-tag-f39dafdb2305d504 → .bun-tag-2f292c6554a8475e} +0 -0
@@ -487,9 +487,10 @@ const HOME_FEED_POST_IDENTITY_SELECTOR =
487
487
  ':is([id*="shareId="], [id*="ugcPostId="], [id*="urn:li:activity:"], [id*="-replaceableCommentTools"]):not([id^="replaceableComment_"]):not([id^="replaceableComment_"] *)';
488
488
 
489
489
  /** Current comment-tool ids encode a typed post URN, followed by the recycled
490
- * card key. Decode only the typed prefix: field 1 is activity, field 2 ugcPost;
491
- * each contains field 1 as a protobuf sint64 (ZigZag). Native comment URNs and
492
- * the corresponding live post URLs independently confirm those namespaces. */
490
+ * card key. Decode only the typed prefix: field 1 is activity, field 2 ugcPost,
491
+ * and field 3 groupPost. Each contains field 1 as a protobuf sint64 (ZigZag);
492
+ * groupPost contains the group id in field 1 and the post id in field 2.
493
+ * Native comment URNs and live post URLs confirm those namespaces. */
493
494
  function decodeHomeFeedPostIdentity(
494
495
  raw: string | undefined
495
496
  ): string | undefined {
@@ -509,25 +510,38 @@ function decodeHomeFeedPostIdentity(
509
510
  }
510
511
  const tag = bytes.charCodeAt(0);
511
512
  if (
512
- (tag !== 10 && tag !== 18) ||
513
+ (tag !== 10 && tag !== 18 && tag !== 26) ||
513
514
  bytes.length < 4 ||
514
- bytes.length > 13 ||
515
+ bytes.length > (tag === 26 ? 24 : 13) ||
515
516
  bytes.charCodeAt(1) !== bytes.length - 2 ||
516
517
  bytes.charCodeAt(2) !== 8
517
518
  ) {
518
519
  throw invalid();
519
520
  }
520
- let encoded = 0n;
521
- for (let i = 3; i < bytes.length; i++) {
522
- const byte = bytes.charCodeAt(i);
523
- const isLast = i === bytes.length - 1;
524
- if (Boolean(byte & 128) === isLast) throw invalid();
525
- encoded |= BigInt(byte & 127) << BigInt(7 * (i - 3));
526
- }
527
- if ((encoded & 1n) !== 0n || encoded >= 1n << 64n || encoded < 200_000n) {
521
+ let offset = 3;
522
+ const readId = (minimum: bigint) => {
523
+ let encoded = 0n;
524
+ for (let shift = 0; shift < 70 && offset < bytes.length; shift += 7) {
525
+ const byte = bytes.charCodeAt(offset++);
526
+ encoded |= BigInt(byte & 127) << BigInt(shift);
527
+ if (byte & 128) continue;
528
+ if ((encoded & 1n) !== 0n || encoded >= 1n << 64n || encoded < minimum) {
529
+ throw invalid();
530
+ }
531
+ return encoded >> 1n;
532
+ }
528
533
  throw invalid();
534
+ };
535
+ // Group ids can be smaller than post ids, but must still be positive.
536
+ const firstId = readId(tag === 26 ? 2n : 200_000n);
537
+ if (tag === 26) {
538
+ if (bytes.charCodeAt(offset++) !== 16) throw invalid();
539
+ const postId = readId(200_000n);
540
+ if (offset !== bytes.length) throw invalid();
541
+ return `urn:li:groupPost:${firstId}-${postId}`;
529
542
  }
530
- return `urn:li:${tag === 10 ? "activity" : "ugcPost"}:${encoded >> 1n}`;
543
+ if (offset !== bytes.length) throw invalid();
544
+ return `urn:li:${tag === 10 ? "activity" : "ugcPost"}:${firstId}`;
531
545
  }
532
546
 
533
547
  // A fenced dispatch discards every row it collected, so an oversized scrape
@@ -1227,7 +1241,7 @@ interface HomeFeedEngagement {
1227
1241
 
1228
1242
  interface HomeFeedCommentIdentity {
1229
1243
  urn: string;
1230
- parentNamespace: "activity" | "share" | "ugcPost";
1244
+ parentNamespace: ReturnType<typeof linkedInUrnNamespace>;
1231
1245
  parentId: string;
1232
1246
  commentId: string;
1233
1247
  }
@@ -1246,10 +1260,10 @@ function homeFeedPostIdentityKey(
1246
1260
  for (const raw of [context.postUrl, row.post_identity]) {
1247
1261
  if (!raw) continue;
1248
1262
  const match = raw.match(
1249
- /(?:(shareId|ugcPostId)=|urn:li:(activity|share|ugcPost):)(\d{6,})/i
1263
+ /(?:(shareId|ugcPostId)=|urn:li:(activity|share|ugcPost):)(\d{6,})|urn:li:(groupPost):(\d+-\d{6,})/i
1250
1264
  );
1251
1265
  if (!match) continue;
1252
- return `${linkedInUrnNamespace(match[1] ?? match[2] ?? "")}:${match[3]}`;
1266
+ return `${linkedInUrnNamespace(match[1] ?? match[2] ?? match[4] ?? "")}:${match[3] ?? match[5]}`;
1253
1267
  }
1254
1268
  return undefined;
1255
1269
  }
@@ -1517,11 +1531,11 @@ function buildHomeFeedRowContext(row: HomeFeedRow): HomeFeedRowContext {
1517
1531
  }
1518
1532
 
1519
1533
  const embeddedUrn = row.post_identity?.match(
1520
- /(?:(shareId|ugcPostId)=|urn:li:(activity|share|ugcPost):)(\d{6,})/i
1534
+ /(?:(shareId|ugcPostId)=|urn:li:(activity|share|ugcPost):)(\d{6,})|urn:li:(groupPost):(\d+-\d{6,})/i
1521
1535
  );
1522
- const embeddedId = embeddedUrn?.[3];
1536
+ const embeddedId = embeddedUrn?.[3] ?? embeddedUrn?.[5];
1523
1537
  const embeddedNamespace = linkedInUrnNamespace(
1524
- embeddedUrn?.[1] ?? embeddedUrn?.[2] ?? ""
1538
+ embeddedUrn?.[1] ?? embeddedUrn?.[2] ?? embeddedUrn?.[4] ?? ""
1525
1539
  );
1526
1540
  const postUrl = normalizeLinkedInPostUrl(
1527
1541
  row.post_url ??
@@ -1548,7 +1562,7 @@ function isHomeFeedRowNoise(
1548
1562
  /**
1549
1563
  * Map cs_scrape home-feed rows to event envelopes. A scraped permalink still
1550
1564
  * wins when a row carries one, but current cards expose none, so the canonical
1551
- * post identity is normally the activity/share/ugcPost id embedded in
1565
+ * post identity is normally the activity/share/ugcPost/groupPost id embedded in
1552
1566
  * `post_identity`. The scrape-only componentkey never becomes an event origin,
1553
1567
  * and a post without either durable identity is not emitted. Native comments
1554
1568
  * carry their own durable id and point at the stable parent-post origin.
@@ -1721,20 +1735,24 @@ type PrepareCommentResult = {
1721
1735
 
1722
1736
  /**
1723
1737
  * Canonical casing for the LinkedIn URN namespace an id came from. share and
1724
- * ugcPost ids live in different id spaces than activity ids, so the namespace
1725
- * has to survive normalization; /feed/update/ resolves all three.
1738
+ * ugcPost and groupPost ids live in different id spaces than activity ids, so
1739
+ * the namespace has to survive normalization; /feed/update/ resolves them all.
1726
1740
  */
1727
- function linkedInUrnNamespace(token: string): "activity" | "share" | "ugcPost" {
1741
+ function linkedInUrnNamespace(
1742
+ token: string
1743
+ ): "activity" | "share" | "ugcPost" | "groupPost" {
1728
1744
  const normalized = token.toLowerCase();
1729
1745
  if (normalized === "shareid" || normalized === "share") return "share";
1730
1746
  if (normalized === "ugcpostid" || normalized === "ugcpost") return "ugcPost";
1747
+ if (normalized === "grouppost") return "groupPost";
1731
1748
  return "activity";
1732
1749
  }
1733
1750
 
1734
1751
  /**
1735
1752
  * Normalize a post URL or activity id into a linkedin.com update URL.
1736
1753
  * Accepts full URLs, `urn:li:activity:…` / `urn:li:share:…` /
1737
- * `urn:li:ugcPost:…`, bare activity digits, or `/feed/update/…` paths.
1754
+ * `urn:li:ugcPost:…` / `urn:li:groupPost:<group>-<post>`, bare activity digits,
1755
+ * or `/feed/update/…` paths.
1738
1756
  */
1739
1757
  export function normalizeLinkedInPostUrl(input: string): string | null {
1740
1758
  const raw = input.trim();
@@ -1746,12 +1764,13 @@ export function normalizeLinkedInPostUrl(input: string): string | null {
1746
1764
  return `https://www.linkedin.com/feed/update/urn:li:activity:${bareId}`;
1747
1765
  }
1748
1766
 
1749
- // urn:li:activity:123, urn:li:share:123, urn:li:ugcPost:123, or the bare
1750
- // `activity:123` shorthand.
1751
- const urnMatch = raw.match(/(?:urn:li:)?(activity|share|ugcPost):(\d{6,})/i);
1767
+ // Post URNs or shorthand, with a compound id only for groupPost.
1768
+ const urnMatch = raw.match(
1769
+ /(?:urn:li:)?(?:(activity|share|ugcPost):(\d{6,})|(groupPost):(\d+-\d{6,}))/i
1770
+ );
1752
1771
  if (urnMatch && !raw.includes("://") && !raw.startsWith("/")) {
1753
- const ns = linkedInUrnNamespace(urnMatch[1] ?? "");
1754
- return `https://www.linkedin.com/feed/update/urn:li:${ns}:${urnMatch[2] ?? ""}`;
1772
+ const ns = linkedInUrnNamespace(urnMatch[1] ?? urnMatch[3] ?? "");
1773
+ return `https://www.linkedin.com/feed/update/urn:li:${ns}:${urnMatch[2] ?? urnMatch[4] ?? ""}`;
1755
1774
  }
1756
1775
 
1757
1776
  try {
@@ -1772,11 +1791,11 @@ export function normalizeLinkedInPostUrl(input: string): string | null {
1772
1791
  // Prefer canonical feed/update URLs when we can extract a post id, keeping
1773
1792
  // whichever URN namespace the source URL used.
1774
1793
  const urnInUrl = `${u.pathname}${u.search}`.match(
1775
- /(?:urn(?::|%3A)li(?::|%3A))?(activity|share|ugcPost)(?::|%3A|-)(\d{6,})/i
1794
+ /(?:urn(?::|%3A)li(?::|%3A))?(?:(activity|share|ugcPost)(?::|%3A|-)(\d{6,})|(groupPost)(?::|%3A|-)(\d+-\d{6,}))/i
1776
1795
  );
1777
1796
  if (urnInUrl) {
1778
- const ns = linkedInUrnNamespace(urnInUrl[1] ?? "");
1779
- return `https://www.linkedin.com/feed/update/urn:li:${ns}:${urnInUrl[2] ?? ""}`;
1797
+ const ns = linkedInUrnNamespace(urnInUrl[1] ?? urnInUrl[3] ?? "");
1798
+ return `https://www.linkedin.com/feed/update/urn:li:${ns}:${urnInUrl[2] ?? urnInUrl[4] ?? ""}`;
1780
1799
  }
1781
1800
  return null;
1782
1801
  } catch {
@@ -2914,7 +2933,7 @@ export default class LinkedInConnector extends ConnectorRuntime<
2914
2933
  name: "LinkedIn",
2915
2934
  description:
2916
2935
  "Read LinkedIn feeds, notifications, and recent inbox messages through paired Chrome. Subscribe to source changes, answer direct messages, and prepare message, post, or comment drafts for human submission. Also supports local LinkedIn Data Export CSV files.",
2917
- version: "3.20.0",
2936
+ version: "3.20.1",
2918
2937
  faviconDomain: "linkedin.com",
2919
2938
  // Live feeds bind a signed-in Chrome account. Local takeout imports need no browser.
2920
2939
  browser: {
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * Reddit Connector (V1 runtime)
3
3
  *
4
- * Fetches posts and comments from Reddit subreddits or search queries.
5
- * Supports both authenticated (OAuth) and unauthenticated (public JSON API) modes.
4
+ * Fetches posts and comments from Reddit subreddits or search queries, and the
5
+ * connected user's home feed. Supports both authenticated (OAuth) and
6
+ * unauthenticated (public JSON API) modes.
6
7
  */
7
8
 
8
9
  import {
@@ -16,6 +17,7 @@ import {
16
17
  type SyncContext,
17
18
  type SyncResult,
18
19
  } from '@lobu/connector-sdk';
20
+ import addFormats from 'ajv-formats';
19
21
 
20
22
  // ---------------------------------------------------------------------------
21
23
  // Reddit API types
@@ -71,6 +73,16 @@ interface RedditCheckpoint {
71
73
  pagination_cutoff?: string;
72
74
  }
73
75
 
76
+ // Use the gateway's URI format check: WHATWG URL parsing also accepts non-URI characters.
77
+ const isUri = addFormats.get('uri') as (value: string) => boolean;
78
+
79
+ /** Metadata declares these fields `format: uri`; one bad value rejects the whole batch. */
80
+ function httpUrl(value: string | undefined): string | undefined {
81
+ if (!value || !isUri(value) || !URL.canParse(value)) return undefined;
82
+ const { protocol } = new URL(value);
83
+ return protocol === 'http:' || protocol === 'https:' ? value : undefined;
84
+ }
85
+
74
86
  // ---------------------------------------------------------------------------
75
87
  // Connector
76
88
  // ---------------------------------------------------------------------------
@@ -79,8 +91,9 @@ export default class RedditConnector extends ConnectorRuntime {
79
91
  readonly definition: RuntimeConnectorDefinition = {
80
92
  key: 'reddit',
81
93
  name: 'Reddit',
82
- description: 'Fetches posts and comments from Reddit subreddits or search queries.',
83
- version: '1.0.0',
94
+ description:
95
+ "Fetches posts and comments from Reddit subreddits or search queries, and the connected user's home feed.",
96
+ version: '1.2.1',
84
97
  faviconDomain: 'reddit.com',
85
98
  authSchema: {
86
99
  methods: [
@@ -88,6 +101,7 @@ export default class RedditConnector extends ConnectorRuntime {
88
101
  type: 'oauth',
89
102
  provider: 'reddit',
90
103
  requiredScopes: ['identity', 'read', 'history'],
104
+ loginScopes: ['identity'],
91
105
  setupInstructions:
92
106
  'Create a Reddit app at https://www.reddit.com/prefs/apps — choose "web app" as the type. Set the redirect URI to {{redirect_uri}}, then copy the client ID and secret below.',
93
107
  },
@@ -238,6 +252,48 @@ export default class RedditConnector extends ConnectorRuntime {
238
252
  },
239
253
  },
240
254
  },
255
+ home_feed: {
256
+ key: 'home_feed',
257
+ name: 'Home feed',
258
+ sync: (ctx) => this.syncFeed(ctx),
259
+ description:
260
+ "Fetch the connected user's personalized home feed (Best). Requires user OAuth.",
261
+ displayNameTemplate: 'Reddit home feed',
262
+ configSchema: {
263
+ type: 'object',
264
+ properties: {
265
+ lookback_days: {
266
+ type: 'integer',
267
+ minimum: 1,
268
+ maximum: 30,
269
+ default: 7,
270
+ description: 'Skip home feed posts older than this many days.',
271
+ },
272
+ },
273
+ },
274
+ eventKinds: {
275
+ post: {
276
+ description: "A Reddit post from the connected user's home feed",
277
+ metadataSchema: {
278
+ type: 'object',
279
+ properties: {
280
+ subreddit: { type: 'string' },
281
+ score: { type: 'number', description: 'Reddit score (upvotes - downvotes)' },
282
+ num_comments: { type: 'number' },
283
+ upvote_ratio: { type: 'number' },
284
+ is_self: { type: 'boolean' },
285
+ domain: { type: 'string' },
286
+ thumbnail: { type: 'string', format: 'uri', description: 'Preview thumbnail URL' },
287
+ media_url: {
288
+ type: 'string',
289
+ format: 'uri',
290
+ description: 'Linked content URL for non-self posts (image, video, article)',
291
+ },
292
+ },
293
+ },
294
+ },
295
+ },
296
+ },
241
297
  },
242
298
  };
243
299
 
@@ -253,17 +309,20 @@ export default class RedditConnector extends ConnectorRuntime {
253
309
  const subreddit = ctx.config.subreddit as string | undefined;
254
310
  const searchTerms = ctx.config.search_terms as string | undefined;
255
311
  const isUserFeed = ctx.feedKey === 'user_activity';
256
- const contentType = isUserFeed ? 'overview' : ctx.feedKey === 'comments' ? 'comment' : 'post';
257
- const lookbackDays = (ctx.config.lookback_days as number) ?? 365;
312
+ // Best is ranked, not chronological: old posts interleave with new ones and
313
+ // a saved `after` anchor is meaningless once the ranking moves.
314
+ const isHomeFeed = ctx.feedKey === 'home_feed';
315
+ const contentType = isUserFeed
316
+ ? 'overview'
317
+ : isHomeFeed
318
+ ? 'home'
319
+ : ctx.feedKey === 'comments'
320
+ ? 'comment'
321
+ : 'post';
322
+ const lookbackDays = (ctx.config.lookback_days as number) ?? (isHomeFeed ? 7 : 365);
258
323
 
259
324
  // Resolve access token: user OAuth > app-only OAuth > unauthenticated
260
325
  const userAccessToken = ctx.credentials?.accessToken ?? null;
261
- let accessToken: string | undefined = userAccessToken ?? undefined;
262
- if (!accessToken) {
263
- accessToken = await this.getAppOnlyToken(ctx);
264
- }
265
- const baseUrl = accessToken ? 'https://oauth.reddit.com' : 'https://www.reddit.com';
266
-
267
326
  let username: string | undefined;
268
327
  if (isUserFeed) {
269
328
  if (!userAccessToken) {
@@ -273,9 +332,18 @@ export default class RedditConnector extends ConnectorRuntime {
273
332
  }
274
333
  username = await this.resolveUsername(ctx, userAccessToken);
275
334
  }
335
+ if (isHomeFeed && !userAccessToken) {
336
+ throw new Error('home_feed requires user OAuth. Connect Reddit with the read scope.');
337
+ }
338
+
339
+ let accessToken: string | undefined = userAccessToken ?? undefined;
340
+ if (!accessToken) {
341
+ accessToken = await this.getAppOnlyToken(ctx);
342
+ }
343
+ const baseUrl = accessToken ? 'https://oauth.reddit.com' : 'https://www.reddit.com';
276
344
 
277
345
  const previous = (ctx.checkpoint ?? {}) as RedditCheckpoint;
278
- const resumeAfter = previous.pagination_token ?? null;
346
+ const resumeAfter = isHomeFeed ? null : (previous.pagination_token ?? null);
279
347
  let cutoffDate = new Date();
280
348
  cutoffDate.setDate(cutoffDate.getDate() - lookbackDays);
281
349
  // Keep items eligible for the whole bounded sweep, even across sync runs.
@@ -355,6 +423,7 @@ export default class RedditConnector extends ConnectorRuntime {
355
423
  const itemDate = new Date(itemData.created_utc * 1000);
356
424
 
357
425
  if (itemDate < cutoffDate) {
426
+ if (isHomeFeed) continue;
358
427
  reachedCutoff = true;
359
428
  break;
360
429
  }
@@ -388,8 +457,9 @@ export default class RedditConnector extends ConnectorRuntime {
388
457
 
389
458
  const checkpoint: RedditCheckpoint = {
390
459
  last_timestamp: new Date().toISOString(),
391
- pagination_token: !reachedCutoff ? (after ?? undefined) : undefined,
392
- pagination_cutoff: !reachedCutoff && after ? cutoffDate.toISOString() : undefined,
460
+ pagination_token: !reachedCutoff && !isHomeFeed ? (after ?? undefined) : undefined,
461
+ pagination_cutoff:
462
+ !reachedCutoff && !isHomeFeed && after ? cutoffDate.toISOString() : undefined,
393
463
  };
394
464
 
395
465
  await ctx.commit(events, checkpoint as Record<string, unknown>);
@@ -498,6 +568,10 @@ export default class RedditConnector extends ConnectorRuntime {
498
568
  return `${baseUrl}/user/${encodeURIComponent(username)}/overview${jsonSuffix}?limit=100&sort=new${afterParam}`;
499
569
  }
500
570
 
571
+ if (contentType === 'home') {
572
+ return `${baseUrl}/best${jsonSuffix}?limit=100${afterParam}`;
573
+ }
574
+
501
575
  if (contentType === 'comment') {
502
576
  // Comments from a subreddit
503
577
  if (subredditPath) {
@@ -541,11 +615,9 @@ export default class RedditConnector extends ConnectorRuntime {
541
615
  });
542
616
 
543
617
  // For non-self posts, the Reddit `url` field points to the linked content (image, article, etc.)
544
- const mediaUrl = !post.is_self ? post.url : undefined;
545
- const thumbnail =
546
- post.thumbnail && !['self', 'default', 'nsfw', 'spoiler', ''].includes(post.thumbnail)
547
- ? post.thumbnail
548
- : undefined;
618
+ const mediaUrl = !post.is_self ? httpUrl(post.url) : undefined;
619
+ // `thumbnail` also carries placeholder words ("self", "image", "nsfw", ...).
620
+ const thumbnail = httpUrl(post.thumbnail);
549
621
 
550
622
  return {
551
623
  origin_id: `reddit_post_${post.name}`,
@@ -65,6 +65,7 @@ const SLACK_BOT_SCOPES = [
65
65
  const SLACK_BOT_EVENTS = [
66
66
  "app_home_opened",
67
67
  "app_mention",
68
+ "assistant_thread_started",
68
69
  "member_joined_channel",
69
70
  "member_left_channel",
70
71
  "message.channels",
@@ -33,8 +33,11 @@ export function whatsAppWebAdapterProgram() {
33
33
  // when this number moves: shipping a fix under the old number leaves every
34
34
  // already-open tab running the previous code with nothing to show for it.
35
35
  // Keep in lockstep with WHATSAPP_ADAPTER_VERSION in whatsapp-web-helpers.ts.
36
- const ADAPTER_VERSION = 25;
36
+ const ADAPTER_VERSION = 26;
37
37
  const SOURCE_ERROR_ID = "whatsapp-web:source-observation-error";
38
+ // Storage rows one `chat:` read examines; a whole personal history is
39
+ // usually under this, so one read answers.
40
+ const CHAT_SCAN_ROWS = 20_000;
38
41
  const MAX_RECORD_BYTES = 128 * 1024;
39
42
  const MAX_BUFFER_BYTES = 16 * 1024 * 1024;
40
43
  const MAX_BUFFER_ENTRIES = 10_000;
@@ -945,6 +948,11 @@ export function whatsAppWebAdapterProgram() {
945
948
  }
946
949
  const keyModule = requireFirst(["WAWebMsgKey"]);
947
950
  const exactId = query.startsWith("id:") ? query.slice(3) : null;
951
+ let chatJid = null;
952
+ if (query.startsWith("chat:")) {
953
+ const chat = await resolveChat(requireFirst(["WAWebCollections"]), { chat_jid: query.slice(5) });
954
+ chatJid = (await canonicalJid(modelData(chat).id ?? chat?.id)).jid;
955
+ }
948
956
  const database = await new Promise((resolve, reject) => {
949
957
  const request = indexedDB.open("model-storage");
950
958
  // Never create an empty replacement database when WhatsApp changes its
@@ -980,24 +988,46 @@ export function whatsAppWebAdapterProgram() {
980
988
  return;
981
989
  }
982
990
  rows.push({ position: cursor.key, id: cursor.value.id });
983
- if (rows.length > limit) resolve(rows);
991
+ if (rows.length > (chatJid === null ? limit : CHAT_SCAN_ROWS)) resolve(rows);
984
992
  else cursor.continue();
985
993
  };
986
994
  });
987
995
  } finally {
988
996
  database.close();
989
997
  }
990
- const hasMore = sourceRows.length > limit;
991
- const page = sourceRows.slice(0, limit);
998
+ let hasMore = sourceRows.length > limit;
999
+ let page = sourceRows.slice(0, limit);
1000
+ let last = page[page.length - 1];
1001
+ if (chatJid !== null) {
1002
+ // A chat read scans one large storage page, then keeps that chat's rows.
1003
+ // Matching happens after the transaction closes because LID conversion
1004
+ // awaits, and history can key a chat by phone or by LID.
1005
+ const examined = sourceRows.slice(0, CHAT_SCAN_ROWS);
1006
+ const canonical = new Map();
1007
+ const matches = [];
1008
+ for (const row of examined) {
1009
+ const remote = keyModule.fromString(row.id).remote;
1010
+ const raw = widString(remote);
1011
+ if (!canonical.has(raw)) canonical.set(raw, (await canonicalJid(remote)).jid);
1012
+ if (canonical.get(raw) !== chatJid) continue;
1013
+ matches.push(row);
1014
+ if (matches.length > limit) break;
1015
+ }
1016
+ page = matches.slice(0, limit);
1017
+ hasMore = matches.length > limit || sourceRows.length > CHAT_SCAN_ROWS;
1018
+ last = matches.length > limit ? page[page.length - 1] : examined[examined.length - 1];
1019
+ }
992
1020
  const collections = requireFirst(["WAWebCollections"]);
993
- const selected = page.filter((row) => {
1021
+ const selected = [];
1022
+ for (const row of page) {
994
1023
  const key = keyModule.fromString(row.id);
995
- if (exactId !== null && key.id !== exactId) return false;
1024
+ if (exactId !== null && key.id !== exactId) continue;
996
1025
  const remote = widString(key.remote);
997
- if (remote === "status@broadcast" || remote.endsWith("@newsletter")) return false;
1026
+ if (remote === "status@broadcast" || remote.endsWith("@newsletter")) continue;
998
1027
  const isGroup = remote.endsWith("@g.us");
999
- return !(chatFilter === "group" && !isGroup) && !(chatFilter === "individual" && isGroup);
1000
- });
1028
+ if ((chatFilter === "group" && !isGroup) || (chatFilter === "individual" && isGroup)) continue;
1029
+ selected.push(row);
1030
+ }
1001
1031
  const results = [];
1002
1032
  if (selected.length) {
1003
1033
  const loaded = await collections.Msg.getMessagesById(selected.map((row) => row.id));
@@ -1014,14 +1044,14 @@ export function whatsAppWebAdapterProgram() {
1014
1044
  // Skip them like search does; throwing would pin every later read to
1015
1045
  // the same cursor.
1016
1046
  if (!message || message.timestamp <= 0) continue;
1017
- if (exactId === null && query && !`${message.body}\n${message.caption}`.toLowerCase().includes(query.toLowerCase())) continue;
1047
+ if (exactId === null && chatJid === null && query && !`${message.body}\n${message.caption}`.toLowerCase().includes(query.toLowerCase())) continue;
1018
1048
  results.push(message);
1019
1049
  }
1020
1050
  }
1021
1051
  return {
1022
1052
  results,
1023
1053
  hasMore,
1024
- ...(hasMore ? { nextCursor: JSON.stringify({ v: 1, before: page[page.length - 1].position, query, chat_filter: chatFilter }) } : {}),
1054
+ ...(hasMore ? { nextCursor: JSON.stringify({ v: 1, before: last.position, query, chat_filter: chatFilter }) } : {}),
1025
1055
  };
1026
1056
  }
1027
1057
 
@@ -14,7 +14,7 @@ import {
14
14
  WHATSAPP_PHONE_SERVER,
15
15
  } from "./whatsapp-web-identity.js";
16
16
 
17
- export const WHATSAPP_ADAPTER_VERSION = 25;
17
+ export const WHATSAPP_ADAPTER_VERSION = 26;
18
18
  export const WHATSAPP_ORIGIN = "https://web.whatsapp.com";
19
19
 
20
20
  export type ChatFilter = "all" | "individual" | "group";
@@ -354,7 +354,7 @@ export default class WhatsAppWebConnector extends ConnectorRuntime<
354
354
  name: "WhatsApp",
355
355
  description:
356
356
  "Personal WhatsApp messages read live from WhatsApp Web in the paired Owletto Chrome without importing message history. Automations react to new-message references and read content on demand. Search, draft, send, edit, react to, and revoke messages.",
357
- version: "2.1.0",
357
+ version: "2.2.0",
358
358
  faviconDomain: "whatsapp.com",
359
359
  authSchema: { methods: [{ type: "browser", mode: "live" }] },
360
360
  browser: {
@@ -392,7 +392,7 @@ export default class WhatsAppWebConnector extends ConnectorRuntime<
392
392
  key: "live_messages",
393
393
  name: "Live messages",
394
394
  description:
395
- "Read messages directly from WhatsApp Web without importing history, using literal text search or id:<message ID>. Active Automations can subscribe to new-message references. Requires the paired browser to be online and signed in; reconnects replay messages still available in WhatsApp's local history.",
395
+ "Read messages directly from WhatsApp Web without importing history, using literal text search, id:<message ID>, or chat:<chat JID> for one chat's messages in reverse storage order. Follow cursors even after an empty filtered page. Active Automations can subscribe to new-message references. Requires the paired browser to be online and signed in; reconnects replay messages still available in WhatsApp's local history.",
396
396
  read: (ctx) => this.readMessages(ctx),
397
397
  observe: (ctx) => this.observeMessages(ctx),
398
398
  webhook: { mode: "trigger", events: ["message.created"] },