import { readState, writeState } from './state.js'; export function resolvePathRemap( relPath: string, remap: Record, ): string { return remap[relPath] ?? relPath; } export function loadPathRemap(): Record { const state = readState(); return state.path_remap ?? {}; } export function recordPathRemap(remap: Record): void { const state = readState(); state.path_remap = { ...state.path_remap, ...remap }; writeState(state); }