@openclaw/whatsapp 2026.7.2-beta.7 → 2026.7.33
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/README.md +1 -1
- package/dist/{access-control-pZcxTmd5.js → .setup/access-control-C0jumQuO.mjs} +5 -4
- package/dist/.setup/account-config-6PTOSfaI.mjs +47 -0
- package/dist/{accounts-CSqLvCY5.js → .setup/accounts-Dw16pdNl.mjs} +9 -47
- package/dist/{action-runtime-BzfDFPbH.js → .setup/action-runtime-DLK_9v4r.mjs} +3 -3
- package/dist/{active-listener-BEjWsCNM.js → .setup/active-listener-CloPBx0S.mjs} +3 -3
- package/dist/{agent-tools-login-DE9MU98T.js → .setup/agent-tools-login-DINqgaYo.mjs} +19 -7
- package/dist/{approval-handler.runtime-DrA59QSA.js → .setup/approval-handler.runtime-DtJZbu3y.mjs} +14 -20
- package/dist/{approval-resolver-DoeBBt22.js → .setup/approval-resolver-DF-lu8k5.mjs} +1 -2
- package/dist/{auth-store-DcEpIOmE.js → .setup/auth-store-BZKGa0tW.mjs} +25 -29
- package/dist/{channel-Dg62olhy.js → .setup/channel-9WGjBznd.mjs} +117 -132
- package/dist/{channel-react-action-J_YtyMGX.js → .setup/channel-react-action-mvIbAFhn.mjs} +15 -12
- package/dist/{channel.runtime-BP0xNmLi.js → .setup/channel.runtime-DmmMgRJQ.mjs} +6 -6
- package/dist/.setup/channel.setup-ByBYSeLd.mjs +22 -0
- package/dist/.setup/config-schema-mBX2nmn1.mjs +47 -0
- package/dist/{connection-controller-BOB2MVKY.js → .setup/connection-controller-Dt62u6fI.mjs} +29 -226
- package/dist/.setup/connection-controller-registry-TSX_udJp.mjs +22 -0
- package/dist/{constants-HU41RHGI.js → .setup/constants-C7m81BNe.mjs} +1 -1
- package/dist/.setup/directory-config-B7Obxrq2.mjs +37 -0
- package/dist/.setup/doctor-By3SB4lm.mjs +48 -0
- package/dist/{group-session-key-DVMZlO3x.js → .setup/group-session-key-CEwPRRRK.mjs} +5 -38
- package/dist/{identity-CPrT5aEU.js → .setup/identity-CDB1bT-p.mjs} +2 -2
- package/dist/.setup/legacy-session-surface-api-B2szjq4r.mjs +2 -0
- package/dist/.setup/legacy-state-migrations-api-DXCxufZz.mjs +3 -0
- package/dist/{login-CvY2Dhch.js → .setup/login-7b3M0iBp.mjs} +12 -51
- package/dist/{login-qr-Bncpb6js.js → .setup/login-qr-CbyA4QX5.mjs} +47 -23
- package/dist/{monitor-CfkaUSL2.js → .setup/monitor-Dh6Di_YO.mjs} +1451 -1843
- package/dist/.setup/normalize-eddWWsNV.mjs +2 -0
- package/dist/{normalize-target-CugRyONv.js → .setup/normalize-target-bVWjgftN.mjs} +10 -18
- package/dist/{resolve-outbound-target-1GqbT1uX.js → .setup/resolve-outbound-target-oI7VpU4w.mjs} +1 -1
- package/dist/.setup/runtime-BfAdAEYT.mjs +8 -0
- package/dist/.setup/send-BQjMC41n.mjs +777 -0
- package/dist/{send-api-7wk6eQyW.js → .setup/send-api-BiAkPLr3.mjs} +155 -105
- package/dist/{session-errors-JuazczrA.js → .setup/session-errors-BAj9D2La.mjs} +1 -2
- package/dist/.setup/session-vUI41Jel.mjs +252 -0
- package/dist/.setup/session.runtime-B-V3rXP6.mjs +12 -0
- package/dist/{shared-CAxd15bp.js → .setup/setup-core--FfzntMG.mjs} +94 -63
- package/dist/{setup-finalize-BZucx24W.js → .setup/setup-finalize-DCruIciL.mjs} +17 -46
- package/dist/.setup/setup-plugin-api-B6ck_20D.mjs +3 -0
- package/dist/{setup-surface-BkVcd769.js → .setup/setup-surface-Zvj2cLzz.mjs} +4 -4
- package/dist/.setup/socket-timing-DhbVFjah.mjs +77 -0
- package/dist/{state-migrations-CAMTrs2U.js → .setup/state-migrations-D_BmQUR9.mjs} +8 -1
- package/dist/.setup/targets-runtime-C-GiVn6Y.mjs +188 -0
- package/dist/.setup/text-runtime-CUrq1mFq.mjs +4 -0
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/{call-tool-api.js → agent-tools-api.js} +26 -11
- package/dist/api.js +27 -17
- package/dist/auth-presence.js +1 -1
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/constants.js +2 -0
- package/dist/contract-api.js +5 -5
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +5 -46
- package/dist/index.js +4 -4
- package/dist/legacy-session-surface-api.js +1 -1
- package/dist/legacy-state-migrations-api.js +1 -1
- package/dist/light-runtime-api.js +4 -4
- package/dist/login-qr-runtime.js +1 -1
- package/dist/runtime-api.js +14 -14
- package/dist/runtime-setter-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +4 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/targets.js +2 -0
- package/node_modules/audio-decode/node_modules/@thi.ng/bitstream/package.json +4 -4
- package/node_modules/audio-decode/node_modules/@thi.ng/errors/package.json +4 -4
- package/node_modules/audio-decode/node_modules/audio-type/package.json +2 -3
- package/node_modules/baileys/node_modules/@protobufjs/aspromise/LICENSE +26 -0
- package/node_modules/baileys/node_modules/@protobufjs/aspromise/README.md +13 -0
- package/node_modules/baileys/node_modules/{protobufjs/src/util/aspromise.d.ts → @protobufjs/aspromise/index.d.ts} +13 -13
- package/node_modules/baileys/node_modules/{protobufjs/src/util/aspromise.js → @protobufjs/aspromise/index.js} +52 -52
- package/node_modules/baileys/node_modules/@protobufjs/aspromise/package.json +21 -0
- package/node_modules/baileys/node_modules/@protobufjs/aspromise/tests/index.js +130 -0
- package/node_modules/baileys/node_modules/@protobufjs/base64/LICENSE +26 -0
- package/node_modules/baileys/node_modules/@protobufjs/base64/README.md +19 -0
- package/node_modules/baileys/node_modules/{protobufjs/src/util/base64.d.ts → @protobufjs/base64/index.d.ts} +32 -32
- package/node_modules/baileys/node_modules/{protobufjs/src/util/base64.js → @protobufjs/base64/index.js} +139 -146
- package/node_modules/baileys/node_modules/@protobufjs/base64/package.json +21 -0
- package/node_modules/baileys/node_modules/@protobufjs/base64/tests/index.js +46 -0
- package/node_modules/baileys/node_modules/@protobufjs/codegen/LICENSE +26 -0
- package/node_modules/baileys/node_modules/@protobufjs/codegen/README.md +49 -0
- package/node_modules/baileys/node_modules/{protobufjs/src/util/codegen.d.ts → @protobufjs/codegen/index.d.ts} +31 -31
- package/node_modules/baileys/node_modules/{protobufjs/src/util/codegen.js → @protobufjs/codegen/index.js} +112 -118
- package/node_modules/baileys/node_modules/@protobufjs/codegen/package.json +13 -0
- package/node_modules/baileys/node_modules/@protobufjs/codegen/tests/index.js +13 -0
- package/node_modules/baileys/node_modules/@protobufjs/eventemitter/CHANGELOG.md +8 -0
- package/node_modules/baileys/node_modules/@protobufjs/eventemitter/LICENSE +26 -0
- package/node_modules/baileys/node_modules/@protobufjs/eventemitter/README.md +22 -0
- package/node_modules/baileys/node_modules/{protobufjs/src/util/eventemitter.d.ts → @protobufjs/eventemitter/index.d.ts} +45 -45
- package/node_modules/baileys/node_modules/{protobufjs/src/util/eventemitter.js → @protobufjs/eventemitter/index.js} +86 -86
- package/node_modules/baileys/node_modules/@protobufjs/eventemitter/package.json +21 -0
- package/node_modules/baileys/node_modules/@protobufjs/eventemitter/tests/index.js +83 -0
- package/node_modules/baileys/node_modules/@protobufjs/fetch/CHANGELOG.md +8 -0
- package/node_modules/baileys/node_modules/@protobufjs/fetch/LICENSE +26 -0
- package/node_modules/baileys/node_modules/@protobufjs/fetch/README.md +13 -0
- package/node_modules/baileys/node_modules/{protobufjs/src/util/fetch.d.ts → @protobufjs/fetch/index.d.ts} +56 -56
- package/node_modules/baileys/node_modules/{protobufjs/src/util/fetch.js → @protobufjs/fetch/index.js} +112 -112
- package/node_modules/baileys/node_modules/@protobufjs/fetch/package.json +27 -0
- package/node_modules/baileys/node_modules/@protobufjs/fetch/tests/data/file.txt +1 -0
- package/node_modules/baileys/node_modules/@protobufjs/fetch/tests/index.js +158 -0
- package/node_modules/baileys/node_modules/@protobufjs/fetch/util/fs.js +11 -0
- package/node_modules/baileys/node_modules/@protobufjs/float/LICENSE +26 -0
- package/node_modules/baileys/node_modules/@protobufjs/float/README.md +102 -0
- package/node_modules/baileys/node_modules/@protobufjs/float/bench/index.js +87 -0
- package/node_modules/baileys/node_modules/@protobufjs/float/bench/suite.js +46 -0
- package/node_modules/baileys/node_modules/{protobufjs/src/util/float.js → @protobufjs/float/index.js} +335 -335
- package/node_modules/baileys/node_modules/@protobufjs/float/package.json +26 -0
- package/node_modules/baileys/node_modules/@protobufjs/float/tests/index.js +100 -0
- package/node_modules/baileys/node_modules/@protobufjs/inquire/CHANGELOG.md +8 -0
- package/node_modules/baileys/node_modules/@protobufjs/inquire/LICENSE +26 -0
- package/node_modules/baileys/node_modules/@protobufjs/inquire/README.md +13 -0
- package/node_modules/baileys/node_modules/@protobufjs/inquire/index.d.ts +10 -0
- package/node_modules/baileys/node_modules/@protobufjs/inquire/index.js +38 -0
- package/node_modules/baileys/node_modules/@protobufjs/inquire/package.json +21 -0
- package/node_modules/baileys/node_modules/@protobufjs/inquire/tests/data/array.js +1 -0
- package/node_modules/baileys/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +1 -0
- package/node_modules/baileys/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +1 -0
- package/node_modules/baileys/node_modules/@protobufjs/inquire/tests/data/object.js +1 -0
- package/node_modules/baileys/node_modules/@protobufjs/inquire/tests/index.js +20 -0
- package/node_modules/baileys/node_modules/@protobufjs/path/LICENSE +26 -0
- package/node_modules/baileys/node_modules/@protobufjs/path/README.md +19 -0
- package/node_modules/baileys/node_modules/{protobufjs/src/util/path.d.ts → @protobufjs/path/index.d.ts} +22 -22
- package/node_modules/baileys/node_modules/{protobufjs/src/util/path.js → @protobufjs/path/index.js} +65 -100
- package/node_modules/baileys/node_modules/@protobufjs/path/package.json +21 -0
- package/node_modules/baileys/node_modules/@protobufjs/path/tests/index.js +60 -0
- package/node_modules/baileys/node_modules/@protobufjs/pool/.npmignore +3 -0
- package/node_modules/baileys/node_modules/@protobufjs/pool/LICENSE +26 -0
- package/node_modules/baileys/node_modules/@protobufjs/pool/README.md +13 -0
- package/node_modules/baileys/node_modules/{protobufjs/src/util/pool.d.ts → @protobufjs/pool/index.d.ts} +32 -32
- package/node_modules/baileys/node_modules/{protobufjs/src/util/pool.js → @protobufjs/pool/index.js} +48 -48
- package/node_modules/baileys/node_modules/@protobufjs/pool/package.json +21 -0
- package/node_modules/baileys/node_modules/@protobufjs/pool/tests/index.js +33 -0
- package/node_modules/baileys/node_modules/@protobufjs/utf8/LICENSE +26 -0
- package/node_modules/baileys/node_modules/@protobufjs/utf8/README.md +20 -0
- package/node_modules/baileys/node_modules/{protobufjs/src/util/utf8.d.ts → @protobufjs/utf8/index.d.ts} +24 -24
- package/node_modules/baileys/node_modules/{protobufjs/src/util/utf8.js → @protobufjs/utf8/index.js} +104 -190
- package/node_modules/baileys/node_modules/@protobufjs/utf8/package.json +21 -0
- package/node_modules/baileys/node_modules/@protobufjs/utf8/tests/data/surrogate_pair_bug.txt +207 -0
- package/node_modules/baileys/node_modules/@protobufjs/utf8/tests/data/utf8.txt +216 -0
- package/node_modules/baileys/node_modules/@protobufjs/utf8/tests/index.js +74 -0
- package/node_modules/baileys/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/baileys/node_modules/@types/node/README.md +15 -0
- package/node_modules/baileys/node_modules/@types/node/assert/strict.d.ts +68 -0
- package/node_modules/baileys/node_modules/@types/node/assert.d.ts +1077 -0
- package/node_modules/baileys/node_modules/@types/node/async_hooks.d.ts +711 -0
- package/node_modules/baileys/node_modules/@types/node/buffer.buffer.d.ts +466 -0
- package/node_modules/baileys/node_modules/@types/node/buffer.d.ts +1799 -0
- package/node_modules/baileys/node_modules/@types/node/child_process.d.ts +1362 -0
- package/node_modules/baileys/node_modules/@types/node/cluster.d.ts +432 -0
- package/node_modules/baileys/node_modules/@types/node/console.d.ts +93 -0
- package/node_modules/baileys/node_modules/@types/node/constants.d.ts +14 -0
- package/node_modules/baileys/node_modules/@types/node/crypto.d.ts +3954 -0
- package/node_modules/baileys/node_modules/@types/node/dgram.d.ts +537 -0
- package/node_modules/baileys/node_modules/@types/node/diagnostics_channel.d.ts +794 -0
- package/node_modules/baileys/node_modules/@types/node/dns/promises.d.ts +497 -0
- package/node_modules/baileys/node_modules/@types/node/dns.d.ts +876 -0
- package/node_modules/baileys/node_modules/@types/node/domain.d.ts +150 -0
- package/node_modules/baileys/node_modules/@types/node/events.d.ts +1008 -0
- package/node_modules/baileys/node_modules/@types/node/ffi.d.ts +486 -0
- package/node_modules/baileys/node_modules/@types/node/fs/promises.d.ts +1471 -0
- package/node_modules/baileys/node_modules/@types/node/fs.d.ts +4786 -0
- package/node_modules/baileys/node_modules/@types/node/globals.d.ts +150 -0
- package/node_modules/baileys/node_modules/@types/node/globals.typedarray.d.ts +101 -0
- package/node_modules/baileys/node_modules/@types/node/http.d.ts +2172 -0
- package/node_modules/baileys/node_modules/@types/node/http2.d.ts +2489 -0
- package/node_modules/baileys/node_modules/@types/node/https.d.ts +400 -0
- package/node_modules/baileys/node_modules/@types/node/index.d.ts +115 -0
- package/node_modules/baileys/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/node_modules/baileys/node_modules/@types/node/inspector.d.ts +264 -0
- package/node_modules/baileys/node_modules/@types/node/inspector.generated.d.ts +4406 -0
- package/node_modules/baileys/node_modules/@types/node/module.d.ts +726 -0
- package/node_modules/baileys/node_modules/@types/node/net.d.ts +970 -0
- package/node_modules/baileys/node_modules/@types/node/os.d.ts +498 -0
- package/node_modules/baileys/node_modules/@types/node/package.json +155 -0
- package/node_modules/baileys/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/baileys/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/baileys/node_modules/@types/node/path.d.ts +178 -0
- package/node_modules/baileys/node_modules/@types/node/perf_hooks.d.ts +604 -0
- package/node_modules/baileys/node_modules/@types/node/process.d.ts +2217 -0
- package/node_modules/baileys/node_modules/@types/node/punycode.d.ts +89 -0
- package/node_modules/baileys/node_modules/@types/node/querystring.d.ts +139 -0
- package/node_modules/baileys/node_modules/@types/node/quic.d.ts +978 -0
- package/node_modules/baileys/node_modules/@types/node/readline/promises.d.ts +158 -0
- package/node_modules/baileys/node_modules/@types/node/readline.d.ts +508 -0
- package/node_modules/baileys/node_modules/@types/node/repl.d.ts +420 -0
- package/node_modules/baileys/node_modules/@types/node/sea.d.ts +47 -0
- package/node_modules/baileys/node_modules/@types/node/sqlite.d.ts +1123 -0
- package/node_modules/baileys/node_modules/@types/node/stream/consumers.d.ts +114 -0
- package/node_modules/baileys/node_modules/@types/node/stream/iter.d.ts +451 -0
- package/node_modules/baileys/node_modules/@types/node/stream/promises.d.ts +211 -0
- package/node_modules/baileys/node_modules/@types/node/stream/web.d.ts +300 -0
- package/node_modules/baileys/node_modules/@types/node/stream.d.ts +1806 -0
- package/node_modules/baileys/node_modules/@types/node/string_decoder.d.ts +27 -0
- package/node_modules/baileys/node_modules/@types/node/test/reporters.d.ts +59 -0
- package/node_modules/baileys/node_modules/@types/node/test.d.ts +2389 -0
- package/node_modules/baileys/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/node_modules/baileys/node_modules/@types/node/timers.d.ts +149 -0
- package/node_modules/baileys/node_modules/@types/node/tls.d.ts +1193 -0
- package/node_modules/baileys/node_modules/@types/node/trace_events.d.ts +103 -0
- package/node_modules/baileys/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
- package/node_modules/baileys/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/baileys/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/node_modules/baileys/node_modules/@types/node/ts5.6/index.d.ts +117 -0
- package/node_modules/baileys/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/baileys/node_modules/@types/node/ts5.7/index.d.ts +117 -0
- package/node_modules/baileys/node_modules/@types/node/tty.d.ts +225 -0
- package/node_modules/baileys/node_modules/@types/node/url.d.ts +556 -0
- package/node_modules/baileys/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/baileys/node_modules/@types/node/util.d.ts +1677 -0
- package/node_modules/baileys/node_modules/@types/node/v8.d.ts +1062 -0
- package/node_modules/baileys/node_modules/@types/node/vm.d.ts +1136 -0
- package/node_modules/baileys/node_modules/@types/node/wasi.d.ts +131 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/domexception.d.ts +83 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/events.d.ts +106 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/baileys/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/baileys/node_modules/@types/node/worker_threads.d.ts +669 -0
- package/node_modules/baileys/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/node_modules/baileys/node_modules/@types/node/zlib.d.ts +589 -0
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/browser/index.js +4 -11
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/browser/index.min.js +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +3 -3
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/index.js +4 -11
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/index.min.js.map +3 -3
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/node/index.js +4 -11
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/node/index.min.js +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +3 -3
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/browser/index.js +4 -11
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/browser/index.min.js.map +3 -3
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/index.js +4 -11
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/index.js.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/index.min.js +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/index.min.js.map +3 -3
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/node/index.js +4 -11
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
- package/node_modules/baileys/node_modules/lru-cache/dist/esm/node/index.min.js.map +3 -3
- package/node_modules/baileys/node_modules/lru-cache/package.json +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/common/Util.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/common/Util.js +1 -7
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/FrameHeader.js +3 -23
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/FrameParser.js +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/AtomToken.js +13 -38
- package/node_modules/baileys/node_modules/music-metadata/lib/mpeg/MpegParser.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/package.json +6 -6
- package/node_modules/baileys/node_modules/p-queue/dist/index.js +27 -37
- package/node_modules/baileys/node_modules/p-queue/package.json +1 -1
- package/node_modules/baileys/node_modules/protobufjs/README.md +553 -266
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.js +1985 -3177
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.js +1244 -1966
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.js +2005 -3330
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor/README.md +70 -3
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor/index.d.ts +193 -0
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor/index.js +1185 -1
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor/test.js +54 -0
- package/node_modules/baileys/node_modules/protobufjs/google/api/annotations.json +1 -3
- package/node_modules/baileys/node_modules/protobufjs/google/api/http.json +1 -2
- package/node_modules/baileys/node_modules/protobufjs/google/protobuf/api.json +6 -12
- package/node_modules/baileys/node_modules/protobufjs/google/protobuf/descriptor.json +87 -170
- package/node_modules/baileys/node_modules/protobufjs/google/protobuf/descriptor.proto +8 -0
- package/node_modules/baileys/node_modules/protobufjs/google/protobuf/source_context.json +1 -2
- package/node_modules/baileys/node_modules/protobufjs/google/protobuf/type.json +7 -14
- package/node_modules/baileys/node_modules/protobufjs/index.d.ts +703 -1066
- package/node_modules/baileys/node_modules/protobufjs/package.json +52 -25
- package/node_modules/baileys/node_modules/protobufjs/scripts/postinstall.js +32 -0
- package/node_modules/baileys/node_modules/protobufjs/src/common.js +8 -14
- package/node_modules/baileys/node_modules/protobufjs/src/converter.js +51 -85
- package/node_modules/baileys/node_modules/protobufjs/src/decoder.js +61 -205
- package/node_modules/baileys/node_modules/protobufjs/src/encoder.js +7 -27
- package/node_modules/baileys/node_modules/protobufjs/src/enum.js +5 -18
- package/node_modules/baileys/node_modules/protobufjs/src/field.js +19 -71
- package/node_modules/baileys/node_modules/protobufjs/src/index-light.js +29 -29
- package/node_modules/baileys/node_modules/protobufjs/src/index-minimal.js +13 -12
- package/node_modules/baileys/node_modules/protobufjs/src/index.js +6 -6
- package/node_modules/baileys/node_modules/protobufjs/src/mapfield.js +8 -26
- package/node_modules/baileys/node_modules/protobufjs/src/message.js +11 -5
- package/node_modules/baileys/node_modules/protobufjs/src/method.js +7 -30
- package/node_modules/baileys/node_modules/protobufjs/src/namespace.js +10 -26
- package/node_modules/baileys/node_modules/protobufjs/src/object.js +31 -41
- package/node_modules/baileys/node_modules/protobufjs/src/oneof.js +1 -12
- package/node_modules/baileys/node_modules/protobufjs/src/parse.js +47 -169
- package/node_modules/baileys/node_modules/protobufjs/src/reader.js +50 -412
- package/node_modules/baileys/node_modules/protobufjs/src/reader_buffer.js +5 -31
- package/node_modules/baileys/node_modules/protobufjs/src/root.js +4 -16
- package/node_modules/baileys/node_modules/protobufjs/src/rpc/service.js +5 -18
- package/node_modules/baileys/node_modules/protobufjs/src/service.js +2 -15
- package/node_modules/baileys/node_modules/protobufjs/src/tokenize.js +1 -6
- package/node_modules/baileys/node_modules/protobufjs/src/type.js +36 -80
- package/node_modules/baileys/node_modules/protobufjs/src/typescript.jsdoc +15 -0
- package/node_modules/baileys/node_modules/protobufjs/src/util/longbits.js +6 -10
- package/node_modules/baileys/node_modules/protobufjs/src/util/minimal.js +54 -71
- package/node_modules/baileys/node_modules/protobufjs/src/util.js +17 -51
- package/node_modules/baileys/node_modules/protobufjs/src/verifier.js +14 -19
- package/node_modules/baileys/node_modules/protobufjs/src/wrappers.js +3 -2
- package/node_modules/baileys/node_modules/protobufjs/src/writer.js +191 -424
- package/node_modules/baileys/node_modules/protobufjs/src/writer_buffer.js +26 -41
- package/node_modules/baileys/node_modules/protobufjs/tsconfig.json +5 -3
- package/node_modules/baileys/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/baileys/node_modules/undici-types/README.md +6 -0
- package/node_modules/baileys/node_modules/undici-types/agent.d.ts +30 -0
- package/node_modules/baileys/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/baileys/node_modules/undici-types/balanced-pool.d.ts +30 -0
- package/node_modules/baileys/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/node_modules/baileys/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/baileys/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/baileys/node_modules/undici-types/client.d.ts +129 -0
- package/node_modules/baileys/node_modules/undici-types/connector.d.ts +36 -0
- package/node_modules/baileys/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/baileys/node_modules/undici-types/cookies.d.ts +30 -0
- package/node_modules/baileys/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- package/node_modules/baileys/node_modules/undici-types/dispatcher.d.ts +253 -0
- package/node_modules/baileys/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/baileys/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/baileys/node_modules/undici-types/errors.d.ts +177 -0
- package/node_modules/baileys/node_modules/undici-types/eventsource.d.ts +66 -0
- package/node_modules/baileys/node_modules/undici-types/fetch.d.ts +231 -0
- package/node_modules/baileys/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/baileys/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/baileys/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/baileys/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/baileys/node_modules/undici-types/handlers.d.ts +14 -0
- package/node_modules/baileys/node_modules/undici-types/header.d.ts +165 -0
- package/node_modules/baileys/node_modules/undici-types/index.d.ts +93 -0
- package/node_modules/baileys/node_modules/undici-types/interceptors.d.ts +80 -0
- package/node_modules/baileys/node_modules/undici-types/mock-agent.d.ts +68 -0
- package/node_modules/baileys/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/baileys/node_modules/undici-types/mock-client.d.ts +27 -0
- package/node_modules/baileys/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/baileys/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- package/node_modules/baileys/node_modules/undici-types/mock-pool.d.ts +27 -0
- package/node_modules/baileys/node_modules/undici-types/package.json +55 -0
- package/node_modules/baileys/node_modules/undici-types/patch.d.ts +29 -0
- package/node_modules/baileys/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/baileys/node_modules/undici-types/pool.d.ts +39 -0
- package/node_modules/baileys/node_modules/undici-types/proxy-agent.d.ts +29 -0
- package/node_modules/baileys/node_modules/undici-types/readable.d.ts +68 -0
- package/node_modules/baileys/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/baileys/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/node_modules/baileys/node_modules/undici-types/round-robin-pool.d.ts +39 -0
- package/node_modules/baileys/node_modules/undici-types/snapshot-agent.d.ts +113 -0
- package/node_modules/baileys/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/baileys/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/baileys/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/baileys/node_modules/undici-types/webidl.d.ts +346 -0
- package/node_modules/baileys/node_modules/undici-types/websocket.d.ts +188 -0
- package/node_modules/baileys/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/baileys/node_modules/ws/package.json +1 -1
- package/node_modules/typebox/build/compile/validator.d.mts +4 -1
- package/node_modules/typebox/build/guard/guard.d.mts +1 -1
- package/node_modules/typebox/build/guard/guard.mjs +2 -5
- package/node_modules/typebox/build/guard/string.mjs +4 -16
- package/node_modules/typebox/build/schema/engine/_functions.mjs +15 -34
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -8
- package/node_modules/typebox/build/typebox.d.mts +1 -1
- package/node_modules/typebox/build/typebox.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +32 -29
- package/openclaw.plugin.json +239 -214
- package/package.json +11 -21
- package/dist/approval-reactions-Cu66aYdq.js +0 -373
- package/dist/channel.setup-pMwNVkCA.js +0 -19
- package/dist/config-schema-BQP5YCeK.js +0 -50
- package/dist/connection-controller-runtime-context-DG0tuYuw.js +0 -23
- package/dist/directory-config-DalGrfGN.js +0 -196
- package/dist/doctor-CwzVXKoE.js +0 -10
- package/dist/normalize-C7Hkc_vE.js +0 -2
- package/dist/question-reactions-CRsnyoMK.js +0 -142
- package/dist/runtime-BLlToOi6.js +0 -21
- package/dist/send-D37ddk22.js +0 -436
- package/dist/session.runtime-Nsqaehbd.js +0 -16
- package/dist/socket-close-DridEuzz.js +0 -622
- package/dist/targets-runtime-TMk0lGuy.js +0 -299
- package/dist/text-runtime-CaKLhowd.js +0 -4
- package/node_modules/baileys/node_modules/protobufjs/ext/README.md +0 -70
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor.d.ts +0 -87
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor.generated.d.ts +0 -417
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor.js +0 -1356
- package/node_modules/baileys/node_modules/protobufjs/ext/protojson.LICENSE +0 -201
- package/node_modules/baileys/node_modules/protobufjs/ext/protojson.d.ts +0 -20
- package/node_modules/baileys/node_modules/protobufjs/ext/protojson.generated.d.ts +0 -49
- package/node_modules/baileys/node_modules/protobufjs/ext/protojson.js +0 -951
- package/node_modules/baileys/node_modules/protobufjs/ext/textformat.d.ts +0 -19
- package/node_modules/baileys/node_modules/protobufjs/ext/textformat.generated.d.ts +0 -33
- package/node_modules/baileys/node_modules/protobufjs/ext/textformat.js +0 -1276
- package/node_modules/baileys/node_modules/protobufjs/google/protobuf/compiler/plugin.json +0 -126
- package/node_modules/baileys/node_modules/protobufjs/google/protobuf/compiler/plugin.proto +0 -47
- package/node_modules/baileys/node_modules/protobufjs/src/typescript.js +0 -25
- /package/dist/{account-ids-CB5SOWjc.js → .setup/account-ids-CB5SOWjc.mjs} +0 -0
- /package/dist/{audio-preflight.runtime-C_glQhZY.js → .setup/audio-preflight.runtime-C_glQhZY.mjs} +0 -0
- /package/dist/{command-policy-BIOSHySD.js → .setup/command-policy-BIOSHySD.mjs} +0 -0
- /package/dist/{creds-files-B1kSWtBg.js → .setup/creds-files-B1kSWtBg.mjs} +0 -0
- /package/dist/{group-config-path-BGyzT9Lg.js → .setup/group-config-path-BGyzT9Lg.mjs} +0 -0
- /package/dist/{group-session-contract-DDnZSsJ1.js → .setup/group-session-contract-DDnZSsJ1.mjs} +0 -0
- /package/dist/{reply-resolver.runtime-Ded8D58Y.js → .setup/reply-resolver.runtime-Ded8D58Y.mjs} +0 -0
- /package/dist/{rolldown-runtime-D7D4PA-g.js → .setup/rolldown-runtime-D7D4PA-g.mjs} +0 -0
- /package/dist/{security-contract-nAzD945y.js → .setup/security-contract-nAzD945y.mjs} +0 -0
- /package/dist/{session-contract-DMTm6Q_L.js → .setup/session-contract-DMTm6Q_L.mjs} +0 -0
- /package/node_modules/baileys/node_modules/{protobufjs/src/util/float.d.ts → @protobufjs/float/index.d.ts} +0 -0
|
@@ -1,50 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, n as isWhatsAppNewsletterJid, o as normalizeWhatsAppAllowFromEntry, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-
|
|
4
|
-
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-
|
|
5
|
-
import { a as normalizeWhatsAppOutboundPayload, i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppPayloadText, s as normalizeWhatsAppPayloadTextPreservingIndentation, t as sendMessageWhatsApp
|
|
6
|
-
import
|
|
7
|
-
import "./
|
|
8
|
-
import {
|
|
9
|
-
import "./text-runtime-
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import { a as resolveWhatsAppGroupRequireMention, c as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-CAMTrs2U.js";
|
|
1
|
+
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.mjs";
|
|
2
|
+
import { a as resolveWhatsAppAccount } from "./accounts-Dw16pdNl.mjs";
|
|
3
|
+
import { c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, n as isWhatsAppNewsletterJid, o as normalizeWhatsAppAllowFromEntry, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.mjs";
|
|
4
|
+
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-oI7VpU4w.mjs";
|
|
5
|
+
import { a as normalizeWhatsAppOutboundPayload, g as resolveWhatsAppReactionLevel, h as whatsappApprovalAuth, i as sendTypingWhatsApp, m as getWhatsAppApprovalApprovers, n as sendPollWhatsApp, o as normalizeWhatsAppPayloadText, s as normalizeWhatsAppPayloadTextPreservingIndentation, t as sendMessageWhatsApp } from "./send-BQjMC41n.mjs";
|
|
6
|
+
import "./normalize-eddWWsNV.mjs";
|
|
7
|
+
import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.mjs";
|
|
8
|
+
import { s as toWhatsappJid } from "./targets-runtime-C-GiVn6Y.mjs";
|
|
9
|
+
import "./text-runtime-CUrq1mFq.mjs";
|
|
10
|
+
import { s as lookupInboundMessageMetaForTarget, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-CEwPRRRK.mjs";
|
|
11
|
+
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.mjs";
|
|
12
|
+
import { a as resolveWhatsAppGroupRequireMention, c as resolveWhatsAppMentionStripRegexes, i as whatsappSetupWizardProxy, l as formatWhatsAppConfigAllowFromEntries, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, r as loadWhatsAppChannelRuntime, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core--FfzntMG.mjs";
|
|
13
|
+
import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-BZKGa0tW.mjs";
|
|
14
|
+
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-D_BmQUR9.mjs";
|
|
16
15
|
import { createActionGate as createActionGate$1 } from "openclaw/plugin-sdk/channel-actions";
|
|
17
|
-
import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-core";
|
|
18
|
-
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
19
|
-
import {
|
|
16
|
+
import { DEFAULT_ACCOUNT_ID, listCombinedAccountIds, normalizeOptionalAccountId, resolveListedDefaultAccountId } from "openclaw/plugin-sdk/account-core";
|
|
17
|
+
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
18
|
+
import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
19
|
+
import { asString, collectIssuesForEnabledAccounts, createAsyncComputedAccountStatusAdapter, createDefaultChannelRuntimeState, isRecord as isRecord$1 } from "openclaw/plugin-sdk/status-helpers";
|
|
20
20
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
21
21
|
import { buildChannelOutboundSessionRoute } from "openclaw/plugin-sdk/core";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
22
|
+
import { buildApprovalReactionPromptPayloadForRequest } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
23
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
25
24
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
|
|
26
25
|
import { buildDmGroupAccountAllowlistAdapter } from "openclaw/plugin-sdk/allowlist-config-edit";
|
|
27
26
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
28
|
-
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
29
27
|
import { createChannelApprovalCapability } from "openclaw/plugin-sdk/approval-delivery-runtime";
|
|
30
28
|
import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
31
|
-
import { createChannelApproverDmTargetResolver, createChannelNativeOriginTargetResolver, createNativeApprovalChannelRouteGates, createNativeApprovalForwardingFallbackSuppressor
|
|
32
|
-
import {
|
|
33
|
-
import { buildTypedApprovalPresentation } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
34
|
-
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
29
|
+
import { createChannelApproverDmTargetResolver, createChannelNativeOriginTargetResolver, createNativeApprovalChannelRouteGates, createNativeApprovalForwardingFallbackSuppressor } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
30
|
+
import { chunkText } from "openclaw/plugin-sdk/reply-chunking";
|
|
35
31
|
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
32
|
+
import { sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
36
33
|
//#region extensions/whatsapp/src/approval-native.ts
|
|
37
34
|
const DEFAULT_APPROVAL_FORWARDING_MODE = "session";
|
|
38
|
-
const { normalizeForwardTarget: normalizeWhatsAppForwardTarget, normalizeTarget: normalizeWhatsAppApprovalTarget, resolveSessionTarget: resolveSessionWhatsAppOriginTarget, resolveTurnSourceTarget: resolveTurnSourceWhatsAppOriginTarget } = createNativeApprovalMessagingTargetResolvers({
|
|
39
|
-
channel: "whatsapp",
|
|
40
|
-
normalizeTo: normalizeWhatsAppMessagingTarget
|
|
41
|
-
});
|
|
42
35
|
function isWhatsAppApprovalTransportEnabled(params) {
|
|
43
36
|
return resolveWhatsAppAccount({
|
|
44
37
|
cfg: params.cfg,
|
|
45
38
|
accountId: params.accountId
|
|
46
39
|
}).enabled;
|
|
47
40
|
}
|
|
41
|
+
function normalizeWhatsAppForwardTarget(target) {
|
|
42
|
+
if (normalizeLowercaseStringOrEmpty(target.channel) !== "whatsapp") return null;
|
|
43
|
+
const to = normalizeWhatsAppMessagingTarget(target.to);
|
|
44
|
+
if (!to) return null;
|
|
45
|
+
return {
|
|
46
|
+
to,
|
|
47
|
+
accountId: normalizeOptionalString(target.accountId),
|
|
48
|
+
threadId: target.threadId ?? null
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function resolveTurnSourceWhatsAppOriginTarget(request) {
|
|
52
|
+
if (normalizeLowercaseStringOrEmpty(request.request.turnSourceChannel) !== "whatsapp") return null;
|
|
53
|
+
const to = normalizeWhatsAppMessagingTarget(request.request.turnSourceTo ?? "");
|
|
54
|
+
if (!to) return null;
|
|
55
|
+
return {
|
|
56
|
+
to,
|
|
57
|
+
accountId: normalizeOptionalString(request.request.turnSourceAccountId)
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function resolveSessionWhatsAppOriginTarget(sessionTarget) {
|
|
61
|
+
const to = normalizeWhatsAppMessagingTarget(sessionTarget.to);
|
|
62
|
+
return to ? {
|
|
63
|
+
to,
|
|
64
|
+
accountId: normalizeOptionalString(sessionTarget.accountId)
|
|
65
|
+
} : null;
|
|
66
|
+
}
|
|
48
67
|
const { canApprovalPotentiallyRouteToChannel: canApprovalPotentiallyRouteToWhatsApp, canAnyApprovalPotentiallyRouteToChannel: canAnyApprovalPotentiallyRouteToWhatsApp, isSessionApprovalEligible: isWhatsAppSessionApprovalEligible, isExplicitTargetEligible: isWhatsAppExplicitTargetEligible, shouldHandleApprovalRequest: shouldHandleWhatsAppApprovalRequest } = createNativeApprovalChannelRouteGates({
|
|
49
68
|
channel: "whatsapp",
|
|
50
69
|
defaultForwardingMode: DEFAULT_APPROVAL_FORWARDING_MODE,
|
|
@@ -59,7 +78,13 @@ const resolveWhatsAppOriginTargetBase = createChannelNativeOriginTargetResolver(
|
|
|
59
78
|
shouldHandleRequest: shouldHandleWhatsAppApprovalRequest,
|
|
60
79
|
resolveTurnSourceTarget: resolveTurnSourceWhatsAppOriginTarget,
|
|
61
80
|
resolveSessionTarget: resolveSessionWhatsAppOriginTarget,
|
|
62
|
-
normalizeTarget:
|
|
81
|
+
normalizeTarget: (target) => {
|
|
82
|
+
const to = normalizeWhatsAppMessagingTarget(target.to);
|
|
83
|
+
return to ? {
|
|
84
|
+
...target,
|
|
85
|
+
to
|
|
86
|
+
} : null;
|
|
87
|
+
}
|
|
63
88
|
});
|
|
64
89
|
function resolveWhatsAppOriginTarget(params) {
|
|
65
90
|
const target = resolveWhatsAppOriginTargetBase(params);
|
|
@@ -96,26 +121,10 @@ const shouldSuppressWhatsAppForwardingFallback = createNativeApprovalForwardingF
|
|
|
96
121
|
resolveApproverDmTargets: resolveWhatsAppApproverDmTargets
|
|
97
122
|
});
|
|
98
123
|
function buildWhatsAppExecPendingPayload(params) {
|
|
99
|
-
|
|
100
|
-
return {
|
|
101
|
-
...payload,
|
|
102
|
-
presentation: buildTypedApprovalPresentation({
|
|
103
|
-
approvalId: params.request.id,
|
|
104
|
-
approvalKind: "exec",
|
|
105
|
-
allowedDecisions: payload.allowedDecisions
|
|
106
|
-
})
|
|
107
|
-
};
|
|
124
|
+
return buildApprovalReactionPromptPayloadForRequest(params);
|
|
108
125
|
}
|
|
109
126
|
function buildWhatsAppPluginPendingPayload(params) {
|
|
110
|
-
|
|
111
|
-
return {
|
|
112
|
-
...payload,
|
|
113
|
-
presentation: buildTypedApprovalPresentation({
|
|
114
|
-
approvalId: params.request.id,
|
|
115
|
-
approvalKind: "plugin",
|
|
116
|
-
allowedDecisions: payload.allowedDecisions
|
|
117
|
-
})
|
|
118
|
-
};
|
|
127
|
+
return buildApprovalReactionPromptPayloadForRequest(params);
|
|
119
128
|
}
|
|
120
129
|
const whatsappApprovalCapability = createChannelApprovalCapability({
|
|
121
130
|
...whatsappApprovalAuth,
|
|
@@ -191,13 +200,12 @@ const whatsappApprovalCapability = createChannelApprovalCapability({
|
|
|
191
200
|
accountId,
|
|
192
201
|
nativeSessionOnly: true
|
|
193
202
|
}),
|
|
194
|
-
shouldHandle: ({ cfg, accountId, context,
|
|
203
|
+
shouldHandle: ({ cfg, accountId, context, request }) => Boolean(context) && shouldHandleWhatsAppApprovalRequest({
|
|
195
204
|
cfg,
|
|
196
205
|
accountId,
|
|
197
|
-
approvalKind,
|
|
198
206
|
request
|
|
199
207
|
}),
|
|
200
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
208
|
+
load: async () => (await import("./approval-handler.runtime-DtJZbu3y.mjs")).whatsappApprovalNativeRuntime
|
|
201
209
|
})
|
|
202
210
|
});
|
|
203
211
|
//#endregion
|
|
@@ -253,7 +261,15 @@ const WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS = ["sendWhatsApp"];
|
|
|
253
261
|
function resolveQuoteLookupAccountId(cfg, accountId) {
|
|
254
262
|
const explicitAccountId = normalizeOptionalAccountId(accountId);
|
|
255
263
|
if (explicitAccountId) return explicitAccountId;
|
|
256
|
-
|
|
264
|
+
const channelCfg = cfg?.channels?.whatsapp;
|
|
265
|
+
const configuredIds = listCombinedAccountIds({
|
|
266
|
+
configuredAccountIds: channelCfg?.accounts && typeof channelCfg.accounts === "object" ? Object.keys(channelCfg.accounts).filter(Boolean) : [],
|
|
267
|
+
fallbackAccountIdWhenEmpty: DEFAULT_ACCOUNT_ID
|
|
268
|
+
});
|
|
269
|
+
return resolveListedDefaultAccountId({
|
|
270
|
+
accountIds: configuredIds,
|
|
271
|
+
configuredDefaultAccountId: normalizeOptionalAccountId(channelCfg?.defaultAccount)
|
|
272
|
+
});
|
|
257
273
|
}
|
|
258
274
|
function createWhatsAppOutboundBase({ chunker, sendMessageWhatsApp, sendPollWhatsApp, shouldLogVerbose, resolveTarget, normalizeText = normalizeWhatsAppPayloadText, skipEmptyText = true }) {
|
|
259
275
|
const resolveQuotedMessageKey = (params) => {
|
|
@@ -266,8 +282,7 @@ function createWhatsAppOutboundBase({ chunker, sendMessageWhatsApp, sendPollWhat
|
|
|
266
282
|
remoteJid: cachedMeta?.remoteJid ?? targetJid,
|
|
267
283
|
fromMe: cachedMeta?.fromMe ?? false,
|
|
268
284
|
participant: cachedMeta?.participant,
|
|
269
|
-
messageText: cachedMeta?.body
|
|
270
|
-
media: cachedMeta?.media
|
|
285
|
+
messageText: cachedMeta?.body
|
|
271
286
|
};
|
|
272
287
|
};
|
|
273
288
|
const outbound = {
|
|
@@ -364,8 +379,6 @@ function createWhatsAppOutboundBase({ chunker, sendMessageWhatsApp, sendPollWhat
|
|
|
364
379
|
}
|
|
365
380
|
//#endregion
|
|
366
381
|
//#region extensions/whatsapp/src/channel-outbound.ts
|
|
367
|
-
const loadWhatsAppApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-Cu66aYdq.js").then((n) => n.t));
|
|
368
|
-
const loadWhatsAppQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-CRsnyoMK.js").then((n) => n.n));
|
|
369
382
|
function normalizeWhatsAppChannelPayloadText(text) {
|
|
370
383
|
return normalizeWhatsAppPayloadTextPreservingIndentation(text);
|
|
371
384
|
}
|
|
@@ -373,21 +386,6 @@ function normalizeWhatsAppChannelSendText(text) {
|
|
|
373
386
|
const normalized = normalizeWhatsAppChannelPayloadText(text);
|
|
374
387
|
return normalized.trim() ? normalized : "";
|
|
375
388
|
}
|
|
376
|
-
async function prepareWhatsAppApprovalPayloadForDelivery(params) {
|
|
377
|
-
const questionPayload = questionGatewayRuntime.prepareReactionPayloadForDelivery({
|
|
378
|
-
payload: params.payload,
|
|
379
|
-
presentation: params.presentation
|
|
380
|
-
});
|
|
381
|
-
if (questionPayload) return questionPayload;
|
|
382
|
-
return (await loadWhatsAppApprovalReactionsModule()).prepareWhatsAppApprovalPayloadForDelivery({
|
|
383
|
-
payload: params.payload,
|
|
384
|
-
presentation: params.presentation
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
async function registerDeliveredWhatsAppApprovalPayload(params) {
|
|
388
|
-
(await loadWhatsAppQuestionReactionsModule()).registerWhatsAppQuestionReactionTargetForDeliveredPayload(params);
|
|
389
|
-
(await loadWhatsAppApprovalReactionsModule()).registerWhatsAppApprovalReactionTargetForDeliveredPayload(params);
|
|
390
|
-
}
|
|
391
389
|
const whatsappChannelOutbound = {
|
|
392
390
|
...createWhatsAppOutboundBase({
|
|
393
391
|
chunker: chunkText,
|
|
@@ -405,8 +403,6 @@ const whatsappChannelOutbound = {
|
|
|
405
403
|
normalizeText: normalizeWhatsAppChannelSendText
|
|
406
404
|
}),
|
|
407
405
|
sendTextOnlyErrorPayloads: true,
|
|
408
|
-
renderPresentation: prepareWhatsAppApprovalPayloadForDelivery,
|
|
409
|
-
afterDeliverPayload: registerDeliveredWhatsAppApprovalPayload,
|
|
410
406
|
normalizePayload: ({ payload }) => ({
|
|
411
407
|
...payload,
|
|
412
408
|
text: normalizeWhatsAppChannelPayloadText(payload.text)
|
|
@@ -445,17 +441,9 @@ const whatsappMessageAdapter = defineChannelMessageAdapter({
|
|
|
445
441
|
} }
|
|
446
442
|
});
|
|
447
443
|
//#endregion
|
|
448
|
-
//#region extensions/whatsapp/src/group-intro.ts
|
|
449
|
-
function resolveWhatsAppMentionStripRegexes(ctx) {
|
|
450
|
-
const selfE164 = (ctx.To ?? "").replace(/^whatsapp:/i, "");
|
|
451
|
-
if (!selfE164) return [];
|
|
452
|
-
const escaped = selfE164.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
453
|
-
return [new RegExp(escaped, "g"), new RegExp(`@${escaped}`, "g")];
|
|
454
|
-
}
|
|
455
|
-
//#endregion
|
|
456
444
|
//#region extensions/whatsapp/src/heartbeat.ts
|
|
457
445
|
async function checkWhatsAppHeartbeatReady(params) {
|
|
458
|
-
if (params.cfg.
|
|
446
|
+
if (params.cfg.web?.enabled === false) return {
|
|
459
447
|
ok: false,
|
|
460
448
|
reason: "whatsapp-disabled"
|
|
461
449
|
};
|
|
@@ -513,16 +501,23 @@ function resolveWhatsAppOutboundSessionRoute(params) {
|
|
|
513
501
|
}
|
|
514
502
|
//#endregion
|
|
515
503
|
//#region extensions/whatsapp/src/status-issues.ts
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
504
|
+
const RECENT_DISCONNECT_WARNING_WINDOW_MS = 9e5;
|
|
505
|
+
function readWhatsAppAccountStatus(value) {
|
|
506
|
+
if (!isRecord$1(value)) return null;
|
|
507
|
+
return {
|
|
508
|
+
accountId: value.accountId,
|
|
509
|
+
statusState: value.statusState,
|
|
510
|
+
enabled: value.enabled,
|
|
511
|
+
linked: value.linked,
|
|
512
|
+
connected: value.connected,
|
|
513
|
+
running: value.running,
|
|
514
|
+
reconnectAttempts: value.reconnectAttempts,
|
|
515
|
+
lastDisconnect: value.lastDisconnect,
|
|
516
|
+
lastInboundAt: value.lastInboundAt,
|
|
517
|
+
lastError: value.lastError,
|
|
518
|
+
healthState: value.healthState
|
|
519
|
+
};
|
|
520
|
+
}
|
|
526
521
|
function readLastDisconnect(value) {
|
|
527
522
|
if (typeof value === "string") {
|
|
528
523
|
const error = asString(value);
|
|
@@ -544,7 +539,7 @@ function isRecentDisconnect(disconnect, now = Date.now()) {
|
|
|
544
539
|
function collectWhatsAppStatusIssues(accounts) {
|
|
545
540
|
return collectIssuesForEnabledAccounts({
|
|
546
541
|
accounts,
|
|
547
|
-
readAccount:
|
|
542
|
+
readAccount: readWhatsAppAccountStatus,
|
|
548
543
|
collectIssues: ({ account, accountId, issues }) => {
|
|
549
544
|
const linked = account.linked === true;
|
|
550
545
|
const statusState = asString(account.statusState);
|
|
@@ -565,16 +560,6 @@ function collectWhatsAppStatusIssues(accounts) {
|
|
|
565
560
|
});
|
|
566
561
|
return;
|
|
567
562
|
}
|
|
568
|
-
if (healthState === "logged-out") {
|
|
569
|
-
issues.push({
|
|
570
|
-
channel: "whatsapp",
|
|
571
|
-
accountId,
|
|
572
|
-
kind: "auth",
|
|
573
|
-
message: `Session logged out${lastError ? `: ${lastError}` : "."}`,
|
|
574
|
-
fix: `Run: ${formatCliCommand("openclaw channels login")} (scan QR on the gateway host).`
|
|
575
|
-
});
|
|
576
|
-
return;
|
|
577
|
-
}
|
|
578
563
|
if (!linked) {
|
|
579
564
|
issues.push({
|
|
580
565
|
channel: "whatsapp",
|
|
@@ -607,6 +592,16 @@ function collectWhatsAppStatusIssues(accounts) {
|
|
|
607
592
|
});
|
|
608
593
|
return;
|
|
609
594
|
}
|
|
595
|
+
if (healthState === "logged-out") {
|
|
596
|
+
issues.push({
|
|
597
|
+
channel: "whatsapp",
|
|
598
|
+
accountId,
|
|
599
|
+
kind: "auth",
|
|
600
|
+
message: `Linked session logged out${lastError ? `: ${lastError}` : "."}`,
|
|
601
|
+
fix: `Run: ${formatCliCommand("openclaw channels login")} (scan QR on the gateway host).`
|
|
602
|
+
});
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
610
605
|
if (linked && running && connected && reconnectAttempts != null && reconnectAttempts > 0 && isRecentDisconnect(lastDisconnect)) {
|
|
611
606
|
issues.push({
|
|
612
607
|
channel: "whatsapp",
|
|
@@ -629,8 +624,8 @@ function collectWhatsAppStatusIssues(accounts) {
|
|
|
629
624
|
}
|
|
630
625
|
//#endregion
|
|
631
626
|
//#region extensions/whatsapp/src/channel.ts
|
|
632
|
-
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-
|
|
633
|
-
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-
|
|
627
|
+
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-B7Obxrq2.mjs").then((n) => n.t));
|
|
628
|
+
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-mvIbAFhn.mjs"));
|
|
634
629
|
function resolveWhatsAppTargetInfo(raw) {
|
|
635
630
|
const normalized = normalizeWhatsAppTarget(raw);
|
|
636
631
|
if (!normalized) return null;
|
|
@@ -639,10 +634,6 @@ function resolveWhatsAppTargetInfo(raw) {
|
|
|
639
634
|
chatType: isWhatsAppGroupJid(normalized) ? "group" : isWhatsAppNewsletterJid(normalized) ? "channel" : "direct"
|
|
640
635
|
};
|
|
641
636
|
}
|
|
642
|
-
function resolveWhatsAppMessageActionTarget(params) {
|
|
643
|
-
const chatJid = params.args.chatJid;
|
|
644
|
-
return typeof chatJid === "string" ? normalizeWhatsAppMessagingTarget(chatJid) : void 0;
|
|
645
|
-
}
|
|
646
637
|
const whatsappPlugin = createChatChannelPlugin({
|
|
647
638
|
pairing: {
|
|
648
639
|
idLabel: "whatsappSenderId",
|
|
@@ -660,15 +651,15 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
660
651
|
...createWhatsAppPluginBase({
|
|
661
652
|
groups: {
|
|
662
653
|
resolveRequireMention: resolveWhatsAppGroupRequireMention,
|
|
663
|
-
resolveToolPolicy: resolveWhatsAppGroupToolPolicy
|
|
654
|
+
resolveToolPolicy: resolveWhatsAppGroupToolPolicy,
|
|
655
|
+
resolveGroupIntroHint: resolveWhatsAppGroupIntroHint
|
|
664
656
|
},
|
|
665
657
|
setupWizard: whatsappSetupWizardProxy,
|
|
666
658
|
setup: whatsappSetupAdapter,
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
659
|
+
isConfigured: async (account) => {
|
|
660
|
+
return await (await loadWhatsAppChannelRuntime()).readWebAuthState(account.authDir) === "linked";
|
|
661
|
+
}
|
|
670
662
|
}),
|
|
671
|
-
agentTools: () => [createWhatsAppLoginTool()],
|
|
672
663
|
allowlist: buildDmGroupAccountAllowlistAdapter({
|
|
673
664
|
channelId: "whatsapp",
|
|
674
665
|
resolveAccount: resolveWhatsAppAccount,
|
|
@@ -734,15 +725,9 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
734
725
|
};
|
|
735
726
|
},
|
|
736
727
|
listPeers: async (params) => (await loadWhatsAppDirectoryConfig()).listWhatsAppDirectoryPeersFromConfig(params),
|
|
737
|
-
listGroups: async (params) => (await loadWhatsAppDirectoryConfig()).listWhatsAppDirectoryGroupsFromConfig(params)
|
|
738
|
-
listGroupsLive: async (params) => (await loadWhatsAppDirectoryConfig()).listWhatsAppDirectoryGroupsLive(params)
|
|
728
|
+
listGroups: async (params) => (await loadWhatsAppDirectoryConfig()).listWhatsAppDirectoryGroupsFromConfig(params)
|
|
739
729
|
},
|
|
740
730
|
actions: {
|
|
741
|
-
messageActionTargetAliases: { react: {
|
|
742
|
-
aliases: ["chatJid", "messageId"],
|
|
743
|
-
deliveryTargetAliases: ["chatJid"],
|
|
744
|
-
resolveDeliveryTarget: resolveWhatsAppMessageActionTarget
|
|
745
|
-
} },
|
|
746
731
|
describeMessageTool: ({ cfg, accountId }) => describeWhatsAppMessageActions({
|
|
747
732
|
cfg,
|
|
748
733
|
accountId
|
|
@@ -780,7 +765,7 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
780
765
|
});
|
|
781
766
|
}
|
|
782
767
|
},
|
|
783
|
-
status:
|
|
768
|
+
status: createAsyncComputedAccountStatusAdapter({
|
|
784
769
|
defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID$1, {
|
|
785
770
|
connected: false,
|
|
786
771
|
reconnectAttempts: 0,
|
|
@@ -806,9 +791,10 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
806
791
|
lid: null
|
|
807
792
|
}
|
|
808
793
|
};
|
|
809
|
-
const linked =
|
|
794
|
+
const linked = typeof snapshot.linked === "boolean" ? snapshot.linked : auth.state === "unstable" ? void 0 : auth.state === "linked";
|
|
810
795
|
const summaryAuthState = auth.state === "unstable" ? auth.state : linked === true ? "linked" : linked === false ? "not-linked" : void 0;
|
|
811
796
|
const statusState = summaryAuthState === void 0 ? void 0 : summaryAuthState;
|
|
797
|
+
const configured = auth.state === "unstable" ? typeof snapshot.configured === "boolean" ? snapshot.configured : true : typeof linked === "boolean" ? linked : auth.state === "linked";
|
|
812
798
|
const authAgeMs = typeof linked === "boolean" && linked ? auth.authAgeMs : null;
|
|
813
799
|
const self = typeof linked === "boolean" && linked ? auth.selfId : {
|
|
814
800
|
e164: null,
|
|
@@ -816,7 +802,7 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
816
802
|
lid: null
|
|
817
803
|
};
|
|
818
804
|
return {
|
|
819
|
-
configured
|
|
805
|
+
configured,
|
|
820
806
|
...statusState ? { statusState } : {},
|
|
821
807
|
...typeof linked === "boolean" ? { linked } : {},
|
|
822
808
|
authAgeMs,
|
|
@@ -836,18 +822,16 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
836
822
|
...snapshot.terminalDisconnect ? { terminalDisconnect: snapshot.terminalDisconnect } : {}
|
|
837
823
|
};
|
|
838
824
|
},
|
|
839
|
-
resolveAccountSnapshot: ({ account, runtime }) => {
|
|
840
|
-
const
|
|
825
|
+
resolveAccountSnapshot: async ({ account, runtime }) => {
|
|
826
|
+
const authState = await (await loadWhatsAppChannelRuntime()).readWebAuthState(account.authDir);
|
|
841
827
|
return {
|
|
842
828
|
accountId: account.accountId,
|
|
843
829
|
name: account.name,
|
|
844
830
|
enabled: account.enabled,
|
|
845
|
-
configured:
|
|
831
|
+
configured: true,
|
|
846
832
|
extra: {
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
linked: false
|
|
850
|
-
} : {},
|
|
833
|
+
statusState: authState,
|
|
834
|
+
...authState === "linked" ? { linked: true } : authState === "not-linked" ? { linked: false } : {},
|
|
851
835
|
connected: runtime?.connected ?? false,
|
|
852
836
|
reconnectAttempts: runtime?.reconnectAttempts,
|
|
853
837
|
lastConnectedAt: runtime?.lastConnectedAt ?? null,
|
|
@@ -864,6 +848,7 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
864
848
|
}
|
|
865
849
|
};
|
|
866
850
|
},
|
|
851
|
+
resolveAccountState: ({ configured }) => configured ? "linked" : "not linked",
|
|
867
852
|
logSelfId: ({ account, runtime, includeChannelPrefix }) => {
|
|
868
853
|
loadWhatsAppChannelRuntime().then((runtimeExports) => runtimeExports.logWebSelfId(account.authDir, runtime, includeChannelPrefix));
|
|
869
854
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-
|
|
2
|
-
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-
|
|
3
|
-
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-
|
|
4
|
-
import { t as sendMessageWhatsApp } from "./send-
|
|
5
|
-
import "./normalize-
|
|
1
|
+
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-Dw16pdNl.mjs";
|
|
2
|
+
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.mjs";
|
|
3
|
+
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-DLK_9v4r.mjs";
|
|
4
|
+
import { t as sendMessageWhatsApp } from "./send-BQjMC41n.mjs";
|
|
5
|
+
import "./normalize-eddWWsNV.mjs";
|
|
6
6
|
import { jsonResult, readStringOrNumberParam, readStringParam as readStringParam$1, resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
7
|
-
import { canonicalizeBase64, estimateBase64DecodedBytes } from "openclaw/plugin-sdk/media-runtime";
|
|
8
7
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
9
8
|
//#region extensions/whatsapp/src/channel-react-action.ts
|
|
10
9
|
const WHATSAPP_CHANNEL = "whatsapp";
|
|
@@ -24,19 +23,23 @@ function readWhatsAppActionChatJid(params) {
|
|
|
24
23
|
return normalizeWhatsAppTarget(params.toolContext.currentChannelId) ?? void 0;
|
|
25
24
|
}
|
|
26
25
|
function extractBase64Payload(encoded) {
|
|
27
|
-
|
|
26
|
+
const match = /^data:[^;]+;base64,(.*)$/i.exec(encoded.trim());
|
|
27
|
+
return match ? match[1] : encoded;
|
|
28
|
+
}
|
|
29
|
+
function estimateBase64DecodedBytes(encoded) {
|
|
30
|
+
const compact = extractBase64Payload(encoded).replace(/\s/g, "");
|
|
31
|
+
if (!compact) return 0;
|
|
32
|
+
const padding = compact.endsWith("==") ? 2 : compact.endsWith("=") ? 1 : 0;
|
|
33
|
+
return Math.max(0, Math.floor(compact.length * 3 / 4) - padding);
|
|
28
34
|
}
|
|
29
35
|
function decodeUploadFileMediaPayload(params) {
|
|
30
|
-
const payload = extractBase64Payload(params.encoded);
|
|
31
36
|
if (params.maxBytes !== void 0) {
|
|
32
|
-
const estimatedBytes = estimateBase64DecodedBytes(
|
|
37
|
+
const estimatedBytes = estimateBase64DecodedBytes(params.encoded);
|
|
33
38
|
if (estimatedBytes > params.maxBytes) throw new Error(`WhatsApp upload-file buffer exceeds configured media limit (${estimatedBytes} bytes > ${params.maxBytes} bytes).`);
|
|
34
39
|
}
|
|
35
40
|
const contentType = readStringParam$1(params.args, "contentType") ?? readStringParam$1(params.args, "mimeType");
|
|
36
41
|
const fileName = readStringParam$1(params.args, "filename") ?? readStringParam$1(params.args, "fileName");
|
|
37
|
-
const
|
|
38
|
-
if (!canonicalPayload) throw new Error("WhatsApp upload-file buffer must be valid base64 or a base64 data URL.");
|
|
39
|
-
const buffer = Buffer.from(canonicalPayload, "base64");
|
|
42
|
+
const buffer = Buffer.from(extractBase64Payload(params.encoded), "base64");
|
|
40
43
|
if (params.maxBytes !== void 0 && buffer.byteLength > params.maxBytes) throw new Error(`WhatsApp upload-file buffer exceeds configured media limit (${buffer.byteLength} bytes > ${params.maxBytes} bytes).`);
|
|
41
44
|
return {
|
|
42
45
|
buffer,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { startWebLoginWithQr as startWebLoginWithQr$1, waitForWebLogin as waitForWebLogin$1 } from "
|
|
2
|
-
import { c as logoutWeb$1, d as readWebAuthExistsBestEffort$1, f as readWebAuthExistsForDecision$1, g as readWebSelfId$1, h as readWebAuthState$1, m as readWebAuthSnapshotBestEffort$1, o as getWebAuthAgeMs$1, p as readWebAuthSnapshot$1, s as logWebSelfId$1, x as webAuthExists$1 } from "./auth-store-
|
|
3
|
-
import { t as getActiveWebListener$1 } from "./active-listener-
|
|
4
|
-
import { t as monitorWebChannel$1 } from "./monitor-
|
|
5
|
-
import { t as loginWeb$1 } from "./login-
|
|
6
|
-
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-
|
|
1
|
+
import { startWebLoginWithQr as startWebLoginWithQr$1, waitForWebLogin as waitForWebLogin$1 } from "../login-qr-runtime.js";
|
|
2
|
+
import { c as logoutWeb$1, d as readWebAuthExistsBestEffort$1, f as readWebAuthExistsForDecision$1, g as readWebSelfId$1, h as readWebAuthState$1, m as readWebAuthSnapshotBestEffort$1, o as getWebAuthAgeMs$1, p as readWebAuthSnapshot$1, s as logWebSelfId$1, x as webAuthExists$1 } from "./auth-store-BZKGa0tW.mjs";
|
|
3
|
+
import { t as getActiveWebListener$1 } from "./active-listener-CloPBx0S.mjs";
|
|
4
|
+
import { t as monitorWebChannel$1 } from "./monitor-Dh6Di_YO.mjs";
|
|
5
|
+
import { t as loginWeb$1 } from "./login-7b3M0iBp.mjs";
|
|
6
|
+
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-Zvj2cLzz.mjs";
|
|
7
7
|
//#region extensions/whatsapp/src/channel.runtime.ts
|
|
8
8
|
function getActiveWebListener(...args) {
|
|
9
9
|
return getActiveWebListener$1(...args);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core--FfzntMG.mjs";
|
|
2
|
+
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-D_BmQUR9.mjs";
|
|
3
|
+
//#region extensions/whatsapp/src/channel.setup.ts
|
|
4
|
+
async function isWhatsAppAuthConfigured(account) {
|
|
5
|
+
const { readWebAuthState } = await import("./auth-store-BZKGa0tW.mjs").then((n) => n.i);
|
|
6
|
+
return await readWebAuthState(account.authDir) === "linked";
|
|
7
|
+
}
|
|
8
|
+
const whatsappSetupPlugin = {
|
|
9
|
+
...createWhatsAppPluginBase({
|
|
10
|
+
groups: {
|
|
11
|
+
resolveRequireMention: resolveWhatsAppGroupRequireMention,
|
|
12
|
+
resolveToolPolicy: resolveWhatsAppGroupToolPolicy,
|
|
13
|
+
resolveGroupIntroHint: resolveWhatsAppGroupIntroHint
|
|
14
|
+
},
|
|
15
|
+
setupWizard: whatsappSetupWizardProxy,
|
|
16
|
+
setup: whatsappSetupAdapter,
|
|
17
|
+
isConfigured: isWhatsAppAuthConfigured
|
|
18
|
+
}),
|
|
19
|
+
lifecycle: { detectLegacyStateMigrations: ({ oauthDir }) => detectWhatsAppLegacyStateMigrations({ oauthDir }) }
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { whatsappSetupPlugin as t };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { WhatsAppConfigSchema, buildChannelConfigSchema } from "openclaw/plugin-sdk/bundled-channel-config-schema";
|
|
2
|
+
//#endregion
|
|
3
|
+
//#region extensions/whatsapp/src/config-schema.ts
|
|
4
|
+
const WhatsAppChannelConfigSchema = buildChannelConfigSchema(WhatsAppConfigSchema, { uiHints: {
|
|
5
|
+
"": {
|
|
6
|
+
label: "WhatsApp",
|
|
7
|
+
help: "WhatsApp channel provider configuration for access policy and message batching behavior. Use this section to tune responsiveness and direct-message routing safety for WhatsApp chats."
|
|
8
|
+
},
|
|
9
|
+
dmPolicy: {
|
|
10
|
+
label: "WhatsApp DM Policy",
|
|
11
|
+
help: "Direct message access control (\"pairing\" recommended). \"open\" requires channels.whatsapp.allowFrom=[\"*\"]."
|
|
12
|
+
},
|
|
13
|
+
selfChatMode: {
|
|
14
|
+
label: "WhatsApp Self-Phone Mode",
|
|
15
|
+
help: "Same-phone setup (bot uses your personal WhatsApp number)."
|
|
16
|
+
},
|
|
17
|
+
debounceMs: {
|
|
18
|
+
label: "WhatsApp Message Debounce (ms)",
|
|
19
|
+
help: "Debounce window (ms) for batching rapid consecutive messages from the same sender (0 to disable)."
|
|
20
|
+
},
|
|
21
|
+
configWrites: {
|
|
22
|
+
label: "WhatsApp Config Writes",
|
|
23
|
+
help: "Allow WhatsApp to write config in response to channel events/commands (default: true)."
|
|
24
|
+
},
|
|
25
|
+
"actions.calls": {
|
|
26
|
+
label: "WhatsApp Voice Calls",
|
|
27
|
+
help: "Expose the experimental requester-bound WhatsApp voice-call tool. Default: false. Requires a separately paired MeowCaller CLI."
|
|
28
|
+
},
|
|
29
|
+
mentionPatterns: {
|
|
30
|
+
label: "WhatsApp Mention Pattern Policy",
|
|
31
|
+
help: "Scopes configured groupChat mentionPatterns to selected WhatsApp conversation IDs such as 123@g.us."
|
|
32
|
+
},
|
|
33
|
+
"mentionPatterns.mode": {
|
|
34
|
+
label: "WhatsApp Mention Pattern Mode",
|
|
35
|
+
help: "\"allow\" enables configured regex mention patterns unless denyIn matches; \"deny\" disables them unless allowIn matches."
|
|
36
|
+
},
|
|
37
|
+
"mentionPatterns.allowIn": {
|
|
38
|
+
label: "WhatsApp Mention Pattern Allowlist",
|
|
39
|
+
help: "WhatsApp conversation IDs where configured regex mention patterns are enabled when mode is deny."
|
|
40
|
+
},
|
|
41
|
+
"mentionPatterns.denyIn": {
|
|
42
|
+
label: "WhatsApp Mention Pattern Denylist",
|
|
43
|
+
help: "WhatsApp conversation IDs where configured regex mention patterns are disabled."
|
|
44
|
+
}
|
|
45
|
+
} });
|
|
46
|
+
//#endregion
|
|
47
|
+
export { WhatsAppChannelConfigSchema as t };
|