# Generated by right -- do not edit
version: "0.5"
is_strict: true

processes:
{% if right_mcp_server %}
  right-mcp-server:
    command: "{{ right_mcp_server.exe_path }} mcp-server --port {{ right_mcp_server.port }} --token-map {{ right_mcp_server.token_map_path }}"
    environment:
      - RC_RIGHT_HOME={{ right_mcp_server.home_dir }}
    availability:
      restart: "always"
      backoff_seconds: 3
      max_restarts: 10
    shutdown:
      signal: 15
      timeout_seconds: 10
{% endif %}
{% for agent in agents %}
  {{ agent.name }}-bot:
    command: "{{ agent.exe_path }} bot --agent {{ agent.agent_name }}{% if agent.debug %} --debug{% endif %}"
    working_dir: "{{ agent.working_dir }}"
    environment:
      - RC_AGENT_DIR={{ agent.working_dir }}
      - RC_AGENT_NAME={{ agent.agent_name }}
{% if agent.sandbox_mode == "openshell" %}
      - RC_SANDBOX_MODE=openshell
{% if agent.sandbox_policy_path %}
      - RC_SANDBOX_POLICY={{ agent.sandbox_policy_path }}
{% endif %}
{% else %}
      - RC_SANDBOX_MODE=none
{% endif %}
      - ENABLE_CLAUDEAI_MCP_SERVERS=false
      - RC_PC_PORT={{ pc_port }}
    availability:
      restart: "{{ agent.restart_policy }}"
      backoff_seconds: {{ agent.backoff_seconds }}
      max_restarts: {{ agent.max_restarts }}
    shutdown:
      signal: 15
      timeout_seconds: 70
    depends_on:
{% if right_mcp_server %}
      right-mcp-server:
        condition: process_started
{% endif %}
      cloudflared:
        condition: process_started
{% endfor %}

  cloudflared:
    command: "{{ cloudflared.command }}"
    working_dir: "{{ cloudflared.working_dir }}"
    availability:
      restart: "on_failure"
      backoff_seconds: 5
      max_restarts: 10
    shutdown:
      signal: 15
      timeout_seconds: 30
