@syengup/friday-channel-next 0.0.22 → 0.0.24
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 +29 -0
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -198,6 +198,18 @@ if (!config.plugins.entries["friday-next"]) {
|
|
|
198
198
|
console.log(" + Enabled friday-next in plugins.entries");
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
if (!config.plugins.allow.includes("canvas")) {
|
|
202
|
+
config.plugins.allow.push("canvas");
|
|
203
|
+
console.log(" + Added canvas to plugins.allow");
|
|
204
|
+
}
|
|
205
|
+
if (!config.plugins.entries["canvas"]) {
|
|
206
|
+
config.plugins.entries["canvas"] = { enabled: true };
|
|
207
|
+
console.log(" + Added canvas to plugins.entries (enabled)");
|
|
208
|
+
} else if (!config.plugins.entries["canvas"].enabled) {
|
|
209
|
+
config.plugins.entries["canvas"].enabled = true;
|
|
210
|
+
console.log(" + Enabled canvas in plugins.entries");
|
|
211
|
+
}
|
|
212
|
+
|
|
201
213
|
if (!config.channels) config.channels = {};
|
|
202
214
|
if (!config.channels["friday-next"]) {
|
|
203
215
|
config.channels["friday-next"] = { enabled: true, transport: "http+sse" };
|
|
@@ -218,6 +230,23 @@ if (config.gateway.bind !== "lan") {
|
|
|
218
230
|
config.gateway.bind = "lan";
|
|
219
231
|
console.log(" + Set gateway.bind to lan");
|
|
220
232
|
}
|
|
233
|
+
if (!config.gateway.nodes) config.gateway.nodes = {};
|
|
234
|
+
if (!Array.isArray(config.gateway.nodes.allowCommands)) config.gateway.nodes.allowCommands = [];
|
|
235
|
+
for (const cmd of [
|
|
236
|
+
"canvas.navigate",
|
|
237
|
+
"canvas.present",
|
|
238
|
+
"canvas.hide",
|
|
239
|
+
"canvas.eval",
|
|
240
|
+
"canvas.snapshot",
|
|
241
|
+
"canvas.a2ui.push",
|
|
242
|
+
"canvas.a2ui.reset",
|
|
243
|
+
"canvas.a2ui.pushJSONL",
|
|
244
|
+
]) {
|
|
245
|
+
if (!config.gateway.nodes.allowCommands.includes(cmd)) {
|
|
246
|
+
config.gateway.nodes.allowCommands.push(cmd);
|
|
247
|
+
console.log(" + Added " + cmd + " to gateway.nodes.allowCommands");
|
|
248
|
+
}
|
|
249
|
+
}
|
|
221
250
|
|
|
222
251
|
// Ensure canvas and nodes are in the main agent's tools.alsoAllow (not deny)
|
|
223
252
|
if (!config.agents) config.agents = {};
|