@openclaw/whatsapp 2026.9.4 → 2026.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/activity.svg +40 -0
- package/assets/icon.png +0 -0
- package/dist/{accounts-CiKHiuEe.js → .setup/accounts-D_NGDjCx.mjs} +2 -2
- package/dist/{action-runtime-CRZLhN3f.js → .setup/action-runtime-DZZFamfl.mjs} +3 -3
- package/dist/{active-listener-BEjWsCNM.js → .setup/active-listener-CDjoX9QR.mjs} +2 -2
- package/dist/{agent-tools-login-B-2qZPzc.js → .setup/agent-tools-login-CL5C1rA2.mjs} +7 -3
- package/dist/{approval-handler.runtime-DGJEaoqh.js → .setup/approval-handler.runtime-C0hzmMSj.mjs} +12 -12
- package/dist/{approval-reactions-DSFH6Mtx.js → .setup/approval-reactions-BnXw-UZI.mjs} +13 -13
- package/dist/{auth-store-ZWaclAbd.js → .setup/auth-store-Dh8a3cba.mjs} +5 -5
- package/dist/{channel-CzEIEZqG.js → .setup/channel-Bg_fS2iF.mjs} +20 -29
- package/dist/{channel-react-action-CHeJSG9F.js → .setup/channel-react-action-1iBiEnq7.mjs} +5 -5
- package/dist/.setup/channel.runtime-rurG-kbr.mjs +16 -0
- package/dist/.setup/channel.setup-C8P5q8uD.mjs +5 -0
- package/dist/{connection-controller-DNp6U1NN.js → .setup/connection-controller-C60mU7j7.mjs} +5 -5
- package/dist/{connection-controller-runtime-context-DG0tuYuw.js → .setup/connection-controller-runtime-context-hgLJoRc8.mjs} +1 -1
- package/dist/{directory-config-CoWFw1zn.js → .setup/directory-config-BHPoBklt.mjs} +8 -8
- package/dist/{group-session-key-BmVDSPr1.js → .setup/group-session-key-D22hYMdE.mjs} +5 -5
- package/dist/.setup/legacy-session-surface-api-B2szjq4r.mjs +2 -0
- package/dist/{login-6j2iP9nR.js → .setup/login-2dmd1TfE.mjs} +5 -5
- package/dist/{login-qr-DRFgI6k1.js → .setup/login-qr-CgKtO_ef.mjs} +6 -6
- package/dist/{monitor-DaIAK4fT.js → .setup/monitor-By82ehLA.mjs} +90 -77
- package/dist/.setup/normalize-DdsROMMa.mjs +2 -0
- package/dist/{normalize-target-CugRyONv.js → .setup/normalize-target-BGra1ZnM.mjs} +8 -30
- package/dist/{question-reactions-bbe0Qnjn.js → .setup/question-reactions-D3Zq9Gbn.mjs} +2 -2
- package/dist/{resolve-outbound-target-1GqbT1uX.js → .setup/resolve-outbound-target-C2eUvsTc.mjs} +1 -1
- package/dist/{send-BDDGPxav.js → .setup/send-C6jDmcL9.mjs} +7 -7
- package/dist/{send-api-C_Zn4Ij-.js → .setup/send-api-B4DOt2RJ.mjs} +7 -7
- package/dist/{session.runtime-Nsqaehbd.js → .setup/session.runtime-DcJuO42v.mjs} +1 -1
- package/dist/{setup-finalize-CZ6fHFFU.js → .setup/setup-finalize-pGqWOiFX.mjs} +6 -6
- package/dist/.setup/setup-plugin-api-2wUapweU.mjs +3 -0
- package/dist/{setup-surface-CnK_PPiA.js → .setup/setup-surface-B9CYwDPZ.mjs} +4 -4
- package/dist/{shared-CLKLJLgY.js → .setup/shared-DVgQ8kRG.mjs} +47 -50
- package/dist/{socket-close-B3X9uerq.js → .setup/socket-close-CCVSFufF.mjs} +4 -4
- package/dist/{text-runtime-DyfmcATV.js → .setup/text-runtime-CHl0iPYe.mjs} +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/agent-tools-api.js +4 -4
- package/dist/api.js +15 -15
- 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/contract-api.js +5 -5
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +2 -2
- package/dist/legacy-session-surface-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 +13 -13
- package/dist/runtime-setter-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -2
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/audio-decode/node_modules/@thi.ng/bitstream/README.md +1 -1
- package/node_modules/audio-decode/node_modules/@thi.ng/bitstream/package.json +5 -5
- package/node_modules/audio-decode/node_modules/@thi.ng/errors/README.md +1 -1
- package/node_modules/audio-decode/node_modules/@thi.ng/errors/package.json +5 -5
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/flac/dist/flac-decoder.min.js +1 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/flac/dist/flac-decoder.min.js.map +1 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/flac/package.json +1 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/flac/src/FLACDecoder.js +6 -6
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/flac/src/FLACDecoderWebWorker.js +2 -2
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js +11603 -11540
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js.map +1 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/package.json +1 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/EmscriptenWasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/types.d.ts +1 -5
- package/node_modules/audio-decode/node_modules/audio-type/audio-type.js +156 -2
- package/node_modules/audio-decode/node_modules/audio-type/package.json +23 -2
- package/node_modules/audio-decode/node_modules/audio-type/readme.md +40 -2
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/README.md +1 -1
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js +3 -3
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js.map +1 -1
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js +0 -0
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js.map +1 -1
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/package.json +8 -8
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoder.js +1 -1
- package/node_modules/audio-decode/node_modules/opus-decoder/README.md +1 -1
- package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js +3 -3
- package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js.map +1 -1
- package/node_modules/audio-decode/node_modules/opus-decoder/package.json +1 -1
- package/node_modules/audio-decode/node_modules/opus-decoder/types.d.ts +1 -5
- package/node_modules/baileys/node_modules/file-type/package.json +3 -2
- package/node_modules/baileys/node_modules/file-type/readme.md +3 -0
- package/node_modules/baileys/node_modules/file-type/source/index.js +28 -1
- package/node_modules/baileys/node_modules/file-type/source/supported.js +2 -0
- package/node_modules/baileys/node_modules/p-timeout/index.js +3 -0
- package/node_modules/baileys/node_modules/p-timeout/package.json +1 -1
- package/node_modules/baileys/node_modules/protobufjs/README.md +24 -17
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.js +124 -14
- 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 +63 -9
- 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 +133 -18
- 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.generated.d.ts +7 -0
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor.js +24 -0
- package/node_modules/baileys/node_modules/protobufjs/ext/protojson.js +14 -4
- package/node_modules/baileys/node_modules/protobufjs/ext/textformat.js +8 -4
- package/node_modules/baileys/node_modules/protobufjs/google/protobuf/descriptor.json +20 -1
- package/node_modules/baileys/node_modules/protobufjs/google/protobuf/descriptor.proto +14 -1
- package/node_modules/baileys/node_modules/protobufjs/index.d.ts +12 -0
- package/node_modules/baileys/node_modules/protobufjs/package.json +1 -1
- package/node_modules/baileys/node_modules/protobufjs/src/decoder.js +31 -2
- package/node_modules/baileys/node_modules/protobufjs/src/enum.js +10 -0
- package/node_modules/baileys/node_modules/protobufjs/src/object.js +5 -2
- package/node_modules/baileys/node_modules/protobufjs/src/parse.js +9 -4
- package/node_modules/baileys/node_modules/protobufjs/src/reader.js +61 -7
- package/node_modules/baileys/node_modules/protobufjs/src/type.js +10 -0
- package/node_modules/baileys/node_modules/protobufjs/src/wrappers.js +5 -1
- package/node_modules/typebox/build/compile/validator.d.mts +1 -1
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
- package/node_modules/typebox/build/format/iri.mjs +5 -1
- package/node_modules/typebox/build/guard/emit.mjs +2 -4
- package/node_modules/typebox/build/guard/guard.mjs +6 -18
- package/node_modules/typebox/build/guard/string.mjs +16 -24
- package/node_modules/typebox/build/schema/build.mjs +2 -2
- package/node_modules/typebox/build/schema/check.mjs +1 -1
- package/node_modules/typebox/build/schema/compile.d.mts +3 -2
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
- package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
- package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
- package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
- package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
- package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
- package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
- package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
- package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
- package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
- package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
- package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
- package/node_modules/typebox/build/schema/errors.d.mts +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +8 -14
- package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
- package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
- package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
- package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
- package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
- package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
- package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
- package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
- package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
- package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
- package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
- package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
- package/node_modules/typebox/build/schema/parse.d.mts +1 -0
- package/node_modules/typebox/build/schema/parse.mjs +10 -5
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
- package/node_modules/typebox/build/schema/schema.d.mts +2 -0
- package/node_modules/typebox/build/schema/schema.mjs +2 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
- package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +59 -89
- package/openclaw.plugin.json +11 -2
- package/package.json +7 -5
- package/dist/channel.runtime-BFiZ9WhU.js +0 -55
- package/dist/channel.setup-gIWoRLzt.js +0 -14
- package/dist/normalize-C7Hkc_vE.js +0 -2
- /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/{config-schema-BYA6e_Ii.js → .setup/config-schema-BYA6e_Ii.mjs} +0 -0
- /package/dist/{constants-C7m81BNe.js → .setup/constants-C7m81BNe.mjs} +0 -0
- /package/dist/{creds-files-Drg3usj1.js → .setup/creds-files-Drg3usj1.mjs} +0 -0
- /package/dist/{doctor-BPb-SjdE.js → .setup/doctor-BPb-SjdE.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/{runtime-BLlToOi6.js → .setup/runtime-BLlToOi6.mjs} +0 -0
- /package/dist/{runtime-group-policy-DeSRFXEV.js → .setup/runtime-group-policy-DeSRFXEV.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/dist/{session-errors-JuazczrA.js → .setup/session-errors-JuazczrA.mjs} +0 -0
- /package/dist/{targets-runtime-RBjx3pg_.js → .setup/targets-runtime-RBjx3pg_.mjs} +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-
|
|
2
|
-
import { c as normalizeWhatsAppPayloadTextPreservingIndentation, d as listWhatsAppSendResultMessageIds, f as mergeWhatsAppAcceptedSendError, g as withWhatsAppLogicalDeliveryActivity, h as rememberWhatsAppPartialSend, l as prepareWhatsAppOutboundMedia, m as rememberWhatsAppAcceptedSend, o as normalizeWhatsAppOutboundPayload, p as normalizeWhatsAppSendResult, r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-
|
|
3
|
-
import { i as getWhatsAppRuntime } from "./runtime-BLlToOi6.
|
|
4
|
-
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-
|
|
5
|
-
import { a as markdownToWhatsAppChunks, c as toWhatsappJid, l as toWhatsappJidWithLid, n as isSelfChatMode, o as resolveEquivalentWhatsAppDirectChatJids, r as jidToE164, s as resolveJidToE164 } from "./targets-runtime-RBjx3pg_.
|
|
6
|
-
import { t as normalizeE164 } from "./text-runtime-
|
|
7
|
-
import { a as cacheInboundMessageMeta, i as buildQuotedMessageOptions, n as resolveWhatsAppGroupSessionRoute, o as lookupInboundMessageMeta, r as resolveWhatsAppLegacyGroupSessionKey } from "./group-session-key-
|
|
8
|
-
import { C as getMentionIdentities, D as getSenderIdentity, E as getSelfIdentity, O as identitiesOverlap, S as getComparableIdentityValues, T as getReplyContext, g as readWebSelfId, k as resolveComparableIdentity, o as getWebAuthAgeMs, r as WhatsAppAuthUnstableError, v as readWebSelfIdentityForDecision, w as getPrimaryIdentityId } from "./auth-store-
|
|
9
|
-
import { n as resolveWhatsAppGroupsConfigPath } from "./group-config-path-BGyzT9Lg.
|
|
10
|
-
import { a as waitForWaConnection, c as isWhatsAppSocketOperationTimeoutError, d as withWhatsAppSocketOperationTimeout, l as resolveWhatsAppSocketOperationTimeoutMs, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter, u as resolveWhatsAppSocketTiming } from "./socket-close-
|
|
11
|
-
import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.
|
|
12
|
-
import { t as BufferJSON } from "./session.runtime-
|
|
13
|
-
import { _ as resolveInboundMediaMimetype, a as addWhatsAppImagePreviewFields, c as extractContextInfo, d as extractMediaKind, f as extractMentionedJids, g as projectWhatsAppInboundMessage, h as hasInboundUserContent, i as resolveWhatsAppOutboundMentions, l as extractExternalAdReplyContext, n as addWhatsAppOutboundMentionsToContent, o as describeReplyContext, p as extractText, r as mayContainWhatsAppOutboundMention, s as extractContactContext, t as createWebSendApi, u as extractLocationData } from "./send-api-
|
|
14
|
-
import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-DeSRFXEV.
|
|
15
|
-
import { c as computeBackoff, d as resolveReconnectPolicy, f as sleepWithAbort, l as newConnectionId, n as WHATSAPP_WATCHDOG_TIMEOUT_ERROR, r as WhatsAppConnectionController, s as DEFAULT_RECONNECT_POLICY, u as resolveHeartbeatSeconds } from "./connection-controller-
|
|
16
|
-
import { n as maybeResolveWhatsAppApprovalReaction } from "./approval-reactions-
|
|
17
|
-
import { t as maybeResolveWhatsAppQuestionReaction } from "./question-reactions-
|
|
1
|
+
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-D_NGDjCx.mjs";
|
|
2
|
+
import { c as normalizeWhatsAppPayloadTextPreservingIndentation, d as listWhatsAppSendResultMessageIds, f as mergeWhatsAppAcceptedSendError, g as withWhatsAppLogicalDeliveryActivity, h as rememberWhatsAppPartialSend, l as prepareWhatsAppOutboundMedia, m as rememberWhatsAppAcceptedSend, o as normalizeWhatsAppOutboundPayload, p as normalizeWhatsAppSendResult, r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-C6jDmcL9.mjs";
|
|
3
|
+
import { i as getWhatsAppRuntime, r as getWhatsAppChannelRuntime } from "./runtime-BLlToOi6.mjs";
|
|
4
|
+
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-hgLJoRc8.mjs";
|
|
5
|
+
import { a as markdownToWhatsAppChunks, c as toWhatsappJid, l as toWhatsappJidWithLid, n as isSelfChatMode, o as resolveEquivalentWhatsAppDirectChatJids, r as jidToE164, s as resolveJidToE164 } from "./targets-runtime-RBjx3pg_.mjs";
|
|
6
|
+
import { t as normalizeE164 } from "./text-runtime-CHl0iPYe.mjs";
|
|
7
|
+
import { a as cacheInboundMessageMeta, i as buildQuotedMessageOptions, n as resolveWhatsAppGroupSessionRoute, o as lookupInboundMessageMeta, r as resolveWhatsAppLegacyGroupSessionKey } from "./group-session-key-D22hYMdE.mjs";
|
|
8
|
+
import { C as getMentionIdentities, D as getSenderIdentity, E as getSelfIdentity, O as identitiesOverlap, S as getComparableIdentityValues, T as getReplyContext, g as readWebSelfId, k as resolveComparableIdentity, o as getWebAuthAgeMs, r as WhatsAppAuthUnstableError, v as readWebSelfIdentityForDecision, w as getPrimaryIdentityId } from "./auth-store-Dh8a3cba.mjs";
|
|
9
|
+
import { n as resolveWhatsAppGroupsConfigPath } from "./group-config-path-BGyzT9Lg.mjs";
|
|
10
|
+
import { a as waitForWaConnection, c as isWhatsAppSocketOperationTimeoutError, d as withWhatsAppSocketOperationTimeout, l as resolveWhatsAppSocketOperationTimeoutMs, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter, u as resolveWhatsAppSocketTiming } from "./socket-close-CCVSFufF.mjs";
|
|
11
|
+
import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.mjs";
|
|
12
|
+
import { t as BufferJSON } from "./session.runtime-DcJuO42v.mjs";
|
|
13
|
+
import { _ as resolveInboundMediaMimetype, a as addWhatsAppImagePreviewFields, c as extractContextInfo, d as extractMediaKind, f as extractMentionedJids, g as projectWhatsAppInboundMessage, h as hasInboundUserContent, i as resolveWhatsAppOutboundMentions, l as extractExternalAdReplyContext, n as addWhatsAppOutboundMentionsToContent, o as describeReplyContext, p as extractText, r as mayContainWhatsAppOutboundMention, s as extractContactContext, t as createWebSendApi, u as extractLocationData } from "./send-api-B4DOt2RJ.mjs";
|
|
14
|
+
import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-DeSRFXEV.mjs";
|
|
15
|
+
import { c as computeBackoff, d as resolveReconnectPolicy, f as sleepWithAbort, l as newConnectionId, n as WHATSAPP_WATCHDOG_TIMEOUT_ERROR, r as WhatsAppConnectionController, s as DEFAULT_RECONNECT_POLICY, u as resolveHeartbeatSeconds } from "./connection-controller-C60mU7j7.mjs";
|
|
16
|
+
import { n as maybeResolveWhatsAppApprovalReaction } from "./approval-reactions-BnXw-UZI.mjs";
|
|
17
|
+
import { t as maybeResolveWhatsAppQuestionReaction } from "./question-reactions-D3Zq9Gbn.mjs";
|
|
18
18
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
19
19
|
import { createAckReactionHandle, createStatusReactionController, logAckFailure, removeAckReactionHandleAfterReply, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
|
|
20
20
|
import { bindIngressLifecycleToReplyOptions, createChannelIngressMonitor, createChannelMessageReplyPipeline, createMessageReceiptFromOutboundResults, listMessageReceiptPlatformIds, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -25,27 +25,26 @@ import { resolveMarkdownTableMode as resolveMarkdownTableMode$1 } from "openclaw
|
|
|
25
25
|
import { createSubsystemLogger as createSubsystemLogger$1, defaultRuntime, formatDurationPrecise, getChildLogger as getChildLogger$1, logVerbose, logVerbose as logVerbose$1, registerUnhandledRejectionHandler, shouldLogVerbose, shouldLogVerbose as shouldLogVerbose$1, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
26
26
|
import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
|
|
27
27
|
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
|
|
28
|
-
import { buildChannelInboundEventContext, createChannelPartialDeliveryError, filterChannelInboundQuoteContext, formatInboundEnvelope, formatInboundEnvelope as formatInboundEnvelope$1, formatInboundMediaUnavailableText, formatLocationText, formatMediaPlaceholderText, hasVisibleInboundReplyDispatch, isChannelPartialDeliveryError, readAgentRunTerminalOutcome, resolveInboundSessionEnvelopeContext, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent, shouldDebounceTextInbound, toInboundMediaFactsWithMetadata, toLocationContext } from "openclaw/plugin-sdk/channel-inbound";
|
|
28
|
+
import { buildChannelInboundEventContext, createChannelPartialDeliveryError, filterChannelInboundQuoteContext, formatInboundEnvelope, formatInboundEnvelope as formatInboundEnvelope$1, formatInboundMediaUnavailableText, formatLocationText, formatMediaPlaceholderText, hasVisibleInboundReplyDispatch, isChannelPartialDeliveryError, readAgentRunTerminalOutcome, resolveGroupThreadConfig, resolveInboundSessionEnvelopeContext, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent, runGroupThread, shouldDebounceTextInbound, toInboundMediaFactsWithMetadata, toLocationContext } from "openclaw/plugin-sdk/channel-inbound";
|
|
29
29
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
|
|
30
30
|
import { isReasoningReplyPayload, resolveSendableOutboundReplyParts, resolveTextChunksWithFallback, sendMediaWithLeadingCaption } from "openclaw/plugin-sdk/reply-payload";
|
|
31
31
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
32
32
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
33
33
|
import { DisconnectReason, downloadMediaMessage, isHostedLidUser, isHostedPnUser, isJidGroup, isJidGroup as isJidGroup$1, jidDecode, jidEncode, jidNormalizedUser, normalizeMessageContent as normalizeMessageContent$1 } from "baileys";
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import { asDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
34
|
+
import { DEFAULT_ACCOUNT_ID, DEFAULT_MAIN_KEY, buildAgentMainSessionKey, buildAgentSessionKey, buildGroupHistoryKey, deriveLastRoutePolicy, normalizeAccountId, resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
35
|
+
import { asDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, resolvePromptHistoryLimit } from "openclaw/plugin-sdk/number-runtime";
|
|
37
36
|
import { filterSupplementalContextItems, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
|
|
37
|
+
import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
|
|
38
38
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
39
39
|
import { createHash } from "node:crypto";
|
|
40
40
|
import { resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
41
41
|
import { resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-runtime";
|
|
42
42
|
import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
43
43
|
import { drainPendingDeliveries } from "openclaw/plugin-sdk/delivery-queue-runtime";
|
|
44
|
-
import { DEFAULT_GROUP_HISTORY_LIMIT, buildHistoryContextFromEntries, buildInboundHistoryFromEntries, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
45
44
|
import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
|
|
46
|
-
import { fanInChannelIngressLifecycles, resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
47
45
|
import { getSessionEntry, patchSessionEntry, resolveGroupSessionKey, resolveStorePath, resolveStorePath as resolveStorePath$1, updateLastRoute } from "openclaw/plugin-sdk/session-store-runtime";
|
|
48
46
|
import { createInboundDebouncer, resolveInboundDebounceMs } from "openclaw/plugin-sdk/channel-inbound-debounce";
|
|
47
|
+
import { fanInChannelIngressLifecycles } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
49
48
|
import { saveMediaStream } from "openclaw/plugin-sdk/media-store";
|
|
50
49
|
import { upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
|
|
51
50
|
import { createDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
|
|
@@ -58,6 +57,7 @@ import { resolveAgentIdentity, resolveIdentityNamePrefix } from "openclaw/plugin
|
|
|
58
57
|
import { normalizeGroupActivation, parseActivationCommand } from "openclaw/plugin-sdk/group-activation";
|
|
59
58
|
import { formatAudioTranscriptForAgent } from "openclaw/plugin-sdk/media-understanding-runtime";
|
|
60
59
|
import { hasControlCommand, isControlCommandMessage, shouldComputeCommandAuthorized } from "openclaw/plugin-sdk/command-detection";
|
|
60
|
+
import { buildHistoryContextFromEntries, buildInboundHistoryFromEntries, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
61
61
|
import { createInternalHookEvent, deriveInboundMessageHookContext, fireAndForgetBoundedHook, toInternalMessageReceivedContext, toPluginMessageContext, toPluginMessageReceivedEvent, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime";
|
|
62
62
|
import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
|
|
63
63
|
import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference";
|
|
@@ -192,7 +192,7 @@ function resolveWhatsAppInboundPolicy(params) {
|
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
async function resolveWhatsAppIngressAccess(params) {
|
|
195
|
-
return await
|
|
195
|
+
return await getWhatsAppChannelRuntime().inbound.ingress.resolveStable({
|
|
196
196
|
channelId: "whatsapp",
|
|
197
197
|
accountId: params.policy.account.accountId,
|
|
198
198
|
identity: {
|
|
@@ -361,6 +361,7 @@ function createWhatsAppIngressMonitor(params) {
|
|
|
361
361
|
failedMaxEntries: 450
|
|
362
362
|
},
|
|
363
363
|
drain: {
|
|
364
|
+
deferredLaneOccupancy: "release",
|
|
364
365
|
resolveNonRetryableFailure: resolveWhatsAppIngressNonRetryableFailure,
|
|
365
366
|
deriveLaneKey: (record) => {
|
|
366
367
|
try {
|
|
@@ -608,19 +609,25 @@ function createWhatsAppInboundMessageDebouncer(options) {
|
|
|
608
609
|
for (const resolve of waiters) resolve();
|
|
609
610
|
};
|
|
610
611
|
const buildKey = (msg) => {
|
|
612
|
+
const admission = requireWhatsAppInboundAdmission(msg);
|
|
613
|
+
return `${admission.accountId}:${admission.conversation.id}`;
|
|
614
|
+
};
|
|
615
|
+
const resolveSenderKey = (msg) => {
|
|
611
616
|
const admission = requireWhatsAppInboundAdmission(msg);
|
|
612
617
|
const sender = msg.platform.sender;
|
|
613
|
-
|
|
614
|
-
return senderKey ? `${admission.accountId}:${admission.conversation.id}:${senderKey}` : null;
|
|
618
|
+
return admission.conversation.kind === "group" ? getPrimaryIdentityId(sender ?? null) ?? msg.platform.senderJid ?? msg.platform.senderE164 ?? msg.platform.senderName ?? admission.sender.id : admission.conversation.id;
|
|
615
619
|
};
|
|
616
620
|
const shouldDebounce = (msg) => options.shouldDebounce?.(msg) ?? true;
|
|
617
|
-
const trackKey = (key) => {
|
|
618
|
-
pendingKeys.set(key,
|
|
621
|
+
const trackKey = (key, senderKey) => {
|
|
622
|
+
pendingKeys.set(key, {
|
|
623
|
+
count: (pendingKeys.get(key)?.count ?? 0) + 1,
|
|
624
|
+
senderKey
|
|
625
|
+
});
|
|
619
626
|
};
|
|
620
627
|
const releaseKey = (entry) => {
|
|
621
628
|
if (!entry.debounceKey || entry.debounceKeyTracked !== true) return;
|
|
622
|
-
const
|
|
623
|
-
if (
|
|
629
|
+
const pending = pendingKeys.get(entry.debounceKey);
|
|
630
|
+
if (pending && pending.count > 1) pending.count -= 1;
|
|
624
631
|
else pendingKeys.delete(entry.debounceKey);
|
|
625
632
|
};
|
|
626
633
|
const orderEntries = (entries) => entries.toSorted((a, b) => {
|
|
@@ -703,9 +710,12 @@ function createWhatsAppInboundMessageDebouncer(options) {
|
|
|
703
710
|
const key = buildKey(message);
|
|
704
711
|
if (key) {
|
|
705
712
|
message.debounceKey = key;
|
|
713
|
+
const senderKey = resolveSenderKey(message);
|
|
714
|
+
const pending = pendingKeys.get(key);
|
|
715
|
+
if (pending && pending.senderKey !== senderKey) await debouncer.flushKey(key);
|
|
706
716
|
if (message.debounceMs > 0 && shouldDebounce(message)) {
|
|
707
717
|
message.debounceKeyTracked = true;
|
|
708
|
-
trackKey(key);
|
|
718
|
+
trackKey(key, senderKey);
|
|
709
719
|
options.onPendingWorkChanged();
|
|
710
720
|
notifyWork();
|
|
711
721
|
}
|
|
@@ -2275,50 +2285,49 @@ function buildBroadcastRouteKeys(params) {
|
|
|
2275
2285
|
};
|
|
2276
2286
|
}
|
|
2277
2287
|
async function maybeBroadcastMessage(params) {
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2288
|
+
const group = resolveGroupThreadConfig({
|
|
2289
|
+
cfg: params.cfg,
|
|
2290
|
+
channel: "whatsapp",
|
|
2291
|
+
peerId: params.peerId
|
|
2292
|
+
});
|
|
2293
|
+
if (!group) return false;
|
|
2294
|
+
whatsappInboundLog.info(`Broadcasting message to ${group.agents.length} agents (${group.strategy})`);
|
|
2285
2295
|
const isGroupConversation = requireWhatsAppInboundAdmission(params.msg).conversation.kind === "group";
|
|
2286
|
-
const groupHistorySnapshot = isGroupConversation ? params.groupHistories.get(params.groupHistoryKey) ?? [] : void 0;
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2296
|
+
const groupHistorySnapshot = isGroupConversation ? [...params.groupHistories.get(params.groupHistoryKey) ?? []] : void 0;
|
|
2297
|
+
await runGroupThread({
|
|
2298
|
+
cfg: params.cfg,
|
|
2299
|
+
group,
|
|
2300
|
+
channel: "whatsapp",
|
|
2301
|
+
accountId: params.route.accountId,
|
|
2302
|
+
peerId: params.peerId,
|
|
2303
|
+
messageId: params.msg.event.id,
|
|
2304
|
+
text: [params.msg.payload.body, params.preflightAudioTranscript].filter(Boolean).join("\n"),
|
|
2305
|
+
onError: (err, turn) => {
|
|
2306
|
+
whatsappInboundLog.error(`Broadcast agent ${turn.agentId} failed: ${formatError(err)}`);
|
|
2307
|
+
},
|
|
2308
|
+
runTurn: async (turn) => {
|
|
2309
|
+
const routeKeys = buildBroadcastRouteKeys({
|
|
2310
|
+
cfg: params.cfg,
|
|
2311
|
+
msg: params.msg,
|
|
2312
|
+
route: params.route,
|
|
2313
|
+
peerId: params.peerId,
|
|
2314
|
+
agentId: turn.agentId
|
|
2315
|
+
});
|
|
2316
|
+
const baseAgentRoute = {
|
|
2317
|
+
...params.route,
|
|
2318
|
+
agentId: turn.agentId,
|
|
2319
|
+
...routeKeys
|
|
2310
2320
|
};
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2321
|
+
const agentRoute = isGroupConversation ? resolveWhatsAppGroupSessionRoute(baseAgentRoute) : baseAgentRoute;
|
|
2322
|
+
return params.processMessage(params.msg, agentRoute, params.groupHistoryKey, {
|
|
2323
|
+
groupHistory: turn.round === 1 ? groupHistorySnapshot : [],
|
|
2324
|
+
suppressGroupHistoryClear: true,
|
|
2325
|
+
...params.preflightAudioTranscript !== void 0 ? { preflightAudioTranscript: params.preflightAudioTranscript } : {},
|
|
2326
|
+
...params.ackAlreadySent === true || turn.round > 1 ? { ackAlreadySent: true } : {},
|
|
2327
|
+
...params.ackReaction !== void 0 && turn.round === 1 ? { ackReaction: params.ackReaction } : {}
|
|
2328
|
+
});
|
|
2318
2329
|
}
|
|
2319
|
-
};
|
|
2320
|
-
if (strategy === "sequential") for (const agentId of broadcastAgents) await processForAgent(agentId);
|
|
2321
|
-
else await Promise.allSettled(broadcastAgents.map(processForAgent));
|
|
2330
|
+
});
|
|
2322
2331
|
if (isGroupConversation) params.groupHistories.set(params.groupHistoryKey, []);
|
|
2323
2332
|
return true;
|
|
2324
2333
|
}
|
|
@@ -3689,7 +3698,7 @@ async function processMessage(params) {
|
|
|
3689
3698
|
let audioTranscript = params.preflightAudioTranscript ?? void 0;
|
|
3690
3699
|
const hasAudioBody = (params.msg.payload.media?.kind === "audio" || params.msg.payload.media?.type?.startsWith("audio/") === true) && !params.msg.payload.body.trim();
|
|
3691
3700
|
if (params.preflightAudioTranscript === void 0 && hasAudioBody && params.msg.payload.media?.path) try {
|
|
3692
|
-
const { transcribeFirstAudio } = await import("./audio-preflight.runtime-C_glQhZY.
|
|
3701
|
+
const { transcribeFirstAudio } = await import("./audio-preflight.runtime-C_glQhZY.mjs");
|
|
3693
3702
|
audioTranscript = await transcribeFirstAudio({
|
|
3694
3703
|
ctx: {
|
|
3695
3704
|
media: [{
|
|
@@ -4089,7 +4098,7 @@ function createWebOnMessageHandler(params) {
|
|
|
4089
4098
|
const transcribeAudioOnce = async () => {
|
|
4090
4099
|
if (preflightAudioTranscript !== void 0 || !hasAudioBody || !msg.payload.media?.path) return;
|
|
4091
4100
|
try {
|
|
4092
|
-
const { transcribeFirstAudio } = await import("./audio-preflight.runtime-C_glQhZY.
|
|
4101
|
+
const { transcribeFirstAudio } = await import("./audio-preflight.runtime-C_glQhZY.mjs");
|
|
4093
4102
|
preflightAudioTranscript = await transcribeFirstAudio({
|
|
4094
4103
|
ctx: {
|
|
4095
4104
|
media: [{
|
|
@@ -4224,7 +4233,11 @@ function createWebOnMessageHandler(params) {
|
|
|
4224
4233
|
recordAcceptedConfiguredGroupRoute = null;
|
|
4225
4234
|
}
|
|
4226
4235
|
await runAudioPreflightOnce();
|
|
4227
|
-
const hasBroadcastTargets = !configuredRoute.bindingResolution &&
|
|
4236
|
+
const hasBroadcastTargets = !configuredRoute.bindingResolution && resolveGroupThreadConfig({
|
|
4237
|
+
cfg,
|
|
4238
|
+
channel: "whatsapp",
|
|
4239
|
+
peerId
|
|
4240
|
+
}) !== void 0;
|
|
4228
4241
|
if (hasBroadcastTargets && statusReactionController) await clearPreDispatchReaction();
|
|
4229
4242
|
if (hasBroadcastTargets && !canRunEarlyAudioPreflight) await transcribeAudioOnce();
|
|
4230
4243
|
if (!configuredRoute.bindingResolution && await maybeBroadcastMessage({
|
|
@@ -4254,7 +4267,7 @@ function createWebOnMessageHandler(params) {
|
|
|
4254
4267
|
function isNonRetryableWebCloseStatus(statusCode) {
|
|
4255
4268
|
return statusCode === 440;
|
|
4256
4269
|
}
|
|
4257
|
-
const loadReplyResolverRuntime = createLazyRuntimeModule(() => import("./reply-resolver.runtime-Ded8D58Y.
|
|
4270
|
+
const loadReplyResolverRuntime = createLazyRuntimeModule(() => import("./reply-resolver.runtime-Ded8D58Y.mjs"));
|
|
4258
4271
|
function resolveWebMonitorConfigSnapshot(params) {
|
|
4259
4272
|
const account = resolveWhatsAppAccount({
|
|
4260
4273
|
cfg: params.cfg,
|
|
@@ -4320,7 +4333,7 @@ async function monitorWebChannel(verbose, listenerFactory = attachWebInboxToSock
|
|
|
4320
4333
|
const reconnectPolicy = resolveReconnectPolicy(cfg, tuning.reconnect);
|
|
4321
4334
|
const socketTiming = resolveWhatsAppSocketTiming(tuning.socketTiming);
|
|
4322
4335
|
const baseMentionConfig = buildMentionConfig(cfg);
|
|
4323
|
-
const groupHistoryLimit = account.historyLimit ?? cfg.channels?.whatsapp?.historyLimit ?? cfg.messages?.groupChat?.historyLimit
|
|
4336
|
+
const groupHistoryLimit = resolvePromptHistoryLimit(account.historyLimit ?? cfg.channels?.whatsapp?.historyLimit ?? cfg.messages?.groupChat?.historyLimit);
|
|
4324
4337
|
const groupHistories = /* @__PURE__ */ new Map();
|
|
4325
4338
|
const groupMemberNames = /* @__PURE__ */ new Map();
|
|
4326
4339
|
const groupMetadataCache = /* @__PURE__ */ new Map();
|
|
@@ -30,39 +30,20 @@ function isWhatsAppNewsletterJid(value) {
|
|
|
30
30
|
return WHATSAPP_NEWSLETTER_JID_RE.test(candidate);
|
|
31
31
|
}
|
|
32
32
|
function isWhatsAppUserTarget(value) {
|
|
33
|
-
|
|
34
|
-
return WHATSAPP_USER_JID_RE.test(candidate) || WHATSAPP_LEGACY_USER_JID_RE.test(candidate) || WHATSAPP_LID_RE.test(candidate);
|
|
33
|
+
return extractUserJidPhone(stripWhatsAppTargetPrefixes(value)) !== null;
|
|
35
34
|
}
|
|
36
35
|
function extractUserJidPhone(jid) {
|
|
37
|
-
|
|
38
|
-
if (userMatch) {
|
|
39
|
-
const phone = userMatch[1];
|
|
40
|
-
return phone ? phone : null;
|
|
41
|
-
}
|
|
42
|
-
const legacyUserMatch = jid.match(WHATSAPP_LEGACY_USER_JID_RE);
|
|
43
|
-
if (legacyUserMatch) {
|
|
44
|
-
const phone = legacyUserMatch[1];
|
|
45
|
-
return phone ? phone : null;
|
|
46
|
-
}
|
|
47
|
-
const lidMatch = jid.match(WHATSAPP_LID_RE);
|
|
48
|
-
if (lidMatch) {
|
|
49
|
-
const phone = lidMatch[1];
|
|
50
|
-
return phone ? phone : null;
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
36
|
+
return (jid.match(WHATSAPP_USER_JID_RE) ?? jid.match(WHATSAPP_LEGACY_USER_JID_RE) ?? jid.match(WHATSAPP_LID_RE))?.[1] ?? null;
|
|
53
37
|
}
|
|
54
38
|
function normalizeWhatsAppTarget(value) {
|
|
55
39
|
const candidate = stripWhatsAppTargetPrefixes(value);
|
|
56
40
|
if (!candidate) return null;
|
|
57
41
|
const groupJid = normalizeWhatsAppGroupJid(candidate);
|
|
58
42
|
if (groupJid) return groupJid;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (isWhatsAppUserTarget(candidate)) {
|
|
64
|
-
const phone = extractUserJidPhone(candidate);
|
|
65
|
-
if (!phone) return null;
|
|
43
|
+
const newsletterMatch = candidate.match(WHATSAPP_NEWSLETTER_JID_RE);
|
|
44
|
+
if (newsletterMatch) return `${newsletterMatch[1]}@newsletter`;
|
|
45
|
+
const phone = extractUserJidPhone(candidate);
|
|
46
|
+
if (phone) {
|
|
66
47
|
const normalized = normalizeE164(phone);
|
|
67
48
|
return normalized.length > 1 ? normalized : null;
|
|
68
49
|
}
|
|
@@ -72,9 +53,7 @@ function normalizeWhatsAppTarget(value) {
|
|
|
72
53
|
return normalized.length > 1 ? normalized : null;
|
|
73
54
|
}
|
|
74
55
|
function normalizeWhatsAppMessagingTarget(raw) {
|
|
75
|
-
|
|
76
|
-
if (!trimmed) return;
|
|
77
|
-
return normalizeWhatsAppTarget(trimmed) ?? void 0;
|
|
56
|
+
return normalizeWhatsAppTarget(raw) ?? void 0;
|
|
78
57
|
}
|
|
79
58
|
function normalizeWhatsAppAllowFromEntries(allowFrom) {
|
|
80
59
|
return uniqueStrings(formatNormalizedAllowFromEntries({
|
|
@@ -90,8 +69,7 @@ function normalizeWhatsAppAllowFromEntry(entry) {
|
|
|
90
69
|
}
|
|
91
70
|
function looksLikeWhatsAppTargetId(raw) {
|
|
92
71
|
const trimmed = raw.trim();
|
|
93
|
-
|
|
94
|
-
return /^whatsapp:/i.test(trimmed) || isWhatsAppGroupJid(trimmed) || isWhatsAppNewsletterJid(trimmed) || isWhatsAppUserTarget(trimmed) || normalizeWhatsAppTarget(trimmed) !== null;
|
|
72
|
+
return /^whatsapp:/i.test(trimmed) || normalizeWhatsAppTarget(trimmed) !== null;
|
|
95
73
|
}
|
|
96
74
|
//#endregion
|
|
97
75
|
export { normalizeWhatsAppAllowFromEntries as a, normalizeWhatsAppTarget as c, looksLikeWhatsAppTargetId as i, isWhatsAppNewsletterJid as n, normalizeWhatsAppAllowFromEntry as o, isWhatsAppUserTarget as r, normalizeWhatsAppMessagingTarget as s, isWhatsAppGroupJid as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.
|
|
2
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
+
import { a as resolveWhatsAppAccount } from "./accounts-D_NGDjCx.mjs";
|
|
3
3
|
import { createQuestionReactionTargetStore, questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
4
4
|
//#region extensions/whatsapp/src/question-reactions.ts
|
|
5
5
|
var question_reactions_exports = /* @__PURE__ */ __exportAll({
|
package/dist/{resolve-outbound-target-1GqbT1uX.js → .setup/resolve-outbound-target-C2eUvsTc.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as normalizeWhatsAppTarget, n as isWhatsAppNewsletterJid, t as isWhatsAppGroupJid } from "./normalize-target-
|
|
1
|
+
import { c as normalizeWhatsAppTarget, n as isWhatsAppNewsletterJid, t as isWhatsAppGroupJid } from "./normalize-target-BGra1ZnM.mjs";
|
|
2
2
|
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { missingTargetError } from "openclaw/plugin-sdk/channel-feedback";
|
|
4
4
|
//#region extensions/whatsapp/src/resolve-outbound-target.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, c as resolveMergedWhatsAppAccountConfig, s as resolveWhatsAppMediaMaxBytes } from "./accounts-
|
|
2
|
-
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.
|
|
3
|
-
import { n as isWhatsAppNewsletterJid } from "./normalize-target-
|
|
4
|
-
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-
|
|
5
|
-
import "./normalize-
|
|
6
|
-
import { a as markdownToWhatsAppChunks, c as toWhatsappJid } from "./targets-runtime-RBjx3pg_.
|
|
7
|
-
import { a as stripToolCallXmlTags, i as sanitizeAssistantVisibleTextWithProfile, r as sanitizeAssistantVisibleText } from "./text-runtime-
|
|
1
|
+
import { a as resolveWhatsAppAccount, c as resolveMergedWhatsAppAccountConfig, s as resolveWhatsAppMediaMaxBytes } from "./accounts-D_NGDjCx.mjs";
|
|
2
|
+
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.mjs";
|
|
3
|
+
import { n as isWhatsAppNewsletterJid } from "./normalize-target-BGra1ZnM.mjs";
|
|
4
|
+
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-hgLJoRc8.mjs";
|
|
5
|
+
import "./normalize-DdsROMMa.mjs";
|
|
6
|
+
import { a as markdownToWhatsAppChunks, c as toWhatsappJid } from "./targets-runtime-RBjx3pg_.mjs";
|
|
7
|
+
import { a as stripToolCallXmlTags, i as sanitizeAssistantVisibleTextWithProfile, r as sanitizeAssistantVisibleText } from "./text-runtime-CHl0iPYe.mjs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { normalizeStringEntries, normalizeUniqueStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { resolveReactionLevel } from "openclaw/plugin-sdk/status-helpers";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as isWhatsAppNewsletterJid } from "./normalize-target-
|
|
2
|
-
import { _ as resolveWhatsAppDocumentFileName, f as mergeWhatsAppAcceptedSendError, m as rememberWhatsAppAcceptedSend, p as normalizeWhatsAppSendResult, u as combineWhatsAppSendResults } from "./send-
|
|
3
|
-
import "./normalize-
|
|
4
|
-
import { c as toWhatsappJid, l as toWhatsappJidWithLid, r as jidToE164 } from "./targets-runtime-RBjx3pg_.
|
|
5
|
-
import "./text-runtime-
|
|
6
|
-
import { i as buildQuotedMessageOptions } from "./group-session-key-
|
|
7
|
-
import { k as resolveComparableIdentity } from "./auth-store-
|
|
1
|
+
import { n as isWhatsAppNewsletterJid } from "./normalize-target-BGra1ZnM.mjs";
|
|
2
|
+
import { _ as resolveWhatsAppDocumentFileName, f as mergeWhatsAppAcceptedSendError, m as rememberWhatsAppAcceptedSend, p as normalizeWhatsAppSendResult, u as combineWhatsAppSendResults } from "./send-C6jDmcL9.mjs";
|
|
3
|
+
import "./normalize-DdsROMMa.mjs";
|
|
4
|
+
import { c as toWhatsappJid, l as toWhatsappJidWithLid, r as jidToE164 } from "./targets-runtime-RBjx3pg_.mjs";
|
|
5
|
+
import "./text-runtime-CHl0iPYe.mjs";
|
|
6
|
+
import { i as buildQuotedMessageOptions } from "./group-session-key-D22hYMdE.mjs";
|
|
7
|
+
import { k as resolveComparableIdentity } from "./auth-store-Dh8a3cba.mjs";
|
|
8
8
|
import { isRecord, normalizeLowercaseStringOrEmpty, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
10
10
|
import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
2
|
import { BufferJSON, DEFAULT_CONNECTION_CONFIG, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "baileys";
|
|
3
3
|
//#region extensions/whatsapp/src/session.runtime.ts
|
|
4
4
|
var session_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-
|
|
2
|
-
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.
|
|
3
|
-
import { r as hasWebCredsSync } from "./creds-files-Drg3usj1.
|
|
4
|
-
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-
|
|
5
|
-
import {
|
|
1
|
+
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-D_NGDjCx.mjs";
|
|
2
|
+
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.mjs";
|
|
3
|
+
import { r as hasWebCredsSync } from "./creds-files-Drg3usj1.mjs";
|
|
4
|
+
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-BGra1ZnM.mjs";
|
|
5
|
+
import { n as whatsappSetupAdapter } from "./shared-DVgQ8kRG.mjs";
|
|
6
6
|
import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
7
7
|
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
8
8
|
//#region extensions/whatsapp/src/setup-finalize.ts
|
|
@@ -296,7 +296,7 @@ async function finalizeWhatsAppSetup(params) {
|
|
|
296
296
|
};
|
|
297
297
|
let loginWeb;
|
|
298
298
|
try {
|
|
299
|
-
({loginWeb} = await import("./login-
|
|
299
|
+
({loginWeb} = await import("./login-2dmd1TfE.mjs").then((n) => n.n));
|
|
300
300
|
} catch (error) {
|
|
301
301
|
await reportLoginFailure(error);
|
|
302
302
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as resolveWhatsAppAuthDir } from "./accounts-
|
|
2
|
-
import { t as listAccountIds } from "./account-ids-CB5SOWjc.
|
|
3
|
-
import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-
|
|
1
|
+
import { o as resolveWhatsAppAuthDir } from "./accounts-D_NGDjCx.mjs";
|
|
2
|
+
import { t as listAccountIds } from "./account-ids-CB5SOWjc.mjs";
|
|
3
|
+
import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-Dh8a3cba.mjs";
|
|
4
4
|
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
5
5
|
//#region extensions/whatsapp/src/setup-surface.ts
|
|
6
6
|
const t = createSetupTranslator();
|
|
@@ -36,7 +36,7 @@ const whatsappSetupWizard = {
|
|
|
36
36
|
},
|
|
37
37
|
resolveShouldPromptAccountIds: ({ shouldPromptAccountIds }) => shouldPromptAccountIds,
|
|
38
38
|
credentials: [],
|
|
39
|
-
finalize: async (params) => await (await import("./setup-finalize-
|
|
39
|
+
finalize: async (params) => await (await import("./setup-finalize-pGqWOiFX.mjs")).finalizeWhatsAppSetup(params),
|
|
40
40
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
|
|
41
41
|
onAccountRecorded: (accountId, options) => {
|
|
42
42
|
options?.onAccountId?.(channel, accountId);
|