wave-agent-sdk 0.5.0 → 0.6.2
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/agent.d.ts +14 -11
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +64 -151
- package/dist/constants/subagents.d.ts +5 -0
- package/dist/constants/subagents.d.ts.map +1 -0
- package/dist/constants/subagents.js +4 -0
- package/dist/constants/tools.d.ts +4 -1
- package/dist/constants/tools.d.ts.map +1 -1
- package/dist/constants/tools.js +4 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/managers/aiManager.d.ts +2 -5
- package/dist/managers/aiManager.d.ts.map +1 -1
- package/dist/managers/aiManager.js +43 -48
- package/dist/managers/backgroundTaskManager.d.ts.map +1 -1
- package/dist/managers/backgroundTaskManager.js +63 -53
- package/dist/managers/foregroundTaskManager.d.ts.map +1 -1
- package/dist/managers/foregroundTaskManager.js +3 -2
- package/dist/managers/mcpManager.d.ts.map +1 -1
- package/dist/managers/messageManager.d.ts +13 -27
- package/dist/managers/messageManager.d.ts.map +1 -1
- package/dist/managers/messageManager.js +94 -89
- package/dist/managers/permissionManager.d.ts.map +1 -1
- package/dist/managers/permissionManager.js +25 -15
- package/dist/managers/planManager.d.ts +1 -1
- package/dist/managers/planManager.d.ts.map +1 -1
- package/dist/managers/planManager.js +2 -2
- package/dist/managers/reversionManager.d.ts.map +1 -1
- package/dist/managers/reversionManager.js +23 -2
- package/dist/managers/slashCommandManager.d.ts +3 -0
- package/dist/managers/slashCommandManager.d.ts.map +1 -1
- package/dist/managers/slashCommandManager.js +8 -3
- package/dist/managers/subagentManager.d.ts +8 -14
- package/dist/managers/subagentManager.d.ts.map +1 -1
- package/dist/managers/subagentManager.js +46 -112
- package/dist/managers/toolManager.d.ts +11 -0
- package/dist/managers/toolManager.d.ts.map +1 -1
- package/dist/managers/toolManager.js +20 -2
- package/dist/{constants/prompts.d.ts → prompts/index.d.ts} +17 -15
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +309 -0
- package/dist/services/aiService.d.ts +0 -1
- package/dist/services/aiService.d.ts.map +1 -1
- package/dist/services/aiService.js +4 -140
- package/dist/services/memory.d.ts +0 -3
- package/dist/services/memory.d.ts.map +1 -1
- package/dist/services/memory.js +0 -59
- package/dist/services/session.d.ts +15 -1
- package/dist/services/session.d.ts.map +1 -1
- package/dist/services/session.js +57 -1
- package/dist/services/taskManager.d.ts +25 -0
- package/dist/services/taskManager.d.ts.map +1 -0
- package/dist/services/taskManager.js +164 -0
- package/dist/tools/askUserQuestion.d.ts.map +1 -1
- package/dist/tools/askUserQuestion.js +39 -25
- package/dist/tools/bashTool.d.ts.map +1 -1
- package/dist/tools/bashTool.js +13 -11
- package/dist/tools/editTool.d.ts.map +1 -1
- package/dist/tools/editTool.js +2 -1
- package/dist/tools/exitPlanMode.d.ts.map +1 -1
- package/dist/tools/exitPlanMode.js +26 -2
- package/dist/tools/globTool.d.ts.map +1 -1
- package/dist/tools/globTool.js +8 -2
- package/dist/tools/grepTool.d.ts.map +1 -1
- package/dist/tools/grepTool.js +17 -6
- package/dist/tools/lsTool.d.ts.map +1 -1
- package/dist/tools/lsTool.js +3 -1
- package/dist/tools/readTool.d.ts.map +1 -1
- package/dist/tools/readTool.js +16 -1
- package/dist/tools/taskManagementTools.d.ts +6 -0
- package/dist/tools/taskManagementTools.d.ts.map +1 -0
- package/dist/tools/taskManagementTools.js +461 -0
- package/dist/tools/taskOutputTool.d.ts.map +1 -1
- package/dist/tools/taskOutputTool.js +32 -8
- package/dist/tools/taskStopTool.d.ts.map +1 -1
- package/dist/tools/taskStopTool.js +7 -1
- package/dist/tools/taskTool.d.ts.map +1 -1
- package/dist/tools/taskTool.js +37 -2
- package/dist/tools/types.d.ts +11 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/writeTool.d.ts.map +1 -1
- package/dist/tools/writeTool.js +9 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/messaging.d.ts +2 -18
- package/dist/types/messaging.d.ts.map +1 -1
- package/dist/types/processes.d.ts +16 -6
- package/dist/types/processes.d.ts.map +1 -1
- package/dist/types/tasks.d.ts +13 -0
- package/dist/types/tasks.d.ts.map +1 -0
- package/dist/types/tasks.js +1 -0
- package/dist/types/tools.d.ts +4 -1
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/builtinSubagents.d.ts.map +1 -1
- package/dist/utils/builtinSubagents.js +59 -44
- package/dist/utils/cacheControlUtils.d.ts.map +1 -1
- package/dist/utils/cacheControlUtils.js +18 -12
- package/dist/utils/constants.d.ts +0 -4
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +0 -4
- package/dist/utils/convertMessagesForAPI.js +2 -2
- package/dist/utils/editUtils.d.ts.map +1 -1
- package/dist/utils/editUtils.js +2 -2
- package/dist/utils/gitUtils.d.ts +7 -0
- package/dist/utils/gitUtils.d.ts.map +1 -0
- package/dist/utils/gitUtils.js +24 -0
- package/dist/utils/messageOperations.d.ts +3 -58
- package/dist/utils/messageOperations.d.ts.map +1 -1
- package/dist/utils/messageOperations.js +4 -146
- package/dist/utils/nameGenerator.d.ts +1 -1
- package/dist/utils/nameGenerator.d.ts.map +1 -1
- package/dist/utils/nameGenerator.js +19 -3
- package/package.json +1 -1
- package/src/agent.ts +86 -183
- package/src/constants/subagents.ts +4 -0
- package/src/constants/tools.ts +4 -1
- package/src/index.ts +1 -0
- package/src/managers/aiManager.ts +63 -70
- package/src/managers/backgroundTaskManager.ts +58 -54
- package/src/managers/foregroundTaskManager.ts +3 -2
- package/src/managers/mcpManager.ts +6 -3
- package/src/managers/messageManager.ts +126 -142
- package/src/managers/permissionManager.ts +32 -21
- package/src/managers/planManager.ts +2 -2
- package/src/managers/reversionManager.ts +26 -2
- package/src/managers/slashCommandManager.ts +12 -3
- package/src/managers/subagentManager.ts +60 -144
- package/src/managers/toolManager.ts +32 -2
- package/src/prompts/index.ts +366 -0
- package/src/services/aiService.ts +3 -145
- package/src/services/memory.ts +0 -72
- package/src/services/session.ts +73 -0
- package/src/services/taskManager.ts +195 -0
- package/src/tools/askUserQuestion.ts +51 -29
- package/src/tools/bashTool.ts +15 -17
- package/src/tools/editTool.ts +3 -1
- package/src/tools/exitPlanMode.ts +27 -3
- package/src/tools/globTool.ts +10 -2
- package/src/tools/grepTool.ts +17 -6
- package/src/tools/lsTool.ts +3 -1
- package/src/tools/readTool.ts +17 -1
- package/src/tools/taskManagementTools.ts +516 -0
- package/src/tools/taskOutputTool.ts +34 -12
- package/src/tools/taskStopTool.ts +7 -1
- package/src/tools/taskTool.ts +45 -1
- package/src/tools/types.ts +12 -0
- package/src/tools/writeTool.ts +9 -2
- package/src/types/index.ts +1 -0
- package/src/types/messaging.ts +1 -21
- package/src/types/processes.ts +18 -7
- package/src/types/tasks.ts +13 -0
- package/src/types/tools.ts +4 -1
- package/src/utils/builtinSubagents.ts +81 -45
- package/src/utils/cacheControlUtils.ts +26 -18
- package/src/utils/constants.ts +0 -5
- package/src/utils/convertMessagesForAPI.ts +2 -2
- package/src/utils/editUtils.ts +2 -6
- package/src/utils/gitUtils.ts +24 -0
- package/src/utils/messageOperations.ts +6 -229
- package/src/utils/nameGenerator.ts +20 -3
- package/dist/constants/prompts.d.ts.map +0 -1
- package/dist/constants/prompts.js +0 -118
- package/dist/tools/todoWriteTool.d.ts +0 -6
- package/dist/tools/todoWriteTool.d.ts.map +0 -1
- package/dist/tools/todoWriteTool.js +0 -220
- package/src/constants/prompts.ts +0 -155
- package/src/tools/todoWriteTool.ts +0 -257
package/dist/services/session.js
CHANGED
|
@@ -62,6 +62,7 @@ async function updateSessionIndex(projectDirPath, metadata) {
|
|
|
62
62
|
...rest,
|
|
63
63
|
lastActiveAt: metadata.lastActiveAt.toISOString(),
|
|
64
64
|
firstMessage: metadata.firstMessage || index.sessions[id]?.firstMessage,
|
|
65
|
+
parentSessionId: metadata.parentSessionId,
|
|
65
66
|
};
|
|
66
67
|
index.lastUpdated = new Date().toISOString();
|
|
67
68
|
await fs.writeFile(indexPath, JSON.stringify(index, null, 2), "utf8");
|
|
@@ -126,7 +127,7 @@ export async function createSession(sessionId, workdir, sessionType = "main") {
|
|
|
126
127
|
* @param workdir - Working directory for the session
|
|
127
128
|
* @param sessionType - Type of session ("main" or "subagent", defaults to "main")
|
|
128
129
|
*/
|
|
129
|
-
export async function appendMessages(sessionId, newMessages, workdir, sessionType = "main") {
|
|
130
|
+
export async function appendMessages(sessionId, newMessages, workdir, sessionType = "main", rootSessionId, parentSessionId) {
|
|
130
131
|
// Do not save session files in test environment
|
|
131
132
|
if (process.env.NODE_ENV === "test") {
|
|
132
133
|
return;
|
|
@@ -174,6 +175,8 @@ export async function appendMessages(sessionId, newMessages, workdir, sessionTyp
|
|
|
174
175
|
}
|
|
175
176
|
await updateSessionIndex(projectDir.encodedPath, {
|
|
176
177
|
id: sessionId,
|
|
178
|
+
rootSessionId,
|
|
179
|
+
parentSessionId,
|
|
177
180
|
sessionType,
|
|
178
181
|
workdir,
|
|
179
182
|
lastActiveAt: new Date(lastMessage.timestamp),
|
|
@@ -202,8 +205,25 @@ export async function loadSessionFromJsonl(sessionId, workdir, sessionType = "ma
|
|
|
202
205
|
}
|
|
203
206
|
// Extract metadata from messages
|
|
204
207
|
const lastMessage = messages[messages.length - 1];
|
|
208
|
+
// Try to get rootSessionId and parentSessionId from index
|
|
209
|
+
let rootSessionId;
|
|
210
|
+
let parentSessionId;
|
|
211
|
+
try {
|
|
212
|
+
const encoder = new PathEncoder();
|
|
213
|
+
const projectDir = await encoder.getProjectDirectory(workdir, SESSION_DIR);
|
|
214
|
+
const indexPath = join(projectDir.encodedPath, SESSION_INDEX_FILENAME);
|
|
215
|
+
const indexContent = await fs.readFile(indexPath, "utf8");
|
|
216
|
+
const index = JSON.parse(indexContent);
|
|
217
|
+
rootSessionId = index.sessions[sessionId]?.rootSessionId;
|
|
218
|
+
parentSessionId = index.sessions[sessionId]?.parentSessionId;
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
// Ignore index errors
|
|
222
|
+
}
|
|
205
223
|
const sessionData = {
|
|
206
224
|
id: sessionId,
|
|
225
|
+
rootSessionId: rootSessionId || sessionId,
|
|
226
|
+
parentSessionId,
|
|
207
227
|
messages: messages.map((msg) => {
|
|
208
228
|
// Remove timestamp property for backward compatibility
|
|
209
229
|
const { timestamp: _ignored, ...messageWithoutTimestamp } = msg;
|
|
@@ -644,3 +664,39 @@ export async function handleSessionRestoration(restoreSessionId, continueLastSes
|
|
|
644
664
|
process.exit(1);
|
|
645
665
|
}
|
|
646
666
|
}
|
|
667
|
+
/**
|
|
668
|
+
* Load the full message thread by following parentSessionId links
|
|
669
|
+
* @param currentSessionId - The ID of the current session
|
|
670
|
+
* @param workdir - Working directory for the session
|
|
671
|
+
* @returns Promise that resolves to an array of all messages in the thread
|
|
672
|
+
*/
|
|
673
|
+
export async function loadFullMessageThread(currentSessionId, workdir) {
|
|
674
|
+
const sessionIds = [];
|
|
675
|
+
let currentId = currentSessionId;
|
|
676
|
+
const allMessages = [];
|
|
677
|
+
while (currentId) {
|
|
678
|
+
const sessionData = await loadSessionFromJsonl(currentId, workdir);
|
|
679
|
+
if (!sessionData)
|
|
680
|
+
break;
|
|
681
|
+
sessionIds.unshift(currentId);
|
|
682
|
+
// Add messages from this session to the beginning of the list
|
|
683
|
+
// But skip the "compress" block if it's not the first session in our traversal (which is the latest)
|
|
684
|
+
// Actually, we should probably keep all messages and let the UI/logic handle it.
|
|
685
|
+
// But wait, if we are concatenating, the "compress" block in session N summarizes session N-1.
|
|
686
|
+
// So if we have session N-1 and session N, we should probably skip the compress block in session N.
|
|
687
|
+
const messages = sessionData.messages;
|
|
688
|
+
if (allMessages.length > 0) {
|
|
689
|
+
// If we already have messages (from "later" sessions),
|
|
690
|
+
// we are now adding messages from an "earlier" session.
|
|
691
|
+
// The later session's first message might be a "compress" block.
|
|
692
|
+
if (allMessages[0].blocks.some((b) => b.type === "compress")) {
|
|
693
|
+
// Remove the compress block from the later session's messages
|
|
694
|
+
// because we are now providing the actual messages it summarized.
|
|
695
|
+
allMessages.shift();
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
allMessages.unshift(...messages);
|
|
699
|
+
currentId = sessionData.parentSessionId;
|
|
700
|
+
}
|
|
701
|
+
return { messages: allMessages, sessionIds };
|
|
702
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EventEmitter } from "events";
|
|
2
|
+
import { Task } from "../types/tasks.js";
|
|
3
|
+
export declare class TaskManager extends EventEmitter {
|
|
4
|
+
private readonly baseDir;
|
|
5
|
+
private taskListId;
|
|
6
|
+
constructor(taskListId: string);
|
|
7
|
+
getTaskListId(): string;
|
|
8
|
+
setTaskListId(taskListId: string): void;
|
|
9
|
+
private getSessionDir;
|
|
10
|
+
getTaskPath(taskId: string): string;
|
|
11
|
+
private getLockPath;
|
|
12
|
+
ensureSessionDir(): Promise<void>;
|
|
13
|
+
private withLock;
|
|
14
|
+
private validateTask;
|
|
15
|
+
createTask(task: Omit<Task, "id">): Promise<string>;
|
|
16
|
+
getTask(taskId: string): Promise<Task | null>;
|
|
17
|
+
updateTask(task: Task): Promise<void>;
|
|
18
|
+
listTasks(): Promise<Task[]>;
|
|
19
|
+
getNextTaskId(): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Refreshes the task list by re-reading tasks from disk and emitting a change event.
|
|
22
|
+
*/
|
|
23
|
+
refreshTasks(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=taskManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taskManager.d.ts","sourceRoot":"","sources":["../../src/services/taskManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGzC,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,UAAU,CAAS;gBAEf,UAAU,EAAE,MAAM;IAMvB,aAAa,IAAI,MAAM;IAIvB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAI9C,OAAO,CAAC,aAAa;IAId,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI1C,OAAO,CAAC,WAAW;IAIb,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;YAIzB,QAAQ;IA2CtB,OAAO,CAAC,YAAY;IAed,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAcnD,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAmB7C,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAWrC,SAAS,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IA+B5B,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IActC;;OAEG;IACU,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CAG3C"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { promises as fs } from "fs";
|
|
2
|
+
import { join } from "path";
|
|
3
|
+
import { homedir } from "os";
|
|
4
|
+
import { EventEmitter } from "events";
|
|
5
|
+
import { logger } from "../utils/globalLogger.js";
|
|
6
|
+
export class TaskManager extends EventEmitter {
|
|
7
|
+
constructor(taskListId) {
|
|
8
|
+
super();
|
|
9
|
+
this.taskListId = taskListId;
|
|
10
|
+
this.baseDir = join(homedir(), ".wave", "tasks");
|
|
11
|
+
}
|
|
12
|
+
getTaskListId() {
|
|
13
|
+
return this.taskListId;
|
|
14
|
+
}
|
|
15
|
+
setTaskListId(taskListId) {
|
|
16
|
+
this.taskListId = taskListId;
|
|
17
|
+
}
|
|
18
|
+
getSessionDir() {
|
|
19
|
+
return join(this.baseDir, this.taskListId);
|
|
20
|
+
}
|
|
21
|
+
getTaskPath(taskId) {
|
|
22
|
+
return join(this.getSessionDir(), `${taskId}.json`);
|
|
23
|
+
}
|
|
24
|
+
getLockPath() {
|
|
25
|
+
return join(this.getSessionDir(), `.lock`);
|
|
26
|
+
}
|
|
27
|
+
async ensureSessionDir() {
|
|
28
|
+
await fs.mkdir(this.getSessionDir(), { recursive: true });
|
|
29
|
+
}
|
|
30
|
+
async withLock(operation) {
|
|
31
|
+
const lockPath = this.getLockPath();
|
|
32
|
+
let lockHandle;
|
|
33
|
+
const maxRetries = 100;
|
|
34
|
+
const retryDelay = process.env.NODE_ENV === "test" ? 10 : 100;
|
|
35
|
+
await this.ensureSessionDir();
|
|
36
|
+
for (let i = 0; i < maxRetries; i++) {
|
|
37
|
+
try {
|
|
38
|
+
lockHandle = await fs.open(lockPath, "wx");
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
if (error.code === "EEXIST") {
|
|
43
|
+
if (i === maxRetries - 1) {
|
|
44
|
+
throw new Error(`Could not acquire lock for task list ${this.taskListId} after ${maxRetries} retries`);
|
|
45
|
+
}
|
|
46
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelay));
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
return await operation();
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
if (lockHandle) {
|
|
57
|
+
await lockHandle.close();
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
await fs.unlink(lockPath);
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
logger.error(`Failed to release lock for task list ${this.taskListId}:`, error);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
validateTask(task) {
|
|
68
|
+
if (!task.id || typeof task.id !== "string")
|
|
69
|
+
throw new Error("Invalid task ID");
|
|
70
|
+
if (!task.subject || typeof task.subject !== "string")
|
|
71
|
+
throw new Error("Invalid task subject");
|
|
72
|
+
if (!task.description || typeof task.description !== "string")
|
|
73
|
+
throw new Error("Invalid task description");
|
|
74
|
+
if (!task.status ||
|
|
75
|
+
!["pending", "in_progress", "completed", "deleted"].includes(task.status)) {
|
|
76
|
+
throw new Error(`Invalid task status: ${task.status}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async createTask(task) {
|
|
80
|
+
return await this.withLock(async () => {
|
|
81
|
+
const taskId = await this.getNextTaskId();
|
|
82
|
+
const fullTask = { ...task, id: taskId };
|
|
83
|
+
this.validateTask(fullTask);
|
|
84
|
+
const taskPath = this.getTaskPath(taskId);
|
|
85
|
+
const content = JSON.stringify(fullTask, null, 2);
|
|
86
|
+
await fs.writeFile(taskPath, content, "utf8");
|
|
87
|
+
this.emit("tasksChange", this.taskListId);
|
|
88
|
+
logger.info(`Task ${taskId} created in task list ${this.taskListId}`);
|
|
89
|
+
return taskId;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
async getTask(taskId) {
|
|
93
|
+
const taskPath = this.getTaskPath(taskId);
|
|
94
|
+
try {
|
|
95
|
+
const content = await fs.readFile(taskPath, "utf8");
|
|
96
|
+
try {
|
|
97
|
+
return JSON.parse(content.trim());
|
|
98
|
+
}
|
|
99
|
+
catch (parseError) {
|
|
100
|
+
logger.error(`Failed to parse task file ${taskPath}:`, parseError);
|
|
101
|
+
logger.error(`Corrupted content: ${content}`);
|
|
102
|
+
throw parseError;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
if (error.code === "ENOENT") {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async updateTask(task) {
|
|
113
|
+
this.validateTask(task);
|
|
114
|
+
await this.withLock(async () => {
|
|
115
|
+
const taskPath = this.getTaskPath(task.id);
|
|
116
|
+
const content = JSON.stringify(task, null, 2);
|
|
117
|
+
await fs.writeFile(taskPath, content, "utf8");
|
|
118
|
+
this.emit("tasksChange", this.taskListId);
|
|
119
|
+
logger.info(`Task ${task.id} updated in task list ${this.taskListId}`);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
async listTasks() {
|
|
123
|
+
const sessionDir = this.getSessionDir();
|
|
124
|
+
try {
|
|
125
|
+
const files = await fs.readdir(sessionDir);
|
|
126
|
+
const taskFiles = files.filter((f) => f.endsWith(".json"));
|
|
127
|
+
const tasks = await Promise.all(taskFiles.map(async (file) => {
|
|
128
|
+
const taskPath = join(sessionDir, file);
|
|
129
|
+
try {
|
|
130
|
+
const content = await fs.readFile(taskPath, "utf8");
|
|
131
|
+
return JSON.parse(content.trim());
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
logger.error(`Failed to read or parse task file ${taskPath}:`, error);
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
}));
|
|
138
|
+
return tasks.filter((t) => t !== null);
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
if (error.code === "ENOENT") {
|
|
142
|
+
return [];
|
|
143
|
+
}
|
|
144
|
+
throw error;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
async getNextTaskId() {
|
|
148
|
+
const tasks = await this.listTasks();
|
|
149
|
+
if (tasks.length === 0) {
|
|
150
|
+
return "1";
|
|
151
|
+
}
|
|
152
|
+
const ids = tasks.map((t) => parseInt(t.id, 10)).filter((id) => !isNaN(id));
|
|
153
|
+
if (ids.length === 0) {
|
|
154
|
+
return (tasks.length + 1).toString();
|
|
155
|
+
}
|
|
156
|
+
return (Math.max(...ids) + 1).toString();
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Refreshes the task list by re-reading tasks from disk and emitting a change event.
|
|
160
|
+
*/
|
|
161
|
+
async refreshTasks() {
|
|
162
|
+
this.emit("tasksChange", this.taskListId);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askUserQuestion.d.ts","sourceRoot":"","sources":["../../src/tools/askUserQuestion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"askUserQuestion.d.ts","sourceRoot":"","sources":["../../src/tools/askUserQuestion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,eAAO,MAAM,mBAAmB,EAAE,UAiJjC,CAAC"}
|
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
import { ASK_USER_QUESTION_TOOL_NAME
|
|
1
|
+
import { ASK_USER_QUESTION_TOOL_NAME } from "../constants/tools.js";
|
|
2
2
|
export const askUserQuestionTool = {
|
|
3
3
|
name: ASK_USER_QUESTION_TOOL_NAME,
|
|
4
4
|
config: {
|
|
5
5
|
type: "function",
|
|
6
6
|
function: {
|
|
7
7
|
name: ASK_USER_QUESTION_TOOL_NAME,
|
|
8
|
-
description:
|
|
9
|
-
Use this tool when you need to ask the user questions during execution. This allows you to:
|
|
10
|
-
1. Gather user preferences or requirements
|
|
11
|
-
2. Clarify ambiguous instructions
|
|
12
|
-
3. Get decisions on implementation choices as you work
|
|
13
|
-
4. Offer choices to the user about what direction to take.
|
|
14
|
-
|
|
15
|
-
Usage notes:
|
|
16
|
-
- Users will always be able to select "Other" to provide custom text input
|
|
17
|
-
- Use multiSelect: true to allow multiple answers to be selected for a question
|
|
18
|
-
- If you recommend a specific option, make that the first option in the list and add "(Recommended)" at the end of the label
|
|
19
|
-
|
|
20
|
-
Plan mode note: In plan mode, use this tool to clarify requirements or choose between approaches BEFORE finalizing your plan. Do NOT use this tool to ask "Is my plan ready?" or "Should I proceed?" - use ${EXIT_PLAN_MODE_TOOL_NAME} for plan approval.`,
|
|
8
|
+
description: "Asks the user multiple choice questions to gather information, clarify ambiguity, understand preferences, make decisions or offer them choices.",
|
|
21
9
|
parameters: {
|
|
22
10
|
type: "object",
|
|
23
11
|
properties: {
|
|
@@ -25,36 +13,34 @@ Plan mode note: In plan mode, use this tool to clarify requirements or choose be
|
|
|
25
13
|
type: "array",
|
|
26
14
|
minItems: 1,
|
|
27
15
|
maxItems: 4,
|
|
16
|
+
description: "Questions to ask the user (1-4 questions)",
|
|
28
17
|
items: {
|
|
29
18
|
type: "object",
|
|
30
19
|
properties: {
|
|
31
20
|
question: {
|
|
32
21
|
type: "string",
|
|
33
|
-
description:
|
|
22
|
+
description: 'The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"',
|
|
34
23
|
},
|
|
35
24
|
header: {
|
|
36
25
|
type: "string",
|
|
37
26
|
maxLength: 12,
|
|
38
|
-
description:
|
|
27
|
+
description: `Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".`,
|
|
39
28
|
},
|
|
40
29
|
options: {
|
|
41
30
|
type: "array",
|
|
42
31
|
minItems: 2,
|
|
43
32
|
maxItems: 4,
|
|
33
|
+
description: "The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.",
|
|
44
34
|
items: {
|
|
45
35
|
type: "object",
|
|
46
36
|
properties: {
|
|
47
37
|
label: {
|
|
48
38
|
type: "string",
|
|
49
|
-
description: "The display text for this option.",
|
|
39
|
+
description: "The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.",
|
|
50
40
|
},
|
|
51
41
|
description: {
|
|
52
42
|
type: "string",
|
|
53
|
-
description: "Explanation of what this option means.",
|
|
54
|
-
},
|
|
55
|
-
isRecommended: {
|
|
56
|
-
type: "boolean",
|
|
57
|
-
description: "Whether this option is recommended.",
|
|
43
|
+
description: "Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.",
|
|
58
44
|
},
|
|
59
45
|
},
|
|
60
46
|
required: ["label"],
|
|
@@ -63,23 +49,51 @@ Plan mode note: In plan mode, use this tool to clarify requirements or choose be
|
|
|
63
49
|
multiSelect: {
|
|
64
50
|
type: "boolean",
|
|
65
51
|
default: false,
|
|
66
|
-
description: "
|
|
52
|
+
description: "Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.",
|
|
67
53
|
},
|
|
68
54
|
},
|
|
69
55
|
required: ["question", "header", "options"],
|
|
70
56
|
},
|
|
71
57
|
},
|
|
58
|
+
answers: {
|
|
59
|
+
type: "object",
|
|
60
|
+
additionalProperties: { type: "string" },
|
|
61
|
+
description: "User answers collected by the permission component",
|
|
62
|
+
},
|
|
63
|
+
metadata: {
|
|
64
|
+
type: "object",
|
|
65
|
+
properties: {
|
|
66
|
+
source: {
|
|
67
|
+
type: "string",
|
|
68
|
+
description: 'Optional identifier for the source of this question (e.g., "remember" for /remember command). Used for analytics tracking.',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
description: "Optional metadata for the question",
|
|
72
|
+
},
|
|
72
73
|
},
|
|
73
74
|
required: ["questions"],
|
|
74
75
|
},
|
|
75
76
|
},
|
|
76
77
|
},
|
|
78
|
+
prompt: () => `Use this tool when you need to ask the user questions during execution. This allows you to:
|
|
79
|
+
1. Gather user preferences or requirements
|
|
80
|
+
2. Clarify ambiguous instructions
|
|
81
|
+
3. Get decisions on implementation choices as you work
|
|
82
|
+
4. Offer choices to the user about what direction to take.
|
|
83
|
+
|
|
84
|
+
Usage notes:
|
|
85
|
+
- Users will always be able to select "Other" to provide custom text input
|
|
86
|
+
- Use multiSelect: true to allow multiple answers to be selected for a question
|
|
87
|
+
- If you recommend a specific option, make that the first option in the list and add "(Recommended)" at the end of the label
|
|
88
|
+
|
|
89
|
+
Plan mode note: In plan mode, use this tool to clarify requirements or choose between approaches BEFORE finalizing your plan. Do NOT use this tool to ask "Is my plan ready?" or "Should I proceed?" - use ExitPlanMode for plan approval.
|
|
90
|
+
`,
|
|
77
91
|
execute: async (args, context) => {
|
|
78
|
-
const { questions } = args;
|
|
92
|
+
const { questions, answers: existingAnswers, metadata, } = args;
|
|
79
93
|
if (!context.permissionManager) {
|
|
80
94
|
throw new Error(`Permission manager is required for ${ASK_USER_QUESTION_TOOL_NAME} tool`);
|
|
81
95
|
}
|
|
82
|
-
const permissionContext = context.permissionManager.createContext(ASK_USER_QUESTION_TOOL_NAME, context.permissionMode || "default", context.canUseToolCallback, { questions });
|
|
96
|
+
const permissionContext = context.permissionManager.createContext(ASK_USER_QUESTION_TOOL_NAME, context.permissionMode || "default", context.canUseToolCallback, { questions, answers: existingAnswers, metadata });
|
|
83
97
|
permissionContext.hidePersistentOption = true; // Always hide persistent option for questions
|
|
84
98
|
const decision = await context.permissionManager.checkPermission(permissionContext);
|
|
85
99
|
if (decision.behavior === "deny") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bashTool.d.ts","sourceRoot":"","sources":["../../src/tools/bashTool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AActE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"bashTool.d.ts","sourceRoot":"","sources":["../../src/tools/bashTool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AActE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,UAiXtB,CAAC"}
|
package/dist/tools/bashTool.js
CHANGED
|
@@ -83,6 +83,9 @@ Usage notes:
|
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
85
|
},
|
|
86
|
+
prompt: () => `
|
|
87
|
+
- Reserve bash tools exclusively for actual system commands and terminal operations that require shell execution. NEVER use bash echo or other command-line tools to communicate thoughts, explanations, or instructions to the user. Output all communication directly in your response text instead.
|
|
88
|
+
- When making multiple bash tool calls, you MUST send a single message with multiple tools calls to run the calls in parallel. For example, if you need to run "git status" and "git diff", send a single message with two tool calls in parallel.`,
|
|
86
89
|
execute: async (args, context) => {
|
|
87
90
|
const command = args.command;
|
|
88
91
|
const runInBackground = args.run_in_background;
|
|
@@ -179,8 +182,9 @@ Usage notes:
|
|
|
179
182
|
const taskId = backgroundTaskManager.adoptProcess(child, command, outputBuffer, errorBuffer);
|
|
180
183
|
resolve({
|
|
181
184
|
success: true,
|
|
182
|
-
content: `Command moved to background with ID: ${taskId}
|
|
185
|
+
content: `Command moved to background with ID: ${taskId}.`,
|
|
183
186
|
shortResult: `Process ${taskId} backgrounded`,
|
|
187
|
+
isManuallyBackgrounded: true,
|
|
184
188
|
});
|
|
185
189
|
}
|
|
186
190
|
else {
|
|
@@ -247,28 +251,26 @@ Usage notes:
|
|
|
247
251
|
// Handle abort signal from context
|
|
248
252
|
if (context?.abortSignal) {
|
|
249
253
|
if (context.abortSignal.aborted) {
|
|
250
|
-
|
|
251
|
-
handleAbort();
|
|
252
|
-
}
|
|
254
|
+
handleAbort();
|
|
253
255
|
return;
|
|
254
256
|
}
|
|
255
257
|
// Use { once: true } to prevent listener accumulation on signal reuse
|
|
256
|
-
context.abortSignal.addEventListener("abort", () => {
|
|
257
|
-
if (!isBackgrounded) {
|
|
258
|
-
handleAbort();
|
|
259
|
-
}
|
|
260
|
-
}, {
|
|
258
|
+
context.abortSignal.addEventListener("abort", () => handleAbort(), {
|
|
261
259
|
once: true,
|
|
262
260
|
});
|
|
263
261
|
}
|
|
264
262
|
child.stdout?.on("data", (data) => {
|
|
265
263
|
if (!isAborted && !isBackgrounded) {
|
|
266
|
-
|
|
264
|
+
const chunk = stripAnsiColors(data.toString());
|
|
265
|
+
outputBuffer += chunk;
|
|
266
|
+
context.onShortResultUpdate?.(chunk.trim().split("\n").pop() || "");
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
child.stderr?.on("data", (data) => {
|
|
270
270
|
if (!isAborted && !isBackgrounded) {
|
|
271
|
-
|
|
271
|
+
const chunk = stripAnsiColors(data.toString());
|
|
272
|
+
errorBuffer += chunk;
|
|
273
|
+
context.onShortResultUpdate?.(chunk.trim().split("\n").pop() || "");
|
|
272
274
|
}
|
|
273
275
|
});
|
|
274
276
|
child.on("exit", (code) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editTool.d.ts","sourceRoot":"","sources":["../../src/tools/editTool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAgBtE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"editTool.d.ts","sourceRoot":"","sources":["../../src/tools/editTool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAgBtE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,UAmNtB,CAAC"}
|
package/dist/tools/editTool.js
CHANGED
|
@@ -16,11 +16,12 @@ function formatCompactParams(args, context) {
|
|
|
16
16
|
export const editTool = {
|
|
17
17
|
name: EDIT_TOOL_NAME,
|
|
18
18
|
formatCompactParams,
|
|
19
|
+
prompt: () => `Performs exact string replacements in files. \n\nUsage:\n- You must use your \`${READ_TOOL_NAME}\` tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file. \n- When editing text from read_file tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: spaces + line number + tab. Everything after that tab is the actual file content to match. Never include any part of the line number prefix in the old_string or new_string.\n- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.\n- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.\n- The edit will FAIL if \`old_string\` is not unique in the file. Either provide a larger string with more surrounding context to make it unique or use \`replace_all\` to change every instance of \`old_string\`. \n- Use \`replace_all\` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.`,
|
|
19
20
|
config: {
|
|
20
21
|
type: "function",
|
|
21
22
|
function: {
|
|
22
23
|
name: EDIT_TOOL_NAME,
|
|
23
|
-
description:
|
|
24
|
+
description: "A tool for editing files",
|
|
24
25
|
parameters: {
|
|
25
26
|
type: "object",
|
|
26
27
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exitPlanMode.d.ts","sourceRoot":"","sources":["../../src/tools/exitPlanMode.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAGtE;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"exitPlanMode.d.ts","sourceRoot":"","sources":["../../src/tools/exitPlanMode.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAGtE;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,UA4G9B,CAAC"}
|
|
@@ -10,7 +10,7 @@ export const exitPlanModeTool = {
|
|
|
10
10
|
type: "function",
|
|
11
11
|
function: {
|
|
12
12
|
name: EXIT_PLAN_MODE_TOOL_NAME,
|
|
13
|
-
description: "
|
|
13
|
+
description: "Prompts the user to exit plan mode and start coding",
|
|
14
14
|
parameters: {
|
|
15
15
|
type: "object",
|
|
16
16
|
properties: {},
|
|
@@ -19,6 +19,30 @@ export const exitPlanModeTool = {
|
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
|
+
prompt: () => `Use this tool when you are in plan mode and have finished writing your plan to the plan file and are ready for user approval.
|
|
23
|
+
|
|
24
|
+
## How This Tool Works
|
|
25
|
+
- You should have already written your plan to the plan file specified in the plan mode system message
|
|
26
|
+
- This tool does NOT take the plan content as a parameter - it will read the plan from the file you wrote
|
|
27
|
+
- This tool simply signals that you're done planning and ready for the user to review and approve
|
|
28
|
+
- The user will see the contents of your plan file when they review it
|
|
29
|
+
|
|
30
|
+
## When to Use This Tool
|
|
31
|
+
IMPORTANT: Only use this tool when the task requires planning the implementation steps of a task that requires writing code. For research tasks where you're gathering information, searching files, reading files or in general trying to understand the codebase - do NOT use this tool.
|
|
32
|
+
|
|
33
|
+
## Before Using This Tool
|
|
34
|
+
Ensure your plan is complete and unambiguous:
|
|
35
|
+
- If you have unresolved questions about requirements or approach, use AskUserQuestion first (in earlier phases)
|
|
36
|
+
- Once your plan is finalized, use THIS tool to request approval
|
|
37
|
+
|
|
38
|
+
**Important:** Do NOT use AskUserQuestion to ask "Is this plan okay?" or "Should I proceed?" - that's exactly what THIS tool does. ExitPlanMode inherently requests user approval of your plan.
|
|
39
|
+
|
|
40
|
+
## Examples
|
|
41
|
+
|
|
42
|
+
1. Initial task: "Search for and understand the implementation of vim mode in the codebase" - Do not use the exit plan mode tool because you are not planning the implementation steps of a task.
|
|
43
|
+
2. Initial task: "Help me implement yank mode for vim" - Use the exit plan mode tool after you have finished planning the implementation steps of the task.
|
|
44
|
+
3. Initial task: "Add a new feature to handle user authentication" - If unsure about auth method (OAuth, JWT, etc.), use AskUserQuestion first, then use exit plan mode tool after clarifying the approach.
|
|
45
|
+
`,
|
|
22
46
|
execute: async (_args, context) => {
|
|
23
47
|
try {
|
|
24
48
|
if (!context.permissionManager) {
|
|
@@ -53,7 +77,7 @@ export const exitPlanModeTool = {
|
|
|
53
77
|
if (permissionResult.behavior === "deny") {
|
|
54
78
|
return {
|
|
55
79
|
success: false,
|
|
56
|
-
content: permissionResult.message || "Plan rejected by user"
|
|
80
|
+
content: `User feedback: ${permissionResult.message || "Plan rejected by user"}. Please update your proposal accordingly.`,
|
|
57
81
|
error: permissionResult.message ? undefined : "Plan rejected by user",
|
|
58
82
|
};
|
|
59
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globTool.d.ts","sourceRoot":"","sources":["../../src/tools/globTool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAKtE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"globTool.d.ts","sourceRoot":"","sources":["../../src/tools/globTool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAKtE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,UAoItB,CAAC"}
|
package/dist/tools/globTool.js
CHANGED
|
@@ -2,7 +2,7 @@ import { glob } from "glob";
|
|
|
2
2
|
import { stat } from "fs/promises";
|
|
3
3
|
import { resolvePath, getDisplayPath } from "../utils/path.js";
|
|
4
4
|
import { getGlobIgnorePatterns } from "../utils/fileFilter.js";
|
|
5
|
-
import { GLOB_TOOL_NAME
|
|
5
|
+
import { GLOB_TOOL_NAME } from "../constants/tools.js";
|
|
6
6
|
/**
|
|
7
7
|
* Glob Tool Plugin - Fast file pattern matching
|
|
8
8
|
*/
|
|
@@ -12,7 +12,7 @@ export const globTool = {
|
|
|
12
12
|
type: "function",
|
|
13
13
|
function: {
|
|
14
14
|
name: GLOB_TOOL_NAME,
|
|
15
|
-
description:
|
|
15
|
+
description: "Fast file pattern matching tool that works with any codebase size",
|
|
16
16
|
parameters: {
|
|
17
17
|
type: "object",
|
|
18
18
|
properties: {
|
|
@@ -29,6 +29,12 @@ export const globTool = {
|
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
|
+
prompt: () => `- Fast file pattern matching tool that works with any codebase size
|
|
33
|
+
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
|
|
34
|
+
- Returns matching file paths sorted by modification time
|
|
35
|
+
- Use this tool when you need to find files by name patterns
|
|
36
|
+
- When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead
|
|
37
|
+
- You can call multiple tools in a single response. It is always better to speculatively perform multiple searches in parallel if they are potentially useful.`,
|
|
32
38
|
execute: async (args, context) => {
|
|
33
39
|
const pattern = args.pattern;
|
|
34
40
|
const searchPath = args.path;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grepTool.d.ts","sourceRoot":"","sources":["../../src/tools/grepTool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAWtE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"grepTool.d.ts","sourceRoot":"","sources":["../../src/tools/grepTool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAWtE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,UAuRtB,CAAC"}
|