@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
@@ -0,0 +1,248 @@
1
+ import { type Static } from "@sinclair/typebox";
2
+ /**
3
+ * Resource ceilings, not product limits: a workspace with a thousand views can
4
+ * nest and group them freely. The tree is recursive; these only stop a
5
+ * document from being unbounded.
6
+ */
7
+ /** Deepest item nesting: a section's items are level 1. */
8
+ export declare const NAVIGATION_MAX_DEPTH = 32;
9
+ export declare const NAVIGATION_MAX_SECTIONS = 100;
10
+ /** Items across every section and level. */
11
+ export declare const NAVIGATION_MAX_ITEMS = 5000;
12
+ /** The whole document, serialized as UTF-8 JSON. */
13
+ export declare const NAVIGATION_MAX_BYTES: number;
14
+ export declare const PageRefSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
15
+ kind: import("@sinclair/typebox").TLiteral<"view">;
16
+ key: import("@sinclair/typebox").TString;
17
+ scope: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
18
+ collection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
19
+ search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
20
+ filters: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
21
+ field: import("@sinclair/typebox").TString;
22
+ op: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"eq">, import("@sinclair/typebox").TLiteral<"neq">]>;
23
+ value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>;
24
+ }>, import("@sinclair/typebox").TObject<{
25
+ field: import("@sinclair/typebox").TString;
26
+ 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">]>;
27
+ value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
28
+ }>]>>>;
29
+ segment: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
30
+ }>>;
31
+ type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
32
+ entity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
33
+ event: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
34
+ }>>;
35
+ params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean]>>>;
36
+ }>, import("@sinclair/typebox").TObject<{
37
+ kind: import("@sinclair/typebox").TLiteral<"collection">;
38
+ entityType: import("@sinclair/typebox").TString;
39
+ }>, import("@sinclair/typebox").TObject<{
40
+ kind: import("@sinclair/typebox").TLiteral<"record">;
41
+ entityId: import("@sinclair/typebox").TInteger;
42
+ }>, import("@sinclair/typebox").TObject<{
43
+ kind: import("@sinclair/typebox").TLiteral<"link">;
44
+ href: import("@sinclair/typebox").TString;
45
+ }>]>;
46
+ export type PageRef = Static<typeof PageRefSchema>;
47
+ export interface NavigationItem {
48
+ id: string;
49
+ label?: string;
50
+ icon?: string;
51
+ target?: PageRef;
52
+ children?: NavigationItem[];
53
+ }
54
+ /**
55
+ * One item. `children` holds items of this same shape; the wire schema
56
+ * describes the shape once (no recursive `$ref`, which not every MCP host or
57
+ * JSON-schema tool reads) and `validateNavigationConfig` checks every nested
58
+ * item against it while it walks the tree.
59
+ */
60
+ export declare const NavigationItemSchema: import("@sinclair/typebox").TObject<{
61
+ id: import("@sinclair/typebox").TString;
62
+ label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
63
+ icon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
64
+ target: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
65
+ kind: import("@sinclair/typebox").TLiteral<"view">;
66
+ key: import("@sinclair/typebox").TString;
67
+ scope: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
68
+ collection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
69
+ search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
70
+ filters: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
71
+ field: import("@sinclair/typebox").TString;
72
+ op: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"eq">, import("@sinclair/typebox").TLiteral<"neq">]>;
73
+ value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>;
74
+ }>, import("@sinclair/typebox").TObject<{
75
+ field: import("@sinclair/typebox").TString;
76
+ 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">]>;
77
+ value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
78
+ }>]>>>;
79
+ segment: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
80
+ }>>;
81
+ type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
82
+ entity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
83
+ event: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
84
+ }>>;
85
+ params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean]>>>;
86
+ }>, import("@sinclair/typebox").TObject<{
87
+ kind: import("@sinclair/typebox").TLiteral<"collection">;
88
+ entityType: import("@sinclair/typebox").TString;
89
+ }>, import("@sinclair/typebox").TObject<{
90
+ kind: import("@sinclair/typebox").TLiteral<"record">;
91
+ entityId: import("@sinclair/typebox").TInteger;
92
+ }>, import("@sinclair/typebox").TObject<{
93
+ kind: import("@sinclair/typebox").TLiteral<"link">;
94
+ href: import("@sinclair/typebox").TString;
95
+ }>]>>;
96
+ children: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
97
+ }>;
98
+ export declare const NavigationSectionSchema: import("@sinclair/typebox").TObject<{
99
+ id: import("@sinclair/typebox").TString;
100
+ label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
101
+ items: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
102
+ id: import("@sinclair/typebox").TString;
103
+ label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
104
+ icon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
105
+ target: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
106
+ kind: import("@sinclair/typebox").TLiteral<"view">;
107
+ key: import("@sinclair/typebox").TString;
108
+ scope: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
109
+ collection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
110
+ search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
111
+ filters: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
112
+ field: import("@sinclair/typebox").TString;
113
+ op: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"eq">, import("@sinclair/typebox").TLiteral<"neq">]>;
114
+ value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>;
115
+ }>, import("@sinclair/typebox").TObject<{
116
+ field: import("@sinclair/typebox").TString;
117
+ 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">]>;
118
+ value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
119
+ }>]>>>;
120
+ segment: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
121
+ }>>;
122
+ type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
123
+ entity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
124
+ event: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
125
+ }>>;
126
+ params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean]>>>;
127
+ }>, import("@sinclair/typebox").TObject<{
128
+ kind: import("@sinclair/typebox").TLiteral<"collection">;
129
+ entityType: import("@sinclair/typebox").TString;
130
+ }>, import("@sinclair/typebox").TObject<{
131
+ kind: import("@sinclair/typebox").TLiteral<"record">;
132
+ entityId: import("@sinclair/typebox").TInteger;
133
+ }>, import("@sinclair/typebox").TObject<{
134
+ kind: import("@sinclair/typebox").TLiteral<"link">;
135
+ href: import("@sinclair/typebox").TString;
136
+ }>]>>;
137
+ children: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
138
+ }>>;
139
+ }>;
140
+ export interface NavigationSection {
141
+ id: string;
142
+ label?: string;
143
+ items: NavigationItem[];
144
+ }
145
+ export declare const NavigationConfigSchema: import("@sinclair/typebox").TObject<{
146
+ schemaVersion: import("@sinclair/typebox").TLiteral<1>;
147
+ sections: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
148
+ id: import("@sinclair/typebox").TString;
149
+ label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
150
+ items: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
151
+ id: import("@sinclair/typebox").TString;
152
+ label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
153
+ icon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
154
+ target: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
155
+ kind: import("@sinclair/typebox").TLiteral<"view">;
156
+ key: import("@sinclair/typebox").TString;
157
+ scope: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
158
+ collection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
159
+ search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
160
+ filters: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
161
+ field: import("@sinclair/typebox").TString;
162
+ op: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"eq">, import("@sinclair/typebox").TLiteral<"neq">]>;
163
+ value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>;
164
+ }>, import("@sinclair/typebox").TObject<{
165
+ field: import("@sinclair/typebox").TString;
166
+ 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">]>;
167
+ value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
168
+ }>]>>>;
169
+ segment: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
170
+ }>>;
171
+ type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
172
+ entity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
173
+ event: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
174
+ }>>;
175
+ params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean]>>>;
176
+ }>, import("@sinclair/typebox").TObject<{
177
+ kind: import("@sinclair/typebox").TLiteral<"collection">;
178
+ entityType: import("@sinclair/typebox").TString;
179
+ }>, import("@sinclair/typebox").TObject<{
180
+ kind: import("@sinclair/typebox").TLiteral<"record">;
181
+ entityId: import("@sinclair/typebox").TInteger;
182
+ }>, import("@sinclair/typebox").TObject<{
183
+ kind: import("@sinclair/typebox").TLiteral<"link">;
184
+ href: import("@sinclair/typebox").TString;
185
+ }>]>>;
186
+ children: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
187
+ }>>;
188
+ }>>;
189
+ }>;
190
+ export interface NavigationConfig {
191
+ schemaVersion: 1;
192
+ sections: NavigationSection[];
193
+ }
194
+ /** One rendered entry: what the sidebar draws after the server resolved it. */
195
+ export interface ResolvedNavigationItem {
196
+ id: string;
197
+ label: string;
198
+ icon?: string;
199
+ /** App path (`/<workspace>/...`, with query) or an external https URL. */
200
+ href?: string;
201
+ external?: boolean;
202
+ children: ResolvedNavigationItem[];
203
+ }
204
+ export interface ResolvedNavigationSection {
205
+ id: string;
206
+ label?: string;
207
+ items: ResolvedNavigationItem[];
208
+ }
209
+ export declare const ResolvedNavigationSectionSchema: import("@sinclair/typebox").TObject<{
210
+ id: import("@sinclair/typebox").TString;
211
+ label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
212
+ items: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
213
+ id: import("@sinclair/typebox").TString;
214
+ label: import("@sinclair/typebox").TString;
215
+ icon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
216
+ href: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
217
+ external: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
218
+ children: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>;
219
+ }>>;
220
+ }>;
221
+ export type NavigationDestination = {
222
+ kind: "internal";
223
+ path: string;
224
+ } | {
225
+ kind: "external";
226
+ href: string;
227
+ };
228
+ /**
229
+ * Where a link may go, decided once for both authored navigation links and a
230
+ * view's `openLink`: an absolute `https:` URL off this origin, or a path inside
231
+ * `/<workspace>/` on it. Everything else is refused — other schemes
232
+ * (`javascript:`, `data:`, `http:`), credentials in the URL, and any path that
233
+ * resolves outside the workspace (another workspace, `/account`, `..`).
234
+ */
235
+ export declare function linkDestination(url: string, origin: string, workspace: string): NavigationDestination | null;
236
+ /**
237
+ * An authored `link` href: an absolute https URL, or a path explicitly relative
238
+ * to the workspace root — no scheme, no leading slash, no `.`/`..` segment (in
239
+ * any encoding), no backslash or control character.
240
+ */
241
+ export declare function navigationHrefDestination(href: string, origin: string, workspace: string): NavigationDestination | null;
242
+ /**
243
+ * The one validator every writer runs (server `set`, CLI apply and pull):
244
+ * schema shape and bounds, then the rules a schema cannot say. Returns every
245
+ * problem as `<path>: <message>`; empty means valid.
246
+ */
247
+ export declare function validateNavigationConfig(config: unknown): string[];
248
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1,284 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResolvedNavigationSectionSchema = exports.NavigationConfigSchema = exports.NavigationSectionSchema = exports.NavigationItemSchema = exports.PageRefSchema = exports.NAVIGATION_MAX_BYTES = exports.NAVIGATION_MAX_ITEMS = exports.NAVIGATION_MAX_SECTIONS = exports.NAVIGATION_MAX_DEPTH = void 0;
4
+ exports.linkDestination = linkDestination;
5
+ exports.navigationHrefDestination = navigationHrefDestination;
6
+ exports.validateNavigationConfig = validateNavigationConfig;
7
+ const typebox_1 = require("@sinclair/typebox");
8
+ const value_1 = require("@sinclair/typebox/value");
9
+ const view_scope_1 = require("./view-scope");
10
+ // ============================================
11
+ // Workspace navigation: the sidebar's curated sections.
12
+ // ============================================
13
+ //
14
+ // A workspace-owned, versioned document. It only presents: a section is not a
15
+ // permission or an owner, and hiding a destination never authorizes or
16
+ // denies it. `null` (never set) means the automatic default — the workspace's
17
+ // attached views — and an empty `sections` array means deliberately no custom
18
+ // entries. The product shell (Home, Memory, Search, Settings) is never part of
19
+ // it, so no configuration can remove it.
20
+ /**
21
+ * Resource ceilings, not product limits: a workspace with a thousand views can
22
+ * nest and group them freely. The tree is recursive; these only stop a
23
+ * document from being unbounded.
24
+ */
25
+ /** Deepest item nesting: a section's items are level 1. */
26
+ exports.NAVIGATION_MAX_DEPTH = 32;
27
+ exports.NAVIGATION_MAX_SECTIONS = 100;
28
+ /** Items across every section and level. */
29
+ exports.NAVIGATION_MAX_ITEMS = 5000;
30
+ /** The whole document, serialized as UTF-8 JSON. */
31
+ exports.NAVIGATION_MAX_BYTES = 1024 * 1024;
32
+ const NavigationIdSchema = typebox_1.Type.String({
33
+ pattern: "^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$",
34
+ description: "Stable id, unique across the whole document (sections and items). It names the menu entry, not its destination: two entries may open the same page.",
35
+ });
36
+ const NavigationLabelSchema = typebox_1.Type.String({ minLength: 1, maxLength: 80 });
37
+ const NavigationIconSchema = typebox_1.Type.String({
38
+ pattern: "^[a-z0-9-]{1,40}$",
39
+ description: "A Lucide icon name in kebab-case (https://lucide.dev/icons), e.g. 'building-2'; former Lucide names resolve too. Unknown names render the default icon.",
40
+ });
41
+ const ScalarParamSchema = typebox_1.Type.Union([
42
+ typebox_1.Type.String({ maxLength: 500 }),
43
+ typebox_1.Type.Number(),
44
+ typebox_1.Type.Boolean(),
45
+ ]);
46
+ exports.PageRefSchema = typebox_1.Type.Union([
47
+ typebox_1.Type.Object({
48
+ kind: typebox_1.Type.Literal("view"),
49
+ key: view_scope_1.ViewKeySchema,
50
+ scope: typebox_1.Type.Optional(typebox_1.Type.Object(view_scope_1.ViewScopeSchema.properties, {
51
+ additionalProperties: false,
52
+ })),
53
+ params: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String({ maxLength: 64 }), ScalarParamSchema, {
54
+ maxProperties: 20,
55
+ description: "Declared view params; validated against the view when resolved.",
56
+ })),
57
+ }, { additionalProperties: false }),
58
+ typebox_1.Type.Object({
59
+ kind: typebox_1.Type.Literal("collection"),
60
+ entityType: typebox_1.Type.String({ minLength: 1, maxLength: 120 }),
61
+ }, { additionalProperties: false }),
62
+ typebox_1.Type.Object({
63
+ kind: typebox_1.Type.Literal("record"),
64
+ entityId: typebox_1.Type.Integer({ minimum: 1 }),
65
+ }, { additionalProperties: false }),
66
+ typebox_1.Type.Object({
67
+ kind: typebox_1.Type.Literal("link"),
68
+ href: typebox_1.Type.String({
69
+ minLength: 1,
70
+ maxLength: 2048,
71
+ description: "Workspace-root-relative path (e.g. 'deal?stage=won', resolved under /<workspace>/) or an absolute https:// URL.",
72
+ }),
73
+ }, { additionalProperties: false }),
74
+ ], {
75
+ description: "{ kind: 'view', key, scope?, params? } | { kind: 'collection', entityType } | { kind: 'record', entityId } | { kind: 'link', href }",
76
+ });
77
+ /**
78
+ * One item. `children` holds items of this same shape; the wire schema
79
+ * describes the shape once (no recursive `$ref`, which not every MCP host or
80
+ * JSON-schema tool reads) and `validateNavigationConfig` checks every nested
81
+ * item against it while it walks the tree.
82
+ */
83
+ exports.NavigationItemSchema = typebox_1.Type.Object({
84
+ id: NavigationIdSchema,
85
+ label: typebox_1.Type.Optional(NavigationLabelSchema),
86
+ icon: typebox_1.Type.Optional(NavigationIconSchema),
87
+ target: typebox_1.Type.Optional(exports.PageRefSchema),
88
+ children: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Unknown(), {
89
+ description: "Nested items, each the same shape as this one.",
90
+ })),
91
+ }, { additionalProperties: false });
92
+ exports.NavigationSectionSchema = typebox_1.Type.Object({
93
+ id: NavigationIdSchema,
94
+ label: typebox_1.Type.Optional(NavigationLabelSchema),
95
+ items: typebox_1.Type.Array(exports.NavigationItemSchema),
96
+ }, { additionalProperties: false });
97
+ exports.NavigationConfigSchema = typebox_1.Type.Object({
98
+ schemaVersion: typebox_1.Type.Literal(1),
99
+ sections: typebox_1.Type.Array(exports.NavigationSectionSchema, {
100
+ maxItems: exports.NAVIGATION_MAX_SECTIONS,
101
+ }),
102
+ }, {
103
+ additionalProperties: false,
104
+ description: "{ schemaVersion: 1, sections: [{ id, label?, items: [{ id, label?, icon?, target?, children? }] }] }. An item without a target is a labeled group; with both, the label opens the target and a separate control expands the children.",
105
+ });
106
+ // Children are typed opaque on the wire, as on the input side: a recursive
107
+ // schema publishes a `$ref` the OpenAPI document never defines.
108
+ const ResolvedItemSchema = typebox_1.Type.Object({
109
+ id: typebox_1.Type.String(),
110
+ label: typebox_1.Type.String(),
111
+ icon: typebox_1.Type.Optional(typebox_1.Type.String()),
112
+ href: typebox_1.Type.Optional(typebox_1.Type.String()),
113
+ external: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
114
+ children: typebox_1.Type.Array(typebox_1.Type.Unknown(), {
115
+ description: "Nested items, each the same shape as this one.",
116
+ }),
117
+ });
118
+ exports.ResolvedNavigationSectionSchema = typebox_1.Type.Object({
119
+ id: typebox_1.Type.String(),
120
+ label: typebox_1.Type.Optional(typebox_1.Type.String()),
121
+ items: typebox_1.Type.Array(ResolvedItemSchema),
122
+ });
123
+ const SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*:/;
124
+ // C0 controls, DEL and whitespace never belong in an authored path.
125
+ // biome-ignore lint/suspicious/noControlCharactersInRegex: rejecting control characters is the point
126
+ const UNSAFE_CHARS = /[\u0000- \u007f\\]/;
127
+ /**
128
+ * Where a link may go, decided once for both authored navigation links and a
129
+ * view's `openLink`: an absolute `https:` URL off this origin, or a path inside
130
+ * `/<workspace>/` on it. Everything else is refused — other schemes
131
+ * (`javascript:`, `data:`, `http:`), credentials in the URL, and any path that
132
+ * resolves outside the workspace (another workspace, `/account`, `..`).
133
+ */
134
+ function linkDestination(url, origin, workspace) {
135
+ let parsed;
136
+ try {
137
+ parsed = new URL(url, `${origin}/${encodeURIComponent(workspace)}/`);
138
+ }
139
+ catch {
140
+ return null;
141
+ }
142
+ if (parsed.username || parsed.password)
143
+ return null;
144
+ if (parsed.origin === origin) {
145
+ const root = `/${encodeURIComponent(workspace)}`;
146
+ if (parsed.pathname !== root && !parsed.pathname.startsWith(`${root}/`)) {
147
+ return null;
148
+ }
149
+ return {
150
+ kind: "internal",
151
+ path: parsed.pathname + parsed.search + parsed.hash,
152
+ };
153
+ }
154
+ if (parsed.protocol !== "https:")
155
+ return null;
156
+ return { kind: "external", href: parsed.href };
157
+ }
158
+ /**
159
+ * An authored `link` href: an absolute https URL, or a path explicitly relative
160
+ * to the workspace root — no scheme, no leading slash, no `.`/`..` segment (in
161
+ * any encoding), no backslash or control character.
162
+ */
163
+ function navigationHrefDestination(href, origin, workspace) {
164
+ if (UNSAFE_CHARS.test(href))
165
+ return null;
166
+ if (SCHEME.test(href)) {
167
+ const destination = linkDestination(href, origin, workspace);
168
+ return destination?.kind === "external" ? destination : null;
169
+ }
170
+ if (href.startsWith("/"))
171
+ return null;
172
+ const path = href.split(/[?#]/, 1)[0] ?? "";
173
+ for (const segment of path.split("/")) {
174
+ let decoded;
175
+ try {
176
+ decoded = decodeURIComponent(segment);
177
+ }
178
+ catch {
179
+ return null;
180
+ }
181
+ if (decoded === "." || decoded === ".." || /[/\\]/.test(decoded)) {
182
+ return null;
183
+ }
184
+ }
185
+ return linkDestination(href, origin, workspace);
186
+ }
187
+ // ============================================
188
+ // Validation
189
+ // ============================================
190
+ /** Any origin works: validation only asks whether the href can resolve. */
191
+ const VALIDATION_ORIGIN = "https://workspace.invalid";
192
+ /**
193
+ * The one validator every writer runs (server `set`, CLI apply and pull):
194
+ * schema shape and bounds, then the rules a schema cannot say. Returns every
195
+ * problem as `<path>: <message>`; empty means valid.
196
+ */
197
+ function validateNavigationConfig(config) {
198
+ const bytes = new TextEncoder().encode(JSON.stringify(config) ?? "").length;
199
+ if (bytes > exports.NAVIGATION_MAX_BYTES) {
200
+ return [
201
+ `navigation: ${bytes} bytes exceed the limit of ${exports.NAVIGATION_MAX_BYTES}`,
202
+ ];
203
+ }
204
+ const schemaErrors = (schema, value, at) => [...value_1.Value.Errors(schema, value)]
205
+ .slice(0, 10)
206
+ .map((e) => `${at}${e.path.split("/").join(".")}: ${e.message}`);
207
+ if (!value_1.Value.Check(exports.NavigationConfigSchema, config)) {
208
+ return schemaErrors(exports.NavigationConfigSchema, config, "navigation");
209
+ }
210
+ const doc = config;
211
+ const errors = [];
212
+ const seen = new Set();
213
+ let items = 0;
214
+ const claim = (id, at) => {
215
+ if (seen.has(id))
216
+ errors.push(`${at}: duplicate id '${id}'`);
217
+ seen.add(id);
218
+ };
219
+ // Iterative, so a deep document cannot exhaust the stack; it stops at the
220
+ // first ceiling it crosses.
221
+ const stack = [];
222
+ for (let s = doc.sections.length - 1; s >= 0; s -= 1) {
223
+ const section = doc.sections[s];
224
+ if (!section)
225
+ continue;
226
+ for (let i = section.items.length - 1; i >= 0; i -= 1) {
227
+ stack.push({
228
+ item: section.items[i],
229
+ at: `navigation.sections[${s}].items[${i}]`,
230
+ depth: 1,
231
+ });
232
+ }
233
+ }
234
+ doc.sections.forEach((section, s) => {
235
+ claim(section.id, `navigation.sections[${s}]`);
236
+ });
237
+ while (stack.length > 0 && errors.length < 20) {
238
+ const { item: node, at, depth } = stack.pop();
239
+ items += 1;
240
+ if (items > exports.NAVIGATION_MAX_ITEMS) {
241
+ errors.push(`navigation: more than ${exports.NAVIGATION_MAX_ITEMS} items exceed the limit`);
242
+ break;
243
+ }
244
+ if (depth > exports.NAVIGATION_MAX_DEPTH) {
245
+ errors.push(`${at}: nesting deeper than ${exports.NAVIGATION_MAX_DEPTH} levels exceeds the limit`);
246
+ break;
247
+ }
248
+ if (!value_1.Value.Check(exports.NavigationItemSchema, node)) {
249
+ errors.push(...schemaErrors(exports.NavigationItemSchema, node, at));
250
+ continue;
251
+ }
252
+ const item = node;
253
+ claim(item.id, at);
254
+ const children = item.children ?? [];
255
+ if (!item.target && children.length === 0) {
256
+ errors.push(`${at}: an item needs a target, children, or both`);
257
+ }
258
+ if (!item.target && !item.label) {
259
+ errors.push(`${at}: a group without a target needs a label`);
260
+ }
261
+ if (item.target?.kind === "link" && !item.label) {
262
+ // A plain link has no resource to name it.
263
+ errors.push(`${at}: a link needs a label`);
264
+ }
265
+ if (item.target?.kind === "link" &&
266
+ !navigationHrefDestination(item.target.href, VALIDATION_ORIGIN, "w")) {
267
+ errors.push(`${at}.target.href: must be a workspace-relative path without '..' or an https:// URL`);
268
+ }
269
+ if (item.target?.kind === "view") {
270
+ const shape = (0, view_scope_1.viewScopeShapeError)(item.target.scope ?? {});
271
+ if (shape)
272
+ errors.push(`${at}.target.scope: ${shape}`);
273
+ }
274
+ for (let i = children.length - 1; i >= 0; i -= 1) {
275
+ stack.push({
276
+ item: children[i],
277
+ at: `${at}.children[${i}]`,
278
+ depth: depth + 1,
279
+ });
280
+ }
281
+ }
282
+ return errors;
283
+ }
284
+ //# sourceMappingURL=navigation.js.map
@@ -11,8 +11,12 @@
11
11
  */
12
12
  import { type Static } from "@sinclair/typebox";
13
13
  import type { FlatActionInput } from "./action-input";
14
+ /** Bounds on `{ name }` entries in `entity_ids`; the handler enforces the count. */
15
+ export declare const MAX_ENTITY_NAMES = 20;
14
16
  export declare const SaveContentSchema: import("@sinclair/typebox").TObject<{
15
- entity_ids: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>>;
17
+ entity_ids: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TObject<{
18
+ name: import("@sinclair/typebox").TString;
19
+ }>]>>>;
16
20
  content: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
17
21
  title: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
18
22
  author: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -32,6 +36,12 @@ export declare const SaveContentSchema: import("@sinclair/typebox").TObject<{
32
36
  }>>;
33
37
  }>;
34
38
  export type SaveContentArgs = Static<typeof SaveContentSchema>;
39
+ /** A `{ name }` entry from `entity_ids` that did not link, as returned in the save result's `unlinked`. */
40
+ export declare const UnlinkedEntityNameSchema: import("@sinclair/typebox").TObject<{
41
+ name: import("@sinclair/typebox").TString;
42
+ reason: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"not_found">, import("@sinclair/typebox").TLiteral<"ambiguous">, import("@sinclair/typebox").TLiteral<"not_writable">]>;
43
+ }>;
44
+ export type UnlinkedEntityName = Static<typeof UnlinkedEntityNameSchema>;
35
45
  /**
36
46
  * `client.knowledge.save` input. The schema leaves every field optional
37
47
  * because `saveContent` resolves the requirement per `payload_type`:
@@ -11,11 +11,23 @@
11
11
  * connector isolate lane can bundle it (`packages/connector-sdk/AGENTS.md`).
12
12
  */
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.SaveContentSchema = void 0;
14
+ exports.UnlinkedEntityNameSchema = exports.SaveContentSchema = exports.MAX_ENTITY_NAMES = void 0;
15
15
  const typebox_1 = require("@sinclair/typebox");
