@tencent-ai/codebuddy-code 1.16.0 → 1.17.0

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/lib/node/index.js CHANGED
@@ -20,6 +20,7 @@ export * from './git';
20
20
  export * from './memory';
21
21
  export * from './trace';
22
22
  export * from './settings';
23
+ export * from './status';
23
24
  export * from './mcp';
24
25
  export * from './update';
25
26
  export * from './client';
@@ -35,4 +36,5 @@ export * from './resume';
35
36
  export * from './tips';
36
37
  export * from './debug';
37
38
  export * from './sandbox';
39
+ export * from './hooks';
38
40
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencent-ai/codebuddy-code",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
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",
@@ -1,6 +1,4 @@
1
1
  {
2
- "endpoint": "https://copilot.tencent.com",
3
- "stagingEndpoint": "https://staging-copilot.tencent.com",
4
2
  "agents": [
5
3
  {
6
4
  "name": "cli",
@@ -12,7 +10,8 @@
12
10
  ],
13
11
  "commands": [
14
12
  "init",
15
- "compact"
13
+ "compact",
14
+ "statusline"
16
15
  ],
17
16
  "tools": [
18
17
  "Task",
@@ -103,6 +102,21 @@
103
102
  "cli",
104
103
  "agent-instructions"
105
104
  ]
105
+ },
106
+ {
107
+ "name": "statusline-setup",
108
+ "instructions": "agent-statusline-instructions",
109
+ "description": "Use this agent to configure the user's Codebuddy Code status line setting.",
110
+ "tools": [
111
+ "Read",
112
+ "Write",
113
+ "Edit"
114
+ ],
115
+ "asTool": true,
116
+ "tags": [
117
+ "cli",
118
+ "sub-agent"
119
+ ]
106
120
  }
107
121
  ],
108
122
  "models": [
@@ -156,6 +170,6 @@
156
170
  "productFeatures": {
157
171
  "BillingNotice": false
158
172
  },
159
- "commit": "2384ef79061722f86dee33efdf0826f4c65a41a2",
160
- "date": "2025-10-20T09:03:17.422Z"
173
+ "commit": "663c1e43bc5fea0838abe0621ad316e293e85b04",
174
+ "date": "2025-10-21T15:50:42.295Z"
161
175
  }
@@ -12,7 +12,8 @@
12
12
  ],
13
13
  "commands": [
14
14
  "init",
15
- "compact"
15
+ "compact",
16
+ "statusline"
16
17
  ],
17
18
  "tools": [
18
19
  "Task",
@@ -103,6 +104,21 @@
103
104
  "cli",
104
105
  "agent-instructions"
105
106
  ]
107
+ },
108
+ {
109
+ "name": "statusline-setup",
110
+ "instructions": "agent-statusline-instructions",
111
+ "description": "Use this agent to configure the user's Codebuddy Code status line setting.",
112
+ "tools": [
113
+ "Read",
114
+ "Write",
115
+ "Edit"
116
+ ],
117
+ "asTool": true,
118
+ "tags": [
119
+ "cli",
120
+ "sub-agent"
121
+ ]
106
122
  }
107
123
  ],
108
124
  "models": [
@@ -120,8 +136,8 @@
120
136
  "id": "deepseek-v3.1",
121
137
  "name": "DeepSeek-V3.1-Terminus",
122
138
  "vendor": "f",
123
- "maxOutputTokens": 8192,
124
- "maxInputTokens": 128000,
139
+ "maxOutputTokens": 24000,
140
+ "maxInputTokens": 104000,
125
141
  "supportsToolCall": true,
126
142
  "supportsImages": false,
127
143
  "disabledMultimodal": true,
@@ -156,6 +172,6 @@
156
172
  "productFeatures": {
157
173
  "BillingNotice": false
158
174
  },
159
- "commit": "2384ef79061722f86dee33efdf0826f4c65a41a2",
160
- "date": "2025-10-20T09:03:14.868Z"
175
+ "commit": "663c1e43bc5fea0838abe0621ad316e293e85b04",
176
+ "date": "2025-10-21T15:50:39.818Z"
161
177
  }
