import * as imported from "@firstpick/pi-utils"; type UtilityName = "resolveUserPath" | "writeFileAtomic" | "runCommand"; function utility(name: UtilityName): T { const namespace = imported as unknown as Record; const nestedDefault = namespace.default && typeof namespace.default === "object" ? namespace.default as Record : undefined; const value = namespace[name] ?? nestedDefault?.[name]; if (typeof value !== "function") throw new Error(`@firstpick/pi-utils does not expose required function ${name}.`); return value as T; } export const resolveUserPath = utility("resolveUserPath"); export const writeFileAtomic = utility("writeFileAtomic"); export const runCommand = utility("runCommand");