Files
agent-profiles/suites-help/开发者指南/套件发布指南.md
T

1.3 KiB
Raw Blame History

套件发布指南

前置条件

一、使用 CLI 发布(推荐)

# 安装 CLI
# gis-actions 安装后自带 agc 命令(见 TOOLS.md

# 配置 API Key
# agc config set api-key mk_xxxxxxxxxxxxx(当前 CLI 暂不支持此命令)

# 发布
# agc publish ./my-suite(当前 CLI 暂不支持,见下文 API 方式)

二、手动发布

1. 打包

cd my-suite
tar czf scripts.tar.gz workflow.yaml scripts/

2. 上传到包存储

curl -X PUT \
  -H "Authorization: Bearer mk_xxxx" \
  -F "file=@scripts.tar.gz" \
  https://suites.mercator.cn/api/v1/publish/upload

3. 注册套件

curl -X POST https://suites.mercator.cn/api/v1/suites \
  -H "Authorization: Bearer mk_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-suite",
    "description": "我的套件",
    "version": "1.0.0",
    "workflow": { ... },
    "package_url": "https://..."
  }'

合规检测

发布时自动检测:

  • workflow.yaml 格式是否正确
  • 参数声明是否完整
  • 脚本文件是否存在
  • 参数类型是否匹配

不通过则发布失败,返回具体错误信息。