package/product.ioa.json CHANGED
@@ -20,7 +20,8 @@
20
20
  ],
21
21
  "commands": [
22
22
  "init",
23
- "compact"
23
+ "compact",
24
+ "statusline"
24
25
  ],
25
26
  "tools": [
26
27
  "Task",
@@ -114,6 +115,21 @@
114
115
  "cli",
115
116
  "agent-instructions"
116
117
  ]
118
+ },
119
+ {
120
+ "name": "statusline-setup",
121
+ "instructions": "agent-statusline-instructions",
122
+ "description": "Use this agent to configure the user's Codebuddy Code status line setting.",
123
+ "tools": [
124
+ "Read",
125
+ "Write",
126
+ "Edit"
127
+ ],
128
+ "asTool": true,
129
+ "tags": [
130
+ "cli",
131
+ "sub-agent"
132
+ ]
117
133
  }
118
134
  ],
119
135
  "models": [
@@ -122,8 +138,8 @@
122
138
  "id": "deepseek-v3.1",
123
139
  "name": "DeepSeek-V3.1-Terminus",
124
140
  "vendor": "f",
125
- "maxOutputTokens": 8192,
126
- "maxInputTokens": 128000,
141
+ "maxOutputTokens": 24000,
142
+ "maxInputTokens": 104000,
127
143
  "supportsToolCall": true,
128
144
  "supportsImages": false,
129
145
  "disabledMultimodal": true,
@@ -135,7 +151,7 @@
135
151
  "name": "Claude-4.0-Sonnet",
136
152
  "vendor": "e",
137
153
  "maxOutputTokens": 24000,
138
- "maxInputTokens": 200000,
154
+ "maxInputTokens": 176000,
139
155
  "supportsToolCall": true,
140
156
  "supportsImages": true,
141
157
  "maxAllowedSize": 80000,
@@ -148,7 +164,7 @@
148
164
  "name": "Claude-4.5-Sonnet",
149
165
  "vendor": "e",
150
166
  "maxOutputTokens": 24000,
151
- "maxInputTokens": 200000,
167
+ "maxInputTokens": 176000,
152
168
  "supportsToolCall": true,
153
169
  "supportsImages": true,
154
170
  "maxAllowedSize": 80000,
@@ -159,8 +175,8 @@
159
175
  "id": "gpt-5",
160
176
  "name": "GPT-5",
161
177
  "vendor": "e",
162
- "maxOutputTokens": 128000,
163
- "maxInputTokens": 272000,
178
+ "maxOutputTokens": 72000,
179
+ "maxInputTokens": 200000,
164
180
  "supportsToolCall": true,
165
181
  "supportsImages": true,
166
182
  "maxAllowedSize": 80000,
@@ -175,8 +191,8 @@
175
191
  "id": "gpt-5-codex",
176
192
  "name": "GPT-5-codex",
177
193
  "vendor": "e",
178
- "maxOutputTokens": 128000,
179
- "maxInputTokens": 400000,
194
+ "maxOutputTokens": 72000,
195
+ "maxInputTokens": 200000,
180
196
  "supportsToolCall": true,
181
197
  "supportsImages": true,
182
198
  "maxAllowedSize": 80000,
@@ -191,8 +207,8 @@
191
207
  "id": "gpt-5-mini",
192
208
  "name": "GPT-5-mini",
193
209
  "vendor": "e",
194
- "maxOutputTokens": 128000,
195
- "maxInputTokens": 272000,
210
+ "maxOutputTokens": 72000,
211
+ "maxInputTokens": 200000,
196
212
  "supportsToolCall": true,
197
213
  "supportsImages": true,
198
214
  "maxAllowedSize": 80000
@@ -202,8 +218,8 @@
202
218
  "id": "gpt-5-nano",
203
219
  "name": "GPT-5-nano",
204
220
  "vendor": "e",
205
- "maxOutputTokens": 128000,
206
- "maxInputTokens": 272000,
221
+ "maxOutputTokens": 72000,
222
+ "maxInputTokens": 200000,
207
223
  "supportsToolCall": true,
208
224
  "supportsImages": true,
209
225
  "maxAllowedSize": 80000
@@ -213,8 +229,8 @@
213
229
  "id": "o4-mini",
214
230
  "name": "GPT-4o-mini",
215
231
  "vendor": "e",
216
- "maxOutputTokens": 32000,
217
- "maxInputTokens": 200000,
232
+ "maxOutputTokens": 24000,
233
+ "maxInputTokens": 104000,
218
234
  "supportsToolCall": true,
219
235
  "supportsImages": true,
220
236
  "maxAllowedSize": 40000
@@ -253,8 +269,8 @@
253
269
  "credits": "x0.25 credits",
254
270
  "id": "gemini-2.5-flash",
255
271
  "name": "Gemini-2.5-Flash",
256
- "maxOutputTokens": 16384,
257
- "maxInputTokens": 1000000,
272
+ "maxOutputTokens": 64000,
273
+ "maxInputTokens": 200000,
258
274
  "supportsToolCall": true,
259
275
  "supportsImages": true,
260
276
  "maxAllowedSize": 80000
@@ -263,8 +279,8 @@
263
279
  "credits": "x1.05 credits",
264
280
  "id": "gemini-2.5-pro",
265
281
  "name": "Gemini-2.5-Pro",
266
- "maxOutputTokens": 16384,
267
- "maxInputTokens": 1000000,
282
+ "maxOutputTokens": 64000,
283
+ "maxInputTokens": 200000,
268
284
  "supportsToolCall": true,
269
285
  "supportsImages": true,
270
286
  "maxAllowedSize": 80000
@@ -287,6 +303,6 @@
287
303
  "productFeatures": {
288
304
  "BillingNotice": false
289
305
  },
290
- "commit": "2384ef79061722f86dee33efdf0826f4c65a41a2",
291
- "date": "2025-10-20T09:03:16.145Z"
306
+ "commit": "663c1e43bc5fea0838abe0621ad316e293e85b04",
307
+ "date": "2025-10-21T15:50:41.055Z"
292
308
  }
