@openclaw/nostr 2026.2.14 → 2026.2.15
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/channel.ts +4 -22
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/channel.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildChannelConfigSchema,
|
|
3
|
+
collectStatusIssuesFromLastError,
|
|
4
|
+
createDefaultChannelRuntimeState,
|
|
3
5
|
DEFAULT_ACCOUNT_ID,
|
|
4
6
|
formatPairingApproveHint,
|
|
5
7
|
type ChannelPlugin,
|
|
@@ -157,28 +159,8 @@ export const nostrPlugin: ChannelPlugin<ResolvedNostrAccount> = {
|
|
|
157
159
|
},
|
|
158
160
|
|
|
159
161
|
status: {
|
|
160
|
-
defaultRuntime:
|
|
161
|
-
|
|
162
|
-
running: false,
|
|
163
|
-
lastStartAt: null,
|
|
164
|
-
lastStopAt: null,
|
|
165
|
-
lastError: null,
|
|
166
|
-
},
|
|
167
|
-
collectStatusIssues: (accounts) =>
|
|
168
|
-
accounts.flatMap((account) => {
|
|
169
|
-
const lastError = typeof account.lastError === "string" ? account.lastError.trim() : "";
|
|
170
|
-
if (!lastError) {
|
|
171
|
-
return [];
|
|
172
|
-
}
|
|
173
|
-
return [
|
|
174
|
-
{
|
|
175
|
-
channel: "nostr",
|
|
176
|
-
accountId: account.accountId,
|
|
177
|
-
kind: "runtime" as const,
|
|
178
|
-
message: `Channel error: ${lastError}`,
|
|
179
|
-
},
|
|
180
|
-
];
|
|
181
|
-
}),
|
|
162
|
+
defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID),
|
|
163
|
+
collectStatusIssues: (accounts) => collectStatusIssuesFromLastError("nostr", accounts),
|
|
182
164
|
buildChannelSummary: ({ snapshot }) => ({
|
|
183
165
|
configured: snapshot.configured ?? false,
|
|
184
166
|
publicKey: snapshot.publicKey ?? null,
|