@openclaw/whatsapp 2026.9.5 → 2026.9.7
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/assets/icon.png +0 -0
- package/dist/.setup/{accounts-D_NGDjCx.mjs → accounts-CtRPAQCL.mjs} +3 -9
- package/dist/.setup/{action-runtime-DZZFamfl.mjs → action-runtime-DeVk5V7r.mjs} +2 -2
- package/dist/.setup/{agent-tools-login-B6MAs75N.mjs → agent-tools-login-CL5C1rA2.mjs} +5 -1
- package/dist/.setup/{approval-handler.runtime-C0hzmMSj.mjs → approval-handler.runtime-CjqMlPOX.mjs} +6 -26
- package/dist/.setup/{approval-reactions-BnXw-UZI.mjs → approval-reactions-DiOFvb1s.mjs} +8 -14
- package/dist/.setup/{auth-store-Dh8a3cba.mjs → auth-store-BBonwKks.mjs} +9 -33
- package/dist/.setup/{channel-CSclZYjU.mjs → channel-CJFE0kD_.mjs} +82 -154
- package/dist/.setup/{channel-react-action-1iBiEnq7.mjs → channel-react-action-2r_hjLZV.mjs} +4 -8
- package/dist/.setup/{channel.runtime-ddGY37w8.mjs → channel.runtime-C94goLw9.mjs} +4 -4
- package/dist/.setup/{channel.setup-CqUl8COe.mjs → channel.setup-CfN1UfdY.mjs} +1 -1
- package/dist/.setup/{connection-controller-C60mU7j7.mjs → connection-controller-CHo1oRJA.mjs} +13 -63
- package/dist/.setup/{creds-files-Drg3usj1.mjs → creds-files-CDATZWWM.mjs} +5 -11
- package/dist/.setup/{directory-config-BHPoBklt.mjs → directory-config-DUiJ5d8I.mjs} +13 -14
- package/dist/.setup/doctor-iMwg0Vhr.mjs +222 -0
- package/dist/.setup/group-config-path-DZr3ucUO.mjs +40 -0
- package/dist/.setup/{group-session-key-D22hYMdE.mjs → group-session-key-2-mja4OF.mjs} +3 -9
- package/dist/.setup/{login-2dmd1TfE.mjs → login-BFlvSh9h.mjs} +9 -11
- package/dist/.setup/{login-qr-CgKtO_ef.mjs → login-qr-Ayb8i25J.mjs} +29 -77
- package/dist/.setup/{monitor-BblvzLpX.mjs → monitor-CGpV2VNN.mjs} +391 -509
- package/dist/.setup/{question-reactions-D3Zq9Gbn.mjs → question-reactions-CPyyi5AY.mjs} +2 -2
- package/dist/.setup/rolldown-runtime-BBjsoOtd.mjs +27 -0
- package/dist/.setup/{send-C6jDmcL9.mjs → send-BGdvf5cC.mjs} +31 -80
- package/dist/.setup/{send-api-B4DOt2RJ.mjs → send-api-H4AkQJjT.mjs} +45 -109
- package/dist/.setup/{session-errors-JuazczrA.mjs → session-errors-B8UcAnZN.mjs} +1 -4
- package/dist/.setup/{session.runtime-DcJuO42v.mjs → session.runtime-st1konFI.mjs} +1 -1
- package/dist/.setup/{setup-finalize-BYEgU0hb.mjs → setup-finalize-DmPX4EaW.mjs} +32 -70
- package/dist/.setup/setup-plugin-api-vJlxKzca.mjs +3 -0
- package/dist/.setup/{setup-surface-Cd3wN5HD.mjs → setup-surface-43fj197P.mjs} +3 -3
- package/dist/.setup/{shared-C9OEtKgc.mjs → shared-DgOG5Iqr.mjs} +26 -37
- package/dist/.setup/{socket-close-CCVSFufF.mjs → socket-close-CT__V2fz.mjs} +80 -92
- package/dist/.setup/{targets-runtime-RBjx3pg_.mjs → targets-runtime-DmiqXIXO.mjs} +2 -7
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/agent-tools-api.js +6 -13
- package/dist/api.js +10 -10
- package/dist/auth-presence.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +9 -10
- package/dist/light-runtime-api.js +3 -3
- package/dist/login-qr-runtime.js +1 -1
- package/dist/runtime-api.js +10 -10
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/audio-decode/LICENSE +9 -10
- package/node_modules/audio-decode/README.md +16 -0
- package/node_modules/audio-decode/audio-decode.d.ts +2 -14
- package/node_modules/audio-decode/audio-decode.js +4 -92
- package/node_modules/audio-decode/meta.js +1 -0
- package/node_modules/audio-decode/node_modules/{audio-buffer → @audio/decode}/LICENSE +1 -1
- package/node_modules/audio-decode/node_modules/@audio/decode/audio-decode.d.ts +52 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/audio-decode.js +242 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/meta.js +14 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/package.json +114 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/readme.md +191 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/stream.d.ts +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/stream.js +1 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/test.html +52 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/LICENSE +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/README.md +80 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/alac.js +326 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/decode-aac.d.ts +24 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/decode-aac.js +452 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/meta.js +81 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/package.json +63 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/src/aac.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/LICENSE +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/LICENSE.liba52 +340 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/README.md +41 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/decode-ac3.d.ts +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/decode-ac3.js +131 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/package.json +64 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/src/ac3.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/README.md +46 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/decode-aiff.d.ts +16 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/decode-aiff.js +583 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/package.json +52 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/LICENSE +191 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/README.md +65 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/decode-amr.d.ts +16 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/decode-amr.js +150 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/package.json +58 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/src/amr.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/README.md +53 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/decode-avi.d.ts +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/decode-avi.js +241 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/package.json +66 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/README.md +48 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/decode-caf.d.ts +16 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/decode-caf.js +238 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/package.json +53 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/README.md +73 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/audio.d.ts +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/audio.js +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/decode-dsd.d.ts +29 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/decode-dsd.js +423 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/meta.js +40 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/package.json +64 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/LICENSE +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/LICENSE.libdca +339 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/README.md +41 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/decode-dts.d.ts +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/decode-dts.js +139 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/package.json +64 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/src/dts.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/LICENSE +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/LICENSE.ffmpeg +502 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/README.md +45 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/decode-eac3.d.ts +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/decode-eac3.js +124 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/package.json +68 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/src/eac3.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/LICENSE +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/README.md +23 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/decode-flac.d.ts +18 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/decode-flac.js +3172 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/meta.js +115 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/package.json +60 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/LICENSE +23 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/LICENSE.libopenmpt +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/README.md +86 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/audio.d.ts +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/audio.js +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/decode-mod.d.ts +58 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/decode-mod.js +148 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/package.json +68 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/src/mod.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/LICENSE +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/README.md +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/decode-mp3.d.ts +16 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/decode-mp3.js +793 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/meta.js +143 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/package.json +60 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/README.md +58 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/decode-mp4.d.ts +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/decode-mp4.js +455 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/package.json +74 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/LICENSE +31 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/LICENSE.libmpcdec +31 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/README.md +60 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/decode-mpc.d.ts +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/decode-mpc.js +158 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/package.json +64 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/src/mpc.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/LICENSE +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/LICENSE.libopus +44 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/README.md +32 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/core.d.ts +33 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/core.js +147 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/decode-opus.d.ts +18 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/decode-opus.js +1 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/meta.js +103 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/package.json +68 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/src/decode-opus.js +2 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/src/opus.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/LICENSE +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/README.md +19 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/decode-qoa.d.ts +16 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/decode-qoa.js +275 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/package.json +56 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/LICENSE.ttadec +39 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/README.md +58 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/decode-tta.d.ts +17 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/decode-tta.js +302 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/package.json +58 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/LICENSE +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/README.md +33 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/decode-vorbis.d.ts +18 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/decode-vorbis.js +2984 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/meta.js +102 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/package.json +60 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/README.md +23 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/decode-wav.d.ts +8 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/decode-wav.js +256 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/meta.js +114 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/package.json +52 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/LICENSE +29 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/LICENSE.wavpack +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/README.md +41 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/decode-wavpack.d.ts +18 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/decode-wavpack.js +140 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/package.json +62 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/src/wavpack.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/LICENSE.libopus +44 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/README.md +59 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/decode-webm.d.ts +18 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/decode-webm.js +141 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/package.json +76 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/src/opus.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/LICENSE +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/README.md +74 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/decode-wma.d.ts +33 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/decode-wma.js +516 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/package.json +57 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/src/wma.wasm.js +0 -0
- package/node_modules/audio-decode/package.json +37 -39
- package/node_modules/audio-decode/stream.d.ts +2 -0
- package/node_modules/audio-decode/stream.js +2 -0
- package/node_modules/baileys/lib/Utils/messages-media.js +1 -1
- package/node_modules/baileys/node_modules/file-type/package.json +3 -2
- package/node_modules/baileys/node_modules/file-type/readme.md +5 -0
- package/node_modules/baileys/node_modules/file-type/source/detectors/zip.js +9 -4
- package/node_modules/baileys/node_modules/file-type/source/index.js +28 -1
- package/node_modules/baileys/node_modules/file-type/source/supported.js +2 -0
- package/node_modules/baileys/node_modules/p-timeout/index.js +3 -0
- package/node_modules/baileys/node_modules/p-timeout/package.json +1 -1
- package/node_modules/baileys/package.json +1 -1
- package/node_modules/typebox/build/compile/code.mjs +1 -2
- package/node_modules/typebox/build/compile/validator.mjs +5 -1
- package/node_modules/typebox/build/format/iri.mjs +16 -9
- package/node_modules/typebox/build/guard/emit.mjs +2 -2
- package/node_modules/typebox/build/guard/guard.d.mts +7 -5
- package/node_modules/typebox/build/guard/guard.mjs +14 -9
- package/node_modules/typebox/build/guard/index.mjs +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
- package/node_modules/typebox/build/guard/{string.mjs → unicode/unicode_segment.mjs} +16 -19
- package/node_modules/typebox/build/schema/build.mjs +2 -3
- package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
- package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
- package/node_modules/typebox/build/schema/parse.mjs +3 -0
- package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
- package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
- package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
- package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
- package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
- package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
- package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
- package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
- package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
- package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +3 -1
- package/package.json +6 -6
- package/dist/.setup/doctor-BPb-SjdE.mjs +0 -65
- package/dist/.setup/group-config-path-BGyzT9Lg.mjs +0 -54
- package/dist/.setup/normalize-DdsROMMa.mjs +0 -2
- package/dist/.setup/rolldown-runtime-D7D4PA-g.mjs +0 -13
- package/dist/.setup/runtime-group-policy-DeSRFXEV.mjs +0 -11
- package/dist/.setup/setup-plugin-api-CXfU-7vN.mjs +0 -3
- package/dist/.setup/text-runtime-CHl0iPYe.mjs +0 -4
- package/node_modules/audio-decode/.eslintrc.json +0 -43
- package/node_modules/audio-decode/.github/workflows/test.js.yml +0 -31
- package/node_modules/audio-decode/.travis.yml +0 -13
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/README.md +0 -293
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js +0 -11646
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js.map +0 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/index.js +0 -8
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/package.json +0 -58
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/EmscriptenWasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/OpusMLDecoder.js +0 -253
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/OpusMLDecoderWebWorker.js +0 -17
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/types.d.ts +0 -77
- package/node_modules/audio-decode/node_modules/audio-buffer/.eslintrc.json +0 -44
- package/node_modules/audio-decode/node_modules/audio-buffer/.github/workflows/node.js.yml +0 -31
- package/node_modules/audio-decode/node_modules/audio-buffer/.travis.yml +0 -7
- package/node_modules/audio-decode/node_modules/audio-buffer/index.js +0 -76
- package/node_modules/audio-decode/node_modules/audio-buffer/package.json +0 -37
- package/node_modules/audio-decode/node_modules/audio-buffer/readme.md +0 -56
- package/node_modules/audio-decode/node_modules/node-wav/README.md +0 -35
- package/node_modules/audio-decode/node_modules/node-wav/file.wav +0 -0
- package/node_modules/audio-decode/node_modules/node-wav/index.js +0 -291
- package/node_modules/audio-decode/node_modules/node-wav/package.json +0 -29
- package/node_modules/audio-decode/node_modules/node-wav/tests/file1.wav +0 -0
- package/node_modules/audio-decode/node_modules/node-wav/tests/test.js +0 -66
- package/node_modules/audio-decode/node_modules/node-wav/x.js +0 -12
- package/node_modules/audio-decode/node_modules/node-wav/x.json +0 -86702
- package/node_modules/audio-decode/node_modules/node-wav/x.js~ +0 -13
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/README.md +0 -320
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js +0 -232
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js.map +0 -1
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js +0 -0
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js.map +0 -1
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/index.js +0 -8
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/package.json +0 -74
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoder.js +0 -226
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoderWebWorker.js +0 -17
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/types.d.ts +0 -37
- package/node_modules/audio-decode/node_modules/opus-decoder/README.md +0 -265
- package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js +0 -232
- package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js.map +0 -1
- package/node_modules/audio-decode/node_modules/opus-decoder/index.js +0 -8
- package/node_modules/audio-decode/node_modules/opus-decoder/package.json +0 -56
- package/node_modules/audio-decode/node_modules/opus-decoder/src/EmscriptenWasm.js +0 -0
- package/node_modules/audio-decode/node_modules/opus-decoder/src/OpusDecoder.js +0 -239
- package/node_modules/audio-decode/node_modules/opus-decoder/src/OpusDecoderWebWorker.js +0 -17
- package/node_modules/audio-decode/node_modules/opus-decoder/types.d.ts +0 -74
- package/node_modules/audio-decode/readme.md +0 -49
- package/node_modules/audio-decode/tea.yaml +0 -6
- package/node_modules/audio-decode/test-case.js +0 -11
- package/node_modules/audio-decode/test.html +0 -15
- package/node_modules/audio-decode/test.js +0 -107
- /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-CtRPAQCL.mjs";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.mjs";
|
|
3
|
-
import { r as hasWebCredsSync } from "./creds-files-
|
|
3
|
+
import { r as hasWebCredsSync } from "./creds-files-CDATZWWM.mjs";
|
|
4
4
|
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-BGra1ZnM.mjs";
|
|
5
|
-
import { n as whatsappSetupAdapter } from "./shared-
|
|
5
|
+
import { n as whatsappSetupAdapter } from "./shared-DgOG5Iqr.mjs";
|
|
6
6
|
import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
7
7
|
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
8
8
|
//#region extensions/whatsapp/src/setup-finalize.ts
|
|
@@ -30,67 +30,38 @@ function resolveWhatsAppConfigPathPrefix(cfg, accountId) {
|
|
|
30
30
|
}
|
|
31
31
|
function mergeWhatsAppConfig(cfg, accountId, patch, options) {
|
|
32
32
|
const channelConfig = { ...cfg.channels?.whatsapp };
|
|
33
|
-
const
|
|
34
|
-
if (resolveWhatsAppConfigPathPrefix(cfg, accountId) === "channels.whatsapp") {
|
|
35
|
-
for (const [key, value] of Object.entries(patch)) {
|
|
36
|
-
if (value === void 0) {
|
|
37
|
-
if (options?.unsetOnUndefined?.includes(key)) delete mutableChannelConfig[key];
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
mutableChannelConfig[key] = value;
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
...cfg,
|
|
44
|
-
channels: {
|
|
45
|
-
...cfg.channels,
|
|
46
|
-
whatsapp: channelConfig
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}
|
|
33
|
+
const atRoot = resolveWhatsAppConfigPathPrefix(cfg, accountId) === "channels.whatsapp";
|
|
50
34
|
const accounts = { ...channelConfig.accounts };
|
|
51
35
|
const targetAccountId = accountId === DEFAULT_ACCOUNT_ID ? resolveDefaultWhatsAppAccountWriteKey(cfg) : accountId;
|
|
52
36
|
const lowerDefaultAccount = accountId === DEFAULT_ACCOUNT_ID && targetAccountId !== DEFAULT_ACCOUNT_ID ? accounts[DEFAULT_ACCOUNT_ID] : void 0;
|
|
53
|
-
const
|
|
37
|
+
const target = atRoot ? channelConfig : {
|
|
54
38
|
...accounts[targetAccountId],
|
|
55
39
|
...lowerDefaultAccount
|
|
56
40
|
};
|
|
57
|
-
const
|
|
41
|
+
const mutableTarget = target;
|
|
58
42
|
for (const [key, value] of Object.entries(patch)) {
|
|
59
43
|
if (value === void 0) {
|
|
60
|
-
if (options?.unsetOnUndefined?.includes(key)) delete
|
|
44
|
+
if (options?.unsetOnUndefined?.includes(key)) delete mutableTarget[key];
|
|
61
45
|
continue;
|
|
62
46
|
}
|
|
63
|
-
|
|
47
|
+
mutableTarget[key] = value;
|
|
48
|
+
}
|
|
49
|
+
if (!atRoot) {
|
|
50
|
+
accounts[targetAccountId] = target;
|
|
51
|
+
if (lowerDefaultAccount) delete accounts[DEFAULT_ACCOUNT_ID];
|
|
52
|
+
channelConfig.accounts = accounts;
|
|
64
53
|
}
|
|
65
|
-
accounts[targetAccountId] = nextAccount;
|
|
66
|
-
if (lowerDefaultAccount) delete accounts[DEFAULT_ACCOUNT_ID];
|
|
67
54
|
return {
|
|
68
55
|
...cfg,
|
|
69
56
|
channels: {
|
|
70
57
|
...cfg.channels,
|
|
71
|
-
whatsapp:
|
|
72
|
-
...channelConfig,
|
|
73
|
-
accounts
|
|
74
|
-
}
|
|
58
|
+
whatsapp: channelConfig
|
|
75
59
|
}
|
|
76
60
|
};
|
|
77
61
|
}
|
|
78
|
-
function setWhatsAppDmPolicy(cfg, accountId, dmPolicy) {
|
|
79
|
-
return mergeWhatsAppConfig(cfg, accountId, { dmPolicy });
|
|
80
|
-
}
|
|
81
62
|
function setWhatsAppAllowFrom(cfg, accountId, allowFrom) {
|
|
82
63
|
return mergeWhatsAppConfig(cfg, accountId, { allowFrom }, { unsetOnUndefined: ["allowFrom"] });
|
|
83
64
|
}
|
|
84
|
-
function setWhatsAppSelfChatMode(cfg, accountId, selfChatMode) {
|
|
85
|
-
return mergeWhatsAppConfig(cfg, accountId, { selfChatMode });
|
|
86
|
-
}
|
|
87
|
-
async function detectWhatsAppLinked(cfg, accountId) {
|
|
88
|
-
const { authDir } = resolveWhatsAppAuthDir({
|
|
89
|
-
cfg,
|
|
90
|
-
accountId
|
|
91
|
-
});
|
|
92
|
-
return hasWebCredsSync(authDir);
|
|
93
|
-
}
|
|
94
65
|
async function promptWhatsAppOwnerAllowFrom(params) {
|
|
95
66
|
const { prompter, existingAllowFrom } = params;
|
|
96
67
|
await prompter.note(t("wizard.whatsapp.ownerNumberNote"), t("wizard.whatsapp.numberTitle"));
|
|
@@ -116,9 +87,11 @@ async function applyWhatsAppOwnerAllowlist(params) {
|
|
|
116
87
|
prompter: params.prompter,
|
|
117
88
|
existingAllowFrom: params.existingAllowFrom
|
|
118
89
|
});
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
90
|
+
const next = mergeWhatsAppConfig(params.cfg, params.accountId, {
|
|
91
|
+
selfChatMode: true,
|
|
92
|
+
dmPolicy: "allowlist",
|
|
93
|
+
allowFrom
|
|
94
|
+
});
|
|
122
95
|
await params.prompter.note([...params.messageLines, `- allowFrom includes ${normalized}`].join("\n"), params.title);
|
|
123
96
|
return next;
|
|
124
97
|
}
|
|
@@ -208,8 +181,10 @@ async function promptWhatsAppDmAccess(params) {
|
|
|
208
181
|
}
|
|
209
182
|
]
|
|
210
183
|
});
|
|
211
|
-
let next =
|
|
212
|
-
|
|
184
|
+
let next = mergeWhatsAppConfig(params.cfg, accountId, {
|
|
185
|
+
selfChatMode: false,
|
|
186
|
+
dmPolicy: policy
|
|
187
|
+
});
|
|
213
188
|
if (policy === "open") {
|
|
214
189
|
const allowFrom = normalizeWhatsAppAllowFromEntries(["*", ...existingAllowFrom]);
|
|
215
190
|
next = setWhatsAppAllowFrom(next, accountId, allowFrom.length > 0 ? allowFrom : ["*"]);
|
|
@@ -238,10 +213,7 @@ async function promptWhatsAppDmAccess(params) {
|
|
|
238
213
|
}];
|
|
239
214
|
const mode = await params.prompter.select({
|
|
240
215
|
message: t("wizard.whatsapp.allowFromPrompt"),
|
|
241
|
-
options: allowOptions
|
|
242
|
-
value: opt.value,
|
|
243
|
-
label: opt.label
|
|
244
|
-
}))
|
|
216
|
+
options: [...allowOptions]
|
|
245
217
|
});
|
|
246
218
|
if (mode === "keep") return next;
|
|
247
219
|
if (mode === "unset") return setWhatsAppAllowFrom(next, accountId, void 0);
|
|
@@ -267,11 +239,11 @@ async function finalizeWhatsAppSetup(params) {
|
|
|
267
239
|
accountId,
|
|
268
240
|
input: {}
|
|
269
241
|
});
|
|
270
|
-
const linked = await detectWhatsAppLinked(next, accountId);
|
|
271
242
|
const { authDir } = resolveWhatsAppAuthDir({
|
|
272
243
|
cfg: next,
|
|
273
244
|
accountId
|
|
274
245
|
});
|
|
246
|
+
const linked = hasWebCredsSync(authDir);
|
|
275
247
|
if (params.options?.deferDeviceLinkToClient) {
|
|
276
248
|
next = await promptWhatsAppDmAccess({
|
|
277
249
|
cfg: next,
|
|
@@ -290,18 +262,9 @@ async function finalizeWhatsAppSetup(params) {
|
|
|
290
262
|
message: linked ? t("wizard.whatsapp.relinkPrompt") : t("wizard.whatsapp.linkNowPrompt"),
|
|
291
263
|
initialValue: !linked
|
|
292
264
|
})) {
|
|
293
|
-
|
|
294
|
-
params.runtime.error(`WhatsApp login failed: ${String(error)}`);
|
|
295
|
-
await params.prompter.note(t("wizard.channels.docs", { link: formatDocsLink("/whatsapp", "whatsapp") }), t("wizard.whatsapp.helpTitle"));
|
|
296
|
-
};
|
|
297
|
-
let loginWeb;
|
|
265
|
+
let persistenceGuardFailure;
|
|
298
266
|
try {
|
|
299
|
-
|
|
300
|
-
} catch (error) {
|
|
301
|
-
await reportLoginFailure(error);
|
|
302
|
-
}
|
|
303
|
-
if (loginWeb) {
|
|
304
|
-
let persistenceGuardFailure;
|
|
267
|
+
const { loginWeb } = await import("./login-BFlvSh9h.mjs").then((n) => n.n);
|
|
305
268
|
const beforeCredentialPersistence = params.options?.beforePersistentEffect ? async () => {
|
|
306
269
|
try {
|
|
307
270
|
await params.options?.beforePersistentEffect?.();
|
|
@@ -310,12 +273,11 @@ async function finalizeWhatsAppSetup(params) {
|
|
|
310
273
|
throw error;
|
|
311
274
|
}
|
|
312
275
|
} : void 0;
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
}
|
|
276
|
+
await loginWeb(false, void 0, params.runtime, accountId, { beforeCredentialPersistence });
|
|
277
|
+
} catch (error) {
|
|
278
|
+
if (persistenceGuardFailure) throw persistenceGuardFailure.error;
|
|
279
|
+
params.runtime.error(`WhatsApp login failed: ${String(error)}`);
|
|
280
|
+
await params.prompter.note(t("wizard.channels.docs", { link: formatDocsLink("/whatsapp", "whatsapp") }), t("wizard.whatsapp.helpTitle"));
|
|
319
281
|
}
|
|
320
282
|
} else if (!linked) await params.prompter.note(t("wizard.whatsapp.linkLater", { command: formatCliCommand("openclaw channels login") }), "WhatsApp");
|
|
321
283
|
next = await promptWhatsAppDmAccess({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as resolveWhatsAppAuthDir } from "./accounts-
|
|
1
|
+
import { o as resolveWhatsAppAuthDir } from "./accounts-CtRPAQCL.mjs";
|
|
2
2
|
import { t as listAccountIds } from "./account-ids-CB5SOWjc.mjs";
|
|
3
|
-
import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-
|
|
3
|
+
import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-BBonwKks.mjs";
|
|
4
4
|
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
5
5
|
//#region extensions/whatsapp/src/setup-surface.ts
|
|
6
6
|
const t = createSetupTranslator();
|
|
@@ -36,7 +36,7 @@ const whatsappSetupWizard = {
|
|
|
36
36
|
},
|
|
37
37
|
resolveShouldPromptAccountIds: ({ shouldPromptAccountIds }) => shouldPromptAccountIds,
|
|
38
38
|
credentials: [],
|
|
39
|
-
finalize: async (params) => await (await import("./setup-finalize-
|
|
39
|
+
finalize: async (params) => await (await import("./setup-finalize-DmPX4EaW.mjs")).finalizeWhatsAppSetup(params),
|
|
40
40
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
|
|
41
41
|
onAccountRecorded: (accountId, options) => {
|
|
42
42
|
options?.onAccountId?.(channel, accountId);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-CtRPAQCL.mjs";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.mjs";
|
|
3
3
|
import { a as normalizeWhatsAppAllowFromEntries } from "./normalize-target-BGra1ZnM.mjs";
|
|
4
4
|
import { t as WhatsAppChannelConfigSchema } from "./config-schema-BYA6e_Ii.mjs";
|
|
5
|
-
import { n as whatsappDoctor } from "./doctor-
|
|
6
|
-
import { t as resolveWhatsAppConfigPath } from "./group-config-path-
|
|
5
|
+
import { n as whatsappDoctor } from "./doctor-iMwg0Vhr.mjs";
|
|
6
|
+
import { t as resolveWhatsAppConfigPath } from "./group-config-path-DZr3ucUO.mjs";
|
|
7
7
|
import { t as resolveLegacyGroupSessionKey } from "./group-session-contract-DDnZSsJ1.mjs";
|
|
8
8
|
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-nAzD945y.mjs";
|
|
9
9
|
import { n as deriveLegacySessionChatType, r as isLegacyGroupSessionKey, t as canonicalizeLegacySessionKey } from "./session-contract-DMTm6Q_L.mjs";
|
|
@@ -20,21 +20,16 @@ import { readChannelAllowFromStore } from "openclaw/plugin-sdk/channel-pairing";
|
|
|
20
20
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
21
21
|
import { createPatchedAccountSetupAdapter } from "openclaw/plugin-sdk/setup";
|
|
22
22
|
//#region extensions/whatsapp/src/channel-runtime-loader.ts
|
|
23
|
-
const loadWhatsAppAuthStore = createLazyRuntimeModule(() => import("./auth-store-
|
|
23
|
+
const loadWhatsAppAuthStore = createLazyRuntimeModule(() => import("./auth-store-BBonwKks.mjs").then((n) => n.i));
|
|
24
24
|
async function readWhatsAppAccountLinkState(authDir) {
|
|
25
25
|
const state = await (await loadWhatsAppAuthStore()).readWebAuthState(authDir);
|
|
26
26
|
return state === "unstable" ? "unknown" : state;
|
|
27
27
|
}
|
|
28
28
|
const loadWhatsAppChannelRuntime = createLazyRuntimeModule(async () => {
|
|
29
29
|
await loadWhatsAppAuthStore();
|
|
30
|
-
return await import("./channel.runtime-
|
|
30
|
+
return await import("./channel.runtime-C94goLw9.mjs");
|
|
31
31
|
});
|
|
32
32
|
//#endregion
|
|
33
|
-
//#region extensions/whatsapp/src/config-accessors.ts
|
|
34
|
-
function formatWhatsAppConfigAllowFromEntries(allowFrom) {
|
|
35
|
-
return normalizeWhatsAppAllowFromEntries(allowFrom);
|
|
36
|
-
}
|
|
37
|
-
//#endregion
|
|
38
33
|
//#region extensions/whatsapp/src/group-policy.ts
|
|
39
34
|
function resolveScopePath(params) {
|
|
40
35
|
return params.groupId ? [params.groupId] : [];
|
|
@@ -115,10 +110,6 @@ const whatsappSetupContract = defineChannelSetupContract({
|
|
|
115
110
|
//#endregion
|
|
116
111
|
//#region extensions/whatsapp/src/shared.ts
|
|
117
112
|
const WHATSAPP_CHANNEL = "whatsapp";
|
|
118
|
-
async function loadWhatsAppSetupSurface() {
|
|
119
|
-
return await import("./setup-surface-Cd3wN5HD.mjs");
|
|
120
|
-
}
|
|
121
|
-
const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard);
|
|
122
113
|
const whatsappConfigAdapter = createScopedChannelConfigAdapter({
|
|
123
114
|
sectionKey: WHATSAPP_CHANNEL,
|
|
124
115
|
listAccountIds,
|
|
@@ -127,7 +118,7 @@ const whatsappConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
127
118
|
clearBaseFields: [],
|
|
128
119
|
allowTopLevel: false,
|
|
129
120
|
resolveAllowFrom: (account) => account.allowFrom,
|
|
130
|
-
formatAllowFrom:
|
|
121
|
+
formatAllowFrom: normalizeWhatsAppAllowFromEntries,
|
|
131
122
|
resolveDefaultTo: (account) => account.defaultTo
|
|
132
123
|
});
|
|
133
124
|
const whatsappResolveDmPolicy = createScopedDmSecurityResolver({
|
|
@@ -138,27 +129,25 @@ const whatsappResolveDmPolicy = createScopedDmSecurityResolver({
|
|
|
138
129
|
normalizeEntry: (raw) => normalizeE164(raw),
|
|
139
130
|
inheritSharedDefaultsFromDefaultAccount: true
|
|
140
131
|
});
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
});
|
|
161
|
-
}
|
|
132
|
+
const whatsappSetupWizardProxy = createDelegatedSetupWizardProxy({
|
|
133
|
+
channel: WHATSAPP_CHANNEL,
|
|
134
|
+
loadWizard: async () => (await import("./setup-surface-43fj197P.mjs")).whatsappSetupWizard,
|
|
135
|
+
status: {
|
|
136
|
+
configuredLabel: "linked",
|
|
137
|
+
unconfiguredLabel: "not linked",
|
|
138
|
+
configuredHint: "linked",
|
|
139
|
+
unconfiguredHint: "not linked",
|
|
140
|
+
configuredScore: 5,
|
|
141
|
+
unconfiguredScore: 4
|
|
142
|
+
},
|
|
143
|
+
resolveShouldPromptAccountIds: (params) => params.shouldPromptAccountIds,
|
|
144
|
+
credentials: [],
|
|
145
|
+
delegateFinalize: true,
|
|
146
|
+
disable: (cfg) => setSetupChannelEnabled(cfg, WHATSAPP_CHANNEL, false),
|
|
147
|
+
onAccountRecorded: (accountId, options) => {
|
|
148
|
+
options?.onAccountId?.(WHATSAPP_CHANNEL, accountId);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
162
151
|
function createWhatsAppPluginBase() {
|
|
163
152
|
const collectWhatsAppSecurityWarnings = createAllowlistProviderGroupPolicyWarningCollector({
|
|
164
153
|
providerConfigPresent: (cfg) => cfg.channels?.whatsapp !== void 0,
|
|
@@ -302,4 +291,4 @@ function createWhatsAppPluginBase() {
|
|
|
302
291
|
};
|
|
303
292
|
}
|
|
304
293
|
//#endregion
|
|
305
|
-
export {
|
|
294
|
+
export { loadWhatsAppChannelRuntime as a, resolveWhatsAppGroupToolPolicy as i, whatsappSetupAdapter as n, resolveWhatsAppGroupRequireMention as r, createWhatsAppPluginBase as t };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { c as resolveWebCredsPath, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-
|
|
2
|
-
import { A as enqueueCredsSave, M as waitForCredsSaveQueueWithTimeout, N as writeCredsJsonAtomically, P as writeWebCredsRawAtomically, b as restoreCredsFromBackupIfNeeded, u as readCredsJsonRaw, y as resolveDefaultWebAuthDir } from "./auth-store-
|
|
3
|
-
import { n as getStatusCode } from "./session-errors-
|
|
4
|
-
import { a as makeWASocket, i as makeCacheableSignalKeyStore, n as createBaileysSignalRepository, r as fetchLatestBaileysVersion, s as useMultiFileAuthState } from "./session.runtime-
|
|
1
|
+
import { c as resolveWebCredsPath, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-CDATZWWM.mjs";
|
|
2
|
+
import { A as enqueueCredsSave, M as waitForCredsSaveQueueWithTimeout, N as writeCredsJsonAtomically, P as writeWebCredsRawAtomically, b as restoreCredsFromBackupIfNeeded, u as readCredsJsonRaw, y as resolveDefaultWebAuthDir } from "./auth-store-BBonwKks.mjs";
|
|
3
|
+
import { n as getStatusCode } from "./session-errors-B8UcAnZN.mjs";
|
|
4
|
+
import { a as makeWASocket, i as makeCacheableSignalKeyStore, n as createBaileysSignalRepository, r as fetchLatestBaileysVersion, s as useMultiFileAuthState } from "./session.runtime-st1konFI.mjs";
|
|
5
5
|
import { VERSION, formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
6
6
|
import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
7
|
-
import { danger, getChildLogger, success, toPinoLikeLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
7
|
+
import { computeBackoff, danger, getChildLogger, sleepWithAbort, success, toPinoLikeLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
8
8
|
import { renderQrTerminal } from "openclaw/plugin-sdk/media-runtime";
|
|
9
|
-
import { ensureDir, resolveUserPath } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
9
|
+
import { clamp, ensureDir, resolveUserPath } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
10
10
|
import fs from "node:fs/promises";
|
|
11
11
|
import { parseStrictPositiveInteger, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
12
|
+
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
12
13
|
import { FILE_LOCK_STALE_ERROR_CODE, FILE_LOCK_TIMEOUT_ERROR_CODE, acquireFileLock } from "openclaw/plugin-sdk/file-lock";
|
|
14
|
+
import { createNodeProxyAgent } from "openclaw/plugin-sdk/fetch-runtime";
|
|
13
15
|
import { randomUUID } from "node:crypto";
|
|
14
|
-
import { createHttp1EnvHttpProxyAgent, createHttp1ProxyAgent, createNodeProxyAgent } from "openclaw/plugin-sdk/fetch-runtime";
|
|
15
16
|
//#region extensions/whatsapp/src/connection-owner.ts
|
|
16
17
|
const WHATSAPP_CONNECTION_OWNER_BUSY_CODE = "whatsapp_connection_owner_busy";
|
|
17
18
|
var WhatsAppConnectionOwnerBusyError = class extends Error {
|
|
@@ -48,12 +49,10 @@ async function reserveProcessOwner(params) {
|
|
|
48
49
|
if (params.signal?.aborted) throw ownershipCancelledError(params.signal);
|
|
49
50
|
const current = processOwners.get(params.ownerPath);
|
|
50
51
|
if (!current) {
|
|
51
|
-
|
|
52
|
+
const released = createDeferred();
|
|
52
53
|
const owner = {
|
|
53
|
-
released:
|
|
54
|
-
|
|
55
|
-
}),
|
|
56
|
-
resolveReleased,
|
|
54
|
+
released: released.promise,
|
|
55
|
+
resolveReleased: released.resolve,
|
|
57
56
|
token: Symbol(params.ownerPath)
|
|
58
57
|
};
|
|
59
58
|
processOwners.set(params.ownerPath, owner);
|
|
@@ -233,6 +232,37 @@ function createWhatsAppSocketOperationTimeoutAdapter(sock, timeoutMs, hooks) {
|
|
|
233
232
|
};
|
|
234
233
|
}
|
|
235
234
|
//#endregion
|
|
235
|
+
//#region extensions/whatsapp/src/reconnect.ts
|
|
236
|
+
const DEFAULT_HEARTBEAT_SECONDS = 60;
|
|
237
|
+
const DEFAULT_RECONNECT_POLICY = {
|
|
238
|
+
initialMs: 2e3,
|
|
239
|
+
maxMs: 3e4,
|
|
240
|
+
factor: 1.8,
|
|
241
|
+
jitter: .25,
|
|
242
|
+
maxAttempts: 12
|
|
243
|
+
};
|
|
244
|
+
function resolveHeartbeatSeconds(cfg, overrideSeconds) {
|
|
245
|
+
const candidate = overrideSeconds;
|
|
246
|
+
if (typeof candidate === "number" && candidate > 0) return candidate;
|
|
247
|
+
return DEFAULT_HEARTBEAT_SECONDS;
|
|
248
|
+
}
|
|
249
|
+
function resolveReconnectPolicy(cfg, overrides) {
|
|
250
|
+
const overrideConfig = overrides ?? {};
|
|
251
|
+
const merged = {
|
|
252
|
+
...DEFAULT_RECONNECT_POLICY,
|
|
253
|
+
...overrideConfig
|
|
254
|
+
};
|
|
255
|
+
merged.initialMs = Math.max(250, merged.initialMs);
|
|
256
|
+
merged.maxMs = Math.max(merged.initialMs, merged.maxMs);
|
|
257
|
+
merged.factor = clamp(merged.factor, 1.1, 10);
|
|
258
|
+
merged.jitter = clamp(merged.jitter, 0, 1);
|
|
259
|
+
merged.maxAttempts = Math.max(0, Math.floor(merged.maxAttempts));
|
|
260
|
+
return merged;
|
|
261
|
+
}
|
|
262
|
+
function newConnectionId() {
|
|
263
|
+
return randomUUID();
|
|
264
|
+
}
|
|
265
|
+
//#endregion
|
|
236
266
|
//#region extensions/whatsapp/src/session.ts
|
|
237
267
|
const LOGGED_OUT_STATUS = 401;
|
|
238
268
|
const WHATSAPP_WEBSOCKET_PROXY_TARGET = "https://mmg.whatsapp.net/";
|
|
@@ -241,17 +271,6 @@ const OPENCLAW_WHATSAPP_WEB_SOCKET_URL_ENV = "OPENCLAW_WHATSAPP_WEB_SOCKET_URL";
|
|
|
241
271
|
async function rejectUnsafeWebCredsPath(authDir) {
|
|
242
272
|
await assertWebCredsPathRegularFileOrMissing(resolveWebCredsPath(authDir));
|
|
243
273
|
}
|
|
244
|
-
function enqueueSaveCreds(authDir, saveCreds, logger, options) {
|
|
245
|
-
enqueueCredsSave(authDir, () => safeSaveCreds({
|
|
246
|
-
authDir,
|
|
247
|
-
saveCreds,
|
|
248
|
-
logger,
|
|
249
|
-
beforeCredentialPersistence: options?.beforeCredentialPersistence
|
|
250
|
-
}), (err) => {
|
|
251
|
-
logger.warn({ error: String(err) }, "WhatsApp creds save queue error");
|
|
252
|
-
options?.onError?.(err);
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
274
|
async function safeSaveCreds(params) {
|
|
256
275
|
let backup;
|
|
257
276
|
try {
|
|
@@ -344,8 +363,11 @@ async function createWaSocketInternal(printQr, verbose, opts, receiveMode) {
|
|
|
344
363
|
};
|
|
345
364
|
const { version } = await fetchLatestBaileysVersion();
|
|
346
365
|
const waWebSocketUrl = resolveWaWebSocketUrl(opts.waWebSocketUrl) ?? resolveEnvWaWebSocketUrl();
|
|
347
|
-
const
|
|
348
|
-
|
|
366
|
+
const fetchAgent = createNodeProxyAgent({
|
|
367
|
+
mode: "env",
|
|
368
|
+
protocol: "https"
|
|
369
|
+
});
|
|
370
|
+
const agent = resolveEnvProxyAgent(sessionLogger, WHATSAPP_WEBSOCKET_PROXY_TARGET);
|
|
349
371
|
const socketTiming = {
|
|
350
372
|
keepAliveIntervalMs: opts.keepAliveIntervalMs ?? DEFAULT_WHATSAPP_SOCKET_TIMING.keepAliveIntervalMs,
|
|
351
373
|
connectTimeoutMs: opts.connectTimeoutMs ?? DEFAULT_WHATSAPP_SOCKET_TIMING.connectTimeoutMs,
|
|
@@ -443,31 +465,36 @@ async function createWaSocketInternal(printQr, verbose, opts, receiveMode) {
|
|
|
443
465
|
]) sock.ws.removeAllListeners(event);
|
|
444
466
|
socketRef.current = sock;
|
|
445
467
|
if (pendingSocketAbort) abortSocketAfterCredentialPersistenceFailure(sock, pendingSocketAbort.error);
|
|
446
|
-
sock.ev.on("creds.update", () =>
|
|
447
|
-
|
|
448
|
-
|
|
468
|
+
sock.ev.on("creds.update", () => enqueueCredsSave(authDir, () => safeSaveCreds({
|
|
469
|
+
authDir,
|
|
470
|
+
saveCreds,
|
|
471
|
+
logger: sessionLogger,
|
|
472
|
+
beforeCredentialPersistence: opts.beforeCredentialPersistence
|
|
473
|
+
}), (err) => {
|
|
474
|
+
sessionLogger.warn({ error: String(err) }, "WhatsApp creds save queue error");
|
|
475
|
+
reportCredentialPersistenceError(err);
|
|
449
476
|
}));
|
|
450
477
|
sock.ev.on("connection.update", (update) => {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
if (connection === "close") {
|
|
464
|
-
if (getStatusCode(lastDisconnect?.error) === LOGGED_OUT_STATUS) console.error(danger(`WhatsApp session logged out. Run: ${formatCliCommand("openclaw channels login")}`));
|
|
478
|
+
try {
|
|
479
|
+
const { connection, lastDisconnect, qr } = update;
|
|
480
|
+
if (qr) {
|
|
481
|
+
opts.onQr?.(qr);
|
|
482
|
+
if (printQr) {
|
|
483
|
+
console.log("Open the WhatsApp app, go to Linked Devices, then scan this QR:");
|
|
484
|
+
printTerminalQr(qr).catch((err) => {
|
|
485
|
+
sessionLogger.warn({ error: String(err) }, "failed rendering WhatsApp QR");
|
|
486
|
+
});
|
|
465
487
|
}
|
|
466
|
-
if (connection === "open" && verbose) console.log(success("WhatsApp Web connected."));
|
|
467
|
-
} catch (err) {
|
|
468
|
-
sessionLogger.error({ error: String(err) }, "connection.update handler error");
|
|
469
488
|
}
|
|
470
|
-
|
|
489
|
+
if (connection === "close") {
|
|
490
|
+
agent?.destroy();
|
|
491
|
+
fetchAgent?.destroy();
|
|
492
|
+
if (getStatusCode(lastDisconnect?.error) === LOGGED_OUT_STATUS) console.error(danger(`WhatsApp session logged out. Run: ${formatCliCommand("openclaw channels login")}`));
|
|
493
|
+
}
|
|
494
|
+
if (connection === "open" && verbose) console.log(success("WhatsApp Web connected."));
|
|
495
|
+
} catch (err) {
|
|
496
|
+
sessionLogger.error({ error: String(err) }, "connection.update handler error");
|
|
497
|
+
}
|
|
471
498
|
});
|
|
472
499
|
if (sock.ws && typeof sock.ws.on === "function") sock.ws.on("error", (err) => {
|
|
473
500
|
sessionLogger.error({ error: String(err) }, "WebSocket error");
|
|
@@ -477,67 +504,31 @@ async function createWaSocketInternal(printQr, verbose, opts, receiveMode) {
|
|
|
477
504
|
async function createWaDirectorySocket(authDir) {
|
|
478
505
|
return await createWaSocketInternal(false, false, { authDir }, "directory");
|
|
479
506
|
}
|
|
480
|
-
|
|
507
|
+
function resolveEnvProxyAgent(logger, targetUrl) {
|
|
481
508
|
try {
|
|
482
509
|
const agent = createNodeProxyAgent({
|
|
483
510
|
mode: "env",
|
|
484
|
-
targetUrl
|
|
511
|
+
targetUrl,
|
|
485
512
|
protocol: "https"
|
|
486
513
|
});
|
|
487
|
-
if (
|
|
488
|
-
logger.info("Using ambient env proxy for WhatsApp WebSocket connection");
|
|
514
|
+
if (agent) logger.info("Using ambient env proxy for WhatsApp connection");
|
|
489
515
|
return agent;
|
|
490
516
|
} catch (error) {
|
|
491
|
-
logger.warn({ error: String(error) }, "Failed to initialize env proxy agent for WhatsApp
|
|
492
|
-
return;
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
async function resolveEnvFetchDispatcher(logger, agent) {
|
|
496
|
-
const proxyUrl = resolveProxyUrlFromAgent(agent);
|
|
497
|
-
const envProxyUrl = resolveEnvHttpsProxyUrl();
|
|
498
|
-
if (!proxyUrl && !envProxyUrl) return;
|
|
499
|
-
try {
|
|
500
|
-
return proxyUrl ? createHttp1ProxyAgent({ uri: proxyUrl }) : createHttp1EnvHttpProxyAgent();
|
|
501
|
-
} catch (error) {
|
|
502
|
-
logger.warn({ error: String(error) }, "Failed to initialize env proxy dispatcher for WhatsApp media uploads");
|
|
517
|
+
logger.warn({ error: String(error) }, "Failed to initialize env proxy agent for WhatsApp connection");
|
|
503
518
|
return;
|
|
504
519
|
}
|
|
505
520
|
}
|
|
506
|
-
function resolveProxyUrlFromAgent(agent) {
|
|
507
|
-
if (typeof agent === "object" && agent !== null && "getProxyForUrl" in agent && typeof agent.getProxyForUrl === "function") {
|
|
508
|
-
const proxyUrl = agent.getProxyForUrl(WHATSAPP_WEBSOCKET_PROXY_TARGET);
|
|
509
|
-
return typeof proxyUrl === "string" && proxyUrl.length > 0 ? proxyUrl : void 0;
|
|
510
|
-
}
|
|
511
|
-
if (typeof agent !== "object" || agent === null || !("proxy" in agent)) return;
|
|
512
|
-
const proxy = agent.proxy;
|
|
513
|
-
if (proxy instanceof URL) return proxy.toString();
|
|
514
|
-
return typeof proxy === "string" && proxy.length > 0 ? proxy : void 0;
|
|
515
|
-
}
|
|
516
|
-
function resolveEnvHttpsProxyUrl(env = process.env) {
|
|
517
|
-
const lowerHttpsProxy = normalizeEnvProxyValue(env.https_proxy);
|
|
518
|
-
const lowerHttpProxy = normalizeEnvProxyValue(env.http_proxy);
|
|
519
|
-
const httpsProxy = lowerHttpsProxy !== void 0 ? lowerHttpsProxy : normalizeEnvProxyValue(env.HTTPS_PROXY);
|
|
520
|
-
const httpProxy = lowerHttpProxy !== void 0 ? lowerHttpProxy : normalizeEnvProxyValue(env.HTTP_PROXY);
|
|
521
|
-
return httpsProxy ?? httpProxy ?? void 0;
|
|
522
|
-
}
|
|
523
|
-
function normalizeEnvProxyValue(value) {
|
|
524
|
-
if (typeof value !== "string") return;
|
|
525
|
-
const trimmed = value.trim();
|
|
526
|
-
return trimmed.length > 0 ? trimmed : null;
|
|
527
|
-
}
|
|
528
521
|
async function waitForWaConnection(sock, options = { timeout: "none" }) {
|
|
529
522
|
return new Promise((resolve, reject) => {
|
|
530
|
-
const evWithOff = sock.ev;
|
|
531
523
|
let timer;
|
|
532
524
|
const cleanup = () => {
|
|
533
|
-
|
|
525
|
+
sock.ev.off?.("connection.update", handler);
|
|
534
526
|
if (timer) {
|
|
535
527
|
clearTimeout(timer);
|
|
536
528
|
timer = void 0;
|
|
537
529
|
}
|
|
538
530
|
};
|
|
539
|
-
const handler = (
|
|
540
|
-
const update = args[0] ?? {};
|
|
531
|
+
const handler = (update = {}) => {
|
|
541
532
|
if (update.connection === "open") {
|
|
542
533
|
cleanup();
|
|
543
534
|
resolve();
|
|
@@ -559,9 +550,6 @@ async function waitForWaConnection(sock, options = { timeout: "none" }) {
|
|
|
559
550
|
}
|
|
560
551
|
});
|
|
561
552
|
}
|
|
562
|
-
function newConnectionId() {
|
|
563
|
-
return randomUUID();
|
|
564
|
-
}
|
|
565
553
|
function createConnectionTimeoutError(timeoutMs) {
|
|
566
554
|
const error = /* @__PURE__ */ new Error(`WhatsApp connection timed out after ${timeoutMs}ms`);
|
|
567
555
|
Object.assign(error, { output: { statusCode: 408 } });
|
|
@@ -616,4 +604,4 @@ async function closeWhatsAppSocketAndWait(sock, reason) {
|
|
|
616
604
|
throw new AggregateError(errors, "WhatsApp socket close could not be confirmed");
|
|
617
605
|
}
|
|
618
606
|
//#endregion
|
|
619
|
-
export {
|
|
607
|
+
export { renderQrTerminal as _, DEFAULT_RECONNECT_POLICY as a, acquireWhatsAppStandaloneConnectionOwner as b, resolveHeartbeatSeconds as c, DEFAULT_WHATSAPP_SOCKET_TIMING as d, createWhatsAppSocketOperationTimeoutAdapter as f, withWhatsAppSocketOperationTimeout as g, resolveWhatsAppSocketTiming as h, waitForWaConnection as i, resolveReconnectPolicy as l, resolveWhatsAppSocketOperationTimeoutMs as m, createWaDirectorySocket as n, computeBackoff as o, isWhatsAppSocketOperationTimeoutError as p, createWaSocket as r, newConnectionId as s, closeWhatsAppSocketAndWait as t, sleepWithAbort as u, WhatsAppConnectionOwnerBusyError as v, acquireWhatsAppGatewayConnectionOwner as y };
|
|
@@ -100,13 +100,8 @@ const DIRECT_PN_JID_RE = /^(\d+)(?::\d+)?@(s\.whatsapp\.net|hosted)$/i;
|
|
|
100
100
|
const DIRECT_LID_JID_RE = /^(\d+)(?::\d+)?@(lid|hosted\.lid)$/i;
|
|
101
101
|
function addEquivalentDirectChatCandidate(target, jid) {
|
|
102
102
|
addUniqueString(target, jid);
|
|
103
|
-
const
|
|
104
|
-
if (
|
|
105
|
-
addUniqueString(target, `${pnMatch[1]}@${pnMatch[2]}`);
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
const lidMatch = jid?.match(DIRECT_LID_JID_RE);
|
|
109
|
-
if (lidMatch) addUniqueString(target, `${lidMatch[1]}@${lidMatch[2]}`);
|
|
103
|
+
const match = jid?.match(DIRECT_PN_JID_RE) ?? jid?.match(DIRECT_LID_JID_RE);
|
|
104
|
+
if (match) addUniqueString(target, `${match[1]}@${match[2]}`);
|
|
110
105
|
}
|
|
111
106
|
async function resolveEquivalentWhatsAppDirectChatJids(jid, opts) {
|
|
112
107
|
const normalized = jid?.trim();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "./.setup/action-runtime-
|
|
1
|
+
import { t as handleWhatsAppAction } from "./.setup/action-runtime-DeVk5V7r.mjs";
|
|
2
2
|
export { handleWhatsAppAction };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "./.setup/action-runtime-
|
|
1
|
+
import { t as handleWhatsAppAction } from "./.setup/action-runtime-DeVk5V7r.mjs";
|
|
2
2
|
export { handleWhatsAppAction };
|