@saulwade/swl-ses 2.2.3 → 2.3.0
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 +4 -4
- package/README.md +3 -3
- package/agentes/arquitecto-swl.md +1 -1
- package/agentes/auto-evolucion-swl.md +908 -908
- package/agentes/backend-csharp-swl.md +1 -1
- package/agentes/backend-go-swl.md +1 -1
- package/agentes/backend-java-swl.md +1 -1
- package/agentes/backend-rust-swl.md +1 -1
- package/agentes/evals/orquestador-swl.evals.json +1 -1
- package/agentes/implementador-swl.md +2 -2
- package/agentes/llm-apps-swl.md +1 -1
- package/agentes/orquestador-swl.md +7 -7
- package/agentes/pagos-swl.md +1 -1
- package/agentes/perfilador-usuario-swl.md +321 -321
- package/agentes/planificador-swl.md +1 -1
- package/agentes/producto-prd-swl.md +1 -1
- package/agentes/revisor-seguridad-swl.md +1 -1
- package/agentes/sre-swl.md +1 -1
- package/comandos/swl/aprobar-plan.md +146 -141
- package/comandos/swl/release.md +45 -8
- package/comandos/swl/status.md +343 -333
- package/comandos/swl/verificar.md +817 -817
- package/habilidades/compactacion-contexto/SKILL.md +3 -3
- package/habilidades/contenedores-docker/SKILL.md +3 -1
- package/habilidades/context-builder/SKILL.md +4 -4
- package/habilidades/control-profundidad/SKILL.md +5 -5
- package/habilidades/ejecutar-fase/SKILL.md +564 -541
- package/habilidades/extractor-de-aprendizajes/SKILL.md +3 -3
- package/habilidades/guardrail-semantico/SKILL.md +1 -1
- package/habilidades/harness-claude-code/SKILL.md +305 -305
- package/habilidades/meta-skills-estandar/recursos/skills-as-agents.md +1 -1
- package/habilidades/planear-fase/SKILL.md +15 -1
- package/habilidades/proceso-debate-adversarial/SKILL.md +191 -164
- package/habilidades/prompt-engineering/SKILL.md +5 -5
- package/habilidades/release-semver/SKILL.md +4 -1
- package/habilidades/tdd-workflow/SKILL.md +33 -1
- package/habilidades/workflow-claude-code/SKILL.md +6 -6
- package/hooks/captura-acciones-post.js +151 -0
- package/hooks/captura-acciones-session.js +155 -0
- package/hooks/lib/briefing.js +512 -474
- package/hooks/lib/captura-acciones.js +392 -0
- package/hooks/lib/context-builder.js +2 -2
- package/hooks/lib/model-router.js +1 -1
- package/hooks/lib/token-estimator.js +2 -0
- package/hooks/linea-estado.js +7 -5
- package/llms.txt +29 -29
- package/manifiestos/canonical-hashes.json +1964 -1310
- package/manifiestos/hooks-config.json +18 -0
- package/manifiestos/modulos.json +4 -0
- package/manifiestos/skills-lock.json +1282 -1282
- package/package.json +93 -93
- package/plugin.json +371 -371
- package/reglas/git-coauthor.md +100 -100
- package/reglas/memoria-consolidada.md +41 -0
- package/reglas/pruebas.md +15 -0
- package/reglas/seguridad-agentes.md +66 -0
- package/schemas/agent-frontmatter.schema.json +294 -294
- package/schemas/instinct.schema.json +161 -152
- package/scripts/bootstrap-instintos.js +25 -7
- package/scripts/lib/claude-sessions.js +1 -0
- package/scripts/lib/gitignore-manifest.js +44 -11
- package/scripts/lib/skill-metrics.js +41 -1
- package/scripts/lib/tool-cost-analyzer.js +1 -0
- package/scripts/publicar.js +34 -85
- package/scripts/verificar-trazabilidad.js +329 -298
- package/scripts/vendor/claude-usage/__pycache__/scanner.cpython-314.pyc +0 -0
package/scripts/publicar.js
CHANGED
|
@@ -16,7 +16,6 @@ const { execFileSync, spawnSync } = require('child_process');
|
|
|
16
16
|
const fs = require('fs');
|
|
17
17
|
const path = require('path');
|
|
18
18
|
const os = require('os');
|
|
19
|
-
const readline = require('readline');
|
|
20
19
|
|
|
21
20
|
const {
|
|
22
21
|
NOMBRE_GITHUB_MIRROR: GITHUB_NAME,
|
|
@@ -131,84 +130,35 @@ function esErrorOTP(stderr) {
|
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* El caller debe manejar el caso null como "fallback a guía manual".
|
|
141
|
-
*/
|
|
142
|
-
function solicitarOTPInteractiva() {
|
|
143
|
-
if (!process.stdin.isTTY) {
|
|
144
|
-
process.stderr.write('[publicar] stdin no es TTY: no se puede pedir OTP interactivamente.\n');
|
|
145
|
-
process.stderr.write('[publicar] Configurar NPM_CONFIG_OTP=<otp> antes de invocar este script.\n');
|
|
146
|
-
return null;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
|
|
150
|
-
// questionSync vía promesa NO funciona aquí — el script es síncrono.
|
|
151
|
-
// Usamos un truco: readline es async-only, así que dejamos al usuario
|
|
152
|
-
// el manejo bloqueante leyendo línea por línea con readSync vía read-int.
|
|
153
|
-
// Pero readline no expone modo síncrono. Alternativa: leer de stdin con
|
|
154
|
-
// fd 0 + readSync. En Windows con TTY funciona; en Linux idem.
|
|
155
|
-
try {
|
|
156
|
-
process.stderr.write('\nNPM requiere OTP (2FA). Ingresa el código de 6 dígitos de tu autenticador: ');
|
|
157
|
-
const otp = leerLineaStdinSync().trim();
|
|
158
|
-
rl.close();
|
|
159
|
-
if (!/^\d{6}$/.test(otp)) {
|
|
160
|
-
process.stderr.write(`\n[publicar] OTP inválida: se esperan 6 dígitos, se recibió: "${otp.slice(0, 20)}"\n`);
|
|
161
|
-
return null;
|
|
162
|
-
}
|
|
163
|
-
return otp;
|
|
164
|
-
} catch (err) {
|
|
165
|
-
rl.close();
|
|
166
|
-
process.stderr.write(`\n[publicar] error leyendo OTP: ${String(err.message).slice(0, 120)}\n`);
|
|
167
|
-
return null;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Lectura síncrona de una línea de stdin. Necesario porque readline solo
|
|
173
|
-
* expone API asíncrona, pero todo el flujo de publicar.js es síncrono.
|
|
174
|
-
* Lee byte por byte hasta encontrar newline o EOF.
|
|
133
|
+
* Ejecuta npm con stdio HEREDADO (interactivo): npm escribe directo a la
|
|
134
|
+
* terminal y lee de stdin, de modo que su flujo de 2FA NATIVO funciona —
|
|
135
|
+
* prompt de OTP TOTP O auth web/passkey ("abrir URL y seleccionar la llave"),
|
|
136
|
+
* según el método 2FA de la cuenta. Retorna el exit status sin lanzar.
|
|
137
|
+
* (A1: soporte passkey/WebAuthn, no solo TOTP.)
|
|
175
138
|
*/
|
|
176
|
-
function
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
} catch (err) {
|
|
185
|
-
// EAGAIN en stdin no-bloqueante: poco común en TTY, pero defensivo.
|
|
186
|
-
if (err.code === 'EAGAIN') continue;
|
|
187
|
-
throw err;
|
|
188
|
-
}
|
|
189
|
-
if (bytesRead === 0) break; // EOF
|
|
190
|
-
const chunk = buf.slice(0, bytesRead).toString('utf-8');
|
|
191
|
-
const nlIdx = chunk.indexOf('\n');
|
|
192
|
-
if (nlIdx >= 0) {
|
|
193
|
-
line += chunk.slice(0, nlIdx);
|
|
194
|
-
break;
|
|
195
|
-
}
|
|
196
|
-
line += chunk;
|
|
139
|
+
function npmExecInherit(args, opts = {}) {
|
|
140
|
+
const merged = { cwd: ROOT, timeout: 600_000, env: process.env, ...opts, stdio: 'inherit' };
|
|
141
|
+
let res;
|
|
142
|
+
if (NPM_CLI_JS) {
|
|
143
|
+
res = spawnSync(process.execPath, [NPM_CLI_JS, ...args], merged);
|
|
144
|
+
} else {
|
|
145
|
+
const bin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
146
|
+
res = spawnSync(bin, args, merged);
|
|
197
147
|
}
|
|
198
|
-
return
|
|
148
|
+
return res.status;
|
|
199
149
|
}
|
|
200
150
|
|
|
201
151
|
/**
|
|
202
152
|
* Ejecuta un `npm publish` con soporte automático de OTP (2FA).
|
|
203
153
|
*
|
|
204
154
|
* Flujo:
|
|
205
|
-
* 1. Si NPM_CONFIG_OTP está definida en el entorno
|
|
206
|
-
*
|
|
207
|
-
* 2. Si el publish falla con EOTP/one-time password, se
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
155
|
+
* 1. Si NPM_CONFIG_OTP está definida en el entorno (o hay token Automation),
|
|
156
|
+
* se usa directamente y el intento 1 publica sin interacción.
|
|
157
|
+
* 2. Si el publish falla con EOTP/one-time password y stdin es TTY, se
|
|
158
|
+
* reintenta con stdio HEREDADO para que npm conduzca su 2FA NATIVO —
|
|
159
|
+
* OTP TOTP O passkey/WebAuthn (navegador), según la cuenta — con
|
|
160
|
+
* --ignore-scripts (los pre-publish ya pasaron en el intento 1).
|
|
161
|
+
* 3. Si stdin no es TTY (CI sin OTP), reporta el error y retorna false.
|
|
212
162
|
*
|
|
213
163
|
* Retorna: { ok: boolean, stderr: string }
|
|
214
164
|
*
|
|
@@ -226,24 +176,23 @@ function ejecutarPublishConOTP(args, opts = {}) {
|
|
|
226
176
|
return { ok: false, stderr: intento1.stderr };
|
|
227
177
|
}
|
|
228
178
|
|
|
229
|
-
// Es EOTP.
|
|
179
|
+
// Es EOTP — 2FA requerida. npm soporta varios métodos: OTP TOTP (6 dígitos)
|
|
180
|
+
// O passkey/WebAuthn vía navegador ("abrir URL y seleccionar la llave").
|
|
181
|
+
// Forzar un prompt de TOTP rompe a los usuarios con passkey (A1). En su lugar
|
|
182
|
+
// se reintenta con stdio HEREDADO para que npm conduzca su 2FA NATIVO —
|
|
183
|
+
// funcione cual sea el método configurado en la cuenta.
|
|
230
184
|
process.stderr.write('\n[publicar] npm rechazó el publish con EOTP (2FA requerida).\n');
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
process.stderr.write('[publicar]
|
|
234
|
-
process.stderr.write(` NPM_CONFIG_OTP=<otp> node scripts/publicar.js ${process.argv.slice(2).join(' ')}\n`);
|
|
185
|
+
if (!process.stdin.isTTY) {
|
|
186
|
+
process.stderr.write('[publicar] stdin no es TTY: no se puede completar 2FA interactivo.\n');
|
|
187
|
+
process.stderr.write('[publicar] Opciones: exportar NPM_CONFIG_OTP=<otp>, o usar un token Automation (omite 2FA).\n');
|
|
235
188
|
return { ok: false, stderr: intento1.stderr };
|
|
236
189
|
}
|
|
237
|
-
|
|
238
|
-
//
|
|
239
|
-
process.stderr.write('\n[publicar] Reintentando
|
|
240
|
-
const envConOTP = { ...(opts.env || process.env), NPM_CONFIG_OTP: otp };
|
|
190
|
+
// Reintento interactivo: --ignore-scripts porque los pre-publish ya pasaron en
|
|
191
|
+
// el intento 1 (el prepack limpió el árbol; no se re-ejecuta test:release).
|
|
192
|
+
process.stderr.write('\n[publicar] Reintentando con el 2FA interactivo nativo de npm (OTP o passkey)...\n');
|
|
241
193
|
const argsConIgnore = args.includes('--ignore-scripts') ? args : [...args, '--ignore-scripts'];
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
return { ok: true, stderr: intento2.stderr };
|
|
245
|
-
}
|
|
246
|
-
return { ok: false, stderr: intento2.stderr };
|
|
194
|
+
const status = npmExecInherit(argsConIgnore, opts);
|
|
195
|
+
return { ok: status === 0, stderr: status === 0 ? '' : 'fallo en reintento interactivo de 2FA' };
|
|
247
196
|
}
|
|
248
197
|
|
|
249
198
|
function leerPkg() {
|