@openclaw/signal 2026.7.2-beta.2 → 2026.7.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accounts-DrStJjiK.js +147 -0
- package/dist/api.js +11 -11
- package/dist/{approval-handler.runtime-I1SMFwwR.js → approval-handler.runtime-C2qf7D0D.js} +5 -5
- package/dist/{approval-reactions-ChcS2rQN.js → approval-reactions-5uyOazxW.js} +2 -2
- package/dist/{channel-DK8XZHPe.js → channel-DQ9i00A8.js} +397 -29
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/channel.runtime-DWQdFD2O.js +92 -0
- package/dist/client-adapter-Bm0ZRqJn.js +56 -0
- package/dist/{client-adapter-aEM0kGhC.js → client-yjbwtufN.js} +140 -210
- package/dist/config-schema-DLvpQPN5.js +221 -0
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api-DbUCknbC.js +492 -0
- package/dist/doctor-contract-api.js +1 -15
- package/dist/{identity-BF8taj7g.js → identity-BQ4OzXXk.js} +17 -8
- package/dist/{install-signal-cli-CtusY3tN.js → install-signal-cli-qJF7iC4h.js} +44 -14
- package/dist/{monitor-BdzH3U64.js → monitor-C0aBYlJ0.js} +343 -207
- package/dist/{probe-CbWkI24J.js → probe-2yf2hpcc.js} +23 -4
- package/dist/question-reactions-DJ1xQzVF.js +109 -0
- package/dist/{reaction-runtime-api-DifyinAU.js → reaction-runtime-api-Bka61qO9.js} +5 -7
- package/dist/reaction-runtime-api.js +1 -1
- package/dist/{rpc-context-DsHWh2hc.js → rpc-context-CZUoE0-A.js} +1 -1
- package/dist/{runtime-BZ9hnS3a.js → runtime-JPrGlV7h.js} +2 -2
- package/dist/runtime-api.js +11 -10
- package/dist/{send-BWtA6h3J.js → send-BZAqAa8p.js} +16 -20
- package/dist/{send.runtime-D4WBNNgn.js → send.runtime-CcA5Qei9.js} +1 -1
- package/dist/{reply-authors-osU_SY4J.js → transport-detection-CiZWiMYa.js} +140 -182
- package/dist/transport-detection.runtime-BgjcIyww.js +2 -0
- package/dist/transport-policy-DxvSMHp9.js +99 -0
- package/dist/transport-probes.runtime-CbnZn38-.js +2 -0
- package/node_modules/ws/lib/receiver.js +15 -32
- package/node_modules/ws/lib/websocket-server.js +4 -4
- package/node_modules/ws/lib/websocket.js +4 -4
- package/node_modules/ws/package.json +5 -1
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +191 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +32 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +135 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/node_modules/zod/src/v4/classic/external.ts +52 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1823 -0
- package/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +153 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +455 -0
- package/node_modules/zod/src/v4/core/index.ts +16 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/node_modules/zod/src/v4/core/regexes.ts +190 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
- package/node_modules/zod/src/v4/core/util.ts +983 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/node_modules/zod/src/v4/locales/el.ts +121 -0
- package/node_modules/zod/src/v4/locales/en.ts +123 -0
- package/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/node_modules/zod/src/v4/locales/fr.ts +132 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/node_modules/zod/src/v4/locales/hr.ts +131 -0
- package/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/node_modules/zod/src/v4/locales/index.ts +52 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/node_modules/zod/src/v4/locales/ro.ts +129 -0
- package/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/node_modules/zod/src/v4/locales/uz.ts +117 -0
- package/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/external.ts +41 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3777 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3695 -0
- package/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +48 -0
- package/node_modules/zod/v4/classic/external.cjs +73 -0
- package/node_modules/zod/v4/classic/external.d.cts +16 -0
- package/node_modules/zod/v4/classic/external.d.ts +16 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/node_modules/zod/v4/classic/parse.js +15 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
- package/node_modules/zod/v4/classic/schemas.js +1395 -0
- package/node_modules/zod/v4/core/api.cjs +1227 -0
- package/node_modules/zod/v4/core/api.d.cts +325 -0
- package/node_modules/zod/v4/core/api.d.ts +325 -0
- package/node_modules/zod/v4/core/api.js +1087 -0
- package/node_modules/zod/v4/core/checks.cjs +601 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +575 -0
- package/node_modules/zod/v4/core/core.cjs +85 -0
- package/node_modules/zod/v4/core/core.d.cts +70 -0
- package/node_modules/zod/v4/core/core.d.ts +70 -0
- package/node_modules/zod/v4/core/core.js +78 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +216 -0
- package/node_modules/zod/v4/core/errors.d.cts +221 -0
- package/node_modules/zod/v4/core/errors.d.ts +221 -0
- package/node_modules/zod/v4/core/errors.js +185 -0
- package/node_modules/zod/v4/core/index.cjs +47 -0
- package/node_modules/zod/v4/core/index.d.cts +16 -0
- package/node_modules/zod/v4/core/index.d.ts +16 -0
- package/node_modules/zod/v4/core/index.js +16 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +131 -0
- package/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/node_modules/zod/v4/core/parse.js +93 -0
- package/node_modules/zod/v4/core/regexes.cjs +172 -0
- package/node_modules/zod/v4/core/regexes.d.cts +85 -0
- package/node_modules/zod/v4/core/regexes.d.ts +85 -0
- package/node_modules/zod/v4/core/regexes.js +139 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2270 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
- package/node_modules/zod/v4/core/schemas.js +2239 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.js +448 -0
- package/node_modules/zod/v4/core/util.cjs +734 -0
- package/node_modules/zod/v4/core/util.d.cts +200 -0
- package/node_modules/zod/v4/core/util.d.ts +200 -0
- package/node_modules/zod/v4/core/util.js +674 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +106 -0
- package/node_modules/zod/v4/locales/az.cjs +132 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +105 -0
- package/node_modules/zod/v4/locales/be.cjs +183 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +156 -0
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +107 -0
- package/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +111 -0
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +135 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +108 -0
- package/node_modules/zod/v4/locales/el.cjs +136 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +109 -0
- package/node_modules/zod/v4/locales/en.cjs +140 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +113 -0
- package/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +109 -0
- package/node_modules/zod/v4/locales/es.cjs +159 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +132 -0
- package/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +114 -0
- package/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +112 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/node_modules/zod/v4/locales/fr.cjs +152 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +125 -0
- package/node_modules/zod/v4/locales/he.cjs +241 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +214 -0
- package/node_modules/zod/v4/locales/hr.cjs +149 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +122 -0
- package/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +108 -0
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +133 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +106 -0
- package/node_modules/zod/v4/locales/index.cjs +111 -0
- package/node_modules/zod/v4/locales/index.d.cts +52 -0
- package/node_modules/zod/v4/locales/index.d.ts +52 -0
- package/node_modules/zod/v4/locales/index.js +52 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +135 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +108 -0
- package/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +107 -0
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +111 -0
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +109 -0
- package/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +107 -0
- package/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +110 -0
- package/node_modules/zod/v4/locales/no.cjs +135 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +108 -0
- package/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +109 -0
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +109 -0
- package/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +114 -0
- package/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +108 -0
- package/node_modules/zod/v4/locales/ro.cjs +146 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +119 -0
- package/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +156 -0
- package/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +109 -0
- package/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +110 -0
- package/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +110 -0
- package/node_modules/zod/v4/locales/th.cjs +137 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +110 -0
- package/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +105 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +110 -0
- package/node_modules/zod/v4/locales/uz.cjs +137 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +110 -0
- package/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +108 -0
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/external.cjs +63 -0
- package/node_modules/zod/v4/mini/external.d.cts +13 -0
- package/node_modules/zod/v4/mini/external.d.ts +13 -0
- package/node_modules/zod/v4/mini/external.js +14 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
- package/node_modules/zod/v4/mini/schemas.js +961 -0
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +32 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/npm-shrinkwrap.json +16 -6
- package/openclaw.plugin.json +518 -384
- package/package.json +70 -20
- package/dist/accounts-Bz4HtP0g.js +0 -59
- package/dist/channel.runtime-BbDh5UIr.js +0 -66
- package/dist/config-api-DIg1lInT.js +0 -3
- package/dist/config-schema-CfVNH0DB.js +0 -25
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as normalizeSignalAllowRecipient, c as resolveSignalSender, d as normalizeSignalMessagingTarget, i as isSignalSenderAllowed, l as looksLikeUuid, n as formatSignalSenderDisplay, o as resolveSignalPeerId, r as formatSignalSenderId, s as resolveSignalRecipient, t as formatSignalPairingIdLine } from "./identity-
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import { n as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { i as resolveSignalAccount, o as resolveSignalReplyToMode } from "./accounts-DrStJjiK.js";
|
|
3
|
+
import { a as normalizeSignalAllowRecipient, c as resolveSignalSender, d as normalizeSignalMessagingTarget, i as isSignalSenderAllowed, l as looksLikeUuid, n as formatSignalSenderDisplay, o as resolveSignalPeerId, r as formatSignalSenderId, s as resolveSignalRecipient, t as formatSignalPairingIdLine } from "./identity-BQ4OzXXk.js";
|
|
4
|
+
import { t as getOptionalSignalRuntime } from "./runtime-JPrGlV7h.js";
|
|
5
|
+
import { i as materializeSignalPresentationFallback, n as registerSignalReplyContext, o as resolveSignalReactionLevel, s as formatSignalMediaText, u as isSignalNativeApprovalHandlerConfigured } from "./transport-detection-CiZWiMYa.js";
|
|
6
|
+
import { n as signalRpcRequest, r as streamSignalEvents, t as signalCheck } from "./client-adapter-Bm0ZRqJn.js";
|
|
7
|
+
import { n as sendReactionSignal } from "./reaction-runtime-api-Bka61qO9.js";
|
|
8
|
+
import { a as maybeResolveSignalApprovalReaction, l as resolveSignalApprovalConversationKey, s as registerSignalApprovalReactionTargetForDeliveredPayload, t as addSignalApprovalReactionHintToStructuredPayload } from "./approval-reactions-5uyOazxW.js";
|
|
9
|
+
import { r as registerSignalQuestionReactionTargetForDeliveredPayload, t as maybeResolveSignalQuestionReaction } from "./question-reactions-DJ1xQzVF.js";
|
|
10
|
+
import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-BZAqAa8p.js";
|
|
11
|
+
import { bindIngressLifecycleToReplyOptions, createChannelIngressMonitor, createChannelMessageReplyPipeline, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
|
|
10
12
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
11
13
|
import { detectMime, estimateBase64DecodedBytes, kindFromMime, saveMediaBuffer } from "openclaw/plugin-sdk/media-runtime";
|
|
12
14
|
import { resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
13
15
|
import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
16
|
import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
15
17
|
import { normalizeE164, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
18
|
+
import { buildChannelInboundEventContext, buildMentionRegexes, createChannelInboundDebouncer, filterChannelInboundQuoteContext, formatInboundEnvelope, formatInboundFromLabel, formatInboundMediaUnavailableText, hasVisibleInboundReplyDispatch, logInboundDrop, matchesMentionPatterns, resolveEnvelopeFormatOptions, resolveInboundMentionDecision, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent, shouldDebounceTextInbound, toHistoryMediaEntries, toInboundMediaFacts } from "openclaw/plugin-sdk/channel-inbound";
|
|
16
19
|
import nodePath from "node:path";
|
|
17
20
|
import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
|
|
18
21
|
import { collectErrorGraphCandidates, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -20,9 +23,9 @@ import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention } from "op
|
|
|
20
23
|
import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
|
|
21
24
|
import { DEFAULT_GROUP_HISTORY_LIMIT, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
22
25
|
import { deliverTextOrMediaReply, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
23
|
-
import { chunkTextWithMode,
|
|
26
|
+
import { chunkTextWithMode, createReplyReferencePlanner, resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-runtime";
|
|
24
27
|
import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
25
|
-
import { computeBackoff, createNonExitingRuntime, danger, logVerbose, shouldLogVerbose,
|
|
28
|
+
import { computeBackoff, createNonExitingRuntime, danger, logVerbose, shouldLogVerbose, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
26
29
|
import { resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
27
30
|
import { waitForTransportReady } from "openclaw/plugin-sdk/transport-ready-runtime";
|
|
28
31
|
import { spawn } from "node:child_process";
|
|
@@ -31,14 +34,13 @@ import { createInterface } from "node:readline";
|
|
|
31
34
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
32
35
|
import { resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
|
|
33
36
|
import { DEFAULT_EMOJIS, DEFAULT_TIMING, createStatusReactionController, logAckFailure, logTypingFailure, resolveAckReaction, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
|
|
34
|
-
import { buildChannelInboundEventContext, buildMentionRegexes, createChannelInboundDebouncer, filterChannelInboundQuoteContext, formatInboundEnvelope, formatInboundFromLabel, formatInboundMediaUnavailableText, hasVisibleInboundReplyDispatch, logInboundDrop, matchesMentionPatterns, resolveEnvelopeFormatOptions, resolveInboundMentionDecision, runChannelInboundEvent, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
|
|
35
37
|
import { isControlCommandMessage } from "openclaw/plugin-sdk/command-detection";
|
|
36
|
-
import { recordInboundSession, upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
|
|
37
38
|
import { createInternalHookEvent, fireAndForgetHook, toInternalMessageReceivedContext, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime";
|
|
38
39
|
import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference";
|
|
39
40
|
import { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
40
41
|
import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
|
|
41
42
|
import { createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
43
|
+
import { upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
|
|
42
44
|
import { listChatCommands, maybeResolveTextAlias, normalizeCommandBody } from "openclaw/plugin-sdk/command-auth-native";
|
|
43
45
|
import { isAbortRequestText } from "openclaw/plugin-sdk/command-primitives-runtime";
|
|
44
46
|
import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
|
|
@@ -412,7 +414,12 @@ function resolveSignalQuoteContext(params) {
|
|
|
412
414
|
sourceNumber: params.dataMessage?.quote?.author ?? null,
|
|
413
415
|
sourceUuid: params.dataMessage?.quote?.authorUuid ?? null
|
|
414
416
|
});
|
|
415
|
-
const quoteSenderAllowed =
|
|
417
|
+
const quoteSenderAllowed = resolveInboundSupplementalSenderAllowed({
|
|
418
|
+
isGroup: params.isGroup,
|
|
419
|
+
groupPolicy: params.effectiveGroupAllow.length === 0 ? "open" : "allowlist",
|
|
420
|
+
allowFrom: params.effectiveGroupAllow,
|
|
421
|
+
isSenderAllowed: (allowFrom) => quoteSender ? isSignalSenderAllowed(quoteSender, allowFrom) : false
|
|
422
|
+
});
|
|
416
423
|
const visibleQuote = filterChannelInboundQuoteContext(contextVisibilityMode, {
|
|
417
424
|
body: quoteText,
|
|
418
425
|
sender: quoteSender ? formatSignalSenderDisplay(quoteSender) : void 0,
|
|
@@ -507,18 +514,6 @@ const RETRYABLE_FLUSH_RETRY_DELAYS_MS = [
|
|
|
507
514
|
function isSignalReplySessionInitConflictError(error) {
|
|
508
515
|
return collectErrorGraphCandidates(error, (current) => [current.cause, current.error]).some((candidate) => REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE.test(formatErrorMessage(candidate)));
|
|
509
516
|
}
|
|
510
|
-
function formatAttachmentKindCount(kind, count) {
|
|
511
|
-
if (kind === "attachment") return `${count} file${count > 1 ? "s" : ""}`;
|
|
512
|
-
return `${count} ${kind}${count > 1 ? "s" : ""}`;
|
|
513
|
-
}
|
|
514
|
-
function formatAttachmentSummaryPlaceholder(contentTypes) {
|
|
515
|
-
const kindCounts = /* @__PURE__ */ new Map();
|
|
516
|
-
for (const contentType of contentTypes) {
|
|
517
|
-
const kind = kindFromMime(contentType) ?? "attachment";
|
|
518
|
-
kindCounts.set(kind, (kindCounts.get(kind) ?? 0) + 1);
|
|
519
|
-
}
|
|
520
|
-
return `[${[...kindCounts.entries()].map(([kind, count]) => formatAttachmentKindCount(kind, count)).join(" + ")} attached]`;
|
|
521
|
-
}
|
|
522
517
|
function resolveSignalInboundRoute(params) {
|
|
523
518
|
return resolveAgentRoute({
|
|
524
519
|
cfg: params.cfg,
|
|
@@ -547,26 +542,12 @@ function resolveSignalStatusReactionEmojis(emojis) {
|
|
|
547
542
|
};
|
|
548
543
|
}
|
|
549
544
|
async function finalizeSignalStatusReaction(params) {
|
|
550
|
-
if (params.outcome === "done")
|
|
551
|
-
|
|
552
|
-
if (params.removeAckAfterReply) {
|
|
553
|
-
await sleep(params.timing.doneHoldMs);
|
|
554
|
-
await params.controller.clear();
|
|
555
|
-
} else await params.controller.restoreInitial();
|
|
556
|
-
return;
|
|
557
|
-
}
|
|
558
|
-
await params.controller.setError();
|
|
559
|
-
if (params.hasFinalResponse) {
|
|
560
|
-
if (params.removeAckAfterReply) {
|
|
561
|
-
await sleep(params.timing.errorHoldMs);
|
|
562
|
-
await params.controller.clear();
|
|
563
|
-
} else await params.controller.restoreInitial();
|
|
564
|
-
return;
|
|
565
|
-
}
|
|
566
|
-
if (params.removeAckAfterReply) await sleep(params.timing.errorHoldMs);
|
|
545
|
+
if (params.outcome === "done") await params.controller.setDone();
|
|
546
|
+
else await params.controller.setError();
|
|
567
547
|
await params.controller.restoreInitial();
|
|
568
548
|
}
|
|
569
549
|
function createSignalEventHandler(deps) {
|
|
550
|
+
const statusReactionTiming = deps.statusReactionTiming ?? DEFAULT_TIMING;
|
|
570
551
|
const activeEnqueueEntries = /* @__PURE__ */ new WeakSet();
|
|
571
552
|
async function handleSignalInboundMessage(entry) {
|
|
572
553
|
const fromLabel = formatInboundFromLabel({
|
|
@@ -613,7 +594,7 @@ function createSignalEventHandler(deps) {
|
|
|
613
594
|
channel: "Signal",
|
|
614
595
|
from: fromLabel,
|
|
615
596
|
timestamp: historyEntry.timestamp,
|
|
616
|
-
body: `${historyEntry.body}${historyEntry.messageId ? ` [id:${historyEntry.messageId}]` : ""}`,
|
|
597
|
+
body: `${[historyEntry.body, formatSignalMediaText(historyEntry.media ?? [])].filter(Boolean).join("\n")}${historyEntry.messageId ? ` [id:${historyEntry.messageId}]` : ""}`,
|
|
617
598
|
chatType: "group",
|
|
618
599
|
senderLabel: historyEntry.sender,
|
|
619
600
|
envelope: envelopeOptions
|
|
@@ -631,15 +612,7 @@ function createSignalEventHandler(deps) {
|
|
|
631
612
|
chatType: entry.isGroup ? "group" : "direct"
|
|
632
613
|
});
|
|
633
614
|
const replyThreading = resolveBatchedReplyThreadingPolicy(replyToMode, entry.isBatched === true);
|
|
634
|
-
const media = entry.
|
|
635
|
-
path,
|
|
636
|
-
url: path,
|
|
637
|
-
contentType: entry.mediaTypes?.[index]
|
|
638
|
-
})) : entry.mediaPath ? [{
|
|
639
|
-
path: entry.mediaPath,
|
|
640
|
-
url: entry.mediaPath,
|
|
641
|
-
contentType: entry.mediaType
|
|
642
|
-
}] : void 0;
|
|
615
|
+
const media = toInboundMediaFacts(entry.media);
|
|
643
616
|
const ctxPayload = buildChannelInboundEventContext({
|
|
644
617
|
channel: "signal",
|
|
645
618
|
supplemental: { quote: entry.replyToBody ? {
|
|
@@ -661,6 +634,7 @@ function createSignalEventHandler(deps) {
|
|
|
661
634
|
},
|
|
662
635
|
route: {
|
|
663
636
|
agentId: route.agentId,
|
|
637
|
+
dmScope: route.dmScope,
|
|
664
638
|
accountId: route.accountId,
|
|
665
639
|
routeSessionKey: route.sessionKey
|
|
666
640
|
},
|
|
@@ -675,6 +649,7 @@ function createSignalEventHandler(deps) {
|
|
|
675
649
|
rawBody: entry.commandBody,
|
|
676
650
|
commandBody: entry.commandBody
|
|
677
651
|
},
|
|
652
|
+
sessionTranscript: { historyLimit: entry.isGroup ? deps.historyLimit : 0 },
|
|
678
653
|
access: {
|
|
679
654
|
...entry.isGroup ? { mentions: {
|
|
680
655
|
canDetectMention: true,
|
|
@@ -723,23 +698,14 @@ function createSignalEventHandler(deps) {
|
|
|
723
698
|
} : {}
|
|
724
699
|
};
|
|
725
700
|
const statusReactionRecipient = entry.isGroup ? "" : entry.senderRecipient;
|
|
726
|
-
let currentStatusReactionEmoji = ackReaction;
|
|
727
701
|
const statusReactionController = statusReactionsConfig?.enabled === true && signalReactionLevel.level !== "off" && shouldSendStatusReaction && statusReactionTimestamp ? createStatusReactionController({
|
|
728
702
|
enabled: true,
|
|
729
|
-
adapter: {
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
currentStatusReactionEmoji = emoji;
|
|
733
|
-
},
|
|
734
|
-
clearReaction: async () => {
|
|
735
|
-
if (!currentStatusReactionEmoji) return;
|
|
736
|
-
await removeReactionSignal(statusReactionRecipient, statusReactionTimestamp, currentStatusReactionEmoji, signalReactionOpts);
|
|
737
|
-
currentStatusReactionEmoji = "";
|
|
738
|
-
}
|
|
739
|
-
},
|
|
703
|
+
adapter: { setReaction: async (emoji) => {
|
|
704
|
+
await sendReactionSignal(statusReactionRecipient, statusReactionTimestamp, emoji, signalReactionOpts);
|
|
705
|
+
} },
|
|
740
706
|
initialEmoji: ackReaction,
|
|
741
|
-
emojis: resolveSignalStatusReactionEmojis(
|
|
742
|
-
timing:
|
|
707
|
+
emojis: resolveSignalStatusReactionEmojis(void 0),
|
|
708
|
+
timing: statusReactionTiming,
|
|
743
709
|
onError: (err) => {
|
|
744
710
|
logAckFailure({
|
|
745
711
|
log: logVerbose,
|
|
@@ -749,10 +715,6 @@ function createSignalEventHandler(deps) {
|
|
|
749
715
|
});
|
|
750
716
|
}
|
|
751
717
|
}) : null;
|
|
752
|
-
const statusReactionTiming = {
|
|
753
|
-
...DEFAULT_TIMING,
|
|
754
|
-
...statusReactionsConfig?.timing
|
|
755
|
-
};
|
|
756
718
|
if (statusReactionController) statusReactionController.setQueued();
|
|
757
719
|
const { onModelSelected, typingCallbacks, ...replyPipeline } = createChannelMessageReplyPipeline({
|
|
758
720
|
cfg: deps.cfg,
|
|
@@ -786,10 +748,12 @@ function createSignalEventHandler(deps) {
|
|
|
786
748
|
allowImplicitCurrentMessage: replyToMode !== "off" && replyThreading?.implicitCurrentMessage !== "deny",
|
|
787
749
|
state: { hasReplied: false }
|
|
788
750
|
};
|
|
789
|
-
const
|
|
751
|
+
const dispatcherOptions = {
|
|
790
752
|
...replyPipeline,
|
|
791
753
|
humanDelay: resolveHumanDelayConfig(deps.cfg, route.agentId),
|
|
792
|
-
typingCallbacks
|
|
754
|
+
typingCallbacks
|
|
755
|
+
};
|
|
756
|
+
const delivery = {
|
|
793
757
|
deliver: async (payload, _info) => {
|
|
794
758
|
await deps.deliverReplies({
|
|
795
759
|
cfg: deps.cfg,
|
|
@@ -809,7 +773,7 @@ function createSignalEventHandler(deps) {
|
|
|
809
773
|
onError: (err, info) => {
|
|
810
774
|
deps.runtime.error?.(danger(`signal ${info.kind} reply failed: ${String(err)}`));
|
|
811
775
|
}
|
|
812
|
-
}
|
|
776
|
+
};
|
|
813
777
|
const inboundLastRouteSessionKey = resolveInboundLastRouteSessionKey({
|
|
814
778
|
route,
|
|
815
779
|
sessionKey: route.sessionKey
|
|
@@ -826,12 +790,14 @@ function createSignalEventHandler(deps) {
|
|
|
826
790
|
raw: entry
|
|
827
791
|
}),
|
|
828
792
|
resolveTurn: () => ({
|
|
793
|
+
cfg: deps.cfg,
|
|
829
794
|
channel: "signal",
|
|
830
795
|
accountId: route.accountId,
|
|
831
|
-
|
|
832
|
-
|
|
796
|
+
route: {
|
|
797
|
+
agentId: route.agentId,
|
|
798
|
+
sessionKey: route.sessionKey
|
|
799
|
+
},
|
|
833
800
|
ctxPayload,
|
|
834
|
-
recordInboundSession,
|
|
835
801
|
record: {
|
|
836
802
|
updateLastRoute: !entry.isGroup ? {
|
|
837
803
|
sessionKey: inboundLastRouteSessionKey,
|
|
@@ -865,41 +831,31 @@ function createSignalEventHandler(deps) {
|
|
|
865
831
|
historyMap: deps.groupHistories,
|
|
866
832
|
limit: deps.historyLimit
|
|
867
833
|
},
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
statusReactionController.cancelPending();
|
|
894
|
-
await statusReactionController.setThinking();
|
|
895
|
-
}
|
|
896
|
-
} : {},
|
|
897
|
-
onModelSelected
|
|
898
|
-
}
|
|
899
|
-
});
|
|
900
|
-
} finally {
|
|
901
|
-
markDispatchIdle();
|
|
902
|
-
}
|
|
834
|
+
afterRecord: () => {
|
|
835
|
+
if (statusReactionController) statusReactionController.setThinking();
|
|
836
|
+
},
|
|
837
|
+
dispatcherOptions,
|
|
838
|
+
delivery,
|
|
839
|
+
sessionInitRetry: { delaysMs: [] },
|
|
840
|
+
replyOptions: {
|
|
841
|
+
...entry.turnAdoptionLifecycle ? bindIngressLifecycleToReplyOptions(entry.turnAdoptionLifecycle) : {},
|
|
842
|
+
disableBlockStreaming: typeof deps.blockStreaming === "boolean" ? !deps.blockStreaming : void 0,
|
|
843
|
+
...statusReactionController ? {
|
|
844
|
+
allowProgressCallbacksWhenSourceDeliverySuppressed: true,
|
|
845
|
+
allowToolLifecycleWhenProgressHidden: true,
|
|
846
|
+
onToolStart: async (payload) => {
|
|
847
|
+
const toolName = payload.name?.trim();
|
|
848
|
+
if (toolName) await statusReactionController.setTool(toolName);
|
|
849
|
+
},
|
|
850
|
+
onCompactionStart: async () => {
|
|
851
|
+
await statusReactionController.setCompacting();
|
|
852
|
+
},
|
|
853
|
+
onCompactionEnd: async () => {
|
|
854
|
+
statusReactionController.cancelPending();
|
|
855
|
+
await statusReactionController.setThinking();
|
|
856
|
+
}
|
|
857
|
+
} : {},
|
|
858
|
+
onModelSelected
|
|
903
859
|
}
|
|
904
860
|
}),
|
|
905
861
|
onFinalize: (result) => {
|
|
@@ -908,10 +864,7 @@ function createSignalEventHandler(deps) {
|
|
|
908
864
|
const hasDeliveryFailure = result.dispatched && hasSignalStatusReplyDeliveryFailure(result.dispatchResult);
|
|
909
865
|
finalizeSignalStatusReaction({
|
|
910
866
|
controller: statusReactionController,
|
|
911
|
-
outcome: hasFinalResponse && !hasDeliveryFailure ? "done" : "error"
|
|
912
|
-
hasFinalResponse,
|
|
913
|
-
removeAckAfterReply: deps.cfg.messages?.removeAckAfterReply ?? false,
|
|
914
|
-
timing: statusReactionTiming
|
|
867
|
+
outcome: hasFinalResponse && !hasDeliveryFailure ? "done" : "error"
|
|
915
868
|
}).catch((err) => {
|
|
916
869
|
logVerbose(`signal: status reaction finalize failed: ${String(err)}`);
|
|
917
870
|
});
|
|
@@ -919,27 +872,69 @@ function createSignalEventHandler(deps) {
|
|
|
919
872
|
}
|
|
920
873
|
});
|
|
921
874
|
}
|
|
875
|
+
function buildFlushIngressLifecycle(entries) {
|
|
876
|
+
const lifecycles = entries.map((entry) => entry.turnAdoptionLifecycle).filter((lifecycle) => lifecycle !== void 0);
|
|
877
|
+
const [firstLifecycle] = lifecycles;
|
|
878
|
+
if (!firstLifecycle) return {
|
|
879
|
+
lifecycle: void 0,
|
|
880
|
+
settle: async () => {}
|
|
881
|
+
};
|
|
882
|
+
let handedOff = false;
|
|
883
|
+
const adoptAll = async () => {
|
|
884
|
+
for (const lifecycle of lifecycles) await lifecycle.onAdopted();
|
|
885
|
+
};
|
|
886
|
+
return {
|
|
887
|
+
lifecycle: {
|
|
888
|
+
abortSignal: lifecycles.length === 1 ? firstLifecycle.abortSignal : AbortSignal.any(lifecycles.map((lifecycle) => lifecycle.abortSignal)),
|
|
889
|
+
onAdopted: async () => {
|
|
890
|
+
handedOff = true;
|
|
891
|
+
await adoptAll();
|
|
892
|
+
},
|
|
893
|
+
onDeferred: () => {
|
|
894
|
+
handedOff = true;
|
|
895
|
+
for (const lifecycle of lifecycles) lifecycle.onDeferred();
|
|
896
|
+
},
|
|
897
|
+
onAdoptionFinalizing: () => {
|
|
898
|
+
for (const lifecycle of lifecycles) lifecycle.onAdoptionFinalizing();
|
|
899
|
+
},
|
|
900
|
+
onAbandoned: async () => {
|
|
901
|
+
handedOff = true;
|
|
902
|
+
await Promise.all(lifecycles.map((lifecycle) => Promise.resolve(lifecycle.onAbandoned())));
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
settle: async () => {
|
|
906
|
+
if (!handedOff) await adoptAll();
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
}
|
|
922
910
|
async function flushSignalInboundEntries(entries) {
|
|
923
911
|
const last = entries.at(-1);
|
|
924
912
|
if (!last) return;
|
|
913
|
+
const { lifecycle, settle } = buildFlushIngressLifecycle(entries);
|
|
925
914
|
if (entries.length === 1) {
|
|
926
|
-
await handleSignalInboundMessage(
|
|
915
|
+
await handleSignalInboundMessage(lifecycle ? {
|
|
916
|
+
...last,
|
|
917
|
+
turnAdoptionLifecycle: lifecycle
|
|
918
|
+
} : last);
|
|
919
|
+
await settle();
|
|
920
|
+
return;
|
|
921
|
+
}
|
|
922
|
+
const combinedText = entries.map((entry) => entry.bodyText).filter(Boolean).join("\n");
|
|
923
|
+
const combinedCommandBody = entries.map((entry) => entry.commandBody).filter(Boolean).join("\n");
|
|
924
|
+
if (!combinedText.trim()) {
|
|
925
|
+
await settle();
|
|
927
926
|
return;
|
|
928
927
|
}
|
|
929
|
-
const combinedText = entries.map((entry) => entry.bodyText).filter(Boolean).join("\\n");
|
|
930
|
-
const combinedCommandBody = entries.map((entry) => entry.commandBody).filter(Boolean).join("\\n");
|
|
931
|
-
if (!combinedText.trim()) return;
|
|
932
928
|
await handleSignalInboundMessage({
|
|
933
929
|
...last,
|
|
934
930
|
bodyText: combinedText,
|
|
935
931
|
commandBody: combinedCommandBody,
|
|
932
|
+
...lifecycle ? { turnAdoptionLifecycle: lifecycle } : {},
|
|
936
933
|
isBatched: true,
|
|
937
934
|
nativeReplyBody: last.nativeReplyBody ?? last.bodyText,
|
|
938
|
-
|
|
939
|
-
mediaType: void 0,
|
|
940
|
-
mediaPaths: void 0,
|
|
941
|
-
mediaTypes: void 0
|
|
935
|
+
media: entries.flatMap((entry) => entry.media ?? [])
|
|
942
936
|
});
|
|
937
|
+
await settle();
|
|
943
938
|
}
|
|
944
939
|
async function retrySignalInboundFlush(entries, initialError) {
|
|
945
940
|
let lastError = initialError;
|
|
@@ -974,7 +969,10 @@ function createSignalEventHandler(deps) {
|
|
|
974
969
|
} catch (err) {
|
|
975
970
|
if (!isSignalReplySessionInitConflictError(err)) throw err;
|
|
976
971
|
if (deps.abortSignal?.aborted) return;
|
|
977
|
-
const retryTask = retrySignalInboundFlush(entries, err)
|
|
972
|
+
const retryTask = retrySignalInboundFlush(entries, err).catch(async (terminalError) => {
|
|
973
|
+
await Promise.all(entries.map((entry) => Promise.resolve(entry.turnAdoptionLifecycle?.onAbandoned())));
|
|
974
|
+
throw terminalError;
|
|
975
|
+
});
|
|
978
976
|
deps.runTrackedTask?.(() => retryTask.catch(() => void 0));
|
|
979
977
|
await retryTask;
|
|
980
978
|
}
|
|
@@ -988,13 +986,11 @@ function createSignalEventHandler(deps) {
|
|
|
988
986
|
cfg: deps.cfg,
|
|
989
987
|
channel: "signal",
|
|
990
988
|
buildKey: (entry) => resolveSignalInboundDebounceKey(deps.accountId, entry),
|
|
991
|
-
shouldDebounce: (entry) => {
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
});
|
|
997
|
-
},
|
|
989
|
+
shouldDebounce: (entry) => shouldDebounceTextInbound({
|
|
990
|
+
text: entry.commandBody,
|
|
991
|
+
cfg: deps.cfg,
|
|
992
|
+
hasMedia: entry.media?.some((media) => Boolean(media.path || media.url)) === true
|
|
993
|
+
}),
|
|
998
994
|
onFlush: flushNormalSignalInboundEntries,
|
|
999
995
|
onError: reportSignalInboundFlushError,
|
|
1000
996
|
onCancel: pendingInboundRegistry.complete
|
|
@@ -1034,6 +1030,18 @@ function createSignalEventHandler(deps) {
|
|
|
1034
1030
|
logVerbose(`Blocked signal reaction sender ${params.senderDisplay} (${params.accessDecision.reasonCode})`);
|
|
1035
1031
|
return true;
|
|
1036
1032
|
}
|
|
1033
|
+
if (conversationKey && await maybeResolveSignalQuestionReaction({
|
|
1034
|
+
cfg: deps.cfg,
|
|
1035
|
+
accountId: deps.accountId,
|
|
1036
|
+
conversationKey,
|
|
1037
|
+
messageId,
|
|
1038
|
+
reactionKey: emojiLabel,
|
|
1039
|
+
isRemove: Boolean(params.reaction.isRemove),
|
|
1040
|
+
actorId: formatSignalSenderId(params.sender),
|
|
1041
|
+
targetAuthor: params.reaction.targetAuthor,
|
|
1042
|
+
targetAuthorUuid: params.reaction.targetAuthorUuid,
|
|
1043
|
+
logDebug: logVerbose
|
|
1044
|
+
})) return true;
|
|
1037
1045
|
const targets = deps.resolveSignalReactionTargets(params.reaction);
|
|
1038
1046
|
if (!deps.shouldEmitSignalReactionNotification({
|
|
1039
1047
|
mode: deps.reactionMode,
|
|
@@ -1073,7 +1081,7 @@ function createSignalEventHandler(deps) {
|
|
|
1073
1081
|
});
|
|
1074
1082
|
return true;
|
|
1075
1083
|
}
|
|
1076
|
-
return async (event) => {
|
|
1084
|
+
return async (event, turnAdoptionLifecycle) => {
|
|
1077
1085
|
if (event.event !== "receive" || !event.data) return;
|
|
1078
1086
|
let payload;
|
|
1079
1087
|
try {
|
|
@@ -1222,23 +1230,23 @@ function createSignalEventHandler(deps) {
|
|
|
1222
1230
|
reason: "no mention",
|
|
1223
1231
|
target: senderDisplay
|
|
1224
1232
|
});
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
const pendingBodyText = messageText || pendingPlaceholder || visibleQuoteText;
|
|
1233
|
+
const pendingMedia = (dataMessage.attachments ?? []).map((attachment) => {
|
|
1234
|
+
const contentType = attachment?.contentType ?? void 0;
|
|
1235
|
+
return {
|
|
1236
|
+
contentType,
|
|
1237
|
+
kind: kindFromMime(contentType) ?? "unknown"
|
|
1238
|
+
};
|
|
1239
|
+
});
|
|
1240
|
+
const pendingMediaText = formatSignalMediaText(pendingMedia);
|
|
1241
|
+
const pendingBodyText = messageText || pendingMediaText || visibleQuoteText;
|
|
1235
1242
|
const historyKey = groupId ?? "unknown";
|
|
1236
1243
|
createChannelHistoryWindow({ historyMap: deps.groupHistories }).record({
|
|
1237
1244
|
historyKey,
|
|
1238
1245
|
limit: deps.historyLimit,
|
|
1239
1246
|
entry: {
|
|
1240
1247
|
sender: envelope.sourceName ?? senderDisplay,
|
|
1241
|
-
body:
|
|
1248
|
+
body: messageText || visibleQuoteText,
|
|
1249
|
+
media: toHistoryMediaEntries(pendingMedia),
|
|
1242
1250
|
timestamp: envelope.timestamp ?? void 0,
|
|
1243
1251
|
messageId: typeof envelope.timestamp === "number" ? String(envelope.timestamp) : void 0
|
|
1244
1252
|
}
|
|
@@ -1248,7 +1256,8 @@ function createSignalEventHandler(deps) {
|
|
|
1248
1256
|
to: signalTo,
|
|
1249
1257
|
replyToId,
|
|
1250
1258
|
author: senderRecipient,
|
|
1251
|
-
body:
|
|
1259
|
+
body: messageText || visibleQuoteText,
|
|
1260
|
+
media: pendingMedia,
|
|
1252
1261
|
sourceTimestamp: inboundTimestamp
|
|
1253
1262
|
});
|
|
1254
1263
|
const signalGroupPolicy = resolveChannelGroupPolicy({
|
|
@@ -1280,14 +1289,16 @@ function createSignalEventHandler(deps) {
|
|
|
1280
1289
|
}
|
|
1281
1290
|
return;
|
|
1282
1291
|
}
|
|
1283
|
-
let mediaPath;
|
|
1284
|
-
let mediaType;
|
|
1285
|
-
const mediaPaths = [];
|
|
1286
|
-
const mediaTypes = [];
|
|
1287
|
-
let placeholder = "";
|
|
1288
1292
|
const attachments = dataMessage.attachments ?? [];
|
|
1293
|
+
const mediaFacts = attachments.map((attachment) => {
|
|
1294
|
+
const contentType = attachment?.contentType ?? void 0;
|
|
1295
|
+
return {
|
|
1296
|
+
contentType,
|
|
1297
|
+
kind: kindFromMime(contentType) ?? "unknown"
|
|
1298
|
+
};
|
|
1299
|
+
});
|
|
1289
1300
|
let unavailableAttachmentCount = deps.ignoreAttachments ? attachments.length : 0;
|
|
1290
|
-
if (!deps.ignoreAttachments) for (const attachment of attachments) {
|
|
1301
|
+
if (!deps.ignoreAttachments) for (const [index, attachment] of attachments.entries()) {
|
|
1291
1302
|
if (!attachment?.id) {
|
|
1292
1303
|
unavailableAttachmentCount += 1;
|
|
1293
1304
|
continue;
|
|
@@ -1302,25 +1313,20 @@ function createSignalEventHandler(deps) {
|
|
|
1302
1313
|
maxBytes: deps.mediaMaxBytes
|
|
1303
1314
|
});
|
|
1304
1315
|
if (fetched) {
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1316
|
+
const contentType = fetched.contentType ?? attachment.contentType ?? "application/octet-stream";
|
|
1317
|
+
mediaFacts[index] = {
|
|
1318
|
+
path: fetched.path,
|
|
1319
|
+
url: fetched.path,
|
|
1320
|
+
contentType,
|
|
1321
|
+
kind: kindFromMime(contentType) ?? "unknown"
|
|
1322
|
+
};
|
|
1311
1323
|
} else unavailableAttachmentCount += 1;
|
|
1312
1324
|
} catch (err) {
|
|
1313
1325
|
unavailableAttachmentCount += 1;
|
|
1314
1326
|
deps.runtime.error?.(danger(`attachment fetch failed: ${String(err)}`));
|
|
1315
1327
|
}
|
|
1316
1328
|
}
|
|
1317
|
-
|
|
1318
|
-
else {
|
|
1319
|
-
const kind = kindFromMime(mediaType ?? void 0);
|
|
1320
|
-
if (kind) placeholder = `<media:${kind}>`;
|
|
1321
|
-
else if (mediaPaths.length > 0) placeholder = "<media:attachment>";
|
|
1322
|
-
}
|
|
1323
|
-
let bodyText = messageText || placeholder || visibleQuoteText || "";
|
|
1329
|
+
let bodyText = messageText;
|
|
1324
1330
|
if (unavailableAttachmentCount > 0) {
|
|
1325
1331
|
const attachmentLabel = unavailableAttachmentCount === 1 ? "attachment" : "attachments";
|
|
1326
1332
|
bodyText = formatInboundMediaUnavailableText({
|
|
@@ -1328,7 +1334,7 @@ function createSignalEventHandler(deps) {
|
|
|
1328
1334
|
notice: `[signal ${unavailableAttachmentCount > 1 ? `${unavailableAttachmentCount} ` : ""}${attachmentLabel} unavailable]`
|
|
1329
1335
|
});
|
|
1330
1336
|
}
|
|
1331
|
-
if (!bodyText) return;
|
|
1337
|
+
if (!bodyText && mediaFacts.length === 0 && !visibleQuoteText) return;
|
|
1332
1338
|
if (deps.sendReadReceipts && !deps.readReceiptsViaDaemon && !isGroup && inboundTimestamp) try {
|
|
1333
1339
|
await sendReadReceiptSignal(`signal:${senderRecipient}`, inboundTimestamp, {
|
|
1334
1340
|
cfg: deps.cfg,
|
|
@@ -1346,7 +1352,8 @@ function createSignalEventHandler(deps) {
|
|
|
1346
1352
|
to: signalTo,
|
|
1347
1353
|
replyToId,
|
|
1348
1354
|
author: senderRecipient,
|
|
1349
|
-
body:
|
|
1355
|
+
body: messageText,
|
|
1356
|
+
media: mediaFacts,
|
|
1350
1357
|
sourceTimestamp: inboundTimestamp
|
|
1351
1358
|
});
|
|
1352
1359
|
const entry = {
|
|
@@ -1358,21 +1365,20 @@ function createSignalEventHandler(deps) {
|
|
|
1358
1365
|
groupName,
|
|
1359
1366
|
isGroup,
|
|
1360
1367
|
bodyText,
|
|
1368
|
+
nativeReplyBody: [messageText, formatSignalMediaText(mediaFacts)].filter(Boolean).join("\n"),
|
|
1361
1369
|
commandBody: messageText,
|
|
1362
1370
|
timestamp: inboundTimestamp,
|
|
1363
1371
|
messageId,
|
|
1364
1372
|
replyToId,
|
|
1365
|
-
|
|
1366
|
-
mediaType,
|
|
1367
|
-
mediaPaths: mediaPaths.length > 0 ? mediaPaths : void 0,
|
|
1368
|
-
mediaTypes: mediaTypes.length > 0 ? mediaTypes : void 0,
|
|
1373
|
+
media: mediaFacts,
|
|
1369
1374
|
commandAuthorized,
|
|
1370
1375
|
canDetectMention,
|
|
1371
1376
|
requireMention,
|
|
1372
1377
|
wasMentioned: effectiveWasMentioned,
|
|
1373
1378
|
replyToBody: visibleQuoteText || void 0,
|
|
1374
1379
|
replyToSender: visibleQuoteSender,
|
|
1375
|
-
replyToIsQuote: visibleQuoteText ? true : void 0
|
|
1380
|
+
replyToIsQuote: visibleQuoteText ? true : void 0,
|
|
1381
|
+
turnAdoptionLifecycle
|
|
1376
1382
|
};
|
|
1377
1383
|
pendingInboundRegistry.cancelPendingOnAbort(entry, debouncer.cancelKey);
|
|
1378
1384
|
const inboundLane = resolveSignalControlLaneKey(deps.accountId, entry) ? controlDebouncer : debouncer;
|
|
@@ -1383,6 +1389,131 @@ function createSignalEventHandler(deps) {
|
|
|
1383
1389
|
} finally {
|
|
1384
1390
|
activeEnqueueEntries.delete(entry);
|
|
1385
1391
|
}
|
|
1392
|
+
if (turnAdoptionLifecycle) return { kind: "deferred" };
|
|
1393
|
+
};
|
|
1394
|
+
}
|
|
1395
|
+
//#endregion
|
|
1396
|
+
//#region extensions/signal/src/reaction-targets.ts
|
|
1397
|
+
function registerSignalReactionTargetsForDeliveredPayload(params) {
|
|
1398
|
+
registerSignalQuestionReactionTargetForDeliveredPayload(params);
|
|
1399
|
+
registerSignalApprovalReactionTargetForDeliveredPayload(params);
|
|
1400
|
+
}
|
|
1401
|
+
//#endregion
|
|
1402
|
+
//#region extensions/signal/src/signal-ingress.ts
|
|
1403
|
+
const SIGNAL_INGRESS_COMPLETED_TTL_MS = 720 * 60 * 60 * 1e3;
|
|
1404
|
+
const SIGNAL_INGRESS_COMPLETED_MAX_ENTRIES = 1e3;
|
|
1405
|
+
const SIGNAL_INGRESS_FAILED_TTL_MS = 720 * 60 * 60 * 1e3;
|
|
1406
|
+
const SIGNAL_INGRESS_FAILED_MAX_ENTRIES = 1e3;
|
|
1407
|
+
const SIGNAL_INGRESS_DRAIN_INTERVAL_MS = 1e3;
|
|
1408
|
+
var SignalIngressPermanentError = class extends Error {
|
|
1409
|
+
constructor(reason, message, options) {
|
|
1410
|
+
super(message, options);
|
|
1411
|
+
this.reason = reason;
|
|
1412
|
+
this.name = "SignalIngressPermanentError";
|
|
1413
|
+
}
|
|
1414
|
+
};
|
|
1415
|
+
function isRecord$1(value) {
|
|
1416
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1417
|
+
}
|
|
1418
|
+
function normalizeRawString(value) {
|
|
1419
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
1420
|
+
}
|
|
1421
|
+
function normalizeTimestamp(value) {
|
|
1422
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value > 0 ? value : null;
|
|
1423
|
+
}
|
|
1424
|
+
function parseReceiveEnvelope(event) {
|
|
1425
|
+
if (event.event !== "receive" || !event.data) return null;
|
|
1426
|
+
let parsed;
|
|
1427
|
+
try {
|
|
1428
|
+
parsed = JSON.parse(event.data);
|
|
1429
|
+
} catch (error) {
|
|
1430
|
+
throw new SignalIngressPermanentError("parse-error", "Signal receive event contains invalid JSON", { cause: error });
|
|
1431
|
+
}
|
|
1432
|
+
if (!isRecord$1(parsed)) throw new SignalIngressPermanentError("parse-error", "Signal receive event must contain a JSON object");
|
|
1433
|
+
return isRecord$1(parsed.envelope) ? parsed.envelope : null;
|
|
1434
|
+
}
|
|
1435
|
+
function resolveDataMessage(envelope) {
|
|
1436
|
+
if (isRecord$1(envelope.dataMessage)) return envelope.dataMessage;
|
|
1437
|
+
return isRecord$1(envelope.editMessage?.dataMessage) ? envelope.editMessage.dataMessage : null;
|
|
1438
|
+
}
|
|
1439
|
+
function inspectSignalIngressEvent(event) {
|
|
1440
|
+
const envelope = parseReceiveEnvelope(event);
|
|
1441
|
+
if (!envelope || "syncMessage" in envelope) return null;
|
|
1442
|
+
const dataMessage = resolveDataMessage(envelope);
|
|
1443
|
+
const reactionMessage = isRecord$1(envelope.reactionMessage) ? envelope.reactionMessage : null;
|
|
1444
|
+
if (!dataMessage && !reactionMessage) return null;
|
|
1445
|
+
const senderUuid = normalizeRawString(envelope.sourceUuid);
|
|
1446
|
+
const senderNumber = normalizeRawString(envelope.sourceNumber);
|
|
1447
|
+
const senderKey = senderUuid ? `uuid:${senderUuid}` : senderNumber ? `number:${senderNumber}` : null;
|
|
1448
|
+
if (!senderKey) throw new SignalIngressPermanentError("missing-sender", "Signal dispatchable envelope is missing sourceUuid/sourceNumber");
|
|
1449
|
+
const timestamp = normalizeTimestamp(envelope.timestamp) ?? normalizeTimestamp(dataMessage?.timestamp);
|
|
1450
|
+
if (timestamp === null) throw new SignalIngressPermanentError("missing-timestamp", "Signal dispatchable envelope is missing a stable timestamp");
|
|
1451
|
+
const dataGroup = isRecord$1(dataMessage?.groupInfo) ? dataMessage.groupInfo : null;
|
|
1452
|
+
const reactionGroup = isRecord$1(reactionMessage?.groupInfo) ? reactionMessage.groupInfo : null;
|
|
1453
|
+
const groupId = normalizeRawString(dataGroup?.groupId) ?? normalizeRawString(reactionGroup?.groupId);
|
|
1454
|
+
return {
|
|
1455
|
+
eventId: JSON.stringify([senderKey, timestamp]),
|
|
1456
|
+
laneKey: groupId ? `group:${groupId}` : `direct:${senderKey}`
|
|
1457
|
+
};
|
|
1458
|
+
}
|
|
1459
|
+
function resolveSignalIngressNonRetryableFailure(error) {
|
|
1460
|
+
return error instanceof SignalIngressPermanentError ? {
|
|
1461
|
+
reason: error.reason,
|
|
1462
|
+
message: error.message
|
|
1463
|
+
} : null;
|
|
1464
|
+
}
|
|
1465
|
+
/** Open the account queue, recover it, and keep newly appended rows draining. */
|
|
1466
|
+
async function startSignalIngressMonitor(params) {
|
|
1467
|
+
let queue = params.queue;
|
|
1468
|
+
if (!queue) {
|
|
1469
|
+
const pluginRuntime = getOptionalSignalRuntime();
|
|
1470
|
+
if (!pluginRuntime) throw new Error("Signal runtime not initialized for durable ingress");
|
|
1471
|
+
queue = pluginRuntime.state.openChannelIngressQueue({ accountId: params.accountId });
|
|
1472
|
+
}
|
|
1473
|
+
const monitor = createChannelIngressMonitor({
|
|
1474
|
+
queue,
|
|
1475
|
+
inspect: (event) => inspectSignalIngressEvent(event),
|
|
1476
|
+
payload: {
|
|
1477
|
+
version: 1,
|
|
1478
|
+
serialize: (event, { receivedAt }) => ({
|
|
1479
|
+
receivedAt,
|
|
1480
|
+
event
|
|
1481
|
+
}),
|
|
1482
|
+
deserialize: (body) => body.event,
|
|
1483
|
+
encode: ({ body }) => ({
|
|
1484
|
+
version: 1,
|
|
1485
|
+
...body
|
|
1486
|
+
}),
|
|
1487
|
+
decode: (payload) => ({
|
|
1488
|
+
version: payload.version,
|
|
1489
|
+
body: payload
|
|
1490
|
+
}),
|
|
1491
|
+
createClaimError: (_kind, claim) => new SignalIngressPermanentError("unsupported-event", `Signal ingress row ${claim.id} has an invalid payload`)
|
|
1492
|
+
},
|
|
1493
|
+
deliver: (event, lifecycle) => params.dispatch(event, lifecycle),
|
|
1494
|
+
pollIntervalMs: SIGNAL_INGRESS_DRAIN_INTERVAL_MS,
|
|
1495
|
+
retention: {
|
|
1496
|
+
pruneIntervalMs: 0,
|
|
1497
|
+
completedTtlMs: SIGNAL_INGRESS_COMPLETED_TTL_MS,
|
|
1498
|
+
completedMaxEntries: SIGNAL_INGRESS_COMPLETED_MAX_ENTRIES,
|
|
1499
|
+
failedTtlMs: SIGNAL_INGRESS_FAILED_TTL_MS,
|
|
1500
|
+
failedMaxEntries: SIGNAL_INGRESS_FAILED_MAX_ENTRIES
|
|
1501
|
+
},
|
|
1502
|
+
appendRetryDelaysMs: [0],
|
|
1503
|
+
drain: {
|
|
1504
|
+
resolveNonRetryableFailure: resolveSignalIngressNonRetryableFailure,
|
|
1505
|
+
onLog: (message) => params.runtime.log?.(`signal ${message}`)
|
|
1506
|
+
},
|
|
1507
|
+
onError: (error) => params.runtime.error?.(`signal ingress drain failed: ${String(error)}`)
|
|
1508
|
+
});
|
|
1509
|
+
monitor.start();
|
|
1510
|
+
return {
|
|
1511
|
+
receive: async (event) => {
|
|
1512
|
+
await monitor.admit(event);
|
|
1513
|
+
await monitor.waitForPumpIdle();
|
|
1514
|
+
},
|
|
1515
|
+
stop: monitor.stop,
|
|
1516
|
+
waitForIdle: monitor.waitForIdle
|
|
1386
1517
|
};
|
|
1387
1518
|
}
|
|
1388
1519
|
//#endregion
|
|
@@ -1393,7 +1524,7 @@ const DEFAULT_RECONNECT_POLICY = {
|
|
|
1393
1524
|
factor: 2,
|
|
1394
1525
|
jitter: .2
|
|
1395
1526
|
};
|
|
1396
|
-
async function runSignalSseLoop({ baseUrl, account, abortSignal, runtime, onEvent, timeoutMs,
|
|
1527
|
+
async function runSignalSseLoop({ baseUrl, account, abortSignal, runtime, onEvent, timeoutMs, transportKind, policy }) {
|
|
1397
1528
|
const reconnectPolicy = {
|
|
1398
1529
|
...DEFAULT_RECONNECT_POLICY,
|
|
1399
1530
|
...policy
|
|
@@ -1411,10 +1542,10 @@ async function runSignalSseLoop({ baseUrl, account, abortSignal, runtime, onEven
|
|
|
1411
1542
|
account,
|
|
1412
1543
|
abortSignal,
|
|
1413
1544
|
timeoutMs,
|
|
1414
|
-
|
|
1415
|
-
onEvent: (event) => {
|
|
1545
|
+
transportKind,
|
|
1546
|
+
onEvent: async (event) => {
|
|
1416
1547
|
reconnectAttempts = 0;
|
|
1417
|
-
onEvent(event);
|
|
1548
|
+
await onEvent(event);
|
|
1418
1549
|
},
|
|
1419
1550
|
logger: {
|
|
1420
1551
|
log: runtime.log,
|
|
@@ -1447,15 +1578,15 @@ var monitor_exports = /* @__PURE__ */ __exportAll({
|
|
|
1447
1578
|
deliverReplies: () => deliverReplies,
|
|
1448
1579
|
monitorSignalProvider: () => monitorSignalProvider
|
|
1449
1580
|
});
|
|
1450
|
-
function resolveRuntime(opts) {
|
|
1451
|
-
return opts.runtime ?? createNonExitingRuntime();
|
|
1452
|
-
}
|
|
1453
1581
|
function createSignalMonitorTaskRunner(runtime) {
|
|
1454
1582
|
const inFlight = /* @__PURE__ */ new Set();
|
|
1455
1583
|
return {
|
|
1456
1584
|
runTask(task) {
|
|
1457
|
-
const trackedTask = Promise.resolve().then(task)
|
|
1585
|
+
const trackedTask = Promise.resolve().then(task);
|
|
1458
1586
|
inFlight.add(trackedTask);
|
|
1587
|
+
trackedTask.catch((err) => runtime.error?.(`signal monitor task failed: ${String(err)}`));
|
|
1588
|
+
trackedTask.finally(() => inFlight.delete(trackedTask)).catch(() => void 0);
|
|
1589
|
+
return trackedTask;
|
|
1459
1590
|
},
|
|
1460
1591
|
async waitForIdle() {
|
|
1461
1592
|
while (inFlight.size > 0) await Promise.allSettled(inFlight);
|
|
@@ -1465,13 +1596,16 @@ function createSignalMonitorTaskRunner(runtime) {
|
|
|
1465
1596
|
function createSignalDaemonLifecycle(params) {
|
|
1466
1597
|
let daemonHandle = null;
|
|
1467
1598
|
let daemonStopRequested = false;
|
|
1599
|
+
let daemonStopPromise;
|
|
1468
1600
|
let daemonExitError;
|
|
1469
1601
|
const daemonAbortController = new AbortController();
|
|
1470
1602
|
const abortSignal = params.abortSignal ? AbortSignal.any([params.abortSignal, daemonAbortController.signal]) : daemonAbortController.signal;
|
|
1471
1603
|
const stop = () => {
|
|
1604
|
+
if (daemonStopPromise) return daemonStopPromise;
|
|
1472
1605
|
daemonStopRequested = true;
|
|
1473
1606
|
if (!daemonAbortController.signal.aborted) daemonAbortController.abort(params.abortSignal?.reason ?? /* @__PURE__ */ new Error("Signal monitor stopped"));
|
|
1474
|
-
|
|
1607
|
+
daemonStopPromise = daemonHandle?.stop() ?? Promise.resolve();
|
|
1608
|
+
return daemonStopPromise;
|
|
1475
1609
|
};
|
|
1476
1610
|
const attach = (handle) => {
|
|
1477
1611
|
daemonHandle = handle;
|
|
@@ -1489,9 +1623,6 @@ function createSignalDaemonLifecycle(params) {
|
|
|
1489
1623
|
abortSignal
|
|
1490
1624
|
};
|
|
1491
1625
|
}
|
|
1492
|
-
function normalizeAllowList(raw) {
|
|
1493
|
-
return normalizeStringEntries(raw);
|
|
1494
|
-
}
|
|
1495
1626
|
function resolveSignalReactionTargets(reaction) {
|
|
1496
1627
|
const targets = [];
|
|
1497
1628
|
const uuid = reaction.targetAuthorUuid?.trim();
|
|
@@ -1580,7 +1711,7 @@ async function fetchAttachment(params) {
|
|
|
1580
1711
|
const result = await signalRpcRequest("getAttachment", rpcParams, {
|
|
1581
1712
|
baseUrl: params.baseUrl,
|
|
1582
1713
|
maxResponseBytes: deriveSignalAttachmentRpcMaxResponseBytes(params.maxBytes),
|
|
1583
|
-
|
|
1714
|
+
transportKind: params.transportKind
|
|
1584
1715
|
});
|
|
1585
1716
|
if (!result?.data) return null;
|
|
1586
1717
|
if (estimateBase64DecodedBytes(result.data) > params.maxBytes) throw new Error(`Signal attachment ${attachment.id} exceeds ${(params.maxBytes / (1024 * 1024)).toFixed(0)}MB limit`);
|
|
@@ -1654,7 +1785,7 @@ async function deliverReplies(params) {
|
|
|
1654
1785
|
}), visibleText);
|
|
1655
1786
|
}
|
|
1656
1787
|
}) !== "empty") {
|
|
1657
|
-
|
|
1788
|
+
registerSignalReactionTargetsForDeliveredPayload({
|
|
1658
1789
|
cfg: params.cfg,
|
|
1659
1790
|
target: {
|
|
1660
1791
|
channel: "signal",
|
|
@@ -1712,7 +1843,7 @@ function createSignalNativeReplyResolver(params) {
|
|
|
1712
1843
|
};
|
|
1713
1844
|
}
|
|
1714
1845
|
async function monitorSignalProvider(opts = {}) {
|
|
1715
|
-
const runtime =
|
|
1846
|
+
const runtime = opts.runtime ?? createNonExitingRuntime();
|
|
1716
1847
|
const cfg = opts.config ?? getRuntimeConfig();
|
|
1717
1848
|
const accountInfo = resolveSignalAccount({
|
|
1718
1849
|
cfg,
|
|
@@ -1725,8 +1856,8 @@ async function monitorSignalProvider(opts = {}) {
|
|
|
1725
1856
|
const baseUrl = normalizeOptionalString(opts.baseUrl) ?? accountInfo.baseUrl;
|
|
1726
1857
|
const account = normalizeOptionalString(opts.account) ?? normalizeOptionalString(accountInfo.config.account);
|
|
1727
1858
|
const dmPolicy = accountInfo.config.dmPolicy ?? "pairing";
|
|
1728
|
-
const allowFrom =
|
|
1729
|
-
const groupAllowFrom =
|
|
1859
|
+
const allowFrom = normalizeStringEntries(opts.allowFrom ?? accountInfo.config.allowFrom);
|
|
1860
|
+
const groupAllowFrom = normalizeStringEntries(opts.groupAllowFrom ?? accountInfo.config.groupAllowFrom ?? (accountInfo.config.allowFrom && accountInfo.config.allowFrom.length > 0 ? accountInfo.config.allowFrom : []));
|
|
1730
1861
|
const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg);
|
|
1731
1862
|
const { groupPolicy, providerMissingFallbackApplied } = resolveAllowlistProviderRuntimeGroupPolicy({
|
|
1732
1863
|
providerConfigPresent: cfg.channels?.signal !== void 0,
|
|
@@ -1740,41 +1871,40 @@ async function monitorSignalProvider(opts = {}) {
|
|
|
1740
1871
|
log: (message) => runtime.log?.(message)
|
|
1741
1872
|
});
|
|
1742
1873
|
const reactionMode = accountInfo.config.reactionNotifications ?? "own";
|
|
1743
|
-
const reactionAllowlist =
|
|
1874
|
+
const reactionAllowlist = normalizeStringEntries(accountInfo.config.reactionAllowlist);
|
|
1744
1875
|
const mediaMaxBytes = (opts.mediaMaxMb ?? accountInfo.config.mediaMaxMb ?? 8) * 1024 * 1024;
|
|
1876
|
+
const transportKind = accountInfo.transport.kind;
|
|
1877
|
+
const managedTransport = accountInfo.transport.kind === "managed-native" ? accountInfo.transport : void 0;
|
|
1745
1878
|
const ignoreAttachments = opts.ignoreAttachments ?? accountInfo.config.ignoreAttachments ?? false;
|
|
1746
1879
|
const sendReadReceipts = Boolean(opts.sendReadReceipts ?? accountInfo.config.sendReadReceipts);
|
|
1747
1880
|
const waitForTransportReadyFn = opts.waitForTransportReady ?? waitForTransportReady;
|
|
1748
|
-
const autoStart =
|
|
1749
|
-
const
|
|
1750
|
-
const startupTimeoutMs = Math.min(12e4, Math.max(1e3, opts.startupTimeoutMs ?? accountInfo.config.startupTimeoutMs ?? 3e4));
|
|
1881
|
+
const autoStart = Boolean(managedTransport) && (opts.autoStart ?? true);
|
|
1882
|
+
const startupTimeoutMs = Math.min(12e4, Math.max(1e3, opts.startupTimeoutMs ?? managedTransport?.startupTimeoutMs ?? 3e4));
|
|
1751
1883
|
const readReceiptsViaDaemon = autoStart && sendReadReceipts;
|
|
1752
1884
|
const daemonLifecycle = createSignalDaemonLifecycle({ abortSignal: opts.abortSignal });
|
|
1753
1885
|
const monitorTaskRunner = createSignalMonitorTaskRunner(runtime);
|
|
1754
1886
|
let daemonHandle = null;
|
|
1755
|
-
|
|
1887
|
+
let ingressMonitor;
|
|
1756
1888
|
if (autoStart) {
|
|
1757
|
-
const cliPath = opts.cliPath ??
|
|
1758
|
-
const configPath = normalizeOptionalString(opts.configPath) ?? normalizeOptionalString(
|
|
1759
|
-
const httpHost = opts.httpHost ??
|
|
1760
|
-
const httpPort = opts.httpPort ??
|
|
1889
|
+
const cliPath = opts.cliPath ?? managedTransport?.cliPath ?? "signal-cli";
|
|
1890
|
+
const configPath = normalizeOptionalString(opts.configPath) ?? normalizeOptionalString(managedTransport?.configPath);
|
|
1891
|
+
const httpHost = opts.httpHost ?? managedTransport?.httpHost ?? "127.0.0.1";
|
|
1892
|
+
const httpPort = opts.httpPort ?? managedTransport?.httpPort ?? 8080;
|
|
1761
1893
|
daemonHandle = spawnSignalDaemon({
|
|
1762
1894
|
cliPath,
|
|
1763
1895
|
...configPath ? { configPath } : {},
|
|
1764
1896
|
account,
|
|
1765
1897
|
httpHost,
|
|
1766
1898
|
httpPort,
|
|
1767
|
-
receiveMode: opts.receiveMode ??
|
|
1899
|
+
receiveMode: opts.receiveMode ?? managedTransport?.receiveMode,
|
|
1768
1900
|
ignoreAttachments: opts.ignoreAttachments ?? accountInfo.config.ignoreAttachments,
|
|
1769
|
-
ignoreStories: opts.ignoreStories ??
|
|
1901
|
+
ignoreStories: opts.ignoreStories ?? managedTransport?.ignoreStories,
|
|
1770
1902
|
sendReadReceipts,
|
|
1771
1903
|
runtime
|
|
1772
1904
|
});
|
|
1773
1905
|
daemonLifecycle.attach(daemonHandle);
|
|
1774
1906
|
}
|
|
1775
|
-
const onAbort = () =>
|
|
1776
|
-
daemonLifecycle.stop();
|
|
1777
|
-
};
|
|
1907
|
+
const onAbort = () => void daemonLifecycle.stop();
|
|
1778
1908
|
opts.abortSignal?.addEventListener("abort", onAbort, { once: true });
|
|
1779
1909
|
try {
|
|
1780
1910
|
if (daemonHandle) {
|
|
@@ -1809,7 +1939,9 @@ async function monitorSignalProvider(opts = {}) {
|
|
|
1809
1939
|
const handleEvent = createSignalEventHandler({
|
|
1810
1940
|
runtime,
|
|
1811
1941
|
abortSignal: daemonLifecycle.abortSignal,
|
|
1812
|
-
runTrackedTask: (task) =>
|
|
1942
|
+
runTrackedTask: (task) => {
|
|
1943
|
+
monitorTaskRunner.runTask(task);
|
|
1944
|
+
},
|
|
1813
1945
|
cfg,
|
|
1814
1946
|
baseUrl,
|
|
1815
1947
|
account,
|
|
@@ -1831,7 +1963,7 @@ async function monitorSignalProvider(opts = {}) {
|
|
|
1831
1963
|
readReceiptsViaDaemon,
|
|
1832
1964
|
fetchAttachment: (params) => fetchAttachment({
|
|
1833
1965
|
...params,
|
|
1834
|
-
|
|
1966
|
+
transportKind
|
|
1835
1967
|
}),
|
|
1836
1968
|
deliverReplies: (params) => deliverReplies({
|
|
1837
1969
|
...params,
|
|
@@ -1843,17 +1975,20 @@ async function monitorSignalProvider(opts = {}) {
|
|
|
1843
1975
|
shouldEmitSignalReactionNotification,
|
|
1844
1976
|
buildSignalReactionSystemEventText
|
|
1845
1977
|
});
|
|
1978
|
+
ingressMonitor = await startSignalIngressMonitor({
|
|
1979
|
+
accountId: accountInfo.accountId,
|
|
1980
|
+
dispatch: handleEvent,
|
|
1981
|
+
runtime
|
|
1982
|
+
});
|
|
1846
1983
|
await runSignalSseLoop({
|
|
1847
1984
|
baseUrl,
|
|
1848
1985
|
account,
|
|
1849
1986
|
abortSignal: daemonLifecycle.abortSignal,
|
|
1850
1987
|
runtime,
|
|
1851
1988
|
timeoutMs: 0,
|
|
1852
|
-
|
|
1989
|
+
transportKind,
|
|
1853
1990
|
policy: opts.reconnectPolicy,
|
|
1854
|
-
onEvent: (event) =>
|
|
1855
|
-
monitorTaskRunner.runTask(() => handleEvent(event));
|
|
1856
|
-
}
|
|
1991
|
+
onEvent: (event) => monitorTaskRunner.runTask(async () => await ingressMonitor?.receive(event))
|
|
1857
1992
|
});
|
|
1858
1993
|
const daemonExitError = daemonLifecycle.getExitError();
|
|
1859
1994
|
if (daemonExitError) throw daemonExitError;
|
|
@@ -1862,6 +1997,7 @@ async function monitorSignalProvider(opts = {}) {
|
|
|
1862
1997
|
if (opts.abortSignal?.aborted && !daemonExitError) return;
|
|
1863
1998
|
throw err;
|
|
1864
1999
|
} finally {
|
|
2000
|
+
await ingressMonitor?.stop();
|
|
1865
2001
|
await Promise.all([daemonLifecycle.stop(), monitorTaskRunner.waitForIdle()]);
|
|
1866
2002
|
opts.abortSignal?.removeEventListener("abort", onAbort);
|
|
1867
2003
|
}
|