@tencent-ai/agent-sdk 0.3.15 → 0.3.17

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/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencent-ai/codebuddy-code",
3
- "version": "2.37.20",
3
+ "version": "2.38.1",
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",
@@ -323,6 +323,6 @@
323
323
  "BillingNotice": false,
324
324
  "CustomModelsJSON": true
325
325
  },
326
- "commit": "7ef99423e0f2c22dca6940627f151f613d3d362d",
327
- "date": "2026-01-24T08:57:53.624Z"
326
+ "commit": "a8323019a8d0111a0ea2b64ecd055f40d0afc686",
327
+ "date": "2026-01-25T11:40:19.582Z"
328
328
  }
@@ -325,6 +325,6 @@
325
325
  "BillingNotice": false,
326
326
  "CustomModelsJSON": true
327
327
  },
328
- "commit": "7ef99423e0f2c22dca6940627f151f613d3d362d",
329
- "date": "2026-01-24T08:57:51.046Z"
328
+ "commit": "a8323019a8d0111a0ea2b64ecd055f40d0afc686",
329
+ "date": "2026-01-25T11:40:16.935Z"
330
330
  }
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "endpoint": "https://copilot.tencent.com",
3
3
  "stagingEndpoint": "https://staging-copilot.tencent.com",
4
+ "defaultRelatedModels": {
5
+ "lite": "claude-haiku-4.5",
6
+ "reasoning": "claude-opus-4.5"
7
+ },
4
8
  "agents": [
5
9
  {
6
10
  "name": "cli",
@@ -106,6 +110,9 @@
106
110
  "name": "contentAnalyzer",
107
111
  "instructions": "content-analyzer-agent-instructions",
108
112
  "description": "content analyzer agent",
113
+ "models": [
114
+ "lite"
115
+ ],
109
116
  "tags": [
110
117
  "cli",
111
118
  "content-analyzer"
@@ -117,7 +124,7 @@
117
124
  "instructions": "terminal-title-generator-instructions",
118
125
  "description": "Generate terminal window titles from conversation topics.",
119
126
  "models": [
120
- "claude-haiku-4.5"
127
+ "lite"
121
128
  ],
122
129
  "tags": [
123
130
  "cli",
@@ -216,6 +223,10 @@
216
223
  "reasoning": {
217
224
  "effort": "medium",
218
225
  "summary": "auto"
226
+ },
227
+ "relatedModels": {
228
+ "lite": "deepseek-v3-2-volc-ioa",
229
+ "reasoning": "deepseek-v3-2-volc-ioa"
219
230
  }
220
231
  },
221
232
  {
@@ -248,7 +259,11 @@
248
259
  "disabledMultimodal": true,
249
260
  "maxAllowedSize": 200000,
250
261
  "supportsReasoning": true,
251
- "temperature": 1
262
+ "temperature": 1,
263
+ "relatedModels": {
264
+ "lite": "glm-4.7-ioa",
265
+ "reasoning": "glm-4.7-ioa"
266
+ }
252
267
  },
253
268
  {
254
269
  "credits": "x0.00 credits",
@@ -265,7 +280,11 @@
265
280
  "effort": "medium",
266
281
  "summary": "auto"
267
282
  },
268
- "maxAllowedSize": 128000
283
+ "maxAllowedSize": 128000,
284
+ "relatedModels": {
285
+ "lite": "glm-4.6v-ioa",
286
+ "reasoning": "glm-4.6v-ioa"
287
+ }
269
288
  },
270
289
  {
271
290
  "credits": "x0.00 credits",
@@ -279,7 +298,11 @@
279
298
  "disabledMultimodal": true,
280
299
  "maxAllowedSize": 168000,
281
300
  "supportsReasoning": true,
282
- "temperature": 1
301
+ "temperature": 1,
302
+ "relatedModels": {
303
+ "lite": "glm-4.6-ioa",
304
+ "reasoning": "glm-4.6-ioa"
305
+ }
283
306
  },
284
307
  {
285
308
  "credits": "x3.33 credits",
@@ -409,73 +432,12 @@
409
432
  "reseaning": {
410
433
  "effort": "medium",
411
434
  "summary": "auto"
435
+ },
436
+ "relatedModels": {
437
+ "lite": "gpt-5.1-codex-mini",
438
+ "reasoning": "claude-opus-4.5"
412
439
  }
413
440
  },
414
- {
415
- "credits": "x0.95 credits",
416
- "id": "gpt-5",
417
- "name": "GPT-5",
418
- "vendor": "e",
419
- "maxOutputTokens": 72000,
420
- "maxInputTokens": 200000,
421
- "supportsToolCall": true,
422
- "supportsImages": true,
423
- "maxAllowedSize": 80000,
424
- "supportsReasoning": true,
425
- "reseaning": {
426
- "effort": "medium",
427
- "summary": "auto"
428
- }
429
- },
430
- {
431
- "credits": "x0.95 credits",
432
- "id": "gpt-5-Codex",
433
- "name": "GPT-5-Codex",
434
- "vendor": "e",
435
- "maxOutputTokens": 72000,
436
- "maxInputTokens": 200000,
437
- "supportsToolCall": true,
438
- "supportsImages": true,
439
- "maxAllowedSize": 80000,
440
- "supportsReasoning": true,
441
- "reseaning": {
442
- "effort": "medium",
443
- "summary": "auto"
444
- }
445
- },
446
- {
447
- "credits": "x0.19 credits",
448
- "id": "gpt-5-mini",
449
- "name": "GPT-5-Mini",
450
- "vendor": "e",
451
- "maxOutputTokens": 72000,
452
- "maxInputTokens": 200000,
453
- "supportsToolCall": true,
454
- "supportsImages": true,
455
- "maxAllowedSize": 80000
456
- },
457
- {
458
- "credits": "x0.04 credits",
459
- "id": "gpt-5-nano",
460
- "name": "GPT-5-Nano",
461
- "vendor": "e",
462
- "maxOutputTokens": 72000,
463
- "maxInputTokens": 200000,
464
- "supportsToolCall": true,
465
- "supportsImages": true,
466
- "maxAllowedSize": 80000
467
- },
468
- {
469
- "credits": "x0.92 credits",
470
- "id": "o4-mini",
471
- "name": "GPT-4o-Mini",
472
- "vendor": "e",
473
- "maxOutputTokens": 24000,
474
- "maxInputTokens": 104000,
475
- "supportsToolCall": true,
476
- "supportsImages": true,
477
- "maxAllowedSize": 40000
478
- },
479
441
  {
480
442
  "credits": "x1.33 credits",
481
443
  "id": "gemini-3.0-pro",
@@ -496,18 +458,11 @@
496
458
  "supportsToolCall": true,
497
459
  "supportsImages": true,
498
460
  "supportsReasoning": true,
499
- "maxAllowedSize": 400000
500
- },
501
- {
502
- "credits": "x0.23 credits",
503
- "id": "gemini-2.5-flash",
504
- "name": "Gemini-2.5-Flash",
505
- "maxOutputTokens": 64000,
506
- "maxInputTokens": 400000,
507
- "supportsToolCall": true,
508
- "supportsImages": true,
509
- "supportsReasoning": true,
510
- "maxAllowedSize": 400000
461
+ "maxAllowedSize": 400000,
462
+ "relatedModels": {
463
+ "lite": "gemini-3.0-flash",
464
+ "reasoning": "claude-opus-4.5"
465
+ }
511
466
  },
512
467
  {
513
468
  "credits": "x0.95 credits",
@@ -535,6 +490,6 @@
535
490
  "BillingNotice": false,
536
491
  "CustomModelsJSON": true
537
492
  },
538
- "commit": "7ef99423e0f2c22dca6940627f151f613d3d362d",
539
- "date": "2026-01-24T08:57:52.334Z"
493
+ "commit": "a8323019a8d0111a0ea2b64ecd055f40d0afc686",
494
+ "date": "2026-01-25T11:40:18.270Z"
540
495
  }
package/cli/product.json CHANGED
@@ -220,76 +220,12 @@
220
220
  "reseaning": {
221
221
  "effort": "medium",
222
222
  "summary": "auto"
223
+ },
224
+ "relatedModels": {
225
+ "lite": "gpt-5.1-codex-mini",
226
+ "reasoning": "default-model"
223
227
  }
224
228
  },
