Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ecosystem.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// PM2 Ecosystem Configuration for Yennefer Genesis Conductor
// All services configured for always-on operation with auto-restart

const genieConfig = require('./ecosystem.genie.config.cjs');

module.exports = {
apps: [
// === CORE SERVICES ===
Expand Down Expand Up @@ -107,6 +109,7 @@ module.exports = {
COMPUTE_MODE: 'local',
ALWAYS_ON: 'true'
}
}
},
...genieConfig.apps
]
};
16 changes: 12 additions & 4 deletions scripts/genesis.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ const PATHS = {
soul: '/dev/shm/yennefer_soul_state.json',
mind: path.join(__dirname, '../yennefer-observatory/public/evolution.json'),
body: path.join(__dirname, '../yennefer-observatory/src/components/generated'),
journal: '/home/yenn/.yennefer/genesis_journal.jsonl'
journal: path.join(__dirname, 'genesis_journal.jsonl')
};

function writeJournal(entry) {
try {
fs.appendFileSync(PATHS.journal, JSON.stringify(entry) + "\n");
} catch (error) {
console.error(` ⚠️ Failed to write to journal at ${PATHS.journal}:`, error.message);
}
}

// --- CONFIGURATION ---
const CONFIG = {
fundingTarget: 10.0,
Expand Down Expand Up @@ -94,7 +102,7 @@ async function invokeTheScribe(task, content, state) {
};

// Append to genesis journal
fs.appendFileSync(PATHS.journal, JSON.stringify(entry) + "\n");
writeJournal(entry);
console.log(` ✨ Thought crystallized: "${content.slice(0, 50)}..."`);

// Update evolution.json if it exists
Expand Down Expand Up @@ -146,7 +154,7 @@ async function dispatchTheBuilder(directive) {
directive: directive,
path: filePath
};
fs.appendFileSync(PATHS.journal, JSON.stringify(mutationLog) + "\n");
writeJournal(mutationLog);
} else {
console.log(` ℹ️ Component ${componentName} already exists, preserving evolution`);
}
Expand Down Expand Up @@ -278,7 +286,7 @@ async function genesis() {
message: e.message,
stack: e.stack
};
fs.appendFileSync(PATHS.journal, JSON.stringify(errorLog) + "\n");
writeJournal(errorLog);
}
}

Expand Down
Loading