jorgex-stack 1.9.8 → 1.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +9 -7
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -190,13 +190,14 @@ function modelMapFile() {
190
190
  return path3.join(dataDir(), "model-map.json");
191
191
  }
192
192
  function loadModelMap() {
193
- const raw = readTextIfExists(modelMapFile());
193
+ const file = modelMapFile();
194
+ const raw = readTextIfExists(file);
194
195
  if (raw === null) return DEFAULT_MODEL_MAP;
195
196
  let fromDisk;
196
197
  try {
197
198
  fromDisk = JSON.parse(raw);
198
199
  } catch {
199
- return DEFAULT_MODEL_MAP;
200
+ throw new Error(`El mapa de modelos ${file} contiene JSON inv\xE1lido. Corrige el JSON o restaura una copia antes de continuar.`);
200
201
  }
201
202
  const merged = { ...fromDisk };
202
203
  for (const id of Object.keys(DEFAULT_MODEL_MAP)) {
@@ -2573,14 +2574,15 @@ async function runInstall(opts) {
2573
2574
  targetDir: opts.targetDir !== void 0 || opts.playwrightToolConsent.targetDir
2574
2575
  });
2575
2576
  const projectPlaywrightPrompt = opts.dryRun && toolPlan?.persistEnabledOnSuccess === true;
2576
- const modelMap = loadModelMap();
2577
- if (useManifest) ensureModelMapFile();
2577
+ const hasFileRuntimes = opts.runtimes.length > 0;
2578
+ const modelMap = hasFileRuntimes ? loadModelMap() : {};
2579
+ if (hasFileRuntimes && useManifest) ensureModelMapFile();
2578
2580
  p.log.info(engramBin ? `Engram detectado: ${engramBin} (se respeta, D7)` : "Engram NO detectado.");
2579
- const current = useManifest ? collectAllCurrentTargets(modePreference) : { targets: /* @__PURE__ */ new Set(), complete: false, warnings: [] };
2580
- const canOrphan = useManifest && current.complete;
2581
+ const current = hasFileRuntimes && useManifest ? collectAllCurrentTargets(modePreference) : { targets: /* @__PURE__ */ new Set(), complete: false, warnings: [] };
2582
+ const canOrphan = hasFileRuntimes && useManifest && current.complete;
2581
2583
  const canonicalMcp = loadCanonicalMcp(stackDir);
2582
2584
  const canonicalHooks = loadCanonicalHooks(stackDir);
2583
- if (useManifest && (!current.complete || current.warnings.length > 0)) {
2585
+ if (hasFileRuntimes && useManifest && (!current.complete || current.warnings.length > 0)) {
2584
2586
  p.log.warn("Limpieza de hu\xE9rfanos deshabilitada: no se pudo construir el plan completo de todos los runtimes.");
2585
2587
  for (const warning of current.warnings) p.log.warn(warning);
2586
2588
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jorgex-stack",
3
- "version": "1.9.8",
3
+ "version": "1.9.9",
4
4
  "description": "Harness multi-agente portable: instala la config JorgeX (agentes, skills, hooks, Engram, MCPs) en Claude Code, Codex CLI, OpenCode y Pi",
5
5
  "type": "module",
6
6
  "license": "MIT",