Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TESTING.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Set-ExecutionPolicy -Scope Process Bypass
.\uninstall.ps1 -DryRun
```

La salida debe contener la etiqueta de enlaces de acceso del idioma seleccionado: `Links to enter` en inglés o `Enlaces de acceso` en español. La simulación de instalación de Windows también muestra las instrucciones oficiales de respaldo de Ollama.
La salida debe contener la etiqueta de enlaces de acceso del idioma seleccionado: `Open TrinaxAI at` en inglés o `Enlaces de acceso` en español. La simulación de instalación de Windows también muestra las instrucciones oficiales de respaldo de Ollama.

Si no hay una máquina Windows disponible, todavía se puede ejecutar la suite
de simulación de PowerShell con el contenedor oficial:
Expand Down
2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Set-ExecutionPolicy -Scope Process Bypass
.\uninstall.ps1 -DryRun
```

The output must contain the localized access-links label: `Links to enter` in English or `Enlaces de acceso` in Spanish. The Windows install simulation also prints the official Ollama fallback instructions.
The output must contain the localized access-links label: `Open TrinaxAI at` in English or `Enlaces de acceso` in Spanish. The Windows install simulation also prints the official Ollama fallback instructions.

When a Windows host is not available, the PowerShell dry-run suite can still
be exercised with the official PowerShell container:
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ el formato de [Keep a Changelog](https://keepachangelog.com/).

### Corregido

- La simulación del actualizador ya no anuncia una dirección LAN cuando nunca se permitieron otros
dispositivos (shell y PowerShell), como ya hacía la del instalador.
- El instalador, el actualizador y el desinstalador muestran "Open TrinaxAI at" antes de la dirección web en
inglés (decía "Links to enter", una traducción literal). En español no cambia.
- Una ejecución de `trinaxai agent -p` en un script sin `--yolo` ahora dice por stderr por qué se rechazó una
edición o un comando (no hay terminal para preguntar), en vez de que el modelo culpe a "una restricción del
sistema". La salida estándar sigue teniendo solo la respuesta.
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ All notable changes to TrinaxAI are documented here. This project follows the

### Fixed

- The updater's dry-run no longer announces a LAN address when other devices were never allowed (shell and
PowerShell), as the installer's already did.
- The installer, updater and uninstaller print "Open TrinaxAI at" before the web address (it said "Links to
enter", a literal translation).
- A script run of `trinaxai agent -p` without `--yolo` now says on stderr why an edit or command was refused (no
terminal to ask), instead of leaving the model to blame "a system restriction". Stdout still has only the answer.
- Agent follow-through is stricter about what it chases: a failed command is no longer chased after the file
Expand Down
2 changes: 1 addition & 1 deletion install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ if ($DryRun) {
Write-Host (T "DRY-RUN: nothing will be downloaded, installed, or changed." "SIMULACIÓN: no se descargará, instalará ni modificará nada.") -ForegroundColor Yellow
Write-Host (T "Would use installation directory:" "Se usaría el directorio de instalación:") $InstallDir
Write-Host ""
Write-Host (T "Links to enter" "Enlaces de acceso") -ForegroundColor Cyan
Write-Host (T "Open TrinaxAI at" "Enlaces de acceso") -ForegroundColor Cyan
Write-Host (T " Localhost: https://localhost:3334" " Localhost: https://localhost:3334")
if ($LanAccess) {
Write-Host (T " LAN: https://[YOUR-LAN-IP]:3334" " LAN / Red local: https://[TU-IP-LAN]:3334")
Expand Down
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ tr_text_es() {
' Embeddings: RAG indexing and semantic search') echo ' Embeddings: indexación RAG y búsqueda semántica' ;;
' Vision: image and screenshot analysis') echo ' Visión: análisis de imágenes y capturas de pantalla' ;;
'Deprecated LAN system option ignored; host administration stays localhost-only.') echo 'La opción obsoleta de sistema por LAN se ignora; la administración del host queda solo en localhost.' ;;
'Links to enter') echo 'Enlaces de acceso' ;;
'Open TrinaxAI at') echo 'Enlaces de acceso' ;;
'Localhost') echo 'Localhost' ;;
'LAN / Red local') echo 'LAN' ;;
'RAG health') echo 'Salud de RAG' ;;
Expand Down Expand Up @@ -1287,7 +1287,7 @@ run_dry_run() {
print_info "Would optionally start TrinaxAI and configure auto-start/weekly updates"
print_ok "Service and auto-start changes simulated"
echo ""
echo -e "${BOLD}${CYAN}$(tr_text 'Links to enter')${NC}"
echo -e "${BOLD}${CYAN}$(tr_text 'Open TrinaxAI at')${NC}"
echo " Localhost: https://localhost:3334"
if [ "$LAN_ACCESS" != "1" ]; then
# Matches the real install: unless the user allowed it, nothing listens beyond this computer.
Expand Down Expand Up @@ -1888,7 +1888,7 @@ echo ""
if [ "$START_NOW" = "1" ]; then
echo -e "${GREEN}${BOLD}$(tr_text 'TrinaxAI is ready!')${NC}"
echo ""
echo -e "${BOLD}${CYAN}$(tr_text 'Links to enter')${NC}"
echo -e "${BOLD}${CYAN}$(tr_text 'Open TrinaxAI at')${NC}"
echo -e " ${BLUE}$(tr_text 'Localhost'):${NC} https://localhost:3334"
if [ "$(env_file_value TRINAXAI_PWA_HOST)" != "0.0.0.0" ]; then
echo -e " ${BLUE}$(tr_text 'LAN / Red local'):${NC} $(tr_text 'This computer only. To allow other devices later, run: trinaxai network refresh')"
Expand Down
2 changes: 1 addition & 1 deletion test-installers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function Invoke-PowerShellDryRun([string]$Script, [string[]]$Arguments = @()) {
if (-not $PowerShellEngine) { return "" }
$Output = & $PowerShellEngine.Source -NoProfile -ExecutionPolicy Bypass -File (Join-Path $Root $Script) @Arguments 2>&1 | Out-String
if ($LASTEXITCODE -ne 0) { throw "PowerShell dry-run failed: $Script`n$Output" }
Assert-Contains $Output "Links to enter" "Missing links output: $Script"
Assert-Contains $Output "Open TrinaxAI at" "Missing links output: $Script"
return $Output
}

Expand Down
14 changes: 12 additions & 2 deletions test-installers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ for script in install.sh update.sh uninstall.sh; do
cat "$output" >&2
fail "dry-run failed: $script"
fi
grep -Fq 'Links to enter' "$output" || fail "missing Links to enter: $script"
grep -Fq 'Open TrinaxAI at' "$output" || fail "missing Open TrinaxAI at: $script"
if grep -Eiq 'unbound variable|unbound variable' "$output"; then
fail "unbound variable reported: $script"
fi
Expand Down Expand Up @@ -232,6 +232,16 @@ grep -Fq 'TU-IP-LAN' "$plan_output" || fail "dry-run with --lan-access does not
grep -Fq 'Access from other devices: No' "$plan_output" || fail "--no-lan-access does not override TRINAXAI_LAN_ACCESS"
if grep -Fq 'YOUR-LAN-IP' "$plan_output"; then fail "dry-run announces a LAN link although LAN access is off"; fi
grep -Fq 'This computer only' "$plan_output" || fail "dry-run does not say TrinaxAI stays on this computer"
# The updater keeps the .env, so its dry-run tells the truth about LAN access too.
update_root="$TMP_DIR/update-root"
mkdir -p "$update_root"
printf 'TRINAXAI_PWA_HOST=127.0.0.1\n' >"$update_root/.env"
(cd "$ROOT" && TRINAXAI_UPDATE_ROOT="$update_root" bash update.sh --dry-run --language en >"$plan_output" 2>&1) || fail "update dry-run (LAN off) failed"
if grep -Fq 'YOUR-LAN-IP' "$plan_output"; then fail "update dry-run announces a LAN link although LAN access is off"; fi
grep -Fq 'This computer only' "$plan_output" || fail "update dry-run does not say TrinaxAI stays on this computer"
printf 'TRINAXAI_PWA_HOST=0.0.0.0\n' >"$update_root/.env"
(cd "$ROOT" && TRINAXAI_UPDATE_ROOT="$update_root" bash update.sh --dry-run --language en >"$plan_output" 2>&1) || fail "update dry-run (LAN on) failed"
grep -Fq 'YOUR-LAN-IP' "$plan_output" || fail "update dry-run hides the LAN link although LAN access is on"
(cd "$ROOT" && bash install.sh --dry-run --language en >"$plan_output" 2>&1) || fail "english install dry-run failed"
grep -Fq 'Installation plan' "$plan_output" || fail "installer plan is missing in English"
ok "Installer shows a localized plan before it changes anything"
Expand All @@ -258,7 +268,7 @@ if command -v pwsh >/dev/null 2>&1; then
cat "$output" >&2
fail "PowerShell dry-run failed: $script"
}
grep -Fq 'Links to enter' "$output" || fail "missing PowerShell links: $script"
grep -Fq 'Open TrinaxAI at' "$output" || fail "missing PowerShell links: $script"
ok "PowerShell dry-run passed: $script"
done
else
Expand Down
2 changes: 1 addition & 1 deletion uninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ if ($DryRun) {
Write-Step (T "Ollama" "Ollama")
Write-Host (T " Would remove configured models/app only when explicitly requested" " Solo se eliminarían los modelos o la aplicación configurados si se solicita explícitamente")
Write-Host ""
Write-Host (T "Links to enter" "Enlaces de acceso") -ForegroundColor Cyan
Write-Host (T "Open TrinaxAI at" "Enlaces de acceso") -ForegroundColor Cyan
Write-Host (T " Localhost: https://localhost:3334" " Localhost: https://localhost:3334")
Write-Host (T " LAN: https://[YOUR-LAN-IP]:3334" " LAN / Red local: https://[TU-IP-LAN]:3334")
Write-Host (T " RAG health: https://localhost:3333/health" " Salud de RAG: https://localhost:3333/health")
Expand Down
4 changes: 2 additions & 2 deletions uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tr_text_es() {
'Would remove .venv, frontend build, and logs (configuration .env is preserved)') echo 'Se eliminarían .venv, la compilación frontend y los logs (la configuración .env se conserva)' ;;
'Would preserve source code, indexes, models, and personal data by default') echo 'El código fuente, los índices, los modelos y los datos personales se conservarían por defecto' ;;
'Would remove configured models/app only when explicitly requested') echo 'Solo se eliminarían los modelos o la aplicación configurados si se solicita explícitamente' ;;
'Links to enter') echo 'Enlaces de acceso' ;;
'Open TrinaxAI at') echo 'Enlaces de acceso' ;;
'LAN / Red local') echo 'LAN' ;;
'RAG health') echo 'Salud de RAG' ;;
'DRY-RUN: nothing will be stopped, removed, or changed.') echo 'SIMULACIÓN: no se detendrá, borrará ni modificará nada.' ;;
Expand Down Expand Up @@ -301,7 +301,7 @@ if [ "$DRY_RUN" = "1" ]; then
print_step "Ollama"
echo " $(tr_text 'Would remove configured models/app only when explicitly requested')"
echo ""
echo -e "${BOLD}${CYAN}$(tr_text 'Links to enter')${NC}"
echo -e "${BOLD}${CYAN}$(tr_text 'Open TrinaxAI at')${NC}"
echo " Localhost: https://localhost:3334"
if [ "$LANGUAGE" = "es" ]; then
echo " LAN / Red local: https://[TU-IP-LAN]:3334"
Expand Down
15 changes: 13 additions & 2 deletions update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,20 @@ if ($DryRun) {
Write-Step (T "Restart" "Reinicio")
Write-Info (T "Would restart TrinaxAI if requested" "Se reiniciaría TrinaxAI si se solicita")
Write-Host ""
Write-Host (T "Links to enter" "Enlaces de acceso") -ForegroundColor Cyan
Write-Host (T "Open TrinaxAI at" "Enlaces de acceso") -ForegroundColor Cyan
Write-Host (T " Localhost: https://localhost:3334" " Localhost: https://localhost:3334")
Write-Host (T " LAN: https://[YOUR-LAN-IP]:3334" " LAN / Red local: https://[TU-IP-LAN]:3334")
# The update keeps the .env as it is: a LAN address is only real when other devices were allowed.
$PwaHost = ""
$EnvFile = Join-Path $Repo ".env"
if (Test-Path -LiteralPath $EnvFile -PathType Leaf) {
$HostLine = Get-Content -LiteralPath $EnvFile | Where-Object { $_ -match '^\s*TRINAXAI_PWA_HOST\s*=' } | Select-Object -Last 1
if ($HostLine) { $PwaHost = ($HostLine -replace '^[^=]*=', '').Trim().Trim('"').Trim("'") }
}
if (@("", "127.0.0.1", "localhost", "::1") -contains $PwaHost) {
Write-Host (T " LAN: This computer only. To allow other devices later, run: trinaxai network refresh" " LAN / Red local: Solo este equipo. Para permitir otros dispositivos: trinaxai network refresh")
} else {
Write-Host (T " LAN: https://[YOUR-LAN-IP]:3334" " LAN / Red local: https://[TU-IP-LAN]:3334")
}
Write-Host (T " RAG health: https://localhost:3333/health" " Salud de RAG: https://localhost:3333/health")
Write-Ok (T "Dry-run finished; no changes were made" "Simulación terminada; no se hicieron cambios")
exit 0
Expand Down
27 changes: 20 additions & 7 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ tr_text_es() {
'Would check Ollama and pull configured models if requested') echo 'Se comprobaría Ollama y se descargarían los modelos configurados si se solicita' ;;
'Would change autostart and run readiness checks') echo 'Se cambiaría el inicio automático y se ejecutarían comprobaciones de preparación' ;;
'Would restart TrinaxAI if requested') echo 'Se reiniciaría TrinaxAI si se solicita' ;;
'Links to enter') echo 'Enlaces de acceso' ;;
'Open TrinaxAI at') echo 'Enlaces de acceso' ;;
'LAN / Red local') echo 'LAN' ;;
'RAG health') echo 'Salud de RAG' ;;
'DRY-RUN: nothing will be downloaded, installed, or changed.') echo 'SIMULACIÓN: no se descargará, instalará ni modificará nada.' ;;
Expand Down Expand Up @@ -382,13 +382,26 @@ if [ "$DRY_RUN" = "1" ]; then
print_step "Restart"
print_info "Would restart TrinaxAI if requested"
echo ""
echo -e "${BOLD}${CYAN}$(tr_text 'Links to enter')${NC}"
echo -e "${BOLD}${CYAN}$(tr_text 'Open TrinaxAI at')${NC}"
echo " Localhost: https://localhost:3334"
if [ "$LANGUAGE" = "es" ]; then
echo " LAN / Red local: https://[TU-IP-LAN]:3334"
else
echo " LAN: https://[YOUR-LAN-IP]:3334"
fi
# The update keeps the .env as it is: a LAN address is only real when other devices were allowed.
pwa_host="$(awk -F= '$1 == "TRINAXAI_PWA_HOST" { sub(/^[^=]*=/, ""); gsub(/\r$/, ""); print; exit }' .env 2>/dev/null || true)"
case "$pwa_host" in
""|127.0.0.1|localhost|::1)
if [ "$LANGUAGE" = "es" ]; then
echo " LAN / Red local: Solo este equipo. Para permitir otros dispositivos: trinaxai network refresh"
else
echo " LAN: This computer only. To allow other devices later, run: trinaxai network refresh"
fi
;;
*)
if [ "$LANGUAGE" = "es" ]; then
echo " LAN / Red local: https://[TU-IP-LAN]:3334"
else
echo " LAN: https://[YOUR-LAN-IP]:3334"
fi
;;
esac
echo " $(tr_text 'RAG health'): https://localhost:3333/health"
print_ok "Dry-run finished; no changes were made"
exit 0
Expand Down
Loading