meritocrab 0.1.4

A reputation system for open source repositories using LLM-based contribution evaluation
Documentation
# Meritocrab System Configuration Example
# Copy this file to `config.toml` and customize for your deployment

# ============================================================================
# Server Configuration
# ============================================================================
[server]
# Host address to bind the server to
# Use "0.0.0.0" to accept connections from any network interface
# Use "127.0.0.1" for localhost-only access
host = "127.0.0.1"

# Port number for the HTTP server
port = 8080

# ============================================================================
# Database Configuration
# ============================================================================
[database]
# Database connection URL
# For SQLite (development):
#   url = "sqlite://meritocrab.db"
# For PostgreSQL (production):
#   url = "postgres://user:password@localhost/socialcredit"
url = "sqlite://meritocrab.db"

# Maximum number of database connections in the pool
max_connections = 10

# ============================================================================
# GitHub Configuration
# ============================================================================
[github]
# GitHub App ID (required for GitHub App authentication)
app_id = 123456

# GitHub App installation ID (required for accessing repositories)
installation_id = 789012

# Path to GitHub App private key file (PEM format)
private_key_path = "./github-app-private-key.pem"

# Webhook secret for HMAC-SHA256 signature verification
# Generate a secure random string and configure it in your GitHub webhook settings
webhook_secret = "your-webhook-secret-here"

# OAuth Client ID for maintainer dashboard authentication
# Create a GitHub OAuth App and get the client ID
oauth_client_id = "your-oauth-client-id"

# OAuth Client Secret for maintainer dashboard authentication
oauth_client_secret = "your-oauth-client-secret"

# OAuth Redirect URL (must match the OAuth App configuration)
oauth_redirect_url = "http://localhost:8080/auth/callback"

# GitHub API base URL (use this for GitHub Enterprise)
# Default: "https://api.github.com"
# api_url = "https://api.github.com"

# ============================================================================
# LLM Configuration
# ============================================================================
# LLM provider configuration for content quality evaluation
# Three options: "mock" (for testing), "claude", or "openai"

# Option 1: Mock evaluator (for development and testing)
[llm]
provider = "mock"
# Optional: set default classification for all evaluations
# default_classification = "high"

# Option 2: Claude AI (production)
# [llm]
# provider = "claude"
# api_key = "your-claude-api-key-here"
# model = "claude-3-5-sonnet-20241022"
# # Optional: custom API endpoint
# # base_url = "https://api.anthropic.com"

# Option 3: OpenAI (production)
# [llm]
# provider = "openai"
# api_key = "your-openai-api-key-here"
# model = "gpt-4o"
# # Optional: custom API endpoint
# # base_url = "https://api.openai.com"

# Maximum number of concurrent LLM evaluation requests
# Prevents rate limiting and controls resource usage
# Default: 10
max_concurrent_llm_evals = 10

# ============================================================================
# Credit Scoring Configuration (Default Repository Settings)
# ============================================================================
# Individual repositories can override these settings via .meritocrab.toml

[credit]
# Starting credit for new contributors
starting_credit = 100

# Minimum credit required to open pull requests
# Contributors with credit below this threshold will have PRs auto-closed
pr_threshold = 50

# Credit level at which auto-blacklist triggers
# Contributors at or below this level are shadow-blacklisted
blacklist_threshold = 0

# Scoring deltas for PR opened events
[credit.pr_opened]
spam = -25          # Spam PRs (e.g., promotional links, nonsense)
low = -5            # Low quality PRs (e.g., trivial changes, poor quality)
acceptable = 5      # Acceptable PRs (e.g., valid contributions)
high = 15           # High quality PRs (e.g., well-documented, significant value)

# Scoring deltas for comment events
[credit.comment]
spam = -10          # Spam comments (e.g., promotional, off-topic)
low = -2            # Low quality comments (e.g., unhelpful, superficial)
acceptable = 1      # Acceptable comments (e.g., valid feedback)
high = 3            # High quality comments (e.g., insightful, constructive)

# Scoring deltas for PR merged events
[credit.pr_merged]
spam = 0            # Merged PRs are always positive contributions
low = 0
acceptable = 20     # Standard merged PR bonus
high = 20

# Scoring deltas for review submitted events
[credit.review_submitted]
spam = 0            # Reviews are always positive contributions
low = 0
acceptable = 5      # Standard review bonus
high = 5