mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-05 12:24:08 +01:00
Stand der Technik: Go 1.27, Update-Signatur mit Version, Herkunftsnachweis, alte SSH-Verfahren sichtbar, KI für Claude 5.5, MCP 2026-07-28 (#149)
- Go 1.27, Bibliotheken nachgezogen (x/crypto 0.59, lipgloss 2.1, ultraviolet, x/sys, ristretto255 0.2) - PuTTY-Import ohne veraltete ECDSA-API; staticcheck sauber und als CI-Job lint - checksums.txt nennt die Version und ist mit signiert (update.SumsVersion); release.yml in build/sign/publish getrennt, Schlüssel nur im Job sign - Release mit Herkunftsnachweis (attest-build-provenance) und SBOM (CycloneDX); Codesignatur Windows/macOS vorbereitet (nur mit Secrets, docs/codesignatur.md) - Alte SSH-Verfahren: gelber Hinweis beim Verbinden, Host-Übersicht zeigt SSH-Verfahren / quantensicher - Vermittler und LAN-Teilen nur noch TLS 1.3 - KI: response_format json_object für Ziel/Agent/Plan, Prompt-Caching für Claude, Claude ab 4.7 ohne temperature, NoThink je Modell (thinking disabled bzw. effort low), Ablehnung (refusal) als Meldung, abgelehnte Felder je Endpunkt gemerkt - Vorbelegung qwen3:8b / gpt-5-mini - MCP 2026-07-28 (server/discover, _meta-Version, resultType), initialize für alte Clients Claude-Session: https://claude.ai/code/session_018i4GUhLGo5pLYYKwLBkYN9 Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
a1506fe8ba
commit
ec45c64266
58 files changed
+931
-228
No files matched your search
@@ -11,8 +11,8 @@ jobs:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
||||
with:
|
||||
# neuester Patch von Go 1.26: Sicherheitskorrekturen der Standardbibliothek
|
||||
go-version: "1.26.x"
|
||||
# neuester Patch von Go 1.27: Sicherheitskorrekturen der Standardbibliothek
|
||||
go-version: "1.27.x"
|
||||
check-latest: true
|
||||
- run: go vet ./... && go test ./...
|
||||
- name: Terminal-Emulator (eigene Kopie in third_party/vt)
|
||||
@@ -43,11 +43,27 @@ jobs:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
||||
with:
|
||||
# neuester Patch von Go 1.26: Sicherheitskorrekturen der Standardbibliothek
|
||||
go-version: "1.26.x"
|
||||
# neuester Patch von Go 1.27: Sicherheitskorrekturen der Standardbibliothek
|
||||
go-version: "1.27.x"
|
||||
check-latest: true
|
||||
- run: go test -race ./...
|
||||
|
||||
# Statische Prüfung: tote Funktionen, veraltete APIs (z. B. Krypto), immer
|
||||
# wahre Bedingungen. Abweichungen von der Vorgabe in staticcheck.conf.
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
||||
with:
|
||||
go-version: "1.27.x"
|
||||
check-latest: true
|
||||
- run: go run honnef.co/go/tools/cmd/staticcheck@v0.8.2 ./...
|
||||
- name: Bibliotheken aktuell? (nur Hinweis, Dependabot macht die PRs)
|
||||
run: |
|
||||
OUT="$(go list -m -u -f '{{if and .Update (not .Indirect)}}{{.Path}} {{.Version}} → {{.Update.Version}}{{end}}' all)"
|
||||
[ -z "$OUT" ] || echo "::notice title=Neuere Bibliotheken::$(echo "$OUT" | tr '\n' ';')"
|
||||
|
||||
# Tests auch auf echtem Windows und macOS (ConPTY, DPAPI, Schlüsselbund, Pfade)
|
||||
platforms:
|
||||
strategy:
|
||||
@@ -59,7 +75,7 @@ jobs:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
||||
with:
|
||||
go-version: "1.26.x"
|
||||
go-version: "1.27.x"
|
||||
check-latest: true
|
||||
- run: go test ./...
|
||||
- run: cd third_party/vt && go test ./...
|
||||
@@ -78,7 +94,7 @@ jobs:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
||||
with:
|
||||
go-version: "1.26.x"
|
||||
go-version: "1.27.x"
|
||||
check-latest: true
|
||||
- run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
|
||||
|
||||
@@ -89,7 +105,7 @@ jobs:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
||||
with:
|
||||
go-version: "1.26.x"
|
||||
go-version: "1.27.x"
|
||||
check-latest: true
|
||||
- run: FUZZTIME=15s tools/fuzz/run.sh
|
||||
- name: ANSI-Parser (third_party/ansi)
|
||||
|
||||
+141
-12
@@ -3,6 +3,12 @@
|
||||
# GitHub Release veröffentlichen. Die App findet das Release per Auto-Update.
|
||||
# Dazu: .deb-Pakete (apt-Quelle baut pages.yml) und die Homebrew-Formel
|
||||
# (Formula/sshtermy.rb, dieses Repo ist der Tap). winget: winget.yml.
|
||||
#
|
||||
# Drei Jobs, damit Schlüssel nie dort liegen, wo fremder Code läuft:
|
||||
# build – Tests und Bauen (Bibliotheken, go test …), ohne Secrets
|
||||
# sign – nur Codesignatur (falls eingerichtet), Prüfsummen und
|
||||
# Ed25519-Signatur; kein Checkout, kein go
|
||||
# publish – Herkunftsnachweis (Attestierung), Release, Homebrew
|
||||
name: release
|
||||
|
||||
on:
|
||||
@@ -12,16 +18,20 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: read # PR-Beschreibungen für den Changelog
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: release
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
release:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read # PR-Beschreibungen für den Changelog
|
||||
outputs:
|
||||
version: ${{ steps.v.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
@@ -29,7 +39,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
||||
with:
|
||||
go-version: "1.26.x"
|
||||
go-version: "1.27.x"
|
||||
check-latest: true
|
||||
|
||||
- name: Tests
|
||||
@@ -55,13 +65,14 @@ jobs:
|
||||
run: |
|
||||
PKG=github.com/db9979/sshtermy/internal/version
|
||||
LDF="-s -w -X $PKG.Version=${{ steps.v.outputs.version }} -X $PKG.Commit=${GITHUB_SHA::7} -X $PKG.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ) -X $PKG.UpdatePubKey=$UPDATE_PUBKEY"
|
||||
mkdir -p dist
|
||||
mkdir -p dist tool
|
||||
for t in windows/arm64 windows/386 windows/amd64 darwin/arm64 darwin/amd64 linux/amd64 linux/arm64 linux/arm linux/riscv64; do
|
||||
os=${t%/*}; arch=${t#*/}; ext=""; [ "$os" = windows ] && ext=".exe"
|
||||
# linux/arm = 32-Bit-ARMv7 (Raspberry Pi OS armhf, z. B. uConsole mit CM3/CM4)
|
||||
CGO_ENABLED=0 GOARM=7 GOOS=$os GOARCH=$arch go build -trimpath -ldflags "$LDF" -o "dist/sshtermy_${os}_${arch}${ext}" ./cmd/sshtermy
|
||||
done
|
||||
cd dist && sha256sum sshtermy_* > checksums.txt && cat checksums.txt
|
||||
# Signierwerkzeug für den Job „sign“ (der selbst kein go ausführt)
|
||||
CGO_ENABLED=0 go build -trimpath -o tool/sshtermy-sign ./cmd/sshtermy-sign
|
||||
|
||||
# Sicherheitsnetz: was gleich an alle Installationen geht, muss starten
|
||||
# und die richtige Version nennen (derselbe Test läuft vor jedem
|
||||
@@ -78,14 +89,96 @@ jobs:
|
||||
b=$a; [ $a = armhf ] && b=arm
|
||||
packaging/deb.sh ${{ steps.v.outputs.version }} $a dist/sshtermy_linux_$b dist
|
||||
done
|
||||
cd dist && sha256sum sshtermy_* > checksums.txt && cat checksums.txt
|
||||
|
||||
# Teileliste (SBOM, CycloneDX): welche Bibliotheken in welcher Version drin sind
|
||||
- name: SBOM
|
||||
run: go run github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@v1.12.0 app -json -licenses -main cmd/sshtermy -output dist/sshtermy.sbom.cdx.json .
|
||||
|
||||
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: unsigned
|
||||
path: |
|
||||
dist/
|
||||
tool/
|
||||
notes.md
|
||||
retention-days: 3
|
||||
|
||||
sign:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
permissions: {}
|
||||
env:
|
||||
V: ${{ needs.build.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: unsigned
|
||||
|
||||
# Codesignatur Windows (Authenticode). Nur wenn die Secrets gesetzt sind,
|
||||
# Anleitung in docs/codesignatur.md.
|
||||
- name: Windows signieren (Authenticode)
|
||||
env:
|
||||
WINDOWS_CERT_PFX: ${{ secrets.WINDOWS_CERT_PFX }}
|
||||
WINDOWS_CERT_PASSWORD: ${{ secrets.WINDOWS_CERT_PASSWORD }}
|
||||
if: env.WINDOWS_CERT_PFX != ''
|
||||
run: |
|
||||
sudo apt-get install -y -qq osslsigncode >/dev/null
|
||||
umask 077; echo "$WINDOWS_CERT_PFX" | base64 -d > "$RUNNER_TEMP/cert.pfx"
|
||||
for f in dist/sshtermy_windows_*.exe; do
|
||||
osslsigncode sign -pkcs12 "$RUNNER_TEMP/cert.pfx" -pass "$WINDOWS_CERT_PASSWORD" \
|
||||
-n "sshTermy" -i "https://github.com/${{ github.repository }}" -h sha256 \
|
||||
-ts http://timestamp.digicert.com -in "$f" -out "$f.signed"
|
||||
mv "$f.signed" "$f"
|
||||
osslsigncode verify -in "$f" | grep -q "Signature verification: ok"
|
||||
done
|
||||
rm -f "$RUNNER_TEMP/cert.pfx"
|
||||
|
||||
# Codesignatur + Notarisierung macOS (rcodesign läuft unter Linux).
|
||||
- name: macOS signieren und notarisieren
|
||||
env:
|
||||
APPLE_CERT_P12: ${{ secrets.APPLE_CERT_P12 }}
|
||||
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
|
||||
APPLE_API_KEY_P8: ${{ secrets.APPLE_API_KEY_P8 }}
|
||||
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
|
||||
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
|
||||
if: env.APPLE_CERT_P12 != ''
|
||||
run: |
|
||||
RC=apple-codesign-0.29.0-x86_64-unknown-linux-musl
|
||||
curl -fsSL -o "$RUNNER_TEMP/rc.tgz" "https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.29.0/$RC.tar.gz"
|
||||
echo "dbe85cedd8ee4217b64e9a0e4c2aef92ab8bcaaa41f20bde99781ff02e600002 $RUNNER_TEMP/rc.tgz" | sha256sum -c -
|
||||
tar xzf "$RUNNER_TEMP/rc.tgz" -C "$RUNNER_TEMP" && R="$RUNNER_TEMP/$RC/rcodesign"
|
||||
umask 077
|
||||
echo "$APPLE_CERT_P12" | base64 -d > "$RUNNER_TEMP/cert.p12"
|
||||
printf '%s' "$APPLE_CERT_PASSWORD" > "$RUNNER_TEMP/cert.pw"
|
||||
for f in dist/sshtermy_darwin_*; do
|
||||
"$R" sign --p12-file "$RUNNER_TEMP/cert.p12" --p12-password-file "$RUNNER_TEMP/cert.pw" \
|
||||
--code-signature-flags runtime --binary-identifier de.sshtermy.sshtermy "$f"
|
||||
done
|
||||
if [ -n "$APPLE_API_KEY_P8" ]; then
|
||||
echo "$APPLE_API_KEY_P8" > "$RUNNER_TEMP/key.p8"
|
||||
"$R" encode-app-store-connect-api-key -o "$RUNNER_TEMP/key.json" "$APPLE_API_ISSUER" "$APPLE_API_KEY_ID" "$RUNNER_TEMP/key.p8"
|
||||
for f in dist/sshtermy_darwin_*; do
|
||||
(cd dist && zip -q "$RUNNER_TEMP/$(basename "$f").zip" "$(basename "$f")")
|
||||
"$R" notary-submit --api-key-file "$RUNNER_TEMP/key.json" --wait "$RUNNER_TEMP/$(basename "$f").zip"
|
||||
done
|
||||
fi
|
||||
rm -f "$RUNNER_TEMP"/cert.* "$RUNNER_TEMP"/key.*
|
||||
|
||||
# Erste Zeile nennt die Version: die App installiert nur, wenn sie zur
|
||||
# erwarteten Version passt (internal/update.SumsVersion). Ältere Apps
|
||||
# überlesen die Zeile (drei statt zwei Felder).
|
||||
- name: Prüfsummen
|
||||
run: |
|
||||
cd dist
|
||||
{ echo "# sshtermy v$V"; sha256sum sshtermy_*; } > checksums.txt
|
||||
cat checksums.txt
|
||||
|
||||
- name: Signieren (Ed25519)
|
||||
env:
|
||||
UPDATE_SIGNING_KEY: ${{ secrets.UPDATE_SIGNING_KEY }}
|
||||
UPDATE_PUBKEY: ${{ vars.UPDATE_PUBKEY }}
|
||||
if: env.UPDATE_SIGNING_KEY != ''
|
||||
run: go run ./cmd/sshtermy-sign sign dist/checksums.txt
|
||||
run: chmod +x tool/sshtermy-sign && tool/sshtermy-sign sign dist/checksums.txt
|
||||
|
||||
- name: Hinweis, wenn unsigniert
|
||||
env:
|
||||
@@ -100,12 +193,48 @@ jobs:
|
||||
fi
|
||||
echo "::warning title=Release unsigniert::UPDATE_PUBKEY und UPDATE_SIGNING_KEY fehlen – Anleitung in docs/signatur.md"
|
||||
|
||||
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: signed
|
||||
path: |
|
||||
dist/
|
||||
notes.md
|
||||
retention-days: 3
|
||||
|
||||
publish:
|
||||
needs: [build, sign]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # Release + Homebrew-Formel
|
||||
id-token: write # Herkunftsnachweis (Sigstore)
|
||||
attestations: write
|
||||
env:
|
||||
V: ${{ needs.build.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: signed
|
||||
|
||||
# Herkunftsnachweis (SLSA): belegt, dass genau diese Dateien aus diesem
|
||||
# Commit in diesem Workflow entstanden sind.
|
||||
# Prüfen: gh attestation verify sshtermy_linux_amd64 --repo db9979/sshtermy
|
||||
- name: Herkunftsnachweis (Attestierung)
|
||||
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
|
||||
continue-on-error: true # Release soll daran nicht scheitern
|
||||
with:
|
||||
subject-path: |
|
||||
dist/sshtermy_*
|
||||
dist/checksums.txt
|
||||
|
||||
- name: Release veröffentlichen
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
V=${{ steps.v.outputs.version }}
|
||||
gh release create "v$V" dist/sshtermy_* dist/checksums.txt* --title "sshTermy v$V" --notes-file notes.md --latest
|
||||
gh release create "v$V" dist/sshtermy_* dist/sshtermy.sbom.cdx.json dist/checksums.txt* --title "sshTermy v$V" --notes-file notes.md --latest
|
||||
|
||||
- name: Alte Releases aufräumen (die letzten 10 bleiben)
|
||||
env:
|
||||
@@ -118,12 +247,12 @@ jobs:
|
||||
- name: Homebrew-Formel aktualisieren (Formula/sshtermy.rb in main)
|
||||
continue-on-error: true # z. B. Branch-Schutz: Release ist trotzdem draußen
|
||||
run: |
|
||||
V=${{ steps.v.outputs.version }}
|
||||
cp dist/checksums.txt "$RUNNER_TEMP/checksums.txt"
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
for i in 1 2 3 4; do
|
||||
git fetch -q origin main && git checkout -q -f -B formula origin/main
|
||||
mkdir -p Formula && packaging/formula.sh "$V" dist/checksums.txt > Formula/sshtermy.rb
|
||||
mkdir -p Formula && packaging/formula.sh "$V" "$RUNNER_TEMP/checksums.txt" > Formula/sshtermy.rb
|
||||
git add Formula/sshtermy.rb
|
||||
git diff --cached --quiet && exit 0
|
||||
git commit -q -m "Homebrew-Formel für v$V"
|
||||
|
||||
+15
-5
@@ -36,6 +36,7 @@ sshTermy ist eine schlanke Terminal-Anwendung (TUI, eine einzige Datei, ~9 MB, k
|
||||
- **Agent-Weiterleitung** pro Verbindung (wie `ssh -A`): `git pull`, `ssh` und `scp` auf dem Server nutzen deine lokalen Keys aus ssh-agent, Pageant oder dem Windows-OpenSSH-Agent, die Keys verlassen deinen Rechner nie
|
||||
- **X11-Weiterleitung** pro Verbindung (wie `ssh -X`): Grafische Programme vom Server öffnen sich hier; braucht lokal einen X-Server (XQuartz, VcXsrv, WSLg), das X-Cookie verlässt deinen Rechner nie
|
||||
- **FIDO2-Sicherheitsschlüssel** (`id_ed25519_sk`, `id_ecdsa_sk`, z. B. YubiKey) werden direkt genutzt; sshTermy sagt dir, wann du den Schlüssel berühren musst (braucht OpenSSH ssh-agent/ssh-add)
|
||||
- **Aktuelle Verschlüsselung:** Schlüsseltausch mit ML-KEM (`mlkem768x25519`, quantensicher), sobald der Server es kann. Alte Geräte, die nur SHA-1/CBC sprechen, verbinden weiter, sshTermy zeigt dann aber einen gelben Hinweis, und die Host-Übersicht (F6) nennt die alten Verfahren unter „SSH“ (sonst z. B. „… · quantensicher“)
|
||||
- **Passwortmanager statt gespeicherter Passwörter**: Im Verbindungsformular „Passwort aus“ und (unter Erweitert)
|
||||
„2FA-Code aus“: `op://Tresor/Eintrag/password` (1Password CLI), `bw:Eintrag` (Bitwarden CLI), `keepassxc:Datei.kdbx:Eintrag`
|
||||
(KeePassXC, fragt das Datenbank-Passwort), `pass:Name` oder `cmd:Befehl`. Fragt ein Server nach einem Einmalcode
|
||||
@@ -231,7 +232,7 @@ nicht als Beweis. Die Liste: Palette *Logwache: Meldungen* oder `w` im Log-Blick
|
||||
„▲ zäh“ bei schlechter Leitung). In der geteilten Ansicht leuchtet die Trennlinie neben dem aktiven Bereich, beim
|
||||
Wechsel und beim Zoom (Alt+Z) gleitet ein Rahmen mit.
|
||||
Gezeichnet wird nur, solange sich etwas bewegt; Barrierearm schaltet alles ab
|
||||
- **MCP-Server** (`sshtermy mcp`): Claude und andere KI-Clients können Verbindungen auflisten und lesende Befehle ausführen, alles andere erst nach deiner Bestätigung in sshTermy
|
||||
- **MCP-Server** (`sshtermy mcp`, Protokoll 2026-07-28, ältere Clients gehen weiter): Claude und andere KI-Clients können Verbindungen auflisten und lesende Befehle ausführen, alles andere erst nach deiner Bestätigung in sshTermy
|
||||
- **Audit-Protokoll** (Einstellungen › Protokolle & Logs): wer hat wann auf welchem Host was getan: Verbindungen, Befehle
|
||||
(auch aus Agent-Modus und Broadcast), Dateiübertragungen, Config-Sicherungen, geänderte Verbindungen,
|
||||
Master-Passwort, Gesamtsicherungen und KI-Anfragen (nur Host/Modell). Jede Zeile ist verkettet und mit einem
|
||||
@@ -556,7 +557,7 @@ Start ─▶ Entsperren (DPAPI automatisch │ Master-Passwort │ Ersteinrichtu
|
||||
|
||||
| Thema | Wahl | Grund |
|
||||
|---|---|---|
|
||||
| Sprache | Go 1.26 | Ein statisches Binary pro Plattform, Cross-Compile ohne Toolchain (`GOOS=windows GOARCH=arm64`), kein cgo |
|
||||
| Sprache | Go 1.27 | Ein statisches Binary pro Plattform, Cross-Compile ohne Toolchain (`GOOS=windows GOARCH=arm64`), kein cgo |
|
||||
| TUI | bubbletea v2 + lipgloss v2 | aktueller Charm-Stack: echte Cursor-Steuerung, Ebenen für Overlays, Kitty-Keyboard, Windows-Konsole |
|
||||
| Terminal-Emulation | charmbracelet/x/vt | aktiv gepflegt, Truecolor, Alt-Screen, Scrollback, Breitzeichen; kodiert Tasten passend zum Modus |
|
||||
| SSH | golang.org/x/crypto/ssh | Referenz-Implementierung in Go, Agent, known_hosts, Forwarding |
|
||||
@@ -672,7 +673,12 @@ Claude Desktop (`claude_desktop_config.json`): `{"mcpServers": {"sshtermy": {"co
|
||||
Getippte am Ende, so nutzen vLLM, SGLang und Ollama ihren Prefix-Cache. Der Ghost-Text schickt nur die letzten 25
|
||||
Bildschirmzeilen, Folgebefehle 40. Solange der angezeigte Vorschlag noch passt, gibt es keine neue Anfrage, und dieselbe
|
||||
Eingabe innerhalb von 3 Minuten kommt aus dem Speicher. Bei kurzen Antworten werden Denkmodelle gebeten, nicht lange
|
||||
nachzudenken (Qwen, gpt-oss, OpenAI o/gpt-5, Ollama-Denkmodelle).
|
||||
nachzudenken (Qwen, gpt-oss, OpenAI o/gpt-5, Ollama-Denkmodelle, Claude).
|
||||
- **Verlässliche Antworten:** Ziel-Modus, Agent und Plan bitten den Server um genau ein JSON-Objekt (`response_format`, wenn der
|
||||
Server es kennt). Bei Claude wird der lange Systemtext zwischengespeichert (Prompt-Caching), neuere Claude-Modelle bekommen
|
||||
von selbst die passenden Einstellungen (keine eigene Temperatur, wenig Nachdenken bei kurzen Antworten), und eine Ablehnung
|
||||
durch Claudes Sicherheitsfilter wird als solche gemeldet. Neue KI-Einrichtungen starten mit `qwen3:8b` (Ollama),
|
||||
`gpt-5-mini` (OpenAI) oder `claude-haiku-5-5`.
|
||||
- **Warm halten:** Solange Tabs offen sind, hält eine Anfrage mit einem Token alle 4 Minuten das eigene Modell geladen
|
||||
(Ollama entlädt nach 5 Minuten). Cloud-Dienste werden nicht angepingt.
|
||||
- **KI-Status** (Klick auf den Punkt) zeigt die Antwortzeit je Aufgabe (Mittel und zuletzt), so sieht man, was bremst.
|
||||
@@ -709,7 +715,10 @@ Claude Desktop (`claude_desktop_config.json`): `{"mcpServers": {"sshtermy": {"co
|
||||
### Auto-Update
|
||||
|
||||
- Prüft `releases/latest` von `db9979/sshtermy`, nur HTTPS zu github.com, Weiterleitungen geprüft.
|
||||
- **SHA-256** aus `checksums.txt` und **Ed25519-Signatur** `checksums.txt.sig` mit eingebautem Public Key.
|
||||
- **SHA-256** aus `checksums.txt` und **Ed25519-Signatur** `checksums.txt.sig` mit eingebautem Public Key. Die signierte
|
||||
Datei nennt ihre Version (`# sshtermy v1.0.42`), ein älteres signiertes Release lässt sich also nicht als neues ausgeben.
|
||||
- Jedes Release hat außerdem einen **Herkunftsnachweis** (`gh attestation verify sshtermy_linux_amd64 --repo db9979/sshtermy`)
|
||||
und eine Liste aller eingebauten Bibliotheken (`sshtermy.sbom.cdx.json`, CycloneDX).
|
||||
- Ein Build ohne diesen Schlüssel (selbst gebaut ohne `UPDATE_PUBKEY`) sagt das im Über-Dialog (F12) und fragt vor
|
||||
dem Installieren eines Updates nach; `--update` gibt eine Warnung aus.
|
||||
- Austausch: laufende Datei → `.old`, neue an ihren Platz (geht auch unter Windows), beim nächsten Start aufgeräumt.
|
||||
@@ -771,7 +780,8 @@ siehe `third_party/vt/README.sshtermy.md`.
|
||||
|
||||
## Nächste Schritte (Vorschläge)
|
||||
|
||||
1. Windows-Ressourcen (Icon, Versionsinfo) und Code-Signing der `.exe`, macOS Notarisierung.
|
||||
1. Code-Signing der `.exe` und macOS-Notarisierung: Der Release-Workflow ist vorbereitet und signiert, sobald die Zertifikate
|
||||
als Secrets hinterlegt sind ([docs/codesignatur.md](docs/codesignatur.md)).
|
||||
2. macOS-Schlüsselbund als zweiter Entsperr-Weg (wie DPAPI unter Windows).
|
||||
|
||||
## Vermittler: Server hinter NAT/Firewall
|
||||
|
||||
@@ -36,6 +36,7 @@ sshTermy is a lean terminal application (TUI, a single file, ~9 MB, no installer
|
||||
- **Agent forwarding** per connection (like `ssh -A`): `git pull`, `ssh` and `scp` on the server use your local keys from ssh-agent, Pageant or the Windows OpenSSH agent, the keys never leave your computer
|
||||
- **X11 forwarding** per connection (like `ssh -X`): graphical programs from the server open here; needs a local X server (XQuartz, VcXsrv, WSLg), the X cookie never leaves your computer
|
||||
- **FIDO2 security keys** (`id_ed25519_sk`, `id_ecdsa_sk`, e.g. YubiKey) are used directly; sshTermy asks you to touch the key (needs OpenSSH ssh-agent/ssh-add)
|
||||
- **Up-to-date encryption:** key exchange with ML-KEM (`mlkem768x25519`, quantum-safe) whenever the server supports it. Old devices that only speak SHA-1/CBC still connect, but sshTermy shows a yellow notice and the host overview (F6) lists the old algorithms under “SSH” (otherwise e.g. “… · quantum-safe”)
|
||||
- **Password manager instead of stored passwords**: in the connection form “Password from” and (under Advanced)
|
||||
“2FA code from”: `op://Vault/Item/password` (1Password CLI), `bw:Item` (Bitwarden CLI), `keepassxc:file.kdbx:Item`
|
||||
(KeePassXC, asks for the database password), `pass:name` or `cmd:command`. When a server asks for a one-time code
|
||||
@@ -224,7 +225,7 @@ lets them in. The AI status report treats syslog lines as hints, not as proof. T
|
||||
the latency as a small curve (red and “▲ sluggish” on a bad line). In split view the divider next to the active pane
|
||||
lights up, and a frame glides along when you switch panes or zoom (Alt+Z). Redraws only happen while
|
||||
something moves; accessible mode turns it all off
|
||||
- **MCP server** (`sshtermy mcp`): Claude and other AI clients can list your connections and run read-only commands, anything else only after you confirm in sshTermy
|
||||
- **MCP server** (`sshtermy mcp`, protocol 2026-07-28, older clients keep working): Claude and other AI clients can list your connections and run read-only commands, anything else only after you confirm in sshTermy
|
||||
- **Audit log** (Settings › Logs & audit): who did what and when, on which host: connections, commands (also from the
|
||||
agent mode and broadcast), file transfers, config backups, changed connections, master password, full backups and
|
||||
AI requests (host/model only). Each line is chained and signed with a key from the store, so changes, deleted or
|
||||
@@ -546,7 +547,7 @@ Start ─▶ Unlock (DPAPI automatically │ master password │ first setup)
|
||||
|
||||
| Topic | Choice | Reason |
|
||||
|---|---|---|
|
||||
| Language | Go 1.26 | one static binary per platform, cross-compiling without a toolchain (`GOOS=windows GOARCH=arm64`), no cgo |
|
||||
| Language | Go 1.27 | one static binary per platform, cross-compiling without a toolchain (`GOOS=windows GOARCH=arm64`), no cgo |
|
||||
| TUI | bubbletea v2 + lipgloss v2 | current Charm stack: real cursor control, layers for overlays, Kitty keyboard, Windows console |
|
||||
| Terminal emulation | charmbracelet/x/vt | actively maintained, truecolor, alt screen, scrollback, wide characters; encodes keys to match the mode |
|
||||
| SSH | golang.org/x/crypto/ssh | reference implementation in Go, agent, known_hosts, forwarding |
|
||||
@@ -659,7 +660,11 @@ Claude Desktop (`claude_desktop_config.json`): `{"mcpServers": {"sshtermy": {"co
|
||||
- **Quicker answers:** the fixed part of the request (system profile, recent commands, screen) comes first and what you
|
||||
just typed comes last, so vLLM, SGLang and Ollama can reuse their prefix cache. Ghost text sends only the last 25 screen
|
||||
lines, follow-ups 40. No new request while the shown suggestion still fits, and the same input within 3 minutes is answered
|
||||
from memory. Short answers ask reasoning models not to think long (Qwen, gpt-oss, OpenAI o/gpt-5, Ollama thinking models).
|
||||
from memory. Short answers ask reasoning models not to think long (Qwen, gpt-oss, OpenAI o/gpt-5, Ollama thinking models, Claude).
|
||||
- **Reliable answers:** goal mode, agent and plan ask the server for exactly one JSON object (`response_format`, if the server knows it).
|
||||
With Claude the long system text is cached (prompt caching), newer Claude models get the right settings by themselves
|
||||
(no own temperature, little thinking for short answers), and a refusal by Claude's safety filter is reported as such.
|
||||
New AI setups start with `qwen3:8b` (Ollama), `gpt-5-mini` (OpenAI) or `claude-haiku-5-5`.
|
||||
- **Kept warm:** while tabs are open, a one-token request every 4 minutes keeps your own model loaded (Ollama unloads
|
||||
after 5 minutes). Cloud providers are not pinged.
|
||||
- **AI status** (click the dot) shows the response time per task (average and last), so you see what is slow.
|
||||
@@ -696,7 +701,10 @@ Claude Desktop (`claude_desktop_config.json`): `{"mcpServers": {"sshtermy": {"co
|
||||
### Auto-update
|
||||
|
||||
- Checks `releases/latest` of `db9979/sshtermy`, HTTPS to github.com only, redirects are checked.
|
||||
- **SHA-256** from `checksums.txt` and **Ed25519 signature** `checksums.txt.sig` with a built-in public key.
|
||||
- **SHA-256** from `checksums.txt` and **Ed25519 signature** `checksums.txt.sig` with a built-in public key. The signed
|
||||
file names its version (`# sshtermy v1.0.42`), so an older signed release cannot be passed off as a new one.
|
||||
- Every release also carries a **build provenance attestation** (`gh attestation verify sshtermy_linux_amd64 --repo db9979/sshtermy`)
|
||||
and a list of all built-in libraries (`sshtermy.sbom.cdx.json`, CycloneDX).
|
||||
- A build without that key (self-built without `UPDATE_PUBKEY`) says so in the About dialog (F12) and asks before
|
||||
installing an update; `--update` prints a warning.
|
||||
- Replacement: running file → `.old`, new one in its place (works on Windows too), cleaned up on the next start.
|
||||
@@ -758,7 +766,8 @@ see `third_party/vt/README.sshtermy.md`.
|
||||
|
||||
## Next steps (suggestions)
|
||||
|
||||
1. Windows resources (icon, version info) and code signing of the `.exe`, macOS notarization.
|
||||
1. Code signing of the `.exe` and macOS notarization: the release workflow is ready and signs as soon as the certificates
|
||||
are stored as secrets ([docs/codesignatur.md](docs/codesignatur.md), German).
|
||||
2. macOS keychain as a second unlock path (like DPAPI on Windows).
|
||||
|
||||
## Relay: servers behind NAT/firewall
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
# Codesignatur für Windows und macOS (optional, kostet)
|
||||
|
||||
Ohne Codesignatur warnt Windows (SmartScreen: „Der Computer wurde durch Windows geschützt“) und
|
||||
macOS (Gatekeeper: „kann nicht geöffnet werden, da der Entwickler nicht verifiziert werden kann“).
|
||||
Die Updates selbst sind davon unabhängig mit Ed25519 signiert ([signatur.md](signatur.md)).
|
||||
|
||||
Der Release-Workflow (`.github/workflows/release.yml`, Job **sign**) ist vorbereitet: Sobald die
|
||||
Secrets unten eingetragen sind, werden die Programmdateien signiert, bevor die Prüfsummen entstehen.
|
||||
Ohne Secrets werden die Schritte übersprungen, alles läuft wie bisher.
|
||||
|
||||
## Windows (Authenticode)
|
||||
|
||||
Nötig: ein Codesignatur-Zertifikat als `.pfx` (z. B. von Certum, Sectigo, SSL.com; ab ca. 70 € im Jahr
|
||||
für Open-Source-Entwickler). Zertifikate, die nur auf einem Hardware-Token oder in einem Cloud-HSM
|
||||
liegen (seit 2023 die Regel bei neuen Zertifikaten), lassen sich so nicht nutzen; dann den
|
||||
Anbieter nach einem Signierdienst mit Schnittstelle fragen (z. B. Azure Artifact Signing, SSL.com eSigner).
|
||||
|
||||
Secrets (Settings → Secrets and variables → Actions):
|
||||
|
||||
- `WINDOWS_CERT_PFX`: die `.pfx`-Datei als Base64 (`base64 -w0 zert.pfx`)
|
||||
- `WINDOWS_CERT_PASSWORD`: Passwort der `.pfx`
|
||||
|
||||
Signiert wird mit `osslsigncode`, SHA-256 und Zeitstempel (digicert), danach wird die Signatur geprüft.
|
||||
|
||||
## macOS (Developer ID + Notarisierung)
|
||||
|
||||
Nötig: Apple Developer Program (99 $ im Jahr), ein Zertifikat „Developer ID Application“ und ein
|
||||
App-Store-Connect-API-Schlüssel (Rolle „Developer“) für die Notarisierung.
|
||||
|
||||
- `APPLE_CERT_P12`: Zertifikat samt privatem Schlüssel als `.p12`, Base64
|
||||
- `APPLE_CERT_PASSWORD`: Passwort der `.p12`
|
||||
- `APPLE_API_KEY_P8`: Inhalt der `AuthKey_XXXX.p8` (Text)
|
||||
- `APPLE_API_KEY_ID`: Key-ID (10 Zeichen)
|
||||
- `APPLE_API_ISSUER`: Issuer-ID (UUID)
|
||||
|
||||
Signiert und notarisiert wird mit [rcodesign](https://github.com/indygreg/apple-platform-rs) unter
|
||||
Linux (Version und Prüfsumme im Workflow fest), mit gehärteter Laufzeit. Fehlt der API-Schlüssel,
|
||||
wird nur signiert. Eine einzelne Programmdatei lässt sich nicht „heften“ (stapling); macOS fragt die
|
||||
Notarisierung beim ersten Start online ab.
|
||||
|
||||
## Kontrolle
|
||||
|
||||
- Windows: Rechtsklick auf `sshtermy.exe` → Eigenschaften → Digitale Signaturen.
|
||||
- macOS: `codesign -dv --verbose=2 sshtermy_darwin_arm64` und `spctl -a -vv -t install sshtermy_darwin_arm64`.
|
||||
@@ -33,6 +33,28 @@ und dieser Schlüssel liegt nur als Secret im Repository.
|
||||
gebaute App prüft sie vor jedem Update. Ältere Versionen ohne eingebauten Schlüssel
|
||||
aktualisieren sich weiter wie bisher und haben danach die Prüfung.
|
||||
|
||||
## Was signiert wird (seit November 2026)
|
||||
|
||||
Der Release-Workflow hat drei Jobs: **build** (Tests, Bauen, ohne Secrets), **sign** (nur hier liegt
|
||||
`UPDATE_SIGNING_KEY`; kein Checkout, kein `go`, nur das in *build* gebaute `sshtermy-sign`) und
|
||||
**publish** (Herkunftsnachweis, Release, Homebrew).
|
||||
|
||||
Die erste Zeile von `checksums.txt` nennt die Version, z. B. `# sshtermy v1.0.380`. Sie ist mit
|
||||
signiert, und die App installiert nur, wenn sie zur angekündigten Version passt. So lässt sich ein
|
||||
älteres, ebenfalls signiertes Release nicht als neues ausgeben. Ältere Apps überlesen die Zeile.
|
||||
Übergang: Releases von vor dieser Änderung haben die Zeile nicht und werden von neuen Apps nicht
|
||||
mehr installiert; beim Kanal „stabil“ gibt es deshalb nach dem Umstieg ein paar Tage lang kein Update.
|
||||
|
||||
Zusätzlich hat jedes Release einen Herkunftsnachweis von GitHub (Sigstore) und eine
|
||||
Bibliotheksliste (SBOM). Prüfen:
|
||||
|
||||
```
|
||||
gh attestation verify sshtermy_linux_amd64 --repo db9979/sshtermy
|
||||
```
|
||||
|
||||
Empfehlung: unter **Settings → General → Releases** „Release immutability“ einschalten. Dann lässt
|
||||
sich ein veröffentlichtes Release (Dateien und Tag) nachträglich nicht mehr verändern.
|
||||
|
||||
## Kontrolle
|
||||
|
||||
- Im Release `v…` gibt es die Datei `checksums.txt.sig`.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
module github.com/db9979/sshtermy
|
||||
|
||||
go 1.26.0
|
||||
go 1.27.0
|
||||
|
||||
require (
|
||||
charm.land/bubbles/v2 v2.2.1
|
||||
charm.land/bubbletea/v2 v2.1.1
|
||||
charm.land/lipgloss/v2 v2.0.6
|
||||
charm.land/lipgloss/v2 v2.1.0
|
||||
filippo.io/cpace v0.0.0-20210101143347-24d601e2e469
|
||||
github.com/Microsoft/go-winio v0.6.4
|
||||
github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e
|
||||
github.com/atotto/clipboard v0.1.4
|
||||
github.com/charmbracelet/colorprofile v0.4.3
|
||||
github.com/charmbracelet/ultraviolet v0.0.0-20261008173134-6b8d4baf91b4
|
||||
github.com/charmbracelet/ultraviolet v0.0.0-20261023060817-a45b7c86333f
|
||||
github.com/charmbracelet/x/ansi v0.11.9
|
||||
github.com/charmbracelet/x/term v0.2.2
|
||||
github.com/charmbracelet/x/vt v0.1.0
|
||||
@@ -24,13 +24,14 @@ require (
|
||||
github.com/masterzen/winrm v0.0.0-20261004123143-57b335310d59
|
||||
github.com/pkg/sftp v1.13.12
|
||||
go.bug.st/serial v1.8.0
|
||||
golang.org/x/crypto v0.58.0
|
||||
golang.org/x/sys v0.49.0
|
||||
golang.org/x/crypto v0.59.0
|
||||
golang.org/x/sys v0.50.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
rsc.io/qr v0.2.0
|
||||
)
|
||||
|
||||
require (
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/Azure/go-ntlmssp v0.1.2-0.20260824092057-1c8077778c2c // indirect
|
||||
github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 // indirect
|
||||
github.com/charmbracelet/x/conpty v0.2.0 // indirect
|
||||
@@ -44,8 +45,8 @@ require (
|
||||
github.com/ebitengine/purego v0.11.3 // indirect
|
||||
github.com/go-text/typesetting v0.3.5 // indirect
|
||||
github.com/gofrs/uuid v4.4.0+incompatible // indirect
|
||||
github.com/gtank/ristretto255 v0.1.2 // indirect
|
||||
github.com/hashicorp/go-uuid v1.0.3 // indirect
|
||||
github.com/gtank/ristretto255 v0.2.0 // indirect
|
||||
github.com/hashicorp/go-uuid v1.0.4 // indirect
|
||||
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
|
||||
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
|
||||
github.com/jcmturner/goidentity/v6 v6.0.1 // indirect
|
||||
@@ -53,15 +54,15 @@ require (
|
||||
github.com/kr/fs v0.1.0 // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.4.1 // indirect
|
||||
github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.30 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.31 // indirect
|
||||
github.com/muesli/cancelreader v0.2.2 // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef // indirect
|
||||
github.com/xo/terminfo v1.0.0 // indirect
|
||||
golang.org/x/image v0.45.0 // indirect
|
||||
golang.org/x/net v0.60.0 // indirect
|
||||
golang.org/x/sync v0.24.0 // indirect
|
||||
golang.org/x/text v0.43.0 // indirect
|
||||
github.com/xo/terminfo v1.3.1 // indirect
|
||||
golang.org/x/image v0.48.0 // indirect
|
||||
golang.org/x/net v0.62.0 // indirect
|
||||
golang.org/x/sync v0.25.0 // indirect
|
||||
golang.org/x/text v0.44.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/charmbracelet/x/vt => ./third_party/vt
|
||||
|
||||
@@ -2,10 +2,12 @@ charm.land/bubbles/v2 v2.2.1 h1:Fq1+qm5hV6GkvzLQDhCBpXXE5tLgvh1PRriCLwSvIQU=
|
||||
charm.land/bubbles/v2 v2.2.1/go.mod h1:wdMgn+sje1KNXdwFizIWjbf328fIUBxqEmJ/vYPo8yc=
|
||||
charm.land/bubbletea/v2 v2.1.1 h1:S1S9l37pCZGrj1JexBcr9x4Nr3MVeM42InqCYM/tDpU=
|
||||
charm.land/bubbletea/v2 v2.1.1/go.mod h1:xWHeyxIX9/wiFU2kgPW04ojOZyTzrWf+8lGjUCaftiU=
|
||||
charm.land/lipgloss/v2 v2.0.6 h1:EaGKeuA8FvF+v2BT5VmZd2LoYLaMZJXA5n34th8nCIQ=
|
||||
charm.land/lipgloss/v2 v2.0.6/go.mod h1:ipDDJNSGa1hlwDtSfW1s2/xR8Vdhbut4PXh2zEKZd0Q=
|
||||
charm.land/lipgloss/v2 v2.1.0 h1:RLCNLhSQST+NPOmvUSbRWZ3UFOXsf3ZXFmJ5E/2tHEU=
|
||||
charm.land/lipgloss/v2 v2.1.0/go.mod h1:wwfOgrNqUA9yjL8nmG6BIO0qQnmkEgJ8ISptbme83gI=
|
||||
filippo.io/cpace v0.0.0-20210101143347-24d601e2e469 h1:+gAICE3DIgwMKUzUuVCjd5R4ws+HFL19bKegPYkcgmQ=
|
||||
filippo.io/cpace v0.0.0-20210101143347-24d601e2e469/go.mod h1:b8UFwXF0HGYD8OWBGJEPwu3IMDHqTpzCtGFtY2xRwTU=
|
||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
github.com/Azure/go-ntlmssp v0.1.2-0.20260824092057-1c8077778c2c h1:HyK5+m8TFO4iAmMJ7u8tyUjE9C/y4/mvFRT0nqEPfJY=
|
||||
github.com/Azure/go-ntlmssp v0.1.2-0.20260824092057-1c8077778c2c/go.mod h1:NYqdhxd/8aAct/s4qSYZEerdPuH1liG2/X9DiVTbhpk=
|
||||
github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 h1:w0E0fgc1YafGEh5cROhlROMWXiNoZqApk2PDN0M1+Ns=
|
||||
@@ -22,8 +24,8 @@ github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ
|
||||
github.com/aymanbagabas/go-udiff v0.4.1/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w=
|
||||
github.com/charmbracelet/colorprofile v0.4.3 h1:QPa1IWkYI+AOB+fE+mg/5/4HRMZcaXex9t5KX76i20Q=
|
||||
github.com/charmbracelet/colorprofile v0.4.3/go.mod h1:/zT4BhpD5aGFpqQQqw7a+VtHCzu+zrQtt1zhMt9mR4Q=
|
||||
github.com/charmbracelet/ultraviolet v0.0.0-20261008173134-6b8d4baf91b4 h1:hISLzUbwcvJbGoNR6A3L/TpguRRnACBmZOee8LcHLJw=
|
||||
github.com/charmbracelet/ultraviolet v0.0.0-20261008173134-6b8d4baf91b4/go.mod h1:aJDVk+WOVM1K04rdc/71PMPoUGfjxjhvXfP3Pjz1Zio=
|
||||
github.com/charmbracelet/ultraviolet v0.0.0-20261023060817-a45b7c86333f h1:D2JpB65eehsnkEwEG401dMBSNYtTDgvKXZZSl7ZCxWI=
|
||||
github.com/charmbracelet/ultraviolet v0.0.0-20261023060817-a45b7c86333f/go.mod h1:aJDVk+WOVM1K04rdc/71PMPoUGfjxjhvXfP3Pjz1Zio=
|
||||
github.com/charmbracelet/x/conpty v0.2.0 h1:eKtA2hm34qNfgJCDp/M6Dc0gLy7e07YEK4qAdNGOvVY=
|
||||
github.com/charmbracelet/x/conpty v0.2.0/go.mod h1:fexgUnVrZgw8scD49f6VSi0Ggj9GWYIrpedRthAwW/8=
|
||||
github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f h1:pk6gmGpCE7F3FcjaOEKYriCvpmIN4+6OS/RD0vm4uIA=
|
||||
@@ -67,15 +69,17 @@ github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyC
|
||||
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
|
||||
github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI=
|
||||
github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
|
||||
github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc=
|
||||
github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o=
|
||||
github.com/gtank/ristretto255 v0.2.0 h1:LeOuWr6giplWkkMizx2emfG03SRPJqKt1nfIHLVHQ/0=
|
||||
github.com/gtank/ristretto255 v0.2.0/go.mod h1:OJ1ox/dWcp7sJ5grYDcZ+kkHYuj5nelW5aaL7ESVXBw=
|
||||
github.com/hajimehoshi/bitmapfont/v4 v4.2.0 h1:bpeN2ph7aHSuX7yoWFkLPo4ado9K+E+Dq7t6MoFcJAU=
|
||||
github.com/hajimehoshi/bitmapfont/v4 v4.2.0/go.mod h1:AIeoQek1nxUmDczXNtFEYWTQ4ArINijutPD729q/NeE=
|
||||
github.com/hajimehoshi/ebiten/v2 v2.10.6 h1:GXnY8UMglSjsszZJpBxbqzdQHkmWqS0vMxD/h93sE7k=
|
||||
github.com/hajimehoshi/ebiten/v2 v2.10.6/go.mod h1:sUj89hH41Ph6bkTrdSrkKZYtGl0OENrkb7w1Y7xsJUc=
|
||||
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
|
||||
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-uuid v1.0.4 h1:ZrN80XjMzpRYk+2FxMDy2A2zz0d5QjJ7GMFSkZLj12A=
|
||||
github.com/hashicorp/go-uuid v1.0.4/go.mod h1:x2Ds7vSkQ2n/yQj8Synnxmt0zt1l26uCAjxIhChisLU=
|
||||
github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8=
|
||||
github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs=
|
||||
github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo=
|
||||
@@ -100,8 +104,8 @@ github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 h1:2ZKn+w/BJeL
|
||||
github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc=
|
||||
github.com/masterzen/winrm v0.0.0-20261004123143-57b335310d59 h1:ZvQGbOpXorIxtua/7uFpXUZ1FyarecLn9BoxqJI6miY=
|
||||
github.com/masterzen/winrm v0.0.0-20261004123143-57b335310d59/go.mod h1:56p25CXdyKsQWriUDfygyVGv5OvFBDY27/yzRy7NuSs=
|
||||
github.com/mattn/go-runewidth v0.0.30 h1:+KUuiDA4fF0R1p5FeueHefjDm+GIM+kWfFnDjybOPgk=
|
||||
github.com/mattn/go-runewidth v0.0.30/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8=
|
||||
github.com/mattn/go-runewidth v0.0.31 h1:1oCV4ReTlosDBc6rYRw5cL8S/4y8iv5oRl4SJ5IBgwo=
|
||||
github.com/mattn/go-runewidth v0.0.31/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8=
|
||||
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
|
||||
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
|
||||
github.com/pierrec/lz4/v4 v4.1.29 h1:CDQY6qZOLI4DW0Nx6R1vRrifrCeQHnNXkMb0hZWXFjg=
|
||||
@@ -123,8 +127,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
github.com/xo/terminfo v1.0.0 h1:2ZpYzqWzyyytjk3TP6aJVDhkMAkc99/1xKQdA3TDTBY=
|
||||
github.com/xo/terminfo v1.0.0/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
|
||||
github.com/xo/terminfo v1.3.1 h1:4ZwPCuu4PEFw0PkNp3Hv/x3gqvgLCzYhurszsj101cM=
|
||||
github.com/xo/terminfo v1.3.1/go.mod h1:lGzkSo8Fe7IRh/w+Gqz7n5mDog4FVXCj3gy/DYTBqio=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
go.bug.st/serial v1.8.0 h1:ZtnmN8aYXtPlTghwSvDWPHKBHL9TM6oFDa+KpSn4SQE=
|
||||
go.bug.st/serial v1.8.0/go.mod h1:d0MmS16Qt9b1m06yoYRNUXhRRTJV5Qg2S5EKqQtnayQ=
|
||||
@@ -132,12 +136,10 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
|
||||
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||
golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54=
|
||||
golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w=
|
||||
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
|
||||
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
|
||||
golang.org/x/image v0.45.0 h1:FMb1nTbH5H9vF55SriQHgFw5GnNL9Jg6L25BwXKzhB0=
|
||||
golang.org/x/image v0.45.0/go.mod h1:n62x/7RqlwXDvGsSU4u6IUTUf6KghUZ9Bt7cG/T9Fx4=
|
||||
golang.org/x/crypto v0.59.0 h1:xS2jhqYbzNrpvkWP2YTDf4TJwBy3ykR03i8vFDxEc7c=
|
||||
golang.org/x/crypto v0.59.0/go.mod h1:veDyUwATGs3c+vN3VfTbzViMGXeTBk3WyhBOkn+F/4U=
|
||||
golang.org/x/image v0.48.0 h1:1AvuPcuoOTJpA7s4VZ5umrb90T3So0rkB/bSGmxkxik=
|
||||
golang.org/x/image v0.48.0/go.mod h1:mmtg64iqJKGqEgy+r13dfybl85tmxUd2lMnmaiSdWYY=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
@@ -146,12 +148,12 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.60.0 h1:79p50tfZlm0J9YfoDsSi639qSXNGVwEzOPLCxM2FsYU=
|
||||
golang.org/x/net v0.60.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg=
|
||||
golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY=
|
||||
golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA=
|
||||
golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
|
||||
golang.org/x/sync v0.25.0 h1:dJnifr0nMV8/SBnBvdo4eSGGnrc3O4FFx6IqvtLcmRs=
|
||||
golang.org/x/sync v0.25.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -159,19 +161,19 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA=
|
||||
golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
|
||||
golang.org/x/sys v0.50.0 h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs=
|
||||
golang.org/x/sys v0.50.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.47.0 h1:cpyOwQkr2Nzxe2p6KnrTG7Ei2wtzjsuSjhpXXepZ/BM=
|
||||
golang.org/x/term v0.47.0/go.mod h1:efAfAuG6RKABvg1ArGebRkvX6LXul14SM67o2e4mUCY=
|
||||
golang.org/x/term v0.48.0 h1:G6UU1eiSB8nl3DzeUGt7Mg+2SctI8tPS6Z5/mBt6cOk=
|
||||
golang.org/x/term v0.48.0/go.mod h1:BRDLHCZr2SUjIeBHHpRyQeC9xzSAVbzY2rvKgafnHf4=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc=
|
||||
golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s=
|
||||
golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo=
|
||||
golang.org/x/text v0.44.0/go.mod h1:S4FR1waQ9LbjQTls97SyRjDaUUVkaM+cXwwuG/G+MwY=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
|
||||
@@ -326,7 +326,7 @@ func (a *Agent) NextStep(ctx context.Context, goal string, recipe []string, hist
|
||||
files := dir != ""
|
||||
kind := c.kind()
|
||||
parse := func(out string) (Step, error) { return parseAuto(out, kind, files) }
|
||||
o := llm.Opts{MaxTokens: goalTokens, Temperature: 0.2, NoThink: true, Task: TaskGoal}
|
||||
o := llm.Opts{MaxTokens: goalTokens, Temperature: 0.2, NoThink: true, JSON: true, Task: TaskGoal}
|
||||
if files {
|
||||
o.MaxTokens = autoTokens // Skripte brauchen mehr Platz als ein Befehl
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ func (a *Agent) AutoStep(ctx context.Context, goal string, recipe []string, hist
|
||||
}
|
||||
kind, files := c.kind(), info.Dir != ""
|
||||
parse := func(out string) (Step, error) { return parseAuto(out, kind, files) }
|
||||
o := llm.Opts{MaxTokens: autoTokens, Temperature: 0.2, NoThink: true, Task: TaskAgent}
|
||||
o := llm.Opts{MaxTokens: autoTokens, Temperature: 0.2, NoThink: true, JSON: true, Task: TaskAgent}
|
||||
st, err := a.completeWith(ctx, msgs, o, retryAuto, files, parse)
|
||||
if err != nil {
|
||||
return st, err
|
||||
|
||||
@@ -101,7 +101,7 @@ const retryPlan = "Deine letzte Antwort war kein gültiges JSON-Objekt im verlan
|
||||
|
||||
// completeStep: Anfrage mit einem Korrekturversuch bei unlesbarer Antwort.
|
||||
func (a *Agent) completeStep(ctx context.Context, msgs []llm.Message, retry string, files bool, parse func(string) (Step, error)) (Step, error) {
|
||||
return a.completeWith(ctx, msgs, llm.Opts{MaxTokens: autoTokens, Temperature: 0.2, NoThink: true, Task: TaskPlan}, retry, files, parse)
|
||||
return a.completeWith(ctx, msgs, llm.Opts{MaxTokens: autoTokens, Temperature: 0.2, NoThink: true, JSON: true, Task: TaskPlan}, retry, files, parse)
|
||||
}
|
||||
|
||||
// text: der Plan als Text für den Prompt (Überarbeiten).
|
||||
|
||||
@@ -162,7 +162,7 @@ func (a *Agent) avoidRepeat(ctx context.Context, msgs []llm.Message, o llm.Opts,
|
||||
return st2
|
||||
}
|
||||
st = st2
|
||||
prev, perm, _ = repeatOf(st.Command, hist)
|
||||
_, perm, _ = repeatOf(st.Command, hist)
|
||||
}
|
||||
}
|
||||
if perm && withSudo && kind == "unix" && !safety.Elevated(st.Command) {
|
||||
|
||||
@@ -411,9 +411,9 @@ func (p LLMProvider) DefaultBaseURL() string {
|
||||
func (p LLMProvider) DefaultModel() string {
|
||||
switch p {
|
||||
case ProviderOllama:
|
||||
return "qwen2.5-coder:7b"
|
||||
return "qwen3:8b" // Denken lässt sich abschalten, läuft mit 8 GB RAM
|
||||
case ProviderOpenAI:
|
||||
return "gpt-4.1-mini"
|
||||
return "gpt-5-mini"
|
||||
case ProviderAnthropic:
|
||||
return "claude-haiku-5-5"
|
||||
}
|
||||
@@ -511,7 +511,7 @@ func (c LLMConfig) Chain() []LLMConfig {
|
||||
// DefaultLLM: sinnvolle Standardwerte (lokales Modell, nichts verlässt das Netz).
|
||||
func DefaultLLM() LLMConfig {
|
||||
return LLMConfig{
|
||||
BaseURL: "http://localhost:11434/v1", Model: "qwen2.5-coder:7b",
|
||||
BaseURL: "http://localhost:11434/v1", Model: "qwen3:8b",
|
||||
MaxTokens: 400, Temperature: 0.2, TimeoutSec: 60,
|
||||
SuggestEnabled: true, SuggestDelayMS: 450, ContextLines: 80, SendScreen: true,
|
||||
GoalStepsMin: 6,
|
||||
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
@@ -226,7 +225,6 @@ type window struct {
|
||||
wheelAcc float64
|
||||
lastTitle string
|
||||
|
||||
shotMu sync.Mutex
|
||||
script *script
|
||||
}
|
||||
|
||||
@@ -258,7 +256,7 @@ func (w *window) setFaces(scale float64) {
|
||||
}
|
||||
m := regular.Metrics()
|
||||
w.ascentF = m.HAscent
|
||||
w.cellW = math.Round(text.Advance("M", regular))
|
||||
w.cellW = math.Round(text.AdvanceAt("M", 1, regular))
|
||||
w.cellH = math.Ceil(m.HAscent + m.HDescent + m.HLineGap*0.5)
|
||||
w.ascent = math.Round(m.HAscent + (w.cellH-m.HAscent-m.HDescent)/2)
|
||||
w.glyphs = map[glyphKey]*ebiten.Image{}
|
||||
|
||||
@@ -13,7 +13,6 @@ import (
|
||||
// UniFi-Controller; /tmp/system.cfg ist die gerade gültige Fassung.
|
||||
|
||||
var (
|
||||
unifiInfo = regexp.MustCompile(`(?im)^\s*model:\s+US[^Gg\s][\w-]*\s*$|^\s*status:\s+.*?/inform\b`)
|
||||
unifiUptime = regexp.MustCompile(`(?i)^(\d+)\s*(?:seconds?|s)?$`)
|
||||
unifiTopIdle = regexp.MustCompile(`(?im)^\s*CPU:.*?(\d{1,3})(?:\.\d+)?%\s+idle`)
|
||||
)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package i18n
|
||||
|
||||
// Stand der Technik (Prüfung 2026-11-12): Update-Version, alte SSH-Verfahren, KI
|
||||
func init() {
|
||||
for k, v := range map[string]string{
|
||||
"update: signierte Prüfsummen gehören zu %s, nicht zu v%s – Download verworfen": "update: signed checksums belong to %s, not to v%s – download discarded",
|
||||
"update: signierte Prüfsummen nennen keine Version – Download verworfen": "update: signed checksums name no version – download discarded",
|
||||
"Vorsicht: %s spricht nur alte SSH-Verfahren (%s). Verschlüsselt, aber nicht mehr Stand der Technik – Firmware aktualisieren, wenn möglich.": "Caution: %s only speaks old SSH algorithms (%s). Encrypted, but no longer state of the art – update the firmware if you can.",
|
||||
"LLM: Claude hat die Anfrage abgelehnt (Sicherheitsfilter). Anders formulieren oder ein anderes Modell wählen.": "LLM: Claude declined the request (safety filter). Rephrase it or choose another model.",
|
||||
"alt: ": "old: ",
|
||||
" · quantensicher": " · quantum-safe",
|
||||
} {
|
||||
en[k] = v
|
||||
}
|
||||
}
|
||||
+96
-10
@@ -3,8 +3,11 @@ package llm
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/db9979/sshtermy/internal/i18n"
|
||||
@@ -15,13 +18,66 @@ import (
|
||||
// Rollen müssen sich abwechseln und mit „user“ beginnen.
|
||||
|
||||
type anthropicRequest struct {
|
||||
Model string `json:"model"`
|
||||
System string `json:"system,omitempty"`
|
||||
Messages []Message `json:"messages"`
|
||||
MaxTokens int `json:"max_tokens"`
|
||||
Temperature *float64 `json:"temperature,omitempty"`
|
||||
Stream bool `json:"stream,omitempty"`
|
||||
StopSequences []string `json:"stop_sequences,omitempty"`
|
||||
Model string `json:"model"`
|
||||
// System als Block mit cache_control: der lange, gleichbleibende
|
||||
// Systemtext wird bei Anthropic zwischengespeichert (Prompt-Caching),
|
||||
// Folgeanfragen sind schneller und billiger.
|
||||
System []anthropicBlock `json:"system,omitempty"`
|
||||
Messages []Message `json:"messages"`
|
||||
MaxTokens int `json:"max_tokens"`
|
||||
Temperature *float64 `json:"temperature,omitempty"`
|
||||
Stream bool `json:"stream,omitempty"`
|
||||
StopSequences []string `json:"stop_sequences,omitempty"`
|
||||
// Thinking/OutputConfig: kurze Antworten ohne langes Nachdenken (NoThink)
|
||||
Thinking map[string]any `json:"thinking,omitempty"`
|
||||
OutputConfig map[string]any `json:"output_config,omitempty"`
|
||||
}
|
||||
|
||||
type anthropicBlock struct {
|
||||
Type string `json:"type"`
|
||||
Text string `json:"text"`
|
||||
CacheControl map[string]any `json:"cache_control,omitempty"`
|
||||
}
|
||||
|
||||
var claudeVersion = regexp.MustCompile(`claude-(?:[a-z]+-)?(\d+)(?:[-.](\d+))?`)
|
||||
|
||||
// claudeGen: Generation des Modells (z. B. 4.6 → 4, 6; claude-3-5-sonnet → 3, 5).
|
||||
// ok=false bei unbekanntem Namen.
|
||||
func claudeGen(model string) (major, minor int, ok bool) {
|
||||
m := claudeVersion.FindStringSubmatch(strings.ToLower(model))
|
||||
if m == nil {
|
||||
return 0, 0, false
|
||||
}
|
||||
major, _ = strconv.Atoi(m[1])
|
||||
if m[2] != "" && len(m[2]) <= 2 { // kein Datum (20250101)
|
||||
minor, _ = strconv.Atoi(m[2])
|
||||
}
|
||||
return major, minor, true
|
||||
}
|
||||
|
||||
// anthropicSampling: nimmt das Modell temperature an? Ab Claude 4.7 lehnen
|
||||
// die Modelle eigene Werte ab (HTTP 400); weglassen geht immer.
|
||||
func anthropicSampling(model string) bool {
|
||||
major, minor, ok := claudeGen(model)
|
||||
return ok && (major < 4 || major == 4 && minor <= 6)
|
||||
}
|
||||
|
||||
// anthropicNoThink: wie ein Modell kurz antwortet. Neuere Modelle denken von
|
||||
// sich aus nach und verbrauchen dabei die (knappen) Tokens der Antwort. Wo
|
||||
// thinking sich nicht abschalten lässt (Opus 5.5, Sonnet 5.5, Fable), hilft
|
||||
// die geringste Mühe (effort low).
|
||||
func anthropicNoThink(model string) (thinking, output map[string]any) {
|
||||
m := strings.ToLower(model)
|
||||
major, minor, ok := claudeGen(m)
|
||||
switch {
|
||||
case strings.Contains(m, "fable") || strings.Contains(m, "mythos"):
|
||||
return nil, map[string]any{"effort": "low"}
|
||||
case ok && major >= 5 && minor >= 5 && !strings.Contains(m, "haiku"):
|
||||
return nil, map[string]any{"effort": "low"}
|
||||
case ok && (major > 4 || major == 4 && minor >= 5):
|
||||
return map[string]any{"type": "disabled"}, nil
|
||||
}
|
||||
return nil, nil // ältere Modelle denken nur auf Wunsch
|
||||
}
|
||||
|
||||
type anthropicResponse struct {
|
||||
@@ -77,14 +133,41 @@ func (c *conn) anthropicBody(msgs []Message, o Opts) anthropicRequest {
|
||||
mt = 1024
|
||||
}
|
||||
sys, m := anthropicMessages(msgs)
|
||||
return anthropicRequest{Model: c.cfg.Model, System: sys, Messages: m, MaxTokens: mt, Temperature: &temp}
|
||||
r := anthropicRequest{Model: c.cfg.Model, Messages: m, MaxTokens: mt}
|
||||
if sys != "" {
|
||||
r.System = []anthropicBlock{{Type: "text", Text: sys, CacheControl: map[string]any{"type": "ephemeral"}}}
|
||||
}
|
||||
if anthropicSampling(c.cfg.Model) && !c.quirk("temperature") {
|
||||
r.Temperature = &temp
|
||||
}
|
||||
if o.NoThink && !c.quirk("thinking") {
|
||||
r.Thinking, r.OutputConfig = anthropicNoThink(c.cfg.Model)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
// anthropicRetry: hat der Server ein optionales Feld abgelehnt (Proxy,
|
||||
// älteres Modell), wird es für diesen Endpunkt gemerkt und ohne wiederholt.
|
||||
func (c *conn) anthropicRetry(status int, raw []byte, body *anthropicRequest) bool {
|
||||
switch {
|
||||
case body.Temperature != nil && rejects(status, raw, "temperature"):
|
||||
c.setQuirk("temperature")
|
||||
body.Temperature = nil
|
||||
case (body.Thinking != nil || body.OutputConfig != nil) && (rejects(status, raw, "thinking") || rejects(status, raw, "effort") || rejects(status, raw, "output_config")):
|
||||
c.setQuirk("thinking")
|
||||
body.Thinking, body.OutputConfig = nil, nil
|
||||
case len(body.System) > 0 && body.System[0].CacheControl != nil && rejects(status, raw, "cache_control"):
|
||||
body.System[0].CacheControl = nil
|
||||
default:
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (c *conn) anthropicComplete(ctx context.Context, msgs []Message, o Opts) (Result, error) {
|
||||
body := c.anthropicBody(msgs, o)
|
||||
status, raw, err := c.post(ctx, body)
|
||||
if err == nil && rejects(status, raw, "temperature") {
|
||||
body.Temperature = nil
|
||||
for i := 0; i < 3 && err == nil && c.anthropicRetry(status, raw, &body); i++ {
|
||||
status, raw, err = c.post(ctx, body)
|
||||
}
|
||||
if err != nil {
|
||||
@@ -110,6 +193,9 @@ func (c *conn) anthropicComplete(ctx context.Context, msgs []Message, o Opts) (R
|
||||
}
|
||||
}
|
||||
finish := r.StopReason
|
||||
if finish == "refusal" && b.Len() == 0 {
|
||||
return Result{}, errors.New(i18n.T("LLM: Claude hat die Anfrage abgelehnt (Sicherheitsfilter). Anders formulieren oder ein anderes Modell wählen."))
|
||||
}
|
||||
switch finish {
|
||||
case "max_tokens":
|
||||
finish = "length"
|
||||
|
||||
@@ -113,7 +113,13 @@ func TestAnthropic(t *testing.T) {
|
||||
if err != nil || r.Content != "ls -la" || !r.Truncated() {
|
||||
t.Fatalf("%+v %v", r, err)
|
||||
}
|
||||
if req.System != "Du bist ein Shell-Assistent." || len(req.Messages) != 1 || req.Messages[0].Content != "a\n\nb" || req.MaxTokens != 50 {
|
||||
if len(req.System) != 1 || req.System[0].Text != "Du bist ein Shell-Assistent." || req.System[0].CacheControl["type"] != "ephemeral" {
|
||||
t.Fatalf("System ohne Prompt-Caching: %+v", req.System)
|
||||
}
|
||||
if req.Temperature != nil {
|
||||
t.Fatalf("temperature an %s geschickt (lehnt eigene Werte ab)", cfg.Model)
|
||||
}
|
||||
if len(req.Messages) != 1 || req.Messages[0].Content != "a\n\nb" || req.MaxTokens != 50 {
|
||||
t.Fatalf("Anfrage: %+v", req)
|
||||
}
|
||||
var b strings.Builder
|
||||
|
||||
+50
-2
@@ -23,6 +23,7 @@ import (
|
||||
"net/url"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/db9979/sshtermy/internal/debuglog"
|
||||
@@ -49,6 +50,9 @@ type request struct {
|
||||
// gpt-oss (vLLM, Ollama), OpenAI o-/gpt-5-Modelle, Ollama-Denkmodelle:
|
||||
// wie lange das Modell vor der Antwort nachdenkt.
|
||||
ReasoningEffort string `json:"reasoning_effort,omitempty"`
|
||||
// JSON-Modus (Opts.JSON): der Server erzwingt genau ein JSON-Objekt
|
||||
// (OpenAI, vLLM, SGLang, Ollama).
|
||||
ResponseFormat map[string]string `json:"response_format,omitempty"`
|
||||
}
|
||||
|
||||
// msgOut ist eine Antwortnachricht. Reasoning-Modelle (Qwen3, DeepSeek-R1)
|
||||
@@ -79,6 +83,17 @@ type conn struct {
|
||||
idx int // 0 = eingestellter Endpunkt, 1… = Ersatz-Anbieter
|
||||
}
|
||||
|
||||
// quirks: optionale Felder, die ein Endpunkt schon einmal abgelehnt hat
|
||||
// (Schlüssel Adresse|Modell|Feld). Spart bei jeder weiteren Anfrage den
|
||||
// zweiten Versuch.
|
||||
var quirks sync.Map
|
||||
|
||||
func (c *conn) quirkKey(field string) string {
|
||||
return c.cfg.BaseURL + "|" + c.cfg.Model + "|" + field
|
||||
}
|
||||
func (c *conn) quirk(field string) bool { _, ok := quirks.Load(c.quirkKey(field)); return ok }
|
||||
func (c *conn) setQuirk(field string) { quirks.Store(c.quirkKey(field), true) }
|
||||
|
||||
// Client hält den Endpunkt samt Ersatz-Anbietern.
|
||||
type Client struct {
|
||||
cfg domain.LLMConfig
|
||||
@@ -324,6 +339,11 @@ type Opts struct {
|
||||
// Task benennt die Aufgabe für die Antwortzeiten im KI-Status
|
||||
// (TaskStats), z. B. "ghost" oder "agent".
|
||||
Task string
|
||||
// JSON: die Antwort ist genau ein JSON-Objekt (Ziel-, Agent-, Plan-Modus).
|
||||
// OpenAI-kompatible Server bekommen response_format json_object, damit
|
||||
// kein Text davor/danach steht. Kennt der Server das Feld nicht, wird
|
||||
// ohne wiederholt (und für den Endpunkt gemerkt).
|
||||
JSON bool
|
||||
}
|
||||
|
||||
func noThinkKwargs(model string) map[string]any {
|
||||
@@ -406,12 +426,24 @@ func (c *conn) completeResult(ctx context.Context, msgs []Message, o Opts) (Resu
|
||||
return c.anthropicComplete(ctx, msgs, o)
|
||||
}
|
||||
body := c.openAIBody(msgs, o, false)
|
||||
if o.JSON && !c.quirk("response_format") {
|
||||
body.ResponseFormat = map[string]string{"type": "json_object"}
|
||||
}
|
||||
if c.quirk("temperature") {
|
||||
body.Temperature = nil
|
||||
}
|
||||
status, raw, err := c.post(ctx, body)
|
||||
if err == nil && body.ResponseFormat != nil && rejects(status, raw, "response_format") {
|
||||
c.setQuirk("response_format")
|
||||
body.ResponseFormat = nil
|
||||
status, raw, err = c.post(ctx, body)
|
||||
}
|
||||
if err == nil && status == http.StatusBadRequest && (body.ChatTemplateKwargs != nil || body.ReasoningEffort != "") {
|
||||
body.ChatTemplateKwargs, body.ReasoningEffort = nil, "" // Server kennt die Felder nicht
|
||||
status, raw, err = c.post(ctx, body)
|
||||
}
|
||||
if err == nil && rejects(status, raw, "temperature") {
|
||||
if err == nil && body.Temperature != nil && rejects(status, raw, "temperature") {
|
||||
c.setQuirk("temperature")
|
||||
body.Temperature = nil // Reasoning-Modelle bei OpenAI erlauben nur den Standard
|
||||
status, raw, err = c.post(ctx, body)
|
||||
}
|
||||
@@ -487,19 +519,35 @@ func (c *conn) post(ctx context.Context, body any) (int, []byte, error) {
|
||||
// openStream startet einen Stream; nil-Fehler heißt: Kopfzeilen mit 2xx da.
|
||||
func (c *conn) openStream(ctx context.Context, msgs []Message, o Opts) (*http.Response, error) {
|
||||
var body any
|
||||
var ab *anthropicRequest
|
||||
if c.cfg.Provider == domain.ProviderAnthropic {
|
||||
b := c.anthropicBody(msgs, o)
|
||||
b.Stream = true
|
||||
body = b
|
||||
ab, body = &b, &b
|
||||
} else {
|
||||
b := c.openAIBody(msgs, o, true)
|
||||
b.ChatTemplateKwargs, b.ReasoningEffort = nil, ""
|
||||
if c.quirk("temperature") {
|
||||
b.Temperature = nil
|
||||
}
|
||||
body = b
|
||||
}
|
||||
resp, err := c.do(ctx, body, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Anthropic: abgelehntes optionales Feld weglassen und neu starten
|
||||
for i := 0; i < 3 && ab != nil && resp.StatusCode == http.StatusBadRequest; i++ {
|
||||
raw, _ := io.ReadAll(io.LimitReader(resp.Body, 64<<10))
|
||||
resp.Body.Close()
|
||||
if !c.anthropicRetry(resp.StatusCode, raw, ab) {
|
||||
resp = &http.Response{StatusCode: http.StatusBadRequest, Body: io.NopCloser(bytes.NewReader(raw))}
|
||||
break
|
||||
}
|
||||
if resp, err = c.do(ctx, body, true); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if resp.StatusCode/100 != 2 {
|
||||
raw, _ := io.ReadAll(io.LimitReader(resp.Body, 64<<10))
|
||||
resp.Body.Close()
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
package llm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
|
||||
"github.com/db9979/sshtermy/internal/domain"
|
||||
)
|
||||
|
||||
func TestAnthropicModelRules(t *testing.T) {
|
||||
for _, c := range []struct {
|
||||
model string
|
||||
sampling bool
|
||||
thinking string // "disabled", "effort" oder ""
|
||||
}{
|
||||
{"claude-3-5-sonnet-20241022", true, ""},
|
||||
{"claude-haiku-4-5", true, "disabled"},
|
||||
{"claude-sonnet-4-6", true, "disabled"},
|
||||
{"claude-opus-4-8", false, "disabled"},
|
||||
{"claude-haiku-5-5", false, "disabled"},
|
||||
{"claude-sonnet-5-5", false, "effort"},
|
||||
{"claude-opus-5-5", false, "effort"},
|
||||
{"claude-fable-5-2", false, "effort"},
|
||||
{"mein-proxy-modell", false, ""},
|
||||
} {
|
||||
if got := anthropicSampling(c.model); got != c.sampling {
|
||||
t.Errorf("%s: temperature %v, erwartet %v", c.model, got, c.sampling)
|
||||
}
|
||||
th, out := anthropicNoThink(c.model)
|
||||
got := ""
|
||||
switch {
|
||||
case th != nil && th["type"] == "disabled":
|
||||
got = "disabled"
|
||||
case out != nil && out["effort"] == "low":
|
||||
got = "effort"
|
||||
}
|
||||
if got != c.thinking {
|
||||
t.Errorf("%s: NoThink %q, erwartet %q", c.model, got, c.thinking)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Lehnt der Server thinking ab (Proxy, unbekanntes Modell), wird ohne
|
||||
// wiederholt und das für den Endpunkt gemerkt.
|
||||
func TestAnthropicThinkingRejectedOnce(t *testing.T) {
|
||||
var calls atomic.Int32
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
calls.Add(1)
|
||||
var req anthropicRequest
|
||||
_ = json.NewDecoder(r.Body).Decode(&req)
|
||||
if req.Thinking != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
_, _ = w.Write([]byte(`{"error":{"message":"thinking: unknown field"}}`))
|
||||
return
|
||||
}
|
||||
_, _ = w.Write([]byte(`{"content":[{"type":"text","text":"ok"}],"stop_reason":"end_turn"}`))
|
||||
}))
|
||||
defer srv.Close()
|
||||
c, err := New(domain.LLMConfig{Provider: domain.ProviderAnthropic, BaseURL: srv.URL + "/v1", APIKey: "k", Model: "claude-haiku-5-5"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for i := 0; i < 2; i++ {
|
||||
if r, err := c.CompleteResult(context.Background(), []Message{{Role: "user", Content: "x"}}, Opts{NoThink: true}); err != nil || r.Content != "ok" {
|
||||
t.Fatalf("%+v %v", r, err)
|
||||
}
|
||||
}
|
||||
if n := calls.Load(); n != 3 {
|
||||
t.Fatalf("%d Anfragen, erwartet 3 (einmal abgelehnt, dann gemerkt)", n)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAnthropicRefusal(t *testing.T) {
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
_, _ = w.Write([]byte(`{"content":[],"stop_reason":"refusal"}`))
|
||||
}))
|
||||
defer srv.Close()
|
||||
c, _ := New(domain.LLMConfig{Provider: domain.ProviderAnthropic, BaseURL: srv.URL + "/v1", APIKey: "k", Model: "claude-opus-5-5"})
|
||||
if _, err := c.CompleteResult(context.Background(), []Message{{Role: "user", Content: "x"}}, Opts{}); err == nil || !strings.Contains(err.Error(), "abgelehnt") {
|
||||
t.Fatalf("Ablehnung nicht gemeldet: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// JSON-Modus: response_format json_object; kennt der Server es nicht, ohne.
|
||||
func TestOpenAIJSONMode(t *testing.T) {
|
||||
for _, supported := range []bool{true, false} {
|
||||
var calls atomic.Int32
|
||||
var last request
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
calls.Add(1)
|
||||
last = request{}
|
||||
_ = json.NewDecoder(r.Body).Decode(&last)
|
||||
if last.ResponseFormat != nil && !supported {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
_, _ = w.Write([]byte(`{"error":{"message":"response_format is not supported"}}`))
|
||||
return
|
||||
}
|
||||
_, _ = w.Write([]byte(`{"choices":[{"message":{"content":"{\"befehl\":\"ls\"}"},"finish_reason":"stop"}]}`))
|
||||
}))
|
||||
cfg := domain.LLMConfig{Provider: domain.ProviderCompat, BaseURL: srv.URL + "/v1", Model: "m-" + map[bool]string{true: "ja", false: "nein"}[supported]}
|
||||
c, err := New(cfg)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
r, err := c.CompleteResult(context.Background(), []Message{{Role: "user", Content: "JSON bitte"}}, Opts{JSON: true})
|
||||
srv.Close()
|
||||
if err != nil || r.Content != `{"befehl":"ls"}` {
|
||||
t.Fatalf("%v: %+v %v", supported, r, err)
|
||||
}
|
||||
if supported && (calls.Load() != 1 || last.ResponseFormat["type"] != "json_object") {
|
||||
t.Fatalf("JSON-Modus nicht geschickt: %d %+v", calls.Load(), last.ResponseFormat)
|
||||
}
|
||||
if !supported && calls.Load() != 2 {
|
||||
t.Fatalf("ohne response_format nicht wiederholt: %d", calls.Load())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,6 @@ type Host struct {
|
||||
info string
|
||||
token []byte
|
||||
handle Handler
|
||||
wg sync.WaitGroup
|
||||
}
|
||||
|
||||
// Listen öffnet den Socket und schreibt Adresse + Token nach dataDir/mcp.json
|
||||
|
||||
+81
-13
@@ -17,8 +17,56 @@ import (
|
||||
"github.com/db9979/sshtermy/internal/version"
|
||||
)
|
||||
|
||||
// ProtocolVersion: neueste Fassung, die dieser Server spricht.
|
||||
const ProtocolVersion = "2025-06-18"
|
||||
// ProtocolVersion: neueste Fassung, die dieser Server spricht. Ab 2026-07-28
|
||||
// ist MCP zustandslos: kein initialize mehr, jede Anfrage trägt ihre Version
|
||||
// in _meta, dazu server/discover. Ältere Clients bekommen weiter initialize.
|
||||
const ProtocolVersion = "2026-07-28"
|
||||
|
||||
// Supported: alle Fassungen, neueste zuerst (server/discover, Fehlerdaten).
|
||||
var Supported = []string{"2026-07-28", "2025-11-25", "2025-06-18"}
|
||||
|
||||
const (
|
||||
metaVersion = "io.modelcontextprotocol/protocolVersion"
|
||||
metaServerInfo = "io.modelcontextprotocol/serverInfo"
|
||||
errUnsupported = -32022 // UnsupportedProtocolVersion (2026-07-28)
|
||||
instructions = "sshTermy gives access to the user's saved SSH connections. Prefer read-only commands; changes need the user's approval in sshTermy."
|
||||
listTTL = 60_000 // ms: Werkzeugliste ändert sich nur mit der Version
|
||||
)
|
||||
|
||||
func serverInfo() map[string]any {
|
||||
return map[string]any{"name": "sshtermy", "version": version.Version}
|
||||
}
|
||||
|
||||
// stateless: Version aus _meta (Fassung 2026-07-28 und neuer), "" = alter Client.
|
||||
func stateless(params json.RawMessage) string {
|
||||
var p struct {
|
||||
Meta map[string]json.RawMessage `json:"_meta"`
|
||||
}
|
||||
if json.Unmarshal(params, &p) != nil {
|
||||
return ""
|
||||
}
|
||||
var v string
|
||||
_ = json.Unmarshal(p.Meta[metaVersion], &v)
|
||||
return v
|
||||
}
|
||||
|
||||
func supported(v string) bool {
|
||||
for _, s := range Supported {
|
||||
if s == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// complete: Ergebnis im Format der neuen Fassung (resultType + serverInfo).
|
||||
func complete(res map[string]any, newStyle bool) map[string]any {
|
||||
if newStyle {
|
||||
res["resultType"] = "complete"
|
||||
res["_meta"] = map[string]any{metaServerInfo: serverInfo()}
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// Tool: Beschreibung für tools/list.
|
||||
type Tool struct {
|
||||
@@ -68,6 +116,7 @@ type rpcReq struct {
|
||||
type rpcErr struct {
|
||||
Code int `json:"code"`
|
||||
Message string `json:"message"`
|
||||
Data any `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type rpcResp struct {
|
||||
@@ -99,39 +148,58 @@ func Serve(in io.Reader, out io.Writer, b Backend) error {
|
||||
for sc.Scan() {
|
||||
var q rpcReq
|
||||
if err := json.Unmarshal(sc.Bytes(), &q); err != nil {
|
||||
send(rpcResp{ID: json.RawMessage("null"), Error: &rpcErr{-32700, "parse error"}})
|
||||
send(rpcResp{ID: json.RawMessage("null"), Error: &rpcErr{Code: -32700, Message: "parse error"}})
|
||||
continue
|
||||
}
|
||||
if len(q.ID) == 0 {
|
||||
continue // Benachrichtigung (notifications/initialized, cancelled …)
|
||||
}
|
||||
v := stateless(q.Params)
|
||||
if v != "" && !supported(v) {
|
||||
send(rpcResp{ID: q.ID, Error: &rpcErr{errUnsupported, "Unsupported protocol version",
|
||||
map[string]any{"supported": Supported, "requested": v}}})
|
||||
continue
|
||||
}
|
||||
newStyle := v != ""
|
||||
switch q.Method {
|
||||
case "initialize":
|
||||
case "server/discover":
|
||||
send(rpcResp{ID: q.ID, Result: complete(map[string]any{
|
||||
"supportedVersions": Supported,
|
||||
"capabilities": map[string]any{"tools": map[string]any{}},
|
||||
"instructions": instructions,
|
||||
"ttlMs": listTTL,
|
||||
"cacheScope": "private",
|
||||
}, true)})
|
||||
case "initialize": // Fassungen bis 2025-11-25
|
||||
var p struct {
|
||||
ProtocolVersion string `json:"protocolVersion"`
|
||||
}
|
||||
_ = json.Unmarshal(q.Params, &p)
|
||||
pv := ProtocolVersion
|
||||
pv := Supported[1] // neueste Fassung mit initialize
|
||||
if p.ProtocolVersion != "" && p.ProtocolVersion < pv {
|
||||
pv = p.ProtocolVersion // ältere Fassung des Clients übernehmen
|
||||
}
|
||||
send(rpcResp{ID: q.ID, Result: map[string]any{
|
||||
"protocolVersion": pv,
|
||||
"capabilities": map[string]any{"tools": map[string]any{}},
|
||||
"serverInfo": map[string]any{"name": "sshtermy", "version": version.Version},
|
||||
"instructions": "sshTermy gives access to the user's saved SSH connections. Prefer read-only commands; changes need the user's approval in sshTermy.",
|
||||
"serverInfo": serverInfo(),
|
||||
"instructions": instructions,
|
||||
}})
|
||||
case "ping":
|
||||
send(rpcResp{ID: q.ID, Result: map[string]any{}})
|
||||
case "ping": // bis 2025-11-25
|
||||
send(rpcResp{ID: q.ID, Result: complete(map[string]any{}, newStyle)})
|
||||
case "tools/list":
|
||||
send(rpcResp{ID: q.ID, Result: map[string]any{"tools": Tools}})
|
||||
res := map[string]any{"tools": Tools}
|
||||
if newStyle {
|
||||
res["ttlMs"], res["cacheScope"] = listTTL, "private"
|
||||
}
|
||||
send(rpcResp{ID: q.ID, Result: complete(res, newStyle)})
|
||||
case "tools/call":
|
||||
var p struct {
|
||||
Name string `json:"name"`
|
||||
Arguments json.RawMessage `json:"arguments"`
|
||||
}
|
||||
if err := json.Unmarshal(q.Params, &p); err != nil || !known(p.Name) {
|
||||
send(rpcResp{ID: q.ID, Error: &rpcErr{-32602, "unknown tool"}})
|
||||
send(rpcResp{ID: q.ID, Error: &rpcErr{Code: -32602, Message: "unknown tool"}})
|
||||
continue
|
||||
}
|
||||
if len(p.Arguments) == 0 {
|
||||
@@ -145,10 +213,10 @@ func Serve(in io.Reader, out io.Writer, b Backend) error {
|
||||
if err != nil {
|
||||
res = map[string]any{"content": []textContent{{"text", err.Error()}}, "isError": true}
|
||||
}
|
||||
send(rpcResp{ID: id, Result: res})
|
||||
send(rpcResp{ID: id, Result: complete(res, newStyle)})
|
||||
}(q.ID)
|
||||
default:
|
||||
send(rpcResp{ID: q.ID, Error: &rpcErr{-32601, fmt.Sprintf("method not found: %s", q.Method)}})
|
||||
send(rpcResp{ID: q.ID, Error: &rpcErr{Code: -32601, Message: fmt.Sprintf("method not found: %s", q.Method)}})
|
||||
}
|
||||
}
|
||||
wg.Wait()
|
||||
|
||||
@@ -112,3 +112,43 @@ func TestHostRemote(t *testing.T) {
|
||||
t.Fatal("mcp.json bleibt nach Close")
|
||||
}
|
||||
}
|
||||
|
||||
// Fassung 2026-07-28: kein initialize, Version je Anfrage in _meta,
|
||||
// server/discover, resultType und Cache-Felder; unbekannte Version → -32022.
|
||||
func TestServeStateless(t *testing.T) {
|
||||
meta := `"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}`
|
||||
in := strings.Join([]string{
|
||||
`{"jsonrpc":"2.0","id":1,"method":"server/discover","params":{` + meta + `}}`,
|
||||
`{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{` + meta + `}}`,
|
||||
`{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_tabs","arguments":{},` + meta + `}}`,
|
||||
`{"jsonrpc":"2.0","id":4,"method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"1900-01-01"}}}`,
|
||||
}, "\n") + "\n"
|
||||
var out bytes.Buffer
|
||||
if err := Serve(strings.NewReader(in), &out, fake{}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
byID := map[string]map[string]any{}
|
||||
for _, l := range strings.Split(strings.TrimSpace(out.String()), "\n") {
|
||||
var m map[string]any
|
||||
if err := json.Unmarshal([]byte(l), &m); err != nil {
|
||||
t.Fatal(l)
|
||||
}
|
||||
id, _ := json.Marshal(m["id"])
|
||||
byID[string(id)] = m
|
||||
}
|
||||
disc := byID["1"]["result"].(map[string]any)
|
||||
if vs := disc["supportedVersions"].([]any); len(vs) == 0 || vs[0] != ProtocolVersion || disc["resultType"] != "complete" || disc["cacheScope"] != "private" {
|
||||
t.Errorf("server/discover: %v", disc)
|
||||
}
|
||||
list := byID["2"]["result"].(map[string]any)
|
||||
if list["resultType"] != "complete" || list["ttlMs"] == nil || list["_meta"] == nil {
|
||||
t.Errorf("tools/list: %v", list)
|
||||
}
|
||||
if byID["3"]["result"].(map[string]any)["resultType"] != "complete" {
|
||||
t.Errorf("tools/call: %v", byID["3"])
|
||||
}
|
||||
e := byID["4"]["error"].(map[string]any)
|
||||
if e["code"].(float64) != -32022 || e["data"].(map[string]any)["requested"] != "1900-01-01" {
|
||||
t.Errorf("unbekannte Version: %v", e)
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ func NewClient(base, key, fp string) (*Client, error) {
|
||||
// (wie beim Pinnen in spark-tui); sonst die Zertifizierungsstellen.
|
||||
func transport(fp string) *http.Transport {
|
||||
t := http.DefaultTransport.(*http.Transport).Clone()
|
||||
cfg := &tls.Config{MinVersion: tls.VersionTLS12}
|
||||
cfg := &tls.Config{MinVersion: tls.VersionTLS13} // beide Seiten sind sshTermy bzw. der eigene Vermittler
|
||||
if fp != "" {
|
||||
cfg.InsecureSkipVerify = true // ersetzt durch VerifyPeerCertificate (Pin)
|
||||
cfg.VerifyPeerCertificate = func(raw [][]byte, _ [][]*x509.Certificate) error {
|
||||
|
||||
@@ -75,7 +75,7 @@ func StartLAN() (*LAN, error) {
|
||||
m.HandleFunc("GET "+PathShareWatch, s.shareWatch)
|
||||
webwatch.Register(m)
|
||||
hs := &http.Server{Handler: m, ReadHeaderTimeout: 10 * time.Second, MaxHeaderBytes: 16 << 10,
|
||||
TLSConfig: &tls.Config{MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{cert}}}
|
||||
TLSConfig: &tls.Config{MinVersion: tls.VersionTLS13, Certificates: []tls.Certificate{cert}}}
|
||||
go func() { _ = hs.ServeTLS(ln, "", "") }()
|
||||
fp := CertFP(cert.Certificate[0])
|
||||
l := &LAN{Base: "https://" + net.JoinHostPort(ip, strconv.Itoa(port)), FP: fp, srv: hs, open: map[int]bool{}}
|
||||
|
||||
@@ -99,7 +99,7 @@ func Serve(ctx context.Context, o ServeOptions) error {
|
||||
hs := &http.Server{Addr: o.Listen, Handler: s.Handler(), ReadHeaderTimeout: 10 * time.Second,
|
||||
MaxHeaderBytes: 16 << 10}
|
||||
if cert != nil {
|
||||
hs.TLSConfig = &tls.Config{MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{*cert}}
|
||||
hs.TLSConfig = &tls.Config{MinVersion: tls.VersionTLS13, Certificates: []tls.Certificate{*cert}}
|
||||
}
|
||||
go s.Watch(ctx)
|
||||
go func() {
|
||||
|
||||
+13
-14
@@ -35,20 +35,19 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
NewWords = sharewire.NewWords
|
||||
IsInvite = sharewire.IsInvite
|
||||
ParseInvite = sharewire.ParseInvite
|
||||
StartGuest = sharewire.StartGuest
|
||||
HostPake = sharewire.HostPake
|
||||
SealFrame = sharewire.SealFrame
|
||||
OpenFrame = sharewire.OpenFrame
|
||||
PakeB = sharewire.PakeB
|
||||
SplitPakeB = sharewire.SplitPakeB
|
||||
ErrDenied = sharewire.ErrDenied
|
||||
errWrongCode = sharewire.ErrWrongCode
|
||||
randN = sharewire.RandN
|
||||
seal = sharewire.Seal
|
||||
open = sharewire.Open
|
||||
NewWords = sharewire.NewWords
|
||||
IsInvite = sharewire.IsInvite
|
||||
ParseInvite = sharewire.ParseInvite
|
||||
StartGuest = sharewire.StartGuest
|
||||
HostPake = sharewire.HostPake
|
||||
SealFrame = sharewire.SealFrame
|
||||
OpenFrame = sharewire.OpenFrame
|
||||
PakeB = sharewire.PakeB
|
||||
SplitPakeB = sharewire.SplitPakeB
|
||||
ErrDenied = sharewire.ErrDenied
|
||||
randN = sharewire.RandN
|
||||
seal = sharewire.Seal
|
||||
open = sharewire.Open
|
||||
)
|
||||
|
||||
// Join: anmelden, Code prüfen, auf Zulassung warten (siehe sharewire.Join).
|
||||
|
||||
@@ -45,7 +45,10 @@ type Client struct {
|
||||
// HostKey: Fingerprint (SHA256:…) des Host-Keys dieser Verbindung. Die
|
||||
// UI prüft damit, ob ein Fenster noch dasselbe System ist (Vorgang).
|
||||
HostKey string
|
||||
cancel context.CancelFunc
|
||||
// Algos: ausgehandelte Verfahren; Weak: davon die unsicheren (weakalgo.go)
|
||||
Algos ssh.NegotiatedAlgorithms
|
||||
Weak []string
|
||||
cancel context.CancelFunc
|
||||
|
||||
// Zustand der Leitung (Statuszeile, Auto-Reconnect)
|
||||
latency atomic.Int64 // letzte Rundreise in ns, 0 = noch keine
|
||||
@@ -415,6 +418,11 @@ func dial(ctx context.Context, c domain.Connection, o Options) (*Client, error)
|
||||
|
||||
kctx, cancel := context.WithCancel(context.Background())
|
||||
cl := &Client{Client: ssh.NewClient(sc, chans, reqs), Conn: c, jump: jump, cancel: cancel, dead: make(chan struct{}), HostKey: seenKey}
|
||||
cl.Algos = algosOf(sc)
|
||||
cl.Weak = weakAlgos(cl.Algos)
|
||||
if len(cl.Weak) > 0 {
|
||||
debuglog.Printf("ssh", "%s: alte Verfahren ausgehandelt: %v", c.Alias, cl.Weak)
|
||||
}
|
||||
go func() { _ = cl.Client.Wait(); close(cl.dead) }()
|
||||
banner := string(sc.ServerVersion())
|
||||
switch {
|
||||
|
||||
@@ -25,7 +25,6 @@ type stallServer struct {
|
||||
addr string
|
||||
answer int32
|
||||
seen atomic.Int32
|
||||
conns chan net.Conn
|
||||
openTCP chan net.Conn
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,12 @@ type fakeSwitch struct {
|
||||
}
|
||||
|
||||
func startFakeSwitch(t *testing.T, banner string) *fakeSwitch {
|
||||
t.Helper()
|
||||
return startFakeSwitchWith(t, banner, nil)
|
||||
}
|
||||
|
||||
// startFakeSwitchWith: wie startFakeSwitch, mod passt die Serverkonfiguration an.
|
||||
func startFakeSwitchWith(t *testing.T, banner string, mod func(*ssh.ServerConfig)) *fakeSwitch {
|
||||
t.Helper()
|
||||
_, priv, err := ed25519.GenerateKey(rand.Reader)
|
||||
if err != nil {
|
||||
@@ -49,6 +55,9 @@ func startFakeSwitch(t *testing.T, banner string) *fakeSwitch {
|
||||
ServerVersion: banner,
|
||||
}
|
||||
cfg.AddHostKey(signer)
|
||||
if mod != nil {
|
||||
mod(cfg)
|
||||
}
|
||||
ln, err := net.Listen("tcp", "127.0.0.1:0")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
+11
-3
@@ -313,11 +313,19 @@ func ppkKey(alg string, pubBlob, privBlob []byte) (any, error) {
|
||||
if !(ok1 && ok2 && ok3) {
|
||||
return nil, bad
|
||||
}
|
||||
x, y := elliptic.Unmarshal(curve, pt) //nolint:staticcheck // einfachster Weg zum Punkt
|
||||
if x == nil {
|
||||
// Skalar in feste Länge bringen und über die Go-1.25-API prüfen lassen
|
||||
// (liegt im gültigen Bereich); der öffentliche Punkt muss passen.
|
||||
size := (curve.Params().BitSize + 7) / 8
|
||||
if d.Sign() <= 0 || d.BitLen() > size*8 {
|
||||
return nil, bad
|
||||
}
|
||||
k, err := ecdsa.ParseRawPrivateKey(curve, d.FillBytes(make([]byte, size)))
|
||||
if err != nil {
|
||||
return nil, bad
|
||||
}
|
||||
if own, err := k.PublicKey.Bytes(); err != nil || !bytes.Equal(own, pt) {
|
||||
return nil, bad
|
||||
}
|
||||
k := &ecdsa.PrivateKey{PublicKey: ecdsa.PublicKey{Curve: curve, X: x, Y: y}, D: d}
|
||||
return k, nil
|
||||
}
|
||||
return nil, fmt.Errorf(i18n.T("PuTTY-Key: Typ %s wird nicht unterstützt (bitte ed25519, RSA oder ECDSA)"), alg)
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package sshx
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/crypto/ssh"
|
||||
|
||||
"github.com/db9979/sshtermy/internal/i18n"
|
||||
)
|
||||
|
||||
// Algos: ausgehandelte Verfahren der Verbindung (leer, wenn unbekannt).
|
||||
func algosOf(sc ssh.Conn) ssh.NegotiatedAlgorithms {
|
||||
if m, ok := sc.(ssh.AlgorithmsConnMetadata); ok {
|
||||
return m.Algorithms()
|
||||
}
|
||||
return ssh.NegotiatedAlgorithms{}
|
||||
}
|
||||
|
||||
// weakAlgos: ausgehandelte Verfahren, die x/crypto als unsicher führt
|
||||
// (SHA-1-Schlüsseltausch, CBC, hmac-sha1, ssh-rsa …). Sie kommen nur über den
|
||||
// Rückfall für alte Geräte zustande (auth.go, o.legacy).
|
||||
func weakAlgos(n ssh.NegotiatedAlgorithms) []string {
|
||||
old := ssh.InsecureAlgorithms()
|
||||
var out []string
|
||||
add := func(name string, list []string) {
|
||||
if name != "" && slices.Contains(list, name) && !slices.Contains(out, name) {
|
||||
out = append(out, name)
|
||||
}
|
||||
}
|
||||
add(n.KeyExchange, old.KeyExchanges)
|
||||
add(n.HostKey, old.HostKeys)
|
||||
for _, d := range []ssh.DirectionAlgorithms{n.Read, n.Write} {
|
||||
add(d.Cipher, old.Ciphers)
|
||||
add(d.MAC, old.MACs)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// WeakNote: Hinweis, wenn die Verbindung alte Verfahren benutzt ("" sonst).
|
||||
func (c *Client) WeakNote() string {
|
||||
if len(c.Weak) == 0 {
|
||||
return ""
|
||||
}
|
||||
return i18n.F("Vorsicht: %s spricht nur alte SSH-Verfahren (%s). Verschlüsselt, aber nicht mehr Stand der Technik – Firmware aktualisieren, wenn möglich.",
|
||||
c.Conn.Alias, strings.Join(c.Weak, ", "))
|
||||
}
|
||||
|
||||
// PostQuantum: Schlüsseltausch mit ML-KEM (schützt auch gegen späteres
|
||||
// Entschlüsseln mitgeschnittener Sitzungen).
|
||||
func (c *Client) PostQuantum() bool {
|
||||
return strings.Contains(c.Algos.KeyExchange, "mlkem") || strings.Contains(c.Algos.KeyExchange, "sntrup")
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package sshx
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/crypto/ssh"
|
||||
|
||||
"github.com/db9979/sshtermy/internal/domain"
|
||||
)
|
||||
|
||||
// Ein Gerät, das nur SHA-1-Schlüsseltausch und CBC kann: sshTermy verbindet
|
||||
// über den Rückfall und meldet die alten Verfahren.
|
||||
func TestOldAlgorithmsReported(t *testing.T) {
|
||||
fs := startFakeSwitchWith(t, "SSH-2.0-RomSShell_5.40", func(c *ssh.ServerConfig) {
|
||||
c.KeyExchanges = []string{ssh.InsecureKeyExchangeDH14SHA1}
|
||||
c.Ciphers = []string{ssh.InsecureCipherAES128CBC}
|
||||
c.MACs = []string{ssh.HMACSHA1}
|
||||
})
|
||||
cl := dialFake(t, fs, domain.DeviceNetwork)
|
||||
if len(cl.Weak) == 0 {
|
||||
t.Fatalf("alte Verfahren nicht erkannt: %+v", cl.Algos)
|
||||
}
|
||||
note := cl.WeakNote()
|
||||
for _, want := range []string{"diffie-hellman-group14-sha1", "aes128-cbc"} {
|
||||
if !strings.Contains(note, want) {
|
||||
t.Errorf("Hinweis nennt %s nicht: %q", want, note)
|
||||
}
|
||||
}
|
||||
if cl.PostQuantum() {
|
||||
t.Error("SHA-1-Schlüsseltausch als quantensicher gemeldet")
|
||||
}
|
||||
}
|
||||
|
||||
// Moderner Server: kein Hinweis, Schlüsseltausch quantensicher (Vorgabe von x/crypto).
|
||||
func TestModernAlgorithmsQuiet(t *testing.T) {
|
||||
fs := startFakeSwitch(t, "SSH-2.0-RomSShell_5.40")
|
||||
cl := dialFake(t, fs, domain.DeviceNetwork)
|
||||
if cl.WeakNote() != "" {
|
||||
t.Fatalf("Hinweis bei modernem Server: %q", cl.WeakNote())
|
||||
}
|
||||
if !cl.PostQuantum() {
|
||||
t.Errorf("Schlüsseltausch %q nicht quantensicher", cl.Algos.KeyExchange)
|
||||
}
|
||||
}
|
||||
@@ -564,7 +564,7 @@ func CheckWebDAV(ctx context.Context, in WebDAVInput) *Report {
|
||||
data := []byte("sshtermy")
|
||||
resp, _, err := w.do(ctx, "PUT", test, data, nil)
|
||||
if err != nil || (resp.StatusCode != 201 && resp.StatusCode != 204 && resp.StatusCode != 200) {
|
||||
detail := i18n.T("Schreiben fehlgeschlagen")
|
||||
var detail string
|
||||
hint := permHint(in.Preset)
|
||||
if err != nil {
|
||||
detail = err.Error()
|
||||
|
||||
@@ -54,7 +54,6 @@ type Conn struct {
|
||||
echoOn atomic.Bool
|
||||
cols int
|
||||
rows int
|
||||
ttSent int
|
||||
sizeMu sync.Mutex
|
||||
parseSt int
|
||||
parseCmd byte
|
||||
|
||||
@@ -15,16 +15,6 @@ type HL struct {
|
||||
Colors [8]color.Color
|
||||
}
|
||||
|
||||
// columns: Farbe je Spalte der Zeile l (nil = keine Regel).
|
||||
func (hl *HL) columns(t *Term, sb, w, l int) []color.Color {
|
||||
if hl == nil || hl.Set == nil {
|
||||
return nil
|
||||
}
|
||||
line := make(uv.Line, w)
|
||||
t.lineCells(sb, l, line)
|
||||
return hl.columnsOf(line)
|
||||
}
|
||||
|
||||
// columnsOf: wie columns, für eine schon geholte Zeile.
|
||||
func (hl *HL) columnsOf(line uv.Line) []color.Color {
|
||||
if hl == nil || hl.Set == nil {
|
||||
|
||||
@@ -468,6 +468,11 @@ func (a *App) coreMsg(msg tea.Msg) (tea.Cmd, bool) {
|
||||
a.profileConnected(s)
|
||||
a.learnKeychain(s)
|
||||
a.flashOK(i18n.T("Verbunden: ") + s.conn.Alias)
|
||||
if m.client != nil {
|
||||
if w := m.client.WeakNote(); w != "" {
|
||||
a.flash(w) // „Vorsicht: …“ = gelber Toast
|
||||
}
|
||||
}
|
||||
for _, t := range a.st.Tunnels(s.conn.ID) {
|
||||
if t.AutoStart && s.tunnels != nil {
|
||||
if _, err := s.tunnels.Start(t); err != nil {
|
||||
|
||||
@@ -273,7 +273,7 @@ func (a *App) viewCmdSets() string {
|
||||
case st.Problem != "":
|
||||
state = s.Warn.Render(trunc(firstLine(st.Problem), max(10, w-74)))
|
||||
}
|
||||
line := name + " " + s.Muted.Render(id) + " " + s.Muted.Render(src) + " "
|
||||
var line string
|
||||
if i == c.sel {
|
||||
mark = s.Accent.Render("▸ ")
|
||||
line = s.Selected.Render(name) + " " + s.Muted.Render(id) + " " + s.Muted.Render(src) + " "
|
||||
|
||||
@@ -57,24 +57,6 @@ func barTint(tint, base color.Color, strength float64, fade int) func(x int) col
|
||||
}
|
||||
}
|
||||
|
||||
// gradFg: Schrift im Verlauf fgA → fgB auf festem Hintergrund.
|
||||
func gradFg(s string, fgA, fgB, bg color.Color, bold bool) string {
|
||||
r := []rune(s)
|
||||
var b strings.Builder
|
||||
for i, ch := range r {
|
||||
k := 0.0
|
||||
if len(r) > 1 {
|
||||
k = float64(i) / float64(len(r)-1)
|
||||
}
|
||||
st := lipgloss.NewStyle().Foreground(mixColor(fgA, fgB, k)).Bold(bold)
|
||||
if bg != nil {
|
||||
st = st.Background(bg)
|
||||
}
|
||||
b.WriteString(st.Render(string(ch)))
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func sameColor(a, b color.Color) bool {
|
||||
if a == nil || b == nil {
|
||||
return a == b
|
||||
|
||||
@@ -773,6 +773,18 @@ func (a *App) viewHost(b *strings.Builder, s *session, w int) {
|
||||
if h.err != "" {
|
||||
b.WriteString(st.Danger.Render(wrap(h.err, w)) + "\n\n")
|
||||
}
|
||||
// Ausgehandelte SSH-Verfahren: alte (SHA-1, CBC …) gelb, ML-KEM = quantensicher
|
||||
if c := s.client; c != nil && c.Algos.KeyExchange != "" {
|
||||
v := c.Algos.KeyExchange + " · " + c.Algos.Write.Cipher
|
||||
switch {
|
||||
case len(c.Weak) > 0:
|
||||
b.WriteString(st.Muted.Render(fmt.Sprintf("%-9s ", "SSH")) + st.Warn.Render(trunc(i18n.T("alt: ")+strings.Join(c.Weak, ", "), w-10)) + "\n")
|
||||
case c.PostQuantum():
|
||||
row("SSH", v+i18n.T(" · quantensicher"))
|
||||
default:
|
||||
row("SSH", v)
|
||||
}
|
||||
}
|
||||
|
||||
if !net {
|
||||
srv := h.srv
|
||||
|
||||
@@ -38,7 +38,6 @@ type logsState struct {
|
||||
busy string // läuft: Zusammenfassung von …
|
||||
group string // Zusammenfassung über mehrere Sitzungen
|
||||
groupQ string
|
||||
groupKey string // Host, dessen Zusammenfassung gerade läuft
|
||||
back screen
|
||||
byHost bool // Tab: nach Host statt nach Tagen
|
||||
sortN bool // Hosts nach Anzahl sortieren
|
||||
|
||||
@@ -388,11 +388,6 @@ func (a *App) hintsIn(s *session, style lipgloss.Style, items ...[2]string) stri
|
||||
return b.String()
|
||||
}
|
||||
|
||||
// button: anklickbarer Knopf für Dialoge.
|
||||
func (a *App) button(key, label string) string {
|
||||
return a.keyZone(key, a.s.Key.Render(key)+a.s.KeyDesc.Render(label))
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- Terminal
|
||||
|
||||
func (a *App) inTermArea(s *session, x, y int) bool {
|
||||
@@ -630,12 +625,3 @@ func (a *App) modalKeys() [][2]string {
|
||||
}
|
||||
return keys
|
||||
}
|
||||
|
||||
// mouseHelp: Abschnitt für die Hilfe (F1).
|
||||
const mouseHelp = `Maus Klick auf Tabs, Listen, Vorschläge, Felder, Fußzeile · Doppelklick öffnet
|
||||
Terminal: Ziehen markiert + kopiert · Doppel-/Dreifachklick Wort/Zeile
|
||||
Ziel-/Agent-Panel, KI fragen: ebenso, Rechtsklick kopiert die Markierung
|
||||
Rechtsklick fügt ein, auf Link/IP/Host öffnet er ein Menü · Strg+Klick öffnet URL
|
||||
Rad blättert im Verlauf (Esc zurück)
|
||||
htop, mc, vim, tmux bekommen die Maus · Shift+Ziehen markiert trotzdem
|
||||
Palette „Maus aus“: Terminalfenster markiert wieder selbst`
|
||||
@@ -729,9 +729,6 @@ func (a *App) palFolder(id string) palItem {
|
||||
// proItem: Profi-Eintrag (im einfachen Modus nur über die Suche).
|
||||
func proItem(it palItem) palItem { it.pro = true; return it }
|
||||
|
||||
// inMenu: Eintrag in ein anderes Untermenü legen.
|
||||
func inMenu(menu string, it palItem) palItem { it.menu = menu; return it }
|
||||
|
||||
// cycleIndex: Position von cur in n Werten, um dir verschoben (rundherum).
|
||||
// Unbekannter Wert: vorwärts beim ersten, rückwärts beim letzten beginnen.
|
||||
func cycleIndex(cur, n, dir int) int {
|
||||
|
||||
@@ -438,17 +438,6 @@ func (a *App) quickRawItems(c domain.Connection) []palItem {
|
||||
|
||||
func (s *session) isSerial() bool { return s.conn.Protocol == domain.ProtoSerial }
|
||||
|
||||
// remoteString: Systembeschreibung für die Gefahren-Einstufung.
|
||||
func (s *session) remoteString() string {
|
||||
if s.client != nil {
|
||||
return s.client.Remote.String()
|
||||
}
|
||||
if s.isLocal() && localWindowsShell(s.prof) || s.isWinRM() {
|
||||
return "Windows " + s.profileSummary()
|
||||
}
|
||||
return s.profileSummary()
|
||||
}
|
||||
|
||||
// syncProtoPort: Wechsel SSH ↔ Telnet im Formular passt den Standard-Port an,
|
||||
// solange dort noch der Standard des anderen Protokolls steht.
|
||||
func syncProtoPort(f *form) {
|
||||
|
||||
@@ -370,18 +370,3 @@ func (a *App) cycleReach(dir int) tea.Cmd {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *App) toggleReach() tea.Cmd {
|
||||
on := !a.reachEnabled()
|
||||
if err := a.st.UpdateSettings(func(s *domain.Settings) { s.NoReachCheck = !on }); err != nil {
|
||||
a.flashErr(i18n.T("Einstellung nicht gespeichert: ") + err.Error())
|
||||
return nil
|
||||
}
|
||||
a.reach.next = time.Time{}
|
||||
if on {
|
||||
a.flash(i18n.T("Erreichbarkeit an: der Manager zeigt pro Host einen Online-Punkt."))
|
||||
} else {
|
||||
a.flash(i18n.T("Erreichbarkeit aus: sshTermy baut keine Prüfverbindungen mehr auf."))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -187,10 +187,6 @@ func (o shareOpts) withDefaults() shareOpts {
|
||||
return o
|
||||
}
|
||||
|
||||
// shareRelays: Vermittler, über die geteilt werden kann (eigene; Spark erst,
|
||||
// wenn das Panel Teilen v2 kann – der Versuch sagt es dann).
|
||||
func (a *App) shareRelays() []domain.Relay { return a.st.Relays() }
|
||||
|
||||
// startShare: „teilen“ öffnet immer den Dialog (sharedialog.go).
|
||||
func (a *App) startShare(s *session) tea.Cmd {
|
||||
if s == nil || s.state != stConnected || s.term == nil {
|
||||
|
||||
@@ -136,9 +136,6 @@ func (a *App) resize(s *session) {
|
||||
a.shareResized(s)
|
||||
}
|
||||
|
||||
// agentClient: KI ohne Bezug zu einer Verbindung (nur die Einstellung zählt).
|
||||
func (a *App) agentClient() (*agent.Agent, error) { return a.agentClientFor() }
|
||||
|
||||
// ---------------------------------------------------------------- Tasten
|
||||
|
||||
func (a *App) updateTerminal(msg tea.Msg) tea.Cmd {
|
||||
@@ -901,9 +898,7 @@ func (a *App) tabStrip(room int) string {
|
||||
text = ts.UnsetPadding().Render(text)
|
||||
} else {
|
||||
ts = ts.Background(tabFlashBg(x, ts.GetBackground(), now))
|
||||
if bg := ts.GetBackground(); bg != nil {
|
||||
dot = lipgloss.NewStyle().Background(bg).Render(dot) // Punkt auf dem Tab-Hintergrund
|
||||
}
|
||||
dot = lipgloss.NewStyle().Background(ts.GetBackground()).Render(dot) // Punkt auf dem Tab-Hintergrund
|
||||
// Akzentfarbe der Verbindung als Streifen links im Tab (accent.go)
|
||||
if col := a.tabColor(x); col != nil {
|
||||
stripe = glyph("▌", col, ts.GetBackground())
|
||||
|
||||
@@ -30,7 +30,6 @@ var (
|
||||
parseHex = theme.ParseHex
|
||||
hexOf = theme.Hex
|
||||
mixColor = theme.Mix
|
||||
luminance = theme.Luminance
|
||||
contrast = theme.Contrast
|
||||
contrastProblems = theme.Problems
|
||||
rgbOf = theme.RGB
|
||||
|
||||
@@ -119,14 +119,12 @@ func topoForest(devs []netmap.Device, links []netmap.Link) (roots []*topoNode, e
|
||||
adj := map[string][]edge{}
|
||||
leaves := map[string][]string{}
|
||||
deg := map[string]int{}
|
||||
var all []*bool
|
||||
for _, l := range links {
|
||||
if !l.Known {
|
||||
leaves[l.A] = append(leaves[l.A], strings.TrimSpace(netmap.ShortName(l.B)+" "+l.APort))
|
||||
continue
|
||||
}
|
||||
u := new(bool)
|
||||
all = append(all, u)
|
||||
adj[l.A] = append(adj[l.A], edge{l.B, portPair(l.APort, l.BPort), u})
|
||||
adj[l.B] = append(adj[l.B], edge{l.A, portPair(l.BPort, l.APort), u})
|
||||
deg[l.A]++
|
||||
|
||||
@@ -48,9 +48,7 @@ func (a *App) vgFocus(s *session) {
|
||||
// die noch fehlen (erst erfragen).
|
||||
func (a *App) stepTarget(st *vgStep) (s *session, cmd string, need []string) {
|
||||
cmd = agent.FillPlaceholders(st.Command, a.vg.vals)
|
||||
for _, p := range agent.Placeholders(cmd) {
|
||||
need = append(need, p)
|
||||
}
|
||||
need = append(need, agent.Placeholders(cmd)...)
|
||||
if st.Win > 0 {
|
||||
s = a.byWin(st.Win)
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ func fakeRelease(t *testing.T, ver string, bin []byte, sums string, sign bool) *
|
||||
pub, priv, _ := ed25519.GenerateKey(rand.Reader)
|
||||
if sums == "" {
|
||||
h := sha256.Sum256(bin)
|
||||
sums = hex.EncodeToString(h[:]) + " " + AssetName() + "\n"
|
||||
sums = SumsVersionLine(ver) + "\n" + hex.EncodeToString(h[:]) + " " + AssetName() + "\n"
|
||||
}
|
||||
files := map[string][]byte{"/bin": bin, "/sums": []byte(sums)}
|
||||
rel := &Release{Version: ver, assets: map[string][]string{}}
|
||||
@@ -99,13 +99,13 @@ func TestApplyReplacesAndKeepsOld(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestApplyRejects(t *testing.T) {
|
||||
bad := strings.Repeat("0", 64) + " " + AssetName() + "\n"
|
||||
bad := SumsVersionLine("1.0.2") + "\n" + strings.Repeat("0", 64) + " " + AssetName() + "\n"
|
||||
cases := []struct {
|
||||
name string
|
||||
prep func(t *testing.T) *Release
|
||||
want string
|
||||
}{
|
||||
{"falsche Prüfsumme", func(t *testing.T) *Release { return fakeRelease(t, "1.0.2", []byte("neu"), bad, true) }, "Prüfsumme"},
|
||||
{"falsche Prüfsumme", func(t *testing.T) *Release { return fakeRelease(t, "1.0.2", []byte("neu"), bad, true) }, "Prüfsumme stimmt nicht"},
|
||||
{"Signatur fehlt", func(t *testing.T) *Release {
|
||||
r := fakeRelease(t, "1.0.2", []byte("neu"), "", true)
|
||||
delete(r.assets, "checksums.txt.sig")
|
||||
@@ -122,6 +122,14 @@ func TestApplyRejects(t *testing.T) {
|
||||
delete(r.assets, AssetName())
|
||||
return r
|
||||
}, "checksums.txt"},
|
||||
{"signierte Prüfsummen einer älteren Version", func(t *testing.T) *Release {
|
||||
h := sha256.Sum256([]byte("alt"))
|
||||
return fakeRelease(t, "1.0.2", []byte("alt"), SumsVersionLine("1.0.1")+"\n"+hex.EncodeToString(h[:])+" "+AssetName()+"\n", true)
|
||||
}, "v1.0.1"},
|
||||
{"signierte Prüfsummen ohne Version", func(t *testing.T) *Release {
|
||||
h := sha256.Sum256([]byte("alt"))
|
||||
return fakeRelease(t, "1.0.2", []byte("alt"), hex.EncodeToString(h[:])+" "+AssetName()+"\n", true)
|
||||
}, "keine Version"},
|
||||
{"Selbsttest scheitert", func(t *testing.T) *Release {
|
||||
selfTest = func(string, string) error { return errors.New("startet nicht") }
|
||||
return fakeRelease(t, "1.0.2", []byte("neu"), "", true)
|
||||
|
||||
@@ -304,6 +304,11 @@ func FetchAsset(ctx context.Context, rel *Release, name string) ([]byte, error)
|
||||
if err := VerifySignature(sums, sig, version.UpdatePubKey); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Die Signatur gilt nur zusammen mit der Versionszeile: sonst ließe
|
||||
// sich ein älteres, ebenfalls signiertes Release als neues ausgeben.
|
||||
if err := SumsVersion(sums, rel.Version); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
want := ""
|
||||
for _, l := range strings.Split(string(sums), "\n") {
|
||||
@@ -326,6 +331,26 @@ func FetchAsset(ctx context.Context, rel *Release, name string) ([]byte, error)
|
||||
return bin, nil
|
||||
}
|
||||
|
||||
// SumsVersionLine: erste Zeile von checksums.txt, die release.yml vor dem
|
||||
// Signieren schreibt. Ältere Versionen überlesen sie (drei Felder statt zwei).
|
||||
func SumsVersionLine(v string) string { return "# sshtermy v" + strings.TrimPrefix(v, "v") }
|
||||
|
||||
// SumsVersion: nennt die signierte checksums.txt genau die Version, die
|
||||
// installiert werden soll?
|
||||
func SumsVersion(sums []byte, want string) error {
|
||||
line := SumsVersionLine(want)
|
||||
for _, l := range strings.Split(string(sums), "\n") {
|
||||
l = strings.TrimSpace(l)
|
||||
if strings.HasPrefix(l, "# sshtermy v") {
|
||||
if l == line {
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf(i18n.T("update: signierte Prüfsummen gehören zu %s, nicht zu v%s – Download verworfen"), strings.TrimPrefix(l, "# sshtermy "), strings.TrimPrefix(want, "v"))
|
||||
}
|
||||
}
|
||||
return errors.New(i18n.T("update: signierte Prüfsummen nennen keine Version – Download verworfen"))
|
||||
}
|
||||
|
||||
// VerifySignature prüft eine Ed25519-Signatur (Rohbytes oder hex) über data.
|
||||
func VerifySignature(data, sig []byte, pubHex string) error {
|
||||
pub, err := hex.DecodeString(strings.TrimSpace(pubHex))
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
d450d9fa2dbe57d5344f36a878155e03510ed79ead471f62b3a00d10e9490136
|
||||
d921017297cc82966b1234a68ae49bb8b9af6fede3a19fc3c46f3f550939fd7b
|
||||
+2
-2
@@ -163,7 +163,7 @@ sudo apt update && sudo apt install sshtermy</pre></div>
|
||||
<div class="card"><h3>Telnet & Konsole</h3><p>Telnet und USB-Konsolenkabel (z. B. Aruba-Switches), Kabel wird automatisch gewählt, Anmeldung getippt.</p></div>
|
||||
<div class="card"><h3>PowerShell-Fernzugriff</h3><p>Auf Windows-Server einloggen wie mit <code>Enter-PSSession</code> über WinRM (NTLM oder Kerberos, verschlüsselt, oder HTTPS), mit Verlauf, Tab-Ergänzung vom Server und KI, die PowerShell spricht.</p></div>
|
||||
<div class="card"><h3>Lokale Shell</h3><p>Deine eigene PowerShell, cmd, zsh oder bash als Tab (<kbd>Alt</kbd>+<kbd>L</kbd>), mit KI, Agent- und Plan-Modus, geteilter Ansicht und Protokoll; der Gefahren-Check gilt auch hier.</p></div>
|
||||
<div class="card"><h3>Profi-SSH</h3><p>Agent-Weiterleitung, X11-Weiterleitung, FIDO2-Sicherheitsschlüssel, Kerberos/GSSAPI, SSH-Zertifikate, feste tmux/screen-Sitzungen.</p></div>
|
||||
<div class="card"><h3>Profi-SSH</h3><p>Agent-Weiterleitung, X11-Weiterleitung, FIDO2-Sicherheitsschlüssel, Kerberos/GSSAPI, SSH-Zertifikate, feste tmux/screen-Sitzungen. Quantensicherer Schlüsseltausch (ML-KEM), wo der Server ihn kann, und ein deutlicher Hinweis, wenn ein altes Gerät nur SHA-1/CBC spricht.</p></div>
|
||||
<div class="card"><h3>Dateien im Terminal</h3><p><code>tsz</code>/<code>trz</code> (trzsz) auch durch <code>sudo su</code> und mehrere Sprünge, Zwischenablage vom Server per OSC 52.</p></div>
|
||||
<div class="card"><h3>Team-Freigabe</h3><p>Verschlüsselte <code>.sshteam</code>-Pakete und Team-Ordner, die die Verbindungen aller aktuell halten, ohne Passwörter.</p></div>
|
||||
<div class="card"><h3>Aussehen & Tasten</h3><p>26 Themes mit Live-Vorschau, von Polarnacht, Abendrot und Tusche bis Papier und Minze, dazu Hochkontrast und Farbenblind, eigene Farben, vier Symbol-Stile, jede Taste frei belegbar.</p></div>
|
||||
@@ -259,7 +259,7 @@ sudo apt update && sudo apt install sshtermy</pre></div>
|
||||
|
||||
<section id="updates">
|
||||
<h2>Updates</h2>
|
||||
<p>Ein direkter Download oder der Einzeiler aktualisiert sich selbst: sshTermy fragt einmal am Tag bei GitHub nach, prüft die Prüfsumme und tauscht die Datei aus (<kbd>F12</kbd> → <kbd>u</kbd> oder <code>sshtermy --update</code>).</p>
|
||||
<p>Ein direkter Download oder der Einzeiler aktualisiert sich selbst: sshTermy fragt einmal am Tag bei GitHub nach, prüft Prüfsumme und Signatur (die auch die Version nennt) und tauscht die Datei aus (<kbd>F12</kbd> → <kbd>u</kbd> oder <code>sshtermy --update</code>).</p>
|
||||
<p>Über eine Paketquelle installiert, aktualisiert die Paketquelle:</p>
|
||||
<table>
|
||||
<tr><td>Homebrew</td><td><code>brew upgrade sshtermy</code></td></tr>
|
||||
|
||||
+2
-2
@@ -163,7 +163,7 @@ sudo apt update && sudo apt install sshtermy</pre></div>
|
||||
<div class="card"><h3>Telnet & serial</h3><p>Telnet and USB console cables (e.g. Aruba switches), cable picked automatically, login typed for you.</p></div>
|
||||
<div class="card"><h3>Remote PowerShell</h3><p>Log into Windows servers like <code>Enter-PSSession</code> over WinRM (NTLM or Kerberos, encrypted, or HTTPS), with history, Tab completion from the server and AI that speaks PowerShell.</p></div>
|
||||
<div class="card"><h3>Local shell</h3><p>Your own PowerShell, cmd, zsh or bash as a tab (<kbd>Alt</kbd>+<kbd>L</kbd>), with AI, agent and plan mode, split view and session log; danger rules apply here too.</p></div>
|
||||
<div class="card"><h3>Pro SSH</h3><p>Agent forwarding, X11 forwarding, FIDO2 security keys, Kerberos/GSSAPI, SSH certificates, persistent tmux/screen sessions.</p></div>
|
||||
<div class="card"><h3>Pro SSH</h3><p>Agent forwarding, X11 forwarding, FIDO2 security keys, Kerberos/GSSAPI, SSH certificates, persistent tmux/screen sessions. Quantum-safe key exchange (ML-KEM) where the server supports it, and a clear notice when an old device only speaks SHA-1/CBC.</p></div>
|
||||
<div class="card"><h3>Files in the terminal</h3><p><code>tsz</code>/<code>trz</code> (trzsz) through <code>sudo su</code> and several hops, clipboard from the server via OSC 52.</p></div>
|
||||
<div class="card"><h3>Team sharing</h3><p>Encrypted <code>.sshteam</code> packages and team folders that keep everyone's connections up to date, without passwords.</p></div>
|
||||
<div class="card"><h3>Look & keys</h3><p>26 themes with live preview, from Polar night, Synthwave and Ink to Paper and Mint, plus high contrast and color blindness, your own colors, four icon styles, every shortcut can be changed.</p></div>
|
||||
@@ -262,7 +262,7 @@ sudo apt update && sudo apt install sshtermy</pre></div>
|
||||
|
||||
<section id="updates">
|
||||
<h2>Updates</h2>
|
||||
<p>A direct download or the one-line installer updates itself: sshTermy checks GitHub once a day, verifies the checksum and swaps the file (<kbd>F12</kbd> → <kbd>u</kbd>, or <code>sshtermy --update</code>).</p>
|
||||
<p>A direct download or the one-line installer updates itself: sshTermy checks GitHub once a day, verifies the checksum and the signature (which also names the version) and swaps the file (<kbd>F12</kbd> → <kbd>u</kbd>, or <code>sshtermy --update</code>).</p>
|
||||
<p>Installed with a package manager, the package manager updates it:</p>
|
||||
<table>
|
||||
<tr><td>Homebrew</td><td><code>brew upgrade sshtermy</code></td></tr>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# staticcheck (CI-Job „lint“). Abweichungen von der Vorgabe:
|
||||
# ST1005: Fehlertexte sind deutsch, Substantive beginnen groß („Kerberos-Ticket …“).
|
||||
# ST1008: Test-Helfer geben (Text, Fehler, Befehl) zurück, passend zu onMCP.
|
||||
# S1021: `var p *picker; p = newPicker(…, func… { p … })` – der Rückruf braucht p selbst.
|
||||
checks = ["inherit", "-ST1005", "-ST1008", "-S1021"]
|
||||
@@ -1,6 +1,6 @@
|
||||
module devsshd
|
||||
|
||||
go 1.26.0
|
||||
go 1.27.0
|
||||
|
||||
require (
|
||||
github.com/creack/pty v1.1.24
|
||||
|
||||
Reference in new issue
Block a user