import assert from "node:assert/strict"; import { readFileSync } from "node:fs"; import { dirname, resolve } from "node:path"; import { fileURLToPath } from "node:url"; const desktopRoot = process.env.FAMILIAROS_DESKTOP_ROOT ?? resolve(dirname(fileURLToPath(import.meta.url)), ".."); const pluginsViewSource = readFileSync(resolve(desktopRoot, "src/renderer/src/control-center/plugins-view.tsx"), "utf8"); const pluginsViewPresentationSource = readFileSync(resolve(desktopRoot, "src/renderer/src/control-center/plugins-view-presentation.tsx"), "utf8"); assert.match(pluginsViewSource, /from "\.\/plugins-view-presentation"/, "Plugins view must import the extracted presentation seam."); assert.match(pluginsViewPresentationSource, /export const pluginFilterLabelKeys/, "Plugins presentation seam must export filter labels."); assert.match(pluginsViewPresentationSource, /export const pluginPermissionLabelKeys/, "Plugins presentation seam must export permission labels."); assert.match(pluginsViewPresentationSource, /export function PluginIconImage/, "Plugins presentation seam must export the icon presentation helper."); assert.match(pluginsViewPresentationSource, /export function pluginPrimaryLabel/, "Plugins presentation seam must export primary badge labeling."); assert.match(pluginsViewPresentationSource, /export function pluginDescription/, "Plugins presentation seam must export plugin description shaping."); console.error("Plugins view presentation seam validation passed.");