agentool 1.1.0 → 1.1.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.
- package/dist/ask-user/index.cjs +5 -2
- package/dist/ask-user/index.d.cts +10 -1
- package/dist/ask-user/index.d.ts +10 -1
- package/dist/ask-user/index.js +5 -2
- package/dist/bash/index.cjs +5 -2
- package/dist/bash/index.d.cts +14 -1
- package/dist/bash/index.d.ts +14 -1
- package/dist/bash/index.js +5 -2
- package/dist/{chunk-IEX4NOVN.cjs → chunk-2JBLVFB7.cjs} +30 -4
- package/dist/{chunk-K77GC2QI.js → chunk-2JF3ZF2J.js} +32 -2
- package/dist/{chunk-UDIG7332.js → chunk-2WSZCOJP.js} +40 -4
- package/dist/chunk-3FT4ZPB2.cjs +65 -0
- package/dist/{chunk-VLNDEVKS.js → chunk-3LGXZLBH.js} +46 -8
- package/dist/{chunk-G3ITTPGX.js → chunk-4MXDQEPA.js} +12 -1
- package/dist/{chunk-CGTPF6IS.js → chunk-4UUSERSH.js} +31 -7
- package/dist/{chunk-I6KFFQPV.cjs → chunk-5T3SQYI4.cjs} +34 -4
- package/dist/chunk-6ULQG2W2.cjs +99 -0
- package/dist/chunk-ABXTBB2N.cjs +67 -0
- package/dist/{chunk-CAEVLIQB.cjs → chunk-BIAODQ2P.cjs} +17 -1
- package/dist/chunk-CJA76MKM.js +59 -0
- package/dist/chunk-CM3VRCNX.cjs +59 -0
- package/dist/{chunk-SUSAPI5W.cjs → chunk-CXBWF5ON.cjs} +51 -4
- package/dist/{chunk-5O55DKOB.cjs → chunk-G6ZVJA4V.cjs} +30 -4
- package/dist/{chunk-P6Z5XFDS.js → chunk-GPHCXS2S.js} +41 -15
- package/dist/chunk-HG5T47NA.cjs +77 -0
- package/dist/chunk-HO4NIRU5.js +65 -0
- package/dist/{chunk-HZAQRHBT.js → chunk-IBC4QCGR.js} +27 -2
- package/dist/chunk-JYTOARJV.cjs +69 -0
- package/dist/chunk-KONXT2SF.cjs +8 -0
- package/dist/chunk-KUFZFNPT.cjs +61 -0
- package/dist/chunk-L7R4UZSK.js +61 -0
- package/dist/{chunk-FV2R5FFQ.cjs → chunk-LNAR3NJQ.cjs} +47 -9
- package/dist/chunk-M74OQYNK.js +69 -0
- package/dist/{chunk-5TDZF4IM.cjs → chunk-NQIV6LBH.cjs} +42 -6
- package/dist/chunk-NTGDU5X3.js +67 -0
- package/dist/{chunk-ONBH74ZV.cjs → chunk-OYLTQJXT.cjs} +32 -8
- package/dist/{chunk-6PQLFDGT.js → chunk-PWBVB6MN.js} +17 -1
- package/dist/{chunk-HNP7JDQC.cjs → chunk-RIGL3JTS.cjs} +41 -5
- package/dist/chunk-SFDZRLSX.cjs +91 -0
- package/dist/{chunk-ZFQZWXOI.cjs → chunk-T6STO7PS.cjs} +58 -7
- package/dist/{chunk-LPV5CN2K.js → chunk-TI4ZZ3IJ.js} +32 -2
- package/dist/{chunk-S7IVHOA6.js → chunk-TM5L4HA5.js} +54 -3
- package/dist/{chunk-4YI2H55A.js → chunk-TXZ3BMMR.js} +49 -2
- package/dist/{chunk-IRRNYFI5.js → chunk-UCA6LURO.js} +28 -2
- package/dist/{chunk-EA3YV7ZG.js → chunk-VE4U27HI.js} +35 -15
- package/dist/{chunk-E6NBEYZD.js → chunk-VHLY7LQE.js} +7 -5
- package/dist/{chunk-FW3UJ622.cjs → chunk-VPRUYL4T.cjs} +34 -4
- package/dist/{chunk-3VO6NETR.cjs → chunk-VPV6WG5V.cjs} +41 -21
- package/dist/{chunk-L5JH4I77.cjs → chunk-VQSWMGG7.cjs} +8 -6
- package/dist/{chunk-4HIATLKI.js → chunk-VZRXTFS4.js} +28 -2
- package/dist/chunk-WCR62UZ3.js +67 -0
- package/dist/chunk-X6ZY2KFU.js +8 -0
- package/dist/chunk-XGDE7S2D.cjs +67 -0
- package/dist/chunk-XPTW45XY.js +77 -0
- package/dist/{chunk-YPPPGGLA.cjs → chunk-YCWJVQYO.cjs} +28 -3
- package/dist/chunk-YGXLT6SS.js +91 -0
- package/dist/{chunk-5NW4OGRI.cjs → chunk-YTPZHJDC.cjs} +12 -1
- package/dist/{chunk-XAQGZ374.js → chunk-ZHVRP3EH.js} +40 -4
- package/dist/context-compaction/index.cjs +5 -2
- package/dist/context-compaction/index.d.cts +11 -1
- package/dist/context-compaction/index.d.ts +11 -1
- package/dist/context-compaction/index.js +5 -2
- package/dist/diff/index.cjs +6 -2
- package/dist/diff/index.d.cts +12 -2
- package/dist/diff/index.d.ts +12 -2
- package/dist/diff/index.js +7 -3
- package/dist/edit/index.cjs +7 -3
- package/dist/edit/index.d.cts +13 -3
- package/dist/edit/index.d.ts +13 -3
- package/dist/edit/index.js +8 -4
- package/dist/glob/index.cjs +5 -2
- package/dist/glob/index.d.cts +13 -3
- package/dist/glob/index.d.ts +13 -3
- package/dist/glob/index.js +5 -2
- package/dist/grep/index.cjs +6 -2
- package/dist/grep/index.d.cts +13 -3
- package/dist/grep/index.d.ts +13 -3
- package/dist/grep/index.js +6 -2
- package/dist/http-request/index.cjs +5 -2
- package/dist/http-request/index.d.cts +11 -1
- package/dist/http-request/index.d.ts +11 -1
- package/dist/http-request/index.js +5 -2
- package/dist/index.cjs +68 -25
- package/dist/index.d.cts +21 -21
- package/dist/index.d.ts +21 -21
- package/dist/index.js +73 -30
- package/dist/lsp/index.cjs +6 -2
- package/dist/lsp/index.d.cts +10 -1
- package/dist/lsp/index.d.ts +10 -1
- package/dist/lsp/index.js +6 -2
- package/dist/memory/index.cjs +6 -2
- package/dist/memory/index.d.cts +10 -1
- package/dist/memory/index.d.ts +10 -1
- package/dist/memory/index.js +6 -2
- package/dist/multi-edit/index.cjs +7 -4
- package/dist/multi-edit/index.d.cts +12 -2
- package/dist/multi-edit/index.d.ts +12 -2
- package/dist/multi-edit/index.js +7 -4
- package/dist/read/index.cjs +6 -3
- package/dist/read/index.d.cts +11 -1
- package/dist/read/index.d.ts +11 -1
- package/dist/read/index.js +6 -3
- package/dist/sleep/index.cjs +5 -2
- package/dist/sleep/index.d.cts +11 -1
- package/dist/sleep/index.d.ts +11 -1
- package/dist/sleep/index.js +5 -2
- package/dist/task-create/index.cjs +7 -3
- package/dist/task-create/index.d.cts +10 -1
- package/dist/task-create/index.d.ts +10 -1
- package/dist/task-create/index.js +7 -3
- package/dist/task-get/index.cjs +7 -3
- package/dist/task-get/index.d.cts +10 -1
- package/dist/task-get/index.d.ts +10 -1
- package/dist/task-get/index.js +7 -3
- package/dist/task-list/index.cjs +7 -3
- package/dist/task-list/index.d.cts +10 -1
- package/dist/task-list/index.d.ts +10 -1
- package/dist/task-list/index.js +7 -3
- package/dist/task-update/index.cjs +7 -3
- package/dist/task-update/index.d.cts +12 -3
- package/dist/task-update/index.d.ts +12 -3
- package/dist/task-update/index.js +7 -3
- package/dist/tool-search/index.cjs +5 -2
- package/dist/tool-search/index.d.cts +10 -1
- package/dist/tool-search/index.d.ts +10 -1
- package/dist/tool-search/index.js +5 -2
- package/dist/web-fetch/index.cjs +5 -2
- package/dist/web-fetch/index.d.cts +11 -1
- package/dist/web-fetch/index.d.ts +11 -1
- package/dist/web-fetch/index.js +5 -2
- package/dist/web-search/index.cjs +5 -2
- package/dist/web-search/index.d.cts +10 -1
- package/dist/web-search/index.d.ts +10 -1
- package/dist/web-search/index.js +5 -2
- package/dist/write/index.cjs +6 -3
- package/dist/write/index.d.cts +13 -3
- package/dist/write/index.d.ts +13 -3
- package/dist/write/index.js +6 -3
- package/package.json +1 -1
- package/dist/chunk-3EPGFWZV.cjs +0 -30
- package/dist/chunk-44AFQ2B7.js +0 -30
- package/dist/chunk-4HXAKPQH.cjs +0 -36
- package/dist/chunk-56CL4JCW.cjs +0 -53
- package/dist/chunk-6DJSWTWQ.cjs +0 -40
- package/dist/chunk-ACGW44YT.js +0 -47
- package/dist/chunk-ECYT46FP.js +0 -40
- package/dist/chunk-HDKXSKMO.js +0 -30
- package/dist/chunk-HNUL2CID.cjs +0 -34
- package/dist/chunk-LK6SQH2G.cjs +0 -30
- package/dist/chunk-LTE5NG4D.js +0 -53
- package/dist/chunk-MF7CJVIZ.js +0 -40
- package/dist/chunk-OM2UFTGS.cjs +0 -47
- package/dist/chunk-OXLQ7QVL.cjs +0 -40
- package/dist/chunk-TMW3XKKJ.js +0 -34
- package/dist/chunk-VXZ4RKJI.js +0 -36
- package/dist/chunk-ZBLQV6UO.cjs +0 -73
package/dist/chunk-TMW3XKKJ.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
formatTaskSummary,
|
|
3
|
-
loadTasks
|
|
4
|
-
} from "./chunk-E6NBEYZD.js";
|
|
5
|
-
|
|
6
|
-
// src/task-list/index.ts
|
|
7
|
-
import { tool } from "ai";
|
|
8
|
-
import { z } from "zod";
|
|
9
|
-
import { join } from "path";
|
|
10
|
-
function createTaskList(config = {}) {
|
|
11
|
-
const cwd = config.cwd ?? process.cwd();
|
|
12
|
-
const tasksFile = config.tasksFile ?? join(cwd, ".agentool", "tasks.json");
|
|
13
|
-
return tool({
|
|
14
|
-
description: "List all tasks with their status, owner, and dependencies.",
|
|
15
|
-
inputSchema: z.object({}),
|
|
16
|
-
execute: async () => {
|
|
17
|
-
try {
|
|
18
|
-
const tasks = await loadTasks(tasksFile);
|
|
19
|
-
const visible = tasks.filter((t) => t.status !== "deleted");
|
|
20
|
-
if (visible.length === 0) return "No tasks found.";
|
|
21
|
-
return visible.map(formatTaskSummary).join("\n");
|
|
22
|
-
} catch (error) {
|
|
23
|
-
const msg = error instanceof Error ? error.message : String(error);
|
|
24
|
-
return `Error [task-list]: ${msg}`;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
var taskList = createTaskList();
|
|
30
|
-
|
|
31
|
-
export {
|
|
32
|
-
createTaskList,
|
|
33
|
-
taskList
|
|
34
|
-
};
|
package/dist/chunk-VXZ4RKJI.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
formatTask,
|
|
3
|
-
loadTasks
|
|
4
|
-
} from "./chunk-E6NBEYZD.js";
|
|
5
|
-
|
|
6
|
-
// src/task-get/index.ts
|
|
7
|
-
import { tool } from "ai";
|
|
8
|
-
import { z } from "zod";
|
|
9
|
-
import { join } from "path";
|
|
10
|
-
function createTaskGet(config = {}) {
|
|
11
|
-
const cwd = config.cwd ?? process.cwd();
|
|
12
|
-
const tasksFile = config.tasksFile ?? join(cwd, ".agentool", "tasks.json");
|
|
13
|
-
return tool({
|
|
14
|
-
description: "Retrieve a task by its ID to see full details.",
|
|
15
|
-
inputSchema: z.object({
|
|
16
|
-
taskId: z.string().describe("The ID of the task to retrieve")
|
|
17
|
-
}),
|
|
18
|
-
execute: async ({ taskId }) => {
|
|
19
|
-
try {
|
|
20
|
-
const tasks = await loadTasks(tasksFile);
|
|
21
|
-
const found = tasks.find((t) => t.id === taskId);
|
|
22
|
-
if (!found) return `Error [task-get]: Task "${taskId}" not found.`;
|
|
23
|
-
return formatTask(found);
|
|
24
|
-
} catch (error) {
|
|
25
|
-
const msg = error instanceof Error ? error.message : String(error);
|
|
26
|
-
return `Error [task-get]: ${msg}`;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
var taskGet = createTaskGet();
|
|
32
|
-
|
|
33
|
-
export {
|
|
34
|
-
createTaskGet,
|
|
35
|
-
taskGet
|
|
36
|
-
};
|
package/dist/chunk-ZBLQV6UO.cjs
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _chunk5NW4OGRIcjs = require('./chunk-5NW4OGRI.cjs');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _chunkQZ5GS6HWcjs = require('./chunk-QZ5GS6HW.cjs');
|
|
9
|
-
|
|
10
|
-
// src/edit/index.ts
|
|
11
|
-
var _promises = require('fs/promises');
|
|
12
|
-
var _ai = require('ai');
|
|
13
|
-
var _zod = require('zod');
|
|
14
|
-
function createEdit(config = {}) {
|
|
15
|
-
return _ai.tool.call(void 0, {
|
|
16
|
-
description: "Perform an exact string replacement in a file. Locates old_string in the file and replaces it with new_string. Supports curly-quote fallback matching. When replace_all is false (default), old_string must appear exactly once.",
|
|
17
|
-
inputSchema: _zod.z.object({
|
|
18
|
-
file_path: _zod.z.string().describe("The absolute path to the file to modify"),
|
|
19
|
-
old_string: _zod.z.string().describe("The exact string to find and replace"),
|
|
20
|
-
new_string: _zod.z.string().describe("The replacement string"),
|
|
21
|
-
replace_all: _zod.z.boolean().default(false).optional().describe("Replace all occurrences (default: false)")
|
|
22
|
-
}),
|
|
23
|
-
execute: async ({ file_path, old_string, new_string, replace_all }) => {
|
|
24
|
-
try {
|
|
25
|
-
const resolved = _chunkQZ5GS6HWcjs.expandPath.call(void 0, file_path, config.cwd);
|
|
26
|
-
let content;
|
|
27
|
-
try {
|
|
28
|
-
content = await _promises.readFile.call(void 0, resolved, "utf-8");
|
|
29
|
-
} catch (err) {
|
|
30
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
31
|
-
return `Error [edit]: Cannot read file "${resolved}": ${msg}`;
|
|
32
|
-
}
|
|
33
|
-
if (old_string === new_string) {
|
|
34
|
-
return "Error [edit]: old_string and new_string are identical \u2014 nothing to change.";
|
|
35
|
-
}
|
|
36
|
-
const actualOld = _chunk5NW4OGRIcjs.findActualString.call(void 0, content, old_string);
|
|
37
|
-
if (actualOld === null) {
|
|
38
|
-
const preview = content.slice(0, 200);
|
|
39
|
-
return `Error [edit]: old_string not found in "${resolved}". File starts with:
|
|
40
|
-
${preview}`;
|
|
41
|
-
}
|
|
42
|
-
if (!replace_all) {
|
|
43
|
-
let count = 0;
|
|
44
|
-
let pos = 0;
|
|
45
|
-
while (pos < content.length) {
|
|
46
|
-
const idx = content.indexOf(actualOld, pos);
|
|
47
|
-
if (idx === -1) break;
|
|
48
|
-
count++;
|
|
49
|
-
pos = idx + 1;
|
|
50
|
-
}
|
|
51
|
-
if (count > 1) {
|
|
52
|
-
return `Error [edit]: old_string appears ${count} times in "${resolved}". Use replace_all to replace every occurrence, or provide a more specific string.`;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const styledNew = _chunk5NW4OGRIcjs.preserveQuoteStyle.call(void 0, old_string, actualOld, new_string);
|
|
56
|
-
const updated = _chunk5NW4OGRIcjs.applyEditToFile.call(void 0, content, actualOld, styledNew, replace_all);
|
|
57
|
-
await _promises.writeFile.call(void 0, resolved, updated, "utf-8");
|
|
58
|
-
const snippet = styledNew.length > 0 ? styledNew.slice(0, 200) : "(deletion)";
|
|
59
|
-
return `Successfully edited "${resolved}". Replacement snippet:
|
|
60
|
-
${snippet}`;
|
|
61
|
-
} catch (error) {
|
|
62
|
-
const msg = error instanceof Error ? error.message : String(error);
|
|
63
|
-
return `Error [edit]: ${msg}`;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
var edit = createEdit();
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
exports.createEdit = createEdit; exports.edit = edit;
|