Files
realizemultiagent/系统自检.bat
2026-04-02 00:59:42 +08:00

131 lines
3.4 KiB
Batchfile
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
chcp 65001 >nul
echo.
echo ========================================
echo 多Agent系统 - 系统自检工具
echo ========================================
echo.
echo [1/6] 🔍 检查系统目录结构...
if not exist "D:\openclaw-multi-agent\" (
echo ❌ 错误: 系统目录不存在
goto error
)
echo ✅ 系统目录存在: D:\openclaw-multi-agent\
echo [2/6] 📁 检查关键文件...
set missing=0
if not exist "system-api\api-spec.json" (
echo ❌ 缺失: system-api\api-spec.json
set /a missing+=1
)
if not exist "system-api\system-state.json" (
echo ❌ 缺失: system-api\system-state.json
set /a missing+=1
)
if not exist "system-api\model-context.md" (
echo ❌ 缺失: system-api\model-context.md
set /a missing+=1
)
if not exist "任务指令系统.md" (
echo ❌ 缺失: 任务指令系统.md
set /a missing+=1
)
if not exist "快速指令卡.md" (
echo ❌ 缺失: 快速指令卡.md
set /a missing+=1
)
if %missing% gtr 0 (
echo ⚠️ 警告: 缺失 %missing% 个关键文件
) else (
echo ✅ 所有关键文件存在
)
echo [3/6] 📊 检查系统状态...
if exist "system-api\system-state.json" (
for /f "tokens=2 delims=:" %%a in ('findstr /c:"\"health\"" "system-api\system-state.json"') do (
set health=%%a
)
set health=%health:"=%
set health=%health:,=%
echo ✅ 系统健康状态: %health%
) else (
echo ❌ 无法读取系统状态
)
echo [4/6] 📈 统计项目数据...
if exist "shared\tasks\" (
dir /b "shared\tasks\*.md" 2>nul | find /c /v "" >nul
if errorlevel 1 (
echo ℹ️ 任务目录: 0个任务文件
) else (
for /f %%a in ('dir /b "shared\tasks\*.md" ^| find /c /v ""') do (
echo ✅ 任务目录: %%a个任务文件
)
)
) else (
echo ⚠️ 任务目录不存在
)
echo [5/6] 🤖 检查Agent配置...
if exist "system-api\system-state.json" (
for /f "tokens=2 delims=:" %%a in ('findstr /c:"\"agents\"" "system-api\system-state.json" ^| find /c /v ""') do (
set agent_count=%%a
)
echo ✅ Agent配置: 检测到Agent定义
) else (
echo ⚠️ 无法检查Agent配置
)
echo [6/6] 🔧 检查工具可用性...
if exist "查看指令.bat" (
echo ✅ 指令查看工具: 可用
) else (
echo ❌ 指令查看工具: 缺失
)
if exist "系统自检.bat" (
echo ✅ 自检工具: 可用
) else (
echo ❌ 自检工具: 缺失 (但正在运行?)
)
echo.
echo ========================================
echo 📋 自检完成摘要
echo ========================================
echo.
echo 📍 系统位置: D:\openclaw-multi-agent\
echo 📁 关键文件: 检查完成
echo 🩺 系统健康: %health%
echo 📊 项目统计: 任务文件已统计
echo 🤖 Agent状态: 配置存在
echo 🛠️ 工具状态: 基本工具可用
echo.
echo 💡 建议操作:
echo 1. 运行 "查看指令.bat" 了解可用指令
echo 2. 使用 "/状态 系统" 查看详细状态
echo 3. 使用 "/项目 列表" 查看所有项目
echo 4. 使用 "/帮助 指令" 获取帮助
echo.
echo 🚀 快速开始指令:
echo /网站 "[需求]" "[时间]"
echo /应用 "[需求]" "[时间]"
echo /状态 系统
echo /项目 列表
echo.
echo ========================================
echo 按任意键返回...
pause >nul
:error
echo.
echo ❌ 自检过程中发现错误
echo 请检查系统完整性或联系维护人员
pause >nul
exit /b 1