File size: 665 Bytes
3c124f3
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Export the engine's event deck to JSON for the Python-side molt tooling.
// The deck's hand-written tier lines are the gold personality dataset —
// this keeps molt/ reading the same source of truth the sim runs on.
// Regenerate: bun run export:deck   (from frontend/)

import { mkdirSync, writeFileSync } from "node:fs";
import { join } from "node:path";
import { EVENTS } from "../src/engine/events";

const out = join(import.meta.dir, "../../molt/data/deck.json");
mkdirSync(join(import.meta.dir, "../../molt/data"), { recursive: true });
writeFileSync(out, `${JSON.stringify(EVENTS, null, 2)}\n`);
console.log(`wrote ${EVENTS.length} events → ${out}`);