()
| 119 | } |
| 120 | |
| 121 | function captureEvolutionState() { |
| 122 | const lines = []; |
| 123 | const evoDir = getEvolutionDir(); |
| 124 | |
| 125 | const statePath = path.join(evoDir, 'evolution_state.json'); |
| 126 | const state = _readJsonSafe(statePath); |
| 127 | if (state) { |
| 128 | lines.push('- Evolution cycles completed: ' + (state.cycleCount || 0)); |
| 129 | if (state.lastRun) { |
| 130 | var ago = Math.round((Date.now() - state.lastRun) / 1000); |
| 131 | lines.push('- Last evolution run: ' + ago + 's ago'); |
| 132 | } |
| 133 | } else { |
| 134 | lines.push('- Evolution state: NOT FOUND (first run?)'); |
| 135 | } |
| 136 | |
| 137 | const solidifyPath = path.join(evoDir, 'evolution_solidify_state.json'); |
| 138 | const solidifyState = _readJsonSafe(solidifyPath); |
| 139 | if (solidifyState && solidifyState.last_run) { |
| 140 | var lr = solidifyState.last_run; |
| 141 | lines.push('- Last run gene: ' + (lr.selected_gene_id || 'none')); |
| 142 | if (lr.active_task_title) { |
| 143 | lines.push('- Active task: ' + lr.active_task_title); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | const personalityPath = path.join(evoDir, 'personality_state.json'); |
| 148 | const personality = _readJsonSafe(personalityPath); |
| 149 | if (personality && personality.current) { |
| 150 | var p = personality.current; |
| 151 | lines.push('- Personality: rigor=' + (p.rigor || 0) + |
| 152 | ' creativity=' + (p.creativity || 0) + |
| 153 | ' risk_tolerance=' + (p.risk_tolerance || 0)); |
| 154 | } |
| 155 | |
| 156 | return lines; |
| 157 | } |
| 158 | |
| 159 | function captureMemoryState() { |
| 160 | const lines = []; |
no test coverage detected