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.
Files changed (38) hide show
  1. package/dist/managers/skillManager.d.ts.map +1 -1
  2. package/dist/managers/skillManager.js +21 -8
  3. package/dist/services/configurationService.d.ts.map +1 -1
  4. package/dist/services/configurationService.js +0 -1
  5. package/dist/types/configuration.d.ts +0 -2
  6. package/dist/types/configuration.d.ts.map +1 -1
  7. package/dist/utils/builtinSkills.d.ts +7 -0
  8. package/dist/utils/builtinSkills.d.ts.map +1 -0
  9. package/dist/utils/builtinSkills.js +149 -0
  10. package/dist/utils/configPaths.d.ts +0 -10
  11. package/dist/utils/configPaths.d.ts.map +1 -1
  12. package/dist/utils/configPaths.js +2 -25
  13. package/dist/utils/subagentParser.d.ts +5 -0
  14. package/dist/utils/subagentParser.d.ts.map +1 -1
  15. package/dist/utils/subagentParser.js +155 -3
  16. package/package.json +1 -2
  17. package/src/managers/skillManager.ts +21 -11
  18. package/src/services/configurationService.ts +0 -1
  19. package/src/types/configuration.ts +0 -2
  20. package/src/utils/builtinSkills.ts +158 -0
  21. package/src/utils/configPaths.ts +2 -30
  22. package/src/utils/subagentParser.ts +160 -3
  23. package/builtin/skills/init/SKILL.md +0 -28
  24. package/builtin/skills/loop/SKILL.md +0 -79
  25. package/builtin/skills/settings/ENV.md +0 -69
  26. package/builtin/skills/settings/HOOKS.md +0 -192
  27. package/builtin/skills/settings/MCP.md +0 -92
  28. package/builtin/skills/settings/MEMORY_RULES.md +0 -60
  29. package/builtin/skills/settings/MODELS.md +0 -71
  30. package/builtin/skills/settings/PERMISSIONS.md +0 -57
  31. package/builtin/skills/settings/PLUGINS.md +0 -171
  32. package/builtin/skills/settings/SKILL.md +0 -121
  33. package/builtin/skills/settings/SKILLS.md +0 -105
  34. package/builtin/skills/settings/SUBAGENTS.md +0 -77
  35. package/builtin/subagents/bash.md +0 -19
  36. package/builtin/subagents/explore.md +0 -43
  37. package/builtin/subagents/general-purpose.md +0 -20
  38. package/builtin/subagents/plan.md +0 -56