package/product.json CHANGED
@@ -103,8 +103,8 @@
103
103
  "credits": "x2.00 credits",
104
104
  "id": "default-model",
105
105
  "maxAllowedSize": 80000,
106
- "maxInputTokens": 200000,
107
106
  "maxOutputTokens": 24000,
107
+ "maxInputTokens": 176000,
108
108
  "name": "Default",
109
109
  "supportsImages": true,
110
110
  "supportsToolCall": true,
@@ -115,8 +115,8 @@
115
115
  "credits": "x0.87 credits",
116
116
  "id": "gpt-5",
117
117
  "maxAllowedSize": 80000,
118
- "maxInputTokens": 272000,
119
- "maxOutputTokens": 128000,
118
+ "maxOutputTokens": 72000,
119
+ "maxInputTokens": 200000,
120
120
  "name": "GPT-5",
121
121
  "supportsImages": true,
122
122
  "supportsToolCall": true,
@@ -132,8 +132,8 @@
132
132
  "id": "gpt-5-codex",
133
133
  "name": "GPT-5-codex",
134
134
  "vendor": "e",
135
- "maxOutputTokens": 128000,
136
- "maxInputTokens": 400000,
135
+ "maxOutputTokens": 72000,
136
+ "maxInputTokens": 200000,
137
137
  "supportsToolCall": true,
138
138
  "supportsImages": true,
139
139
  "maxAllowedSize": 80000,
@@ -147,8 +147,8 @@
147
147
  "credits": "x0.17 credits",
148
148
  "id": "gpt-5-mini",
149
149
  "maxAllowedSize": 80000,
150
- "maxInputTokens": 272000,
151
- "maxOutputTokens": 128000,
150
+ "maxOutputTokens": 72000,
151
+ "maxInputTokens": 200000,
152
152
  "name": "GPT-5-mini",
153
153
  "supportsImages": true,
154
154
  "supportsToolCall": true,
@@ -158,8 +158,8 @@
158
158
  "credits": "x0.03 credits",
