wave-agent-sdk 0.11.0 → 0.11.2

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 (52) hide show
  1. package/builtin/skills/init/SKILL.md +26 -0
  2. package/builtin/skills/settings/ENV.md +64 -0
  3. package/{src/builtin-skills → builtin/skills}/settings/HOOKS.md +12 -0
  4. package/builtin/skills/settings/MCP.md +55 -0
  5. package/builtin/skills/settings/MEMORY_RULES.md +60 -0
  6. package/{src/builtin-skills → builtin/skills}/settings/SKILL.md +22 -15
  7. package/builtin/skills/settings/SKILLS.md +63 -0
  8. package/builtin/skills/settings/SUBAGENTS.md +60 -0
  9. package/builtin/subagents/bash.md +18 -0
  10. package/builtin/subagents/explore.md +42 -0
  11. package/builtin/subagents/general-purpose.md +20 -0
  12. package/builtin/subagents/plan.md +55 -0
  13. package/dist/managers/aiManager.d.ts.map +1 -1
  14. package/dist/managers/aiManager.js +7 -0
  15. package/dist/managers/slashCommandManager.d.ts.map +1 -1
  16. package/dist/managers/slashCommandManager.js +0 -16
  17. package/dist/prompts/index.d.ts +2 -6
  18. package/dist/prompts/index.d.ts.map +1 -1
  19. package/dist/prompts/index.js +3 -136
  20. package/dist/tools/bashTool.d.ts.map +1 -1
  21. package/dist/tools/bashTool.js +41 -2
  22. package/dist/tools/types.d.ts +2 -0
  23. package/dist/tools/types.d.ts.map +1 -1
  24. package/dist/utils/configPaths.d.ts +4 -0
  25. package/dist/utils/configPaths.d.ts.map +1 -1
  26. package/dist/utils/configPaths.js +11 -9
  27. package/dist/utils/fileSearch.d.ts.map +1 -1
  28. package/dist/utils/fileSearch.js +7 -1
  29. package/dist/utils/subagentParser.d.ts.map +1 -1
  30. package/dist/utils/subagentParser.js +14 -4
  31. package/package.json +3 -2
  32. package/src/managers/aiManager.ts +7 -0
  33. package/src/managers/slashCommandManager.ts +0 -19
  34. package/src/prompts/index.ts +3 -144
  35. package/src/tools/bashTool.ts +48 -2
  36. package/src/tools/types.ts +2 -0
  37. package/src/utils/configPaths.ts +12 -10
  38. package/src/utils/fileSearch.ts +7 -1
  39. package/src/utils/subagentParser.ts +16 -6
  40. package/dist/builtin-skills/builtin-skills/loop/parsing.ts +0 -159
  41. package/dist/builtin-skills/builtin-skills/settings/HOOKS.md +0 -82
  42. package/dist/builtin-skills/builtin-skills/settings/SKILL.md +0 -86
  43. package/dist/builtin-skills/loop/parsing.d.ts +0 -13
  44. package/dist/builtin-skills/loop/parsing.d.ts.map +0 -1
  45. package/dist/builtin-skills/loop/parsing.js +0 -125
  46. package/dist/utils/builtinSubagents.d.ts +0 -7
  47. package/dist/utils/builtinSubagents.d.ts.map +0 -1
  48. package/dist/utils/builtinSubagents.js +0 -94
  49. package/src/builtin-skills/loop/SKILL.md +0 -53
  50. package/src/builtin-skills/loop/parsing.ts +0 -159
  51. package/src/utils/builtinSubagents.ts +0 -122
  52. /package/{dist/builtin-skills/builtin-skills → builtin/skills}/loop/SKILL.md +0 -0
