@lobu/runtime-server 24.5.0 → 24.7.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 (253) hide show
  1. package/dist/catalogs/connectors.json +342 -4
  2. package/dist/catalogs/skills.json +1 -1
  3. package/dist/component.json +1 -1
  4. package/dist/connectors/linkedin-identity.ts +43 -0
  5. package/dist/connectors/linkedin.ts +154 -3
  6. package/dist/connectors/x-like-follow.ts +329 -0
  7. package/dist/connectors/x.ts +709 -80
  8. package/dist/dependencies.bun.lock +18 -18
  9. package/dist/owletto/dist/assets/_-CZgmjLR9.js +2 -0
  10. package/dist/owletto/dist/assets/_-Cm5OgtYD.js +3 -0
  11. package/dist/owletto/dist/assets/_agentId-Cci6NFc1.js +2 -0
  12. package/dist/owletto/dist/assets/_agentId-GhWTlPO2.js +2 -0
  13. package/dist/owletto/dist/assets/_automationId-KUlxSTK2.js +2 -0
  14. package/dist/owletto/dist/assets/_connectorKey._connectionId-Zpy7Hvml.js +2 -0
  15. package/dist/owletto/dist/assets/_connectorKey.index-CYDRp9UX.js +2 -0
  16. package/dist/owletto/dist/assets/_conversationId-NNqDdije.js +2 -0
  17. package/dist/owletto/dist/assets/_eventId-0BSX6VHj.js +2 -0
  18. package/dist/owletto/dist/assets/_owner-C-CD22NB.js +3 -0
  19. package/dist/owletto/dist/assets/_shape-CvXp4omb.js +2 -0
  20. package/dist/owletto/dist/assets/_slug-DgK7zpKA.js +2 -0
  21. package/dist/owletto/dist/assets/_viewKey-cH54P0zY.js +2 -0
  22. package/dist/owletto/dist/assets/_viewKey-m0B5j7L9.js +2 -0
  23. package/dist/owletto/dist/assets/{accept-invitation-pUl-c1KQ.js → accept-invitation-CX7Egv-p.js} +2 -2
  24. package/dist/owletto/dist/assets/activity-link-rXNpmppV.js +2 -0
  25. package/dist/owletto/dist/assets/activity-route-view-B0m7_g9q.js +2 -0
  26. package/dist/owletto/dist/assets/{agent-client-setup-list-DbXtJTsO.js → agent-client-setup-list-BmD3-_Ox.js} +2 -2
  27. package/dist/owletto/dist/assets/{agent-connect-pages-DcTuiSt9.js → agent-connect-pages-BtOTCsTU.js} +2 -2
  28. package/dist/owletto/dist/assets/agent-editor-form-CirqCpcM.js +2 -0
  29. package/dist/owletto/dist/assets/agent-list-row-SyACVYX7.js +2 -0
  30. package/dist/owletto/dist/assets/{agent-loading-shells-ClY_O6lb.js → agent-loading-shells-DHvKiEUB.js} +2 -2
  31. package/dist/owletto/dist/assets/agent-permissions-matrix-Dsc26dyW.js +2 -0
  32. package/dist/owletto/dist/assets/{agent-skill-context-BAaGpvfS.js → agent-skill-context-DF5q0Dfr.js} +2 -2
  33. package/dist/owletto/dist/assets/agent-subpage-shell-Pi5cECga.js +2 -0
  34. package/dist/owletto/dist/assets/{agent-thread-WNk2HapT.js → agent-thread-B1ZepGZc.js} +4 -4
  35. package/dist/owletto/dist/assets/agents-D1FHZ0jR.js +2 -0
  36. package/dist/owletto/dist/assets/app._appId-01I0CJal.js +2 -0
  37. package/dist/owletto/dist/assets/{assist-composer-ClfFEVx7.js → assist-composer-BD9msDk3.js} +2 -2
  38. package/dist/owletto/dist/assets/automation-detail-content-BFv1TglZ.js +2 -0
  39. package/dist/owletto/dist/assets/automation-row-CmTpAD4r.js +2 -0
  40. package/dist/owletto/dist/assets/automation-source-list-D8ZSavQU.js +2 -0
  41. package/dist/owletto/dist/assets/automations-D1FHZ0jR.js +2 -0
  42. package/dist/owletto/dist/assets/{callback-DRABUOha.js → callback-Ckrxv0eo.js} +2 -2
  43. package/dist/owletto/dist/assets/{card-Bdi7VEwo.js → card-DT9mSjSp.js} +2 -2
  44. package/dist/owletto/dist/assets/{change-summary-PBoM6Asb.js → change-summary-CGrKEJ04.js} +2 -2
  45. package/dist/owletto/dist/assets/{claim-CUIG1Oc-.js → claim-Bzby28tT.js} +2 -2
  46. package/dist/owletto/dist/assets/{client-activity-scopes-CXOWB5co.js → client-activity-scopes-DoIErdUy.js} +2 -2
  47. package/dist/owletto/dist/assets/{client-rows-36VnmgMK.js → client-rows-BbVQy5Ti.js} +2 -2
  48. package/dist/owletto/dist/assets/{clients-BJRcMk1A.js → clients-6aJvabvS.js} +2 -2
  49. package/dist/owletto/dist/assets/connect-BmDziBzI.js +2 -0
  50. package/dist/owletto/dist/assets/connect-menu-Bs8mxsga.js +2 -0
  51. package/dist/owletto/dist/assets/connect._clientId-t5aKu3aa.js +2 -0
  52. package/dist/owletto/dist/assets/connected._clientId-DswMAw8l.js +2 -0
  53. package/dist/owletto/dist/assets/{connection-q1bdnxCN.js → connection-BOaMa324.js} +2 -2
  54. package/dist/owletto/dist/assets/connection-feed-detail-BLCjhP-H.js +2 -0
  55. package/dist/owletto/dist/assets/connector-boxes-BAP_f77M.js +2 -0
  56. package/dist/owletto/dist/assets/{connector-page-shell-Cs1SjrYB.js → connector-page-shell-ClOmVPJr.js} +2 -2
  57. package/dist/owletto/dist/assets/{connector-provenance-aJFeeRIC.js → connector-provenance-wmYu5jwO.js} +2 -2
  58. package/dist/owletto/dist/assets/{connectors-BsvDMdsQ.js → connectors-D5F5rHxX.js} +2 -2
  59. package/dist/owletto/dist/assets/{consent-DJV78pnz.js → consent-RqHNkmm8.js} +2 -2
  60. package/dist/owletto/dist/assets/{copy-button-DjMWgrBf.js → copy-button-D6zpsZLi.js} +2 -2
  61. package/dist/owletto/dist/assets/{core.esm-CQzL3ObT.js → core.esm-BIE97rfo.js} +3 -3
  62. package/dist/owletto/dist/assets/create-BPxsKwk7.js +2 -0
  63. package/dist/owletto/dist/assets/{create-jBEuveV1.js → create-GT8_yF0R.js} +2 -2
  64. package/dist/owletto/dist/assets/create-Yx2qBMBy.js +2 -0
  65. package/dist/owletto/dist/assets/create-automation-form-B12yTrmj.js +3 -0
  66. package/dist/owletto/dist/assets/create._connectorKey-CzXqSkuI.js +2 -0
  67. package/dist/owletto/dist/assets/custom-guardrail-edits-B9plaLBN.js +2 -0
  68. package/dist/owletto/dist/assets/definition-comparison-C3k6Wa9B.js +2 -0
  69. package/dist/owletto/dist/assets/detail-page-skeleton-I5_7FkKx.js +2 -0
  70. package/dist/owletto/dist/assets/{device-Ba3RsIgb.js → device-CadaiNF4.js} +2 -2
  71. package/dist/owletto/dist/assets/device-automation-Dp3faMvp.js +2 -0
  72. package/dist/owletto/dist/assets/device-pin-tombstone-U7Bx05P6.js +2 -0
  73. package/dist/owletto/dist/assets/device._deviceId-DTZqj1HS.js +2 -0
  74. package/dist/owletto/dist/assets/dynamic-schema-form-DyT_9iVE.js +2 -0
  75. package/dist/owletto/dist/assets/entity-options-CGTjLlcS.js +2 -0
  76. package/dist/owletto/dist/assets/entity-page-DHHMmA8V.js +2 -0
  77. package/dist/owletto/dist/assets/entity-pages-eYbG2FDT.js +2 -0
  78. package/dist/owletto/dist/assets/entity-type-page-CjFqxSdL.js +2 -0
  79. package/dist/owletto/dist/assets/event-card-BtTUuf2q.js +2 -0
  80. package/dist/owletto/dist/assets/{event-detail-DkY95e5b.js → event-detail-8xHiplt_.js} +2 -2
  81. package/dist/owletto/dist/assets/events-feed-zFnTSE27.js +2 -0
  82. package/dist/owletto/dist/assets/filter-editors-Dd5R2Etd.js +2 -0
  83. package/dist/owletto/dist/assets/{full-page-spinner-BqmckkOf.js → full-page-spinner-CCU4PkRv.js} +2 -2
  84. package/dist/owletto/dist/assets/home-stream-IVsNEkwp.js +2 -0
  85. package/dist/owletto/dist/assets/index-2oaMOFKe.js +2 -0
  86. package/dist/owletto/dist/assets/index-B-Ab8srM.js +7899 -0
  87. package/dist/owletto/dist/assets/index-B4RZgvvI.js +2 -0
  88. package/dist/owletto/dist/assets/{index-C186T2Rw.js → index-B72KYdN1.js} +2 -2
  89. package/dist/owletto/dist/assets/index-BBZM53p8.js +2 -0
  90. package/dist/owletto/dist/assets/index-BOb0a5f9.js +2 -0
  91. package/dist/owletto/dist/assets/{index-ijqrJaRB.js → index-BYFDMIQC.js} +2 -2
  92. package/dist/owletto/dist/assets/index-BwnFQcMe.js +2 -0
  93. package/dist/owletto/dist/assets/index-CvYsWYlF.js +2 -0
  94. package/dist/owletto/dist/assets/{index-B0kw2lFL.js → index-DIXIvtnM.js} +2 -2
  95. package/dist/owletto/dist/assets/index-DLwokXHW.js +2 -0
  96. package/dist/owletto/dist/assets/index-_nlPHus1.js +2 -0
  97. package/dist/owletto/dist/assets/index-cwOgj4-i.js +2 -0
  98. package/dist/owletto/dist/assets/{index-ikp_mTsf.js → index-pmr1WUoG.js} +2 -2
  99. package/dist/owletto/dist/assets/index-pp4qmhkA.js +2 -0
  100. package/dist/owletto/dist/assets/index-tTbno-PX.css +1 -0
  101. package/dist/owletto/dist/assets/json-diff-B-1Swv_y.js +28 -0
  102. package/dist/owletto/dist/assets/list-skeleton-BAqT0vxo.js +2 -0
  103. package/dist/owletto/dist/assets/{login-u6LCgDYG.js → login-D5bIjMtf.js} +2 -2
  104. package/dist/owletto/dist/assets/{logout-JhmuWJEH.js → logout-JYZvxz8v.js} +2 -2
  105. package/dist/owletto/dist/assets/{member-scope-gate-4FQ0aanZ.js → member-scope-gate-Lj9m4RL2.js} +2 -2
  106. package/dist/owletto/dist/assets/memory-browse-page-rAKfVdQ_.js +74 -0
  107. package/dist/owletto/dist/assets/{model-selector-CgU8SJMF.js → model-selector-onvGA9Ww.js} +2 -2
  108. package/dist/owletto/dist/assets/{new-DgE1pVV0.js → new-B-Jd-vBl.js} +2 -2
  109. package/dist/owletto/dist/assets/new-BmehH1uR.js +2 -0
  110. package/dist/owletto/dist/assets/new-KDi15LWZ.js +2 -0
  111. package/dist/owletto/dist/assets/{organization-CKM_oFX3.js → organization-B9bh20Xo.js} +2 -2
  112. package/dist/owletto/dist/assets/peek-pane-content-Bqus80Mq.js +2 -0
  113. package/dist/owletto/dist/assets/{pending-seed-sml8Uf6e.js → pending-seed-CoFPQ835.js} +2 -2
  114. package/dist/owletto/dist/assets/proposal-review-shell-CnACXCUg.js +2 -0
  115. package/dist/owletto/dist/assets/public-shell-ready-Dlh-eWz0.js +2 -0
  116. package/dist/owletto/dist/assets/record-activity-6CfR95Ul.js +2 -0
  117. package/dist/owletto/dist/assets/{record-session-R-uHNuby.js → record-session-Bpx4_LGk.js} +2 -2
  118. package/dist/owletto/dist/assets/renderer-CgaQKMoG.js +96 -0
  119. package/dist/owletto/dist/assets/{reset-password-Mx3baeNc.js → reset-password-C-4Jnuqk.js} +2 -2
  120. package/dist/owletto/dist/assets/run-initiator-BvruBM5H.js +2 -0
  121. package/dist/owletto/dist/assets/{runs-fFJ1lPnw.js → runs-BMzp7j7j.js} +2 -2
  122. package/dist/owletto/dist/assets/runs-list-DVhrTr3v.js +2 -0
  123. package/dist/owletto/dist/assets/{schema-type-editor-panel-C0_9VcSs.js → schema-type-editor-panel-Bdeumkux.js} +2 -2
  124. package/dist/owletto/dist/assets/schema-value-BUgC0Ro8.js +3 -0
  125. package/dist/owletto/dist/assets/{settings-CP4PjMQA.js → settings-DYYvrrZ4.js} +2 -2
  126. package/dist/owletto/dist/assets/skill-route-key-sF006xiz.js +2 -0
  127. package/dist/owletto/dist/assets/source-record-panels-CBV9tsR3.js +2 -0
  128. package/dist/owletto/dist/assets/status-variants-DT61YfsU.js +2 -0
  129. package/dist/owletto/dist/assets/{table-BUqshjxa.js → table-B6yimlsZ.js} +2 -2
  130. package/dist/owletto/dist/assets/{use-automations-BLNjxq2K.js → use-automations-II_YJWtN.js} +2 -2
  131. package/dist/owletto/dist/assets/{use-login-redirect-CmyQW7GT.js → use-login-redirect-BqtEilid.js} +2 -2
  132. package/dist/owletto/dist/assets/{use-mention-search-dn3ws1WB.js → use-mention-search-Bxlpd6Dp.js} +3 -3
  133. package/dist/owletto/dist/assets/view-param-filters-DYlqBocg.js +2 -0
  134. package/dist/owletto/dist/assets/views-access-required-BVtMfgLh.js +2 -0
  135. package/dist/owletto/dist/index.html +2 -2
  136. package/dist/server-main.bundle.mjs +5680 -4005
  137. package/npm-shrinkwrap.json +99 -99
  138. package/package.json +1 -1
  139. package/vendor/connector-sdk/package.json +1 -1
  140. package/vendor/core/dist/contracts/tools/view-host.d.ts +7 -0
  141. package/vendor/core/dist/contracts/tools/view-host.js +28 -0
  142. package/vendor/core/dist/contracts/tools/view-runtime.d.ts +2 -4
  143. package/vendor/core/dist/contracts/tools/view-runtime.js +19 -7
  144. package/vendor/core/package.json +11 -1
  145. package/vendor/views/dist/api.d.ts +9 -4
  146. package/vendor/views/dist/api.js +33 -2
  147. package/vendor/views/dist/bridge.d.ts +8 -0
  148. package/vendor/views/dist/bridge.js +12 -2
  149. package/vendor/views/dist/components.d.ts +4 -2
  150. package/vendor/views/dist/components.js +29 -14
  151. package/vendor/views/dist/index.d.ts +1 -1
  152. package/vendor/views/dist/index.js +1 -1
  153. package/vendor/views/dist/native.d.ts +327 -0
  154. package/vendor/views/dist/native.js +57 -0
  155. package/vendor/views/package.json +1 -1
  156. package/dist/owletto/dist/assets/_-CCWuGXtQ.js +0 -2
  157. package/dist/owletto/dist/assets/_-DOJW1D-I.js +0 -3
  158. package/dist/owletto/dist/assets/_agentId-CJhQbi6k.js +0 -2
  159. package/dist/owletto/dist/assets/_agentId-DD4K1i6V.js +0 -2
  160. package/dist/owletto/dist/assets/_automationId-Cbd7B0mP.js +0 -2
  161. package/dist/owletto/dist/assets/_connectorKey._connectionId-DFpPep9B.js +0 -2
  162. package/dist/owletto/dist/assets/_connectorKey.index-n3iSDT74.js +0 -2
  163. package/dist/owletto/dist/assets/_conversationId-B1yGIGA9.js +0 -2
  164. package/dist/owletto/dist/assets/_eventId-B1H0-vD7.js +0 -2
  165. package/dist/owletto/dist/assets/_name-D30_V03t.js +0 -2
  166. package/dist/owletto/dist/assets/_owner-Be8O41u8.js +0 -3
  167. package/dist/owletto/dist/assets/_shape-C6YbloRh.js +0 -2
  168. package/dist/owletto/dist/assets/_skillKey-BMPvvoOI.js +0 -2
  169. package/dist/owletto/dist/assets/_slug-Bc4YIEA2.js +0 -2
  170. package/dist/owletto/dist/assets/_view-aoFDwEld.js +0 -2
  171. package/dist/owletto/dist/assets/_viewKey-DuNHc3cc.js +0 -2
  172. package/dist/owletto/dist/assets/_viewKey-rJ7A1zNx.js +0 -2
  173. package/dist/owletto/dist/assets/activity-route-view-DN0ZEAzr.js +0 -2
  174. package/dist/owletto/dist/assets/agent-card-controls-C5jNWgfq.js +0 -2
  175. package/dist/owletto/dist/assets/agent-editor-form-CdA5vLr8.js +0 -2
  176. package/dist/owletto/dist/assets/agent-guardrails-route-BJyfalBY.js +0 -2
  177. package/dist/owletto/dist/assets/agent-list-row-rF5LH-3k.js +0 -2
  178. package/dist/owletto/dist/assets/agent-permissions-matrix-bP1Qihv7.js +0 -2
  179. package/dist/owletto/dist/assets/agent-skills-route-Bv5luNdw.js +0 -2
  180. package/dist/owletto/dist/assets/agent-tab-intro-ednTs4WF.js +0 -2
  181. package/dist/owletto/dist/assets/agents-DY2S2SGE.js +0 -2
  182. package/dist/owletto/dist/assets/agents-workbench-bPTjdVS1.js +0 -2
  183. package/dist/owletto/dist/assets/app._appId-DrL5H5lB.js +0 -2
  184. package/dist/owletto/dist/assets/automation-detail-content-dFy1Huas.js +0 -2
  185. package/dist/owletto/dist/assets/automation-row-DCHM--aD.js +0 -2
  186. package/dist/owletto/dist/assets/automations-DY2S2SGE.js +0 -2
  187. package/dist/owletto/dist/assets/calendar-Ck0yOLYu.js +0 -2
  188. package/dist/owletto/dist/assets/code-editor-DNuRKde1.js +0 -16
  189. package/dist/owletto/dist/assets/connect-CMcEQWls.js +0 -2
  190. package/dist/owletto/dist/assets/connect-menu-C-B-1xGR.js +0 -2
  191. package/dist/owletto/dist/assets/connect._clientId-tGipxP5a.js +0 -2
  192. package/dist/owletto/dist/assets/connected._clientId-DSGU78eV.js +0 -2
  193. package/dist/owletto/dist/assets/connected._clientId.activity-CPLbry8R.js +0 -2
  194. package/dist/owletto/dist/assets/connected._clientId.index-jSnGvzYs.js +0 -2
  195. package/dist/owletto/dist/assets/connection-feed-detail-BIlkK0Pd.js +0 -2
  196. package/dist/owletto/dist/assets/connection-label-BobuYiAG.js +0 -2
  197. package/dist/owletto/dist/assets/connections-browser-V-3td9DB.js +0 -2
  198. package/dist/owletto/dist/assets/connector-boxes-lFc-WP83.js +0 -2
  199. package/dist/owletto/dist/assets/connector-scope-lists--vNdbOn0.js +0 -2
  200. package/dist/owletto/dist/assets/create-BmKx5vq3.js +0 -2
  201. package/dist/owletto/dist/assets/create-Rt0RbiD4.js +0 -2
  202. package/dist/owletto/dist/assets/create-automation-form-PEmSLMD6.js +0 -3
  203. package/dist/owletto/dist/assets/create._connectorKey-DcxhYIYC.js +0 -2
  204. package/dist/owletto/dist/assets/device-pin-tombstone-C79KIAIK.js +0 -2
  205. package/dist/owletto/dist/assets/device._deviceId-CIaoq9co.js +0 -2
  206. package/dist/owletto/dist/assets/entity-avatar-TVKjZxWQ.js +0 -2
  207. package/dist/owletto/dist/assets/entity-options-daOOQo7O.js +0 -2
  208. package/dist/owletto/dist/assets/entity-page-BfJXvbxn.js +0 -2
  209. package/dist/owletto/dist/assets/entity-type-page-BLwH6qa7.js +0 -2
  210. package/dist/owletto/dist/assets/event-card-DVUB8my6.js +0 -2
  211. package/dist/owletto/dist/assets/events-feed-B9CZHI_P.js +0 -2
  212. package/dist/owletto/dist/assets/filter-bar-wPaR12SS.js +0 -2
  213. package/dist/owletto/dist/assets/guardrails-Csusrok2.js +0 -2
  214. package/dist/owletto/dist/assets/identity-Dmg3STO8.js +0 -2
  215. package/dist/owletto/dist/assets/index--ZWegctR.js +0 -2
  216. package/dist/owletto/dist/assets/index-BKrdVwW9.js +0 -2
  217. package/dist/owletto/dist/assets/index-BUBcNNUY.js +0 -2
  218. package/dist/owletto/dist/assets/index-BUDr4-Yv.js +0 -2
  219. package/dist/owletto/dist/assets/index-BYPQWVwD.js +0 -2
  220. package/dist/owletto/dist/assets/index-BfpaPJPj.js +0 -2
  221. package/dist/owletto/dist/assets/index-BicNFLBW.js +0 -2
  222. package/dist/owletto/dist/assets/index-Bsdv5aks.js +0 -2
  223. package/dist/owletto/dist/assets/index-CX0pJ9j9.js +0 -2
  224. package/dist/owletto/dist/assets/index-CsrT07TJ.js +0 -2
  225. package/dist/owletto/dist/assets/index-DdBTTN3y.js +0 -7899
  226. package/dist/owletto/dist/assets/index-DdYWarql.css +0 -1
  227. package/dist/owletto/dist/assets/index-JYEIN8nM.js +0 -2
  228. package/dist/owletto/dist/assets/json-diff-BaLL4Fsu.js +0 -14
  229. package/dist/owletto/dist/assets/list-skeleton-CXDLkYTg.js +0 -2
  230. package/dist/owletto/dist/assets/manage-gear-D8LMhehh.js +0 -2
  231. package/dist/owletto/dist/assets/memory-browse-page-CNZJbCJC.js +0 -74
  232. package/dist/owletto/dist/assets/model-jL871x2J.js +0 -2
  233. package/dist/owletto/dist/assets/models-jdemgIZk.js +0 -2
  234. package/dist/owletto/dist/assets/nav-pill-DrFkuyUQ.js +0 -2
  235. package/dist/owletto/dist/assets/new-CcJOd5aH.js +0 -2
  236. package/dist/owletto/dist/assets/new-OWwrYckd.js +0 -2
  237. package/dist/owletto/dist/assets/peek-pane-content-D68BjguQ.js +0 -2
  238. package/dist/owletto/dist/assets/permissions-BvA9SATv.js +0 -2
  239. package/dist/owletto/dist/assets/proposal-review-shell-D6KABxah.js +0 -2
  240. package/dist/owletto/dist/assets/public-shell-ready-BIVCHQHe.js +0 -2
  241. package/dist/owletto/dist/assets/record-activity-C9gVBbF0.js +0 -2
  242. package/dist/owletto/dist/assets/renderer-DXfJaCCa.js +0 -97
  243. package/dist/owletto/dist/assets/run-activity-link-CaIBSRQj.js +0 -2
  244. package/dist/owletto/dist/assets/run-initiator-BvzQJYW9.js +0 -2
  245. package/dist/owletto/dist/assets/runs-panel-DEnZHTa5.js +0 -2
  246. package/dist/owletto/dist/assets/runs-table-XGnxJl7S.js +0 -2
  247. package/dist/owletto/dist/assets/settings-CgaUJMHH.js +0 -2
  248. package/dist/owletto/dist/assets/skills-D-e_h3a9.js +0 -2
  249. package/dist/owletto/dist/assets/source-record-panels-Bh0n4gGw.js +0 -2
  250. package/dist/owletto/dist/assets/status-dot-Cpq63I7p.js +0 -2
  251. package/dist/owletto/dist/assets/use-scroll-sentinel-DRyBMueA.js +0 -2
  252. package/dist/owletto/dist/assets/view-param-filters-CER47Tlz.js +0 -2
  253. package/dist/owletto/dist/assets/views-access-required-C_b9itZ2.js +0 -2
