fix: remove non-existent task queue, document actual GIS Actions direct-execution flow

This commit is contained in:
2026-07-16 02:50:04 +00:00
parent ff13bf0a60
commit 5de2650fab
@@ -146,7 +146,7 @@ suite_file_type_mappings — 文件类型映射
| Workflow 引擎 | `services/workflow.py` | DAG 拓扑排序,`$steps.xxx.yyy` / `$inputs.xxx` 参数解析,节点执行 |
| 合规检测 | `services/compliance.py` + `routers/compliance.py` | 仅基础格式检查(params_schema/steps/exists),无代码安全审计 |
| 参数解析 | `services/param_resolver.py` | 参数引用解析(`$steps.xxx` / `$inputs.xxx` |
| 任务队列 | `services/queue.py` | 简化版任务记录(内存存储,无 Redis Worker |
| ~~任务队列~~ | ~~`services/queue.py`~~ | **已废弃** — 仅存内存空壳字典,无实际功能 |
| 角色守卫 | `services/role_guard.py` | 角色权限控制 |
| 认证守卫 | `auth_guard.py` | JWT / API Key 认证中间件 |
@@ -273,20 +273,37 @@ Auth Center 内置 OAuth2 服务端,支持:
发布入口:`suites.mercator.cn/publish`
### 4.2 任务执行
### 4.2 GIS Actions 本地执行流程
**当前简化实现:** 任务队列是本地内存记录(`services/queue.py`,没有常驻 Worker 进程
任务创建后返回 `task_id`,由调用方通过 GIS Actions 本地执行。
**预期完整流程(待 GIS Actions 实现):**
**平台上没有任务队列,没有 Worker。** GIS Actions 直接从套件市场获取套件并本地执行:
```
AI Agent 下发任务 → POST /api/v1/suites/{id}/execute
GIS Actions 拉取任务 → 下载脚本包 → docker run 执行 → 回传结果
GIS Actions (用户本地):
python cli.py run <work_dir> --suite-id <ID>
1. 请求 GET suites.mercator.cn/api/v1/suites/{id}
→ 返回 params_schema / package_url 等元信息
2. 从 package_url 下载脚本包(Gitea Generic Packages
→ wget https://git.mercator.cn/api/packages/...
3. 解压 → 读取 workflow.yaml
4. steps_executor.execute_steps()
├── 解析依赖拓扑(depends_on
├── 每个步骤:docker run --rm gis-base ...
└── 传递步骤间输出
5. 清理:删除下载的 tgz 和解压的套件目录
```
**用户也可以通过 CLI 直接指定 --package-url 跳过市场查询。**
### 4.3 基础镜像
```
@@ -343,7 +360,7 @@ Auth Center 与 Suite Market / Discussions 通过 API 调用互通:
|------|------|--------|
| **用户反馈通道缺失** | 本地使用套件出问题,没有渠道报给开发者 | 高 |
| **未验证 GIS Actions 就绪状态** | 套件市场已上线,但 GIS Actions(本地执行器)的发布通道、用户安装流程未验证 | 中
| **无任务 Worker** | 队列只有内存记录,没有实际调度执行 | 中 |
| **无任务 Worker** | 平台上根本不存在任务队列和 Worker,执行全靠 GIS Actions 本地直连 Gitea 下载 | 中 |
| **合规检测基本是空壳** | 仅检查 params_schema/output_schema/steps 格式,不扫代码、不验引用(系统中已无独立的 skill 概念) | 中 |
| **无监控告警** | 服务挂了没人知道 | 中 |
| **脚本清理未落地** | 知识产权保护机制待实现 | 低(GIS Actions 未跑之前无需) |