@oxis-dev/tessra 2.19.7 → 2.19.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxis-dev/tessra",
3
- "version": "2.19.7",
3
+ "version": "2.19.9",
4
4
  "description": "MCP server for AI coding tools and agents. Provides semantic codebase context for Cursor, Claude Code, Codex, Copilot, Antigravity, and CLI workflows without requiring full file uploads.",
5
5
  "license": "UNLICENSED",
6
6
  "author": {
@@ -184,14 +184,6 @@ function getGlobalBinDir() {
184
184
  return process.platform === 'win32' ? prefix : path.join(prefix, 'bin');
185
185
  }
186
186
 
187
- function printManualFix(binDir) {
188
- if (process.platform === 'win32') {
189
- console.warn(`tessra: agrega esta ruta a tu PATH de usuario: ${binDir}`);
190
- return;
191
- }
192
-
193
- console.warn(`tessra: agrega esta linea a tu shell profile: export PATH="$PATH:${binDir}"`);
194
- }
195
187
 
196
188
  function repairWindowsUserPath(binDir) {
197
189
  const currentUserPath = execFileSync(
@@ -345,9 +337,7 @@ function installLinuxLocalBin(binaryPath) {
345
337
 
346
338
  fs.copyFileSync(binaryPath, destPath);
347
339
  fs.chmodSync(destPath, 0o755);
348
- console.log(`tessra: binario copiado en ${destPath}.`);
349
- } catch (err) {
350
- console.warn(`tessra: no se pudo copiar binario en ${destPath}: ${err.message}`);
340
+ } catch (_) {
351
341
  return; // si no pudo copiar, no tiene sentido agregar al PATH
352
342
  }
353
343
 
@@ -369,63 +359,72 @@ function installLinuxLocalBin(binaryPath) {
369
359
  } catch (_) { /* no fatal */ }
370
360
  }
371
361
 
372
- if (patched.length > 0) {
373
- console.log(`tessra: ~/.local/bin agregado al PATH en: ${patched.join(', ')}.`);
374
- }
375
- console.log('tessra: abre una terminal nueva — ya deberia reconocer: tessra --version');
376
362
  }
377
363
 
378
364
  function ensureGlobalBinOnPath() {
379
365
  const binDir = getGlobalBinDir();
380
- if (!binDir) {
381
- console.warn('tessra: no se pudo inferir el directorio global de npm para verificar PATH.');
382
- return;
383
- }
366
+ if (!binDir || pathContains(binDir, process.env.PATH || '')) return;
384
367
 
385
- if (pathContains(binDir, process.env.PATH || '')) {
386
- console.log(`tessra: comando global disponible en PATH (${binDir}).`);
368
+ if (process.platform === 'win32') {
369
+ try { repairWindowsUserPath(binDir); } catch (_) { /* la caja ya indica abrir ventana nueva */ }
387
370
  return;
388
371
  }
389
372
 
390
- if (process.platform === 'win32') {
391
- try {
392
- const result = repairWindowsUserPath(binDir);
393
- if (result.changed) {
394
- console.log('tessra: PATH reparado en Windows.');
395
- } else {
396
- console.log('tessra: PATH de usuario ya estaba configurado en Windows.');
397
- }
398
- console.log('tessra: abre una PowerShell nueva y ejecuta: tessra --version');
399
- return;
400
- } catch (err) {
401
- console.warn('tessra: no se pudo reparar PATH automaticamente en Windows.');
402
- console.warn(`tessra: ${err.message}`);
403
- printManualFix(binDir);
404
- return;
405
- }
373
+ if (process.platform === 'linux') {
374
+ try { repairLinuxShellPath(binDir); } catch (_) { /* no fatal */ }
406
375
  }
376
+ }
407
377
 
408
- if (process.platform === 'linux') {
409
- try {
410
- const result = repairLinuxShellPath(binDir);
411
- if (result.changed) {
412
- console.log(`tessra: PATH reparado en Linux via ${result.profilePaths.join(', ')}.`);
413
- console.log(`tessra: para usarlo en esta terminal ejecuta: source ${result.profilePath}`);
414
- console.log('tessra: en una terminal nueva ya deberia reconocer: tessra --version');
415
- } else if (result.configured) {
416
- console.log(`tessra: PATH ya configurado en Linux via ${result.profilePaths.join(', ')}.`);
417
- console.log(`tessra: si esta terminal no lo ve aun, ejecuta: source ${result.profilePath}`);
418
- } else {
419
- console.warn('tessra: no se aplico auto-fix de PATH en Linux.');
420
- printManualFix(binDir);
421
- }
422
- return;
423
- } catch (err) {
424
- console.warn('tessra: no se pudo reparar PATH automaticamente en Linux.');
425
- console.warn(`tessra: ${err.message}`);
426
- printManualFix(binDir);
427
- return;
428
- }
378
+ // ── Resumen final de instalación ─────────────────────────────────────────────
379
+
380
+ function printInstallSummary() {
381
+ const W = 54;
382
+ const line = '─'.repeat(W);
383
+ const green = (s) => `\x1b[32m${s}\x1b[0m`;
384
+ const pad = (s) => {
385
+ const visible = s.replace(/\x1b\[[0-9;]*m/g, '');
386
+ return s + ' '.repeat(Math.max(0, W - visible.length));
387
+ };
388
+ const box = (rows) => {
389
+ console.log(`\n┌${line}┐`);
390
+ for (const row of rows) console.log(`│ ${pad(row)} │`);
391
+ console.log(`└${line}┘\n`);
392
+ };
393
+
394
+ const platform = process.platform;
395
+ const shellName = path.basename(process.env.SHELL || '');
396
+ const title = green(`Tessra ${VERSION} instalado`);
397
+
398
+ if (platform === 'linux') {
399
+ box([
400
+ title,
401
+ '',
402
+ 'Open a new terminal and run:',
403
+ ' tessra --help',
404
+ '',
405
+ 'Or activate it in this session without closing:',
406
+ ' source ~/.bashrc (bash)',
407
+ ' source ~/.zshrc (zsh)',
408
+ ]);
409
+ } else if (platform === 'darwin') {
410
+ box([
411
+ title,
412
+ '',
413
+ 'Open a new terminal and run:',
414
+ ' tessra --help',
415
+ '',
416
+ 'Or activate it in this session without closing:',
417
+ ' source ~/.zshrc (zsh, macOS default)',
418
+ ' source ~/.bash_profile (bash)',
419
+ ]);
420
+ } else if (platform === 'win32') {
421
+ box([
422
+ title,
423
+ '',
424
+ 'PATH updated on Windows.',
425
+ 'Open a new PowerShell or CMD window',
426
+ 'and run: tessra --help',
427
+ ]);
429
428
  }
430
429
  }
431
430
 
@@ -433,16 +432,12 @@ function ensureGlobalBinOnPath() {
433
432
 
434
433
  async function main() {
435
434
  // Saltar en entornos CI que solo construyen el paquete (no instalan)
436
- if (process.env.TESSRA_SKIP_POSTINSTALL) {
437
- console.log('tessra: TESSRA_SKIP_POSTINSTALL activo — omitiendo descarga del binario.');
438
- return;
439
- }
435
+ if (process.env.TESSRA_SKIP_POSTINSTALL) return;
440
436
 
441
437
  const { asset, dest, tar } = getPlatformAsset();
442
438
  const url = `${S3_BASE}/v${VERSION}/${asset}`;
443
439
 
444
- console.log(`tessra: descargando binario para ${process.platform}/${process.arch}...`);
445
- console.log(`tessra: ${url}`);
440
+ console.log(`Downloading Tessra ${VERSION} for ${process.platform}/${process.arch}...`);
446
441
 
447
442
  // Asegurar que el directorio bin/ existe
448
443
  if (!fs.existsSync(BIN_DIR)) {
@@ -476,8 +471,7 @@ async function main() {
476
471
  }
477
472
 
478
473
  ensureGlobalBinOnPath();
479
-
480
- console.log(`tessra: binario instalado correctamente en ${dest}`);
474
+ printInstallSummary();
481
475
  }
482
476
 
483
477
  main().catch((err) => {