[aide] finish: 任务完成

新增环境安装 Commands:
- /aide:install-win - Windows 环境安装命令
- /aide:install-linux - Linux 环境安装命令

新增离线安装程序:
- aide-program/offline-installer/windows/
- aide-program/offline-installer/linux/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-17 05:22:38 +08:00
parent bd723629c5
commit ba70fafa15
23 changed files with 3610 additions and 376 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

View File

@@ -0,0 +1,166 @@
@startuml install-linux-logic
title /aide:install-linux 命令执行逻辑
start
:检测操作系统;
if (是 Linux?) then (是)
:继续执行;
else (否)
:提示用户使用 /aide:install-win;
stop
endif
partition "系统识别" {
:检测 Linux 发行版;
note right
/etc/os-release
lsb_release -a
end note
switch (发行版类型)
case (Debian/Ubuntu)
:包管理器 = apt;
case (RHEL/Fedora)
:包管理器 = dnf;
case (Arch)
:包管理器 = pacman;
case (其他)
:包管理器 = 手动;
endswitch
}
partition "环境检测" {
:检测 uv 是否可用;
note right: uv --version
:检测 Python 是否可用;
note right: python3 --version 或 uv python list
:检测 Java 是否可用;
note right: java -version
:汇总检测结果;
}
if (所有工具都已安装?) then (是)
:显示环境状态;
:跳转到 aide PATH 配置;
else (否)
:生成缺失工具列表;
endif
partition "安装模式选择" {
:询问用户选择安装模式;
switch (用户选择)
case (模式 A: 自动安装)
:进入自动安装流程;
case (模式 B: 手动指南)
:进入手动指南流程;
endswitch
}
partition "模式 A: 自动安装" {
:=== 生成安装报告 ===;
:列出将要执行的操作;
:说明安装位置;
:说明可能的副作用;
:说明潜在风险;
:请求用户确认;
if (用户确认?) then (是)
:=== 执行安装 ===;
if (需要安装 uv?) then (是)
:执行 uv 安装;
note right
curl -LsSf https://astral.sh/uv/install.sh | sh
end note
:重新加载 shell 环境;
:验证 uv 安装;
endif
if (需要安装 Python?) then (是)
:通过 uv 安装 Python;
note right: uv python install 3.11
:验证 Python 安装;
endif
if (需要安装 Java?) then (是)
switch (包管理器)
case (apt)
:sudo apt install openjdk-17-jre;
case (dnf)
:sudo dnf install java-17-openjdk-headless;
case (pacman)
:sudo pacman -S jre17-openjdk-headless;
case (手动)
:提供 Adoptium 下载链接;
:指导手动安装;
endswitch
:验证 Java 安装;
endif
:汇报安装结果;
else (否)
:取消安装;
stop
endif
}
partition "模式 B: 手动指南" {
:=== 生成操作指南 ===;
:生成 Markdown 文档;
note right
包含:
- 各发行版的安装命令
- 官方下载链接
- PATH 配置方法
- 常见问题解答
end note
:生成 Shell 脚本;
note right
aide-install.sh
包含完整注释
自动检测发行版
end note
:保存到当前工作目录;
:告知用户文件位置;
}
partition "aide PATH 配置" {
:检测 aide-program 位置;
if (aide 已在 PATH?) then (是)
:显示当前配置;
else (否)
:检测 shell 类型;
note right: bash, zsh, fish
:生成 PATH 配置命令;
note right
添加到 ~/.bashrc 或 ~/.zshrc
export PATH="$PATH:/path/to/aide-program/bin"
end note
:指导用户执行配置;
endif
}
:=== 最终验证 ===;
:运行 aide env ensure --runtime;
if (验证通过?) then (是)
:显示成功信息;
else (否)
:显示问题诊断;
:提供解决建议;
endif
stop
@enduml

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

View File

