@lobu/runtime-server 21.2.1 → 23.0.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 (420) hide show
  1. package/dist/catalogs/automations.json +40 -13
  2. package/dist/catalogs/connectors.json +18435 -1259
  3. package/dist/catalogs/skills.json +1 -1
  4. package/dist/component.json +1 -1
  5. package/dist/connectors/README.md +21 -6
  6. package/dist/connectors/_google/actions.ts +270 -0
  7. package/dist/connectors/_google/discovery/calendar_v3.json +1 -0
  8. package/dist/connectors/_google/discovery/chat_v1.json +1 -0
  9. package/dist/connectors/_google/discovery/docs_v1.json +1 -0
  10. package/dist/connectors/_google/discovery/drive_v3.json +1 -0
  11. package/dist/connectors/_google/discovery/gmail_v1.json +1 -0
  12. package/dist/connectors/_google/discovery/people_v1.json +1 -0
  13. package/dist/connectors/_google/discovery/sheets_v4.json +1 -0
  14. package/dist/connectors/_google/discovery/tasks_v1.json +1 -0
  15. package/dist/connectors/_google/discovery/youtube_v3.json +1 -0
  16. package/dist/connectors/_google/discovery.ts +442 -0
  17. package/dist/connectors/_google/errors.ts +91 -0
  18. package/dist/connectors/_google/list-feed.ts +223 -0
  19. package/dist/connectors/_google/policies.ts +127 -0
  20. package/dist/connectors/agentid.ts +43 -0
  21. package/dist/connectors/chat-user-identity.ts +2 -1
  22. package/dist/connectors/github-automation-events.ts +9 -0
  23. package/dist/connectors/github-identity.ts +28 -3
  24. package/dist/connectors/github.ts +101 -59
  25. package/dist/connectors/google_calendar.ts +207 -719
  26. package/dist/connectors/google_drive.ts +16 -2
  27. package/dist/connectors/google_gmail.ts +52 -33
  28. package/dist/connectors/herdr.ts +406 -0
  29. package/dist/connectors/jira-helpers.ts +313 -0
  30. package/dist/connectors/jira.ts +35 -227
  31. package/dist/connectors/linear.ts +7 -4
  32. package/dist/connectors/linkedin-browser-script.ts +13 -0
  33. package/dist/connectors/linkedin-draft-page.js +104 -0
  34. package/dist/connectors/linkedin-drafts.ts +73 -0
  35. package/dist/connectors/linkedin-identity.ts +32 -0
  36. package/dist/connectors/linkedin-inbox-adapter.js +1185 -0
  37. package/dist/connectors/linkedin-inbox.ts +156 -0
  38. package/dist/connectors/linkedin-like.ts +114 -0
  39. package/dist/connectors/linkedin-takeout.ts +577 -0
  40. package/dist/connectors/linkedin.ts +3998 -0
  41. package/dist/connectors/postgres.ts +27 -2
  42. package/dist/connectors/takeout-utils.ts +240 -0
  43. package/dist/connectors/tiktok-inbox-page.js +230 -0
  44. package/dist/connectors/tiktok-web-page.js +217 -0
  45. package/dist/connectors/tiktok_web.ts +319 -0
  46. package/dist/connectors/whatsapp-web-adapter.js +285 -567
  47. package/dist/connectors/whatsapp-web-helpers.ts +74 -455
  48. package/dist/connectors/whatsapp-web-identity.ts +135 -0
  49. package/dist/connectors/whatsapp_web.ts +159 -618
  50. package/dist/connectors/x-dm-adapter.js +556 -0
  51. package/dist/connectors/x-identity.ts +31 -2
  52. package/dist/connectors/x.ts +539 -253
  53. package/dist/db/migrations/20261005150000_retire_agent_tool_config.sql +31 -0
  54. package/dist/db/migrations/20261005173700_drop_retired_agent_tool_config.sql +29 -0
  55. package/dist/db/migrations/20261007010000_identity_association_guards.sql +242 -0
  56. package/dist/db/migrations/20261007010001_identity_association_indexes.sql +35 -0
  57. package/dist/db/migrations/20261007012000_connector_browser_requirement.sql +7 -0
  58. package/dist/db/migrations/20261009010000_identity_member_decision_indexes.sql +22 -0
  59. package/dist/db/migrations/20261009015900_retire_remaining_physical_merges.sql +196 -0
  60. package/dist/db/migrations/20261009020000_retire_physical_entity_merge.sql +82 -0
  61. package/dist/db/migrations/20261009030000_retire_physical_merge_indexes.sql +39 -0
  62. package/dist/db/migrations/20261009030001_drop_physical_entity_redirect.sql +62 -0
  63. package/dist/db/migrations/20261009040000_normalize_identity_decisions.sql +60 -0
  64. package/dist/db/migrations/20261010220000_notification_targets_user_event_order.sql +53 -0
  65. package/dist/db/migrations/20261010223000_device_workers_user_fresh_cover.sql +39 -0
  66. package/dist/db/migrations/20261010223001_runs_org_default_view.sql +41 -0
  67. package/dist/db/migrations/20261010223002_events_org_guidance.sql +42 -0
  68. package/dist/db/migrations/20261011002000_finish_product_eval_retirement.sql +37 -0
  69. package/dist/db/migrations/20261011160000_mcp_conversation_workspaces.sql +97 -0
  70. package/dist/db/migrations/20261013120000_events_live_org_effective_date.sql +42 -0
  71. package/dist/db/migrations/20261013150000_events_live_linked_org_ids_gin.sql +41 -0
  72. package/dist/db/migrations/20261014120000_clear_team_device_auto_pause.sql +34 -0
  73. package/dist/db/migrations/20261014150000_connector_webhook_event_type_backfill.sql +30 -0
  74. package/dist/db/migrations/20261014170000_retire_atlassian_mcp_webhook_refresh.sql +51 -0
  75. package/dist/db/migrations/20261015010000_connection_auth_profile_fk_set_null_column.sql +53 -0
  76. package/dist/db/migrations/20261015120000_personal_org_connector_auto_policy.sql +38 -0
  77. package/dist/db/migrations/20261017120000_drop_feeds_kind_virtual.sql +26 -0
  78. package/dist/db/migrations/20261017130000_drop_retired_dead_code_columns.sql +46 -0
  79. package/dist/db/migrations/preconditions/20261005150000_retire_agent_tool_config.sql +22 -0
  80. package/dist/db/migrations/preconditions/20261005173700_drop_retired_agent_tool_config.sql +13 -0
  81. package/dist/db/migrations/preconditions/20261009020000_retire_physical_entity_merge.sql +26 -0
  82. package/dist/db/migrations/preconditions/20261011002000_finish_product_eval_retirement.sql +14 -0
  83. package/dist/dependencies.bun.lock +144 -137
  84. package/dist/guest.bundle.js +416 -330
  85. package/dist/owletto/dist/assets/_-3J-IrxWk.js +2 -0
  86. package/dist/owletto/dist/assets/_-DYUE3ix4.js +3 -0
  87. package/dist/owletto/dist/assets/_-DtqBFgK5.js +1 -0
  88. package/dist/owletto/dist/assets/_agentId-Bn2IAjIy.js +2 -0
  89. package/dist/owletto/dist/assets/_agentId-Cam7Z0N7.js +2 -0
  90. package/dist/owletto/dist/assets/_automationId-CXEiKVZJ.js +2 -0
  91. package/dist/owletto/dist/assets/_connectorKey._connectionId-CS85l61t.js +2 -0
  92. package/dist/owletto/dist/assets/_connectorKey.index-clVDIyW0.js +2 -0
  93. package/dist/owletto/dist/assets/_conversationId-Ci2k-BuN.js +2 -0
  94. package/dist/owletto/dist/assets/_deploymentId-BuUzGtVL.js +2 -0
  95. package/dist/owletto/dist/assets/_eventId-B0662F8h.js +2 -0
  96. package/dist/owletto/dist/assets/_name-CwWePlOl.js +2 -0
  97. package/dist/owletto/dist/assets/_owner-dTWkrKsK.js +3 -0
  98. package/dist/owletto/dist/assets/_shape-BtS3y4M9.js +2 -0
  99. package/dist/owletto/dist/assets/_skillKey-Dc9m-nlR.js +2 -0
  100. package/dist/owletto/dist/assets/_slug-DQHutM41.js +2 -0
  101. package/dist/owletto/dist/assets/_threadId-DtqBFgK5.js +1 -0
  102. package/dist/owletto/dist/assets/_viewKey-B30ik8ma.js +2 -0
  103. package/dist/owletto/dist/assets/_viewKey-CUHypQnF.js +2 -0
  104. package/dist/owletto/dist/assets/accept-invitation-w17IFTtf.js +2 -0
  105. package/dist/owletto/dist/assets/activity-route-view-CMqYiiKM.js +2 -0
  106. package/dist/owletto/dist/assets/agent-card-controls-mnTN2AZt.js +2 -0
  107. package/dist/owletto/dist/assets/{agent-client-setup-list-BFtgRwe8.js → agent-client-setup-list-Bg3hBfUV.js} +4 -3
  108. package/dist/owletto/dist/assets/agent-connect-pages-B_vrqLVc.js +2 -0
  109. package/dist/owletto/dist/assets/agent-editor-form-hTs7eO_U.js +2 -0
  110. package/dist/owletto/dist/assets/agent-guardrails-route-BOrCXcAl.js +2 -0
  111. package/dist/owletto/dist/assets/agent-loading-shells-Dqcvky-k.js +2 -0
  112. package/dist/owletto/dist/assets/agent-permissions-matrix-BOo_4r_4.js +2 -0
  113. package/dist/owletto/dist/assets/{agent-skill-context-BAr2Dw3F.js → agent-skill-context-CCdvtlmH.js} +2 -1
  114. package/dist/owletto/dist/assets/agent-skills-route-BUxIswuq.js +2 -0
  115. package/dist/owletto/dist/assets/agent-subpage-shell-D92imvSt.js +2 -0
  116. package/dist/owletto/dist/assets/agent-thread-BJOijbT0.js +6 -0
  117. package/dist/owletto/dist/assets/agents-9XjpDj_S.js +2 -0
  118. package/dist/owletto/dist/assets/agents-workbench-Bt5QCYQ7.js +2 -0
  119. package/dist/owletto/dist/assets/app-bridge-BCm4muqj.js +128 -0
  120. package/dist/owletto/dist/assets/app._appId-CKv7_squ.js +2 -0
  121. package/dist/owletto/dist/assets/automation-detail-content-vUwVumXf.js +2 -0
  122. package/dist/owletto/dist/assets/automations-9XjpDj_S.js +2 -0
  123. package/dist/owletto/dist/assets/{callback-CaRe2TOT.js → callback-BRgcL8gz.js} +2 -1
  124. package/dist/owletto/dist/assets/{card-CMmh2mzo.js → card-Djgp00r_.js} +2 -1
  125. package/dist/owletto/dist/assets/claim-BYUZnyMp.js +2 -0
  126. package/dist/owletto/dist/assets/client-rows-EJSKR6z1.js +1 -0
  127. package/dist/owletto/dist/assets/clients-D3Zbjxin.js +2 -0
  128. package/dist/owletto/dist/assets/code-editor-DHeyRGZI.js +16 -0
  129. package/dist/owletto/dist/assets/connect-CfsFsy9P.js +2 -0
  130. package/dist/owletto/dist/assets/connect._clientId-DkiC8xos.js +2 -0
  131. package/dist/owletto/dist/assets/connected._clientId-CIXrGOsT.js +2 -0
  132. package/dist/owletto/dist/assets/connected._clientId.activity-Ckdz6I0y.js +2 -0
  133. package/dist/owletto/dist/assets/connected._clientId.index-CNxafNeo.js +2 -0
  134. package/dist/owletto/dist/assets/connection-C3XXFEqh.js +2 -0
  135. package/dist/owletto/dist/assets/connection-feed-detail-CIJJLDP8.js +2 -0
  136. package/dist/owletto/dist/assets/connection-label-BobuYiAG.js +1 -0
  137. package/dist/owletto/dist/assets/connections-browser-CKZjzRz6.js +2 -0
  138. package/dist/owletto/dist/assets/{connector-provenance-BjKiUhYE.js → connector-provenance-8-d8hl10.js} +2 -1
  139. package/dist/owletto/dist/assets/connector-scope-lists-CadPVsI3.js +2 -0
  140. package/dist/owletto/dist/assets/{connectors-Baejya0T.js → connectors-lvLJ30lo.js} +2 -1
  141. package/dist/owletto/dist/assets/consent-CdSvVCgx.js +2 -0
  142. package/dist/owletto/dist/assets/conversations-table-BdXoZAfc.js +2 -0
  143. package/dist/owletto/dist/assets/{core.esm-QA7BQgiK.js → core.esm-CYvgWCuv.js} +2 -1
  144. package/dist/owletto/dist/assets/create-0xW9eXxG.js +2 -0
  145. package/dist/owletto/dist/assets/create-B0qhrrX4.js +2 -0
  146. package/dist/owletto/dist/assets/create-CAfF-yI1.js +2 -0
  147. package/dist/owletto/dist/assets/create-automation-form-CtSSeYj3.js +3 -0
  148. package/dist/owletto/dist/assets/create._connectorKey-i6xxkWKV.js +2 -0
  149. package/dist/owletto/dist/assets/{cronstrue-2GHCtD7h.js → cronstrue-n4qGUraE.js} +2 -1
  150. package/dist/owletto/dist/assets/deployments-4Itm35Xc.js +2 -0
  151. package/dist/owletto/dist/assets/deployments-RvUdVkj3.js +2 -0
  152. package/dist/owletto/dist/assets/{deployments-body-Bm2upStd.js → deployments-body-BMp7UsMo.js} +2 -1
  153. package/dist/owletto/dist/assets/device-CPU6CjkJ.js +2 -0
  154. package/dist/owletto/dist/assets/device-pin-tombstone-CrjG7gPo.js +2 -0
  155. package/dist/owletto/dist/assets/device._deviceId-Cs3ZmXWo.js +2 -0
  156. package/dist/owletto/dist/assets/{entity-options-CrbS6K-i.js → entity-options-uXjgT7y9.js} +2 -1
  157. package/dist/owletto/dist/assets/entity-page-Dc0LGr5U.js +2 -0
  158. package/dist/owletto/dist/assets/entity-type-page-CwZxa0BR.js +2 -0
  159. package/dist/owletto/dist/assets/event-detail-ve2d6Gbb.js +2 -0
  160. package/dist/owletto/dist/assets/events-feed-BtvhZF1f.js +2 -0
  161. package/dist/owletto/dist/assets/filter-editors-Cj-v6NtH.js +2 -0
  162. package/dist/owletto/dist/assets/full-page-spinner-DqpH99np.js +2 -0
  163. package/dist/owletto/dist/assets/guardrails-HFo2Ut8B.js +2 -0
  164. package/dist/owletto/dist/assets/identity-BigVSBCl.js +2 -0
  165. package/dist/owletto/dist/assets/index-B9uPN6FC.js +2 -0
  166. package/dist/owletto/dist/assets/index-BLEcy9-T.css +1 -0
  167. package/dist/owletto/dist/assets/index-BQVliQW1.js +2 -0
  168. package/dist/owletto/dist/assets/index-BfedB4Rc.js +2 -0
  169. package/dist/owletto/dist/assets/index-CDz3-ieP.js +1 -0
  170. package/dist/owletto/dist/assets/index-CUw3aKBI.js +2 -0
  171. package/dist/owletto/dist/assets/index-CXhxUkv3.js +2 -0
  172. package/dist/owletto/dist/assets/index-Cr5hwh-C.js +7950 -0
  173. package/dist/owletto/dist/assets/index-CzkTV4ZQ.js +2 -0
  174. package/dist/owletto/dist/assets/index-DKSx8JN_.js +2 -0
  175. package/dist/owletto/dist/assets/index-DVk7Ug0d.js +2 -0
  176. package/dist/owletto/dist/assets/index-DmZuKGf8.js +2 -0
  177. package/dist/owletto/dist/assets/index-DtqBFgK5.js +1 -0
  178. package/dist/owletto/dist/assets/index-Hio-HRfo.js +2 -0
  179. package/dist/owletto/dist/assets/{index-Cf0GJoiG.js → index-ICgKp3YK.js} +2 -1
  180. package/dist/owletto/dist/assets/index-Vcq4gwWv.js +1 -0
  181. package/dist/owletto/dist/assets/index-cPcroOH0.js +2 -0
  182. package/dist/owletto/dist/assets/{index-DlepU3cY.js → index-n7sTbNv4.js} +2 -1
  183. package/dist/owletto/dist/assets/index-rrnUF981.js +1 -0
  184. package/dist/owletto/dist/assets/index-xiFpcWKv.js +2 -0
  185. package/dist/owletto/dist/assets/json-diff-DBoag_OS.js +4 -0
  186. package/dist/owletto/dist/assets/{list-skeleton-BtWn2eo2.js → list-skeleton-C_GuoxAH.js} +2 -1
  187. package/dist/owletto/dist/assets/login-Ci6ixHuL.js +2 -0
  188. package/dist/owletto/dist/assets/logout-CLGgeZB7.js +2 -0
  189. package/dist/owletto/dist/assets/member-scope-gate-B44INDPY.js +2 -0
  190. package/dist/owletto/dist/assets/memory-browse-page-DyQiRvzl.js +103 -0
  191. package/dist/owletto/dist/assets/model-selector-dAbDgJvx.js +2 -0
  192. package/dist/owletto/dist/assets/models-DpVP7ZwX.js +2 -0
  193. package/dist/owletto/dist/assets/new-BUb7AnEW.js +2 -0
  194. package/dist/owletto/dist/assets/new-BkdULx2r.js +2 -0
  195. package/dist/owletto/dist/assets/new-CHOr-EcI.js +2 -0
  196. package/dist/owletto/dist/assets/oauth-workspace-access-BxsjwgdH.js +2 -0
  197. package/dist/owletto/dist/assets/organization-gxGeDjIV.js +2 -0
  198. package/dist/owletto/dist/assets/peek-pane-content-CHoQHe2H.js +2 -0
  199. package/dist/owletto/dist/assets/{permissions-h_qSft1A.js → permissions-aPHaKLec.js} +2 -1
  200. package/dist/owletto/dist/assets/proposal-review-shell-UcZr87_Q.js +2 -0
  201. package/dist/owletto/dist/assets/public-shell-ready-DcnlADmj.js +2 -0
  202. package/dist/owletto/dist/assets/{recent-JiBNvZzD.js → recent-D-65Pgu-.js} +2 -1
  203. package/dist/owletto/dist/assets/record-activity-CBXH6v1d.js +2 -0
  204. package/dist/owletto/dist/assets/{renderer-DgPLyEbx.js → renderer-mEDnVW0O.js} +28 -27
  205. package/dist/owletto/dist/assets/reset-password-uX_V6bip.js +2 -0
  206. package/dist/owletto/dist/assets/runs-C0rCgGwX.js +2 -0
  207. package/dist/owletto/dist/assets/runs-panel-Du1JMjg5.js +2 -0
  208. package/dist/owletto/dist/assets/runs-table-syPJ6r6T.js +2 -0
  209. package/dist/owletto/dist/assets/settings-9NkNA1G1.js +2 -0
  210. package/dist/owletto/dist/assets/settings-E-10sLQX.js +2 -0
  211. package/dist/owletto/dist/assets/skill-editor-D_W3QlRz.js +1 -0
  212. package/dist/owletto/dist/assets/skills-D2Ri9b4f.js +2 -0
  213. package/dist/owletto/dist/assets/source-record-panels-CPyzlfD1.js +2 -0
  214. package/dist/owletto/dist/assets/status-dot-B-EWMgq6.js +2 -0
  215. package/dist/owletto/dist/assets/tabs-DqIIkCX-.js +2 -0
  216. package/dist/owletto/dist/assets/{use-mention-search-B4DfZFm5.js → use-mention-search-By8RZyKW.js} +3 -2
  217. package/dist/owletto/dist/assets/view-param-filters-CqLZQrnO.js +2 -0
  218. package/dist/owletto/dist/assets/workspace-label-o_QfBuCM.js +2 -0
  219. package/dist/owletto/dist/index.html +46 -4
  220. package/dist/providers.json +1 -1
  221. package/dist/server-main.bundle.mjs +137029 -133673
  222. package/npm-shrinkwrap.json +612 -645
  223. package/package.json +4 -3
  224. package/vendor/connector-sdk/dist/browser-handoff-banner.d.ts +39 -0
  225. package/vendor/connector-sdk/dist/browser-handoff-banner.js +175 -0
  226. package/vendor/connector-sdk/dist/browser-requirement.d.ts +36 -0
  227. package/vendor/connector-sdk/dist/browser-requirement.js +60 -0
  228. package/vendor/connector-sdk/dist/browser-source-read.d.ts +52 -0
  229. package/vendor/connector-sdk/dist/browser-source-read.js +107 -0
  230. package/vendor/connector-sdk/dist/connector-runtime.d.ts +3 -1
  231. package/vendor/connector-sdk/dist/connector-runtime.js +10 -0
  232. package/vendor/connector-sdk/dist/connector-types.d.ts +169 -45
  233. package/vendor/connector-sdk/dist/define-connector.d.ts +4 -2
  234. package/vendor/connector-sdk/dist/define-connector.js +3 -0
  235. package/vendor/connector-sdk/dist/index.d.ts +8 -2
  236. package/vendor/connector-sdk/dist/index.js +3 -0
  237. package/vendor/connector-sdk/dist/reaction-client-types.d.ts +16 -21
  238. package/vendor/connector-sdk/dist/reaction-client-types.typecheck.d.ts +5 -0
  239. package/vendor/connector-sdk/package.json +13 -1
  240. package/vendor/core/dist/agent-policy.js +1 -1
  241. package/vendor/core/dist/agent-store.d.ts +2 -0
  242. package/vendor/core/dist/agent-tooling.d.ts +1 -1
  243. package/vendor/core/dist/agent-tooling.js +1 -1
  244. package/vendor/core/dist/capabilities.d.ts +1 -1
  245. package/vendor/core/dist/capabilities.js +2 -1
  246. package/vendor/core/dist/connector-query-errors.d.ts +32 -0
  247. package/vendor/core/dist/connector-query-errors.js +41 -1
  248. package/vendor/core/dist/contracts/agent-settings.d.ts +0 -11
  249. package/vendor/core/dist/contracts/agent-settings.js +1 -7
  250. package/vendor/core/dist/contracts/tools/collection-presentation.d.ts +93 -0
  251. package/vendor/core/dist/contracts/tools/collection-presentation.js +88 -0
  252. package/vendor/core/dist/contracts/tools/collection-selection.d.ts +47 -0
  253. package/vendor/core/dist/contracts/tools/collection-selection.js +74 -0
  254. package/vendor/core/dist/contracts/tools/manage-agents.d.ts +10 -4
  255. package/vendor/core/dist/contracts/tools/manage-auth-profiles.d.ts +1 -1
  256. package/vendor/core/dist/contracts/tools/manage-auth-profiles.js +5 -1
  257. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +19 -4
  258. package/vendor/core/dist/contracts/tools/manage-automations.js +25 -8
  259. package/vendor/core/dist/contracts/tools/manage-connections.d.ts +1 -0
  260. package/vendor/core/dist/contracts/tools/manage-connections.js +3 -0
  261. package/vendor/core/dist/contracts/tools/manage-conversations.js +2 -2
  262. package/vendor/core/dist/contracts/tools/manage-entity-schema.d.ts +11 -0
  263. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +42 -3
  264. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +181 -152
  265. package/vendor/core/dist/contracts/tools/manage-entity.js +118 -162
  266. package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +14 -0
  267. package/vendor/core/dist/contracts/tools/manage-feeds.js +17 -0
  268. package/vendor/core/dist/contracts/tools/manage-operations.d.ts +41 -3
  269. package/vendor/core/dist/contracts/tools/manage-operations.js +40 -2
  270. package/vendor/core/dist/contracts/tools/manage-views.d.ts +182 -7
  271. package/vendor/core/dist/contracts/tools/manage-views.js +49 -13
  272. package/vendor/core/dist/contracts/tools/read-knowledge.d.ts +11 -2
  273. package/vendor/core/dist/contracts/tools/read-knowledge.js +23 -3
  274. package/vendor/core/dist/contracts/tools/save-memory.d.ts +3 -6
  275. package/vendor/core/dist/contracts/tools/save-memory.js +2 -6
  276. package/vendor/core/dist/contracts/tools/view-attach.d.ts +2 -1
  277. package/vendor/core/dist/contracts/tools/view-attach.js +7 -2
  278. package/vendor/core/dist/contracts/worker/protocol.d.ts +130 -159
  279. package/vendor/core/dist/contracts/worker/protocol.js +88 -76
  280. package/vendor/core/dist/device-pin-tombstones.d.ts +44 -0
  281. package/vendor/core/dist/device-pin-tombstones.js +57 -0
  282. package/vendor/core/dist/index.d.ts +5 -5
  283. package/vendor/core/dist/index.js +4 -6
  284. package/vendor/core/dist/json-template.d.ts +6 -10
  285. package/vendor/core/dist/json-template.js +5 -9
  286. package/vendor/core/dist/logger.js +17 -26
  287. package/vendor/core/dist/shell-safety.d.ts +9 -0
  288. package/vendor/core/dist/shell-safety.js +154 -0
  289. package/vendor/core/dist/suggestions.d.ts +1 -1
  290. package/vendor/core/dist/suggestions.js +1 -1
  291. package/vendor/core/dist/tool-trace-summary.d.ts +1 -1
  292. package/vendor/core/dist/tool-trace-summary.js +1 -1
  293. package/vendor/core/dist/types.d.ts +1 -3
  294. package/vendor/core/dist/utils/diagnostic-scrubber.d.ts +7 -0
  295. package/vendor/core/dist/utils/diagnostic-scrubber.js +437 -0
  296. package/vendor/core/dist/worker/auth.d.ts +44 -6
  297. package/vendor/core/dist/worker/auth.js +44 -11
  298. package/vendor/core/dist/worker/wire.d.ts +0 -10
  299. package/vendor/core/package.json +20 -11
  300. package/vendor/views/dist/api.d.ts +39 -29
  301. package/vendor/views/dist/api.js +110 -83
  302. package/vendor/views/dist/bridge.d.ts +4 -0
  303. package/vendor/views/dist/bridge.js +15 -0
  304. package/vendor/views/dist/index.d.ts +1 -0
  305. package/vendor/views/dist/index.js +0 -7
  306. package/vendor/views/package.json +4 -1
  307. package/dist/owletto/dist/assets/_-CLhipgJI.js +0 -1
  308. package/dist/owletto/dist/assets/_-D0ZVGAIA.js +0 -2
  309. package/dist/owletto/dist/assets/_agentId-BLXUf3ot.js +0 -1
  310. package/dist/owletto/dist/assets/_agentId-DnI66MF3.js +0 -1
  311. package/dist/owletto/dist/assets/_automationId-ziwseLb7.js +0 -1
  312. package/dist/owletto/dist/assets/_connectorKey._connectionId-B6V3ySFK.js +0 -1
  313. package/dist/owletto/dist/assets/_connectorKey.index-CR5u_dtt.js +0 -1
  314. package/dist/owletto/dist/assets/_conversationId-FBMYmOl8.js +0 -1
  315. package/dist/owletto/dist/assets/_deploymentId-DNTXbT_m.js +0 -1
  316. package/dist/owletto/dist/assets/_name-B37LKIxH.js +0 -1
  317. package/dist/owletto/dist/assets/_owner-BxYumqC2.js +0 -1
  318. package/dist/owletto/dist/assets/_shape-Bxz-04jR.js +0 -1
  319. package/dist/owletto/dist/assets/_skillKey-D5MFbiw2.js +0 -1
  320. package/dist/owletto/dist/assets/_slug-Dlhit09k.js +0 -1
  321. package/dist/owletto/dist/assets/_viewKey-C6535i-t.js +0 -1
  322. package/dist/owletto/dist/assets/_viewKey-CQCtY3Y8.js +0 -1
  323. package/dist/owletto/dist/assets/_viewKey-CxKfKbRa.js +0 -1
  324. package/dist/owletto/dist/assets/accept-invitation-BQQwec3R.js +0 -1
  325. package/dist/owletto/dist/assets/activity-route-view-BwThvdGs.js +0 -1
  326. package/dist/owletto/dist/assets/agent-card-controls-B3RhzsPz.js +0 -1
  327. package/dist/owletto/dist/assets/agent-connect-pages-BO4wQn4L.js +0 -1
  328. package/dist/owletto/dist/assets/agent-editor-form-BYC4uSNz.js +0 -1
  329. package/dist/owletto/dist/assets/agent-guardrails-route-Dp02G1AQ.js +0 -1
  330. package/dist/owletto/dist/assets/agent-loading-shells-OagauQzV.js +0 -1
  331. package/dist/owletto/dist/assets/agent-permissions-matrix-B9Ho3P1t.js +0 -1
  332. package/dist/owletto/dist/assets/agent-skills-route-B4VUnVi0.js +0 -1
  333. package/dist/owletto/dist/assets/agent-subpage-shell-Dz8I-GUt.js +0 -1
  334. package/dist/owletto/dist/assets/agent-thread-B9-cdkaV.js +0 -8
  335. package/dist/owletto/dist/assets/agent-thread-storage-U6htL3ad.js +0 -1
  336. package/dist/owletto/dist/assets/agents-D0CIg4b9.js +0 -1
  337. package/dist/owletto/dist/assets/agents-workbench-C2sr5h82.js +0 -1
  338. package/dist/owletto/dist/assets/app-bridge-BH3g2mKG.js +0 -127
  339. package/dist/owletto/dist/assets/app._appId-DLsJ_QWS.js +0 -1
  340. package/dist/owletto/dist/assets/automation-detail-content-9Rjb_I9j.js +0 -1
  341. package/dist/owletto/dist/assets/automations-D0CIg4b9.js +0 -1
  342. package/dist/owletto/dist/assets/calendar-DAiyi1ZL.js +0 -1
  343. package/dist/owletto/dist/assets/claim-CYHnUF7G.js +0 -1
  344. package/dist/owletto/dist/assets/clients-Cp1BJ28u.js +0 -1
  345. package/dist/owletto/dist/assets/code-editor-CYsR2VBP.js +0 -15
  346. package/dist/owletto/dist/assets/connect-CZip2g_B.js +0 -1
  347. package/dist/owletto/dist/assets/connect._clientId-CEKY8Dnv.js +0 -1
  348. package/dist/owletto/dist/assets/connected._clientId-C5xRjxNO.js +0 -1
  349. package/dist/owletto/dist/assets/connection-C06HZ241.js +0 -1
  350. package/dist/owletto/dist/assets/connection-feed-detail-D1whY5hL.js +0 -1
  351. package/dist/owletto/dist/assets/consent-CfYDldcF.js +0 -1
  352. package/dist/owletto/dist/assets/create-C3P-3_8O.js +0 -1
  353. package/dist/owletto/dist/assets/create-CwnrPUEw.js +0 -1
  354. package/dist/owletto/dist/assets/create-DOScS9Gl.js +0 -1
  355. package/dist/owletto/dist/assets/create-automation-form-CuxiIRCF.js +0 -2
  356. package/dist/owletto/dist/assets/create._connectorKey-Bjv3lCf8.js +0 -1
  357. package/dist/owletto/dist/assets/deployments-ByBv1DW-.js +0 -1
  358. package/dist/owletto/dist/assets/deployments-C-_ECORv.js +0 -1
  359. package/dist/owletto/dist/assets/device-B0i7Xp8y.js +0 -1
  360. package/dist/owletto/dist/assets/device-automation-BIjs7DZJ.js +0 -1
  361. package/dist/owletto/dist/assets/device-pin-tombstone-Bd6vS2zu.js +0 -1
  362. package/dist/owletto/dist/assets/device-rows-Bwf8qDte.js +0 -1
  363. package/dist/owletto/dist/assets/device._deviceId-DJLAesm3.js +0 -1
  364. package/dist/owletto/dist/assets/entity-page-ijZe_1-6.js +0 -1
  365. package/dist/owletto/dist/assets/entity-type-page-onp2Tk_E.js +0 -1
  366. package/dist/owletto/dist/assets/event-page-C0B2UDY-.js +0 -1
  367. package/dist/owletto/dist/assets/events-feed-DK35T4g7.js +0 -1
  368. package/dist/owletto/dist/assets/full-page-spinner-Dd8eEaxq.js +0 -1
  369. package/dist/owletto/dist/assets/guardrails-DKO8_J-G.js +0 -1
  370. package/dist/owletto/dist/assets/identity-CKM54vrM.js +0 -1
  371. package/dist/owletto/dist/assets/index--VmN5WxW.js +0 -1
  372. package/dist/owletto/dist/assets/index-B2AmRqYh.js +0 -7898
  373. package/dist/owletto/dist/assets/index-B_rcEgFX.js +0 -1
  374. package/dist/owletto/dist/assets/index-BmAuAhub.css +0 -1
  375. package/dist/owletto/dist/assets/index-BmhGe6-Z.js +0 -1
  376. package/dist/owletto/dist/assets/index-C1dJSGrL.js +0 -1
  377. package/dist/owletto/dist/assets/index-CAFw4qCb.js +0 -1
  378. package/dist/owletto/dist/assets/index-CCcc_xBw.js +0 -52
  379. package/dist/owletto/dist/assets/index-CLU3gXVm.js +0 -1
  380. package/dist/owletto/dist/assets/index-CqQVnAY-.js +0 -1
  381. package/dist/owletto/dist/assets/index-CxT0uyIe.js +0 -1
  382. package/dist/owletto/dist/assets/index-DR08e6Ec.js +0 -1
  383. package/dist/owletto/dist/assets/index-DYb9L5FC.js +0 -1
  384. package/dist/owletto/dist/assets/index-SUUcQGT-.js +0 -1
  385. package/dist/owletto/dist/assets/index-SdiFOfR1.js +0 -1
  386. package/dist/owletto/dist/assets/index-zcfi5r1l.js +0 -1
  387. package/dist/owletto/dist/assets/json-diff-ClBBYBQD.js +0 -3
  388. package/dist/owletto/dist/assets/login-d3PdO-qV.js +0 -1
  389. package/dist/owletto/dist/assets/logout-DgckxwLn.js +0 -1
  390. package/dist/owletto/dist/assets/member-scope-gate-DXOCfx-v.js +0 -1
  391. package/dist/owletto/dist/assets/memory-browse-page-CeAnKoTR.js +0 -101
  392. package/dist/owletto/dist/assets/missing-view-DrZ8m8yo.js +0 -1
  393. package/dist/owletto/dist/assets/model-selector-CapL1ARf.js +0 -1
  394. package/dist/owletto/dist/assets/models-CB8mhq7j.js +0 -1
  395. package/dist/owletto/dist/assets/new-BBUb-VR4.js +0 -1
  396. package/dist/owletto/dist/assets/new-CBLJ25_w.js +0 -1
  397. package/dist/owletto/dist/assets/new-tTXB4qBW.js +0 -1
  398. package/dist/owletto/dist/assets/oauth-workspace-access-DearynqZ.js +0 -1
  399. package/dist/owletto/dist/assets/organization-BgdBg-PJ.js +0 -1
  400. package/dist/owletto/dist/assets/pending-seed-CPbfgnLX.js +0 -1
  401. package/dist/owletto/dist/assets/proposal-review-shell-D4YNrrye.js +0 -1
  402. package/dist/owletto/dist/assets/reset-password-B8tWPtIj.js +0 -1
  403. package/dist/owletto/dist/assets/runs-oHveuEUB.js +0 -1
  404. package/dist/owletto/dist/assets/runs-panel-C56GDaJm.js +0 -1
  405. package/dist/owletto/dist/assets/runs-table-BUKDjiBc.js +0 -1
  406. package/dist/owletto/dist/assets/schema-value-normalization-3JuM_r1H.js +0 -1
  407. package/dist/owletto/dist/assets/settings-DaKg6U5O.js +0 -1
  408. package/dist/owletto/dist/assets/settings-DhnRi2nq.js +0 -1
  409. package/dist/owletto/dist/assets/skills-BpQncuMC.js +0 -1
  410. package/dist/owletto/dist/assets/switch-BQ40_DMb.js +0 -1
  411. package/dist/owletto/dist/assets/use-applied-views-B-Z-Weji.js +0 -1
  412. package/dist/owletto/dist/assets/view-frame-C7ciEoLo.js +0 -1
  413. package/vendor/core/dist/contracts/worker/device-chat.d.ts +0 -4
  414. package/vendor/core/dist/contracts/worker/device-chat.js +0 -26
  415. package/vendor/core/dist/sentry.d.ts +0 -26
  416. package/vendor/core/dist/sentry.js +0 -133
  417. package/vendor/core/dist/tool-policy.d.ts +0 -74
  418. package/vendor/core/dist/tool-policy.js +0 -305
  419. package/vendor/core/dist/utils/sentry-scrubber.d.ts +0 -29
  420. package/vendor/core/dist/utils/sentry-scrubber.js +0 -228
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Advisory package-install detector shared by local and remote bash. The local
3
+ * isolate has no package managers registered; this check supplies an actionable
4
+ * error and runs before remote dispatch too. It is conservative text matching,
5
+ * not a shell security boundary: quoted/path-qualified executables and wrappers
6
+ * can evade it. Package availability and remote sandbox policy remain separate.
7
+ */
8
+ export declare function isDirectPackageInstallCommand(command: string): boolean;
9
+ //# sourceMappingURL=shell-safety.d.ts.map
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDirectPackageInstallCommand = isDirectPackageInstallCommand;
4
+ /** Fixed shell protections shared by the isolate and remote workspace tools. */
5
+ const bash_command_parser_1 = require("./bash-command-parser");
6
+ const PACKAGE_MANAGER_DENY_PREFIXES = [
7
+ "apt ",
8
+ "apt-get ",
9
+ "yum ",
10
+ "dnf ",
11
+ "apk ",
12
+ "pacman ",
13
+ "zypper ",
14
+ "brew ",
15
+ "nix-shell ",
16
+ "nix-env ",
17
+ // New-style nix CLI. `nix shell`/`run`/`develop` put arbitrary packages on
18
+ // PATH or fetch-and-execute them and `nix build`/`nix-store` realise arbitrary
19
+ // derivations — the same capability the old-style commands above already
20
+ // denied. A bare `nix ` prefix covers every subcommand (conservative, like
21
+ // `brew `); `nixfmt` and friends keep working because the prefix needs the
22
+ // trailing space. This matcher only recognizes the honestly-typed leading
23
+ // command; what actually contains a package manager differs per backend —
24
+ // see the header on isDirectPackageInstallCommand.
25
+ "nix ",
26
+ "nix-build ",
27
+ "nix-store ",
28
+ "nix-channel ",
29
+ "nix-instantiate ",
30
+ "nix-prefetch-url ",
31
+ "nix-collect-garbage ",
32
+ "nix-copy-closure ",
33
+ // Ad-hoc package runners: fetch-and-run a tool that is not installed.
34
+ // `npx`/`bunx` are absent — they prefer already-installed local binaries.
35
+ "uvx ",
36
+ "uv tool install ",
37
+ "uv tool run ",
38
+ "uv tool upgrade ",
39
+ "uv add ",
40
+ "pipx install ",
41
+ "pipx run ",
42
+ "pipx upgrade ",
43
+ "pipx upgrade-all ",
44
+ "pipx inject ",
45
+ "pipx reinstall ",
46
+ "pipx reinstall-all ",
47
+ "pipx runpip ",
48
+ "pnpm dlx ",
49
+ "yarn dlx ",
50
+ "sudo apt ",
51
+ "sudo apt-get ",
52
+ "sudo yum ",
53
+ "sudo dnf ",
54
+ "sudo apk ",
55
+ "sudo pacman ",
56
+ "sudo zypper ",
57
+ "sudo brew ",
58
+ "sudo nix-shell ",
59
+ "sudo nix-env ",
60
+ "sudo nix ",
61
+ "sudo nix-build ",
62
+ "sudo nix-store ",
63
+ "sudo nix-channel ",
64
+ "sudo nix-instantiate ",
65
+ "sudo nix-prefetch-url ",
66
+ "sudo nix-collect-garbage ",
67
+ "sudo nix-copy-closure ",
68
+ "pip install ",
69
+ "pip3 install ",
70
+ "uv pip install ",
71
+ "npm install ",
72
+ "npm i ",
73
+ "pnpm install ",
74
+ "pnpm add ",
75
+ "yarn install ",
76
+ "yarn add ",
77
+ "bun install ",
78
+ "bun add ",
79
+ "cargo install ",
80
+ "go install ",
81
+ "gem install ",
82
+ "poetry add ",
83
+ "composer require ",
84
+ ];
85
+ const DIRECT_PACKAGE_INSTALL_PATTERNS = [
86
+ /(^|[\s;|&()])(?:sudo\s+)?(?:apt|apt-get|yum|dnf|apk|pacman|zypper|brew)\s+(?:install|upgrade|add)\b/i,
87
+ /(^|[\s;|&()])(?:sudo\s+)?(?:nix-shell|nix-env)\b/i,
88
+ // New-style nix subcommands and the nix-* helpers, recognized after a shell
89
+ // operator or `sudo` (leading forms are already covered by the prefix list).
90
+ /(^|[\s;|&()])(?:sudo\s+)?nix\s+(?:profile|shell|run|develop|build|eval|flake|store|copy|bundle|repl|search|edit|print-dev-env|why-depends|derivation|realisation|registry|upgrade-nix)\b/i,
91
+ /(^|[\s;|&()])(?:sudo\s+)?nix-(?:build|store|channel|instantiate|prefetch-url|collect-garbage|copy-closure)\b/i,
92
+ /(^|[\s;|&()])(?:pip|pip3)\s+install\b/i,
93
+ /(^|[\s;|&()])uv\s+pip\s+install\b/i,
94
+ /(^|[\s;|&()])uv\s+(?:tool\s+(?:install|run|upgrade)|add)\b/i,
95
+ /(^|[\s;|&()])uvx\b/i,
96
+ /(^|[\s;|&()])pipx\s+(?:install|run|upgrade|upgrade-all|inject|reinstall|reinstall-all|runpip)\b/i,
97
+ /(^|[\s;|&()])npm\s+(?:install|i)\b/i,
98
+ /(^|[\s;|&()])pnpm\s+(?:install|add|dlx)\b/i,
99
+ /(^|[\s;|&()])yarn\s+(?:install|add|global\s+add|dlx)\b/i,
100
+ /(^|[\s;|&()])bun\s+(?:install|add)\b/i,
101
+ /(^|[\s;|&()])cargo\s+install\b/i,
102
+ /(^|[\s;|&()])go\s+install\b/i,
103
+ /(^|[\s;|&()])gem\s+install\b/i,
104
+ /(^|[\s;|&()])poetry\s+add\b/i,
105
+ /(^|[\s;|&()])composer\s+require\b/i,
106
+ ];
107
+ /**
108
+ * Longest command this matcher will scan. Past it the command is treated as an
109
+ * install attempt rather than parsed: the scan is superlinear in the command
110
+ * length and the caller does not control the input.
111
+ */
112
+ const MAX_SCANNED_COMMAND_LENGTH = 8192;
113
+ /**
114
+ * Advisory package-install detector shared by local and remote bash. The local
115
+ * isolate has no package managers registered; this check supplies an actionable
116
+ * error and runs before remote dispatch too. It is conservative text matching,
117
+ * not a shell security boundary: quoted/path-qualified executables and wrappers
118
+ * can evade it. Package availability and remote sandbox policy remain separate.
119
+ */
120
+ function isDirectPackageInstallCommand(command) {
121
+ const trimmed = command.trim().toLowerCase();
122
+ if (!trimmed) {
123
+ return false;
124
+ }
125
+ // The interpreter-body regex backtracks quadratically on adversarial option
126
+ // clusters (`sh -` repeated), and on the isolate lane the model writes this
127
+ // string, so an unbounded scan would block the guest's only thread for
128
+ // seconds. No honest install command is anywhere near this long, and the
129
+ // matcher's documented bias is to fail toward flagging.
130
+ if (trimmed.length > MAX_SCANNED_COMMAND_LENGTH) {
131
+ return true;
132
+ }
133
+ // Keep the platform's fixed prefix guard on every shell segment; this was
134
+ // previously transported in each turn's configurable bash policy.
135
+ if ((0, bash_command_parser_1.splitShellCommands)(command).some((segment) => PACKAGE_MANAGER_DENY_PREFIXES.some((prefix) => segment.toLowerCase().startsWith(prefix.toLowerCase()))))
136
+ return true;
137
+ const matches = (text) => PACKAGE_MANAGER_DENY_PREFIXES.some((prefix) => text.startsWith(prefix.toLowerCase())) || DIRECT_PACKAGE_INSTALL_PATTERNS.some((pattern) => pattern.test(text));
138
+ // Scan the command with quoted DATA blanked out and each data word's operands
139
+ // dropped, so a manager merely NAMED cannot match. Both scrubs are advisory
140
+ // and fail toward flagging: whatever they cannot prove to be data is matched.
141
+ if ((0, bash_command_parser_1.matchesBeforeArgumentData)((0, bash_command_parser_1.blankQuotedSpans)(trimmed), matches)) {
142
+ return true;
143
+ }
144
+ // Then scan `sh -c '…'` bodies, where the quoted text IS a command.
145
+ bash_command_parser_1.INTERPRETER_DASH_C.lastIndex = 0;
146
+ for (const m of trimmed.matchAll(bash_command_parser_1.INTERPRETER_DASH_C)) {
147
+ const body = m[2]?.trim();
148
+ if (body && (0, bash_command_parser_1.matchesBeforeArgumentData)((0, bash_command_parser_1.blankQuotedSpans)(body), matches)) {
149
+ return true;
150
+ }
151
+ }
152
+ return false;
153
+ }
154
+ //# sourceMappingURL=shell-safety.js.map
@@ -4,7 +4,7 @@
4
4
  * Split out of `types.ts` because this cluster is PURE: no import, no Node
