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
13 changes: 13 additions & 0 deletions ecosystem.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@ module.exports = {
COMPUTE_MODE: 'local',
ALWAYS_ON: 'true'
}
},
{
name: 'project-genie',
script: './scripts/genesis.cjs',
autorestart: true,
watch: false,
max_memory_restart: '300M',
restart_delay: 5000,
env: {
GENESIS_LOOP: 'true',
FORCE_MUTATION: 'true',
ALWAYS_ON: 'true'
}
}
]
};
2 changes: 1 addition & 1 deletion scripts/genesis.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
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')
};

// --- CONFIGURATION ---
Expand Down Expand Up @@ -287,17 +287,17 @@
if (process.env.GENESIS_LOOP === 'true') {
console.log("🔄 Running in continuous Genesis Loop mode...");
while (true) {
await genesis();

Check warning on line 290 in scripts/genesis.cjs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=Genesis-Conductor-Engine_Yennefer&issues=AaEflelcsMH-LR8yTQcW&open=AaEflelcsMH-LR8yTQcW&pullRequest=242
// Wait for reflectionInterval or 5 minutes
const waitTime = CONFIG.reflectionInterval || 5 * 60 * 1000;
console.log(`\n⏳ Genesis cycle sleeping for ${waitTime / 1000} seconds...`);
await new Promise(resolve => setTimeout(resolve, waitTime));

Check warning on line 294 in scripts/genesis.cjs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=Genesis-Conductor-Engine_Yennefer&issues=AaEflelcsMH-LR8yTQcX&open=AaEflelcsMH-LR8yTQcX&pullRequest=242
}
} else {
await genesis();
}
}

main();

Check warning on line 301 in scripts/genesis.cjs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator.

See more on https://sonarcloud.io/project/issues?id=Genesis-Conductor-Engine_Yennefer&issues=AaEflelcsMH-LR8yTQcY&open=AaEflelcsMH-LR8yTQcY&pullRequest=242

module.exports = { genesis, consultTheVisionary, invokeTheScribe, dispatchTheBuilder };
Loading