@openclaw/buzz 2026.9.4 → 2026.9.5
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-BVHkrP3Z.mjs} +201 -103
- 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 +27 -0
- package/node_modules/zod/compile.cjs +77 -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 +2 -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/package.json +13 -2
- 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/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 +12 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +140 -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 +452 -262
- 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 +135 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +30 -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 +2 -2
- 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 +720 -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 +155 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +11 -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 +274 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +425 -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/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 +281 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +47 -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 +183 -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 +46 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +245 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +234 -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/preprocess-types.test.ts +20 -2
- 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 +33 -2
- 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/string.test.ts +127 -5
- 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 +11 -2
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1585 -173
- 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 +76 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +48 -12
- package/node_modules/zod/src/v4/core/checks.ts +57 -44
- package/node_modules/zod/src/v4/core/compile.ts +2188 -0
- package/node_modules/zod/src/v4/core/core.ts +98 -19
- package/node_modules/zod/src/v4/core/doc.ts +11 -7
- package/node_modules/zod/src/v4/core/errors.ts +115 -24
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +6 -1
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +257 -93
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +284 -0
- package/node_modules/zod/src/v4/core/parse.ts +131 -38
- package/node_modules/zod/src/v4/core/regexes.ts +30 -13
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +759 -461
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +969 -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 +1639 -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/tk.test.ts +69 -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 +31 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +275 -42
- package/node_modules/zod/src/v4/core/util.ts +268 -42
- 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 +3 -0
- package/node_modules/zod/src/v4/locales/az.ts +3 -0
- package/node_modules/zod/src/v4/locales/be.ts +10 -0
- package/node_modules/zod/src/v4/locales/bg.ts +3 -0
- package/node_modules/zod/src/v4/locales/bn.ts +121 -0
- package/node_modules/zod/src/v4/locales/ca.ts +3 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +138 -0
- package/node_modules/zod/src/v4/locales/cs.ts +3 -0
- package/node_modules/zod/src/v4/locales/da.ts +5 -2
- package/node_modules/zod/src/v4/locales/de.ts +3 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +15 -4
- package/node_modules/zod/src/v4/locales/eo.ts +3 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +3 -0
- package/node_modules/zod/src/v4/locales/fi.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr.ts +19 -14
- package/node_modules/zod/src/v4/locales/gu.ts +121 -0
- package/node_modules/zod/src/v4/locales/he.ts +6 -1
- package/node_modules/zod/src/v4/locales/hi.ts +124 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +3 -0
- package/node_modules/zod/src/v4/locales/hy.ts +9 -0
- package/node_modules/zod/src/v4/locales/id.ts +3 -0
- package/node_modules/zod/src/v4/locales/index.ts +10 -0
- package/node_modules/zod/src/v4/locales/is.ts +3 -0
- package/node_modules/zod/src/v4/locales/it.ts +3 -0
- package/node_modules/zod/src/v4/locales/ja.ts +3 -0
- package/node_modules/zod/src/v4/locales/ka.ts +3 -0
- package/node_modules/zod/src/v4/locales/km.ts +3 -0
- package/node_modules/zod/src/v4/locales/kn.ts +124 -0
- package/node_modules/zod/src/v4/locales/ko.ts +3 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ms.ts +3 -0
- package/node_modules/zod/src/v4/locales/ne.ts +126 -0
- package/node_modules/zod/src/v4/locales/nl.ts +3 -0
- package/node_modules/zod/src/v4/locales/nn.ts +119 -0
- package/node_modules/zod/src/v4/locales/no.ts +5 -2
- package/node_modules/zod/src/v4/locales/ota.ts +3 -0
- package/node_modules/zod/src/v4/locales/pl.ts +3 -0
- package/node_modules/zod/src/v4/locales/ps.ts +3 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +159 -0
- package/node_modules/zod/src/v4/locales/pt.ts +99 -58
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +10 -0
- package/node_modules/zod/src/v4/locales/sk.ts +121 -0
- package/node_modules/zod/src/v4/locales/sl.ts +3 -0
- package/node_modules/zod/src/v4/locales/sv.ts +5 -2
- package/node_modules/zod/src/v4/locales/ta.ts +3 -0
- package/node_modules/zod/src/v4/locales/th.ts +3 -0
- package/node_modules/zod/src/v4/locales/tk.ts +111 -0
- package/node_modules/zod/src/v4/locales/tr.ts +3 -0
- package/node_modules/zod/src/v4/locales/uk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ur.ts +3 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +3 -0
- package/node_modules/zod/src/v4/locales/yo.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +3 -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 +10 -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 +135 -56
- 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/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 +72 -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/string.test.ts +21 -0
- package/node_modules/zod/v3/ZodError.cjs +22 -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/types.cjs +7 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +2 -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/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 +39 -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 +43 -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 +30 -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 +136 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
- package/node_modules/zod/v4/classic/in-out.cjs +63 -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 +2 -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 +11 -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 +4 -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 +498 -398
- package/node_modules/zod/v4/classic/schemas.d.cts +53 -18
- package/node_modules/zod/v4/classic/schemas.d.ts +53 -18
- package/node_modules/zod/v4/classic/schemas.js +492 -396
- package/node_modules/zod/v4/core/api.cjs +23 -4
- package/node_modules/zod/v4/core/api.d.cts +13 -9
- package/node_modules/zod/v4/core/api.d.ts +13 -9
- package/node_modules/zod/v4/core/api.js +21 -4
- package/node_modules/zod/v4/core/checks.cjs +37 -31
- package/node_modules/zod/v4/core/checks.d.cts +13 -13
- package/node_modules/zod/v4/core/checks.d.ts +13 -13
- package/node_modules/zod/v4/core/checks.js +37 -31
- package/node_modules/zod/v4/core/compile.cjs +1813 -0
- package/node_modules/zod/v4/core/compile.d.cts +51 -0
- package/node_modules/zod/v4/core/compile.d.ts +51 -0
- package/node_modules/zod/v4/core/compile.js +1783 -0
- package/node_modules/zod/v4/core/core.cjs +81 -18
- 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 +82 -19
- package/node_modules/zod/v4/core/doc.cjs +5 -7
- 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 +5 -7
- package/node_modules/zod/v4/core/errors.cjs +110 -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 +110 -25
- package/node_modules/zod/v4/core/index.cjs +5 -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 +4 -0
- 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 +4 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
- package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
- 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 +272 -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 +265 -0
- package/node_modules/zod/v4/core/parse.cjs +96 -34
- 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 +94 -33
- package/node_modules/zod/v4/core/regexes.cjs +27 -15
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +24 -13
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +537 -326
- package/node_modules/zod/v4/core/schemas.d.cts +100 -31
- package/node_modules/zod/v4/core/schemas.d.ts +100 -31
- package/node_modules/zod/v4/core/schemas.js +526 -325
- package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
- package/node_modules/zod/v4/core/to-json-schema.d.cts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.js +241 -39
- package/node_modules/zod/v4/core/util.cjs +212 -31
- package/node_modules/zod/v4/core/util.d.cts +58 -1
- package/node_modules/zod/v4/core/util.d.ts +58 -1
- package/node_modules/zod/v4/core/util.js +202 -30
- package/node_modules/zod/v4/core/versions.cjs +2 -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 +195 -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 +15 -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 +3 -0
- package/node_modules/zod/v4/locales/ar.js +3 -0
- package/node_modules/zod/v4/locales/az.cjs +3 -0
- package/node_modules/zod/v4/locales/az.js +3 -0
- package/node_modules/zod/v4/locales/be.cjs +10 -0
- package/node_modules/zod/v4/locales/be.js +10 -0
- package/node_modules/zod/v4/locales/bg.cjs +3 -0
- package/node_modules/zod/v4/locales/bg.js +3 -0
- package/node_modules/zod/v4/locales/bn.cjs +138 -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 +111 -0
- package/node_modules/zod/v4/locales/ca.cjs +3 -0
- package/node_modules/zod/v4/locales/ca.js +3 -0
- package/node_modules/zod/v4/locales/ckb.cjs +158 -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 +131 -0
- package/node_modules/zod/v4/locales/cs.cjs +3 -0
- package/node_modules/zod/v4/locales/cs.js +3 -0
- package/node_modules/zod/v4/locales/da.cjs +5 -2
- package/node_modules/zod/v4/locales/da.js +5 -2
- package/node_modules/zod/v4/locales/de.cjs +3 -0
- package/node_modules/zod/v4/locales/de.js +3 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +14 -4
- package/node_modules/zod/v4/locales/en.js +14 -4
- package/node_modules/zod/v4/locales/eo.cjs +3 -0
- package/node_modules/zod/v4/locales/eo.js +3 -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 +3 -0
- package/node_modules/zod/v4/locales/fa.js +3 -0
- package/node_modules/zod/v4/locales/fi.cjs +3 -0
- package/node_modules/zod/v4/locales/fi.js +3 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
- package/node_modules/zod/v4/locales/fr-CA.js +3 -0
- package/node_modules/zod/v4/locales/fr.cjs +16 -14
- package/node_modules/zod/v4/locales/fr.js +16 -14
- package/node_modules/zod/v4/locales/gu.cjs +138 -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 +111 -0
- package/node_modules/zod/v4/locales/he.cjs +5 -0
- package/node_modules/zod/v4/locales/he.js +5 -0
- package/node_modules/zod/v4/locales/hi.cjs +136 -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 +109 -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 +3 -0
- package/node_modules/zod/v4/locales/hu.js +3 -0
- package/node_modules/zod/v4/locales/hy.cjs +9 -0
- package/node_modules/zod/v4/locales/hy.js +9 -0
- package/node_modules/zod/v4/locales/id.cjs +3 -0
- package/node_modules/zod/v4/locales/id.js +3 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -2
- package/node_modules/zod/v4/locales/index.d.cts +10 -0
- package/node_modules/zod/v4/locales/index.d.ts +10 -0
- package/node_modules/zod/v4/locales/index.js +10 -0
- package/node_modules/zod/v4/locales/is.cjs +3 -0
- package/node_modules/zod/v4/locales/is.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +3 -0
- package/node_modules/zod/v4/locales/it.js +3 -0
- package/node_modules/zod/v4/locales/ja.cjs +3 -0
- package/node_modules/zod/v4/locales/ja.js +3 -0
- package/node_modules/zod/v4/locales/ka.cjs +3 -0
- package/node_modules/zod/v4/locales/ka.js +3 -0
- package/node_modules/zod/v4/locales/km.cjs +3 -0
- package/node_modules/zod/v4/locales/km.js +3 -0
- package/node_modules/zod/v4/locales/kn.cjs +141 -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 +114 -0
- package/node_modules/zod/v4/locales/ko.cjs +3 -0
- package/node_modules/zod/v4/locales/ko.js +3 -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 +3 -0
- package/node_modules/zod/v4/locales/mk.js +3 -0
- package/node_modules/zod/v4/locales/ms.cjs +3 -0
- package/node_modules/zod/v4/locales/ms.js +3 -0
- package/node_modules/zod/v4/locales/ne.cjs +136 -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 +109 -0
- package/node_modules/zod/v4/locales/nl.cjs +3 -0
- package/node_modules/zod/v4/locales/nl.js +3 -0
- package/node_modules/zod/v4/locales/nn.cjs +138 -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 +111 -0
- package/node_modules/zod/v4/locales/no.cjs +5 -2
- package/node_modules/zod/v4/locales/no.js +5 -2
- package/node_modules/zod/v4/locales/ota.cjs +3 -0
- package/node_modules/zod/v4/locales/ota.js +3 -0
- package/node_modules/zod/v4/locales/pl.cjs +3 -0
- package/node_modules/zod/v4/locales/pl.js +3 -0
- package/node_modules/zod/v4/locales/ps.cjs +3 -0
- package/node_modules/zod/v4/locales/ps.js +3 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +168 -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 +141 -0
- package/node_modules/zod/v4/locales/pt.cjs +87 -55
- package/node_modules/zod/v4/locales/pt.js +87 -55
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +10 -0
- package/node_modules/zod/v4/locales/ru.js +10 -0
- package/node_modules/zod/v4/locales/sk.cjs +141 -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 +114 -0
- package/node_modules/zod/v4/locales/sl.cjs +3 -0
- package/node_modules/zod/v4/locales/sl.js +3 -0
- package/node_modules/zod/v4/locales/sv.cjs +5 -2
- package/node_modules/zod/v4/locales/sv.js +5 -2
- package/node_modules/zod/v4/locales/ta.cjs +3 -0
- package/node_modules/zod/v4/locales/ta.js +3 -0
- package/node_modules/zod/v4/locales/th.cjs +3 -0
- package/node_modules/zod/v4/locales/th.js +3 -0
- package/node_modules/zod/v4/locales/tk.cjs +132 -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 +105 -0
- package/node_modules/zod/v4/locales/tr.cjs +3 -0
- package/node_modules/zod/v4/locales/tr.js +3 -0
- package/node_modules/zod/v4/locales/uk.cjs +3 -0
- package/node_modules/zod/v4/locales/uk.js +3 -0
- package/node_modules/zod/v4/locales/ur.cjs +3 -0
- package/node_modules/zod/v4/locales/ur.js +3 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +3 -0
- package/node_modules/zod/v4/locales/vi.js +3 -0
- package/node_modules/zod/v4/locales/yo.cjs +3 -0
- package/node_modules/zod/v4/locales/yo.js +3 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-CN.js +3 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-TW.js +3 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -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/deep-partial.cjs +39 -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 +12 -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 +63 -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/parse.cjs +3 -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 +75 -47
- package/node_modules/zod/v4/mini/schemas.d.cts +43 -13
- package/node_modules/zod/v4/mini/schemas.d.ts +43 -13
- package/node_modules/zod/v4/mini/schemas.js +71 -45
- 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";
|
|
@@ -43,25 +43,6 @@ function readPreferredString(params) {
|
|
|
43
43
|
function fallbackPublicKeyLabel(publicKey) {
|
|
44
44
|
return `${publicKey.slice(0, 8)}...${publicKey.slice(-6)}`;
|
|
45
45
|
}
|
|
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
46
|
function parseBuzzDirectoryProfileEvent(event) {
|
|
66
47
|
const publicKey = event.pubkey.trim().toLowerCase();
|
|
67
48
|
if (event.kind !== 0 || !HEX_PUBLIC_KEY_PATTERN.test(publicKey)) return;
|
|
@@ -189,10 +170,12 @@ var BuzzDirectoryState = class {
|
|
|
189
170
|
if (!membership) continue;
|
|
190
171
|
for (const publicKey of membership.members) if (publicKey !== this.#publicKey) peers.add(publicKey);
|
|
191
172
|
}
|
|
192
|
-
|
|
173
|
+
const entries = [...peers].map((publicKey) => this.#buildUserEntry(publicKey)).toSorted(compareDirectoryEntries);
|
|
174
|
+
return applyBuzzDirectoryQueryAndLimit(entries, params);
|
|
193
175
|
}
|
|
194
176
|
listGroups(params) {
|
|
195
|
-
|
|
177
|
+
const entries = this.activeRoomIds().map((roomId) => this.#buildRoomEntry(roomId)).toSorted(compareDirectoryEntries);
|
|
178
|
+
return applyBuzzDirectoryQueryAndLimit(entries, params);
|
|
196
179
|
}
|
|
197
180
|
listGroupMembers(params) {
|
|
198
181
|
let roomId;
|
|
@@ -204,7 +187,7 @@ var BuzzDirectoryState = class {
|
|
|
204
187
|
if (this.#rooms.get(roomId)?.archived) return [];
|
|
205
188
|
const membership = this.#memberships.get(roomId);
|
|
206
189
|
if (!membership) return [];
|
|
207
|
-
|
|
190
|
+
const entries = [...membership.members].map((publicKey) => {
|
|
208
191
|
const entry = this.#buildUserEntry(publicKey);
|
|
209
192
|
entry.raw = {
|
|
210
193
|
publicKey,
|
|
@@ -212,7 +195,8 @@ var BuzzDirectoryState = class {
|
|
|
212
195
|
roomId
|
|
213
196
|
};
|
|
214
197
|
return entry;
|
|
215
|
-
}).toSorted(compareDirectoryEntries)
|
|
198
|
+
}).toSorted(compareDirectoryEntries);
|
|
199
|
+
return applyBuzzDirectoryQueryAndLimit(entries, { limit: params.limit });
|
|
216
200
|
}
|
|
217
201
|
mentionMembers(roomId) {
|
|
218
202
|
const normalized = parseBuzzTarget(roomId);
|
|
@@ -808,6 +792,7 @@ async function catchUpBuzzRoomHistory(params) {
|
|
|
808
792
|
if (!reservation) return "aborted";
|
|
809
793
|
let page;
|
|
810
794
|
try {
|
|
795
|
+
if (params.signal?.aborted) return "aborted";
|
|
811
796
|
page = await queryBuzzRoomHistoryPage({
|
|
812
797
|
relay: params.relay,
|
|
813
798
|
channelId: params.channelId,
|
|
@@ -859,7 +844,6 @@ async function catchUpBuzzRoomHistory(params) {
|
|
|
859
844
|
//#endregion
|
|
860
845
|
//#region extensions/buzz/src/room-membership-tracker.ts
|
|
861
846
|
const MEMBERSHIP_READY_TIMEOUT_MS = 1e4;
|
|
862
|
-
const MEMBERSHIP_TRACKER_SETUP_CLOSE_REASON = "membership tracker setup failed";
|
|
863
847
|
const BUZZ_ROOM_METADATA_EDIT_KIND = 9002;
|
|
864
848
|
const MEMBERSHIP_REFRESH_DELAYS_MS = [
|
|
865
849
|
100,
|
|
@@ -894,8 +878,10 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
894
878
|
const deniedMembers = /* @__PURE__ */ new Map();
|
|
895
879
|
const pendingMemberships = /* @__PURE__ */ new Map();
|
|
896
880
|
const refreshes = /* @__PURE__ */ new Map();
|
|
881
|
+
const restoringRooms = /* @__PURE__ */ new Map();
|
|
897
882
|
let membershipQueryTail = Promise.resolve();
|
|
898
883
|
const memberships = await queryBuzzRoomMemberships(params);
|
|
884
|
+
params.signal?.throwIfAborted();
|
|
899
885
|
const effectiveMemberships = () => {
|
|
900
886
|
if (blockedRooms.size === 0 && deniedMembers.size === 0) return memberships;
|
|
901
887
|
const effective = /* @__PURE__ */ new Map();
|
|
@@ -938,12 +924,15 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
938
924
|
params.onMembershipsChanged?.(effectiveMemberships());
|
|
939
925
|
};
|
|
940
926
|
const queryMembership = (channelId) => {
|
|
941
|
-
const query = membershipQueryTail.then(async () =>
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
927
|
+
const query = membershipQueryTail.then(async () => {
|
|
928
|
+
params.signal?.throwIfAborted();
|
|
929
|
+
return (await queryBuzzRoomMemberships({
|
|
930
|
+
relay: params.relay,
|
|
931
|
+
relayPublicKey: params.relayPublicKey,
|
|
932
|
+
channelIds: [channelId],
|
|
933
|
+
signal: params.signal
|
|
934
|
+
})).get(channelId);
|
|
935
|
+
});
|
|
947
936
|
membershipQueryTail = query.then(() => void 0, () => void 0);
|
|
948
937
|
return query;
|
|
949
938
|
};
|
|
@@ -956,6 +945,7 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
956
945
|
let refreshed;
|
|
957
946
|
try {
|
|
958
947
|
refreshed = await queryMembership(channelId);
|
|
948
|
+
params.signal?.throwIfAborted();
|
|
959
949
|
} catch (error) {
|
|
960
950
|
if (params.signal?.aborted) throw error;
|
|
961
951
|
continue;
|
|
@@ -1005,6 +995,9 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
1005
995
|
if (!membership) return;
|
|
1006
996
|
const change = parseBuzzRoomMembershipChangeEvent(event, membership);
|
|
1007
997
|
if (!change) return;
|
|
998
|
+
const restoring = restoringRooms.get(channelId);
|
|
999
|
+
if (restoring?.historical) return;
|
|
1000
|
+
if (restoring) restoring.generation += 1;
|
|
1008
1001
|
const expected = change.type === "member_joined" ? "present" : "absent";
|
|
1009
1002
|
const pending = pendingMemberships.get(channelId) ?? /* @__PURE__ */ new Map();
|
|
1010
1003
|
pending.set(change.targetPublicKey, expected);
|
|
@@ -1019,6 +1012,13 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
1019
1012
|
return refreshMembershipOnce(channelId);
|
|
1020
1013
|
};
|
|
1021
1014
|
const handleRoomEvent = (event, reservation) => {
|
|
1015
|
+
if (params.signal?.aborted) return;
|
|
1016
|
+
const channelId = event.tags.find((tag) => tag[0] === "h")?.[1];
|
|
1017
|
+
const restoring = channelId ? restoringRooms.get(channelId) : void 0;
|
|
1018
|
+
if (restoring && isBuzzInboundMessageKind(event.kind)) {
|
|
1019
|
+
restoring.until = Math.max(restoring.until ?? event.created_at, event.created_at);
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
1022
|
if (event.kind === 39002) {
|
|
1023
1023
|
const membership = parseBuzzRoomMembershipEvent(event, params.relayPublicKey);
|
|
1024
1024
|
if (membership && memberships.has(membership.roomId) && isNewerBuzzRevision(membership, memberships.get(membership.roomId))) try {
|
|
@@ -1034,20 +1034,31 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
handleSystemEvent(event)?.catch(reportSystemEventError);
|
|
1036
1036
|
};
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
});
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1037
|
+
const skippedRooms = /* @__PURE__ */ new Set();
|
|
1038
|
+
const initialRoomIds = [];
|
|
1039
|
+
for (const channelId of params.channelIds) if (memberships.get(channelId)?.roles.get(params.botPublicKey) !== "bot") {
|
|
1040
|
+
skippedRooms.add(channelId);
|
|
1041
|
+
params.onRoomUnavailable?.(/* @__PURE__ */ new Error(`Buzz bot does not have the Bot role in configured room ${channelId}`));
|
|
1042
|
+
} else initialRoomIds.push(channelId);
|
|
1043
|
+
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(", ")}`);
|
|
1044
|
+
const subscribeRoom = (channelId) => {
|
|
1045
|
+
params.signal?.throwIfAborted();
|
|
1046
|
+
return new Promise((resolve, reject) => {
|
|
1047
|
+
let settled = false;
|
|
1048
|
+
const finish = (error) => {
|
|
1049
|
+
if (settled) return;
|
|
1050
|
+
settled = true;
|
|
1051
|
+
clearTimeout(timeout);
|
|
1052
|
+
params.signal?.removeEventListener("abort", onAbort);
|
|
1053
|
+
if (error === void 0) resolve();
|
|
1054
|
+
else reject(error instanceof Error ? error : new Error("Buzz room membership loading failed", { cause: error }));
|
|
1055
|
+
};
|
|
1056
|
+
const onAbort = () => finish(params.signal?.reason ?? /* @__PURE__ */ new Error("Buzz membership loading aborted"));
|
|
1057
|
+
const timeout = setTimeout(() => {
|
|
1058
|
+
finish(/* @__PURE__ */ new Error(`Timed out loading Buzz room membership changes for ${channelId}`));
|
|
1059
|
+
params.relay.close();
|
|
1060
|
+
}, MEMBERSHIP_READY_TIMEOUT_MS);
|
|
1061
|
+
params.signal?.addEventListener("abort", onAbort, { once: true });
|
|
1051
1062
|
const filters = [
|
|
1052
1063
|
{
|
|
1053
1064
|
kinds: [BUZZ_ROOM_SYSTEM_KIND, BUZZ_ROOM_METADATA_EDIT_KIND],
|
|
@@ -1067,63 +1078,141 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
1067
1078
|
limit: params.messageLimit
|
|
1068
1079
|
}
|
|
1069
1080
|
];
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
if (
|
|
1075
|
-
page
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
+
try {
|
|
1082
|
+
openBuzzRelaySubscription(params.relay, filters, {
|
|
1083
|
+
onevent: (event) => {
|
|
1084
|
+
if (params.signal?.aborted) return;
|
|
1085
|
+
if (!historicalRooms.has(channelId) && isBuzzInboundMessageKind(event.kind)) {
|
|
1086
|
+
const page = historyPages.get(channelId);
|
|
1087
|
+
if (page) {
|
|
1088
|
+
page.count += 1;
|
|
1089
|
+
page.oldest = Math.min(page.oldest, event.created_at);
|
|
1090
|
+
} else historyPages.set(channelId, {
|
|
1091
|
+
count: 1,
|
|
1092
|
+
oldest: event.created_at
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
handleRoomEvent(event);
|
|
1096
|
+
},
|
|
1097
|
+
oneose: () => {
|
|
1098
|
+
historicalRooms.add(channelId);
|
|
1099
|
+
const restoring = restoringRooms.get(channelId);
|
|
1100
|
+
if (restoring) restoring.historical = false;
|
|
1101
|
+
finish();
|
|
1102
|
+
},
|
|
1103
|
+
onclose: (reason) => {
|
|
1104
|
+
const error = /* @__PURE__ */ new Error(`Buzz membership subscription closed for ${channelId}: ${reason}`);
|
|
1105
|
+
if (!historicalRooms.has(channelId)) finish(error);
|
|
1106
|
+
else if (reason !== "shutdown" && reason !== "relay connection closed by us" && !params.signal?.aborted) reportSystemEventError(error);
|
|
1081
1107
|
}
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
}, filters.map((filter) => Object.assign({}, filter, { "#h": [channelId] }))));
|
|
1093
|
-
}
|
|
1094
|
-
await historicalReady;
|
|
1108
|
+
}, filters.map((filter) => Object.assign({}, filter, { "#h": [channelId] })));
|
|
1109
|
+
} catch (error) {
|
|
1110
|
+
finish(error);
|
|
1111
|
+
}
|
|
1112
|
+
});
|
|
1113
|
+
};
|
|
1114
|
+
const initialSubscriptions = [];
|
|
1115
|
+
try {
|
|
1116
|
+
for (const channelId of initialRoomIds) initialSubscriptions.push(subscribeRoom(channelId));
|
|
1117
|
+
await Promise.all(initialSubscriptions);
|
|
1095
1118
|
} catch (error) {
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
}
|
|
1119
|
+
params.relay.close();
|
|
1120
|
+
await Promise.allSettled(initialSubscriptions);
|
|
1099
1121
|
throw error;
|
|
1100
|
-
} finally {
|
|
1101
|
-
clearTimeout(historicalTimeout);
|
|
1102
1122
|
}
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
for (const channelId of
|
|
1123
|
+
let historyTail = Promise.resolve();
|
|
1124
|
+
const catchUpHistory = (channelIds, recoveryUntil) => {
|
|
1125
|
+
const task = historyTail.then(async () => {
|
|
1126
|
+
for (const channelId of channelIds) {
|
|
1107
1127
|
const page = historyPages.get(channelId);
|
|
1128
|
+
const until = recoveryUntil ?? page?.oldest;
|
|
1108
1129
|
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
|
-
}
|
|
1130
|
+
if (until === void 0 || recoveryUntil === void 0 && page && page.count < params.messageLimit) continue;
|
|
1131
|
+
if (await catchUpBuzzRoomHistory({
|
|
1132
|
+
relay: params.relay,
|
|
1133
|
+
channelId,
|
|
1134
|
+
since: params.messageSince(channelId),
|
|
1135
|
+
until,
|
|
1136
|
+
limit: params.messageLimit,
|
|
1137
|
+
reserveCapacity: params.reserveDispatchCapacity,
|
|
1138
|
+
onEvent: handleRoomEvent,
|
|
1139
|
+
signal: params.signal
|
|
1140
|
+
}) === "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
1141
|
}
|
|
1142
|
+
}).catch(reportSystemEventError);
|
|
1143
|
+
historyTail = task;
|
|
1144
|
+
return task;
|
|
1145
|
+
};
|
|
1146
|
+
const restorations = /* @__PURE__ */ new Map();
|
|
1147
|
+
const restoreRoom = async (channelId, state) => {
|
|
1148
|
+
while (!params.signal?.aborted) {
|
|
1149
|
+
const generation = state.generation;
|
|
1150
|
+
let refreshed = await queryMembership(channelId);
|
|
1151
|
+
params.signal?.throwIfAborted();
|
|
1152
|
+
if (generation !== state.generation) continue;
|
|
1153
|
+
const current = memberships.get(channelId);
|
|
1154
|
+
if (current && (!refreshed || isNewerBuzzRevision(current, refreshed))) refreshed = current;
|
|
1155
|
+
if (!refreshed) return;
|
|
1156
|
+
if (refreshed.roles.get(params.botPublicKey) !== "bot") {
|
|
1157
|
+
memberships.set(channelId, refreshed);
|
|
1158
|
+
params.onMembershipsChanged?.(effectiveMemberships());
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
replaceMembership(refreshed);
|
|
1162
|
+
params.signal?.throwIfAborted();
|
|
1163
|
+
skippedRooms.delete(channelId);
|
|
1164
|
+
const restoring = {
|
|
1165
|
+
historical: true,
|
|
1166
|
+
generation: 0
|
|
1167
|
+
};
|
|
1168
|
+
restoringRooms.set(channelId, restoring);
|
|
1169
|
+
await subscribeRoom(channelId);
|
|
1170
|
+
while (!params.signal?.aborted) {
|
|
1171
|
+
const refresh = refreshes.get(channelId);
|
|
1172
|
+
if (refresh) await refresh.promise;
|
|
1173
|
+
params.signal?.throwIfAborted();
|
|
1174
|
+
const reconciliationGeneration = restoring.generation;
|
|
1175
|
+
let confirmed = await queryMembership(channelId);
|
|
1176
|
+
params.signal?.throwIfAborted();
|
|
1177
|
+
if (reconciliationGeneration !== restoring.generation || refreshes.has(channelId)) continue;
|
|
1178
|
+
const latest = memberships.get(channelId);
|
|
1179
|
+
if (latest && confirmed && isNewerBuzzRevision(latest, confirmed)) confirmed = latest;
|
|
1180
|
+
if (!confirmed) throw new Error(`Buzz room membership missing after restoration for ${channelId}`);
|
|
1181
|
+
replaceMembership(confirmed);
|
|
1182
|
+
params.signal?.throwIfAborted();
|
|
1183
|
+
restoringRooms.delete(channelId);
|
|
1184
|
+
await catchUpHistory([channelId], restoring.until);
|
|
1185
|
+
return;
|
|
1186
|
+
}
|
|
1187
|
+
return;
|
|
1188
|
+
}
|
|
1189
|
+
};
|
|
1190
|
+
return {
|
|
1191
|
+
memberships: effectiveMemberships,
|
|
1192
|
+
catchUpHistory: () => catchUpHistory(initialRoomIds),
|
|
1193
|
+
handleNotification: (notification) => {
|
|
1194
|
+
if (params.signal?.aborted || seenEventIds.has(notification.eventId)) return true;
|
|
1195
|
+
if (!skippedRooms.has(notification.roomId)) return false;
|
|
1196
|
+
markSystemEventSeen(notification.eventId);
|
|
1197
|
+
const existing = restorations.get(notification.roomId);
|
|
1198
|
+
if (existing) {
|
|
1199
|
+
existing.generation += 1;
|
|
1200
|
+
return true;
|
|
1201
|
+
}
|
|
1202
|
+
const state = {
|
|
1203
|
+
generation: 1,
|
|
1204
|
+
promise: Promise.resolve()
|
|
1205
|
+
};
|
|
1206
|
+
restorations.set(notification.roomId, state);
|
|
1207
|
+
state.promise = restoreRoom(notification.roomId, state).catch(reportSystemEventError).finally(() => restorations.delete(notification.roomId));
|
|
1208
|
+
return true;
|
|
1209
|
+
},
|
|
1210
|
+
close: async () => {
|
|
1211
|
+
await Promise.allSettled([
|
|
1212
|
+
...[...restorations.values()].map((state) => state.promise),
|
|
1213
|
+
...[...refreshes.values()].map((state) => state.promise),
|
|
1214
|
+
historyTail
|
|
1215
|
+
]);
|
|
1127
1216
|
}
|
|
1128
1217
|
};
|
|
1129
1218
|
}
|
|
@@ -1307,6 +1396,7 @@ async function startBuzzBus(options) {
|
|
|
1307
1396
|
let directoryRelay;
|
|
1308
1397
|
let stopPresenceHeartbeat = () => {};
|
|
1309
1398
|
let profileTask;
|
|
1399
|
+
let membershipTracker;
|
|
1310
1400
|
const bus = {
|
|
1311
1401
|
publicKey,
|
|
1312
1402
|
directory,
|
|
@@ -1347,6 +1437,7 @@ async function startBuzzBus(options) {
|
|
|
1347
1437
|
directoryRelay?.close();
|
|
1348
1438
|
replayGuard.clearMemory();
|
|
1349
1439
|
relay.close();
|
|
1440
|
+
await membershipTracker?.close();
|
|
1350
1441
|
await profileTask;
|
|
1351
1442
|
}
|
|
1352
1443
|
};
|
|
@@ -1376,9 +1467,10 @@ async function startBuzzBus(options) {
|
|
|
1376
1467
|
configuredRoomIds: options.channelIds,
|
|
1377
1468
|
since: sessionStartedAt,
|
|
1378
1469
|
signal,
|
|
1470
|
+
onNotification: (notification) => membershipTracker?.handleNotification(notification) ?? false,
|
|
1379
1471
|
onFatalError: reportFatalError
|
|
1380
1472
|
});
|
|
1381
|
-
|
|
1473
|
+
membershipTracker = activeChannelIds.length > 0 ? await createBuzzRoomMembershipTracker({
|
|
1382
1474
|
relay,
|
|
1383
1475
|
relayPublicKey,
|
|
1384
1476
|
channelIds: activeChannelIds,
|
|
@@ -1388,6 +1480,7 @@ async function startBuzzBus(options) {
|
|
|
1388
1480
|
messageLimit: resolveBuzzRoomHistoryLimit(activeChannelIds.length),
|
|
1389
1481
|
reserveDispatchCapacity: (slots) => dispatchQueue.reserveCapacity(slots),
|
|
1390
1482
|
onHistoryError: options.onHistoryError,
|
|
1483
|
+
onRoomUnavailable: options.onRoomUnavailable,
|
|
1391
1484
|
onMessageEvent: (event, isMember, reservation) => {
|
|
1392
1485
|
if (signal.aborted || event.pubkey === publicKey) return;
|
|
1393
1486
|
const message = parseBuzzMessageEvent(event);
|
|
@@ -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-BVHkrP3Z.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-BVHkrP3Z.mjs";
|
|
2
2
|
export { buzzPlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as listBuzzDirectoryPeersFromConfig, t as listBuzzDirectoryGroupsFromConfig } from "
|
|
1
|
+
import { n as listBuzzDirectoryPeersFromConfig, t as listBuzzDirectoryGroupsFromConfig } from "./.setup/directory-config-CzHz6fzo.mjs";
|
|
2
2
|
//#region extensions/buzz/directory-contract-api.ts
|
|
3
3
|
const buzzDirectoryContractPlugin = {
|
|
4
4
|
id: "buzz",
|
package/dist/qa-runner-api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLazyCliRuntimeLoader, createLiveTransportQaCliRegistration, runLiveTransportQaSuiteCommand } from "openclaw/plugin-sdk/qa-runner-runtime";
|
|
2
2
|
//#region extensions/buzz/src/qa/cli.ts
|
|
3
3
|
const DEFAULT_BUZZ_QA_SCENARIOS = ["channel-canary", "channel-mention-gating"];
|
|
4
|
-
const loadBuzzQaAdapterRuntime = createLazyCliRuntimeLoader(() => import("
|
|
4
|
+
const loadBuzzQaAdapterRuntime = createLazyCliRuntimeLoader(() => import("./.setup/adapter.runtime-FIC9NMFI.mjs"));
|
|
5
5
|
async function runQaBuzz(options) {
|
|
6
6
|
await runLiveTransportQaSuiteCommand({
|
|
7
7
|
channelId: "buzz",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "
|
|
1
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./.setup/secret-contract-DjibkTDL.mjs";
|
|
2
2
|
export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
|