@lobu/runtime-server 24.7.0 → 24.9.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 (275) hide show
  1. package/dist/catalogs/connectors.json +282 -322
  2. package/dist/catalogs/skills.json +1 -1
  3. package/dist/component.json +1 -1
  4. package/dist/connectors/README.md +6 -2
  5. package/dist/connectors/github.ts +16 -3
  6. package/dist/connectors/imessage.ts +953 -0
  7. package/dist/connectors/linkedin.ts +20 -377
  8. package/dist/connectors/market_quotes.ts +388 -91
  9. package/dist/connectors/postgres.ts +21 -14
  10. package/dist/connectors/x-dm-adapter.js +55 -21
  11. package/dist/connectors/x.ts +1 -1
  12. package/dist/db/migrations/20261109010000_workspace_navigation.sql +14 -0
  13. package/dist/db/migrations/20261110010000_view_resources.sql +11 -0
  14. package/dist/dependencies.bun.lock +135 -103
  15. package/dist/embeddings-server.mjs +14 -2
  16. package/dist/owletto/dist/assets/_-B2C9B2RM.js +2 -0
  17. package/dist/owletto/dist/assets/_-CjyiGzwB.js +3 -0
  18. package/dist/owletto/dist/assets/_agentId-DKHXGvS2.js +2 -0
  19. package/dist/owletto/dist/assets/_agentId-bna2tPsW.js +2 -0
  20. package/dist/owletto/dist/assets/_automationId-CowRFD4E.js +2 -0
  21. package/dist/owletto/dist/assets/_connectorKey._connectionId-dE6im18z.js +2 -0
  22. package/dist/owletto/dist/assets/_connectorKey.index-DqwSv8Zs.js +2 -0
  23. package/dist/owletto/dist/assets/_conversationId-zcs-S3dY.js +2 -0
  24. package/dist/owletto/dist/assets/_eventId-BVOVizs4.js +2 -0
  25. package/dist/owletto/dist/assets/_owner-DsvIC94q.js +3 -0
  26. package/dist/owletto/dist/assets/_shape-CWjpzcvv.js +2 -0
  27. package/dist/owletto/dist/assets/_slug-DuCxYsJk.js +2 -0
  28. package/dist/owletto/dist/assets/_viewKey-BqVeHB6Z.js +2 -0
  29. package/dist/owletto/dist/assets/_viewKey-DzyOCG5U.js +2 -0
  30. package/dist/owletto/dist/assets/{accept-invitation-CX7Egv-p.js → accept-invitation-k1u3zBcn.js} +2 -2
  31. package/dist/owletto/dist/assets/activity-route-view-jTBMW7a9.js +2 -0
  32. package/dist/owletto/dist/assets/agent-connect-pages-D3mVM_q4.js +4 -0
  33. package/dist/owletto/dist/assets/agent-editor-form-Bnc_q5WD.js +2 -0
  34. package/dist/owletto/dist/assets/{agent-loading-shells-DHvKiEUB.js → agent-loading-shells-xteN-pyK.js} +2 -2
  35. package/dist/owletto/dist/assets/agent-permissions-matrix-C_ayr0pd.js +2 -0
  36. package/dist/owletto/dist/assets/{agent-skill-context-DF5q0Dfr.js → agent-skill-context-r0O0BVOu.js} +2 -2
  37. package/dist/owletto/dist/assets/{agent-subpage-shell-Pi5cECga.js → agent-subpage-shell-C2KpYdu3.js} +2 -2
  38. package/dist/owletto/dist/assets/{agent-thread-B1ZepGZc.js → agent-thread-Bv_chdPy.js} +4 -4
  39. package/dist/owletto/dist/assets/agent-thread-storage-Bx2-WBHQ.js +2 -0
  40. package/dist/owletto/dist/assets/app._appId-BUcNaSMS.js +2 -0
  41. package/dist/owletto/dist/assets/assist-composer-B1LykXpD.js +2 -0
  42. package/dist/owletto/dist/assets/automation-run-now-CjkJIkaZ.js +2 -0
  43. package/dist/owletto/dist/assets/{callback-Ckrxv0eo.js → callback-kSLa4n5s.js} +2 -2
  44. package/dist/owletto/dist/assets/{card-DT9mSjSp.js → card-C01y1O-W.js} +2 -2
  45. package/dist/owletto/dist/assets/{claim-Bzby28tT.js → claim-Dnux9Lqf.js} +2 -2
  46. package/dist/owletto/dist/assets/{client-activity-scopes-DoIErdUy.js → client-activity-scopes-BBIq16tG.js} +2 -2
  47. package/dist/owletto/dist/assets/{client-rows-BbVQy5Ti.js → client-rows-DGh1O-Fu.js} +2 -2
  48. package/dist/owletto/dist/assets/clients-BCvjAJDT.js +2 -0
  49. package/dist/owletto/dist/assets/code-editor-BdRMYojw.js +26 -0
  50. package/dist/owletto/dist/assets/connect-DZeFSGIH.js +2 -0
  51. package/dist/owletto/dist/assets/connect-menu-D4w-JhJW.js +2 -0
  52. package/dist/owletto/dist/assets/connect._clientId-IZEMQJ64.js +2 -0
  53. package/dist/owletto/dist/assets/connected._clientId-BsDzltNz.js +2 -0
  54. package/dist/owletto/dist/assets/{connection-BOaMa324.js → connection-C7glVpPE.js} +2 -2
  55. package/dist/owletto/dist/assets/connection-feed-detail-CJju0qiw.js +2 -0
  56. package/dist/owletto/dist/assets/connector-page-shell-BeuyjiB2.js +2 -0
  57. package/dist/owletto/dist/assets/connector-provenance-B2C2cjBg.js +2 -0
  58. package/dist/owletto/dist/assets/{connectors-D5F5rHxX.js → connectors-DSQ5AWPf.js} +2 -2
  59. package/dist/owletto/dist/assets/consent-B6Aw_89N.js +2 -0
  60. package/dist/owletto/dist/assets/copy-button-BhXeXLIm.js +2 -0
  61. package/dist/owletto/dist/assets/{core.esm-BIE97rfo.js → core.esm-CJUp2aNZ.js} +3 -3
  62. package/dist/owletto/dist/assets/create-CWcza8NT.js +2 -0
  63. package/dist/owletto/dist/assets/{create-BPxsKwk7.js → create-DUlRsFNn.js} +2 -2
  64. package/dist/owletto/dist/assets/{create-automation-form-B12yTrmj.js → create-automation-form-D141prEG.js} +3 -3
  65. package/dist/owletto/dist/assets/create-bGOYifof.js +2 -0
  66. package/dist/owletto/dist/assets/create._connectorKey-Ds4tpwHP.js +2 -0
  67. package/dist/owletto/dist/assets/{custom-guardrail-edits-B9plaLBN.js → custom-guardrail-edits-DuQ28xv3.js} +2 -2
  68. package/dist/owletto/dist/assets/definition-comparison-BUDNuAN_.js +2 -0
  69. package/dist/owletto/dist/assets/{detail-page-skeleton-I5_7FkKx.js → detail-page-skeleton-BRHaq5Sj.js} +2 -2
  70. package/dist/owletto/dist/assets/{device-CadaiNF4.js → device-D3fzoIrM.js} +2 -2
  71. package/dist/owletto/dist/assets/device-pin-tombstone-BIM-ziCH.js +2 -0
  72. package/dist/owletto/dist/assets/device._deviceId-BnPqTgK1.js +2 -0
  73. package/dist/owletto/dist/assets/dynamic-schema-form-OkIZImgp.js +2 -0
  74. package/dist/owletto/dist/assets/entity-options-CpeX7iiX.js +2 -0
  75. package/dist/owletto/dist/assets/entity-page-Cjc8oXA2.js +2 -0
  76. package/dist/owletto/dist/assets/entity-pages-18xSANrS.js +2 -0
  77. package/dist/owletto/dist/assets/entity-schema-graph-uwZ-P0t8.js +2 -0
  78. package/dist/owletto/dist/assets/entity-type-page-MgZ7_0oh.js +2 -0
  79. package/dist/owletto/dist/assets/event-detail-D6AH6a2C.js +2 -0
  80. package/dist/owletto/dist/assets/event-kind-options-fHAIXu24.js +2 -0
  81. package/dist/owletto/dist/assets/events-feed-BI7wNRUY.js +2 -0
  82. package/dist/owletto/dist/assets/filter-editors-DDTwyYt0.js +3 -0
  83. package/dist/owletto/dist/assets/{full-page-spinner-CCU4PkRv.js → full-page-spinner-DWo519BU.js} +2 -2
  84. package/dist/owletto/dist/assets/index-9tTjJo_J.css +1 -0
  85. package/dist/owletto/dist/assets/{index-pmr1WUoG.js → index-BW7IFKXC.js} +2 -2
  86. package/dist/owletto/dist/assets/index-BYcFrinP.js +2 -0
  87. package/dist/owletto/dist/assets/index-BhJsTy-C.js +2 -0
  88. package/dist/owletto/dist/assets/index-CEcsgXDj.js +2 -0
  89. package/dist/owletto/dist/assets/index-CPscKk2u.js +2 -0
  90. package/dist/owletto/dist/assets/{index-B72KYdN1.js → index-Cd8jMsz8.js} +2 -2
  91. package/dist/owletto/dist/assets/index-CdDNNAx2.js +7906 -0
  92. package/dist/owletto/dist/assets/index-CfJ2-EpK.js +2 -0
  93. package/dist/owletto/dist/assets/index-D1UCJQl1.js +2 -0
  94. package/dist/owletto/dist/assets/index-D5DM4g2w.js +2 -0
  95. package/dist/owletto/dist/assets/index-DmqnKGqW.js +2 -0
  96. package/dist/owletto/dist/assets/index-DznAbTOF.js +2 -0
  97. package/dist/owletto/dist/assets/json-diff-C-WQqyIf.js +4 -0
  98. package/dist/owletto/dist/assets/{list-skeleton-BAqT0vxo.js → list-skeleton-0B1bTrAK.js} +2 -2
  99. package/dist/owletto/dist/assets/{login-D5bIjMtf.js → login-CH7P2AyR.js} +2 -2
  100. package/dist/owletto/dist/assets/{logout-JYZvxz8v.js → logout-D474YsYQ.js} +2 -2
  101. package/dist/owletto/dist/assets/member-scope-gate-CH_0jHiM.js +2 -0
  102. package/dist/owletto/dist/assets/memory-browse-page-Ba4aYavw.js +74 -0
  103. package/dist/owletto/dist/assets/model-selector-XYmk7Iru.js +2 -0
  104. package/dist/owletto/dist/assets/needs-you-list-Bd4iiiqm.js +2 -0
  105. package/dist/owletto/dist/assets/new-BOsrRqp8.js +2 -0
  106. package/dist/owletto/dist/assets/new-CJ6TF3Vc.js +2 -0
  107. package/dist/owletto/dist/assets/{new-B-Jd-vBl.js → new-DGPOjak2.js} +2 -2
  108. package/dist/owletto/dist/assets/new-Q0XqiZq2.js +2 -0
  109. package/dist/owletto/dist/assets/organization-hD_Z6TSd.js +2 -0
  110. package/dist/owletto/dist/assets/peek-pane-content-Cc8YX1oy.js +2 -0
  111. package/dist/owletto/dist/assets/{pending-seed-CoFPQ835.js → pending-seed-D7-ld7as.js} +2 -2
  112. package/dist/owletto/dist/assets/proposal-review-shell-BWRJidwb.js +2 -0
  113. package/dist/owletto/dist/assets/public-shell-ready-CRyAZATw.js +2 -0
  114. package/dist/owletto/dist/assets/record-activity-9ux6SfCd.js +2 -0
  115. package/dist/owletto/dist/assets/{record-session-Bpx4_LGk.js → record-session-ClKBr1_C.js} +2 -2
  116. package/dist/owletto/dist/assets/{renderer-CgaQKMoG.js → renderer-DZ0w2k2r.js} +2 -2
  117. package/dist/owletto/dist/assets/{reset-password-C-4Jnuqk.js → reset-password-D2RfrEVZ.js} +2 -2
  118. package/dist/owletto/dist/assets/run-initiator-B8IRlRd-.js +2 -0
  119. package/dist/owletto/dist/assets/runs-CuC7WMtd.js +2 -0
  120. package/dist/owletto/dist/assets/runs-list-8gUPWjP4.js +2 -0
  121. package/dist/owletto/dist/assets/{schema-value-BUgC0Ro8.js → schema-value-k19Ata7u.js} +3 -3
  122. package/dist/owletto/dist/assets/scoped-feed-bar-L7h-Ca4u.js +2 -0
  123. package/dist/owletto/dist/assets/{settings-DYYvrrZ4.js → settings-BZqntV3E.js} +2 -2
  124. package/dist/owletto/dist/assets/source-record-panels-C4UItfdk.js +2 -0
  125. package/dist/owletto/dist/assets/{status-variants-DT61YfsU.js → status-variants-BR_iGWN5.js} +2 -2
  126. package/dist/owletto/dist/assets/subDays-hOwerOLo.js +2 -0
  127. package/dist/owletto/dist/assets/{table-B6yimlsZ.js → table-C3DMoL4K.js} +2 -2
  128. package/dist/owletto/dist/assets/use-automations-CdtiVLCv.js +2 -0
  129. package/dist/owletto/dist/assets/use-login-redirect-CYlVkAhE.js +2 -0
  130. package/dist/owletto/dist/assets/use-mention-search-CtbixPEE.js +91 -0
  131. package/dist/owletto/dist/assets/view-param-filters-BdN8OU35.js +2 -0
  132. package/dist/owletto/dist/assets/{views-access-required-BVtMfgLh.js → views-access-required-CvIIxdS_.js} +2 -2
  133. package/dist/owletto/dist/index.html +19 -12
  134. package/dist/server-main.bundle.mjs +4518 -2567
  135. package/npm-shrinkwrap.json +644 -551
  136. package/package.json +4 -2
  137. package/vendor/connector-sdk/dist/connector-types.d.ts +23 -2
  138. package/vendor/connector-sdk/package.json +1 -1
  139. package/vendor/core/dist/classify-error.d.ts +3 -4
  140. package/vendor/core/dist/classify-error.js +8 -8
  141. package/vendor/core/dist/connector-query-errors.d.ts +6 -0
  142. package/vendor/core/dist/connector-query-errors.js +4 -0
  143. package/vendor/core/dist/contracts/tools/collection-presentation.d.ts +17 -1
  144. package/vendor/core/dist/contracts/tools/collection-presentation.js +27 -3
  145. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +39 -0
  146. package/vendor/core/dist/contracts/tools/manage-automations.js +11 -1
  147. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +1 -1
  148. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +2 -0
  149. package/vendor/core/dist/contracts/tools/manage-entity.js +7 -0
  150. package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +2 -0
  151. package/vendor/core/dist/contracts/tools/manage-feeds.js +3 -0
  152. package/vendor/core/dist/contracts/tools/manage-views.d.ts +249 -7
  153. package/vendor/core/dist/contracts/tools/manage-views.js +83 -21
  154. package/vendor/core/dist/contracts/tools/navigation.d.ts +248 -0
  155. package/vendor/core/dist/contracts/tools/navigation.js +284 -0
  156. package/vendor/core/dist/contracts/tools/view-attach.d.ts +7 -0
  157. package/vendor/core/dist/contracts/tools/view-attach.js +15 -0
  158. package/vendor/core/dist/contracts/tools/view-content-hash.d.ts +4 -1
  159. package/vendor/core/dist/contracts/tools/view-content-hash.js +4 -2
  160. package/vendor/core/dist/contracts/tools/view-definition.d.ts +2 -0
  161. package/vendor/core/dist/contracts/tools/view-definition.js +52 -0
  162. package/vendor/core/dist/contracts/tools/view-host.d.ts +68 -0
  163. package/vendor/core/dist/contracts/tools/view-host.js +30 -1
  164. package/vendor/core/dist/contracts/tools/view-scope.d.ts +31 -0
  165. package/vendor/core/dist/contracts/tools/view-scope.js +45 -0
  166. package/vendor/core/dist/error-report.js +1 -0
  167. package/vendor/core/dist/errors.d.ts +17 -24
  168. package/vendor/core/dist/errors.js +17 -24
  169. package/vendor/core/dist/types.d.ts +0 -6
  170. package/vendor/core/package.json +11 -1
  171. package/vendor/views/dist/api.d.ts +30 -5
  172. package/vendor/views/dist/api.js +22 -8
  173. package/vendor/views/dist/bridge.d.ts +17 -0
  174. package/vendor/views/dist/bridge.js +49 -1
  175. package/vendor/views/dist/components.d.ts +27 -5
  176. package/vendor/views/dist/components.js +57 -7
  177. package/vendor/views/dist/embed.d.ts +98 -0
  178. package/vendor/views/dist/embed.js +418 -0
  179. package/vendor/views/dist/index.d.ts +3 -1
  180. package/vendor/views/dist/index.js +1 -0
  181. package/vendor/views/package.json +1 -1
  182. package/dist/connectors/linkedin-takeout.ts +0 -577
  183. package/dist/connectors/takeout-utils.ts +0 -240
  184. package/dist/owletto/dist/assets/_-CZgmjLR9.js +0 -2
  185. package/dist/owletto/dist/assets/_-Cm5OgtYD.js +0 -3
  186. package/dist/owletto/dist/assets/_-DtqBFgK5.js +0 -2
  187. package/dist/owletto/dist/assets/_agentId-Cci6NFc1.js +0 -2
  188. package/dist/owletto/dist/assets/_agentId-GhWTlPO2.js +0 -2
  189. package/dist/owletto/dist/assets/_automationId-KUlxSTK2.js +0 -2
  190. package/dist/owletto/dist/assets/_connectorKey._connectionId-Zpy7Hvml.js +0 -2
  191. package/dist/owletto/dist/assets/_connectorKey.index-CYDRp9UX.js +0 -2
  192. package/dist/owletto/dist/assets/_conversationId-NNqDdije.js +0 -2
  193. package/dist/owletto/dist/assets/_eventId-0BSX6VHj.js +0 -2
  194. package/dist/owletto/dist/assets/_owner-C-CD22NB.js +0 -3
  195. package/dist/owletto/dist/assets/_shape-CvXp4omb.js +0 -2
  196. package/dist/owletto/dist/assets/_slug-DgK7zpKA.js +0 -2
  197. package/dist/owletto/dist/assets/_viewKey-cH54P0zY.js +0 -2
  198. package/dist/owletto/dist/assets/_viewKey-m0B5j7L9.js +0 -2
  199. package/dist/owletto/dist/assets/activity-link-rXNpmppV.js +0 -2
  200. package/dist/owletto/dist/assets/activity-route-view-B0m7_g9q.js +0 -2
  201. package/dist/owletto/dist/assets/agent-client-setup-list-BmD3-_Ox.js +0 -4
  202. package/dist/owletto/dist/assets/agent-connect-pages-BtOTCsTU.js +0 -2
  203. package/dist/owletto/dist/assets/agent-editor-form-CirqCpcM.js +0 -2
  204. package/dist/owletto/dist/assets/agent-list-row-SyACVYX7.js +0 -2
  205. package/dist/owletto/dist/assets/agent-permissions-matrix-Dsc26dyW.js +0 -2
  206. package/dist/owletto/dist/assets/agent-thread-storage-U6htL3ad.js +0 -2
  207. package/dist/owletto/dist/assets/agents-D1FHZ0jR.js +0 -2
  208. package/dist/owletto/dist/assets/app._appId-01I0CJal.js +0 -2
  209. package/dist/owletto/dist/assets/assist-composer-BD9msDk3.js +0 -2
  210. package/dist/owletto/dist/assets/automation-detail-content-BFv1TglZ.js +0 -2
  211. package/dist/owletto/dist/assets/automation-row-CmTpAD4r.js +0 -2
  212. package/dist/owletto/dist/assets/automation-source-list-D8ZSavQU.js +0 -2
  213. package/dist/owletto/dist/assets/automations-D1FHZ0jR.js +0 -2
  214. package/dist/owletto/dist/assets/change-summary-CGrKEJ04.js +0 -2
  215. package/dist/owletto/dist/assets/clients-6aJvabvS.js +0 -2
  216. package/dist/owletto/dist/assets/connect-BmDziBzI.js +0 -2
  217. package/dist/owletto/dist/assets/connect-menu-Bs8mxsga.js +0 -2
  218. package/dist/owletto/dist/assets/connect._clientId-t5aKu3aa.js +0 -2
  219. package/dist/owletto/dist/assets/connected._clientId-DswMAw8l.js +0 -2
  220. package/dist/owletto/dist/assets/connection-feed-detail-BLCjhP-H.js +0 -2
  221. package/dist/owletto/dist/assets/connector-boxes-BAP_f77M.js +0 -2
  222. package/dist/owletto/dist/assets/connector-page-shell-ClOmVPJr.js +0 -2
  223. package/dist/owletto/dist/assets/connector-provenance-wmYu5jwO.js +0 -2
  224. package/dist/owletto/dist/assets/consent-RqHNkmm8.js +0 -2
  225. package/dist/owletto/dist/assets/copy-button-D6zpsZLi.js +0 -2
  226. package/dist/owletto/dist/assets/create-GT8_yF0R.js +0 -2
  227. package/dist/owletto/dist/assets/create-Yx2qBMBy.js +0 -2
  228. package/dist/owletto/dist/assets/create._connectorKey-CzXqSkuI.js +0 -2
  229. package/dist/owletto/dist/assets/definition-comparison-C3k6Wa9B.js +0 -2
  230. package/dist/owletto/dist/assets/device-pin-tombstone-U7Bx05P6.js +0 -2
  231. package/dist/owletto/dist/assets/device._deviceId-DTZqj1HS.js +0 -2
  232. package/dist/owletto/dist/assets/dynamic-schema-form-DyT_9iVE.js +0 -2
  233. package/dist/owletto/dist/assets/entity-options-CGTjLlcS.js +0 -2
  234. package/dist/owletto/dist/assets/entity-page-DHHMmA8V.js +0 -2
  235. package/dist/owletto/dist/assets/entity-pages-eYbG2FDT.js +0 -2
  236. package/dist/owletto/dist/assets/entity-type-page-CjFqxSdL.js +0 -2
  237. package/dist/owletto/dist/assets/event-card-BtTUuf2q.js +0 -2
  238. package/dist/owletto/dist/assets/event-detail-8xHiplt_.js +0 -2
  239. package/dist/owletto/dist/assets/events-feed-zFnTSE27.js +0 -2
  240. package/dist/owletto/dist/assets/filter-editors-Dd5R2Etd.js +0 -2
  241. package/dist/owletto/dist/assets/home-stream-IVsNEkwp.js +0 -2
  242. package/dist/owletto/dist/assets/index-2oaMOFKe.js +0 -2
  243. package/dist/owletto/dist/assets/index-B-Ab8srM.js +0 -7899
  244. package/dist/owletto/dist/assets/index-B4RZgvvI.js +0 -2
  245. package/dist/owletto/dist/assets/index-BBZM53p8.js +0 -2
  246. package/dist/owletto/dist/assets/index-BOb0a5f9.js +0 -2
  247. package/dist/owletto/dist/assets/index-BYFDMIQC.js +0 -2
  248. package/dist/owletto/dist/assets/index-BwnFQcMe.js +0 -2
  249. package/dist/owletto/dist/assets/index-CvYsWYlF.js +0 -2
  250. package/dist/owletto/dist/assets/index-DIXIvtnM.js +0 -2
  251. package/dist/owletto/dist/assets/index-DLwokXHW.js +0 -2
  252. package/dist/owletto/dist/assets/index-_nlPHus1.js +0 -2
  253. package/dist/owletto/dist/assets/index-cwOgj4-i.js +0 -2
  254. package/dist/owletto/dist/assets/index-pp4qmhkA.js +0 -2
  255. package/dist/owletto/dist/assets/index-tTbno-PX.css +0 -1
  256. package/dist/owletto/dist/assets/json-diff-B-1Swv_y.js +0 -28
  257. package/dist/owletto/dist/assets/member-scope-gate-Lj9m4RL2.js +0 -2
  258. package/dist/owletto/dist/assets/memory-browse-page-rAKfVdQ_.js +0 -74
  259. package/dist/owletto/dist/assets/model-selector-onvGA9Ww.js +0 -2
  260. package/dist/owletto/dist/assets/new-BmehH1uR.js +0 -2
  261. package/dist/owletto/dist/assets/new-KDi15LWZ.js +0 -2
  262. package/dist/owletto/dist/assets/organization-B9bh20Xo.js +0 -2
  263. package/dist/owletto/dist/assets/peek-pane-content-Bqus80Mq.js +0 -2
  264. package/dist/owletto/dist/assets/proposal-review-shell-CnACXCUg.js +0 -2
  265. package/dist/owletto/dist/assets/public-shell-ready-Dlh-eWz0.js +0 -2
  266. package/dist/owletto/dist/assets/record-activity-6CfR95Ul.js +0 -2
  267. package/dist/owletto/dist/assets/run-initiator-BvruBM5H.js +0 -2
  268. package/dist/owletto/dist/assets/runs-BMzp7j7j.js +0 -2
  269. package/dist/owletto/dist/assets/runs-list-DVhrTr3v.js +0 -2
  270. package/dist/owletto/dist/assets/schema-type-editor-panel-Bdeumkux.js +0 -2
  271. package/dist/owletto/dist/assets/source-record-panels-CBV9tsR3.js +0 -2
  272. package/dist/owletto/dist/assets/use-automations-II_YJWtN.js +0 -2
  273. package/dist/owletto/dist/assets/use-login-redirect-BqtEilid.js +0 -2
  274. package/dist/owletto/dist/assets/use-mention-search-Bxlpd6Dp.js +0 -96
  275. package/dist/owletto/dist/assets/view-param-filters-DYlqBocg.js +0 -2
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * Credential-free market marks for deterministic portfolio valuation.
3
3
  *
