refactor: prune stale extension helpers

This commit is contained in:
Peter Steinberger
2026-05-01 10:57:24 +01:00
parent ca620eaf35
commit 90554ea048
6 changed files with 0 additions and 59 deletions

View File

@@ -2,7 +2,6 @@ import path from "node:path";
import type {
MatrixMessageAttachmentKind,
MatrixMessageAttachmentSummary,
MatrixMessageSummary,
} from "./actions/types.js";
const MATRIX_MEDIA_KINDS: Record<string, MatrixMessageAttachmentKind> = {
@@ -134,12 +133,6 @@ export function formatMatrixMessageText(params: {
return `${body}\n\n${marker}`;
}
export function formatMatrixMessageSummaryText(
summary: Pick<MatrixMessageSummary, "body" | "attachment">,
): string | undefined {
return formatMatrixMessageText(summary);
}
export function formatMatrixMediaUnavailableText(params: {
body?: string;
filename?: string;

View File

@@ -55,10 +55,6 @@ export type PollStartSubtype = {
answers: PollAnswer[];
};
export type LegacyPollStartContent = {
"m.poll"?: PollStartSubtype;
};
export type PollStartContent = {
[M_POLL_START]?: PollStartSubtype;
[ORG_POLL_START]?: PollStartSubtype;

View File

@@ -62,29 +62,6 @@ export function normalizeMatrixMessagingTarget(raw: string): string | undefined
return normalized || undefined;
}
export function normalizeMatrixDirectoryUserId(raw: string): string | undefined {
const normalized = stripKnownPrefixes(raw, [MATRIX_PREFIX, USER_PREFIX]);
if (!normalized || normalized === "*") {
return undefined;
}
return isMatrixQualifiedUserId(normalized) ? `user:${normalized}` : normalized;
}
export function normalizeMatrixDirectoryGroupId(raw: string): string | undefined {
const normalized = stripKnownPrefixes(raw, [MATRIX_PREFIX]);
if (!normalized || normalized === "*") {
return undefined;
}
const lowered = normalizeLowercaseStringOrEmpty(normalized);
if (lowered.startsWith(ROOM_PREFIX) || lowered.startsWith(CHANNEL_PREFIX)) {
return normalized;
}
if (normalized.startsWith("!")) {
return `room:${normalized}`;
}
return normalized;
}
export function resolveMatrixDirectUserId(params: {
from?: string;
to?: string;

View File

@@ -71,13 +71,6 @@ export function getSlashCommandState(accountId: string): SlashCommandAccountStat
return accountStates.get(accountId) ?? null;
}
/**
* Get all active slash command account states.
*/
export function getAllSlashCommandStates(): ReadonlyMap<string, SlashCommandAccountState> {
return accountStates;
}
/**
* Activate slash commands for a specific account.
* Called from the monitor after bot connects.

View File

@@ -1,13 +0,0 @@
import type { OpenClawConfig } from "openclaw/plugin-sdk/memory-core-host-engine-foundation";
import { getMemorySearchManager, type MemoryIndexManager } from "./index.js";
export async function createMemoryManagerOrThrow(
cfg: OpenClawConfig,
agentId = "main",
): Promise<MemoryIndexManager> {
const result = await getMemorySearchManager({ cfg, agentId });
if (!result.manager) {
throw new Error("manager missing");
}
return result.manager as unknown as MemoryIndexManager;
}

View File

@@ -309,8 +309,3 @@ function safeHostForLog(url: string): string {
return "invalid-url";
}
}
/**
* @deprecated Use `downloadMSTeamsAttachments` instead (supports all file types).
*/
export const downloadMSTeamsImageAttachments = downloadMSTeamsAttachments;