{
  "$schema": "https://vault-cli.local/schemas/v3/vault-manifest.schema.json",
  "project": "xiangqin",
  "credentials": {
    "aliyun": {
      "slug": "aliyun-main",
      "fields": ["access_key_id", "access_key_secret", "default_region"],
      "env": {
        "access_key_id": "ALIYUN_ACCESS_KEY_ID",
        "access_key_secret": "ALIYUN_ACCESS_KEY_SECRET",
        "default_region": "ALIYUN_REGION"
      },
      "purpose": "OSS 备份 + DNS 记录 + ECS 管理（主账号 AK）"
    },
    "aliyun_sms": {
      "slug": "aliyun-power-app-ak",
      "fields": ["access_key_id", "access_key_secret"],
      "env": {
        "access_key_id": "ALIYUN_SMS_ACCESS_KEY_ID",
        "access_key_secret": "ALIYUN_SMS_ACCESS_KEY_SECRET"
      },
      "purpose": "注册短信验证码（RAM 子账号 AK，短信专用）"
    },
    "alipay": {
      "slug": "alipay-kongxuanpin",
      "fields": ["app_id", "app_private_key", "alipay_public_key"],
      "env": {
        "app_id": "ALIPAY_APP_ID"
      },
      "optional": true,
      "purpose": "生产支付宝（v0.5.1 FEAT-013 已用）"
    },
    "alipay_sandbox": {
      "slug": "alipay-sandbox-app",
      "fields": ["app_id", "app_private_key", "alipay_public_key"],
      "env": {
        "app_id": "ALIPAY_SANDBOX_APP_ID"
      },
      "optional": true,
      "purpose": "沙箱支付宝（E2E L2 测试用，XIANGQIN_ALIPAY_SANDBOX=1 启用）"
    },
    "aliyun_landing_publisher": {
      "slug": "aliyun-landing-publisher",
      "fields": ["access_key_id", "access_key_secret"],
      "optional": true,
      "purpose": "landing 发布到 agentaily-xiangqin-landing OSS bucket（最小权限 RAM 子账号）；CI/CD 从 GitHub Secrets 读；本地从 .vault/secrets.json 读"
    }
  },
  "resources": [
    { "ref": "aliyun/ecs/i-bp1iswr9bmkv3qh89965", "purpose": "prod 服务端" },
    { "ref": "aliyun/ecs/i-bp17gxpssxlqi9ig7xxh", "purpose": "staging 服务端" },
    { "ref": "aliyun/oss/agentaily-backup-xiangqin-prod", "purpose": "每日备份" },
    { "ref": "aliyun/oss/agentaily-xiangqin-photos-prod", "purpose": "用户上传照片（头像 + 相册）" },
    { "ref": "aliyun/sms-sign/杭州阿空智能科技", "purpose": "注册短信签名" },
    { "ref": "aliyun/sms-template/SMS_317151039", "purpose": "验证码模板" },
    { "ref": "alipay/openapi-app/2021000104691762", "purpose": "信封真付（v0.5）" },
    { "ref": "aliyun/dns-record/xq.agentaily.com", "purpose": "域名解析" },
    { "ref": "aliyun/dns-record/xiangqin.agentaily.com", "purpose": "landing page CNAME → OSS bucket" },
    { "ref": "aliyun/oss/agentaily-xiangqin-landing", "purpose": "landing page 静态站托管" }
  ]
}
