@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
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import { a as isSignalManagedNativeConnectionUrlForBind, c as buildSignalTransportHttpUrl, i as assignSignalManagedNativePort, o as isValidSignalManagedNativePort, r as allocateSignalManagedNativePort, s as resolveLocalSignalTransportPort, u as normalizeSignalTransportUrl } from "./transport-policy-DxvSMHp9.js";
|
|
2
|
+
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
3
|
+
import { defineChannelAliasMigration } from "openclaw/plugin-sdk/runtime-doctor";
|
|
4
|
+
//#region extensions/signal/src/config-compat.ts
|
|
5
|
+
const LEGACY_TRANSPORT_FIELDS = [
|
|
6
|
+
"configPath",
|
|
7
|
+
"httpUrl",
|
|
8
|
+
"httpHost",
|
|
9
|
+
"httpPort",
|
|
10
|
+
"cliPath",
|
|
11
|
+
"autoStart",
|
|
12
|
+
"startupTimeoutMs",
|
|
13
|
+
"receiveMode",
|
|
14
|
+
"ignoreStories"
|
|
15
|
+
];
|
|
16
|
+
const PENDING_LEGACY_TRANSPORT_WARNING = "- channels.signal: legacy auto transport is ambiguous while its endpoint is unavailable; bring the endpoint online and rerun openclaw doctor --fix, or replace the retired fields with an explicit account-owned transport in openclaw.json.";
|
|
17
|
+
const PENDING_LEGACY_INVALID_URL_WARNING = "- channels.signal: legacy httpUrl is invalid; keep the current config, correct httpUrl, then run openclaw doctor --fix.";
|
|
18
|
+
const PENDING_LEGACY_INVALID_HOST_WARNING = "- channels.signal: legacy httpHost is invalid; keep the current config, correct httpHost, then run openclaw doctor --fix.";
|
|
19
|
+
const PENDING_LEGACY_INVALID_PORT_WARNING = "- channels.signal: legacy httpPort must be an integer between 1 and 65535; correct httpPort, then run openclaw doctor --fix.";
|
|
20
|
+
const PENDING_LEGACY_CONTAINER_ACCOUNT_WARNING = "- channels.signal: legacy container transport requires an account number; add channels.signal.account (or the relevant channels.signal.accounts.*.account) and rerun openclaw doctor --fix.";
|
|
21
|
+
function isRecord$1(value) {
|
|
22
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
23
|
+
}
|
|
24
|
+
function isSignalTransportConfig(value) {
|
|
25
|
+
if (!isRecord$1(value)) return false;
|
|
26
|
+
if (value.kind === "managed-native") {
|
|
27
|
+
if (value.httpPort !== void 0 && !isValidSignalManagedNativePort(value.httpPort)) return false;
|
|
28
|
+
if (value.url === void 0) return true;
|
|
29
|
+
if (typeof value.url !== "string") return false;
|
|
30
|
+
try {
|
|
31
|
+
normalizeSignalTransportUrl(value.url);
|
|
32
|
+
return true;
|
|
33
|
+
} catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (value.kind !== "external-native" && value.kind !== "container" || typeof value.url !== "string") return false;
|
|
38
|
+
try {
|
|
39
|
+
normalizeSignalTransportUrl(value.url);
|
|
40
|
+
return true;
|
|
41
|
+
} catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function optionalString(value) {
|
|
46
|
+
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
47
|
+
}
|
|
48
|
+
function inherited(entry, parent, key) {
|
|
49
|
+
return Object.hasOwn(entry, key) ? entry[key] : parent[key];
|
|
50
|
+
}
|
|
51
|
+
function legacyBaseUrl(entry, parent) {
|
|
52
|
+
const url = optionalString(inherited(entry, parent, "httpUrl"));
|
|
53
|
+
if (url) return normalizeSignalTransportUrl(url);
|
|
54
|
+
const host = optionalString(inherited(entry, parent, "httpHost")) ?? "127.0.0.1";
|
|
55
|
+
const rawPort = inherited(entry, parent, "httpPort");
|
|
56
|
+
return buildSignalTransportHttpUrl(host, typeof rawPort === "number" ? rawPort : 8080);
|
|
57
|
+
}
|
|
58
|
+
function hasLegacyFields(entry) {
|
|
59
|
+
return LEGACY_TRANSPORT_FIELDS.some((field) => Object.hasOwn(entry, field));
|
|
60
|
+
}
|
|
61
|
+
function wasLegacySignalAccountConfigured(entry, parent) {
|
|
62
|
+
return Boolean(optionalString(inherited(entry, parent, "account")) || optionalString(inherited(entry, parent, "configPath")) || optionalString(inherited(entry, parent, "httpUrl")) || optionalString(inherited(entry, parent, "httpHost")) || optionalString(inherited(entry, parent, "cliPath")) || typeof inherited(entry, parent, "httpPort") === "number" || typeof inherited(entry, parent, "autoStart") === "boolean");
|
|
63
|
+
}
|
|
64
|
+
function hasInvalidLegacyHttpUrl(entries, parent) {
|
|
65
|
+
return entries.some((entry) => {
|
|
66
|
+
const httpUrl = optionalString(inherited(entry, parent, "httpUrl"));
|
|
67
|
+
if (!httpUrl) return false;
|
|
68
|
+
try {
|
|
69
|
+
normalizeSignalTransportUrl(httpUrl);
|
|
70
|
+
return false;
|
|
71
|
+
} catch {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function findInvalidLegacyDerivedEndpoint(entries, parent) {
|
|
77
|
+
for (const entry of entries) {
|
|
78
|
+
if (optionalString(inherited(entry, parent, "httpUrl"))) continue;
|
|
79
|
+
const rawPort = inherited(entry, parent, "httpPort");
|
|
80
|
+
if (rawPort !== void 0 && !isValidSignalManagedNativePort(rawPort)) return "port";
|
|
81
|
+
const host = optionalString(inherited(entry, parent, "httpHost")) ?? "127.0.0.1";
|
|
82
|
+
try {
|
|
83
|
+
buildSignalTransportHttpUrl(host, typeof rawPort === "number" ? rawPort : 8080);
|
|
84
|
+
} catch {
|
|
85
|
+
return "host";
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function hasInvalidManagedTransportPort(transports) {
|
|
90
|
+
return transports.some((transport) => transport?.kind === "managed-native" && transport.httpPort !== void 0 && !isValidSignalManagedNativePort(transport.httpPort));
|
|
91
|
+
}
|
|
92
|
+
function requiresDetection(entry, parent, apiMode) {
|
|
93
|
+
if (apiMode !== void 0 && apiMode !== "auto") return false;
|
|
94
|
+
return Boolean(optionalString(inherited(entry, parent, "httpUrl"))) || !resolveLegacyAutoStart(entry, parent);
|
|
95
|
+
}
|
|
96
|
+
function resolveLegacyAutoStart(entry, parent) {
|
|
97
|
+
const autoStart = inherited(entry, parent, "autoStart");
|
|
98
|
+
if (typeof autoStart === "boolean") return autoStart;
|
|
99
|
+
return !optionalString(inherited(entry, parent, "httpUrl"));
|
|
100
|
+
}
|
|
101
|
+
function resolveManagedConnectionUrl(entry, parent) {
|
|
102
|
+
const httpUrl = optionalString(inherited(entry, parent, "httpUrl"));
|
|
103
|
+
if (!httpUrl) return;
|
|
104
|
+
const normalizedUrl = normalizeSignalTransportUrl(httpUrl);
|
|
105
|
+
const endpoint = new URL(normalizedUrl);
|
|
106
|
+
const bindHost = (optionalString(inherited(entry, parent, "httpHost")) ?? "127.0.0.1").replace(/^\[|\]$/g, "").toLowerCase();
|
|
107
|
+
const rawBindPort = inherited(entry, parent, "httpPort");
|
|
108
|
+
const bindPort = typeof rawBindPort === "number" ? rawBindPort : 8080;
|
|
109
|
+
const endpointHost = endpoint.hostname.replace(/^\[|\]$/g, "").toLowerCase();
|
|
110
|
+
const endpointPort = endpoint.port ? Number.parseInt(endpoint.port, 10) : endpoint.protocol === "https:" ? 443 : 80;
|
|
111
|
+
return endpoint.protocol === "http:" && endpointHost === bindHost && endpointPort === bindPort ? void 0 : normalizedUrl;
|
|
112
|
+
}
|
|
113
|
+
function buildManagedNativeTransport(entry, parent) {
|
|
114
|
+
const value = (key) => inherited(entry, parent, key);
|
|
115
|
+
const configPath = optionalString(value("configPath"));
|
|
116
|
+
const cliPath = optionalString(value("cliPath"));
|
|
117
|
+
const url = resolveManagedConnectionUrl(entry, parent);
|
|
118
|
+
const httpHost = optionalString(value("httpHost"));
|
|
119
|
+
const httpPort = value("httpPort");
|
|
120
|
+
const startupTimeoutMs = value("startupTimeoutMs");
|
|
121
|
+
const receiveMode = value("receiveMode");
|
|
122
|
+
const ignoreStories = value("ignoreStories");
|
|
123
|
+
return {
|
|
124
|
+
kind: "managed-native",
|
|
125
|
+
...configPath ? { configPath } : {},
|
|
126
|
+
...cliPath ? { cliPath } : {},
|
|
127
|
+
...url ? { url } : {},
|
|
128
|
+
...httpHost ? { httpHost } : {},
|
|
129
|
+
...typeof httpPort === "number" ? { httpPort } : {},
|
|
130
|
+
...typeof startupTimeoutMs === "number" ? { startupTimeoutMs } : {},
|
|
131
|
+
...receiveMode === "on-start" || receiveMode === "manual" ? { receiveMode } : {},
|
|
132
|
+
...typeof ignoreStories === "boolean" ? { ignoreStories } : {}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function resolveLegacyTransportWithoutDetection(params) {
|
|
136
|
+
if (isSignalTransportConfig(params.entry.transport)) return params.entry.transport;
|
|
137
|
+
const baseUrl = legacyBaseUrl(params.entry, params.parent);
|
|
138
|
+
const autoStart = inherited(params.entry, params.parent, "autoStart");
|
|
139
|
+
if (params.apiMode === "container") return {
|
|
140
|
+
kind: "container",
|
|
141
|
+
url: baseUrl
|
|
142
|
+
};
|
|
143
|
+
if (params.apiMode === "native") return resolveLegacyAutoStart(params.entry, params.parent) ? buildManagedNativeTransport(params.entry, params.parent) : {
|
|
144
|
+
kind: "external-native",
|
|
145
|
+
url: baseUrl
|
|
146
|
+
};
|
|
147
|
+
if (requiresDetection(params.entry, params.parent, params.apiMode)) return;
|
|
148
|
+
if (autoStart === false) return {
|
|
149
|
+
kind: "external-native",
|
|
150
|
+
url: baseUrl
|
|
151
|
+
};
|
|
152
|
+
return buildManagedNativeTransport(params.entry, params.parent);
|
|
153
|
+
}
|
|
154
|
+
async function resolveLegacyTransport(params) {
|
|
155
|
+
const resolved = resolveLegacyTransportWithoutDetection(params);
|
|
156
|
+
if (resolved) return resolved;
|
|
157
|
+
const account = optionalString(inherited(params.entry, params.parent, "account"));
|
|
158
|
+
try {
|
|
159
|
+
const detected = await params.detect?.({
|
|
160
|
+
url: legacyBaseUrl(params.entry, params.parent),
|
|
161
|
+
...account ? { account } : {}
|
|
162
|
+
});
|
|
163
|
+
if (detected?.kind === "external-native" && resolveLegacyAutoStart(params.entry, params.parent)) return buildManagedNativeTransport(params.entry, params.parent);
|
|
164
|
+
return detected;
|
|
165
|
+
} catch {
|
|
166
|
+
if (resolveLegacyAutoStart(params.entry, params.parent)) return buildManagedNativeTransport(params.entry, params.parent);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function clearLegacyTransportFields(entry) {
|
|
171
|
+
for (const field of LEGACY_TRANSPORT_FIELDS) delete entry[field];
|
|
172
|
+
}
|
|
173
|
+
function hasRootSignalAccount(entries) {
|
|
174
|
+
const root = entries[0];
|
|
175
|
+
return entries.length === 1 || Boolean(optionalString(root?.account)) || isSignalTransportConfig(root?.transport);
|
|
176
|
+
}
|
|
177
|
+
function signalAccountIds(entries) {
|
|
178
|
+
const accounts = isRecord$1(entries[0]?.accounts) ? entries[0].accounts : {};
|
|
179
|
+
return Object.entries(accounts).filter(([, entry]) => isRecord$1(entry)).map(([accountId]) => accountId);
|
|
180
|
+
}
|
|
181
|
+
function isDefaultSignalAccountId(accountId) {
|
|
182
|
+
return Boolean(accountId?.trim()) && normalizeAccountId(accountId) === DEFAULT_ACCOUNT_ID;
|
|
183
|
+
}
|
|
184
|
+
function resolveSignalAccountKey(accounts, accountId) {
|
|
185
|
+
const normalizedAccountId = normalizeAccountId(accountId);
|
|
186
|
+
return Object.keys(accounts).find((key) => Boolean(key.trim()) && normalizeAccountId(key) === normalizedAccountId);
|
|
187
|
+
}
|
|
188
|
+
function nestedDefaultOwnsEffectiveTransport(entries) {
|
|
189
|
+
const accounts = isRecord$1(entries[0]?.accounts) ? entries[0].accounts : {};
|
|
190
|
+
const nestedDefaultKey = resolveSignalAccountKey(accounts, DEFAULT_ACCOUNT_ID);
|
|
191
|
+
const nestedDefault = nestedDefaultKey ? accounts[nestedDefaultKey] : void 0;
|
|
192
|
+
return isRecord$1(nestedDefault) && (isSignalTransportConfig(nestedDefault.transport) || hasLegacyFields(nestedDefault));
|
|
193
|
+
}
|
|
194
|
+
function isDiscardedTransportEntry(entries, index) {
|
|
195
|
+
if (index === 0) return !hasRootSignalAccount(entries) || nestedDefaultOwnsEffectiveTransport(entries);
|
|
196
|
+
return isDefaultSignalAccountId(signalAccountIds(entries)[index - 1]) && isSignalTransportConfig(entries[0]?.transport);
|
|
197
|
+
}
|
|
198
|
+
function shouldMaterializeTransport(entries, index) {
|
|
199
|
+
if (isDiscardedTransportEntry(entries, index)) return false;
|
|
200
|
+
const entry = entries[index];
|
|
201
|
+
const parent = entries[0];
|
|
202
|
+
return Boolean(entry && parent && (isSignalTransportConfig(entry.transport) || wasLegacySignalAccountConfigured(entry, parent)));
|
|
203
|
+
}
|
|
204
|
+
function clearLegacySignalTransportFieldsForAccount(params) {
|
|
205
|
+
const next = structuredClone(params.cfg);
|
|
206
|
+
const signal = next.channels?.signal;
|
|
207
|
+
if (!isRecord$1(signal)) return next;
|
|
208
|
+
if (isDefaultSignalAccountId(params.accountId)) {
|
|
209
|
+
clearLegacyTransportFields(signal);
|
|
210
|
+
delete signal.apiMode;
|
|
211
|
+
const accounts = isRecord$1(signal.accounts) ? signal.accounts : void 0;
|
|
212
|
+
const nestedDefaultKey = accounts ? resolveSignalAccountKey(accounts, DEFAULT_ACCOUNT_ID) : void 0;
|
|
213
|
+
const nestedDefault = nestedDefaultKey ? accounts?.[nestedDefaultKey] : void 0;
|
|
214
|
+
if (isRecord$1(nestedDefault)) {
|
|
215
|
+
clearLegacyTransportFields(nestedDefault);
|
|
216
|
+
delete nestedDefault.transport;
|
|
217
|
+
}
|
|
218
|
+
return next;
|
|
219
|
+
}
|
|
220
|
+
const accounts = isRecord$1(signal.accounts) ? signal.accounts : void 0;
|
|
221
|
+
const accountKey = accounts ? resolveSignalAccountKey(accounts, params.accountId) : void 0;
|
|
222
|
+
const account = accountKey ? accounts?.[accountKey] : void 0;
|
|
223
|
+
if (isRecord$1(account)) clearLegacyTransportFields(account);
|
|
224
|
+
return next;
|
|
225
|
+
}
|
|
226
|
+
function allocateMigratedManagedPorts(params) {
|
|
227
|
+
const reservedPorts = /* @__PURE__ */ new Set();
|
|
228
|
+
const rootIsAccount = hasRootSignalAccount(params.entries);
|
|
229
|
+
const nestedDefaultOffset = signalAccountIds(params.entries).findIndex((accountId) => isDefaultSignalAccountId(accountId));
|
|
230
|
+
const canonicalDefaultIndex = isSignalTransportConfig(params.entries[0]?.transport) ? 0 : nestedDefaultOffset >= 0 ? nestedDefaultOffset + 1 : rootIsAccount ? 0 : void 0;
|
|
231
|
+
for (const [index, transport] of params.transports.entries()) {
|
|
232
|
+
if (!transport || index === 0 && canonicalDefaultIndex !== 0) continue;
|
|
233
|
+
if (transport.kind !== "managed-native") {
|
|
234
|
+
const localPort = resolveLocalSignalTransportPort(transport.url);
|
|
235
|
+
if (localPort !== void 0) reservedPorts.add(localPort);
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
if (transport.url && !isSignalManagedNativeConnectionUrlForBind(transport)) {
|
|
239
|
+
const localConnectionPort = resolveLocalSignalTransportPort(transport.url);
|
|
240
|
+
if (localConnectionPort !== void 0) reservedPorts.add(localConnectionPort);
|
|
241
|
+
}
|
|
242
|
+
if (index === canonicalDefaultIndex || isRecord$1(params.entries[index]?.transport)) reservedPorts.add(transport.httpPort ?? 8080);
|
|
243
|
+
}
|
|
244
|
+
return params.transports.map((transport, index) => {
|
|
245
|
+
if (!transport || index === 0 && canonicalDefaultIndex !== 0) return transport;
|
|
246
|
+
if (transport.kind !== "managed-native") return transport;
|
|
247
|
+
if (isRecord$1(params.entries[index]?.transport) || index === canonicalDefaultIndex) return transport;
|
|
248
|
+
const rawPreferredPort = params.entries[index]?.httpPort;
|
|
249
|
+
const preferredPort = typeof rawPreferredPort === "number" ? rawPreferredPort : transport.httpPort;
|
|
250
|
+
const httpPort = allocateSignalManagedNativePort({
|
|
251
|
+
reservedPorts,
|
|
252
|
+
...typeof preferredPort === "number" ? { preferredPort } : {}
|
|
253
|
+
});
|
|
254
|
+
reservedPorts.add(httpPort);
|
|
255
|
+
return assignSignalManagedNativePort(transport, httpPort);
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
function applyMigratedSignalTransports(params) {
|
|
259
|
+
const next = structuredClone(params.cfg);
|
|
260
|
+
const nextSignal = next.channels?.signal;
|
|
261
|
+
if (!isRecord$1(nextSignal)) return;
|
|
262
|
+
const accountIds = signalAccountIds(params.entries);
|
|
263
|
+
const nextAccounts = isRecord$1(nextSignal.accounts) ? nextSignal.accounts : {};
|
|
264
|
+
const nextEntries = [nextSignal, ...Object.values(nextAccounts).filter(isRecord$1)];
|
|
265
|
+
const rootIsAccount = hasRootSignalAccount(params.entries);
|
|
266
|
+
const canonicalRootTransport = isSignalTransportConfig(params.entries[0]?.transport) ? params.entries[0].transport : void 0;
|
|
267
|
+
for (const [index, entry] of nextEntries.entries()) {
|
|
268
|
+
if (isDefaultSignalAccountId(index === 0 ? void 0 : accountIds[index - 1])) {
|
|
269
|
+
const defaultTransport = canonicalRootTransport ?? params.transports[index];
|
|
270
|
+
if (defaultTransport) nextSignal.transport = defaultTransport;
|
|
271
|
+
else delete nextSignal.transport;
|
|
272
|
+
delete entry.transport;
|
|
273
|
+
} else if (index === 0 && !rootIsAccount) delete entry.transport;
|
|
274
|
+
else if (params.transports[index]) entry.transport = params.transports[index];
|
|
275
|
+
else delete entry.transport;
|
|
276
|
+
clearLegacyTransportFields(entry);
|
|
277
|
+
}
|
|
278
|
+
delete nextSignal.apiMode;
|
|
279
|
+
return next;
|
|
280
|
+
}
|
|
281
|
+
function hasContainerTransportWithoutEffectiveAccount(cfg) {
|
|
282
|
+
const signal = cfg.channels?.signal;
|
|
283
|
+
if (!isRecord$1(signal)) return false;
|
|
284
|
+
const accounts = isRecord$1(signal.accounts) ? signal.accounts : {};
|
|
285
|
+
const rootTransport = isSignalTransportConfig(signal.transport) ? signal.transport : void 0;
|
|
286
|
+
const defaultKey = resolveSignalAccountKey(accounts, DEFAULT_ACCOUNT_ID);
|
|
287
|
+
const defaultEntry = defaultKey ? accounts[defaultKey] : void 0;
|
|
288
|
+
const defaultAccount = isRecord$1(defaultEntry) && defaultEntry.account !== void 0 ? optionalString(defaultEntry.account) : optionalString(signal.account);
|
|
289
|
+
const channelEnabled = signal.enabled !== false;
|
|
290
|
+
const defaultEnabled = !isRecord$1(defaultEntry) || defaultEntry.enabled !== false;
|
|
291
|
+
if (rootTransport?.kind === "container" && channelEnabled && defaultEnabled && !defaultAccount) return true;
|
|
292
|
+
for (const [accountId, entry] of Object.entries(accounts)) {
|
|
293
|
+
if (!isRecord$1(entry)) continue;
|
|
294
|
+
if (!channelEnabled || entry.enabled === false) continue;
|
|
295
|
+
const isDefaultAccount = isDefaultSignalAccountId(accountId);
|
|
296
|
+
if ((isDefaultAccount && rootTransport ? rootTransport : isSignalTransportConfig(entry.transport) ? entry.transport : void 0)?.kind !== "container" || isDefaultAccount && rootTransport) continue;
|
|
297
|
+
if (!(entry.account === void 0 ? optionalString(signal.account) : optionalString(entry.account))) return true;
|
|
298
|
+
}
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
async function migrateLegacySignalTransportConfig(params) {
|
|
302
|
+
const signal = params.cfg.channels?.signal;
|
|
303
|
+
if (!isRecord$1(signal)) return {
|
|
304
|
+
config: params.cfg,
|
|
305
|
+
changes: []
|
|
306
|
+
};
|
|
307
|
+
const accounts = isRecord$1(signal.accounts) ? signal.accounts : {};
|
|
308
|
+
if (!(Object.hasOwn(signal, "apiMode") || hasLegacyFields(signal) || Object.values(accounts).some((entry) => isRecord$1(entry) && hasLegacyFields(entry)))) return {
|
|
309
|
+
config: params.cfg,
|
|
310
|
+
changes: []
|
|
311
|
+
};
|
|
312
|
+
const apiMode = signal.apiMode;
|
|
313
|
+
const entries = [signal, ...Object.values(accounts).filter(isRecord$1)];
|
|
314
|
+
const legacyResolutionEntries = entries.filter((_, index) => shouldMaterializeTransport(entries, index)).filter((entry) => !isSignalTransportConfig(entry.transport));
|
|
315
|
+
const invalidDerivedEndpoint = findInvalidLegacyDerivedEndpoint(legacyResolutionEntries, signal);
|
|
316
|
+
if (invalidDerivedEndpoint) return {
|
|
317
|
+
config: params.cfg,
|
|
318
|
+
changes: [],
|
|
319
|
+
warnings: [invalidDerivedEndpoint === "port" ? PENDING_LEGACY_INVALID_PORT_WARNING : PENDING_LEGACY_INVALID_HOST_WARNING]
|
|
320
|
+
};
|
|
321
|
+
if (hasInvalidLegacyHttpUrl(legacyResolutionEntries, signal)) return {
|
|
322
|
+
config: params.cfg,
|
|
323
|
+
changes: [],
|
|
324
|
+
warnings: [PENDING_LEGACY_INVALID_URL_WARNING]
|
|
325
|
+
};
|
|
326
|
+
if (!params.detect && legacyResolutionEntries.some((entry) => requiresDetection(entry, signal, apiMode))) return {
|
|
327
|
+
config: params.cfg,
|
|
328
|
+
changes: [],
|
|
329
|
+
warnings: [PENDING_LEGACY_TRANSPORT_WARNING]
|
|
330
|
+
};
|
|
331
|
+
const resolvedTransports = await Promise.all(entries.map(async (entry, index) => !shouldMaterializeTransport(entries, index) ? void 0 : await resolveLegacyTransport({
|
|
332
|
+
entry,
|
|
333
|
+
parent: signal,
|
|
334
|
+
apiMode,
|
|
335
|
+
detect: params.detect
|
|
336
|
+
})));
|
|
337
|
+
if (hasInvalidManagedTransportPort(resolvedTransports)) return {
|
|
338
|
+
config: params.cfg,
|
|
339
|
+
changes: [],
|
|
340
|
+
warnings: [PENDING_LEGACY_INVALID_PORT_WARNING]
|
|
341
|
+
};
|
|
342
|
+
const transports = allocateMigratedManagedPorts({
|
|
343
|
+
entries,
|
|
344
|
+
transports: resolvedTransports
|
|
345
|
+
});
|
|
346
|
+
if (transports.some((transport, index) => shouldMaterializeTransport(entries, index) && !transport)) return {
|
|
347
|
+
config: params.cfg,
|
|
348
|
+
changes: [],
|
|
349
|
+
warnings: [PENDING_LEGACY_TRANSPORT_WARNING]
|
|
350
|
+
};
|
|
351
|
+
const next = applyMigratedSignalTransports({
|
|
352
|
+
cfg: params.cfg,
|
|
353
|
+
entries,
|
|
354
|
+
transports
|
|
355
|
+
});
|
|
356
|
+
if (!next) return {
|
|
357
|
+
config: params.cfg,
|
|
358
|
+
changes: []
|
|
359
|
+
};
|
|
360
|
+
if (hasContainerTransportWithoutEffectiveAccount(next)) return {
|
|
361
|
+
config: params.cfg,
|
|
362
|
+
changes: [],
|
|
363
|
+
warnings: [PENDING_LEGACY_CONTAINER_ACCOUNT_WARNING]
|
|
364
|
+
};
|
|
365
|
+
return {
|
|
366
|
+
config: next,
|
|
367
|
+
changes: ["Migrated channels.signal transport settings to concrete account-owned transport objects."]
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
function migrateLegacySignalTransportConfigSync(cfg) {
|
|
371
|
+
const signal = cfg.channels?.signal;
|
|
372
|
+
if (!isRecord$1(signal)) return {
|
|
373
|
+
config: cfg,
|
|
374
|
+
changes: []
|
|
375
|
+
};
|
|
376
|
+
const accounts = isRecord$1(signal.accounts) ? signal.accounts : {};
|
|
377
|
+
if (!(Object.hasOwn(signal, "apiMode") || hasLegacyFields(signal) || Object.values(accounts).some((entry) => isRecord$1(entry) && hasLegacyFields(entry)))) return {
|
|
378
|
+
config: cfg,
|
|
379
|
+
changes: []
|
|
380
|
+
};
|
|
381
|
+
const entries = [signal, ...Object.values(accounts).filter(isRecord$1)];
|
|
382
|
+
const legacyResolutionEntries = entries.filter((_, index) => shouldMaterializeTransport(entries, index)).filter((entry) => !isSignalTransportConfig(entry.transport));
|
|
383
|
+
const invalidDerivedEndpoint = findInvalidLegacyDerivedEndpoint(legacyResolutionEntries, signal);
|
|
384
|
+
if (invalidDerivedEndpoint) return {
|
|
385
|
+
config: cfg,
|
|
386
|
+
changes: [],
|
|
387
|
+
warnings: [invalidDerivedEndpoint === "port" ? PENDING_LEGACY_INVALID_PORT_WARNING : PENDING_LEGACY_INVALID_HOST_WARNING]
|
|
388
|
+
};
|
|
389
|
+
if (hasInvalidLegacyHttpUrl(legacyResolutionEntries, signal)) return {
|
|
390
|
+
config: cfg,
|
|
391
|
+
changes: [],
|
|
392
|
+
warnings: [PENDING_LEGACY_INVALID_URL_WARNING]
|
|
393
|
+
};
|
|
394
|
+
const resolvedTransports = entries.map((entry, index) => {
|
|
395
|
+
if (!shouldMaterializeTransport(entries, index)) return;
|
|
396
|
+
return resolveLegacyTransportWithoutDetection({
|
|
397
|
+
entry,
|
|
398
|
+
parent: signal,
|
|
399
|
+
apiMode: signal.apiMode
|
|
400
|
+
});
|
|
401
|
+
});
|
|
402
|
+
if (hasInvalidManagedTransportPort(resolvedTransports)) return {
|
|
403
|
+
config: cfg,
|
|
404
|
+
changes: [],
|
|
405
|
+
warnings: [PENDING_LEGACY_INVALID_PORT_WARNING]
|
|
406
|
+
};
|
|
407
|
+
const transports = allocateMigratedManagedPorts({
|
|
408
|
+
entries,
|
|
409
|
+
transports: resolvedTransports
|
|
410
|
+
});
|
|
411
|
+
if (transports.some((transport, index) => shouldMaterializeTransport(entries, index) && !transport)) return {
|
|
412
|
+
config: cfg,
|
|
413
|
+
changes: [],
|
|
414
|
+
warnings: [PENDING_LEGACY_TRANSPORT_WARNING]
|
|
415
|
+
};
|
|
416
|
+
const next = applyMigratedSignalTransports({
|
|
417
|
+
cfg,
|
|
418
|
+
entries,
|
|
419
|
+
transports
|
|
420
|
+
});
|
|
421
|
+
if (!next) return {
|
|
422
|
+
config: cfg,
|
|
423
|
+
changes: []
|
|
424
|
+
};
|
|
425
|
+
if (hasContainerTransportWithoutEffectiveAccount(next)) return {
|
|
426
|
+
config: cfg,
|
|
427
|
+
changes: [],
|
|
428
|
+
warnings: [PENDING_LEGACY_CONTAINER_ACCOUNT_WARNING]
|
|
429
|
+
};
|
|
430
|
+
return {
|
|
431
|
+
config: next,
|
|
432
|
+
changes: ["Migrated channels.signal transport settings to concrete account-owned transport objects."]
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
//#endregion
|
|
436
|
+
//#region extensions/signal/doctor-contract-api.ts
|
|
437
|
+
const RETIRED_SIGNAL_ACCOUNT_TRANSPORT_FIELDS = [
|
|
438
|
+
"configPath",
|
|
439
|
+
"httpUrl",
|
|
440
|
+
"httpHost",
|
|
441
|
+
"httpPort",
|
|
442
|
+
"cliPath",
|
|
443
|
+
"autoStart",
|
|
444
|
+
"startupTimeoutMs",
|
|
445
|
+
"receiveMode",
|
|
446
|
+
"ignoreStories"
|
|
447
|
+
];
|
|
448
|
+
function isRecord(value) {
|
|
449
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
450
|
+
}
|
|
451
|
+
function hasRetiredSignalAccountTransportFields(value) {
|
|
452
|
+
return isRecord(value) && RETIRED_SIGNAL_ACCOUNT_TRANSPORT_FIELDS.some((field) => Object.hasOwn(value, field));
|
|
453
|
+
}
|
|
454
|
+
function hasRetiredSignalAccountMapTransportFields(value) {
|
|
455
|
+
return isRecord(value) && Object.values(value).some(hasRetiredSignalAccountTransportFields);
|
|
456
|
+
}
|
|
457
|
+
const streamingAliasMigration = defineChannelAliasMigration({
|
|
458
|
+
channelId: "signal",
|
|
459
|
+
streaming: {
|
|
460
|
+
defaultMode: "partial",
|
|
461
|
+
deliveryOnly: true
|
|
462
|
+
},
|
|
463
|
+
accountStreamingReplacesRoot: true
|
|
464
|
+
});
|
|
465
|
+
const legacyConfigRules = [
|
|
466
|
+
...streamingAliasMigration.legacyConfigRules,
|
|
467
|
+
{
|
|
468
|
+
path: ["channels", "signal"],
|
|
469
|
+
message: "Signal transport config is now account-owned; run \"openclaw doctor --fix\" to migrate retired channels.signal transport fields.",
|
|
470
|
+
match: (value) => isRecord(value) && (Object.hasOwn(value, "apiMode") || hasRetiredSignalAccountTransportFields(value))
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
path: [
|
|
474
|
+
"channels",
|
|
475
|
+
"signal",
|
|
476
|
+
"accounts"
|
|
477
|
+
],
|
|
478
|
+
message: "Signal transport config is now account-owned; run \"openclaw doctor --fix\" to migrate retired per-account transport fields.",
|
|
479
|
+
match: hasRetiredSignalAccountMapTransportFields
|
|
480
|
+
}
|
|
481
|
+
];
|
|
482
|
+
function normalizeCompatibilityConfig({ cfg }) {
|
|
483
|
+
const streaming = streamingAliasMigration.normalizeChannelConfig({ cfg });
|
|
484
|
+
const transport = migrateLegacySignalTransportConfigSync(streaming.config);
|
|
485
|
+
return {
|
|
486
|
+
config: transport.config,
|
|
487
|
+
changes: [...streaming.changes, ...transport.changes],
|
|
488
|
+
...transport.warnings?.length ? { warnings: transport.warnings } : {}
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
//#endregion
|
|
492
|
+
export { migrateLegacySignalTransportConfig as i, normalizeCompatibilityConfig as n, clearLegacySignalTransportFieldsForAccount as r, legacyConfigRules as t };
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region extensions/signal/doctor-contract-api.ts
|
|
3
|
-
const streamingAliasMigration = defineChannelAliasMigration({
|
|
4
|
-
channelId: "signal",
|
|
5
|
-
streaming: {
|
|
6
|
-
defaultMode: "partial",
|
|
7
|
-
deliveryOnly: true
|
|
8
|
-
},
|
|
9
|
-
accountStreamingReplacesRoot: true
|
|
10
|
-
});
|
|
11
|
-
const legacyConfigRules = streamingAliasMigration.legacyConfigRules;
|
|
12
|
-
function normalizeCompatibilityConfig({ cfg }) {
|
|
13
|
-
return streamingAliasMigration.normalizeChannelConfig({ cfg });
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-api-DbUCknbC.js";
|
|
16
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
2
|
import { normalizeE164 } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
3
|
+
import { resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
|
|
3
4
|
//#region extensions/signal/src/normalize.ts
|
|
4
5
|
function normalizeSignalMessagingTarget(raw) {
|
|
5
6
|
const trimmed = raw.trim();
|
|
@@ -122,16 +123,24 @@ function normalizeSignalAllowRecipient(entry) {
|
|
|
122
123
|
return parsed.kind === "phone" ? parsed.e164 : parsed.raw;
|
|
123
124
|
}
|
|
124
125
|
function isSignalSenderAllowed(sender, allowFrom) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
const normalizedAllowFrom = allowFrom.flatMap((entry) => {
|
|
127
|
+
const parsed = parseSignalAllowEntry(entry);
|
|
128
|
+
if (!parsed) return [];
|
|
129
|
+
if (parsed.kind === "any") return ["*"];
|
|
130
|
+
return [parsed.kind === "phone" ? `phone:${parsed.e164}` : `uuid:${parsed.raw}`];
|
|
131
|
+
});
|
|
128
132
|
const senderE164 = sender.kind === "phone" ? sender.e164 : sender.aliases?.e164;
|
|
129
133
|
const senderUuid = sender.kind === "uuid" ? sender.raw : sender.aliases?.uuid;
|
|
130
|
-
return
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
return resolveAllowlistMatchByCandidates({
|
|
135
|
+
allowList: normalizedAllowFrom,
|
|
136
|
+
candidates: [{
|
|
137
|
+
value: senderE164 ? `phone:${senderE164}` : void 0,
|
|
138
|
+
source: "phone"
|
|
139
|
+
}, {
|
|
140
|
+
value: senderUuid ? `uuid:${senderUuid}` : void 0,
|
|
141
|
+
source: "uuid"
|
|
142
|
+
}]
|
|
143
|
+
}).allowed;
|
|
135
144
|
}
|
|
136
145
|
//#endregion
|
|
137
146
|
export { normalizeSignalAllowRecipient as a, resolveSignalSender as c, normalizeSignalMessagingTarget as d, isSignalSenderAllowed as i, looksLikeUuid as l, formatSignalSenderDisplay as n, resolveSignalPeerId as o, formatSignalSenderId as r, resolveSignalRecipient as s, formatSignalPairingIdLine as t, looksLikeSignalTargetId as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
1
|
+
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
2
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
3
3
|
import nodePath from "node:path";
|
|
4
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -7,7 +7,7 @@ import { createWriteStream } from "node:fs";
|
|
|
7
7
|
import fs from "node:fs/promises";
|
|
8
8
|
import { Readable, Transform } from "node:stream";
|
|
9
9
|
import { pipeline } from "node:stream/promises";
|
|
10
|
-
import {
|
|
10
|
+
import { readProviderJsonObjectResponse } from "openclaw/plugin-sdk/provider-http";
|
|
11
11
|
import { runPluginCommandWithTimeout } from "openclaw/plugin-sdk/run-command";
|
|
12
12
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
13
13
|
import { withTempDownloadPath } from "openclaw/plugin-sdk/temp-path";
|
|
@@ -44,6 +44,29 @@ function chunkByteLength(chunk) {
|
|
|
44
44
|
if (chunk instanceof Uint8Array) return chunk.byteLength;
|
|
45
45
|
return Buffer.byteLength(String(chunk));
|
|
46
46
|
}
|
|
47
|
+
async function cancelUnusedResponseBody(response) {
|
|
48
|
+
await response.body?.cancel().catch(() => void 0);
|
|
49
|
+
}
|
|
50
|
+
function normalizeReleaseAsset(value) {
|
|
51
|
+
if (!isRecord(value)) return;
|
|
52
|
+
const name = normalizeOptionalString(value.name);
|
|
53
|
+
const browserDownloadUrl = normalizeOptionalString(value.browser_download_url);
|
|
54
|
+
return name && browserDownloadUrl ? {
|
|
55
|
+
name,
|
|
56
|
+
browser_download_url: browserDownloadUrl
|
|
57
|
+
} : void 0;
|
|
58
|
+
}
|
|
59
|
+
function normalizeSignalCliRelease(value) {
|
|
60
|
+
const version = normalizeOptionalString(normalizeOptionalString(value.tag_name)?.replace(/^v/, ""));
|
|
61
|
+
if (!version || !Array.isArray(value.assets)) return;
|
|
62
|
+
return {
|
|
63
|
+
version,
|
|
64
|
+
assets: value.assets.flatMap((asset) => {
|
|
65
|
+
const normalized = normalizeReleaseAsset(asset);
|
|
66
|
+
return normalized ? [normalized] : [];
|
|
67
|
+
})
|
|
68
|
+
};
|
|
69
|
+
}
|
|
47
70
|
/**
|
|
48
71
|
* Pick a native release asset from the official GitHub releases.
|
|
49
72
|
*
|
|
@@ -76,7 +99,10 @@ async function downloadToFile(url, dest, maxRedirects = 5, maxBytes = MAX_SIGNAL
|
|
|
76
99
|
auditContext: "signal-cli-install-archive"
|
|
77
100
|
});
|
|
78
101
|
try {
|
|
79
|
-
if (!response.ok || !response.body)
|
|
102
|
+
if (!response.ok || !response.body) {
|
|
103
|
+
await cancelUnusedResponseBody(response);
|
|
104
|
+
throw new Error(`HTTP ${response.status || "?"} downloading file`);
|
|
105
|
+
}
|
|
80
106
|
const rawLength = response.headers.get("content-length");
|
|
81
107
|
if (rawLength !== null) {
|
|
82
108
|
const trimmedLength = rawLength.trim();
|
|
@@ -187,14 +213,19 @@ async function installSignalCliFromRelease(runtime) {
|
|
|
187
213
|
Accept: "application/vnd.github+json"
|
|
188
214
|
} }
|
|
189
215
|
});
|
|
190
|
-
let
|
|
216
|
+
let releaseInfo;
|
|
191
217
|
try {
|
|
192
|
-
if (!response.ok)
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
218
|
+
if (!response.ok) {
|
|
219
|
+
await cancelUnusedResponseBody(response);
|
|
220
|
+
return {
|
|
221
|
+
ok: false,
|
|
222
|
+
error: `Failed to fetch release info (${response.status})`
|
|
223
|
+
};
|
|
224
|
+
}
|
|
196
225
|
try {
|
|
197
|
-
|
|
226
|
+
const normalized = normalizeSignalCliRelease(await readProviderJsonObjectResponse(response, "signal.release-info"));
|
|
227
|
+
if (!normalized) throw new Error("Unexpected signal-cli release info");
|
|
228
|
+
releaseInfo = normalized;
|
|
198
229
|
} catch {
|
|
199
230
|
return {
|
|
200
231
|
ok: false,
|
|
@@ -204,8 +235,7 @@ async function installSignalCliFromRelease(runtime) {
|
|
|
204
235
|
} finally {
|
|
205
236
|
await release();
|
|
206
237
|
}
|
|
207
|
-
const
|
|
208
|
-
const asset = pickAsset(payload.assets ?? [], process.platform, process.arch);
|
|
238
|
+
const asset = pickAsset(releaseInfo.assets, process.platform, process.arch);
|
|
209
239
|
if (!asset) return {
|
|
210
240
|
ok: false,
|
|
211
241
|
error: "No compatible release asset found for this platform."
|
|
@@ -214,9 +244,9 @@ async function installSignalCliFromRelease(runtime) {
|
|
|
214
244
|
prefix: "openclaw-signal",
|
|
215
245
|
fileName: asset.name
|
|
216
246
|
}, async (archivePath) => {
|
|
217
|
-
runtime.log(`Downloading signal-cli ${version} (${asset.name})…`);
|
|
247
|
+
runtime.log(`Downloading signal-cli ${releaseInfo.version} (${asset.name})…`);
|
|
218
248
|
await downloadToFile(asset.browser_download_url, archivePath);
|
|
219
|
-
const installRoot = nodePath.join(CONFIG_DIR, "tools", "signal-cli", version);
|
|
249
|
+
const installRoot = nodePath.join(CONFIG_DIR, "tools", "signal-cli", releaseInfo.version);
|
|
220
250
|
await fs.mkdir(installRoot, { recursive: true });
|
|
221
251
|
if (!looksLikeArchive(normalizeLowercaseStringOrEmpty(asset.name))) return {
|
|
222
252
|
ok: false,
|
|
@@ -240,7 +270,7 @@ async function installSignalCliFromRelease(runtime) {
|
|
|
240
270
|
return {
|
|
241
271
|
ok: true,
|
|
242
272
|
cliPath,
|
|
243
|
-
version
|
|
273
|
+
version: releaseInfo.version
|
|
244
274
|
};
|
|
245
275
|
});
|
|
246
276
|
}
|