@openclaw/imessage 2026.9.3 → 2026.9.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/assets/activity.svg +40 -0
- package/assets/icon.png +0 -0
- package/dist/{actions.runtime-CzvR20qT.js → .setup/actions.runtime-B-qGAkYG.mjs} +106 -176
- package/dist/.setup/api-DcUWvBmD.mjs +10 -0
- package/dist/.setup/api-_NoJAo2x.mjs +14 -0
- package/dist/{approval-handler.runtime-B6JGnxQf.js → .setup/approval-handler.runtime-CkG235P7.mjs} +27 -27
- package/dist/{approval-reactions-BM_AwHPq.js → .setup/approval-reactions-CX1-6KeG.mjs} +32 -32
- package/dist/{channel-B6qtBfCj.js → .setup/channel-CCbYCQiN.mjs} +29 -17
- package/dist/{channel.runtime-C2lcFXWn.js → .setup/channel.runtime-Kw4iCQax.mjs} +7 -5
- package/dist/{group-policy-Duro87b4.js → .setup/group-policy-BoOAkmoQ.mjs} +35 -75
- package/dist/{media-contract-pns3TSS5.js → .setup/media-contract-BpPh5Oh1.mjs} +1 -1
- package/dist/.setup/message-tool-api-DZSH-2gY.mjs +148 -0
- package/dist/{monitor-Dj3TAimI.js → .setup/monitor-CSeWJ3Qh.mjs} +231 -154
- package/dist/{question-reactions-9tBYB1_F.js → .setup/question-reactions-lm8OxWbb.mjs} +2 -2
- package/dist/{remote-file-5n5LznCa.js → .setup/remote-file-4RbwiXYh.mjs} +11 -8
- package/dist/{sanitize-outbound-C6UF2cvr.js → .setup/sanitize-outbound-o1ePXajW.mjs} +83 -47
- package/dist/{send-CIHiLtcY.js → .setup/send-DXiUWygv.mjs} +157 -173
- package/dist/{state-migrations-D-fyHVcb.js → .setup/state-migrations-CIwg07l5.mjs} +3 -3
- package/dist/{message-tool-api-CUoFESHj.js → .setup/targets-Cc9vthzI.mjs} +53 -155
- package/dist/api.js +9 -14
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/media-contract-api.js +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +7 -6
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-entry.js +2 -1
- package/dist/src/send-receipt-db.worker.js +35 -0
- 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/node_modules/zod/README.md +27 -0
- package/node_modules/zod/compile.cjs +77 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +2 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/package.json +13 -2
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +12 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +140 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +452 -262
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +135 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +30 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +720 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +155 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +11 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +274 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +425 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +281 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +47 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +183 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +46 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +245 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +234 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +33 -2
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +127 -5
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +11 -2
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1585 -173
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +48 -12
- package/node_modules/zod/src/v4/core/checks.ts +57 -44
- package/node_modules/zod/src/v4/core/compile.ts +2188 -0
- package/node_modules/zod/src/v4/core/core.ts +98 -19
- package/node_modules/zod/src/v4/core/doc.ts +11 -7
- package/node_modules/zod/src/v4/core/errors.ts +115 -24
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +6 -1
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +257 -93
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +284 -0
- package/node_modules/zod/src/v4/core/parse.ts +131 -38
- package/node_modules/zod/src/v4/core/regexes.ts +30 -13
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +759 -461
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +969 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +1639 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +31 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +275 -42
- package/node_modules/zod/src/v4/core/util.ts +268 -42
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +3 -0
- package/node_modules/zod/src/v4/locales/az.ts +3 -0
- package/node_modules/zod/src/v4/locales/be.ts +10 -0
- package/node_modules/zod/src/v4/locales/bg.ts +3 -0
- package/node_modules/zod/src/v4/locales/bn.ts +121 -0
- package/node_modules/zod/src/v4/locales/ca.ts +3 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +138 -0
- package/node_modules/zod/src/v4/locales/cs.ts +3 -0
- package/node_modules/zod/src/v4/locales/da.ts +5 -2
- package/node_modules/zod/src/v4/locales/de.ts +3 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +15 -4
- package/node_modules/zod/src/v4/locales/eo.ts +3 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +3 -0
- package/node_modules/zod/src/v4/locales/fi.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr.ts +19 -14
- package/node_modules/zod/src/v4/locales/gu.ts +121 -0
- package/node_modules/zod/src/v4/locales/he.ts +6 -1
- package/node_modules/zod/src/v4/locales/hi.ts +124 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +3 -0
- package/node_modules/zod/src/v4/locales/hy.ts +9 -0
- package/node_modules/zod/src/v4/locales/id.ts +3 -0
- package/node_modules/zod/src/v4/locales/index.ts +10 -0
- package/node_modules/zod/src/v4/locales/is.ts +3 -0
- package/node_modules/zod/src/v4/locales/it.ts +3 -0
- package/node_modules/zod/src/v4/locales/ja.ts +3 -0
- package/node_modules/zod/src/v4/locales/ka.ts +3 -0
- package/node_modules/zod/src/v4/locales/km.ts +3 -0
- package/node_modules/zod/src/v4/locales/kn.ts +124 -0
- package/node_modules/zod/src/v4/locales/ko.ts +3 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ms.ts +3 -0
- package/node_modules/zod/src/v4/locales/ne.ts +126 -0
- package/node_modules/zod/src/v4/locales/nl.ts +3 -0
- package/node_modules/zod/src/v4/locales/nn.ts +119 -0
- package/node_modules/zod/src/v4/locales/no.ts +5 -2
- package/node_modules/zod/src/v4/locales/ota.ts +3 -0
- package/node_modules/zod/src/v4/locales/pl.ts +3 -0
- package/node_modules/zod/src/v4/locales/ps.ts +3 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +159 -0
- package/node_modules/zod/src/v4/locales/pt.ts +99 -58
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +10 -0
- package/node_modules/zod/src/v4/locales/sk.ts +121 -0
- package/node_modules/zod/src/v4/locales/sl.ts +3 -0
- package/node_modules/zod/src/v4/locales/sv.ts +5 -2
- package/node_modules/zod/src/v4/locales/ta.ts +3 -0
- package/node_modules/zod/src/v4/locales/th.ts +3 -0
- package/node_modules/zod/src/v4/locales/tk.ts +111 -0
- package/node_modules/zod/src/v4/locales/tr.ts +3 -0
- package/node_modules/zod/src/v4/locales/uk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ur.ts +3 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +3 -0
- package/node_modules/zod/src/v4/locales/yo.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +3 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +10 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +135 -56
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +72 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +21 -0
- package/node_modules/zod/v3/ZodError.cjs +22 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/types.cjs +7 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +2 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +43 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +30 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +136 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
- package/node_modules/zod/v4/classic/in-out.cjs +63 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +2 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +11 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +4 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +498 -398
- package/node_modules/zod/v4/classic/schemas.d.cts +53 -18
- package/node_modules/zod/v4/classic/schemas.d.ts +53 -18
- package/node_modules/zod/v4/classic/schemas.js +492 -396
- package/node_modules/zod/v4/core/api.cjs +23 -4
- package/node_modules/zod/v4/core/api.d.cts +13 -9
- package/node_modules/zod/v4/core/api.d.ts +13 -9
- package/node_modules/zod/v4/core/api.js +21 -4
- package/node_modules/zod/v4/core/checks.cjs +37 -31
- package/node_modules/zod/v4/core/checks.d.cts +13 -13
- package/node_modules/zod/v4/core/checks.d.ts +13 -13
- package/node_modules/zod/v4/core/checks.js +37 -31
- package/node_modules/zod/v4/core/compile.cjs +1813 -0
- package/node_modules/zod/v4/core/compile.d.cts +51 -0
- package/node_modules/zod/v4/core/compile.d.ts +51 -0
- package/node_modules/zod/v4/core/compile.js +1783 -0
- package/node_modules/zod/v4/core/core.cjs +81 -18
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +82 -19
- package/node_modules/zod/v4/core/doc.cjs +5 -7
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +5 -7
- package/node_modules/zod/v4/core/errors.cjs +110 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +110 -25
- package/node_modules/zod/v4/core/index.cjs +5 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +4 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +4 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
- package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +272 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +265 -0
- package/node_modules/zod/v4/core/parse.cjs +96 -34
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +94 -33
- package/node_modules/zod/v4/core/regexes.cjs +27 -15
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +24 -13
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +537 -326
- package/node_modules/zod/v4/core/schemas.d.cts +100 -31
- package/node_modules/zod/v4/core/schemas.d.ts +100 -31
- package/node_modules/zod/v4/core/schemas.js +526 -325
- package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
- package/node_modules/zod/v4/core/to-json-schema.d.cts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.js +241 -39
- package/node_modules/zod/v4/core/util.cjs +212 -31
- package/node_modules/zod/v4/core/util.d.cts +58 -1
- package/node_modules/zod/v4/core/util.d.ts +58 -1
- package/node_modules/zod/v4/core/util.js +202 -30
- package/node_modules/zod/v4/core/versions.cjs +2 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +195 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +15 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +3 -0
- package/node_modules/zod/v4/locales/ar.js +3 -0
- package/node_modules/zod/v4/locales/az.cjs +3 -0
- package/node_modules/zod/v4/locales/az.js +3 -0
- package/node_modules/zod/v4/locales/be.cjs +10 -0
- package/node_modules/zod/v4/locales/be.js +10 -0
- package/node_modules/zod/v4/locales/bg.cjs +3 -0
- package/node_modules/zod/v4/locales/bg.js +3 -0
- package/node_modules/zod/v4/locales/bn.cjs +138 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +111 -0
- package/node_modules/zod/v4/locales/ca.cjs +3 -0
- package/node_modules/zod/v4/locales/ca.js +3 -0
- package/node_modules/zod/v4/locales/ckb.cjs +158 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +131 -0
- package/node_modules/zod/v4/locales/cs.cjs +3 -0
- package/node_modules/zod/v4/locales/cs.js +3 -0
- package/node_modules/zod/v4/locales/da.cjs +5 -2
- package/node_modules/zod/v4/locales/da.js +5 -2
- package/node_modules/zod/v4/locales/de.cjs +3 -0
- package/node_modules/zod/v4/locales/de.js +3 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +14 -4
- package/node_modules/zod/v4/locales/en.js +14 -4
- package/node_modules/zod/v4/locales/eo.cjs +3 -0
- package/node_modules/zod/v4/locales/eo.js +3 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +3 -0
- package/node_modules/zod/v4/locales/fa.js +3 -0
- package/node_modules/zod/v4/locales/fi.cjs +3 -0
- package/node_modules/zod/v4/locales/fi.js +3 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
- package/node_modules/zod/v4/locales/fr-CA.js +3 -0
- package/node_modules/zod/v4/locales/fr.cjs +16 -14
- package/node_modules/zod/v4/locales/fr.js +16 -14
- package/node_modules/zod/v4/locales/gu.cjs +138 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +111 -0
- package/node_modules/zod/v4/locales/he.cjs +5 -0
- package/node_modules/zod/v4/locales/he.js +5 -0
- package/node_modules/zod/v4/locales/hi.cjs +136 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +109 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +3 -0
- package/node_modules/zod/v4/locales/hu.js +3 -0
- package/node_modules/zod/v4/locales/hy.cjs +9 -0
- package/node_modules/zod/v4/locales/hy.js +9 -0
- package/node_modules/zod/v4/locales/id.cjs +3 -0
- package/node_modules/zod/v4/locales/id.js +3 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -2
- package/node_modules/zod/v4/locales/index.d.cts +10 -0
- package/node_modules/zod/v4/locales/index.d.ts +10 -0
- package/node_modules/zod/v4/locales/index.js +10 -0
- package/node_modules/zod/v4/locales/is.cjs +3 -0
- package/node_modules/zod/v4/locales/is.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +3 -0
- package/node_modules/zod/v4/locales/it.js +3 -0
- package/node_modules/zod/v4/locales/ja.cjs +3 -0
- package/node_modules/zod/v4/locales/ja.js +3 -0
- package/node_modules/zod/v4/locales/ka.cjs +3 -0
- package/node_modules/zod/v4/locales/ka.js +3 -0
- package/node_modules/zod/v4/locales/km.cjs +3 -0
- package/node_modules/zod/v4/locales/km.js +3 -0
- package/node_modules/zod/v4/locales/kn.cjs +141 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +114 -0
- package/node_modules/zod/v4/locales/ko.cjs +3 -0
- package/node_modules/zod/v4/locales/ko.js +3 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +3 -0
- package/node_modules/zod/v4/locales/mk.js +3 -0
- package/node_modules/zod/v4/locales/ms.cjs +3 -0
- package/node_modules/zod/v4/locales/ms.js +3 -0
- package/node_modules/zod/v4/locales/ne.cjs +136 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +109 -0
- package/node_modules/zod/v4/locales/nl.cjs +3 -0
- package/node_modules/zod/v4/locales/nl.js +3 -0
- package/node_modules/zod/v4/locales/nn.cjs +138 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +111 -0
- package/node_modules/zod/v4/locales/no.cjs +5 -2
- package/node_modules/zod/v4/locales/no.js +5 -2
- package/node_modules/zod/v4/locales/ota.cjs +3 -0
- package/node_modules/zod/v4/locales/ota.js +3 -0
- package/node_modules/zod/v4/locales/pl.cjs +3 -0
- package/node_modules/zod/v4/locales/pl.js +3 -0
- package/node_modules/zod/v4/locales/ps.cjs +3 -0
- package/node_modules/zod/v4/locales/ps.js +3 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +168 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +141 -0
- package/node_modules/zod/v4/locales/pt.cjs +87 -55
- package/node_modules/zod/v4/locales/pt.js +87 -55
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +10 -0
- package/node_modules/zod/v4/locales/ru.js +10 -0
- package/node_modules/zod/v4/locales/sk.cjs +141 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +114 -0
- package/node_modules/zod/v4/locales/sl.cjs +3 -0
- package/node_modules/zod/v4/locales/sl.js +3 -0
- package/node_modules/zod/v4/locales/sv.cjs +5 -2
- package/node_modules/zod/v4/locales/sv.js +5 -2
- package/node_modules/zod/v4/locales/ta.cjs +3 -0
- package/node_modules/zod/v4/locales/ta.js +3 -0
- package/node_modules/zod/v4/locales/th.cjs +3 -0
- package/node_modules/zod/v4/locales/th.js +3 -0
- package/node_modules/zod/v4/locales/tk.cjs +132 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +105 -0
- package/node_modules/zod/v4/locales/tr.cjs +3 -0
- package/node_modules/zod/v4/locales/tr.js +3 -0
- package/node_modules/zod/v4/locales/uk.cjs +3 -0
- package/node_modules/zod/v4/locales/uk.js +3 -0
- package/node_modules/zod/v4/locales/ur.cjs +3 -0
- package/node_modules/zod/v4/locales/ur.js +3 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +3 -0
- package/node_modules/zod/v4/locales/vi.js +3 -0
- package/node_modules/zod/v4/locales/yo.cjs +3 -0
- package/node_modules/zod/v4/locales/yo.js +3 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-CN.js +3 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-TW.js +3 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +12 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +63 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/parse.cjs +3 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +75 -47
- package/node_modules/zod/v4/mini/schemas.d.cts +43 -13
- package/node_modules/zod/v4/mini/schemas.d.ts +43 -13
- package/node_modules/zod/v4/mini/schemas.js +71 -45
- package/openclaw.plugin.json +15 -28
- package/package.json +12 -7
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- package/dist/{accounts-CCirBEIm.js → .setup/accounts-Dv0uksBG.mjs} +2 -2
- /package/dist/{config-schema-CCbTcJEV.js → .setup/config-schema-CCbTcJEV.mjs} +0 -0
- /package/dist/{conversation-bindings-GDQ_Laxj.js → .setup/conversation-bindings-GDQ_Laxj.mjs} +0 -0
- /package/dist/{outbound-send-deps-B-QEsLSM.js → .setup/outbound-send-deps-B-QEsLSM.mjs} +0 -0
- /package/dist/{reaction-context-Br-vAJFp.js → .setup/reaction-context-Br-vAJFp.mjs} +0 -0
- /package/dist/{rolldown-runtime-D7D4PA-g.js → .setup/rolldown-runtime-D7D4PA-g.mjs} +0 -0
- /package/dist/{runtime-Cza4CY5T.js → .setup/runtime-Cza4CY5T.mjs} +0 -0
- /package/dist/{state-contract-DvahEY4X.js → .setup/state-contract-DvahEY4X.mjs} +0 -0
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { l as
|
|
3
|
-
import { a as IMessageRpcRequestError,
|
|
4
|
-
import {
|
|
5
|
-
import { n as getOptionalIMessageRuntime, t as getIMessageRuntime } from "./runtime-Cza4CY5T.
|
|
6
|
-
import { c as IMESSAGE_SENT_ECHOES_TTL_MS, d as resolveIMessageEchoMediaKey, p as resolveIMessageSentEchoEntryKey, s as IMESSAGE_SENT_ECHOES_NAMESPACE } from "./state-contract-DvahEY4X.
|
|
7
|
-
import { d as normalizeConversationKey, i as registerIMessageApprovalReactionTarget, l as enumerateApprovalTargetKeys, s as buildIMessageApprovalConversationKeyForInbound, u as enumerateConversationKeyForms } from "./approval-reactions-
|
|
8
|
-
import { n as normalizeIMessageGuid } from "./reaction-context-Br-vAJFp.
|
|
9
|
-
import { r as resolveAuthorizedIMessageReplyReference, t as withIMessageRemoteFile } from "./remote-file-
|
|
1
|
+
import { c as parseIMessageTarget, o as normalizeIMessageHandle, t as formatIMessageChatTarget } from "./targets-Cc9vthzI.mjs";
|
|
2
|
+
import { d as resolveIMessageChatDbLookupPath, l as resolveIMessageRemoteHost, n as hasExclusiveIMessageLocalDatabase, o as resolveIMessageAccount } from "./accounts-Dv0uksBG.mjs";
|
|
3
|
+
import { _ as chatContextFromIMessageTarget, a as IMessageRpcRequestError, b as resolveIMessageDirectChatService, f as rememberIMessageReplyCache, n as sanitizeIMessageFinalOutboundText, o as createIMessageRpcClient, s as runIMessageCliJsonCommand, t as protectIMessageFencedRoleMarkers } from "./sanitize-outbound-o1ePXajW.mjs";
|
|
4
|
+
import { c as imessageApprovalAuth, s as getIMessageApprovalApprovers } from "./group-policy-BoOAkmoQ.mjs";
|
|
5
|
+
import { n as getOptionalIMessageRuntime, t as getIMessageRuntime } from "./runtime-Cza4CY5T.mjs";
|
|
6
|
+
import { c as IMESSAGE_SENT_ECHOES_TTL_MS, d as resolveIMessageEchoMediaKey, p as resolveIMessageSentEchoEntryKey, s as IMESSAGE_SENT_ECHOES_NAMESPACE } from "./state-contract-DvahEY4X.mjs";
|
|
7
|
+
import { d as normalizeConversationKey, i as registerIMessageApprovalReactionTarget, l as enumerateApprovalTargetKeys, s as buildIMessageApprovalConversationKeyForInbound, u as enumerateConversationKeyForms } from "./approval-reactions-CX1-6KeG.mjs";
|
|
8
|
+
import { n as normalizeIMessageGuid } from "./reaction-context-Br-vAJFp.mjs";
|
|
9
|
+
import { r as resolveAuthorizedIMessageReplyReference, t as withIMessageRemoteFile } from "./remote-file-4RbwiXYh.mjs";
|
|
10
|
+
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
11
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
11
12
|
import { createLazyRuntimeSurface } from "openclaw/plugin-sdk/lazy-runtime";
|
|
12
13
|
import { accessSync, constants } from "node:fs";
|
|
13
14
|
import { basename } from "node:path";
|
|
14
|
-
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
15
15
|
import { logVerbose, sleep } from "openclaw/plugin-sdk/runtime-env";
|
|
16
16
|
import { extractOriginalFilename, kindFromMime, resolveOutboundAttachmentFromUrl } from "openclaw/plugin-sdk/media-runtime";
|
|
17
17
|
import { asDateTimestampMs } from "openclaw/plugin-sdk/number-runtime";
|
|
18
|
+
import { resolveRuntimeWorkerUrl } from "openclaw/plugin-sdk/process-runtime";
|
|
18
19
|
import { PlatformMessageNotDispatchedError, isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
|
|
19
20
|
import { addApprovalReactionHintToText, createApprovalReactionTargetStore, listApprovalReactionBindings } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
20
21
|
import { convertMarkdownTables, stripInlineDirectiveTagsForDelivery } from "openclaw/plugin-sdk/text-chunking";
|
|
21
22
|
import { createChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
|
|
22
|
-
import {
|
|
23
|
+
import { openSqliteWorkerStore } from "openclaw/plugin-sdk/sqlite-runtime";
|
|
23
24
|
import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
|
|
24
25
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
25
26
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
@@ -176,7 +177,7 @@ function mapSentPollOptionsToDecisions(params) {
|
|
|
176
177
|
}
|
|
177
178
|
return seenDecisions.size === params.requested.length ? mapped : [];
|
|
178
179
|
}
|
|
179
|
-
function registerIMessageApprovalPollTarget(params) {
|
|
180
|
+
async function registerIMessageApprovalPollTarget(params) {
|
|
180
181
|
const accountId = params.accountId.trim();
|
|
181
182
|
const approvalId = params.approvalId.trim();
|
|
182
183
|
const expiresAtMs = asDateTimestampMs(params.expiresAtMs);
|
|
@@ -194,28 +195,23 @@ function registerIMessageApprovalPollTarget(params) {
|
|
|
194
195
|
approvalKind: params.approvalKind,
|
|
195
196
|
optionDecisions: params.optionDecisions
|
|
196
197
|
};
|
|
197
|
-
|
|
198
|
-
pollTargets.register(key, target, { ttlMs });
|
|
199
|
-
pollTombstones.register(key, { approvalId }, { ttlMs: TOMBSTONE_TTL_MS });
|
|
200
|
-
}
|
|
198
|
+
await Promise.all(keys.flatMap((key) => [pollTargets.register(key, target, { ttlMs }), pollTombstones.register(key, { approvalId }, { ttlMs: TOMBSTONE_TTL_MS })]));
|
|
201
199
|
return true;
|
|
202
200
|
}
|
|
203
|
-
function unregisterIMessageApprovalPollTarget(params) {
|
|
204
|
-
|
|
201
|
+
async function unregisterIMessageApprovalPollTarget(params) {
|
|
202
|
+
const keys = enumeratePollTargetKeys({
|
|
205
203
|
accountId: params.accountId,
|
|
206
204
|
conversation: params.conversation,
|
|
207
205
|
pollGuid: params.pollGuid,
|
|
208
206
|
optionIds: params.optionDecisions?.map(([optionId]) => optionId)
|
|
209
|
-
})
|
|
210
|
-
|
|
211
|
-
pollTombstones.register(key, { approvalId: params.approvalId ?? "" }, { ttlMs: TOMBSTONE_TTL_MS });
|
|
212
|
-
}
|
|
207
|
+
});
|
|
208
|
+
await Promise.all(keys.flatMap((key) => [pollTargets.delete(key), pollTombstones.register(key, { approvalId: params.approvalId ?? "" }, { ttlMs: TOMBSTONE_TTL_MS })]));
|
|
213
209
|
}
|
|
214
210
|
/**
|
|
215
211
|
* Consume votes for a poll that was created but could not be safely bound.
|
|
216
212
|
* Messages has no reliable retract primitive for this balloon.
|
|
217
213
|
*/
|
|
218
|
-
function registerIMessageApprovalPollTombstone(params) {
|
|
214
|
+
async function registerIMessageApprovalPollTombstone(params) {
|
|
219
215
|
const keys = enumeratePollTargetKeys({
|
|
220
216
|
accountId: params.accountId,
|
|
221
217
|
conversation: params.conversation,
|
|
@@ -223,7 +219,7 @@ function registerIMessageApprovalPollTombstone(params) {
|
|
|
223
219
|
optionIds: params.optionIds
|
|
224
220
|
});
|
|
225
221
|
if (keys.length === 0) return false;
|
|
226
|
-
|
|
222
|
+
await Promise.all(keys.map((key) => pollTombstones.register(key, { approvalId: params.approvalId }, { ttlMs: TOMBSTONE_TTL_MS })));
|
|
227
223
|
return true;
|
|
228
224
|
}
|
|
229
225
|
function enumeratePollTargetKeys(params) {
|
|
@@ -413,7 +409,7 @@ async function maybeResolveIMessageApprovalPollVote(params) {
|
|
|
413
409
|
gatewayUrl: params.gatewayUrl,
|
|
414
410
|
...params.gatewayRuntime ? { gatewayRuntime: params.gatewayRuntime } : {}
|
|
415
411
|
});
|
|
416
|
-
unregisterIMessageApprovalPollTarget({
|
|
412
|
+
await unregisterIMessageApprovalPollTarget({
|
|
417
413
|
...lookupKey,
|
|
418
414
|
optionDecisions: target.optionDecisions,
|
|
419
415
|
approvalId: target.approvalId
|
|
@@ -426,7 +422,7 @@ async function maybeResolveIMessageApprovalPollVote(params) {
|
|
|
426
422
|
return true;
|
|
427
423
|
} catch (error) {
|
|
428
424
|
if (isApprovalNotFoundError(error)) {
|
|
429
|
-
unregisterIMessageApprovalPollTarget({
|
|
425
|
+
await unregisterIMessageApprovalPollTarget({
|
|
430
426
|
...lookupKey,
|
|
431
427
|
optionDecisions: target.optionDecisions,
|
|
432
428
|
approvalId: target.approvalId
|
|
@@ -474,7 +470,6 @@ function normalizeMessageId(messageId) {
|
|
|
474
470
|
if (!normalized || normalized === "ok" || normalized === "unknown") return;
|
|
475
471
|
return normalized;
|
|
476
472
|
}
|
|
477
|
-
let mirror = null;
|
|
478
473
|
let persistenceFailureLogged = false;
|
|
479
474
|
function reportFailure(scope, err) {
|
|
480
475
|
if (persistenceFailureLogged) return;
|
|
@@ -491,7 +486,7 @@ function normalizeMedia(media) {
|
|
|
491
486
|
};
|
|
492
487
|
}
|
|
493
488
|
function openPersistedEchoStore() {
|
|
494
|
-
return getIMessageRuntime().state.
|
|
489
|
+
return getIMessageRuntime().state.openKeyedStore({
|
|
495
490
|
namespace: IMESSAGE_SENT_ECHOES_NAMESPACE,
|
|
496
491
|
maxEntries: 256
|
|
497
492
|
});
|
|
@@ -508,31 +503,27 @@ function isLiveEntry(entry, now = Date.now()) {
|
|
|
508
503
|
const cutoff = now - IMESSAGE_SENT_ECHOES_TTL_MS;
|
|
509
504
|
return entry.timestamp >= cutoff && (entry.expiresAt == null || entry.expiresAt > now);
|
|
510
505
|
}
|
|
511
|
-
function
|
|
506
|
+
async function readRecentEntries() {
|
|
512
507
|
try {
|
|
513
|
-
|
|
508
|
+
return (await openPersistedEchoStore().entries()).map(({ value }) => value).filter((entry) => isLiveEntry(entry)).toSorted((a, b) => a.timestamp - b.timestamp).slice(-256);
|
|
514
509
|
} catch (err) {
|
|
515
510
|
reportFailure("read", err);
|
|
516
|
-
|
|
511
|
+
return [];
|
|
517
512
|
}
|
|
518
513
|
}
|
|
519
|
-
function
|
|
520
|
-
loadMirrorFromStore();
|
|
521
|
-
return mirror ?? [];
|
|
522
|
-
}
|
|
523
|
-
function persistEntry(entry, ttlMs) {
|
|
514
|
+
async function persistEntry(entry, ttlMs) {
|
|
524
515
|
const effectiveTtlMs = resolveEntryTtlMs(entry, ttlMs);
|
|
525
516
|
if (!effectiveTtlMs) return;
|
|
526
517
|
const key = resolveIMessageSentEchoEntryKey(entry);
|
|
527
518
|
try {
|
|
528
|
-
openPersistedEchoStore().register(key, entry, { ttlMs: effectiveTtlMs });
|
|
519
|
+
await openPersistedEchoStore().register(key, entry, { ttlMs: effectiveTtlMs });
|
|
529
520
|
} catch (err) {
|
|
530
521
|
reportFailure("write", err);
|
|
531
522
|
return;
|
|
532
523
|
}
|
|
533
524
|
return key;
|
|
534
525
|
}
|
|
535
|
-
function rememberPersistedIMessageEcho(params) {
|
|
526
|
+
async function rememberPersistedIMessageEcho(params) {
|
|
536
527
|
const text = normalizeText(params.text);
|
|
537
528
|
const media = normalizeMedia(params.media);
|
|
538
529
|
const messageId = normalizeMessageId(params.messageId);
|
|
@@ -546,26 +537,22 @@ function rememberPersistedIMessageEcho(params) {
|
|
|
546
537
|
};
|
|
547
538
|
if (typeof params.ttlMs === "number" && Number.isFinite(params.ttlMs) && params.ttlMs > 0) entry.expiresAt = entry.timestamp + params.ttlMs;
|
|
548
539
|
if (!entry.text && !entry.media && !entry.messageId) return;
|
|
549
|
-
|
|
550
|
-
const key = persistEntry(entry, params.ttlMs);
|
|
551
|
-
mirror = [...mirror ?? [], entry].filter((candidate) => isLiveEntry(candidate)).slice(-256);
|
|
552
|
-
return key;
|
|
540
|
+
return await persistEntry(entry, params.ttlMs);
|
|
553
541
|
}
|
|
554
|
-
function forgetPersistedIMessageEchoKey(key) {
|
|
542
|
+
async function forgetPersistedIMessageEchoKey(key) {
|
|
555
543
|
if (!key) return;
|
|
556
544
|
try {
|
|
557
|
-
openPersistedEchoStore().delete(key);
|
|
545
|
+
await openPersistedEchoStore().delete(key);
|
|
558
546
|
} catch (err) {
|
|
559
547
|
reportFailure("delete", err);
|
|
560
548
|
}
|
|
561
|
-
mirror = (mirror ?? []).filter((entry) => resolveIMessageSentEchoEntryKey(entry) !== key);
|
|
562
549
|
}
|
|
563
|
-
function hasPersistedIMessageEcho(params) {
|
|
550
|
+
async function hasPersistedIMessageEcho(params) {
|
|
564
551
|
const text = normalizeText(params.text);
|
|
565
552
|
const mediaKey = resolveIMessageEchoMediaKey(params.media);
|
|
566
553
|
const messageId = normalizeMessageId(params.messageId);
|
|
567
554
|
if (!text && !mediaKey && !messageId) return false;
|
|
568
|
-
for (const entry of readRecentEntries()) {
|
|
555
|
+
for (const entry of await readRecentEntries()) {
|
|
569
556
|
if (entry.scope !== params.scope) continue;
|
|
570
557
|
if (messageId && entry.messageId === messageId) return true;
|
|
571
558
|
const hasConflictingMessageIds = Boolean(messageId && entry.messageId && messageId !== entry.messageId);
|
|
@@ -575,6 +562,59 @@ function hasPersistedIMessageEcho(params) {
|
|
|
575
562
|
return false;
|
|
576
563
|
}
|
|
577
564
|
//#endregion
|
|
565
|
+
//#region extensions/imessage/src/send-receipt-db.ts
|
|
566
|
+
async function withIMessageReceiptGuidReader(databasePath, use) {
|
|
567
|
+
let store;
|
|
568
|
+
let closed = false;
|
|
569
|
+
const read = async (command) => {
|
|
570
|
+
if (closed) throw new Error("iMessage receipt lookup is closed");
|
|
571
|
+
try {
|
|
572
|
+
store ??= await openSqliteWorkerStore({
|
|
573
|
+
moduleUrl: resolveRuntimeWorkerUrl({
|
|
574
|
+
currentModuleUrl: import.meta.url,
|
|
575
|
+
sourceWorkerName: "send-receipt-db.worker",
|
|
576
|
+
distWorkerPath: "extensions/imessage/src/send-receipt-db.worker.js",
|
|
577
|
+
package: {
|
|
578
|
+
name: "@openclaw/imessage",
|
|
579
|
+
distWorkerPath: "src/send-receipt-db.worker.js"
|
|
580
|
+
}
|
|
581
|
+
}),
|
|
582
|
+
databasePath,
|
|
583
|
+
existingOnly: true,
|
|
584
|
+
input: void 0
|
|
585
|
+
});
|
|
586
|
+
return store ? await store.execute(command) : null;
|
|
587
|
+
} catch {
|
|
588
|
+
return null;
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
try {
|
|
592
|
+
return await use(read);
|
|
593
|
+
} finally {
|
|
594
|
+
closed = true;
|
|
595
|
+
try {
|
|
596
|
+
await store?.close();
|
|
597
|
+
} catch {}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
//#endregion
|
|
601
|
+
//#region extensions/imessage/src/send-transport.ts
|
|
602
|
+
function normalizeIMessageRpcSendError(error) {
|
|
603
|
+
if (!(error instanceof IMessageRpcRequestError)) return error;
|
|
604
|
+
const data = asOptionalRecord(error.data);
|
|
605
|
+
return data?.disposition === "not_started" && data.retry_safe === true ? new PlatformMessageNotDispatchedError(error.message, { cause: error }) : error;
|
|
606
|
+
}
|
|
607
|
+
async function requestIMessageRpcSend(client, method, params, timeoutMs, handoff) {
|
|
608
|
+
handoff.assertDirectAdapterHandoff?.();
|
|
609
|
+
await handoff.onPlatformSendDispatch?.();
|
|
610
|
+
handoff.assertDirectAdapterHandoff?.();
|
|
611
|
+
try {
|
|
612
|
+
return await client.request(method, params, { timeoutMs });
|
|
613
|
+
} catch (error) {
|
|
614
|
+
throw normalizeIMessageRpcSendError(error);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
//#endregion
|
|
578
618
|
//#region extensions/imessage/src/send.ts
|
|
579
619
|
const MIN_PENDING_PERSISTED_ECHO_TTL_MS = 6e4;
|
|
580
620
|
const PENDING_PERSISTED_ECHO_GRACE_MS = 5e3;
|
|
@@ -609,79 +649,14 @@ function normalizeResolvedMessageGuid(value) {
|
|
|
609
649
|
const trimmed = value.trim();
|
|
610
650
|
return isConcreteIMessageMessageId(trimmed) && !isNumericMessageRowId(trimmed) ? trimmed : null;
|
|
611
651
|
}
|
|
612
|
-
function resolveMessageGuidFromChatDb(params) {
|
|
652
|
+
async function resolveMessageGuidFromChatDb(params) {
|
|
613
653
|
const dbPath = params.dbPath?.trim();
|
|
614
654
|
const messageId = params.messageId.trim();
|
|
615
655
|
if (!dbPath || !isNumericMessageRowId(messageId)) return null;
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
} catch {
|
|
621
|
-
return null;
|
|
622
|
-
} finally {
|
|
623
|
-
try {
|
|
624
|
-
db?.close();
|
|
625
|
-
} catch {}
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
function getStringRowValue(row, key) {
|
|
629
|
-
return normalizeResolvedMessageGuid(row?.[key]);
|
|
630
|
-
}
|
|
631
|
-
function appleMessageDateLowerBoundMs(sentAfterMs) {
|
|
632
|
-
if (!Number.isFinite(sentAfterMs)) return null;
|
|
633
|
-
return Math.max(0, Math.floor((sentAfterMs - 9783072e5 - 5e3) * 1e6));
|
|
634
|
-
}
|
|
635
|
-
function resolveLatestSentMessageGuidFromChatDb(params) {
|
|
636
|
-
const dbPath = params.dbPath?.trim();
|
|
637
|
-
if (!dbPath) return null;
|
|
638
|
-
let db = null;
|
|
639
|
-
try {
|
|
640
|
-
db = openNodeSqliteDatabase(dbPath, { readOnly: true });
|
|
641
|
-
const targetClauses = [];
|
|
642
|
-
const targetParams = [];
|
|
643
|
-
const lowerBound = appleMessageDateLowerBoundMs(params.sentAfterMs);
|
|
644
|
-
if (params.text) {
|
|
645
|
-
targetClauses.push("m.text = ?");
|
|
646
|
-
targetParams.push(params.text);
|
|
647
|
-
}
|
|
648
|
-
if (lowerBound !== null) {
|
|
649
|
-
targetClauses.push("m.date >= ?");
|
|
650
|
-
targetParams.push(lowerBound);
|
|
651
|
-
}
|
|
652
|
-
if (params.target.kind === "chat_id") {
|
|
653
|
-
targetClauses.push("cmj.chat_id = ?");
|
|
654
|
-
targetParams.push(params.target.chatId);
|
|
655
|
-
} else if (params.target.kind === "chat_guid") {
|
|
656
|
-
targetClauses.push("c.guid = ?");
|
|
657
|
-
targetParams.push(params.target.chatGuid);
|
|
658
|
-
} else if (params.target.kind === "chat_identifier") {
|
|
659
|
-
targetClauses.push("c.chat_identifier = ?");
|
|
660
|
-
targetParams.push(params.target.chatIdentifier);
|
|
661
|
-
} else {
|
|
662
|
-
const normalizedHandle = normalizeIMessageHandle(params.target.to);
|
|
663
|
-
targetClauses.push("(h.id = ? OR h.uncanonicalized_id = ?)");
|
|
664
|
-
targetParams.push(normalizedHandle, params.target.to);
|
|
665
|
-
}
|
|
666
|
-
const selectSql = `
|
|
667
|
-
SELECT m.guid
|
|
668
|
-
FROM message m
|
|
669
|
-
LEFT JOIN chat_message_join cmj ON cmj.message_id = m.ROWID
|
|
670
|
-
LEFT JOIN chat c ON c.ROWID = cmj.chat_id
|
|
671
|
-
LEFT JOIN handle h ON h.ROWID = m.handle_id
|
|
672
|
-
WHERE m.is_from_me = 1
|
|
673
|
-
${targetClauses.length ? `AND ${targetClauses.join(" AND ")}` : ""}
|
|
674
|
-
ORDER BY m.date DESC, m.ROWID DESC
|
|
675
|
-
LIMIT 10
|
|
676
|
-
`;
|
|
677
|
-
return getStringRowValue(db.prepare(selectSql).all(...targetParams)[0], "guid");
|
|
678
|
-
} catch {
|
|
679
|
-
return null;
|
|
680
|
-
} finally {
|
|
681
|
-
try {
|
|
682
|
-
db?.close();
|
|
683
|
-
} catch {}
|
|
684
|
-
}
|
|
656
|
+
return normalizeResolvedMessageGuid(await withIMessageReceiptGuidReader(dbPath, (read) => read({
|
|
657
|
+
type: "messageGuid",
|
|
658
|
+
input: { messageId }
|
|
659
|
+
})));
|
|
685
660
|
}
|
|
686
661
|
function canResolveLatestSentMessageGuidFromChatDb(dbPath) {
|
|
687
662
|
const normalizedDbPath = dbPath?.trim();
|
|
@@ -704,21 +679,33 @@ async function resolveApprovalBindingMessageGuid(params) {
|
|
|
704
679
|
}));
|
|
705
680
|
}
|
|
706
681
|
async function resolveFallbackSentMessageGuid(params) {
|
|
707
|
-
const
|
|
708
|
-
if (!params.resolveSentMessageGuidImpl && !canResolveLatestSentMessageGuidFromChatDb(
|
|
682
|
+
const dbPath = params.dbPath?.trim();
|
|
683
|
+
if (!params.resolveSentMessageGuidImpl && !canResolveLatestSentMessageGuidFromChatDb(dbPath)) return null;
|
|
709
684
|
const deadlineMs = Date.now() + 5e3;
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
685
|
+
const poll = async (resolver) => {
|
|
686
|
+
while (Date.now() <= deadlineMs) {
|
|
687
|
+
const resolved = normalizeResolvedMessageGuid(await resolver({
|
|
688
|
+
dbPath: params.dbPath,
|
|
689
|
+
target: params.target,
|
|
690
|
+
text: params.text,
|
|
691
|
+
sentAfterMs: params.sentAfterMs
|
|
692
|
+
}));
|
|
693
|
+
if (resolved) return resolved;
|
|
694
|
+
if (Date.now() >= deadlineMs) return null;
|
|
695
|
+
await sleep(250);
|
|
696
|
+
}
|
|
697
|
+
return null;
|
|
698
|
+
};
|
|
699
|
+
if (params.resolveSentMessageGuidImpl) return await poll(params.resolveSentMessageGuidImpl);
|
|
700
|
+
if (!dbPath) return null;
|
|
701
|
+
return await withIMessageReceiptGuidReader(dbPath, (read) => poll(({ target, text, sentAfterMs }) => read({
|
|
702
|
+
type: "latestSentGuid",
|
|
703
|
+
input: {
|
|
704
|
+
target,
|
|
705
|
+
text,
|
|
706
|
+
sentAfterMs
|
|
707
|
+
}
|
|
708
|
+
})));
|
|
722
709
|
}
|
|
723
710
|
function shouldRecoverApprovalPromptGuid(params) {
|
|
724
711
|
return Boolean(params.approvalPrompt && !params.filePath && !params.replyToId);
|
|
@@ -781,30 +768,10 @@ function resolveIMessageSendFailure(result) {
|
|
|
781
768
|
if (result.success !== false) return null;
|
|
782
769
|
return typeof result.error === "string" && result.error.trim() ? result.error.trim() : "iMessage action failed";
|
|
783
770
|
}
|
|
784
|
-
function normalizeIMessageRpcSendError(error) {
|
|
785
|
-
if (!(error instanceof IMessageRpcRequestError)) return error;
|
|
786
|
-
const data = asOptionalRecord(error.data);
|
|
787
|
-
return data?.disposition === "not_started" && data.retry_safe === true ? new PlatformMessageNotDispatchedError(error.message, { cause: error }) : error;
|
|
788
|
-
}
|
|
789
|
-
async function requestIMessageRpcSend(client, method, params, timeoutMs) {
|
|
790
|
-
try {
|
|
791
|
-
return await client.request(method, params, { timeoutMs });
|
|
792
|
-
} catch (error) {
|
|
793
|
-
throw normalizeIMessageRpcSendError(error);
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
771
|
function isIMessageRpcSendTimeout(error) {
|
|
797
772
|
const message = error instanceof Error ? error.message : String(error);
|
|
798
773
|
return /imsg rpc timeout \(send\)/i.test(message);
|
|
799
774
|
}
|
|
800
|
-
async function runIMessageCliJson(cliPath, dbPath, args, timeoutMs) {
|
|
801
|
-
return await runIMessageCliJsonCommand({
|
|
802
|
-
args,
|
|
803
|
-
cliPath,
|
|
804
|
-
dbPath,
|
|
805
|
-
timeoutMs
|
|
806
|
-
});
|
|
807
|
-
}
|
|
808
775
|
function resultService(value) {
|
|
809
776
|
const normalized = normalizeOptionalString(value)?.toLowerCase();
|
|
810
777
|
return normalized === "imessage" || normalized === "sms" ? normalized : void 0;
|
|
@@ -868,6 +835,7 @@ async function trySendAttachmentForTarget(params) {
|
|
|
868
835
|
if (params.audioAsVoice) throw new Error("iMessage voice messages require an existing chat and bridge transport.");
|
|
869
836
|
return null;
|
|
870
837
|
}
|
|
838
|
+
params.assertDirectAdapterHandoff?.();
|
|
871
839
|
const echoScope = resolveOutboundEchoScope({
|
|
872
840
|
accountId: params.accountId,
|
|
873
841
|
target: params.target
|
|
@@ -875,7 +843,7 @@ async function trySendAttachmentForTarget(params) {
|
|
|
875
843
|
let result;
|
|
876
844
|
let pendingEchoKey;
|
|
877
845
|
try {
|
|
878
|
-
if (echoScope) pendingEchoKey = rememberPersistedIMessageEcho({
|
|
846
|
+
if (echoScope) pendingEchoKey = await rememberPersistedIMessageEcho({
|
|
879
847
|
scope: echoScope,
|
|
880
848
|
text: params.echoText,
|
|
881
849
|
media: params.echoMedia,
|
|
@@ -890,6 +858,7 @@ async function trySendAttachmentForTarget(params) {
|
|
|
890
858
|
remoteHost: params.remoteHost,
|
|
891
859
|
localPath: attachmentPath,
|
|
892
860
|
timeoutMs: params.timeoutMs,
|
|
861
|
+
assertDirectAdapterHandoff: params.assertDirectAdapterHandoff,
|
|
893
862
|
use: async (remotePath) => {
|
|
894
863
|
const rpcParams = {
|
|
895
864
|
file: remotePath,
|
|
@@ -903,6 +872,9 @@ async function trySendAttachmentForTarget(params) {
|
|
|
903
872
|
}
|
|
904
873
|
});
|
|
905
874
|
}
|
|
875
|
+
params.assertDirectAdapterHandoff?.();
|
|
876
|
+
await params.onPlatformSendDispatch?.();
|
|
877
|
+
params.assertDirectAdapterHandoff?.();
|
|
906
878
|
return await params.runCliJson([
|
|
907
879
|
"send-attachment",
|
|
908
880
|
"--chat",
|
|
@@ -916,14 +888,14 @@ async function trySendAttachmentForTarget(params) {
|
|
|
916
888
|
]);
|
|
917
889
|
});
|
|
918
890
|
} catch (error) {
|
|
919
|
-
forgetPersistedIMessageEchoKey(pendingEchoKey);
|
|
891
|
+
await forgetPersistedIMessageEchoKey(pendingEchoKey);
|
|
920
892
|
if (!params.audioAsVoice && isAttachmentCommandFallbackError(error)) return null;
|
|
921
893
|
throw error;
|
|
922
894
|
}
|
|
923
895
|
const failure = resolveIMessageSendFailure(result);
|
|
924
896
|
if (failure) {
|
|
925
897
|
const error = new Error(failure);
|
|
926
|
-
forgetPersistedIMessageEchoKey(pendingEchoKey);
|
|
898
|
+
await forgetPersistedIMessageEchoKey(pendingEchoKey);
|
|
927
899
|
if (!params.audioAsVoice && isAttachmentCommandFallbackError(error)) return null;
|
|
928
900
|
throw error;
|
|
929
901
|
}
|
|
@@ -935,13 +907,13 @@ async function trySendAttachmentForTarget(params) {
|
|
|
935
907
|
resolveMessageGuidImpl: params.resolveMessageGuidImpl
|
|
936
908
|
});
|
|
937
909
|
const messageId = resolvedId ?? (result.ok || result.success ? "ok" : "unknown");
|
|
938
|
-
if (echoScope) rememberPersistedIMessageEcho({
|
|
910
|
+
if (echoScope) await rememberPersistedIMessageEcho({
|
|
939
911
|
scope: echoScope,
|
|
940
912
|
text: params.echoText,
|
|
941
913
|
media: params.echoMedia,
|
|
942
914
|
messageId: resolvedId ?? void 0
|
|
943
915
|
});
|
|
944
|
-
if (resolvedId && isConcreteIMessageMessageId(resolvedId)) rememberIMessageReplyCache({
|
|
916
|
+
if (resolvedId && isConcreteIMessageMessageId(resolvedId)) await rememberIMessageReplyCache({
|
|
945
917
|
accountId: params.accountId,
|
|
946
918
|
messageId: resolvedId,
|
|
947
919
|
chatGuid: params.target.kind === "chat_guid" ? params.target.chatGuid : params.target.kind === "chat_id" ? attachmentChatTarget : void 0,
|
|
@@ -966,6 +938,7 @@ async function trySendAttachmentForTarget(params) {
|
|
|
966
938
|
}
|
|
967
939
|
async function sendMessageIMessage(to, text, opts) {
|
|
968
940
|
const cfg = requireRuntimeConfig(opts.config, "iMessage send");
|
|
941
|
+
opts.assertDirectAdapterHandoff?.();
|
|
969
942
|
const account = opts.account ?? resolveIMessageAccount({
|
|
970
943
|
cfg,
|
|
971
944
|
accountId: opts.accountId
|
|
@@ -976,6 +949,7 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
976
949
|
cliPath,
|
|
977
950
|
remoteHost: account.config.remoteHost
|
|
978
951
|
});
|
|
952
|
+
opts.assertDirectAdapterHandoff?.();
|
|
979
953
|
const chatDbLookupPath = resolveIMessageChatDbLookupPath({
|
|
980
954
|
cliPath,
|
|
981
955
|
dbPath,
|
|
@@ -984,7 +958,7 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
984
958
|
const target = parseIMessageTarget(opts.chatId ? formatIMessageChatTarget(opts.chatId) : to);
|
|
985
959
|
const service = opts.service ?? resolveTargetService(target) ?? account.config.service;
|
|
986
960
|
const sendTransport = account.config.sendTransport ?? "auto";
|
|
987
|
-
const resolvedReplyToId = resolveAuthorizedIMessageReplyReference({
|
|
961
|
+
const resolvedReplyToId = await resolveAuthorizedIMessageReplyReference({
|
|
988
962
|
account,
|
|
989
963
|
target,
|
|
990
964
|
cliPath,
|
|
@@ -1001,6 +975,7 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1001
975
|
replyToId: opts.replyToId,
|
|
1002
976
|
conversationReadOrigin: opts.conversationReadOrigin
|
|
1003
977
|
});
|
|
978
|
+
opts.assertDirectAdapterHandoff?.();
|
|
1004
979
|
const timeoutMs = opts.timeoutMs ?? Math.max(account.config.probeTimeoutMs ?? 0, 18e4);
|
|
1005
980
|
const pendingEchoTtlMs = resolvePendingPersistedEchoTtlMs(timeoutMs);
|
|
1006
981
|
const region = opts.region?.trim() || account.config.region?.trim() || "US";
|
|
@@ -1021,6 +996,7 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1021
996
|
});
|
|
1022
997
|
filePath = resolved.path;
|
|
1023
998
|
mediaContentType = resolved.contentType ?? void 0;
|
|
999
|
+
opts.assertDirectAdapterHandoff?.();
|
|
1024
1000
|
}
|
|
1025
1001
|
if (!message.trim() && !filePath) throw new Error("iMessage send requires text or media");
|
|
1026
1002
|
if (message.trim()) {
|
|
@@ -1046,8 +1022,18 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1046
1022
|
const echoText = resolveOutboundEchoText(message);
|
|
1047
1023
|
const echoMedia = filePath ? resolveOutboundEchoMedia(mediaContentType) : void 0;
|
|
1048
1024
|
let effectiveReplyToId = resolvedReplyToId;
|
|
1049
|
-
const
|
|
1025
|
+
const runCli = opts.runCliJson ?? ((args) => runIMessageCliJsonCommand({
|
|
1026
|
+
args,
|
|
1027
|
+
cliPath,
|
|
1028
|
+
dbPath,
|
|
1029
|
+
timeoutMs
|
|
1030
|
+
}));
|
|
1031
|
+
const runCliJson = async (args) => {
|
|
1032
|
+
opts.assertDirectAdapterHandoff?.();
|
|
1033
|
+
return await runCli(args);
|
|
1034
|
+
};
|
|
1050
1035
|
const requestOwnedRpc = async (method, rpcParams) => {
|
|
1036
|
+
opts.assertDirectAdapterHandoff?.();
|
|
1051
1037
|
const rpcClient = opts.createClient ? await opts.createClient({
|
|
1052
1038
|
cliPath,
|
|
1053
1039
|
dbPath,
|
|
@@ -1058,7 +1044,7 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1058
1044
|
remoteHost
|
|
1059
1045
|
});
|
|
1060
1046
|
try {
|
|
1061
|
-
return await requestIMessageRpcSend(rpcClient, method, rpcParams, timeoutMs);
|
|
1047
|
+
return await requestIMessageRpcSend(rpcClient, method, rpcParams, timeoutMs, opts);
|
|
1062
1048
|
} finally {
|
|
1063
1049
|
await rpcClient.stop();
|
|
1064
1050
|
}
|
|
@@ -1081,7 +1067,9 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1081
1067
|
runCliJson,
|
|
1082
1068
|
requestRpc: requestOwnedRpc,
|
|
1083
1069
|
withRemoteFile,
|
|
1084
|
-
resolveMessageGuidImpl: opts.resolveMessageGuidImpl
|
|
1070
|
+
resolveMessageGuidImpl: opts.resolveMessageGuidImpl,
|
|
1071
|
+
assertDirectAdapterHandoff: opts.assertDirectAdapterHandoff,
|
|
1072
|
+
onPlatformSendDispatch: opts.onPlatformSendDispatch
|
|
1085
1073
|
});
|
|
1086
1074
|
if (attachmentResult) {
|
|
1087
1075
|
if (!message.trim()) return attachmentResult;
|
|
@@ -1138,6 +1126,7 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1138
1126
|
accountId: account.accountId,
|
|
1139
1127
|
target
|
|
1140
1128
|
});
|
|
1129
|
+
opts.assertDirectAdapterHandoff?.();
|
|
1141
1130
|
const client = opts.client ?? (opts.createClient ? await opts.createClient({
|
|
1142
1131
|
cliPath,
|
|
1143
1132
|
dbPath,
|
|
@@ -1148,19 +1137,14 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1148
1137
|
remoteHost
|
|
1149
1138
|
}));
|
|
1150
1139
|
const shouldClose = !opts.client;
|
|
1151
|
-
let closedClient = false;
|
|
1152
|
-
const stopOwnedClient = async () => {
|
|
1153
|
-
if (!shouldClose || closedClient) return;
|
|
1154
|
-
closedClient = true;
|
|
1155
|
-
await client.stop();
|
|
1156
|
-
};
|
|
1157
1140
|
const requestSuccessfulSend = async (sendParams) => {
|
|
1158
|
-
const request = async (nativeParams) => await requestIMessageRpcSend(client, "send", nativeParams, timeoutMs);
|
|
1141
|
+
const request = async (nativeParams) => await requestIMessageRpcSend(client, "send", nativeParams, timeoutMs, opts);
|
|
1159
1142
|
const response = filePath ? await withOriginalIMessageAttachmentPath(filePath, async (attachmentPath) => {
|
|
1160
1143
|
if (remoteHost) return await withRemoteFile({
|
|
1161
1144
|
remoteHost,
|
|
1162
1145
|
localPath: attachmentPath,
|
|
1163
1146
|
timeoutMs,
|
|
1147
|
+
assertDirectAdapterHandoff: opts.assertDirectAdapterHandoff,
|
|
1164
1148
|
use: async (remotePath) => request({
|
|
1165
1149
|
...sendParams,
|
|
1166
1150
|
file: remotePath
|
|
@@ -1180,7 +1164,7 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1180
1164
|
let pendingEchoKey;
|
|
1181
1165
|
try {
|
|
1182
1166
|
try {
|
|
1183
|
-
if (echoScope) pendingEchoKey = rememberPersistedIMessageEcho({
|
|
1167
|
+
if (echoScope) pendingEchoKey = await rememberPersistedIMessageEcho({
|
|
1184
1168
|
scope: echoScope,
|
|
1185
1169
|
text: echoText,
|
|
1186
1170
|
media: echoMedia,
|
|
@@ -1237,7 +1221,7 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1237
1221
|
sentAfterMs: sendStartedAtMs,
|
|
1238
1222
|
resolveSentMessageGuidImpl: opts.resolveSentMessageGuidImpl
|
|
1239
1223
|
});
|
|
1240
|
-
if (echoScope) rememberPersistedIMessageEcho({
|
|
1224
|
+
if (echoScope) await rememberPersistedIMessageEcho({
|
|
1241
1225
|
scope: echoScope,
|
|
1242
1226
|
text: echoText,
|
|
1243
1227
|
media: echoMedia,
|
|
@@ -1247,7 +1231,7 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1247
1231
|
const confirmedService = resolveIMessageDirectChatService(resultService(result.service) ?? service, providerChatGuid);
|
|
1248
1232
|
if (resolvedId && isConcreteIMessageMessageId(resolvedId)) {
|
|
1249
1233
|
const chatContext = chatContextFromIMessageTarget(target, confirmedService ?? service);
|
|
1250
|
-
rememberIMessageReplyCache({
|
|
1234
|
+
await rememberIMessageReplyCache({
|
|
1251
1235
|
accountId: account.accountId,
|
|
1252
1236
|
messageId: resolvedId,
|
|
1253
1237
|
...chatContext,
|
|
@@ -1264,7 +1248,7 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1264
1248
|
...target.kind === "chat_id" ? { chatId: target.chatId } : {},
|
|
1265
1249
|
...handleForKey ? { handle: handleForKey } : {}
|
|
1266
1250
|
};
|
|
1267
|
-
registerIMessageApprovalReactionTarget({
|
|
1251
|
+
await registerIMessageApprovalReactionTarget({
|
|
1268
1252
|
accountId: account.accountId,
|
|
1269
1253
|
conversation,
|
|
1270
1254
|
messageId: approvalBindingMessageId,
|
|
@@ -1289,10 +1273,10 @@ async function sendMessageIMessage(to, text, opts) {
|
|
|
1289
1273
|
})
|
|
1290
1274
|
};
|
|
1291
1275
|
} catch (error) {
|
|
1292
|
-
forgetPersistedIMessageEchoKey(pendingEchoKey);
|
|
1276
|
+
await forgetPersistedIMessageEchoKey(pendingEchoKey);
|
|
1293
1277
|
throw error;
|
|
1294
1278
|
} finally {
|
|
1295
|
-
await
|
|
1279
|
+
if (shouldClose) await client.stop();
|
|
1296
1280
|
}
|
|
1297
1281
|
}
|
|
1298
1282
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount } from "./accounts-
|
|
2
|
-
import { a as IMESSAGE_REPLY_CACHE_NAMESPACE, c as IMESSAGE_SENT_ECHOES_TTL_MS, f as resolveIMessageReplyCacheEntryKey, i as IMESSAGE_REPLY_CACHE_MAX_ENTRIES, l as capFailureRetriesMap, n as IMESSAGE_REPLY_CACHE_COUNTER_KEY, o as IMESSAGE_REPLY_CACHE_TTL_MS, p as resolveIMessageSentEchoEntryKey, r as IMESSAGE_REPLY_CACHE_COUNTER_NAMESPACE, s as IMESSAGE_SENT_ECHOES_NAMESPACE, t as IMESSAGE_CATCHUP_CURSOR_NAMESPACE, u as resolveIMessageCatchupCursorKey } from "./state-contract-DvahEY4X.
|
|
1
|
+
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount } from "./accounts-Dv0uksBG.mjs";
|
|
2
|
+
import { a as IMESSAGE_REPLY_CACHE_NAMESPACE, c as IMESSAGE_SENT_ECHOES_TTL_MS, f as resolveIMessageReplyCacheEntryKey, i as IMESSAGE_REPLY_CACHE_MAX_ENTRIES, l as capFailureRetriesMap, n as IMESSAGE_REPLY_CACHE_COUNTER_KEY, o as IMESSAGE_REPLY_CACHE_TTL_MS, p as resolveIMessageSentEchoEntryKey, r as IMESSAGE_REPLY_CACHE_COUNTER_NAMESPACE, s as IMESSAGE_SENT_ECHOES_NAMESPACE, t as IMESSAGE_CATCHUP_CURSOR_NAMESPACE, u as resolveIMessageCatchupCursorKey } from "./state-contract-DvahEY4X.mjs";
|
|
3
|
+
import { asFiniteNumber, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
4
|
import fs from "node:fs";
|
|
4
5
|
import path from "node:path";
|
|
5
|
-
import { asFiniteNumber, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { fileExists } from "openclaw/plugin-sdk/file-access-runtime";
|
|
8
8
|
import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
|