n8n-nodes-github-copilot 3.3.0 → 3.5.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 (37) hide show
  1. package/dist/credentials/GitHubApi.credentials.d.ts +8 -8
  2. package/dist/credentials/GitHubApi.credentials.js +50 -50
  3. package/dist/credentials/GitHubApiManual.credentials.d.ts +7 -7
  4. package/dist/credentials/GitHubApiManual.credentials.js +33 -33
  5. package/dist/nodes/GitHubCopilot/GitHubCopilot.node.d.ts +5 -5
  6. package/dist/nodes/GitHubCopilot/GitHubCopilot.node.js +324 -324
  7. package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.d.ts +5 -5
  8. package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.js +141 -146
  9. package/dist/nodes/GitHubCopilotChatAPI/nodeProperties.d.ts +2 -2
  10. package/dist/nodes/GitHubCopilotChatAPI/nodeProperties.js +172 -202
  11. package/dist/nodes/GitHubCopilotChatAPI/utils/helpers.d.ts +19 -21
  12. package/dist/nodes/GitHubCopilotChatAPI/utils/helpers.js +130 -131
  13. package/dist/nodes/GitHubCopilotChatAPI/utils/imageProcessor.d.ts +8 -8
  14. package/dist/nodes/GitHubCopilotChatAPI/utils/imageProcessor.js +100 -101
  15. package/dist/nodes/GitHubCopilotChatAPI/utils/index.d.ts +3 -3
  16. package/dist/nodes/GitHubCopilotChatAPI/utils/index.js +19 -19
  17. package/dist/nodes/GitHubCopilotChatAPI/utils/mediaDetection.d.ts +14 -14
  18. package/dist/nodes/GitHubCopilotChatAPI/utils/mediaDetection.js +70 -71
  19. package/dist/nodes/GitHubCopilotChatAPI/utils/modelCapabilities.d.ts +5 -5
  20. package/dist/nodes/GitHubCopilotChatAPI/utils/modelCapabilities.js +113 -113
  21. package/dist/nodes/GitHubCopilotChatAPI/utils/types.d.ts +57 -57
  22. package/dist/nodes/GitHubCopilotChatAPI/utils/types.js +2 -2
  23. package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.d.ts +5 -0
  24. package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.js +140 -0
  25. package/dist/nodes/GitHubCopilotChatModel/copilot.svg +34 -0
  26. package/dist/shared/models/GitHubCopilotModels.d.ts +43 -0
  27. package/dist/shared/models/GitHubCopilotModels.js +218 -0
  28. package/package.json +7 -6
  29. package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.backup.d.ts +0 -5
  30. package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.backup.js +0 -651
  31. package/dist/nodes/GitHubCopilotChatAPI/utils/audioProcessor.d.ts +0 -11
  32. package/dist/nodes/GitHubCopilotChatAPI/utils/audioProcessor.js +0 -86
  33. package/dist/nodes/N8nAiAgent/N8nAiAgent.node.d.ts +0 -5
  34. package/dist/nodes/N8nAiAgent/N8nAiAgent.node.js +0 -214
  35. package/dist/nodes/N8nAiAgent/n8n-ai.svg +0 -35
  36. package/dist/nodes/N8nAiAgent/nodeProperties.d.ts +0 -2
  37. package/dist/nodes/N8nAiAgent/nodeProperties.js +0 -432
