@ia-ccun/code-agent-cli 0.0.56 → 0.0.57-beta.2
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-llm-provider.ts +149 -0
- 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/models.json +1 -27
- 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 +16 -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 +19 -18
- package/scripts/regression/results/repro.log +4 -0
package/config/agent/mcp.json
CHANGED
package/config/agent/models.json
CHANGED
|
@@ -1,29 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"providers": {
|
|
3
|
-
"aicode": {
|
|
4
|
-
"name": "aicode llm",
|
|
5
|
-
"baseUrl": "https://ai-llm.cc.com/v1",
|
|
6
|
-
"api": "openai-completions",
|
|
7
|
-
"apiKey": "你自己的APIKEY sk-xxxxxxxxxxxxxxxxxx",
|
|
8
|
-
"headers": {
|
|
9
|
-
"User-Agent": "${VERSION}"
|
|
10
|
-
},
|
|
11
|
-
"models": [
|
|
12
|
-
{
|
|
13
|
-
"id": "qwen3.6-35b-a3b",
|
|
14
|
-
"name": "qwen3.6",
|
|
15
|
-
"contextWindow": 128000,
|
|
16
|
-
"maxTokens": 100000,
|
|
17
|
-
"reasoning": false,
|
|
18
|
-
"input": ["text"],
|
|
19
|
-
"cost": {
|
|
20
|
-
"input": 5,
|
|
21
|
-
"output": 5,
|
|
22
|
-
"cacheRead": 0,
|
|
23
|
-
"cacheWrite": 0
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
}
|
|
28
|
-
}
|
|
2
|
+
"providers": {}
|
|
29
3
|
}
|
|
@@ -1,56 +1,54 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"~/.aicode-cli/agent/extensions/bash-check.ts",
|
|
2
|
+
"quietStartup":true,
|
|
3
|
+
"defaultProvider": "aicode",
|
|
4
|
+
"defaultModel": "deepseek-v4-flash",
|
|
5
|
+
"theme":"light",
|
|
6
|
+
"extensions":[
|
|
8
7
|
"~/.aicode-cli/agent/extensions/context-monitor.ts",
|
|
9
8
|
"~/.aicode-cli/agent/extensions/context.ts",
|
|
10
9
|
"~/.aicode-cli/agent/extensions/custom-footer.ts",
|
|
11
10
|
"~/.aicode-cli/agent/extensions/custom.ts",
|
|
12
11
|
"~/.aicode-cli/agent/extensions/review.ts",
|
|
13
|
-
"~/.aicode-cli/agent/extensions/working-msg.ts"
|
|
14
|
-
"-extensions/aicode-pets.ts"
|
|
12
|
+
"~/.aicode-cli/agent/extensions/working-msg.ts"
|
|
15
13
|
],
|
|
16
14
|
"packages":[
|
|
17
|
-
"npm:pi-subagents
|
|
18
|
-
"npm:pi-rewind
|
|
19
|
-
"npm:pi-mcp-adapter
|
|
15
|
+
"npm:pi-subagents",
|
|
16
|
+
"npm:pi-rewind",
|
|
17
|
+
"npm:pi-mcp-adapter",
|
|
20
18
|
"npm:@juicesharp/rpiv-todo",
|
|
21
19
|
"npm:@juicesharp/rpiv-ask-user-question",
|
|
22
|
-
"npm:@samfp/pi-memory
|
|
20
|
+
"npm:@samfp/pi-memory"
|
|
23
21
|
],
|
|
24
22
|
"memory": {
|
|
25
23
|
"localPath": "~/.aicode-cli/memory",
|
|
26
24
|
"lessonInjection": "selective",
|
|
27
|
-
"consolidationModel": "
|
|
25
|
+
"consolidationModel": "deepseek-v4-flash"
|
|
28
26
|
},
|
|
29
27
|
"subagents": {
|
|
30
28
|
"agentOverrides": {
|
|
31
29
|
"scout": {
|
|
32
|
-
"model": "
|
|
30
|
+
"model": "deepseek-v4-flash"
|
|
33
31
|
},
|
|
34
32
|
"researcher": {
|
|
35
|
-
"model": "
|
|
33
|
+
"model": "deepseek-v4-flash"
|
|
36
34
|
},
|
|
37
35
|
"planner": {
|
|
38
|
-
"model": "
|
|
36
|
+
"model": "deepseek-v4-flash"
|
|
39
37
|
},
|
|
40
38
|
"worker": {
|
|
41
|
-
"model": "
|
|
39
|
+
"model": "deepseek-v4-flash"
|
|
42
40
|
},
|
|
43
41
|
"reviewer": {
|
|
44
|
-
"model": "
|
|
42
|
+
"model": "deepseek-v4-flash"
|
|
45
43
|
},
|
|
46
44
|
"context-builder": {
|
|
47
|
-
"model": "
|
|
45
|
+
"model": "deepseek-v4-flash"
|
|
48
46
|
},
|
|
49
47
|
"oracle": {
|
|
50
|
-
"model": "
|
|
48
|
+
"model": "deepseek-v4-flash"
|
|
51
49
|
},
|
|
52
50
|
"delegate": {
|
|
53
|
-
"model": "
|
|
51
|
+
"model": "deepseek-v4-flash"
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
54
|
}
|
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.2",
|
|
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
|
+
5531
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/Users/jianjiang/.aicode-regression-
|
|
1
|
+
/Users/jianjiang/.aicode-regression-5502-6601000
|
|
File without changes
|