@bestdefense/bd-agent 0.1.2 → 0.1.5
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/README.md +7 -1
- package/dist/cli.js +25 -5
- package/dist/cli.js.map +1 -1
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +463 -66
- package/dist/commands/chat.js.map +1 -1
- package/dist/services/bedrock-client.d.ts +1 -0
- package/dist/services/bedrock-client.d.ts.map +1 -1
- package/dist/services/bedrock-client.js +82 -12
- package/dist/services/bedrock-client.js.map +1 -1
- package/dist/services/conversation-manager.d.ts +9 -0
- package/dist/services/conversation-manager.d.ts.map +1 -1
- package/dist/services/conversation-manager.js +13 -0
- package/dist/services/conversation-manager.js.map +1 -1
- package/dist/services/history-manager.d.ts +18 -0
- package/dist/services/history-manager.d.ts.map +1 -0
- package/dist/services/history-manager.js +140 -0
- package/dist/services/history-manager.js.map +1 -0
- package/dist/services/memory-manager.d.ts +47 -0
- package/dist/services/memory-manager.d.ts.map +1 -0
- package/dist/services/memory-manager.js +157 -0
- package/dist/services/memory-manager.js.map +1 -0
- package/dist/services/slash-commands.d.ts +21 -0
- package/dist/services/slash-commands.d.ts.map +1 -0
- package/dist/services/slash-commands.js +142 -0
- package/dist/services/slash-commands.js.map +1 -0
- package/dist/services/tool-executor.d.ts.map +1 -1
- package/dist/services/tool-executor.js +16 -2
- package/dist/services/tool-executor.js.map +1 -1
- package/dist/tools/advanced-edit.d.ts +94 -0
- package/dist/tools/advanced-edit.d.ts.map +1 -0
- package/dist/tools/advanced-edit.js +265 -0
- package/dist/tools/advanced-edit.js.map +1 -0
- package/dist/tools/file-system.d.ts +5 -0
- package/dist/tools/file-system.d.ts.map +1 -1
- package/dist/tools/file-system.js +8 -1
- package/dist/tools/file-system.js.map +1 -1
- package/dist/tools/search-tools.d.ts +110 -0
- package/dist/tools/search-tools.d.ts.map +1 -0
- package/dist/tools/search-tools.js +321 -0
- package/dist/tools/search-tools.js.map +1 -0
- package/dist/types/conversation.d.ts +6 -0
- package/dist/types/conversation.d.ts.map +1 -0
- package/dist/types/conversation.js +3 -0
- package/dist/types/conversation.js.map +1 -0
- package/dist/utils/claude-md.d.ts +24 -0
- package/dist/utils/claude-md.d.ts.map +1 -0
- package/dist/utils/claude-md.js +222 -0
- package/dist/utils/claude-md.js.map +1 -0
- package/dist/utils/error-handler.d.ts +20 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +130 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/markdown-renderer.d.ts +15 -0
- package/dist/utils/markdown-renderer.d.ts.map +1 -0
- package/dist/utils/markdown-renderer.js +143 -0
- package/dist/utils/markdown-renderer.js.map +1 -0
- package/dist/utils/multi-line-input.d.ts +3 -0
- package/dist/utils/multi-line-input.d.ts.map +1 -0
- package/dist/utils/multi-line-input.js +68 -0
- package/dist/utils/multi-line-input.js.map +1 -0
- package/dist/utils/prompts.d.ts +1 -0
- package/dist/utils/prompts.d.ts.map +1 -1
- package/dist/utils/prompts.js +17 -1
- package/dist/utils/prompts.js.map +1 -1
- package/dist/utils/readline-with-history.d.ts +13 -0
- package/dist/utils/readline-with-history.d.ts.map +1 -0
- package/dist/utils/readline-with-history.js +196 -0
- package/dist/utils/readline-with-history.js.map +1 -0
- package/package.json +9 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/utils/prompts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/utils/prompts.ts"],"names":[],"mappings":"AAIA,wBAAgB,kBAAkB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAE7D;AAED,wBAAgB,eAAe,IAAI,MAAM,CAyCxC"}
|
package/dist/utils/prompts.js
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initializeClaudeMd = initializeClaudeMd;
|
|
3
4
|
exports.getSystemPrompt = getSystemPrompt;
|
|
5
|
+
const claude_md_1 = require("./claude-md");
|
|
6
|
+
let claudeMdManager = null;
|
|
7
|
+
function initializeClaudeMd(projectRoot) {
|
|
8
|
+
claudeMdManager = new claude_md_1.ClaudeMdManager(projectRoot);
|
|
9
|
+
}
|
|
4
10
|
function getSystemPrompt() {
|
|
5
|
-
|
|
11
|
+
let basePrompt = `You are BD Agent, an AI-powered coding assistant that helps developers with their programming tasks.
|
|
6
12
|
|
|
7
13
|
You have access to various tools to help you:
|
|
8
14
|
- File system tools: read, write, edit files, and list directories
|
|
9
15
|
- Git tools: check status, stage files, commit changes, view logs
|
|
10
16
|
- Shell tools: execute commands
|
|
17
|
+
- Advanced edit tools: precise string replacement and multi-edit
|
|
18
|
+
- Search tools: grep and glob for finding content and files
|
|
11
19
|
|
|
12
20
|
When helping users:
|
|
13
21
|
1. Be concise and direct in your responses
|
|
@@ -30,5 +38,13 @@ Remember to:
|
|
|
30
38
|
- Break down complex tasks into smaller steps
|
|
31
39
|
- Use tools efficiently to minimize unnecessary operations
|
|
32
40
|
- Respect the user's existing code style and preferences`;
|
|
41
|
+
// Add project-specific instructions from CLAUDE.md
|
|
42
|
+
if (claudeMdManager) {
|
|
43
|
+
const additions = claudeMdManager.getSystemPromptAdditions();
|
|
44
|
+
if (additions) {
|
|
45
|
+
basePrompt += additions;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return basePrompt;
|
|
33
49
|
}
|
|
34
50
|
//# sourceMappingURL=prompts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/utils/prompts.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/utils/prompts.ts"],"names":[],"mappings":";;AAIA,gDAEC;AAED,0CAyCC;AAjDD,2CAA8C;AAE9C,IAAI,eAAe,GAA2B,IAAI,CAAC;AAEnD,SAAgB,kBAAkB,CAAC,WAAoB;IACrD,eAAe,GAAG,IAAI,2BAAe,CAAC,WAAW,CAAC,CAAC;AACrD,CAAC;AAED,SAAgB,eAAe;IAC7B,IAAI,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yDA6BsC,CAAC;IAExD,mDAAmD;IACnD,IAAI,eAAe,EAAE,CAAC;QACpB,MAAM,SAAS,GAAG,eAAe,CAAC,wBAAwB,EAAE,CAAC;QAC7D,IAAI,SAAS,EAAE,CAAC;YACd,UAAU,IAAI,SAAS,CAAC;QAC1B,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HistoryManager } from '../services/history-manager';
|
|
2
|
+
export declare class ReadlineWithHistory {
|
|
3
|
+
private rl;
|
|
4
|
+
private historyManager;
|
|
5
|
+
private currentLine;
|
|
6
|
+
private cursorPosition;
|
|
7
|
+
constructor(historyManager: HistoryManager);
|
|
8
|
+
question(prompt: string): Promise<string>;
|
|
9
|
+
private redrawLine;
|
|
10
|
+
close(): void;
|
|
11
|
+
questionSimple(prompt: string): Promise<string>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=readline-with-history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readline-with-history.d.ts","sourceRoot":"","sources":["../../src/utils/readline-with-history.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,EAAE,CAAqB;IAC/B,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,cAAc,CAAa;gBAEvB,cAAc,EAAE,cAAc;IAiBpC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAwG/C,OAAO,CAAC,UAAU;IAYlB,KAAK,IAAI,IAAI;IAQP,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAQtD"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ReadlineWithHistory = void 0;
|
|
37
|
+
const readline = __importStar(require("readline"));
|
|
38
|
+
class ReadlineWithHistory {
|
|
39
|
+
rl;
|
|
40
|
+
historyManager;
|
|
41
|
+
currentLine = '';
|
|
42
|
+
cursorPosition = 0;
|
|
43
|
+
constructor(historyManager) {
|
|
44
|
+
this.historyManager = historyManager;
|
|
45
|
+
// Create readline interface with custom key handling
|
|
46
|
+
this.rl = readline.createInterface({
|
|
47
|
+
input: process.stdin,
|
|
48
|
+
output: process.stdout,
|
|
49
|
+
terminal: true,
|
|
50
|
+
historySize: 0 // We manage history ourselves
|
|
51
|
+
});
|
|
52
|
+
// Enable raw mode for better key handling
|
|
53
|
+
if (process.stdin.isTTY) {
|
|
54
|
+
process.stdin.setRawMode(true);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async question(prompt) {
|
|
58
|
+
return new Promise((resolve) => {
|
|
59
|
+
process.stdout.write(prompt);
|
|
60
|
+
this.currentLine = '';
|
|
61
|
+
this.cursorPosition = 0;
|
|
62
|
+
const onData = (key) => {
|
|
63
|
+
const char = key.toString();
|
|
64
|
+
// Handle special keys
|
|
65
|
+
if (key[0] === 3) { // Ctrl+C
|
|
66
|
+
process.stdout.write('\n');
|
|
67
|
+
process.exit(0);
|
|
68
|
+
}
|
|
69
|
+
else if (key[0] === 4) { // Ctrl+D
|
|
70
|
+
if (this.currentLine.length === 0) {
|
|
71
|
+
process.stdout.write('\n');
|
|
72
|
+
resolve('exit');
|
|
73
|
+
cleanup();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else if (key[0] === 13) { // Enter
|
|
78
|
+
process.stdout.write('\n');
|
|
79
|
+
const result = this.currentLine;
|
|
80
|
+
this.historyManager.addToHistory(result);
|
|
81
|
+
this.historyManager.resetPosition();
|
|
82
|
+
cleanup();
|
|
83
|
+
resolve(result);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
else if (key[0] === 127 || key[0] === 8) { // Backspace
|
|
87
|
+
if (this.cursorPosition > 0) {
|
|
88
|
+
this.currentLine =
|
|
89
|
+
this.currentLine.slice(0, this.cursorPosition - 1) +
|
|
90
|
+
this.currentLine.slice(this.cursorPosition);
|
|
91
|
+
this.cursorPosition--;
|
|
92
|
+
this.redrawLine(prompt);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else if (key[0] === 27) { // Escape sequence
|
|
96
|
+
if (key[1] === 91) { // Arrow keys
|
|
97
|
+
if (key[2] === 65) { // Up arrow
|
|
98
|
+
const previousCommand = this.historyManager.getPreviousCommand(this.currentLine);
|
|
99
|
+
if (previousCommand !== null) {
|
|
100
|
+
this.currentLine = previousCommand;
|
|
101
|
+
this.cursorPosition = this.currentLine.length;
|
|
102
|
+
this.redrawLine(prompt);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
else if (key[2] === 66) { // Down arrow
|
|
106
|
+
const nextCommand = this.historyManager.getNextCommand();
|
|
107
|
+
if (nextCommand !== null) {
|
|
108
|
+
this.currentLine = nextCommand;
|
|
109
|
+
this.cursorPosition = this.currentLine.length;
|
|
110
|
+
this.redrawLine(prompt);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else if (key[2] === 67) { // Right arrow
|
|
114
|
+
if (this.cursorPosition < this.currentLine.length) {
|
|
115
|
+
this.cursorPosition++;
|
|
116
|
+
this.redrawLine(prompt);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else if (key[2] === 68) { // Left arrow
|
|
120
|
+
if (this.cursorPosition > 0) {
|
|
121
|
+
this.cursorPosition--;
|
|
122
|
+
this.redrawLine(prompt);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
else if (key[2] === 72) { // Home
|
|
126
|
+
this.cursorPosition = 0;
|
|
127
|
+
this.redrawLine(prompt);
|
|
128
|
+
}
|
|
129
|
+
else if (key[2] === 70) { // End
|
|
130
|
+
this.cursorPosition = this.currentLine.length;
|
|
131
|
+
this.redrawLine(prompt);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
else if (key[0] === 1) { // Ctrl+A (Home)
|
|
136
|
+
this.cursorPosition = 0;
|
|
137
|
+
this.redrawLine(prompt);
|
|
138
|
+
}
|
|
139
|
+
else if (key[0] === 5) { // Ctrl+E (End)
|
|
140
|
+
this.cursorPosition = this.currentLine.length;
|
|
141
|
+
this.redrawLine(prompt);
|
|
142
|
+
}
|
|
143
|
+
else if (key[0] === 11) { // Ctrl+K (Kill to end of line)
|
|
144
|
+
this.currentLine = this.currentLine.slice(0, this.cursorPosition);
|
|
145
|
+
this.redrawLine(prompt);
|
|
146
|
+
}
|
|
147
|
+
else if (key[0] === 21) { // Ctrl+U (Kill to beginning of line)
|
|
148
|
+
this.currentLine = this.currentLine.slice(this.cursorPosition);
|
|
149
|
+
this.cursorPosition = 0;
|
|
150
|
+
this.redrawLine(prompt);
|
|
151
|
+
}
|
|
152
|
+
else if (key[0] >= 32 && key[0] < 127) { // Printable characters
|
|
153
|
+
this.currentLine =
|
|
154
|
+
this.currentLine.slice(0, this.cursorPosition) +
|
|
155
|
+
char +
|
|
156
|
+
this.currentLine.slice(this.cursorPosition);
|
|
157
|
+
this.cursorPosition++;
|
|
158
|
+
this.redrawLine(prompt);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const cleanup = () => {
|
|
162
|
+
process.stdin.removeListener('data', onData);
|
|
163
|
+
if (process.stdin.isTTY) {
|
|
164
|
+
process.stdin.setRawMode(false);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
process.stdin.on('data', onData);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
redrawLine(prompt) {
|
|
171
|
+
// Clear current line
|
|
172
|
+
readline.clearLine(process.stdout, 0);
|
|
173
|
+
readline.cursorTo(process.stdout, 0);
|
|
174
|
+
// Write prompt and current line
|
|
175
|
+
process.stdout.write(prompt + this.currentLine);
|
|
176
|
+
// Position cursor
|
|
177
|
+
readline.cursorTo(process.stdout, prompt.length + this.cursorPosition);
|
|
178
|
+
}
|
|
179
|
+
close() {
|
|
180
|
+
if (process.stdin.isTTY) {
|
|
181
|
+
process.stdin.setRawMode(false);
|
|
182
|
+
}
|
|
183
|
+
this.rl.close();
|
|
184
|
+
}
|
|
185
|
+
// Fallback method for non-TTY environments (like when piping)
|
|
186
|
+
async questionSimple(prompt) {
|
|
187
|
+
return new Promise((resolve) => {
|
|
188
|
+
this.rl.question(prompt, (answer) => {
|
|
189
|
+
this.historyManager.addToHistory(answer);
|
|
190
|
+
resolve(answer);
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
exports.ReadlineWithHistory = ReadlineWithHistory;
|
|
196
|
+
//# sourceMappingURL=readline-with-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readline-with-history.js","sourceRoot":"","sources":["../../src/utils/readline-with-history.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAqC;AAIrC,MAAa,mBAAmB;IACtB,EAAE,CAAqB;IACvB,cAAc,CAAiB;IAC/B,WAAW,GAAW,EAAE,CAAC;IACzB,cAAc,GAAW,CAAC,CAAC;IAEnC,YAAY,cAA8B;QACxC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,qDAAqD;QACrD,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC;YACjC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,CAAC,CAAC,8BAA8B;SAC9C,CAAC,CAAC;QAEH,0CAA0C;QAC1C,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACxB,OAA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ClC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;gBACzC,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA3JD,kDA2JC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bestdefense/bd-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "An AI-powered coding assistant CLI that connects to AWS Bedrock",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -23,17 +23,22 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@aws-sdk/client-bedrock-runtime": "^3.0.0",
|
|
26
|
+
"@types/glob": "^8.1.0",
|
|
26
27
|
"chalk": "^5.3.0",
|
|
28
|
+
"cli-highlight": "^2.1.11",
|
|
27
29
|
"commander": "^12.0.0",
|
|
28
30
|
"dotenv": "^16.4.5",
|
|
31
|
+
"glob": "^11.0.3",
|
|
32
|
+
"highlight.js": "^11.11.1",
|
|
29
33
|
"inquirer": "^9.2.23",
|
|
30
34
|
"marked": "^12.0.2",
|
|
31
35
|
"marked-terminal": "^7.0.0",
|
|
32
|
-
"ora": "^8.0.1"
|
|
36
|
+
"ora": "^8.0.1",
|
|
37
|
+
"strip-ansi": "^7.1.0"
|
|
33
38
|
},
|
|
34
39
|
"devDependencies": {
|
|
35
40
|
"@types/inquirer": "^9.0.7",
|
|
36
|
-
"@types/marked-terminal": "^3.1.
|
|
41
|
+
"@types/marked-terminal": "^3.1.7",
|
|
37
42
|
"@types/node": "^20.14.0",
|
|
38
43
|
"jest": "^29.7.0",
|
|
39
44
|
"tsx": "^4.15.0",
|
|
@@ -49,4 +54,4 @@
|
|
|
49
54
|
"type": "git",
|
|
50
55
|
"url": "https://github.com/bestdefense-io/BD.Agent.git"
|
|
51
56
|
}
|
|
52
|
-
}
|
|
57
|
+
}
|