Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
feat(show): consume prebuilt runtime archives
cyhc2fde9aebbf4
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymlindex 61c82a3bf..9c77eddb8 100644--- a/.github/workflows/publish.yml+++ b/.github/workflows/publish.yml@@ -15,7 +15,35 @@ permissions:contents: readjobs:+ show-runtime-bundles:+ runs-on: ${{ matrix.os }}+ strategy:+ matrix:+ os: [ubuntu-latest, macos-14, windows-latest]+ steps:+ - name: Checkout Show Runtime+ uses: actions/checkout@v5+ with:+ repository: avibe-bot/vibe-show-runtime+ ref: main+ - name: Setup Node.js+ uses: actions/setup-node@v5+ with:+ node-version: "22.14.0"+ cache: "npm"+ - name: Build Show Runtime bundle+ run: |+ npm ci+ npm run build+ npm run bundle:vibe-remote+ - name: Upload Show Runtime bundle+ uses: actions/upload-artifact@v6+ with:+ name: show-runtime-${{ matrix.os }}+ path: dist/vibe-show-runtime-node-*.tgz+build:+ needs: show-runtime-bundlesruns-on: ubuntu-lateststeps:- name: Checkout@@ -36,6 +64,13 @@ jobs:npm cinpm run build+ - name: Download Show Runtime bundles+ uses: actions/download-artifact@v6+ with:+ pattern: show-runtime-*+ path: vibe/show_runtime+ merge-multiple: true+- name: Setup Pythonuses: actions/setup-python@v6with:diff --git a/.gitignore b/.gitignoreindex f0627ac0b..a7d06cd18 100644--- a/.gitignore+++ b/.gitignore@@ -155,6 +155,7 @@ logs/ui/node_modules/ui/dist/ui/.vite/+vibe/show_runtime/*.tgztmp/.bot.piduser_settings.jsondiff --git a/core/show_runtime.py b/core/show_runtime.pyindex 039316d2d..8d355b0a3 100644--- a/core/show_runtime.py+++ b/core/show_runtime.py@@ -2,14 +2,19 @@ from __future__ import annotationsimport atexitimport asyncio+import importlib.resources as package_resourcesimport loggingimport osimport shleximport shutilimport signalimport subprocess+import tarfile+import tempfile+import urllib.requestfrom dataclasses import dataclassfrom pathlib import Path+from sysconfig import get_platformfrom typing import Anyimport httpx@@ -21,8 +26,11 @@ from core.process_isolation import KILL_SIGNAL, isolated_subprocess_kwargs, signlogger = logging.getLogger(__name__)_RUNTIME_BIN = "avibe-show-runtime"_RUNTIME_PACKAGE = "@avibe/show-runtime"+_RUNTIME_ARCHIVE_PREFIX = "vibe-show-runtime-node"+_RUNTIME_ARCHIVE_RELEASE_BASE_URL = "https://github.com/avibe-bot/vibe-show-runtime/releases/latest/download"_RUNTIME_GITHUB_REPO = "https://github.com/avibe-bot/vibe-show-runtime.git"_RUNTIME_GITHUB_REF = "main"+_RUNTIME_SOURCE_ARCHIVE = "archive"_RUNTIME_SOURCE_GITHUB = "github"_RUNTIME_SOURCE_NPM = "npm"_FALSE_VALUES = {"0", "false", "no", "off"}@@ -45,6 +53,8 @@ class ShowRuntimeManager:auto_install: bool | None = None,package_spec: str | None = None,runtime_source: str | None = None,+ archive_path: Path | str | None = None,+ archive_url: str | None = None,github_repo: str | None = None,github_ref: str | None = None,) -> None:@@ -54,6 +64,12 @@ class ShowRuntimeManager:self.auto_install = _auto_install_enabled() if auto_install is None else auto_installself.package_spec = package_spec or os.environ.get("VIBE_SHOW_RUNTIME_PACKAGE_SPEC") or _RUNTIME_PACKAGEself.runtime_source = _normalize_runtime_source(runtime_source or os.environ.get("VIBE_SHOW_RUNTIME_SOURCE"))+ archive_path_value = archive_path or os.environ.get("VIBE_SHOW_RUNTIME_ARCHIVE_PATH")+ self.archive_path = Path(archive_path_value).expanduser() if archive_path_value else None+ self.archive_url = archive_url if archive_url is not None else os.environ.get(+ "VIBE_SHOW_RUNTIME_ARCHIVE_URL",+ _default_runtime_archive_url(),+ )self.github_repo = github_repo or os.environ.get("VIBE_SHOW_RUNTIME_GITHUB_REPO") or _RUNTIME_GITHUB_REPOself.github_ref = github_ref or os.environ.get("VIBE_SHOW_RUNTIME_GITHUB_REF") or _RUNTIME_GITHUB_REFself.stdout_path = self.runtime_dir / "stdout.log"@@ -165,12 +181,20 @@ class ShowRuntimeManager:if self.command != _RUNTIME_BIN:self._install_reason = "runtime_command_missing"return None- managed = self._managed_bin_path()- resolved = _resolve_executable_path(managed)- if resolved:- return [resolved]- if self._managed_command:- return self._managed_command+ if self.runtime_source == _RUNTIME_SOURCE_ARCHIVE:+ command = self._installed_archive_runtime_command()+ if command:+ self._managed_command = command+ return command+ if self._managed_command:+ return self._managed_command+ else:+ managed = self._managed_bin_path()+ resolved = _resolve_executable_path(managed)+ if resolved:+ return [resolved]+ if self._managed_command:+ return self._managed_commandif self.runtime_source == _RUNTIME_SOURCE_GITHUB:command = self._installed_github_runtime_command()if command:@@ -188,6 +212,8 @@ class ShowRuntimeManager:return commanddef _install_managed_runtime(self) -> list[str] | None:+ if self.runtime_source == _RUNTIME_SOURCE_ARCHIVE:+ return self._install_archive_runtime()if self.runtime_source == _RUNTIME_SOURCE_GITHUB:return self._install_github_runtime()if self.runtime_source == _RUNTIME_SOURCE_NPM:@@ -195,14 +221,107 @@ class ShowRuntimeManager:self._install_reason = "runtime_source_unsupported"return None+ def _installed_archive_runtime_command(self) -> list[str] | None:+ node = _resolve_node_command()+ if not node:+ return None+ return self._archive_runtime_command(self._archive_install_dir(), node)++ def _install_archive_runtime(self) -> list[str] | None:+ node = _resolve_node_command()+ if not node:+ self._install_reason = "runtime_node_missing"+ return None+ self.runtime_dir.mkdir(parents=True, exist_ok=True)+ install_dir = self._archive_install_dir()+ existing_command = self._archive_runtime_command(install_dir, node)+ archive = self._resolve_prebuilt_archive()+ if not archive:+ return self._reuse_existing_archive_runtime(existing_command)+ tmp_dir = Path(tempfile.mkdtemp(prefix="prebuilt-", dir=self.runtime_dir))+ try:+ with tarfile.open(archive, "r:gz") as tar:+ _safe_extract_tar(tar, tmp_dir)+ command = self._archive_runtime_command(tmp_dir, node)+ if not command:+ self._install_reason = "runtime_install_missing_bin"+ return self._reuse_existing_archive_runtime(existing_command)+ if install_dir.exists():+ shutil.rmtree(install_dir)+ install_dir.parent.mkdir(parents=True, exist_ok=True)+ shutil.move(str(tmp_dir), str(install_dir))+ self._install_reason = None+ return self._archive_runtime_command(install_dir, node)+ except Exception:+ logger.exception("Failed to install prebuilt Show Runtime")+ self._install_reason = "runtime_install_failed"+ return self._reuse_existing_archive_runtime(existing_command)+ finally:+ if tmp_dir.exists():+ shutil.rmtree(tmp_dir, ignore_errors=True)++ def _resolve_prebuilt_archive(self) -> Path | None:+ if self.archive_path:+ if self.archive_path.exists():+ return self.archive_path+ self._install_reason = "runtime_archive_missing"+ return None+ packaged = self._copy_packaged_runtime_archive()+ if packaged:+ return packaged+ if not self.archive_url:+ self._install_reason = "runtime_archive_missing"+ return None+ return self._download_runtime_archive(self.archive_url)++ def _copy_packaged_runtime_archive(self) -> Path | None:+ try:+ resource = package_resources.files("vibe").joinpath("show_runtime", _runtime_archive_name())+ except Exception:+ return None+ if not resource.is_file():+ return None+ target = self.runtime_dir / "downloads" / _runtime_archive_name()+ target.parent.mkdir(parents=True, exist_ok=True)+ with resource.open("rb") as source, target.open("wb") as destination:+ shutil.copyfileobj(source, destination)+ return target++ def _download_runtime_archive(self, archive_url: str) -> Path | None:+ target = self.runtime_dir / "downloads" / _runtime_archive_name()+ target.parent.mkdir(parents=True, exist_ok=True)+ try:+ with urllib.request.urlopen(archive_url, timeout=60) as response, target.open("wb") as destination:+ shutil.copyfileobj(response, destination)+ except Exception:+ logger.exception("Failed to download prebuilt Show Runtime from %s", archive_url)+ self._install_reason = "runtime_archive_download_failed"+ return None+ return target++ def _archive_install_dir(self) -> Path:+ return self.runtime_dir / "prebuilt" / "current"++ def _archive_runtime_command(self, install_dir: Path, node: list[str]) -> list[str] | None:+ cli_path = install_dir / "node_modules" / "@avibe" / "show-runtime" / "dist" / "cli.js"+ if not cli_path.exists():+ return None+ return [*node, str(cli_path)]++ def _reuse_existing_archive_runtime(self, command: list[str] | None) -> list[str] | None:+ if command:+ self._install_reason = None+ return command+ return None+def _installed_github_runtime_command(self) -> list[str] | None:- node = _resolve_command("node")+ node = _resolve_node_command()if not node:return Nonereturn self._github_runtime_command(self._github_source_dir(), node)def _install_github_runtime(self) -> list[str] | None:- node = _resolve_command("node")+ node = _resolve_node_command()if not node:self._install_reason = "runtime_node_missing"return None@@ -347,8 +466,50 @@ def _auto_install_enabled() -> bool:def _normalize_runtime_source(value: str | None) -> str:- normalized = (value or _RUNTIME_SOURCE_GITHUB).strip().lower()- return normalized or _RUNTIME_SOURCE_GITHUB+ normalized = (value or _RUNTIME_SOURCE_ARCHIVE).strip().lower()+ return normalized or _RUNTIME_SOURCE_ARCHIVE+++def _runtime_archive_name() -> str:+ return f"{_RUNTIME_ARCHIVE_PREFIX}-{_runtime_platform_tag()}.tgz"+++def _default_runtime_archive_url() -> str:+ return f"{_RUNTIME_ARCHIVE_RELEASE_BASE_URL}/{_runtime_archive_name()}"+++def _runtime_platform_tag() -> str:+ raw = get_platform().lower()+ machine = raw.rsplit("-", 1)[-1]+ if machine in {"amd64", "x86_64"}:+ arch = "x64"+ elif machine in {"arm64", "aarch64"}:+ arch = "arm64"+ else:+ arch = machine+ if raw.startswith("macosx"):+ os_name = "darwin"+ elif raw.startswith("linux"):+ os_name = "linux"+ elif raw.startswith("win"):+ os_name = "win32"+ else:+ os_name = os.name+ return f"{os_name}-{arch}"+++def _safe_extract_tar(tar: tarfile.TarFile, destination: Path) -> None:+ destination_resolved = destination.resolve()+ for member in tar.getmembers():+ if not (member.isfile() or member.isdir()):+ raise ValueError(f"Unsafe archive member type: {member.name}")+ target = (destination / member.name).resolve()+ if target != destination_resolved and destination_resolved not in target.parents:+ raise ValueError(f"Unsafe archive member path: {member.name}")+ try:+ tar.extractall(destination, filter="data")+ except TypeError:+ tar.extractall(destination)def _safe_path_part(value: str) -> str:@@ -371,6 +532,13 @@ def _resolve_command(command: str) -> list[str] | None:return [resolved, *parts[1:]]+def _resolve_node_command() -> list[str] | None:+ configured = os.environ.get("VIBE_SHOW_RUNTIME_NODE_BIN")+ if configured:+ return _resolve_command(configured)+ return _resolve_command("node")++def _resolve_executable_path(path: Path) -> str | None:expanded = path.expanduser()return str(expanded) if expanded.exists() and os.access(expanded, os.X_OK) else Nonediff --git a/install.ps1 b/install.ps1index 4d4b893e1..a88710dbb 100644--- a/install.ps1+++ b/install.ps1@@ -9,6 +9,7 @@ $ErrorActionPreference = "Stop"$REPO = "cyhhao/vibe-remote"$PACKAGE_NAME = "vibe-remote"$TSINGHUA_INDEX_URL = "https://pypi.tuna.tsinghua.edu.cn/simple"+$NODE_VERSION_MAJOR = 20function Write-Banner {Write-Host @"@@ -53,6 +54,57 @@ function Test-Command {return $?}+function Test-Node {+ if (-not (Test-Command "node")) {+ return $false+ }+ try {+ $version = (& node --version).Trim().TrimStart("v")+ $major = [int]($version.Split(".")[0])+ return $major -ge $NODE_VERSION_MAJOR+ } catch {+ return $false+ }+}++function Install-Node {+ if ($env:VIBE_INSTALL_SKIP_NODE -eq "1") {+ Write-Warning "Skipping Node.js installation because VIBE_INSTALL_SKIP_NODE=1"+ return+ }++ if (Test-Node) {+ Write-Success "Node.js is already installed"+ return+ }++ Write-Info "Installing Node.js for Show Pages runtime..."+ if (Test-Command "winget") {+ $result = Invoke-NativeCommand -FilePath "winget" -Arguments @(+ "install",+ "OpenJS.NodeJS.LTS",+ "--accept-source-agreements",+ "--accept-package-agreements",+ "--silent"+ )+ if (-not $result.Success) {+ $message = "Failed to install Node.js with winget"+ if ($result.Output) {+ $message += ":`n$($result.Output)"+ }+ Write-Error $message+ }++ $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")+ if (Test-Node) {+ Write-Success "Node.js installed successfully"+ return+ }+ }++ Write-Error "Node.js 20+ is required for Show Pages runtime. Please install Node.js LTS from https://nodejs.org/ and rerun this script."+}+function Install-Uv {if (Test-Command "uv") {Write-Success "uv is already installed"@@ -284,6 +336,9 @@ function Main {# Install uv (which manages Python automatically)Install-Uv++ # Install Node.js for managed Show Page runtime if needed.+ Install-Node# Install vibe-remoteInstall-Vibediff --git a/install.sh b/install.shindex ae09fa296..694d35bda 100755--- a/install.sh+++ b/install.sh@@ -16,6 +16,8 @@ NC='\033[0m' # No Color# ConfigurationREPO="cyhhao/vibe-remote"PACKAGE_NAME="vibe-remote"+NODE_VERSION="22.16.0"+NODE_VERSION_MAJOR="20"VIBE_BIN_PATH=""VIBE_TOOL_BIN_DIR=""ORIGINAL_PATH="$PATH"@@ -259,6 +261,101 @@ uv_is_native_for_host() {uv_binary_is_acceptable "$uv_path"}+node_major_version() {+ local version=""+ version="$(node --version 2>/dev/null || true)"+ version="${version#v}"+ version="${version%%.*}"+ case "$version" in+ ''|*[!0-9]*) return 1 ;;+ *) printf '%s\n' "$version" ;;+ esac+}++node_is_acceptable() {+ local major=""+ major="$(node_major_version || true)"+ [ -n "$major" ] && [ "$major" -ge 20 ]+}++node_platform_arch() {+ local os="$1"+ local machine=""+ machine="$(uname -m 2>/dev/null || true)"++ case "$machine" in+ arm64|aarch64) machine="arm64" ;;+ x86_64|amd64) machine="x64" ;;+ *) return 1 ;;+ esac++ case "$os" in+ macos) printf 'darwin-%s\n' "$machine" ;;+ linux) printf 'linux-%s\n' "$machine" ;;+ *) return 1 ;;+ esac+}++run_as_root() {+ if [ "$(id -u 2>/dev/null || echo 1)" = "0" ]; then+ "$@"+ elif command_exists sudo; then+ sudo "$@"+ else+ return 127+ fi+}++install_node() {+ if [ "${VIBE_INSTALL_SKIP_NODE:-}" = "1" ]; then+ warn "Skipping Node.js installation because VIBE_INSTALL_SKIP_NODE=1"+ return 0+ fi++ if command_exists node && node_is_acceptable; then+ success "Node.js is already installed"+ return 0+ fi++ local os+ os="$(detect_os)"++ info "Installing Node.js ${NODE_VERSION_MAJOR:-20}+ for Show Pages runtime..."+ case "$os" in+ macos)+ if command_exists brew; then+ brew install node || error "Failed to install Node.js with Homebrew"+ else+ error "Node.js 20+ is required. Install Homebrew or Node.js from https://nodejs.org/ and rerun this script."+ fi+ ;;+ linux)+ if command_exists apt-get; then+ curl -fsSL https://deb.nodesource.com/setup_22.x | run_as_root bash - || error "Failed to configure NodeSource repository"+ run_as_root apt-get install -y nodejs || error "Failed to install Node.js with apt"+ elif command_exists dnf; then+ run_as_root dnf install -y nodejs npm || error "Failed to install Node.js with dnf"+ elif command_exists yum; then+ run_as_root yum install -y nodejs npm || error "Failed to install Node.js with yum"+ elif command_exists pacman; then+ run_as_root pacman -S --noconfirm nodejs npm || error "Failed to install Node.js with pacman"+ else+ error "Node.js 20+ is required. Please install Node.js globally with your system package manager and rerun this script."+ fi+ ;;+ *)+ error "Node.js 20+ is required. Please install Node.js globally and rerun this script."+ ;;+ esac++ if command_exists node && node_is_acceptable; then+ success "Node.js installed successfully"+ return 0+ fi++ error "Node.js installation completed but node 20+ is not available in PATH"+}+uv_tool_install() {if [ -n "$VIBE_TOOL_BIN_DIR" ]; thenUV_TOOL_BIN_DIR="$VIBE_TOOL_BIN_DIR" uv tool install "$@"@@ -472,6 +569,16 @@ main() {# Install uv (which manages Python automatically)install_uv++ VIBE_TOOL_BIN_DIR="$(choose_tool_bin_dir || true)"+ if [ -n "$VIBE_TOOL_BIN_DIR" ]; then+ info "Using tool bin directory $VIBE_TOOL_BIN_DIR"+ else+ warn "Could not find a writable directory in PATH; falling back to ~/.local/bin where possible"+ fi++ # Install Node.js for managed Show Page runtime if needed.+ install_node# Install vibe-remoteinstall_vibediff --git a/pyproject.toml b/pyproject.tomlindex db904f75f..b4b3ef868 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -84,8 +84,8 @@ source = "vcs"version-file = "vibe/_version.py"[tool.hatch.build]-# Include ui/dist even though it's in .gitignore (build artifacts)-artifacts = ["ui/dist/**"]+# Include generated assets even though they are in .gitignore (build artifacts)+artifacts = ["ui/dist/**", "vibe/show_runtime/*.tgz"][tool.hatch.build.targets.wheel]packages = ["vibe", "config", "core", "modules", "storage"]@@ -93,6 +93,7 @@ packages = ["vibe", "config", "core", "modules", "storage"][tool.hatch.build.targets.wheel.force-include]"main.py" = "vibe/service_main.py""ui/dist" = "vibe/ui/dist"+"vibe/show_runtime" = "vibe/show_runtime"[tool.hatch.build.targets.sdist]# Include ui/dist for source distribution@@ -104,6 +105,7 @@ include = ["storage/**","main.py","ui/dist/**",+ "vibe/show_runtime/**","README.md","LICENSE",]diff --git a/tests/test_install_script.py b/tests/test_install_script.pyindex 89fc4729b..9507773c1 100644--- a/tests/test_install_script.py+++ b/tests/test_install_script.py@@ -58,6 +58,20 @@ def _write_fake_uv(path: Path, uv_log: Path) -> None:)+def _write_fake_node(path: Path, version: str = "v22.16.0") -> None:+ _write_executable(+ path,+ f"""\+ #!/usr/bin/env bash+ if [ "${{1:-}}" = "--version" ]; then+ echo "{version}"+ else+ echo "node"+ fi+ """,+ )++def _write_fake_file(path: Path, mapping: dict[Path, str]) -> None:cases = "\n".join(f' "{target}") echo "${{prefix}}{description}" ;;' for target, description in mapping.items()@@ -112,6 +126,8 @@ def _write_fake_sysctl(path: Path, arm64: bool = True) -> None:def _install(env: dict[str, str], *, cwd: Path = REPO_ROOT) -> subprocess.CompletedProcess[str]:+ env = {**env}+ env.setdefault("VIBE_INSTALL_SKIP_NODE", "1")return _run(f'bash "{INSTALL_SCRIPT}"', cwd=cwd, env=env)@@ -144,6 +160,48 @@ def test_install_script_keeps_vibe_available_on_current_path(tmp_path):assert uv_log.read_text(encoding="utf-8")+def test_install_script_installs_node_when_missing(tmp_path):+ home_dir = tmp_path / "home"+ home_dir.mkdir()+ path_dir = tmp_path / "path-bin"+ path_dir.mkdir()+ uv_log = tmp_path / "uv-tool-bin-dir.txt"++ _write_fake_uv(path_dir / "uv", uv_log)+ _write_fake_uname(path_dir / "uname", machine="arm64")+ _write_executable(+ path_dir / "brew",+ f"""\+ #!/usr/bin/env bash+ if [ "${{1:-}}" = "install" ] && [ "${{2:-}}" = "node" ]; then+ cat > "{path_dir / 'node'}" <<'EOF'+ #!/usr/bin/env bash+ if [ "${1:-}" = "--version" ]; then+ echo "v22.16.0"+ else+ echo "node"+ fi+ EOF+ chmod +x "{path_dir / 'node'}"+ exit 0+ fi+ exit 1+ """,+ )++ env = os.environ.copy()+ env["HOME"] = str(home_dir)+ env["PATH"] = os.pathsep.join([str(path_dir), "/usr/bin", "/bin"])+ env["VIBE_INSTALL_SKIP_NODE"] = "0"++ install_result = _install(env, cwd=tmp_path)++ assert install_result.returncode == 0, install_result.stdout + install_result.stderr+ assert "Installing Node.js 20+" in install_result.stdout+ assert "Node.js installed successfully" in install_result.stdout+ assert (path_dir / "node").exists()++def test_install_script_prefers_new_bin_over_stale_local_bin(tmp_path):home_dir = tmp_path / "home"home_dir.mkdir()diff --git a/tests/test_ui_show_pages.py b/tests/test_ui_show_pages.pyindex f62b868e6..39aedcb23 100644--- a/tests/test_ui_show_pages.py+++ b/tests/test_ui_show_pages.py@@ -1,4 +1,5 @@import asyncio+import tarfilefrom config import pathsfrom core.show_pages import ShowPageStore, ensure_show_page_dir@@ -294,12 +295,52 @@ def test_show_runtime_manager_uses_managed_runtime_bin(tmp_path):manager = ShowRuntimeManager(workspace_root=tmp_path / "show",runtime_dir=runtime_dir,+ runtime_source="npm",auto_install=False,)assert asyncio.run(manager._resolve_managed_command()) == [str(bin_path)]+def test_show_runtime_manager_installs_from_prebuilt_archive(monkeypatch, tmp_path):+ archive_root = tmp_path / "archive-root"+ cli_path = archive_root / "node_modules" / "@avibe" / "show-runtime" / "dist" / "cli.js"+ cli_path.parent.mkdir(parents=True)+ cli_path.write_text("#!/usr/bin/env node\n", encoding="utf-8")+ archive_path = tmp_path / "vibe-show-runtime-node.tgz"+ with tarfile.open(archive_path, "w:gz") as tar:+ tar.add(archive_root / "node_modules", arcname="node_modules")++ manager = ShowRuntimeManager(+ workspace_root=tmp_path / "show",+ runtime_dir=tmp_path / "runtime",+ archive_path=archive_path,+ )+ monkeypatch.setattr("core.show_runtime._resolve_command", lambda command: ["/bin/node"] if command == "node" else None)++ assert manager._install_managed_runtime() == [+ "/bin/node",+ str(tmp_path / "runtime" / "prebuilt" / "current" / "node_modules" / "@avibe" / "show-runtime" / "dist" / "cli.js"),+ ]+ assert manager._install_reason is None+++def test_show_runtime_manager_reuses_installed_prebuilt_runtime_without_archive(monkeypatch, tmp_path):+ cli_path = tmp_path / "runtime" / "prebuilt" / "current" / "node_modules" / "@avibe" / "show-runtime" / "dist" / "cli.js"+ cli_path.parent.mkdir(parents=True)+ cli_path.write_text("#!/usr/bin/env node\n", encoding="utf-8")++ manager = ShowRuntimeManager(+ workspace_root=tmp_path / "show",+ runtime_dir=tmp_path / "runtime",+ archive_path=tmp_path / "missing.tgz",+ )+ monkeypatch.setattr("core.show_runtime._resolve_command", lambda command: ["/bin/node"] if command == "node" else None)++ assert manager._install_managed_runtime() == ["/bin/node", str(cli_path)]+ assert manager._install_reason is None++def test_show_runtime_manager_can_disable_auto_install(tmp_path):manager = ShowRuntimeManager(workspace_root=tmp_path / "show",diff --git a/vibe/show_runtime/.gitkeep b/vibe/show_runtime/.gitkeepnew file mode 100644index 000000000..e69de29bb