@geravant/sinain 1.0.6 → 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 +8 -2
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -73,6 +73,12 @@ cfg.agents.defaults.sandbox.sessionToolsVisibility = "all";
|
|
|
73
73
|
cfg.gateway ??= {};
|
|
74
74
|
cfg.gateway.mode = "local"; // required for gateway to start
|
|
75
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;
|
|
76
82
|
|
|
77
83
|
fs.mkdirSync(path.dirname(OC_JSON), { recursive: true });
|
|
78
84
|
fs.writeFileSync(OC_JSON, JSON.stringify(cfg, null, 2));
|
|
@@ -112,8 +118,8 @@ try {
|
|
|
112
118
|
|
|
113
119
|
console.log("\n✓ sinain installed successfully.");
|
|
114
120
|
console.log(" Plugin config: ~/.openclaw/openclaw.json");
|
|
115
|
-
console.log(
|
|
116
|
-
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");
|
|
117
123
|
|
|
118
124
|
// ── Helpers ──────────────────────────────────────────────────────────────────
|
|
119
125
|
|