主要更新: - 新增 agent_code_generator.py: AI 驱动的 Pydantic Agent 代码生成 - 新增 gitee_manager.py: Gitee API 集成(仓库创建、文件推送、Secrets 配置) - 新增 tool_generator_api.py: 动态 Agent 生成 API 端点 - 新增 template_manager.py: 数据库驱动的模板管理 - 新增 docs/DYNAMIC_AGENT_GENERATOR_API.md: 完整 API 文档 功能特性: - 支持通过 API 定义工具并自动生成 Agent 代码 - 自动创建 Gitee 仓库并推送代码 - CI/CD 自动构建 ARM64 Docker 镜像并推送到 ACR - 自动部署到 AKS 并创建 DNS A 记录 - 支持参数化工具函数生成 配置集成: - LiteLLM Gateway 用于 AI 代码生成 - Gitea Actions 用于 CI/CD 流水线 - Azure DNS 用于域名绑定 - ACR/AKS 用于容器化部署 文件整理: - 脚本文件移动到 scripts/ 目录 - 文档文件移动到 docs/ 目录
45 lines
1.2 KiB
Bash
Executable File
45 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
##############################################################################
|
|
# Agent Manager - 卸载脚本
|
|
##############################################################################
|
|
|
|
set -e
|
|
|
|
RED='\033[0;31m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m'
|
|
|
|
NAMESPACE="agent-manager"
|
|
|
|
echo -e "${YELLOW}⚠️ 警告: 即将删除 Agent Manager 及其所有资源${NC}"
|
|
read -p "确认删除?[y/N] " -n 1 -r
|
|
echo
|
|
|
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
echo "已取消"
|
|
exit 0
|
|
fi
|
|
|
|
echo "正在删除 Agent Manager..."
|
|
|
|
# 删除 Deployment 和 Service
|
|
kubectl delete -f ./k8s/agent-manager-service.yaml --ignore-not-found=true
|
|
kubectl delete -f ./k8s/agent-manager-deployment.yaml --ignore-not-found=true
|
|
|
|
# 删除 RBAC
|
|
kubectl delete -f ./k8s/agent-manager-rbac.yaml --ignore-not-found=true
|
|
|
|
# 删除配置
|
|
kubectl delete -f ./k8s/agent-manager-configmap.yaml --ignore-not-found=true
|
|
kubectl delete -f ./k8s/agent-manager-secret.yaml --ignore-not-found=true
|
|
|
|
# 删除 ACR Secret
|
|
kubectl delete secret acr-secret -n ${NAMESPACE} --ignore-not-found=true
|
|
kubectl delete secret kubeconfig-secret -n ${NAMESPACE} --ignore-not-found=true
|
|
|
|
# 删除命名空间
|
|
kubectl delete namespace ${NAMESPACE} --ignore-not-found=true
|
|
|
|
echo -e "\n${RED}✅ Agent Manager 已卸载${NC}"
|