@openclaw/nostr 2026.6.11 → 2026.7.1-beta.2
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as resolveNostrAccount } from "./setup-surface-BqBa2C0K.js";
|
|
2
2
|
import { getPluginRuntimeGatewayRequestScope } from "./runtime-api.js";
|
|
3
3
|
import { n as NostrProfileSchema } from "./config-schema-DIiXiBKr.js";
|
|
4
|
-
import { a as setNostrRuntime, i as getNostrRuntime, n as nostrPlugin, o as contentToProfile, r as publishNostrProfile, t as getNostrProfileState } from "./channel-
|
|
4
|
+
import { a as setNostrRuntime, i as getNostrRuntime, n as nostrPlugin, o as contentToProfile, r as publishNostrProfile, t as getNostrProfileState } from "./channel-CV0aX1uq.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { SimplePool, verifyEvent } from "nostr-tools";
|
|
@@ -17,7 +17,7 @@ import { decrypt, encrypt } from "nostr-tools/nip04";
|
|
|
17
17
|
import { createDirectDmPreCryptoGuardPolicy } from "openclaw/plugin-sdk/direct-dm-guard-policy";
|
|
18
18
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
19
19
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
20
|
-
import { resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
20
|
+
import { resolveIntegerOption, resolvePositiveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
21
21
|
import { buildChannelOutboundSessionRoute, stripChannelTargetPrefix } from "openclaw/plugin-sdk/core";
|
|
22
22
|
//#region extensions/nostr/src/metrics.ts
|
|
23
23
|
/**
|
|
@@ -363,9 +363,10 @@ async function publishProfileEvent(pool, relays, event) {
|
|
|
363
363
|
const successes = [];
|
|
364
364
|
const failures = [];
|
|
365
365
|
const publishPromises = relays.map(async (relay) => {
|
|
366
|
+
let timer;
|
|
366
367
|
try {
|
|
367
368
|
const timeoutPromise = new Promise((_, reject) => {
|
|
368
|
-
setTimeout(() => reject(/* @__PURE__ */ new Error("timeout")), RELAY_PUBLISH_TIMEOUT_MS);
|
|
369
|
+
timer = setTimeout(() => reject(/* @__PURE__ */ new Error("timeout")), RELAY_PUBLISH_TIMEOUT_MS);
|
|
369
370
|
});
|
|
370
371
|
await Promise.race([...pool.publish([relay], event), timeoutPromise]);
|
|
371
372
|
successes.push(relay);
|
|
@@ -375,6 +376,8 @@ async function publishProfileEvent(pool, relays, event) {
|
|
|
375
376
|
relay,
|
|
376
377
|
error: errorMessage
|
|
377
378
|
});
|
|
379
|
+
} finally {
|
|
380
|
+
if (timer) clearTimeout(timer);
|
|
378
381
|
}
|
|
379
382
|
});
|
|
380
383
|
await Promise.all(publishPromises);
|
|
@@ -468,8 +471,8 @@ async function writeNostrProfileState(params) {
|
|
|
468
471
|
*/
|
|
469
472
|
function createSeenTracker(options) {
|
|
470
473
|
const maxEntries = resolveIntegerOption(options?.maxEntries, 1e5, { min: 1 });
|
|
471
|
-
const ttlMs = options?.ttlMs
|
|
472
|
-
const pruneIntervalMs = options?.pruneIntervalMs
|
|
474
|
+
const ttlMs = resolvePositiveTimerTimeoutMs(options?.ttlMs, 3600 * 1e3);
|
|
475
|
+
const pruneIntervalMs = resolvePositiveTimerTimeoutMs(options?.pruneIntervalMs, 600 * 1e3);
|
|
473
476
|
const entries = /* @__PURE__ */ new Map();
|
|
474
477
|
let head = null;
|
|
475
478
|
let tail = null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as nostrPlugin } from "./channel-
|
|
1
|
+
import { n as nostrPlugin } from "./channel-CV0aX1uq.js";
|
|
2
2
|
export { nostrPlugin };
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/nostr",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.7.1-beta.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/nostr",
|
|
9
|
-
"version": "2026.
|
|
9
|
+
"version": "2026.7.1-beta.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"nostr-tools": "2.23.5",
|
|
12
12
|
"zod": "4.4.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.
|
|
15
|
+
"openclaw": ">=2026.7.1-beta.2"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/nostr",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.7.1-beta.2",
|
|
4
4
|
"description": "OpenClaw Nostr channel plugin for NIP-04 encrypted direct messages.",
|
|
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.7.1-beta.2"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"minHostVersion": ">=2026.4.10"
|
|
51
51
|
},
|
|
52
52
|
"compat": {
|
|
53
|
-
"pluginApi": ">=2026.
|
|
53
|
+
"pluginApi": ">=2026.7.1-beta.2"
|
|
54
54
|
},
|
|
55
55
|
"build": {
|
|
56
|
-
"openclawVersion": "2026.
|
|
56
|
+
"openclawVersion": "2026.7.1-beta.2"
|
|
57
57
|
},
|
|
58
58
|
"release": {
|
|
59
59
|
"publishToClawHub": true,
|