Plugins: internalize nostr SDK imports
This commit is contained in:
parent
f23a069d37
commit
dcdfed995a
@ -1 +1,2 @@
|
||||
export * from "openclaw/plugin-sdk/nostr";
|
||||
export * from "./src/setup-surface.js";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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.)
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -22,6 +22,7 @@ const GUARDED_CHANNEL_EXTENSIONS = new Set([
|
||||
"matrix",
|
||||
"mattermost",
|
||||
"msteams",
|
||||
"nostr",
|
||||
"nextcloud-talk",
|
||||
"nostr",
|
||||
"signal",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user