16
+ /** Bounds on `{ name }` entries in `entity_ids`; the handler enforces the count. */
17
+ exports.MAX_ENTITY_NAMES = 20;
18
+ const MAX_ENTITY_NAME_LENGTH = 256;
16
19
  exports.SaveContentSchema = typebox_1.Type.Object({
17
- entity_ids: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Number(), {
18
- description: "Entity IDs to associate content with. Omit for org-scoped content.",
20
+ entity_ids: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Union([
21
+ typebox_1.Type.Integer({ minimum: 1 }),
22
+ typebox_1.Type.Object({
23
+ name: typebox_1.Type.String({
24
+ minLength: 1,
25
+ maxLength: MAX_ENTITY_NAME_LENGTH,
26
+ description: "The record's exact full name: a person's full name, owner/repo for a repository.",
27
+ }),
28
+ }, { additionalProperties: false }),
29
+ ]), {
30
+ description: `Records this content is about. Each entry is a record id, or { name } with the record's exact full name. A name links only when exactly one record in this workspace has that name; otherwise it is returned in \`unlinked\` and the content is still saved. Reference only records the content is substantially about, at most ${exports.MAX_ENTITY_NAMES} names. Omit for org-scoped content.`,
19
31
  })),
20
32
  content: typebox_1.Type.Optional(typebox_1.Type.String({
21
33
  description: "The text content to save. Required for text/markdown payload types.",
@@ -69,4 +81,14 @@ exports.SaveContentSchema = typebox_1.Type.Object({
69
81
  description: "Attribution source when save is triggered by an Automation reaction",
70
82
  })),
71
83
  });
84
+ /** A `{ name }` entry from `entity_ids` that did not link, as returned in the save result's `unlinked`. */
85
+ exports.UnlinkedEntityNameSchema = typebox_1.Type.Object({
86
+ name: typebox_1.Type.String(),
87
+ reason: typebox_1.Type.Union([
88
+ typebox_1.Type.Literal("not_found"),
89
+ typebox_1.Type.Literal("ambiguous"),
90
+ // Only on a replay of a save stored before members could link records (Nov 2026).
91
+ typebox_1.Type.Literal("not_writable"),
92
+ ]),
93
+ });
72
94
  //# sourceMappingURL=save-memory.js.map
@@ -38,7 +38,7 @@ exports.SearchSchema = typebox_1.Type.Object({
38
38
  description: "Filter by category metadata field",
39
39
  })),
