@openclaw/whatsapp 2026.7.1-beta.2 → 2026.7.1-beta.5
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/dist/{access-control-88UPniDc.js → access-control-DYE5dXna.js} +5 -3
- package/dist/{accounts-DgViSyJx.js → accounts-4YgwroRU.js} +1 -1
- package/dist/{action-runtime-hqza0J8B.js → action-runtime-DPahAqxV.js} +2 -2
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/{active-listener-CFwkn3ho.js → active-listener-B4SDebQ6.js} +1 -1
- package/dist/api.js +14 -13
- package/dist/{approval-handler.runtime-9_SV7vhc.js → approval-handler.runtime-DNWS4aYQ.js} +1 -1
- package/dist/auth-presence.js +1 -1
- package/dist/{auth-store-ECx4h57q.js → auth-store-Db-wfApd.js} +23 -13
- package/dist/call-tool-api.js +233 -0
- package/dist/{channel-fcXxWXic.js → channel-BWp7h1uY.js} +44 -18
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-Dgy9uUMl.js → channel-react-action-CKJHL_Wf.js} +3 -3
- package/dist/{channel.runtime-B4ThooGF.js → channel.runtime-CAssfx9p.js} +5 -5
- package/dist/{channel.setup-C_WEdyJR.js → channel.setup-CURc5rEt.js} +2 -2
- package/dist/{config-schema-CROZuhT-.js → config-schema-mBX2nmn1.js} +4 -0
- package/dist/{connection-controller-u-tfAFhJ.js → connection-controller-DkbrFSIn.js} +6 -5
- package/dist/connection-controller-registry-TSX_udJp.js +22 -0
- package/dist/contract-api.js +1 -1
- package/dist/{quoted-message-CpA_ujXK.js → group-session-key-BhC1RQOE.js} +31 -2
- package/dist/{identity-CmsTmkKR.js → identity-Dqft3mFA.js} +2 -1
- package/dist/index.js +9 -2
- package/dist/light-runtime-api.js +3 -3
- package/dist/{login-8lHwLmXj.js → login-C48y0jlx.js} +14 -7
- package/dist/{login-qr-BEZZqrTb.js → login-qr-BjId7dll.js} +7 -7
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-BqkJ4MpT.js → monitor-DD8bXohk.js} +249 -160
- package/dist/runtime-api.js +9 -9
- package/dist/{send-i8Xk5mBQ.js → send-C5CpFcBG.js} +27 -9
- package/dist/{send-api-DndiBJhN.js → send-api-DLlXl8CH.js} +6 -5
- package/dist/{session-WU4SVP8f.js → session-DriaHt7V.js} +3 -3
- package/dist/{session-errors-CbsoQqoy.js → session-errors-BAj9D2La.js} +1 -22
- package/dist/{setup-core-KjSBbWX4.js → setup-core-DH-DFPLY.js} +4 -4
- package/dist/{setup-finalize-WedNP30s.js → setup-finalize-c8dl34sO.js} +3 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-IOdkbWsQ.js → setup-surface-DlWb0Z09.js} +3 -3
- package/dist/{socket-timing-DvMNkIge.js → socket-timing-DhbVFjah.js} +17 -5
- package/dist/{text-runtime-C88QkuU9.js → targets-runtime-C-GiVn6Y.js} +2 -3
- package/dist/text-runtime-DdX6-mC_.js +4 -0
- package/node_modules/@cacheable/memory/README.md +177 -0
- package/node_modules/@cacheable/memory/dist/index.cjs +867 -820
- package/node_modules/@cacheable/memory/dist/index.d.cts +382 -280
- package/node_modules/@cacheable/memory/dist/index.d.mts +412 -0
- package/node_modules/@cacheable/memory/dist/index.mjs +841 -0
- package/node_modules/@cacheable/memory/package.json +9 -9
- package/node_modules/@cacheable/utils/README.md +342 -8
- package/node_modules/@cacheable/utils/dist/index.cjs +1322 -619
- package/node_modules/@cacheable/utils/dist/index.d.cts +769 -173
- package/node_modules/@cacheable/utils/dist/index.d.mts +903 -0
- package/node_modules/@cacheable/utils/dist/index.mjs +1355 -0
- package/node_modules/@cacheable/utils/package.json +8 -8
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/assert/strict.d.ts +10 -1
- package/node_modules/@types/node/assert.d.ts +144 -17
- package/node_modules/@types/node/async_hooks.d.ts +9 -9
- package/node_modules/@types/node/buffer.d.ts +64 -30
- package/node_modules/@types/node/child_process.d.ts +17 -21
- package/node_modules/@types/node/cluster.d.ts +13 -13
- package/node_modules/@types/node/console.d.ts +1 -1
- package/node_modules/@types/node/crypto.d.ts +471 -575
- package/node_modules/@types/node/diagnostics_channel.d.ts +274 -32
- package/node_modules/@types/node/dns.d.ts +15 -15
- package/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/node/ffi.d.ts +486 -0
- package/node_modules/@types/node/fs/promises.d.ts +7 -4
- package/node_modules/@types/node/fs.d.ts +24 -18
- package/node_modules/@types/node/globals.d.ts +4 -4
- package/node_modules/@types/node/http.d.ts +30 -5
- package/node_modules/@types/node/http2.d.ts +5 -1
- package/node_modules/@types/node/index.d.ts +1 -3
- package/node_modules/@types/node/inspector.d.ts +1 -1
- package/node_modules/@types/node/module.d.ts +16 -45
- package/node_modules/@types/node/net.d.ts +1 -1
- package/node_modules/@types/node/os.d.ts +2 -2
- package/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/node/perf_hooks.d.ts +1 -9
- package/node_modules/@types/node/process.d.ts +25 -12
- package/node_modules/@types/node/quic.d.ts +92 -11
- package/node_modules/@types/node/readline.d.ts +12 -11
- package/node_modules/@types/node/repl.d.ts +10 -10
- package/node_modules/@types/node/sqlite.d.ts +56 -1
- package/node_modules/@types/node/stream/iter.d.ts +150 -0
- package/node_modules/@types/node/stream/promises.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +1 -1
- package/node_modules/@types/node/stream.d.ts +37 -5
- package/node_modules/@types/node/test/reporters.d.ts +1 -1
- package/node_modules/@types/node/test.d.ts +120 -10
- package/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/node/ts5.6/index.d.ts +2 -4
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -3
- package/node_modules/@types/node/url.d.ts +3 -3
- package/node_modules/@types/node/util/types.d.ts +1 -1
- package/node_modules/@types/node/util.d.ts +22 -22
- package/node_modules/@types/node/v8.d.ts +85 -3
- package/node_modules/@types/node/vm.d.ts +9 -9
- package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/node_modules/@types/node/worker_threads.d.ts +10 -12
- package/node_modules/@types/node/zlib.d.ts +3 -3
- package/node_modules/cacheable/README.md +309 -30
- package/node_modules/cacheable/dist/index.cjs +1307 -1153
- package/node_modules/cacheable/dist/index.d.cts +741 -469
- package/node_modules/cacheable/dist/index.d.mts +766 -0
- package/node_modules/cacheable/dist/index.mjs +1210 -0
- package/node_modules/cacheable/package.json +10 -10
- package/node_modules/content-type/README.md +32 -57
- package/node_modules/content-type/dist/index.d.ts +26 -0
- package/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/content-type/package.json +35 -25
- package/node_modules/media-typer/README.md +19 -33
- package/node_modules/media-typer/dist/index.d.ts +29 -0
- package/node_modules/media-typer/dist/index.js +64 -0
- package/node_modules/media-typer/dist/index.js.map +1 -0
- package/node_modules/media-typer/package.json +37 -22
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +2 -2
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +65 -13
- package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +10 -0
- package/node_modules/music-metadata/lib/wav/WaveChunk.js +13 -3
- package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +1 -0
- package/node_modules/music-metadata/lib/wav/WaveParser.js +6 -5
- package/node_modules/music-metadata/package.json +5 -5
- package/node_modules/typebox/build/compile/validator.d.mts +2 -7
- package/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/node_modules/typebox/build/format/_idna.mjs +36 -6
- package/node_modules/typebox/build/format/_puny.mjs +4 -1
- package/node_modules/typebox/build/format/uuid.d.mts +2 -2
- package/node_modules/typebox/build/format/uuid.mjs +3 -3
- package/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/node_modules/typebox/build/guard/guard.d.mts +4 -8
- package/node_modules/typebox/build/guard/guard.mjs +5 -13
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
- package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
- package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
- package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
- package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
- package/node_modules/typebox/build/type/action/index.d.mts +7 -4
- package/node_modules/typebox/build/type/action/index.mjs +7 -4
- package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
- package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
- package/node_modules/typebox/build/type/action/module.d.mts +8 -7
- package/node_modules/typebox/build/type/action/module.mjs +7 -6
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
- package/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/index.mjs +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
- package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
- package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
- package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
- package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
- package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
- package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
- package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
- package/node_modules/typebox/build/type/extends/object.mjs +25 -3
- package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
- package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
- package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
- package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
- package/node_modules/typebox/build/type/extends/union.mjs +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
- package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
- package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
- package/node_modules/typebox/build/type/script/parser.mjs +22 -22
- package/node_modules/typebox/build/type/script/script.d.mts +3 -4
- package/node_modules/typebox/build/type/script/script.mjs +3 -2
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
- package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
- package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
- package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
- package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
- package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/node_modules/typebox/build/type/types/call.d.mts +3 -3
- package/node_modules/typebox/build/type/types/call.mjs +3 -2
- package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
- package/node_modules/typebox/build/type/types/enum.mjs +5 -0
- package/node_modules/typebox/build/type/types/index.d.mts +1 -4
- package/node_modules/typebox/build/type/types/index.mjs +1 -4
- package/node_modules/typebox/build/type/types/number.d.mts +1 -1
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/record.d.mts +13 -7
- package/node_modules/typebox/build/type/types/record.mjs +15 -9
- package/node_modules/typebox/build/type/types/static.d.mts +2 -5
- package/node_modules/typebox/build/typebox.d.mts +4 -8
- package/node_modules/typebox/build/typebox.mjs +4 -8
- package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
- package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
- package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
- package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/index.d.mts +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
- package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
- package/node_modules/typebox/build/value/value.d.mts +0 -1
- package/node_modules/typebox/build/value/value.mjs +0 -1
- package/node_modules/typebox/package.json +25 -25
- package/node_modules/typebox/readme.md +97 -80
- package/node_modules/undici-types/agent.d.ts +0 -2
- package/node_modules/undici-types/client.d.ts +25 -19
- package/node_modules/undici-types/dispatcher.d.ts +7 -33
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici-types/fetch.d.ts +24 -4
- package/node_modules/undici-types/h2c-client.d.ts +6 -6
- package/node_modules/undici-types/handlers.d.ts +1 -2
- package/node_modules/undici-types/header.d.ts +5 -0
- package/node_modules/undici-types/index.d.ts +3 -1
- package/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/pool.d.ts +0 -2
- package/node_modules/undici-types/proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -2
- package/node_modules/undici-types/snapshot-agent.d.ts +4 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/webidl.d.ts +0 -1
- package/npm-shrinkwrap.json +49 -41
- package/openclaw.plugin.json +12 -0
- package/package.json +5 -5
- package/node_modules/@cacheable/memory/dist/index.d.ts +0 -310
- package/node_modules/@cacheable/memory/dist/index.js +0 -807
- package/node_modules/@cacheable/utils/dist/index.d.ts +0 -307
- package/node_modules/@cacheable/utils/dist/index.js +0 -630
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/cacheable/dist/index.d.ts +0 -494
- package/node_modules/cacheable/dist/index.js +0 -1141
- package/node_modules/content-type/HISTORY.md +0 -29
- package/node_modules/content-type/index.js +0 -225
- package/node_modules/media-typer/HISTORY.md +0 -50
- package/node_modules/media-typer/index.js +0 -143
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
- package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
- package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/node_modules/typebox/build/type/action/options.d.mts +0 -11
- package/node_modules/typebox/build/type/action/options.mjs +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
- package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- package/dist/{approval-resolver-e1hAVRRy.js → approval-resolver-DF-lu8k5.js} +1 -1
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-4YgwroRU.js";
|
|
2
|
+
import { n as isSelfChatMode } from "./targets-runtime-C-GiVn6Y.js";
|
|
3
|
+
import { n as normalizeE164 } from "./text-runtime-DdX6-mC_.js";
|
|
4
|
+
import { a as getSelfIdentity, o as getSenderIdentity } from "./identity-Dqft3mFA.js";
|
|
4
5
|
import { defaultRuntime } from "openclaw/plugin-sdk/runtime-env";
|
|
5
6
|
import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
|
|
6
7
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
@@ -316,6 +317,7 @@ async function checkInboundAccessControl(params) {
|
|
|
316
317
|
if (suppressPairingReply) logWhatsAppVerbose(params.verbose, `Skipping pairing reply for historical DM from ${candidate}.`);
|
|
317
318
|
else await createChannelPairingChallengeIssuer({
|
|
318
319
|
channel: "whatsapp",
|
|
320
|
+
accountId: policy.account.accountId,
|
|
319
321
|
upsertPairingRequest: async ({ id, meta }) => await upsertChannelPairingRequest({
|
|
320
322
|
channel: "whatsapp",
|
|
321
323
|
id,
|
|
@@ -11,7 +11,7 @@ const DEFAULT_WHATSAPP_MEDIA_MAX_MB = 50;
|
|
|
11
11
|
function listWhatsAppAuthDirs(cfg) {
|
|
12
12
|
const oauthDir = resolveOAuthDir();
|
|
13
13
|
const whatsappDir = path.join(oauthDir, "whatsapp");
|
|
14
|
-
const authDirs = new Set([oauthDir, path.join(whatsappDir, DEFAULT_ACCOUNT_ID)]);
|
|
14
|
+
const authDirs = /* @__PURE__ */ new Set([oauthDir, path.join(whatsappDir, DEFAULT_ACCOUNT_ID)]);
|
|
15
15
|
const accountIds = listConfiguredAccountIds(cfg);
|
|
16
16
|
for (const accountId of accountIds) authDirs.add(resolveWhatsAppAuthDir({
|
|
17
17
|
cfg,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-4YgwroRU.js";
|
|
2
2
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
|
|
3
|
-
import { g as resolveWhatsAppReactionLevel, r as sendReactionWhatsApp } from "./send-
|
|
3
|
+
import { g as resolveWhatsAppReactionLevel, r as sendReactionWhatsApp } from "./send-C5CpFcBG.js";
|
|
4
4
|
import { ToolAuthorizationError, createActionGate, jsonResult, readReactionParams, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
//#region extensions/whatsapp/src/action-runtime-target-auth.ts
|
|
6
6
|
function resolveAuthorizedWhatsAppOutboundTarget(params) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "./action-runtime-
|
|
1
|
+
import { t as handleWhatsAppAction } from "./action-runtime-DPahAqxV.js";
|
|
2
2
|
export { handleWhatsAppAction };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "./action-runtime-
|
|
1
|
+
import { t as handleWhatsAppAction } from "./action-runtime-DPahAqxV.js";
|
|
2
2
|
export { handleWhatsAppAction };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as getRegisteredWhatsAppConnectionController } from "./connection-controller-registry-TSX_udJp.js";
|
|
3
3
|
//#region extensions/whatsapp/src/active-listener.ts
|
|
4
4
|
function resolveWebAccountId(params) {
|
|
5
5
|
return (params.accountId ?? "").trim() || resolveDefaultWhatsAppAccountId(params.cfg);
|
package/dist/api.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
|
|
2
|
-
import { a as resolveWhatsAppAccount, i as listWhatsAppAuthDirs, n as hasAnyWhatsAppAuth, o as resolveWhatsAppAuthDir, r as listEnabledWhatsAppAccounts, s as resolveWhatsAppMediaMaxBytes, t as DEFAULT_WHATSAPP_MEDIA_MAX_MB } from "./accounts-
|
|
2
|
+
import { a as resolveWhatsAppAccount, i as listWhatsAppAuthDirs, n as hasAnyWhatsAppAuth, o as resolveWhatsAppAuthDir, r as listEnabledWhatsAppAccounts, s as resolveWhatsAppMediaMaxBytes, t as DEFAULT_WHATSAPP_MEDIA_MAX_MB } from "./accounts-4YgwroRU.js";
|
|
3
3
|
import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, r as isWhatsAppUserTarget, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
|
|
5
|
-
import "./send-
|
|
6
|
-
import { n as getStatusCode, t as formatError } from "./session-errors-
|
|
7
|
-
import { n as createWhatsAppSocketOperationTimeoutAdapter, t as DEFAULT_WHATSAPP_SOCKET_TIMING } from "./socket-timing-
|
|
8
|
-
import { c as
|
|
9
|
-
import { n as
|
|
5
|
+
import "./send-C5CpFcBG.js";
|
|
6
|
+
import { n as getStatusCode, t as formatError } from "./session-errors-BAj9D2La.js";
|
|
7
|
+
import { n as createWhatsAppSocketOperationTimeoutAdapter, t as DEFAULT_WHATSAPP_SOCKET_TIMING } from "./socket-timing-DhbVFjah.js";
|
|
8
|
+
import { c as toWhatsappJidWithLid, i as markdownToWhatsApp, n as isSelfChatMode, o as resolveJidToE164, r as jidToE164, s as toWhatsappJid, t as assertWebChannel } from "./targets-runtime-C-GiVn6Y.js";
|
|
9
|
+
import { n as normalizeE164, r as resolveUserPath } from "./text-runtime-DdX6-mC_.js";
|
|
10
|
+
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-BWp7h1uY.js";
|
|
10
11
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
|
|
11
|
-
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-
|
|
12
|
-
import "./config-schema-
|
|
13
|
-
import { t as whatsappSetupPlugin } from "./channel.setup-
|
|
12
|
+
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-DH-DFPLY.js";
|
|
13
|
+
import "./config-schema-mBX2nmn1.js";
|
|
14
|
+
import { t as whatsappSetupPlugin } from "./channel.setup-CURc5rEt.js";
|
|
14
15
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
|
|
15
16
|
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-Dijefxc3.js";
|
|
16
|
-
import { n as testing } from "./access-control-
|
|
17
|
-
import { _ as extractLocationData, b as extractText, d as normalizeMessageContent, f as resolveInboundMediaMimetype, h as extractContextInfo, p as describeReplyContext, t as createWebSendApi } from "./send-api-
|
|
18
|
-
import { r as waitForWaConnection, t as createWaSocket } from "./session-
|
|
17
|
+
import { n as testing } from "./access-control-DYE5dXna.js";
|
|
18
|
+
import { _ as extractLocationData, b as extractText, d as normalizeMessageContent, f as resolveInboundMediaMimetype, h as extractContextInfo, p as describeReplyContext, t as createWebSendApi } from "./send-api-DLlXl8CH.js";
|
|
19
|
+
import { r as waitForWaConnection, t as createWaSocket } from "./session-DriaHt7V.js";
|
|
19
20
|
import "openclaw/plugin-sdk/channel-actions";
|
|
20
21
|
import "openclaw/plugin-sdk/account-resolution";
|
|
21
22
|
import "openclaw/plugin-sdk/core";
|
|
22
23
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
23
24
|
import "openclaw/plugin-sdk/account-id";
|
|
24
25
|
import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
|
|
25
|
-
createLazyRuntimeModule(() => import("./channel.runtime-
|
|
26
|
+
createLazyRuntimeModule(() => import("./channel.runtime-CAssfx9p.js"));
|
|
26
27
|
//#endregion
|
|
27
28
|
//#region extensions/whatsapp/src/qa-driver.runtime.ts
|
|
28
29
|
function isRecord(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as normalizeWhatsAppMessagingTarget } from "./normalize-target-bVWjgftN.js";
|
|
2
|
-
import { f as registerWhatsAppApprovalReactionTarget, i as sendTypingWhatsApp, p as unregisterWhatsAppApprovalReactionTarget, t as sendMessageWhatsApp } from "./send-
|
|
2
|
+
import { f as registerWhatsAppApprovalReactionTarget, i as sendTypingWhatsApp, p as unregisterWhatsAppApprovalReactionTarget, t as sendMessageWhatsApp } from "./send-C5CpFcBG.js";
|
|
3
3
|
import "./normalize-Bxwqo-bW.js";
|
|
4
4
|
import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
|
|
5
5
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
package/dist/auth-presence.js
CHANGED
|
@@ -14,7 +14,7 @@ function listWhatsAppAuthDirs(cfg, env = process.env) {
|
|
|
14
14
|
const oauthDir = resolveOAuthDir(env);
|
|
15
15
|
const accountsRoot = path.join(oauthDir, "whatsapp");
|
|
16
16
|
const channel = cfg.channels?.whatsapp;
|
|
17
|
-
const authDirs = new Set([oauthDir, path.join(accountsRoot, DEFAULT_ACCOUNT_ID)]);
|
|
17
|
+
const authDirs = /* @__PURE__ */ new Set([oauthDir, path.join(accountsRoot, DEFAULT_ACCOUNT_ID)]);
|
|
18
18
|
addAccountAuthDirs(authDirs, DEFAULT_ACCOUNT_ID, void 0, accountsRoot, env);
|
|
19
19
|
if (channel?.defaultAccount?.trim()) addAccountAuthDirs(authDirs, channel.defaultAccount, channel.accounts?.[channel.defaultAccount]?.authDir, accountsRoot, env);
|
|
20
20
|
const accounts = channel?.accounts;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { a as readWebCredsJsonRawSync, c as statWebCredsFileSync, i as readWebCredsJsonRaw, o as resolveWebCredsBackupPath, s as resolveWebCredsPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-B1kSWtBg.js";
|
|
3
|
-
import { r as resolveUserPath } from "./text-runtime-
|
|
4
|
-
import { c as resolveComparableIdentity } from "./identity-
|
|
3
|
+
import { r as resolveUserPath } from "./text-runtime-DdX6-mC_.js";
|
|
4
|
+
import { c as resolveComparableIdentity } from "./identity-Dqft3mFA.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { resolveOAuthDir as resolveOAuthDir$1 } from "openclaw/plugin-sdk/state-paths";
|
|
7
7
|
import { replaceFileAtomic } from "openclaw/plugin-sdk/security-runtime";
|
|
@@ -10,6 +10,7 @@ import { defaultRuntime, getChildLogger, info, success } from "openclaw/plugin-s
|
|
|
10
10
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
11
11
|
import fs from "node:fs/promises";
|
|
12
12
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/routing";
|
|
13
|
+
import { enqueueKeyedTask } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
13
14
|
//#region extensions/whatsapp/src/creds-persistence.ts
|
|
14
15
|
const CREDS_FILE_MODE = 384;
|
|
15
16
|
const CREDS_SAVE_FLUSH_TIMEOUT_MS = 15e3;
|
|
@@ -41,12 +42,17 @@ async function writeCredsJsonAtomically(authDir, creds) {
|
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
44
|
function enqueueCredsSave(authDir, saveCreds, onError) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
enqueueKeyedTask({
|
|
46
|
+
tails: credsSaveQueues,
|
|
47
|
+
key: authDir,
|
|
48
|
+
task: async () => {
|
|
49
|
+
try {
|
|
50
|
+
await saveCreds();
|
|
51
|
+
} catch (error) {
|
|
52
|
+
onError(error);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
48
55
|
});
|
|
49
|
-
credsSaveQueues.set(authDir, next);
|
|
50
56
|
}
|
|
51
57
|
function waitForCredsSaveQueue(authDir) {
|
|
52
58
|
if (authDir) return credsSaveQueues.get(authDir) ?? Promise.resolve();
|
|
@@ -116,6 +122,14 @@ async function waitForWebAuthBarrier(authDir, context) {
|
|
|
116
122
|
}, "timed out waiting for queued WhatsApp creds save before auth read");
|
|
117
123
|
return result;
|
|
118
124
|
}
|
|
125
|
+
function isValidJson(raw) {
|
|
126
|
+
try {
|
|
127
|
+
JSON.parse(raw);
|
|
128
|
+
return true;
|
|
129
|
+
} catch {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
119
133
|
async function restoreCredsFromBackupIfNeeded(authDir) {
|
|
120
134
|
const logger = getChildLogger({ module: "web-session" });
|
|
121
135
|
try {
|
|
@@ -127,13 +141,9 @@ async function restoreCredsFromBackupIfNeeded(authDir) {
|
|
|
127
141
|
return false;
|
|
128
142
|
}
|
|
129
143
|
const raw = readCredsJsonRaw(credsPath);
|
|
130
|
-
if (raw)
|
|
131
|
-
JSON.parse(raw);
|
|
132
|
-
return false;
|
|
133
|
-
}
|
|
144
|
+
if (raw && isValidJson(raw)) return false;
|
|
134
145
|
const backupRaw = readCredsJsonRaw(backupPath);
|
|
135
|
-
if (!backupRaw) return false;
|
|
136
|
-
JSON.parse(backupRaw);
|
|
146
|
+
if (!backupRaw || !isValidJson(backupRaw)) return false;
|
|
137
147
|
await writeWebCredsRawAtomically({
|
|
138
148
|
filePath: credsPath,
|
|
139
149
|
content: backupRaw,
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-4YgwroRU.js";
|
|
2
|
+
import { t as getRegisteredWhatsAppConnectionController } from "./connection-controller-registry-TSX_udJp.js";
|
|
3
|
+
import { o as resolveJidToE164 } from "./targets-runtime-C-GiVn6Y.js";
|
|
4
|
+
import { createActionGate, stringEnum } from "openclaw/plugin-sdk/channel-actions";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { resolveOAuthDir } from "openclaw/plugin-sdk/state-paths";
|
|
7
|
+
import { normalizeE164 } from "openclaw/plugin-sdk/account-resolution";
|
|
8
|
+
import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";
|
|
9
|
+
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
10
|
+
import { Type } from "typebox";
|
|
11
|
+
import fs from "node:fs/promises";
|
|
12
|
+
import { mulawToPcm } from "openclaw/plugin-sdk/realtime-voice";
|
|
13
|
+
import { detectBinary } from "openclaw/plugin-sdk/setup-tools";
|
|
14
|
+
//#region extensions/whatsapp/src/agent-tools-call.ts
|
|
15
|
+
const MEOWCALLER_COMMAND = "meowcaller";
|
|
16
|
+
const SESSION_DATABASE = "wa-voip.db";
|
|
17
|
+
const MAX_AUDIO_DURATION_MS = 6e4;
|
|
18
|
+
const MIN_CALL_WINDOW_MS = 115e3;
|
|
19
|
+
const MAX_CALL_WINDOW_MS = 175e3;
|
|
20
|
+
const MAX_MESSAGE_LENGTH = 4e3;
|
|
21
|
+
const MAX_COMMAND_OUTPUT_BYTES = 64 * 1024;
|
|
22
|
+
const MEOWCALLER_ANSWER_TIMEOUT = "45s";
|
|
23
|
+
const MEOWCALLER_MAX_DURATION = "65s";
|
|
24
|
+
const activeCallAccounts = /* @__PURE__ */ new Set();
|
|
25
|
+
const WhatsAppCallToolSchema = Type.Object({
|
|
26
|
+
action: stringEnum(["status", "call"], { description: "Check MeowCaller setup or call the current WhatsApp requester" }),
|
|
27
|
+
message: Type.Optional(Type.String({
|
|
28
|
+
description: "Spoken message to play after the requester answers (maximum 60 seconds)",
|
|
29
|
+
maxLength: MAX_MESSAGE_LENGTH
|
|
30
|
+
}))
|
|
31
|
+
}, { additionalProperties: false });
|
|
32
|
+
const defaultDependencies = {
|
|
33
|
+
detectMeowCaller: () => detectBinary(MEOWCALLER_COMMAND),
|
|
34
|
+
resolveStateDir: (accountId) => path.join(resolveOAuthDir(), "whatsapp-calls", normalizeAccountId(accountId))
|
|
35
|
+
};
|
|
36
|
+
function jsonResult$1(payload) {
|
|
37
|
+
return {
|
|
38
|
+
content: [{
|
|
39
|
+
type: "text",
|
|
40
|
+
text: JSON.stringify(payload, null, 2)
|
|
41
|
+
}],
|
|
42
|
+
details: payload
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
async function isRegularFile(filePath) {
|
|
46
|
+
try {
|
|
47
|
+
return (await fs.stat(filePath)).isFile();
|
|
48
|
+
} catch {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function quotePosixShellArg(value) {
|
|
53
|
+
return `'${value.replaceAll("'", `'"'"'`)}'`;
|
|
54
|
+
}
|
|
55
|
+
function quotePowerShellArg(value) {
|
|
56
|
+
return `'${value.replaceAll("'", "''")}'`;
|
|
57
|
+
}
|
|
58
|
+
function resolveSetupCommand(stateDir, sessionStorePath, platform = process.platform) {
|
|
59
|
+
if (platform === "win32") return `meowcaller pair --store ${quotePowerShellArg(sessionStorePath)}`;
|
|
60
|
+
const quotedStateDir = quotePosixShellArg(stateDir);
|
|
61
|
+
return `mkdir -p ${quotedStateDir} && chmod 700 ${quotedStateDir} && meowcaller pair --store ${quotePosixShellArg(sessionStorePath)}`;
|
|
62
|
+
}
|
|
63
|
+
function wrapPcm16MonoInWav(pcm, sampleRate) {
|
|
64
|
+
if (!Number.isInteger(sampleRate) || sampleRate <= 0) throw new Error("TTS returned an invalid sample rate");
|
|
65
|
+
if (pcm.length === 0 || pcm.length % 2 !== 0) throw new Error("TTS returned invalid 16-bit PCM audio");
|
|
66
|
+
const header = Buffer.alloc(44);
|
|
67
|
+
header.write("RIFF", 0, "ascii");
|
|
68
|
+
header.writeUInt32LE(36 + pcm.length, 4);
|
|
69
|
+
header.write("WAVE", 8, "ascii");
|
|
70
|
+
header.write("fmt ", 12, "ascii");
|
|
71
|
+
header.writeUInt32LE(16, 16);
|
|
72
|
+
header.writeUInt16LE(1, 20);
|
|
73
|
+
header.writeUInt16LE(1, 22);
|
|
74
|
+
header.writeUInt32LE(sampleRate, 24);
|
|
75
|
+
header.writeUInt32LE(sampleRate * 2, 28);
|
|
76
|
+
header.writeUInt16LE(2, 32);
|
|
77
|
+
header.writeUInt16LE(16, 34);
|
|
78
|
+
header.write("data", 36, "ascii");
|
|
79
|
+
header.writeUInt32LE(pcm.length, 40);
|
|
80
|
+
return Buffer.concat([header, pcm]);
|
|
81
|
+
}
|
|
82
|
+
function normalizeTelephonyPcm(audio, outputFormat) {
|
|
83
|
+
const normalizedFormat = outputFormat?.trim().toLowerCase();
|
|
84
|
+
if (normalizedFormat?.startsWith("pcm")) return audio;
|
|
85
|
+
if (normalizedFormat === "ulaw_8000" || normalizedFormat === "raw-8khz-8bit-mono-mulaw") return mulawToPcm(audio);
|
|
86
|
+
throw new Error(`TTS returned unsupported telephony format: ${outputFormat ?? "unknown"}`);
|
|
87
|
+
}
|
|
88
|
+
function resolveCallWindowMs(pcmBytes, sampleRate) {
|
|
89
|
+
const audioDurationMs = pcmBytes / 2 / sampleRate * 1e3;
|
|
90
|
+
if (audioDurationMs > MAX_AUDIO_DURATION_MS) throw new Error("TTS audio exceeds the 60-second WhatsApp call limit");
|
|
91
|
+
return Math.min(MAX_CALL_WINDOW_MS, Math.ceil(audioDurationMs + MIN_CALL_WINDOW_MS));
|
|
92
|
+
}
|
|
93
|
+
async function resolveRequesterE164(params) {
|
|
94
|
+
const senderId = params.requesterSenderId.trim();
|
|
95
|
+
if (!senderId.includes("@")) try {
|
|
96
|
+
return normalizeE164(senderId.replace(/^whatsapp:/i, ""));
|
|
97
|
+
} catch {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
const account = resolveWhatsAppAccount({
|
|
101
|
+
cfg: params.cfg,
|
|
102
|
+
accountId: params.accountId
|
|
103
|
+
});
|
|
104
|
+
const lidLookup = getRegisteredWhatsAppConnectionController(params.accountId)?.getCurrentSock()?.signalRepository.lidMapping;
|
|
105
|
+
return await resolveJidToE164(senderId, {
|
|
106
|
+
authDir: account.authDir,
|
|
107
|
+
lidLookup
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
async function resolveLinkedWhatsAppSelfE164(params) {
|
|
111
|
+
const controller = getRegisteredWhatsAppConnectionController(params.accountId);
|
|
112
|
+
if (!controller) return null;
|
|
113
|
+
const identity = controller.getSelfIdentity();
|
|
114
|
+
if (!identity) return null;
|
|
115
|
+
if (identity.e164) return normalizeE164(identity.e164);
|
|
116
|
+
const account = resolveWhatsAppAccount({
|
|
117
|
+
cfg: params.cfg,
|
|
118
|
+
accountId: params.accountId
|
|
119
|
+
});
|
|
120
|
+
const lidLookup = controller.getCurrentSock()?.signalRepository.lidMapping;
|
|
121
|
+
return await resolveJidToE164(identity.jid ?? identity.lid, {
|
|
122
|
+
authDir: account.authDir,
|
|
123
|
+
lidLookup
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function resolveRuntimeConfig(api, context) {
|
|
127
|
+
return context.getRuntimeConfig?.() ?? context.runtimeConfig ?? context.config ?? api.config;
|
|
128
|
+
}
|
|
129
|
+
function createWhatsAppCallToolWithDependencies(api, context, dependencies) {
|
|
130
|
+
const cfg = resolveRuntimeConfig(api, context);
|
|
131
|
+
const isActionEnabled = createActionGate(cfg.channels?.whatsapp?.actions);
|
|
132
|
+
const requesterSenderId = context.requesterSenderId?.trim();
|
|
133
|
+
if (!isActionEnabled("calls", false) || context.messageChannel !== "whatsapp" || !requesterSenderId) return null;
|
|
134
|
+
const accountId = normalizeAccountId(context.agentAccountId);
|
|
135
|
+
const stateDir = dependencies.resolveStateDir(accountId);
|
|
136
|
+
const sessionStorePath = path.join(stateDir, SESSION_DATABASE);
|
|
137
|
+
return {
|
|
138
|
+
name: "whatsapp_call",
|
|
139
|
+
label: "WhatsApp Call",
|
|
140
|
+
description: "Call the current WhatsApp requester and play a synthesized spoken message. This tool cannot call arbitrary phone numbers.",
|
|
141
|
+
parameters: WhatsAppCallToolSchema,
|
|
142
|
+
async execute(_toolCallId, rawParams, signal) {
|
|
143
|
+
const params = rawParams;
|
|
144
|
+
const binaryFound = await dependencies.detectMeowCaller();
|
|
145
|
+
const sessionStoreFound = await isRegularFile(sessionStorePath);
|
|
146
|
+
if (params.action === "status") return jsonResult$1({
|
|
147
|
+
binaryFound,
|
|
148
|
+
sessionStoreFound,
|
|
149
|
+
accountId,
|
|
150
|
+
stateDir,
|
|
151
|
+
setupCommand: resolveSetupCommand(stateDir, sessionStorePath),
|
|
152
|
+
setupShell: process.platform === "win32" ? "PowerShell" : "POSIX shell",
|
|
153
|
+
requiredCommand: "meowcaller notify --store <path> --answer-timeout 45s --max-duration 65s <target> <file>",
|
|
154
|
+
note: "MeowCaller uses a separate WhatsApp linked-device session; it cannot reuse OpenClaw's Baileys credentials."
|
|
155
|
+
});
|
|
156
|
+
const message = params.message?.trim();
|
|
157
|
+
if (!message) throw new Error("message required for call action");
|
|
158
|
+
if (message.length > MAX_MESSAGE_LENGTH) throw new Error(`message must be at most ${MAX_MESSAGE_LENGTH} characters`);
|
|
159
|
+
if (!binaryFound) throw new Error("MeowCaller is not installed; run whatsapp_call with action=status");
|
|
160
|
+
if (!sessionStoreFound) throw new Error("MeowCaller has no session store; run whatsapp_call with action=status, then run its setupCommand in an interactive terminal and scan the QR as a linked device");
|
|
161
|
+
const target = await resolveRequesterE164({
|
|
162
|
+
accountId,
|
|
163
|
+
cfg,
|
|
164
|
+
requesterSenderId
|
|
165
|
+
});
|
|
166
|
+
if (!target) throw new Error("Could not resolve the current WhatsApp requester to a phone number");
|
|
167
|
+
if (await resolveLinkedWhatsAppSelfE164({
|
|
168
|
+
accountId,
|
|
169
|
+
cfg
|
|
170
|
+
}) === target) throw new Error("WhatsApp cannot call the linked account itself; use a dedicated OpenClaw WhatsApp number");
|
|
171
|
+
if (activeCallAccounts.has(accountId)) throw new Error("A WhatsApp call is already active for this account");
|
|
172
|
+
activeCallAccounts.add(accountId);
|
|
173
|
+
try {
|
|
174
|
+
const speech = await api.runtime.tts.textToSpeechTelephony({
|
|
175
|
+
text: message,
|
|
176
|
+
cfg
|
|
177
|
+
});
|
|
178
|
+
if (!speech.success || !speech.audioBuffer || !speech.sampleRate) throw new Error(speech.error ?? "TTS synthesis failed");
|
|
179
|
+
const pcm = normalizeTelephonyPcm(speech.audioBuffer, speech.outputFormat);
|
|
180
|
+
const callWindowMs = resolveCallWindowMs(pcm.length, speech.sampleRate);
|
|
181
|
+
const tempDir = await fs.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), "openclaw-whatsapp-call-"));
|
|
182
|
+
const audioPath = path.join(tempDir, "message.wav");
|
|
183
|
+
try {
|
|
184
|
+
await fs.writeFile(audioPath, wrapPcm16MonoInWav(pcm, speech.sampleRate), { mode: 384 });
|
|
185
|
+
const result = await api.runtime.system.runCommandWithTimeout([
|
|
186
|
+
MEOWCALLER_COMMAND,
|
|
187
|
+
"notify",
|
|
188
|
+
"--store",
|
|
189
|
+
sessionStorePath,
|
|
190
|
+
"--answer-timeout",
|
|
191
|
+
MEOWCALLER_ANSWER_TIMEOUT,
|
|
192
|
+
"--max-duration",
|
|
193
|
+
MEOWCALLER_MAX_DURATION,
|
|
194
|
+
target,
|
|
195
|
+
audioPath
|
|
196
|
+
], {
|
|
197
|
+
cwd: stateDir,
|
|
198
|
+
env: { MEOW_LOG_LEVEL: "warn" },
|
|
199
|
+
timeoutMs: callWindowMs,
|
|
200
|
+
signal,
|
|
201
|
+
killProcessTree: true,
|
|
202
|
+
maxOutputBytes: MAX_COMMAND_OUTPUT_BYTES
|
|
203
|
+
});
|
|
204
|
+
if (result.termination === "signal") throw new Error("WhatsApp call cancelled");
|
|
205
|
+
if (result.termination === "timeout") throw new Error("MeowCaller exceeded the bounded WhatsApp call window");
|
|
206
|
+
if (result.termination !== "exit" || result.code !== 0) throw new Error(`MeowCaller did not complete the call (code ${result.code ?? "unknown"})`);
|
|
207
|
+
return jsonResult$1({
|
|
208
|
+
completed: true,
|
|
209
|
+
recipient: "current WhatsApp requester",
|
|
210
|
+
callWindowSeconds: Math.ceil(callWindowMs / 1e3),
|
|
211
|
+
ttsProvider: speech.provider,
|
|
212
|
+
note: "MeowCaller completed answer, playback, and hangup for the requester-bound call."
|
|
213
|
+
});
|
|
214
|
+
} finally {
|
|
215
|
+
await fs.rm(tempDir, {
|
|
216
|
+
recursive: true,
|
|
217
|
+
force: true
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
} finally {
|
|
221
|
+
activeCallAccounts.delete(accountId);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function createWhatsAppCallTool(api, context) {
|
|
227
|
+
return createWhatsAppCallToolWithDependencies(api, context, defaultDependencies);
|
|
228
|
+
}
|
|
229
|
+
function registerWhatsAppCallTool(api) {
|
|
230
|
+
api.registerTool((context) => createWhatsAppCallTool(api, context), { name: "whatsapp_call" });
|
|
231
|
+
}
|
|
232
|
+
//#endregion
|
|
233
|
+
export { registerWhatsAppCallTool };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
|
|
2
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
2
|
+
import { a as resolveWhatsAppAccount } from "./accounts-4YgwroRU.js";
|
|
3
3
|
import { c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, n as isWhatsAppNewsletterJid, o as normalizeWhatsAppAllowFromEntry, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
|
|
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-
|
|
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-C5CpFcBG.js";
|
|
6
6
|
import "./normalize-Bxwqo-bW.js";
|
|
7
7
|
import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
|
|
8
|
-
import {
|
|
8
|
+
import { s as toWhatsappJid } from "./targets-runtime-C-GiVn6Y.js";
|
|
9
|
+
import "./text-runtime-DdX6-mC_.js";
|
|
9
10
|
import { t as createWhatsAppLoginTool } from "./agent-tools-login-BX7eHgDm.js";
|
|
10
|
-
import {
|
|
11
|
+
import { s as lookupInboundMessageMetaForTarget, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-BhC1RQOE.js";
|
|
11
12
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
|
|
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-
|
|
13
|
-
import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-
|
|
13
|
+
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-DH-DFPLY.js";
|
|
14
|
+
import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-Db-wfApd.js";
|
|
14
15
|
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-D_BmQUR9.js";
|
|
15
16
|
import { createActionGate as createActionGate$1 } from "openclaw/plugin-sdk/channel-actions";
|
|
16
17
|
import { DEFAULT_ACCOUNT_ID, listCombinedAccountIds, normalizeOptionalAccountId, resolveListedDefaultAccountId } from "openclaw/plugin-sdk/account-core";
|
|
@@ -28,7 +29,7 @@ import { createChannelApprovalCapability } from "openclaw/plugin-sdk/approval-de
|
|
|
28
29
|
import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
29
30
|
import { createChannelApproverDmTargetResolver, createChannelNativeOriginTargetResolver, createNativeApprovalChannelRouteGates, createNativeApprovalForwardingFallbackSuppressor } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
30
31
|
import { chunkText } from "openclaw/plugin-sdk/reply-chunking";
|
|
31
|
-
import { createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
32
|
+
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
32
33
|
import { sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
33
34
|
//#region extensions/whatsapp/src/approval-native.ts
|
|
34
35
|
const DEFAULT_APPROVAL_FORWARDING_MODE = "session";
|
|
@@ -205,7 +206,7 @@ const whatsappApprovalCapability = createChannelApprovalCapability({
|
|
|
205
206
|
accountId,
|
|
206
207
|
request
|
|
207
208
|
}),
|
|
208
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
209
|
+
load: async () => (await import("./approval-handler.runtime-DNWS4aYQ.js")).whatsappApprovalNativeRuntime
|
|
209
210
|
})
|
|
210
211
|
});
|
|
211
212
|
//#endregion
|
|
@@ -299,11 +300,12 @@ function createWhatsAppOutboundBase({ chunker, sendMessageWhatsApp, sendPollWhat
|
|
|
299
300
|
resolveTarget,
|
|
300
301
|
...createAttachedChannelResultAdapter({
|
|
301
302
|
channel: "whatsapp",
|
|
302
|
-
sendText: async ({ cfg, to, text, accountId, deps, gifPlayback, replyToId }) => {
|
|
303
|
+
sendText: async ({ cfg, to, text, accountId, deps, gifPlayback, replyToId, onDeliveryResult }) => {
|
|
303
304
|
const normalizedText = normalizeText(text);
|
|
304
305
|
if (skipEmptyText && !normalizedText) return { messageId: "" };
|
|
306
|
+
const lookupAccountId = resolveQuoteLookupAccountId(cfg, accountId);
|
|
305
307
|
const quotedMessageKey = resolveQuotedMessageKey({
|
|
306
|
-
accountId:
|
|
308
|
+
accountId: lookupAccountId,
|
|
307
309
|
to,
|
|
308
310
|
replyToId
|
|
309
311
|
});
|
|
@@ -312,12 +314,16 @@ function createWhatsAppOutboundBase({ chunker, sendMessageWhatsApp, sendPollWhat
|
|
|
312
314
|
cfg,
|
|
313
315
|
accountId: accountId ?? void 0,
|
|
314
316
|
gifPlayback,
|
|
315
|
-
quotedMessageKey
|
|
317
|
+
...quotedMessageKey ? { quotedMessageKey } : {},
|
|
318
|
+
...onDeliveryResult ? { onDeliveryResult: async (result) => {
|
|
319
|
+
await onDeliveryResult(attachChannelToResult("whatsapp", result));
|
|
320
|
+
} } : {}
|
|
316
321
|
});
|
|
317
322
|
},
|
|
318
|
-
sendMedia: async ({ cfg, to, text, mediaUrl, mediaAccess, mediaLocalRoots, mediaReadFile, audioAsVoice, accountId, deps, gifPlayback, forceDocument, replyToId }) => {
|
|
323
|
+
sendMedia: async ({ cfg, to, text, mediaUrl, mediaAccess, mediaLocalRoots, mediaReadFile, audioAsVoice, accountId, deps, gifPlayback, forceDocument, replyToId, onDeliveryResult }) => {
|
|
324
|
+
const lookupAccountId = resolveQuoteLookupAccountId(cfg, accountId);
|
|
319
325
|
const quotedMessageKey = resolveQuotedMessageKey({
|
|
320
|
-
accountId:
|
|
326
|
+
accountId: lookupAccountId,
|
|
321
327
|
to,
|
|
322
328
|
replyToId
|
|
323
329
|
});
|
|
@@ -332,7 +338,10 @@ function createWhatsAppOutboundBase({ chunker, sendMessageWhatsApp, sendPollWhat
|
|
|
332
338
|
accountId: accountId ?? void 0,
|
|
333
339
|
gifPlayback,
|
|
334
340
|
forceDocument,
|
|
335
|
-
quotedMessageKey
|
|
341
|
+
...quotedMessageKey ? { quotedMessageKey } : {},
|
|
342
|
+
...onDeliveryResult ? { onDeliveryResult: async (result) => {
|
|
343
|
+
await onDeliveryResult(attachChannelToResult("whatsapp", result));
|
|
344
|
+
} } : {}
|
|
336
345
|
});
|
|
337
346
|
},
|
|
338
347
|
sendPoll: async ({ cfg, to, poll, accountId }) => await sendPollWhatsApp(to, poll, {
|
|
@@ -422,7 +431,14 @@ const whatsappMessageAdapter = defineChannelMessageAdapter({
|
|
|
422
431
|
replyTo: true,
|
|
423
432
|
messageSendingHooks: true
|
|
424
433
|
} },
|
|
425
|
-
send: { text: async (
|
|
434
|
+
send: { text: async ({ onDeliveryResult, ...ctx }) => {
|
|
435
|
+
return toWhatsAppMessageSendResult(await whatsappChannelOutbound.sendText({
|
|
436
|
+
...ctx,
|
|
437
|
+
onDeliveryResult: onDeliveryResult ? async (progress) => {
|
|
438
|
+
await onDeliveryResult(toWhatsAppMessageSendResult(progress, ctx.replyToId));
|
|
439
|
+
} : void 0
|
|
440
|
+
}), ctx.replyToId);
|
|
441
|
+
} }
|
|
426
442
|
});
|
|
427
443
|
//#endregion
|
|
428
444
|
//#region extensions/whatsapp/src/heartbeat.ts
|
|
@@ -461,11 +477,12 @@ function resolveWhatsAppOutboundSessionRoute(params) {
|
|
|
461
477
|
const isGroup = isWhatsAppGroupJid(normalized);
|
|
462
478
|
const isNewsletter = isWhatsAppNewsletterJid(normalized);
|
|
463
479
|
const chatType = isGroup ? "group" : isNewsletter ? "channel" : "direct";
|
|
464
|
-
|
|
480
|
+
const route = buildChannelOutboundSessionRoute({
|
|
465
481
|
cfg: params.cfg,
|
|
466
482
|
agentId: params.agentId,
|
|
467
483
|
channel: "whatsapp",
|
|
468
484
|
accountId: params.accountId,
|
|
485
|
+
recipientSessionExact: true,
|
|
469
486
|
peer: {
|
|
470
487
|
kind: chatType,
|
|
471
488
|
id: normalized
|
|
@@ -474,6 +491,13 @@ function resolveWhatsAppOutboundSessionRoute(params) {
|
|
|
474
491
|
from: normalized,
|
|
475
492
|
to: normalized
|
|
476
493
|
});
|
|
494
|
+
return isGroup ? {
|
|
495
|
+
...route,
|
|
496
|
+
sessionKey: resolveWhatsAppGroupSessionKey({
|
|
497
|
+
sessionKey: route.sessionKey,
|
|
498
|
+
accountId: params.accountId
|
|
499
|
+
})
|
|
500
|
+
} : route;
|
|
477
501
|
}
|
|
478
502
|
//#endregion
|
|
479
503
|
//#region extensions/whatsapp/src/status-issues.ts
|
|
@@ -601,7 +625,7 @@ function collectWhatsAppStatusIssues(accounts) {
|
|
|
601
625
|
//#endregion
|
|
602
626
|
//#region extensions/whatsapp/src/channel.ts
|
|
603
627
|
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-Dijefxc3.js").then((n) => n.t));
|
|
604
|
-
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-
|
|
628
|
+
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-CKJHL_Wf.js"));
|
|
605
629
|
function resolveWhatsAppTargetInfo(raw) {
|
|
606
630
|
const normalized = normalizeWhatsAppTarget(raw);
|
|
607
631
|
if (!normalized) return null;
|
|
@@ -795,7 +819,8 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
795
819
|
busy: snapshot.busy ?? false,
|
|
796
820
|
lastRunActivityAt: snapshot.lastRunActivityAt ?? null,
|
|
797
821
|
lastError: snapshot.lastError ?? null,
|
|
798
|
-
healthState: snapshot.healthState ?? void 0
|
|
822
|
+
healthState: snapshot.healthState ?? void 0,
|
|
823
|
+
...snapshot.terminalDisconnect ? { terminalDisconnect: snapshot.terminalDisconnect } : {}
|
|
799
824
|
};
|
|
800
825
|
},
|
|
801
826
|
resolveAccountSnapshot: async ({ account, runtime }) => {
|
|
@@ -818,6 +843,7 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
818
843
|
busy: runtime?.busy ?? false,
|
|
819
844
|
lastRunActivityAt: runtime?.lastRunActivityAt ?? null,
|
|
820
845
|
healthState: runtime?.healthState ?? void 0,
|
|
846
|
+
...runtime?.terminalDisconnect ? { terminalDisconnect: runtime.terminalDisconnect } : {},
|
|
821
847
|
dmPolicy: account.dmPolicy,
|
|
822
848
|
allowFrom: account.allowFrom
|
|
823
849
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WhatsAppChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as WhatsAppChannelConfigSchema } from "./config-schema-mBX2nmn1.js";
|
|
2
2
|
export { WhatsAppChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappPlugin } from "./channel-
|
|
1
|
+
import { t as whatsappPlugin } from "./channel-BWp7h1uY.js";
|
|
2
2
|
export { whatsappPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-4YgwroRU.js";
|
|
2
2
|
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
|
|
3
|
-
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-
|
|
4
|
-
import { t as sendMessageWhatsApp } from "./send-
|
|
3
|
+
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-DPahAqxV.js";
|
|
4
|
+
import { t as sendMessageWhatsApp } from "./send-C5CpFcBG.js";
|
|
5
5
|
import "./normalize-Bxwqo-bW.js";
|
|
6
6
|
import { jsonResult, readStringOrNumberParam, readStringParam as readStringParam$1, resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
7
7
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
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-
|
|
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-
|
|
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-Db-wfApd.js";
|
|
3
|
+
import { t as getActiveWebListener$1 } from "./active-listener-B4SDebQ6.js";
|
|
4
|
+
import { t as monitorWebChannel$1 } from "./monitor-DD8bXohk.js";
|
|
5
|
+
import { t as loginWeb$1 } from "./login-C48y0jlx.js";
|
|
6
|
+
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-DlWb0Z09.js";
|
|
7
7
|
//#region extensions/whatsapp/src/channel.runtime.ts
|
|
8
8
|
function getActiveWebListener(...args) {
|
|
9
9
|
return getActiveWebListener$1(...args);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-
|
|
1
|
+
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-DH-DFPLY.js";
|
|
2
2
|
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-D_BmQUR9.js";
|
|
3
3
|
//#region extensions/whatsapp/src/channel.setup.ts
|
|
4
4
|
async function isWhatsAppAuthConfigured(account) {
|
|
5
|
-
const { readWebAuthState } = await import("./auth-store-
|
|
5
|
+
const { readWebAuthState } = await import("./auth-store-Db-wfApd.js").then((n) => n.i);
|
|
6
6
|
return await readWebAuthState(account.authDir) === "linked";
|
|
7
7
|
}
|
|
8
8
|
const whatsappSetupPlugin = {
|