Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(install): need neither Python nor Git before the one-line installer (#818)

Ruben Lütke9797d1b915dc
diff --git a/README.md b/README.md
index 4f38b4787d..7e99d81f0b 100644
--- a/README.md
+++ b/README.md
@@ -52,9 +52,11 @@ irm https://raw.githubusercontent.com/Dodaios/Dodaios/main/install/install.ps1 |
curl -fsSL https://raw.githubusercontent.com/Dodaios/Dodaios/main/install/install.sh | bash
```
-The installer checks for Python 3.11 or newer and Git, offers to install
-whatever is missing, adds the desktop launcher and opens the app. If you run it
-again, it updates your existing installation. You choose your language, wake
+You do not need to install anything first. If Python is missing, the
+installer downloads a private copy just for Dodaios, and on Windows it does the
+same for Git, without administrator rights or questions. It then adds the
+desktop launcher and opens the app. If you run it again, it updates your
+existing installation. You choose your language, wake
phrase and models inside the app.
You need one API key, a subscription or a local model. A microphone helps for
@@ -213,7 +215,7 @@ on macOS 15, go to **System Settings > Privacy & Security** and click **Open
Anyway**. Up to macOS 14, right-click the app and choose **Open**. The one-line
installer above does not need this step.
-To run Dodaios on a server, use `pip install personal-jarvis` and `jarvis serve`,
+To run Dodaios on a server, use `pip install dodaios` and `dodaios serve`,
then open `http://localhost:47821` in a browser. Using a microphone from another
computer needs HTTPS. The [headless deployment guide](https://github.com/Dodaios/Dodaios/blob/main/docs/headless-vps-deployment.md)
explains the setup. If you install with pip or pipx by hand on an Intel Mac or
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 58b6daa831..608bb74a65 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -52,7 +52,7 @@ irm https://raw.githubusercontent.com/Dodaios/Dodaios/main/install/install.ps1 |
curl -fsSL https://raw.githubusercontent.com/Dodaios/Dodaios/main/install/install.sh | bash
```
-安装程序会检查 Python 3.11+ 和 Git,提示安装缺少的组件,注册桌面启动器并打开应用。
+无需预先安装任何东西。如果缺少 Python,安装程序会为 Dodaios 单独下载一份私有副本;在 Windows 上 Git 也是如此,不需要管理员权限,也不会询问。随后它会注册桌面启动器并打开应用。
再次运行即可更新现有安装。语言、唤醒词和模型都在应用内设置。
**你需要**一个 API 密钥、一个订阅或一个本地模型。使用语音时最好有麦克风。不需要 GPU。
diff --git a/docs/product/start-here/install-dodaios.md b/docs/product/start-here/install-dodaios.md
index 34a51e1665..424b98a255 100644
--- a/docs/product/start-here/install-dodaios.md
+++ b/docs/product/start-here/install-dodaios.md
@@ -65,8 +65,9 @@ manual installs do not show the in-app update button.
irm https://raw.githubusercontent.com/Dodaios/Dodaios/main/install/install.ps1 | iex
```
-3. Approve any offer to add Python or Git. The installer checks again and
- continues in the same run.
+3. Nothing to approve: if Python or Git is missing, the installer downloads
+ a private copy for Dodaios into `%LOCALAPPDATA%\Dodaios\tools`, without
+ administrator rights. It offers WinGet only if that download fails.
4. Keep PowerShell open until the installer reports that the app is ready.
The app opens and becomes available through Windows Search.
@@ -83,8 +84,9 @@ manual installs do not show the in-app update button.
curl -fsSL https://raw.githubusercontent.com/Dodaios/Dodaios/main/install/install.sh | bash -s -- --headless
```
-3. Confirm the installation and review any prerequisite or Linux desktop-
- package prompt.
+3. Confirm the installation. A missing Python is downloaded as a private
+ copy without a prompt; a missing Git or Linux desktop package is offered
+ through your package manager.
4. Wait for all six phases. Desktop installs open from Spotlight or the Linux
application menu. Headless installs print a local browser address.
@@ -164,8 +166,10 @@ For other installation types:
## How It Fits Together
-1. **The installer checks the host.** It finds Python and Git, detects a Linux
- display, and asks before adding missing tools.
+1. **The installer checks the host.** It uses the Python and Git already
+ installed and fetches a private copy of whichever is missing (on macOS and
+ Linux, Git comes from the package manager after asking). It also detects a
+ Linux display.
2. **The profile prepares the right surface.** Full adds desktop and supported
local components; headless keeps the smaller server. Incompatible native
parts are skipped while the rest remains available.
diff --git a/dodaios/cli/app_update.py b/dodaios/cli/app_update.py
index 1947069576..21a122b27c 100644
--- a/dodaios/cli/app_update.py
+++ b/dodaios/cli/app_update.py
@@ -219,7 +219,8 @@ def _not_updatable_message() -> str:
"This copy of Dodaios cannot update itself: it was not installed\n"
"with the one-line installer (it is a developer checkout or a pip install).\n"
" Developer checkout: git pull\n"
- " pip install: pip install --upgrade personal-jarvis\n"
+ " pip install: pip install --upgrade dodaios\n"
+ " uv tool install: uv tool upgrade dodaios\n"
f" Or install the managed version: {one_liner}"
)
diff --git a/dodaios/core/path_augment.py b/dodaios/core/path_augment.py
index 905d32b0ac..377f415a79 100644
--- a/dodaios/core/path_augment.py
+++ b/dodaios/core/path_augment.py
@@ -140,6 +140,10 @@ def _windows_candidates() -> list[str]:
dirs.append(str(home / ".grok" / "bin"))
if local:
dirs.append(os.path.join(local, "grok", "bin"))
+ # The one-line installer (install/install.ps1) puts a private MinGit
+ # here on a machine without Git. The in-app updater and the Git panel
+ # need it, and it is never on any PATH. Last, so a user's own Git wins.
+ dirs.append(os.path.join(local, "Dodaios", "tools", "git", "cmd"))
return dirs
diff --git a/install/install.ps1 b/install/install.ps1
index de650200d1..a476c6207f 100644
--- a/install/install.ps1
+++ b/install/install.ps1
@@ -4,8 +4,10 @@
# irm https://raw.githubusercontent.com/Dodaios/Dodaios/main/install/install.ps1 | iex
#
# This bootstrap is intentionally small. It:
-# 1. Verifies Python 3.11+ and git are available.
-# 2. Offers to install either missing prerequisite, then re-checks in place.
+# 1. Uses Python 3.11+ and git when they are installed.
+# 2. Otherwise fetches private, checksum-pinned copies (uv-managed Python,
+# MinGit) into %LOCALAPPDATA%\Dodaios\tools - no admin rights, no
+# prompt - and offers WinGet only when that download fails.
# 3. Checks for Node.js 18+ (optional - a missing Node never blocks the install).
# 4. Clones (or updates) Dodaios into ~\.dodaios (an update moves an install
# made under the earlier name ~\.personal-jarvis there).
@@ -303,6 +305,132 @@ function Test-PythonCandidate {
}
}
+# Private copies of Python and Git for a machine that has neither. They land in
+# %LOCALAPPDATA%\Dodaios\tools without administrator rights or a prompt, and
+# nothing is added to the user's PATH or registry: this installer and the app
+# (dodaios/core/path_augment.py) look in that folder themselves. Every download
+# is pinned to a version and checked against its SHA-256 before it is used.
+$BundledUvVersion = '0.12.23'
+$BundledUvSha256 = @{
+ 'x86_64' = '75d05de6762778c31ee183398de7dd15093fad0ed90b1f236d8205ea5ec00c90'
+ 'aarch64' = '13294e232ececbe709c06b74e6ced06f2a225ea5591476685362f22be56a50d5'
+}
+$BundledPythonVersion = '3.12'
+$BundledGitTag = 'v2.56.0.windows.2'
+$BundledGitZip = @{
+ 'x86_64' = @{ Name = 'MinGit-2.56.0.2-64-bit.zip'; Sha256 = 'da35e72aa21c005a5a0d298cfbae110bc1609a815730ea0dde84b01a1b3cd3be' }
+ 'aarch64' = @{ Name = 'MinGit-2.56.0.2-arm64.zip'; Sha256 = '38b33dc6024026e3315cf88ab2cfea65205bbd7bb3a8e824bd21c8ad4fe609a7' }
+}
+
+function Get-BundledToolsDir {
+ if (-not $env:LOCALAPPDATA) { return $null }
+ return (Join-Path $env:LOCALAPPDATA 'Dodaios\tools')
+}
+
+function Get-BundledArch {
+ $arch = $env:PROCESSOR_ARCHITEW6432
+ if (-not $arch) { $arch = $env:PROCESSOR_ARCHITECTURE }
+ switch ($arch) {
+ 'AMD64' { return 'x86_64' }
+ 'ARM64' { return 'aarch64' }
+ default { return $null }
+ }
+}
+
+function Save-VerifiedDownload {
+ param([string]$Url, [string]$Sha256, [string]$Path)
+ try {
+ try {
+ [Net.ServicePointManager]::SecurityProtocol = `
+ [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
+ } catch {}
+ $previous = $ProgressPreference
+ $ProgressPreference = 'SilentlyContinue'
+ try {
+ Invoke-WebRequest -Uri $Url -OutFile $Path -UseBasicParsing
+ } finally {
+ $ProgressPreference = $previous
+ }
+ $actual = (Get-FileHash -Algorithm SHA256 -LiteralPath $Path).Hash
+ if ($actual -ne $Sha256) {
+ Write-Err "checksum mismatch for $Url - the download was discarded."
+ Remove-Item -LiteralPath $Path -Force -ErrorAction SilentlyContinue
+ return $false
+ }
+ return $true
+ } catch {
+ Write-Err "download failed: $Url ($($_.Exception.Message))"
+ return $false
+ }
+}
+
+function Expand-BundledZip {
+ param([string]$Url, [string]$Sha256, [string]$Destination)
+ $zip = Join-Path ([IO.Path]::GetTempPath()) ('dodaios-' + [Guid]::NewGuid().ToString('N') + '.zip')
+ try {
+ if (-not (Save-VerifiedDownload $Url $Sha256 $zip)) { return $false }
+ $staging = "$Destination.partial"
+ Remove-Item -LiteralPath $staging -Recurse -Force -ErrorAction SilentlyContinue
+ Expand-Archive -LiteralPath $zip -DestinationPath $staging -Force
+ Remove-Item -LiteralPath $Destination -Recurse -Force -ErrorAction SilentlyContinue
+ Move-Item -LiteralPath $staging -Destination $Destination
+ return $true
+ } catch {
+ Write-Err "could not unpack $Url ($($_.Exception.Message))"
+ return $false
+ } finally {
+ Remove-Item -LiteralPath $zip -Force -ErrorAction SilentlyContinue
+ }
+}
+
+function Install-BundledPython {
+ $toolsDir = Get-BundledToolsDir
+ $arch = Get-BundledArch
+ if (-not $toolsDir -or -not $arch) { return $false }
+ $uvDir = Join-Path $toolsDir 'uv'
+ $uvExe = Join-Path $uvDir 'uv.exe'
+ if (-not (Test-Path -LiteralPath $uvExe)) {
+ Write-Note "downloading the uv Python manager $BundledUvVersion"
+ $url = "https://github.com/astral-sh/uv/releases/download/$BundledUvVersion/uv-$arch-pc-windows-msvc.zip"
+ if (-not (Expand-BundledZip $url $BundledUvSha256[$arch] $uvDir)) { return $false }
+ }
+ Write-Note "downloading Python $BundledPythonVersion (about 30 MB, only for Dodaios)"
+ $uvOutput = & $uvExe python install $BundledPythonVersion --install-dir (Join-Path $toolsDir 'python') `
+ --no-bin --no-registry --quiet 2>&1
+ $uvCode = $LASTEXITCODE
+ if ($uvCode -ne 0) {
+ Write-Err "Python $BundledPythonVersion could not be downloaded (uv exit $uvCode)."
+ @($uvOutput | Select-Object -Last 8) | ForEach-Object { Write-Note ([string]$_) }
+ return $false
+ }
+ Write-Ok "Python $BundledPythonVersion ready (private copy for Dodaios)"
+ return $true
+}
+
+function Install-BundledGit {
+ $toolsDir = Get-BundledToolsDir
+ $arch = Get-BundledArch
+ if (-not $toolsDir -or -not $arch) { return $false }
+ $asset = $BundledGitZip[$arch]
+ Write-Note 'downloading Git (about 40 MB, only for Dodaios)'
+ $url = "https://github.com/git-for-windows/git/releases/download/$BundledGitTag/$($asset.Name)"
+ if (-not (Expand-BundledZip $url $asset.Sha256 (Join-Path $toolsDir 'git'))) { return $false }
+ Write-Ok 'Git ready (private copy for Dodaios)'
+ return $true
+}
+
+function Install-BundledPrerequisites {
+ param($State)
+ $allOk = $true
+ if (-not $State.Python.Found) {
+ if (-not (Install-BundledPython)) { $allOk = $false }
+ }
+ if (-not $State.GitFound) {
+ if (-not (Install-BundledGit)) { $allOk = $false }
+ }
+ return $allOk
+}
+
function Find-CompatiblePython {
$candidates = @()
if ($env:JARVIS_PYTHON) {
@@ -318,6 +446,11 @@ function Find-CompatiblePython {
if ($env:ProgramFiles) {
$patterns += Join-Path $env:ProgramFiles 'Python*\python.exe'
}
+ $toolsDir = Get-BundledToolsDir
+ if ($toolsDir) {
+ # The private copy Install-BundledPython fetched on an earlier run.
+ $patterns += Join-Path $toolsDir 'python\cpython-3.*\python.exe'
+ }
foreach ($pattern in $patterns) {
$candidates += @(Get-ChildItem -Path $pattern -File -ErrorAction SilentlyContinue |
Sort-Object FullName -Descending | Select-Object -ExpandProperty FullName)
@@ -441,6 +574,10 @@ function Refresh-ProcessPath {
if ($env:LOCALAPPDATA) {
$commonGitPaths += Join-Path $env:LOCALAPPDATA 'Programs\Git\cmd'
}
+ $toolsDir = Get-BundledToolsDir
+ if ($toolsDir) {
+ $commonGitPaths += Join-Path $toolsDir 'git\cmd'
+ }
$commonGitPaths = @($commonGitPaths | Where-Object { Test-Path $_ })
$env:Path = ((@($InitialPath, $userPath, $machinePath) + $commonGitPaths |
Where-Object { $_ }) -join ';')
@@ -516,6 +653,19 @@ function Ensure-Prerequisites {
return $null
}
+ # A private copy needs no administrator rights and changes nothing outside
+ # the Dodaios folder, so it is fetched without asking. WinGet and the
+ # consent prompt below stay the fallback when that download fails.
+ if ($PrerequisiteMode -ne 'never') {
+ if (Install-BundledPrerequisites $state) {
+ $state = Wait-ForPrerequisites -Seconds 2
+ if ($state.Ready) {
+ Write-PrerequisiteState $state
+ return $state
+ }
+ }
+ }
+
$missing = @(Get-MissingPrerequisiteLabels $state)
if (-not (Request-PrerequisiteConsent $missing)) {
Write-ManualPrerequisiteHelp $state
diff --git a/install/install.sh b/install/install.sh
index e981e5996a..ffe30bb2f0 100755
--- a/install/install.sh
+++ b/install/install.sh
@@ -5,8 +5,10 @@
# curl -fsSL https://raw.githubusercontent.com/Dodaios/Dodaios/main/install/install.sh | bash
#
# This bootstrap is intentionally small. It:
-# 1. Verifies Python 3.11+ and git are available.
-# 2. Offers to install either missing prerequisite, then re-checks in place.
+# 1. Uses Python 3.11+ and git when they are installed. A missing Python
+# is fetched as a self-contained per-user copy via uv (no sudo, no
+# prompt).
+# 2. Offers to install a missing git, then re-checks in place.
# 3. Checks for Node.js 18+ (optional - a missing Node never blocks the install).
# 4. Clones (or updates) Dodaios into ~/.dodaios (an update moves an install
# made under the earlier name ~/.personal-jarvis there).
@@ -397,6 +399,7 @@ git_available() {
# fetch a self-contained CPython 3.13 via uv (per-user, no sudo) and use it
# for the venv — the speech pack then installs during THIS run.
_PY_BOOTSTRAP_TRIED=0
+_PY_BOOTSTRAPPED=""
_bootstrap_target_version() {
# Intel Macs: the native voice stack's last x86_64 wheels end at cp312
@@ -426,6 +429,10 @@ _py_full_support() {
bootstrap_full_support_python() {
[ -n "${JARVIS_NO_PYTHON_BOOTSTRAP:-}" ] && return 1
+ if [ -n "$_PY_BOOTSTRAPPED" ]; then
+ PYTHON_EXE="$_PY_BOOTSTRAPPED"
+ return 0
+ fi
[ "$_PY_BOOTSTRAP_TRIED" -eq 1 ] && return 1
_PY_BOOTSTRAP_TRIED=1
_uv=$(command -v uv 2>/dev/null || true)
@@ -443,12 +450,28 @@ bootstrap_full_support_python() {
_bp=$("$_uv" python find "$_target" 2>/dev/null) || return 1
[ -x "$_bp" ] || return 1
PYTHON_EXE="$_bp"
+ _PY_BOOTSTRAPPED="$_bp"
return 0
}
refresh_prerequisite_state() {
PYTHON_EXE=""
if find_python; then PYTHON_READY=1; else PYTHON_READY=0; fi
+ # No Python at all: fetch the same per-user copy instead of asking for a
+ # system package. It needs no sudo and changes nothing outside the user's
+ # own folders, so there is nothing to ask about. The package-manager
+ # prompt below stays the fallback when this download fails.
+ if [ "$PYTHON_READY" -eq 0 ] && [ -z "${JARVIS_PYTHON:-}" ] \
+ && [ "${PREREQUISITE_MODE:-ask}" != 'never' ]; then
+ _first_fetch=0
+ [ -z "$_PY_BOOTSTRAPPED" ] && _first_fetch=1
+ if bootstrap_full_support_python; then
+ PYTHON_READY=1
+ if [ "$_first_fetch" -eq 1 ]; then
+ ok "fetched self-contained Python $(_bootstrap_target_version) (per-user, no sudo)"
+ fi
+ fi
+ fi
# An explicit JARVIS_PYTHON pin is authoritative — never substituted.
if [ "$PYTHON_READY" -eq 1 ] && [ -z "${JARVIS_PYTHON:-}" ] \
&& ! _py_full_support "$PYTHON_EXE"; then
diff --git a/install/uninstall.ps1 b/install/uninstall.ps1
index f6c089ffea..49ee41e500 100644
--- a/install/uninstall.ps1
+++ b/install/uninstall.ps1
@@ -230,5 +230,18 @@ if (-not $DryRun) {
}
# --- uninstall-remove end
Write-Ok "Removed $RealInstallDir"
+ # The private Python and Git copies install.ps1 fetched on a machine that
+ # had neither. Only the venv just deleted used them.
+ if ($env:LOCALAPPDATA) {
+ $BundledTools = Join-Path $env:LOCALAPPDATA 'Dodaios\tools'
+ if (Test-Path -LiteralPath $BundledTools) {
+ try {
+ Remove-Item -LiteralPath $BundledTools -Recurse -Force -ErrorAction Stop
+ Write-Ok "Removed $BundledTools"
+ } catch {
+ Write-Note "Could not remove $BundledTools - delete it yourself."
+ }
+ }
+ }
Write-Step 'Done. Dodaios has been uninstalled.'
}
diff --git a/tests/unit/core/test_path_augment.py b/tests/unit/core/test_path_augment.py
index 1e99fe378f..e05470ac86 100644
--- a/tests/unit/core/test_path_augment.py
+++ b/tests/unit/core/test_path_augment.py
@@ -89,6 +89,18 @@ def test_windows_candidates_cover_official_antigravity_installer(
assert str(local / "agy" / "bin") in dirs
+def test_windows_candidates_find_the_installers_private_git_last(tmp_path, monkeypatch):
+ """install.ps1 puts MinGit here on a machine without Git; the updater needs it."""
+ local = tmp_path / "LocalAppData"
+ monkeypatch.setenv("LOCALAPPDATA", str(local))
+
+ dirs = path_augment._windows_candidates()
+
+ private_git = str(local / "Dodaios" / "tools" / "git" / "cmd")
+ assert private_git in dirs
+ assert dirs[-1] == private_git
+
+
def test_windows_candidates_refresh_node_installer_paths(tmp_path, monkeypatch):
"""A GUI already running during Node installation must find the runtime.
diff --git a/tests/unit/install/test_prerequisite_bootstrap.py b/tests/unit/install/test_prerequisite_bootstrap.py
index 7720dc3250..b37cd1015a 100644
--- a/tests/unit/install/test_prerequisite_bootstrap.py
+++ b/tests/unit/install/test_prerequisite_bootstrap.py
@@ -54,7 +54,7 @@ BASH = _find_bash()
def _run_powershell_flow(
- tmp_path: Path, *, powershell: str, initially_ready: bool
+ tmp_path: Path, *, powershell: str, initially_ready: bool, bundled_ok: bool = False
) -> str:
driver = r"""
$ErrorActionPreference = 'Stop'
@@ -106,17 +106,31 @@ function Invoke-MissingPrerequisiteInstall {
return $true
}
-function Wait-ForPrerequisites { return Get-PrerequisiteState }
+$script:BundledCalls = 0
+function Install-BundledPrerequisites {
+ param($State)
+ $script:BundledCalls += 1
+ if (__BUNDLED_OK__) {
+ $script:InitiallyReady = $true
+ return $true
+ }
+ return $false
+}
+function Request-PrerequisiteConsent { param([string[]]$Missing) return $true }
+
+function Wait-ForPrerequisites { param([int]$Seconds = 10) return Get-PrerequisiteState }
function Refresh-ProcessPath { }
$result = Ensure-Prerequisites
if ($null -eq $result) { throw 'flow did not return a ready state' }
$summary = "READY=$($result.Ready);INSTALLS=$script:InstallCalls"
-$summary += ";ITEMS=$script:Installed;STATES=$script:StateCalls"
+$summary += ";ITEMS=$script:Installed;STATES=$script:StateCalls;BUNDLED=$script:BundledCalls"
Write-Output $summary
"""
- driver = driver.replace("__BLOCK__", _block(INSTALL_PS1)).replace(
- "__INITIAL_READY__", "$true" if initially_ready else "$false"
+ driver = (
+ driver.replace("__BLOCK__", _block(INSTALL_PS1))
+ .replace("__INITIAL_READY__", "$true" if initially_ready else "$false")
+ .replace("__BUNDLED_OK__", "$true" if bundled_ok else "$false")
)
path = tmp_path / "driver.ps1"
path.write_text(driver, encoding="utf-8")
@@ -210,9 +224,39 @@ def test_powershell_rechecks_and_continues_in_same_process(
tmp_path, powershell=powershell, initially_ready=initially_ready
)
if initially_ready:
- assert out == "READY=True;INSTALLS=0;ITEMS=;STATES=1"
+ assert out == "READY=True;INSTALLS=0;ITEMS=;STATES=1;BUNDLED=0"
else:
- assert out == "READY=True;INSTALLS=1;ITEMS=python,git;STATES=2"
+ # The private-copy download failed (offline), so WinGet takes over.
+ assert out == "READY=True;INSTALLS=1;ITEMS=python,git;STATES=2;BUNDLED=1"
+
+
[email protected]("powershell", POWERSHELLS or (None,))
+def test_powershell_fetches_private_copies_without_asking_or_winget(
+ tmp_path: Path, powershell: str | None
+) -> None:
+ """A machine with neither Python nor Git needs no prompt and no WinGet."""
+ if powershell is None:
+ pytest.skip("PowerShell is not available")
+ out = _run_powershell_flow(
+ tmp_path, powershell=powershell, initially_ready=False, bundled_ok=True
+ )
+ assert out == "READY=True;INSTALLS=0;ITEMS=;STATES=2;BUNDLED=1"
+
+
+def test_windows_private_copies_are_pinned_and_checksum_verified() -> None:
+ block = _block(INSTALL_PS1)
+ assert "$BundledUvVersion = '" in block
+ assert "github.com/astral-sh/uv/releases/download/$BundledUvVersion/" in block
+ assert "github.com/git-for-windows/git/releases/download/$BundledGitTag/" in block
+ assert "Get-FileHash -Algorithm SHA256" in block
+ # Nothing outside Dodaios's own folder: no PATH shims, no registry entries.
+ assert "--no-bin --no-registry" in block
+ assert "'Dodaios\\tools'" in block
+ # The private copies come before the WinGet consent prompt.
+ ensure = block[block.index("function Ensure-Prerequisites") :]
+ assert ensure.index("Install-BundledPrerequisites") < ensure.index(
+ "Request-PrerequisiteConsent"
+ )
@pytest.mark.parametrize("powershell", POWERSHELLS or (None,))
@@ -290,6 +334,51 @@ def test_posix_rechecks_and_continues_in_same_process(
assert out == "READY=1;INSTALLS=1;ITEMS=python,git;STATES=2"
[email protected](BASH is None, reason="Bash is not available")
+def test_posix_fetches_a_private_python_without_asking(tmp_path: Path) -> None:
+ """No Python on the machine: the per-user uv copy is used, no prompt, no sudo."""
+ driver = r"""#!/usr/bin/env bash
+set -euo pipefail
+PREREQUISITE_MODE=ask
+unset JARVIS_PYTHON || true
+FOUND_TOO_OLD=''
+PYTHON_EXE=''
+note() { :; }
+ok() { :; }
+err() { :; }
+find_python() { return 1; }
+
+__BLOCK__
+
+FETCHES=0
+CONSENT=0
+git_available() { return 0; }
+write_prerequisite_state() { :; }
+request_prerequisite_consent() { CONSENT=$((CONSENT + 1)); return 1; }
+_bootstrap_target_version() { printf '3.13'; }
+bootstrap_full_support_python() {
+ if [ -n "$_PY_BOOTSTRAPPED" ]; then PYTHON_EXE="$_PY_BOOTSTRAPPED"; return 0; fi
+ FETCHES=$((FETCHES + 1))
+ _PY_BOOTSTRAPPED=/private/python3.13
+ PYTHON_EXE="$_PY_BOOTSTRAPPED"
+ return 0
+}
+
+ensure_prerequisites
+refresh_prerequisite_state
+printf 'READY=%s;PY=%s;FETCHES=%s;CONSENT=%s\n' \
+ "$PREREQUISITES_READY" "$PYTHON_EXE" "$FETCHES" "$CONSENT"
+""".replace("__BLOCK__", _block(INSTALL_SH))
+ path = tmp_path / "private-python.sh"
+ path.write_text(driver, encoding="utf-8", newline="\n")
+ result = subprocess.run(
+ [BASH, str(path)], capture_output=True, text=True, timeout=30
+ )
+ assert result.returncode == 0, result.stderr or result.stdout
+ # A second check reuses the copy instead of losing it or fetching again.
+ assert result.stdout.strip() == "READY=1;PY=/private/python3.13;FETCHES=1;CONSENT=0"
+
+
def test_windows_uses_exact_trusted_package_ids_and_refreshes_path() -> None:
source = INSTALL_PS1.read_text(encoding="utf-8")
assert "Invoke-PrerequisitePackage 'Python.Python.3.12'" in source