feat(rdp): 新增 RDP 远程桌面/SMB/账单同步能力 + 清理编译产物

主要变更:
- RDP 远程桌面:新增 backend/pkg/rdp(RDP 引擎 + credssp/display/rle/trace)、
  backend/controller/rdp*(连接/凭证/文件/会话/实时)、frontend RDP 组件与 API
- Windows SMB 文件传输:backend/pkg/winsmb
- 云账单同步:backend/pkg/billingsync + billing_sync/aliyun_billing,前端账单详情
- Agent CLI Kubernetes 工具:kubernetes_action/get、pod_execute/logs
- 服务器导入助手:server_import_helpers、ImportCredentialSettings
- 国际化与组件重构(cloud/deploy/monitor/server/system 等多模块)
- 清理编译产物二进制:移除 backend/server、backend/agent/bin/aiops-agent-*
- .gitignore:新增 backend/agent/ 与 .cache/(避免 334MB go-build 缓存误入库)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
LoganandClaude committed 2026-07-04 01:50:36 +08:00
1 parent 777d9e4e71
commit 76ec9387f0
202 files changed
+16555 -2543

No files matched your search

+56 -1
View File
@@ -31,7 +31,7 @@ BACKEND_PORT=8080
FRONTEND_PORT=5173
BACKEND_DIR="backend"
FRONTEND_DIR="frontend"
BACKEND_BIN="aiops-server"
BACKEND_BIN="aiops"
STANDALONE_BIN="aiops"
DOCKERHUB_IMAGE="lghost/aiops"
@@ -890,6 +890,10 @@ cmd_build() {
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-w -s" -o bin/aiops-agent-linux-arm64 .
success "bin/aiops-agent-linux-arm64 ($(du -h bin/aiops-agent-linux-arm64 | cut -f1))"
info "编译 macOS ARM64..."
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-w -s" -o bin/aiops-agent-darwin-arm64 .
success "bin/aiops-agent-darwin-arm64 ($(du -h bin/aiops-agent-darwin-arm64 | cut -f1))"
if [ "$OS" = "macos" ]; then
info "编译 macOS (当前平台)..."
CGO_ENABLED=0 go build -ldflags="-w -s" -o bin/aiops-agent .
@@ -917,6 +921,49 @@ cmd_build() {
esac
}
# ============================================================
# 本地质量门禁(内部协作 / 发版前共用)// Logan.Li
# ============================================================
cmd_check() {
local mode=${1:-standard}
banner "========== 本地质量检查 =========="
ensure_go_path || exit 1
# 受限环境可能无法写 /root/.cache,检查命令统一使用项目内 Go 缓存。// Logan.Li
export GOCACHE="$SCRIPT_DIR/.cache/go-build"
mkdir -p "$GOCACHE"
info "后端 go vet..."
cd "$SCRIPT_DIR/$BACKEND_DIR"
go vet ./...
info "后端 go test..."
go test ./...
info "后端 go build..."
CGO_ENABLED=1 go build -o "$BACKEND_BIN" .
info "Agent go test..."
cd "$SCRIPT_DIR/agent"
go test ./...
info "前端 typecheck..."
cd "$SCRIPT_DIR/$FRONTEND_DIR"
if [ ! -d "node_modules" ]; then
npm install
fi
npm run check
if [ "$mode" = "strict" ]; then
info "前端 lint(严格模式)..."
npm run lint
fi
cd "$SCRIPT_DIR"
success "本地质量检查通过"
}
# ============================================================
# 独立二进制模式
# ============================================================
@@ -1420,6 +1467,8 @@ cmd_help() {
echo " ./run.sh kubernetes build 仅构建 embed 镜像"
echo ""
echo -e " ${YELLOW}编译 & 独立二进制${NC}"
echo " ./run.sh check 本地质量检查: Go vet/test/build + 前端 typecheck"
echo " ./run.sh check strict 严格检查: 在 check 基础上追加前端 lint"
echo " ./run.sh build 编译独立二进制 ./$STANDALONE_BIN (仅根目录)"
echo " ./run.sh build tag v1.0.1 指定版本号编译"
echo " ./run.sh release v1.0.1 发版:tag+二进制+镜像推送+K8s"
@@ -1480,6 +1529,12 @@ main() {
cmd_build "$@"
;;
# 本地质量检查
check)
shift
cmd_check "$@"
;;
# 独立二进制
binary|bin)
shift