@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,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.mjs";
|
|
2
|
+
import { a as resolveWhatsAppAccount } from "./accounts-CtRPAQCL.mjs";
|
|
3
3
|
import { createQuestionReactionTargetStore, questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
4
4
|
//#region extensions/whatsapp/src/question-reactions.ts
|
|
5
5
|
var question_reactions_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __exportAll = (all, no_symbols) => {
|
|
7
|
+
let target = {};
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
17
|
+
key = keys[i];
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: ((k) => from[k]).bind(null, key),
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
26
|
+
//#endregion
|
|
27
|
+
export { __reExport as n, __exportAll as t };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, c as resolveMergedWhatsAppAccountConfig, s as resolveWhatsAppMediaMaxBytes } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount, c as resolveMergedWhatsAppAccountConfig, s as resolveWhatsAppMediaMaxBytes } from "./accounts-CtRPAQCL.mjs";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.mjs";
|
|
3
3
|
import { n as isWhatsAppNewsletterJid } from "./normalize-target-BGra1ZnM.mjs";
|
|
4
4
|
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-hgLJoRc8.mjs";
|
|
5
|
-
import "./
|
|
6
|
-
import { a as markdownToWhatsAppChunks, c as toWhatsappJid } from "./targets-runtime-RBjx3pg_.mjs";
|
|
7
|
-
import { a as stripToolCallXmlTags, i as sanitizeAssistantVisibleTextWithProfile, r as sanitizeAssistantVisibleText } from "./text-runtime-CHl0iPYe.mjs";
|
|
5
|
+
import { a as markdownToWhatsAppChunks, c as toWhatsappJid } from "./targets-runtime-DmiqXIXO.mjs";
|
|
8
6
|
import path from "node:path";
|
|
9
7
|
import { normalizeStringEntries, normalizeUniqueStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
8
|
import { resolveReactionLevel } from "openclaw/plugin-sdk/status-helpers";
|
|
@@ -25,6 +23,7 @@ import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runt
|
|
|
25
23
|
import { createChannelPartialDeliveryError, isChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
|
|
26
24
|
import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, transcodeAudioBufferToOpus } from "openclaw/plugin-sdk/media-runtime";
|
|
27
25
|
import { resolveOutboundMediaUrls } from "openclaw/plugin-sdk/reply-payload";
|
|
26
|
+
import { sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithProfile, stripToolCallXmlTags } from "openclaw/plugin-sdk/text-chunking";
|
|
28
27
|
//#region extensions/whatsapp/src/reaction-level.ts
|
|
29
28
|
/** Resolve the effective reaction level and its implications for WhatsApp. */
|
|
30
29
|
function resolveWhatsAppReactionLevel(params) {
|
|
@@ -40,13 +39,8 @@ function resolveWhatsAppReactionLevel(params) {
|
|
|
40
39
|
}
|
|
41
40
|
//#endregion
|
|
42
41
|
//#region extensions/whatsapp/src/document-filename.ts
|
|
43
|
-
const WHATSAPP_DEFAULT_DOCUMENT_FILE_NAME = "file";
|
|
44
|
-
function resolveWhatsAppDefaultDocumentFileName(mimetype) {
|
|
45
|
-
const extension = extensionForMime(mimetype);
|
|
46
|
-
return extension ? `${WHATSAPP_DEFAULT_DOCUMENT_FILE_NAME}${extension}` : WHATSAPP_DEFAULT_DOCUMENT_FILE_NAME;
|
|
47
|
-
}
|
|
48
42
|
function resolveWhatsAppDocumentFileName(params) {
|
|
49
|
-
const fallbackName =
|
|
43
|
+
const fallbackName = `file${extensionForMime(params.mimetype) ?? ""}`;
|
|
50
44
|
return stripAsciiControlCharacters(params.fileName ?? "").trim() || fallbackName;
|
|
51
45
|
}
|
|
52
46
|
function stripAsciiControlCharacters(value) {
|
|
@@ -302,11 +296,8 @@ const WHATSAPP_VOICE_FILE_NAME = "voice.ogg";
|
|
|
302
296
|
const WHATSAPP_VOICE_SAMPLE_RATE_HZ = 48e3;
|
|
303
297
|
const WHATSAPP_VOICE_BITRATE = "64k";
|
|
304
298
|
const WHATSAPP_VOICE_MIMETYPE = "audio/ogg; codecs=opus";
|
|
305
|
-
function stripWhatsAppPluralToolXml(text) {
|
|
306
|
-
return stripToolCallXmlTags(text, { stripFunctionCallsXmlPayloads: true });
|
|
307
|
-
}
|
|
308
299
|
function finalizeWhatsAppVisibleText(text) {
|
|
309
|
-
return sanitizeForPlainText(
|
|
300
|
+
return sanitizeForPlainText(stripToolCallXmlTags(text, { stripFunctionCallsXmlPayloads: true }));
|
|
310
301
|
}
|
|
311
302
|
function normalizeWhatsAppPayloadText(text) {
|
|
312
303
|
return finalizeWhatsAppVisibleText(sanitizeAssistantVisibleText(text ?? "")).trimStart();
|
|
@@ -371,9 +362,15 @@ async function prepareWhatsAppOutboundMedia(media, mediaUrl) {
|
|
|
371
362
|
mediaUrl
|
|
372
363
|
})) return normalized;
|
|
373
364
|
return {
|
|
374
|
-
buffer: await
|
|
375
|
-
|
|
376
|
-
|
|
365
|
+
buffer: await transcodeAudioBufferToOpus({
|
|
366
|
+
audioBuffer: media.buffer,
|
|
367
|
+
inputFileName: media.fileName ?? deriveWhatsAppDocumentFileName(mediaUrl) ?? "audio",
|
|
368
|
+
tempPrefix: "whatsapp-voice-",
|
|
369
|
+
outputFileName: WHATSAPP_VOICE_FILE_NAME,
|
|
370
|
+
maxDurationSeconds: MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS,
|
|
371
|
+
sampleRateHz: WHATSAPP_VOICE_SAMPLE_RATE_HZ,
|
|
372
|
+
channels: 1,
|
|
373
|
+
bitrate: WHATSAPP_VOICE_BITRATE
|
|
377
374
|
}),
|
|
378
375
|
kind: "audio",
|
|
379
376
|
mimetype: WHATSAPP_VOICE_MIMETYPE
|
|
@@ -386,18 +383,6 @@ function isWhatsAppNativeVoiceAudio(params) {
|
|
|
386
383
|
const ext = path.extname(fileName).toLowerCase();
|
|
387
384
|
return ext === ".ogg" || ext === ".opus";
|
|
388
385
|
}
|
|
389
|
-
async function transcodeToWhatsAppVoiceOpus(params) {
|
|
390
|
-
return await transcodeAudioBufferToOpus({
|
|
391
|
-
audioBuffer: params.buffer,
|
|
392
|
-
inputFileName: params.fileName,
|
|
393
|
-
tempPrefix: "whatsapp-voice-",
|
|
394
|
-
outputFileName: WHATSAPP_VOICE_FILE_NAME,
|
|
395
|
-
maxDurationSeconds: MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS,
|
|
396
|
-
sampleRateHz: WHATSAPP_VOICE_SAMPLE_RATE_HZ,
|
|
397
|
-
channels: 1,
|
|
398
|
-
bitrate: WHATSAPP_VOICE_BITRATE
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
386
|
function deriveWhatsAppDocumentFileName(mediaUrl) {
|
|
402
387
|
if (!mediaUrl) return;
|
|
403
388
|
try {
|
|
@@ -411,39 +396,8 @@ function deriveWhatsAppDocumentFileName(mediaUrl) {
|
|
|
411
396
|
//#endregion
|
|
412
397
|
//#region extensions/whatsapp/src/send.ts
|
|
413
398
|
const outboundLog = createSubsystemLogger$1("gateway/channels/whatsapp").child("outbound");
|
|
414
|
-
function supportsForcedDocumentDelivery(kind) {
|
|
415
|
-
return kind === "image" || kind === "video";
|
|
416
|
-
}
|
|
417
|
-
function buildWhatsAppMediaSendState(params) {
|
|
418
|
-
const { media, caption } = params;
|
|
419
|
-
const forceDocumentDelivery = Boolean(params.forceDocument && supportsForcedDocumentDelivery(media.kind)) || media.kind === "document" && (media.mimetype.startsWith("image/") || media.mimetype.startsWith("video/"));
|
|
420
|
-
let text = caption ?? "";
|
|
421
|
-
let documentFileName = media.kind === "document" ? media.fileName : void 0;
|
|
422
|
-
let visibleTextAfterVoice;
|
|
423
|
-
if (media.kind === "audio" && caption) {
|
|
424
|
-
visibleTextAfterVoice = caption;
|
|
425
|
-
text = "";
|
|
426
|
-
}
|
|
427
|
-
if (forceDocumentDelivery) documentFileName ??= resolveWhatsAppDocumentFileName({
|
|
428
|
-
fileName: media.fileName,
|
|
429
|
-
mimetype: media.mimetype
|
|
430
|
-
});
|
|
431
|
-
return {
|
|
432
|
-
mediaBuffer: media.buffer,
|
|
433
|
-
mediaType: media.mimetype,
|
|
434
|
-
text,
|
|
435
|
-
forceDocumentDelivery,
|
|
436
|
-
...documentFileName ? { documentFileName } : {},
|
|
437
|
-
...visibleTextAfterVoice ? { visibleTextAfterVoice } : {}
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
function resolveOutboundWhatsAppAccountId(params) {
|
|
441
|
-
const explicitAccountId = params.accountId?.trim();
|
|
442
|
-
if (explicitAccountId) return explicitAccountId;
|
|
443
|
-
return resolveDefaultWhatsAppAccountId(params.cfg);
|
|
444
|
-
}
|
|
445
399
|
function requireOutboundActiveWebListener(params) {
|
|
446
|
-
const resolvedAccountId =
|
|
400
|
+
const resolvedAccountId = params.accountId?.trim() || resolveDefaultWhatsAppAccountId(params.cfg);
|
|
447
401
|
const listener = getWhatsAppConnectionController(resolvedAccountId)?.getActiveListener() ?? null;
|
|
448
402
|
if (!listener) {
|
|
449
403
|
const cause = /* @__PURE__ */ new Error(`No active WhatsApp Web listener (account: ${resolvedAccountId}). Start the gateway, then link WhatsApp with: ${formatCliCommand(`openclaw channels login --channel whatsapp --account ${resolvedAccountId}`)}.`);
|
|
@@ -455,10 +409,7 @@ function requireOutboundActiveWebListener(params) {
|
|
|
455
409
|
};
|
|
456
410
|
}
|
|
457
411
|
function resolveActualSentRemoteJid(result, fallbackJid) {
|
|
458
|
-
|
|
459
|
-
const rawKeys = result.keys;
|
|
460
|
-
const keys = Array.isArray(rawKeys) ? rawKeys : [];
|
|
461
|
-
for (const key of keys) if (typeof key?.remoteJid === "string" && key.remoteJid.trim()) return key.remoteJid.trim();
|
|
412
|
+
for (const key of result.keys) if (key.remoteJid?.trim()) return key.remoteJid.trim();
|
|
462
413
|
return fallbackJid;
|
|
463
414
|
}
|
|
464
415
|
async function sendMessageWhatsApp(to, body, options) {
|
|
@@ -487,17 +438,16 @@ async function sendMessageWhatsAppInActivityScope(to, body, options) {
|
|
|
487
438
|
});
|
|
488
439
|
const account = resolveWhatsAppAccount({
|
|
489
440
|
cfg,
|
|
490
|
-
accountId: resolvedAccountId
|
|
441
|
+
accountId: resolvedAccountId
|
|
491
442
|
});
|
|
492
443
|
const tableMode = resolveMarkdownTableMode({
|
|
493
444
|
cfg,
|
|
494
445
|
channel: "whatsapp",
|
|
495
|
-
accountId: resolvedAccountId
|
|
446
|
+
accountId: resolvedAccountId
|
|
496
447
|
});
|
|
497
|
-
const accountIdForFormatting = resolvedAccountId ?? options.accountId;
|
|
498
448
|
const requestedLimit = options.formatting?.textLimit ?? Infinity;
|
|
499
|
-
const textLimit = Math.min(requestedLimit > 0 ? requestedLimit : Infinity, resolveTextChunkLimit(cfg, "whatsapp",
|
|
500
|
-
const textChunks = markdownToWhatsAppChunks(text, textLimit, tableMode, options.formatting?.chunkMode ?? resolveChunkMode(cfg, "whatsapp",
|
|
449
|
+
const textLimit = Math.min(requestedLimit > 0 ? requestedLimit : Infinity, resolveTextChunkLimit(cfg, "whatsapp", resolvedAccountId, { fallbackLimit: 4e3 }), 4096);
|
|
450
|
+
const textChunks = markdownToWhatsAppChunks(text, textLimit, tableMode, options.formatting?.chunkMode ?? resolveChunkMode(cfg, "whatsapp", resolvedAccountId));
|
|
501
451
|
text = textChunks.shift() ?? text;
|
|
502
452
|
if (!text && !hasMedia) return {
|
|
503
453
|
messageId: "",
|
|
@@ -538,17 +488,18 @@ async function sendMessageWhatsAppInActivityScope(to, body, options) {
|
|
|
538
488
|
} : mediaWithRequestedType, primaryMediaUrl);
|
|
539
489
|
}
|
|
540
490
|
if (media) {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
491
|
+
mediaBuffer = media.buffer;
|
|
492
|
+
mediaType = media.mimetype;
|
|
493
|
+
forceDocumentDelivery = Boolean(options.forceDocument && (media.kind === "image" || media.kind === "video")) || media.kind === "document" && (media.mimetype.startsWith("image/") || media.mimetype.startsWith("video/"));
|
|
494
|
+
documentFileName = media.kind === "document" ? media.fileName : void 0;
|
|
495
|
+
if (media.kind === "audio" && text) {
|
|
496
|
+
visibleTextAfterVoice = text;
|
|
497
|
+
text = "";
|
|
498
|
+
}
|
|
499
|
+
if (forceDocumentDelivery) documentFileName ??= resolveWhatsAppDocumentFileName({
|
|
500
|
+
fileName: media.fileName,
|
|
501
|
+
mimetype: media.mimetype
|
|
545
502
|
});
|
|
546
|
-
mediaBuffer = mediaSendState.mediaBuffer;
|
|
547
|
-
mediaType = mediaSendState.mediaType;
|
|
548
|
-
documentFileName = mediaSendState.documentFileName;
|
|
549
|
-
visibleTextAfterVoice = mediaSendState.visibleTextAfterVoice;
|
|
550
|
-
forceDocumentDelivery = mediaSendState.forceDocumentDelivery;
|
|
551
|
-
text = mediaSendState.text;
|
|
552
503
|
}
|
|
553
504
|
outboundLog.info(`Sending message -> ${redactedJid}${hasMedia ? " (media)" : ""}`);
|
|
554
505
|
logger.info({
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { n as isWhatsAppNewsletterJid } from "./normalize-target-BGra1ZnM.mjs";
|
|
2
|
-
import { _ as resolveWhatsAppDocumentFileName, f as mergeWhatsAppAcceptedSendError, m as rememberWhatsAppAcceptedSend, p as normalizeWhatsAppSendResult, u as combineWhatsAppSendResults } from "./send-
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import { i as buildQuotedMessageOptions } from "./group-session-key-D22hYMdE.mjs";
|
|
7
|
-
import { k as resolveComparableIdentity } from "./auth-store-Dh8a3cba.mjs";
|
|
2
|
+
import { _ as resolveWhatsAppDocumentFileName, f as mergeWhatsAppAcceptedSendError, m as rememberWhatsAppAcceptedSend, p as normalizeWhatsAppSendResult, u as combineWhatsAppSendResults } from "./send-BGdvf5cC.mjs";
|
|
3
|
+
import { c as toWhatsappJid, l as toWhatsappJidWithLid, r as jidToE164 } from "./targets-runtime-DmiqXIXO.mjs";
|
|
4
|
+
import { i as buildQuotedMessageOptions } from "./group-session-key-2-mja4OF.mjs";
|
|
5
|
+
import { k as resolveComparableIdentity } from "./auth-store-BBonwKks.mjs";
|
|
8
6
|
import { isRecord, normalizeLowercaseStringOrEmpty, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
7
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
10
8
|
import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
|
|
@@ -199,8 +197,7 @@ function extractText(source) {
|
|
|
199
197
|
if (pollText) return pollText;
|
|
200
198
|
}
|
|
201
199
|
}
|
|
202
|
-
|
|
203
|
-
if (contactPlaceholder) return contactPlaceholder;
|
|
200
|
+
return extractContactPlaceholder(projection) ?? (extracted && extracted !== message ? extractContactPlaceholder(extracted) : void 0);
|
|
204
201
|
}
|
|
205
202
|
function extractExternalAdReplyContext(source) {
|
|
206
203
|
const message = unwrapMessage(source);
|
|
@@ -235,29 +232,17 @@ function extractContactContext(source) {
|
|
|
235
232
|
const message = unwrapMessage(source);
|
|
236
233
|
if (!message) return;
|
|
237
234
|
const contact = message.contactMessage ?? void 0;
|
|
238
|
-
if (contact) {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
return {
|
|
244
|
-
kind: "contact",
|
|
245
|
-
total: 1,
|
|
246
|
-
contacts: [{
|
|
247
|
-
name,
|
|
248
|
-
phones
|
|
249
|
-
}]
|
|
250
|
-
};
|
|
251
|
-
}
|
|
235
|
+
if (contact) return {
|
|
236
|
+
kind: "contact",
|
|
237
|
+
total: 1,
|
|
238
|
+
contacts: [describeContact(contact)]
|
|
239
|
+
};
|
|
252
240
|
const contactsArray = message.contactsArrayMessage?.contacts ?? void 0;
|
|
253
241
|
if (!contactsArray || contactsArray.length === 0) return;
|
|
254
242
|
return {
|
|
255
243
|
kind: "contacts",
|
|
256
244
|
total: contactsArray.length,
|
|
257
|
-
contacts: contactsArray.map(
|
|
258
|
-
displayName: entry.displayName,
|
|
259
|
-
vcard: entry.vcard
|
|
260
|
-
}))
|
|
245
|
+
contacts: contactsArray.map(describeContact)
|
|
261
246
|
};
|
|
262
247
|
}
|
|
263
248
|
function describeContact(input) {
|
|
@@ -270,45 +255,30 @@ function describeContact(input) {
|
|
|
270
255
|
}
|
|
271
256
|
function extractLocationData(source) {
|
|
272
257
|
const message = unwrapMessage(source);
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
const longitude = longitudeRaw;
|
|
298
|
-
if (Number.isFinite(latitude) && Number.isFinite(longitude)) {
|
|
299
|
-
const isLive = Boolean(location.isLive);
|
|
300
|
-
return {
|
|
301
|
-
latitude,
|
|
302
|
-
longitude,
|
|
303
|
-
accuracy: location.accuracyInMeters ?? void 0,
|
|
304
|
-
name: location.name ?? void 0,
|
|
305
|
-
address: location.address ?? void 0,
|
|
306
|
-
caption: location.comment ?? void 0,
|
|
307
|
-
source: isLive ? "live" : location.name || location.address ? "place" : "pin",
|
|
308
|
-
isLive
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
}
|
|
258
|
+
for (const [location, locationSource] of [[message?.liveLocationMessage, "live"], [message?.locationMessage, "pin"]]) {
|
|
259
|
+
const latitude = location?.degreesLatitude;
|
|
260
|
+
const longitude = location?.degreesLongitude;
|
|
261
|
+
if (!location || latitude == null || longitude == null || !Number.isFinite(latitude) || !Number.isFinite(longitude)) continue;
|
|
262
|
+
const coordinates = {
|
|
263
|
+
latitude,
|
|
264
|
+
longitude,
|
|
265
|
+
accuracy: location.accuracyInMeters ?? void 0
|
|
266
|
+
};
|
|
267
|
+
if (locationSource === "live") return {
|
|
268
|
+
...coordinates,
|
|
269
|
+
caption: location.caption ?? void 0,
|
|
270
|
+
source: locationSource,
|
|
271
|
+
isLive: true
|
|
272
|
+
};
|
|
273
|
+
const isLive = Boolean(location.isLive);
|
|
274
|
+
return {
|
|
275
|
+
...coordinates,
|
|
276
|
+
name: location.name ?? void 0,
|
|
277
|
+
address: location.address ?? void 0,
|
|
278
|
+
caption: location.comment ?? void 0,
|
|
279
|
+
source: isLive ? "live" : location.name || location.address ? "place" : "pin",
|
|
280
|
+
isLive
|
|
281
|
+
};
|
|
312
282
|
}
|
|
313
283
|
return null;
|
|
314
284
|
}
|
|
@@ -339,21 +309,17 @@ function describeReplyContext(source) {
|
|
|
339
309
|
contentType: resolveInboundMediaMimetype(quoted)
|
|
340
310
|
} : void 0;
|
|
341
311
|
if (!body && !media) {
|
|
342
|
-
const quotedType =
|
|
312
|
+
const quotedType = getContentType(quoted);
|
|
343
313
|
logVerbose(`Quoted message missing extractable body${quotedType ? ` (type ${quotedType})` : ""}`);
|
|
344
314
|
return null;
|
|
345
315
|
}
|
|
346
316
|
return {
|
|
347
317
|
id: contextInfo?.stanzaId || void 0,
|
|
348
|
-
body
|
|
318
|
+
body,
|
|
349
319
|
media,
|
|
350
320
|
sender
|
|
351
321
|
};
|
|
352
322
|
}
|
|
353
|
-
function hasInteractiveResponseContent(message) {
|
|
354
|
-
if (!message) return false;
|
|
355
|
-
return Boolean(message.buttonsResponseMessage || message.listResponseMessage || message.templateButtonReplyMessage || message.interactiveResponseMessage);
|
|
356
|
-
}
|
|
357
323
|
/**
|
|
358
324
|
* Fast check that a Baileys message carries user-visible inbound content
|
|
359
325
|
* (text, media, contact, location, button/list selection). Returns false for
|
|
@@ -363,12 +329,7 @@ function hasInteractiveResponseContent(message) {
|
|
|
363
329
|
*/
|
|
364
330
|
function hasInboundUserContent(source) {
|
|
365
331
|
const projection = resolveWhatsAppInboundMessageProjection(source);
|
|
366
|
-
|
|
367
|
-
if (extractText(projection)) return true;
|
|
368
|
-
if (extractMediaKind(projection)) return true;
|
|
369
|
-
if (extractLocationData(projection)) return true;
|
|
370
|
-
for (const candidate of projection) if (hasInteractiveResponseContent(candidate)) return true;
|
|
371
|
-
return false;
|
|
332
|
+
return Boolean(extractText(projection) || extractMediaKind(projection) || extractLocationData(projection) || projection.some((message) => message.buttonsResponseMessage || message.listResponseMessage || message.templateButtonReplyMessage || message.interactiveResponseMessage));
|
|
372
333
|
}
|
|
373
334
|
//#endregion
|
|
374
335
|
//#region extensions/whatsapp/src/image-preview.ts
|
|
@@ -464,15 +425,6 @@ function extractLidDigits(value) {
|
|
|
464
425
|
const parts = extractKnownJidParts(value);
|
|
465
426
|
return parts && LID_JID_DOMAIN_RE.test(parts.domain) ? parts.user : null;
|
|
466
427
|
}
|
|
467
|
-
function isLidJid(jid) {
|
|
468
|
-
const parts = extractKnownJidParts(jid);
|
|
469
|
-
return Boolean(parts && LID_JID_DOMAIN_RE.test(parts.domain));
|
|
470
|
-
}
|
|
471
|
-
function lidReplacementText(jid) {
|
|
472
|
-
const parts = extractKnownJidParts(jid);
|
|
473
|
-
if (!parts || !LID_JID_DOMAIN_RE.test(parts.domain)) return;
|
|
474
|
-
return `@${parts.user}`;
|
|
475
|
-
}
|
|
476
428
|
function participantValues(participant) {
|
|
477
429
|
return typeof participant === "string" ? { id: participant } : participant;
|
|
478
430
|
}
|
|
@@ -480,7 +432,7 @@ function chooseMentionJid(participant) {
|
|
|
480
432
|
const values = participantValues(participant);
|
|
481
433
|
const idJid = normalizeKnownUserJid(values.id ?? "");
|
|
482
434
|
const lidJid = normalizeKnownUserJid(values.lid ?? "");
|
|
483
|
-
return (
|
|
435
|
+
return (extractLidDigits(idJid) ? idJid : null) ?? (extractLidDigits(lidJid) ? lidJid : null) ?? idJid ?? lidJid ?? normalizeKnownUserJid(values.phoneNumber ?? "") ?? normalizeKnownUserJid(values.e164 ?? "");
|
|
484
436
|
}
|
|
485
437
|
function buildMentionTargetMaps(participants) {
|
|
486
438
|
const byPhone = /* @__PURE__ */ new Map();
|
|
@@ -488,9 +440,10 @@ function buildMentionTargetMaps(participants) {
|
|
|
488
440
|
for (const participant of participants) {
|
|
489
441
|
const mentionJid = chooseMentionJid(participant);
|
|
490
442
|
if (!mentionJid) continue;
|
|
443
|
+
const lidDigits = extractLidDigits(mentionJid);
|
|
491
444
|
const target = {
|
|
492
445
|
mentionJid,
|
|
493
|
-
...
|
|
446
|
+
...lidDigits ? { replacementText: `@${lidDigits}` } : {}
|
|
494
447
|
};
|
|
495
448
|
const values = participantValues(participant);
|
|
496
449
|
for (const value of [
|
|
@@ -575,9 +528,6 @@ function addWhatsAppOutboundMentionsToContent(content, mentionedJids) {
|
|
|
575
528
|
}
|
|
576
529
|
//#endregion
|
|
577
530
|
//#region extensions/whatsapp/src/inbound/send-api.ts
|
|
578
|
-
function supportsForcedDocumentMediaType(mediaType) {
|
|
579
|
-
return mediaType.startsWith("image/") || mediaType.startsWith("video/");
|
|
580
|
-
}
|
|
581
531
|
function createWebSendApi(params) {
|
|
582
532
|
const resolveOutboundJid = (recipient) => params.authDir ? toWhatsappJidWithLid(recipient, { authDir: params.authDir }) : toWhatsappJid(recipient);
|
|
583
533
|
const resolveMentions = async (jid, text) => params.resolveOutboundMentions ? await params.resolveOutboundMentions({
|
|
@@ -624,16 +574,7 @@ function createWebSendApi(params) {
|
|
|
624
574
|
mentionedJids: []
|
|
625
575
|
} : await resolveMentions(jid, text);
|
|
626
576
|
if (mediaBuffer && mediaType) {
|
|
627
|
-
if (sendOptions?.asDocument
|
|
628
|
-
document: mediaBuffer,
|
|
629
|
-
fileName: resolveWhatsAppDocumentFileName({
|
|
630
|
-
fileName: sendOptions?.fileName,
|
|
631
|
-
mimetype: mediaType
|
|
632
|
-
}),
|
|
633
|
-
caption: resolvedPayloadText.text || void 0,
|
|
634
|
-
mimetype: mediaType
|
|
635
|
-
};
|
|
636
|
-
else if (mediaType.startsWith("image/")) payload = await addWhatsAppImagePreviewFields({
|
|
577
|
+
if (mediaType.startsWith("image/") && sendOptions?.asDocument !== true) payload = await addWhatsAppImagePreviewFields({
|
|
637
578
|
image: mediaBuffer,
|
|
638
579
|
caption: resolvedPayloadText.text || void 0,
|
|
639
580
|
mimetype: mediaType
|
|
@@ -643,7 +584,7 @@ function createWebSendApi(params) {
|
|
|
643
584
|
ptt: true,
|
|
644
585
|
mimetype: mediaType
|
|
645
586
|
};
|
|
646
|
-
else if (mediaType.startsWith("video/")) {
|
|
587
|
+
else if (mediaType.startsWith("video/") && sendOptions?.asDocument !== true) {
|
|
647
588
|
const gifPlayback = sendOptions?.gifPlayback;
|
|
648
589
|
payload = {
|
|
649
590
|
video: mediaBuffer,
|
|
@@ -663,15 +604,10 @@ function createWebSendApi(params) {
|
|
|
663
604
|
} else payload = { text: resolvedPayloadText.text };
|
|
664
605
|
payload = addWhatsAppOutboundMentionsToContent(payload, resolvedPayloadText.mentionedJids);
|
|
665
606
|
const quotedOpts = buildQuotedMessageOptions({
|
|
607
|
+
...sendOptions?.quotedMessageKey,
|
|
666
608
|
messageId: sendOptions?.quotedMessageKey?.id,
|
|
667
|
-
remoteJid: sendOptions?.quotedMessageKey?.remoteJid,
|
|
668
|
-
fromMe: sendOptions?.quotedMessageKey?.fromMe,
|
|
669
|
-
participant: sendOptions?.quotedMessageKey?.participant,
|
|
670
609
|
destinationJid: jid,
|
|
671
|
-
requestedJid: toWhatsappJid(to)
|
|
672
|
-
lookupTargetJid: sendOptions?.quotedMessageKey?.lookupTargetJid,
|
|
673
|
-
messageText: sendOptions?.quotedMessageKey?.messageText,
|
|
674
|
-
media: sendOptions?.quotedMessageKey?.media
|
|
610
|
+
requestedJid: toWhatsappJid(to)
|
|
675
611
|
});
|
|
676
612
|
const kind = mediaBuffer ? "media" : "text";
|
|
677
613
|
const accountId = sendOptions?.accountId ?? params.defaultAccountId;
|
|
@@ -5,10 +5,7 @@ function safeStringify(value, limit = 800) {
|
|
|
5
5
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
6
6
|
const raw = JSON.stringify(value, (_key, v) => {
|
|
7
7
|
if (typeof v === "bigint") return v.toString();
|
|
8
|
-
if (typeof v === "function") {
|
|
9
|
-
const maybeName = v.name;
|
|
10
|
-
return `[Function ${typeof maybeName === "string" && maybeName.length > 0 ? maybeName : "anonymous"}]`;
|
|
11
|
-
}
|
|
8
|
+
if (typeof v === "function") return `[Function ${typeof v.name === "string" && v.name.length > 0 ? v.name : "anonymous"}]`;
|
|
12
9
|
if (typeof v === "object" && v) {
|
|
13
10
|
if (seen.has(v)) return "[Circular]";
|
|
14
11
|
seen.add(v);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.mjs";
|
|
2
2
|
import { BufferJSON, DEFAULT_CONNECTION_CONFIG, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "baileys";
|
|
3
3
|
//#region extensions/whatsapp/src/session.runtime.ts
|
|
4
4
|
var session_runtime_exports = /* @__PURE__ */ __exportAll({
|