@geravant/sinain 1.0.5 → 1.0.7

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 -3
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -64,6 +64,8 @@ cfg.plugins.entries["sinain-hud"] = {
64
64
  };
65
65
  // Remove stale "sinain" entry if present from a previous install
66
66
  delete cfg.plugins.entries["sinain"];
67
+ cfg.plugins.allow ??= [];
68
+ if (!cfg.plugins.allow.includes("sinain-hud")) cfg.plugins.allow.push("sinain-hud");
67
69
  cfg.agents ??= {};
68
70
  cfg.agents.defaults ??= {};
69
71
  cfg.agents.defaults.sandbox ??= {};
@@ -71,6 +73,12 @@ cfg.agents.defaults.sandbox.sessionToolsVisibility = "all";
71
73
  cfg.gateway ??= {};
72
74
  cfg.gateway.mode = "local"; // required for gateway to start
73
75
  cfg.gateway.bind = "lan"; // allow remote Mac to connect
76
+ cfg.gateway.auth ??= {};
77
+ cfg.gateway.auth.mode ??= "token";
78
+ if (!cfg.gateway.auth.token) {
79
+ cfg.gateway.auth.token = require("crypto").randomBytes(24).toString("hex");
80
+ }
81
+ const authToken = cfg.gateway.auth.token;
74
82
 
75
83
  fs.mkdirSync(path.dirname(OC_JSON), { recursive: true });
76
84
  fs.writeFileSync(OC_JSON, JSON.stringify(cfg, null, 2));
@@ -104,14 +112,14 @@ try {
104
112
  execSync("openclaw gateway start --background", { stdio: "pipe" });
105
113
  console.log(" ✓ Gateway started");
106
114
  } catch {
107
- console.warn(" ⚠ Could not start gateway — run: openclaw gateway start");
115
+ console.warn(" ⚠ Could not start gateway — run: openclaw gateway");
108
116
  }
109
117
  }
110
118
 
111
119
  console.log("\n✓ sinain installed successfully.");
112
120
  console.log(" Plugin config: ~/.openclaw/openclaw.json");
113
- console.log(" Auth token: check your Brev dashboard → 'Gateway Token'");
114
- console.log(" Then run ./setup-nemoclaw.sh on your Mac.\n");
121
+ console.log(` Auth token: ${authToken}`);
122
+ console.log(" Next: run 'openclaw gateway' in a new terminal, then run ./setup-nemoclaw.sh on your Mac.\n");
115
123
 
116
124
  // ── Helpers ──────────────────────────────────────────────────────────────────
117
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geravant/sinain",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "sinain OpenClaw plugin — AI overlay for macOS",
5
5
  "type": "module",
6
6
  "bin": {