@@ -0,0 +1,26 @@
1
+ ---
2
+ disable-model-invocation: true
3
+ ---
4
+
5
+ Please analyze this codebase and create a AGENTS.md file, which will be given to future instances of Agent to operate in this repository.
6
+
7
+ What to add:
8
+ 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.
9
+ 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.
10
+
11
+ Usage notes:
12
+ - If there's already a AGENTS.md, suggest improvements to it.
13
+ - 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".
14
+ - Avoid listing every component or file structure that can be easily discovered.
15
+ - Don't include generic development practices.
16
+ - 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.
17
+ - Do NOT include rules from .wave/rules/ as they are automatically loaded by the system.
18
+ - If there is a README.md, make sure to include the important parts.
19
+ - 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.
20
+ - Be sure to prefix the file with the following text:
21
+
22
+ ```
23
+ # AGENTS.md
24
+
25
+ This file provides guidance to Agent when working with code in this repository.
26
+ ```
@@ -0,0 +1,64 @@
1
+ # Wave Environment Variables Configuration
2
+
3
+ Environment variables allow you to customize Wave's behavior, configure AI models, and provide context to hooks and tools. This document provides detailed guidance on how to configure environment variables in `settings.json`.
4
+
5
+ ## The `env` Field
6
+
7
+ Environment variables are configured in the `env` field of `settings.json`. It is a simple key-value pair of strings.
8
+
9
+ ```json
10
+ {
11
+ "env": {
12
+ "WAVE_MODEL": "gemini-3-flash",
13
+ "MY_CUSTOM_VAR": "some-value"
14
+ }
15
+ }
16
+ ```
17
+
18
+ ## Supported `WAVE_*` Environment Variables
19
+
20
+ Wave uses several environment variables to control its core functionality.
21
+
22
+ | Variable | Description | Default |
23
+ | :--- | :--- | :--- |
24
+ | `WAVE_API_KEY` | API key for the AI gateway. | - |
25
+ | `WAVE_BASE_URL` | Base URL for the AI gateway. | - |
26
+ | `WAVE_CUSTOM_HEADERS` | Custom HTTP headers for the AI gateway (JSON string). | - |
27
+ | `WAVE_MODEL` | The primary AI model to use for the agent. | `gemini-3-flash` |
28
+ | `WAVE_FAST_MODEL` | The fast AI model to use for quick tasks. | `gemini-2.5-flash` |
29
+ | `WAVE_MAX_INPUT_TOKENS` | Maximum number of input tokens allowed. | `96000` |
30
+ | `WAVE_MAX_OUTPUT_TOKENS` | Maximum number of output tokens allowed. | `8192` |
31
+ | `WAVE_DISABLE_AUTO_MEMORY` | Set to `1` or `true` to disable the auto-memory feature. | `false` |
32
+ | `WAVE_TASK_LIST_ID` | Explicitly set the task list ID for the session. | (Session ID) |
33
+
34
+ ## Configuration Scopes
35
+
36
+ Environment variables can be set in different scopes, with the following precedence (highest to lowest):
37
+
38
+ 1. **Local Scope**: `.wave/settings.local.json` (Local overrides, ignored by git)
39
+ 2. **Project Scope**: `.wave/settings.json` (Project-specific settings, shared via git)
40
+ 3. **User Scope**: `~/.wave/settings.json` (Global settings for all projects)
41
+ 4. **System Environment**: Variables set in your shell (e.g., `export WAVE_API_KEY=...`)
42
+
43
+ ## Custom Environment Variables
44
+
45
+ You can also define custom environment variables in the `env` field. These variables will be available to:
46
+
47
+ - **Hooks**: Any shell command executed as a hook will have these variables in its environment.
48
+ - **Tools**: Tools like `Bash` will have access to these variables.
49
+
50
+ Example:
51
+ ```json
52
+ {
53
+ "env": {
54
+ "PROJECT_NAME": "my-awesome-project",
55
+ "DEPLOY_TARGET": "staging"
56
+ }
57
+ }
58
+ ```
59
+
60
+ ## Best Practices
61
+
62
+ - **Use Local Overrides for Secrets**: Never commit sensitive information like `WAVE_API_KEY` to `settings.json`. Use `settings.local.json` instead.
63
+ - **Standard Naming**: Use uppercase and underscores for environment variable names (e.g., `MY_VARIABLE`).
64
+ - **Avoid Overriding System Variables**: Be careful not to override standard system variables like `PATH` or `HOME` unless you have a specific reason to do so.
@@ -74,6 +74,18 @@ Wave provides detailed context to hook processes via `stdin` as a JSON object. T
74
74
  - `subagent_type`: (If executed by a subagent) The type of the subagent.
75
75
  - `name`: (WorktreeCreate) The name of the new worktree.
76
76
 