159
159
  "id": "gpt-5-nano",
160
160
  "maxAllowedSize": 80000,
161
- "maxInputTokens": 272000,
162
- "maxOutputTokens": 128000,
161
+ "maxOutputTokens": 72000,
162
+ "maxInputTokens": 200000,
163
163
  "name": "GPT-5-nano",
164
164
  "supportsImages": true,
165
165
  "supportsToolCall": true,
@@ -169,8 +169,8 @@
169
169
  "credits": "x0.52 credits",
170
170
  "id": "o4-mini",
171
171
  "maxAllowedSize": 80000,
172
- "maxInputTokens": 200000,
173
- "maxOutputTokens": 32000,
172
+ "maxOutputTokens": 24000,
173
+ "maxInputTokens": 104000,
174
174
  "name": "GPT-4o-mini",
175
175
  "supportsImages": true,
176
176
  "supportsToolCall": true,
@@ -188,8 +188,8 @@
188
188
  "credits": "x0.25 credits",
189
189
  "id": "gemini-2.5-flash",
190
190
  "maxAllowedSize": 80000,
191
- "maxInputTokens": 1000000,
192
- "maxOutputTokens": 16384,
191
+ "maxOutputTokens": 64000,
192
+ "maxInputTokens": 200000,
193
193
  "name": "Gemini-2.5-Flash",
194
194
  "supportsImages": true,
195
195
  "supportsToolCall": true
@@ -198,8 +198,8 @@
198
198
  "credits": "x1.05 credits",
199
199
  "id": "gemini-2.5-pro",
200
200
  "maxAllowedSize": 80000,
201
- "maxInputTokens": 1000000,
202
- "maxOutputTokens": 16384,
201
+ "maxOutputTokens": 64000,
202
+ "maxInputTokens": 200000,
203
203
  "name": "Gemini-2.5-Pro",
204
204
  "supportsImages": true,
205
205
  "supportsToolCall": true
@@ -208,8 +208,8 @@
208
208
  "credits": "x0.01 credits",
209
209
  "disabledMultimodal": true,
210
210
  "id": "auto-chat",
211
- "maxInputTokens": 128000,
212
- "maxOutputTokens": 8192,
211
+ "maxOutputTokens": 24000,
212
+ "maxInputTokens": 104000,
213
213
  "name": "auto",
214
214
  "supportsImages": false,
215
215
  "supportsToolCall": true,
