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

@@ -5,8 +5,6 @@
*
* Build a self-contained mirror of OpenClaw third-party plugins for packaging.
* Current plugins:
* - @soimy/dingtalk -> build/openclaw-plugins/dingtalk
* - @wecom/wecom-openclaw-plugin -> build/openclaw-plugins/wecom
* - @tencent-weixin/openclaw-weixin -> build/openclaw-plugins/openclaw-weixin
*
* The output plugin directory contains:
@@ -37,9 +35,6 @@ function normWin(p) {
}
const PLUGINS = [
{ npmName: '@soimy/dingtalk', pluginId: 'dingtalk' },
{ npmName: '@wecom/wecom-openclaw-plugin', pluginId: 'wecom' },
{ npmName: '@larksuite/openclaw-lark', pluginId: 'feishu-openclaw-plugin' },
{ npmName: '@tencent-weixin/openclaw-weixin', pluginId: 'openclaw-weixin' },
];
@@ -183,8 +178,7 @@ function bundleOnePlugin({ npmName, pluginId }) {
/**
* Patch plugin entry JS files so the exported `id` matches openclaw.plugin.json.
* Some plugins (e.g. wecom) ship with a hardcoded ID in their compiled output
* that differs from the manifest, causing a Gateway "plugin id mismatch" error.
* Kept as a safety hook for future bundled plugins that may ship mismatched IDs.
*/
function patchPluginId(pluginDir, expectedId) {
const manifestPath = path.join(pluginDir, 'openclaw.plugin.json');
@@ -206,9 +200,7 @@ function patchPluginId(pluginDir, expectedId) {
// Known ID mismatches to patch. Keys are the wrong ID found in compiled JS,
// values are the correct ID (must match openclaw.plugin.json).
const ID_FIXES = {
'wecom-openclaw-plugin': 'wecom',
};
const ID_FIXES = {};
for (const entry of entryFiles) {
const entryPath = path.join(pluginDir, entry);
@@ -219,7 +211,6 @@ function patchPluginId(pluginDir, expectedId) {
for (const [wrongId, correctId] of Object.entries(ID_FIXES)) {
if (correctId !== expectedId) continue;
// Replace id: "wecom-openclaw-plugin" or id: 'wecom-openclaw-plugin'
const pattern = new RegExp(`(\\bid\\s*:\\s*)(["'])${wrongId.replace(/-/g, '\\-')}\\2`, 'g');
const replaced = content.replace(pattern, `$1$2${correctId}$2`);
if (replaced !== content) {