@@ -1,121 +0,0 @@
1
- ---
2
- name: settings
3
- description: Manage Wave settings and get guidance on settings.json, hooks, environment variables, permissions, MCP servers, memory rules, skills, subagents, plugins, and plugin marketplaces. Use this when the user wants to view, update, or learn how to configure Wave.
4
- ---
5
-
6
- # Wave Settings Skill
7
-
8
- This skill helps you manage your Wave configuration and provides guidance on how to use `settings.json`.
9
-
10
- ## What is `settings.json`?
11
-
12
- `settings.json` is the central configuration file for Wave. It allows you to customize hooks, environment variables, tool permissions, and more.
13
-
14
- ### Live Reload
15
-
16
- Changes to `settings.json` take effect immediately without restarting Wave. When you modify any setting, the new configuration is applied to subsequent operations automatically.
17
-
18
- Wave looks for `settings.json` in three scopes:
19
- 1. **User Scope**: Global settings for all projects. Located at `~/.wave/settings.json`.
20
- 2. **Project Scope**: Settings specific to the current project. Located at `.wave/settings.json` in your project root.
21
- 3. **Local Scope**: Local overrides for the current project (not committed to git). Located at `.wave/settings.local.json`.
22
-
23
- ## Common Settings
24
-
25
- ### 1. Hooks
26
- Hooks allow you to automate tasks when certain events occur (e.g., `PreToolUse`, `PostToolUse`, `SessionStart`, `SessionEnd`).
27
- For detailed hook configuration, see [HOOKS.md](${WAVE_SKILL_DIR}/HOOKS.md).
28
-
29
- ### 2. Environment Variables
30
- Set environment variables that will be available to all tools and hooks. Common `WAVE_*` variables include:
31
- - `WAVE_MODEL`, `WAVE_FAST_MODEL`: Model selection
32
- - `WAVE_MAX_INPUT_TOKENS`, `WAVE_MAX_OUTPUT_TOKENS`: Token limits
33
- - `WAVE_API_KEY`, `WAVE_BASE_URL`: API configuration
34
-
35
- For detailed configuration, see [ENV.md](${WAVE_SKILL_DIR}/ENV.md).
36
- ```json
37
- {
38
- "env": {
39
- "NODE_ENV": "development",
40
- "API_KEY": "your-api-key"
41
- }
42
- }
43
- ```
44
-
45
- ### 3. Permissions
46
- Manage tool permissions and define the "Safe Zone". Changes to permissions take effect immediately with live reload.
47
- For detailed permission configuration and available permission modes, see [PERMISSIONS.md](${WAVE_SKILL_DIR}/PERMISSIONS.md).
48
- ```json
49
- {
50
- "permissions": {
51
- "allow": ["Bash", "Read"],
52
- "deny": ["Write"],
53
- "permissionMode": "default",
54
- "additionalDirectories": ["/tmp/wave-exports"]
55
- }
56
- }
57
- ```
58
-
59
- ### 4. Model Configuration
60
- Define which AI models Wave should use and set model-specific parameters like `temperature`, `reasoning_effort`, and `thinking`. You can also configure model selection and token limits via environment variables in the `env` field.
61
- For detailed model configuration, see [MODELS.md](${WAVE_SKILL_DIR}/MODELS.md).
62
- ```json
63
- {
64
- "models": {
65
- "claude-3-7-sonnet-20250219": {
66
- "thinking": {
67
- "type": "enabled",
68
- "budget_tokens": 1024
69
- }
70
- },
71
- "o3-mini": {
72
- "reasoning_effort": "high"
73
- }
74
- }
75
- }
76
- ```
77
-
78
- ### 5. Model Context Protocol (MCP)
79
- Connect to external servers to provide additional tools and context.
80
- For detailed MCP configuration, see [MCP.md](${WAVE_SKILL_DIR}/MCP.md).
81
-
82
- ### 6. Memory Rules
83
- Provide context-specific instructions and guidelines to the agent.
84
- For detailed memory rules configuration, see [MEMORY_RULES.md](${WAVE_SKILL_DIR}/MEMORY_RULES.md).
85
-
86
- ### 7. Skills
87
- Extend Wave's functionality by creating custom skills.
88
- For detailed guidance on creating skills, see [SKILLS.md](${WAVE_SKILL_DIR}/SKILLS.md).
89
-
90
- ### 8. Subagents
91
- Delegate tasks to specialized AI personalities.
92
- For detailed guidance on creating subagents, see [SUBAGENTS.md](${WAVE_SKILL_DIR}/SUBAGENTS.md).
93
-
94
- ### 9. Plugins
95
-
96
- Plugins bundle skills, hooks, MCP servers, LSP servers, commands, and subagents into a reusable package. You can install plugins locally or from a marketplace.
97
- For detailed guidance on creating plugins and marketplaces, see [PLUGINS.md](${WAVE_SKILL_DIR}/PLUGINS.md).
98
-
99
- ### 10. Other Settings
100
- - `language`: Preferred language for agent communication (e.g., `"en"`, `"zh"`).
101
- - `autoMemoryEnabled`: Enable or disable auto-memory (default: `true`).
102
- - `autoMemoryFrequency`: Frequency of auto-memory extraction turns (default: `1`).
103
-
104
- ## How to use this skill
105
-
106
- You can ask me to:
107
- - "Show my current settings"
108
- - "Update my project settings to enable auto-memory"
109
- - "How do I configure a post-commit hook?"
110
- - "What are the available permission modes?"
111
- - "Update my permission mode to acceptEdits"
112
- - "How do I extend the Safe Zone for permissions?"
113
- - "How do I create a custom skill?"
114
- - "How do I define a new subagent?"
115
- - "How do I set max input tokens?"
116
- - "How do I change the model?"
117
- - "How do I create a Wave plugin?"
118
- - "How do I set up a plugin marketplace?"
119
- - "How do I install a plugin from a marketplace?"
120
-
121
- I will guide you through the process and ensure your configuration is valid.
@@ -1,105 +0,0 @@
1
- # Creating and Managing Wave Skills
2
-
3
- Skills are discoverable capabilities that extend Wave's functionality. They allow you to package instructions, tools, and scripts into reusable modules.
4
-
5
- ## Skill Structure
6
-
7
- A skill is a directory containing a `SKILL.md` file.
8
-
9
- ```text
10
- my-skill/
11
- ├── SKILL.md # Main skill definition (required)
12
- ├── reference.md # Supporting documentation (optional)
13
- ├── scripts/ # Custom scripts (optional)
14
- └── templates/ # Code templates (optional)
15
- ```
16
-
17
- ## The `SKILL.md` File
18
-
19
- The `SKILL.md` file uses YAML frontmatter for configuration and Markdown for instructions. When `context: fork` is used, the Markdown body is passed as the initial prompt to the subagent.
20
-
21
- ```markdown
22
- ---
23
- name: my-skill
24
- description: A brief description of what the skill does.
25
- context: fork
26
- allowed-tools:
27
- - Bash
28
- - Read
29
- ---
30
-
31
- # My Skill Instructions
32
-
33
- When this skill is invoked, follow these steps:
34
- 1. Use the `Read` tool to examine the project structure.
35
- 2. Use the `Bash` tool to run `npm test`.
36
- ```
37
-
38
- ### YAML Frontmatter Fields
39
-
40
- - `name`: (Required) Unique identifier (lowercase, numbers, hyphens).
41
- - `description`: (Required) Explains when the AI should use this skill.
42
- - `allowed-tools`: (Optional) List of tools the skill can use.
43
- - `context: fork`: (Optional) Run the skill in a separate subagent.
44
- - `agent`: (Optional) Specify the subagent type (default: `general-purpose`).
45
- - `disable-model-invocation`: (Optional, default: `false`) Set to `true` to hide the skill from the AI's available skills list. The skill can still be invoked by users via slash commands.
46
- - `user-invocable`: (Optional, default: `true`) Set to `false` to hide the skill from the `/` slash command menu. The AI can still invoke it unless `disable-model-invocation` is also set.
47
- - `model`: (Optional) Override the AI model used for skill execution (e.g., `"gpt-4o"`, `"o3-mini"`).
48
-
49
- ## Skill Locations
50
-
51
- Wave looks for skills in two locations:
52
-
53
- 1. **User Skills**: `~/.wave/skills/` (Available in all projects)
54
- 2. **Project Skills**: `.wave/skills/` (Specific to the current project)
55
-
56
- Project skills take precedence over user skills with the same name.
57
-
58
- ## Invoking Skills
59
-
60
- - **AI-Invoked**: The agent automatically discovers and uses skills based on their `description`.
61
- - **User-Invoked**: Use slash commands in the CLI (e.g., `/my-skill`).
62
-
63
- ## Bash Command Substitution
64
-
65
- You can embed shell commands in skill content using two syntaxes. Commands are executed and their output is inserted inline when the skill is invoked.
66
-
67
- ### Inline Syntax
68
-
69
- Use `!`command`` for single-line commands:
70
-
71
- ```markdown
72
- Current git status: !`git status --short`
73
- ```
74
-
75
- ### Block Syntax
76
-
77
- Use ` ```! ` code blocks for multi-line commands:
78
-
79
- ```markdown
80
- ```!
81
- git log --oneline -10
82
- ```
83
- ```
84
-
85
- Blocks are processed before inline commands, with results replaced in order of appearance.
86
-
87
- ### Output Limits
88
-
89
- - Output is capped at **30,000 characters** per command.
90
- - When truncated, a 2,048-character preview is shown along with a temp file path containing the full output.
91
-
92
- ### Safe Replacement
93
-
94
- Shell output containing special strings like `$$`, `$&`, `$'` is replaced safely without corruption.
95
-
96
- ### Empty Commands
97
-
98
- Empty or whitespace-only commands are silently skipped.
99
-
100
- ## Best Practices
101
-
102
- - **Clear Descriptions**: Write descriptions that help the AI understand exactly when the skill is relevant.
103
- - **Modular Design**: Keep skills focused on a single task or capability.
104
- - **Use `${WAVE_SKILL_DIR}`**: Use this placeholder to reference files within the skill directory.
105
- - **Bash Commands**: Use `!`command`` for inline output or ` ```! ` blocks for multi-line commands. Keep outputs concise.
@@ -1,77 +0,0 @@
1
- # Creating and Managing Wave Subagents
2
-
3
- Subagents are specialized AI personalities that Wave can delegate tasks to. They have their own context windows, expertise areas, and tool configurations.
4
-
5
- ## Subagent Structure
6
-
7
- A subagent is defined by a Markdown file with YAML frontmatter.
8
-
9
- ```text
10
- .wave/agents/
11
- └── my-subagent.md # Subagent definition
12
- ```
13
-
14
- ## The `subagent.md` File
15
-
16
- The `subagent.md` file uses YAML frontmatter for configuration and Markdown for the system prompt. The Markdown content (excluding frontmatter) is passed directly as the system prompt to the subagent. Avoid using top-level Markdown headers (like `# My Subagent`) unless you want them to be part of the system prompt.
17
-
18
- ```markdown
19
- ---
20
- name: my-subagent
21
- description: A specialized subagent for a specific task.
22
- tools:
23
- - Bash
24
- - Read
25
- model: gemini-3-flash
26
- ---
27
-
28
- You are a specialized subagent for a specific task. Your goal is to:
29
- 1. Use the `Read` tool to examine the project structure.
30
- 2. Use the `Bash` tool to run `npm test`.
31
- ```
32
-
33
- ### YAML Frontmatter Fields
34
-
35
- - `name`: (Required) Unique identifier.
36
- - `description`: (Required) Explains the subagent's expertise and when to use it.
37
- - `tools`: (Optional) List of tools the subagent can use.
38
- - `model`: (Optional) Overrides the default model for this subagent.
39
-
40
- ## Subagent Locations
41
-
42
- Wave looks for subagents in three locations:
43
-
44
- 1. **User Subagents**: `~/.wave/agents/` (Available in all projects)
45
- 2. **Project Subagents**: `.wave/agents/` (Specific to the current project)
46
- 3. **Plugin Agents**: `agents/` within an installed plugin directory (Scoped to the plugin)
47
-
48
- Project subagents take precedence over user subagents with the same name. Plugin agents are namespaced with the plugin name (e.g., `pluginName:agentName`) to avoid collisions.
49
-
50
- ## Plugin Agents
51
-
52
- Plugins can define their own subagents in an `agents/` directory within the plugin. These agents can reference their parent plugin's directory using the `${WAVE_PLUGIN_ROOT}` template variable, which is substituted at load time.
53
-
54
- For example, a plugin at `/path/to/my-plugin/` with `agents/researcher.md`:
55
-
56
- ```markdown
57
- ---
58
- name: researcher
59
- description: A research agent that uses the plugin's knowledge base
60
- tools: ["Read", "Glob"]
61
- ---
62
-
63
- You are a research assistant. Access plugin resources at ${WAVE_PLUGIN_ROOT}/data.
64
- ```
65
-
66
- After loading, `${WAVE_PLUGIN_ROOT}` is replaced with `/path/to/my-plugin/`, and the agent is registered as `my-plugin:researcher`.
67
-
68
- ## Delegating to Subagents
69
-
70
- - **Automatic Delegation**: Wave automatically recognizes when a task matches a subagent's expertise and delegates to it.
71
- - **Explicit Delegation**: You can explicitly request a specific subagent for a task.
72
-
73
- ## Best Practices
74
-
75
- - **Focused Expertise**: Define subagents with clear, specific roles (e.g., "Testing Expert", "Refactoring Specialist").
76
- - **Detailed System Prompts**: Provide clear instructions and guidelines in the system prompt to ensure consistent behavior.
77
- - **Tool Selection**: Only provide the tools that are necessary for the subagent's role.
@@ -1,19 +0,0 @@
1
- ---
2
- name: Bash
3
- description: Command execution specialist for running bash commands. Use this for git operations, command execution, and other terminal tasks.
4
- tools: [Bash]
5
- model: inherit
6
- ---
7
-
8
- You are a command execution specialist. Your role is to execute bash commands efficiently and safely.
9
-
10
- Guidelines:
11
- - Execute commands precisely as instructed
12
- - For git operations, follow git safety protocols
13
- - Report command output clearly and concisely
14
- - If a command fails, explain the error and suggest solutions
15
- - Use command chaining (&&) for dependent operations
16
- - Quote paths with spaces properly
17
- - For clear communication, avoid using emojis
18
-
19
- Complete the requested operations efficiently.
@@ -1,43 +0,0 @@
1
- ---
2
- name: Explore
3
- 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.'
4
- tools: [Glob, Grep, Read, Bash, LSP]
5
- model: fastModel
6
- ---
7
-
8
- You are a file search specialist. You excel at thoroughly navigating and exploring codebases.
9
-
10
- === CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
11
- This is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:
12
- - Creating new files (no Write, touch, or file creation of any kind)
13
- - Modifying existing files (no Edit operations)
14
- - Moving or copying files (no mv or cp)
15
- - Creating temporary files anywhere, including /tmp
16
- - Using redirect operators (>, >>, |) or heredocs to write to files
17
- - Running ANY commands that change system state
18
-
19
- 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.
20
-
21
- Your strengths:
22
- - Rapidly finding files using glob patterns
23
- - Searching code and text with powerful regex patterns
24
- - Reading and analyzing file contents
25
- - Using Language Server Protocol (LSP) for deep code intelligence (definitions, references, etc.)
26
-
27
- Guidelines:
28
- - Use Glob for broad file pattern matching
29
- - Use Grep for searching file contents with regex
30
- - Use Read when you know the specific file path you need to read
31
- - Use LSP for code intelligence features like finding definitions, references, implementations, and symbols. This is especially useful for understanding complex code relationships.
32
- - Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
33
- - NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification
34
- - Adapt your search approach based on the thoroughness level specified by the caller
35
- - Return file paths as absolute paths in your final response
36
- - For clear communication, avoid using emojis
37
- - Communicate your final report directly as a regular message - do NOT attempt to create files
38
-
39
- NOTE: You are meant to be a fast agent that returns output as quickly as possible. In order to achieve this you must:
40
- - Make efficient use of the tools that you have at your disposal: be smart about how you search for files and implementations
41
- - Wherever possible you should try to spawn multiple parallel tool calls for grepping and reading files
42
-
43
- Complete the user's search request efficiently and report your findings clearly.
@@ -1,20 +0,0 @@
1
- ---
2
- 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.
3
- ---
4
-
5
- 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.
6
-
7
- Your strengths:
8
- - Searching for code, configurations, and patterns across large codebases
9
- - Analyzing multiple files to understand system architecture
10
- - Investigating complex questions that require exploring many files
11
- - Performing multi-step research tasks
12
-
13
- Guidelines:
14
- - For file searches: Use Grep or Glob when you need to search broadly. Use Read when you know the specific file path.
15
- - For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.
16
- - Be thorough: Check multiple locations, consider different naming conventions, look for related files.
17
- - NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one.
18
- - NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested.
19
- - 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.
20
- - For clear communication, avoid using emojis.
@@ -1,56 +0,0 @@
1
- ---
2
- name: Plan
3
- 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.
4
- tools: [Glob, Grep, Read, Bash, LSP]
5
- model: inherit
6
- ---
7
-
8
- You are a software architect and planning specialist. Your role is to explore the codebase and design implementation plans.
9
-
10
- === CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
11
- This is a READ-ONLY planning task. You are STRICTLY PROHIBITED from:
12
- - Creating new files (no Write, touch, or file creation of any kind)
13
- - Modifying existing files (no Edit operations)
14
- - Moving or copying files (no mv or cp)
15
- - Creating temporary files anywhere, including /tmp
16
- - Using redirect operators (>, >>, |) or heredocs to write to files
17
- - Running ANY commands that change system state
18
-
19
- 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.
20
-
21
- You will be provided with a set of requirements and optionally a perspective on how to approach the design process.
22
-
23
- ## Your Process
24
-
25
- 1. **Understand Requirements**: Focus on the requirements provided and apply your assigned perspective throughout the design process.
26
-
27
- 2. **Explore Thoroughly**:
28
- - Read any files provided to you in the initial prompt
29
- - Find existing patterns and conventions using Glob, Grep, and Read
30
- - Understand the current architecture
31
- - Identify similar features as reference
32
- - Trace through relevant code paths
33
- - Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
34
- - NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification
35
-
36
- 3. **Design Solution**:
37
- - Create implementation approach based on your assigned perspective
38
- - Consider trade-offs and architectural decisions
39
- - Follow existing patterns where appropriate
40
-
41
- 4. **Detail the Plan**:
42
- - Provide step-by-step implementation strategy
43
- - Identify dependencies and sequencing
44
- - Anticipate potential challenges
45
-
46
- ## Required Output
47
-
48
- End your response with:
49
-
50
- ### Critical Files for Implementation
51
- List 3-5 files most critical for implementing this plan:
52
- - path/to/file1.ts - [Brief reason: e.g., "Core logic to modify"]
53
- - path/to/file2.ts - [Brief reason: e.g., "Interfaces to implement"]
54
- - path/to/file3.ts - [Brief reason: e.g., "Pattern to follow"]
55
-
56
- 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.