@nikolasp98/minion 2026.6.13-dev.20260616002242 → 2026.6.14-dev
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.
- package/dist/{acp-cli-kTGEkIIx.js → acp-cli-CprFYllO.js} +5 -5
- package/dist/{acp-cli-CY3ZQSmH.js → acp-cli-DJXj7cZX.js} +4 -4
- package/dist/{agent-NvyKtiKZ.js → agent-J4Hr7pxJ.js} +11 -11
- package/dist/{agent-step-W6wHZgfJ.js → agent-step-CUlu2Ce1.js} +2 -2
- package/dist/{agent-step-trCkc6Rj.js → agent-step-WEpy2gjj.js} +2 -2
- package/dist/{agents-DU-fozJQ.js → agents-DRnHlywG.js} +7 -7
- package/dist/{agents-list-tool-Bjq3Ps2w.js → agents-list-tool-Bsz2ydSo.js} +3 -3
- package/dist/{agents-list-tool-BT-6FZnx.js → agents-list-tool-C41TUO8C.js} +3 -3
- package/dist/{agents.config-DxAAWodz.js → agents.config-D-8oLvTL.js} +10 -10
- package/dist/{audit-CVKVyKoD.js → audit-CK0BMUWm.js} +10 -10
- package/dist/{audit-CSNd-phC.js → audit-bAFC5ey-.js} +9 -9
- package/dist/{auth-DA9L4qbt.js → auth-2GwvV8-B.js} +1 -1
- package/dist/{auth-B37vkorh.js → auth-CFiHbm6v.js} +1 -1
- package/dist/{auth-choice-CJymzvJ4.js → auth-choice-BwNqfULD.js} +4 -4
- package/dist/{auth-choice-DnBLAQyY.js → auth-choice-xdIz-tqo.js} +4 -4
- package/dist/{banner-BBtmUB00.js → banner-D8U02GWE.js} +1 -1
- package/dist/{browser-cli-CGV5xo5_.js → browser-cli-B4S7q1vd.js} +3 -3
- package/dist/{browser-cli-c6ldGDdr.js → browser-cli-DWWl_3f8.js} +3 -3
- package/dist/{browser-tool-DJyN0sH5.js → browser-tool-C095OFad.js} +7 -7
- package/dist/{browser-tool-BK_39O3I.js → browser-tool-C7x8YFTn.js} +7 -7
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +135 -4
- package/dist/bundled/kg-message-sync/handler.js +3 -2
- package/dist/{call-BWHz092V.js → call-BH1OgnGt.js} +3 -3
- package/dist/{call-CNVcH2oR.js → call-DaiN21tT.js} +2 -2
- package/dist/{call-B6tcVJsz.js → call-lVSGXvNm.js} +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{canvas-tool-KclRfCb5.js → canvas-tool-BCySjCkU.js} +2 -2
- package/dist/{canvas-tool-B_Jq1m6-.js → canvas-tool-b9umP1PL.js} +2 -2
- package/dist/{channel-options-DT1bf8MM.js → channel-options-BhSTHUdE.js} +1 -1
- package/dist/{channel-options-DgcluI6F.js → channel-options-ZnqM-XwR.js} +1 -1
- package/dist/{channel-web-OnWoCODf.js → channel-web-mnjuaCAM.js} +135 -11
- package/dist/{channels-cli-BL_JtRd0.js → channels-cli-1YxtVy6F.js} +9 -9
- package/dist/{channels-cli-pkIsAVZj.js → channels-cli-DRBRx9Nm.js} +9 -9
- package/dist/{chrome-iX7jX5OS.js → chrome-CZH2epNE.js} +1 -1
- package/dist/{chrome-BdOQVkoq.js → chrome-CayJQXHk.js} +9 -9
- package/dist/{chrome-DgHLQTzd.js → chrome-Kb-zN-1U.js} +2 -2
- package/dist/{clawbot-cli-BbCypmzu.js → clawbot-cli-C5wgbNjN.js} +1 -1
- package/dist/{clawbot-cli-gP0JjrYs.js → clawbot-cli-ryT4wRfh.js} +1 -1
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-DUo3q3T8.js → cli-BNAKtXkb.js} +3 -3
- package/dist/{cli-DkwhxNLS.js → cli-CdMtUWnf.js} +3 -3
- package/dist/{client-0Q0z75AO.js → client-4GINRkn3.js} +4 -4
- package/dist/{client-DGwQr6HD.js → client-A1Af97gJ.js} +4 -4
- package/dist/{client-DfeeU2OG.js → client-DhI_slxY.js} +4 -4
- package/dist/{client-u0H6YbL4.js → client-uZBU4o0-.js} +3 -3
- package/dist/{command-registry-2dkfDNs9.js → command-registry-CWDswhuz.js} +14 -14
- package/dist/{commands-registry-BHrFiCUX.js → commands-registry-BTS92V47.js} +2 -2
- package/dist/{commands-registry-DJC1InIg.js → commands-registry-DX4D41A4.js} +2 -2
- package/dist/{completion-cli-Dm_zSHn2.js → completion-cli-DNXaHtYm.js} +2 -2
- package/dist/{completion-cli-bn0-ohfm.js → completion-cli-DlHakkCA.js} +1 -1
- package/dist/{config-IIUu4YLi.js → config-Bad23vig.js} +3 -2
- package/dist/{config-CwI9qbLc.js → config-CJnHZ6tT.js} +2 -2
- package/dist/{config-CA9SbGZY.js → config-ULIrsUrF.js} +2 -2
- package/dist/{config-cli-BEeguDff.js → config-cli-COzM5Son.js} +4 -4
- package/dist/{config-cli-u1-3X8jD.js → config-cli-CzpyxdLG.js} +4 -4
- package/dist/{config-guard-Xxfp-ifF.js → config-guard-BBG7CM4Z.js} +3 -3
- package/dist/config-guard-C1FAfS4d.js +2 -0
- package/dist/{config-validation-Usm6uhfB.js → config-validation-BKuA0mkd.js} +2 -2
- package/dist/{config-validation-CjMhkuMa.js → config-validation-UxIy2sWe.js} +2 -2
- package/dist/{configure-BAZzvoAK.js → configure-52UcMwXn.js} +16 -16
- package/dist/{configure-Cwbp40XK.js → configure-CguZbLMl.js} +16 -16
- package/dist/{cron-cli-Cl7TbLdx.js → cron-cli-36Cz_NrS.js} +1 -1
- package/dist/{cron-cli-CYa3KrF1.js → cron-cli-DEw9bDao.js} +2 -2
- package/dist/{cron-tool-DflVbrpR.js → cron-tool-CnuvVvgq.js} +5 -5
- package/dist/{cron-tool-Dy19nFGY.js → cron-tool-X8kbYPMV.js} +5 -5
- package/dist/{daemon-cli-CPtjgknw.js → daemon-cli-Ca2eoh9D.js} +10 -10
- package/dist/{daemon-cli-CixlpEWT.js → daemon-cli-hj5oZeAU.js} +10 -10
- package/dist/daemon-cli.js +3 -2
- package/dist/daemon-install-helpers-D8fSRI0T.js +2 -0
- package/dist/daemon-install-helpers-DE1SJAht.js +2 -0
- package/dist/{daemon-runtime-thnunPGe.js → daemon-runtime-C0UWsej_.js} +1 -1
- package/dist/{daemon-runtime-BBIRyrKV.js → daemon-runtime-Dy-OUc18.js} +1 -1
- package/dist/{deliver-arEeQQHJ.js → deliver-BY_ZOJRJ.js} +5 -5
- package/dist/{deliver-H-iXFEE3.js → deliver-C1bBl42n.js} +3 -3
- package/dist/{deliver-CiN28QCt.js → deliver-DWPdKF44.js} +4 -4
- package/dist/{deps-D2eJTtWY.js → deps-DKuRLHBG.js} +6 -6
- package/dist/{devices-cli-CopnBFlo.js → devices-cli-BO2sNHNT.js} +1 -1
- package/dist/{devices-cli-BbA-NIxI.js → devices-cli-R0IkbrZu.js} +1 -1
- package/dist/{diagnostic-ClPdIo6B.js → diagnostic-Cl3uEh1I.js} +2 -2
- package/dist/{diagnostic-session-state-DD4itobG.js → diagnostic-session-state-Dq0GGJN-.js} +1 -1
- package/dist/{directory-cli-DITx4-po.js → directory-cli-CnUwk0iU.js} +2 -2
- package/dist/{directory-cli-Cs7AaG6k.js → directory-cli-DIbzMmUN.js} +2 -2
- package/dist/{dispatcher-BquAzCBK.js → dispatcher-MqSl1Kll.js} +7 -7
- package/dist/{dispatcher-SwUaqpQn.js → dispatcher-c-KZCtGa.js} +7 -7
- package/dist/{dm-policy-shared-BJYbc9e8.js → dm-policy-shared-CLiep-rz.js} +1 -1
- package/dist/{dm-policy-shared-CTl4t1cw.js → dm-policy-shared-yrgSr7PQ.js} +1 -1
- package/dist/{dns-cli-DqHzqw6d.js → dns-cli-CdL5VTsQ.js} +2 -2
- package/dist/{dns-cli-RRJtkcWo.js → dns-cli-uEzvZGuy.js} +2 -2
- package/dist/{doctor-completion-D990pj_f.js → doctor-completion-BIO1ml-4.js} +1 -1
- package/dist/doctor-completion-C-6V4bOL.js +2 -0
- package/dist/doctor-completion-Da18q6uh.js +2 -0
- package/dist/{doctor-completion-C2pKqEpP.js → doctor-completion-FE-HOhGA.js} +1 -1
- package/dist/{doctor-config-flow-Bln3MBNa.js → doctor-config-flow-CmGTYs67.js} +4 -4
- package/dist/{doctor-config-flow-Cuo1wlhB.js → doctor-config-flow-I-c9EB6e.js} +4 -4
- package/dist/entry.js +1 -1
- package/dist/{exec-approvals-cli-DyuaC7iM.js → exec-approvals-cli-BB6UI3mC.js} +2 -2
- package/dist/{exec-approvals-cli-B3afwmyy.js → exec-approvals-cli-DMlA8VUt.js} +2 -2
- package/dist/extensionAPI.d.ts +8 -0
- package/dist/extensionAPI.js +19 -19
- package/dist/{gateway-BTIu_WkF.js → gateway-C2etf3RM.js} +2 -2
- package/dist/{gateway-DWsA8AiN.js → gateway-CHsNxUxJ.js} +3 -3
- package/dist/{gateway-BWFLBWYE.js → gateway-CzCJQJHj.js} +3 -3
- package/dist/{gateway-cli-dYwREBbX.js → gateway-cli-B1dfOPMr.js} +159 -46
- package/dist/{gateway-cli-tfnPzrS0.js → gateway-cli-CDqZzGEK.js} +156 -43
- package/dist/{gateway-rpc-iUcohgOC.js → gateway-rpc-BorRW-tW.js} +1 -1
- package/dist/{gateway-rpc-DISv5FNW.js → gateway-rpc-DoWGDu53.js} +1 -1
- package/dist/{gateway-tool-V3nv-rvF.js → gateway-tool-CuLoIl7U.js} +3 -3
- package/dist/{gateway-tool-DdO8pujW.js → gateway-tool-uPKHvWcL.js} +3 -3
- package/dist/{github-copilot-auth-LwJGzpHj.js → github-copilot-auth-D2cXK0_7.js} +2 -2
- package/dist/{github-copilot-auth-6IEffFos.js → github-copilot-auth-Ddd7lvDL.js} +2 -2
- package/dist/{gmail-BuoyV4Np.js → gmail-D7l5YfAj.js} +1 -1
- package/dist/{gmail-BGbBY8iR.js → gmail-DQ48jQY-.js} +1 -1
- package/dist/{health-C7z2veIZ.js → health-CH0w5W34.js} +8 -8
- package/dist/{health-dMwMuCHD.js → health-D6n9mIOb.js} +8 -8
- package/dist/{hooks-cli-DpQ0Kkho.js → hooks-cli-CGWUEOpl.js} +2 -2
- package/dist/{hooks-cli-BMWKPVJp.js → hooks-cli-Qo6rhZ-q.js} +2 -2
- package/dist/{image-tool-D8wDxkRx.js → image-tool-B4fKiKu2.js} +2 -2
- package/dist/{image-tool-BqYO5O-3.js → image-tool-cib2VJkE.js} +2 -2
- package/dist/index.d.ts +9 -1
- package/dist/index.js +11 -11
- package/dist/{io-87ZCDtw1.js → io-D2T0KwYe.js} +2 -2
- package/dist/{io-dX6aN0-I.js → io-DWhsHb_h.js} +2 -2
- package/dist/{ir-xoKEMB_a.js → ir-_p6R0VXT.js} +2 -2
- package/dist/{knowledge-graph-BGqH6iEp.js → knowledge-graph-BKiuRnet.js} +1 -1
- package/dist/{lifecycle-core-D18AVKAw.js → lifecycle-core-DNqSLiR9.js} +3 -3
- package/dist/{lifecycle-core-CbEHpJjT.js → lifecycle-core-Dv6Y2s-1.js} +3 -3
- package/dist/{logs-cli-DgTaWydw.js → logs-cli-CXmi40WH.js} +2 -2
- package/dist/{logs-cli-CxWlPKlR.js → logs-cli-F-RAYI31.js} +2 -2
- package/dist/{manager-Ceza2Enp.js → manager-F7rDzi-_.js} +1 -1
- package/dist/{memory-cli-69-WrgnA.js → memory-cli-BVkodFu6.js} +3 -3
- package/dist/{memory-cli-fZmRRpWO.js → memory-cli-BYpHkFGw.js} +3 -3
- package/dist/{message-action-runner-DmbKeTkL.js → message-action-runner-CHrxSkge.js} +8 -8
- package/dist/{message-action-runner-BzauIqNS.js → message-action-runner-Dvk8IFpi.js} +8 -8
- package/dist/{message-tool-D5vrOcc4.js → message-tool-Be2kTIap.js} +6 -6
- package/dist/{message-tool-iJgtmRac.js → message-tool-CiPoXKtK.js} +6 -6
- package/dist/{model-catalog-BJJu7Y-K.js → model-catalog-DXonO3lD.js} +3 -3
- package/dist/{model-catalog-BJhTT_te.js → model-catalog-DdYPZDj0.js} +3 -3
- package/dist/{model-fallback-B_IR4wM4.js → model-fallback-DGrCGjis.js} +2 -2
- package/dist/{model-fallback-Cui8eNG0.js → model-fallback-DLcFpp9D.js} +3 -3
- package/dist/{model-fallback-DYdnIwoN.js → model-fallback-p7Wjn4Kg.js} +2 -2
- package/dist/{model-picker-DEZvfOtG.js → model-picker-CyF7R1Tk.js} +2 -2
- package/dist/{model-picker-BUeGAdfA.js → model-picker-DCN-zikS.js} +2 -2
- package/dist/{models-BKe2GIMf.js → models-C5NIvGQG.js} +12 -12
- package/dist/{models-cli-BgOzFK8J.js → models-cli-B-je-Fu6.js} +12 -12
- package/dist/{models-cli-D60Kkk8t.js → models-cli-C8GHr5Hc.js} +2 -2
- package/dist/{models-config-1NUFoR9h.js → models-config-DFTdHeZz.js} +2 -2
- package/dist/{models-config-sRpD9gQX.js → models-config-Dof8o9K-.js} +2 -2
- package/dist/{node-cli-DcjfrDaJ.js → node-cli-D0BhKuQM.js} +8 -8
- package/dist/{node-cli-Cv8gJpVW.js → node-cli-DhI2IgpK.js} +7 -7
- package/dist/{nodes-cli-CrlzYOkD.js → nodes-cli-Do4SOfRe.js} +5 -5
- package/dist/{nodes-cli-CLcrtfzN.js → nodes-cli-NTSdtNbM.js} +5 -5
- package/dist/{nodes-tool-DxpsNk1k.js → nodes-tool-B542JltK.js} +3 -3
- package/dist/{nodes-tool-ClqhSf4V.js → nodes-tool-gc0MeY8U.js} +3 -3
- package/dist/{nodes-utils-sk7SkOXJ.js → nodes-utils-BQ7_niGR.js} +1 -1
- package/dist/{nodes-utils-BAdzWq2Z.js → nodes-utils-DnVqS0gT.js} +1 -1
- package/dist/{nodes-utils-BMk2WuF2.js → nodes-utils-ESP44qeB.js} +1 -1
- package/dist/{onboard-DSgqWhz9.js → onboard-BrlNrDZR.js} +9 -9
- package/dist/{onboard-CD26erRG.js → onboard-DMdVqbJu.js} +9 -9
- package/dist/{onboard-channels-DYFmi11t.js → onboard-channels-B1odq8Pa.js} +1 -1
- package/dist/{onboard-channels-hoFDJFqN.js → onboard-channels-Bc0EWbkF.js} +1 -1
- package/dist/{onboard-channels-7nKLIMZ3.js → onboard-channels-CUT7TFAB.js} +1 -1
- package/dist/{onboard-channels-cgYswAAH.js → onboard-channels-DOws7yCU.js} +1 -1
- package/dist/{onboard-custom-Df3juWaB.js → onboard-custom-BTix-4gH.js} +2 -2
- package/dist/{onboard-custom-34QHYqay.js → onboard-custom-BlENe6tw.js} +1 -1
- package/dist/{onboard-custom-Cqc78i5P.js → onboard-custom-D9bbjX37.js} +2 -2
- package/dist/{onboard-custom-DQtlANRQ.js → onboard-custom-vNW9mjEy.js} +1 -1
- package/dist/{onboard-helpers-BxF3w4R5.js → onboard-helpers-CdkG3FJh.js} +5 -5
- package/dist/{onboard-helpers-CqjBXWOv.js → onboard-helpers-DOL7XT5w.js} +5 -5
- package/dist/{onboard-helpers-BzUHCvbd.js → onboard-helpers-DdV4FalP.js} +1 -1
- package/dist/{onboard-helpers-Cq-3sSbO.js → onboard-helpers-DvYmk4Z3.js} +1 -1
- package/dist/{onboard-remote-C4q8kRBm.js → onboard-remote-BE9WGIMB.js} +1 -1
- package/dist/{onboard-remote-CI039uE3.js → onboard-remote-CuhFGRCe.js} +1 -1
- package/dist/{onboard-skills-Dj1Dv2eJ.js → onboard-skills-B_t8vkkr.js} +1 -1
- package/dist/{onboard-skills-pc4sx1KV.js → onboard-skills-C208Z9aR.js} +1 -1
- package/dist/{onboarding-BJJPdTA6.js → onboarding-CBci11Hg.js} +11 -11
- package/dist/{onboarding-BxUShaVW.js → onboarding-wvCvkHuu.js} +11 -11
- package/dist/{onboarding.finalize-0e4Y8XBC.js → onboarding.finalize-BpeG_LfA.js} +9 -9
- package/dist/{onboarding.finalize-Cvhs2ymL.js → onboarding.finalize-IotPPzAe.js} +9 -9
- package/dist/{onboarding.gateway-config-Dd7Bt_0f.js → onboarding.gateway-config-CwSyOHdM.js} +3 -3
- package/dist/{onboarding.gateway-config-Dz2G7TSt.js → onboarding.gateway-config-D7bpPGDg.js} +3 -3
- package/dist/{outbound-send-deps-BECNMA9x.js → outbound-send-deps-BiCPa0bu.js} +6 -6
- package/dist/{outbound-session-BjJ_Kc2p.js → outbound-session-bdqdT6c0.js} +3 -3
- package/dist/{outbound-session-CrmR7m5Y.js → outbound-session-gwItY5Kf.js} +3 -3
- package/dist/{pairing-cli-Cnm45Q28.js → pairing-cli-CHcYti9d.js} +2 -2
- package/dist/{pairing-cli-CZv6ewRZ.js → pairing-cli-GMcpfddm.js} +2 -2
- package/dist/{pi-embedded-helpers-D9fHlhyc.js → pi-embedded-helpers-BFVQgHYJ.js} +1 -1
- package/dist/{pi-embedded-helpers-BjCYyLg-.js → pi-embedded-helpers-D6pGhqgI.js} +1 -1
- package/dist/{pi-embedded-helpers-6Q0O7Ax2.js → pi-embedded-helpers-RpDIkqxG.js} +5 -5
- package/dist/{pi-embedded-utils-BsHXtv_s.js → pi-embedded-utils-BEjLqKiL.js} +1 -1
- package/dist/{pi-embedded-utils-BsyXOK3B.js → pi-embedded-utils-Dl07kvbm.js} +1 -1
- package/dist/{pi-embedded-utils-DFygU0Hq.js → pi-embedded-utils-g5GthbqM.js} +1 -1
- package/dist/{pi-model-discovery-C9mzQkkq.js → pi-model-discovery-CQ80N8DY.js} +1 -1
- package/dist/{pi-tools.policy-CyixHAJx.js → pi-tools.policy-CixzOy4m.js} +3 -3
- package/dist/{plugin-registry-ClQCYDgr.js → plugin-registry-C7Y1ktn8.js} +3 -3
- package/dist/{plugin-registry-DubVIcYb.js → plugin-registry-DG11DxET.js} +3 -3
- package/dist/plugin-sdk/channels/discord.js +5 -3
- package/dist/plugin-sdk/channels/imessage.js +5 -3
- package/dist/plugin-sdk/channels/line.js +5 -3
- package/dist/plugin-sdk/channels/signal.js +5 -3
- package/dist/plugin-sdk/channels/slack.js +5 -3
- package/dist/plugin-sdk/channels/telegram.js +5 -3
- package/dist/plugin-sdk/channels/whatsapp.js +133 -4
- package/dist/plugin-sdk/config/types.gateway.d.ts +8 -0
- package/dist/plugin-sdk/config/zod-schema.d.ts +2 -0
- package/dist/plugin-sdk/core.js +5 -3
- package/dist/plugin-sdk/index.js +145 -16
- package/dist/plugin-sdk/infra/message-ledger-types.d.ts +6 -0
- package/dist/plugin-sdk/web/inbound/history-import.d.ts +58 -0
- package/dist/{plugins-cli-Cfbth6wy.js → plugins-cli-B33-EmSv.js} +4 -4
- package/dist/{plugins-cli-D1J1FjPZ.js → plugins-cli-BqzvGR-a.js} +4 -4
- package/dist/{program-BNOboVLd.js → program-DFexBhzE.js} +7 -7
- package/dist/{program-context-BvgimNof.js → program-context-BIlin27i.js} +42 -42
- package/dist/{prompt-select-styled-DOQApqqL.js → prompt-select-styled-D9INOuHo.js} +17 -17
- package/dist/{prompt-select-styled-CHhLDpFu.js → prompt-select-styled-DZxjZuQr.js} +17 -17
- package/dist/{push-apns-5-A137dF.js → push-apns-BjSGKBDn.js} +1 -1
- package/dist/{push-apns-BvtEOSzu.js → push-apns-Ce38yX-Q.js} +1 -1
- package/dist/{pw-ai-DBZCBB4A.js → pw-ai-B_yVsa7Y.js} +2 -2
- package/dist/{pw-ai-Dx-tC4ae.js → pw-ai-C3UXWAMi.js} +2 -2
- package/dist/{pw-ai-BUcuFzUA.js → pw-ai-DvZZMf9c.js} +2 -2
- package/dist/{pw-session-kvSkXTk5.js → pw-session-B-QP5UUg.js} +1 -1
- package/dist/{pw-session-HCWghVEO.js → pw-session-Bn2nA7mW.js} +1 -1
- package/dist/{pw-session-BxADE7ph.js → pw-session-ChISCyZS.js} +1 -1
- package/dist/{qr-cli-DhrNhN70.js → qr-cli-Bp8ZDWRE.js} +2 -2
- package/dist/{qr-cli-BmQ0-kcz.js → qr-cli-CNBJBiSg.js} +2 -2
- package/dist/{register.agent-Ch4E7Trn.js → register.agent-1ElLtqxB.js} +11 -11
- package/dist/{register.agent-ePYKy7GS.js → register.agent-BCCRMjBM.js} +8 -8
- package/dist/{register.channel-BvMIoupc.js → register.channel-CDRcmrW4.js} +2 -2
- package/dist/{register.channel-i4nFvWL2.js → register.channel-G0ZEQLvo.js} +2 -2
- package/dist/{register.configure-CKAivet1.js → register.configure-Br7l1eFA.js} +1 -1
- package/dist/{register.configure-DsYxhGCx.js → register.configure-uiB0IsSQ.js} +1 -1
- package/dist/{register.drone-JMpj1kWD.js → register.drone-0RImKhAz.js} +1 -1
- package/dist/{register.drone-DbyctqRy.js → register.drone-BVF23SAt.js} +1 -1
- package/dist/{register.maintenance-Bu5pNqR_.js → register.maintenance-D9g-yUsg.js} +5 -5
- package/dist/{register.maintenance-DlC9bFYr.js → register.maintenance-eWyQPi33.js} +5 -5
- package/dist/{register.message-DcZ38zPO.js → register.message-BrCxdS2X.js} +7 -7
- package/dist/{register.message-Bf3mgJmX.js → register.message-DUSrwutp.js} +8 -8
- package/dist/{register.onboard-Dq7qoeNn.js → register.onboard-CrTJnVfV.js} +1 -1
- package/dist/{register.onboard-CxuGjpvJ.js → register.onboard-DIo41tyc.js} +1 -1
- package/dist/{register.setup-7yUmHKiQ.js → register.setup-B_rBQxV8.js} +4 -4
- package/dist/{register.setup-BRljJtzO.js → register.setup-CYWQ8_Yg.js} +4 -4
- package/dist/{register.status-health-sessions-D8OPDFDo.js → register.status-health-sessions-CJla4eSY.js} +4 -4
- package/dist/{register.status-health-sessions-Be0pjOA2.js → register.status-health-sessions-DEa6PmDF.js} +6 -6
- package/dist/{register.subclis-BPX_ca3K.js → register.subclis-Dnq_ylof.js} +29 -29
- package/dist/{reply-DhwT8t3q.js → reply-D0CQyMj1.js} +40 -39
- package/dist/{reply-payloads-cXLwMDmA.js → reply-payloads-CSe-fnoQ.js} +2 -2
- package/dist/{reply-payloads-D_-_qjhk.js → reply-payloads-Doc7XJEA.js} +2 -2
- package/dist/{reply-prefix-DiUpMQsM.js → reply-prefix-Bf6xFewe.js} +1 -1
- package/dist/{reply-prefix-BsvRxJqb.js → reply-prefix-Dc5AW5Xm.js} +1 -1
- package/dist/{resolve-route-3TryCcGm.js → resolve-route-Bxvuje16.js} +1 -1
- package/dist/{resolve-route-BuDsUAp2.js → resolve-route-x8nX2Bvi.js} +2 -2
- package/dist/{routes-RPx8uptv.js → routes-CoNeVaLo.js} +4 -4
- package/dist/{routes-CDAhBrqH.js → routes-DkOoca7t.js} +4 -4
- package/dist/{rpc-0sy58ASH.js → rpc-BHHw6gvp.js} +1 -1
- package/dist/{rpc-CjI--xg8.js → rpc-DTW7KUND.js} +1 -1
- package/dist/{run-main-DafJY5Bc.js → run-main-E2vGCKLR.js} +20 -20
- package/dist/{sandbox-BGpWI5iG.js → sandbox-CGRbJpDU.js} +7 -7
- package/dist/{sandbox-zkn40jkP.js → sandbox-CHH3MkNd.js} +7 -7
- package/dist/{sandbox-cli-DFOcSc1Z.js → sandbox-cli-DjkEUwwk.js} +4 -4
- package/dist/{sandbox-cli-C_MWJfnl.js → sandbox-cli-OEmHLhQL.js} +4 -4
- package/dist/{security-cli-DXC4pUs9.js → security-cli-DL6wp1MI.js} +3 -3
- package/dist/{security-cli-DHaI2M0u.js → security-cli-qLsZmwtX.js} +3 -3
- package/dist/{send-DtzYU8UN.js → send-B8eQkbyo.js} +2 -2
- package/dist/{send-DRXqsNed.js → send-Bz-RkmpO.js} +2 -2
- package/dist/{send-DcbsEBHN.js → send-CCuZYSz3.js} +2 -2
- package/dist/{send-Cq75lYpq.js → send-CKeIogyK.js} +3 -3
- package/dist/{send-CQlBivex.js → send-CN13UpNn.js} +2 -2
- package/dist/{send-CnfQshKG.js → send-CngzhczN.js} +2 -2
- package/dist/{send-DSNvHzo2.js → send-DmxWOwB1.js} +2 -2
- package/dist/{send-BAGR79bg.js → send-Dy5OuEh7.js} +2 -2
- package/dist/{send-ChdxopHM.js → send-Li3zMEsA.js} +3 -3
- package/dist/{server-context-B5J56_wO.js → server-context-BLCsEJmC.js} +7 -7
- package/dist/{server-context-CpEmSoJu.js → server-context-CyRjTQlV.js} +7 -7
- package/dist/{server-context-BmpZ_o4F.js → server-context-DKIIU2b6.js} +5 -5
- package/dist/{server-node-events-CXzX6Y8i.js → server-node-events-DRsJK9ry.js} +10 -10
- package/dist/{server-node-events-2YO5oqx8.js → server-node-events-K-ULgWe3.js} +8 -8
- package/dist/{session-status-tool-BmqwcbLx.js → session-status-tool-_pn0YBwS.js} +7 -7
- package/dist/{session-status-tool-xGk_5uUB.js → session-status-tool-fZyi-JB4.js} +6 -6
- package/dist/{session-utils-C6V1m0Vd.js → session-utils-JpLf3m4T.js} +4 -4
- package/dist/{sessions-DbE8BbaC.js → sessions-CT7bhDNg.js} +4 -4
- package/dist/{sessions-C8o68kYY.js → sessions-CeClbleZ.js} +1 -1
- package/dist/{sessions-D1kXHQLO.js → sessions-DYp3Y72l.js} +3 -3
- package/dist/{sessions-BUJYqVut.js → sessions-DlMPB0jU.js} +3 -3
- package/dist/{sessions-helpers-D9_LcHW9.js → sessions-helpers-B4-7MIpM.js} +3 -3
- package/dist/{sessions-helpers-BbVA3qd5.js → sessions-helpers-CtUSER6R.js} +3 -3
- package/dist/{sessions-helpers-CAPPYXKN.js → sessions-helpers-DpSgUfas.js} +3 -3
- package/dist/{sessions-history-tool-BQLaFhrp.js → sessions-history-tool-Bh9spkpj.js} +5 -5
- package/dist/{sessions-history-tool-DJcUto6R.js → sessions-history-tool-dLSlgm-R.js} +5 -5
- package/dist/{sessions-list-tool-CSC9avk_.js → sessions-list-tool-CvZ_yxT5.js} +5 -5
- package/dist/{sessions-list-tool-BL4MdjbT.js → sessions-list-tool-Dr0jWvaF.js} +5 -5
- package/dist/{sessions-send-tool-z8adTMYm.js → sessions-send-tool-CEJy5Ycp.js} +5 -5
- package/dist/{sessions-send-tool-Cl_QuA26.js → sessions-send-tool-v4fWraD9.js} +5 -5
- package/dist/{sessions-spawn-tool-nG9L-ws3.js → sessions-spawn-tool-CfHjjhO1.js} +1 -1
- package/dist/{sessions-spawn-tool-CD-4mZEp.js → sessions-spawn-tool-DLFvrCQh.js} +1 -1
- package/dist/{shared-ChHpaKWN.js → shared-CEynHIUO.js} +2 -2
- package/dist/{shared-JG7DJRnN.js → shared-CvY-toLn.js} +2 -2
- package/dist/{skills-cli-DeiubHew.js → skills-cli-BDxwDf45.js} +2 -2
- package/dist/{skills-cli-B3OA3JEO.js → skills-cli-DRInfkS0.js} +2 -2
- package/dist/{status-DGBXWkfl.js → status-C2Gnsrky.js} +3 -3
- package/dist/{status-D0e-3_81.js → status-CaWXyjbk.js} +12 -12
- package/dist/{status-BTAp_Ctp.js → status-Cbd-T-8e.js} +3 -3
- package/dist/{status-DvuC2ZVh.js → status-CtTyPHvB.js} +13 -13
- package/dist/{status.update-BhAeIdYw.js → status.update-CYQXDEMu.js} +1 -1
- package/dist/{status.update-CwCKgSCv.js → status.update-DNHW4Mlx.js} +1 -1
- package/dist/{subagent-registry-Dr8IyuUy.js → subagent-registry-C4Xeveht.js} +41 -40
- package/dist/{subagents-tool-D8diKIHn.js → subagents-tool-BHb3ywK_.js} +6 -6
- package/dist/{subagents-tool-Fdhl4edt.js → subagents-tool-CGAEUIiu.js} +6 -6
- package/dist/{system-cli--9cvYplv.js → system-cli-B04yqmhf.js} +1 -1
- package/dist/{system-cli-CPDkQ624.js → system-cli-D_OwQRD2.js} +1 -1
- package/dist/{systemd-hints-BkXFTPT6.js → systemd-hints-Dtvkhe6-.js} +1 -1
- package/dist/{systemd-hints-DscCaFfc.js → systemd-hints-bD1RRy6m.js} +1 -1
- package/dist/{tailscale-B-h5FPXf.js → tailscale-CTwxLN7C.js} +3 -3
- package/dist/{tailscale-EgZafNge.js → tailscale-DztQ748s.js} +3 -3
- package/dist/{targets-F13czdSg.js → targets-ClLWbDD3.js} +1 -1
- package/dist/{tools-BOIsoaYH.js → tools-DHQl5ndU.js} +31 -30
- package/dist/{tools-cli-_y-n31XD.js → tools-cli-BW8kXqVK.js} +3 -3
- package/dist/{tools-cli-CK_K0-Iu.js → tools-cli-Bllm2jJj.js} +3 -3
- package/dist/{tts-5tm68-op.js → tts-BIIXe002.js} +1 -1
- package/dist/{tts-tool-C3UBjBDz.js → tts-tool-BIGYsbDN.js} +2 -2
- package/dist/{tts-tool-oyXCB2AA.js → tts-tool-BSrhnCjz.js} +2 -2
- package/dist/{tui-vUCv9pxi.js → tui-CZgCvWW1.js} +5 -5
- package/dist/{tui-KIOXfr10.js → tui-D-Vx6Gw3.js} +6 -6
- package/dist/{tui-cli-DWemmuIC.js → tui-cli-BfrtMM0o.js} +1 -1
- package/dist/{tui-cli-8g3-kGSb.js → tui-cli-Cc9b7CCN.js} +1 -1
- package/dist/{update-cli-DpDtC2Nb.js → update-cli-Bo37T55x.js} +8 -8
- package/dist/{update-cli-CNUaJqhY.js → update-cli-tkEb6Xq8.js} +8 -8
- package/dist/{validation-BNYj_b3N.js → validation-CG8Ui8_v.js} +2 -1
- package/dist/{validation-B0-Z-cLg.js → validation-T0CNq_JP.js} +2 -1
- package/dist/web-CAiLxEl2.js +2 -0
- package/dist/{web-CmaUi26F.js → web-DADihYVj.js} +8 -8
- package/dist/{web-search-ivwGo7WE.js → web-search-CGUGt246.js} +4 -4
- package/dist/{web-search-HRdWbyJV.js → web-search-D6Qi_dj3.js} +4 -4
- package/dist/{webhooks-cli-D60UbI06.js → webhooks-cli-BBWQzvqb.js} +4 -4
- package/dist/{webhooks-cli-ChRo9bvp.js → webhooks-cli-BZJlzHtN.js} +4 -4
- package/dist/{workspace-CcTveER4.js → workspace-5GvwPOFe.js} +1 -1
- package/dist/{workspace-dirs-Dms2kv8S.js → workspace-dirs-BchHf5Yd.js} +3 -3
- package/extensions/bluebubbles/index.js +2 -1
- package/extensions/feishu/index.js +2 -1
- package/extensions/flows/index.js +2 -1
- package/extensions/googlechat/index.js +2 -1
- package/extensions/irc/index.js +2 -1
- package/extensions/matrix/{credentials-MdwNeLfw.mjs → credentials-B1q3x-N0.mjs} +2 -1
- package/extensions/matrix/index.js +3 -3
- package/extensions/matrix/{matrix-BXJXoQAx.mjs → matrix-B9amoffh.mjs} +2 -2
- package/extensions/matrix/{resolve-targets-BJoLSX6e.mjs → resolve-targets-Dw7tv-7K.mjs} +2 -2
- package/extensions/mattermost/index.js +2 -1
- package/extensions/nextcloud-talk/index.js +2 -1
- package/extensions/wati/index.js +2 -1
- package/extensions/weixin/index.js +2 -1
- package/extensions/zalo/index.js +2 -1
- package/extensions/zalouser/index.js +2 -1
- package/package.json +3 -2
- package/dist/config-guard-B6sYyIlj.js +0 -2
- package/dist/daemon-install-helpers-CHH0UDkE.js +0 -2
- package/dist/daemon-install-helpers-CxjJzXqx.js +0 -2
- package/dist/doctor-completion-BrP8lQb_.js +0 -2
- package/dist/doctor-completion-CJTpKe6j.js +0 -2
- package/dist/web-BoQgU3SR.js +0 -2
|
@@ -10623,7 +10623,7 @@ var init_dotenv = __esmMin((() => {
|
|
|
10623
10623
|
//#region src/version.ts
|
|
10624
10624
|
var VERSION;
|
|
10625
10625
|
var init_version$1 = __esmMin((() => {
|
|
10626
|
-
VERSION = "2026.6.
|
|
10626
|
+
VERSION = "2026.6.14-dev";
|
|
10627
10627
|
}));
|
|
10628
10628
|
//#endregion
|
|
10629
10629
|
//#region src/config/agent-dirs.ts
|
|
@@ -15731,7 +15731,8 @@ var init_zod_schema = __esmMin((() => {
|
|
|
15731
15731
|
channelHealthCheckMinutes: z.number().int().min(0).optional(),
|
|
15732
15732
|
messageLedger: z.object({
|
|
15733
15733
|
enabled: z.boolean().optional(),
|
|
15734
|
-
dbPath: z.string().optional()
|
|
15734
|
+
dbPath: z.string().optional(),
|
|
15735
|
+
importContacts: z.boolean().optional()
|
|
15735
15736
|
}).strict().optional(),
|
|
15736
15737
|
memorySync: z.object({ enabled: z.boolean().optional() }).strict().optional(),
|
|
15737
15738
|
personalAgentObservations: z.object({
|
|
@@ -62286,7 +62287,7 @@ function normalizeLedgerRecord(input) {
|
|
|
62286
62287
|
const metadata = { ...input.metadata && typeof input.metadata === "object" ? input.metadata : {} };
|
|
62287
62288
|
for (const [key, value] of Object.entries(input)) if (!KNOWN_KEYS.has(key) && value !== void 0) metadata[key] = value;
|
|
62288
62289
|
return {
|
|
62289
|
-
clientId: randomUUID(),
|
|
62290
|
+
clientId: str(input.clientId) ?? randomUUID(),
|
|
62290
62291
|
direction: input.direction === "outbound" ? "outbound" : "inbound",
|
|
62291
62292
|
channel: input.channel,
|
|
62292
62293
|
accountId: str(input.accountId),
|
|
@@ -62309,6 +62310,7 @@ function normalizeLedgerRecord(input) {
|
|
|
62309
62310
|
var KNOWN_KEYS, str, bool;
|
|
62310
62311
|
var init_message_ledger_types = __esmMin((() => {
|
|
62311
62312
|
KNOWN_KEYS = new Set([
|
|
62313
|
+
"clientId",
|
|
62312
62314
|
"direction",
|
|
62313
62315
|
"channel",
|
|
62314
62316
|
"accountId",
|
|
@@ -115147,6 +115149,10 @@ async function createWaSocket(printQr, verbose, opts = {}) {
|
|
|
115147
115149
|
maybeRestoreCredsFromBackup(authDir);
|
|
115148
115150
|
const { state, saveCreds } = await useMultiFileAuthState(authDir);
|
|
115149
115151
|
const { version } = await fetchLatestBaileysVersion();
|
|
115152
|
+
let syncFullHistory = false;
|
|
115153
|
+
try {
|
|
115154
|
+
syncFullHistory = loadConfig().gateway?.messageLedger?.importContacts === true;
|
|
115155
|
+
} catch {}
|
|
115150
115156
|
const sock = makeWASocket({
|
|
115151
115157
|
auth: {
|
|
115152
115158
|
creds: state.creds,
|
|
@@ -115160,7 +115166,7 @@ async function createWaSocket(printQr, verbose, opts = {}) {
|
|
|
115160
115166
|
"cli",
|
|
115161
115167
|
VERSION
|
|
115162
115168
|
],
|
|
115163
|
-
syncFullHistory
|
|
115169
|
+
syncFullHistory,
|
|
115164
115170
|
markOnlineOnConnect: false
|
|
115165
115171
|
});
|
|
115166
115172
|
sock.ev.on("creds.update", () => enqueueSaveCreds(authDir, saveCreds, sessionLogger));
|
|
@@ -115286,6 +115292,7 @@ function formatError(err) {
|
|
|
115286
115292
|
var log$6, credsSaveQueue;
|
|
115287
115293
|
var init_session = __esmMin((() => {
|
|
115288
115294
|
init_command_format();
|
|
115295
|
+
init_config$4();
|
|
115289
115296
|
init_logging$1();
|
|
115290
115297
|
init_chat_trace();
|
|
115291
115298
|
init_subsystem();
|
|
@@ -115748,6 +115755,76 @@ var init_fire_message_inbound = __esmMin((() => {
|
|
|
115748
115755
|
init_hook_runner_global();
|
|
115749
115756
|
}));
|
|
115750
115757
|
//#endregion
|
|
115758
|
+
//#region src/web/inbound/history-import.ts
|
|
115759
|
+
/** Coerce a Baileys conversationTimestamp (number | Long-like) to ms, or null. */
|
|
115760
|
+
function tsToMs(value) {
|
|
115761
|
+
if (typeof value === "number" && Number.isFinite(value)) return value * 1e3;
|
|
115762
|
+
if (value && typeof value === "object" && typeof value.toNumber === "function") {
|
|
115763
|
+
const n = value.toNumber();
|
|
115764
|
+
return Number.isFinite(n) ? n * 1e3 : null;
|
|
115765
|
+
}
|
|
115766
|
+
return null;
|
|
115767
|
+
}
|
|
115768
|
+
function contactName(c) {
|
|
115769
|
+
return (c.name || c.notify || c.verifiedName || c.username || "").trim() || void 0;
|
|
115770
|
+
}
|
|
115771
|
+
/**
|
|
115772
|
+
* Record one idempotent inbound shell row per importable 1:1 person, drawn from
|
|
115773
|
+
* the union of `contacts` and `chats`. Returns the number of distinct people
|
|
115774
|
+
* recorded this call.
|
|
115775
|
+
*/
|
|
115776
|
+
function importWhatsAppPeopleToLedger(args) {
|
|
115777
|
+
const e164Of = (jid) => jid ? args.jidToE164(jid) : null;
|
|
115778
|
+
const names = /* @__PURE__ */ new Map();
|
|
115779
|
+
for (const c of args.contacts ?? []) {
|
|
115780
|
+
const e164 = e164Of(c.phoneNumber) ?? e164Of(c.id);
|
|
115781
|
+
if (!e164) continue;
|
|
115782
|
+
const nm = contactName(c);
|
|
115783
|
+
if (nm) names.set(e164, nm);
|
|
115784
|
+
}
|
|
115785
|
+
const people = /* @__PURE__ */ new Map();
|
|
115786
|
+
const consider = (jid, explicitName, ts) => {
|
|
115787
|
+
if (jid && args.isGroupJid(jid)) return;
|
|
115788
|
+
const e164 = e164Of(jid);
|
|
115789
|
+
if (!e164) return;
|
|
115790
|
+
if (args.selfE164 && e164 === args.selfE164) return;
|
|
115791
|
+
const name = explicitName || names.get(e164);
|
|
115792
|
+
const cur = people.get(e164);
|
|
115793
|
+
if (cur) {
|
|
115794
|
+
if (!cur.name && name) cur.name = name;
|
|
115795
|
+
if (cur.ts == null && ts != null) cur.ts = ts;
|
|
115796
|
+
} else people.set(e164, {
|
|
115797
|
+
name,
|
|
115798
|
+
ts
|
|
115799
|
+
});
|
|
115800
|
+
};
|
|
115801
|
+
for (const c of args.contacts ?? []) consider(c.phoneNumber || c.id, contactName(c), null);
|
|
115802
|
+
for (const chat of args.chats ?? []) consider(chat.id, typeof chat.name === "string" ? chat.name.trim() : void 0, tsToMs(chat.conversationTimestamp));
|
|
115803
|
+
let imported = 0;
|
|
115804
|
+
for (const [e164, p] of people) {
|
|
115805
|
+
args.record({
|
|
115806
|
+
clientId: `wa-import:${args.accountId}:${e164}`,
|
|
115807
|
+
direction: "inbound",
|
|
115808
|
+
channel: "whatsapp",
|
|
115809
|
+
accountId: args.accountId,
|
|
115810
|
+
chatId: e164,
|
|
115811
|
+
senderId: e164,
|
|
115812
|
+
senderName: p.name,
|
|
115813
|
+
isGroup: false,
|
|
115814
|
+
isBot: false,
|
|
115815
|
+
occurredAt: p.ts ?? args.now ?? Date.now(),
|
|
115816
|
+
messageId: `wa-import:${e164}`,
|
|
115817
|
+
metadata: {
|
|
115818
|
+
imported: true,
|
|
115819
|
+
source: "whatsapp-history"
|
|
115820
|
+
}
|
|
115821
|
+
});
|
|
115822
|
+
imported++;
|
|
115823
|
+
}
|
|
115824
|
+
return { imported };
|
|
115825
|
+
}
|
|
115826
|
+
var init_history_import = __esmMin((() => {}));
|
|
115827
|
+
//#endregion
|
|
115751
115828
|
//#region src/web/inbound/access-control.ts
|
|
115752
115829
|
async function checkInboundAccessControl(params) {
|
|
115753
115830
|
const cfg = loadConfig();
|
|
@@ -116323,18 +116400,69 @@ async function monitorWebInbox(options) {
|
|
|
116323
116400
|
}
|
|
116324
116401
|
};
|
|
116325
116402
|
sock.ev.on("connection.update", handleConnectionUpdate);
|
|
116403
|
+
const importContactsEnabled = (() => {
|
|
116404
|
+
try {
|
|
116405
|
+
const cfg = loadConfig();
|
|
116406
|
+
return cfg.gateway?.messageLedger?.enabled === true && cfg.gateway?.messageLedger?.importContacts === true;
|
|
116407
|
+
} catch {
|
|
116408
|
+
return false;
|
|
116409
|
+
}
|
|
116410
|
+
})();
|
|
116411
|
+
const runImport = (label, payload) => {
|
|
116412
|
+
try {
|
|
116413
|
+
const { imported } = importWhatsAppPeopleToLedger({
|
|
116414
|
+
chats: payload.chats ?? [],
|
|
116415
|
+
contacts: payload.contacts ?? [],
|
|
116416
|
+
accountId: options.accountId,
|
|
116417
|
+
selfE164,
|
|
116418
|
+
record,
|
|
116419
|
+
jidToE164: (jid) => jidToE164(jid),
|
|
116420
|
+
isGroupJid: (jid) => isJidGroup(jid) === true
|
|
116421
|
+
});
|
|
116422
|
+
if (imported > 0) inboundConsoleLog.info(`Imported ${imported} WhatsApp ${label} as CRM contact rows (account ${options.accountId})`);
|
|
116423
|
+
} catch (err) {
|
|
116424
|
+
inboundLogger.error({ error: String(err) }, "whatsapp contact import failed");
|
|
116425
|
+
}
|
|
116426
|
+
};
|
|
116427
|
+
const handleHistorySet = (h) => runImport("history", {
|
|
116428
|
+
chats: h.chats,
|
|
116429
|
+
contacts: h.contacts
|
|
116430
|
+
});
|
|
116431
|
+
const handleContactsUpsert = (contacts) => runImport("contacts", { contacts });
|
|
116432
|
+
const handleChatsUpsert = (chats) => runImport("chats", { chats });
|
|
116433
|
+
if (importContactsEnabled) {
|
|
116434
|
+
sock.ev.on("messaging-history.set", handleHistorySet);
|
|
116435
|
+
sock.ev.on("contacts.upsert", handleContactsUpsert);
|
|
116436
|
+
sock.ev.on("chats.upsert", handleChatsUpsert);
|
|
116437
|
+
Promise.resolve().then(() => sock.resyncAppState([
|
|
116438
|
+
"critical_unblock_low",
|
|
116439
|
+
"regular_high",
|
|
116440
|
+
"regular_low",
|
|
116441
|
+
"regular"
|
|
116442
|
+
], true)).catch((err) => inboundLogger.warn({ error: String(err) }, "whatsapp resyncAppState for contact import failed"));
|
|
116443
|
+
}
|
|
116326
116444
|
return {
|
|
116327
116445
|
close: async () => {
|
|
116328
116446
|
try {
|
|
116329
116447
|
const ev = sock.ev;
|
|
116330
116448
|
const messagesUpsertHandler = handleMessagesUpsert;
|
|
116331
116449
|
const connectionUpdateHandler = handleConnectionUpdate;
|
|
116450
|
+
const historyHandler = handleHistorySet;
|
|
116451
|
+
const contactsHandler = handleContactsUpsert;
|
|
116452
|
+
const chatsHandler = handleChatsUpsert;
|
|
116453
|
+
const offImport = (fn) => {
|
|
116454
|
+
fn("messaging-history.set", historyHandler);
|
|
116455
|
+
fn("contacts.upsert", contactsHandler);
|
|
116456
|
+
fn("chats.upsert", chatsHandler);
|
|
116457
|
+
};
|
|
116332
116458
|
if (typeof ev.off === "function") {
|
|
116333
116459
|
ev.off("messages.upsert", messagesUpsertHandler);
|
|
116334
116460
|
ev.off("connection.update", connectionUpdateHandler);
|
|
116461
|
+
if (importContactsEnabled) offImport(ev.off);
|
|
116335
116462
|
} else if (typeof ev.removeListener === "function") {
|
|
116336
116463
|
ev.removeListener("messages.upsert", messagesUpsertHandler);
|
|
116337
116464
|
ev.removeListener("connection.update", connectionUpdateHandler);
|
|
116465
|
+
if (importContactsEnabled) offImport(ev.removeListener);
|
|
116338
116466
|
}
|
|
116339
116467
|
sock.ws?.close();
|
|
116340
116468
|
} catch (err) {
|
|
@@ -116369,6 +116497,9 @@ var init_monitor$1 = __esmMin((() => {
|
|
|
116369
116497
|
init_store$2();
|
|
116370
116498
|
init_hook_runner_global();
|
|
116371
116499
|
init_utils$2();
|
|
116500
|
+
init_config$4();
|
|
116501
|
+
init_message_ledger();
|
|
116502
|
+
init_history_import();
|
|
116372
116503
|
init_session();
|
|
116373
116504
|
init_access_control();
|
|
116374
116505
|
init_dedupe();
|
|
@@ -2533,7 +2533,7 @@ var init_shell_env = __esmMin((() => {
|
|
|
2533
2533
|
//#region src/version.ts
|
|
2534
2534
|
var VERSION;
|
|
2535
2535
|
var init_version$1 = __esmMin((() => {
|
|
2536
|
-
VERSION = "2026.6.
|
|
2536
|
+
VERSION = "2026.6.14-dev";
|
|
2537
2537
|
}));
|
|
2538
2538
|
//#endregion
|
|
2539
2539
|
//#region src/routing/session-key.ts
|
|
@@ -7959,7 +7959,8 @@ var init_zod_schema = __esmMin((() => {
|
|
|
7959
7959
|
channelHealthCheckMinutes: z.number().int().min(0).optional(),
|
|
7960
7960
|
messageLedger: z.object({
|
|
7961
7961
|
enabled: z.boolean().optional(),
|
|
7962
|
-
dbPath: z.string().optional()
|
|
7962
|
+
dbPath: z.string().optional(),
|
|
7963
|
+
importContacts: z.boolean().optional()
|
|
7963
7964
|
}).strict().optional(),
|
|
7964
7965
|
memorySync: z.object({ enabled: z.boolean().optional() }).strict().optional(),
|
|
7965
7966
|
personalAgentObservations: z.object({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { c as resolveConfigPath, f as resolveGatewayPort, v as resolveStateDir } from "./paths-Ce170Tex.js";
|
|
2
2
|
import { S as shortenHomeInString, b as resolveUserPath, c as ensureDir, t as CONFIG_DIR } from "./utils-DsgtGH3c.js";
|
|
3
|
-
import { i as loadConfig } from "./io-
|
|
4
|
-
import "./config-
|
|
3
|
+
import { i as loadConfig } from "./io-DWhsHb_h.js";
|
|
4
|
+
import "./config-CJnHZ6tT.js";
|
|
5
5
|
import { n as pickPrimaryTailnetIPv4 } from "./tailnet-C0DLwT7t.js";
|
|
6
6
|
import { l as pickPrimaryLanIPv4 } from "./ws-D1BO6u3O.js";
|
|
7
7
|
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-_gH8UHtd.js";
|
|
8
|
-
import { Kt as loadOrCreateDeviceIdentity, Wt as normalizeFingerprint, t as GatewayClient } from "./client-
|
|
8
|
+
import { Kt as loadOrCreateDeviceIdentity, Wt as normalizeFingerprint, t as GatewayClient } from "./client-uZBU4o0-.js";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { promisify } from "node:util";
|
|
11
11
|
import fs from "node:fs/promises";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as resolveConfigPath, f as resolveGatewayPort, v as resolveStateDir } from "./paths-aEg9UgoF.js";
|
|
2
2
|
import { H as CONFIG_DIR, J as ensureDir, at as shortenHomeInString, rt as resolveUserPath } from "./entry.js";
|
|
3
|
-
import { i as loadConfig } from "./io-
|
|
4
|
-
import "./config-
|
|
3
|
+
import { i as loadConfig } from "./io-D2T0KwYe.js";
|
|
4
|
+
import "./config-ULIrsUrF.js";
|
|
5
5
|
import { Kt as loadOrCreateDeviceIdentity, Wt as normalizeFingerprint, t as GatewayClient } from "./client-DaLwaG9G.js";
|
|
6
6
|
import { n as pickPrimaryTailnetIPv4 } from "./tailnet-C0DLwT7t.js";
|
|
7
7
|
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-C02KGm4w.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { F as shortenHomeInString, N as resolveUserPath, S as CONFIG_DIR, T as ensureDir$1, at as resolveConfigPath, st as resolveGatewayPort, ut as resolveStateDir } from "./subsystem-Bz8lTz2g.js";
|
|
2
2
|
import { a as logError, i as logDebug } from "./exec-DWwKe_AW.js";
|
|
3
|
-
import { n as loadConfig } from "./config-
|
|
3
|
+
import { n as loadConfig } from "./config-Bad23vig.js";
|
|
4
4
|
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES, p as GATEWAY_CLIENT_IDS, t as INPUT_PROVENANCE_KIND_VALUES } from "./input-provenance-BUf7opno.js";
|
|
5
5
|
import { a as pickPrimaryLanIPv4, o as pickPrimaryTailnetIPv4, t as rawDataToString } from "./ws-ue1BYjxz.js";
|
|
6
6
|
import path from "node:path";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
350aea2d8d97396fae07adf96f8f98b2a19c6ef8ee41c654d914d7d488267c69
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as imageMimeFromFormat } from "./image-ops-QvmG4zb9.js";
|
|
2
2
|
import { i as resolveImageSanitizationLimits } from "./tool-images-BeP6oYp4.js";
|
|
3
3
|
import { i as jsonResult, n as imageResult, s as readStringParam } from "./common-BHzo6lXS.js";
|
|
4
|
-
import { n as readGatewayCallOptions, t as callGatewayTool } from "./gateway-
|
|
5
|
-
import { n as resolveNodeId } from "./nodes-utils-
|
|
4
|
+
import { n as readGatewayCallOptions, t as callGatewayTool } from "./gateway-CzCJQJHj.js";
|
|
5
|
+
import { n as resolveNodeId } from "./nodes-utils-ESP44qeB.js";
|
|
6
6
|
import { i as stringEnum, r as optionalStringEnum } from "./typebox-BbVstVJp.js";
|
|
7
7
|
import { i as writeBase64ToFile } from "./nodes-camera-D9xN7NhX.js";
|
|
8
8
|
import { n as parseCanvasSnapshotPayload, t as canvasSnapshotTempPath } from "./nodes-canvas-3iYablGd.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as imageMimeFromFormat } from "./image-ops-BGSWtWRb.js";
|
|
2
2
|
import { i as resolveImageSanitizationLimits } from "./tool-images-QJzlaPLn.js";
|
|
3
3
|
import { i as jsonResult, n as imageResult, s as readStringParam } from "./common-CRD8HhuP.js";
|
|
4
|
-
import { n as readGatewayCallOptions, t as callGatewayTool } from "./gateway-
|
|
5
|
-
import { n as resolveNodeId } from "./nodes-utils-
|
|
4
|
+
import { n as readGatewayCallOptions, t as callGatewayTool } from "./gateway-CHsNxUxJ.js";
|
|
5
|
+
import { n as resolveNodeId } from "./nodes-utils-DnVqS0gT.js";
|
|
6
6
|
import { i as stringEnum, r as optionalStringEnum } from "./typebox-BbVstVJp.js";
|
|
7
7
|
import { i as writeBase64ToFile } from "./nodes-camera-BwnQZUse.js";
|
|
8
8
|
import { n as parseCanvasSnapshotPayload, t as canvasSnapshotTempPath } from "./nodes-canvas-BzP5Wb0Z.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { S as CHAT_CHANNEL_ORDER, n as isTruthyEnvValue } from "./entry.js";
|
|
2
2
|
import { n as listChannelPlugins } from "./plugins-irMKpl65.js";
|
|
3
3
|
import { r as listChannelPluginCatalogEntries } from "./catalog-DKtdSX5i.js";
|
|
4
|
-
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-
|
|
4
|
+
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-C7Y1ktn8.js";
|
|
5
5
|
//#region src/cli/channel-options.ts
|
|
6
6
|
function dedupe(values) {
|
|
7
7
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -2,7 +2,7 @@ import { f as CHAT_CHANNEL_ORDER } from "./subsystem-Cnn1-kOi.js";
|
|
|
2
2
|
import { t as isTruthyEnvValue } from "./env-Ceu1fF46.js";
|
|
3
3
|
import { n as listChannelPlugins } from "./plugins-DQY2DPZw.js";
|
|
4
4
|
import { r as listChannelPluginCatalogEntries } from "./catalog-gQ7yZnqz.js";
|
|
5
|
-
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-
|
|
5
|
+
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-DG11DxET.js";
|
|
6
6
|
//#region src/cli/channel-options.ts
|
|
7
7
|
function dedupe(values) {
|
|
8
8
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { v as resolveStateDir } from "./paths-Ce170Tex.js";
|
|
2
2
|
import { E as toWhatsappJid, F as shouldLogVerbose, L as getChildLogger, M as logVerbose, V as toPinoLikeLogger, b as resolveUserPath, c as ensureDir, h as normalizeE164, l as escapeRegExp, m as jidToE164, p as isSelfChatMode, r as clamp, w as sleep, y as resolveJidToE164 } from "./utils-DsgtGH3c.js";
|
|
3
|
-
import { A as parseActivationCommand, Ar as normalizeMediaAttachments, Bn as normalizeMentionText, Cn as sanitizeOutboundText, Dn as resolveInboundDebounceMs, En as createInboundDebouncer, Fn as shouldComputeCommandAuthorized, Fr as registerUnhandledRejectionHandler, Kr as finalizeInboundContext, Mr as isAudioAttachment, Nr as isImageAttachment, On as formatInboundEnvelope, Or as buildProviderRegistry, Pn as hasControlCommand, Tn as createDedupeCache, _n as record, jr as runCapability, k as normalizeGroupActivation, kn as resolveEnvelopeFormatOptions, kr as createMediaAttachmentCache, nr as resolveAckReaction, or as resolveIdentityNamePrefix, sr as resolveMessagePrefix, t as getReplyFromConfig, un as buildPairingReply, vn as shouldAckReactionForWhatsApp, wr as enqueueSystemEvent, yn as dispatchReplyWithBufferedBlockDispatcher, zn as buildMentionRegexes } from "./reply-
|
|
3
|
+
import { A as parseActivationCommand, Ar as normalizeMediaAttachments, Bn as normalizeMentionText, Cn as sanitizeOutboundText, Dn as resolveInboundDebounceMs, En as createInboundDebouncer, Fn as shouldComputeCommandAuthorized, Fr as registerUnhandledRejectionHandler, Kr as finalizeInboundContext, Mr as isAudioAttachment, Nr as isImageAttachment, On as formatInboundEnvelope, Or as buildProviderRegistry, Pn as hasControlCommand, Tn as createDedupeCache, _n as record, jr as runCapability, k as normalizeGroupActivation, kn as resolveEnvelopeFormatOptions, kr as createMediaAttachmentCache, nr as resolveAckReaction, or as resolveIdentityNamePrefix, sr as resolveMessagePrefix, t as getReplyFromConfig, un as buildPairingReply, vn as shouldAckReactionForWhatsApp, wr as enqueueSystemEvent, yn as dispatchReplyWithBufferedBlockDispatcher, zn as buildMentionRegexes } from "./reply-D0CQyMj1.js";
|
|
4
4
|
import { F as triggerInternalHook, G as isInstantCommand, N as createInternalHookEvent, t as createSubsystemLogger } from "./subsystem-Cnn1-kOi.js";
|
|
5
5
|
import { t as defaultRuntime } from "./runtime-Da615Z-K.js";
|
|
6
6
|
import { i as buildAgentMainSessionKey, l as normalizeAgentId, o as buildGroupHistoryKey, r as DEFAULT_MAIN_KEY, t as DEFAULT_ACCOUNT_ID } from "./session-key-BcXqsG0l.js";
|
|
7
7
|
import "./exec-ByW9LeFK.js";
|
|
8
8
|
import { i as resolveAgentDir, l as resolveAgentWorkspaceDir, u as resolveDefaultAgentId } from "./agent-scope-D_1ZJVsc.js";
|
|
9
9
|
import { t as formatCliCommand } from "./command-format-slIqNG4J.js";
|
|
10
|
-
import { S as VERSION, i as loadConfig } from "./io-
|
|
11
|
-
import "./config-
|
|
10
|
+
import { S as VERSION, i as loadConfig } from "./io-DWhsHb_h.js";
|
|
11
|
+
import "./config-CJnHZ6tT.js";
|
|
12
12
|
import { c as resolveWhatsAppAccount, d as readCredsJsonRaw, f as readWebSelfId, h as resolveWebCredsPath, l as getWebAuthAgeMs, m as resolveWebCredsBackupPath, p as resolveDefaultWebAuthDir, u as maybeRestoreCredsFromBackup } from "./plugins-DQY2DPZw.js";
|
|
13
|
-
import { K as resolveChannelGroupPolicy, X as resolveGroupSessionKey, a as loadSessionStore, l as updateLastRoute, o as readSessionUpdatedAt, q as resolveChannelGroupRequireMention, s as recordSessionMetaFromInbound } from "./sessions-
|
|
13
|
+
import { K as resolveChannelGroupPolicy, X as resolveGroupSessionKey, a as loadSessionStore, l as updateLastRoute, o as readSessionUpdatedAt, q as resolveChannelGroupRequireMention, s as recordSessionMetaFromInbound } from "./sessions-DYp3Y72l.js";
|
|
14
14
|
import { r as require_tool_display } from "./tool-display-ByuoRPis.js";
|
|
15
15
|
import { r as saveMediaBuffer } from "./store-BNyzv0EM.js";
|
|
16
16
|
import "./logging-BlQyBIpf.js";
|
|
@@ -18,8 +18,8 @@ import { c as resolveStorePath } from "./paths-Ds2czhyU.js";
|
|
|
18
18
|
import { n as loadWebMedia, r as getAgentScopedMediaLocalRoots } from "./load-COfKYLII.js";
|
|
19
19
|
import "./tokens-DRSqc0S5.js";
|
|
20
20
|
import "./lanes-D8quZPN3.js";
|
|
21
|
-
import { c as resolveAgentRoute, s as buildAgentSessionKey } from "./targets-
|
|
22
|
-
import { g as getGlobalHookRunner } from "./reply-payloads-
|
|
21
|
+
import { c as resolveAgentRoute, s as buildAgentSessionKey } from "./targets-ClLWbDD3.js";
|
|
22
|
+
import { g as getGlobalHookRunner } from "./reply-payloads-CSe-fnoQ.js";
|
|
23
23
|
import { a as traceGatewayEvent, i as traceChatEvent, r as traceChannelEvent, t as deriveTraceId } from "./chat-trace-B7hAMbQe.js";
|
|
24
24
|
import { c as chunkMarkdownTextWithMode, d as resolveChunkMode, f as resolveTextChunkLimit, i as resolveMarkdownTableMode } from "./ir-BymCrWXa.js";
|
|
25
25
|
import { n as recordChannelActivity } from "./channel-activity-mLVM0GeJ.js";
|
|
@@ -28,7 +28,7 @@ import { i as readChannelAllowFromStore, o as upsertChannelPairingRequest } from
|
|
|
28
28
|
import { r as formatDurationPrecise } from "./format-duration-DxxnRZtB.js";
|
|
29
29
|
import "./heartbeat-visibility-CCq47bb-.js";
|
|
30
30
|
import { n as resolveDisclosureConfig, t as maybeInjectDisclosure } from "./ai-disclosure-CZzBEeaK.js";
|
|
31
|
-
import { a as computeBackoff, i as recordPendingHistoryEntryIfEnabled, n as resolveChannelSenderIdentity, o as sleepWithAbort, r as buildHistoryContextFromEntries, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
31
|
+
import { a as computeBackoff, i as recordPendingHistoryEntryIfEnabled, n as resolveChannelSenderIdentity, o as sleepWithAbort, r as buildHistoryContextFromEntries, t as createReplyPrefixOptions } from "./reply-prefix-Dc5AW5Xm.js";
|
|
32
32
|
import { n as toLocationContext, t as formatLocationText } from "./location-CeGoW_QS.js";
|
|
33
33
|
import fs from "node:fs";
|
|
34
34
|
import os from "node:os";
|
|
@@ -36,7 +36,7 @@ import path from "node:path";
|
|
|
36
36
|
import { promisify } from "node:util";
|
|
37
37
|
import { execFile } from "node:child_process";
|
|
38
38
|
import { randomUUID } from "node:crypto";
|
|
39
|
-
import WebSocket from "ws";
|
|
39
|
+
import WebSocket$1 from "ws";
|
|
40
40
|
import { DisconnectReason, downloadMediaMessage, extractMessageContent, fetchLatestBaileysVersion, getContentType, isJidGroup, makeCacheableSignalKeyStore, makeWASocket, normalizeMessageContent, useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
41
41
|
import qrcode from "qrcode-terminal";
|
|
42
42
|
//#region src/web/auto-reply/constants.ts
|
|
@@ -320,6 +320,10 @@ async function createWaSocket(printQr, verbose, opts = {}) {
|
|
|
320
320
|
maybeRestoreCredsFromBackup(authDir);
|
|
321
321
|
const { state, saveCreds } = await useMultiFileAuthState(authDir);
|
|
322
322
|
const { version } = await fetchLatestBaileysVersion();
|
|
323
|
+
let syncFullHistory = false;
|
|
324
|
+
try {
|
|
325
|
+
syncFullHistory = loadConfig().gateway?.messageLedger?.importContacts === true;
|
|
326
|
+
} catch {}
|
|
323
327
|
const sock = makeWASocket({
|
|
324
328
|
auth: {
|
|
325
329
|
creds: state.creds,
|
|
@@ -333,7 +337,7 @@ async function createWaSocket(printQr, verbose, opts = {}) {
|
|
|
333
337
|
"cli",
|
|
334
338
|
VERSION
|
|
335
339
|
],
|
|
336
|
-
syncFullHistory
|
|
340
|
+
syncFullHistory,
|
|
337
341
|
markOnlineOnConnect: false
|
|
338
342
|
});
|
|
339
343
|
sock.ev.on("creds.update", () => enqueueSaveCreds(authDir, saveCreds, sessionLogger));
|
|
@@ -797,6 +801,75 @@ function fireInboundTriggerHook(event) {
|
|
|
797
801
|
})).catch(() => {});
|
|
798
802
|
}
|
|
799
803
|
//#endregion
|
|
804
|
+
//#region src/web/inbound/history-import.ts
|
|
805
|
+
/** Coerce a Baileys conversationTimestamp (number | Long-like) to ms, or null. */
|
|
806
|
+
function tsToMs(value) {
|
|
807
|
+
if (typeof value === "number" && Number.isFinite(value)) return value * 1e3;
|
|
808
|
+
if (value && typeof value === "object" && typeof value.toNumber === "function") {
|
|
809
|
+
const n = value.toNumber();
|
|
810
|
+
return Number.isFinite(n) ? n * 1e3 : null;
|
|
811
|
+
}
|
|
812
|
+
return null;
|
|
813
|
+
}
|
|
814
|
+
function contactName(c) {
|
|
815
|
+
return (c.name || c.notify || c.verifiedName || c.username || "").trim() || void 0;
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* Record one idempotent inbound shell row per importable 1:1 person, drawn from
|
|
819
|
+
* the union of `contacts` and `chats`. Returns the number of distinct people
|
|
820
|
+
* recorded this call.
|
|
821
|
+
*/
|
|
822
|
+
function importWhatsAppPeopleToLedger(args) {
|
|
823
|
+
const e164Of = (jid) => jid ? args.jidToE164(jid) : null;
|
|
824
|
+
const names = /* @__PURE__ */ new Map();
|
|
825
|
+
for (const c of args.contacts ?? []) {
|
|
826
|
+
const e164 = e164Of(c.phoneNumber) ?? e164Of(c.id);
|
|
827
|
+
if (!e164) continue;
|
|
828
|
+
const nm = contactName(c);
|
|
829
|
+
if (nm) names.set(e164, nm);
|
|
830
|
+
}
|
|
831
|
+
const people = /* @__PURE__ */ new Map();
|
|
832
|
+
const consider = (jid, explicitName, ts) => {
|
|
833
|
+
if (jid && args.isGroupJid(jid)) return;
|
|
834
|
+
const e164 = e164Of(jid);
|
|
835
|
+
if (!e164) return;
|
|
836
|
+
if (args.selfE164 && e164 === args.selfE164) return;
|
|
837
|
+
const name = explicitName || names.get(e164);
|
|
838
|
+
const cur = people.get(e164);
|
|
839
|
+
if (cur) {
|
|
840
|
+
if (!cur.name && name) cur.name = name;
|
|
841
|
+
if (cur.ts == null && ts != null) cur.ts = ts;
|
|
842
|
+
} else people.set(e164, {
|
|
843
|
+
name,
|
|
844
|
+
ts
|
|
845
|
+
});
|
|
846
|
+
};
|
|
847
|
+
for (const c of args.contacts ?? []) consider(c.phoneNumber || c.id, contactName(c), null);
|
|
848
|
+
for (const chat of args.chats ?? []) consider(chat.id, typeof chat.name === "string" ? chat.name.trim() : void 0, tsToMs(chat.conversationTimestamp));
|
|
849
|
+
let imported = 0;
|
|
850
|
+
for (const [e164, p] of people) {
|
|
851
|
+
args.record({
|
|
852
|
+
clientId: `wa-import:${args.accountId}:${e164}`,
|
|
853
|
+
direction: "inbound",
|
|
854
|
+
channel: "whatsapp",
|
|
855
|
+
accountId: args.accountId,
|
|
856
|
+
chatId: e164,
|
|
857
|
+
senderId: e164,
|
|
858
|
+
senderName: p.name,
|
|
859
|
+
isGroup: false,
|
|
860
|
+
isBot: false,
|
|
861
|
+
occurredAt: p.ts ?? args.now ?? Date.now(),
|
|
862
|
+
messageId: `wa-import:${e164}`,
|
|
863
|
+
metadata: {
|
|
864
|
+
imported: true,
|
|
865
|
+
source: "whatsapp-history"
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
imported++;
|
|
869
|
+
}
|
|
870
|
+
return { imported };
|
|
871
|
+
}
|
|
872
|
+
//#endregion
|
|
800
873
|
//#region src/web/inbound/access-control.ts
|
|
801
874
|
const PAIRING_REPLY_HISTORY_GRACE_MS = 3e4;
|
|
802
875
|
async function checkInboundAccessControl(params) {
|
|
@@ -1356,18 +1429,69 @@ async function monitorWebInbox(options) {
|
|
|
1356
1429
|
}
|
|
1357
1430
|
};
|
|
1358
1431
|
sock.ev.on("connection.update", handleConnectionUpdate);
|
|
1432
|
+
const importContactsEnabled = (() => {
|
|
1433
|
+
try {
|
|
1434
|
+
const cfg = loadConfig();
|
|
1435
|
+
return cfg.gateway?.messageLedger?.enabled === true && cfg.gateway?.messageLedger?.importContacts === true;
|
|
1436
|
+
} catch {
|
|
1437
|
+
return false;
|
|
1438
|
+
}
|
|
1439
|
+
})();
|
|
1440
|
+
const runImport = (label, payload) => {
|
|
1441
|
+
try {
|
|
1442
|
+
const { imported } = importWhatsAppPeopleToLedger({
|
|
1443
|
+
chats: payload.chats ?? [],
|
|
1444
|
+
contacts: payload.contacts ?? [],
|
|
1445
|
+
accountId: options.accountId,
|
|
1446
|
+
selfE164,
|
|
1447
|
+
record,
|
|
1448
|
+
jidToE164: (jid) => jidToE164(jid),
|
|
1449
|
+
isGroupJid: (jid) => isJidGroup(jid) === true
|
|
1450
|
+
});
|
|
1451
|
+
if (imported > 0) inboundConsoleLog.info(`Imported ${imported} WhatsApp ${label} as CRM contact rows (account ${options.accountId})`);
|
|
1452
|
+
} catch (err) {
|
|
1453
|
+
inboundLogger.error({ error: String(err) }, "whatsapp contact import failed");
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
1456
|
+
const handleHistorySet = (h) => runImport("history", {
|
|
1457
|
+
chats: h.chats,
|
|
1458
|
+
contacts: h.contacts
|
|
1459
|
+
});
|
|
1460
|
+
const handleContactsUpsert = (contacts) => runImport("contacts", { contacts });
|
|
1461
|
+
const handleChatsUpsert = (chats) => runImport("chats", { chats });
|
|
1462
|
+
if (importContactsEnabled) {
|
|
1463
|
+
sock.ev.on("messaging-history.set", handleHistorySet);
|
|
1464
|
+
sock.ev.on("contacts.upsert", handleContactsUpsert);
|
|
1465
|
+
sock.ev.on("chats.upsert", handleChatsUpsert);
|
|
1466
|
+
Promise.resolve().then(() => sock.resyncAppState([
|
|
1467
|
+
"critical_unblock_low",
|
|
1468
|
+
"regular_high",
|
|
1469
|
+
"regular_low",
|
|
1470
|
+
"regular"
|
|
1471
|
+
], true)).catch((err) => inboundLogger.warn({ error: String(err) }, "whatsapp resyncAppState for contact import failed"));
|
|
1472
|
+
}
|
|
1359
1473
|
return {
|
|
1360
1474
|
close: async () => {
|
|
1361
1475
|
try {
|
|
1362
1476
|
const ev = sock.ev;
|
|
1363
1477
|
const messagesUpsertHandler = handleMessagesUpsert;
|
|
1364
1478
|
const connectionUpdateHandler = handleConnectionUpdate;
|
|
1479
|
+
const historyHandler = handleHistorySet;
|
|
1480
|
+
const contactsHandler = handleContactsUpsert;
|
|
1481
|
+
const chatsHandler = handleChatsUpsert;
|
|
1482
|
+
const offImport = (fn) => {
|
|
1483
|
+
fn("messaging-history.set", historyHandler);
|
|
1484
|
+
fn("contacts.upsert", contactsHandler);
|
|
1485
|
+
fn("chats.upsert", chatsHandler);
|
|
1486
|
+
};
|
|
1365
1487
|
if (typeof ev.off === "function") {
|
|
1366
1488
|
ev.off("messages.upsert", messagesUpsertHandler);
|
|
1367
1489
|
ev.off("connection.update", connectionUpdateHandler);
|
|
1490
|
+
if (importContactsEnabled) offImport(ev.off);
|
|
1368
1491
|
} else if (typeof ev.removeListener === "function") {
|
|
1369
1492
|
ev.removeListener("messages.upsert", messagesUpsertHandler);
|
|
1370
1493
|
ev.removeListener("connection.update", connectionUpdateHandler);
|
|
1494
|
+
if (importContactsEnabled) offImport(ev.removeListener);
|
|
1371
1495
|
}
|
|
1372
1496
|
sock.ws?.close();
|
|
1373
1497
|
} catch (err) {
|
|
@@ -2157,7 +2281,7 @@ async function runRealtimeSession(params) {
|
|
|
2157
2281
|
log$1.info(`Connecting to ${url}`);
|
|
2158
2282
|
let ws;
|
|
2159
2283
|
try {
|
|
2160
|
-
ws = new WebSocket(url, {
|
|
2284
|
+
ws = new WebSocket$1(url, {
|
|
2161
2285
|
headers: {
|
|
2162
2286
|
Authorization: `Bearer ${apiKey}`,
|
|
2163
2287
|
"OpenAI-Beta": "realtime=v1"
|
|
@@ -2190,7 +2314,7 @@ async function runRealtimeSession(params) {
|
|
|
2190
2314
|
} catch {}
|
|
2191
2315
|
}
|
|
2192
2316
|
function send(event) {
|
|
2193
|
-
if (ws.readyState === WebSocket.OPEN) ws.send(JSON.stringify(event));
|
|
2317
|
+
if (ws.readyState === WebSocket$1.OPEN) ws.send(JSON.stringify(event));
|
|
2194
2318
|
}
|
|
2195
2319
|
function sendAudioChunks() {
|
|
2196
2320
|
for (let offset = 0; offset < pcmData.length; offset += CHUNK_BYTES) send({
|
|
@@ -4,10 +4,10 @@ import { C as loadAuthProfileStore } from "./auth-profiles-CmddgW77.js";
|
|
|
4
4
|
import { t as formatCliCommand } from "./command-format-D86vQ65E.js";
|
|
5
5
|
import { s as normalizeAccountId$1 } from "./session-key-DK3D9dkE.js";
|
|
6
6
|
import { l as resolveAgentWorkspaceDir, u as resolveDefaultAgentId } from "./agent-scope-BP7xXcTE.js";
|
|
7
|
-
import { i as loadConfig, l as writeConfigFile, o as readConfigFileSnapshot } from "./io-
|
|
8
|
-
import "./config-
|
|
9
|
-
import { n as callGateway } from "./call-
|
|
10
|
-
import { Ct as formatUsageReportLines, St as loadProviderUsageSummary } from "./subagent-registry-
|
|
7
|
+
import { i as loadConfig, l as writeConfigFile, o as readConfigFileSnapshot } from "./io-D2T0KwYe.js";
|
|
8
|
+
import "./config-ULIrsUrF.js";
|
|
9
|
+
import { n as callGateway } from "./call-DaiN21tT.js";
|
|
10
|
+
import { Ct as formatUsageReportLines, St as loadProviderUsageSummary } from "./subagent-registry-C4Xeveht.js";
|
|
11
11
|
import { n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin, u as resolveTelegramAccount } from "./plugins-irMKpl65.js";
|
|
12
12
|
import "./logging-D43UWj1X.js";
|
|
13
13
|
import { n as formatTimeAgo } from "./format-relative-Bjc3l98W.js";
|
|
@@ -18,18 +18,18 @@ import { t as formatHelpExamples } from "./help-format-ojnmvhbK.js";
|
|
|
18
18
|
import { n as withProgress } from "./progress-aPiVORh8.js";
|
|
19
19
|
import { n as resolveMessageChannelSelection } from "./channel-selection-Bzg2Xpo4.js";
|
|
20
20
|
import { t as parseDiscordTarget } from "./targets-CWUrImUS.js";
|
|
21
|
-
import { n as fetchChannelPermissionsDiscord } from "./send-
|
|
21
|
+
import { n as fetchChannelPermissionsDiscord } from "./send-Dy5OuEh7.js";
|
|
22
22
|
import { t as hasExplicitOptions } from "./command-options-Dhjl7AMa.js";
|
|
23
23
|
import { r as listChannelPluginCatalogEntries } from "./catalog-DKtdSX5i.js";
|
|
24
24
|
import { t as createClackPrompter } from "./clack-prompter-Bv8LAi9a.js";
|
|
25
25
|
import { t as resolveChannelDefaultAccountId } from "./helpers-HNAIOJ_3.js";
|
|
26
|
-
import { i as reloadOnboardingPluginRegistry, n as setupChannels, r as ensureOnboardingPluginInstalled } from "./onboard-channels-
|
|
27
|
-
import "./onboard-channels-
|
|
28
|
-
import { t as requireValidConfigSnapshot } from "./config-validation-
|
|
26
|
+
import { i as reloadOnboardingPluginRegistry, n as setupChannels, r as ensureOnboardingPluginInstalled } from "./onboard-channels-CUT7TFAB.js";
|
|
27
|
+
import "./onboard-channels-B1odq8Pa.js";
|
|
28
|
+
import { t as requireValidConfigSnapshot } from "./config-validation-BKuA0mkd.js";
|
|
29
29
|
import { t as buildChannelAccountSnapshot } from "./status-Dg720jp3.js";
|
|
30
30
|
import { t as parseLogLine } from "./parse-log-line-CYJzHJac.js";
|
|
31
31
|
import { t as collectChannelStatusIssues } from "./channels-status-issues-dgNXBa3W.js";
|
|
32
|
-
import { t as formatCliChannelOptions } from "./channel-options-
|
|
32
|
+
import { t as formatCliChannelOptions } from "./channel-options-BhSTHUdE.js";
|
|
33
33
|
import os from "node:os";
|
|
34
34
|
import path from "node:path";
|
|
35
35
|
import fs from "node:fs/promises";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { v as resolveStateDir } from "./paths-Ce170Tex.js";
|
|
2
2
|
import { O as danger, P as setVerbose, f as isRecord, z as getResolvedLoggerSettings } from "./utils-DsgtGH3c.js";
|
|
3
3
|
import { r as theme } from "./theme-CDbj88LB.js";
|
|
4
|
-
import { M as formatUsageReportLines, j as loadProviderUsageSummary } from "./reply-
|
|
4
|
+
import { M as formatUsageReportLines, j as loadProviderUsageSummary } from "./reply-D0CQyMj1.js";
|
|
5
5
|
import "./subsystem-Cnn1-kOi.js";
|
|
6
6
|
import { t as defaultRuntime } from "./runtime-Da615Z-K.js";
|
|
7
7
|
import { c as normalizeAccountId$1 } from "./session-key-BcXqsG0l.js";
|
|
8
8
|
import { l as resolveAgentWorkspaceDir, u as resolveDefaultAgentId } from "./agent-scope-D_1ZJVsc.js";
|
|
9
9
|
import { Mt as loadAuthProfileStore } from "./model-selection-DXz1sR0t.js";
|
|
10
10
|
import { t as formatCliCommand } from "./command-format-slIqNG4J.js";
|
|
11
|
-
import { i as loadConfig, l as writeConfigFile, o as readConfigFileSnapshot } from "./io-
|
|
12
|
-
import "./config-
|
|
11
|
+
import { i as loadConfig, l as writeConfigFile, o as readConfigFileSnapshot } from "./io-DWhsHb_h.js";
|
|
12
|
+
import "./config-CJnHZ6tT.js";
|
|
13
13
|
import { _ as resolveTelegramAccount, n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-DQY2DPZw.js";
|
|
14
14
|
import "./logging-BlQyBIpf.js";
|
|
15
|
-
import { n as callGateway } from "./call-
|
|
15
|
+
import { n as callGateway } from "./call-BH1OgnGt.js";
|
|
16
16
|
import { n as formatTimeAgo } from "./format-relative-Bjc3l98W.js";
|
|
17
17
|
import { t as formatDocsLink } from "./links-C1xb6h4b.js";
|
|
18
18
|
import { n as runCommandWithRuntime } from "./cli-utils-Cg2c3XDf.js";
|
|
@@ -20,16 +20,16 @@ import { t as formatHelpExamples } from "./help-format-D20I7z1G.js";
|
|
|
20
20
|
import { n as withProgress } from "./progress-8_pqhNaq.js";
|
|
21
21
|
import { t as createSlackWebClient } from "./client-B0alQSqy.js";
|
|
22
22
|
import { r as listChannelPluginCatalogEntries } from "./catalog-gQ7yZnqz.js";
|
|
23
|
-
import { t as formatCliChannelOptions } from "./channel-options-
|
|
23
|
+
import { t as formatCliChannelOptions } from "./channel-options-ZnqM-XwR.js";
|
|
24
24
|
import { n as resolveMessageChannelSelection } from "./channel-selection-ERVd9FwM.js";
|
|
25
25
|
import { t as parseDiscordTarget } from "./targets-xl8bNEbc.js";
|
|
26
|
-
import { n as fetchChannelPermissionsDiscord } from "./send-
|
|
26
|
+
import { n as fetchChannelPermissionsDiscord } from "./send-CCuZYSz3.js";
|
|
27
27
|
import { t as hasExplicitOptions } from "./command-options-Dhjl7AMa.js";
|
|
28
28
|
import { t as createClackPrompter } from "./clack-prompter-BhwvSSDO.js";
|
|
29
29
|
import { t as resolveChannelDefaultAccountId } from "./helpers-BcEbnHmz.js";
|
|
30
|
-
import { i as reloadOnboardingPluginRegistry, n as setupChannels, r as ensureOnboardingPluginInstalled } from "./onboard-channels-
|
|
31
|
-
import "./onboard-channels-
|
|
32
|
-
import { t as requireValidConfigSnapshot } from "./config-validation-
|
|
30
|
+
import { i as reloadOnboardingPluginRegistry, n as setupChannels, r as ensureOnboardingPluginInstalled } from "./onboard-channels-Bc0EWbkF.js";
|
|
31
|
+
import "./onboard-channels-DOws7yCU.js";
|
|
32
|
+
import { t as requireValidConfigSnapshot } from "./config-validation-UxIy2sWe.js";
|
|
33
33
|
import { t as buildChannelAccountSnapshot } from "./status-Dg720jp3.js";
|
|
34
34
|
import { t as parseLogLine } from "./parse-log-line-CYJzHJac.js";
|
|
35
35
|
import { t as collectChannelStatusIssues } from "./channels-status-issues-YebWHOdm.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as CONFIG_DIR, t as createSubsystemLogger } from "./subsystem-Bz8lTz2g.js";
|
|
2
2
|
import "./exec-DWwKe_AW.js";
|
|
3
|
-
import { n as loadConfig } from "./config-
|
|
3
|
+
import { n as loadConfig } from "./config-Bad23vig.js";
|
|
4
4
|
import { r as isErrno } from "./errors-DInjg6Ku.js";
|
|
5
5
|
import { i as isPrivateOrLoopbackAddress, n as isLoopbackAddress, r as isLoopbackHost, t as rawDataToString } from "./ws-ue1BYjxz.js";
|
|
6
6
|
import path from "node:path";
|