refactor: narrow dead reexports · openclaw/openclaw@e816235
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | export { |
2 | | -downloadMSTeamsBotFrameworkAttachment, |
3 | 2 | downloadMSTeamsBotFrameworkAttachments, |
4 | 3 | isBotFrameworkPersonalChatId, |
5 | 4 | } from "./attachments/bot-framework.js"; |
6 | | -export { |
7 | | -downloadMSTeamsAttachments, |
8 | | -/** @deprecated Use `downloadMSTeamsAttachments` instead. */ |
9 | | -downloadMSTeamsImageAttachments, |
10 | | -} from "./attachments/download.js"; |
| 5 | +export { downloadMSTeamsAttachments } from "./attachments/download.js"; |
11 | 6 | export { buildMSTeamsGraphMessageUrls, downloadMSTeamsGraphMedia } from "./attachments/graph.js"; |
12 | 7 | export { |
13 | 8 | buildMSTeamsAttachmentPlaceholder, |
@@ -18,7 +13,6 @@ export { buildMSTeamsMediaPayload } from "./attachments/payload.js";
|
18 | 13 | export type { |
19 | 14 | MSTeamsAccessTokenProvider, |
20 | 15 | MSTeamsAttachmentLike, |
21 | | -MSTeamsGraphMediaResult, |
22 | 16 | MSTeamsHtmlAttachmentSummary, |
23 | 17 | MSTeamsInboundMedia, |
24 | 18 | } from "./attachments/types.js"; |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,21 +3,19 @@ import { downloadFile } from "../utils/file-utils.js";
|
3 | 3 | import { getQQBotMediaDir } from "../utils/platform.js"; |
4 | 4 | import { normalizeOptionalString } from "../utils/string-normalize.js"; |
5 | 5 | import { transcribeAudio, resolveSTTConfig } from "../utils/stt.js"; |
6 | | -// Re-export formatVoiceText from core/. |
7 | | -export { formatVoiceText } from "../utils/voice-text.js"; |
8 | 6 | |
9 | 7 | // Re-export the port type for convenience. |
10 | 8 | export type { AudioConvertPort } from "../adapter/audio.port.js"; |
11 | 9 | |
12 | | -export interface RawAttachment { |
| 10 | +interface RawAttachment { |
13 | 11 | content_type: string; |
14 | 12 | url: string; |
15 | 13 | filename?: string; |
16 | 14 | voice_wav_url?: string; |
17 | 15 | asr_refer_text?: string; |
18 | 16 | } |
19 | 17 | |
20 | | -export type TranscriptSource = "stt" | "asr" | "fallback"; |
| 18 | +type TranscriptSource = "stt" | "asr" | "fallback"; |
21 | 19 | |
22 | 20 | /** Normalized attachment output consumed by the gateway. */ |
23 | 21 | export interface ProcessedAttachments { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,18 +2,8 @@ export {
|
2 | 2 | compactEmbeddedPiSession, |
3 | 3 | compactEmbeddedPiSession as compactEmbeddedAgentSession, |
4 | 4 | } from "./pi-embedded-runner/compact.queued.js"; |
5 | | -export { |
6 | | -applyExtraParamsToAgent, |
7 | | -resolveAgentTransportOverride, |
8 | | -resolveExtraParams, |
9 | | -resolvePreparedExtraParams, |
10 | | -} from "./pi-embedded-runner/extra-params.js"; |
| 5 | +export { applyExtraParamsToAgent } from "./pi-embedded-runner/extra-params.js"; |
11 | 6 | |
12 | | -export { |
13 | | -getDmHistoryLimitFromSessionKey, |
14 | | -getHistoryLimitFromSessionKey, |
15 | | -limitHistoryTurns, |
16 | | -} from "./pi-embedded-runner/history.js"; |
17 | 7 | export { resolveEmbeddedSessionLane } from "./pi-embedded-runner/lanes.js"; |
18 | 8 | export { |
19 | 9 | runEmbeddedPiAgent, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -111,11 +111,7 @@ function collectPendingMediaFromInternalEvents(
|
111 | 111 | return pending; |
112 | 112 | } |
113 | 113 | |
114 | | -export type { |
115 | | -BlockReplyChunking, |
116 | | -SubscribeEmbeddedPiSessionParams, |
117 | | -ToolResultFormat, |
118 | | -} from "./pi-embedded-subscribe.types.js"; |
| 114 | +export type { SubscribeEmbeddedPiSessionParams } from "./pi-embedded-subscribe.types.js"; |
119 | 115 | |
120 | 116 | export function subscribeEmbeddedPiSession(params: SubscribeEmbeddedPiSessionParams) { |
121 | 117 | const reasoningMode = params.reasoningMode ?? "off"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,6 @@ export { getRuntimeConfig } from "../config/config.js";
|
2 | 2 | export { |
3 | 3 | loadSessionStore, |
4 | 4 | resolveAgentIdFromSessionKey, |
5 | | -resolveMainSessionKey, |
6 | 5 | resolveStorePath, |
7 | 6 | } from "../config/sessions.js"; |
8 | 7 | export { callGateway } from "../gateway/call.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,12 +2,7 @@ export { getRuntimeConfig } from "../config/config.js";
|
2 | 2 | export { |
3 | 3 | loadSessionStore, |
4 | 4 | resolveAgentIdFromSessionKey, |
5 | | -resolveMainSessionKey, |
6 | 5 | resolveStorePath, |
7 | 6 | } from "../config/sessions.js"; |
8 | 7 | export { callGateway } from "../gateway/call.js"; |
9 | | -export { |
10 | | -isEmbeddedPiRunActive, |
11 | | -queueEmbeddedPiMessage, |
12 | | -waitForEmbeddedPiRunEnd, |
13 | | -} from "./pi-embedded-runner/runs.js"; |
| 8 | +export { isEmbeddedPiRunActive, waitForEmbeddedPiRunEnd } from "./pi-embedded-runner/runs.js"; |
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -export { formatThinkingLevels, normalizeThinkLevel } from "../auto-reply/thinking.js"; |
2 | 1 | export { |
3 | 2 | DEFAULT_SUBAGENT_MAX_CHILDREN_PER_AGENT, |
4 | 3 | DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, |
@@ -22,11 +21,8 @@ export {
|
22 | 21 | mergeDeliveryContext, |
23 | 22 | normalizeDeliveryContext, |
24 | 23 | } from "../utils/delivery-context.shared.js"; |
25 | | -export { resolveConversationDeliveryTarget } from "../utils/delivery-context.js"; |
26 | | -export { getSessionBindingService } from "../infra/outbound/session-binding-service.js"; |
27 | 24 | export { resolveAgentConfig } from "./agent-scope.js"; |
28 | 25 | export { AGENT_LANE_SUBAGENT } from "./lanes.js"; |
29 | | -export { resolveSubagentSpawnModelSelection } from "./model-selection.js"; |
30 | 26 | export { resolveSandboxRuntimeStatus } from "./sandbox/runtime-status.js"; |
31 | 27 | export { buildSubagentSystemPrompt } from "./subagent-system-prompt.js"; |
32 | 28 | export { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -42,12 +42,6 @@ export const THINKING_LEVEL_RANKS: Record<ThinkLevel, number> = {
|
42 | 42 | xhigh: 60, |
43 | 43 | max: 70, |
44 | 44 | }; |
45 | | -const NO_THINKING_LEVELS: ThinkLevel[] = [...BASE_THINKING_LEVELS]; |
46 | | - |
47 | | -export function isBinaryThinkingProvider(provider?: string | null): boolean { |
48 | | -void provider; |
49 | | -return false; |
50 | | -} |
51 | 45 | |
52 | 46 | // Normalize user-provided thinking level strings to the canonical enum. |
53 | 47 | export function normalizeThinkLevel(raw?: string | null): ThinkLevel | undefined { |
@@ -89,28 +83,6 @@ export function normalizeThinkLevel(raw?: string | null): ThinkLevel | undefined
|
89 | 83 | return undefined; |
90 | 84 | } |
91 | 85 | |
92 | | -export function listThinkingLevels( |
93 | | -_provider?: string | null, |
94 | | -_model?: string | null, |
95 | | -): ThinkLevel[] { |
96 | | -return [...NO_THINKING_LEVELS]; |
97 | | -} |
98 | | - |
99 | | -export function listThinkingLevelLabels(provider?: string | null, model?: string | null): string[] { |
100 | | -if (isBinaryThinkingProvider(provider)) { |
101 | | -return ["off", "on"]; |
102 | | -} |
103 | | -return listThinkingLevels(provider, model); |
104 | | -} |
105 | | - |
106 | | -export function formatThinkingLevels( |
107 | | -provider?: string | null, |
108 | | -model?: string | null, |
109 | | -separator = ", ", |
110 | | -): string { |
111 | | -return listThinkingLevelLabels(provider, model).join(separator); |
112 | | -} |
113 | | - |
114 | 86 | export function formatXHighModelHint(): string { |
115 | 87 | return "provider models that advertise xhigh reasoning"; |
116 | 88 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ import type { ChannelId } from "../channels/plugins/types.public.js";
|
4 | 4 | import { normalizeOptionalLowercaseString } from "../shared/string-coerce.js"; |
5 | 5 | import type { NativeCommandsSetting } from "./types.js"; |
6 | 6 | import type { OpenClawConfig } from "./types.openclaw.js"; |
7 | | -export { isCommandFlagEnabled, isRestartEnabled, type CommandFlagKey } from "./commands.flags.js"; |
| 7 | +export { isCommandFlagEnabled, isRestartEnabled } from "./commands.flags.js"; |
8 | 8 | |
9 | 9 | function resolveAutoDefault( |
10 | 10 | providerId: ChannelId | undefined, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。