# TypeDialog Validation Constraints
# Defines validation rules for form fields generated from Nickel schemas

[orchestrator]
cpus = "pattern(^[0-9]+(\\.[0-9]+)?$)"
db_pool_size = "range(1, 100)"
log_level = ["debug", "info", "warning", "error"]
memory = "pattern(^[0-9]+[MG]B$)"
mode = ["solo", "multiuser", "enterprise", "cicd"]
port = "range(1, 65535)"
replicas = "range(1, 10)"

[control-center]
log_level = ["debug", "info", "warning", "error"]
port = "range(1, 65535)"
replicas = "range(1, 10)"

[vault-service]
cpus = "pattern(^[0-9]+(\\.[0-9]+)?$)"
memory = "pattern(^[0-9]+[MG]B$)"
port = "range(1, 65535)"

[rag]
max_concurrent_requests = "range(1, 100)"
port = "range(1, 65535)"
timeout_seconds = "range(1, 3600)"

[extension-registry]
port = "range(1, 65535)"
storage_path = "pattern(^/[a-zA-Z0-9/_-]+$)"

[mcp-server]
max_connections = "range(1, 1000)"
port = "range(1, 65535)"

[provisioning-daemon]
max_workers = "range(1, 100)"
port = "range(1, 65535)"

[ai-service]
max_retries = "range(0, 10)"
model_timeout_seconds = "range(1, 3600)"
port = "range(1, 65535)"

[nginx]
client_max_body_size = "pattern(^[0-9]+[MG]B$)"
worker_connections = "range(1, 65536)"
worker_processes = "range(1, 32)"

[prometheus]
evaluation_interval = "pattern(^[0-9]+[smh]$)"
retention = "pattern(^[0-9]+[dhw]$)"
scrape_interval = "pattern(^[0-9]+[smh]$)"

[kubernetes]
cpu = "pattern(^[0-9]+m$|^[0-9]+(\\.[0-9]+)?$)"
memory = "pattern(^[0-9]+Mi$|^[0-9]+Gi$)"
replicas = "range(1, 100)"

[docker-compose]
cpus = "pattern(^[0-9]+(\\.[0-9]+)?$)"
memory = "pattern(^[0-9]+[MG]B$)"
port = "range(1, 65535)"
