jorgex-stack 1.9.8 → 1.9.10

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 +31 -16
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -181,26 +181,33 @@ var DEFAULT_MODEL_MAP = {
181
181
  // la skill de la app heredan el modelo elegido por el usuario. Estos defaults
182
182
  // son solo para subagentes; variant → model_reasoning_effort.
183
183
  codex: {
184
- strong: { model: "gpt-5.6-terra", variant: "xhigh" },
185
- standard: { model: "gpt-5.6-terra", variant: "xhigh" },
186
- cheap: { model: "gpt-5.6-luna", variant: "medium" }
184
+ strong: { model: "gpt-6-astra", variant: "max" },
185
+ standard: { model: "gpt-5.6-sol", variant: "medium" },
186
+ cheap: { model: "gpt-5.6-luna", variant: "medium" },
187
+ overrides: {
188
+ implementer: { model: "gpt-5.6-luna", variant: "max" },
189
+ tester: { model: "gpt-5.6-luna", variant: "max" },
190
+ "silent-failure-hunter": { model: "gpt-5.6-sol", variant: "medium" }
191
+ }
187
192
  }
188
193
  };
189
194
  function modelMapFile() {
190
195
  return path3.join(dataDir(), "model-map.json");
191
196
  }
192
197
  function loadModelMap() {
193
- const raw = readTextIfExists(modelMapFile());
198
+ const file = modelMapFile();
199
+ const raw = readTextIfExists(file);
194
200
  if (raw === null) return DEFAULT_MODEL_MAP;
195
201
  let fromDisk;
196
202
  try {
197
203
  fromDisk = JSON.parse(raw);
198
204
  } catch {
199
- return DEFAULT_MODEL_MAP;
205
+ throw new Error(`El mapa de modelos ${file} contiene JSON inv\xE1lido. Corrige el JSON o restaura una copia antes de continuar.`);
200
206
  }
201
207
  const merged = { ...fromDisk };
202
208
  for (const id of Object.keys(DEFAULT_MODEL_MAP)) {
203
209
  merged[id] = { ...DEFAULT_MODEL_MAP[id], ...fromDisk[id] ?? {} };
210
+ if (fromDisk[id] && !Object.hasOwn(fromDisk[id], "overrides")) delete merged[id].overrides;
204
211
  }
205
212
  return merged;
206
213
  }
@@ -2573,14 +2580,15 @@ async function runInstall(opts) {
2573
2580
  targetDir: opts.targetDir !== void 0 || opts.playwrightToolConsent.targetDir
2574
2581
  });
2575
2582
  const projectPlaywrightPrompt = opts.dryRun && toolPlan?.persistEnabledOnSuccess === true;
2576
- const modelMap = loadModelMap();
2577
- if (useManifest) ensureModelMapFile();
2583
+ const hasFileRuntimes = opts.runtimes.length > 0;
2584
+ const modelMap = hasFileRuntimes ? loadModelMap() : {};
2585
+ if (hasFileRuntimes && useManifest) ensureModelMapFile();
2578
2586
  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;
2587
+ const current = hasFileRuntimes && useManifest ? collectAllCurrentTargets(modePreference) : { targets: /* @__PURE__ */ new Set(), complete: false, warnings: [] };
2588
+ const canOrphan = hasFileRuntimes && useManifest && current.complete;
2581
2589
  const canonicalMcp = loadCanonicalMcp(stackDir);
2582
2590
  const canonicalHooks = loadCanonicalHooks(stackDir);
2583
- if (useManifest && (!current.complete || current.warnings.length > 0)) {
2591
+ if (hasFileRuntimes && useManifest && (!current.complete || current.warnings.length > 0)) {
2584
2592
  p.log.warn("Limpieza de hu\xE9rfanos deshabilitada: no se pudo construir el plan completo de todos los runtimes.");
2585
2593
  for (const warning of current.warnings) p.log.warn(warning);
2586
2594
  }
@@ -4905,9 +4913,11 @@ import path29 from "path";
4905
4913
  import * as p5 from "@clack/prompts";
4906
4914
  var TIERS = ["strong", "standard", "cheap"];
4907
4915
  var EFFORTS = ["low", "medium", "high", "xhigh"];
4916
+ var CODEX_EFFORTS = [...EFFORTS, "max"];
4908
4917
  var CLAUDE_ALIASES = ["fable", "opus", "sonnet", "haiku", "inherit"];
4909
4918
  var CODEX_MODELS = [
4910
4919
  "default",
4920
+ "gpt-6-astra",
4911
4921
  "gpt-5.6-sol",
4912
4922
  "gpt-5.6-terra",
4913
4923
  "gpt-5.6-luna",
@@ -4936,12 +4946,6 @@ function isCompleteRuntimeModelMap(models) {
4936
4946
  async function askModel(det, subject, current) {
4937
4947
  if (det.id === "codex") {
4938
4948
  if (!current) throw new Error("Codex requiere un model-map base.");
4939
- const effort = await p5.select({
4940
- message: `${det.name} \xB7 ${subject} \u2014 reasoning effort`,
4941
- options: EFFORTS.map((v) => ({ value: v, label: v })),
4942
- initialValue: current.variant ?? "medium"
4943
- });
4944
- if (p5.isCancel(effort)) return CANCEL;
4945
4949
  const modelOptions = [
4946
4950
  ...CODEX_MODELS.includes(current.model) ? [] : [{ value: current.model, label: `${current.model} (actual)` }],
4947
4951
  ...CODEX_MODELS.map((m) => ({
@@ -4965,6 +4969,17 @@ async function askModel(det, subject, current) {
4965
4969
  if (p5.isCancel(typed)) return CANCEL;
4966
4970
  model = typed.trim().toLowerCase();
4967
4971
  }
4972
+ const efforts = ["gpt-6-astra", "gpt-5.6", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"].includes(model) ? CODEX_EFFORTS : EFFORTS;
4973
+ const keptEffort = model === current.model ? current.variant : void 0;
4974
+ const effort = await p5.select({
4975
+ message: `${det.name} \xB7 ${subject} \u2014 reasoning effort`,
4976
+ options: [
4977
+ ...efforts.map((v) => ({ value: v, label: v })),
4978
+ ...keptEffort && !efforts.includes(keptEffort) ? [{ value: keptEffort, label: `${keptEffort} (actual)` }] : []
4979
+ ],
4980
+ initialValue: keptEffort ?? "medium"
4981
+ });
4982
+ if (p5.isCancel(effort)) return CANCEL;
4968
4983
  return { model, variant: effort };
4969
4984
  }
4970
4985
  const optionsList = det.options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jorgex-stack",
3
- "version": "1.9.8",
3
+ "version": "1.9.10",
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",