@ia-ccun/code-agent-cli 0.0.56-beta.2 → 0.0.57-beta.1
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/config/agent/extensions/aicode-grillMe.ts +102 -28
- package/config/agent/extensions/aicode-plan.ts +98 -41
- package/config/agent/extensions/aicode-todo-progress.ts +2 -1
- package/config/agent/extensions/custom-footer.ts +3 -2
- package/config/agent/extensions/review.ts +6 -1
- package/config/agent/mcp.json +4 -0
- package/config/agent/settings.json +19 -21
- package/config/agent/themes/catppuccin-mocha.json +1 -1
- package/config/changelog.md +19 -66
- package/package.json +5 -5
- package/scripts/regression/lib/common.sh +31 -12
- package/scripts/regression/results/.last_pid +1 -1
- package/scripts/regression/results/.last_workdir +1 -1
- package/scripts/regression/results/02-extension-loading.err.log +0 -0
- package/scripts/regression/results/02-extension-loading.log +15 -20
- package/scripts/regression/results/03-prompt-stream.err.log +0 -0
- package/scripts/regression/results/03-prompt-stream.log +12 -16
- package/scripts/regression/results/03-rpc-protocol.err.log +0 -0
- package/scripts/regression/results/03-rpc-protocol.log +19 -21
- package/scripts/regression/results/04-slash-commands-and-skills.err.log +0 -0
- package/scripts/regression/results/04-slash-commands-and-skills.log +12 -11
- package/scripts/regression/results/05-tool-execution.err.log +0 -0
- package/scripts/regression/results/05-tool-execution.log +5 -5
- package/scripts/regression/results/06-pi-new-features.err.log +0 -0
- package/scripts/regression/results/06-pi-new-features.log +25 -18
- package/scripts/regression/results/repro.log +4 -0
package/config/changelog.md
CHANGED
|
@@ -2,95 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
### Release Note: v0.0.56
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
#### 🔧 重构 (Refactor)
|
|
8
|
-
|
|
9
|
-
- **简化 CLI 启动流程**
|
|
10
|
-
- 移除 `bin/cli.js` 入口的 cwd 兜底逻辑(`process.chdir(PWD || homedir())` 及 `homedir` import)。
|
|
11
|
-
- 行为契约:cwd 被外部删除时 aicode 以原始 ENOENT 失败,不再静默跳转到 home。
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
#### ✅ 回归测试 (Regression)
|
|
15
|
-
|
|
16
|
-
- 7/7 case 通过(01-07)。
|
|
5
|
+
本次含底层依赖升级 + 启动体验优化,建议所有用户升级。
|
|
17
6
|
|
|
18
7
|
---
|
|
19
8
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
本次为底层依赖升级版本,不引入功能变更,建议所有用户升级。
|
|
23
|
-
|
|
24
|
-
#### 🔧 依赖升级 (Dependency)
|
|
25
|
-
|
|
26
|
-
- 升级 4 个 pi 包到 ^0.85
|
|
27
|
-
|
|
28
|
-
#### ✨ 自带新能力 (Upstream Features)
|
|
29
|
-
|
|
30
|
-
- **`pi.on()` 返回 unsubscribe**:扩展可清理已订阅的事件 handler。
|
|
9
|
+
#### 🚀 核心能力 (Major Features)
|
|
31
10
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- 自带 14 个扩展 100% 兼容 0.85.1,无需修改。
|
|
35
|
-
- RPC 协议层(与 aicode-idea-plugin-swing Kotlin 客户端)向后兼容,无需客户端升级。
|
|
36
|
-
|
|
37
|
-
#### 🐞 已验证修复 (Verified Upstream Fixes)
|
|
38
|
-
|
|
39
|
-
- `toolcall_start` 事件补全 id/name(0.84.3)
|
|
40
|
-
- In-memory session fork 在 turn 未 settled 时的崩溃(0.85.0)
|
|
41
|
-
- 全屏 transcript 渲染稳定性优化
|
|
11
|
+
- **CodeMode 沙箱**:AI 现在可以在 QuickJS 沙箱里写 JS 脚本编排工具调用,一次完成并行扇出、流水线、条件分支、循环聚合,大幅减少 token 消耗和等待时间。可用全局:`tools.<name>()`、`searchTools()`、`models.generateImages()` / `models.classify()`、`store()` / `load()`。
|
|
12
|
+
- **MCP 增强**:新 OAuth 选项(`oauth.clientName`、复用 provider `/login` token)、项目级 `.pi/mcp.json` 配置、OAuth 加固(RFC 9207 `iss` 校验、step-up 登录)。
|
|
42
13
|
|
|
43
14
|
---
|
|
44
15
|
|
|
45
|
-
|
|
16
|
+
#### ⚡️ CLI 体验 (CLI Improvements)
|
|
46
17
|
|
|
47
|
-
|
|
18
|
+
- `--tools` / `--exclude-tools` 接受 `*` 通配符和 `+name` / `-name` 修饰符(叠加而非替换默认集)。
|
|
19
|
+
- TUI 默认 fullscreen(可通过配置改回 regular)。
|
|
20
|
+
- 系统主题自动跟随终端调色板。
|
|
21
|
+
- `/bug` 命令:一键打包 session metadata + 转录生成 issue。
|
|
22
|
+
- 终端支持 OSC 7501 时显示 working / blocked / done / failed 状态。
|
|
23
|
+
- **新版本自动提示 release notes**:第一次启动新版本时弹出本次更新内容(仅首次,后续不刷屏;RPC/JSON 模式不打扰)。
|
|
48
24
|
|
|
49
25
|
---
|
|
50
26
|
|
|
51
|
-
####
|
|
52
|
-
|
|
53
|
-
- **推荐使用更高效的命令行工具**
|
|
54
|
-
- 推荐使用 `fd` 替代 `find`,实现更快的文件搜索。
|
|
55
|
-
- 推荐使用 `rg`(ripgrep)替代 `grep`,获得更强大的文本搜索能力。
|
|
56
|
-
- 相关工具路径说明已记录在 `APPEND_SYSTEM.md` 中,便于查阅和配置。
|
|
57
|
-
|
|
58
|
-
- **完整时间戳显示于 Agent 完成消息**
|
|
59
|
-
- 在任务完成提示中增加年月日信息,提升日志可读性。
|
|
60
|
-
- 格式示例:`2026-04-15 09:45:40 | ✨ 消息处理完成`
|
|
27
|
+
#### 🔧 依赖升级 (Dependency)
|
|
61
28
|
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
- 在 Git 提交提示(prompt)中增加 AI 签名要求。
|
|
66
|
-
- 提交技能(commit skill)已更新以支持标准签名格式。
|
|
29
|
+
- 底层 4 个 pi 包升级到 ^1.1(0.85.1 → 1.1.0 官方破坏性更新)。
|
|
30
|
+
- `pi.on()` 现在返回 unsubscribe,扩展可清理订阅的事件 handler。
|
|
31
|
+
- 扩展可调用 `pi.registerToolRenderer()` 为任意工具注册渲染器;新增 `ctx.executeTool()` 支持嵌套工具调用;新工具元数据:`exposure`、`namespace`、`annotations`、`outputSchema` + `structuredContent`、`isError`。
|
|
67
32
|
|
|
68
33
|
---
|
|
69
34
|
|
|
70
|
-
####
|
|
35
|
+
#### ⚠️ 行为契约调整 (Behavior Change)
|
|
71
36
|
|
|
72
|
-
-
|
|
73
|
-
- 修复安装过程中 `custom.ts` 扩展文件未强制覆盖的问题,确保配置更新生效。
|
|
74
|
-
|
|
75
|
-
- **修正 npm 包名错误**
|
|
76
|
-
- 将 `/update` 命令中的包名从 `@ia-ccun/aicode-cli` 正确更新为 `@ia-ccun/code-agent-cli`,避免更新失败。
|
|
77
|
-
|
|
78
|
-
- **修复示例代码块格式问题**
|
|
79
|
-
- 为 `git-commit.md` 与 `git-worktree.md` 中的示例代码块添加代码围栏(code fences),提升可读性与 Markdown 渲染正确性。
|
|
37
|
+
- cwd 被外部删除时 aicode 不再静默跳转到 home,而是以原始 ENOENT 失败退出。属于"简约优先"的取舍:场景罕见,保留兜底会增加 CLI 复杂度。
|
|
80
38
|
|
|
81
39
|
---
|
|
82
40
|
|
|
83
|
-
####
|
|
41
|
+
#### ✅ 回归测试 (Regression)
|
|
84
42
|
|
|
85
|
-
-
|
|
86
|
-
- 更新版本号至 `0.0.46`。
|
|
43
|
+
- 7/7 case 通过(01-07)。
|
|
87
44
|
|
|
88
45
|
---
|
|
89
46
|
|
|
90
|
-
> 💡 **提示**:我们持续优化开发体验,建议所有用户升级至最新版本以获取最佳功能支持。
|
|
91
|
-
|
|
92
|
-
感谢 AICode CLI 的智能协作为本版本作出的重要贡献!
|
|
93
|
-
|
|
94
47
|
🚀 **升级命令**:
|
|
95
48
|
|
|
96
49
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ia-ccun/code-agent-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"prepare": "husky"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@earendil-works/pi-agent-core": "^1.
|
|
38
|
-
"@earendil-works/pi-ai": "^1.
|
|
39
|
-
"@earendil-works/pi-coding-agent": "^1.
|
|
40
|
-
"@earendil-works/pi-tui": "^1.
|
|
37
|
+
"@earendil-works/pi-agent-core": "^1.4.0",
|
|
38
|
+
"@earendil-works/pi-ai": "^1.4.0",
|
|
39
|
+
"@earendil-works/pi-coding-agent": "^1.4.0",
|
|
40
|
+
"@earendil-works/pi-tui": "^1.4.0"
|
|
41
41
|
},
|
|
42
42
|
"overrides": {
|
|
43
43
|
"glob": "^11.0.0",
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
set -uo pipefail
|
|
7
7
|
|
|
8
8
|
# 默认配置
|
|
9
|
-
: "${AICODE_BIN:=aicode}"
|
|
10
|
-
: "${AICODE_CONFIG:=$HOME/.aicode-cli}"
|
|
11
|
-
: "${AICODE_TIMEOUT:=30}"
|
|
12
|
-
: "${REGRESSION_QUIET:=0}"
|
|
9
|
+
: "${AICODE_BIN:=aicode}" # aicode 二进制路径
|
|
10
|
+
: "${AICODE_CONFIG:=$HOME/.aicode-cli}" # 配置目录
|
|
11
|
+
: "${AICODE_TIMEOUT:=30}" # RPC 测试默认超时(秒)
|
|
12
|
+
: "${REGRESSION_QUIET:=0}" # 1 = 减少输出
|
|
13
13
|
|
|
14
14
|
# 路径
|
|
15
15
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
@@ -18,9 +18,21 @@ mkdir -p "$RESULTS_DIR"
|
|
|
18
18
|
|
|
19
19
|
# 颜色(仅 TTY 启用)
|
|
20
20
|
if [[ -t 1 ]] && [[ "${REGRESSION_QUIET:-0}" != "1" ]]; then
|
|
21
|
-
RED=$'\033[0;31m'
|
|
21
|
+
RED=$'\033[0;31m'
|
|
22
|
+
GREEN=$'\033[0;32m'
|
|
23
|
+
YELLOW=$'\033[0;33m'
|
|
24
|
+
BLUE=$'\033[0;34m'
|
|
25
|
+
CYAN=$'\033[0;36m'
|
|
26
|
+
DIM=$'\033[2m'
|
|
27
|
+
NC=$'\033[0m'
|
|
22
28
|
else
|
|
23
|
-
RED=''
|
|
29
|
+
RED=''
|
|
30
|
+
GREEN=''
|
|
31
|
+
YELLOW=''
|
|
32
|
+
BLUE=''
|
|
33
|
+
CYAN=''
|
|
34
|
+
DIM=''
|
|
35
|
+
NC=''
|
|
24
36
|
fi
|
|
25
37
|
|
|
26
38
|
# 计数器
|
|
@@ -159,7 +171,9 @@ json.dump(d, open(p, 'w'), indent=2)
|
|
|
159
171
|
mkfifo "$workdir/stdin.fifo" 2>/dev/null || true
|
|
160
172
|
|
|
161
173
|
# fd 11 = stdin (case 脚本可以 printf 到 &11)
|
|
162
|
-
# fd 12 = stdout
|
|
174
|
+
# fd 12 = stdout (仅 JSON-RPC 流; stderr 单独写 error.log)
|
|
175
|
+
# pi 1.4.0+ 会往 stderr 写 warning (如 "No models match pattern"),
|
|
176
|
+
# 混进 output.log 会让 jq 解析整个文件失败, 所以必须分离两个流.
|
|
163
177
|
exec 11<>"$workdir/stdin.fifo"
|
|
164
178
|
exec 12>"$workdir/output.log"
|
|
165
179
|
|
|
@@ -170,11 +184,11 @@ json.dump(d, open(p, 'w'), indent=2)
|
|
|
170
184
|
fi
|
|
171
185
|
|
|
172
186
|
"$AICODE_BIN" $ext_flag --config "$workdir" --mode rpc --no-session \
|
|
173
|
-
<&11 >&12 2
|
|
187
|
+
<&11 >&12 2>>"$workdir/error.log" &
|
|
174
188
|
local pid=$!
|
|
175
189
|
|
|
176
|
-
echo "$workdir" >
|
|
177
|
-
echo "$pid"
|
|
190
|
+
echo "$workdir" >"$RESULTS_DIR/.last_workdir"
|
|
191
|
+
echo "$pid" >"$RESULTS_DIR/.last_pid"
|
|
178
192
|
|
|
179
193
|
# 主动发一个 get_state 触发首个 response,验证 RPC 通道已就绪
|
|
180
194
|
printf '{"type":"get_state","id":"ready_probe"}\n' >&11
|
|
@@ -183,7 +197,8 @@ json.dump(d, open(p, 'w'), indent=2)
|
|
|
183
197
|
local ready=0
|
|
184
198
|
for _ in $(seq 1 50); do
|
|
185
199
|
if grep -q '"id":"ready_probe"' "$workdir/output.log" 2>/dev/null; then
|
|
186
|
-
ready=1
|
|
200
|
+
ready=1
|
|
201
|
+
break
|
|
187
202
|
fi
|
|
188
203
|
sleep 0.1
|
|
189
204
|
done
|
|
@@ -230,6 +245,10 @@ cleanup_rpc() {
|
|
|
230
245
|
if [[ -n "${REGRESSION_LOG:-}" ]] && [[ -f "$REGRESSION_LOG" ]]; then
|
|
231
246
|
cp "$REGRESSION_LOG" "$RESULTS_DIR/${CURRENT_CASE}.log" 2>/dev/null
|
|
232
247
|
fi
|
|
248
|
+
# stderr 单独留一份, 便于诊断 warning/error (pi 1.4.0+ 会写 warning)
|
|
249
|
+
if [[ -n "${REGRESSION_WORKDIR:-}" ]] && [[ -f "$REGRESSION_WORKDIR/error.log" ]]; then
|
|
250
|
+
cp "$REGRESSION_WORKDIR/error.log" "$RESULTS_DIR/${CURRENT_CASE}.err.log" 2>/dev/null
|
|
251
|
+
fi
|
|
233
252
|
[[ -n "${REGRESSION_WORKDIR:-}" ]] && rm -rf "$REGRESSION_WORKDIR" 2>/dev/null
|
|
234
253
|
}
|
|
235
254
|
|
|
@@ -284,4 +303,4 @@ assert_event_count() {
|
|
|
284
303
|
else
|
|
285
304
|
fail "$name" "expected ≥ $min matches | got: $count"
|
|
286
305
|
fi
|
|
287
|
-
}
|
|
306
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
80819
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/Users/jianjiang/.aicode-regression-
|
|
1
|
+
/Users/jianjiang/.aicode-regression-80797-7450000
|
|
File without changes
|