@openclaw/imessage 2026.9.5 → 2026.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icon.png +0 -0
- package/dist/.setup/{accounts-Dv0uksBG.mjs → accounts-nzcU0cq2.mjs} +4 -7
- package/dist/.setup/{actions.runtime-B-qGAkYG.mjs → actions.runtime-DdBN29zj.mjs} +3 -5
- package/dist/.setup/{api-_NoJAo2x.mjs → api-B9Qx21G-.mjs} +6 -5
- package/dist/.setup/{api-DcUWvBmD.mjs → api-D2S6FhGw.mjs} +7 -7
- package/dist/.setup/{approval-handler.runtime-CkG235P7.mjs → approval-handler.runtime-DKSq0DWq.mjs} +9 -9
- package/dist/.setup/{approval-reactions-CX1-6KeG.mjs → approval-reactions-Bp33xc83.mjs} +5 -5
- package/dist/.setup/{channel-CCbYCQiN.mjs → channel-9fyvuN_p.mjs} +110 -152
- package/dist/.setup/channel.runtime-n-MPKL8k.mjs +92 -0
- package/dist/.setup/{config-schema-CCbTcJEV.mjs → config-schema-4Q3_EqYt.mjs} +9 -1
- package/dist/.setup/{group-policy-BoOAkmoQ.mjs → group-policy-90pw4tyG.mjs} +65 -335
- package/dist/.setup/{media-contract-BpPh5Oh1.mjs → media-contract-CagwSMvo.mjs} +1 -1
- package/dist/.setup/{message-tool-api-DZSH-2gY.mjs → message-tool-api-D032l82H.mjs} +3 -18
- package/dist/.setup/{monitor-CSeWJ3Qh.mjs → monitor-fv9nRuTH.mjs} +235 -344
- package/dist/.setup/{question-reactions-lm8OxWbb.mjs → question-reactions-Cy-dmU_j.mjs} +1 -1
- package/dist/.setup/{remote-file-4RbwiXYh.mjs → remote-file-DRPCaVmg.mjs} +70 -21
- package/dist/.setup/rolldown-runtime-BBjsoOtd.mjs +27 -0
- package/dist/.setup/{sanitize-outbound-o1ePXajW.mjs → sanitize-outbound-3MLljgtY.mjs} +86 -24
- package/dist/.setup/{send-DXiUWygv.mjs → send-Cu9nl757.mjs} +29 -94
- package/dist/.setup/setup-core-8MDdYHj5.mjs +226 -0
- package/dist/.setup/{channel.runtime-Kw4iCQax.mjs → setup-surface-tGXFDdWh.mjs} +6 -103
- package/dist/.setup/state-migrations-B-Q7bO0Y.mjs +47 -0
- package/dist/.setup/{targets-Cc9vthzI.mjs → targets-BicBiYsM.mjs} +10 -16
- package/dist/api.js +7 -7
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/doctor-contract-api.js +168 -7
- package/dist/media-contract-api.js +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +6 -6
- package/dist/setup-entry.js +1 -1
- package/dist/src/{send-receipt-db.worker.js → chat-db.worker.js} +12 -2
- package/node_modules/typebox/build/compile/code.mjs +1 -2
- package/node_modules/typebox/build/compile/validator.mjs +5 -1
- package/node_modules/typebox/build/format/iri.mjs +16 -9
- package/node_modules/typebox/build/guard/emit.mjs +2 -2
- package/node_modules/typebox/build/guard/guard.d.mts +7 -5
- package/node_modules/typebox/build/guard/guard.mjs +14 -9
- package/node_modules/typebox/build/guard/index.mjs +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
- package/node_modules/typebox/build/guard/{string.mjs → unicode/unicode_segment.mjs} +16 -19
- package/node_modules/typebox/build/schema/build.mjs +2 -3
- package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
- package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
- package/node_modules/typebox/build/schema/parse.mjs +3 -0
- package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
- package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
- package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
- package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
- package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
- package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
- package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
- package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
- package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
- package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +3 -1
- package/node_modules/zod/README.md +2 -2
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +44 -28
- package/node_modules/zod/src/v4/core/checks.ts +62 -102
- package/node_modules/zod/src/v4/core/compile.ts +218 -93
- package/node_modules/zod/src/v4/core/core.ts +1 -3
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
- package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +14 -4
- package/node_modules/zod/src/v4/core/schemas.ts +296 -132
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
- package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
- package/node_modules/zod/src/v4/core/util.ts +218 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/ar.ts +2 -0
- package/node_modules/zod/src/v4/locales/az.ts +2 -0
- package/node_modules/zod/src/v4/locales/be.ts +2 -0
- package/node_modules/zod/src/v4/locales/bg.ts +2 -0
- package/node_modules/zod/src/v4/locales/bn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ca.ts +2 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
- package/node_modules/zod/src/v4/locales/cs.ts +2 -0
- package/node_modules/zod/src/v4/locales/da.ts +2 -0
- package/node_modules/zod/src/v4/locales/de.ts +2 -0
- package/node_modules/zod/src/v4/locales/el.ts +2 -0
- package/node_modules/zod/src/v4/locales/en.ts +2 -0
- package/node_modules/zod/src/v4/locales/eo.ts +2 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +2 -0
- package/node_modules/zod/src/v4/locales/fi.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr.ts +2 -0
- package/node_modules/zod/src/v4/locales/gu.ts +2 -0
- package/node_modules/zod/src/v4/locales/he.ts +2 -0
- package/node_modules/zod/src/v4/locales/hi.ts +2 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +2 -0
- package/node_modules/zod/src/v4/locales/hy.ts +2 -0
- package/node_modules/zod/src/v4/locales/id.ts +2 -0
- package/node_modules/zod/src/v4/locales/index.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +2 -0
- package/node_modules/zod/src/v4/locales/it.ts +2 -0
- package/node_modules/zod/src/v4/locales/ja.ts +2 -0
- package/node_modules/zod/src/v4/locales/ka.ts +2 -0
- package/node_modules/zod/src/v4/locales/km.ts +2 -0
- package/node_modules/zod/src/v4/locales/kn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ko.ts +2 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ms.ts +2 -0
- package/node_modules/zod/src/v4/locales/ne.ts +2 -0
- package/node_modules/zod/src/v4/locales/nl.ts +2 -0
- package/node_modules/zod/src/v4/locales/nn.ts +2 -0
- package/node_modules/zod/src/v4/locales/no.ts +2 -0
- package/node_modules/zod/src/v4/locales/ota.ts +2 -0
- package/node_modules/zod/src/v4/locales/pl.ts +2 -0
- package/node_modules/zod/src/v4/locales/ps.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt.ts +2 -0
- package/node_modules/zod/src/v4/locales/ro.ts +2 -0
- package/node_modules/zod/src/v4/locales/ru.ts +2 -0
- package/node_modules/zod/src/v4/locales/sk.ts +2 -0
- package/node_modules/zod/src/v4/locales/sl.ts +2 -0
- package/node_modules/zod/src/v4/locales/sv.ts +2 -0
- package/node_modules/zod/src/v4/locales/ta.ts +2 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +2 -0
- package/node_modules/zod/src/v4/locales/tk.ts +2 -0
- package/node_modules/zod/src/v4/locales/tr.ts +2 -0
- package/node_modules/zod/src/v4/locales/uk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ur.ts +2 -0
- package/node_modules/zod/src/v4/locales/uz.ts +2 -0
- package/node_modules/zod/src/v4/locales/vi.ts +2 -0
- package/node_modules/zod/src/v4/locales/yo.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +19 -0
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -35
- package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -33
- package/node_modules/zod/v4/core/api.cjs +45 -22
- package/node_modules/zod/v4/core/api.d.cts +12 -6
- package/node_modules/zod/v4/core/api.d.ts +12 -6
- package/node_modules/zod/v4/core/api.js +25 -22
- package/node_modules/zod/v4/core/checks.cjs +51 -97
- package/node_modules/zod/v4/core/checks.d.cts +17 -1
- package/node_modules/zod/v4/core/checks.d.ts +17 -1
- package/node_modules/zod/v4/core/checks.js +31 -96
- package/node_modules/zod/v4/core/compile.cjs +173 -78
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +154 -79
- package/node_modules/zod/v4/core/core.cjs +20 -1
- package/node_modules/zod/v4/core/core.js +1 -1
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +111 -23
- package/node_modules/zod/v4/core/memoizer.js +69 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +31 -6
- package/node_modules/zod/v4/core/regexes.d.cts +3 -0
- package/node_modules/zod/v4/core/regexes.d.ts +3 -0
- package/node_modules/zod/v4/core/regexes.js +10 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +302 -114
- package/node_modules/zod/v4/core/schemas.d.cts +28 -8
- package/node_modules/zod/v4/core/schemas.d.ts +28 -8
- package/node_modules/zod/v4/core/schemas.js +279 -113
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.js +7 -6
- package/node_modules/zod/v4/core/util.cjs +177 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +156 -143
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +19 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- package/node_modules/zod/v4/locales/ar.cjs +2 -0
- package/node_modules/zod/v4/locales/ar.js +2 -0
- package/node_modules/zod/v4/locales/az.cjs +2 -0
- package/node_modules/zod/v4/locales/az.js +2 -0
- package/node_modules/zod/v4/locales/be.cjs +2 -0
- package/node_modules/zod/v4/locales/be.js +2 -0
- package/node_modules/zod/v4/locales/bg.cjs +2 -0
- package/node_modules/zod/v4/locales/bg.js +2 -0
- package/node_modules/zod/v4/locales/bn.cjs +2 -0
- package/node_modules/zod/v4/locales/bn.js +2 -0
- package/node_modules/zod/v4/locales/ca.cjs +2 -0
- package/node_modules/zod/v4/locales/ca.js +2 -0
- package/node_modules/zod/v4/locales/ckb.cjs +2 -0
- package/node_modules/zod/v4/locales/ckb.js +2 -0
- package/node_modules/zod/v4/locales/cs.cjs +2 -0
- package/node_modules/zod/v4/locales/cs.js +2 -0
- package/node_modules/zod/v4/locales/da.cjs +2 -0
- package/node_modules/zod/v4/locales/da.js +2 -0
- package/node_modules/zod/v4/locales/de.cjs +2 -0
- package/node_modules/zod/v4/locales/de.js +2 -0
- package/node_modules/zod/v4/locales/el.cjs +2 -0
- package/node_modules/zod/v4/locales/el.js +2 -0
- package/node_modules/zod/v4/locales/en.cjs +2 -0
- package/node_modules/zod/v4/locales/en.js +2 -0
- package/node_modules/zod/v4/locales/eo.cjs +2 -0
- package/node_modules/zod/v4/locales/eo.js +2 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +2 -0
- package/node_modules/zod/v4/locales/fa.js +2 -0
- package/node_modules/zod/v4/locales/fi.cjs +2 -0
- package/node_modules/zod/v4/locales/fi.js +2 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
- package/node_modules/zod/v4/locales/fr-CA.js +2 -0
- package/node_modules/zod/v4/locales/fr.cjs +2 -0
- package/node_modules/zod/v4/locales/fr.js +2 -0
- package/node_modules/zod/v4/locales/gu.cjs +2 -0
- package/node_modules/zod/v4/locales/gu.js +2 -0
- package/node_modules/zod/v4/locales/he.cjs +2 -0
- package/node_modules/zod/v4/locales/he.js +2 -0
- package/node_modules/zod/v4/locales/hi.cjs +2 -0
- package/node_modules/zod/v4/locales/hi.js +2 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +2 -0
- package/node_modules/zod/v4/locales/hu.js +2 -0
- package/node_modules/zod/v4/locales/hy.cjs +2 -0
- package/node_modules/zod/v4/locales/hy.js +2 -0
- package/node_modules/zod/v4/locales/id.cjs +2 -0
- package/node_modules/zod/v4/locales/id.js +2 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +2 -0
- package/node_modules/zod/v4/locales/is.js +2 -0
- package/node_modules/zod/v4/locales/it.cjs +2 -0
- package/node_modules/zod/v4/locales/it.js +2 -0
- package/node_modules/zod/v4/locales/ja.cjs +2 -0
- package/node_modules/zod/v4/locales/ja.js +2 -0
- package/node_modules/zod/v4/locales/ka.cjs +2 -0
- package/node_modules/zod/v4/locales/ka.js +2 -0
- package/node_modules/zod/v4/locales/km.cjs +2 -0
- package/node_modules/zod/v4/locales/km.js +2 -0
- package/node_modules/zod/v4/locales/kn.cjs +2 -0
- package/node_modules/zod/v4/locales/kn.js +2 -0
- package/node_modules/zod/v4/locales/ko.cjs +2 -0
- package/node_modules/zod/v4/locales/ko.js +2 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +2 -0
- package/node_modules/zod/v4/locales/mk.js +2 -0
- package/node_modules/zod/v4/locales/ms.cjs +2 -0
- package/node_modules/zod/v4/locales/ms.js +2 -0
- package/node_modules/zod/v4/locales/ne.cjs +2 -0
- package/node_modules/zod/v4/locales/ne.js +2 -0
- package/node_modules/zod/v4/locales/nl.cjs +2 -0
- package/node_modules/zod/v4/locales/nl.js +2 -0
- package/node_modules/zod/v4/locales/nn.cjs +2 -0
- package/node_modules/zod/v4/locales/nn.js +2 -0
- package/node_modules/zod/v4/locales/no.cjs +2 -0
- package/node_modules/zod/v4/locales/no.js +2 -0
- package/node_modules/zod/v4/locales/ota.cjs +2 -0
- package/node_modules/zod/v4/locales/ota.js +2 -0
- package/node_modules/zod/v4/locales/pl.cjs +2 -0
- package/node_modules/zod/v4/locales/pl.js +2 -0
- package/node_modules/zod/v4/locales/ps.cjs +2 -0
- package/node_modules/zod/v4/locales/ps.js +2 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
- package/node_modules/zod/v4/locales/pt-BR.js +2 -0
- package/node_modules/zod/v4/locales/pt.cjs +2 -0
- package/node_modules/zod/v4/locales/pt.js +2 -0
- package/node_modules/zod/v4/locales/ro.cjs +2 -0
- package/node_modules/zod/v4/locales/ro.js +2 -0
- package/node_modules/zod/v4/locales/ru.cjs +2 -0
- package/node_modules/zod/v4/locales/ru.js +2 -0
- package/node_modules/zod/v4/locales/sk.cjs +2 -0
- package/node_modules/zod/v4/locales/sk.js +2 -0
- package/node_modules/zod/v4/locales/sl.cjs +2 -0
- package/node_modules/zod/v4/locales/sl.js +2 -0
- package/node_modules/zod/v4/locales/sv.cjs +2 -0
- package/node_modules/zod/v4/locales/sv.js +2 -0
- package/node_modules/zod/v4/locales/ta.cjs +2 -0
- package/node_modules/zod/v4/locales/ta.js +2 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +2 -0
- package/node_modules/zod/v4/locales/th.js +2 -0
- package/node_modules/zod/v4/locales/tk.cjs +2 -0
- package/node_modules/zod/v4/locales/tk.js +2 -0
- package/node_modules/zod/v4/locales/tr.cjs +2 -0
- package/node_modules/zod/v4/locales/tr.js +2 -0
- package/node_modules/zod/v4/locales/uk.cjs +2 -0
- package/node_modules/zod/v4/locales/uk.js +2 -0
- package/node_modules/zod/v4/locales/ur.cjs +2 -0
- package/node_modules/zod/v4/locales/ur.js +2 -0
- package/node_modules/zod/v4/locales/uz.cjs +2 -0
- package/node_modules/zod/v4/locales/uz.js +2 -0
- package/node_modules/zod/v4/locales/vi.cjs +2 -0
- package/node_modules/zod/v4/locales/vi.js +2 -0
- package/node_modules/zod/v4/locales/yo.cjs +2 -0
- package/node_modules/zod/v4/locales/yo.js +2 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-CN.js +2 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-TW.js +2 -0
- package/node_modules/zod/v4/mini/checks.cjs +19 -0
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +44 -8
- package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
- package/node_modules/zod/v4/mini/schemas.js +21 -6
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/openclaw.plugin.json +14 -0
- package/package.json +7 -7
- package/dist/.setup/rolldown-runtime-D7D4PA-g.mjs +0 -13
- package/dist/.setup/state-contract-DvahEY4X.mjs +0 -56
- package/dist/.setup/state-migrations-CIwg07l5.mjs +0 -277
- /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount } from "./accounts-Dv0uksBG.mjs";
|
|
2
|
-
import { a as IMESSAGE_REPLY_CACHE_NAMESPACE, c as IMESSAGE_SENT_ECHOES_TTL_MS, f as resolveIMessageReplyCacheEntryKey, i as IMESSAGE_REPLY_CACHE_MAX_ENTRIES, l as capFailureRetriesMap, n as IMESSAGE_REPLY_CACHE_COUNTER_KEY, o as IMESSAGE_REPLY_CACHE_TTL_MS, p as resolveIMessageSentEchoEntryKey, r as IMESSAGE_REPLY_CACHE_COUNTER_NAMESPACE, s as IMESSAGE_SENT_ECHOES_NAMESPACE, t as IMESSAGE_CATCHUP_CURSOR_NAMESPACE, u as resolveIMessageCatchupCursorKey } from "./state-contract-DvahEY4X.mjs";
|
|
3
|
-
import { asFiniteNumber, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
-
import fs from "node:fs";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
import { createHash } from "node:crypto";
|
|
7
|
-
import { fileExists } from "openclaw/plugin-sdk/file-access-runtime";
|
|
8
|
-
import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
|
|
9
|
-
//#region extensions/imessage/src/state-migrations.ts
|
|
10
|
-
function resolveMigrationStateDir(params) {
|
|
11
|
-
return params.stateDir ?? resolveStateDir(params.env);
|
|
12
|
-
}
|
|
13
|
-
function remainingTtlMs(timestamp, ttlMs) {
|
|
14
|
-
const remaining = ttlMs - Math.max(0, Date.now() - timestamp);
|
|
15
|
-
return remaining > 0 ? remaining : void 0;
|
|
16
|
-
}
|
|
17
|
-
function readJsonl(pathValue) {
|
|
18
|
-
try {
|
|
19
|
-
return fs.readFileSync(pathValue, "utf8").split(/\n+/).flatMap((line) => {
|
|
20
|
-
if (!line) return [];
|
|
21
|
-
try {
|
|
22
|
-
return [JSON.parse(line)];
|
|
23
|
-
} catch {
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
} catch (err) {
|
|
28
|
-
throw new Error(`Failed reading ${pathValue}: ${String(err)}`, { cause: err });
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function parseReplyCacheEntry(raw) {
|
|
32
|
-
if (!raw || typeof raw !== "object") return null;
|
|
33
|
-
const parsed = raw;
|
|
34
|
-
if (typeof parsed.accountId !== "string" || typeof parsed.messageId !== "string" || typeof parsed.shortId !== "string" || typeof parsed.timestamp !== "number") return null;
|
|
35
|
-
return {
|
|
36
|
-
accountId: parsed.accountId,
|
|
37
|
-
messageId: parsed.messageId,
|
|
38
|
-
shortId: parsed.shortId,
|
|
39
|
-
timestamp: parsed.timestamp,
|
|
40
|
-
...typeof parsed.chatGuid === "string" ? { chatGuid: parsed.chatGuid } : {},
|
|
41
|
-
...typeof parsed.chatIdentifier === "string" ? { chatIdentifier: parsed.chatIdentifier } : {},
|
|
42
|
-
...typeof parsed.chatId === "number" ? { chatId: parsed.chatId } : {},
|
|
43
|
-
...typeof parsed.isFromMe === "boolean" ? { isFromMe: parsed.isFromMe } : {}
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function readReplyCacheMaxShortId(sourcePath) {
|
|
47
|
-
let max = 0;
|
|
48
|
-
for (const raw of readJsonl(sourcePath)) {
|
|
49
|
-
if (!raw || typeof raw !== "object") continue;
|
|
50
|
-
const shortId = raw.shortId;
|
|
51
|
-
if (typeof shortId !== "string") continue;
|
|
52
|
-
const numeric = Number.parseInt(shortId, 10);
|
|
53
|
-
if (Number.isFinite(numeric) && numeric > max) max = numeric;
|
|
54
|
-
}
|
|
55
|
-
return max;
|
|
56
|
-
}
|
|
57
|
-
function readReplyCounterValue(value) {
|
|
58
|
-
if (!value || typeof value !== "object") return null;
|
|
59
|
-
const counter = value.counter;
|
|
60
|
-
return asFiniteNumber(counter) ?? null;
|
|
61
|
-
}
|
|
62
|
-
function shouldReplaceReplyCounter(existingValue, incomingValue) {
|
|
63
|
-
const incomingCounter = readReplyCounterValue(incomingValue);
|
|
64
|
-
if (incomingCounter === null) return false;
|
|
65
|
-
const existingCounter = readReplyCounterValue(existingValue);
|
|
66
|
-
return existingCounter === null || incomingCounter > existingCounter;
|
|
67
|
-
}
|
|
68
|
-
function parseSentEchoEntry(raw) {
|
|
69
|
-
if (!raw || typeof raw !== "object") return null;
|
|
70
|
-
const parsed = raw;
|
|
71
|
-
if (typeof parsed.scope !== "string" || typeof parsed.timestamp !== "number") return null;
|
|
72
|
-
return {
|
|
73
|
-
scope: parsed.scope,
|
|
74
|
-
timestamp: parsed.timestamp,
|
|
75
|
-
...typeof parsed.text === "string" ? { text: parsed.text } : {},
|
|
76
|
-
...typeof parsed.messageId === "string" ? { messageId: parsed.messageId } : {}
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
function listReplyCacheEntries(sourcePath) {
|
|
80
|
-
const entriesByKey = /* @__PURE__ */ new Map();
|
|
81
|
-
for (const entry of readJsonl(sourcePath).map(parseReplyCacheEntry)) {
|
|
82
|
-
if (!entry) continue;
|
|
83
|
-
const ttlMs = remainingTtlMs(entry.timestamp, IMESSAGE_REPLY_CACHE_TTL_MS);
|
|
84
|
-
if (!ttlMs) continue;
|
|
85
|
-
const key = resolveIMessageReplyCacheEntryKey(entry.messageId);
|
|
86
|
-
entriesByKey.delete(key);
|
|
87
|
-
entriesByKey.set(key, {
|
|
88
|
-
value: entry,
|
|
89
|
-
ttlMs
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
return [...entriesByKey.entries()].slice(-IMESSAGE_REPLY_CACHE_MAX_ENTRIES).map(([key, entry]) => ({
|
|
93
|
-
key,
|
|
94
|
-
value: entry.value,
|
|
95
|
-
ttlMs: entry.ttlMs
|
|
96
|
-
}));
|
|
97
|
-
}
|
|
98
|
-
function listSentEchoEntries(sourcePath) {
|
|
99
|
-
return readJsonl(sourcePath).map(parseSentEchoEntry).filter((entry) => Boolean(entry)).slice(-256).flatMap((entry) => {
|
|
100
|
-
const ttlMs = remainingTtlMs(entry.timestamp, IMESSAGE_SENT_ECHOES_TTL_MS);
|
|
101
|
-
if (!ttlMs) return [];
|
|
102
|
-
return [{
|
|
103
|
-
key: resolveIMessageSentEchoEntryKey(entry),
|
|
104
|
-
value: entry,
|
|
105
|
-
ttlMs
|
|
106
|
-
}];
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
function resolveLegacyCatchupCursorPath(stateDir, accountId) {
|
|
110
|
-
const safePrefix = accountId.replace(/[^a-zA-Z0-9_-]/g, "_") || "account";
|
|
111
|
-
const hash = createHash("sha256").update(accountId, "utf8").digest("hex").slice(0, 12);
|
|
112
|
-
return path.join(stateDir, "imessage", "catchup", `${safePrefix}__${hash}.json`);
|
|
113
|
-
}
|
|
114
|
-
function listLegacyCatchupCursorPaths(stateDir) {
|
|
115
|
-
const dir = path.join(stateDir, "imessage", "catchup");
|
|
116
|
-
try {
|
|
117
|
-
return fs.readdirSync(dir, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => path.join(dir, entry.name));
|
|
118
|
-
} catch {
|
|
119
|
-
return [];
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
function normalizeCatchupCursor(raw) {
|
|
123
|
-
if (!raw || typeof raw !== "object") return null;
|
|
124
|
-
const value = raw;
|
|
125
|
-
if (typeof value.lastSeenMs !== "number" || !Number.isFinite(value.lastSeenMs) || typeof value.lastSeenRowid !== "number" || !Number.isFinite(value.lastSeenRowid)) return null;
|
|
126
|
-
const failureRetries = sanitizeCatchupFailureRetries(value.failureRetries);
|
|
127
|
-
const hasRetries = Object.keys(failureRetries).length > 0;
|
|
128
|
-
return {
|
|
129
|
-
lastSeenMs: value.lastSeenMs,
|
|
130
|
-
lastSeenRowid: value.lastSeenRowid,
|
|
131
|
-
updatedAt: typeof value.updatedAt === "number" ? value.updatedAt : 0,
|
|
132
|
-
...hasRetries ? { failureRetries } : {}
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
function readCatchupCursor(sourcePath) {
|
|
136
|
-
let parsed;
|
|
137
|
-
try {
|
|
138
|
-
parsed = JSON.parse(fs.readFileSync(sourcePath, "utf8"));
|
|
139
|
-
} catch (err) {
|
|
140
|
-
throw new Error(`Failed reading ${sourcePath}: ${String(err)}`, { cause: err });
|
|
141
|
-
}
|
|
142
|
-
const cursor = normalizeCatchupCursor(parsed);
|
|
143
|
-
if (!cursor) throw new Error(`Invalid iMessage catchup cursor: ${sourcePath}`);
|
|
144
|
-
return cursor;
|
|
145
|
-
}
|
|
146
|
-
function sanitizeCatchupFailureRetries(raw) {
|
|
147
|
-
if (!raw || typeof raw !== "object") return {};
|
|
148
|
-
const out = {};
|
|
149
|
-
for (const [guid, count] of Object.entries(raw)) if (typeof count === "number" && Number.isFinite(count) && count > 0) out[guid] = Math.floor(count);
|
|
150
|
-
return capFailureRetriesMap(out);
|
|
151
|
-
}
|
|
152
|
-
function shouldReplaceCatchupCursor(existingValue, incomingValue) {
|
|
153
|
-
const incoming = normalizeCatchupCursor(incomingValue);
|
|
154
|
-
if (!incoming) return false;
|
|
155
|
-
const existing = normalizeCatchupCursor(existingValue);
|
|
156
|
-
return !existing || incoming.lastSeenRowid > existing.lastSeenRowid || incoming.lastSeenRowid === existing.lastSeenRowid && incoming.lastSeenMs > existing.lastSeenMs;
|
|
157
|
-
}
|
|
158
|
-
function detectReplyCacheMigration(params) {
|
|
159
|
-
const stateDir = resolveMigrationStateDir(params);
|
|
160
|
-
const sourcePath = path.join(stateDir, "imessage", "reply-cache.jsonl");
|
|
161
|
-
if (!fileExists(sourcePath)) return [];
|
|
162
|
-
const plans = [];
|
|
163
|
-
plans.push({
|
|
164
|
-
kind: "plugin-state-import",
|
|
165
|
-
label: "iMessage reply short-id counter",
|
|
166
|
-
sourcePath,
|
|
167
|
-
targetPath: `plugin state:${IMESSAGE_REPLY_CACHE_COUNTER_NAMESPACE}`,
|
|
168
|
-
pluginId: "imessage",
|
|
169
|
-
namespace: IMESSAGE_REPLY_CACHE_COUNTER_NAMESPACE,
|
|
170
|
-
maxEntries: 1,
|
|
171
|
-
scopeKey: "",
|
|
172
|
-
stateDir,
|
|
173
|
-
preview: `- iMessage reply short-id counter: ${sourcePath} → plugin state (${IMESSAGE_REPLY_CACHE_COUNTER_NAMESPACE})`,
|
|
174
|
-
readEntries: () => {
|
|
175
|
-
const maxShortId = readReplyCacheMaxShortId(sourcePath);
|
|
176
|
-
return maxShortId > 0 ? [{
|
|
177
|
-
key: IMESSAGE_REPLY_CACHE_COUNTER_KEY,
|
|
178
|
-
value: { counter: maxShortId }
|
|
179
|
-
}] : [];
|
|
180
|
-
},
|
|
181
|
-
shouldReplaceExistingEntry: ({ existingValue, incomingValue }) => shouldReplaceReplyCounter(existingValue, incomingValue)
|
|
182
|
-
});
|
|
183
|
-
plans.push({
|
|
184
|
-
kind: "plugin-state-import",
|
|
185
|
-
label: "iMessage reply short-id cache",
|
|
186
|
-
sourcePath,
|
|
187
|
-
targetPath: `plugin state:${IMESSAGE_REPLY_CACHE_NAMESPACE}`,
|
|
188
|
-
pluginId: "imessage",
|
|
189
|
-
namespace: IMESSAGE_REPLY_CACHE_NAMESPACE,
|
|
190
|
-
maxEntries: IMESSAGE_REPLY_CACHE_MAX_ENTRIES,
|
|
191
|
-
scopeKey: "",
|
|
192
|
-
stateDir,
|
|
193
|
-
cleanupSource: "rename",
|
|
194
|
-
cleanupWhenEmpty: true,
|
|
195
|
-
preview: `- iMessage reply short-id cache: ${sourcePath} → plugin state (${IMESSAGE_REPLY_CACHE_NAMESPACE})`,
|
|
196
|
-
readEntries: () => listReplyCacheEntries(sourcePath)
|
|
197
|
-
});
|
|
198
|
-
return plans;
|
|
199
|
-
}
|
|
200
|
-
function detectSentEchoMigration(params) {
|
|
201
|
-
const stateDir = resolveMigrationStateDir(params);
|
|
202
|
-
const sourcePath = path.join(stateDir, "imessage", "sent-echoes.jsonl");
|
|
203
|
-
if (!fileExists(sourcePath)) return [];
|
|
204
|
-
return [{
|
|
205
|
-
kind: "plugin-state-import",
|
|
206
|
-
label: "iMessage sent-echo dedupe cache",
|
|
207
|
-
sourcePath,
|
|
208
|
-
targetPath: `plugin state:${IMESSAGE_SENT_ECHOES_NAMESPACE}`,
|
|
209
|
-
pluginId: "imessage",
|
|
210
|
-
namespace: IMESSAGE_SENT_ECHOES_NAMESPACE,
|
|
211
|
-
maxEntries: 256,
|
|
212
|
-
scopeKey: "",
|
|
213
|
-
stateDir,
|
|
214
|
-
cleanupSource: "rename",
|
|
215
|
-
cleanupWhenEmpty: true,
|
|
216
|
-
preview: `- iMessage sent-echo dedupe cache: ${sourcePath} → plugin state (${IMESSAGE_SENT_ECHOES_NAMESPACE})`,
|
|
217
|
-
readEntries: () => listSentEchoEntries(sourcePath)
|
|
218
|
-
}];
|
|
219
|
-
}
|
|
220
|
-
function detectCatchupCursorMigrations(params) {
|
|
221
|
-
const stateDir = resolveMigrationStateDir(params);
|
|
222
|
-
const accountIds = uniqueStrings([resolveDefaultIMessageAccountId(params.cfg), ...listIMessageAccountIds(params.cfg)].map((accountId) => resolveIMessageAccount({
|
|
223
|
-
cfg: params.cfg,
|
|
224
|
-
accountId
|
|
225
|
-
}).accountId));
|
|
226
|
-
const configuredPaths = new Set(accountIds.map((accountId) => resolveLegacyCatchupCursorPath(stateDir, accountId)));
|
|
227
|
-
const configuredPlans = accountIds.flatMap((accountId) => {
|
|
228
|
-
const sourcePath = resolveLegacyCatchupCursorPath(stateDir, accountId);
|
|
229
|
-
if (!fileExists(sourcePath)) return [];
|
|
230
|
-
return {
|
|
231
|
-
kind: "plugin-state-import",
|
|
232
|
-
label: "iMessage catchup cursor",
|
|
233
|
-
sourcePath,
|
|
234
|
-
targetPath: `plugin state:${IMESSAGE_CATCHUP_CURSOR_NAMESPACE}`,
|
|
235
|
-
pluginId: "imessage",
|
|
236
|
-
namespace: IMESSAGE_CATCHUP_CURSOR_NAMESPACE,
|
|
237
|
-
maxEntries: 256,
|
|
238
|
-
scopeKey: "",
|
|
239
|
-
stateDir,
|
|
240
|
-
cleanupSource: "rename",
|
|
241
|
-
preview: `- iMessage catchup cursor: ${sourcePath} → plugin state (${IMESSAGE_CATCHUP_CURSOR_NAMESPACE})`,
|
|
242
|
-
readEntries: () => {
|
|
243
|
-
const cursor = readCatchupCursor(sourcePath);
|
|
244
|
-
return [{
|
|
245
|
-
key: resolveIMessageCatchupCursorKey(accountId),
|
|
246
|
-
value: cursor
|
|
247
|
-
}];
|
|
248
|
-
},
|
|
249
|
-
shouldReplaceExistingEntry: (replaceParams) => shouldReplaceCatchupCursor(replaceParams.existingValue, replaceParams.incomingValue)
|
|
250
|
-
};
|
|
251
|
-
});
|
|
252
|
-
const orphanPlans = listLegacyCatchupCursorPaths(stateDir).filter((sourcePath) => !configuredPaths.has(sourcePath)).map((sourcePath) => ({
|
|
253
|
-
kind: "plugin-state-import",
|
|
254
|
-
label: "iMessage orphan catchup cursor",
|
|
255
|
-
sourcePath,
|
|
256
|
-
targetPath: `plugin state:${IMESSAGE_CATCHUP_CURSOR_NAMESPACE}`,
|
|
257
|
-
pluginId: "imessage",
|
|
258
|
-
namespace: IMESSAGE_CATCHUP_CURSOR_NAMESPACE,
|
|
259
|
-
maxEntries: 256,
|
|
260
|
-
scopeKey: "",
|
|
261
|
-
stateDir,
|
|
262
|
-
cleanupSource: "rename",
|
|
263
|
-
cleanupWhenEmpty: true,
|
|
264
|
-
preview: `- iMessage orphan catchup cursor: ${sourcePath} → archived legacy state`,
|
|
265
|
-
readEntries: () => []
|
|
266
|
-
}));
|
|
267
|
-
return [...configuredPlans, ...orphanPlans];
|
|
268
|
-
}
|
|
269
|
-
async function detectIMessageLegacyStateMigrations(params) {
|
|
270
|
-
return [
|
|
271
|
-
...detectCatchupCursorMigrations(params),
|
|
272
|
-
...detectReplyCacheMigration(params),
|
|
273
|
-
...detectSentEchoMigration(params)
|
|
274
|
-
];
|
|
275
|
-
}
|
|
276
|
-
//#endregion
|
|
277
|
-
export { detectIMessageLegacyStateMigrations };
|
|
File without changes
|