77
+ ## Hook Exit Codes
78
+
79
+ Hooks can communicate status and control Wave's behavior using exit codes:
80
+
81
+ - **Exit 0**: Success. Wave continues its normal execution.
82
+ - **Exit 2**: Blocking Error. Wave blocks the current operation and provides feedback based on the event:
83
+ - `UserPromptSubmit`: Blocks prompt processing and shows `stderr` as a user error.
84
+ - `PreToolUse`: Blocks tool execution and provides `stderr` to the agent as feedback.
85
+ - `PostToolUse`: Appends `stderr` to the tool result as feedback for the agent.
86
+ - `Stop`: Blocks the stop operation and provides `stderr` to the agent.
87
+ - **Other Exits (e.g., Exit 1)**: Non-blocking error. Wave continues execution but shows `stderr` as a warning to the user.
88
+
77
89
  ## Best Practices
78
90
 
79
91
  - **Keep hooks fast**: Long-running hooks can slow down your workflow unless they are `async`.
@@ -0,0 +1,55 @@
1
+ # Model Context Protocol (MCP) Configuration
2
+
3
+ The Model Context Protocol (MCP) allows Wave to connect to external servers that provide additional tools and context. This document explains how to configure and use MCP servers in Wave.
4
+
5
+ ## Configuration File: `.mcp.json`
6
+
7
+ MCP servers are configured in a `.mcp.json` file. Wave looks for this file in your project root:
8
+
9
+ 1. **Project Scope**: `.mcp.json` in your project root (Project-specific MCP servers)
10
+
11
+ ## Configuration Structure
12
+
13
+ The `.mcp.json` file contains a list of MCP server configurations.
14
+
15
+ ```json
16
+ {
17
+ "mcpServers": {
18
+ "sqlite": {
19
+ "command": "uvx",
20
+ "args": ["mcp-server-sqlite", "--db-path", "/path/to/your/database.db"]
21
+ },
22
+ "github": {
23
+ "command": "npx",
24
+ "args": ["-y", "@modelcontextprotocol/server-github"],
25
+ "env": {
26
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
27
+ }
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ ### Fields for each server:
34
+
35
+ - `command`: The executable to run (e.g., `npx`, `uvx`, `python`, `node`).
36
+ - `args`: An array of command-line arguments for the executable.
37
+ - `env`: (Optional) A record of environment variables for the server process.
38
+
39
+ ## Using MCP Tools
40
+
41
+ Once configured, Wave will automatically connect to the MCP servers when it starts. Tools provided by these servers will be available to the agent with a prefix:
42
+
43
+ `mcp__[serverName]__[toolName]`
44
+
45
+ For example, if you have a server named `sqlite` with a tool named `query`, it will be available as `mcp__sqlite__query`.
46
+
47
+ ## Permissions for MCP Tools
48
+
49
+ By default, MCP tools require user permission before execution. When you grant permission, you can choose to "Allow always" for a specific tool. These persistent rules are stored in your `settings.json` under the `permissions` field.
50
+
51
+ ## Troubleshooting
52
+
53
+ - **Server Connection**: If a server fails to connect, Wave will log an error. You can check the status of MCP servers by asking the agent.
54
+ - **Tool Availability**: If a tool is not appearing, ensure the server is running and the `.mcp.json` configuration is correct.
55
+ - **Logs**: MCP server `stderr` is often used for logging and can be helpful for debugging connection issues.
@@ -0,0 +1,60 @@
1
+ # Wave Memory Rules Configuration
2
+
3
+ Memory rules allow you to provide context-specific instructions and guidelines to the agent. This document explains how to create and manage memory rules in Wave.
4
+
5
+ ## What are Memory Rules?
6
+
7
+ Memory rules are Markdown files that contain instructions for the agent. They are used to:
8
+ - Enforce coding styles and conventions.
9
+ - Provide project-specific context (e.g., "always use pnpm").
10
+ - Define architectural patterns and best practices.
11
+ - Share common knowledge across the team.
12
+
13
+ ## Creating Memory Rules
14
+
15
+ Wave looks for memory rules in the following locations:
16
+
17
+ 1. **User Scope**: `~/.wave/rules/*.md` (Global memory rules)
18
+ 2. **Project Scope**: `.wave/rules/*.md` (Project-specific memory rules)
19
+ 3. **Project Root**: `AGENTS.md` (Legacy project-level memory rules)
20
+
21
+ ### File Structure
22
+
23
+ A memory rule file is a standard Markdown file. It can optionally include YAML frontmatter to scope the rules to specific file paths.
24
+
25
+ ```markdown
26
+ ---
27
+ paths:
28
+ - "src/api/**/*.ts"
29
+ - "src/services/**/*.ts"
30
+ ---
31
+
32
+ # API and Service Guidelines
33
+
34
+ - Always use `async/await` for asynchronous operations.
35
+ - Use `Zod` for input validation.
36
+ - Follow the repository pattern for data access.
37
+ ```
38
+
39
+ ### YAML Frontmatter Fields
40
+
41
+ - `paths`: (Optional) A list of glob patterns. The rules in this file will only be active when the agent is working with files that match these patterns. If omitted, the rules are always active.
42
+
43
+ ## How Memory Rules are Loaded
44
+
45
+ Wave automatically discovers and loads all `.md` files in the `.wave/rules/` directory and its immediate subdirectories.
46
+
47
+ - **Path-Specific Activation**: If a memory rule has a `paths` field, it is only included in the agent's context if *any* file currently being read or modified matches the glob patterns.
48
+ - **Union of Rules**: If multiple files are in context, Wave activates the union of all matching memory rules.
49
+ - **Priority**: Project-level memory rules take priority over user-level memory rules if there is a conflict.
50
+
51
+ ## Best Practices
52
+
53
+ - **Keep rules focused**: Create separate files for different topics (e.g., `testing.md`, `ui-components.md`).
54
+ - **Use clear instructions**: Write rules in a way that is easy for the agent to understand and follow.
55
+ - **Leverage path scoping**: Use the `paths` field to keep the agent's context window clean and relevant.
56
+ - **Share rules with your team**: Commit `.wave/rules/` to your git repository to ensure everyone on the team has the same context.
57
+
58
+ ## Auto-Memory
59
+
60
+ In addition to manual memory rules, Wave also has an **auto-memory** feature that automatically remembers important information across sessions. This is stored in `~/.wave/projects/<project-id>/memory/MEMORY.md`. You can disable this feature in `settings.json` by setting `"autoMemoryEnabled": false`.
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: settings
3
- description: Manage Wave settings and get guidance on settings.json
4
- allowed-tools: Bash, Read, Write
3
+ description: Manage Wave settings and get guidance on settings.json, hooks, environment variables, permissions, MCP servers, memory rules, skills, and subagents. Use this when the user wants to view, update, or learn how to configure Wave.
5
4
  ---
6
5
 
7
6
  # Wave Settings Skill
@@ -25,6 +24,7 @@ For detailed hook configuration, see [HOOKS.md](${WAVE_SKILL_DIR}/HOOKS.md).
25
24
 
26
25
  ### 2. Environment Variables
27
26
  Set environment variables that will be available to all tools and hooks.
27
+ For detailed environment variable configuration and available `WAVE_*` variables, see [ENV.md](${WAVE_SKILL_DIR}/ENV.md).
28
28
  ```json
