refactor: trim extension runtime reexports

This commit is contained in:
Peter Steinberger
2026-05-01 14:27:17 +01:00
parent bae211f72a
commit 5fdde9353e
12 changed files with 4 additions and 44 deletions

View File

@@ -6,7 +6,6 @@ export {
errorShape,
isLoopbackHost,
isNodeCommandAllowed,
rawDataToString,
respondUnavailableOnNodeInvokeError,
resolveGatewayAuth,
resolveNodeCommandAllowlist,
@@ -17,7 +16,6 @@ export type {
GatewayRpcOpts,
NodeSession,
} from "openclaw/plugin-sdk/gateway-runtime";
export { runExec } from "openclaw/plugin-sdk/process-runtime";
export { runCommandWithRuntime } from "openclaw/plugin-sdk/cli-runtime";
export type { OpenClawPluginService } from "openclaw/plugin-sdk/plugin-entry";
export {

View File

@@ -11,5 +11,4 @@ export {
export {
createChannelApproverDmTargetResolver,
createChannelNativeOriginTargetResolver,
doesApprovalRequestMatchChannelAccount,
} from "openclaw/plugin-sdk/approval-native-runtime";

View File

@@ -36,8 +36,6 @@ export type RequestGuildMembersData = {
user_ids?: string | string[];
nonce?: string;
};
export type GatewayWebSocketLike = ws.WebSocket;
type GatewayPluginOptions = {
reconnect?: { maxAttempts?: number };
intents?: number;

View File

@@ -354,9 +354,3 @@ export function createDiscordAutoPresenceController(params: {
},
};
}
export const __testing = {
resolveAutoPresenceConfig,
resolveAuthAvailability,
stablePresenceSignature,
};

View File

@@ -153,5 +153,3 @@ export async function fetchReactionsDiscord(
}
return summaries;
}
export { fetchChannelPermissionsDiscord } from "./send.permissions.js";

View File

@@ -1,7 +1,6 @@
export {
createAccountScopedAllowFromSection,
createAccountScopedGroupAccessSection,
createAllowlistSetupWizardProxy,
createLegacyCompatChannelDmPolicy,
parseMentionOrPrefixedId,
patchChannelConfigForAccount,

View File

@@ -194,17 +194,6 @@ export function getProviderMonitorTestMocks(): typeof providerMonitorTestMocks {
return providerMonitorTestMocks;
}
export function mockResolvedDiscordAccountConfig(overrides: Record<string, unknown>) {
resolveDiscordAccountMock.mockImplementation(() => ({
accountId: "default",
token: "cfg-token",
config: {
...baseDiscordAccountConfig(),
...overrides,
},
}));
}
// oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Test helper lets assertions ascribe handler params shape.
export function getFirstDiscordMessageHandlerParams<T extends object>() {
expect(createDiscordMessageHandlerMock).toHaveBeenCalledTimes(1);

View File

@@ -1,6 +1 @@
export {
buildSecretInputSchema,
hasConfiguredSecretInput,
normalizeResolvedSecretInputString,
normalizeSecretInputString,
} from "openclaw/plugin-sdk/secret-input";
export { buildSecretInputSchema, hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";

View File

@@ -1,7 +1,6 @@
export {
buildChannelConfigSchema,
chunkTextForOutbound,
createAccountStatusSink,
DEFAULT_ACCOUNT_ID,
fetchRemoteMedia,
GoogleChatConfigSchema,
@@ -9,7 +8,6 @@ export {
missingTargetError,
PAIRING_APPROVED_MESSAGE,
resolveChannelMediaMaxBytes,
runPassiveAccountLifecycle,
type ChannelMessageActionAdapter,
type ChannelStatusIssue,
type OpenClawConfig,

View File

@@ -1,4 +1,5 @@
import type { App } from "@slack/bolt";
import { resolveDefaultAgentId } from "openclaw/plugin-sdk/agent-runtime";
import { formatAllowlistMatchMeta } from "openclaw/plugin-sdk/allow-from";
import type {
OpenClawConfig,
@@ -7,7 +8,6 @@ import type {
import type { SessionScope } from "openclaw/plugin-sdk/config-types";
import type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk/config-types";
import { createDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
import { resolveDefaultAgentId } from "openclaw/plugin-sdk/agent-runtime";
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
import type { HistoryEntry } from "openclaw/plugin-sdk/reply-history";
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
@@ -26,11 +26,7 @@ import { normalizeSlackChannelType } from "./channel-type.js";
import { resolveSessionKey } from "./config.runtime.js";
import { isSlackChannelAllowedByPolicy } from "./policy.js";
export {
inferSlackChannelType,
normalizeSlackChannelType,
resolveSlackChatType,
} from "./channel-type.js";
export { normalizeSlackChannelType, resolveSlackChatType } from "./channel-type.js";
export type SlackMonitorContext = {
cfg: OpenClawConfig;

View File

@@ -1,9 +1,6 @@
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
import { generateConversationLabel } from "openclaw/plugin-sdk/reply-dispatch-runtime";
export {
AUTO_TOPIC_LABEL_DEFAULT_PROMPT,
resolveAutoTopicLabelConfig,
} from "./auto-topic-label-config.js";
export { resolveAutoTopicLabelConfig } from "./auto-topic-label-config.js";
export async function generateTelegramTopicLabel(params: {
userMessage: string;

View File

@@ -1,6 +1,5 @@
export {
fetchRemoteMedia,
getAgentScopedMediaLocalRoots,
MediaFetchError,
saveMediaBuffer,
} from "openclaw/plugin-sdk/media-runtime";