n8n-nodes-smart-browser-automation 1.1.8 → 1.1.9

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.
@@ -202,6 +202,19 @@ class SmartBrowserAutomation {
202
202
  if (enabledTools.length > 0) {
203
203
  tools = tools.filter(tool => enabledTools.includes(tool.name));
204
204
  }
205
+ // Sort tools to prioritize core actions
206
+ const priorityTools = ['browser_navigate', 'browser_click', 'browser_type', 'browser_press_key', 'browser_scroll_to', 'browser_get_text'];
207
+ tools.sort((a, b) => {
208
+ const indexA = priorityTools.indexOf(a.name);
209
+ const indexB = priorityTools.indexOf(b.name);
210
+ if (indexA !== -1 && indexB !== -1)
211
+ return indexA - indexB;
212
+ if (indexA !== -1)
213
+ return -1;
214
+ if (indexB !== -1)
215
+ return 1;
216
+ return a.name.localeCompare(b.name);
217
+ });
205
218
  // Add a custom tool for the AI to connect to a specific CDP URL
206
219
  const connectTool = {
207
220
  name: 'browser_connect_cdp',
@@ -312,7 +325,6 @@ class SmartBrowserAutomation {
312
325
  browserConnection: connectionStatus,
313
326
  browserResponse: connectionResult,
314
327
  totalToolsAvailable: tools.length,
315
- availableTools: tools.map(t => t.name),
316
328
  },
317
329
  pairedItem: i,
318
330
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-smart-browser-automation",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "n8n node for AI-driven browser automation using MCP",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",