@openclaw/buzz 2026.9.4 → 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/assets/activity.svg +3 -0
- package/assets/icon.png +0 -0
- package/dist/{adapter.runtime-CaDdxQ2C.js → .setup/adapter.runtime-FIC9NMFI.mjs} +3 -3
- package/dist/{channel-C6rro-f7.js → .setup/channel-qV8kQiPi.mjs} +203 -105
- package/dist/.setup/directory-config-CzHz6fzo.mjs +43 -0
- package/dist/{room-membership-a8IHfdgL.js → .setup/room-membership-tqLQznFE.mjs} +1 -1
- package/dist/{secret-contract-DNuqbK64.js → .setup/secret-contract-DjibkTDL.mjs} +1 -1
- package/dist/.setup/secret-contract-api-DcFDI-eR.mjs +3 -0
- package/dist/.setup/setup-plugin-api-DI8WfvKQ.mjs +47 -0
- package/dist/.setup/setup-plugin-api-H-XWBzaF.mjs +2 -0
- package/dist/{setup-surface-DDUmAluL.js → .setup/setup-surface-DOHxdPor.mjs} +3 -3
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/qa-runner-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -2
- package/dist/setup-plugin-api.js +1 -46
- package/node_modules/nostr-tools/lib/cjs/abstract-pool.js +3 -1
- package/node_modules/nostr-tools/lib/cjs/abstract-pool.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/abstract-relay.js +3 -1
- package/node_modules/nostr-tools/lib/cjs/abstract-relay.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/index.js +3 -1
- package/node_modules/nostr-tools/lib/cjs/index.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/nip46.js +3 -1
- package/node_modules/nostr-tools/lib/cjs/nip46.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/pool.js +3 -1
- package/node_modules/nostr-tools/lib/cjs/pool.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/relay.js +3 -1
- package/node_modules/nostr-tools/lib/cjs/relay.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/abstract-pool.js +3 -1
- package/node_modules/nostr-tools/lib/esm/abstract-pool.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/abstract-relay.js +3 -1
- package/node_modules/nostr-tools/lib/esm/abstract-relay.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/index.js +3 -1
- package/node_modules/nostr-tools/lib/esm/index.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/nip46.js +3 -1
- package/node_modules/nostr-tools/lib/esm/nip46.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/pool.js +3 -1
- package/node_modules/nostr-tools/lib/esm/pool.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/relay.js +3 -1
- package/node_modules/nostr-tools/lib/esm/relay.js.map +2 -2
- package/node_modules/nostr-tools/lib/nostr.bundle.js +3 -1
- package/node_modules/nostr-tools/lib/nostr.bundle.js.map +2 -2
- package/node_modules/nostr-tools/package.json +1 -1
- package/node_modules/zod/README.md +29 -2
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +21 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +20 -8
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +14 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- 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 +222 -6
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +87 -35
- package/node_modules/zod/src/v4/core/checks.ts +119 -146
- package/node_modules/zod/src/v4/core/compile.ts +2313 -0
- package/node_modules/zod/src/v4/core/core.ts +99 -22
- package/node_modules/zod/src/v4/core/doc.ts +17 -9
- package/node_modules/zod/src/v4/core/errors.ts +113 -25
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +164 -50
- package/node_modules/zod/src/v4/core/regexes.ts +42 -15
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +1000 -538
- 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 +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
- package/node_modules/zod/src/v4/core/util.ts +454 -157
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +5 -0
- package/node_modules/zod/src/v4/locales/az.ts +5 -0
- package/node_modules/zod/src/v4/locales/be.ts +12 -0
- package/node_modules/zod/src/v4/locales/bg.ts +5 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +5 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +5 -0
- package/node_modules/zod/src/v4/locales/da.ts +7 -2
- package/node_modules/zod/src/v4/locales/de.ts +5 -0
- package/node_modules/zod/src/v4/locales/el.ts +3 -0
- package/node_modules/zod/src/v4/locales/en.ts +17 -4
- package/node_modules/zod/src/v4/locales/eo.ts +5 -0
- package/node_modules/zod/src/v4/locales/es.ts +4 -0
- package/node_modules/zod/src/v4/locales/fa.ts +5 -0
- package/node_modules/zod/src/v4/locales/fi.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr.ts +21 -14
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +8 -1
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +4 -0
- package/node_modules/zod/src/v4/locales/hu.ts +5 -0
- package/node_modules/zod/src/v4/locales/hy.ts +11 -0
- package/node_modules/zod/src/v4/locales/id.ts +5 -0
- package/node_modules/zod/src/v4/locales/index.ts +11 -0
- package/node_modules/zod/src/v4/locales/is.ts +5 -0
- package/node_modules/zod/src/v4/locales/it.ts +5 -0
- package/node_modules/zod/src/v4/locales/ja.ts +5 -0
- package/node_modules/zod/src/v4/locales/ka.ts +5 -0
- package/node_modules/zod/src/v4/locales/km.ts +5 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +5 -0
- package/node_modules/zod/src/v4/locales/lt.ts +4 -0
- package/node_modules/zod/src/v4/locales/mk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ms.ts +5 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +5 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +7 -2
- package/node_modules/zod/src/v4/locales/ota.ts +5 -0
- package/node_modules/zod/src/v4/locales/pl.ts +5 -0
- package/node_modules/zod/src/v4/locales/ps.ts +5 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +101 -58
- package/node_modules/zod/src/v4/locales/ro.ts +3 -0
- package/node_modules/zod/src/v4/locales/ru.ts +12 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +5 -0
- package/node_modules/zod/src/v4/locales/sv.ts +7 -2
- package/node_modules/zod/src/v4/locales/ta.ts +5 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +5 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +5 -0
- package/node_modules/zod/src/v4/locales/uk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ur.ts +5 -0
- package/node_modules/zod/src/v4/locales/uz.ts +3 -0
- package/node_modules/zod/src/v4/locales/vi.ts +5 -0
- package/node_modules/zod/src/v4/locales/yo.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +12 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -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 +44 -0
- package/node_modules/zod/v3/ZodError.cjs +41 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- 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 +26 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +21 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- 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/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +62 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +51 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +21 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +30 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +23 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +591 -426
- package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
- package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
- package/node_modules/zod/v4/classic/schemas.js +564 -424
- package/node_modules/zod/v4/core/api.cjs +66 -24
- package/node_modules/zod/v4/core/api.d.cts +22 -12
- package/node_modules/zod/v4/core/api.d.ts +22 -12
- package/node_modules/zod/v4/core/api.js +44 -24
- package/node_modules/zod/v4/core/checks.cjs +88 -128
- package/node_modules/zod/v4/core/checks.d.cts +29 -13
- package/node_modules/zod/v4/core/checks.d.ts +29 -13
- package/node_modules/zod/v4/core/checks.js +68 -127
- package/node_modules/zod/v4/core/compile.cjs +1908 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1858 -0
- package/node_modules/zod/v4/core/core.cjs +101 -19
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +83 -20
- package/node_modules/zod/v4/core/doc.cjs +31 -9
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +12 -9
- package/node_modules/zod/v4/core/errors.cjs +126 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +107 -25
- package/node_modules/zod/v4/core/index.cjs +24 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
- 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 +400 -158
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/parse.cjs +148 -46
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +127 -45
- package/node_modules/zod/v4/core/regexes.cjs +54 -17
- package/node_modules/zod/v4/core/regexes.d.cts +5 -0
- package/node_modules/zod/v4/core/regexes.d.ts +5 -0
- package/node_modules/zod/v4/core/regexes.js +32 -15
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +785 -386
- package/node_modules/zod/v4/core/schemas.d.cts +123 -34
- package/node_modules/zod/v4/core/schemas.d.ts +123 -34
- package/node_modules/zod/v4/core/schemas.js +753 -386
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
- package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.js +247 -44
- package/node_modules/zod/v4/core/util.cjs +372 -157
- package/node_modules/zod/v4/core/util.d.cts +79 -1
- package/node_modules/zod/v4/core/util.d.ts +79 -1
- package/node_modules/zod/v4/core/util.js +341 -156
- 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 +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +34 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +5 -0
- package/node_modules/zod/v4/locales/ar.js +5 -0
- package/node_modules/zod/v4/locales/az.cjs +5 -0
- package/node_modules/zod/v4/locales/az.js +5 -0
- package/node_modules/zod/v4/locales/be.cjs +12 -0
- package/node_modules/zod/v4/locales/be.js +12 -0
- package/node_modules/zod/v4/locales/bg.cjs +5 -0
- package/node_modules/zod/v4/locales/bg.js +5 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +5 -0
- package/node_modules/zod/v4/locales/ca.js +5 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +5 -0
- package/node_modules/zod/v4/locales/cs.js +5 -0
- package/node_modules/zod/v4/locales/da.cjs +7 -2
- package/node_modules/zod/v4/locales/da.js +7 -2
- package/node_modules/zod/v4/locales/de.cjs +5 -0
- package/node_modules/zod/v4/locales/de.js +5 -0
- package/node_modules/zod/v4/locales/el.cjs +3 -0
- package/node_modules/zod/v4/locales/el.js +3 -0
- package/node_modules/zod/v4/locales/en.cjs +16 -4
- package/node_modules/zod/v4/locales/en.js +16 -4
- package/node_modules/zod/v4/locales/eo.cjs +5 -0
- package/node_modules/zod/v4/locales/eo.js +5 -0
- package/node_modules/zod/v4/locales/es.cjs +4 -0
- package/node_modules/zod/v4/locales/es.js +4 -0
- package/node_modules/zod/v4/locales/fa.cjs +5 -0
- package/node_modules/zod/v4/locales/fa.js +5 -0
- package/node_modules/zod/v4/locales/fi.cjs +5 -0
- package/node_modules/zod/v4/locales/fi.js +5 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
- package/node_modules/zod/v4/locales/fr-CA.js +5 -0
- package/node_modules/zod/v4/locales/fr.cjs +18 -14
- package/node_modules/zod/v4/locales/fr.js +18 -14
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +7 -0
- package/node_modules/zod/v4/locales/he.js +7 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +4 -0
- package/node_modules/zod/v4/locales/hr.js +4 -0
- package/node_modules/zod/v4/locales/hu.cjs +5 -0
- package/node_modules/zod/v4/locales/hu.js +5 -0
- package/node_modules/zod/v4/locales/hy.cjs +11 -0
- package/node_modules/zod/v4/locales/hy.js +11 -0
- package/node_modules/zod/v4/locales/id.cjs +5 -0
- package/node_modules/zod/v4/locales/id.js +5 -0
- package/node_modules/zod/v4/locales/index.cjs +43 -2
- package/node_modules/zod/v4/locales/index.d.cts +11 -0
- package/node_modules/zod/v4/locales/index.d.ts +11 -0
- package/node_modules/zod/v4/locales/index.js +11 -0
- package/node_modules/zod/v4/locales/is.cjs +5 -0
- package/node_modules/zod/v4/locales/is.js +5 -0
- package/node_modules/zod/v4/locales/it.cjs +5 -0
- package/node_modules/zod/v4/locales/it.js +5 -0
- package/node_modules/zod/v4/locales/ja.cjs +5 -0
- package/node_modules/zod/v4/locales/ja.js +5 -0
- package/node_modules/zod/v4/locales/ka.cjs +5 -0
- package/node_modules/zod/v4/locales/ka.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +5 -0
- package/node_modules/zod/v4/locales/km.js +5 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +5 -0
- package/node_modules/zod/v4/locales/ko.js +5 -0
- package/node_modules/zod/v4/locales/lt.cjs +4 -0
- package/node_modules/zod/v4/locales/lt.js +4 -0
- package/node_modules/zod/v4/locales/mk.cjs +5 -0
- package/node_modules/zod/v4/locales/mk.js +5 -0
- package/node_modules/zod/v4/locales/ms.cjs +5 -0
- package/node_modules/zod/v4/locales/ms.js +5 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +5 -0
- package/node_modules/zod/v4/locales/nl.js +5 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +7 -2
- package/node_modules/zod/v4/locales/no.js +7 -2
- package/node_modules/zod/v4/locales/ota.cjs +5 -0
- package/node_modules/zod/v4/locales/ota.js +5 -0
- package/node_modules/zod/v4/locales/pl.cjs +5 -0
- package/node_modules/zod/v4/locales/pl.js +5 -0
- package/node_modules/zod/v4/locales/ps.cjs +5 -0
- package/node_modules/zod/v4/locales/ps.js +5 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +89 -55
- package/node_modules/zod/v4/locales/pt.js +89 -55
- package/node_modules/zod/v4/locales/ro.cjs +3 -0
- package/node_modules/zod/v4/locales/ro.js +3 -0
- package/node_modules/zod/v4/locales/ru.cjs +12 -0
- package/node_modules/zod/v4/locales/ru.js +12 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +5 -0
- package/node_modules/zod/v4/locales/sl.js +5 -0
- package/node_modules/zod/v4/locales/sv.cjs +7 -2
- package/node_modules/zod/v4/locales/sv.js +7 -2
- package/node_modules/zod/v4/locales/ta.cjs +5 -0
- package/node_modules/zod/v4/locales/ta.js +5 -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 +5 -0
- package/node_modules/zod/v4/locales/th.js +5 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +5 -0
- package/node_modules/zod/v4/locales/tr.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +5 -0
- package/node_modules/zod/v4/locales/uk.js +5 -0
- package/node_modules/zod/v4/locales/ur.cjs +5 -0
- package/node_modules/zod/v4/locales/ur.js +5 -0
- package/node_modules/zod/v4/locales/uz.cjs +3 -0
- package/node_modules/zod/v4/locales/uz.js +3 -0
- package/node_modules/zod/v4/locales/vi.cjs +5 -0
- package/node_modules/zod/v4/locales/vi.js +5 -0
- package/node_modules/zod/v4/locales/yo.cjs +5 -0
- package/node_modules/zod/v4/locales/yo.js +5 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-CN.js +5 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-TW.js +5 -0
- package/node_modules/zod/v4/mini/checks.cjs +21 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +33 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -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 +22 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +117 -53
- package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
- package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
- package/node_modules/zod/v4/mini/schemas.js +92 -51
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/openclaw.plugin.json +12 -28
- package/package.json +9 -7
- package/dist/directory-config-B0shiBa4.js +0 -33
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- /package/dist/{message-event-X_aBiM1X.js → .setup/message-event-X_aBiM1X.mjs} +0 -0
- /package/dist/{types-CeupBG0P.js → .setup/types-CeupBG0P.mjs} +0 -0
package/assets/icon.png
ADDED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as parseBuzzTarget, n as decodeBuzzPrivateKey, o as resolveBuzzPublicKey, u as buildBuzzTarget } from "./types-CeupBG0P.
|
|
2
|
-
import { c as openBuzzRelaySubscription, i as parseBuzzRoomMembershipEvent, o as connectAuthenticatedBuzzRelaySession, s as parseBuzzAuthTag, t as BUZZ_ROOM_MEMBERSHIP_KIND, u as isNewerBuzzRevision } from "./room-membership-
|
|
3
|
-
import { i as buildBuzzMessageTags, s as parseBuzzMessageEvent } from "./message-event-X_aBiM1X.
|
|
1
|
+
import { m as parseBuzzTarget, n as decodeBuzzPrivateKey, o as resolveBuzzPublicKey, u as buildBuzzTarget } from "./types-CeupBG0P.mjs";
|
|
2
|
+
import { c as openBuzzRelaySubscription, i as parseBuzzRoomMembershipEvent, o as connectAuthenticatedBuzzRelaySession, s as parseBuzzAuthTag, t as BUZZ_ROOM_MEMBERSHIP_KIND, u as isNewerBuzzRevision } from "./room-membership-tqLQznFE.mjs";
|
|
3
|
+
import { i as buildBuzzMessageTags, s as parseBuzzMessageEvent } from "./message-event-X_aBiM1X.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { finalizeEvent } from "nostr-tools";
|
|
6
6
|
import { isLoopbackHost } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as resolveBuzzAccountConfig, c as BuzzConfigSchema, d as isConfiguredBuzzChannel, f as looksLikeBuzzTarget, i as resolveBuzzAccount, m as parseBuzzTarget, n as decodeBuzzPrivateKey, o as resolveBuzzPublicKey, p as normalizeBuzzTarget, r as listBuzzAccountIds, s as resolveDefaultBuzzAccountId, t as assertBuzzAccountAvailable, u as buildBuzzTarget } from "./types-CeupBG0P.
|
|
2
|
-
import { n as listBuzzDirectoryPeersFromConfig, t as listBuzzDirectoryGroupsFromConfig } from "./directory-config-
|
|
3
|
-
import { a as connectAuthenticatedBuzzRelay, c as openBuzzRelaySubscription, i as parseBuzzRoomMembershipEvent, l as queryBuzzRelaySnapshot, n as BUZZ_ROOM_SYSTEM_KIND, o as connectAuthenticatedBuzzRelaySession, r as parseBuzzRoomMembershipChangeEvent, s as parseBuzzAuthTag, t as BUZZ_ROOM_MEMBERSHIP_KIND, u as isNewerBuzzRevision } from "./room-membership-
|
|
4
|
-
import { a as formatBuzzMessageForAgent, c as inspectBuzzMentionSyntax, i as buildBuzzMessageTags, l as resolveBuzzMessageMentions, n as BUZZ_INBOUND_MESSAGE_KINDS, o as isBuzzInboundMessageKind, r as BUZZ_TYPING_INDICATOR_KIND, s as parseBuzzMessageEvent, t as BUZZ_DIFF_MESSAGE_KIND } from "./message-event-X_aBiM1X.
|
|
5
|
-
import { i as startBuzzRoomMembershipNotifications, n as buzzSetupContract, r as discoverBuzzRooms, t as buzzSetupWizard } from "./setup-surface-
|
|
6
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
1
|
+
import { a as resolveBuzzAccountConfig, c as BuzzConfigSchema, d as isConfiguredBuzzChannel, f as looksLikeBuzzTarget, i as resolveBuzzAccount, m as parseBuzzTarget, n as decodeBuzzPrivateKey, o as resolveBuzzPublicKey, p as normalizeBuzzTarget, r as listBuzzAccountIds, s as resolveDefaultBuzzAccountId, t as assertBuzzAccountAvailable, u as buildBuzzTarget } from "./types-CeupBG0P.mjs";
|
|
2
|
+
import { n as listBuzzDirectoryPeersFromConfig, r as applyBuzzDirectoryQueryAndLimit, t as listBuzzDirectoryGroupsFromConfig } from "./directory-config-CzHz6fzo.mjs";
|
|
3
|
+
import { a as connectAuthenticatedBuzzRelay, c as openBuzzRelaySubscription, i as parseBuzzRoomMembershipEvent, l as queryBuzzRelaySnapshot, n as BUZZ_ROOM_SYSTEM_KIND, o as connectAuthenticatedBuzzRelaySession, r as parseBuzzRoomMembershipChangeEvent, s as parseBuzzAuthTag, t as BUZZ_ROOM_MEMBERSHIP_KIND, u as isNewerBuzzRevision } from "./room-membership-tqLQznFE.mjs";
|
|
4
|
+
import { a as formatBuzzMessageForAgent, c as inspectBuzzMentionSyntax, i as buildBuzzMessageTags, l as resolveBuzzMessageMentions, n as BUZZ_INBOUND_MESSAGE_KINDS, o as isBuzzInboundMessageKind, r as BUZZ_TYPING_INDICATOR_KIND, s as parseBuzzMessageEvent, t as BUZZ_DIFF_MESSAGE_KIND } from "./message-event-X_aBiM1X.mjs";
|
|
5
|
+
import { i as startBuzzRoomMembershipNotifications, n as buzzSetupContract, r as discoverBuzzRooms, t as buzzSetupWizard } from "./setup-surface-DOHxdPor.mjs";
|
|
6
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DjibkTDL.mjs";
|
|
7
7
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
8
8
|
import { buildChannelOutboundSessionRoute, buildThreadAwareOutboundSessionRoute, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
9
9
|
import { createChannelMessageAdapterFromOutbound, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -19,7 +19,6 @@ import { computeBackoff, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env"
|
|
|
19
19
|
import { createChannelReplayGuard } from "openclaw/plugin-sdk/persistent-dedupe";
|
|
20
20
|
import { normalizeURL } from "nostr-tools/utils";
|
|
21
21
|
import { buildChannelInboundEventContext, logInboundDrop, recordDroppedChannelInboundHistory, resolveChannelInboundRouteEnvelope } from "openclaw/plugin-sdk/channel-inbound";
|
|
22
|
-
import { resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
23
22
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/logging-core";
|
|
24
23
|
import { buildHistoryContext, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
25
24
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
@@ -43,25 +42,6 @@ function readPreferredString(params) {
|
|
|
43
42
|
function fallbackPublicKeyLabel(publicKey) {
|
|
44
43
|
return `${publicKey.slice(0, 8)}...${publicKey.slice(-6)}`;
|
|
45
44
|
}
|
|
46
|
-
function matchesDirectoryQuery(entry, query) {
|
|
47
|
-
if (!query) return true;
|
|
48
|
-
return [
|
|
49
|
-
entry.id,
|
|
50
|
-
entry.name,
|
|
51
|
-
entry.handle
|
|
52
|
-
].some((value) => value?.toLowerCase().includes(query));
|
|
53
|
-
}
|
|
54
|
-
function applyQueryAndLimit(entries, params) {
|
|
55
|
-
const query = params.query?.trim().toLowerCase() ?? "";
|
|
56
|
-
const limit = typeof params.limit === "number" && params.limit > 0 ? Math.floor(params.limit) : void 0;
|
|
57
|
-
const result = [];
|
|
58
|
-
for (const entry of entries) {
|
|
59
|
-
if (!matchesDirectoryQuery(entry, query)) continue;
|
|
60
|
-
result.push(entry);
|
|
61
|
-
if (limit !== void 0 && result.length >= limit) break;
|
|
62
|
-
}
|
|
63
|
-
return result;
|
|
64
|
-
}
|
|
65
45
|
function parseBuzzDirectoryProfileEvent(event) {
|
|
66
46
|
const publicKey = event.pubkey.trim().toLowerCase();
|
|
67
47
|
if (event.kind !== 0 || !HEX_PUBLIC_KEY_PATTERN.test(publicKey)) return;
|
|
@@ -189,10 +169,12 @@ var BuzzDirectoryState = class {
|
|
|
189
169
|
if (!membership) continue;
|
|
190
170
|
for (const publicKey of membership.members) if (publicKey !== this.#publicKey) peers.add(publicKey);
|
|
191
171
|
}
|
|
192
|
-
|
|
172
|
+
const entries = [...peers].map((publicKey) => this.#buildUserEntry(publicKey)).toSorted(compareDirectoryEntries);
|
|
173
|
+
return applyBuzzDirectoryQueryAndLimit(entries, params);
|
|
193
174
|
}
|
|
194
175
|
listGroups(params) {
|
|
195
|
-
|
|
176
|
+
const entries = this.activeRoomIds().map((roomId) => this.#buildRoomEntry(roomId)).toSorted(compareDirectoryEntries);
|
|
177
|
+
return applyBuzzDirectoryQueryAndLimit(entries, params);
|
|
196
178
|
}
|
|
197
179
|
listGroupMembers(params) {
|
|
198
180
|
let roomId;
|
|
@@ -204,7 +186,7 @@ var BuzzDirectoryState = class {
|
|
|
204
186
|
if (this.#rooms.get(roomId)?.archived) return [];
|
|
205
187
|
const membership = this.#memberships.get(roomId);
|
|
206
188
|
if (!membership) return [];
|
|
207
|
-
|
|
189
|
+
const entries = [...membership.members].map((publicKey) => {
|
|
208
190
|
const entry = this.#buildUserEntry(publicKey);
|
|
209
191
|
entry.raw = {
|
|
210
192
|
publicKey,
|
|
@@ -212,7 +194,8 @@ var BuzzDirectoryState = class {
|
|
|
212
194
|
roomId
|
|
213
195
|
};
|
|
214
196
|
return entry;
|
|
215
|
-
}).toSorted(compareDirectoryEntries)
|
|
197
|
+
}).toSorted(compareDirectoryEntries);
|
|
198
|
+
return applyBuzzDirectoryQueryAndLimit(entries, { limit: params.limit });
|
|
216
199
|
}
|
|
217
200
|
mentionMembers(roomId) {
|
|
218
201
|
const normalized = parseBuzzTarget(roomId);
|
|
@@ -808,6 +791,7 @@ async function catchUpBuzzRoomHistory(params) {
|
|
|
808
791
|
if (!reservation) return "aborted";
|
|
809
792
|
let page;
|
|
810
793
|
try {
|
|
794
|
+
if (params.signal?.aborted) return "aborted";
|
|
811
795
|
page = await queryBuzzRoomHistoryPage({
|
|
812
796
|
relay: params.relay,
|
|
813
797
|
channelId: params.channelId,
|
|
@@ -859,7 +843,6 @@ async function catchUpBuzzRoomHistory(params) {
|
|
|
859
843
|
//#endregion
|
|
860
844
|
//#region extensions/buzz/src/room-membership-tracker.ts
|
|
861
845
|
const MEMBERSHIP_READY_TIMEOUT_MS = 1e4;
|
|
862
|
-
const MEMBERSHIP_TRACKER_SETUP_CLOSE_REASON = "membership tracker setup failed";
|
|
863
846
|
const BUZZ_ROOM_METADATA_EDIT_KIND = 9002;
|
|
864
847
|
const MEMBERSHIP_REFRESH_DELAYS_MS = [
|
|
865
848
|
100,
|
|
@@ -894,8 +877,10 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
894
877
|
const deniedMembers = /* @__PURE__ */ new Map();
|
|
895
878
|
const pendingMemberships = /* @__PURE__ */ new Map();
|
|
896
879
|
const refreshes = /* @__PURE__ */ new Map();
|
|
880
|
+
const restoringRooms = /* @__PURE__ */ new Map();
|
|
897
881
|
let membershipQueryTail = Promise.resolve();
|
|
898
882
|
const memberships = await queryBuzzRoomMemberships(params);
|
|
883
|
+
params.signal?.throwIfAborted();
|
|
899
884
|
const effectiveMemberships = () => {
|
|
900
885
|
if (blockedRooms.size === 0 && deniedMembers.size === 0) return memberships;
|
|
901
886
|
const effective = /* @__PURE__ */ new Map();
|
|
@@ -938,12 +923,15 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
938
923
|
params.onMembershipsChanged?.(effectiveMemberships());
|
|
939
924
|
};
|
|
940
925
|
const queryMembership = (channelId) => {
|
|
941
|
-
const query = membershipQueryTail.then(async () =>
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
926
|
+
const query = membershipQueryTail.then(async () => {
|
|
927
|
+
params.signal?.throwIfAborted();
|
|
928
|
+
return (await queryBuzzRoomMemberships({
|
|
929
|
+
relay: params.relay,
|
|
930
|
+
relayPublicKey: params.relayPublicKey,
|
|
931
|
+
channelIds: [channelId],
|
|
932
|
+
signal: params.signal
|
|
933
|
+
})).get(channelId);
|
|
934
|
+
});
|
|
947
935
|
membershipQueryTail = query.then(() => void 0, () => void 0);
|
|
948
936
|
return query;
|
|
949
937
|
};
|
|
@@ -956,6 +944,7 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
956
944
|
let refreshed;
|
|
957
945
|
try {
|
|
958
946
|
refreshed = await queryMembership(channelId);
|
|
947
|
+
params.signal?.throwIfAborted();
|
|
959
948
|
} catch (error) {
|
|
960
949
|
if (params.signal?.aborted) throw error;
|
|
961
950
|
continue;
|
|
@@ -1005,6 +994,9 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
1005
994
|
if (!membership) return;
|
|
1006
995
|
const change = parseBuzzRoomMembershipChangeEvent(event, membership);
|
|
1007
996
|
if (!change) return;
|
|
997
|
+
const restoring = restoringRooms.get(channelId);
|
|
998
|
+
if (restoring?.historical) return;
|
|
999
|
+
if (restoring) restoring.generation += 1;
|
|
1008
1000
|
const expected = change.type === "member_joined" ? "present" : "absent";
|
|
1009
1001
|
const pending = pendingMemberships.get(channelId) ?? /* @__PURE__ */ new Map();
|
|
1010
1002
|
pending.set(change.targetPublicKey, expected);
|
|
@@ -1019,6 +1011,13 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
1019
1011
|
return refreshMembershipOnce(channelId);
|
|
1020
1012
|
};
|
|
1021
1013
|
const handleRoomEvent = (event, reservation) => {
|
|
1014
|
+
if (params.signal?.aborted) return;
|
|
1015
|
+
const channelId = event.tags.find((tag) => tag[0] === "h")?.[1];
|
|
1016
|
+
const restoring = channelId ? restoringRooms.get(channelId) : void 0;
|
|
1017
|
+
if (restoring && isBuzzInboundMessageKind(event.kind)) {
|
|
1018
|
+
restoring.until = Math.max(restoring.until ?? event.created_at, event.created_at);
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1022
1021
|
if (event.kind === 39002) {
|
|
1023
1022
|
const membership = parseBuzzRoomMembershipEvent(event, params.relayPublicKey);
|
|
1024
1023
|
if (membership && memberships.has(membership.roomId) && isNewerBuzzRevision(membership, memberships.get(membership.roomId))) try {
|
|
@@ -1034,20 +1033,31 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
1034
1033
|
}
|
|
1035
1034
|
handleSystemEvent(event)?.catch(reportSystemEventError);
|
|
1036
1035
|
};
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
});
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1036
|
+
const skippedRooms = /* @__PURE__ */ new Set();
|
|
1037
|
+
const initialRoomIds = [];
|
|
1038
|
+
for (const channelId of params.channelIds) if (memberships.get(channelId)?.roles.get(params.botPublicKey) !== "bot") {
|
|
1039
|
+
skippedRooms.add(channelId);
|
|
1040
|
+
params.onRoomUnavailable?.(/* @__PURE__ */ new Error(`Buzz bot does not have the Bot role in configured room ${channelId}`));
|
|
1041
|
+
} else initialRoomIds.push(channelId);
|
|
1042
|
+
if (params.channelIds.length > 0 && initialRoomIds.length === 0) throw new Error(`Buzz bot does not have the Bot role in any configured room: ${params.channelIds.join(", ")}`);
|
|
1043
|
+
const subscribeRoom = (channelId) => {
|
|
1044
|
+
params.signal?.throwIfAborted();
|
|
1045
|
+
return new Promise((resolve, reject) => {
|
|
1046
|
+
let settled = false;
|
|
1047
|
+
const finish = (error) => {
|
|
1048
|
+
if (settled) return;
|
|
1049
|
+
settled = true;
|
|
1050
|
+
clearTimeout(timeout);
|
|
1051
|
+
params.signal?.removeEventListener("abort", onAbort);
|
|
1052
|
+
if (error === void 0) resolve();
|
|
1053
|
+
else reject(error instanceof Error ? error : new Error("Buzz room membership loading failed", { cause: error }));
|
|
1054
|
+
};
|
|
1055
|
+
const onAbort = () => finish(params.signal?.reason ?? /* @__PURE__ */ new Error("Buzz membership loading aborted"));
|
|
1056
|
+
const timeout = setTimeout(() => {
|
|
1057
|
+
finish(/* @__PURE__ */ new Error(`Timed out loading Buzz room membership changes for ${channelId}`));
|
|
1058
|
+
params.relay.close();
|
|
1059
|
+
}, MEMBERSHIP_READY_TIMEOUT_MS);
|
|
1060
|
+
params.signal?.addEventListener("abort", onAbort, { once: true });
|
|
1051
1061
|
const filters = [
|
|
1052
1062
|
{
|
|
1053
1063
|
kinds: [BUZZ_ROOM_SYSTEM_KIND, BUZZ_ROOM_METADATA_EDIT_KIND],
|
|
@@ -1067,63 +1077,141 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
1067
1077
|
limit: params.messageLimit
|
|
1068
1078
|
}
|
|
1069
1079
|
];
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
if (
|
|
1075
|
-
page
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1080
|
+
try {
|
|
1081
|
+
openBuzzRelaySubscription(params.relay, filters, {
|
|
1082
|
+
onevent: (event) => {
|
|
1083
|
+
if (params.signal?.aborted) return;
|
|
1084
|
+
if (!historicalRooms.has(channelId) && isBuzzInboundMessageKind(event.kind)) {
|
|
1085
|
+
const page = historyPages.get(channelId);
|
|
1086
|
+
if (page) {
|
|
1087
|
+
page.count += 1;
|
|
1088
|
+
page.oldest = Math.min(page.oldest, event.created_at);
|
|
1089
|
+
} else historyPages.set(channelId, {
|
|
1090
|
+
count: 1,
|
|
1091
|
+
oldest: event.created_at
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
handleRoomEvent(event);
|
|
1095
|
+
},
|
|
1096
|
+
oneose: () => {
|
|
1097
|
+
historicalRooms.add(channelId);
|
|
1098
|
+
const restoring = restoringRooms.get(channelId);
|
|
1099
|
+
if (restoring) restoring.historical = false;
|
|
1100
|
+
finish();
|
|
1101
|
+
},
|
|
1102
|
+
onclose: (reason) => {
|
|
1103
|
+
const error = /* @__PURE__ */ new Error(`Buzz membership subscription closed for ${channelId}: ${reason}`);
|
|
1104
|
+
if (!historicalRooms.has(channelId)) finish(error);
|
|
1105
|
+
else if (reason !== "shutdown" && reason !== "relay connection closed by us" && !params.signal?.aborted) reportSystemEventError(error);
|
|
1081
1106
|
}
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
}, filters.map((filter) => Object.assign({}, filter, { "#h": [channelId] }))));
|
|
1093
|
-
}
|
|
1094
|
-
await historicalReady;
|
|
1107
|
+
}, filters.map((filter) => Object.assign({}, filter, { "#h": [channelId] })));
|
|
1108
|
+
} catch (error) {
|
|
1109
|
+
finish(error);
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1112
|
+
};
|
|
1113
|
+
const initialSubscriptions = [];
|
|
1114
|
+
try {
|
|
1115
|
+
for (const channelId of initialRoomIds) initialSubscriptions.push(subscribeRoom(channelId));
|
|
1116
|
+
await Promise.all(initialSubscriptions);
|
|
1095
1117
|
} catch (error) {
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
}
|
|
1118
|
+
params.relay.close();
|
|
1119
|
+
await Promise.allSettled(initialSubscriptions);
|
|
1099
1120
|
throw error;
|
|
1100
|
-
} finally {
|
|
1101
|
-
clearTimeout(historicalTimeout);
|
|
1102
1121
|
}
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
for (const channelId of
|
|
1122
|
+
let historyTail = Promise.resolve();
|
|
1123
|
+
const catchUpHistory = (channelIds, recoveryUntil) => {
|
|
1124
|
+
const task = historyTail.then(async () => {
|
|
1125
|
+
for (const channelId of channelIds) {
|
|
1107
1126
|
const page = historyPages.get(channelId);
|
|
1127
|
+
const until = recoveryUntil ?? page?.oldest;
|
|
1108
1128
|
if (params.signal?.aborted) return;
|
|
1109
|
-
if (
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
}) === "timestamp-over-limit") params.onHistoryError?.(/* @__PURE__ */ new Error(`Buzz room ${channelId} kept more than ${BUZZ_REPLAY_DISPATCH_MAX_PENDING} additional messages at one timestamp; older history was not recovered`));
|
|
1121
|
-
} catch (error) {
|
|
1122
|
-
if (params.signal?.aborted) return;
|
|
1123
|
-
reportSystemEventError(error instanceof Error ? error : new Error(`Buzz room history recovery failed for ${channelId}`, { cause: error }));
|
|
1124
|
-
return;
|
|
1125
|
-
}
|
|
1129
|
+
if (until === void 0 || recoveryUntil === void 0 && page && page.count < params.messageLimit) continue;
|
|
1130
|
+
if (await catchUpBuzzRoomHistory({
|
|
1131
|
+
relay: params.relay,
|
|
1132
|
+
channelId,
|
|
1133
|
+
since: params.messageSince(channelId),
|
|
1134
|
+
until,
|
|
1135
|
+
limit: params.messageLimit,
|
|
1136
|
+
reserveCapacity: params.reserveDispatchCapacity,
|
|
1137
|
+
onEvent: handleRoomEvent,
|
|
1138
|
+
signal: params.signal
|
|
1139
|
+
}) === "timestamp-over-limit") params.onHistoryError?.(/* @__PURE__ */ new Error(`Buzz room ${channelId} kept more than ${BUZZ_REPLAY_DISPATCH_MAX_PENDING} additional messages at one timestamp; older history was not recovered`));
|
|
1126
1140
|
}
|
|
1141
|
+
}).catch(reportSystemEventError);
|
|
1142
|
+
historyTail = task;
|
|
1143
|
+
return task;
|
|
1144
|
+
};
|
|
1145
|
+
const restorations = /* @__PURE__ */ new Map();
|
|
1146
|
+
const restoreRoom = async (channelId, state) => {
|
|
1147
|
+
while (!params.signal?.aborted) {
|
|
1148
|
+
const generation = state.generation;
|
|
1149
|
+
let refreshed = await queryMembership(channelId);
|
|
1150
|
+
params.signal?.throwIfAborted();
|
|
1151
|
+
if (generation !== state.generation) continue;
|
|
1152
|
+
const current = memberships.get(channelId);
|
|
1153
|
+
if (current && (!refreshed || isNewerBuzzRevision(current, refreshed))) refreshed = current;
|
|
1154
|
+
if (!refreshed) return;
|
|
1155
|
+
if (refreshed.roles.get(params.botPublicKey) !== "bot") {
|
|
1156
|
+
memberships.set(channelId, refreshed);
|
|
1157
|
+
params.onMembershipsChanged?.(effectiveMemberships());
|
|
1158
|
+
return;
|
|
1159
|
+
}
|
|
1160
|
+
replaceMembership(refreshed);
|
|
1161
|
+
params.signal?.throwIfAborted();
|
|
1162
|
+
skippedRooms.delete(channelId);
|
|
1163
|
+
const restoring = {
|
|
1164
|
+
historical: true,
|
|
1165
|
+
generation: 0
|
|
1166
|
+
};
|
|
1167
|
+
restoringRooms.set(channelId, restoring);
|
|
1168
|
+
await subscribeRoom(channelId);
|
|
1169
|
+
while (!params.signal?.aborted) {
|
|
1170
|
+
const refresh = refreshes.get(channelId);
|
|
1171
|
+
if (refresh) await refresh.promise;
|
|
1172
|
+
params.signal?.throwIfAborted();
|
|
1173
|
+
const reconciliationGeneration = restoring.generation;
|
|
1174
|
+
let confirmed = await queryMembership(channelId);
|
|
1175
|
+
params.signal?.throwIfAborted();
|
|
1176
|
+
if (reconciliationGeneration !== restoring.generation || refreshes.has(channelId)) continue;
|
|
1177
|
+
const latest = memberships.get(channelId);
|
|
1178
|
+
if (latest && confirmed && isNewerBuzzRevision(latest, confirmed)) confirmed = latest;
|
|
1179
|
+
if (!confirmed) throw new Error(`Buzz room membership missing after restoration for ${channelId}`);
|
|
1180
|
+
replaceMembership(confirmed);
|
|
1181
|
+
params.signal?.throwIfAborted();
|
|
1182
|
+
restoringRooms.delete(channelId);
|
|
1183
|
+
await catchUpHistory([channelId], restoring.until);
|
|
1184
|
+
return;
|
|
1185
|
+
}
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
1188
|
+
};
|
|
1189
|
+
return {
|
|
1190
|
+
memberships: effectiveMemberships,
|
|
1191
|
+
catchUpHistory: () => catchUpHistory(initialRoomIds),
|
|
1192
|
+
handleNotification: (notification) => {
|
|
1193
|
+
if (params.signal?.aborted || seenEventIds.has(notification.eventId)) return true;
|
|
1194
|
+
if (!skippedRooms.has(notification.roomId)) return false;
|
|
1195
|
+
markSystemEventSeen(notification.eventId);
|
|
1196
|
+
const existing = restorations.get(notification.roomId);
|
|
1197
|
+
if (existing) {
|
|
1198
|
+
existing.generation += 1;
|
|
1199
|
+
return true;
|
|
1200
|
+
}
|
|
1201
|
+
const state = {
|
|
1202
|
+
generation: 1,
|
|
1203
|
+
promise: Promise.resolve()
|
|
1204
|
+
};
|
|
1205
|
+
restorations.set(notification.roomId, state);
|
|
1206
|
+
state.promise = restoreRoom(notification.roomId, state).catch(reportSystemEventError).finally(() => restorations.delete(notification.roomId));
|
|
1207
|
+
return true;
|
|
1208
|
+
},
|
|
1209
|
+
close: async () => {
|
|
1210
|
+
await Promise.allSettled([
|
|
1211
|
+
...[...restorations.values()].map((state) => state.promise),
|
|
1212
|
+
...[...refreshes.values()].map((state) => state.promise),
|
|
1213
|
+
historyTail
|
|
1214
|
+
]);
|
|
1127
1215
|
}
|
|
1128
1216
|
};
|
|
1129
1217
|
}
|
|
@@ -1307,6 +1395,7 @@ async function startBuzzBus(options) {
|
|
|
1307
1395
|
let directoryRelay;
|
|
1308
1396
|
let stopPresenceHeartbeat = () => {};
|
|
1309
1397
|
let profileTask;
|
|
1398
|
+
let membershipTracker;
|
|
1310
1399
|
const bus = {
|
|
1311
1400
|
publicKey,
|
|
1312
1401
|
directory,
|
|
@@ -1347,6 +1436,7 @@ async function startBuzzBus(options) {
|
|
|
1347
1436
|
directoryRelay?.close();
|
|
1348
1437
|
replayGuard.clearMemory();
|
|
1349
1438
|
relay.close();
|
|
1439
|
+
await membershipTracker?.close();
|
|
1350
1440
|
await profileTask;
|
|
1351
1441
|
}
|
|
1352
1442
|
};
|
|
@@ -1376,9 +1466,10 @@ async function startBuzzBus(options) {
|
|
|
1376
1466
|
configuredRoomIds: options.channelIds,
|
|
1377
1467
|
since: sessionStartedAt,
|
|
1378
1468
|
signal,
|
|
1469
|
+
onNotification: (notification) => membershipTracker?.handleNotification(notification) ?? false,
|
|
1379
1470
|
onFatalError: reportFatalError
|
|
1380
1471
|
});
|
|
1381
|
-
|
|
1472
|
+
membershipTracker = activeChannelIds.length > 0 ? await createBuzzRoomMembershipTracker({
|
|
1382
1473
|
relay,
|
|
1383
1474
|
relayPublicKey,
|
|
1384
1475
|
channelIds: activeChannelIds,
|
|
@@ -1388,6 +1479,7 @@ async function startBuzzBus(options) {
|
|
|
1388
1479
|
messageLimit: resolveBuzzRoomHistoryLimit(activeChannelIds.length),
|
|
1389
1480
|
reserveDispatchCapacity: (slots) => dispatchQueue.reserveCapacity(slots),
|
|
1390
1481
|
onHistoryError: options.onHistoryError,
|
|
1482
|
+
onRoomUnavailable: options.onRoomUnavailable,
|
|
1391
1483
|
onMessageEvent: (event, isMember, reservation) => {
|
|
1392
1484
|
if (signal.aborted || event.pubkey === publicKey) return;
|
|
1393
1485
|
const message = parseBuzzMessageEvent(event);
|
|
@@ -1542,7 +1634,7 @@ async function handleBuzzInbound(params) {
|
|
|
1542
1634
|
const shouldComputeCommandAuthorized = supportsTextInterpretation && runtime.channel.commands.shouldComputeCommandAuthorized(message.text, cfg);
|
|
1543
1635
|
const hasControlCommand = shouldComputeCommandAuthorized && runtime.channel.text.hasControlCommand(message.text, cfg);
|
|
1544
1636
|
const groupConfig = account.config.groups?.[channelId];
|
|
1545
|
-
const access = await
|
|
1637
|
+
const access = await runtime.channel.inbound.ingress.resolveStable({
|
|
1546
1638
|
channelId: "buzz",
|
|
1547
1639
|
accountId: account.accountId,
|
|
1548
1640
|
identity: {
|
|
@@ -1558,6 +1650,7 @@ async function handleBuzzInbound(params) {
|
|
|
1558
1650
|
contextBinding: {
|
|
1559
1651
|
agentId: route.agentId,
|
|
1560
1652
|
sessionKey: route.sessionKey,
|
|
1653
|
+
nativeChannelId: channelId,
|
|
1561
1654
|
messageId: message.id,
|
|
1562
1655
|
inboundEventKind: "user_request"
|
|
1563
1656
|
},
|
|
@@ -1738,14 +1831,16 @@ function openBuzzRecoveryWatermarkStore(params) {
|
|
|
1738
1831
|
async function resolveBuzzRecoverySince(params) {
|
|
1739
1832
|
const { store, channelIds, nowSeconds, lookbackSeconds } = params;
|
|
1740
1833
|
const configuredKeys = new Set(channelIds.map(roomCursorKey));
|
|
1741
|
-
|
|
1834
|
+
const activations = new Map((await store.entries()).map(({ key, value }) => [key, value]));
|
|
1835
|
+
for (const key of activations.keys()) if (key.startsWith("room:") && !configuredKeys.has(key)) await store.delete(key);
|
|
1742
1836
|
const sinceByRoom = /* @__PURE__ */ new Map();
|
|
1743
1837
|
const retentionFloor = nowSeconds - lookbackSeconds;
|
|
1744
1838
|
for (const channelId of channelIds) {
|
|
1745
1839
|
const key = roomCursorKey(channelId);
|
|
1746
|
-
const activation =
|
|
1840
|
+
const activation = activations.get(key);
|
|
1747
1841
|
if (activation === void 0) {
|
|
1748
1842
|
await store.register(key, { seconds: nowSeconds });
|
|
1843
|
+
activations.set(key, { seconds: nowSeconds });
|
|
1749
1844
|
sinceByRoom.set(channelId, nowSeconds);
|
|
1750
1845
|
continue;
|
|
1751
1846
|
}
|
|
@@ -1858,6 +1953,9 @@ async function startBuzzGatewayAccount(ctx) {
|
|
|
1858
1953
|
onHistoryError: (error) => {
|
|
1859
1954
|
ctx.log?.warn?.(`[${account.accountId}] Buzz history recovery incomplete: ${error.message}`);
|
|
1860
1955
|
},
|
|
1956
|
+
onRoomUnavailable: (error) => {
|
|
1957
|
+
ctx.log?.warn?.(`[${account.accountId}] Buzz room skipped: ${error.message}`);
|
|
1958
|
+
},
|
|
1861
1959
|
onPresenceError: (error) => {
|
|
1862
1960
|
ctx.log?.warn?.(`[${account.accountId}] Buzz presence heartbeat failed: ${error.message}`);
|
|
1863
1961
|
},
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { i as resolveBuzzAccount, m as parseBuzzTarget, u as buildBuzzTarget } from "./types-CeupBG0P.mjs";
|
|
2
|
+
//#region extensions/buzz/src/directory-query.ts
|
|
3
|
+
function matchesDirectoryQuery(entry, query) {
|
|
4
|
+
if (!query) return true;
|
|
5
|
+
return [
|
|
6
|
+
entry.id,
|
|
7
|
+
entry.name,
|
|
8
|
+
entry.handle
|
|
9
|
+
].some((value) => value?.toLowerCase().includes(query));
|
|
10
|
+
}
|
|
11
|
+
function applyBuzzDirectoryQueryAndLimit(entries, params) {
|
|
12
|
+
const query = params.query?.trim().toLowerCase() ?? "";
|
|
13
|
+
const limit = typeof params.limit === "number" && params.limit > 0 ? Math.floor(params.limit) : void 0;
|
|
14
|
+
const result = [];
|
|
15
|
+
for (const entry of entries) {
|
|
16
|
+
if (!matchesDirectoryQuery(entry, query)) continue;
|
|
17
|
+
result.push(entry);
|
|
18
|
+
if (limit !== void 0 && result.length >= limit) break;
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region extensions/buzz/src/directory-config.ts
|
|
24
|
+
async function listBuzzDirectoryPeersFromConfig(_params) {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
async function listBuzzDirectoryGroupsFromConfig(params) {
|
|
28
|
+
const account = resolveBuzzAccount({
|
|
29
|
+
cfg: params.cfg,
|
|
30
|
+
accountId: params.accountId
|
|
31
|
+
});
|
|
32
|
+
return applyBuzzDirectoryQueryAndLimit(Object.entries(account.config.groups ?? {}).filter(([, config]) => config.enabled !== false).map(([roomId]) => {
|
|
33
|
+
const id = parseBuzzTarget(roomId);
|
|
34
|
+
return {
|
|
35
|
+
kind: "group",
|
|
36
|
+
id: buildBuzzTarget(id),
|
|
37
|
+
name: id,
|
|
38
|
+
raw: { roomId: id }
|
|
39
|
+
};
|
|
40
|
+
}).toSorted((a, b) => a.id.localeCompare(b.id)), params);
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { listBuzzDirectoryPeersFromConfig as n, applyBuzzDirectoryQueryAndLimit as r, listBuzzDirectoryGroupsFromConfig as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as BUZZ_CHANNEL_ID_PATTERN } from "./types-CeupBG0P.
|
|
1
|
+
import { l as BUZZ_CHANNEL_ID_PATTERN } from "./types-CeupBG0P.mjs";
|
|
2
2
|
import { Relay, finalizeEvent } from "nostr-tools";
|
|
3
3
|
import { readProviderJsonObjectResponse } from "openclaw/plugin-sdk/provider-http";
|
|
4
4
|
import { fetchWithSsrFGuard, ssrfPolicyFromHttpBaseUrlAllowedOrigin } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveBuzzAccountConfig } from "./types-CeupBG0P.
|
|
1
|
+
import { a as resolveBuzzAccountConfig } from "./types-CeupBG0P.mjs";
|
|
2
2
|
import { collectSecretInputAssignment, createChannelSecretTargetRegistryEntries, getChannelRecord, isRecord } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
3
3
|
//#region extensions/buzz/src/secret-contract.ts
|
|
4
4
|
const fields = ["privateKey", "authTag"];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { c as BuzzConfigSchema, i as resolveBuzzAccount, r as listBuzzAccountIds, s as resolveDefaultBuzzAccountId } from "./types-CeupBG0P.mjs";
|
|
2
|
+
import { n as buzzSetupContract, t as buzzSetupWizard } from "./setup-surface-DOHxdPor.mjs";
|
|
3
|
+
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
4
|
+
//#region extensions/buzz/src/channel.setup.ts
|
|
5
|
+
const buzzSetupPlugin = {
|
|
6
|
+
id: "buzz",
|
|
7
|
+
meta: {
|
|
8
|
+
id: "buzz",
|
|
9
|
+
label: "Buzz",
|
|
10
|
+
selectionLabel: "Buzz",
|
|
11
|
+
docsPath: "/channels/buzz",
|
|
12
|
+
docsLabel: "buzz",
|
|
13
|
+
blurb: "Connect OpenClaw agents to Buzz team rooms.",
|
|
14
|
+
markdownCapable: true,
|
|
15
|
+
order: 56
|
|
16
|
+
},
|
|
17
|
+
capabilities: {
|
|
18
|
+
chatTypes: ["group"],
|
|
19
|
+
threads: true
|
|
20
|
+
},
|
|
21
|
+
reload: {
|
|
22
|
+
configPrefixes: ["channels.buzz"],
|
|
23
|
+
accountScopedRestart: true
|
|
24
|
+
},
|
|
25
|
+
configSchema: BuzzConfigSchema,
|
|
26
|
+
setupContract: buzzSetupContract,
|
|
27
|
+
setupWizard: buzzSetupWizard,
|
|
28
|
+
config: {
|
|
29
|
+
listAccountIds: listBuzzAccountIds,
|
|
30
|
+
resolveAccount: (cfg, accountId) => resolveBuzzAccount({
|
|
31
|
+
cfg,
|
|
32
|
+
accountId
|
|
33
|
+
}),
|
|
34
|
+
defaultAccountId: resolveDefaultBuzzAccountId,
|
|
35
|
+
isConfigured: (account) => account.configured,
|
|
36
|
+
describeAccount: (account) => describeAccountSnapshot({
|
|
37
|
+
account,
|
|
38
|
+
configured: account.configured,
|
|
39
|
+
extra: {
|
|
40
|
+
baseUrl: account.relayUrl,
|
|
41
|
+
publicKey: account.publicKey
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { buzzSetupPlugin as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as resolveBuzzAccountConfig, i as resolveBuzzAccount, l as BUZZ_CHANNEL_ID_PATTERN, m as parseBuzzTarget, n as decodeBuzzPrivateKey, o as resolveBuzzPublicKey, r as listBuzzAccountIds } from "./types-CeupBG0P.
|
|
2
|
-
import { c as openBuzzRelaySubscription, i as parseBuzzRoomMembershipEvent, l as queryBuzzRelaySnapshot, o as connectAuthenticatedBuzzRelaySession, s as parseBuzzAuthTag, t as BUZZ_ROOM_MEMBERSHIP_KIND, u as isNewerBuzzRevision } from "./room-membership-
|
|
1
|
+
import { a as resolveBuzzAccountConfig, i as resolveBuzzAccount, l as BUZZ_CHANNEL_ID_PATTERN, m as parseBuzzTarget, n as decodeBuzzPrivateKey, o as resolveBuzzPublicKey, r as listBuzzAccountIds } from "./types-CeupBG0P.mjs";
|
|
2
|
+
import { c as openBuzzRelaySubscription, i as parseBuzzRoomMembershipEvent, l as queryBuzzRelaySnapshot, o as connectAuthenticatedBuzzRelaySession, s as parseBuzzAuthTag, t as BUZZ_ROOM_MEMBERSHIP_KIND, u as isNewerBuzzRevision } from "./room-membership-tqLQznFE.mjs";
|
|
3
3
|
import { generateSecretKey, nip19 } from "nostr-tools";
|
|
4
4
|
import { sleep } from "openclaw/plugin-sdk/runtime-env";
|
|
5
5
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
@@ -34,7 +34,7 @@ function startBuzzRoomMembershipNotifications(params) {
|
|
|
34
34
|
relayPublicKey: params.relayPublicKey,
|
|
35
35
|
botPublicKey: params.botPublicKey
|
|
36
36
|
});
|
|
37
|
-
if (notification && configuredRoomIds.has(notification.roomId)) params.onFatalError(/* @__PURE__ */ new Error(`Buzz room ${notification.roomId} membership changed; rebuilding subscriptions`));
|
|
37
|
+
if (notification && configuredRoomIds.has(notification.roomId) && !params.onNotification?.(notification)) params.onFatalError(/* @__PURE__ */ new Error(`Buzz room ${notification.roomId} membership changed; rebuilding subscriptions`));
|
|
38
38
|
},
|
|
39
39
|
onclose: (reason) => {
|
|
40
40
|
if (reason !== MEMBERSHIP_NOTIFICATION_CLOSE_REASON && reason !== "relay connection closed by us" && reason !== "shutdown" && !params.signal?.aborted) params.onFatalError(/* @__PURE__ */ new Error(`Buzz membership notification subscription closed: ${reason}`));
|
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as resolveBuzzAccount, r as listBuzzAccountIds, s as resolveDefaultBuzzAccountId } from "
|
|
2
|
-
import { n as getBuzzRuntime, r as setBuzzRuntime, t as buzzPlugin } from "
|
|
1
|
+
import { i as resolveBuzzAccount, r as listBuzzAccountIds, s as resolveDefaultBuzzAccountId } from "./.setup/types-CeupBG0P.mjs";
|
|
2
|
+
import { n as getBuzzRuntime, r as setBuzzRuntime, t as buzzPlugin } from "./.setup/channel-qV8kQiPi.mjs";
|
|
3
3
|
export { buzzPlugin, getBuzzRuntime, listBuzzAccountIds, resolveBuzzAccount, resolveDefaultBuzzAccountId, setBuzzRuntime };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as buzzPlugin } from "
|
|
1
|
+
import { t as buzzPlugin } from "./.setup/channel-qV8kQiPi.mjs";
|
|
2
2
|
export { buzzPlugin };
|