NEW 490e2771d live for mosaic-stack, activation 20261020T075800Z-490e2771d3d0, store 3i. W0-W10 pass;
stops at W9 (assistant idle stop, mos-0948) and S2b/B (old chief end rows in the backup, mos-0950).
22 lines
1.3 KiB
JavaScript
22 lines
1.3 KiB
JavaScript
// Window rows 177-185, P1: the live business file, read only. Prints the plan's P1 values and nothing else:
|
|
// bus.tester, the plug-in lists, launch.by, whether launch.instances includes assistant, and each role's
|
|
// vars.harness and vars["fallback.harness"]. 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'])}`);
|
|
const p = b.plugins ?? {};
|
|
console.log(`plugins kinds ${JSON.stringify(Object.keys(p).sort())}`);
|
|
for (const k of ['usage-source', 'channel', 'harness']) console.log(`plugins ${k} ${JSON.stringify(p[k])}`);
|
|
console.log(`launch.by ${JSON.stringify(b.launch?.by)}`);
|
|
const inst = b.launch?.instances;
|
|
const names = Array.isArray(inst) ? inst.map((i) => (typeof i === 'string' ? i : i?.name)) : Object.keys(inst ?? {});
|
|
console.log(`launch.instances includes assistant ${names.includes('assistant')}`);
|
|
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}`);
|