Sullivan legislators agree on ethics; proposed law will get public hearing