vamp-mcp 0.1.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +23 -9
  2. package/bin/vamp-mcp.mjs +1 -1
  3. package/package.json +1 -1
  4. package/runtime/backends/kvm/debian-preseed.cfg +35 -0
  5. package/runtime/backends/remote_ssh/server.mjs +279 -8
  6. package/runtime/backends/virtualbox/provision.py +69 -21
  7. package/runtime/backends/virtualbox/server.mjs +390 -50
  8. package/runtime/guest_setup/http/postdeb.sh +47 -0
  9. package/runtime/guest_setup/http/postwin.ps1 +28 -0
  10. package/runtime/guest_setup/http/setup-all.ps1 +25 -0
  11. package/runtime/guest_setup/http/setup-win.cmd +7 -0
  12. package/runtime/guest_setup/http/setup.ps1 +29 -0
  13. package/runtime/guest_setup/http/setup.sh +50 -0
  14. package/runtime/guest_setup/kvm/setup-debian.sh +73 -0
  15. package/runtime/guest_setup/kvm/setup-windows.ps1 +52 -0
  16. package/runtime/guest_setup/recorder/README.txt +4 -0
  17. package/runtime/guest_setup/recorder/recorder.zip +0 -0
  18. package/runtime/guest_setup/recorder/setup-user.py +19 -1
  19. package/runtime/guest_setup/recorder/setup-win.cmd +55 -6
  20. package/runtime/guest_setup/recorder/setup.ps1 +57 -6
  21. package/runtime/guest_setup/recorder/setup.sh +18 -1
  22. package/runtime/guest_setup/requirements.txt +2 -0
  23. package/runtime/guest_setup/setup-all.ps1 +35 -0
  24. package/runtime/guest_setup/setup-all.sh +22 -0
  25. package/runtime/guest_setup/vault/Install-VCRuntime.ps1 +26 -0
  26. package/runtime/guest_setup/vault/setup-guest-vault.ps1 +148 -0
  27. package/runtime/guest_setup/vault/setup-guest-vault.sh +75 -0
  28. package/runtime/scripts/macos/setup-host.sh +126 -0
  29. package/runtime/scripts/remote_host_setup.sh +7 -4
  30. package/runtime/scripts/script_server.py +517 -0
