codebot-ai 1.3.0 → 1.4.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.
Files changed (40) hide show
  1. package/README.md +16 -1
  2. package/dist/agent.js +23 -1
  3. package/dist/cli.js +1 -1
  4. package/dist/providers/anthropic.js +27 -1
  5. package/dist/providers/openai.d.ts +4 -0
  6. package/dist/providers/openai.js +54 -2
  7. package/dist/retry.d.ts +5 -0
  8. package/dist/retry.js +24 -0
  9. package/dist/tools/code-analysis.d.ts +33 -0
  10. package/dist/tools/code-analysis.js +232 -0
  11. package/dist/tools/code-review.d.ts +32 -0
  12. package/dist/tools/code-review.js +228 -0
  13. package/dist/tools/database.d.ts +35 -0
  14. package/dist/tools/database.js +129 -0
  15. package/dist/tools/diff-viewer.d.ts +39 -0
  16. package/dist/tools/diff-viewer.js +145 -0
  17. package/dist/tools/docker.d.ts +26 -0
  18. package/dist/tools/docker.js +101 -0
  19. package/dist/tools/git.d.ts +26 -0
  20. package/dist/tools/git.js +58 -0
  21. package/dist/tools/http-client.d.ts +39 -0
  22. package/dist/tools/http-client.js +114 -0
  23. package/dist/tools/image-info.d.ts +23 -0
  24. package/dist/tools/image-info.js +170 -0
  25. package/dist/tools/index.js +34 -0
  26. package/dist/tools/multi-search.d.ts +28 -0
  27. package/dist/tools/multi-search.js +153 -0
  28. package/dist/tools/notification.d.ts +38 -0
  29. package/dist/tools/notification.js +96 -0
  30. package/dist/tools/package-manager.d.ts +31 -0
  31. package/dist/tools/package-manager.js +161 -0
  32. package/dist/tools/pdf-extract.d.ts +33 -0
  33. package/dist/tools/pdf-extract.js +178 -0
  34. package/dist/tools/ssh-remote.d.ts +39 -0
  35. package/dist/tools/ssh-remote.js +84 -0
  36. package/dist/tools/task-planner.d.ts +42 -0
  37. package/dist/tools/task-planner.js +161 -0
  38. package/dist/tools/test-runner.d.ts +36 -0
  39. package/dist/tools/test-runner.js +193 -0
  40. package/package.json +1 -1
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DockerTool = void 0;
4
+ const child_process_1 = require("child_process");
5
+ const ALLOWED_ACTIONS = [
6
+ 'ps', 'images', 'run', 'stop', 'rm', 'build', 'logs', 'exec',
7
+ 'compose_up', 'compose_down', 'compose_ps', 'inspect', 'pull',
8
+ ];
9
+ class DockerTool {
10
+ name = 'docker';
11
+ description = 'Run Docker operations. Actions: ps, images, run, stop, rm, build, logs, exec, compose_up, compose_down, compose_ps, inspect, pull.';
12
+ permission = 'prompt';
13
+ parameters = {
14
+ type: 'object',
15
+ properties: {
16
+ action: { type: 'string', description: 'Docker action to perform' },
17
+ args: { type: 'string', description: 'Additional arguments (image name, container ID, etc.)' },
18
+ cwd: { type: 'string', description: 'Working directory for compose commands' },
19
+ },
20
+ required: ['action'],
21
+ };
22
+ async execute(args) {
23
+ const action = args.action;
24
+ if (!action)
25
+ return 'Error: action is required';
26
+ if (!ALLOWED_ACTIONS.includes(action)) {
27
+ return `Error: unknown action "${action}". Allowed: ${ALLOWED_ACTIONS.join(', ')}`;
28
+ }
29
+ const extra = args.args || '';
30
+ const cwd = args.cwd || process.cwd();
31
+ // Build the command
32
+ let cmd;
33
+ switch (action) {
34
+ case 'ps':
35
+ cmd = `docker ps ${extra}`;
36
+ break;
37
+ case 'images':
38
+ cmd = `docker images ${extra}`;
39
+ break;
40
+ case 'run':
41
+ cmd = `docker run ${extra}`;
42
+ break;
43
+ case 'stop':
44
+ cmd = `docker stop ${extra}`;
45
+ break;
46
+ case 'rm':
47
+ cmd = `docker rm ${extra}`;
48
+ break;
49
+ case 'build':
50
+ cmd = `docker build ${extra}`;
51
+ break;
52
+ case 'logs':
53
+ cmd = `docker logs --tail 100 ${extra}`;
54
+ break;
55
+ case 'exec':
56
+ cmd = `docker exec ${extra}`;
57
+ break;
58
+ case 'inspect':
59
+ cmd = `docker inspect ${extra}`;
60
+ break;
61
+ case 'pull':
62
+ cmd = `docker pull ${extra}`;
63
+ break;
64
+ case 'compose_up':
65
+ cmd = `docker compose up -d ${extra}`;
66
+ break;
67
+ case 'compose_down':
68
+ cmd = `docker compose down ${extra}`;
69
+ break;
70
+ case 'compose_ps':
71
+ cmd = `docker compose ps ${extra}`;
72
+ break;
73
+ default: return `Error: unhandled action "${action}"`;
74
+ }
75
+ // Safety: block --privileged and dangerous volume mounts
76
+ if (/--privileged/.test(cmd))
77
+ return 'Error: --privileged flag is blocked for safety.';
78
+ if (/-v\s+\/:\//i.test(cmd))
79
+ return 'Error: mounting root filesystem is blocked for safety.';
80
+ try {
81
+ const output = (0, child_process_1.execSync)(cmd, {
82
+ cwd,
83
+ timeout: 60_000,
84
+ maxBuffer: 2 * 1024 * 1024,
85
+ encoding: 'utf-8',
86
+ stdio: ['pipe', 'pipe', 'pipe'],
87
+ });
88
+ return output.trim() || '(no output)';
89
+ }
90
+ catch (err) {
91
+ const e = err;
92
+ const msg = (e.stderr || e.stdout || 'command failed').trim();
93
+ if (msg.includes('not found') || msg.includes('Cannot connect')) {
94
+ return 'Error: Docker is not installed or not running. Install Docker Desktop or start the Docker daemon.';
95
+ }
96
+ return `Exit ${e.status || 1}: ${msg}`;
97
+ }
98
+ }
99
+ }
100
+ exports.DockerTool = DockerTool;
101
+ //# sourceMappingURL=docker.js.map
@@ -0,0 +1,26 @@
1
+ import { Tool } from '../types';
2
+ export declare class GitTool implements Tool {
3
+ name: string;
4
+ description: string;
5
+ permission: Tool['permission'];
6
+ parameters: {
7
+ type: string;
8
+ properties: {
9
+ action: {
10
+ type: string;
11
+ description: string;
12
+ };
13
+ args: {
14
+ type: string;
15
+ description: string;
16
+ };
17
+ cwd: {
18
+ type: string;
19
+ description: string;
20
+ };
21
+ };
22
+ required: string[];
23
+ };
24
+ execute(args: Record<string, unknown>): Promise<string>;
25
+ }
26
+ //# sourceMappingURL=git.d.ts.map
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GitTool = void 0;
4
+ const child_process_1 = require("child_process");
5
+ const ALLOWED_ACTIONS = [
6
+ 'status', 'diff', 'log', 'commit', 'branch', 'checkout',
7
+ 'stash', 'push', 'pull', 'merge', 'blame', 'tag', 'add', 'reset',
8
+ ];
9
+ class GitTool {
10
+ name = 'git';
11
+ description = 'Run git operations. Actions: status, diff, log, commit, branch, checkout, stash, push, pull, merge, blame, tag, add, reset.';
12
+ permission = 'prompt';
13
+ parameters = {
14
+ type: 'object',
15
+ properties: {
16
+ action: { type: 'string', description: 'Git action (status, diff, log, commit, branch, checkout, stash, push, pull, merge, blame, tag, add, reset)' },
17
+ args: { type: 'string', description: 'Additional arguments (e.g., file path, branch name, commit message)' },
18
+ cwd: { type: 'string', description: 'Working directory (defaults to current)' },
19
+ },
20
+ required: ['action'],
21
+ };
22
+ async execute(args) {
23
+ const action = args.action;
24
+ if (!action)
25
+ return 'Error: action is required';
26
+ if (!ALLOWED_ACTIONS.includes(action)) {
27
+ return `Error: unknown action "${action}". Allowed: ${ALLOWED_ACTIONS.join(', ')}`;
28
+ }
29
+ const extra = args.args || '';
30
+ const cwd = args.cwd || process.cwd();
31
+ // Block destructive force operations
32
+ const fullCmd = `git ${action} ${extra}`.trim();
33
+ if (/--force\s+.*(main|master)/i.test(fullCmd)) {
34
+ return 'Error: force push to main/master is blocked for safety.';
35
+ }
36
+ if (/clean\s+-[a-z]*f/i.test(fullCmd)) {
37
+ return 'Error: git clean -f is blocked for safety.';
38
+ }
39
+ try {
40
+ const output = (0, child_process_1.execSync)(fullCmd, {
41
+ cwd,
42
+ timeout: 30_000,
43
+ maxBuffer: 1024 * 1024,
44
+ encoding: 'utf-8',
45
+ stdio: ['pipe', 'pipe', 'pipe'],
46
+ });
47
+ return output.trim() || '(no output)';
48
+ }
49
+ catch (err) {
50
+ const e = err;
51
+ const stderr = (e.stderr || '').trim();
52
+ const stdout = (e.stdout || '').trim();
53
+ return `Exit ${e.status || 1}${stdout ? `\n${stdout}` : ''}${stderr ? `\nError: ${stderr}` : ''}`;
54
+ }
55
+ }
56
+ }
57
+ exports.GitTool = GitTool;
58
+ //# sourceMappingURL=git.js.map
@@ -0,0 +1,39 @@
1
+ import { Tool } from '../types';
2
+ export declare class HttpClientTool implements Tool {
3
+ name: string;
4
+ description: string;
5
+ permission: Tool['permission'];
6
+ parameters: {
7
+ type: string;
8
+ properties: {
9
+ method: {
10
+ type: string;
11
+ description: string;
12
+ };
13
+ url: {
14
+ type: string;
15
+ description: string;
16
+ };
17
+ headers: {
18
+ type: string;
19
+ description: string;
20
+ };
21
+ body: {
22
+ type: string;
23
+ description: string;
24
+ };
25
+ auth: {
26
+ type: string;
27
+ description: string;
28
+ };
29
+ timeout: {
30
+ type: string;
31
+ description: string;
32
+ };
33
+ };
34
+ required: string[];
35
+ };
36
+ execute(args: Record<string, unknown>): Promise<string>;
37
+ private isBlocked;
38
+ }
39
+ //# sourceMappingURL=http-client.d.ts.map
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpClientTool = void 0;
4
+ class HttpClientTool {
5
+ name = 'http_client';
6
+ description = 'Make HTTP requests. Supports GET, POST, PUT, DELETE, PATCH with headers, auth, and body.';
7
+ permission = 'prompt';
8
+ parameters = {
9
+ type: 'object',
10
+ properties: {
11
+ method: { type: 'string', description: 'HTTP method: GET, POST, PUT, DELETE, PATCH, HEAD (default: GET)' },
12
+ url: { type: 'string', description: 'Full URL to request' },
13
+ headers: { type: 'object', description: 'Request headers as key-value pairs' },
14
+ body: { type: 'string', description: 'Request body (JSON string or plain text)' },
15
+ auth: { type: 'string', description: 'Authorization header value (e.g., "Bearer token123")' },
16
+ timeout: { type: 'number', description: 'Timeout in ms (default: 30000)' },
17
+ },
18
+ required: ['url'],
19
+ };
20
+ async execute(args) {
21
+ const url = args.url;
22
+ if (!url)
23
+ return 'Error: url is required';
24
+ // Validate URL
25
+ let parsedUrl;
26
+ try {
27
+ parsedUrl = new URL(url);
28
+ }
29
+ catch {
30
+ return `Error: invalid URL: ${url}`;
31
+ }
32
+ // Block private IPs and file protocol
33
+ if (this.isBlocked(parsedUrl)) {
34
+ return 'Error: requests to private/local addresses are blocked for security.';
35
+ }
36
+ const method = (args.method || 'GET').toUpperCase();
37
+ const timeoutMs = args.timeout || 30_000;
38
+ const headers = {};
39
+ // Set headers
40
+ if (args.headers && typeof args.headers === 'object') {
41
+ for (const [k, v] of Object.entries(args.headers)) {
42
+ headers[k] = String(v);
43
+ }
44
+ }
45
+ if (args.auth) {
46
+ headers['Authorization'] = args.auth;
47
+ }
48
+ // Auto-set content type for body
49
+ const body = args.body;
50
+ if (body && !headers['Content-Type'] && !headers['content-type']) {
51
+ try {
52
+ JSON.parse(body);
53
+ headers['Content-Type'] = 'application/json';
54
+ }
55
+ catch { /* leave as-is */ }
56
+ }
57
+ const controller = new AbortController();
58
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
59
+ try {
60
+ const res = await fetch(url, {
61
+ method,
62
+ headers,
63
+ body: ['GET', 'HEAD'].includes(method) ? undefined : body,
64
+ signal: controller.signal,
65
+ });
66
+ const contentType = res.headers.get('content-type') || '';
67
+ let responseBody;
68
+ try {
69
+ responseBody = await res.text();
70
+ }
71
+ finally {
72
+ clearTimeout(timer);
73
+ }
74
+ // Try to pretty-print JSON
75
+ if (contentType.includes('json') || responseBody.startsWith('{') || responseBody.startsWith('[')) {
76
+ try {
77
+ const parsed = JSON.parse(responseBody);
78
+ responseBody = JSON.stringify(parsed, null, 2);
79
+ }
80
+ catch { /* keep raw */ }
81
+ }
82
+ // Truncate huge responses
83
+ if (responseBody.length > 10_000) {
84
+ responseBody = responseBody.substring(0, 10_000) + '\n...(truncated)';
85
+ }
86
+ const headerLines = Array.from(res.headers.entries())
87
+ .slice(0, 10)
88
+ .map(([k, v]) => ` ${k}: ${v}`)
89
+ .join('\n');
90
+ return `${res.status} ${res.statusText}\n\nHeaders:\n${headerLines}\n\nBody:\n${responseBody}`;
91
+ }
92
+ catch (err) {
93
+ clearTimeout(timer);
94
+ const msg = err instanceof Error ? err.message : String(err);
95
+ if (msg.includes('abort'))
96
+ return `Error: request timed out after ${timeoutMs}ms`;
97
+ return `Error: ${msg}`;
98
+ }
99
+ }
100
+ isBlocked(url) {
101
+ const host = url.hostname.toLowerCase();
102
+ if (url.protocol === 'file:')
103
+ return true;
104
+ if (host === 'localhost' || host === '127.0.0.1' || host === '::1' || host === '0.0.0.0')
105
+ return true;
106
+ if (host === '169.254.169.254')
107
+ return true; // cloud metadata
108
+ if (/^10\./.test(host) || /^192\.168\./.test(host) || /^172\.(1[6-9]|2\d|3[01])\./.test(host))
109
+ return true;
110
+ return false;
111
+ }
112
+ }
113
+ exports.HttpClientTool = HttpClientTool;
114
+ //# sourceMappingURL=http-client.js.map
@@ -0,0 +1,23 @@
1
+ import { Tool } from '../types';
2
+ export declare class ImageInfoTool implements Tool {
3
+ name: string;
4
+ description: string;
5
+ permission: Tool['permission'];
6
+ parameters: {
7
+ type: string;
8
+ properties: {
9
+ path: {
10
+ type: string;
11
+ description: string;
12
+ };
13
+ base64: {
14
+ type: string;
15
+ description: string;
16
+ };
17
+ };
18
+ required: string[];
19
+ };
20
+ execute(args: Record<string, unknown>): Promise<string>;
21
+ private readJpegDimensions;
22
+ }
23
+ //# sourceMappingURL=image-info.d.ts.map
@@ -0,0 +1,170 @@
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.ImageInfoTool = void 0;
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ class ImageInfoTool {
40
+ name = 'image_info';
41
+ description = 'Get image file information — dimensions, format, file size. Supports PNG, JPEG, GIF, BMP, SVG.';
42
+ permission = 'auto';
43
+ parameters = {
44
+ type: 'object',
45
+ properties: {
46
+ path: { type: 'string', description: 'Path to image file' },
47
+ base64: { type: 'boolean', description: 'Also return base64-encoded content (default: false)' },
48
+ },
49
+ required: ['path'],
50
+ };
51
+ async execute(args) {
52
+ const filePath = args.path;
53
+ if (!filePath)
54
+ return 'Error: path is required';
55
+ if (!fs.existsSync(filePath))
56
+ return `Error: file not found: ${filePath}`;
57
+ const stat = fs.statSync(filePath);
58
+ const ext = path.extname(filePath).toLowerCase();
59
+ const sizeKB = (stat.size / 1024).toFixed(1);
60
+ let width = 0, height = 0, format = 'unknown';
61
+ try {
62
+ const buf = Buffer.alloc(Math.min(stat.size, 32));
63
+ const fd = fs.openSync(filePath, 'r');
64
+ fs.readSync(fd, buf, 0, buf.length, 0);
65
+ fs.closeSync(fd);
66
+ // PNG: bytes 16-23 contain width (4 bytes) and height (4 bytes)
67
+ if (buf[0] === 0x89 && buf[1] === 0x50 && buf[2] === 0x4E && buf[3] === 0x47) {
68
+ format = 'PNG';
69
+ width = buf.readUInt32BE(16);
70
+ height = buf.readUInt32BE(20);
71
+ }
72
+ // JPEG: SOI marker
73
+ else if (buf[0] === 0xFF && buf[1] === 0xD8) {
74
+ format = 'JPEG';
75
+ const dims = this.readJpegDimensions(filePath);
76
+ width = dims.width;
77
+ height = dims.height;
78
+ }
79
+ // GIF: GIF87a or GIF89a
80
+ else if (buf[0] === 0x47 && buf[1] === 0x49 && buf[2] === 0x46) {
81
+ format = 'GIF';
82
+ width = buf.readUInt16LE(6);
83
+ height = buf.readUInt16LE(8);
84
+ }
85
+ // BMP
86
+ else if (buf[0] === 0x42 && buf[1] === 0x4D) {
87
+ format = 'BMP';
88
+ const fullBuf = Buffer.alloc(26);
89
+ const fd2 = fs.openSync(filePath, 'r');
90
+ fs.readSync(fd2, fullBuf, 0, 26, 0);
91
+ fs.closeSync(fd2);
92
+ width = fullBuf.readInt32LE(18);
93
+ height = Math.abs(fullBuf.readInt32LE(22));
94
+ }
95
+ // SVG
96
+ else if (ext === '.svg') {
97
+ format = 'SVG';
98
+ const content = fs.readFileSync(filePath, 'utf-8').substring(0, 1000);
99
+ const wMatch = content.match(/width=["'](\d+)/);
100
+ const hMatch = content.match(/height=["'](\d+)/);
101
+ const vbMatch = content.match(/viewBox=["']\s*\d+\s+\d+\s+(\d+)\s+(\d+)/);
102
+ if (wMatch)
103
+ width = parseInt(wMatch[1]);
104
+ if (hMatch)
105
+ height = parseInt(hMatch[1]);
106
+ if (!width && vbMatch) {
107
+ width = parseInt(vbMatch[1]);
108
+ height = parseInt(vbMatch[2]);
109
+ }
110
+ }
111
+ }
112
+ catch {
113
+ // Could not read dimensions
114
+ }
115
+ let result = `File: ${path.basename(filePath)}\nFormat: ${format}\nSize: ${sizeKB} KB`;
116
+ if (width > 0 && height > 0) {
117
+ result += `\nDimensions: ${width} x ${height}`;
118
+ }
119
+ result += `\nModified: ${stat.mtime.toISOString()}`;
120
+ if (args.base64) {
121
+ try {
122
+ const content = fs.readFileSync(filePath);
123
+ const b64 = content.toString('base64');
124
+ if (b64.length > 50_000) {
125
+ result += '\n\nBase64: (too large — over 50KB encoded)';
126
+ }
127
+ else {
128
+ result += `\n\nBase64:\n${b64}`;
129
+ }
130
+ }
131
+ catch {
132
+ result += '\n\nBase64: Error reading file';
133
+ }
134
+ }
135
+ return result;
136
+ }
137
+ readJpegDimensions(filePath) {
138
+ try {
139
+ const buf = fs.readFileSync(filePath);
140
+ let offset = 2; // Skip SOI
141
+ while (offset < buf.length - 1) {
142
+ if (buf[offset] !== 0xFF)
143
+ break;
144
+ const marker = buf[offset + 1];
145
+ // SOF markers (C0-C3, C5-C7, C9-CB, CD-CF)
146
+ if ((marker >= 0xC0 && marker <= 0xC3) || (marker >= 0xC5 && marker <= 0xC7) ||
147
+ (marker >= 0xC9 && marker <= 0xCB) || (marker >= 0xCD && marker <= 0xCF)) {
148
+ const height = buf.readUInt16BE(offset + 5);
149
+ const width = buf.readUInt16BE(offset + 7);
150
+ return { width, height };
151
+ }
152
+ // Skip non-SOF markers
153
+ if (marker === 0xD8 || marker === 0xD9) {
154
+ offset += 2;
155
+ continue;
156
+ }
157
+ if (marker >= 0xD0 && marker <= 0xD7) {
158
+ offset += 2;
159
+ continue;
160
+ }
161
+ const len = buf.readUInt16BE(offset + 2);
162
+ offset += 2 + len;
163
+ }
164
+ }
165
+ catch { /* fallback */ }
166
+ return { width: 0, height: 0 };
167
+ }
168
+ }
169
+ exports.ImageInfoTool = ImageInfoTool;
170
+ //# sourceMappingURL=image-info.js.map
@@ -14,11 +14,28 @@ const web_search_1 = require("./web-search");
14
14
  const browser_1 = require("./browser");
15
15
  const batch_edit_1 = require("./batch-edit");
16
16
  const routine_1 = require("./routine");
17
+ // v1.4.0 — 15 new tools
18
+ const git_1 = require("./git");
19
+ const code_analysis_1 = require("./code-analysis");
20
+ const multi_search_1 = require("./multi-search");
21
+ const task_planner_1 = require("./task-planner");
22
+ const diff_viewer_1 = require("./diff-viewer");
23
+ const docker_1 = require("./docker");
24
+ const database_1 = require("./database");
25
+ const test_runner_1 = require("./test-runner");
26
+ const http_client_1 = require("./http-client");
27
+ const image_info_1 = require("./image-info");
28
+ const ssh_remote_1 = require("./ssh-remote");
29
+ const notification_1 = require("./notification");
30
+ const pdf_extract_1 = require("./pdf-extract");
31
+ const package_manager_1 = require("./package-manager");
32
+ const code_review_1 = require("./code-review");
17
33
  var edit_2 = require("./edit");
18
34
  Object.defineProperty(exports, "EditFileTool", { enumerable: true, get: function () { return edit_2.EditFileTool; } });
19
35
  class ToolRegistry {
20
36
  tools = new Map();
21
37
  constructor(projectRoot) {
38
+ // Core file tools
22
39
  this.register(new read_1.ReadFileTool());
23
40
  this.register(new write_1.WriteFileTool());
24
41
  this.register(new edit_1.EditFileTool());
@@ -28,10 +45,27 @@ class ToolRegistry {
28
45
  this.register(new grep_1.GrepTool());
29
46
  this.register(new think_1.ThinkTool());
30
47
  this.register(new memory_1.MemoryTool(projectRoot));
48
+ // Web & browser
31
49
  this.register(new web_fetch_1.WebFetchTool());
32
50
  this.register(new web_search_1.WebSearchTool());
33
51
  this.register(new browser_1.BrowserTool());
34
52
  this.register(new routine_1.RoutineTool());
53
+ // v1.4.0 — intelligence & dev tools
54
+ this.register(new git_1.GitTool());
55
+ this.register(new code_analysis_1.CodeAnalysisTool());
56
+ this.register(new multi_search_1.MultiSearchTool());
57
+ this.register(new task_planner_1.TaskPlannerTool());
58
+ this.register(new diff_viewer_1.DiffViewerTool());
59
+ this.register(new docker_1.DockerTool());
60
+ this.register(new database_1.DatabaseTool());
61
+ this.register(new test_runner_1.TestRunnerTool());
62
+ this.register(new http_client_1.HttpClientTool());
63
+ this.register(new image_info_1.ImageInfoTool());
64
+ this.register(new ssh_remote_1.SshRemoteTool());
65
+ this.register(new notification_1.NotificationTool());
66
+ this.register(new pdf_extract_1.PdfExtractTool());
67
+ this.register(new package_manager_1.PackageManagerTool());
68
+ this.register(new code_review_1.CodeReviewTool());
35
69
  }
36
70
  register(tool) {
37
71
  this.tools.set(tool.name, tool);
@@ -0,0 +1,28 @@
1
+ import { Tool } from '../types';
2
+ export declare class MultiSearchTool implements Tool {
3
+ name: string;
4
+ description: string;
5
+ permission: Tool['permission'];
6
+ parameters: {
7
+ type: string;
8
+ properties: {
9
+ query: {
10
+ type: string;
11
+ description: string;
12
+ };
13
+ path: {
14
+ type: string;
15
+ description: string;
16
+ };
17
+ max_results: {
18
+ type: string;
19
+ description: string;
20
+ };
21
+ };
22
+ required: string[];
23
+ };
24
+ execute(args: Record<string, unknown>): Promise<string>;
25
+ private searchDir;
26
+ private fuzzyScore;
27
+ }
28
+ //# sourceMappingURL=multi-search.d.ts.map