4
- * This connector exposes one read-only action and no feeds. Quotes are returned
5
- * to the caller and are never persisted as raw market-price events.
4
+ * This connector exposes two read-only actions and no feeds: `quote` for the
5
+ * current mark and `history` for daily closes over a date range. Results are
6
+ * returned to the caller and are never persisted as raw market-price events.
6
7
  */
7
8
  import {
8
9
  type ActionContext,
@@ -37,6 +38,29 @@ type QuoteUnavailable = {
37
38
 
38
39
  type QuoteRow = QuoteOk | QuoteUnavailable;
39
40
 
41
+ type HistoryClose = { date: string; close: number };
42
+
43
+ type HistorySeries = {
44
+ status: "history";
45
+ id: string;
46
+ symbol: string;
47
+ provider_symbol: string;
48
+ currency: string;
49
+ closes: HistoryClose[];
50
+ };
51
+
52
+ type HistoryUnavailable = {
53
+ status: "history_unavailable";
54
+ id: string;
55
+ symbol: string;
56
+ provider_symbol: string | null;
57
+ reason: string;
58
+ };
59
+
60
+ type HistoryRow = HistorySeries | HistoryUnavailable;
61
+
62
+ type HistoryRange = { from: string; to: string };
63
+
40
64
  type QuoteSymbolInput = {
41
65
  market?: string;
42
66
  symbol?: string;
@@ -53,6 +77,9 @@ const YAHOO_CHART_URL = "https://query2.finance.yahoo.com/v8/finance/chart";
53
77
  const QUOTE_TIMEOUT_MS = 8_000;
54
78
  const STALE_AFTER_MS = 24 * 60 * 60 * 1_000;
55
79
  const MAX_CONCURRENT_QUOTES = 5;
80
+ const MAX_SYMBOLS = 50;
81
+ const MAX_HISTORY_YEARS = 10;
82
+ const DAY_SECONDS = 24 * 60 * 60;
56
83
 
57
84
  export function toProviderSymbol(market: string, symbol: string): string {
58
85
  const normalizedMarket = market.trim().toUpperCase();
@@ -158,19 +185,109 @@ export function parseYahooChartBody(
158
185
  };
159
186
  }
160
187
 
161
- async function fetchYahooQuote(
188
+ /** The calendar date of a bar in the exchange's own timezone (UTC fallback). */
189
+ function exchangeDateFormatter(
190
+ timezone: string | undefined
191
+ ): Intl.DateTimeFormat {
192
+ const options: Intl.DateTimeFormatOptions = {
193
+ year: "numeric",
194
+ month: "2-digit",
195
+ day: "2-digit",
196
+ };
197
+ const zone = timezone?.trim();
198
+ if (zone) {
199
+ try {
200
+ return new Intl.DateTimeFormat("en-US", { ...options, timeZone: zone });
201
+ } catch {
202
+ // Unknown IANA name: fall through to UTC.
203
+ }
204
+ }
205
+ return new Intl.DateTimeFormat("en-US", { ...options, timeZone: "UTC" });
206
+ }
207
+
208
+ function formatExchangeDate(
209
+ formatter: Intl.DateTimeFormat,
210
+ epochSeconds: number
211
+ ): string {
212
+ const parts = Object.fromEntries(
213
+ formatter
214
+ .formatToParts(new Date(epochSeconds * 1_000))
215
+ .map((part) => [part.type, part.value])
216
+ );
217
+ return `${parts.year}-${parts.month}-${parts.day}`;
218
+ }
219
+
220
+ export function parseYahooHistoryBody(
221
+ body: unknown,
162
222
  providerSymbol: string,
163
- fetchImpl: FetchLike = fetch
164
- ): Promise<
165
- | { ok: true; price: number; currency: string; asOf: string }
166
- | { ok: false; reason: string }
167
- > {
223
+ range: HistoryRange
224
+ ): { currency: string; closes: HistoryClose[] } | { error: string } {
225
+ const chart = body as {
226
+ chart?: {
227
+ result?: Array<{
228
+ meta?: { currency?: string; exchangeTimezoneName?: string };
229
+ timestamp?: unknown[];
230
+ indicators?: { quote?: Array<{ close?: unknown[] }> };
231
+ }>;
232
+ error?: { description?: string; code?: string };
233
+ };
234
+ };
235
+ if (chart.chart?.error) {
236
+ return {
237
+ error:
238
+ chart.chart.error.description ??
239
+ chart.chart.error.code ??
240
+ `history provider error for ${providerSymbol}`,
241
+ };
242
+ }
243
+ const result = chart.chart?.result?.[0];
244
+ if (!result) {
245
+ return { error: `no history for ${providerSymbol}` };
246
+ }
247
+ const currency = result.meta?.currency?.trim().toUpperCase();
248
+ if (!currency) {
249
+ return { error: `no quote currency for ${providerSymbol}` };
250
+ }
251
+
252
+ const timestamps = result.timestamp ?? [];
253
+ const closeValues = result.indicators?.quote?.[0]?.close ?? [];
254
+ const formatter = exchangeDateFormatter(result.meta?.exchangeTimezoneName);
255
+ const closes: HistoryClose[] = [];
256
+ for (let i = 0; i < timestamps.length; i++) {
257
+ const timestamp = timestamps[i];
258
+ const close = closeValues[i];
259
+ if (
260
+ typeof timestamp !== "number" ||
261
+ !Number.isFinite(timestamp) ||
262
+ typeof close !== "number" ||
263
+ !Number.isFinite(close) ||
264
+ close <= 0
265
+ ) {
266
+ continue;
267
+ }
268
+ const date = formatExchangeDate(formatter, timestamp);
269
+ if (date < range.from || date > range.to) continue;
270
+ // Yahoo can repeat the latest bar; keep one close per exchange date.
271
+ if (closes.at(-1)?.date === date) {
272
+ closes[closes.length - 1] = { date, close };
273
+ } else {
274
+ closes.push({ date, close });
275
+ }
276
+ }
277
+ return { currency, closes };
278
+ }
279
+
280
+ async function requestYahooChart(
281
+ providerSymbol: string,
282
+ query: string,
283
+ fetchImpl: FetchLike
284
+ ): Promise<{ ok: true; body: unknown } | { ok: false; reason: string }> {
168
285
  if (!providerSymbol) {
169
286
  return { ok: false, reason: "missing symbol" };
170
287
  }
171
288
  const url = `${YAHOO_CHART_URL}/${encodeURIComponent(
172
289
  providerSymbol
173
- )}?interval=1d&range=1d`;
290
+ )}?${query}`;
174
291
  try {
175
292
  const response = await fetchImpl(url, {
176
293
  headers: {
@@ -182,16 +299,7 @@ async function fetchYahooQuote(
182
299
  if (!response.ok) {
183
300
  return { ok: false, reason: `quote provider HTTP ${response.status}` };
184
301
  }
185
- const parsed = parseYahooChartBody(await response.json(), providerSymbol);
186
- if ("error" in parsed) {
187
- return { ok: false, reason: parsed.error };
188
- }
189
- return {
190
- ok: true,
191
- price: parsed.price,
192
- currency: parsed.currency,
193
- asOf: parsed.asOf,
194
- };
302
+ return { ok: true, body: await response.json() };
195
303
  } catch (error) {
196
304
  return {
197
305
  ok: false,
@@ -200,6 +308,49 @@ async function fetchYahooQuote(
200
308
  }
201
309
  }
202
310
 
311
+ async function fetchYahooQuote(
312
+ providerSymbol: string,
313
+ fetchImpl: FetchLike = fetch
314
+ ): Promise<
315
+ | { ok: true; price: number; currency: string; asOf: string }
316
+ | { ok: false; reason: string }
317
+ > {
318
+ const chart = await requestYahooChart(
319
+ providerSymbol,
320
+ "interval=1d&range=1d",
321
+ fetchImpl
322
+ );
323
+ if (!chart.ok) return chart;
324
+ const parsed = parseYahooChartBody(chart.body, providerSymbol);
325
+ if ("error" in parsed) {
326
+ return { ok: false, reason: parsed.error };
327
+ }
328
+ return {
329
+ ok: true,
330
+ price: parsed.price,
331
+ currency: parsed.currency,
332
+ asOf: parsed.asOf,
333
+ };
334
+ }
335
+
336
+ /** Run `task` for every index with at most MAX_CONCURRENT_QUOTES in flight. */
337
+ async function forEachConcurrently(
338
+ count: number,
339
+ task: (index: number) => Promise<void>
340
+ ): Promise<void> {
341
+ let nextIndex = 0;
342
+ const worker = async (): Promise<void> => {
343
+ while (nextIndex < count) {
344
+ await task(nextIndex++);
345
+ }
346
+ };
347
+ await Promise.all(
348
+ Array.from({ length: Math.min(MAX_CONCURRENT_QUOTES, count) }, () =>
349
+ worker()
350
+ )
351
+ );
352
+ }
353
+
203
354
  export async function quoteMany(
204
355
  inputs: Array<QuoteSymbolInput | string>,
205
356
  options?: { fetchImpl?: FetchLike; now?: Date }
@@ -208,96 +359,201 @@ export async function quoteMany(
208
359
  const now = options?.now ?? new Date();
209
360
  const normalized = inputs.map(normalizeSymbolInput);
210
361
  const results = new Array<QuoteRow>(normalized.length);
211
- let nextIndex = 0;
212
362
 
213
- const worker = async (): Promise<void> => {
214
- while (nextIndex < normalized.length) {
215
- const index = nextIndex++;
216
- const item = normalized[index];
217
- if (!item?.symbol || !item.provider_symbol) {
218
- results[index] = {
219
- status: "quote_unavailable",
220
- id: item?.id ?? "UNKNOWN",
221
- market: item?.market ?? "",
222
- symbol: item?.symbol ?? "",
223
- provider_symbol: item?.provider_symbol || null,
224
- provider: "yahoo",
225
- reason: "missing symbol",
226
- };
227
- continue;
228
- }
229
-
230
- const quote = await fetchYahooQuote(item.provider_symbol, fetchImpl);
231
- if (!quote.ok) {
232
- results[index] = {
233
- status: "quote_unavailable",
234
- id: item.id,
235
- market: item.market,
236
- symbol: item.symbol,
237
- provider_symbol: item.provider_symbol,
238
- provider: "yahoo",
239
- reason: quote.reason,
240
- };
241
- continue;
242
- }
363
+ await forEachConcurrently(normalized.length, async (index) => {
364
+ const item = normalized[index];
365
+ if (!item?.symbol || !item.provider_symbol) {
366
+ results[index] = {
367
+ status: "quote_unavailable",
368
+ id: item?.id ?? "UNKNOWN",
369
+ market: item?.market ?? "",
370
+ symbol: item?.symbol ?? "",
371
+ provider_symbol: item?.provider_symbol || null,
372
+ provider: "yahoo",
373
+ reason: "missing symbol",
374
+ };
375
+ return;
376
+ }
377
+
378
+ const quote = await fetchYahooQuote(item.provider_symbol, fetchImpl);
379
+ if (!quote.ok) {
243
380
  results[index] = {
244
- status: "quoted",
381
+ status: "quote_unavailable",
245
382
  id: item.id,
246
383
  market: item.market,
247
384
  symbol: item.symbol,
248
385
  provider_symbol: item.provider_symbol,
249
- price: quote.price,
250
- currency: quote.currency,
251
- as_of: quote.asOf,
252
- stale: now.getTime() - new Date(quote.asOf).getTime() > STALE_AFTER_MS,
253
- tier: "delayed",
254
386
  provider: "yahoo",
387
+ reason: quote.reason,
255
388
  };
389
+ return;
256
390
  }
257
- };
391
+ results[index] = {
392
+ status: "quoted",
393
+ id: item.id,
394
+ market: item.market,
395
+ symbol: item.symbol,
396
+ provider_symbol: item.provider_symbol,
397
+ price: quote.price,
398
+ currency: quote.currency,
399
+ as_of: quote.asOf,
400
+ stale: now.getTime() - new Date(quote.asOf).getTime() > STALE_AFTER_MS,
401
+ tier: "delayed",
402
+ provider: "yahoo",
403
+ };
404
+ });
405
+ return results;
406
+ }
258
407
 
259
- await Promise.all(
260
- Array.from(
261
- { length: Math.min(MAX_CONCURRENT_QUOTES, normalized.length) },
262
- () => worker()
263
- )
264
- );
408
+ /** Midnight UTC of a strict `YYYY-MM-DD` calendar date, or null. */
409
+ function parseCalendarDate(value: unknown): Date | null {
410
+ if (typeof value !== "string") return null;
411
+ const date = new Date(`${value}T00:00:00Z`);
412
+ if (!Number.isFinite(date.getTime())) return null;
413
+ // Round-tripping rejects non-padded forms and impossible days (2024-02-30).
414
+ return date.toISOString().slice(0, 10) === value ? date : null;
415
+ }
416
+
417
+ export function validateHistoryRange(
418
+ from: unknown,
419
+ to: unknown
420
+ ): HistoryRange | { error: string } {
421
+ const fromDate = parseCalendarDate(from);
422
+ const toDate = parseCalendarDate(to);
423
+ if (!fromDate || !toDate) {
424
+ return { error: "history requires from and to as YYYY-MM-DD dates" };
425
+ }
426
+ if (fromDate > toDate) {
427
+ return { error: "history requires from to be on or before to" };
428
+ }
429
+ const limit = new Date(fromDate);
430
+ limit.setUTCFullYear(limit.getUTCFullYear() + MAX_HISTORY_YEARS);
431
+ if (toDate > limit) {
432
+ return {
433
+ error: `history spans at most ${MAX_HISTORY_YEARS} years between from and to`,
434
+ };
435
+ }
436
+ return { from: from as string, to: to as string };
437
+ }
438
+
439
+ export async function historyMany(
440
+ inputs: Array<QuoteSymbolInput | string>,
441
+ range: HistoryRange,
442
+ options?: { fetchImpl?: FetchLike }
443
+ ): Promise<HistoryRow[]> {
444
+ const fetchImpl = options?.fetchImpl ?? fetch;
445
+ const normalized = inputs.map(normalizeSymbolInput);
446
+ const results = new Array<HistoryRow>(normalized.length);
447
+ // Widen the window by a day on each side so every exchange timezone's local
448
+ // `from`..`to` days are fully covered; bars are then filtered by local date.
449
+ const period1 = Date.parse(`${range.from}T00:00:00Z`) / 1_000 - DAY_SECONDS;
450
+ const period2 = Date.parse(`${range.to}T00:00:00Z`) / 1_000 + 2 * DAY_SECONDS;
451
+ const query = `interval=1d&period1=${period1}&period2=${period2}`;
452
+
453
+ await forEachConcurrently(normalized.length, async (index) => {
454
+ const item = normalized[index];
455
+ const unavailable = (reason: string): HistoryUnavailable => ({
456
+ status: "history_unavailable",
457
+ id: item?.id ?? "UNKNOWN",
458
+ symbol: item?.symbol ?? "",
459
+ provider_symbol: item?.provider_symbol || null,
460
+ reason,
461
+ });
462
+ if (!item?.symbol || !item.provider_symbol) {
463
+ results[index] = unavailable("missing symbol");
464
+ return;
465
+ }
466
+ const chart = await requestYahooChart(
467
+ item.provider_symbol,
468
+ query,
469
+ fetchImpl
470
+ );
471
+ if (!chart.ok) {
472
+ results[index] = unavailable(chart.reason);
473
+ return;
474
+ }
475
+ const parsed = parseYahooHistoryBody(
476
+ chart.body,
477
+ item.provider_symbol,
478
+ range
479
+ );
480
+ if ("error" in parsed) {
481
+ results[index] = unavailable(parsed.error);
482
+ return;
483
+ }
484
+ results[index] = {
485
+ status: "history",
486
+ id: item.id,
487
+ symbol: item.symbol,
488
+ provider_symbol: item.provider_symbol,
489
+ currency: parsed.currency,
490
+ closes: parsed.closes,
491
+ };
492
+ });
265
493
  return results;
266
494
  }
267
495
 
496
+ const symbolsSchema = {
497
+ type: "array",
498
+ minItems: 1,
499
+ maxItems: MAX_SYMBOLS,
500
+ items: {
501
+ oneOf: [
502
+ { type: "string" },
503
+ {
504
+ type: "object",
505
+ properties: {
506
+ market: { type: "string" },
507
+ symbol: { type: "string" },
508
+ id: { type: "string" },
509
+ provider_symbol: { type: "string" },
510
+ },
511
+ },
512
+ ],
513
+ },
514
+ } as const;
515
+
268
516
  const quoteInputSchema = {
269
517
  type: "object",
270
518
  required: ["symbols"],
519
+ properties: { symbols: symbolsSchema },
520
+ } as const;
521
+
522
+ const historyInputSchema = {
523
+ type: "object",
524
+ required: ["symbols", "from", "to"],
271
525
  properties: {
272
- symbols: {
273
- type: "array",
274
- minItems: 1,
275
- maxItems: 50,
276
- items: {
277
- oneOf: [
278
- { type: "string" },
279
- {
280
- type: "object",
281
- properties: {
282
- market: { type: "string" },
283
- symbol: { type: "string" },
284
- id: { type: "string" },
285
- provider_symbol: { type: "string" },
286
- },
287
- },
288
- ],
289
- },
526
+ symbols: symbolsSchema,
527
+ from: {
528
+ type: "string",
529
+ description: "First calendar day (YYYY-MM-DD), inclusive.",
530
+ },
531
+ to: {
532
+ type: "string",
533
+ description:
534
+ "Last calendar day (YYYY-MM-DD), inclusive; at most 10 years after from.",
290
535
  },
291
536
  },
292
537
  } as const;
293
538
 
539
+ /** Shared symbols-array guard for both actions; null when acceptable. */
540
+ function symbolsError(action: string, symbols: unknown): string | null {
541
+ if (!Array.isArray(symbols) || symbols.length === 0) {
542
+ return `${action} requires a non-empty symbols array`;
543
+ }
544
+ if (symbols.length > MAX_SYMBOLS) {
545
+ return `${action} accepts at most ${MAX_SYMBOLS} symbols`;
546
+ }
547
+ return null;
548
+ }
549
+
294
550
  export default class MarketQuotesConnector extends ConnectorRuntime {
295
551
  readonly definition: ConnectorDefinition = {
296
552
  key: "market.quotes",
297
553
  name: "Market Quotes",
298
554
  description:
299
- "Credential-free current market marks returned on demand without a price feed.",
300
- version: "1.0.0",
555
+ "Credential-free current market marks and daily close history returned on demand without a price feed.",
556
+ version: "1.1.0",
301
557
  faviconDomain: "finance.yahoo.com",
302
558
  authSchema: { methods: [{ type: "none" }] },
303
559
  actions: {
@@ -324,6 +580,27 @@ export default class MarketQuotesConnector extends ConnectorRuntime {
324
580
  },
325
581
  },
326
582
  },
583
+ history: {
584
+ key: "history",
585
+ kind: "read",
586
+ name: "Daily close history",
587
+ description:
588
+ "Return daily closes between from and to (inclusive, exchange-local dates) as a history or history_unavailable entry for every requested symbol.",
589
+ annotations: {
590
+ readOnlyHint: true,
591
+ idempotentHint: true,
592
+ openWorldHint: true,
593
+ },
594
+ inputSchema: historyInputSchema as unknown as Record<string, unknown>,
595
+ outputSchema: {
596
+ type: "object",
597
+ required: ["provider", "series"],
598
+ properties: {
599
+ provider: { type: "string" },
600
+ series: { type: "array", items: { type: "object" } },
601
+ },
602
+ },
603
+ },
327
604
  },
328
605
  optionsSchema: { type: "object", properties: {} },
329
606
  };
@@ -331,18 +608,16 @@ export default class MarketQuotesConnector extends ConnectorRuntime {
331
608
  fetchImpl: FetchLike = fetch;
332
609
 
333
610
  async execute(ctx: ActionContext): Promise<ActionResult> {
611
+ if (ctx.actionKey === "history") {
612
+ return this.history(ctx.input);
613
+ }
334
614
  if (ctx.actionKey !== "quote") {
335
615
  return { success: false, error: `Unknown action: ${ctx.actionKey}` };
336
616
  }
337
617
  const symbols = (ctx.input as { symbols?: unknown }).symbols;
338
- if (!Array.isArray(symbols) || symbols.length === 0) {
339
- return {
340
- success: false,
341
- error: "quote requires a non-empty symbols array",
342
- };
343
- }
344
- if (symbols.length > 50) {
345
- return { success: false, error: "quote accepts at most 50 symbols" };
618
+ const invalid = symbolsError("quote", symbols);
619
+ if (invalid) {
620
+ return { success: false, error: invalid };
346
621
  }
347
622
 
348
623
  const quotes = await quoteMany(
@@ -361,4 +636,26 @@ export default class MarketQuotesConnector extends ConnectorRuntime {
361
636
  },
362
637
  };
363
638
  }
639
+
640
+ private async history(input: ActionContext["input"]): Promise<ActionResult> {
641
+ const { symbols, from, to } = input as {
642
+ symbols?: unknown;
643
+ from?: unknown;
644
+ to?: unknown;
645
+ };
646
+ const invalid = symbolsError("history", symbols);
647
+ if (invalid) {
648
+ return { success: false, error: invalid };
649
+ }
650
+ const range = validateHistoryRange(from, to);
651
+ if ("error" in range) {
652
+ return { success: false, error: range.error };
653
+ }
654
+ const series = await historyMany(
655
+ symbols as Array<QuoteSymbolInput | string>,
656
+ range,
657
+ { fetchImpl: this.fetchImpl }
658
+ );
659
+ return { success: true, output: { provider: "yahoo", series } };
660
+ }
364
661
  }
@@ -387,7 +387,7 @@ export default class PostgresConnector extends ConnectorRuntime {
387
387
  description:
388
388
  'Bring your own PostgreSQL database as memory, read a configured feed directly, or run governed connection-level SQL.',
389
389
  version: '1.1.0',
390
- queryCapabilities: { exactMatch: true, verbatimExactMatch: true, selection: true },
390
+ queryCapabilities: { exactMatch: true, verbatimExactMatch: true, exactMatchAny: true, selection: true },
391
391
  faviconDomain: 'postgresql.org',
392
392
  authSchema: {
393
393
  methods: [
@@ -563,8 +563,10 @@ export default class PostgresConnector extends ConnectorRuntime {
563
563
  const bind = (value: string) => { params.push(value); return `$${params.length}::text`; };
564
564
  let where = '';
565
565
  if (ctx.exactMatch) {
566
- const { columns, value, verbatim } = ctx.exactMatch;
566
+ const { columns, verbatim } = ctx.exactMatch;
567
+ const values = ctx.exactMatch.values ?? [ctx.exactMatch.value];
567
568
  if (!columns.length) throw new Error('exactMatch.columns must not be empty');
569
+ if (!values.length) throw new Error('exactMatch.values must not be empty');
568
570
  for (const column of columns) assertIdentifier(column, 'exactMatch.column');
569
571
  const projection = await tx.unsafe(`SELECT * FROM (\n${baseSql}\n) q LIMIT 0`);
570
572
  const projected = projection.columns as Array<{ name: string; type: number; parser?: { array?: boolean } }>;
@@ -574,11 +576,15 @@ export default class PostgresConnector extends ConnectorRuntime {
574
576
  if (!candidates.some(isScalar)) {
575
577
  throw Object.assign(new Error('Exact-match identity must be a scalar; project a text key in the source query'), { status: 400 });
576
578
  }
579
+ // One bound array literal per comparison: a page of keys stays one statement.
580
+ const bindArray = (items: string[]) =>
581
+ bind(`{${items.map((item) => `"${item.replaceAll('\\', '\\\\').replaceAll('"', '\\"')}"`).join(',')}}`);
577
582
  const textMatch = (ref: string) => verbatim
578
- ? `${ref} = ${bind(value)}`
579
- : `btrim(${ref}, ${bind('\t\n\v\f\r \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff')}) = ${bind(value)}`;
580
- const numberMatch = (ref: string, cast: string) => Number.isFinite(Number(value)) && String(Number(value)) === value
581
- ? `${ref} = ${bind(value)}::${cast}` : 'FALSE';
583
+ ? `${ref} = ANY(${bindArray(values)}::text[])`
584
+ : `btrim(${ref}, ${bind('\t\n\v\f\r \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff')}) = ANY(${bindArray(values)}::text[])`;
585
+ const numbers = values.filter((value) => Number.isFinite(Number(value)) && String(Number(value)) === value);
586
+ const numberMatch = (ref: string, cast: string) => numbers.length
587
+ ? `${ref} = ANY(${bindArray(numbers)}::${cast}[])` : 'FALSE';
582
588
  const cases = candidates.map((column) => {
583
589
  const ref = `q.${quoteIdent(column.name)}`;
584
590
  const jsonType = [114, 3802].includes(column.type) ? `${column.type === 114 ? 'json' : 'jsonb'}_typeof(${ref})` : undefined;
@@ -602,20 +608,21 @@ export default class PostgresConnector extends ConnectorRuntime {
602
608
  } else if ([1082, 1114, 1184].includes(column.type)) {
603
609
  // The driver returns Date values; the isolate serializes them as ISO.
604
610
  present = `isfinite(${ref})`;
605
- const date = new Date(value);
606
- if (!Number.isFinite(date.getTime()) || date.toISOString() !== value) {
607
- match = 'FALSE';
608
- } else if (column.type === 1082) {
609
- match = value.endsWith('T00:00:00.000Z') ? `${ref} = ${bind(value.slice(0, 10))}::date` : 'FALSE';
610
- } else {
611
+ const dateMatches = values.flatMap((value) => {
612
+ const date = new Date(value);
613
+ if (!Number.isFinite(date.getTime()) || date.toISOString() !== value) return [];
614
+ if (column.type === 1082) {
615
+ return value.endsWith('T00:00:00.000Z') ? [`${ref} = ${bind(value.slice(0, 10))}::date`] : [];
616
+ }
611
617
  // Timestamp without zone is parsed in the worker's local zone.
612
618
  const key = column.type === 1114
613
619
  ? new Date(date.getTime() - date.getTimezoneOffset() * 60_000).toISOString().slice(0, -1)
614
620
  : value;
615
621
  const bound = `${bind(key)}::${PG_OID[column.type].cast}`;
616
622
  // Date drops source microseconds, so retain its full millisecond.
617
- match = `${ref} >= ${bound} AND ${ref} < ${bound} + INTERVAL '1 millisecond'`;
618
- }
623
+ return [`(${ref} >= ${bound} AND ${ref} < ${bound} + INTERVAL '1 millisecond')`];
624
+ });
625
+ match = dateMatches.length ? dateMatches.join(' OR ') : 'FALSE';
619
626
  } else {
620
627
  match = textMatch(`${ref}::text`);
621
628
  }