@openclaw/whatsapp 2026.9.6 → 2026.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/{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-Bg_fS2iF.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-rurG-kbr.mjs → channel.runtime-C94goLw9.mjs} +4 -4
- package/dist/.setup/{channel.setup-C8P5q8uD.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-By82ehLA.mjs → monitor-CGpV2VNN.mjs} +376 -504
- 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-pGqWOiFX.mjs → setup-finalize-DmPX4EaW.mjs} +32 -70
- package/dist/.setup/setup-plugin-api-vJlxKzca.mjs +3 -0
- package/dist/.setup/{setup-surface-B9CYwDPZ.mjs → setup-surface-43fj197P.mjs} +3 -3
- package/dist/.setup/{shared-DVgQ8kRG.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 +5 -12
- 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 +2 -2
- package/dist/login-qr-runtime.js +1 -1
- package/dist/runtime-api.js +9 -9
- 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 +1 -1
- package/node_modules/baileys/node_modules/file-type/readme.md +2 -0
- package/node_modules/baileys/node_modules/file-type/source/detectors/zip.js +9 -4
- 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-2wUapweU.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
package/assets/icon.png
CHANGED
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as listConfiguredAccountIds, r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.mjs";
|
|
2
|
-
import { n as hasWebCredsRegularFileSync, r as hasWebCredsSync } from "./creds-files-
|
|
2
|
+
import { n as hasWebCredsRegularFileSync, r as hasWebCredsSync } from "./creds-files-CDATZWWM.mjs";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, resolveAccountEntry, resolveMergedAccountConfig, resolveUserPath } from "openclaw/plugin-sdk/account-core";
|
|
@@ -55,12 +55,6 @@ function hasAnyWhatsAppAuth(cfg) {
|
|
|
55
55
|
function resolveDefaultAuthDir(accountId) {
|
|
56
56
|
return path.join(resolveOAuthDir(), "whatsapp", normalizeAccountId(accountId));
|
|
57
57
|
}
|
|
58
|
-
function resolveLegacyAuthDir() {
|
|
59
|
-
return resolveOAuthDir();
|
|
60
|
-
}
|
|
61
|
-
function legacyAuthExists(authDir) {
|
|
62
|
-
return hasWebCredsRegularFileSync(authDir);
|
|
63
|
-
}
|
|
64
58
|
function resolveWhatsAppAuthDir(params) {
|
|
65
59
|
const accountId = params.accountId.trim() || DEFAULT_ACCOUNT_ID;
|
|
66
60
|
const configured = resolveMergedWhatsAppAccountConfig({
|
|
@@ -73,8 +67,8 @@ function resolveWhatsAppAuthDir(params) {
|
|
|
73
67
|
};
|
|
74
68
|
const defaultDir = resolveDefaultAuthDir(accountId);
|
|
75
69
|
if (accountId === DEFAULT_ACCOUNT_ID) {
|
|
76
|
-
const legacyDir =
|
|
77
|
-
if (
|
|
70
|
+
const legacyDir = resolveOAuthDir();
|
|
71
|
+
if (hasWebCredsRegularFileSync(legacyDir) && !hasWebCredsRegularFileSync(defaultDir)) return {
|
|
78
72
|
authDir: legacyDir,
|
|
79
73
|
isLegacy: true
|
|
80
74
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-CtRPAQCL.mjs";
|
|
2
2
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-C2eUvsTc.mjs";
|
|
3
|
-
import { r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-
|
|
3
|
+
import { r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-BGdvf5cC.mjs";
|
|
4
4
|
import { ToolAuthorizationError, createActionGate, jsonResult, readReactionParams, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
//#region extensions/whatsapp/src/action-runtime-target-auth.ts
|
|
6
6
|
function resolveAuthorizedWhatsAppOutboundTarget(params) {
|
package/dist/.setup/{approval-handler.runtime-C0hzmMSj.mjs → approval-handler.runtime-CjqMlPOX.mjs}
RENAMED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import "./accounts-
|
|
1
|
+
import "./accounts-CtRPAQCL.mjs";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.mjs";
|
|
3
3
|
import { s as normalizeWhatsAppMessagingTarget } from "./normalize-target-BGra1ZnM.mjs";
|
|
4
|
-
import { i as sendTypingWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
4
|
+
import { i as sendTypingWhatsApp, t as sendMessageWhatsApp } from "./send-BGdvf5cC.mjs";
|
|
5
5
|
import { i as getWhatsAppRuntime } from "./runtime-BLlToOi6.mjs";
|
|
6
|
-
import "./
|
|
7
|
-
import { i as unregisterWhatsAppApprovalReactionTarget, r as registerWhatsAppApprovalReactionTarget } from "./approval-reactions-BnXw-UZI.mjs";
|
|
6
|
+
import { i as unregisterWhatsAppApprovalReactionTarget, r as registerWhatsAppApprovalReactionTarget } from "./approval-reactions-DiOFvb1s.mjs";
|
|
8
7
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
9
8
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
10
9
|
import { buildApprovalReactionPendingContent } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
@@ -12,9 +11,6 @@ import { buildChannelApprovalExpiredText, buildChannelApprovalResolvedText, crea
|
|
|
12
11
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
13
12
|
//#region extensions/whatsapp/src/approval-handler.runtime.ts
|
|
14
13
|
const log = createSubsystemLogger("whatsapp/approvals");
|
|
15
|
-
function buildPendingPayload(params) {
|
|
16
|
-
return buildApprovalReactionPendingContent(params);
|
|
17
|
-
}
|
|
18
14
|
const whatsappApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
|
|
19
15
|
eventKinds: [
|
|
20
16
|
"exec",
|
|
@@ -26,11 +22,7 @@ const whatsappApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter(
|
|
|
26
22
|
shouldHandle: ({ context }) => Boolean(context)
|
|
27
23
|
},
|
|
28
24
|
presentation: {
|
|
29
|
-
buildPendingPayload:
|
|
30
|
-
request,
|
|
31
|
-
view,
|
|
32
|
-
nowMs
|
|
33
|
-
}),
|
|
25
|
+
buildPendingPayload: buildApprovalReactionPendingContent,
|
|
34
26
|
buildResolvedResult: ({ request, resolved, view }) => ({
|
|
35
27
|
kind: "update",
|
|
36
28
|
payload: { text: buildChannelApprovalResolvedText({
|
|
@@ -109,20 +101,8 @@ const whatsappApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter(
|
|
|
109
101
|
allowedDecisions: pendingPayload.reactionPayload.allowedDecisions,
|
|
110
102
|
ttlMs: Math.max(1, view.expiresAtMs - Date.now())
|
|
111
103
|
}) ? true : null,
|
|
112
|
-
unbindPending:
|
|
113
|
-
|
|
114
|
-
accountId: entry.accountId,
|
|
115
|
-
remoteJid: entry.remoteJid,
|
|
116
|
-
messageId: entry.messageId
|
|
117
|
-
});
|
|
118
|
-
},
|
|
119
|
-
cancelDelivered: async ({ entry }) => {
|
|
120
|
-
await unregisterWhatsAppApprovalReactionTarget({
|
|
121
|
-
accountId: entry.accountId,
|
|
122
|
-
remoteJid: entry.remoteJid,
|
|
123
|
-
messageId: entry.messageId
|
|
124
|
-
});
|
|
125
|
-
}
|
|
104
|
+
unbindPending: ({ entry }) => unregisterWhatsAppApprovalReactionTarget(entry),
|
|
105
|
+
cancelDelivered: ({ entry }) => unregisterWhatsAppApprovalReactionTarget(entry)
|
|
126
106
|
},
|
|
127
107
|
observe: { onDeliveryError: ({ error, request }) => {
|
|
128
108
|
log.error(`whatsapp approvals: failed to send request ${request.id}: ${String(error)}`);
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { n as getOptionalWhatsAppRuntime } from "./runtime-BLlToOi6.mjs";
|
|
4
|
-
import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth } from "./group-session-key-
|
|
4
|
+
import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth } from "./group-session-key-2-mja4OF.mjs";
|
|
5
5
|
import { createLazyRuntimeSurface } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
6
|
import { approvalReactionDecisionSetsMatch, buildApprovalReactionDeliveredBindingMarker, createApprovalReactionTargetStore, listApprovalReactionBindings, readApprovalReactionDecisionList, readApprovalReactionDeliveredBinding, readApprovalReactionPresentationBinding, readApprovalReactionTargetRecord, resolveTypedApprovalReactionTarget, settleApprovalReaction } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
7
7
|
import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
|
|
@@ -102,7 +102,7 @@ async function registerWhatsAppApprovalReactionTarget(params) {
|
|
|
102
102
|
const key = buildReactionTargetKey(params);
|
|
103
103
|
const approvalId = params.approvalId.trim();
|
|
104
104
|
const allowedDecisions = listApprovalReactionBindings({ allowedDecisions: params.allowedDecisions }).map((binding) => binding.decision);
|
|
105
|
-
if (!key || !approvalId || params.approvalKind !== "exec" && params.approvalKind !== "plugin" || allowedDecisions.length === 0) return null;
|
|
105
|
+
if (!key || !approvalId || params.approvalKind !== "exec" && params.approvalKind !== "plugin" && params.approvalKind !== "system-agent" || allowedDecisions.length === 0) return null;
|
|
106
106
|
const target = {
|
|
107
107
|
approvalId,
|
|
108
108
|
approvalKind: params.approvalKind,
|
|
@@ -171,9 +171,11 @@ async function unregisterWhatsAppApprovalReactionTarget(params) {
|
|
|
171
171
|
if (!key) return;
|
|
172
172
|
await whatsappApprovalReactionTargets.delete(key);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
async function resolveWhatsAppApprovalReactionTargetWithPersistence(params) {
|
|
175
|
+
const key = buildReactionTargetKey(params);
|
|
176
|
+
if (!key) return null;
|
|
175
177
|
const resolved = resolveTypedApprovalReactionTarget({
|
|
176
|
-
target:
|
|
178
|
+
target: await whatsappApprovalReactionTargets.lookup(key),
|
|
177
179
|
reactionKey: params.reactionKey
|
|
178
180
|
});
|
|
179
181
|
return resolved ? {
|
|
@@ -182,14 +184,6 @@ function resolveTarget(params) {
|
|
|
182
184
|
decision: resolved.decision
|
|
183
185
|
} : null;
|
|
184
186
|
}
|
|
185
|
-
async function resolveWhatsAppApprovalReactionTargetWithPersistence(params) {
|
|
186
|
-
const key = buildReactionTargetKey(params);
|
|
187
|
-
if (!key) return null;
|
|
188
|
-
return resolveTarget({
|
|
189
|
-
target: await whatsappApprovalReactionTargets.lookup(key),
|
|
190
|
-
reactionKey: params.reactionKey
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
187
|
async function resolveWhatsAppApprovalReactionTargetFromCandidates(params) {
|
|
194
188
|
const candidateRemoteJids = [];
|
|
195
189
|
for (const observedRemoteJid of params.observedRemoteJids) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { a as readWebCredsJsonRaw, c as resolveWebCredsPath, i as isWhatsAppBaileysAuthFileName, l as statWebCredsFileSync, o as readWebCredsJsonRawSync, r as hasWebCredsSync, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-
|
|
3
|
-
import { r as jidToE164 } from "./targets-runtime-
|
|
4
|
-
import { n as resolveUserPath, t as normalizeE164 } from "./text-runtime-CHl0iPYe.mjs";
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.mjs";
|
|
2
|
+
import { a as readWebCredsJsonRaw, c as resolveWebCredsPath, i as isWhatsAppBaileysAuthFileName, l as statWebCredsFileSync, o as readWebCredsJsonRawSync, r as hasWebCredsSync, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-CDATZWWM.mjs";
|
|
3
|
+
import { r as jidToE164 } from "./targets-runtime-DmiqXIXO.mjs";
|
|
5
4
|
import path from "node:path";
|
|
6
5
|
import { resolveOAuthDir as resolveOAuthDir$1 } from "openclaw/plugin-sdk/state-paths";
|
|
7
6
|
import { isPathStrictlyInside } from "openclaw/plugin-sdk/file-access-runtime";
|
|
8
7
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
9
8
|
import { defaultRuntime, getChildLogger, info, success } from "openclaw/plugin-sdk/runtime-env";
|
|
9
|
+
import { normalizeE164, resolveUserPath } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
10
10
|
import fs from "node:fs/promises";
|
|
11
11
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/routing";
|
|
12
12
|
import { enqueueKeyedTask } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
@@ -17,7 +17,7 @@ const CREDS_FILE_MODE = 384;
|
|
|
17
17
|
const CREDS_SAVE_FLUSH_TIMEOUT_MS = 15e3;
|
|
18
18
|
const credsSaveQueues = /* @__PURE__ */ new Map();
|
|
19
19
|
async function stringifyCreds(creds) {
|
|
20
|
-
const { BufferJSON } = await import("./session.runtime-
|
|
20
|
+
const { BufferJSON } = await import("./session.runtime-st1konFI.mjs").then((n) => n.o);
|
|
21
21
|
return JSON.stringify(creds, BufferJSON.replacer);
|
|
22
22
|
}
|
|
23
23
|
async function writeWebCredsRawAtomically(params) {
|
|
@@ -132,11 +132,8 @@ function getReplyContext(msg, authDir) {
|
|
|
132
132
|
}, authDir)
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function getMentionJids(msg) {
|
|
136
|
-
return msg.group?.mentions?.jids ?? [];
|
|
137
|
-
}
|
|
138
135
|
function getMentionIdentities(msg, authDir) {
|
|
139
|
-
return
|
|
136
|
+
return (msg.group?.mentions?.jids ?? []).map((jid) => resolveComparableIdentity({ jid }, authDir));
|
|
140
137
|
}
|
|
141
138
|
function getPrimaryIdentityId(identity) {
|
|
142
139
|
return identity?.e164 || identity?.jid?.trim() || identity?.lid || null;
|
|
@@ -211,11 +208,7 @@ async function restoreCredsFromBackupIfNeeded(authDir, options) {
|
|
|
211
208
|
try {
|
|
212
209
|
const credsPath = resolveWebCredsPath(authDir);
|
|
213
210
|
const backupPath = resolveWebCredsBackupPath(authDir);
|
|
214
|
-
|
|
215
|
-
await assertWebCredsPathRegularFileOrMissing(credsPath);
|
|
216
|
-
} catch {
|
|
217
|
-
return false;
|
|
218
|
-
}
|
|
211
|
+
await assertWebCredsPathRegularFileOrMissing(credsPath);
|
|
219
212
|
const raw = readCredsJsonRaw(credsPath);
|
|
220
213
|
if (raw && isValidJson(raw)) return false;
|
|
221
214
|
const backupRaw = readCredsJsonRaw(backupPath);
|
|
@@ -243,17 +236,7 @@ async function webAuthExists(authDir = resolveDefaultWebAuthDir()) {
|
|
|
243
236
|
const resolvedAuthDir = resolveUserPath(authDir);
|
|
244
237
|
const credsPath = resolveWebCredsPath(resolvedAuthDir);
|
|
245
238
|
const raw = await readWebCredsJsonRaw(credsPath);
|
|
246
|
-
|
|
247
|
-
try {
|
|
248
|
-
JSON.parse(raw);
|
|
249
|
-
return true;
|
|
250
|
-
} catch {
|
|
251
|
-
return false;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
function resolveWebAuthState(params) {
|
|
255
|
-
if (params.barrierResult === "timed_out") return "unstable";
|
|
256
|
-
return params.linked ? "linked" : "not-linked";
|
|
239
|
+
return raw !== null && isValidJson(raw);
|
|
257
240
|
}
|
|
258
241
|
async function readWebAuthStateCore(authDir, context) {
|
|
259
242
|
const resolvedAuthDir = resolveUserPath(authDir);
|
|
@@ -262,10 +245,7 @@ async function readWebAuthStateCore(authDir, context) {
|
|
|
262
245
|
return {
|
|
263
246
|
authDir: resolvedAuthDir,
|
|
264
247
|
linked,
|
|
265
|
-
state:
|
|
266
|
-
linked,
|
|
267
|
-
barrierResult
|
|
268
|
-
})
|
|
248
|
+
state: barrierResult === "timed_out" ? "unstable" : linked ? "linked" : "not-linked"
|
|
269
249
|
};
|
|
270
250
|
}
|
|
271
251
|
function formatWhatsAppWebAuthStatusState(state) {
|
|
@@ -440,10 +420,6 @@ async function readWebSelfIdentityForDecision(authDir = resolveDefaultWebAuthDir
|
|
|
440
420
|
identity: await readWebSelfIdentity(resolvedAuthDir, fallback)
|
|
441
421
|
};
|
|
442
422
|
}
|
|
443
|
-
/**
|
|
444
|
-
* Return the age (in milliseconds) of the cached WhatsApp web auth state, or null when missing.
|
|
445
|
-
* Helpful for heartbeats/observability to spot stale credentials.
|
|
446
|
-
*/
|
|
447
423
|
function getWebAuthAgeMs(authDir = resolveDefaultWebAuthDir()) {
|
|
448
424
|
const stats = statWebCredsFileSync(resolveWebCredsPath(resolveUserPath(authDir)));
|
|
449
425
|
return stats ? Math.max(0, Date.now() - stats.mtimeMs) : null;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-CtRPAQCL.mjs";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.mjs";
|
|
3
|
-
import { c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, n as isWhatsAppNewsletterJid, o as normalizeWhatsAppAllowFromEntry, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-BGra1ZnM.mjs";
|
|
3
|
+
import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, n as isWhatsAppNewsletterJid, o as normalizeWhatsAppAllowFromEntry, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-BGra1ZnM.mjs";
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-C2eUvsTc.mjs";
|
|
5
|
-
import { c as normalizeWhatsAppPayloadTextPreservingIndentation, i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppOutboundPayload, s as normalizeWhatsAppPayloadText, t as sendMessageWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-
|
|
5
|
+
import { c as normalizeWhatsAppPayloadTextPreservingIndentation, i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppOutboundPayload, s as normalizeWhatsAppPayloadText, t as sendMessageWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-BGdvf5cC.mjs";
|
|
6
6
|
import { i as getWhatsAppRuntime } from "./runtime-BLlToOi6.mjs";
|
|
7
|
-
import "./
|
|
8
|
-
import { c as
|
|
9
|
-
import "./
|
|
10
|
-
import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth, s as lookupInboundMessageMetaForTarget, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-D22hYMdE.mjs";
|
|
11
|
-
import { a as formatWhatsAppConfigAllowFromEntries, o as loadWhatsAppChannelRuntime, t as createWhatsAppPluginBase } from "./shared-DVgQ8kRG.mjs";
|
|
7
|
+
import { c as toWhatsappJid } from "./targets-runtime-DmiqXIXO.mjs";
|
|
8
|
+
import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth, s as lookupInboundMessageMetaForTarget, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-2-mja4OF.mjs";
|
|
9
|
+
import { a as loadWhatsAppChannelRuntime, t as createWhatsAppPluginBase } from "./shared-DgOG5Iqr.mjs";
|
|
12
10
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.mjs";
|
|
13
|
-
import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-
|
|
14
|
-
import { createActionGate
|
|
11
|
+
import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-BBonwKks.mjs";
|
|
12
|
+
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
15
13
|
import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-core";
|
|
16
14
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
17
15
|
import { collectIssuesForEnabledAccounts, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState, isRecord as isRecord$1, readAccountStatusSnapshot } from "openclaw/plugin-sdk/status-helpers";
|
|
@@ -83,7 +81,7 @@ const whatsappApproval = createApproverRestrictedNativeApprovalCapabilityFromFor
|
|
|
83
81
|
approvalKind,
|
|
84
82
|
request
|
|
85
83
|
}),
|
|
86
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
84
|
+
load: async () => (await import("./approval-handler.runtime-CjqMlPOX.mjs")).whatsappApprovalNativeRuntime
|
|
87
85
|
})
|
|
88
86
|
});
|
|
89
87
|
function buildWhatsAppPendingPayload(params, approvalKind) {
|
|
@@ -100,13 +98,17 @@ function buildWhatsAppPendingPayload(params, approvalKind) {
|
|
|
100
98
|
const whatsappApprovalCapability = whatsappApproval.capability;
|
|
101
99
|
//#endregion
|
|
102
100
|
//#region extensions/whatsapp/src/channel-actions.ts
|
|
103
|
-
function
|
|
104
|
-
if (!params.cfg.channels?.whatsapp) return
|
|
105
|
-
if (!createActionGate
|
|
106
|
-
|
|
101
|
+
function resolveEnabledWhatsAppAgentReactions(params) {
|
|
102
|
+
if (!params.cfg.channels?.whatsapp) return;
|
|
103
|
+
if (!createActionGate(params.cfg.channels.whatsapp.actions)("reactions")) return;
|
|
104
|
+
const resolved = resolveWhatsAppReactionLevel({
|
|
107
105
|
cfg: params.cfg,
|
|
108
106
|
accountId: params.accountId
|
|
109
|
-
})
|
|
107
|
+
});
|
|
108
|
+
return resolved.agentReactionsEnabled ? resolved : void 0;
|
|
109
|
+
}
|
|
110
|
+
function resolveWhatsAppAgentReactionGuidance(params) {
|
|
111
|
+
return resolveEnabledWhatsAppAgentReactions(params)?.agentReactionGuidance;
|
|
110
112
|
}
|
|
111
113
|
function hasAnyWhatsAppAccountWithAgentReactionsEnabled(cfg) {
|
|
112
114
|
if (!cfg.channels?.whatsapp) return false;
|
|
@@ -115,30 +117,20 @@ function hasAnyWhatsAppAccountWithAgentReactionsEnabled(cfg) {
|
|
|
115
117
|
cfg,
|
|
116
118
|
accountId
|
|
117
119
|
}).enabled) return false;
|
|
118
|
-
return
|
|
120
|
+
return Boolean(resolveEnabledWhatsAppAgentReactions({
|
|
119
121
|
cfg,
|
|
120
122
|
accountId
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
function resolveWhatsAppAgentReactionGuidance(params) {
|
|
125
|
-
if (!params.cfg.channels?.whatsapp) return;
|
|
126
|
-
if (!createActionGate$1(params.cfg.channels.whatsapp.actions)("reactions")) return;
|
|
127
|
-
const resolved = resolveWhatsAppReactionLevel({
|
|
128
|
-
cfg: params.cfg,
|
|
129
|
-
accountId: params.accountId
|
|
123
|
+
}));
|
|
130
124
|
});
|
|
131
|
-
if (!resolved.agentReactionsEnabled) return;
|
|
132
|
-
return resolved.agentReactionGuidance;
|
|
133
125
|
}
|
|
134
126
|
function describeWhatsAppMessageActions(params) {
|
|
135
127
|
if (!params.cfg.channels?.whatsapp) return null;
|
|
136
|
-
const gate = createActionGate
|
|
128
|
+
const gate = createActionGate(params.cfg.channels.whatsapp.actions);
|
|
137
129
|
const actions = /* @__PURE__ */ new Set();
|
|
138
|
-
if (params.accountId != null ?
|
|
130
|
+
if (params.accountId != null ? Boolean(resolveEnabledWhatsAppAgentReactions({
|
|
139
131
|
cfg: params.cfg,
|
|
140
|
-
accountId: params.accountId
|
|
141
|
-
}) : hasAnyWhatsAppAccountWithAgentReactionsEnabled(params.cfg)) actions.add("react");
|
|
132
|
+
accountId: params.accountId
|
|
133
|
+
})) : hasAnyWhatsAppAccountWithAgentReactionsEnabled(params.cfg)) actions.add("react");
|
|
142
134
|
if (gate("polls")) actions.add("poll");
|
|
143
135
|
actions.add("upload-file");
|
|
144
136
|
return { actions: Array.from(actions) };
|
|
@@ -148,12 +140,7 @@ function describeWhatsAppMessageActions(params) {
|
|
|
148
140
|
const WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS = ["sendWhatsApp"];
|
|
149
141
|
//#endregion
|
|
150
142
|
//#region extensions/whatsapp/src/outbound-base.ts
|
|
151
|
-
function
|
|
152
|
-
const explicitAccountId = normalizeOptionalAccountId(accountId);
|
|
153
|
-
if (explicitAccountId) return explicitAccountId;
|
|
154
|
-
return resolveDefaultWhatsAppAccountId(cfg ?? {});
|
|
155
|
-
}
|
|
156
|
-
function createWhatsAppOutboundBase({ sendMessageWhatsApp, sendPollWhatsApp, shouldLogVerbose, resolveTarget, normalizeText = normalizeWhatsAppPayloadText, skipEmptyText = true }) {
|
|
143
|
+
function createWhatsAppOutboundBase({ sendMessageWhatsApp, sendPollWhatsApp, shouldLogVerbose, resolveTarget, normalizeText = normalizeWhatsAppPayloadText }) {
|
|
157
144
|
const resolveQuotedMessageKey = (params) => {
|
|
158
145
|
const replyToId = params.replyToId?.trim();
|
|
159
146
|
if (!replyToId) return;
|
|
@@ -169,8 +156,8 @@ function createWhatsAppOutboundBase({ sendMessageWhatsApp, sendPollWhatsApp, sho
|
|
|
169
156
|
media: cachedMeta?.media
|
|
170
157
|
};
|
|
171
158
|
};
|
|
172
|
-
const dispatchMessage = async (params, text, mediaOptions
|
|
173
|
-
const lookupAccountId =
|
|
159
|
+
const dispatchMessage = async (params, text, mediaOptions) => {
|
|
160
|
+
const lookupAccountId = normalizeOptionalAccountId(params.accountId) ?? resolveDefaultWhatsAppAccountId(params.cfg);
|
|
174
161
|
const quotedMessageKey = resolveQuotedMessageKey({
|
|
175
162
|
accountId: lookupAccountId,
|
|
176
163
|
to: params.to,
|
|
@@ -184,7 +171,6 @@ function createWhatsAppOutboundBase({ sendMessageWhatsApp, sendPollWhatsApp, sho
|
|
|
184
171
|
...mediaOptions,
|
|
185
172
|
accountId: params.accountId ?? void 0,
|
|
186
173
|
gifPlayback: params.gifPlayback,
|
|
187
|
-
...mediaDeliveryOptions,
|
|
188
174
|
replyToIdSource: params.replyToIdSource,
|
|
189
175
|
replyToMode: params.replyToMode,
|
|
190
176
|
formatting: params.formatting,
|
|
@@ -210,7 +196,7 @@ function createWhatsAppOutboundBase({ sendMessageWhatsApp, sendPollWhatsApp, sho
|
|
|
210
196
|
channel: "whatsapp",
|
|
211
197
|
sendText: async (params) => {
|
|
212
198
|
const normalizedText = normalizeText(params.text);
|
|
213
|
-
if (
|
|
199
|
+
if (!normalizedText) return { messageId: "" };
|
|
214
200
|
return await dispatchMessage(params, normalizedText);
|
|
215
201
|
},
|
|
216
202
|
sendMedia: async (params) => await dispatchMessage(params, void 0, {
|
|
@@ -218,8 +204,9 @@ function createWhatsAppOutboundBase({ sendMessageWhatsApp, sendPollWhatsApp, sho
|
|
|
218
204
|
mediaAccess: params.mediaAccess,
|
|
219
205
|
mediaLocalRoots: params.mediaLocalRoots,
|
|
220
206
|
mediaReadFile: params.mediaReadFile,
|
|
221
|
-
...params.audioAsVoice === void 0 ? {} : { audioAsVoice: params.audioAsVoice }
|
|
222
|
-
|
|
207
|
+
...params.audioAsVoice === void 0 ? {} : { audioAsVoice: params.audioAsVoice },
|
|
208
|
+
forceDocument: params.forceDocument
|
|
209
|
+
}),
|
|
223
210
|
sendPoll: async ({ cfg, to, poll, accountId }) => await sendPollWhatsApp(to, poll, {
|
|
224
211
|
verbose: shouldLogVerbose(),
|
|
225
212
|
accountId: accountId ?? void 0,
|
|
@@ -251,15 +238,8 @@ function createWhatsAppOutboundBase({ sendMessageWhatsApp, sendPollWhatsApp, sho
|
|
|
251
238
|
}
|
|
252
239
|
//#endregion
|
|
253
240
|
//#region extensions/whatsapp/src/channel-outbound.ts
|
|
254
|
-
const loadWhatsAppApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-
|
|
255
|
-
const loadWhatsAppQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-
|
|
256
|
-
function normalizeWhatsAppChannelPayloadText(text) {
|
|
257
|
-
return normalizeWhatsAppPayloadTextPreservingIndentation(text);
|
|
258
|
-
}
|
|
259
|
-
function normalizeWhatsAppChannelSendText(text) {
|
|
260
|
-
const normalized = normalizeWhatsAppChannelPayloadText(text);
|
|
261
|
-
return normalized.trim() ? normalized : "";
|
|
262
|
-
}
|
|
241
|
+
const loadWhatsAppApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-DiOFvb1s.mjs").then((n) => n.t));
|
|
242
|
+
const loadWhatsAppQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-CPyyi5AY.mjs").then((n) => n.n));
|
|
263
243
|
async function prepareWhatsAppApprovalPayloadForDelivery(params) {
|
|
264
244
|
const questionPayload = questionGatewayRuntime.prepareReactionPayloadForDelivery({
|
|
265
245
|
payload: params.payload,
|
|
@@ -288,14 +268,14 @@ const whatsappChannelOutbound = {
|
|
|
288
268
|
allowFrom,
|
|
289
269
|
mode
|
|
290
270
|
}),
|
|
291
|
-
normalizeText:
|
|
271
|
+
normalizeText: normalizeWhatsAppPayloadTextPreservingIndentation
|
|
292
272
|
}),
|
|
293
273
|
sendTextOnlyErrorPayloads: true,
|
|
294
274
|
renderPresentation: prepareWhatsAppApprovalPayloadForDelivery,
|
|
295
275
|
afterDeliverPayload: registerDeliveredWhatsAppApprovalPayload,
|
|
296
276
|
normalizePayload: ({ payload }) => ({
|
|
297
277
|
...payload,
|
|
298
|
-
text:
|
|
278
|
+
text: normalizeWhatsAppPayloadTextPreservingIndentation(payload.text)
|
|
299
279
|
})
|
|
300
280
|
};
|
|
301
281
|
function toWhatsAppMessageSendResult(result, replyToId) {
|
|
@@ -441,88 +421,56 @@ function collectWhatsAppStatusIssues(accounts) {
|
|
|
441
421
|
const lastDisconnect = readLastDisconnect(account.lastDisconnect);
|
|
442
422
|
const lastError = normalizeOptionalString(account.lastError) ?? lastDisconnect?.error;
|
|
443
423
|
const healthState = normalizeOptionalString(account.healthState);
|
|
444
|
-
|
|
424
|
+
const addIssue = (kind, message, fix) => {
|
|
445
425
|
issues.push({
|
|
446
426
|
channel: "whatsapp",
|
|
447
427
|
accountId,
|
|
448
|
-
kind
|
|
449
|
-
message
|
|
450
|
-
fix
|
|
428
|
+
kind,
|
|
429
|
+
message,
|
|
430
|
+
fix
|
|
451
431
|
});
|
|
452
|
-
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
});
|
|
462
|
-
return;
|
|
463
|
-
}
|
|
464
|
-
if (!linked) {
|
|
465
|
-
issues.push({
|
|
466
|
-
channel: "whatsapp",
|
|
467
|
-
accountId,
|
|
468
|
-
kind: "auth",
|
|
469
|
-
message: "Not linked (no WhatsApp Web session).",
|
|
470
|
-
fix: `Run: ${formatCliCommand("openclaw channels login")} (scan QR on the gateway host).`
|
|
471
|
-
});
|
|
472
|
-
return;
|
|
473
|
-
}
|
|
432
|
+
};
|
|
433
|
+
const relink = `Run: ${formatCliCommand("openclaw channels login")} (scan QR on the gateway host).`;
|
|
434
|
+
const repair = `Run: ${formatCliCommand("openclaw doctor")} (or restart the gateway). If it persists, relink via channels login and check logs.`;
|
|
435
|
+
const linkedRuntimePrefix = linked ? "Linked but " : "";
|
|
436
|
+
if (statusState === "unstable") addIssue("auth", "Auth state is still stabilizing.", "Wait a moment for queued credential writes to finish, then retry the command or rerun health.");
|
|
437
|
+
else if (healthState === "logged-out") addIssue("auth", `Session logged out${lastError ? `: ${lastError}` : "."}`, relink);
|
|
438
|
+
else if (!linked) addIssue("auth", "Not linked (no WhatsApp Web session).", relink);
|
|
439
|
+
if (healthState === "logged-out") return;
|
|
440
|
+
if (!linked && healthState === "stopped" && !lastError && lastDisconnect?.at == null && (reconnectAttempts ?? 0) === 0) return;
|
|
474
441
|
if (healthState === "stale") {
|
|
475
|
-
|
|
476
|
-
issues.push({
|
|
477
|
-
channel: "whatsapp",
|
|
478
|
-
accountId,
|
|
479
|
-
kind: "runtime",
|
|
480
|
-
message: `Linked but stale${staleSuffix}${lastError ? `: ${lastError}` : "."}`,
|
|
481
|
-
fix: `Run: ${formatCliCommand("openclaw doctor")} (or restart the gateway). If it persists, relink via channels login and check logs.`
|
|
482
|
-
});
|
|
442
|
+
addIssue("runtime", `${linkedRuntimePrefix}stale${lastInboundAt != null ? ` (last inbound ${Math.max(0, Math.floor((Date.now() - lastInboundAt) / 6e4))}m ago)` : ""}${lastError ? `: ${lastError}` : "."}`, repair);
|
|
483
443
|
return;
|
|
484
444
|
}
|
|
485
445
|
if (healthState === "reconnecting" || healthState === "conflict" || healthState === "stopped") {
|
|
486
|
-
|
|
487
|
-
issues.push({
|
|
488
|
-
channel: "whatsapp",
|
|
489
|
-
accountId,
|
|
490
|
-
kind: "runtime",
|
|
491
|
-
message: `Linked but ${stateLabel}${reconnectAttempts != null ? ` (reconnectAttempts=${reconnectAttempts})` : ""}${lastError ? `: ${lastError}` : "."}`,
|
|
492
|
-
fix: `Run: ${formatCliCommand("openclaw doctor")} (or restart the gateway). If it persists, relink via channels login and check logs.`
|
|
493
|
-
});
|
|
446
|
+
addIssue("runtime", `${linkedRuntimePrefix}${healthState === "conflict" ? "session conflict" : healthState === "reconnecting" ? "reconnecting" : "stopped"}${reconnectAttempts != null ? ` (reconnectAttempts=${reconnectAttempts})` : ""}${lastError ? `: ${lastError}` : "."}`, repair);
|
|
494
447
|
return;
|
|
495
448
|
}
|
|
496
449
|
if (linked && running && connected && reconnectAttempts != null && reconnectAttempts > 0 && isRecentDisconnect(lastDisconnect)) {
|
|
497
|
-
|
|
498
|
-
channel: "whatsapp",
|
|
499
|
-
accountId,
|
|
500
|
-
kind: "runtime",
|
|
501
|
-
message: `Linked but recently reconnected (reconnectAttempts=${reconnectAttempts})${lastError ? `: ${lastError}` : "."}`,
|
|
502
|
-
fix: `Watch: ${formatCliCommand("openclaw logs --follow")} and run ${formatCliCommand("openclaw channels status --probe")} if disconnects continue. If it keeps flapping, restart the gateway or relink via channels login.`
|
|
503
|
-
});
|
|
450
|
+
addIssue("runtime", `Linked but recently reconnected (reconnectAttempts=${reconnectAttempts})${lastError ? `: ${lastError}` : "."}`, `Watch: ${formatCliCommand("openclaw logs --follow")} and run ${formatCliCommand("openclaw channels status --probe")} if disconnects continue. If it keeps flapping, restart the gateway or relink via channels login.`);
|
|
504
451
|
return;
|
|
505
452
|
}
|
|
506
|
-
if (running && !connected)
|
|
507
|
-
channel: "whatsapp",
|
|
508
|
-
accountId,
|
|
509
|
-
kind: "runtime",
|
|
510
|
-
message: `Linked but disconnected${reconnectAttempts != null ? ` (reconnectAttempts=${reconnectAttempts})` : ""}${lastError ? `: ${lastError}` : "."}`,
|
|
511
|
-
fix: `Run: ${formatCliCommand("openclaw doctor")} (or restart the gateway). If it persists, relink via channels login and check logs.`
|
|
512
|
-
});
|
|
453
|
+
if (running && !connected) addIssue("runtime", `${linkedRuntimePrefix}disconnected${reconnectAttempts != null ? ` (reconnectAttempts=${reconnectAttempts})` : ""}${lastError ? `: ${lastError}` : "."}`, repair);
|
|
513
454
|
}
|
|
514
455
|
});
|
|
515
456
|
}
|
|
516
457
|
//#endregion
|
|
517
458
|
//#region extensions/whatsapp/src/channel.ts
|
|
518
|
-
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-
|
|
519
|
-
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-
|
|
520
|
-
function
|
|
521
|
-
const normalized = normalizeWhatsAppTarget(raw);
|
|
522
|
-
if (!normalized) return null;
|
|
459
|
+
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-DUiJ5d8I.mjs").then((n) => n.t));
|
|
460
|
+
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-2r_hjLZV.mjs"));
|
|
461
|
+
function projectWhatsAppRuntimeStatus(runtime) {
|
|
523
462
|
return {
|
|
524
|
-
|
|
525
|
-
|
|
463
|
+
connected: runtime?.connected ?? false,
|
|
464
|
+
reconnectAttempts: runtime?.reconnectAttempts,
|
|
465
|
+
lastConnectedAt: runtime?.lastConnectedAt ?? null,
|
|
466
|
+
lastDisconnect: runtime?.lastDisconnect ?? null,
|
|
467
|
+
lastInboundAt: runtime?.lastInboundAt ?? runtime?.lastMessageAt ?? null,
|
|
468
|
+
lastMessageAt: runtime?.lastMessageAt ?? null,
|
|
469
|
+
lastEventAt: runtime?.lastEventAt ?? null,
|
|
470
|
+
busy: runtime?.busy ?? false,
|
|
471
|
+
lastRunActivityAt: runtime?.lastRunActivityAt ?? null,
|
|
472
|
+
healthState: runtime?.healthState ?? void 0,
|
|
473
|
+
...runtime?.terminalDisconnect ? { terminalDisconnect: runtime.terminalDisconnect } : {}
|
|
526
474
|
};
|
|
527
475
|
}
|
|
528
476
|
function resolveWhatsAppMessageActionTarget(params) {
|
|
@@ -547,7 +495,7 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
547
495
|
allowlist: buildDmGroupAccountAllowlistAdapter({
|
|
548
496
|
channelId: "whatsapp",
|
|
549
497
|
resolveAccount: resolveWhatsAppAccount,
|
|
550
|
-
normalize: ({ values }) =>
|
|
498
|
+
normalize: ({ values }) => normalizeWhatsAppAllowFromEntries(values),
|
|
551
499
|
resolveDmAllowFrom: (account) => account.allowFrom,
|
|
552
500
|
resolveGroupAllowFrom: (account) => account.groupAllowFrom,
|
|
553
501
|
resolveDmPolicy: (account) => account.dmPolicy,
|
|
@@ -581,8 +529,11 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
581
529
|
messaging: {
|
|
582
530
|
targetPrefixes: ["whatsapp"],
|
|
583
531
|
normalizeTarget: normalizeWhatsAppMessagingTarget,
|
|
584
|
-
resolveOutboundSessionRoute:
|
|
585
|
-
inferTargetChatType: ({ to }) =>
|
|
532
|
+
resolveOutboundSessionRoute: resolveWhatsAppOutboundSessionRoute,
|
|
533
|
+
inferTargetChatType: ({ to }) => {
|
|
534
|
+
const normalized = normalizeWhatsAppTarget(to);
|
|
535
|
+
return !normalized ? void 0 : isWhatsAppGroupJid(normalized) ? "group" : isWhatsAppNewsletterJid(normalized) ? "channel" : "direct";
|
|
536
|
+
},
|
|
586
537
|
targetResolver: {
|
|
587
538
|
looksLikeId: looksLikeWhatsAppTargetId,
|
|
588
539
|
hint: "<E.164|group JID|newsletter JID>"
|
|
@@ -682,34 +633,21 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
682
633
|
}
|
|
683
634
|
};
|
|
684
635
|
const linked = snapshot.healthState === "logged-out" ? false : typeof snapshot.linked === "boolean" ? snapshot.linked : auth.state === "unstable" ? void 0 : auth.state === "linked";
|
|
685
|
-
const
|
|
686
|
-
const statusState = summaryAuthState === void 0 ? void 0 : summaryAuthState;
|
|
687
|
-
const authAgeMs = typeof linked === "boolean" && linked ? auth.authAgeMs : null;
|
|
688
|
-
const self = typeof linked === "boolean" && linked ? auth.selfId : {
|
|
689
|
-
e164: null,
|
|
690
|
-
jid: null,
|
|
691
|
-
lid: null
|
|
692
|
-
};
|
|
636
|
+
const statusState = auth.state === "unstable" ? auth.state : linked === true ? "linked" : linked === false ? "not-linked" : void 0;
|
|
693
637
|
return {
|
|
694
638
|
configured: Boolean(account.authDir),
|
|
695
639
|
...statusState ? { statusState } : {},
|
|
696
640
|
...typeof linked === "boolean" ? { linked } : {},
|
|
697
|
-
authAgeMs,
|
|
698
|
-
self
|
|
641
|
+
authAgeMs: linked ? auth.authAgeMs : null,
|
|
642
|
+
self: linked ? auth.selfId : {
|
|
643
|
+
e164: null,
|
|
644
|
+
jid: null,
|
|
645
|
+
lid: null
|
|
646
|
+
},
|
|
699
647
|
running: snapshot.running ?? false,
|
|
700
|
-
|
|
701
|
-
lastConnectedAt: snapshot.lastConnectedAt ?? null,
|
|
702
|
-
lastDisconnect: snapshot.lastDisconnect ?? null,
|
|
703
|
-
reconnectAttempts: snapshot.reconnectAttempts,
|
|
704
|
-
lastInboundAt: snapshot.lastInboundAt ?? snapshot.lastMessageAt ?? null,
|
|
705
|
-
lastMessageAt: snapshot.lastMessageAt ?? null,
|
|
706
|
-
lastEventAt: snapshot.lastEventAt ?? null,
|
|
707
|
-
busy: snapshot.busy ?? false,
|
|
708
|
-
lastRunActivityAt: snapshot.lastRunActivityAt ?? null,
|
|
648
|
+
...projectWhatsAppRuntimeStatus(snapshot),
|
|
709
649
|
lastError: snapshot.lastError ?? null,
|
|
710
|
-
|
|
711
|
-
lifecycle: snapshot.lifecycle ?? void 0,
|
|
712
|
-
...snapshot.terminalDisconnect ? { terminalDisconnect: snapshot.terminalDisconnect } : {}
|
|
650
|
+
lifecycle: snapshot.lifecycle ?? void 0
|
|
713
651
|
};
|
|
714
652
|
},
|
|
715
653
|
resolveAccountSnapshot: ({ account, runtime }) => {
|
|
@@ -724,17 +662,7 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
724
662
|
statusState: "not-linked",
|
|
725
663
|
linked: false
|
|
726
664
|
} : {},
|
|
727
|
-
|
|
728
|
-
reconnectAttempts: runtime?.reconnectAttempts,
|
|
729
|
-
lastConnectedAt: runtime?.lastConnectedAt ?? null,
|
|
730
|
-
lastDisconnect: runtime?.lastDisconnect ?? null,
|
|
731
|
-
lastInboundAt: runtime?.lastInboundAt ?? runtime?.lastMessageAt ?? null,
|
|
732
|
-
lastMessageAt: runtime?.lastMessageAt ?? null,
|
|
733
|
-
lastEventAt: runtime?.lastEventAt ?? null,
|
|
734
|
-
busy: runtime?.busy ?? false,
|
|
735
|
-
lastRunActivityAt: runtime?.lastRunActivityAt ?? null,
|
|
736
|
-
healthState: runtime?.healthState ?? void 0,
|
|
737
|
-
...runtime?.terminalDisconnect ? { terminalDisconnect: runtime.terminalDisconnect } : {},
|
|
665
|
+
...projectWhatsAppRuntimeStatus(runtime),
|
|
738
666
|
dmPolicy: account.dmPolicy,
|
|
739
667
|
allowFrom: account.allowFrom
|
|
740
668
|
}
|