añadido karpathy y refactorizacion del proyecto

This commit is contained in:
2026-05-25 19:48:56 +02:00
parent 8feb88dfa6
commit ee8cfa03ea
1225 changed files with 875463 additions and 5909 deletions
+23
View File
@@ -0,0 +1,23 @@
const fs = require('fs');
const path = require('path');
const CATALOG_PATH = path.join(__dirname, 'catalog.json');
let cachedCatalog = null;
function loadActionCatalog(forceReload = false) {
if (cachedCatalog && !forceReload) {
return cachedCatalog;
}
const raw = fs.readFileSync(CATALOG_PATH, 'utf-8');
cachedCatalog = JSON.parse(raw);
return cachedCatalog;
}
function getAction(actionKey) {
const catalog = loadActionCatalog();
return catalog.actions ? catalog.actions[actionKey] : undefined;
}
module.exports = { loadActionCatalog, getAction };