@nextclaw/openclaw-compat 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +13 -1
- package/dist/index.js +96 -153
- package/package.json +12 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _nextclaw_core from '@nextclaw/core';
|
|
1
2
|
import { Config, ExtensionChannel } from '@nextclaw/core';
|
|
2
3
|
|
|
3
4
|
type PluginConfigUiHint = {
|
|
@@ -306,6 +307,17 @@ declare function sleep(ms: number): Promise<void>;
|
|
|
306
307
|
declare function normalizePluginHttpPath(rawPath: string): string;
|
|
307
308
|
declare const DEFAULT_ACCOUNT_ID = "default";
|
|
308
309
|
declare function normalizeAccountId(accountId?: string | null): string;
|
|
310
|
+
declare function createNextclawBuiltinChannelPlugin(channelId: string): {
|
|
311
|
+
id: string;
|
|
312
|
+
nextclaw: {
|
|
313
|
+
isEnabled: (cfg: _nextclaw_core.Config) => boolean;
|
|
314
|
+
createChannel: (ctx: {
|
|
315
|
+
config: _nextclaw_core.Config;
|
|
316
|
+
bus: _nextclaw_core.MessageBus;
|
|
317
|
+
sessionManager?: _nextclaw_core.SessionManager;
|
|
318
|
+
}) => unknown;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
309
321
|
declare const __nextclawPluginSdkCompat = true;
|
|
310
322
|
type _CompatOnly = OpenClawPluginApi;
|
|
311
323
|
|
|
@@ -615,4 +627,4 @@ declare function uninstallPlugin(params: {
|
|
|
615
627
|
extensionsDir?: string;
|
|
616
628
|
}): Promise<UninstallPluginResult>;
|
|
617
629
|
|
|
618
|
-
export { DEFAULT_ACCOUNT_ID, type InstallPluginResult, type NormalizedPluginsConfig, type OpenClawChannelAgentPrompt, type OpenClawChannelConfigAdapter, type OpenClawChannelConfigSchema, type OpenClawChannelGateway, type OpenClawChannelGatewayStartContext, type OpenClawChannelPlugin, type OpenClawChannelSetup, type OpenClawPluginApi, type OpenClawPluginChannelRegistration, type OpenClawPluginConfigSchema, type OpenClawPluginDefinition, type OpenClawPluginModule, type OpenClawPluginTool, type OpenClawPluginToolContext, type OpenClawPluginToolFactory, type OpenClawPluginToolOptions, type OpenClawProviderPlugin, PLUGIN_MANIFEST_FILENAME, PLUGIN_MANIFEST_FILENAMES, type PackageManifest, type PluginCandidate, type PluginChannelBinding, type PluginChannelGatewayHandle, type PluginChannelRegistration, type PluginConfigUiHint, type PluginDiagnostic, type PluginDiscoveryResult, type PluginInstallLogger, type PluginInstallSource, type PluginInstallUpdate, type PluginKind, type PluginLoadOptions, type PluginLogger, type PluginManifest, type PluginManifestLoadResult, type PluginManifestRecord, type PluginManifestRegistry, type PluginOrigin, type PluginProviderRegistration, type PluginRecord, type PluginRegisterRuntime, type PluginRegistry, type PluginReplyDispatchParams, type PluginRuntime, type PluginRuntimeBridge, type PluginStatusReport, type PluginToolRegistration, type PluginUiMetadata, type UninstallActions, type UninstallPluginResult, type _CompatOnly, __nextclawPluginSdkCompat, addPluginLoadPath, buildChannelConfigSchema, buildOauthProviderAuthResult, buildPluginStatusReport, createPluginRegisterRuntime, createPluginRuntime, disablePluginInConfig, discoverOpenClawPlugins, emptyPluginConfigSchema, enablePluginInConfig, getPackageManifestMetadata, getPluginChannelBindings, getPluginUiMetadataFromRegistry, installPluginFromArchive, installPluginFromDir, installPluginFromFile, installPluginFromNpmSpec, installPluginFromPath, loadOpenClawPlugins, loadPluginManifest, loadPluginManifestRegistry, loadPluginUiMetadata, normalizeAccountId, normalizePluginHttpPath, normalizePluginsConfig, recordPluginInstall, registerPluginWithApi, removePluginFromConfig, resolveEnableState, resolvePluginChannelMessageToolHints, resolvePluginInstallDir, resolvePluginManifestPath, resolveUninstallDirectoryTarget, setPluginRuntimeBridge, sleep, startPluginChannelGateways, stopPluginChannelGateways, toPluginUiMetadata, uninstallPlugin, validateJsonSchemaValue };
|
|
630
|
+
export { DEFAULT_ACCOUNT_ID, type InstallPluginResult, type NormalizedPluginsConfig, type OpenClawChannelAgentPrompt, type OpenClawChannelConfigAdapter, type OpenClawChannelConfigSchema, type OpenClawChannelGateway, type OpenClawChannelGatewayStartContext, type OpenClawChannelPlugin, type OpenClawChannelSetup, type OpenClawPluginApi, type OpenClawPluginChannelRegistration, type OpenClawPluginConfigSchema, type OpenClawPluginDefinition, type OpenClawPluginModule, type OpenClawPluginTool, type OpenClawPluginToolContext, type OpenClawPluginToolFactory, type OpenClawPluginToolOptions, type OpenClawProviderPlugin, PLUGIN_MANIFEST_FILENAME, PLUGIN_MANIFEST_FILENAMES, type PackageManifest, type PluginCandidate, type PluginChannelBinding, type PluginChannelGatewayHandle, type PluginChannelRegistration, type PluginConfigUiHint, type PluginDiagnostic, type PluginDiscoveryResult, type PluginInstallLogger, type PluginInstallSource, type PluginInstallUpdate, type PluginKind, type PluginLoadOptions, type PluginLogger, type PluginManifest, type PluginManifestLoadResult, type PluginManifestRecord, type PluginManifestRegistry, type PluginOrigin, type PluginProviderRegistration, type PluginRecord, type PluginRegisterRuntime, type PluginRegistry, type PluginReplyDispatchParams, type PluginRuntime, type PluginRuntimeBridge, type PluginStatusReport, type PluginToolRegistration, type PluginUiMetadata, type UninstallActions, type UninstallPluginResult, type _CompatOnly, __nextclawPluginSdkCompat, addPluginLoadPath, buildChannelConfigSchema, buildOauthProviderAuthResult, buildPluginStatusReport, createNextclawBuiltinChannelPlugin, createPluginRegisterRuntime, createPluginRuntime, disablePluginInConfig, discoverOpenClawPlugins, emptyPluginConfigSchema, enablePluginInConfig, getPackageManifestMetadata, getPluginChannelBindings, getPluginUiMetadataFromRegistry, installPluginFromArchive, installPluginFromDir, installPluginFromFile, installPluginFromNpmSpec, installPluginFromPath, loadOpenClawPlugins, loadPluginManifest, loadPluginManifestRegistry, loadPluginUiMetadata, normalizeAccountId, normalizePluginHttpPath, normalizePluginsConfig, recordPluginInstall, registerPluginWithApi, removePluginFromConfig, resolveEnableState, resolvePluginChannelMessageToolHints, resolvePluginInstallDir, resolvePluginManifestPath, resolveUninstallDirectoryTarget, setPluginRuntimeBridge, sleep, startPluginChannelGateways, stopPluginChannelGateways, toPluginUiMetadata, uninstallPlugin, validateJsonSchemaValue };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/plugin-sdk/index.ts
|
|
2
|
+
import { resolveBuiltinChannelRuntime } from "@nextclaw/channel-runtime";
|
|
2
3
|
function emptyPluginConfigSchema() {
|
|
3
4
|
return {
|
|
4
5
|
type: "object",
|
|
@@ -44,6 +45,16 @@ function normalizeAccountId(accountId) {
|
|
|
44
45
|
const trimmed = accountId?.trim();
|
|
45
46
|
return trimmed || DEFAULT_ACCOUNT_ID;
|
|
46
47
|
}
|
|
48
|
+
function createNextclawBuiltinChannelPlugin(channelId) {
|
|
49
|
+
const runtime = resolveBuiltinChannelRuntime(channelId);
|
|
50
|
+
return {
|
|
51
|
+
id: channelId,
|
|
52
|
+
nextclaw: {
|
|
53
|
+
isEnabled: runtime.isEnabled,
|
|
54
|
+
createChannel: runtime.createChannel
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
47
58
|
var __nextclawPluginSdkCompat = true;
|
|
48
59
|
|
|
49
60
|
// src/plugins/config-state.ts
|
|
@@ -224,10 +235,10 @@ function resolvePluginChannelMessageToolHints(params) {
|
|
|
224
235
|
}
|
|
225
236
|
}
|
|
226
237
|
function getPluginUiMetadataFromRegistry(registry) {
|
|
227
|
-
return registry.plugins.map((
|
|
228
|
-
id:
|
|
229
|
-
configSchema:
|
|
230
|
-
configUiHints:
|
|
238
|
+
return registry.plugins.map((plugin) => ({
|
|
239
|
+
id: plugin.id,
|
|
240
|
+
configSchema: plugin.configJsonSchema,
|
|
241
|
+
configUiHints: plugin.configUiHints
|
|
231
242
|
}));
|
|
232
243
|
}
|
|
233
244
|
async function startPluginChannelGateways(params) {
|
|
@@ -1059,6 +1070,7 @@ async function installPluginFromPath(params) {
|
|
|
1059
1070
|
import fs5 from "fs";
|
|
1060
1071
|
import path5 from "path";
|
|
1061
1072
|
import { fileURLToPath } from "url";
|
|
1073
|
+
import { createRequire } from "module";
|
|
1062
1074
|
import createJitiImport from "jiti";
|
|
1063
1075
|
import { getWorkspacePathFromConfig } from "@nextclaw/core";
|
|
1064
1076
|
|
|
@@ -1240,132 +1252,6 @@ function validateJsonSchemaValue(params) {
|
|
|
1240
1252
|
return { ok: false, errors: formatAjvErrors(cached.validate.errors) };
|
|
1241
1253
|
}
|
|
1242
1254
|
|
|
1243
|
-
// src/plugins/bundled/channels/factory.ts
|
|
1244
|
-
import { listBuiltinChannelPlugins } from "@nextclaw/core";
|
|
1245
|
-
var EMPTY_PLUGIN_CONFIG_SCHEMA = {
|
|
1246
|
-
type: "object",
|
|
1247
|
-
additionalProperties: false,
|
|
1248
|
-
properties: {}
|
|
1249
|
-
};
|
|
1250
|
-
function resolveBuiltinChannelPlugin(channelId) {
|
|
1251
|
-
const plugin10 = listBuiltinChannelPlugins().find((entry) => entry.id === channelId);
|
|
1252
|
-
if (!plugin10) {
|
|
1253
|
-
throw new Error(`builtin channel plugin not found: ${channelId}`);
|
|
1254
|
-
}
|
|
1255
|
-
return plugin10;
|
|
1256
|
-
}
|
|
1257
|
-
function createBundledChannelPlugin(params) {
|
|
1258
|
-
const pluginId = `builtin-channel-${params.channelId}`;
|
|
1259
|
-
const sourceDescription = params.description ?? `Builtin NextClaw channel plugin for ${params.channelId}`;
|
|
1260
|
-
return {
|
|
1261
|
-
id: pluginId,
|
|
1262
|
-
name: params.name,
|
|
1263
|
-
description: sourceDescription,
|
|
1264
|
-
configSchema: EMPTY_PLUGIN_CONFIG_SCHEMA,
|
|
1265
|
-
register(api) {
|
|
1266
|
-
const builtin = resolveBuiltinChannelPlugin(params.channelId);
|
|
1267
|
-
api.registerChannel({
|
|
1268
|
-
plugin: {
|
|
1269
|
-
id: params.channelId,
|
|
1270
|
-
nextclaw: {
|
|
1271
|
-
isEnabled: builtin.isEnabled,
|
|
1272
|
-
createChannel: builtin.create
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
});
|
|
1276
|
-
}
|
|
1277
|
-
};
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
// src/plugins/bundled/channels/telegram.ts
|
|
1281
|
-
var plugin = createBundledChannelPlugin({
|
|
1282
|
-
channelId: "telegram",
|
|
1283
|
-
name: "Builtin Telegram Channel",
|
|
1284
|
-
description: "Builtin NextClaw channel plugin for telegram"
|
|
1285
|
-
});
|
|
1286
|
-
var telegram_default = plugin;
|
|
1287
|
-
|
|
1288
|
-
// src/plugins/bundled/channels/whatsapp.ts
|
|
1289
|
-
var plugin2 = createBundledChannelPlugin({
|
|
1290
|
-
channelId: "whatsapp",
|
|
1291
|
-
name: "Builtin WhatsApp Channel",
|
|
1292
|
-
description: "Builtin NextClaw channel plugin for whatsapp"
|
|
1293
|
-
});
|
|
1294
|
-
var whatsapp_default = plugin2;
|
|
1295
|
-
|
|
1296
|
-
// src/plugins/bundled/channels/discord.ts
|
|
1297
|
-
var plugin3 = createBundledChannelPlugin({
|
|
1298
|
-
channelId: "discord",
|
|
1299
|
-
name: "Builtin Discord Channel",
|
|
1300
|
-
description: "Builtin NextClaw channel plugin for discord"
|
|
1301
|
-
});
|
|
1302
|
-
var discord_default = plugin3;
|
|
1303
|
-
|
|
1304
|
-
// src/plugins/bundled/channels/feishu.ts
|
|
1305
|
-
var plugin4 = createBundledChannelPlugin({
|
|
1306
|
-
channelId: "feishu",
|
|
1307
|
-
name: "Builtin Feishu Channel",
|
|
1308
|
-
description: "Builtin NextClaw channel plugin for feishu"
|
|
1309
|
-
});
|
|
1310
|
-
var feishu_default = plugin4;
|
|
1311
|
-
|
|
1312
|
-
// src/plugins/bundled/channels/mochat.ts
|
|
1313
|
-
var plugin5 = createBundledChannelPlugin({
|
|
1314
|
-
channelId: "mochat",
|
|
1315
|
-
name: "Builtin Mochat Channel",
|
|
1316
|
-
description: "Builtin NextClaw channel plugin for mochat"
|
|
1317
|
-
});
|
|
1318
|
-
var mochat_default = plugin5;
|
|
1319
|
-
|
|
1320
|
-
// src/plugins/bundled/channels/dingtalk.ts
|
|
1321
|
-
var plugin6 = createBundledChannelPlugin({
|
|
1322
|
-
channelId: "dingtalk",
|
|
1323
|
-
name: "Builtin DingTalk Channel",
|
|
1324
|
-
description: "Builtin NextClaw channel plugin for dingtalk"
|
|
1325
|
-
});
|
|
1326
|
-
var dingtalk_default = plugin6;
|
|
1327
|
-
|
|
1328
|
-
// src/plugins/bundled/channels/email.ts
|
|
1329
|
-
var plugin7 = createBundledChannelPlugin({
|
|
1330
|
-
channelId: "email",
|
|
1331
|
-
name: "Builtin Email Channel",
|
|
1332
|
-
description: "Builtin NextClaw channel plugin for email"
|
|
1333
|
-
});
|
|
1334
|
-
var email_default = plugin7;
|
|
1335
|
-
|
|
1336
|
-
// src/plugins/bundled/channels/slack.ts
|
|
1337
|
-
var plugin8 = createBundledChannelPlugin({
|
|
1338
|
-
channelId: "slack",
|
|
1339
|
-
name: "Builtin Slack Channel",
|
|
1340
|
-
description: "Builtin NextClaw channel plugin for slack"
|
|
1341
|
-
});
|
|
1342
|
-
var slack_default = plugin8;
|
|
1343
|
-
|
|
1344
|
-
// src/plugins/bundled/channels/qq.ts
|
|
1345
|
-
var plugin9 = createBundledChannelPlugin({
|
|
1346
|
-
channelId: "qq",
|
|
1347
|
-
name: "Builtin QQ Channel",
|
|
1348
|
-
description: "Builtin NextClaw channel plugin for qq"
|
|
1349
|
-
});
|
|
1350
|
-
var qq_default = plugin9;
|
|
1351
|
-
|
|
1352
|
-
// src/plugins/bundled/channels/index.ts
|
|
1353
|
-
var BUNDLED_CHANNEL_PLUGINS = [
|
|
1354
|
-
telegram_default,
|
|
1355
|
-
whatsapp_default,
|
|
1356
|
-
discord_default,
|
|
1357
|
-
feishu_default,
|
|
1358
|
-
mochat_default,
|
|
1359
|
-
dingtalk_default,
|
|
1360
|
-
email_default,
|
|
1361
|
-
slack_default,
|
|
1362
|
-
qq_default
|
|
1363
|
-
];
|
|
1364
|
-
function listBundledChannelPluginDefinitions() {
|
|
1365
|
-
return [...BUNDLED_CHANNEL_PLUGINS];
|
|
1366
|
-
}
|
|
1367
|
-
var BUNDLED_CHANNEL_PLUGIN_IDS = BUNDLED_CHANNEL_PLUGINS.map((plugin10) => plugin10.id).filter((id) => typeof id === "string" && id.trim().length > 0);
|
|
1368
|
-
|
|
1369
1255
|
// src/plugins/registry.ts
|
|
1370
1256
|
import path4 from "path";
|
|
1371
1257
|
import { expandHome as expandHome2 } from "@nextclaw/core";
|
|
@@ -1763,6 +1649,32 @@ var defaultLogger2 = {
|
|
|
1763
1649
|
error: (message) => console.error(message),
|
|
1764
1650
|
debug: (message) => console.debug(message)
|
|
1765
1651
|
};
|
|
1652
|
+
var BUNDLED_CHANNEL_PLUGIN_PACKAGES = [
|
|
1653
|
+
"@nextclaw/channel-plugin-telegram",
|
|
1654
|
+
"@nextclaw/channel-plugin-whatsapp",
|
|
1655
|
+
"@nextclaw/channel-plugin-discord",
|
|
1656
|
+
"@nextclaw/channel-plugin-feishu",
|
|
1657
|
+
"@nextclaw/channel-plugin-mochat",
|
|
1658
|
+
"@nextclaw/channel-plugin-dingtalk",
|
|
1659
|
+
"@nextclaw/channel-plugin-email",
|
|
1660
|
+
"@nextclaw/channel-plugin-slack",
|
|
1661
|
+
"@nextclaw/channel-plugin-qq"
|
|
1662
|
+
];
|
|
1663
|
+
function resolvePackageRootFromEntry(entryFile) {
|
|
1664
|
+
let cursor = path5.dirname(entryFile);
|
|
1665
|
+
for (let i = 0; i < 8; i += 1) {
|
|
1666
|
+
const candidate = path5.join(cursor, "package.json");
|
|
1667
|
+
if (fs5.existsSync(candidate)) {
|
|
1668
|
+
return cursor;
|
|
1669
|
+
}
|
|
1670
|
+
const parent = path5.dirname(cursor);
|
|
1671
|
+
if (parent === cursor) {
|
|
1672
|
+
break;
|
|
1673
|
+
}
|
|
1674
|
+
cursor = parent;
|
|
1675
|
+
}
|
|
1676
|
+
return path5.dirname(entryFile);
|
|
1677
|
+
}
|
|
1766
1678
|
function resolvePluginSdkAliasFile(params) {
|
|
1767
1679
|
try {
|
|
1768
1680
|
const modulePath = fileURLToPath(import.meta.url);
|
|
@@ -1856,9 +1768,37 @@ function validatePluginConfig(params) {
|
|
|
1856
1768
|
return { ok: false, errors: result.errors };
|
|
1857
1769
|
}
|
|
1858
1770
|
function appendBundledChannelPlugins(params) {
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1771
|
+
const require2 = createRequire(import.meta.url);
|
|
1772
|
+
for (const packageName of BUNDLED_CHANNEL_PLUGIN_PACKAGES) {
|
|
1773
|
+
let entryFile = "";
|
|
1774
|
+
let rootDir = "";
|
|
1775
|
+
try {
|
|
1776
|
+
entryFile = require2.resolve(packageName);
|
|
1777
|
+
rootDir = resolvePackageRootFromEntry(entryFile);
|
|
1778
|
+
} catch (err) {
|
|
1779
|
+
params.registry.diagnostics.push({
|
|
1780
|
+
level: "error",
|
|
1781
|
+
source: packageName,
|
|
1782
|
+
message: `bundled plugin package not resolvable: ${String(err)}`
|
|
1783
|
+
});
|
|
1784
|
+
continue;
|
|
1785
|
+
}
|
|
1786
|
+
let moduleExport = null;
|
|
1787
|
+
try {
|
|
1788
|
+
moduleExport = params.jiti(entryFile);
|
|
1789
|
+
} catch (err) {
|
|
1790
|
+
params.registry.diagnostics.push({
|
|
1791
|
+
level: "error",
|
|
1792
|
+
source: entryFile,
|
|
1793
|
+
message: `failed to load bundled plugin: ${String(err)}`
|
|
1794
|
+
});
|
|
1795
|
+
continue;
|
|
1796
|
+
}
|
|
1797
|
+
const resolved = resolvePluginModuleExport(moduleExport);
|
|
1798
|
+
const definition = resolved.definition;
|
|
1799
|
+
const register = resolved.register;
|
|
1800
|
+
const pluginId = typeof definition?.id === "string" ? definition.id.trim() : "";
|
|
1801
|
+
const source = entryFile;
|
|
1862
1802
|
if (!pluginId) {
|
|
1863
1803
|
params.registry.diagnostics.push({
|
|
1864
1804
|
level: "error",
|
|
@@ -1869,18 +1809,17 @@ function appendBundledChannelPlugins(params) {
|
|
|
1869
1809
|
}
|
|
1870
1810
|
const record = createPluginRecord({
|
|
1871
1811
|
id: pluginId,
|
|
1872
|
-
name: definition
|
|
1873
|
-
description: definition
|
|
1874
|
-
version: definition
|
|
1875
|
-
kind: definition
|
|
1812
|
+
name: definition?.name ?? pluginId,
|
|
1813
|
+
description: definition?.description,
|
|
1814
|
+
version: definition?.version,
|
|
1815
|
+
kind: definition?.kind,
|
|
1876
1816
|
source,
|
|
1877
1817
|
origin: "bundled",
|
|
1878
1818
|
workspaceDir: params.runtime.workspaceDir,
|
|
1879
1819
|
enabled: true,
|
|
1880
|
-
configSchema: Boolean(definition
|
|
1881
|
-
configJsonSchema: definition
|
|
1820
|
+
configSchema: Boolean(definition?.configSchema),
|
|
1821
|
+
configJsonSchema: definition?.configSchema
|
|
1882
1822
|
});
|
|
1883
|
-
const register = definition.register ?? definition.activate;
|
|
1884
1823
|
if (typeof register !== "function") {
|
|
1885
1824
|
record.status = "error";
|
|
1886
1825
|
record.error = "plugin export missing register/activate";
|
|
@@ -1898,7 +1837,7 @@ function appendBundledChannelPlugins(params) {
|
|
|
1898
1837
|
record,
|
|
1899
1838
|
pluginId,
|
|
1900
1839
|
source,
|
|
1901
|
-
rootDir
|
|
1840
|
+
rootDir,
|
|
1902
1841
|
register,
|
|
1903
1842
|
pluginConfig: void 0
|
|
1904
1843
|
});
|
|
@@ -1941,9 +1880,20 @@ function loadOpenClawPlugins(options) {
|
|
|
1941
1880
|
reservedChannelIds,
|
|
1942
1881
|
reservedProviderIds
|
|
1943
1882
|
});
|
|
1883
|
+
const pluginSdkAlias = resolvePluginSdkAlias();
|
|
1884
|
+
const jiti = createJiti(import.meta.url, {
|
|
1885
|
+
interopDefault: true,
|
|
1886
|
+
extensions: [".ts", ".tsx", ".mts", ".cts", ".js", ".mjs", ".cjs", ".json"],
|
|
1887
|
+
...pluginSdkAlias ? {
|
|
1888
|
+
alias: {
|
|
1889
|
+
"openclaw/plugin-sdk": pluginSdkAlias
|
|
1890
|
+
}
|
|
1891
|
+
} : {}
|
|
1892
|
+
});
|
|
1944
1893
|
appendBundledChannelPlugins({
|
|
1945
1894
|
registry,
|
|
1946
|
-
runtime: registerRuntime
|
|
1895
|
+
runtime: registerRuntime,
|
|
1896
|
+
jiti
|
|
1947
1897
|
});
|
|
1948
1898
|
if (!loadExternalPlugins) {
|
|
1949
1899
|
return registry;
|
|
@@ -1961,17 +1911,9 @@ function loadOpenClawPlugins(options) {
|
|
|
1961
1911
|
});
|
|
1962
1912
|
registry.diagnostics.push(...manifestRegistry.diagnostics);
|
|
1963
1913
|
const manifestByRoot = new Map(manifestRegistry.plugins.map((entry) => [entry.rootDir, entry]));
|
|
1964
|
-
const seenIds =
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
interopDefault: true,
|
|
1968
|
-
extensions: [".ts", ".tsx", ".mts", ".cts", ".js", ".mjs", ".cjs", ".json"],
|
|
1969
|
-
...pluginSdkAlias ? {
|
|
1970
|
-
alias: {
|
|
1971
|
-
"openclaw/plugin-sdk": pluginSdkAlias
|
|
1972
|
-
}
|
|
1973
|
-
} : {}
|
|
1974
|
-
});
|
|
1914
|
+
const seenIds = new Map(
|
|
1915
|
+
registry.plugins.map((entry) => [entry.id, entry.origin])
|
|
1916
|
+
);
|
|
1975
1917
|
for (const candidate of discovery.candidates) {
|
|
1976
1918
|
const manifest = manifestByRoot.get(candidate.rootDir);
|
|
1977
1919
|
if (!manifest) {
|
|
@@ -2303,6 +2245,7 @@ export {
|
|
|
2303
2245
|
buildChannelConfigSchema,
|
|
2304
2246
|
buildOauthProviderAuthResult,
|
|
2305
2247
|
buildPluginStatusReport,
|
|
2248
|
+
createNextclawBuiltinChannelPlugin,
|
|
2306
2249
|
createPluginRegisterRuntime,
|
|
2307
2250
|
createPluginRuntime,
|
|
2308
2251
|
disablePluginInConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/openclaw-compat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "OpenClaw plugin compatibility layer for NextClaw.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,17 @@
|
|
|
18
18
|
"jiti": "^1.21.7",
|
|
19
19
|
"jszip": "^3.10.1",
|
|
20
20
|
"tar": "^7.4.3",
|
|
21
|
-
"@nextclaw/core": "^0.6.
|
|
21
|
+
"@nextclaw/core": "^0.6.17",
|
|
22
|
+
"@nextclaw/channel-plugin-telegram": "^0.1.1",
|
|
23
|
+
"@nextclaw/channel-plugin-whatsapp": "^0.1.1",
|
|
24
|
+
"@nextclaw/channel-plugin-discord": "^0.1.1",
|
|
25
|
+
"@nextclaw/channel-plugin-feishu": "^0.1.1",
|
|
26
|
+
"@nextclaw/channel-plugin-mochat": "^0.1.1",
|
|
27
|
+
"@nextclaw/channel-plugin-dingtalk": "^0.1.1",
|
|
28
|
+
"@nextclaw/channel-plugin-email": "^0.1.1",
|
|
29
|
+
"@nextclaw/channel-plugin-slack": "^0.1.1",
|
|
30
|
+
"@nextclaw/channel-plugin-qq": "^0.1.1",
|
|
31
|
+
"@nextclaw/channel-runtime": "^0.1.1"
|
|
22
32
|
},
|
|
23
33
|
"devDependencies": {
|
|
24
34
|
"@types/node": "^20.17.6",
|