@vybestack/llxprt-code-core 0.1.21 → 0.1.23
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/dist/src/auth/types.d.ts +4 -4
- package/dist/src/code_assist/codeAssist.d.ts +1 -1
- package/dist/src/code_assist/codeAssist.js +5 -2
- package/dist/src/code_assist/codeAssist.js.map +1 -1
- package/dist/src/code_assist/converter.d.ts +2 -1
- package/dist/src/code_assist/converter.js +6 -4
- package/dist/src/code_assist/converter.js.map +1 -1
- package/dist/src/code_assist/oauth2.d.ts +1 -0
- package/dist/src/code_assist/oauth2.js +32 -15
- package/dist/src/code_assist/oauth2.js.map +1 -1
- package/dist/src/code_assist/server.d.ts +1 -2
- package/dist/src/code_assist/server.js +10 -5
- package/dist/src/code_assist/server.js.map +1 -1
- package/dist/src/code_assist/setup.js +2 -1
- package/dist/src/code_assist/setup.js.map +1 -1
- package/dist/src/config/config.d.ts +14 -1
- package/dist/src/config/config.js +28 -3
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/core/client.js +13 -4
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/coreToolScheduler.d.ts +2 -1
- package/dist/src/core/coreToolScheduler.js +23 -0
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/geminiChat.js +73 -17
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/loggingContentGenerator.d.ts +1 -5
- package/dist/src/core/loggingContentGenerator.js +4 -6
- package/dist/src/core/loggingContentGenerator.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.d.ts +2 -2
- package/dist/src/core/nonInteractiveToolExecutor.js +13 -9
- package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -1
- package/dist/src/core/subagent.js +5 -5
- package/dist/src/core/subagent.js.map +1 -1
- package/dist/src/debug/ConfigurationManager.d.ts +28 -0
- package/dist/src/debug/ConfigurationManager.js +211 -0
- package/dist/src/debug/ConfigurationManager.js.map +1 -0
- package/dist/src/debug/DebugLogger.d.ts +26 -0
- package/dist/src/debug/DebugLogger.js +230 -0
- package/dist/src/debug/DebugLogger.js.map +1 -0
- package/dist/src/debug/FileOutput.d.ts +23 -0
- package/dist/src/debug/FileOutput.js +144 -0
- package/dist/src/debug/FileOutput.js.map +1 -0
- package/dist/src/debug/MockConfigurationManager.d.ts +28 -0
- package/dist/src/debug/MockConfigurationManager.js +45 -0
- package/dist/src/debug/MockConfigurationManager.js.map +1 -0
- package/dist/src/debug/MockFileOutput.d.ts +20 -0
- package/dist/src/debug/MockFileOutput.js +25 -0
- package/dist/src/debug/MockFileOutput.js.map +1 -0
- package/dist/src/debug/index.d.ts +8 -0
- package/dist/src/debug/index.js +9 -0
- package/dist/src/debug/index.js.map +1 -0
- package/dist/src/debug/types.d.ts +23 -0
- package/dist/src/debug/types.js +2 -0
- package/dist/src/debug/types.js.map +1 -0
- package/dist/src/ide/ide-client.d.ts +4 -0
- package/dist/src/ide/ide-client.js +41 -2
- package/dist/src/ide/ide-client.js.map +1 -1
- package/dist/src/ide/ide-installer.js +17 -4
- package/dist/src/ide/ide-installer.js.map +1 -1
- package/dist/src/ide/process-utils.d.ts +10 -5
- package/dist/src/ide/process-utils.js +113 -30
- package/dist/src/ide/process-utils.js.map +1 -1
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/oauth-provider.js +176 -58
- package/dist/src/mcp/oauth-provider.js.map +1 -1
- package/dist/src/mcp/oauth-utils.d.ts +3 -1
- package/dist/src/mcp/oauth-utils.js +52 -22
- package/dist/src/mcp/oauth-utils.js.map +1 -1
- package/dist/src/prompt-config/defaults/core.md +34 -230
- package/dist/src/prompt-config/defaults/tools/read-file.md +1 -1
- package/dist/src/providers/BaseProvider.js +13 -2
- package/dist/src/providers/BaseProvider.js.map +1 -1
- package/dist/src/providers/anthropic/AnthropicProvider.d.ts +1 -0
- package/dist/src/providers/anthropic/AnthropicProvider.js +165 -127
- package/dist/src/providers/anthropic/AnthropicProvider.js.map +1 -1
- package/dist/src/providers/gemini/GeminiProvider.d.ts +1 -0
- package/dist/src/providers/gemini/GeminiProvider.js +29 -53
- package/dist/src/providers/gemini/GeminiProvider.js.map +1 -1
- package/dist/src/providers/openai/OpenAIProvider.d.ts +9 -0
- package/dist/src/providers/openai/OpenAIProvider.js +671 -128
- package/dist/src/providers/openai/OpenAIProvider.js.map +1 -1
- package/dist/src/providers/openai/buildResponsesRequest.js +9 -6
- package/dist/src/providers/openai/buildResponsesRequest.js.map +1 -1
- package/dist/src/providers/openai/getOpenAIProviderInfo.js +8 -3
- package/dist/src/providers/openai/getOpenAIProviderInfo.js.map +1 -1
- package/dist/src/providers/openai/parseResponsesStream.js +13 -4
- package/dist/src/providers/openai/parseResponsesStream.js.map +1 -1
- package/dist/src/providers/openai/syntheticToolResponses.d.ts +0 -9
- package/dist/src/providers/openai/syntheticToolResponses.js +87 -16
- package/dist/src/providers/openai/syntheticToolResponses.js.map +1 -1
- package/dist/src/services/fileSystemService.d.ts +31 -0
- package/dist/src/services/fileSystemService.js +18 -0
- package/dist/src/services/fileSystemService.js.map +1 -0
- package/dist/src/services/loopDetectionService.d.ts +5 -0
- package/dist/src/services/loopDetectionService.js +89 -1
- package/dist/src/services/loopDetectionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.d.ts +8 -6
- package/dist/src/services/shellExecutionService.js +297 -133
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/telemetry/index.d.ts +2 -2
- package/dist/src/telemetry/index.js +2 -2
- package/dist/src/telemetry/index.js.map +1 -1
- package/dist/src/telemetry/loggers.d.ts +2 -1
- package/dist/src/telemetry/loggers.js +15 -1
- package/dist/src/telemetry/loggers.js.map +1 -1
- package/dist/src/telemetry/metrics.d.ts +1 -1
- package/dist/src/telemetry/metrics.js +2 -1
- package/dist/src/telemetry/metrics.js.map +1 -1
- package/dist/src/telemetry/sdk.js +3 -3
- package/dist/src/telemetry/sdk.js.map +1 -1
- package/dist/src/telemetry/types.d.ts +9 -1
- package/dist/src/telemetry/types.js +32 -0
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/telemetry/uiTelemetry.d.ts +4 -0
- package/dist/src/telemetry/uiTelemetry.js +16 -1
- package/dist/src/telemetry/uiTelemetry.js.map +1 -1
- package/dist/src/test-utils/tools.d.ts +29 -8
- package/dist/src/test-utils/tools.js +79 -15
- package/dist/src/test-utils/tools.js.map +1 -1
- package/dist/src/tools/ToolFormatter.d.ts +1 -0
- package/dist/src/tools/ToolFormatter.js +90 -9
- package/dist/src/tools/ToolFormatter.js.map +1 -1
- package/dist/src/tools/edit.d.ts +2 -2
- package/dist/src/tools/edit.js +60 -28
- package/dist/src/tools/edit.js.map +1 -1
- package/dist/src/tools/glob.d.ts +1 -1
- package/dist/src/tools/glob.js +8 -8
- package/dist/src/tools/glob.js.map +1 -1
- package/dist/src/tools/grep.d.ts +1 -1
- package/dist/src/tools/grep.js +1 -6
- package/dist/src/tools/grep.js.map +1 -1
- package/dist/src/tools/ls.d.ts +1 -1
- package/dist/src/tools/ls.js +1 -6
- package/dist/src/tools/ls.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.d.ts +38 -0
- package/dist/src/tools/mcp-client-manager.js +74 -0
- package/dist/src/tools/mcp-client-manager.js.map +1 -0
- package/dist/src/tools/mcp-client.d.ts +43 -0
- package/dist/src/tools/mcp-client.js +163 -32
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/memoryTool.d.ts +1 -1
- package/dist/src/tools/memoryTool.js +1 -6
- package/dist/src/tools/memoryTool.js.map +1 -1
- package/dist/src/tools/read-file.d.ts +1 -1
- package/dist/src/tools/read-file.js +5 -7
- package/dist/src/tools/read-file.js.map +1 -1
- package/dist/src/tools/read-many-files.d.ts +0 -1
- package/dist/src/tools/read-many-files.js +16 -11
- package/dist/src/tools/read-many-files.js.map +1 -1
- package/dist/src/tools/shell.d.ts +1 -1
- package/dist/src/tools/shell.js +57 -36
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/tool-error.d.ts +1 -0
- package/dist/src/tools/tool-error.js +1 -0
- package/dist/src/tools/tool-error.js.map +1 -1
- package/dist/src/tools/tool-registry.d.ts +5 -0
- package/dist/src/tools/tool-registry.js +13 -4
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/tools/tools.d.ts +56 -76
- package/dist/src/tools/tools.js +119 -106
- package/dist/src/tools/tools.js.map +1 -1
- package/dist/src/tools/web-fetch.d.ts +1 -1
- package/dist/src/tools/web-fetch.js +1 -6
- package/dist/src/tools/web-fetch.js.map +1 -1
- package/dist/src/tools/web-search.d.ts +6 -1
- package/dist/src/tools/web-search.js +6 -6
- package/dist/src/tools/web-search.js.map +1 -1
- package/dist/src/tools/write-file.d.ts +1 -1
- package/dist/src/tools/write-file.js +7 -8
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/utils/environmentContext.js +2 -2
- package/dist/src/utils/environmentContext.js.map +1 -1
- package/dist/src/utils/errorReporting.js +1 -1
- package/dist/src/utils/fileUtils.d.ts +2 -1
- package/dist/src/utils/fileUtils.js +3 -3
- package/dist/src/utils/fileUtils.js.map +1 -1
- package/dist/src/utils/filesearch/crawler.d.ts +15 -0
- package/dist/src/utils/filesearch/crawler.js +50 -0
- package/dist/src/utils/filesearch/crawler.js.map +1 -0
- package/dist/src/utils/filesearch/fileSearch.d.ts +9 -53
- package/dist/src/utils/filesearch/fileSearch.js +62 -117
- package/dist/src/utils/filesearch/fileSearch.js.map +1 -1
- package/dist/src/utils/filesearch/ignore.d.ts +7 -0
- package/dist/src/utils/filesearch/ignore.js +25 -0
- package/dist/src/utils/filesearch/ignore.js.map +1 -1
- package/dist/src/utils/getPty.d.ts +19 -0
- package/dist/src/utils/getPty.js +23 -0
- package/dist/src/utils/getPty.js.map +1 -0
- package/dist/src/utils/shell-utils.d.ts +39 -0
- package/dist/src/utils/shell-utils.js +68 -0
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/src/utils/user_account.js +58 -53
- package/dist/src/utils/user_account.js.map +1 -1
- package/dist/src/utils/workspaceContext.d.ts +9 -0
- package/dist/src/utils/workspaceContext.js +37 -3
- package/dist/src/utils/workspaceContext.js.map +1 -1
- package/package.json +22 -7
@@ -9,8 +9,7 @@ You are an interactive CLI agent specializing in software engineering tasks. You
|
|
9
9
|
- **Comments:** Add code comments sparingly. Focus on _why_ something is done, especially for complex logic, rather than _what_ is done. Only add high-value comments if necessary for clarity or if requested by the user. Do not edit comments that are separate from the code you are changing. _NEVER_ talk to the user or describe your changes through comments.
|
10
10
|
- **Proactiveness:** Fulfill the user's request thoroughly, including reasonable, directly implied follow-up actions.
|
11
11
|
- **Confirm Ambiguity/Expansion:** Do not take significant actions beyond the clear scope of the request without confirming with the user. If asked _how_ to do something, explain first, don't just do it.
|
12
|
-
- **
|
13
|
-
- **Path Construction:** Before using any file system tool (e.g., ${ReadFileTool.Name}' or '${WriteFileTool.Name}'), you must construct the full absolute path for the path parameter (note: ${ReadFileTool.Name} uses 'absolute_path', ${WriteFileTool.Name} uses 'file_path'). Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
|
12
|
+
- **Path Construction:** Before using any file system tool, you must construct the full absolute path. Combine the project root with the file's path relative to the root. For example, if project root is /path/to/project/ and file is foo/bar/baz.txt, the final path is /path/to/project/foo/bar/baz.txt.
|
14
13
|
- **Do Not revert changes:** Do not revert changes to the codebase unless asked to do so by the user. Only revert changes made by you if they have resulted in an error or if the user has explicitly asked you to revert the changes.
|
15
14
|
|
16
15
|
# Primary Workflows
|
@@ -19,249 +18,54 @@ You are an interactive CLI agent specializing in software engineering tasks. You
|
|
19
18
|
|
20
19
|
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
|
21
20
|
|
22
|
-
1. **Understand:**
|
23
|
-
2. **Plan:** Build a
|
24
|
-
3. **Implement:** Use
|
25
|
-
4. **Verify
|
26
|
-
5. **Verify (Standards):** VERY IMPORTANT: After making code changes, execute the project-specific build, linting and type-checking commands (e.g., 'tsc', 'npm run lint', 'ruff check .') that you have identified for this project (or obtained from the user). This ensures code quality and adherence to standards. If unsure about these commands, you can ask the user if they'd like you to run them and if so how to.
|
21
|
+
1. **Understand:** Use '${GrepTool.Name}' and '${GlobTool.Name}' to understand file structures and conventions. Use '${ReadFileTool.Name}' and '${ReadManyFilesTool.Name}' to understand context.
|
22
|
+
2. **Plan:** Build a grounded plan based on the understanding. Share a concise plan with the user when appropriate.
|
23
|
+
3. **Implement:** Use tools to act on the plan, strictly adhering to project conventions.
|
24
|
+
4. **Verify:** Run tests and linting if available.
|
27
25
|
|
28
26
|
## New Applications
|
29
27
|
|
30
|
-
|
28
|
+
Technology preferences when unspecified:
|
31
29
|
|
32
|
-
|
33
|
-
|
30
|
+
- Web frontend: React with TypeScript
|
31
|
+
- Backend API: Node.js/Express or Python/FastAPI
|
32
|
+
- CLI tools: Python or Go
|
33
|
+
- Mobile: Flutter or React Native
|
34
34
|
|
35
|
-
|
36
|
-
- **Websites (Frontend):** React (JavaScript/TypeScript) with Bootstrap CSS, incorporating Material Design principles for UI/UX.
|
37
|
-
- **Back-End APIs:** Node.js with Express.js (JavaScript/TypeScript) or Python with FastAPI.
|
38
|
-
- **Full-stack:** Next.js (React/Node.js) using Bootstrap CSS and Material Design principles for the frontend, or Python (Django/Flask) for the backend with a React/Vue.js frontend styled with Bootstrap CSS and Material Design principles.
|
39
|
-
- **CLIs:** Python or Go.
|
40
|
-
- **Mobile App:** Compose Multiplatform (Kotlin Multiplatform) or Flutter (Dart) using Material Design libraries and principles, when sharing code between Android and iOS. Jetpack Compose (Kotlin JVM) with Material Design principles or SwiftUI (Swift) for native apps targeted at either Android or iOS, respectively.
|
41
|
-
- **3d Games:** HTML/CSS/JavaScript with Three.js.
|
42
|
-
- **2d Games:** HTML/CSS/JavaScript.
|
35
|
+
# Tool Usage Patterns
|
43
36
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
37
|
+
- **Parallel Operations:** Execute independent searches simultaneously when exploring.
|
38
|
+
- **File Operations:** Always construct absolute paths by combining project root with relative paths.
|
39
|
+
- **Shell Commands:** Explain destructive operations before executing. Use `&` for background processes.
|
40
|
+
- **Task Management:** Use todo tools for complex tasks. Update status in real-time.
|
41
|
+
- **Tool Call Formatting:** All tool calls must be formatted as JSON. Do not use Python syntax for tool calls, especially for arrays and objects. For example, use `{"files": ["file1.txt", "file2.txt"]}` instead of `list_files(files=["file1.txt", "file2.txt"])`.
|
48
42
|
|
49
|
-
#
|
50
|
-
|
51
|
-
## Tone and Style (CLI Interaction)
|
52
|
-
|
53
|
-
- **Concise & Direct:** Adopt a professional, direct, and concise tone suitable for a CLI environment.
|
54
|
-
- **Minimal Output:** Aim for fewer than 3 lines of text output (excluding tool use/code generation) per response whenever practical. Focus strictly on the user's query.
|
55
|
-
- **Clarity over Brevity (When Needed):** While conciseness is key, prioritize clarity for essential explanations or when seeking necessary clarification if a request is ambiguous.
|
56
|
-
- **No Chitchat:** Avoid conversational filler, preambles ("Okay, I will now..."), or postambles ("I have finished the changes..."). Get straight to the action or answer.
|
57
|
-
- **Formatting:** Use GitHub-flavored Markdown. Responses will be rendered in monospace.
|
58
|
-
- **Tools vs. Text:** Use tools for actions, text output _only_ for communication. Do not add explanatory comments within tool calls or code blocks unless specifically part of the required code/command itself.
|
59
|
-
- **Handling Inability:** If unable/unwilling to fulfill a request, state so briefly (1-2 sentences) without excessive justification. Offer alternatives if appropriate.
|
60
|
-
|
61
|
-
## Security and Safety Rules
|
62
|
-
|
63
|
-
- **Explain Critical Commands:** Before executing commands with '${ShellTool.Name}' that modify the file system, codebase, or system state, you _must_ provide a brief explanation of the command's purpose and potential impact. Prioritize user understanding and safety. You should not ask permission to use the tool; the user will be presented with a confirmation dialogue upon use (you do not need to tell them this).
|
64
|
-
- **Security First:** Always apply security best practices. Never introduce code that exposes, logs, or commits secrets, API keys, or other sensitive information.
|
65
|
-
|
66
|
-
## Tool Usage
|
67
|
-
|
68
|
-
- **File Paths:** Always use absolute paths when referring to files with tools like '${ReadFileTool.Name}' or '${WriteFileTool.Name}'. Relative paths are not supported. You must provide an absolute path.
|
69
|
-
- **Parallelism:** Execute multiple independent tool calls in parallel when feasible (i.e. searching the codebase).
|
70
|
-
- **Command Execution:** Use the '${ShellTool.Name}' tool for running shell commands, remembering the safety rule to explain modifying commands first.
|
71
|
-
- **Background Processes:** Use background processes (via \`&\`) for commands that are unlikely to stop on their own, e.g. \`node server.js &\`. If unsure, ask the user.
|
72
|
-
- **Interactive Commands:** Try to avoid shell commands that are likely to require user interaction (e.g. \`git rebase -i\`). Use non-interactive versions of commands (e.g. \`npm init -y\` instead of \`npm init\`) when available, and otherwise remind the user that interactive shell commands are not supported and may cause hangs until canceled by the user.
|
73
|
-
- **Remembering Facts:** Use the '${MemoryTool.Name}' tool to remember specific, _user-related_ facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline _your future interactions with them_ (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do _not_ use it for general project context or information. If unsure whether to save something, you can ask the user, "Should I remember that for you?"
|
74
|
-
- **Respect User Confirmations:** Most tool calls (also denoted as 'function calls') will first require confirmation from the user, where they will either approve or cancel the function call. If a user cancels a function call, respect their choice and do _not_ try to make the function call again. It is okay to request the tool call again _only_ if the user requests that same tool call on a subsequent prompt. When a user cancels a function call, assume best intentions from the user and consider inquiring if they prefer any alternative paths forward.
|
75
|
-
|
76
|
-
## Interaction Details
|
77
|
-
|
78
|
-
- **Help Command:** The user can use '/help' to display help information.
|
79
|
-
- **Feedback:** To report a bug or provide feedback, please use the /bug command.
|
80
|
-
|
81
|
-
# Examples (Illustrating Tone and Workflow)
|
82
|
-
|
83
|
-
<example>
|
84
|
-
user: 1 + 2
|
85
|
-
model: 3
|
86
|
-
</example>
|
87
|
-
|
88
|
-
<example>
|
89
|
-
user: is 13 a prime number?
|
90
|
-
model: true
|
91
|
-
</example>
|
92
|
-
|
93
|
-
<example>
|
94
|
-
user: list files here.
|
95
|
-
model: [tool_call: ${LSTool.Name} for path '/path/to/project']
|
96
|
-
</example>
|
97
|
-
|
98
|
-
<example>
|
99
|
-
user: start the server implemented in server.js
|
100
|
-
model: [tool_call: ${ShellTool.Name} for 'node server.js &' because it must run in the background]
|
101
|
-
</example>
|
102
|
-
|
103
|
-
<example>
|
104
|
-
user: Refactor the auth logic in src/auth.py to use the requests library instead of urllib.
|
105
|
-
model: Okay, I can refactor 'src/auth.py'.
|
106
|
-
First, I'll analyze the code and check for a test safety net before planning any changes.
|
107
|
-
[tool_call: ${GlobTool.Name} for path 'tests/test_auth.py']
|
108
|
-
[tool_call: ${ReadFileTool.Name} for absolute_path '/path/to/tests/test_auth.py']
|
109
|
-
(After analysis)
|
110
|
-
Great, 'tests/test_auth.py' exists and covers the core authentication logic. With this safety net in place, I can safely plan the refactoring.
|
111
|
-
I'll also confirm 'requests' is a dependency.
|
112
|
-
[tool_call: ${ReadFileTool.Name} for absolute_path '/path/to/requirements.txt']
|
113
|
-
(After analysis)
|
114
|
-
Looks good, 'requests' is available.
|
115
|
-
|
116
|
-
Here's the plan:
|
117
|
-
|
118
|
-
1. Replace the 'urllib' calls with 'requests'.
|
119
|
-
2. Add proper 'try...except' error handling for the new network calls.
|
120
|
-
3. Remove the old 'urllib' import.
|
121
|
-
4. Run the project's linter and tests to verify the changes.
|
122
|
-
|
123
|
-
Should I proceed?
|
124
|
-
user: Yes
|
125
|
-
model:
|
126
|
-
[tool_call: ${WriteFileTool.Name} or ${EditTool.Name} to apply the refactoring to 'src/auth.py']
|
127
|
-
Refactoring complete. Running verification...
|
128
|
-
[tool_call: ${ShellTool.Name} for 'ruff check src/auth.py && pytest']
|
129
|
-
(After verification passes)
|
130
|
-
All checks passed. This is a stable checkpoint.
|
131
|
-
</example>
|
132
|
-
|
133
|
-
<example>
|
134
|
-
user: Delete the temp directory.
|
135
|
-
model: I can run \`rm -rf /path/to/project/temp\`. This will permanently delete the directory and all its contents.
|
136
|
-
</example>
|
43
|
+
# Examples
|
137
44
|
|
138
45
|
<example>
|
139
|
-
user:
|
140
|
-
|
141
|
-
Okay, I can write those tests. First, I'll read \`someFile.ts\` to understand its functionality.
|
142
|
-
[tool_call: ${ReadFileTool.Name} for absolute_path '/path/to/someFile.ts' or use ${GlobTool.Name} to find \`someFile.ts\` if its location is unknown]
|
143
|
-
Now I'll look for existing or related test files to understand current testing conventions and dependencies.
|
144
|
-
[tool_call: ${ReadManyFilesTool.Name} for paths ['**/*.test.ts', 'src/**/*.spec.ts'] assuming someFile.ts is in the src directory]
|
145
|
-
(After reviewing existing tests and the file content)
|
146
|
-
[tool_call: ${WriteFileTool.Name} to create /path/to/someFile.test.ts with the test code]
|
147
|
-
I've written the tests. Now I'll run the project's test command to verify them.
|
148
|
-
[tool_call: ${ShellTool.Name} for 'npm run test']
|
46
|
+
user: find all typescript files
|
47
|
+
assistant: <use glob with pattern "**/*.ts">
|
149
48
|
</example>
|
150
49
|
|
151
50
|
<example>
|
152
|
-
user:
|
153
|
-
|
154
|
-
|
155
|
-
[tool_call: ${GrepTool.Name} for pattern 'UserProfile|updateProfile|editUser']
|
156
|
-
(After reviewing search results, assuming a relevant file like '/path/to/UserProfileService.java' was found)
|
157
|
-
Okay, \`/path/to/UserProfileService.java\` seems like the most relevant file. I'll read its content to understand how updates are handled.
|
158
|
-
[tool_call: ${ReadFileTool.Name} for absolute_path '/path/to/UserProfileService.java']
|
159
|
-
(After reading the file)
|
160
|
-
It appears the \`updateUserProfile\` method in \`UserProfileService.java\` is responsible for this. It expects a user ID and a \`UserProfileDTO\` object...
|
161
|
-
</example>
|
162
|
-
|
163
|
-
<example>
|
164
|
-
user: Where are all the 'app.config' files in this project? I need to check their settings.
|
165
|
-
model:
|
166
|
-
[tool_call: ${GlobTool.Name} for pattern '**/app.config']
|
167
|
-
(Assuming GlobTool returns a list of paths like ['/path/to/moduleA/app.config', '/path/to/moduleB/app.config'])
|
168
|
-
I found the following 'app.config' files:
|
169
|
-
- /path/to/moduleA/app.config
|
170
|
-
- /path/to/moduleB/app.config
|
171
|
-
To help you check their settings, I can read their contents. Which one would you like to start with, or should I read all of them?
|
172
|
-
</example>
|
173
|
-
|
174
|
-
# Task Management
|
175
|
-
|
176
|
-
You have access to the TodoWrite and TodoRead tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.
|
177
|
-
|
178
|
-
## When to Use This Tool
|
179
|
-
|
180
|
-
Use this tool proactively in these scenarios:
|
181
|
-
|
182
|
-
1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions
|
183
|
-
2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
|
184
|
-
3. User explicitly requests todo list - When the user directly asks you to use the todo list
|
185
|
-
4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
|
186
|
-
5. After receiving new instructions - Immediately capture user requirements as todos
|
187
|
-
6. When you start working on a task - Mark it as in_progress BEFORE beginning work
|
188
|
-
7. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation
|
189
|
-
|
190
|
-
## When NOT to Use This Tool
|
191
|
-
|
192
|
-
Skip using this tool when:
|
193
|
-
|
194
|
-
1. There is only a single, straightforward task
|
195
|
-
2. The task is trivial and tracking it provides no organizational benefit
|
196
|
-
3. The task can be completed in less than 3 trivial steps
|
197
|
-
4. The task is purely conversational or informational
|
198
|
-
|
199
|
-
## Task States and Management
|
200
|
-
|
201
|
-
1. **Task States**: Use these states to track progress:
|
202
|
-
- pending: Task not yet started
|
203
|
-
- in_progress: Currently working on (limit to ONE task at a time)
|
204
|
-
- completed: Task finished successfully
|
205
|
-
|
206
|
-
2. **Task Management**:
|
207
|
-
- Update task status in real-time as you work
|
208
|
-
- Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
|
209
|
-
- Only have ONE task in_progress at any time
|
210
|
-
- Complete current tasks before starting new ones
|
211
|
-
- Remove tasks that are no longer relevant from the list entirely
|
212
|
-
|
213
|
-
3. **Task Completion Requirements**:
|
214
|
-
- ONLY mark a task as completed when you have FULLY accomplished it
|
215
|
-
- If you encounter errors, blockers, or cannot finish, keep the task as in_progress
|
216
|
-
- When blocked, create a new task describing what needs to be resolved
|
217
|
-
- Never mark a task as completed if:
|
218
|
-
- Tests are failing
|
219
|
-
- Implementation is partial
|
220
|
-
- You encountered unresolved errors
|
221
|
-
- You couldn't find necessary files or dependencies
|
222
|
-
|
223
|
-
When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.
|
224
|
-
|
225
|
-
## Todo Usage Examples
|
226
|
-
|
227
|
-
### Example: Multi-Step Task
|
228
|
-
|
229
|
-
<example>
|
230
|
-
user: Help me rename the function getCwd to getCurrentWorkingDirectory across my project
|
231
|
-
model: I'll search for all occurrences of getCwd first.
|
232
|
-
[tool_call: grep for 'getCwd']
|
233
|
-
I found 15 instances across 8 files. Let me create a todo list to track these changes.
|
234
|
-
[tool_call: TodoWrite with todos for each file that needs updating]
|
235
|
-
[Systematically works through each file, updating todo status as they go]
|
236
|
-
</example>
|
237
|
-
|
238
|
-
### Example: Complex Implementation
|
239
|
-
|
240
|
-
<example>
|
241
|
-
user: I need to implement user registration, product catalog, and shopping cart for my e-commerce site.
|
242
|
-
model: I'll help implement these features. Let me create a todo list to track this implementation.
|
243
|
-
[tool_call: TodoWrite to create todos for each major feature]
|
244
|
-
Let me start with the user registration system.
|
245
|
-
[tool_call: TodoWrite to update first todo to in_progress]
|
246
|
-
[Implements registration]
|
247
|
-
[tool_call: TodoWrite to mark first todo as completed and move to next]
|
248
|
-
</example>
|
249
|
-
|
250
|
-
### Example: When NOT to Use Todos
|
251
|
-
|
252
|
-
<example>
|
253
|
-
user: What does git status do?
|
254
|
-
model: The git status command shows the current state of your working directory and staging area.
|
255
|
-
[No todo needed - informational only]
|
51
|
+
user: read the config file
|
52
|
+
assistant: I'll read the configuration file.
|
53
|
+
<use read_file with absolute_path "/path/to/project/config.json">
|
256
54
|
</example>
|
257
55
|
|
258
56
|
<example>
|
259
|
-
user:
|
260
|
-
|
261
|
-
|
262
|
-
[
|
57
|
+
user: update the database connection string
|
58
|
+
assistant: I'll search for the database configuration first.
|
59
|
+
<use grep with pattern "database|connection|db_url">
|
60
|
+
[After finding the file]
|
61
|
+
<use read_file to examine the current configuration>
|
62
|
+
<use replace to update the connection string>
|
263
63
|
</example>
|
264
64
|
|
265
|
-
#
|
65
|
+
# Response Guidelines
|
266
66
|
|
267
|
-
|
67
|
+
- Take action immediately without announcing intentions
|
68
|
+
- Chain related operations efficiently
|
69
|
+
- Validate changes match project standards
|
70
|
+
- Complete the entire request before stopping
|
71
|
+
- When blocked, state the specific issue concisely
|
@@ -1,4 +1,4 @@
|
|
1
|
-
- **
|
1
|
+
- **Absolute Paths:** Always use absolute paths when referring to files with tools like '${ReadFileTool.Name}' or '${WriteFileTool.Name}'. Relative paths are not supported. You must provide an absolute path.
|
2
2
|
- **Path Construction:** Before using any file system tool (e.g., ${ReadFileTool.Name}' or '${WriteFileTool.Name}'), you must construct the full absolute path for the absolute_path argument. Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
|
3
3
|
- Use '${ReadFileTool.Name}' and '${ReadManyFilesTool.Name}' to understand context and validate any assumptions you may have.
|
4
4
|
- Never make assumptions about the contents of files; instead use '${ReadFileTool.Name}' or '${ReadManyFilesTool.Name}' to ensure you aren't making broad assumptions.
|
@@ -79,8 +79,19 @@ export class BaseProvider {
|
|
79
79
|
* Checks if OAuth is enabled for this provider
|
80
80
|
*/
|
81
81
|
isOAuthEnabled() {
|
82
|
-
// OAuth is enabled if we have a manager AND it's enabled
|
83
|
-
|
82
|
+
// OAuth is enabled if we have a manager AND it's enabled for this provider
|
83
|
+
if (this.baseProviderConfig.oauthManager) {
|
84
|
+
// First check the manager's state (which reads from settings)
|
85
|
+
const manager = this.baseProviderConfig.oauthManager;
|
86
|
+
if (manager.isOAuthEnabled &&
|
87
|
+
typeof manager.isOAuthEnabled === 'function') {
|
88
|
+
const oauthProvider = this.baseProviderConfig.oauthProvider || this.name;
|
89
|
+
return manager.isOAuthEnabled(oauthProvider);
|
90
|
+
}
|
91
|
+
// Fall back to local config
|
92
|
+
return this.baseProviderConfig.isOAuthEnabled === true;
|
93
|
+
}
|
94
|
+
return false;
|
84
95
|
}
|
85
96
|
/**
|
86
97
|
* Checks if authentication is available without triggering OAuth
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BaseProvider.js","sourceRoot":"","sources":["../../../src/providers/BaseProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EACL,sBAAsB,GAGvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAqBvD;;;GAGG;AACH,MAAM,OAAgB,YAAY;IACvB,IAAI,CAAS;IACZ,YAAY,CAAyB;IACrC,kBAAkB,CAAqB;IACzC,eAAe,CAAU;IACzB,kBAAkB,CAAU;IACnB,mBAAmB,GAAG,KAAK,CAAC,CAAC,2BAA2B;IAEzE,YAAY,MAA0B;QACpC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC;QAEjC,sCAAsC;QACtC,mEAAmE;QACnE,MAAM,gBAAgB,GAAyB;YAC7C,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7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Provider.js';
|
7
7
|
import { OAuthManager } from '../../auth/precedence.js';
|
8
8
|
export declare class AnthropicProvider extends BaseProvider {
|
9
|
+
private logger;
|
9
10
|
private anthropic;
|
10
11
|
private toolFormatter;
|
11
12
|
toolFormat: ToolFormat;
|