jorgex-stack 1.9.49 → 1.9.50

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 +42 -4
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2976,6 +2976,19 @@ var ADAPTERS = {
2976
2976
  "claude-code": claudeCodeAdapter,
2977
2977
  codex: codexAdapter
2978
2978
  };
2979
+ var RUNTIME_STATUS_LABEL = {
2980
+ ok: "al d\xEDa",
2981
+ failed: "fall\xF3",
2982
+ skipped: "omitido",
2983
+ preview: "revisado"
2984
+ };
2985
+ function formatRuntimeSummary(command, statuses) {
2986
+ if (statuses.length === 0) return `Resumen ${command}: sin runtimes.`;
2987
+ const failed = statuses.filter((s) => s.status === "failed").map((s) => s.name);
2988
+ const rest = statuses.filter((s) => s.status !== "failed").map((s) => `${s.name} ${RUNTIME_STATUS_LABEL[s.status]}`);
2989
+ const head = `Resumen ${command}: ${rest.length > 0 ? rest.join(", ") : "ning\xFAn runtime al d\xEDa"}`;
2990
+ return failed.length > 0 ? `${head}; fall\xF3 en ${failed.join(", ")} \u2014 revisa arriba.` : `${head}.`;
2991
+ }
2979
2992
  function executePlaywrightToolAction2(action, pnpmBin = resolvePnpmBin(), env) {
2980
2993
  return executePlaywrightToolAction(action, pnpmBin, env);
2981
2994
  }
