()
| 7 | const { redactValue } = require('./redact'); |
| 8 | |
| 9 | function getPersonality() { |
| 10 | const evoDir = getEvolutionDir(); |
| 11 | const memDir = getMemoryDir(); |
| 12 | const candidates = [ |
| 13 | path.join(evoDir, 'personality_state.json'), |
| 14 | path.join(memDir, 'personality_state.json'), |
| 15 | ]; |
| 16 | for (const candidate of candidates) { |
| 17 | const data = readJsonSafe(candidate, null); |
| 18 | if (data) return { exists: true, ...redactValue(data) }; |
| 19 | } |
| 20 | return { exists: false, current: null, history: [] }; |
| 21 | } |
| 22 | |
| 23 | function getMemoryGraph(query = {}) { |
| 24 | const limit = Math.min(Number(query.limit) || 50, 500); |
nothing calls this directly
no test coverage detected