perf: reduce agent shell command probing

This commit is contained in:
jxxghp
2026-05-20 18:50:59 +08:00
parent 8a375e022c
commit c661bc4764
2 changed files with 67 additions and 59 deletions

View File

@@ -24,80 +24,29 @@ from app.utils.system import SystemUtils
SYSTEM_TASKS_FILE = "System Tasks.yaml"
SYSTEM_TASKS_SCHEMA_VERSION = 2
COMMON_SHELL_COMMANDS = (
# 只探测会明显改变 Agent 执行策略的可选能力。基础命令、语言运行时、
# 包管理器、服务管理器和数据库客户端默认不做启动探测,减少 which 扫描量。
"ssh",
"scp",
"sftp",
"rsync",
"git",
"gh",
"rg",
"fd",
"find",
"grep",
"sed",
"awk",
"jq",
"yq",
"curl",
"wget",
"tar",
"gzip",
"gunzip",
"zip",
"unzip",
"xz",
"7z",
"docker",
"docker-compose",
"kubectl",
"helm",
"sqlite3",
"psql",
"mysql",
"redis-cli",
"python",
"python3",
"pip",
"pip3",
"uv",
"node",
"npm",
"yarn",
"pnpm",
"bun",
"ffmpeg",
"ffprobe",
"mediainfo",
"rclone",
"aria2c",
"yt-dlp",
"openssl",
"base64",
"sha256sum",
"shasum",
"du",
"df",
"ps",
"top",
"lsof",
"netstat",
"ss",
"ping",
"traceroute",
"dig",
"nslookup",
"nc",
"telnet",
"crontab",
"systemctl",
"service",
"journalctl",
"launchctl",
"brew",
"apt",
"apk",
"yum",
"dnf",
)