Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@ name: deploy-pages
on:
push:
branches: [main]
paths: ["pages/**", ".github/workflows/deploy-pages.yml"]
paths:
- "agents/**"
- "cloudflare/**"
- "core/**"
- "docs/**"
- "scripts/**"
- "tools/**"
- "pages/**"
- "tests/**"
- "README*.md"
- "CHANGELOG.md"
- "VERSION"
- "install.*"
- "安装指南.md"
- ".github/workflows/deploy-pages.yml"
workflow_dispatch:

permissions:
Expand All @@ -16,8 +30,28 @@ concurrency:
cancel-in-progress: true

jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run tests
run: python3 -m unittest discover -s tests -v
- name: Compile Python sources
run: python3 -m py_compile core/*.py scripts/tools/*.py scripts/build-online.py
- name: Build online packages
run: python3 scripts/build-online.py
- name: Verify package payload
shell: bash
run: |
tag="v$(cat VERSION)"
(cd pages && sha256sum -c "agentboot-online-${tag}.tar.gz.sha256" "agentboot-online-${tag}.zip.sha256")
tar -tzf "pages/agentboot-online-${tag}.tar.gz" | grep -F 'AgentBoot/core/menu.py'
python3 -m zipfile -l "pages/agentboot-online-${tag}.zip" | grep -F 'AgentBoot/core/menu.py'

deploy:
runs-on: [self-hosted, windows]
needs: quality
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -26,6 +60,11 @@ jobs:
uses: actions/checkout@v4
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Build online packages
run: |
cp install.sh pages/install.sh
cp scripts/install.ps1 pages/install.ps1
python3 scripts/build-online.py
- name: Upload site artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
146 changes: 146 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: release

on:
push:
tags: ["v*"]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: write

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate tag and version
shell: bash
run: |
if [ "$GITHUB_REF_TYPE" = "tag" ]; then test "$GITHUB_REF_NAME" = "v$(cat VERSION)"; fi
python3 -m unittest discover -s tests -v
python3 -m py_compile core/*.py scripts/*.py scripts/tools/*.py tests/*.py
sh -n install.sh scripts/*.sh pages/install.sh cloudflare/deploy.sh
node --check cloudflare/worker.js

online:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build online packages
run: |
cp install.sh pages/install.sh
cp scripts/install.ps1 pages/install.ps1
python3 scripts/build-online.py
cp install.sh scripts/install.ps1 VERSION pages/
- uses: actions/upload-artifact@v4
with:
name: online
path: |
pages/agentboot-online-*
pages/install.sh
pages/install.ps1
pages/VERSION

offline-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build verified Codex offline package
run: AGENTS=codex PLATFORMS=linux-x64 TAG="v$(cat VERSION)" sh scripts/build-offline.sh
- name: Smoke install, execute, and uninstall
shell: bash
run: |
root="$(mktemp -d)"
mkdir -p "$root/extract" "$root/home"
tag="v$(cat VERSION)"
tar -xzf "dist/AgentBoot-offline-${tag}-linux-x64.tar.gz" -C "$root/extract"
app="$root/extract/AgentBoot"
HOME="$root/home" sh "$app/install-offline.sh" codex
AGENTBOOT_HOME="$root/home/.agentboot" HOME="$root/home" "$root/home/.agentboot/bin/codex" --version
AGENTBOOT_HOME="$root/home/.agentboot" HOME="$root/home" python3 "$root/home/.agentboot/app/core/menu.py" uninstall codex
test ! -e "$root/home/.agentboot/agents/codex"
mv "dist/AgentBoot-offline-${tag}-linux-x64.tar.gz" "dist/AgentBoot-offline-${tag}-linux-x64-codex.tar.gz"
mv "dist/AgentBoot-offline-${tag}-linux-x64-sfx.sh" "dist/AgentBoot-offline-${tag}-linux-x64-codex-sfx.sh"
- uses: actions/upload-artifact@v4
with:
name: offline-linux
path: dist/AgentBoot-offline-*-linux-x64-codex*

offline-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build verified Codex offline package
shell: powershell
run: .\scripts\build-offline.ps1 -Tag ('v' + (Get-Content VERSION -Raw).Trim()) -Platforms win-x64 -Agents codex
- name: Smoke install, execute, and uninstall
shell: powershell
run: |
$root = Join-Path $env:RUNNER_TEMP 'agentboot-smoke'
$extract = Join-Path $root 'extract'
$smokeHome = Join-Path $root 'home'
New-Item -ItemType Directory -Path $extract, $smokeHome -Force | Out-Null
$tag = 'v' + (Get-Content VERSION -Raw).Trim()
tar -xf "dist\AgentBoot-offline-$tag-win-x64.zip" -C $extract
$app = Join-Path $extract 'AgentBoot'
$env:AGENTBOOT_HOME = Join-Path $smokeHome '.agentboot'
$env:USERPROFILE = $smokeHome
$env:LOCALAPPDATA = Join-Path $smokeHome 'LocalAppData'
& "$app\install-offline.ps1" -Agents codex
& "$smokeHome\.agentboot\bin\codex.cmd" --version
python "$env:LOCALAPPDATA\AgentBoot\app\core\menu.py" uninstall codex
if (Test-Path "$smokeHome\.agentboot\agents\codex") { throw 'Codex payload not removed' }
Move-Item "dist\AgentBoot-offline-$tag-win-x64.zip" "dist\AgentBoot-offline-$tag-win-x64-codex.zip"
- uses: actions/upload-artifact@v4
with:
name: offline-windows
path: dist/AgentBoot-offline-*-win-x64-codex.zip

publish:
needs: [validate, online, offline-linux, offline-windows]
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: release
merge-multiple: true
- name: Generate checksums
run: (cd release && find . -maxdepth 1 -type f ! -name SHA256SUMS.txt -print0 | sort -z | xargs -0 sha256sum > SHA256SUMS.txt)
- name: Publish GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$GITHUB_REF_NAME" release/* \
--repo "$GITHUB_REPOSITORY" \
--title "AgentBoot $GITHUB_REF_NAME" \
--prerelease \
--generate-notes \
--verify-tag
- name: Wait for Pages deployment
env:
GH_TOKEN: ${{ github.token }}
run: |
for attempt in $(seq 1 30); do
row=$(gh run list --repo "$GITHUB_REPOSITORY" --workflow deploy-pages --branch main --limit 10 \
--json headSha,conclusion,status -q ".[] | select(.headSha == \"$GITHUB_SHA\") | [.status,.conclusion] | @tsv" | head -n 1)
status=$(printf '%s' "$row" | cut -f1)
conclusion=$(printf '%s' "$row" | cut -f2)
[ "$status" = completed ] && [ "$conclusion" = success ] && exit 0
[ "$status" = completed ] && [ "$conclusion" = failure ] && exit 1
sleep 10
done
exit 1
- name: Wait for primary and mirror endpoints
run: |
for attempt in $(seq 1 60); do
python3 scripts/verify-live-release.py && exit 0
sleep 10
done
exit 1
- name: Promote verified release
env:
GH_TOKEN: ${{ github.token }}
run: gh release edit "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --prerelease=false --latest
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# 更新日志

## v1.1.0 (2026-08-30)

- 新增 Agent 安全卸载:菜单 `[9]`、`agentboot uninstall <id>`、批量卸载与 CoCo `--purge`。
- 新增原子安装归属清单,区分 AgentBoot 管理安装与系统同名命令;兼容可证明归属的 v1 遗留安装。
- 在线、离线、CoCo 与自定义 Agent 安装成功后统一记录来源、包名、命令与安装前缀。
- 新增固定卸载验收、安装追踪集成测试、Python 编译门禁和确定性在线包构建。
- Pages 工作流在核心代码变化时自动测试并重建在线 tar/zip,避免源码与实际下载包脱节。
- `ab` 命令链按每个子命令判定风险,`safe` 真正只读,非交互 `smart` 不再静默放行写操作。
- Node 便携运行时升级到 22.23.2,按 Agent 精确校验最低版本;修复 Windows/ARM/macOS 离线平台映射。
- 在线包新增 SHA-256 旁车校验和原子升级回滚;构建器以临时文件原子发布且结果可复现。
- 自定义脚本仅允许 HTTPS,下载到临时文件后以固定参数执行,消除 URL shell 注入;脚本上限 4 MiB。
- 修正 `ab bench` 首字延迟计时、全部 60 个 Linux 知识库段落索引、`ab` 子命令包装器和 CoCo 数据备份恢复。
- 离线包新增目标机逐文件 SHA-256 校验,`--all` 仅安装包内 MANIFEST 实际列出的 Agent;构建缺载荷会硬失败。
- 修复 Windows CMD shim 百分号格式、npm 真实入口解析和便携 Node 路径,Linux/Windows 均通过原生安装→启动→卸载矩阵。
- Worker 支持 Range/If-Range 与真实资产健康探测;发布采用 prerelease→Pages/Worker live verify→Latest 的协调状态机。
- 修正 Node engine 范围、离线资产名、相对链接、vLLM 文案、移动端表格溢出、触摸目标和旧性能固定数字。

## v1.0.0 (2026-08-29)

首发版本。
Expand Down
46 changes: 29 additions & 17 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
[![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows-blue)](#one-command-install)
[![Agents](https://img.shields.io/badge/Agents-14_indigo)](#supported-agents)
[![Model](https://img.shields.io/badge/Default_model-Agnes_free-orange)](#models)
[![License](https://img.shields.io/badge/License-MIT-green)](../LICENSE)
[![License](https://img.shields.io/badge/License-MIT-green)](LICENSE)

One command to install, mainstream agents to **choose from a menu** (not a bundle);
a **built-in fallback agent** that always works; **full offline** and **slim custom** packages;
a **built-in fallback agent** that always works; **verified slim offline** and **custom-built** packages;
China-network adaptive out of the box. CLI UI in Chinese by default, English switchable.

**Primary entry**: [boot.ide.pub](https://boot.ide.pub) · **Mirror**: [GitHub Pages](https://bit-cook.github.io/AgentBoot/)

**语言 / Language**: [中文 README](../README.md) | **English (this file)**
**语言 / Language**: [中文 README](README.md) | **English (this file)**

</div>

Expand All @@ -39,7 +39,7 @@ Two commands after install:

| Command | Purpose |
|---|---|
| `agentboot` | Console menu (agents / models / mirrors / custom offline builds) — Chinese UI, English switchable via `agentboot lang en` |
| `agentboot` | Console menu (install/uninstall agents, models, mirrors, offline builds) — Chinese UI, English switchable via `agentboot lang en` |
| `ab` | Built-in fallback agent — **free Agnes model, zero config** |

> The one-liner installs AgentBoot itself only — which third-party agents to install is always your choice in the menu.
Expand All @@ -49,12 +49,14 @@ Two commands after install:
| | |
|---|---|
| 📦 **Choose what to install** | 14 mainstream agents, multi-select in the menu |
| 🛟 **Built-in fallback agent** | `ab`: single file, stdlib only, Agnes by default, offline Linux knowledge base, session persistence |
| 🛟 **Built-in fallback agent** | `ab`: zero third-party dependencies, Agnes by default, offline Linux knowledge base, session persistence |
| 🧠 **Model provider manager** | Named custom providers, Ollama/LM Studio presets, failover order, connectivity test |
| 🇨🇳 **China network adaptive** | npmmirror / Node mirrors / Tsinghua PyPI, four-source downloads, proxy support |
| 📴 **Two kinds of offline packages** | Full (0.8–1.6GB per platform) + slim custom builds (e.g. win-x64 + Pi ≈ 89MB) |
| 📴 **Verified offline packages** | Releases provide Codex slim packs tested through install/run/uninstall; menu `[7]` builds other Agents on their target platform |
| ➕ **Custom agents** | Add anything beyond the registry (npm / pip / script), stored in your home dir |
| ⚡ **Extreme performance** | TLS connection reuse (~440ms off per turn), pre-indexed KB (<1ms warm), `/bench` |
| 🧹 **Safe uninstall** | Menu `[9]` or `agentboot uninstall <id>`; removes owned program files and preserves user data by default |
| 🔐 **Verified install** | Enforced SHA-256, atomic app switching, rollback; custom scripts require HTTPS and avoid shell interpolation |
| ⚡ **Measured performance** | TLS connection reuse, pre-indexed KB, and an on-device `/bench` for current network/model conditions |

## Supported agents (14)

Expand All @@ -79,7 +81,7 @@ Package names verified on the npm registry. `✓` = offline payload bundled.

## Built-in fallback agent (ab)

Works when everything else fails — the design baseline:
Works when everything else fails — a Python standard-library core shipped with i18n and knowledge-base resources:

```bash
ab # interactive (Agnes free model by default)
Expand All @@ -96,37 +98,47 @@ ab model # provider manager

## Offline packages

Download from [Releases](https://github.com/bit-cook/AgentBoot/releases), copy to the target machine — no internet, no unzip software needed. Or build your own **slim package** (pick platforms and agents):
Download a platform-and-Agent-specific verified pack from [Releases](https://github.com/bit-cook/AgentBoot/releases). v1.1.0 initially publishes Linux x64 and Windows x64 Codex packs only after CI installs them, runs `codex --version`, and uninstalls them. Build other Agents on their target platform with menu `[7]` or:

```bash
python core/menu.py build-offline win-x64 claude-code,pi
```

Details: [Installation Guide (EN)](docs/en/install-guide.md) · [安装指南 (中文)](../安装指南.md)
Details: [Installation Guide (EN)](docs/en/install-guide.md) · [安装指南 (中文)](安装指南.md)

## Models

- **Agnes free model** (`agnes-2.5-flash`) built-in — zero config;
- Custom OpenAI-compatible providers (named), local models (Ollama / LM Studio), failover order;
- Config: `~/.agentboot/config.json`; switch language: `agentboot lang en`.

## Performance (measured via `ab bench`)
## Uninstall Agents

Open `agentboot` and choose `[9] Uninstall Agents`, or use the CLI:

```bash
agentboot uninstall codex
agentboot uninstall codex,qwen-code # batch uninstall
agentboot uninstall coco --purge # also remove CoCo user data
```
KB query : cold 2.4 ms · warm 0.0 ms
Model TTFB : first (TLS handshake) 1016 ms · reused 579 ms
Reuse benefit : ~437 ms saved per turn
```

AgentBoot records install ownership and will not remove an unrelated command merely because it has the same name. Normal uninstall removes the program, offline payload, and AgentBoot-owned shim while keeping model config, credentials, and sessions. `--purge` currently applies to CoCo and removes its user data as well; AgentBoot does not guess at other projects' data directories. Legacy v1.0.0 installs are removed automatically only when their AgentBoot ownership can be proven.

## Performance (measured via `ab bench`)

`ab bench` measures KB cold/warm queries and first-token latency for a fresh TLS connection versus a reused connection on the current machine and provider. Results vary by network, model, and region and are not a fixed product guarantee.

## Links

- [Installation Guide (EN)](docs/en/install-guide.md) · [安装指南 (中文)](../安装指南.md)
- [Installation Guide (EN)](docs/en/install-guide.md) · [安装指南 (中文)](安装指南.md)
- Primary entry: [boot.ide.pub](https://boot.ide.pub) · Mirror: [GitHub Pages](https://bit-cook.github.io/AgentBoot/)

## Security

- The free Agnes model credentials are built in by design; remove `PRESETS["agnes"]["api_key"]` in `core/agent.py` if you fork;
- Command execution blocks dangerous operations by default (confirm in interactive mode).
- `smart` inspects every command-chain segment, blocks dangerous operations, and requires interactive confirmation for ordinary mutations; non-interactive runs never silently approve writes;
- `safe` permits read-only commands/tools only. Automation that intentionally mutates the machine must explicitly set `confirm=always`.
- Online tar/zip archives are fetched with same-origin `.sha256` sidecars and verified before an atomic app-directory switch; failed upgrades preserve or restore the previous version.

## License

Expand Down
Loading
Loading