wave-agent-sdk 0.15.3 → 0.15.4
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/managers/skillManager.d.ts.map +1 -1
- package/dist/managers/skillManager.js +21 -8
- package/dist/services/configurationService.d.ts.map +1 -1
- package/dist/services/configurationService.js +0 -1
- package/dist/types/configuration.d.ts +0 -2
- package/dist/types/configuration.d.ts.map +1 -1
- package/dist/utils/builtinSkills.d.ts +7 -0
- package/dist/utils/builtinSkills.d.ts.map +1 -0
- package/dist/utils/builtinSkills.js +149 -0
- package/dist/utils/configPaths.d.ts +0 -10
- package/dist/utils/configPaths.d.ts.map +1 -1
- package/dist/utils/configPaths.js +2 -25
- package/dist/utils/subagentParser.d.ts +5 -0
- package/dist/utils/subagentParser.d.ts.map +1 -1
- package/dist/utils/subagentParser.js +155 -3
- package/package.json +1 -2
- package/src/managers/skillManager.ts +21 -11
- package/src/services/configurationService.ts +0 -1
- package/src/types/configuration.ts +0 -2
- package/src/utils/builtinSkills.ts +158 -0
- package/src/utils/configPaths.ts +2 -30
- package/src/utils/subagentParser.ts +160 -3
- package/builtin/skills/init/SKILL.md +0 -28
- package/builtin/skills/loop/SKILL.md +0 -79
- package/builtin/skills/settings/ENV.md +0 -69
- package/builtin/skills/settings/HOOKS.md +0 -192
- package/builtin/skills/settings/MCP.md +0 -92
- package/builtin/skills/settings/MEMORY_RULES.md +0 -60
- package/builtin/skills/settings/MODELS.md +0 -71
- package/builtin/skills/settings/PERMISSIONS.md +0 -57
- package/builtin/skills/settings/PLUGINS.md +0 -171
- package/builtin/skills/settings/SKILL.md +0 -121
- package/builtin/skills/settings/SKILLS.md +0 -105
- package/builtin/skills/settings/SUBAGENTS.md +0 -77
- package/builtin/subagents/bash.md +0 -19
- package/builtin/subagents/explore.md +0 -43
- package/builtin/subagents/general-purpose.md +0 -20
- package/builtin/subagents/plan.md +0 -56
|
@@ -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;AACH,qBAAa,YAAa,SAAQ,YAAY;IAY1C,OAAO,CAAC,SAAS;IAXnB,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,aAAa,CAAoC;IACzD,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAmC;IACtD,OAAO,CAAC,YAAY,CAAU;gBAGpB,SAAS,EAAE,SAAS,EAC5B,OAAO,GAAE,mBAAwB;IAUnC;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAoBjC;;OAEG;YACW,aAAa;IA6B3B;;OAEG;YACW,YAAY;IAkC1B;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAO9B;;OAEG;IACH,aAAa,IAAI,OAAO;IAIxB;;OAEG;IACH,kBAAkB,IAAI,aAAa,EAAE;IAQrC;;OAEG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAQzD;;;OAGG;IACG,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAgBzD;;OAEG;YACW,cAAc;
|
|
1
|
+
{"version":3,"file":"skillManager.d.ts","sourceRoot":"","sources":["../../src/managers/skillManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC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EG;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;IA0B3B;;OAEG;YACW,yBAAyB;IASvC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAc7B;;OAEG;IACH,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI;CA2BhE"}
|
|
@@ -6,7 +6,7 @@ import { FileWatcherService } from "../services/fileWatcher.js";
|
|
|
6
6
|
import { parseSkillFile, formatSkillError } from "../utils/skillParser.js";
|
|
7
7
|
import { substituteCommandParameters } from "../utils/commandArgumentParser.js";
|
|
8
8
|
import { parseBashCommands, replaceBashCommandsWithOutput, executeBashCommands, } from "../utils/markdownParser.js";
|
|
9
|
-
import {
|
|
9
|
+
import { BUILTIN_SKILLS } from "../utils/builtinSkills.js";
|
|
10
10
|
import { logger } from "../utils/globalLogger.js";
|
|
11
11
|
/**
|
|
12
12
|
* Manages skill discovery and loading
|
|
@@ -153,18 +153,31 @@ export class SkillManager extends EventEmitter {
|
|
|
153
153
|
* Discover skills in builtin, personal and project directories
|
|
154
154
|
*/
|
|
155
155
|
async discoverSkills() {
|
|
156
|
-
|
|
156
|
+
// Builtin skills are hardcoded in TS, not scanned from a directory
|
|
157
|
+
const builtinSkills = new Map();
|
|
158
|
+
for (const skill of BUILTIN_SKILLS) {
|
|
159
|
+
builtinSkills.set(skill.name, {
|
|
160
|
+
name: skill.name,
|
|
161
|
+
description: skill.description,
|
|
162
|
+
type: skill.type,
|
|
163
|
+
skillPath: skill.skillPath,
|
|
164
|
+
allowedTools: skill.allowedTools,
|
|
165
|
+
context: skill.context,
|
|
166
|
+
agent: skill.agent,
|
|
167
|
+
model: skill.model,
|
|
168
|
+
disableModelInvocation: skill.disableModelInvocation,
|
|
169
|
+
userInvocable: skill.userInvocable,
|
|
170
|
+
});
|
|
171
|
+
// Store full skill content for later loading
|
|
172
|
+
this.skillContent.set(skill.name, skill);
|
|
173
|
+
}
|
|
157
174
|
const personalCollection = await this.discoverSkillCollection(this.personalSkillsPath, "personal");
|
|
158
175
|
const projectCollection = await this.discoverSkillCollection(this.workdir, "project");
|
|
159
176
|
return {
|
|
160
|
-
builtinSkills
|
|
177
|
+
builtinSkills,
|
|
161
178
|
personalSkills: personalCollection.skills,
|
|
162
179
|
projectSkills: projectCollection.skills,
|
|
163
|
-
errors: [
|
|
164
|
-
...builtinCollection.errors,
|
|
165
|
-
...personalCollection.errors,
|
|
166
|
-
...projectCollection.errors,
|
|
167
|
-
],
|
|
180
|
+
errors: [...personalCollection.errors, ...projectCollection.errors],
|
|
168
181
|
};
|
|
169
182
|
}
|
|
170
183
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurationService.d.ts","sourceRoot":"","sources":["../../src/services/configurationService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,EACL,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAE7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,aAAa,EACb,WAAW,EAGX,cAAc,EACd,YAAY,EACb,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGvC;;;;;GAKG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,oBAAoB,CAAkC;IAC9D,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,kBAAkB,CAAqB;IAE/C;;OAE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M,EAAE;IAoB/B;;OAEG;IACH,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB;
|
|
1
|
+
{"version":3,"file":"configurationService.d.ts","sourceRoot":"","sources":["../../src/services/configurationService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,EACL,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAE7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,aAAa,EACb,WAAW,EAGX,cAAc,EACd,YAAY,EACb,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGvC;;;;;GAKG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,oBAAoB,CAAkC;IAC9D,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,kBAAkB,CAAqB;IAE/C;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAMvC;;OAEG;IACG,uBAAuB,CAC3B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,uBAAuB,CAAC;IA4DnC;;OAEG;IACH,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,GAAG,gBAAgB;IAkLlE;;OAEG;IACH,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB;IAwC7D;;;OAGG;IACH,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAcrD;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACvC,YAAY,CAAC,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AC;IAapC;;OAEG;IACG,qBAAqB,CACzB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,IAAI,CAAC;IAyChB;;OAEG;IACG,0BAA0B,CAC9B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC;IAmChB;;OAEG;IACG,mBAAmB,CACvB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;IAmChB;;OAEG;IACH,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAKjE;;;OAGG;IACH,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI;CAGnE;AAKD;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,OAAO,EACZ,UAAU,CAAC,EAAE,MAAM,GAClB,2BAA2B,CAsD7B;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC3C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC9C,OAAO,GAAE,uBAA4B,GACpC,wBAAwB,CAoC1B;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,GACf,iBAAiB,GAAG,IAAI,CA8B1B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,GACd,iBAAiB,GAAG,IAAI,CAoK1B"}
|
|
@@ -92,8 +92,6 @@ export interface ConfigurationPaths {
|
|
|
92
92
|
userPaths: string[];
|
|
93
93
|
/** Project-specific configuration file paths in priority order */
|
|
94
94
|
projectPaths: string[];
|
|
95
|
-
/** Builtin configuration file paths */
|
|
96
|
-
builtinPaths: string[];
|
|
97
95
|
/** All configuration paths combined */
|
|
98
96
|
allPaths: string[];
|
|
99
97
|
/** Only the paths that actually exist on the filesystem */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/types/configuration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,2CAA2C;IAC3C,WAAW,CAAC,EAAE;QACZ,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC;;;WAGG;QACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;KAClC,CAAC;IACF,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CA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E,CAAC;IACnB,2DAA2D;IAC3D,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,UAAU,MAAM;IACd,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACnC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACrC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builtin skill configurations hardcoded as TypeScript objects.
|
|
3
|
+
* Replaces the former builtin/skills directory of markdown files.
|
|
4
|
+
*/
|
|
5
|
+
import type { Skill } from "../types/index.js";
|
|
6
|
+
export declare const BUILTIN_SKILLS: Skill[];
|
|
7
|
+
//# sourceMappingURL=builtinSkills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtinSkills.d.ts","sourceRoot":"","sources":["../../src/utils/builtinSkills.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAmH/C,eAAO,MAAM,cAAc,EAAE,KAAK,EAqCjC,CAAC"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builtin skill configurations hardcoded as TypeScript objects.
|
|
3
|
+
* Replaces the former builtin/skills directory of markdown files.
|
|
4
|
+
*/
|
|
5
|
+
const LOOP_CONTENT = [
|
|
6
|
+
"---",
|
|
7
|
+
"name: loop",
|
|
8
|
+
"description: Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo, defaults to 10m)",
|
|
9
|
+
"allowed-tools: CronCreate, Skill",
|
|
10
|
+
"user-invocable: true",
|
|
11
|
+
"---",
|
|
12
|
+
"",
|
|
13
|
+
"# /loop — schedule a recurring prompt",
|
|
14
|
+
"",
|
|
15
|
+
"Parse the input below into `[interval] <prompt…>` and schedule it with CronCreate.",
|
|
16
|
+
"",
|
|
17
|
+
"## Usage",
|
|
18
|
+
"",
|
|
19
|
+
"```",
|
|
20
|
+
"/loop [interval] <prompt>",
|
|
21
|
+
"",
|
|
22
|
+
"Run a prompt or slash command on a recurring interval.",
|
|
23
|
+
"",
|
|
24
|
+
"Intervals: Ns, Nm, Nh, Nd (e.g. 5m, 30m, 2h, 1d). Minimum granularity is 1 minute.",
|
|
25
|
+
"If no interval is specified, defaults to 10m.",
|
|
26
|
+
"",
|
|
27
|
+
"Examples:",
|
|
28
|
+
" /loop 5m /babysit-prs",
|
|
29
|
+
" /loop 30m check the deploy",
|
|
30
|
+
" /loop 1h /standup 1",
|
|
31
|
+
" /loop check the deploy (defaults to 10m)",
|
|
32
|
+
" /loop check the deploy every 20m",
|
|
33
|
+
"```",
|
|
34
|
+
"",
|
|
35
|
+
"## Parsing (in priority order)",
|
|
36
|
+
"",
|
|
37
|
+
"1. **Leading token**: if the first whitespace-delimited token matches `^\\d+[smhd]$` (e.g. `5m`, `2h`), that's the interval; the rest is the prompt.",
|
|
38
|
+
'2. **Trailing "every" clause**: otherwise, if the input ends with `every <N><unit>` or `every <N> <unit-word>` (e.g. `every 20m`, `every 5 minutes`, `every 2 hours`), extract that as the interval and strip it from the prompt. Only match when what follows "every" is a time expression — `check every PR` has no interval.',
|
|
39
|
+
"3. **Default**: otherwise, interval is `10m` and the entire input is the prompt.",
|
|
40
|
+
"",
|
|
41
|
+
"If the resulting prompt is empty, show usage `/loop [interval] <prompt>` and stop — do not call CronCreate.",
|
|
42
|
+
"",
|
|
43
|
+
"Examples:",
|
|
44
|
+
"- `5m /babysit-prs` → interval `5m`, prompt `/babysit-prs` (rule 1)",
|
|
45
|
+
"- `check the deploy every 20m` → interval `20m`, prompt `check the deploy` (rule 2)",
|
|
46
|
+
"- `run tests every 5 minutes` → interval `5m`, prompt `run tests` (rule 2)",
|
|
47
|
+
"- `check the deploy` → interval `10m`, prompt `check the deploy` (rule 3)",
|
|
48
|
+
'- `check every PR` → interval `10m`, prompt `check every PR` (rule 3 — "every" not followed by time)',
|
|
49
|
+
"- `5m` → empty prompt → show usage",
|
|
50
|
+
"",
|
|
51
|
+
"## Interval → cron",
|
|
52
|
+
"",
|
|
53
|
+
"Supported suffixes: `s` (seconds, rounded up to nearest minute, min 1), `m` (minutes), `h` (hours), `d` (days). Convert:",
|
|
54
|
+
"",
|
|
55
|
+
"| Interval pattern | Cron expression | Notes |",
|
|
56
|
+
"|-----------------------|---------------------|------------------------------------------|",
|
|
57
|
+
"| `Nm` where N ≤ 59 | `*/N * * * *` | every N minutes |",
|
|
58
|
+
"| `Nm` where N ≥ 60 | `0 */H * * *` | round to hours (H = N/60, must divide 24)|",
|
|
59
|
+
"| `Nh` where N ≤ 23 | `0 */N * * *` | every N hours |",
|
|
60
|
+
"| `Nd` | `0 0 */N * *` | every N days at midnight local |",
|
|
61
|
+
"| `Ns` | treat as `ceil(N/60)m` | cron minimum granularity is 1 minute |",
|
|
62
|
+
"",
|
|
63
|
+
"**If the interval doesn't cleanly divide its unit** (e.g. `7m` → `*/7 * * * *` gives uneven gaps at :56→:00; `90m` → 1.5h which cron can't express), pick the nearest clean interval and tell the user what you rounded to before scheduling.",
|
|
64
|
+
"",
|
|
65
|
+
"## Avoid the :00 and :30 minute marks",
|
|
66
|
+
"",
|
|
67
|
+
"When the user's request is approximate, pick a minute that is NOT 0 or 30:",
|
|
68
|
+
'- "every morning around 9" → `57 8 * * *` or `3 9 * * *` (not `0 9 * * *`)',
|
|
69
|
+
'- "hourly" → `7 * * * *` (not `0 * * * *`)',
|
|
70
|
+
"",
|
|
71
|
+
'Only use minute 0 or 30 when the user names that exact time and clearly means it ("at 9:00 sharp", "at half past").',
|
|
72
|
+
"",
|
|
73
|
+
"## Action",
|
|
74
|
+
"",
|
|
75
|
+
"1. Call CronCreate with:",
|
|
76
|
+
" - `cron`: the expression from the table above",
|
|
77
|
+
" - `prompt`: the parsed prompt from above, verbatim (slash commands are passed through unchanged)",
|
|
78
|
+
" - `recurring`: `true`",
|
|
79
|
+
"2. Briefly confirm: what's scheduled, the cron expression, the human-readable cadence, that recurring tasks auto-expire after 7 days, and that they can cancel sooner with CronDelete (include the job ID).",
|
|
80
|
+
"3. **Then immediately execute the parsed prompt now** — don't wait for the first cron fire. If it's a slash command, run it directly; otherwise act on it directly.",
|
|
81
|
+
"",
|
|
82
|
+
"## Input",
|
|
83
|
+
"",
|
|
84
|
+
"$ARGUMENTS",
|
|
85
|
+
].join("\n");
|
|
86
|
+
const INIT_CONTENT = [
|
|
87
|
+
"---",
|
|
88
|
+
"name: init",
|
|
89
|
+
"description: Analyze the codebase and create an AGENTS.md file to guide future agents.",
|
|
90
|
+
"disable-model-invocation: true",
|
|
91
|
+
"---",
|
|
92
|
+
"",
|
|
93
|
+
"Please analyze this codebase and create a AGENTS.md file, which will be given to future instances of Agent to operate in this repository.",
|
|
94
|
+
"",
|
|
95
|
+
"What to add:",
|
|
96
|
+
"1. 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.",
|
|
97
|
+
'2. 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.',
|
|
98
|
+
"",
|
|
99
|
+
"Usage notes:",
|
|
100
|
+
"- If there's already a AGENTS.md, suggest improvements to it.",
|
|
101
|
+
'- 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".',
|
|
102
|
+
"- Avoid listing every component or file structure that can be easily discovered.",
|
|
103
|
+
"- Don't include generic development practices.",
|
|
104
|
+
"- 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.",
|
|
105
|
+
"- Do NOT include rules from .wave/rules/ as they are automatically loaded by the system.",
|
|
106
|
+
"- If there is a README.md, make sure to include the important parts.",
|
|
107
|
+
'- 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.',
|
|
108
|
+
"- Be sure to prefix the file with the following text:",
|
|
109
|
+
"",
|
|
110
|
+
"```",
|
|
111
|
+
"# AGENTS.md",
|
|
112
|
+
"",
|
|
113
|
+
"This file provides guidance to Agent when working with code in this repository.",
|
|
114
|
+
"```",
|
|
115
|
+
].join("\n");
|
|
116
|
+
export const BUILTIN_SKILLS = [
|
|
117
|
+
{
|
|
118
|
+
name: "loop",
|
|
119
|
+
description: "Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo, defaults to 10m)",
|
|
120
|
+
type: "builtin",
|
|
121
|
+
skillPath: "<builtin:loop>",
|
|
122
|
+
allowedTools: ["CronCreate", "Skill"],
|
|
123
|
+
userInvocable: true,
|
|
124
|
+
content: LOOP_CONTENT,
|
|
125
|
+
frontmatter: {
|
|
126
|
+
name: "loop",
|
|
127
|
+
description: "Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo, defaults to 10m)",
|
|
128
|
+
"allowed-tools": ["CronCreate", "Skill"],
|
|
129
|
+
"user-invocable": true,
|
|
130
|
+
},
|
|
131
|
+
isValid: true,
|
|
132
|
+
errors: [],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "init",
|
|
136
|
+
description: "Analyze the codebase and create an AGENTS.md file to guide future agents.",
|
|
137
|
+
type: "builtin",
|
|
138
|
+
skillPath: "<builtin:init>",
|
|
139
|
+
disableModelInvocation: true,
|
|
140
|
+
content: INIT_CONTENT,
|
|
141
|
+
frontmatter: {
|
|
142
|
+
name: "init",
|
|
143
|
+
description: "Analyze the codebase and create an AGENTS.md file to guide future agents.",
|
|
144
|
+
"disable-model-invocation": true,
|
|
145
|
+
},
|
|
146
|
+
isValid: true,
|
|
147
|
+
errors: [],
|
|
148
|
+
},
|
|
149
|
+
];
|
|
@@ -9,14 +9,6 @@
|
|
|
9
9
|
* - Local configs: {workdir}/.wave/settings.local.json > {workdir}/.wave/settings.json
|
|
10
10
|
* - Project configs override user configs (existing behavior)
|
|
11
11
|
*/
|
|
12
|
-
/**
|
|
13
|
-
* Get the builtin skills directory path
|
|
14
|
-
*/
|
|
15
|
-
export declare function getBuiltinSkillsDir(): string;
|
|
16
|
-
/**
|
|
17
|
-
* Get the builtin subagents directory path
|
|
18
|
-
*/
|
|
19
|
-
export declare function getBuiltinSubagentsDir(): string;
|
|
20
12
|
/**
|
|
21
13
|
* Get the user-specific configuration file path (legacy function)
|
|
22
14
|
* @deprecated Use getUserConfigPaths() for better priority support
|
|
@@ -48,7 +40,6 @@ export declare function getProjectConfigPaths(workdir: string): string[];
|
|
|
48
40
|
export declare function getAllConfigPaths(workdir: string): {
|
|
49
41
|
userPaths: string[];
|
|
50
42
|
projectPaths: string[];
|
|
51
|
-
builtinPaths: string[];
|
|
52
43
|
allPaths: string[];
|
|
53
44
|
};
|
|
54
45
|
/**
|
|
@@ -58,7 +49,6 @@ export declare function getAllConfigPaths(workdir: string): {
|
|
|
58
49
|
export declare function getExistingConfigPaths(workdir: string): {
|
|
59
50
|
userPaths: string[];
|
|
60
51
|
projectPaths: string[];
|
|
61
|
-
builtinPaths: string[];
|
|
62
52
|
existingPaths: string[];
|
|
63
53
|
};
|
|
64
54
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configPaths.d.ts","sourceRoot":"","sources":["../../src/utils/configPaths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"configPaths.d.ts","sourceRoot":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AAO,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACH,CAcA"}
|
|
@@ -9,28 +9,9 @@
|
|
|
9
9
|
* - Local configs: {workdir}/.wave/settings.local.json > {workdir}/.wave/settings.json
|
|
10
10
|
* - Project configs override user configs (existing behavior)
|
|
11
11
|
*/
|
|
12
|
-
import { join
|
|
12
|
+
import { join } from "path";
|
|
13
13
|
import { homedir } from "os";
|
|
14
14
|
import { existsSync } from "fs";
|
|
15
|
-
import { fileURLToPath } from "url";
|
|
16
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
17
|
-
const __dirname = dirname(__filename);
|
|
18
|
-
/**
|
|
19
|
-
* Get the builtin skills directory path
|
|
20
|
-
*/
|
|
21
|
-
export function getBuiltinSkillsDir() {
|
|
22
|
-
// Builtin skills are now in the 'builtin/skills' directory at the root of the package
|
|
23
|
-
// Relative to this file (src/utils/configPaths.ts), it's ../../builtin/skills
|
|
24
|
-
return join(__dirname, "..", "..", "builtin", "skills");
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Get the builtin subagents directory path
|
|
28
|
-
*/
|
|
29
|
-
export function getBuiltinSubagentsDir() {
|
|
30
|
-
// Builtin subagents are now in the 'builtin/subagents' directory at the root of the package
|
|
31
|
-
// Relative to this file (src/utils/configPaths.ts), it's ../../builtin/subagents
|
|
32
|
-
return join(__dirname, "..", "..", "builtin", "subagents");
|
|
33
|
-
}
|
|
34
15
|
/**
|
|
35
16
|
* Get the user-specific configuration file path (legacy function)
|
|
36
17
|
* @deprecated Use getUserConfigPaths() for better priority support
|
|
@@ -74,12 +55,10 @@ export function getProjectConfigPaths(workdir) {
|
|
|
74
55
|
export function getAllConfigPaths(workdir) {
|
|
75
56
|
const userPaths = getUserConfigPaths();
|
|
76
57
|
const projectPaths = getProjectConfigPaths(workdir);
|
|
77
|
-
const builtinPaths = [join(getBuiltinSkillsDir(), "settings", "SKILL.md")];
|
|
78
58
|
return {
|
|
79
59
|
userPaths,
|
|
80
60
|
projectPaths,
|
|
81
|
-
|
|
82
|
-
allPaths: [...userPaths, ...projectPaths, ...builtinPaths],
|
|
61
|
+
allPaths: [...userPaths, ...projectPaths],
|
|
83
62
|
};
|
|
84
63
|
}
|
|
85
64
|
/**
|
|
@@ -90,12 +69,10 @@ export function getExistingConfigPaths(workdir) {
|
|
|
90
69
|
const allPaths = getAllConfigPaths(workdir);
|
|
91
70
|
const existingUserPaths = allPaths.userPaths.filter(existsSync);
|
|
92
71
|
const existingProjectPaths = allPaths.projectPaths.filter(existsSync);
|
|
93
|
-
const existingBuiltinPaths = allPaths.builtinPaths.filter(existsSync);
|
|
94
72
|
const allExistingPaths = allPaths.allPaths.filter(existsSync);
|
|
95
73
|
return {
|
|
96
74
|
userPaths: existingUserPaths,
|
|
97
75
|
projectPaths: existingProjectPaths,
|
|
98
|
-
builtinPaths: existingBuiltinPaths,
|
|
99
76
|
existingPaths: allExistingPaths,
|
|
100
77
|
};
|
|
101
78
|
}
|
|
@@ -10,6 +10,11 @@ export interface SubagentConfiguration {
|
|
|
10
10
|
/** Plugin root directory path, set when scope is "plugin" */
|
|
11
11
|
pluginRoot?: string;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Builtin subagent configurations hardcoded as TypeScript objects.
|
|
15
|
+
* Replaces the former builtin/subagents directory of markdown files.
|
|
16
|
+
*/
|
|
17
|
+
export declare const BUILTIN_SUBAGENTS: SubagentConfiguration[];
|
|
13
18
|
/**
|
|
14
19
|
* Parse a plugin agent markdown file.
|
|
15
20
|
* Exposed as a public API for PluginLoader to use.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagentParser.d.ts","sourceRoot":"","sources":["../../src/utils/subagentParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subagentParser.d.ts","sourceRoot":"","sources":["../../src/utils/subagentParser.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,qBAAqB,EAwJpD,CAAC;AAkKF;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,QAAQ,EACf,UAAU,EAAE,MAAM,GACjB,qBAAqB,CAEvB;AAqCD;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAsBlC;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAGvC"}
|
|
@@ -1,7 +1,159 @@
|
|
|
1
1
|
import { readFileSync, readdirSync, statSync } from "fs";
|
|
2
2
|
import { join, extname, basename } from "path";
|
|
3
3
|
import { logger } from "./globalLogger.js";
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Builtin subagent configurations hardcoded as TypeScript objects.
|
|
6
|
+
* Replaces the former builtin/subagents directory of markdown files.
|
|
7
|
+
*/
|
|
8
|
+
export const BUILTIN_SUBAGENTS = [
|
|
9
|
+
{
|
|
10
|
+
name: "Explore",
|
|
11
|
+
description: 'Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. "src/components/**/*.tsx"), search code for keywords (eg. "API endpoints"), or answer questions about the codebase (eg. "how do API endpoints work?"). When calling this agent, specify the desired thoroughness level: "quick" for basic searches, "medium" for moderate exploration, or "very thorough" for comprehensive analysis across multiple locations and naming conventions.',
|
|
12
|
+
tools: ["Glob", "Grep", "Read", "Bash", "LSP"],
|
|
13
|
+
model: "fastModel",
|
|
14
|
+
systemPrompt: `You are a file search specialist. You excel at thoroughly navigating and exploring codebases.
|
|
15
|
+
|
|
16
|
+
=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
|
|
17
|
+
This is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:
|
|
18
|
+
- Creating new files (no Write, touch, or file creation of any kind)
|
|
19
|
+
- Modifying existing files (no Edit operations)
|
|
20
|
+
- Moving or copying files (no mv or cp)
|
|
21
|
+
- Creating temporary files anywhere, including /tmp
|
|
22
|
+
- Using redirect operators (>, >>, |) or heredocs to write to files
|
|
23
|
+
- Running ANY commands that change system state
|
|
24
|
+
|
|
25
|
+
Your role is EXCLUSIVELY to search and analyze existing code. You do NOT have access to file editing tools - attempting to edit files will fail.
|
|
26
|
+
|
|
27
|
+
Your strengths:
|
|
28
|
+
- Rapidly finding files using glob patterns
|
|
29
|
+
- Searching code and text with powerful regex patterns
|
|
30
|
+
- Reading and analyzing file contents
|
|
31
|
+
- Using Language Server Protocol (LSP) for deep code intelligence (definitions, references, etc.)
|
|
32
|
+
|
|
33
|
+
Guidelines:
|
|
34
|
+
- Use Glob for broad file pattern matching
|
|
35
|
+
- Use Grep for searching file contents with regex
|
|
36
|
+
- Use Read when you know the specific file path you need to read
|
|
37
|
+
- Use LSP for code intelligence features like finding definitions, references, implementations, and symbols. This is especially useful for understanding complex code relationships.
|
|
38
|
+
- Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
|
|
39
|
+
- NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification
|
|
40
|
+
- Adapt your search approach based on the thoroughness level specified by the caller
|
|
41
|
+
- Return file paths as absolute paths in your final response
|
|
42
|
+
- For clear communication, avoid using emojis
|
|
43
|
+
- Communicate your final report directly as a regular message - do NOT attempt to create files
|
|
44
|
+
|
|
45
|
+
NOTE: You are meant to be a fast agent that returns output as quickly as possible. In order to achieve this you must:
|
|
46
|
+
- Make efficient use of the tools that you have at your disposal: be smart about how you search for files and implementations
|
|
47
|
+
- Wherever possible you should try to spawn multiple parallel tool calls for grepping and reading files
|
|
48
|
+
|
|
49
|
+
Complete the user's search request efficiently and report your findings clearly.`,
|
|
50
|
+
filePath: "<builtin:Explore>",
|
|
51
|
+
scope: "builtin",
|
|
52
|
+
priority: 3,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Bash",
|
|
56
|
+
description: "Command execution specialist for running bash commands. Use this for git operations, command execution, and other terminal tasks.",
|
|
57
|
+
tools: ["Bash"],
|
|
58
|
+
model: "inherit",
|
|
59
|
+
systemPrompt: `You are a command execution specialist. Your role is to execute bash commands efficiently and safely.
|
|
60
|
+
|
|
61
|
+
Guidelines:
|
|
62
|
+
- Execute commands precisely as instructed
|
|
63
|
+
- For git operations, follow git safety protocols
|
|
64
|
+
- Report command output clearly and concisely
|
|
65
|
+
- If a command fails, explain the error and suggest solutions
|
|
66
|
+
- Use command chaining (&&) for dependent operations
|
|
67
|
+
- Quote paths with spaces properly
|
|
68
|
+
- For clear communication, avoid using emojis
|
|
69
|
+
|
|
70
|
+
Complete the requested operations efficiently.`,
|
|
71
|
+
filePath: "<builtin:Bash>",
|
|
72
|
+
scope: "builtin",
|
|
73
|
+
priority: 3,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "Plan",
|
|
77
|
+
description: "Software architect agent for designing implementation plans. Use this when you need to plan the implementation strategy for a task. Returns step-by-step plans, identifies critical files, and considers architectural trade-offs.",
|
|
78
|
+
tools: ["Glob", "Grep", "Read", "Bash", "LSP"],
|
|
79
|
+
model: "inherit",
|
|
80
|
+
systemPrompt: `You are a software architect and planning specialist. Your role is to explore the codebase and design implementation plans.
|
|
81
|
+
|
|
82
|
+
=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
|
|
83
|
+
This is a READ-ONLY planning task. You are STRICTLY PROHIBITED from:
|
|
84
|
+
- Creating new files (no Write, touch, or file creation of any kind)
|
|
85
|
+
- Modifying existing files (no Edit operations)
|
|
86
|
+
- Moving or copying files (no mv or cp)
|
|
87
|
+
- Creating temporary files anywhere, including /tmp
|
|
88
|
+
- Using redirect operators (>, >>, |) or heredocs to write to files
|
|
89
|
+
- Running ANY commands that change system state
|
|
90
|
+
|
|
91
|
+
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.
|
|
92
|
+
|
|
93
|
+
You will be provided with a set of requirements and optionally a perspective on how to approach the design process.
|
|
94
|
+
|
|
95
|
+
## Your Process
|
|
96
|
+
|
|
97
|
+
1. **Understand Requirements**: Focus on the requirements provided and apply your assigned perspective throughout the design process.
|
|
98
|
+
|
|
99
|
+
2. **Explore Thoroughly**:
|
|
100
|
+
- Read any files provided to you in the initial prompt
|
|
101
|
+
- Find existing patterns and conventions using Glob, Grep, and Read
|
|
102
|
+
- Understand the current architecture
|
|
103
|
+
- Identify similar features as reference
|
|
104
|
+
- Trace through relevant code paths
|
|
105
|
+
- Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
|
|
106
|
+
- NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification
|
|
107
|
+
|
|
108
|
+
3. **Design Solution**:
|
|
109
|
+
- Create implementation approach based on your assigned perspective
|
|
110
|
+
- Consider trade-offs and architectural decisions
|
|
111
|
+
- Follow existing patterns where appropriate
|
|
112
|
+
|
|
113
|
+
4. **Detail the Plan**:
|
|
114
|
+
- Provide step-by-step implementation strategy
|
|
115
|
+
- Identify dependencies and sequencing
|
|
116
|
+
- Anticipate potential challenges
|
|
117
|
+
|
|
118
|
+
## Required Output
|
|
119
|
+
|
|
120
|
+
End your response with:
|
|
121
|
+
|
|
122
|
+
### Critical Files for Implementation
|
|
123
|
+
List 3-5 files most critical for implementing this plan:
|
|
124
|
+
- path/to/file1.ts - [Brief reason: e.g., "Core logic to modify"]
|
|
125
|
+
- path/to/file2.ts - [Brief reason: e.g., "Interfaces to implement"]
|
|
126
|
+
- path/to/file3.ts - [Brief reason: e.g., "Pattern to follow"]
|
|
127
|
+
|
|
128
|
+
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.`,
|
|
129
|
+
filePath: "<builtin:Plan>",
|
|
130
|
+
scope: "builtin",
|
|
131
|
+
priority: 3,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "general-purpose",
|
|
135
|
+
description: "General-purpose agent for researching complex questions, searching for code, and executing multi-step tasks. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries use this agent to perform the search for you.",
|
|
136
|
+
systemPrompt: `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.
|
|
137
|
+
|
|
138
|
+
Your strengths:
|
|
139
|
+
- Searching for code, configurations, and patterns across large codebases
|
|
140
|
+
- Analyzing multiple files to understand system architecture
|
|
141
|
+
- Investigating complex questions that require exploring many files
|
|
142
|
+
- Performing multi-step research tasks
|
|
143
|
+
|
|
144
|
+
Guidelines:
|
|
145
|
+
- For file searches: Use Grep or Glob when you need to search broadly. Use Read when you know the specific file path.
|
|
146
|
+
- For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.
|
|
147
|
+
- Be thorough: Check multiple locations, consider different naming conventions, look for related files.
|
|
148
|
+
- NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one.
|
|
149
|
+
- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested.
|
|
150
|
+
- 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.
|
|
151
|
+
- For clear communication, avoid using emojis.`,
|
|
152
|
+
filePath: "<builtin:general-purpose>",
|
|
153
|
+
scope: "builtin",
|
|
154
|
+
priority: 3,
|
|
155
|
+
},
|
|
156
|
+
];
|
|
5
157
|
/**
|
|
6
158
|
* Parse YAML frontmatter from markdown file content
|
|
7
159
|
*/
|
|
@@ -162,9 +314,9 @@ function scanSubagentDirectory(dirPath, scope) {
|
|
|
162
314
|
export async function loadSubagentConfigurations(workdir) {
|
|
163
315
|
const projectDir = join(workdir, ".wave", "agents");
|
|
164
316
|
const userDir = join(process.env.HOME || "~", ".wave", "agents");
|
|
165
|
-
const builtinDir = getBuiltinSubagentsDir();
|
|
166
317
|
// Load configurations from all sources
|
|
167
|
-
|
|
318
|
+
// Builtin subagents are hardcoded in TS, not scanned from a directory
|
|
319
|
+
const builtinConfigs = [...BUILTIN_SUBAGENTS];
|
|
168
320
|
const projectConfigs = scanSubagentDirectory(projectDir, "project");
|
|
169
321
|
const userConfigs = scanSubagentDirectory(userDir, "user");
|
|
170
322
|
// Merge configurations, with project configs taking highest precedence
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-agent-sdk",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.4",
|
|
4
4
|
"description": "SDK for building AI-powered development tools and agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
"bin",
|
|
25
25
|
"vendor",
|
|
26
26
|
"scripts",
|
|
27
|
-
"builtin",
|
|
28
27
|
"README.md"
|
|
29
28
|
],
|
|
30
29
|
"dependencies": {
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
replaceBashCommandsWithOutput,
|
|
20
20
|
executeBashCommands,
|
|
21
21
|
} from "../utils/markdownParser.js";
|
|
22
|
-
import {
|
|
22
|
+
import { BUILTIN_SKILLS } from "../utils/builtinSkills.js";
|
|
23
23
|
|
|
24
24
|
import { Container } from "../utils/container.js";
|
|
25
25
|
import { logger } from "../utils/globalLogger.js";
|
|
@@ -205,10 +205,24 @@ export class SkillManager extends EventEmitter {
|
|
|
205
205
|
* Discover skills in builtin, personal and project directories
|
|
206
206
|
*/
|
|
207
207
|
private async discoverSkills(): Promise<SkillDiscoveryResult> {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
208
|
+
// Builtin skills are hardcoded in TS, not scanned from a directory
|
|
209
|
+
const builtinSkills = new Map<string, SkillMetadata>();
|
|
210
|
+
for (const skill of BUILTIN_SKILLS) {
|
|
211
|
+
builtinSkills.set(skill.name, {
|
|
212
|
+
name: skill.name,
|
|
213
|
+
description: skill.description,
|
|
214
|
+
type: skill.type,
|
|
215
|
+
skillPath: skill.skillPath,
|
|
216
|
+
allowedTools: skill.allowedTools,
|
|
217
|
+
context: skill.context,
|
|
218
|
+
agent: skill.agent,
|
|
219
|
+
model: skill.model,
|
|
220
|
+
disableModelInvocation: skill.disableModelInvocation,
|
|
221
|
+
userInvocable: skill.userInvocable,
|
|
222
|
+
});
|
|
223
|
+
// Store full skill content for later loading
|
|
224
|
+
this.skillContent.set(skill.name, skill);
|
|
225
|
+
}
|
|
212
226
|
|
|
213
227
|
const personalCollection = await this.discoverSkillCollection(
|
|
214
228
|
this.personalSkillsPath,
|
|
@@ -221,14 +235,10 @@ export class SkillManager extends EventEmitter {
|
|
|
221
235
|
);
|
|
222
236
|
|
|
223
237
|
return {
|
|
224
|
-
builtinSkills
|
|
238
|
+
builtinSkills,
|
|
225
239
|
personalSkills: personalCollection.skills,
|
|
226
240
|
projectSkills: projectCollection.skills,
|
|
227
|
-
errors: [
|
|
228
|
-
...builtinCollection.errors,
|
|
229
|
-
...personalCollection.errors,
|
|
230
|
-
...projectCollection.errors,
|
|
231
|
-
],
|
|
241
|
+
errors: [...personalCollection.errors, ...projectCollection.errors],
|
|
232
242
|
};
|
|
233
243
|
}
|
|
234
244
|
|