Refactor `PathState` handling to be updated incrementally

This enables extensions to keep track of modified files as they change over time, and should make it easier to eventually switch over to the message-based model in the future.

Created by  finchie  on December 15, 2025
LQJG2LGQMNJ35Y5H6XWCU3JWVIMOS5S7UQQQPIO5TCAXMLU3ORUQC
Change contents