@@ -8,7 +8,7 @@
8
8
  "version": "1.0.0",
9
9
  "description": "Set up new Lobu agents end to end and operate existing Lobu projects and memory: interview, scaffold, validate, authenticate, connect feeds, execute operations, and test Automations.",
10
10
  "detail": {
11
- "instructions": "# Lobu\n\nUse this skill when setting up a brand-new Lobu agent from scratch (follow \"Onboarding a New Project\" below) or when running, validating, evaluating, or connecting an existing Lobu project, or operating Lobu memory from a coding agent.\n\nThe `AGENTS.md` generated into a new project is the source of truth for the config API (the `define*` helpers, connectors, auth, Automations, memory) — this skill does not duplicate it. For an existing project, jump to \"Core Model\" + the relevant reference section below.\n\n## Onboarding a New Project\n\nUse this playbook when a new user asks you to build them a Lobu agent from scratch. Set it up end to end: ground yourself in what the user already has, interview, discover, scaffold, prove the complete local path, then offer the deployment choice. Do not call the setup complete until every path the user selected has actually passed end to end. If an external provider, authorization, deployment, or rate limit blocks the proof, name the exact blocker and leave the setup as blocked rather than claiming success.\n\n### 1. Ground yourself in what the user already has\n\nBefore interviewing, look at what already exists so your questions and suggestions are personal rather than a blank slate. This is discovery, not a design decision — do not let it skip the interview.\n\n- Local: run `lobu context list` to see existing contexts (`--json` adds `loggedIn`, which reports stored credentials, not session validity); check the current directory and home for existing Lobu projects (`lobu.config.ts`), configured MCP servers, and CLI auth state. Note what the user already set up.\n- Cloud: if the user has an active session (do not create one just to look), call `client.organizations.list()`, `client.agents.list()` for each org, `client.catalog.listInstalled({ kinds: [\"connectors\"] })`, and `search_memory` for prior knowledge. This reveals existing agents, connectors, and memory you can build on.\n- Tell the user what you are looking at so they can correct you, and let what you find shape the options you offer. Never treat this discovery as an identity signal: orgs, emails, or domains never prove a company or product, and never mention a competitor or third party unless it actually appears in what you found.\n\nDo NOT ask for a login email during the interview. Email is only needed when a managed connector actually requires a session (step 3) or when the user chooses cloud deployment (step 6); ask for it at that point. Treat identity only as identity; never infer a company from an email address or domain.\n\n### 2. Interview with concrete, personalized options\n\nInterview the user one question at a time; wait for each answer, do not guess, and do not batch the questions. Anchor each question in what you found in step 1. Instead of asking \"what agent do you want?\" as a blank slate, summarize what you see and offer two or three concrete alternatives to choose from:\n\n- \"You already have org X with connectors A and B installed and N existing agents. Do you want to (a) add a new agent on top of those, (b) extend one of the existing agents, or (c) start something standalone?\"\n- \"For what it should do, the common shapes are (a) a triage agent that reads incoming chat and files a ticket, (b) a scheduled report that summarizes new activity each morning, (c) a research agent that answers questions from your connected tools. Which fits, or what would you change?\"\n\nOffer a default so the user can answer \"the first one\" — decisive users and undecided users both move faster with a concrete menu.\n\n- What company or product is this for?\n- What does it do, and who does it serve?\n- What is its public domain? (optional for a personal project)\n- Do I have permission to research the public website and other public sources?\n- What is the agent for?\n- What should we call it?\n- Who uses it: just me, my team, or each of my customers?\n- How should it behave, and what may it do unattended versus only with approval?\n- What should it remember? Model this as one to three entity types.\n- Where does its data come from? Pick one connector or custom source to start.\n- Where should people talk to it? Offer Web UI, API or SDK, MCP, Slack, Teams, WhatsApp, Discord, Google Chat, and Telegram without forcing a chat platform. If Slack is chosen, ask whether to join Lobu's hosted workspace for a quick start, install Lobu into an existing workspace, or use a custom Slack app; then ask whether to test the DM with Lobu, a named channel, or both, and whether people knowledge means conversation participants, bound-channel members, or the full workspace directory.\n- Should anything run on a schedule?\n- Which supported LLM provider credential does the user have?\n\nIf the user gave permission to research and has a public domain, research the company before proposing the design. Summarize its product, customers, workflows, and useful signals, and cite the public sources you used. Then propose one to three entity types, their relationships, the first data source, one or two useful Automations, and suitable interaction channels. Play back a short numbered plan and wait for confirmation before scaffolding anything.\n\n### 3. Discover the surface before choosing how to scaffold\n\nCheck Node is 26.x, then run `lobu context list` and identify the named Lobu Cloud context; do not assume the active context still points to cloud after a local run. If a managed or cloud connector was chosen and there is no session, ask for the login email at that point, explain that Lobu will email an approval link, and run `lobu login --email <confirmed-address> --context <cloud-name>`. The person approving must sign in with that same email; knowing an address never grants access. After a successful login, an empty organization membership list is a tenancy/discovery result, not an authentication failure: call `client.organizations.list()` and explain the result. Never revoke or repeat login with `--force` unless the user separately approves that re-authentication.\n\nUse ClientSDK through Lobu MCP with the explicit cloud context. From the CLI, account discovery works before selecting an active org with `lobu memory run query_sdk '{\"title\":\"Find managed connection providers\",\"script\":\"export default async (_ctx, client) => client.organizations.list()\"}'`; `lobu call` over REST requires an active org. Call `client.organizations.list()` to find public organizations offering managed connections. Call `client.catalog.listInstalled({ kinds: [\"connectors\"] })`; if the connector is not installed, call `client.catalog.listCatalog({ kinds: [\"connectors\"] })`. Inspect the selected entry's `detail.auth_schema`, `detail.options_schema`, `detail.feeds_schema`, and `detail.automation_events` instead of guessing field names. On account-scoped `/mcp`, select an authorized home workspace first with `const home = await client.org(homeSlug)` and call `home.connections.connectManaged`; put the public provider org in `managed_by_org`, rather than selecting that provider org with `client.org`. This call runs against cloud, not the embedded runtime. If a matching live managed offer exists, explain it and call `client.connections.connectManaged` only after consent. Complete the returned user authorization, then run `lobu context use <cloud-name>` immediately before executing its `local_bootstrap_command` from the parent directory where the new project should be created; use `--here` only after entering an empty directory, and do not create a blank Lobu scaffold first. Ask for bring-your-own OAuth credentials only if no managed offer exists or the user prefers their own app.\n\n**If no connector in the catalog matches the data source, do not report \"no integration exists\"** — author a custom connector: write `connectors/<name>.connector.ts` in the project, register it with `connectorFromFile(\"./connectors/<name>.connector.ts\")`, and model it on the [npm downloads example](https://github.com/lobu-ai/lobu/blob/main/examples/lobu-crm/npm-downloads.connector.ts). See [Connector authoring](https://github.com/lobu-ai/lobu/blob/main/docs/connector-authoring.md) for the full contract; the end-to-end entity/event/Automation model is in [Lobu concepts](https://github.com/lobu-ai/lobu/blob/main/docs/CONCEPTS.md).\n\n### 4. Scaffold and build from the confirmed plan\n\nIf managed auth supplied a `local_bootstrap_command`, use the project it generated. Otherwise run `npx @lobu/cli@latest init` with the confirmed name and provider. Postgres is built in, so `lobu run` starts an embedded database; ask for `DATABASE_URL` only if the user chooses external Postgres. Read the generated `AGENTS.md` completely before editing `lobu.config.ts`. Use the canonical reference at `https://github.com/lobu-ai/lobu/blob/main/examples/lobu-crm/lobu.config.ts` when needed; do not assume that example exists in the new project's filesystem. Briefly explain how the chosen feed may use checkpoints to collect incrementally, emits events, builds shared entity memory, and gives both chat and Automations the same governed context.\n\n`feeds_schema.<feed>.eventKinds` are the default Automation trigger catalog for feed connectors: every declared kind is a subscribable event type (`event_type` = the kind slug) for any feed that emits the kind. A feed's first successful non-dry sync establishes its baseline without activation; later inserts of a matching kind activate subscribers. A kind with `updatedEvent: true` also offers `<kind>.updated` for supersedes whose `occurred_at` strictly advances past the previous head. The original kind stays insert-only; unchanged rows, volatile-only updates and same-time reformats stay quiet. Subscribe to both types for new items and later activity. Feed-scoped filtering is not yet available (events dedupe by connection + origin id, so a `feed_key` match would miss origins first seen by another feed). `automation_events` (now derived from eventKinds when a connector declares none) is the trigger picker's list. If no declared kind matches the use case, use a scheduled Automation with a bounded named SQL source and read event text from `payload_text`. Validate the query against the running local schema before relying on it. If `feeds_schema` is empty, do not invent or trigger a feed; chat integrations such as Slack can deliver incoming messages directly. For Slack or Telegram, prefer `defineConnection` with `credentialMode: \"hosted\"` so no bot token is required; `lobu run` prints the exact hosted-workspace join URL, own-workspace install URL when available, and short-lived link command. This hosted chat path requires a cloud session and the agent applied to that cloud workspace; the link targets the cloud agent. It does not create a local Slack data connection or prove local Slack search. Use those returned values instead of constructing URLs. A printed `/lobu link <code>` is one-time: redeem it in the first selected DM or channel. In an installed workspace whose installer is linked to Lobu, bind each additional surface with `/lobu link <agent-id>`; otherwise generate a fresh code for that surface. Mention Lobu in a channel test and verify the App Home separately. Lobu email login and Slack installation are separate: the email link authorizes Lobu CLI access, while an existing-workspace install requires the user or workspace admin to approve Slack's OAuth screen. Never describe Slack consent as an email approval. Use `credentialMode: \"byo\"` only if the user chooses their own app. Tell the user once which remaining secrets are required and add only `secret(\"ENV_NAME\")` placeholders to config. Never open or request permission to read `.env`; inspect `.env.example` when present and declared secret placeholder names only. Never read, print, invent, or paste a real secret into source or chat.\n\nIf the user wants the agent to know people in Slack, ask whether that means conversation participants, members of bound channels, or the full workspace directory. Installing the app proves none of those by itself. Verify the selected scope by inspecting the people or member entities Lobu actually materialized and by asking the agent a roster question. If human-readable names or non-participants are unavailable, identify that exact product gap; never claim the complete workspace directory was synced.\n\n### 5. Prove the complete local path\n\nChange into the generated project directory and verify `pwd` contains the intended `lobu.config.ts`; never run project commands from its parent. Run `npx @lobu/cli@latest validate`, boot with `npx @lobu/cli@latest run`, and verify health and the local Web UI. With the embedded database default, `lobu run` creates and selects the local context and auto-applies the project; with an external `DATABASE_URL`, it does neither, so authenticate and apply to that runtime explicitly. Send a harmless direct chat message without tools.\n\nBefore consent to access provider data, inspect only catalog, connection, auth-profile, and feed metadata. For browser access, inspect the paired device and connection metadata without invoking browser actions. Durable managed OAuth and env-profile credentials stay at the gateway. Do not run a feed or connector dry-run before consent, because a dry-run may still read provider data. Ask explicitly before accessing real provider data. Only after approval, dry-run the connector or feed server-side and trigger the selected feed manually if that connector actually declares one. A feed dry-run records its run but persists no collected events, entities, attachments, checkpoint changes, or feed sync state. Run each Automation once, poll `client.operations.getRun` with its returned `run_id`, and show each completed run plus any declared result event or entity. For a run-result-only or reaction-only Automation, use the completed run and the Automation `view_url` returned by Lobu. For Slack, treat DM, channel mention, App Home, and requested member discovery as four separate checks. Keep actions in approval mode unless the user explicitly approves execution. If any step fails, fix it and rerun that step; do not silently substitute a different path.\n\n### 6. Offer the deployment choice\n\nAfter the local proof, ask the user whether to keep running locally or deploy to Lobu Cloud. Explain that the embedded local runtime and Lobu Cloud are separate targets, and that keeping it local needs no further setup. Only if the user chooses cloud deployment, ask for the login email to identify the deployer, explain that Lobu will email an approval link, and run `lobu login --email <confirmed-address> --context <cloud-name>`; the person approving must sign in with that same email. Because `lobu apply` has no context flag, use `lobu context list` and then `lobu context use <cloud-name>` to select an explicit cloud context before deployment. Run `lobu apply --dry-run` first, show the target organization and exact plan, and wait for confirmation before applying. After apply, use only authoritative `view_url` values and link commands returned by Lobu; never construct URLs. Present the working access choices: Web UI, direct agent chat, API or SDK, MCP, and any channels the user selected.\n\n## Core Model\n\n- **Lobu** is the agent framework, runtime, deployment layer, and memory surface.\n- Keep framework configuration in `lobu.config.ts` (TypeScript, `defineConfig` from `@lobu/cli/config`).\n- Keep agent identity and instructions in `IDENTITY.md`, `SOUL.md`, and `USER.md`.\n- Keep reusable capability bundles in `skills/<name>/SKILL.md` or `agents/<agent>/skills/<name>/SKILL.md`.\n- Use `lobu login` for CLI authentication. Do not use a separate memory login command.\n- Use `lobu connect` for MCP client and skill setup.\n- Use `lobu memory ...` for memory operations, seeding, and direct tool calls.\n\nReference the canonical docs before guessing how a feature works:\n[Lobu concepts](https://github.com/lobu-ai/lobu/blob/main/docs/CONCEPTS.md)\n(entities vs events, identity, end-to-end lifecycle),\n[Automations](https://github.com/lobu-ai/lobu/blob/main/docs/AUTOMATIONS.md)\n(trigger/source/output contract), and\n[Connector authoring](https://github.com/lobu-ai/lobu/blob/main/docs/connector-authoring.md)\n(custom connectors).\n\n## Project Checklist\n\n1. Read `lobu.config.ts` first.\n2. Read the active agent files under `agents/<id>/`.\n3. Check local skills under `skills/` and `agents/<id>/skills/`.\n4. Use `lobu validate` after config changes.\n5. Discover the live SDK and connector surface with `search_sdk`; never guess a method, connector key, feed key, connection id, or operation key.\n6. When prompt or Automation changes, run evals via promptfoo (see `examples/personal-finance/evals/promptfooconfig.yaml`). The in-house `lobu eval` command has been removed.\n\n## Common Commands\n\n```bash\nnpx @lobu/cli@latest init my-agent\nnpx @lobu/cli@latest run\nnpx @lobu/cli@latest validate\nnpx @lobu/cli@latest login\n```\n\n## Authentication\n\n- Interactive (human at a terminal): `lobu login` runs the device-code flow with a browser approval.\n- CI / your own automation: `LOBU_API_TOKEN`, or `lobu login --token <pat>`.\n- Local `lobu run`: the CLI mints credentials automatically over loopback — no prompt.\n- Headless, on a *user's* behalf: `lobu login --email <address>`. The server emails the user a one-click approval link and the CLI polls until they approve, then stores the scoped credential — no TTY, no pre-minted token. This is the auth.md \"user_claimed\" flow.\n\nAn external agent not using this CLI can drive the same flow over HTTP: read `<origin>/auth.md` (linked from the `agent_auth` block in `<origin>/.well-known/oauth-authorization-server`) for the endpoints. Today only the email user_claimed flow exists (no zero-touch ID-JAG). Never fabricate a token.\n\n## Organization Deletion\n\nTreat organization deletion as permanent and restricted to organization owners. The supported path is the **Organization settings** page, opened from that workspace's settings button in the organization switcher. ClientSDK and Lobu CLI intentionally expose no organization-delete method. When asked to delete organizations, identify each exact target and its data impact read-only, surface one production organization at a time for explicit confirmation, then direct an owner to that page or use their logged-in browser only when explicitly authorized. Never invent a hosted URL, call the raw Better Auth route, bypass a failed authorization check, delete organization rows directly, or batch confirmations.\n\nCloud CLI OAuth/PAT credentials are not a Better Auth browser session. A `401` or `403` is a stop signal: report the authorization boundary and leave the organization intact.\n\n<!-- lobu-memory-guidance:start -->\n## Memory Defaults\n\nYour long-term memory is powered by Lobu. Do NOT use local files (memory/, MEMORY.md) for memory.\n- Lobu automatically recalls relevant memories when you receive a message.\n- To save something, call save_memory with the content and an appropriate semantic_type.\n- To search, call search_memory. Results include view_url links to the web interface.\n- NEVER construct Lobu URLs yourself. When the user asks for a link, call search_memory to get the correct view_url.\n- When the user says \"remember this\", save it to Lobu immediately.\n- When a message changes a fact you already stored (an updated preference, status, count, location, or plan), first search_memory for the prior memory to get its id, then save_memory the new value with supersedes_event_id set to that id. This replaces the stale value so future recalls return the current one; the old value stays in history but is hidden from normal search.\n<!-- lobu-memory-guidance:end -->\n\n## Lobu Memory\n\nConfigure project-scoped memory in `lobu.config.ts` by setting the org on `defineConfig` and declaring the schema with the `define*` helpers:\n\n```ts\nimport { defineConfig, defineEntityType } from \"@lobu/cli/config\";\n\nconst ticket = defineEntityType({\n key: \"ticket\",\n name: \"Ticket\",\n properties: {\n subject: {\n type: \"string\",\n title: \"Subject\",\n \"x-table-label\": \"Subject\",\n \"x-table-column\": true,\n },\n },\n});\n\nexport default defineConfig({\n org: \"my-org\",\n orgName: \"My workspace\",\n agents: [/* ... */],\n entities: [ticket],\n});\n```\n\nThe entity schema also renders the record page form. Give every array `items` and every object `properties` (bare ones render as raw JSON), put the label in `title` and help text in `description`, mark derived fields `readOnly: true`, and declare every field an Automation writes.\n\nSeed data records still live as YAML under `./data`. Then seed or operate the memory workspace with:\n\n```bash\nlobu login\nlobu memory org set <org-slug>\nlobu memory health --org <org-slug>\nlobu memory seed --org <org-slug>\nlobu memory run search_memory '{\"query\":\"Acme\"}' --org <org-slug>\n```\n\nUse `search_memory` first when the user asks about a specific entity or workspace memory. Use `save_memory` to persist durable memory. To update existing knowledge, search first, then save with `supersedes_event_id` so the old row is tombstoned rather than deleted.\n\n## MCP Client Setup\n\nUse the actual MCP URL for the user's runtime. Never hardcode a hosted URL unless the user explicitly asks for that instance.\n\nCommon setup commands:\n\n```bash\n# Claude Code\nlobu connect claude-code --url <mcp-url>\n\n# Codex\nlobu connect codex --url <mcp-url>\n\n# Antigravity\nlobu connect antigravity --url <mcp-url>\n\n# OpenCode\nlobu connect opencode --url <mcp-url>\n```\n\nRun `lobu connect --url <mcp-url>` without a client id to choose interactively. For ChatGPT, Claude Desktop, Cursor, and other browser-managed clients, the same command applies the safe local configuration it can and prints the exact remaining client handoff. Complete OAuth in the client, not through a separate Lobu CLI login.\n\n## Browser-Authenticated Connectors\n\nFor connectors that need a signed-in browser, pair the Owletto Chrome extension\nand sign in on the source site in that browser. Browser operations run through\nthat paired device; external remote-debugging endpoints and CLI browser-auth\ncapture are no longer supported.\n\nNothing answers a JS dialog (alert, confirm, prompt, beforeunload) on the\nagent's behalf. A browser action it blocks fails, and the failed result's\n`output` carries `tab_id` and `dialog` (`dialog_id`, `type`, `message`). In\n`run_sdk`, catch the `operations.execute` error and read `error.details.output`\nrather than parsing the error text (an uncaught failure returns the same value\nas the `run_sdk` result's `error.details`, and a background run's\n`operations.getRun` returns the same `output`), then answer with the\nconnection's `handle_dialog` operation. An unanswered dialog is handed to the user after two minutes.\n\nTo test a configured feed without writing ingested data, discover the current\nfeed methods with `search_sdk`, then use `client.feeds.trigger({ feed_id, dry_run: true })`\nthrough `run_sdk` or `lobu call run_sdk` (with a `title` arg). Inspect `client.feeds.get({ feed_id })`\nfor the completed run's preview. The dry run uses normal device routing and\nauthorization checks and may access the upstream provider, so obtain consent first.\n\n## Agent-Facing Tool Surface\n\nThe normal MCP surface is intentionally small. Flat administrative tools are not advertised to agents; compose through these tools instead:\n\n- `search_memory` and `save_memory` for direct knowledge recall and persistence.\n- `search_sdk` to discover current ClientSDK methods, signatures, connector feed keys, operations, access requirements, and examples. Pass `mode: \"read\"` when you only need methods safe for `query_sdk`.\n- `query_sdk` for read-only TypeScript and `query_sql` for governed, paginated SQL reads.\n- `run_sdk` for mutations and external operations. Use `lobu call run_sdk --arg title='…' --arg script='…'` from the CLI for the same ClientSDK scripting workflow; `run_sdk`, `query_sdk`, and `query_sql` calls need a short `title` naming them in the activity feed.\n\nSearch before create to avoid duplicates. Prefer a read or dry run before mutations, never fabricate returned URLs or identifiers, and never delete from `events`; supersede or tombstone instead.\n\n## Custom Views\n\nBefore authoring UI, inspect available native entity/event pages, existing views (`client.views.list()` and `client.views.get({ key })`), and the project's shared components and overrides. Honor explicit user designs and reuse UI from the top down:\n\n1. Use the largest existing surface or component that meets the task. Configure its segment, filters, search, saved preset and layout before replacing its UI.\n2. If that surface cannot meet a concrete requirement, compose its exported parts, such as an individual table, board, graph or shared collection controls when available. Preserve shared selection and action handling instead of rebuilding that logic.\n3. If those parts still do not fit, use smaller shared primitives and write custom UI only for the remaining gap. Explain the unmet requirement that forced each step down.\n\nCheck the current exports and target host before choosing an import; native renderer registrations do not imply React exports. Surface a missing export as a platform gap rather than inventing an API or silently copying the native implementation. `@lobu/views/components` currently supplies theme-aware defaults such as `Card`, `DataTable`, filters, charts, links and query-state components. When exploration needs specialized linked charts, drilldowns, scenario controls or Canvas/SVG, compose a React view from the suitable existing components.\n\nNative JSON templates use the target renderer's registered component names and overrides; inspect what that host actually supplies. React views compose imported components in their own bundle, independently of that native renderer map.\n\nViews are custom React panels attached to entity types, records, events, or the workspace Data hub. They render in the web app and MCP hosts (Claude and other MCP Apps hosts); chat channels get links to views, not the views themselves. Author them in `views/<type>/<key>.tsx` and ship with `lobu apply` (list them via `viewFromFile` in `defineConfig`), or set sources over MCP with `client.views.set` (owner/admin only).\n\nModule shape (the server resolves React, React DOM, `@lobu/views` and `@lobu/views/components`; other dependencies need the CLI path with `node_modules` present):\n\n```tsx\nimport { defineView, sql, useAction, useParams, useQuery } from \"@lobu/views\";\nimport {\n Card,\n DataTable,\n EmptyState,\n ErrorState,\n FilterBar,\n LoadingState,\n SearchField,\n TruncatedNotice,\n} from \"@lobu/views/components\";\n\nexport const view = defineView({\n key: \"pipeline\",\n attach: [{ collection: \"deal\" }],\n params: { stage: { type: \"string\", default: \"open\" } },\n actions: { markWon: { emits: \"deal.won\" } },\n});\n\nexport default function Pipeline() {\n const [params, setParams] = useParams();\n const deals = useQuery<Array<{ id: string; title: string }>>(\n sql`SELECT id, title FROM deal WHERE stage = ${params.stage} LIMIT 100`\n );\n const markWon = useAction(\"markWon\");\n const rows = deals.data ?? [];\n // Keep the filter mounted across query states: an early return on\n // loading/error would unmount the focused input on every keystroke\n // (each keystroke re-queries). Render states inline instead.\n return (\n <Card\n title=\"Pipeline\"\n actions={<button type=\"button\" onClick={() => markWon({})}>Mark won</button>}\n >\n <FilterBar><SearchField label=\"Stage\" value={String(params.stage)} onChange={(v) => setParams({ stage: v })} /></FilterBar>\n {deals.loading && <LoadingState text=\"Loading deals…\" />}\n {deals.error && <ErrorState message={deals.error} errorCode={deals.errorCode} />}\n {!deals.loading && !deals.error && rows.length === 0 && (\n <EmptyState title=\"No deals in this stage.\" />\n )}\n {!deals.loading && !deals.error && rows.length > 0 && (\n <DataTable columns={[{ key: \"title\", header: \"Title\" }]} rows={rows} keyOf={(r) => r.id} />\n )}\n {deals.truncated && <TruncatedNotice shown={rows.length} />}\n </Card>\n );\n}\n```\n\n`defineView` is the view's only declaration: `key`, optional `name` (defaults to the key) and `description`, `attach`, `params` and `actions` are read from it, never passed separately. `views.set` always requires `source_code` containing the entrypoint module, including when retaining multiple files. Write `defineView` out as a literal (no variables, spreads or `${}` templates): the server reads it without running the module.\n\nFor a multi-file view, `files` maps relative paths to complete source strings and `entrypoint` names the view module. Include all three inputs below; `source_code` must exactly equal `files[entrypoint]`:\n\n```ts\nawait client.views.set({\n source_code: files[entrypoint],\n source_files: { entrypoint, files },\n dependencies: {}, // Local files and the host-provided runtime need no extra packages.\n});\n```\n\n`attach` lists the pages a view appears on, one per entry: `{ record: \"deal\" }` is a card on every deal's page above its activity (`{ record: \"deal\", id: 7 }` pins one record), `{ collection: \"deal\", when? }` a tab on the deal list page, `{ workspace: true }` a Data hub tab, `{ event: \"deal.won\", type? }` one event's page. One view can list several pages and branch on `useScope()` when it answers the same question at each scale. A record card renders with `useHost().displayMode === \"inline\"` inside `container.maxHeight` (the host clips past it): render a summary there with a \"See all\" that calls `requestDisplayMode(\"fullscreen\")`, and the full view when `displayMode` is `\"fullscreen\"` (the peek, a full page, a tab).\n\nWorkspace attachment does not render individual events. For an event presentation, attach to its specific `semantic_type` (event kind), optionally restricted to a linked entity type with `type`; a metadata schema name does not select the view. Avoid binding a specialized renderer to a generic kind such as `summary`. Register a dedicated kind in the workspace's event-kind registry and have its producer emit it. On event pages and event peeks, read `useScope().event` by exact ID and select that ID from the returned lineage; never substitute the latest event or let a URL date param change the subject. A shared workspace/event module should branch on `scope.event`, keeping history selection on its workspace surface. Preserve a readable stored body for fallback and evidence.\n\nBefore reporting a view working, open each attached surface, including an event page and peek when declared. Exercise filtering, drilldown, keyboard navigation, and a narrow pane; check loading, missing/error, and truncated data states. Refresh and reopen an earlier event of the kind to verify the view stays on that event rather than jumping to the newest one. Views render in an iframe, so an empty parent-page DOM is not evidence the view is empty; inspect the frame through an authorized browser or accessibility surface. A successful compile proves only that the bundle was built.\n\nRules that are load-bearing, not style:\n\n- Reads go through `useQuery` (`sql`, a `query_sdk` script string, or a read-only `tool()`). `query_sql` allows 500 rows max with a 5 second timeout — branch on the typed `errorCode` (e.g. `UPSTREAM_TIMEOUT`), never on message text, and render `truncated` honestly instead of passing partial data off as complete. Each `query_sql` cell is bounded too: strings keep their first 4,000 Unicode code points plus \"… [truncated]\"; JSON values over 16 KiB become `{ _truncated: true, bytes }` (attachments become null with `attachments_truncated`). `truncatedColumns` names the affected columns. Select smaller elements or fields, for example one array element per row with `jsonb_array_elements(...)`, and paginate as needed; each returned cell is still subject to these limits.\n- Never aggregate history in a view: no `GROUP BY`, `DISTINCT ON`, per-row regexp, or leading-wildcard `LIKE` over `events` or other growing tables. For \"latest state\" views, have an Automation maintain keyed event outputs (each run supersedes the previous event with the same key) and read the current head with `read_knowledge`.\n- Writes go only through declared view actions (`useAction` → `invoke_view_action`), which emit the declared event kind and can activate workspace-triggered Automations. Action `value` payloads are capped at 4000 JSON chars — save content first, then pass the id. A subject shown from a superseded event rejects with 409; refetch and ask the user to re-confirm rather than retrying blindly.\n- Link with `Link` from `@lobu/views/components` (or `useHost().openLink`): `href=\"<type>/<slug>\"` opens that record in the workspace, a full URL opens a new tab. A plain `<a href>` goes nowhere inside the sandboxed frame.\n- Views run in a sandboxed frame with no direct network: no fetch, no third-party calls at runtime. Reuse local React components through relative imports and `source_files: { entrypoint, files }` plus `dependencies: {}` for local-only components with `views.set`, or use `viewFromFile` + `lobu apply`. Extra npm dependencies need the CLI-bundled `compiled_code`; listing `dependencies` alone does not install packages.\n- Never early-return the whole view on loading/error: each filter keystroke re-queries, so an early return unmounts the focused input mid-typing. Keep filters mounted and render query states inline in the results area.\n- Params sync to the URL on Lobu hosts only; elsewhere they stay frame-local. `refetch()` re-reads on demand; only Lobu hosts push live data-changed refreshes.\n\n## Connectors, Feeds, and Operations\n\nConnectors are the primary integration path for third-party services. The\nend-to-end model (entities vs events, the run lifecycle) is in\n`docs/CONCEPTS.md`; authoring a new connector when none matches is in\n`docs/connector-authoring.md`. Do not freeze a connector lifecycle in project\ninstructions because it can drift from the deployed SDK:\n\n1. Call `search_sdk` with the service name immediately before acting. It returns installed and installable connectors, declared feed keys, readiness, and the caller-aware live lifecycle. Then, before requesting app credentials, call `client.connections.setupOptions({ connector_key })` against the selected runtime: it discovers verified cloud-managed OAuth and hosted chat alongside local setup, so follow the URLs and instructions it returns. `cloud_status: \"unavailable\"` is a discovery outage, not evidence that managed auth is absent. Options are offers, not connected accounts.\n2. Always follow the methods it returns in order instead of relying on a remembered connect/feed/operation sequence. Repeat discovery after authorization or state changes so the next step reflects the live connector and current caller.\n3. Treat `access: operate` as `mcp:write` and `access: administer` as workspace owner/admin plus `mcp:admin`. If discovery asks for MCP reauthorization or an owner/admin handoff, follow that instruction; never attempt methods it withheld as unavailable.\n\nSource-backed feeds query the provider only through an explicit `client.feeds.readMany({ reads: [...] })` call; `search_memory` stays local and reports unqueried source feeds in `coverage`, while `client.feeds.get` returns metadata without source access. Feeds with `sync` may persist events for search and relational queries. For connector actions, use the live discovery result's operation target and readiness. If readiness is disconnected, follow the returned next action instead of guessing a connection. Surface approval-gated `pending_approval` as a waiting state, not a failure.\n\n## Data Ingestion\n\n- Use `lobu memory seed` for small declarative YAML datasets under `./data`; it processes records sequentially and is not a bulk-backfill path.\n- Use `client.knowledge.save` for schema-less semantic history such as messages, notes, observations, and content. Pass `supersedes_event_id` when replacing an existing fact.\n- Use `client.entities.create` / `client.entities.update` only for strict structured records that match declared entity schemas.\n- For large backfills, send bounded chunks through `run_sdk` / `lobu call run_sdk` and use `Promise.allSettled` so conflicts and partial failures remain visible.\n\n```ts\nexport default async (_ctx, client) => {\n const records = [\n { content: \"...\", semantic_type: \"note\" },\n { content: \"...\", semantic_type: \"observation\" },\n ];\n return Promise.allSettled(records.map((record) => client.knowledge.save(record)));\n};\n```",
11
+ "instructions": "# Lobu\n\nUse this skill when setting up a brand-new Lobu agent from scratch (follow \"Onboarding a New Project\" below) or when running, validating, evaluating, or connecting an existing Lobu project, or operating Lobu memory from a coding agent.\n\nThe `AGENTS.md` generated into a new project is the source of truth for the config API (the `define*` helpers, connectors, auth, Automations, memory) — this skill does not duplicate it. For an existing project, jump to \"Core Model\" + the relevant reference section below.\n\n## Onboarding a New Project\n\nUse this playbook when a new user asks you to build them a Lobu agent from scratch. Set it up end to end: ground yourself in what the user already has, interview, discover, scaffold, prove the complete local path, then offer the deployment choice. Do not call the setup complete until every path the user selected has actually passed end to end. If an external provider, authorization, deployment, or rate limit blocks the proof, name the exact blocker and leave the setup as blocked rather than claiming success.\n\n### 1. Ground yourself in what the user already has\n\nBefore interviewing, look at what already exists so your questions and suggestions are personal rather than a blank slate. This is discovery, not a design decision — do not let it skip the interview.\n\n- Local: run `lobu context list` to see existing contexts (`--json` adds `loggedIn`, which reports stored credentials, not session validity); check the current directory and home for existing Lobu projects (`lobu.config.ts`), configured MCP servers, and CLI auth state. Note what the user already set up.\n- Cloud: if the user has an active session (do not create one just to look), call `client.organizations.list()`, `client.agents.list()` for each org, `client.catalog.listInstalled({ kinds: [\"connectors\"] })`, and `search_memory` for prior knowledge. This reveals existing agents, connectors, and memory you can build on.\n- Tell the user what you are looking at so they can correct you, and let what you find shape the options you offer. Never treat this discovery as an identity signal: orgs, emails, or domains never prove a company or product, and never mention a competitor or third party unless it actually appears in what you found.\n\nDo NOT ask for a login email during the interview. Email is only needed when a managed connector actually requires a session (step 3) or when the user chooses cloud deployment (step 6); ask for it at that point. Treat identity only as identity; never infer a company from an email address or domain.\n\n### 2. Interview with concrete, personalized options\n\nInterview the user one question at a time; wait for each answer, do not guess, and do not batch the questions. Anchor each question in what you found in step 1. Instead of asking \"what agent do you want?\" as a blank slate, summarize what you see and offer two or three concrete alternatives to choose from:\n\n- \"You already have org X with connectors A and B installed and N existing agents. Do you want to (a) add a new agent on top of those, (b) extend one of the existing agents, or (c) start something standalone?\"\n- \"For what it should do, the common shapes are (a) a triage agent that reads incoming chat and files a ticket, (b) a scheduled report that summarizes new activity each morning, (c) a research agent that answers questions from your connected tools. Which fits, or what would you change?\"\n\nOffer a default so the user can answer \"the first one\" — decisive users and undecided users both move faster with a concrete menu.\n\n- What company or product is this for?\n- What does it do, and who does it serve?\n- What is its public domain? (optional for a personal project)\n- Do I have permission to research the public website and other public sources?\n- What is the agent for?\n- What should we call it?\n- Who uses it: just me, my team, or each of my customers?\n- How should it behave, and what may it do unattended versus only with approval?\n- What should it remember? Model this as one to three entity types.\n- Where does its data come from? Pick one connector or custom source to start.\n- Where should people talk to it? Offer Web UI, API or SDK, MCP, Slack, Teams, WhatsApp, Discord, Google Chat, and Telegram without forcing a chat platform. If Slack is chosen, ask whether to join Lobu's hosted workspace for a quick start, install Lobu into an existing workspace, or use a custom Slack app; then ask whether to test the DM with Lobu, a named channel, or both, and whether people knowledge means conversation participants, bound-channel members, or the full workspace directory.\n- Should anything run on a schedule?\n- Which supported LLM provider credential does the user have?\n\nIf the user gave permission to research and has a public domain, research the company before proposing the design. Summarize its product, customers, workflows, and useful signals, and cite the public sources you used. Then propose one to three entity types, their relationships, the first data source, one or two useful Automations, and suitable interaction channels. Play back a short numbered plan and wait for confirmation before scaffolding anything.\n\n### 3. Discover the surface before choosing how to scaffold\n\nCheck Node is 26.x, then run `lobu context list` and identify the named Lobu Cloud context; do not assume the active context still points to cloud after a local run. If a managed or cloud connector was chosen and there is no session, ask for the login email at that point, explain that Lobu will email an approval link, and run `lobu login --email <confirmed-address> --context <cloud-name>`. The person approving must sign in with that same email; knowing an address never grants access. After a successful login, an empty organization membership list is a tenancy/discovery result, not an authentication failure: call `client.organizations.list()` and explain the result. Never revoke or repeat login with `--force` unless the user separately approves that re-authentication.\n\nUse ClientSDK through Lobu MCP with the explicit cloud context. From the CLI, account discovery works before selecting an active org with `lobu memory run query_sdk '{\"title\":\"Find managed connection providers\",\"script\":\"export default async (_ctx, client) => client.organizations.list()\"}'`; `lobu call` over REST requires an active org. Call `client.organizations.list()` to find public organizations offering managed connections. Call `client.catalog.listInstalled({ kinds: [\"connectors\"] })`; if the connector is not installed, call `client.catalog.listCatalog({ kinds: [\"connectors\"] })`. Inspect the selected entry's `detail.auth_schema`, `detail.options_schema`, `detail.feeds_schema`, and `detail.automation_events` instead of guessing field names. On account-scoped `/mcp`, select an authorized home workspace first with `const home = await client.org(homeSlug)` and call `home.connections.connectManaged`; put the public provider org in `managed_by_org`, rather than selecting that provider org with `client.org`. This call runs against cloud, not the embedded runtime. If a matching live managed offer exists, explain it and call `client.connections.connectManaged` only after consent. Complete the returned user authorization, then run `lobu context use <cloud-name>` immediately before executing its `local_bootstrap_command` from the parent directory where the new project should be created; use `--here` only after entering an empty directory, and do not create a blank Lobu scaffold first. Ask for bring-your-own OAuth credentials only if no managed offer exists or the user prefers their own app.\n\n**If no connector in the catalog matches the data source, do not report \"no integration exists\"** — author a custom connector: write `connectors/<name>.connector.ts` in the project, register it with `connectorFromFile(\"./connectors/<name>.connector.ts\")`, and model it on the [npm downloads example](https://github.com/lobu-ai/lobu/blob/main/examples/lobu-crm/npm-downloads.connector.ts). See [Connector authoring](https://github.com/lobu-ai/lobu/blob/main/docs/connector-authoring.md) for the full contract; the end-to-end entity/event/Automation model is in [Lobu concepts](https://github.com/lobu-ai/lobu/blob/main/docs/CONCEPTS.md).\n\n### 4. Scaffold and build from the confirmed plan\n\nIf managed auth supplied a `local_bootstrap_command`, use the project it generated. Otherwise run `npx @lobu/cli@latest init` with the confirmed name and provider. Postgres is built in, so `lobu run` starts an embedded database; ask for `DATABASE_URL` only if the user chooses external Postgres. Read the generated `AGENTS.md` completely before editing `lobu.config.ts`. Use the canonical reference at `https://github.com/lobu-ai/lobu/blob/main/examples/lobu-crm/lobu.config.ts` when needed; do not assume that example exists in the new project's filesystem. Briefly explain how the chosen feed may use checkpoints to collect incrementally, emits events, builds shared entity memory, and gives both chat and Automations the same governed context.\n\n`feeds_schema.<feed>.eventKinds` are the default Automation trigger catalog for feed connectors: every declared kind is a subscribable event type (`event_type` = the kind slug) for any feed that emits the kind. A feed's first successful non-dry sync establishes its baseline without activation; later inserts of a matching kind activate subscribers. A kind with `updatedEvent: true` also offers `<kind>.updated` for supersedes whose `occurred_at` strictly advances past the previous head. The original kind stays insert-only; unchanged rows, volatile-only updates and same-time reformats stay quiet. Subscribe to both types for new items and later activity. Feed-scoped filtering is not yet available (events dedupe by connection + origin id, so a `feed_key` match would miss origins first seen by another feed). `automation_events` (now derived from eventKinds when a connector declares none) is the trigger picker's list. If no declared kind matches the use case, use a scheduled Automation with a bounded named SQL source and read event text from `payload_text`. Validate the query against the running local schema before relying on it. If `feeds_schema` is empty, do not invent or trigger a feed; chat integrations such as Slack can deliver incoming messages directly. For Slack or Telegram, prefer `defineConnection` with `credentialMode: \"hosted\"` so no bot token is required; `lobu run` prints the exact hosted-workspace join URL, own-workspace install URL when available, and short-lived link command. This hosted chat path requires a cloud session and the agent applied to that cloud workspace; the link targets the cloud agent. It does not create a local Slack data connection or prove local Slack search. Use those returned values instead of constructing URLs. A printed `/lobu link <code>` is one-time: redeem it in the first selected DM or channel. In an installed workspace whose installer is linked to Lobu, bind each additional surface with `/lobu link <agent-id>`; otherwise generate a fresh code for that surface. Mention Lobu in a channel test and verify the App Home separately. Lobu email login and Slack installation are separate: the email link authorizes Lobu CLI access, while an existing-workspace install requires the user or workspace admin to approve Slack's OAuth screen. Never describe Slack consent as an email approval. Use `credentialMode: \"byo\"` only if the user chooses their own app. Tell the user once which remaining secrets are required and add only `secret(\"ENV_NAME\")` placeholders to config. Never open or request permission to read `.env`; inspect `.env.example` when present and declared secret placeholder names only. Never read, print, invent, or paste a real secret into source or chat.\n\nIf the user wants the agent to know people in Slack, ask whether that means conversation participants, members of bound channels, or the full workspace directory. Installing the app proves none of those by itself. Verify the selected scope by inspecting the people or member entities Lobu actually materialized and by asking the agent a roster question. If human-readable names or non-participants are unavailable, identify that exact product gap; never claim the complete workspace directory was synced.\n\n### 5. Prove the complete local path\n\nChange into the generated project directory and verify `pwd` contains the intended `lobu.config.ts`; never run project commands from its parent. Run `npx @lobu/cli@latest validate`, boot with `npx @lobu/cli@latest run`, and verify health and the local Web UI. With the embedded database default, `lobu run` creates and selects the local context and auto-applies the project; with an external `DATABASE_URL`, it does neither, so authenticate and apply to that runtime explicitly. Send a harmless direct chat message without tools.\n\nBefore consent to access provider data, inspect only catalog, connection, auth-profile, and feed metadata. For browser access, inspect the paired device and connection metadata without invoking browser actions. Durable managed OAuth and env-profile credentials stay at the gateway. Do not run a feed or connector dry-run before consent, because a dry-run may still read provider data. Ask explicitly before accessing real provider data. Only after approval, dry-run the connector or feed server-side and trigger the selected feed manually if that connector actually declares one. A feed dry-run records its run but persists no collected events, entities, attachments, checkpoint changes, or feed sync state. Run each Automation once, poll `client.operations.getRun` with its returned `run_id`, and show each completed run plus any declared result event or entity. For a run-result-only or reaction-only Automation, use the completed run and the Automation `view_url` returned by Lobu. For Slack, treat DM, channel mention, App Home, and requested member discovery as four separate checks. Keep actions in approval mode unless the user explicitly approves execution. If any step fails, fix it and rerun that step; do not silently substitute a different path.\n\n### 6. Offer the deployment choice\n\nAfter the local proof, ask the user whether to keep running locally or deploy to Lobu Cloud. Explain that the embedded local runtime and Lobu Cloud are separate targets, and that keeping it local needs no further setup. Only if the user chooses cloud deployment, ask for the login email to identify the deployer, explain that Lobu will email an approval link, and run `lobu login --email <confirmed-address> --context <cloud-name>`; the person approving must sign in with that same email. Because `lobu apply` has no context flag, use `lobu context list` and then `lobu context use <cloud-name>` to select an explicit cloud context before deployment. Run `lobu apply --dry-run` first, show the target organization and exact plan, and wait for confirmation before applying. After apply, use only authoritative `view_url` values and link commands returned by Lobu; never construct URLs. Present the working access choices: Web UI, direct agent chat, API or SDK, MCP, and any channels the user selected.\n\n## Core Model\n\n- **Lobu** is the agent framework, runtime, deployment layer, and memory surface.\n- Keep framework configuration in `lobu.config.ts` (TypeScript, `defineConfig` from `@lobu/cli/config`).\n- Keep agent identity and instructions in `IDENTITY.md`, `SOUL.md`, and `USER.md`.\n- Keep reusable capability bundles in `skills/<name>/SKILL.md` or `agents/<agent>/skills/<name>/SKILL.md`.\n- Use `lobu login` for CLI authentication. Do not use a separate memory login command.\n- Use `lobu connect` for MCP client and skill setup.\n- Use `lobu memory ...` for memory operations, seeding, and direct tool calls.\n\nReference the canonical docs before guessing how a feature works:\n[Lobu concepts](https://github.com/lobu-ai/lobu/blob/main/docs/CONCEPTS.md)\n(entities vs events, identity, end-to-end lifecycle),\n[Automations](https://github.com/lobu-ai/lobu/blob/main/docs/AUTOMATIONS.md)\n(trigger/source/output contract), and\n[Connector authoring](https://github.com/lobu-ai/lobu/blob/main/docs/connector-authoring.md)\n(custom connectors).\n\n## Project Checklist\n\n1. Read `lobu.config.ts` first.\n2. Read the active agent files under `agents/<id>/`.\n3. Check local skills under `skills/` and `agents/<id>/skills/`.\n4. Use `lobu validate` after config changes.\n5. Discover the live SDK and connector surface with `search_sdk`; never guess a method, connector key, feed key, connection id, or operation key.\n6. When prompt or Automation changes, run evals via promptfoo (see `examples/personal-finance/evals/promptfooconfig.yaml`). The in-house `lobu eval` command has been removed.\n\n## Common Commands\n\n```bash\nnpx @lobu/cli@latest init my-agent\nnpx @lobu/cli@latest run\nnpx @lobu/cli@latest validate\nnpx @lobu/cli@latest login\n```\n\n## Authentication\n\n- Interactive (human at a terminal): `lobu login` runs the device-code flow with a browser approval.\n- CI / your own automation: `LOBU_API_TOKEN`, or `lobu login --token <pat>`.\n- Local `lobu run`: the CLI mints credentials automatically over loopback — no prompt.\n- Headless, on a *user's* behalf: `lobu login --email <address>`. The server emails the user a one-click approval link and the CLI polls until they approve, then stores the scoped credential — no TTY, no pre-minted token. This is the auth.md \"user_claimed\" flow.\n\nAn external agent not using this CLI can drive the same flow over HTTP: read `<origin>/auth.md` (linked from the `agent_auth` block in `<origin>/.well-known/oauth-authorization-server`) for the endpoints. Today only the email user_claimed flow exists (no zero-touch ID-JAG). Never fabricate a token.\n\n## Organization Deletion\n\nTreat organization deletion as permanent and restricted to organization owners. The supported path is the **Organization settings** page, opened from that workspace's settings button in the organization switcher. ClientSDK and Lobu CLI intentionally expose no organization-delete method. When asked to delete organizations, identify each exact target and its data impact read-only, surface one production organization at a time for explicit confirmation, then direct an owner to that page or use their logged-in browser only when explicitly authorized. Never invent a hosted URL, call the raw Better Auth route, bypass a failed authorization check, delete organization rows directly, or batch confirmations.\n\nCloud CLI OAuth/PAT credentials are not a Better Auth browser session. A `401` or `403` is a stop signal: report the authorization boundary and leave the organization intact.\n\n<!-- lobu-memory-guidance:start -->\n## Memory Defaults\n\nYour long-term memory is powered by Lobu. Do NOT use local files (memory/, MEMORY.md) for memory.\n- Lobu automatically recalls relevant memories when you receive a message.\n- To save something, call save_memory with the content and an appropriate semantic_type.\n- To search, call search_memory. Results include view_url links to the web interface.\n- NEVER construct Lobu URLs yourself. When the user asks for a link, call search_memory to get the correct view_url.\n- When the user says \"remember this\", save it to Lobu immediately.\n- When a message changes a fact you already stored (an updated preference, status, count, location, or plan), first search_memory for the prior memory to get its id, then save_memory the new value with supersedes_event_id set to that id. This replaces the stale value so future recalls return the current one; the old value stays in history but is hidden from normal search.\n<!-- lobu-memory-guidance:end -->\n\n## Lobu Memory\n\nConfigure project-scoped memory in `lobu.config.ts` by setting the org on `defineConfig` and declaring the schema with the `define*` helpers:\n\n```ts\nimport { defineConfig, defineEntityType } from \"@lobu/cli/config\";\n\nconst ticket = defineEntityType({\n key: \"ticket\",\n name: \"Ticket\",\n properties: {\n subject: {\n type: \"string\",\n title: \"Subject\",\n \"x-table-label\": \"Subject\",\n \"x-table-column\": true,\n },\n },\n});\n\nexport default defineConfig({\n org: \"my-org\",\n orgName: \"My workspace\",\n agents: [/* ... */],\n entities: [ticket],\n});\n```\n\nThe entity schema also renders the record page form. Give every array `items` and every object `properties` (bare ones render as raw JSON), put the label in `title` and help text in `description`, mark derived fields `readOnly: true`, and declare every field an Automation writes.\n\nSeed data records still live as YAML under `./data`. Then seed or operate the memory workspace with:\n\n```bash\nlobu login\nlobu memory org set <org-slug>\nlobu memory health --org <org-slug>\nlobu memory seed --org <org-slug>\nlobu memory run search_memory '{\"query\":\"Acme\"}' --org <org-slug>\n```\n\nUse `search_memory` first when the user asks about a specific entity or workspace memory. Use `save_memory` to persist durable memory. To update existing knowledge, search first, then save with `supersedes_event_id` so the old row is tombstoned rather than deleted.\n\n## MCP Client Setup\n\nUse the actual MCP URL for the user's runtime. Never hardcode a hosted URL unless the user explicitly asks for that instance.\n\nCommon setup commands:\n\n```bash\n# Claude Code\nlobu connect claude-code --url <mcp-url>\n\n# Codex\nlobu connect codex --url <mcp-url>\n\n# Antigravity\nlobu connect antigravity --url <mcp-url>\n\n# OpenCode\nlobu connect opencode --url <mcp-url>\n```\n\nRun `lobu connect --url <mcp-url>` without a client id to choose interactively. For ChatGPT, Claude Desktop, Cursor, and other browser-managed clients, the same command applies the safe local configuration it can and prints the exact remaining client handoff. Complete OAuth in the client, not through a separate Lobu CLI login.\n\n## Browser-Authenticated Connectors\n\nFor connectors that need a signed-in browser, pair the Owletto Chrome extension\nand sign in on the source site in that browser. Browser operations run through\nthat paired device; external remote-debugging endpoints and CLI browser-auth\ncapture are no longer supported.\n\nNothing answers a JS dialog (alert, confirm, prompt, beforeunload) on the\nagent's behalf. A browser action it blocks fails, and the failed result's\n`output` carries `tab_id` and `dialog` (`dialog_id`, `type`, `message`). In\n`run_sdk`, catch the `operations.execute` error and read `error.details.output`\nrather than parsing the error text (an uncaught failure returns the same value\nas the `run_sdk` result's `error.details`, and a background run's\n`operations.getRun` returns the same `output`), then answer with the\nconnection's `handle_dialog` operation. An unanswered dialog is handed to the user after two minutes.\n\nTo test a configured feed without writing ingested data, discover the current\nfeed methods with `search_sdk`, then use `client.feeds.trigger({ feed_id, dry_run: true })`\nthrough `run_sdk` or `lobu call run_sdk` (with a `title` arg). Inspect `client.feeds.get({ feed_id })`\nfor the completed run's preview. The dry run uses normal device routing and\nauthorization checks and may access the upstream provider, so obtain consent first.\n\n## Agent-Facing Tool Surface\n\nThe normal MCP surface is intentionally small. Flat administrative tools are not advertised to agents; compose through these tools instead:\n\n- `search_memory` and `save_memory` for direct knowledge recall and persistence.\n- `search_sdk` to discover current ClientSDK methods, signatures, connector feed keys, operations, access requirements, and examples. Pass `mode: \"read\"` when you only need methods safe for `query_sdk`.\n- `query_sdk` for read-only TypeScript and `query_sql` for governed, paginated SQL reads.\n- `run_sdk` for mutations and external operations. Use `lobu call run_sdk --arg title='…' --arg script='…'` from the CLI for the same ClientSDK scripting workflow; `run_sdk`, `query_sdk`, and `query_sql` calls need a short `title` naming them in the activity feed.\n\nSearch before create to avoid duplicates. Prefer a read or dry run before mutations, never fabricate returned URLs or identifiers, and never delete from `events`; supersede or tombstone instead.\n\n## Custom Views\n\nBefore authoring UI, inspect available native entity/event pages, existing views (`client.views.list()` and `client.views.get({ key })`), and the project's shared components and overrides. Honor explicit user designs and reuse UI from the top down:\n\n1. Use the largest existing surface or component that meets the task. Configure its segment, filters, search, saved preset and layout before replacing its UI.\n2. If that surface cannot meet a concrete requirement, compose its exported parts, such as an individual table, board, graph or shared collection controls when available. Preserve shared selection and action handling instead of rebuilding that logic.\n3. If those parts still do not fit, use smaller shared primitives and write custom UI only for the remaining gap. Explain the unmet requirement that forced each step down.\n\nCheck the current exports and target host before choosing an import; native renderer registrations do not imply React exports. Surface a missing export as a platform gap rather than inventing an API or silently copying the native implementation. `@lobu/views/components` currently supplies theme-aware defaults such as `Card`, `DataTable`, filters, charts, links and query-state components. When exploration needs specialized linked charts, drilldowns, scenario controls or Canvas/SVG, compose a React view from the suitable existing components.\n\nNative JSON templates use the target renderer's registered component names and overrides; inspect what that host actually supplies. React views compose imported components in their own bundle, independently of that native renderer map.\n\nViews are custom React panels attached to entity types, records, events, or the workspace Data hub. They render in the web app and MCP hosts (Claude and other MCP Apps hosts); chat channels get links to views, not the views themselves. Author them in `views/<type>/<key>.tsx` and ship with `lobu apply` (list them via `viewFromFile` in `defineConfig`), or set sources over MCP with `client.views.set` (owner/admin only).\n\nModule shape (the server resolves React, React DOM, `@lobu/views` and `@lobu/views/components`; other dependencies need the CLI path with `node_modules` present):\n\n```tsx\nimport { defineView, tool, useAction, useParams, useQuery } from \"@lobu/views\";\nimport {\n Card,\n DataTable,\n EmptyState,\n ErrorState,\n FilterBar,\n LoadingState,\n SearchField,\n TruncatedNotice,\n} from \"@lobu/views/components\";\n\nexport const view = defineView({\n key: \"pipeline\",\n attach: [{ collection: \"deal\" }],\n params: { stage: { type: \"string\", default: \"open\" } },\n actions: { markWon: { emits: \"deal.won\" } },\n});\n\nexport default function Pipeline() {\n const [params, setParams] = useParams();\n const deals = useQuery(tool(\"manage_entity\", { action: \"list\", entity_type: \"deal\", filters: [{ field: \"stage\", op: \"eq\", value: String(params.stage) }], limit: 100 }));\n const markWon = useAction(\"markWon\");\n const rows = deals.data?.entities ?? [];\n // Keep the filter mounted across query states: an early return on\n // loading/error would unmount the focused input on every keystroke\n // (each keystroke re-queries). Render states inline instead.\n return (\n <Card\n title=\"Pipeline\"\n actions={<button type=\"button\" onClick={() => markWon({})}>Mark won</button>}\n >\n <FilterBar><SearchField label=\"Stage\" value={String(params.stage)} onChange={(v) => setParams({ stage: v })} /></FilterBar>\n {deals.loading && <LoadingState text=\"Loading deals…\" />}\n {deals.error && <ErrorState message={deals.error} errorCode={deals.errorCode} />}\n {!deals.loading && !deals.error && rows.length === 0 && (\n <EmptyState title=\"No deals in this stage.\" />\n )}\n {!deals.loading && !deals.error && rows.length > 0 && (\n <DataTable columns={[{ key: \"name\", header: \"Name\" }]} rows={rows} keyOf={(r) => r.id ?? r.slug} />\n )}\n {deals.truncated && <TruncatedNotice shown={rows.length} />}\n </Card>\n );\n}\n```\n\n`defineView` is the view's only declaration: `key`, optional `name` (defaults to the key) and `description`, `attach`, `params` and `actions` are read from it, never passed separately. `views.set` always requires `source_code` containing the entrypoint module, including when retaining multiple files. Write `defineView` out as a literal (no variables, spreads or `${}` templates): the server reads it without running the module.\n\nFor a multi-file view, `files` maps relative paths to complete source strings and `entrypoint` names the view module. Include all three inputs below; `source_code` must exactly equal `files[entrypoint]`:\n\n```ts\nawait client.views.set({\n source_code: files[entrypoint],\n source_files: { entrypoint, files },\n dependencies: {}, // Local files and the host-provided runtime need no extra packages.\n});\n```\n\n`attach` lists the pages a view appears on, one per entry: `{ record: \"deal\" }` is a card on every deal's page above its activity (`{ record: \"deal\", id: 7 }` pins one record), `{ collection: \"deal\", when? }` a tab on the deal list page, `{ workspace: true }` a Data hub tab, `{ event: \"deal.won\", type? }` one event's page. One view can list several pages and branch on `useScope()` when it answers the same question at each scale. A record card renders with `useHost().displayMode === \"inline\"` inside `container.maxHeight` (the host clips past it): render a summary there with a \"See all\" that calls `requestDisplayMode(\"fullscreen\")`, and the full view when `displayMode` is `\"fullscreen\"` (the peek, a full page, a tab).\n\nWorkspace attachment does not render individual events. For an event presentation, attach to its specific `semantic_type` (event kind), optionally restricted to a linked entity type with `type`; a metadata schema name does not select the view. Avoid binding a specialized renderer to a generic kind such as `summary`. Register a dedicated kind in the workspace's event-kind registry and have its producer emit it. On event pages and event peeks, read `useScope().event` by exact ID and select that ID from the returned lineage; never substitute the latest event or let a URL date param change the subject. A shared workspace/event module should branch on `scope.event`, keeping history selection on its workspace surface. Preserve a readable stored body for fallback and evidence.\n\nBefore reporting a view working, open each attached surface, including an event page and peek when declared. Exercise filtering, drilldown, keyboard navigation, and a narrow pane; check loading, missing/error, and truncated data states. Refresh and reopen an earlier event of the kind to verify the view stays on that event rather than jumping to the newest one. Views render in an iframe, so an empty parent-page DOM is not evidence the view is empty; inspect the frame through an authorized browser or accessibility surface. A successful compile proves only that the bundle was built.\n\nImport reusable UI from **`@lobu/views/components`**. Discover this kit with `search_sdk({ query: \"@lobu/views/components\" })` or a component name. Start with the largest suitable native surface; compose smaller parts only for needs it does not cover:\n\n| Need | Component and minimum input |\n| --- | --- |\n| Complete entity list | `EntityListPage title={title} table={tableProps}` |\n| SQL, computed TypeScript or local rows | `EntityListPage title={title}` with `DataTable columns={columns} rows={rows} keyOf={keyOf}` as children |\n| Complete record body | `EntityRecordPage entity={entity} owner={workspace} schema={schema}` |\n| Entity table or individual fields | `EntityTableView`, `RecordSpecSheet`, `SchemaValue`, `EntityAvatar` |\n| Saved resource identity and navigation | `AutomationReference`, `AgentReference`, `ConnectorReference` |\n| Automation instructions, sources, triggers, outputs and code | `AutomationDefinition value={definition}` |\n| Agent identity, models and settings | `AgentDefinition value={definition}` |\n| Connector actions, feeds, schemas and source | `ConnectorDefinition value={definition}` |\n| Current / Proposed comparison | Existing `Tabs` with the same definition component in each panel |\n| Optional technical details | `JsonDiff before={current} after={proposed}` inside collapsed `<details>` |\n\nThe host supplies native JS/CSS, React and live theme. Do not copy product markup or bundle a second React. Exported prop types describe the shared contracts. Use `Button`, `Badge`, `Card`, chart and state components for surrounding UI.\n\n**Page bodies are controlled.** Supply data and slots; they fetch nothing and authorize no writes. `EntityListPage` accepts `title`, optional `actions`/`controls`, and either `table: EntityTableViewProps` or `children`. Its `loading`, `error`, `onRetry` and `empty` affect only results, keeping controls mounted. Native table props include rows, schema, linked lookups, sorting and pagination; honor `metadata.has_more`. For SQL/TypeScript rows use `DataTable`, without inventing entity IDs or types. `EntityRecordPage` renders the native title/avatar and schema fields; `actions`, `details`, `summary`, and `children` supply editing, links, activity and tabs. Default `layout=\"record\"` adapts to width; `layout=\"content\"` retains the header while children own the layout. A `null` title/details/summary hides that slot. Preserve zero and false.\n\n**References resolve saved identity.** Pass `mode=\"live\"`, mounted `workspace`, optional `appearance=\"inline\" | \"row\"` (default row), and `automationId` (positive decimal string), `agentId`, or `connectorKey` plus optional numeric `connectionId`. Discover IDs first. These reuse product rows and visiting-user permission checks; they accept no authored name/status or mutation callbacks. Invalid selectors, another workspace, missing records and refused reads show unavailable. A connector definition does not imply a connected account. Reads refresh on mount, focus, reconnect and host invalidation, without interval polling.\n\n**Definitions render supplied objects.** All three have the same signature: `{ value: Record<string, unknown> }`. Pass the existing saved definition or complete proposed snapshot, not a patch. Automation fields include `name`, `description`, `prompt`, `sources`, `triggers`, `outputs`, `reaction_script`; Agent fields include `name`, `description`, `identity_md`, `settings`; Connector fields include `name`, `description`, `version`, `actions_schema`, `feeds_schema`, `source_code`. Remaining nested settings stay inspectable. Missing fields differ from empty values. Bodies fetch nothing, execute no supplied code, and add no save/approval controls. Label authored objects as Snapshot or Proposal preview; use a reference for live identity. Never supply credentials.\n\nShow changes as **Current / Proposed**, defaulting to Proposed, with the same native body on both sides. Keep JSON diff optional. Rendering does not save or apply anything and needs no new proposal endpoint. For an existing approval, render its held current/proposed snapshots; do not merge in newer live values. Writes remain on existing declared `useAction` paths or native authorized editor/review pages. An authored preview must not imply a held approval or authority to apply it.\n\n```tsx\nimport {\n Card, ConnectorDefinition, JsonDiff,\n Tabs, TabsList, TabsTrigger, TabsContent,\n} from \"@lobu/views/components\";\n\n// current and proposed are complete definition objects from authorized reads\n// and the requested edit. Use AgentDefinition or AutomationDefinition identically.\n<Card title=\"Connector proposal preview\" description=\"Nothing has been applied.\">\n <Tabs defaultValue=\"proposed\">\n <TabsList label=\"Definition version\">\n <TabsTrigger value=\"current\">Current</TabsTrigger>\n <TabsTrigger value=\"proposed\">Proposed</TabsTrigger>\n </TabsList>\n <TabsContent value=\"current\"><ConnectorDefinition value={current} /></TabsContent>\n <TabsContent value=\"proposed\"><ConnectorDefinition value={proposed} /></TabsContent>\n </Tabs>\n <details><summary>Technical diff</summary><JsonDiff before={current} after={proposed} /></details>\n</Card>\n```\n\nUse `useHost().openRecord({ entity_id, entity_type? }, { mode: \"peek\" })` for a record's native peek. String source keys require the type. The promise reports the actual `{ mode: \"peek\" | \"page\" }`; a host without native peek opens the server-returned record URL. Errors remain errors. `useHost().theme` follows live theme changes; native components inherit the host palette and typography automatically. Use semantic host style variables and avoid hardcoded light/dark colors.\n\nRules that are load-bearing, not style:\n\n- Use structured reads: `useQuery(tool(\"manage_entity\", { action: \"list\", entity_type: type, filters, limit: 100 }))`. The host admits entity `list/get/list_links` and entity-type schema `list/get` reads; tools marked read-only are also available. Use existing tool input/result contracts and preserve server authorization. Send structured arguments, never TypeScript inside a string. `sql` remains available; script-string queries are compatibility support for installed views. `query_sql` allows 500 rows max with a 5 second timeout — branch on the typed `errorCode` (e.g. `UPSTREAM_TIMEOUT`), never on message text, and render `truncated` honestly instead of passing partial data off as complete. Each `query_sql` cell is bounded too: strings keep their first 4,000 Unicode code points plus \"… [truncated]\"; JSON values over 16 KiB become `{ _truncated: true, bytes }` (attachments become null with `attachments_truncated`). `truncatedColumns` names the affected columns. Select smaller elements or fields, for example one array element per row with `jsonb_array_elements(...)`, and paginate as needed; each returned cell is still subject to these limits.\n- Never aggregate history in a view: no `GROUP BY`, `DISTINCT ON`, per-row regexp, or leading-wildcard `LIKE` over `events` or other growing tables. For \"latest state\" views, have an Automation maintain keyed event outputs (each run supersedes the previous event with the same key) and read the current head with `read_knowledge`.\n- `run_sdk` is not exposed to views. Writes go only through declared view actions (`useAction` → `invoke_view_action`), which emit the declared event kind and can activate workspace-triggered Automations. Action `value` payloads are capped at 4000 JSON chars — save content first, then pass the id. A subject shown from a superseded event rejects with 409; refetch and ask the user to re-confirm rather than retrying blindly.\n- Link with `Link` from `@lobu/views/components` (or `useHost().openLink`): `href=\"<type>/<slug>\"` opens that record in the workspace, supported links within the same workspace open in the peek pane, other app links navigate normally, and external URLs open a new tab. A plain `<a href>` goes nowhere inside the sandboxed frame.\n- For several offers, publish one event with a card for each held proposal. Obtain the real pending approval through the existing agent/Automation write method under its normal policy, then read its returned event ID to obtain the canonical review URL. Link each card to that exact review; the host opens it in peek. Each offer has its own run and decision. Use native Current/Proposed fields for updates and the proposed definition for creation. A resource snapshot alone is a preview, not an approval: never fabricate Approve/Reject buttons or imply that a missing resource ID creates anything. Existing settings `?run_id=` links remain compatible; new offers use the proposal review instead of the settings page.\n- Views run in a sandboxed frame with no direct network: no fetch, no third-party calls at runtime. Reuse local React components through relative imports and `source_files: { entrypoint, files }` plus `dependencies: {}` for local-only components with `views.set`, or use `viewFromFile` + `lobu apply`. Extra npm dependencies need the CLI-bundled `compiled_code`; listing `dependencies` alone does not install packages.\n- Never early-return the whole view on loading/error: each filter keystroke re-queries, so an early return unmounts the focused input mid-typing. Keep filters mounted and render query states inline in the results area.\n- Before calling a view verified, exercise the exact compiled artifact and host runtime in a sandboxed browser: representative data, loading, empty and error states, filters, sort/pagination, links/peek, declared actions, light/dark and narrow layouts. Fix failures and rerun. Registration compiles the module and requires an isolated browser check of the exact candidate against bounded empty/error/loading fixtures in light/dark themes and inline/fullscreen modes for every distinct attached scope (at most eight per module; each scope is its own bounded runner request). A failed check returns 422; an unavailable runner returns 503; both preserve the saved view. Fixture validation does not prove successful workspace data or every interaction. Distinguish compiled, browser-verified, stored and deployed; never claim more than the evidence.\n- Params sync to the URL on Lobu hosts only; elsewhere they stay frame-local. `refetch()` re-reads on demand; only Lobu hosts push live data-changed refreshes.\n\n## Connectors, Feeds, and Operations\n\nConnectors are the primary integration path for third-party services. The\nend-to-end model (entities vs events, the run lifecycle) is in\n`docs/CONCEPTS.md`; authoring a new connector when none matches is in\n`docs/connector-authoring.md`. Do not freeze a connector lifecycle in project\ninstructions because it can drift from the deployed SDK:\n\n1. Call `search_sdk` with the service name immediately before acting. It returns installed and installable connectors, declared feed keys, readiness, and the caller-aware live lifecycle. Then, before requesting app credentials, call `client.connections.setupOptions({ connector_key })` against the selected runtime: it discovers verified cloud-managed OAuth and hosted chat alongside local setup, so follow the URLs and instructions it returns. `cloud_status: \"unavailable\"` is a discovery outage, not evidence that managed auth is absent. Options are offers, not connected accounts.\n2. Always follow the methods it returns in order instead of relying on a remembered connect/feed/operation sequence. Repeat discovery after authorization or state changes so the next step reflects the live connector and current caller.\n3. Treat `access: operate` as `mcp:write` and `access: administer` as workspace owner/admin plus `mcp:admin`. If discovery asks for MCP reauthorization or an owner/admin handoff, follow that instruction; never attempt methods it withheld as unavailable.\n\nSource-backed feeds query the provider only through an explicit `client.feeds.readMany({ reads: [...] })` call; `search_memory` stays local and reports unqueried source feeds in `coverage`, while `client.feeds.get` returns metadata without source access. Feeds with `sync` may persist events for search and relational queries. For connector actions, use the live discovery result's operation target and readiness. If readiness is disconnected, follow the returned next action instead of guessing a connection. Surface approval-gated `pending_approval` as a waiting state, not a failure.\n\n## Data Ingestion\n\n- Use `lobu memory seed` for small declarative YAML datasets under `./data`; it processes records sequentially and is not a bulk-backfill path.\n- Use `client.knowledge.save` for schema-less semantic history such as messages, notes, observations, and content. Pass `supersedes_event_id` when replacing an existing fact.\n- Use `client.entities.create` / `client.entities.update` only for strict structured records that match declared entity schemas.\n- For large backfills, send bounded chunks through `run_sdk` / `lobu call run_sdk` and use `Promise.allSettled` so conflicts and partial failures remain visible.\n\n```ts\nexport default async (_ctx, client) => {\n const records = [\n { content: \"...\", semantic_type: \"note\" },\n { content: \"...\", semantic_type: \"observation\" },\n ];\n return Promise.allSettled(records.map((record) => client.knowledge.save(record)));\n};\n```",
12
12
  "hidden": false
13
13
  }