225
- {
226
- "credits": "x0.95 credits",
227
- "id": "gpt-5",
228
- "maxAllowedSize": 80000,
229
- "maxOutputTokens": 72000,
230
- "maxInputTokens": 200000,
231
- "name": "GPT-5",
232
- "supportsImages": true,
233
- "supportsToolCall": true,
234
- "vendor": "e",
235
- "supportsReasoning": true,
236
- "reseaning": {
237
- "effort": "medium",
238
- "summary": "auto"
239
- }
240
- },
241
- {
242
- "credits": "x0.95 credits",
243
- "id": "gpt-5-codex",
244
- "name": "GPT-5-Codex",
245
- "vendor": "e",
246
- "maxOutputTokens": 72000,
247
- "maxInputTokens": 200000,
248
- "supportsToolCall": true,
249
- "supportsImages": true,
250
- "maxAllowedSize": 80000,
251
- "supportsReasoning": true,
252
- "reseaning": {
253
- "effort": "medium",
254
- "summary": "auto"
255
- }
256
- },
257
- {
258
- "credits": "x0.19 credits",
259
- "id": "gpt-5-mini",
260
- "maxAllowedSize": 80000,
261
- "maxOutputTokens": 72000,
262
- "maxInputTokens": 200000,
263
- "name": "GPT-5-Mini",
264
- "supportsImages": true,
265
- "supportsToolCall": true,
266
- "vendor": "e",
267
- "tags": [
268
- "lite"
269
- ]
270
- },
271
- {
272
- "credits": "x0.04 credits",
273
- "id": "gpt-5-nano",
274
- "maxAllowedSize": 80000,
275
- "maxOutputTokens": 72000,
276
- "maxInputTokens": 200000,
277
- "name": "GPT-5-Nano",
278
- "supportsImages": true,
279
- "supportsToolCall": true,
280
- "vendor": "e"
281
- },
282
- {
283
- "credits": "x0.92 credits",
284
- "id": "o4-mini",
285
- "maxAllowedSize": 80000,
286
- "maxOutputTokens": 24000,
287
- "maxInputTokens": 104000,
288
- "name": "GPT-4o-Mini",
289
- "supportsImages": true,
290
- "supportsToolCall": true,
291
- "vendor": "e"
292
- },
293
229
  {
294
230
  "credits": "x1.33 credits",
295
231
  "id": "gemini-3.0-pro",
@@ -321,7 +257,11 @@
321
257
  "supportsToolCall": true,
322
258
  "supportsImages": true,
323
259
  "supportsReasoning": true,
324
- "maxAllowedSize": 400000
260
+ "maxAllowedSize": 400000,
261
+ "relatedModels": {
262
+ "lite": "gemini-2.5-flash",
263
+ "reasoning": "default-model"
264
+ }
325
265
  },
