@keychat-io/keychat-openclaw 0.1.15 โ†’ 0.1.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keychat-io/keychat-openclaw",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Keychat โ€” E2E encrypted chat + Lightning wallet for OpenClaw agents",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -10,6 +10,13 @@ BINARY="$INSTALL_DIR/bridge/target/release/keychat-openclaw"
10
10
  echo "๐Ÿ”‘ Installing Keychat"
11
11
  echo ""
12
12
 
13
+ # โ”€โ”€ Clean up conflicting installs โ”€โ”€
14
+ NPM_DIR="${OPENCLAW_EXTENSIONS:-$HOME/.openclaw/extensions}/keychat-openclaw"
15
+ if [ -d "$NPM_DIR" ] && [ "$INSTALL_DIR" != "$NPM_DIR" ]; then
16
+ echo "๐Ÿงน Removing npm-installed copy ($NPM_DIR)..."
17
+ rm -rf "$NPM_DIR"
18
+ fi
19
+
13
20
  # โ”€โ”€ Check OpenClaw โ”€โ”€
14
21
  if ! command -v openclaw &>/dev/null; then
15
22
  echo "โŒ OpenClaw not found. Install it first: https://docs.openclaw.ai"
@@ -4,7 +4,7 @@
4
4
  * Runs automatically after `npm install` / `openclaw plugins install`.
5
5
  * Uses native fetch/https โ€” no child_process dependency.
6
6
  */
7
- import { existsSync, mkdirSync, chmodSync, writeFileSync, readFileSync } from "node:fs";
7
+ import { existsSync, mkdirSync, chmodSync, writeFileSync, readFileSync, rmSync } from "node:fs";
8
8
  import { join, dirname } from "node:path";
9
9
  import { fileURLToPath } from "node:url";
10
10
  import https from "node:https";
@@ -25,6 +25,15 @@ const currentVersion = existsSync(versionFile)
25
25
  ? readFileSync(versionFile, "utf-8").trim()
26
26
  : null;
27
27
 
28
+ // Clean up conflicting script-installed copy (extensions/keychat vs extensions/keychat-openclaw)
29
+ const pluginDir = join(__dirname, "..");
30
+ const pluginDirName = pluginDir.split("/").pop();
31
+ const scriptInstallDir = join(pluginDir, "..", "keychat");
32
+ if (pluginDirName === "keychat-openclaw" && existsSync(scriptInstallDir)) {
33
+ console.log(`[keychat] Removing conflicting script-installed copy...`);
34
+ try { rmSync(scriptInstallDir, { recursive: true, force: true }); } catch {}
35
+ }
36
+
28
37
  if (existsSync(BINARY_PATH) && currentVersion === pkgVersion) {
29
38
  console.log(`[keychat] Binary already exists (v${pkgVersion}), skipping download`);
30
39
  process.exit(0);