refactor(engine): extract persistence provider spi