refactor: trim channel dead exports

This commit is contained in:
Peter Steinberger
2026-05-01 14:51:27 +01:00
parent 05d8c27d85
commit 9f55378745
3 changed files with 0 additions and 37 deletions

View File

@@ -1,10 +1 @@
export type { ChannelMessageActionName } from "openclaw/plugin-sdk/channel-contract";
export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core";
export { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
export { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
export {
buildProbeChannelStatusSummary,
createDefaultChannelRuntimeState,
} from "openclaw/plugin-sdk/status-helpers";
export { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";

View File

@@ -3,7 +3,6 @@ import { attachChannelToResult } from "openclaw/plugin-sdk/channel-send-result";
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
import {
createPreCryptoDirectDmAuthorizer,
DEFAULT_ACCOUNT_ID,
type ChannelOutboundAdapter,
resolveInboundDirectDmAccessWithRuntime,
type ChannelPlugin,
@@ -298,16 +297,6 @@ export const nostrOutboundAdapter: NostrOutboundAdapter = {
},
};
export function getNostrMetrics(
accountId: string = DEFAULT_ACCOUNT_ID,
): MetricsSnapshot | undefined {
const bus = activeBuses.get(accountId);
if (bus) {
return bus.getMetrics();
}
return metricsSnapshots.get(accountId);
}
export function getActiveNostrBuses(): Map<string, NostrBusHandle> {
return new Map(activeBuses);
}

View File

@@ -23,23 +23,6 @@ import {
} from "./engine/messaging/target-parser.js";
import type { ResolvedQQBotAccount } from "./types.js";
/** Maximum text length for a single QQ Bot message. */
export const TEXT_CHUNK_LIMIT = 5000;
/**
* Naive text chunking fallback.
*
* The outbound pipeline normally uses `runtime.channel.text.chunkMarkdownText`;
* this remains exported for callers that need the legacy channel helper.
*/
export function chunkText(text: string, limit: number = TEXT_CHUNK_LIMIT): string[] {
const chunks: string[] = [];
for (let i = 0; i < text.length; i += limit) {
chunks.push(text.slice(i, i + limit));
}
return chunks.length > 0 ? chunks : [text];
}
// Shared promise so concurrent multi-account startups serialize the dynamic
// import of the gateway module, avoiding an ESM circular-dependency race.
let _gatewayModulePromise: Promise<typeof import("./bridge/gateway.js")> | undefined;