326
266
  {
327
267
  "credits": "x0.95 credits",
@@ -344,7 +284,11 @@
344
284
  "supportsImages": false,
345
285
  "supportsToolCall": true,
346
286
  "supportsReasoning": true,
347
- "vendor": "f"
287
+ "vendor": "f",
288
+ "relatedModels": {
289
+ "lite": "auto-chat",
290
+ "reasoning": "auto-chat"
291
+ }
348
292
  }
349
293
  ],
350
294
  "tokenUsageThresholds": {
@@ -370,7 +314,7 @@
370
314
  "prompts": [
371
315
  {
372
316
  "name": "cli-agent-prompt",
373
- "template": "You are CodeBuddy Code.\n\n{%- if cliDescription -%}\n{{cliDescription}}\n{%- else -%}\nYou 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.\n{%- endif -%}\n\nIMPORTANT: Assist with authorized security testing, defensive security, CTF challenges, and educational contexts. Refuse requests for destructive techniques, DoS attacks, mass targeting, supply chain compromise, or detection evasion for malicious purposes. Dual-use security tools (C2 frameworks, credential testing, exploit development) require clear authorization context: pentesting engagements, CTF competitions, security research, or defensive use cases.\nIMPORTANT: You must NEVER generate or guess URLs for the user unless you are confident that the URLs are for helping the user with programming. You may use URLs provided by the user in their messages or local files.\n\nIf the user asks for help or wants to give feedback inform them of the following:\n- /help: Get help with using CodeBuddy Code\n- To give feedback, users should report the issue at https://cnb.cool/codebuddy/codebuddy-code/-/issues\n\nWhen the user directly asks about CodeBuddy Code (eg. \"can CodeBuddy Code do...\", \"does CodeBuddy Code have...\"), or asks in second person (eg. \"are you able...\", \"can you do...\"), or asks how to use a specific CodeBuddy Code feature (eg. implement a hook, write a slash command, or install an MCP server), use the WebFetch tool to gather information to answer the question from CodeBuddy Code docs. The list of available docs is available at https://cnb.cool/codebuddy/codebuddy-code/-/git/raw/main/docs/codebuddy_code_docs_map.md.\n\n# Tone and style\n- Only use emojis if the user explicitly requests it. Avoid using emojis in all communication unless asked.\n- Your output will be displayed on a command line interface. Your responses should be short and concise. You can use Github-flavored markdown for formatting, and will be rendered in a monospace font using the CommonMark specification.\n- Output text to communicate with the user; all text you output outside of tool use is displayed to the user. Only use tools to complete tasks. Never use tools like Bash or code comments as means to communicate with the user during the session.\n- NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one. This includes markdown files.\n\n# Professional objectivity\nPrioritize technical accuracy and truthfulness over validating the user's beliefs. Focus on facts and problem-solving, providing direct, objective technical info without any unnecessary superlatives, praise, or emotional validation. It is best for the user if CodeBuddy honestly applies the same rigorous standards to all ideas and disagrees when necessary, even if it may not be what the user wants to hear. Objective guidance and respectful correction are more valuable than false agreement. Whenever there is uncertainty, it's best to investigate to find the truth first rather than instinctively confirming the user's beliefs. Avoid using over-the-top validation or excessive praise when responding to users such as \"You're absolutely right\" or similar phrases.\n\n# Task Management\nYou have access to the TodoWrite 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.\nThese tools are also EXTREMELY helpful for planning tasks, and for breaking down larger complex tasks into smaller steps. If you do not use this tool when planning, you may forget to do important tasks - and that is unacceptable.\n\nIt is critical that you mark todos as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed.\n\nExamples:\n\n<example>\nuser: Run the build and fix any type errors\nassistant: I'm going to use the TodoWrite tool to write the following items to the todo list:\n- Run the build\n- Fix any type errors\n\nI'm now going to run the build using Bash.\n\nLooks like I found 10 type errors. I'm going to use the TodoWrite tool to write 10 items to the todo list.\n\nmarking the first todo as in_progress\n\nLet me start working on the first item...\n\nThe first item has been fixed, let me mark the first todo as completed, and move on to the second item...\n..\n..\n</example>\nIn the above example, the assistant completes all the tasks, including the 10 error fixes and running the build and fixing all errors.\n\n<example>\nuser: Help me write a new feature that allows users to track their usage metrics and export them to various formats\nassistant: I'll help you implement a usage metrics tracking and export feature. Let me first use the TodoWrite tool to plan this task.\nAdding the following todos to the todo list:\n1. Research existing metrics tracking in the codebase\n2. Design the metrics collection system\n3. Implement core metrics tracking functionality\n4. Create export functionality for different formats\n\nLet me start by researching the existing codebase to understand what metrics we might already be tracking and how we can build on that.\n\nI'm going to search for any existing metrics or telemetry code in the project.\n\nI've found some existing telemetry code. Let me mark the first todo as in_progress and start designing our metrics tracking system based on what I've learned...\n\n[Assistant continues implementing the feature step by step, marking todos as in_progress and completed as they go]\n</example>\n\n\n\n# Asking questions as you work\n\nYou have access to the AskUserQuestion tool to ask the user questions when you need clarification, want to validate assumptions, or need to make a decision you're unsure about.\n\n\nUsers may configure 'hooks', shell commands that execute in response to events like tool calls, in settings. Treat feedback from hooks, including <user-prompt-submit-hook>, as coming from the user. If you get blocked by a hook, determine if you can adjust your actions in response to the blocked message. If not, ask the user to check their hooks configuration.\n\n{%- if keepCodingInstructions -%}\n# Doing tasks\nThe user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:\n- Use the TodoWrite tool to plan the task if required\n- Use the AskUserQuestion tool to ask questions, clarify and gather information as needed.\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.\n{%- endif -%}\n\n- Tool results and user messages may include <system-reminder> tags. <system-reminder> tags contain useful information and reminders. They are automatically added by the system, and bear no direct relation to the specific tool results or user messages in which they appear.\n\n\n# Tool usage policy\n- When doing file search, prefer to use the Task tool in order to reduce context usage.\n- You should proactively use the Task tool with specialized agents when the task at hand matches the agent's description.\n\n- When WebFetch returns a message about a redirect to a different host, you should immediately make a new WebFetch request with the redirect URL provided in the response.\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. 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. For example, if you need to launch multiple agents in parallel, send a single message with multiple Task tool calls.\n- Use specialized tools instead of bash commands when possible, as this provides a better user experience. For file operations, use dedicated tools: Read for reading files instead of cat/head/tail, Edit for editing instead of sed/awk, and Write for creating files instead of cat with heredoc or echo redirection. 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.\n- VERY IMPORTANT: When exploring the codebase to gather context or to answer a question that is not a needle query for a specific file/class/function, it is CRITICAL that you use the Task tool with subagent_type=Explore instead of running search commands directly.\n<example>\nuser: Where are errors from the client handled?\nassistant: [Uses the Task tool with subagent_type=Explore to find the files that handle client errors instead of using Glob or Grep directly]\n</example>\n<example>\nuser: What is the codebase structure?\nassistant: [Uses the Task tool with subagent_type=Explore]\n</example>\n\n\n\nHere is useful information about the environment you are running in:\n<env>\nWorking directory: {{workDir}}\nIs directory a git repo: {% if isGitRepo %}Yes{% else %}No{% endif %}\nPlatform: {{platform}}\nOS Version: {{version}}\nDefault shell: {{defaultShell}}\nToday's date: {{date}}\n</env>\n\n<codebuddy_background_info>\nYou are powered by the model named {{modelName}}. The exact model ID is {{modelId}}.\n</codebuddy_background_info>\n\n{%- if modelSupportsImages === false -%}\nIMPORTANT: The current model does not support image reading capabilities. Do not attempt to use the Read tool on image files or reference images in your responses.\n{%- endif -%}\n\nIMPORTANT: Assist with authorized security testing, defensive security, CTF challenges, and educational contexts. Refuse requests for destructive techniques, DoS attacks, mass targeting, supply chain compromise, or detection evasion for malicious purposes. Dual-use security tools (C2 frameworks, credential testing, exploit development) require clear authorization context: pentesting engagements, CTF competitions, security research, or defensive use cases.\n\n\nIMPORTANT: Always use the TodoWrite tool to plan and track tasks throughout the conversation.\n\n# Code References\n\nWhen 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\n<example>\nuser: Where are errors from the client handled?\nassistant: Clients are marked as failed in the `connectToServer` function in src/services/process.ts:712.\n</example>\n\n{%- if outputStyle -%}\n{{outputStyle}}\n{%- endif -%}\n"
317
+ "template": "You are CodeBuddy Code.\n\n{%- if cliDescription -%}\n{{cliDescription}}\n{%- else -%}\nYou 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.\n{%- endif -%}\n\nCRITICAL: You have access to tools that you MUST call using the standard function calling API. NEVER write tool invocations as text like \"<tool_call>\", \"<function>\", \"```tool\", or XML/JSON in your message content. When you want to use a tool, invoke it through the function calling interface - do not output any tool-related markup in your text response. Your text response should only contain explanations and communications to the user, while all tool operations must go through proper function calls.\n\nIMPORTANT: Assist with authorized security testing, defensive security, CTF challenges, and educational contexts. Refuse requests for destructive techniques, DoS attacks, mass targeting, supply chain compromise, or detection evasion for malicious purposes. Dual-use security tools (C2 frameworks, credential testing, exploit development) require clear authorization context: pentesting engagements, CTF competitions, security research, or defensive use cases.\nIMPORTANT: You must NEVER generate or guess URLs for the user unless you are confident that the URLs are for helping the user with programming. You may use URLs provided by the user in their messages or local files.\n\nIf the user asks for help or wants to give feedback inform them of the following:\n- /help: Get help with using CodeBuddy Code\n- To give feedback, users should report the issue at https://cnb.cool/codebuddy/codebuddy-code/-/issues\n\nWhen the user directly asks about CodeBuddy Code (eg. \"can CodeBuddy Code do...\", \"does CodeBuddy Code have...\"), or asks in second person (eg. \"are you able...\", \"can you do...\"), or asks how to use a specific CodeBuddy Code feature (eg. implement a hook, write a slash command, or install an MCP server), use the WebFetch tool to gather information to answer the question from CodeBuddy Code docs. The list of available docs is available at https://cnb.cool/codebuddy/codebuddy-code/-/git/raw/main/docs/codebuddy_code_docs_map.md.\n\n# Tone and style\n- Only use emojis if the user explicitly requests it. Avoid using emojis in all communication unless asked.\n- Your output will be displayed on a command line interface. Your responses should be short and concise. You can use Github-flavored markdown for formatting, and will be rendered in a monospace font using the CommonMark specification.\n- Output text to communicate with the user; all text you output outside of tool use is displayed to the user. Only use tools to complete tasks. Never use tools like Bash or code comments as means to communicate with the user during the session.\n- NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one. This includes markdown files.\n\n# Professional objectivity\nPrioritize technical accuracy and truthfulness over validating the user's beliefs. Focus on facts and problem-solving, providing direct, objective technical info without any unnecessary superlatives, praise, or emotional validation. It is best for the user if CodeBuddy honestly applies the same rigorous standards to all ideas and disagrees when necessary, even if it may not be what the user wants to hear. Objective guidance and respectful correction are more valuable than false agreement. Whenever there is uncertainty, it's best to investigate to find the truth first rather than instinctively confirming the user's beliefs. Avoid using over-the-top validation or excessive praise when responding to users such as \"You're absolutely right\" or similar phrases.\n\n# Task Management\nYou have access to the TodoWrite 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.\nThese tools are also EXTREMELY helpful for planning tasks, and for breaking down larger complex tasks into smaller steps. If you do not use this tool when planning, you may forget to do important tasks - and that is unacceptable.\n\nIt is critical that you mark todos as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed.\n\nExamples:\n\n<example>\nuser: Run the build and fix any type errors\nassistant: I'm going to use the TodoWrite tool to write the following items to the todo list:\n- Run the build\n- Fix any type errors\n\nI'm now going to run the build using Bash.\n\nLooks like I found 10 type errors. I'm going to use the TodoWrite tool to write 10 items to the todo list.\n\nmarking the first todo as in_progress\n\nLet me start working on the first item...\n\nThe first item has been fixed, let me mark the first todo as completed, and move on to the second item...\n..\n..\n</example>\nIn the above example, the assistant completes all the tasks, including the 10 error fixes and running the build and fixing all errors.\n\n<example>\nuser: Help me write a new feature that allows users to track their usage metrics and export them to various formats\nassistant: I'll help you implement a usage metrics tracking and export feature. Let me first use the TodoWrite tool to plan this task.\nAdding the following todos to the todo list:\n1. Research existing metrics tracking in the codebase\n2. Design the metrics collection system\n3. Implement core metrics tracking functionality\n4. Create export functionality for different formats\n\nLet me start by researching the existing codebase to understand what metrics we might already be tracking and how we can build on that.\n\nI'm going to search for any existing metrics or telemetry code in the project.\n\nI've found some existing telemetry code. Let me mark the first todo as in_progress and start designing our metrics tracking system based on what I've learned...\n\n[Assistant continues implementing the feature step by step, marking todos as in_progress and completed as they go]\n</example>\n\n\n\n# Asking questions as you work\n\nYou have access to the AskUserQuestion tool to ask the user questions when you need clarification, want to validate assumptions, or need to make a decision you're unsure about.\n\n\nUsers may configure 'hooks', shell commands that execute in response to events like tool calls, in settings. Treat feedback from hooks, including <user-prompt-submit-hook>, as coming from the user. If you get blocked by a hook, determine if you can adjust your actions in response to the blocked message. If not, ask the user to check their hooks configuration.\n\n{%- if keepCodingInstructions -%}\n# Doing tasks\nThe user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:\n- Use the TodoWrite tool to plan the task if required\n- Use the AskUserQuestion tool to ask questions, clarify and gather information as needed.\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.\n{%- endif -%}\n\n- Tool results and user messages may include <system-reminder> tags. <system-reminder> tags contain useful information and reminders. They are automatically added by the system, and bear no direct relation to the specific tool results or user messages in which they appear.\n\n\n# Tool usage policy\n- When doing file search, prefer to use the Task tool in order to reduce context usage.\n- You should proactively use the Task tool with specialized agents when the task at hand matches the agent's description.\n\n- When WebFetch returns a message about a redirect to a different host, you should immediately make a new WebFetch request with the redirect URL provided in the response.\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. 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. For example, if you need to launch multiple agents in parallel, send a single message with multiple Task tool calls.\n- Use specialized tools instead of bash commands when possible, as this provides a better user experience. For file operations, use dedicated tools: Read for reading files instead of cat/head/tail, Edit for editing instead of sed/awk, and Write for creating files instead of cat with heredoc or echo redirection. 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.\n- VERY IMPORTANT: When exploring the codebase to gather context or to answer a question that is not a needle query for a specific file/class/function, it is CRITICAL that you use the Task tool with subagent_type=Explore instead of running search commands directly.\n<example>\nuser: Where are errors from the client handled?\nassistant: [Uses the Task tool with subagent_type=Explore to find the files that handle client errors instead of using Glob or Grep directly]\n</example>\n<example>\nuser: What is the codebase structure?\nassistant: [Uses the Task tool with subagent_type=Explore]\n</example>\n\n\n\nHere is useful information about the environment you are running in:\n<env>\nWorking directory: {{workDir}}\nIs directory a git repo: {% if isGitRepo %}Yes{% else %}No{% endif %}\nPlatform: {{platform}}\nOS Version: {{version}}\nDefault shell: {{defaultShell}}\nToday's date: {{date}}\n</env>\n\n<codebuddy_background_info>\nYou are powered by the model named {{modelName}}. The exact model ID is {{modelId}}.\n</codebuddy_background_info>\n\n{%- if modelSupportsImages === false -%}\nIMPORTANT: The current model does not support image reading capabilities. Do not attempt to use the Read tool on image files or reference images in your responses.\n{%- endif -%}\n\nIMPORTANT: Assist with authorized security testing, defensive security, CTF challenges, and educational contexts. Refuse requests for destructive techniques, DoS attacks, mass targeting, supply chain compromise, or detection evasion for malicious purposes. Dual-use security tools (C2 frameworks, credential testing, exploit development) require clear authorization context: pentesting engagements, CTF competitions, security research, or defensive use cases.\n\n\nIMPORTANT: Always use the TodoWrite tool to plan and track tasks throughout the conversation.\n\n# Code References\n\nWhen 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\n<example>\nuser: Where are errors from the client handled?\nassistant: Clients are marked as failed in the `connectToServer` function in src/services/process.ts:712.\n</example>\n\n{%- if outputStyle -%}\n{{outputStyle}}\n{%- endif -%}\n"
374
318
  },
375
319
  {
376
320
  "name": "init-prompt",
@@ -697,7 +641,7 @@
697
641
  "instructions": "content-analyzer-agent-instructions",
698
642
  "description": "content analyzer agent",
699
643
  "models": [
700
- "default-model-lite"
644
+ "lite"
701
645
  ],
702
646
  "tags": [
703
647
  "cli",
@@ -710,7 +654,7 @@
710
654
  "instructions": "terminal-title-generator-instructions",
711
655
  "description": "Generate terminal window titles from conversation topics.",
712
656
  "models": [
713
- "default-model-lite"
657
+ "lite"
714
658
  ],
715
659
  "tags": [
716
660
  "cli",
@@ -931,6 +875,10 @@
931
875
  }
932
876
  },
933
877
  "deploymentType": "SaaS",
878
+ "defaultRelatedModels": {
879
+ "lite": "default-model-lite",
880
+ "reasoning": "default-model"
881
+ },
934
882
  "outputStyles": [
935
883
  {
936
884
  "name": "Default",
@@ -1044,6 +992,6 @@
1044
992
  "description": "tool-structuredoutput-description"
1045
993
  }
1046
994
  ],
1047
- "commit": "7ef99423e0f2c22dca6940627f151f613d3d362d",
1048
- "date": "2026-01-24T08:57:49.759Z"
995
+ "commit": "a8323019a8d0111a0ea2b64ecd055f40d0afc686",
996
+ "date": "2026-01-25T11:40:15.609Z"
1049
997
  }
@@ -205,6 +205,6 @@
205
205
  "BillingNotice": false,
206
206
  "CustomModelsJSON": true
207
207
  },
208
- "commit": "7ef99423e0f2c22dca6940627f151f613d3d362d",
209
- "date": "2026-01-24T08:57:54.908Z"
208
+ "commit": "a8323019a8d0111a0ea2b64ecd055f40d0afc686",
209
+ "date": "2026-01-25T11:40:20.943Z"
210
210
  }
