mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:00:43 +00:00
refactor: trim extension runtime reexports
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -11,5 +11,4 @@ export {
|
||||
export {
|
||||
createChannelApproverDmTargetResolver,
|
||||
createChannelNativeOriginTargetResolver,
|
||||
doesApprovalRequestMatchChannelAccount,
|
||||
} from "openclaw/plugin-sdk/approval-native-runtime";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -354,9 +354,3 @@ export function createDiscordAutoPresenceController(params: {
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const __testing = {
|
||||
resolveAutoPresenceConfig,
|
||||
resolveAuthAvailability,
|
||||
stablePresenceSignature,
|
||||
};
|
||||
|
||||
@@ -153,5 +153,3 @@ export async function fetchReactionsDiscord(
|
||||
}
|
||||
return summaries;
|
||||
}
|
||||
|
||||
export { fetchChannelPermissionsDiscord } from "./send.permissions.js";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
export {
|
||||
createAccountScopedAllowFromSection,
|
||||
createAccountScopedGroupAccessSection,
|
||||
createAllowlistSetupWizardProxy,
|
||||
createLegacyCompatChannelDmPolicy,
|
||||
parseMentionOrPrefixedId,
|
||||
patchChannelConfigForAccount,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,6 +1 @@
|
||||
export {
|
||||
buildSecretInputSchema,
|
||||
hasConfiguredSecretInput,
|
||||
normalizeResolvedSecretInputString,
|
||||
normalizeSecretInputString,
|
||||
} from "openclaw/plugin-sdk/secret-input";
|
||||
export { buildSecretInputSchema, hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
export {
|
||||
fetchRemoteMedia,
|
||||
getAgentScopedMediaLocalRoots,
|
||||
MediaFetchError,
|
||||
saveMediaBuffer,
|
||||
} from "openclaw/plugin-sdk/media-runtime";
|
||||
|
||||
Reference in New Issue
Block a user