@@ -3181,22 +3194,30 @@ async function runInstall(opts) {
3181
3194
  let exitCode = 0;
3182
3195
  let successfulRuns = 0;
3183
3196
  const successfulContexts = [];
3197
+ const runtimeStatuses = [];
3198
+ const reportStatus = (name, status) => {
3199
+ runtimeStatuses.push({ name, status });
3200
+ opts.onRuntimeStatus?.(name, status);
3201
+ };
3184
3202
  for (const id of opts.runtimes) {
3185
3203
  const adapter = ADAPTERS[id];
3186
3204
  if (!adapter) {
3187
3205
  p.log.warn(`${id}: adapter pendiente (F3/F4) \u2014 omitido.`);
3206
+ reportStatus(id, "skipped");
3188
3207
  continue;
3189
3208
  }
3190
3209
  const detection = adapter.detect();
3191
3210
  const configDir = opts.targetDir ?? detection.configDir;
3192
3211
  if (!detection.installed && opts.targetDir === void 0) {
3193
3212
  p.log.warn(`${adapter.name} no detectado en esta m\xE1quina \u2014 omitido.`);
3213
+ reportStatus(adapter.name, "skipped");
3194
3214
  continue;
3195
3215
  }
3196
3216
  const models = modelMap[id];
3197
3217
  if (!models) {
3198
3218
  p.log.error(`${adapter.name}: sin modelos seleccionados \u2014 ejecuta 'jorgex-stack models --agents ${id}'.`);
3199
3219
  exitCode = 1;
3220
+ reportStatus(adapter.name, "failed");
3200
3221
  continue;
3201
3222
  }
3202
3223
  const ctx = {
@@ -3239,6 +3260,7 @@ async function runInstall(opts) {
3239
3260
  for (const c of preview) p.log.message(` ${c.status === "create" ? "+" : "~"} ${c.action.target}`);
3240
3261
  if (changes.length > preview.length) p.log.message(` \u2026 y ${changes.length - preview.length} m\xE1s`);
3241
3262
  for (const o of orphans) p.log.message(` - ${o}`);
3263
+ reportStatus(adapter.name, "preview");
3242
3264
  continue;
3243
3265
  }
3244
3266
  const writeManifest = () => {
@@ -3257,6 +3279,7 @@ async function runInstall(opts) {
3257
3279
  p.log.success(`${adapter.name}: ya al d\xEDa (idempotente).`);
3258
3280
  successfulRuns++;
3259
3281
  successfulContexts.push({ adapter, ctx });
3282
+ reportStatus(adapter.name, "ok");
3260
3283
  continue;
3261
3284
  }
3262
3285
  if (!opts.yes && process.stdout.isTTY) {
@@ -3264,6 +3287,7 @@ async function runInstall(opts) {
3264
3287
  const ok = await p.confirm({ message: `\xBFAplicar ${changes.length} cambios en ${adapter.name}?${orphanNote}` });
3265
3288
  if (p.isCancel(ok) || !ok) {
3266
3289
  p.log.warn(`${adapter.name}: omitido por el usuario.`);
3290
+ reportStatus(adapter.name, "skipped");
3267
3291
  continue;
3268
3292
  }
3269
3293
  plan = buildPlan(adapter, { ...ctx, warnings: [] });
@@ -3286,6 +3310,7 @@ async function runInstall(opts) {
3286
3310
  p.log.error(`${adapter.name}: verificaci\xF3n de idempotencia FALL\xD3 (${dirty.length} acciones inestables).`);
3287
3311
  for (const d of dirty.slice(0, 10)) p.log.message(` ! ${d.action.target}`);
3288
3312
  exitCode = 1;
3313
+ reportStatus(adapter.name, "failed");
3289
3314
  } else {
3290
3315
  writeManifest();
3291
3316
  if (useManifest) persistConfigurationOwnershipChanges(id, configDir, plan);
@@ -3293,6 +3318,7 @@ async function runInstall(opts) {
3293
3318
  p.log.success(`${adapter.name}: ${changes.length} archivos aplicados y verificados (idempotente).`);
3294
3319
  successfulRuns++;
3295
3320
  successfulContexts.push({ adapter, ctx });
3321
+ reportStatus(adapter.name, "ok");
3296
3322
  }
3297
3323
  }
3298
3324
  if (toolPlan?.actions.length) {
@@ -3398,6 +3424,7 @@ async function runInstall(opts) {
3398
3424
  saveInstallModePreference(installModePreferenceFile(), modePreference);
3399
3425
  }
3400
3426
  if (showSummary) {
3427
+ p.log.message(formatRuntimeSummary(opts.command ?? "install", runtimeStatuses));
3401
3428
  p.outro(opts.dryRun ? exitCode === 0 ? "Dry-run: no se ha escrito nada." : "Dry-run completado con errores (revisa arriba)." : exitCode === 0 ? "Hecho." : "Install completado con errores (revisa arriba).");
3402
3429
  }
3403
3430
  return exitCode;
@@ -4749,7 +4776,7 @@ async function runDoctor(options = {}) {
4749
4776
  }
4750
4777
  let problems = reportWritingStyle(options, writingStyle, modePreference);
4751
4778
  if (options.targetDir !== void 0 || options.runtimes !== void 0 && options.runtimes.length > 0 && options.runtimes.every((id) => id === "pi")) {
4752
- p3.outro("Diagn\xF3stico limitado al estilo; no se han ejecutado las comprobaciones globales del sistema.");
4779
+ p3.outro(problems > 0 ? `Doctor (alcance: estilo): ${problems} problema(s) \u2014 revisa arriba.` : "Doctor (alcance: estilo): todo sano.");
4753
4780
  return problems > 0 ? 1 : 0;
4754
4781
  }
4755
4782
  const engramBin = detectEngram();
@@ -4867,7 +4894,7 @@ async function runDoctor(options = {}) {
4867
4894
  const key = context7KeyConfigured(adapter.id, detection.configDir);
4868
4895
  if (key === false) p3.log.info(`${adapter.name}: context7 sin key (opcional \u2014 con\xE9ctala cuando quieras).`);
4869
4896
  }
4870
- p3.outro(problems === 0 ? "Todo sano." : `${problems} avisos \u2014 revisa arriba.`);
4897
+ p3.outro(problems === 0 ? "Doctor: todo sano." : `Doctor: ${problems} aviso(s) \u2014 revisa arriba.`);
4871
4898
  return problems > 0 ? 1 : 0;
4872
4899
  }
4873
4900
 
@@ -7939,6 +7966,8 @@ Flags disponibles: jorgex-stack --help`
7939
7966
  const fileRuntimes = runtimes.filter(isFileManagedRuntime);
7940
7967
  let exitCode = 0;
7941
7968
  let completed = false;
7969
+ const runtimeStatuses = [];
7970
+ let piStatus = null;
7942
7971
  p6.intro(`jorgex-stack ${command}${flags.dryRun ? " (dry-run)" : ""}`);
7943
7972
  try {
7944
7973
  assertSelectedPromptFiles(runtimes, flags.targetDir);
@@ -7988,6 +8017,8 @@ Flags disponibles: jorgex-stack --help`
7988
8017
  if (fileRuntimes.length > 0) {
7989
8018
  exitCode = await runInstall({
7990
8019
  runtimes: fileRuntimes,
8020
+ command,
8021
+ onRuntimeStatus: (name, status) => runtimeStatuses.push({ name, status }),
7991
8022
  writingStyle,
7992
8023
  targetDir: flags.targetDir,
7993
8024
  dryRun: flags.dryRun,
@@ -8021,8 +8052,10 @@ Flags disponibles: jorgex-stack --help`
8021
8052
  }
8022
8053
  }
8023
8054
  if (runtimes.includes("pi") && piCanRun) {
8024
- if (flags.dryRun) p6.log.info(`Pi: ${command} previsto; dry-run no ejecuta subprocess ni escribe receipt.`);
8025
- else {
8055
+ if (flags.dryRun) {
8056
+ p6.log.info(`Pi: ${command} previsto; dry-run no ejecuta subprocess ni escribe receipt.`);
8057
+ piStatus = "preview";
8058
+ } else {
8026
8059
  const piExitCode = await runSelectedPi({
8027
8060
  operation: command,
8028
8061
  targetDir: flags.targetDir,
@@ -8035,8 +8068,12 @@ Flags disponibles: jorgex-stack --help`
8035
8068
  playwrightCapability
8036
8069
  });
8037
8070
  exitCode = Math.max(exitCode, piExitCode);
8071
+ piStatus = piExitCode === 0 ? "ok" : "failed";
8038
8072
  }
8073
+ } else if (runtimes.includes("pi")) {
8074
+ piStatus = "skipped";
8039
8075
  }
8076
+ if (piStatus !== null) runtimeStatuses.push({ name: "Pi", status: piStatus });
8040
8077
  if (runtimes.includes("pi")) persistSuccessfulGlobalMode(mode, flags.targetDir, flags.dryRun, exitCode);
8041
8078
  completed = true;
8042
8079
  } catch (error) {
@@ -8045,6 +8082,7 @@ Flags disponibles: jorgex-stack --help`
8045
8082
  } finally {
8046
8083
  if (process.exitCode === 1) exitCode = 1;
8047
8084
  process.exitCode = exitCode;
8085
+ if (runtimeStatuses.length > 0) p6.log.message(formatRuntimeSummary(command, runtimeStatuses));
8048
8086
  p6.outro(exitCode !== 0 ? `${command} completado con errores (revisa arriba).` : !completed ? `${command} cancelado.` : flags.dryRun ? "Dry-run: no se ha escrito nada." : "Hecho.");
8049
8087
  }
8050
8088
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jorgex-stack",
3
- "version": "1.9.49",
3
+ "version": "1.9.50",
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",