@@ -0,0 +1,148 @@
1
+ <#
2
+ .SYNOPSIS
3
+ Installs KeePassXC (with Passkey / Browser Integration), VeraCrypt CLI,
4
+ and configures automatic Removable-USB mounting for the secondary VHD.
5
+ .DESCRIPTION
6
+ Runs in the guest Windows desktop session after VM provisioning.
7
+ 1. Installs KeePassXC (winget or direct download).
8
+ 2. Registers KeePassXC-Browser native messaging host for Chrome/Edge (Passkey support).
9
+ 3. Installs VeraCrypt CLI (winget or silent installer).
10
+ 4. Creates Start-MountVault.cmd helper using VeraCrypt '/m rm' flag to expose NPKI as a removable USB drive.
11
+ #>
12
+
13
+ $ErrorActionPreference = 'Stop'
14
+
15
+ Write-Output "=== VAMP Vault Guest Setup: KeePassXC, VeraCrypt & Passkey ==="
16
+
17
+ # The standalone winget path needs the same prerequisite as offline setup.
18
+ # Stop before KeePassXC if the runtime cannot be installed and verified.
19
+ $vcRuntime = & (Join-Path $PSScriptRoot 'Install-VCRuntime.ps1')
20
+
21
+ # 1. Install KeePassXC
22
+ $keepass = Get-Command keepassxc.exe -ErrorAction SilentlyContinue
23
+ if (-not $keepass -and (Test-Path 'C:\Program Files\KeePassXC\keepassxc.exe')) { $keepass = @{Source='C:\Program Files\KeePassXC\keepassxc.exe'} }
24
+ if (-not $keepass) {
25
+ Write-Output "[1/4] Installing KeePassXC via winget..."
26
+ try {
27
+ winget install --exact --id KeePassXCTeam.KeePassXC --scope machine --accept-package-agreements --accept-source-agreements --silent
28
+ if ($LASTEXITCODE -notin @(0, 3010)) { throw "KeePassXC winget exit code: $LASTEXITCODE" }
29
+ } catch {
30
+ throw "KeePassXC installation failed: $_"
31
+ }
32
+ } else {
33
+ Write-Output "[1/4] KeePassXC already installed: $($keepass.Source)"
34
+ }
35
+
36
+ # Locate KeePassXC installation
37
+ $proxyPath = "C:\Program Files\KeePassXC\keepassxc-proxy.exe"
38
+ if (-not (Test-Path -LiteralPath $proxyPath)) { throw "KeePassXC proxy was not installed: $proxyPath" }
39
+
40
+ # 2. Register KeePassXC-Browser Native Messaging Host for Passkey support
41
+ Write-Output "[2/4] Registering KeePassXC-Browser native messaging for Chrome/Edge Passkeys..."
42
+ $nmHostDir = Join-Path $env:LOCALAPPDATA 'KeePassXC\NativeMessagingHosts'
43
+ New-Item -ItemType Directory -Force -Path $nmHostDir | Out-Null
44
+
45
+ $manifestPath = Join-Path $nmHostDir 'org.keepassxc.keepassxc_browser.json'
46
+ $manifestContent = @{
47
+ name = "org.keepassxc.keepassxc_browser"
48
+ description = "KeePassXC integration with web browsers (Passkeys)"
49
+ path = $proxyPath
50
+ type = "stdio"
51
+ allowed_origins = @(
52
+ "chrome-extension://oboonakemofpalcgghocfoadofidjkkk/" # KeePassXC-Browser official extension ID
53
+ )
54
+ } | ConvertTo-Json -Depth 4
55
+
56
+ Set-Content -LiteralPath $manifestPath -Value $manifestContent -Encoding utf8
57
+
58
+ # Register in Windows Registry for Chrome and Edge
59
+ $regPaths = @(
60
+ "HKCU:\Software\Google\Chrome\NativeMessagingHosts\org.keepassxc.keepassxc_browser",
61
+ "HKCU:\Software\Microsoft\Edge\NativeMessagingHosts\org.keepassxc.keepassxc_browser"
62
+ )
63
+ foreach ($regPath in $regPaths) {
64
+ if (-not (Test-Path $regPath)) {
65
+ New-Item -Path $regPath -Force | Out-Null
66
+ }
67
+ Set-ItemProperty -Path $regPath -Name "(default)" -Value $manifestPath
68
+ }
69
+ Write-Output "Native messaging registered at: $manifestPath"
70
+
71
+ # 3. Install VeraCrypt CLI
72
+ $veracrypt = Get-Command VeraCrypt.exe -ErrorAction SilentlyContinue
73
+ if (-not $veracrypt -and (Test-Path 'C:\Program Files\VeraCrypt\VeraCrypt.exe')) { $veracrypt = @{Source='C:\Program Files\VeraCrypt\VeraCrypt.exe'} }
74
+ if (-not $veracrypt) {
75
+ Write-Output "[3/4] Installing VeraCrypt via winget..."
76
+ try {
77
+ winget install --exact --id IDRIX.VeraCrypt --scope machine --accept-package-agreements --accept-source-agreements --silent
78
+ if ($LASTEXITCODE -notin @(0, 3010)) { throw "VeraCrypt winget exit code: $LASTEXITCODE" }
79
+ } catch {
80
+ throw "VeraCrypt installation failed: $_"
81
+ }
82
+ } else {
83
+ Write-Output "[3/4] VeraCrypt already installed: $($veracrypt.Source)"
84
+ }
85
+
86
+ # 4. Create Removable-USB Auto-Mount Helper Script
87
+ Write-Output "[4/4] Creating VHD Removable-USB (/m rm) Mount Helper..."
88
+ $desktop = [Environment]::GetFolderPath('Desktop')
89
+ $toolsDir = Join-Path $desktop 'VAMP-Vault'
90
+ New-Item -ItemType Directory -Force -Path $toolsDir | Out-Null
91
+
92
+ $mountScript = @'
93
+ @echo off
94
+ setlocal enabledelayedexpansion
95
+ echo ========================================================
96
+ echo VAMP Vault: Mounting Secondary VHD as Removable USB
97
+ echo ========================================================
98
+
99
+ :: 1. Search for vault.hc on all attached drives (e.g. D:\, E:\ from secondary VHD)
100
+ set "HC_PATH="
101
+ for %%D in (D E F G H I) do (
102
+ if exist "%%D:\vault.hc" (
103
+ set "HC_PATH=%%D:\vault.hc"
104
+ goto :FOUND
105
+ )
106
+ )
107
+
108
+ :FOUND
109
+ if "%HC_PATH%"=="" (
110
+ echo [ERROR] vault.hc not found on any secondary drive!
111
+ echo Please make sure the secondary vault.vhd is attached to the VM.
112
+ pause
113
+ exit /b 1
114
+ )
115
+
116
+ echo Found vault container: %HC_PATH%
117
+ rem VeraCrypt asks for the password in its guest GUI; never use /p.
118
+
119
+ :: 2. Mount with /m rm (Mount volume as removable media)
120
+ :: Requests VeraCrypt removable media mode; application compatibility needs separate verification.
121
+ set "VC_EXE=C:\Program Files\VeraCrypt\VeraCrypt.exe"
122
+ if not exist "%VC_EXE%" (
123
+ echo [ERROR] VeraCrypt not found at %VC_EXE%!
124
+ pause
125
+ exit /b 1
126
+ )
127
+
128
+ echo Mounting %HC_PATH% as Removable USB drive...
129
+ "%VC_EXE%" /v "%HC_PATH%" /m rm /a
130
+
131
+ if %ERRORLEVEL% equ 0 (
132
+ echo [SUCCESS] Vault mounted successfully as Removable Media!
133
+ echo Check the guest drive before proceeding with authentication.
134
+ ) else (
135
+ echo [ERROR] Failed to mount vault (code %ERRORLEVEL%).
136
+ )
137
+ pause
138
+ '@
139
+
140
+ Set-Content -LiteralPath (Join-Path $toolsDir 'Mount-Vault-USB.cmd') -Value $mountScript -Encoding ascii
141
+
142
+ $vcPath = 'C:\Program Files\VeraCrypt\VeraCrypt.exe'
143
+ if (-not (Test-Path -LiteralPath $vcPath)) { throw "VeraCrypt was not installed: $vcPath" }
144
+ $result = @{ status = 'configured'; keepassxc_proxy = $proxyPath; veracrypt = $vcPath; native_messaging_registered = $true; browser_extension_installed = $false; passkey_login_verified = $false }
145
+ $result | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $toolsDir 'setup-result.json') -Encoding utf8
146
+ Write-Output "=== VAMP Vault Guest Setup Configured (passkey login not verified) ==="
147
+ Write-Output "KeePassXC native messaging host: registered for Chrome & Edge"
148
+ Write-Output "Removable Mount helper: $toolsDir\Mount-Vault-USB.cmd"
@@ -0,0 +1,75 @@
1
+ #!/bin/sh
2
+ # Run as the guest desktop user. Optional verified CLI media is prepared on host.
3
+ set -eu
4
+ [ "$(id -u)" != 0 ] || { echo 'Run as the desktop user, not root.' >&2; exit 1; }
5
+ state="$HOME/.local/share/vamp/vault-setup"
6
+ mkdir -p "$state"
7
+ printf '{"status":"running","passkey_login_verified":false}\n' > "$state/result.json"
8
+ trap 'printf "{\"status\":\"failed\",\"passkey_login_verified\":false}\n" > "$state/result.json"' 0
9
+ if ! command -v keepassxc-cli >/dev/null 2>&1; then
10
+ command -v apt-get >/dev/null 2>&1 || { echo 'Install KeePassXC first.' >&2; exit 1; }
11
+ sudo -n apt-get update
12
+ sudo -n apt-get install -y keepassxc
13
+ fi
14
+ proxy=$(command -v keepassxc-proxy) || { echo 'keepassxc-proxy is missing.' >&2; exit 1; }
15
+ vc=$(command -v veracrypt || true)
16
+ if [ -z "$vc" ] && [ -n "${VAMP_VAULT_CLI_DIR:-}" ]; then
17
+ media=$VAMP_VAULT_CLI_DIR
18
+ [ -f "$media/SHA256SUMS" ] || { echo 'Verified CLI manifest is missing.' >&2; exit 1; }
19
+ (cd "$media" && sha256sum --strict -c SHA256SUMS > "$state/cli-checksums.log")
20
+ [ -f "$media/veracrypt.tar.gz" ] || exit 1
21
+ dest="$HOME/.local/share/vamp/vault-bin"
22
+ mkdir -p "$dest" "$HOME/.local/bin"
23
+ tar -xzf "$media/veracrypt.tar.gz" -C "$dest"
24
+ cat > "$HOME/.local/bin/veracrypt" <<'EOF'
25
+ #!/bin/sh
26
+ app="$HOME/.local/share/vamp/vault-bin/veracrypt-appimage/squashfs-root"
27
+ export LD_LIBRARY_PATH="$app/usr/lib:$app/usr/lib/x86_64-linux-gnu${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
28
+ exec "$app/usr/bin/veracrypt" "$@"
29
+ EOF
30
+ chmod +x "$HOME/.local/bin/veracrypt"
31
+ vc="$HOME/.local/bin/veracrypt"
32
+ fi
33
+ [ -n "$vc" ] || { echo 'VeraCrypt is missing. Supply VAMP_VAULT_CLI_DIR from the verified setup media.' >&2; exit 1; }
34
+ keepassxc-cli --version > "$state/keepassxc-version.txt"
35
+ "$vc" --text --version > "$state/veracrypt-version.txt"
36
+ export VAMP_PROXY="$proxy"
37
+ python3 - <<'PY'
38
+ import json, os
39
+ from pathlib import Path
40
+ home=Path.home()
41
+ base={'name':'org.keepassxc.keepassxc_browser','description':'KeePassXC browser integration','path':os.environ['VAMP_PROXY'],'type':'stdio'}
42
+ for directory in [home/'.config/google-chrome/NativeMessagingHosts',home/'.config/chromium/NativeMessagingHosts',home/'.config/microsoft-edge/NativeMessagingHosts']:
43
+ directory.mkdir(parents=True,exist_ok=True)
44
+ (directory/'org.keepassxc.keepassxc_browser.json').write_text(json.dumps({**base,'allowed_origins':['chrome-extension://oboonakemofpalcgghocfoadofidjkkk/']},indent=2)+'\n')
45
+ directory=home/'.mozilla/native-messaging-hosts';directory.mkdir(parents=True,exist_ok=True)
46
+ (directory/'org.keepassxc.keepassxc_browser.json').write_text(json.dumps({**base,'allowed_extensions':['keepassxc-browser@keepassxc.org']},indent=2)+'\n')
47
+ PY
48
+ # Linux has no VeraCrypt 'removable' mount option. Prompt in the guest terminal;
49
+ # never put a volume password in argv or claim this changes the device bus type.
50
+ desktop=$(xdg-user-dir DESKTOP 2>/dev/null || printf '%s/Desktop' "$HOME")
51
+ [ "$desktop" != "$HOME" ] || desktop="$HOME/Desktop"
52
+ mkdir -p "$desktop/VAMP-Vault"
53
+ cat > "$desktop/VAMP-Vault/mount-vault.sh" <<'EOF'
54
+ #!/bin/sh
55
+ set -eu
56
+ container=${1:-}
57
+ if [ -z "$container" ]; then
58
+ for folder in /media/*/* /mnt/*; do
59
+ if [ -f "$folder/vault.hc" ]; then container="$folder/vault.hc"; break; fi
60
+ done
61
+ fi
62
+ [ -f "$container" ] || { echo 'Pass the path to a vault.hc container.' >&2; exit 1; }
63
+ vc=$(command -v veracrypt || printf '%s/.local/bin/veracrypt' "$HOME")
64
+ mkdir -p "$HOME/VAMP-Vault"
65
+ exec "$vc" --text --mount "$container" "$HOME/VAMP-Vault"
66
+ EOF
67
+ chmod +x "$desktop/VAMP-Vault/mount-vault.sh"
68
+ python3 - "$state" "$vc" <<'PY'
69
+ import json,sys
70
+ from pathlib import Path
71
+ state=Path(sys.argv[1]);result={'status':'configured','keepassxc_version':(state/'keepassxc-version.txt').read_text().strip(),'veracrypt_version':(state/'veracrypt-version.txt').read_text().strip(),'veracrypt_path':sys.argv[2],'native_messaging_registered':True,'browser_extension_installed':False,'passkey_login_verified':False}
72
+ (state/'result.json').write_text(json.dumps(result,indent=2)+'\n')
73
+ print(json.dumps(result))
74
+ PY
75
+ trap - 0
@@ -0,0 +1,126 @@
1
+ #!/usr/bin/env bash
2
+ # VAMP host setup for macOS.
3
+ #
4
+ # Prepares this Mac to run VAMP's VirtualBox host tools: finds a Python 3.11+
5
+ # interpreter (3.15 and newer are accepted), creates .venv-virtualbox, installs
6
+ # the host requirements, and builds the bundled VirtualBox MCP adapter.
7
+ #
8
+ # Safe to run repeatedly. It never removes VMs, disks or settings, and it does
9
+ # not install system packages or change your shell profile.
10
+ # Usage:
11
+ # scripts/macos/setup-host.sh [--python PATH] [--skip-npm]
12
+ #
13
+ # Environment:
14
+ # VAMP_PYTHON interpreter to use instead of auto-detection
15
+ set -euo pipefail
16
+
17
+ skip_npm=0
18
+ python_hint="${VAMP_PYTHON:-}"
19
+
20
+ while [ $# -gt 0 ]; do
21
+ case "$1" in
22
+ --python) [ $# -ge 2 ] || { echo 'vamp: --python needs a path' >&2; exit 2; }; python_hint="$2"; shift 2 ;;
23
+ --skip-npm) skip_npm=1; shift ;;
24
+ -h|--help) sed -n '2,14p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
25
+ *) echo "vamp: unknown option: $1" >&2; exit 2 ;;
26
+ esac
27
+ done
28
+
29
+ say() { printf 'vamp: %s\n' "$1"; }
30
+ die() { printf 'vamp: %s\n' "$1" >&2; exit 1; }
31
+
32
+ if [ "$(uname -s)" != Darwin ]; then
33
+ die "this script prepares a macOS host; on Linux use scripts/remote_host_setup.sh and on Windows use scripts/windows/setup-host.ps1"
34
+ fi
35
+
36
+ script_dir="$(cd -- "$(dirname -- "$0")" && pwd)"
37
+ root="$(cd -- "$script_dir/../.." && pwd)"
38
+ cd "$root"
39
+ [ -f backends/virtualbox/requirements.txt ] || die "run this from the VAMP checkout; backends/virtualbox/requirements.txt is missing"
40
+
41
+ # --- Python 3.11 or newer. The interpreter compares its own version tuple, so
42
+ # --- any later release (3.15, 3.16) is accepted without a version list here.
43
+ python_ok() {
44
+ [ -n "${1:-}" ] || return 1
45
+ case "$1" in
46
+ */*) [ -x "$1" ] || return 1 ;;
47
+ *) command -v "$1" >/dev/null 2>&1 || return 1 ;;
48
+ esac
49
+ "$1" -c 'import sys; raise SystemExit(0 if sys.version_info >= (3, 11) else 1)' >/dev/null 2>&1
50
+ }
51
+
52
+ python_bin=""
53
+ if [ -n "$python_hint" ]; then
54
+ python_ok "$python_hint" || die "'$python_hint' is not Python 3.11+; install Python 3.11 or newer (3.15 and newer work too) or repair that path"
55
+ python_bin="$python_hint"
56
+ else
57
+ for candidate in \
58
+ /opt/homebrew/bin/python3 \
59
+ /usr/local/bin/python3 \
60
+ /Library/Frameworks/Python.framework/Versions/3.16/bin/python3 \
61
+ /Library/Frameworks/Python.framework/Versions/3.15/bin/python3 \
62
+ /Library/Frameworks/Python.framework/Versions/3.14/bin/python3 \
63
+ /Library/Frameworks/Python.framework/Versions/3.13/bin/python3 \
64
+ /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 \
65
+ /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 \
66
+ python3.15 python3.14 python3.13 python3.12 python3.11 python3; do
67
+ if python_ok "$candidate"; then python_bin="$candidate"; break; fi
68
+ done
69
+ fi
70
+ [ -n "$python_bin" ] || die "Python 3.11 or newer is required (3.11 through 3.15+ are supported). Install it from https://www.python.org/downloads/ or 'brew install python@3.15', then run this script again."
71
+ say "using $("$python_bin" -c 'import sys; print("Python %d.%d.%d" % sys.version_info[:3])') ($python_bin)"
72
+
73
+ # --- Node.js 22+ runs the VirtualBox MCP server from the extension runtime.
74
+ if ! command -v node >/dev/null 2>&1; then
75
+ die "Node.js 22+ is required. Install it from https://nodejs.org/ or 'brew install node@22', then run this script again."
76
+ fi
77
+ node_major="$(node -p 'process.versions.node.split(".")[0]' 2>/dev/null || echo 0)"
78
+ [ "$node_major" -ge 22 ] 2>/dev/null || die "Node.js 22+ is required; found $(node --version 2>/dev/null)."
79
+ say "using Node.js $(node --version)"
80
+
81
+ # --- VirtualBox is a separate download on macOS and needs its kext approval.
82
+ vbox=""
83
+ if [ -d /Applications/VirtualBox.app ] || command -v VBoxManage >/dev/null 2>&1; then
84
+ vbox="$(command -v VBoxManage || echo /Applications/VirtualBox.app/Contents/MacOS/VBoxManage)"
85
+ say "VirtualBox found: $("$vbox" --version 2>/dev/null || echo "$vbox")"
86
+ else
87
+ say "VirtualBox was not found. Install it from https://www.virtualbox.org/wiki/Downloads and approve its kernel extension in System Settings > Privacy & Security. Remote and KVM over SSH desktops do not need it."
88
+ fi
89
+
90
+ # --- Isolated Python environment for the host tools.
91
+ if [ ! -x .venv-virtualbox/bin/python ]; then
92
+ say "creating .venv-virtualbox"
93
+ "$python_bin" -m venv .venv-virtualbox
94
+ else
95
+ say "reusing .venv-virtualbox"
96
+ fi
97
+ say "installing backends/virtualbox/requirements.txt"
98
+ .venv-virtualbox/bin/python -m pip install --disable-pip-version-check --upgrade pip >/dev/null
99
+ .venv-virtualbox/bin/python -m pip install --disable-pip-version-check -r backends/virtualbox/requirements.txt
100
+
101
+ if [ "$skip_npm" = "0" ]; then
102
+ if command -v npm >/dev/null 2>&1; then
103
+ say "building the VirtualBox MCP adapter"
104
+ ( cd third_party/mcp-virtualbox && npm ci --ignore-scripts && npm run build )
105
+ else
106
+ say "npm is missing; skipped the adapter build. The VS Code extension ships it already."
107
+ fi
108
+ fi
109
+
110
+ cat <<EOF
111
+
112
+ vamp: host environment ready.
113
+ python $root/.venv-virtualbox/bin/python
114
+ VBoxManage ${vbox:-not installed}
115
+
116
+ Next, for a terminal session:
117
+ export RPA_HOST_PYTHON="$root/.venv-virtualbox/bin/python"
118
+ export PYTHON_PATH="$root/.venv-virtualbox/bin/python"
119
+ export VBOXMANAGE_PATH="${vbox:-/Applications/VirtualBox.app/Contents/MacOS/VBoxManage}"
120
+ "$root/.venv-virtualbox/bin/python" -c "import mcp, robot, asyncvnc"
121
+ "$root/.venv-virtualbox/bin/python" scripts/windows/host-smoke.py # needs VirtualBox
122
+
123
+ The VirtualBox mouse SDK is separate: on Apple silicon, mouse replay needs a
124
+ Python build and vboxapi matching your VirtualBox version. Set VAMP: Mouse
125
+ Python Executable when the SDK lives in another interpreter.
126
+ EOF
@@ -71,10 +71,13 @@ fi
71
71
  python_bin="${VAMP_REMOTE_PYTHON:-python3}"
