n8n-nodes-github-copilot-agent-tool 0.1.1
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.
- package/LICENSE +21 -0
- package/README.md +119 -0
- package/dist/credentials/GitHubCopilotApi.credentials.d.ts +10 -0
- package/dist/credentials/GitHubCopilotApi.credentials.js +69 -0
- package/dist/credentials/GitHubCopilotApi.credentials.js.map +1 -0
- package/dist/credentials/gitHubCopilotApi.svg +12 -0
- package/dist/nodes/GitHubCopilotAgentTool/GitHubCopilotAgentTool.node.d.ts +5 -0
- package/dist/nodes/GitHubCopilotAgentTool/GitHubCopilotAgentTool.node.js +196 -0
- package/dist/nodes/GitHubCopilotAgentTool/GitHubCopilotAgentTool.node.js.map +1 -0
- package/dist/nodes/GitHubCopilotAgentTool/GitHubCopilotAgentTool.node.json +16 -0
- package/dist/nodes/GitHubCopilotAgentTool/gitHubCopilotAgentTool.dark.svg +12 -0
- package/dist/nodes/GitHubCopilotAgentTool/gitHubCopilotAgentTool.svg +12 -0
- package/dist/nodes/GitHubCopilotAuthHelper/GitHubCopilotAuthHelper.node.d.ts +5 -0
- package/dist/nodes/GitHubCopilotAuthHelper/GitHubCopilotAuthHelper.node.js +194 -0
- package/dist/nodes/GitHubCopilotAuthHelper/GitHubCopilotAuthHelper.node.js.map +1 -0
- package/dist/nodes/GitHubCopilotAuthHelper/GitHubCopilotAuthHelper.node.json +13 -0
- package/dist/nodes/GitHubCopilotAuthHelper/gitHubCopilotAuthHelper.dark.svg +12 -0
- package/dist/nodes/GitHubCopilotAuthHelper/gitHubCopilotAuthHelper.svg +12 -0
- package/dist/nodes/GitHubCopilotChatApi/GitHubCopilotChatApi.node.d.ts +5 -0
- package/dist/nodes/GitHubCopilotChatApi/GitHubCopilotChatApi.node.js +181 -0
- package/dist/nodes/GitHubCopilotChatApi/GitHubCopilotChatApi.node.js.map +1 -0
- package/dist/nodes/GitHubCopilotChatApi/GitHubCopilotChatApi.node.json +13 -0
- package/dist/nodes/GitHubCopilotChatApi/gitHubCopilotChatApi.dark.svg +12 -0
- package/dist/nodes/GitHubCopilotChatApi/gitHubCopilotChatApi.svg +12 -0
- package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.d.ts +5 -0
- package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.js +188 -0
- package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.js.map +1 -0
- package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.json +16 -0
- package/dist/nodes/GitHubCopilotChatModel/gitHubCopilotChatModel.dark.svg +12 -0
- package/dist/nodes/GitHubCopilotChatModel/gitHubCopilotChatModel.svg +12 -0
- package/dist/nodes/GitHubCopilotCli/GitHubCopilotCli.node.d.ts +5 -0
- package/dist/nodes/GitHubCopilotCli/GitHubCopilotCli.node.js +159 -0
- package/dist/nodes/GitHubCopilotCli/GitHubCopilotCli.node.js.map +1 -0
- package/dist/nodes/GitHubCopilotCli/GitHubCopilotCli.node.json +13 -0
- package/dist/nodes/GitHubCopilotCli/gitHubCopilotCli.dark.svg +12 -0
- package/dist/nodes/GitHubCopilotCli/gitHubCopilotCli.svg +12 -0
- package/dist/nodes/GitHubCopilotEmbeddings/GitHubCopilotEmbeddings.node.d.ts +5 -0
- package/dist/nodes/GitHubCopilotEmbeddings/GitHubCopilotEmbeddings.node.js +133 -0
- package/dist/nodes/GitHubCopilotEmbeddings/GitHubCopilotEmbeddings.node.js.map +1 -0
- package/dist/nodes/GitHubCopilotEmbeddings/GitHubCopilotEmbeddings.node.json +16 -0
- package/dist/nodes/GitHubCopilotEmbeddings/gitHubCopilotEmbeddings.dark.svg +12 -0
- package/dist/nodes/GitHubCopilotEmbeddings/gitHubCopilotEmbeddings.svg +12 -0
- package/dist/nodes/GitHubCopilotOpenAI/GitHubCopilotOpenAI.node.json +13 -0
- package/dist/nodes/GitHubCopilotOpenAI/GitHubCopilotOpenAi.node.d.ts +5 -0
- package/dist/nodes/GitHubCopilotOpenAI/GitHubCopilotOpenAi.node.js +177 -0
- package/dist/nodes/GitHubCopilotOpenAI/GitHubCopilotOpenAi.node.js.map +1 -0
- package/dist/nodes/GitHubCopilotOpenAI/gitHubCopilotOpenAI.dark.svg +12 -0
- package/dist/nodes/GitHubCopilotOpenAI/gitHubCopilotOpenAI.svg +12 -0
- package/dist/nodes/GitHubCopilotTest/GitHubCopilotTest.node.d.ts +5 -0
- package/dist/nodes/GitHubCopilotTest/GitHubCopilotTest.node.js +173 -0
- package/dist/nodes/GitHubCopilotTest/GitHubCopilotTest.node.js.map +1 -0
- package/dist/nodes/GitHubCopilotTest/GitHubCopilotTest.node.json +13 -0
- package/dist/nodes/GitHubCopilotTest/gitHubCopilotTest.dark.svg +12 -0
- package/dist/nodes/GitHubCopilotTest/gitHubCopilotTest.svg +12 -0
- package/dist/nodes/shared/apiClient.d.ts +11 -0
- package/dist/nodes/shared/apiClient.js +98 -0
- package/dist/nodes/shared/apiClient.js.map +1 -0
- package/dist/nodes/shared/types.d.ts +144 -0
- package/dist/nodes/shared/types.js +44 -0
- package/dist/nodes/shared/types.js.map +1 -0
- package/dist/package.json +75 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +75 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 CyberLaboratory
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# n8n-nodes-github-copilot-agent-tool
|
|
2
|
+
|
|
3
|
+
GitHub Copilot nodes for n8n with **AI Agent Tool** support.
|
|
4
|
+
Access GPT-4, Claude, Gemini and more using your existing Copilot subscription.
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/n8n-nodes-github-copilot-agent-tool)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Nodes
|
|
12
|
+
|
|
13
|
+
| Node | Description |
|
|
14
|
+
|---|---|
|
|
15
|
+
| **GitHub Copilot Agent Tool** ⭐ | AI-agent-ready tool with dynamic model selection, structured output, and automatic fallback |
|
|
16
|
+
| GitHub Copilot Chat API | Direct chat completions + model listing |
|
|
17
|
+
| GitHub Copilot Chat Model | Multi-turn chat with full tool/function-calling |
|
|
18
|
+
| GitHub Copilot Embeddings | Text embeddings for semantic search and RAG |
|
|
19
|
+
| GitHub Copilot OpenAI | Full OpenAI-compatible surface with tool support |
|
|
20
|
+
| GitHub Copilot CLI | Shell command suggestions via `gh copilot` CLI |
|
|
21
|
+
| GitHub Copilot Auth Helper | Browser-based OAuth Device Flow authentication |
|
|
22
|
+
| GitHub Copilot Test | Credential verification and diagnostics |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
Via n8n UI: **Settings → Community Nodes → Install** → `n8n-nodes-github-copilot-agent-tool`
|
|
29
|
+
|
|
30
|
+
Or with npm:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install n8n-nodes-github-copilot-agent-tool
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Authentication
|
|
39
|
+
|
|
40
|
+
### Option A — GitHub Copilot CLI (local n8n)
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
gh auth login
|
|
44
|
+
gh auth token # copy this token
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Paste the token into the **GitHub Copilot API** credential in n8n.
|
|
48
|
+
|
|
49
|
+
### Option B — OAuth Device Flow (hosted n8n)
|
|
50
|
+
|
|
51
|
+
1. Add a **GitHub Copilot Auth Helper** node → **Start Device Flow**
|
|
52
|
+
2. Visit the URL shown and enter the user code
|
|
53
|
+
3. Add a second **Auth Helper** node → **Poll for Token**
|
|
54
|
+
4. Use the returned `access_token` in the **GitHub Copilot API** credential
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## GitHub Copilot Agent Tool
|
|
59
|
+
|
|
60
|
+
Drop this node into any AI Agent workflow as a tool.
|
|
61
|
+
|
|
62
|
+
### Key parameters
|
|
63
|
+
|
|
64
|
+
| Parameter | Default | Description |
|
|
65
|
+
|---|---|---|
|
|
66
|
+
| Model | `claude-sonnet-4-5` | AI model — supports expression bindings |
|
|
67
|
+
| Prompt / Query | — | User message |
|
|
68
|
+
| System Prompt | helpful assistant | System instructions |
|
|
69
|
+
| Temperature | `1` | 0 = deterministic, 2 = creative |
|
|
70
|
+
| Max Tokens | `2048` | Response length cap |
|
|
71
|
+
| Agent Mode | `false` | Adds concise/structured instructions to system prompt |
|
|
72
|
+
| Fallback Model | — | Model to use if primary returns 404 |
|
|
73
|
+
| On Error | `return` | `return` structured error object or `throw` |
|
|
74
|
+
|
|
75
|
+
### Dynamic model selection
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
={{ $json.preferred_model || "claude-sonnet-4-5" }}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Structured output
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"success": true,
|
|
86
|
+
"model_used": "claude-sonnet-4-5",
|
|
87
|
+
"response": "Here is the answer...",
|
|
88
|
+
"tokens_used": 342,
|
|
89
|
+
"latency_ms": 1204,
|
|
90
|
+
"metadata": {
|
|
91
|
+
"stop_reason": "stop",
|
|
92
|
+
"finish_details": {},
|
|
93
|
+
"request_id": "chatcmpl-abc123"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Error codes
|
|
99
|
+
|
|
100
|
+
| Code | Trigger |
|
|
101
|
+
|---|---|
|
|
102
|
+
| `INVALID_CREDENTIALS` | 401 / 403 — bad or expired token |
|
|
103
|
+
| `UNSUPPORTED_MODEL` | 404 — model not found |
|
|
104
|
+
| `RATE_LIMITED` | 429 — quota exceeded |
|
|
105
|
+
| `CONTEXT_LENGTH_EXCEEDED` | 400 — prompt too long |
|
|
106
|
+
| `NETWORK_ERROR` | ECONNREFUSED / ETIMEDOUT |
|
|
107
|
+
| `UNKNOWN` | Other errors |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Supported Models
|
|
112
|
+
|
|
113
|
+
`gpt-4` · `gpt-4-turbo` · `gpt-4o` · `gpt-3.5-turbo` · `claude-sonnet-4-5` · `claude-sonnet-4` · `claude-3-opus` · `claude-3-sonnet` · `gemini-1.5-pro` · `gemini-1.5-flash` · `o1-preview` · `o1-mini` · Custom
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## License
|
|
118
|
+
|
|
119
|
+
MIT — see [LICENSE](LICENSE)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class GitHubCopilotApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
icon: "file:gitHubCopilotApi.svg";
|
|
5
|
+
displayName: string;
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GitHubCopilotApi = void 0;
|
|
4
|
+
class GitHubCopilotApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'gitHubCopilotApi';
|
|
7
|
+
this.icon = 'file:gitHubCopilotApi.svg';
|
|
8
|
+
this.displayName = 'GitHub Copilot API';
|
|
9
|
+
this.documentationUrl = 'https://docs.github.com/en/copilot';
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Auth Token',
|
|
13
|
+
name: 'authToken',
|
|
14
|
+
type: 'string',
|
|
15
|
+
typeOptions: { password: true },
|
|
16
|
+
default: '',
|
|
17
|
+
description: 'GitHub Copilot API token. Obtain via the GitHub Copilot CLI or OAuth Device Flow through the Auth Helper node.',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Token Type',
|
|
21
|
+
name: 'tokenType',
|
|
22
|
+
type: 'options',
|
|
23
|
+
options: [
|
|
24
|
+
{
|
|
25
|
+
name: 'Bearer (OAuth)',
|
|
26
|
+
value: 'bearer',
|
|
27
|
+
description: 'OAuth token obtained via device flow',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'GitHub Token',
|
|
31
|
+
value: 'github',
|
|
32
|
+
description: 'Personal access token or GitHub App token',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
default: 'bearer',
|
|
36
|
+
description: 'Type of authentication token being used.',
|
|
37
|
+
typeOptions: { password: true },
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
displayName: 'API Base URL',
|
|
41
|
+
name: 'baseUrl',
|
|
42
|
+
type: 'string',
|
|
43
|
+
default: 'https://api.githubcopilot.com',
|
|
44
|
+
description: 'Base URL for the GitHub Copilot API. Change only if using an enterprise endpoint.',
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
this.authenticate = {
|
|
48
|
+
type: 'generic',
|
|
49
|
+
properties: {
|
|
50
|
+
headers: {
|
|
51
|
+
Authorization: '=Bearer {{$credentials.authToken}}',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
this.test = {
|
|
56
|
+
request: {
|
|
57
|
+
baseURL: '={{$credentials.baseUrl}}',
|
|
58
|
+
url: '/models',
|
|
59
|
+
method: 'GET',
|
|
60
|
+
headers: {
|
|
61
|
+
'Content-Type': 'application/json',
|
|
62
|
+
'Copilot-Integration-Id': 'n8n-agent-tool',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.GitHubCopilotApi = GitHubCopilotApi;
|
|
69
|
+
//# sourceMappingURL=GitHubCopilotApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitHubCopilotApi.credentials.js","sourceRoot":"","sources":["../../credentials/GitHubCopilotApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,gBAAgB;IAA7B;QACC,SAAI,GAAG,kBAAkB,CAAC;QAE1B,SAAI,GAAG,2BAAoC,CAAC;QAE5C,gBAAW,GAAG,oBAAoB,CAAC;QAEnC,qBAAgB,GAAG,oCAAoC,CAAC;QAExD,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;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" cy="18" rx="9" ry="8" fill="#f6f8fa"/>
|
|
4
|
+
<rect x="13" y="15" width="14" height="5.5" rx="2.75" fill="#24292e"/>
|
|
5
|
+
<circle cx="17" cy="17.75" r="1.6" fill="#f6f8fa"/>
|
|
6
|
+
<circle cx="23" cy="17.75" r="1.6" fill="#f6f8fa"/>
|
|
7
|
+
<circle cx="17" cy="17.75" r="0.75" fill="#58a6ff"/>
|
|
8
|
+
<circle cx="23" cy="17.75" r="0.75" fill="#58a6ff"/>
|
|
9
|
+
<rect x="18.5" y="25.5" width="3" height="4" rx="1.5" fill="#f6f8fa"/>
|
|
10
|
+
<circle cx="13" cy="18" r="1.5" fill="#f6f8fa"/>
|
|
11
|
+
<circle cx="27" cy="18" r="1.5" fill="#f6f8fa"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class GitHubCopilotAgentTool implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GitHubCopilotAgentTool = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
async function callWithFallback(executeFunctions, authToken, baseUrl, model, messages, temperature, maxTokens, fallbackModel) {
|
|
6
|
+
try {
|
|
7
|
+
return await (0, apiClient_1.chatCompletion)(executeFunctions, authToken, baseUrl, {
|
|
8
|
+
model,
|
|
9
|
+
messages,
|
|
10
|
+
temperature,
|
|
11
|
+
max_tokens: maxTokens,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
catch (primaryError) {
|
|
15
|
+
const status = primaryError && typeof primaryError === 'object' && 'statusCode' in primaryError
|
|
16
|
+
? primaryError.statusCode
|
|
17
|
+
: 0;
|
|
18
|
+
if ((status === 404 || status === 400) && fallbackModel) {
|
|
19
|
+
return await (0, apiClient_1.chatCompletion)(executeFunctions, authToken, baseUrl, {
|
|
20
|
+
model: fallbackModel,
|
|
21
|
+
messages,
|
|
22
|
+
temperature,
|
|
23
|
+
max_tokens: maxTokens,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
throw primaryError;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const apiClient_1 = require("../shared/apiClient");
|
|
30
|
+
const types_1 = require("../shared/types");
|
|
31
|
+
class GitHubCopilotAgentTool {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.description = {
|
|
34
|
+
displayName: 'GitHub Copilot Agent Tool',
|
|
35
|
+
name: 'gitHubCopilotAgentTool',
|
|
36
|
+
icon: { light: 'file:gitHubCopilotAgentTool.svg', dark: 'file:gitHubCopilotAgentTool.dark.svg' },
|
|
37
|
+
group: ['transform'],
|
|
38
|
+
version: 1,
|
|
39
|
+
subtitle: '={{ $parameter["model"] === "custom" ? $parameter["customModel"] : $parameter["model"] }}',
|
|
40
|
+
description: 'Send a prompt to any GitHub Copilot-supported model and receive a structured response with token usage and latency.',
|
|
41
|
+
defaults: { name: 'GitHub Copilot Agent Tool' },
|
|
42
|
+
usableAsTool: true,
|
|
43
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
44
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
45
|
+
credentials: [{ name: 'gitHubCopilotApi', required: true }],
|
|
46
|
+
properties: [
|
|
47
|
+
{
|
|
48
|
+
displayName: 'Model',
|
|
49
|
+
name: 'model',
|
|
50
|
+
type: 'options',
|
|
51
|
+
options: types_1.SUPPORTED_MODELS.map((m) => ({ name: m.name, value: m.value })),
|
|
52
|
+
default: 'claude-sonnet-4-5',
|
|
53
|
+
description: 'AI model to use. Supports expression bindings for dynamic model selection at runtime.',
|
|
54
|
+
hint: 'Use an expression like <code>={{ $json.model }}</code> to select the model dynamically.',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Custom Model ID',
|
|
58
|
+
name: 'customModel',
|
|
59
|
+
type: 'string',
|
|
60
|
+
default: '',
|
|
61
|
+
description: 'Exact model identifier when "Custom (Specify Below)" is selected above',
|
|
62
|
+
displayOptions: { show: { model: ['custom'] } },
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
displayName: 'Prompt / Query',
|
|
66
|
+
name: 'prompt',
|
|
67
|
+
type: 'string',
|
|
68
|
+
typeOptions: { rows: 5 },
|
|
69
|
+
required: true,
|
|
70
|
+
default: '',
|
|
71
|
+
description: 'The user message to send to the model',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'System Prompt',
|
|
75
|
+
name: 'systemPrompt',
|
|
76
|
+
type: 'string',
|
|
77
|
+
typeOptions: { rows: 4 },
|
|
78
|
+
default: 'You are a helpful AI assistant.',
|
|
79
|
+
description: 'System-level instructions. Supports expressions for dynamic injection.',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
displayName: 'Temperature',
|
|
83
|
+
name: 'temperature',
|
|
84
|
+
type: 'number',
|
|
85
|
+
typeOptions: { minValue: 0, maxValue: 2, numberPrecision: 2 },
|
|
86
|
+
default: 1,
|
|
87
|
+
description: 'Sampling temperature (0 = deterministic, 2 = highly creative)',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
displayName: 'Max Tokens',
|
|
91
|
+
name: 'maxTokens',
|
|
92
|
+
type: 'number',
|
|
93
|
+
typeOptions: { minValue: 1 },
|
|
94
|
+
default: 2048,
|
|
95
|
+
description: 'Maximum number of tokens to generate in the response',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
displayName: 'Agent Mode',
|
|
99
|
+
name: 'agentMode',
|
|
100
|
+
type: 'boolean',
|
|
101
|
+
default: false,
|
|
102
|
+
description: 'Whether to enable agent-specific optimizations: forces concise responses and adds an agent identity to the system prompt',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
displayName: 'Fallback Model',
|
|
106
|
+
name: 'fallbackModel',
|
|
107
|
+
type: 'string',
|
|
108
|
+
default: '',
|
|
109
|
+
description: 'Optional model to try if the primary model returns a 404. Leave empty to disable.',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
displayName: 'On Error',
|
|
113
|
+
name: 'onError',
|
|
114
|
+
type: 'options',
|
|
115
|
+
options: [
|
|
116
|
+
{
|
|
117
|
+
name: 'Return Error Object',
|
|
118
|
+
value: 'return',
|
|
119
|
+
description: 'Return a structured error object and continue the workflow',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'Throw Error',
|
|
123
|
+
value: 'throw',
|
|
124
|
+
description: 'Stop the workflow with an error',
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
default: 'return',
|
|
128
|
+
description: 'How to handle API errors',
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
async execute() {
|
|
134
|
+
var _a, _b, _c, _d, _e;
|
|
135
|
+
const items = this.getInputData();
|
|
136
|
+
const returnData = [];
|
|
137
|
+
for (let i = 0; i < items.length; i++) {
|
|
138
|
+
const start = Date.now();
|
|
139
|
+
let resolvedModel = '';
|
|
140
|
+
try {
|
|
141
|
+
const { authToken, baseUrl } = await (0, apiClient_1.getCredentials)(this, i);
|
|
142
|
+
const modelParam = this.getNodeParameter('model', i);
|
|
143
|
+
const customModel = this.getNodeParameter('customModel', i, '');
|
|
144
|
+
resolvedModel = modelParam === 'custom' ? customModel : modelParam;
|
|
145
|
+
if (!resolvedModel) {
|
|
146
|
+
throw new n8n_workflow_1.ApplicationError('A model must be specified.');
|
|
147
|
+
}
|
|
148
|
+
const prompt = this.getNodeParameter('prompt', i);
|
|
149
|
+
let systemPrompt = this.getNodeParameter('systemPrompt', i);
|
|
150
|
+
const temperature = this.getNodeParameter('temperature', i);
|
|
151
|
+
const maxTokens = this.getNodeParameter('maxTokens', i);
|
|
152
|
+
const agentMode = this.getNodeParameter('agentMode', i);
|
|
153
|
+
const fallbackModel = this.getNodeParameter('fallbackModel', i, '');
|
|
154
|
+
if (agentMode) {
|
|
155
|
+
systemPrompt =
|
|
156
|
+
`You are an AI agent tool. Be concise, structured, and direct. ` +
|
|
157
|
+
`Avoid conversational filler. Use JSON when appropriate.\n\n` +
|
|
158
|
+
systemPrompt;
|
|
159
|
+
}
|
|
160
|
+
const messages = [
|
|
161
|
+
{ role: 'system', content: systemPrompt },
|
|
162
|
+
{ role: 'user', content: prompt },
|
|
163
|
+
];
|
|
164
|
+
const completion = await callWithFallback(this, authToken, baseUrl, resolvedModel, messages, temperature, maxTokens, fallbackModel);
|
|
165
|
+
const choice = completion.choices[0];
|
|
166
|
+
const output = {
|
|
167
|
+
success: true,
|
|
168
|
+
model_used: completion.model,
|
|
169
|
+
response: (_b = (_a = choice === null || choice === void 0 ? void 0 : choice.message) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : '',
|
|
170
|
+
tokens_used: (_d = (_c = completion.usage) === null || _c === void 0 ? void 0 : _c.total_tokens) !== null && _d !== void 0 ? _d : 0,
|
|
171
|
+
latency_ms: Date.now() - start,
|
|
172
|
+
metadata: {
|
|
173
|
+
stop_reason: (_e = choice === null || choice === void 0 ? void 0 : choice.finish_reason) !== null && _e !== void 0 ? _e : null,
|
|
174
|
+
finish_details: {},
|
|
175
|
+
request_id: completion.id,
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
returnData.push({ json: output, pairedItem: { item: i } });
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
const onError = this.getNodeParameter('onError', i, 'return');
|
|
182
|
+
if (onError === 'return' || this.continueOnFail()) {
|
|
183
|
+
returnData.push({
|
|
184
|
+
json: (0, apiClient_1.normalizeError)(error, resolvedModel, Date.now() - start),
|
|
185
|
+
pairedItem: { item: i },
|
|
186
|
+
});
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
throw error;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return [returnData];
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
exports.GitHubCopilotAgentTool = GitHubCopilotAgentTool;
|
|
196
|
+
//# sourceMappingURL=GitHubCopilotAgentTool.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitHubCopilotAgentTool.node.js","sourceRoot":"","sources":["../../../nodes/GitHubCopilotAgentTool/GitHubCopilotAgentTool.node.ts"],"names":[],"mappings":";;;AAMA,+CAAqE;AAMrE,KAAK,UAAU,gBAAgB,CAC9B,gBAAmC,EACnC,SAAiB,EACjB,OAAe,EACf,KAAa,EACb,QAA0B,EAC1B,WAAmB,EACnB,SAAiB,EACjB,aAAqB;IAErB,IAAI,CAAC;QACJ,OAAO,MAAM,IAAA,0BAAc,EAAC,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE;YACjE,KAAK;YACL,QAAQ;YACR,WAAW;YACX,UAAU,EAAE,SAAS;SACrB,CAAC,CAAC;IACJ,CAAC;IAAC,OAAO,YAAY,EAAE,CAAC;QACvB,MAAM,MAAM,GACX,YAAY,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,IAAI,YAAY;YAC/E,CAAC,CAAE,YAAuC,CAAC,UAAU;YACrD,CAAC,CAAC,CAAC,CAAC;QAEN,IAAI,CAAC,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,CAAC,IAAI,aAAa,EAAE,CAAC;YACzD,OAAO,MAAM,IAAA,0BAAc,EAAC,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE;gBACjE,KAAK,EAAE,aAAa;gBACpB,QAAQ;gBACR,WAAW;gBACX,UAAU,EAAE,SAAS;aACrB,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,YAAY,CAAC;IACpB,CAAC;AACF,CAAC;AAED,mDAAqF;A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EAAE,UAAU,CAAC,EAAE;qBACzB;iBACD,CAAC;gBAEF,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5D,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,EAAE,QAAQ,CAAW,CAAC;gBAExE,IAAI,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBACnD,UAAU,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE,IAAA,0BAAc,EAAC,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;wBAC9D,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;qBACvB,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBAED,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CAED;AA3LD,wDA2LC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-github-copilot-agent-tool.gitHubCopilotAgentTool",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["AI", "Developer Tools"],
|
|
6
|
+
"subcategories": {
|
|
7
|
+
"AI": ["AI Agents", "Tools"]
|
|
8
|
+
},
|
|
9
|
+
"resources": {
|
|
10
|
+
"primaryDocumentation": [
|
|
11
|
+
{
|
|
12
|
+
"url": "https://github.com/CyberLaboratory/n8n-github-copilot-ai-tool"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40">
|
|
2
|
+
<circle cx="20" cy="20" r="19" fill="#161b22"/>
|
|
3
|
+
<ellipse cx="20" cy="18" rx="9" ry="8" fill="#c9d1d9"/>
|
|
4
|
+
<rect x="13" y="15" width="14" height="5.5" rx="2.75" fill="#161b22"/>
|
|
5
|
+
<circle cx="17" cy="17.75" r="1.6" fill="#c9d1d9"/>
|
|
6
|
+
<circle cx="23" cy="17.75" r="1.6" fill="#c9d1d9"/>
|
|
7
|
+
<circle cx="17" cy="17.75" r="0.75" fill="#79c0ff"/>
|
|
8
|
+
<circle cx="23" cy="17.75" r="0.75" fill="#79c0ff"/>
|
|
9
|
+
<rect x="18.5" y="25.5" width="3" height="4" rx="1.5" fill="#c9d1d9"/>
|
|
10
|
+
<circle cx="13" cy="18" r="1.5" fill="#c9d1d9"/>
|
|
11
|
+
<circle cx="27" cy="18" r="1.5" fill="#c9d1d9"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40">
|
|
2
|
+
<circle cx="20" cy="20" r="19" fill="#24292e"/>
|
|
3
|
+
<ellipse cx="20" cy="18" rx="9" ry="8" fill="#f6f8fa"/>
|
|
4
|
+
<rect x="13" y="15" width="14" height="5.5" rx="2.75" fill="#24292e"/>
|
|
5
|
+
<circle cx="17" cy="17.75" r="1.6" fill="#f6f8fa"/>
|
|
6
|
+
<circle cx="23" cy="17.75" r="1.6" fill="#f6f8fa"/>
|
|
7
|
+
<circle cx="17" cy="17.75" r="0.75" fill="#58a6ff"/>
|
|
8
|
+
<circle cx="23" cy="17.75" r="0.75" fill="#58a6ff"/>
|
|
9
|
+
<rect x="18.5" y="25.5" width="3" height="4" rx="1.5" fill="#f6f8fa"/>
|
|
10
|
+
<circle cx="13" cy="18" r="1.5" fill="#f6f8fa"/>
|
|
11
|
+
<circle cx="27" cy="18" r="1.5" fill="#f6f8fa"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class GitHubCopilotAuthHelper implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|