stableclaw 2026.4.6 → 2026.4.8

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 (2751) hide show
  1. package/README.md +22 -290
  2. package/package.json +1 -73
  3. package/dist/.buildstamp +0 -1
  4. package/dist/abort-C9luPDzM.js +0 -192
  5. package/dist/abort-cutoff-B1ws4nOb.js +0 -56
  6. package/dist/abort-cutoff.runtime-DyRUNN6p.js +0 -20
  7. package/dist/abort-cutoff.runtime.js +0 -1
  8. package/dist/abort-primitives-CGyFwJ93.js +0 -92
  9. package/dist/abort-signal-CrrraMAi.js +0 -13
  10. package/dist/abort.runtime-oBiooAFx.js +0 -2
  11. package/dist/abort.runtime.js +0 -1
  12. package/dist/access-DIqrGWVo.js +0 -81
  13. package/dist/access-control-DfV6HWO9.js +0 -152
  14. package/dist/account-action-gate-eHi2MB4J.js +0 -12
  15. package/dist/account-core-DOelA7Wl.js +0 -26
  16. package/dist/account-helpers-CafpxP7V.js +0 -1
  17. package/dist/account-helpers-jJOgsae3.js +0 -102
  18. package/dist/account-id-DXal1kRJ.js +0 -1
  19. package/dist/account-inspect-CfagweUE.js +0 -158
  20. package/dist/account-inspect-DOt4IDX6.js +0 -92
  21. package/dist/account-inspect-pnXre-7b.js +0 -81
  22. package/dist/account-lookup-CLJxpfHr.js +0 -17
  23. package/dist/account-resolution-CbKUJkzG.js +0 -30
  24. package/dist/account-selection-B8a_DqXo.js +0 -222
  25. package/dist/account-snapshot-fields-mr-1u321.js +0 -130
  26. package/dist/account-summary-DA6ds0Hk.js +0 -36
  27. package/dist/accounts-CO-lK8jJ.js +0 -150
  28. package/dist/accounts-D419O6Gq.js +0 -2
  29. package/dist/accounts-DKMLcV4g.js +0 -132
  30. package/dist/accounts-DdiZwn14.js +0 -57
  31. package/dist/accounts-SWhOQhoA.js +0 -58
  32. package/dist/accounts-iR2U_Vs4.js +0 -41
  33. package/dist/accounts-jsSym1md.js +0 -102
  34. package/dist/accounts-p4Eir-wB.js +0 -107
  35. package/dist/accounts-uAWNlC7q.js +0 -94
  36. package/dist/accounts-x23pAGjm.js +0 -137
  37. package/dist/accounts.runtime-PJOhs60R.js +0 -2
  38. package/dist/accounts.runtime.js +0 -1
  39. package/dist/ack-reactions-fcKs7CQ_.js +0 -43
  40. package/dist/acp-cli-ByWTIhFx.js +0 -2207
  41. package/dist/acp-runtime-D7wrReOP.js +0 -8
  42. package/dist/acp-stateful-target-driver-DY2EfkQt.js +0 -60
  43. package/dist/action-runtime-BdRtmydq.js +0 -318
  44. package/dist/action-runtime-DvNB5A61.js +0 -72
  45. package/dist/action-runtime-api-BnVs42oX.js +0 -1028
  46. package/dist/actions-CUYHtUqe.js +0 -531
  47. package/dist/actions.runtime-BBrSlYkH.js +0 -18
  48. package/dist/actions.runtime-DB4aKmBO.js +0 -5
  49. package/dist/actions.runtime-bdKprwSE.js +0 -2
  50. package/dist/actions.runtime.js +0 -1
  51. package/dist/active-listener-SB9ihcaC.js +0 -46
  52. package/dist/agent-command-C_MGil8o.js +0 -1457
  53. package/dist/agent-list-MRXQwyo0.js +0 -52
  54. package/dist/agent-media-payload-DDTSvr-n.js +0 -17
  55. package/dist/agent-paths-D711oayD.js +0 -12
  56. package/dist/agent-runner-utils-DEYzwZHa.js +0 -182
  57. package/dist/agent-runner.runtime-v2uIsAVy.js +0 -2218
  58. package/dist/agent-runner.runtime.js +0 -1
  59. package/dist/agent-runtime-Cz19IsmJ.js +0 -142
  60. package/dist/agent-s4m0Xp6V.js +0 -2
  61. package/dist/agent-scope-rWWUivuC.js +0 -215
  62. package/dist/agent-tools-login-DU1gQC9-.js +0 -57
  63. package/dist/agents/auth-profiles.runtime.js +0 -7
  64. package/dist/agents/pi-model-discovery-runtime.js +0 -2
  65. package/dist/agents-B2W3IoEe.js +0 -888
  66. package/dist/agents-DmE3LRim.js +0 -5
  67. package/dist/agents.config-D6XoJFQ-.js +0 -3
  68. package/dist/agents.config-Ui_tQc3C.js +0 -121
  69. package/dist/allow-from-Bj0HDNYh.js +0 -20
  70. package/dist/allow-from-CJwSUt_K.js +0 -9
  71. package/dist/allow-from-xOap1t02.js +0 -62
  72. package/dist/allow-list-DeRUbyj4.js +0 -319
  73. package/dist/allowed-updates-aOgPxM0g.js +0 -31
  74. package/dist/allowlist-config-edit-Ch2EvAYo.js +0 -279
  75. package/dist/allowlist-match-Dm6AqFEs.js +0 -63
  76. package/dist/ansi-B_0KjIJj.js +0 -54
  77. package/dist/anthropic-vertex-Stff_3_3.js +0 -21
  78. package/dist/anthropic-vertex-stream-DgR8-m-G.js +0 -653
  79. package/dist/api-7Pf2fGBp.js +0 -11
  80. package/dist/api-B80kCRiV.js +0 -11
  81. package/dist/api-B8_Wwelx.js +0 -2
  82. package/dist/api-BLI24uxW.js +0 -2
  83. package/dist/api-BLSg8PM8.js +0 -2
  84. package/dist/api-BRy2h4ZA.js +0 -2
  85. package/dist/api-BU_YBaOK.js +0 -3
  86. package/dist/api-BXQjqvPC.js +0 -2
  87. package/dist/api-BY9iT-AK.js +0 -106
  88. package/dist/api-BipiQQoS.js +0 -2
  89. package/dist/api-Bk5mFOju.js +0 -10
  90. package/dist/api-BrsLZRXn.js +0 -3
  91. package/dist/api-C16j1Xno.js +0 -2
  92. package/dist/api-CGtiPyfv.js +0 -8358
  93. package/dist/api-CHIsf5Wl.js +0 -21
  94. package/dist/api-CP9q4gi6.js +0 -19
  95. package/dist/api-CWPDpJCM.js +0 -2
  96. package/dist/api-CaMdAP9T.js +0 -2
  97. package/dist/api-CftMlodx.js +0 -5
  98. package/dist/api-Cpj_QQAF.js +0 -5
  99. package/dist/api-D13mhDzE.js +0 -33
  100. package/dist/api-DGcbqpSh.js +0 -2
  101. package/dist/api-DIGFhGqm.js +0 -30
  102. package/dist/api-DNxTJAiA.js +0 -5
  103. package/dist/api-DasNTWRo.js +0 -2
  104. package/dist/api-Dn7n2sWC.js +0 -74
  105. package/dist/api-Drq06O1M2.js +0 -6
  106. package/dist/api-OOJHubHS.js +0 -77
  107. package/dist/api-XH46JouJ.js +0 -2
  108. package/dist/api-builder-uuKvRs_O.js +0 -66
  109. package/dist/api-e3cIcFaV.js +0 -1
  110. package/dist/api-fetch-CvBBI8q8.js +0 -35
  111. package/dist/api-key-rotation-BCssmYGp.js +0 -150
  112. package/dist/api-rPpH8518.js +0 -322
  113. package/dist/api-w-46PN0B.js +0 -2
  114. package/dist/apply-DfjUTAkv.js +0 -485
  115. package/dist/apply.runtime-B-srtEUl.js +0 -2
  116. package/dist/apply.runtime-DOG87kW8.js +0 -166
  117. package/dist/apply.runtime.js +0 -1
  118. package/dist/approval-native-CI9-iVJa.js +0 -79
  119. package/dist/approval-native-runtime-2AVlvrdL.js +0 -399
  120. package/dist/approval-renderers-BTKeDNRo.js +0 -87
  121. package/dist/approval-runtime-DIA8ohXa.js +0 -262
  122. package/dist/archive-BaCqqQP1.js +0 -537
  123. package/dist/arg-split-get0R_Yr.js +0 -38
  124. package/dist/artifacts-DXKlQp1z.js +0 -52
  125. package/dist/assistant-error-format-CFSPB8qt.js +0 -109
  126. package/dist/async-lock-QqhPYwhW.js +0 -19
  127. package/dist/attachment-normalize-CMMyswNa.js +0 -921
  128. package/dist/audio-BxqNDSFq.js +0 -53
  129. package/dist/audio-DZWA6M9B.js +0 -41
  130. package/dist/audit-86J-sIQq.js +0 -54
  131. package/dist/audit-D9O3O-41.js +0 -86
  132. package/dist/audit-DwAT-Kzg.js +0 -892
  133. package/dist/audit-channel.allow-from.runtime-DmuUvr2f.js +0 -5
  134. package/dist/audit-channel.allow-from.runtime.js +0 -1
  135. package/dist/audit-channel.collect.runtime-B76LAkrF.js +0 -528
  136. package/dist/audit-channel.collect.runtime.js +0 -1
  137. package/dist/audit-channel.discord.runtime-qM5u1Hnl.js +0 -5
  138. package/dist/audit-channel.discord.runtime.js +0 -1
  139. package/dist/audit-channel.telegram.runtime-DpwmRUPy.js +0 -8
  140. package/dist/audit-channel.telegram.runtime.js +0 -1
  141. package/dist/audit-channel.zalouser.runtime-CzlFZYsv.js +0 -5
  142. package/dist/audit-channel.zalouser.runtime.js +0 -1
  143. package/dist/audit-extra.async-BupKW2BB.js +0 -820
  144. package/dist/audit-fs-B3GdTjId.js +0 -375
  145. package/dist/audit-membership-runtime-n195y1jy.js +0 -55
  146. package/dist/audit.deep.runtime-2gZPpwj8.js +0 -2
  147. package/dist/audit.deep.runtime.js +0 -1
  148. package/dist/audit.nondeep.runtime-6MT8p_25.js +0 -831
  149. package/dist/audit.nondeep.runtime.js +0 -1
  150. package/dist/audit.runtime-jdG0-1Bq.js +0 -7
  151. package/dist/audit.runtime.js +0 -1
  152. package/dist/auth-CmL8nlqP.js +0 -371
  153. package/dist/auth-Zya_1BCc.js +0 -181
  154. package/dist/auth-choice-CSSk-2VN.js +0 -69
  155. package/dist/auth-choice-Uyll2O8p.js +0 -341
  156. package/dist/auth-choice-legacy-5XgU4yCZ.js +0 -44
  157. package/dist/auth-choice-options-DTRb6fq4.js +0 -98
  158. package/dist/auth-choice-prompt-BAQTSD2R.js +0 -36
  159. package/dist/auth-choice-prompt-D6qkTw8h.js +0 -2
  160. package/dist/auth-choice-x5Cm9EXp.js +0 -3
  161. package/dist/auth-choice.apply-helpers-CtKCiOT4.js +0 -2
  162. package/dist/auth-choice.plugin-providers.runtime-BVH7Kq_W.js +0 -11
  163. package/dist/auth-choice.plugin-providers.runtime.js +0 -1
  164. package/dist/auth-health-BBleirOY.js +0 -165
  165. package/dist/auth-mode-policy-BD7_M2AG.js +0 -18
  166. package/dist/auth-profiles-B0SpzBJv.js +0 -440
  167. package/dist/auth-rate-limit-OkMcM1wH.js +0 -119
  168. package/dist/auth-store-Bro-SY1-.js +0 -242
  169. package/dist/avatar-policy-pho6U35i.js +0 -67
  170. package/dist/backend-config-CNAjcjho.js +0 -311
  171. package/dist/backoff-nvVV-tHk.js +0 -18
  172. package/dist/backup-create-CkkM1HNg.js +0 -462
  173. package/dist/backup-health-BWSliymu.js +0 -59
  174. package/dist/banner-DPWatUan.js +0 -370
  175. package/dist/banner-lDKgB6uE.js +0 -2
  176. package/dist/base-session-key-CRSigEPk.js +0 -14
  177. package/dist/binaries-CWBYavgU.js +0 -2
  178. package/dist/binaries-sPf-9aLM.js +0 -11
  179. package/dist/binding-registry-BkSvI4jO.js +0 -520
  180. package/dist/binding-targets-CdIq3brX.js +0 -99
  181. package/dist/bindings-AuReyzvX.js +0 -21
  182. package/dist/bindings-CYhLRcr8.js +0 -69
  183. package/dist/block-reply-pipeline-GSCCinHx.js +0 -266
  184. package/dist/block-streaming-4outFa6R.js +0 -107
  185. package/dist/bluebubbles-CorTCHc9.js +0 -64
  186. package/dist/bluebubbles-D2WymlOg.js +0 -235
  187. package/dist/bluebubbles-policy-C3d8eqhQ.js +0 -13
  188. package/dist/bonjour-cache-cleanup-BZJ-GrdX.js +0 -126
  189. package/dist/boolean-BEhDlAk_.js +0 -29
  190. package/dist/boolean-param-B807dWHx.js +0 -13
  191. package/dist/bot-BM1bybV7.js +0 -4268
  192. package/dist/bot-message-context-CdedyAq_.js +0 -2
  193. package/dist/bot-message-context-DKGx6N8p.js +0 -1175
  194. package/dist/bot-message-context.runtime-ClW1x1V5.js +0 -7
  195. package/dist/bot-message-context.runtime.js +0 -1
  196. package/dist/bot-message-context.session.runtime-BWjdkRuf.js +0 -12
  197. package/dist/bot-message-context.session.runtime.js +0 -1
  198. package/dist/bot-native-commands.delivery.runtime-CgfbR-Nj.js +0 -3
  199. package/dist/bot-native-commands.delivery.runtime.js +0 -1
  200. package/dist/bot-native-commands.runtime-DCz7w0aK.js +0 -11
  201. package/dist/bot-native-commands.runtime.js +0 -1
  202. package/dist/boundary-file-read-DB4ibbUg.js +0 -192
  203. package/dist/brave-web-search-provider-B7m_Mprt.js +0 -441
  204. package/dist/brew-B9JEV5Jj.js +0 -44
  205. package/dist/browser-config-D_OlwMzh.js +0 -226
  206. package/dist/browser-open-C9FOO4U_.js +0 -94
  207. package/dist/browser-runtime-CnWZ_eLQ.js +0 -185
  208. package/dist/browser-support-Cdp2Gr_6.js +0 -34
  209. package/dist/btw-command-CPUGSdlD.js +0 -16
  210. package/dist/build-info.json +0 -5
  211. package/dist/bundle-lsp-CCIAK1od.js +0 -93
  212. package/dist/bundled/boot-md/HOOK.md +0 -20
  213. package/dist/bundled/boot-md/handler.js +0 -180
  214. package/dist/bundled/bootstrap-extra-files/HOOK.md +0 -53
  215. package/dist/bundled/bootstrap-extra-files/handler.js +0 -42
  216. package/dist/bundled/command-logger/HOOK.md +0 -122
  217. package/dist/bundled/command-logger/handler.js +0 -56
  218. package/dist/bundled/session-memory/HOOK.md +0 -108
  219. package/dist/bundled/session-memory/handler.js +0 -196
  220. package/dist/bundled/workflow-summary/HOOK.md +0 -123
  221. package/dist/bundled/workflow-summary/handler.js +0 -115
  222. package/dist/bundled-capability-metadata-BpPgIy_5.js +0 -40
  223. package/dist/bundled-compat-BLlVmkDi.js +0 -64
  224. package/dist/bundled-sources-BQTCt2mJ.js +0 -53
  225. package/dist/button-types-B3_mzf8P.js +0 -54
  226. package/dist/cache-controls-DBdT4I-H.js +0 -40
  227. package/dist/call-dy-GwrXS.js +0 -649
  228. package/dist/call-ti-nPnzT.js +0 -2
  229. package/dist/canvas-host/a2ui/.bundle.hash +0 -1
  230. package/dist/canvas-host/a2ui/a2ui.bundle.js +0 -14896
  231. package/dist/canvas-host/a2ui/index.html +0 -307
  232. package/dist/capability-provider-runtime-CFUC5NbJ.js +0 -40
  233. package/dist/catalog-5PPtilI5.js +0 -274
  234. package/dist/channel-2EW4xzvV.js +0 -788
  235. package/dist/channel-BiRtGLF8.js +0 -1135
  236. package/dist/channel-C3AVw0Nl.js +0 -883
  237. package/dist/channel-CPe2XmyD.js +0 -1217
  238. package/dist/channel-CVFWRvjf.js +0 -337
  239. package/dist/channel-Cs0onQ6d.js +0 -4976
  240. package/dist/channel-D18v9r53.js +0 -1661
  241. package/dist/channel-D2n2s8Le.js +0 -208
  242. package/dist/channel-DWKApPW2.js +0 -454
  243. package/dist/channel-Depm5C-f.js +0 -800
  244. package/dist/channel-DwTcZxFU.js +0 -1129
  245. package/dist/channel-LT5vI3EK.js +0 -361
  246. package/dist/channel-XgThIGmf.js +0 -698
  247. package/dist/channel-account-context-CWd3uN_m.js +0 -104
  248. package/dist/channel-actions-DSvaYD1T.js +0 -39
  249. package/dist/channel-bQKtZIt6.js +0 -599
  250. package/dist/channel-catalog.json +0 -3
  251. package/dist/channel-config-D0eO5f5m.js +0 -115
  252. package/dist/channel-config-helpers-CLFL8FLU.js +0 -482
  253. package/dist/channel-config-primitives-DwsP66Ak.js +0 -3
  254. package/dist/channel-config-schema-DsguzRfd.js +0 -6
  255. package/dist/channel-config-writes-DQZOOZZ8.js +0 -1
  256. package/dist/channel-configured-B6WgvouH.js +0 -108
  257. package/dist/channel-feedback-DiLm9hqS.js +0 -257
  258. package/dist/channel-inbound-CXD3aSAK.js +0 -30
  259. package/dist/channel-issues-C-49e607.js +0 -13
  260. package/dist/channel-lifecycle-BnjeZxB6.js +0 -286
  261. package/dist/channel-lifecycle.core-Cn3zeU0h.js +0 -69
  262. package/dist/channel-options-DXJ7b7Ye.js +0 -39
  263. package/dist/channel-pairing-Byr3MFbN.js +0 -68
  264. package/dist/channel-plugin-common-D2EFcTg8.js +0 -4
  265. package/dist/channel-plugin-ids-DiOSWlnO.js +0 -56
  266. package/dist/channel-plugin-resolution-SMHmHx5v.js +0 -144
  267. package/dist/channel-policy-B-XKjrjK.js +0 -32
  268. package/dist/channel-reply-pipeline-BtBcBCNu.js +0 -16
  269. package/dist/channel-resolution-Du3EtWh1.js +0 -60
  270. package/dist/channel-runtime-F8_51GPp.js +0 -9
  271. package/dist/channel-selection-Bz3pl14y.js +0 -125
  272. package/dist/channel-send-result-CyfDCXJG.js +0 -40
  273. package/dist/channel-setup-yWpuHwhm.js +0 -51
  274. package/dist/channel-shared-gHcJ8n-f.js +0 -58
  275. package/dist/channel-status-CyoeLEnj.js +0 -2
  276. package/dist/channel-summary-5zHt-z1E.js +0 -139
  277. package/dist/channel-summary-B_fbXZ3l.js +0 -2
  278. package/dist/channel-target-DHO43h-I.js +0 -157
  279. package/dist/channel-targets-C8ZPfJmV.js +0 -18
  280. package/dist/channel-y-bXwYi3.js +0 -783
  281. package/dist/channel.runtime-B2SEUCf0.js +0 -14
  282. package/dist/channel.runtime-BF5qdBeA.js +0 -5
  283. package/dist/channel.runtime-BPaq6EO_.js +0 -108
  284. package/dist/channel.runtime-BV8FGxyb.js +0 -373
  285. package/dist/channel.runtime-CGnamSTC.js +0 -125
  286. package/dist/channel.runtime-CRNf20Ct.js +0 -80
  287. package/dist/channel.runtime-CRSWVexY.js +0 -335
  288. package/dist/channel.runtime-Cg6DmoTp.js +0 -783
  289. package/dist/channel.runtime-CpHTHeFR.js +0 -309
  290. package/dist/channel.runtime-ZdhCn8XI.js +0 -3315
  291. package/dist/channel.runtime-cXufT2kW.js +0 -61
  292. package/dist/channel.runtime.js +0 -1
  293. package/dist/channel.setup-Bq1vgxXZ.js +0 -279
  294. package/dist/channels-BZC2kp_G.js +0 -409
  295. package/dist/channels-CMeYB3bY.js +0 -1134
  296. package/dist/channels-cli-BIzqRmuu.js +0 -246
  297. package/dist/channels-status-issues-DqTdy1lq.js +0 -17
  298. package/dist/chat-envelope-DlGbh8k2.js +0 -158
  299. package/dist/chat-meta-wVbKo1sw.js +0 -700
  300. package/dist/chat-target-prefixes-DCF8a_Lp.js +0 -156
  301. package/dist/chat-type-DXjGtE-S.js +0 -10
  302. package/dist/chunk-CW-a7Cfh.js +0 -334
  303. package/dist/chunk-CrysgU_F.js +0 -36
  304. package/dist/chutes-oauth-Bh3BTMMG.js +0 -127
  305. package/dist/cjk-chars-Dl_Ko7yI.js +0 -50
  306. package/dist/clack-prompter-C5PtKpUH.js +0 -112
  307. package/dist/clawbot-cli-CgHyabtp.js +0 -9
  308. package/dist/clawhub-CDs2LE11.js +0 -263
  309. package/dist/clawhub-CO6YnoQZ.js +0 -163
  310. package/dist/cli/daemon-cli.js +0 -9
  311. package/dist/cli-CoOwN-V4.js +0 -164
  312. package/dist/cli-CpOL_jWZ.js +0 -152
  313. package/dist/cli-DCp06hI2.js +0 -2
  314. package/dist/cli-DVSDSUQm.js +0 -695
  315. package/dist/cli-backend-B20k67rv.js +0 -44
  316. package/dist/cli-backend-CcuyEMrq.js +0 -1
  317. package/dist/cli-backend-DMTxL8mq.js +0 -40
  318. package/dist/cli-backend-M4CTb3mq.js +0 -49
  319. package/dist/cli-migration-BwqQvUer.js +0 -100
  320. package/dist/cli-name-C3PA6Rhs.js +0 -21
  321. package/dist/cli-runner-8SNo1pKS.js +0 -1014
  322. package/dist/cli-runtime-ChUqI2f-.js +0 -3
  323. package/dist/cli-shared-01J1LZRE.js +0 -72
  324. package/dist/cli-startup-metadata.json +0 -14
  325. package/dist/cli-utils-eYXt_xAg.js +0 -40
  326. package/dist/cli-watchdog-defaults-Dff-MFUz.js +0 -14
  327. package/dist/cli.runtime-WWGaX6X6.js +0 -547
  328. package/dist/cli.runtime.js +0 -1
  329. package/dist/client-BFxjGELJ.js +0 -5
  330. package/dist/client-C8_DsF-r.js +0 -7
  331. package/dist/client-bootstrap-BiVps8T6.js +0 -2
  332. package/dist/client-bootstrap-CFGCltAu.js +0 -121
  333. package/dist/client-lEilgam1.js +0 -87
  334. package/dist/cmd-argv-BbyQhzAC.js +0 -68
  335. package/dist/code-execution-CPcuE0sX.js +0 -142
  336. package/dist/codex-native-web-search-CyrsDBZ2.js +0 -155
  337. package/dist/codex-native-web-search-PFJu8fcM.js +0 -2
  338. package/dist/collection-runtime-DJjFReXJ.js +0 -1
  339. package/dist/command-auth-BAkZv3cP.js +0 -356
  340. package/dist/command-auth-native-Bsp5Doyd.js +0 -3
  341. package/dist/command-auth-tqFmaIaJ.js +0 -64
  342. package/dist/command-detection-BV7Ipg_0.js +0 -49
  343. package/dist/command-detection-DyqWl5Nq.js +0 -2
  344. package/dist/command-format-CX1xXtgB.js +0 -22
  345. package/dist/command-format-DwYoemR9.js +0 -2
  346. package/dist/command-gating-NyDk7t84.js +0 -40
  347. package/dist/command-options-BUoAEXAi.js +0 -25
  348. package/dist/command-poll-backoff-B7RiSvcV.js +0 -56
  349. package/dist/command-poll-backoff.runtime-DX9gobB0.js +0 -7
  350. package/dist/command-poll-backoff.runtime.js +0 -1
  351. package/dist/command-queue-CxEmvSGT.js +0 -253
  352. package/dist/command-registry-CaJXKNoO.js +0 -3
  353. package/dist/command-registry-Ct0qor9d.js +0 -199
  354. package/dist/command-secret-gateway-43O-1Hnf.js +0 -2
  355. package/dist/command-secret-gateway-C39SFGHd.js +0 -442
  356. package/dist/command-secret-targets-Bns-l1xV.js +0 -2
  357. package/dist/command-secret-targets-CTrFghcj.js +0 -87
  358. package/dist/command-surface-CfP1vask.js +0 -2
  359. package/dist/commands/status.summary.runtime.js +0 -146
  360. package/dist/commands-BxWe27p0.js +0 -42
  361. package/dist/commands-CiyPyNRY.js +0 -194
  362. package/dist/commands-acp-BeCm2Wnq.js +0 -990
  363. package/dist/commands-context-DbfMrVv4.js +0 -33
  364. package/dist/commands-core-CEmQydIV.js +0 -241
  365. package/dist/commands-core.runtime-BYooAQbc.js +0 -2
  366. package/dist/commands-core.runtime.js +0 -1
  367. package/dist/commands-handlers.runtime-CEAP4Yv2.js +0 -3707
  368. package/dist/commands-handlers.runtime.js +0 -1
  369. package/dist/commands-info-COwAtIWb.js +0 -651
  370. package/dist/commands-models-B4EJh5Fy.js +0 -395
  371. package/dist/commands-o21Y9Xck.js +0 -4
  372. package/dist/commands-registry-DgMc5_jk.js +0 -295
  373. package/dist/commands-registry.data-5O2FOeZl.js +0 -935
  374. package/dist/commands-registry.runtime-CT_YXpwM.js +0 -2
  375. package/dist/commands-registry.runtime.js +0 -1
  376. package/dist/commands-status.runtime-D4F4iVUh.js +0 -2
  377. package/dist/commands-status.runtime.js +0 -1
  378. package/dist/commands.runtime-_ALsMFcS.js +0 -4
  379. package/dist/commands.runtime.js +0 -1
  380. package/dist/common-Dbmo0I1E.js +0 -206
  381. package/dist/compact.runtime-CBfyBJbR.js +0 -7
  382. package/dist/compact.runtime.js +0 -1
  383. package/dist/completion-cli-COhEd9CF.js +0 -2
  384. package/dist/completion-cli-DHe4Rit5.js +0 -466
  385. package/dist/components-CamLdbbq.js +0 -797
  386. package/dist/components-DPbtLC3x.js +0 -2
  387. package/dist/config-CKJA2kAO.js +0 -53
  388. package/dist/config-D7-9dK3i.js +0 -138
  389. package/dist/config-DJ29sg5U.js +0 -475
  390. package/dist/config-DJNI2tTK.js +0 -136
  391. package/dist/config-Dr2GRT3y.js +0 -135
  392. package/dist/config-DsqKYjeo.js +0 -421
  393. package/dist/config-Q9kc32gz.js +0 -41
  394. package/dist/config-RUefx-_1.js +0 -8
  395. package/dist/config-cli-BqlYHmPA.js +0 -945
  396. package/dist/config-error-handler-BKRR0_j_.js +0 -197
  397. package/dist/config-error-handler-CT1igiX6.js +0 -2
  398. package/dist/config-eval-hTWq4IVy.js +0 -100
  399. package/dist/config-guard-Bk3_wSTH.js +0 -113
  400. package/dist/config-helpers-DLVbtn1B.js +0 -117
  401. package/dist/config-paths-BKYh__Ga.js +0 -8
  402. package/dist/config-paths-DP5yXXo2.js +0 -102
  403. package/dist/config-presence-omlqvhAQ.js +0 -79
  404. package/dist/config-regex-CvZFnWkO.js +0 -39
  405. package/dist/config-runtime-ngoccXmP.js +0 -13
  406. package/dist/config-schema-B3sQY5B_.js +0 -133
  407. package/dist/config-schema-B_2MhEQY.js +0 -71
  408. package/dist/config-schema-BpIXBNbc.js +0 -202
  409. package/dist/config-schema-BtfQOmdV.js +0 -115
  410. package/dist/config-schema-Bw-Xbo_T.js +0 -85
  411. package/dist/config-schema-Cqj-Mugi.js +0 -105
  412. package/dist/config-schema-DQSj_ZL_.js +0 -29
  413. package/dist/config-schema-Pe1Vn9kb.js +0 -17
  414. package/dist/config-schema-f7nntJMh.js +0 -25
  415. package/dist/config-schema-lBqODOnr.js +0 -25
  416. package/dist/config-schema-mfJ91WLf.js +0 -65
  417. package/dist/config-secret-input.runtime-B_HyRtgE.js +0 -3
  418. package/dist/config-secret-input.runtime.js +0 -1
  419. package/dist/config-state-DfIk9ME6.js +0 -289
  420. package/dist/config-status-Bnobp1-p.js +0 -2
  421. package/dist/config-status-Db93sFQB.js +0 -109
  422. package/dist/config-update-B_S0YQ_Y.js +0 -3
  423. package/dist/config-update-CK4EDDeD.js +0 -127
  424. package/dist/config-validation-Bh_sg7RW.js +0 -276
  425. package/dist/config-value-CMTdBw5q.js +0 -25
  426. package/dist/configure-CGDY1YR7.js +0 -1140
  427. package/dist/configure-V8jejRHr.js +0 -2
  428. package/dist/configured-provider-fallback-DWYDg0L7.js +0 -15
  429. package/dist/connection-auth-CKM60o55.js +0 -30
  430. package/dist/connection-details-DyVOoGG6.js +0 -56
  431. package/dist/constants-Bq55qi82.js +0 -71
  432. package/dist/constants-CimYBSye.js +0 -4
  433. package/dist/content-blocks-DuKJNUtm.js +0 -785
  434. package/dist/context-D-9a98Zk.js +0 -227
  435. package/dist/context-visibility-DTMZdcAH.js +0 -14
  436. package/dist/context-visibility-vOvLMUrZ.js +0 -35
  437. package/dist/context-window-guard-WE0ENAeQ.js +0 -46
  438. package/dist/control-ui-assets-DVYAF-2p.js +0 -240
  439. package/dist/control-ui-shared-BKXkFsA7.js +0 -29
  440. package/dist/conversation-binding-C2nuZ3Eg.js +0 -520
  441. package/dist/conversation-binding-input-CBwdWDC4.js +0 -250
  442. package/dist/conversation-bindings-Cq4z4vhr.js +0 -210
  443. package/dist/conversation-id-4JeHag0a.js +0 -168
  444. package/dist/conversation-id-CXuzm-Ub.js +0 -116
  445. package/dist/conversation-id-DCTwJCZF.js +0 -43
  446. package/dist/conversation-label-C2xTELop.js +0 -32
  447. package/dist/conversation-runtime-bArk0IjJ.js +0 -85
  448. package/dist/core-DaMVvavf.js +0 -195
  449. package/dist/core-api-D0U2iGRK.js +0 -670
  450. package/dist/core-command-descriptors-DxRm2H1p.js +0 -91
  451. package/dist/create-client-BOKOxyiu.js +0 -58
  452. package/dist/create-client-Bzn467Jo.js +0 -2
  453. package/dist/credentials-BGPs1gIX.js +0 -242
  454. package/dist/credentials-DUoYFiLk.js +0 -22
  455. package/dist/credentials-read-CDYtvkBt.js +0 -74
  456. package/dist/credentials-read-KB395CbD.js +0 -2
  457. package/dist/credentials-write.runtime-Bx7mKj4E.js +0 -9
  458. package/dist/credentials-write.runtime.js +0 -1
  459. package/dist/creds-files-CTtTs6zG.js +0 -19
  460. package/dist/cron-cli-Di3TakVa.js +0 -644
  461. package/dist/crypto-node.runtime-DI0fQ6wI.js +0 -5
  462. package/dist/crypto-node.runtime.js +0 -1
  463. package/dist/crypto-runtime-Bc-jKPlv.js +0 -1036
  464. package/dist/current-time--aIDbABZ.js +0 -20
  465. package/dist/daemon-cli-Cnry1ft1.js +0 -370
  466. package/dist/daemon-install-de_bWPuS.js +0 -63
  467. package/dist/daemon-install-plan.shared-u00bwv47.js +0 -222
  468. package/dist/daemon-runtime-DPejcJWG.js +0 -12
  469. package/dist/dangerous-name-matching-DnCDaXzP.js +0 -48
  470. package/dist/dangerous-name-runtime-Dinw00TZ.js +0 -1
  471. package/dist/dangerous-tools-C3RlQe7u.js +0 -38
  472. package/dist/date-time-DRQ0-oaw.js +0 -118
  473. package/dist/ddg-search-provider-B0zLjcDN.js +0 -182
  474. package/dist/dedupe-DZbQYOSD.js +0 -59
  475. package/dist/default-account-warnings-BCrmijcz.js +0 -15
  476. package/dist/default-models-Br0v8QOH.js +0 -35
  477. package/dist/defaults-DAt--D9n.js +0 -6
  478. package/dist/defaults-D_Y_lvUP.js +0 -7
  479. package/dist/defaults-MkMfnGzi.js +0 -7
  480. package/dist/delegate-CLP7zDS_.js +0 -43
  481. package/dist/deliver-CIUEKe4q.js +0 -954
  482. package/dist/deliver-LN-Yg8wS.js +0 -3
  483. package/dist/deliver-reply-DL-CSF43.js +0 -238
  484. package/dist/deliver-runtime-CoqXhxlS.js +0 -2
  485. package/dist/delivery-CL_3vFSl.js +0 -834
  486. package/dist/delivery-context-CoAL-jTI.js +0 -106
  487. package/dist/delivery-info-DTAUApso.js +0 -40
  488. package/dist/delivery-queue-DBW69jH4.js +0 -2
  489. package/dist/delivery-queue-DMubgaLa.js +0 -289
  490. package/dist/deps-34N0Nmbl.js +0 -67
  491. package/dist/deps-BVogrCia.js +0 -2
  492. package/dist/deps-DZJpA4XG.js +0 -153
  493. package/dist/detect-Zrcrs8SP.js +0 -12
  494. package/dist/detect-binary-CEX186X6.js +0 -30
  495. package/dist/device-auth-D_0GUMYY.js +0 -19
  496. package/dist/device-bootstrap-Bnn4K3fQ.js +0 -3
  497. package/dist/device-bootstrap-bwpHYQhY.js +0 -176
  498. package/dist/device-health-B3q7Cmqn.js +0 -2
  499. package/dist/device-health-DhmPD0gq.js +0 -16
  500. package/dist/device-identity-Cak311si.js +0 -2
  501. package/dist/device-identity-Doxo0HJx.js +0 -140
  502. package/dist/device-metadata-normalization-B5_zplC_.js +0 -21
  503. package/dist/device-pairing-BCpR-Vtb.js +0 -520
  504. package/dist/devices-cli-DYPkfzsG.js +0 -328
  505. package/dist/diagnostic-DfKz60Xk.js +0 -311
  506. package/dist/diagnostic-events-CUSmY-rn.js +0 -48
  507. package/dist/diagnostic-flags-DLDDycUv.js +0 -64
  508. package/dist/diagnostic-runtime-ZQC4AswI.js +0 -1
  509. package/dist/diagnostics-Cxl1bFGj.js +0 -33
  510. package/dist/diagnostics-GjF7wpY9.js +0 -2
  511. package/dist/diagnostics-otel-C2RQUlQT.js +0 -3
  512. package/dist/diffs-DsHt689X.js +0 -2
  513. package/dist/direct-dm-ByuWacLn.js +0 -139
  514. package/dist/direct-management-DEtuCcDL.js +0 -2
  515. package/dist/direct-management-DMp7MOnt.js +0 -300
  516. package/dist/direct-room-ARYWsCbX.js +0 -2
  517. package/dist/direct-room-DYlSJOU_.js +0 -67
  518. package/dist/directive-handling.defaults-BMh2DXTA.js +0 -19
  519. package/dist/directive-handling.fast-lane-CBX4jbax.js +0 -2
  520. package/dist/directive-handling.fast-lane-DRvycpgg.js +0 -64
  521. package/dist/directive-handling.impl-BKJf5Ltu.js +0 -672
  522. package/dist/directive-handling.impl-BkdGnm-T.js +0 -2
  523. package/dist/directive-handling.levels-BHOBnnn8.js +0 -2
  524. package/dist/directive-handling.levels-CecoBNlK.js +0 -12
  525. package/dist/directive-handling.parse-BuTiWmrT.js +0 -375
  526. package/dist/directive-handling.persist-D9RYevoA.js +0 -133
  527. package/dist/directive-handling.persist.runtime-Cb_unTVH.js +0 -2
  528. package/dist/directive-handling.persist.runtime.js +0 -1
  529. package/dist/directive-handling.shared-_Zvt3-ej.js +0 -158
  530. package/dist/directive-tags-Cm0H6Dn_.js +0 -109
  531. package/dist/directives-f-UxcP8D.js +0 -209
  532. package/dist/directory-cache-CM_EUchr.js +0 -62
  533. package/dist/directory-cli-D6N59tzr.js +0 -238
  534. package/dist/directory-config-helpers-BCrssKbI.js +0 -141
  535. package/dist/directory-runtime-CAabZ_XW.js +0 -20
  536. package/dist/directory.static-TKo2MeNR.js +0 -45
  537. package/dist/discord-BOpl5w4U.js +0 -5
  538. package/dist/discord-account-wyFuLDq_.js +0 -11
  539. package/dist/discord-core-BpzKxDZ7.js +0 -5
  540. package/dist/discord-lOPvIxp4.js +0 -11
  541. package/dist/discord-runtime-surface-Dm5WUtCV.js +0 -67
  542. package/dist/discord-session-key-DaPto1yr.js +0 -11
  543. package/dist/discord-surface-Cg_Mu9MI.js +0 -30
  544. package/dist/discord-thread-bindings-zIOp1Tj4.js +0 -29
  545. package/dist/discord-timeouts-Di5n5LAU.js +0 -12
  546. package/dist/discovery-DLbFJLD_.js +0 -171
  547. package/dist/dispatch-C4gGGYZt.js +0 -858
  548. package/dist/dispatch-acp.runtime-DUHj6bP-.js +0 -884
  549. package/dist/dispatch-acp.runtime.js +0 -1
  550. package/dist/dist-7JNqoGV7.js +0 -3
  551. package/dist/dist-BqJPEiV8.js +0 -14245
  552. package/dist/dist-DdE56Pmi.js +0 -503
  553. package/dist/dist-shQCTuJB.js +0 -1239
  554. package/dist/dm-policy-shared-C99GNVxp.js +0 -188
  555. package/dist/dns-cli-vQBAzTmg.js +0 -192
  556. package/dist/docker-BN7sQKCb.js +0 -789
  557. package/dist/docs-cli-Br6cfKoS.js +0 -156
  558. package/dist/doctor-completion-Cf0GcTXR.js +0 -90
  559. package/dist/doctor-config-preflight-C2cKYiKe.js +0 -2
  560. package/dist/doctor-config-preflight-DNbO-_N8.js +0 -148
  561. package/dist/doctor-state-migrations-BXkbeSFy.js +0 -2
  562. package/dist/doctor-state-migrations-G3shZ-W_.js +0 -3
  563. package/dist/dotenv-CelghjA4.js +0 -11
  564. package/dist/dotenv-Csg1Xj8n.js +0 -113
  565. package/dist/embedding-provider-Aey9VsDb.js +0 -129
  566. package/dist/enable-BgSxsKp_.js +0 -57
  567. package/dist/encryption-guidance-62xAQFP4.js +0 -33
  568. package/dist/entry-status-3ymZYX2l.js +0 -172
  569. package/dist/entry.js +0 -209
  570. package/dist/env-CK3eZNIX.js +0 -40
  571. package/dist/env-overrides-CcDOWo0Y.js +0 -346
  572. package/dist/env-overrides.runtime-CKb7-Q72.js +0 -7
  573. package/dist/env-overrides.runtime.js +0 -1
  574. package/dist/env-substitution-UhJwb0ys.js +0 -136
  575. package/dist/envelope-CrC9AdBL.js +0 -137
  576. package/dist/error-runtime-D-gKufd_.js +0 -2
  577. package/dist/error-text-BC9WfvfX.js +0 -24
  578. package/dist/errors-Bs2h5H8p.js +0 -71
  579. package/dist/errors-CjFsF-QY.js +0 -9
  580. package/dist/exa-web-search-provider-DUUlmDcV.js +0 -355
  581. package/dist/exec-BO6vYjRf.js +0 -368
  582. package/dist/exec-CD7C9g-b.js +0 -2
  583. package/dist/exec-approval-reply-CFOEcmIv.js +0 -189
  584. package/dist/exec-approval-session-target-BbsAlD1Q.js +0 -159
  585. package/dist/exec-approvals-3UDrE7Q9.js +0 -1565
  586. package/dist/exec-approvals-CW5axvaY.js +0 -121
  587. package/dist/exec-approvals-cli-BPYvtJv-.js +0 -483
  588. package/dist/exec-approvals-effective-DbLJfkpe.js +0 -140
  589. package/dist/exec-safe-bin-runtime-policy-218hHVyc.js +0 -90
  590. package/dist/exec-safety-XzKkUSvE.js +0 -24
  591. package/dist/export-html/template.css +0 -1060
  592. package/dist/export-html/template.html +0 -88
  593. package/dist/export-html/template.js +0 -1875
  594. package/dist/export-html/vendor/highlight.min.js +0 -1213
  595. package/dist/export-html/vendor/marked.min.js +0 -6
  596. package/dist/extension-shared-V_4IXpRU.js +0 -74
  597. package/dist/extensionAPI.js +0 -17
  598. package/dist/extensions/acpx/index.js +0 -1855
  599. package/dist/extensions/acpx/mcp-proxy.mjs +0 -151
  600. package/dist/extensions/acpx/openclaw.plugin.json +0 -132
  601. package/dist/extensions/acpx/package.json +0 -14
  602. package/dist/extensions/acpx/runtime-api.js +0 -5
  603. package/dist/extensions/acpx/skills/acp-router/SKILL.md +0 -245
  604. package/dist/extensions/aicq-chat/index.js +0 -284
  605. package/dist/extensions/aicq-chat/openclaw.plugin.json +0 -30
  606. package/dist/extensions/amazon-bedrock/api.js +0 -3
  607. package/dist/extensions/amazon-bedrock/discovery.js +0 -2
  608. package/dist/extensions/amazon-bedrock/index.js +0 -65
  609. package/dist/extensions/amazon-bedrock/openclaw.plugin.json +0 -44
  610. package/dist/extensions/amazon-bedrock/package.json +0 -23
  611. package/dist/extensions/anthropic/api.js +0 -3
  612. package/dist/extensions/anthropic/cli-backend.js +0 -2
  613. package/dist/extensions/anthropic/cli-migration.js +0 -2
  614. package/dist/extensions/anthropic/cli-shared.js +0 -2
  615. package/dist/extensions/anthropic/index.js +0 -357
  616. package/dist/extensions/anthropic/media-understanding-provider.js +0 -2
  617. package/dist/extensions/anthropic/openclaw.plugin.json +0 -64
  618. package/dist/extensions/anthropic/package.json +0 -12
  619. package/dist/extensions/anthropic/stream-wrappers.js +0 -2
  620. package/dist/extensions/anthropic/test-api.js +0 -2
  621. package/dist/extensions/anthropic-vertex/api.js +0 -4
  622. package/dist/extensions/anthropic-vertex/index.js +0 -36
  623. package/dist/extensions/anthropic-vertex/openclaw.plugin.json +0 -12
  624. package/dist/extensions/anthropic-vertex/package.json +0 -12
  625. package/dist/extensions/anthropic-vertex/provider-catalog.js +0 -2
  626. package/dist/extensions/anthropic-vertex/region.js +0 -2
  627. package/dist/extensions/bluebubbles/api.js +0 -5
  628. package/dist/extensions/bluebubbles/channel-config-api.js +0 -2
  629. package/dist/extensions/bluebubbles/index.js +0 -13
  630. package/dist/extensions/bluebubbles/openclaw.plugin.json +0 -11
  631. package/dist/extensions/bluebubbles/package.json +0 -48
  632. package/dist/extensions/bluebubbles/runtime-api.js +0 -2
  633. package/dist/extensions/bluebubbles/setup-entry.js +0 -26
  634. package/dist/extensions/brave/index.js +0 -13
  635. package/dist/extensions/brave/openclaw.plugin.json +0 -50
  636. package/dist/extensions/brave/package.json +0 -12
  637. package/dist/extensions/brave/test-api.js +0 -2
  638. package/dist/extensions/brave/web-search-provider.js +0 -2
  639. package/dist/extensions/browser/browser-runtime-api.js +0 -4
  640. package/dist/extensions/browser/index.js +0 -20
  641. package/dist/extensions/browser/openclaw.plugin.json +0 -9
  642. package/dist/extensions/browser/package.json +0 -12
  643. package/dist/extensions/browser/runtime-api.js +0 -6
  644. package/dist/extensions/browser/test-support.js +0 -50
  645. package/dist/extensions/byteplus/api.js +0 -3
  646. package/dist/extensions/byteplus/index.js +0 -63
  647. package/dist/extensions/byteplus/models.js +0 -2
  648. package/dist/extensions/byteplus/openclaw.plugin.json +0 -33
  649. package/dist/extensions/byteplus/package.json +0 -12
  650. package/dist/extensions/byteplus/provider-catalog.js +0 -2
  651. package/dist/extensions/chutes/api.js +0 -3
  652. package/dist/extensions/chutes/index.js +0 -143
  653. package/dist/extensions/chutes/models.js +0 -2
  654. package/dist/extensions/chutes/onboard.js +0 -3
  655. package/dist/extensions/chutes/openclaw.plugin.json +0 -44
  656. package/dist/extensions/chutes/package.json +0 -12
  657. package/dist/extensions/chutes/provider-catalog.js +0 -2
  658. package/dist/extensions/cloudflare-ai-gateway/api.js +0 -3
  659. package/dist/extensions/cloudflare-ai-gateway/index.js +0 -188
  660. package/dist/extensions/cloudflare-ai-gateway/models.js +0 -2
  661. package/dist/extensions/cloudflare-ai-gateway/onboard.js +0 -2
  662. package/dist/extensions/cloudflare-ai-gateway/openclaw.plugin.json +0 -33
  663. package/dist/extensions/cloudflare-ai-gateway/package.json +0 -12
  664. package/dist/extensions/copilot-proxy/index.js +0 -125
  665. package/dist/extensions/copilot-proxy/openclaw.plugin.json +0 -27
  666. package/dist/extensions/copilot-proxy/package.json +0 -12
  667. package/dist/extensions/copilot-proxy/runtime-api.js +0 -3
  668. package/dist/extensions/deepgram/audio.js +0 -2
  669. package/dist/extensions/deepgram/index.js +0 -13
  670. package/dist/extensions/deepgram/media-understanding-provider.js +0 -2
  671. package/dist/extensions/deepgram/openclaw.plugin.json +0 -13
  672. package/dist/extensions/deepgram/package.json +0 -12
  673. package/dist/extensions/deepseek/api.js +0 -3
  674. package/dist/extensions/deepseek/index.js +0 -33
  675. package/dist/extensions/deepseek/models.js +0 -2
  676. package/dist/extensions/deepseek/onboard.js +0 -2
  677. package/dist/extensions/deepseek/openclaw.plugin.json +0 -32
  678. package/dist/extensions/deepseek/package.json +0 -12
  679. package/dist/extensions/deepseek/provider-catalog.js +0 -2
  680. package/dist/extensions/device-pair/api.js +0 -10
  681. package/dist/extensions/device-pair/index.js +0 -483
  682. package/dist/extensions/device-pair/notify.js +0 -2
  683. package/dist/extensions/device-pair/openclaw.plugin.json +0 -21
  684. package/dist/extensions/device-pair/qr-image.js +0 -3
  685. package/dist/extensions/diagnostics-otel/api.js +0 -6
  686. package/dist/extensions/diagnostics-otel/index.js +0 -485
  687. package/dist/extensions/diagnostics-otel/openclaw.plugin.json +0 -8
  688. package/dist/extensions/diagnostics-otel/package.json +0 -27
  689. package/dist/extensions/diffs/api.js +0 -4
  690. package/dist/extensions/diffs/assets/viewer-runtime.js +0 -1888
  691. package/dist/extensions/diffs/index.js +0 -2058
  692. package/dist/extensions/diffs/openclaw.plugin.json +0 -226
  693. package/dist/extensions/diffs/package.json +0 -24
  694. package/dist/extensions/diffs/runtime-api.js +0 -3
  695. package/dist/extensions/diffs/skills/diffs/SKILL.md +0 -23
  696. package/dist/extensions/discord/action-runtime-api.js +0 -2
  697. package/dist/extensions/discord/api.js +0 -14
  698. package/dist/extensions/discord/channel-config-api.js +0 -2
  699. package/dist/extensions/discord/index.js +0 -612
  700. package/dist/extensions/discord/openclaw.plugin.json +0 -11
  701. package/dist/extensions/discord/package.json +0 -52
  702. package/dist/extensions/discord/runtime-api.js +0 -230
  703. package/dist/extensions/discord/session-key-api.js +0 -2
  704. package/dist/extensions/discord/setup-entry.js +0 -10
  705. package/dist/extensions/discord/test-api.js +0 -45
  706. package/dist/extensions/discord/timeouts.js +0 -2
  707. package/dist/extensions/duckduckgo/index.js +0 -13
  708. package/dist/extensions/duckduckgo/openclaw.plugin.json +0 -41
  709. package/dist/extensions/duckduckgo/package.json +0 -12
  710. package/dist/extensions/duckduckgo/web-search-provider.js +0 -2
  711. package/dist/extensions/elevenlabs/index.js +0 -13
  712. package/dist/extensions/elevenlabs/openclaw.plugin.json +0 -13
  713. package/dist/extensions/elevenlabs/package.json +0 -12
  714. package/dist/extensions/elevenlabs/speech-provider.js +0 -2
  715. package/dist/extensions/elevenlabs/test-api.js +0 -2
  716. package/dist/extensions/elevenlabs/tts.js +0 -2
  717. package/dist/extensions/exa/index.js +0 -13
  718. package/dist/extensions/exa/openclaw.plugin.json +0 -39
  719. package/dist/extensions/exa/package.json +0 -12
  720. package/dist/extensions/exa/web-search-provider.js +0 -2
  721. package/dist/extensions/fal/image-generation-provider.js +0 -2
  722. package/dist/extensions/fal/index.js +0 -45
  723. package/dist/extensions/fal/onboard.js +0 -2
  724. package/dist/extensions/fal/openclaw.plugin.json +0 -40
  725. package/dist/extensions/fal/package.json +0 -12
  726. package/dist/extensions/feishu/api.js +0 -7
  727. package/dist/extensions/feishu/index.js +0 -2531
  728. package/dist/extensions/feishu/openclaw.plugin.json +0 -14
  729. package/dist/extensions/feishu/package.json +0 -52
  730. package/dist/extensions/feishu/runtime-api.js +0 -34
  731. package/dist/extensions/feishu/session-key-api.js +0 -2
  732. package/dist/extensions/feishu/setup-api.js +0 -2
  733. package/dist/extensions/feishu/setup-entry.js +0 -6
  734. package/dist/extensions/feishu/skills/feishu-doc/SKILL.md +0 -211
  735. package/dist/extensions/feishu/skills/feishu-doc/references/block-types.md +0 -103
  736. package/dist/extensions/feishu/skills/feishu-drive/SKILL.md +0 -97
  737. package/dist/extensions/feishu/skills/feishu-perm/SKILL.md +0 -119
  738. package/dist/extensions/feishu/skills/feishu-wiki/SKILL.md +0 -111
  739. package/dist/extensions/firecrawl/api.js +0 -33
  740. package/dist/extensions/firecrawl/index.js +0 -184
  741. package/dist/extensions/firecrawl/openclaw.plugin.json +0 -87
  742. package/dist/extensions/firecrawl/package.json +0 -12
  743. package/dist/extensions/firecrawl/web-search-provider.js +0 -2
  744. package/dist/extensions/github-copilot/api.js +0 -2
  745. package/dist/extensions/github-copilot/index.js +0 -138
  746. package/dist/extensions/github-copilot/login.js +0 -2
  747. package/dist/extensions/github-copilot/models-defaults.js +0 -38
  748. package/dist/extensions/github-copilot/models.js +0 -2
  749. package/dist/extensions/github-copilot/openclaw.plugin.json +0 -31
  750. package/dist/extensions/github-copilot/package.json +0 -12
  751. package/dist/extensions/github-copilot/token.js +0 -3
  752. package/dist/extensions/github-copilot/usage.js +0 -2
  753. package/dist/extensions/google/api.js +0 -3
  754. package/dist/extensions/google/cli-backend.js +0 -2
  755. package/dist/extensions/google/gemini-cli-provider.js +0 -110
  756. package/dist/extensions/google/google-shared.test-helpers.js +0 -92
  757. package/dist/extensions/google/image-generation-provider.js +0 -162
  758. package/dist/extensions/google/index.js +0 -213
  759. package/dist/extensions/google/media-understanding-provider.js +0 -104
  760. package/dist/extensions/google/model-id.js +0 -2
  761. package/dist/extensions/google/oauth.credentials.js +0 -2
  762. package/dist/extensions/google/oauth.flow.js +0 -2
  763. package/dist/extensions/google/oauth.http.js +0 -2
  764. package/dist/extensions/google/oauth.js +0 -3
  765. package/dist/extensions/google/oauth.project.js +0 -2
  766. package/dist/extensions/google/oauth.runtime.js +0 -2
  767. package/dist/extensions/google/oauth.shared.js +0 -2
  768. package/dist/extensions/google/oauth.token.js +0 -2
  769. package/dist/extensions/google/openclaw.plugin.json +0 -89
  770. package/dist/extensions/google/package.json +0 -12
  771. package/dist/extensions/google/provider-models.js +0 -2
  772. package/dist/extensions/google/runtime-api.js +0 -4
  773. package/dist/extensions/google/test-api.js +0 -2
  774. package/dist/extensions/google/web-search-provider.js +0 -2
  775. package/dist/extensions/googlechat/api.js +0 -2
  776. package/dist/extensions/googlechat/channel-config-api.js +0 -7
  777. package/dist/extensions/googlechat/index.js +0 -13
  778. package/dist/extensions/googlechat/openclaw.plugin.json +0 -11
  779. package/dist/extensions/googlechat/package.json +0 -48
  780. package/dist/extensions/googlechat/runtime-api.js +0 -39
  781. package/dist/extensions/googlechat/setup-entry.js +0 -6
  782. package/dist/extensions/googlechat/test-api.js +0 -3
  783. package/dist/extensions/groq/index.js +0 -13
  784. package/dist/extensions/groq/media-understanding-provider.js +0 -2
  785. package/dist/extensions/groq/openclaw.plugin.json +0 -13
  786. package/dist/extensions/groq/package.json +0 -12
  787. package/dist/extensions/huggingface/api.js +0 -4
  788. package/dist/extensions/huggingface/index.js +0 -54
  789. package/dist/extensions/huggingface/models.js +0 -2
  790. package/dist/extensions/huggingface/onboard.js +0 -2
  791. package/dist/extensions/huggingface/openclaw.plugin.json +0 -34
  792. package/dist/extensions/huggingface/package.json +0 -12
  793. package/dist/extensions/huggingface/provider-catalog.js +0 -3
  794. package/dist/extensions/imessage/api.js +0 -4
  795. package/dist/extensions/imessage/channel-config-api.js +0 -2
  796. package/dist/extensions/imessage/index.js +0 -211
  797. package/dist/extensions/imessage/openclaw.plugin.json +0 -11
  798. package/dist/extensions/imessage/package.json +0 -26
  799. package/dist/extensions/imessage/runtime-api.js +0 -11
  800. package/dist/extensions/imessage/setup-entry.js +0 -13
  801. package/dist/extensions/irc/api.js +0 -2
  802. package/dist/extensions/irc/channel-config-api.js +0 -2
  803. package/dist/extensions/irc/index.js +0 -12
  804. package/dist/extensions/irc/openclaw.plugin.json +0 -11
  805. package/dist/extensions/irc/package.json +0 -28
  806. package/dist/extensions/irc/setup-entry.js +0 -6
  807. package/dist/extensions/kilocode/api.js +0 -3
  808. package/dist/extensions/kilocode/index.js +0 -37
  809. package/dist/extensions/kilocode/onboard.js +0 -3
  810. package/dist/extensions/kilocode/openclaw.plugin.json +0 -33
  811. package/dist/extensions/kilocode/package.json +0 -12
  812. package/dist/extensions/kilocode/provider-catalog.js +0 -2
  813. package/dist/extensions/kilocode/provider-models.js +0 -2
  814. package/dist/extensions/kilocode/shared.js +0 -2
  815. package/dist/extensions/kimi-coding/api.js +0 -3
  816. package/dist/extensions/kimi-coding/index.js +0 -81
  817. package/dist/extensions/kimi-coding/onboard.js +0 -2
  818. package/dist/extensions/kimi-coding/openclaw.plugin.json +0 -38
  819. package/dist/extensions/kimi-coding/package.json +0 -12
  820. package/dist/extensions/kimi-coding/provider-catalog.js +0 -2
  821. package/dist/extensions/kimi-coding/stream.js +0 -2
  822. package/dist/extensions/line/api.js +0 -13
  823. package/dist/extensions/line/index.js +0 -815
  824. package/dist/extensions/line/openclaw.plugin.json +0 -11
  825. package/dist/extensions/line/package.json +0 -41
  826. package/dist/extensions/line/runtime-api.js +0 -11
  827. package/dist/extensions/line/setup-api.js +0 -3
  828. package/dist/extensions/line/setup-entry.js +0 -15
  829. package/dist/extensions/litellm/api.js +0 -2
  830. package/dist/extensions/litellm/index.js +0 -36
  831. package/dist/extensions/litellm/onboard.js +0 -2
  832. package/dist/extensions/litellm/openclaw.plugin.json +0 -33
  833. package/dist/extensions/litellm/package.json +0 -12
  834. package/dist/extensions/litellm/provider-catalog.js +0 -2
  835. package/dist/extensions/llm-task/api.js +0 -6
  836. package/dist/extensions/llm-task/index.js +0 -156
  837. package/dist/extensions/llm-task/openclaw.plugin.json +0 -33
  838. package/dist/extensions/llm-task/package.json +0 -16
  839. package/dist/extensions/lobster/index.js +0 -232
  840. package/dist/extensions/lobster/openclaw.plugin.json +0 -10
  841. package/dist/extensions/lobster/package.json +0 -17
  842. package/dist/extensions/lobster/runtime-api.js +0 -4
  843. package/dist/extensions/matrix/api.js +0 -10
  844. package/dist/extensions/matrix/helper-api.js +0 -3
  845. package/dist/extensions/matrix/index.js +0 -44
  846. package/dist/extensions/matrix/legacy-crypto-inspector.js +0 -41
  847. package/dist/extensions/matrix/openclaw.plugin.json +0 -11
  848. package/dist/extensions/matrix/package.json +0 -53
  849. package/dist/extensions/matrix/plugin-entry.handlers.runtime.js +0 -48
  850. package/dist/extensions/matrix/runtime-api.js +0 -25
  851. package/dist/extensions/matrix/setup-entry.js +0 -6
  852. package/dist/extensions/matrix/test-api.js +0 -3
  853. package/dist/extensions/matrix/thread-bindings-runtime.js +0 -2
  854. package/dist/extensions/mattermost/api.js +0 -2
  855. package/dist/extensions/mattermost/index.js +0 -15
  856. package/dist/extensions/mattermost/openclaw.plugin.json +0 -11
  857. package/dist/extensions/mattermost/package.json +0 -41
  858. package/dist/extensions/mattermost/runtime-api.js +0 -41
  859. package/dist/extensions/mattermost/setup-entry.js +0 -6
  860. package/dist/extensions/memory-core/api.js +0 -1
  861. package/dist/extensions/memory-core/index.js +0 -440
  862. package/dist/extensions/memory-core/openclaw.plugin.json +0 -9
  863. package/dist/extensions/memory-core/package.json +0 -23
  864. package/dist/extensions/memory-core/runtime-api.js +0 -3
  865. package/dist/extensions/memory-lancedb/api.js +0 -4
  866. package/dist/extensions/memory-lancedb/config.js +0 -2
  867. package/dist/extensions/memory-lancedb/index.js +0 -7037
  868. package/dist/extensions/memory-lancedb/lancedb-runtime.js +0 -2
  869. package/dist/extensions/memory-lancedb/openclaw.plugin.json +0 -92
  870. package/dist/extensions/memory-lancedb/package.json +0 -24
  871. package/dist/extensions/microsoft/index.js +0 -13
  872. package/dist/extensions/microsoft/openclaw.plugin.json +0 -13
  873. package/dist/extensions/microsoft/package.json +0 -15
  874. package/dist/extensions/microsoft/speech-provider.js +0 -2
  875. package/dist/extensions/microsoft/test-api.js +0 -2
  876. package/dist/extensions/microsoft/tts.js +0 -2
  877. package/dist/extensions/microsoft-foundry/auth.js +0 -2
  878. package/dist/extensions/microsoft-foundry/cli.js +0 -2
  879. package/dist/extensions/microsoft-foundry/index.js +0 -13
  880. package/dist/extensions/microsoft-foundry/onboard.js +0 -3
  881. package/dist/extensions/microsoft-foundry/openclaw.plugin.json +0 -39
  882. package/dist/extensions/microsoft-foundry/package.json +0 -12
  883. package/dist/extensions/microsoft-foundry/provider.js +0 -2
  884. package/dist/extensions/microsoft-foundry/runtime.js +0 -2
  885. package/dist/extensions/microsoft-foundry/shared-runtime.js +0 -3
  886. package/dist/extensions/microsoft-foundry/shared.js +0 -2
  887. package/dist/extensions/minimax/api.js +0 -6
  888. package/dist/extensions/minimax/image-generation-provider.js +0 -2
  889. package/dist/extensions/minimax/index.js +0 -219
  890. package/dist/extensions/minimax/media-understanding-provider.js +0 -2
  891. package/dist/extensions/minimax/model-definitions.js +0 -2
  892. package/dist/extensions/minimax/oauth.js +0 -2
  893. package/dist/extensions/minimax/oauth.runtime.js +0 -2
  894. package/dist/extensions/minimax/onboard.js +0 -2
  895. package/dist/extensions/minimax/openclaw.plugin.json +0 -98
  896. package/dist/extensions/minimax/package.json +0 -12
  897. package/dist/extensions/minimax/provider-catalog.js +0 -2
  898. package/dist/extensions/minimax/provider-models.js +0 -2
  899. package/dist/extensions/mistral/api.js +0 -5
  900. package/dist/extensions/mistral/index.js +0 -79
  901. package/dist/extensions/mistral/media-understanding-provider.js +0 -2
  902. package/dist/extensions/mistral/model-definitions.js +0 -2
  903. package/dist/extensions/mistral/onboard.js +0 -2
  904. package/dist/extensions/mistral/openclaw.plugin.json +0 -37
  905. package/dist/extensions/mistral/package.json +0 -12
  906. package/dist/extensions/mistral/provider-catalog.js +0 -2
  907. package/dist/extensions/modelstudio/api.js +0 -4
  908. package/dist/extensions/modelstudio/index.js +0 -111
  909. package/dist/extensions/modelstudio/model-definitions.js +0 -2
  910. package/dist/extensions/modelstudio/models.js +0 -2
  911. package/dist/extensions/modelstudio/onboard.js +0 -3
  912. package/dist/extensions/modelstudio/openclaw.plugin.json +0 -75
  913. package/dist/extensions/modelstudio/package.json +0 -12
  914. package/dist/extensions/modelstudio/provider-catalog.js +0 -2
  915. package/dist/extensions/moonshot/api.js +0 -4
  916. package/dist/extensions/moonshot/index.js +0 -58
  917. package/dist/extensions/moonshot/media-understanding-provider.js +0 -2
  918. package/dist/extensions/moonshot/onboard.js +0 -2
  919. package/dist/extensions/moonshot/openclaw.plugin.json +0 -87
  920. package/dist/extensions/moonshot/package.json +0 -12
  921. package/dist/extensions/moonshot/provider-catalog.js +0 -2
  922. package/dist/extensions/moonshot/test-api.js +0 -2
  923. package/dist/extensions/moonshot/web-search-provider.js +0 -2
  924. package/dist/extensions/msteams/api.js +0 -2
  925. package/dist/extensions/msteams/channel-config-api.js +0 -2
  926. package/dist/extensions/msteams/index.js +0 -13
  927. package/dist/extensions/msteams/openclaw.plugin.json +0 -11
  928. package/dist/extensions/msteams/package.json +0 -48
  929. package/dist/extensions/msteams/runtime-api.js +0 -47
  930. package/dist/extensions/msteams/setup-entry.js +0 -6
  931. package/dist/extensions/msteams/test-api.js +0 -2
  932. package/dist/extensions/nextcloud-talk/api.js +0 -2
  933. package/dist/extensions/nextcloud-talk/index.js +0 -12
  934. package/dist/extensions/nextcloud-talk/openclaw.plugin.json +0 -11
  935. package/dist/extensions/nextcloud-talk/package.json +0 -45
  936. package/dist/extensions/nextcloud-talk/runtime-api.js +0 -35
  937. package/dist/extensions/nextcloud-talk/setup-entry.js +0 -6
  938. package/dist/extensions/nostr/api.js +0 -15
  939. package/dist/extensions/nostr/index.js +0 -559
  940. package/dist/extensions/nostr/openclaw.plugin.json +0 -11
  941. package/dist/extensions/nostr/package.json +0 -44
  942. package/dist/extensions/nostr/runtime-api.js +0 -15
  943. package/dist/extensions/nostr/setup-api.js +0 -2
  944. package/dist/extensions/nostr/setup-entry.js +0 -6
  945. package/dist/extensions/nostr/test-api.js +0 -2
  946. package/dist/extensions/nvidia/api.js +0 -2
  947. package/dist/extensions/nvidia/index.js +0 -16
  948. package/dist/extensions/nvidia/openclaw.plugin.json +0 -17
  949. package/dist/extensions/nvidia/package.json +0 -12
  950. package/dist/extensions/nvidia/provider-catalog.js +0 -2
  951. package/dist/extensions/ollama/api.js +0 -3
  952. package/dist/extensions/ollama/index.js +0 -139
  953. package/dist/extensions/ollama/openclaw.plugin.json +0 -29
  954. package/dist/extensions/ollama/package.json +0 -12
  955. package/dist/extensions/ollama/runtime-api.js +0 -3
  956. package/dist/extensions/open-prose/index.js +0 -10
  957. package/dist/extensions/open-prose/openclaw.plugin.json +0 -13
  958. package/dist/extensions/open-prose/package.json +0 -12
  959. package/dist/extensions/open-prose/runtime-api.js +0 -3
  960. package/dist/extensions/open-prose/skills/prose/LICENSE +0 -21
  961. package/dist/extensions/open-prose/skills/prose/SKILL.md +0 -323
  962. package/dist/extensions/open-prose/skills/prose/alt-borges.md +0 -141
  963. package/dist/extensions/open-prose/skills/prose/alts/arabian-nights.md +0 -229
  964. package/dist/extensions/open-prose/skills/prose/alts/borges.md +0 -360
  965. package/dist/extensions/open-prose/skills/prose/alts/folk.md +0 -322
  966. package/dist/extensions/open-prose/skills/prose/alts/homer.md +0 -217
  967. package/dist/extensions/open-prose/skills/prose/alts/kafka.md +0 -373
  968. package/dist/extensions/open-prose/skills/prose/alts/shared-appendix.md +0 -35
  969. package/dist/extensions/open-prose/skills/prose/compiler.md +0 -2971
  970. package/dist/extensions/open-prose/skills/prose/examples/01-hello-world.prose +0 -4
  971. package/dist/extensions/open-prose/skills/prose/examples/02-research-and-summarize.prose +0 -6
  972. package/dist/extensions/open-prose/skills/prose/examples/03-code-review.prose +0 -17
  973. package/dist/extensions/open-prose/skills/prose/examples/04-write-and-refine.prose +0 -14
  974. package/dist/extensions/open-prose/skills/prose/examples/05-debug-issue.prose +0 -20
  975. package/dist/extensions/open-prose/skills/prose/examples/06-explain-codebase.prose +0 -17
  976. package/dist/extensions/open-prose/skills/prose/examples/07-refactor.prose +0 -20
  977. package/dist/extensions/open-prose/skills/prose/examples/08-blog-post.prose +0 -20
  978. package/dist/extensions/open-prose/skills/prose/examples/09-research-with-agents.prose +0 -25
  979. package/dist/extensions/open-prose/skills/prose/examples/10-code-review-agents.prose +0 -32
  980. package/dist/extensions/open-prose/skills/prose/examples/11-skills-and-imports.prose +0 -27
  981. package/dist/extensions/open-prose/skills/prose/examples/12-secure-agent-permissions.prose +0 -43
  982. package/dist/extensions/open-prose/skills/prose/examples/13-variables-and-context.prose +0 -51
  983. package/dist/extensions/open-prose/skills/prose/examples/14-composition-blocks.prose +0 -48
  984. package/dist/extensions/open-prose/skills/prose/examples/15-inline-sequences.prose +0 -23
  985. package/dist/extensions/open-prose/skills/prose/examples/16-parallel-reviews.prose +0 -19
  986. package/dist/extensions/open-prose/skills/prose/examples/17-parallel-research.prose +0 -19
  987. package/dist/extensions/open-prose/skills/prose/examples/18-mixed-parallel-sequential.prose +0 -36
  988. package/dist/extensions/open-prose/skills/prose/examples/19-advanced-parallel.prose +0 -71
  989. package/dist/extensions/open-prose/skills/prose/examples/20-fixed-loops.prose +0 -20
  990. package/dist/extensions/open-prose/skills/prose/examples/21-pipeline-operations.prose +0 -35
  991. package/dist/extensions/open-prose/skills/prose/examples/22-error-handling.prose +0 -51
  992. package/dist/extensions/open-prose/skills/prose/examples/23-retry-with-backoff.prose +0 -63
  993. package/dist/extensions/open-prose/skills/prose/examples/24-choice-blocks.prose +0 -86
  994. package/dist/extensions/open-prose/skills/prose/examples/25-conditionals.prose +0 -114
  995. package/dist/extensions/open-prose/skills/prose/examples/26-parameterized-blocks.prose +0 -100
  996. package/dist/extensions/open-prose/skills/prose/examples/27-string-interpolation.prose +0 -105
  997. package/dist/extensions/open-prose/skills/prose/examples/28-automated-pr-review.prose +0 -37
  998. package/dist/extensions/open-prose/skills/prose/examples/28-gas-town.prose +0 -1572
  999. package/dist/extensions/open-prose/skills/prose/examples/29-captains-chair.prose +0 -218
  1000. package/dist/extensions/open-prose/skills/prose/examples/30-captains-chair-simple.prose +0 -42
  1001. package/dist/extensions/open-prose/skills/prose/examples/31-captains-chair-with-memory.prose +0 -145
  1002. package/dist/extensions/open-prose/skills/prose/examples/33-pr-review-autofix.prose +0 -168
  1003. package/dist/extensions/open-prose/skills/prose/examples/34-content-pipeline.prose +0 -204
  1004. package/dist/extensions/open-prose/skills/prose/examples/35-feature-factory.prose +0 -296
  1005. package/dist/extensions/open-prose/skills/prose/examples/36-bug-hunter.prose +0 -237
  1006. package/dist/extensions/open-prose/skills/prose/examples/37-the-forge.prose +0 -1474
  1007. package/dist/extensions/open-prose/skills/prose/examples/38-skill-scan.prose +0 -455
  1008. package/dist/extensions/open-prose/skills/prose/examples/39-architect-by-simulation.prose +0 -277
  1009. package/dist/extensions/open-prose/skills/prose/examples/40-rlm-self-refine.prose +0 -32
  1010. package/dist/extensions/open-prose/skills/prose/examples/41-rlm-divide-conquer.prose +0 -38
  1011. package/dist/extensions/open-prose/skills/prose/examples/42-rlm-filter-recurse.prose +0 -46
  1012. package/dist/extensions/open-prose/skills/prose/examples/43-rlm-pairwise.prose +0 -50
  1013. package/dist/extensions/open-prose/skills/prose/examples/44-run-endpoint-ux-test.prose +0 -261
  1014. package/dist/extensions/open-prose/skills/prose/examples/45-plugin-release.prose +0 -159
  1015. package/dist/extensions/open-prose/skills/prose/examples/45-run-endpoint-ux-test-with-remediation.prose +0 -637
  1016. package/dist/extensions/open-prose/skills/prose/examples/46-run-endpoint-ux-test-fast.prose +0 -148
  1017. package/dist/extensions/open-prose/skills/prose/examples/46-workflow-crystallizer.prose +0 -225
  1018. package/dist/extensions/open-prose/skills/prose/examples/47-language-self-improvement.prose +0 -356
  1019. package/dist/extensions/open-prose/skills/prose/examples/48-habit-miner.prose +0 -445
  1020. package/dist/extensions/open-prose/skills/prose/examples/49-prose-run-retrospective.prose +0 -210
  1021. package/dist/extensions/open-prose/skills/prose/examples/README.md +0 -391
  1022. package/dist/extensions/open-prose/skills/prose/examples/roadmap/README.md +0 -22
  1023. package/dist/extensions/open-prose/skills/prose/examples/roadmap/iterative-refinement.prose +0 -20
  1024. package/dist/extensions/open-prose/skills/prose/examples/roadmap/parallel-review.prose +0 -18
  1025. package/dist/extensions/open-prose/skills/prose/examples/roadmap/simple-pipeline.prose +0 -17
  1026. package/dist/extensions/open-prose/skills/prose/examples/roadmap/syntax/open-prose-syntax.prose +0 -223
  1027. package/dist/extensions/open-prose/skills/prose/guidance/antipatterns.md +0 -951
  1028. package/dist/extensions/open-prose/skills/prose/guidance/patterns.md +0 -700
  1029. package/dist/extensions/open-prose/skills/prose/guidance/system-prompt.md +0 -180
  1030. package/dist/extensions/open-prose/skills/prose/help.md +0 -144
  1031. package/dist/extensions/open-prose/skills/prose/lib/README.md +0 -108
  1032. package/dist/extensions/open-prose/skills/prose/lib/calibrator.prose +0 -215
  1033. package/dist/extensions/open-prose/skills/prose/lib/cost-analyzer.prose +0 -174
  1034. package/dist/extensions/open-prose/skills/prose/lib/error-forensics.prose +0 -250
  1035. package/dist/extensions/open-prose/skills/prose/lib/inspector.prose +0 -196
  1036. package/dist/extensions/open-prose/skills/prose/lib/profiler.prose +0 -460
  1037. package/dist/extensions/open-prose/skills/prose/lib/program-improver.prose +0 -275
  1038. package/dist/extensions/open-prose/skills/prose/lib/project-memory.prose +0 -118
  1039. package/dist/extensions/open-prose/skills/prose/lib/user-memory.prose +0 -93
  1040. package/dist/extensions/open-prose/skills/prose/lib/vm-improver.prose +0 -243
  1041. package/dist/extensions/open-prose/skills/prose/primitives/session.md +0 -593
  1042. package/dist/extensions/open-prose/skills/prose/prose.md +0 -1237
  1043. package/dist/extensions/open-prose/skills/prose/state/filesystem.md +0 -498
  1044. package/dist/extensions/open-prose/skills/prose/state/in-context.md +0 -384
  1045. package/dist/extensions/open-prose/skills/prose/state/postgres.md +0 -880
  1046. package/dist/extensions/open-prose/skills/prose/state/sqlite.md +0 -531
  1047. package/dist/extensions/openai/api.js +0 -4
  1048. package/dist/extensions/openai/cli-backend.js +0 -2
  1049. package/dist/extensions/openai/default-models.js +0 -2
  1050. package/dist/extensions/openai/image-generation-provider.js +0 -2
  1051. package/dist/extensions/openai/index.js +0 -24
  1052. package/dist/extensions/openai/media-understanding-provider.js +0 -2
  1053. package/dist/extensions/openai/openai-codex-auth-identity.js +0 -2
  1054. package/dist/extensions/openai/openai-codex-catalog.js +0 -2
  1055. package/dist/extensions/openai/openai-codex-provider.js +0 -2
  1056. package/dist/extensions/openai/openai-codex-provider.runtime.js +0 -14
  1057. package/dist/extensions/openai/openai-provider.js +0 -2
  1058. package/dist/extensions/openai/openclaw.plugin.json +0 -61
  1059. package/dist/extensions/openai/package.json +0 -12
  1060. package/dist/extensions/openai/shared.js +0 -4
  1061. package/dist/extensions/openai/speech-provider.js +0 -2
  1062. package/dist/extensions/openai/test-api.js +0 -5
  1063. package/dist/extensions/openai/tts.js +0 -2
  1064. package/dist/extensions/opencode/api.js +0 -3
  1065. package/dist/extensions/opencode/index.js +0 -63
  1066. package/dist/extensions/opencode/onboard.js +0 -2
  1067. package/dist/extensions/opencode/openclaw.plugin.json +0 -33
  1068. package/dist/extensions/opencode/package.json +0 -12
  1069. package/dist/extensions/opencode-go/api.js +0 -3
  1070. package/dist/extensions/opencode-go/index.js +0 -54
  1071. package/dist/extensions/opencode-go/onboard.js +0 -2
  1072. package/dist/extensions/opencode-go/openclaw.plugin.json +0 -33
  1073. package/dist/extensions/opencode-go/package.json +0 -12
  1074. package/dist/extensions/openrouter/api.js +0 -3
  1075. package/dist/extensions/openrouter/index.js +0 -121
  1076. package/dist/extensions/openrouter/media-understanding-provider.js +0 -2
  1077. package/dist/extensions/openrouter/onboard.js +0 -2
  1078. package/dist/extensions/openrouter/openclaw.plugin.json +0 -37
  1079. package/dist/extensions/openrouter/package.json +0 -12
  1080. package/dist/extensions/openrouter/provider-catalog.js +0 -2
  1081. package/dist/extensions/openshell/index.js +0 -919
  1082. package/dist/extensions/openshell/openclaw.plugin.json +0 -118
  1083. package/dist/extensions/openshell/package.json +0 -12
  1084. package/dist/extensions/perplexity/index.js +0 -13
  1085. package/dist/extensions/perplexity/openclaw.plugin.json +0 -54
  1086. package/dist/extensions/perplexity/package.json +0 -12
  1087. package/dist/extensions/perplexity/test-api.js +0 -2
  1088. package/dist/extensions/perplexity/web-search-provider.js +0 -2
  1089. package/dist/extensions/phone-control/index.js +0 -283
  1090. package/dist/extensions/phone-control/openclaw.plugin.json +0 -11
  1091. package/dist/extensions/phone-control/runtime-api.js +0 -3
  1092. package/dist/extensions/qianfan/api.js +0 -3
  1093. package/dist/extensions/qianfan/index.js +0 -26
  1094. package/dist/extensions/qianfan/onboard.js +0 -2
  1095. package/dist/extensions/qianfan/openclaw.plugin.json +0 -32
  1096. package/dist/extensions/qianfan/package.json +0 -12
  1097. package/dist/extensions/qianfan/provider-catalog.js +0 -2
  1098. package/dist/extensions/qqbot/api.js +0 -173
  1099. package/dist/extensions/qqbot/index.js +0 -445
  1100. package/dist/extensions/qqbot/openclaw.plugin.json +0 -257
  1101. package/dist/extensions/qqbot/package.json +0 -52
  1102. package/dist/extensions/qqbot/runtime-api.js +0 -2
  1103. package/dist/extensions/qqbot/setup-entry.js +0 -6
  1104. package/dist/extensions/qqbot/skills/qqbot-channel/SKILL.md +0 -262
  1105. package/dist/extensions/qqbot/skills/qqbot-channel/references/api_references.md +0 -521
  1106. package/dist/extensions/qqbot/skills/qqbot-media/SKILL.md +0 -36
  1107. package/dist/extensions/qqbot/skills/qqbot-remind/SKILL.md +0 -149
  1108. package/dist/extensions/searxng/index.js +0 -13
  1109. package/dist/extensions/searxng/openclaw.plugin.json +0 -46
  1110. package/dist/extensions/searxng/package.json +0 -12
  1111. package/dist/extensions/searxng/web-search-provider.js +0 -2
  1112. package/dist/extensions/sglang/api.js +0 -4
  1113. package/dist/extensions/sglang/defaults.js +0 -2
  1114. package/dist/extensions/sglang/index.js +0 -77
  1115. package/dist/extensions/sglang/models.js +0 -2
  1116. package/dist/extensions/sglang/openclaw.plugin.json +0 -29
  1117. package/dist/extensions/sglang/package.json +0 -12
  1118. package/dist/extensions/signal/api.js +0 -7
  1119. package/dist/extensions/signal/channel-config-api.js +0 -2
  1120. package/dist/extensions/signal/index.js +0 -319
  1121. package/dist/extensions/signal/openclaw.plugin.json +0 -11
  1122. package/dist/extensions/signal/package.json +0 -24
  1123. package/dist/extensions/signal/reaction-runtime-api.js +0 -2
  1124. package/dist/extensions/signal/runtime-api.js +0 -24
  1125. package/dist/extensions/signal/setup-entry.js +0 -13
  1126. package/dist/extensions/signal/test-api.js +0 -111
  1127. package/dist/extensions/slack/api.js +0 -10
  1128. package/dist/extensions/slack/channel-config-api.js +0 -2
  1129. package/dist/extensions/slack/index.js +0 -12
  1130. package/dist/extensions/slack/openclaw.plugin.json +0 -11
  1131. package/dist/extensions/slack/package.json +0 -31
  1132. package/dist/extensions/slack/runtime-api.js +0 -110
  1133. package/dist/extensions/slack/setup-entry.js +0 -12
  1134. package/dist/extensions/slack/test-api.js +0 -47
  1135. package/dist/extensions/stepfun/index.js +0 -163
  1136. package/dist/extensions/stepfun/onboard.js +0 -3
  1137. package/dist/extensions/stepfun/openclaw.plugin.json +0 -83
  1138. package/dist/extensions/stepfun/package.json +0 -12
  1139. package/dist/extensions/stepfun/provider-catalog.js +0 -2
  1140. package/dist/extensions/synology-chat/index.js +0 -12
  1141. package/dist/extensions/synology-chat/openclaw.plugin.json +0 -11
  1142. package/dist/extensions/synology-chat/package.json +0 -26
  1143. package/dist/extensions/synology-chat/setup-api.js +0 -2
  1144. package/dist/extensions/synology-chat/setup-entry.js +0 -6
  1145. package/dist/extensions/synthetic/api.js +0 -4
  1146. package/dist/extensions/synthetic/index.js +0 -27
  1147. package/dist/extensions/synthetic/models.js +0 -2
  1148. package/dist/extensions/synthetic/onboard.js +0 -3
  1149. package/dist/extensions/synthetic/openclaw.plugin.json +0 -32
  1150. package/dist/extensions/synthetic/package.json +0 -12
  1151. package/dist/extensions/synthetic/provider-catalog.js +0 -2
  1152. package/dist/extensions/talk-voice/api.js +0 -3
  1153. package/dist/extensions/talk-voice/index.js +0 -160
  1154. package/dist/extensions/talk-voice/openclaw.plugin.json +0 -11
  1155. package/dist/extensions/tavily/index.js +0 -128
  1156. package/dist/extensions/tavily/openclaw.plugin.json +0 -53
  1157. package/dist/extensions/tavily/package.json +0 -12
  1158. package/dist/extensions/tavily/skills/tavily/SKILL.md +0 -94
  1159. package/dist/extensions/tavily/web-search-provider.js +0 -2
  1160. package/dist/extensions/telegram/allow-from.js +0 -2
  1161. package/dist/extensions/telegram/api.js +0 -14
  1162. package/dist/extensions/telegram/channel-config-api.js +0 -2
  1163. package/dist/extensions/telegram/index.js +0 -12
  1164. package/dist/extensions/telegram/openclaw.plugin.json +0 -11
  1165. package/dist/extensions/telegram/package.json +0 -37
  1166. package/dist/extensions/telegram/runtime-api.js +0 -25
  1167. package/dist/extensions/telegram/session-key-api.js +0 -2
  1168. package/dist/extensions/telegram/setup-entry.js +0 -13
  1169. package/dist/extensions/telegram/test-api.js +0 -88
  1170. package/dist/extensions/telegram/test-support.js +0 -46
  1171. package/dist/extensions/telegram/update-offset-runtime-api.js +0 -2
  1172. package/dist/extensions/thread-ownership/api.js +0 -5
  1173. package/dist/extensions/thread-ownership/index.js +0 -82
  1174. package/dist/extensions/thread-ownership/openclaw.plugin.json +0 -30
  1175. package/dist/extensions/tlon/api.js +0 -14
  1176. package/dist/extensions/tlon/index.js +0 -150
  1177. package/dist/extensions/tlon/openclaw.plugin.json +0 -12
  1178. package/dist/extensions/tlon/package.json +0 -44
  1179. package/dist/extensions/tlon/runtime-api.js +0 -14
  1180. package/dist/extensions/tlon/setup-api.js +0 -3
  1181. package/dist/extensions/tlon/setup-entry.js +0 -6
  1182. package/dist/extensions/tlon/test-api.js +0 -2
  1183. package/dist/extensions/together/api.js +0 -3
  1184. package/dist/extensions/together/index.js +0 -26
  1185. package/dist/extensions/together/models.js +0 -2
  1186. package/dist/extensions/together/onboard.js +0 -2
  1187. package/dist/extensions/together/openclaw.plugin.json +0 -32
  1188. package/dist/extensions/together/package.json +0 -12
  1189. package/dist/extensions/together/provider-catalog.js +0 -2
  1190. package/dist/extensions/twitch/api.js +0 -9
  1191. package/dist/extensions/twitch/index.js +0 -1090
  1192. package/dist/extensions/twitch/openclaw.plugin.json +0 -11
  1193. package/dist/extensions/twitch/package.json +0 -29
  1194. package/dist/extensions/twitch/runtime-api.js +0 -9
  1195. package/dist/extensions/venice/api.js +0 -3
  1196. package/dist/extensions/venice/index.js +0 -55
  1197. package/dist/extensions/venice/models.js +0 -2
  1198. package/dist/extensions/venice/onboard.js +0 -3
  1199. package/dist/extensions/venice/openclaw.plugin.json +0 -32
  1200. package/dist/extensions/venice/package.json +0 -12
  1201. package/dist/extensions/venice/provider-catalog.js +0 -2
  1202. package/dist/extensions/vercel-ai-gateway/api.js +0 -4
  1203. package/dist/extensions/vercel-ai-gateway/index.js +0 -30
  1204. package/dist/extensions/vercel-ai-gateway/models.js +0 -2
  1205. package/dist/extensions/vercel-ai-gateway/onboard.js +0 -2
  1206. package/dist/extensions/vercel-ai-gateway/openclaw.plugin.json +0 -32
  1207. package/dist/extensions/vercel-ai-gateway/package.json +0 -12
  1208. package/dist/extensions/vercel-ai-gateway/provider-catalog.js +0 -2
  1209. package/dist/extensions/vllm/api.js +0 -4
  1210. package/dist/extensions/vllm/defaults.js +0 -2
  1211. package/dist/extensions/vllm/index.js +0 -78
  1212. package/dist/extensions/vllm/models.js +0 -2
  1213. package/dist/extensions/vllm/openclaw.plugin.json +0 -29
  1214. package/dist/extensions/vllm/package.json +0 -12
  1215. package/dist/extensions/voice-call/api.js +0 -7
  1216. package/dist/extensions/voice-call/index.js +0 -698
  1217. package/dist/extensions/voice-call/openclaw.plugin.json +0 -700
  1218. package/dist/extensions/voice-call/package.json +0 -33
  1219. package/dist/extensions/voice-call/runtime-api.js +0 -7
  1220. package/dist/extensions/voice-call/runtime-entry.js +0 -2
  1221. package/dist/extensions/volcengine/api.js +0 -3
  1222. package/dist/extensions/volcengine/index.js +0 -63
  1223. package/dist/extensions/volcengine/models.js +0 -2
  1224. package/dist/extensions/volcengine/openclaw.plugin.json +0 -33
  1225. package/dist/extensions/volcengine/package.json +0 -12
  1226. package/dist/extensions/volcengine/provider-catalog.js +0 -2
  1227. package/dist/extensions/whatsapp/action-runtime-api.js +0 -2
  1228. package/dist/extensions/whatsapp/action-runtime.runtime.js +0 -2
  1229. package/dist/extensions/whatsapp/api.js +0 -8
  1230. package/dist/extensions/whatsapp/auth-presence.js +0 -2
  1231. package/dist/extensions/whatsapp/channel-config-api.js +0 -2
  1232. package/dist/extensions/whatsapp/constants.js +0 -2
  1233. package/dist/extensions/whatsapp/index.js +0 -12
  1234. package/dist/extensions/whatsapp/light-runtime-api.js +0 -5
  1235. package/dist/extensions/whatsapp/login-qr-api.js +0 -2
  1236. package/dist/extensions/whatsapp/openclaw.plugin.json +0 -11
  1237. package/dist/extensions/whatsapp/package.json +0 -45
  1238. package/dist/extensions/whatsapp/runtime-api.js +0 -334
  1239. package/dist/extensions/whatsapp/setup-entry.js +0 -23
  1240. package/dist/extensions/whatsapp/test-api.js +0 -76
  1241. package/dist/extensions/xai/api.js +0 -6
  1242. package/dist/extensions/xai/code-execution.js +0 -2
  1243. package/dist/extensions/xai/index.js +0 -122
  1244. package/dist/extensions/xai/model-definitions.js +0 -2
  1245. package/dist/extensions/xai/model-id.js +0 -2
  1246. package/dist/extensions/xai/onboard.js +0 -2
  1247. package/dist/extensions/xai/openclaw.plugin.json +0 -157
  1248. package/dist/extensions/xai/package.json +0 -12
  1249. package/dist/extensions/xai/provider-catalog.js +0 -2
  1250. package/dist/extensions/xai/provider-models.js +0 -2
  1251. package/dist/extensions/xai/stream.js +0 -2
  1252. package/dist/extensions/xai/web-search.js +0 -2
  1253. package/dist/extensions/xai/x-search.js +0 -2
  1254. package/dist/extensions/xiaomi/api.js +0 -3
  1255. package/dist/extensions/xiaomi/index.js +0 -37
  1256. package/dist/extensions/xiaomi/onboard.js +0 -2
  1257. package/dist/extensions/xiaomi/openclaw.plugin.json +0 -32
  1258. package/dist/extensions/xiaomi/package.json +0 -12
  1259. package/dist/extensions/xiaomi/provider-catalog.js +0 -2
  1260. package/dist/extensions/zai/api.js +0 -3
  1261. package/dist/extensions/zai/detect.js +0 -2
  1262. package/dist/extensions/zai/index.js +0 -239
  1263. package/dist/extensions/zai/media-understanding-provider.js +0 -2
  1264. package/dist/extensions/zai/model-definitions.js +0 -2
  1265. package/dist/extensions/zai/onboard.js +0 -2
  1266. package/dist/extensions/zai/openclaw.plugin.json +0 -94
  1267. package/dist/extensions/zai/package.json +0 -12
  1268. package/dist/extensions/zai/runtime-api.js +0 -3
  1269. package/dist/extensions/zalo/api.js +0 -3
  1270. package/dist/extensions/zalo/index.js +0 -13
  1271. package/dist/extensions/zalo/openclaw.plugin.json +0 -11
  1272. package/dist/extensions/zalo/package.json +0 -47
  1273. package/dist/extensions/zalo/runtime-api.js +0 -38
  1274. package/dist/extensions/zalo/setup-entry.js +0 -6
  1275. package/dist/extensions/zalo/test-api.js +0 -2
  1276. package/dist/extensions/zalouser/api.js +0 -2
  1277. package/dist/extensions/zalouser/index.js +0 -599
  1278. package/dist/extensions/zalouser/openclaw.plugin.json +0 -11
  1279. package/dist/extensions/zalouser/package.json +0 -48
  1280. package/dist/extensions/zalouser/runtime-api.js +0 -30
  1281. package/dist/extensions/zalouser/setup-entry.js +0 -13
  1282. package/dist/extensions/zalouser/test-api.js +0 -5
  1283. package/dist/external-content-DtoRY-d1.js +0 -242
  1284. package/dist/facade-runtime-Bpi4Gy-u.js +0 -263
  1285. package/dist/failover-error-BrdBIFg2.js +0 -180
  1286. package/dist/feishu-81Iv8tqF.js +0 -18
  1287. package/dist/feishu-conversation-NmEqAxSA.js +0 -17
  1288. package/dist/feishu-setup-DXAK6GqE.js +0 -12
  1289. package/dist/fetch-7dbKQPT5.js +0 -256
  1290. package/dist/fetch-BjiGl865.js +0 -418
  1291. package/dist/fetch-Bp23aO5S.js +0 -65
  1292. package/dist/fetch-guard-BnhVFBtf.js +0 -150
  1293. package/dist/fetch-mock-WghRRNpK.js +0 -6
  1294. package/dist/fetch-runtime-DfFmkkZH.js +0 -4
  1295. package/dist/fetch-timeout-BKMGkHu9.js +0 -58
  1296. package/dist/file-identity-DPm-6kp0.js +0 -567
  1297. package/dist/file-lock-CH0V9dhL.js +0 -141
  1298. package/dist/file-lock-D292sbfa.js +0 -2
  1299. package/dist/firecrawl-client-GOGPuEeg.js +0 -338
  1300. package/dist/firecrawl-search-provider-ptp7GNAt.js +0 -47
  1301. package/dist/format-BwzSM9vY.js +0 -24
  1302. package/dist/format-D38w0aKT.js +0 -817
  1303. package/dist/format-DCFsK8oa.js +0 -19
  1304. package/dist/format-datetime-Bl6-b7G1.js +0 -73
  1305. package/dist/format-duration-DqcpDYkZ.js +0 -57
  1306. package/dist/format-relative-CYrRyrT7.js +0 -54
  1307. package/dist/frontmatter-Ba2Hn11b.js +0 -45
  1308. package/dist/frontmatter-Cjxy4vX8.js +0 -210
  1309. package/dist/fs-safe-BQ59ttjX.js +0 -999
  1310. package/dist/gateway-CWPyH-P7.js +0 -2575
  1311. package/dist/gateway-cli-BmPBPCcJ.js +0 -1572
  1312. package/dist/gateway-discovery-targets--oNzWOVw.js +0 -430
  1313. package/dist/gateway-install-token-tyQyR2ED.js +0 -230
  1314. package/dist/gateway-lock-BbUQuUet.js +0 -292
  1315. package/dist/gateway-presence-BVCIm1hy.js +0 -15
  1316. package/dist/gateway-registry-tQcIThkV.js +0 -74
  1317. package/dist/gateway-rpc-BXdoSPN7.js +0 -26
  1318. package/dist/gateway-runtime-C7EhkU_c.js +0 -12
  1319. package/dist/gaxios-fetch-compat-D4gl5582.js +0 -180
  1320. package/dist/gemini-auth-Dlpcd9MB.js +0 -29
  1321. package/dist/gemini-web-search-provider-CkNEl2du.js +0 -162
  1322. package/dist/get-reply-from-config.runtime-vBmBttxw.js +0 -2
  1323. package/dist/get-reply-from-config.runtime.js +0 -1
  1324. package/dist/git-commit-BS28SZVT.js +0 -2
  1325. package/dist/git-commit-ChiOoWyK.js +0 -177
  1326. package/dist/github-copilot-login-B8s4OVQ4.js +0 -11
  1327. package/dist/github-copilot-token-BwXtH-ZJ.js +0 -2
  1328. package/dist/github-copilot-token-D81Wvm8b.js +0 -2
  1329. package/dist/github-copilot-token-beHjQGOp.js +0 -91
  1330. package/dist/global-singleton-54zT3rCn.js +0 -13
  1331. package/dist/global-singleton-iOq2_-p8.js +0 -1
  1332. package/dist/global-state-DUuMGgts.js +0 -17
  1333. package/dist/globals-CDtV0ht8.js +0 -25
  1334. package/dist/gmail-setup-utils-CxXfU7cy.js +0 -421
  1335. package/dist/google-Cx1_z3Q3.js +0 -24
  1336. package/dist/googlechat-CoiMNDC2.js +0 -37
  1337. package/dist/graph-users-BmZWavVH.js +0 -917
  1338. package/dist/group-access-BZZ3FNmb.js +0 -32
  1339. package/dist/group-access-BjveEAjz.js +0 -113
  1340. package/dist/group-access-owHLoCWX.js +0 -119
  1341. package/dist/group-activation-ClEb7qwj.js +0 -22
  1342. package/dist/group-id-CcsUNOct.js +0 -11
  1343. package/dist/group-policy-Bb8dxOpM.js +0 -25
  1344. package/dist/group-policy-G9GcSyph.js +0 -201
  1345. package/dist/group-policy-wS9F8Y_i.js +0 -51
  1346. package/dist/group-policy-warnings-CL2gHsXM.js +0 -196
  1347. package/dist/groups.runtime-K758xQFV.js +0 -6
  1348. package/dist/groups.runtime.js +0 -1
  1349. package/dist/handle-action-CE4vpa7G.js +0 -500
  1350. package/dist/health-D_KQbqQY.js +0 -577
  1351. package/dist/health-a1VPtSyV.js +0 -2
  1352. package/dist/health-format-COR93f8W.js +0 -26
  1353. package/dist/heartbeat-C_TrErgd.js +0 -122
  1354. package/dist/heartbeat-reply-payload-C7Ac3fOZ.js +0 -13
  1355. package/dist/heartbeat-summary-v5gPj5bd.js +0 -57
  1356. package/dist/heartbeat-visibility-CHMO4pmJ.js +0 -102
  1357. package/dist/help-CyR1Oo4X.js +0 -81
  1358. package/dist/help-format-l1phKNA8.js +0 -15
  1359. package/dist/helpers-COHnQbWX.js +0 -32
  1360. package/dist/helpers-DNpD7VMo.js +0 -24
  1361. package/dist/history-B4mW8GfY.js +0 -102
  1362. package/dist/home-dir-n9onX5PG.js +0 -83
  1363. package/dist/hook-runner-global-C9GhdBtf.js +0 -632
  1364. package/dist/hook-runner-global-Cr_Pthp4.js +0 -2
  1365. package/dist/hook-runtime-DK8QF-2x.js +0 -3
  1366. package/dist/hooks-cli-XCo-7nz9.js +0 -353
  1367. package/dist/hooks-policy-BmULXBcp.js +0 -20
  1368. package/dist/hooks-status-D_ZxRD0H.js +0 -86
  1369. package/dist/host-env-security-SlXI58bc.js +0 -290
  1370. package/dist/host-runtime-BGHb06HN.js +0 -1
  1371. package/dist/hostname-BRYLr_mh.js +0 -8
  1372. package/dist/http-body-CfdQSEp0.js +0 -238
  1373. package/dist/http-client-_3i4-nw5.js +0 -294
  1374. package/dist/http-registry-ZGSBfYSe.js +0 -54
  1375. package/dist/http-route-overlap-C8lbolN5.js +0 -101
  1376. package/dist/identity-BoQQh6Y8.js +0 -26
  1377. package/dist/identity-D64Wfv_s.js +0 -29
  1378. package/dist/identity-DvwF6Yix.js +0 -84
  1379. package/dist/identity-avatar-DPBgVwpU.js +0 -86
  1380. package/dist/identity-file-BtIJI4dn.js +0 -60
  1381. package/dist/image-C4V19x9x.js +0 -152
  1382. package/dist/image-generation-BbOnazXi.js +0 -1
  1383. package/dist/image-generation-provider-CQK8HA0O.js +0 -136
  1384. package/dist/image-generation-provider-CWUvRxmv.js +0 -131
  1385. package/dist/image-generation-provider-F2sfNjcr.js +0 -281
  1386. package/dist/image-ops-BJKjhMAu.js +0 -476
  1387. package/dist/image-runtime-DodXcK2e.js +0 -7
  1388. package/dist/imessage-2ukkzufG.js +0 -19
  1389. package/dist/inbound-context-Cxvd3JHZ.js +0 -59
  1390. package/dist/inbound-context-Czd3FdNb.js +0 -52
  1391. package/dist/inbound-debounce-CI7l3R36.js +0 -159
  1392. package/dist/inbound-envelope-LyHTUTue.js +0 -61
  1393. package/dist/inbound-reply-dispatch-BdeY6N-k.js +0 -73
  1394. package/dist/inbound-text-CacimZtw.js +0 -14
  1395. package/dist/inbound.runtime-CqX3n132.js +0 -3
  1396. package/dist/inbound.runtime.js +0 -1
  1397. package/dist/includes-Ccr-Q5DB.js +0 -188
  1398. package/dist/includes-scan-DVvYLj4S.js +0 -55
  1399. package/dist/index.js +0 -56
  1400. package/dist/infra/warning-filter.js +0 -2
  1401. package/dist/infra-runtime-Cl0iZpRS.js +0 -22
  1402. package/dist/input-files-PZC6ZR4W.js +0 -251
  1403. package/dist/input-provenance-8GBFuk0Q.js +0 -44
  1404. package/dist/inspect-B8dw6NVJ.js +0 -286
  1405. package/dist/install-Bk7XyvtC.js +0 -590
  1406. package/dist/install-package-dir-C2ba2toB.js +0 -284
  1407. package/dist/install-safe-path-CkCd0rWS.js +0 -69
  1408. package/dist/install-security-scan-C02VaEU9.js +0 -22
  1409. package/dist/install-security-scan.runtime-CDUuS6Dl.js +0 -299
  1410. package/dist/install-security-scan.runtime.js +0 -1
  1411. package/dist/install-source-utils-2tdWQmwI.js +0 -167
  1412. package/dist/install-target-CBNysuiP.js +0 -175
  1413. package/dist/install.runtime-D_zKCpnB.js +0 -11
  1414. package/dist/install.runtime-DjQozvMe.js +0 -27
  1415. package/dist/install.runtime.js +0 -1
  1416. package/dist/installs-BnAbQ70v.js +0 -28
  1417. package/dist/interactive-CEnsu1RT.js +0 -8
  1418. package/dist/interactive-runtime-Bxq5ztle.js +0 -1
  1419. package/dist/internal-Lk0wFTNq.js +0 -411
  1420. package/dist/internal-hooks-C3ziA7w_.js +0 -155
  1421. package/dist/io-BUxKr33U.js +0 -2236
  1422. package/dist/io-BuMkfjp3.js +0 -4
  1423. package/dist/ip-BZP18dDl.js +0 -208
  1424. package/dist/ipv4-Xiyu1rvD.js +0 -82
  1425. package/dist/irc-DXfYh-Sd.js +0 -14
  1426. package/dist/irc-surface-Di-joPuc.js +0 -15
  1427. package/dist/is-main-Bv5ej4lF.js +0 -27
  1428. package/dist/issue-format-8Eylt-2O.js +0 -2
  1429. package/dist/issue-format-DLZczJ0U.js +0 -31
  1430. package/dist/json-file-5xJqyXrK.js +0 -23
  1431. package/dist/json-files-C4lsZ_HR.js +0 -72
  1432. package/dist/json-mode-4O1xL2fT.js +0 -34
  1433. package/dist/json-pointer-C30cknnZ.js +0 -43
  1434. package/dist/json-store-FUgu1pyj.js +0 -37
  1435. package/dist/keyed-async-queue-BTOTBE8n.js +0 -32
  1436. package/dist/kill-tree-CIfAbzdN.js +0 -2
  1437. package/dist/kill-tree-CUPpLbeq.js +0 -82
  1438. package/dist/kimi-web-search-provider-Cb3F9_Da.js +0 -224
  1439. package/dist/known-users-DjerpGCB.js +0 -167
  1440. package/dist/lancedb-runtime-DTb_mDUG.js +0 -201
  1441. package/dist/launchd-cp98MUhz.js +0 -517
  1442. package/dist/lazy-runtime-C6LCAM-L.js +0 -29
  1443. package/dist/lazy-runtime-yh_WT4on.js +0 -1
  1444. package/dist/lazy-service-module-CeifO9oo.js +0 -24
  1445. package/dist/legacy-crypto-restore-CsHmLVjY.js +0 -85
  1446. package/dist/legacy-names-CFo8Oe-2.js +0 -9
  1447. package/dist/legacy-web-search-Bn8F2jrN.js +0 -140
  1448. package/dist/legacy.shared-oZM32end.js +0 -45
  1449. package/dist/level-overrides-gqc8xfh2.js +0 -36
  1450. package/dist/library-ChjjeniJ.js +0 -44
  1451. package/dist/lifecycle-core-Ce_ZEvjl.js +0 -402
  1452. package/dist/line-Be0jY3CU.js +0 -4
  1453. package/dist/line-runtime-B0ZGTK81.js +0 -60
  1454. package/dist/line-surface-BTopinac.js +0 -27
  1455. package/dist/links-D7o22Ygt.js +0 -17
  1456. package/dist/listeners-_47QWN8-.js +0 -14
  1457. package/dist/llm-slug-generator-Dv-sLOW9.js +0 -68
  1458. package/dist/llm-slug-generator.js +0 -2
  1459. package/dist/llm-task-BDA3i86A.js +0 -3
  1460. package/dist/load-BXSzQ8YA.js +0 -28
  1461. package/dist/load-options-BqszWkkN.js +0 -36
  1462. package/dist/loader-DsZDoLQ6.js +0 -2519
  1463. package/dist/local-file-access-PajXzDdK.js +0 -49
  1464. package/dist/local-roots-DrpNBv4b.js +0 -46
  1465. package/dist/location-CtMHXE-d.js +0 -42
  1466. package/dist/logger-Bc2lC3X3.js +0 -79
  1467. package/dist/logger-CIV9WBoa.js +0 -11
  1468. package/dist/logger-DdGvppaE.js +0 -75
  1469. package/dist/logger-MWEZrHUL.js +0 -582
  1470. package/dist/logging-B1QD0DRq.js +0 -2
  1471. package/dist/logging-CAfgK7sj.js +0 -3
  1472. package/dist/logging-ColPHIDT.js +0 -16
  1473. package/dist/logging-D4xyCEzZ.js +0 -85
  1474. package/dist/logging-Dt_aiHur.js +0 -13
  1475. package/dist/logging-Dywye6yZ.js +0 -2
  1476. package/dist/logging-core-hw7Df6Hl.js +0 -3
  1477. package/dist/login-BrqdQcNh.js +0 -108
  1478. package/dist/login-DSqrZNW-.js +0 -2333
  1479. package/dist/login-qr-Dm3iC25_.js +0 -212
  1480. package/dist/login-qr-api-BxRDJKkp.js +0 -16
  1481. package/dist/logs-cli-CxjV80As.js +0 -221
  1482. package/dist/magic-string.es-CVHNyqW1.js +0 -1011
  1483. package/dist/main-session-BbO0A-No.js +0 -38
  1484. package/dist/manager-c_fEco8X.js +0 -2773
  1485. package/dist/manager-runtime-Vy_F8ORR.js +0 -2
  1486. package/dist/manager.runtime-Bm1Knq-3.js +0 -670
  1487. package/dist/manager.runtime.js +0 -1
  1488. package/dist/manifest-f_gihArl.js +0 -237
  1489. package/dist/manifest-registry-Kx5Z2lJL.js +0 -1069
  1490. package/dist/map-size-BBQq2RPq.js +0 -15
  1491. package/dist/markdown-table-runtime-Dx12DQTq.js +0 -2
  1492. package/dist/markdown-tables-CSlyhQVP.js +0 -31
  1493. package/dist/mask-api-key-BYVFDQdo.js +0 -10
  1494. package/dist/matrix-NDa-FoaE.js +0 -351
  1495. package/dist/matrix-config-helpers-D0D-oL7I.js +0 -153
  1496. package/dist/matrix-helper-DioFIiaO.js +0 -20
  1497. package/dist/matrix-migration-snapshot-DAOFFSgM.js +0 -714
  1498. package/dist/matrix-ouiFsVI1.js +0 -39
  1499. package/dist/matrix-runtime-heavy-KUEg_MfD.js +0 -4
  1500. package/dist/matrix-runtime-shared-B6aE5Uu6.js +0 -1
  1501. package/dist/matrix-runtime-surface-R78Hde6Q.js +0 -12
  1502. package/dist/matrix-surface-B-nU-e0B.js +0 -13
  1503. package/dist/matrix-thread-bindings-B77Krs8r.js +0 -12
  1504. package/dist/mattermost-Cg2PI71s.js +0 -18
  1505. package/dist/mcp/plugin-tools-serve.js +0 -105
  1506. package/dist/mcp-cli-BMNT4RIm.js +0 -768
  1507. package/dist/mcp-config-3y1z3N2x.js +0 -118
  1508. package/dist/media-CUdiVhEt.js +0 -1691
  1509. package/dist/media-limits-DmcT5KnO.js +0 -14
  1510. package/dist/media-runtime-8QR_uTs0.js +0 -295
  1511. package/dist/media-understanding-CpMkSmKj.js +0 -51
  1512. package/dist/media-understanding-provider-C0xVBaas.js +0 -11
  1513. package/dist/media-understanding-provider-C8RSrdEy.js +0 -16
  1514. package/dist/media-understanding-provider-CCB6_bwc2.js +0 -9
  1515. package/dist/media-understanding-provider-CZ83ep6L.js +0 -16
  1516. package/dist/media-understanding-provider-Cmcg82YY.js +0 -28
  1517. package/dist/media-understanding-provider-D1_z5Kwx.js +0 -11
  1518. package/dist/media-understanding-provider-DC9bhcFj.js +0 -11
  1519. package/dist/media-understanding-provider-DbMV-bHu.js +0 -17
  1520. package/dist/media-understanding-provider-Drg3Vyoe.js +0 -86
  1521. package/dist/media-understanding-runtime-JIhXSD7e.js +0 -15
  1522. package/dist/media-understanding.runtime-2Muvvak4.js +0 -7
  1523. package/dist/media-understanding.runtime.js +0 -1
  1524. package/dist/memory-DPYsR3Cn.js +0 -228
  1525. package/dist/memory-core-engine-runtime-DP_nzKMm.js +0 -14
  1526. package/dist/memory-core-host-engine-embeddings-BhsmnP-6.js +0 -1370
  1527. package/dist/memory-core-host-engine-foundation-CtFD8jpc.js +0 -10
  1528. package/dist/memory-core-host-engine-qmd-DCvmid82.js +0 -375
  1529. package/dist/memory-core-host-engine-storage-N3YflxjF.js +0 -109
  1530. package/dist/memory-core-host-multimodal-BVd6eEE3.js +0 -1
  1531. package/dist/memory-core-host-query-Bxzu0mAD.js +0 -2
  1532. package/dist/memory-core-host-runtime-cli-nz5fxbbn.js +0 -10
  1533. package/dist/memory-core-host-runtime-core-BcGQFQUw.js +0 -8
  1534. package/dist/memory-core-host-runtime-files-DO5A0pY5.js +0 -3
  1535. package/dist/memory-core-host-secret-CQAiTACg.js +0 -1
  1536. package/dist/memory-core-host-status-0g2XexDn.js +0 -44
  1537. package/dist/memory-embedding-providers-BOMS0u3X.js +0 -34
  1538. package/dist/memory-lancedb-kZBcB07O.js +0 -2
  1539. package/dist/memory-runtime-BIGGpmaC.js +0 -2
  1540. package/dist/memory-runtime-XyiDon5w.js +0 -34
  1541. package/dist/memory-search-CQFSugEg.js +0 -2
  1542. package/dist/memory-search-DpAYXyjc.js +0 -202
  1543. package/dist/memory-state-DDJh6L4-.js +0 -41
  1544. package/dist/mention-gating-_kzByrvM.js +0 -25
  1545. package/dist/mentions-BCBF5Klg.js +0 -65
  1546. package/dist/mentions-BKYgZd-C.js +0 -155
  1547. package/dist/merge-patch-CtvE2OP0.js +0 -65
  1548. package/dist/message-Dna6Vsdg.js +0 -205
  1549. package/dist/message-action-discovery-CPTCAl8K.js +0 -133
  1550. package/dist/message-action-runner-Byldnjex.js +0 -1703
  1551. package/dist/message-channel-bEWdw4ul.js +0 -105
  1552. package/dist/message-handler-C9TRy9hy.js +0 -1771
  1553. package/dist/message-hook-mappers-CzwFvq_c.js +0 -255
  1554. package/dist/messages-CQT2FDZ3.js +0 -270
  1555. package/dist/method-scopes-B6e_KuRU.js +0 -2663
  1556. package/dist/migrate-cli-C_iDle77.js +0 -500
  1557. package/dist/migration-snapshot.runtime-DAzTUgU-.js +0 -3
  1558. package/dist/migration-snapshot.runtime.js +0 -1
  1559. package/dist/mime-DkaKoCVP.js +0 -156
  1560. package/dist/min-host-version-CIhgRq0c.js +0 -349
  1561. package/dist/minimax-vlm-Dh6g-MLh.js +0 -512
  1562. package/dist/model-auth-DcCyGs_6.js +0 -377
  1563. package/dist/model-auth-env-OT6ucjoP.js +0 -63
  1564. package/dist/model-auth-label-fGtOs2u-.js +0 -45
  1565. package/dist/model-auth-markers-D2z_AIuC.js +0 -70
  1566. package/dist/model-auth-runtime-shared-DnhseQ_3.js +0 -18
  1567. package/dist/model-buttons-zQ-cRhqo.js +0 -187
  1568. package/dist/model-catalog-f9zO4b6C.js +0 -208
  1569. package/dist/model-catalog.runtime-iRu_OMJS.js +0 -2
  1570. package/dist/model-catalog.runtime.js +0 -1
  1571. package/dist/model-definitions-BGWurJeM.js +0 -49
  1572. package/dist/model-definitions-C-e07VgA.js +0 -255
  1573. package/dist/model-definitions-DUANiLUG.js +0 -126
  1574. package/dist/model-definitions-DrxdjAkB.js +0 -202
  1575. package/dist/model-id-9W_sHLHy.js +0 -12
  1576. package/dist/model-id-DEv7HEyl.js +0 -20
  1577. package/dist/model-input-DwbpFRYm.js +0 -20
  1578. package/dist/model-overrides-BaecXmMv.js +0 -84
  1579. package/dist/model-overrides-UUODi1G1.js +0 -91
  1580. package/dist/model-param-b-BHlbSl5R.js +0 -15
  1581. package/dist/model-picker-BgVMnja3.js +0 -439
  1582. package/dist/model-picker-D8elZqN_.js +0 -3
  1583. package/dist/model-picker.runtime-BUfgRpvT.js +0 -15
  1584. package/dist/model-picker.runtime.js +0 -1
  1585. package/dist/model-runtime-CkjgxQmB.js +0 -1772
  1586. package/dist/model-selection-DXY5nwui.js +0 -407
  1587. package/dist/model-selection-Dx6Ag-ZE.js +0 -505
  1588. package/dist/model-suppression-C8XSEnsv.js +0 -24
  1589. package/dist/model-suppression.runtime-Dqra9AAF.js +0 -7
  1590. package/dist/model-suppression.runtime.js +0 -1
  1591. package/dist/models--Ze_o5z6.js +0 -193
  1592. package/dist/models-7_w_ynp7.js +0 -35
  1593. package/dist/models-BMmB_oQc.js +0 -130
  1594. package/dist/models-B_TKM4gG.js +0 -18
  1595. package/dist/models-B_UROL5b.js +0 -3
  1596. package/dist/models-BmDGSZCK.js +0 -31
  1597. package/dist/models-BywIyTzh.js +0 -126
  1598. package/dist/models-C5GB-E7D.js +0 -154
  1599. package/dist/models-DU3Lv10g.js +0 -754
  1600. package/dist/models-VgpjMiqM.js +0 -138
  1601. package/dist/models-_DZVZ2Na.js +0 -18
  1602. package/dist/models-bBe0FFJe.js +0 -2550
  1603. package/dist/models-cli-kZR11PgM.js +0 -197
  1604. package/dist/models-config-D6j7jkCN.js +0 -2
  1605. package/dist/models-config-lYKxSxLo.js +0 -1106
  1606. package/dist/models-config.runtime-D2tdVUsi.js +0 -2
  1607. package/dist/models-config.runtime.js +0 -1
  1608. package/dist/models-emJUoDsF.js +0 -40
  1609. package/dist/models-gPCm0Fco.js +0 -122
  1610. package/dist/models-mi7nu17U.js +0 -99
  1611. package/dist/models-nUP9ZPV8.js +0 -552
  1612. package/dist/models-provider-runtime-DfIZ0cvV.js +0 -2
  1613. package/dist/monitor-BEjwRY59.js +0 -3622
  1614. package/dist/monitor-BiwufaF7.js +0 -718
  1615. package/dist/monitor-BqwlHm94.js +0 -3660
  1616. package/dist/monitor-Cj6Atk8I.js +0 -676
  1617. package/dist/monitor-D2qBnOYz.js +0 -666
  1618. package/dist/monitor-DZmBV1Nj2.js +0 -2
  1619. package/dist/monitor-RMoB6sGQ.js +0 -4067
  1620. package/dist/monitor-auth-EvlH1zbN.js +0 -192
  1621. package/dist/monitor-lbUydC5_.js +0 -1525
  1622. package/dist/monitor-polling.runtime-O6ZG6yYv.js +0 -307
  1623. package/dist/monitor-polling.runtime.js +0 -1
  1624. package/dist/monitor-provider-x4TUmYNN.js +0 -1782
  1625. package/dist/monitor-vE0skDM1.js +0 -687
  1626. package/dist/monitor-webhook.runtime-DoTv_oZv.js +0 -297
  1627. package/dist/monitor-webhook.runtime.js +0 -1
  1628. package/dist/moonshot-stream-wrappers-Csssd6kW.js +0 -24
  1629. package/dist/moonshot-thinking-stream-wrappers-D3j6Q9Yk.js +0 -69
  1630. package/dist/msteams-DsFLaFEV.js +0 -33
  1631. package/dist/multimodal-DoXQtvBl.js +0 -66
  1632. package/dist/mutable-allowlist-detectors-CbFK2eTK.js +0 -62
  1633. package/dist/native-command-registry-B4BAqmAW.js +0 -2
  1634. package/dist/native-command-session-targets-DfUCBY63.js +0 -10
  1635. package/dist/net-DjzoSxQo.js +0 -265
  1636. package/dist/network-discovery-display-h8MqTMCI.js +0 -48
  1637. package/dist/network-mode-QjJNOXMa.js +0 -17
  1638. package/dist/nextcloud-talk-COZ5YrPY.js +0 -18
  1639. package/dist/node-cli-z8LHYl1w.js +0 -2323
  1640. package/dist/node-command-policy-DoeXKD1V.js +0 -205
  1641. package/dist/node-commands-ycnRypMq.js +0 -11
  1642. package/dist/node-require-BgDD9bTi.js +0 -14
  1643. package/dist/node-resolve-Drr1RIcN.js +0 -110
  1644. package/dist/node-service-Nyf8eLc4.js +0 -68
  1645. package/dist/node-startup-env-CVMjxAUF.js +0 -50
  1646. package/dist/nodes-cli-BMyafV_R.js +0 -1044
  1647. package/dist/nodes-screen-oyGHNlY5.js +0 -219
  1648. package/dist/nodes.helpers-DKBA9twS.js +0 -203
  1649. package/dist/normalize-C46CugdT.js +0 -35
  1650. package/dist/normalize-reply-VrMa_PA2.js +0 -500
  1651. package/dist/normalize-secret-input-CC9iFcnK.js +0 -32
  1652. package/dist/nostr-DGfd-Skj.js +0 -19
  1653. package/dist/note-B5R9zt2K.js +0 -109
  1654. package/dist/notify-CKEt6MKY.js +0 -298
  1655. package/dist/npm-registry-spec-dWUFCqDk.js +0 -100
  1656. package/dist/oauth-BBIy_OBl.js +0 -152
  1657. package/dist/oauth-DzMUt9ZO.js +0 -56
  1658. package/dist/oauth.credentials-CKrXIXPf.js +0 -119
  1659. package/dist/oauth.flow-Dd6MZcHS.js +0 -122
  1660. package/dist/oauth.http-CZlbXoZD.js +0 -23
  1661. package/dist/oauth.project-DAVNbct7.js +0 -125
  1662. package/dist/oauth.shared-D1_wwlyt.js +0 -26
  1663. package/dist/oauth.token-CnB-w_v2.js +0 -42
  1664. package/dist/ollama-EE_SvO8P.js +0 -26
  1665. package/dist/onboard-2otvb4-n.js +0 -307
  1666. package/dist/onboard-72nGEzpd.js +0 -25
  1667. package/dist/onboard-B14oDS4M.js +0 -23
  1668. package/dist/onboard-BH5hcOyK.js +0 -39
  1669. package/dist/onboard-BRkQIFt_.js +0 -25
  1670. package/dist/onboard-BSArlkkq.js +0 -73
  1671. package/dist/onboard-Bau_HSmO.js +0 -36
  1672. package/dist/onboard-BsqpQhXj.js +0 -591
  1673. package/dist/onboard-CBa7u1iZ.js +0 -25
  1674. package/dist/onboard-CLKZrJow.js +0 -29
  1675. package/dist/onboard-COaMJ5wS.js +0 -28
  1676. package/dist/onboard-CbTQZti9.js +0 -48
  1677. package/dist/onboard-Ce3rcBNR.js +0 -29
  1678. package/dist/onboard-CiMzgSvO.js +0 -67
  1679. package/dist/onboard-DNuWjUOg.js +0 -17
  1680. package/dist/onboard-DY3JtOcX.js +0 -47
  1681. package/dist/onboard-Dd_eFJ7g.js +0 -25
  1682. package/dist/onboard-DgMI-C3P.js +0 -24
  1683. package/dist/onboard-Dj3Kkl9C.js +0 -49
  1684. package/dist/onboard-Djne8OY8.js +0 -34
  1685. package/dist/onboard-DnNU28xK.js +0 -48
  1686. package/dist/onboard-MFS79j1I.js +0 -23
  1687. package/dist/onboard-REHqRyQm.js +0 -26
  1688. package/dist/onboard-VVnzyvuh.js +0 -46
  1689. package/dist/onboard-channels-B8UocRdo.js +0 -705
  1690. package/dist/onboard-channels-Ci5QQyQ0.js +0 -2
  1691. package/dist/onboard-config-7edS4yYd.js +0 -2
  1692. package/dist/onboard-config-C-6p2HNL.js +0 -29
  1693. package/dist/onboard-custom-BREC7K0s.js +0 -2
  1694. package/dist/onboard-custom-D7oXiV6u.js +0 -646
  1695. package/dist/onboard-helpers-BCIfy96O.js +0 -4
  1696. package/dist/onboard-helpers-CLedS83g.js +0 -227
  1697. package/dist/onboard-hooks-DW0gav3i.js +0 -52
  1698. package/dist/onboard-lh38uUOa.js +0 -25
  1699. package/dist/onboard-rH_HA9v-.js +0 -34
  1700. package/dist/onboard-remote-DG5Rb2y7.js +0 -2
  1701. package/dist/onboard-remote-DgDwHLCW.js +0 -193
  1702. package/dist/onboard-search-Bz78SAON.js +0 -339
  1703. package/dist/onboard-skills-BK1iF6NI.js +0 -2
  1704. package/dist/onboard-skills-Cfs4Gz-d.js +0 -134
  1705. package/dist/openai-B3atWWiZ.js +0 -21
  1706. package/dist/openai-codex-auth-identity-blYgqX5I.js +0 -40
  1707. package/dist/openai-codex-catalog-DQoW5ntP.js +0 -11
  1708. package/dist/openai-codex-provider-BeX3_fQL.js +0 -254
  1709. package/dist/openai-provider-DfSRc815.js +0 -272
  1710. package/dist/openai-stream-wrappers-Cmn9nSYj.js +0 -338
  1711. package/dist/openclaw-exec-env-DnTrPIdx.js +0 -17
  1712. package/dist/openclaw-root-F1SOdmJ0.js +0 -88
  1713. package/dist/openclaw-tools.runtime-Dx73yE1V.js +0 -2
  1714. package/dist/openclaw-tools.runtime.js +0 -1
  1715. package/dist/operator-approvals-client-NQtGN5k_.js +0 -33
  1716. package/dist/order-DNBhjW6F.js +0 -744
  1717. package/dist/origin-routing-BC2EzQqM.js +0 -15
  1718. package/dist/origin-routing-BVUTLJGu.js +0 -2
  1719. package/dist/os-summary-CdlXkpL1.js +0 -26
  1720. package/dist/outbound-adapter-D6WGzS7P.js +0 -183
  1721. package/dist/outbound-ek4CqhT2.js +0 -2
  1722. package/dist/outbound-hgMEZIU9.js +0 -2739
  1723. package/dist/outbound-media-B2ZrkOxl.js +0 -15
  1724. package/dist/outbound-runtime-CtDmQy3z.js +0 -2
  1725. package/dist/outbound-send-deps-COPf3lwV.js +0 -7
  1726. package/dist/outbound-session-DHKvttsz.js +0 -41
  1727. package/dist/pairing-challenge-O7jo1Q5R.js +0 -33
  1728. package/dist/pairing-cli-BEUxC5EH.js +0 -116
  1729. package/dist/pairing-labels-Cj1fFxG9.js +0 -7
  1730. package/dist/pairing-message-FaqHPEFk.js +0 -4
  1731. package/dist/pairing-messages-DxLpe0GE.js +0 -23
  1732. package/dist/pairing-pending-DGyUpmjC.js +0 -14
  1733. package/dist/pairing-store-B171dUVa.js +0 -617
  1734. package/dist/pairing-token-CnyXOU__.js +0 -88
  1735. package/dist/param-readers-CqAoT2n2.js +0 -2
  1736. package/dist/parse-duration-D9q1V0xx.js +0 -41
  1737. package/dist/parse-finite-number-CzdLC_gQ.js +0 -30
  1738. package/dist/parse-json-compat-DfjRYtKX.js +0 -11
  1739. package/dist/parse-log-line-Cd0JHPGg.js +0 -43
  1740. package/dist/parse-port-BFmNhrtE.js +0 -8
  1741. package/dist/parse-timeout-bktz0495.js +0 -27
  1742. package/dist/path-alias-guards-BeOn9PZR.js +0 -40
  1743. package/dist/path-env-C2F1kvna.js +0 -87
  1744. package/dist/path-safety-2mfHCe0n.js +0 -12
  1745. package/dist/paths-Bw8Ci57u.js +0 -2
  1746. package/dist/paths-GWMNxnBn.js +0 -201
  1747. package/dist/paths-xpks599B.js +0 -180
  1748. package/dist/payload-S8niBCaz.js +0 -90
  1749. package/dist/pdf-extract-Cm83kt2M.js +0 -73
  1750. package/dist/perplexity-web-search-provider-Cgr2BYVk.js +0 -423
  1751. package/dist/persistent-bindings.lifecycle-CAOm8v8I.js +0 -159
  1752. package/dist/persistent-dedupe-DoNHVMWs.js +0 -116
  1753. package/dist/pi-embedded-DEAtCIdT.js +0 -40616
  1754. package/dist/pi-embedded-helpers-BVjvCsor.js +0 -1733
  1755. package/dist/pi-embedded.runtime-Ctj3QFs-.js +0 -4
  1756. package/dist/pi-embedded.runtime.js +0 -1
  1757. package/dist/pi-model-discovery-KjI5xf8m.js +0 -188
  1758. package/dist/pi-settings-BJzoHYF9.js +0 -57
  1759. package/dist/pi-tools.before-tool-call.runtime-DJ6s0GDV.js +0 -354
  1760. package/dist/pi-tools.before-tool-call.runtime.js +0 -1
  1761. package/dist/plugin-auto-enable-BZvicayR.js +0 -400
  1762. package/dist/plugin-entry-D0vhddM4.js +0 -25
  1763. package/dist/plugin-entry.runtime-Xd644UDA.js +0 -112
  1764. package/dist/plugin-entry.runtime.js +0 -1
  1765. package/dist/plugin-error-boundary-RI4ByQoA.js +0 -55
  1766. package/dist/plugin-error-handler-DWUTf_UF.js +0 -109
  1767. package/dist/plugin-health-checker-2c6LyJwr.js +0 -125
  1768. package/dist/plugin-hot-reload-CA3__dZN.js +0 -215
  1769. package/dist/plugin-install-BjVLwj7-.js +0 -230
  1770. package/dist/plugin-install-CjwMt13j.js +0 -2
  1771. package/dist/plugin-install-config-policy-MApev-w-.js +0 -93
  1772. package/dist/plugin-install-path-warnings-BkBH-k4n.js +0 -40
  1773. package/dist/plugin-install-plan-0fWhyVBN.js +0 -50
  1774. package/dist/plugin-registry-CORVyKHv.js +0 -74
  1775. package/dist/plugin-registry-Dl1iIh7W.js +0 -2
  1776. package/dist/plugin-runtime-Dd1YN95W.js +0 -6
  1777. package/dist/plugin-sdk/account-core.js +0 -8
  1778. package/dist/plugin-sdk/account-helpers.js +0 -4
  1779. package/dist/plugin-sdk/account-id.js +0 -3
  1780. package/dist/plugin-sdk/account-resolution.js +0 -12
  1781. package/dist/plugin-sdk/acp-runtime.js +0 -3
  1782. package/dist/plugin-sdk/agent-config-primitives.js +0 -3
  1783. package/dist/plugin-sdk/agent-runtime.js +0 -29
  1784. package/dist/plugin-sdk/allow-from.js +0 -5
  1785. package/dist/plugin-sdk/allowlist-config-edit.js +0 -2
  1786. package/dist/plugin-sdk/amazon-bedrock.js +0 -15
  1787. package/dist/plugin-sdk/anthropic-vertex.js +0 -2
  1788. package/dist/plugin-sdk/approval-runtime.js +0 -8
  1789. package/dist/plugin-sdk/bluebubbles-policy.js +0 -2
  1790. package/dist/plugin-sdk/bluebubbles.js +0 -39
  1791. package/dist/plugin-sdk/boolean-param.js +0 -2
  1792. package/dist/plugin-sdk/browser-runtime.js +0 -3
  1793. package/dist/plugin-sdk/browser-support.js +0 -44
  1794. package/dist/plugin-sdk/browser.js +0 -15
  1795. package/dist/plugin-sdk/byteplus.js +0 -17
  1796. package/dist/plugin-sdk/channel-actions.js +0 -3
  1797. package/dist/plugin-sdk/channel-config-helpers.js +0 -2
  1798. package/dist/plugin-sdk/channel-config-primitives.js +0 -4
  1799. package/dist/plugin-sdk/channel-config-schema.js +0 -7
  1800. package/dist/plugin-sdk/channel-config-writes.js +0 -3
  1801. package/dist/plugin-sdk/channel-contract.js +0 -1
  1802. package/dist/plugin-sdk/channel-feedback.js +0 -5
  1803. package/dist/plugin-sdk/channel-inbound.js +0 -10
  1804. package/dist/plugin-sdk/channel-lifecycle.js +0 -3
  1805. package/dist/plugin-sdk/channel-pairing.js +0 -2
  1806. package/dist/plugin-sdk/channel-policy.js +0 -6
  1807. package/dist/plugin-sdk/channel-reply-pipeline.js +0 -2
  1808. package/dist/plugin-sdk/channel-runtime.js +0 -16
  1809. package/dist/plugin-sdk/channel-send-result.js +0 -2
  1810. package/dist/plugin-sdk/channel-setup.js +0 -5
  1811. package/dist/plugin-sdk/channel-status.js +0 -5
  1812. package/dist/plugin-sdk/channel-targets.js +0 -5
  1813. package/dist/plugin-sdk/chutes.js +0 -20
  1814. package/dist/plugin-sdk/cli-backend.js +0 -3
  1815. package/dist/plugin-sdk/cli-runtime.js +0 -7
  1816. package/dist/plugin-sdk/cloudflare-ai-gateway.js +0 -18
  1817. package/dist/plugin-sdk/collection-runtime.js +0 -3
  1818. package/dist/plugin-sdk/command-auth-native.js +0 -6
  1819. package/dist/plugin-sdk/command-auth.js +0 -14
  1820. package/dist/plugin-sdk/command-detection.js +0 -3
  1821. package/dist/plugin-sdk/command-surface.js +0 -3
  1822. package/dist/plugin-sdk/compat.js +0 -35
  1823. package/dist/plugin-sdk/config-runtime.js +0 -25
  1824. package/dist/plugin-sdk/conversation-runtime.js +0 -15
  1825. package/dist/plugin-sdk/core.js +0 -22
  1826. package/dist/plugin-sdk/dangerous-name-runtime.js +0 -3
  1827. package/dist/plugin-sdk/deepseek.js +0 -14
  1828. package/dist/plugin-sdk/device-bootstrap.js +0 -4
  1829. package/dist/plugin-sdk/diagnostic-runtime.js +0 -4
  1830. package/dist/plugin-sdk/diagnostics-otel.js +0 -6
  1831. package/dist/plugin-sdk/diffs.js +0 -4
  1832. package/dist/plugin-sdk/direct-dm.js +0 -2
  1833. package/dist/plugin-sdk/directory-runtime.js +0 -5
  1834. package/dist/plugin-sdk/discord-account.js +0 -2
  1835. package/dist/plugin-sdk/discord-core.js +0 -9
  1836. package/dist/plugin-sdk/discord-runtime-surface.js +0 -2
  1837. package/dist/plugin-sdk/discord-session-key.js +0 -2
  1838. package/dist/plugin-sdk/discord-surface.js +0 -2
  1839. package/dist/plugin-sdk/discord-thread-bindings.js +0 -2
  1840. package/dist/plugin-sdk/discord-timeouts.js +0 -2
  1841. package/dist/plugin-sdk/discord.js +0 -21
  1842. package/dist/plugin-sdk/error-runtime.js +0 -3
  1843. package/dist/plugin-sdk/extension-shared.js +0 -3
  1844. package/dist/plugin-sdk/feishu-conversation.js +0 -2
  1845. package/dist/plugin-sdk/feishu-setup.js +0 -2
  1846. package/dist/plugin-sdk/feishu.js +0 -34
  1847. package/dist/plugin-sdk/fetch-runtime.js +0 -7
  1848. package/dist/plugin-sdk/file-lock.js +0 -2
  1849. package/dist/plugin-sdk/gateway-runtime.js +0 -4
  1850. package/dist/plugin-sdk/github-copilot-login.js +0 -2
  1851. package/dist/plugin-sdk/github-copilot-token.js +0 -3
  1852. package/dist/plugin-sdk/global-singleton.js +0 -4
  1853. package/dist/plugin-sdk/google.js +0 -2
  1854. package/dist/plugin-sdk/googlechat.js +0 -38
  1855. package/dist/plugin-sdk/group-access.js +0 -2
  1856. package/dist/plugin-sdk/hook-runtime.js +0 -4
  1857. package/dist/plugin-sdk/host-runtime.js +0 -4
  1858. package/dist/plugin-sdk/huggingface.js +0 -18
  1859. package/dist/plugin-sdk/image-generation-core.js +0 -63
  1860. package/dist/plugin-sdk/image-generation.js +0 -2
  1861. package/dist/plugin-sdk/index.js +0 -5
  1862. package/dist/plugin-sdk/infra-runtime.js +0 -45
  1863. package/dist/plugin-sdk/interactive-runtime.js +0 -4
  1864. package/dist/plugin-sdk/irc-surface.js +0 -2
  1865. package/dist/plugin-sdk/irc.js +0 -30
  1866. package/dist/plugin-sdk/json-store.js +0 -3
  1867. package/dist/plugin-sdk/keyed-async-queue.js +0 -2
  1868. package/dist/plugin-sdk/kilocode.js +0 -23
  1869. package/dist/plugin-sdk/kimi-coding.js +0 -11
  1870. package/dist/plugin-sdk/lazy-runtime.js +0 -3
  1871. package/dist/plugin-sdk/line-core.js +0 -6
  1872. package/dist/plugin-sdk/line-runtime.js +0 -2
  1873. package/dist/plugin-sdk/line-surface.js +0 -2
  1874. package/dist/plugin-sdk/line.js +0 -9
  1875. package/dist/plugin-sdk/llm-task.js +0 -6
  1876. package/dist/plugin-sdk/logging-core.js +0 -5
  1877. package/dist/plugin-sdk/markdown-table-runtime.js +0 -3
  1878. package/dist/plugin-sdk/matrix-helper.js +0 -2
  1879. package/dist/plugin-sdk/matrix-runtime-heavy.js +0 -5
  1880. package/dist/plugin-sdk/matrix-runtime-shared.js +0 -3
  1881. package/dist/plugin-sdk/matrix-runtime-surface.js +0 -2
  1882. package/dist/plugin-sdk/matrix-surface.js +0 -2
  1883. package/dist/plugin-sdk/matrix-thread-bindings.js +0 -2
  1884. package/dist/plugin-sdk/matrix.js +0 -53
  1885. package/dist/plugin-sdk/mattermost-policy.js +0 -11
  1886. package/dist/plugin-sdk/mattermost.js +0 -41
  1887. package/dist/plugin-sdk/media-runtime.js +0 -17
  1888. package/dist/plugin-sdk/media-understanding-runtime.js +0 -2
  1889. package/dist/plugin-sdk/media-understanding.js +0 -3
  1890. package/dist/plugin-sdk/memory-core-engine-runtime.js +0 -2
  1891. package/dist/plugin-sdk/memory-core-host-engine-embeddings.js +0 -6
  1892. package/dist/plugin-sdk/memory-core-host-engine-foundation.js +0 -17
  1893. package/dist/plugin-sdk/memory-core-host-engine-qmd.js +0 -3
  1894. package/dist/plugin-sdk/memory-core-host-engine-storage.js +0 -4
  1895. package/dist/plugin-sdk/memory-core-host-multimodal.js +0 -3
  1896. package/dist/plugin-sdk/memory-core-host-query.js +0 -3
  1897. package/dist/plugin-sdk/memory-core-host-runtime-cli.js +0 -12
  1898. package/dist/plugin-sdk/memory-core-host-runtime-core.js +0 -14
  1899. package/dist/plugin-sdk/memory-core-host-runtime-files.js +0 -4
  1900. package/dist/plugin-sdk/memory-core-host-secret.js +0 -3
  1901. package/dist/plugin-sdk/memory-core-host-status.js +0 -2
  1902. package/dist/plugin-sdk/memory-core.js +0 -29
  1903. package/dist/plugin-sdk/memory-lancedb.js +0 -4
  1904. package/dist/plugin-sdk/minimax.js +0 -24
  1905. package/dist/plugin-sdk/mistral.js +0 -17
  1906. package/dist/plugin-sdk/models-provider-runtime.js +0 -3
  1907. package/dist/plugin-sdk/modelstudio-definitions.js +0 -19
  1908. package/dist/plugin-sdk/modelstudio.js +0 -24
  1909. package/dist/plugin-sdk/moonshot.js +0 -17
  1910. package/dist/plugin-sdk/msteams.js +0 -46
  1911. package/dist/plugin-sdk/native-command-registry.js +0 -3
  1912. package/dist/plugin-sdk/nextcloud-talk.js +0 -35
  1913. package/dist/plugin-sdk/nostr.js +0 -14
  1914. package/dist/plugin-sdk/nvidia.js +0 -11
  1915. package/dist/plugin-sdk/ollama-surface.js +0 -24
  1916. package/dist/plugin-sdk/ollama.js +0 -2
  1917. package/dist/plugin-sdk/openai.js +0 -2
  1918. package/dist/plugin-sdk/opencode-go.js +0 -14
  1919. package/dist/plugin-sdk/opencode.js +0 -15
  1920. package/dist/plugin-sdk/outbound-runtime.js +0 -5
  1921. package/dist/plugin-sdk/param-readers.js +0 -3
  1922. package/dist/plugin-sdk/plugin-entry.js +0 -3
  1923. package/dist/plugin-sdk/plugin-runtime.js +0 -8
  1924. package/dist/plugin-sdk/process-runtime.js +0 -3
  1925. package/dist/plugin-sdk/provider-auth-api-key.js +0 -9
  1926. package/dist/plugin-sdk/provider-auth-login.js +0 -2
  1927. package/dist/plugin-sdk/provider-auth-result.js +0 -2
  1928. package/dist/plugin-sdk/provider-auth-runtime.js +0 -5
  1929. package/dist/plugin-sdk/provider-auth.js +0 -17
  1930. package/dist/plugin-sdk/provider-catalog-shared.js +0 -2
  1931. package/dist/plugin-sdk/provider-entry.js +0 -2
  1932. package/dist/plugin-sdk/provider-env-vars.js +0 -3
  1933. package/dist/plugin-sdk/provider-http.js +0 -6
  1934. package/dist/plugin-sdk/provider-model-shared.js +0 -5
  1935. package/dist/plugin-sdk/provider-moonshot.js +0 -3
  1936. package/dist/plugin-sdk/provider-onboard.js +0 -3
  1937. package/dist/plugin-sdk/provider-setup.js +0 -3
  1938. package/dist/plugin-sdk/provider-stream.js +0 -4
  1939. package/dist/plugin-sdk/provider-tools.js +0 -2
  1940. package/dist/plugin-sdk/provider-usage.js +0 -3
  1941. package/dist/plugin-sdk/provider-web-fetch.js +0 -6
  1942. package/dist/plugin-sdk/provider-web-search.js +0 -7
  1943. package/dist/plugin-sdk/provider-zai-endpoint.js +0 -2
  1944. package/dist/plugin-sdk/qianfan.js +0 -13
  1945. package/dist/plugin-sdk/reply-chunking.js +0 -4
  1946. package/dist/plugin-sdk/reply-dispatch-runtime.js +0 -5
  1947. package/dist/plugin-sdk/reply-history.js +0 -3
  1948. package/dist/plugin-sdk/reply-payload.js +0 -2
  1949. package/dist/plugin-sdk/reply-runtime.js +0 -14
  1950. package/dist/plugin-sdk/request-url.js +0 -2
  1951. package/dist/plugin-sdk/retry-runtime.js +0 -4
  1952. package/dist/plugin-sdk/root-alias.cjs +0 -347
  1953. package/dist/plugin-sdk/routing.js +0 -9
  1954. package/dist/plugin-sdk/runtime-config-snapshot.js +0 -3
  1955. package/dist/plugin-sdk/runtime-env.js +0 -17
  1956. package/dist/plugin-sdk/runtime-group-policy.js +0 -3
  1957. package/dist/plugin-sdk/runtime-store.js +0 -2
  1958. package/dist/plugin-sdk/runtime.js +0 -9
  1959. package/dist/plugin-sdk/sandbox.js +0 -6
  1960. package/dist/plugin-sdk/secret-input.js +0 -4
  1961. package/dist/plugin-sdk/security-runtime.js +0 -6
  1962. package/dist/plugin-sdk/self-hosted-provider-setup.js +0 -2
  1963. package/dist/plugin-sdk/session-store-runtime.js +0 -4
  1964. package/dist/plugin-sdk/setup-adapter-runtime.js +0 -3
  1965. package/dist/plugin-sdk/setup-runtime.js +0 -6
  1966. package/dist/plugin-sdk/setup-tools.js +0 -6
  1967. package/dist/plugin-sdk/setup.js +0 -13
  1968. package/dist/plugin-sdk/sglang.js +0 -15
  1969. package/dist/plugin-sdk/signal-account.js +0 -2
  1970. package/dist/plugin-sdk/signal-surface.js +0 -2
  1971. package/dist/plugin-sdk/signal.js +0 -24
  1972. package/dist/plugin-sdk/skill-commands-runtime.js +0 -3
  1973. package/dist/plugin-sdk/slack-account.js +0 -2
  1974. package/dist/plugin-sdk/slack-core.js +0 -7
  1975. package/dist/plugin-sdk/slack-runtime-surface.js +0 -2
  1976. package/dist/plugin-sdk/slack-surface.js +0 -2
  1977. package/dist/plugin-sdk/slack-target-parser.js +0 -2
  1978. package/dist/plugin-sdk/slack-targets.js +0 -3
  1979. package/dist/plugin-sdk/slack.js +0 -20
  1980. package/dist/plugin-sdk/speech-core.js +0 -4
  1981. package/dist/plugin-sdk/speech-runtime.js +0 -2
  1982. package/dist/plugin-sdk/speech.js +0 -5
  1983. package/dist/plugin-sdk/ssrf-runtime.js +0 -6
  1984. package/dist/plugin-sdk/state-paths.js +0 -3
  1985. package/dist/plugin-sdk/status-helpers.js +0 -4
  1986. package/dist/plugin-sdk/string-normalization-runtime.js +0 -3
  1987. package/dist/plugin-sdk/synthetic.js +0 -17
  1988. package/dist/plugin-sdk/telegram-account.js +0 -2
  1989. package/dist/plugin-sdk/telegram-allow-from.js +0 -12
  1990. package/dist/plugin-sdk/telegram-command-config.js +0 -3
  1991. package/dist/plugin-sdk/telegram-core.js +0 -18
  1992. package/dist/plugin-sdk/telegram-surface.js +0 -42
  1993. package/dist/plugin-sdk/temp-path.js +0 -4
  1994. package/dist/plugin-sdk/testing.js +0 -11
  1995. package/dist/plugin-sdk/text-runtime.js +0 -19
  1996. package/dist/plugin-sdk/thread-bindings-runtime.js +0 -4
  1997. package/dist/plugin-sdk/thread-ownership.js +0 -5
  1998. package/dist/plugin-sdk/tlon.js +0 -13
  1999. package/dist/plugin-sdk/together.js +0 -16
  2000. package/dist/plugin-sdk/tool-send.js +0 -2
  2001. package/dist/plugin-sdk/twitch.js +0 -8
  2002. package/dist/plugin-sdk/venice.js +0 -16
  2003. package/dist/plugin-sdk/vllm.js +0 -15
  2004. package/dist/plugin-sdk/voice-call.js +0 -7
  2005. package/dist/plugin-sdk/volcengine.js +0 -17
  2006. package/dist/plugin-sdk/web-media.js +0 -4
  2007. package/dist/plugin-sdk/webhook-ingress.js +0 -9
  2008. package/dist/plugin-sdk/webhook-path.js +0 -2
  2009. package/dist/plugin-sdk/webhook-request-guards.js +0 -3
  2010. package/dist/plugin-sdk/whatsapp-auth-presence.js +0 -2
  2011. package/dist/plugin-sdk/whatsapp-core.js +0 -11
  2012. package/dist/plugin-sdk/whatsapp-shared.js +0 -5
  2013. package/dist/plugin-sdk/whatsapp-surface.js +0 -2
  2014. package/dist/plugin-sdk/whatsapp-targets.js +0 -2
  2015. package/dist/plugin-sdk/windows-spawn.js +0 -2
  2016. package/dist/plugin-sdk/xai.js +0 -27
  2017. package/dist/plugin-sdk/zalo-setup.js +0 -2
  2018. package/dist/plugin-sdk/zalo.js +0 -38
  2019. package/dist/plugin-sdk/zalouser.js +0 -29
  2020. package/dist/plugin-sdk/zod.js +0 -3
  2021. package/dist/plugins/build-smoke-entry.js +0 -4
  2022. package/dist/plugins/provider-runtime.runtime.js +0 -2
  2023. package/dist/plugins/runtime/index.js +0 -2
  2024. package/dist/plugins/runtime/runtime-line.contract.js +0 -23
  2025. package/dist/plugins-DcjzAZWt.js +0 -5
  2026. package/dist/plugins-allowlist-DoZlIC4p.js +0 -14
  2027. package/dist/plugins-cli-G6GhHHD0.js +0 -561
  2028. package/dist/plugins-command-helpers-CIYzoC65.js +0 -116
  2029. package/dist/plugins-install-persist-C5-bJdRb.js +0 -121
  2030. package/dist/plugins-update-command-CsT_saJm.js +0 -974
  2031. package/dist/plugins-w6xUzHby.js +0 -40
  2032. package/dist/pluralkit-B_DWQnc5.js +0 -21
  2033. package/dist/pluralkit-Bez5QVFC.js +0 -2
  2034. package/dist/policy-D6OQdw73.js +0 -173
  2035. package/dist/policy-DXeeH8B2.js +0 -147
  2036. package/dist/poll-params-DTVSSuok.js +0 -52
  2037. package/dist/polls-CMmT0F_y.js +0 -35
  2038. package/dist/port-defaults-Dajs4Obu.js +0 -30
  2039. package/dist/ports-DuU-A86K.js +0 -262
  2040. package/dist/ports-ZA1n2It7.js +0 -432
  2041. package/dist/ports-lsof-Cw_6T7ru.js +0 -25
  2042. package/dist/ports-probe-DeuK48Pq.js +0 -14
  2043. package/dist/preflight-audio-DTSBExi8.js +0 -48
  2044. package/dist/preflight-audio.runtime-BJRLyBvf.js +0 -7
  2045. package/dist/preflight-audio.runtime.js +0 -1
  2046. package/dist/prepare-BQBndJUC.js +0 -1301
  2047. package/dist/probe-BO4hbHvs.js +0 -435
  2048. package/dist/probe-DPv2pfj5.js +0 -1868
  2049. package/dist/probe-DlO2Q9rN.js +0 -170
  2050. package/dist/probe-RbbTQOHx.js +0 -178
  2051. package/dist/probe-auth-Bl9MHtlP.js +0 -2
  2052. package/dist/probe-auth-CUfEH7di.js +0 -63
  2053. package/dist/probe-eYLpFww_.js +0 -137
  2054. package/dist/probe-kfBMuOWF.js +0 -2
  2055. package/dist/probe-wktb4WTP.js +0 -349
  2056. package/dist/probe.runtime-BhbUesak.js +0 -2
  2057. package/dist/probe.runtime.js +0 -1
  2058. package/dist/process-runtime-CBFMzhIk.js +0 -2
  2059. package/dist/process-scoped-map-C7IoOrV-.js +0 -61
  2060. package/dist/profile-B5n9yLlB.js +0 -2
  2061. package/dist/profile-CmsqnPsu.js +0 -107
  2062. package/dist/profile-update-D6f10CZk.js +0 -67
  2063. package/dist/profile-utils-C7uzTwgJ.js +0 -15
  2064. package/dist/profiles-BoNergZo.js +0 -79
  2065. package/dist/program-BuKG0Ntx.js +0 -158
  2066. package/dist/program-context-DDmlbmbl.js +0 -2
  2067. package/dist/program-context-DQOnR5c_.js +0 -10
  2068. package/dist/progress-DQvXYKne.js +0 -132
  2069. package/dist/prompt-COzf5LIJ.js +0 -2
  2070. package/dist/prompt-OSmU-o7R.js +0 -20
  2071. package/dist/prompt-select-styled-yYL3el77.js +0 -6432
  2072. package/dist/prompt-style-DekFM6h7.js +0 -7
  2073. package/dist/prompts-MtRTsZpw.js +0 -9
  2074. package/dist/prototype-keys-DrjhYNcz.js +0 -11
  2075. package/dist/provider-BWTXmDq3.js +0 -3685
  2076. package/dist/provider-BrmcrkEe.js +0 -70
  2077. package/dist/provider-ByBRbhW5.js +0 -7216
  2078. package/dist/provider-api-key-auth-BcyipSdy.js +0 -109
  2079. package/dist/provider-api-key-auth.runtime-BRu_8L4m.js +0 -14
  2080. package/dist/provider-api-key-auth.runtime.js +0 -1
  2081. package/dist/provider-attribution-DMVujx9B.js +0 -285
  2082. package/dist/provider-auth-DK2UmYsZ.js +0 -43
  2083. package/dist/provider-auth-api-key-99KxscjW.js +0 -5
  2084. package/dist/provider-auth-choice-GbHta8Bp.js +0 -134
  2085. package/dist/provider-auth-choice-helpers-CO2MnSGR.js +0 -58
  2086. package/dist/provider-auth-choice-preference-DvAqSMGK.js +0 -44
  2087. package/dist/provider-auth-choice.runtime-B8R63sLq.js +0 -14
  2088. package/dist/provider-auth-choice.runtime-DypTKgMQ.js +0 -2
  2089. package/dist/provider-auth-choice.runtime.js +0 -1
  2090. package/dist/provider-auth-choices-n-JV1XgU.js +0 -65
  2091. package/dist/provider-auth-guidance-DAB9sGGR.js +0 -35
  2092. package/dist/provider-auth-helpers-gmTAji1W.js +0 -92
  2093. package/dist/provider-auth-input-GgY_tjJh.js +0 -116
  2094. package/dist/provider-auth-login-BYbccnB1.js +0 -8
  2095. package/dist/provider-auth-login.runtime-DnSxCwqU.js +0 -196
  2096. package/dist/provider-auth-login.runtime.js +0 -1
  2097. package/dist/provider-auth-mode-Dbja5LLX.js +0 -20
  2098. package/dist/provider-auth-ref-BErMfwCd.js +0 -171
  2099. package/dist/provider-auth-ref-DEF_hE2R.js +0 -2
  2100. package/dist/provider-auth-result-DiUxDF1G.js +0 -31
  2101. package/dist/provider-auth-runtime-BwMq9oMD.js +0 -32
  2102. package/dist/provider-catalog--Qc0q0I-.js +0 -26
  2103. package/dist/provider-catalog-A_s8JQaq.js +0 -18
  2104. package/dist/provider-catalog-B-EcLvBI.js +0 -11
  2105. package/dist/provider-catalog-Bte-HucL.js +0 -44
  2106. package/dist/provider-catalog-C63Rfat7.js +0 -11
  2107. package/dist/provider-catalog-C7q0Vb3S.js +0 -95
  2108. package/dist/provider-catalog-CCnuf8d3.js +0 -49
  2109. package/dist/provider-catalog-CYQ7k_Db.js +0 -48
  2110. package/dist/provider-catalog-CnlB2mMZ.js +0 -11
  2111. package/dist/provider-catalog-CoyAbDZX.js +0 -56
  2112. package/dist/provider-catalog-CtqhFopw.js +0 -48
  2113. package/dist/provider-catalog-CyGxB_aR.js +0 -18
  2114. package/dist/provider-catalog-D1pmWiDQ.js +0 -48
  2115. package/dist/provider-catalog-DGgsalJv.js +0 -12
  2116. package/dist/provider-catalog-DLdTTMmW.js +0 -11
  2117. package/dist/provider-catalog-DZzX7Vwk.js +0 -54
  2118. package/dist/provider-catalog-J2dZciKS.js +0 -11
  2119. package/dist/provider-catalog-LVrcrz-W.js +0 -36
  2120. package/dist/provider-catalog-aIN0QojF.js +0 -11
  2121. package/dist/provider-catalog-shared-Db9nbr1B.js +0 -28
  2122. package/dist/provider-discovery.runtime-BCUAsMMz.js +0 -10
  2123. package/dist/provider-discovery.runtime.js +0 -1
  2124. package/dist/provider-dispatcher-COxXbow_.js +0 -22
  2125. package/dist/provider-entry-CT_YeII_.js +0 -86
  2126. package/dist/provider-env-vars-4Bon7Y2X.js +0 -121
  2127. package/dist/provider-env-vars-Np7qkDjC.js +0 -2
  2128. package/dist/provider-flow-Dlg1GcXQ.js +0 -93
  2129. package/dist/provider-http-DQQ317hc.js +0 -3
  2130. package/dist/provider-id-CHzLB538.js +0 -30
  2131. package/dist/provider-model-defaults-dSPzPas0.js +0 -5
  2132. package/dist/provider-model-primary-D8SgLcOd.js +0 -26
  2133. package/dist/provider-model-shared-GO1WT2fY.js +0 -104
  2134. package/dist/provider-models-BG8YwJaY.js +0 -117
  2135. package/dist/provider-models-BVVCdM8F.js +0 -22
  2136. package/dist/provider-models-D2UZvTo3.js +0 -46
  2137. package/dist/provider-moonshot-Cl8urWHL.js +0 -2
  2138. package/dist/provider-oauth-flow-Bu2gIeX6.js +0 -33
  2139. package/dist/provider-onboard-CTEHTjfw.js +0 -264
  2140. package/dist/provider-openai-codex-oauth-tls-DdLUDuIM.js +0 -101
  2141. package/dist/provider-registry-Ljtt6CKE.js +0 -49
  2142. package/dist/provider-request-config-CIrbwAnR.js +0 -209
  2143. package/dist/provider-runtime-BBFXlsU0.js +0 -2
  2144. package/dist/provider-runtime-D_itmv9t.js +0 -291
  2145. package/dist/provider-runtime.runtime-B_oC992d.js +0 -26
  2146. package/dist/provider-runtime.runtime.js +0 -1
  2147. package/dist/provider-self-hosted-setup-BlNrSREL.js +0 -272
  2148. package/dist/provider-session.runtime-DQyRV-t3.js +0 -7
  2149. package/dist/provider-session.runtime.js +0 -1
  2150. package/dist/provider-setup-CSrOyU04.js +0 -2
  2151. package/dist/provider-stream-m5D8QZPz.js +0 -289
  2152. package/dist/provider-tools-NuJzTqa1.js +0 -37
  2153. package/dist/provider-usage-BB5mQ8Fg.js +0 -3
  2154. package/dist/provider-usage-CbPs3eFQ.js +0 -2
  2155. package/dist/provider-usage-DG1gff_M.js +0 -375
  2156. package/dist/provider-usage.fetch-DHWQ4YZu.js +0 -633
  2157. package/dist/provider-web-fetch-QzED2vth.js +0 -5
  2158. package/dist/provider-web-search-CVMEZcl8.js +0 -306
  2159. package/dist/provider-wizard-B0ocsg3q.js +0 -209
  2160. package/dist/provider-zai-endpoint-DoIy5HQf.js +0 -116
  2161. package/dist/provider.runtime-jHt6447e.js +0 -2
  2162. package/dist/provider.runtime.js +0 -1
  2163. package/dist/providers-DUy2TaM-.js +0 -59
  2164. package/dist/providers.runtime-Bz0X8DZ2.js +0 -60
  2165. package/dist/providers.runtime.js +0 -1
  2166. package/dist/proxy-env-D4H9qI5l.js +0 -40
  2167. package/dist/proxy-fetch-DiyTLcAR.js +0 -55
  2168. package/dist/proxy-hcRRmsDd.js +0 -121
  2169. package/dist/pw-ai-Cp64-UGh.js +0 -2037
  2170. package/dist/qmd-manager-D2rMomsU.js +0 -1740
  2171. package/dist/qr-cli-DuANCi-n.js +0 -2
  2172. package/dist/qr-cli-lr5CcLr8.js +0 -367
  2173. package/dist/qr-image-DOcoqAUw.js +0 -2
  2174. package/dist/query-expansion-85HlYbKD.js +0 -633
  2175. package/dist/queue-CtO0M_P1.js +0 -663
  2176. package/dist/reaction-runtime-api-B4KmfKtJ.js +0 -114
  2177. package/dist/reactions-5N2KSGJ2.js +0 -258
  2178. package/dist/read-only-account-inspect-Y_ijOKJ3.js +0 -9
  2179. package/dist/read-only-account-inspect.telegram-BSjjDWnM.js +0 -202
  2180. package/dist/reasoning-tags-CAmbBXLr.js +0 -77
  2181. package/dist/recovery-key-store-DqgdfMc7.js +0 -283
  2182. package/dist/redact-BDinS1q9.js +0 -102
  2183. package/dist/redact-identifier-S69DDJn1.js +0 -13
  2184. package/dist/redact-sensitive-url-CAJSZ_7g.js +0 -50
  2185. package/dist/redirect-headers-CGxONG_L.js +0 -25
  2186. package/dist/ref-contract-CC5BLDoS.js +0 -53
  2187. package/dist/region-BFGEM88n.js +0 -62
  2188. package/dist/register-lazy-command-D6EEI-zz.js +0 -43
  2189. package/dist/register.agent-D1eKwVU7.js +0 -239
  2190. package/dist/register.backup-S8hwHpZL.js +0 -236
  2191. package/dist/register.configure-CJrQ3u9y.js +0 -15
  2192. package/dist/register.maintenance-BrKWl7_D.js +0 -449
  2193. package/dist/register.message-BCWJfH2h.js +0 -642
  2194. package/dist/register.onboard-zzNq0pJS.js +0 -79
  2195. package/dist/register.setup-BLQwDKzc.js +0 -104
  2196. package/dist/register.status-health-sessions-B4TUEudf.js +0 -1206
  2197. package/dist/register.subclis-B0pG22H2.js +0 -295
  2198. package/dist/register.subclis-BEM0mzJb.js +0 -3
  2199. package/dist/registry-ByjnKj3u.js +0 -219
  2200. package/dist/registry-CuFNdbH5.js +0 -60
  2201. package/dist/registry-DvqOrcbF.js +0 -675
  2202. package/dist/registry-mVzzlPf7.js +0 -50
  2203. package/dist/repair-IMBZnz-L.js +0 -112
  2204. package/dist/replies-BCoZ2HxY.js +0 -118
  2205. package/dist/reply-D8bUQd-Q.js +0 -3176
  2206. package/dist/reply-blocks-CjCUTZru.js +0 -103
  2207. package/dist/reply-chunking-CxFd5izq.js +0 -3
  2208. package/dist/reply-dispatch-runtime-Bk9RDzB9.js +0 -3
  2209. package/dist/reply-history-DtTaPEgt.js +0 -2
  2210. package/dist/reply-payload-CRYI4jIB.js +0 -232
  2211. package/dist/reply-payloads-CQXH7ury.js +0 -116
  2212. package/dist/reply-payloads-dedupe-BKObDjVe.js +0 -135
  2213. package/dist/reply-payloads-dedupe.runtime-SbVNMvEs.js +0 -2
  2214. package/dist/reply-payloads-dedupe.runtime.js +0 -1
  2215. package/dist/reply-prefix-Eema_xXG.js +0 -39
  2216. package/dist/reply-runtime-DUrpJTzu.js +0 -123
  2217. package/dist/reply.runtime-Cdb_6NI1.js +0 -2
  2218. package/dist/reply.runtime.js +0 -1
  2219. package/dist/request-url-B8k-YRRH.js +0 -10
  2220. package/dist/resolve-C3pJ2gj_.js +0 -174
  2221. package/dist/resolve-C_pCWwC0.js +0 -619
  2222. package/dist/resolve-allowlist-HrJ_3icS.js +0 -147
  2223. package/dist/resolve-cbCi7mbs.js +0 -2
  2224. package/dist/resolve-channels-BTyErRev.js +0 -226
  2225. package/dist/resolve-channels-DvV-fUQv.js +0 -263
  2226. package/dist/resolve-configured-secret-input-string-BasQGOd9.js +0 -112
  2227. package/dist/resolve-route-EE8E7OAF.js +0 -486
  2228. package/dist/resolve-system-bin-TC907QYo.js +0 -120
  2229. package/dist/resolve-targets-B1MvBWpT.js +0 -280
  2230. package/dist/resolve-users-BfVoBZG_.js +0 -145
  2231. package/dist/resolve-utils-ClmKSkEQ.js +0 -102
  2232. package/dist/response-generator-ACP21F1j.js +0 -153
  2233. package/dist/response-prefix-template-Cp4tg6Qw.js +0 -50
  2234. package/dist/restart-sentinel-B3EigRIb.js +0 -70
  2235. package/dist/restart-stale-pids-dsB3eE6_.js +0 -187
  2236. package/dist/retry-CIAqcw7C.js +0 -76
  2237. package/dist/retry-policy-BJ5Q68It.js +0 -58
  2238. package/dist/retry-runtime-Cbu5zDnX.js +0 -3
  2239. package/dist/rooms-B1IyUfuR.js +0 -325
  2240. package/dist/root-help-Bwa-vlhy.js +0 -53
  2241. package/dist/route-reply-bC07YRDb.js +0 -133
  2242. package/dist/route-reply.runtime-dS2XMwkv.js +0 -2
  2243. package/dist/route-reply.runtime.js +0 -1
  2244. package/dist/route-resolution-DQHmIfWN.js +0 -461
  2245. package/dist/routes-CWXihJFR.js +0 -6884
  2246. package/dist/routing-BVt9nMN-.js +0 -16
  2247. package/dist/rpc-5eaI-FsF.js +0 -67
  2248. package/dist/rpc-context-Dimdo4io.js +0 -155
  2249. package/dist/run-command-2jxKF1a6.js +0 -32
  2250. package/dist/run-main-BKeNUaXq.js +0 -425
  2251. package/dist/run-with-concurrency-DGLkItan.js +0 -41
  2252. package/dist/runner-COmi-bB0.js +0 -1479
  2253. package/dist/runs-CX-70k4f.js +0 -616
  2254. package/dist/runtime-1phb9iVo.js +0 -6
  2255. package/dist/runtime-B8hqEtu6.js +0 -181
  2256. package/dist/runtime-BpHrcXgA.js +0 -5
  2257. package/dist/runtime-BscSIjIL.js +0 -126
  2258. package/dist/runtime-C8qvwPYG.js +0 -286
  2259. package/dist/runtime-CBX_rq4O.js +0 -18
  2260. package/dist/runtime-CC1YDOst.js +0 -5
  2261. package/dist/runtime-CIE7xJwu.js +0 -5
  2262. package/dist/runtime-CNZi_czi.js +0 -42
  2263. package/dist/runtime-CPw-0dWW.js +0 -5
  2264. package/dist/runtime-DXdxDbJm.js +0 -102
  2265. package/dist/runtime-DofOSZ5U.js +0 -2153
  2266. package/dist/runtime-api-B4Zb5p1_.js +0 -2
  2267. package/dist/runtime-api-BB2RZPnq.js +0 -2
  2268. package/dist/runtime-api-BJnw1_pK.js +0 -2
  2269. package/dist/runtime-api-BTf2rLCn.js +0 -2
  2270. package/dist/runtime-api-BTgAUySz.js +0 -2
  2271. package/dist/runtime-api-BVftCkYc.js +0 -2484
  2272. package/dist/runtime-api-BWaVsvsK.js +0 -14
  2273. package/dist/runtime-api-BXlE282E.js +0 -2
  2274. package/dist/runtime-api-Ba7wWBWO.js +0 -1
  2275. package/dist/runtime-api-BfZqvwkY.js +0 -2
  2276. package/dist/runtime-api-Bja3afzd.js +0 -3676
  2277. package/dist/runtime-api-C7cX3f2r.js +0 -2
  2278. package/dist/runtime-api-CCKblcQO.js +0 -81
  2279. package/dist/runtime-api-CEmQSooZ.js +0 -2
  2280. package/dist/runtime-api-CWQMIahu.js +0 -241
  2281. package/dist/runtime-api-Ch1E1gvT.js +0 -2
  2282. package/dist/runtime-api-CjgyJEjn.js +0 -2
  2283. package/dist/runtime-api-CuqnElJG.js +0 -3
  2284. package/dist/runtime-api-DOyNJNHi.js +0 -2
  2285. package/dist/runtime-api-DUbp7oPz.js +0 -2
  2286. package/dist/runtime-api-DZDDizAj.js +0 -1
  2287. package/dist/runtime-api-DZcQIyI0.js +0 -1
  2288. package/dist/runtime-api-Di-XE7J4.js +0 -3
  2289. package/dist/runtime-api-Dq7rdsm6.js +0 -2
  2290. package/dist/runtime-api-DxO7sIvA.js +0 -120
  2291. package/dist/runtime-api-Dzz1aWyq.js +0 -29
  2292. package/dist/runtime-api-_dg5Me1l.js +0 -2
  2293. package/dist/runtime-config-snapshot-DqWNFIej.js +0 -2
  2294. package/dist/runtime-d8L2hZ57.js +0 -5
  2295. package/dist/runtime-discord-ops.runtime-C2o0995d.js +0 -25
  2296. package/dist/runtime-discord-ops.runtime.js +0 -1
  2297. package/dist/runtime-embedded-pi.runtime-Bk8vHdbc.js +0 -2
  2298. package/dist/runtime-embedded-pi.runtime.js +0 -1
  2299. package/dist/runtime-entry-BypP0hpR.js +0 -4925
  2300. package/dist/runtime-env-SHKgcATc.js +0 -9
  2301. package/dist/runtime-forwarders-ev8FdVyV.js +0 -44
  2302. package/dist/runtime-group-policy-DXJJCWpk.js +0 -1
  2303. package/dist/runtime-group-policy-zTp8fKRK.js +0 -59
  2304. package/dist/runtime-guard-78ESz4Qy.js +0 -70
  2305. package/dist/runtime-kS8e4c6-.js +0 -125
  2306. package/dist/runtime-media-understanding.runtime-CpPWzWdQ.js +0 -2
  2307. package/dist/runtime-media-understanding.runtime.js +0 -1
  2308. package/dist/runtime-model-auth.runtime-1Gsp1j1n.js +0 -2
  2309. package/dist/runtime-model-auth.runtime.js +0 -1
  2310. package/dist/runtime-parse-vvG9x7Ps.js +0 -83
  2311. package/dist/runtime-paths-NiQSNveu.js +0 -305
  2312. package/dist/runtime-plugin-boundary-CzRNh2jW.js +0 -65
  2313. package/dist/runtime-schema-uKXWjWrD.js +0 -14440
  2314. package/dist/runtime-slack-ops.runtime-MQwSRdp3.js +0 -15
  2315. package/dist/runtime-slack-ops.runtime.js +0 -1
  2316. package/dist/runtime-status-2omGgKaM.js +0 -109
  2317. package/dist/runtime-status-Cc383GkB.js +0 -15
  2318. package/dist/runtime-store-CT3yRBe_.js +0 -22
  2319. package/dist/runtime-tts.runtime-DTfPYn3H.js +0 -2
  2320. package/dist/runtime-tts.runtime.js +0 -1
  2321. package/dist/runtime-uvckmk15.js +0 -68
  2322. package/dist/runtime-web-tools-Cf6BXnCm.js +0 -2042
  2323. package/dist/runtime-whatsapp-boundary-Bs8RrKxP.js +0 -139
  2324. package/dist/runtime-whatsapp-boundary-C5mx67ac.js +0 -2
  2325. package/dist/safe-regex-tLlDZYfM.js +0 -244
  2326. package/dist/safe-text-DhIQbZid.js +0 -16
  2327. package/dist/sandbox-DkZ4-LBj.js +0 -4
  2328. package/dist/sandbox-cli-Cho_k3dA.js +0 -443
  2329. package/dist/sandbox-f4-hZNCj.js +0 -2710
  2330. package/dist/sandbox-paths-Br54mtAJ.js +0 -146
  2331. package/dist/sanitize-env-vars-BpNLWkzd.js +0 -82
  2332. package/dist/scan-paths-Bln7l19-.js +0 -28
  2333. package/dist/schema-validator-DofqBvJi.js +0 -176
  2334. package/dist/scoped-expiring-id-cache-C8wyKEV-.js +0 -35
  2335. package/dist/scp-host-B9NPcVwn.js +0 -62
  2336. package/dist/sdk-Ba91_ru8.js +0 -1108
  2337. package/dist/searxng-search-provider-CUEJoeaQ.js +0 -220
  2338. package/dist/secret-equal-fMR1DjSl.js +0 -9
  2339. package/dist/secret-file-BNKBIds0.js +0 -11
  2340. package/dist/secret-file-DwDmPLSX.js +0 -92
  2341. package/dist/secret-input-4MqmO__N.js +0 -13
  2342. package/dist/secret-input-Bqf5ho4v.js +0 -38
  2343. package/dist/secret-input-DyzcNLLY.js +0 -2
  2344. package/dist/secrets-cli-DAP4hi4r.js +0 -2112
  2345. package/dist/secure-random-Diy9rj1m.js +0 -20
  2346. package/dist/security-cli-2WQVKZ3w.js +0 -477
  2347. package/dist/security-runtime-BSQDlFPi.js +0 -55
  2348. package/dist/semver-compare-DkYCMcwG.js +0 -53
  2349. package/dist/send--GwzHbbI.js +0 -100
  2350. package/dist/send-4ZItW1GB.js +0 -3
  2351. package/dist/send-B1YVZR_q.js +0 -1076
  2352. package/dist/send-B6AgLKhw.js +0 -178
  2353. package/dist/send-CAosrV3E.js +0 -2
  2354. package/dist/send-CTHiX-WN.js +0 -442
  2355. package/dist/send-CywIIzow.js +0 -318
  2356. package/dist/send-DZ2VaVTD.js +0 -856
  2357. package/dist/send-deps-Cuc-dTy5.js +0 -19
  2358. package/dist/send-policy-Dz5lteoO.js +0 -60
  2359. package/dist/send-q09VUMe3.js +0 -532
  2360. package/dist/send.components-Cbi5ixnJ.js +0 -844
  2361. package/dist/send.components-dLe6ppiS.js +0 -2
  2362. package/dist/server-BRW1HQ2M.js +0 -67
  2363. package/dist/server-Clq20rV8.js +0 -27990
  2364. package/dist/server-middleware-Ubw3OFd1.js +0 -108
  2365. package/dist/server-node-events-kgWhdE2I.js +0 -454
  2366. package/dist/server-startup-matrix-migration-DJZgJiUa.js +0 -1348
  2367. package/dist/service-2O78fADl.js +0 -867
  2368. package/dist/service-BCUDr0mF.js +0 -2
  2369. package/dist/session-BIwHn1FL.js +0 -137
  2370. package/dist/session-BJudz6Rb.js +0 -50
  2371. package/dist/session-archive.runtime-8FrIp7MP.js +0 -2
  2372. package/dist/session-archive.runtime.js +0 -1
  2373. package/dist/session-binding-service-D7bUc7mS.js +0 -421
  2374. package/dist/session-context-DbS6R7x0.js +0 -23
  2375. package/dist/session-conversation-5Z-WApq_.js +0 -15
  2376. package/dist/session-conversation-BC-SPGma.js +0 -135
  2377. package/dist/session-conversation-D-Olnomz.js +0 -27
  2378. package/dist/session-cost-usage-5iS5N1Rs.js +0 -651
  2379. package/dist/session-cost-usage-ibiGeH7Z.js +0 -2
  2380. package/dist/session-envelope-RE_1D3fZ.js +0 -18
  2381. package/dist/session-errors-CoC2qhLC.js +0 -63
  2382. package/dist/session-file-CnTnoAyl.js +0 -120
  2383. package/dist/session-fork.runtime-Bb9nNLwX.js +0 -50
  2384. package/dist/session-fork.runtime.js +0 -1
  2385. package/dist/session-hooks-D4zcaOKV.js +0 -109
  2386. package/dist/session-key-CQMUjsSp.js +0 -52
  2387. package/dist/session-key-Do__tq1E.js +0 -279
  2388. package/dist/session-key-normalization-BamCBtxj.js +0 -22
  2389. package/dist/session-override-CHm5auQy.js +0 -100
  2390. package/dist/session-reset-model.runtime-DD5SooaH.js +0 -119
  2391. package/dist/session-reset-model.runtime.js +0 -1
  2392. package/dist/session-route-O1Pb7Oid.js +0 -91
  2393. package/dist/session-store-runtime-ePmbOWO1.js +0 -2
  2394. package/dist/session-subagent-reactivation.runtime-BwUDVflj.js +0 -2
  2395. package/dist/session-subagent-reactivation.runtime.js +0 -1
  2396. package/dist/session-transcript-files.fs-CyBs2u56.js +0 -149
  2397. package/dist/session-updates-C33bkLCm.js +0 -222
  2398. package/dist/session-updates.runtime-BHLQJ71D.js +0 -2
  2399. package/dist/session-updates.runtime.js +0 -1
  2400. package/dist/session-utils-C0HJP9m_.js +0 -1743
  2401. package/dist/session-write-lock-C7svKLqX.js +0 -343
  2402. package/dist/sessions-CkaONOVi.js +0 -224
  2403. package/dist/sessions-Dqj9fL_x.js +0 -2
  2404. package/dist/sessions-j2hbBGOS.js +0 -443
  2405. package/dist/setup-0GrDtpRN.js +0 -427
  2406. package/dist/setup-BrOJEPVN.js +0 -15
  2407. package/dist/setup-adapter-runtime-CyIIvoms.js +0 -2
  2408. package/dist/setup-api-1P88M5pV.js +0 -2
  2409. package/dist/setup-binary-CXmsVXWb.js +0 -2
  2410. package/dist/setup-bootstrap-QdrIAyis.js +0 -54
  2411. package/dist/setup-core-BqPbreVF.js +0 -256
  2412. package/dist/setup-core-CFzSqpD7.js +0 -256
  2413. package/dist/setup-core-DJHWTJKX.js +0 -383
  2414. package/dist/setup-core-DT1fK9yD.js +0 -146
  2415. package/dist/setup-core-kjYyNYvv.js +0 -48
  2416. package/dist/setup-core-t03VZdcn.js +0 -160
  2417. package/dist/setup-group-access-BQbnTk8B.js +0 -70
  2418. package/dist/setup-helpers-0yWIq2cW.js +0 -390
  2419. package/dist/setup-runtime-BChXvJOO.js +0 -4
  2420. package/dist/setup-surface-B8loJ-nJ.js +0 -272
  2421. package/dist/setup-surface-BKizDP2g.js +0 -237
  2422. package/dist/setup-surface-BOd4V0w5.js +0 -261
  2423. package/dist/setup-surface-BaLQtvFW.js +0 -353
  2424. package/dist/setup-surface-Bha7U86Z.js +0 -72
  2425. package/dist/setup-surface-BkHkduRm.js +0 -450
  2426. package/dist/setup-surface-CDfudYpT2.js +0 -261
  2427. package/dist/setup-surface-CT-Erp53.js +0 -346
  2428. package/dist/setup-surface-Co1jSLDk.js +0 -656
  2429. package/dist/setup-surface-D0joW4q1.js +0 -333
  2430. package/dist/setup-surface-D9rWJb4Z.js +0 -1447
  2431. package/dist/setup-surface-D_CJfyJ1.js +0 -381
  2432. package/dist/setup-surface-DbVJ8CAj.js +0 -484
  2433. package/dist/setup-surface-Di1q12ha.js +0 -97
  2434. package/dist/setup-surface-LWupQ_eL.js +0 -304
  2435. package/dist/setup-tools-Cb6PLN3L.js +0 -4
  2436. package/dist/setup-wizard-helpers-CA5yiprq.js +0 -841
  2437. package/dist/setup-wizard-proxy-bmMo6OPA.js +0 -127
  2438. package/dist/setup.finalize-DvGlwfbU.js +0 -443
  2439. package/dist/setup.gateway-config-D_eSo_Jz.js +0 -246
  2440. package/dist/setup.secret-input-BAQnay16.js +0 -25
  2441. package/dist/shared-1nXP7RAM.js +0 -78
  2442. package/dist/shared-6u4-kP5J.js +0 -221
  2443. package/dist/shared-BnSR7joQ.js +0 -144
  2444. package/dist/shared-BsLpgVLV.js +0 -37
  2445. package/dist/shared-C-PSF7Rv.js +0 -64
  2446. package/dist/shared-C1MrVu4M.js +0 -180
  2447. package/dist/shared-CA8QQ_O5.js +0 -94
  2448. package/dist/shared-CCV62W5K.js +0 -2
  2449. package/dist/shared-CHJjz6Zz.js +0 -72
  2450. package/dist/shared-CK49TKED.js +0 -50
  2451. package/dist/shared-CL7I4ij0.js +0 -160
  2452. package/dist/shared-Cr7ijuS4.js +0 -198
  2453. package/dist/shared-D61IX915.js +0 -10
  2454. package/dist/shared-Dr9OQu4c.js +0 -64
  2455. package/dist/shared-DwxV-O-g.js +0 -136
  2456. package/dist/shared-dWHdeoyy.js +0 -126
  2457. package/dist/shared-runtime-yV5uP0IO.js +0 -7
  2458. package/dist/shell-argv-B9p91CMW.js +0 -72
  2459. package/dist/shell-env-BTztt4a1.js +0 -181
  2460. package/dist/signal-B1kD3iF3.js +0 -46
  2461. package/dist/signal-DP8FUJOa.js +0 -6
  2462. package/dist/signal-Dvmeol77.js +0 -13
  2463. package/dist/signal-account-CYKnyxZK.js +0 -11
  2464. package/dist/signal-cli-install-DcmsRDbB.js +0 -188
  2465. package/dist/signal-surface-AbofIH7s.js +0 -21
  2466. package/dist/simple-completion-transport-Dl5DzRWP.js +0 -24
  2467. package/dist/skill-commands-CH4lfyW8.js +0 -77
  2468. package/dist/skill-commands-base-CvVjZByy.js +0 -60
  2469. package/dist/skill-commands-runtime-zpWkVBay.js +0 -2
  2470. package/dist/skill-commands.runtime-BKa5oyH-.js +0 -2
  2471. package/dist/skill-commands.runtime.js +0 -1
  2472. package/dist/skill-scanner-bqroDZTs.js +0 -354
  2473. package/dist/skills-D0K7gu2V.js +0 -972
  2474. package/dist/skills-DFTLIGCd.js +0 -4
  2475. package/dist/skills-clawhub-KJGw0uGT.js +0 -274
  2476. package/dist/skills-cli-DziAPxba.js +0 -369
  2477. package/dist/skills-install-CQeO3Sll.js +0 -819
  2478. package/dist/skills-remote-BojLLDxp.js +0 -584
  2479. package/dist/skills-status-BINZ_svK.js +0 -2
  2480. package/dist/skills-status-CdQUttuP.js +0 -170
  2481. package/dist/slack-BuMSbx3k.js +0 -6
  2482. package/dist/slack-DMg3O5YT.js +0 -9
  2483. package/dist/slack-account-LEbfbXys.js +0 -11
  2484. package/dist/slack-core-oqCiyGw8.js +0 -4
  2485. package/dist/slack-runtime-surface-CyaeT7yk.js +0 -18
  2486. package/dist/slack-surface-1yTIS5Q8.js +0 -44
  2487. package/dist/slack-target-parser-CruIJ5w5.js +0 -12
  2488. package/dist/slack-targets-ukxuKR1I.js +0 -45
  2489. package/dist/slash-commands-CRuXC74L.js +0 -672
  2490. package/dist/slash-commands.runtime-F6b9KUnh.js +0 -20
  2491. package/dist/slash-commands.runtime.js +0 -1
  2492. package/dist/slash-dispatch.runtime-CItGyoBF.js +0 -38
  2493. package/dist/slash-dispatch.runtime.js +0 -1
  2494. package/dist/slash-skill-commands.runtime-Caw0oNvV.js +0 -8
  2495. package/dist/slash-skill-commands.runtime.js +0 -1
  2496. package/dist/slots-Dq-2eIRb.js +0 -93
  2497. package/dist/speech-Ceb4ISD4.js +0 -46
  2498. package/dist/speech-provider-BHjDbut-.js +0 -190
  2499. package/dist/speech-provider-D45m9grJ.js +0 -154
  2500. package/dist/speech-provider-DM1ZXsz2.js +0 -385
  2501. package/dist/speech-runtime-CNvOkPw4.js +0 -34
  2502. package/dist/src-Dn1TYXp6.js +0 -2739
  2503. package/dist/ssh-config-C1ipLHgq.js +0 -77
  2504. package/dist/ssh-tunnel-BwMCLc2e.js +0 -159
  2505. package/dist/ssh-tunnel-D5YdH2SQ.js +0 -2
  2506. package/dist/ssrf-Duye12M_.js +0 -246
  2507. package/dist/ssrf-policy-5L7qS2kK.js +0 -69
  2508. package/dist/ssrf-runtime-bpDM5Bgo.js +0 -5
  2509. package/dist/stable-node-path-n7TARbHZ.js +0 -32
  2510. package/dist/stage-sandbox-media.runtime-Tlgx4F6M.js +0 -229
  2511. package/dist/stage-sandbox-media.runtime.js +0 -1
  2512. package/dist/stagger-Cs-6sySM.js +0 -54
  2513. package/dist/startup-verification-DS8Rlwfj.js +0 -131
  2514. package/dist/state-migrations-ssGF0Trg.js +0 -845
  2515. package/dist/state-paths-LoYjHd5L.js +0 -2
  2516. package/dist/status-B7yRr4OV.js +0 -3
  2517. package/dist/status-BM1Lyqo6.js +0 -261
  2518. package/dist/status-BekOC_tW.js +0 -650
  2519. package/dist/status-CxodlqzZ.js +0 -2
  2520. package/dist/status-DHbl5eIj.js +0 -608
  2521. package/dist/status-PsQV2sfU.js +0 -44
  2522. package/dist/status-all-C53a3881.js +0 -798
  2523. package/dist/status-helpers-CCJSSrVJ.js +0 -170
  2524. package/dist/status-issues-M-RUxHvm.js +0 -336
  2525. package/dist/status-issues-qWKbW6r2.js +0 -187
  2526. package/dist/status-json-B66tF12J.js +0 -86
  2527. package/dist/status.agent-local-B8Sw_p6M.js +0 -59
  2528. package/dist/status.command.text-runtime-csZS5yHm.js +0 -18
  2529. package/dist/status.daemon-D0GzvHft.js +0 -25
  2530. package/dist/status.format-C1VNrTBi.js +0 -44
  2531. package/dist/status.gateway-probe-4INUEsUo.js +0 -15
  2532. package/dist/status.link-channel-CJtR5UX6.js +0 -35
  2533. package/dist/status.node-mode-Bva3wbBI.js +0 -2
  2534. package/dist/status.node-mode-CneoXHPW.js +0 -32
  2535. package/dist/status.scan-t1kfm4e0.js +0 -264
  2536. package/dist/status.scan.deps.runtime-CCaTJlzV.js +0 -18
  2537. package/dist/status.scan.deps.runtime.js +0 -1
  2538. package/dist/status.scan.fast-json-DmzN3HuU.js +0 -97
  2539. package/dist/status.scan.fast-json-gu6uL_BR.js +0 -2
  2540. package/dist/status.scan.json-core-JjMIy9YZ.js +0 -254
  2541. package/dist/status.scan.runtime-r_5mTC8f.js +0 -9
  2542. package/dist/status.scan.runtime.js +0 -1
  2543. package/dist/status.service-summary-DnbDBXMs.js +0 -32
  2544. package/dist/status.summary-CbEhZE0h.js +0 -210
  2545. package/dist/status.summary-SLm6uT22.js +0 -2
  2546. package/dist/status.update-Bw9CvcCc.js +0 -2
  2547. package/dist/status.update-CLnevxJb.js +0 -79
  2548. package/dist/sticker-cache-C_FrWgaA.js +0 -1573
  2549. package/dist/sticker-vision.runtime-DR7e08nD.js +0 -16
  2550. package/dist/sticker-vision.runtime.js +0 -1
  2551. package/dist/storage-CPQLpmgN.js +0 -234
  2552. package/dist/storage-paths-DvC4vQo1.js +0 -51
  2553. package/dist/store-8ONMiMTI.js +0 -365
  2554. package/dist/store-DQJZr0Yf.js +0 -767
  2555. package/dist/store-Dxcm2vsw.js +0 -140
  2556. package/dist/store-_OZh8RrM.js +0 -1343
  2557. package/dist/store-read-JHUhrL0Z.js +0 -16
  2558. package/dist/store.runtime-Dmqv-8M7.js +0 -2
  2559. package/dist/store.runtime.js +0 -1
  2560. package/dist/stream-CGrFe0j0.js +0 -123
  2561. package/dist/stream-D9HOuZmn.js +0 -633
  2562. package/dist/stream-Di_JOWoE.js +0 -180
  2563. package/dist/stream-wrappers-D-DlMIYG.js +0 -136
  2564. package/dist/string-normalization-Ddc4JXRe.js +0 -19
  2565. package/dist/string-normalization-runtime-CCsvs1ds.js +0 -1
  2566. package/dist/string-sample-BIWt11jp.js +0 -11
  2567. package/dist/strip-inbound-meta-DvHTlpJG.js +0 -155
  2568. package/dist/subagent-orphan-recovery-Do8Az2RD.js +0 -206
  2569. package/dist/subagent-registry-runtime-D5PNyCsh.js +0 -2
  2570. package/dist/subcli-descriptors-Dasenv4J.js +0 -151
  2571. package/dist/subsystem-C9VSlEcV.js +0 -582
  2572. package/dist/supervisor-log.runtime-CZe76kAj.js +0 -8
  2573. package/dist/supervisor-log.runtime.js +0 -1
  2574. package/dist/system-cli-2-HDh_Ev.js +0 -58
  2575. package/dist/system-events-5SDw3lix.js +0 -93
  2576. package/dist/system-events-BuGmSpuG.js +0 -34
  2577. package/dist/system-message-0oem5MWV.js +0 -16
  2578. package/dist/system-run-command-BmlO5dn2.js +0 -301
  2579. package/dist/systemd-B2HBHMpF.js +0 -588
  2580. package/dist/systemd-hints-DkRlAuPR.js +0 -325
  2581. package/dist/systemd-linger-BBPBJSm0.js +0 -68
  2582. package/dist/systemd-linger-DiWO9n2E.js +0 -2
  2583. package/dist/table-CY2XIg3l.js +0 -305
  2584. package/dist/tables-D6qL6k4d.js +0 -832
  2585. package/dist/tailnet-CZMxMuGK.js +0 -76
  2586. package/dist/tailscale-mpS_cTve.js +0 -238
  2587. package/dist/tailscale-status-Dg2Iov5f.js +0 -71
  2588. package/dist/target-errors-ThNFqo8X.js +0 -26
  2589. package/dist/target-ids-O3O6piTN.js +0 -76
  2590. package/dist/target-parsing-Boyj_2v0.js +0 -41
  2591. package/dist/target-registry-BHJcVSo1.js +0 -1269
  2592. package/dist/targets-C7I_wjs2.js +0 -283
  2593. package/dist/targets-CZA632lq.js +0 -39
  2594. package/dist/targets-Dz1dx4G8.js +0 -78
  2595. package/dist/targets-Zd0-pJu7.js +0 -748
  2596. package/dist/targets-krmeAAxz.js +0 -70
  2597. package/dist/task-registry-delivery-runtime-BnkUa6Mp.js +0 -2
  2598. package/dist/task-registry.audit-DbCRt5MR.js +0 -320
  2599. package/dist/task-registry.audit.shared-SH4MOLKM.js +0 -18
  2600. package/dist/task-registry.maintenance-DfZmDWog.js +0 -2
  2601. package/dist/task-registry.summary-SoFiECCc.js +0 -44
  2602. package/dist/tavily-search-provider-BCY1kfQB.js +0 -227
  2603. package/dist/telegram/audit.js +0 -2
  2604. package/dist/telegram/token.js +0 -2
  2605. package/dist/telegram-Cq20PSxw.js +0 -23
  2606. package/dist/telegram-account-vRRwyfuA.js +0 -11
  2607. package/dist/telegram-command-config-BiHhXScJ.js +0 -1
  2608. package/dist/telegram-core-DTJayyAj.js +0 -6
  2609. package/dist/telegram-custom-commands-C-nv8yoB.js +0 -75
  2610. package/dist/temp-download-Ccatr7zI.js +0 -62
  2611. package/dist/temp-path-JU2kkd64.js +0 -2
  2612. package/dist/templating-Bu436Euy.js +0 -24
  2613. package/dist/testing-BrrgubIp.js +0 -690
  2614. package/dist/text-chunking-BTs2yTSd.js +0 -12
  2615. package/dist/text-chunking-ByXwyFNP.js +0 -20
  2616. package/dist/text-format-lEYRGxj5.js +0 -8
  2617. package/dist/text-runtime-D9ApM_8O.js +0 -398
  2618. package/dist/theme-Bb-qluq6.js +0 -2
  2619. package/dist/theme-wBMZmJzz.js +0 -34
  2620. package/dist/thinking-Dga2zdtd.js +0 -68
  2621. package/dist/thinking.shared-D6IkoLJU.js +0 -243
  2622. package/dist/thread-bindings-BMnz7w-V.js +0 -219
  2623. package/dist/thread-bindings-BbQWOcMr.js +0 -352
  2624. package/dist/thread-bindings-Bv0I9sBY.js +0 -534
  2625. package/dist/thread-bindings-C3jMrVvp.js +0 -778
  2626. package/dist/thread-bindings-policy-Br8s4hQ6.js +0 -172
  2627. package/dist/thread-bindings-runtime-CbG63N4N.js +0 -2
  2628. package/dist/thread-bindings-shared-DjSYaoHi.js +0 -95
  2629. package/dist/thread-bindings.discord-api-NFR5qsWt.js +0 -487
  2630. package/dist/thread-ownership-DG810AQi.js +0 -3
  2631. package/dist/threading-1Z_3y_Dp.js +0 -2
  2632. package/dist/threading-Hl8nWez6.js +0 -832
  2633. package/dist/threading-helpers-BpqyeyAU.js +0 -14
  2634. package/dist/threading-tool-context-DxV30qIW.js +0 -157
  2635. package/dist/timeouts-B1NiHSGi.js +0 -74
  2636. package/dist/tlon-C54Qojl0.js +0 -20
  2637. package/dist/tmp-openclaw-dir-B44_vmJv.js +0 -102
  2638. package/dist/token-BlUJQi_X.js +0 -2
  2639. package/dist/token-CDYFJvj8.js +0 -82
  2640. package/dist/token-kCjtGElJ.js +0 -45
  2641. package/dist/tokens-C2f9Klbt.js +0 -66
  2642. package/dist/tool-actions.runtime-aB0DgLk7.js +0 -532
  2643. package/dist/tool-actions.runtime.js +0 -1
  2644. package/dist/tool-display-C7h9IZa_.js +0 -1607
  2645. package/dist/tool-images-BDUvc_pd.js +0 -270
  2646. package/dist/tool-mutation-DIBpIegg.js +0 -140
  2647. package/dist/tool-policy-FUm_F19C.js +0 -515
  2648. package/dist/tool-policy-match-CCFHTsu9.js +0 -49
  2649. package/dist/tool-send-DClM4vsZ.js +0 -16
  2650. package/dist/tools-54j1hYBv.js +0 -123
  2651. package/dist/tools-effective-inventory-C09suj6-.js +0 -148
  2652. package/dist/tools.runtime-VBFxIXC8.js +0 -4
  2653. package/dist/tools.runtime.js +0 -1
  2654. package/dist/transcript-events-Dc7U5QmQ.js +0 -29
  2655. package/dist/transport-ready-Cje3USX4.js +0 -36
  2656. package/dist/tts-CTM9C09A.js +0 -2
  2657. package/dist/tts-Ck_K3tIi.js +0 -84
  2658. package/dist/tts-auto-mode-bD-u2biE.js +0 -14
  2659. package/dist/tts-bTuorllO.js +0 -102
  2660. package/dist/tts-eOLiJF6d.js +0 -29
  2661. package/dist/tts.runtime-ChTwy0yH.js +0 -3
  2662. package/dist/tts.runtime.js +0 -1
  2663. package/dist/tui-CrM-Bz3i.js +0 -3899
  2664. package/dist/tui-cli-aVL5aPGw.js +0 -31
  2665. package/dist/twitch-CFFlkhYG.js +0 -15
  2666. package/dist/typebox-DmerPHaM.js +0 -22
  2667. package/dist/types-BzNSmNk3.js +0 -12
  2668. package/dist/types-DAzqpvqD.js +0 -83
  2669. package/dist/types-DVJVELY7.js +0 -471
  2670. package/dist/types-DqNppUoh.js +0 -15
  2671. package/dist/types.secrets-BpcqHPAv.js +0 -80
  2672. package/dist/types.tools-BTQL6INB.js +0 -22
  2673. package/dist/typing-BnCchGtL.js +0 -8
  2674. package/dist/typing-Bugg5LPP.js +0 -68
  2675. package/dist/typing-J_ktpWeA.js +0 -2
  2676. package/dist/typing-mode-DDYL_0TG.js +0 -75
  2677. package/dist/typing-policy-CaZhrM-F.js +0 -11
  2678. package/dist/typing-start-guard-Cgjgzy5e.js +0 -73
  2679. package/dist/ui-BLDY9-7R.js +0 -212
  2680. package/dist/undici-global-dispatcher-CcNdQ7Dt.js +0 -99
  2681. package/dist/unhandled-rejections-CA_e1R-O.js +0 -2
  2682. package/dist/unhandled-rejections-V7U9keRG.js +0 -241
  2683. package/dist/update-CcALvtl_.js +0 -1253
  2684. package/dist/update-channels-Dn1F57Kf.js +0 -78
  2685. package/dist/update-check-CoDVxy35.js +0 -354
  2686. package/dist/update-cli-BWOYy_Mp.js +0 -1447
  2687. package/dist/update-offset-store-BLZmshZE.js +0 -75
  2688. package/dist/usage-CC7-wLUi.js +0 -39
  2689. package/dist/usage-format-C7nMV1jc.js +0 -513
  2690. package/dist/utils-CN_F_3Qg.js +0 -243
  2691. package/dist/utils-Cgw9Y0-Q.js +0 -2
  2692. package/dist/validation-BNNAUmDO.js +0 -18521
  2693. package/dist/verification-B4ogZ29M.js +0 -130
  2694. package/dist/verification-B99uVIxo.js +0 -2
  2695. package/dist/version-BNzJ37Re.js +0 -79
  2696. package/dist/version-Dw0eJ-1F.js +0 -2
  2697. package/dist/voice-call-Dt6m6oA3.js +0 -4
  2698. package/dist/wait-YXJvtMmp.js +0 -7
  2699. package/dist/warning-filter-GX8LpGKz.js +0 -57
  2700. package/dist/web-fetch-utils-CoVia2ez.js +0 -413
  2701. package/dist/web-media-D9opLz21.js +0 -2
  2702. package/dist/web-media-DHlguFej.js +0 -339
  2703. package/dist/web-search-BcSDWJK9.js +0 -169
  2704. package/dist/web-search-providers-CqY6CVp3.js +0 -21
  2705. package/dist/web-search-providers.runtime-BHjzPQW-.js +0 -113
  2706. package/dist/web-search-providers.runtime.js +0 -1
  2707. package/dist/web-search-providers.shared-CMeQec8y.js +0 -421
  2708. package/dist/web-search-shared-B5mHm7QD.js +0 -87
  2709. package/dist/webhook-ingress-CTl81NUR.js +0 -164
  2710. package/dist/webhook-memory-guards-B6k3g-po.js +0 -129
  2711. package/dist/webhook-path-CklCw5kp.js +0 -22
  2712. package/dist/webhook-request-guards-CxDPmU9e.js +0 -178
  2713. package/dist/webhook-shared-Bw9wLe6L.js +0 -370
  2714. package/dist/webhooks-cli-DPRITERU.js +0 -326
  2715. package/dist/whatsapp-CSzf1Nu0.js +0 -5
  2716. package/dist/whatsapp-D18Otn45.js +0 -30
  2717. package/dist/whatsapp-auth-presence-B5GZUgTA.js +0 -41
  2718. package/dist/whatsapp-core-Be0P_p4R.js +0 -7
  2719. package/dist/whatsapp-heartbeat-a2-OB01n.js +0 -85
  2720. package/dist/whatsapp-shared-ChjLiMDw.js +0 -56
  2721. package/dist/whatsapp-shared-FR_Jw-NH.js +0 -4
  2722. package/dist/whatsapp-surface-Dwrfi_SD.js +0 -26
  2723. package/dist/whatsapp-targets-59A3BDBi.js +0 -13
  2724. package/dist/widearea-dns-CfQt6b3q.js +0 -125
  2725. package/dist/windows-argv-DDAf3waz.js +0 -345
  2726. package/dist/windows-install-roots-XI3CvO9O.js +0 -149
  2727. package/dist/windows-spawn-DKvkg_66.js +0 -154
  2728. package/dist/with-timeout-B2smrGj0.js +0 -214
  2729. package/dist/with-timeout-BmJKiOMd.js +0 -13
  2730. package/dist/workflow-summary-BMvffn8D.js +0 -2
  2731. package/dist/workflow-summary-NvN5lUvK.js +0 -167
  2732. package/dist/workspace-D5P9nuJd.js +0 -479
  2733. package/dist/workspace-D5UiPYKk.js +0 -306
  2734. package/dist/workspace-dirs-CRv8Jwfz.js +0 -13
  2735. package/dist/ws-97FEIc7w.js +0 -11
  2736. package/dist/ws-log-BaAOgG9m.js +0 -281
  2737. package/dist/ws-logging-M92fgmyp.js +0 -10
  2738. package/dist/wsl-ytdRZp54.js +0 -57
  2739. package/dist/x-search-FsMNZ7d0.js +0 -166
  2740. package/dist/x-search-shared-D0tVMJk9.js +0 -124
  2741. package/dist/zalo-CNoa7XH7.js +0 -13
  2742. package/dist/zalo-js-HktBGDbg.js +0 -1156
  2743. package/dist/zalo-setup-BT-xGElf.js +0 -14
  2744. package/dist/zalouser-TwyfhIYz.js +0 -22
  2745. package/dist/zod-1Wegy5nx.js +0 -7
  2746. package/dist/zod-parse-HlGwTZP3.js +0 -14
  2747. package/dist/zod-schema.agent-runtime-DFC7a3eV.js +0 -602
  2748. package/dist/zod-schema.core-C1Ewlj9j.js +0 -520
  2749. package/dist/zod-schema.providers-core-Bmbs-R4l.js +0 -1541
  2750. package/dist/zod-schema.providers-whatsapp-CanJPkvb.js +0 -132
  2751. package/dist/zod-schema.sensitive-DEzKzMxI.js +0 -5
@@ -1,3660 +0,0 @@
1
- import { u as resolveAgentIdFromSessionKey } from "./session-key-Do__tq1E.js";
2
- import { r as logVerbose$1 } from "./globals-CDtV0ht8.js";
3
- import { c as normalizeResolvedSecretInputString, l as normalizeSecretInputString } from "./types.secrets-BpcqHPAv.js";
4
- import { t as safeEqualSecret } from "./secret-equal-fMR1DjSl.js";
5
- import { p as resolveRequestClientIp } from "./net-DjzoSxQo.js";
6
- import { t as parseFiniteNumber } from "./parse-finite-number-CzdLC_gQ.js";
7
- import { r as getSessionBindingService } from "./session-binding-service-D7bUc7mS.js";
8
- import { u as isPluginOwnedSessionBindingRecord } from "./conversation-binding-C2nuZ3Eg.js";
9
- import { t as resolveAckReaction } from "./identity-DvwF6Yix.js";
10
- import { s as isBlockedHostnameOrIp } from "./ssrf-Duye12M_.js";
11
- import { d as resolveOutboundMediaUrls, h as sendMediaWithLeadingCaption, m as resolveTextChunksWithFallback } from "./reply-payload-CRYI4jIB.js";
12
- import { g as mapAllowFromEntries } from "./channel-config-helpers-CLFL8FLU.js";
13
- import { i as resolveAgentRoute, n as deriveLastRoutePolicy } from "./resolve-route-EE8E7OAF.js";
14
- import "./routing-BVt9nMN-.js";
15
- import { n as resolveControlCommandGate } from "./command-gating-NyDk7t84.js";
16
- import { t as resolveChannelMediaMaxBytes } from "./media-limits-DmcT5KnO.js";
17
- import { n as readStoreAllowFromForDmPolicy, o as resolveDmGroupAccessWithLists, t as DM_GROUP_ACCESS_REASON } from "./dm-policy-shared-C99GNVxp.js";
18
- import { c as evictOldHistoryKeys, u as recordPendingHistoryEntryIfEnabled } from "./history-B4mW8GfY.js";
19
- import "./runtime-env-SHKgcATc.js";
20
- import { t as resolveChannelContextVisibilityMode } from "./context-visibility-DTMZdcAH.js";
21
- import { t as createChannelReplyPipeline } from "./channel-reply-pipeline-BtBcBCNu.js";
22
- import "./ssrf-runtime-bpDM5Bgo.js";
23
- import { i as resolveConfiguredBindingRoute } from "./conversation-runtime-bArk0IjJ.js";
24
- import { r as stripMarkdown } from "./text-runtime-D9ApM_8O.js";
25
- import { t as evaluateSupplementalContextVisibility } from "./context-visibility-vOvLMUrZ.js";
26
- import { n as logInboundDrop, r as logTypingFailure, t as logAckFailure } from "./logging-ColPHIDT.js";
27
- import { n as createChannelPairingController } from "./channel-pairing-Byr3MFbN.js";
28
- import { t as resolveRequestUrl } from "./request-url-B8k-YRRH.js";
29
- import { a as createFixedWindowRateLimiter, r as WEBHOOK_RATE_LIMIT_DEFAULTS } from "./webhook-memory-guards-B6k3g-po.js";
30
- import { a as createWebhookInFlightLimiter, c as readWebhookBodyOrReject } from "./webhook-request-guards-CxDPmU9e.js";
31
- import { t as normalizeWebhookPath } from "./webhook-path-CklCw5kp.js";
32
- import { c as withResolvedWebhookRequestPipeline, n as registerWebhookTargetWithPluginRoute, o as resolveWebhookTargetWithAuthOrRejectSync } from "./webhook-ingress-CTl81NUR.js";
33
- import "./browser-support-Cdp2Gr_6.js";
34
- import "./secret-input-DyzcNLLY.js";
35
- import { _ as buildBlueBubblesApiUrl, f as parseBlueBubblesTarget, g as blueBubblesFetchWithTimeout, i as formatBlueBubblesChatTarget, l as normalizeBlueBubblesHandle, m as resolveBlueBubblesAccount, o as isAllowedBlueBubblesSender, r as extractHandleFromChatGuid, v as normalizeBlueBubblesServerUrl } from "./webhook-shared-Bw9wLe6L.js";
36
- import { a as fetchBlueBubblesServerInfo, c as isBlueBubblesPrivateApiStatusEnabled, i as resolveBlueBubblesInboundConversationId, o as getCachedBlueBubblesPrivateApiStatus, s as isBlueBubblesPrivateApiEnabled } from "./conversation-id-4JeHag0a.js";
37
- import { r as warnBlueBubbles, t as getBlueBubblesRuntime } from "./runtime-CBX_rq4O.js";
38
- import { URL as URL$1, fileURLToPath } from "node:url";
39
- import { constants } from "node:fs";
40
- import path, { join } from "node:path";
41
- import { execFile } from "node:child_process";
42
- import os from "node:os";
43
- import { promisify } from "node:util";
44
- import fs, { access, readdir } from "node:fs/promises";
45
- import crypto, { createHash } from "node:crypto";
46
- //#region extensions/bluebubbles/src/account-resolve.ts
47
- function resolveBlueBubblesServerAccount(params) {
48
- const account = resolveBlueBubblesAccount({
49
- cfg: params.cfg ?? {},
50
- accountId: params.accountId
51
- });
52
- const baseUrl = normalizeResolvedSecretInputString({
53
- value: params.serverUrl,
54
- path: "channels.bluebubbles.serverUrl"
55
- }) || normalizeResolvedSecretInputString({
56
- value: account.config.serverUrl,
57
- path: `channels.bluebubbles.accounts.${account.accountId}.serverUrl`
58
- });
59
- const password = normalizeResolvedSecretInputString({
60
- value: params.password,
61
- path: "channels.bluebubbles.password"
62
- }) || normalizeResolvedSecretInputString({
63
- value: account.config.password,
64
- path: `channels.bluebubbles.accounts.${account.accountId}.password`
65
- });
66
- if (!baseUrl) throw new Error("BlueBubbles serverUrl is required");
67
- if (!password) throw new Error("BlueBubbles password is required");
68
- let autoAllowPrivateNetwork = false;
69
- try {
70
- const hostname = new URL(normalizeBlueBubblesServerUrl(baseUrl)).hostname.trim();
71
- autoAllowPrivateNetwork = Boolean(hostname) && isBlockedHostnameOrIp(hostname);
72
- } catch {
73
- autoAllowPrivateNetwork = false;
74
- }
75
- return {
76
- baseUrl,
77
- password,
78
- accountId: account.accountId,
79
- allowPrivateNetwork: account.config.allowPrivateNetwork === true || autoAllowPrivateNetwork
80
- };
81
- }
82
- //#endregion
83
- //#region extensions/bluebubbles/src/multipart.ts
84
- function concatUint8Arrays(parts) {
85
- const totalLength = parts.reduce((acc, part) => acc + part.length, 0);
86
- const body = new Uint8Array(totalLength);
87
- let offset = 0;
88
- for (const part of parts) {
89
- body.set(part, offset);
90
- offset += part.length;
91
- }
92
- return body;
93
- }
94
- async function postMultipartFormData(params) {
95
- const body = Buffer.from(concatUint8Arrays(params.parts));
96
- return await blueBubblesFetchWithTimeout(params.url, {
97
- method: "POST",
98
- headers: { "Content-Type": `multipart/form-data; boundary=${params.boundary}` },
99
- body
100
- }, params.timeoutMs, params.ssrfPolicy);
101
- }
102
- async function assertMultipartActionOk(response, action) {
103
- if (response.ok) return;
104
- const errorText = await response.text().catch(() => "");
105
- throw new Error(`BlueBubbles ${action} failed (${response.status}): ${errorText || "unknown"}`);
106
- }
107
- //#endregion
108
- //#region extensions/bluebubbles/src/send-helpers.ts
109
- function resolveBlueBubblesSendTarget(raw) {
110
- const parsed = parseBlueBubblesTarget(raw);
111
- if (parsed.kind === "handle") return {
112
- kind: "handle",
113
- address: normalizeBlueBubblesHandle(parsed.to),
114
- service: parsed.service
115
- };
116
- if (parsed.kind === "chat_id") return {
117
- kind: "chat_id",
118
- chatId: parsed.chatId
119
- };
120
- if (parsed.kind === "chat_guid") return {
121
- kind: "chat_guid",
122
- chatGuid: parsed.chatGuid
123
- };
124
- return {
125
- kind: "chat_identifier",
126
- chatIdentifier: parsed.chatIdentifier
127
- };
128
- }
129
- function extractBlueBubblesMessageId(payload) {
130
- if (!payload || typeof payload !== "object") return "unknown";
131
- const asRecord = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;
132
- const record = payload;
133
- const roots = [
134
- record,
135
- asRecord(record.data),
136
- asRecord(record.result),
137
- asRecord(record.payload),
138
- asRecord(record.message),
139
- Array.isArray(record.data) ? asRecord(record.data[0]) : null
140
- ];
141
- for (const root of roots) {
142
- if (!root) continue;
143
- const candidates = [
144
- root.message_id,
145
- root.messageId,
146
- root.messageGuid,
147
- root.message_guid,
148
- root.guid,
149
- root.id,
150
- root.uuid
151
- ];
152
- for (const candidate of candidates) {
153
- if (typeof candidate === "string" && candidate.trim()) return candidate.trim();
154
- if (typeof candidate === "number" && Number.isFinite(candidate)) return String(candidate);
155
- }
156
- }
157
- return "unknown";
158
- }
159
- //#endregion
160
- //#region extensions/bluebubbles/src/send.ts
161
- function blueBubblesPolicy$3(allowPrivateNetwork) {
162
- return allowPrivateNetwork ? { allowPrivateNetwork: true } : {};
163
- }
164
- /** Maps short effect names to full Apple effect IDs */
165
- const EFFECT_MAP = {
166
- slam: "com.apple.MobileSMS.expressivesend.impact",
167
- loud: "com.apple.MobileSMS.expressivesend.loud",
168
- gentle: "com.apple.MobileSMS.expressivesend.gentle",
169
- invisible: "com.apple.MobileSMS.expressivesend.invisibleink",
170
- "invisible-ink": "com.apple.MobileSMS.expressivesend.invisibleink",
171
- "invisible ink": "com.apple.MobileSMS.expressivesend.invisibleink",
172
- invisibleink: "com.apple.MobileSMS.expressivesend.invisibleink",
173
- echo: "com.apple.messages.effect.CKEchoEffect",
174
- spotlight: "com.apple.messages.effect.CKSpotlightEffect",
175
- balloons: "com.apple.messages.effect.CKHappyBirthdayEffect",
176
- confetti: "com.apple.messages.effect.CKConfettiEffect",
177
- love: "com.apple.messages.effect.CKHeartEffect",
178
- heart: "com.apple.messages.effect.CKHeartEffect",
179
- hearts: "com.apple.messages.effect.CKHeartEffect",
180
- lasers: "com.apple.messages.effect.CKLasersEffect",
181
- fireworks: "com.apple.messages.effect.CKFireworksEffect",
182
- celebration: "com.apple.messages.effect.CKSparklesEffect"
183
- };
184
- function resolveEffectId(raw) {
185
- if (!raw) return;
186
- const trimmed = raw.trim().toLowerCase();
187
- if (EFFECT_MAP[trimmed]) return EFFECT_MAP[trimmed];
188
- const normalized = trimmed.replace(/[\s_]+/g, "-");
189
- if (EFFECT_MAP[normalized]) return EFFECT_MAP[normalized];
190
- const compact = trimmed.replace(/[\s_-]+/g, "");
191
- if (EFFECT_MAP[compact]) return EFFECT_MAP[compact];
192
- return raw;
193
- }
194
- function resolvePrivateApiDecision(params) {
195
- const { privateApiStatus, wantsReplyThread, wantsEffect } = params;
196
- const needsPrivateApi = wantsReplyThread || wantsEffect;
197
- const canUsePrivateApi = needsPrivateApi && isBlueBubblesPrivateApiStatusEnabled(privateApiStatus);
198
- const throwEffectDisabledError = wantsEffect && privateApiStatus === false;
199
- if (!needsPrivateApi || privateApiStatus !== null) return {
200
- canUsePrivateApi,
201
- throwEffectDisabledError
202
- };
203
- return {
204
- canUsePrivateApi,
205
- throwEffectDisabledError,
206
- warningMessage: `Private API status unknown; sending without ${[wantsReplyThread ? "reply threading" : null, wantsEffect ? "message effects" : null].filter(Boolean).join(" + ")}. Run a status probe to restore private-api features.`
207
- };
208
- }
209
- async function parseBlueBubblesMessageResponse(res) {
210
- const body = await res.text();
211
- if (!body) return { messageId: "ok" };
212
- try {
213
- return { messageId: extractBlueBubblesMessageId(JSON.parse(body)) };
214
- } catch {
215
- return { messageId: "ok" };
216
- }
217
- }
218
- function extractChatGuid(chat) {
219
- const candidates = [
220
- chat.chatGuid,
221
- chat.guid,
222
- chat.chat_guid,
223
- chat.identifier,
224
- chat.chatIdentifier,
225
- chat.chat_identifier
226
- ];
227
- for (const candidate of candidates) if (typeof candidate === "string" && candidate.trim()) return candidate.trim();
228
- return null;
229
- }
230
- function extractChatId(chat) {
231
- const candidates = [
232
- chat.chatId,
233
- chat.id,
234
- chat.chat_id
235
- ];
236
- for (const candidate of candidates) if (typeof candidate === "number" && Number.isFinite(candidate)) return candidate;
237
- return null;
238
- }
239
- function extractChatIdentifierFromChatGuid$2(chatGuid) {
240
- const parts = chatGuid.split(";");
241
- if (parts.length < 3) return null;
242
- const identifier = parts[2]?.trim();
243
- return identifier ? identifier : null;
244
- }
245
- function extractParticipantAddresses(chat) {
246
- const raw = (Array.isArray(chat.participants) ? chat.participants : null) ?? (Array.isArray(chat.handles) ? chat.handles : null) ?? (Array.isArray(chat.participantHandles) ? chat.participantHandles : null);
247
- if (!raw) return [];
248
- const out = [];
249
- for (const entry of raw) {
250
- if (typeof entry === "string") {
251
- out.push(entry);
252
- continue;
253
- }
254
- if (entry && typeof entry === "object") {
255
- const record = entry;
256
- const candidate = typeof record.address === "string" && record.address || typeof record.handle === "string" && record.handle || typeof record.id === "string" && record.id || typeof record.identifier === "string" && record.identifier;
257
- if (candidate) out.push(candidate);
258
- }
259
- }
260
- return out;
261
- }
262
- async function queryChats(params) {
263
- const res = await blueBubblesFetchWithTimeout(buildBlueBubblesApiUrl({
264
- baseUrl: params.baseUrl,
265
- path: "/api/v1/chat/query",
266
- password: params.password
267
- }), {
268
- method: "POST",
269
- headers: { "Content-Type": "application/json" },
270
- body: JSON.stringify({
271
- limit: params.limit,
272
- offset: params.offset,
273
- with: ["participants"]
274
- })
275
- }, params.timeoutMs, blueBubblesPolicy$3(params.allowPrivateNetwork));
276
- if (!res.ok) return [];
277
- const payload = await res.json().catch(() => null);
278
- const data = payload && typeof payload.data !== "undefined" ? payload.data : null;
279
- return Array.isArray(data) ? data : [];
280
- }
281
- async function resolveChatGuidForTarget(params) {
282
- if (params.target.kind === "chat_guid") return params.target.chatGuid;
283
- const normalizedHandle = params.target.kind === "handle" ? normalizeBlueBubblesHandle(params.target.address) : "";
284
- const targetChatId = params.target.kind === "chat_id" ? params.target.chatId : null;
285
- const targetChatIdentifier = params.target.kind === "chat_identifier" ? params.target.chatIdentifier : null;
286
- const limit = 500;
287
- let participantMatch = null;
288
- for (let offset = 0; offset < 5e3; offset += limit) {
289
- const chats = await queryChats({
290
- baseUrl: params.baseUrl,
291
- password: params.password,
292
- timeoutMs: params.timeoutMs,
293
- offset,
294
- limit,
295
- allowPrivateNetwork: params.allowPrivateNetwork
296
- });
297
- if (chats.length === 0) break;
298
- for (const chat of chats) {
299
- if (targetChatId != null) {
300
- const chatId = extractChatId(chat);
301
- if (chatId != null && chatId === targetChatId) return extractChatGuid(chat);
302
- }
303
- if (targetChatIdentifier) {
304
- const guid = extractChatGuid(chat);
305
- if (guid) {
306
- if (guid === targetChatIdentifier) return guid;
307
- const guidIdentifier = extractChatIdentifierFromChatGuid$2(guid);
308
- if (guidIdentifier && guidIdentifier === targetChatIdentifier) return guid;
309
- }
310
- const identifier = typeof chat.identifier === "string" ? chat.identifier : typeof chat.chatIdentifier === "string" ? chat.chatIdentifier : typeof chat.chat_identifier === "string" ? chat.chat_identifier : "";
311
- if (identifier && identifier === targetChatIdentifier) return guid ?? extractChatGuid(chat);
312
- }
313
- if (normalizedHandle) {
314
- const guid = extractChatGuid(chat);
315
- const directHandle = guid ? extractHandleFromChatGuid(guid) : null;
316
- if (directHandle && directHandle === normalizedHandle) return guid;
317
- if (!participantMatch && guid) {
318
- if (guid.includes(";-;")) {
319
- if (extractParticipantAddresses(chat).map((entry) => normalizeBlueBubblesHandle(entry)).includes(normalizedHandle)) participantMatch = guid;
320
- }
321
- }
322
- }
323
- }
324
- }
325
- return participantMatch;
326
- }
327
- /**
328
- * Creates a new DM chat for the given address and returns the chat GUID.
329
- * Requires Private API to be enabled in BlueBubbles.
330
- *
331
- * If a `message` is provided it is sent as the initial message in the new chat;
332
- * otherwise an empty-string message body is used (BlueBubbles still creates the
333
- * chat but will not deliver a visible bubble).
334
- */
335
- async function createChatForHandle(params) {
336
- const url = buildBlueBubblesApiUrl({
337
- baseUrl: params.baseUrl,
338
- path: "/api/v1/chat/new",
339
- password: params.password
340
- });
341
- const payload = {
342
- addresses: [params.address],
343
- message: params.message ?? "",
344
- tempGuid: `temp-${crypto.randomUUID()}`
345
- };
346
- const res = await blueBubblesFetchWithTimeout(url, {
347
- method: "POST",
348
- headers: { "Content-Type": "application/json" },
349
- body: JSON.stringify(payload)
350
- }, params.timeoutMs, blueBubblesPolicy$3(params.allowPrivateNetwork));
351
- if (!res.ok) {
352
- const errorText = await res.text();
353
- if (res.status === 400 || res.status === 403 || errorText.toLowerCase().includes("private api")) throw new Error(`BlueBubbles send failed: Cannot create new chat - Private API must be enabled. Original error: ${errorText || res.status}`);
354
- throw new Error(`BlueBubbles create chat failed (${res.status}): ${errorText || "unknown"}`);
355
- }
356
- const body = await res.text();
357
- let messageId = "ok";
358
- let chatGuid = null;
359
- if (body) try {
360
- const parsed = JSON.parse(body);
361
- messageId = extractBlueBubblesMessageId(parsed);
362
- const data = parsed.data;
363
- if (data) {
364
- chatGuid = typeof data.chatGuid === "string" && data.chatGuid || typeof data.guid === "string" && data.guid || null;
365
- if (!chatGuid) {
366
- const chats = data.chats ?? data.chat;
367
- if (Array.isArray(chats) && chats.length > 0) {
368
- const first = chats[0];
369
- chatGuid = typeof first?.guid === "string" && first.guid || typeof first?.chatGuid === "string" && first.chatGuid || null;
370
- } else if (chats && typeof chats === "object" && !Array.isArray(chats)) {
371
- const chatObj = chats;
372
- chatGuid = typeof chatObj.guid === "string" && chatObj.guid || typeof chatObj.chatGuid === "string" && chatObj.chatGuid || null;
373
- }
374
- }
375
- }
376
- } catch {}
377
- return {
378
- chatGuid,
379
- messageId
380
- };
381
- }
382
- /**
383
- * Creates a new chat (DM) and sends an initial message.
384
- * Requires Private API to be enabled in BlueBubbles.
385
- */
386
- async function createNewChatWithMessage(params) {
387
- return { messageId: (await createChatForHandle({
388
- baseUrl: params.baseUrl,
389
- password: params.password,
390
- address: params.address,
391
- message: params.message,
392
- timeoutMs: params.timeoutMs,
393
- allowPrivateNetwork: params.allowPrivateNetwork
394
- })).messageId };
395
- }
396
- async function sendMessageBlueBubbles(to, text, opts = {}) {
397
- const trimmedText = text ?? "";
398
- if (!trimmedText.trim()) throw new Error("BlueBubbles send requires text");
399
- const strippedText = stripMarkdown(trimmedText);
400
- if (!strippedText.trim()) throw new Error("BlueBubbles send requires text (message was empty after markdown removal)");
401
- const { baseUrl, password, accountId, allowPrivateNetwork } = resolveBlueBubblesServerAccount({
402
- cfg: opts.cfg ?? {},
403
- accountId: opts.accountId,
404
- serverUrl: opts.serverUrl,
405
- password: opts.password
406
- });
407
- const privateApiStatus = getCachedBlueBubblesPrivateApiStatus(accountId);
408
- const target = resolveBlueBubblesSendTarget(to);
409
- const chatGuid = await resolveChatGuidForTarget({
410
- baseUrl,
411
- password,
412
- timeoutMs: opts.timeoutMs,
413
- target,
414
- allowPrivateNetwork
415
- });
416
- if (!chatGuid) {
417
- if (target.kind === "handle") return createNewChatWithMessage({
418
- baseUrl,
419
- password,
420
- address: target.address,
421
- message: strippedText,
422
- timeoutMs: opts.timeoutMs,
423
- allowPrivateNetwork
424
- });
425
- throw new Error("BlueBubbles send failed: chatGuid not found for target. Use a chat_guid target or ensure the chat exists.");
426
- }
427
- const effectId = resolveEffectId(opts.effectId);
428
- const wantsReplyThread = Boolean(opts.replyToMessageGuid?.trim());
429
- const privateApiDecision = resolvePrivateApiDecision({
430
- privateApiStatus,
431
- wantsReplyThread,
432
- wantsEffect: Boolean(effectId)
433
- });
434
- if (privateApiDecision.throwEffectDisabledError) throw new Error("BlueBubbles send failed: reply/effect requires Private API, but it is disabled on the BlueBubbles server.");
435
- if (privateApiDecision.warningMessage) warnBlueBubbles(privateApiDecision.warningMessage);
436
- const payload = {
437
- chatGuid,
438
- tempGuid: crypto.randomUUID(),
439
- message: strippedText
440
- };
441
- if (privateApiDecision.canUsePrivateApi) payload.method = "private-api";
442
- if (wantsReplyThread && privateApiDecision.canUsePrivateApi) {
443
- payload.selectedMessageGuid = opts.replyToMessageGuid;
444
- payload.partIndex = typeof opts.replyToPartIndex === "number" ? opts.replyToPartIndex : 0;
445
- }
446
- if (effectId && privateApiDecision.canUsePrivateApi) payload.effectId = effectId;
447
- const res = await blueBubblesFetchWithTimeout(buildBlueBubblesApiUrl({
448
- baseUrl,
449
- path: "/api/v1/message/text",
450
- password
451
- }), {
452
- method: "POST",
453
- headers: { "Content-Type": "application/json" },
454
- body: JSON.stringify(payload)
455
- }, opts.timeoutMs, blueBubblesPolicy$3(allowPrivateNetwork));
456
- if (!res.ok) {
457
- const errorText = await res.text();
458
- throw new Error(`BlueBubbles send failed (${res.status}): ${errorText || "unknown"}`);
459
- }
460
- return parseBlueBubblesMessageResponse(res);
461
- }
462
- //#endregion
463
- //#region extensions/bluebubbles/src/attachments.ts
464
- function blueBubblesPolicy$2(allowPrivateNetwork) {
465
- return allowPrivateNetwork ? { allowPrivateNetwork: true } : {};
466
- }
467
- const DEFAULT_ATTACHMENT_MAX_BYTES = 8 * 1024 * 1024;
468
- const AUDIO_MIME_MP3 = new Set(["audio/mpeg", "audio/mp3"]);
469
- const AUDIO_MIME_CAF = new Set(["audio/x-caf", "audio/caf"]);
470
- function sanitizeFilename(input, fallback) {
471
- const trimmed = input?.trim() ?? "";
472
- return ((trimmed ? path.basename(trimmed) : "") || fallback).replace(/[\r\n"\\]/g, "_");
473
- }
474
- function ensureExtension(filename, extension, fallbackBase) {
475
- const currentExt = path.extname(filename);
476
- if (currentExt.toLowerCase() === extension) return filename;
477
- return `${(currentExt ? filename.slice(0, -currentExt.length) : filename) || fallbackBase}${extension}`;
478
- }
479
- function resolveVoiceInfo(filename, contentType) {
480
- const normalizedType = contentType?.trim().toLowerCase();
481
- const extension = path.extname(filename).toLowerCase();
482
- const isMp3 = extension === ".mp3" || (normalizedType ? AUDIO_MIME_MP3.has(normalizedType) : false);
483
- const isCaf = extension === ".caf" || (normalizedType ? AUDIO_MIME_CAF.has(normalizedType) : false);
484
- return {
485
- isAudio: isMp3 || isCaf || Boolean(normalizedType?.startsWith("audio/")),
486
- isMp3,
487
- isCaf
488
- };
489
- }
490
- function resolveAccount$3(params) {
491
- return resolveBlueBubblesServerAccount(params);
492
- }
493
- function safeExtractHostname(url) {
494
- try {
495
- return new URL(url).hostname.trim() || void 0;
496
- } catch {
497
- return;
498
- }
499
- }
500
- function readMediaFetchErrorCode(error) {
501
- if (!error || typeof error !== "object") return;
502
- const code = error.code;
503
- return code === "max_bytes" || code === "http_error" || code === "fetch_failed" ? code : void 0;
504
- }
505
- async function downloadBlueBubblesAttachment(attachment, opts = {}) {
506
- const guid = attachment.guid?.trim();
507
- if (!guid) throw new Error("BlueBubbles attachment guid is required");
508
- const { baseUrl, password, allowPrivateNetwork } = resolveAccount$3(opts);
509
- const url = buildBlueBubblesApiUrl({
510
- baseUrl,
511
- path: `/api/v1/attachment/${encodeURIComponent(guid)}/download`,
512
- password
513
- });
514
- const maxBytes = typeof opts.maxBytes === "number" ? opts.maxBytes : DEFAULT_ATTACHMENT_MAX_BYTES;
515
- const trustedHostname = safeExtractHostname(baseUrl);
516
- try {
517
- const fetched = await getBlueBubblesRuntime().channel.media.fetchRemoteMedia({
518
- url,
519
- filePathHint: attachment.transferName ?? attachment.guid ?? "attachment",
520
- maxBytes,
521
- ssrfPolicy: allowPrivateNetwork ? { allowPrivateNetwork: true } : trustedHostname ? { allowedHostnames: [trustedHostname] } : void 0,
522
- fetchImpl: async (input, init) => await blueBubblesFetchWithTimeout(resolveRequestUrl(input), {
523
- ...init,
524
- method: init?.method ?? "GET"
525
- }, opts.timeoutMs)
526
- });
527
- return {
528
- buffer: new Uint8Array(fetched.buffer),
529
- contentType: fetched.contentType ?? attachment.mimeType ?? void 0
530
- };
531
- } catch (error) {
532
- if (readMediaFetchErrorCode(error) === "max_bytes") throw new Error(`BlueBubbles attachment too large (limit ${maxBytes} bytes)`);
533
- const text = error instanceof Error ? error.message : String(error);
534
- throw new Error(`BlueBubbles attachment download failed: ${text}`);
535
- }
536
- }
537
- /**
538
- * Send an attachment via BlueBubbles API.
539
- * Supports sending media files (images, videos, audio, documents) to a chat.
540
- * When asVoice is true, expects MP3/CAF audio and marks it as an iMessage voice memo.
541
- */
542
- async function sendBlueBubblesAttachment(params) {
543
- const { to, caption, replyToMessageGuid, replyToPartIndex, asVoice, opts = {} } = params;
544
- let { buffer, filename, contentType } = params;
545
- const wantsVoice = asVoice === true;
546
- const fallbackName = wantsVoice ? "Audio Message" : "attachment";
547
- filename = sanitizeFilename(filename, fallbackName);
548
- contentType = contentType?.trim() || void 0;
549
- const { baseUrl, password, accountId, allowPrivateNetwork } = resolveAccount$3(opts);
550
- const privateApiStatus = getCachedBlueBubblesPrivateApiStatus(accountId);
551
- const privateApiEnabled = isBlueBubblesPrivateApiStatusEnabled(privateApiStatus);
552
- const isAudioMessage = wantsVoice;
553
- if (isAudioMessage) {
554
- const voiceInfo = resolveVoiceInfo(filename, contentType);
555
- if (!voiceInfo.isAudio) throw new Error("BlueBubbles voice messages require audio media (mp3 or caf).");
556
- if (voiceInfo.isMp3) {
557
- filename = ensureExtension(filename, ".mp3", fallbackName);
558
- contentType = contentType ?? "audio/mpeg";
559
- } else if (voiceInfo.isCaf) {
560
- filename = ensureExtension(filename, ".caf", fallbackName);
561
- contentType = contentType ?? "audio/x-caf";
562
- } else throw new Error("BlueBubbles voice messages require mp3 or caf audio (convert before sending).");
563
- }
564
- const target = resolveBlueBubblesSendTarget(to);
565
- let chatGuid = await resolveChatGuidForTarget({
566
- baseUrl,
567
- password,
568
- timeoutMs: opts.timeoutMs,
569
- target,
570
- allowPrivateNetwork
571
- });
572
- if (!chatGuid) {
573
- if (target.kind === "handle") {
574
- chatGuid = (await createChatForHandle({
575
- baseUrl,
576
- password,
577
- address: target.address,
578
- timeoutMs: opts.timeoutMs,
579
- allowPrivateNetwork
580
- })).chatGuid;
581
- if (!chatGuid) chatGuid = await resolveChatGuidForTarget({
582
- baseUrl,
583
- password,
584
- timeoutMs: opts.timeoutMs,
585
- target,
586
- allowPrivateNetwork
587
- });
588
- }
589
- if (!chatGuid) throw new Error("BlueBubbles attachment send failed: chatGuid not found for target. Use a chat_guid target or ensure the chat exists.");
590
- }
591
- const url = buildBlueBubblesApiUrl({
592
- baseUrl,
593
- path: "/api/v1/message/attachment",
594
- password
595
- });
596
- const boundary = `----BlueBubblesFormBoundary${crypto.randomUUID().replace(/-/g, "")}`;
597
- const parts = [];
598
- const encoder = new TextEncoder();
599
- const addField = (name, value) => {
600
- parts.push(encoder.encode(`--${boundary}\r\n`));
601
- parts.push(encoder.encode(`Content-Disposition: form-data; name="${name}"\r\n\r\n`));
602
- parts.push(encoder.encode(`${value}\r\n`));
603
- };
604
- const addFile = (name, fileBuffer, fileName, mimeType) => {
605
- parts.push(encoder.encode(`--${boundary}\r\n`));
606
- parts.push(encoder.encode(`Content-Disposition: form-data; name="${name}"; filename="${fileName}"\r\n`));
607
- parts.push(encoder.encode(`Content-Type: ${mimeType ?? "application/octet-stream"}\r\n\r\n`));
608
- parts.push(fileBuffer);
609
- parts.push(encoder.encode("\r\n"));
610
- };
611
- addFile("attachment", buffer, filename, contentType);
612
- addField("chatGuid", chatGuid);
613
- addField("name", filename);
614
- addField("tempGuid", `temp-${Date.now()}-${crypto.randomUUID().slice(0, 8)}`);
615
- if (privateApiEnabled) addField("method", "private-api");
616
- if (isAudioMessage) addField("isAudioMessage", "true");
617
- const trimmedReplyTo = replyToMessageGuid?.trim();
618
- if (trimmedReplyTo && privateApiEnabled) {
619
- addField("selectedMessageGuid", trimmedReplyTo);
620
- addField("partIndex", typeof replyToPartIndex === "number" ? String(replyToPartIndex) : "0");
621
- } else if (trimmedReplyTo && privateApiStatus === null) warnBlueBubbles("Private API status unknown; sending attachment without reply threading metadata. Run a status probe to restore private-api reply features.");
622
- if (caption) {
623
- addField("message", caption);
624
- addField("text", caption);
625
- addField("caption", caption);
626
- }
627
- parts.push(encoder.encode(`--${boundary}--\r\n`));
628
- const res = await postMultipartFormData({
629
- url,
630
- boundary,
631
- parts,
632
- timeoutMs: opts.timeoutMs ?? 6e4,
633
- ssrfPolicy: blueBubblesPolicy$2(allowPrivateNetwork)
634
- });
635
- await assertMultipartActionOk(res, "attachment send");
636
- const responseBody = await res.text();
637
- if (!responseBody) return { messageId: "ok" };
638
- try {
639
- return { messageId: extractBlueBubblesMessageId(JSON.parse(responseBody)) };
640
- } catch {
641
- return { messageId: "ok" };
642
- }
643
- }
644
- //#endregion
645
- //#region extensions/bluebubbles/src/chat.ts
646
- function blueBubblesPolicy$1(allowPrivateNetwork) {
647
- return allowPrivateNetwork ? { allowPrivateNetwork: true } : {};
648
- }
649
- function resolveAccount$2(params) {
650
- return resolveBlueBubblesServerAccount(params);
651
- }
652
- function assertPrivateApiEnabled(accountId, feature) {
653
- if (getCachedBlueBubblesPrivateApiStatus(accountId) === false) throw new Error(`BlueBubbles ${feature} requires Private API, but it is disabled on the BlueBubbles server.`);
654
- }
655
- function resolvePartIndex(partIndex) {
656
- return typeof partIndex === "number" ? partIndex : 0;
657
- }
658
- async function sendBlueBubblesChatEndpointRequest(params) {
659
- const trimmed = params.chatGuid.trim();
660
- if (!trimmed) return;
661
- const { baseUrl, password, accountId, allowPrivateNetwork } = resolveAccount$2(params.opts);
662
- if (getCachedBlueBubblesPrivateApiStatus(accountId) === false) return;
663
- await assertMultipartActionOk(await blueBubblesFetchWithTimeout(buildBlueBubblesApiUrl({
664
- baseUrl,
665
- path: `/api/v1/chat/${encodeURIComponent(trimmed)}/${params.endpoint}`,
666
- password
667
- }), { method: params.method }, params.opts.timeoutMs, blueBubblesPolicy$1(allowPrivateNetwork)), params.action);
668
- }
669
- async function sendPrivateApiJsonRequest(params) {
670
- const { baseUrl, password, accountId, allowPrivateNetwork } = resolveAccount$2(params.opts);
671
- assertPrivateApiEnabled(accountId, params.feature);
672
- const url = buildBlueBubblesApiUrl({
673
- baseUrl,
674
- path: params.path,
675
- password
676
- });
677
- const request = { method: params.method };
678
- if (params.payload !== void 0) {
679
- request.headers = { "Content-Type": "application/json" };
680
- request.body = JSON.stringify(params.payload);
681
- }
682
- await assertMultipartActionOk(await blueBubblesFetchWithTimeout(url, request, params.opts.timeoutMs, blueBubblesPolicy$1(allowPrivateNetwork)), params.action);
683
- }
684
- async function markBlueBubblesChatRead(chatGuid, opts = {}) {
685
- await sendBlueBubblesChatEndpointRequest({
686
- chatGuid,
687
- opts,
688
- endpoint: "read",
689
- method: "POST",
690
- action: "read"
691
- });
692
- }
693
- async function sendBlueBubblesTyping(chatGuid, typing, opts = {}) {
694
- await sendBlueBubblesChatEndpointRequest({
695
- chatGuid,
696
- opts,
697
- endpoint: "typing",
698
- method: typing ? "POST" : "DELETE",
699
- action: "typing"
700
- });
701
- }
702
- /**
703
- * Edit a message via BlueBubbles API.
704
- * Requires macOS 13 (Ventura) or higher with Private API enabled.
705
- */
706
- async function editBlueBubblesMessage(messageGuid, newText, opts = {}) {
707
- const trimmedGuid = messageGuid.trim();
708
- if (!trimmedGuid) throw new Error("BlueBubbles edit requires messageGuid");
709
- const trimmedText = newText.trim();
710
- if (!trimmedText) throw new Error("BlueBubbles edit requires newText");
711
- await sendPrivateApiJsonRequest({
712
- opts,
713
- feature: "edit",
714
- action: "edit",
715
- method: "POST",
716
- path: `/api/v1/message/${encodeURIComponent(trimmedGuid)}/edit`,
717
- payload: {
718
- editedMessage: trimmedText,
719
- backwardsCompatibilityMessage: opts.backwardsCompatMessage ?? `Edited to: ${trimmedText}`,
720
- partIndex: resolvePartIndex(opts.partIndex)
721
- }
722
- });
723
- }
724
- /**
725
- * Unsend (retract) a message via BlueBubbles API.
726
- * Requires macOS 13 (Ventura) or higher with Private API enabled.
727
- */
728
- async function unsendBlueBubblesMessage(messageGuid, opts = {}) {
729
- const trimmedGuid = messageGuid.trim();
730
- if (!trimmedGuid) throw new Error("BlueBubbles unsend requires messageGuid");
731
- await sendPrivateApiJsonRequest({
732
- opts,
733
- feature: "unsend",
734
- action: "unsend",
735
- method: "POST",
736
- path: `/api/v1/message/${encodeURIComponent(trimmedGuid)}/unsend`,
737
- payload: { partIndex: resolvePartIndex(opts.partIndex) }
738
- });
739
- }
740
- /**
741
- * Rename a group chat via BlueBubbles API.
742
- */
743
- async function renameBlueBubblesChat(chatGuid, displayName, opts = {}) {
744
- const trimmedGuid = chatGuid.trim();
745
- if (!trimmedGuid) throw new Error("BlueBubbles rename requires chatGuid");
746
- await sendPrivateApiJsonRequest({
747
- opts,
748
- feature: "renameGroup",
749
- action: "rename",
750
- method: "PUT",
751
- path: `/api/v1/chat/${encodeURIComponent(trimmedGuid)}`,
752
- payload: { displayName }
753
- });
754
- }
755
- /**
756
- * Add a participant to a group chat via BlueBubbles API.
757
- */
758
- async function addBlueBubblesParticipant(chatGuid, address, opts = {}) {
759
- const trimmedGuid = chatGuid.trim();
760
- if (!trimmedGuid) throw new Error("BlueBubbles addParticipant requires chatGuid");
761
- const trimmedAddress = address.trim();
762
- if (!trimmedAddress) throw new Error("BlueBubbles addParticipant requires address");
763
- await sendPrivateApiJsonRequest({
764
- opts,
765
- feature: "addParticipant",
766
- action: "addParticipant",
767
- method: "POST",
768
- path: `/api/v1/chat/${encodeURIComponent(trimmedGuid)}/participant`,
769
- payload: { address: trimmedAddress }
770
- });
771
- }
772
- /**
773
- * Remove a participant from a group chat via BlueBubbles API.
774
- */
775
- async function removeBlueBubblesParticipant(chatGuid, address, opts = {}) {
776
- const trimmedGuid = chatGuid.trim();
777
- if (!trimmedGuid) throw new Error("BlueBubbles removeParticipant requires chatGuid");
778
- const trimmedAddress = address.trim();
779
- if (!trimmedAddress) throw new Error("BlueBubbles removeParticipant requires address");
780
- await sendPrivateApiJsonRequest({
781
- opts,
782
- feature: "removeParticipant",
783
- action: "removeParticipant",
784
- method: "DELETE",
785
- path: `/api/v1/chat/${encodeURIComponent(trimmedGuid)}/participant`,
786
- payload: { address: trimmedAddress }
787
- });
788
- }
789
- /**
790
- * Leave a group chat via BlueBubbles API.
791
- */
792
- async function leaveBlueBubblesChat(chatGuid, opts = {}) {
793
- const trimmedGuid = chatGuid.trim();
794
- if (!trimmedGuid) throw new Error("BlueBubbles leaveChat requires chatGuid");
795
- await sendPrivateApiJsonRequest({
796
- opts,
797
- feature: "leaveGroup",
798
- action: "leaveChat",
799
- method: "POST",
800
- path: `/api/v1/chat/${encodeURIComponent(trimmedGuid)}/leave`
801
- });
802
- }
803
- /**
804
- * Set a group chat's icon/photo via BlueBubbles API.
805
- * Requires Private API to be enabled.
806
- */
807
- async function setGroupIconBlueBubbles(chatGuid, buffer, filename, opts = {}) {
808
- const trimmedGuid = chatGuid.trim();
809
- if (!trimmedGuid) throw new Error("BlueBubbles setGroupIcon requires chatGuid");
810
- if (!buffer || buffer.length === 0) throw new Error("BlueBubbles setGroupIcon requires image buffer");
811
- const { baseUrl, password, accountId, allowPrivateNetwork } = resolveAccount$2(opts);
812
- assertPrivateApiEnabled(accountId, "setGroupIcon");
813
- const url = buildBlueBubblesApiUrl({
814
- baseUrl,
815
- path: `/api/v1/chat/${encodeURIComponent(trimmedGuid)}/icon`,
816
- password
817
- });
818
- const boundary = `----BlueBubblesFormBoundary${crypto.randomUUID().replace(/-/g, "")}`;
819
- const parts = [];
820
- const encoder = new TextEncoder();
821
- const safeFilename = path.basename(filename).replace(/[\r\n"\\]/g, "_") || "icon.png";
822
- parts.push(encoder.encode(`--${boundary}\r\n`));
823
- parts.push(encoder.encode(`Content-Disposition: form-data; name="icon"; filename="${safeFilename}"\r\n`));
824
- parts.push(encoder.encode(`Content-Type: ${opts.contentType ?? "application/octet-stream"}\r\n\r\n`));
825
- parts.push(buffer);
826
- parts.push(encoder.encode("\r\n"));
827
- parts.push(encoder.encode(`--${boundary}--\r\n`));
828
- await assertMultipartActionOk(await postMultipartFormData({
829
- url,
830
- boundary,
831
- parts,
832
- timeoutMs: opts.timeoutMs ?? 6e4,
833
- ssrfPolicy: blueBubblesPolicy$1(allowPrivateNetwork)
834
- }), "setGroupIcon");
835
- }
836
- //#endregion
837
- //#region extensions/bluebubbles/src/monitor-debounce.ts
838
- function normalizeDebounceMessageText(text) {
839
- return typeof text === "string" ? text : "";
840
- }
841
- function sanitizeDebounceEntry(entry) {
842
- if (typeof entry.message.text === "string") return entry;
843
- return {
844
- ...entry,
845
- message: {
846
- ...entry.message,
847
- text: ""
848
- }
849
- };
850
- }
851
- /**
852
- * Default debounce window for inbound message coalescing (ms).
853
- * This helps combine URL text + link preview balloon messages that BlueBubbles
854
- * sends as separate webhook events when no explicit inbound debounce config exists.
855
- */
856
- const DEFAULT_INBOUND_DEBOUNCE_MS = 500;
857
- /**
858
- * Combines multiple debounced messages into a single message for processing.
859
- * Used when multiple webhook events arrive within the debounce window.
860
- */
861
- function combineDebounceEntries(entries) {
862
- if (entries.length === 0) throw new Error("Cannot combine empty entries");
863
- if (entries.length === 1) return entries[0].message;
864
- const first = entries[0].message;
865
- const seenTexts = /* @__PURE__ */ new Set();
866
- const textParts = [];
867
- for (const entry of entries) {
868
- const text = normalizeDebounceMessageText(entry.message.text).trim();
869
- if (!text) continue;
870
- const normalizedText = text.toLowerCase();
871
- if (seenTexts.has(normalizedText)) continue;
872
- seenTexts.add(normalizedText);
873
- textParts.push(text);
874
- }
875
- const allAttachments = entries.flatMap((e) => e.message.attachments ?? []);
876
- const timestamps = entries.map((e) => e.message.timestamp).filter((t) => typeof t === "number");
877
- const latestTimestamp = timestamps.length > 0 ? Math.max(...timestamps) : first.timestamp;
878
- const messageIds = entries.map((e) => e.message.messageId).filter((id) => Boolean(id));
879
- const entryWithReply = entries.find((e) => e.message.replyToId);
880
- return {
881
- ...first,
882
- text: textParts.join(" "),
883
- attachments: allAttachments.length > 0 ? allAttachments : first.attachments,
884
- timestamp: latestTimestamp,
885
- messageId: messageIds[0] ?? first.messageId,
886
- replyToId: entryWithReply?.message.replyToId ?? first.replyToId,
887
- replyToBody: entryWithReply?.message.replyToBody ?? first.replyToBody,
888
- replyToSender: entryWithReply?.message.replyToSender ?? first.replyToSender,
889
- balloonBundleId: void 0
890
- };
891
- }
892
- function resolveBlueBubblesDebounceMs(config, core) {
893
- const inbound = config.messages?.inbound;
894
- if (!(typeof inbound?.debounceMs === "number" || typeof inbound?.byChannel?.bluebubbles === "number")) return DEFAULT_INBOUND_DEBOUNCE_MS;
895
- return core.channel.debounce.resolveInboundDebounceMs({
896
- cfg: config,
897
- channel: "bluebubbles"
898
- });
899
- }
900
- function createBlueBubblesDebounceRegistry(params) {
901
- const targetDebouncers = /* @__PURE__ */ new Map();
902
- return {
903
- getOrCreateDebouncer: (target) => {
904
- const existing = targetDebouncers.get(target);
905
- if (existing) return existing;
906
- const { account, config, runtime, core } = target;
907
- const baseDebouncer = core.channel.debounce.createInboundDebouncer({
908
- debounceMs: resolveBlueBubblesDebounceMs(config, core),
909
- buildKey: (entry) => {
910
- const msg = entry.message;
911
- const balloonBundleId = msg.balloonBundleId?.trim();
912
- const associatedMessageGuid = msg.associatedMessageGuid?.trim();
913
- if (balloonBundleId && associatedMessageGuid) return `bluebubbles:${account.accountId}:msg:${associatedMessageGuid}`;
914
- const messageId = msg.messageId?.trim();
915
- if (messageId) return `bluebubbles:${account.accountId}:msg:${messageId}`;
916
- const chatKey = msg.chatGuid?.trim() ?? msg.chatIdentifier?.trim() ?? (msg.chatId ? String(msg.chatId) : "dm");
917
- return `bluebubbles:${account.accountId}:${chatKey}:${msg.senderId}`;
918
- },
919
- shouldDebounce: (entry) => {
920
- const msg = entry.message;
921
- if (msg.fromMe) return false;
922
- if (core.channel.text.hasControlCommand(msg.text, config)) return false;
923
- return true;
924
- },
925
- onFlush: async (entries) => {
926
- if (entries.length === 0) return;
927
- const flushTarget = entries[0].target;
928
- if (entries.length === 1) {
929
- await params.processMessage(entries[0].message, flushTarget);
930
- return;
931
- }
932
- const combined = combineDebounceEntries(entries);
933
- if (core.logging.shouldLogVerbose()) {
934
- const count = entries.length;
935
- const preview = combined.text.slice(0, 50);
936
- runtime.log?.(`[bluebubbles] coalesced ${count} messages: "${preview}${combined.text.length > 50 ? "..." : ""}"`);
937
- }
938
- await params.processMessage(combined, flushTarget);
939
- },
940
- onError: (err) => {
941
- runtime.error?.(`[${account.accountId}] [bluebubbles] debounce flush failed: ${String(err)}`);
942
- }
943
- });
944
- const debouncer = {
945
- enqueue: async (item) => {
946
- await baseDebouncer.enqueue(sanitizeDebounceEntry(item));
947
- },
948
- flushKey: (key) => baseDebouncer.flushKey(key)
949
- };
950
- targetDebouncers.set(target, debouncer);
951
- return debouncer;
952
- },
953
- removeDebouncer: (target) => {
954
- targetDebouncers.delete(target);
955
- }
956
- };
957
- }
958
- //#endregion
959
- //#region extensions/bluebubbles/src/monitor-normalize.ts
960
- function asRecord$1(value) {
961
- return value && typeof value === "object" && !Array.isArray(value) ? value : null;
962
- }
963
- function readString(record, key) {
964
- if (!record) return;
965
- const value = record[key];
966
- return typeof value === "string" ? value : void 0;
967
- }
968
- function readNumber(record, key) {
969
- if (!record) return;
970
- const value = record[key];
971
- return typeof value === "number" && Number.isFinite(value) ? value : void 0;
972
- }
973
- function readBoolean(record, key) {
974
- if (!record) return;
975
- const value = record[key];
976
- return typeof value === "boolean" ? value : void 0;
977
- }
978
- function readNumberLike(record, key) {
979
- if (!record) return;
980
- return parseFiniteNumber(record[key]);
981
- }
982
- function extractAttachments(message) {
983
- const raw = message["attachments"];
984
- if (!Array.isArray(raw)) return [];
985
- const out = [];
986
- for (const entry of raw) {
987
- const record = asRecord$1(entry);
988
- if (!record) continue;
989
- out.push({
990
- guid: readString(record, "guid"),
991
- uti: readString(record, "uti"),
992
- mimeType: readString(record, "mimeType") ?? readString(record, "mime_type"),
993
- transferName: readString(record, "transferName") ?? readString(record, "transfer_name"),
994
- totalBytes: readNumberLike(record, "totalBytes") ?? readNumberLike(record, "total_bytes"),
995
- height: readNumberLike(record, "height"),
996
- width: readNumberLike(record, "width"),
997
- originalROWID: readNumberLike(record, "originalROWID") ?? readNumberLike(record, "rowid")
998
- });
999
- }
1000
- return out;
1001
- }
1002
- function buildAttachmentPlaceholder(attachments) {
1003
- if (attachments.length === 0) return "";
1004
- const mimeTypes = attachments.map((entry) => entry.mimeType ?? "");
1005
- const allImages = mimeTypes.every((entry) => entry.startsWith("image/"));
1006
- const allVideos = mimeTypes.every((entry) => entry.startsWith("video/"));
1007
- const allAudio = mimeTypes.every((entry) => entry.startsWith("audio/"));
1008
- const tag = allImages ? "<media:image>" : allVideos ? "<media:video>" : allAudio ? "<media:audio>" : "<media:attachment>";
1009
- const label = allImages ? "image" : allVideos ? "video" : allAudio ? "audio" : "file";
1010
- const suffix = attachments.length === 1 ? label : `${label}s`;
1011
- return `${tag} (${attachments.length} ${suffix})`;
1012
- }
1013
- function buildMessagePlaceholder(message) {
1014
- const attachmentPlaceholder = buildAttachmentPlaceholder(message.attachments ?? []);
1015
- if (attachmentPlaceholder) return attachmentPlaceholder;
1016
- if (message.balloonBundleId) return "<media:sticker>";
1017
- return "";
1018
- }
1019
- function formatReplyTag(message) {
1020
- const rawId = message.replyToShortId || message.replyToId;
1021
- if (!rawId) return null;
1022
- return `[[reply_to:${rawId}]]`;
1023
- }
1024
- function extractReplyMetadata(message) {
1025
- const replyRecord = asRecord$1(message["replyTo"] ?? message["reply_to"] ?? message["replyToMessage"] ?? message["reply_to_message"] ?? message["repliedMessage"] ?? message["quotedMessage"] ?? message["associatedMessage"] ?? message["reply"]);
1026
- const replyHandle = asRecord$1(replyRecord?.["handle"]) ?? asRecord$1(replyRecord?.["sender"]) ?? null;
1027
- const replySenderRaw = readString(replyHandle, "address") ?? readString(replyHandle, "handle") ?? readString(replyHandle, "id") ?? readString(replyRecord, "senderId") ?? readString(replyRecord, "sender") ?? readString(replyRecord, "from");
1028
- const normalizedSender = replySenderRaw ? normalizeBlueBubblesHandle(replySenderRaw) || replySenderRaw.trim() : void 0;
1029
- const replyToBody = readString(replyRecord, "text") ?? readString(replyRecord, "body") ?? readString(replyRecord, "message") ?? readString(replyRecord, "subject") ?? void 0;
1030
- const directReplyId = readString(message, "replyToMessageGuid") ?? readString(message, "replyToGuid") ?? readString(message, "replyGuid") ?? readString(message, "selectedMessageGuid") ?? readString(message, "selectedMessageId") ?? readString(message, "replyToMessageId") ?? readString(message, "replyId") ?? readString(replyRecord, "guid") ?? readString(replyRecord, "id") ?? readString(replyRecord, "messageId");
1031
- const associatedType = readNumberLike(message, "associatedMessageType") ?? readNumberLike(message, "associated_message_type");
1032
- const associatedGuid = readString(message, "associatedMessageGuid") ?? readString(message, "associated_message_guid") ?? readString(message, "associatedMessageId");
1033
- const isReactionAssociation = typeof associatedType === "number" && REACTION_TYPE_MAP.has(associatedType);
1034
- const replyToId = directReplyId ?? (!isReactionAssociation ? associatedGuid : void 0);
1035
- const threadOriginatorGuid = readString(message, "threadOriginatorGuid");
1036
- const messageGuid = readString(message, "guid");
1037
- return {
1038
- replyToId: (replyToId ?? (!replyToId && threadOriginatorGuid && threadOriginatorGuid !== messageGuid ? threadOriginatorGuid : void 0))?.trim() || void 0,
1039
- replyToBody: replyToBody?.trim() || void 0,
1040
- replyToSender: normalizedSender || void 0
1041
- };
1042
- }
1043
- function readFirstChatRecord(message) {
1044
- const chats = message["chats"];
1045
- if (!Array.isArray(chats) || chats.length === 0) return null;
1046
- const first = chats[0];
1047
- return asRecord$1(first);
1048
- }
1049
- function readParticipantEntries(record) {
1050
- if (!record) return;
1051
- const participants = record["participants"];
1052
- if (Array.isArray(participants)) return participants;
1053
- const handles = record["handles"];
1054
- if (Array.isArray(handles)) return handles;
1055
- const participantHandles = record["participantHandles"];
1056
- if (Array.isArray(participantHandles)) return participantHandles;
1057
- }
1058
- function extractSenderInfo(message) {
1059
- const handleValue = message.handle ?? message.sender;
1060
- const handle = asRecord$1(handleValue) ?? (typeof handleValue === "string" ? { address: handleValue } : null);
1061
- const senderId = (readString(handle, "address") ?? readString(handle, "handle") ?? readString(handle, "id") ?? readString(message, "senderId") ?? readString(message, "sender") ?? readString(message, "from") ?? "").trim();
1062
- const senderName = readString(handle, "displayName") ?? readString(handle, "name") ?? readString(message, "senderName") ?? void 0;
1063
- return {
1064
- senderId,
1065
- senderIdExplicit: Boolean(senderId),
1066
- senderName
1067
- };
1068
- }
1069
- function extractChatContext(message) {
1070
- const chat = asRecord$1(message.chat) ?? asRecord$1(message.conversation) ?? null;
1071
- const chatFromList = readFirstChatRecord(message);
1072
- const chatGuid = readString(message, "chatGuid") ?? readString(message, "chat_guid") ?? readString(chat, "chatGuid") ?? readString(chat, "chat_guid") ?? readString(chat, "guid") ?? readString(chatFromList, "chatGuid") ?? readString(chatFromList, "chat_guid") ?? readString(chatFromList, "guid");
1073
- const chatIdentifier = readString(message, "chatIdentifier") ?? readString(message, "chat_identifier") ?? readString(chat, "chatIdentifier") ?? readString(chat, "chat_identifier") ?? readString(chat, "identifier") ?? readString(chatFromList, "chatIdentifier") ?? readString(chatFromList, "chat_identifier") ?? readString(chatFromList, "identifier") ?? extractChatIdentifierFromChatGuid$1(chatGuid);
1074
- const chatId = readNumberLike(message, "chatId") ?? readNumberLike(message, "chat_id") ?? readNumberLike(chat, "chatId") ?? readNumberLike(chat, "chat_id") ?? readNumberLike(chat, "id") ?? readNumberLike(chatFromList, "chatId") ?? readNumberLike(chatFromList, "chat_id") ?? readNumberLike(chatFromList, "id");
1075
- const chatName = readString(message, "chatName") ?? readString(chat, "displayName") ?? readString(chat, "name") ?? readString(chatFromList, "displayName") ?? readString(chatFromList, "name") ?? void 0;
1076
- const participants = readParticipantEntries(chat) ?? readParticipantEntries(message) ?? readParticipantEntries(chatFromList) ?? [];
1077
- const participantsCount = participants.length;
1078
- const groupFromChatGuid = resolveGroupFlagFromChatGuid(chatGuid);
1079
- const explicitIsGroup = readBoolean(message, "isGroup") ?? readBoolean(message, "is_group") ?? readBoolean(chat, "isGroup") ?? readBoolean(message, "group");
1080
- return {
1081
- chatGuid,
1082
- chatIdentifier,
1083
- chatId,
1084
- chatName,
1085
- isGroup: typeof groupFromChatGuid === "boolean" ? groupFromChatGuid : explicitIsGroup ?? participantsCount > 2,
1086
- participants
1087
- };
1088
- }
1089
- function normalizeParticipantEntry(entry) {
1090
- if (typeof entry === "string" || typeof entry === "number") {
1091
- const raw = String(entry).trim();
1092
- if (!raw) return null;
1093
- const normalized = normalizeBlueBubblesHandle(raw) || raw;
1094
- return normalized ? { id: normalized } : null;
1095
- }
1096
- const record = asRecord$1(entry);
1097
- if (!record) return null;
1098
- const nestedHandle = asRecord$1(record["handle"]) ?? asRecord$1(record["sender"]) ?? asRecord$1(record["contact"]) ?? null;
1099
- const idRaw = readString(record, "address") ?? readString(record, "handle") ?? readString(record, "id") ?? readString(record, "phoneNumber") ?? readString(record, "phone_number") ?? readString(record, "email") ?? readString(nestedHandle, "address") ?? readString(nestedHandle, "handle") ?? readString(nestedHandle, "id");
1100
- const nameRaw = readString(record, "displayName") ?? readString(record, "name") ?? readString(record, "title") ?? readString(nestedHandle, "displayName") ?? readString(nestedHandle, "name");
1101
- const normalizedId = idRaw ? normalizeBlueBubblesHandle(idRaw) || idRaw.trim() : "";
1102
- if (!normalizedId) return null;
1103
- return {
1104
- id: normalizedId,
1105
- name: nameRaw?.trim() || void 0
1106
- };
1107
- }
1108
- function normalizeParticipantList(raw) {
1109
- const entries = Array.isArray(raw) ? raw : readParticipantEntries(asRecord$1(raw)) ?? [];
1110
- if (entries.length === 0) return [];
1111
- const seen = /* @__PURE__ */ new Set();
1112
- const output = [];
1113
- for (const entry of entries) {
1114
- const normalized = normalizeParticipantEntry(entry);
1115
- if (!normalized?.id) continue;
1116
- const key = normalized.id.toLowerCase();
1117
- if (seen.has(key)) continue;
1118
- seen.add(key);
1119
- output.push(normalized);
1120
- }
1121
- return output;
1122
- }
1123
- function formatGroupMembers(params) {
1124
- const seen = /* @__PURE__ */ new Set();
1125
- const ordered = [];
1126
- for (const entry of params.participants ?? []) {
1127
- if (!entry?.id) continue;
1128
- const key = entry.id.toLowerCase();
1129
- if (seen.has(key)) continue;
1130
- seen.add(key);
1131
- ordered.push(entry);
1132
- }
1133
- if (ordered.length === 0 && params.fallback?.id) ordered.push(params.fallback);
1134
- if (ordered.length === 0) return;
1135
- return ordered.map((entry) => entry.name ? `${entry.name} (${entry.id})` : entry.id).join(", ");
1136
- }
1137
- function resolveGroupFlagFromChatGuid(chatGuid) {
1138
- const guid = chatGuid?.trim();
1139
- if (!guid) return;
1140
- const parts = guid.split(";");
1141
- if (parts.length >= 3) {
1142
- if (parts[1] === "+") return true;
1143
- if (parts[1] === "-") return false;
1144
- }
1145
- if (guid.includes(";+;")) return true;
1146
- if (guid.includes(";-;")) return false;
1147
- }
1148
- function extractChatIdentifierFromChatGuid$1(chatGuid) {
1149
- const guid = chatGuid?.trim();
1150
- if (!guid) return;
1151
- const parts = guid.split(";");
1152
- if (parts.length < 3) return;
1153
- return parts[2]?.trim() || void 0;
1154
- }
1155
- function formatGroupAllowlistEntry(params) {
1156
- const guid = params.chatGuid?.trim();
1157
- if (guid) return `chat_guid:${guid}`;
1158
- const chatId = params.chatId;
1159
- if (typeof chatId === "number" && Number.isFinite(chatId)) return `chat_id:${chatId}`;
1160
- const identifier = params.chatIdentifier?.trim();
1161
- if (identifier) return `chat_identifier:${identifier}`;
1162
- return null;
1163
- }
1164
- const REACTION_TYPE_MAP = new Map([
1165
- [2e3, {
1166
- emoji: "❤️",
1167
- action: "added"
1168
- }],
1169
- [2001, {
1170
- emoji: "👍",
1171
- action: "added"
1172
- }],
1173
- [2002, {
1174
- emoji: "👎",
1175
- action: "added"
1176
- }],
1177
- [2003, {
1178
- emoji: "😂",
1179
- action: "added"
1180
- }],
1181
- [2004, {
1182
- emoji: "‼️",
1183
- action: "added"
1184
- }],
1185
- [2005, {
1186
- emoji: "❓",
1187
- action: "added"
1188
- }],
1189
- [3e3, {
1190
- emoji: "❤️",
1191
- action: "removed"
1192
- }],
1193
- [3001, {
1194
- emoji: "👍",
1195
- action: "removed"
1196
- }],
1197
- [3002, {
1198
- emoji: "👎",
1199
- action: "removed"
1200
- }],
1201
- [3003, {
1202
- emoji: "😂",
1203
- action: "removed"
1204
- }],
1205
- [3004, {
1206
- emoji: "‼️",
1207
- action: "removed"
1208
- }],
1209
- [3005, {
1210
- emoji: "❓",
1211
- action: "removed"
1212
- }]
1213
- ]);
1214
- const TAPBACK_TEXT_MAP = new Map([
1215
- ["loved", {
1216
- emoji: "❤️",
1217
- action: "added"
1218
- }],
1219
- ["liked", {
1220
- emoji: "👍",
1221
- action: "added"
1222
- }],
1223
- ["disliked", {
1224
- emoji: "👎",
1225
- action: "added"
1226
- }],
1227
- ["laughed at", {
1228
- emoji: "😂",
1229
- action: "added"
1230
- }],
1231
- ["emphasized", {
1232
- emoji: "‼️",
1233
- action: "added"
1234
- }],
1235
- ["questioned", {
1236
- emoji: "❓",
1237
- action: "added"
1238
- }],
1239
- ["removed a heart from", {
1240
- emoji: "❤️",
1241
- action: "removed"
1242
- }],
1243
- ["removed a like from", {
1244
- emoji: "👍",
1245
- action: "removed"
1246
- }],
1247
- ["removed a dislike from", {
1248
- emoji: "👎",
1249
- action: "removed"
1250
- }],
1251
- ["removed a laugh from", {
1252
- emoji: "😂",
1253
- action: "removed"
1254
- }],
1255
- ["removed an emphasis from", {
1256
- emoji: "‼️",
1257
- action: "removed"
1258
- }],
1259
- ["removed a question from", {
1260
- emoji: "❓",
1261
- action: "removed"
1262
- }]
1263
- ]);
1264
- const TAPBACK_EMOJI_REGEX = /(?:\p{Regional_Indicator}{2})|(?:[0-9#*]\uFE0F?\u20E3)|(?:\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?(?:\p{Emoji_Modifier})?(?:\u200D\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?(?:\p{Emoji_Modifier})?)*)/u;
1265
- function extractFirstEmoji(text) {
1266
- const match = text.match(TAPBACK_EMOJI_REGEX);
1267
- return match ? match[0] : null;
1268
- }
1269
- function extractQuotedTapbackText(text) {
1270
- const match = text.match(/[“"]([^”"]+)[”"]/s);
1271
- return match ? match[1] : null;
1272
- }
1273
- function isTapbackAssociatedType(type) {
1274
- return typeof type === "number" && Number.isFinite(type) && type >= 2e3 && type < 4e3;
1275
- }
1276
- function resolveTapbackActionHint(type) {
1277
- if (typeof type !== "number" || !Number.isFinite(type)) return;
1278
- if (type >= 3e3 && type < 4e3) return "removed";
1279
- if (type >= 2e3 && type < 3e3) return "added";
1280
- }
1281
- function resolveTapbackContext(message) {
1282
- const associatedType = message.associatedMessageType;
1283
- const hasTapbackType = isTapbackAssociatedType(associatedType);
1284
- const hasTapbackMarker = Boolean(message.associatedMessageEmoji) || Boolean(message.isTapback);
1285
- if (!hasTapbackType && !hasTapbackMarker) return null;
1286
- const replyToId = message.associatedMessageGuid?.trim() || message.replyToId?.trim() || void 0;
1287
- const actionHint = resolveTapbackActionHint(associatedType);
1288
- return {
1289
- emojiHint: message.associatedMessageEmoji?.trim() || REACTION_TYPE_MAP.get(associatedType ?? -1)?.emoji,
1290
- actionHint,
1291
- replyToId
1292
- };
1293
- }
1294
- function parseTapbackText(params) {
1295
- const trimmed = params.text.trim();
1296
- const lower = trimmed.toLowerCase();
1297
- if (!trimmed) return null;
1298
- const parseLeadingReactionAction = (prefix, defaultAction) => {
1299
- if (!lower.startsWith(prefix)) return null;
1300
- const emoji = extractFirstEmoji(trimmed) ?? params.emojiHint;
1301
- if (!emoji) return null;
1302
- const quotedText = extractQuotedTapbackText(trimmed);
1303
- if (params.requireQuoted && !quotedText) return null;
1304
- const fallback = trimmed.slice(prefix.length).trim();
1305
- return {
1306
- emoji,
1307
- action: params.actionHint ?? defaultAction,
1308
- quotedText: quotedText ?? fallback
1309
- };
1310
- };
1311
- for (const [pattern, { emoji, action }] of TAPBACK_TEXT_MAP) if (lower.startsWith(pattern)) {
1312
- const afterPattern = trimmed.slice(pattern.length).trim();
1313
- if (params.requireQuoted) {
1314
- const strictMatch = afterPattern.match(/^[“"](.+)[”"]$/s);
1315
- if (!strictMatch) return null;
1316
- return {
1317
- emoji,
1318
- action,
1319
- quotedText: strictMatch[1]
1320
- };
1321
- }
1322
- return {
1323
- emoji,
1324
- action,
1325
- quotedText: extractQuotedTapbackText(afterPattern) ?? extractQuotedTapbackText(trimmed) ?? afterPattern
1326
- };
1327
- }
1328
- const reacted = parseLeadingReactionAction("reacted", "added");
1329
- if (reacted) return reacted;
1330
- const removed = parseLeadingReactionAction("removed", "removed");
1331
- if (removed) return removed;
1332
- return null;
1333
- }
1334
- function extractMessagePayload(payload) {
1335
- const parseRecord = (value) => {
1336
- const record = asRecord$1(value);
1337
- if (record) return record;
1338
- if (Array.isArray(value)) {
1339
- for (const entry of value) {
1340
- const parsedEntry = parseRecord(entry);
1341
- if (parsedEntry) return parsedEntry;
1342
- }
1343
- return null;
1344
- }
1345
- if (typeof value !== "string") return null;
1346
- const trimmed = value.trim();
1347
- if (!trimmed) return null;
1348
- try {
1349
- return parseRecord(JSON.parse(trimmed));
1350
- } catch {
1351
- return null;
1352
- }
1353
- };
1354
- const data = parseRecord(payload.data ?? payload.payload ?? payload.event);
1355
- const message = parseRecord(payload.message ?? data?.message ?? data);
1356
- if (message) return message;
1357
- return null;
1358
- }
1359
- function normalizeWebhookMessage(payload) {
1360
- const message = extractMessagePayload(payload);
1361
- if (!message) return null;
1362
- const text = readString(message, "text") ?? readString(message, "body") ?? readString(message, "subject") ?? "";
1363
- const { senderId, senderIdExplicit, senderName } = extractSenderInfo(message);
1364
- const { chatGuid, chatIdentifier, chatId, chatName, isGroup, participants } = extractChatContext(message);
1365
- const normalizedParticipants = normalizeParticipantList(participants);
1366
- const fromMe = readBoolean(message, "isFromMe") ?? readBoolean(message, "is_from_me");
1367
- const messageId = readString(message, "guid") ?? readString(message, "id") ?? readString(message, "messageId") ?? void 0;
1368
- const balloonBundleId = readString(message, "balloonBundleId");
1369
- const associatedMessageGuid = readString(message, "associatedMessageGuid") ?? readString(message, "associated_message_guid") ?? readString(message, "associatedMessageId") ?? void 0;
1370
- const associatedMessageType = readNumberLike(message, "associatedMessageType") ?? readNumberLike(message, "associated_message_type");
1371
- const associatedMessageEmoji = readString(message, "associatedMessageEmoji") ?? readString(message, "associated_message_emoji") ?? readString(message, "reactionEmoji") ?? readString(message, "reaction_emoji") ?? void 0;
1372
- const isTapback = readBoolean(message, "isTapback") ?? readBoolean(message, "is_tapback") ?? readBoolean(message, "tapback") ?? void 0;
1373
- const timestampRaw = readNumber(message, "date") ?? readNumber(message, "dateCreated") ?? readNumber(message, "timestamp");
1374
- const timestamp = typeof timestampRaw === "number" ? timestampRaw > 0xe8d4a51000 ? timestampRaw : timestampRaw * 1e3 : void 0;
1375
- const senderFallbackFromChatGuid = !senderIdExplicit && !isGroup && chatGuid ? extractHandleFromChatGuid(chatGuid) : null;
1376
- const normalizedSender = normalizeBlueBubblesHandle(senderId || senderFallbackFromChatGuid || "");
1377
- if (!normalizedSender) return null;
1378
- const replyMetadata = extractReplyMetadata(message);
1379
- return {
1380
- text,
1381
- senderId: normalizedSender,
1382
- senderIdExplicit,
1383
- senderName,
1384
- messageId,
1385
- timestamp,
1386
- isGroup,
1387
- chatId,
1388
- chatGuid,
1389
- chatIdentifier,
1390
- chatName,
1391
- fromMe,
1392
- attachments: extractAttachments(message),
1393
- balloonBundleId,
1394
- associatedMessageGuid,
1395
- associatedMessageType,
1396
- associatedMessageEmoji,
1397
- isTapback,
1398
- participants: normalizedParticipants,
1399
- replyToId: replyMetadata.replyToId,
1400
- replyToBody: replyMetadata.replyToBody,
1401
- replyToSender: replyMetadata.replyToSender
1402
- };
1403
- }
1404
- function normalizeWebhookReaction(payload) {
1405
- const message = extractMessagePayload(payload);
1406
- if (!message) return null;
1407
- const associatedGuid = readString(message, "associatedMessageGuid") ?? readString(message, "associated_message_guid") ?? readString(message, "associatedMessageId");
1408
- const associatedType = readNumberLike(message, "associatedMessageType") ?? readNumberLike(message, "associated_message_type");
1409
- if (!associatedGuid || associatedType === void 0) return null;
1410
- const mapping = REACTION_TYPE_MAP.get(associatedType);
1411
- const emoji = ((readString(message, "associatedMessageEmoji") ?? readString(message, "associated_message_emoji") ?? readString(message, "reactionEmoji") ?? readString(message, "reaction_emoji"))?.trim() || mapping?.emoji) ?? `reaction:${associatedType}`;
1412
- const action = mapping?.action ?? resolveTapbackActionHint(associatedType) ?? "added";
1413
- const { senderId, senderIdExplicit, senderName } = extractSenderInfo(message);
1414
- const { chatGuid, chatIdentifier, chatId, chatName, isGroup } = extractChatContext(message);
1415
- const fromMe = readBoolean(message, "isFromMe") ?? readBoolean(message, "is_from_me");
1416
- const timestampRaw = readNumberLike(message, "date") ?? readNumberLike(message, "dateCreated") ?? readNumberLike(message, "timestamp");
1417
- const timestamp = typeof timestampRaw === "number" ? timestampRaw > 0xe8d4a51000 ? timestampRaw : timestampRaw * 1e3 : void 0;
1418
- const senderFallbackFromChatGuid = !senderIdExplicit && !isGroup && chatGuid ? extractHandleFromChatGuid(chatGuid) : null;
1419
- const normalizedSender = normalizeBlueBubblesHandle(senderId || senderFallbackFromChatGuid || "");
1420
- if (!normalizedSender) return null;
1421
- return {
1422
- action,
1423
- emoji,
1424
- senderId: normalizedSender,
1425
- senderIdExplicit,
1426
- senderName,
1427
- messageId: associatedGuid,
1428
- timestamp,
1429
- isGroup,
1430
- chatId,
1431
- chatGuid,
1432
- chatIdentifier,
1433
- chatName,
1434
- fromMe
1435
- };
1436
- }
1437
- //#endregion
1438
- //#region extensions/bluebubbles/src/conversation-route.ts
1439
- function resolveBlueBubblesConversationRoute(params) {
1440
- let route = resolveAgentRoute({
1441
- cfg: params.cfg,
1442
- channel: "bluebubbles",
1443
- accountId: params.accountId,
1444
- peer: {
1445
- kind: params.isGroup ? "group" : "direct",
1446
- id: params.peerId
1447
- }
1448
- });
1449
- const conversationId = resolveBlueBubblesInboundConversationId({
1450
- isGroup: params.isGroup,
1451
- sender: params.sender,
1452
- chatId: params.chatId,
1453
- chatGuid: params.chatGuid,
1454
- chatIdentifier: params.chatIdentifier
1455
- });
1456
- if (!conversationId) return route;
1457
- route = resolveConfiguredBindingRoute({
1458
- cfg: params.cfg,
1459
- route,
1460
- conversation: {
1461
- channel: "bluebubbles",
1462
- accountId: params.accountId,
1463
- conversationId
1464
- }
1465
- }).route;
1466
- const runtimeBinding = getSessionBindingService().resolveByConversation({
1467
- channel: "bluebubbles",
1468
- accountId: params.accountId,
1469
- conversationId
1470
- });
1471
- const boundSessionKey = runtimeBinding?.targetSessionKey?.trim();
1472
- if (!runtimeBinding || !boundSessionKey) return route;
1473
- getSessionBindingService().touch(runtimeBinding.bindingId);
1474
- if (isPluginOwnedSessionBindingRecord(runtimeBinding)) {
1475
- logVerbose$1(`bluebubbles: plugin-bound conversation ${conversationId}`);
1476
- return route;
1477
- }
1478
- logVerbose$1(`bluebubbles: routed via bound conversation ${conversationId} -> ${boundSessionKey}`);
1479
- return {
1480
- ...route,
1481
- sessionKey: boundSessionKey,
1482
- agentId: resolveAgentIdFromSessionKey(boundSessionKey),
1483
- lastRoutePolicy: deriveLastRoutePolicy({
1484
- sessionKey: boundSessionKey,
1485
- mainSessionKey: route.mainSessionKey
1486
- }),
1487
- matchedBy: "binding.channel"
1488
- };
1489
- }
1490
- //#endregion
1491
- //#region extensions/bluebubbles/src/history.ts
1492
- function resolveAccount$1(params) {
1493
- return resolveBlueBubblesServerAccount(params);
1494
- }
1495
- const MAX_HISTORY_FETCH_LIMIT = 100;
1496
- const HISTORY_SCAN_MULTIPLIER = 8;
1497
- const MAX_HISTORY_SCAN_MESSAGES = 500;
1498
- const MAX_HISTORY_BODY_CHARS = 2e3;
1499
- function clampHistoryLimit(limit) {
1500
- if (!Number.isFinite(limit)) return 0;
1501
- const normalized = Math.floor(limit);
1502
- if (normalized <= 0) return 0;
1503
- return Math.min(normalized, MAX_HISTORY_FETCH_LIMIT);
1504
- }
1505
- function truncateHistoryBody$1(text) {
1506
- if (text.length <= MAX_HISTORY_BODY_CHARS) return text;
1507
- return `${text.slice(0, MAX_HISTORY_BODY_CHARS).trimEnd()}...`;
1508
- }
1509
- /**
1510
- * Fetch message history from BlueBubbles API for a specific chat.
1511
- * This provides the initial backfill for both group chats and DMs.
1512
- */
1513
- async function fetchBlueBubblesHistory(chatIdentifier, limit, opts = {}) {
1514
- const effectiveLimit = clampHistoryLimit(limit);
1515
- if (!chatIdentifier.trim() || effectiveLimit <= 0) return {
1516
- entries: [],
1517
- resolved: true
1518
- };
1519
- let baseUrl;
1520
- let password;
1521
- let allowPrivateNetwork = false;
1522
- try {
1523
- ({baseUrl, password, allowPrivateNetwork} = resolveAccount$1(opts));
1524
- } catch {
1525
- return {
1526
- entries: [],
1527
- resolved: false
1528
- };
1529
- }
1530
- const ssrfPolicy = allowPrivateNetwork ? { allowPrivateNetwork: true } : {};
1531
- const possiblePaths = [
1532
- `/api/v1/chat/${encodeURIComponent(chatIdentifier)}/messages?limit=${effectiveLimit}&sort=DESC`,
1533
- `/api/v1/messages?chatGuid=${encodeURIComponent(chatIdentifier)}&limit=${effectiveLimit}`,
1534
- `/api/v1/chat/${encodeURIComponent(chatIdentifier)}/message?limit=${effectiveLimit}`
1535
- ];
1536
- for (const path of possiblePaths) try {
1537
- const res = await blueBubblesFetchWithTimeout(buildBlueBubblesApiUrl({
1538
- baseUrl,
1539
- path,
1540
- password
1541
- }), { method: "GET" }, opts.timeoutMs ?? 1e4, ssrfPolicy);
1542
- if (!res.ok) continue;
1543
- const data = await res.json().catch(() => null);
1544
- if (!data) continue;
1545
- let messages = [];
1546
- if (Array.isArray(data)) messages = data;
1547
- else if (data.data && Array.isArray(data.data)) messages = data.data;
1548
- else if (data.messages && Array.isArray(data.messages)) messages = data.messages;
1549
- else continue;
1550
- const historyEntries = [];
1551
- const maxScannedMessages = Math.min(Math.max(effectiveLimit * HISTORY_SCAN_MULTIPLIER, effectiveLimit), MAX_HISTORY_SCAN_MESSAGES);
1552
- for (let i = 0; i < messages.length && i < maxScannedMessages; i++) {
1553
- const msg = messages[i];
1554
- const text = msg.text?.trim();
1555
- if (!text) continue;
1556
- const sender = msg.is_from_me ? "me" : msg.sender?.display_name || msg.sender?.address || msg.handle_id || "Unknown";
1557
- const timestamp = msg.date_created || msg.date_delivered;
1558
- historyEntries.push({
1559
- sender,
1560
- body: truncateHistoryBody$1(text),
1561
- timestamp,
1562
- messageId: msg.guid
1563
- });
1564
- }
1565
- historyEntries.sort((a, b) => {
1566
- return (a.timestamp || 0) - (b.timestamp || 0);
1567
- });
1568
- return {
1569
- entries: historyEntries.slice(0, effectiveLimit),
1570
- resolved: true
1571
- };
1572
- } catch (error) {
1573
- continue;
1574
- }
1575
- return {
1576
- entries: [],
1577
- resolved: false
1578
- };
1579
- }
1580
- //#endregion
1581
- //#region extensions/bluebubbles/src/local-file-access.ts
1582
- function isLocalFileUrlHost(hostname) {
1583
- return hostname === "" || hostname.toLowerCase() === "localhost";
1584
- }
1585
- function assertNoWindowsNetworkPath(filePath, label = "Path") {
1586
- if (process.platform !== "win32") return;
1587
- const normalized = filePath.replace(/\//g, "\\");
1588
- if (normalized.startsWith("\\\\?\\UNC\\") || normalized.startsWith("\\\\")) throw new Error(`${label} cannot use Windows network paths: ${filePath}`);
1589
- }
1590
- function safeFileURLToPath(fileUrl) {
1591
- let parsed;
1592
- try {
1593
- parsed = new URL$1(fileUrl);
1594
- } catch {
1595
- throw new Error(`Invalid file:// URL: ${fileUrl}`);
1596
- }
1597
- if (parsed.protocol !== "file:") throw new Error(`Invalid file:// URL: ${fileUrl}`);
1598
- if (!isLocalFileUrlHost(parsed.hostname)) throw new Error(`file:// URLs with remote hosts are not allowed: ${fileUrl}`);
1599
- const filePath = fileURLToPath(parsed);
1600
- assertNoWindowsNetworkPath(filePath, "Local file URL");
1601
- return filePath;
1602
- }
1603
- function trySafeFileURLToPath(fileUrl) {
1604
- try {
1605
- return safeFileURLToPath(fileUrl);
1606
- } catch {
1607
- return;
1608
- }
1609
- }
1610
- function basenameFromMediaSource(source) {
1611
- if (!source) return;
1612
- if (source.startsWith("file://")) {
1613
- const filePath = trySafeFileURLToPath(source);
1614
- return filePath ? path.basename(filePath) || void 0 : void 0;
1615
- }
1616
- if (/^https?:\/\//i.test(source)) try {
1617
- return path.basename(new URL$1(source).pathname) || void 0;
1618
- } catch {
1619
- return;
1620
- }
1621
- return path.basename(source) || void 0;
1622
- }
1623
- //#endregion
1624
- //#region extensions/bluebubbles/src/media-send.ts
1625
- const HTTP_URL_RE = /^https?:\/\//i;
1626
- const MB = 1024 * 1024;
1627
- function assertMediaWithinLimit(sizeBytes, maxBytes) {
1628
- if (typeof maxBytes !== "number" || maxBytes <= 0) return;
1629
- if (sizeBytes <= maxBytes) return;
1630
- const maxLabel = (maxBytes / MB).toFixed(0);
1631
- const sizeLabel = (sizeBytes / MB).toFixed(2);
1632
- throw new Error(`Media exceeds ${maxLabel}MB limit (got ${sizeLabel}MB)`);
1633
- }
1634
- function resolveLocalMediaPath(source) {
1635
- if (!source.startsWith("file://")) return source;
1636
- try {
1637
- return safeFileURLToPath(source);
1638
- } catch {
1639
- throw new Error(`Invalid file:// URL: ${source}`);
1640
- }
1641
- }
1642
- function expandHomePath(input) {
1643
- if (input === "~") return os.homedir();
1644
- if (input.startsWith("~/") || input.startsWith(`~${path.sep}`)) return path.join(os.homedir(), input.slice(2));
1645
- return input;
1646
- }
1647
- function resolveConfiguredPath(input) {
1648
- const trimmed = input.trim();
1649
- if (!trimmed) throw new Error("Empty mediaLocalRoots entry is not allowed");
1650
- if (trimmed.startsWith("file://")) try {
1651
- return safeFileURLToPath(trimmed);
1652
- } catch {
1653
- throw new Error(`Invalid file:// URL in mediaLocalRoots: ${input}`);
1654
- }
1655
- const resolved = expandHomePath(trimmed);
1656
- if (!path.isAbsolute(resolved)) throw new Error(`mediaLocalRoots entries must be absolute paths: ${input}`);
1657
- return resolved;
1658
- }
1659
- function isPathInsideRoot(candidate, root) {
1660
- const normalizedCandidate = path.normalize(candidate);
1661
- const normalizedRoot = path.normalize(root);
1662
- const rootWithSep = normalizedRoot.endsWith(path.sep) ? normalizedRoot : normalizedRoot + path.sep;
1663
- if (process.platform === "win32") {
1664
- const candidateLower = normalizedCandidate.toLowerCase();
1665
- const rootLower = normalizedRoot.toLowerCase();
1666
- const rootWithSepLower = rootWithSep.toLowerCase();
1667
- return candidateLower === rootLower || candidateLower.startsWith(rootWithSepLower);
1668
- }
1669
- return normalizedCandidate === normalizedRoot || normalizedCandidate.startsWith(rootWithSep);
1670
- }
1671
- function resolveMediaLocalRoots(params) {
1672
- return (resolveBlueBubblesAccount({
1673
- cfg: params.cfg,
1674
- accountId: params.accountId
1675
- }).config.mediaLocalRoots ?? []).map((entry) => entry.trim()).filter((entry) => entry.length > 0);
1676
- }
1677
- async function assertLocalMediaPathAllowed(params) {
1678
- if (params.localRoots.length === 0) throw new Error(`Local BlueBubbles media paths are disabled by default. Set channels.bluebubbles.mediaLocalRoots${params.accountId ? ` or channels.bluebubbles.accounts.${params.accountId}.mediaLocalRoots` : ""} to explicitly allow local file directories.`);
1679
- const resolvedLocalPath = path.resolve(params.localPath);
1680
- const supportsNoFollow = process.platform !== "win32" && "O_NOFOLLOW" in constants;
1681
- const openFlags = constants.O_RDONLY | (supportsNoFollow ? constants.O_NOFOLLOW : 0);
1682
- for (const rootEntry of params.localRoots) {
1683
- const resolvedRootInput = resolveConfiguredPath(rootEntry);
1684
- const relativeToRoot = path.relative(resolvedRootInput, resolvedLocalPath);
1685
- if (relativeToRoot.startsWith("..") || path.isAbsolute(relativeToRoot) || relativeToRoot === "") continue;
1686
- let rootReal;
1687
- try {
1688
- rootReal = await fs.realpath(resolvedRootInput);
1689
- } catch {
1690
- rootReal = path.resolve(resolvedRootInput);
1691
- }
1692
- const candidatePath = path.resolve(rootReal, relativeToRoot);
1693
- if (!isPathInsideRoot(candidatePath, rootReal)) continue;
1694
- let handle = null;
1695
- try {
1696
- handle = await fs.open(candidatePath, openFlags);
1697
- const realPath = await fs.realpath(candidatePath);
1698
- if (!isPathInsideRoot(realPath, rootReal)) continue;
1699
- const stat = await handle.stat();
1700
- if (!stat.isFile()) continue;
1701
- const realStat = await fs.stat(realPath);
1702
- if (stat.ino !== realStat.ino || stat.dev !== realStat.dev) continue;
1703
- return {
1704
- data: await handle.readFile(),
1705
- realPath,
1706
- sizeBytes: stat.size
1707
- };
1708
- } catch {
1709
- continue;
1710
- } finally {
1711
- if (handle) await handle.close().catch(() => {});
1712
- }
1713
- }
1714
- throw new Error(`Local media path is not under any configured mediaLocalRoots entry: ${params.localPath}`);
1715
- }
1716
- function resolveFilenameFromSource(source) {
1717
- return basenameFromMediaSource(source);
1718
- }
1719
- async function sendBlueBubblesMedia(params) {
1720
- const { cfg, to, mediaUrl, mediaPath, mediaBuffer, contentType, filename, caption, replyToId, accountId, asVoice } = params;
1721
- const core = getBlueBubblesRuntime();
1722
- const maxBytes = resolveChannelMediaMaxBytes({
1723
- cfg,
1724
- resolveChannelLimitMb: ({ cfg, accountId }) => cfg.channels?.bluebubbles?.accounts?.[accountId]?.mediaMaxMb ?? cfg.channels?.bluebubbles?.mediaMaxMb,
1725
- accountId
1726
- });
1727
- const mediaLocalRoots = resolveMediaLocalRoots({
1728
- cfg,
1729
- accountId
1730
- });
1731
- let buffer;
1732
- let resolvedContentType = contentType ?? void 0;
1733
- let resolvedFilename = filename ?? void 0;
1734
- if (mediaBuffer) {
1735
- assertMediaWithinLimit(mediaBuffer.byteLength, maxBytes);
1736
- buffer = mediaBuffer;
1737
- if (!resolvedContentType) {
1738
- const hint = mediaPath ?? mediaUrl;
1739
- resolvedContentType = await core.media.detectMime({
1740
- buffer: Buffer.isBuffer(mediaBuffer) ? mediaBuffer : Buffer.from(mediaBuffer),
1741
- filePath: hint
1742
- }) ?? void 0;
1743
- }
1744
- if (!resolvedFilename) resolvedFilename = resolveFilenameFromSource(mediaPath ?? mediaUrl);
1745
- } else {
1746
- const source = mediaPath ?? mediaUrl;
1747
- if (!source) throw new Error("BlueBubbles media delivery requires mediaUrl, mediaPath, or mediaBuffer.");
1748
- if (HTTP_URL_RE.test(source)) {
1749
- const fetched = await core.channel.media.fetchRemoteMedia({
1750
- url: source,
1751
- maxBytes: typeof maxBytes === "number" && maxBytes > 0 ? maxBytes : void 0
1752
- });
1753
- buffer = fetched.buffer;
1754
- resolvedContentType = resolvedContentType ?? fetched.contentType ?? void 0;
1755
- resolvedFilename = resolvedFilename ?? fetched.fileName;
1756
- } else {
1757
- const localFile = await assertLocalMediaPathAllowed({
1758
- localPath: expandHomePath(resolveLocalMediaPath(source)),
1759
- localRoots: mediaLocalRoots,
1760
- accountId
1761
- });
1762
- if (typeof maxBytes === "number" && maxBytes > 0) assertMediaWithinLimit(localFile.sizeBytes, maxBytes);
1763
- const data = localFile.data;
1764
- assertMediaWithinLimit(data.byteLength, maxBytes);
1765
- buffer = new Uint8Array(data);
1766
- if (!resolvedContentType) resolvedContentType = await core.media.detectMime({
1767
- buffer: data,
1768
- filePath: localFile.realPath
1769
- }) ?? void 0;
1770
- if (!resolvedFilename) resolvedFilename = resolveFilenameFromSource(localFile.realPath);
1771
- }
1772
- }
1773
- const replyToMessageGuid = replyToId?.trim() ? resolveBlueBubblesMessageId(replyToId.trim(), { requireKnownShortId: true }) : void 0;
1774
- const attachmentResult = await sendBlueBubblesAttachment({
1775
- to,
1776
- buffer,
1777
- filename: resolvedFilename ?? "attachment",
1778
- contentType: resolvedContentType ?? void 0,
1779
- replyToMessageGuid,
1780
- asVoice,
1781
- opts: {
1782
- cfg,
1783
- accountId
1784
- }
1785
- });
1786
- const trimmedCaption = caption?.trim();
1787
- if (trimmedCaption) await sendMessageBlueBubbles(to, trimmedCaption, {
1788
- cfg,
1789
- accountId,
1790
- replyToMessageGuid
1791
- });
1792
- return attachmentResult;
1793
- }
1794
- //#endregion
1795
- //#region extensions/bluebubbles/src/monitor-reply-cache.ts
1796
- const REPLY_CACHE_MAX = 2e3;
1797
- const REPLY_CACHE_TTL_MS = 360 * 60 * 1e3;
1798
- const blueBubblesReplyCacheByMessageId = /* @__PURE__ */ new Map();
1799
- const blueBubblesShortIdToUuid = /* @__PURE__ */ new Map();
1800
- const blueBubblesUuidToShortId = /* @__PURE__ */ new Map();
1801
- let blueBubblesShortIdCounter = 0;
1802
- function trimOrUndefined$2(value) {
1803
- const trimmed = value?.trim();
1804
- return trimmed ? trimmed : void 0;
1805
- }
1806
- function generateShortId() {
1807
- blueBubblesShortIdCounter += 1;
1808
- return String(blueBubblesShortIdCounter);
1809
- }
1810
- function rememberBlueBubblesReplyCache(entry) {
1811
- const messageId = entry.messageId.trim();
1812
- if (!messageId) return {
1813
- ...entry,
1814
- shortId: ""
1815
- };
1816
- let shortId = blueBubblesUuidToShortId.get(messageId);
1817
- if (!shortId) {
1818
- shortId = generateShortId();
1819
- blueBubblesShortIdToUuid.set(shortId, messageId);
1820
- blueBubblesUuidToShortId.set(messageId, shortId);
1821
- }
1822
- const fullEntry = {
1823
- ...entry,
1824
- messageId,
1825
- shortId
1826
- };
1827
- blueBubblesReplyCacheByMessageId.delete(messageId);
1828
- blueBubblesReplyCacheByMessageId.set(messageId, fullEntry);
1829
- const cutoff = Date.now() - REPLY_CACHE_TTL_MS;
1830
- for (const [key, value] of blueBubblesReplyCacheByMessageId) {
1831
- if (value.timestamp < cutoff) {
1832
- blueBubblesReplyCacheByMessageId.delete(key);
1833
- if (value.shortId) {
1834
- blueBubblesShortIdToUuid.delete(value.shortId);
1835
- blueBubblesUuidToShortId.delete(key);
1836
- }
1837
- continue;
1838
- }
1839
- break;
1840
- }
1841
- while (blueBubblesReplyCacheByMessageId.size > REPLY_CACHE_MAX) {
1842
- const oldest = blueBubblesReplyCacheByMessageId.keys().next().value;
1843
- if (!oldest) break;
1844
- const oldEntry = blueBubblesReplyCacheByMessageId.get(oldest);
1845
- blueBubblesReplyCacheByMessageId.delete(oldest);
1846
- if (oldEntry?.shortId) {
1847
- blueBubblesShortIdToUuid.delete(oldEntry.shortId);
1848
- blueBubblesUuidToShortId.delete(oldest);
1849
- }
1850
- }
1851
- return fullEntry;
1852
- }
1853
- /**
1854
- * Resolves a short message ID (e.g., "1", "2") to a full BlueBubbles GUID.
1855
- * Returns the input unchanged if it's already a GUID or not found in the mapping.
1856
- */
1857
- function resolveBlueBubblesMessageId(shortOrUuid, opts) {
1858
- const trimmed = shortOrUuid.trim();
1859
- if (!trimmed) return trimmed;
1860
- if (/^\d+$/.test(trimmed)) {
1861
- const uuid = blueBubblesShortIdToUuid.get(trimmed);
1862
- if (uuid) return uuid;
1863
- if (opts?.requireKnownShortId) throw new Error(`BlueBubbles short message id "${trimmed}" is no longer available. Use MessageSidFull.`);
1864
- }
1865
- return trimmed;
1866
- }
1867
- /**
1868
- * Gets the short ID for a message GUID, if one exists.
1869
- */
1870
- function getShortIdForUuid(uuid) {
1871
- return blueBubblesUuidToShortId.get(uuid.trim());
1872
- }
1873
- function resolveReplyContextFromCache(params) {
1874
- const replyToId = params.replyToId.trim();
1875
- if (!replyToId) return null;
1876
- const cached = blueBubblesReplyCacheByMessageId.get(replyToId);
1877
- if (!cached) return null;
1878
- if (cached.accountId !== params.accountId) return null;
1879
- const cutoff = Date.now() - REPLY_CACHE_TTL_MS;
1880
- if (cached.timestamp < cutoff) {
1881
- blueBubblesReplyCacheByMessageId.delete(replyToId);
1882
- return null;
1883
- }
1884
- const chatGuid = trimOrUndefined$2(params.chatGuid);
1885
- const chatIdentifier = trimOrUndefined$2(params.chatIdentifier);
1886
- const cachedChatGuid = trimOrUndefined$2(cached.chatGuid);
1887
- const cachedChatIdentifier = trimOrUndefined$2(cached.chatIdentifier);
1888
- const chatId = typeof params.chatId === "number" ? params.chatId : void 0;
1889
- const cachedChatId = typeof cached.chatId === "number" ? cached.chatId : void 0;
1890
- if (chatGuid && cachedChatGuid && chatGuid !== cachedChatGuid) return null;
1891
- if (!chatGuid && chatIdentifier && cachedChatIdentifier && chatIdentifier !== cachedChatIdentifier) return null;
1892
- if (!chatGuid && !chatIdentifier && chatId && cachedChatId && chatId !== cachedChatId) return null;
1893
- return cached;
1894
- }
1895
- //#endregion
1896
- //#region extensions/bluebubbles/src/monitor-self-chat-cache.ts
1897
- const SELF_CHAT_TTL_MS = 1e4;
1898
- const MAX_SELF_CHAT_CACHE_ENTRIES = 512;
1899
- const CLEANUP_MIN_INTERVAL_MS = 1e3;
1900
- const MAX_SELF_CHAT_BODY_CHARS = 32768;
1901
- const cache = /* @__PURE__ */ new Map();
1902
- let lastCleanupAt = 0;
1903
- function normalizeBody(body) {
1904
- if (!body) return null;
1905
- const normalized = (body.length > MAX_SELF_CHAT_BODY_CHARS ? body.slice(0, MAX_SELF_CHAT_BODY_CHARS) : body).replace(/\r\n?/g, "\n").trim();
1906
- return normalized ? normalized : null;
1907
- }
1908
- function isUsableTimestamp(timestamp) {
1909
- return typeof timestamp === "number" && Number.isFinite(timestamp);
1910
- }
1911
- function digestText(text) {
1912
- return createHash("sha256").update(text).digest("base64url");
1913
- }
1914
- function trimOrUndefined$1(value) {
1915
- const trimmed = value?.trim();
1916
- return trimmed ? trimmed : void 0;
1917
- }
1918
- function resolveCanonicalChatTarget(parts) {
1919
- const handleFromGuid = parts.chatGuid ? extractHandleFromChatGuid(parts.chatGuid) : null;
1920
- if (handleFromGuid) return handleFromGuid;
1921
- const normalizedIdentifier = normalizeBlueBubblesHandle(parts.chatIdentifier ?? "");
1922
- if (normalizedIdentifier) return normalizedIdentifier;
1923
- return trimOrUndefined$1(parts.chatGuid) ?? trimOrUndefined$1(parts.chatIdentifier) ?? (typeof parts.chatId === "number" ? String(parts.chatId) : null);
1924
- }
1925
- function buildScope(parts) {
1926
- const target = resolveCanonicalChatTarget(parts) ?? parts.senderId;
1927
- return `${parts.accountId}:${target}`;
1928
- }
1929
- function cleanupExpired(now = Date.now()) {
1930
- if (lastCleanupAt !== 0 && now >= lastCleanupAt && now - lastCleanupAt < CLEANUP_MIN_INTERVAL_MS) return;
1931
- lastCleanupAt = now;
1932
- for (const [key, seenAt] of cache.entries()) if (now - seenAt > SELF_CHAT_TTL_MS) cache.delete(key);
1933
- }
1934
- function enforceSizeCap() {
1935
- while (cache.size > MAX_SELF_CHAT_CACHE_ENTRIES) {
1936
- const oldestKey = cache.keys().next().value;
1937
- if (typeof oldestKey !== "string") break;
1938
- cache.delete(oldestKey);
1939
- }
1940
- }
1941
- function buildKey(lookup) {
1942
- const body = normalizeBody(lookup.body);
1943
- if (!body || !isUsableTimestamp(lookup.timestamp)) return null;
1944
- return `${buildScope(lookup)}:${lookup.timestamp}:${digestText(body)}`;
1945
- }
1946
- function rememberBlueBubblesSelfChatCopy(lookup) {
1947
- cleanupExpired();
1948
- const key = buildKey(lookup);
1949
- if (!key) return;
1950
- cache.set(key, Date.now());
1951
- enforceSizeCap();
1952
- }
1953
- function hasBlueBubblesSelfChatCopy(lookup) {
1954
- cleanupExpired();
1955
- const key = buildKey(lookup);
1956
- if (!key) return false;
1957
- const seenAt = cache.get(key);
1958
- return typeof seenAt === "number" && Date.now() - seenAt <= SELF_CHAT_TTL_MS;
1959
- }
1960
- //#endregion
1961
- //#region extensions/bluebubbles/src/participant-contact-names.ts
1962
- const execFileAsync = promisify(execFile);
1963
- const CONTACT_NAME_CACHE_TTL_MS = 3600 * 1e3;
1964
- const NEGATIVE_CONTACT_NAME_CACHE_TTL_MS = 300 * 1e3;
1965
- const MAX_PARTICIPANT_CONTACT_NAME_CACHE_ENTRIES = 2048;
1966
- const SQLITE_MAX_BUFFER = 8 * 1024 * 1024;
1967
- const SQLITE_PHONE_DIGITS_SQL = "REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(COALESCE(p.ZFULLNUMBER, ''), ' ', ''), '(', ''), ')', ''), '-', ''), '+', ''), '.', ''), '\n', ''), '\r', '')";
1968
- const participantContactNameCache = /* @__PURE__ */ new Map();
1969
- function normalizePhoneLookupKey(value) {
1970
- const digits = value.replace(/\D/g, "");
1971
- if (!digits) return null;
1972
- const normalized = digits.length === 11 && digits.startsWith("1") ? digits.slice(1) : digits;
1973
- return normalized.length >= 7 ? normalized : null;
1974
- }
1975
- function uniqueNormalizedPhoneLookupKeys(phoneKeys) {
1976
- const unique = /* @__PURE__ */ new Set();
1977
- for (const phoneKey of phoneKeys) {
1978
- const normalized = normalizePhoneLookupKey(phoneKey);
1979
- if (normalized) unique.add(normalized);
1980
- }
1981
- return [...unique];
1982
- }
1983
- function resolveParticipantPhoneLookupKey(participant) {
1984
- if (participant.id.includes("@")) return null;
1985
- return normalizePhoneLookupKey(participant.id);
1986
- }
1987
- function trimParticipantContactNameCache(now) {
1988
- for (const [phoneKey, entry] of participantContactNameCache) if (entry.expiresAt <= now) participantContactNameCache.delete(phoneKey);
1989
- while (participantContactNameCache.size > MAX_PARTICIPANT_CONTACT_NAME_CACHE_ENTRIES) {
1990
- const oldestPhoneKey = participantContactNameCache.keys().next().value;
1991
- if (!oldestPhoneKey) return;
1992
- participantContactNameCache.delete(oldestPhoneKey);
1993
- }
1994
- }
1995
- function readFreshCacheEntry(phoneKey, now) {
1996
- const cached = participantContactNameCache.get(phoneKey);
1997
- if (!cached) return null;
1998
- if (cached.expiresAt <= now) {
1999
- participantContactNameCache.delete(phoneKey);
2000
- return null;
2001
- }
2002
- participantContactNameCache.delete(phoneKey);
2003
- participantContactNameCache.set(phoneKey, cached);
2004
- return cached;
2005
- }
2006
- function writeCacheEntry(phoneKey, name, now) {
2007
- participantContactNameCache.delete(phoneKey);
2008
- participantContactNameCache.set(phoneKey, {
2009
- name,
2010
- expiresAt: now + (name ? CONTACT_NAME_CACHE_TTL_MS : NEGATIVE_CONTACT_NAME_CACHE_TTL_MS)
2011
- });
2012
- trimParticipantContactNameCache(now);
2013
- }
2014
- function buildAddressBookSourcesDir(homeDir) {
2015
- const trimmedHomeDir = homeDir?.trim();
2016
- if (!trimmedHomeDir) return null;
2017
- return join(trimmedHomeDir, "Library", "Application Support", "AddressBook", "Sources");
2018
- }
2019
- async function fileExists(path, deps) {
2020
- try {
2021
- await deps.access(path);
2022
- return true;
2023
- } catch {
2024
- return false;
2025
- }
2026
- }
2027
- async function listContactsDatabases(deps) {
2028
- const sourcesDir = buildAddressBookSourcesDir(deps.homeDir);
2029
- if (!sourcesDir) return [];
2030
- let entries = [];
2031
- try {
2032
- entries = await deps.readdir(sourcesDir);
2033
- } catch {
2034
- return [];
2035
- }
2036
- const databases = [];
2037
- for (const entry of entries) {
2038
- const dbPath = join(sourcesDir, entry, "AddressBook-v22.abcddb");
2039
- if (await fileExists(dbPath, deps)) databases.push(dbPath);
2040
- }
2041
- return databases;
2042
- }
2043
- function buildSqlitePhoneKeyList(phoneKeys) {
2044
- return uniqueNormalizedPhoneLookupKeys(phoneKeys).map((phoneKey) => `'${phoneKey}'`).join(", ");
2045
- }
2046
- async function queryContactsDatabase(dbPath, phoneKeys, deps) {
2047
- const sqlitePhoneKeyList = buildSqlitePhoneKeyList(phoneKeys);
2048
- if (!sqlitePhoneKeyList) return [];
2049
- const sql = `
2050
- SELECT digits, name
2051
- FROM (
2052
- SELECT
2053
- ${SQLITE_PHONE_DIGITS_SQL} AS digits,
2054
- TRIM(
2055
- CASE
2056
- WHEN TRIM(COALESCE(r.ZFIRSTNAME, '') || ' ' || COALESCE(r.ZLASTNAME, '')) != ''
2057
- THEN TRIM(COALESCE(r.ZFIRSTNAME, '') || ' ' || COALESCE(r.ZLASTNAME, ''))
2058
- ELSE COALESCE(r.ZORGANIZATION, '')
2059
- END
2060
- ) AS name
2061
- FROM ZABCDRECORD r
2062
- JOIN ZABCDPHONENUMBER p ON p.ZOWNER = r.Z_PK
2063
- WHERE p.ZFULLNUMBER IS NOT NULL
2064
- )
2065
- WHERE digits IN (${sqlitePhoneKeyList})
2066
- AND name != '';
2067
- `;
2068
- const options = {
2069
- encoding: "utf8",
2070
- maxBuffer: SQLITE_MAX_BUFFER
2071
- };
2072
- const { stdout } = await deps.execFileAsync("sqlite3", [
2073
- "-separator",
2074
- " ",
2075
- dbPath,
2076
- sql
2077
- ], options);
2078
- const rows = [];
2079
- for (const line of stdout.split(/\r?\n/)) {
2080
- const trimmed = line.trim();
2081
- if (!trimmed) continue;
2082
- const [digitsRaw, ...nameParts] = trimmed.split(" ");
2083
- const phoneKey = normalizePhoneLookupKey(digitsRaw ?? "");
2084
- const name = nameParts.join(" ").trim();
2085
- if (!phoneKey || !name) continue;
2086
- rows.push({
2087
- phoneKey,
2088
- name
2089
- });
2090
- }
2091
- return rows;
2092
- }
2093
- async function resolvePhoneNamesFromMacOsContacts(phoneKeys, deps) {
2094
- const normalizedPhoneKeys = uniqueNormalizedPhoneLookupKeys(phoneKeys);
2095
- if (normalizedPhoneKeys.length === 0) return /* @__PURE__ */ new Map();
2096
- const databases = await listContactsDatabases(deps);
2097
- if (databases.length === 0) return /* @__PURE__ */ new Map();
2098
- const unresolved = new Set(normalizedPhoneKeys);
2099
- const resolved = /* @__PURE__ */ new Map();
2100
- for (const dbPath of databases) {
2101
- let rows = [];
2102
- try {
2103
- rows = await queryContactsDatabase(dbPath, [...unresolved], deps);
2104
- } catch {
2105
- continue;
2106
- }
2107
- for (const row of rows) {
2108
- if (!unresolved.has(row.phoneKey) || resolved.has(row.phoneKey)) continue;
2109
- resolved.set(row.phoneKey, row.name);
2110
- unresolved.delete(row.phoneKey);
2111
- if (unresolved.size === 0) return resolved;
2112
- }
2113
- }
2114
- return resolved;
2115
- }
2116
- function resolveLookupDeps(deps) {
2117
- const merged = { ...deps };
2118
- return {
2119
- platform: merged.platform ?? process.platform,
2120
- now: merged.now ?? (() => Date.now()),
2121
- resolvePhoneNames: merged.resolvePhoneNames,
2122
- homeDir: merged.homeDir ?? process.env.HOME,
2123
- readdir: merged.readdir ?? readdir,
2124
- access: merged.access ?? access,
2125
- execFileAsync: merged.execFileAsync ?? execFileAsync
2126
- };
2127
- }
2128
- async function enrichBlueBubblesParticipantsWithContactNames(participants, deps) {
2129
- if (!Array.isArray(participants) || participants.length === 0) return [];
2130
- const resolvedDeps = resolveLookupDeps(deps);
2131
- const lookup = resolvedDeps.resolvePhoneNames ?? ((phoneKeys) => resolvePhoneNamesFromMacOsContacts(phoneKeys, resolvedDeps));
2132
- if (!(Boolean(resolvedDeps.resolvePhoneNames) || resolvedDeps.platform === "darwin")) return participants;
2133
- const nowMs = resolvedDeps.now();
2134
- trimParticipantContactNameCache(nowMs);
2135
- const pendingPhoneKeys = /* @__PURE__ */ new Set();
2136
- const cachedNames = /* @__PURE__ */ new Map();
2137
- for (const participant of participants) {
2138
- if (participant.name?.trim()) continue;
2139
- const phoneKey = resolveParticipantPhoneLookupKey(participant);
2140
- if (!phoneKey) continue;
2141
- const cached = readFreshCacheEntry(phoneKey, nowMs);
2142
- if (cached?.name) {
2143
- cachedNames.set(phoneKey, cached.name);
2144
- continue;
2145
- }
2146
- if (!cached) pendingPhoneKeys.add(phoneKey);
2147
- }
2148
- if (pendingPhoneKeys.size > 0) try {
2149
- const resolved = await lookup([...pendingPhoneKeys]);
2150
- for (const phoneKey of pendingPhoneKeys) {
2151
- const name = resolved.get(phoneKey)?.trim() || void 0;
2152
- writeCacheEntry(phoneKey, name, nowMs);
2153
- if (name) cachedNames.set(phoneKey, name);
2154
- }
2155
- } catch {
2156
- return participants;
2157
- }
2158
- let didChange = false;
2159
- const enriched = participants.map((participant) => {
2160
- if (participant.name?.trim()) return participant;
2161
- const phoneKey = resolveParticipantPhoneLookupKey(participant);
2162
- if (!phoneKey) return participant;
2163
- const name = cachedNames.get(phoneKey)?.trim();
2164
- if (!name) return participant;
2165
- didChange = true;
2166
- return {
2167
- ...participant,
2168
- name
2169
- };
2170
- });
2171
- return didChange ? enriched : participants;
2172
- }
2173
- //#endregion
2174
- //#region extensions/bluebubbles/src/reactions.ts
2175
- const REACTION_TYPES = new Set([
2176
- "love",
2177
- "like",
2178
- "dislike",
2179
- "laugh",
2180
- "emphasize",
2181
- "question"
2182
- ]);
2183
- const REACTION_ALIASES = new Map([
2184
- ["heart", "love"],
2185
- ["love", "love"],
2186
- ["❤", "love"],
2187
- ["❤️", "love"],
2188
- ["red_heart", "love"],
2189
- ["thumbs_up", "like"],
2190
- ["thumbsup", "like"],
2191
- ["thumbs-up", "like"],
2192
- ["thumbsup", "like"],
2193
- ["like", "like"],
2194
- ["thumb", "like"],
2195
- ["ok", "like"],
2196
- ["thumbs_down", "dislike"],
2197
- ["thumbsdown", "dislike"],
2198
- ["thumbs-down", "dislike"],
2199
- ["dislike", "dislike"],
2200
- ["boo", "dislike"],
2201
- ["no", "dislike"],
2202
- ["haha", "laugh"],
2203
- ["lol", "laugh"],
2204
- ["lmao", "laugh"],
2205
- ["rofl", "laugh"],
2206
- ["😂", "laugh"],
2207
- ["🤣", "laugh"],
2208
- ["xd", "laugh"],
2209
- ["laugh", "laugh"],
2210
- ["emphasis", "emphasize"],
2211
- ["emphasize", "emphasize"],
2212
- ["exclaim", "emphasize"],
2213
- ["!!", "emphasize"],
2214
- ["‼", "emphasize"],
2215
- ["‼️", "emphasize"],
2216
- ["❗", "emphasize"],
2217
- ["important", "emphasize"],
2218
- ["bang", "emphasize"],
2219
- ["question", "question"],
2220
- ["?", "question"],
2221
- ["❓", "question"],
2222
- ["❔", "question"],
2223
- ["ask", "question"],
2224
- ["loved", "love"],
2225
- ["liked", "like"],
2226
- ["disliked", "dislike"],
2227
- ["laughed", "laugh"],
2228
- ["emphasized", "emphasize"],
2229
- ["questioned", "question"],
2230
- ["fire", "love"],
2231
- ["🔥", "love"],
2232
- ["wow", "emphasize"],
2233
- ["!", "emphasize"],
2234
- ["heart_eyes", "love"],
2235
- ["smile", "laugh"],
2236
- ["smiley", "laugh"],
2237
- ["happy", "laugh"],
2238
- ["joy", "laugh"]
2239
- ]);
2240
- const REACTION_EMOJIS = new Map([
2241
- ["❤️", "love"],
2242
- ["❤", "love"],
2243
- ["♥️", "love"],
2244
- ["♥", "love"],
2245
- ["😍", "love"],
2246
- ["💕", "love"],
2247
- ["👍", "like"],
2248
- ["👌", "like"],
2249
- ["👎", "dislike"],
2250
- ["🙅", "dislike"],
2251
- ["😂", "laugh"],
2252
- ["🤣", "laugh"],
2253
- ["😆", "laugh"],
2254
- ["😁", "laugh"],
2255
- ["😹", "laugh"],
2256
- ["‼️", "emphasize"],
2257
- ["‼", "emphasize"],
2258
- ["!!", "emphasize"],
2259
- ["❗", "emphasize"],
2260
- ["❕", "emphasize"],
2261
- ["!", "emphasize"],
2262
- ["❓", "question"],
2263
- ["❔", "question"],
2264
- ["?", "question"]
2265
- ]);
2266
- function resolveAccount(params) {
2267
- return resolveBlueBubblesServerAccount(params);
2268
- }
2269
- function normalizeBlueBubblesReactionInput(emoji, remove) {
2270
- const trimmed = emoji.trim();
2271
- if (!trimmed) throw new Error("BlueBubbles reaction requires an emoji or name.");
2272
- let raw = trimmed.toLowerCase();
2273
- if (raw.startsWith("-")) raw = raw.slice(1);
2274
- const aliased = REACTION_ALIASES.get(raw) ?? raw;
2275
- const mapped = REACTION_EMOJIS.get(trimmed) ?? REACTION_EMOJIS.get(raw) ?? aliased;
2276
- if (!REACTION_TYPES.has(mapped)) throw new Error(`Unsupported BlueBubbles reaction: ${trimmed}`);
2277
- return remove ? `-${mapped}` : mapped;
2278
- }
2279
- async function sendBlueBubblesReaction(params) {
2280
- const chatGuid = params.chatGuid.trim();
2281
- const messageGuid = params.messageGuid.trim();
2282
- if (!chatGuid) throw new Error("BlueBubbles reaction requires chatGuid.");
2283
- if (!messageGuid) throw new Error("BlueBubbles reaction requires messageGuid.");
2284
- const reaction = normalizeBlueBubblesReactionInput(params.emoji, params.remove);
2285
- const { baseUrl, password, accountId, allowPrivateNetwork } = resolveAccount(params.opts ?? {});
2286
- if (getCachedBlueBubblesPrivateApiStatus(accountId) === false) throw new Error("BlueBubbles reaction requires Private API, but it is disabled on the BlueBubbles server.");
2287
- const url = buildBlueBubblesApiUrl({
2288
- baseUrl,
2289
- path: "/api/v1/message/react",
2290
- password
2291
- });
2292
- const payload = {
2293
- chatGuid,
2294
- selectedMessageGuid: messageGuid,
2295
- reaction,
2296
- partIndex: typeof params.partIndex === "number" ? params.partIndex : 0
2297
- };
2298
- const ssrfPolicy = allowPrivateNetwork ? { allowPrivateNetwork: true } : {};
2299
- const res = await blueBubblesFetchWithTimeout(url, {
2300
- method: "POST",
2301
- headers: { "Content-Type": "application/json" },
2302
- body: JSON.stringify(payload)
2303
- }, params.opts?.timeoutMs, ssrfPolicy);
2304
- if (!res.ok) {
2305
- const errorText = await res.text();
2306
- throw new Error(`BlueBubbles reaction failed (${res.status}): ${errorText || "unknown"}`);
2307
- }
2308
- }
2309
- //#endregion
2310
- //#region extensions/bluebubbles/src/monitor-processing.ts
2311
- const DEFAULT_TEXT_LIMIT = 4e3;
2312
- const invalidAckReactions = /* @__PURE__ */ new Set();
2313
- const REPLY_DIRECTIVE_TAG_RE = /\[\[\s*(?:reply_to_current|reply_to\s*:\s*[^\]\n]+)\s*\]\]/gi;
2314
- const PENDING_OUTBOUND_MESSAGE_ID_TTL_MS = 120 * 1e3;
2315
- const pendingOutboundMessageIds = [];
2316
- let pendingOutboundMessageIdCounter = 0;
2317
- function trimOrUndefined(value) {
2318
- const trimmed = value?.trim();
2319
- return trimmed ? trimmed : void 0;
2320
- }
2321
- function normalizeSnippet(value) {
2322
- return stripMarkdown(value).replace(/\s+/g, " ").trim().toLowerCase();
2323
- }
2324
- function blueBubblesPolicy(allowPrivateNetwork) {
2325
- return allowPrivateNetwork ? { allowPrivateNetwork: true } : void 0;
2326
- }
2327
- function extractBlueBubblesChatGuid(chat) {
2328
- const candidates = [
2329
- chat.chatGuid,
2330
- chat.guid,
2331
- chat.chat_guid
2332
- ];
2333
- for (const candidate of candidates) if (typeof candidate === "string" && candidate.trim()) return candidate.trim();
2334
- }
2335
- function extractBlueBubblesChatId(chat) {
2336
- const candidates = [
2337
- chat.chatId,
2338
- chat.id,
2339
- chat.chat_id
2340
- ];
2341
- for (const candidate of candidates) if (typeof candidate === "number" && Number.isFinite(candidate)) return candidate;
2342
- }
2343
- function extractChatIdentifierFromChatGuid(chatGuid) {
2344
- const parts = chatGuid.split(";");
2345
- if (parts.length < 3) return;
2346
- return parts[2]?.trim() || void 0;
2347
- }
2348
- function extractBlueBubblesChatIdentifier(chat) {
2349
- const candidates = [
2350
- chat.chatIdentifier,
2351
- chat.chat_identifier,
2352
- chat.identifier
2353
- ];
2354
- for (const candidate of candidates) if (typeof candidate === "string" && candidate.trim()) return candidate.trim();
2355
- const chatGuid = extractBlueBubblesChatGuid(chat);
2356
- return chatGuid ? extractChatIdentifierFromChatGuid(chatGuid) : void 0;
2357
- }
2358
- async function queryBlueBubblesChats(params) {
2359
- const res = await blueBubblesFetchWithTimeout(buildBlueBubblesApiUrl({
2360
- baseUrl: params.baseUrl,
2361
- path: "/api/v1/chat/query",
2362
- password: params.password
2363
- }), {
2364
- method: "POST",
2365
- headers: { "Content-Type": "application/json" },
2366
- body: JSON.stringify({
2367
- limit: params.limit,
2368
- offset: params.offset,
2369
- with: ["participants"]
2370
- })
2371
- }, params.timeoutMs, blueBubblesPolicy(params.allowPrivateNetwork));
2372
- if (!res.ok) return [];
2373
- const payload = await res.json().catch(() => null);
2374
- const data = payload && typeof payload.data !== "undefined" ? payload.data : null;
2375
- return Array.isArray(data) ? data : [];
2376
- }
2377
- async function fetchBlueBubblesParticipantsForInboundMessage(params) {
2378
- if (!params.chatGuid && params.chatId == null && !params.chatIdentifier) return null;
2379
- const limit = 500;
2380
- for (let offset = 0; offset < 5e3; offset += limit) {
2381
- const chats = await queryBlueBubblesChats({
2382
- baseUrl: params.baseUrl,
2383
- password: params.password,
2384
- offset,
2385
- limit,
2386
- allowPrivateNetwork: params.allowPrivateNetwork
2387
- });
2388
- if (chats.length === 0) return null;
2389
- for (const chat of chats) {
2390
- const chatGuid = extractBlueBubblesChatGuid(chat);
2391
- const chatId = extractBlueBubblesChatId(chat);
2392
- const chatIdentifier = extractBlueBubblesChatIdentifier(chat);
2393
- if (params.chatGuid && chatGuid === params.chatGuid || params.chatId != null && chatId === params.chatId || params.chatIdentifier && (chatIdentifier === params.chatIdentifier || chatGuid === params.chatIdentifier)) return normalizeParticipantList(chat);
2394
- }
2395
- if (chats.length < limit) return null;
2396
- }
2397
- return null;
2398
- }
2399
- function isBlueBubblesSelfChatMessage(message, isGroup) {
2400
- if (isGroup || !message.senderIdExplicit) return false;
2401
- const chatHandle = (message.chatGuid ? extractHandleFromChatGuid(message.chatGuid) : null) ?? normalizeBlueBubblesHandle(message.chatIdentifier ?? "");
2402
- return Boolean(chatHandle) && chatHandle === message.senderId;
2403
- }
2404
- function prunePendingOutboundMessageIds(now = Date.now()) {
2405
- const cutoff = now - PENDING_OUTBOUND_MESSAGE_ID_TTL_MS;
2406
- for (let i = pendingOutboundMessageIds.length - 1; i >= 0; i--) if (pendingOutboundMessageIds[i].createdAt < cutoff) pendingOutboundMessageIds.splice(i, 1);
2407
- }
2408
- function rememberPendingOutboundMessageId(entry) {
2409
- prunePendingOutboundMessageIds();
2410
- pendingOutboundMessageIdCounter += 1;
2411
- const snippetRaw = entry.snippet.trim();
2412
- const snippetNorm = normalizeSnippet(snippetRaw);
2413
- pendingOutboundMessageIds.push({
2414
- id: pendingOutboundMessageIdCounter,
2415
- accountId: entry.accountId,
2416
- sessionKey: entry.sessionKey,
2417
- outboundTarget: entry.outboundTarget,
2418
- chatGuid: trimOrUndefined(entry.chatGuid),
2419
- chatIdentifier: trimOrUndefined(entry.chatIdentifier),
2420
- chatId: typeof entry.chatId === "number" ? entry.chatId : void 0,
2421
- snippetRaw,
2422
- snippetNorm,
2423
- isMediaSnippet: snippetRaw.toLowerCase().startsWith("<media:"),
2424
- createdAt: Date.now()
2425
- });
2426
- return pendingOutboundMessageIdCounter;
2427
- }
2428
- function forgetPendingOutboundMessageId(id) {
2429
- const index = pendingOutboundMessageIds.findIndex((entry) => entry.id === id);
2430
- if (index >= 0) pendingOutboundMessageIds.splice(index, 1);
2431
- }
2432
- function chatsMatch(left, right) {
2433
- const leftGuid = trimOrUndefined(left.chatGuid);
2434
- const rightGuid = trimOrUndefined(right.chatGuid);
2435
- if (leftGuid && rightGuid) return leftGuid === rightGuid;
2436
- const leftIdentifier = trimOrUndefined(left.chatIdentifier);
2437
- const rightIdentifier = trimOrUndefined(right.chatIdentifier);
2438
- if (leftIdentifier && rightIdentifier) return leftIdentifier === rightIdentifier;
2439
- const leftChatId = typeof left.chatId === "number" ? left.chatId : void 0;
2440
- const rightChatId = typeof right.chatId === "number" ? right.chatId : void 0;
2441
- if (leftChatId !== void 0 && rightChatId !== void 0) return leftChatId === rightChatId;
2442
- return false;
2443
- }
2444
- function consumePendingOutboundMessageId(params) {
2445
- prunePendingOutboundMessageIds();
2446
- const bodyNorm = normalizeSnippet(params.body);
2447
- const isMediaBody = params.body.trim().toLowerCase().startsWith("<media:");
2448
- for (let i = 0; i < pendingOutboundMessageIds.length; i++) {
2449
- const entry = pendingOutboundMessageIds[i];
2450
- if (entry.accountId !== params.accountId) continue;
2451
- if (!chatsMatch(entry, params)) continue;
2452
- if (entry.snippetNorm && entry.snippetNorm === bodyNorm) {
2453
- pendingOutboundMessageIds.splice(i, 1);
2454
- return entry;
2455
- }
2456
- if (entry.isMediaSnippet && isMediaBody) {
2457
- pendingOutboundMessageIds.splice(i, 1);
2458
- return entry;
2459
- }
2460
- }
2461
- return null;
2462
- }
2463
- function logVerbose(core, runtime, message) {
2464
- if (core.logging.shouldLogVerbose()) runtime.log?.(`[bluebubbles] ${message}`);
2465
- }
2466
- function logGroupAllowlistHint(params) {
2467
- const log = params.runtime.log ?? console.log;
2468
- const nameHint = params.chatName ? ` (group name: ${params.chatName})` : "";
2469
- const accountHint = params.accountId ? ` (or channels.bluebubbles.accounts.${params.accountId}.groupAllowFrom)` : "";
2470
- if (params.entry) {
2471
- log(`[bluebubbles] group message blocked (${params.reason}). Allow this group by adding "${params.entry}" to channels.bluebubbles.groupAllowFrom${nameHint}.`);
2472
- log(`[bluebubbles] add to config: channels.bluebubbles.groupAllowFrom=["${params.entry}"]${accountHint}.`);
2473
- return;
2474
- }
2475
- log(`[bluebubbles] group message blocked (${params.reason}). Allow groups by setting channels.bluebubbles.groupPolicy="open" or adding a group id to channels.bluebubbles.groupAllowFrom${accountHint}${nameHint}.`);
2476
- }
2477
- function resolveBlueBubblesAckReaction(params) {
2478
- const raw = resolveAckReaction(params.cfg, params.agentId).trim();
2479
- if (!raw) return null;
2480
- try {
2481
- normalizeBlueBubblesReactionInput(raw);
2482
- return raw;
2483
- } catch {
2484
- const key = raw.toLowerCase();
2485
- if (!invalidAckReactions.has(key)) {
2486
- invalidAckReactions.add(key);
2487
- logVerbose(params.core, params.runtime, `ack reaction skipped (unsupported for BlueBubbles): ${raw}`);
2488
- }
2489
- return null;
2490
- }
2491
- }
2492
- /**
2493
- * In-memory rolling history map keyed by account + chat identifier.
2494
- * Populated from incoming messages during the session.
2495
- * API backfill is attempted until one fetch resolves (or retries are exhausted).
2496
- */
2497
- const chatHistories = /* @__PURE__ */ new Map();
2498
- const historyBackfills = /* @__PURE__ */ new Map();
2499
- const HISTORY_BACKFILL_BASE_DELAY_MS = 5e3;
2500
- const HISTORY_BACKFILL_MAX_DELAY_MS = 120 * 1e3;
2501
- const HISTORY_BACKFILL_MAX_ATTEMPTS = 6;
2502
- const HISTORY_BACKFILL_RETRY_WINDOW_MS = 1800 * 1e3;
2503
- const MAX_STORED_HISTORY_ENTRY_CHARS = 2e3;
2504
- const MAX_INBOUND_HISTORY_ENTRY_CHARS = 1200;
2505
- const MAX_INBOUND_HISTORY_TOTAL_CHARS = 12e3;
2506
- function buildAccountScopedHistoryKey(accountId, historyIdentifier) {
2507
- return `${accountId}\u0000${historyIdentifier}`;
2508
- }
2509
- function historyDedupKey(entry) {
2510
- const messageId = entry.messageId?.trim();
2511
- if (messageId) return `id:${messageId}`;
2512
- return `fallback:${entry.sender}\u0000${entry.body}\u0000${entry.timestamp ?? ""}`;
2513
- }
2514
- function truncateHistoryBody(body, maxChars) {
2515
- const trimmed = body.trim();
2516
- if (!trimmed) return "";
2517
- if (trimmed.length <= maxChars) return trimmed;
2518
- return `${trimmed.slice(0, maxChars).trimEnd()}...`;
2519
- }
2520
- function mergeHistoryEntries(params) {
2521
- if (params.limit <= 0) return [];
2522
- const merged = [];
2523
- const seen = /* @__PURE__ */ new Set();
2524
- const appendUnique = (entry) => {
2525
- const key = historyDedupKey(entry);
2526
- if (seen.has(key)) return;
2527
- seen.add(key);
2528
- merged.push(entry);
2529
- };
2530
- for (const entry of params.apiEntries) appendUnique(entry);
2531
- for (const entry of params.currentEntries) appendUnique(entry);
2532
- if (merged.length <= params.limit) return merged;
2533
- return merged.slice(merged.length - params.limit);
2534
- }
2535
- function pruneHistoryBackfillState() {
2536
- for (const key of historyBackfills.keys()) if (!chatHistories.has(key)) historyBackfills.delete(key);
2537
- }
2538
- function markHistoryBackfillResolved(historyKey) {
2539
- const state = historyBackfills.get(historyKey);
2540
- if (state) {
2541
- state.resolved = true;
2542
- historyBackfills.set(historyKey, state);
2543
- return;
2544
- }
2545
- historyBackfills.set(historyKey, {
2546
- attempts: 0,
2547
- firstAttemptAt: Date.now(),
2548
- nextAttemptAt: Number.POSITIVE_INFINITY,
2549
- resolved: true
2550
- });
2551
- }
2552
- function planHistoryBackfillAttempt(historyKey, now) {
2553
- const existing = historyBackfills.get(historyKey);
2554
- if (existing?.resolved) return null;
2555
- if (existing && now - existing.firstAttemptAt > HISTORY_BACKFILL_RETRY_WINDOW_MS) {
2556
- markHistoryBackfillResolved(historyKey);
2557
- return null;
2558
- }
2559
- if (existing && existing.attempts >= HISTORY_BACKFILL_MAX_ATTEMPTS) {
2560
- markHistoryBackfillResolved(historyKey);
2561
- return null;
2562
- }
2563
- if (existing && now < existing.nextAttemptAt) return null;
2564
- const attempts = (existing?.attempts ?? 0) + 1;
2565
- const state = {
2566
- attempts,
2567
- firstAttemptAt: existing?.firstAttemptAt ?? now,
2568
- nextAttemptAt: now + Math.min(HISTORY_BACKFILL_BASE_DELAY_MS * 2 ** (attempts - 1), HISTORY_BACKFILL_MAX_DELAY_MS),
2569
- resolved: false
2570
- };
2571
- historyBackfills.set(historyKey, state);
2572
- return state;
2573
- }
2574
- function buildInboundHistorySnapshot(params) {
2575
- if (params.limit <= 0 || params.entries.length === 0) return;
2576
- const recent = params.entries.slice(-params.limit);
2577
- const selected = [];
2578
- let remainingChars = MAX_INBOUND_HISTORY_TOTAL_CHARS;
2579
- for (let i = recent.length - 1; i >= 0; i--) {
2580
- const entry = recent[i];
2581
- const body = truncateHistoryBody(entry.body, MAX_INBOUND_HISTORY_ENTRY_CHARS);
2582
- if (!body) continue;
2583
- if (selected.length > 0 && body.length > remainingChars) break;
2584
- selected.push({
2585
- sender: entry.sender,
2586
- body,
2587
- timestamp: entry.timestamp
2588
- });
2589
- remainingChars -= body.length;
2590
- if (remainingChars <= 0) break;
2591
- }
2592
- if (selected.length === 0) return;
2593
- selected.reverse();
2594
- return selected;
2595
- }
2596
- async function processMessage(message, target) {
2597
- const { account, config, runtime, core, statusSink } = target;
2598
- const pairing = createChannelPairingController({
2599
- core,
2600
- channel: "bluebubbles",
2601
- accountId: account.accountId
2602
- });
2603
- const privateApiEnabled = isBlueBubblesPrivateApiEnabled(account.accountId);
2604
- const groupFlag = resolveGroupFlagFromChatGuid(message.chatGuid);
2605
- const isGroup = typeof groupFlag === "boolean" ? groupFlag : message.isGroup;
2606
- const text = message.text.trim();
2607
- const attachments = message.attachments ?? [];
2608
- const placeholder = buildMessagePlaceholder(message);
2609
- const tapbackContext = resolveTapbackContext(message);
2610
- const tapbackParsed = parseTapbackText({
2611
- text,
2612
- emojiHint: tapbackContext?.emojiHint,
2613
- actionHint: tapbackContext?.actionHint,
2614
- requireQuoted: !tapbackContext
2615
- });
2616
- const isTapbackMessage = Boolean(tapbackParsed);
2617
- const rawBody = tapbackParsed ? tapbackParsed.action === "removed" ? `removed ${tapbackParsed.emoji} reaction` : `reacted with ${tapbackParsed.emoji}` : text || placeholder;
2618
- const isSelfChatMessage = isBlueBubblesSelfChatMessage(message, isGroup);
2619
- const selfChatLookup = {
2620
- accountId: account.accountId,
2621
- chatGuid: message.chatGuid,
2622
- chatIdentifier: message.chatIdentifier,
2623
- chatId: message.chatId,
2624
- senderId: message.senderId,
2625
- body: rawBody,
2626
- timestamp: message.timestamp
2627
- };
2628
- const cacheMessageId = message.messageId?.trim();
2629
- const confirmedOutboundCacheEntry = cacheMessageId ? resolveReplyContextFromCache({
2630
- accountId: account.accountId,
2631
- replyToId: cacheMessageId,
2632
- chatGuid: message.chatGuid,
2633
- chatIdentifier: message.chatIdentifier,
2634
- chatId: message.chatId
2635
- }) : null;
2636
- let messageShortId;
2637
- const cacheInboundMessage = () => {
2638
- if (!cacheMessageId) return;
2639
- messageShortId = rememberBlueBubblesReplyCache({
2640
- accountId: account.accountId,
2641
- messageId: cacheMessageId,
2642
- chatGuid: message.chatGuid,
2643
- chatIdentifier: message.chatIdentifier,
2644
- chatId: message.chatId,
2645
- senderLabel: message.fromMe ? "me" : message.senderId,
2646
- body: rawBody,
2647
- timestamp: message.timestamp ?? Date.now()
2648
- }).shortId;
2649
- };
2650
- if (message.fromMe) {
2651
- cacheInboundMessage();
2652
- const confirmedAssistantOutbound = confirmedOutboundCacheEntry?.senderLabel === "me" && normalizeSnippet(confirmedOutboundCacheEntry.body ?? "") === normalizeSnippet(rawBody);
2653
- if (isSelfChatMessage && confirmedAssistantOutbound) rememberBlueBubblesSelfChatCopy(selfChatLookup);
2654
- if (cacheMessageId) {
2655
- const pending = consumePendingOutboundMessageId({
2656
- accountId: account.accountId,
2657
- chatGuid: message.chatGuid,
2658
- chatIdentifier: message.chatIdentifier,
2659
- chatId: message.chatId,
2660
- body: rawBody
2661
- });
2662
- if (pending) {
2663
- const displayId = getShortIdForUuid(cacheMessageId) || cacheMessageId;
2664
- const previewSource = pending.snippetRaw || rawBody;
2665
- const preview = previewSource ? ` "${previewSource.slice(0, 12)}${previewSource.length > 12 ? "…" : ""}"` : "";
2666
- core.system.enqueueSystemEvent(`Assistant sent${preview} [message_id:${displayId}]`, {
2667
- sessionKey: pending.sessionKey,
2668
- contextKey: `bluebubbles:outbound:${pending.outboundTarget}:${cacheMessageId}`
2669
- });
2670
- }
2671
- }
2672
- return;
2673
- }
2674
- if (isSelfChatMessage && hasBlueBubblesSelfChatCopy(selfChatLookup)) {
2675
- logVerbose(core, runtime, `drop: reflected self-chat duplicate sender=${message.senderId}`);
2676
- return;
2677
- }
2678
- if (!rawBody) {
2679
- logVerbose(core, runtime, `drop: empty text sender=${message.senderId}`);
2680
- return;
2681
- }
2682
- logVerbose(core, runtime, `msg sender=${message.senderId} group=${isGroup} textLen=${text.length} attachments=${attachments.length} chatGuid=${message.chatGuid ?? ""} chatId=${message.chatId ?? ""}`);
2683
- const dmPolicy = account.config.dmPolicy ?? "pairing";
2684
- const groupPolicy = account.config.groupPolicy ?? "allowlist";
2685
- const configuredAllowFrom = mapAllowFromEntries(account.config.allowFrom);
2686
- const storeAllowFrom = await readStoreAllowFromForDmPolicy({
2687
- provider: "bluebubbles",
2688
- accountId: account.accountId,
2689
- dmPolicy,
2690
- readStore: pairing.readStoreForDmPolicy
2691
- });
2692
- const accessDecision = resolveDmGroupAccessWithLists({
2693
- isGroup,
2694
- dmPolicy,
2695
- groupPolicy,
2696
- allowFrom: configuredAllowFrom,
2697
- groupAllowFrom: account.config.groupAllowFrom,
2698
- storeAllowFrom,
2699
- isSenderAllowed: (allowFrom) => isAllowedBlueBubblesSender({
2700
- allowFrom,
2701
- sender: message.senderId,
2702
- chatId: message.chatId ?? void 0,
2703
- chatGuid: message.chatGuid ?? void 0,
2704
- chatIdentifier: message.chatIdentifier ?? void 0
2705
- })
2706
- });
2707
- const effectiveAllowFrom = accessDecision.effectiveAllowFrom;
2708
- const effectiveGroupAllowFrom = accessDecision.effectiveGroupAllowFrom;
2709
- const groupAllowEntry = formatGroupAllowlistEntry({
2710
- chatGuid: message.chatGuid,
2711
- chatId: message.chatId ?? void 0,
2712
- chatIdentifier: message.chatIdentifier ?? void 0
2713
- });
2714
- const groupName = message.chatName?.trim() || void 0;
2715
- if (accessDecision.decision !== "allow") {
2716
- if (isGroup) {
2717
- if (accessDecision.reasonCode === DM_GROUP_ACCESS_REASON.GROUP_POLICY_DISABLED) {
2718
- logVerbose(core, runtime, "Blocked BlueBubbles group message (groupPolicy=disabled)");
2719
- logGroupAllowlistHint({
2720
- runtime,
2721
- reason: "groupPolicy=disabled",
2722
- entry: groupAllowEntry,
2723
- chatName: groupName,
2724
- accountId: account.accountId
2725
- });
2726
- return;
2727
- }
2728
- if (accessDecision.reasonCode === DM_GROUP_ACCESS_REASON.GROUP_POLICY_EMPTY_ALLOWLIST) {
2729
- logVerbose(core, runtime, "Blocked BlueBubbles group message (no allowlist)");
2730
- logGroupAllowlistHint({
2731
- runtime,
2732
- reason: "groupPolicy=allowlist (empty allowlist)",
2733
- entry: groupAllowEntry,
2734
- chatName: groupName,
2735
- accountId: account.accountId
2736
- });
2737
- return;
2738
- }
2739
- if (accessDecision.reasonCode === DM_GROUP_ACCESS_REASON.GROUP_POLICY_NOT_ALLOWLISTED) {
2740
- logVerbose(core, runtime, `Blocked BlueBubbles sender ${message.senderId} (not in groupAllowFrom)`);
2741
- logVerbose(core, runtime, `drop: group sender not allowed sender=${message.senderId} allowFrom=${effectiveGroupAllowFrom.join(",")}`);
2742
- logGroupAllowlistHint({
2743
- runtime,
2744
- reason: "groupPolicy=allowlist (not allowlisted)",
2745
- entry: groupAllowEntry,
2746
- chatName: groupName,
2747
- accountId: account.accountId
2748
- });
2749
- return;
2750
- }
2751
- return;
2752
- }
2753
- if (accessDecision.reasonCode === DM_GROUP_ACCESS_REASON.DM_POLICY_DISABLED) {
2754
- logVerbose(core, runtime, `Blocked BlueBubbles DM from ${message.senderId}`);
2755
- logVerbose(core, runtime, `drop: dmPolicy disabled sender=${message.senderId}`);
2756
- return;
2757
- }
2758
- if (accessDecision.decision === "pairing") {
2759
- await pairing.issueChallenge({
2760
- senderId: message.senderId,
2761
- senderIdLine: `Your BlueBubbles sender id: ${message.senderId}`,
2762
- meta: { name: message.senderName },
2763
- onCreated: () => {
2764
- runtime.log?.(`[bluebubbles] pairing request sender=${message.senderId} created=true`);
2765
- logVerbose(core, runtime, `bluebubbles pairing request sender=${message.senderId}`);
2766
- },
2767
- sendPairingReply: async (text) => {
2768
- await sendMessageBlueBubbles(message.senderId, text, {
2769
- cfg: config,
2770
- accountId: account.accountId
2771
- });
2772
- statusSink?.({ lastOutboundAt: Date.now() });
2773
- },
2774
- onReplyError: (err) => {
2775
- logVerbose(core, runtime, `bluebubbles pairing reply failed for ${message.senderId}: ${String(err)}`);
2776
- runtime.error?.(`[bluebubbles] pairing reply failed sender=${message.senderId}: ${String(err)}`);
2777
- }
2778
- });
2779
- return;
2780
- }
2781
- logVerbose(core, runtime, `Blocked unauthorized BlueBubbles sender ${message.senderId} (dmPolicy=${dmPolicy})`);
2782
- logVerbose(core, runtime, `drop: dm sender not allowed sender=${message.senderId} allowFrom=${effectiveAllowFrom.join(",")}`);
2783
- return;
2784
- }
2785
- const chatId = message.chatId ?? void 0;
2786
- const chatGuid = message.chatGuid ?? void 0;
2787
- const chatIdentifier = message.chatIdentifier ?? void 0;
2788
- const peerId = isGroup ? chatGuid ?? chatIdentifier ?? (chatId ? String(chatId) : "group") : message.senderId;
2789
- const route = resolveBlueBubblesConversationRoute({
2790
- cfg: config,
2791
- accountId: account.accountId,
2792
- isGroup,
2793
- peerId,
2794
- sender: message.senderId,
2795
- chatId,
2796
- chatGuid,
2797
- chatIdentifier
2798
- });
2799
- const contextVisibilityMode = resolveChannelContextVisibilityMode({
2800
- cfg: config,
2801
- channel: "bluebubbles",
2802
- accountId: account.accountId
2803
- });
2804
- const messageText = text;
2805
- const mentionRegexes = core.channel.mentions.buildMentionRegexes(config, route.agentId);
2806
- const wasMentioned = isGroup ? core.channel.mentions.matchesMentionPatterns(messageText, mentionRegexes) : true;
2807
- const canDetectMention = mentionRegexes.length > 0;
2808
- const requireMention = core.channel.groups.resolveRequireMention({
2809
- cfg: config,
2810
- channel: "bluebubbles",
2811
- groupId: peerId,
2812
- accountId: account.accountId
2813
- });
2814
- const useAccessGroups = config.commands?.useAccessGroups !== false;
2815
- const hasControlCmd = core.channel.text.hasControlCommand(messageText, config);
2816
- const commandDmAllowFrom = isGroup ? configuredAllowFrom : effectiveAllowFrom;
2817
- const ownerAllowedForCommands = commandDmAllowFrom.length > 0 ? isAllowedBlueBubblesSender({
2818
- allowFrom: commandDmAllowFrom,
2819
- sender: message.senderId,
2820
- chatId: message.chatId ?? void 0,
2821
- chatGuid: message.chatGuid ?? void 0,
2822
- chatIdentifier: message.chatIdentifier ?? void 0
2823
- }) : false;
2824
- const groupAllowedForCommands = effectiveGroupAllowFrom.length > 0 ? isAllowedBlueBubblesSender({
2825
- allowFrom: effectiveGroupAllowFrom,
2826
- sender: message.senderId,
2827
- chatId: message.chatId ?? void 0,
2828
- chatGuid: message.chatGuid ?? void 0,
2829
- chatIdentifier: message.chatIdentifier ?? void 0
2830
- }) : false;
2831
- const commandGate = resolveControlCommandGate({
2832
- useAccessGroups,
2833
- authorizers: [{
2834
- configured: commandDmAllowFrom.length > 0,
2835
- allowed: ownerAllowedForCommands
2836
- }, {
2837
- configured: effectiveGroupAllowFrom.length > 0,
2838
- allowed: groupAllowedForCommands
2839
- }],
2840
- allowTextCommands: true,
2841
- hasControlCommand: hasControlCmd
2842
- });
2843
- const commandAuthorized = commandGate.commandAuthorized;
2844
- if (isGroup && commandGate.shouldBlock) {
2845
- logInboundDrop({
2846
- log: (msg) => logVerbose(core, runtime, msg),
2847
- channel: "bluebubbles",
2848
- reason: "control command (unauthorized)",
2849
- target: message.senderId
2850
- });
2851
- return;
2852
- }
2853
- const shouldBypassMention = isGroup && requireMention && !wasMentioned && commandAuthorized && hasControlCmd;
2854
- const effectiveWasMentioned = wasMentioned || shouldBypassMention;
2855
- if (isGroup && requireMention && canDetectMention && !wasMentioned && !shouldBypassMention) {
2856
- logVerbose(core, runtime, `bluebubbles: skipping group message (no mention)`);
2857
- return;
2858
- }
2859
- const baseUrl = normalizeSecretInputString(account.config.serverUrl);
2860
- const password = normalizeSecretInputString(account.config.password);
2861
- if (isGroup && !message.participants?.length && baseUrl && password) try {
2862
- const fetchedParticipants = await fetchBlueBubblesParticipantsForInboundMessage({
2863
- baseUrl,
2864
- password,
2865
- chatGuid: message.chatGuid,
2866
- chatId: message.chatId,
2867
- chatIdentifier: message.chatIdentifier,
2868
- allowPrivateNetwork: account.config.allowPrivateNetwork === true
2869
- });
2870
- if (fetchedParticipants?.length) message.participants = fetchedParticipants;
2871
- } catch (err) {
2872
- logVerbose(core, runtime, `bluebubbles: participant fallback lookup failed chat=${peerId}: ${String(err)}`);
2873
- }
2874
- if (isGroup && account.config.enrichGroupParticipantsFromContacts === true && message.participants?.length) message.participants = await enrichBlueBubblesParticipantsWithContactNames(message.participants);
2875
- cacheInboundMessage();
2876
- const maxBytes = account.config.mediaMaxMb && account.config.mediaMaxMb > 0 ? account.config.mediaMaxMb * 1024 * 1024 : 8 * 1024 * 1024;
2877
- let mediaUrls = [];
2878
- let mediaPaths = [];
2879
- let mediaTypes = [];
2880
- if (attachments.length > 0) if (!baseUrl || !password) logVerbose(core, runtime, "attachment download skipped (missing serverUrl/password)");
2881
- else for (const attachment of attachments) {
2882
- if (!attachment.guid) continue;
2883
- if (attachment.totalBytes && attachment.totalBytes > maxBytes) {
2884
- logVerbose(core, runtime, `attachment too large guid=${attachment.guid} bytes=${attachment.totalBytes}`);
2885
- continue;
2886
- }
2887
- try {
2888
- const downloaded = await downloadBlueBubblesAttachment(attachment, {
2889
- cfg: config,
2890
- accountId: account.accountId,
2891
- maxBytes
2892
- });
2893
- const saved = await core.channel.media.saveMediaBuffer(Buffer.from(downloaded.buffer), downloaded.contentType, "inbound", maxBytes);
2894
- mediaPaths.push(saved.path);
2895
- mediaUrls.push(saved.path);
2896
- if (saved.contentType) mediaTypes.push(saved.contentType);
2897
- } catch (err) {
2898
- logVerbose(core, runtime, `attachment download failed guid=${attachment.guid} err=${String(err)}`);
2899
- }
2900
- }
2901
- let replyToId = message.replyToId;
2902
- let replyToBody = message.replyToBody;
2903
- let replyToSender = message.replyToSender;
2904
- let replyToShortId;
2905
- if (isTapbackMessage && tapbackContext?.replyToId) replyToId = tapbackContext.replyToId;
2906
- if (replyToId) {
2907
- const cached = resolveReplyContextFromCache({
2908
- accountId: account.accountId,
2909
- replyToId,
2910
- chatGuid: message.chatGuid,
2911
- chatIdentifier: message.chatIdentifier,
2912
- chatId: message.chatId
2913
- });
2914
- if (cached) {
2915
- if (!replyToBody && cached.body) replyToBody = cached.body;
2916
- if (!replyToSender && cached.senderLabel) replyToSender = cached.senderLabel;
2917
- replyToShortId = cached.shortId;
2918
- if (core.logging.shouldLogVerbose()) {
2919
- const preview = (cached.body ?? "").replace(/\s+/g, " ").slice(0, 120);
2920
- logVerbose(core, runtime, `reply-context cache hit replyToId=${replyToId} sender=${replyToSender ?? ""} body="${preview}"`);
2921
- }
2922
- }
2923
- }
2924
- if (replyToId && !replyToShortId) replyToShortId = getShortIdForUuid(replyToId);
2925
- const hasReplyContext = Boolean(replyToId || replyToBody || replyToSender);
2926
- const replySenderAllowed = !isGroup || effectiveGroupAllowFrom.length === 0 ? true : replyToSender ? isAllowedBlueBubblesSender({
2927
- allowFrom: effectiveGroupAllowFrom,
2928
- sender: replyToSender,
2929
- chatId: message.chatId ?? void 0,
2930
- chatGuid: message.chatGuid ?? void 0,
2931
- chatIdentifier: message.chatIdentifier ?? void 0
2932
- }) : false;
2933
- const includeReplyContext = !hasReplyContext || evaluateSupplementalContextVisibility({
2934
- mode: contextVisibilityMode,
2935
- kind: "quote",
2936
- senderAllowed: replySenderAllowed
2937
- }).include;
2938
- if (hasReplyContext && !includeReplyContext && isGroup) logVerbose(core, runtime, `bluebubbles: drop reply context (mode=${contextVisibilityMode}, sender_allowed=${replySenderAllowed ? "yes" : "no"})`);
2939
- const visibleReplyToId = includeReplyContext ? replyToId : void 0;
2940
- const visibleReplyToShortId = includeReplyContext ? replyToShortId : void 0;
2941
- const visibleReplyToBody = includeReplyContext ? replyToBody : void 0;
2942
- const visibleReplyToSender = includeReplyContext ? replyToSender : void 0;
2943
- const replyTag = formatReplyTag({
2944
- replyToId: visibleReplyToId,
2945
- replyToShortId: visibleReplyToShortId
2946
- });
2947
- const baseBody = replyTag ? isTapbackMessage ? `${rawBody} ${replyTag}` : `${replyTag} ${rawBody}` : rawBody;
2948
- const senderLabel = message.senderName || `user:${message.senderId}`;
2949
- const fromLabel = isGroup ? `${message.chatName?.trim() || "Group"} id:${peerId}` : senderLabel !== message.senderId ? `${senderLabel} id:${message.senderId}` : senderLabel;
2950
- const groupSubject = isGroup ? message.chatName?.trim() || void 0 : void 0;
2951
- const groupMembers = isGroup ? formatGroupMembers({
2952
- participants: message.participants,
2953
- fallback: message.senderId ? {
2954
- id: message.senderId,
2955
- name: message.senderName
2956
- } : void 0
2957
- }) : void 0;
2958
- const storePath = core.channel.session.resolveStorePath(config.session?.store, { agentId: route.agentId });
2959
- const envelopeOptions = core.channel.reply.resolveEnvelopeFormatOptions(config);
2960
- const previousTimestamp = core.channel.session.readSessionUpdatedAt({
2961
- storePath,
2962
- sessionKey: route.sessionKey
2963
- });
2964
- const body = core.channel.reply.formatInboundEnvelope({
2965
- channel: "BlueBubbles",
2966
- from: fromLabel,
2967
- timestamp: message.timestamp,
2968
- previousTimestamp,
2969
- envelope: envelopeOptions,
2970
- body: baseBody,
2971
- chatType: isGroup ? "group" : "direct",
2972
- sender: {
2973
- name: message.senderName || void 0,
2974
- id: message.senderId
2975
- }
2976
- });
2977
- let chatGuidForActions = chatGuid;
2978
- if (!chatGuidForActions && baseUrl && password) {
2979
- const resolveTarget = isGroup && (chatId || chatIdentifier) ? chatId ? {
2980
- kind: "chat_id",
2981
- chatId
2982
- } : {
2983
- kind: "chat_identifier",
2984
- chatIdentifier: chatIdentifier ?? ""
2985
- } : {
2986
- kind: "handle",
2987
- address: message.senderId
2988
- };
2989
- if (resolveTarget.kind !== "chat_identifier" || resolveTarget.chatIdentifier) chatGuidForActions = await resolveChatGuidForTarget({
2990
- baseUrl,
2991
- password,
2992
- target: resolveTarget,
2993
- allowPrivateNetwork: account.config.allowPrivateNetwork === true
2994
- }) ?? void 0;
2995
- }
2996
- const ackReactionScope = config.messages?.ackReactionScope ?? "group-mentions";
2997
- const removeAckAfterReply = config.messages?.removeAckAfterReply ?? false;
2998
- const ackReactionValue = resolveBlueBubblesAckReaction({
2999
- cfg: config,
3000
- agentId: route.agentId,
3001
- core,
3002
- runtime
3003
- });
3004
- const shouldAckReaction = () => Boolean(ackReactionValue && core.channel.reactions.shouldAckReaction({
3005
- scope: ackReactionScope,
3006
- isDirect: !isGroup,
3007
- isGroup,
3008
- isMentionableGroup: isGroup,
3009
- requireMention: Boolean(requireMention),
3010
- canDetectMention,
3011
- effectiveWasMentioned,
3012
- shouldBypassMention
3013
- }));
3014
- const ackMessageId = message.messageId?.trim() || "";
3015
- const ackReactionPromise = shouldAckReaction() && ackMessageId && chatGuidForActions && ackReactionValue ? sendBlueBubblesReaction({
3016
- chatGuid: chatGuidForActions,
3017
- messageGuid: ackMessageId,
3018
- emoji: ackReactionValue,
3019
- opts: {
3020
- cfg: config,
3021
- accountId: account.accountId
3022
- }
3023
- }).then(() => true, (err) => {
3024
- logVerbose(core, runtime, `ack reaction failed chatGuid=${chatGuidForActions} msg=${ackMessageId}: ${String(err)}`);
3025
- return false;
3026
- }) : null;
3027
- const sendReadReceipts = account.config.sendReadReceipts !== false;
3028
- if (chatGuidForActions && baseUrl && password && sendReadReceipts) try {
3029
- await markBlueBubblesChatRead(chatGuidForActions, {
3030
- cfg: config,
3031
- accountId: account.accountId
3032
- });
3033
- logVerbose(core, runtime, `marked read chatGuid=${chatGuidForActions}`);
3034
- } catch (err) {
3035
- runtime.error?.(`[bluebubbles] mark read failed: ${String(err)}`);
3036
- }
3037
- else if (!sendReadReceipts) logVerbose(core, runtime, "mark read skipped (sendReadReceipts=false)");
3038
- else logVerbose(core, runtime, "mark read skipped (missing chatGuid or credentials)");
3039
- const outboundTarget = isGroup ? formatBlueBubblesChatTarget({
3040
- chatId,
3041
- chatGuid: chatGuidForActions ?? chatGuid,
3042
- chatIdentifier
3043
- }) || peerId : chatGuidForActions ? formatBlueBubblesChatTarget({ chatGuid: chatGuidForActions }) : message.senderId;
3044
- const maybeEnqueueOutboundMessageId = (messageId, snippet) => {
3045
- const trimmed = messageId?.trim();
3046
- if (!trimmed || trimmed === "ok" || trimmed === "unknown") return false;
3047
- const displayId = rememberBlueBubblesReplyCache({
3048
- accountId: account.accountId,
3049
- messageId: trimmed,
3050
- chatGuid: chatGuidForActions ?? chatGuid,
3051
- chatIdentifier,
3052
- chatId,
3053
- senderLabel: "me",
3054
- body: snippet ?? "",
3055
- timestamp: Date.now()
3056
- }).shortId || trimmed;
3057
- const preview = snippet ? ` "${snippet.slice(0, 12)}${snippet.length > 12 ? "…" : ""}"` : "";
3058
- core.system.enqueueSystemEvent(`Assistant sent${preview} [message_id:${displayId}]`, {
3059
- sessionKey: route.sessionKey,
3060
- contextKey: `bluebubbles:outbound:${outboundTarget}:${trimmed}`
3061
- });
3062
- return true;
3063
- };
3064
- const sanitizeReplyDirectiveText = (value) => {
3065
- if (privateApiEnabled) return value;
3066
- return value.replace(REPLY_DIRECTIVE_TAG_RE, " ").replace(/[ \t]+/g, " ").trim();
3067
- };
3068
- const historyLimit = isGroup ? account.config.historyLimit ?? 0 : account.config.dmHistoryLimit ?? 0;
3069
- const historyIdentifier = chatGuid || chatIdentifier || (chatId ? String(chatId) : null) || (isGroup ? null : message.senderId) || "";
3070
- const historyKey = historyIdentifier ? buildAccountScopedHistoryKey(account.accountId, historyIdentifier) : "";
3071
- if (historyKey && historyLimit > 0) {
3072
- const nowMs = Date.now();
3073
- const senderLabel = message.fromMe ? "me" : message.senderName || message.senderId;
3074
- const normalizedHistoryBody = truncateHistoryBody(text, MAX_STORED_HISTORY_ENTRY_CHARS);
3075
- const currentEntries = recordPendingHistoryEntryIfEnabled({
3076
- historyMap: chatHistories,
3077
- limit: historyLimit,
3078
- historyKey,
3079
- entry: normalizedHistoryBody ? {
3080
- sender: senderLabel,
3081
- body: normalizedHistoryBody,
3082
- timestamp: message.timestamp ?? nowMs,
3083
- messageId: message.messageId ?? void 0
3084
- } : null
3085
- });
3086
- pruneHistoryBackfillState();
3087
- const backfillAttempt = planHistoryBackfillAttempt(historyKey, nowMs);
3088
- if (backfillAttempt) try {
3089
- const backfillResult = await fetchBlueBubblesHistory(historyIdentifier, historyLimit, {
3090
- cfg: config,
3091
- accountId: account.accountId
3092
- });
3093
- if (backfillResult.resolved) markHistoryBackfillResolved(historyKey);
3094
- if (backfillResult.entries.length > 0) {
3095
- const apiEntries = [];
3096
- for (const entry of backfillResult.entries) {
3097
- const body = truncateHistoryBody(entry.body, MAX_STORED_HISTORY_ENTRY_CHARS);
3098
- if (!body) continue;
3099
- apiEntries.push({
3100
- sender: entry.sender,
3101
- body,
3102
- timestamp: entry.timestamp,
3103
- messageId: entry.messageId
3104
- });
3105
- }
3106
- const merged = mergeHistoryEntries({
3107
- apiEntries,
3108
- currentEntries: currentEntries.length > 0 ? currentEntries : chatHistories.get(historyKey) ?? [],
3109
- limit: historyLimit
3110
- });
3111
- if (chatHistories.has(historyKey)) chatHistories.delete(historyKey);
3112
- chatHistories.set(historyKey, merged);
3113
- evictOldHistoryKeys(chatHistories);
3114
- logVerbose(core, runtime, `backfilled ${backfillResult.entries.length} history messages for ${isGroup ? "group" : "DM"}: ${historyIdentifier}`);
3115
- } else if (!backfillResult.resolved) {
3116
- const remainingAttempts = HISTORY_BACKFILL_MAX_ATTEMPTS - backfillAttempt.attempts;
3117
- const nextBackoffMs = Math.max(backfillAttempt.nextAttemptAt - nowMs, 0);
3118
- logVerbose(core, runtime, `history backfill unresolved for ${historyIdentifier}; retries left=${Math.max(remainingAttempts, 0)} next_in_ms=${nextBackoffMs}`);
3119
- }
3120
- } catch (err) {
3121
- const remainingAttempts = HISTORY_BACKFILL_MAX_ATTEMPTS - backfillAttempt.attempts;
3122
- const nextBackoffMs = Math.max(backfillAttempt.nextAttemptAt - nowMs, 0);
3123
- logVerbose(core, runtime, `history backfill failed for ${historyIdentifier}: ${String(err)} (retries left=${Math.max(remainingAttempts, 0)} next_in_ms=${nextBackoffMs})`);
3124
- }
3125
- }
3126
- let inboundHistory;
3127
- if (historyKey && historyLimit > 0) {
3128
- const entries = chatHistories.get(historyKey);
3129
- if (entries && entries.length > 0) inboundHistory = buildInboundHistorySnapshot({
3130
- entries,
3131
- limit: historyLimit
3132
- });
3133
- }
3134
- const commandBody = messageText.trim();
3135
- const ctxPayload = core.channel.reply.finalizeInboundContext({
3136
- Body: body,
3137
- BodyForAgent: rawBody,
3138
- InboundHistory: inboundHistory,
3139
- RawBody: rawBody,
3140
- CommandBody: commandBody,
3141
- BodyForCommands: commandBody,
3142
- MediaUrl: mediaUrls[0],
3143
- MediaUrls: mediaUrls.length > 0 ? mediaUrls : void 0,
3144
- MediaPath: mediaPaths[0],
3145
- MediaPaths: mediaPaths.length > 0 ? mediaPaths : void 0,
3146
- MediaType: mediaTypes[0],
3147
- MediaTypes: mediaTypes.length > 0 ? mediaTypes : void 0,
3148
- From: isGroup ? `group:${peerId}` : `bluebubbles:${message.senderId}`,
3149
- To: `bluebubbles:${outboundTarget}`,
3150
- SessionKey: route.sessionKey,
3151
- AccountId: route.accountId,
3152
- ChatType: isGroup ? "group" : "direct",
3153
- ConversationLabel: fromLabel,
3154
- ReplyToId: visibleReplyToShortId || visibleReplyToId,
3155
- ReplyToIdFull: visibleReplyToId,
3156
- ReplyToBody: visibleReplyToBody,
3157
- ReplyToSender: visibleReplyToSender,
3158
- GroupSubject: groupSubject,
3159
- GroupMembers: groupMembers,
3160
- SenderName: message.senderName || void 0,
3161
- SenderId: message.senderId,
3162
- Provider: "bluebubbles",
3163
- Surface: "bluebubbles",
3164
- MessageSid: messageShortId || message.messageId,
3165
- MessageSidFull: message.messageId,
3166
- Timestamp: message.timestamp,
3167
- OriginatingChannel: "bluebubbles",
3168
- OriginatingTo: `bluebubbles:${outboundTarget}`,
3169
- WasMentioned: effectiveWasMentioned,
3170
- CommandAuthorized: commandAuthorized
3171
- });
3172
- let sentMessage = false;
3173
- let streamingActive = false;
3174
- let typingRestartTimer;
3175
- const typingRestartDelayMs = 150;
3176
- const clearTypingRestartTimer = () => {
3177
- if (typingRestartTimer) {
3178
- clearTimeout(typingRestartTimer);
3179
- typingRestartTimer = void 0;
3180
- }
3181
- };
3182
- const restartTypingSoon = () => {
3183
- if (!streamingActive || !chatGuidForActions || !baseUrl || !password) return;
3184
- clearTypingRestartTimer();
3185
- typingRestartTimer = setTimeout(() => {
3186
- typingRestartTimer = void 0;
3187
- if (!streamingActive) return;
3188
- sendBlueBubblesTyping(chatGuidForActions, true, {
3189
- cfg: config,
3190
- accountId: account.accountId
3191
- }).catch((err) => {
3192
- runtime.error?.(`[bluebubbles] typing restart failed: ${String(err)}`);
3193
- });
3194
- }, typingRestartDelayMs);
3195
- };
3196
- try {
3197
- const { onModelSelected, typingCallbacks, ...replyPipeline } = createChannelReplyPipeline({
3198
- cfg: config,
3199
- agentId: route.agentId,
3200
- channel: "bluebubbles",
3201
- accountId: account.accountId,
3202
- typingCallbacks: {
3203
- onReplyStart: async () => {
3204
- if (!chatGuidForActions) return;
3205
- if (!baseUrl || !password) return;
3206
- streamingActive = true;
3207
- clearTypingRestartTimer();
3208
- try {
3209
- await sendBlueBubblesTyping(chatGuidForActions, true, {
3210
- cfg: config,
3211
- accountId: account.accountId
3212
- });
3213
- } catch (err) {
3214
- runtime.error?.(`[bluebubbles] typing start failed: ${String(err)}`);
3215
- }
3216
- },
3217
- onIdle: () => {
3218
- if (!chatGuidForActions) return;
3219
- if (!baseUrl || !password) return;
3220
- }
3221
- }
3222
- });
3223
- await core.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
3224
- ctx: ctxPayload,
3225
- cfg: config,
3226
- dispatcherOptions: {
3227
- ...replyPipeline,
3228
- deliver: async (payload, info) => {
3229
- const rawReplyToId = privateApiEnabled && typeof payload.replyToId === "string" ? payload.replyToId.trim() : "";
3230
- const replyToMessageGuid = rawReplyToId ? resolveBlueBubblesMessageId(rawReplyToId, { requireKnownShortId: true }) : "";
3231
- const mediaList = resolveOutboundMediaUrls(payload);
3232
- if (mediaList.length > 0) {
3233
- const tableMode = core.channel.text.resolveMarkdownTableMode({
3234
- cfg: config,
3235
- channel: "bluebubbles",
3236
- accountId: account.accountId
3237
- });
3238
- await sendMediaWithLeadingCaption({
3239
- mediaUrls: mediaList,
3240
- caption: sanitizeReplyDirectiveText(core.channel.text.convertMarkdownTables(payload.text ?? "", tableMode)),
3241
- send: async ({ mediaUrl, caption }) => {
3242
- const cachedBody = (caption ?? "").trim() || "<media:attachment>";
3243
- const pendingId = rememberPendingOutboundMessageId({
3244
- accountId: account.accountId,
3245
- sessionKey: route.sessionKey,
3246
- outboundTarget,
3247
- chatGuid: chatGuidForActions ?? chatGuid,
3248
- chatIdentifier,
3249
- chatId,
3250
- snippet: cachedBody
3251
- });
3252
- let result;
3253
- try {
3254
- result = await sendBlueBubblesMedia({
3255
- cfg: config,
3256
- to: outboundTarget,
3257
- mediaUrl,
3258
- caption: caption ?? void 0,
3259
- replyToId: replyToMessageGuid || null,
3260
- accountId: account.accountId
3261
- });
3262
- } catch (err) {
3263
- forgetPendingOutboundMessageId(pendingId);
3264
- throw err;
3265
- }
3266
- if (maybeEnqueueOutboundMessageId(result.messageId, cachedBody)) forgetPendingOutboundMessageId(pendingId);
3267
- sentMessage = true;
3268
- statusSink?.({ lastOutboundAt: Date.now() });
3269
- if (info.kind === "block") restartTypingSoon();
3270
- }
3271
- });
3272
- return;
3273
- }
3274
- const textLimit = account.config.textChunkLimit && account.config.textChunkLimit > 0 ? account.config.textChunkLimit : DEFAULT_TEXT_LIMIT;
3275
- const chunkMode = account.config.chunkMode ?? "length";
3276
- const tableMode = core.channel.text.resolveMarkdownTableMode({
3277
- cfg: config,
3278
- channel: "bluebubbles",
3279
- accountId: account.accountId
3280
- });
3281
- const text = sanitizeReplyDirectiveText(core.channel.text.convertMarkdownTables(payload.text ?? "", tableMode));
3282
- const chunks = chunkMode === "newline" ? resolveTextChunksWithFallback(text, core.channel.text.chunkTextWithMode(text, textLimit, chunkMode)) : resolveTextChunksWithFallback(text, core.channel.text.chunkMarkdownText(text, textLimit));
3283
- if (!chunks.length) return;
3284
- for (const chunk of chunks) {
3285
- const pendingId = rememberPendingOutboundMessageId({
3286
- accountId: account.accountId,
3287
- sessionKey: route.sessionKey,
3288
- outboundTarget,
3289
- chatGuid: chatGuidForActions ?? chatGuid,
3290
- chatIdentifier,
3291
- chatId,
3292
- snippet: chunk
3293
- });
3294
- let result;
3295
- try {
3296
- result = await sendMessageBlueBubbles(outboundTarget, chunk, {
3297
- cfg: config,
3298
- accountId: account.accountId,
3299
- replyToMessageGuid: replyToMessageGuid || void 0
3300
- });
3301
- } catch (err) {
3302
- forgetPendingOutboundMessageId(pendingId);
3303
- throw err;
3304
- }
3305
- if (maybeEnqueueOutboundMessageId(result.messageId, chunk)) forgetPendingOutboundMessageId(pendingId);
3306
- sentMessage = true;
3307
- statusSink?.({ lastOutboundAt: Date.now() });
3308
- if (info.kind === "block") restartTypingSoon();
3309
- }
3310
- },
3311
- onReplyStart: typingCallbacks?.onReplyStart,
3312
- onIdle: typingCallbacks?.onIdle,
3313
- onError: (err, info) => {
3314
- runtime.error?.(`BlueBubbles ${info.kind} reply failed: ${String(err)}`);
3315
- }
3316
- },
3317
- replyOptions: {
3318
- onModelSelected,
3319
- disableBlockStreaming: typeof account.config.blockStreaming === "boolean" ? !account.config.blockStreaming : void 0
3320
- }
3321
- });
3322
- } finally {
3323
- const shouldStopTyping = Boolean(chatGuidForActions && baseUrl && password) && (streamingActive || !sentMessage);
3324
- streamingActive = false;
3325
- clearTypingRestartTimer();
3326
- if (sentMessage && chatGuidForActions && ackMessageId) core.channel.reactions.removeAckReactionAfterReply({
3327
- removeAfterReply: removeAckAfterReply,
3328
- ackReactionPromise,
3329
- ackReactionValue: ackReactionValue ?? null,
3330
- remove: () => sendBlueBubblesReaction({
3331
- chatGuid: chatGuidForActions,
3332
- messageGuid: ackMessageId,
3333
- emoji: ackReactionValue ?? "",
3334
- remove: true,
3335
- opts: {
3336
- cfg: config,
3337
- accountId: account.accountId
3338
- }
3339
- }),
3340
- onError: (err) => {
3341
- logAckFailure({
3342
- log: (msg) => logVerbose(core, runtime, msg),
3343
- channel: "bluebubbles",
3344
- target: `${chatGuidForActions}/${ackMessageId}`,
3345
- error: err
3346
- });
3347
- }
3348
- });
3349
- if (shouldStopTyping && chatGuidForActions) sendBlueBubblesTyping(chatGuidForActions, false, {
3350
- cfg: config,
3351
- accountId: account.accountId
3352
- }).catch((err) => {
3353
- logTypingFailure({
3354
- log: (msg) => logVerbose(core, runtime, msg),
3355
- channel: "bluebubbles",
3356
- action: "stop",
3357
- target: chatGuidForActions,
3358
- error: err
3359
- });
3360
- });
3361
- }
3362
- }
3363
- async function processReaction(reaction, target) {
3364
- const { account, config, runtime, core } = target;
3365
- const pairing = createChannelPairingController({
3366
- core,
3367
- channel: "bluebubbles",
3368
- accountId: account.accountId
3369
- });
3370
- if (reaction.fromMe) return;
3371
- const dmPolicy = account.config.dmPolicy ?? "pairing";
3372
- const groupPolicy = account.config.groupPolicy ?? "allowlist";
3373
- const storeAllowFrom = await readStoreAllowFromForDmPolicy({
3374
- provider: "bluebubbles",
3375
- accountId: account.accountId,
3376
- dmPolicy,
3377
- readStore: pairing.readStoreForDmPolicy
3378
- });
3379
- if (resolveDmGroupAccessWithLists({
3380
- isGroup: reaction.isGroup,
3381
- dmPolicy,
3382
- groupPolicy,
3383
- allowFrom: account.config.allowFrom,
3384
- groupAllowFrom: account.config.groupAllowFrom,
3385
- storeAllowFrom,
3386
- isSenderAllowed: (allowFrom) => isAllowedBlueBubblesSender({
3387
- allowFrom,
3388
- sender: reaction.senderId,
3389
- chatId: reaction.chatId ?? void 0,
3390
- chatGuid: reaction.chatGuid ?? void 0,
3391
- chatIdentifier: reaction.chatIdentifier ?? void 0
3392
- })
3393
- }).decision !== "allow") return;
3394
- const chatId = reaction.chatId ?? void 0;
3395
- const chatGuid = reaction.chatGuid ?? void 0;
3396
- const chatIdentifier = reaction.chatIdentifier ?? void 0;
3397
- const peerId = reaction.isGroup ? chatGuid ?? chatIdentifier ?? (chatId ? String(chatId) : "group") : reaction.senderId;
3398
- if (reaction.isGroup && core.channel.groups.resolveRequireMention({
3399
- cfg: config,
3400
- channel: "bluebubbles",
3401
- groupId: peerId,
3402
- accountId: account.accountId
3403
- })) {
3404
- logVerbose(core, runtime, "bluebubbles: skipping group reaction (requireMention=true)");
3405
- return;
3406
- }
3407
- const route = resolveBlueBubblesConversationRoute({
3408
- cfg: config,
3409
- accountId: account.accountId,
3410
- isGroup: reaction.isGroup,
3411
- peerId,
3412
- sender: reaction.senderId,
3413
- chatId,
3414
- chatGuid,
3415
- chatIdentifier
3416
- });
3417
- const senderLabel = reaction.senderName || reaction.senderId;
3418
- const chatLabel = reaction.isGroup ? ` in group:${peerId}` : "";
3419
- const messageDisplayId = getShortIdForUuid(reaction.messageId) || reaction.messageId;
3420
- const text = reaction.action === "removed" ? `${senderLabel} removed ${reaction.emoji} reaction [[reply_to:${messageDisplayId}]]${chatLabel}` : `${senderLabel} reacted with ${reaction.emoji} [[reply_to:${messageDisplayId}]]${chatLabel}`;
3421
- core.system.enqueueSystemEvent(text, {
3422
- sessionKey: route.sessionKey,
3423
- contextKey: `bluebubbles:reaction:${reaction.action}:${peerId}:${reaction.messageId}:${reaction.senderId}:${reaction.emoji}`
3424
- });
3425
- logVerbose(core, runtime, `reaction event enqueued: ${text}`);
3426
- }
3427
- //#endregion
3428
- //#region extensions/bluebubbles/src/monitor.ts
3429
- const webhookTargets = /* @__PURE__ */ new Map();
3430
- const webhookRateLimiter = createFixedWindowRateLimiter({
3431
- windowMs: WEBHOOK_RATE_LIMIT_DEFAULTS.windowMs,
3432
- maxRequests: WEBHOOK_RATE_LIMIT_DEFAULTS.maxRequests,
3433
- maxTrackedKeys: WEBHOOK_RATE_LIMIT_DEFAULTS.maxTrackedKeys
3434
- });
3435
- const webhookInFlightLimiter = createWebhookInFlightLimiter();
3436
- const debounceRegistry = createBlueBubblesDebounceRegistry({ processMessage });
3437
- function registerBlueBubblesWebhookTarget(target) {
3438
- const registered = registerWebhookTargetWithPluginRoute({
3439
- targetsByPath: webhookTargets,
3440
- target,
3441
- route: {
3442
- auth: "plugin",
3443
- match: "exact",
3444
- pluginId: "bluebubbles",
3445
- source: "bluebubbles-webhook",
3446
- accountId: target.account.accountId,
3447
- log: target.runtime.log,
3448
- handler: async (req, res) => {
3449
- if (!await handleBlueBubblesWebhookRequest(req, res) && !res.headersSent) {
3450
- res.statusCode = 404;
3451
- res.setHeader("Content-Type", "text/plain; charset=utf-8");
3452
- res.end("Not Found");
3453
- }
3454
- }
3455
- }
3456
- });
3457
- return () => {
3458
- registered.unregister();
3459
- debounceRegistry.removeDebouncer(registered.target);
3460
- };
3461
- }
3462
- function parseBlueBubblesWebhookPayload(rawBody) {
3463
- const trimmed = rawBody.trim();
3464
- if (!trimmed) return {
3465
- ok: false,
3466
- error: "empty payload"
3467
- };
3468
- try {
3469
- return {
3470
- ok: true,
3471
- value: JSON.parse(trimmed)
3472
- };
3473
- } catch {
3474
- const params = new URLSearchParams(rawBody);
3475
- const payload = params.get("payload") ?? params.get("data") ?? params.get("message");
3476
- if (!payload) return {
3477
- ok: false,
3478
- error: "invalid json"
3479
- };
3480
- try {
3481
- return {
3482
- ok: true,
3483
- value: JSON.parse(payload)
3484
- };
3485
- } catch (error) {
3486
- return {
3487
- ok: false,
3488
- error: error instanceof Error ? error.message : String(error)
3489
- };
3490
- }
3491
- }
3492
- }
3493
- function asRecord(value) {
3494
- return value && typeof value === "object" && !Array.isArray(value) ? value : null;
3495
- }
3496
- function maskSecret(value) {
3497
- if (value.length <= 6) return "***";
3498
- return `${value.slice(0, 2)}***${value.slice(-2)}`;
3499
- }
3500
- function normalizeAuthToken(raw) {
3501
- const value = raw.trim();
3502
- if (!value) return "";
3503
- if (value.toLowerCase().startsWith("bearer ")) return value.slice(7).trim();
3504
- return value;
3505
- }
3506
- function safeEqualAuthToken(aRaw, bRaw) {
3507
- const a = normalizeAuthToken(aRaw);
3508
- const b = normalizeAuthToken(bRaw);
3509
- if (!a || !b) return false;
3510
- return safeEqualSecret(a, b);
3511
- }
3512
- function collectTrustedProxies(targets) {
3513
- const proxies = /* @__PURE__ */ new Set();
3514
- for (const target of targets) for (const proxy of target.config.gateway?.trustedProxies ?? []) {
3515
- const normalized = proxy.trim();
3516
- if (normalized) proxies.add(normalized);
3517
- }
3518
- return [...proxies];
3519
- }
3520
- function resolveWebhookAllowRealIpFallback(targets) {
3521
- return targets.some((target) => target.config.gateway?.allowRealIpFallback === true);
3522
- }
3523
- function resolveWebhookClientIp(req, trustedProxies, allowRealIpFallback) {
3524
- if (!req.headers["x-forwarded-for"] && !(allowRealIpFallback && req.headers["x-real-ip"])) return req.socket.remoteAddress ?? "unknown";
3525
- return resolveRequestClientIp(req, [...trustedProxies], allowRealIpFallback) ?? req.socket.remoteAddress ?? "unknown";
3526
- }
3527
- async function handleBlueBubblesWebhookRequest(req, res) {
3528
- const requestUrl = new URL(req.url ?? "/", "http://localhost");
3529
- const normalizedPath = normalizeWebhookPath(requestUrl.pathname);
3530
- const pathTargets = webhookTargets.get(normalizedPath) ?? [];
3531
- const clientIp = resolveWebhookClientIp(req, collectTrustedProxies(pathTargets), resolveWebhookAllowRealIpFallback(pathTargets));
3532
- return await withResolvedWebhookRequestPipeline({
3533
- req,
3534
- res,
3535
- targetsByPath: webhookTargets,
3536
- allowMethods: ["POST"],
3537
- rateLimiter: webhookRateLimiter,
3538
- rateLimitKey: `${normalizedPath}:${clientIp}`,
3539
- inFlightLimiter: webhookInFlightLimiter,
3540
- inFlightKey: `${normalizedPath}:${clientIp}`,
3541
- handle: async ({ path, targets }) => {
3542
- const url = requestUrl;
3543
- const guidParam = url.searchParams.get("guid") ?? url.searchParams.get("password");
3544
- const headerToken = req.headers["x-guid"] ?? req.headers["x-password"] ?? req.headers["x-bluebubbles-guid"] ?? req.headers["authorization"];
3545
- const guid = (Array.isArray(headerToken) ? headerToken[0] : headerToken) ?? guidParam ?? "";
3546
- const target = resolveWebhookTargetWithAuthOrRejectSync({
3547
- targets,
3548
- res,
3549
- isMatch: (target) => {
3550
- return safeEqualAuthToken(guid, target.account.config.password?.trim() ?? "");
3551
- }
3552
- });
3553
- if (!target) {
3554
- console.warn(`[bluebubbles] webhook rejected: status=${res.statusCode} path=${path} guid=${maskSecret(url.searchParams.get("guid") ?? url.searchParams.get("password") ?? "")}`);
3555
- return true;
3556
- }
3557
- const body = await readWebhookBodyOrReject({
3558
- req,
3559
- res,
3560
- profile: "post-auth",
3561
- invalidBodyMessage: "invalid payload"
3562
- });
3563
- if (!body.ok) {
3564
- console.warn(`[bluebubbles] webhook rejected: status=${res.statusCode}`);
3565
- return true;
3566
- }
3567
- const parsed = parseBlueBubblesWebhookPayload(body.value);
3568
- if (!parsed.ok) {
3569
- res.statusCode = 400;
3570
- res.end(parsed.error);
3571
- console.warn(`[bluebubbles] webhook rejected: ${parsed.error}`);
3572
- return true;
3573
- }
3574
- const payload = asRecord(parsed.value) ?? {};
3575
- const firstTarget = targets[0];
3576
- if (firstTarget) logVerbose(firstTarget.core, firstTarget.runtime, `webhook received path=${path} keys=${Object.keys(payload).join(",") || "none"}`);
3577
- const eventTypeRaw = payload.type;
3578
- const eventType = typeof eventTypeRaw === "string" ? eventTypeRaw.trim() : "";
3579
- if (eventType && !new Set([
3580
- "new-message",
3581
- "updated-message",
3582
- "message-reaction",
3583
- "reaction"
3584
- ]).has(eventType)) {
3585
- res.statusCode = 200;
3586
- res.end("ok");
3587
- if (firstTarget) logVerbose(firstTarget.core, firstTarget.runtime, `webhook ignored type=${eventType}`);
3588
- return true;
3589
- }
3590
- const reaction = normalizeWebhookReaction(payload);
3591
- if ((eventType === "updated-message" || eventType === "message-reaction" || eventType === "reaction") && !reaction) {
3592
- res.statusCode = 200;
3593
- res.end("ok");
3594
- if (firstTarget) logVerbose(firstTarget.core, firstTarget.runtime, `webhook ignored ${eventType || "event"} without reaction`);
3595
- return true;
3596
- }
3597
- const message = reaction ? null : normalizeWebhookMessage(payload);
3598
- if (!message && !reaction) {
3599
- res.statusCode = 400;
3600
- res.end("invalid payload");
3601
- console.warn("[bluebubbles] webhook rejected: unable to parse message payload");
3602
- return true;
3603
- }
3604
- target.statusSink?.({ lastInboundAt: Date.now() });
3605
- if (reaction) processReaction(reaction, target).catch((err) => {
3606
- target.runtime.error?.(`[${target.account.accountId}] BlueBubbles reaction failed: ${String(err)}`);
3607
- });
3608
- else if (message) debounceRegistry.getOrCreateDebouncer(target).enqueue({
3609
- message,
3610
- target
3611
- }).catch((err) => {
3612
- target.runtime.error?.(`[${target.account.accountId}] BlueBubbles webhook failed: ${String(err)}`);
3613
- });
3614
- res.statusCode = 200;
3615
- res.end("ok");
3616
- if (reaction) {
3617
- if (firstTarget) logVerbose(firstTarget.core, firstTarget.runtime, `webhook accepted reaction sender=${reaction.senderId} msg=${reaction.messageId} action=${reaction.action}`);
3618
- } else if (message) {
3619
- if (firstTarget) logVerbose(firstTarget.core, firstTarget.runtime, `webhook accepted sender=${message.senderId} group=${message.isGroup} chatGuid=${message.chatGuid ?? ""} chatId=${message.chatId ?? ""}`);
3620
- }
3621
- return true;
3622
- }
3623
- });
3624
- }
3625
- async function monitorBlueBubblesProvider(options) {
3626
- const { account, config, runtime, abortSignal, statusSink } = options;
3627
- const core = getBlueBubblesRuntime();
3628
- const path = options.webhookPath?.trim() || "/bluebubbles-webhook";
3629
- const serverInfo = await fetchBlueBubblesServerInfo({
3630
- baseUrl: account.baseUrl,
3631
- password: account.config.password,
3632
- accountId: account.accountId,
3633
- timeoutMs: 5e3,
3634
- allowPrivateNetwork: account.config.allowPrivateNetwork === true
3635
- }).catch(() => null);
3636
- if (serverInfo?.os_version) runtime.log?.(`[${account.accountId}] BlueBubbles server macOS ${serverInfo.os_version}`);
3637
- if (typeof serverInfo?.private_api === "boolean") runtime.log?.(`[${account.accountId}] BlueBubbles Private API ${serverInfo.private_api ? "enabled" : "disabled"}`);
3638
- const unregister = registerBlueBubblesWebhookTarget({
3639
- account,
3640
- config,
3641
- runtime,
3642
- core,
3643
- path,
3644
- statusSink
3645
- });
3646
- return await new Promise((resolve) => {
3647
- const stop = () => {
3648
- unregister();
3649
- resolve();
3650
- };
3651
- if (abortSignal?.aborted) {
3652
- stop();
3653
- return;
3654
- }
3655
- abortSignal?.addEventListener("abort", stop, { once: true });
3656
- runtime.log?.(`[${account.accountId}] BlueBubbles webhook listening on ${normalizeWebhookPath(path)}`);
3657
- });
3658
- }
3659
- //#endregion
3660
- export { addBlueBubblesParticipant as a, removeBlueBubblesParticipant as c, unsendBlueBubblesMessage as d, sendBlueBubblesAttachment as f, sendBlueBubblesMedia as i, renameBlueBubblesChat as l, sendMessageBlueBubbles as m, sendBlueBubblesReaction as n, editBlueBubblesMessage as o, resolveChatGuidForTarget as p, resolveBlueBubblesMessageId as r, leaveBlueBubblesChat as s, monitorBlueBubblesProvider as t, setGroupIconBlueBubbles as u };