5
5
  * builtin, no logger. That is what lets the isolate guest reach it through
6
6
  * `@lobu/core/agent-tooling` while `types.ts` itself keeps pulling the rest of
7
- * core in. Same rule as `tool-policy.ts`: never grow a Node import or a root
7
+ * core in. Same rule as `shell-safety.ts`: never grow a Node import or a root
8
8
  * `@lobu/core` import here.
9
9
  */
10
10
  /**
@@ -5,7 +5,7 @@
5
5
  * Split out of `types.ts` because this cluster is PURE: no import, no Node
6
6
  * builtin, no logger. That is what lets the isolate guest reach it through
7
7
  * `@lobu/core/agent-tooling` while `types.ts` itself keeps pulling the rest of
8
- * core in. Same rule as `tool-policy.ts`: never grow a Node import or a root
8
+ * core in. Same rule as `shell-safety.ts`: never grow a Node import or a root
9
9
  * `@lobu/core` import here.
10
10
  */
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * Pure by construction: no Node builtin, no `@lobu/core` barrel import. The
11
11
  * isolate lane bundles this into its guest, under the same standing rule as
12
- * `agent-tooling.ts` and `tool-policy.ts`.
12
+ * `agent-tooling.ts` and `shell-safety.ts`.
13
13
  */
