@lobu/runtime-server 24.4.0 → 24.5.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 (279) hide show
  1. package/dist/catalogs/skills.json +2 -2
  2. package/dist/component.json +1 -1
  3. package/dist/connectors/postgres.ts +77 -48
  4. package/dist/dependencies.bun.lock +86 -117
  5. package/dist/owletto/dist/assets/_-CCWuGXtQ.js +2 -0
  6. package/dist/owletto/dist/assets/_-DOJW1D-I.js +3 -0
  7. package/dist/owletto/dist/assets/_agentId-CJhQbi6k.js +2 -0
  8. package/dist/owletto/dist/assets/_agentId-DD4K1i6V.js +2 -0
  9. package/dist/owletto/dist/assets/_automationId-Cbd7B0mP.js +2 -0
  10. package/dist/owletto/dist/assets/_connectorKey._connectionId-DFpPep9B.js +2 -0
  11. package/dist/owletto/dist/assets/_connectorKey.index-n3iSDT74.js +2 -0
  12. package/dist/owletto/dist/assets/_conversationId-B1yGIGA9.js +2 -0
  13. package/dist/owletto/dist/assets/_eventId-B1H0-vD7.js +2 -0
  14. package/dist/owletto/dist/assets/_name-D30_V03t.js +2 -0
  15. package/dist/owletto/dist/assets/_owner-Be8O41u8.js +3 -0
  16. package/dist/owletto/dist/assets/_shape-C6YbloRh.js +2 -0
  17. package/dist/owletto/dist/assets/_skillKey-BMPvvoOI.js +2 -0
  18. package/dist/owletto/dist/assets/_slug-Bc4YIEA2.js +2 -0
  19. package/dist/owletto/dist/assets/_view-aoFDwEld.js +2 -0
  20. package/dist/owletto/dist/assets/_viewKey-DuNHc3cc.js +2 -0
  21. package/dist/owletto/dist/assets/_viewKey-rJ7A1zNx.js +2 -0
  22. package/dist/owletto/dist/assets/accept-invitation-pUl-c1KQ.js +2 -0
  23. package/dist/owletto/dist/assets/activity-route-view-DN0ZEAzr.js +2 -0
  24. package/dist/owletto/dist/assets/{agent-card-controls-99mG6H5k.js → agent-card-controls-C5jNWgfq.js} +2 -2
  25. package/dist/owletto/dist/assets/{agent-client-setup-list-kMmqQSrf.js → agent-client-setup-list-DbXtJTsO.js} +2 -2
  26. package/dist/owletto/dist/assets/agent-connect-pages-DcTuiSt9.js +2 -0
  27. package/dist/owletto/dist/assets/agent-editor-form-CdA5vLr8.js +2 -0
  28. package/dist/owletto/dist/assets/agent-guardrails-route-BJyfalBY.js +2 -0
  29. package/dist/owletto/dist/assets/agent-list-row-rF5LH-3k.js +2 -0
  30. package/dist/owletto/dist/assets/{agent-loading-shells-Dnmb6W5Y.js → agent-loading-shells-ClY_O6lb.js} +2 -2
  31. package/dist/owletto/dist/assets/{agent-permissions-matrix-CbhXlbgY.js → agent-permissions-matrix-bP1Qihv7.js} +2 -2
  32. package/dist/owletto/dist/assets/{agent-skill-context-V__2i6Vl.js → agent-skill-context-BAaGpvfS.js} +2 -2
  33. package/dist/owletto/dist/assets/agent-skills-route-Bv5luNdw.js +2 -0
  34. package/dist/owletto/dist/assets/agent-tab-intro-ednTs4WF.js +2 -0
  35. package/dist/owletto/dist/assets/agent-thread-WNk2HapT.js +6 -0
  36. package/dist/owletto/dist/assets/agent-thread-storage-U6htL3ad.js +2 -0
  37. package/dist/owletto/dist/assets/agents-DY2S2SGE.js +2 -0
  38. package/dist/owletto/dist/assets/agents-workbench-bPTjdVS1.js +2 -0
  39. package/dist/owletto/dist/assets/app._appId-DrL5H5lB.js +2 -0
  40. package/dist/owletto/dist/assets/assist-composer-ClfFEVx7.js +2 -0
  41. package/dist/owletto/dist/assets/automation-detail-content-dFy1Huas.js +2 -0
  42. package/dist/owletto/dist/assets/automation-row-DCHM--aD.js +2 -0
  43. package/dist/owletto/dist/assets/automations-DY2S2SGE.js +2 -0
  44. package/dist/owletto/dist/assets/{calendar-DMq3Dtqy.js → calendar-Ck0yOLYu.js} +2 -2
  45. package/dist/owletto/dist/assets/{callback-B-CAz-bK.js → callback-DRABUOha.js} +2 -2
  46. package/dist/owletto/dist/assets/{card-SFtxv9f2.js → card-Bdi7VEwo.js} +2 -2
  47. package/dist/owletto/dist/assets/change-summary-PBoM6Asb.js +2 -0
  48. package/dist/owletto/dist/assets/{claim-DrxIRWKt.js → claim-CUIG1Oc-.js} +2 -2
  49. package/dist/owletto/dist/assets/{client-activity-scopes-boZOHuPW.js → client-activity-scopes-CXOWB5co.js} +2 -2
  50. package/dist/owletto/dist/assets/{client-rows-BJ2PxM4J.js → client-rows-36VnmgMK.js} +2 -2
  51. package/dist/owletto/dist/assets/{clients-C7Lnuc3S.js → clients-BJRcMk1A.js} +2 -2
  52. package/dist/owletto/dist/assets/code-editor-DNuRKde1.js +16 -0
  53. package/dist/owletto/dist/assets/connect-CMcEQWls.js +2 -0
  54. package/dist/owletto/dist/assets/connect-menu-C-B-1xGR.js +2 -0
  55. package/dist/owletto/dist/assets/connect._clientId-tGipxP5a.js +2 -0
  56. package/dist/owletto/dist/assets/connected._clientId-DSGU78eV.js +2 -0
  57. package/dist/owletto/dist/assets/connected._clientId.activity-CPLbry8R.js +2 -0
  58. package/dist/owletto/dist/assets/connected._clientId.index-jSnGvzYs.js +2 -0
  59. package/dist/owletto/dist/assets/{connection-feed-detail-D7pnWaFB.js → connection-feed-detail-BIlkK0Pd.js} +2 -2
  60. package/dist/owletto/dist/assets/connection-q1bdnxCN.js +2 -0
  61. package/dist/owletto/dist/assets/{connections-browser-DDJQh8Na.js → connections-browser-V-3td9DB.js} +2 -2
  62. package/dist/owletto/dist/assets/{connector-boxes-DDX7Ebc4.js → connector-boxes-lFc-WP83.js} +2 -2
  63. package/dist/owletto/dist/assets/connector-page-shell-Cs1SjrYB.js +2 -0
  64. package/dist/owletto/dist/assets/connector-provenance-aJFeeRIC.js +2 -0
  65. package/dist/owletto/dist/assets/{connector-scope-lists-BibdzKl1.js → connector-scope-lists--vNdbOn0.js} +2 -2
  66. package/dist/owletto/dist/assets/connectors-BsvDMdsQ.js +2 -0
  67. package/dist/owletto/dist/assets/consent-DJV78pnz.js +2 -0
  68. package/dist/owletto/dist/assets/copy-button-DjMWgrBf.js +2 -0
  69. package/dist/owletto/dist/assets/{core.esm-CHnfRiEM.js → core.esm-CQzL3ObT.js} +3 -3
  70. package/dist/owletto/dist/assets/create-BmKx5vq3.js +2 -0
  71. package/dist/owletto/dist/assets/create-Rt0RbiD4.js +2 -0
  72. package/dist/owletto/dist/assets/create-automation-form-PEmSLMD6.js +3 -0
  73. package/dist/owletto/dist/assets/create-jBEuveV1.js +2 -0
  74. package/dist/owletto/dist/assets/create._connectorKey-DcxhYIYC.js +2 -0
  75. package/dist/owletto/dist/assets/device-Ba3RsIgb.js +2 -0
  76. package/dist/owletto/dist/assets/device-pin-tombstone-C79KIAIK.js +2 -0
  77. package/dist/owletto/dist/assets/device._deviceId-CIaoq9co.js +2 -0
  78. package/dist/owletto/dist/assets/{entity-avatar-HloBoalJ.js → entity-avatar-TVKjZxWQ.js} +2 -2
  79. package/dist/owletto/dist/assets/entity-options-daOOQo7O.js +2 -0
  80. package/dist/owletto/dist/assets/entity-page-BfJXvbxn.js +2 -0
  81. package/dist/owletto/dist/assets/entity-type-page-BLwH6qa7.js +2 -0
  82. package/dist/owletto/dist/assets/event-card-DVUB8my6.js +2 -0
  83. package/dist/owletto/dist/assets/event-detail-DkY95e5b.js +2 -0
  84. package/dist/owletto/dist/assets/{events-feed-BysC9HgU.js → events-feed-B9CZHI_P.js} +2 -2
  85. package/dist/owletto/dist/assets/filter-bar-wPaR12SS.js +2 -0
  86. package/dist/owletto/dist/assets/{full-page-spinner-BMiXl54z.js → full-page-spinner-BqmckkOf.js} +2 -2
  87. package/dist/owletto/dist/assets/guardrails-Csusrok2.js +2 -0
  88. package/dist/owletto/dist/assets/identity-Dmg3STO8.js +2 -0
  89. package/dist/owletto/dist/assets/index--ZWegctR.js +2 -0
  90. package/dist/owletto/dist/assets/{index-CzoK57xp.js → index-B0kw2lFL.js} +2 -2
  91. package/dist/owletto/dist/assets/index-BKrdVwW9.js +2 -0
  92. package/dist/owletto/dist/assets/index-BUBcNNUY.js +2 -0
  93. package/dist/owletto/dist/assets/index-BUDr4-Yv.js +2 -0
  94. package/dist/owletto/dist/assets/index-BYPQWVwD.js +2 -0
  95. package/dist/owletto/dist/assets/index-BfpaPJPj.js +2 -0
  96. package/dist/owletto/dist/assets/index-BicNFLBW.js +2 -0
  97. package/dist/owletto/dist/assets/index-Bsdv5aks.js +2 -0
  98. package/dist/owletto/dist/assets/index-C186T2Rw.js +53 -0
  99. package/dist/owletto/dist/assets/index-CX0pJ9j9.js +2 -0
  100. package/dist/owletto/dist/assets/{index-B4wXJwQY.js → index-CsrT07TJ.js} +2 -2
  101. package/dist/owletto/dist/assets/index-DdBTTN3y.js +7899 -0
  102. package/dist/owletto/dist/assets/index-DdYWarql.css +1 -0
  103. package/dist/owletto/dist/assets/index-JYEIN8nM.js +2 -0
  104. package/dist/owletto/dist/assets/index-Vcq4gwWv.js +2 -0
  105. package/dist/owletto/dist/assets/{index-C-WaHj1Y.js → index-ijqrJaRB.js} +2 -2
  106. package/dist/owletto/dist/assets/{index-D4-uel59.js → index-ikp_mTsf.js} +2 -2
  107. package/dist/owletto/dist/assets/json-diff-BaLL4Fsu.js +14 -0
  108. package/dist/owletto/dist/assets/{list-skeleton-Bp4HNgJ9.js → list-skeleton-CXDLkYTg.js} +2 -2
  109. package/dist/owletto/dist/assets/login-u6LCgDYG.js +2 -0
  110. package/dist/owletto/dist/assets/{logout-DxmfsVKD.js → logout-JhmuWJEH.js} +2 -2
  111. package/dist/owletto/dist/assets/manage-gear-D8LMhehh.js +2 -0
  112. package/dist/owletto/dist/assets/{member-scope-gate-vp3FihBD.js → member-scope-gate-4FQ0aanZ.js} +2 -2
  113. package/dist/owletto/dist/assets/memory-browse-page-CNZJbCJC.js +74 -0
  114. package/dist/owletto/dist/assets/model-jL871x2J.js +2 -0
  115. package/dist/owletto/dist/assets/model-selector-CgU8SJMF.js +2 -0
  116. package/dist/owletto/dist/assets/models-jdemgIZk.js +2 -0
  117. package/dist/owletto/dist/assets/nav-pill-DrFkuyUQ.js +2 -0
  118. package/dist/owletto/dist/assets/new-CcJOd5aH.js +2 -0
  119. package/dist/owletto/dist/assets/{new-CvX8_gIb.js → new-DgE1pVV0.js} +2 -2
  120. package/dist/owletto/dist/assets/new-OWwrYckd.js +2 -0
  121. package/dist/owletto/dist/assets/organization-CKM_oFX3.js +2 -0
  122. package/dist/owletto/dist/assets/peek-pane-content-D68BjguQ.js +2 -0
  123. package/dist/owletto/dist/assets/pending-seed-sml8Uf6e.js +2 -0
  124. package/dist/owletto/dist/assets/permissions-BvA9SATv.js +2 -0
  125. package/dist/owletto/dist/assets/{proposal-review-shell-B4CSiyLB.js → proposal-review-shell-D6KABxah.js} +2 -2
  126. package/dist/owletto/dist/assets/public-shell-ready-BIVCHQHe.js +2 -0
  127. package/dist/owletto/dist/assets/record-activity-C9gVBbF0.js +2 -0
  128. package/dist/owletto/dist/assets/{record-session-CWXnCVln.js → record-session-R-uHNuby.js} +2 -2
  129. package/dist/owletto/dist/assets/{renderer-7EGgTVX0.js → renderer-DXfJaCCa.js} +23 -23
  130. package/dist/owletto/dist/assets/{reset-password-CFUzxH7m.js → reset-password-Mx3baeNc.js} +2 -2
  131. package/dist/owletto/dist/assets/run-activity-link-CaIBSRQj.js +2 -0
  132. package/dist/owletto/dist/assets/run-initiator-BvzQJYW9.js +2 -0
  133. package/dist/owletto/dist/assets/{runs-BPtQBTRN.js → runs-fFJ1lPnw.js} +2 -2
  134. package/dist/owletto/dist/assets/runs-panel-DEnZHTa5.js +2 -0
  135. package/dist/owletto/dist/assets/runs-table-XGnxJl7S.js +2 -0
  136. package/dist/owletto/dist/assets/{schema-type-editor-panel-CAhOB648.js → schema-type-editor-panel-C0_9VcSs.js} +2 -2
  137. package/dist/owletto/dist/assets/settings-CP4PjMQA.js +2 -0
  138. package/dist/owletto/dist/assets/settings-CgaUJMHH.js +2 -0
  139. package/dist/owletto/dist/assets/skills-D-e_h3a9.js +2 -0
  140. package/dist/owletto/dist/assets/{source-record-panels-Bh5F4C5K.js → source-record-panels-Bh0n4gGw.js} +2 -2
  141. package/dist/owletto/dist/assets/{status-dot-D3FoDRcc.js → status-dot-Cpq63I7p.js} +2 -2
  142. package/dist/owletto/dist/assets/{table-DFcJRNk7.js → table-BUqshjxa.js} +2 -2
  143. package/dist/owletto/dist/assets/{use-automations-BHoV0dLs.js → use-automations-BLNjxq2K.js} +2 -2
  144. package/dist/owletto/dist/assets/use-login-redirect-CmyQW7GT.js +2 -0
  145. package/dist/owletto/dist/assets/{use-mention-search-C3rWLuKm.js → use-mention-search-dn3ws1WB.js} +3 -3
  146. package/dist/owletto/dist/assets/use-scroll-sentinel-DRyBMueA.js +2 -0
  147. package/dist/owletto/dist/assets/view-param-filters-CER47Tlz.js +2 -0
  148. package/dist/owletto/dist/assets/{views-access-required-DHrDO333.js → views-access-required-C_b9itZ2.js} +2 -2
  149. package/dist/owletto/dist/index.html +2 -2
  150. package/dist/server-main.bundle.mjs +53989 -51632
  151. package/dist/server.bundle.mjs +5 -5
  152. package/dist/verify.mjs +1 -1
  153. package/npm-shrinkwrap.json +183 -217
  154. package/package.json +3 -4
  155. package/vendor/connector-sdk/dist/reaction-client-types.d.ts +8 -2
  156. package/vendor/connector-sdk/dist/reaction-sdk.d.ts +5 -1
  157. package/vendor/connector-sdk/package.json +1 -1
  158. package/vendor/core/dist/contracts/agent-settings.d.ts +61 -6
  159. package/vendor/core/dist/contracts/agent-settings.js +10 -7
  160. package/vendor/core/dist/contracts/tools/manage-agents.d.ts +473 -98
  161. package/vendor/core/dist/contracts/tools/manage-agents.js +111 -2
  162. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +21 -18
  163. package/vendor/core/dist/contracts/tools/manage-automations.js +15 -15
  164. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +2 -2
  165. package/vendor/core/dist/contracts/tools/manage-inference-providers.d.ts +445 -0
  166. package/vendor/core/dist/contracts/tools/manage-inference-providers.js +133 -0
  167. package/vendor/core/dist/contracts/tools/manage-views.d.ts +4 -4
  168. package/vendor/core/dist/contracts/tools/manage-views.js +5 -3
  169. package/vendor/core/dist/contracts/worker/device-automation.js +4 -2
  170. package/vendor/core/dist/error-report.d.ts +73 -0
  171. package/vendor/core/dist/error-report.js +346 -0
  172. package/vendor/core/dist/index.d.ts +3 -1
  173. package/vendor/core/dist/index.js +4 -1
  174. package/vendor/core/dist/logger.js +7 -4
  175. package/vendor/core/dist/otel-fetch.d.ts +19 -0
  176. package/vendor/core/dist/otel-fetch.js +96 -0
  177. package/vendor/core/dist/otel.d.ts +9 -0
  178. package/vendor/core/dist/otel.js +28 -7
  179. package/vendor/core/dist/reserved.d.ts +1 -1
  180. package/vendor/core/dist/reserved.js +6 -4
  181. package/vendor/core/dist/tool-result.d.ts +8 -0
  182. package/vendor/core/dist/tool-result.js +61 -0
  183. package/vendor/core/dist/utils/diagnostic-scrubber.js +1 -1
  184. package/vendor/core/dist/worker/auth.js +4 -0
  185. package/vendor/core/package.json +6 -1
  186. package/vendor/views/package.json +1 -1
  187. package/dist/owletto/dist/assets/_-DIK0ae_S.js +0 -2
  188. package/dist/owletto/dist/assets/_-gTbcArpS.js +0 -3
  189. package/dist/owletto/dist/assets/_agentId-DOmcJZfk.js +0 -2
  190. package/dist/owletto/dist/assets/_agentId-DW6wRCVC.js +0 -2
  191. package/dist/owletto/dist/assets/_automationId-B9IcDYBu.js +0 -2
  192. package/dist/owletto/dist/assets/_connectorKey._connectionId-C6PmMPTA.js +0 -2
  193. package/dist/owletto/dist/assets/_connectorKey.index-BrJ8Pzze.js +0 -2
  194. package/dist/owletto/dist/assets/_conversationId-BpJAeYYW.js +0 -2
  195. package/dist/owletto/dist/assets/_eventId-DarQJo0G.js +0 -2
  196. package/dist/owletto/dist/assets/_name-DtmNTcUm.js +0 -2
  197. package/dist/owletto/dist/assets/_owner-Db8at3hk.js +0 -3
  198. package/dist/owletto/dist/assets/_shape-6iFA8A86.js +0 -2
  199. package/dist/owletto/dist/assets/_skillKey-CXkHn3Nl.js +0 -2
  200. package/dist/owletto/dist/assets/_slug-DBOuBLoX.js +0 -2
  201. package/dist/owletto/dist/assets/_viewKey-DC27aIN9.js +0 -2
  202. package/dist/owletto/dist/assets/_viewKey-DuYDieln.js +0 -2
  203. package/dist/owletto/dist/assets/accept-invitation-BbDCVvur.js +0 -2
  204. package/dist/owletto/dist/assets/activity-route-view-V4ftmSN7.js +0 -2
  205. package/dist/owletto/dist/assets/agent-connect-pages-B-NPTFs6.js +0 -2
  206. package/dist/owletto/dist/assets/agent-editor-form-DfMTSIvj.js +0 -2
  207. package/dist/owletto/dist/assets/agent-guardrails-route-BvGgfd-h.js +0 -2
  208. package/dist/owletto/dist/assets/agent-skills-route-DFXr_bHp.js +0 -2
  209. package/dist/owletto/dist/assets/agent-subpage-shell-DWzljvFb.js +0 -2
  210. package/dist/owletto/dist/assets/agent-thread-DQIr20H-.js +0 -6
  211. package/dist/owletto/dist/assets/agents-CLbeiqTR.js +0 -2
  212. package/dist/owletto/dist/assets/agents-workbench-C8bTa2rv.js +0 -2
  213. package/dist/owletto/dist/assets/app._appId-Bsq40nak.js +0 -2
  214. package/dist/owletto/dist/assets/automation-detail-content-C9Cgr5Zj.js +0 -2
  215. package/dist/owletto/dist/assets/automations-CLbeiqTR.js +0 -2
  216. package/dist/owletto/dist/assets/code-editor-rX0t1g5C.js +0 -16
  217. package/dist/owletto/dist/assets/connect-BcwgytDV.js +0 -2
  218. package/dist/owletto/dist/assets/connect-menu-BF-AlunU.js +0 -2
  219. package/dist/owletto/dist/assets/connect._clientId-sDypRDeN.js +0 -2
  220. package/dist/owletto/dist/assets/connected._clientId-C9OkW1tv.js +0 -2
  221. package/dist/owletto/dist/assets/connected._clientId.activity-Dc6HYr55.js +0 -2
  222. package/dist/owletto/dist/assets/connected._clientId.index-C6qbqgwF.js +0 -2
  223. package/dist/owletto/dist/assets/connection-88YzIBK9.js +0 -2
  224. package/dist/owletto/dist/assets/connector-provenance-Th8ymGec.js +0 -2
  225. package/dist/owletto/dist/assets/connectors-BqwgLUUK.js +0 -2
  226. package/dist/owletto/dist/assets/consent-BR5U7dwb.js +0 -2
  227. package/dist/owletto/dist/assets/copy-button-2swYh4jb.js +0 -2
  228. package/dist/owletto/dist/assets/create-BsPVnRpG.js +0 -2
  229. package/dist/owletto/dist/assets/create-CVPYVOR5.js +0 -2
  230. package/dist/owletto/dist/assets/create-QFjmhOEU.js +0 -2
  231. package/dist/owletto/dist/assets/create-automation-form-DmCOFbRT.js +0 -3
  232. package/dist/owletto/dist/assets/create._connectorKey-DLDDVtLS.js +0 -2
  233. package/dist/owletto/dist/assets/cronstrue-CKwjNYgj.js +0 -2
  234. package/dist/owletto/dist/assets/device-CKup7kvB.js +0 -2
  235. package/dist/owletto/dist/assets/device-pin-tombstone-xGhCTU5_.js +0 -2
  236. package/dist/owletto/dist/assets/device._deviceId-B1H_ivDT.js +0 -2
  237. package/dist/owletto/dist/assets/entity-options-BSW_EG0W.js +0 -2
  238. package/dist/owletto/dist/assets/entity-page-D-WDWrAe.js +0 -2
  239. package/dist/owletto/dist/assets/entity-type-page-BCBdFndu.js +0 -2
  240. package/dist/owletto/dist/assets/event-card-Mcxv56DG.js +0 -2
  241. package/dist/owletto/dist/assets/event-detail-DXifj49J.js +0 -2
  242. package/dist/owletto/dist/assets/filter-bar-BQm-ubB1.js +0 -2
  243. package/dist/owletto/dist/assets/guardrails-D7W80sJO.js +0 -2
  244. package/dist/owletto/dist/assets/identity-N0cAO9BR.js +0 -2
  245. package/dist/owletto/dist/assets/index-4gCDI7m4.js +0 -7950
  246. package/dist/owletto/dist/assets/index-BNaI5GpS.js +0 -2
  247. package/dist/owletto/dist/assets/index-BUUrHuJJ.js +0 -2
  248. package/dist/owletto/dist/assets/index-BqrvJmLh.js +0 -2
  249. package/dist/owletto/dist/assets/index-CnvQEA5V.js +0 -2
  250. package/dist/owletto/dist/assets/index-Cq7P2c_E.js +0 -2
  251. package/dist/owletto/dist/assets/index-D3omC3Us.js +0 -2
  252. package/dist/owletto/dist/assets/index-DDGdlQrt.css +0 -1
  253. package/dist/owletto/dist/assets/index-DFEW7hMg.js +0 -2
  254. package/dist/owletto/dist/assets/index-DVV-WWuT.js +0 -2
  255. package/dist/owletto/dist/assets/index-DduQ_e9q.js +0 -2
  256. package/dist/owletto/dist/assets/index-DutlI1d-.js +0 -2
  257. package/dist/owletto/dist/assets/index-wHFQv1aT.js +0 -12
  258. package/dist/owletto/dist/assets/json-diff-E5D-NGYT.js +0 -4
  259. package/dist/owletto/dist/assets/login-7F48UJGx.js +0 -2
  260. package/dist/owletto/dist/assets/memory-browse-page-CfDmjhDl.js +0 -74
  261. package/dist/owletto/dist/assets/model-Dn40BUzs.js +0 -2
  262. package/dist/owletto/dist/assets/model-selector-88PJnyTq.js +0 -2
  263. package/dist/owletto/dist/assets/models-BBK_n2RP.js +0 -2
  264. package/dist/owletto/dist/assets/new-4ruWHLR5.js +0 -2
  265. package/dist/owletto/dist/assets/new-gMD1PHTL.js +0 -2
  266. package/dist/owletto/dist/assets/oauth-workspace-access-D9BNmyMY.js +0 -2
  267. package/dist/owletto/dist/assets/organization-BHcp5Pzg.js +0 -2
  268. package/dist/owletto/dist/assets/peek-pane-content-0sa10jER.js +0 -2
  269. package/dist/owletto/dist/assets/permissions-hhxosugv.js +0 -2
  270. package/dist/owletto/dist/assets/public-shell-ready-CsenJeXa.js +0 -2
  271. package/dist/owletto/dist/assets/record-activity-D7bRaMk2.js +0 -2
  272. package/dist/owletto/dist/assets/runs-panel-Bj63_hb9.js +0 -2
  273. package/dist/owletto/dist/assets/settings-Dg6nxKyw.js +0 -2
  274. package/dist/owletto/dist/assets/settings-KJJ6WihO.js +0 -2
  275. package/dist/owletto/dist/assets/skills-ayt06_o2.js +0 -2
  276. package/dist/owletto/dist/assets/use-scroll-sentinel-Ct-jt7O0.js +0 -2
  277. package/dist/owletto/dist/assets/view-param-filters-mKoqDsaD.js +0 -2
  278. /package/vendor/@better-auth-kysely-adapter/{.bun-tag-abf95749a412716 → .bun-tag-654b3a002b271269} +0 -0
  279. /package/vendor/postgres/{.bun-tag-22d644c2873790db → .bun-tag-c81dacd34e959a7a} +0 -0
