@couleetech/n8n-nodes-enlightenedmsp 0.0.1 → 1.0.0

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 (33) hide show
  1. package/dist/credentials/EnlightenedMspGraphql.credentials.d.ts +8 -0
  2. package/dist/credentials/EnlightenedMspGraphql.credentials.js +40 -0
  3. package/dist/nodes/EnlightenedMsp/GraphqlBase.d.ts +13 -0
  4. package/dist/nodes/EnlightenedMsp/GraphqlBase.js +50 -0
  5. package/dist/nodes/EnlightenedMsp/{McpClient.node.d.ts → UpdateTicket.node.d.ts} +1 -1
  6. package/dist/nodes/EnlightenedMsp/UpdateTicket.node.js +135 -0
  7. package/dist/nodes/EnlightenedMsp/enlightenedmsp.svg +490 -0
  8. package/dist/nodes/EnlightenedMsp/index.d.ts +2 -1
  9. package/dist/nodes/EnlightenedMsp/index.js +3 -1
  10. package/package.json +5 -3
  11. package/dist/credentials/BraveSearchApi.credentials.d.ts +0 -9
  12. package/dist/credentials/BraveSearchApi.credentials.js +0 -47
  13. package/dist/credentials/BraveSearchApi.credentials.js.map +0 -1
  14. package/dist/credentials/McpClientApi.credentials.d.ts +0 -7
  15. package/dist/credentials/McpClientApi.credentials.js +0 -29
  16. package/dist/nodes/BraveSearch/BraveSearch.node.d.ts +0 -5
  17. package/dist/nodes/BraveSearch/BraveSearch.node.js +0 -213
  18. package/dist/nodes/BraveSearch/BraveSearch.node.js.map +0 -1
  19. package/dist/nodes/BraveSearch/brave-logo-sans-text.svg +0 -1
  20. package/dist/nodes/BraveSearch/types.d.ts +0 -21
  21. package/dist/nodes/BraveSearch/types.js +0 -2
  22. package/dist/nodes/BraveSearch/types.js.map +0 -1
  23. package/dist/nodes/BraveSearchTool/BraveSearchTool.node.d.ts +0 -7
  24. package/dist/nodes/BraveSearchTool/BraveSearchTool.node.js +0 -208
  25. package/dist/nodes/BraveSearchTool/brave-logo-sans-text.svg +0 -1
  26. package/dist/nodes/EnlightenedMsp/McpClient.node.js +0 -95
  27. package/dist/nodes/EnlightenedMsp/mcpClient.svg +0 -7
  28. package/dist/nodes/McpClient/McpClient.node.d.ts +0 -5
  29. package/dist/nodes/McpClient/McpClient.node.js +0 -95
  30. package/dist/nodes/McpClient/mcpClient.svg +0 -7
  31. package/dist/nodes/NpmSearch/NpmSearch.node.d.ts +0 -5
  32. package/dist/nodes/NpmSearch/NpmSearch.node.js +0 -94
  33. package/dist/nodes/NpmSearch/npm.svg +0 -5
