wave-agent-sdk 0.15.4 → 0.15.5

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.
Files changed (42) hide show
  1. package/builtin/skills/init/SKILL.md +28 -0
  2. package/builtin/skills/loop/SKILL.md +79 -0
  3. package/builtin/skills/settings/ENV.md +69 -0
  4. package/builtin/skills/settings/HOOKS.md +192 -0
  5. package/builtin/skills/settings/MCP.md +92 -0
  6. package/builtin/skills/settings/MEMORY_RULES.md +60 -0
  7. package/builtin/skills/settings/MODELS.md +71 -0
  8. package/builtin/skills/settings/PERMISSIONS.md +57 -0
  9. package/builtin/skills/settings/PLUGINS.md +171 -0
  10. package/builtin/skills/settings/SKILL.md +121 -0
  11. package/builtin/skills/settings/SKILLS.md +105 -0
  12. package/builtin/skills/settings/SUBAGENTS.md +77 -0
  13. package/builtin/subagents/bash.md +19 -0
  14. package/builtin/subagents/explore.md +43 -0
  15. package/builtin/subagents/general-purpose.md +20 -0
  16. package/builtin/subagents/plan.md +56 -0
  17. package/dist/managers/skillManager.d.ts.map +1 -1
  18. package/dist/managers/skillManager.js +8 -21
  19. package/dist/services/configurationService.d.ts.map +1 -1
  20. package/dist/services/configurationService.js +1 -0
  21. package/dist/types/configuration.d.ts +2 -0
  22. package/dist/types/configuration.d.ts.map +1 -1
  23. package/dist/utils/configPaths.d.ts +11 -0
  24. package/dist/utils/configPaths.d.ts.map +1 -1
  25. package/dist/utils/configPaths.js +40 -2
  26. package/dist/utils/ripgrep.d.ts +2 -0
  27. package/dist/utils/ripgrep.d.ts.map +1 -1
  28. package/dist/utils/ripgrep.js +4 -4
  29. package/dist/utils/subagentParser.d.ts +0 -5
  30. package/dist/utils/subagentParser.d.ts.map +1 -1
  31. package/dist/utils/subagentParser.js +3 -155
  32. package/package.json +3 -1
  33. package/src/managers/skillManager.ts +11 -21
  34. package/src/services/configurationService.ts +1 -0
  35. package/src/types/configuration.ts +2 -0
  36. package/src/utils/configPaths.ts +45 -2
  37. package/src/utils/ripgrep.ts +6 -7
  38. package/src/utils/subagentParser.ts +3 -160
  39. package/dist/utils/builtinSkills.d.ts +0 -7
  40. package/dist/utils/builtinSkills.d.ts.map +0 -1
  41. package/dist/utils/builtinSkills.js +0 -149
  42. package/src/utils/builtinSkills.ts +0 -158
