@openclaw/sms 2026.9.5 → 2026.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icon.png +0 -0
- package/dist/.setup/{media-jI34WkPd.mjs → media-Cmf2YTCW.mjs} +2 -2
- package/dist/channel-plugin-api.js +80 -139
- package/node_modules/zod/README.md +2 -2
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +44 -28
- package/node_modules/zod/src/v4/core/checks.ts +62 -102
- package/node_modules/zod/src/v4/core/compile.ts +218 -93
- package/node_modules/zod/src/v4/core/core.ts +1 -3
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
- package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +14 -4
- package/node_modules/zod/src/v4/core/schemas.ts +296 -132
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
- package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
- package/node_modules/zod/src/v4/core/util.ts +218 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/ar.ts +2 -0
- package/node_modules/zod/src/v4/locales/az.ts +2 -0
- package/node_modules/zod/src/v4/locales/be.ts +2 -0
- package/node_modules/zod/src/v4/locales/bg.ts +2 -0
- package/node_modules/zod/src/v4/locales/bn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ca.ts +2 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
- package/node_modules/zod/src/v4/locales/cs.ts +2 -0
- package/node_modules/zod/src/v4/locales/da.ts +2 -0
- package/node_modules/zod/src/v4/locales/de.ts +2 -0
- package/node_modules/zod/src/v4/locales/el.ts +2 -0
- package/node_modules/zod/src/v4/locales/en.ts +2 -0
- package/node_modules/zod/src/v4/locales/eo.ts +2 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +2 -0
- package/node_modules/zod/src/v4/locales/fi.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr.ts +2 -0
- package/node_modules/zod/src/v4/locales/gu.ts +2 -0
- package/node_modules/zod/src/v4/locales/he.ts +2 -0
- package/node_modules/zod/src/v4/locales/hi.ts +2 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +2 -0
- package/node_modules/zod/src/v4/locales/hy.ts +2 -0
- package/node_modules/zod/src/v4/locales/id.ts +2 -0
- package/node_modules/zod/src/v4/locales/index.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +2 -0
- package/node_modules/zod/src/v4/locales/it.ts +2 -0
- package/node_modules/zod/src/v4/locales/ja.ts +2 -0
- package/node_modules/zod/src/v4/locales/ka.ts +2 -0
- package/node_modules/zod/src/v4/locales/km.ts +2 -0
- package/node_modules/zod/src/v4/locales/kn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ko.ts +2 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ms.ts +2 -0
- package/node_modules/zod/src/v4/locales/ne.ts +2 -0
- package/node_modules/zod/src/v4/locales/nl.ts +2 -0
- package/node_modules/zod/src/v4/locales/nn.ts +2 -0
- package/node_modules/zod/src/v4/locales/no.ts +2 -0
- package/node_modules/zod/src/v4/locales/ota.ts +2 -0
- package/node_modules/zod/src/v4/locales/pl.ts +2 -0
- package/node_modules/zod/src/v4/locales/ps.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt.ts +2 -0
- package/node_modules/zod/src/v4/locales/ro.ts +2 -0
- package/node_modules/zod/src/v4/locales/ru.ts +2 -0
- package/node_modules/zod/src/v4/locales/sk.ts +2 -0
- package/node_modules/zod/src/v4/locales/sl.ts +2 -0
- package/node_modules/zod/src/v4/locales/sv.ts +2 -0
- package/node_modules/zod/src/v4/locales/ta.ts +2 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +2 -0
- package/node_modules/zod/src/v4/locales/tk.ts +2 -0
- package/node_modules/zod/src/v4/locales/tr.ts +2 -0
- package/node_modules/zod/src/v4/locales/uk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ur.ts +2 -0
- package/node_modules/zod/src/v4/locales/uz.ts +2 -0
- package/node_modules/zod/src/v4/locales/vi.ts +2 -0
- package/node_modules/zod/src/v4/locales/yo.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +19 -0
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -35
- package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -33
- package/node_modules/zod/v4/core/api.cjs +45 -22
- package/node_modules/zod/v4/core/api.d.cts +12 -6
- package/node_modules/zod/v4/core/api.d.ts +12 -6
- package/node_modules/zod/v4/core/api.js +25 -22
- package/node_modules/zod/v4/core/checks.cjs +51 -97
- package/node_modules/zod/v4/core/checks.d.cts +17 -1
- package/node_modules/zod/v4/core/checks.d.ts +17 -1
- package/node_modules/zod/v4/core/checks.js +31 -96
- package/node_modules/zod/v4/core/compile.cjs +173 -78
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +154 -79
- package/node_modules/zod/v4/core/core.cjs +20 -1
- package/node_modules/zod/v4/core/core.js +1 -1
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +111 -23
- package/node_modules/zod/v4/core/memoizer.js +69 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +31 -6
- package/node_modules/zod/v4/core/regexes.d.cts +3 -0
- package/node_modules/zod/v4/core/regexes.d.ts +3 -0
- package/node_modules/zod/v4/core/regexes.js +10 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +302 -114
- package/node_modules/zod/v4/core/schemas.d.cts +28 -8
- package/node_modules/zod/v4/core/schemas.d.ts +28 -8
- package/node_modules/zod/v4/core/schemas.js +279 -113
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.js +7 -6
- package/node_modules/zod/v4/core/util.cjs +177 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +156 -143
- package/node_modules/zod/v4/core/versions.cjs +21 -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 +19 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- package/node_modules/zod/v4/locales/ar.cjs +2 -0
- package/node_modules/zod/v4/locales/ar.js +2 -0
- package/node_modules/zod/v4/locales/az.cjs +2 -0
- package/node_modules/zod/v4/locales/az.js +2 -0
- package/node_modules/zod/v4/locales/be.cjs +2 -0
- package/node_modules/zod/v4/locales/be.js +2 -0
- package/node_modules/zod/v4/locales/bg.cjs +2 -0
- package/node_modules/zod/v4/locales/bg.js +2 -0
- package/node_modules/zod/v4/locales/bn.cjs +2 -0
- package/node_modules/zod/v4/locales/bn.js +2 -0
- package/node_modules/zod/v4/locales/ca.cjs +2 -0
- package/node_modules/zod/v4/locales/ca.js +2 -0
- package/node_modules/zod/v4/locales/ckb.cjs +2 -0
- package/node_modules/zod/v4/locales/ckb.js +2 -0
- package/node_modules/zod/v4/locales/cs.cjs +2 -0
- package/node_modules/zod/v4/locales/cs.js +2 -0
- package/node_modules/zod/v4/locales/da.cjs +2 -0
- package/node_modules/zod/v4/locales/da.js +2 -0
- package/node_modules/zod/v4/locales/de.cjs +2 -0
- package/node_modules/zod/v4/locales/de.js +2 -0
- package/node_modules/zod/v4/locales/el.cjs +2 -0
- package/node_modules/zod/v4/locales/el.js +2 -0
- package/node_modules/zod/v4/locales/en.cjs +2 -0
- package/node_modules/zod/v4/locales/en.js +2 -0
- package/node_modules/zod/v4/locales/eo.cjs +2 -0
- package/node_modules/zod/v4/locales/eo.js +2 -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 +2 -0
- package/node_modules/zod/v4/locales/fa.js +2 -0
- package/node_modules/zod/v4/locales/fi.cjs +2 -0
- package/node_modules/zod/v4/locales/fi.js +2 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
- package/node_modules/zod/v4/locales/fr-CA.js +2 -0
- package/node_modules/zod/v4/locales/fr.cjs +2 -0
- package/node_modules/zod/v4/locales/fr.js +2 -0
- package/node_modules/zod/v4/locales/gu.cjs +2 -0
- package/node_modules/zod/v4/locales/gu.js +2 -0
- package/node_modules/zod/v4/locales/he.cjs +2 -0
- package/node_modules/zod/v4/locales/he.js +2 -0
- package/node_modules/zod/v4/locales/hi.cjs +2 -0
- package/node_modules/zod/v4/locales/hi.js +2 -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 +2 -0
- package/node_modules/zod/v4/locales/hu.js +2 -0
- package/node_modules/zod/v4/locales/hy.cjs +2 -0
- package/node_modules/zod/v4/locales/hy.js +2 -0
- package/node_modules/zod/v4/locales/id.cjs +2 -0
- package/node_modules/zod/v4/locales/id.js +2 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +2 -0
- package/node_modules/zod/v4/locales/is.js +2 -0
- package/node_modules/zod/v4/locales/it.cjs +2 -0
- package/node_modules/zod/v4/locales/it.js +2 -0
- package/node_modules/zod/v4/locales/ja.cjs +2 -0
- package/node_modules/zod/v4/locales/ja.js +2 -0
- package/node_modules/zod/v4/locales/ka.cjs +2 -0
- package/node_modules/zod/v4/locales/ka.js +2 -0
- package/node_modules/zod/v4/locales/km.cjs +2 -0
- package/node_modules/zod/v4/locales/km.js +2 -0
- package/node_modules/zod/v4/locales/kn.cjs +2 -0
- package/node_modules/zod/v4/locales/kn.js +2 -0
- package/node_modules/zod/v4/locales/ko.cjs +2 -0
- package/node_modules/zod/v4/locales/ko.js +2 -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 +2 -0
- package/node_modules/zod/v4/locales/mk.js +2 -0
- package/node_modules/zod/v4/locales/ms.cjs +2 -0
- package/node_modules/zod/v4/locales/ms.js +2 -0
- package/node_modules/zod/v4/locales/ne.cjs +2 -0
- package/node_modules/zod/v4/locales/ne.js +2 -0
- package/node_modules/zod/v4/locales/nl.cjs +2 -0
- package/node_modules/zod/v4/locales/nl.js +2 -0
- package/node_modules/zod/v4/locales/nn.cjs +2 -0
- package/node_modules/zod/v4/locales/nn.js +2 -0
- package/node_modules/zod/v4/locales/no.cjs +2 -0
- package/node_modules/zod/v4/locales/no.js +2 -0
- package/node_modules/zod/v4/locales/ota.cjs +2 -0
- package/node_modules/zod/v4/locales/ota.js +2 -0
- package/node_modules/zod/v4/locales/pl.cjs +2 -0
- package/node_modules/zod/v4/locales/pl.js +2 -0
- package/node_modules/zod/v4/locales/ps.cjs +2 -0
- package/node_modules/zod/v4/locales/ps.js +2 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
- package/node_modules/zod/v4/locales/pt-BR.js +2 -0
- package/node_modules/zod/v4/locales/pt.cjs +2 -0
- package/node_modules/zod/v4/locales/pt.js +2 -0
- package/node_modules/zod/v4/locales/ro.cjs +2 -0
- package/node_modules/zod/v4/locales/ro.js +2 -0
- package/node_modules/zod/v4/locales/ru.cjs +2 -0
- package/node_modules/zod/v4/locales/ru.js +2 -0
- package/node_modules/zod/v4/locales/sk.cjs +2 -0
- package/node_modules/zod/v4/locales/sk.js +2 -0
- package/node_modules/zod/v4/locales/sl.cjs +2 -0
- package/node_modules/zod/v4/locales/sl.js +2 -0
- package/node_modules/zod/v4/locales/sv.cjs +2 -0
- package/node_modules/zod/v4/locales/sv.js +2 -0
- package/node_modules/zod/v4/locales/ta.cjs +2 -0
- package/node_modules/zod/v4/locales/ta.js +2 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +2 -0
- package/node_modules/zod/v4/locales/th.js +2 -0
- package/node_modules/zod/v4/locales/tk.cjs +2 -0
- package/node_modules/zod/v4/locales/tk.js +2 -0
- package/node_modules/zod/v4/locales/tr.cjs +2 -0
- package/node_modules/zod/v4/locales/tr.js +2 -0
- package/node_modules/zod/v4/locales/uk.cjs +2 -0
- package/node_modules/zod/v4/locales/uk.js +2 -0
- package/node_modules/zod/v4/locales/ur.cjs +2 -0
- package/node_modules/zod/v4/locales/ur.js +2 -0
- package/node_modules/zod/v4/locales/uz.cjs +2 -0
- package/node_modules/zod/v4/locales/uz.js +2 -0
- package/node_modules/zod/v4/locales/vi.cjs +2 -0
- package/node_modules/zod/v4/locales/vi.js +2 -0
- package/node_modules/zod/v4/locales/yo.cjs +2 -0
- package/node_modules/zod/v4/locales/yo.js +2 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-CN.js +2 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-TW.js +2 -0
- package/node_modules/zod/v4/mini/checks.cjs +19 -0
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +44 -8
- package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
- package/node_modules/zod/v4/mini/schemas.js +21 -6
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +5 -5
- package/dist/.setup/{twilio-J4cwlx0M.mjs → twilio-AlRQ6LtX.mjs} +3 -3
package/assets/icon.png
CHANGED
|
Binary file
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as getSmsRuntime } from "./runtime-BBlPgBIF.mjs";
|
|
2
|
-
import { h as assertSmsCredentialOwnerAvailable, n as TWILIO_MMS_MAX_BYTES } from "./twilio-
|
|
2
|
+
import { h as assertSmsCredentialOwnerAvailable, n as TWILIO_MMS_MAX_BYTES } from "./twilio-AlRQ6LtX.mjs";
|
|
3
3
|
import { collectErrorGraphCandidates } from "openclaw/plugin-sdk/error-runtime";
|
|
4
4
|
import { resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
|
-
import { formatInboundMediaUnavailableText, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
|
|
7
6
|
import { SsrFBlockedError, safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
7
|
+
import { formatInboundMediaUnavailableText, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
|
|
8
8
|
import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
|
|
9
9
|
import { MediaFetchError, unlinkIfExists } from "openclaw/plugin-sdk/media-runtime";
|
|
10
10
|
import { createHostedOutboundMediaStore } from "openclaw/plugin-sdk/outbound-media";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getSmsRuntime } from "./.setup/runtime-BBlPgBIF.mjs";
|
|
2
|
-
import { C as normalizeSmsAllowFrom, S as looksLikeSmsPhoneNumber, _ as isSmsAccountConfigured, a as listTwilioIncomingPhoneNumbers, b as resolveSmsAccount, c as resolveTwilioInboundSender, d as respondTwiml, f as retrieveTwilioMessagingService, g as inspectSmsAccount, h as assertSmsCredentialOwnerAvailable, i as buildTwilioInboundMessage, l as resolveTwilioMessageSid, m as verifyTwilioSignature, o as listTwilioMessages, p as sendSmsViaTwilio, r as TWIML_CONTENT_TYPE, s as readTwilioWebhookForm, t as TWILIO_MESSAGE_BODY_MAX_LENGTH, u as resolveTwilioWebhookSignatureUrl, v as listSmsAccountIds, w as normalizeSmsPhoneNumber, x as resolveTwilioStatusCallbackUrl, y as resolveDefaultSmsAccountId } from "./.setup/twilio-
|
|
2
|
+
import { C as normalizeSmsAllowFrom, S as looksLikeSmsPhoneNumber, _ as isSmsAccountConfigured, a as listTwilioIncomingPhoneNumbers, b as resolveSmsAccount, c as resolveTwilioInboundSender, d as respondTwiml, f as retrieveTwilioMessagingService, g as inspectSmsAccount, h as assertSmsCredentialOwnerAvailable, i as buildTwilioInboundMessage, l as resolveTwilioMessageSid, m as verifyTwilioSignature, o as listTwilioMessages, p as sendSmsViaTwilio, r as TWIML_CONTENT_TYPE, s as readTwilioWebhookForm, t as TWILIO_MESSAGE_BODY_MAX_LENGTH, u as resolveTwilioWebhookSignatureUrl, v as listSmsAccountIds, w as normalizeSmsPhoneNumber, x as resolveTwilioStatusCallbackUrl, y as resolveDefaultSmsAccountId } from "./.setup/twilio-AlRQ6LtX.mjs";
|
|
3
3
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./.setup/secret-contract-Cp0f-YPc.mjs";
|
|
4
4
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
5
5
|
import { createHybridChannelConfigAdapter, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -17,10 +17,9 @@ import { AllowFromListSchema, DmPolicySchema, buildChannelConfigSchema, buildMul
|
|
|
17
17
|
import { requireChannelOpenAllowFrom } from "openclaw/plugin-sdk/extension-shared";
|
|
18
18
|
import { z } from "zod";
|
|
19
19
|
import { createHash } from "node:crypto";
|
|
20
|
-
import { channelBlockedPatch, channelReadyPatch, channelStoppedPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
21
20
|
import { createFixedWindowRateLimiter, isRequestBodyLimitError, registerPluginHttpRoute, resolveRequestClientIp } from "openclaw/plugin-sdk/webhook-ingress";
|
|
21
|
+
import { channelBlockedPatch, channelReadyPatch, channelStoppedPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
22
22
|
import { createWebhookInFlightLimiter, runDetachedWebhookWork, sendHttpRequestRejection } from "openclaw/plugin-sdk/webhook-request-guards";
|
|
23
|
-
import { resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
24
23
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
25
24
|
import { createChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
|
|
26
25
|
import { withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
@@ -131,9 +130,6 @@ let deliveryStoreRuntime;
|
|
|
131
130
|
function firstTrimmed(form, key) {
|
|
132
131
|
return form[key]?.trim() ?? "";
|
|
133
132
|
}
|
|
134
|
-
function resolveMessageSid(form) {
|
|
135
|
-
return firstTrimmed(form, "MessageSid") || firstTrimmed(form, "SmsSid") || firstTrimmed(form, "SmsMessageSid");
|
|
136
|
-
}
|
|
137
133
|
function normalizeDeliveryStatus(rawStatus) {
|
|
138
134
|
const status = rawStatus.trim().toLowerCase();
|
|
139
135
|
return INBOUND_MESSAGE_STATUSES.has(status) ? "" : status;
|
|
@@ -173,7 +169,7 @@ function isTwilioDeliveryStatusForm(form) {
|
|
|
173
169
|
return Boolean(resolveDeliveryStatus(form));
|
|
174
170
|
}
|
|
175
171
|
function parseSmsDeliveryObservation(form, nowMs = Date.now()) {
|
|
176
|
-
const messageSid =
|
|
172
|
+
const messageSid = resolveTwilioMessageSid(form);
|
|
177
173
|
const status = resolveDeliveryStatus(form);
|
|
178
174
|
if (!messageSid || !status) return null;
|
|
179
175
|
const errorCode = firstTrimmed(form, "ErrorCode");
|
|
@@ -197,16 +193,12 @@ function parseSmsDeliveryObservation(form, nowMs = Date.now()) {
|
|
|
197
193
|
};
|
|
198
194
|
}
|
|
199
195
|
function reduceDeliveryStatus(current, observation) {
|
|
200
|
-
if (
|
|
201
|
-
status: observation.status,
|
|
202
|
-
...observation.errorCode ? { errorCode: observation.errorCode } : {}
|
|
203
|
-
};
|
|
204
|
-
if (current.status === "conflicted") return {
|
|
196
|
+
if (current?.status === "conflicted") return {
|
|
205
197
|
status: current.status,
|
|
206
198
|
...current.errorCode ? { errorCode: current.errorCode } : {},
|
|
207
199
|
conflict: true
|
|
208
200
|
};
|
|
209
|
-
if (current
|
|
201
|
+
if (current?.status === observation.status) {
|
|
210
202
|
const errorCode = current.errorCode ?? observation.errorCode;
|
|
211
203
|
return {
|
|
212
204
|
status: current.status,
|
|
@@ -214,9 +206,9 @@ function reduceDeliveryStatus(current, observation) {
|
|
|
214
206
|
...current.conflict ? { conflict: true } : {}
|
|
215
207
|
};
|
|
216
208
|
}
|
|
217
|
-
const currentTerminal = TERMINAL_DELIVERY_STATUSES.has(current.status);
|
|
209
|
+
const currentTerminal = current && TERMINAL_DELIVERY_STATUSES.has(current.status);
|
|
218
210
|
const nextTerminal = TERMINAL_DELIVERY_STATUSES.has(observation.status);
|
|
219
|
-
if (currentTerminal && nextTerminal
|
|
211
|
+
if (currentTerminal && nextTerminal) {
|
|
220
212
|
const errorCode = observation.errorCode ?? current.errorCode;
|
|
221
213
|
return {
|
|
222
214
|
status: "conflicted",
|
|
@@ -224,24 +216,11 @@ function reduceDeliveryStatus(current, observation) {
|
|
|
224
216
|
conflict: true
|
|
225
217
|
};
|
|
226
218
|
}
|
|
227
|
-
|
|
228
|
-
status: current.status,
|
|
229
|
-
...current.errorCode ? { errorCode: current.errorCode } : {},
|
|
230
|
-
...current.conflict ? { conflict: true } : {}
|
|
231
|
-
};
|
|
232
|
-
if (nextTerminal) return {
|
|
233
|
-
status: observation.status,
|
|
234
|
-
...observation.errorCode ? { errorCode: observation.errorCode } : {}
|
|
235
|
-
};
|
|
236
|
-
const currentRank = DELIVERY_STATUS_RANK[current.status] ?? -1;
|
|
237
|
-
if ((DELIVERY_STATUS_RANK[observation.status] ?? -1) > currentRank) return {
|
|
238
|
-
status: observation.status,
|
|
239
|
-
...observation.errorCode ? { errorCode: observation.errorCode } : {}
|
|
240
|
-
};
|
|
219
|
+
const selected = !current || !currentTerminal && (nextTerminal || (DELIVERY_STATUS_RANK[observation.status] ?? -1) > (DELIVERY_STATUS_RANK[current.status] ?? -1)) ? observation : current;
|
|
241
220
|
return {
|
|
242
|
-
status:
|
|
243
|
-
...
|
|
244
|
-
...current.conflict ? { conflict: true } : {}
|
|
221
|
+
status: selected.status,
|
|
222
|
+
...selected.errorCode ? { errorCode: selected.errorCode } : {},
|
|
223
|
+
...selected === current && current.conflict ? { conflict: true } : {}
|
|
245
224
|
};
|
|
246
225
|
}
|
|
247
226
|
function mergeSmsDeliveryObservation(params) {
|
|
@@ -359,15 +338,14 @@ function createSmsMessageReceipt(params) {
|
|
|
359
338
|
});
|
|
360
339
|
return receipt;
|
|
361
340
|
}
|
|
362
|
-
function
|
|
341
|
+
function createSmsSendResult(params) {
|
|
342
|
+
const first = params.results[0];
|
|
343
|
+
if (!first) throw new Error("SMS send did not return a Twilio Message SID.");
|
|
363
344
|
return {
|
|
364
345
|
channel: "sms",
|
|
365
|
-
messageId:
|
|
366
|
-
chatId:
|
|
367
|
-
receipt: createSmsMessageReceipt(
|
|
368
|
-
results: [result],
|
|
369
|
-
kind
|
|
370
|
-
})
|
|
346
|
+
messageId: first.sid,
|
|
347
|
+
chatId: first.to,
|
|
348
|
+
receipt: createSmsMessageReceipt(params)
|
|
371
349
|
};
|
|
372
350
|
}
|
|
373
351
|
function throwSmsPartialDeliveryError(error, results, kind) {
|
|
@@ -428,17 +406,6 @@ async function sendSmsProviderMessage(params) {
|
|
|
428
406
|
await recordInitialDeliveryBestEffort(params.account, result);
|
|
429
407
|
return result;
|
|
430
408
|
}
|
|
431
|
-
function logInitialDeliveryPersistenceFailure(result, error) {
|
|
432
|
-
try {
|
|
433
|
-
getSmsRuntime().logging.getChildLogger({
|
|
434
|
-
plugin: "sms",
|
|
435
|
-
feature: "delivery-status"
|
|
436
|
-
}).warn("SMS delivery initial state could not be persisted.", {
|
|
437
|
-
messageSid: result.sid,
|
|
438
|
-
errorType: error instanceof Error ? error.name : typeof error
|
|
439
|
-
});
|
|
440
|
-
} catch {}
|
|
441
|
-
}
|
|
442
409
|
async function recordInitialDeliveryBestEffort(account, result) {
|
|
443
410
|
try {
|
|
444
411
|
await recordInitialSmsDeliveryResult({
|
|
@@ -446,7 +413,15 @@ async function recordInitialDeliveryBestEffort(account, result) {
|
|
|
446
413
|
result
|
|
447
414
|
});
|
|
448
415
|
} catch (error) {
|
|
449
|
-
|
|
416
|
+
try {
|
|
417
|
+
getSmsRuntime().logging.getChildLogger({
|
|
418
|
+
plugin: "sms",
|
|
419
|
+
feature: "delivery-status"
|
|
420
|
+
}).warn("SMS delivery initial state could not be persisted.", {
|
|
421
|
+
messageSid: result.sid,
|
|
422
|
+
errorType: error instanceof Error ? error.name : typeof error
|
|
423
|
+
});
|
|
424
|
+
} catch {}
|
|
450
425
|
}
|
|
451
426
|
}
|
|
452
427
|
async function sendSmsTextChunks(params) {
|
|
@@ -455,20 +430,26 @@ async function sendSmsTextChunks(params) {
|
|
|
455
430
|
configuredLimit: params.account.textChunkLimit
|
|
456
431
|
});
|
|
457
432
|
if (chunks.length === 0) throw new Error("SMS send requires non-empty text.");
|
|
433
|
+
return await sendSmsMessages(params, chunks.map((text) => ({ text })), "text");
|
|
434
|
+
}
|
|
435
|
+
async function sendSmsMessages(params, messages, kind) {
|
|
458
436
|
const results = [];
|
|
459
437
|
try {
|
|
460
|
-
for (const
|
|
438
|
+
for (const [index, message] of messages.entries()) {
|
|
461
439
|
const result = await sendSmsProviderMessage({
|
|
462
440
|
account: params.account,
|
|
463
441
|
to: params.to,
|
|
464
|
-
|
|
442
|
+
...message,
|
|
465
443
|
onPlatformSendDispatch: params.onPlatformSendDispatch
|
|
466
444
|
});
|
|
467
445
|
results.push(result);
|
|
468
|
-
await params.onDeliveryResult?.(
|
|
446
|
+
await params.onDeliveryResult?.(createSmsSendResult({
|
|
447
|
+
results: [result],
|
|
448
|
+
kind: index === 0 ? kind : "text"
|
|
449
|
+
}));
|
|
469
450
|
}
|
|
470
451
|
} catch (error) {
|
|
471
|
-
throwSmsPartialDeliveryError(error, results,
|
|
452
|
+
throwSmsPartialDeliveryError(error, results, kind);
|
|
472
453
|
}
|
|
473
454
|
return results;
|
|
474
455
|
}
|
|
@@ -480,7 +461,7 @@ async function prepareSmsMediaAttempt(params) {
|
|
|
480
461
|
});
|
|
481
462
|
let hostedMedia;
|
|
482
463
|
try {
|
|
483
|
-
const { prepareHostedSmsMedia } = await import("./.setup/media-
|
|
464
|
+
const { prepareHostedSmsMedia } = await import("./.setup/media-Cmf2YTCW.mjs");
|
|
484
465
|
assertSmsCredentialOwnerAvailable(params.account);
|
|
485
466
|
const prepared = await prepareHostedSmsMedia({
|
|
486
467
|
account: params.account,
|
|
@@ -505,38 +486,17 @@ async function prepareSmsMediaAttempt(params) {
|
|
|
505
486
|
};
|
|
506
487
|
}
|
|
507
488
|
async function sendPreparedSmsMediaAttempt(params) {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
to: params.to,
|
|
513
|
-
...params.attempt.caption ? { text: params.attempt.caption } : {},
|
|
514
|
-
mediaUrls: [params.attempt.hostedMediaUrl],
|
|
515
|
-
onPlatformSendDispatch: params.onPlatformSendDispatch
|
|
516
|
-
});
|
|
517
|
-
results.push(mediaResult);
|
|
518
|
-
await params.onDeliveryResult?.(createSmsDeliveryProgressResult(mediaResult, "media"));
|
|
519
|
-
for (const text of params.attempt.remainingChunks) {
|
|
520
|
-
const result = await sendSmsProviderMessage({
|
|
521
|
-
account: params.account,
|
|
522
|
-
to: params.to,
|
|
523
|
-
text,
|
|
524
|
-
onPlatformSendDispatch: params.onPlatformSendDispatch
|
|
525
|
-
});
|
|
526
|
-
results.push(result);
|
|
527
|
-
await params.onDeliveryResult?.(createSmsDeliveryProgressResult(result, "text"));
|
|
528
|
-
}
|
|
529
|
-
} catch (error) {
|
|
530
|
-
throwSmsPartialDeliveryError(error, results, "media");
|
|
531
|
-
}
|
|
532
|
-
return results;
|
|
489
|
+
return await sendSmsMessages(params, [{
|
|
490
|
+
...params.attempt.caption ? { text: params.attempt.caption } : {},
|
|
491
|
+
mediaUrls: [params.attempt.hostedMediaUrl]
|
|
492
|
+
}, ...params.attempt.remainingChunks.map((text) => ({ text }))], "media");
|
|
533
493
|
}
|
|
534
494
|
//#endregion
|
|
535
495
|
//#region extensions/sms/src/inbound.ts
|
|
536
496
|
const CHANNEL_ID$2 = "sms";
|
|
537
497
|
async function authorizeSmsSender(params) {
|
|
538
498
|
const commandRequested = params.channelRuntime.commands.shouldComputeCommandAuthorized(params.rawBody, params.cfg);
|
|
539
|
-
return await
|
|
499
|
+
return await params.channelRuntime.inbound.ingress.resolveStable({
|
|
540
500
|
channelId: CHANNEL_ID$2,
|
|
541
501
|
accountId: params.account.accountId,
|
|
542
502
|
cfg: params.cfg,
|
|
@@ -612,7 +572,7 @@ async function dispatchSmsInboundEvent(params) {
|
|
|
612
572
|
params.log?.warn?.(`SMS sender ${from} is not authorized`);
|
|
613
573
|
return;
|
|
614
574
|
}
|
|
615
|
-
const materialized = params.msg.media.length > 0 || (params.msg.unavailableMediaCount ?? 0) > 0 ? await (await import("./.setup/media-
|
|
575
|
+
const materialized = params.msg.media.length > 0 || (params.msg.unavailableMediaCount ?? 0) > 0 ? await (await import("./.setup/media-Cmf2YTCW.mjs")).materializeSmsInboundMedia({
|
|
616
576
|
account: params.account,
|
|
617
577
|
msg: params.msg,
|
|
618
578
|
mediaRuntime: params.channelRuntime,
|
|
@@ -763,10 +723,8 @@ async function dispatchSmsInboundEvent(params) {
|
|
|
763
723
|
}
|
|
764
724
|
}
|
|
765
725
|
});
|
|
726
|
+
} finally {
|
|
766
727
|
if (adoptionState === "pending" || adoptionState === "abandoned") await materialized.cleanup();
|
|
767
|
-
} catch (error) {
|
|
768
|
-
if (adoptionState === "pending" || adoptionState === "abandoned") await materialized.cleanup();
|
|
769
|
-
throw error;
|
|
770
728
|
}
|
|
771
729
|
}
|
|
772
730
|
//#endregion
|
|
@@ -1117,7 +1075,7 @@ async function registerSmsWebhookRoute(params) {
|
|
|
1117
1075
|
throwOnFailure: true,
|
|
1118
1076
|
log: (msg) => params.log?.info?.(msg),
|
|
1119
1077
|
handler: async (req, res) => {
|
|
1120
|
-
const { tryHandleHostedSmsMediaRequest } = await import("./.setup/media-
|
|
1078
|
+
const { tryHandleHostedSmsMediaRequest } = await import("./.setup/media-Cmf2YTCW.mjs");
|
|
1121
1079
|
if (await tryHandleHostedSmsMediaRequest(req, res, params.account.accountId)) return true;
|
|
1122
1080
|
return await webhookHandler(req, res);
|
|
1123
1081
|
}
|
|
@@ -1217,33 +1175,30 @@ function compareTwilioWebhook(account, phoneNumber) {
|
|
|
1217
1175
|
status: "number-not-found",
|
|
1218
1176
|
expectedNumber: account.fromNumber
|
|
1219
1177
|
};
|
|
1220
|
-
const
|
|
1221
|
-
if (!phoneNumber.smsUrl) return {
|
|
1222
|
-
status: "missing",
|
|
1178
|
+
const summary = {
|
|
1223
1179
|
phoneNumber: phoneNumber.phoneNumber || account.fromNumber,
|
|
1224
1180
|
expectedUrl: account.publicWebhookUrl,
|
|
1225
|
-
configuredMethod
|
|
1181
|
+
configuredMethod: phoneNumber.smsMethod.toUpperCase()
|
|
1226
1182
|
};
|
|
1227
|
-
if (
|
|
1183
|
+
if (!phoneNumber.smsUrl) return {
|
|
1184
|
+
status: "missing",
|
|
1185
|
+
...summary
|
|
1186
|
+
};
|
|
1187
|
+
const configured = {
|
|
1188
|
+
...summary,
|
|
1189
|
+
configuredUrl: phoneNumber.smsUrl
|
|
1190
|
+
};
|
|
1191
|
+
if (summary.configuredMethod && summary.configuredMethod !== "POST") return {
|
|
1228
1192
|
status: "method-mismatch",
|
|
1229
|
-
|
|
1230
|
-
expectedUrl: account.publicWebhookUrl,
|
|
1231
|
-
configuredUrl: phoneNumber.smsUrl,
|
|
1232
|
-
configuredMethod
|
|
1193
|
+
...configured
|
|
1233
1194
|
};
|
|
1234
1195
|
if (phoneNumber.smsUrl !== account.publicWebhookUrl) return {
|
|
1235
1196
|
status: "url-mismatch",
|
|
1236
|
-
|
|
1237
|
-
expectedUrl: account.publicWebhookUrl,
|
|
1238
|
-
configuredUrl: phoneNumber.smsUrl,
|
|
1239
|
-
configuredMethod
|
|
1197
|
+
...configured
|
|
1240
1198
|
};
|
|
1241
1199
|
return {
|
|
1242
1200
|
status: "matches",
|
|
1243
|
-
|
|
1244
|
-
expectedUrl: account.publicWebhookUrl,
|
|
1245
|
-
configuredUrl: phoneNumber.smsUrl,
|
|
1246
|
-
configuredMethod,
|
|
1201
|
+
...configured,
|
|
1247
1202
|
voiceUrl: phoneNumber.voiceUrl
|
|
1248
1203
|
};
|
|
1249
1204
|
}
|
|
@@ -1252,33 +1207,30 @@ function compareTwilioMessagingService(account, service) {
|
|
|
1252
1207
|
status: "unavailable",
|
|
1253
1208
|
reason: "Twilio Messaging Service defers inbound webhooks to sender phone numbers; configure fromNumber or disable defer-to-sender before probing."
|
|
1254
1209
|
};
|
|
1255
|
-
const
|
|
1256
|
-
if (!service.inboundRequestUrl) return {
|
|
1257
|
-
status: "messaging-service-missing",
|
|
1210
|
+
const summary = {
|
|
1258
1211
|
serviceSid: service.sid || account.messagingServiceSid,
|
|
1259
1212
|
expectedUrl: account.publicWebhookUrl,
|
|
1260
|
-
configuredMethod
|
|
1213
|
+
configuredMethod: service.inboundMethod.toUpperCase()
|
|
1214
|
+
};
|
|
1215
|
+
if (!service.inboundRequestUrl) return {
|
|
1216
|
+
status: "messaging-service-missing",
|
|
1217
|
+
...summary
|
|
1218
|
+
};
|
|
1219
|
+
const configured = {
|
|
1220
|
+
...summary,
|
|
1221
|
+
configuredUrl: service.inboundRequestUrl
|
|
1261
1222
|
};
|
|
1262
|
-
if (configuredMethod && configuredMethod !== "POST") return {
|
|
1223
|
+
if (summary.configuredMethod && summary.configuredMethod !== "POST") return {
|
|
1263
1224
|
status: "messaging-service-method-mismatch",
|
|
1264
|
-
|
|
1265
|
-
expectedUrl: account.publicWebhookUrl,
|
|
1266
|
-
configuredUrl: service.inboundRequestUrl,
|
|
1267
|
-
configuredMethod
|
|
1225
|
+
...configured
|
|
1268
1226
|
};
|
|
1269
1227
|
if (service.inboundRequestUrl !== account.publicWebhookUrl) return {
|
|
1270
1228
|
status: "messaging-service-url-mismatch",
|
|
1271
|
-
|
|
1272
|
-
expectedUrl: account.publicWebhookUrl,
|
|
1273
|
-
configuredUrl: service.inboundRequestUrl,
|
|
1274
|
-
configuredMethod
|
|
1229
|
+
...configured
|
|
1275
1230
|
};
|
|
1276
1231
|
return {
|
|
1277
1232
|
status: "messaging-service-matches",
|
|
1278
|
-
|
|
1279
|
-
expectedUrl: account.publicWebhookUrl,
|
|
1280
|
-
configuredUrl: service.inboundRequestUrl,
|
|
1281
|
-
configuredMethod
|
|
1233
|
+
...configured
|
|
1282
1234
|
};
|
|
1283
1235
|
}
|
|
1284
1236
|
function recentInboundSummary(messages) {
|
|
@@ -1595,17 +1547,6 @@ const smsSetupContract = defineChannelSetupContract({
|
|
|
1595
1547
|
},
|
|
1596
1548
|
adapter: { applyAccountConfig: applySmsAccountConfig }
|
|
1597
1549
|
});
|
|
1598
|
-
function createSmsReceipt(params) {
|
|
1599
|
-
const first = params.results[0];
|
|
1600
|
-
if (!first) throw new Error("SMS send did not return a Twilio Message SID.");
|
|
1601
|
-
const receipt = createSmsMessageReceipt(params);
|
|
1602
|
-
return {
|
|
1603
|
-
channel: CHANNEL_ID,
|
|
1604
|
-
messageId: first.sid,
|
|
1605
|
-
chatId: first.to,
|
|
1606
|
-
receipt
|
|
1607
|
-
};
|
|
1608
|
-
}
|
|
1609
1550
|
function resolveSmsTextChunkLimit(params) {
|
|
1610
1551
|
return resolveSmsAccount(params.cfg, params.accountId).textChunkLimit || params.fallbackLimit || 1500;
|
|
1611
1552
|
}
|
|
@@ -1613,7 +1554,7 @@ async function sendSmsText(ctx) {
|
|
|
1613
1554
|
const account = resolveSmsAccount(ctx.cfg, ctx.accountId);
|
|
1614
1555
|
const to = normalizeSmsPhoneNumber(ctx.to) || account.defaultTo;
|
|
1615
1556
|
if (!looksLikeSmsPhoneNumber(to)) throw new Error(`Invalid SMS target: ${ctx.to}`);
|
|
1616
|
-
return
|
|
1557
|
+
return createSmsSendResult({
|
|
1617
1558
|
results: await sendSmsTextChunks({
|
|
1618
1559
|
account,
|
|
1619
1560
|
to,
|
|
@@ -1659,7 +1600,7 @@ async function sendPreparedSmsAttachment(ctx) {
|
|
|
1659
1600
|
preparedSmsAttachmentAttempts.delete(ctx);
|
|
1660
1601
|
if (!preparation) throw new Error("SMS message lifecycle did not prepare the MMS attachment.");
|
|
1661
1602
|
const prepared = await preparation;
|
|
1662
|
-
return
|
|
1603
|
+
return createSmsSendResult({
|
|
1663
1604
|
results: await sendPreparedSmsMediaAttempt({
|
|
1664
1605
|
...prepared,
|
|
1665
1606
|
onPlatformSendDispatch: async () => {
|
|
@@ -1691,8 +1632,8 @@ const smsMessageAdapter = defineChannelMessageAdapter({
|
|
|
1691
1632
|
await attemptToken.attempt.cleanupHostedMedia();
|
|
1692
1633
|
}
|
|
1693
1634
|
},
|
|
1694
|
-
text:
|
|
1695
|
-
media:
|
|
1635
|
+
text: sendSmsText,
|
|
1636
|
+
media: sendPreparedSmsAttachment
|
|
1696
1637
|
}
|
|
1697
1638
|
});
|
|
1698
1639
|
function resolveSmsOutboundSessionRoute(params) {
|
|
@@ -1754,9 +1695,9 @@ const smsPlugin = createChatChannelPlugin({
|
|
|
1754
1695
|
},
|
|
1755
1696
|
messaging: {
|
|
1756
1697
|
targetPrefixes: ["twilio-sms"],
|
|
1757
|
-
normalizeTarget:
|
|
1758
|
-
inferTargetChatType: ({ to }) => looksLikeSmsPhoneNumber(
|
|
1759
|
-
resolveOutboundSessionRoute:
|
|
1698
|
+
normalizeTarget: normalizeSmsPhoneNumber,
|
|
1699
|
+
inferTargetChatType: ({ to }) => looksLikeSmsPhoneNumber(to) ? "direct" : void 0,
|
|
1700
|
+
resolveOutboundSessionRoute: resolveSmsOutboundSessionRoute,
|
|
1760
1701
|
targetResolver: {
|
|
1761
1702
|
looksLikeId: looksLikeSmsPhoneNumber,
|
|
1762
1703
|
hint: "<+15551234567>"
|
|
@@ -155,13 +155,13 @@ try {
|
|
|
155
155
|
expected: 'string',
|
|
156
156
|
code: 'invalid_type',
|
|
157
157
|
path: [ 'username' ],
|
|
158
|
-
message: 'Invalid input: expected string'
|
|
158
|
+
message: 'Invalid input: expected string, received number'
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
expected: 'number',
|
|
162
162
|
code: 'invalid_type',
|
|
163
163
|
path: [ 'xp' ],
|
|
164
|
-
message: 'Invalid input: expected number'
|
|
164
|
+
message: 'Invalid input: expected number, received string'
|
|
165
165
|
}
|
|
166
166
|
] */
|
|
167
167
|
}
|
|
@@ -75,3 +75,22 @@ core.globalConfig.postProcessor = (inst) => {
|
|
|
75
75
|
shim.__originalRun = originalRun;
|
|
76
76
|
inst._zod.run = shim;
|
|
77
77
|
};
|
|
78
|
+
|
|
79
|
+
// seal-cjs-exports
|
|
80
|
+
(function () {
|
|
81
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
82
|
+
for (var i = 0; i < keys.length; i++) {
|
|
83
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
84
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
85
|
+
var value;
|
|
86
|
+
try {
|
|
87
|
+
value = desc.get();
|
|
88
|
+
} catch (e) {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
92
|
+
if (value === undefined) continue;
|
|
93
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
94
|
+
}
|
|
95
|
+
Object.freeze(exports);
|
|
96
|
+
})();
|
|
@@ -31,3 +31,22 @@ const z = __importStar(require("./v4/classic/external.cjs"));
|
|
|
31
31
|
exports.z = z;
|
|
32
32
|
exports.default = z;
|
|
33
33
|
__exportStar(require("./v4/classic/external.cjs"), exports);
|
|
34
|
+
|
|
35
|
+
// seal-cjs-exports
|
|
36
|
+
(function () {
|
|
37
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
38
|
+
for (var i = 0; i < keys.length; i++) {
|
|
39
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
40
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
41
|
+
var value;
|
|
42
|
+
try {
|
|
43
|
+
value = desc.get();
|
|
44
|
+
} catch (e) {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
48
|
+
if (value === undefined) continue;
|
|
49
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
50
|
+
}
|
|
51
|
+
Object.freeze(exports);
|
|
52
|
+
})();
|
|
@@ -15,3 +15,22 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("../v4/locales/index.cjs"), exports);
|
|
18
|
+
|
|
19
|
+
// seal-cjs-exports
|
|
20
|
+
(function () {
|
|
21
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
22
|
+
for (var i = 0; i < keys.length; i++) {
|
|
23
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
24
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
25
|
+
var value;
|
|
26
|
+
try {
|
|
27
|
+
value = desc.get();
|
|
28
|
+
} catch (e) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
32
|
+
if (value === undefined) continue;
|
|
33
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
34
|
+
}
|
|
35
|
+
Object.freeze(exports);
|
|
36
|
+
})();
|
|
@@ -30,3 +30,22 @@ exports.z = void 0;
|
|
|
30
30
|
const z = __importStar(require("../v4/mini/external.cjs"));
|
|
31
31
|
exports.z = z;
|
|
32
32
|
__exportStar(require("../v4/mini/external.cjs"), exports);
|
|
33
|
+
|
|
34
|
+
// seal-cjs-exports
|
|
35
|
+
(function () {
|
|
36
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
37
|
+
for (var i = 0; i < keys.length; i++) {
|
|
38
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
39
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
40
|
+
var value;
|
|
41
|
+
try {
|
|
42
|
+
value = desc.get();
|
|
43
|
+
} catch (e) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
47
|
+
if (value === undefined) continue;
|
|
48
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
49
|
+
}
|
|
50
|
+
Object.freeze(exports);
|
|
51
|
+
})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zod",
|
|
3
|
-
"version": "4.5
|
|
3
|
+
"version": "4.6.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Colin McDonnell <zod@colinhacks.com>",
|
|
@@ -52,7 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"conditions": {
|
|
54
54
|
"@zod/source": "src"
|
|
55
|
-
}
|
|
55
|
+
},
|
|
56
|
+
"sealCjsExports": true
|
|
56
57
|
},
|
|
57
58
|
"exports": {
|
|
58
59
|
"./package.json": "./package.json",
|
|
@@ -137,10 +138,10 @@
|
|
|
137
138
|
},
|
|
138
139
|
"scripts": {
|
|
139
140
|
"clean": "git clean -xdf . -e node_modules",
|
|
140
|
-
"build": "zshy --project tsconfig.build.json",
|
|
141
|
-
"postbuild": "
|
|
142
|
-
"test:watch": "
|
|
143
|
-
"test": "
|
|
144
|
-
"prepublishOnly": "
|
|
141
|
+
"build": "nub exec --node zshy --project tsconfig.build.json",
|
|
142
|
+
"postbuild": "nub ../../scripts/write-stub-package-jsons.ts && nub exec --node biome check --write .",
|
|
143
|
+
"test:watch": "nub exec --node vitest",
|
|
144
|
+
"test": "nub exec --node vitest run",
|
|
145
|
+
"prepublishOnly": "nub ../../scripts/check-versions.ts"
|
|
145
146
|
}
|
|
146
147
|
}
|
|
@@ -2,7 +2,7 @@ export namespace errorUtil {
|
|
|
2
2
|
export type ErrMessage = string | { message?: string | undefined };
|
|
3
3
|
export const errToObj = (message?: ErrMessage): { message?: string | undefined } =>
|
|
4
4
|
typeof message === "string" ? { message } : message || {};
|
|
5
|
-
// biome-ignore lint:
|
|
5
|
+
// biome-ignore lint/suspicious/noShadowRestrictedNames: renaming churns 31 v3 call sites
|
|
6
6
|
export const toString = (message?: ErrMessage): string | undefined =>
|
|
7
7
|
typeof message === "string" ? message : message?.message;
|
|
8
8
|
}
|