@@ -1,95 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.McpClient = void 0;
4
- const n8n_workflow_1 = require("n8n-workflow");
5
- const child_process_1 = require("child_process");
6
- class McpClient {
7
- constructor() {
8
- this.description = {
9
- displayName: 'MCP Client',
10
- name: 'mcpClient',
11
- icon: 'file:mcpClient.svg',
12
- group: ['transform'],
13
- version: 1,
14
- description: 'Provide Model Context Protocol (MCP) tools to AI nodes',
15
- defaults: {
16
- name: 'MCP Client',
17
- },
18
- inputs: ['main'],
19
- outputs: ["ai_tool"],
20
- credentials: [
21
- {
22
- name: 'mcpClientApi',
23
- required: true,
24
- },
25
- ],
26
- properties: [],
27
- };
28
- }
29
- async execute() {
30
- var _a;
31
- const credentials = await this.getCredentials('mcpClientApi');
32
- const command = credentials.command;
33
- const args = credentials.args;
34
- const executeMcpCommand = async (input) => {
35
- return new Promise((resolve, reject) => {
36
- const process = (0, child_process_1.spawn)(command, args);
37
- let stdout = '';
38
- let stderr = '';
39
- process.stdin.write(JSON.stringify(input) + '\n');
40
- process.stdin.end();
41
- process.stdout.on('data', (data) => {
42
- stdout += data.toString();
43
- });
44
- process.stderr.on('data', (data) => {
45
- stderr += data.toString();
46
- });
47
- process.on('close', (code) => {
48
- if (code !== 0) {
49
- reject(new Error(`Process exited with code ${code}: ${stderr}`));
50
- return;
51
- }
52
- try {
53
- const response = JSON.parse(stdout);
54
- resolve(response);
55
- }
56
- catch (error) {
57
- reject(new Error(`Failed to parse MCP response: ${error.message}`));
58
- }
59
- });
60
- process.on('error', (error) => {
61
- reject(error);
62
- });
63
- });
64
- };
65
- try {
66
- const toolsResponse = await executeMcpCommand({
67
- method: 'tools/list',
68
- params: {},
69
- });
70
- const tools = ((_a = toolsResponse.result) === null || _a === void 0 ? void 0 : _a.tools) || [];
71
- const aiTools = tools.map((tool) => ({
72
- name: tool.name,
73
- description: tool.description,
74
- execute: async (params) => {
75
- const response = await executeMcpCommand({
76
- method: 'tools/call',
77
- params: {
78
- name: tool.name,
79
- arguments: params,
80
- },
81
- });
82
- if (response.error) {
83
- throw new Error(`Tool execution failed: ${response.error.message}`);
84
- }
85
- return response.result;
86
- },
87
- }));
88
- return [[{ json: { tools: aiTools } }]];
89
- }
90
- catch (error) {
91
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), error);
92
- }
93
- }
94
- }
95
- exports.McpClient = McpClient;
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
3
- <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
4
- <circle fill="#6772E5" cx="16" cy="16" r="16"/>
5
- <path d="M10,8 L22,8 C23.1045695,8 24,8.8954305 24,10 L24,22 C24,23.1045695 23.1045695,24 22,24 L10,24 C8.8954305,24 8,23.1045695 8,22 L8,10 C8,8.8954305 8.8954305,8 10,8 Z M11,12 L21,12 L21,14 L11,14 L11,12 Z M11,16 L21,16 L21,18 L11,18 L11,16 Z M11,20 L17,20 L17,22 L11,22 L11,20 Z" fill="#FFFFFF"/>
6
- </g>
7
- </svg>
@@ -1,5 +0,0 @@
1
- import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
- export declare class NpmSearch implements INodeType {
3
- description: INodeTypeDescription;
4
- execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
- }
@@ -1,94 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.NpmSearch = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
- class NpmSearch {
9
- constructor() {
10
- this.description = {
11
- displayName: 'NPM Search',
12
- name: 'npmSearch',
13
- icon: 'file:npm.svg',
14
- group: ['transform'],
15
- version: 1,
16
- description: 'Search for NPM packages using AI-powered relevance scoring',
17
- defaults: {
18
- name: 'NPM Search',
19
- },
20
- codex: {
21
- categories: ['AI'],
22
- subcategories: {
23
- 'AI': ['Tools']
24
- },
25
- resources: {
26
- primaryDocumentation: [
27
- {
28
- url: 'https://github.com/yourusername/n8n-nodes-npm-tools',
29
- },
30
- ],
31
- },
32
- },
33
- inputs: [],
34
- outputs: ["ai_tool"],
35
- properties: [],
36
- };
37
- }
38
- async execute() {
39
- const npmSearchTool = {
40
- name: 'npm_search',
41
- description: 'Search for NPM packages. Use this when you need to find Node.js packages, their versions, descriptions, and relevance scores.',
42
- schema: {
43
- type: 'object',
44
- properties: {
45
- searchQuery: {
46
- type: 'string',
47
- description: 'The search term to look for in NPM packages',
48
- },
49
- size: {
50
- type: 'number',
51
- description: 'Number of results to return (default: 20)',
52
- optional: true,
53
- },
54
- from: {
55
- type: 'number',
56
- description: 'Offset for pagination (default: 0)',
57
- optional: true,
58
- },
59
- },
60
- required: ['searchQuery'],
61
- },
62
- async function({ searchQuery, size = 20, from = 0 }) {
63
- try {
64
- const response = await axios_1.default.get(`https://registry.npmjs.org/-/v1/search`, {
65
- params: {
66
- text: searchQuery,
67
- size,
68
- from,
69
- },
70
- });
71
- const packages = response.data.objects.map((pkg) => ({
72
- name: pkg.package.name,
73
- version: pkg.package.version,
74
- description: pkg.package.description,
75
- keywords: pkg.package.keywords,
76
- author: pkg.package.author,
77
- publisher: pkg.package.publisher,
78
- maintainers: pkg.package.maintainers,
79
- links: pkg.package.links,
80
- score: pkg.score,
81
- searchScore: pkg.searchScore,
82
- aiRelevanceScore: pkg.score.final * pkg.searchScore,
83
- }));
84
- return JSON.stringify(packages);
85
- }
86
- catch (error) {
87
- throw new Error(`Failed to search NPM: ${error.message}`);
88
- }
89
- },
90
- };
91
- return [[{ json: { tools: [npmSearchTool] } }]];
92
- }
93
- }
94
- exports.NpmSearch = NpmSearch;
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="100px" height="100px" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg">
3
- <rect x="0" y="0" width="100" height="100" fill="#CB3837"/>
4
- <path d="M15,85 L15,15 L85,15 L85,85 L50,85 L50,30 L35,30 L35,85 Z" fill="#FFFFFF"/>
5
- </svg>