agentool 0.0.1 → 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 +627 -52
- package/dist/ask-user/index.cjs +8 -0
- package/dist/ask-user/index.d.cts +68 -0
- package/dist/ask-user/index.d.ts +68 -0
- package/dist/ask-user/index.js +8 -0
- package/dist/bash/index.cjs +8 -0
- package/dist/bash/index.d.cts +63 -0
- package/dist/bash/index.d.ts +63 -0
- package/dist/bash/index.js +8 -0
- package/dist/chunk-3EPGFWZV.cjs +30 -0
- package/dist/chunk-3VO6NETR.cjs +79 -0
- package/dist/chunk-4YI2H55A.js +142 -0
- package/dist/chunk-5NW4OGRI.cjs +99 -0
- package/dist/chunk-6MDPYALY.js +196 -0
- package/dist/chunk-6PQLFDGT.js +117 -0
- package/dist/chunk-7QL4BQCH.js +40 -0
- package/dist/chunk-CAEVLIQB.cjs +117 -0
- package/dist/chunk-CGTPF6IS.js +90 -0
- package/dist/chunk-EA3YV7ZG.js +79 -0
- package/dist/chunk-FAEGCFTO.js +136 -0
- package/dist/chunk-FV2R5FFQ.cjs +102 -0
- package/dist/chunk-FW3UJ622.cjs +59 -0
- package/dist/chunk-G3ITTPGX.js +99 -0
- package/dist/chunk-HDKXSKMO.js +30 -0
- package/dist/chunk-HZAQRHBT.js +99 -0
- package/dist/chunk-I3ONDY7P.js +46 -0
- package/dist/chunk-I6KFFQPV.cjs +58 -0
- package/dist/chunk-IMZQ7ELK.cjs +196 -0
- package/dist/chunk-JCTBB7H2.cjs +40 -0
- package/dist/chunk-K77GC2QI.js +59 -0
- package/dist/chunk-LPV5CN2K.js +58 -0
- package/dist/chunk-MF7CJVIZ.js +40 -0
- package/dist/chunk-MIYA7TNR.cjs +123 -0
- package/dist/chunk-MJCAXASI.js +123 -0
- package/dist/chunk-MXFW3XY6.cjs +73 -0
- package/dist/chunk-ONBH74ZV.cjs +90 -0
- package/dist/chunk-OXLQ7QVL.cjs +40 -0
- package/dist/chunk-QEJV2KZ4.cjs +159 -0
- package/dist/chunk-QZ5GS6HW.cjs +46 -0
- package/dist/chunk-S6QEY7UY.js +73 -0
- package/dist/chunk-SUSAPI5W.cjs +142 -0
- package/dist/chunk-TBVHHF3H.cjs +47 -0
- package/dist/chunk-U2YMJM25.cjs +115 -0
- package/dist/chunk-VLNDEVKS.js +102 -0
- package/dist/chunk-XKG2A3EW.js +159 -0
- package/dist/chunk-XLD2Y3SS.cjs +136 -0
- package/dist/chunk-Y7KOKDFP.js +115 -0
- package/dist/chunk-YPPPGGLA.cjs +99 -0
- package/dist/chunk-ZHCMEQJJ.js +47 -0
- package/dist/context-compaction/index.cjs +8 -0
- package/dist/context-compaction/index.d.cts +77 -0
- package/dist/context-compaction/index.d.ts +77 -0
- package/dist/context-compaction/index.js +8 -0
- package/dist/diff/index.cjs +9 -0
- package/dist/diff/index.d.cts +72 -0
- package/dist/diff/index.d.ts +72 -0
- package/dist/diff/index.js +9 -0
- package/dist/edit/index.cjs +10 -0
- package/dist/edit/index.d.cts +53 -0
- package/dist/edit/index.d.ts +53 -0
- package/dist/edit/index.js +10 -0
- package/dist/glob/index.cjs +10 -0
- package/dist/glob/index.d.cts +47 -0
- package/dist/glob/index.d.ts +47 -0
- package/dist/glob/index.js +10 -0
- package/dist/grep/index.cjs +10 -0
- package/dist/grep/index.d.cts +50 -0
- package/dist/grep/index.d.ts +50 -0
- package/dist/grep/index.js +10 -0
- package/dist/http-request/index.cjs +8 -0
- package/dist/http-request/index.d.cts +60 -0
- package/dist/http-request/index.d.ts +60 -0
- package/dist/http-request/index.js +8 -0
- package/dist/index.cjs +102 -0
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +102 -0
- package/dist/lsp/index.cjs +10 -0
- package/dist/lsp/index.d.cts +38 -0
- package/dist/lsp/index.d.ts +38 -0
- package/dist/lsp/index.js +10 -0
- package/dist/memory/index.cjs +9 -0
- package/dist/memory/index.d.cts +63 -0
- package/dist/memory/index.d.ts +63 -0
- package/dist/memory/index.js +9 -0
- package/dist/multi-edit/index.cjs +11 -0
- package/dist/multi-edit/index.d.cts +72 -0
- package/dist/multi-edit/index.d.ts +72 -0
- package/dist/multi-edit/index.js +11 -0
- package/dist/read/index.cjs +10 -0
- package/dist/read/index.d.cts +67 -0
- package/dist/read/index.d.ts +67 -0
- package/dist/read/index.js +10 -0
- package/dist/sleep/index.cjs +8 -0
- package/dist/sleep/index.d.cts +60 -0
- package/dist/sleep/index.d.ts +60 -0
- package/dist/sleep/index.js +8 -0
- package/dist/task/index.cjs +8 -0
- package/dist/task/index.d.cts +67 -0
- package/dist/task/index.d.ts +67 -0
- package/dist/task/index.js +8 -0
- package/dist/types-3QPDuCXN.d.cts +45 -0
- package/dist/types-3QPDuCXN.d.ts +45 -0
- package/dist/web-fetch/index.cjs +8 -0
- package/dist/web-fetch/index.d.cts +56 -0
- package/dist/web-fetch/index.d.ts +56 -0
- package/dist/web-fetch/index.js +8 -0
- package/dist/write/index.cjs +10 -0
- package/dist/write/index.d.cts +47 -0
- package/dist/write/index.d.ts +47 -0
- package/dist/write/index.js +10 -0
- package/package.json +145 -20
- package/dist/core/index.d.ts +0 -20
- package/dist/core/index.js +0 -1
- package/dist/core/index.js.map +0 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as ai from 'ai';
|
|
2
|
+
import { B as BaseToolConfig } from '../types-3QPDuCXN.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Creates a glob tool that finds files matching a pattern.
|
|
6
|
+
*
|
|
7
|
+
* Uses ripgrep `--files --glob` under the hood for fast file matching.
|
|
8
|
+
* Returns absolute paths sorted by modification time (newest first).
|
|
9
|
+
* Execute never throws; errors are returned as descriptive strings.
|
|
10
|
+
*
|
|
11
|
+
* @param config - Optional configuration with a custom working directory.
|
|
12
|
+
* @returns A Vercel AI SDK tool with `description`, `parameters`, and `execute`.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { createGlob } from 'agentool/glob';
|
|
17
|
+
*
|
|
18
|
+
* const globTool = createGlob({ cwd: '/my/project' });
|
|
19
|
+
* const result = await globTool.execute(
|
|
20
|
+
* { pattern: '**\/*.ts' },
|
|
21
|
+
* { toolCallId: 'id', messages: [] },
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare function createGlob(config?: BaseToolConfig): ai.Tool<{
|
|
26
|
+
pattern: string;
|
|
27
|
+
path?: string | undefined;
|
|
28
|
+
}, string>;
|
|
29
|
+
/**
|
|
30
|
+
* Default glob tool instance using the current working directory.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* import { glob } from 'agentool/glob';
|
|
35
|
+
* const result = await glob.execute(
|
|
36
|
+
* { pattern: '**\/*.ts' },
|
|
37
|
+
* { toolCallId: 'id', messages: [] },
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
type GlobConfig = BaseToolConfig;
|
|
42
|
+
declare const glob: ai.Tool<{
|
|
43
|
+
pattern: string;
|
|
44
|
+
path?: string | undefined;
|
|
45
|
+
}, string>;
|
|
46
|
+
|
|
47
|
+
export { type GlobConfig, createGlob, glob };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkQEJV2KZ4cjs = require('../chunk-QEJV2KZ4.cjs');
|
|
5
|
+
require('../chunk-MIYA7TNR.cjs');
|
|
6
|
+
require('../chunk-QZ5GS6HW.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.createGrep = _chunkQEJV2KZ4cjs.createGrep; exports.grep = _chunkQEJV2KZ4cjs.grep;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as ai from 'ai';
|
|
2
|
+
import { B as BaseToolConfig } from '../types-3QPDuCXN.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Creates a grep tool that searches file contents using ripgrep.
|
|
6
|
+
*
|
|
7
|
+
* Supports three output modes: content, files_with_matches, and count.
|
|
8
|
+
* Execute never throws; errors are returned as descriptive strings.
|
|
9
|
+
*
|
|
10
|
+
* @param config - Optional configuration with a custom working directory.
|
|
11
|
+
* @returns A Vercel AI SDK tool with `description`, `parameters`, and `execute`.
|
|
12
|
+
*/
|
|
13
|
+
declare function createGrep(config?: BaseToolConfig): ai.Tool<{
|
|
14
|
+
pattern: string;
|
|
15
|
+
path?: string | undefined;
|
|
16
|
+
type?: string | undefined;
|
|
17
|
+
glob?: string | undefined;
|
|
18
|
+
output_mode?: "content" | "files_with_matches" | "count" | undefined;
|
|
19
|
+
'-B'?: number | undefined;
|
|
20
|
+
'-A'?: number | undefined;
|
|
21
|
+
'-C'?: number | undefined;
|
|
22
|
+
context?: number | undefined;
|
|
23
|
+
'-n'?: boolean | undefined;
|
|
24
|
+
'-i'?: boolean | undefined;
|
|
25
|
+
head_limit?: number | undefined;
|
|
26
|
+
offset?: number | undefined;
|
|
27
|
+
multiline?: boolean | undefined;
|
|
28
|
+
}, string>;
|
|
29
|
+
/**
|
|
30
|
+
* Default grep tool instance using the current working directory.
|
|
31
|
+
*/
|
|
32
|
+
type GrepConfig = BaseToolConfig;
|
|
33
|
+
declare const grep: ai.Tool<{
|
|
34
|
+
pattern: string;
|
|
35
|
+
path?: string | undefined;
|
|
36
|
+
type?: string | undefined;
|
|
37
|
+
glob?: string | undefined;
|
|
38
|
+
output_mode?: "content" | "files_with_matches" | "count" | undefined;
|
|
39
|
+
'-B'?: number | undefined;
|
|
40
|
+
'-A'?: number | undefined;
|
|
41
|
+
'-C'?: number | undefined;
|
|
42
|
+
context?: number | undefined;
|
|
43
|
+
'-n'?: boolean | undefined;
|
|
44
|
+
'-i'?: boolean | undefined;
|
|
45
|
+
head_limit?: number | undefined;
|
|
46
|
+
offset?: number | undefined;
|
|
47
|
+
multiline?: boolean | undefined;
|
|
48
|
+
}, string>;
|
|
49
|
+
|
|
50
|
+
export { type GrepConfig, createGrep, grep };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as ai from 'ai';
|
|
2
|
+
import { B as BaseToolConfig } from '../types-3QPDuCXN.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Creates a grep tool that searches file contents using ripgrep.
|
|
6
|
+
*
|
|
7
|
+
* Supports three output modes: content, files_with_matches, and count.
|
|
8
|
+
* Execute never throws; errors are returned as descriptive strings.
|
|
9
|
+
*
|
|
10
|
+
* @param config - Optional configuration with a custom working directory.
|
|
11
|
+
* @returns A Vercel AI SDK tool with `description`, `parameters`, and `execute`.
|
|
12
|
+
*/
|
|
13
|
+
declare function createGrep(config?: BaseToolConfig): ai.Tool<{
|
|
14
|
+
pattern: string;
|
|
15
|
+
path?: string | undefined;
|
|
16
|
+
type?: string | undefined;
|
|
17
|
+
glob?: string | undefined;
|
|
18
|
+
output_mode?: "content" | "files_with_matches" | "count" | undefined;
|
|
19
|
+
'-B'?: number | undefined;
|
|
20
|
+
'-A'?: number | undefined;
|
|
21
|
+
'-C'?: number | undefined;
|
|
22
|
+
context?: number | undefined;
|
|
23
|
+
'-n'?: boolean | undefined;
|
|
24
|
+
'-i'?: boolean | undefined;
|
|
25
|
+
head_limit?: number | undefined;
|
|
26
|
+
offset?: number | undefined;
|
|
27
|
+
multiline?: boolean | undefined;
|
|
28
|
+
}, string>;
|
|
29
|
+
/**
|
|
30
|
+
* Default grep tool instance using the current working directory.
|
|
31
|
+
*/
|
|
32
|
+
type GrepConfig = BaseToolConfig;
|
|
33
|
+
declare const grep: ai.Tool<{
|
|
34
|
+
pattern: string;
|
|
35
|
+
path?: string | undefined;
|
|
36
|
+
type?: string | undefined;
|
|
37
|
+
glob?: string | undefined;
|
|
38
|
+
output_mode?: "content" | "files_with_matches" | "count" | undefined;
|
|
39
|
+
'-B'?: number | undefined;
|
|
40
|
+
'-A'?: number | undefined;
|
|
41
|
+
'-C'?: number | undefined;
|
|
42
|
+
context?: number | undefined;
|
|
43
|
+
'-n'?: boolean | undefined;
|
|
44
|
+
'-i'?: boolean | undefined;
|
|
45
|
+
head_limit?: number | undefined;
|
|
46
|
+
offset?: number | undefined;
|
|
47
|
+
multiline?: boolean | undefined;
|
|
48
|
+
}, string>;
|
|
49
|
+
|
|
50
|
+
export { type GrepConfig, createGrep, grep };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as ai from 'ai';
|
|
2
|
+
import { T as TimeoutConfig } from '../types-3QPDuCXN.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for the HTTP request tool.
|
|
6
|
+
* Extends {@link TimeoutConfig} with optional default headers
|
|
7
|
+
* applied to every request.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const config: HttpRequestConfig = {
|
|
12
|
+
* timeout: 10000,
|
|
13
|
+
* defaultHeaders: { Authorization: 'Bearer token' },
|
|
14
|
+
* };
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
interface HttpRequestConfig extends TimeoutConfig {
|
|
18
|
+
/** Headers merged into every request (per-request headers take precedence). */
|
|
19
|
+
defaultHeaders?: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Factory that creates an HTTP request tool with the given configuration.
|
|
23
|
+
* The returned tool uses native `fetch()` and returns raw status, headers,
|
|
24
|
+
* and body -- no markdown conversion.
|
|
25
|
+
*
|
|
26
|
+
* @param config - Optional configuration (timeout, default headers).
|
|
27
|
+
* @returns An AI SDK tool instance for making HTTP requests.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* import { createHttpRequest } from 'agentool/http-request';
|
|
32
|
+
* const myTool = createHttpRequest({ timeout: 5000 });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare function createHttpRequest(config?: HttpRequestConfig): ai.Tool<{
|
|
36
|
+
url: string;
|
|
37
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD";
|
|
38
|
+
timeout?: number | undefined;
|
|
39
|
+
headers?: Record<string, string> | undefined;
|
|
40
|
+
body?: string | undefined;
|
|
41
|
+
}, string>;
|
|
42
|
+
/**
|
|
43
|
+
* Pre-configured HTTP request tool with default settings.
|
|
44
|
+
* Uses a 30 000 ms timeout and no default headers.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { httpRequest } from 'agentool/http-request';
|
|
49
|
+
* // Register directly with your AI SDK agent
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
declare const httpRequest: ai.Tool<{
|
|
53
|
+
url: string;
|
|
54
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD";
|
|
55
|
+
timeout?: number | undefined;
|
|
56
|
+
headers?: Record<string, string> | undefined;
|
|
57
|
+
body?: string | undefined;
|
|
58
|
+
}, string>;
|
|
59
|
+
|
|
60
|
+
export { type HttpRequestConfig, createHttpRequest, httpRequest };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as ai from 'ai';
|
|
2
|
+
import { T as TimeoutConfig } from '../types-3QPDuCXN.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for the HTTP request tool.
|
|
6
|
+
* Extends {@link TimeoutConfig} with optional default headers
|
|
7
|
+
* applied to every request.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const config: HttpRequestConfig = {
|
|
12
|
+
* timeout: 10000,
|
|
13
|
+
* defaultHeaders: { Authorization: 'Bearer token' },
|
|
14
|
+
* };
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
interface HttpRequestConfig extends TimeoutConfig {
|
|
18
|
+
/** Headers merged into every request (per-request headers take precedence). */
|
|
19
|
+
defaultHeaders?: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Factory that creates an HTTP request tool with the given configuration.
|
|
23
|
+
* The returned tool uses native `fetch()` and returns raw status, headers,
|
|
24
|
+
* and body -- no markdown conversion.
|
|
25
|
+
*
|
|
26
|
+
* @param config - Optional configuration (timeout, default headers).
|
|
27
|
+
* @returns An AI SDK tool instance for making HTTP requests.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* import { createHttpRequest } from 'agentool/http-request';
|
|
32
|
+
* const myTool = createHttpRequest({ timeout: 5000 });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare function createHttpRequest(config?: HttpRequestConfig): ai.Tool<{
|
|
36
|
+
url: string;
|
|
37
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD";
|
|
38
|
+
timeout?: number | undefined;
|
|
39
|
+
headers?: Record<string, string> | undefined;
|
|
40
|
+
body?: string | undefined;
|
|
41
|
+
}, string>;
|
|
42
|
+
/**
|
|
43
|
+
* Pre-configured HTTP request tool with default settings.
|
|
44
|
+
* Uses a 30 000 ms timeout and no default headers.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { httpRequest } from 'agentool/http-request';
|
|
49
|
+
* // Register directly with your AI SDK agent
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
declare const httpRequest: ai.Tool<{
|
|
53
|
+
url: string;
|
|
54
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD";
|
|
55
|
+
timeout?: number | undefined;
|
|
56
|
+
headers?: Record<string, string> | undefined;
|
|
57
|
+
body?: string | undefined;
|
|
58
|
+
}, string>;
|
|
59
|
+
|
|
60
|
+
export { type HttpRequestConfig, createHttpRequest, httpRequest };
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkOXLQ7QVLcjs = require('./chunk-OXLQ7QVL.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkFV2R5FFQcjs = require('./chunk-FV2R5FFQ.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunk3VO6NETRcjs = require('./chunk-3VO6NETR.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkONBH74ZVcjs = require('./chunk-ONBH74ZV.cjs');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
var _chunkXLD2Y3SScjs = require('./chunk-XLD2Y3SS.cjs');
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
var _chunkIMZQ7ELKcjs = require('./chunk-IMZQ7ELK.cjs');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
var _chunkI6KFFQPVcjs = require('./chunk-I6KFFQPV.cjs');
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
var _chunkFW3UJ622cjs = require('./chunk-FW3UJ622.cjs');
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
var _chunk3EPGFWZVcjs = require('./chunk-3EPGFWZV.cjs');
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
var _chunkSUSAPI5Wcjs = require('./chunk-SUSAPI5W.cjs');
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
var _chunkQEJV2KZ4cjs = require('./chunk-QEJV2KZ4.cjs');
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
var _chunkYPPPGGLAcjs = require('./chunk-YPPPGGLA.cjs');
|
|
49
|
+
require('./chunk-MIYA7TNR.cjs');
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
var _chunkTBVHHF3Hcjs = require('./chunk-TBVHHF3H.cjs');
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
var _chunkMXFW3XY6cjs = require('./chunk-MXFW3XY6.cjs');
|
|
58
|
+
require('./chunk-5NW4OGRI.cjs');
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
var _chunkJCTBB7H2cjs = require('./chunk-JCTBB7H2.cjs');
|
|
63
|
+
require('./chunk-CAEVLIQB.cjs');
|
|
64
|
+
require('./chunk-QZ5GS6HW.cjs');
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
var _chunkU2YMJM25cjs = require('./chunk-U2YMJM25.cjs');
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
exports.askUser = _chunk3EPGFWZVcjs.askUser; exports.bash = _chunkSUSAPI5Wcjs.bash; exports.contextCompaction = _chunkFW3UJ622cjs.contextCompaction; exports.createAskUser = _chunk3EPGFWZVcjs.createAskUser; exports.createBash = _chunkSUSAPI5Wcjs.createBash; exports.createContextCompaction = _chunkFW3UJ622cjs.createContextCompaction; exports.createDiff = _chunkONBH74ZVcjs.createDiff; exports.createEdit = _chunkMXFW3XY6cjs.createEdit; exports.createGlob = _chunkYPPPGGLAcjs.createGlob; exports.createGrep = _chunkQEJV2KZ4cjs.createGrep; exports.createHttpRequest = _chunkI6KFFQPVcjs.createHttpRequest; exports.createLsp = _chunkIMZQ7ELKcjs.createLsp; exports.createMemory = _chunkFV2R5FFQcjs.createMemory; exports.createMultiEdit = _chunk3VO6NETRcjs.createMultiEdit; exports.createRead = _chunkTBVHHF3Hcjs.createRead; exports.createSleep = _chunkOXLQ7QVLcjs.createSleep; exports.createTask = _chunkXLD2Y3SScjs.createTask; exports.createWebFetch = _chunkU2YMJM25cjs.createWebFetch; exports.createWrite = _chunkJCTBB7H2cjs.createWrite; exports.diff = _chunkONBH74ZVcjs.diff; exports.edit = _chunkMXFW3XY6cjs.edit; exports.glob = _chunkYPPPGGLAcjs.glob; exports.grep = _chunkQEJV2KZ4cjs.grep; exports.httpRequest = _chunkI6KFFQPVcjs.httpRequest; exports.lsp = _chunkIMZQ7ELKcjs.lsp; exports.memory = _chunkFV2R5FFQcjs.memory; exports.multiEdit = _chunk3VO6NETRcjs.multiEdit; exports.read = _chunkTBVHHF3Hcjs.read; exports.sleep = _chunkOXLQ7QVLcjs.sleep; exports.task = _chunkXLD2Y3SScjs.task; exports.webFetch = _chunkU2YMJM25cjs.webFetch; exports.write = _chunkJCTBB7H2cjs.write;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { BashConfig, bash, createBash } from './bash/index.cjs';
|
|
2
|
+
export { GrepConfig, createGrep, grep } from './grep/index.cjs';
|
|
3
|
+
export { GlobConfig, createGlob, glob } from './glob/index.cjs';
|
|
4
|
+
export { ReadConfig, createRead, read } from './read/index.cjs';
|
|
5
|
+
export { EditConfig, createEdit, edit } from './edit/index.cjs';
|
|
6
|
+
export { WriteConfig, createWrite, write } from './write/index.cjs';
|
|
7
|
+
export { WebFetchConfig, createWebFetch, webFetch } from './web-fetch/index.cjs';
|
|
8
|
+
export { MemoryConfig, createMemory, memory } from './memory/index.cjs';
|
|
9
|
+
export { MultiEditConfig, createMultiEdit, multiEdit } from './multi-edit/index.cjs';
|
|
10
|
+
export { DiffConfig, createDiff, diff } from './diff/index.cjs';
|
|
11
|
+
export { TaskConfig, createTask, task } from './task/index.cjs';
|
|
12
|
+
export { LspConfig, createLsp, lsp } from './lsp/index.cjs';
|
|
13
|
+
export { HttpRequestConfig, createHttpRequest, httpRequest } from './http-request/index.cjs';
|
|
14
|
+
export { ContextCompactionConfig, contextCompaction, createContextCompaction } from './context-compaction/index.cjs';
|
|
15
|
+
export { AskUserConfig, askUser, createAskUser } from './ask-user/index.cjs';
|
|
16
|
+
export { SleepConfig, createSleep, sleep } from './sleep/index.cjs';
|
|
17
|
+
export { B as BaseToolConfig, T as TimeoutConfig, a as ToolResult } from './types-3QPDuCXN.cjs';
|
|
18
|
+
import 'ai';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { BashConfig, bash, createBash } from './bash/index.js';
|
|
2
|
+
export { GrepConfig, createGrep, grep } from './grep/index.js';
|
|
3
|
+
export { GlobConfig, createGlob, glob } from './glob/index.js';
|
|
4
|
+
export { ReadConfig, createRead, read } from './read/index.js';
|
|
5
|
+
export { EditConfig, createEdit, edit } from './edit/index.js';
|
|
6
|
+
export { WriteConfig, createWrite, write } from './write/index.js';
|
|
7
|
+
export { WebFetchConfig, createWebFetch, webFetch } from './web-fetch/index.js';
|
|
8
|
+
export { MemoryConfig, createMemory, memory } from './memory/index.js';
|
|
9
|
+
export { MultiEditConfig, createMultiEdit, multiEdit } from './multi-edit/index.js';
|
|
10
|
+
export { DiffConfig, createDiff, diff } from './diff/index.js';
|
|
11
|
+
export { TaskConfig, createTask, task } from './task/index.js';
|
|
12
|
+
export { LspConfig, createLsp, lsp } from './lsp/index.js';
|
|
13
|
+
export { HttpRequestConfig, createHttpRequest, httpRequest } from './http-request/index.js';
|
|
14
|
+
export { ContextCompactionConfig, contextCompaction, createContextCompaction } from './context-compaction/index.js';
|
|
15
|
+
export { AskUserConfig, askUser, createAskUser } from './ask-user/index.js';
|
|
16
|
+
export { SleepConfig, createSleep, sleep } from './sleep/index.js';
|
|
17
|
+
export { B as BaseToolConfig, T as TimeoutConfig, a as ToolResult } from './types-3QPDuCXN.js';
|
|
18
|
+
import 'ai';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createSleep,
|
|
3
|
+
sleep
|
|
4
|
+
} from "./chunk-MF7CJVIZ.js";
|
|
5
|
+
import {
|
|
6
|
+
createMemory,
|
|
7
|
+
memory
|
|
8
|
+
} from "./chunk-VLNDEVKS.js";
|
|
9
|
+
import {
|
|
10
|
+
createMultiEdit,
|
|
11
|
+
multiEdit
|
|
12
|
+
} from "./chunk-EA3YV7ZG.js";
|
|
13
|
+
import {
|
|
14
|
+
createDiff,
|
|
15
|
+
diff
|
|
16
|
+
} from "./chunk-CGTPF6IS.js";
|
|
17
|
+
import {
|
|
18
|
+
createTask,
|
|
19
|
+
task
|
|
20
|
+
} from "./chunk-FAEGCFTO.js";
|
|
21
|
+
import {
|
|
22
|
+
createLsp,
|
|
23
|
+
lsp
|
|
24
|
+
} from "./chunk-6MDPYALY.js";
|
|
25
|
+
import {
|
|
26
|
+
createHttpRequest,
|
|
27
|
+
httpRequest
|
|
28
|
+
} from "./chunk-LPV5CN2K.js";
|
|
29
|
+
import {
|
|
30
|
+
contextCompaction,
|
|
31
|
+
createContextCompaction
|
|
32
|
+
} from "./chunk-K77GC2QI.js";
|
|
33
|
+
import {
|
|
34
|
+
askUser,
|
|
35
|
+
createAskUser
|
|
36
|
+
} from "./chunk-HDKXSKMO.js";
|
|
37
|
+
import {
|
|
38
|
+
bash,
|
|
39
|
+
createBash
|
|
40
|
+
} from "./chunk-4YI2H55A.js";
|
|
41
|
+
import {
|
|
42
|
+
createGrep,
|
|
43
|
+
grep
|
|
44
|
+
} from "./chunk-XKG2A3EW.js";
|
|
45
|
+
import {
|
|
46
|
+
createGlob,
|
|
47
|
+
glob
|
|
48
|
+
} from "./chunk-HZAQRHBT.js";
|
|
49
|
+
import "./chunk-MJCAXASI.js";
|
|
50
|
+
import {
|
|
51
|
+
createRead,
|
|
52
|
+
read
|
|
53
|
+
} from "./chunk-ZHCMEQJJ.js";
|
|
54
|
+
import {
|
|
55
|
+
createEdit,
|
|
56
|
+
edit
|
|
57
|
+
} from "./chunk-S6QEY7UY.js";
|
|
58
|
+
import "./chunk-G3ITTPGX.js";
|
|
59
|
+
import {
|
|
60
|
+
createWrite,
|
|
61
|
+
write
|
|
62
|
+
} from "./chunk-7QL4BQCH.js";
|
|
63
|
+
import "./chunk-6PQLFDGT.js";
|
|
64
|
+
import "./chunk-I3ONDY7P.js";
|
|
65
|
+
import {
|
|
66
|
+
createWebFetch,
|
|
67
|
+
webFetch
|
|
68
|
+
} from "./chunk-Y7KOKDFP.js";
|
|
69
|
+
export {
|
|
70
|
+
askUser,
|
|
71
|
+
bash,
|
|
72
|
+
contextCompaction,
|
|
73
|
+
createAskUser,
|
|
74
|
+
createBash,
|
|
75
|
+
createContextCompaction,
|
|
76
|
+
createDiff,
|
|
77
|
+
createEdit,
|
|
78
|
+
createGlob,
|
|
79
|
+
createGrep,
|
|
80
|
+
createHttpRequest,
|
|
81
|
+
createLsp,
|
|
82
|
+
createMemory,
|
|
83
|
+
createMultiEdit,
|
|
84
|
+
createRead,
|
|
85
|
+
createSleep,
|
|
86
|
+
createTask,
|
|
87
|
+
createWebFetch,
|
|
88
|
+
createWrite,
|
|
89
|
+
diff,
|
|
90
|
+
edit,
|
|
91
|
+
glob,
|
|
92
|
+
grep,
|
|
93
|
+
httpRequest,
|
|
94
|
+
lsp,
|
|
95
|
+
memory,
|
|
96
|
+
multiEdit,
|
|
97
|
+
read,
|
|
98
|
+
sleep,
|
|
99
|
+
task,
|
|
100
|
+
webFetch,
|
|
101
|
+
write
|
|
102
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkIMZQ7ELKcjs = require('../chunk-IMZQ7ELK.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.createLsp = _chunkIMZQ7ELKcjs.createLsp; exports.executeLspOperation = _chunkIMZQ7ELKcjs.executeLspOperation; exports.lsp = _chunkIMZQ7ELKcjs.lsp;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as ai from 'ai';
|
|
2
|
+
import { B as BaseToolConfig } from '../types-3QPDuCXN.cjs';
|
|
3
|
+
|
|
4
|
+
interface LspServerConfig {
|
|
5
|
+
command: string;
|
|
6
|
+
args?: string[];
|
|
7
|
+
}
|
|
8
|
+
interface LspConfig extends BaseToolConfig {
|
|
9
|
+
servers?: Record<string, LspServerConfig>;
|
|
10
|
+
timeout?: number;
|
|
11
|
+
}
|
|
12
|
+
interface LspRequest {
|
|
13
|
+
operation: string;
|
|
14
|
+
filePath: string;
|
|
15
|
+
line?: number;
|
|
16
|
+
character?: number;
|
|
17
|
+
query?: string;
|
|
18
|
+
cwd: string;
|
|
19
|
+
}
|
|
20
|
+
declare function executeLspOperation(serverConfig: LspServerConfig, params: LspRequest, timeoutMs: number): Promise<string>;
|
|
21
|
+
/** Creates an LSP tool that performs language server operations. */
|
|
22
|
+
declare function createLsp(config?: LspConfig): ai.Tool<{
|
|
23
|
+
operation: "goToDefinition" | "findReferences" | "hover" | "documentSymbol" | "workspaceSymbol" | "goToImplementation" | "incomingCalls" | "outgoingCalls";
|
|
24
|
+
filePath: string;
|
|
25
|
+
query?: string | undefined;
|
|
26
|
+
line?: number | undefined;
|
|
27
|
+
character?: number | undefined;
|
|
28
|
+
}, string>;
|
|
29
|
+
/** Default LSP tool instance with no servers configured. */
|
|
30
|
+
declare const lsp: ai.Tool<{
|
|
31
|
+
operation: "goToDefinition" | "findReferences" | "hover" | "documentSymbol" | "workspaceSymbol" | "goToImplementation" | "incomingCalls" | "outgoingCalls";
|
|
32
|
+
filePath: string;
|
|
33
|
+
query?: string | undefined;
|
|
34
|
+
line?: number | undefined;
|
|
35
|
+
character?: number | undefined;
|
|
36
|
+
}, string>;
|
|
37
|
+
|
|
38
|
+
export { type LspConfig, type LspServerConfig, createLsp, executeLspOperation, lsp };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as ai from 'ai';
|
|
2
|
+
import { B as BaseToolConfig } from '../types-3QPDuCXN.js';
|
|
3
|
+
|
|
4
|
+
interface LspServerConfig {
|
|
5
|
+
command: string;
|
|
6
|
+
args?: string[];
|
|
7
|
+
}
|
|
8
|
+
interface LspConfig extends BaseToolConfig {
|
|
9
|
+
servers?: Record<string, LspServerConfig>;
|
|
10
|
+
timeout?: number;
|
|
11
|
+
}
|
|
12
|
+
interface LspRequest {
|
|
13
|
+
operation: string;
|
|
14
|
+
filePath: string;
|
|
15
|
+
line?: number;
|
|
16
|
+
character?: number;
|
|
17
|
+
query?: string;
|
|
18
|
+
cwd: string;
|
|
19
|
+
}
|
|
20
|
+
declare function executeLspOperation(serverConfig: LspServerConfig, params: LspRequest, timeoutMs: number): Promise<string>;
|
|
21
|
+
/** Creates an LSP tool that performs language server operations. */
|
|
22
|
+
declare function createLsp(config?: LspConfig): ai.Tool<{
|
|
23
|
+
operation: "goToDefinition" | "findReferences" | "hover" | "documentSymbol" | "workspaceSymbol" | "goToImplementation" | "incomingCalls" | "outgoingCalls";
|
|
24
|
+
filePath: string;
|
|
25
|
+
query?: string | undefined;
|
|
26
|
+
line?: number | undefined;
|
|
27
|
+
character?: number | undefined;
|
|
28
|
+
}, string>;
|
|
29
|
+
/** Default LSP tool instance with no servers configured. */
|
|
30
|
+
declare const lsp: ai.Tool<{
|
|
31
|
+
operation: "goToDefinition" | "findReferences" | "hover" | "documentSymbol" | "workspaceSymbol" | "goToImplementation" | "incomingCalls" | "outgoingCalls";
|
|
32
|
+
filePath: string;
|
|
33
|
+
query?: string | undefined;
|
|
34
|
+
line?: number | undefined;
|
|
35
|
+
character?: number | undefined;
|
|
36
|
+
}, string>;
|
|
37
|
+
|
|
38
|
+
export { type LspConfig, type LspServerConfig, createLsp, executeLspOperation, lsp };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkFV2R5FFQcjs = require('../chunk-FV2R5FFQ.cjs');
|
|
5
|
+
require('../chunk-QZ5GS6HW.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.createMemory = _chunkFV2R5FFQcjs.createMemory; exports.memory = _chunkFV2R5FFQcjs.memory;
|