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,11 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunk3VO6NETRcjs = require('../chunk-3VO6NETR.cjs');
5
+ require('../chunk-5NW4OGRI.cjs');
6
+ require('../chunk-CAEVLIQB.cjs');
7
+ require('../chunk-QZ5GS6HW.cjs');
8
+
9
+
10
+
11
+ exports.createMultiEdit = _chunk3VO6NETRcjs.createMultiEdit; exports.multiEdit = _chunk3VO6NETRcjs.multiEdit;
@@ -0,0 +1,72 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.cjs';
3
+
4
+ /**
5
+ * Configuration for the multi-edit tool.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import type { MultiEditConfig } from 'agentool/multi-edit';
10
+ * const config: MultiEditConfig = { cwd: '/my/project' };
11
+ * ```
12
+ */
13
+ type MultiEditConfig = BaseToolConfig;
14
+ /**
15
+ * Creates a multi-edit tool that atomically applies multiple string
16
+ * replacements to a single file.
17
+ *
18
+ * All edits are validated and applied in memory first. The file is only
19
+ * written when every edit succeeds. If any edit fails (not found or
20
+ * non-unique), the file is left unchanged and an error is returned.
21
+ *
22
+ * @param config - Optional configuration for the working directory.
23
+ * @returns A Vercel AI SDK tool with `description`, `parameters`, and `execute`.
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * import { createMultiEdit } from 'agentool/multi-edit';
28
+ *
29
+ * const multiEditTool = createMultiEdit({ cwd: '/my/project' });
30
+ * const result = await multiEditTool.execute(
31
+ * {
32
+ * file_path: 'src/index.ts',
33
+ * edits: [
34
+ * { old_string: 'foo', new_string: 'bar' },
35
+ * { old_string: 'baz', new_string: 'qux' },
36
+ * ],
37
+ * },
38
+ * { toolCallId: 'id', messages: [] },
39
+ * );
40
+ * ```
41
+ */
42
+ declare function createMultiEdit(config?: MultiEditConfig): ai.Tool<{
43
+ file_path: string;
44
+ edits: {
45
+ old_string: string;
46
+ new_string: string;
47
+ }[];
48
+ }, string>;
49
+ /**
50
+ * Default multi-edit tool instance using the current working directory.
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * import { multiEdit } from 'agentool/multi-edit';
55
+ * const result = await multiEdit.execute(
56
+ * {
57
+ * file_path: 'file.txt',
58
+ * edits: [{ old_string: 'a', new_string: 'b' }],
59
+ * },
60
+ * { toolCallId: 'id', messages: [] },
61
+ * );
62
+ * ```
63
+ */
64
+ declare const multiEdit: ai.Tool<{
65
+ file_path: string;
66
+ edits: {
67
+ old_string: string;
68
+ new_string: string;
69
+ }[];
70
+ }, string>;
71
+
72
+ export { type MultiEditConfig, createMultiEdit, multiEdit };
@@ -0,0 +1,72 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.js';
3
+
4
+ /**
5
+ * Configuration for the multi-edit tool.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import type { MultiEditConfig } from 'agentool/multi-edit';
10
+ * const config: MultiEditConfig = { cwd: '/my/project' };
11
+ * ```
12
+ */
13
+ type MultiEditConfig = BaseToolConfig;
14
+ /**
15
+ * Creates a multi-edit tool that atomically applies multiple string
16
+ * replacements to a single file.
17
+ *
18
+ * All edits are validated and applied in memory first. The file is only
19
+ * written when every edit succeeds. If any edit fails (not found or
20
+ * non-unique), the file is left unchanged and an error is returned.
21
+ *
22
+ * @param config - Optional configuration for the working directory.
23
+ * @returns A Vercel AI SDK tool with `description`, `parameters`, and `execute`.
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * import { createMultiEdit } from 'agentool/multi-edit';
28
+ *
29
+ * const multiEditTool = createMultiEdit({ cwd: '/my/project' });
30
+ * const result = await multiEditTool.execute(
31
+ * {
32
+ * file_path: 'src/index.ts',
33
+ * edits: [
34
+ * { old_string: 'foo', new_string: 'bar' },
35
+ * { old_string: 'baz', new_string: 'qux' },
36
+ * ],
37
+ * },
38
+ * { toolCallId: 'id', messages: [] },
39
+ * );
40
+ * ```
41
+ */
42
+ declare function createMultiEdit(config?: MultiEditConfig): ai.Tool<{
43
+ file_path: string;
44
+ edits: {
45
+ old_string: string;
46
+ new_string: string;
47
+ }[];
48
+ }, string>;
49
+ /**
50
+ * Default multi-edit tool instance using the current working directory.
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * import { multiEdit } from 'agentool/multi-edit';
55
+ * const result = await multiEdit.execute(
56
+ * {
57
+ * file_path: 'file.txt',
58
+ * edits: [{ old_string: 'a', new_string: 'b' }],
59
+ * },
60
+ * { toolCallId: 'id', messages: [] },
61
+ * );
62
+ * ```
63
+ */
64
+ declare const multiEdit: ai.Tool<{
65
+ file_path: string;
66
+ edits: {
67
+ old_string: string;
68
+ new_string: string;
69
+ }[];
70
+ }, string>;
71
+
72
+ export { type MultiEditConfig, createMultiEdit, multiEdit };
@@ -0,0 +1,11 @@
1
+ import {
2
+ createMultiEdit,
3
+ multiEdit
4
+ } from "../chunk-EA3YV7ZG.js";
5
+ import "../chunk-G3ITTPGX.js";
6
+ import "../chunk-6PQLFDGT.js";
7
+ import "../chunk-I3ONDY7P.js";
8
+ export {
9
+ createMultiEdit,
10
+ multiEdit
11
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkOM2UFTGScjs = require('../chunk-OM2UFTGS.cjs');
5
+ require('../chunk-CAEVLIQB.cjs');
6
+ require('../chunk-QZ5GS6HW.cjs');
7
+
8
+
9
+
10
+ exports.createRead = _chunkOM2UFTGScjs.createRead; exports.read = _chunkOM2UFTGScjs.read;
@@ -0,0 +1,67 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.cjs';
3
+
4
+ /**
5
+ * Configuration for the read tool.
6
+ * Extends {@link BaseToolConfig} with an optional maximum line count.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import type { ReadConfig } from 'agentool/read';
11
+ * const config: ReadConfig = { cwd: '/my/project', maxLines: 500 };
12
+ * ```
13
+ */
14
+ interface ReadConfig extends BaseToolConfig {
15
+ /**
16
+ * Maximum number of lines to return when no explicit limit is given.
17
+ * @default 2000
18
+ */
19
+ maxLines?: number;
20
+ }
21
+ /**
22
+ * Creates a read tool that reads file contents with line numbers.
23
+ *
24
+ * The tool resolves the given path (supporting `~` and relative paths),
25
+ * reads the requested range of lines, and returns the content with
26
+ * `cat -n` style line numbers. It never throws; errors are returned as
27
+ * descriptive strings.
28
+ *
29
+ * @param config - Optional configuration for cwd and max lines.
30
+ * @returns A Vercel AI SDK tool with `description`, `parameters`, and `execute`.
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * import { createRead } from 'agentool/read';
35
+ *
36
+ * const readTool = createRead({ cwd: '/my/project' });
37
+ * const result = await readTool.execute(
38
+ * { file_path: 'src/index.ts' },
39
+ * { toolCallId: 'id', messages: [] },
40
+ * );
41
+ * ```
42
+ */
43
+ declare function createRead(config?: ReadConfig): ai.Tool<{
44
+ file_path: string;
45
+ offset?: number | undefined;
46
+ limit?: number | undefined;
47
+ }, string>;
48
+ /**
49
+ * Default read tool instance using the current working directory
50
+ * and a 2000-line default limit.
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * import { read } from 'agentool/read';
55
+ * const result = await read.execute(
56
+ * { file_path: '/tmp/file.txt' },
57
+ * { toolCallId: 'id', messages: [] },
58
+ * );
59
+ * ```
60
+ */
61
+ declare const read: ai.Tool<{
62
+ file_path: string;
63
+ offset?: number | undefined;
64
+ limit?: number | undefined;
65
+ }, string>;
66
+
67
+ export { type ReadConfig, createRead, read };
@@ -0,0 +1,67 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.js';
3
+
4
+ /**
5
+ * Configuration for the read tool.
6
+ * Extends {@link BaseToolConfig} with an optional maximum line count.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import type { ReadConfig } from 'agentool/read';
11
+ * const config: ReadConfig = { cwd: '/my/project', maxLines: 500 };
12
+ * ```
13
+ */
14
+ interface ReadConfig extends BaseToolConfig {
15
+ /**
16
+ * Maximum number of lines to return when no explicit limit is given.
17
+ * @default 2000
18
+ */
19
+ maxLines?: number;
20
+ }
21
+ /**
22
+ * Creates a read tool that reads file contents with line numbers.
23
+ *
24
+ * The tool resolves the given path (supporting `~` and relative paths),
25
+ * reads the requested range of lines, and returns the content with
26
+ * `cat -n` style line numbers. It never throws; errors are returned as
27
+ * descriptive strings.
28
+ *
29
+ * @param config - Optional configuration for cwd and max lines.
30
+ * @returns A Vercel AI SDK tool with `description`, `parameters`, and `execute`.
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * import { createRead } from 'agentool/read';
35
+ *
36
+ * const readTool = createRead({ cwd: '/my/project' });
37
+ * const result = await readTool.execute(
38
+ * { file_path: 'src/index.ts' },
39
+ * { toolCallId: 'id', messages: [] },
40
+ * );
41
+ * ```
42
+ */
43
+ declare function createRead(config?: ReadConfig): ai.Tool<{
44
+ file_path: string;
45
+ offset?: number | undefined;
46
+ limit?: number | undefined;
47
+ }, string>;
48
+ /**
49
+ * Default read tool instance using the current working directory
50
+ * and a 2000-line default limit.
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * import { read } from 'agentool/read';
55
+ * const result = await read.execute(
56
+ * { file_path: '/tmp/file.txt' },
57
+ * { toolCallId: 'id', messages: [] },
58
+ * );
59
+ * ```
60
+ */
61
+ declare const read: ai.Tool<{
62
+ file_path: string;
63
+ offset?: number | undefined;
64
+ limit?: number | undefined;
65
+ }, string>;
66
+
67
+ export { type ReadConfig, createRead, read };
@@ -0,0 +1,10 @@
1
+ import {
2
+ createRead,
3
+ read
4
+ } from "../chunk-ACGW44YT.js";
5
+ import "../chunk-6PQLFDGT.js";
6
+ import "../chunk-I3ONDY7P.js";
7
+ export {
8
+ createRead,
9
+ read
10
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkOXLQ7QVLcjs = require('../chunk-OXLQ7QVL.cjs');
5
+
6
+
7
+
8
+ exports.createSleep = _chunkOXLQ7QVLcjs.createSleep; exports.sleep = _chunkOXLQ7QVLcjs.sleep;
@@ -0,0 +1,60 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.cjs';
3
+
4
+ /**
5
+ * Configuration for the sleep tool.
6
+ * Extends {@link BaseToolConfig} with an optional maximum duration cap.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import type { SleepConfig } from 'agentool/sleep';
11
+ * const config: SleepConfig = { maxDuration: 60000 };
12
+ * ```
13
+ */
14
+ interface SleepConfig extends BaseToolConfig {
15
+ /**
16
+ * Maximum allowed sleep duration in milliseconds.
17
+ * Requested durations exceeding this value are clamped.
18
+ * @default 300000 (5 minutes)
19
+ */
20
+ maxDuration?: number;
21
+ }
22
+ /**
23
+ * Creates a sleep tool that pauses execution for a specified duration.
24
+ *
25
+ * The tool clamps the requested duration to `[0, maxDuration]` and reports
26
+ * the actual elapsed time. It never throws; errors are returned as strings.
27
+ *
28
+ * @param config - Optional configuration with a custom max duration.
29
+ * @returns A Vercel AI SDK tool with `description`, `parameters`, and `execute`.
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * import { createSleep } from 'agentool/sleep';
34
+ *
35
+ * // Default max of 300 000 ms
36
+ * const sleepTool = createSleep();
37
+ *
38
+ * // Custom max of 10 seconds
39
+ * const shortSleep = createSleep({ maxDuration: 10000 });
40
+ * ```
41
+ */
42
+ declare function createSleep(config?: SleepConfig): ai.Tool<{
43
+ durationMs: number;
44
+ reason?: string | undefined;
45
+ }, string>;
46
+ /**
47
+ * Default sleep tool instance with a 300 000 ms (5-minute) maximum duration.
48
+ *
49
+ * @example
50
+ * ```typescript
51
+ * import { sleep } from 'agentool/sleep';
52
+ * const result = await sleep.execute({ durationMs: 1000, reason: 'rate limit' });
53
+ * ```
54
+ */
55
+ declare const sleep: ai.Tool<{
56
+ durationMs: number;
57
+ reason?: string | undefined;
58
+ }, string>;
59
+
60
+ export { type SleepConfig, createSleep, sleep };
@@ -0,0 +1,60 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.js';
3
+
4
+ /**
5
+ * Configuration for the sleep tool.
6
+ * Extends {@link BaseToolConfig} with an optional maximum duration cap.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import type { SleepConfig } from 'agentool/sleep';
11
+ * const config: SleepConfig = { maxDuration: 60000 };
12
+ * ```
13
+ */
14
+ interface SleepConfig extends BaseToolConfig {
15
+ /**
16
+ * Maximum allowed sleep duration in milliseconds.
17
+ * Requested durations exceeding this value are clamped.
18
+ * @default 300000 (5 minutes)
19
+ */
20
+ maxDuration?: number;
21
+ }
22
+ /**
23
+ * Creates a sleep tool that pauses execution for a specified duration.
24
+ *
25
+ * The tool clamps the requested duration to `[0, maxDuration]` and reports
26
+ * the actual elapsed time. It never throws; errors are returned as strings.
27
+ *
28
+ * @param config - Optional configuration with a custom max duration.
29
+ * @returns A Vercel AI SDK tool with `description`, `parameters`, and `execute`.
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * import { createSleep } from 'agentool/sleep';
34
+ *
35
+ * // Default max of 300 000 ms
36
+ * const sleepTool = createSleep();
37
+ *
38
+ * // Custom max of 10 seconds
39
+ * const shortSleep = createSleep({ maxDuration: 10000 });
40
+ * ```
41
+ */
42
+ declare function createSleep(config?: SleepConfig): ai.Tool<{
43
+ durationMs: number;
44
+ reason?: string | undefined;
45
+ }, string>;
46
+ /**
47
+ * Default sleep tool instance with a 300 000 ms (5-minute) maximum duration.
48
+ *
49
+ * @example
50
+ * ```typescript
51
+ * import { sleep } from 'agentool/sleep';
52
+ * const result = await sleep.execute({ durationMs: 1000, reason: 'rate limit' });
53
+ * ```
54
+ */
55
+ declare const sleep: ai.Tool<{
56
+ durationMs: number;
57
+ reason?: string | undefined;
58
+ }, string>;
59
+
60
+ export { type SleepConfig, createSleep, sleep };
@@ -0,0 +1,8 @@
1
+ import {
2
+ createSleep,
3
+ sleep
4
+ } from "../chunk-MF7CJVIZ.js";
5
+ export {
6
+ createSleep,
7
+ sleep
8
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunk56CL4JCWcjs = require('../chunk-56CL4JCW.cjs');
5
+ require('../chunk-L5JH4I77.cjs');
6
+
7
+
8
+
9
+ exports.createTaskCreate = _chunk56CL4JCWcjs.createTaskCreate; exports.taskCreate = _chunk56CL4JCWcjs.taskCreate;
@@ -0,0 +1,19 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.cjs';
3
+
4
+ interface TaskCreateConfig extends BaseToolConfig {
5
+ /** Path to the tasks JSON file. Defaults to `<cwd>/.agentool/tasks.json`. */
6
+ tasksFile?: string;
7
+ }
8
+ declare function createTaskCreate(config?: TaskCreateConfig): ai.Tool<{
9
+ description: string;
10
+ subject: string;
11
+ metadata?: Record<string, unknown> | undefined;
12
+ }, string>;
13
+ declare const taskCreate: ai.Tool<{
14
+ description: string;
15
+ subject: string;
16
+ metadata?: Record<string, unknown> | undefined;
17
+ }, string>;
18
+
19
+ export { type TaskCreateConfig, createTaskCreate, taskCreate };
@@ -0,0 +1,19 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.js';
3
+
4
+ interface TaskCreateConfig extends BaseToolConfig {
5
+ /** Path to the tasks JSON file. Defaults to `<cwd>/.agentool/tasks.json`. */
6
+ tasksFile?: string;
7
+ }
8
+ declare function createTaskCreate(config?: TaskCreateConfig): ai.Tool<{
9
+ description: string;
10
+ subject: string;
11
+ metadata?: Record<string, unknown> | undefined;
12
+ }, string>;
13
+ declare const taskCreate: ai.Tool<{
14
+ description: string;
15
+ subject: string;
16
+ metadata?: Record<string, unknown> | undefined;
17
+ }, string>;
18
+
19
+ export { type TaskCreateConfig, createTaskCreate, taskCreate };
@@ -0,0 +1,9 @@
1
+ import {
2
+ createTaskCreate,
3
+ taskCreate
4
+ } from "../chunk-LTE5NG4D.js";
5
+ import "../chunk-E6NBEYZD.js";
6
+ export {
7
+ createTaskCreate,
8
+ taskCreate
9
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunk4HXAKPQHcjs = require('../chunk-4HXAKPQH.cjs');
5
+ require('../chunk-L5JH4I77.cjs');
6
+
7
+
8
+
9
+ exports.createTaskGet = _chunk4HXAKPQHcjs.createTaskGet; exports.taskGet = _chunk4HXAKPQHcjs.taskGet;
@@ -0,0 +1,15 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.cjs';
3
+
4
+ interface TaskGetConfig extends BaseToolConfig {
5
+ /** Path to the tasks JSON file. Defaults to `<cwd>/.agentool/tasks.json`. */
6
+ tasksFile?: string;
7
+ }
8
+ declare function createTaskGet(config?: TaskGetConfig): ai.Tool<{
9
+ taskId: string;
10
+ }, string>;
11
+ declare const taskGet: ai.Tool<{
12
+ taskId: string;
13
+ }, string>;
14
+
15
+ export { type TaskGetConfig, createTaskGet, taskGet };
@@ -0,0 +1,15 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.js';
3
+
4
+ interface TaskGetConfig extends BaseToolConfig {
5
+ /** Path to the tasks JSON file. Defaults to `<cwd>/.agentool/tasks.json`. */
6
+ tasksFile?: string;
7
+ }
8
+ declare function createTaskGet(config?: TaskGetConfig): ai.Tool<{
9
+ taskId: string;
10
+ }, string>;
11
+ declare const taskGet: ai.Tool<{
12
+ taskId: string;
13
+ }, string>;
14
+
15
+ export { type TaskGetConfig, createTaskGet, taskGet };
@@ -0,0 +1,9 @@
1
+ import {
2
+ createTaskGet,
3
+ taskGet
4
+ } from "../chunk-VXZ4RKJI.js";
5
+ import "../chunk-E6NBEYZD.js";
6
+ export {
7
+ createTaskGet,
8
+ taskGet
9
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkHNUL2CIDcjs = require('../chunk-HNUL2CID.cjs');
5
+ require('../chunk-L5JH4I77.cjs');
6
+
7
+
8
+
9
+ exports.createTaskList = _chunkHNUL2CIDcjs.createTaskList; exports.taskList = _chunkHNUL2CIDcjs.taskList;
@@ -0,0 +1,11 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.cjs';
3
+
4
+ interface TaskListConfig extends BaseToolConfig {
5
+ /** Path to the tasks JSON file. Defaults to `<cwd>/.agentool/tasks.json`. */
6
+ tasksFile?: string;
7
+ }
8
+ declare function createTaskList(config?: TaskListConfig): ai.Tool<{}, string>;
9
+ declare const taskList: ai.Tool<{}, string>;
10
+
11
+ export { type TaskListConfig, createTaskList, taskList };
@@ -0,0 +1,11 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.js';
3
+
4
+ interface TaskListConfig extends BaseToolConfig {
5
+ /** Path to the tasks JSON file. Defaults to `<cwd>/.agentool/tasks.json`. */
6
+ tasksFile?: string;
7
+ }
8
+ declare function createTaskList(config?: TaskListConfig): ai.Tool<{}, string>;
9
+ declare const taskList: ai.Tool<{}, string>;
10
+
11
+ export { type TaskListConfig, createTaskList, taskList };
@@ -0,0 +1,9 @@
1
+ import {
2
+ createTaskList,
3
+ taskList
4
+ } from "../chunk-TMW3XKKJ.js";
5
+ import "../chunk-E6NBEYZD.js";
6
+ export {
7
+ createTaskList,
8
+ taskList
9
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkZFQZWXOIcjs = require('../chunk-ZFQZWXOI.cjs');
5
+ require('../chunk-L5JH4I77.cjs');
6
+
7
+
8
+
9
+ exports.createTaskUpdate = _chunkZFQZWXOIcjs.createTaskUpdate; exports.taskUpdate = _chunkZFQZWXOIcjs.taskUpdate;
@@ -0,0 +1,31 @@
1
+ import * as ai from 'ai';
2
+ import { B as BaseToolConfig } from '../types-3QPDuCXN.cjs';
3
+
4
+ interface TaskUpdateConfig extends BaseToolConfig {
5
+ /** Path to the tasks JSON file. Defaults to `<cwd>/.agentool/tasks.json`. */
6
+ tasksFile?: string;
7
+ }
8
+ declare function createTaskUpdate(config?: TaskUpdateConfig): ai.Tool<{
9
+ taskId: string;
10
+ status?: "pending" | "in_progress" | "completed" | "deleted" | undefined;
11
+ description?: string | undefined;
12
+ subject?: string | undefined;
13
+ metadata?: Record<string, unknown> | undefined;
14
+ owner?: string | undefined;
15
+ activeForm?: string | undefined;
16
+ addBlocks?: string[] | undefined;
17
+ addBlockedBy?: string[] | undefined;
18
+ }, string>;
19
+ declare const taskUpdate: ai.Tool<{
20
+ taskId: string;
21
+ status?: "pending" | "in_progress" | "completed" | "deleted" | undefined;
22
+ description?: string | undefined;
23
+ subject?: string | undefined;
24
+ metadata?: Record<string, unknown> | undefined;
25
+ owner?: string | undefined;
26
+ activeForm?: string | undefined;
27
+ addBlocks?: string[] | undefined;
28
+ addBlockedBy?: string[] | undefined;
29
+ }, string>;
30
+
31
+ export { type TaskUpdateConfig, createTaskUpdate, taskUpdate };