@openclaw/buzz 2026.9.2 → 2026.9.3
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/api.js +1 -1
- package/dist/{channel-Czma0_CC.js → channel-C6rro-f7.js} +10 -4
- package/dist/channel-plugin-api.js +1 -1
- package/node_modules/nostr-tools/README.md +23 -0
- package/node_modules/nostr-tools/lib/cjs/index.js +24 -14
- package/node_modules/nostr-tools/lib/cjs/index.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/nip27.js +24 -14
- package/node_modules/nostr-tools/lib/cjs/nip27.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/index.js +24 -14
- package/node_modules/nostr-tools/lib/esm/index.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/nip27.js +24 -14
- package/node_modules/nostr-tools/lib/esm/nip27.js.map +2 -2
- package/node_modules/nostr-tools/lib/nostr.bundle.js +24 -14
- package/node_modules/nostr-tools/lib/nostr.bundle.js.map +2 -2
- package/node_modules/nostr-tools/lib/types/nip27.d.ts +18 -0
- package/node_modules/nostr-tools/package.json +1 -1
- package/package.json +5 -5
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-C6rro-f7.js";
|
|
3
3
|
export { buzzPlugin, getBuzzRuntime, listBuzzAccountIds, resolveBuzzAccount, resolveDefaultBuzzAccountId, setBuzzRuntime };
|
|
@@ -2077,10 +2077,16 @@ const buzzPlugin = createChatChannelPlugin({
|
|
|
2077
2077
|
chatTypes: ["group"],
|
|
2078
2078
|
threads: true
|
|
2079
2079
|
},
|
|
2080
|
-
threading: { resolveReplyTransport: ({ replyDelivery }) =>
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2080
|
+
threading: { resolveReplyTransport: ({ replyDelivery, threadId, replyToId, replyToIsExplicit }) => {
|
|
2081
|
+
if (replyDelivery?.replyToMode === "off") return {
|
|
2082
|
+
threadId: null,
|
|
2083
|
+
replyToId: null
|
|
2084
|
+
};
|
|
2085
|
+
return threadId && replyToId && !replyToIsExplicit ? {
|
|
2086
|
+
threadId,
|
|
2087
|
+
replyToId: String(threadId)
|
|
2088
|
+
} : null;
|
|
2089
|
+
} },
|
|
2084
2090
|
agentPrompt: { messageToolHints: () => ["- Buzz targets: use a configured room UUID, `buzz:<ROOM_UUID>`, or a unique current room name. Use the UUID when room names are ambiguous.", "- Buzz mentions: write a unique current room member as `@Display Name`. For an explicit identity, include `nostr:npub...`; the public key must belong to the target room. Any unresolved or ambiguous label needs an explicit identity for every intended member."] },
|
|
2085
2091
|
reload: {
|
|
2086
2092
|
configPrefixes: ["channels.buzz"],
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as buzzPlugin } from "./channel-
|
|
1
|
+
import { t as buzzPlugin } from "./channel-C6rro-f7.js";
|
|
2
2
|
export { buzzPlugin };
|
|
@@ -459,6 +459,29 @@ summary for relay read message and verify event
|
|
|
459
459
|
</script>
|
|
460
460
|
```
|
|
461
461
|
|
|
462
|
+
### Using it with React Native
|
|
463
|
+
|
|
464
|
+
React Native requires polyfills:
|
|
465
|
+
|
|
466
|
+
```sh
|
|
467
|
+
npm install react-native-get-random-values text-encoding-polyfill react-native-url-polyfill
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
Import the polyfills at the very top of your entry file (`index.js`), **before** anything that imports `nostr-tools`:
|
|
471
|
+
|
|
472
|
+
```js
|
|
473
|
+
import 'react-native-get-random-values'
|
|
474
|
+
import 'text-encoding-polyfill'
|
|
475
|
+
import 'react-native-url-polyfill/auto'
|
|
476
|
+
|
|
477
|
+
import { AppRegistry } from 'react-native'
|
|
478
|
+
// ...
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
Future versions of React Native may implement these features natively, allowing the polyfills to be removed.
|
|
482
|
+
|
|
483
|
+
Note: `nostr-tools/wasm` will not work with React Native because it does not have WebAssembly support.
|
|
484
|
+
|
|
462
485
|
## Plumbing
|
|
463
486
|
|
|
464
487
|
To develop `@nostr/tools`, install [`just`](https://just.systems/) and run `just -l` to see commands available.
|
|
@@ -2963,8 +2963,8 @@ function* parse4(content) {
|
|
|
2963
2963
|
if (h === 0 || content[h - 1].match(noCharacter)) {
|
|
2964
2964
|
const m = content.slice(h + 1, h + MAX_HASHTAG_LENGTH).match(noCharacter);
|
|
2965
2965
|
const end = m ? h + 1 + m.index : max;
|
|
2966
|
-
yield { type: "text", text: content.slice(prevIndex, h) };
|
|
2967
|
-
yield { type: "hashtag", value: content.slice(h + 1, end) };
|
|
2966
|
+
yield { type: "text", text: content.slice(prevIndex, h), start: prevIndex, end: h };
|
|
2967
|
+
yield { type: "hashtag", value: content.slice(h + 1, end), start: h, end };
|
|
2968
2968
|
index = end;
|
|
2969
2969
|
prevIndex = index;
|
|
2970
2970
|
continue mainloop;
|
|
@@ -2992,9 +2992,9 @@ function* parse4(content) {
|
|
|
2992
2992
|
pointer = data;
|
|
2993
2993
|
}
|
|
2994
2994
|
if (prevIndex !== u - 5) {
|
|
2995
|
-
yield { type: "text", text: content.slice(prevIndex, u - 5) };
|
|
2995
|
+
yield { type: "text", text: content.slice(prevIndex, u - 5), start: prevIndex, end: u - 5 };
|
|
2996
2996
|
}
|
|
2997
|
-
yield { type: "reference", pointer };
|
|
2997
|
+
yield { type: "reference", pointer, start: u - 5, end };
|
|
2998
2998
|
index = end;
|
|
2999
2999
|
prevIndex = index;
|
|
3000
3000
|
continue mainloop;
|
|
@@ -3012,27 +3012,32 @@ function* parse4(content) {
|
|
|
3012
3012
|
throw new Error("invalid url");
|
|
3013
3013
|
}
|
|
3014
3014
|
if (prevIndex !== u - prefixLen) {
|
|
3015
|
-
yield {
|
|
3015
|
+
yield {
|
|
3016
|
+
type: "text",
|
|
3017
|
+
text: content.slice(prevIndex, u - prefixLen),
|
|
3018
|
+
start: prevIndex,
|
|
3019
|
+
end: u - prefixLen
|
|
3020
|
+
};
|
|
3016
3021
|
}
|
|
3017
3022
|
if (/\.(png|jpe?g|gif|webp|heic|svg)$/i.test(url.pathname)) {
|
|
3018
|
-
yield { type: "image", url: url.toString() };
|
|
3023
|
+
yield { type: "image", url: url.toString(), start: u - prefixLen, end };
|
|
3019
3024
|
index = end;
|
|
3020
3025
|
prevIndex = index;
|
|
3021
3026
|
continue mainloop;
|
|
3022
3027
|
}
|
|
3023
3028
|
if (/\.(mp4|avi|webm|mkv|mov)$/i.test(url.pathname)) {
|
|
3024
|
-
yield { type: "video", url: url.toString() };
|
|
3029
|
+
yield { type: "video", url: url.toString(), start: u - prefixLen, end };
|
|
3025
3030
|
index = end;
|
|
3026
3031
|
prevIndex = index;
|
|
3027
3032
|
continue mainloop;
|
|
3028
3033
|
}
|
|
3029
3034
|
if (/\.(mp3|aac|ogg|opus|wav|flac)$/i.test(url.pathname)) {
|
|
3030
|
-
yield { type: "audio", url: url.toString() };
|
|
3035
|
+
yield { type: "audio", url: url.toString(), start: u - prefixLen, end };
|
|
3031
3036
|
index = end;
|
|
3032
3037
|
prevIndex = index;
|
|
3033
3038
|
continue mainloop;
|
|
3034
3039
|
}
|
|
3035
|
-
yield { type: "url", url: url.toString() };
|
|
3040
|
+
yield { type: "url", url: url.toString(), start: u - prefixLen, end };
|
|
3036
3041
|
index = end;
|
|
3037
3042
|
prevIndex = index;
|
|
3038
3043
|
continue mainloop;
|
|
@@ -3050,9 +3055,14 @@ function* parse4(content) {
|
|
|
3050
3055
|
throw new Error("invalid ws url");
|
|
3051
3056
|
}
|
|
3052
3057
|
if (prevIndex !== u - prefixLen) {
|
|
3053
|
-
yield {
|
|
3058
|
+
yield {
|
|
3059
|
+
type: "text",
|
|
3060
|
+
text: content.slice(prevIndex, u - prefixLen),
|
|
3061
|
+
start: prevIndex,
|
|
3062
|
+
end: u - prefixLen
|
|
3063
|
+
};
|
|
3054
3064
|
}
|
|
3055
|
-
yield { type: "relay", url: url.toString() };
|
|
3065
|
+
yield { type: "relay", url: url.toString(), start: u - prefixLen, end };
|
|
3056
3066
|
index = end;
|
|
3057
3067
|
prevIndex = index;
|
|
3058
3068
|
continue mainloop;
|
|
@@ -3065,9 +3075,9 @@ function* parse4(content) {
|
|
|
3065
3075
|
const emoji = emojis[e];
|
|
3066
3076
|
if (content[u + emoji.shortcode.length + 1] === ":" && content.slice(u + 1, u + emoji.shortcode.length + 1) === emoji.shortcode) {
|
|
3067
3077
|
if (prevIndex !== u) {
|
|
3068
|
-
yield { type: "text", text: content.slice(prevIndex, u) };
|
|
3078
|
+
yield { type: "text", text: content.slice(prevIndex, u), start: prevIndex, end: u };
|
|
3069
3079
|
}
|
|
3070
|
-
yield emoji;
|
|
3080
|
+
yield { ...emoji, start: u, end: u + emoji.shortcode.length + 2 };
|
|
3071
3081
|
index = u + emoji.shortcode.length + 2;
|
|
3072
3082
|
prevIndex = index;
|
|
3073
3083
|
continue mainloop;
|
|
@@ -3078,7 +3088,7 @@ function* parse4(content) {
|
|
|
3078
3088
|
}
|
|
3079
3089
|
}
|
|
3080
3090
|
if (prevIndex !== max) {
|
|
3081
|
-
yield { type: "text", text: content.slice(prevIndex) };
|
|
3091
|
+
yield { type: "text", text: content.slice(prevIndex), start: prevIndex, end: max };
|
|
3082
3092
|
}
|
|
3083
3093
|
}
|
|
3084
3094
|
|