@oxis-dev/tessra 2.19.5 → 2.19.6

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.5",
3
+ "version": "2.19.6",
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
+ }
@@ -327,6 +327,34 @@ function repairLinuxShellPath(binDir) {
327
327
  };
328
328
  }
329
329
 
330
+ // En Linux con nvm/fnm, el bin de node solo está en PATH en shells interactivos.
331
+ // Crear un symlink del binario nativo en ~/.local/bin garantiza que tessra sea
332
+ // accesible en cualquier contexto: scripts, IDEs lanzando MCP, shells de login.
333
+ function installLinuxLocalBinSymlink(binaryPath) {
334
+ const home = process.env.HOME;
335
+ if (!home) return;
336
+
337
+ const localBin = path.join(home, '.local', 'bin');
338
+ const symlinkPath = path.join(localBin, 'tessra');
339
+
340
+ try {
341
+ if (!fs.existsSync(localBin)) {
342
+ fs.mkdirSync(localBin, { recursive: true });
343
+ }
344
+
345
+ try {
346
+ fs.lstatSync(symlinkPath); // lanza si no existe
347
+ fs.unlinkSync(symlinkPath);
348
+ } catch (_) { /* no existía — bien */ }
349
+
350
+ fs.symlinkSync(binaryPath, symlinkPath);
351
+ console.log(`tessra: symlink creado en ${symlinkPath} (disponible sin nvm activo).`);
352
+ } catch (err) {
353
+ // No fatal — tessra sigue disponible vía el bin de npm si nvm está activo
354
+ console.warn(`tessra: no se pudo crear symlink en ${symlinkPath}: ${err.message}`);
355
+ }
356
+ }
357
+
330
358
  function ensureGlobalBinOnPath() {
331
359
  const binDir = getGlobalBinDir();
332
360
  if (!binDir) {
@@ -422,6 +450,11 @@ async function main() {
422
450
  // --version puede fallar si el binario requiere inicialización — no es fatal
423
451
  }
424
452
 
453
+ // En Linux: symlink en ~/.local/bin para que tessra funcione sin nvm activo
454
+ if (process.platform === 'linux') {
455
+ installLinuxLocalBinSymlink(dest);
456
+ }
457
+
425
458
  ensureGlobalBinOnPath();
426
459
 
427
460
  console.log(`tessra: binario instalado correctamente en ${dest}`);