[taskserv]
name = "vapora-agents"
type = "agent-orchestrator"
version = "0.2.0"
description = "VAPORA Agent Runtime (12 specialized roles)"

[source]
repository = "ssh://git@repo.jesusperez.pro:32225/jesus/Vapora.git"
branch = "main"
path = "vapora-agents/"

[build]
runtime = "rust"
build_command = "cargo build --release -p vapora-agents"

[deployment]
namespace = "vapora-agents"
replicas = 3
image = "vapora/agents"
image_tag = "${version}"

[ports]
service = 8089
metrics = 9090

[resources]
requests = { cpu = "4000m", memory = "8Gi" }
limits = { cpu = "8000m", memory = "16Gi" }

[agent_pool]
# Agents deployed by this taskserv
agents = [
    "architect", "developer", "code-reviewer", "tester",
    "documenter", "marketer", "presenter",
    "devops", "monitor", "security",
    "project-manager", "decision-maker", "orchestrator"
]

max_concurrent_agents = 50
queue_depth_warning = 100

[dependencies]
required = ["nats", "surrealdb"]
optional = ["mcp-gateway", "llm-router"]

[environment]
NATS_URL = "nats://nats-0.vapora-system:4222"
DATABASE_URL = "surrealdb://surrealdb-0.vapora-system:8000"
AGENT_REGISTER_INTERVAL_SECS = "30"
HEALTH_CHECK_INTERVAL_SECS = "15"
RUST_LOG = "debug,vapora_agents=trace"

[secrets]
CLAUDE_API_KEY = "secret:vapora-secrets:claude-api-key"
OPENAI_API_KEY = "secret:vapora-secrets:openai-api-key"
GEMINI_API_KEY = "secret:vapora-secrets:gemini-api-key"
ANTHROPIC_KEY = "secret:vapora-secrets:anthropic-key"

[scaling]
min_replicas = 3
max_replicas = 20
target_cpu = 75
target_memory = 80
scale_down_delay_secs = 300

[health_check]
type = "http"
path = "/health"
interval_secs = 10
timeout_secs = 5
failure_threshold = 3

[persistence]
enabled = true
size = "20Gi"
storage_class = "ssd"
mount_path = "/agent-state"

[update_strategy]
type = "RollingUpdate"
max_surge = 2
max_unavailable = 0
min_ready_seconds = 60

[monitoring]
prometheus_metrics = true
trace_sampling = 0.1
