refactor: prune unused exported types · openclaw/openclaw@4cbd1b5
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,14 +5,6 @@ import { rawDataToString } from "openclaw/plugin-sdk/webhook-ingress";
|
5 | 5 | |
6 | 6 | export { createDedupeCache, rawDataToString }; |
7 | 7 | |
8 | | -export type ResponsePrefixContext = { |
9 | | -model?: string; |
10 | | -modelFull?: string; |
11 | | -provider?: string; |
12 | | -thinkingLevel?: string; |
13 | | -identityName?: string; |
14 | | -}; |
15 | | - |
16 | 8 | export const formatInboundFromLabel = formatInboundFromLabelShared; |
17 | 9 | |
18 | 10 | export function resolveThreadSessionKeys(params: { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -21,12 +21,7 @@ import { collectRuntimeConfigAssignments, secretTargetRegistryEntries } from "./
|
21 | 21 | import { slackSecurityAdapter } from "./security.js"; |
22 | 22 | import { SLACK_CHANNEL } from "./setup-shared.js"; |
23 | 23 | |
24 | | -export { |
25 | | -buildSlackSetupLines, |
26 | | -isSlackSetupAccountConfigured, |
27 | | -setSlackChannelAllowlist, |
28 | | -SLACK_CHANNEL, |
29 | | -} from "./setup-shared.js"; |
| 24 | +export { setSlackChannelAllowlist, SLACK_CHANNEL } from "./setup-shared.js"; |
30 | 25 | |
31 | 26 | export function isSlackPluginAccountConfigured(account: ResolvedSlackAccount): boolean { |
32 | 27 | const mode = account.config.mode ?? "socket"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,10 +3,6 @@ import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "nod
|
3 | 3 | import { join } from "node:path"; |
4 | 4 | import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/sandbox"; |
5 | 5 | |
6 | | -/** Container token (file-extension shape, no leading dot) the host knows how |
7 | | - * to pre-transcode into. Update in lockstep with `pickAfconvertRecipe`. */ |
8 | | -export type HostTranscodableContainer = "caf"; |
9 | | - |
10 | 6 | export type TranscodeOutcome = |
11 | 7 | | { ok: true; buffer: Buffer } |
12 | 8 | | { |
@@ -93,9 +89,7 @@ function normalizeExt(ext: string): string | undefined {
|
93 | 89 | } |
94 | 90 | |
95 | 91 | function pickAfconvertRecipe(source: string, target: string): string[] | undefined { |
96 | | -// Currently only the MP3→CAF path used by BlueBubbles voice memos. Keep |
97 | | -// this in lockstep with `HostTranscodableContainer` above so a typo at the |
98 | | -// channel-capability declaration site is a compile-time error. |
| 92 | +// Currently only the MP3→CAF path used by BlueBubbles voice memos. |
99 | 93 | if (target === "caf") { |
100 | 94 | // Opus-in-CAF, mono, 24 kHz. Validated against macOS 15.x Messages.app's |
101 | 95 | // native voice-memo CAF descriptor (1 ch, 24000 Hz, opus); other CAF |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,5 +8,3 @@ export type SynologyInboundMessage = {
|
8 | 8 | commandAuthorized: boolean; |
9 | 9 | chatUserId?: string; |
10 | 10 | }; |
11 | | - |
12 | | -export type { ResolvedSynologyChatAccount } from "./types.js"; |
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { formatErrorMessage as sharedFormatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; |
2 | 2 | import { normalizeShip } from "../targets.js"; |
3 | 3 | |
4 | | -// Cite types for message references |
5 | | -export interface ChanCite { |
6 | | -chan: { nest: string; where: string }; |
7 | | -} |
8 | | -export interface GroupCite { |
9 | | -group: string; |
10 | | -} |
11 | | -export interface DeskCite { |
12 | | -desk: { flag: string; where: string }; |
13 | | -} |
14 | | -export interface BaitCite { |
15 | | -bait: { group: string; graph: string; where: string }; |
16 | | -} |
17 | | -export type Cite = ChanCite | GroupCite | DeskCite | BaitCite; |
18 | | - |
19 | 4 | export interface ParsedCite { |
20 | 5 | type: "chan" | "group" | "desk" | "bait"; |
21 | 6 | nest?: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -85,31 +85,3 @@ export async function removeClientManager(accountId: string): Promise<void> {
|
85 | 85 | registry.delete(accountId); |
86 | 86 | entry.logger.info(`Unregistered client manager for account: ${accountId}`); |
87 | 87 | } |
88 | | - |
89 | | -/** |
90 | | - * Disconnect and remove all client managers from the registry. |
91 | | - * |
92 | | - * @returns Promise that resolves when all cleanup is complete |
93 | | - */ |
94 | | -export async function removeAllClientManagers(): Promise<void> { |
95 | | -const promises = [...registry.keys()].map((accountId) => removeClientManager(accountId)); |
96 | | -await Promise.all(promises); |
97 | | -} |
98 | | - |
99 | | -/** |
100 | | - * Get the number of registered client managers. |
101 | | - * |
102 | | - * @returns The count of registered managers |
103 | | - */ |
104 | | -export function getRegisteredClientManagerCount(): number { |
105 | | -return registry.size; |
106 | | -} |
107 | | - |
108 | | -/** |
109 | | - * Clear all client managers without disconnecting. |
110 | | - * |
111 | | - * This is primarily for testing purposes. |
112 | | - */ |
113 | | -export function _clearAllClientManagersForTest(): void { |
114 | | -registry.clear(); |
115 | | -} |
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import type { MiscMessageGenerationOptions } from "@whiskeysockets/baileys"; |
2 | 2 | import { jidToE164 } from "./text-runtime.js"; |
3 | 3 | |
4 | | -export type QuotedMessageKey = { |
5 | | -id: string; |
6 | | -remoteJid: string; |
7 | | -fromMe: boolean; |
8 | | -participant?: string; |
9 | | -messageText?: string; |
10 | | -}; |
11 | | - |
12 | 4 | // ── Inbound message metadata cache ────────────────────────────────────── |
13 | 5 | // Maps messageId → { participant, participantE164, body, fromMe } so the |
14 | 6 | // outbound adapter can |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; |
2 | | -import { |
3 | | -resolveReactionLevel, |
4 | | -type ReactionLevel, |
5 | | -type ResolvedReactionLevel, |
6 | | -} from "openclaw/plugin-sdk/text-runtime"; |
| 2 | +import { resolveReactionLevel, type ResolvedReactionLevel } from "openclaw/plugin-sdk/text-runtime"; |
7 | 3 | import { resolveMergedWhatsAppAccountConfig } from "./account-config.js"; |
8 | 4 | |
9 | | -export type WhatsAppReactionLevel = ReactionLevel; |
10 | 5 | export type ResolvedWhatsAppReactionLevel = ResolvedReactionLevel; |
11 | 6 | |
12 | 7 | /** Resolve the effective reaction level and its implications for WhatsApp. */ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。