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:
1 parent
76da55994b
commit
fbb61a373f
216 files changed
+27948
-1084
No files matched your search
@@ -306,12 +306,17 @@ def test_special_setup_validation_is_owned_by_channel_package(name: str):
|
||||
|
||||
@pytest.mark.parametrize("name", ["feishu", "linear", "qq", "weixin", "whatsapp"])
|
||||
def test_interactive_connector_is_owned_by_channel_package(name: str):
|
||||
from nanobot.channels.connect import ManagedChannelConnector
|
||||
|
||||
plugin = load_channel_package(name)
|
||||
|
||||
assert plugin is not None
|
||||
assert plugin.connector is not None
|
||||
assert plugin.connector.startswith(f"nanobot.channels.{name}.")
|
||||
assert plugin.load_connector().__class__.__module__ == f"nanobot.channels.{name}.connect"
|
||||
connector = plugin.load_connector()
|
||||
assert connector.__class__.__module__ == f"nanobot.channels.{name}.connect"
|
||||
assert isinstance(connector, ManagedChannelConnector)
|
||||
assert connector.has_pending_work is False
|
||||
|
||||
|
||||
def test_descriptor_defaults_cover_onboarding_fields_without_runtime_import():
|
||||
@@ -3559,9 +3564,8 @@ async def test_stop_all_cancels_dispatcher_and_stops_channels():
|
||||
providers=SimpleNamespace(groq=SimpleNamespace(api_key="")),
|
||||
)
|
||||
|
||||
mgr = ChannelManager.__new__(ChannelManager)
|
||||
mgr = ChannelManager(Config.model_validate({"channels": {"websocket": {"enabled": False}}}), MessageBus())
|
||||
mgr.config = fake_config
|
||||
mgr.bus = MessageBus()
|
||||
|
||||
ch = _StartableChannel(fake_config, mgr.bus)
|
||||
mgr.channels = {"startable": ch}
|
||||
@@ -3641,9 +3645,8 @@ async def test_stop_all_handles_channel_exception():
|
||||
providers=SimpleNamespace(groq=SimpleNamespace(api_key="")),
|
||||
)
|
||||
|
||||
mgr = ChannelManager.__new__(ChannelManager)
|
||||
mgr = ChannelManager(Config.model_validate({"channels": {"websocket": {"enabled": False}}}), MessageBus())
|
||||
mgr.config = fake_config
|
||||
mgr.bus = MessageBus()
|
||||
mgr.channels = {"stopfailing": _StopFailingChannel(fake_config, mgr.bus)}
|
||||
mgr._channel_tasks = {}
|
||||
mgr._outbound_tasks = {}
|
||||
@@ -3678,9 +3681,8 @@ async def test_stop_all_handles_channel_stop_cancelled_task():
|
||||
providers=SimpleNamespace(groq=SimpleNamespace(api_key="")),
|
||||
)
|
||||
|
||||
mgr = ChannelManager.__new__(ChannelManager)
|
||||
mgr = ChannelManager(Config.model_validate({"channels": {"websocket": {"enabled": False}}}), MessageBus())
|
||||
mgr.config = fake_config
|
||||
mgr.bus = MessageBus()
|
||||
next_channel = _StartableChannel(fake_config, mgr.bus)
|
||||
mgr.channels = {
|
||||
"stopcancelled": _StopCancelledChannel(fake_config, mgr.bus),
|
||||
@@ -3704,9 +3706,8 @@ async def test_start_all_no_channels_logs_warning():
|
||||
providers=SimpleNamespace(groq=SimpleNamespace(api_key="")),
|
||||
)
|
||||
|
||||
mgr = ChannelManager.__new__(ChannelManager)
|
||||
mgr = ChannelManager(Config.model_validate({"channels": {"websocket": {"enabled": False}}}), MessageBus())
|
||||
mgr.config = fake_config
|
||||
mgr.bus = MessageBus()
|
||||
mgr.channels = {} # No channels
|
||||
mgr._dispatch_task = None
|
||||
|
||||
@@ -3724,9 +3725,8 @@ async def test_start_all_creates_dispatch_task():
|
||||
providers=SimpleNamespace(groq=SimpleNamespace(api_key="")),
|
||||
)
|
||||
|
||||
mgr = ChannelManager.__new__(ChannelManager)
|
||||
mgr = ChannelManager(Config.model_validate({"channels": {"websocket": {"enabled": False}}}), MessageBus())
|
||||
mgr.config = fake_config
|
||||
mgr.bus = MessageBus()
|
||||
|
||||
ch = _StartableChannel(fake_config, mgr.bus)
|
||||
mgr.channels = {"startable": ch}
|
||||
|
||||
Reference in new issue
Block a user