refactor: trim extension runtime reexports · openclaw/openclaw@5fdde93
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,6 @@ export {
|
6 | 6 | errorShape, |
7 | 7 | isLoopbackHost, |
8 | 8 | isNodeCommandAllowed, |
9 | | -rawDataToString, |
10 | 9 | respondUnavailableOnNodeInvokeError, |
11 | 10 | resolveGatewayAuth, |
12 | 11 | resolveNodeCommandAllowlist, |
@@ -17,7 +16,6 @@ export type {
|
17 | 16 | GatewayRpcOpts, |
18 | 17 | NodeSession, |
19 | 18 | } from "openclaw/plugin-sdk/gateway-runtime"; |
20 | | -export { runExec } from "openclaw/plugin-sdk/process-runtime"; |
21 | 19 | export { runCommandWithRuntime } from "openclaw/plugin-sdk/cli-runtime"; |
22 | 20 | export type { OpenClawPluginService } from "openclaw/plugin-sdk/plugin-entry"; |
23 | 21 | export { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,5 +11,4 @@ export {
|
11 | 11 | export { |
12 | 12 | createChannelApproverDmTargetResolver, |
13 | 13 | createChannelNativeOriginTargetResolver, |
14 | | -doesApprovalRequestMatchChannelAccount, |
15 | 14 | } from "openclaw/plugin-sdk/approval-native-runtime"; |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -36,8 +36,6 @@ export type RequestGuildMembersData = {
|
36 | 36 | user_ids?: string | string[]; |
37 | 37 | nonce?: string; |
38 | 38 | }; |
39 | | -export type GatewayWebSocketLike = ws.WebSocket; |
40 | | - |
41 | 39 | type GatewayPluginOptions = { |
42 | 40 | reconnect?: { maxAttempts?: number }; |
43 | 41 | intents?: number; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -354,9 +354,3 @@ export function createDiscordAutoPresenceController(params: {
|
354 | 354 | }, |
355 | 355 | }; |
356 | 356 | } |
357 | | - |
358 | | -export const __testing = { |
359 | | - resolveAutoPresenceConfig, |
360 | | - resolveAuthAvailability, |
361 | | - stablePresenceSignature, |
362 | | -}; |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -153,5 +153,3 @@ export async function fetchReactionsDiscord(
|
153 | 153 | } |
154 | 154 | return summaries; |
155 | 155 | } |
156 | | - |
157 | | -export { fetchChannelPermissionsDiscord } from "./send.permissions.js"; |
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | export { |
2 | 2 | createAccountScopedAllowFromSection, |
3 | 3 | createAccountScopedGroupAccessSection, |
4 | | -createAllowlistSetupWizardProxy, |
5 | 4 | createLegacyCompatChannelDmPolicy, |
6 | 5 | parseMentionOrPrefixedId, |
7 | 6 | patchChannelConfigForAccount, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -194,17 +194,6 @@ export function getProviderMonitorTestMocks(): typeof providerMonitorTestMocks {
|
194 | 194 | return providerMonitorTestMocks; |
195 | 195 | } |
196 | 196 | |
197 | | -export function mockResolvedDiscordAccountConfig(overrides: Record<string, unknown>) { |
198 | | -resolveDiscordAccountMock.mockImplementation(() => ({ |
199 | | -accountId: "default", |
200 | | -token: "cfg-token", |
201 | | -config: { |
202 | | - ...baseDiscordAccountConfig(), |
203 | | - ...overrides, |
204 | | -}, |
205 | | -})); |
206 | | -} |
207 | | - |
208 | 197 | // oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Test helper lets assertions ascribe handler params shape. |
209 | 198 | export function getFirstDiscordMessageHandlerParams<T extends object>() { |
210 | 199 | expect(createDiscordMessageHandlerMock).toHaveBeenCalledTimes(1); |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -export { |
2 | | -buildSecretInputSchema, |
3 | | -hasConfiguredSecretInput, |
4 | | -normalizeResolvedSecretInputString, |
5 | | -normalizeSecretInputString, |
6 | | -} from "openclaw/plugin-sdk/secret-input"; |
| 1 | +export { buildSecretInputSchema, hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input"; |
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | export { |
2 | 2 | buildChannelConfigSchema, |
3 | 3 | chunkTextForOutbound, |
4 | | -createAccountStatusSink, |
5 | 4 | DEFAULT_ACCOUNT_ID, |
6 | 5 | fetchRemoteMedia, |
7 | 6 | GoogleChatConfigSchema, |
8 | 7 | loadOutboundMediaFromUrl, |
9 | 8 | missingTargetError, |
10 | 9 | PAIRING_APPROVED_MESSAGE, |
11 | 10 | resolveChannelMediaMaxBytes, |
12 | | -runPassiveAccountLifecycle, |
13 | 11 | type ChannelMessageActionAdapter, |
14 | 12 | type ChannelStatusIssue, |
15 | 13 | type OpenClawConfig, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import type { App } from "@slack/bolt"; |
| 2 | +import { resolveDefaultAgentId } from "openclaw/plugin-sdk/agent-runtime"; |
2 | 3 | import { formatAllowlistMatchMeta } from "openclaw/plugin-sdk/allow-from"; |
3 | 4 | import type { |
4 | 5 | OpenClawConfig, |
@@ -7,7 +8,6 @@ import type {
|
7 | 8 | import type { SessionScope } from "openclaw/plugin-sdk/config-types"; |
8 | 9 | import type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk/config-types"; |
9 | 10 | import { createDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime"; |
10 | | -import { resolveDefaultAgentId } from "openclaw/plugin-sdk/agent-runtime"; |
11 | 11 | import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; |
12 | 12 | import type { HistoryEntry } from "openclaw/plugin-sdk/reply-history"; |
13 | 13 | import { resolveAgentRoute } from "openclaw/plugin-sdk/routing"; |
@@ -26,11 +26,7 @@ import { normalizeSlackChannelType } from "./channel-type.js";
|
26 | 26 | import { resolveSessionKey } from "./config.runtime.js"; |
27 | 27 | import { isSlackChannelAllowedByPolicy } from "./policy.js"; |
28 | 28 | |
29 | | -export { |
30 | | -inferSlackChannelType, |
31 | | -normalizeSlackChannelType, |
32 | | -resolveSlackChatType, |
33 | | -} from "./channel-type.js"; |
| 29 | +export { normalizeSlackChannelType, resolveSlackChatType } from "./channel-type.js"; |
34 | 30 | |
35 | 31 | export type SlackMonitorContext = { |
36 | 32 | cfg: OpenClawConfig; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。