@ia-ccun/code-agent-cli 0.0.56 → 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/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/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
|
@@ -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
|