nexakit 0.5.0 → 0.5.1

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.
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "nexakit",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "nexakit",
9
- "version": "0.5.0",
9
+ "version": "0.5.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@modelcontextprotocol/sdk": "1.30.0",
12
+ "@modelcontextprotocol/sdk": "1.32.2",
13
13
  "@modelcontextprotocol/server": "^2.4.0",
14
14
  "@modelcontextprotocol/server-filesystem": "2026.8.31",
15
15
  "ajv": "^8.17.1",
@@ -78,9 +78,9 @@
78
78
  }
79
79
  },
80
80
  "node_modules/@modelcontextprotocol/sdk": {
81
- "version": "1.30.0",
82
- "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.30.0.tgz",
83
- "integrity": "sha512-xKd8OIzlqNzcqcNumGAa6g+PW2kjD5vrpcKOnfldAUPP3j7lnqMPwlTXQm8gF+UwH72z0lqaRbjr9hqGz0eITA==",
81
+ "version": "1.32.2",
82
+ "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.32.2.tgz",
83
+ "integrity": "sha512-SWsVtH/0vULSQStoZ6xxH2K09Li8fXYTMC64ZeogCdpZ3XSi1eCPOByV1OpuJxuI3OcmHhosDWYyii07tpPsLw==",
84
84
  "license": "MIT",
85
85
  "dependencies": {
86
86
  "@hono/node-server": "^1.19.9 || ^2.0.5",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexakit",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Asistente por pasos de skills verificadas por SHA-256, coordinación entre agentes y memoria por proyecto para Claude Code y Codex.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "node": ">=24"
27
27
  },
28
28
  "dependencies": {
29
- "@modelcontextprotocol/sdk": "1.30.0",
29
+ "@modelcontextprotocol/sdk": "1.32.2",
30
30
  "@modelcontextprotocol/server": "^2.4.0",
31
31
  "@modelcontextprotocol/server-filesystem": "2026.8.31",
32
32
  "ajv": "^8.17.1",
@@ -8,8 +8,8 @@
8
8
  "huella": "e39c0a0493e7ca82"
9
9
  },
10
10
  "nexakit-modelo": {
11
- "version": "0.4.0",
12
- "huella": "e788ceeb40d5d47e"
11
+ "version": "0.4.1",
12
+ "huella": "2088ccd36890a7a4"
13
13
  },
14
14
  "nexakit-sesion": {
15
15
  "version": "0.2.0",
@@ -1 +1 @@
1
- {"name":"nexakit-modelo","version":"0.4.0","description":"Barra sobre el prompt con modelo, esfuerzo, recomendación por mensaje (delegar antes que cambiar de modelo), acierto de caché y uso de contexto y límites, sin cambiar nada."}
1
+ {"name":"nexakit-modelo","version":"0.4.1","description":"Barra sobre el prompt con modelo, esfuerzo, recomendación por mensaje (delegar antes que cambiar de modelo), acierto de caché y uso de contexto y límites, sin cambiar nada."}
@@ -24,9 +24,17 @@ export function ajustarPorLimite(recommendation, limite) {
24
24
 
25
25
  const etiqueta = (r) => `${nombreModelo(r.model)} · ${r.effort}`;
26
26
 
27
- export function decidir({ model, effort, recommendation, ctx, tokens, cacheFria = false, limite, rutinaSeguidas = 0 }) {
27
+ // Una recomendación rebajada por el límite de uso lo dice en la barra: nunca se baja de modelo sin explicarlo.
28
+ export function decidir(entrada) {
29
+ const { recommendation, limite } = entrada;
28
30
  const r = ajustarPorLimite(recommendation, limite);
29
31
  if (!r) return null;
32
+ const decision = decidirCon(r, entrada);
33
+ if (r === recommendation || decision.accion === 'mantener') return decision;
34
+ return { ...decision, texto: `${decision.texto} (límite ${Math.round(limite)} %)` };
35
+ }
36
+
37
+ function decidirCon(r, { model, effort, ctx, tokens, cacheFria = false, rutinaSeguidas = 0 }) {
30
38
  const mismaFamilia = familia(model) === familia(r.model);
31
39
  if (r.delegar === 'nivel-ligero') {
32
40
  return mismaFamilia && effort === r.effort
@@ -216,6 +216,7 @@ export async function applySetup(
216
216
  throw new Error(`Bloque desconocido: ${id}`);
217
217
  };
218
218
 
219
+ const skipped = [];
219
220
  for (const { id } of confirmation.blocks) {
220
221
  onProgress(id, 'start');
221
222
  try {
@@ -226,11 +227,17 @@ export async function applySetup(
226
227
  ? `${detail.startsWith('No se pudo') ? detail : `No se pudo conectar la memoria a ${AGENT_NAMES[id.split(':')[1]]}: ${detail}`} ${RETRY}`
227
228
  : `Falló «${confirmation.blocks.find((block) => block.id === id).label}»: ${detail} ${RETRY}`;
228
229
  onProgress(id, 'failed', message);
229
- return { ok: false, done, failed: { id, message }, finalCheck };
230
+ // Superpowers comes from each agent's own marketplace: when that fails, the memory, the rules and the other
231
+ // agents are still worth leaving ready. The run ends as not ready and the final check lists it as pending.
232
+ if (id.startsWith('superpowers:')) {
233
+ skipped.push({ id, message });
234
+ continue;
235
+ }
236
+ return { ok: false, done, failed: { id, message }, ...(skipped.length && { skipped }), finalCheck };
230
237
  }
231
238
  done.push(id);
232
239
  onProgress(id, 'done');
233
240
  }
234
241
  // A final check that finds something still pending is a failure: the person must not read «Listo».
235
- return { ok: finalCheck?.ok ?? true, done, finalCheck };
242
+ return { ok: (finalCheck?.ok ?? true) && !skipped.length, done, ...(skipped.length && { skipped }), finalCheck };
236
243
  }
package/src/setup-tui.js CHANGED
@@ -392,7 +392,7 @@ function finalLines(model) {
392
392
  if (result?.finalCheck) lines.push(`${result.finalCheck.ok ? '◇' : '!'} Comprobación final: ${result.finalCheck.message}`);
393
393
  if (model.step !== 'done') return { lines, end: [] };
394
394
  if (!result.ok) {
395
- const reason = result.failed?.message ?? `Comprobación final: ${result.finalCheck?.message ?? ''}`;
395
+ const reason = result.failed?.message ?? result.skipped?.map(item => item.message).join(' ') ?? `Comprobación final: ${result.finalCheck?.message ?? ''}`;
396
396
  return { lines, end: [result.failed ? 'Se detuvo aquí.' : 'Terminó, pero algo no quedó listo.', ...wrapText(reason, 60)] };
397
397
  }
398
398
  const names = joinNames(answers.agents.map(agent => AGENT_NAMES[agent]));
@@ -15,6 +15,13 @@ export const SUPERPOWERS = Object.freeze({
15
15
  list: ['plugin', 'list', '--json'],
16
16
  install: ['plugin', 'install', 'superpowers@claude-plugins-official'],
17
17
  enable: ['plugin', 'enable', 'superpowers@claude-plugins-official'],
18
+ // A HOME where Claude Code never opened only has the built-in directory: the reviewed marketplace has to be
19
+ // added (or refreshed, when its local copy is old) before the plugin can be found.
20
+ marketplace: Object.freeze({
21
+ missing: /not found in marketplace|marketplace\b.*\bnot found/iu,
22
+ add: ['plugin', 'marketplace', 'add', 'anthropics/claude-plugins-official'],
23
+ update: ['plugin', 'marketplace', 'update', 'claude-plugins-official'],
24
+ }),
18
25
  }),
19
26
  codex: Object.freeze({
20
27
  command: 'codex',
@@ -124,9 +131,16 @@ export async function applySuperpowers(agent, state, { runCommand, environment }
124
131
  const args = state === 'falta' ? entry.install : entry.enable;
125
132
  if (!args) throw new Error(`Superpowers está desactivado en ${AGENT_NAMES[agent]}; actívalo desde ${AGENT_NAMES[agent]} (/plugins).`);
126
133
  const run = runCommand ?? (await defaultRunner(entry.command, environment));
127
- const result = await run(entry.command, args);
134
+ const detailOf = (output) => String(output?.stderr || output?.stdout || output?.errorCode || '').trim();
135
+ let result = await run(entry.command, args);
136
+ if (result?.status !== 0 && state === 'falta' && entry.marketplace?.missing.test(detailOf(result))) {
137
+ const prepared =
138
+ (await run(entry.command, entry.marketplace.add))?.status === 0 ||
139
+ (await run(entry.command, entry.marketplace.update))?.status === 0;
140
+ if (prepared) result = await run(entry.command, args);
141
+ }
128
142
  if (result?.status !== 0) {
129
- const detail = String(result?.stderr || result?.stdout || result?.errorCode || '').trim();
143
+ const detail = detailOf(result);
130
144
  throw new Error(`No se pudo ${state === 'falta' ? 'instalar' : 'activar'} Superpowers en ${AGENT_NAMES[agent]}.${detail ? ` ${detail}` : ''}`);
131
145
  }
132
146
  return true;