Files
Agent-Workbench/docs/reading-s-evidence/drivers/reading-s-baseline.mjs.txt
T

20 lines
1.1 KiB
Plaintext

import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { publicSnapshot } from './desktop-f-state.mjs';
const root = path.resolve('.qa/reading-reliability-s');
fs.mkdirSync(root, { recursive: true });
const destination = path.join(root, 'production-before.json');
assert.ok(!fs.existsSync(destination), 'S baseline is immutable');
const data = 'C:/Users/wangy/AppData/Local/Packages/OpenAI.Codex_2p2nqsd0c76g0/LocalCache/Local/AgentWorkbench';
const state = await publicSnapshot('http://127.0.0.1:4318', data);
assert.equal(state.pid, 36552);
assert.equal(state.version, '1.24.6');
assert.deepEqual(state.active, []);
fs.writeFileSync(destination, JSON.stringify(state, null, 2) + '\n');
console.log(JSON.stringify({ version: state.version, pid: state.pid, hasKey: state.hasKey,
projects: state.projects, sessions: state.database.sessionIds.length,
rows: Object.fromEntries(Object.entries(state.database.tables).map(([key, value]) => [key, value.count])),
artifactFiles: state.persistent.artifacts?.length, active: state.active }));