wave-agent-sdk 0.17.5 → 0.17.7
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 +18 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +114 -1
- package/dist/managers/MemoryRuleManager.d.ts.map +1 -1
- package/dist/managers/MemoryRuleManager.js +30 -13
- package/dist/managers/aiManager.d.ts +1 -0
- package/dist/managers/aiManager.d.ts.map +1 -1
- package/dist/managers/aiManager.js +20 -62
- package/dist/managers/hookManager.d.ts.map +1 -1
- package/dist/managers/hookManager.js +3 -1
- package/dist/managers/lspManager.d.ts.map +1 -1
- package/dist/managers/lspManager.js +12 -4
- package/dist/managers/mcpManager.d.ts.map +1 -1
- package/dist/managers/mcpManager.js +13 -6
- package/dist/managers/messageManager.d.ts.map +1 -1
- package/dist/managers/messageManager.js +0 -4
- package/dist/managers/permissionManager.d.ts.map +1 -1
- package/dist/managers/permissionManager.js +7 -2
- package/dist/managers/planManager.d.ts +3 -0
- package/dist/managers/planManager.d.ts.map +1 -1
- package/dist/managers/planManager.js +9 -0
- package/dist/managers/skillManager.d.ts +3 -0
- package/dist/managers/skillManager.d.ts.map +1 -1
- package/dist/managers/skillManager.js +69 -54
- package/dist/managers/slashCommandManager.d.ts +0 -6
- package/dist/managers/slashCommandManager.d.ts.map +1 -1
- package/dist/managers/slashCommandManager.js +0 -170
- package/dist/managers/toolManager.d.ts.map +1 -1
- package/dist/managers/toolManager.js +2 -5
- package/dist/prompts/planModeReminders.d.ts +0 -1
- package/dist/prompts/planModeReminders.d.ts.map +1 -1
- package/dist/prompts/planModeReminders.js +3 -12
- package/dist/services/MarketplaceService.d.ts.map +1 -1
- package/dist/services/MarketplaceService.js +12 -4
- package/dist/services/memory.d.ts.map +1 -1
- package/dist/services/memory.js +39 -5
- package/dist/services/pluginLoader.d.ts.map +1 -1
- package/dist/services/pluginLoader.js +30 -7
- package/dist/types/skills.d.ts +1 -0
- package/dist/types/skills.d.ts.map +1 -1
- package/dist/utils/customCommands.d.ts.map +1 -1
- package/dist/utils/customCommands.js +11 -9
- package/dist/utils/skillParser.d.ts.map +1 -1
- package/dist/utils/skillParser.js +3 -1
- package/dist/utils/subagentParser.d.ts.map +1 -1
- package/dist/utils/subagentParser.js +18 -7
- package/package.json +1 -1
- package/src/agent.ts +146 -1
- package/src/managers/MemoryRuleManager.ts +29 -14
- package/src/managers/aiManager.ts +28 -78
- package/src/managers/hookManager.ts +6 -1
- package/src/managers/lspManager.ts +23 -5
- package/src/managers/mcpManager.ts +24 -7
- package/src/managers/messageManager.ts +0 -5
- package/src/managers/permissionManager.ts +8 -1
- package/src/managers/planManager.ts +11 -0
- package/src/managers/skillManager.ts +90 -57
- package/src/managers/slashCommandManager.ts +0 -215
- package/src/managers/toolManager.ts +2 -9
- package/src/prompts/planModeReminders.ts +3 -15
- package/src/services/MarketplaceService.ts +22 -4
- package/src/services/memory.ts +43 -6
- package/src/services/pluginLoader.ts +35 -7
- package/src/types/skills.ts +1 -0
- package/src/utils/customCommands.ts +17 -12
- package/src/utils/skillParser.ts +3 -1
- package/src/utils/subagentParser.ts +22 -8
|
@@ -10,6 +10,7 @@ export class PlanManager {
|
|
|
10
10
|
constructor(container) {
|
|
11
11
|
this.container = container;
|
|
12
12
|
this.currentPlanFilePath = null;
|
|
13
|
+
this.planEntryReminderPending = false;
|
|
13
14
|
this.planDir = path.join(os.homedir(), ".wave", "plans");
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
@@ -58,6 +59,7 @@ export class PlanManager {
|
|
|
58
59
|
// Entering plan mode: clear any pending exit attachment
|
|
59
60
|
// (prevents sending both plan_mode and plan_mode_exit on rapid toggle)
|
|
60
61
|
permissionManager?.setNeedsPlanModeExitAttachment(false);
|
|
62
|
+
this.planEntryReminderPending = true;
|
|
61
63
|
this.getOrGeneratePlanFilePath(messageManager?.getRootSessionId())
|
|
62
64
|
.then(({ path }) => {
|
|
63
65
|
logger?.debug("Plan file path generated", { path });
|
|
@@ -72,9 +74,16 @@ export class PlanManager {
|
|
|
72
74
|
permissionManager?.setHasExitedPlanMode(true);
|
|
73
75
|
permissionManager?.setNeedsPlanModeExitAttachment(true);
|
|
74
76
|
permissionManager?.setPlanFilePath(undefined);
|
|
77
|
+
this.planEntryReminderPending = false;
|
|
75
78
|
}
|
|
76
79
|
else {
|
|
77
80
|
permissionManager?.setPlanFilePath(undefined);
|
|
78
81
|
}
|
|
79
82
|
}
|
|
83
|
+
isPlanEntryReminderPending() {
|
|
84
|
+
return this.planEntryReminderPending;
|
|
85
|
+
}
|
|
86
|
+
consumePlanEntryReminder() {
|
|
87
|
+
this.planEntryReminderPending = false;
|
|
88
|
+
}
|
|
80
89
|
}
|
|
@@ -7,6 +7,7 @@ import { Container } from "../utils/container.js";
|
|
|
7
7
|
export declare class SkillManager extends EventEmitter {
|
|
8
8
|
private container;
|
|
9
9
|
private personalSkillsPath;
|
|
10
|
+
private personalClaudeSkillsPath;
|
|
10
11
|
private scanTimeout;
|
|
11
12
|
private workdir;
|
|
12
13
|
private skillMetadata;
|
|
@@ -58,6 +59,8 @@ export declare class SkillManager extends EventEmitter {
|
|
|
58
59
|
* Discover skills in a specific directory
|
|
59
60
|
*/
|
|
60
61
|
private discoverSkillCollection;
|
|
62
|
+
private scanSkillPath;
|
|
63
|
+
private processSkillDirs;
|
|
61
64
|
/**
|
|
62
65
|
* Find all directories that could contain skills
|
|
63
66
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skillManager.d.ts","sourceRoot":"","sources":["../../src/managers/skillManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,KAAK,EAGL,aAAa,EACb,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAU3B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD;;GAEG;A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YACW,cAAc;IAqC5B;;OAEG;YACW,uBAAuB;YAwBvB,aAAa;YAiBb,gBAAgB;IAsD9B;;OAEG;YACW,oBAAoB;IA4BlC;;OAEG;IACG,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC;QAC/C,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,sBAAsB,CAAC;QACjC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;KACzB,CAAC;IA8BF;;OAEG;IACG,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAC5C;QACE,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,KAAK,CAAC;KACd,GACD;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,SAAS,CAAA;KAAE,CACzC;IA6BD;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAkC3B;;OAEG;YACW,yBAAyB;IASvC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAc7B;;OAEG;IACH,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI;CA8BhE"}
|
|
@@ -23,6 +23,8 @@ export class SkillManager extends EventEmitter {
|
|
|
23
23
|
this.fileWatcher = null;
|
|
24
24
|
this.personalSkillsPath =
|
|
25
25
|
options.personalSkillsPath || join(homedir(), ".wave", "skills");
|
|
26
|
+
this.personalClaudeSkillsPath =
|
|
27
|
+
options.personalClaudeSkillsPath || join(homedir(), ".claude", "skills");
|
|
26
28
|
this.scanTimeout = options.scanTimeout || 5000;
|
|
27
29
|
this.workdir = options.workdir || process.cwd();
|
|
28
30
|
this.watchEnabled = options.watch ?? false;
|
|
@@ -89,7 +91,9 @@ export class SkillManager extends EventEmitter {
|
|
|
89
91
|
this.fileWatcher = new FileWatcherService(logger);
|
|
90
92
|
const pathsToWatch = [
|
|
91
93
|
this.personalSkillsPath,
|
|
94
|
+
this.personalClaudeSkillsPath,
|
|
92
95
|
join(this.workdir, ".wave", "skills"),
|
|
96
|
+
join(this.workdir, ".claude", "skills"),
|
|
93
97
|
];
|
|
94
98
|
logger?.debug(`Setting up skill watcher for: ${pathsToWatch.join(", ")}`);
|
|
95
99
|
for (const pathToWatch of pathsToWatch) {
|
|
@@ -163,14 +167,19 @@ export class SkillManager extends EventEmitter {
|
|
|
163
167
|
*/
|
|
164
168
|
async discoverSkills() {
|
|
165
169
|
const builtinCollection = await this.discoverSkillCollection(getBuiltinSkillsDir(), "builtin");
|
|
170
|
+
const personalClaudeCollection = await this.discoverSkillCollection(this.personalClaudeSkillsPath, "personal");
|
|
166
171
|
const personalCollection = await this.discoverSkillCollection(this.personalSkillsPath, "personal");
|
|
167
172
|
const projectCollection = await this.discoverSkillCollection(this.workdir, "project");
|
|
168
173
|
return {
|
|
169
174
|
builtinSkills: builtinCollection.skills,
|
|
170
|
-
personalSkills:
|
|
175
|
+
personalSkills: new Map([
|
|
176
|
+
...personalClaudeCollection.skills,
|
|
177
|
+
...personalCollection.skills, // .wave overrides .claude
|
|
178
|
+
]),
|
|
171
179
|
projectSkills: projectCollection.skills,
|
|
172
180
|
errors: [
|
|
173
181
|
...builtinCollection.errors,
|
|
182
|
+
...personalClaudeCollection.errors,
|
|
174
183
|
...personalCollection.errors,
|
|
175
184
|
...projectCollection.errors,
|
|
176
185
|
],
|
|
@@ -186,71 +195,75 @@ export class SkillManager extends EventEmitter {
|
|
|
186
195
|
skills: new Map(),
|
|
187
196
|
errors: [],
|
|
188
197
|
};
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
198
|
+
if (type === "project") {
|
|
199
|
+
// Scan .claude/skills first, then .wave/skills (wave overrides)
|
|
200
|
+
const claudePath = join(basePath, ".claude", "skills");
|
|
201
|
+
const wavePath = join(basePath, ".wave", "skills");
|
|
202
|
+
await this.scanSkillPath(claudePath, collection);
|
|
203
|
+
await this.scanSkillPath(wavePath, collection);
|
|
195
204
|
}
|
|
196
205
|
else {
|
|
197
|
-
|
|
206
|
+
await this.scanSkillPath(basePath, collection);
|
|
198
207
|
}
|
|
208
|
+
return collection;
|
|
209
|
+
}
|
|
210
|
+
async scanSkillPath(skillsPath, collection) {
|
|
199
211
|
try {
|
|
200
212
|
const skillDirs = await this.findSkillDirectories(skillsPath);
|
|
201
213
|
logger?.debug(`Found ${skillDirs.length} potential skill directories in ${skillsPath}`);
|
|
202
|
-
|
|
214
|
+
await this.processSkillDirs(skillDirs, collection);
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
logger?.debug(`Could not scan ${skillsPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
async processSkillDirs(skillDirs, collection) {
|
|
221
|
+
for (const skillDir of skillDirs) {
|
|
222
|
+
try {
|
|
223
|
+
const skillFilePath = join(skillDir, "SKILL.md");
|
|
224
|
+
// Check if SKILL.md exists
|
|
203
225
|
try {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
collection.skills.set(skillMetadata.name, skillMetadata);
|
|
231
|
-
// Store the full skill content in the manager's skillContent map
|
|
232
|
-
this.skillContent.set(skillMetadata.name, skill);
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
collection.errors.push({
|
|
236
|
-
skillPath: skillDir,
|
|
237
|
-
message: parsed.validationErrors.join("; "),
|
|
238
|
-
});
|
|
239
|
-
}
|
|
226
|
+
await stat(skillFilePath);
|
|
227
|
+
}
|
|
228
|
+
catch {
|
|
229
|
+
continue; // Skip directories without SKILL.md
|
|
230
|
+
}
|
|
231
|
+
const parsed = parseSkillFile(skillFilePath, {
|
|
232
|
+
basePath: skillDir,
|
|
233
|
+
validateMetadata: true,
|
|
234
|
+
});
|
|
235
|
+
if (parsed.isValid) {
|
|
236
|
+
// Override the skill type with the collection type
|
|
237
|
+
const skillMetadata = {
|
|
238
|
+
...parsed.skillMetadata,
|
|
239
|
+
type: collection.type,
|
|
240
|
+
};
|
|
241
|
+
// Create full skill object with content
|
|
242
|
+
const skill = {
|
|
243
|
+
...skillMetadata,
|
|
244
|
+
content: parsed.content,
|
|
245
|
+
frontmatter: parsed.frontmatter,
|
|
246
|
+
isValid: parsed.isValid,
|
|
247
|
+
errors: parsed.validationErrors,
|
|
248
|
+
};
|
|
249
|
+
collection.skills.set(skillMetadata.name, skillMetadata);
|
|
250
|
+
// Store the full skill content in the manager's skillContent map
|
|
251
|
+
this.skillContent.set(skillMetadata.name, skill);
|
|
240
252
|
}
|
|
241
|
-
|
|
253
|
+
else {
|
|
242
254
|
collection.errors.push({
|
|
243
255
|
skillPath: skillDir,
|
|
244
|
-
message:
|
|
256
|
+
message: parsed.validationErrors.join("; "),
|
|
245
257
|
});
|
|
246
258
|
}
|
|
247
259
|
}
|
|
260
|
+
catch (error) {
|
|
261
|
+
collection.errors.push({
|
|
262
|
+
skillPath: skillDir,
|
|
263
|
+
message: `Failed to process skill: ${error instanceof Error ? error.message : String(error)}`,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
248
266
|
}
|
|
249
|
-
catch (error) {
|
|
250
|
-
logger?.debug(`Could not scan ${skillsPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
251
|
-
// Not an error - the directory might not exist yet
|
|
252
|
-
}
|
|
253
|
-
return collection;
|
|
254
267
|
}
|
|
255
268
|
/**
|
|
256
269
|
* Find all directories that could contain skills
|
|
@@ -347,11 +360,13 @@ export class SkillManager extends EventEmitter {
|
|
|
347
360
|
let mainContent = contentMatch ? contentMatch[1].trim() : skill.content;
|
|
348
361
|
// 1. Substitute parameters ($1, $ARGUMENTS, etc.)
|
|
349
362
|
mainContent = substituteCommandParameters(mainContent, argsString);
|
|
350
|
-
// 2. Substitute ${WAVE_SKILL_DIR}
|
|
363
|
+
// 2. Substitute ${WAVE_SKILL_DIR} and ${CLAUDE_SKILL_DIR}
|
|
351
364
|
mainContent = mainContent.replace(/\$\{WAVE_SKILL_DIR\}/g, skill.skillPath);
|
|
352
|
-
|
|
365
|
+
mainContent = mainContent.replace(/\$\{CLAUDE_SKILL_DIR\}/g, skill.skillPath);
|
|
366
|
+
// 3. Substitute ${WAVE_PLUGIN_ROOT} and ${CLAUDE_PLUGIN_ROOT}
|
|
353
367
|
if (skill.pluginRoot) {
|
|
354
368
|
mainContent = mainContent.replace(/\$\{WAVE_PLUGIN_ROOT\}/g, skill.pluginRoot);
|
|
369
|
+
mainContent = mainContent.replace(/\$\{CLAUDE_PLUGIN_ROOT\}/g, skill.pluginRoot);
|
|
355
370
|
}
|
|
356
371
|
return skillPath + mainContent;
|
|
357
372
|
}
|
|
@@ -15,14 +15,8 @@ export declare class SlashCommandManager {
|
|
|
15
15
|
initialize(): void;
|
|
16
16
|
private get messageManager();
|
|
17
17
|
private get aiManager();
|
|
18
|
-
private get backgroundTaskManager();
|
|
19
|
-
private get taskManager();
|
|
20
18
|
private get skillManager();
|
|
21
19
|
private get subagentManager();
|
|
22
|
-
private get memoryService();
|
|
23
|
-
private get hookManager();
|
|
24
|
-
private get goalManager();
|
|
25
|
-
private initializeBuiltinCommands;
|
|
26
20
|
/**
|
|
27
21
|
* Load custom commands from filesystem
|
|
28
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slashCommandManager.d.ts","sourceRoot":"","sources":["../../src/managers/slashCommandManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slashCommandManager.d.ts","sourceRoot":"","sources":["../../src/managers/slashCommandManager.ts"],"names":[],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,CAAC;IA2BnB;;;OAGG;IACI,4BAA4B,CAAC,KAAK,EAAE,MAAM,GAAG;QAClD,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAeD;;OAEG;IACI,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAI7C;;;OAGG;IACI,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAQjD;;OAEG;IACI,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAI1E;;OAEG;IACI,iBAAiB,IAAI,kBAAkB,EAAE;IAIhD;;OAEG;YACW,+BAA+B;IAuD7C;;OAEG;IACI,mBAAmB,IAAI,IAAI;CAQnC"}
|
|
@@ -13,7 +13,6 @@ export class SlashCommandManager {
|
|
|
13
13
|
this.workdir = options.workdir;
|
|
14
14
|
}
|
|
15
15
|
initialize() {
|
|
16
|
-
this.initializeBuiltinCommands();
|
|
17
16
|
this.loadCustomCommands();
|
|
18
17
|
// Listen for skill refreshes and update skill commands
|
|
19
18
|
const skillManager = this.container.get("SkillManager");
|
|
@@ -29,181 +28,12 @@ export class SlashCommandManager {
|
|
|
29
28
|
get aiManager() {
|
|
30
29
|
return this.container.get("AIManager");
|
|
31
30
|
}
|
|
32
|
-
get backgroundTaskManager() {
|
|
33
|
-
return this.container.get("BackgroundTaskManager");
|
|
34
|
-
}
|
|
35
|
-
get taskManager() {
|
|
36
|
-
return this.container.get("TaskManager");
|
|
37
|
-
}
|
|
38
31
|
get skillManager() {
|
|
39
32
|
return this.container.get("SkillManager");
|
|
40
33
|
}
|
|
41
34
|
get subagentManager() {
|
|
42
35
|
return this.container.get("SubagentManager");
|
|
43
36
|
}
|
|
44
|
-
get memoryService() {
|
|
45
|
-
return this.container.get("MemoryService");
|
|
46
|
-
}
|
|
47
|
-
get hookManager() {
|
|
48
|
-
return this.container.get("HookManager");
|
|
49
|
-
}
|
|
50
|
-
get goalManager() {
|
|
51
|
-
return this.container.get("GoalManager");
|
|
52
|
-
}
|
|
53
|
-
initializeBuiltinCommands() {
|
|
54
|
-
// Register built-in clear command
|
|
55
|
-
this.registerCommand({
|
|
56
|
-
id: "clear",
|
|
57
|
-
name: "clear",
|
|
58
|
-
description: "Clear conversation history and reset session",
|
|
59
|
-
immediate: true,
|
|
60
|
-
handler: async () => {
|
|
61
|
-
this.aiManager.abortAIMessage();
|
|
62
|
-
// Clear any active goal
|
|
63
|
-
this.goalManager?.clearGoal();
|
|
64
|
-
// Capture old session info before clearing
|
|
65
|
-
const oldSessionId = this.messageManager.getSessionId();
|
|
66
|
-
const transcriptPath = this.messageManager.getTranscriptPath();
|
|
67
|
-
// Run SessionEnd hooks (cleanup before clear)
|
|
68
|
-
if (this.hookManager) {
|
|
69
|
-
try {
|
|
70
|
-
await this.hookManager.executeSessionEndHooks("clear", oldSessionId, transcriptPath);
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
logger?.warn(`SessionEnd hooks on clear failed: ${error.message}`);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
// Clear messages and generate new session
|
|
77
|
-
this.messageManager.clearMessages();
|
|
78
|
-
this.memoryService.clearCache();
|
|
79
|
-
await this.taskManager.syncWithSession();
|
|
80
|
-
// Run SessionStart hooks (restore context for new session)
|
|
81
|
-
if (this.hookManager) {
|
|
82
|
-
try {
|
|
83
|
-
const newSessionId = this.messageManager.getSessionId();
|
|
84
|
-
const sessionStartResult = await this.hookManager.executeSessionStartHooks("clear", newSessionId, this.messageManager.getTranscriptPath());
|
|
85
|
-
// Inject additionalContext as a meta user message
|
|
86
|
-
if (sessionStartResult.additionalContext) {
|
|
87
|
-
this.messageManager.addUserMessage({
|
|
88
|
-
content: `<system-reminder>\nSessionStart hook additional context: ${sessionStartResult.additionalContext}\n</system-reminder>`,
|
|
89
|
-
isMeta: true,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
// Inject initialUserMessage as a meta user message
|
|
93
|
-
if (sessionStartResult.initialUserMessage) {
|
|
94
|
-
this.messageManager.addUserMessage({
|
|
95
|
-
content: sessionStartResult.initialUserMessage,
|
|
96
|
-
isMeta: true,
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
logger?.warn(`SessionStart hooks on clear failed: ${error.message}`);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
// Register built-in compact command
|
|
107
|
-
this.registerCommand({
|
|
108
|
-
id: "compact",
|
|
109
|
-
name: "compact",
|
|
110
|
-
description: "Compact conversation history to reduce context usage",
|
|
111
|
-
immediate: true,
|
|
112
|
-
handler: async (args, signal) => {
|
|
113
|
-
this.aiManager.abortAIMessage();
|
|
114
|
-
const customInstructions = args?.trim() || undefined;
|
|
115
|
-
await this.aiManager.compactConversation({
|
|
116
|
-
customInstructions,
|
|
117
|
-
abortSignal: signal,
|
|
118
|
-
});
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
|
-
// Register built-in goal command
|
|
122
|
-
this.registerCommand({
|
|
123
|
-
id: "goal",
|
|
124
|
-
name: "goal",
|
|
125
|
-
description: "Set, check, or clear an autonomous goal for the session",
|
|
126
|
-
immediate: (args) => {
|
|
127
|
-
const trimmed = args?.trim() ?? "";
|
|
128
|
-
return (!trimmed ||
|
|
129
|
-
["clear", "stop", "off", "reset", "none", "cancel"].includes(trimmed));
|
|
130
|
-
},
|
|
131
|
-
handler: async (args) => {
|
|
132
|
-
const goalManager = this.goalManager;
|
|
133
|
-
if (!goalManager) {
|
|
134
|
-
this.messageManager.addUserMessage({
|
|
135
|
-
content: "Goal manager is not available",
|
|
136
|
-
isMeta: true,
|
|
137
|
-
});
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
const trimmed = args?.trim() ?? "";
|
|
141
|
-
// Clear aliases
|
|
142
|
-
if (["clear", "stop", "off", "reset", "none", "cancel"].includes(trimmed)) {
|
|
143
|
-
if (goalManager.isGoalActive()) {
|
|
144
|
-
goalManager.clearGoal();
|
|
145
|
-
this.messageManager.addUserMessage({
|
|
146
|
-
content: "<system-reminder>Goal cleared.</system-reminder>",
|
|
147
|
-
isMeta: true,
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
this.messageManager.addUserMessage({
|
|
152
|
-
content: "<system-reminder>No active goal to clear.</system-reminder>",
|
|
153
|
-
isMeta: true,
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
// Show status
|
|
159
|
-
if (!trimmed) {
|
|
160
|
-
if (goalManager.isGoalActive()) {
|
|
161
|
-
this.messageManager.addUserMessage({
|
|
162
|
-
content: `<system-reminder>${goalManager.getStatusString()}</system-reminder>`,
|
|
163
|
-
isMeta: true,
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
this.messageManager.addUserMessage({
|
|
168
|
-
content: "<system-reminder>No active goal. Use /goal <condition> to set one.</system-reminder>",
|
|
169
|
-
isMeta: true,
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
// Check plan mode
|
|
175
|
-
const permissionMode = this.container.has("PermissionMode")
|
|
176
|
-
? this.container.get("PermissionMode")
|
|
177
|
-
: undefined;
|
|
178
|
-
if (permissionMode === "plan") {
|
|
179
|
-
this.messageManager.addUserMessage({
|
|
180
|
-
content: "<system-reminder>Cannot set a goal in plan mode. Exit plan mode first.</system-reminder>",
|
|
181
|
-
isMeta: true,
|
|
182
|
-
});
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
// Set goal
|
|
186
|
-
try {
|
|
187
|
-
goalManager.setGoal(trimmed);
|
|
188
|
-
this.messageManager.addUserMessage({
|
|
189
|
-
content: `<system-reminder>Goal set: ${trimmed}. The agent will work autonomously until this goal is achieved.</system-reminder>`,
|
|
190
|
-
isMeta: true,
|
|
191
|
-
});
|
|
192
|
-
// Add the goal as a user directive to start working
|
|
193
|
-
this.messageManager.addUserMessage({
|
|
194
|
-
content: trimmed,
|
|
195
|
-
});
|
|
196
|
-
this.aiManager.sendAIMessage();
|
|
197
|
-
}
|
|
198
|
-
catch (error) {
|
|
199
|
-
this.messageManager.addUserMessage({
|
|
200
|
-
content: `<system-reminder>Failed to set goal: ${error.message}</system-reminder>`,
|
|
201
|
-
isMeta: true,
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
37
|
/**
|
|
208
38
|
* Load custom commands from filesystem
|
|
209
39
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolManager.d.ts","sourceRoot":"","sources":["../../src/managers/toolManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA6B7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,mBAAmB,CAAC;AAO3B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIlD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,SAAS,CAAC;IACrB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,wDAAwD;IACxD,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B;AAED;;;;;GAKG;AACH,cAAM,WAAW;IACf,OAAO,CAAC,aAAa,CAAiC;IACtD,OAAO,CAAC,KAAK,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ACjB,OAAO,4BAA4B,EAAE,WAAW,GAChD,SAAS;CAKd;AAGD,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -272,9 +272,7 @@ class ToolManager {
|
|
|
272
272
|
return false;
|
|
273
273
|
}
|
|
274
274
|
if (effectivePermissionMode === "bypassPermissions") {
|
|
275
|
-
if (tool.name === "ExitPlanMode"
|
|
276
|
-
tool.name === "AskUserQuestion" ||
|
|
277
|
-
tool.name === "EnterPlanMode") {
|
|
275
|
+
if (tool.name === "ExitPlanMode") {
|
|
278
276
|
return false;
|
|
279
277
|
}
|
|
280
278
|
}
|
|
@@ -282,8 +280,7 @@ class ToolManager {
|
|
|
282
280
|
return effectivePermissionMode === "plan";
|
|
283
281
|
}
|
|
284
282
|
if (tool.name === "EnterPlanMode") {
|
|
285
|
-
return
|
|
286
|
-
effectivePermissionMode !== "bypassPermissions");
|
|
283
|
+
return effectivePermissionMode !== "plan";
|
|
287
284
|
}
|
|
288
285
|
return true;
|
|
289
286
|
})
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare function wrapInSystemReminder(content: string): string;
|
|
2
2
|
export declare function buildPlanModeReminder(planFilePath: string, planExists: boolean, isSubagent?: boolean): string;
|
|
3
|
-
export declare function buildPlanModeSparseReminder(planFilePath: string): string;
|
|
4
3
|
export declare function buildPlanModeReEntryReminder(planFilePath: string): string;
|
|
5
4
|
export declare function buildExitedPlanModeReminder(planFilePath?: string, planExists?: boolean): string;
|
|
6
5
|
//# sourceMappingURL=planModeReminders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planModeReminders.d.ts","sourceRoot":"","sources":["../../src/prompts/planModeReminders.ts"],"names":[],"mappings":"AAYA,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,EACnB,UAAU,GAAE,OAAe,GAC1B,MAAM,CAsFR;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"planModeReminders.d.ts","sourceRoot":"","sources":["../../src/prompts/planModeReminders.ts"],"names":[],"mappings":"AAYA,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,EACnB,UAAU,GAAE,OAAe,GAC1B,MAAM,CAsFR;AAED,wBAAgB,4BAA4B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAQzE;AAED,wBAAgB,2BAA2B,CACzC,YAAY,CAAC,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,OAAO,GACnB,MAAM,CAIR"}
|
|
@@ -87,23 +87,14 @@ This is critical - your turn should only end with either using the ${ASK_USER_QU
|
|
|
87
87
|
|
|
88
88
|
NOTE: At any point in time through this workflow you should feel free to ask the user questions or clarifications using the ${ASK_USER_QUESTION_TOOL_NAME} tool. Don't make large assumptions about user intent. The goal is to present a well researched plan to the user, and tie any loose ends before implementation begins.`);
|
|
89
89
|
}
|
|
90
|
-
export function buildPlanModeSparseReminder(planFilePath) {
|
|
91
|
-
return wrapInSystemReminder(`Plan mode still active (see full instructions earlier in conversation). Read-only except plan file at ${planFilePath}. End turns with ${ASK_USER_QUESTION_TOOL_NAME} or ${EXIT_PLAN_MODE_TOOL_NAME}.`);
|
|
92
|
-
}
|
|
93
90
|
export function buildPlanModeReEntryReminder(planFilePath) {
|
|
94
91
|
return wrapInSystemReminder(`## Re-entering Plan Mode
|
|
95
92
|
|
|
96
|
-
You are returning to plan mode
|
|
93
|
+
You are returning to plan mode. A plan file exists at ${planFilePath} from your previous session.
|
|
97
94
|
|
|
98
|
-
**Before proceeding with any new planning, you should:**
|
|
99
95
|
1. Read the existing plan file to understand what was previously planned
|
|
100
|
-
2.
|
|
101
|
-
3.
|
|
102
|
-
- **Different task**: If the user's request is for a different task—even if it's similar or related—start fresh by overwriting the existing plan
|
|
103
|
-
- **Same task, continuing**: If this is explicitly a continuation or refinement of the exact same task, modify the existing plan while cleaning up outdated or irrelevant sections
|
|
104
|
-
4. Continue on with the plan process and most importantly you should always edit the plan file one way or the other before calling ${EXIT_PLAN_MODE_TOOL_NAME}
|
|
105
|
-
|
|
106
|
-
Treat this as a fresh planning session. Do not assume the existing plan is relevant without evaluating it first.`);
|
|
96
|
+
2. Decide: if the user's request is a different task, start fresh by overwriting the plan; if it's a continuation, modify the existing plan
|
|
97
|
+
3. Edit the plan file as needed, then call ${EXIT_PLAN_MODE_TOOL_NAME}`);
|
|
107
98
|
}
|
|
108
99
|
export function buildExitedPlanModeReminder(planFilePath, planExists) {
|
|
109
100
|
return wrapInSystemReminder(`## Exited Plan Mode
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarketplaceService.d.ts","sourceRoot":"","sources":["../../src/services/MarketplaceService.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAqB,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG1E;;;;;;;;GAQG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAS;IACzC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,qBAAqB,CAAS;IACtC,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CA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B,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAqCrD;;OAEG;IACG,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBnE;;;;OAIG;YACW,6BAA6B;IA2C3C;;OAEG;IACG,iBAAiB,CACrB,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GACpC,OAAO,CAAC,IAAI,CAAC;IA2GhB;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBpC;;OAEG;IACG,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA6BrE;;OAEG;IACG,aAAa,CACjB,mBAAmB,EAAE,MAAM,EAC3B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,eAAe,CAAC;IAwI3B;;OAEG;IACG,eAAe,CACnB,mBAAmB,EAAE,MAAM,EAC3B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC;IAoChB;;OAEG;IACG,YAAY,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAM1E"}
|
|
@@ -286,9 +286,13 @@ export class MarketplaceService {
|
|
|
286
286
|
* Loads a marketplace manifest from a local path
|
|
287
287
|
*/
|
|
288
288
|
async loadMarketplaceManifest(marketplacePath) {
|
|
289
|
-
|
|
289
|
+
let manifestPath = path.join(marketplacePath, ".wave-plugin", "marketplace.json");
|
|
290
290
|
if (!existsSync(manifestPath)) {
|
|
291
|
-
|
|
291
|
+
// Fallback to .claude-plugin/marketplace.json
|
|
292
|
+
manifestPath = path.join(marketplacePath, ".claude-plugin", "marketplace.json");
|
|
293
|
+
if (!existsSync(manifestPath)) {
|
|
294
|
+
throw new Error(`Marketplace manifest not found at ${manifestPath}`);
|
|
295
|
+
}
|
|
292
296
|
}
|
|
293
297
|
const content = await fs.readFile(manifestPath, "utf-8");
|
|
294
298
|
const manifest = JSON.parse(content);
|
|
@@ -649,9 +653,13 @@ export class MarketplaceService {
|
|
|
649
653
|
else {
|
|
650
654
|
pluginSrcPath = path.resolve(marketplacePath, pluginEntry.source);
|
|
651
655
|
}
|
|
652
|
-
|
|
656
|
+
let pluginManifestPath = path.join(pluginSrcPath, ".wave-plugin", "plugin.json");
|
|
653
657
|
if (!existsSync(pluginManifestPath)) {
|
|
654
|
-
|
|
658
|
+
// Fallback to .claude-plugin/plugin.json
|
|
659
|
+
pluginManifestPath = path.join(pluginSrcPath, ".claude-plugin", "plugin.json");
|
|
660
|
+
if (!existsSync(pluginManifestPath)) {
|
|
661
|
+
throw new Error(`Plugin manifest not found at ${pluginManifestPath}`);
|
|
662
|
+
}
|
|
655
663
|
}
|
|
656
664
|
const pluginManifestContent = await fs.readFile(pluginManifestPath, "utf-8");
|
|
657
665
|
const pluginManifest = JSON.parse(pluginManifestContent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/services/memory.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIlD,qBAAa,aAAa;IAKZ,OAAO,CAAC,SAAS;IAJ7B,OAAO,CAAC,oBAAoB,CAAc;IAC1C,OAAO,CAAC,iBAAiB,CAAc;IACvC,OAAO,CAAC,qBAAqB,CAAuB;gBAEhC,SAAS,EAAE,SAAS;IAExC,IAAW,mBAAmB,IAAI,MAAM,CAEvC;IAED,IAAW,gBAAgB,IAAI,MAAM,CAEpC;IAEM,UAAU,IAAI,IAAI;IAMzB;;;OAGG;IACH,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAU/C;;OAEG;IACG,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2B/D;;OAE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