@@ -336,6 +336,14 @@
336
336
  {
337
337
  "name": "tool-slashcommand-description",
338
338
  "template": "Execute a slash command within the main conversation\n\n**IMPORTANT - Intent Matching:**\nBefore starting any task, CHECK if the user's request matches one of the slash commands listed below. This tool exists to route user intentions to specialized workflows.\n\nHow slash commands work:\nWhen you use this tool or when a user types a slash command, you will see <command-message>{name} is running…</command-message> followed by the expanded prompt. For example, if .claude/commands/foo.md contains \\\"Print today's date\\\", then /foo expands to that prompt in the next message.\n\nUsage:\n- `command` (required): The slash command to execute, including any arguments\n- Example: `command: \\\"/review-pr 123\\\"`\n\nIMPORTANT: Only use this tool for custom slash commands that appear in the Available Commands list below. Do NOT use for:\n- Built-in CLI commands (like /help, /clear, etc.)\n- Commands not shown in the list\n- Commands you think might exist but aren't listed\n\nAvailable Commands:\n{%- if commands and commands.length > 0 -%}\n{%- for command in commands -%}\n{%- if command.tags and command.tags.includes('custom') %}\n- {{command.name}} {{command.argumentHint}}: {{command.description}}\n{%- endif -%}\n{%- endfor -%}\n{%- endif %}\nNotes:\n- When a user requests multiple slash commands, execute each one sequentially and check for <command-message>{name} is running…</command-message> to verify each has been processed\n- Do not invoke a command that is already running. For example, if you see <command-message>foo is running…</command-message>, do NOT use this tool with \\\"/foo\\\" - process the expanded prompt in the following message\n- Only custom slash commands with descriptions are listed in Available Commands. If a user's command is not listed, ask them to check the slash command file and consult the docs.\n"
339
+ },
340
+ {
341
+ "name": "agent-statusline-instructions",
342
+ "template": "You are a status line setup agent for Codebuddy Code. Your job is to create or update the statusLine command in the user's Codebuddy Code settings.\n\nWhen asked to convert the user's shell PS1 configuration, follow these steps:\n1. Read the user's shell configuration files in this order of preference:\n - ~/.zshrc\n - ~/.bashrc \n - ~/.bash_profile\n - ~/.profile\n\n2. Extract the PS1 value using this regex pattern: /(?:^|\\\n)\\\\s*(?:export\\\\s+)?PS1\\\\s*=\\\\s*[\\\"']([^\\\"']+)[\\\"']/m\n\n3. Convert PS1 escape sequences to shell commands:\n - \\\\u → $(whoami)\n - \\\\h → $(hostname -s) \n - \\\\H → $(hostname)\n - \\\\w → $(pwd)\n - \\\\W → $(basename \\\"$(pwd)\\\")\n - \\\\$ → $\n - \\\n → \\\n\n - \\\\t → $(date +%H:%M:%S)\n - \\\\d → $(date \\\"+%a %b %d\\\")\n - \\\\@ → $(date +%I:%M%p)\n - \\\\# → #\n - \\\\! → !\n\n4. When using ANSI color codes, be sure to use `printf`. Do not remove colors. Note that the status line will be printed in a terminal using dimmed colors.\n\n5. If the imported PS1 would have trailing \\\"$\\\" or \\\">\\\" characters in the output, you MUST remove them.\n\n6. If no PS1 is found and user did not provide other instructions, ask for further instructions.\n\nHow to use the statusLine command:\n1. The statusLine command will receive the following JSON input via stdin:\n {\n \\\"session_id\\\": \\\"string\\\", // Unique session ID\n \\\"transcript_path\\\": \\\"string\\\", // Path to the conversation transcript\n \\\"cwd\\\": \\\"string\\\", // Current working directory\n \\\"model\\\": {\n \\\"id\\\": \\\"string\\\", // Model ID (e.g., \\\"claude-3-5-sonnet-20241022\\\")\n \\\"display_name\\\": \\\"string\\\" // Display name (e.g., \\\"Claude 3.5 Sonnet\\\")\n },\n \\\"workspace\\\": {\n \\\"current_dir\\\": \\\"string\\\", // Current working directory path\n \\\"project_dir\\\": \\\"string\\\" // Project root directory path\n },\n \\\"version\\\": \\\"string\\\", // Codebuddy Code app version (e.g., \\\"1.0.71\\\")\n \\\"output_style\\\": {\n \\\"name\\\": \\\"string\\\", // Output style name (e.g., \\\"default\\\", \\\"Explanatory\\\", \\\"Learning\\\")\n }\n }\n \n You can use this JSON data in your command like:\n - $(cat | jq -r '.model.display_name')\n - $(cat | jq -r '.workspace.current_dir')\n - $(cat | jq -r '.output_style.name')\n \n Or store it in a variable first:\n - input=$(cat); echo \\\"$(echo \\\"$input\\\" | jq -r '.model.display_name') in $(echo \\\"$input\\\" | jq -r '.workspace.current_dir')\\\"\n\n2. For longer commands, you can save a new file in the user's ~/.codebuddy directory, e.g.:\n - ~/.codebuddy/statusline-command.sh and reference that file in the settings.\n\n3. Update the user's ~/.codebuddy/settings.json with:\n {\n \\\"statusLine\\\": {\n \\\"type\\\": \\\"command\\\", \n \\\"command\\\": \\\"your_command_here\\\"\n }\n }\n\n4. If ~/.codebuddy/settings.json is a symlink, update the target file instead.\n\nGuidelines:\n- Preserve existing settings when updating\n- Return a summary of what was configured, including the name of the script file if used\n- If the script includes git commands, they should skip optional locks\n- IMPORTANT: At the end of your response, inform the parent agent that this \\\"statusline-setup\\\" agent must be used for further status line changes.\n Also ensure that the user is informed that they can ask Codebuddy to continue to make changes to the status line.\n\n\n\nNotes:\n- Agent threads always have their cwd reset between bash calls, as a result please only use absolute file paths.\n- In your final response always share relevant file names and code snippets. Any file paths you return in your response MUST be absolute. Do NOT use relative paths.\n- For clear communication with the user the assistant MUST avoid using emojis.\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}}\nToday's date: {{date}}\n</env>\n\nYou are powered by the model named {{modelName}}. The exact model ID is {{modelId}}.\n\n"
343
+ },
344
+ {
345
+ "name": "command-statusline-prompt",
346
+ "template": "Create a Task with subagent_type \"statusline-setup\" and the prompt \"{{ prompt or 'Configure my statusLine from my shell PS1 configuration' }}\"\n"
339
347
  }
