Files
agent-profiles/suite-developer/TOOLS.md
T
2026-07-13 23:29:35 +08:00

92 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# TOOLS.md — 套件开发工具与资源
## 安装
### gis-actionsCLI + 执行引擎)
```bash
curl -sLO https://git.mercator.cn/api/packages/SuiteHub/generic/gis-actions/3.0.4/gis-actions_3.0.4_all.deb
sudo dpkg -i gis-actions_3.0.4_all.deb
```
### agentgis-sdkPython 开发包)
```bash
pip install https://git.mercator.cn/api/packages/SuiteHub/generic/agentgis-sdk/0.1.0/agentgis_sdk-0.1.0-py3-none-any.whl
```
---
## CLI 用法
```bash
# 执行套件
agc run <work_dir> --suite-id <suite-id> --input key=value
agc run <work_dir> --package-url <url> --input key=value
# 查市场(开发前先做这个)
curl -s https://suites.mercator.cn/api/v1/suites | python3 -m json.tool
```
## API 端点
| 用途 | 端点 |
|------|------|
| 浏览套件 | `GET https://suites.mercator.cn/api/v1/suites` |
| 套件详情 | `GET https://suites.mercator.cn/api/v1/suites/{id}` |
| API 文档 | `https://suites.mercator.cn/docs` |
| 发布套件 | `POST https://suites.mercator.cn/api/v1/publish`(详见发布指南) |
## 套件结构
```
my-suite/
├── workflow.yaml # 步骤定义(必填)
└── scripts/
└── run.py # 执行入口脚本
```
### workflow.yaml 格式
```yaml
name: 我的套件
description: 套件描述
version: 1.0.0
author: 作者
tags: [标签1, 标签2]
params:
input_path:
type: string
required: true
desc: 输入文件路径
base_image: gis-base:latest
steps:
- id: step1
name: 步骤名称
script_id: run
params:
input: $params.input_path
```
## 基础镜像
所有套件在 gis-base 镜像中执行,包含:Python 3, GDAL, Shapely, GeoPandas, numpy, openpyxl, xlrd
- 镜像名:`gis-base:latest`
- 来源:安装 gis-actions 时自动从 Gitea Packages 下载加载
## 知识库
| 文件 | 内容 |
|------|------|
| `knowledge/script-data-types.md` | 脚本数据类型分类规范 |
| `knowledge/script-dependencies.md` | 脚本依赖管理规范 |
| `knowledge/data-execution-model.md` | 数据执行模型(本地执行设计) |
## 文档
公开文档在 `SuiteHub/agent-profiles` 仓库中。