Remove @larksuite/openclaw-lark dependency and related plugin installation logic, as Feishu is now a built-in extension since OpenClaw 2026.4.11. Update relevant code and documentation to reflect this change.
This commit is contained in:
@@ -25,7 +25,6 @@ import {
|
||||
} from '../../utils/agent-config';
|
||||
import {
|
||||
ensureDingTalkPluginInstalled,
|
||||
ensureFeishuPluginInstalled,
|
||||
ensureWeChatPluginInstalled,
|
||||
ensureWeComPluginInstalled,
|
||||
} from '../../utils/plugin-install';
|
||||
@@ -1349,14 +1348,7 @@ export async function handleChannelRoutes(
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// QQBot is a built-in channel since OpenClaw 3.31 — no plugin install needed
|
||||
if (storedChannelType === 'feishu') {
|
||||
const installResult = await ensureFeishuPluginInstalled();
|
||||
if (!installResult.installed) {
|
||||
sendJson(res, 500, { success: false, error: installResult.warning || 'Feishu plugin install failed' });
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Feishu is a built-in extension since OpenClaw 2026.4.11 — no plugin install needed
|
||||
if (storedChannelType === OPENCLAW_WECHAT_CHANNEL_TYPE) {
|
||||
const installResult = await ensureWeChatPluginInstalled();
|
||||
if (!installResult.installed) {
|
||||
|
||||
@@ -48,7 +48,6 @@ export interface GatewayLaunchContext {
|
||||
const CHANNEL_PLUGIN_MAP: Record<string, { dirName: string; npmName: string }> = {
|
||||
dingtalk: { dirName: 'dingtalk', npmName: '@soimy/dingtalk' },
|
||||
wecom: { dirName: 'wecom', npmName: '@wecom/wecom-openclaw-plugin' },
|
||||
feishu: { dirName: 'feishu-openclaw-plugin', npmName: '@larksuite/openclaw-lark' },
|
||||
|
||||
'openclaw-weixin': { dirName: 'openclaw-weixin', npmName: '@tencent-weixin/openclaw-weixin' },
|
||||
};
|
||||
@@ -59,7 +58,7 @@ const CHANNEL_PLUGIN_MAP: Record<string, { dirName: string; npmName: string }> =
|
||||
* ~/.openclaw/extensions/, the broken copy overrides the working built-in
|
||||
* plugin and must be removed.
|
||||
*/
|
||||
const BUILTIN_CHANNEL_EXTENSIONS = ['discord', 'telegram', 'qqbot'];
|
||||
const BUILTIN_CHANNEL_EXTENSIONS = ['discord', 'telegram', 'qqbot', 'feishu-openclaw-plugin'];
|
||||
|
||||
function cleanupStaleBuiltInExtensions(): void {
|
||||
for (const ext of BUILTIN_CHANNEL_EXTENSIONS) {
|
||||
@@ -274,11 +273,6 @@ export async function syncGatewayConfigBeforeLaunch(
|
||||
for (const [channelType, info] of Object.entries(CHANNEL_PLUGIN_MAP)) {
|
||||
pluginIdToChannel[info.dirName] = channelType;
|
||||
}
|
||||
// Known manifest IDs that differ from their dirName/channelType
|
||||
|
||||
pluginIdToChannel['openclaw-lark'] = 'feishu';
|
||||
pluginIdToChannel['feishu-openclaw-plugin'] = 'feishu';
|
||||
|
||||
for (const pluginId of allowList) {
|
||||
const channelType = pluginIdToChannel[pluginId] ?? pluginId;
|
||||
if (CHANNEL_PLUGIN_MAP[channelType] && !configuredChannels.includes(channelType)) {
|
||||
|
||||
@@ -36,7 +36,6 @@ import { toOpenClawChannelType, toUiChannelType } from '../utils/channel-alias';
|
||||
import { checkUvInstalled, installUv, setupManagedPython } from '../utils/uv-setup';
|
||||
import {
|
||||
ensureDingTalkPluginInstalled,
|
||||
ensureFeishuPluginInstalled,
|
||||
ensureWeComPluginInstalled,
|
||||
} from '../utils/plugin-install';
|
||||
import { updateSkillConfig, getSkillConfig, getAllSkillConfigs } from '../utils/skill-config';
|
||||
@@ -1497,23 +1496,7 @@ function registerOpenClawHandlers(gatewayManager: GatewayManager): void {
|
||||
warning: installResult.warning,
|
||||
};
|
||||
}
|
||||
// QQBot is a built-in channel since OpenClaw 3.31 — no plugin install needed
|
||||
if (channelType === 'feishu') {
|
||||
const installResult = await ensureFeishuPluginInstalled();
|
||||
if (!installResult.installed) {
|
||||
return {
|
||||
success: false,
|
||||
error: installResult.warning || 'Feishu plugin install failed',
|
||||
};
|
||||
}
|
||||
await saveChannelConfig(channelType, config);
|
||||
scheduleGatewayChannelSaveRefresh(channelType, `channel:saveConfig (${channelType})`);
|
||||
return {
|
||||
success: true,
|
||||
pluginInstalled: installResult.installed,
|
||||
warning: installResult.warning,
|
||||
};
|
||||
}
|
||||
// Feishu is a built-in extension since OpenClaw 2026.4.11 — no plugin install needed
|
||||
await saveChannelConfig(channelType, config);
|
||||
scheduleGatewayChannelSaveRefresh(channelType, `channel:saveConfig (${channelType})`);
|
||||
return { success: true };
|
||||
|
||||
@@ -24,7 +24,7 @@ const CONFIG_FILE = join(OPENCLAW_DIR, 'openclaw.json');
|
||||
const WECOM_PLUGIN_ID = 'wecom';
|
||||
// Note: QQBot is a built-in channel since OpenClaw 3.31 — no plugin ID needed.
|
||||
const WECHAT_PLUGIN_ID = OPENCLAW_WECHAT_CHANNEL_TYPE;
|
||||
const FEISHU_PLUGIN_ID_CANDIDATES = ['openclaw-lark', 'feishu-openclaw-plugin'] as const;
|
||||
const FEISHU_PLUGIN_ID_CANDIDATES = ['feishu', 'openclaw-lark', 'feishu-openclaw-plugin'] as const;
|
||||
const DEFAULT_ACCOUNT_ID = 'default';
|
||||
// Channels whose plugin schema uses additionalProperties:false, meaning
|
||||
// credential keys MUST NOT appear at the top level of `channels.<type>`.
|
||||
|
||||
@@ -208,7 +208,7 @@ async function discoverAgentIds(): Promise<string[]> {
|
||||
// ── OpenClaw Config Helpers ──────────────────────────────────────
|
||||
|
||||
const OPENCLAW_CONFIG_PATH = join(homedir(), '.openclaw', 'openclaw.json');
|
||||
const FEISHU_PLUGIN_ID_CANDIDATES = ['openclaw-lark', 'feishu-openclaw-plugin'] as const;
|
||||
const FEISHU_PLUGIN_ID_CANDIDATES = ['feishu', 'openclaw-lark', 'feishu-openclaw-plugin'] as const;
|
||||
const VALID_COMPACTION_MODES = new Set(['default', 'safeguard']);
|
||||
const BUILTIN_CHANNEL_IDS = new Set([
|
||||
'discord',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Shared OpenClaw Plugin Install Utilities
|
||||
*
|
||||
* Provides version-aware install/upgrade logic for bundled OpenClaw plugins
|
||||
* (DingTalk, WeCom, Feishu, WeChat). Used both at app startup (to auto-upgrade
|
||||
* (DingTalk, WeCom, WeChat). Used both at app startup (to auto-upgrade
|
||||
* stale plugins) and when a user configures a channel.
|
||||
*
|
||||
* Note: QQBot was moved to a built-in channel in OpenClaw 3.31 and is no longer
|
||||
@@ -233,7 +233,6 @@ function patchPluginEntryIds(targetDir: string): void {
|
||||
const PLUGIN_NPM_NAMES: Record<string, string> = {
|
||||
dingtalk: '@soimy/dingtalk',
|
||||
wecom: '@wecom/wecom-openclaw-plugin',
|
||||
'feishu-openclaw-plugin': '@larksuite/openclaw-lark',
|
||||
|
||||
'openclaw-weixin': '@tencent-weixin/openclaw-weixin',
|
||||
};
|
||||
@@ -503,15 +502,6 @@ export function ensureWeComPluginInstalled(): { installed: boolean; warning?: st
|
||||
return ensurePluginInstalled('wecom', buildCandidateSources('wecom'), 'WeCom');
|
||||
}
|
||||
|
||||
export function ensureFeishuPluginInstalled(): { installed: boolean; warning?: string } {
|
||||
return ensurePluginInstalled(
|
||||
'feishu-openclaw-plugin',
|
||||
buildCandidateSources('feishu-openclaw-plugin'),
|
||||
'Feishu',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function ensureWeChatPluginInstalled(): { installed: boolean; warning?: string } {
|
||||
return ensurePluginInstalled('openclaw-weixin', buildCandidateSources('openclaw-weixin'), 'WeChat');
|
||||
@@ -525,8 +515,6 @@ export function ensureWeChatPluginInstalled(): { installed: boolean; warning?: s
|
||||
const ALL_BUNDLED_PLUGINS = [
|
||||
{ fn: ensureDingTalkPluginInstalled, label: 'DingTalk' },
|
||||
{ fn: ensureWeComPluginInstalled, label: 'WeCom' },
|
||||
|
||||
{ fn: ensureFeishuPluginInstalled, label: 'Feishu' },
|
||||
{ fn: ensureWeChatPluginInstalled, label: 'WeChat' },
|
||||
] as const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user