agentool 0.0.1 → 1.1.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.
Files changed (147) hide show
  1. package/README.md +738 -52
  2. package/dist/ask-user/index.cjs +8 -0
  3. package/dist/ask-user/index.d.cts +68 -0
  4. package/dist/ask-user/index.d.ts +68 -0
  5. package/dist/ask-user/index.js +8 -0
  6. package/dist/bash/index.cjs +8 -0
  7. package/dist/bash/index.d.cts +63 -0
  8. package/dist/bash/index.d.ts +63 -0
  9. package/dist/bash/index.js +8 -0
  10. package/dist/chunk-3EPGFWZV.cjs +30 -0
  11. package/dist/chunk-3VO6NETR.cjs +79 -0
  12. package/dist/chunk-44AFQ2B7.js +30 -0
  13. package/dist/chunk-4HIATLKI.js +112 -0
  14. package/dist/chunk-4HXAKPQH.cjs +36 -0
  15. package/dist/chunk-4YI2H55A.js +142 -0
  16. package/dist/chunk-56CL4JCW.cjs +53 -0
  17. package/dist/chunk-5NW4OGRI.cjs +99 -0
  18. package/dist/chunk-5O55DKOB.cjs +112 -0
  19. package/dist/chunk-5TDZF4IM.cjs +197 -0
  20. package/dist/chunk-6DJSWTWQ.cjs +40 -0
  21. package/dist/chunk-6PQLFDGT.js +117 -0
  22. package/dist/chunk-ACGW44YT.js +47 -0
  23. package/dist/chunk-CAEVLIQB.cjs +117 -0
  24. package/dist/chunk-CGTPF6IS.js +90 -0
  25. package/dist/chunk-E6NBEYZD.js +51 -0
  26. package/dist/chunk-EA3YV7ZG.js +79 -0
  27. package/dist/chunk-ECYT46FP.js +40 -0
  28. package/dist/chunk-FV2R5FFQ.cjs +102 -0
  29. package/dist/chunk-FW3UJ622.cjs +59 -0
  30. package/dist/chunk-G3ITTPGX.js +99 -0
  31. package/dist/chunk-HDKXSKMO.js +30 -0
  32. package/dist/chunk-HNP7JDQC.cjs +159 -0
  33. package/dist/chunk-HNUL2CID.cjs +34 -0
  34. package/dist/chunk-HZAQRHBT.js +99 -0
  35. package/dist/chunk-I3ONDY7P.js +46 -0
  36. package/dist/chunk-I6KFFQPV.cjs +58 -0
  37. package/dist/chunk-IEX4NOVN.cjs +48 -0
  38. package/dist/chunk-IRRNYFI5.js +48 -0
  39. package/dist/chunk-K77GC2QI.js +59 -0
  40. package/dist/chunk-L5JH4I77.cjs +51 -0
  41. package/dist/chunk-LK6SQH2G.cjs +30 -0
  42. package/dist/chunk-LPV5CN2K.js +58 -0
  43. package/dist/chunk-LTE5NG4D.js +53 -0
  44. package/dist/chunk-MF7CJVIZ.js +40 -0
  45. package/dist/chunk-MIYA7TNR.cjs +123 -0
  46. package/dist/chunk-MJCAXASI.js +123 -0
  47. package/dist/chunk-OM2UFTGS.cjs +47 -0
  48. package/dist/chunk-ONBH74ZV.cjs +90 -0
  49. package/dist/chunk-OXLQ7QVL.cjs +40 -0
  50. package/dist/chunk-P6Z5XFDS.js +73 -0
  51. package/dist/chunk-QZ5GS6HW.cjs +46 -0
  52. package/dist/chunk-S7IVHOA6.js +75 -0
  53. package/dist/chunk-SUSAPI5W.cjs +142 -0
  54. package/dist/chunk-TMW3XKKJ.js +34 -0
  55. package/dist/chunk-UDIG7332.js +159 -0
  56. package/dist/chunk-VLNDEVKS.js +102 -0
  57. package/dist/chunk-VXZ4RKJI.js +36 -0
  58. package/dist/chunk-XAQGZ374.js +197 -0
  59. package/dist/chunk-YPPPGGLA.cjs +99 -0
  60. package/dist/chunk-ZBLQV6UO.cjs +73 -0
  61. package/dist/chunk-ZFQZWXOI.cjs +75 -0
  62. package/dist/context-compaction/index.cjs +8 -0
  63. package/dist/context-compaction/index.d.cts +77 -0
  64. package/dist/context-compaction/index.d.ts +77 -0
  65. package/dist/context-compaction/index.js +8 -0
  66. package/dist/diff/index.cjs +9 -0
  67. package/dist/diff/index.d.cts +72 -0
  68. package/dist/diff/index.d.ts +72 -0
  69. package/dist/diff/index.js +9 -0
  70. package/dist/edit/index.cjs +10 -0
  71. package/dist/edit/index.d.cts +53 -0
  72. package/dist/edit/index.d.ts +53 -0
  73. package/dist/edit/index.js +10 -0
  74. package/dist/glob/index.cjs +10 -0
  75. package/dist/glob/index.d.cts +47 -0
  76. package/dist/glob/index.d.ts +47 -0
  77. package/dist/glob/index.js +10 -0
  78. package/dist/grep/index.cjs +10 -0
  79. package/dist/grep/index.d.cts +50 -0
  80. package/dist/grep/index.d.ts +50 -0
  81. package/dist/grep/index.js +10 -0
  82. package/dist/http-request/index.cjs +8 -0
  83. package/dist/http-request/index.d.cts +60 -0
  84. package/dist/http-request/index.d.ts +60 -0
  85. package/dist/http-request/index.js +8 -0
  86. package/dist/index.cjs +133 -0
  87. package/dist/index.d.cts +23 -0
  88. package/dist/index.d.ts +23 -0
  89. package/dist/index.js +133 -0
  90. package/dist/lsp/index.cjs +10 -0
  91. package/dist/lsp/index.d.cts +35 -0
  92. package/dist/lsp/index.d.ts +35 -0
  93. package/dist/lsp/index.js +10 -0
  94. package/dist/memory/index.cjs +9 -0
  95. package/dist/memory/index.d.cts +63 -0
  96. package/dist/memory/index.d.ts +63 -0
  97. package/dist/memory/index.js +9 -0
  98. package/dist/multi-edit/index.cjs +11 -0
  99. package/dist/multi-edit/index.d.cts +72 -0
  100. package/dist/multi-edit/index.d.ts +72 -0
  101. package/dist/multi-edit/index.js +11 -0
  102. package/dist/read/index.cjs +10 -0
  103. package/dist/read/index.d.cts +67 -0
  104. package/dist/read/index.d.ts +67 -0
  105. package/dist/read/index.js +10 -0
  106. package/dist/sleep/index.cjs +8 -0
  107. package/dist/sleep/index.d.cts +60 -0
  108. package/dist/sleep/index.d.ts +60 -0
  109. package/dist/sleep/index.js +8 -0
  110. package/dist/task-create/index.cjs +9 -0
  111. package/dist/task-create/index.d.cts +19 -0
  112. package/dist/task-create/index.d.ts +19 -0
  113. package/dist/task-create/index.js +9 -0
  114. package/dist/task-get/index.cjs +9 -0
  115. package/dist/task-get/index.d.cts +15 -0
  116. package/dist/task-get/index.d.ts +15 -0
  117. package/dist/task-get/index.js +9 -0
  118. package/dist/task-list/index.cjs +9 -0
  119. package/dist/task-list/index.d.cts +11 -0
  120. package/dist/task-list/index.d.ts +11 -0
  121. package/dist/task-list/index.js +9 -0
  122. package/dist/task-update/index.cjs +9 -0
  123. package/dist/task-update/index.d.cts +31 -0
  124. package/dist/task-update/index.d.ts +31 -0
  125. package/dist/task-update/index.js +9 -0
  126. package/dist/tool-search/index.cjs +8 -0
  127. package/dist/tool-search/index.d.cts +18 -0
  128. package/dist/tool-search/index.d.ts +18 -0
  129. package/dist/tool-search/index.js +8 -0
  130. package/dist/types-3QPDuCXN.d.cts +45 -0
  131. package/dist/types-3QPDuCXN.d.ts +45 -0
  132. package/dist/web-fetch/index.cjs +8 -0
  133. package/dist/web-fetch/index.d.cts +54 -0
  134. package/dist/web-fetch/index.d.ts +54 -0
  135. package/dist/web-fetch/index.js +8 -0
  136. package/dist/web-search/index.cjs +8 -0
  137. package/dist/web-search/index.d.cts +21 -0
  138. package/dist/web-search/index.d.ts +21 -0
  139. package/dist/web-search/index.js +8 -0
  140. package/dist/write/index.cjs +10 -0
  141. package/dist/write/index.d.cts +47 -0
  142. package/dist/write/index.d.ts +47 -0
  143. package/dist/write/index.js +10 -0
  144. package/package.json +170 -20
  145. package/dist/core/index.d.ts +0 -20
  146. package/dist/core/index.js +0 -1
  147. package/dist/core/index.js.map +0 -1