@@ -0,0 +1,140 @@
@startuml install-win-logic
title /aide:install-win 命令执行逻辑
start
:检测操作系统;
if (是 Windows?) then (是)
:继续执行;
else (否)
:提示用户使用 /aide:install-linux;
stop
endif
partition "环境检测" {
:检测 uv 是否可用;
note right: uv --version
:检测 Python 是否可用;
note right: python --version 或 uv python list
:检测 Java 是否可用;
note right: java -version
:汇总检测结果;
}
if (所有工具都已安装?) then (是)
:显示环境状态;
:跳转到 aide PATH 配置;
else (否)
:生成缺失工具列表;
endif
partition "安装模式选择" {
:询问用户选择安装模式;
switch (用户选择)
case (模式 A: 自动安装)
:进入自动安装流程;
case (模式 B: 手动指南)
:进入手动指南流程;
endswitch
}
partition "模式 A: 自动安装" {
:=== 生成安装报告 ===;
:列出将要执行的操作;
:说明安装位置;
:说明可能的副作用;
:说明潜在风险;
:请求用户确认;
if (用户确认?) then (是)
:=== 执行安装 ===;
if (需要安装 uv?) then (是)
:执行 uv 安装;
note right
irm https://astral.sh/uv/install.ps1 | iex
end note
:验证 uv 安装;
endif
if (需要安装 Python?) then (是)
:通过 uv 安装 Python;
note right: uv python install 3.11
:验证 Python 安装;
endif
if (需要安装 Java?) then (是)
:检测可用的包管理器;
note right: winget, scoop, chocolatey
if (有包管理器?) then (是)
:使用包管理器安装 JRE;
else (否)
:提供 Adoptium 下载链接;
:指导手动安装;
endif
:验证 Java 安装;
endif
:汇报安装结果;
else (否)
:取消安装;
stop
endif
}
partition "模式 B: 手动指南" {
:=== 生成操作指南 ===;
:生成 Markdown 文档;
note right
包含:
- 每个工具的安装步骤
- 官方下载链接
- 环境变量配置
- 常见问题解答
end note
:生成 PowerShell 脚本;
note right
aide-install.ps1
包含完整注释
end note
:保存到当前工作目录;
:告知用户文件位置;
}
partition "aide PATH 配置" {
:检测 aide-program 位置;
if (aide 已在 PATH?) then (是)
:显示当前配置;
else (否)
:生成 PATH 配置命令;
note right
添加到用户环境变量
或修改 $PROFILE
end note
:指导用户执行配置;
endif
}
:=== 最终验证 ===;
:运行 aide env ensure --runtime;
if (验证通过?) then (是)
:显示成功信息;
else (否)
:显示问题诊断;
:提供解决建议;
endif
stop
@enduml

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

View File

@@ -0,0 +1,116 @@
@startuml offline-installer-logic
title 离线安装程序执行逻辑
start
:读取程序所在目录;
partition "资源检查" {
:读取 resources.json;
note right
包含:
- uv 安装包路径
- Java JRE 安装包路径
- 校验和信息
end note
:检查必需资源文件;
if (所有资源存在?) then (是)
:验证文件校验和;
if (校验通过?) then (是)
:继续安装;
else (否)
:报告损坏的文件;
:提示重新下载;
stop
endif
else (否)
:列出缺失的资源;
:显示下载链接;
stop
endif
}
partition "安装模式" {
if (有 --silent 参数?) then (是)
:静默安装模式;
:使用默认配置;
else (否)
:交互式安装;
:显示安装选项;
:等待用户确认;
endif
}
partition "执行安装" {
:=== 安装 uv ===;
if (Windows?) then (是)
:解压 uv Windows 包;
:添加到用户 PATH;
else (Linux)
:解压 uv Linux 包;
:安装到 ~/.local/bin;
:更新 shell 配置;
endif
:验证 uv 可用;
:=== 安装 Python ===;
:运行 uv python install;
note right: 使用 uv 管理 Python
:验证 Python 可用;
:=== 安装 Java JRE ===;
if (Windows?) then (是)
if (MSI 安装包?) then (是)
:运行 MSI 静默安装;
else (ZIP 包)
:解压到指定目录;
:配置 JAVA_HOME;
:添加到 PATH;
endif
else (Linux)
:解压 tarball 到 /opt/java;
:创建符号链接;
:更新 alternatives;
endif
:验证 Java 可用;
}
partition "aide 配置" {
:检测 aide-program 位置;
:添加 aide 到 PATH;
if (Windows?) then (是)
:更新用户环境变量;
else (Linux)
:追加到 shell 配置文件;
endif
}
:=== 安装验证 ===;
:显示安装结果;
note right
- uv 版本
- Python 版本
- Java 版本
- aide 路径
end note
:运行 aide env ensure --runtime;
if (全部通过?) then (是)
:安装成功;
:显示后续使用提示;
else (否)
:显示失败项;
:提供故障排除建议;
endif
stop
@enduml