@tencent-ai/codebuddy-code 1.4.1 → 1.5.0-next.37766bb.20250930

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencent-ai/codebuddy-code",
3
- "version": "1.4.1",
3
+ "version": "1.5.0-next.37766bb.20250930",
4
4
  "description": "Use CodeBuddy, Tencent's AI assistant, right from your terminal. CodeBuddy can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.",
5
5
  "main": "lib/node/index.js",
6
6
  "typings": "lib/node/index.d.ts",
@@ -30,7 +30,8 @@
30
30
  "url": "https://cnb.cool/codebuddy/codebuddy-code/-/issues"
31
31
  },
32
32
  "publishConfig": {
33
- "access": "public"
33
+ "access": "public",
34
+ "tag": "next"
34
35
  },
35
36
  "scripts": {},
36
37
  "devDependencies": {}
@@ -23,6 +23,7 @@
23
23
  "Bash",
24
24
  "Glob",
25
25
  "Grep",
26
+ "ExitPlanMode",
26
27
  "TodoWrite",
27
28
  "SaveMemory",
28
29
  "WebFetch",
@@ -211,6 +212,6 @@
211
212
  "productFeatures": {
212
213
  "BillingNotice": false
213
214
  },
214
- "commit": "cfa71995157ea8e71360fc6f5453a7630a7fb626",
215
- "date": "2025-09-28T14:56:09.815Z"
215
+ "commit": "37766bbd51173d267182fb278fd34c3c99ebb196",
216
+ "date": "2025-09-29T16:02:49.351Z"
216
217
  }
package/product.ioa.json CHANGED
@@ -29,6 +29,7 @@
29
29
  "Bash",
30
30
  "Glob",
31
31
  "Grep",
32
+ "ExitPlanMode",
32
33
  "TodoWrite",
33
34
  "SaveMemory",
34
35
  "WebFetch",
@@ -303,6 +304,6 @@
303
304
  "productFeatures": {
304
305
  "BillingNotice": false
305
306
  },
306
- "commit": "cfa71995157ea8e71360fc6f5453a7630a7fb626",
307
- "date": "2025-09-28T14:56:11.047Z"
307
+ "commit": "37766bbd51173d267182fb278fd34c3c99ebb196",
308
+ "date": "2025-09-29T16:02:50.820Z"
308
309
  }
