feat(console): CHV executor option in dispatch/env selectors + experimental note in detail/list

- DispatchSection: add cloud-hypervisor option (labelled experimental,
  default off); default stays docker; hint states a KVM-host CHV worker
  must claim the task (otherwise it stays queued; attachments are
  rejected by the backend at creation) and that the frontend only passes
  the executor value through, never bypassing the backend allowlist.
- EnvSection: same option, because the backend env-create allowlist
  (local/docker/cloud-hypervisor) does allow it; note states env
  allowlist excludes cloud.
- TaskListSection: add cloud-hypervisor to the executor filter so CHV
  tasks are findable; list rows already showed executor.
- TaskDetailPanel: pure display note for cloud-hypervisor tasks
  (experimental, default off, no VM controls); detail already showed
  executor from the task API.
- README: document the CHV console entry, experimental marking, and
  verbatim backend-error display.
- Rebuilt cloud/console.html from src (tsc + vite single-file build);
  no backend change: executor is already returned by _task_to_dict.
This commit is contained in:
host committed 2026-10-31 02:25:21 +00:00
1 parent 445376743d
commit 036323e620
6 files changed
+29 -19

No files matched your search

+8
View File
@@ -199,6 +199,14 @@ python3 -m cloud.server # 默认 127.0.0.1:8765,生产经 nginx + TLS
# 除 GET /health、/webhooks/*、/oauth/* 外,所有端点都要 X-API-Key 请求头
# 任务实时链路:GET /tasks/{id}/trace(快照)与 GET /tasks/{id}/trace/stream(SSE)
# 命令台:GET /console(每次现读 cloud/console.html,无需重启)
# CHV 前端入口(实验,默认关闭):新建任务与新建环境的执行器下拉里有
# cloud-hypervisor 选项;任务详情与任务列表的执行器筛选同样展示它。
# 前端只传 executor 值,安全边界仍在后端白名单(任务接口 allowlist 含
# cloud-hypervisor,环境接口 allowlist 为 local/docker/cloud-hypervisor);
# 需后端有 KVM 宿主上的 CHV worker 才会认领,否则任务一直排队,带附件
# 时建任务即被后端拒绝,拒绝文案经控制台原样展示(“提交失败:…”)。
# 详情页只有实验提示,没有 VM 暂停/恢复/关机/快照等控制按钮;VM 状态、
# IP、快照、预热池字段后端任务接口不返回,前端不展示、不编造。
```
- **任务状态机**:`queued → running → completed / failed /