feat: prepare Zhinian desktop pilot
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman
2026-05-07 21:49:20 +08:00
parent cddaf37016
commit 0abc48189c
103 changed files with 10975 additions and 2049 deletions

View File

@@ -27,10 +27,7 @@ import {
listAgentsSnapshotFromConfig,
} from '../../utils/agent-config';
import {
ensureDingTalkPluginInstalled,
ensureFeishuPluginInstalled,
ensureWeChatPluginInstalled,
ensureWeComPluginInstalled,
} from '../../utils/plugin-install';
import {
computeChannelRuntimeStatus,
@@ -83,6 +80,7 @@ import type { HostApiContext } from '../context';
import { parseJsonBody, sendJson } from '../route-utils';
const WECHAT_QR_TIMEOUT_MS = 8 * 60 * 1000;
const DISABLED_PLUGIN_CHANNEL_TYPES = new Set(['dingtalk', 'wecom', 'feishu']);
const activeQrLogins = new Map<string, string>();
interface WebLoginStartResult {
@@ -1559,27 +1557,9 @@ export async function handleChannelRoutes(
return true;
}
const storedChannelType = resolveStoredChannelType(body.channelType);
if (storedChannelType === 'dingtalk') {
const installResult = await ensureDingTalkPluginInstalled();
if (!installResult.installed) {
sendJson(res, 500, { success: false, error: installResult.warning || 'DingTalk plugin install failed' });
return true;
}
}
if (storedChannelType === 'wecom') {
const installResult = await ensureWeComPluginInstalled();
if (!installResult.installed) {
sendJson(res, 500, { success: false, error: installResult.warning || 'WeCom plugin install failed' });
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;
}
if (DISABLED_PLUGIN_CHANNEL_TYPES.has(storedChannelType)) {
sendJson(res, 400, { success: false, error: '当前内测版本未启用该渠道' });
return true;
}
if (storedChannelType === OPENCLAW_WECHAT_CHANNEL_TYPE) {
const installResult = await ensureWeChatPluginInstalled();