{
  "manifest_version": "1.0.0",
  "template": {
    "id": "38bf8540-ed16-44a9-b1be-36bafd96666d",
    "slug": "sb-relay-1",
    "name": "sb-relay",
    "description": "抓取 sb.sb 论坛的通知，并转发到 Telegram 机器人",
    "url": "https://railway.com/deploy/sb-relay-1",
    "upstream": {
      "image": "ghcr.io/krabdo/sb-relay:latest"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "sb-relay",
      "source": {
        "image": "ghcr.io/krabdo/sb-relay:latest"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "SB_COOKIE",
      "service": "sb-relay",
      "description": "完整 Cookie 值",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "SB_USER_ID",
      "service": "sb-relay",
      "description": "论坛中的数字用户 ID",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "STATE_FILE",
      "service": "sb-relay",
      "description": "状态文件路径",
      "secret": false,
      "strategy": "default",
      "default": "/data/state.json"
    },
    {
      "key": "POLL_INTERVAL",
      "service": "sb-relay",
      "description": "轮询间隔，最短 10s",
      "secret": false,
      "strategy": "default",
      "default": "60s"
    },
    {
      "key": "TELEGRAM_CHAT_ID",
      "service": "sb-relay",
      "description": "Telegram 聊天 ID",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "TELEGRAM_BOT_TOKEN",
      "service": "sb-relay",
      "description": "Telegram Bot Token",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "sb-relay-1"
      }
    },
    "cli": "railway deploy --template sb-relay-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "38bf8540-ed16-44a9-b1be-36bafd96666d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "016053f7-fdcc-4557-9a89-c5292037e460": {
                  "icon": "https://devicons.railway.app/Telegram",
                  "name": "sb-relay",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/krabdo/sb-relay:latest",
                    "autoUpdates": {
                      "type": "patch",
                      "schedule": [
                        {
                          "day": 0,
                          "endHour": 24,
                          "startHour": 0
                        },
                        {
                          "day": 1,
                          "endHour": 24,
                          "startHour": 0
                        },
                        {
                          "day": 2,
                          "endHour": 24,
                          "startHour": 0
                        },
                        {
                          "day": 3,
                          "endHour": 24,
                          "startHour": 0
                        },
                        {
                          "day": 4,
                          "endHour": 24,
                          "startHour": 0
                        },
                        {
                          "day": 5,
                          "endHour": 24,
                          "startHour": 0
                        },
                        {
                          "day": 6,
                          "endHour": 24,
                          "startHour": 0
                        }
                      ]
                    }
                  },
                  "variables": {
                    "SB_COOKIE": {
                      "isOptional": false,
                      "description": "完整 Cookie 值",
                      "defaultValue": "{{SB_COOKIE}}"
                    },
                    "SB_USER_ID": {
                      "isOptional": false,
                      "description": "论坛中的数字用户 ID",
                      "defaultValue": "{{SB_USER_ID}}"
                    },
                    "STATE_FILE": {
                      "isOptional": true,
                      "description": "状态文件路径",
                      "defaultValue": "/data/state.json"
                    },
                    "POLL_INTERVAL": {
                      "isOptional": true,
                      "description": "轮询间隔，最短 10s",
                      "defaultValue": "60s"
                    },
                    "TELEGRAM_CHAT_ID": {
                      "isOptional": false,
                      "description": "Telegram 聊天 ID",
                      "defaultValue": "{{TELEGRAM_CHAT_ID}}"
                    },
                    "TELEGRAM_BOT_TOKEN": {
                      "isOptional": false,
                      "description": "Telegram Bot Token",
                      "defaultValue": "{{TELEGRAM_BOT_TOKEN}}"
                    }
                  },
                  "volumeMounts": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0"
}
