refactor: prune unused exported types

This commit is contained in:
Peter Steinberger
2026-05-01 09:56:32 +01:00
parent f98ba66af6
commit 4cbd1b53cf
8 changed files with 3 additions and 80 deletions

View File

@@ -5,14 +5,6 @@ import { rawDataToString } from "openclaw/plugin-sdk/webhook-ingress";
export { createDedupeCache, rawDataToString };
export type ResponsePrefixContext = {
model?: string;
modelFull?: string;
provider?: string;
thinkingLevel?: string;
identityName?: string;
};
export const formatInboundFromLabel = formatInboundFromLabelShared;
export function resolveThreadSessionKeys(params: {

View File

@@ -21,12 +21,7 @@ import { collectRuntimeConfigAssignments, secretTargetRegistryEntries } from "./
import { slackSecurityAdapter } from "./security.js";
import { SLACK_CHANNEL } from "./setup-shared.js";
export {
buildSlackSetupLines,
isSlackSetupAccountConfigured,
setSlackChannelAllowlist,
SLACK_CHANNEL,
} from "./setup-shared.js";
export { setSlackChannelAllowlist, SLACK_CHANNEL } from "./setup-shared.js";
export function isSlackPluginAccountConfigured(account: ResolvedSlackAccount): boolean {
const mode = account.config.mode ?? "socket";

View File

@@ -3,10 +3,6 @@ import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "nod
import { join } from "node:path";
import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/sandbox";
/** Container token (file-extension shape, no leading dot) the host knows how
* to pre-transcode into. Update in lockstep with `pickAfconvertRecipe`. */
export type HostTranscodableContainer = "caf";
export type TranscodeOutcome =
| { ok: true; buffer: Buffer }
| {
@@ -93,9 +89,7 @@ function normalizeExt(ext: string): string | undefined {
}
function pickAfconvertRecipe(source: string, target: string): string[] | undefined {
// Currently only the MP3→CAF path used by BlueBubbles voice memos. Keep
// this in lockstep with `HostTranscodableContainer` above so a typo at the
// channel-capability declaration site is a compile-time error.
// Currently only the MP3→CAF path used by BlueBubbles voice memos.
if (target === "caf") {
// Opus-in-CAF, mono, 24 kHz. Validated against macOS 15.x Messages.app's
// native voice-memo CAF descriptor (1 ch, 24000 Hz, opus); other CAF

View File

@@ -8,5 +8,3 @@ export type SynologyInboundMessage = {
commandAuthorized: boolean;
chatUserId?: string;
};
export type { ResolvedSynologyChatAccount } from "./types.js";

View File

@@ -1,21 +1,6 @@
import { formatErrorMessage as sharedFormatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
import { normalizeShip } from "../targets.js";
// Cite types for message references
export interface ChanCite {
chan: { nest: string; where: string };
}
export interface GroupCite {
group: string;
}
export interface DeskCite {
desk: { flag: string; where: string };
}
export interface BaitCite {
bait: { group: string; graph: string; where: string };
}
export type Cite = ChanCite | GroupCite | DeskCite | BaitCite;
export interface ParsedCite {
type: "chan" | "group" | "desk" | "bait";
nest?: string;

View File

@@ -85,31 +85,3 @@ export async function removeClientManager(accountId: string): Promise<void> {
registry.delete(accountId);
entry.logger.info(`Unregistered client manager for account: ${accountId}`);
}
/**
* Disconnect and remove all client managers from the registry.
*
* @returns Promise that resolves when all cleanup is complete
*/
export async function removeAllClientManagers(): Promise<void> {
const promises = [...registry.keys()].map((accountId) => removeClientManager(accountId));
await Promise.all(promises);
}
/**
* Get the number of registered client managers.
*
* @returns The count of registered managers
*/
export function getRegisteredClientManagerCount(): number {
return registry.size;
}
/**
* Clear all client managers without disconnecting.
*
* This is primarily for testing purposes.
*/
export function _clearAllClientManagersForTest(): void {
registry.clear();
}

View File

@@ -1,14 +1,6 @@
import type { MiscMessageGenerationOptions } from "@whiskeysockets/baileys";
import { jidToE164 } from "./text-runtime.js";
export type QuotedMessageKey = {
id: string;
remoteJid: string;
fromMe: boolean;
participant?: string;
messageText?: string;
};
// ── Inbound message metadata cache ──────────────────────────────────────
// Maps messageId → { participant, participantE164, body, fromMe } so the
// outbound adapter can

View File

@@ -1,12 +1,7 @@
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
import {
resolveReactionLevel,
type ReactionLevel,
type ResolvedReactionLevel,
} from "openclaw/plugin-sdk/text-runtime";
import { resolveReactionLevel, type ResolvedReactionLevel } from "openclaw/plugin-sdk/text-runtime";
import { resolveMergedWhatsAppAccountConfig } from "./account-config.js";
export type WhatsAppReactionLevel = ReactionLevel;
export type ResolvedWhatsAppReactionLevel = ResolvedReactionLevel;
/** Resolve the effective reaction level and its implications for WhatsApp. */