40
40
  fuzzy: typebox_1.Type.Optional(typebox_1.Type.Boolean({
41
- description: "Enable fuzzy name matching",
41
+ description: "Enable fuzzy name matching. When false, an entity matches only on its exact name or an exact identifier (case-insensitive); no partial or similar names.",
42
42
  default: true,
43
43
  })),
44
44
  min_similarity: typebox_1.Type.Optional(typebox_1.Type.Number({
@@ -11,6 +11,13 @@ export declare function matchesRecord(attachment: ViewAttachment, record: {
11
11
  type: string;
12
12
  id: number | string | null;
13
13
  }): boolean;
14
+ /**
15
+ * Whether the view mounts on records of `typeSlug`: a tab on the type's list
16
+ * or a card on its record pages. With `recordId`, a record card pinned to
17
+ * another id does not count. A collection's `when` narrows what the tab
18
+ * shows, not which records the view is about, so it is ignored here.
19
+ */
20
+ export declare function attachesToEntityType(attach: readonly ViewAttachment[], typeSlug: string, recordId?: number): boolean;
14
21
  export declare function hasWorkspaceAttachment(attach: readonly ViewAttachment[]): boolean;
15
22
  /** Without a kind, the web host considers every event attachment a candidate. */
16
23
  export declare function eventAttachmentsFor(attach: readonly ViewAttachment[], semanticType?: string): EventAttachment[];