@syengup/friday-channel-next 0.0.21 → 0.0.22

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 +19 -18
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -219,27 +219,28 @@ if (config.gateway.bind !== "lan") {
219
219
  console.log(" + Set gateway.bind to lan");
220
220
  }
221
221
 
222
- // Ensure canvas and nodes are in agent tools.alsoAllow
222
+ // Ensure canvas and nodes are in the main agent's tools.alsoAllow (not deny)
223
223
  if (!config.agents) config.agents = {};
224
224
  if (!Array.isArray(config.agents.list)) config.agents.list = [];
225
- if (config.agents.list.length === 0) config.agents.list.push({ id: "main" });
226
- for (const agent of config.agents.list) {
227
- if (!agent.tools) agent.tools = {};
228
- if (!Array.isArray(agent.tools.alsoAllow)) agent.tools.alsoAllow = [];
229
- for (const tool of ["canvas", "nodes"]) {
230
- if (!agent.tools.alsoAllow.includes(tool)) {
231
- agent.tools.alsoAllow.push(tool);
232
- console.log(" + Added " + tool + " to agent '" + (agent.id || "?") + "' tools.alsoAllow");
233
- }
225
+ let mainAgent = config.agents.list.find((a) => a.id === "main");
226
+ if (!mainAgent) {
227
+ mainAgent = { id: "main" };
228
+ config.agents.list.push(mainAgent);
229
+ }
230
+ if (!mainAgent.tools) mainAgent.tools = {};
231
+ if (!Array.isArray(mainAgent.tools.alsoAllow)) mainAgent.tools.alsoAllow = [];
232
+ for (const tool of ["canvas", "nodes"]) {
233
+ if (!mainAgent.tools.alsoAllow.includes(tool)) {
234
+ mainAgent.tools.alsoAllow.push(tool);
235
+ console.log(" + Added " + tool + " to agent 'main' tools.alsoAllow");
234
236
  }
235
- // Remove canvas and nodes from deny list if present
236
- if (Array.isArray(agent.tools.deny)) {
237
- for (const tool of ["canvas", "nodes"]) {
238
- const idx = agent.tools.deny.indexOf(tool);
239
- if (idx !== -1) {
240
- agent.tools.deny.splice(idx, 1);
241
- console.log(" - Removed " + tool + " from agent '" + (agent.id || "?") + "' tools.deny");
242
- }
237
+ }
238
+ if (Array.isArray(mainAgent.tools.deny)) {
239
+ for (const tool of ["canvas", "nodes"]) {
240
+ const idx = mainAgent.tools.deny.indexOf(tool);
241
+ if (idx !== -1) {
242
+ mainAgent.tools.deny.splice(idx, 1);
243
+ console.log(" - Removed " + tool + " from agent 'main' tools.deny");
243
244
  }
244
245
  }
245
246
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syengup/friday-channel-next",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "OpenClaw Friday Next Apple channel plugin",
5
5
  "type": "module",
6
6
  "files": [