Plugins: fix pnpm check regressions

This commit is contained in:
Gustavo Madeira Santana 2026-03-17 23:25:40 +00:00
parent f118191182
commit ffe24955c8
No known key found for this signature in database
17 changed files with 13 additions and 77 deletions

View File

@ -1,15 +1,10 @@
import {
buildChannelConfigSchema,
DiscordConfigSchema,
type ChannelPlugin,
} from "openclaw/plugin-sdk/discord";
import { type ChannelPlugin } from "openclaw/plugin-sdk/discord";
import { type ResolvedDiscordAccount } from "./accounts.js";
import { discordSetupAdapter } from "./setup-core.js";
import { createDiscordPluginBase } from "./shared.js";
export const discordSetupPlugin: ChannelPlugin<ResolvedDiscordAccount> = {
...createDiscordPluginBase({
configSchema: buildChannelConfigSchema(DiscordConfigSchema),
setup: discordSetupAdapter,
}),
};

View File

@ -13,10 +13,8 @@ import { normalizeMessageChannel } from "openclaw/plugin-sdk/channel-runtime";
import { buildOutboundBaseSessionKey, normalizeOutboundThreadId } from "openclaw/plugin-sdk/core";
import {
buildComputedAccountStatusSnapshot,
buildChannelConfigSchema,
buildTokenChannelStatusSummary,
DEFAULT_ACCOUNT_ID,
DiscordConfigSchema,
getChatChannelMeta,
listDiscordDirectoryGroupsFromConfig,
listDiscordDirectoryPeersFromConfig,
@ -278,7 +276,6 @@ function resolveDiscordOutboundSessionRoute(params: {
export const discordPlugin: ChannelPlugin<ResolvedDiscordAccount> = {
...createDiscordPluginBase({
configSchema: buildChannelConfigSchema(DiscordConfigSchema),
setup: discordSetupAdapter,
}),
pairing: {

View File

@ -45,7 +45,6 @@ export {
buildMentionedCardContent,
type MentionTarget,
} from "./src/mention.js";
export { feishuPlugin } from "./src/channel.js";
export default defineChannelPluginEntry({
id: "feishu",

View File

@ -1,15 +1,10 @@
import {
buildChannelConfigSchema,
IMessageConfigSchema,
type ChannelPlugin,
} from "openclaw/plugin-sdk/imessage";
import { type ChannelPlugin } from "openclaw/plugin-sdk/imessage";
import { type ResolvedIMessageAccount } from "./accounts.js";
import { imessageSetupAdapter } from "./setup-core.js";
import { createIMessagePluginBase, imessageSetupWizard } from "./shared.js";
export const imessageSetupPlugin: ChannelPlugin<ResolvedIMessageAccount> = {
...createIMessagePluginBase({
configSchema: buildChannelConfigSchema(IMessageConfigSchema),
setupWizard: imessageSetupWizard,
setup: imessageSetupAdapter,
}),

View File

@ -6,11 +6,9 @@ import {
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-runtime";
import { buildOutboundBaseSessionKey } from "openclaw/plugin-sdk/core";
import {
buildChannelConfigSchema,
collectStatusIssuesFromLastError,
DEFAULT_ACCOUNT_ID,
formatTrimmedAllowFromEntries,
IMessageConfigSchema,
looksLikeIMessageTargetId,
normalizeIMessageMessagingTarget,
resolveIMessageGroupRequireMention,
@ -100,7 +98,6 @@ function resolveIMessageOutboundSessionRoute(params: {
export const imessagePlugin: ChannelPlugin<ResolvedIMessageAccount> = {
...createIMessagePluginBase({
configSchema: buildChannelConfigSchema(IMessageConfigSchema),
setupWizard: imessageSetupWizard,
setup: imessageSetupAdapter,
}),

View File

@ -1,15 +1,10 @@
import {
buildChannelConfigSchema,
SignalConfigSchema,
type ChannelPlugin,
} from "openclaw/plugin-sdk/signal";
import { type ChannelPlugin } from "openclaw/plugin-sdk/signal";
import { type ResolvedSignalAccount } from "./accounts.js";
import { signalSetupAdapter } from "./setup-core.js";
import { createSignalPluginBase, signalSetupWizard } from "./shared.js";
export const signalSetupPlugin: ChannelPlugin<ResolvedSignalAccount> = {
...createSignalPluginBase({
configSchema: buildChannelConfigSchema(SignalConfigSchema),
setupWizard: signalSetupWizard,
setup: signalSetupAdapter,
}),

View File

@ -11,7 +11,6 @@ import { type RoutePeer } from "openclaw/plugin-sdk/routing";
import {
buildBaseAccountStatusSnapshot,
buildBaseChannelStatusSummary,
buildChannelConfigSchema,
collectStatusIssuesFromLastError,
createDefaultChannelRuntimeState,
DEFAULT_ACCOUNT_ID,
@ -20,7 +19,6 @@ import {
normalizeSignalMessagingTarget,
PAIRING_APPROVED_MESSAGE,
resolveChannelMediaMaxBytes,
SignalConfigSchema,
type ChannelMessageActionAdapter,
type ChannelPlugin,
} from "openclaw/plugin-sdk/signal";
@ -279,7 +277,6 @@ async function sendFormattedSignalMedia(ctx: {
export const signalPlugin: ChannelPlugin<ResolvedSignalAccount> = {
...createSignalPluginBase({
configSchema: buildChannelConfigSchema(SignalConfigSchema),
setupWizard: signalSetupWizard,
setup: signalSetupAdapter,
}),

View File

@ -1,8 +1,4 @@
import {
buildChannelConfigSchema,
SlackConfigSchema,
type ChannelPlugin,
} from "openclaw/plugin-sdk/slack";
import { type ChannelPlugin } from "openclaw/plugin-sdk/slack";
import { type ResolvedSlackAccount } from "./accounts.js";
import { slackSetupAdapter } from "./setup-core.js";
import { slackSetupWizard } from "./setup-surface.js";
@ -10,7 +6,6 @@ import { createSlackPluginBase } from "./shared.js";
export const slackSetupPlugin: ChannelPlugin<ResolvedSlackAccount> = {
...createSlackPluginBase({
configSchema: buildChannelConfigSchema(SlackConfigSchema),
setupWizard: slackSetupWizard,
setup: slackSetupAdapter,
}),

View File

@ -11,7 +11,6 @@ import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-runtime";
import { buildOutboundBaseSessionKey, normalizeOutboundThreadId } from "openclaw/plugin-sdk/core";
import { resolveThreadSessionKeys, type RoutePeer } from "openclaw/plugin-sdk/routing";
import {
buildChannelConfigSchema,
buildComputedAccountStatusSnapshot,
DEFAULT_ACCOUNT_ID,
listSlackDirectoryGroupsFromConfig,
@ -23,7 +22,6 @@ import {
resolveConfiguredFromRequiredCredentialStatuses,
resolveSlackGroupRequireMention,
resolveSlackGroupToolPolicy,
SlackConfigSchema,
createSlackActions,
type ChannelPlugin,
type OpenClawConfig,
@ -309,7 +307,6 @@ async function resolveSlackAllowlistNames(params: {
export const slackPlugin: ChannelPlugin<ResolvedSlackAccount> = {
...createSlackPluginBase({
configSchema: buildChannelConfigSchema(SlackConfigSchema),
setupWizard: slackSetupWizard,
setup: slackSetupAdapter,
}),

View File

@ -1,8 +1,4 @@
import {
buildChannelConfigSchema,
TelegramConfigSchema,
type ChannelPlugin,
} from "openclaw/plugin-sdk/telegram";
import { type ChannelPlugin } from "openclaw/plugin-sdk/telegram";
import { type ResolvedTelegramAccount } from "./accounts.js";
import type { TelegramProbe } from "./probe.js";
import { telegramSetupAdapter } from "./setup-core.js";
@ -11,7 +7,6 @@ import { createTelegramPluginBase } from "./shared.js";
export const telegramSetupPlugin: ChannelPlugin<ResolvedTelegramAccount, TelegramProbe> = {
...createTelegramPluginBase({
configSchema: buildChannelConfigSchema(TelegramConfigSchema),
setupWizard: telegramSetupWizard,
setup: telegramSetupAdapter,
}),

View File

@ -12,7 +12,6 @@ import { buildExecApprovalPendingReplyPayload } from "openclaw/plugin-sdk/infra-
import { resolveThreadSessionKeys, type RoutePeer } from "openclaw/plugin-sdk/routing";
import { parseTelegramTopicConversation } from "openclaw/plugin-sdk/telegram";
import {
buildChannelConfigSchema,
buildTokenChannelStatusSummary,
clearAccountEntryFields,
DEFAULT_ACCOUNT_ID,
@ -21,7 +20,6 @@ import {
PAIRING_APPROVED_MESSAGE,
projectCredentialSnapshotFields,
resolveConfiguredFromCredentialStatuses,
TelegramConfigSchema,
resolveTelegramGroupRequireMention,
resolveTelegramGroupToolPolicy,
type ChannelPlugin,
@ -298,7 +296,6 @@ function readTelegramAllowlistConfig(account: ResolvedTelegramAccount) {
export const telegramPlugin: ChannelPlugin<ResolvedTelegramAccount, TelegramProbe> = {
...createTelegramPluginBase({
configSchema: buildChannelConfigSchema(TelegramConfigSchema),
setupWizard: telegramSetupWizard,
setup: telegramSetupAdapter,
}),

View File

@ -1,11 +1,4 @@
import {
buildChannelConfigSchema,
resolveWhatsAppGroupIntroHint,
resolveWhatsAppGroupRequireMention,
resolveWhatsAppGroupToolPolicy,
WhatsAppConfigSchema,
type ChannelPlugin,
} from "openclaw/plugin-sdk/whatsapp";
import { type ChannelPlugin } from "openclaw/plugin-sdk/whatsapp";
import { type ResolvedWhatsAppAccount } from "./accounts.js";
import { webAuthExists } from "./auth-store.js";
import { whatsappSetupAdapter } from "./setup-core.js";
@ -13,12 +6,6 @@ import { createWhatsAppPluginBase, whatsappSetupWizardProxy } from "./shared.js"
export const whatsappSetupPlugin: ChannelPlugin<ResolvedWhatsAppAccount> = {
...createWhatsAppPluginBase({
configSchema: buildChannelConfigSchema(WhatsAppConfigSchema),
groups: {
resolveRequireMention: resolveWhatsAppGroupRequireMention,
resolveToolPolicy: resolveWhatsAppGroupToolPolicy,
resolveGroupIntroHint: resolveWhatsAppGroupIntroHint,
},
setupWizard: whatsappSetupWizardProxy,
setup: whatsappSetupAdapter,
isConfigured: async (account) => await webAuthExists(account.authDir),

View File

@ -1,6 +1,5 @@
import { buildAccountScopedAllowlistConfigEditor } from "openclaw/plugin-sdk/allowlist-config-edit";
import {
buildChannelConfigSchema,
createActionGate,
createWhatsAppOutboundBase,
DEFAULT_ACCOUNT_ID,
@ -8,13 +7,9 @@ import {
listWhatsAppDirectoryGroupsFromConfig,
listWhatsAppDirectoryPeersFromConfig,
readStringParam,
resolveWhatsAppGroupIntroHint,
resolveWhatsAppGroupRequireMention,
resolveWhatsAppGroupToolPolicy,
resolveWhatsAppOutboundTarget,
resolveWhatsAppHeartbeatRecipients,
resolveWhatsAppMentionStripRegexes,
WhatsAppConfigSchema,
type ChannelMessageActionName,
type ChannelPlugin,
} from "openclaw/plugin-sdk/whatsapp";
@ -49,12 +44,6 @@ function parseWhatsAppExplicitTarget(raw: string) {
export const whatsappPlugin: ChannelPlugin<ResolvedWhatsAppAccount> = {
...createWhatsAppPluginBase({
configSchema: buildChannelConfigSchema(WhatsAppConfigSchema),
groups: {
resolveRequireMention: resolveWhatsAppGroupRequireMention,
resolveToolPolicy: resolveWhatsAppGroupToolPolicy,
resolveGroupIntroHint: resolveWhatsAppGroupIntroHint,
},
setupWizard: whatsappSetupWizardProxy,
setup: whatsappSetupAdapter,
isConfigured: async (account) =>

View File

@ -43,6 +43,7 @@ function buildForwardCompatTemplate(params: {
provider: string;
api: "anthropic-messages" | "google-gemini-cli" | "openai-completions" | "openai-responses";
baseUrl: string;
reasoning?: boolean;
input?: readonly ["text"] | readonly ["text", "image"];
cost?: { input: number; output: number; cacheRead: number; cacheWrite: number };
contextWindow?: number;
@ -54,7 +55,7 @@ function buildForwardCompatTemplate(params: {
provider: params.provider,
api: params.api,
baseUrl: params.baseUrl,
reasoning: true,
reasoning: params.reasoning ?? true,
input: params.input ?? (["text", "image"] as const),
cost: params.cost ?? { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 },
contextWindow: params.contextWindow ?? 200000,

View File

@ -4,7 +4,7 @@ import {
createThreadBindingManager as createDiscordThreadBindingManager,
} from "../../../../extensions/discord/runtime-api.js";
import { createFeishuThreadBindingManager } from "../../../../extensions/feishu/api.js";
import { setMatrixRuntime } from "../../../../extensions/matrix/api.js";
import { setMatrixRuntime } from "../../../../extensions/matrix/src/runtime.js";
import { createTelegramThreadBindingManager } from "../../../../extensions/telegram/runtime-api.js";
import type { OpenClawConfig } from "../../../config/config.js";
import {

View File

@ -143,7 +143,7 @@ function formatInspectSection(title: string, lines: string[]): string[] {
if (lines.length === 0) {
return [];
}
return ["", `${theme.muted(`${title}:`)}`, ...lines];
return ["", theme.muted(`${title}:`), ...lines];
}
function formatCapabilityKinds(

View File

@ -159,14 +159,14 @@ export function buildPluginInspectReport(params: {
name: entry.hookName,
priority: entry.priority,
}))
.sort((a, b) => a.name.localeCompare(b.name));
.toSorted((a, b) => a.name.localeCompare(b.name));
const customHooks = report.hooks
.filter((entry) => entry.pluginId === plugin.id)
.map((entry) => ({
name: entry.entry.hook.name,
events: [...entry.events].sort(),
events: [...entry.events].toSorted(),
}))
.sort((a, b) => a.name.localeCompare(b.name));
.toSorted((a, b) => a.name.localeCompare(b.name));
const tools = report.tools
.filter((entry) => entry.pluginId === plugin.id)
.map((entry) => ({