29
29
  {
30
30
  "env": {
@@ -47,18 +47,7 @@ Manage tool permissions and define the "Safe Zone".
47
47
  }
48
48
  ```
49
49
 
50
- ### 4. Enabled Plugins
51
- Enable or disable specific plugins.
52
- ```json
53
- {
54
- "enabledPlugins": {
55
- "git-plugin": true,
56
- "experimental-plugin": false
57
- }
58
- }
59
- ```
60
-
61
- ### 5. Model and Token Configuration
50
+ ### 4. Model and Token Configuration
62
51
  Define which AI models Wave should use and set token limits via environment variables.
63
52
  ```json
64
53
  {
@@ -71,7 +60,23 @@ Define which AI models Wave should use and set token limits via environment vari
71
60
  }
72
61
  ```
73
62
 
74
- ### 6. Other Settings
63
+ ### 5. Model Context Protocol (MCP)
64
+ Connect to external servers to provide additional tools and context.
65
+ For detailed MCP configuration, see [MCP.md](${WAVE_SKILL_DIR}/MCP.md).
66
+
67
+ ### 6. Memory Rules
68
+ Provide context-specific instructions and guidelines to the agent.
69
+ For detailed memory rules configuration, see [MEMORY_RULES.md](${WAVE_SKILL_DIR}/MEMORY_RULES.md).
70
+
71
+ ### 7. Skills
72
+ Extend Wave's functionality by creating custom skills.
73
+ For detailed guidance on creating skills, see [SKILLS.md](${WAVE_SKILL_DIR}/SKILLS.md).
74
+
75
+ ### 8. Subagents
76
+ Delegate tasks to specialized AI personalities.
77
+ For detailed guidance on creating subagents, see [SUBAGENTS.md](${WAVE_SKILL_DIR}/SUBAGENTS.md).
78
+
79
+ ### 9. Other Settings
75
80
  - `language`: Preferred language for agent communication (e.g., `"en"`, `"zh"`).
76
81
  - `autoMemoryEnabled`: Enable or disable auto-memory (default: `true`).
77
82
 
@@ -82,5 +87,7 @@ You can ask me to:
82
87
  - "Update my project settings to enable auto-memory"
83
88
  - "How do I configure a post-commit hook?"
84
89
  - "What are the available permission modes?"
90
+ - "How do I create a custom skill?"
91
+ - "How do I define a new subagent?"
85
92
 
86
93
  I will guide you through the process and ensure your configuration is valid.
@@ -0,0 +1,63 @@
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.
20
+
21
+ ```markdown
22
+ ---
23
+ name: my-skill
24
+ description: A brief description of what the skill does.
25
+ allowed-tools:
26
+ - Bash
27
+ - Read
28
+ ---
29
+
30
+ # My Skill Instructions
31
+
32
+ When this skill is invoked, follow these steps:
33
+ 1. Use the `Read` tool to examine the project structure.
34
+ 2. Use the `Bash` tool to run `npm test`.
35
+ ```
36
+
37
+ ### YAML Frontmatter Fields
38
+
39
+ - `name`: (Required) Unique identifier (lowercase, numbers, hyphens).
40
+ - `description`: (Required) Explains when the AI should use this skill.
41
+ - `allowed-tools`: (Optional) List of tools the skill can use.
42
+ - `context: fork`: (Optional) Run the skill in a separate subagent.
43
+ - `agent`: (Optional) Specify the subagent type (e.g., `general-purpose`).
44
+
45
+ ## Skill Locations
46
+
47
+ Wave looks for skills in two locations:
48
+
49
+ 1. **User Skills**: `~/.wave/skills/` (Available in all projects)
50
+ 2. **Project Skills**: `.wave/skills/` (Specific to the current project)
51
+
52
+ Project skills take precedence over user skills with the same name.
53
+
54
+ ## Invoking Skills
55
+
56
+ - **AI-Invoked**: The agent automatically discovers and uses skills based on their `description`.
57
+ - **User-Invoked**: Use slash commands in the CLI (e.g., `/my-skill`).
58
+
59
+ ## Best Practices
60
+
61
+ - **Clear Descriptions**: Write descriptions that help the AI understand exactly when the skill is relevant.
62
+ - **Modular Design**: Keep skills focused on a single task or capability.
63
+ - **Use `${WAVE_SKILL_DIR}`**: Use this placeholder to reference files within the skill directory.
@@ -0,0 +1,60 @@
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.
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
+ # My Subagent System Prompt
29
+
30
+ You are a specialized subagent for a specific task. Your goal is to:
31
+ 1. Use the `Read` tool to examine the project structure.
32
+ 2. Use the `Bash` tool to run `npm test`.
33
+ ```
34
+
35
+ ### YAML Frontmatter Fields
36
+
37
+ - `name`: (Required) Unique identifier.
38
+ - `description`: (Required) Explains the subagent's expertise and when to use it.
39
+ - `tools`: (Optional) List of tools the subagent can use.
40
+ - `model`: (Optional) Overrides the default model for this subagent.
41
+
42
+ ## Subagent Locations
43
+
44
+ Wave looks for subagents in two locations:
45
+
46
+ 1. **User Subagents**: `~/.wave/agents/` (Available in all projects)
47
+ 2. **Project Subagents**: `.wave/agents/` (Specific to the current project)
48
+
49
+ Project subagents take precedence over user subagents with the same name.
50
+
51
+ ## Delegating to Subagents
52
+
53
+ - **Automatic Delegation**: Wave automatically recognizes when a task matches a subagent's expertise and delegates to it.
54
+ - **Explicit Delegation**: You can explicitly request a specific subagent for a task.
55
+
56
+ ## Best Practices
57
+
58
+ - **Focused Expertise**: Define subagents with clear, specific roles (e.g., "Testing Expert", "Refactoring Specialist").
59
+ - **Detailed System Prompts**: Provide clear instructions and guidelines in the system prompt to ensure consistent behavior.
60
+ - **Tool Selection**: Only provide the tools that are necessary for the subagent's role.
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Command execution specialist for running bash commands. Use this for git operations, command execution, and other terminal tasks.
3
+ tools: [Bash]
4
+ model: inherit
5
+ ---
6
+
7
+ You are a command execution specialist. Your role is to execute bash commands efficiently and safely.
8
+
9
+ Guidelines:
10
+ - Execute commands precisely as instructed
11
+ - For git operations, follow git safety protocols
12
+ - Report command output clearly and concisely
13
+ - If a command fails, explain the error and suggest solutions
14
+ - Use command chaining (&&) for dependent operations
15
+ - Quote paths with spaces properly
16
+ - For clear communication, avoid using emojis
17
+
18
+ Complete the requested operations efficiently.
@@ -0,0 +1,42 @@
1
+ ---
2
+ 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.'
3
+ tools: [Glob, Grep, Read, Bash, LSP]
4
+ model: fastModel
5
+ ---
6
+
7
+ You are a file search specialist. You excel at thoroughly navigating and exploring codebases.
8
+
9
+ === CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
10
+ This is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:
11
+ - Creating new files (no Write, touch, or file creation of any kind)
12
+ - Modifying existing files (no Edit operations)
13
+ - Moving or copying files (no mv or cp)
14
+ - Creating temporary files anywhere, including /tmp
15
+ - Using redirect operators (>, >>, |) or heredocs to write to files
16
+ - Running ANY commands that change system state
17
+
18
+ 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.
19
+
20
+ Your strengths:
21
+ - Rapidly finding files using glob patterns
22
+ - Searching code and text with powerful regex patterns
23
+ - Reading and analyzing file contents
24
+ - Using Language Server Protocol (LSP) for deep code intelligence (definitions, references, etc.)
25
+
26
+ Guidelines:
27
+ - Use Glob for broad file pattern matching
28
+ - Use Grep for searching file contents with regex
29
+ - Use Read when you know the specific file path you need to read
30
+ - Use LSP for code intelligence features like finding definitions, references, implementations, and symbols. This is especially useful for understanding complex code relationships.
31
+ - Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
32
+ - NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification
33
+ - Adapt your search approach based on the thoroughness level specified by the caller
34
+ - Return file paths as absolute paths in your final response
35
+ - For clear communication, avoid using emojis
36
+ - Communicate your final report directly as a regular message - do NOT attempt to create files
37
+
38
+ NOTE: You are meant to be a fast agent that returns output as quickly as possible. In order to achieve this you must:
39
+ - Make efficient use of the tools that you have at your disposal: be smart about how you search for files and implementations
40
+ - Wherever possible you should try to spawn multiple parallel tool calls for grepping and reading files
41
+
42
+ Complete the user's search request efficiently and report your findings clearly.
@@ -0,0 +1,20 @@
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.
@@ -0,0 +1,55 @@
1
+ ---
2
+ 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.
3
+ tools: [Glob, Grep, Read, Bash, LSP]
4
+ model: inherit
5
+ ---
6
+
7
+ You are a software architect and planning specialist. Your role is to explore the codebase and design implementation plans.
8
+
9
+ === CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
10
+ This is a READ-ONLY planning task. You are STRICTLY PROHIBITED from:
11
+ - Creating new files (no Write, touch, or file creation of any kind)
12
+ - Modifying existing files (no Edit operations)
13
+ - Moving or copying files (no mv or cp)
14
+ - Creating temporary files anywhere, including /tmp
15
+ - Using redirect operators (>, >>, |) or heredocs to write to files
16
+ - Running ANY commands that change system state
17
+
18
+ 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.
19
+
20
+ You will be provided with a set of requirements and optionally a perspective on how to approach the design process.
21
+
22
+ ## Your Process
23
+
24
+ 1. **Understand Requirements**: Focus on the requirements provided and apply your assigned perspective throughout the design process.
25
+
26
+ 2. **Explore Thoroughly**:
27
+ - Read any files provided to you in the initial prompt
28
+ - Find existing patterns and conventions using Glob, Grep, and Read
29
+ - Understand the current architecture
30
+ - Identify similar features as reference
31
+ - Trace through relevant code paths
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
+
35
+ 3. **Design Solution**:
36
+ - Create implementation approach based on your assigned perspective
37
+ - Consider trade-offs and architectural decisions
38
+ - Follow existing patterns where appropriate
39
+
40
+ 4. **Detail the Plan**:
41
+ - Provide step-by-step implementation strategy
42
+ - Identify dependencies and sequencing
43
+ - Anticipate potential challenges
44
+
45
+ ## Required Output
46
+
47
+ End your response with:
48
+
49
+ ### Critical Files for Implementation
50
+ List 3-5 files most critical for implementing this plan:
51
+ - path/to/file1.ts - [Brief reason: e.g., "Core logic to modify"]
52
+ - path/to/file2.ts - [Brief reason: e.g., "Interfaces to implement"]
53
+ - path/to/file3.ts - [Brief reason: e.g., "Pattern to follow"]
54
+
55
+ 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.
@@ -1 +1 @@
1
- {"version":3,"file":"aiManager.d.ts","sourceRoot":"","sources":["../../src/managers/aiManager.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,KAAK,EAGN,MAAM,mBAAmB,CAAC;AAY3B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAKlD,MAAM,WAAW,kBAAkB;IACjC,wBAAwB,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,YAAY,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B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,oEAAoE;QACpE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;KACf,GACL,OAAO,CAAC,IAAI,CAAC;IAklBhB;;;;OAIG;YACW,gBAAgB;IAiE9B;;;OAGG;YACW,sBAAsB;IA6DpC;;OAEG;YACW,uBAAuB;CAwDtC"}
@@ -492,6 +492,13 @@ export class AIManager {
492
492
  stage: "running", // Keep it in running stage while updating shortResult
493
493
  });
494
494
  },
