@openclaw/buzz 2026.8.2 → 2026.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter.runtime-D5F1GtRt.js → adapter.runtime-CaDdxQ2C.js} +2 -2
- package/dist/api.js +1 -1
- package/dist/{channel-DqCc8xM-.js → channel-B50upNWy.js} +10 -13
- package/dist/channel-plugin-api.js +1 -1
- package/dist/qa-runner-api.js +1 -1
- package/dist/{room-membership-DQWdu_74.js → room-membership-a8IHfdgL.js} +6 -4
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-DxXaoPaj.js → setup-surface-DDUmAluL.js} +8 -2
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as parseBuzzTarget, n as decodeBuzzPrivateKey, o as resolveBuzzPublicKey, u as buildBuzzTarget } from "./types-CeupBG0P.js";
|
|
2
|
-
import {
|
|
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-a8IHfdgL.js";
|
|
3
3
|
import { i as buildBuzzMessageTags, s as parseBuzzMessageEvent } from "./message-event-X_aBiM1X.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { finalizeEvent } from "nostr-tools";
|
|
@@ -96,7 +96,7 @@ async function loadBuzzQaRoomMembership(params) {
|
|
|
96
96
|
}], {
|
|
97
97
|
onevent: (event) => {
|
|
98
98
|
const membership = parseBuzzRoomMembershipEvent(event, params.relayPublicKey);
|
|
99
|
-
if (membership?.roomId === params.roomId &&
|
|
99
|
+
if (membership?.roomId === params.roomId && isNewerBuzzRevision(membership, latest)) latest = membership;
|
|
100
100
|
},
|
|
101
101
|
oneose: () => {
|
|
102
102
|
receivedEose = true;
|
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { i as resolveBuzzAccount, r as listBuzzAccountIds, s as resolveDefaultBuzzAccountId } from "./types-CeupBG0P.js";
|
|
2
|
-
import { n as getBuzzRuntime, r as setBuzzRuntime, t as buzzPlugin } from "./channel-
|
|
2
|
+
import { n as getBuzzRuntime, r as setBuzzRuntime, t as buzzPlugin } from "./channel-B50upNWy.js";
|
|
3
3
|
export { buzzPlugin, getBuzzRuntime, listBuzzAccountIds, resolveBuzzAccount, resolveDefaultBuzzAccountId, setBuzzRuntime };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
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.js";
|
|
2
2
|
import { n as listBuzzDirectoryPeersFromConfig, t as listBuzzDirectoryGroupsFromConfig } from "./directory-config-B0shiBa4.js";
|
|
3
|
-
import { a as
|
|
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-a8IHfdgL.js";
|
|
4
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.js";
|
|
5
|
-
import { i as startBuzzRoomMembershipNotifications, n as buzzSetupContract, r as discoverBuzzRooms, t as buzzSetupWizard } from "./setup-surface-
|
|
5
|
+
import { i as startBuzzRoomMembershipNotifications, n as buzzSetupContract, r as discoverBuzzRooms, t as buzzSetupWizard } from "./setup-surface-DDUmAluL.js";
|
|
6
6
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DNuqbK64.js";
|
|
7
7
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
8
8
|
import { buildChannelOutboundSessionRoute, buildThreadAwareOutboundSessionRoute, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
@@ -10,7 +10,7 @@ import { createChannelMessageAdapterFromOutbound, waitUntilAbort } from "opencla
|
|
|
10
10
|
import { createChannelDirectoryAdapter } from "openclaw/plugin-sdk/directory-runtime";
|
|
11
11
|
import { parseThreadSessionSuffix } from "openclaw/plugin-sdk/routing";
|
|
12
12
|
import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
13
|
-
import { finalizeEvent } from "nostr-tools";
|
|
13
|
+
import { compareEvents, finalizeEvent } from "nostr-tools";
|
|
14
14
|
import { chunkItems } from "openclaw/plugin-sdk/text-chunking";
|
|
15
15
|
import { truncateUtf16Safe, truncateUtf8Prefix } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
16
16
|
import { attachChannelToResult } from "openclaw/plugin-sdk/channel-send-result";
|
|
@@ -40,9 +40,6 @@ function readPreferredString(params) {
|
|
|
40
40
|
if (Object.hasOwn(params.content, params.primary)) return normalizeBoundedString(params.content[params.primary], params.maxChars);
|
|
41
41
|
return normalizeBoundedString(params.content[params.fallback], params.maxChars);
|
|
42
42
|
}
|
|
43
|
-
function isNewerEvent(candidate, current) {
|
|
44
|
-
return !current || candidate.createdAt > current.createdAt || candidate.createdAt === current.createdAt && candidate.eventId < current.eventId;
|
|
45
|
-
}
|
|
46
43
|
function fallbackPublicKeyLabel(publicKey) {
|
|
47
44
|
return `${publicKey.slice(0, 8)}...${publicKey.slice(-6)}`;
|
|
48
45
|
}
|
|
@@ -164,13 +161,13 @@ var BuzzDirectoryState = class {
|
|
|
164
161
|
}
|
|
165
162
|
applyProfileEvent(event) {
|
|
166
163
|
const profile = parseBuzzDirectoryProfileEvent(event);
|
|
167
|
-
if (!profile || !this.#profilePublicKeys.has(profile.publicKey) || !
|
|
164
|
+
if (!profile || !this.#profilePublicKeys.has(profile.publicKey) || !isNewerBuzzRevision(profile, this.#profiles.get(profile.publicKey))) return false;
|
|
168
165
|
this.#profiles.set(profile.publicKey, profile);
|
|
169
166
|
return true;
|
|
170
167
|
}
|
|
171
168
|
applyRoomEvent(event) {
|
|
172
169
|
const room = parseBuzzDirectoryRoomEvent(event);
|
|
173
|
-
if (!room || !this.#configuredRoomIds.has(room.roomId) || !
|
|
170
|
+
if (!room || !this.#configuredRoomIds.has(room.roomId) || !isNewerBuzzRevision(room, this.#rooms.get(room.roomId))) return false;
|
|
174
171
|
this.#rooms.set(room.roomId, room);
|
|
175
172
|
return true;
|
|
176
173
|
}
|
|
@@ -498,7 +495,7 @@ async function queryCurrentProfiles(params) {
|
|
|
498
495
|
closeMessage: (reason) => `Buzz profile query closed: ${reason}`,
|
|
499
496
|
onEvent: (event) => {
|
|
500
497
|
const current = latestByKind.get(event.kind);
|
|
501
|
-
if (!current || event
|
|
498
|
+
if (!current || compareEvents(event, current) < 0) latestByKind.set(event.kind, event);
|
|
502
499
|
},
|
|
503
500
|
result: () => latestByKind,
|
|
504
501
|
onTimeout: params.onTimeout
|
|
@@ -711,7 +708,7 @@ async function queryBuzzRoomMembershipBatch(params) {
|
|
|
711
708
|
closeMessage: (reason) => `Buzz room membership query closed: ${reason}`,
|
|
712
709
|
onEvent: (event) => {
|
|
713
710
|
const membership = parseBuzzRoomMembershipEvent(event, params.relayPublicKey);
|
|
714
|
-
if (membership && configuredRooms.has(membership.roomId) &&
|
|
711
|
+
if (membership && configuredRooms.has(membership.roomId) && isNewerBuzzRevision(membership, memberships.get(membership.roomId))) memberships.set(membership.roomId, membership);
|
|
715
712
|
},
|
|
716
713
|
result: () => memberships,
|
|
717
714
|
checkAbortAfterSubscribe: true
|
|
@@ -724,7 +721,7 @@ async function queryBuzzRoomMemberships(params) {
|
|
|
724
721
|
...params,
|
|
725
722
|
channelIds: params.channelIds.slice(index, index + RELAY_QUERY_EVENT_LIMIT)
|
|
726
723
|
});
|
|
727
|
-
for (const [roomId, membership] of batch) if (
|
|
724
|
+
for (const [roomId, membership] of batch) if (isNewerBuzzRevision(membership, memberships.get(roomId))) memberships.set(roomId, membership);
|
|
728
725
|
}
|
|
729
726
|
return memberships;
|
|
730
727
|
}
|
|
@@ -965,7 +962,7 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
965
962
|
}
|
|
966
963
|
if (state.generation !== generation || !refreshed) continue;
|
|
967
964
|
const current = memberships.get(channelId);
|
|
968
|
-
if (current &&
|
|
965
|
+
if (current && isNewerBuzzRevision(current, refreshed)) refreshed = current;
|
|
969
966
|
const pending = pendingMemberships.get(channelId);
|
|
970
967
|
if (!(!pending || [...pending].every(([publicKey, expected]) => refreshed.members.has(publicKey) === (expected === "present")))) continue;
|
|
971
968
|
pendingMemberships.delete(channelId);
|
|
@@ -1024,7 +1021,7 @@ async function createBuzzRoomMembershipTracker(params) {
|
|
|
1024
1021
|
const handleRoomEvent = (event, reservation) => {
|
|
1025
1022
|
if (event.kind === 39002) {
|
|
1026
1023
|
const membership = parseBuzzRoomMembershipEvent(event, params.relayPublicKey);
|
|
1027
|
-
if (membership && memberships.has(membership.roomId) &&
|
|
1024
|
+
if (membership && memberships.has(membership.roomId) && isNewerBuzzRevision(membership, memberships.get(membership.roomId))) try {
|
|
1028
1025
|
replaceMembership(membership);
|
|
1029
1026
|
} catch (error) {
|
|
1030
1027
|
reportSystemEventError(error);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as buzzPlugin } from "./channel-
|
|
1
|
+
import { t as buzzPlugin } from "./channel-B50upNWy.js";
|
|
2
2
|
export { buzzPlugin };
|
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("./adapter.runtime-
|
|
4
|
+
const loadBuzzQaAdapterRuntime = createLazyCliRuntimeLoader(() => import("./adapter.runtime-CaDdxQ2C.js"));
|
|
5
5
|
async function runQaBuzz(options) {
|
|
6
6
|
await runLiveTransportQaSuiteCommand({
|
|
7
7
|
channelId: "buzz",
|
|
@@ -2,6 +2,11 @@ import { l as BUZZ_CHANNEL_ID_PATTERN } from "./types-CeupBG0P.js";
|
|
|
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";
|
|
5
|
+
//#region extensions/buzz/src/event-order.ts
|
|
6
|
+
function isNewerBuzzRevision(candidate, current) {
|
|
7
|
+
return !current || candidate.createdAt > current.createdAt || candidate.createdAt === current.createdAt && candidate.eventId < current.eventId;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
5
10
|
//#region extensions/buzz/src/relay-subscription.ts
|
|
6
11
|
function openBuzzRelaySubscription(relay, filters, params, requestFilters = filters) {
|
|
7
12
|
relay.idleSince = void 0;
|
|
@@ -252,9 +257,6 @@ function parseBuzzRoomMembershipEvent(event, relayPublicKey) {
|
|
|
252
257
|
roles
|
|
253
258
|
};
|
|
254
259
|
}
|
|
255
|
-
function isNewerBuzzRoomMembership(candidate, current) {
|
|
256
|
-
return !current || candidate.createdAt > current.createdAt || candidate.createdAt === current.createdAt && candidate.eventId < current.eventId;
|
|
257
|
-
}
|
|
258
260
|
function parseBuzzRoomMembershipChangeEvent(event, membership) {
|
|
259
261
|
if (event.kind !== 40099 || event.pubkey.toLowerCase() !== membership.publisherPublicKey || !event.tags.some((tag) => tag[0] === "h" && tag[1]?.toLowerCase() === membership.roomId)) return;
|
|
260
262
|
try {
|
|
@@ -271,4 +273,4 @@ function parseBuzzRoomMembershipChangeEvent(event, membership) {
|
|
|
271
273
|
}
|
|
272
274
|
}
|
|
273
275
|
//#endregion
|
|
274
|
-
export {
|
|
276
|
+
export { connectAuthenticatedBuzzRelay as a, openBuzzRelaySubscription as c, parseBuzzRoomMembershipEvent as i, queryBuzzRelaySnapshot as l, BUZZ_ROOM_SYSTEM_KIND as n, connectAuthenticatedBuzzRelaySession as o, parseBuzzRoomMembershipChangeEvent as r, parseBuzzAuthTag as s, BUZZ_ROOM_MEMBERSHIP_KIND as t, isNewerBuzzRevision as u };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as BuzzConfigSchema, i as resolveBuzzAccount, r as listBuzzAccountIds, s as resolveDefaultBuzzAccountId } from "./types-CeupBG0P.js";
|
|
2
|
-
import { n as buzzSetupContract, t as buzzSetupWizard } from "./setup-surface-
|
|
2
|
+
import { n as buzzSetupContract, t as buzzSetupWizard } from "./setup-surface-DDUmAluL.js";
|
|
3
3
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
4
4
|
//#region extensions/buzz/src/channel.setup.ts
|
|
5
5
|
const buzzSetupPlugin = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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.js";
|
|
2
|
-
import {
|
|
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-a8IHfdgL.js";
|
|
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";
|
|
@@ -100,7 +100,13 @@ async function discoverBuzzRoomsOnRelay(params) {
|
|
|
100
100
|
for (const event of metadataEvents) {
|
|
101
101
|
const roomId = tagValue(event, "d")?.toLowerCase();
|
|
102
102
|
const current = roomId ? latestMetadata.get(roomId) : void 0;
|
|
103
|
-
if (event.kind !== METADATA_KIND || event.pubkey.toLowerCase() !== params.relayPublicKey || !roomId || !roomIds.includes(roomId) ||
|
|
103
|
+
if (event.kind !== METADATA_KIND || event.pubkey.toLowerCase() !== params.relayPublicKey || !roomId || !roomIds.includes(roomId) || !isNewerBuzzRevision({
|
|
104
|
+
createdAt: event.created_at,
|
|
105
|
+
eventId: event.id
|
|
106
|
+
}, current ? {
|
|
107
|
+
createdAt: current.created_at,
|
|
108
|
+
eventId: current.id
|
|
109
|
+
} : void 0)) continue;
|
|
104
110
|
latestMetadata.set(roomId, event);
|
|
105
111
|
}
|
|
106
112
|
return roomIds.flatMap((id) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/buzz",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.9.1",
|
|
4
4
|
"description": "Connect OpenClaw agents to Buzz rooms",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"zod": "4.4.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.
|
|
15
|
+
"openclaw": ">=2026.9.1"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
"minHostVersion": ">=2026.7.2"
|
|
85
85
|
},
|
|
86
86
|
"compat": {
|
|
87
|
-
"pluginApi": ">=2026.
|
|
87
|
+
"pluginApi": ">=2026.9.1"
|
|
88
88
|
},
|
|
89
89
|
"build": {
|
|
90
|
-
"openclawVersion": "2026.
|
|
90
|
+
"openclawVersion": "2026.9.1"
|
|
91
91
|
},
|
|
92
92
|
"release": {
|
|
93
93
|
"publishToClawHub": true,
|