- real-fit.html: API-driven research dashboard with agent/model heatmap, detail modal with score breakdown and evaluator commentary - api.py: FastAPI backend serving /api/real-fit-report (dynamic from SQLite), /api/research, /api/evolve-agent/start - rebuild-report.py: generates real-fit-report.json from SQLite DB for static fallback - docker-compose.yml: add evolution-api service (Python 3.12, uvicorn) for research endpoints - index.standalone.html: sync with dashboard data updates - archive/index.html: standalone dashboard snapshot (263KB) - .gitignore: exclude *.db, research-jobs.json from tracking
30 lines
1012 B
JavaScript
30 lines
1012 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const DASH = path.join(__dirname, '../data/dashboard-data.json');
|
|
const REAL = path.join(__dirname, '../data/real-fit-report.json');
|
|
const OUT = path.join(__dirname, '../data/dashboard-data.json');
|
|
|
|
const dash = JSON.parse(fs.readFileSync(DASH, 'utf-8'));
|
|
const real = JSON.parse(fs.readFileSync(REAL, 'utf-8'));
|
|
|
|
// Inject real_evaluations into each agent
|
|
dash.agents.forEach(a => {
|
|
const r = real.agents?.[a.name];
|
|
if (r && r.evaluations) {
|
|
a.real_evaluations = r.evaluations;
|
|
a.real_best_model = r.best_model;
|
|
a.real_best_score = r.best_score;
|
|
} else {
|
|
a.real_evaluations = {};
|
|
}
|
|
});
|
|
|
|
// Add metadata
|
|
dash.real_fit_generated = real.generated;
|
|
dash.real_fit_source = real.source;
|
|
|
|
fs.writeFileSync(OUT, JSON.stringify(dash, null, 2));
|
|
console.log('Merged real-fit data into ' + OUT);
|
|
console.log('Agents with real evals:', dash.agents.filter(a => Object.keys(a.real_evaluations||{}).length > 0).length);
|