@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.
- package/install.js +11 -3
- 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
|
|
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(
|
|
114
|
-
console.log("
|
|
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
|
|