// Window B+C, P1: the live business file, read only. Prints the plan's P1 values and nothing else: // bus.tester, the plug-in kind names, launch.by, each role's vars.harness and whether any harness or // fallback.harness is pi. No other value from the file. import { readFileSync } from 'node:fs'; const f = `${process.env.HOME}/.config/mosaic-dev/businesses/mosaic-stack.json`; const b = JSON.parse(readFileSync(f, 'utf8')); console.log(`bus.tester ${JSON.stringify(b.vars?.['bus.tester'])}`); console.log(`plugins kinds ${JSON.stringify(Object.keys(b.plugins ?? {}).sort())}; harness key ${Object.hasOwn(b.plugins ?? {}, 'harness') ? 'PRESENT' : 'absent'}`); console.log(`launch.by ${JSON.stringify(b.launch?.by)}`); let pi = 0; for (const [r, v] of Object.entries(b.roles ?? {}).sort()) { const h = v?.vars?.harness, fh = v?.vars?.['fallback.harness']; if (h === 'pi' || fh === 'pi') pi++; console.log(`role ${r} vars.harness ${JSON.stringify(h)}${fh === undefined ? '' : ` fallback.harness ${JSON.stringify(fh)}`}`); } console.log(`roles naming pi ${pi}`);