@openclaw/feishu 2026.9.5 → 2026.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{channel-C1KrXXJa.mjs → channel-DsndN1sp.mjs} +3 -3
- package/dist/.setup/{channel.runtime-Bizuv7WZ.mjs → channel.runtime-tihKUwVI.mjs} +3 -3
- package/dist/.setup/{chat-dWJYS63b.mjs → chat-BlvUjdN9.mjs} +1 -1
- package/dist/.setup/{monitor-C69OLzgO.mjs → monitor-OTT7VckU.mjs} +4 -3
- package/dist/.setup/{monitor.account-zwHb3HKM.mjs → monitor.account-D5j6WomE.mjs} +233 -79
- package/dist/.setup/{reply-delivery-result-DFjxGLgX.mjs → reply-delivery-result-CRIHpSze.mjs} +9 -4
- package/dist/.setup/{setup-api-CTRwX09n.mjs → setup-api-VAUkwtTi.mjs} +1 -1
- package/dist/api.js +4 -4
- package/dist/channel-plugin-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts +13 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts.map +1 -1
- package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.js +35 -16
- package/node_modules/micromark-extension-gfm-table/dev/lib/html.js +5 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.js +26 -3
- package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts +13 -0
- package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts.map +1 -1
- package/node_modules/micromark-extension-gfm-table/lib/edit-map.js +37 -17
- package/node_modules/micromark-extension-gfm-table/lib/html.js +5 -0
- package/node_modules/micromark-extension-gfm-table/lib/syntax.js +29 -2
- package/node_modules/micromark-extension-gfm-table/package.json +6 -48
- package/node_modules/micromark-extension-gfm-table/readme.md +40 -40
- package/node_modules/zod/README.md +2 -2
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +44 -28
- package/node_modules/zod/src/v4/core/checks.ts +62 -102
- package/node_modules/zod/src/v4/core/compile.ts +218 -93
- package/node_modules/zod/src/v4/core/core.ts +1 -3
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
- package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +14 -4
- package/node_modules/zod/src/v4/core/schemas.ts +296 -132
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
- package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
- package/node_modules/zod/src/v4/core/util.ts +218 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/ar.ts +2 -0
- package/node_modules/zod/src/v4/locales/az.ts +2 -0
- package/node_modules/zod/src/v4/locales/be.ts +2 -0
- package/node_modules/zod/src/v4/locales/bg.ts +2 -0
- package/node_modules/zod/src/v4/locales/bn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ca.ts +2 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
- package/node_modules/zod/src/v4/locales/cs.ts +2 -0
- package/node_modules/zod/src/v4/locales/da.ts +2 -0
- package/node_modules/zod/src/v4/locales/de.ts +2 -0
- package/node_modules/zod/src/v4/locales/el.ts +2 -0
- package/node_modules/zod/src/v4/locales/en.ts +2 -0
- package/node_modules/zod/src/v4/locales/eo.ts +2 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +2 -0
- package/node_modules/zod/src/v4/locales/fi.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr.ts +2 -0
- package/node_modules/zod/src/v4/locales/gu.ts +2 -0
- package/node_modules/zod/src/v4/locales/he.ts +2 -0
- package/node_modules/zod/src/v4/locales/hi.ts +2 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +2 -0
- package/node_modules/zod/src/v4/locales/hy.ts +2 -0
- package/node_modules/zod/src/v4/locales/id.ts +2 -0
- package/node_modules/zod/src/v4/locales/index.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +2 -0
- package/node_modules/zod/src/v4/locales/it.ts +2 -0
- package/node_modules/zod/src/v4/locales/ja.ts +2 -0
- package/node_modules/zod/src/v4/locales/ka.ts +2 -0
- package/node_modules/zod/src/v4/locales/km.ts +2 -0
- package/node_modules/zod/src/v4/locales/kn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ko.ts +2 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ms.ts +2 -0
- package/node_modules/zod/src/v4/locales/ne.ts +2 -0
- package/node_modules/zod/src/v4/locales/nl.ts +2 -0
- package/node_modules/zod/src/v4/locales/nn.ts +2 -0
- package/node_modules/zod/src/v4/locales/no.ts +2 -0
- package/node_modules/zod/src/v4/locales/ota.ts +2 -0
- package/node_modules/zod/src/v4/locales/pl.ts +2 -0
- package/node_modules/zod/src/v4/locales/ps.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt.ts +2 -0
- package/node_modules/zod/src/v4/locales/ro.ts +2 -0
- package/node_modules/zod/src/v4/locales/ru.ts +2 -0
- package/node_modules/zod/src/v4/locales/sk.ts +2 -0
- package/node_modules/zod/src/v4/locales/sl.ts +2 -0
- package/node_modules/zod/src/v4/locales/sv.ts +2 -0
- package/node_modules/zod/src/v4/locales/ta.ts +2 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +2 -0
- package/node_modules/zod/src/v4/locales/tk.ts +2 -0
- package/node_modules/zod/src/v4/locales/tr.ts +2 -0
- package/node_modules/zod/src/v4/locales/uk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ur.ts +2 -0
- package/node_modules/zod/src/v4/locales/uz.ts +2 -0
- package/node_modules/zod/src/v4/locales/vi.ts +2 -0
- package/node_modules/zod/src/v4/locales/yo.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +19 -0
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -35
- package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -33
- package/node_modules/zod/v4/core/api.cjs +45 -22
- package/node_modules/zod/v4/core/api.d.cts +12 -6
- package/node_modules/zod/v4/core/api.d.ts +12 -6
- package/node_modules/zod/v4/core/api.js +25 -22
- package/node_modules/zod/v4/core/checks.cjs +51 -97
- package/node_modules/zod/v4/core/checks.d.cts +17 -1
- package/node_modules/zod/v4/core/checks.d.ts +17 -1
- package/node_modules/zod/v4/core/checks.js +31 -96
- package/node_modules/zod/v4/core/compile.cjs +173 -78
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +154 -79
- package/node_modules/zod/v4/core/core.cjs +20 -1
- package/node_modules/zod/v4/core/core.js +1 -1
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +111 -23
- package/node_modules/zod/v4/core/memoizer.js +69 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +31 -6
- package/node_modules/zod/v4/core/regexes.d.cts +3 -0
- package/node_modules/zod/v4/core/regexes.d.ts +3 -0
- package/node_modules/zod/v4/core/regexes.js +10 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +302 -114
- package/node_modules/zod/v4/core/schemas.d.cts +28 -8
- package/node_modules/zod/v4/core/schemas.d.ts +28 -8
- package/node_modules/zod/v4/core/schemas.js +279 -113
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.js +7 -6
- package/node_modules/zod/v4/core/util.cjs +177 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +156 -143
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +19 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- package/node_modules/zod/v4/locales/ar.cjs +2 -0
- package/node_modules/zod/v4/locales/ar.js +2 -0
- package/node_modules/zod/v4/locales/az.cjs +2 -0
- package/node_modules/zod/v4/locales/az.js +2 -0
- package/node_modules/zod/v4/locales/be.cjs +2 -0
- package/node_modules/zod/v4/locales/be.js +2 -0
- package/node_modules/zod/v4/locales/bg.cjs +2 -0
- package/node_modules/zod/v4/locales/bg.js +2 -0
- package/node_modules/zod/v4/locales/bn.cjs +2 -0
- package/node_modules/zod/v4/locales/bn.js +2 -0
- package/node_modules/zod/v4/locales/ca.cjs +2 -0
- package/node_modules/zod/v4/locales/ca.js +2 -0
- package/node_modules/zod/v4/locales/ckb.cjs +2 -0
- package/node_modules/zod/v4/locales/ckb.js +2 -0
- package/node_modules/zod/v4/locales/cs.cjs +2 -0
- package/node_modules/zod/v4/locales/cs.js +2 -0
- package/node_modules/zod/v4/locales/da.cjs +2 -0
- package/node_modules/zod/v4/locales/da.js +2 -0
- package/node_modules/zod/v4/locales/de.cjs +2 -0
- package/node_modules/zod/v4/locales/de.js +2 -0
- package/node_modules/zod/v4/locales/el.cjs +2 -0
- package/node_modules/zod/v4/locales/el.js +2 -0
- package/node_modules/zod/v4/locales/en.cjs +2 -0
- package/node_modules/zod/v4/locales/en.js +2 -0
- package/node_modules/zod/v4/locales/eo.cjs +2 -0
- package/node_modules/zod/v4/locales/eo.js +2 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +2 -0
- package/node_modules/zod/v4/locales/fa.js +2 -0
- package/node_modules/zod/v4/locales/fi.cjs +2 -0
- package/node_modules/zod/v4/locales/fi.js +2 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
- package/node_modules/zod/v4/locales/fr-CA.js +2 -0
- package/node_modules/zod/v4/locales/fr.cjs +2 -0
- package/node_modules/zod/v4/locales/fr.js +2 -0
- package/node_modules/zod/v4/locales/gu.cjs +2 -0
- package/node_modules/zod/v4/locales/gu.js +2 -0
- package/node_modules/zod/v4/locales/he.cjs +2 -0
- package/node_modules/zod/v4/locales/he.js +2 -0
- package/node_modules/zod/v4/locales/hi.cjs +2 -0
- package/node_modules/zod/v4/locales/hi.js +2 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +2 -0
- package/node_modules/zod/v4/locales/hu.js +2 -0
- package/node_modules/zod/v4/locales/hy.cjs +2 -0
- package/node_modules/zod/v4/locales/hy.js +2 -0
- package/node_modules/zod/v4/locales/id.cjs +2 -0
- package/node_modules/zod/v4/locales/id.js +2 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +2 -0
- package/node_modules/zod/v4/locales/is.js +2 -0
- package/node_modules/zod/v4/locales/it.cjs +2 -0
- package/node_modules/zod/v4/locales/it.js +2 -0
- package/node_modules/zod/v4/locales/ja.cjs +2 -0
- package/node_modules/zod/v4/locales/ja.js +2 -0
- package/node_modules/zod/v4/locales/ka.cjs +2 -0
- package/node_modules/zod/v4/locales/ka.js +2 -0
- package/node_modules/zod/v4/locales/km.cjs +2 -0
- package/node_modules/zod/v4/locales/km.js +2 -0
- package/node_modules/zod/v4/locales/kn.cjs +2 -0
- package/node_modules/zod/v4/locales/kn.js +2 -0
- package/node_modules/zod/v4/locales/ko.cjs +2 -0
- package/node_modules/zod/v4/locales/ko.js +2 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +2 -0
- package/node_modules/zod/v4/locales/mk.js +2 -0
- package/node_modules/zod/v4/locales/ms.cjs +2 -0
- package/node_modules/zod/v4/locales/ms.js +2 -0
- package/node_modules/zod/v4/locales/ne.cjs +2 -0
- package/node_modules/zod/v4/locales/ne.js +2 -0
- package/node_modules/zod/v4/locales/nl.cjs +2 -0
- package/node_modules/zod/v4/locales/nl.js +2 -0
- package/node_modules/zod/v4/locales/nn.cjs +2 -0
- package/node_modules/zod/v4/locales/nn.js +2 -0
- package/node_modules/zod/v4/locales/no.cjs +2 -0
- package/node_modules/zod/v4/locales/no.js +2 -0
- package/node_modules/zod/v4/locales/ota.cjs +2 -0
- package/node_modules/zod/v4/locales/ota.js +2 -0
- package/node_modules/zod/v4/locales/pl.cjs +2 -0
- package/node_modules/zod/v4/locales/pl.js +2 -0
- package/node_modules/zod/v4/locales/ps.cjs +2 -0
- package/node_modules/zod/v4/locales/ps.js +2 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
- package/node_modules/zod/v4/locales/pt-BR.js +2 -0
- package/node_modules/zod/v4/locales/pt.cjs +2 -0
- package/node_modules/zod/v4/locales/pt.js +2 -0
- package/node_modules/zod/v4/locales/ro.cjs +2 -0
- package/node_modules/zod/v4/locales/ro.js +2 -0
- package/node_modules/zod/v4/locales/ru.cjs +2 -0
- package/node_modules/zod/v4/locales/ru.js +2 -0
- package/node_modules/zod/v4/locales/sk.cjs +2 -0
- package/node_modules/zod/v4/locales/sk.js +2 -0
- package/node_modules/zod/v4/locales/sl.cjs +2 -0
- package/node_modules/zod/v4/locales/sl.js +2 -0
- package/node_modules/zod/v4/locales/sv.cjs +2 -0
- package/node_modules/zod/v4/locales/sv.js +2 -0
- package/node_modules/zod/v4/locales/ta.cjs +2 -0
- package/node_modules/zod/v4/locales/ta.js +2 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +2 -0
- package/node_modules/zod/v4/locales/th.js +2 -0
- package/node_modules/zod/v4/locales/tk.cjs +2 -0
- package/node_modules/zod/v4/locales/tk.js +2 -0
- package/node_modules/zod/v4/locales/tr.cjs +2 -0
- package/node_modules/zod/v4/locales/tr.js +2 -0
- package/node_modules/zod/v4/locales/uk.cjs +2 -0
- package/node_modules/zod/v4/locales/uk.js +2 -0
- package/node_modules/zod/v4/locales/ur.cjs +2 -0
- package/node_modules/zod/v4/locales/ur.js +2 -0
- package/node_modules/zod/v4/locales/uz.cjs +2 -0
- package/node_modules/zod/v4/locales/uz.js +2 -0
- package/node_modules/zod/v4/locales/vi.cjs +2 -0
- package/node_modules/zod/v4/locales/vi.js +2 -0
- package/node_modules/zod/v4/locales/yo.cjs +2 -0
- package/node_modules/zod/v4/locales/yo.js +2 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-CN.js +2 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-TW.js +2 -0
- package/node_modules/zod/v4/mini/checks.cjs +19 -0
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +44 -8
- package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
- package/node_modules/zod/v4/mini/schemas.js +21 -6
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +6 -6
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { o as resolveFeishuAccount, s as resolveFeishuRuntimeAccount } from "./accounts-DmU0xYPx.mjs";
|
|
2
2
|
import { o as resolveConfiguredFeishuGroupSessionScope, t as buildFeishuConversationId, u as resolveReceiveIdType } from "./conversation-id-H-lUayji.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { A as sendMessageFeishu, At as normalizeFeishuChatType, B as parsePostContent, Ct as normalizeFeishuAllowEntry, D as getMessageFeishu, Dt as resolveFeishuGroupSenderActivationIngressAccess, Et as resolveFeishuGroupConversationIngressAccess, F as isFeishuBroadcastMention, Ft as decodeFeishuCardAction, G as deliverCommentThreadText, H as buildFeishuMediaFallbackText, I as isMentionForwardRequest, L as isFeishuGroupChatType, N as formatFeishuMediaContent, Nt as buildFeishuCardActionTextFallback, O as listFeishuThreadMessages, P as extractMentionTargets, Pt as createFeishuCardInteractionEnvelope, R as normalizeFeishuEventChatType, S as sendMediaFeishu, St as hasExplicitFeishuGroupConfig, T as chunkFeishuCardMarkdown, Tt as resolveFeishuGroupConfig, U as resolveFeishuIdentityEmoji, a as shouldSendNoVisibleReplyFallback, at as requestFeishuApi, b as withinCardTableLimit, d as consumeFeishuPresentationFallbackMarker, et as createCommentTypingReactionLifecycle, ft as chunkFeishuPostMarkdown, i as noVisibleFeishuReplyDelivery, it as parseCommentContentElements, j as sendStructuredCardFeishu, jt as resolveFeishuChatType, k as sendCardFeishu, kt as resolveFeishuReplyPolicy, n as createFeishuReplyDeliveryResult, nt as extractReplyText, ot as buildFeishuCommentTarget, pt as materializeFeishuPostMarkdownSoftBreaks, r as mergeFeishuReplyDeliveryResults, st as normalizeCommentFileType, t as createFeishuPartialReplyDeliveryError, tt as encodeQuery, u as buildFeishuPresentationFallback, ut as resolveFeishuCardTemplate, v as renderFeishuReplyPayload, w as shouldSuppressFeishuTextForVoiceMedia, wt as resolveFeishuDmIngressAccess, x as saveMessageResourceFeishu, y as resolveFeishuRichReply, z as parseInteractiveCardContent } from "./reply-delivery-result-CRIHpSze.mjs";
|
|
4
4
|
import { a as normalizeFeishuWebhookPath, o as normalizeFeishuExternalKey } from "./doctor-contract-w6FpMypv.mjs";
|
|
5
|
-
import { a as getFeishuUserAgent, f as resolveConfiguredHttpTimeoutMs, i as createFeishuWSClient, n as createEventDispatcher, r as createFeishuClient } from "./client-DCwNVFZg.mjs";
|
|
6
5
|
import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.mjs";
|
|
7
|
-
import { r as
|
|
6
|
+
import { a as getFeishuUserAgent, f as resolveConfiguredHttpTimeoutMs, i as createFeishuWSClient, n as createEventDispatcher, r as createFeishuClient } from "./client-DCwNVFZg.mjs";
|
|
7
|
+
import { r as getChatInfo } from "./chat-BlvUjdN9.mjs";
|
|
8
8
|
import { t as createFeishuThreadBindingManager } from "./thread-bindings-BiL1wGqK.mjs";
|
|
9
9
|
import { evaluateSupplementalContextVisibility, normalizeAgentId as normalizeAgentId$1, resolveChannelContextVisibilityMode } from "../runtime-api.js";
|
|
10
10
|
import { t as readFeishuJsonResponse } from "./json-response-DXajw_FU.mjs";
|
|
11
11
|
import { a as waitForAbortableDelay, i as raceWithTimeoutAndAbort } from "./probe-bdidyhAn.mjs";
|
|
12
|
-
import { t as fetchBotIdentityForMonitor } from "./monitor-
|
|
12
|
+
import { t as fetchBotIdentityForMonitor } from "./monitor-OTT7VckU.mjs";
|
|
13
13
|
import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
14
|
-
import { DEFAULT_INGRESS_ADOPTION_STALL_MS, bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor, createChannelMessageReplyPipeline, createReplyPrefixContext, formatChannelProgressDraftLineForEntry,
|
|
14
|
+
import { DEFAULT_INGRESS_ADOPTION_STALL_MS, bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor, createChannelMessageReplyPipeline, createReplyPrefixContext, formatChannelProgressDraftLineForEntry, resolveAgentOutboundIdentity, resolveChannelPreviewStreamMode, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
|
|
15
15
|
import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
|
|
16
16
|
import { ensureConfiguredBindingRouteReady, resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRoute } from "openclaw/plugin-sdk/conversation-runtime";
|
|
17
17
|
import { collectErrorGraphCandidates, formatErrorMessage, toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
|
|
18
|
-
import { asDateTimestampMs, isFutureDateTimestampMs, parseStrictNonNegativeInteger, resolveDateTimestampMs, resolveExpiresAtMsFromDurationMs, resolveExpiresAtMsFromDurationSeconds, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
18
|
+
import { asDateTimestampMs, isFutureDateTimestampMs, parseStrictNonNegativeInteger, resolveDateTimestampMs, resolveExpiresAtMsFromDurationMs, resolveExpiresAtMsFromDurationSeconds, resolvePromptHistoryLimit, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
19
19
|
import { asBoolean, asNullableRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeNullableString, normalizeOptionalLowercaseString, normalizeOptionalString, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
20
20
|
import { stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
|
|
21
21
|
import { resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
@@ -30,12 +30,13 @@ import { getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts, resolv
|
|
|
30
30
|
import { resolvePinnedMainDmOwnerFromAllowlist, safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
31
31
|
import * as Lark from "@larksuiteoapi/node-sdk";
|
|
32
32
|
import { isRecord as isRecord$1 } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
33
|
+
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
33
34
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
34
35
|
import { sliceUtf16Safe, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
35
36
|
import { WEBHOOK_ANOMALY_COUNTER_DEFAULTS, WEBHOOK_RATE_LIMIT_DEFAULTS, applyBasicWebhookRequestGuards, createFixedWindowRateLimiter, createWebhookAnomalyTracker, resolveRequestClientIp } from "openclaw/plugin-sdk/webhook-ingress";
|
|
36
37
|
import * as crypto$1 from "node:crypto";
|
|
37
38
|
import crypto, { createHash } from "node:crypto";
|
|
38
|
-
import {
|
|
39
|
+
import { createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
39
40
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
40
41
|
import { createChannelReplayGuard } from "openclaw/plugin-sdk/persistent-dedupe";
|
|
41
42
|
import { resolveChannelConfigWrites } from "openclaw/plugin-sdk/channel-config-writes";
|
|
@@ -82,7 +83,7 @@ function buildFeishuAgentBody(params) {
|
|
|
82
83
|
function createFeishuBroadcastIngressSettlement(params) {
|
|
83
84
|
const lanes = /* @__PURE__ */ new Set();
|
|
84
85
|
const failures = [];
|
|
85
|
-
const
|
|
86
|
+
const fallbackAbort = new AbortController();
|
|
86
87
|
let fanoutSettled = false;
|
|
87
88
|
let terminal;
|
|
88
89
|
let adoption;
|
|
@@ -90,6 +91,14 @@ function createFeishuBroadcastIngressSettlement(params) {
|
|
|
90
91
|
let finalizing = false;
|
|
91
92
|
let deferred = false;
|
|
92
93
|
let replayReleased = false;
|
|
94
|
+
let resolveSettlement;
|
|
95
|
+
const settlement = new Promise((resolve) => {
|
|
96
|
+
resolveSettlement = resolve;
|
|
97
|
+
});
|
|
98
|
+
params.trackTask?.(settlement);
|
|
99
|
+
const finishSettlement = () => {
|
|
100
|
+
if (![...lanes].some((lane) => lane.adopting)) resolveSettlement();
|
|
101
|
+
};
|
|
93
102
|
const beginFinalizing = () => {
|
|
94
103
|
if (finalizing) return;
|
|
95
104
|
finalizing = true;
|
|
@@ -117,6 +126,8 @@ function createFeishuBroadcastIngressSettlement(params) {
|
|
|
117
126
|
await params.lifecycle?.onAbandoned();
|
|
118
127
|
} finally {
|
|
119
128
|
terminal = "abandoned";
|
|
129
|
+
fallbackAbort.abort(error);
|
|
130
|
+
finishSettlement();
|
|
120
131
|
}
|
|
121
132
|
};
|
|
122
133
|
const abandon = async (error) => {
|
|
@@ -130,8 +141,8 @@ function createFeishuBroadcastIngressSettlement(params) {
|
|
|
130
141
|
await activeAbandonment;
|
|
131
142
|
};
|
|
132
143
|
const runAdoption = async () => {
|
|
133
|
-
beginFinalizing();
|
|
134
144
|
try {
|
|
145
|
+
beginFinalizing();
|
|
135
146
|
await params.lifecycle?.onAdopted();
|
|
136
147
|
terminal = "adopted";
|
|
137
148
|
try {
|
|
@@ -145,6 +156,8 @@ function createFeishuBroadcastIngressSettlement(params) {
|
|
|
145
156
|
} catch (error) {
|
|
146
157
|
await runAbandonment(error).catch(() => void 0);
|
|
147
158
|
throw error;
|
|
159
|
+
} finally {
|
|
160
|
+
finishSettlement();
|
|
148
161
|
}
|
|
149
162
|
};
|
|
150
163
|
const adopt = async () => {
|
|
@@ -178,18 +191,24 @@ function createFeishuBroadcastIngressSettlement(params) {
|
|
|
178
191
|
};
|
|
179
192
|
return {
|
|
180
193
|
lifecycle: {
|
|
181
|
-
abortSignal: params.lifecycle?.abortSignal ??
|
|
194
|
+
abortSignal: params.lifecycle?.abortSignal ?? fallbackAbort.signal,
|
|
182
195
|
onAdopted: async () => {
|
|
183
|
-
if (lane.status === "adopted" || lane.status === "completed" || lane.status === "failed" || lane.status === "abandoned") return;
|
|
196
|
+
if (terminal || lane.status === "adopted" || lane.status === "completed" || lane.status === "failed" || lane.status === "abandoned") return;
|
|
184
197
|
lane.status = "adopted";
|
|
185
|
-
|
|
198
|
+
lane.adopting = true;
|
|
186
199
|
try {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
200
|
+
beginFinalizing();
|
|
201
|
+
try {
|
|
202
|
+
await lane.replayClaim?.commit();
|
|
203
|
+
} catch (error) {
|
|
204
|
+
reportReplayCommitError(error);
|
|
205
|
+
}
|
|
206
|
+
lane.status = "completed";
|
|
207
|
+
await maybeSettle();
|
|
208
|
+
} finally {
|
|
209
|
+
lane.adopting = false;
|
|
210
|
+
if (terminal) finishSettlement();
|
|
190
211
|
}
|
|
191
|
-
lane.status = "completed";
|
|
192
|
-
await maybeSettle();
|
|
193
212
|
},
|
|
194
213
|
onDeferred: () => {
|
|
195
214
|
if (lane.status !== "pending") return;
|
|
@@ -2585,14 +2604,14 @@ function createFeishuReplyDispatcher(params) {
|
|
|
2585
2604
|
return false;
|
|
2586
2605
|
} : void 0,
|
|
2587
2606
|
onReasoningEnd: reasoningPreviewEnabled ? () => false : void 0,
|
|
2588
|
-
|
|
2589
|
-
if (
|
|
2607
|
+
onItemEvent: previewStreamingEnabled ? (payload) => {
|
|
2608
|
+
if (payload.kind === "preamble" || payload.hideFromChannelProgress || payload.suppressChannelProgress) return false;
|
|
2609
|
+
const { kind: itemKind, ...item } = payload;
|
|
2590
2610
|
const statusLineLocal = formatChannelProgressDraftLineForEntry(account.config, {
|
|
2591
|
-
event: "
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
}, { detailMode: payload.detailMode });
|
|
2611
|
+
event: "item",
|
|
2612
|
+
itemKind,
|
|
2613
|
+
...item
|
|
2614
|
+
});
|
|
2596
2615
|
if (statusLineLocal) return updateStreamingStatusLine(statusLineLocal);
|
|
2597
2616
|
return false;
|
|
2598
2617
|
} : void 0,
|
|
@@ -2622,11 +2641,6 @@ function getFeishuSyntheticDirectPreDispatchTarget(event) {
|
|
|
2622
2641
|
//#region extensions/feishu/src/bot.ts
|
|
2623
2642
|
const permissionErrorNotifiedAt = /* @__PURE__ */ new Map();
|
|
2624
2643
|
const PERMISSION_ERROR_COOLDOWN_MS = 3e5;
|
|
2625
|
-
function shouldSendNoVisibleReplyFallback(dispatchResult) {
|
|
2626
|
-
const emptyEligibleDispatch = dispatchResult.noVisibleReplyFallbackEligible === true && dispatchResult.settledReceipt?.anyVisibleDelivered !== true;
|
|
2627
|
-
const finalFailedBeforeSend = (dispatchResult.settledReceipt?.counts.final.failedBeforeSend ?? 0) > 0;
|
|
2628
|
-
return dispatchResult.sendPolicyDenied !== true && dispatchResult.sourceReplyDeliveryMode !== "message_tool_only" && (emptyEligibleDispatch || finalFailedBeforeSend);
|
|
2629
|
-
}
|
|
2630
2644
|
function isFeishuTopicSessionScope(scope) {
|
|
2631
2645
|
return scope === "group_topic" || scope === "group_topic_sender";
|
|
2632
2646
|
}
|
|
@@ -2860,7 +2874,7 @@ async function handleFeishuMessage(params) {
|
|
|
2860
2874
|
const names = ctx.mentionTargets.map((t) => t.name).join(", ");
|
|
2861
2875
|
log(`feishu[${account.accountId}]: detected @ forward request, targets: [${names}]`);
|
|
2862
2876
|
}
|
|
2863
|
-
const historyLimit =
|
|
2877
|
+
const historyLimit = resolvePromptHistoryLimit(feishuCfg?.historyLimit ?? cfg.messages?.groupChat?.historyLimit);
|
|
2864
2878
|
const groupConfig = isGroup ? resolveFeishuGroupConfig({
|
|
2865
2879
|
cfg: feishuCfg,
|
|
2866
2880
|
groupId: ctx.chatId
|
|
@@ -3409,7 +3423,7 @@ async function handleFeishuMessage(params) {
|
|
|
3409
3423
|
mode: contextVisibilityMode,
|
|
3410
3424
|
kind: "history"
|
|
3411
3425
|
});
|
|
3412
|
-
const relevantMessages =
|
|
3426
|
+
const relevantMessages = senderScoped ? allowlistedMessages.filter((msg) => msg.senderType === "app" || msg.senderId !== void 0 && senderIds.has(msg.senderId.trim())) : allowlistedMessages;
|
|
3413
3427
|
const threadStarterBody = rootMsg?.content ?? relevantMessages[0]?.content;
|
|
3414
3428
|
const historyMessages = Boolean(rootMsg?.content || ctx.rootId) ? relevantMessages : relevantMessages.slice(1);
|
|
3415
3429
|
const historyParts = historyMessages.map((msg) => {
|
|
@@ -3437,6 +3451,7 @@ async function handleFeishuMessage(params) {
|
|
|
3437
3451
|
const contextBinding = {
|
|
3438
3452
|
agentId,
|
|
3439
3453
|
sessionKey: agentSessionKey,
|
|
3454
|
+
nativeChannelId: ctx.chatId,
|
|
3440
3455
|
messageId: ctx.messageId,
|
|
3441
3456
|
inboundEventKind: "user_request"
|
|
3442
3457
|
};
|
|
@@ -3500,8 +3515,8 @@ async function handleFeishuMessage(params) {
|
|
|
3500
3515
|
threadId: ctx.rootId && isTopicSessionForThread ? ctx.rootId : void 0
|
|
3501
3516
|
},
|
|
3502
3517
|
route: {
|
|
3518
|
+
...route,
|
|
3503
3519
|
agentId,
|
|
3504
|
-
dmScope: route.dmScope,
|
|
3505
3520
|
accountId: agentAccountId,
|
|
3506
3521
|
routeSessionKey: agentSessionKey
|
|
3507
3522
|
},
|
|
@@ -3578,6 +3593,7 @@ async function handleFeishuMessage(params) {
|
|
|
3578
3593
|
return;
|
|
3579
3594
|
}
|
|
3580
3595
|
const broadcastSettlement = createFeishuBroadcastIngressSettlement({
|
|
3596
|
+
trackTask: params.trackTask,
|
|
3581
3597
|
lifecycle: turnAdoptionLifecycle,
|
|
3582
3598
|
replayClaim: broadcastClaim.kind === "claimed" ? broadcastClaim.handle : void 0,
|
|
3583
3599
|
onReplayCommitError: (err) => error(`feishu[${account.accountId}]: failed to commit broadcast replay guard: ${String(err)}`),
|
|
@@ -4006,6 +4022,7 @@ async function dispatchSyntheticCommand(params) {
|
|
|
4006
4022
|
log: params.runtime?.log ?? console.log
|
|
4007
4023
|
});
|
|
4008
4024
|
await handleFeishuMessage({
|
|
4025
|
+
trackTask: params.trackTask,
|
|
4009
4026
|
cfg: params.cfg,
|
|
4010
4027
|
event: buildSyntheticMessageEvent$1(params.event, params.command, resolvedChatType, params.botOpenId),
|
|
4011
4028
|
botOpenId: params.botOpenId,
|
|
@@ -4192,6 +4209,7 @@ async function handleFeishuCardAction(params) {
|
|
|
4192
4209
|
return;
|
|
4193
4210
|
}
|
|
4194
4211
|
await dispatchSyntheticCommand({
|
|
4212
|
+
trackTask: params.trackTask,
|
|
4195
4213
|
cfg,
|
|
4196
4214
|
event,
|
|
4197
4215
|
command,
|
|
@@ -4217,6 +4235,7 @@ async function handleFeishuCardAction(params) {
|
|
|
4217
4235
|
const content = buildFeishuCardActionTextFallback(event);
|
|
4218
4236
|
log(`feishu[${account.accountId}]: handling card action from ${event.operator.open_id}: ${content}`);
|
|
4219
4237
|
await dispatchSyntheticCommand({
|
|
4238
|
+
trackTask: params.trackTask,
|
|
4220
4239
|
cfg,
|
|
4221
4240
|
event,
|
|
4222
4241
|
command: content,
|
|
@@ -4378,6 +4397,7 @@ function buildFeishuFlushIngressLifecycle(sources, options) {
|
|
|
4378
4397
|
}
|
|
4379
4398
|
})();
|
|
4380
4399
|
adopting = activeAdoption;
|
|
4400
|
+
options?.trackTask?.(activeAdoption);
|
|
4381
4401
|
try {
|
|
4382
4402
|
await activeAdoption;
|
|
4383
4403
|
} finally {
|
|
@@ -4859,8 +4879,10 @@ function createFeishuBotMenuHandler(params) {
|
|
|
4859
4879
|
const error = runtime?.error ?? console.error;
|
|
4860
4880
|
const getBotOpenId = params.getBotOpenId ?? ((id) => botOpenIds.get(id));
|
|
4861
4881
|
const getBotName = params.getBotName ?? ((id) => botNames.get(id));
|
|
4862
|
-
|
|
4882
|
+
const isActive = params.isAccountActive ?? (() => true);
|
|
4883
|
+
const handle = async (data) => {
|
|
4863
4884
|
try {
|
|
4885
|
+
if (!isActive()) return;
|
|
4864
4886
|
const event = parseFeishuBotMenuEvent(data);
|
|
4865
4887
|
if (!event) return;
|
|
4866
4888
|
const operatorOpenId = event.operator?.operator_id?.open_id?.trim();
|
|
@@ -4890,6 +4912,10 @@ function createFeishuBotMenuHandler(params) {
|
|
|
4890
4912
|
namespace: accountId,
|
|
4891
4913
|
log
|
|
4892
4914
|
});
|
|
4915
|
+
if (!isActive()) {
|
|
4916
|
+
if (claim.kind === "claimed") claim.handle.release({ error: /* @__PURE__ */ new Error("feishu account stopped before menu dispatch") });
|
|
4917
|
+
return;
|
|
4918
|
+
}
|
|
4893
4919
|
if (claim.kind === "duplicate") {
|
|
4894
4920
|
log(`feishu[${accountId}]: dropping duplicate bot-menu event for ${syntheticMessageId}`);
|
|
4895
4921
|
return;
|
|
@@ -4899,6 +4925,7 @@ function createFeishuBotMenuHandler(params) {
|
|
|
4899
4925
|
return;
|
|
4900
4926
|
}
|
|
4901
4927
|
const handleLegacyMenu = () => handleFeishuMessage({
|
|
4928
|
+
trackTask: params.trackTask,
|
|
4902
4929
|
cfg,
|
|
4903
4930
|
event: syntheticEvent,
|
|
4904
4931
|
botOpenId: getBotOpenId(accountId),
|
|
@@ -4920,6 +4947,10 @@ function createFeishuBotMenuHandler(params) {
|
|
|
4920
4947
|
if (claim.kind === "claimed") await claim.handle.commit();
|
|
4921
4948
|
return;
|
|
4922
4949
|
}
|
|
4950
|
+
if (!isActive()) {
|
|
4951
|
+
if (claim.kind === "claimed") claim.handle.release({ error: /* @__PURE__ */ new Error("feishu account stopped before menu dispatch") });
|
|
4952
|
+
return;
|
|
4953
|
+
}
|
|
4923
4954
|
return await handleLegacyMenu();
|
|
4924
4955
|
}).catch(async (err) => {
|
|
4925
4956
|
if (isFeishuRetryableSyntheticEventError(err)) {
|
|
@@ -4928,6 +4959,7 @@ function createFeishuBotMenuHandler(params) {
|
|
|
4928
4959
|
} else if (claim.kind === "claimed") await claim.handle.commit();
|
|
4929
4960
|
throw err;
|
|
4930
4961
|
});
|
|
4962
|
+
params.trackTask?.(promise);
|
|
4931
4963
|
if (fireAndForget) {
|
|
4932
4964
|
promise.catch((err) => {
|
|
4933
4965
|
error(`feishu[${accountId}]: error handling bot menu event: ${String(err)}`);
|
|
@@ -4939,6 +4971,11 @@ function createFeishuBotMenuHandler(params) {
|
|
|
4939
4971
|
error(`feishu[${accountId}]: error handling bot menu event: ${String(err)}`);
|
|
4940
4972
|
}
|
|
4941
4973
|
};
|
|
4974
|
+
return (data) => {
|
|
4975
|
+
const task = handle(data);
|
|
4976
|
+
params.trackTask?.(task);
|
|
4977
|
+
return task;
|
|
4978
|
+
};
|
|
4942
4979
|
}
|
|
4943
4980
|
//#endregion
|
|
4944
4981
|
//#region extensions/feishu/src/comment-dispatcher.ts
|
|
@@ -6070,7 +6107,7 @@ function resolveFeishuDebounceMentions(params) {
|
|
|
6070
6107
|
const botMentions = merged.filter((mention) => mention.id.open_id?.trim() === normalizedBotOpenId);
|
|
6071
6108
|
return botMentions.length > 0 ? botMentions : void 0;
|
|
6072
6109
|
}
|
|
6073
|
-
function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, runtime, chatHistories, fireAndForget, handleMessage, resolveDebounceText: resolveText, hasProcessedMessage, getBotOpenId = () => void 0, getBotName = () => void 0, resolveSequentialKey = ({ accountId: accountIdLocal, event }) => `feishu:${accountIdLocal}:${event.message.chat_id?.trim() || "unknown"}`, statusSink, resolveIngressLifecycle }) {
|
|
6110
|
+
function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, runtime, chatHistories, fireAndForget, isAccountActive = () => true, trackTask, handleMessage, resolveDebounceText: resolveText, hasProcessedMessage, getBotOpenId = () => void 0, getBotName = () => void 0, resolveSequentialKey = ({ accountId: accountIdLocal, event }) => `feishu:${accountIdLocal}:${event.message.chat_id?.trim() || "unknown"}`, statusSink, resolveIngressLifecycle }) {
|
|
6074
6111
|
const readConfig = createRuntimeConfigReader(cfg);
|
|
6075
6112
|
const resolveDebounceMs = () => channelRuntime.debounce.resolveInboundDebounceMs({
|
|
6076
6113
|
cfg: readConfig(),
|
|
@@ -6094,7 +6131,8 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
|
|
|
6094
6131
|
await turnAdoptionLifecycle.onAbandoned();
|
|
6095
6132
|
return;
|
|
6096
6133
|
}
|
|
6097
|
-
|
|
6134
|
+
const handling = handleMessage({
|
|
6135
|
+
trackTask,
|
|
6098
6136
|
cfg,
|
|
6099
6137
|
event,
|
|
6100
6138
|
preparedContent,
|
|
@@ -6108,6 +6146,8 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
|
|
|
6108
6146
|
messageDedupeKey,
|
|
6109
6147
|
turnAdoptionLifecycle
|
|
6110
6148
|
});
|
|
6149
|
+
trackTask?.(handling);
|
|
6150
|
+
await handling;
|
|
6111
6151
|
};
|
|
6112
6152
|
await enqueue(sequentialKey, task);
|
|
6113
6153
|
};
|
|
@@ -6154,7 +6194,10 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
|
|
|
6154
6194
|
const { lifecycle, settle } = buildFeishuFlushIngressLifecycle(activeEntries.map((entry) => ({
|
|
6155
6195
|
lifecycle: entry.turnAdoptionLifecycle,
|
|
6156
6196
|
replayClaim: entry.processingClaim
|
|
6157
|
-
})), {
|
|
6197
|
+
})), {
|
|
6198
|
+
trackTask,
|
|
6199
|
+
onReplayCommitError: (err) => error(`feishu[${accountId}]: failed to commit logical replay guard: ${String(err)}`)
|
|
6200
|
+
});
|
|
6158
6201
|
return createFlush({
|
|
6159
6202
|
lifecycle,
|
|
6160
6203
|
dispatch: async (admissionLifecycle) => {
|
|
@@ -6215,6 +6258,10 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
|
|
|
6215
6258
|
});
|
|
6216
6259
|
return async (data) => {
|
|
6217
6260
|
const turnAdoptionLifecycle = resolveIngressLifecycle?.(data);
|
|
6261
|
+
if (!isAccountActive() || turnAdoptionLifecycle?.abortSignal.aborted) {
|
|
6262
|
+
await turnAdoptionLifecycle?.onAbandoned();
|
|
6263
|
+
return;
|
|
6264
|
+
}
|
|
6218
6265
|
const completeSuppressedIngress = async () => {
|
|
6219
6266
|
if (!turnAdoptionLifecycle) return;
|
|
6220
6267
|
turnAdoptionLifecycle.onAdoptionFinalizing();
|
|
@@ -6241,6 +6288,15 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
|
|
|
6241
6288
|
namespace: accountId,
|
|
6242
6289
|
log
|
|
6243
6290
|
});
|
|
6291
|
+
if (!isAccountActive() || turnAdoptionLifecycle?.abortSignal.aborted) {
|
|
6292
|
+
const stoppedError = /* @__PURE__ */ new Error("feishu account stopped before message admission");
|
|
6293
|
+
if (claim.kind === "claimed") claim.handle.release({ error: stoppedError });
|
|
6294
|
+
await turnAdoptionLifecycle?.onAbandoned();
|
|
6295
|
+
return {
|
|
6296
|
+
kind: "failed-retryable",
|
|
6297
|
+
error: stoppedError
|
|
6298
|
+
};
|
|
6299
|
+
}
|
|
6244
6300
|
if (claim.kind === "duplicate" || claim.kind === "inflight") {
|
|
6245
6301
|
log(`feishu[${accountId}]: dropping ${claim.kind} event for message ${messageId}`);
|
|
6246
6302
|
await completeSuppressedIngress();
|
|
@@ -6742,22 +6798,94 @@ function buildSyntheticMessageEvent(turn) {
|
|
|
6742
6798
|
}
|
|
6743
6799
|
};
|
|
6744
6800
|
}
|
|
6801
|
+
function createVcInviteAdoption(params) {
|
|
6802
|
+
const cancellation = new AbortController();
|
|
6803
|
+
const settled = createDeferred();
|
|
6804
|
+
let handedOff = false;
|
|
6805
|
+
let released = false;
|
|
6806
|
+
let adoption;
|
|
6807
|
+
const abandon = () => {
|
|
6808
|
+
if (released || adoption) return;
|
|
6809
|
+
released = true;
|
|
6810
|
+
params.abortSignal?.removeEventListener("abort", abandon);
|
|
6811
|
+
const error = params.abortSignal?.reason ?? /* @__PURE__ */ new Error("Feishu VC invitation abandoned before adoption");
|
|
6812
|
+
cancellation.abort(error);
|
|
6813
|
+
params.claim.release({ error });
|
|
6814
|
+
settled.resolve();
|
|
6815
|
+
};
|
|
6816
|
+
params.trackTask?.(settled.promise);
|
|
6817
|
+
params.abortSignal?.addEventListener("abort", abandon, { once: true });
|
|
6818
|
+
if (params.abortSignal?.aborted) abandon();
|
|
6819
|
+
return {
|
|
6820
|
+
lifecycle: {
|
|
6821
|
+
abortSignal: cancellation.signal,
|
|
6822
|
+
onAdopted: () => {
|
|
6823
|
+
if (adoption) return adoption;
|
|
6824
|
+
if (params.isAccountActive?.() === false) abandon();
|
|
6825
|
+
cancellation.signal.throwIfAborted();
|
|
6826
|
+
handedOff = true;
|
|
6827
|
+
params.abortSignal?.removeEventListener("abort", abandon);
|
|
6828
|
+
adoption = Promise.resolve().then(async () => {
|
|
6829
|
+
await params.claim.commit();
|
|
6830
|
+
}).finally(() => settled.resolve());
|
|
6831
|
+
return adoption;
|
|
6832
|
+
},
|
|
6833
|
+
onDeferred: () => {
|
|
6834
|
+
handedOff = true;
|
|
6835
|
+
},
|
|
6836
|
+
onAdoptionFinalizing: () => {
|
|
6837
|
+
handedOff = true;
|
|
6838
|
+
},
|
|
6839
|
+
onAbandoned: abandon
|
|
6840
|
+
},
|
|
6841
|
+
finish: async () => {
|
|
6842
|
+
if (!handedOff) abandon();
|
|
6843
|
+
await adoption;
|
|
6844
|
+
}
|
|
6845
|
+
};
|
|
6846
|
+
}
|
|
6745
6847
|
async function dispatchVcMeetingInvitedTurn(params) {
|
|
6746
6848
|
params.runtime?.log?.(`feishu[${params.accountId}]: vc meeting invited, dispatching synthetic p2p message sender=${params.turn.inviter.senderId} meeting_no=${params.turn.meetingNo}`);
|
|
6747
6849
|
const event = setFeishuSyntheticDirectPreDispatchTarget(buildSyntheticMessageEvent(params.turn), `user:${params.turn.inviter.senderId}`);
|
|
6748
|
-
await
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
runtime: params.runtime,
|
|
6753
|
-
channelRuntime: params.channelRuntime
|
|
6850
|
+
const claim = await claimUnprocessedFeishuMessage({
|
|
6851
|
+
messageId: resolveFeishuMessageDedupeKey(event),
|
|
6852
|
+
namespace: params.accountId,
|
|
6853
|
+
log: params.runtime?.log ?? console.log
|
|
6754
6854
|
});
|
|
6855
|
+
if (claim.kind !== "claimed") return;
|
|
6856
|
+
if (params.abortSignal?.aborted || params.isAccountActive?.() === false) {
|
|
6857
|
+
claim.handle.release({ error: /* @__PURE__ */ new Error("Feishu account stopped before VC dispatch") });
|
|
6858
|
+
return;
|
|
6859
|
+
}
|
|
6860
|
+
const adoption = createVcInviteAdoption({
|
|
6861
|
+
claim: claim.handle,
|
|
6862
|
+
abortSignal: params.abortSignal,
|
|
6863
|
+
isAccountActive: params.isAccountActive,
|
|
6864
|
+
trackTask: params.trackTask
|
|
6865
|
+
});
|
|
6866
|
+
try {
|
|
6867
|
+
await handleFeishuMessage({
|
|
6868
|
+
trackTask: params.trackTask,
|
|
6869
|
+
cfg: params.cfg,
|
|
6870
|
+
accountId: params.accountId,
|
|
6871
|
+
event,
|
|
6872
|
+
runtime: params.runtime,
|
|
6873
|
+
channelRuntime: params.channelRuntime,
|
|
6874
|
+
turnAdoptionLifecycle: adoption.lifecycle
|
|
6875
|
+
});
|
|
6876
|
+
} catch (error) {
|
|
6877
|
+
await adoption.lifecycle.onAbandoned();
|
|
6878
|
+
throw error;
|
|
6879
|
+
} finally {
|
|
6880
|
+
await adoption.finish();
|
|
6881
|
+
}
|
|
6755
6882
|
}
|
|
6756
6883
|
function createFeishuVcMeetingInvitedHandler(params) {
|
|
6757
6884
|
const { cfg, accountId, runtime, fireAndForget, autoJoin } = params;
|
|
6758
6885
|
const log = runtime?.log ?? console.log;
|
|
6759
6886
|
const error = runtime?.error ?? console.error;
|
|
6760
|
-
|
|
6887
|
+
const handle = async (data) => {
|
|
6888
|
+
if (params.abortSignal?.aborted || params.isAccountActive?.() === false) return;
|
|
6761
6889
|
if (!autoJoin) {
|
|
6762
6890
|
log(`feishu[${accountId}]: ignoring vc meeting invite (vcAutoJoin=false)`);
|
|
6763
6891
|
return;
|
|
@@ -6768,24 +6896,25 @@ function createFeishuVcMeetingInvitedHandler(params) {
|
|
|
6768
6896
|
log(`feishu[${accountId}]: vc meeting invited event has invalid meeting_no or inviter identity, skipping`);
|
|
6769
6897
|
return;
|
|
6770
6898
|
}
|
|
6771
|
-
|
|
6899
|
+
await dispatchVcMeetingInvitedTurn({
|
|
6900
|
+
trackTask: params.trackTask,
|
|
6772
6901
|
cfg,
|
|
6773
6902
|
accountId,
|
|
6774
6903
|
runtime,
|
|
6775
6904
|
channelRuntime: params.channelRuntime,
|
|
6776
|
-
turn
|
|
6905
|
+
turn,
|
|
6906
|
+
abortSignal: params.abortSignal,
|
|
6907
|
+
isAccountActive: params.isAccountActive
|
|
6777
6908
|
});
|
|
6778
|
-
if (fireAndForget) {
|
|
6779
|
-
promise.catch((err) => {
|
|
6780
|
-
error(`feishu[${accountId}]: error handling vc meeting invited event: ${String(err)}`);
|
|
6781
|
-
});
|
|
6782
|
-
return;
|
|
6783
|
-
}
|
|
6784
|
-
await promise;
|
|
6785
6909
|
} catch (err) {
|
|
6786
6910
|
error(`feishu[${accountId}]: error handling vc meeting invited event: ${String(err)}`);
|
|
6787
6911
|
}
|
|
6788
6912
|
};
|
|
6913
|
+
return (data) => {
|
|
6914
|
+
const task = handle(data);
|
|
6915
|
+
params.trackTask?.(task);
|
|
6916
|
+
return fireAndForget ? Promise.resolve() : task;
|
|
6917
|
+
};
|
|
6789
6918
|
}
|
|
6790
6919
|
//#endregion
|
|
6791
6920
|
//#region extensions/feishu/src/sequential-key.ts
|
|
@@ -6921,14 +7050,17 @@ function registerEventHandlers(eventDispatcher, context) {
|
|
|
6921
7050
|
const log = runtime?.log ?? console.log;
|
|
6922
7051
|
const error = runtime?.error ?? console.error;
|
|
6923
7052
|
const runFeishuHandler = async (params) => {
|
|
7053
|
+
if (!context.isAccountActive()) return;
|
|
7054
|
+
const task = params.task();
|
|
7055
|
+
context.trackTask(task);
|
|
6924
7056
|
if (fireAndForget) {
|
|
6925
|
-
|
|
7057
|
+
task.catch((err) => {
|
|
6926
7058
|
error(`${params.errorMessage}: ${String(err)}`);
|
|
6927
7059
|
});
|
|
6928
7060
|
return;
|
|
6929
7061
|
}
|
|
6930
7062
|
try {
|
|
6931
|
-
await
|
|
7063
|
+
await task;
|
|
6932
7064
|
} catch (err) {
|
|
6933
7065
|
error(`${params.errorMessage}: ${String(err)}`);
|
|
6934
7066
|
}
|
|
@@ -6941,6 +7073,8 @@ function registerEventHandlers(eventDispatcher, context) {
|
|
|
6941
7073
|
runtime,
|
|
6942
7074
|
chatHistories,
|
|
6943
7075
|
fireAndForget,
|
|
7076
|
+
isAccountActive: context.isAccountActive,
|
|
7077
|
+
trackTask: context.trackTask,
|
|
6944
7078
|
handleMessage: handleFeishuMessage,
|
|
6945
7079
|
resolveDebounceText: ({ event, botOpenId, botName }) => parseFeishuMessageEvent(event, botOpenId, botName).content,
|
|
6946
7080
|
hasProcessedMessage: hasProcessedFeishuMessage,
|
|
@@ -6984,7 +7118,10 @@ function registerEventHandlers(eventDispatcher, context) {
|
|
|
6984
7118
|
runtime,
|
|
6985
7119
|
fireAndForget,
|
|
6986
7120
|
channelRuntime,
|
|
6987
|
-
autoJoin: context.vcAutoJoin
|
|
7121
|
+
autoJoin: context.vcAutoJoin,
|
|
7122
|
+
abortSignal: context.abortSignal,
|
|
7123
|
+
isAccountActive: context.isAccountActive,
|
|
7124
|
+
trackTask: context.trackTask
|
|
6988
7125
|
}),
|
|
6989
7126
|
"im.message.reaction.created_v1": async (data) => {
|
|
6990
7127
|
await runFeishuHandler({
|
|
@@ -6999,8 +7136,9 @@ function registerEventHandlers(eventDispatcher, context) {
|
|
|
6999
7136
|
botOpenId: myBotId,
|
|
7000
7137
|
logger: log
|
|
7001
7138
|
});
|
|
7002
|
-
if (!syntheticEvent) return;
|
|
7139
|
+
if (!syntheticEvent || !context.isAccountActive()) return;
|
|
7003
7140
|
await handleFeishuMessage({
|
|
7141
|
+
trackTask: context.trackTask,
|
|
7004
7142
|
cfg,
|
|
7005
7143
|
event: syntheticEvent,
|
|
7006
7144
|
botOpenId: myBotId,
|
|
@@ -7027,8 +7165,9 @@ function registerEventHandlers(eventDispatcher, context) {
|
|
|
7027
7165
|
logger: log,
|
|
7028
7166
|
action: "deleted"
|
|
7029
7167
|
});
|
|
7030
|
-
if (!syntheticEvent) return;
|
|
7168
|
+
if (!syntheticEvent || !context.isAccountActive()) return;
|
|
7031
7169
|
await handleFeishuMessage({
|
|
7170
|
+
trackTask: context.trackTask,
|
|
7032
7171
|
cfg,
|
|
7033
7172
|
event: syntheticEvent,
|
|
7034
7173
|
botOpenId: myBotId,
|
|
@@ -7047,30 +7186,30 @@ function registerEventHandlers(eventDispatcher, context) {
|
|
|
7047
7186
|
runtime,
|
|
7048
7187
|
chatHistories,
|
|
7049
7188
|
fireAndForget,
|
|
7189
|
+
isAccountActive: context.isAccountActive,
|
|
7190
|
+
trackTask: context.trackTask,
|
|
7050
7191
|
channelRuntime
|
|
7051
7192
|
}),
|
|
7052
7193
|
"card.action.trigger": async (data) => {
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7194
|
+
await runFeishuHandler({
|
|
7195
|
+
errorMessage: `feishu[${accountId}]: error handling card action`,
|
|
7196
|
+
task: async () => {
|
|
7197
|
+
const event = parseFeishuCardActionEventPayload(data);
|
|
7198
|
+
if (!event) {
|
|
7199
|
+
error(`feishu[${accountId}]: ignoring malformed card action payload`);
|
|
7200
|
+
return;
|
|
7201
|
+
}
|
|
7202
|
+
await handleFeishuCardAction({
|
|
7203
|
+
cfg,
|
|
7204
|
+
event,
|
|
7205
|
+
botOpenId: botOpenIds.get(accountId),
|
|
7206
|
+
runtime,
|
|
7207
|
+
channelRuntime,
|
|
7208
|
+
accountId,
|
|
7209
|
+
trackTask: context.trackTask
|
|
7210
|
+
});
|
|
7058
7211
|
}
|
|
7059
|
-
|
|
7060
|
-
cfg,
|
|
7061
|
-
event,
|
|
7062
|
-
botOpenId: botOpenIds.get(accountId),
|
|
7063
|
-
runtime,
|
|
7064
|
-
channelRuntime,
|
|
7065
|
-
accountId
|
|
7066
|
-
});
|
|
7067
|
-
if (fireAndForget) promise.catch((err) => {
|
|
7068
|
-
error(`feishu[${accountId}]: error handling card action: ${String(err)}`);
|
|
7069
|
-
});
|
|
7070
|
-
else await promise;
|
|
7071
|
-
} catch (err) {
|
|
7072
|
-
error(`feishu[${accountId}]: error handling card action: ${String(err)}`);
|
|
7073
|
-
}
|
|
7212
|
+
});
|
|
7074
7213
|
}
|
|
7075
7214
|
});
|
|
7076
7215
|
}
|
|
@@ -7100,8 +7239,16 @@ async function monitorSingleAccount(params) {
|
|
|
7100
7239
|
if (connectionMode === "webhook" && !account.verificationToken?.trim()) throw new Error(`Feishu account "${accountId}" webhook mode requires verificationToken`);
|
|
7101
7240
|
if (connectionMode === "webhook" && !account.encryptKey?.trim()) throw new Error(`Feishu account "${accountId}" webhook mode requires encryptKey`);
|
|
7102
7241
|
const warmupCount = await warmupDedupFromPluginState(accountId, log);
|
|
7242
|
+
if (abortSignal?.aborted) return;
|
|
7103
7243
|
if (warmupCount > 0) log(`feishu[${accountId}]: dedup warmup loaded ${warmupCount} entries from plugin state`);
|
|
7104
7244
|
let threadBindingManager;
|
|
7245
|
+
const accountStopped = new AbortController();
|
|
7246
|
+
const accountAbortSignal = abortSignal ? AbortSignal.any([abortSignal, accountStopped.signal]) : accountStopped.signal;
|
|
7247
|
+
const pendingTasks = /* @__PURE__ */ new Set();
|
|
7248
|
+
const trackTask = (task) => {
|
|
7249
|
+
pendingTasks.add(task);
|
|
7250
|
+
task.then(() => pendingTasks.delete(task), () => pendingTasks.delete(task));
|
|
7251
|
+
};
|
|
7105
7252
|
try {
|
|
7106
7253
|
const eventDispatcher = createEventDispatcher(account);
|
|
7107
7254
|
const durableIngress = typeof eventDispatcher.invoke === "function" ? createFeishuDurableIngress({
|
|
@@ -7123,8 +7270,10 @@ async function monitorSingleAccount(params) {
|
|
|
7123
7270
|
runtime,
|
|
7124
7271
|
chatHistories,
|
|
7125
7272
|
fireAndForget: params.fireAndForget ?? true,
|
|
7273
|
+
isAccountActive: () => !accountAbortSignal.aborted,
|
|
7274
|
+
trackTask,
|
|
7126
7275
|
vcAutoJoin: account.config.vcAutoJoin === true,
|
|
7127
|
-
abortSignal,
|
|
7276
|
+
abortSignal: accountAbortSignal,
|
|
7128
7277
|
...durableIngress ? { resolveIngressLifecycle: durableIngress.resolveLifecycle } : {},
|
|
7129
7278
|
...params.statusSink ? { statusSink: params.statusSink } : {}
|
|
7130
7279
|
});
|
|
@@ -7149,7 +7298,12 @@ async function monitorSingleAccount(params) {
|
|
|
7149
7298
|
...params.statusSink ? { statusSink: params.statusSink } : {}
|
|
7150
7299
|
});
|
|
7151
7300
|
} finally {
|
|
7152
|
-
|
|
7301
|
+
accountStopped.abort(/* @__PURE__ */ new Error("Feishu account stopped"));
|
|
7302
|
+
try {
|
|
7303
|
+
await durableIngress?.stop();
|
|
7304
|
+
} finally {
|
|
7305
|
+
while (pendingTasks.size > 0) await Promise.allSettled(pendingTasks);
|
|
7306
|
+
}
|
|
7153
7307
|
}
|
|
7154
7308
|
} finally {
|
|
7155
7309
|
threadBindingManager?.stop();
|