@nextclaw/openclaw-compat 0.3.22 → 0.3.24

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 CHANGED
@@ -478,6 +478,7 @@ declare function toPluginConfigView(config: Config, bindings: PluginChannelBindi
478
478
  declare function mergePluginConfigView(baseConfig: Config, pluginViewConfig: Record<string, unknown>, bindings: PluginChannelBinding[]): Config;
479
479
  declare function startPluginChannelGateways(params: {
480
480
  registry: PluginRegistry;
481
+ config?: Config;
481
482
  logger?: PluginLogger;
482
483
  }): Promise<{
483
484
  handles: PluginChannelGatewayHandle[];
package/dist/index.js CHANGED
@@ -297,12 +297,16 @@ async function startPluginChannelGateways(params) {
297
297
  const logger = params.logger;
298
298
  const diagnostics = [];
299
299
  const handles = [];
300
- for (const binding of getPluginChannelBindings(params.registry)) {
300
+ const bindings = getPluginChannelBindings(params.registry);
301
+ const configView = params.config ? toPluginConfigView(params.config, bindings) : void 0;
302
+ for (const binding of bindings) {
301
303
  const gateway = binding.channel.gateway;
302
304
  if (!gateway?.startAccount) {
303
305
  continue;
304
306
  }
305
- const accountIdsRaw = binding.channel.config?.listAccountIds?.() ?? [binding.channel.config?.defaultAccountId?.() ?? "default"];
307
+ const accountIdsRaw = binding.channel.config?.listAccountIds?.(configView) ?? [
308
+ binding.channel.config?.defaultAccountId?.(configView) ?? "default"
309
+ ];
306
310
  const accountIds = Array.from(
307
311
  new Set(accountIdsRaw.map((id) => typeof id === "string" ? id.trim() : "").filter(Boolean))
308
312
  );
@@ -1374,6 +1378,31 @@ function resolvePluginSdkAliasFile(params) {
1374
1378
  function resolvePluginSdkAlias() {
1375
1379
  return resolvePluginSdkAliasFile({ srcFile: "index.ts", distFile: "index.js" });
1376
1380
  }
1381
+ function resolvePluginShimFile(relativePath) {
1382
+ try {
1383
+ const modulePath = fileURLToPath(import.meta.url);
1384
+ const isProduction = process.env.NODE_ENV === "production";
1385
+ let cursor = path5.dirname(modulePath);
1386
+ for (let i = 0; i < 6; i += 1) {
1387
+ const srcCandidate = path5.join(cursor, "src", "plugins", "shims", relativePath);
1388
+ const distCandidate = path5.join(cursor, "dist", "plugins", "shims", relativePath.replace(/\.ts$/, ".js"));
1389
+ const candidates = isProduction ? [distCandidate, srcCandidate] : [srcCandidate, distCandidate];
1390
+ for (const candidate of candidates) {
1391
+ if (fs5.existsSync(candidate)) {
1392
+ return candidate;
1393
+ }
1394
+ }
1395
+ const parent = path5.dirname(cursor);
1396
+ if (parent === cursor) {
1397
+ break;
1398
+ }
1399
+ cursor = parent;
1400
+ }
1401
+ } catch {
1402
+ return null;
1403
+ }
1404
+ return null;
1405
+ }
1377
1406
  function collectExportStringValues(value, values) {
1378
1407
  if (typeof value === "string") {
1379
1408
  values.push(value);
@@ -1476,6 +1505,10 @@ function buildPluginLoaderAliases(pluginRoot) {
1476
1505
  if (pluginSdkAlias && shouldUseCompatPluginSdkAlias) {
1477
1506
  aliases["openclaw/plugin-sdk"] = pluginSdkAlias;
1478
1507
  }
1508
+ const piCodingAgentShim = resolvePluginShimFile("pi-coding-agent.ts");
1509
+ if (piCodingAgentShim) {
1510
+ aliases["@mariozechner/pi-coding-agent"] = piCodingAgentShim;
1511
+ }
1479
1512
  return aliases;
1480
1513
  }
1481
1514
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/openclaw-compat",
3
- "version": "0.3.22",
3
+ "version": "0.3.24",
4
4
  "private": false,
5
5
  "description": "OpenClaw plugin compatibility layer for NextClaw.",
6
6
  "type": "module",
@@ -19,21 +19,21 @@
19
19
  "jiti": "^1.21.7",
20
20
  "jszip": "^3.10.1",
21
21
  "tar": "^7.4.3",
22
- "@nextclaw/channel-plugin-feishu": "0.2.15",
23
- "@nextclaw/channel-plugin-discord": "0.2.13",
24
- "@nextclaw/channel-plugin-dingtalk": "0.2.13",
25
- "@nextclaw/channel-plugin-email": "0.2.13",
26
- "@nextclaw/channel-plugin-mochat": "0.2.13",
27
- "@nextclaw/channel-plugin-qq": "0.2.13",
28
- "@nextclaw/channel-plugin-slack": "0.2.13",
29
- "@nextclaw/channel-plugin-telegram": "0.2.13",
30
- "@nextclaw/channel-runtime": "0.3.0",
31
- "@nextclaw/core": "0.10.0",
22
+ "@nextclaw/channel-plugin-dingtalk": "0.2.14",
23
+ "@nextclaw/channel-plugin-email": "0.2.14",
24
+ "@nextclaw/channel-plugin-discord": "0.2.14",
25
+ "@nextclaw/channel-plugin-feishu": "0.2.17",
26
+ "@nextclaw/channel-plugin-mochat": "0.2.14",
27
+ "@nextclaw/channel-plugin-slack": "0.2.14",
28
+ "@nextclaw/channel-plugin-telegram": "0.2.14",
29
+ "@nextclaw/channel-plugin-qq": "0.2.14",
30
+ "@nextclaw/channel-plugin-weixin": "0.1.8",
31
+ "@nextclaw/channel-plugin-wecom": "0.2.14",
32
+ "@nextclaw/channel-plugin-whatsapp": "0.2.14",
33
+ "@nextclaw/channel-runtime": "0.4.0",
34
+ "@nextclaw/core": "0.11.0",
32
35
  "@nextclaw/ncp": "0.3.2",
33
- "@nextclaw/ncp-toolkit": "0.4.2",
34
- "@nextclaw/channel-plugin-wecom": "0.2.13",
35
- "@nextclaw/channel-plugin-weixin": "0.1.7",
36
- "@nextclaw/channel-plugin-whatsapp": "0.2.13"
36
+ "@nextclaw/ncp-toolkit": "0.4.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^20.17.6",