@geravant/sinain 1.0.2 → 1.0.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 +12 -10
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -38,7 +38,7 @@ const reqFile = path.join(memoryDst, "requirements.txt");
38
38
  if (fs.existsSync(reqFile)) {
39
39
  console.log(" Installing Python dependencies...");
40
40
  try {
41
- execSync(`pip3 install -r "${reqFile}" --quiet`, { stdio: "inherit" });
41
+ execSync(`pip3 install -r "${reqFile}" --quiet --break-system-packages`, { stdio: "inherit" });
42
42
  console.log(" ✓ Python dependencies installed");
43
43
  } catch {
44
44
  console.warn(" ⚠ pip3 unavailable — Python eval features disabled");
@@ -52,7 +52,7 @@ if (fs.existsSync(OC_JSON)) {
52
52
  }
53
53
  cfg.plugins ??= {};
54
54
  cfg.plugins.entries ??= {};
55
- cfg.plugins.entries["sinain"] = {
55
+ cfg.plugins.entries["sinain-hud"] = {
56
56
  enabled: true,
57
57
  config: {
58
58
  heartbeatPath: path.join(SOURCES_DIR, "HEARTBEAT.md"),
@@ -60,13 +60,15 @@ cfg.plugins.entries["sinain"] = {
60
60
  sessionKey: "agent:main:sinain"
61
61
  }
62
62
  };
63
+ // Remove stale "sinain" entry if present from a previous install
64
+ delete cfg.plugins.entries["sinain"];
63
65
  cfg.agents ??= {};
64
66
  cfg.agents.defaults ??= {};
65
67
  cfg.agents.defaults.sandbox ??= {};
66
68
  cfg.agents.defaults.sandbox.sessionToolsVisibility = "all";
67
- cfg.compaction = { mode: "safeguard", maxHistoryShare: 0.2, reserveTokensFloor: 40000 };
68
69
  cfg.gateway ??= {};
69
- cfg.gateway.bind = "lan"; // allow remote Mac to connect
70
+ cfg.gateway.mode = "local"; // required for gateway to start
71
+ cfg.gateway.bind = "lan"; // allow remote Mac to connect
70
72
 
71
73
  fs.mkdirSync(path.dirname(OC_JSON), { recursive: true });
72
74
  fs.writeFileSync(OC_JSON, JSON.stringify(cfg, null, 2));
@@ -91,16 +93,16 @@ if (backupUrl) {
91
93
  }
92
94
  }
93
95
 
94
- // 7. Reload gateway
96
+ // 7. Start / restart gateway
95
97
  try {
96
- execSync("openclaw reload", { stdio: "pipe" });
97
- console.log(" ✓ Gateway reloaded");
98
+ execSync("openclaw gateway restart --background", { stdio: "pipe" });
99
+ console.log(" ✓ Gateway restarted");
98
100
  } catch {
99
101
  try {
100
- execSync("openclaw stop && sleep 1 && openclaw start --background", { stdio: "pipe" });
101
- console.log(" ✓ Gateway restarted");
102
+ execSync("openclaw gateway start --background", { stdio: "pipe" });
103
+ console.log(" ✓ Gateway started");
102
104
  } catch {
103
- console.warn(" ⚠ Could not reload gateway — restart manually");
105
+ console.warn(" ⚠ Could not start gateway — run: openclaw gateway start");
104
106
  }
105
107
  }
106
108
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geravant/sinain",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "sinain OpenClaw plugin — AI overlay for macOS",
5
5
  "type": "module",
6
6
  "bin": {