14
14
  },
@@ -4,6 +4,6 @@
4
4
  "server": "dist/server.bundle.mjs",
5
5
  "embeddingsServer": "dist/embeddings-server.mjs"
6
6
  },
7
- "version": "24.5.0",
7
+ "version": "24.7.0",
8
8
  "verify": "dist/verify.mjs"
9
9
  }
@@ -27,6 +27,12 @@ export const LINKEDIN_IDENTITY = {
27
27
  * sender's messages auto-create.
28
28
  */
29
29
  USER_MEMBER_ID: "linkedin_user_member_id",
30
+ /**
31
+ * Canonical `/company/<vanity>` page slug, the identity of a company page
32
+ * that authors a post. Like the member slug it is mutable, so it stays an
33
+ * equal-weight identity.
34
+ */
35
+ COMPANY_SLUG: "linkedin_company_slug",
30
36
  } as const;
31
37
 
32
38
  export type LinkedInIdentityNamespace =
@@ -47,6 +53,41 @@ export function normalizeLinkedInSlug(
47
53
  return slug;
48
54
  }
49
55
 
56
+ /**
57
+ * Extract a canonical LinkedIn company-page slug from a `/company/<slug>` URL
58
+ * or bare slug. An all-digit value is LinkedIn's numeric company id rather than
59
+ * the vanity slug; accepting it would key the same page under two identifiers,
60
+ * so it is rejected.
61
+ */
62
+ export function normalizeLinkedInCompanySlug(
63
+ raw: string | null | undefined,
64
+ ): string | null {
65
+ if (typeof raw !== "string") return null;
66
+ const value = raw.trim();
67
+ if (!value) return null;
68
+ const slug = (
69
+ value.includes("/") ? companyPathSlug(value) : value
70
+ )?.toLowerCase();
71
+ if (!slug || !/^[a-z0-9\-_%]+$/.test(slug) || /^\d+$/.test(slug)) {
72
+ return null;
73
+ }
74
+ return slug;
75
+ }
76
+
77
+ /** The path segment after `company` in an absolute or site-relative URL. */
78
+ function companyPathSlug(url: string): string | null {
79
+ let segments: string[];
80
+ try {
81
+ segments = new URL(url, "https://www.linkedin.com").pathname.split("/");
82
+ } catch {
83
+ return null;
84
+ }
85
+ const index = segments.findIndex(
86
+ (segment) => segment.toLowerCase() === "company",
87
+ );
88
+ return index >= 0 ? (segments[index + 1] ?? null) : null;
89
+ }
90
+
50
91
  /**
51
92
  * Extract the immutable member id from a LinkedIn person URN or bare id.
52
93
  */
