@syengup/friday-channel-next 0.0.23 → 0.0.25
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 +26 -0
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -126,6 +126,15 @@ if (!existsSync(OPENCLAW_CONFIG)) {
|
|
|
126
126
|
|
|
127
127
|
if (existsSync(PLUGIN_DIR)) {
|
|
128
128
|
log(`Plugin directory found: ${PLUGIN_DIR}`);
|
|
129
|
+
if (existsSync(join(PLUGIN_DIR, ".git"))) {
|
|
130
|
+
try {
|
|
131
|
+
log("Pulling latest changes...");
|
|
132
|
+
execSync("git fetch origin && git checkout -f origin/main", { cwd: PLUGIN_DIR, stdio: "pipe" });
|
|
133
|
+
log("Updated to latest version.");
|
|
134
|
+
} catch {
|
|
135
|
+
warn("Could not update from git — continuing with existing source.");
|
|
136
|
+
}
|
|
137
|
+
}
|
|
129
138
|
} else if (isRunningFromNpmPackage()) {
|
|
130
139
|
log(`Copying plugin from npm package to ${PLUGIN_DIR} ...`);
|
|
131
140
|
cpSync(__dirname, PLUGIN_DIR, {
|
|
@@ -230,6 +239,23 @@ if (config.gateway.bind !== "lan") {
|
|
|
230
239
|
config.gateway.bind = "lan";
|
|
231
240
|
console.log(" + Set gateway.bind to lan");
|
|
232
241
|
}
|
|
242
|
+
if (!config.gateway.nodes) config.gateway.nodes = {};
|
|
243
|
+
if (!Array.isArray(config.gateway.nodes.allowCommands)) config.gateway.nodes.allowCommands = [];
|
|
244
|
+
for (const cmd of [
|
|
245
|
+
"canvas.navigate",
|
|
246
|
+
"canvas.present",
|
|
247
|
+
"canvas.hide",
|
|
248
|
+
"canvas.eval",
|
|
249
|
+
"canvas.snapshot",
|
|
250
|
+
"canvas.a2ui.push",
|
|
251
|
+
"canvas.a2ui.reset",
|
|
252
|
+
"canvas.a2ui.pushJSONL",
|
|
253
|
+
]) {
|
|
254
|
+
if (!config.gateway.nodes.allowCommands.includes(cmd)) {
|
|
255
|
+
config.gateway.nodes.allowCommands.push(cmd);
|
|
256
|
+
console.log(" + Added " + cmd + " to gateway.nodes.allowCommands");
|
|
257
|
+
}
|
|
258
|
+
}
|
|
233
259
|
|
|
234
260
|
// Ensure canvas and nodes are in the main agent's tools.alsoAllow (not deny)
|
|
235
261
|
if (!config.agents) config.agents = {};
|