72
72
  if have "$python_bin"; then
73
73
  python_version="$("$python_bin" -c 'import sys;print("%d.%d.%d"%sys.version_info[:3])' 2>/dev/null)"
74
- case "$python_version" in
75
- 3.11.*|3.12.*|3.13.*|3.14.*|4.*) add_step python "Python 3.11+" ok "$python_bin -V" "$python_version" ;;
76
- *) add_step python "Python 3.11+" needs_manual "$python_bin -V" "found $python_version; install 3.11 or newer" ;;
77
- esac
74
+ # Compare the interpreter's own version tuple so any future release (3.15, 3.16,
75
+ # 4.x) passes without a hardcoded version list to maintain.
76
+ if "$python_bin" -c 'import sys; sys.exit(0 if sys.version_info >= (3, 11) else 1)' >/dev/null 2>&1; then
77
+ add_step python "Python 3.11+ (supports 3.15+)" ok "$python_bin -V" "${python_version:-unknown}"
78
+ else
79
+ add_step python "Python 3.11+" needs_manual "$python_bin -V" "found ${python_version:-unknown}; install 3.11 or newer"
80
+ fi
78
81
  if [ "$dry_run" = "0" ] && [ ! -x "$workdir/venv/bin/python" ]; then
79
82
  say "creating Python virtual environment"
80
83
  if "$python_bin" -m venv "$workdir/venv" >/dev/null 2>&1; then