n8n-nodes-smart-browser-automation 1.6.0 → 1.6.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription
|
|
1
|
+
import { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
2
|
export declare class SmartBrowserAutomation implements INodeType {
|
|
3
3
|
description: INodeTypeDescription;
|
|
4
4
|
methods: {
|
|
@@ -6,6 +6,5 @@ export declare class SmartBrowserAutomation implements INodeType {
|
|
|
6
6
|
getAvailableTools(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
supplyData(this: ISupplyDataFunctions, _itemIndex: number): Promise<any>;
|
|
10
9
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
11
10
|
}
|
|
@@ -77,33 +77,6 @@ class SmartBrowserAutomation {
|
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
};
|
|
80
|
-
async supplyData(_itemIndex) {
|
|
81
|
-
const credentials = await this.getCredentials('smartBrowserAutomationApi');
|
|
82
|
-
const sessionManager = BrowserSessionManager_1.default.getInstance();
|
|
83
|
-
// Initialize session
|
|
84
|
-
const cdpEndpoint = credentials.cdpEndpoint || '';
|
|
85
|
-
await sessionManager.initialize(credentials.mcpEndpoint, !!cdpEndpoint, cdpEndpoint);
|
|
86
|
-
// Get all available tools from MCP server
|
|
87
|
-
const mcpTools = await sessionManager.listTools();
|
|
88
|
-
// Convert MCP tools to n8n tool format
|
|
89
|
-
const n8nTools = mcpTools.map((tool) => ({
|
|
90
|
-
name: tool.name,
|
|
91
|
-
description: tool.description || `Execute the ${tool.name} tool`,
|
|
92
|
-
schema: tool.inputSchema || { type: 'object', properties: {}, additionalProperties: false },
|
|
93
|
-
func: async (params) => {
|
|
94
|
-
try {
|
|
95
|
-
const result = await sessionManager.callTool(tool.name, params);
|
|
96
|
-
return JSON.stringify(result);
|
|
97
|
-
}
|
|
98
|
-
catch (error) {
|
|
99
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Tool execution failed: ${error.message}`);
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
}));
|
|
103
|
-
return {
|
|
104
|
-
response: n8nTools,
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
80
|
async execute() {
|
|
108
81
|
const items = this.getInputData();
|
|
109
82
|
const returnData = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-smart-browser-automation",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "n8n node for AI-driven browser automation using MCP",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|
|
@@ -57,4 +57,4 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@modelcontextprotocol/sdk": "^1.17.0"
|
|
59
59
|
}
|
|
60
|
-
}
|
|
60
|
+
}
|