wave-agent-sdk 0.10.4 → 0.11.1
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/builtin/skills/init/SKILL.md +26 -0
- package/builtin/skills/loop/SKILL.md +53 -0
- package/builtin/skills/settings/ENV.md +64 -0
- package/builtin/skills/settings/HOOKS.md +94 -0
- package/builtin/skills/settings/MCP.md +55 -0
- package/builtin/skills/settings/MEMORY_RULES.md +60 -0
- package/{dist/builtin-skills → builtin/skills}/settings/SKILL.md +23 -16
- package/builtin/skills/settings/SKILLS.md +63 -0
- package/builtin/skills/settings/SUBAGENTS.md +60 -0
- package/builtin/subagents/bash.md +18 -0
- package/builtin/subagents/explore.md +42 -0
- package/builtin/subagents/general-purpose.md +20 -0
- package/builtin/subagents/plan.md +55 -0
- package/dist/agent.d.ts +8 -6
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +12 -9
- package/dist/constants/tools.d.ts +3 -0
- package/dist/constants/tools.d.ts.map +1 -1
- package/dist/constants/tools.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/managers/aiManager.d.ts +0 -2
- package/dist/managers/aiManager.d.ts.map +1 -1
- package/dist/managers/aiManager.js +53 -14
- package/dist/managers/cronManager.d.ts +19 -0
- package/dist/managers/cronManager.d.ts.map +1 -0
- package/dist/managers/cronManager.js +124 -0
- package/dist/managers/hookManager.d.ts.map +1 -1
- package/dist/managers/hookManager.js +21 -13
- package/dist/managers/liveConfigManager.js +1 -1
- package/dist/managers/mcpManager.d.ts +1 -1
- package/dist/managers/mcpManager.d.ts.map +1 -1
- package/dist/managers/mcpManager.js +10 -2
- package/dist/managers/messageManager.d.ts +0 -1
- package/dist/managers/messageManager.d.ts.map +1 -1
- package/dist/managers/permissionManager.d.ts +27 -7
- package/dist/managers/permissionManager.d.ts.map +1 -1
- package/dist/managers/permissionManager.js +119 -14
- package/dist/managers/slashCommandManager.d.ts.map +1 -1
- package/dist/managers/slashCommandManager.js +7 -12
- package/dist/managers/subagentManager.d.ts +3 -0
- package/dist/managers/subagentManager.d.ts.map +1 -1
- package/dist/managers/subagentManager.js +10 -17
- package/dist/managers/toolManager.d.ts +1 -1
- package/dist/managers/toolManager.d.ts.map +1 -1
- package/dist/managers/toolManager.js +28 -4
- package/dist/prompts/index.d.ts +0 -5
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +1 -136
- package/dist/services/configurationService.d.ts.map +1 -1
- package/dist/services/configurationService.js +8 -7
- package/dist/services/hook.d.ts.map +1 -1
- package/dist/services/hook.js +3 -10
- package/dist/services/initializationService.js +2 -2
- package/dist/services/jsonlHandler.d.ts.map +1 -1
- package/dist/services/jsonlHandler.js +3 -0
- package/dist/services/reversionService.d.ts +2 -2
- package/dist/services/reversionService.d.ts.map +1 -1
- package/dist/services/reversionService.js +3 -3
- package/dist/services/session.d.ts.map +1 -1
- package/dist/services/session.js +18 -11
- package/dist/tools/agentTool.js +1 -1
- package/dist/tools/bashTool.d.ts.map +1 -1
- package/dist/tools/bashTool.js +5 -5
- package/dist/tools/cronCreateTool.d.ts +3 -0
- package/dist/tools/cronCreateTool.d.ts.map +1 -0
- package/dist/tools/cronCreateTool.js +59 -0
- package/dist/tools/cronDeleteTool.d.ts +3 -0
- package/dist/tools/cronDeleteTool.d.ts.map +1 -0
- package/dist/tools/cronDeleteTool.js +38 -0
- package/dist/tools/cronListTool.d.ts +3 -0
- package/dist/tools/cronListTool.d.ts.map +1 -0
- package/dist/tools/cronListTool.js +30 -0
- package/dist/tools/skillTool.d.ts +0 -3
- package/dist/tools/skillTool.d.ts.map +1 -1
- package/dist/tools/skillTool.js +4 -3
- package/dist/tools/taskOutputTool.d.ts.map +1 -1
- package/dist/tools/taskOutputTool.js +15 -8
- package/dist/tools/types.d.ts +2 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/types/agent.d.ts +10 -0
- package/dist/types/agent.d.ts.map +1 -1
- package/dist/types/configuration.d.ts +1 -1
- package/dist/types/configuration.d.ts.map +1 -1
- package/dist/types/cron.d.ts +10 -0
- package/dist/types/cron.d.ts.map +1 -0
- package/dist/types/cron.js +1 -0
- package/dist/types/hooks.d.ts +1 -5
- package/dist/types/hooks.d.ts.map +1 -1
- package/dist/types/hooks.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/messaging.d.ts +1 -1
- package/dist/types/messaging.d.ts.map +1 -1
- package/dist/utils/configPaths.d.ts +4 -0
- package/dist/utils/configPaths.d.ts.map +1 -1
- package/dist/utils/configPaths.js +11 -9
- package/dist/utils/containerSetup.d.ts.map +1 -1
- package/dist/utils/containerSetup.js +40 -13
- package/dist/utils/fileSearch.d.ts.map +1 -1
- package/dist/utils/fileSearch.js +7 -1
- package/dist/utils/mcpUtils.d.ts +2 -2
- package/dist/utils/mcpUtils.d.ts.map +1 -1
- package/dist/utils/mcpUtils.js +1 -5
- package/dist/utils/subagentParser.d.ts.map +1 -1
- package/dist/utils/subagentParser.js +14 -4
- package/package.json +4 -2
- package/src/agent.ts +17 -12
- package/src/constants/tools.ts +3 -0
- package/src/index.ts +1 -0
- package/src/managers/aiManager.ts +72 -24
- package/src/managers/cronManager.ts +167 -0
- package/src/managers/hookManager.ts +27 -13
- package/src/managers/liveConfigManager.ts +2 -2
- package/src/managers/mcpManager.ts +23 -2
- package/src/managers/messageManager.ts +0 -6
- package/src/managers/permissionManager.ts +154 -18
- package/src/managers/slashCommandManager.ts +7 -14
- package/src/managers/subagentManager.ts +15 -19
- package/src/managers/toolManager.ts +37 -4
- package/src/prompts/index.ts +0 -144
- package/src/services/configurationService.ts +8 -7
- package/src/services/hook.ts +5 -11
- package/src/services/initializationService.ts +3 -3
- package/src/services/jsonlHandler.ts +4 -0
- package/src/services/reversionService.ts +9 -4
- package/src/services/session.ts +19 -12
- package/src/tools/agentTool.ts +1 -1
- package/src/tools/bashTool.ts +6 -5
- package/src/tools/cronCreateTool.ts +73 -0
- package/src/tools/cronDeleteTool.ts +47 -0
- package/src/tools/cronListTool.ts +38 -0
- package/src/tools/skillTool.ts +6 -4
- package/src/tools/taskOutputTool.ts +14 -8
- package/src/tools/types.ts +2 -0
- package/src/types/agent.ts +10 -0
- package/src/types/configuration.ts +1 -1
- package/src/types/cron.ts +9 -0
- package/src/types/hooks.ts +5 -9
- package/src/types/index.ts +1 -0
- package/src/types/messaging.ts +1 -1
- package/src/utils/configPaths.ts +12 -10
- package/src/utils/containerSetup.ts +50 -16
- package/src/utils/fileSearch.ts +7 -1
- package/src/utils/mcpUtils.ts +2 -5
- package/src/utils/subagentParser.ts +16 -6
- package/dist/builtin-skills/settings/HOOKS.md +0 -95
- package/dist/utils/builtinSubagents.d.ts +0 -7
- package/dist/utils/builtinSubagents.d.ts.map +0 -1
- package/dist/utils/builtinSubagents.js +0 -94
- package/src/builtin-skills/settings/HOOKS.md +0 -95
- package/src/builtin-skills/settings/SKILL.md +0 -86
- package/src/utils/builtinSubagents.ts +0 -122
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: settings
|
|
3
|
-
description: Manage Wave settings and get guidance on settings.json
|
|
4
|
-
allowed-tools: Bash, Read, Write
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Wave Settings Skill
|
|
8
|
-
|
|
9
|
-
This skill helps you manage your Wave configuration and provides guidance on how to use `settings.json`.
|
|
10
|
-
|
|
11
|
-
## What is `settings.json`?
|
|
12
|
-
|
|
13
|
-
`settings.json` is the central configuration file for Wave. It allows you to customize hooks, environment variables, tool permissions, and more.
|
|
14
|
-
|
|
15
|
-
Wave looks for `settings.json` in three scopes:
|
|
16
|
-
1. **User Scope**: Global settings for all projects. Located at `~/.wave/settings.json`.
|
|
17
|
-
2. **Project Scope**: Settings specific to the current project. Located at `.wave/settings.json` in your project root.
|
|
18
|
-
3. **Local Scope**: Local overrides for the current project (not committed to git). Located at `.wave/settings.local.json`.
|
|
19
|
-
|
|
20
|
-
## Common Settings
|
|
21
|
-
|
|
22
|
-
### 1. Hooks
|
|
23
|
-
Hooks allow you to automate tasks when certain events occur (e.g., `WorktreeCreate`, `TaskStart`).
|
|
24
|
-
For detailed hook configuration, see [HOOKS.md](${WAVE_SKILL_DIR}/HOOKS.md).
|
|
25
|
-
|
|
26
|
-
### 2. Environment Variables
|
|
27
|
-
Set environment variables that will be available to all tools and hooks.
|
|
28
|
-
```json
|
|
29
|
-
{
|
|
30
|
-
"env": {
|
|
31
|
-
"NODE_ENV": "development",
|
|
32
|
-
"API_KEY": "your-api-key"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### 3. Permissions
|
|
38
|
-
Manage tool permissions and define the "Safe Zone".
|
|
39
|
-
```json
|
|
40
|
-
{
|
|
41
|
-
"permissions": {
|
|
42
|
-
"allow": ["Bash", "Read"],
|
|
43
|
-
"deny": ["Write"],
|
|
44
|
-
"defaultMode": "interactive",
|
|
45
|
-
"additionalDirectories": ["/tmp/wave-exports"]
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
```
|
|
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
|
|
62
|
-
Define which AI models Wave should use and set token limits via environment variables.
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"env": {
|
|
66
|
-
"WAVE_MODEL": "gemini-3-flash",
|
|
67
|
-
"WAVE_FAST_MODEL": "gemini-2.5-flash",
|
|
68
|
-
"WAVE_MAX_INPUT_TOKENS": "100000",
|
|
69
|
-
"WAVE_MAX_OUTPUT_TOKENS": "4096"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 6. Other Settings
|
|
75
|
-
- `language`: Preferred language for agent communication (e.g., `"en"`, `"zh"`).
|
|
76
|
-
- `autoMemoryEnabled`: Enable or disable auto-memory (default: `true`).
|
|
77
|
-
|
|
78
|
-
## How to use this skill
|
|
79
|
-
|
|
80
|
-
You can ask me to:
|
|
81
|
-
- "Show my current settings"
|
|
82
|
-
- "Update my project settings to enable auto-memory"
|
|
83
|
-
- "How do I configure a post-commit hook?"
|
|
84
|
-
- "What are the available permission modes?"
|
|
85
|
-
|
|
86
|
-
I will guide you through the process and ensure your configuration is valid.
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BASH_SUBAGENT_TYPE,
|
|
3
|
-
EXPLORE_SUBAGENT_TYPE,
|
|
4
|
-
PLAN_SUBAGENT_TYPE,
|
|
5
|
-
GENERAL_PURPOSE_SUBAGENT_TYPE,
|
|
6
|
-
} from "../constants/subagents.js";
|
|
7
|
-
import {
|
|
8
|
-
BASH_SUBAGENT_SYSTEM_PROMPT,
|
|
9
|
-
GENERAL_PURPOSE_SYSTEM_PROMPT,
|
|
10
|
-
PLAN_SUBAGENT_SYSTEM_PROMPT,
|
|
11
|
-
EXPLORE_SUBAGENT_SYSTEM_PROMPT,
|
|
12
|
-
} from "../prompts/index.js";
|
|
13
|
-
import {
|
|
14
|
-
BASH_TOOL_NAME,
|
|
15
|
-
GLOB_TOOL_NAME,
|
|
16
|
-
GREP_TOOL_NAME,
|
|
17
|
-
READ_TOOL_NAME,
|
|
18
|
-
LSP_TOOL_NAME,
|
|
19
|
-
} from "../constants/tools.js";
|
|
20
|
-
import type { SubagentConfiguration } from "./subagentParser.js";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Get all built-in subagent configurations
|
|
24
|
-
* Built-in subagents have priority 3 (lowest) and can be overridden by user/project configs
|
|
25
|
-
*/
|
|
26
|
-
export function getBuiltinSubagents(): SubagentConfiguration[] {
|
|
27
|
-
return [
|
|
28
|
-
createBashSubagent(),
|
|
29
|
-
createExploreSubagent(),
|
|
30
|
-
createGeneralPurposeSubagent(),
|
|
31
|
-
createPlanSubagent(),
|
|
32
|
-
// Add more built-in subagents here as needed
|
|
33
|
-
];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Create the Bash built-in subagent configuration
|
|
38
|
-
* Specialized for executing bash commands and git operations
|
|
39
|
-
*/
|
|
40
|
-
function createBashSubagent(): SubagentConfiguration {
|
|
41
|
-
return {
|
|
42
|
-
name: BASH_SUBAGENT_TYPE,
|
|
43
|
-
description:
|
|
44
|
-
"Command execution specialist for running bash commands. Use this for git operations, command execution, and other terminal tasks.",
|
|
45
|
-
systemPrompt: BASH_SUBAGENT_SYSTEM_PROMPT,
|
|
46
|
-
tools: [BASH_TOOL_NAME],
|
|
47
|
-
model: "inherit",
|
|
48
|
-
filePath: `<builtin:${BASH_SUBAGENT_TYPE}>`,
|
|
49
|
-
scope: "builtin",
|
|
50
|
-
priority: 3,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Create the General-Purpose built-in subagent configuration
|
|
56
|
-
* Specialized for multi-step research and implementation tasks
|
|
57
|
-
*/
|
|
58
|
-
function createGeneralPurposeSubagent(): SubagentConfiguration {
|
|
59
|
-
return {
|
|
60
|
-
name: GENERAL_PURPOSE_SUBAGENT_TYPE,
|
|
61
|
-
description:
|
|
62
|
-
"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.",
|
|
63
|
-
systemPrompt: GENERAL_PURPOSE_SYSTEM_PROMPT,
|
|
64
|
-
filePath: `<builtin:${GENERAL_PURPOSE_SUBAGENT_TYPE}>`,
|
|
65
|
-
scope: "builtin",
|
|
66
|
-
priority: 3,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Create the Explore built-in subagent configuration
|
|
72
|
-
* Specialized for codebase exploration and file search tasks
|
|
73
|
-
*/
|
|
74
|
-
function createExploreSubagent(): SubagentConfiguration {
|
|
75
|
-
// Define allowed tools for read-only operations
|
|
76
|
-
const allowedTools = [
|
|
77
|
-
GLOB_TOOL_NAME,
|
|
78
|
-
GREP_TOOL_NAME,
|
|
79
|
-
READ_TOOL_NAME,
|
|
80
|
-
BASH_TOOL_NAME,
|
|
81
|
-
LSP_TOOL_NAME,
|
|
82
|
-
];
|
|
83
|
-
|
|
84
|
-
return {
|
|
85
|
-
name: EXPLORE_SUBAGENT_TYPE,
|
|
86
|
-
description:
|
|
87
|
-
'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.',
|
|
88
|
-
systemPrompt: EXPLORE_SUBAGENT_SYSTEM_PROMPT,
|
|
89
|
-
tools: allowedTools,
|
|
90
|
-
model: "fastModel", // Special value that will use parent's fastModel
|
|
91
|
-
filePath: `<builtin:${EXPLORE_SUBAGENT_TYPE}>`,
|
|
92
|
-
scope: "builtin",
|
|
93
|
-
priority: 3, // Lowest priority - can be overridden by user configs
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Create the Plan built-in subagent configuration
|
|
99
|
-
* Specialized for designing implementation plans and exploring codebases in read-only mode
|
|
100
|
-
*/
|
|
101
|
-
function createPlanSubagent(): SubagentConfiguration {
|
|
102
|
-
// Define allowed tools for read-only operations
|
|
103
|
-
const allowedTools = [
|
|
104
|
-
GLOB_TOOL_NAME,
|
|
105
|
-
GREP_TOOL_NAME,
|
|
106
|
-
READ_TOOL_NAME,
|
|
107
|
-
BASH_TOOL_NAME,
|
|
108
|
-
LSP_TOOL_NAME,
|
|
109
|
-
];
|
|
110
|
-
|
|
111
|
-
return {
|
|
112
|
-
name: PLAN_SUBAGENT_TYPE,
|
|
113
|
-
description:
|
|
114
|
-
"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.",
|
|
115
|
-
systemPrompt: PLAN_SUBAGENT_SYSTEM_PROMPT,
|
|
116
|
-
tools: allowedTools,
|
|
117
|
-
model: "inherit", // Uses parent agent's model
|
|
118
|
-
filePath: `<builtin:${PLAN_SUBAGENT_TYPE}>`,
|
|
119
|
-
scope: "builtin",
|
|
120
|
-
priority: 3, // Lowest priority - can be overridden by user configs
|
|
121
|
-
};
|
|
122
|
-
}
|