@@ -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 };
@@ -0,0 +1,8 @@
1
+ import {
2
+ createHttpRequest,
3
+ httpRequest
4
+ } from "../chunk-LPV5CN2K.js";
5
+ export {
6
+ createHttpRequest,
7
+ httpRequest
8
+ };
package/dist/index.cjs ADDED
@@ -0,0 +1,133 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkIEX4NOVNcjs = require('./chunk-IEX4NOVN.cjs');
5
+
6
+
7
+
8
+ var _chunk5TDZF4IMcjs = require('./chunk-5TDZF4IM.cjs');
9
+
10
+
11
+
12
+ var _chunkI6KFFQPVcjs = require('./chunk-I6KFFQPV.cjs');
13
+
14
+
15
+
16
+ var _chunkFW3UJ622cjs = require('./chunk-FW3UJ622.cjs');
17
+
18
+
19
+
20
+ var _chunk3EPGFWZVcjs = require('./chunk-3EPGFWZV.cjs');
21
+
22
+
23
+
24
+ var _chunkOXLQ7QVLcjs = require('./chunk-OXLQ7QVL.cjs');
25
+
26
+
27
+
28
+ var _chunkFV2R5FFQcjs = require('./chunk-FV2R5FFQ.cjs');
29
+
30
+
31
+
32
+ var _chunk3VO6NETRcjs = require('./chunk-3VO6NETR.cjs');
33
+
34
+
35
+
36
+ var _chunkONBH74ZVcjs = require('./chunk-ONBH74ZV.cjs');
37
+
38
+
39
+
40
+ var _chunk56CL4JCWcjs = require('./chunk-56CL4JCW.cjs');
41
+
42
+
43
+
44
+ var _chunk4HXAKPQHcjs = require('./chunk-4HXAKPQH.cjs');
45
+
46
+
47
+
48
+ var _chunkZFQZWXOIcjs = require('./chunk-ZFQZWXOI.cjs');
49
+
50
+
51
+
52
+ var _chunkHNUL2CIDcjs = require('./chunk-HNUL2CID.cjs');
53
+ require('./chunk-L5JH4I77.cjs');
54
+
55
+
56
+
57
+ var _chunkLK6SQH2Gcjs = require('./chunk-LK6SQH2G.cjs');
58
+
59
+
60
+
61
+ var _chunkSUSAPI5Wcjs = require('./chunk-SUSAPI5W.cjs');
62
+
63
+
64
+
65
+ var _chunkHNP7JDQCcjs = require('./chunk-HNP7JDQC.cjs');
66
+
67
+
68
+
69
+ var _chunkYPPPGGLAcjs = require('./chunk-YPPPGGLA.cjs');
70
+ require('./chunk-MIYA7TNR.cjs');
71
+
72
+
73
+
74
+ var _chunkOM2UFTGScjs = require('./chunk-OM2UFTGS.cjs');
75
+
76
+
77
+
78
+ var _chunkZBLQV6UOcjs = require('./chunk-ZBLQV6UO.cjs');
79
+ require('./chunk-5NW4OGRI.cjs');
80
+
81
+
82
+
83
+ var _chunk6DJSWTWQcjs = require('./chunk-6DJSWTWQ.cjs');
84
+ require('./chunk-CAEVLIQB.cjs');
85
+ require('./chunk-QZ5GS6HW.cjs');
86
+
87
+
88
+
89
+ var _chunk5O55DKOBcjs = require('./chunk-5O55DKOB.cjs');
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ 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 = _chunkZBLQV6UOcjs.createEdit; exports.createGlob = _chunkYPPPGGLAcjs.createGlob; exports.createGrep = _chunkHNP7JDQCcjs.createGrep; exports.createHttpRequest = _chunkI6KFFQPVcjs.createHttpRequest; exports.createLsp = _chunk5TDZF4IMcjs.createLsp; exports.createMemory = _chunkFV2R5FFQcjs.createMemory; exports.createMultiEdit = _chunk3VO6NETRcjs.createMultiEdit; exports.createRead = _chunkOM2UFTGScjs.createRead; exports.createSleep = _chunkOXLQ7QVLcjs.createSleep; exports.createTaskCreate = _chunk56CL4JCWcjs.createTaskCreate; exports.createTaskGet = _chunk4HXAKPQHcjs.createTaskGet; exports.createTaskList = _chunkHNUL2CIDcjs.createTaskList; exports.createTaskUpdate = _chunkZFQZWXOIcjs.createTaskUpdate; exports.createToolSearch = _chunkIEX4NOVNcjs.createToolSearch; exports.createWebFetch = _chunk5O55DKOBcjs.createWebFetch; exports.createWebSearch = _chunkLK6SQH2Gcjs.createWebSearch; exports.createWrite = _chunk6DJSWTWQcjs.createWrite; exports.diff = _chunkONBH74ZVcjs.diff; exports.edit = _chunkZBLQV6UOcjs.edit; exports.glob = _chunkYPPPGGLAcjs.glob; exports.grep = _chunkHNP7JDQCcjs.grep; exports.httpRequest = _chunkI6KFFQPVcjs.httpRequest; exports.lsp = _chunk5TDZF4IMcjs.lsp; exports.memory = _chunkFV2R5FFQcjs.memory; exports.multiEdit = _chunk3VO6NETRcjs.multiEdit; exports.read = _chunkOM2UFTGScjs.read; exports.sleep = _chunkOXLQ7QVLcjs.sleep; exports.taskCreate = _chunk56CL4JCWcjs.taskCreate; exports.taskGet = _chunk4HXAKPQHcjs.taskGet; exports.taskList = _chunkHNUL2CIDcjs.taskList; exports.taskUpdate = _chunkZFQZWXOIcjs.taskUpdate; exports.toolSearch = _chunkIEX4NOVNcjs.toolSearch; exports.webFetch = _chunk5O55DKOBcjs.webFetch; exports.webSearch = _chunkLK6SQH2Gcjs.webSearch; exports.write = _chunk6DJSWTWQcjs.write;
@@ -0,0 +1,23 @@
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 { TaskCreateConfig, createTaskCreate, taskCreate } from './task-create/index.cjs';
12
+ export { TaskGetConfig, createTaskGet, taskGet } from './task-get/index.cjs';
13
+ export { TaskUpdateConfig, createTaskUpdate, taskUpdate } from './task-update/index.cjs';
14
+ export { TaskListConfig, createTaskList, taskList } from './task-list/index.cjs';
15
+ export { WebSearchConfig, createWebSearch, webSearch } from './web-search/index.cjs';
16
+ export { ToolSearchConfig, createToolSearch, toolSearch } from './tool-search/index.cjs';
17
+ export { LspConfig, createLsp, lsp } from './lsp/index.cjs';
18
+ export { HttpRequestConfig, createHttpRequest, httpRequest } from './http-request/index.cjs';
19
+ export { ContextCompactionConfig, contextCompaction, createContextCompaction } from './context-compaction/index.cjs';
20
+ export { AskUserConfig, askUser, createAskUser } from './ask-user/index.cjs';
21
+ export { SleepConfig, createSleep, sleep } from './sleep/index.cjs';
22
+ export { B as BaseToolConfig, T as TimeoutConfig, a as ToolResult } from './types-3QPDuCXN.cjs';
23
+ import 'ai';
@@ -0,0 +1,23 @@
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 { TaskCreateConfig, createTaskCreate, taskCreate } from './task-create/index.js';
12
+ export { TaskGetConfig, createTaskGet, taskGet } from './task-get/index.js';
13
+ export { TaskUpdateConfig, createTaskUpdate, taskUpdate } from './task-update/index.js';
14
+ export { TaskListConfig, createTaskList, taskList } from './task-list/index.js';
15
+ export { WebSearchConfig, createWebSearch, webSearch } from './web-search/index.js';
16
+ export { ToolSearchConfig, createToolSearch, toolSearch } from './tool-search/index.js';
17
+ export { LspConfig, createLsp, lsp } from './lsp/index.js';
18
+ export { HttpRequestConfig, createHttpRequest, httpRequest } from './http-request/index.js';
19
+ export { ContextCompactionConfig, contextCompaction, createContextCompaction } from './context-compaction/index.js';
20
+ export { AskUserConfig, askUser, createAskUser } from './ask-user/index.js';
21
+ export { SleepConfig, createSleep, sleep } from './sleep/index.js';
22
+ export { B as BaseToolConfig, T as TimeoutConfig, a as ToolResult } from './types-3QPDuCXN.js';
23
+ import 'ai';
package/dist/index.js ADDED
@@ -0,0 +1,133 @@
1
+ import {
2
+ createToolSearch,
3
+ toolSearch
4
+ } from "./chunk-IRRNYFI5.js";
5
+ import {
6
+ createLsp,
7
+ lsp
8
+ } from "./chunk-XAQGZ374.js";
9
+ import {
10
+ createHttpRequest,
11
+ httpRequest
12
+ } from "./chunk-LPV5CN2K.js";
13
+ import {
14
+ contextCompaction,
15
+ createContextCompaction
16
+ } from "./chunk-K77GC2QI.js";
17
+ import {
18
+ askUser,
19
+ createAskUser
20
+ } from "./chunk-HDKXSKMO.js";
21
+ import {
22
+ createSleep,
23
+ sleep
24
+ } from "./chunk-MF7CJVIZ.js";
25
+ import {
26
+ createMemory,
27
+ memory
28
+ } from "./chunk-VLNDEVKS.js";
29
+ import {
30
+ createMultiEdit,
31
+ multiEdit
32
+ } from "./chunk-EA3YV7ZG.js";
33
+ import {
34
+ createDiff,
35
+ diff
36
+ } from "./chunk-CGTPF6IS.js";
37
+ import {
38
+ createTaskCreate,
39
+ taskCreate
40
+ } from "./chunk-LTE5NG4D.js";
41
+ import {
42
+ createTaskGet,
43
+ taskGet
44
+ } from "./chunk-VXZ4RKJI.js";
45
+ import {
46
+ createTaskUpdate,
47
+ taskUpdate
48
+ } from "./chunk-S7IVHOA6.js";
49
+ import {
50
+ createTaskList,
51
+ taskList
52
+ } from "./chunk-TMW3XKKJ.js";
53
+ import "./chunk-E6NBEYZD.js";
54
+ import {
55
+ createWebSearch,
56
+ webSearch
57
+ } from "./chunk-44AFQ2B7.js";
58
+ import {
59
+ bash,
60
+ createBash
61
+ } from "./chunk-4YI2H55A.js";
62
+ import {
63
+ createGrep,
64
+ grep
65
+ } from "./chunk-UDIG7332.js";
66
+ import {
67
+ createGlob,
68
+ glob
69
+ } from "./chunk-HZAQRHBT.js";
70
+ import "./chunk-MJCAXASI.js";
71
+ import {
72
+ createRead,
73
+ read
74
+ } from "./chunk-ACGW44YT.js";
75
+ import {
76
+ createEdit,
77
+ edit
78
+ } from "./chunk-P6Z5XFDS.js";
79
+ import "./chunk-G3ITTPGX.js";
80
+ import {
81
+ createWrite,
82
+ write
83
+ } from "./chunk-ECYT46FP.js";
84
+ import "./chunk-6PQLFDGT.js";
85
+ import "./chunk-I3ONDY7P.js";
86
+ import {
87
+ createWebFetch,
88
+ webFetch
89
+ } from "./chunk-4HIATLKI.js";
90
+ export {
91
+ askUser,
92
+ bash,
93
+ contextCompaction,
94
+ createAskUser,
95
+ createBash,
96
+ createContextCompaction,
97
+ createDiff,
98
+ createEdit,
99
+ createGlob,
100
+ createGrep,
101
+ createHttpRequest,
102
+ createLsp,
103
+ createMemory,
104
+ createMultiEdit,
105
+ createRead,
106
+ createSleep,
107
+ createTaskCreate,
108
+ createTaskGet,
109
+ createTaskList,
110
+ createTaskUpdate,
111
+ createToolSearch,
112
+ createWebFetch,
113
+ createWebSearch,
114
+ createWrite,
115
+ diff,
116
+ edit,
117
+ glob,
118
+ grep,
119
+ httpRequest,
120
+ lsp,
121
+ memory,
122
+ multiEdit,
123
+ read,
124
+ sleep,
125
+ taskCreate,
126
+ taskGet,
127
+ taskList,
128
+ taskUpdate,
129
+ toolSearch,
130
+ webFetch,
131
+ webSearch,
132
+ write
133
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _chunk5TDZF4IMcjs = require('../chunk-5TDZF4IM.cjs');
6
+
7
+
8
+
9
+
10
+ exports.createLsp = _chunk5TDZF4IMcjs.createLsp; exports.executeLspOperation = _chunk5TDZF4IMcjs.executeLspOperation; exports.lsp = _chunk5TDZF4IMcjs.lsp;
@@ -0,0 +1,35 @@
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
+ cwd: string;
18
+ }
19
+ declare function executeLspOperation(serverConfig: LspServerConfig, params: LspRequest, timeoutMs: number): Promise<string>;
20
+ /** Creates an LSP tool that performs language server operations. */
21
+ declare function createLsp(config?: LspConfig): ai.Tool<{
22
+ operation: "goToDefinition" | "findReferences" | "hover" | "documentSymbol" | "workspaceSymbol" | "goToImplementation" | "prepareCallHierarchy" | "incomingCalls" | "outgoingCalls";
23
+ filePath: string;
24
+ line: number;
25
+ character: number;
26
+ }, string>;
27
+ /** Default LSP tool instance with no servers configured. */
28
+ declare const lsp: ai.Tool<{
29
+ operation: "goToDefinition" | "findReferences" | "hover" | "documentSymbol" | "workspaceSymbol" | "goToImplementation" | "prepareCallHierarchy" | "incomingCalls" | "outgoingCalls";
30
+ filePath: string;
31
+ line: number;
32
+ character: number;
33
+ }, string>;
34
+
35
+ export { type LspConfig, type LspServerConfig, createLsp, executeLspOperation, lsp };
@@ -0,0 +1,35 @@
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
+ cwd: string;
18
+ }
19
+ declare function executeLspOperation(serverConfig: LspServerConfig, params: LspRequest, timeoutMs: number): Promise<string>;
20
+ /** Creates an LSP tool that performs language server operations. */
21
+ declare function createLsp(config?: LspConfig): ai.Tool<{
22
+ operation: "goToDefinition" | "findReferences" | "hover" | "documentSymbol" | "workspaceSymbol" | "goToImplementation" | "prepareCallHierarchy" | "incomingCalls" | "outgoingCalls";
23
+ filePath: string;
24
+ line: number;
25
+ character: number;
26
+ }, string>;
27
+ /** Default LSP tool instance with no servers configured. */
28
+ declare const lsp: ai.Tool<{
29
+ operation: "goToDefinition" | "findReferences" | "hover" | "documentSymbol" | "workspaceSymbol" | "goToImplementation" | "prepareCallHierarchy" | "incomingCalls" | "outgoingCalls";
30
+ filePath: string;
31
+ line: number;
32
+ character: number;
33
+ }, string>;
34
+
35
+ export { type LspConfig, type LspServerConfig, createLsp, executeLspOperation, lsp };
@@ -0,0 +1,10 @@
1
+ import {
2
+ createLsp,
3
+ executeLspOperation,
4
+ lsp
5
+ } from "../chunk-XAQGZ374.js";
6
+ export {
7
+ createLsp,
8
+ executeLspOperation,
9
+ lsp
10
+ };
@@ -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;
@@ -0,0 +1,63 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.cjs';
3
+
4
+ /**
5
+ * Configuration for the memory tool.
6
+ * Extends {@link BaseToolConfig} with an optional memory directory path.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import type { MemoryConfig } from 'agentool/memory';
11
+ * const config: MemoryConfig = { memoryDir: '/my/project/.agentool/memory' };
12
+ * ```
13
+ */
14
+ interface MemoryConfig extends BaseToolConfig {
15
+ /** Directory for memory files. Defaults to `<cwd>/.agentool/memory`. */
16
+ memoryDir?: string;
17
+ }
18
+ /**
19
+ * Creates a memory tool that provides file-based key-value storage.
20
+ *
21
+ * Memory entries are stored as individual `.md` files inside the configured
22
+ * memory directory. Keys are sanitized to prevent path traversal.
23
+ * Execute never throws; errors are returned as descriptive strings.
24
+ *
25
+ * @param config - Optional configuration for cwd and memory directory.
26
+ * @returns A Vercel AI SDK tool with `description`, `parameters`, and `execute`.
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * import { createMemory } from 'agentool/memory';
31
+ *
32
+ * const memTool = createMemory({ cwd: '/my/project' });
33
+ * const result = await memTool.execute(
34
+ * { action: 'write', key: 'notes', content: 'Hello' },
35
+ * { toolCallId: 'id', messages: [] },
36
+ * );
37
+ * ```
38
+ */
39
+ declare function createMemory(config?: MemoryConfig): ai.Tool<{
40
+ action: "read" | "write" | "list" | "delete";
41
+ content?: string | undefined;
42
+ key?: string | undefined;
43
+ }, string>;
44
+ /**
45
+ * Default memory tool instance using `.agentool/memory` under the current
46
+ * working directory.
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * import { memory } from 'agentool/memory';
51
+ * const result = await memory.execute(
52
+ * { action: 'list' },
53
+ * { toolCallId: 'id', messages: [] },
54
+ * );
55
+ * ```
56
+ */
57
+ declare const memory: ai.Tool<{
58
+ action: "read" | "write" | "list" | "delete";
59
+ content?: string | undefined;
60
+ key?: string | undefined;
61
+ }, string>;
62
+
63
+ export { type MemoryConfig, createMemory, memory };
@@ -0,0 +1,63 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.js';
3
+
4
+ /**
5
+ * Configuration for the memory tool.
6
+ * Extends {@link BaseToolConfig} with an optional memory directory path.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import type { MemoryConfig } from 'agentool/memory';
11
+ * const config: MemoryConfig = { memoryDir: '/my/project/.agentool/memory' };
12
+ * ```
13
+ */
14
+ interface MemoryConfig extends BaseToolConfig {
15
+ /** Directory for memory files. Defaults to `<cwd>/.agentool/memory`. */
16
+ memoryDir?: string;
17
+ }
18
+ /**
19
+ * Creates a memory tool that provides file-based key-value storage.
20
+ *
21
+ * Memory entries are stored as individual `.md` files inside the configured
22
+ * memory directory. Keys are sanitized to prevent path traversal.
23
+ * Execute never throws; errors are returned as descriptive strings.
24
+ *
25
+ * @param config - Optional configuration for cwd and memory directory.
26
+ * @returns A Vercel AI SDK tool with `description`, `parameters`, and `execute`.
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * import { createMemory } from 'agentool/memory';
31
+ *
32
+ * const memTool = createMemory({ cwd: '/my/project' });
33
+ * const result = await memTool.execute(
34
+ * { action: 'write', key: 'notes', content: 'Hello' },
35
+ * { toolCallId: 'id', messages: [] },
36
+ * );
37
+ * ```
38
+ */
39
+ declare function createMemory(config?: MemoryConfig): ai.Tool<{
40
+ action: "read" | "write" | "list" | "delete";
41
+ content?: string | undefined;
42
+ key?: string | undefined;
43
+ }, string>;
44
+ /**
45
+ * Default memory tool instance using `.agentool/memory` under the current
46
+ * working directory.
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * import { memory } from 'agentool/memory';
51
+ * const result = await memory.execute(
52
+ * { action: 'list' },
53
+ * { toolCallId: 'id', messages: [] },
54
+ * );
55
+ * ```
56
+ */
57
+ declare const memory: ai.Tool<{
58
+ action: "read" | "write" | "list" | "delete";
59
+ content?: string | undefined;
60
+ key?: string | undefined;
61
+ }, string>;
62
+
63
+ export { type MemoryConfig, createMemory, memory };
@@ -0,0 +1,9 @@
1
+ import {
2
+ createMemory,
3
+ memory
4
+ } from "../chunk-VLNDEVKS.js";
5
+ import "../chunk-I3ONDY7P.js";
6
+ export {
7
+ createMemory,
8
+ memory
9
+ };