495
+ onResultUpdate: (result) => {
496
+ this.messageManager.updateToolBlock({
497
+ id: toolId,
498
+ result,
499
+ stage: "running", // Keep it in running stage while updating result
500
+ });
501
+ },
495
502
  };
496
503
  // Execute tool
497
504
  const toolResult = await this.toolManager.execute(functionToolCall.function?.name || "", toolArgs, context);
@@ -1 +1 @@
1
- {"version":3,"file":"slashCommandManager.d.ts","sourceRoot":"","sources":["../../src/managers/slashCommandManager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAQ1E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAQlD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,mBAAmB;IAO5B,OAAO,CAAC,SAAS;IANnB,OAAO,CAAC,QAAQ,CAAmC;IACnD,OAAO,CAAC,cAAc,CAAyC;IAC/D,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,OAAO,CAAS;gBAGd,SAAS,EAAE,SAAS,EAC5B,OAAO,EAAE,0BAA0B;IAK9B,UAAU,IAAI,IAAI;IAazB,OAAO,KAAK,cAAc,GAEzB;IAED,OAAO,KAAK,SAAS,GAEpB;IAED,OAAO,KAAK,qBAAqB,GAEhC;IAED,OAAO,KAAK,W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GAAG;QAClD,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAeD;;OAEG;IACI,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAI7C;;OAEG;IACI,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAI1E;;OAEG;IACI,iBAAiB,IAAI,kBAAkB,EAAE;IAIhD;;OAEG;YACW,+BAA+B;IAsD7C;;OAEG;IACI,mBAAmB,IAAI,IAAI;CAInC"}
@@ -1,7 +1,6 @@
1
1
  import { loadCustomSlashCommands } from "../utils/customCommands.js";
2
2
  import { substituteCommandParameters, parseSlashCommandInput, hasParameterPlaceholders, } from "../utils/commandArgumentParser.js";
3
3
  import { parseBashCommands, replaceBashCommandsWithOutput, executeBashCommands, } from "../utils/markdownParser.js";
4
- import { INIT_PROMPT } from "../prompts/index.js";
5
4
  import { logger } from "../utils/globalLogger.js";
6
5
  export class SlashCommandManager {
7
6
  constructor(container, options) {
@@ -38,21 +37,6 @@ export class SlashCommandManager {
38
37
  return this.container.get("SkillManager");
39
38
  }
40
39
  initializeBuiltinCommands() {
41
- // Register built-in init command
42
- this.registerCommand({
43
- id: "init",
44
- name: "init",
45
- description: "Initialize repository for AI agents by generating AGENTS.md",
46
- handler: async () => {
47
- // Add custom command message to show the command being executed
48
- this.messageManager.addUserMessage({
49
- content: "/init",
50
- customCommandContent: INIT_PROMPT,
51
- });
52
- // Execute the AI conversation with the init prompt
53
- await this.aiManager.sendAIMessage();
54
- },
55
- });
56
40
  // Register built-in clear command
57
41
  this.registerCommand({
58
42
  id: "clear",