@saulwade/swl-ses 1.6.6 → 1.6.7

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.
package/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- # CLAUDE.md — @saulwade/swl-ses v1.6.6
1
+ # CLAUDE.md — @saulwade/swl-ses v1.6.7
2
2
 
3
3
  ## Reglas de máxima prioridad (aplican SIEMPRE, sin excepción)
4
4
 
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # swl-ses v1.6.6
1
+ # swl-ses v1.6.7
2
2
 
3
3
  > El paquete anterior `@saulwadeleon/swl-software-engineering-system` está deprecado. Migrar a `@saulwade/swl-ses` (npmjs.org canónico) o `@saul-wade/swl-ses` (mirror en GitHub Packages) — el CLI `swl-ses` no cambia.
4
4
 
@@ -136,6 +136,10 @@ function esVersionNueva(local, remota) {
136
136
  function debeVerificar() {
137
137
  try {
138
138
  const data = JSON.parse(fs.readFileSync(flagPath(), 'utf8'));
139
+ // FIX v1.6.7: si el flag fue escrito por el instalador (postInstall:
140
+ // true), forzar el primer check de operación normal. Sin esto, el flag
141
+ // post-install bloquearía el hook real durante 24h tras la instalación.
142
+ if (data.postInstall === true) return true;
139
143
  const intervalo = data.remota ? CHECK_INTERVAL_MS : RETRY_INTERVAL_MS;
140
144
  return (Date.now() - data.timestamp) > intervalo;
141
145
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saulwade/swl-ses",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "description": "Sistema de ingenieria de software auto-evolutivo multi-runtime polyglot con 61 agentes, 177 habilidades, 44 comandos, 69 reglas y 42 hooks. Soporta 11 lenguajes y 7 runtimes: Claude Code, OpenClaude, OpenCode, Gemini CLI, Cursor, Codex CLI (soporte completo); GitHub Copilot (soporte parcial). 100% en espanol (Mexico). Multi-target install (--target CSV / --all-runtimes), autoconfig MCP en Cursor/Codex con --with-mcp, agentes Codex en TOML, hooks Cursor (17 eventos) y Codex (6 eventos). Gateway bidireccional con relay Telegram y auditoria profunda Nemesis con loop evaluator-optimizer opt-in (ADR-0021) y 8 tools ejecutables. v1.6.5 integra 3 patrones de awesome-codex-skills (ComposioHQ, MIT) — agent-deep-links + changelog-generator + gh-fix-ci-swl — ADR-0029, y promueve 3 evoluciones SIGAF al sistema global (D1 nemesis SendMessage + D2 verificar smoke frontend + L2 alineacion veredicto).",
5
5
  "bin": {
6
6
  "swl-ses": "bin/swl-ses.js",
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swl-ses",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "description": "Sistema de ingenieria de software auto-evolutivo multi-runtime polyglot. 61 agentes, 177 habilidades, 44 comandos, 69 reglas y 42 hooks. 62 librerias. 11 lenguajes. Soporta Claude Code, Copilot, OpenCode, Codex y Gemini CLI. Loop evaluator-optimizer en /swl:nemesis (ADR-0021). 3 patrones de awesome-codex-skills (ComposioHQ, MIT) adoptados (ADR-0029) — agent-deep-links + changelog-generator + gh-fix-ci-swl. Promueve 3 evoluciones SIGAF (D1 nemesis SendMessage, D2 verificar smoke frontend, L2 alineacion veredicto).",
5
5
  "author": "Saul Wade Leon",
6
6
  "license": "MIT",
package/scripts/doctor.js CHANGED
@@ -61,13 +61,25 @@ async function doctor(opciones = {}) {
61
61
  if (fs.existsSync(flagPath)) {
62
62
  const flag = JSON.parse(fs.readFileSync(flagPath, 'utf8'));
63
63
  const horas = ((Date.now() - flag.timestamp) / 3600000).toFixed(1);
64
- const detalle = `local=${flag.local}, remota=${flag.remota || '?'}, hace ${horas}h`;
65
- if (flag.hayNueva) {
66
- console.log(formatearAdvertencia('Hook check-update', `${detalle} hay versión nueva pendiente`));
67
- advertencias++;
68
- } else {
69
- console.log(formatearPaso('Hook check-update', detalle));
64
+ // FIX v1.6.7: distinguir flag escrito por el instalador (postInstall:
65
+ // true) de flag escrito por el hook check-update.js durante operación
66
+ // normal. El postInstall flag es "fresh" y NO indica que el hook haya
67
+ // corrido — solo que la instalación dejó el throttle limpio.
68
+ if (flag.postInstall) {
69
+ console.log(formatearPaso(
70
+ 'Hook check-update',
71
+ `flag post-install fresco (local=${flag.local}, hace ${horas}h) — se regenerará en el primer PostToolUse del hook`
72
+ ));
70
73
  ok++;
74
+ } else {
75
+ const detalle = `local=${flag.local}, remota=${flag.remota || '?'}, hace ${horas}h`;
76
+ if (flag.hayNueva) {
77
+ console.log(formatearAdvertencia('Hook check-update', `${detalle} — hay versión nueva pendiente`));
78
+ advertencias++;
79
+ } else {
80
+ console.log(formatearPaso('Hook check-update', detalle));
81
+ ok++;
82
+ }
71
83
  }
72
84
  } else {
73
85
  console.log(formatearAdvertencia('Hook check-update', 'Sin flag de throttle — el hook nunca se ejecutó en este equipo'));
@@ -886,17 +886,24 @@ async function install(opciones) {
886
886
  }
887
887
  }
888
888
 
889
- // FIX v1.6.6: invalidar el flag de throttle de check-update.js para que el
890
- // próximo `doctor` reporte la versión instalada actual y no la cacheada de
891
- // hasta hace 24h. Sin esto, el doctor justo tras un upgrade dice cosas
892
- // engañosas como "local=1.6.4, remota=1.6.3, hace 2.8h" cuando el binario
893
- // que corre ya es 1.6.5.
889
+ // FIX v1.6.7 (refina v1.6.6): escribir un flag de throttle "post-install
890
+ // fresh" con la versión recién instalada en lugar de borrarlo. El v1.6.6
891
+ // borraba el flag eso evitaba el mensaje stale "local=X, remota=Y, hace
892
+ // 2.8h" pero el doctor reportaba luego "el hook nunca se ejecutó" porque
893
+ // la ausencia del flag se interpretaba como "primera vez". Ahora dejamos
894
+ // un flag explícitamente marcado postInstall: true para que el doctor
895
+ // distinga "post-install reciente" vs "hook nunca corrió".
894
896
  try {
895
897
  const os = require('os');
896
898
  const flagPath = process.env.SWL_UPDATE_FLAG_PATH || path.join(os.tmpdir(), 'swl-ses-update-check.json');
897
- if (fs.existsSync(flagPath)) {
898
- fs.unlinkSync(flagPath);
899
- }
899
+ const flagFresh = {
900
+ local: VERSION,
901
+ remota: VERSION,
902
+ hayNueva: false,
903
+ timestamp: Date.now(),
904
+ postInstall: true,
905
+ };
906
+ fs.writeFileSync(flagPath, JSON.stringify(flagFresh, null, 2), 'utf8');
900
907
  } catch { /* nunca bloquear install por esto */ }
901
908
 
902
909
  console.log('\nSiguiente paso:');