@geravant/sinain 1.0.4 → 1.0.6

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 +7 -3
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -5,7 +5,7 @@ import os from "os";
5
5
  import { execSync } from "child_process";
6
6
 
7
7
  const HOME = os.homedir();
8
- const PLUGIN_DIR = path.join(HOME, ".openclaw/extensions/sinain");
8
+ const PLUGIN_DIR = path.join(HOME, ".openclaw/extensions/sinain-hud");
9
9
  const SOURCES_DIR = path.join(HOME, ".openclaw/sinain-sources");
10
10
  const OC_JSON = path.join(HOME, ".openclaw/openclaw.json");
11
11
  const WORKSPACE = path.join(HOME, ".openclaw/workspace");
@@ -17,7 +17,9 @@ const HEARTBEAT = path.join(PKG_DIR, "HEARTBEAT.md");
17
17
 
18
18
  console.log("\nInstalling sinain plugin...");
19
19
 
20
- // 1. Copy plugin files
20
+ // 1. Copy plugin files (remove stale extensions/sinain dir if present from old installs)
21
+ const stalePluginDir = path.join(HOME, ".openclaw/extensions/sinain");
22
+ if (fs.existsSync(stalePluginDir)) fs.rmSync(stalePluginDir, { recursive: true, force: true });
21
23
  fs.mkdirSync(PLUGIN_DIR, { recursive: true });
22
24
  fs.copyFileSync(path.join(PKG_DIR, "index.ts"), path.join(PLUGIN_DIR, "index.ts"));
23
25
  fs.copyFileSync(path.join(PKG_DIR, "openclaw.plugin.json"), path.join(PLUGIN_DIR, "openclaw.plugin.json"));
@@ -62,6 +64,8 @@ cfg.plugins.entries["sinain-hud"] = {
62
64
  };
63
65
  // Remove stale "sinain" entry if present from a previous install
64
66
  delete cfg.plugins.entries["sinain"];
67
+ cfg.plugins.allow ??= [];
68
+ if (!cfg.plugins.allow.includes("sinain-hud")) cfg.plugins.allow.push("sinain-hud");
65
69
  cfg.agents ??= {};
66
70
  cfg.agents.defaults ??= {};
67
71
  cfg.agents.defaults.sandbox ??= {};
@@ -102,7 +106,7 @@ try {
102
106
  execSync("openclaw gateway start --background", { stdio: "pipe" });
103
107
  console.log(" ✓ Gateway started");
104
108
  } catch {
105
- console.warn(" ⚠ Could not start gateway — run: openclaw gateway start");
109
+ console.warn(" ⚠ Could not start gateway — run: openclaw gateway");
106
110
  }
107
111
  }
108
112
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geravant/sinain",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "sinain OpenClaw plugin — AI overlay for macOS",
5
5
  "type": "module",
6
6
  "bin": {