mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:20:43 +00:00
refactor: narrow dead reexports
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
export {
|
||||
downloadMSTeamsBotFrameworkAttachment,
|
||||
downloadMSTeamsBotFrameworkAttachments,
|
||||
isBotFrameworkPersonalChatId,
|
||||
} from "./attachments/bot-framework.js";
|
||||
export {
|
||||
downloadMSTeamsAttachments,
|
||||
/** @deprecated Use `downloadMSTeamsAttachments` instead. */
|
||||
downloadMSTeamsImageAttachments,
|
||||
} from "./attachments/download.js";
|
||||
export { downloadMSTeamsAttachments } from "./attachments/download.js";
|
||||
export { buildMSTeamsGraphMessageUrls, downloadMSTeamsGraphMedia } from "./attachments/graph.js";
|
||||
export {
|
||||
buildMSTeamsAttachmentPlaceholder,
|
||||
@@ -18,7 +13,6 @@ export { buildMSTeamsMediaPayload } from "./attachments/payload.js";
|
||||
export type {
|
||||
MSTeamsAccessTokenProvider,
|
||||
MSTeamsAttachmentLike,
|
||||
MSTeamsGraphMediaResult,
|
||||
MSTeamsHtmlAttachmentSummary,
|
||||
MSTeamsInboundMedia,
|
||||
} from "./attachments/types.js";
|
||||
|
||||
@@ -3,13 +3,11 @@ import { downloadFile } from "../utils/file-utils.js";
|
||||
import { getQQBotMediaDir } from "../utils/platform.js";
|
||||
import { normalizeOptionalString } from "../utils/string-normalize.js";
|
||||
import { transcribeAudio, resolveSTTConfig } from "../utils/stt.js";
|
||||
// Re-export formatVoiceText from core/.
|
||||
export { formatVoiceText } from "../utils/voice-text.js";
|
||||
|
||||
// Re-export the port type for convenience.
|
||||
export type { AudioConvertPort } from "../adapter/audio.port.js";
|
||||
|
||||
export interface RawAttachment {
|
||||
interface RawAttachment {
|
||||
content_type: string;
|
||||
url: string;
|
||||
filename?: string;
|
||||
@@ -17,7 +15,7 @@ export interface RawAttachment {
|
||||
asr_refer_text?: string;
|
||||
}
|
||||
|
||||
export type TranscriptSource = "stt" | "asr" | "fallback";
|
||||
type TranscriptSource = "stt" | "asr" | "fallback";
|
||||
|
||||
/** Normalized attachment output consumed by the gateway. */
|
||||
export interface ProcessedAttachments {
|
||||
|
||||
@@ -2,18 +2,8 @@ export {
|
||||
compactEmbeddedPiSession,
|
||||
compactEmbeddedPiSession as compactEmbeddedAgentSession,
|
||||
} from "./pi-embedded-runner/compact.queued.js";
|
||||
export {
|
||||
applyExtraParamsToAgent,
|
||||
resolveAgentTransportOverride,
|
||||
resolveExtraParams,
|
||||
resolvePreparedExtraParams,
|
||||
} from "./pi-embedded-runner/extra-params.js";
|
||||
export { applyExtraParamsToAgent } from "./pi-embedded-runner/extra-params.js";
|
||||
|
||||
export {
|
||||
getDmHistoryLimitFromSessionKey,
|
||||
getHistoryLimitFromSessionKey,
|
||||
limitHistoryTurns,
|
||||
} from "./pi-embedded-runner/history.js";
|
||||
export { resolveEmbeddedSessionLane } from "./pi-embedded-runner/lanes.js";
|
||||
export {
|
||||
runEmbeddedPiAgent,
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import type { RunEmbeddedPiAgentParams } from "./pi-embedded-runner/run/params.js";
|
||||
import type { EmbeddedPiRunResult } from "./pi-embedded-runner/types.js";
|
||||
|
||||
export type RunEmbeddedPiAgentFn = (
|
||||
params: RunEmbeddedPiAgentParams,
|
||||
) => Promise<EmbeddedPiRunResult>;
|
||||
|
||||
export type RunEmbeddedAgentFn = RunEmbeddedPiAgentFn;
|
||||
@@ -111,11 +111,7 @@ function collectPendingMediaFromInternalEvents(
|
||||
return pending;
|
||||
}
|
||||
|
||||
export type {
|
||||
BlockReplyChunking,
|
||||
SubscribeEmbeddedPiSessionParams,
|
||||
ToolResultFormat,
|
||||
} from "./pi-embedded-subscribe.types.js";
|
||||
export type { SubscribeEmbeddedPiSessionParams } from "./pi-embedded-subscribe.types.js";
|
||||
|
||||
export function subscribeEmbeddedPiSession(params: SubscribeEmbeddedPiSessionParams) {
|
||||
const reasoningMode = params.reasoningMode ?? "off";
|
||||
|
||||
@@ -2,7 +2,6 @@ export { getRuntimeConfig } from "../config/config.js";
|
||||
export {
|
||||
loadSessionStore,
|
||||
resolveAgentIdFromSessionKey,
|
||||
resolveMainSessionKey,
|
||||
resolveStorePath,
|
||||
} from "../config/sessions.js";
|
||||
export { callGateway } from "../gateway/call.js";
|
||||
|
||||
@@ -2,12 +2,7 @@ export { getRuntimeConfig } from "../config/config.js";
|
||||
export {
|
||||
loadSessionStore,
|
||||
resolveAgentIdFromSessionKey,
|
||||
resolveMainSessionKey,
|
||||
resolveStorePath,
|
||||
} from "../config/sessions.js";
|
||||
export { callGateway } from "../gateway/call.js";
|
||||
export {
|
||||
isEmbeddedPiRunActive,
|
||||
queueEmbeddedPiMessage,
|
||||
waitForEmbeddedPiRunEnd,
|
||||
} from "./pi-embedded-runner/runs.js";
|
||||
export { isEmbeddedPiRunActive, waitForEmbeddedPiRunEnd } from "./pi-embedded-runner/runs.js";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
export { formatThinkingLevels, normalizeThinkLevel } from "../auto-reply/thinking.js";
|
||||
export {
|
||||
DEFAULT_SUBAGENT_MAX_CHILDREN_PER_AGENT,
|
||||
DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH,
|
||||
@@ -22,11 +21,8 @@ export {
|
||||
mergeDeliveryContext,
|
||||
normalizeDeliveryContext,
|
||||
} from "../utils/delivery-context.shared.js";
|
||||
export { resolveConversationDeliveryTarget } from "../utils/delivery-context.js";
|
||||
export { getSessionBindingService } from "../infra/outbound/session-binding-service.js";
|
||||
export { resolveAgentConfig } from "./agent-scope.js";
|
||||
export { AGENT_LANE_SUBAGENT } from "./lanes.js";
|
||||
export { resolveSubagentSpawnModelSelection } from "./model-selection.js";
|
||||
export { resolveSandboxRuntimeStatus } from "./sandbox/runtime-status.js";
|
||||
export { buildSubagentSystemPrompt } from "./subagent-system-prompt.js";
|
||||
export {
|
||||
|
||||
@@ -42,12 +42,6 @@ export const THINKING_LEVEL_RANKS: Record<ThinkLevel, number> = {
|
||||
xhigh: 60,
|
||||
max: 70,
|
||||
};
|
||||
const NO_THINKING_LEVELS: ThinkLevel[] = [...BASE_THINKING_LEVELS];
|
||||
|
||||
export function isBinaryThinkingProvider(provider?: string | null): boolean {
|
||||
void provider;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Normalize user-provided thinking level strings to the canonical enum.
|
||||
export function normalizeThinkLevel(raw?: string | null): ThinkLevel | undefined {
|
||||
@@ -89,28 +83,6 @@ export function normalizeThinkLevel(raw?: string | null): ThinkLevel | undefined
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function listThinkingLevels(
|
||||
_provider?: string | null,
|
||||
_model?: string | null,
|
||||
): ThinkLevel[] {
|
||||
return [...NO_THINKING_LEVELS];
|
||||
}
|
||||
|
||||
export function listThinkingLevelLabels(provider?: string | null, model?: string | null): string[] {
|
||||
if (isBinaryThinkingProvider(provider)) {
|
||||
return ["off", "on"];
|
||||
}
|
||||
return listThinkingLevels(provider, model);
|
||||
}
|
||||
|
||||
export function formatThinkingLevels(
|
||||
provider?: string | null,
|
||||
model?: string | null,
|
||||
separator = ", ",
|
||||
): string {
|
||||
return listThinkingLevelLabels(provider, model).join(separator);
|
||||
}
|
||||
|
||||
export function formatXHighModelHint(): string {
|
||||
return "provider models that advertise xhigh reasoning";
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { ChannelId } from "../channels/plugins/types.public.js";
|
||||
import { normalizeOptionalLowercaseString } from "../shared/string-coerce.js";
|
||||
import type { NativeCommandsSetting } from "./types.js";
|
||||
import type { OpenClawConfig } from "./types.openclaw.js";
|
||||
export { isCommandFlagEnabled, isRestartEnabled, type CommandFlagKey } from "./commands.flags.js";
|
||||
export { isCommandFlagEnabled, isRestartEnabled } from "./commands.flags.js";
|
||||
|
||||
function resolveAutoDefault(
|
||||
providerId: ChannelId | undefined,
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
export * from "./internal-hooks.js";
|
||||
|
||||
export type HookEventType = import("./internal-hooks.js").InternalHookEventType;
|
||||
export type HookEvent = import("./internal-hooks.js").InternalHookEvent;
|
||||
export type HookHandler = import("./internal-hook-types.js").InternalHookHandler;
|
||||
|
||||
export type { AgentBootstrapHookContext } from "./internal-hooks.js";
|
||||
export {
|
||||
registerInternalHook as registerHook,
|
||||
unregisterInternalHook as unregisterHook,
|
||||
clearInternalHooks as clearHooks,
|
||||
getRegisteredEventKeys as getRegisteredHookEventKeys,
|
||||
triggerInternalHook as triggerHook,
|
||||
createInternalHookEvent as createHookEvent,
|
||||
isAgentBootstrapEvent,
|
||||
} from "./internal-hooks.js";
|
||||
|
||||
@@ -7,7 +7,6 @@ export {
|
||||
normalizeSafeBinProfileFixtures,
|
||||
renderDefaultSafeBinsDocText,
|
||||
renderSafeBinDeniedFlagsDocBullets,
|
||||
resolveSafeBinDeniedFlags,
|
||||
resolveSafeBinProfiles,
|
||||
type SafeBinProfile,
|
||||
type SafeBinProfileFixture,
|
||||
|
||||
@@ -18,4 +18,3 @@ export {
|
||||
resolveShellWrapperTransportArgv,
|
||||
unwrapKnownShellMultiplexerInvocation,
|
||||
} from "./shell-wrapper-resolution.js";
|
||||
export { resolveExecWrapperTrustPlan } from "./exec-wrapper-trust-plan.js";
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
export {
|
||||
isAudioAttachment,
|
||||
isImageAttachment,
|
||||
isVideoAttachment,
|
||||
normalizeAttachments,
|
||||
resolveAttachmentKind,
|
||||
} from "./attachments.normalize.js";
|
||||
|
||||
@@ -77,6 +77,10 @@ export type RunHeartbeatOnceOptions = {
|
||||
heartbeat?: { target?: string };
|
||||
};
|
||||
|
||||
type RuntimeRunEmbeddedPiAgent = (
|
||||
params: import("../../agents/pi-embedded-runner/run/params.js").RunEmbeddedPiAgentParams,
|
||||
) => Promise<import("../../agents/pi-embedded-runner/types.js").EmbeddedPiRunResult>;
|
||||
|
||||
/** Core runtime helpers exposed to trusted native plugins. */
|
||||
export type PluginRuntimeCore = {
|
||||
version: string;
|
||||
@@ -135,8 +139,8 @@ export type PluginRuntimeCore = {
|
||||
resolveThinkingPolicy: (
|
||||
params: PluginRuntimeThinkingPolicyRequest,
|
||||
) => PluginRuntimeThinkingPolicy;
|
||||
runEmbeddedAgent: import("../../agents/pi-embedded-runtime.types.js").RunEmbeddedAgentFn;
|
||||
runEmbeddedPiAgent: import("../../agents/pi-embedded-runtime.types.js").RunEmbeddedPiAgentFn;
|
||||
runEmbeddedAgent: RuntimeRunEmbeddedPiAgent;
|
||||
runEmbeddedPiAgent: RuntimeRunEmbeddedPiAgent;
|
||||
resolveAgentTimeoutMs: typeof import("../../agents/timeout.js").resolveAgentTimeoutMs;
|
||||
ensureAgentWorkspace: typeof import("../../agents/workspace.js").ensureAgentWorkspace;
|
||||
session: {
|
||||
|
||||
Reference in New Issue
Block a user