@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/whatsapp",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.7",
|
|
4
4
|
"description": "OpenClaw WhatsApp channel plugin for WhatsApp Web chats.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"audio-decode": "
|
|
11
|
+
"audio-decode": "3.12.0",
|
|
12
12
|
"baileys": "7.0.0-rc14",
|
|
13
|
-
"typebox": "1.3.
|
|
13
|
+
"typebox": "1.3.34"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"openclaw": ">=2026.9.
|
|
16
|
+
"openclaw": ">=2026.9.7"
|
|
17
17
|
},
|
|
18
18
|
"peerDependenciesMeta": {
|
|
19
19
|
"openclaw": {
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"minHostVersion": ">=2026.4.25"
|
|
66
66
|
},
|
|
67
67
|
"compat": {
|
|
68
|
-
"pluginApi": ">=2026.9.
|
|
68
|
+
"pluginApi": ">=2026.9.7"
|
|
69
69
|
},
|
|
70
70
|
"build": {
|
|
71
71
|
"bundledDist": false,
|
|
72
|
-
"openclawVersion": "2026.9.
|
|
72
|
+
"openclawVersion": "2026.9.7"
|
|
73
73
|
},
|
|
74
74
|
"release": {
|
|
75
75
|
"publishToClawHub": true,
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { asObjectRecord, collectChannelAccountScopes } from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
2
|
-
//#region extensions/whatsapp/src/doctor.ts
|
|
3
|
-
function resolveLegacyAckScope(ack) {
|
|
4
|
-
const direct = ack.direct !== false;
|
|
5
|
-
const group = ack.group ?? "mentions";
|
|
6
|
-
if (direct) return group === "always" ? "all" : group === "never" ? "direct" : void 0;
|
|
7
|
-
return group === "always" ? "group-all" : group === "mentions" ? "group-mentions" : group === "never" ? "off" : void 0;
|
|
8
|
-
}
|
|
9
|
-
function resolveDefaultAgentEmoji(cfg) {
|
|
10
|
-
const entries = asObjectRecord(asObjectRecord(cfg.agents)?.entries);
|
|
11
|
-
const agents = entries ? Object.values(entries).flatMap((value) => {
|
|
12
|
-
const entry = asObjectRecord(value);
|
|
13
|
-
return entry ? [entry] : [];
|
|
14
|
-
}) : [];
|
|
15
|
-
const agent = agents.find((entry) => entry.default === true) ?? agents[0];
|
|
16
|
-
const emoji = asObjectRecord(agent?.identity)?.emoji;
|
|
17
|
-
return typeof emoji === "string" ? emoji : void 0;
|
|
18
|
-
}
|
|
19
|
-
function normalizeCompatibilityConfig({ cfg }) {
|
|
20
|
-
const changes = [];
|
|
21
|
-
const sources = [];
|
|
22
|
-
for (const scope of collectChannelAccountScopes({
|
|
23
|
-
cfg,
|
|
24
|
-
channelId: "whatsapp"
|
|
25
|
-
})) {
|
|
26
|
-
const ack = asObjectRecord(scope.account.ackReaction);
|
|
27
|
-
if (!ack) continue;
|
|
28
|
-
sources.push({
|
|
29
|
-
path: `${scope.prefix}.ackReaction`,
|
|
30
|
-
account: scope.account,
|
|
31
|
-
...typeof ack.emoji === "string" ? { emoji: ack.emoji } : {},
|
|
32
|
-
scope: resolveLegacyAckScope(ack),
|
|
33
|
-
unrepresentableScope: ack.direct !== false && (ack.group ?? "mentions") === "mentions"
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
if (sources.length === 0) return {
|
|
37
|
-
config: cfg,
|
|
38
|
-
changes
|
|
39
|
-
};
|
|
40
|
-
const messages = cfg.messages ??= {};
|
|
41
|
-
const identityEmoji = resolveDefaultAgentEmoji(cfg) ?? "👀";
|
|
42
|
-
for (const source of sources) {
|
|
43
|
-
messages.ackReaction ??= source.emoji ?? identityEmoji;
|
|
44
|
-
messages.ackReactionScope ??= source.scope;
|
|
45
|
-
delete source.account.ackReaction;
|
|
46
|
-
changes.push(`Moved translatable ${source.path} settings to messages ack settings.`);
|
|
47
|
-
}
|
|
48
|
-
const finalEmoji = messages.ackReaction.trim();
|
|
49
|
-
const finalScope = messages.ackReactionScope ?? "group-mentions";
|
|
50
|
-
const comparableFinalScope = finalScope === "none" ? "off" : finalScope;
|
|
51
|
-
for (const source of sources) {
|
|
52
|
-
const sourceEmoji = source.emoji?.trim();
|
|
53
|
-
if (source.emoji === void 0) changes.push(`${source.path} used a route-dependent agent identity acknowledgement emoji before migration; the final messages.ackReaction is ${JSON.stringify(finalEmoji)}. Review messages.ackReaction.`);
|
|
54
|
-
else if (sourceEmoji !== finalEmoji) changes.push(`${source.path} requested acknowledgement emoji ${JSON.stringify(sourceEmoji)}, but the final messages.ackReaction is ${JSON.stringify(finalEmoji)}. Review messages.ackReaction.`);
|
|
55
|
-
if (source.unrepresentableScope) changes.push(`${source.path} migration cannot preserve both direct-message and mentioned-group acknowledgements; the final messages.ackReactionScope is ${JSON.stringify(finalScope)}. Review messages.ackReactionScope.`);
|
|
56
|
-
else if (source.scope && source.scope !== comparableFinalScope) changes.push(`${source.path} requested acknowledgement scope ${JSON.stringify(source.scope)}, but the final messages.ackReactionScope is ${JSON.stringify(finalScope)}. Review messages.ackReactionScope.`);
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
config: cfg,
|
|
60
|
-
changes
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
const whatsappDoctor = { normalizeCompatibilityConfig };
|
|
64
|
-
//#endregion
|
|
65
|
-
export { whatsappDoctor as n, normalizeCompatibilityConfig as t };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-core";
|
|
2
|
-
//#region extensions/whatsapp/src/group-config-path.ts
|
|
3
|
-
const WHATSAPP_GROUP_SCOPE_FIELDS = [
|
|
4
|
-
"groupPolicy",
|
|
5
|
-
"groupAllowFrom",
|
|
6
|
-
"groups"
|
|
7
|
-
];
|
|
8
|
-
function resolveWhatsAppAccountKey(accounts, accountId) {
|
|
9
|
-
if (!accounts) return;
|
|
10
|
-
if (Object.hasOwn(accounts, accountId)) return accountId;
|
|
11
|
-
const normalizedAccountId = accountId.trim().toLowerCase();
|
|
12
|
-
return Object.keys(accounts).find((key) => key.trim().toLowerCase() === normalizedAccountId);
|
|
13
|
-
}
|
|
14
|
-
function normalizePathAccountId(accountId) {
|
|
15
|
-
return typeof accountId === "string" ? accountId.trim() || DEFAULT_ACCOUNT_ID : DEFAULT_ACCOUNT_ID;
|
|
16
|
-
}
|
|
17
|
-
function hasConfiguredField(config, field) {
|
|
18
|
-
return Boolean(config && typeof config === "object" && Object.hasOwn(config, field) && config[field] !== void 0);
|
|
19
|
-
}
|
|
20
|
-
function resolveSpecificFieldBasePath(params) {
|
|
21
|
-
const accountId = normalizePathAccountId(params.accountId);
|
|
22
|
-
const whatsapp = params.cfg.channels?.whatsapp;
|
|
23
|
-
const accounts = whatsapp?.accounts;
|
|
24
|
-
const accountKey = resolveWhatsAppAccountKey(accounts, accountId);
|
|
25
|
-
const defaultAccountKey = resolveWhatsAppAccountKey(accounts, DEFAULT_ACCOUNT_ID);
|
|
26
|
-
const accountConfig = accountKey ? accounts?.[accountKey] : void 0;
|
|
27
|
-
const defaultAccountConfig = defaultAccountKey ? accounts?.[defaultAccountKey] : void 0;
|
|
28
|
-
if (hasConfiguredField(accountConfig, params.field)) return `channels.whatsapp.accounts.${accountKey}`;
|
|
29
|
-
if (accountId !== DEFAULT_ACCOUNT_ID && hasConfiguredField(defaultAccountConfig, params.field)) return `channels.whatsapp.accounts.${defaultAccountKey}`;
|
|
30
|
-
if (hasConfiguredField(whatsapp, params.field)) return "channels.whatsapp";
|
|
31
|
-
}
|
|
32
|
-
function resolveWhatsAppGroupScopeBasePath(params) {
|
|
33
|
-
const accountId = normalizePathAccountId(params.accountId);
|
|
34
|
-
const accounts = (params.cfg.channels?.whatsapp)?.accounts;
|
|
35
|
-
const accountKey = resolveWhatsAppAccountKey(accounts, accountId);
|
|
36
|
-
const defaultAccountKey = resolveWhatsAppAccountKey(accounts, DEFAULT_ACCOUNT_ID);
|
|
37
|
-
const accountConfig = accountKey ? accounts?.[accountKey] : void 0;
|
|
38
|
-
const defaultAccountConfig = defaultAccountKey ? accounts?.[defaultAccountKey] : void 0;
|
|
39
|
-
const matchesAnyGroupScopeField = (config) => WHATSAPP_GROUP_SCOPE_FIELDS.some((field) => hasConfiguredField(config, field));
|
|
40
|
-
if (matchesAnyGroupScopeField(accountConfig)) return `channels.whatsapp.accounts.${accountKey}`;
|
|
41
|
-
if (accountId !== DEFAULT_ACCOUNT_ID && matchesAnyGroupScopeField(defaultAccountConfig)) return `channels.whatsapp.accounts.${defaultAccountKey}`;
|
|
42
|
-
return "channels.whatsapp";
|
|
43
|
-
}
|
|
44
|
-
function resolveWhatsAppConfigPath(params) {
|
|
45
|
-
return `${resolveWhatsAppGroupScopeBasePath(params)}.${params.field}`;
|
|
46
|
-
}
|
|
47
|
-
function resolveWhatsAppGroupsConfigPath(params) {
|
|
48
|
-
return `${resolveSpecificFieldBasePath({
|
|
49
|
-
...params,
|
|
50
|
-
field: "groups"
|
|
51
|
-
}) ?? resolveWhatsAppGroupScopeBasePath(params)}.groups`;
|
|
52
|
-
}
|
|
53
|
-
//#endregion
|
|
54
|
-
export { resolveWhatsAppGroupsConfigPath as n, resolveWhatsAppConfigPath as t };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __exportAll = (all, no_symbols) => {
|
|
4
|
-
let target = {};
|
|
5
|
-
for (var name in all) __defProp(target, name, {
|
|
6
|
-
get: all[name],
|
|
7
|
-
enumerable: true
|
|
8
|
-
});
|
|
9
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
-
return target;
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { __exportAll as t };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
2
|
-
//#region extensions/whatsapp/src/runtime-group-policy.ts
|
|
3
|
-
function resolveWhatsAppRuntimeGroupPolicy(params) {
|
|
4
|
-
return resolveOpenProviderRuntimeGroupPolicy({
|
|
5
|
-
providerConfigPresent: params.providerConfigPresent,
|
|
6
|
-
groupPolicy: params.groupPolicy,
|
|
7
|
-
defaultGroupPolicy: params.defaultGroupPolicy
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
export { resolveWhatsAppRuntimeGroupPolicy as t };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import "./targets-runtime-RBjx3pg_.mjs";
|
|
2
|
-
import { sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithProfile, stripToolCallXmlTags } from "openclaw/plugin-sdk/text-chunking";
|
|
3
|
-
import { normalizeE164, resolveUserPath as resolveUserPath$1 } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
4
|
-
export { stripToolCallXmlTags as a, sanitizeAssistantVisibleTextWithProfile as i, resolveUserPath$1 as n, sanitizeAssistantVisibleText as r, normalizeE164 as t };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"node": true,
|
|
5
|
-
"commonjs": true,
|
|
6
|
-
"es6": true
|
|
7
|
-
},
|
|
8
|
-
"extends": "eslint:recommended",
|
|
9
|
-
"rules": {
|
|
10
|
-
"strict": 2,
|
|
11
|
-
"indent": 0,
|
|
12
|
-
"linebreak-style": 0,
|
|
13
|
-
"quotes": 0,
|
|
14
|
-
"semi": 0,
|
|
15
|
-
"no-cond-assign": 1,
|
|
16
|
-
"no-constant-condition": 1,
|
|
17
|
-
"no-duplicate-case": 1,
|
|
18
|
-
"no-empty": 1,
|
|
19
|
-
"no-ex-assign": 1,
|
|
20
|
-
"no-extra-boolean-cast": 1,
|
|
21
|
-
"no-extra-semi": 1,
|
|
22
|
-
"no-fallthrough": 1,
|
|
23
|
-
"no-func-assign": 1,
|
|
24
|
-
"no-global-assign": 1,
|
|
25
|
-
"no-implicit-globals": 2,
|
|
26
|
-
"no-inner-declarations": ["error", "functions"],
|
|
27
|
-
"no-irregular-whitespace": 2,
|
|
28
|
-
"no-loop-func": 1,
|
|
29
|
-
"no-multi-str": 1,
|
|
30
|
-
"no-mixed-spaces-and-tabs": 1,
|
|
31
|
-
"no-proto": 1,
|
|
32
|
-
"no-sequences": 1,
|
|
33
|
-
"no-throw-literal": 1,
|
|
34
|
-
"no-unmodified-loop-condition": 1,
|
|
35
|
-
"no-useless-call": 1,
|
|
36
|
-
"no-void": 1,
|
|
37
|
-
"no-with": 2,
|
|
38
|
-
"wrap-iife": 1,
|
|
39
|
-
"no-redeclare": 1,
|
|
40
|
-
"no-unused-vars": ["error", { "vars": "all", "args": "none" }],
|
|
41
|
-
"no-sparse-arrays": 1
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
|
3
|
-
|
|
4
|
-
name: test
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
branches: [ "master" ]
|
|
9
|
-
pull_request:
|
|
10
|
-
branches: [ "master" ]
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
build:
|
|
14
|
-
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
|
|
17
|
-
strategy:
|
|
18
|
-
matrix:
|
|
19
|
-
node-version: [14.x, 16.x, 18.x]
|
|
20
|
-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
21
|
-
|
|
22
|
-
steps:
|
|
23
|
-
- uses: actions/checkout@v3
|
|
24
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
25
|
-
uses: actions/setup-node@v3
|
|
26
|
-
with:
|
|
27
|
-
node-version: ${{ matrix.node-version }}
|
|
28
|
-
cache: 'npm'
|
|
29
|
-
- run: npm ci
|
|
30
|
-
- run: npm run build --if-present
|
|
31
|
-
- run: npm test
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
# `@wasm-audio-decoders/opus-ml`
|
|
2
|
-
|
|
3
|
-
`@wasm-audio-decoders/opus-ml` is a Web Assembly Opus audio decoder compiled with machine learning enhancements.
|
|
4
|
-
* 3.9 MiB minified bundle size
|
|
5
|
-
* Uses the latest [Opus 1.5 machine learning enhancements](https://opus-codec.org/demo/opus-1.5/) for high quality speech decoding
|
|
6
|
-
* Browser and NodeJS support (WASM SIMD support required)
|
|
7
|
-
* Built in Web Worker support
|
|
8
|
-
* Multichannel decoding (up to 255 channels)
|
|
9
|
-
* Based on [`libopus`](https://github.com/xiph/opus)
|
|
10
|
-
* **Notes**
|
|
11
|
-
* Web Assembly SIMD instruction support is required for this library. Please use [`opus-decoder`](https://github.com/eshaz/wasm-audio-decoders/tree/main/src/opus-decoder) or [`ogg-opus-decoder`](https://github.com/eshaz/wasm-audio-decoders/tree/main/src/ogg-opus-decoder) if your platform does not support SIMD.
|
|
12
|
-
* For a smaller library, see [`opus-decoder`](https://github.com/eshaz/wasm-audio-decoders/tree/main/src/opus-decoder) which is compiled without the machine learning enhancements.
|
|
13
|
-
|
|
14
|
-
This library is intended for users that already have Opus frames extracted from a container, i.e. (Ogg, Matroska (WEBM), or ISOBMFF (mp4)). See [`ogg-opus-decoder`](https://github.com/eshaz/wasm-audio-decoders/tree/main/src/ogg-opus-decoder) if you have an Ogg Opus file to decode.
|
|
15
|
-
|
|
16
|
-
See the [homepage](https://github.com/eshaz/wasm-audio-decoders) of this repository for more Web Assembly audio decoders like this one.
|
|
17
|
-
|
|
18
|
-
### [Checkout the demo here](https://eshaz.github.io/wasm-audio-decoders/)
|
|
19
|
-
|
|
20
|
-
## Installing
|
|
21
|
-
* Install from [NPM](https://www.npmjs.com/package/opus-ml).
|
|
22
|
-
|
|
23
|
-
Run `npm i opus-ml`
|
|
24
|
-
|
|
25
|
-
```javascript
|
|
26
|
-
import { OpusMLDecoder } from '@wasm-audio-decoders/opus-ml';
|
|
27
|
-
|
|
28
|
-
const decoder = new OpusMLDecoder();
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
* Or download the [build](https://github.com/eshaz/wasm-audio-decoders/tree/main/src/opus-ml/dist) and include it as a script.
|
|
32
|
-
```html
|
|
33
|
-
<script src="opus-ml-decoder.min.js" charset="UTF-8"></script>
|
|
34
|
-
<script>
|
|
35
|
-
const decoder = new window["opus-ml"].OpusMLDecoder();
|
|
36
|
-
</script>
|
|
37
|
-
```
|
|
38
|
-
* Note that the script must be read using UTF-8 character encoding. If running in a browser, the `<script>` tag must include the `charset="UTF-8"` attribute; or, the loading HTML must include `<meta charset="utf-8" />`.
|
|
39
|
-
|
|
40
|
-
## Usage
|
|
41
|
-
|
|
42
|
-
1. Create a new instance and wait for the WASM to finish compiling. Decoding can be done on the main thread synchronously, or in a webworker asynchronously.
|
|
43
|
-
|
|
44
|
-
**Main thread synchronous decoding**
|
|
45
|
-
```javascript
|
|
46
|
-
import { OpusMLDecoder } from '@wasm-audio-decoders/opus-ml';
|
|
47
|
-
|
|
48
|
-
const decoder = new OpusMLDecoder();
|
|
49
|
-
|
|
50
|
-
// wait for the WASM to be compiled
|
|
51
|
-
await decoder.ready;
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
**Web Worker asynchronous decoding**
|
|
55
|
-
```javascript
|
|
56
|
-
import { OpusMLDecoderWebWorker } from '@wasm-audio-decoders/opus-ml';
|
|
57
|
-
|
|
58
|
-
const decoder = new OpusMLDecoderWebWorker();
|
|
59
|
-
|
|
60
|
-
// wait for the WASM to be compiled
|
|
61
|
-
await decoder.ready;
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
1. Begin decoding Opus frames.
|
|
65
|
-
|
|
66
|
-
```javascript
|
|
67
|
-
// Decode an individual Opus frame
|
|
68
|
-
const {channelData, samplesDecoded, sampleRate} = decoder.decodeFrame(opusFrame);
|
|
69
|
-
|
|
70
|
-
// Decode an array of individual Opus frames
|
|
71
|
-
const {channelData, samplesDecoded, sampleRate} = decoder.decodeFrames(opusFrameArray);
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
1. When done decoding, reset the decoder to decode a new stream, or free up the memory being used by the WASM module if you have no more audio to decode.
|
|
75
|
-
|
|
76
|
-
```javascript
|
|
77
|
-
// `reset()` clears the decoder state and allows you do decode a new stream of Opus frames.
|
|
78
|
-
await decoder.reset();
|
|
79
|
-
|
|
80
|
-
// `free()` de-allocates the memory used by the decoder. You will need to create a new instance after calling `free()` to start decoding again.
|
|
81
|
-
decoder.free();
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## API
|
|
85
|
-
Decoded audio is always returned in the below structure.
|
|
86
|
-
|
|
87
|
-
```javascript
|
|
88
|
-
{
|
|
89
|
-
channelData: [
|
|
90
|
-
leftAudio, // Float32Array of PCM samples for the left channel
|
|
91
|
-
rightAudio, // Float32Array of PCM samples for the right channel
|
|
92
|
-
... // additional channels
|
|
93
|
-
],
|
|
94
|
-
samplesDecoded: 1234, // number of PCM samples that were decoded per channel
|
|
95
|
-
sampleRate: 48000, // sample rate of the decoded PCM
|
|
96
|
-
errors: [ // array containing descriptions for any decode errors
|
|
97
|
-
{
|
|
98
|
-
message: "libopus -4 OPUS_INVALID_PACKET: The compressed data passed is corrupted",
|
|
99
|
-
frameLength: 400, // length of the frame or data in bytes that encountered an error
|
|
100
|
-
frameNumber: 21, // position of error relative to total frames decoded
|
|
101
|
-
inputBytes: 4905, // position of error relative to total input bytes
|
|
102
|
-
outputSamples: 18888, // position of error relative to total output samples
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Each Float32Array within `channelData` can be used directly in the WebAudio API for playback.
|
|
109
|
-
|
|
110
|
-
Decoding will proceed through any errors. Any errors encountered may result in gaps in the decoded audio.
|
|
111
|
-
|
|
112
|
-
### Multichannel Output
|
|
113
|
-
|
|
114
|
-
Each channel is assigned to a speaker location in a conventional surround arrangement. Specific locations depend on the number of channels, and are given below in order of the corresponding channel indices. This set of surround options and speaker location orderings is the same as those used by the Vorbis codec.
|
|
115
|
-
|
|
116
|
-
* 1 channel: monophonic (mono).
|
|
117
|
-
* 2 channels: stereo (left, right).
|
|
118
|
-
* 3 channels: linear surround (left, center, right).
|
|
119
|
-
* 4 channels: quadraphonic (front left, front right, rear left, rear right).
|
|
120
|
-
* 5 channels: 5.0 surround (front left, front center, front right, rear left, rear right).
|
|
121
|
-
* 6 channels: 5.1 surround (front left, front center, front right, rear left, rear right, LFE).
|
|
122
|
-
* 7 channels: 6.1 surround (front left, front center, front right, side left, side right, rear center, LFE).
|
|
123
|
-
* 8 channels: 7.1 surround (front left, front center, front right, side left, side right, rear left, rear right, LFE).
|
|
124
|
-
* 9-255 channels: No mapping is defined.
|
|
125
|
-
|
|
126
|
-
See: https://datatracker.ietf.org/doc/html/rfc7845.html#section-5.1.1.2
|
|
127
|
-
|
|
128
|
-
Each Float32Array within `channelData` can be used directly in the WebAudio API for playback.
|
|
129
|
-
|
|
130
|
-
## `OpusMLDecoder`
|
|
131
|
-
|
|
132
|
-
Class that decodes Opus frames synchronously on the main thread.
|
|
133
|
-
|
|
134
|
-
### Options
|
|
135
|
-
```javascript
|
|
136
|
-
const decoder = new OpusMLDecoder({
|
|
137
|
-
speechQualityEnhancement: "nolace",
|
|
138
|
-
forceStereo: false,
|
|
139
|
-
sampleRate: 48000,
|
|
140
|
-
preSkip: 0,
|
|
141
|
-
channels: 2,
|
|
142
|
-
streamCount: 1,
|
|
143
|
-
coupledStreamCount: 1,
|
|
144
|
-
channelMappingTable: [0, 1]
|
|
145
|
-
});
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
#### **The below options should be obtained from the Opus Header.**
|
|
149
|
-
See this [documentation](https://wiki.xiph.org/OggOpus#ID_Header) on the Opus header for more information. If you don't have access to the Opus header, the default values will successfully decode most stereo Opus streams.
|
|
150
|
-
|
|
151
|
-
* `speechQualityEnhancement` *optional, defaults to `"nolace"`*
|
|
152
|
-
* `"none"`:
|
|
153
|
-
* Disables machine learning decoding.
|
|
154
|
-
* Normal quality, but fastest.
|
|
155
|
-
* `"lace"`:
|
|
156
|
-
* Enables LACE machine learning decoding.
|
|
157
|
-
* Medium quality, but faster (complexity of 100 MFLOPS)
|
|
158
|
-
* `"nolace"`: (default)
|
|
159
|
-
* Enables Non-Linear LACE machine learning decoding.
|
|
160
|
-
* Best quality, but slower (complexity of 400 MFLOPS).
|
|
161
|
-
* See the [opus-1.5 release notes](https://opus-codec.org/demo/opus-1.5/) for more information about machine learning decoding.
|
|
162
|
-
* `forceStereo` *optional, defaults to `false`*
|
|
163
|
-
* Set to `true` to force stereo output when decoding mono or multichannel Ogg Opus.
|
|
164
|
-
* If there are more than 8 channels, this option is ignored.
|
|
165
|
-
* `preSkip` *optional, defaults to `0`*
|
|
166
|
-
* Number of samples to skip at the beginning reported by the Opus header.
|
|
167
|
-
* `sampleRate` *optional, defaults to `48000`*
|
|
168
|
-
* Sample rate the decoder will output.
|
|
169
|
-
* Valid sample rates: `8000, 12000, 16000, 24000, or 48000`
|
|
170
|
-
#### ***Required for Multichannel Decoding.** (Channel Mapping Family >= 1)*
|
|
171
|
-
* `channels` *optional, defaults to `2`*
|
|
172
|
-
* Number of channels reported by the Opus header.
|
|
173
|
-
* `streamCount` *optional, defaults to `1`*
|
|
174
|
-
* Number of streams reported by the Opus header.
|
|
175
|
-
* `coupledStreamCount` *optional, defaults to: `1` when 2 channels, `0` when 1 channel*
|
|
176
|
-
* Number of coupled streams reported by the Opus header.
|
|
177
|
-
* `channelMappingTable` *optional, defaults to `[0, 1]` when 2 channels, `[0]` when 1 channel*
|
|
178
|
-
* Channel mapping reported by the Opus header.
|
|
179
|
-
|
|
180
|
-
### Getters
|
|
181
|
-
* `decoder.ready` *async*
|
|
182
|
-
* Returns a promise that is resolved when the WASM is compiled and ready to use.
|
|
183
|
-
|
|
184
|
-
### Methods
|
|
185
|
-
|
|
186
|
-
* `decoder.decodeFrame(opusFrame)`
|
|
187
|
-
* `opusFrame` Uint8Array containing a single Opus frame.
|
|
188
|
-
* Returns decoded audio.
|
|
189
|
-
* `decoder.decodeFrames(opusFrames)`
|
|
190
|
-
* `opusFrames` Array of Uint8Arrays containing Opus frames.
|
|
191
|
-
* Returns decoded audio.
|
|
192
|
-
* `decoder.reset()` *async*
|
|
193
|
-
* Resets the decoder so that a new stream of Opus frames can be decoded.
|
|
194
|
-
* `decoder.free()`
|
|
195
|
-
* De-allocates the memory used by the decoder.
|
|
196
|
-
* After calling `free()`, the current instance is made unusable, and a new instance will need to be created to decode additional Opus frames.
|
|
197
|
-
|
|
198
|
-
## `OpusMLDecoderWebWorker`
|
|
199
|
-
|
|
200
|
-
Class that decodes Opus frames asynchronously within a web worker. Decoding is performed in a separate, non-blocking thread. Each new instance spawns a new worker allowing you to run multiple workers for concurrent decoding of multiple streams.
|
|
201
|
-
|
|
202
|
-
### Options
|
|
203
|
-
```javascript
|
|
204
|
-
const decoder = new OpusMLDecoderWebWorker({
|
|
205
|
-
speechQualityEnhancement: "nolace",
|
|
206
|
-
forceStereo: false,
|
|
207
|
-
sampleRate: 48000,
|
|
208
|
-
channels: 2,
|
|
209
|
-
streamCount: 1,
|
|
210
|
-
coupledStreamCount: 1,
|
|
211
|
-
channelMappingTable: [0, 1]
|
|
212
|
-
});
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
#### **The below options should be obtained from the Opus Header.**
|
|
216
|
-
See this [documentation](https://wiki.xiph.org/OggOpus#ID_Header) on the Opus header for more information. If you don't have access to the Opus header, the default values will successfully decode most stereo Opus streams.
|
|
217
|
-
|
|
218
|
-
* `speechQualityEnhancement` *optional, defaults to `"nolace"`*
|
|
219
|
-
* `"none"`:
|
|
220
|
-
* Disables machine learning decoding.
|
|
221
|
-
* Normal quality, but fastest.
|
|
222
|
-
* `"lace"`:
|
|
223
|
-
* Enables LACE machine learning decoding.
|
|
224
|
-
* Medium quality, but faster (complexity of 100 MFLOPS)
|
|
225
|
-
* `"nolace"`: (default)
|
|
226
|
-
* Enables Non-Linear LACE machine learning decoding.
|
|
227
|
-
* Best quality, but slower (complexity of 400 MFLOPS).
|
|
228
|
-
* See the [opus-1.5 release notes](https://opus-codec.org/demo/opus-1.5/) for more information about machine learning decoding.
|
|
229
|
-
* `forceStereo` *optional, defaults to `false`*
|
|
230
|
-
* Set to `true` to force stereo output when decoding mono or multichannel Ogg Opus.
|
|
231
|
-
* If there are more than 8 channels, this option is ignored.
|
|
232
|
-
* `preSkip` *optional, defaults to `0`*
|
|
233
|
-
* Number of samples to skip at the beginning reported by the Opus header.
|
|
234
|
-
* `sampleRate` *optional, defaults to `48000`*
|
|
235
|
-
* Sample rate the decoder will output.
|
|
236
|
-
* Valid sample rates: `8000, 12000, 16000, 24000, or 48000`
|
|
237
|
-
#### ***Required for Multichannel Decoding.** (Channel Mapping Family >= 1)*
|
|
238
|
-
* `channels` *optional, defaults to `2`*
|
|
239
|
-
* Number of channels reported by the Opus header.
|
|
240
|
-
* `streamCount` *optional, defaults to `1`*
|
|
241
|
-
* Number of streams reported by the Opus header.
|
|
242
|
-
* `coupledStreamCount` *optional, defaults to: `1` when 2 channels, `0` when 1 channel*
|
|
243
|
-
* Number of coupled streams reported by the Opus header.
|
|
244
|
-
* `channelMappingTable` *optional, defaults to `[0, 1]` when 2 channels, `[0]` when 1 channel*
|
|
245
|
-
* Channel mapping reported by the Opus header.
|
|
246
|
-
### Getters
|
|
247
|
-
* `decoder.ready` *async*
|
|
248
|
-
* Returns a promise that is resolved when the WASM is compiled and ready to use.
|
|
249
|
-
|
|
250
|
-
### Methods
|
|
251
|
-
|
|
252
|
-
* `decoder.decodeFrame(opusFrame)` *async*
|
|
253
|
-
* `opusFrame` Uint8Array containing a single Opus frame.
|
|
254
|
-
* Returns a promise that resolves with the decoded audio.
|
|
255
|
-
* `decoder.decodeFrames(opusFrames)` *async*
|
|
256
|
-
* `opusFrames` Array of Uint8Arrays containing Opus frames.
|
|
257
|
-
* Returns a promise that resolves with the decoded audio.
|
|
258
|
-
* `decoder.reset()` *async*
|
|
259
|
-
* Resets the decoder so that a new stream of Opus frames can be decoded.
|
|
260
|
-
* `decoder.free()` *async*
|
|
261
|
-
* De-allocates the memory used by the decoder and terminates the web worker.
|
|
262
|
-
* After calling `free()`, the current instance is made unusable, and a new instance will need to be created to decode additional Opus frames.
|
|
263
|
-
|
|
264
|
-
### Properly using the Web Worker interface
|
|
265
|
-
|
|
266
|
-
`OpusMLDecoderWebWorker` uses async functions to send operations to the web worker without blocking the main thread. To fully take advantage of the concurrency provided by web workers, your code should avoid using `await` on decode operations where it will block the main thread.
|
|
267
|
-
|
|
268
|
-
Each method call on a `OpusMLDecoderWebWorker` instance will queue up an operation to the web worker. Operations will complete within the web worker thread one at a time and in the same order in which the methods were called.
|
|
269
|
-
|
|
270
|
-
* **Good** Main thread is not blocked during each decode operation. The example `playAudio` function is called when each decode operation completes. Also, the next decode operation can begin while `playAudio` is doing work on the main thread.
|
|
271
|
-
```javascript
|
|
272
|
-
const playAudio = ({ channelData, samplesDecoded, sampleRate }) => {
|
|
273
|
-
// does something to play the audio data.
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
decoder.decodeFrame(frameData1).then(playAudio);
|
|
277
|
-
decoder.decodeFrame(frameData2).then(playAudio);
|
|
278
|
-
decoder.decodeFrame(frameData3).then(playAudio);
|
|
279
|
-
|
|
280
|
-
// do some other operations while the audio is decoded
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
* **Bad** Main thread is being blocked by `await` during each decode operation. Synchronous code is halted while decoding completes, negating the benefits of using a webworker.
|
|
284
|
-
```javascript
|
|
285
|
-
const decoded1 = await decoder.decodeFrame(frameData1); // blocks the main thread
|
|
286
|
-
playAudio(decoded1);
|
|
287
|
-
|
|
288
|
-
const decoded2 = await decoder.decodeFrame(frameData2); // blocks the main thread
|
|
289
|
-
playAudio(decoded2);
|
|
290
|
-
|
|
291
|
-
const decoded3 = await decoder.decodeFrame(frameData3); // blocks the main thread
|
|
292
|
-
playAudio(decoded3);
|
|
293
|
-
```
|