openclaw-openviking-setup-helper 0.2.16-dev.2 → 0.2.16-dev.4

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 +11 -4
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -57,7 +57,7 @@ const FALLBACK_CURRENT = {
57
57
  id: "openviking",
58
58
  kind: "context-engine",
59
59
  slot: "contextEngine",
60
- required: ["index.ts", "config.ts", "package.json"],
60
+ required: ["index.ts", "config.ts", "package.json", "openclaw.plugin.json"],
61
61
  optional: [
62
62
  "context-engine.ts",
63
63
  "client.ts",
@@ -66,7 +66,6 @@ const FALLBACK_CURRENT = {
66
66
  "text-utils.ts",
67
67
  "tool-call-id.ts",
68
68
  "session-transcript-repair.ts",
69
- "openclaw.plugin.json",
70
69
  "tsconfig.json",
71
70
  "package-lock.json",
72
71
  ".gitignore",
@@ -1308,9 +1307,17 @@ async function downloadPlugin(destDir) {
1308
1307
  async function createPluginStagingDir() {
1309
1308
  const pluginId = resolvedPluginId || "openviking";
1310
1309
  const extensionsDir = join(OPENCLAW_DIR, "extensions");
1311
- const stagingDir = join(extensionsDir, `.${pluginId}.staging-${process.pid}-${Date.now()}`);
1312
1310
  await mkdir(extensionsDir, { recursive: true });
1313
- await rm(stagingDir, { recursive: true, force: true });
1311
+ const stagingPrefix = `.${pluginId}.staging-`;
1312
+ try {
1313
+ const entries = readdirSync(extensionsDir, { withFileTypes: true });
1314
+ for (const entry of entries) {
1315
+ if (entry.isDirectory() && entry.name.startsWith(stagingPrefix)) {
1316
+ await rm(join(extensionsDir, entry.name), { recursive: true, force: true });
1317
+ }
1318
+ }
1319
+ } catch {}
1320
+ const stagingDir = join(extensionsDir, `${stagingPrefix}${process.pid}-${Date.now()}`);
1314
1321
  await mkdir(stagingDir, { recursive: true });
1315
1322
  return stagingDir;
1316
1323
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-openviking-setup-helper",
3
- "version": "0.2.16-dev.2",
3
+ "version": "0.2.16-dev.4",
4
4
  "description": "Setup helper for installing OpenViking memory plugin into OpenClaw",
5
5
  "type": "module",
6
6
  "bin": {