wave-agent-sdk 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +7 -2
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +58 -69
- package/dist/constants/prompts.d.ts +18 -14
- package/dist/constants/prompts.d.ts.map +1 -1
- package/dist/constants/prompts.js +134 -54
- 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 -0
- package/dist/managers/aiManager.d.ts.map +1 -1
- package/dist/managers/aiManager.js +54 -16
- package/dist/managers/backgroundTaskManager.d.ts.map +1 -1
- package/dist/managers/backgroundTaskManager.js +59 -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 +7 -3
- package/dist/managers/messageManager.d.ts.map +1 -1
- package/dist/managers/messageManager.js +28 -24
- 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/subagentManager.d.ts +4 -0
- package/dist/managers/subagentManager.d.ts.map +1 -1
- package/dist/managers/subagentManager.js +18 -2
- 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/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 +3 -1
- package/dist/services/session.d.ts.map +1 -1
- package/dist/services/session.js +16 -1
- package/dist/services/taskManager.d.ts +21 -0
- package/dist/services/taskManager.d.ts.map +1 -0
- package/dist/services/taskManager.js +158 -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 +5 -1
- 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 +25 -1
- 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 +453 -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 +6 -1
- package/dist/tools/types.d.ts +9 -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 -8
- package/dist/types/messaging.d.ts.map +1 -1
- package/dist/types/processes.d.ts +11 -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 +38 -1
- 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/messageOperations.d.ts +2 -30
- package/dist/utils/messageOperations.d.ts.map +1 -1
- package/dist/utils/messageOperations.js +4 -79
- 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 +79 -78
- package/src/constants/prompts.ts +161 -65
- package/src/constants/tools.ts +4 -1
- package/src/index.ts +1 -0
- package/src/managers/aiManager.ts +71 -26
- package/src/managers/backgroundTaskManager.ts +53 -54
- package/src/managers/foregroundTaskManager.ts +3 -2
- package/src/managers/mcpManager.ts +6 -3
- package/src/managers/messageManager.ts +37 -26
- package/src/managers/permissionManager.ts +32 -21
- package/src/managers/planManager.ts +2 -2
- package/src/managers/subagentManager.ts +29 -2
- package/src/managers/toolManager.ts +32 -2
- package/src/services/aiService.ts +3 -145
- package/src/services/memory.ts +0 -72
- package/src/services/session.ts +21 -0
- package/src/services/taskManager.ts +188 -0
- package/src/tools/askUserQuestion.ts +51 -29
- package/src/tools/bashTool.ts +5 -1
- package/src/tools/editTool.ts +3 -1
- package/src/tools/exitPlanMode.ts +26 -2
- 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 +498 -0
- package/src/tools/taskOutputTool.ts +34 -12
- package/src/tools/taskStopTool.ts +7 -1
- package/src/tools/taskTool.ts +7 -1
- package/src/tools/types.ts +10 -0
- package/src/tools/writeTool.ts +9 -2
- package/src/types/index.ts +1 -0
- package/src/types/messaging.ts +1 -9
- package/src/types/processes.ts +13 -7
- package/src/types/tasks.ts +13 -0
- package/src/types/tools.ts +4 -1
- package/src/utils/builtinSubagents.ts +47 -1
- package/src/utils/cacheControlUtils.ts +26 -18
- package/src/utils/constants.ts +0 -5
- package/src/utils/convertMessagesForAPI.ts +2 -2
- package/src/utils/messageOperations.ts +5 -116
- package/src/utils/nameGenerator.ts +20 -3
- 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/tools/todoWriteTool.ts +0 -257
package/dist/agent.d.ts
CHANGED
|
@@ -46,7 +46,9 @@ export interface AgentOptions {
|
|
|
46
46
|
}
|
|
47
47
|
export interface AgentCallbacks extends MessageManagerCallbacks, BackgroundTaskManagerCallbacks, McpManagerCallbacks, SubagentManagerCallbacks {
|
|
48
48
|
onTasksChange?: (tasks: BackgroundTask[]) => void;
|
|
49
|
+
onSessionTasksChange?: (tasks: import("./types/tasks.js").Task[]) => void;
|
|
49
50
|
onPermissionModeChange?: (mode: PermissionMode) => void;
|
|
51
|
+
onSubagentLatestTotalTokensChange?: (subagentId: string, tokens: number) => void;
|
|
50
52
|
onBackgroundCurrentTask?: () => void;
|
|
51
53
|
}
|
|
52
54
|
export declare class Agent {
|
|
@@ -68,6 +70,7 @@ export declare class Agent {
|
|
|
68
70
|
private reversionManager;
|
|
69
71
|
private memoryRuleManager;
|
|
70
72
|
private liveConfigManager;
|
|
73
|
+
private taskManager;
|
|
71
74
|
private foregroundTaskManager;
|
|
72
75
|
private configurationService;
|
|
73
76
|
private workdir;
|
|
@@ -262,8 +265,6 @@ export declare class Agent {
|
|
|
262
265
|
path: string;
|
|
263
266
|
mimeType: string;
|
|
264
267
|
}>): Promise<void>;
|
|
265
|
-
/** Save memory to project or user memory file */
|
|
266
|
-
saveMemory(message: string, type: "project" | "user"): Promise<void>;
|
|
267
268
|
/** Get all MCP server status */
|
|
268
269
|
getMcpServers(): McpServerStatus[];
|
|
269
270
|
/** Connect MCP server */
|
|
@@ -320,5 +321,9 @@ export declare class Agent {
|
|
|
320
321
|
* @param mode - The current effective permission mode
|
|
321
322
|
*/
|
|
322
323
|
private handlePlanModeTransition;
|
|
324
|
+
/**
|
|
325
|
+
* Get the current task list ID
|
|
326
|
+
*/
|
|
327
|
+
get taskListId(): string;
|
|
323
328
|
}
|
|
324
329
|
//# sourceMappingURL=agent.d.ts.map
|
package/dist/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGhF,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,qCAAqC,CAAC;AAQ7C,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,YAAY,EACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,OAAO,EACP,MAAM,EACN,eAAe,EACf,aAAa,EACb,WAAW,EACX,KAAK,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,cAAc,EACf,MAAM,kBAAkB,CAAC;AAgB1B,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC;;;;;GAKG;AACH,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AU,IAAI,MAAM,CAE9B;CACF"}
|
package/dist/agent.js
CHANGED
|
@@ -3,7 +3,6 @@ import { MessageManager, } from "./managers/messageManager.js";
|
|
|
3
3
|
import { AIManager } from "./managers/aiManager.js";
|
|
4
4
|
import { ToolManager } from "./managers/toolManager.js";
|
|
5
5
|
import { SubagentManager, } from "./managers/subagentManager.js";
|
|
6
|
-
import * as memory from "./services/memory.js";
|
|
7
6
|
import { McpManager } from "./managers/mcpManager.js";
|
|
8
7
|
import { LspManager } from "./managers/lspManager.js";
|
|
9
8
|
import { BashManager } from "./managers/bashManager.js";
|
|
@@ -19,6 +18,7 @@ import { MemoryRuleManager } from "./managers/MemoryRuleManager.js";
|
|
|
19
18
|
import { LiveConfigManager } from "./managers/liveConfigManager.js";
|
|
20
19
|
import { configValidator } from "./utils/configValidator.js";
|
|
21
20
|
import { SkillManager } from "./managers/skillManager.js";
|
|
21
|
+
import { TaskManager } from "./services/taskManager.js";
|
|
22
22
|
import { loadSessionFromJsonl, handleSessionRestoration, } from "./services/session.js";
|
|
23
23
|
import { setGlobalLogger } from "./utils/globalLogger.js";
|
|
24
24
|
import { ConfigurationService } from "./services/configurationService.js";
|
|
@@ -65,6 +65,39 @@ export class Agent {
|
|
|
65
65
|
// Store options for dynamic configuration resolution
|
|
66
66
|
this.options = options;
|
|
67
67
|
this.foregroundTaskManager = new ForegroundTaskManager();
|
|
68
|
+
// Initialize memory rule manager
|
|
69
|
+
this.memoryRuleManager = new MemoryRuleManager({
|
|
70
|
+
workdir: this.workdir,
|
|
71
|
+
});
|
|
72
|
+
// Initialize MessageManager
|
|
73
|
+
this.messageManager = new MessageManager({
|
|
74
|
+
callbacks: {
|
|
75
|
+
...callbacks,
|
|
76
|
+
onSessionIdChange: (sessionId) => {
|
|
77
|
+
// When session ID changes (e.g. due to compression),
|
|
78
|
+
// we update the task manager to use the root session ID
|
|
79
|
+
// to ensure the task list remains consistent.
|
|
80
|
+
this.taskManager.setTaskListId(this.messageManager.getRootSessionId());
|
|
81
|
+
callbacks.onSessionIdChange?.(sessionId);
|
|
82
|
+
},
|
|
83
|
+
onSubagentTaskStopRequested: (subagentId) => {
|
|
84
|
+
this.backgroundTaskManager.stopTask(subagentId);
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
workdir: this.workdir,
|
|
88
|
+
logger: this.logger,
|
|
89
|
+
memoryRuleManager: this.memoryRuleManager,
|
|
90
|
+
});
|
|
91
|
+
// Resolve taskListId once during construction to ensure stability
|
|
92
|
+
const resolvedTaskListId = this.configurationService.getEnvironmentVars().WAVE_TASK_LIST_ID ||
|
|
93
|
+
process.env.WAVE_TASK_LIST_ID ||
|
|
94
|
+
this.messageManager.getRootSessionId();
|
|
95
|
+
this.taskManager = new TaskManager(resolvedTaskListId);
|
|
96
|
+
this.taskManager.on("tasksChange", async () => {
|
|
97
|
+
const tasks = await this.taskManager.listTasks();
|
|
98
|
+
this.options.callbacks?.onSessionTasksChange?.(tasks);
|
|
99
|
+
});
|
|
100
|
+
// Initialize BackgroundTaskManager
|
|
68
101
|
this.backgroundTaskManager = new BackgroundTaskManager({
|
|
69
102
|
callbacks: {
|
|
70
103
|
...callbacks,
|
|
@@ -95,18 +128,7 @@ export class Agent {
|
|
|
95
128
|
logger: this.logger,
|
|
96
129
|
workdir: this.workdir,
|
|
97
130
|
});
|
|
98
|
-
//
|
|
99
|
-
this.memoryRuleManager = new MemoryRuleManager({
|
|
100
|
-
workdir: this.workdir,
|
|
101
|
-
});
|
|
102
|
-
// Initialize MessageManager
|
|
103
|
-
this.messageManager = new MessageManager({
|
|
104
|
-
callbacks,
|
|
105
|
-
workdir: this.workdir,
|
|
106
|
-
logger: this.logger,
|
|
107
|
-
memoryRuleManager: this.memoryRuleManager,
|
|
108
|
-
});
|
|
109
|
-
// Initialize ReversionManager
|
|
131
|
+
// ReversionManager depends on MessageManager
|
|
110
132
|
this.reversionManager = new ReversionManager(new ReversionService(this.messageManager.getTranscriptPath()));
|
|
111
133
|
// Create a wrapper for canUseTool that triggers notification hooks
|
|
112
134
|
const canUseToolWithNotification = options.canUseTool
|
|
@@ -154,6 +176,7 @@ export class Agent {
|
|
|
154
176
|
reversionManager: this.reversionManager,
|
|
155
177
|
permissionMode: options.permissionMode, // Let PermissionManager handle defaultMode resolution
|
|
156
178
|
canUseToolCallback: canUseToolWithNotification,
|
|
179
|
+
taskManager: this.taskManager,
|
|
157
180
|
backgroundTaskManager: this.backgroundTaskManager,
|
|
158
181
|
foregroundTaskManager: this.foregroundTaskManager,
|
|
159
182
|
}); // Initialize tool registry with permission support
|
|
@@ -177,6 +200,7 @@ export class Agent {
|
|
|
177
200
|
onSubagentAssistantReasoningUpdated: callbacks.onSubagentAssistantReasoningUpdated,
|
|
178
201
|
onSubagentToolBlockUpdated: callbacks.onSubagentToolBlockUpdated,
|
|
179
202
|
onSubagentMessagesChange: callbacks.onSubagentMessagesChange,
|
|
203
|
+
onSubagentLatestTotalTokensChange: callbacks.onSubagentLatestTotalTokensChange,
|
|
180
204
|
}, // Pass subagent callbacks for forwarding
|
|
181
205
|
logger: this.logger,
|
|
182
206
|
getGatewayConfig: () => this.getGatewayConfig(),
|
|
@@ -186,12 +210,14 @@ export class Agent {
|
|
|
186
210
|
hookManager: this.hookManager,
|
|
187
211
|
onUsageAdded: (usage) => this.addUsage(usage),
|
|
188
212
|
backgroundTaskManager: this.backgroundTaskManager,
|
|
213
|
+
taskManager: this.taskManager,
|
|
189
214
|
memoryRuleManager: this.memoryRuleManager,
|
|
190
215
|
});
|
|
191
216
|
// Initialize AI manager with resolved configuration
|
|
192
217
|
this.aiManager = new AIManager({
|
|
193
218
|
messageManager: this.messageManager,
|
|
194
219
|
toolManager: this.toolManager,
|
|
220
|
+
taskManager: this.taskManager,
|
|
195
221
|
logger: this.logger,
|
|
196
222
|
backgroundTaskManager: this.backgroundTaskManager,
|
|
197
223
|
hookManager: this.hookManager,
|
|
@@ -527,8 +553,14 @@ export class Agent {
|
|
|
527
553
|
this.rebuildUsageFromMessages(sessionToRestore?.messages || []);
|
|
528
554
|
// After main session is restored, restore any associated subagent sessions
|
|
529
555
|
await this.restoreSubagentSessions(sessionToRestore?.messages || []);
|
|
530
|
-
if (sessionToRestore)
|
|
556
|
+
if (sessionToRestore) {
|
|
531
557
|
this.messageManager.initializeFromSession(sessionToRestore);
|
|
558
|
+
// Update task manager with the root session ID to ensure continuity across compressions
|
|
559
|
+
this.taskManager.setTaskListId(sessionToRestore.rootSessionId || sessionToRestore.id);
|
|
560
|
+
// After session is initialized, load tasks for the session
|
|
561
|
+
const tasks = await this.taskManager.listTasks();
|
|
562
|
+
this.options.callbacks?.onSessionTasksChange?.(tasks);
|
|
563
|
+
}
|
|
532
564
|
}
|
|
533
565
|
}
|
|
534
566
|
/**
|
|
@@ -620,6 +652,11 @@ export class Agent {
|
|
|
620
652
|
await this.restoreSubagentSessions(sessionData.messages);
|
|
621
653
|
// 6. Initialize session state last
|
|
622
654
|
this.messageManager.initializeFromSession(sessionData);
|
|
655
|
+
// Update task manager with the root session ID to ensure continuity across compressions
|
|
656
|
+
this.taskManager.setTaskListId(sessionData.rootSessionId || sessionData.id);
|
|
657
|
+
// 7. Load tasks for the restored session
|
|
658
|
+
const tasks = await this.taskManager.listTasks();
|
|
659
|
+
this.options.callbacks?.onSessionTasksChange?.(tasks);
|
|
623
660
|
}
|
|
624
661
|
abortAIMessage() {
|
|
625
662
|
this.aiManager.abortAIMessage();
|
|
@@ -800,60 +837,6 @@ export class Agent {
|
|
|
800
837
|
// Loading state will be automatically updated by the useEffect that watches messages
|
|
801
838
|
}
|
|
802
839
|
}
|
|
803
|
-
/** Save memory to project or user memory file */
|
|
804
|
-
async saveMemory(message, type) {
|
|
805
|
-
try {
|
|
806
|
-
// Ensure the message starts with # for memory functions
|
|
807
|
-
const formattedMessage = message.startsWith("#")
|
|
808
|
-
? message
|
|
809
|
-
: `#${message}`;
|
|
810
|
-
if (type === "project") {
|
|
811
|
-
await memory.addMemory(formattedMessage, this.workdir);
|
|
812
|
-
// Update internal state after successful save
|
|
813
|
-
this._projectMemoryContent = await memory.readMemoryFile(this.workdir);
|
|
814
|
-
}
|
|
815
|
-
else {
|
|
816
|
-
await memory.addUserMemory(formattedMessage);
|
|
817
|
-
// Update internal state after successful save
|
|
818
|
-
this._userMemoryContent = await memory.getUserMemoryContent();
|
|
819
|
-
}
|
|
820
|
-
// Add successful MemoryBlock to the last assistant message
|
|
821
|
-
const memoryText = message.substring(1).trim();
|
|
822
|
-
const typeLabel = type === "project" ? "Project Memory" : "User Memory";
|
|
823
|
-
const storagePath = "AGENTS.md";
|
|
824
|
-
const messages = this.messageManager.getMessages();
|
|
825
|
-
const lastMessage = messages[messages.length - 1];
|
|
826
|
-
if (lastMessage && lastMessage.role === "assistant") {
|
|
827
|
-
lastMessage.blocks.push({
|
|
828
|
-
type: "memory",
|
|
829
|
-
content: `${typeLabel}: ${memoryText}`,
|
|
830
|
-
isSuccess: true,
|
|
831
|
-
memoryType: type,
|
|
832
|
-
storagePath,
|
|
833
|
-
});
|
|
834
|
-
this.messageManager.setMessages(messages);
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
catch (error) {
|
|
838
|
-
// Add failed MemoryBlock to the last assistant message
|
|
839
|
-
const memoryText = message.substring(1).trim();
|
|
840
|
-
const typeLabel = type === "project" ? "Project Memory" : "User Memory";
|
|
841
|
-
const storagePath = "AGENTS.md";
|
|
842
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
843
|
-
const messages = this.messageManager.getMessages();
|
|
844
|
-
const lastMessage = messages[messages.length - 1];
|
|
845
|
-
if (lastMessage && lastMessage.role === "assistant") {
|
|
846
|
-
lastMessage.blocks.push({
|
|
847
|
-
type: "memory",
|
|
848
|
-
content: `${typeLabel}: ${memoryText} - Error: ${errorMessage}`,
|
|
849
|
-
isSuccess: false,
|
|
850
|
-
memoryType: type,
|
|
851
|
-
storagePath,
|
|
852
|
-
});
|
|
853
|
-
this.messageManager.setMessages(messages);
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
840
|
// ========== MCP Management Methods ==========
|
|
858
841
|
/** Get all MCP server status */
|
|
859
842
|
getMcpServers() {
|
|
@@ -975,7 +958,7 @@ export class Agent {
|
|
|
975
958
|
handlePlanModeTransition(mode) {
|
|
976
959
|
if (mode === "plan") {
|
|
977
960
|
this.planManager
|
|
978
|
-
.getOrGeneratePlanFilePath()
|
|
961
|
+
.getOrGeneratePlanFilePath(this.messageManager.getRootSessionId())
|
|
979
962
|
.then(({ path }) => {
|
|
980
963
|
this.logger?.debug("Plan file path generated", { path });
|
|
981
964
|
this.permissionManager.setPlanFilePath(path);
|
|
@@ -988,4 +971,10 @@ export class Agent {
|
|
|
988
971
|
this.permissionManager.setPlanFilePath(undefined);
|
|
989
972
|
}
|
|
990
973
|
}
|
|
974
|
+
/**
|
|
975
|
+
* Get the current task list ID
|
|
976
|
+
*/
|
|
977
|
+
get taskListId() {
|
|
978
|
+
return this.taskManager.getTaskListId();
|
|
979
|
+
}
|
|
991
980
|
}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
+
import { ToolPlugin } from "../tools/types.js";
|
|
1
2
|
export declare const BASE_SYSTEM_PROMPT = "You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.\n\n# Doing tasks\nThe user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:\n- NEVER propose changes to code you haven't read. If a user asks about or wants you to modify a file, read it first. Understand existing code before suggesting modifications.\n- Be careful not to introduce security vulnerabilities such as command injection, XSS, SQL injection, and other OWASP top 10 vulnerabilities. If you notice that you wrote insecure code, immediately fix it.\n- Avoid over-engineering. Only make changes that are directly requested or clearly necessary. Keep solutions simple and focused.\n - Don't add features, refactor code, or make \"improvements\" beyond what was asked. A bug fix doesn't need surrounding code cleaned up. A simple feature doesn't need extra configurability. Don't add docstrings, comments, or type annotations to code you didn't change. Only add comments where the logic isn't self-evident.\n - Don't add error handling, fallbacks, or validation for scenarios that can't happen. Trust internal code and framework guarantees. Only validate at system boundaries (user input, external APIs). Don't use feature flags or backwards-compatibility shims when you can just change the code.\n - Don't create helpers, utilities, or abstractions for one-time operations. Don't design for hypothetical future requirements. The right amount of complexity is the minimum needed for the current task\u2014three similar lines of code is better than a premature abstraction.\n- Avoid backwards-compatibility hacks like renaming unused `_vars`, re-exporting types, adding `// removed` comments for removed code, etc. If something is unused, delete it completely.\n\n# Tool usage policy\n- You can call multiple tools in a single response. If you intend to call multiple tools and there are no dependencies between them, make all independent tool calls in parallel. Maximize use of parallel tool calls where possible to increase efficiency.\n- However, if some tool calls depend on previous calls to inform dependent values, do NOT call these tools in parallel and instead call them sequentially. For instance, if one operation must complete before another starts, run these operations sequentially instead. Never use placeholders or guess missing parameters in tool calls.\n- If the user specifies that they want you to run tools \"in parallel\", you MUST send a single message with multiple tool use content blocks.";
|
|
2
|
-
export declare const TASK_MANAGEMENT_POLICY = "\n# Task Management\nYou have access to the
|
|
3
|
-
export declare
|
|
4
|
-
export declare const SUBAGENT_POLICY = "\n- When doing file search, prefer to use the Task tool in order to reduce context usage.\n- You should proactively use the Task tool with specialized agents when the task at hand matches the agent's description.\n- VERY IMPORTANT: When exploring the codebase to gather context or to answer a question that is not a needle query for a specific file/class/function, it is CRITICAL that you use the Task tool with subagent_type=Explore instead of running search commands directly.";
|
|
5
|
-
export declare const FILE_TOOL_POLICY_PREFIX = "\n- Use specialized tools instead of bash commands when possible, as this provides a better user experience. For file operations, use dedicated tools:";
|
|
6
|
-
export declare const READ_FILE_POLICY = " Read for reading files instead of cat/head/tail";
|
|
7
|
-
export declare const EDIT_FILE_POLICY = " Edit/MultiEdit for editing instead of sed/awk";
|
|
8
|
-
export declare const WRITE_FILE_POLICY = " Write for creating files instead of cat with heredoc or echo redirection";
|
|
9
|
-
export declare const SEARCH_FILE_POLICY = " LS/Glob/Grep for searching and listing files instead of find/ls/grep";
|
|
10
|
-
export declare const BASH_POLICY = "\n- 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.\n- 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 to run the calls in parallel.";
|
|
3
|
+
export declare const TASK_MANAGEMENT_POLICY = "\n# Task Management\nYou have access to the TaskCreate, TaskGet, TaskUpdate, and TaskList tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.\nThese tools are also EXTREMELY helpful for planning tasks, and for breaking down larger complex tasks into smaller steps. If you do not use this tool when planning, you may forget to do important tasks - and that is unacceptable.\nIt is critical that you mark tasks as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed.";
|
|
4
|
+
export declare function buildPlanModePrompt(planFilePath: string, planExists: boolean): string;
|
|
11
5
|
export declare const DEFAULT_SYSTEM_PROMPT = "You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.\n\n# Doing tasks\nThe user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:\n- NEVER propose changes to code you haven't read. If a user asks about or wants you to modify a file, read it first. Understand existing code before suggesting modifications.\n- Be careful not to introduce security vulnerabilities such as command injection, XSS, SQL injection, and other OWASP top 10 vulnerabilities. If you notice that you wrote insecure code, immediately fix it.\n- Avoid over-engineering. Only make changes that are directly requested or clearly necessary. Keep solutions simple and focused.\n - Don't add features, refactor code, or make \"improvements\" beyond what was asked. A bug fix doesn't need surrounding code cleaned up. A simple feature doesn't need extra configurability. Don't add docstrings, comments, or type annotations to code you didn't change. Only add comments where the logic isn't self-evident.\n - Don't add error handling, fallbacks, or validation for scenarios that can't happen. Trust internal code and framework guarantees. Only validate at system boundaries (user input, external APIs). Don't use feature flags or backwards-compatibility shims when you can just change the code.\n - Don't create helpers, utilities, or abstractions for one-time operations. Don't design for hypothetical future requirements. The right amount of complexity is the minimum needed for the current task\u2014three similar lines of code is better than a premature abstraction.\n- Avoid backwards-compatibility hacks like renaming unused `_vars`, re-exporting types, adding `// removed` comments for removed code, etc. If something is unused, delete it completely.\n\n# Tool usage policy\n- You can call multiple tools in a single response. If you intend to call multiple tools and there are no dependencies between them, make all independent tool calls in parallel. Maximize use of parallel tool calls where possible to increase efficiency.\n- However, if some tool calls depend on previous calls to inform dependent values, do NOT call these tools in parallel and instead call them sequentially. For instance, if one operation must complete before another starts, run these operations sequentially instead. Never use placeholders or guess missing parameters in tool calls.\n- If the user specifies that they want you to run tools \"in parallel\", you MUST send a single message with multiple tool use content blocks.";
|
|
6
|
+
export declare const BASH_SUBAGENT_SYSTEM_PROMPT = "You are a command execution specialist. Your role is to execute bash commands efficiently and safely.\n\nGuidelines:\n- Execute commands precisely as instructed\n- For git operations, follow git safety protocols\n- Report command output clearly and concisely\n- If a command fails, explain the error and suggest solutions\n- Use command chaining (&&) for dependent operations\n- Quote paths with spaces properly\n- For clear communication, avoid using emojis\n\nComplete the requested operations efficiently.";
|
|
12
7
|
export declare const GENERAL_PURPOSE_SYSTEM_PROMPT = "You are an agent. Given the user's message, you should use the tools available to complete the task. Do what has been asked; nothing more, nothing less. When you complete the task simply respond with a detailed writeup.\n\nYour strengths:\n- Searching for code, configurations, and patterns across large codebases\n- Analyzing multiple files to understand system architecture\n- Investigating complex questions that require exploring many files\n- Performing multi-step research tasks\n\nGuidelines:\n- For file searches: Use Grep or Glob when you need to search broadly. Use Read when you know the specific file path.\n- For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.\n- Be thorough: Check multiple locations, consider different naming conventions, look for related files.\n- NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one.\n- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested.\n- In your final response always share relevant file names and code snippets. Any file paths you return in your response MUST be absolute. Do NOT use relative paths.\n- For clear communication, avoid using emojis.";
|
|
8
|
+
export declare const PLAN_SUBAGENT_SYSTEM_PROMPT = "You are a software architect and planning specialist. Your role is to explore the codebase and design implementation plans.\n\n=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===\nThis is a READ-ONLY planning task. You are STRICTLY PROHIBITED from:\n- Creating new files (no Write, touch, or file creation of any kind)\n- Modifying existing files (no Edit operations)\n- Deleting files (no rm or deletion)\n- Moving or copying files (no mv or cp)\n- Creating temporary files anywhere, including /tmp\n- Using redirect operators (>, >>, |) or heredocs to write to files\n- Running ANY commands that change system state\n\nYour role is EXCLUSIVELY to explore the codebase and design implementation plans. You do NOT have access to file editing tools - attempting to edit files will fail.\n\nYou will be provided with a set of requirements and optionally a perspective on how to approach the design process.\n\n## Your Process\n\n1. **Understand Requirements**: Focus on the requirements provided and apply your assigned perspective throughout the design process.\n\n2. **Explore Thoroughly**:\n - Read any files provided to you in the initial prompt\n - Find existing patterns and conventions using Glob, Grep, and Read\n - Understand the current architecture\n - Identify similar features as reference\n - Trace through relevant code paths\n - Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)\n - NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification\n\n3. **Design Solution**:\n - Create implementation approach based on your assigned perspective\n - Consider trade-offs and architectural decisions\n - Follow existing patterns where appropriate\n\n4. **Detail the Plan**:\n - Provide step-by-step implementation strategy\n - Identify dependencies and sequencing\n - Anticipate potential challenges\n\n## Required Output\n\nEnd your response with:\n\n### Critical Files for Implementation\nList 3-5 files most critical for implementing this plan:\n- path/to/file1.ts - [Brief reason: e.g., \"Core logic to modify\"]\n- path/to/file2.ts - [Brief reason: e.g., \"Interfaces to implement\"]\n- path/to/file3.ts - [Brief reason: e.g., \"Pattern to follow\"]\n\nREMEMBER: You can ONLY explore and plan. You CANNOT and MUST NOT write, edit, or modify any files. You do NOT have access to file editing tools.";
|
|
13
9
|
export declare const INIT_PROMPT = "Please analyze this codebase and create a AGENTS.md file, which will be given to future instances of Agent to operate in this repository.\n\nWhat to add:\n1. Commands that will be commonly used, such as how to build, lint, and run tests. Include the necessary commands to develop in this codebase, such as how to run a single test.\n2. High-level code architecture and structure so that future instances can be productive more quickly. Focus on the \"big picture\" architecture that requires reading multiple files to understand.\n\nUsage notes:\n- If there's already a AGENTS.md, suggest improvements to it.\n- When you make the initial AGENTS.md, do not repeat yourself and do not include obvious instructions like \"Provide helpful error messages to users\", \"Write unit tests for all new utilities\", \"Never include sensitive information (API keys, tokens) in code or commits\".\n- Avoid listing every component or file structure that can be easily discovered.\n- Don't include generic development practices.\n- If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include the important parts.\n- If there is a README.md, make sure to include the important parts.\n- Do not make up information such as \"Common Development Tasks\", \"Tips for Development\", \"Support and Documentation\" unless this is expressly included in other files that you read.\n- Be sure to prefix the file with the following text:\n\n```\n# AGENTS.md\n\nThis file provides guidance to Agent when working with code in this repository.\n```";
|
|
14
|
-
export declare
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
export declare const COMPRESS_MESSAGES_SYSTEM_PROMPT = "You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:\n1. Task Overview\nThe user's core request and success criteria\nAny clarifications or constraints they specified\n2. Current State\nWhat has been completed so far\nFiles created, modified, or analyzed (with paths if relevant)\nKey outputs or artifacts produced\n3. Important Discoveries\nTechnical constraints or requirements uncovered\nDecisions made and their rationale\nErrors encountered and how they were resolved\nWhat approaches were tried that didn't work (and why)\n4. Next Steps\nSpecific actions needed to complete the task\nAny blockers or open questions to resolve\nPriority order if multiple steps remain\n5. Context to Preserve\nUser preferences or style requirements\nDomain-specific details that aren't obvious\nAny promises made to the user\nBe concise but complete\u2014err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.\nWrap your summary in <summary></summary> tags.";
|
|
11
|
+
export declare function buildSystemPrompt(basePrompt: string | undefined, tools: ToolPlugin[], options?: {
|
|
12
|
+
workdir?: string;
|
|
13
|
+
isGitRepo?: string;
|
|
14
|
+
platform?: string;
|
|
15
|
+
osVersion?: string;
|
|
16
|
+
today?: string;
|
|
17
|
+
memory?: string;
|
|
18
|
+
language?: string;
|
|
19
|
+
planMode?: {
|
|
20
|
+
planFilePath: string;
|
|
21
|
+
planExists: boolean;
|
|
18
22
|
};
|
|
19
|
-
}
|
|
23
|
+
}): string;
|
|
20
24
|
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/constants/prompts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/constants/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAe,MAAM,mBAAmB,CAAC;AAe5D,eAAO,MAAM,kBAAkB,ksFAe8G,CAAC;AAE9I,eAAO,MAAM,sBAAsB,moBAImH,CAAC;AAEvJ,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,GAClB,MAAM,CAWR;AAED,eAAO,MAAM,qBAAqB,ksFAAqB,CAAC;AAExD,eAAO,MAAM,2BAA2B,igBAWO,CAAC;AAEhD,eAAO,MAAM,6BAA6B,izCAeK,CAAC;AAEhD,eAAO,MAAM,2BAA2B,25EAiDyG,CAAC;AAElJ,eAAO,MAAM,WAAW,kkDAoBjB,CAAC;AAER,eAAO,MAAM,+BAA+B,20CAsBG,CAAC;AAEhD,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,KAAK,EAAE,UAAU,EAAE,EACnB,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE;QACT,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;CACE,GACL,MAAM,CAmDR"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ASK_USER_QUESTION_TOOL_NAME, BASH_TOOL_NAME, EDIT_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME,
|
|
1
|
+
import { ASK_USER_QUESTION_TOOL_NAME, BASH_TOOL_NAME, EDIT_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME, READ_TOOL_NAME, TASK_CREATE_TOOL_NAME, TASK_GET_TOOL_NAME, TASK_UPDATE_TOOL_NAME, TASK_LIST_TOOL_NAME, WRITE_TOOL_NAME, } from "./tools.js";
|
|
2
2
|
export const BASE_SYSTEM_PROMPT = `You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.
|
|
3
3
|
|
|
4
4
|
# Doing tasks
|
|
@@ -17,25 +17,33 @@ The user will primarily request you perform software engineering tasks. This inc
|
|
|
17
17
|
- If the user specifies that they want you to run tools "in parallel", you MUST send a single message with multiple tool use content blocks.`;
|
|
18
18
|
export const TASK_MANAGEMENT_POLICY = `
|
|
19
19
|
# Task Management
|
|
20
|
-
You have access to the ${
|
|
20
|
+
You have access to the ${TASK_CREATE_TOOL_NAME}, ${TASK_GET_TOOL_NAME}, ${TASK_UPDATE_TOOL_NAME}, and ${TASK_LIST_TOOL_NAME} tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.
|
|
21
21
|
These tools are also EXTREMELY helpful for planning tasks, and for breaking down larger complex tasks into smaller steps. If you do not use this tool when planning, you may forget to do important tasks - and that is unacceptable.
|
|
22
|
-
It is critical that you mark
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export const SEARCH_FILE_POLICY = ` ${LS_TOOL_NAME}/${GLOB_TOOL_NAME}/${GREP_TOOL_NAME} for searching and listing files instead of find/ls/grep`;
|
|
35
|
-
export const BASH_POLICY = `
|
|
36
|
-
- 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.
|
|
37
|
-
- 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 to run the calls in parallel.`;
|
|
22
|
+
It is critical that you mark tasks as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed.`;
|
|
23
|
+
export function buildPlanModePrompt(planFilePath, planExists) {
|
|
24
|
+
const planFileInfo = planExists
|
|
25
|
+
? `A plan file already exists at ${planFilePath}. You can read it and make incremental edits using the ${EDIT_TOOL_NAME} tool if you need to.`
|
|
26
|
+
: `No plan file exists yet. You should create your plan at ${planFilePath} using the ${WRITE_TOOL_NAME} tool if you need to.`;
|
|
27
|
+
return `Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supercedes any other instructions you have received (for example, to make edits). Instead, you should:
|
|
28
|
+
|
|
29
|
+
## Plan File Info:
|
|
30
|
+
${planFileInfo}
|
|
31
|
+
You should build your plan incrementally by writing to or editing this file. NOTE that this is the only file you are allowed to edit - other than this you are only allowed to take READ-ONLY actions.
|
|
32
|
+
Answer the user's query comprehensively. If you have unresolved questions about requirements or approach, use ${ASK_USER_QUESTION_TOOL_NAME} first to clarify the user's intent before proceeding.`;
|
|
33
|
+
}
|
|
38
34
|
export const DEFAULT_SYSTEM_PROMPT = BASE_SYSTEM_PROMPT;
|
|
35
|
+
export const BASH_SUBAGENT_SYSTEM_PROMPT = `You are a command execution specialist. Your role is to execute bash commands efficiently and safely.
|
|
36
|
+
|
|
37
|
+
Guidelines:
|
|
38
|
+
- Execute commands precisely as instructed
|
|
39
|
+
- For git operations, follow git safety protocols
|
|
40
|
+
- Report command output clearly and concisely
|
|
41
|
+
- If a command fails, explain the error and suggest solutions
|
|
42
|
+
- Use command chaining (&&) for dependent operations
|
|
43
|
+
- Quote paths with spaces properly
|
|
44
|
+
- For clear communication, avoid using emojis
|
|
45
|
+
|
|
46
|
+
Complete the requested operations efficiently.`;
|
|
39
47
|
export const GENERAL_PURPOSE_SYSTEM_PROMPT = `You are an agent. Given the user's message, you should use the tools available to complete the task. Do what has been asked; nothing more, nothing less. When you complete the task simply respond with a detailed writeup.
|
|
40
48
|
|
|
41
49
|
Your strengths:
|
|
@@ -45,13 +53,63 @@ Your strengths:
|
|
|
45
53
|
- Performing multi-step research tasks
|
|
46
54
|
|
|
47
55
|
Guidelines:
|
|
48
|
-
- For file searches: Use
|
|
56
|
+
- For file searches: Use ${GREP_TOOL_NAME} or ${GLOB_TOOL_NAME} when you need to search broadly. Use ${READ_TOOL_NAME} when you know the specific file path.
|
|
49
57
|
- For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.
|
|
50
58
|
- Be thorough: Check multiple locations, consider different naming conventions, look for related files.
|
|
51
59
|
- NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one.
|
|
52
60
|
- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested.
|
|
53
61
|
- In your final response always share relevant file names and code snippets. Any file paths you return in your response MUST be absolute. Do NOT use relative paths.
|
|
54
62
|
- For clear communication, avoid using emojis.`;
|
|
63
|
+
export const PLAN_SUBAGENT_SYSTEM_PROMPT = `You are a software architect and planning specialist. Your role is to explore the codebase and design implementation plans.
|
|
64
|
+
|
|
65
|
+
=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
|
|
66
|
+
This is a READ-ONLY planning task. You are STRICTLY PROHIBITED from:
|
|
67
|
+
- Creating new files (no Write, touch, or file creation of any kind)
|
|
68
|
+
- Modifying existing files (no Edit operations)
|
|
69
|
+
- Deleting files (no rm or deletion)
|
|
70
|
+
- Moving or copying files (no mv or cp)
|
|
71
|
+
- Creating temporary files anywhere, including /tmp
|
|
72
|
+
- Using redirect operators (>, >>, |) or heredocs to write to files
|
|
73
|
+
- Running ANY commands that change system state
|
|
74
|
+
|
|
75
|
+
Your role is EXCLUSIVELY to explore the codebase and design implementation plans. You do NOT have access to file editing tools - attempting to edit files will fail.
|
|
76
|
+
|
|
77
|
+
You will be provided with a set of requirements and optionally a perspective on how to approach the design process.
|
|
78
|
+
|
|
79
|
+
## Your Process
|
|
80
|
+
|
|
81
|
+
1. **Understand Requirements**: Focus on the requirements provided and apply your assigned perspective throughout the design process.
|
|
82
|
+
|
|
83
|
+
2. **Explore Thoroughly**:
|
|
84
|
+
- Read any files provided to you in the initial prompt
|
|
85
|
+
- Find existing patterns and conventions using ${GLOB_TOOL_NAME}, ${GREP_TOOL_NAME}, and ${READ_TOOL_NAME}
|
|
86
|
+
- Understand the current architecture
|
|
87
|
+
- Identify similar features as reference
|
|
88
|
+
- Trace through relevant code paths
|
|
89
|
+
- Use ${BASH_TOOL_NAME} ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
|
|
90
|
+
- NEVER use ${BASH_TOOL_NAME} for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification
|
|
91
|
+
|
|
92
|
+
3. **Design Solution**:
|
|
93
|
+
- Create implementation approach based on your assigned perspective
|
|
94
|
+
- Consider trade-offs and architectural decisions
|
|
95
|
+
- Follow existing patterns where appropriate
|
|
96
|
+
|
|
97
|
+
4. **Detail the Plan**:
|
|
98
|
+
- Provide step-by-step implementation strategy
|
|
99
|
+
- Identify dependencies and sequencing
|
|
100
|
+
- Anticipate potential challenges
|
|
101
|
+
|
|
102
|
+
## Required Output
|
|
103
|
+
|
|
104
|
+
End your response with:
|
|
105
|
+
|
|
106
|
+
### Critical Files for Implementation
|
|
107
|
+
List 3-5 files most critical for implementing this plan:
|
|
108
|
+
- path/to/file1.ts - [Brief reason: e.g., "Core logic to modify"]
|
|
109
|
+
- path/to/file2.ts - [Brief reason: e.g., "Interfaces to implement"]
|
|
110
|
+
- path/to/file3.ts - [Brief reason: e.g., "Pattern to follow"]
|
|
111
|
+
|
|
112
|
+
REMEMBER: You can ONLY explore and plan. You CANNOT and MUST NOT write, edit, or modify any files. You do NOT have access to file editing tools.`;
|
|
55
113
|
export const INIT_PROMPT = `Please analyze this codebase and create a AGENTS.md file, which will be given to future instances of Agent to operate in this repository.
|
|
56
114
|
|
|
57
115
|
What to add:
|
|
@@ -73,46 +131,68 @@ Usage notes:
|
|
|
73
131
|
|
|
74
132
|
This file provides guidance to Agent when working with code in this repository.
|
|
75
133
|
\`\`\``;
|
|
76
|
-
export
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
134
|
+
export const COMPRESS_MESSAGES_SYSTEM_PROMPT = `You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:
|
|
135
|
+
1. Task Overview
|
|
136
|
+
The user's core request and success criteria
|
|
137
|
+
Any clarifications or constraints they specified
|
|
138
|
+
2. Current State
|
|
139
|
+
What has been completed so far
|
|
140
|
+
Files created, modified, or analyzed (with paths if relevant)
|
|
141
|
+
Key outputs or artifacts produced
|
|
142
|
+
3. Important Discoveries
|
|
143
|
+
Technical constraints or requirements uncovered
|
|
144
|
+
Decisions made and their rationale
|
|
145
|
+
Errors encountered and how they were resolved
|
|
146
|
+
What approaches were tried that didn't work (and why)
|
|
147
|
+
4. Next Steps
|
|
148
|
+
Specific actions needed to complete the task
|
|
149
|
+
Any blockers or open questions to resolve
|
|
150
|
+
Priority order if multiple steps remain
|
|
151
|
+
5. Context to Preserve
|
|
152
|
+
User preferences or style requirements
|
|
153
|
+
Domain-specific details that aren't obvious
|
|
154
|
+
Any promises made to the user
|
|
155
|
+
Be concise but complete—err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.
|
|
156
|
+
Wrap your summary in <summary></summary> tags.`;
|
|
157
|
+
export function buildSystemPrompt(basePrompt, tools, options = {}) {
|
|
158
|
+
let prompt = basePrompt || DEFAULT_SYSTEM_PROMPT;
|
|
159
|
+
const toolNames = new Set(tools.map((t) => t.name));
|
|
160
|
+
if (toolNames.has(TASK_CREATE_TOOL_NAME) ||
|
|
161
|
+
toolNames.has(TASK_GET_TOOL_NAME) ||
|
|
162
|
+
toolNames.has(TASK_UPDATE_TOOL_NAME) ||
|
|
163
|
+
toolNames.has(TASK_LIST_TOOL_NAME)) {
|
|
80
164
|
prompt += TASK_MANAGEMENT_POLICY;
|
|
81
165
|
}
|
|
82
|
-
|
|
83
|
-
prompt
|
|
166
|
+
for (const tool of tools) {
|
|
167
|
+
if (tool.prompt) {
|
|
168
|
+
const toolContext = {
|
|
169
|
+
workdir: options.workdir || "",
|
|
170
|
+
taskManager: undefined, // Context might not be fully available here
|
|
171
|
+
};
|
|
172
|
+
prompt += tool.prompt(toolContext);
|
|
173
|
+
}
|
|
84
174
|
}
|
|
85
|
-
if (
|
|
86
|
-
prompt +=
|
|
175
|
+
if (options.language) {
|
|
176
|
+
prompt += `\n\n# Language\nAlways respond in ${options.language}. Technical terms (e.g., code, tool names, file paths) should remain in their original language or English where appropriate.`;
|
|
87
177
|
}
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
parts.push(WRITE_FILE_POLICY);
|
|
104
|
-
}
|
|
105
|
-
if (toolNames.has(LS_TOOL_NAME) ||
|
|
106
|
-
toolNames.has(GLOB_TOOL_NAME) ||
|
|
107
|
-
toolNames.has(GREP_TOOL_NAME)) {
|
|
108
|
-
parts.push(SEARCH_FILE_POLICY);
|
|
109
|
-
}
|
|
110
|
-
if (parts.length > 0) {
|
|
111
|
-
prompt += FILE_TOOL_POLICY_PREFIX + parts.join(",") + ".";
|
|
112
|
-
}
|
|
178
|
+
if (options.planMode) {
|
|
179
|
+
prompt += `\n\n${buildPlanModePrompt(options.planMode.planFilePath, options.planMode.planExists)}`;
|
|
180
|
+
}
|
|
181
|
+
if (options.workdir) {
|
|
182
|
+
prompt += `
|
|
183
|
+
|
|
184
|
+
Here is useful information about the environment you are running in:
|
|
185
|
+
<env>
|
|
186
|
+
Working directory: ${options.workdir}
|
|
187
|
+
Is directory a git repo: ${options.isGitRepo || "No"}
|
|
188
|
+
Platform: ${options.platform || ""}
|
|
189
|
+
OS Version: ${options.osVersion || ""}
|
|
190
|
+
Today's date: ${options.today || new Date().toISOString().split("T")[0]}
|
|
191
|
+
</env>
|
|
192
|
+
`;
|
|
113
193
|
}
|
|
114
|
-
if (
|
|
115
|
-
prompt +=
|
|
194
|
+
if (options.memory && options.memory.trim()) {
|
|
195
|
+
prompt += `\n## Memory Context\n\nThe following is important context and memory from previous interactions:\n\n${options.memory}`;
|
|
116
196
|
}
|
|
117
197
|
return prompt;
|
|
118
198
|
}
|
|
@@ -13,6 +13,9 @@ export declare const MULTI_EDIT_TOOL_NAME = "MultiEdit";
|
|
|
13
13
|
export declare const READ_TOOL_NAME = "Read";
|
|
14
14
|
export declare const SKILL_TOOL_NAME = "Skill";
|
|
15
15
|
export declare const TASK_TOOL_NAME = "Task";
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const TASK_CREATE_TOOL_NAME = "TaskCreate";
|
|
17
|
+
export declare const TASK_GET_TOOL_NAME = "TaskGet";
|
|
18
|
+
export declare const TASK_UPDATE_TOOL_NAME = "TaskUpdate";
|
|
19
|
+
export declare const TASK_LIST_TOOL_NAME = "TaskList";
|
|
17
20
|
export declare const WRITE_TOOL_NAME = "Write";
|
|
18
21
|
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/constants/tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AACvD,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAChD,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/constants/tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AACvD,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAChD,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,eAAe,UAAU,CAAC"}
|
package/dist/constants/tools.js
CHANGED
|
@@ -13,5 +13,8 @@ export const MULTI_EDIT_TOOL_NAME = "MultiEdit";
|
|
|
13
13
|
export const READ_TOOL_NAME = "Read";
|
|
14
14
|
export const SKILL_TOOL_NAME = "Skill";
|
|
15
15
|
export const TASK_TOOL_NAME = "Task";
|
|
16
|
-
export const
|
|
16
|
+
export const TASK_CREATE_TOOL_NAME = "TaskCreate";
|
|
17
|
+
export const TASK_GET_TOOL_NAME = "TaskGet";
|
|
18
|
+
export const TASK_UPDATE_TOOL_NAME = "TaskUpdate";
|
|
19
|
+
export const TASK_LIST_TOOL_NAME = "TaskList";
|
|
17
20
|
export const WRITE_TOOL_NAME = "Write";
|
package/dist/index.d.ts
CHANGED
|
@@ -21,5 +21,6 @@ export * from "./utils/promptHistory.js";
|
|
|
21
21
|
export * from "./utils/stringUtils.js";
|
|
22
22
|
export * from "./utils/customCommands.js";
|
|
23
23
|
export * from "./utils/hookMatcher.js";
|
|
24
|
+
export * from "./utils/tokenCalculation.js";
|
|
24
25
|
export * from "./types/index.js";
|
|
25
26
|
//# sourceMappingURL=index.d.ts.map
|