version: 2

updates:
  # npm — root + all 17 workspaces. npm workspaces means a single
  # package-lock.json at /, so a single npm entry covers everything.
  - package-ecosystem: npm
    directory: /
    schedule:
      interval: weekly
      day: monday
      time: '06:00'
      timezone: Etc/UTC
    open-pull-requests-limit: 10
    versioning-strategy: increase
    labels:
      - dependencies
      - npm
    commit-message:
      prefix: chore(deps)
      include: scope
    groups:
      # Group the noisy security-patch ecosystem so we don't get 12 separate
      # PRs every week. Major bumps still get their own PRs.
      production-deps:
        applies-to: version-updates
        update-types:
          - patch
          - minor
        exclude-patterns:
          - '@nestjs/*'
          - 'next'
          - 'react'
          - 'react-dom'
          - 'typescript'
          - 'prisma'
          - '@prisma/*'
          - 'zod'
      dev-deps:
        applies-to: version-updates
        dependency-type: development
        update-types:
          - patch
          - minor

  # Docker — base image bumps for every service. `pin: false` lets Dependabot
  # propose newer `node:20-alpine` / `node:20-bookworm-slim` revisions when
  # they land.
  - package-ecosystem: docker
    directory: /apps/claw-frontend
    schedule:
      interval: weekly
    open-pull-requests-limit: 3
    labels:
      - dependencies
      - docker
  - package-ecosystem: docker
    directory: /apps/claw-auth-service
    schedule:
      interval: weekly
    open-pull-requests-limit: 3
    labels:
      - dependencies
      - docker
  - package-ecosystem: docker
    directory: /apps/claw-chat-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-connector-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-routing-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-memory-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-file-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-audit-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-ollama-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-health-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-client-logs-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-server-logs-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-image-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-file-generation-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-agent-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-research-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-workspace-service
    schedule:
      interval: weekly
  - package-ecosystem: docker
    directory: /apps/claw-llamacpp-service
    schedule:
      interval: weekly

  # GitHub Actions used by .github/workflows/*.yml
  - package-ecosystem: github-actions
    directory: /
    schedule:
      interval: weekly
    labels:
      - dependencies
      - ci
    commit-message:
      prefix: ci(deps)