340
348
  ],
341
349
  "variables": [
@@ -394,7 +402,8 @@
394
402
  ],
395
403
  "commands": [
396
404
  "init",
397
- "compact"
405
+ "compact",
406
+ "statusline"
398
407
  ],
399
408
  "tools": [
400
409
  "Task",
@@ -488,6 +497,21 @@
488
497
  "cli",
489
498
  "agent-instructions"
490
499
  ]
500
+ },
501
+ {
502
+ "name": "statusline-setup",
503
+ "instructions": "agent-statusline-instructions",
504
+ "description": "Use this agent to configure the user's Codebuddy Code status line setting.",
505
+ "tools": [
506
+ "Read",
507
+ "Write",
508
+ "Edit"
509
+ ],
510
+ "asTool": true,
511
+ "tags": [
512
+ "cli",
513
+ "sub-agent"
514
+ ]
491
515
  }
492
516
  ],
493
517
  "commands": [
@@ -507,6 +531,11 @@
507
531
  {
508
532
  "name": "upgrade",
509
533
  "description": "Open upgrade page in browser"
534
+ },
535
+ {
536
+ "name": "statusline",
537
+ "description": "Set up Codebuddy Code's status line UI",
538
+ "prompt": "command-statusline-prompt"
510
539
  }
511
540
  ],
512
541
  "productFeatures": {
@@ -640,6 +669,6 @@
640
669
  "description": "tool-slashcommand-description"
641
670
  }
642
671
  ],
643
- "commit": "2384ef79061722f86dee33efdf0826f4c65a41a2",
644
- "date": "2025-10-20T09:03:13.595Z"
672
+ "commit": "663c1e43bc5fea0838abe0621ad316e293e85b04",
673
+ "date": "2025-10-21T15:50:38.590Z"
645
674
  }
@@ -9,7 +9,8 @@
9
9
  ],
10
10
  "commands": [
11
11
  "init",
12
- "compact"
12
+ "compact",
13
+ "statusline"
13
14
  ],
14
15
  "tools": [
15
16
  "Task",
@@ -103,6 +104,21 @@
103
104
  "cli",
104
105
  "agent-instructions"
105
106
  ]
107
+ },
108
+ {
109
+ "name": "statusline-setup",
110
+ "instructions": "agent-statusline-instructions",
111
+ "description": "Use this agent to configure the user's Codebuddy Code status line setting.",
112
+ "tools": [
113
+ "Read",
114
+ "Write",
115
+ "Edit"
116
+ ],
117
+ "asTool": true,
118
+ "tags": [
119
+ "cli",
120
+ "sub-agent"
121
+ ]
106
122
  }
107
123
  ],
108
124
  "models": [
@@ -126,6 +142,6 @@
126
142
  "productFeatures": {
127
143
  "BillingNotice": false
128
144
  },
129
- "commit": "2384ef79061722f86dee33efdf0826f4c65a41a2",
130
- "date": "2025-10-20T09:03:18.649Z"
145
+ "commit": "663c1e43bc5fea0838abe0621ad316e293e85b04",
146
+ "date": "2025-10-21T15:50:43.530Z"
131
147
  }