@ia-ccun/code-agent-cli 0.0.55 → 0.0.56-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/bin/cli.js +0 -7
- package/config/agent/extensions/aicode-changelog.ts +150 -0
- package/config/changelog.md +98 -0
- package/package.json +1 -1
- package/scripts/regression/results/.last_pid +1 -1
- package/scripts/regression/results/.last_workdir +1 -1
- package/scripts/regression/results/02-extension-loading.log +20 -16
- package/scripts/regression/results/03-prompt-stream.log +12 -12
- package/scripts/regression/results/03-rpc-protocol.log +21 -22
- package/scripts/regression/results/04-slash-commands-and-skills.log +11 -11
- package/scripts/regression/results/05-tool-execution.log +5 -5
- package/scripts/regression/results/06-pi-new-features.log +24 -16
- package/scripts/regression/cases/08-cwd-resilience.sh +0 -84
- package/scripts/regression/results/08-cwd-resilience.log +0 -1
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# 08-cwd-resilience.sh
|
|
3
|
-
# 验证:aicode-cli 在不同 cwd 场景下都能稳定启动, 不因 cwd 状态错位
|
|
4
|
-
#
|
|
5
|
-
# 0.85→1.1.0 升级后引入的 CWD 双重错位:
|
|
6
|
-
# - cli.js 入口 process.chdir(homedir()) 防 ENOENT → 毁了 process.cwd() 语义
|
|
7
|
-
# - custom-footer 用 process.env.PWD 修 footer 显示 → 仍修不了 aicode 进程 cwd
|
|
8
|
-
# - cli.js 改为 process.chdir(process.env.PWD || homedir()) → 全修好
|
|
9
|
-
#
|
|
10
|
-
# 这个 case 锁定以上 3 层修复都不退化:
|
|
11
|
-
# 1. cwd 正常: 启动 aicode 进程不死, stdout 无 ENOENT
|
|
12
|
-
# 2. cwd 被删 (预防 ENOENT): 不崩, cli.js 入口 chdir 兜底生效
|
|
13
|
-
# 3. PWD 未设 (degenerate): fallback 到 homedir, 不崩
|
|
14
|
-
|
|
15
|
-
set -uo pipefail
|
|
16
|
-
CURRENT_CASE="08-cwd-resilience"
|
|
17
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
18
|
-
source "$SCRIPT_DIR/../lib/common.sh"
|
|
19
|
-
|
|
20
|
-
header "$CURRENT_CASE" "aicode CWD resilience across edge cases"
|
|
21
|
-
|
|
22
|
-
# ----- Test 1: 从正常项目目录启动, 不应 ENOENT -----
|
|
23
|
-
PROJECT_DIR="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
|
24
|
-
header "$CURRENT_CASE" "test 1: normal cwd (project root)"
|
|
25
|
-
(
|
|
26
|
-
cd "$PROJECT_DIR"
|
|
27
|
-
if ! spawn_rpc 15 true; then
|
|
28
|
-
echo "FAIL_SPAWN"
|
|
29
|
-
cleanup_rpc 2>/dev/null
|
|
30
|
-
exit 1
|
|
31
|
-
fi
|
|
32
|
-
if grep -q "Error: ENOENT" "$REGRESSION_LOG" 2>/dev/null; then
|
|
33
|
-
echo "FAIL_ENOENT"
|
|
34
|
-
cleanup_rpc
|
|
35
|
-
exit 1
|
|
36
|
-
fi
|
|
37
|
-
cleanup_rpc
|
|
38
|
-
) && pass "normal cwd startup: no ENOENT" ||
|
|
39
|
-
fail "normal cwd: ENOENT or spawn failed" "cli.js 入口 chdir 防御退化"
|
|
40
|
-
|
|
41
|
-
# ----- Test 2: 从 deleted cwd 启动 (复现 0.85 ENOENT 场景) -----
|
|
42
|
-
header "$CURRENT_CASE" "test 2: cwd deleted (ENOENT resilience)"
|
|
43
|
-
(
|
|
44
|
-
# 创建临时目录, 然后删它, 模拟 cwd 被删
|
|
45
|
-
TESTDIR=$(mktemp -d -t aicode-cwd-test.XXXXXX)
|
|
46
|
-
cd "$TESTDIR"
|
|
47
|
-
rmdir "$TESTDIR"
|
|
48
|
-
# 现在 shell cwd 指向已删目录
|
|
49
|
-
if ! spawn_rpc 15 true; then
|
|
50
|
-
echo "FAIL_SPAWN"
|
|
51
|
-
cleanup_rpc 2>/dev/null
|
|
52
|
-
exit 1
|
|
53
|
-
fi
|
|
54
|
-
# 等 RPC 启动事件
|
|
55
|
-
sleep 2
|
|
56
|
-
if grep -q "Error: ENOENT" "$REGRESSION_LOG" 2>/dev/null; then
|
|
57
|
-
echo "FAIL_ENOENT"
|
|
58
|
-
cleanup_rpc
|
|
59
|
-
exit 1
|
|
60
|
-
fi
|
|
61
|
-
cleanup_rpc
|
|
62
|
-
) && pass "deleted cwd startup: no ENOENT" ||
|
|
63
|
-
fail "deleted cwd: ENOENT or spawn failed" "cli.js 入口 chdir 防御失效"
|
|
64
|
-
|
|
65
|
-
# ----- Test 3: PWD env 未设 (degenerate shell) -----
|
|
66
|
-
header "$CURRENT_CASE" "test 3: PWD unset, fallback to homedir"
|
|
67
|
-
(
|
|
68
|
-
unset PWD
|
|
69
|
-
if ! spawn_rpc 15 true; then
|
|
70
|
-
echo "FAIL_SPAWN"
|
|
71
|
-
cleanup_rpc 2>/dev/null
|
|
72
|
-
exit 1
|
|
73
|
-
fi
|
|
74
|
-
sleep 2
|
|
75
|
-
if grep -q "Error: ENOENT" "$REGRESSION_LOG" 2>/dev/null; then
|
|
76
|
-
echo "FAIL_ENOENT"
|
|
77
|
-
cleanup_rpc
|
|
78
|
-
exit 1
|
|
79
|
-
fi
|
|
80
|
-
cleanup_rpc
|
|
81
|
-
) && pass "PWD unset startup: no ENOENT" ||
|
|
82
|
-
fail "PWD unset: ENOENT or spawn failed" "homedir fallback 失效"
|
|
83
|
-
|
|
84
|
-
summary
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"ready_probe","type":"response","command":"get_state","success":true,"data":{"model":{"id":"MiniMax-M3","name":"MiniMax-M3","api":"anthropic-messages","provider":"minimax-cn","baseUrl":"https://api.minimaxi.com/anthropic","reasoning":true,"input":["text","image"],"cost":{"input":0.3,"output":1.2,"cacheRead":0.06,"cacheWrite":0,"tiers":[{"inputTokensAbove":512000,"input":0.6,"output":2.4,"cacheRead":0.12,"cacheWrite":0}]},"contextWindow":1000000,"maxTokens":512000,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"thinkingLevel":"high","isStreaming":false,"isCompacting":false,"steeringMode":"one-at-a-time","followUpMode":"all","sessionId":"01a1237c-a8bb-7281-a5cd-d1a5b89fa4fd","autoCompactionEnabled":true,"messageCount":0,"pendingMessageCount":0}}
|