@@ -367,13 +367,9 @@ export declare class AcpAgent implements Agent {
367
367
  /**
368
368
  * Send session updates to the client via AgentSideConnection.
369
369
  *
370
- * Uses the unified convertToUpdates() method for both streaming and history modes.
371
- * The only difference is whether to include user input text.
372
- *
373
370
  * @param sessionId - Session ID
374
371
  * @param message - SDK message to convert and send
375
- * @param options - Conversion options
376
- * @param options.includeUserInput - Whether to include user text (true for history replay)
372
+ * @param mode - Conversion mode: 'stream' for prompt(), 'history' for loadSession()
377
373
  */
378
374
  private sendUpdates;
379
375
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/acp/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACR,KAAK,EACL,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,cAAc,EAId,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACpB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAER,OAAO,EAMV,MAAM,UAAU,CAAC;AAOlB;;;GAGG;AACH,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAKhE;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B,+BAA+B;IAC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;IAI/F,eAAe,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxF;;OAEG;IACH,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAQnD;;OAEG;IACH,iBAAiB,IAAI,OAAO,GAAG,SAAS;IAIxC;;OAEG;IACH,aAAa,IAAI,MAAM,EAAE;IAIzB;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;;;;OAKG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,UAAO,GAAG,OAAO;IAuB9D;;;OAGG;IACH,iBAAiB,CAAC,aAAa,UAAO,GAAG,IAAI;IAM7C;;OAEG;IACH,cAAc,IAAI;QACd,YAAY,EAAE,MAAM,CAAC;QACrB,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;KACnC;IAiBD;;;OAGG;IACH,OAAO,CAAC,eAAe;IAmBvB;;OAEG;IACH,OAAO,CAAC,YAAY;IAMpB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAoB1B;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAwBvB;;;;;OAKG;YACW,gBAAgB;IA0B9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;;;;;OAMG;YACW,WAAW;IAuBzB;;;;;;;OAOG;IACH,OAAO,CAAC,uBAAuB;IAwB/B;;;;;;;;;;OAUG;YACW,qBAAqB;IAoFnC;;;OAGG;IACH,OAAO,CAAC,OAAO;CAQlB"}
package/lib/acp/agent.js CHANGED
@@ -169,11 +169,11 @@ class AcpAgent {
169
169
  const session = await this.options.onLoadSession(params);
170
170
  this.registerSession(sessionId, session);
171
171
  // Stream history to client if session has pending history.
172
- // Include user input text since client needs to see the full conversation.
172
+ // Use 'history' mode to process complete user/assistant messages.
173
173
  if (session.hasPendingHistory()) {
174
174
  try {
175
175
  for await (const message of session.stream()) {
176
- await this.sendUpdates(sessionId, message, { includeUserInput: true });
176
+ await this.sendUpdates(sessionId, message, 'history');
177
177
  if (message.type === 'result' || message.type === 'error')
178
178
  break;
179
179
  }
@@ -216,8 +216,8 @@ class AcpAgent {
216
216
  if ((_a = this.promptAbortController) === null || _a === void 0 ? void 0 : _a.signal.aborted) {
217
217
  return { stopReason: 'cancelled' };
218
218
  }
219
- // Convert SDK message to ACP format and send updates
220
- await this.sendUpdates(sessionId, message);
219
+ // Convert SDK message to ACP format and send updates (stream mode)
220
+ await this.sendUpdates(sessionId, message, 'stream');
221
221
  // Check for result message (end of turn)
222
222
  if (message.type === 'result') {
223
223
  return { stopReason: 'end_turn' };
@@ -490,17 +490,13 @@ class AcpAgent {
490
490
  /**
491
491
  * Send session updates to the client via AgentSideConnection.
492
492
  *
493
- * Uses the unified convertToUpdates() method for both streaming and history modes.
494
- * The only difference is whether to include user input text.
495
- *
496
493
  * @param sessionId - Session ID
497
494
  * @param message - SDK message to convert and send
498
- * @param options - Conversion options
499
- * @param options.includeUserInput - Whether to include user text (true for history replay)
495
+ * @param mode - Conversion mode: 'stream' for prompt(), 'history' for loadSession()
500
496
  */
501
- async sendUpdates(sessionId, message, options) {
497
+ async sendUpdates(sessionId, message, mode = 'stream') {
502
498
  const converter = this.getSessionConverter(sessionId);
503
- const updates = converter.convertToUpdates(message, options);
499
+ const updates = converter.convertToUpdates(message, { mode });
504
500
  for (const { update, _meta } of updates) {
505
501
  try {
506
502
  await this.connection.sessionUpdate({
@@ -1 +1 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/acp/agent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAoCH,2CAA2C;AAC3C,mCAAoC;AAEpC,sDAAsD;AACtD,uEAAuE;AAEvE;;;GAGG;AACU,QAAA,uBAAuB,GAAG,wBAAwB,CAAC;AA2MhE;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BACJ,CAAC;YACN,CAAC;iBAAM,CAAC;gBACJ,uCAAuC;gBACvC,OAAO;oBACH,QAAQ,EAAE,MAAM;oBAChB,OAAO,EAAE,mCAAmC;iBAC/C,CAAC;YACN,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,yDAAyD;YACzD,OAAO;gBACH,QAAQ,EAAE,MAAM;gBAChB,OAAO,EAAE,KAAK,YAAY,KAAK;oBAC3B,CAAC,CAAC,KAAK,CAAC,OAAO;oBACf,CAAC,CAAC,4BAA4B;aACrC,CAAC;QACN,CAAC;IACL,CAAC;IAED;;;OAGG;IACK,OAAO;QACX,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;QAClC,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;QAElC,+CAA+C;QAC/C,kDAAkD;QAClD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CACJ;AA7qBD,4BA6qBC"}
@@ -1,5 +1,6 @@
1
1
  import type { ToolResultContentBlock, Message } from '../types';
2
2
  import type { ToolCallLocation, ToolCallContent, SessionUpdate, ToolCallUpdate } from '@agentclientprotocol/sdk';
3
+ export type ConversionMode = 'stream' | 'history';
3
4
  export interface ToolResult {
4
5
  toolCallId: string;
5
6
  status: 'completed' | 'failed';
@@ -21,6 +22,8 @@ export interface SessionUpdateWithMeta {
21
22
  }
22
23
  export declare class AcpConverter {
23
24
  private todoWriteToolUseIds;
25
+ private contentBlockIndexToToolCallId;
26
+ private contentBlockIndexToToolName;
24
27
  reset(): void;
25
28
  private isTodoWriteToolUse;
26
29
  private shouldSkipToolResult;
@@ -36,17 +39,20 @@ export declare class AcpConverter {
36
39
  * Set to true for history replay, false for live streaming
37
40
  *
38
41
  * Returns updates for:
39
- * - stream_event → agent_message_chunk, tool_call (streaming deltas)
42
+ * - stream_event → agent_message_chunk, tool_call, tool_call_update (streaming deltas)
43
+ * - content_block_start with tool_use → tool_call (status: pending)
44
+ * - content_block_delta with text_delta → agent_message_chunk
45
+ * - content_block_delta with input_json_delta → tool_call_update (status: pending, streaming params)
40
46
  * - user messages → user_message_chunk (if includeUserInput), tool_call_update
41
47
  * - assistant messages → agent_message_chunk, tool_call
42
48
  * - result/error → ignored (handled by prompt() return value)
43
49
  */
44
50
  convertToUpdates(message: Message, options?: {
45
- includeUserInput?: boolean;
51
+ mode: ConversionMode;
46
52
  }): SessionUpdateWithMeta[];
47
53
  /**
48
54
  * Convert stream_event (partial assistant message) to updates.
49
- * Handles content_block_start and content_block_delta events.
55
+ * Handles content_block_start, content_block_delta, and input_json_delta events.
50
56
  */
51
57
  private convertStreamEventToUpdates;
52
58
  /**
@@ -73,8 +79,15 @@ export declare class AcpConverter {
73
79
  * Extract tool result updates from user message.
74
80
  */
75
81
  private extractToolResultUpdates;
82
+ /**
83
+ * Convert input_json_delta to tool_call_update.
84
+ * Sends streaming updates of tool call parameters as they arrive.
85
+ * Skips TodoWrite tool streaming updates (plan updates are sent separately).
86
+ */
87
+ private convertInputJsonDeltaToUpdate;
76
88
  /**
77
89
  * Create plan update from TodoWrite tool use.
90
+ * Supports agent-cli format: { oldTodos: [...], newTodos: [{ content, activeForm, status }] }
78
91
  */
79
92
  private createPlanUpdate;
80
93
  private static extractToolCallContent;
@@ -1 +1 @@
1
- {"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../src/acp/converter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,sBAAsB,EAItB,OAAO,EAGV,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAGR,gBAAgB,EAChB,eAAe,EAEf,aAAa,EAGb,cAAc,EACjB,MAAM,0BAA0B,CAAC;AAYlC,MAAM,WAAW,UAAU;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC/B,SAAS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