@openclaw/mattermost 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/{channel-plugin-api-N-mnrhds.mjs → channel-plugin-api-Bc8Qc1-t.mjs} +2 -2
- package/dist/.setup/{channel-plugin-api-CKz3b0dp.mjs → channel-plugin-api-DXqHarCt.mjs} +2 -2
- package/dist/.setup/{channel-plugin-runtime-Ca4cZHq2.mjs → channel-plugin-runtime-B0CAMiHe.mjs} +146 -176
- package/dist/.setup/channel.runtime-E2B5dNrh.mjs +383 -0
- package/dist/.setup/{client-Cx71KZ1x.mjs → client-CVeeTqCO.mjs} +55 -46
- package/dist/.setup/doctor-contract-BI6SB2cd.mjs +175 -0
- package/dist/.setup/{interactions-BG-CQbVD.mjs → interactions-DMSZYnEx.mjs} +170 -80
- package/dist/.setup/{channel.runtime-C074p7wv.mjs → monitor-BZyzPkkb.mjs} +237 -726
- package/dist/.setup/{monitor-auth-DBoM2Bja.mjs → monitor-auth-aZ0b1gqx.mjs} +11 -16
- package/dist/.setup/{normalize-BQzx2u8S.mjs → normalize-BCjtmxtp.mjs} +8 -17
- package/dist/.setup/rolldown-runtime-BBjsoOtd.mjs +27 -0
- package/dist/.setup/send-ClgX-usq.mjs +438 -0
- package/dist/.setup/{slash-state-CmyIYDIc.mjs → slash-state-Dni1XNc1.mjs} +144 -764
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +2 -2
- package/dist/channel-plugin-runtime.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/policy-api.js +1 -1
- package/dist/runtime-api.js +2 -23
- package/dist/setup-entry.js +1 -1
- package/dist/slash-route-api.js +1 -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 +20 -0
- package/package.json +5 -5
- package/dist/.setup/doctor-contract-mvORF4f6.mjs +0 -18
package/assets/icon.png
CHANGED
|
Binary file
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as mattermostPlugin } from "./channel-plugin-runtime-
|
|
2
|
-
import { t as mattermostSetupPlugin } from "./channel-plugin-api-
|
|
1
|
+
import { t as mattermostPlugin } from "./channel-plugin-runtime-B0CAMiHe.mjs";
|
|
2
|
+
import { t as mattermostSetupPlugin } from "./channel-plugin-api-DXqHarCt.mjs";
|
|
3
3
|
export { mattermostPlugin, mattermostSetupPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as isMattermostConfigured } from "./normalize-
|
|
2
|
-
import { a as describeMattermostAccount, i as MattermostChannelConfigSchema, n as mattermostSetupWizard, o as mattermostConfigAdapter, r as mattermostSetupContract, s as mattermostMeta } from "./channel-plugin-runtime-
|
|
1
|
+
import { s as isMattermostConfigured } from "./normalize-BCjtmxtp.mjs";
|
|
2
|
+
import { a as describeMattermostAccount, i as MattermostChannelConfigSchema, n as mattermostSetupWizard, o as mattermostConfigAdapter, r as mattermostSetupContract, s as mattermostMeta } from "./channel-plugin-runtime-B0CAMiHe.mjs";
|
|
3
3
|
import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-B93t91oq.mjs";
|
|
4
4
|
//#region extensions/mattermost/src/channel.setup.ts
|
|
5
5
|
const mattermostSetupPlugin = {
|
package/dist/.setup/{channel-plugin-runtime-Ca4cZHq2.mjs → channel-plugin-runtime-B0CAMiHe.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h as normalizeMattermostBaseUrl } from "./client-
|
|
1
|
+
import { h as normalizeMattermostBaseUrl } from "./client-CVeeTqCO.mjs";
|
|
2
2
|
import { t as mattermostIngressIdentity } from "./ingress-identity-DNl4yQSc.mjs";
|
|
3
|
-
import { a as resolveMattermostPresentation, c as listMattermostAccountIds, d as resolveMattermostReplyToMode,
|
|
3
|
+
import { a as resolveMattermostPresentation, c as listMattermostAccountIds, d as resolveMattermostReplyToMode, i as requiresMattermostMediaUpload, l as resolveDefaultMattermostAccountId, n as normalizeMattermostMessagingTarget, o as inspectMattermostAccount, s as isMattermostConfigured$1, t as looksLikeMattermostTargetId, u as resolveMattermostAccount } from "./normalize-BCjtmxtp.mjs";
|
|
4
4
|
import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-B93t91oq.mjs";
|
|
5
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
5
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BI6SB2cd.mjs";
|
|
6
6
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-qg3NXRlS.mjs";
|
|
7
7
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { buildPassiveProbedChannelStatusSummary } from "openclaw/plugin-sdk/extension-shared";
|
|
@@ -12,10 +12,11 @@ import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from
|
|
|
12
12
|
import { createLoggedPairingApprovalNotifier } from "openclaw/plugin-sdk/channel-pairing";
|
|
13
13
|
import { createAccountStatusSink, createChannelMessageAdapterFromOutbound } from "openclaw/plugin-sdk/channel-outbound";
|
|
14
14
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { buildChannelOutboundSessionRoute, buildThreadAwareOutboundSessionRoute, stripChannelTargetPrefix, stripTargetKindPrefix } from "openclaw/plugin-sdk/core";
|
|
16
|
+
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
17
17
|
import { jsonResult, readPositiveIntegerParam, readStringArrayParam, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
18
18
|
import { createChannelConfigUiHints, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
19
|
+
import { identityEntryAuthenticationClassifier } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
19
20
|
import { buildChannelGroupsScopeTree, buildMutableAllowEntryDetector, collectStandardAllowlistLists, createDangerousNameMatchingMutableAllowlistWarningCollector, createRestrictSendersChannelSecurity, resolveScopeRequireMention } from "openclaw/plugin-sdk/channel-policy";
|
|
20
21
|
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
21
22
|
import { createChannelDirectoryAdapter } from "openclaw/plugin-sdk/directory-runtime";
|
|
@@ -25,9 +26,9 @@ import { resolvePayloadMediaUrls, sendTextMediaPayload } from "openclaw/plugin-s
|
|
|
25
26
|
import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
26
27
|
import { chunkTextForOutbound, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
27
28
|
import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
28
|
-
import {
|
|
29
|
+
import { buildSecretInputSchema, hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
29
30
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
30
|
-
import {
|
|
31
|
+
import { ChannelImplicitMentionsSchema, ChannelPreviewStreamingConfigSchema, ChannelStreamingPreviewSchema, ChannelStreamingProgressSchema, ContextVisibilityModeSchema, DmPolicySchema, GroupPolicySchema, MarkdownConfigSchema, buildChannelConfigSchema, buildGroupEntrySchema, buildMultiAccountChannelSchema, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
|
|
31
32
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
32
33
|
import { applyAccountNameToChannelSection, applySetupAccountConfigPatch, baseUrlTextInput, createSetupTranslator, createStandardChannelSetupStatus, defineTokenCredential, formatDocsLink, migrateBaseNameToDefaultAccount, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
33
34
|
import { createSetupInputPresenceValidator } from "openclaw/plugin-sdk/setup-runtime";
|
|
@@ -103,8 +104,25 @@ function describeMattermostAccount(account) {
|
|
|
103
104
|
});
|
|
104
105
|
}
|
|
105
106
|
//#endregion
|
|
107
|
+
//#region extensions/mattermost/src/channel-send-result.ts
|
|
108
|
+
function toMattermostOutboundResult(result) {
|
|
109
|
+
const { channelId, ...delivery } = result;
|
|
110
|
+
return {
|
|
111
|
+
...delivery,
|
|
112
|
+
target: {
|
|
113
|
+
kind: "channel",
|
|
114
|
+
id: channelId
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function createMattermostDeliveryProgressReporter(onDeliveryResult) {
|
|
119
|
+
return onDeliveryResult ? async (result) => {
|
|
120
|
+
await onDeliveryResult(attachChannelToResult("mattermost", toMattermostOutboundResult(result)));
|
|
121
|
+
} : void 0;
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
106
124
|
//#region extensions/mattermost/src/config-schema-core.ts
|
|
107
|
-
const MattermostGroupSchema = buildGroupEntrySchema().omit({
|
|
125
|
+
const MattermostGroupSchema = buildGroupEntrySchema({ requireMentionInBotThreads: z.boolean().optional() }).omit({
|
|
108
126
|
tools: true,
|
|
109
127
|
toolsBySender: true,
|
|
110
128
|
skills: true,
|
|
@@ -112,15 +130,6 @@ const MattermostGroupSchema = buildGroupEntrySchema().omit({
|
|
|
112
130
|
allowFrom: true,
|
|
113
131
|
systemPrompt: true
|
|
114
132
|
});
|
|
115
|
-
function requireMattermostOpenAllowFrom(params) {
|
|
116
|
-
requireOpenAllowFrom({
|
|
117
|
-
policy: params.policy,
|
|
118
|
-
allowFrom: params.allowFrom,
|
|
119
|
-
ctx: params.ctx,
|
|
120
|
-
path: ["allowFrom"],
|
|
121
|
-
message: "channels.mattermost.dmPolicy=\"open\" requires channels.mattermost.allowFrom to include \"*\""
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
133
|
const DmChannelRetrySchema = z.object({
|
|
125
134
|
/** Maximum number of retry attempts for DM channel creation (default: 3) */
|
|
126
135
|
maxRetries: z.number().int().min(0).max(10).optional(),
|
|
@@ -150,35 +159,13 @@ const MattermostSlashCommandsSchema = z.object({
|
|
|
150
159
|
const MattermostNetworkSchema = z.object({
|
|
151
160
|
/** Dangerous opt-in for self-hosted Mattermost on trusted private/internal hosts. */
|
|
152
161
|
dangerouslyAllowPrivateNetwork: z.boolean().optional() }).strict().optional();
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
label: z.union([z.string(), z.literal(false)]).optional(),
|
|
161
|
-
labels: z.array(z.string()).optional(),
|
|
162
|
-
maxLines: z.number().int().positive().optional(),
|
|
163
|
-
maxLineChars: z.number().int().positive().optional(),
|
|
164
|
-
toolProgress: z.boolean().optional(),
|
|
165
|
-
commandText: z.enum(["raw", "status"]).optional()
|
|
166
|
-
}).strict();
|
|
167
|
-
const MattermostStreamingPreviewSchema = z.object({
|
|
168
|
-
toolProgress: z.boolean().optional(),
|
|
169
|
-
commandText: z.enum(["raw", "status"]).optional()
|
|
170
|
-
}).strict();
|
|
171
|
-
const MattermostStreamingBlockSchema = z.object({
|
|
172
|
-
enabled: z.boolean().optional(),
|
|
173
|
-
coalesce: BlockStreamingCoalesceSchema.optional()
|
|
174
|
-
}).strict();
|
|
175
|
-
const MattermostStreamingSchema = z.object({
|
|
176
|
-
mode: MattermostStreamingModeSchema.optional(),
|
|
177
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
178
|
-
preview: MattermostStreamingPreviewSchema.optional(),
|
|
179
|
-
progress: MattermostStreamingProgressSchema.optional(),
|
|
180
|
-
block: MattermostStreamingBlockSchema.optional()
|
|
181
|
-
}).strict();
|
|
162
|
+
const MattermostStreamingSchema = ChannelPreviewStreamingConfigSchema.extend({
|
|
163
|
+
preview: ChannelStreamingPreviewSchema.omit({ chunk: true }).optional(),
|
|
164
|
+
progress: ChannelStreamingProgressSchema.omit({
|
|
165
|
+
commentary: true,
|
|
166
|
+
narration: true
|
|
167
|
+
}).optional()
|
|
168
|
+
});
|
|
182
169
|
const MattermostReplyToModeSchema = z.enum([
|
|
183
170
|
"off",
|
|
184
171
|
"first",
|
|
@@ -209,6 +196,7 @@ const MattermostAccountSchemaBase = z.object({
|
|
|
209
196
|
]).optional(),
|
|
210
197
|
oncharPrefixes: z.array(z.string()).optional(),
|
|
211
198
|
requireMention: z.boolean().optional(),
|
|
199
|
+
requireMentionInBotThreads: z.boolean().optional(),
|
|
212
200
|
implicitMentions: ChannelImplicitMentionsSchema.optional(),
|
|
213
201
|
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
214
202
|
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
@@ -238,10 +226,12 @@ const MattermostAccountSchemaBase = z.object({
|
|
|
238
226
|
const MattermostConfigSchema = buildMultiAccountChannelSchema(MattermostAccountSchemaBase, {
|
|
239
227
|
optionalAccount: true,
|
|
240
228
|
refine: (value, ctx) => {
|
|
241
|
-
|
|
229
|
+
requireOpenAllowFrom({
|
|
242
230
|
policy: value.dmPolicy,
|
|
243
231
|
allowFrom: value.allowFrom,
|
|
244
|
-
ctx
|
|
232
|
+
ctx,
|
|
233
|
+
path: ["allowFrom"],
|
|
234
|
+
message: "channels.mattermost.dmPolicy=\"open\" requires channels.mattermost.allowFrom to include \"*\""
|
|
245
235
|
});
|
|
246
236
|
}
|
|
247
237
|
});
|
|
@@ -252,6 +242,14 @@ const mattermostChannelConfigUiHints = {
|
|
|
252
242
|
label: "Mattermost",
|
|
253
243
|
help: "Mattermost channel provider configuration for bot auth, access policy, slash commands, and preview streaming."
|
|
254
244
|
},
|
|
245
|
+
requireMentionInBotThreads: {
|
|
246
|
+
label: "Mention in Bot Threads",
|
|
247
|
+
help: "Require an explicit mention or configured trigger in threads rooted in this bot's own posts. Set false to accept unmentioned follow-ups; omit to preserve existing mention and participation behavior."
|
|
248
|
+
},
|
|
249
|
+
"groups.*.requireMentionInBotThreads": {
|
|
250
|
+
label: "Mention in Bot Threads",
|
|
251
|
+
help: "Override bot-created thread mention policy for this Mattermost channel. Exact channel settings override the wildcard, then the account setting."
|
|
252
|
+
},
|
|
255
253
|
...createChannelConfigUiHints({
|
|
256
254
|
channelLabel: "Mattermost",
|
|
257
255
|
dmPolicy: { channelKey: "mattermost" },
|
|
@@ -276,7 +274,7 @@ const isMattermostMutableAllowEntry = buildMutableAllowEntryDetector({ stableIdP
|
|
|
276
274
|
const collectMattermostMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
|
|
277
275
|
channel: "mattermost",
|
|
278
276
|
detector: isMattermostMutableAllowEntry,
|
|
279
|
-
collectLists:
|
|
277
|
+
collectLists: collectStandardAllowlistLists
|
|
280
278
|
});
|
|
281
279
|
const mattermostDoctor = {
|
|
282
280
|
legacyConfigRules,
|
|
@@ -408,12 +406,6 @@ const channel$1 = "mattermost";
|
|
|
408
406
|
function isMattermostConfigured(account) {
|
|
409
407
|
return (Boolean(account.botToken?.trim()) || hasConfiguredSecretInput(account.config.botToken)) && Boolean(account.baseUrl);
|
|
410
408
|
}
|
|
411
|
-
function resolveMattermostAccountWithSecrets(cfg, accountId) {
|
|
412
|
-
return inspectMattermostAccount({
|
|
413
|
-
cfg,
|
|
414
|
-
accountId
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
409
|
function applyMattermostSetupConfigPatch(params) {
|
|
418
410
|
const namedConfig = applyAccountNameToChannelSection({
|
|
419
411
|
cfg: params.cfg,
|
|
@@ -526,7 +518,10 @@ const mattermostSetupWizard = {
|
|
|
526
518
|
unconfiguredHint: t("wizard.channels.statusNeedsSetup"),
|
|
527
519
|
configuredScore: 2,
|
|
528
520
|
unconfiguredScore: 1,
|
|
529
|
-
resolveConfigured: ({ cfg, accountId }) => isMattermostConfigured(
|
|
521
|
+
resolveConfigured: ({ cfg, accountId }) => isMattermostConfigured(inspectMattermostAccount({
|
|
522
|
+
cfg,
|
|
523
|
+
accountId: accountId ?? DEFAULT_ACCOUNT_ID
|
|
524
|
+
}))
|
|
530
525
|
}),
|
|
531
526
|
introNote: {
|
|
532
527
|
title: t("wizard.mattermost.botTokenTitle"),
|
|
@@ -537,14 +532,20 @@ const mattermostSetupWizard = {
|
|
|
537
532
|
t("wizard.mattermost.helpBotMember"),
|
|
538
533
|
t("wizard.channels.docs", { link: formatDocsLink("/mattermost", "mattermost") })
|
|
539
534
|
],
|
|
540
|
-
shouldShow: ({ cfg, accountId }) => !isMattermostConfigured(
|
|
535
|
+
shouldShow: ({ cfg, accountId }) => !isMattermostConfigured(inspectMattermostAccount({
|
|
536
|
+
cfg,
|
|
537
|
+
accountId
|
|
538
|
+
}))
|
|
541
539
|
},
|
|
542
540
|
envShortcut: {
|
|
543
541
|
prompt: t("wizard.mattermost.envPrompt"),
|
|
544
542
|
preferredEnvVar: "MATTERMOST_BOT_TOKEN",
|
|
545
543
|
isAvailable: ({ cfg, accountId }) => {
|
|
546
544
|
if (accountId !== DEFAULT_ACCOUNT_ID) return false;
|
|
547
|
-
const resolvedAccount =
|
|
545
|
+
const resolvedAccount = inspectMattermostAccount({
|
|
546
|
+
cfg,
|
|
547
|
+
accountId
|
|
548
|
+
});
|
|
548
549
|
const hasConfigValues = hasConfiguredSecretInput(resolvedAccount.config.botToken) || Boolean(resolvedAccount.config.baseUrl?.trim());
|
|
549
550
|
return Boolean(process.env.MATTERMOST_BOT_TOKEN?.trim() && process.env.MATTERMOST_URL?.trim() && !hasConfigValues);
|
|
550
551
|
},
|
|
@@ -564,7 +565,7 @@ const mattermostSetupWizard = {
|
|
|
564
565
|
envPrompt: t("wizard.mattermost.envPrompt"),
|
|
565
566
|
keepPrompt: t("wizard.mattermost.botTokenKeep"),
|
|
566
567
|
inputPrompt: t("wizard.mattermost.botTokenInput"),
|
|
567
|
-
resolveAccount:
|
|
568
|
+
resolveAccount: inspectMattermostAccount,
|
|
568
569
|
accountConfigured: isMattermostConfigured,
|
|
569
570
|
patchAccount: ({ cfg, accountId, patch }) => applyMattermostSetupConfigPatch({
|
|
570
571
|
cfg,
|
|
@@ -578,11 +579,14 @@ const mattermostSetupWizard = {
|
|
|
578
579
|
configKey: "baseUrl",
|
|
579
580
|
message: t("wizard.mattermost.baseUrlPrompt"),
|
|
580
581
|
confirmCurrentValue: false,
|
|
581
|
-
resolveAccount:
|
|
582
|
+
resolveAccount: inspectMattermostAccount,
|
|
582
583
|
currentValue: (account) => account.baseUrl ?? process.env.MATTERMOST_URL?.trim(),
|
|
583
584
|
includeInitialValue: true,
|
|
584
585
|
shouldPrompt: ({ cfg, accountId, credentialValues, currentValue }) => {
|
|
585
|
-
const resolvedAccount =
|
|
586
|
+
const resolvedAccount = inspectMattermostAccount({
|
|
587
|
+
cfg,
|
|
588
|
+
accountId
|
|
589
|
+
});
|
|
586
590
|
const tokenConfigured = Boolean(resolvedAccount.botToken?.trim()) || hasConfiguredSecretInput(resolvedAccount.config.botToken);
|
|
587
591
|
return Boolean(credentialValues.botToken) || !tokenConfigured || !currentValue;
|
|
588
592
|
},
|
|
@@ -598,7 +602,7 @@ const mattermostSetupWizard = {
|
|
|
598
602
|
};
|
|
599
603
|
//#endregion
|
|
600
604
|
//#region extensions/mattermost/src/channel.ts
|
|
601
|
-
const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-
|
|
605
|
+
const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-E2B5dNrh.mjs"));
|
|
602
606
|
const MATTERMOST_PRESENTATION_CAPABILITIES = {
|
|
603
607
|
supported: true,
|
|
604
608
|
buttons: true,
|
|
@@ -633,19 +637,25 @@ const mattermostSecurityAdapter = createRestrictSendersChannelSecurity({
|
|
|
633
637
|
findingTitle: "Mattermost security warning",
|
|
634
638
|
policyPathSuffix: "dmPolicy",
|
|
635
639
|
classifyEntryAuthentication: identityEntryAuthenticationClassifier(mattermostIngressIdentity),
|
|
636
|
-
normalizeDmEntry:
|
|
640
|
+
normalizeDmEntry: normalizeMattermostAllowEntry
|
|
637
641
|
});
|
|
638
|
-
function
|
|
639
|
-
|
|
642
|
+
function listEnabledMattermostAccounts({ cfg, accountId }) {
|
|
643
|
+
return (accountId ? [inspectMattermostAccount({
|
|
640
644
|
cfg,
|
|
641
645
|
accountId
|
|
642
646
|
})] : listMattermostAccountIds(cfg).map((listedAccountId) => inspectMattermostAccount({
|
|
643
647
|
cfg,
|
|
644
648
|
accountId: listedAccountId
|
|
645
|
-
}))).filter((account) => account.enabled
|
|
649
|
+
}))).filter((account) => account.enabled && account.botToken?.trim() && account.baseUrl?.trim());
|
|
650
|
+
}
|
|
651
|
+
function describeMattermostMessageTool({ cfg, accountId }) {
|
|
652
|
+
const enabledAccounts = listEnabledMattermostAccounts({
|
|
653
|
+
cfg,
|
|
654
|
+
accountId
|
|
655
|
+
});
|
|
646
656
|
const actions = [];
|
|
647
657
|
if (enabledAccounts.length > 0) actions.push("send");
|
|
648
|
-
const actionsConfig = cfg.channels?.mattermost?.actions;
|
|
658
|
+
const actionsConfig = (cfg.channels?.mattermost)?.actions;
|
|
649
659
|
const baseMessages = actionsConfig?.messages;
|
|
650
660
|
const baseReactions = actionsConfig?.reactions;
|
|
651
661
|
if (enabledAccounts.some((account) => {
|
|
@@ -657,15 +667,6 @@ function describeMattermostMessageTool({ cfg, accountId }) {
|
|
|
657
667
|
capabilities: enabledAccounts.length > 0 ? ["presentation"] : []
|
|
658
668
|
};
|
|
659
669
|
}
|
|
660
|
-
function hasConfiguredMattermostDirectoryAccount({ cfg, accountId }) {
|
|
661
|
-
return (accountId ? [inspectMattermostAccount({
|
|
662
|
-
cfg,
|
|
663
|
-
accountId
|
|
664
|
-
})] : listMattermostAccountIds(cfg).map((listedAccountId) => inspectMattermostAccount({
|
|
665
|
-
cfg,
|
|
666
|
-
accountId: listedAccountId
|
|
667
|
-
}))).some((account) => Boolean(account.enabled && account.botToken?.trim() && account.baseUrl?.trim()));
|
|
668
|
-
}
|
|
669
670
|
function extractMattermostToolSend(args) {
|
|
670
671
|
if (normalizeOptionalString(args.action) !== "send") return null;
|
|
671
672
|
const to = normalizeOptionalString(args.to) ?? normalizeOptionalString(args.target);
|
|
@@ -684,7 +685,7 @@ function resolveMattermostAutoThreadId(params) {
|
|
|
684
685
|
const replyToId = normalizeOptionalString(params.replyToId);
|
|
685
686
|
const context = params.toolContext;
|
|
686
687
|
const currentThreadId = normalizeOptionalString(context?.currentThreadTs);
|
|
687
|
-
const currentMessageId =
|
|
688
|
+
const currentMessageId = normalizeMattermostThreadId(context?.currentMessageId);
|
|
688
689
|
const currentTarget = normalizeMattermostThreadTarget(context?.currentChannelId);
|
|
689
690
|
if (currentThreadId && currentTarget === normalizeMattermostThreadTarget(params.to)) {
|
|
690
691
|
if (replyToId === currentMessageId) return currentThreadId;
|
|
@@ -729,11 +730,11 @@ function buildMattermostThreadingToolContext(params) {
|
|
|
729
730
|
};
|
|
730
731
|
}
|
|
731
732
|
async function listMattermostDirectoryGroups(params) {
|
|
732
|
-
if (
|
|
733
|
+
if (listEnabledMattermostAccounts(params).length === 0) return [];
|
|
733
734
|
return (await loadMattermostChannelRuntime()).listMattermostDirectoryGroups(params);
|
|
734
735
|
}
|
|
735
736
|
async function listMattermostDirectoryPeers(params) {
|
|
736
|
-
if (
|
|
737
|
+
if (listEnabledMattermostAccounts(params).length === 0) return [];
|
|
737
738
|
return (await loadMattermostChannelRuntime()).listMattermostDirectoryPeers(params);
|
|
738
739
|
}
|
|
739
740
|
const mattermostMessageActions = {
|
|
@@ -761,19 +762,18 @@ const mattermostMessageActions = {
|
|
|
761
762
|
} } : {}
|
|
762
763
|
};
|
|
763
764
|
},
|
|
764
|
-
supportsAction: ({ action }) =>
|
|
765
|
-
return action === "react" || action === "read";
|
|
766
|
-
},
|
|
765
|
+
supportsAction: ({ action }) => action === "react" || action === "read",
|
|
767
766
|
handleAction: async ({ action, params, cfg, accountId, conversationReadOrigin, requesterAccountId, toolContext }) => {
|
|
767
|
+
if (action !== "read" && action !== "react") throw new Error(`Unsupported Mattermost action: ${action}`);
|
|
768
|
+
const resolvedAccountId = accountId ?? resolveDefaultMattermostAccountId(cfg);
|
|
769
|
+
const account = resolveMattermostAccount({
|
|
770
|
+
cfg,
|
|
771
|
+
accountId: resolvedAccountId
|
|
772
|
+
});
|
|
773
|
+
if (!account.enabled) throw new Error(`Mattermost account "${resolvedAccountId}" is disabled`);
|
|
774
|
+
const actionsConfig = (cfg.channels?.mattermost)?.actions;
|
|
768
775
|
if (action === "read") {
|
|
769
|
-
|
|
770
|
-
const mattermostConfig = cfg.channels?.mattermost;
|
|
771
|
-
const account = resolveMattermostAccount({
|
|
772
|
-
cfg,
|
|
773
|
-
accountId: resolvedAccountId
|
|
774
|
-
});
|
|
775
|
-
if (!account.enabled) throw new Error(`Mattermost account "${resolvedAccountId}" is disabled`);
|
|
776
|
-
if (!(account.config.actions?.messages ?? mattermostConfig?.actions?.messages ?? false)) throw new Error("Mattermost message reads are disabled in config");
|
|
776
|
+
if (!(account.config.actions?.messages ?? actionsConfig?.messages ?? false)) throw new Error("Mattermost message reads are disabled in config");
|
|
777
777
|
const rawTarget = readStringParam(params, "to") ?? readStringParam(params, "channelId") ?? readStringParam(params, "target");
|
|
778
778
|
if (!rawTarget) throw new Error("Mattermost read requires target, to, or channelId.");
|
|
779
779
|
const normalizedTarget = normalizeMattermostMessagingTarget(rawTarget);
|
|
@@ -802,36 +802,26 @@ const mattermostMessageActions = {
|
|
|
802
802
|
hasMore: result.hasMore
|
|
803
803
|
});
|
|
804
804
|
}
|
|
805
|
-
if (
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
if (!result.ok) throw new Error(result.error);
|
|
826
|
-
return {
|
|
827
|
-
content: [{
|
|
828
|
-
type: "text",
|
|
829
|
-
text: remove ? `Removed reaction :${emojiName}: from ${postId}` : `Reacted with :${emojiName}: on ${postId}`
|
|
830
|
-
}],
|
|
831
|
-
details: {}
|
|
832
|
-
};
|
|
833
|
-
}
|
|
834
|
-
throw new Error(`Unsupported Mattermost action: ${action}`);
|
|
805
|
+
if (!(account.config.actions?.reactions ?? actionsConfig?.reactions ?? true)) throw new Error("Mattermost reactions are disabled in config");
|
|
806
|
+
const { postId, emojiName, remove } = parseMattermostReactActionParams(params);
|
|
807
|
+
const authorizedTarget = normalizeOptionalString(params.to);
|
|
808
|
+
const runtime = await loadMattermostChannelRuntime();
|
|
809
|
+
const result = await (remove ? runtime.removeMattermostReaction : runtime.addMattermostReaction)({
|
|
810
|
+
cfg,
|
|
811
|
+
postId,
|
|
812
|
+
emojiName,
|
|
813
|
+
accountId: resolvedAccountId,
|
|
814
|
+
authorizedTarget,
|
|
815
|
+
conversationReadOrigin
|
|
816
|
+
});
|
|
817
|
+
if (!result.ok) throw new Error(result.error);
|
|
818
|
+
return {
|
|
819
|
+
content: [{
|
|
820
|
+
type: "text",
|
|
821
|
+
text: remove ? `Removed reaction :${emojiName}: from ${postId}` : `Reacted with :${emojiName}: on ${postId}`
|
|
822
|
+
}],
|
|
823
|
+
details: {}
|
|
824
|
+
};
|
|
835
825
|
}
|
|
836
826
|
};
|
|
837
827
|
function parseMattermostReactActionParams(params) {
|
|
@@ -868,20 +858,22 @@ function resolveMattermostSendAttachmentMedia(params) {
|
|
|
868
858
|
if (mediaUrls.length > 1) throw new Error("Mattermost send supports one attachment per message; split multiple mediaUrls or attachments[] entries into separate sends.");
|
|
869
859
|
return mediaUrls[0];
|
|
870
860
|
}
|
|
871
|
-
function
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
861
|
+
async function sendMattermostMedia(ctx, content = ctx) {
|
|
862
|
+
return toMattermostOutboundResult(await (await loadMattermostChannelRuntime()).sendMessageMattermost(ctx.to, content.text, {
|
|
863
|
+
cfg: ctx.cfg,
|
|
864
|
+
accountId: ctx.accountId ?? void 0,
|
|
865
|
+
mediaUrl: content.mediaUrl,
|
|
866
|
+
mediaLocalRoots: ctx.mediaLocalRoots ?? ctx.mediaAccess?.localRoots,
|
|
867
|
+
mediaReadFile: ctx.mediaReadFile ?? ctx.mediaAccess?.readFile,
|
|
868
|
+
...ctx.mediaAccess?.workspaceDir ? { workspaceDir: ctx.mediaAccess.workspaceDir } : {},
|
|
869
|
+
requireMediaUpload: requiresMattermostMediaUpload(content.mediaUrl) ? true : void 0,
|
|
870
|
+
replyToId: ctx.replyToId ?? (ctx.threadId != null ? String(ctx.threadId) : void 0),
|
|
871
|
+
...content.buttons?.length ? { buttons: content.buttons } : {},
|
|
872
|
+
...content.attachmentText !== void 0 ? { attachmentText: content.attachmentText } : {},
|
|
873
|
+
assertDirectAdapterHandoff: ctx.assertDirectAdapterHandoff,
|
|
874
|
+
onPlatformSendDispatch: ctx.onPlatformSendDispatch,
|
|
875
|
+
onDeliveryResult: createMattermostDeliveryProgressReporter(ctx.onDeliveryResult)
|
|
876
|
+
}));
|
|
885
877
|
}
|
|
886
878
|
const mattermostOutbound = {
|
|
887
879
|
deliveryMode: "direct",
|
|
@@ -927,20 +919,13 @@ const mattermostOutbound = {
|
|
|
927
919
|
...ctx.payload,
|
|
928
920
|
mediaUrl: ctx.payload.mediaUrl ?? ctx.mediaUrl
|
|
929
921
|
}).map((url) => url.trim()).find(Boolean);
|
|
930
|
-
const result = await (
|
|
931
|
-
|
|
932
|
-
accountId: ctx.accountId ?? void 0,
|
|
922
|
+
const result = await sendMattermostMedia(ctx, {
|
|
923
|
+
text: ctx.payload.text ?? ctx.text,
|
|
933
924
|
mediaUrl,
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
...ctx.mediaAccess?.workspaceDir ? { workspaceDir: ctx.mediaAccess.workspaceDir } : {},
|
|
937
|
-
requireMediaUpload: requiresMattermostMediaUpload(mediaUrl) ? true : void 0,
|
|
938
|
-
replyToId: ctx.replyToId ?? (ctx.threadId != null ? String(ctx.threadId) : void 0),
|
|
939
|
-
buttons: buttons?.length ? buttons : void 0,
|
|
940
|
-
attachmentText,
|
|
941
|
-
onDeliveryResult: createMattermostDeliveryProgressReporter(ctx.onDeliveryResult)
|
|
925
|
+
buttons,
|
|
926
|
+
attachmentText
|
|
942
927
|
});
|
|
943
|
-
return attachChannelToResult("mattermost",
|
|
928
|
+
return attachChannelToResult("mattermost", result);
|
|
944
929
|
}
|
|
945
930
|
return await sendTextMediaPayload({
|
|
946
931
|
channel: "mattermost",
|
|
@@ -961,23 +946,15 @@ const mattermostOutbound = {
|
|
|
961
946
|
},
|
|
962
947
|
...createAttachedChannelResultAdapter({
|
|
963
948
|
channel: "mattermost",
|
|
964
|
-
sendText: async (
|
|
965
|
-
cfg,
|
|
966
|
-
accountId: accountId ?? void 0,
|
|
967
|
-
replyToId: replyToId ?? (threadId != null ? String(threadId) : void 0),
|
|
968
|
-
|
|
949
|
+
sendText: async (ctx) => toMattermostOutboundResult(await (await loadMattermostChannelRuntime()).sendMessageMattermost(ctx.to, ctx.text, {
|
|
950
|
+
cfg: ctx.cfg,
|
|
951
|
+
accountId: ctx.accountId ?? void 0,
|
|
952
|
+
replyToId: ctx.replyToId ?? (ctx.threadId != null ? String(ctx.threadId) : void 0),
|
|
953
|
+
assertDirectAdapterHandoff: ctx.assertDirectAdapterHandoff,
|
|
954
|
+
onPlatformSendDispatch: ctx.onPlatformSendDispatch,
|
|
955
|
+
onDeliveryResult: createMattermostDeliveryProgressReporter(ctx.onDeliveryResult)
|
|
969
956
|
})),
|
|
970
|
-
sendMedia:
|
|
971
|
-
cfg,
|
|
972
|
-
accountId: accountId ?? void 0,
|
|
973
|
-
mediaUrl,
|
|
974
|
-
mediaLocalRoots: mediaLocalRoots ?? mediaAccess?.localRoots,
|
|
975
|
-
mediaReadFile: mediaReadFile ?? mediaAccess?.readFile,
|
|
976
|
-
...mediaAccess?.workspaceDir ? { workspaceDir: mediaAccess.workspaceDir } : {},
|
|
977
|
-
requireMediaUpload: requiresMattermostMediaUpload(mediaUrl) ? true : void 0,
|
|
978
|
-
replyToId: replyToId ?? (threadId != null ? String(threadId) : void 0),
|
|
979
|
-
onDeliveryResult: createMattermostDeliveryProgressReporter(onDeliveryResult)
|
|
980
|
-
}))
|
|
957
|
+
sendMedia: sendMattermostMedia
|
|
981
958
|
})
|
|
982
959
|
};
|
|
983
960
|
const mattermostMessageAdapter = createChannelMessageAdapterFromOutbound({
|
|
@@ -1067,7 +1044,7 @@ const mattermostPlugin = createChatChannelPlugin({
|
|
|
1067
1044
|
threadId: child
|
|
1068
1045
|
} : { to: normalizeMattermostMessagingTarget(`channel:${child}`) };
|
|
1069
1046
|
},
|
|
1070
|
-
resolveOutboundSessionRoute:
|
|
1047
|
+
resolveOutboundSessionRoute: resolveMattermostOutboundSessionRoute,
|
|
1071
1048
|
targetResolver: {
|
|
1072
1049
|
looksLikeId: looksLikeMattermostTargetId,
|
|
1073
1050
|
hint: "<channelId|user:ID|channel:ID>",
|
|
@@ -1087,7 +1064,7 @@ const mattermostPlugin = createChatChannelPlugin({
|
|
|
1087
1064
|
}
|
|
1088
1065
|
},
|
|
1089
1066
|
status: createComputedAccountStatusAdapter({
|
|
1090
|
-
defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID
|
|
1067
|
+
defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID, {
|
|
1091
1068
|
connected: false,
|
|
1092
1069
|
lastConnectedAt: null,
|
|
1093
1070
|
lastDisconnect: null
|
|
@@ -1135,7 +1112,7 @@ const mattermostPlugin = createChatChannelPlugin({
|
|
|
1135
1112
|
botTokenSource: account.botTokenSource
|
|
1136
1113
|
});
|
|
1137
1114
|
ctx.log?.info(`[${account.accountId}] starting channel`);
|
|
1138
|
-
return (await
|
|
1115
|
+
return (await import("./monitor-BZyzPkkb.mjs")).monitorMattermostProvider({
|
|
1139
1116
|
botToken: account.botToken ?? void 0,
|
|
1140
1117
|
baseUrl: account.baseUrl ?? void 0,
|
|
1141
1118
|
accountId: account.accountId,
|
|
@@ -1150,11 +1127,11 @@ const mattermostPlugin = createChatChannelPlugin({
|
|
|
1150
1127
|
pairing: { text: {
|
|
1151
1128
|
idLabel: "mattermostUserId",
|
|
1152
1129
|
message: "OpenClaw: your access has been approved.",
|
|
1153
|
-
normalizeAllowEntry:
|
|
1130
|
+
normalizeAllowEntry: normalizeMattermostAllowEntry,
|
|
1154
1131
|
notify: createLoggedPairingApprovalNotifier(({ id }) => `[mattermost] User ${id} approved for pairing`)
|
|
1155
1132
|
} },
|
|
1156
1133
|
threading: {
|
|
1157
|
-
buildToolContext:
|
|
1134
|
+
buildToolContext: buildMattermostThreadingToolContext,
|
|
1158
1135
|
scopedAccountReplyToMode: {
|
|
1159
1136
|
resolveAccount: (cfg, accountId) => resolveMattermostAccount({
|
|
1160
1137
|
cfg,
|
|
@@ -1162,15 +1139,8 @@ const mattermostPlugin = createChatChannelPlugin({
|
|
|
1162
1139
|
}),
|
|
1163
1140
|
resolveReplyToMode: (account, chatType) => resolveMattermostReplyToMode(account, chatType === "direct" || chatType === "group" || chatType === "channel" ? chatType : "channel")
|
|
1164
1141
|
},
|
|
1165
|
-
resolveAutoThreadId:
|
|
1166
|
-
|
|
1167
|
-
replyToId,
|
|
1168
|
-
toolContext
|
|
1169
|
-
}),
|
|
1170
|
-
matchesToolContextTarget: ({ target, toolContext }) => matchesMattermostToolContextTarget({
|
|
1171
|
-
target,
|
|
1172
|
-
toolContext
|
|
1173
|
-
}),
|
|
1142
|
+
resolveAutoThreadId: resolveMattermostAutoThreadId,
|
|
1143
|
+
matchesToolContextTarget: matchesMattermostToolContextTarget,
|
|
1174
1144
|
resolveReplyTransport: ({ threadId, replyToId, replyToIsExplicit, replyDelivery }) => {
|
|
1175
1145
|
const ambientThreadId = threadId != null ? String(threadId) : void 0;
|
|
1176
1146
|
const isFlatDirect = replyDelivery?.chatType === "direct" && replyDelivery.replyToMode === "off";
|