@@ -73,6 +114,8 @@ export function normalizeLinkedInIdentityValue(
73
114
  switch (namespace) {
74
115
  case LINKEDIN_IDENTITY.SLUG:
75
116
  return normalizeLinkedInSlug(raw);
117
+ case LINKEDIN_IDENTITY.COMPANY_SLUG:
118
+ return normalizeLinkedInCompanySlug(raw);
76
119
  case LINKEDIN_IDENTITY.MEMBER_ID:
77
120
  case LINKEDIN_IDENTITY.USER_MEMBER_ID:
78
121
  return normalizeLinkedInMemberId(raw);
@@ -52,6 +52,7 @@ import {
52
52
  } from "@lobu/connector-sdk";
53
53
  import {
54
54
  LINKEDIN_IDENTITY,
55
+ normalizeLinkedInCompanySlug,
55
56
  normalizeLinkedInMemberId,
56
57
  normalizeLinkedInSlug,
57
58
  } from "./linkedin-identity.js";
@@ -121,6 +122,7 @@ interface LinkedInConfig extends LocalTakeoutConfig {
121
122
  company_url?: string;
122
123
  max_scrolls?: number;
123
124
  min_scrolls?: number;
125
+ create_engager_people?: boolean;
124
126
  }
125
127
 
126
128
  interface LinkedInPost {
@@ -132,6 +134,8 @@ interface LinkedInPost {
132
134
  authorMemberId?: string;
133
135
  /** Canonical `/in/<slug>` vanity id — soft identity, bridges to takeout. */
134
136
  authorSlug?: string;
137
+ /** Canonical `/company/<slug>` when the actor is a company page. */
138
+ authorCompanySlug?: string;
135
139
  likes: number;
136
140
  comments: number;
137
141
  shares: number;
@@ -228,6 +232,47 @@ const LINKEDIN_MESSAGE_ATTRIBUTIONS: EventAttributionRule[] = [
228
232
  },
229
233
  ];
230
234
 
235
+ /**
236
+ * Link a post written by a company page to a `company` entity keyed on the
237
+ * page's `/company/<slug>`. Like person authors, a company that authors a post
238
+ * is a real source, so it is minted on no match; a workspace without a
239
+ * `company` entity type skips the mint. Companies that are only mentioned or
240
+ * anchored in someone else's post get no rule, matching person mentions.
241
+ */
242
+ const LINKEDIN_COMPANY_AUTHOR_ATTRIBUTION: EventAttributionRule = {
243
+ name: "company_author",
244
+ role: "authored_by",
245
+ autoCreate: true,
246
+ target: {
247
+ entityType: "company",
248
+ titlePath: "author_name",
249
+ identities: [
250
+ {
251
+ namespace: LINKEDIN_IDENTITY.COMPANY_SLUG,
252
+ eventPath: "metadata.author_company_slug",
253
+ },
254
+ ],
255
+ },
256
+ traits: {
257
+ linkedin_url: {
258
+ eventPath: "metadata.author_company_url",
259
+ mergeStrategy: "prefer_non_empty",
260
+ },
261
+ },
262
+ };
263
+
264
+ /**
265
+ * Engager-type people (reactors, commenters, the comment being replied to) are
266
+ * mostly one-off strangers. The home_feed `create_engager_people` setting is
267
+ * stamped on each event; when it is false these roles still link to people who
268
+ * already exist but never create new ones. Events without the stamp keep
269
+ * creating, so the default and older events are unchanged.
270
+ */
271
+ const CREATE_ENGAGER_PEOPLE_GATE = {
272
+ path: "metadata.create_engager_people",
273
+ notEquals: false,
274
+ } as const;
275
+
231
276
  /**
232
277
  * Link a live `post` to its author. The Voyager feed (company_updates) exposes
233
278
  * the actor's immutable `urn:li:fsd_profile:<id>` as `author_member_id` plus the
@@ -273,6 +318,7 @@ const LINKEDIN_POST_AUTHOR_ATTRIBUTIONS: EventAttributionRule[] = [
273
318
  },
274
319
  },
275
320
  },
321
+ LINKEDIN_COMPANY_AUTHOR_ATTRIBUTION,
276
322
  ];
277
323
 
278
324
  /**
@@ -304,12 +350,14 @@ const LINKEDIN_HOME_FEED_ATTRIBUTIONS: EventAttributionRule[] = [
304
350
  },
305
351
  },
306
352
  },
353
+ LINKEDIN_COMPANY_AUTHOR_ATTRIBUTION,
307
354
  {
308
355
  name: "engager",
309
356
  role: "performed_by",
310
357
  autoCreate: true,
311
358
  target: {
312
359
  entityType: "person",
360
+ createWhen: CREATE_ENGAGER_PEOPLE_GATE,
313
361
  titlePath: "metadata.social_actor",
314
362
  identities: [
315
363
  {
@@ -335,6 +383,7 @@ const LINKEDIN_HOME_COMMENT_ATTRIBUTIONS: EventAttributionRule[] = [
335
383
  autoCreate: true,
336
384
  target: {
337
385
  entityType: "person",
386
+ createWhen: CREATE_ENGAGER_PEOPLE_GATE,
338
387
  titlePath: "author_name",
339
388
  identities: [
340
389
  {
@@ -377,6 +426,7 @@ const LINKEDIN_HOME_COMMENT_ATTRIBUTIONS: EventAttributionRule[] = [
377
426
  autoCreate: true,
378
427
  target: {
379
428
  entityType: "person",
429
+ createWhen: CREATE_ENGAGER_PEOPLE_GATE,
380
430
  titlePath: "metadata.parent_comment_author",
381
431
  identities: [
382
432
  {
@@ -1168,6 +1218,10 @@ export function homeFeedObjectAllSupported(rows: HomeFeedRow[]): boolean {
1168
1218
  return withLinks.some((r) => Array.isArray(r.links));
1169
1219
  }
1170
1220
 
1221
+ function companyPageUrl(slug: string): string {
1222
+ return `https://www.linkedin.com/company/${slug}`;
1223
+ }
1224
+
1171
1225
  /** Whether an href points at a `/company/` page rather than a member. */
1172
1226
  function isCompanyHref(href?: string): boolean {
1173
1227
  return /\/company\//i.test(href ?? "");
@@ -1204,6 +1258,32 @@ function resolveMemberSlug(
1204
1258
  return [...memberSlugs][0];
1205
1259
  }
1206
1260
 
1261
+ /**
1262
+ * Resolve a company author's `/company/<slug>` the same way: the target name
1263
+ * must match exactly one company page and no member, so a same-named person
1264
+ * (or two same-named pages) leaves the author unattributed rather than guessed.
1265
+ */
1266
+ function resolveCompanySlug(
1267
+ links: HomeFeedLink[],
1268
+ targetName: string
1269
+ ): string | undefined {
1270
+ const target = nameKey(targetName);
1271
+ if (!target) return undefined;
1272
+ const companySlugs = new Set<string>();
1273
+ let memberMatch = false;
1274
+ for (const link of links) {
1275
+ if (nameKey(linkDisplayName(link)) !== target) continue;
1276
+ if (normalizeLinkedInSlug(link.href)) {
1277
+ memberMatch = true;
1278
+ continue;
1279
+ }
1280
+ const slug = normalizeLinkedInCompanySlug(link.href);
1281
+ if (slug) companySlugs.add(slug);
1282
+ }
1283
+ if (memberMatch || companySlugs.size !== 1) return undefined;
1284
+ return [...companySlugs][0];
1285
+ }
1286
+
1207
1287
  /**
1208
1288
  * The home feed mixes in ads, suggestions, and non-post noise. These never
1209
1289
  * become useful events, so drop them before emitting. Heuristic by necessity —
@@ -1249,6 +1329,8 @@ interface HomeFeedCommentIdentity {
1249
1329
  interface HomeFeedRowContext {
1250
1330
  author: string;
1251
1331
  authorSlug?: string;
1332
+ /** Set when the row's author is a company page rather than a member. */
1333
+ authorCompanySlug?: string;
1252
1334
  postUrl?: string;
1253
1335
  metadata: Record<string, unknown>;
1254
1336
  }
@@ -1508,6 +1590,9 @@ function buildHomeFeedRowContext(row: HomeFeedRow): HomeFeedRowContext {
1508
1590
  const links = normalizeHomeFeedLinks(row.links);
1509
1591
  const engagement = banner?.kind === "actor" ? banner : null;
1510
1592
  const authorSlug = resolveMemberSlug(links, author);
1593
+ const authorCompanySlug = authorSlug
1594
+ ? undefined
1595
+ : resolveCompanySlug(links, author);
1511
1596
  const engagerSlug = engagement
1512
1597
  ? resolveMemberSlug(links, engagement.actor)
1513
1598
  : undefined;
@@ -1544,6 +1629,7 @@ function buildHomeFeedRowContext(row: HomeFeedRow): HomeFeedRowContext {
1544
1629
  return {
1545
1630
  author,
1546
1631
  authorSlug,
1632
+ ...(authorCompanySlug ? { authorCompanySlug } : {}),
1547
1633
  postUrl: postUrl || undefined,
1548
1634
  metadata,
1549
1635
  };
@@ -1712,7 +1798,15 @@ export function buildHomeFeedEvents(
1712
1798
  // source_url is the durable post handle action callers (prepare_comment)
1713
1799
  // resolve directly.
1714
1800
  ...(sourceUrl ? { source_url: sourceUrl } : {}),
1715
- metadata: context.metadata,
1801
+ // A company author belongs to the post only: comment rows share the row
1802
+ // context, but their author is always the commenter.
1803
+ metadata: context.authorCompanySlug
1804
+ ? {
1805
+ ...context.metadata,
1806
+ author_company_slug: context.authorCompanySlug,
1807
+ author_company_url: companyPageUrl(context.authorCompanySlug),
1808
+ }
1809
+ : context.metadata,
1716
1810
  });
1717
1811
  }
1718
1812
  return events;
@@ -2613,6 +2707,12 @@ export function parseCompanyUpdates(
2613
2707
  // normalizeLinkedInSlug pulls the `/in/<slug>` segment from a full URL (and
2614
2708
  // returns null for a company `/company/…` URL or anything slug-invalid).
2615
2709
  const authorSlug = normalizeLinkedInSlug(authorProfileUrl);
2710
+ // A company actor navigates to its `/company/<slug>` page. Require the
2711
+ // `/company/` path: a bare publicIdentifier is a member's vanity slug.
2712
+ const authorCompanySlug =
2713
+ !authorMemberId && !authorSlug && isCompanyHref(authorProfileUrl)
2714
+ ? normalizeLinkedInCompanySlug(authorProfileUrl)
2715
+ : null;
2616
2716
 
2617
2717
  // Get social counts
2618
2718
  const socialRef = el["*socialDetail"] ?? el.socialDetail;
@@ -2640,6 +2740,7 @@ export function parseCompanyUpdates(
2640
2740
  authorHeadline: typeof authorDesc === "string" ? authorDesc : undefined,
2641
2741
  authorMemberId: authorMemberId || undefined,
2642
2742
  authorSlug: authorSlug ?? undefined,
2743
+ authorCompanySlug: authorCompanySlug ?? undefined,
2643
2744
  likes: counts.numLikes ?? 0,
2644
2745
  comments: counts.numComments ?? 0,
2645
2746
  shares: counts.numShares ?? 0,
@@ -2737,6 +2838,12 @@ const homeFeedConfigSchema = {
2737
2838
  description:
2738
2839
  "Optional lower bound. When set below max_scrolls, each sync picks a uniform random scroll count in [min_scrolls, max_scrolls].",
2739
2840
  },
2841
+ create_engager_people: {
2842
+ type: "boolean",
2843
+ default: true,
2844
+ description:
2845
+ "Create a new person for each member who reacted to, commented on, or was replied to on a feed post (default: true). When off, those members are still linked to people that already exist, but no new people are created for them. Post authors are always created.",
2846
+ },
2740
2847
  },
2741
2848
  };
2742
2849
 
@@ -3072,6 +3179,17 @@ export default class LinkedInConnector extends ConnectorRuntime<
3072
3179
  author: { type: "string" },
3073
3180
  author_linkedin_slug: { type: "string" },
3074
3181
  author_profile_url: { type: "string" },
3182
+ author_company_slug: {
3183
+ type: "string",
3184
+ description:
3185
+ "The `/company/<slug>` of the company page that wrote the post, when the author is a company.",
3186
+ },
3187
+ author_company_url: { type: "string" },
3188
+ create_engager_people: {
3189
+ type: "boolean",
3190
+ description:
3191
+ "The connection's create_engager_people setting when the post was read.",
3192
+ },
3075
3193
  social_actor: {
3076
3194
  type: "string",
3077
3195
  description:
@@ -3114,6 +3232,11 @@ export default class LinkedInConnector extends ConnectorRuntime<
3114
3232
  parent_comment_author_linkedin_slug: { type: "string" },
3115
3233
  parent_comment_author_profile_url: { type: "string" },
3116
3234
  is_reply: { type: "boolean" },
3235
+ create_engager_people: {
3236
+ type: "boolean",
3237
+ description:
3238
+ "The connection's create_engager_people setting when the comment was read.",
3239
+ },
3117
3240
  reactions: { type: "number" },
3118
3241
  comments: { type: "number" },
3119
3242
  reposts: { type: "number" },
@@ -3138,6 +3261,12 @@ export default class LinkedInConnector extends ConnectorRuntime<
3138
3261
  author_headline: { type: "string" },
3139
3262
  author_member_id: { type: "string" },
3140
3263
  author_linkedin_slug: { type: "string" },
3264
+ author_company_slug: {
3265
+ type: "string",
3266
+ description:
3267
+ "The `/company/<slug>` of the company page that wrote the post, when the author is a company.",
3268
+ },
3269
+ author_company_url: { type: "string" },
3141
3270
  likes: { type: "number" },
3142
3271
  comments: { type: "number" },
3143
3272
  shares: { type: "number" },
@@ -3747,7 +3876,12 @@ export default class LinkedInConnector extends ConnectorRuntime<
3747
3876
  // company_url — it always reads LINKEDIN_HOME_URL.
3748
3877
  if (feedKey === "home_feed") {
3749
3878
  const homeScrolls = readHomeScrollBudget(config);
3750
- return this.syncHomeFeed(homeScrolls, checkpoint, requireBrowser(ctx));
3879
+ return this.syncHomeFeed(
3880
+ homeScrolls,
3881
+ config.create_engager_people !== false,
3882
+ checkpoint,
3883
+ requireBrowser(ctx)
3884
+ );
3751
3885
  }
3752
3886
 
3753
3887
  if (!config.company_url) {
@@ -3778,6 +3912,7 @@ export default class LinkedInConnector extends ConnectorRuntime<
3778
3912
  */
3779
3913
  private async syncHomeFeed(
3780
3914
  maxScrolls: number,
3915
+ createEngagerPeople: boolean,
3781
3916
  checkpoint: LinkedInCheckpoint,
3782
3917
  dispatcher: ChromeActionDispatcher
3783
3918
  ): Promise<LinkedInSyncPage> {
@@ -3827,7 +3962,17 @@ export default class LinkedInConnector extends ConnectorRuntime<
3827
3962
 
3828
3963
  const commentCoverage = summarizeHomeFeedCommentCoverage(resolvedRows);
3829
3964
 
3830
- const events = buildHomeFeedEvents(resolvedRows, new Date());
3965
+ // Stamp the connection's engager setting on every event so the engager,
3966
+ // commenter, and replied-to rules can gate person creation on it.
3967
+ const events = buildHomeFeedEvents(resolvedRows, new Date()).map(
3968
+ (event) => ({
3969
+ ...event,
3970
+ metadata: {
3971
+ ...event.metadata,
3972
+ create_engager_people: createEngagerPeople,
3973
+ },
3974
+ })
3975
+ );
3831
3976
  if (events.length === 0) {
3832
3977
  throw new Error(
3833
3978
  "LinkedIn is logged in and returned feed rows, but no row combined usable content with a durable identity. Confirm that the paired browser is signed into LinkedIn and retry."
@@ -3908,6 +4053,12 @@ export default class LinkedInConnector extends ConnectorRuntime<
3908
4053
  // Voyager exposed the actor's fsd_profile urn; slug bridges to takeout.
3909
4054
  author_member_id: post.authorMemberId,
3910
4055
  author_linkedin_slug: post.authorSlug,
4056
+ ...(post.authorCompanySlug
4057
+ ? {
4058
+ author_company_slug: post.authorCompanySlug,
4059
+ author_company_url: companyPageUrl(post.authorCompanySlug),
4060
+ }
4061
+ : {}),
3911
4062
  likes: post.likes,
3912
4063
  comments: post.comments,
3913
4064
  shares: post.shares,