@@ -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;;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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B"}
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,EAAE,aAAa,CAAC,cAAc,CAAC,EAC5C,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,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Z,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"}
@@ -553,6 +553,7 @@ export class ConfigurationService {
553
553
  return {
554
554
  userPaths: allPaths.userPaths,
555
555
  projectPaths: allPaths.projectPaths,
556
+ builtinPaths: allPaths.builtinPaths,
556
557
  allPaths: allPaths.allPaths,
557
558
  existingPaths: existingPaths.existingPaths,
558
559
  };
@@ -92,6 +92,8 @@ 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[];
95
97
  /** All configuration paths combined */
96
98
  allPaths: string[];
97
99
  /** 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;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OAAO,EAAE,KAAK,IAAI,CAAC;CACrC"}
@@ -9,6 +9,15 @@
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
+ export declare function getPackageRoot(): string;
13
+ /**
14
+ * Get the builtin skills directory path
15
+ */
16
+ export declare function getBuiltinSkillsDir(): string;
17
+ /**
18
+ * Get the builtin subagents directory path
19
+ */
20
+ export declare function getBuiltinSubagentsDir(): string;
12
21
  /**
13
22
  * Get the user-specific configuration file path (legacy function)
14
23
  * @deprecated Use getUserConfigPaths() for better priority support
@@ -40,6 +49,7 @@ export declare function getProjectConfigPaths(workdir: string): string[];
40
49
  export declare function getAllConfigPaths(workdir: string): {
41
50
  userPaths: string[];
42
51
  projectPaths: string[];
52
+ builtinPaths: string[];
43
53
  allPaths: string[];
44
54
  };
45
55
  /**
@@ -49,6 +59,7 @@ export declare function getAllConfigPaths(workdir: string): {
49
59
  export declare function getExistingConfigPaths(workdir: string): {
50
60
  userPaths: string[];
51
61
  projectPaths: string[];
62
+ builtinPaths: string[];
52
63
  existingPaths: string[];
53
64
  };
54
65
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"configPaths.d.ts","sourceRoot":"","sources":["../../src/utils/configPaths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAG7C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAG/D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG;IAClD,S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ACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,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,9 +9,43 @@
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 } from "path";
12
+ import { join, dirname } from "path";
13
13
  import { homedir } from "os";
14
14
  import { existsSync } from "fs";
15
+ import { fileURLToPath } from "url";
16
+ import { findUpSync } from "find-up";
17
+ const __filename = fileURLToPath(import.meta.url);
18
+ const __dirname = dirname(__filename);
19
+ /**
20
+ * Resolve the package root directory by finding the nearest package.json.
21
+ * Works correctly even when bundled (e.g. esbuild into a VS Code extension),
22
+ * as long as vendor/ and builtin/ remain alongside package.json on disk.
23
+ */
24
+ let _packageRoot;
25
+ export function getPackageRoot() {
26
+ if (_packageRoot)
27
+ return _packageRoot;
28
+ const pkgPath = findUpSync("package.json", { cwd: __dirname });
29
+ if (pkgPath) {
30
+ _packageRoot = dirname(pkgPath);
31
+ return _packageRoot;
32
+ }
33
+ // Fallback: relative to this file (works during development)
34
+ _packageRoot = join(__dirname, "..", "..");
35
+ return _packageRoot;
36
+ }
37
+ /**
38
+ * Get the builtin skills directory path
39
+ */
40
+ export function getBuiltinSkillsDir() {
41
+ return join(getPackageRoot(), "builtin", "skills");
42
+ }
43
+ /**
44
+ * Get the builtin subagents directory path
45
+ */
46
+ export function getBuiltinSubagentsDir() {
47
+ return join(getPackageRoot(), "builtin", "subagents");
48
+ }
15
49
  /**
16
50
  * Get the user-specific configuration file path (legacy function)
17
51
  * @deprecated Use getUserConfigPaths() for better priority support
@@ -55,10 +89,12 @@ export function getProjectConfigPaths(workdir) {
55
89
  export function getAllConfigPaths(workdir) {
56
90
  const userPaths = getUserConfigPaths();
57
91
  const projectPaths = getProjectConfigPaths(workdir);
92
+ const builtinPaths = [join(getBuiltinSkillsDir(), "settings", "SKILL.md")];
58
93
  return {
59
94
  userPaths,
60
95
  projectPaths,
61
- allPaths: [...userPaths, ...projectPaths],
96
+ builtinPaths,
97
+ allPaths: [...userPaths, ...projectPaths, ...builtinPaths],
62
98
  };
63
99
  }
64
100
  /**
@@ -69,10 +105,12 @@ export function getExistingConfigPaths(workdir) {
69
105
  const allPaths = getAllConfigPaths(workdir);
70
106
  const existingUserPaths = allPaths.userPaths.filter(existsSync);
71
107
  const existingProjectPaths = allPaths.projectPaths.filter(existsSync);
108
+ const existingBuiltinPaths = allPaths.builtinPaths.filter(existsSync);
72
109
  const allExistingPaths = allPaths.allPaths.filter(existsSync);
73
110
  return {
74
111
  userPaths: existingUserPaths,
75
112
  projectPaths: existingProjectPaths,
113
+ builtinPaths: existingBuiltinPaths,
76
114
  existingPaths: allExistingPaths,
77
115
  };
78
116
  }
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * Path to the ripgrep binary bundled in the vendor directory.
3
+ * Uses findUpSync to locate the package root, working correctly even
4
+ * when bundled (e.g. esbuild into a VS Code extension).
3
5
  */
4
6
  export declare const rgPath: string;
5
7
  //# sourceMappingURL=ripgrep.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ripgrep.d.ts","sourceRoot":"","sources":["../../src/utils/ripgrep.ts"],"names":[],"mappings":"AA6BA;;GAEG;AACH,eAAO,MAAM,MAAM,QAGlB,CAAC"}
1
+ {"version":3,"file":"ripgrep.d.ts","sourceRoot":"","sources":["../../src/utils/ripgrep.ts"],"names":[],"mappings":"AA0BA;;;;GAIG;AACH,eAAO,MAAM,MAAM,QAGlB,CAAC"}
@@ -1,8 +1,6 @@
1
- import { fileURLToPath } from "url";
2
1
  import path from "path";
3
2
  import process from "process";
4
- const __filename = fileURLToPath(import.meta.url);
5
- const __dirname = path.dirname(__filename);
3
+ import { getPackageRoot } from "./configPaths.js";
6
4
  /**
7
5
  * Detect the current platform and architecture to find the correct bundled ripgrep binary.
8
6
  */
@@ -25,5 +23,7 @@ const isWindows = platformKey.startsWith("windows");
25
23
  const binaryName = isWindows ? "rg.exe" : "rg";
26
24
  /**
27
25
  * Path to the ripgrep binary bundled in the vendor directory.
26
+ * Uses findUpSync to locate the package root, working correctly even
27
+ * when bundled (e.g. esbuild into a VS Code extension).
28
28
  */
29
- export const rgPath = path.resolve(__dirname, `../../vendor/ripgrep/${platformKey}/${binaryName}`);
29
+ export const rgPath = path.join(getPackageRoot(), `vendor/ripgrep/${platformKey}/${binaryName}`);
@@ -10,11 +10,6 @@ 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[];
18
13
  /**
19
14
  * Parse a plugin agent markdown file.
20
15
  * 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":"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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,CAsBlC;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAGvC"}
@@ -1,159 +1,7 @@
1
1
  import { readFileSync, readdirSync, statSync } from "fs";
2
2
  import { join, extname, basename } from "path";
3
3
  import { logger } from "./globalLogger.js";
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
- ];
4
+ import { getBuiltinSubagentsDir } from "./configPaths.js";
157
5
  /**
158
6
  * Parse YAML frontmatter from markdown file content
159
7
  */
@@ -314,9 +162,9 @@ function scanSubagentDirectory(dirPath, scope) {
314
162
  export async function loadSubagentConfigurations(workdir) {
315
163
  const projectDir = join(workdir, ".wave", "agents");
316
164
  const userDir = join(process.env.HOME || "~", ".wave", "agents");
165
+ const builtinDir = getBuiltinSubagentsDir();
317
166
  // Load configurations from all sources
318
- // Builtin subagents are hardcoded in TS, not scanned from a directory
319
- const builtinConfigs = [...BUILTIN_SUBAGENTS];
167
+ const builtinConfigs = scanSubagentDirectory(builtinDir, "builtin");
320
168
  const projectConfigs = scanSubagentDirectory(projectDir, "project");
321
169
  const userConfigs = scanSubagentDirectory(userDir, "user");
322
170
  // 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.4",
3
+ "version": "0.15.5",
4
4
  "description": "SDK for building AI-powered development tools and agents",
5
5
  "keywords": [
6
6
  "ai",
@@ -24,12 +24,14 @@
24
24
  "bin",
25
25
  "vendor",
26
26
  "scripts",
27
+ "builtin",
27
28
  "README.md"
28
29
  ],
29
30
  "dependencies": {
30
31
  "@modelcontextprotocol/sdk": "^1.18.2",
31
32
  "chokidar": "^5.0.0",
32
33
  "cron-parser": "^5.5.0",
34
+ "find-up": "^8.0.0",
33
35
  "fuzzysort": "^3.1.0",
34
36
  "glob": "^13.0.0",
35
37
  "lru-cache": "^11.3.5",
@@ -19,7 +19,7 @@ import {
19
19
  replaceBashCommandsWithOutput,
20
20
  executeBashCommands,
21
21
  } from "../utils/markdownParser.js";
22
- import { BUILTIN_SKILLS } from "../utils/builtinSkills.js";
22
+ import { getBuiltinSkillsDir } from "../utils/configPaths.js";
23
23
 
24
24
  import { Container } from "../utils/container.js";
25
25
  import { logger } from "../utils/globalLogger.js";
@@ -205,24 +205,10 @@ 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
- // 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
- }
208
+ const builtinCollection = await this.discoverSkillCollection(
209
+ getBuiltinSkillsDir(),
210
+ "builtin",
211
+ );
226
212
 
227
213
  const personalCollection = await this.discoverSkillCollection(
228
214
  this.personalSkillsPath,
@@ -235,10 +221,14 @@ export class SkillManager extends EventEmitter {
235
221
  );
236
222
 
237
223
  return {
238
- builtinSkills,
224
+ builtinSkills: builtinCollection.skills,
239
225
  personalSkills: personalCollection.skills,
240
226
  projectSkills: projectCollection.skills,
241
- errors: [...personalCollection.errors, ...projectCollection.errors],
227
+ errors: [
228
+ ...builtinCollection.errors,
229
+ ...personalCollection.errors,
230
+ ...projectCollection.errors,
231
+ ],
242
232
  };
243
233
  }
244
234
 
@@ -705,6 +705,7 @@ export class ConfigurationService {
705
705
  return {
706
706
  userPaths: allPaths.userPaths,
707
707
  projectPaths: allPaths.projectPaths,
708
+ builtinPaths: allPaths.builtinPaths,
708
709
  allPaths: allPaths.allPaths,
709
710
  existingPaths: existingPaths.existingPaths,
710
711
  };
@@ -104,6 +104,8 @@ export interface ConfigurationPaths {
104
104
  userPaths: string[];
105
105
  /** Project-specific configuration file paths in priority order */
106
106
  projectPaths: string[];
107
+ /** Builtin configuration file paths */
108
+ builtinPaths: string[];
107
109
  /** All configuration paths combined */
108
110
  allPaths: string[];
109
111
  /** Only the paths that actually exist on the filesystem */
@@ -10,9 +10,46 @@
10
10
  * - Project configs override user configs (existing behavior)
11
11
  */
12
12
 
13
- import { join } from "path";
13
+ import { join, dirname } from "path";
14
14
  import { homedir } from "os";
15
15
  import { existsSync } from "fs";
16
+ import { fileURLToPath } from "url";
17
+ import { findUpSync } from "find-up";
18
+
19
+ const __filename = fileURLToPath(import.meta.url);
20
+ const __dirname = dirname(__filename);
21
+
22
+ /**
23
+ * Resolve the package root directory by finding the nearest package.json.
24
+ * Works correctly even when bundled (e.g. esbuild into a VS Code extension),
25
+ * as long as vendor/ and builtin/ remain alongside package.json on disk.
26
+ */
27
+ let _packageRoot: string | undefined;
28
+ export function getPackageRoot(): string {
29
+ if (_packageRoot) return _packageRoot;
30
+ const pkgPath = findUpSync("package.json", { cwd: __dirname });
31
+ if (pkgPath) {
32
+ _packageRoot = dirname(pkgPath);
33
+ return _packageRoot;
34
+ }
35
+ // Fallback: relative to this file (works during development)
36
+ _packageRoot = join(__dirname, "..", "..");
37
+ return _packageRoot;
38
+ }
39
+
40
+ /**
41
+ * Get the builtin skills directory path
42
+ */
43
+ export function getBuiltinSkillsDir(): string {
44
+ return join(getPackageRoot(), "builtin", "skills");
45
+ }
46
+
47
+ /**
48
+ * Get the builtin subagents directory path
49
+ */
50
+ export function getBuiltinSubagentsDir(): string {
51
+ return join(getPackageRoot(), "builtin", "subagents");
52
+ }
16
53
 
17
54
  /**
18
55
  * Get the user-specific configuration file path (legacy function)
@@ -62,15 +99,18 @@ export function getProjectConfigPaths(workdir: string): string[] {
62
99
  export function getAllConfigPaths(workdir: string): {
63
100
  userPaths: string[];
64
101
  projectPaths: string[];
102
+ builtinPaths: string[];
65
103
  allPaths: string[];
66
104
  } {
67
105
  const userPaths = getUserConfigPaths();
68
106
  const projectPaths = getProjectConfigPaths(workdir);
107
+ const builtinPaths = [join(getBuiltinSkillsDir(), "settings", "SKILL.md")];
69
108
 
70
109
  return {
71
110
  userPaths,
72
111
  projectPaths,
73
- allPaths: [...userPaths, ...projectPaths],
112
+ builtinPaths,
113
+ allPaths: [...userPaths, ...projectPaths, ...builtinPaths],
74
114
  };
75
115
  }
76
116
 
@@ -81,17 +121,20 @@ export function getAllConfigPaths(workdir: string): {
81
121
  export function getExistingConfigPaths(workdir: string): {
82
122
  userPaths: string[];
83
123
  projectPaths: string[];
124
+ builtinPaths: string[];
84
125
  existingPaths: string[];
85
126
  } {
86
127
  const allPaths = getAllConfigPaths(workdir);
87
128
 
88
129
  const existingUserPaths = allPaths.userPaths.filter(existsSync);
89
130
  const existingProjectPaths = allPaths.projectPaths.filter(existsSync);
131
+ const existingBuiltinPaths = allPaths.builtinPaths.filter(existsSync);
90
132
  const allExistingPaths = allPaths.allPaths.filter(existsSync);
91
133
 
92
134
  return {
93
135
  userPaths: existingUserPaths,
94
136
  projectPaths: existingProjectPaths,
137
+ builtinPaths: existingBuiltinPaths,
95
138
  existingPaths: allExistingPaths,
96
139
  };
97
140
  }
@@ -1,9 +1,6 @@
1
- import { fileURLToPath } from "url";
2
1
  import path from "path";
3
2
  import process from "process";
4
-
5
- const __filename = fileURLToPath(import.meta.url);
6
- const __dirname = path.dirname(__filename);
3
+ import { getPackageRoot } from "./configPaths.js";
7
4
 
8
5
  /**
9
6
  * Detect the current platform and architecture to find the correct bundled ripgrep binary.
@@ -29,8 +26,10 @@ const binaryName = isWindows ? "rg.exe" : "rg";
29
26
 
30
27
  /**
31
28
  * Path to the ripgrep binary bundled in the vendor directory.
29
+ * Uses findUpSync to locate the package root, working correctly even
30
+ * when bundled (e.g. esbuild into a VS Code extension).
32
31
  */
33
- export const rgPath = path.resolve(
34
- __dirname,
35
- `../../vendor/ripgrep/${platformKey}/${binaryName}`,
32
+ export const rgPath = path.join(
33
+ getPackageRoot(),
34
+ `vendor/ripgrep/${platformKey}/${binaryName}`,
36
35
  );