fix: read installed result UI version from immutable manifest

This commit is contained in:
Agent Workbench Dev
2026-11-02 15:20:34 +08:00
parent 2d45c3a02c
commit ea5a4490f7
2 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -14,7 +14,8 @@ import { readText } from '../src/server/files.mjs';
if (process.argv.includes('--help')) { console.log('node scripts/verify-file-results-ui.mjs — isolated Edge/Electron existing-file receipts, changed bytes, explicit adoption, no-change delivery and late-response scope. Optional AGENT_WORKBENCH_QA_APP_ROOT. No model requests.'); process.exit(0); }
if (process.argv.length > 2) throw new Error('Use --help.');
const appRoot = path.resolve(process.env.AGENT_WORKBENCH_QA_APP_ROOT || '.'), directory = path.resolve('.qa/file-results-ui-' + randomUUID()); fs.mkdirSync(directory, { recursive: true });
const version = JSON.parse(fs.readFileSync(path.join(appRoot, 'package.json'), 'utf8')).version;
const versionFile = path.join(appRoot, fs.existsSync(path.join(appRoot, 'package.json')) ? 'package.json' : 'MANIFEST.json');
const version = JSON.parse(fs.readFileSync(versionFile, 'utf8')).version;
const checks = [], screenshots = [], errors = [];
const mark = name => { checks.push(name); console.log('PASS ' + name); };
let stage = 'setup', result;