wave-agent-sdk 0.11.7 → 0.12.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/README.md +0 -13
- package/builtin/skills/settings/ENV.md +4 -0
- package/builtin/skills/settings/HOOKS.md +4 -0
- package/builtin/skills/settings/MODELS.md +71 -0
- package/builtin/skills/settings/SKILL.md +18 -8
- package/dist/agent.d.ts +10 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +16 -1
- package/dist/managers/aiManager.d.ts.map +1 -1
- package/dist/managers/aiManager.js +1 -4
- package/dist/managers/liveConfigManager.d.ts +2 -0
- package/dist/managers/liveConfigManager.d.ts.map +1 -1
- package/dist/managers/liveConfigManager.js +3 -0
- package/dist/managers/messageManager.d.ts +5 -1
- package/dist/managers/messageManager.d.ts.map +1 -1
- package/dist/managers/messageManager.js +28 -1
- package/dist/managers/slashCommandManager.d.ts.map +1 -1
- package/dist/managers/slashCommandManager.js +38 -41
- package/dist/managers/toolManager.d.ts +1 -0
- package/dist/managers/toolManager.d.ts.map +1 -1
- package/dist/prompts/index.d.ts +11 -3
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +97 -11
- package/dist/services/aiService.d.ts.map +1 -1
- package/dist/services/aiService.js +30 -5
- package/dist/services/configurationService.d.ts +8 -0
- package/dist/services/configurationService.d.ts.map +1 -1
- package/dist/services/configurationService.js +89 -12
- package/dist/tools/bashTool.d.ts.map +1 -1
- package/dist/tools/bashTool.js +24 -3
- package/dist/tools/skillTool.d.ts.map +1 -1
- package/dist/tools/skillTool.js +4 -1
- package/dist/tools/types.d.ts +1 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/writeTool.d.ts.map +1 -1
- package/dist/tools/writeTool.js +6 -0
- package/dist/types/agent.d.ts +3 -0
- package/dist/types/agent.d.ts.map +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/configuration.d.ts +3 -0
- package/dist/types/configuration.d.ts.map +1 -1
- package/dist/types/core.d.ts +2 -0
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/core.js +2 -0
- package/dist/types/messaging.d.ts +11 -2
- package/dist/types/messaging.d.ts.map +1 -1
- package/dist/utils/configValidator.d.ts +4 -5
- package/dist/utils/configValidator.d.ts.map +1 -1
- package/dist/utils/configValidator.js +4 -4
- package/dist/utils/containerSetup.d.ts.map +1 -1
- package/dist/utils/containerSetup.js +7 -1
- package/dist/utils/convertMessagesForAPI.d.ts.map +1 -1
- package/dist/utils/convertMessagesForAPI.js +16 -1
- package/dist/utils/messageOperations.d.ts +28 -3
- package/dist/utils/messageOperations.d.ts.map +1 -1
- package/dist/utils/messageOperations.js +79 -7
- package/package.json +1 -1
- package/src/agent.ts +18 -4
- package/src/managers/aiManager.ts +1 -6
- package/src/managers/liveConfigManager.ts +5 -1
- package/src/managers/messageManager.ts +40 -0
- package/src/managers/slashCommandManager.ts +39 -46
- package/src/managers/toolManager.ts +1 -0
- package/src/prompts/index.ts +111 -9
- package/src/services/aiService.ts +58 -5
- package/src/services/configurationService.ts +110 -16
- package/src/tools/bashTool.ts +24 -3
- package/src/tools/skillTool.ts +12 -2
- package/src/tools/types.ts +1 -0
- package/src/tools/writeTool.ts +10 -0
- package/src/types/agent.ts +3 -0
- package/src/types/config.ts +1 -0
- package/src/types/configuration.ts +3 -0
- package/src/types/core.ts +4 -0
- package/src/types/messaging.ts +12 -1
- package/src/utils/configValidator.ts +6 -4
- package/src/utils/containerSetup.ts +7 -1
- package/src/utils/convertMessagesForAPI.ts +17 -1
- package/src/utils/messageOperations.ts +111 -8
package/dist/prompts/index.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { ToolPlugin } from "../tools/types.js";
|
|
2
2
|
import { PermissionMode } from "../types/permissions.js";
|
|
3
3
|
export declare const MAX_PARALLEL_TOOL_CALLS = 3;
|
|
4
|
-
export declare const BASE_SYSTEM_PROMPT = "You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user
|
|
5
|
-
export declare const
|
|
4
|
+
export declare const BASE_SYSTEM_PROMPT = "You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.";
|
|
5
|
+
export declare const DOING_TASKS_PROMPT = "# Doing tasks\n- The user will primarily request you to perform software engineering tasks. These may include solving bugs, adding new functionality, refactoring code, explaining code, and more. When given an unclear or generic instruction, consider it in the context of these software engineering tasks and the current working directory. For example, if the user asks you to change \"methodName\" to snake case, do not reply with just \"method_name\", instead find the method in the code and modify the code.\n- You are highly capable and often allow users to complete ambitious tasks that would otherwise be too complex or take too long. You should defer to user judgement about whether a task is too large to attempt.\n- If you notice the user's request is based on a misconception, or spot a bug adjacent to what they asked about, say so. You're a collaborator, not just an executor\u2014users benefit from your judgment, not just your compliance.\n- In general, do not propose changes to code you haven't read. If a user asks about or wants you to modify a file, read it first. Understand existing code before suggesting modifications.\n- Do not create files unless they're absolutely necessary for achieving your goal. Generally prefer editing an existing file to creating a new one, as this prevents file bloat and builds on existing work more effectively.\n- If an approach fails, diagnose why before switching tactics\u2014read the error, check your assumptions, try a focused fix. Don't retry the identical action blindly, but don't abandon a viable approach after a single failure either. Escalate to the user with AskUserQuestion only when you're genuinely stuck after investigation, not as a first response to friction.\n- Be careful not to introduce security vulnerabilities such as command injection, XSS, SQL injection, and other OWASP top 10 vulnerabilities. If you notice that you wrote insecure code, immediately fix it. Prioritize writing safe, secure, and correct code.\n- Avoid over-engineering. Only make changes that are directly requested or clearly necessary. Keep solutions simple and focused.\n - Don't add features, refactor code, or make \"improvements\" beyond what was asked. A bug fix doesn't need surrounding code cleaned up. A simple feature doesn't need extra configurability. Don't add docstrings, comments, or type annotations to code you didn't change. Only add comments where the logic isn't self-evident.\n - Don't add error handling, fallbacks, or validation for scenarios that can't happen. Trust internal code and framework guarantees. Only validate at system boundaries (user input, external APIs). Don't use feature flags or backwards-compatibility shims when you can just change the code.\n - Don't create helpers, utilities, or abstractions for one-time operations. Don't design for hypothetical future requirements. The right amount of complexity is what the task actually requires\u2014no speculative abstractions, but no half-finished implementations either. Three similar lines of code is better than a premature abstraction.\n- Avoid backwards-compatibility hacks like renaming unused _vars, re-exporting types, adding // removed comments for removed code, etc. If you are certain that something is unused, you can delete it completely.\n- Report outcomes faithfully: if tests fail, say so with the relevant output; if you did not run a verification step, say that rather than implying it succeeded. Never claim \"all tests pass\" when output shows failures, never suppress or simplify failing checks (tests, lints, type errors) to manufacture a green result, and never characterize incomplete or broken work as done. Equally, when a check did pass or a task is complete, state it plainly \u2014 do not hedge confirmed results with unnecessary disclaimers, downgrade finished work to \"partial,\" or re-verify things you already checked. The goal is an accurate report, not a defensive one.\n- Before reporting a task complete, verify it actually works: run the test, execute the script, check the output. Minimum complexity means no gold-plating, not skipping the finish line. If you can't verify (no test exists, can't run the code), say so explicitly rather than claiming success.";
|
|
6
|
+
export declare const EXECUTING_ACTIONS_PROMPT = "# Executing actions with care\n\nCarefully consider the reversibility and blast radius of actions. Generally you can freely take local, reversible actions like editing files or running tests. But for actions that are hard to reverse, affect shared systems beyond your local environment, or could otherwise be risky or destructive, check with the user before proceeding. The cost of pausing to confirm is low, while the cost of an unwanted action (lost work, unintended messages sent, deleted branches) can be very high. For actions like these, consider the context, the action, and user instructions, and by default transparently communicate the action and ask for confirmation before proceeding.\n\nExamples of the kind of risky actions that warrant user confirmation:\n- Destructive operations: deleting files/branches, dropping database tables, killing processes, rm -rf, overwriting uncommitted changes\n- Hard-to-reverse operations: force-pushing (can also overwrite upstream), git reset --hard, amending published commits, removing or downgrading packages/dependencies, modifying CI/CD pipelines\n- Actions visible to others or that affect shared state: pushing code, creating/closing/commenting on PRs or issues, sending messages (Slack, email, GitHub), posting to external services\n\nWhen you encounter an obstacle, do not use destructive actions as a shortcut to simply make it go away. For instance, try to identify root causes and fix underlying issues rather than bypassing safety checks (e.g. --no-verify). If you discover unexpected state like unfamiliar files, branches, or configuration, investigate before deleting or overwriting, as it may represent the user's in-progress work. For example, typically resolve merge conflicts rather than discarding changes. In short: only take risky actions carefully, and when in doubt, ask before acting. Follow both the spirit and letter of these instructions - measure twice, cut once.";
|
|
7
|
+
export declare const TOOL_POLICY = "# Using your tools\n\n- Do NOT use the Bash to run commands when a relevant dedicated tool is provided. Using dedicated tools allows the user to better understand and review your work. This is CRITICAL to assisting the user:\n - To read files use Read instead of cat, head, tail, or sed\n - To edit files use Edit instead of sed or awk\n - To create files use Write instead of cat with heredoc or echo redirection\n - To search for files use Glob instead of find or ls\n - To search the content of files, use Grep instead of grep or rg\n - Reserve using the Bash exclusively for system commands and terminal operations that require shell execution. If you are unsure and there is a relevant dedicated tool, default to using the dedicated tool and only fallback on using the Bash tool for these if it is absolutely necessary.\n- You can call multiple tools in a single response. If you intend to call multiple tools and there are no dependencies between them, make all independent tool calls in parallel. Maximize use of parallel tool calls where possible to increase efficiency.\n- **Limit**: You MUST NOT call more than 3 tools in parallel in a single response.\n- However, if some tool calls depend on previous calls to inform dependent values, do NOT call these tools in parallel and instead call them sequentially. For instance, if one operation must complete before another starts, run these operations sequentially instead. Never use placeholders or guess missing parameters in tool calls.\n- If the user specifies that they want you to run tools \"in parallel\", you MUST send a single message with multiple tool use content blocks.";
|
|
8
|
+
/**
|
|
9
|
+
* Reference: /home/liuyiqi/github/claude-code/src/constants/prompts.ts getOutputEfficiencySection
|
|
10
|
+
*/
|
|
11
|
+
export declare const OUTPUT_EFFICIENCY_PROMPT = "# Output efficiency\n\nIMPORTANT: Go straight to the point. Try the simplest approach first without going in circles. Do not overdo it. Be extra concise.\n\nKeep your text output brief and direct. Lead with the answer or action, not the reasoning. Skip filler words, preamble, and unnecessary transitions. Do not restate what the user said \u2014 just do it. When explaining, include only what is necessary for the user to understand.\n\nFocus text output on:\n- Decisions that need the user's input\n- High-level status updates at natural milestones\n- Errors or blockers that change the plan\n\nIf you can say it in one sentence, don't use three. Prefer short, direct sentences over long explanations. This does not apply to code or tool calls.";
|
|
12
|
+
export declare const TONE_AND_STYLE_PROMPT = "# Tone and style\n\n- Only use emojis if the user explicitly requests it. Avoid using emojis in all communication unless asked.\n- Your responses should be short and concise.\n- When referencing specific functions or pieces of code include the pattern file_path:line_number to allow the user to easily navigate to the source code location.\n- When referencing GitHub issues or pull requests, use the owner/repo#123 format (e.g. anthropics/claude-code#100) so they render as clickable links.\n- Do not use a colon before tool calls. Your tool calls may not be shown directly in the output, so text like \"Let me read the file:\" followed by a read tool call should just be \"Let me read the file.\" with a period.";
|
|
6
13
|
export declare function buildPlanModePrompt(planFilePath: string, planExists: boolean, isSubagent?: boolean): string;
|
|
7
|
-
export declare const DEFAULT_SYSTEM_PROMPT = "You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user
|
|
14
|
+
export declare const DEFAULT_SYSTEM_PROMPT = "You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.";
|
|
8
15
|
export declare const COMPRESS_MESSAGES_SYSTEM_PROMPT = "You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:\n1. Task Overview\nThe user's core request and success criteria\nAny clarifications or constraints they specified\n2. Current State\nWhat has been completed so far\nFiles created, modified, or analyzed (with paths if relevant)\nKey outputs or artifacts produced\n3. Important Discoveries\nTechnical constraints or requirements uncovered\nDecisions made and their rationale\nErrors encountered and how they were resolved\nWhat approaches were tried that didn't work (and why)\n4. Next Steps\nSpecific actions needed to complete the task\nAny blockers or open questions to resolve\nPriority order if multiple steps remain\n5. Context to Preserve\nUser preferences or style requirements\nDomain-specific details that aren't obvious\nAny promises made to the user\nBe concise but complete\u2014err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.\nWrap your summary in <summary></summary> tags.";
|
|
9
16
|
export declare const WEB_CONTENT_SYSTEM_PROMPT = "You are a helpful assistant that extracts information from web content. The content is provided in Markdown format.";
|
|
10
17
|
export declare const BTW_SYSTEM_PROMPT = "You are a helpful assistant. Answer the user's side question based on the conversation history. \nDo NOT say things like \"Let me try...\", \"I'll now...\", \"Let me check...\", or promise to take any action. \nIf you don't know the answer, say so - do not offer to look it up or investigate. \nSimply answer the question with the information you have.";
|
|
@@ -23,4 +30,5 @@ export declare function buildSystemPrompt(basePrompt: string | undefined, tools:
|
|
|
23
30
|
};
|
|
24
31
|
permissionMode?: PermissionMode;
|
|
25
32
|
}): string;
|
|
33
|
+
export declare function enhanceSystemPromptWithEnvDetails(existingSystemPrompt: string, workdir: string): string;
|
|
26
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAiBzD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,eAAO,MAAM,kBAAkB,oKAAoK,CAAC;AAEpM,eAAO,MAAM,kBAAkB,opIAcqQ,CAAC;AAErS,eAAO,MAAM,wBAAwB,25DASqmB,CAAC;AAE3oB,eAAO,MAAM,WAAW,knDAYqH,CAAC;AAE9I;;GAEG;AACH,eAAO,MAAM,wBAAwB,+uBAWiH,CAAC;AAEvJ,eAAO,MAAM,qBAAqB,6sBAMuL,CAAC;AAE1N,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,EACnB,UAAU,GAAE,OAAe,GAC1B,MAAM,CAmFR;AAED,eAAO,MAAM,qBAAqB,oKAAqB,CAAC;AAExD,eAAO,MAAM,+BAA+B,20CAsBG,CAAC;AAEhD,eAAO,MAAM,yBAAyB,wHAAwH,CAAC;AAC/J,eAAO,MAAM,iBAAiB,qWAG4B,CAAC;AAE3D,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,KAAK,EAAE,UAAU,EAAE,EACnB,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,UAAU,CAAC,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,cAAc,CAAC,EAAE,cAAc,CAAC;CAC5B,GACL,MAAM,CA8DR;AAED,wBAAgB,iCAAiC,CAC/C,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,MAAM,GACd,MAAM,CAgCR"}
|
package/dist/prompts/index.js
CHANGED
|
@@ -2,25 +2,69 @@ import * as os from "node:os";
|
|
|
2
2
|
import { isGitRepository } from "../utils/gitUtils.js";
|
|
3
3
|
import { buildAutoMemoryPrompt } from "./autoMemory.js";
|
|
4
4
|
import { EXPLORE_SUBAGENT_TYPE, PLAN_SUBAGENT_TYPE, } from "../constants/subagents.js";
|
|
5
|
-
import { ASK_USER_QUESTION_TOOL_NAME, EDIT_TOOL_NAME, WRITE_TOOL_NAME, EXIT_PLAN_MODE_TOOL_NAME, AGENT_TOOL_NAME, } from "../constants/tools.js";
|
|
5
|
+
import { ASK_USER_QUESTION_TOOL_NAME, EDIT_TOOL_NAME, WRITE_TOOL_NAME, EXIT_PLAN_MODE_TOOL_NAME, AGENT_TOOL_NAME, BASH_TOOL_NAME, READ_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME, } from "../constants/tools.js";
|
|
6
6
|
export const MAX_PARALLEL_TOOL_CALLS = 3;
|
|
7
|
-
export const BASE_SYSTEM_PROMPT = `You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
7
|
+
export const BASE_SYSTEM_PROMPT = `You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.`;
|
|
8
|
+
export const DOING_TASKS_PROMPT = `# Doing tasks
|
|
9
|
+
- The user will primarily request you to perform software engineering tasks. These may include solving bugs, adding new functionality, refactoring code, explaining code, and more. When given an unclear or generic instruction, consider it in the context of these software engineering tasks and the current working directory. For example, if the user asks you to change "methodName" to snake case, do not reply with just "method_name", instead find the method in the code and modify the code.
|
|
10
|
+
- You are highly capable and often allow users to complete ambitious tasks that would otherwise be too complex or take too long. You should defer to user judgement about whether a task is too large to attempt.
|
|
11
|
+
- If you notice the user's request is based on a misconception, or spot a bug adjacent to what they asked about, say so. You're a collaborator, not just an executor—users benefit from your judgment, not just your compliance.
|
|
12
|
+
- In general, do not propose changes to code you haven't read. If a user asks about or wants you to modify a file, read it first. Understand existing code before suggesting modifications.
|
|
13
|
+
- Do not create files unless they're absolutely necessary for achieving your goal. Generally prefer editing an existing file to creating a new one, as this prevents file bloat and builds on existing work more effectively.
|
|
14
|
+
- If an approach fails, diagnose why before switching tactics—read the error, check your assumptions, try a focused fix. Don't retry the identical action blindly, but don't abandon a viable approach after a single failure either. Escalate to the user with ${ASK_USER_QUESTION_TOOL_NAME} only when you're genuinely stuck after investigation, not as a first response to friction.
|
|
15
|
+
- Be careful not to introduce security vulnerabilities such as command injection, XSS, SQL injection, and other OWASP top 10 vulnerabilities. If you notice that you wrote insecure code, immediately fix it. Prioritize writing safe, secure, and correct code.
|
|
13
16
|
- Avoid over-engineering. Only make changes that are directly requested or clearly necessary. Keep solutions simple and focused.
|
|
14
17
|
- Don't add features, refactor code, or make "improvements" beyond what was asked. A bug fix doesn't need surrounding code cleaned up. A simple feature doesn't need extra configurability. Don't add docstrings, comments, or type annotations to code you didn't change. Only add comments where the logic isn't self-evident.
|
|
15
18
|
- Don't add error handling, fallbacks, or validation for scenarios that can't happen. Trust internal code and framework guarantees. Only validate at system boundaries (user input, external APIs). Don't use feature flags or backwards-compatibility shims when you can just change the code.
|
|
16
|
-
- Don't create helpers, utilities, or abstractions for one-time operations. Don't design for hypothetical future requirements. The right amount of complexity is the
|
|
17
|
-
- Avoid backwards-compatibility hacks like renaming unused
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
- Don't create helpers, utilities, or abstractions for one-time operations. Don't design for hypothetical future requirements. The right amount of complexity is what the task actually requires—no speculative abstractions, but no half-finished implementations either. Three similar lines of code is better than a premature abstraction.
|
|
20
|
+
- Avoid backwards-compatibility hacks like renaming unused _vars, re-exporting types, adding // removed comments for removed code, etc. If you are certain that something is unused, you can delete it completely.
|
|
21
|
+
- Report outcomes faithfully: if tests fail, say so with the relevant output; if you did not run a verification step, say that rather than implying it succeeded. Never claim "all tests pass" when output shows failures, never suppress or simplify failing checks (tests, lints, type errors) to manufacture a green result, and never characterize incomplete or broken work as done. Equally, when a check did pass or a task is complete, state it plainly — do not hedge confirmed results with unnecessary disclaimers, downgrade finished work to "partial," or re-verify things you already checked. The goal is an accurate report, not a defensive one.
|
|
22
|
+
- Before reporting a task complete, verify it actually works: run the test, execute the script, check the output. Minimum complexity means no gold-plating, not skipping the finish line. If you can't verify (no test exists, can't run the code), say so explicitly rather than claiming success.`;
|
|
23
|
+
export const EXECUTING_ACTIONS_PROMPT = `# Executing actions with care
|
|
24
|
+
|
|
25
|
+
Carefully consider the reversibility and blast radius of actions. Generally you can freely take local, reversible actions like editing files or running tests. But for actions that are hard to reverse, affect shared systems beyond your local environment, or could otherwise be risky or destructive, check with the user before proceeding. The cost of pausing to confirm is low, while the cost of an unwanted action (lost work, unintended messages sent, deleted branches) can be very high. For actions like these, consider the context, the action, and user instructions, and by default transparently communicate the action and ask for confirmation before proceeding.
|
|
26
|
+
|
|
27
|
+
Examples of the kind of risky actions that warrant user confirmation:
|
|
28
|
+
- Destructive operations: deleting files/branches, dropping database tables, killing processes, rm -rf, overwriting uncommitted changes
|
|
29
|
+
- Hard-to-reverse operations: force-pushing (can also overwrite upstream), git reset --hard, amending published commits, removing or downgrading packages/dependencies, modifying CI/CD pipelines
|
|
30
|
+
- Actions visible to others or that affect shared state: pushing code, creating/closing/commenting on PRs or issues, sending messages (Slack, email, GitHub), posting to external services
|
|
31
|
+
|
|
32
|
+
When you encounter an obstacle, do not use destructive actions as a shortcut to simply make it go away. For instance, try to identify root causes and fix underlying issues rather than bypassing safety checks (e.g. --no-verify). If you discover unexpected state like unfamiliar files, branches, or configuration, investigate before deleting or overwriting, as it may represent the user's in-progress work. For example, typically resolve merge conflicts rather than discarding changes. In short: only take risky actions carefully, and when in doubt, ask before acting. Follow both the spirit and letter of these instructions - measure twice, cut once.`;
|
|
33
|
+
export const TOOL_POLICY = `# Using your tools
|
|
34
|
+
|
|
35
|
+
- Do NOT use the ${BASH_TOOL_NAME} to run commands when a relevant dedicated tool is provided. Using dedicated tools allows the user to better understand and review your work. This is CRITICAL to assisting the user:
|
|
36
|
+
- To read files use ${READ_TOOL_NAME} instead of cat, head, tail, or sed
|
|
37
|
+
- To edit files use ${EDIT_TOOL_NAME} instead of sed or awk
|
|
38
|
+
- To create files use ${WRITE_TOOL_NAME} instead of cat with heredoc or echo redirection
|
|
39
|
+
- To search for files use ${GLOB_TOOL_NAME} instead of find or ls
|
|
40
|
+
- To search the content of files, use ${GREP_TOOL_NAME} instead of grep or rg
|
|
41
|
+
- Reserve using the ${BASH_TOOL_NAME} exclusively for system commands and terminal operations that require shell execution. If you are unsure and there is a relevant dedicated tool, default to using the dedicated tool and only fallback on using the ${BASH_TOOL_NAME} tool for these if it is absolutely necessary.
|
|
20
42
|
- You can call multiple tools in a single response. If you intend to call multiple tools and there are no dependencies between them, make all independent tool calls in parallel. Maximize use of parallel tool calls where possible to increase efficiency.
|
|
21
43
|
- **Limit**: You MUST NOT call more than ${MAX_PARALLEL_TOOL_CALLS} tools in parallel in a single response.
|
|
22
44
|
- However, if some tool calls depend on previous calls to inform dependent values, do NOT call these tools in parallel and instead call them sequentially. For instance, if one operation must complete before another starts, run these operations sequentially instead. Never use placeholders or guess missing parameters in tool calls.
|
|
23
45
|
- If the user specifies that they want you to run tools "in parallel", you MUST send a single message with multiple tool use content blocks.`;
|
|
46
|
+
/**
|
|
47
|
+
* Reference: /home/liuyiqi/github/claude-code/src/constants/prompts.ts getOutputEfficiencySection
|
|
48
|
+
*/
|
|
49
|
+
export const OUTPUT_EFFICIENCY_PROMPT = `# Output efficiency
|
|
50
|
+
|
|
51
|
+
IMPORTANT: Go straight to the point. Try the simplest approach first without going in circles. Do not overdo it. Be extra concise.
|
|
52
|
+
|
|
53
|
+
Keep your text output brief and direct. Lead with the answer or action, not the reasoning. Skip filler words, preamble, and unnecessary transitions. Do not restate what the user said — just do it. When explaining, include only what is necessary for the user to understand.
|
|
54
|
+
|
|
55
|
+
Focus text output on:
|
|
56
|
+
- Decisions that need the user's input
|
|
57
|
+
- High-level status updates at natural milestones
|
|
58
|
+
- Errors or blockers that change the plan
|
|
59
|
+
|
|
60
|
+
If you can say it in one sentence, don't use three. Prefer short, direct sentences over long explanations. This does not apply to code or tool calls.`;
|
|
61
|
+
export const TONE_AND_STYLE_PROMPT = `# Tone and style
|
|
62
|
+
|
|
63
|
+
- Only use emojis if the user explicitly requests it. Avoid using emojis in all communication unless asked.
|
|
64
|
+
- Your responses should be short and concise.
|
|
65
|
+
- When referencing specific functions or pieces of code include the pattern file_path:line_number to allow the user to easily navigate to the source code location.
|
|
66
|
+
- When referencing GitHub issues or pull requests, use the owner/repo#123 format (e.g. anthropics/claude-code#100) so they render as clickable links.
|
|
67
|
+
- Do not use a colon before tool calls. Your tool calls may not be shown directly in the output, so text like "Let me read the file:" followed by a read tool call should just be "Let me read the file." with a period.`;
|
|
24
68
|
export function buildPlanModePrompt(planFilePath, planExists, isSubagent = false) {
|
|
25
69
|
const planFileInfo = planExists
|
|
26
70
|
? `A plan file already exists at ${planFilePath}. You can read it and make incremental edits using the ${EDIT_TOOL_NAME} tool if you need to.`
|
|
@@ -134,9 +178,13 @@ If you don't know the answer, say so - do not offer to look it up or investigate
|
|
|
134
178
|
Simply answer the question with the information you have.`;
|
|
135
179
|
export function buildSystemPrompt(basePrompt, tools, options = {}) {
|
|
136
180
|
let prompt = basePrompt || DEFAULT_SYSTEM_PROMPT;
|
|
181
|
+
prompt += `\n\n${DOING_TASKS_PROMPT}`;
|
|
182
|
+
prompt += `\n\n${EXECUTING_ACTIONS_PROMPT}`;
|
|
137
183
|
if (tools.length > 0) {
|
|
138
184
|
prompt += `\n\n${TOOL_POLICY}`;
|
|
139
185
|
}
|
|
186
|
+
prompt += `\n\n${OUTPUT_EFFICIENCY_PROMPT}`;
|
|
187
|
+
prompt += `\n\n${TONE_AND_STYLE_PROMPT}`;
|
|
140
188
|
if (options.permissionMode === "dontAsk") {
|
|
141
189
|
prompt += `\n\n# Permission Mode\nThe user has selected the 'dontAsk' permission mode. In this mode, any restricted tool call that does not match a pre-approved rule in 'permissions.allow' or 'temporaryRules' will be automatically denied without prompting the user. You will receive a 'Permission denied' error for such calls. This is intended to prevent interruptions for untrusted tools while allowing pre-approved ones to run seamlessly.`;
|
|
142
190
|
}
|
|
@@ -151,6 +199,12 @@ export function buildSystemPrompt(basePrompt, tools, options = {}) {
|
|
|
151
199
|
const platform = os.platform();
|
|
152
200
|
const osVersion = `${os.type()} ${os.release()}`;
|
|
153
201
|
const today = new Date().toISOString().split("T")[0];
|
|
202
|
+
const shell = process.env.SHELL || "unknown";
|
|
203
|
+
const shellName = shell.includes("zsh")
|
|
204
|
+
? "zsh"
|
|
205
|
+
: shell.includes("bash")
|
|
206
|
+
? "bash"
|
|
207
|
+
: shell;
|
|
154
208
|
prompt += `
|
|
155
209
|
|
|
156
210
|
Here is useful information about the environment you are running in:
|
|
@@ -158,6 +212,7 @@ Here is useful information about the environment you are running in:
|
|
|
158
212
|
Working directory: ${options.workdir}
|
|
159
213
|
Is directory a git repo: ${isGitRepo}
|
|
160
214
|
Platform: ${platform}
|
|
215
|
+
Shell: ${shellName}
|
|
161
216
|
OS Version: ${osVersion}
|
|
162
217
|
Today's date: ${today}
|
|
163
218
|
</env>
|
|
@@ -174,3 +229,34 @@ Today's date: ${today}
|
|
|
174
229
|
}
|
|
175
230
|
return prompt;
|
|
176
231
|
}
|
|
232
|
+
export function enhanceSystemPromptWithEnvDetails(existingSystemPrompt, workdir) {
|
|
233
|
+
const isGitRepo = isGitRepository(workdir);
|
|
234
|
+
const platform = os.platform();
|
|
235
|
+
const osVersion = `${os.type()} ${os.release()}`;
|
|
236
|
+
const today = new Date().toISOString().split("T")[0];
|
|
237
|
+
const shell = process.env.SHELL || "unknown";
|
|
238
|
+
const shellName = shell.includes("zsh")
|
|
239
|
+
? "zsh"
|
|
240
|
+
: shell.includes("bash")
|
|
241
|
+
? "bash"
|
|
242
|
+
: shell;
|
|
243
|
+
const notes = `Notes:
|
|
244
|
+
- Agent threads always have their cwd reset between bash calls, as a result please only use absolute file paths.
|
|
245
|
+
- In your final response, share file paths (always absolute, never relative) that are relevant to the task. Include code snippets only when the exact text is load-bearing (e.g., a bug you found, a function signature the caller asked for) — do not recap code you merely read.
|
|
246
|
+
- For clear communication with the user the assistant MUST avoid using emojis.
|
|
247
|
+
- Do not use a colon before tool calls. Text like "Let me read the file:" followed by a read tool call should just be "Let me read the file." with a period.`;
|
|
248
|
+
return `${existingSystemPrompt}
|
|
249
|
+
|
|
250
|
+
${notes}
|
|
251
|
+
|
|
252
|
+
Here is useful information about the environment you are running in:
|
|
253
|
+
<env>
|
|
254
|
+
Working directory: ${workdir}
|
|
255
|
+
Is directory a git repo: ${isGitRepo}
|
|
256
|
+
Platform: ${platform}
|
|
257
|
+
Shell: ${shellName}
|
|
258
|
+
OS Version: ${osVersion}
|
|
259
|
+
Today's date: ${today}
|
|
260
|
+
</env>
|
|
261
|
+
`;
|
|
262
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiService.d.ts","sourceRoot":"","sources":["../../src/services/aiService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAGL,0BAA0B,EAC1B,0BAA0B,EAE3B,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AAgEvC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;
|
|
1
|
+
{"version":3,"file":"aiService.d.ts","sourceRoot":"","sources":["../../src/services/aiService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAGL,0BAA0B,EAC1B,0BAA0B,EAE3B,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AAgEvC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AA6DD,MAAM,WAAW,gBAAgB;IAE/B,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,WAAW,CAAC;IAGzB,QAAQ,EAAE,0BAA0B,EAAE,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACrC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,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,CAuFjE"}
|
|
@@ -54,10 +54,12 @@ function getModelConfig(modelName, baseConfig = {}) {
|
|
|
54
54
|
stream: false,
|
|
55
55
|
...baseConfig,
|
|
56
56
|
};
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
// Handle parameter exclusion: if a parameter is explicitly set to null, remove it.
|
|
58
|
+
// This allows users to "unset" default parameters like temperature for models that don't support them.
|
|
59
|
+
for (const key in config) {
|
|
60
|
+
if (config[key] === null) {
|
|
61
|
+
delete config[key];
|
|
62
|
+
}
|
|
61
63
|
}
|
|
62
64
|
return config;
|
|
63
65
|
}
|
|
@@ -102,9 +104,14 @@ export async function callAgent(options) {
|
|
|
102
104
|
}
|
|
103
105
|
}
|
|
104
106
|
// Get model configuration - use injected modelConfig with optional override
|
|
107
|
+
const { model: _model, fastModel: _fastModel, maxTokens: _maxTokens, permissionMode: _permissionMode, ...extraParams } = modelConfig;
|
|
108
|
+
void _model;
|
|
109
|
+
void _fastModel;
|
|
110
|
+
void _maxTokens;
|
|
111
|
+
void _permissionMode;
|
|
105
112
|
const openaiModelConfig = getModelConfig(model || modelConfig.model, {
|
|
106
|
-
temperature: 0,
|
|
107
113
|
max_tokens: resolvedMaxTokens,
|
|
114
|
+
...extraParams,
|
|
108
115
|
});
|
|
109
116
|
// Determine if streaming is needed
|
|
110
117
|
const isStreaming = !!(onContentUpdate ||
|
|
@@ -459,9 +466,15 @@ export async function compressMessages(options) {
|
|
|
459
466
|
fetch: gatewayConfig.fetch,
|
|
460
467
|
});
|
|
461
468
|
// Get model configuration - use injected agent model
|
|
469
|
+
const { model: _model, fastModel: _fastModel, maxTokens: _maxTokens, permissionMode: _permissionMode, ...extraParams } = modelConfig;
|
|
470
|
+
void _model;
|
|
471
|
+
void _fastModel;
|
|
472
|
+
void _maxTokens;
|
|
473
|
+
void _permissionMode;
|
|
462
474
|
const openaiModelConfig = getModelConfig(options.model || modelConfig.model, {
|
|
463
475
|
temperature: 0.1,
|
|
464
476
|
max_tokens: 8192,
|
|
477
|
+
...extraParams,
|
|
465
478
|
});
|
|
466
479
|
try {
|
|
467
480
|
const response = await openai.chat.completions.create({
|
|
@@ -521,9 +534,15 @@ export async function processWebContent(options) {
|
|
|
521
534
|
fetch: gatewayConfig.fetch,
|
|
522
535
|
});
|
|
523
536
|
// Get model configuration - use injected agent model
|
|
537
|
+
const { model: _model, fastModel: _fastModel, maxTokens: _maxTokens, permissionMode: _permissionMode, ...extraParams } = modelConfig;
|
|
538
|
+
void _model;
|
|
539
|
+
void _fastModel;
|
|
540
|
+
void _maxTokens;
|
|
541
|
+
void _permissionMode;
|
|
524
542
|
const openaiModelConfig = getModelConfig(options.model || modelConfig.model, {
|
|
525
543
|
temperature: 0.1,
|
|
526
544
|
max_tokens: 4096,
|
|
545
|
+
...extraParams,
|
|
527
546
|
});
|
|
528
547
|
try {
|
|
529
548
|
const response = await openai.chat.completions.create({
|
|
@@ -582,9 +601,15 @@ export async function btw(options) {
|
|
|
582
601
|
fetch: gatewayConfig.fetch,
|
|
583
602
|
});
|
|
584
603
|
// Get model configuration - use injected agent model
|
|
604
|
+
const { model: _model, fastModel: _fastModel, maxTokens: _maxTokens, permissionMode: _permissionMode, ...extraParams } = modelConfig;
|
|
605
|
+
void _model;
|
|
606
|
+
void _fastModel;
|
|
607
|
+
void _maxTokens;
|
|
608
|
+
void _permissionMode;
|
|
585
609
|
const openaiModelConfig = getModelConfig(options.model || modelConfig.model, {
|
|
586
610
|
temperature: 0.1,
|
|
587
611
|
max_tokens: 4096,
|
|
612
|
+
...extraParams,
|
|
588
613
|
});
|
|
589
614
|
try {
|
|
590
615
|
const response = await openai.chat.completions.create({
|
|
@@ -92,6 +92,14 @@ export declare class ConfigurationService {
|
|
|
92
92
|
* @returns Resolved max output tokens
|
|
93
93
|
*/
|
|
94
94
|
resolveMaxOutputTokens(constructorLimit?: number): number;
|
|
95
|
+
/**
|
|
96
|
+
* Set the active model in the session
|
|
97
|
+
*/
|
|
98
|
+
setModel(model: string): void;
|
|
99
|
+
/**
|
|
100
|
+
* Get all configured models from settings.json and environment
|
|
101
|
+
*/
|
|
102
|
+
getConfiguredModels(): string[];
|
|
95
103
|
/**
|
|
96
104
|
* Resolve all configuration file paths
|
|
97
105
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurationService.d.ts","sourceRoot":"","sources":["../../src/services/configurationService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,EACN,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,GAAG,CAA8B;IACzC,OAAO,CAAC,OAAO,CAAoB;IAEnC;;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;
|
|
1
|
+
{"version":3,"file":"configurationService.d.ts","sourceRoot":"","sources":["../../src/services/configurationService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,EACN,MAAM,2BA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M,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,CA6B1B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,GACd,iBAAiB,GAAG,IAAI,CAoJ1B"}
|
|
@@ -208,6 +208,21 @@ export class ConfigurationService {
|
|
|
208
208
|
result.isValid = false;
|
|
209
209
|
result.errors.push("autoMemoryEnabled configuration must be a boolean");
|
|
210
210
|
}
|
|
211
|
+
// Validate models if present
|
|
212
|
+
if (config.models !== undefined) {
|
|
213
|
+
if (typeof config.models !== "object" || config.models === null) {
|
|
214
|
+
result.isValid = false;
|
|
215
|
+
result.errors.push("models configuration must be an object");
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
for (const [modelName, modelConfig] of Object.entries(config.models)) {
|
|
219
|
+
if (typeof modelConfig !== "object" || modelConfig === null) {
|
|
220
|
+
result.isValid = false;
|
|
221
|
+
result.errors.push(`Configuration for model '${modelName}' must be an object`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
211
226
|
return result;
|
|
212
227
|
}
|
|
213
228
|
/**
|
|
@@ -341,25 +356,48 @@ export class ConfigurationService {
|
|
|
341
356
|
* @returns Resolved model configuration with defaults
|
|
342
357
|
*/
|
|
343
358
|
resolveModelConfig(model, fastModel, maxTokens, permissionMode) {
|
|
344
|
-
//
|
|
345
|
-
const
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
359
|
+
// Resolve agent model: override > options > env (settings.json) > process.env
|
|
360
|
+
const resolvedAgentModel = model ||
|
|
361
|
+
this.options.model ||
|
|
362
|
+
this.env.WAVE_MODEL ||
|
|
363
|
+
process.env.WAVE_MODEL;
|
|
364
|
+
// Resolve fast model: override > options > env (settings.json) > process.env
|
|
365
|
+
const resolvedFastModel = fastModel ||
|
|
366
|
+
this.options.fastModel ||
|
|
367
|
+
this.env.WAVE_FAST_MODEL ||
|
|
368
|
+
process.env.WAVE_FAST_MODEL;
|
|
369
|
+
// Validate required fields
|
|
370
|
+
if (!resolvedAgentModel) {
|
|
371
|
+
throw new ConfigurationError(CONFIG_ERRORS.MISSING_MODEL, "model", {
|
|
372
|
+
constructor: model,
|
|
373
|
+
environment: process.env.WAVE_MODEL,
|
|
374
|
+
settings: this.env.WAVE_MODEL,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
if (!resolvedFastModel) {
|
|
378
|
+
throw new ConfigurationError(CONFIG_ERRORS.MISSING_FAST_MODEL, "fastModel", {
|
|
379
|
+
constructor: fastModel,
|
|
380
|
+
environment: process.env.WAVE_FAST_MODEL,
|
|
381
|
+
settings: this.env.WAVE_FAST_MODEL,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
355
384
|
// Resolve max output tokens
|
|
356
385
|
const resolvedMaxTokens = this.resolveMaxOutputTokens(maxTokens);
|
|
357
|
-
|
|
386
|
+
const baseConfig = {
|
|
358
387
|
model: resolvedAgentModel,
|
|
359
388
|
fastModel: resolvedFastModel,
|
|
360
389
|
maxTokens: resolvedMaxTokens,
|
|
361
390
|
permissionMode: permissionMode ?? this.options.permissionMode,
|
|
362
391
|
};
|
|
392
|
+
// Merge model-specific settings from configuration
|
|
393
|
+
const modelSpecificConfig = this.currentConfiguration?.models?.[resolvedAgentModel];
|
|
394
|
+
if (modelSpecificConfig) {
|
|
395
|
+
return {
|
|
396
|
+
...baseConfig,
|
|
397
|
+
...modelSpecificConfig,
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
return baseConfig;
|
|
363
401
|
}
|
|
364
402
|
/**
|
|
365
403
|
* Resolves token limit with fallbacks
|
|
@@ -452,6 +490,30 @@ export class ConfigurationService {
|
|
|
452
490
|
// Use default
|
|
453
491
|
return DEFAULT_WAVE_MAX_OUTPUT_TOKENS;
|
|
454
492
|
}
|
|
493
|
+
/**
|
|
494
|
+
* Set the active model in the session
|
|
495
|
+
*/
|
|
496
|
+
setModel(model) {
|
|
497
|
+
this.options.model = model;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Get all configured models from settings.json and environment
|
|
501
|
+
*/
|
|
502
|
+
getConfiguredModels() {
|
|
503
|
+
const models = new Set();
|
|
504
|
+
// Add current model from options or environment
|
|
505
|
+
const currentModel = this.options.model || this.env.WAVE_MODEL || process.env.WAVE_MODEL;
|
|
506
|
+
if (currentModel) {
|
|
507
|
+
models.add(currentModel);
|
|
508
|
+
}
|
|
509
|
+
// Add models from merged configuration
|
|
510
|
+
if (this.currentConfiguration?.models) {
|
|
511
|
+
Object.keys(this.currentConfiguration.models).forEach((model) => {
|
|
512
|
+
models.add(model);
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
return Array.from(models);
|
|
516
|
+
}
|
|
455
517
|
/**
|
|
456
518
|
* Resolve all configuration file paths
|
|
457
519
|
*/
|
|
@@ -684,6 +746,7 @@ export function loadWaveConfigFromFile(filePath) {
|
|
|
684
746
|
autoMemoryEnabled: config.autoMemoryEnabled !== undefined
|
|
685
747
|
? config.autoMemoryEnabled
|
|
686
748
|
: undefined,
|
|
749
|
+
models: config.models || undefined,
|
|
687
750
|
};
|
|
688
751
|
}
|
|
689
752
|
catch (error) {
|
|
@@ -796,6 +859,17 @@ export function loadMergedWaveConfig(workdir) {
|
|
|
796
859
|
if (config.autoMemoryEnabled !== undefined) {
|
|
797
860
|
mergedConfig.autoMemoryEnabled = config.autoMemoryEnabled;
|
|
798
861
|
}
|
|
862
|
+
// Merge models
|
|
863
|
+
if (config.models) {
|
|
864
|
+
if (!mergedConfig.models)
|
|
865
|
+
mergedConfig.models = {};
|
|
866
|
+
for (const [modelName, modelConfig] of Object.entries(config.models)) {
|
|
867
|
+
if (!mergedConfig.models[modelName]) {
|
|
868
|
+
mergedConfig.models[modelName] = {};
|
|
869
|
+
}
|
|
870
|
+
Object.assign(mergedConfig.models[modelName], modelConfig);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
799
873
|
}
|
|
800
874
|
return {
|
|
801
875
|
hooks: mergedConfig.hooks && Object.keys(mergedConfig.hooks).length > 0
|
|
@@ -814,5 +888,8 @@ export function loadMergedWaveConfig(workdir) {
|
|
|
814
888
|
: undefined,
|
|
815
889
|
language: mergedConfig.language,
|
|
816
890
|
autoMemoryEnabled: mergedConfig.autoMemoryEnabled,
|
|
891
|
+
models: mergedConfig.models && Object.keys(mergedConfig.models).length > 0
|
|
892
|
+
? mergedConfig.models
|
|
893
|
+
: undefined,
|
|
817
894
|
};
|
|
818
895
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bashTool.d.ts","sourceRoot":"","sources":["../../src/tools/bashTool.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAsDtE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"bashTool.d.ts","sourceRoot":"","sources":["../../src/tools/bashTool.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAsDtE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,UAgbtB,CAAC"}
|
package/dist/tools/bashTool.js
CHANGED
|
@@ -104,8 +104,8 @@ Usage notes:
|
|
|
104
104
|
- You can use the \`run_in_background\` parameter to run the command in the background, which allows you to continue working while the command runs. You can monitor the output using the ${READ_TOOL_NAME} tool as it becomes available. You do not need to use '&' at the end of the command when using this parameter.
|
|
105
105
|
- Avoid using ${BASH_TOOL_NAME} with the \`find\`, \`sed\`, \`awk\`, or \`echo\` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:
|
|
106
106
|
- File search: Use ${GLOB_TOOL_NAME} (NOT find or ls)
|
|
107
|
-
- Content search: Use ${GREP_TOOL_NAME}
|
|
108
|
-
- Read files: Use ${READ_TOOL_NAME}
|
|
107
|
+
- Content search: Use ${GREP_TOOL_NAME} (NOT grep or rg)
|
|
108
|
+
- Read files: Use ${READ_TOOL_NAME} (NOT cat/head/tail)
|
|
109
109
|
- Edit files: Use ${EDIT_TOOL_NAME} (NOT sed/awk)
|
|
110
110
|
- Write files: Use ${WRITE_TOOL_NAME} (NOT echo >/cat <<EOF)
|
|
111
111
|
- Communication: Output text directly (NOT echo/printf)
|
|
@@ -123,7 +123,28 @@ Usage notes:
|
|
|
123
123
|
</bad-example>
|
|
124
124
|
|
|
125
125
|
- Reserve bash tools exclusively for actual system commands and terminal operations that require shell execution. NEVER use bash echo or other command-line tools to communicate thoughts, explanations, or instructions to the user. Output all communication directly in your response text instead.
|
|
126
|
-
- When making multiple bash tool calls, you MUST send a single message with multiple tools calls to run the calls in parallel. For example, if you need to run "git status" and "git diff", send a single message with two tool calls in parallel
|
|
126
|
+
- When making multiple bash tool calls, you MUST send a single message with multiple tools calls to run the calls in parallel. For example, if you need to run "git status" and "git diff", send a single message with two tool calls in parallel.
|
|
127
|
+
|
|
128
|
+
# Git operations
|
|
129
|
+
Git Safety Protocol:
|
|
130
|
+
- NEVER update the git config
|
|
131
|
+
- NEVER run destructive git commands (push --force, reset --hard, checkout ., restore ., clean -f, branch -D) unless the user explicitly requests these actions. Taking unauthorized destructive actions is unhelpful and can result in lost work, so it's best to ONLY run these commands when given direct instructions
|
|
132
|
+
- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it
|
|
133
|
+
- NEVER run force push to main/master, warn the user if they request it
|
|
134
|
+
- CRITICAL: Always create NEW commits rather than amending, unless the user explicitly requests a git amend. When a pre-commit hook fails, the commit did NOT happen — so --amend would modify the PREVIOUS commit, which may result in destroying work or losing previous changes. Instead, after hook failure, fix the issue, re-stage, and create a NEW commit
|
|
135
|
+
- When staging files, prefer adding specific files by name rather than using "git add -A" or "git add .", which can accidentally include sensitive files (.env, credentials) or large binaries
|
|
136
|
+
- NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive
|
|
137
|
+
- IMPORTANT: Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported.
|
|
138
|
+
|
|
139
|
+
Use the gh command via the Bash tool for GitHub-related tasks including working with issues, pull requests, checks, and releases. If given a Github URL use the gh command to get the information needed.
|
|
140
|
+
|
|
141
|
+
# Avoid unnecessary sleep commands
|
|
142
|
+
- Do not sleep between commands that can run immediately — just run them.
|
|
143
|
+
- If your command is long running and you would like to be notified when it finishes — use \`run_in_background\`. No sleep needed.
|
|
144
|
+
- Do not retry failing commands in a sleep loop — diagnose the root cause.
|
|
145
|
+
- If waiting for a background task you started with \`run_in_background\`, you will be notified when it completes — do not poll.
|
|
146
|
+
- If you must poll an external process, use a check command (e.g. \`gh run view\`) rather than sleeping first.
|
|
147
|
+
- If you must sleep, keep the duration short (1-5 seconds) to avoid blocking the user.`,
|
|
127
148
|
execute: async (args, context) => {
|
|
128
149
|
const command = args.command;
|
|
129
150
|
const runInBackground = args.run_in_background;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skillTool.d.ts","sourceRoot":"","sources":["../../src/tools/skillTool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAgBtE,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"skillTool.d.ts","sourceRoot":"","sources":["../../src/tools/skillTool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAgBtE,eAAO,MAAM,SAAS,EAAE,UAmNvB,CAAC"}
|
package/dist/tools/skillTool.js
CHANGED
|
@@ -30,7 +30,10 @@ export const skillTool = {
|
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
prompt: (args) => {
|
|
33
|
-
|
|
33
|
+
let availableSkills = args?.availableSkills?.filter((skill) => !skill.disableModelInvocation);
|
|
34
|
+
if (args?.isSubagent) {
|
|
35
|
+
availableSkills = availableSkills?.filter((skill) => skill.context !== "fork");
|
|
36
|
+
}
|
|
34
37
|
if (!availableSkills || availableSkills.length === 0) {
|
|
35
38
|
return `${SKILL_TOOL_DESCRIPTION} No skills are currently available.`;
|
|
36
39
|
}
|
package/dist/tools/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,0BAA0B,CAAC;IACnC,OAAO,EAAE,CACP,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,WAAW,KACjB,OAAO,CAAC,UAAU,CAAC,CAAC;IACzB,mBAAmB,CAAC,EAAE,CACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,WAAW,KACjB,MAAM,CAAC;IACZ;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;QACf,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,CAAC;QAC7C,eAAe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AA0B,EAAE,SAAS,CAAC;IACzD,4CAA4C;IAC5C,SAAS,CAAC,EAAE,cAAc,0BAA0B,CAAC,CAAC;IACtD,sDAAsD;IACtD,cAAc,CAAC,EAAE,OAAO,+BAA+B,EAAE,cAAc,CAAC;IACxE,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,mEAAmE;IACnE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,yCAAyC;IACzC,iBAAiB,CAAC,EAAE;QAClB,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,mEAAmE;IACnE,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeTool.d.ts","sourceRoot":"","sources":["../../src/tools/writeTool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAItE;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"writeTool.d.ts","sourceRoot":"","sources":["../../src/tools/writeTool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAItE;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,UAiNvB,CAAC"}
|