feat(update): integrate managed installs and recoverable in-app updates (#6168)

Add owner-aware Stable and Preview updates with explicit consent, verified release plans, protected process handoff and bounded service recovery. Keep configuration and conversations separate from program rollback.

Include the compact About controls, Windows long-path support, native package recovery checks and optional macOS Dock lifecycle integration. Preserve documented guidance for installations owned by other managers.

This code integration does not publish packages, enable signing or advance the public update channel.

Co-authored-by: chengyongru <61816729+chengyongru@users.noreply.github.com>
This commit is contained in:
Xubin Renandchengyongru authored and GitHub committed 2026-10-21 19:16:56 +08:00
1 parent 76da55994b
commit fbb61a373f
216 files changed
+27948 -1084

No files matched your search

+8 -4
View File
@@ -1,6 +1,7 @@
from __future__ import annotations
import os
from contextlib import nullcontext
from pathlib import Path
from nanobot.webui.build import (
@@ -100,7 +101,8 @@ def test_inspect_webui_bundle_accepts_fresh_dist(tmp_path: Path) -> None:
assert status.reason == "fresh"
def test_ensure_webui_bundle_auto_builds_stale_dist(tmp_path: Path) -> None:
def test_ensure_webui_bundle_auto_builds_stale_dist(tmp_path: Path, monkeypatch) -> None:
monkeypatch.setattr("nanobot.webui.build.bun_environment", lambda _: nullcontext({"PATH": "bun"}))
source = tmp_path / "webui"
dist = tmp_path / "nanobot" / "web" / "dist"
_touch(source / "package.json", mtime_ns=10)
@@ -108,11 +110,13 @@ def test_ensure_webui_bundle_auto_builds_stale_dist(tmp_path: Path) -> None:
_touch(dist / "index.html", mtime_ns=20)
commands: list[tuple[str, ...]] = []
def fake_run(command, *, cwd: Path, check: bool) -> None:
def fake_run(command, *, cwd: Path, check: bool, env: dict[str, str], timeout: int) -> None:
commands.append(tuple(command))
assert cwd == source
assert check is True
if command == ["bun", "run", "build"]:
assert "PATH" in env
assert timeout == 900
if command == ["bun", "--bun", "run", "build"]:
_touch(dist / "index.html", mtime_ns=40)
status = ensure_webui_bundle(
@@ -124,7 +128,7 @@ def test_ensure_webui_bundle_auto_builds_stale_dist(tmp_path: Path) -> None:
)
assert status.stale is False
assert commands == [("bun", "install"), ("bun", "run", "build")]
assert commands == [("bun", "install", "--frozen-lockfile"), ("bun", "--bun", "run", "build")]
def test_pick_webui_build_runner_returns_resolved_executable(monkeypatch) -> None: