agent-dir 0.5.0 β 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.
- package/README.md +40 -421
- package/SECURITY.md +39 -0
- package/assets/agent-dir-banner.svg +38 -0
- package/dist/bin/agent-dir.js +0 -7
- package/dist/src/auth.js +3 -1
- package/dist/src/config.js +0 -2
- package/dist/src/logging.d.ts +0 -1
- package/dist/src/logging.js +6 -69
- package/dist/src/mcp.js +189 -651
- package/dist/src/server.d.ts +1 -1
- package/dist/src/server.js +35 -141
- package/dist/src/telemetry/privacy.js +2 -0
- package/dist/src/telemetry/types.d.ts +2 -0
- package/dist/src/tools/code.d.ts +0 -12
- package/dist/src/tools/code.js +9 -29
- package/dist/src/tools/diagnostics.js +3 -1
- package/dist/src/tools/files.d.ts +2 -21
- package/dist/src/tools/files.js +85 -70
- package/dist/src/tools/git.d.ts +0 -7
- package/dist/src/tools/git.js +0 -64
- package/dist/src/tools/metadata.d.ts +0 -1
- package/dist/src/tools/metadata.js +0 -22
- package/dist/src/tools/skills.d.ts +1 -0
- package/dist/src/tools/skills.js +65 -0
- package/dist/src/types.d.ts +0 -2
- package/docs/CONFIGURATION.md +154 -0
- package/docs/MCP.md +106 -0
- package/docs/RELEASING.md +213 -0
- package/docs/telemetry.md +109 -0
- package/package.json +4 -1
package/dist/src/config.js
CHANGED
package/dist/src/logging.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export declare function printBanner(options: {
|
|
|
11
11
|
npmScripts?: string[];
|
|
12
12
|
commands?: string[];
|
|
13
13
|
blacklistedCommands?: string[];
|
|
14
|
-
gitEnabled?: boolean;
|
|
15
14
|
}): void;
|
|
16
15
|
export declare function printRequestLog(entry: RequestLog): void;
|
|
17
16
|
export declare function logRequest(entry: RequestLog): void;
|
package/dist/src/logging.js
CHANGED
|
@@ -9,53 +9,24 @@ const BRIGHT_BLUE = "\x1b[94m";
|
|
|
9
9
|
const BRIGHT_CYAN = "\x1b[96m";
|
|
10
10
|
const BRIGHT_MAGENTA = "\x1b[95m";
|
|
11
11
|
const BRIGHT_YELLOW = "\x1b[93m";
|
|
12
|
-
const BRIGHT_RED = "\x1b[91m";
|
|
13
|
-
const BRIGHT_GREEN = "\x1b[92m";
|
|
14
12
|
const writeLine = (line = "") => {
|
|
15
13
|
process.stdout.write(`${line}\r\n`);
|
|
16
14
|
};
|
|
17
15
|
const color = (value, code) => `${code}${value}${RESET}`;
|
|
18
16
|
const TOOL_ICONS = {
|
|
19
|
-
list_files: "π",
|
|
20
|
-
list_dirs: "ποΈ",
|
|
21
17
|
read_range: "π",
|
|
22
|
-
read_files: "π",
|
|
23
|
-
write_files: "π",
|
|
24
|
-
patch_files: "π§©",
|
|
25
|
-
delete_files: "ποΈ",
|
|
26
18
|
run_npm_batch: "π§",
|
|
27
19
|
run_command_batch: "π οΈ",
|
|
28
|
-
search_files: "π",
|
|
29
20
|
find_files: "π§",
|
|
30
21
|
search_code: "π§ ",
|
|
31
22
|
find_symbol: "πΉ",
|
|
32
|
-
find_definition: "π―",
|
|
33
23
|
find_references: "π",
|
|
34
|
-
find_imports: "βͺ",
|
|
35
|
-
find_exports: "β",
|
|
36
|
-
git_status: "πΏ",
|
|
37
|
-
git_stage: "β",
|
|
38
|
-
git_unstage: "β",
|
|
39
|
-
git_commit: "β",
|
|
40
|
-
git_restore: "β©",
|
|
41
|
-
git_push: "β¬",
|
|
42
|
-
git_diff: "π",
|
|
43
|
-
git_log: "π",
|
|
44
|
-
project_overview: "πΊοΈ",
|
|
45
|
-
package_info: "π¦",
|
|
46
|
-
allowed_commands: "π",
|
|
47
24
|
file_info: "βΉοΈ",
|
|
48
|
-
diagnostics: "π©Ί",
|
|
49
25
|
project_context: "π§",
|
|
50
|
-
inspect: "π",
|
|
51
|
-
locate: "π―",
|
|
52
|
-
read_relevant: "π―",
|
|
53
|
-
git_changes: "π",
|
|
54
26
|
apply_changes: "βοΈ",
|
|
55
27
|
validate: "β",
|
|
56
28
|
};
|
|
57
29
|
const MCP_METHOD_ICONS = {
|
|
58
|
-
initialize: "π",
|
|
59
30
|
"notifications/initialized": "β",
|
|
60
31
|
"notifications/cancelled": "β",
|
|
61
32
|
"notifications/progress": "β³",
|
|
@@ -80,19 +51,8 @@ const MCP_METHOD_ICONS = {
|
|
|
80
51
|
const TOOL_NAME_WIDTH = Math.max(...Object.keys(TOOL_ICONS).map((name) => name.length));
|
|
81
52
|
const MCP_METHOD_NAME_WIDTH = Math.max(...Object.keys(MCP_METHOD_ICONS).map((name) => name.length));
|
|
82
53
|
const TOOL_COLORS = {
|
|
83
|
-
list_files: CYAN,
|
|
84
|
-
list_dirs: BRIGHT_CYAN,
|
|
85
|
-
read_files: BRIGHT_GREEN,
|
|
86
|
-
write_files: BRIGHT_YELLOW,
|
|
87
|
-
patch_files: BRIGHT_MAGENTA,
|
|
88
|
-
delete_files: BRIGHT_RED,
|
|
89
54
|
run_npm_batch: BRIGHT_BLUE,
|
|
90
55
|
run_command_batch: BRIGHT_CYAN,
|
|
91
|
-
git_stage: YELLOW,
|
|
92
|
-
git_unstage: MAGENTA,
|
|
93
|
-
git_commit: BRIGHT_GREEN,
|
|
94
|
-
git_restore: RED,
|
|
95
|
-
git_push: BRIGHT_BLUE,
|
|
96
56
|
};
|
|
97
57
|
const NARROW_TOOL_ICONS = new Set(["β", "β", "β", "β", "βͺ", "β"]);
|
|
98
58
|
const TOOL_ICON_SLOT_WIDTH = 3;
|
|
@@ -126,8 +86,6 @@ export function printHelp() {
|
|
|
126
86
|
writeLine(" --npm <scripts> Comma-separated allowed npm scripts");
|
|
127
87
|
writeLine(" --command <commands> Comma-separated allowed commands");
|
|
128
88
|
writeLine(" --blacklist <commands> Comma-separated blocked command prefixes");
|
|
129
|
-
writeLine(" --git Enable dedicated Git MCP tools");
|
|
130
|
-
writeLine(" --no-git Disable dedicated Git MCP tools");
|
|
131
89
|
writeLine(" --token <token> Explicit Bearer token");
|
|
132
90
|
writeLine(" --no-tunnel Disable tunneling");
|
|
133
91
|
writeLine(" --random Use a random Wormhole URL (no subdomain)");
|
|
@@ -180,38 +138,17 @@ export function printBanner(options) {
|
|
|
180
138
|
writeLine(` ${color("β‘ /mcp", CYAN)}`);
|
|
181
139
|
writeLine("");
|
|
182
140
|
writeLine(" TOOLS");
|
|
183
|
-
writeLine(` ${color(toolLabel("
|
|
184
|
-
writeLine(` ${color(toolLabel("list_dirs"), BRIGHT_CYAN)}`);
|
|
185
|
-
writeLine(` ${color(toolLabel("read_range"), GREEN)}`);
|
|
186
|
-
writeLine(` ${color(toolLabel("read_files"), BRIGHT_GREEN)}`);
|
|
187
|
-
writeLine(` ${color(toolLabel("write_files"), BRIGHT_YELLOW)}`);
|
|
188
|
-
writeLine(` ${color(toolLabel("patch_files"), BRIGHT_MAGENTA)}`);
|
|
189
|
-
writeLine(` ${color(toolLabel("delete_files"), BRIGHT_RED)}`);
|
|
190
|
-
writeLine(` ${color(toolLabel("run_npm_batch"), BRIGHT_BLUE)}`);
|
|
191
|
-
writeLine(` ${color(toolLabel("run_command_batch"), BRIGHT_CYAN)}`);
|
|
192
|
-
writeLine(` ${color(toolLabel("search_files"), CYAN)}`);
|
|
141
|
+
writeLine(` ${color(toolLabel("project_context"), BRIGHT_CYAN)}`);
|
|
193
142
|
writeLine(` ${color(toolLabel("find_files"), CYAN)}`);
|
|
194
143
|
writeLine(` ${color(toolLabel("search_code"), BRIGHT_CYAN)}`);
|
|
195
144
|
writeLine(` ${color(toolLabel("find_symbol"), GREEN)}`);
|
|
196
|
-
writeLine(` ${color(toolLabel("find_definition"), GREEN)}`);
|
|
197
145
|
writeLine(` ${color(toolLabel("find_references"), GREEN)}`);
|
|
198
|
-
writeLine(` ${color(toolLabel("
|
|
199
|
-
writeLine(` ${color(toolLabel("
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
writeLine(` ${color(toolLabel("git_unstage"), MAGENTA)}`);
|
|
204
|
-
writeLine(` ${color(toolLabel("git_commit"), BRIGHT_GREEN)}`);
|
|
205
|
-
writeLine(` ${color(toolLabel("git_restore"), RED)}`);
|
|
206
|
-
writeLine(` ${color(toolLabel("git_push"), BRIGHT_BLUE)}`);
|
|
207
|
-
writeLine(` ${color(toolLabel("git_diff"), CYAN)}`);
|
|
208
|
-
writeLine(` ${color(toolLabel("git_log"), CYAN)}`);
|
|
209
|
-
}
|
|
210
|
-
writeLine(` ${color(toolLabel("project_overview"), BRIGHT_CYAN)}`);
|
|
211
|
-
writeLine(` ${color(toolLabel("package_info"), YELLOW)}`);
|
|
212
|
-
writeLine(` ${color(toolLabel("allowed_commands"), YELLOW)}`);
|
|
146
|
+
writeLine(` ${color(toolLabel("read_range"), GREEN)}`);
|
|
147
|
+
writeLine(` ${color(toolLabel("apply_changes"), BRIGHT_MAGENTA)}`);
|
|
148
|
+
writeLine(` ${color(toolLabel("validate"), BRIGHT_YELLOW)}`);
|
|
149
|
+
writeLine(` ${color(toolLabel("run_npm_batch"), BRIGHT_BLUE)}`);
|
|
150
|
+
writeLine(` ${color(toolLabel("run_command_batch"), BRIGHT_CYAN)}`);
|
|
213
151
|
writeLine(` ${color(toolLabel("file_info"), YELLOW)}`);
|
|
214
|
-
writeLine(` ${color(toolLabel("diagnostics"), BRIGHT_YELLOW)}`);
|
|
215
152
|
writeLine("");
|
|
216
153
|
if (options.npmScripts?.length) {
|
|
217
154
|
writeLine(" NPM COMMANDS");
|