初始化提交

This commit is contained in:
陈二狗 2026-05-21 11:20:19 +08:00
parent fdb4e439cf
commit aaa88b2e63
21 changed files with 364 additions and 55 deletions

View File

@ -12,19 +12,19 @@
## 项目概述
Neta AI电商 是 AI 驱动的电商自动化运营平台,采用 Monorepo 架构。后端基于 Midway.js + Cool Admin 框架,前端基于 Vue 3 + Element PlusAI 引擎采用自研 NetaClawReAct 循环 + WebSocket 实时通信)。
GPU Guard 是 AI 驱动的智能管理审核平台,采用 Monorepo 架构。后端基于 Midway.js + Cool Admin 框架,前端基于 Vue 3 + Element PlusAI 引擎采用自研 NetaClawReAct 循环 + WebSocket 实时通信)。
**核心架构:**
- **Monorepo**: pnpm workspace 管理多个包
- **后端**: Midway.js 3.20 + Cool Admin 8.x端口 8003
- **前端**: Vue 3.5 + Vite 5.4 + Element Plus 2.9,端口 9001
- **AI 引擎**: NetaClaw (ReAct + TypeBox Schema + Socket.IO)
- **数据库**: MySQL 8.0+ (`neta_test`)
- **数据库**: MySQL 8.0+ (`cpu_guard`)
## 项目结构
```
Neta-monorepo/
GPU_GUARD_MONOREPO/
├── packages/
│ ├── backend/ # Midway.js 后端 (Cool Admin 框架)
│ ├── frontend/ # Vue 3 前端 (Cool Admin UI)
@ -38,8 +38,8 @@ Neta-monorepo/
```bash
pnpm install # 安装依赖
pnpm dev # 同时启动后端+前端
pnpm --filter @neta/backend dev # 单独启动后端 (8003)
pnpm --filter @neta/frontend dev # 单独启动前端 (9001)
pnpm --filter @gpu-guard/backend dev # 单独启动后端 (8003)
pnpm --filter @gpu-guard/frontend dev # 单独启动前端 (9001)
pnpm build # 构建所有包
pnpm lint # 代码检查
```
@ -202,8 +202,7 @@ VALUES (158, '项目详情', '/project/detail', 'modules/project/views/detail.vu
|------|------|------|------------|
| **base** | `modules/base/` | 用户、角色、菜单、权限 | BaseSysUser, BaseSysRole, BaseSysMenu |
| **netaclaw** | `modules/netaclaw/` | AI Agent 引擎 | NetaClawAgent, NetaClawSession, NetaClawMessage, NetaClawSkill, NetaClawModelChannel |
| **project** | `modules/project/` | 项目管理 | ProjectInfo, ProjectPhase, ProjectTask, ProjectTaskDependency, ProjectTimeLog |
| **data** | `modules/data/` | 药品目录数据 | DataDrugItem, DataCatalog, DataMedicalItem |
| **audit** | `modules/audit/` | 审核管理 | AuditConfig, AuditOrder, AuditResult |
| **dict** | `modules/dict/` | 字典管理 | DictType, DictInfo |
| **task** | `modules/task/` | 定时任务 | TaskInfo, TaskLog |
| **space** | `modules/space/` | 文件空间 | SpaceInfo, SpaceType |
@ -219,9 +218,8 @@ VALUES (158, '项目详情', '/project/detail', 'modules/project/views/detail.vu
| 模块 | 路由前缀 | 用途 |
|------|---------|------|
| **base** | `/` | 登录(Canvas星河动画)、用户、角色、菜单、部门 |
| **agent** | `/agent/*` | Agent 对话(WebSocket)、Skill 管理、模型渠道管理 |
| **project** | `/project/*` | 项目管理(甘特图/日历/看板/列表) |
| **data** | `/data/*` | 药品目录数据管理 |
| **agent** | `/agent/*` | 智能体对话(WebSocket)、技能管理、模型渠道管理 |
| **audit** | `/audit/*` | 审核订单管理 |
| **dict** | `/dict/*` | 字典管理 |
| **task** | `/task/*` | 定时任务 |
| **space** | `/space/*` | 文件空间 |
@ -244,5 +242,5 @@ NODE_ENV=development
BACKEND_PORT=8003
DB_HOST=120.48.5.80
DB_PORT=3306
DB_DATABASE=neta_test
DB_DATABASE=cpu_guard
```

View File

@ -1,6 +1,6 @@
# GPU Guard - GPU 智能监控与防护平台
# GPU Guard - GPU 智能管理审核平台
> 基于 Midway.js + Vue 3 + AI引擎 的智能 GPU 监控平台Monorepo 架构
> 基于 Midway.js + Vue 3 + AI引擎 的智能 GPU 管理平台Monorepo 架构
## 技术架构
@ -14,7 +14,7 @@
## 项目结构
```
Neta-monorepo/
GPU_GUARD_MONOREPO/
├── packages/
│ ├── backend/ # Midway.js 后端 (Cool Admin 框架)
│ ├── frontend/ # Vue 3 前端 (Cool Admin UI)

View File

@ -5,7 +5,7 @@
````md
# 赛力斯 AI 审核 Agent
你是 TYCM 车主权益管理系统的“赛力斯审核 Agent”也是 `oemId=11` 的品牌审核子 Agent。你的任务是根据 TYCM 输入的订单/理赔 JSON、已识别 OCR/结构化字段、附件证据、已绑定技能结果和赛力斯业务规则,输出一个可被 RZYX AI Flow 落库、生成审核报告并回调 TYCM 的审核结论。
你是 TYCM 车主权益管理系统的“赛力斯审核 Agent”也是 `oemId=11` 的品牌审核子 Agent。你的任务是根据 TYCM 输入的订单/理赔 JSON、已识别 OCR/结构化字段、附件证据、已绑定技能结果和赛力斯业务规则,输出一个可被 RZYX GPU Guard 落库、生成审核报告并回调 TYCM 的审核结论。
你必须严谨、保守、可追溯。不得编造 OCR 结果、图片内容、视频内容、材料字段、工具调用结果或规则依据。URL 只能证明“存在附件地址”,不能证明附件内容。

View File

@ -1,4 +1,4 @@
# Neta 会话内 Subagent 设计
# GPU Guard 会话内 Subagent 设计
日期2026-04-18

View File

@ -1,4 +1,4 @@
# Neta Windows 离线安装方案设计
# GPU Guard Windows 离线安装方案设计
> 日期2026-04-25
> 状态:待实施
@ -6,8 +6,8 @@
## 目标
Neta AI 电商平台Vue 3 前端 + Midway.js 后端)打包为 **单个离线 Windows 安装器 exe**
目标用户是 Windows 电商用户,安装后双击即可使用,无需安装 Node.js、数据库等开发环境。
GPU Guard 智能管理审核平台Vue 3 前端 + Midway.js 后端)打包为 **单个离线 Windows 安装器 exe**
目标用户是 Windows 用户,安装后双击即可使用,无需安装 Node.js、数据库等开发环境。
## 约束
@ -22,7 +22,7 @@
## 1. 安装后目录结构
```
[安装目录,默认 C:\Program Files\Neta]
[安装目录,默认 C:\Program Files\GPUGuard]
├── backend.exe # 主程序pkg 产物,内含前端静态资源)
├── config.yaml # 运行配置(安装器生成,用户可编辑)
├── unins000.exe # 卸载器Inno Setup 自动生成)
@ -30,7 +30,7 @@
```
```
[数据目录,默认 C:\NetaData安装时用户选择]
[数据目录,默认 C:\GPUGuardData安装时用户选择]
├── uploads/ # 文件上传(原 {cwd}/dist/upload/
├── cache/ # 文件缓存(原 {cwd}/dist/cache/
├── plugins/ # 插件文件(原 {cwd}/dist/plugin/
@ -116,7 +116,7 @@ server:
port: 8003
data:
dir: "C:\\NetaData" # 安装器写入用户选择的数据目录绝对路径
dir: "C:\\GPUGuardData" # 安装器写入用户选择的数据目录绝对路径
autoOpenBrowser: true
@ -189,8 +189,8 @@ config.yaml 外部配置 > config.prod.ts 内置默认值 > config.default.ts
```
双击 setup.exe
→ 欢迎页
→ 选择安装目录(默认 C:\Program Files\Neta
→ 选择数据目录(默认 C:\NetaData
→ 选择安装目录(默认 C:\Program Files\GPUGuard
→ 选择数据目录(默认 C:\GPUGuardData
→ 勾选项:
☑ 创建桌面快捷方式
☐ 开机自动启动
@ -203,7 +203,7 @@ config.yaml 外部配置 > config.prod.ts 内置默认值 > config.default.ts
### 4.2 卸载流程
```
控制面板 → 卸载 Neta(或运行 unins000.exe
控制面板 → 卸载 GPU Guard(或运行 unins000.exe
→ 停止正在运行的 backend.exe 进程(检查 neta.lock
→ 弹窗:"是否同时删除本地数据uploads、日志、agent 存储)"
→ 是:删除数据目录
@ -279,7 +279,7 @@ exec(`start http://127.0.0.1:${port}`);
```
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
Neta = "C:\Program Files\Neta\backend.exe"
GPUGuard = "C:\Program Files\GPUGuard\backend.exe"
```
卸载时清除。
@ -321,7 +321,7 @@ HKCU\Software\Microsoft\Windows\CurrentVersion\Run
### 6.6 数据目录位置约束
安装器在选择数据目录时需要提示:
- **推荐本地磁盘路径**(如 `D:\NetaData`
- **推荐本地磁盘路径**(如 `D:\GPUGuardData`
- **不推荐网络驱动器 / NAS / 可移动 U 盘**
原因:

View File

@ -2,7 +2,7 @@
"name": "gpu-guard-monorepo",
"version": "0.1.0",
"private": true,
"description": "GPU Guard - GPU 智能监控与防护平台",
"description": "GPU Guard - GPU 智能管理审核平台",
"pnpm": {
"overrides": {
"@cool-midway/core": "8.0.7"

View File

@ -2,7 +2,7 @@
## 项目概述
GPU Guard 后端 - 基于 Midway.js + Cool Admin 框架的 GPU 智能监控平台后端。
GPU Guard 后端 - 基于 Midway.js + Cool Admin 框架的 GPU 智能管理审核平台后端。
**技术栈**: Midway.js 3.20 + TypeScript 5.9 + TypeORM + Cool Admin 8.x + MySQL 8+
**端口**: 8003

View File

@ -1,6 +1,6 @@
# AI Flow Backend - 进度追踪文件
# 每次AI会话结束时必须更新此文件
# 新的AI会话开始时必须首先阅读此文件
# GPU Guard Backend - 进度追踪文件
# 每次GPU Guard会话结束时必须更新此文件
# 新的GPU Guard会话开始时必须首先阅读此文件
## 项目当前状态 (截至 2026-04-12)

View File

@ -1,13 +1,13 @@
#!/bin/bash
# AI Flow Backend Docker 构建和部署脚本
# GPU Guard Backend Docker 构建和部署脚本
# 适用于 Node.js + Midway.js + Cool Admin 项目
set -e # 遇到错误立即退出
# 项目配置
group_name='ai-flow'
app_name='ai-flow-backend'
group_name='gpu-guard'
app_name='gpu-guard-backend'
app_version='latest'
app_port=8002
@ -36,7 +36,7 @@ log_error() {
}
echo ""
log_info "开始 AI Flow Backend 部署流程..."
log_info "开始 GPU Guard Backend 部署流程..."
echo "========================================"
# 检查 Docker 是否安装
@ -150,7 +150,7 @@ if docker exec ${app_name} cat package.json | grep -q "redis"; then
fi
echo ""
log_success "🎉 AI Flow Backend 部署完成!"
log_success "🎉 GPU Guard Backend 部署完成!"
echo "========================================"
echo "容器名称: ${app_name}"
echo "访问地址: http://localhost:${app_port}"

View File

@ -375,7 +375,7 @@
"description": "TYCM审核对接 - 投保订单AI审核流程",
"steps": [
"设计投保审核流程节点编排",
"实现TYCM→AI Flow的API对接接口",
"实现TYCM→GPU Guard的API对接接口",
"接收投保订单数据",
"OCR识别证件/材料",
"规则校验",
@ -392,7 +392,7 @@
"description": "TYCM审核对接 - 理赔订单AI审核流程",
"steps": [
"设计理赔审核流程节点编排",
"实现TYCM→AI Flow的API对接接口",
"实现TYCM→GPU Guard的API对接接口",
"接收理赔申请数据",
"图片/视频OCR分析",
"损伤评估",

View File

@ -1,8 +1,8 @@
#!/bin/bash
# AI Flow Backend - 环境初始化脚本
# 每次AI会话开始时运行此脚本快速启动开发环境
# GPU Guard Backend - 环境初始化脚本
# 每次GPU Guard会话开始时运行此脚本快速启动开发环境
echo "=== AI Flow Backend 环境初始化 ==="
echo "=== GPU Guard Backend 环境初始化 ==="
# 1. 检查 Node.js 版本
echo "[1/4] 检查 Node.js 版本..."

View File

@ -1,7 +1,7 @@
{
"name": "@gpu-guard/backend",
"version": "8.0.0",
"description": "GPU Guard 平台后端 - 基于 Midway.js + Cool Admin 的 GPU 智能监控引擎",
"description": "GPU Guard 平台后端 - 基于 Midway.js + Cool Admin 的 GPU 智能管理审核引擎",
"private": true,
"overrides": {
"@cool-midway/core": "8.0.7"

View File

@ -1,6 +1,6 @@
# TYCM agent-invoke-callback回推协议
TYCM 当前 AI Flow Agent 回调只使用 `/agent-invoke-callback`。旧 `/ai-audit-callback` 已废弃,本技能仅把它作为误传 URL 的兼容输入,发送前会自动改写为 `/agent-invoke-callback`
TYCM 当前 GPU Guard Agent 回调只使用 `/agent-invoke-callback`。旧 `/ai-audit-callback` 已废弃,本技能仅把它作为误传 URL 的兼容输入,发送前会自动改写为 `/agent-invoke-callback`
## 接口

View File

@ -951,5 +951,316 @@
]
}
]
},
{
"name": "智能体管理",
"router": null,
"perms": null,
"type": 0,
"icon": "icon-ai",
"orderNum": 5,
"viewPath": null,
"keepAlive": true,
"isShow": true,
"childMenus": [
{
"name": "智能体对话",
"router": "/agent/chat",
"perms": null,
"type": 1,
"icon": "icon-chat",
"orderNum": 0,
"viewPath": "modules/agent/views/chat.vue",
"keepAlive": true,
"isShow": true,
"childMenus": []
},
{
"name": "智能体管理",
"router": "/agent/agents",
"perms": null,
"type": 1,
"icon": "icon-agent",
"orderNum": 1,
"viewPath": "modules/agent/views/agent-list.vue",
"keepAlive": true,
"isShow": true,
"childMenus": [
{
"name": "权限",
"router": null,
"perms": "netaclaw:agent:page,netaclaw:agent:list,netaclaw:agent:info,netaclaw:agent:add,netaclaw:agent:delete,netaclaw:agent:update",
"type": 2,
"icon": null,
"orderNum": 0,
"viewPath": null,
"keepAlive": true,
"isShow": true,
"childMenus": []
}
]
},
{
"name": "工具管理",
"router": "/agent/tools",
"perms": null,
"type": 1,
"icon": "icon-tool",
"orderNum": 2,
"viewPath": "modules/agent/views/tools.vue",
"keepAlive": true,
"isShow": true,
"childMenus": [
{
"name": "权限",
"router": null,
"perms": "netaclaw:tool:page,netaclaw:tool:list,netaclaw:tool:update,netaclaw:tool:sync",
"type": 2,
"icon": null,
"orderNum": 0,
"viewPath": null,
"keepAlive": true,
"isShow": true,
"childMenus": []
}
]
},
{
"name": "技能管理",
"router": "/agent/skills",
"perms": null,
"type": 1,
"icon": "icon-skill",
"orderNum": 3,
"viewPath": "modules/agent/views/skills.vue",
"keepAlive": true,
"isShow": true,
"childMenus": [
{
"name": "权限",
"router": null,
"perms": "netaclaw:skill:metas,netaclaw:skill:setStatus,netaclaw:skill:install,netaclaw:skill:uninstall,netaclaw:skill:upgrade",
"type": 2,
"icon": null,
"orderNum": 0,
"viewPath": null,
"keepAlive": true,
"isShow": true,
"childMenus": []
}
]
},
{
"name": "模型管理",
"router": "/agent/model-channel",
"perms": null,
"type": 1,
"icon": "icon-model",
"orderNum": 4,
"viewPath": "modules/agent/views/model-channel.vue",
"keepAlive": true,
"isShow": true,
"childMenus": [
{
"name": "权限",
"router": null,
"perms": "netaclaw:model_channel:page,netaclaw:model_channel:add,netaclaw:model_channel:update,netaclaw:model_channel:delete,netaclaw:model_channel:testConnection",
"type": 2,
"icon": null,
"orderNum": 0,
"viewPath": null,
"keepAlive": true,
"isShow": true,
"childMenus": []
}
]
},
{
"name": "频道管理",
"router": "/agent/channel-management",
"perms": null,
"type": 1,
"icon": "icon-channel",
"orderNum": 5,
"viewPath": "modules/agent/views/channel-management.vue",
"keepAlive": true,
"isShow": true,
"childMenus": [
{
"name": "权限",
"router": null,
"perms": "netaclaw:agent_channel:page,netaclaw:agent_channel:add,netaclaw:agent_channel:update,netaclaw:agent_channel:delete,netaclaw:agent_channel:disconnect,netaclaw:agent_channel:restart",
"type": 2,
"icon": null,
"orderNum": 0,
"viewPath": null,
"keepAlive": true,
"isShow": true,
"childMenus": []
}
]
},
{
"name": "检测结果",
"router": "/agent/detection-result",
"perms": null,
"type": 1,
"icon": "icon-detection",
"orderNum": 6,
"viewPath": "modules/agent/views/detection-result.vue",
"keepAlive": true,
"isShow": true,
"childMenus": []
},
{
"name": "智能体编排",
"router": "/agent/crew-editor",
"perms": null,
"type": 1,
"icon": "icon-crew",
"orderNum": 7,
"viewPath": "modules/agent/views/crew-editor.vue",
"keepAlive": true,
"isShow": true,
"childMenus": []
},
{
"name": "运行监控",
"router": "/agent/crew-monitor",
"perms": null,
"type": 1,
"icon": "icon-monitor",
"orderNum": 8,
"viewPath": "modules/agent/views/crew-monitor.vue",
"keepAlive": true,
"isShow": true,
"childMenus": []
},
{
"name": "记忆管理",
"router": "/agent/memory",
"perms": null,
"type": 1,
"icon": "icon-memory",
"orderNum": 9,
"viewPath": "modules/agent/views/memory.vue",
"keepAlive": true,
"isShow": true,
"childMenus": [
{
"name": "权限",
"router": null,
"perms": "netaclaw:memory:page,netaclaw:memory:add,netaclaw:memory:update,netaclaw:memory:delete,netaclaw:memory_type:list,netaclaw:memory_type:add,netaclaw:memory_type:delete",
"type": 2,
"icon": null,
"orderNum": 0,
"viewPath": null,
"keepAlive": true,
"isShow": true,
"childMenus": []
}
]
}
]
},
{
"name": "审核管理",
"router": null,
"perms": null,
"type": 0,
"icon": "icon-audit",
"orderNum": 6,
"viewPath": null,
"keepAlive": true,
"isShow": true,
"childMenus": [
{
"name": "审核订单",
"router": "/audit/orders",
"perms": null,
"type": 1,
"icon": "icon-order",
"orderNum": 0,
"viewPath": "modules/audit/views/order-list.vue",
"keepAlive": true,
"isShow": true,
"childMenus": [
{
"name": "权限",
"router": null,
"perms": "audit:order:page,audit:order:list,audit:order:info,audit:order:add,audit:order:update",
"type": 2,
"icon": null,
"orderNum": 0,
"viewPath": null,
"keepAlive": true,
"isShow": true,
"childMenus": []
}
]
},
{
"name": "审核配置",
"router": "/audit/config",
"perms": null,
"type": 1,
"icon": "icon-config",
"orderNum": 1,
"viewPath": "modules/audit/views/config.vue",
"keepAlive": true,
"isShow": true,
"childMenus": [
{
"name": "权限",
"router": null,
"perms": "audit:config:page,audit:config:list,audit:config:info,audit:config:add,audit:config:update,audit:config:delete",
"type": 2,
"icon": null,
"orderNum": 0,
"viewPath": null,
"keepAlive": true,
"isShow": true,
"childMenus": []
}
]
},
{
"name": "审核统计",
"router": "/audit/dashboard",
"perms": null,
"type": 1,
"icon": "icon-dashboard",
"orderNum": 2,
"viewPath": "modules/audit/views/dashboard.vue",
"keepAlive": true,
"isShow": true,
"childMenus": []
}
]
},
{
"name": "本体建模",
"router": null,
"perms": null,
"type": 0,
"icon": "icon-tree",
"orderNum": 10,
"viewPath": null,
"keepAlive": true,
"isShow": true,
"childMenus": [
{
"name": "模型树管理",
"router": "/ontology/model-tree",
"perms": null,
"type": 1,
"icon": "icon-tree",
"orderNum": 0,
"viewPath": "modules/ontology/views/model-tree.vue",
"keepAlive": true,
"isShow": true,
"childMenus": []
}
]
}
]

View File

@ -1,4 +1,4 @@
# AI Flow 审核平台后端项目审核报告
# GPU Guard 审核平台后端项目审核报告
## 一、项目基本信息
- 项目名称:@neta/backend
- 版本号8.0.0

View File

@ -2,7 +2,7 @@
## 项目概述
GPU Guard 前端 - 基于 Vue 3 + Cool Admin UI 的 GPU 智能监控平台前端。
GPU Guard 前端 - 基于 Vue 3 + Cool Admin UI 的 GPU 智能管理审核平台前端。
**技术栈**: Vue 3.5 + TypeScript 5.5 + Vite 5.4 + Element Plus 2.9 + Pinia
**端口**: 9001

View File

@ -1,6 +1,6 @@
# AI Flow Frontend - 进度追踪文件
# 每次AI会话结束时必须更新此文件
# 新的AI会话开始时必须首先阅读此文件
# GPU Guard Frontend - 进度追踪文件
# 每次GPU Guard会话结束时必须更新此文件
# 新的GPU Guard会话开始时必须首先阅读此文件
## 项目当前状态 (截至 2026-04-12)

View File

@ -1,8 +1,8 @@
#!/bin/bash
# AI Flow Frontend - 环境初始化脚本
# 每次AI会话开始时运行此脚本快速启动开发环境
# GPU Guard Frontend - 环境初始化脚本
# 每次GPU Guard会话开始时运行此脚本快速启动开发环境
echo "=== AI Flow Frontend 环境初始化 ==="
echo "=== GPU Guard Frontend 环境初始化 ==="
# 1. 检查 Node.js 版本
echo "[1/4] 检查 Node.js 版本..."

View File

@ -23,7 +23,7 @@
/>
<section class="conversation-panel">
<conversation-header
:title="currentAgent?.label || currentAgent?.name || 'GPU Guard Runtime'"
:title="currentAgent?.label || currentAgent?.name || 'GPU Guard 管理审核'"
:entry-count="visibleConversationEntries.length"
:session-provider-label="sessionProviderLabel"
:session-cwd-label="sessionCwdLabel"

View File

@ -12,7 +12,7 @@
<span>{{ app.info.name }}</span>
</div>
<p class="desc">{{ $t('GPU 智能监控与防护平台') }}</p>
<p class="desc">{{ $t('GPU 智能管理审核平台') }}</p>
<div class="form">
<el-form label-position="top" class="form" :disabled="saving">

View File

@ -21,7 +21,7 @@ const services = [
}
]
console.log('🚀 启动 AI Flow 服务...\n')
console.log('🚀 启动 GPU Guard 服务...\n')
console.log('各服务将在独立终端窗口中运行:')
console.log(' - 后端: http://localhost:8003')
console.log(' - 前端: http://localhost:9001')