openclaw-openviking-setup-helper 0.3.0-beta.21 → 0.3.0-beta.22

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.
Files changed (2) hide show
  1. package/install.js +12 -12
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -1620,18 +1620,18 @@ async function configureOpenClawPlugin({
1620
1620
  await scrubStaleOpenClawPluginRegistration();
1621
1621
  }
1622
1622
 
1623
- // Enable plugin: try CLI first (default path), fall back to direct file for --workdir
1624
- if (!needWorkdirFlag) {
1625
- try {
1626
- await oc(["plugins", "enable", pluginId]);
1627
- } catch (_e) {
1628
- info(tr("plugins enable via CLI failed, registering directly", "CLI plugins enable 失败,直接注册"));
1629
- const cfg = await readCfg();
1630
- await ensurePluginRegistered(cfg);
1631
- await writeCfg(cfg);
1632
- }
1633
- } else {
1634
- info(tr("Using direct config write for non-default workdir", "非默认目录,使用直接配置写入"));
1623
+ // Always direct-write to register the plugin. We intentionally avoid
1624
+ // `openclaw plugins enable`, because for plugins whose manifest declares
1625
+ // commandAliases / setup / tools (e.g. context-engine plugins), OpenClaw's
1626
+ // enable path also writes a legacy install record under
1627
+ // plugins.installs.<id> = { "npm": "@openclaw/<id>" }
1628
+ // which conflicts with the current OpenClaw config schema (which expects
1629
+ // { "source": "npm" | "archive" | "path" | "clawhub" | "marketplace", ... }).
1630
+ // The mismatch makes `openclaw config get/set` fail validation and even
1631
+ // `openclaw doctor --fix` cannot repair it. Direct-write here only touches
1632
+ // plugins.entries / plugins.allow, which the runtime treats as sufficient
1633
+ // for the plugin to be loaded from ~/.openclaw/extensions/<id>/.
1634
+ {
1635
1635
  const cfg = await readCfg();
1636
1636
  await ensurePluginRegistered(cfg);
1637
1637
  await writeCfg(cfg);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-openviking-setup-helper",
3
- "version": "0.3.0-beta.21",
3
+ "version": "0.3.0-beta.22",
4
4
  "description": "Setup helper for installing OpenViking memory plugin into OpenClaw",
5
5
  "type": "module",
6
6
  "bin": {