@tencent-ai/agent-sdk 0.3.62 → 0.3.64
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/CHANGELOG.md +54 -0
- package/cli/bin/codebuddy +50 -3
- package/cli/dist/codebuddy-headless.js +1154 -0
- package/cli/package.json +1 -1
- package/cli/product.cloudhosted.json +2 -2
- package/cli/product.internal.json +3 -3
- package/cli/product.ioa.json +2 -3
- package/cli/product.json +56 -15
- package/cli/product.selfhosted.json +2 -3
- package/lib/query.d.ts.map +1 -1
- package/lib/query.js +7 -1
- package/lib/query.js.map +1 -1
- package/lib/session.d.ts.map +1 -1
- package/lib/session.js +5 -1
- package/lib/session.js.map +1 -1
- package/lib/transport/process-transport.js +1 -1
- package/lib/transport/process-transport.js.map +1 -1
- package/lib/types.d.ts +4 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/cli/dist/codebuddy.js +0 -1327
package/cli/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,60 @@ CodeBuddy Code 的所有重要更新都会记录在这里。
|
|
|
5
5
|
我们遵循 [语义化版本](https://semver.org/spec/v2.0.0.html) 规范。
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
## [2.52.1] - 2026-02-28
|
|
9
|
+
|
|
10
|
+
### 🔧 功能改进
|
|
11
|
+
|
|
12
|
+
- **启动速度**:`cbc -v` / `cbc --version` 现在即时响应,不再触发完整的初始化流程,启动时间从 5~10 秒缩短至约 500ms
|
|
13
|
+
- **管道环境**:在非 TTY 环境下执行子命令(config、mcp、sandbox、plugin 等)时不再等待 stdin,避免卡住
|
|
14
|
+
- **稳定性**:认证初始化增加超时保护,网络不通时不再导致 CLI 无限等待
|
|
15
|
+
- **团队成员切换**:使用左右键即时切换成员视图,无需回车确认,切换后输入框自动可用
|
|
16
|
+
- **成员选择模式**:按下键进入选择模式并默认选中 @main,按上键或 Esc 退出
|
|
17
|
+
- **输入历史隔离**:上下键的历史导航与成员选择模式互不干扰,清空输入框自动退出历史导航
|
|
18
|
+
- **SDK MCP Server API 简化**:简化 Python SDK 中 MCP Server 的传参方式,可直接传入 server 对象,无需手动构造字典
|
|
19
|
+
- **JS SDK 新增可执行文件配置**:支持通过 `executable` 和 `executableArgs` 自定义 CLI 可执行文件路径和参数
|
|
20
|
+
- **跳过内部请求头**:支持通过 `CODEBUDDY_SKIP_INTERNAL_HEADERS` 环境变量清理内部请求头,避免干扰第三方 API 网关
|
|
21
|
+
|
|
22
|
+
### 🐛 问题修复
|
|
23
|
+
|
|
24
|
+
- **Skill 加载**:修复插件中的 Skill 偶发无法加载的问题,确保插件管理器初始化完成后再读取插件列表
|
|
25
|
+
- **Team 成员生成**:修复并发生成 Team 成员时颜色索引重复的问题,将成员注册逻辑统一串行化
|
|
26
|
+
- **Skill 调用**:修复 `user-invocable: false` 的 Skill 无法被模型自动调用的问题
|
|
27
|
+
- **子代理并发**:增加 abort signal 最大监听器数量,避免大量并发子代理时产生 MaxListenersExceededWarning
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [2.52.0] - 2026-02-26
|
|
31
|
+
|
|
32
|
+
### 🚀 新功能
|
|
33
|
+
|
|
34
|
+
- **团队视图切换**:支持通过方向键在不同的团队成员视图之间进行切换,按 ↓ 进入切换模式,←/→ 选择成员,Enter 确认切换,支持高亮预览和边框颜色同步
|
|
35
|
+
- **Headless 构建**:新增轻量级 headless 模式(体积减少 45%),支持 `--print`、`--serve`、`--acp` 快速启动
|
|
36
|
+
|
|
37
|
+
### 🔧 功能改进
|
|
38
|
+
|
|
39
|
+
- **启动性能**:优化启动流程,Application.start() 耗时降低 96%,内存占用减少 31%
|
|
40
|
+
- **Bun 原生优化**:使用 Bun 原生 API 替代第三方依赖(PTY、glob、semver 等),提升运行时性能
|
|
41
|
+
- **依赖精简**:移除不再需要的依赖项,减小安装体积
|
|
42
|
+
- **认证时序修复**:确保认证在 API 调用前完成,消除冷启动 401 错误
|
|
43
|
+
- **模型排序优化**:调整国内版默认模型优先级顺序
|
|
44
|
+
- **配置清理**:移除 iOA 和私有化版本中未使用的 SaveMemory 工具
|
|
45
|
+
- **命令执行稳定性**:优化命令执行与环境初始化流程,减少异常情况下的执行中断
|
|
46
|
+
- **认证体验**:增强 API Key Helper 获取令牌过程的健壮性,提升认证流程稳定性
|
|
47
|
+
- **错误处理优化**:将 model 和 session 层的错误处理从字符串匹配升级为自定义错误类,提升错误识别的可靠性和代码可维护性
|
|
48
|
+
- **流超时自动重试**:当模型流式响应超时时自动重试,避免用户手动操作
|
|
49
|
+
- **超时时间可配置**:支持通过环境变量 `CODEBUDDY_STREAM_TIMEOUT` 自定义流超时时间
|
|
50
|
+
- **命令建议过滤**:标记为不可直接调用的 Skill 不再出现在斜杠命令建议列表中
|
|
51
|
+
- **Topic Generator 优化**:强化提示词职责边界,改进解析逻辑,减少 token 浪费
|
|
52
|
+
|
|
53
|
+
### 🐛 问题修复
|
|
54
|
+
|
|
55
|
+
- **团队成员工具权限确认**:修复团队成员执行工具时跳过权限确认的问题,现在团队成员会继承主 Agent 的权限模式,需要用户确认后才能执行敏感工具
|
|
56
|
+
- **权限确认框成员标识**:权限确认框中显示团队成员名称和专属颜色,便于用户区分不同成员的工具调用请求
|
|
57
|
+
- **插件 MCP 配置加载**:修复插件 `.mcp.json` 不支持扁平格式的问题,现在同时兼容 `{ "mcpServers": {...} }` 包装格式和直接以服务名为 key 的扁平格式
|
|
58
|
+
- **团队成员状态显示**:修复团队成员正常完成任务后因 shutdown 流程被错误标记为 killed 的问题,已完成的成员现在正确显示完成状态;统一两处状态图标的显示逻辑
|
|
59
|
+
- **界面修复**:修正状态面板中 Memory 字段的拼写错误
|
|
60
|
+
|
|
61
|
+
|
|
8
62
|
## [2.51.2] - 2026-02-26
|
|
9
63
|
|
|
10
64
|
### 🔧 功能改进
|
package/cli/bin/codebuddy
CHANGED
|
@@ -12,12 +12,12 @@ function compareVersions(current, required) {
|
|
|
12
12
|
const currentVersion = current.split('-')[0];
|
|
13
13
|
const currentParts = currentVersion.split('.').map(Number);
|
|
14
14
|
const requiredParts = required.split('.').map(Number);
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
// If version format is invalid (e.g., less than 3 parts or contains NaN), skip check
|
|
17
17
|
if (currentParts.length < 3 || currentParts.some(isNaN)) {
|
|
18
18
|
return 0; // Treat as passing the check
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
for (let i = 0; i < 3; i++) {
|
|
22
22
|
const curr = currentParts[i] || 0;
|
|
23
23
|
const req = requiredParts[i] || 0;
|
|
@@ -39,4 +39,51 @@ if (compareVersions(process.versions.node, minNode) < 0) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
require('events').EventEmitter.defaultMaxListeners = 50;
|
|
42
|
-
|
|
42
|
+
|
|
43
|
+
// Fast path for --version / -v: print version and exit before loading any bundle.
|
|
44
|
+
// This avoids the full DI container initialization (~150 components), network requests,
|
|
45
|
+
// and stdin reads that can cause multi-second startup delays on first install.
|
|
46
|
+
{
|
|
47
|
+
const args = process.argv.slice(2);
|
|
48
|
+
const hasVersionFlag = args.includes('--version') || args.includes('-v');
|
|
49
|
+
// Only apply fast path when no positional sub-command is present
|
|
50
|
+
// (e.g. "cbc mcp add -v somevalue" should NOT be treated as a version request)
|
|
51
|
+
const hasSubCommand = args.some(a => !a.startsWith('-'));
|
|
52
|
+
if (hasVersionFlag && !hasSubCommand) {
|
|
53
|
+
try {
|
|
54
|
+
const pkg = require('../package.json');
|
|
55
|
+
const version = (pkg && pkg.publishConfig && pkg.publishConfig.customPackage && pkg.publishConfig.customPackage.version)
|
|
56
|
+
|| (pkg && pkg.version)
|
|
57
|
+
|| 'unknown';
|
|
58
|
+
// eslint-disable-next-line no-console
|
|
59
|
+
console.log(version);
|
|
60
|
+
} catch (_e) {
|
|
61
|
+
// eslint-disable-next-line no-console
|
|
62
|
+
console.log('unknown');
|
|
63
|
+
}
|
|
64
|
+
process.exit(0);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Route to headless bundle when TUI is not needed
|
|
69
|
+
const args = process.argv.slice(2);
|
|
70
|
+
const isHeadless = args.includes('--print') || args.includes('-p')
|
|
71
|
+
|| args.includes('--serve') || args.includes('--acp')
|
|
72
|
+
|| args.includes('--input-format') || args.includes('--output-format')
|
|
73
|
+
|| args.includes('--version') || args.includes('-v')
|
|
74
|
+
|| args.includes('--help') || args.includes('-h') || args.includes('help');
|
|
75
|
+
|
|
76
|
+
try {
|
|
77
|
+
if (isHeadless) {
|
|
78
|
+
require('../dist/codebuddy-headless');
|
|
79
|
+
} else {
|
|
80
|
+
require('../dist/codebuddy');
|
|
81
|
+
}
|
|
82
|
+
} catch (e) {
|
|
83
|
+
// Fallback to full bundle if headless bundle is not available
|
|
84
|
+
if (isHeadless && e.code === 'MODULE_NOT_FOUND') {
|
|
85
|
+
require('../dist/codebuddy');
|
|
86
|
+
} else {
|
|
87
|
+
throw e;
|
|
88
|
+
}
|
|
89
|
+
}
|