package/product.json CHANGED
@@ -80,22 +80,11 @@
80
80
  "models": [
81
81
  {
82
82
  "credits": "x2.00 credits",
83
- "id": "claude-3.7",
83
+ "id": "default-model",
84
84
  "maxAllowedSize": 80000,
85
85
  "maxInputTokens": 200000,
86
86
  "maxOutputTokens": 24000,
87
- "name": "Claude-3.7-Sonnet",
88
- "supportsImages": true,
89
- "supportsToolCall": true,
90
- "vendor": "e"
91
- },
92
- {
93
- "credits": "x2.00 credits",
94
- "id": "claude-4.0",
95
- "maxAllowedSize": 80000,
96
- "maxInputTokens": 200000,
97
- "maxOutputTokens": 24000,
98
- "name": "Claude-4.0-Sonnet",
87
+ "name": "Default",
99
88
  "supportsImages": true,
100
89
  "supportsToolCall": true,
101
90
  "vendor": "e"
@@ -221,6 +210,10 @@
221
210
  "name": "system-reminder-todo-list",
222
211
  "template": "<system-reminder>{% if todoListEmpty %}\nThis is a reminder that your todo list is currently empty. DO NOT mention this to the user explicitly because they are already aware. If you are working on tasks that would benefit from a todo list please use the TodoWrite tool to create one. If not, please feel free to ignore. Again do not mention this message to the user.\n{% else %}\nYour todo list has changed. DO NOT mention this explicitly to the user. Here are the latest contents of your todo list:\n\n{{todoListContent | safe}}. Continue on with the tasks at hand if applicable.\n{% endif %}\n</system-reminder>\n"
223
212
  },
213
+ {
214
+ "name": "system-reminder-planmode",
215
+ "template": "<system-reminder>\nPlan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supercedes any other instructions you have received (for example, to make edits). Instead, you should:\n1. Answer the user's query comprehensively\n2. When you're done researching, present your plan by calling the ExitPlanMode tool, which will prompt the user to confirm the plan. Do NOT make any file changes or run any tools that modify the system state in any way until the user has confirmed the plan.\n</system-reminder>\n"
216
+ },
224
217
  {
225
218
  "name": "tool-task-description",
226
219
  "template": "Launch a new agent to handle complex, multi-step tasks autonomously.\n\nAvailable agent types and the tools they have access to:\n- general-purpose: 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. (Tools: *)\n{%- if agents and agents.length > 0 -%}\n{%- for agent in agents -%}\n{%- if agent.asTool %}\n- {{agent.name}}: {{agent.description}} (Tools: {%- if agent.tools and agent.tools.length > 0 -%}{{agent.tools.join(',')}}{%- endif -%})\n{%- endif -%}\n{%- endfor -%}\n{%- endif %}\n\nWhen using the Task tool, you must specify a subagent_type parameter to select which agent type to use.\n\n\n\nWhen NOT to use the Agent tool:\n- If you want to read a specific file path, use the Read or Glob tool instead of the Agent tool, to find the match more quickly\n- If you are searching for a specific class definition like \"class Foo\", use the Glob tool instead, to find the match more quickly\n- If you are searching for code within a specific file or set of 2-3 files, use the Read tool instead of the Agent tool, to find the match more quickly\n- Other tasks that are not related to the agent descriptions above\n\n\nUsage notes:\n1. Launch multiple agents concurrently whenever possible, to maximize performance; to do that, use a single message with multiple tool uses\n2. When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result.\n3. Each agent invocation is stateless. You will not be able to send additional messages to the agent, nor will the agent be able to communicate with you outside of its final report. Therefore, your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.\n4. The agent's outputs should generally be trusted\n5. Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.), since it is not aware of the user's intent\n6. If the agent description mentions that it should be used proactively, then you should try your best to use it without the user having to ask for it first. Use your judgement.\n\nExample usage:\n\n<example_agent_descriptions>\n\"code-reviewer\": use this agent after you are done writing a signficant piece of code\n\"greeting-responder\": use this agent when to respond to user greetings with a friendly joke\n</example_agent_description>\n\n<example>\nuser: \"Please write a function that checks if a number is prime\"\nassistant: Sure let me write a function that checks if a number is prime\nassistant: First let me use the Write tool to write a function that checks if a number is prime\nassistant: I'm going to use the Write tool to write the following code:\n<code>\nfunction isPrime(n) {\n if (n <= 1) return false\n for (let i = 2; i * i <= n; i++) {\n if (n % i === 0) return false\n }\n return true\n}\n</code>\n<commentary>\nSince a signficant piece of code was written and the task was completed, now use the code-reviewer agent to review the code\n</commentary>\nassistant: Now let me use the code-reviewer agent to review the code\nassistant: Uses the Task tool to launch the with the code-reviewer agent\n</example>\n\n<example>\nuser: \"Hello\"\n<commentary>\nSince the user is greeting, use the greeting-responder agent to respond with a friendly joke\n</commentary>\nassistant: \"I'm going to use the Task tool to launch the with the greeting-responder agent\"\n</example>\n\n"
@@ -241,10 +234,6 @@
241
234
  "name": "tool-ls-description",
242
235
  "template": "Lists files and directories in a given path. The path parameter must be an absolute path, not a relative path. You can optionally provide an array of glob patterns to ignore with the ignore parameter. You should generally prefer the Glob and Grep tools, if you know which directories to search."
243
236
  },
244
- {
245
- "name": "tool-exitplanmode-description",
246
- "template": "Use this tool when you are in plan mode and have finished presenting your plan and are ready to code. This will prompt the user to exit plan mode.\nIMPORTANT: Only use this tool when the task requires planning the implementation steps of a task that requires writing code. For research tasks where you're gathering information, searching files, reading files or in general trying to understand the codebase - do NOT use this tool.\n\nEg.\n1. Initial task: \"Search for and understand the implementation of vim mode in the codebase\" - Do not use the exit plan mode tool because you are not planning the implementation steps of a task.\n2. Initial task: \"Help me implement yank mode for vim\" - Use the exit plan mode tool after you have finished planning the implementation steps of the task."
247
- },
248
237
  {
249
238
  "name": "tool-read-description",
250
239
  "template": "Reads a file from the local filesystem. You can access any file directly by using this tool.\nAssume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.\n\nUsage:\n- The file_path parameter must be an absolute path, not a relative path\n- By default, it reads up to 2000 lines starting from the beginning of the file\n- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters\n- Any lines longer than 2000 characters will be truncated\n- Results are returned using cat -n format, with line numbers starting at 1\n- This tool allows Terminal Assistant Agent to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Terminal Assistant Agent is a multimodal LLM.\n- This tool can read PDF files (.pdf). PDFs are processed page by page, extracting both text and visual content for analysis.\n- For Jupyter notebooks (.ipynb files), use the NotebookRead instead\n- You have the capability to call multiple tools in a single response. It is always better to speculatively read multiple files as a batch that are potentially useful.\n- You will regularly be asked to read screenshots. If the user provides a path to a screenshot ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths like /var/folders/123/abc/T/TemporaryItems/NSIRD_screencaptureui_ZfB1tD/Screenshot.png\n- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.\n"
@@ -277,9 +266,21 @@
277
266
  "name": "tool-todowrite-description",
278
267
  "template": "Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.\nIt also helps the user understand the progress of the task and overall progress of their requests.\n\n## When to Use This Tool\nUse this tool proactively in these scenarios:\n\n1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions\n2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations\n3. User explicitly requests todo list - When the user directly asks you to use the todo list\n4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)\n5. After receiving new instructions - Immediately capture user requirements as todos\n6. When you start working on a task - Mark it as in_progress BEFORE beginning work. Ideally you should only have one todo as in_progress at a time\n7. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation\n\n## When NOT to Use This Tool\n\nSkip using this tool when:\n1. There is only a single, straightforward task\n2. The task is trivial and tracking it provides no organizational benefit\n3. The task can be completed in less than 3 trivial steps\n4. The task is purely conversational or informational\n\nNOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.\n\n## Examples of When to Use the Todo List\n\n<example>\nUser: I want to add a dark mode toggle to the application settings. Make sure you run the tests and build when you're done!\nAssistant: I'll help add a dark mode toggle to your application settings. Let me create a todo list to track this implementation.\n*Creates todo list with the following items:*\n1. Create dark mode toggle component in Settings page\n2. Add dark mode state management (context/store)\n3. Implement CSS-in-JS styles for dark theme\n4. Update existing components to support theme switching\n5. Run tests and build process, addressing any failures or errors that occur\n*Begins working on the first task*\n\n<reasoning>\nThe assistant used the todo list because:\n1. Adding dark mode is a multi-step feature requiring UI, state management, and styling changes\n2. The user explicitly requested tests and build be run afterward\n3. The assistant inferred that tests and build need to pass by adding \"Ensure tests and build succeed\" as the final task\n</reasoning>\n</example>\n\n<example>\nUser: Help me rename the function getCwd to getCurrentWorkingDirectory across my project\nAssistant: Let me first search through your codebase to find all occurrences of 'getCwd'.\n*Uses grep or search tools to locate all instances of getCwd in the codebase*\nAssistant: I've found 15 instances of 'getCwd' across 8 different files. Let me create a todo list to track these changes.\n*Creates todo list with specific items for each file that needs updating*\n\n<reasoning>\nThe assistant used the todo list because:\n1. First, the assistant searched to understand the scope of the task\n2. Upon finding multiple occurrences across different files, it determined this was a complex task with multiple steps\n3. The todo list helps ensure every instance is tracked and updated systematically\n4. This approach prevents missing any occurrences and maintains code consistency\n</reasoning>\n</example>\n\n\n<example>\nUser: I need to implement these features for my e-commerce site: user registration, product catalog, shopping cart, and checkout flow.\nAssistant: I'll help implement these features. First, let's add all the features to the todo list.\n*Creates a todo list breaking down each feature into specific tasks based on the project architecture*\nAssistant: Let's start with user registration. This will involve creating database models, API endpoints, and frontend forms that integrate with your existing authentication system.\n\n<reasoning>\nThe assistant used the todo list because:\n1. The user provided multiple complex features to implement in a comma separated list\n2. The todo list helps organize these large features into manageable tasks\n3. This approach allows for tracking progress across the entire implementation\n</reasoning>\n</example>\n\n<example>\nUser: Can you help optimize my React application? It's rendering slowly and has performance issues.</user>\nAssistant: I'll help optimize your React application. First, let me examine your codebase to identify potential performance bottlenecks.\n*Reviews component structure, render patterns, state management, and data fetching*\nAssistant: After analyzing your codebase, I've identified several performance issues. Let me create a todo list to track our optimization efforts.\n*Creates todo list with items like: 1) Implement memoization for expensive calculations in ProductList, 2) Add virtualization for long lists in Dashboard, 3) Optimize image loading in Gallery component, 4) Fix state update loops in ShoppingCart, 5) Review bundle size and implement code splitting*\nLet's start by implementing memoization for the expensive calculations in your ProductList component.</assistant>\n\n<reasoning>\nThe assistant used the todo list because:\n1. First, the assistant examined the codebase to identify specific performance issues\n2. Based on this analysis, it identified multiple optimization opportunities\n3. Performance optimization is a non-trivial task requiring multiple steps\n4. The todo list helps methodically track improvements across different components\n5. This systematic approach ensures all performance bottlenecks are addressed\n</reasoning>\n</example>\n\n## Examples of When NOT to Use the Todo List\n\n<example>\nUser: How do I print 'Hello World' in Python?\nAssistant: In Python, you can print \"Hello World\" with this simple code:\n\npython\nprint(\"Hello World\")\n\nThis will output the text \"Hello World\" to the console when executed.</assistant>\n\n<reasoning>\nThe assistant did not use the todo list because this is a single, trivial task that can be completed in one step. There's no need to track multiple tasks or steps for such a straightforward request.\n</reasoning>\n</example>\n\n<example>\nUser: What does the git status command do?\nAssistant: The git status command shows the current state of your working directory and staging area. It displays which changes have been staged, which haven't, and which files aren't being tracked by Git. This is a fundamental command for understanding the current state of your repository before making commits.\n\n<reasoning>\nThe assistant did not use the todo list because this is an informational request with no actual coding task to complete. The user is simply asking for an explanation, not for the assistant to perform multiple steps or tasks.\n</reasoning>\n</example>\n\n<example>\nUser: Can you add a comment to the calculateTotal function to explain what it does?\nAssistant: Sure, let me add a comment to the calculateTotal function to explain what it does.\n* Uses the Edit tool to add a comment to the calculateTotal function *\n\n<reasoning>\nThe assistant did not use the todo list because this is a single, straightforward task confined to one location in the code. Adding a comment doesn't require tracking multiple steps or systematic organization.\n</reasoning>\n</example>\n\n<example>\nUser: Run npm install for me and tell me what happens.\nAssistant: I'll run the npm install command for you.\n\n*Executes: npm install*\n\nThe command completed successfully. Here's the output:\n[Output of npm install command]\n\nAll dependencies have been installed according to your package.json file.\n\n<reasoning>\nThe assistant did not use the todo list because this is a single command execution with immediate results. There are no multiple steps to track or organize, making the todo list unnecessary for this straightforward task.\n</reasoning>\n</example>\n\n## Tool Usage Example\n\nHere's an example of how to use this tool:\n\n\\`\\`\\`json\n{\n \"todos\": [\n {\n \"id\": \"task-1\",\n \"content\": \"Add dark mode toggle to Settings page\",\n \"status\": \"in_progress\",\n \"priority\": \"high\"\n },\n {\n \"id\": \"task-2\", \n \"content\": \"Update existing components to support theme switching\",\n \"status\": \"pending\",\n \"priority\": \"medium\"\n },\n {\n \"id\": \"task-3\",\n \"content\": \"Run tests and ensure they pass\",\n \"status\": \"pending\", \n \"priority\": \"low\"\n }\n ]\n}\n\\`\\`\\`\n\n## Task States and Management\n\n1. **Task States**: Use these states to track progress:\n - pending: Task not yet started\n - in_progress: Currently working on (limit to ONE task at a time)\n - completed: Task finished successfully\n\n2. **Task Management**:\n - Update task status in real-time as you work\n - Mark tasks complete IMMEDIATELY after finishing (don't batch completions)\n - Only have ONE task in_progress at any time\n - Complete current tasks before starting new ones\n - Remove tasks that are no longer relevant from the list entirely\n\n3. **Task Completion Requirements**:\n - ONLY mark a task as completed when you have FULLY accomplished it\n - If you encounter errors, blockers, or cannot finish, keep the task as in_progress\n - When blocked, create a new task describing what needs to be resolved\n - Never mark a task as completed if:\n - Tests are failing\n - Implementation is partial\n - You encountered unresolved errors\n - You couldn't find necessary files or dependencies\n\n4. **Task Breakdown**:\n - Create specific, actionable items\n - Break complex tasks into smaller, manageable steps\n - Use clear, descriptive task names\n\nWhen in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.\n"
279
268
  },
269
+ {
270
+ "name": "tool-todowrite-planmode-result",
271
+ "template": "./templates/tool-todowrite-planmode-result.tpl"
272
+ },
280
273
  {
281
274
  "name": "tool-websearch-description",
282
275
  "template": "- Allows Terminal Assistant Agent to search the web and use the results to inform responses\n- Provides up-to-date information for current events and recent data\n- Returns search result information formatted as search result blocks\n- Use this tool for accessing information beyond Terminal Assistant Agent's knowledge cutoff\n- Searches are performed automatically within a single API call\n\nUsage notes:\n - Domain filtering is supported to include or block specific websites\n - Web search is only available in the US\n - Account for \"Today's date\" in <env>. For example, if <env> says \"Today's date: 2025-07-01\", and the user wants the latest docs, do not use 2024 in the search query. Use 2025.\n"
276
+ },
277
+ {
278
+ "name": "tool-exit-planmode-description",
279
+ "template": "Use this tool when you are in plan mode and have finished presenting your plan and are ready to code. This will prompt the user to exit plan mode. \nIMPORTANT: Only use this tool when the task requires planning the implementation steps of a task that requires writing code. For research tasks where you're gathering information, searching files, reading files or in general trying to understand the codebase - do NOT use this tool.\n\nEg. \n1. Initial task: \"Search for and understand the implementation of vim mode in the codebase\" - Do not use the exit plan mode tool because you are not planning the implementation steps of a task.\n2. Initial task: \"Help me implement yank mode for vim\" - Use the exit plan mode tool after you have finished planning the implementation steps of the task.\n\n"
280
+ },
281
+ {
282
+ "name": "tool-exit-planmode-rejected",
283
+ "template": "The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file). STOP what you are doing and wait for the user to tell you how to proceed.\n"
283
284
  }
284
285
  ],
