## Global store definition for the auto-agents system
## Defines metadata for credential and config keys.
## Values are NOT preset here — they are populated at runtime from env vars.

defaults:
  literal: false
  type: string
  write_once: false

keys:
  global.credentials.forgejo_pat:
    literal: true
    write_once: true
    type: hex
    validate:
      regex: "^[0-9a-fA-F]{40}$"
      message: "Must be a 40-character hex token"
    description: "Primary bot Forgejo PAT"

  global.credentials.forgejo_username:
    literal: true
    write_once: true
    type: nonempty
    description: "Primary bot Forgejo username"

  global.credentials.forgejo_password:
    literal: true
    write_once: true
    type: nonempty
    description: "Primary bot Forgejo password"

  global.credentials.forgejo_reviewer_pat:
    literal: true
    write_once: true
    type: hex
    validate:
      regex: "^[0-9a-fA-F]{40}$"
      message: "Must be a 40-character hex token"
    description: "Reviewer bot Forgejo PAT"

  global.credentials.forgejo_reviewer_username:
    literal: true
    write_once: true
    type: nonempty
    description: "Reviewer bot username"

  global.credentials.forgejo_reviewer_password:
    literal: true
    write_once: true
    type: nonempty
    description: "Reviewer bot password"

  global.config.forgejo_url:
    literal: true
    write_once: true
    type: url
    description: "Forgejo base URL"

  global.config.forgejo_owner:
    literal: true
    write_once: true
    type: nonempty
    description: "Repository owner/org"

  global.config.forgejo_repo:
    literal: true
    write_once: true
    type: nonempty
    description: "Repository name"

  global.config.git_user_name:
    literal: true
    write_once: true
    type: nonempty
    description: "Git commit author name"

  global.config.git_user_email:
    literal: true
    write_once: true
    type: nonempty
    description: "Git commit author email"

  global.config.max_workers:
    literal: false
    type: positive_integer
    on_absent: "4"
    description: "Maximum parallel workers"
