Skip to content
Open
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',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add rebuild step for project-genie mutations

project-genie is wired to run only scripts/genesis.cjs, which generates new .jsx files under the Observatory source tree, but this repository serves prebuilt yennefer-observatory/dist assets. In that deployment mode, newly written mutation files are not picked up at runtime because the bundle is static (and mutation discovery is compiled into the build), so continuous mutations produced after startup will never appear in the live UI unless this PM2 flow also triggers a frontend rebuild/reload.

Useful? React with 👍 / 👎.

autorestart: true,
watch: false,
max_memory_restart: '300M',
restart_delay: 5000,
env: {
GENESIS_LOOP: 'true',
FORCE_MUTATION: 'true',
Comment on lines +119 to +120

Copilot AI Apr 6, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds an always-on process that forces mutations continuously (GENESIS_LOOP + FORCE_MUTATION). If this PM2 config is used in production, it can cause unbounded file churn (commits/build artifacts), resource usage, and unpredictable runtime state. Consider gating this entry behind an explicit environment (e.g., only in a dev/staging ecosystem file) or defaulting FORCE_MUTATION to false unless explicitly enabled.

Suggested change
GENESIS_LOOP: 'true',
FORCE_MUTATION: 'true',
GENESIS_LOOP: process.env.GENESIS_LOOP === 'true' ? 'true' : 'false',
FORCE_MUTATION: process.env.FORCE_MUTATION === 'true' ? 'true' : 'false',

Copilot uses AI. Check for mistakes.
ALWAYS_ON: 'true'
}
}
]
};
28 changes: 14 additions & 14 deletions scripts/genesis.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ const path = require('path');
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'
body: path.join(__dirname, '../yennefer-observatory/src/components/mutations'),
journal: path.join(__dirname, '../logs/genesis_journal.jsonl')
};

// Ensure logs directory exists
const logDir = path.dirname(PATHS.journal);
if (!fs.existsSync(logDir)) {
fs.mkdirSync(logDir, { recursive: true });
Comment thread
igor-holt marked this conversation as resolved.
}

// --- CONFIGURATION ---
const CONFIG = {
fundingTarget: 10.0,
Expand Down Expand Up @@ -165,24 +171,22 @@ function generateEvolutionComponent(name, directive) {

const materials = [
`
<MeshDistortMaterial
<meshPhysicalMaterial
color="#8b5cf6"
emissive="#4c1d95"
emissiveIntensity={0.5 + balance * 2}
roughness={0.2}
metalness={0.8}
distort={0.3}
speed={2}
clearcoat={1.0}
clearcoatRoughness={0.1}
/>`,
`
<MeshWobbleMaterial
<meshPhongMaterial
color="#06b6d4"
emissive="#0e7490"
emissiveIntensity={0.5 + balance * 2}
roughness={0.2}
metalness={0.8}
factor={1}
speed={2}
shininess={100}
specular="#ffffff"
/>`,
`
<meshStandardMaterial
Expand All @@ -195,16 +199,12 @@ function generateEvolutionComponent(name, directive) {
];
const material = materials[Math.floor(Math.random() * materials.length)];

const isDreiImportNeeded = material.includes('MeshDistortMaterial') || material.includes('MeshWobbleMaterial');
const importedDrei = isDreiImportNeeded ? `import { ${material.includes('MeshDistortMaterial') ? 'MeshDistortMaterial' : ''}${material.includes('MeshDistortMaterial') && material.includes('MeshWobbleMaterial') ? ', ' : ''}${material.includes('MeshWobbleMaterial') ? 'MeshWobbleMaterial' : ''} } from '@react-three/drei'` : '';

return `// Auto-generated by Yennefer Genesis Cycle
// Directive: ${directive}
// Generated: ${new Date().toISOString()}

import React, { useRef } from 'react'
import { useFrame } from '@react-three/fiber'
${importedDrei}

export default function ${name}({ balance = 0 }) {
const meshRef = useRef()
Expand Down
1 change: 1 addition & 0 deletions yennefer-observatory/dist/assets/index-7qJm4bM4.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4,781 changes: 4,781 additions & 0 deletions yennefer-observatory/dist/assets/index-DeNzvkJq.js

Large diffs are not rendered by default.

Loading