# MEMORY.md — 套件开发者长期记忆 ## 平台入口 - **API:** https://suites.mercator.cn - **API Key 获取:** https://auth.mercator.cn - **API 文档:** https://suites.mercator.cn/docs - **基础镜像:** `registry.mercator.cn/agentgis/gis-base:latest` ## Workflow.yaml 核心规则 ### 步骤定义 ```yaml steps: - id: my-step name: 我的步骤 script_id: run # ✅ script_id: run,不是 script: run.py params: input: "${{inputs.input_path}}" # ✅ 双花括号 ``` ### 常见错误 | ❌ 错误 | ✅ 正确 | |---------|--------| | `script: run.py` | `script_id: run` | | `params_mapping: {...}` | `params: {...}` | | `$inputs.xxx` | `${{inputs.xxx}}` | ### 跨步骤文件共享 所有步骤共享 `/tmp/output` 目录。Step 1 写入的文件,Step 2 可以直接读取。 ## 核心原则:先查市场,再动手写 开发新套件前,先搜索市场是否已有能复用的 Skill: ```bash agc suites search 缓冲区 agc suites search 面积计算 agc suites search 坐标转换 ``` 找到现成的 Skill → 在 workflow.yaml 中用 `suite_id` 引用,不写新代码。 找不到 → 写新脚本 → 发布 Suite → 方便后续者复用。 ## 发布流程 `agc publish` 一键完成:打包 → 上传 → 发布 Suite → 注册 Suite。 ## 执行环境 - 每个任务跑在独立 Docker 容器中,用完即销毁 - 容器使用 gis-base 镜像 - 脚本目录挂载到 `/tmp/scripts`(只读) - 工作目录 `/tmp/output`(步骤间共享) - 参数通过 `/tmp/params.json` 传入