Plugins: internalize nostr SDK imports

This commit is contained in:
Vincent Koc 2026-03-17 15:08:06 -07:00
parent f23a069d37
commit dcdfed995a
7 changed files with 12 additions and 10 deletions

View File

@ -1 +1,2 @@
export * from "openclaw/plugin-sdk/nostr";
export * from "./src/setup-surface.js";

View File

@ -1,3 +1,7 @@
import {
buildPassiveChannelStatusSummary,
buildTrafficStatusSummary,
} from "../../shared/channel-status-summary.js";
import {
buildChannelConfigSchema,
collectStatusIssuesFromLastError,
@ -6,11 +10,7 @@ import {
formatPairingApproveHint,
mapAllowFromEntries,
type ChannelPlugin,
} from "openclaw/plugin-sdk/nostr";
import {
buildPassiveChannelStatusSummary,
buildTrafficStatusSummary,
} from "../../shared/channel-status-summary.js";
} from "../api.js";
import type { NostrProfile } from "./config-schema.js";
import { NostrConfigSchema } from "./config-schema.js";
import type { MetricEvent, MetricsSnapshot } from "./metrics.js";

View File

@ -1,6 +1,6 @@
import { AllowFromListSchema, DmPolicySchema } from "openclaw/plugin-sdk/channel-config-schema";
import { MarkdownConfigSchema, buildChannelConfigSchema } from "openclaw/plugin-sdk/nostr";
import { z } from "zod";
import { MarkdownConfigSchema, buildChannelConfigSchema } from "../api.js";
/**
* Validates https:// URLs only (no javascript:, data:, file:, etc.)

View File

@ -8,13 +8,13 @@
*/
import type { IncomingMessage, ServerResponse } from "node:http";
import { z } from "zod";
import {
createFixedWindowRateLimiter,
isBlockedHostnameOrIp,
readJsonBodyWithLimit,
requestBodyErrorToText,
} from "openclaw/plugin-sdk/nostr";
import { z } from "zod";
} from "../api.js";
import { publishNostrProfile, getNostrProfileState } from "./channel.js";
import { NostrProfileSchema, type NostrProfile } from "./config-schema.js";
import { importProfileFromRelays, mergeProfiles } from "./nostr-profile-import.js";

View File

@ -1,5 +1,5 @@
import type { PluginRuntime } from "openclaw/plugin-sdk/nostr";
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
import type { PluginRuntime } from "../api.js";
const { setRuntime: setNostrRuntime, getRuntime: getNostrRuntime } =
createPluginRuntimeStore<PluginRuntime>("Nostr runtime not initialized");

View File

@ -3,7 +3,7 @@ import {
normalizeAccountId,
normalizeOptionalAccountId,
} from "openclaw/plugin-sdk/account-id";
import type { OpenClawConfig } from "openclaw/plugin-sdk/nostr";
import type { OpenClawConfig } from "../api.js";
import type { NostrProfile } from "./config-schema.js";
import { DEFAULT_RELAYS } from "./default-relays.js";
import { getPublicKeyFromPrivate } from "./nostr-bus.js";

View File

@ -22,6 +22,7 @@ const GUARDED_CHANNEL_EXTENSIONS = new Set([
"matrix",
"mattermost",
"msteams",
"nostr",
"nextcloud-talk",
"nostr",
"signal",