{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": [
    "config:recommended",
    "helpers:pinGitHubActionDigests",
    ":separateMajorReleases"
  ],
  "gitIgnoredAuthors": [
    "41898282+github-actions[bot]@users.noreply.github.com"
  ],
  "labels": ["dependencies"],
  "prConcurrentLimit": 5,
  "prHourlyLimit": 2,
  "schedule": ["before 9am on Monday"],
  "timezone": "America/New_York",
  "lockFileMaintenance": {
    "enabled": true,
    "schedule": ["before 9am on Monday"]
  },
  "customManagers": [
    {
      "customType": "regex",
      "description": "Track vendored KaTeX version",
      "managerFilePatterns": ["/pyproject\\.toml$/"],
      "matchStrings": ["katex-(?<currentValue>[\\d.]+)/"],
      "depNameTemplate": "katex",
      "datasourceTemplate": "npm"
    },
    {
      "customType": "regex",
      "description": "Track vendored Highlight.js version",
      "managerFilePatterns": ["/pyproject\\.toml$/"],
      "matchStrings": ["hljs-(?<currentValue>[\\d.]+)/"],
      "depNameTemplate": "highlight.js",
      "datasourceTemplate": "npm"
    },
    {
      "customType": "regex",
      "description": "Track vendored Mermaid version",
      "managerFilePatterns": ["/pyproject\\.toml$/"],
      "matchStrings": ["mermaid-(?<currentValue>[\\d.]+)/"],
      "depNameTemplate": "mermaid",
      "datasourceTemplate": "npm"
    }
  ],
  "packageRules": [
    {
      "description": "LLM SDKs — always review manually",
      "groupName": "LLM SDKs",
      "matchPackageNames": ["openai", "anthropic", "mcp"],
      "schedule": ["before 9am on Monday"],
      "automerge": false
    },
    {
      "description": "Web framework stack",
      "groupName": "Web Framework",
      "matchPackageNames": [
        "starlette",
        "uvicorn",
        "sse-starlette",
        "httpx",
        "httpx-sse",
        "pydantic"
      ],
      "schedule": ["before 9am on Wednesday"],
      "automerge": true,
      "matchUpdateTypes": ["patch"]
    },
    {
      "description": "Database layer",
      "groupName": "Database",
      "matchPackageNames": ["sqlalchemy", "alembic", "psycopg"],
      "schedule": ["before 9am on Wednesday"],
      "automerge": true,
      "matchUpdateTypes": ["patch"]
    },
    {
      "description": "Security-critical — always review manually",
      "groupName": "Security",
      "matchPackageNames": ["PyJWT", "pyjwt", "bcrypt"],
      "automerge": false
    },
    {
      "description": "Infrastructure dependencies",
      "groupName": "Infrastructure",
      "matchPackageNames": ["structlog", "redis", "croniter", "discord.py"],
      "schedule": ["before 9am on the first day of the month"],
      "automerge": true,
      "matchUpdateTypes": ["patch"]
    },
    {
      "description": "Vendored JS — CI workflow downloads files automatically",
      "groupName": "Vendored JS",
      "matchPackageNames": ["katex", "highlight.js", "mermaid"],
      "schedule": ["before 9am on the first day of the month"],
      "automerge": false
    },
    {
      "description": "Dev/test tooling",
      "groupName": "Tooling",
      "matchPackageNames": [
        "ruff",
        "mypy",
        "types-redis",
        "pytest",
        "pytest-cov",
        "pre-commit"
      ],
      "schedule": ["before 9am on the first day of the month"],
      "automerge": true,
      "matchUpdateTypes": ["patch"]
    },
    {
      "description": "Docker base images",
      "groupName": "Docker Images",
      "matchManagers": ["dockerfile", "docker-compose"],
      "schedule": ["before 9am on the first day of the month"],
      "automerge": false
    },
    {
      "description": "TypeScript SDK dev dependencies",
      "groupName": "TypeScript SDK",
      "matchFileNames": ["sdk/typescript/**"],
      "schedule": ["before 9am on the first day of the month"],
      "automerge": true,
      "matchUpdateTypes": ["patch"]
    },
    {
      "description": "GitHub Actions — group all action updates",
      "groupName": "GitHub Actions",
      "matchManagers": ["github-actions"],
      "automerge": false
    }
  ]
}
