refactor: delete stale extension exports

This commit is contained in:
Peter Steinberger
2026-05-01 09:44:50 +01:00
parent 22a74de693
commit 298c2fbad4
5 changed files with 1 additions and 98 deletions

View File

@@ -2,7 +2,6 @@ import {
normalizeLowercaseStringOrEmpty,
normalizeOptionalString,
} from "openclaw/plugin-sdk/text-runtime";
import { Type } from "typebox";
export type BraveConfig = {
mode?: string;
@@ -119,7 +118,6 @@ const BRAVE_SEARCH_LANG_ALIASES: Record<string, string> = {
};
const BRAVE_UI_LANG_LOCALE = /^([a-z]{2})-([a-z]{2})$/i;
const MAX_BRAVE_SEARCH_COUNT = 10;
function normalizeBraveSearchLang(value: string | undefined): string | undefined {
if (!value) {
@@ -226,54 +224,3 @@ export function mapBraveLlmContextResults(
siteName: resolveSiteName(entry.url) || undefined,
}));
}
export function createBraveSchema() {
return Type.Object({
query: Type.String({ description: "Search query string." }),
count: Type.Optional(
Type.Number({
description: "Number of results to return (1-10).",
minimum: 1,
maximum: MAX_BRAVE_SEARCH_COUNT,
}),
),
country: Type.Optional(
Type.String({
description:
"2-letter country code for region-specific results (e.g., 'DE', 'US', 'ALL'). Default: 'US'.",
}),
),
language: Type.Optional(
Type.String({
description: "ISO 639-1 language code for results (e.g., 'en', 'de', 'fr').",
}),
),
freshness: Type.Optional(
Type.String({
description: "Filter by time: 'day' (24h), 'week', 'month', or 'year'.",
}),
),
date_after: Type.Optional(
Type.String({
description: "Only results published after this date (YYYY-MM-DD).",
}),
),
date_before: Type.Optional(
Type.String({
description: "Only results published before this date (YYYY-MM-DD).",
}),
),
search_lang: Type.Optional(
Type.String({
description:
"Brave language code for search results (e.g., 'en', 'de', 'en-gb', 'zh-hans', 'zh-hant', 'pt-br').",
}),
),
ui_lang: Type.Optional(
Type.String({
description:
"Locale code for UI elements in language-region format (e.g., 'en-US', 'de-DE', 'fr-FR', 'tr-TR'). Must include region subtag.",
}),
),
});
}

View File

@@ -121,33 +121,3 @@ export async function listReactionsFeishu(params: {
item.operator_id?.open_id ?? item.operator_id?.user_id ?? item.operator_id?.union_id ?? "",
}));
}
/**
* Common Feishu emoji types for convenience.
* @see https://open.feishu.cn/document/server-docs/im-v1/message-reaction/emojis-introduce
*/
export const FeishuEmoji = {
// Common reactions
THUMBSUP: "THUMBSUP",
THUMBSDOWN: "THUMBSDOWN",
HEART: "HEART",
SMILE: "SMILE",
GRINNING: "GRINNING",
LAUGHING: "LAUGHING",
CRY: "CRY",
ANGRY: "ANGRY",
SURPRISED: "SURPRISED",
THINKING: "THINKING",
CLAP: "CLAP",
OK: "OK",
FIST: "FIST",
PRAY: "PRAY",
FIRE: "FIRE",
PARTY: "PARTY",
CHECK: "CHECK",
CROSS: "CROSS",
QUESTION: "QUESTION",
EXCLAMATION: "EXCLAMATION",
} as const;
export type FeishuEmojiType = (typeof FeishuEmoji)[keyof typeof FeishuEmoji];

View File

@@ -3,7 +3,6 @@ import type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/plugin-ru
import {
buildRealtimeVoiceAgentConsultWorkingResponse,
consultRealtimeVoiceAgent,
REALTIME_VOICE_AGENT_CONSULT_TOOL,
REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME,
resolveRealtimeVoiceAgentConsultTools,
resolveRealtimeVoiceAgentConsultToolsAllow,
@@ -14,7 +13,6 @@ import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
import type { GoogleMeetConfig, GoogleMeetToolPolicy } from "./config.js";
export const GOOGLE_MEET_AGENT_CONSULT_TOOL_NAME = REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME;
export const GOOGLE_MEET_AGENT_CONSULT_TOOL = REALTIME_VOICE_AGENT_CONSULT_TOOL;
const GOOGLE_MEET_CONSULT_SYSTEM_PROMPT = [
"You are a behind-the-scenes consultant for a live meeting voice agent.",

View File

@@ -1,11 +1,6 @@
import { describeWebhookAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
import { hasLineCredentials, parseLineAllowFromId } from "./account-helpers.js";
import {
resolveLineAccount,
type ChannelPlugin,
type OpenClawConfig,
type ResolvedLineAccount,
} from "./channel-api.js";
import { type ChannelPlugin, type ResolvedLineAccount } from "./channel-api.js";
import { lineConfigAdapter } from "./config-adapter.js";
import { LineChannelConfigSchema } from "./config-schema.js";
@@ -52,8 +47,4 @@ export const lineChannelPluginCommon = {
"meta" | "capabilities" | "reload" | "configSchema" | "config"
>;
export function isLineConfigured(cfg: OpenClawConfig, accountId: string): boolean {
return hasLineCredentials(resolveLineAccount({ cfg, accountId }));
}
export { parseLineAllowFromId };

View File

@@ -1,9 +1,6 @@
import type { Message } from "@grammyjs/types";
import { MediaFetchError } from "openclaw/plugin-sdk/media-runtime";
export const APPROVE_CALLBACK_DATA_RE =
/^\/approve(?:@[^\s]+)?\s+[A-Za-z0-9][A-Za-z0-9._:-]*\s+(allow-once|allow-always|deny)\b/i;
export function isMediaSizeLimitError(err: unknown): boolean {
const errMsg = String(err);
return errMsg.includes("exceeds") && errMsg.includes("MB limit");