14
14
  /** Retrieval evidence a client can join back to the agent's answer. */
15
15
  export interface ToolTraceSummary {
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * Pure by construction: no Node builtin, no `@lobu/core` barrel import. The
12
12
  * isolate lane bundles this into its guest, under the same standing rule as
13
- * `agent-tooling.ts` and `tool-policy.ts`.
13
+ * `agent-tooling.ts` and `shell-safety.ts`.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.isRetrievalTool = isRetrievalTool;
@@ -128,8 +128,6 @@ export interface AgentOptions {
128
128
  model?: string;
129
129
  maxTokens?: number;
130
130
  temperature?: number;
131
- allowedTools?: string | string[];
132
- disallowedTools?: string | string[];
133
131
  timeoutMinutes?: number | string;
134
132
  compaction?: AgentCompactionOptions;
135
133
  networkConfig?: Record<string, unknown>;
@@ -293,5 +291,5 @@ export interface RegistryEntry {
293
291
  type: string;
294
292
  apiUrl: string;
295
293
  }
296
- export type { AgentInlineGuardrail, NetworkConfig, NixConfig, SkillConfig, SkillsConfig, ThinkingLevel, ToolsConfig, } from "./contracts/agent-settings";
294
+ export type { AgentInlineGuardrail, NetworkConfig, NixConfig, SkillConfig, SkillsConfig, ThinkingLevel, } from "./contracts/agent-settings";
297
295
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Recursively remove credential material from diagnostic values.
3
+ * This is deliberately defensive: telemetry must never make an unusual
4
+ * application value or a circular error object throw another error.
5
+ */
6
+ export declare function scrubDiagnosticValue(value: unknown): unknown;
7
+ //# sourceMappingURL=diagnostic-scrubber.d.ts.map
@@ -0,0 +1,437 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scrubDiagnosticValue = scrubDiagnosticValue;
4
+ const secret_redaction_1 = require("./secret-redaction");
5
+ /**
6
+ * Secret as a QUERY PARAMETER name, and only there. `code` is an OAuth
7
+ * authorization code in `?code=…` but a Node/Postgres error code
8
+ * (`ECONNREFUSED`, `23505`) as an object key; `state` and `key` are the same
9
+ * story. Context decides, so this stays separate from the shared key denylist
10
+ * rather than widening it — redacting these as object keys would blank the
11
+ * fields triage actually reads.
12
+ */
13
+ const SECRET_QUERY_PARAMS = new Set(["state", "code", "key"]);
14
+ /**
15
+ * Credential key names the shared config denylist has no reason to carry:
16
+ * request signatures reach telemetry (webhook headers, presigned URLs) but
17
+ * never appear in connector config, and that denylist also feeds the CLI's
18
+ * deployment manifest hash — widening it there would change hashes.
19
+ */
20
+ const SECRET_KEY_SEGMENTS = new Set(["signature", "sig"]);
21
+ /**
22
+ * Whole (squashed) key names the shared denylist does not classify. Carried
23
+ * over from the bespoke sanitizer this module replaced: `verifier` and `state`
24
+ * are far too broad as segments (`freshness_state`, `run_state`), so these two
25
+ * are matched only as complete names. `authorizationheader` is the same story:
26
+ * HTTP client options carry it camel-cased (`authorizationHeader`), which the
27
+ * shared suffix denylist never sees, while `authorization` alone as a segment
28
+ * would sweep up `authorization_mode` and `authorization_policy`.
29
+ * `authorizationcode` is the OAuth code in any casing or separator style.
30
+ */
31
+ const SECRET_KEY_EXACT = new Set([
32
+ "codeverifier",
33
+ "sessionstate",
34
+ "authorizationheader",
35
+ "authorizationcode",
36
+ ]);
37
+ /**
38
+ * Concatenated credential names the separator-based rules never see:
39
+ * `PGPASSWORD`, `clientsecret`, `customapikey`, `myauthtoken` (the shared
40
+ * denylist has no `auth_?token` form), `idtoken`, and any other bare
41
+ * `*token` compound (`csrftoken`, `githubtoken`). Matched as a bare ending
42
+ * (case-insensitive, separator-free) so `tokenizer` and `keyboard` stay
43
+ * readable. Bare `token_count`-style usage keys stay readable because the
44
+ * benign-usage exemption runs before every classification below.
45
+ */
46
+ const BARE_CREDENTIAL_SUFFIXES = [
47
+ "password",
48
+ "passwd",
49
+ "secret",
50
+ "apikey",
51
+ "token",
52
+ "authtoken",
53
+ "idtoken",
54
+ ];
55
+ function hasBareCredentialSuffix(key, allowEqual = false) {
56
+ const flat = key.replace(/[^a-z0-9]/gi, "").toLowerCase();
57
+ return BARE_CREDENTIAL_SUFFIXES.some((suffix) => flat.endsWith(suffix) && (allowEqual || flat.length > suffix.length));
58
+ }
59
+ /**
60
+ * Split-form credential names the whole/suffix rules miss. Case boundaries
61
+ * are split before lowercasing (mirroring `normalizeKey` in secret-redaction,
62
+ * including its acronym run), so camelCase compounds pin correctly.
63
+ * Separator-less all-lowercase compounds fall through to the bare-suffix
64
+ * rule above.
65
+ */
66
+ function splitKeySegments(key) {
67
+ return key
68
+ .replace(/([A-Z])(?=[A-Z][a-z])/g, "$1_")
69
+ .replace(/([a-z0-9])([A-Z])/g, "$1_$2")
70
+ .replace(/[^a-z0-9]+/gi, "_")
71
+ .toLowerCase()
72
+ .split("_")
73
+ .filter((segment) => segment.length > 0);
74
+ }
75
+ /**
76
+ * An `authorization` segment anywhere near the front names a header or an
77
+ * auth credential (`x-authorization`, `requestAuthorizationValue`,
78
+ * `proxy_authorization_value`, `authorizationJson`): trailing (after an
79
+ * optional `header`/`headers`) it is a header and collapses; followed by
80
+ * anything but pure config qualifiers it is a credential container;
81
+ * followed only by config qualifiers (`authorization_mode`,
82
+ * `authorization_policy`) it stays readable.
83
+ *
84
+ * A leading credential run names a credential CONTAINER
85
+ * (`credentials_json`, `credentialsByName`, `password_confirmation`,
86
+ * `secret_value`, `oauthCredentialsJson`, `token_value`,
87
+ * `accessTokenValue`, `api_key_value`, `authtoken`, `csrftoken`,
88
+ * `githubtoken`, `clientsecretvalue`). The head must classify under the
89
+ * shared suffix rules, read as a suffix term, or end with a bare credential
90
+ * term the shared rules miss — a whole-name exact match never seeds one
91
+ * (`cookie`, `authorization`, `auth`, `bearer`), so `cookie-policy` stays
92
+ * readable. A two-segment usage metric (`token_count`, `token_total`,
93
+ * `max_tokens`, `totalTokens`) is exempt everywhere: usage metadata stays
94
+ * readable per the logger contract. Only the leading run (bounded below)
95
+ * is scanned, so pathological keys stay linear. Container semantics live in
96
+ * the walk: a scalar beneath one IS the serialized credential and collapses,
97
+ * while a structured value beneath one recurses with every descendant
98
+ * treated as credential-adjacent (a map's leaves cannot be trusted by key
99
+ * name alone — `credentialsByName.github` proves it).
100
+ */
101
+ /** Qualifiers that mark a key as usage metadata, never a credential. */
102
+ const BENIGN_COUNT_QUALIFIERS = new Set([
103
+ "count",
104
+ "counts",
105
+ "total",
106
+ "totals",
107
+ "used",
108
+ "usage",
109
+ "remaining",
110
+ "limit",
111
+ "limits",
112
+ "max",
113
+ "quota",
114
+ "quotas",
115
+ ]);
116
+ /** Config qualifiers that keep an `authorization` key readable. */
117
+ const AUTH_CONFIG_QUALIFIERS = new Set(["mode", "modes", "policy", "policies"]);
118
+ /**
119
+ * Whether a key segment run reads as a credential SUFFIX term rather than
120
+ * merely a whole name: `x_token` still classifies, so `token` seeds
121
+ * compounds, while `x_cookie`, `x_auth` and `x_bearer` have no credential
122
+ * reading, so those whole names never seed one.
123
+ */
124
+ function isSuffixTerm(head) {
125
+ return (0, secret_redaction_1.isSecretKey)(`x_${head}`) || (0, secret_redaction_1.isSecretKey)(squashKey(`x_${head}`));
126
+ }
127
+ /**
128
+ * Whether a head classifies solely as a whole name (the shared exact set:
129
+ * `cookie`, `authorization`, `auth`, `bearer`) rather than as a suffix term
130
+ * or bare compound. Whole-name heads never seed a compound.
131
+ */
132
+ function isWholeNameOnly(head) {
133
+ const whole = (0, secret_redaction_1.isSecretKey)(head) || (0, secret_redaction_1.isSecretKey)(squashKey(head));
134
+ if (!whole)
135
+ return false;
136
+ return !isSuffixTerm(head) && !hasBareCredentialSuffix(head, true);
137
+ }
138
+ /** Two-segment usage metrics (`token_count`, `max_tokens`, `totalTokens`). */
139
+ function isBenignUsageKey(key) {
140
+ const segments = splitKeySegments(key);
141
+ if (segments.length !== 2)
142
+ return false;
143
+ const [first, second] = segments;
144
+ const isTokenWord = (segment) => segment === "token" || segment === "tokens";
145
+ return ((isTokenWord(first) && BENIGN_COUNT_QUALIFIERS.has(second)) ||
146
+ (BENIGN_COUNT_QUALIFIERS.has(first) && isTokenWord(second)));
147
+ }
148
+ /** Longest credential-name prefix worth testing; real compounds are short. */
149
+ const MAX_CREDENTIAL_PREFIX_PARTS = 8;
150
+ function classifyAuthorization(key) {
151
+ const segments = splitKeySegments(key);
152
+ const limit = Math.min(segments.length, MAX_CREDENTIAL_PREFIX_PARTS);
153
+ for (let index = 0; index < limit; index++) {
154
+ if (segments[index] !== "authorization")
155
+ continue;
156
+ const tail = segments
157
+ .slice(index + 1)
158
+ .filter((segment) => segment !== "header" && segment !== "headers");
159
+ if (tail.length === 0)
160
+ return "strong";
161
+ if (tail.every((segment) => AUTH_CONFIG_QUALIFIERS.has(segment)))
162
+ continue;
163
+ return "container";
164
+ }
165
+ return null;
166
+ }
167
+ function hasCredentialSegment(key) {
168
+ if (isBenignUsageKey(key))
169
+ return false;
170
+ if (classifyAuthorization(key) === "container")
171
+ return true;
172
+ const segments = splitKeySegments(key);
173
+ // Bounded lookahead: real credential compounds are short
174
+ // (`access_token`, `oauth_credentials`); scanning an unbounded prefix run
175
+ // turns a pathological key into quadratic work.
176
+ const end = Math.min(segments.length, MAX_CREDENTIAL_PREFIX_PARTS);
177
+ for (let length = 1; length <= end; length++) {
178
+ const head = segments.slice(0, length).join("_");
179
+ if (isWholeNameOnly(head))
180
+ continue;
181
+ const qualifies = (0, secret_redaction_1.isSecretKey)(head) ||
182
+ (0, secret_redaction_1.isSecretKey)(squashKey(head)) ||
183
+ hasBareCredentialSuffix(head, true);
184
+ if (!qualifies)
185
+ continue;
186
+ return true;
187
+ }
188
+ // Separator-free compounds with the credential term in the middle
189
+ // (`clientsecretvalue`): the shared rules and split segment tests never
190
+ // see them. `token` and bare `key` stay out here — `tokenizer`,
191
+ // `keyboard` and usage counters stay readable.
192
+ const flat = squashKey(key);
193
+ return SUBSTRING_CREDENTIALS.some((term) => flat.includes(term));
194
+ }
195
+ /** Credential terms matched as substrings of separator-free compounds. */
196
+ const SUBSTRING_CREDENTIALS = [
197
+ "secret",
198
+ "password",
199
+ "passwd",
200
+ "credential",
201
+ "credentials",
202
+ "apikey",
203
+ ];
204
+ /** Bound recursive work on diagnostic values. */
205
+ const MAX_DEPTH = 8;
206
+ const MAX_ENTRIES = 1000;
207
+ /** Separator/case-squashed form, for keys core's camel-case split can't read. */
208
+ function squashKey(key) {
209
+ return key.replace(/[^a-z0-9]/gi, "").toLowerCase();
210
+ }
211
+ /**
212
+ * Object and header keys. Core's normalizer splits on case boundaries, so an
213
+ * arbitrarily-cased header (`CoOkIe`) normalizes to `co_ok_ie` and misses;
214
+ * test the squashed form too.
215
+ */
216
+ function isSecretObjectKey(key) {
217
+ if (isBenignUsageKey(key))
218
+ return false;
219
+ return isStrongSecretKey(key) || hasCredentialSegment(key);
220
+ }
221
+ /**
222
+ * The collapsing half of key classification: a key whose NAME alone proves
223
+ * the value is a credential, so the whole value is replaced without
224
+ * inspection. Credential CONTAINERS (`hasCredentialSegment`) are deliberately
225
+ * excluded — their collapse rule depends on the value type (see the walk),
226
+ * and collapsing a map parent would destroy surviving key names the Loki
227
+ * connector pre-redacted.
228
+ */
229
+ function isStrongSecretKey(key) {
230
+ if (isBenignUsageKey(key))
231
+ return false;
232
+ if ((0, secret_redaction_1.isSecretKey)(key))
233
+ return true;
234
+ if ((0, secret_redaction_1.isSecretKey)(squashKey(key)))
235
+ return true;
236
+ if (SECRET_KEY_EXACT.has(squashKey(key)))
237
+ return true;
238
+ if (classifyAuthorization(key) === "strong")
239
+ return true;
240
+ if (hasBareCredentialSuffix(key))
241
+ return true;
242
+ // Matched per separated segment, not against the squashed whole:
243
+ // `X-Hub-Signature-256` squashes to `xhubsignature256`, which no exact set
244
+ // can ever hold, so every real signature header would slip through.
245
+ // Segment-matched signature headers collapse like any other proven key.
246
+ return key
247
+ .replace(/[^a-z0-9]+/gi, "_")
248
+ .toLowerCase()
249
+ .split("_")
250
+ .some((segment) => SECRET_KEY_SEGMENTS.has(segment));
251
+ }
252
+ const URL_PATTERN = /https?:\/\/[^\s"'<>]+/gi;
253
+ /**
254
+ * A relative URL (`/api/v1/files/a?token=…`) and a raw
255
+ * `request.query_string` (`token=…`, no scheme and no path) never match
256
+ * URL_PATTERN, so the signed-download token would survive a URL-only scrub.
257
+ * The separator absorbs trailing whitespace because cookie serialization is
258
+ * `a=b; c=d`: without it every pair after the first space goes unredacted.
259
+ */
260
+ const QUERY_PAIR_PATTERN = /([?&;]\s*|^)([A-Za-z0-9_.\-%[\]]+)=("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^&;\s"'<>]*)/g;
261
+ function decodeKey(raw) {
262
+ try {
263
+ return decodeURIComponent(raw);
264
+ }
265
+ catch {
266
+ return raw;
267
+ }
268
+ }
269
+ function isSecretQueryParam(name) {
270
+ const key = decodeKey(name);
271
+ return isSecretObjectKey(key) || SECRET_QUERY_PARAMS.has(squashKey(key));
272
+ }
273
+ /**
274
+ * Object keys are data too: attribution and cache maps keyed by URL or raw
275
+ * `name=value` diagnostics carry credentials in the KEY text, where
276
+ * value-side redaction never reaches. Redact the secret portion while keeping
277
+ * the key identifiable. Clean keys (the common case) return untouched; two
278
+ * distinct keys that scrub identically collapse, last wins.
279
+ */
280
+ function scrubKey(key) {
281
+ if (!key.includes("?") &&
282
+ !key.includes(";") &&
283
+ !key.includes("=") &&
284
+ !key.includes("://")) {
285
+ return key;
286
+ }
287
+ return scrubString(key);
288
+ }
289
+ function scrubString(value) {
290
+ // `postgres://user:pa55@host/db` carries its credential in the userinfo, not
291
+ // in a query pair or a secret-named key, so neither pass below would see it.
292
+ const withoutUriCredentials = (0, secret_redaction_1.redactUriCredentials)(value);
293
+ // Scrub quoted query values before URL matching stops at their opening quote
294
+ // and removes the key that identifies the remaining text as a credential.
295
+ const withoutQueries = withoutUriCredentials.replace(QUERY_PAIR_PATTERN, (match, lead, name, raw) => isSecretQueryParam(name)
296
+ ? `${lead}${name}=[REDACTED]${raw.match(/[),.;]+$/)?.[0] ?? ""}`
297
+ : match);
298
+ const withoutUrlQueries = withoutQueries.replace(URL_PATTERN, (candidate) => {
299
+ // Trailing sentence punctuation is not part of the URL, but it is part of
300
+ // the message: strip it to parse, then put it back.
301
+ const trailing = candidate.match(/[),.;]+$/)?.[0] ?? "";
302
+ const bare = trailing ? candidate.slice(0, -trailing.length) : candidate;
303
+ try {
304
+ const url = new URL(bare);
305
+ return `${url.origin}${url.pathname}${trailing}`;
306
+ }
307
+ catch {
308
+ return candidate;
309
+ }
310
+ });
311
+ // Error messages can embed key=value diagnostics outside a URL. Keep codes
312
+ // and states useful there; only credential-named assignments are sensitive.
313
+ return withoutUrlQueries.replace(/(\s)([A-Za-z0-9_.%-]+)=("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^&;\s"'<>]*)/g, (match, lead, name) => isSecretObjectKey(decodeKey(name)) ? `${lead}${name}=[REDACTED]` : match);
314
+ }
315
+ /**
316
+ * Recursively remove credential material from diagnostic values.
317
+ * This is deliberately defensive: telemetry must never make an unusual
318
+ * application value or a circular error object throw another error.
319
+ */
320
+ function scrubDiagnosticValue(value) {
321
+ const seen = new WeakSet();
322
+ function scrub(current, depth = 0, underCredentialContainer = false) {
323
+ if (typeof current === "string")
324
+ return underCredentialContainer ? "[REDACTED]" : scrubString(current);
325
+ // A copied toJSON hook could reintroduce secrets after this walk finishes.
326
+ if (typeof current === "function")
327
+ return "[Function]";
328
+ if (current === null || typeof current !== "object")
329
+ return underCredentialContainer ? "[REDACTED]" : current;
330
+ if (seen.has(current))
331
+ return "[CIRCULAR]";
332
+ // Bound deeply nested values before cloning them on the logging hot path.
333
+ if (depth >= MAX_DEPTH)
334
+ return "[TRUNCATED]";
335
+ // Tracks the current PATH, not every node ever visited. Two siblings may
336
+ // legitimately hold the same reference, and reporting the second one as
337
+ // [CIRCULAR] would corrupt the event; only an ancestor is a real cycle.
338
+ seen.add(current);
339
+ try {
340
+ return walk(current, depth, underCredentialContainer);
341
+ }
342
+ finally {
343
+ seen.delete(current);
344
+ }
345
+ }
346
+ function walk(current, depth, underCredentialContainer) {
347
+ // An Error carries name/message/stack on its prototype, so Object.keys
348
+ // returns nothing and a plain walk would flatten it to `{}` — discarding
349
+ // the only part of the event worth reading.
350
+ if (current instanceof Error) {
351
+ // message/stack are scrubbed as text; under a credential container
352
+ // they ARE the credential and collapse instead. The name always gets
353
+ // text scrubbing but stays readable: a custom (even non-enumerable)
354
+ // name can carry `password=...`, which key-based redaction never sees,
355
+ // while the error class itself is triage payload.
356
+ const serialized = {
357
+ name: scrubString(String(current.name ?? "")),
358
+ message: underCredentialContainer
359
+ ? "[REDACTED]"
360
+ : scrubString(current.message),
361
+ };
362
+ if (current.stack)
363
+ serialized.stack = underCredentialContainer
364
+ ? "[REDACTED]"
365
+ : scrubString(current.stack);
366
+ if (current.cause !== undefined)
367
+ serialized.cause = scrub(current.cause, depth + 1, underCredentialContainer);
368
+ // AggregateError.errors is non-enumerable, just like cause and stack.
369
+ // Reuse the same walk so nested failures keep their codes without
370
+ // bypassing credential redaction, depth limits, or cycle detection.
371
+ if ("errors" in current && Array.isArray(current.errors))
372
+ serialized.errors = scrub(current.errors, depth + 1, underCredentialContainer);
373
+ for (const key of Object.keys(current)) {
374
+ const outKey = scrubKey(key);
375
+ if (isStrongSecretKey(key)) {
376
+ serialized[outKey] = "[REDACTED]";
377
+ continue;
378
+ }
379
+ // Container adjacency propagates: scalars beneath one collapse,
380
+ // structured values recurse with the flag set. Usage-metric keys
381
+ // never start adjacency themselves (an inherited flag still applies).
382
+ const childContainer = underCredentialContainer ||
383
+ (!isBenignUsageKey(key) && hasCredentialSegment(key));
384
+ const value = current[key];
385
+ serialized[outKey] = scrub(value, depth + 1, childContainer);
386
+ }
387
+ return serialized;
388
+ }
389
+ // Built-ins whose state is not enumerable: walking them as plain objects
390
+ // yields `{}` (Date, Map, Set, RegExp) or one key per byte (Buffer). A
391
+ // readable summary costs less payload and tells triage strictly more.
392
+ // A RegExp source can itself embed a credential (`/password=.../`),
393
+ // so it takes the same string scrubbing as any other message text.
394
+ if (current instanceof Date)
395
+ return current.toISOString();
396
+ if (current instanceof RegExp)
397
+ return underCredentialContainer
398
+ ? "[REDACTED]"
399
+ : scrubString(String(current));
400
+ if (ArrayBuffer.isView(current)) {
401
+ return `[${current.constructor.name} ${current.byteLength} bytes]`;
402
+ }
403
+ if (current instanceof Map)
404
+ return `[Map ${current.size} entries]`;
405
+ if (current instanceof Set)
406
+ return `[Set ${current.size} items]`;
407
+ if (Array.isArray(current)) {
408
+ return current
409
+ .slice(0, MAX_ENTRIES)
410
+ .map((item) => scrub(item, depth + 1, underCredentialContainer));
411
+ }
412
+ const result = {};
413
+ try {
414
+ for (const key of Object.keys(current).slice(0, MAX_ENTRIES)) {
415
+ const outKey = scrubKey(key);
416
+ if (isStrongSecretKey(key)) {
417
+ result[outKey] = "[REDACTED]";
418
+ continue;
419
+ }
420
+ const childContainer = underCredentialContainer ||
421
+ (!isBenignUsageKey(key) && hasCredentialSegment(key));
422
+ try {
423
+ result[outKey] = scrub(current[key], depth + 1, childContainer);
424
+ }
425
+ catch {
426
+ result[outKey] = "[UNREADABLE]";
427
+ }
428
+ }
429
+ }
430
+ catch {
431
+ return "[UNREADABLE]";
432
+ }
433
+ return result;
434
+ }
435
+ return scrub(value);
436
+ }
437
+ //# sourceMappingURL=diagnostic-scrubber.js.map