@@ -119,9 +119,11 @@ exports.ViewRowSchema = typebox_1.Type.Object({
119
119
  attach: typebox_1.Type.Array(exports.ViewAttachmentSchema),
120
120
  params: typebox_1.Type.Record(typebox_1.Type.String(), exports.ViewParamDeclSchema),
121
121
  actions: typebox_1.Type.Record(typebox_1.Type.String(), exports.ViewActionDeclSchema),
122
- last_writer: typebox_1.Type.String({
123
- description: "apply:<apply_id> | <user_id> | migration:view-templates",
124
- }),
122
+ // Optional because a reader outside the workspace (a public workspace's
123
+ // visitor) gets the list without anyone's user id in it.
124
+ last_writer: typebox_1.Type.Optional(typebox_1.Type.String({
125
+ description: "apply:<apply_id> | <user_id> | migration:view-templates. Omitted for readers outside the workspace.",
126
+ })),
125
127
  updated_at: typebox_1.Type.String(),
126
128
  compiled_bytes: typebox_1.Type.Integer(),
127
129
  source_bytes: typebox_1.Type.Integer(),
@@ -45,14 +45,16 @@ exports.DEVICE_AGENT_SPECS = [
45
45
  binaryName: "claude",
46
46
  promptDelivery: { kind: "flag", flag: "-p" },
47
47
  // Automation runs have a narrow completion contract; do not merge in the
48
- // user's global MCP config, and pre-approve exactly the two completion tools.
48
+ // user's global MCP config, and pre-approve only read-only SDK discovery
49
+ // plus the two completion tools. Keep in sync with the Claude Code ACP
50
+ // adapter's allowedTools in connector-worker's mac-device-daemon.
49
51
  mcpDelivery: {
50
52
  kind: "claude-config-file",
51
53
  flag: "--mcp-config",
52
54
  extraArgs: [
53
55
  "--strict-mcp-config",
54
56
  "--allowedTools",
55
- "mcp__lobu__query_sdk,mcp__lobu__run_sdk",
57
+ "mcp__lobu__search_sdk,mcp__lobu__query_sdk,mcp__lobu__run_sdk",
56
58
  ],
57
59
  },
58
60
  headlessArgs: [],
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Error grouping for telemetry: one function decides which issue a failure
3
+ * belongs to, for spans and log records alike.
4
+ *
5
+ * The fingerprint follows Sentry's grouping rules: hash the parts that identify
6
+ * the defect and none that vary per occurrence. A stack groups by the names of
7
+ * its in-app functions, never by line numbers, which move on every deploy. A
8
+ * failure without a usable stack groups by where it was reported and its
9
+ * message after every identifier, number and quoted value is replaced by a
10
+ * placeholder, so one defect affecting many users or rows stays one issue.
11
+ *
12
+ * Raw messages can carry credentials or source data, so the report keeps only
13
+ * the parameterized message and the stack's frame locations. Both pass through
14
+ * the diagnostic scrubber first.
15
+ */
16
+ /** Bump when grouping changes, so old and new fingerprints are never compared. */
17
+ export declare const ERROR_GROUPING_VERSION = 1;
18
+ /**
19
+ * Who has to act: `user` is an expected rejection of the caller's input or
20
+ * access, `dependency` is a provider or upstream failing, `system` is ours.
21
+ */
22
+ export type ErrorKind = "system" | "user" | "dependency";
23
+ export interface StackFrame {
24
+ function: string | null;
25
+ file: string;
26
+ line: number | null;
27
+ column: number | null;
28
+ inApp: boolean;
29
+ }
30
+ export interface ErrorReport {
31
+ type: string;
32
+ code: string | null;
33
+ kind: ErrorKind;
34
+ /** Parameterized and scrubbed; safe to store. */
35
+ message: string;
36
+ /** Frame locations only, one per line; no message text. */
37
+ stacktrace: string;
38
+ fingerprint: string;
39
+ /** The exact string that was hashed, for explaining a grouping decision. */
40
+ grouping: string;
41
+ }
42
+ /** Replace every per-occurrence value in a message with a named placeholder. */
43
+ export declare function parameterizeMessage(text: string): string;
44
+ /** Parse a V8/Bun stack into frames, outermost last. Message lines are skipped. */
45
+ export declare function parseStackFrames(stack: string): StackFrame[];
46
+ /** Derive the kind from structure only: a code or an HTTP status, never prose. */
47
+ export declare function classifyErrorKind(code: string | null, httpStatus: number | null): ErrorKind;
48
+ export interface DescribeErrorOptions {
49
+ /**
50
+ * Where the failure was reported, e.g. `tool query_sql` or a logger's
51
+ * service. Groups failures that carry no usable stack.
52
+ */
53
+ scope: string;
54
+ /** Overrides the derived kind when the boundary knows better. */
55
+ kind?: ErrorKind;
56
+ }
57
+ /** Build the stored report and fingerprint for a thrown value or error-shaped object. */
58
+ export declare function describeError(error: unknown, options: DescribeErrorOptions): ErrorReport;
59
+ /** Span attributes for a report, using OpenTelemetry's exception conventions. */
60
+ export declare function errorReportAttributes(report: ErrorReport): Record<string, string>;
61
+ /**
62
+ * Stamp an error-level log record with its issue fingerprint. Both server
63
+ * loggers call this on the final record, so a failure logged through either
64
+ * groups the same way as the span that recorded it.
65
+ */
66
+ export declare function annotateErrorLogRecord(record: Record<string, unknown>): void;
67
+ /**
68
+ * The log-record fields for one report: the same safe fields a span carries,
69
+ * so a consumer of the log never needs the raw message to title or explain
70
+ * the issue. A writer that stamps these keeps them through the annotator.
71
+ */
72
+ export declare function errorReportLogFields(report: ErrorReport): Record<string, string>;
73
+ //# sourceMappingURL=error-report.d.ts.map
@@ -0,0 +1,346 @@
1
+ "use strict";
2
+ /**
3
+ * Error grouping for telemetry: one function decides which issue a failure
4
+ * belongs to, for spans and log records alike.
5
+ *
6
+ * The fingerprint follows Sentry's grouping rules: hash the parts that identify
7
+ * the defect and none that vary per occurrence. A stack groups by the names of
8
+ * its in-app functions, never by line numbers, which move on every deploy. A
9
+ * failure without a usable stack groups by where it was reported and its
10
+ * message after every identifier, number and quoted value is replaced by a
11
+ * placeholder, so one defect affecting many users or rows stays one issue.
12
+ *
13
+ * Raw messages can carry credentials or source data, so the report keeps only
14
+ * the parameterized message and the stack's frame locations. Both pass through
15
+ * the diagnostic scrubber first.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ERROR_GROUPING_VERSION = void 0;
19
+ exports.parameterizeMessage = parameterizeMessage;
20
+ exports.parseStackFrames = parseStackFrames;
21
+ exports.classifyErrorKind = classifyErrorKind;
22
+ exports.describeError = describeError;
23
+ exports.errorReportAttributes = errorReportAttributes;
24
+ exports.annotateErrorLogRecord = annotateErrorLogRecord;
25
+ exports.errorReportLogFields = errorReportLogFields;
26
+ const node_crypto_1 = require("node:crypto");
27
+ const diagnostic_scrubber_1 = require("./utils/diagnostic-scrubber");
28
+ /** Bump when grouping changes, so old and new fingerprints are never compared. */
29
+ exports.ERROR_GROUPING_VERSION = 1;
30
+ const MAX_MESSAGE_INPUT = 8192;
31
+ const MAX_MESSAGE_OUTPUT = 300;
32
+ const MAX_STACK_FRAMES = 30;
33
+ /**
34
+ * A stack starts with the error's message, which can hold untrusted text of
35
+ * any size. The frame patterns backtrack, so only a bounded prefix is read and
36
+ * any line longer than a real frame is skipped before a pattern touches it.
37
+ */
38
+ const MAX_STACK_INPUT = 64 * 1024;
39
+ const MAX_STACK_LINES = 200;
40
+ const MAX_FRAME_LINE = 512;
41
+ const GROUPING_FRAMES = 3;
42
+ /**
43
+ * Ordered like Sentry's parameterizer (`grouping/parameterization.py`): the
44
+ * more specific shapes run first so a URL is not half-eaten by the number rule.
45
+ */
46
+ const PARAMETERS = [
47
+ // An HTTP credential in free text: the scrubber only knows keyed values.
48
+ ["token", /\b(?:bearer|basic)\s+[\w.~+/-]+=*/gi],
49
+ ["email", /[\w.+-]+@[\w-]+(?:\.[\w-]+)+/g],
50
+ ["url", /\b[a-z][a-z0-9+.-]*:\/\/[^\s"'<>]+/gi],
51
+ ["traceparent", /\b[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}\b/gi],
52
+ [
53
+ "uuid",
54
+ /\b[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}\b/gi,
55
+ ],
56
+ ["hash", /\b[0-9a-f]{32,64}\b/gi],
57
+ [
58
+ "date",
59
+ /\b\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?\b/g,
60
+ ],
61
+ ["ip", /\b(?:\d{1,3}\.){3}\d{1,3}(?::\d+)?\b/g],
62
+ ["hex", /\b0x[0-9a-f]+\b/gi],
63
+ // Generated identifiers: run, conversation and token ids mix letters and
64
+ // digits, so a 12+ character run with a digit is an id; requiring the digit
65
+ // spares long ordinary words. Any 24+ character run is treated as an id too,
66
+ // since secrets are not guaranteed to contain a digit and no word is that long.
67
+ ["id", /\b(?:(?=[\w-]*\d)(?=[\w-]*[a-z])[\w-]{12,}|[\w-]{24,})\b/gi],
68
+ ["quoted", /"[^"\n]{0,200}"|'[^'\n]{0,200}'|`[^`\n]{0,200}`/g],
69
+ ["num", /-?\b\d+(?:\.\d+)?/g],
70
+ ];
71
+ /** Replace every per-occurrence value in a message with a named placeholder. */
72
+ function parameterizeMessage(text) {
73
+ if (!text)
74
+ return "";
75
+ let out = text.length > MAX_MESSAGE_INPUT ? text.slice(0, MAX_MESSAGE_INPUT) : text;
76
+ out = String((0, diagnostic_scrubber_1.scrubDiagnosticValue)(out));
77
+ for (const [name, pattern] of PARAMETERS) {
78
+ out = out.replace(pattern, `<${name}>`);
79
+ }
80
+ out = out.split("\n").slice(0, 2).join(" ").replace(/\s+/g, " ").trim();
81
+ return out.length > MAX_MESSAGE_OUTPUT
82
+ ? out.slice(0, MAX_MESSAGE_OUTPUT)
83
+ : out;
84
+ }
85
+ const V8_FRAME = /^\s*at (?:(.+?) \()?(.+?):(\d+):(\d+)\)?\s*$/;
86
+ const V8_FRAME_NO_POSITION = /^\s*at (?:(.+?) \()?([^():]+)\)?\s*$/;
87
+ /**
88
+ * Make a frame's file portable: relative to the repo for workspace code, to
89
+ * `node_modules/` for dependencies, and the bare file name for any other
90
+ * absolute path, so no machine's checkout or home directory is recorded.
91
+ */
92
+ function normalizeFile(raw) {
93
+ const file = raw.replace(/^file:\/\//, "");
94
+ const dependency = file.lastIndexOf("/node_modules/");
95
+ if (dependency >= 0)
96
+ return file.slice(dependency + 1);
97
+ const workspace = file.indexOf("/packages/");
98
+ if (workspace >= 0)
99
+ return file.slice(workspace + 1);
100
+ if (file.startsWith("/") || /^[A-Za-z]:[\\/]/.test(file)) {
101
+ return file.split(/[\\/]/).pop() || file;
102
+ }
103
+ return file;
104
+ }
105
+ function isInAppFile(file) {
106
+ return !(file.includes("node_modules/") ||
107
+ file.startsWith("node:") ||
108
+ file.startsWith("internal/") ||
109
+ file === "native" ||
110
+ file === "<anonymous>");
111
+ }
112
+ function normalizeFunction(raw) {
113
+ if (!raw)
114
+ return null;
115
+ const fn = raw
116
+ .replace(/^async /, "")
117
+ .replace(/ \[as [^\]]+\]$/, "")
118
+ .trim();
119
+ return fn && fn !== "<anonymous>" ? fn : null;
120
+ }
121
+ /** Parse a V8/Bun stack into frames, outermost last. Message lines are skipped. */
122
+ function parseStackFrames(stack) {
123
+ const frames = [];
124
+ const lines = stack.slice(0, MAX_STACK_INPUT).split("\n", MAX_STACK_LINES);
125
+ for (const line of lines) {
126
+ if (line.length > MAX_FRAME_LINE)
127
+ continue;
128
+ const match = V8_FRAME.exec(line);
129
+ if (match) {
130
+ const file = normalizeFile(match[2] ?? "");
131
+ frames.push({
132
+ function: normalizeFunction(match[1]),
133
+ file,
134
+ line: Number(match[3]),
135
+ column: Number(match[4]),
136
+ inApp: isInAppFile(file),
137
+ });
138
+ }
139
+ else {
140
+ const bare = V8_FRAME_NO_POSITION.exec(line);
141
+ if (!bare)
142
+ continue;
143
+ const file = normalizeFile(bare[2] ?? "");
144
+ frames.push({
145
+ function: normalizeFunction(bare[1]),
146
+ file,
147
+ line: null,
148
+ column: null,
149
+ inApp: isInAppFile(file),
150
+ });
151
+ }
152
+ if (frames.length >= MAX_STACK_FRAMES)
153
+ break;
154
+ }
155
+ return frames;
156
+ }
157
+ function formatFrames(frames) {
158
+ return frames
159
+ .map((frame) => {
160
+ const position = frame.line == null
161
+ ? frame.file
162
+ : `${frame.file}:${frame.line}:${frame.column}`;
163
+ return frame.function
164
+ ? `at ${frame.function} (${position})`
165
+ : `at ${position}`;
166
+ })
167
+ .join("\n");
168
+ }
169
+ /**
170
+ * Frames that identify the defect: in-app, named, and not the error's own
171
+ * constructor (`new ToolUserError`), which every throw site of a class shares.
172
+ */
173
+ function groupingFrames(frames) {
174
+ return frames
175
+ .filter((frame) => frame.inApp && frame.function && !frame.function.startsWith("new "))
176
+ .slice(0, GROUPING_FRAMES)
177
+ .map((frame) => frame.function);
178
+ }
179
+ const USER_TOOL_CODES = new Set([
180
+ "AUTH_MISSING",
181
+ "BROWSER_INTERRUPTED",
182
+ "NOT_FOUND",
183
+ "VALIDATION",
184
+ "PERMISSION",
185
+ "MANUAL_EDIT_NOT_ALLOWED",
186
+ ]);
187
+ const DEPENDENCY_TOOL_CODES = new Set([
188
+ "AUTH_INVALID",
189
+ "RATE_LIMITED",
190
+ "UPSTREAM_TIMEOUT",
191
+ "UPSTREAM_5XX",
192
+ "NETWORK",
193
+ "UPSTREAM_UNAVAILABLE",
194
+ ]);
195
+ /** Derive the kind from structure only: a code or an HTTP status, never prose. */
196
+ function classifyErrorKind(code, httpStatus) {
197
+ if (code) {
198
+ if (USER_TOOL_CODES.has(code))
199
+ return "user";
200
+ if (DEPENDENCY_TOOL_CODES.has(code) || code.startsWith("PROVIDER_"))
201
+ return "dependency";
202
+ }
203
+ if (httpStatus != null)
204
+ return httpStatus < 500 ? "user" : "system";
205
+ return "system";
206
+ }
207
+ /**
208
+ * A structured code: upper-case or numeric (`VALIDATION`, `ERR_X`, SQLSTATE
209
+ * `23505`) or lower-case snake case. Digits are allowed only in the first form,
210
+ * so a generated id or credential in a `code` field is never kept.
211
+ */
212
+ function isErrorCode(value) {
213
+ return /^(?:[A-Z0-9][A-Z0-9_]{1,63}|[a-z][a-z_]{1,63})$/.test(value);
214
+ }
215
+ function readStatus(shape) {
216
+ for (const value of [shape.httpStatus, shape.statusCode, shape.status]) {
217
+ if (typeof value === "number" && value >= 100 && value <= 599)
218
+ return value;
219
+ }
220
+ return null;
221
+ }
222
+ /** Build the stored report and fingerprint for a thrown value or error-shaped object. */
223
+ function describeError(error, options) {
224
+ const shape = error && typeof error === "object"
225
+ ? error
226
+ : { message: String(error) };
227
+ const type = typeof shape.name === "string" && shape.name
228
+ ? shape.name
229
+ : typeof shape.type === "string" && shape.type
230
+ ? shape.type
231
+ : error instanceof Error
232
+ ? error.constructor.name
233
+ : typeof error === "string"
234
+ ? "Message"
235
+ : "UnknownError";
236
+ const code = typeof shape.code === "string" && isErrorCode(shape.code)
237
+ ? shape.code
238
+ : null;
239
+ const message = parameterizeMessage(typeof shape.message === "string" ? shape.message : "");
240
+ const frames = typeof shape.stack === "string" ? parseStackFrames(shape.stack) : [];
241
+ const kind = options.kind ?? classifyErrorKind(code, readStatus(shape));
242
+ const identity = groupingFrames(frames);
243
+ const parts = identity.length > 0
244
+ ? [
245
+ `v${exports.ERROR_GROUPING_VERSION}`,
246
+ type,
247
+ code ?? "",
248
+ `frames:${identity.join(">")}`,
249
+ ]
250
+ : [
251
+ `v${exports.ERROR_GROUPING_VERSION}`,
252
+ options.scope,
253
+ type,
254
+ code ?? "",
255
+ `message:${message}`,
256
+ ];
257
+ const grouping = parts.join("|");
258
+ return {
259
+ type,
260
+ code,
261
+ kind,
262
+ message,
263
+ stacktrace: formatFrames(frames),
264
+ fingerprint: (0, node_crypto_1.createHash)("sha256")
265
+ .update(grouping)
266
+ .digest("hex")
267
+ .slice(0, 32),
268
+ grouping,
269
+ };
270
+ }
271
+ /** Span attributes for a report, using OpenTelemetry's exception conventions. */
272
+ function errorReportAttributes(report) {
273
+ return {
274
+ "exception.type": report.type,
275
+ "exception.message": report.message,
276
+ ...(report.stacktrace ? { "exception.stacktrace": report.stacktrace } : {}),
277
+ ...(report.code ? { "error.code": report.code } : {}),
278
+ "error.kind": report.kind,
279
+ "error.fingerprint": report.fingerprint,
280
+ "error.grouping": report.grouping,
281
+ };
282
+ }
283
+ function isErrorShaped(value) {
284
+ if (!value || typeof value !== "object" || Array.isArray(value))
285
+ return false;
286
+ const shape = value;
287
+ return (typeof shape.message === "string" &&
288
+ (typeof shape.stack === "string" || typeof shape.name === "string"));
289
+ }
290
+ /** First error-shaped value in a log record's conventional slots, depth-bounded. */
291
+ function findLoggedError(value, depth = 0) {
292
+ if (depth > 3 || !value || typeof value !== "object")
293
+ return null;
294
+ if (isErrorShaped(value))
295
+ return value;
296
+ const candidates = Array.isArray(value)
297
+ ? value
298
+ : ["err", "error", "data", "cause"].map((key) => value[key]);
299
+ for (const candidate of candidates) {
300
+ const found = findLoggedError(candidate, depth + 1);
301
+ if (found)
302
+ return found;
303
+ }
304
+ return null;
305
+ }
306
+ const ERROR_LEVELS = new Set(["error", "fatal"]);
307
+ /**
308
+ * Stamp an error-level log record with its issue fingerprint. Both server
309
+ * loggers call this on the final record, so a failure logged through either
310
+ * groups the same way as the span that recorded it.
311
+ */
312
+ function annotateErrorLogRecord(record) {
313
+ if (typeof record.level !== "string" || !ERROR_LEVELS.has(record.level))
314
+ return;
315
+ // A writer that already described its error (with the scope of the span it
316
+ // fails in) keeps that grouping instead of the generic log-line one.
317
+ if (typeof record.error_fingerprint === "string")
318
+ return;
319
+ const service = typeof record.service === "string" ? record.service : "unknown";
320
+ const logged = findLoggedError(record);
321
+ const message = typeof record.message === "string"
322
+ ? record.message
323
+ : typeof record.msg === "string"
324
+ ? record.msg
325
+ : "";
326
+ const report = describeError(logged ?? { name: "LoggedError", message }, {
327
+ scope: `log ${service}`,
328
+ });
329
+ Object.assign(record, errorReportLogFields(report));
330
+ }
331
+ /**
332
+ * The log-record fields for one report: the same safe fields a span carries,
333
+ * so a consumer of the log never needs the raw message to title or explain
334
+ * the issue. A writer that stamps these keeps them through the annotator.
335
+ */
336
+ function errorReportLogFields(report) {
337
+ return {
338
+ error_fingerprint: report.fingerprint,
339
+ error_type: report.type,
340
+ error_kind: report.kind,
341
+ error_message: report.message,
342
+ error_grouping: report.grouping,
343
+ ...(report.code ? { error_code: report.code } : {}),
344
+ };
345
+ }
346
+ //# sourceMappingURL=error-report.js.map
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bun
2
2
  export * from "./agent-policy";
3
3
  export * from "./tool-trace-summary";
4
+ export * from "./tool-result";
4
5
  export * from "./shell-safety";
5
6
  export * from "./turn-control";
6
7
  export * from "./memory-flush";
@@ -24,8 +25,9 @@ export type { ProviderRegistryEntry, ProvidersConfigFile, } from "./integration-
24
25
  export { renderFallbackSystemContext, renderSkillMemorySection, } from "./lobu-guidance";
25
26
  export * from "./logger";
26
27
  export * from "./modules";
28
+ export * from "./error-report";
27
29
  export type { OtelConfig, Span, Tracer } from "./otel";
28
- export { createChildSpan, createRootSpan, createSpan, flushTracing, getCurrentSpan, getTraceparent, getTracer, initTracing, runInSpanContext, SpanKind, SpanStatusCode, shutdownTracing, withChildSpan, withSpan, } from "./otel";
30
+ export { createChildSpan, createRootSpan, createSpan, flushTracing, getCurrentSpan, getTraceparent, getTracer, initTracing, recordError, runInSpanContext, SpanKind, SpanStatusCode, shutdownTracing, withChildSpan, withSpan, } from "./otel";
29
31
  export { currentTraceLogFields, traceparentHeader } from "./trace-context";
30
32
  export type { ProviderConfigEntry, ProviderOAuthConfig, ProviderOAuthGrantKind, } from "./provider-config-types";
31
33
  export { isSdkCompat, type PiAiApi, resolveSdkCompat, SDK_COMPAT_PROTOCOLS, type SdkCompat, type SdkCompatProtocol, } from "./sdk-compat";
@@ -16,9 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.withLobuFileParameters = exports.slugify = exports.titleFromSessionJsonl = exports.parseSessionEntries = exports.entryToMessage = exports.sanitizeSuggestionPrompts = exports.SUGGESTION_LIMITS = exports.isRefreshSuspended = exports.hasCredentialSource = exports.generateTraceId = exports.extractTraceId = exports.SDK_COMPAT_PROTOCOLS = exports.resolveSdkCompat = exports.isSdkCompat = exports.traceparentHeader = exports.currentTraceLogFields = exports.withSpan = exports.withChildSpan = exports.shutdownTracing = exports.SpanStatusCode = exports.SpanKind = exports.runInSpanContext = exports.initTracing = exports.getTracer = exports.getTraceparent = exports.getCurrentSpan = exports.flushTracing = exports.createSpan = exports.createRootSpan = exports.createChildSpan = exports.renderSkillMemorySection = exports.renderFallbackSystemContext = exports.BaseInstructionProvider = exports.CommandRegistry = exports.inferGrantKind = void 0;
19
+ exports.withLobuFileParameters = exports.slugify = exports.titleFromSessionJsonl = exports.parseSessionEntries = exports.entryToMessage = exports.sanitizeSuggestionPrompts = exports.SUGGESTION_LIMITS = exports.isRefreshSuspended = exports.hasCredentialSource = exports.generateTraceId = exports.extractTraceId = exports.SDK_COMPAT_PROTOCOLS = exports.resolveSdkCompat = exports.isSdkCompat = exports.traceparentHeader = exports.currentTraceLogFields = exports.withSpan = exports.withChildSpan = exports.shutdownTracing = exports.SpanStatusCode = exports.SpanKind = exports.runInSpanContext = exports.recordError = exports.initTracing = exports.getTracer = exports.getTraceparent = exports.getCurrentSpan = exports.flushTracing = exports.createSpan = exports.createRootSpan = exports.createChildSpan = exports.renderSkillMemorySection = exports.renderFallbackSystemContext = exports.BaseInstructionProvider = exports.CommandRegistry = exports.inferGrantKind = void 0;
20
20
  __exportStar(require("./agent-policy"), exports);
21
21
  __exportStar(require("./tool-trace-summary"), exports);
22
+ __exportStar(require("./tool-result"), exports);
22
23
  __exportStar(require("./shell-safety"), exports);
23
24
  __exportStar(require("./turn-control"), exports);
24
25
  __exportStar(require("./memory-flush"), exports);
@@ -54,6 +55,7 @@ Object.defineProperty(exports, "renderSkillMemorySection", { enumerable: true, g
54
55
  __exportStar(require("./logger"), exports);
55
56
  // Module system
56
57
  __exportStar(require("./modules"), exports);
58
+ __exportStar(require("./error-report"), exports);
57
59
  // OpenTelemetry tracing
58
60
  var otel_1 = require("./otel");
59
61
  Object.defineProperty(exports, "createChildSpan", { enumerable: true, get: function () { return otel_1.createChildSpan; } });
@@ -64,6 +66,7 @@ Object.defineProperty(exports, "getCurrentSpan", { enumerable: true, get: functi
64
66
  Object.defineProperty(exports, "getTraceparent", { enumerable: true, get: function () { return otel_1.getTraceparent; } });
65
67
  Object.defineProperty(exports, "getTracer", { enumerable: true, get: function () { return otel_1.getTracer; } });
66
68
  Object.defineProperty(exports, "initTracing", { enumerable: true, get: function () { return otel_1.initTracing; } });
69
+ Object.defineProperty(exports, "recordError", { enumerable: true, get: function () { return otel_1.recordError; } });
67
70
  Object.defineProperty(exports, "runInSpanContext", { enumerable: true, get: function () { return otel_1.runInSpanContext; } });
68
71
  Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function () { return otel_1.SpanKind; } });
69
72
  Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function () { return otel_1.SpanStatusCode; } });
@@ -7,9 +7,10 @@ exports.createLogger = createLogger;
7
7
  // Use simple console.log-based logger by default (unbuffered, 12-factor compliant)
8
8
  // Set USE_WINSTON_LOGGER=true only if you need Winston features (file rotation, multiple transports)
9
9
  const USE_WINSTON_LOGGER = process.env.USE_WINSTON_LOGGER === "true";
10
- // Use JSON format for structured logging (better for Loki parsing in production)
10
+ // Use JSON format for structured logging (parsed by the production log pipeline)
11
11
  const USE_JSON_FORMAT = process.env.LOG_FORMAT === "json";
12
12
  const winston_1 = __importDefault(require("winston"));
13
+ const error_report_1 = require("./error-report");
13
14
  const trace_context_1 = require("./trace-context");
14
15
  const diagnostic_scrubber_1 = require("./utils/diagnostic-scrubber");
15
16
  function safeStringify(value, space) {
@@ -62,7 +63,7 @@ function createConsoleLogger(serviceName) {
62
63
  }
63
64
  const traceFields = (0, trace_context_1.currentTraceLogFields)();
64
65
  if (USE_JSON_FORMAT) {
65
- return safeStringify({
66
+ const record = {
66
67
  timestamp,
67
68
  level: lvl,
68
69
  service: serviceName,
@@ -72,7 +73,9 @@ function createConsoleLogger(serviceName) {
72
73
  ...(args.length > 0
73
74
  ? { data: args.length === 1 ? args[0] : args }
74
75
  : {}),
75
- });
76
+ };
77
+ (0, error_report_1.annotateErrorLogRecord)(record);
78
+ return safeStringify(record);
76
79
  }
77
80
  // Append remaining args
78
81
  if (args.length > 0) {
@@ -117,7 +120,7 @@ function createLogger(serviceName) {
117
120
  }
118
121
  const isProduction = process.env.NODE_ENV === "production";
119
122
  const level = process.env.LOG_LEVEL || "info";
120
- // JSON format for structured logging (better for Loki/Grafana parsing)
123
+ // JSON format for structured logging (parsed by the production log pipeline)
121
124
  const jsonFormat = winston_1.default.format.combine(winston_1.default.format.timestamp({ format: "YYYY-MM-DDTHH:mm:ss.SSSZ" }), winston_1.default.format.json());
122
125
  // Human-readable format for development
123
126
  const humanFormat = winston_1.default.format.combine(...(isProduction ? [] : [winston_1.default.format.colorize()]), winston_1.default.format.printf(({ timestamp, level, message, service, ...meta }) => {
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Client spans for outbound `fetch`, from the events Node's built-in undici
3
+ * publishes on `diagnostics_channel`. No monkey-patching: the channels exist
4
+ * whether or not anyone listens, and an unsubscribed channel costs nothing.
5
+ *
6
+ * A span records method, host and a parameterized path (no query string, ids
7
+ * replaced), the response status and duration. A span is recorded only
8
+ * under an active span, so a call joins the trace of the work that made it; a
9
+ * background fetch with no surrounding work would only add a stray root trace
10
+ * per call. Upstream 5xx responses and
11
+ * transport failures are recorded as dependency errors; a 4xx is often an
12
+ * expected answer, so it is kept as an attribute rather than an error.
13
+ */
14
+ import type { Span, Tracer } from "@opentelemetry/api";
15
+ export declare function instrumentFetch(options: {
16
+ tracer: () => Tracer | null;
17
+ recordError: (span: Span, error: unknown) => void;
18
+ }): void;
19
+ //# sourceMappingURL=otel-fetch.d.ts.map
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ /**
3
+ * Client spans for outbound `fetch`, from the events Node's built-in undici
4
+ * publishes on `diagnostics_channel`. No monkey-patching: the channels exist
5
+ * whether or not anyone listens, and an unsubscribed channel costs nothing.
6
+ *
7
+ * A span records method, host and a parameterized path (no query string, ids
8
+ * replaced), the response status and duration. A span is recorded only
9
+ * under an active span, so a call joins the trace of the work that made it; a
10
+ * background fetch with no surrounding work would only add a stray root trace
11
+ * per call. Upstream 5xx responses and
12
+ * transport failures are recorded as dependency errors; a 4xx is often an
13
+ * expected answer, so it is kept as an attribute rather than an error.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.instrumentFetch = instrumentFetch;
20
+ const node_diagnostics_channel_1 = __importDefault(require("node:diagnostics_channel"));
21
+ const api_1 = require("@opentelemetry/api");
22
+ const error_report_1 = require("./error-report");
23
+ const spans = new WeakMap();
24
+ let subscribed = false;
25
+ let activeTracer = () => null;
26
+ let recordFailure = null;
27
+ function pathTemplate(path) {
28
+ const bare = (path ?? "/").split("?")[0] || "/";
29
+ return (0, error_report_1.parameterizeMessage)(bare).replace(/\s+/g, "");
30
+ }
31
+ function host(origin) {
32
+ if (!origin)
33
+ return "unknown";
34
+ try {
35
+ return new URL(origin).host;
36
+ }
37
+ catch {
38
+ return "unknown";
39
+ }
40
+ }
41
+ function instrumentFetch(options) {
42
+ activeTracer = options.tracer;
43
+ recordFailure = options.recordError;
44
+ if (subscribed)
45
+ return;
46
+ subscribed = true;
47
+ node_diagnostics_channel_1.default.subscribe("undici:request:create", (message) => {
48
+ const { request } = message;
49
+ const tracer = activeTracer();
50
+ if (!tracer || !request || !api_1.trace.getSpan(api_1.context.active()))
51
+ return;
52
+ const method = (request.method ?? "GET").toUpperCase();
53
+ const address = host(request.origin);
54
+ const span = tracer.startSpan(`HTTP ${method} ${address}`, {
55
+ kind: api_1.SpanKind.CLIENT,
56
+ attributes: {
57
+ "http.request.method": method,
58
+ "server.address": address,
59
+ "url.template": pathTemplate(request.path),
60
+ },
61
+ });
62
+ spans.set(request, span);
63
+ });
64
+ node_diagnostics_channel_1.default.subscribe("undici:request:headers", (message) => {
65
+ const { request, response } = message;
66
+ const span = spans.get(request);
67
+ if (!span || typeof response?.statusCode !== "number")
68
+ return;
69
+ span.setAttribute("http.response.status_code", response.statusCode);
70
+ if (response.statusCode >= 500) {
71
+ recordFailure?.(span, {
72
+ name: "UpstreamHttpError",
73
+ message: `HTTP ${response.statusCode}`,
74
+ code: "UPSTREAM_5XX",
75
+ });
76
+ }
77
+ });
78
+ node_diagnostics_channel_1.default.subscribe("undici:request:trailers", (message) => {
79
+ const { request } = message;
80
+ const span = spans.get(request);
81
+ if (!span)
82
+ return;
83
+ spans.delete(request);
84
+ span.end();
85
+ });
86
+ node_diagnostics_channel_1.default.subscribe("undici:request:error", (message) => {
87
+ const { request, error } = message;
88
+ const span = spans.get(request);
89
+ if (!span)
90
+ return;
91
+ spans.delete(request);
92
+ recordFailure?.(span, error);
93
+ span.end();
94
+ });
95
+ }
96
+ //# sourceMappingURL=otel-fetch.js.map