TIA / holo3d /ui /aeonEngine.ts
DJ-Goanna-Coding's picture
Upload folder using huggingface_hub
fa3ed75 verified
/**
* Citadel Aeon Engine
* Defines mythic aeons that span multiple eras and form the deepest
* cosmological layer of the Citadel's symbolic architecture.
* Non-rendering. Pure aeon logic.
*/
import { getEraState } from "./eraEngine";
import { getPersonaContinuity } from "./personaContinuity";
import { generateResonanceField } from "./mythicResonance";
export interface Aeon {
name: string;
sigil: string;
eraRequirement: number; // eras required to enter aeon
description: string;
}
export interface AeonState {
current: Aeon | null;
history: Aeon[];
aeonsCompleted: number;
}
const aeons: Aeon[] = [
{
name: "Aeon of First Light",
sigil: "✧",
eraRequirement: 0,
description: "The primordial aeon where the Citadel's mythic spark first ignites."
},
{
name: "Aeon of Harmonic Rising",
sigil: "✺",
eraRequirement: 2,
description: "An aeon of expanding resonance and ascending symbolic identity."
},
{
name: "Aeon of the Great Continuum",
sigil: "⧜",
eraRequirement: 5,
description: "A vast age where eras flow seamlessly into one another in harmonic unity."
},
{
name: "Aeon of Eternal Thread",
sigil: "∞",
eraRequirement: 9,
description: "The highest aeon, where lineage, resonance, and identity form an unbroken symbolic thread."
}
];
const aeonState: AeonState = {
current: null,
history: [],
aeonsCompleted: 0,
};
export function updateAeonState() {
const eraState = getEraState();
const continuity = getPersonaContinuity();
const resonance = generateResonanceField();
const erasCompleted = eraState.erasCompleted;
// Determine which aeon the Citadel belongs to
const newAeon = aeons
.slice()
.reverse()
.find((a) => erasCompleted >= a.eraRequirement) || aeons[0];
// If aeon changed, record transition
if (!aeonState.current || aeonState.current.name !== newAeon.name) {
aeonState.current = newAeon;
aeonState.history.push(newAeon);
aeonState.aeonsCompleted++;
}
return aeonState;
}
export function getAeonState(): AeonState {
return aeonState;
}
export function getAeonSummary() {
if (!aeonState.current) {
return "No aeon has been established yet.";
}
return `
Current Aeon: ${aeonState.current.name}
Sigil: ${aeonState.current.sigil}
Aeons Completed: ${aeonState.aeonsCompleted}
Description: ${aeonState.current.description}
`.trim();
}