@@ -0,0 +1,34 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
2
+ <defs>
3
+ <linearGradient id="copilotGradient" x1="0%" y1="0%" x2="100%" y2="100%">
4
+ <stop offset="0%" style="stop-color:#1f6feb;stop-opacity:1" />
5
+ <stop offset="100%" style="stop-color:#0969da;stop-opacity:1" />
6
+ </linearGradient>
7
+ </defs>
8
+
9
+ <!-- GitHub Copilot inspired icon -->
10
+ <circle cx="12" cy="12" r="11" fill="url(#copilotGradient)" stroke="#ffffff" stroke-width="1"/>
11
+
12
+ <!-- Copilot face -->
13
+ <ellipse cx="12" cy="10" rx="8" ry="6" fill="#ffffff" opacity="0.9"/>
14
+
15
+ <!-- Eyes -->
16
+ <circle cx="9" cy="9" r="1.5" fill="#1f6feb"/>
17
+ <circle cx="15" cy="9" r="1.5" fill="#1f6feb"/>
18
+
19
+ <!-- Light reflection in eyes -->
20
+ <circle cx="9.5" cy="8.5" r="0.5" fill="#ffffff"/>
21
+ <circle cx="15.5" cy="8.5" r="0.5" fill="#ffffff"/>
22
+
23
+ <!-- Mouth/Interface line -->
24
+ <path d="M8 12 L16 12" stroke="#1f6feb" stroke-width="1.5" stroke-linecap="round"/>
25
+
26
+ <!-- Code brackets -->
27
+ <path d="M6 15 L8 17 L6 19" stroke="#ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
28
+ <path d="M18 15 L16 17 L18 19" stroke="#ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
29
+
30
+ <!-- AI indicator dots -->
31
+ <circle cx="10" cy="17" r="0.5" fill="#ffffff" opacity="0.8"/>
32
+ <circle cx="12" cy="17" r="0.5" fill="#ffffff" opacity="0.6"/>
33
+ <circle cx="14" cy="17" r="0.5" fill="#ffffff" opacity="0.4"/>
34
+ </svg>
@@ -0,0 +1,43 @@
1
+ export interface ModelCapability {
2
+ toolsCalling: boolean;
3
+ vision: boolean;
4
+ multimodal: boolean;
5
+ maxContextTokens: number;
6
+ maxOutputTokens: number;
7
+ streaming: boolean;
8
+ provider: 'OpenAI' | 'Anthropic' | 'Google' | 'Microsoft';
9
+ category: 'chat' | 'reasoning' | 'coding' | 'vision' | 'multimodal';
10
+ }
11
+ export interface GitHubCopilotModel {
12
+ value: string;
13
+ name: string;
14
+ description: string;
15
+ capabilities: ModelCapability;
16
+ recommended: boolean;
17
+ status: 'stable' | 'preview' | 'experimental';
18
+ }
19
+ export declare const GITHUB_COPILOT_MODELS: GitHubCopilotModel[];
20
+ export declare class GitHubCopilotModelsManager {
21
+ static getAllModels(): GitHubCopilotModel[];
22
+ static getToolsCapableModels(): GitHubCopilotModel[];
23
+ static getVisionCapableModels(): GitHubCopilotModel[];
24
+ static getModelsByProvider(provider: 'OpenAI' | 'Anthropic' | 'Google' | 'Microsoft'): GitHubCopilotModel[];
25
+ static getModelsByCategory(category: 'chat' | 'reasoning' | 'coding' | 'vision' | 'multimodal'): GitHubCopilotModel[];
26
+ static getRecommendedModels(): GitHubCopilotModel[];
27
+ static getStableModels(): GitHubCopilotModel[];
28
+ static getModelByValue(value: string): GitHubCopilotModel | undefined;
29
+ static toN8nOptions(models?: GitHubCopilotModel[]): Array<{
30
+ name: string;
31
+ value: string;
32
+ description: string;
33
+ }>;
34
+ static getModelsForUseCase(useCase: 'general' | 'coding' | 'vision' | 'reasoning' | 'tools'): GitHubCopilotModel[];
35
+ }
36
+ export declare const DEFAULT_MODELS: {
37
+ readonly GENERAL: "gpt-4o-mini";
38
+ readonly CODING: "o1-mini";
39
+ readonly VISION: "gpt-4o";
40
+ readonly REASONING: "o1-preview";
41
+ readonly TOOLS: "gpt-4o-mini";
42
+ readonly MULTIMODAL: "gemini-1.5-pro-002";
43
+ };
@@ -0,0 +1,218 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_MODELS = exports.GitHubCopilotModelsManager = exports.GITHUB_COPILOT_MODELS = void 0;
4
+ exports.GITHUB_COPILOT_MODELS = [
5
+ {
6
+ value: 'gpt-4o',
7
+ name: 'GPT-4o',
8
+ description: 'Most capable GPT-4 model with vision, optimized for chat and complex reasoning',
9
+ capabilities: {
10
+ toolsCalling: true,
11
+ vision: true,
12
+ multimodal: true,
13
+ maxContextTokens: 128000,
14
+ maxOutputTokens: 4096,
15
+ streaming: true,
16
+ provider: 'OpenAI',
17
+ category: 'multimodal'
18
+ },
19
+ recommended: true,
20
+ status: 'stable'
21
+ },
22
+ {
23
+ value: 'gpt-4o-mini',
24
+ name: 'GPT-4o Mini',
25
+ description: 'Faster and more cost-effective GPT-4o with excellent performance',
26
+ capabilities: {
27
+ toolsCalling: true,
28
+ vision: true,
29
+ multimodal: true,
30
+ maxContextTokens: 128000,
31
+ maxOutputTokens: 16384,
32
+ streaming: true,
33
+ provider: 'OpenAI',
34
+ category: 'chat'
35
+ },
36
+ recommended: true,
37
+ status: 'stable'
38
+ },
39
+ {
40
+ value: 'gpt-5',
41
+ name: 'GPT-5',
42
+ description: 'Latest generation GPT model with enhanced reasoning and capabilities',
43
+ capabilities: {
44
+ toolsCalling: true,
45
+ vision: true,
46
+ multimodal: true,
47
+ maxContextTokens: 200000,
48
+ maxOutputTokens: 8192,
49
+ streaming: true,
50
+ provider: 'OpenAI',
51
+ category: 'reasoning'
52
+ },
53
+ recommended: true,
54
+ status: 'preview'
55
+ },
56
+ {
57
+ value: 'o1-preview',
58
+ name: 'o1 Preview',
59
+ description: 'Advanced reasoning model optimized for complex problem-solving',
60
+ capabilities: {
61
+ toolsCalling: false,
62
+ vision: false,
63
+ multimodal: false,
64
+ maxContextTokens: 128000,
65
+ maxOutputTokens: 32768,
66
+ streaming: false,
67
+ provider: 'OpenAI',
68
+ category: 'reasoning'
69
+ },
70
+ recommended: false,
71
+ status: 'preview'
72
+ },
73
+ {
74
+ value: 'o1-mini',
75
+ name: 'o1 Mini',
76
+ description: 'Faster reasoning model optimized for coding and STEM tasks',
77
+ capabilities: {
78
+ toolsCalling: false,
79
+ vision: false,
80
+ multimodal: false,
81
+ maxContextTokens: 128000,
82
+ maxOutputTokens: 65536,
83
+ streaming: false,
84
+ provider: 'OpenAI',
85
+ category: 'coding'
86
+ },
87
+ recommended: true,
88
+ status: 'preview'
89
+ },
90
+ {
91
+ value: 'claude-3.5-sonnet',
92
+ name: 'Claude 3.5 Sonnet',
93
+ description: 'Anthropic\'s most capable model with excellent reasoning and creativity',
94
+ capabilities: {
95
+ toolsCalling: true,
96
+ vision: true,
97
+ multimodal: true,
98
+ maxContextTokens: 200000,
99
+ maxOutputTokens: 8192,
100
+ streaming: true,
101
+ provider: 'Anthropic',
102
+ category: 'chat'
103
+ },
104
+ recommended: true,
105
+ status: 'stable'
106
+ },
107
+ {
108
+ value: 'claude-3.5-haiku',
109
+ name: 'Claude 3.5 Haiku',
110
+ description: 'Fast and efficient Claude model for quick tasks',
111
+ capabilities: {
112
+ toolsCalling: true,
113
+ vision: true,
114
+ multimodal: true,
115
+ maxContextTokens: 200000,
116
+ maxOutputTokens: 8192,
117
+ streaming: true,
118
+ provider: 'Anthropic',
119
+ category: 'chat'
120
+ },
121
+ recommended: true,
122
+ status: 'stable'
123
+ },
124
+ {
125
+ value: 'gemini-1.5-pro-002',
126
+ name: 'Gemini 1.5 Pro',
127
+ description: 'Google\'s most advanced model with large context and multimodal capabilities',
128
+ capabilities: {
129
+ toolsCalling: true,
130
+ vision: true,
131
+ multimodal: true,
132
+ maxContextTokens: 2000000,
133
+ maxOutputTokens: 8192,
134
+ streaming: true,
135
+ provider: 'Google',
136
+ category: 'multimodal'
137
+ },
138
+ recommended: true,
139
+ status: 'stable'
140
+ },
141
+ {
142
+ value: 'gemini-1.5-flash-002',
143
+ name: 'Gemini 1.5 Flash',
144
+ description: 'Fast and efficient Gemini model for quick responses',
145
+ capabilities: {
146
+ toolsCalling: true,
147
+ vision: true,
148
+ multimodal: true,
149
+ maxContextTokens: 1000000,
150
+ maxOutputTokens: 8192,
151
+ streaming: true,
152
+ provider: 'Google',
153
+ category: 'chat'
154
+ },
155
+ recommended: true,
156
+ status: 'stable'
157
+ }
158
+ ];
159
+ class GitHubCopilotModelsManager {
160
+ static getAllModels() {
161
+ return exports.GITHUB_COPILOT_MODELS;
162
+ }
163
+ static getToolsCapableModels() {
164
+ return exports.GITHUB_COPILOT_MODELS.filter(model => model.capabilities.toolsCalling);
165
+ }
166
+ static getVisionCapableModels() {
167
+ return exports.GITHUB_COPILOT_MODELS.filter(model => model.capabilities.vision);
168
+ }
169
+ static getModelsByProvider(provider) {
170
+ return exports.GITHUB_COPILOT_MODELS.filter(model => model.capabilities.provider === provider);
171
+ }
172
+ static getModelsByCategory(category) {
173
+ return exports.GITHUB_COPILOT_MODELS.filter(model => model.capabilities.category === category);
174
+ }
175
+ static getRecommendedModels() {
176
+ return exports.GITHUB_COPILOT_MODELS.filter(model => model.recommended);
177
+ }
178
+ static getStableModels() {
179
+ return exports.GITHUB_COPILOT_MODELS.filter(model => model.status === 'stable');
180
+ }
181
+ static getModelByValue(value) {
182
+ return exports.GITHUB_COPILOT_MODELS.find(model => model.value === value);
183
+ }
184
+ static toN8nOptions(models) {
185
+ const modelsToUse = models || exports.GITHUB_COPILOT_MODELS;
186
+ return modelsToUse.map(model => ({
187
+ name: model.name,
188
+ value: model.value,
189
+ description: model.description
190
+ }));
191
+ }
192
+ static getModelsForUseCase(useCase) {
193
+ switch (useCase) {
194
+ case 'general':
195
+ return this.getRecommendedModels();
196
+ case 'coding':
197
+ return exports.GITHUB_COPILOT_MODELS.filter(model => model.capabilities.category === 'coding' ||
198
+ model.capabilities.toolsCalling);
199
+ case 'vision':
200
+ return this.getVisionCapableModels();
201
+ case 'reasoning':
202
+ return exports.GITHUB_COPILOT_MODELS.filter(model => model.capabilities.category === 'reasoning');
203
+ case 'tools':
204
+ return this.getToolsCapableModels();
205
+ default:
206
+ return this.getAllModels();
207
+ }
208
+ }
209
+ }
210
+ exports.GitHubCopilotModelsManager = GitHubCopilotModelsManager;
211
+ exports.DEFAULT_MODELS = {
212
+ GENERAL: 'gpt-4o-mini',
213
+ CODING: 'o1-mini',
214
+ VISION: 'gpt-4o',
215
+ REASONING: 'o1-preview',
216
+ TOOLS: 'gpt-4o-mini',
217
+ MULTIMODAL: 'gemini-1.5-pro-002'
218
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.3.0",
4
- "description": "n8n community node for GitHub Copilot and N8N AI Agent with CLI integration and official Chat API access to GPT-5, Claude, Gemini and more using your existing Copilot credits",
3
+ "version": "3.5.0",
4
+ "description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",
7
7
  "author": {
@@ -33,7 +33,7 @@
33
33
  "nodes": [
34
34
  "dist/nodes/GitHubCopilot/GitHubCopilot.node.js",
35
35
  "dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.js",
36
- "dist/nodes/N8nAiAgent/N8nAiAgent.node.js"
36
+ "dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.js"
37
37
  ]
38
38
  },
39
39
  "keywords": [
@@ -57,15 +57,16 @@
57
57
  },
58
58
  "packageManager": "pnpm@7.1.0",
59
59
  "dependencies": {
60
+ "@langchain/openai": "^0.6.12",
60
61
  "n8n-workflow": "*"
61
62
  },
62
63
  "devDependencies": {
63
64
  "@types/node": "^18.16.16",
64
- "@typescript-eslint/parser": "^5.45.0",
65
65
  "@typescript-eslint/eslint-plugin": "^5.45.0",
66
+ "@typescript-eslint/parser": "^5.45.0",
66
67
  "eslint": "^8.28.0",
67
68
  "gulp": "^4.0.2",
68
69
  "prettier": "^2.7.1",
69
- "typescript": "~4.8.4"
70
+ "typescript": "^5.9.2"
70
71
  }
71
- }
72
+ }
@@ -1,5 +0,0 @@
1
- import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
- export declare class GitHubCopilotChatAPI implements INodeType {
3
- description: INodeTypeDescription;
4
- execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
- }