@oxis-dev/tessra 2.19.8 → 2.19.20

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.8",
3
+ "version": "2.19.20",
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": {
@@ -59,4 +59,4 @@
59
59
  "LICENSE",
60
60
  "README.md"
61
61
  ]
62
- }
62
+ }
@@ -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
 
@@ -371,57 +361,40 @@ function installLinuxLocalBin(binaryPath) {
371
361
 
372
362
  }
373
363
 
374
- function ensureGlobalBinOnPath() {
375
- const binDir = getGlobalBinDir();
376
- if (!binDir) {
377
- console.warn('tessra: no se pudo inferir el directorio global de npm para verificar PATH.');
378
- return;
379
- }
364
+ // Copia el binario nativo a ~/.tessra/bin/tessra (ruta estable que usan los IDE configs).
365
+ // Es independiente de nvm, node, o la versión de npm — el comando en settings.json apunta aquí.
366
+ function installTessraHomeBin(binaryPath) {
367
+ const home = process.env.HOME || process.env.USERPROFILE;
368
+ if (!home) return;
380
369
 
381
- if (pathContains(binDir, process.env.PATH || '')) {
382
- console.log(`tessra: comando global disponible en PATH (${binDir}).`);
383
- return;
370
+ const binDir = path.join(home, '.tessra', 'bin');
371
+ const binName = process.platform === 'win32' ? 'tessra.exe' : 'tessra';
372
+ const destPath = path.join(binDir, binName);
373
+
374
+ try {
375
+ if (!fs.existsSync(binDir)) {
376
+ fs.mkdirSync(binDir, { recursive: true });
377
+ }
378
+ fs.copyFileSync(binaryPath, destPath);
379
+ if (process.platform !== 'win32') {
380
+ fs.chmodSync(destPath, 0o755);
381
+ }
382
+ } catch (_) {
383
+ // No fatal — ide_config.rs cae a current_exe() si esta ruta no existe
384
384
  }
385
+ }
386
+
387
+ function ensureGlobalBinOnPath() {
388
+ const binDir = getGlobalBinDir();
389
+ if (!binDir || pathContains(binDir, process.env.PATH || '')) return;
385
390
 
386
391
  if (process.platform === 'win32') {
387
- try {
388
- const result = repairWindowsUserPath(binDir);
389
- if (result.changed) {
390
- console.log('tessra: PATH reparado en Windows.');
391
- } else {
392
- console.log('tessra: PATH de usuario ya estaba configurado en Windows.');
393
- }
394
- console.log('tessra: abre una PowerShell nueva y ejecuta: tessra --version');
395
- return;
396
- } catch (err) {
397
- console.warn('tessra: no se pudo reparar PATH automaticamente en Windows.');
398
- console.warn(`tessra: ${err.message}`);
399
- printManualFix(binDir);
400
- return;
401
- }
392
+ try { repairWindowsUserPath(binDir); } catch (_) { /* la caja ya indica abrir ventana nueva */ }
393
+ return;
402
394
  }
403
395
 
404
396
  if (process.platform === 'linux') {
405
- try {
406
- const result = repairLinuxShellPath(binDir);
407
- if (result.changed) {
408
- console.log(`tessra: PATH reparado en Linux via ${result.profilePaths.join(', ')}.`);
409
- console.log(`tessra: para usarlo en esta terminal ejecuta: source ${result.profilePath}`);
410
- console.log('tessra: en una terminal nueva ya deberia reconocer: tessra --version');
411
- } else if (result.configured) {
412
- console.log(`tessra: PATH ya configurado en Linux via ${result.profilePaths.join(', ')}.`);
413
- console.log(`tessra: si esta terminal no lo ve aun, ejecuta: source ${result.profilePath}`);
414
- } else {
415
- console.warn('tessra: no se aplico auto-fix de PATH en Linux.');
416
- printManualFix(binDir);
417
- }
418
- return;
419
- } catch (err) {
420
- console.warn('tessra: no se pudo reparar PATH automaticamente en Linux.');
421
- console.warn(`tessra: ${err.message}`);
422
- printManualFix(binDir);
423
- return;
424
- }
397
+ try { repairLinuxShellPath(binDir); } catch (_) { /* no fatal */ }
425
398
  }
426
399
  }
427
400
 
@@ -449,10 +422,10 @@ function printInstallSummary() {
449
422
  box([
450
423
  title,
451
424
  '',
452
- 'Abre una nueva terminal y ejecuta:',
425
+ 'Open a new terminal and run:',
453
426
  ' tessra --help',
454
427
  '',
455
- 'O actívalo en esta sesión sin cerrarla:',
428
+ 'Or activate it in this session without closing:',
456
429
  ' source ~/.bashrc (bash)',
457
430
  ' source ~/.zshrc (zsh)',
458
431
  ]);
@@ -460,20 +433,20 @@ function printInstallSummary() {
460
433
  box([
461
434
  title,
462
435
  '',
463
- 'Abre una nueva terminal y ejecuta:',
436
+ 'Open a new terminal and run:',
464
437
  ' tessra --help',
465
438
  '',
466
- 'O actívalo en esta sesión sin cerrarla:',
467
- ' source ~/.zshrc (zsh, macOS por defecto)',
439
+ 'Or activate it in this session without closing:',
440
+ ' source ~/.zshrc (zsh, macOS default)',
468
441
  ' source ~/.bash_profile (bash)',
469
442
  ]);
470
443
  } else if (platform === 'win32') {
471
444
  box([
472
445
  title,
473
446
  '',
474
- 'PATH actualizado en Windows.',
475
- 'Abre una nueva ventana de PowerShell o CMD',
476
- 'y ejecuta: tessra --help',
447
+ 'PATH updated on Windows.',
448
+ 'Open a new PowerShell or CMD window',
449
+ 'and run: tessra --help',
477
450
  ]);
478
451
  }
479
452
  }
@@ -482,16 +455,12 @@ function printInstallSummary() {
482
455
 
483
456
  async function main() {
484
457
  // Saltar en entornos CI que solo construyen el paquete (no instalan)
485
- if (process.env.TESSRA_SKIP_POSTINSTALL) {
486
- console.log('tessra: TESSRA_SKIP_POSTINSTALL activo — omitiendo descarga del binario.');
487
- return;
488
- }
458
+ if (process.env.TESSRA_SKIP_POSTINSTALL) return;
489
459
 
490
460
  const { asset, dest, tar } = getPlatformAsset();
491
461
  const url = `${S3_BASE}/v${VERSION}/${asset}`;
492
462
 
493
- console.log(`tessra: descargando binario para ${process.platform}/${process.arch}...`);
494
- console.log(`tessra: ${url}`);
463
+ console.log(`Downloading Tessra ${VERSION} for ${process.platform}/${process.arch}...`);
495
464
 
496
465
  // Asegurar que el directorio bin/ existe
497
466
  if (!fs.existsSync(BIN_DIR)) {
@@ -524,6 +493,9 @@ async function main() {
524
493
  installLinuxLocalBin(dest);
525
494
  }
526
495
 
496
+ // Instalar en ~/.tessra/bin/tessra — ruta estable que usan los IDE configs
497
+ installTessraHomeBin(dest);
498
+
527
499
  ensureGlobalBinOnPath();
528
500
  printInstallSummary();
529
501
  }