285
286
  "variables": [
@@ -326,7 +327,7 @@
326
327
  "instructions": "cli-agent-prompt",
327
328
  "description": "cli agent",
328
329
  "models": [
329
- "claude-4.0",
330
+ "default-model",
330
331
  "gemini-2.5-flash",
331
332
  "gemini-2.5-pro",
332
333
  "gpt-5",
@@ -349,6 +350,7 @@
349
350
  "Bash",
350
351
  "Glob",
351
352
  "Grep",
353
+ "ExitPlanMode",
352
354
  "TodoWrite",
353
355
  "SaveMemory",
354
356
  "WebFetch",
@@ -459,7 +461,7 @@
459
461
  "productFeatures": {
460
462
  "InlineCompletions": true,
461
463
  "InlineChat": true,
462
- "NesCompletions": true,
464
+ "NesCompletions": false,
463
465
  "NesDocumentActiveChangeTrigger": false,
464
466
  "NesCompletionsPrefetching": true,
465
467
  "NESPrefetchingAfterEmptyCompletion": false,
@@ -534,10 +536,6 @@
534
536
  "name": "LS",
535
537
  "description": "tool-ls-description"
536
538
  },
537
- {
538
- "name": "ExitPlanMode",
539
- "description": "tool-exitplanmode-description"
540
- },
541
539
  {
542
540
  "name": "Read",
543
541
  "description": "tool-read-description"
@@ -581,8 +579,12 @@
581
579
  {
582
580
  "name": "Task",
583
581
  "description": "tool-task-description"
582
+ },
583
+ {
584
+ "name": "ExitPlanMode",
585
+ "description": "tool-exit-planmode-description"
584
586
  }
585
587
  ],
586
- "commit": "cfa71995157ea8e71360fc6f5453a7630a7fb626",
587
- "date": "2025-09-28T14:56:08.585Z"
588
+ "commit": "37766bbd51173d267182fb278fd34c3c99ebb196",
589
+ "date": "2025-09-29T16:02:47.947Z"
588
590
  }