Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
2 changes: 2 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
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: Verify generated web assets
run: python3 scripts/sync-web-assets.py --check
- name: Build online packages
run: python3 scripts/build-online.py
- name: Verify package payload
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
validate:
runs-on: ubuntu-latest
runs-on: ${{ vars.AGENTBOOT_LINUX_RUNNER || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
Expand All @@ -24,10 +24,11 @@ jobs:
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
python3 scripts/sync-web-assets.py --check
node --check cloudflare/worker.js

online:
runs-on: ubuntu-latest
runs-on: ${{ vars.AGENTBOOT_LINUX_RUNNER || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
Expand All @@ -48,7 +49,7 @@ jobs:
pages/VERSION

offline-linux:
runs-on: ubuntu-latest
runs-on: ${{ vars.AGENTBOOT_LINUX_RUNNER || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
Expand Down Expand Up @@ -128,7 +129,7 @@ jobs:
publish:
needs: [validate, online, offline-linux, offline-windows, macos-smoke]
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
runs-on: ${{ vars.AGENTBOOT_LINUX_RUNNER || 'ubuntu-latest' }}
environment: release-production
permissions:
contents: write
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ __pycache__/
node_modules/
.DS_Store
Thumbs.db

# 本地性能实验输出(固定基线 performance-baseline.json 需要提交)
performance-run.log
performance-round-*.json
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# 更新日志

## v1.2.0 (2026-08-31)

- 全面重构中英文主页:亮色乐观视觉、桌面/手机自适应、可访问性、品牌 404 与单一 canonical。
- Pages 成为唯一网页源,Worker 自动生成同源资源;HTML 短缓存、版本化静态资源 immutable 缓存与 ETag 304。
- `agentboot` 延迟加载 HTTP/SSL 网络栈与安装专用模块,控制台冷启动显著缩短。
- 新增轻量 `launch.py`,让命令入口复用 Python 字节码缓存;频繁启动菜单实测降低约 34.6%。
- 多 Agent 安装按相同 Node 约束合并 npm 解析与连接,失败自动回退逐个安装;批次内复用 Node、镜像和环境探测。
- npm 安装优先本地缓存并关闭进度与冗余日志;在线安装器移除重复体检,POSIX 安装约减少一次 2 秒级网络检查。
- 内置 Agent 使用紧凑请求 JSON,并在断线重连时复用 TLSContext;保持 TLS 校验、代理与流式安全边界。
- 新增确定性性能基准,覆盖启动、内置 Agent 本地请求、安装调度与主页关键资源,所有实验保留/回退可审计。

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

- 新增 Agent 安全卸载:菜单 `[9]`、`agentboot uninstall <id>`、批量卸载与 CoCo `--purge`。
Expand Down
98 changes: 98 additions & 0 deletions DESIGN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# DESIGN.md — AgentBoot

## 1. Objective

AgentBoot 的每个界面都应让人感到“工具已经准备好,下一步可以轻松开始”:明亮、可靠、有行动感,但不幼稚或喧闹。页面必须像一个经过认真编辑的开源工具,而不是套了营销模板的下载页;质量标准是可长期复用、可直接发布的产品级界面。

## 2. Product Context

- **What the product does:** AgentBoot 用一套可验证的安装流程,在 Linux、macOS 与 Windows 上按需安装、配置和卸载主流 AI Agent。
- **Who it's for:** 同时尝试多个命令行 AI Agent 的开发者与技术爱好者;他们会核对命令、来源和兼容性,希望快速开始,也在意安全边界与离线可用性。
- **Adjacent brands (feel like these):** Linear 的信息纪律、Vercel 文档的技术清晰度、Duolingo 的积极能量。
- **Distant brand (do not feel like this):** 远离典型 Web3 落地页;不使用霓虹渐变、漂浮光球和夸张承诺制造技术感。
- **Cultural register:** 技术可信为底,乐观亲切为表。像一个熟悉终端、愿意把复杂步骤收拾干净的朋友。

## 3. Visual Foundations

### 3a. Color

- **Neutral scale:** `--ink-950: #12251D`, `--ink-800: #294238`, `--ink-600: #5B7067`, `--ink-400: #91A198`, `--paper: #FFFDF5`, `--surface: #FFFFFF`, `--line: #DCE7DF`, `--soft: #F2F7F2`。
- **Accents:** `--green: #137A52` 为主要行动色,`--green-dark: #0D5E3E` 为悬停与高对比状态,`--sun: #FFD84D` 为乐观点睛色,`--coral: #FF7A59` 与 `--sky: #DFF3FF` 只用于结构提示。
- **Semantic:** `--success: #137A52`, `--warning: #A65E00`, `--error: #B42318`, `--info: #176B87`。
- **Usage rules:** 每个视口最多一个实心绿色主按钮;太阳黄承担品牌识别和视觉锚点,不承载小号正文;珊瑚色和天蓝色不得同时铺满大面积背景;正文永远使用中性色。

### 3b. Typography

- **Display face:** `ui-rounded, "Avenir Next Rounded", "SF Pro Rounded", "Segoe UI", sans-serif`,只使用 700 与 800,标题字距 `-0.035em`。
- **Body face:** `Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif`,使用 400、600、700。
- **Monospace:** `"SFMono-Regular", Consolas, "Liberation Mono", monospace`。
- **Type scale:** `12 / 14 / 16 / 18 / 24 / 32 / 48 / 72`,关键尺寸通过 `clamp()` 在相邻级别间平滑缩放。
- **Weight discipline:** 800 只用于 H1 和关键数字,700 用于 H2/H3,600 用于标签与按钮,正文保持 400;不得把整段说明设为半粗体。

### 3c. Spacing & rhythm

- **Base unit:** `4px`。
- **Spacing scale:** `4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 / 128px`。
- **Generous whitespace:** 桌面端主章节垂直内边距为 `96–128px`,平板为 `72–96px`,手机为 `56–72px`;正文行宽不超过 `68ch`,全站容器不超过 `1180px`。

### 3d. Component seeds

- **Button:** 仅三类:绿色实心主操作、白底描边次操作、带方向箭头的文本链接。最小触控高度 `44px`,圆角 `12px`,不使用胶囊按钮。
- **Card / container:** 只在命令、安全说明和深度信息确实需要成组时使用;圆角 `18–24px`、1px 实线边框、无通用阴影。功能列表使用开放式分隔线,不做 3×2 卡片阵列。
- **Iconography:** 使用同一套 1.8px 圆角线性 SVG;图标只辅助动作或状态,不替代文字,不用 Emoji 作为装饰。
- **Brand mark:** 由太阳黄圆点和深绿色终端折线组成,表达“启动”和“向前”,可纯 CSS/SVG 重建。

## 4. Accessibility

- **Text contrast:** 正文至少 4.5:1,大字和 UI 至少 3:1;黄色不直接承载低字号文字。
- **Motion:** 动画只包含 160–420ms 的淡入、位移和状态反馈;`prefers-reduced-motion: reduce` 时关闭非必要动画与平滑滚动。
- **Focus indicators:** 所有可交互元素使用 `3px` 太阳黄外环加 `2px` 纸白间隔,不依赖颜色变化单独表达焦点。
- **Alt text policy:** 装饰性几何图形 `aria-hidden="true"`;信息图形必须用可见文本或准确的 `aria-label` 说明其状态和意义。
- **Interaction floor:** 触控目标至少 `44×44px`;命令行可键盘滚动,复制结果通过礼貌型 live region 通知;页面提供跳到主要内容的链接。

## 5. Voice & Tone

- **Register:** 对话式技术表达,明确但不生硬,积极但不喊口号。
- **Sentence rhythm:** 标题短而有动词;说明句长短混合,一段只传递一个判断。
- **Words this brand uses:** “装好”、“验证”、“按需”、“开始创造”。
- **Words this brand refuses:** “赋能”、“颠覆”、“无缝”、“革命性”、“解锁潜能”。
- **Address:** 中文优先使用省略主语的直接表达,必要时称“你”;英文使用 “you”,不称 “users”。

## 6. Implementation Practices

- **Token format:** 原生 CSS 自定义属性;静态页与 Worker 使用同一份 `pages/assets/site.css` 源文件。
- **Component convention:** 无框架、无运行时依赖的语义 HTML + 原生 CSS/JavaScript;任何浏览器脚本失效时,安装命令、链接和主要信息仍可使用。
- **Image treatment rules:** 不加载图库照片或 AI 位图;品牌表达来自排版、纯色几何和终端界面的代码原生图形。
- **Grid system:** 最大 12 列的流式 CSS Grid;主要采用不对称 `7:5` 首屏、`5:7` 安装区和内容重要性驱动的分栏,而不是等宽卡片矩阵。
- **Motion rules:** `cubic-bezier(.2,.8,.2,1)`,160–420ms;允许轻微上移、颜色和边框转换,禁止弹跳、无限漂浮和视差滚动。
- **Synchronization:** `pages/` 是中英文 HTML、CSS 与 JavaScript 的唯一视觉源;生成脚本把其内容嵌入 Worker,并以检查模式阻止多个线上入口漂移。

## 7. Anti-Patterns

- **No gradient hero backgrounds.** AgentBoot 的乐观感来自高明度纯色和清晰动作,不借用 SaaS 默认霓虹氛围。
- **No Emoji section headings.** 技术可信度由语言、排版和一致线性图形建立,不用聊天式符号凑气氛。
- **No 3×2 feature-card grid.** 功能按重要性分级,用开放式行列与一个重点模块表达,而不是把七项能力压成同样重量。
- **No primary button everywhere.** 首屏和当前安装动作各自只有一个主要视觉重心,其余操作使用描边或文本链接。
- **No empty superlatives.** 不写“强大、无缝、革命性”;每句价值陈述必须能由具体功能或发布验证支持。
- **No forced dark mode.** 用户明确要求亮色,视觉在不同系统主题下保持统一;高对比与夜间阅读通过色值质量解决,不自动翻转品牌。
- **No desktop shrink-down.** 手机布局重新排序、隐藏低价值表格列并扩大触控区,不只是把桌面内容缩小。

## 8. Decision-Making

1. **Accessibility is the floor.** 品牌色、布局或动效与可访问性冲突时,先改设计选择。
2. **Install clarity over visual novelty.** 安装命令、平台区别与安全说明不得为了构图被折叠或隐藏。
3. **One source over local perfection.** Worker、Pages 与镜像必须共享视觉源;不接受某个入口单独手工美化。
4. **Content hierarchy over completeness.** 核心价值先出现,深度能力后展开;同级信息过多时先合并语义,而不是再加卡片。
5. **Optimism over spectacle.** 色彩与微动效鼓励行动,但不抢占命令和文档的阅读注意力。
6. **Distinctive over generic.** 在不损害前五项的前提下,优先采用有 AgentBoot 识别度的结构,而非模板默认组件。

## 9. Workflow

1. 先写清每个页面唯一要完成的用户动作,并确认中英文信息对齐。
2. 用语义 HTML 排出阅读顺序,确保无 CSS/JavaScript 也能完成主要任务。
3. 应用颜色、字阶、空间与组件规则,保持每屏只有一个主要动作。
4. 从 `320px` 手机宽度开始布置,再扩展到平板、桌面和超宽屏。
5. 运行生成/同步检查,保证 Worker、Pages 与站点镜像没有内容漂移。
6. 用键盘、减少动态效果模式和高缩放检查交互与可读性。
7. 在真实浏览器中对中英文页面执行桌面、平板、手机截图和溢出检查。
8. 运行完整自动化测试与线上冒烟,确认安装分发端点未被视觉改动影响。
23 changes: 23 additions & 0 deletions DESIGN_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# AgentBoot design notes

## Current direction

- Bright “launch day” visual language: paper white, action green, sun yellow, small coral/sky accents.
- Editorial landing-page hierarchy with product-UI precision around installation commands.
- Signature element: a code-native terminal inside an orbital launch motif; no external image or font requests.
- `pages/` is the authored source. Cloudflare Worker pages are generated by `scripts/sync-web-assets.py`.

## Validated behavior

- Desktop viewport: 1440×1100, no horizontal overflow.
- Chinese and English mobile viewports: 375×812, no horizontal overflow.
- Brand links and action controls meet the 44px touch target floor.
- Copy buttons use Clipboard API with a legacy fallback and visible success/error states.
- Reduced-motion, visible focus, table overflow, deep-path 404 assets, and light-only color scheme are explicit.

## Avoid next time

- Do not reintroduce gradient heroes, emoji headings, equal-weight feature-card grids, or external font/image dependencies.
- Keep decorative pseudo-elements inside their component bounds; an earlier `right: -13px` spotlight label caused mobile document overflow.
- Do not hand-edit `cloudflare/web-assets.js`; regenerate it from `pages/`.
- Do not publish the osome.work mirror without replacing its historical installer/package copies with the current verified Pages set.
2 changes: 1 addition & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ ab model # provider manager

## Offline packages

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:
Download a platform-and-Agent-specific verified pack from [Releases](https://github.com/bit-cook/AgentBoot/releases). v1.2.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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ab bench # 性能基准

## 离线安装与瘦身定制

到 [Releases](https://github.com/bit-cook/AgentBoot/releases) 下载带平台与 Agent 名称的已验证精简包,拷到目标机解压后运行包内 `install-offline.ps1` / `sh install-offline.sh`。v1.1.0 首批发布 Linux x64 / Windows x64 的 Codex 包,发布流水线会实际执行安装、`codex --version` 和卸载后才上传。
到 [Releases](https://github.com/bit-cook/AgentBoot/releases) 下载带平台与 Agent 名称的已验证精简包,拷到目标机解压后运行包内 `install-offline.ps1` / `sh install-offline.sh`。v1.2.0 首批发布 Linux x64 / Windows x64 的 Codex 包,发布流水线会实际执行安装、`codex --version` 和卸载后才上传。

其他 Agent 使用菜单 `[7]` 或 `build-offline win-x64 claude-code,pi` 在目标平台按需构建。Hermes 含平台相关 Python venv,必须在对应平台构建;Aider 暂不支持离线。

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.2.0
4 changes: 4 additions & 0 deletions cloudflare/DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
`cloudflare/worker.js` 为 `https://boot.ide.pub` 提供:

- `/`、`/en`:中英文产品页;
- `/assets/*`:与 Pages 共用的样式、交互与图标,按版本长期缓存;
- `/install.sh`、`/install.ps1`:当前 Release 安装器;
- `/rel/<asset>`:Release 资产代理,支持 `Range` / `If-Range`;
- `/health`:实际探测当前版本安装器、在线包与 SHA-256 旁车。
Expand Down Expand Up @@ -30,10 +31,13 @@ sh deploy.sh
`deploy.sh` 会执行:

```sh
python3 ../scripts/sync-web-assets.py --check
npx wrangler deploy --config wrangler.jsonc
python3 ../scripts/verify-live-release.py
```

网页以 `pages/` 为唯一源。修改主页、404、CSS、JavaScript 或图标后,先在仓库根目录运行 `python3 scripts/sync-web-assets.py`。CI 与部署脚本会用 `--check` 阻止 Worker 和 Pages 内容漂移。

只有以下条件全部满足才算发布成功:

- `/health` 返回当前 tag 且 `ok=true`;
Expand Down
1 change: 1 addition & 0 deletions cloudflare/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -eu

cd "$(dirname "$0")"
command -v npx >/dev/null 2>&1 || { echo "需要 Node.js/npm 提供 npx" >&2; exit 1; }
python3 ../scripts/sync-web-assets.py --check
echo "==> 使用 Wrangler 部署 Worker boot …"
npx --yes wrangler deploy --config wrangler.jsonc
echo "==> 验证主入口与镜像 …"
Expand Down
2 changes: 2 additions & 0 deletions cloudflare/web-assets.js

Large diffs are not rendered by default.

Loading
Loading