* refactor: convert libraries API from attr.s to dataclass, fix types * fix: make corresponding updates to 'search' code