feat(cli): attach terminal clients to the selected Desktop [skip ci]

NAN-104 requires terminal chat and browser attachment without granting a client ownership of Desktop's gateway. Resolve bounded short-lived credentials over authenticated current-user IPC, pin both Desktop and gateway identities, and reject replacement instances or incompatible clients before any mutation.

Reuse the existing TUI artifact resolver behind a narrow Desktop-only entrypoint, keep credentials out of argv/environment/files, and preserve Python-mode reconnect and gateway leases. Add protocol, real-gateway, and anonymous IPC regression coverage; matching native-host and Windows acceptance remain release gates.
This commit is contained in:
Xubin Ren committed 2026-09-08 10:04:15 +08:00
1 parent b373a95f5c
commit 48e7c4f697
20 files changed
+797 -52

No files matched your search

+3 -3
View File
@@ -263,10 +263,10 @@ def test_desktop_tui_selection_fails_without_fallback(monkeypatch, capsys) -> No
monkeypatch.setattr(desktop_target, "discover_desktop_target", Target)
monkeypatch.setattr(desktop_target, "_choose_target", lambda _status: "desktop")
assert dispatch_bare_desktop_target([]) == 4
assert calls == ["status", "status"]
assert dispatch_bare_desktop_target([]) == 3
assert calls == ["status", "tui"]
error = capsys.readouterr().err
assert "does not yet provide attach-only terminal chat" in error
assert "unavailable or incompatible" in error
assert "No backend was started" in error