docs: 修 Issue #8 列出的 P0/P1 问题 — workflow 格式、registry 引用、错误 CLI 命令

This commit is contained in:
Ubuntu
2026-07-13 16:59:55 +08:00
parent 9aac5267a3
commit 9a73f4d5c8
5 changed files with 10 additions and 11 deletions
+1 -2
View File
@@ -5,7 +5,6 @@
- **API:** https://suites.mercator.cn - **API:** https://suites.mercator.cn
- **API Key 获取:** https://auth.mercator.cn - **API Key 获取:** https://auth.mercator.cn
- **API 文档:** https://suites.mercator.cn/docs - **API 文档:** https://suites.mercator.cn/docs
- **基础镜像:** `registry.mercator.cn/agentgis/gis-base:latest`
## 知识库(knowledge/ ## 知识库(knowledge/
@@ -24,7 +23,7 @@ steps:
name: 我的步骤 name: 我的步骤
script_id: run # ✅ script_id: run,不是 script: run.py script_id: run # ✅ script_id: run,不是 script: run.py
params: params:
input: "${{inputs.input_path}}" # ✅ 双花括号 input: $params.input_path # ✅ 使用 $params.xxx
``` ```
### 常见错误 ### 常见错误
@@ -54,7 +54,7 @@
- **需要安装 Docker**(一次性) - **需要安装 Docker**(一次性)
- **需要安装 gis-actions**(一次性) - **需要安装 gis-actions**(一次性)
- **需要能访问 `suites.mercator.cn``registry.mercator.cn`**(网络条件) - **需要能访问 `suites.mercator.cn`**(网络条件)
- **提供本地文件路径**,不是上传文件 - **提供本地文件路径**,不是上传文件
## 对套件开发者的影响 ## 对套件开发者的影响
+1 -1
View File
@@ -15,7 +15,7 @@
3. 准备本地的数据文件 → 文件在你的硬盘上 3. 准备本地的数据文件 → 文件在你的硬盘上
记下文件路径 记下文件路径
4. 执行套件 → gis-actions 从市场拉取脚本包 4. 执行套件 → gis-actions 从市场拉取脚本包
agc run <suite-id> → 启动本地 Docker 容器 agc run <suite-id> --inputs '{...}' → 启动本地 Docker 容器
--inputs '{"input_path": → 将你的路径挂载到容器内 --inputs '{"input_path": → 将你的路径挂载到容器内
"/data/myfile.shp"}' → 脚本在容器中处理你的文件 "/data/myfile.shp"}' → 脚本在容器中处理你的文件
→ 结果写入 /tmp/output/ → 结果写入 /tmp/output/
@@ -49,21 +49,21 @@ params:
## 步骤定义(steps ## 步骤定义(steps
```yaml ```yaml
nodes: steps:
- id: my-step # 步骤 ID,唯一 - id: my-step # 步骤 ID,唯一
name: 我的步骤 # 步骤名称 name: 我的步骤 # 步骤名称
script_id: run # 脚本标识(不是 script: run.py script: run # 脚本标识(不是 script: run.py
params: params:
input: "${{inputs.input_path}}" # 双花括号语法 input: "$params.input_path}}" # 双花括号语法
``` ```
### 常见错误 ### 常见错误
| ❌ 错误写法 | ✅ 正确写法 | 原因 | | ❌ 错误写法 | ✅ 正确写法 | 原因 |
|-----------|-----------|------| |-----------|-----------|------|
| `script: run.py` | `script_id: run` | 执行器读的是 `script_id` | | `script: run.py` | `script: run` | 执行器读的是 `script` |
| `params_mapping: {...}` | `params: {...}` | 字段名是 `params` | | `params_mapping: {...}` | `params: {...}` | 字段名是 `params` |
| `$inputs.xxx` | `${{inputs.xxx}}` | 双花括号语法 | | `$inputs.xxx` | `$params.xxx}}` | 双花括号语法 |
## 文件共享 ## 文件共享
+2 -2
View File
@@ -5,8 +5,8 @@
开发新套件前,先搜索市场是否已有能复用的套件: 开发新套件前,先搜索市场是否已有能复用的套件:
```bash ```bash
agc suites search 缓冲区 agc suites list 缓冲区
agc suites search 面积计算 agc suites list 面积计算
``` ```
能找到现成的就引用它。不需要每次都写自己的脚本。 能找到现成的就引用它。不需要每次都写自己的脚本。