feat(launcher): add verified first-run installer

This commit is contained in:
Erik 2026-08-14 20:06:37 +02:00
parent 60f627998c
commit ff6ebb6a6a
28 changed files with 3259 additions and 125 deletions

View file

@ -29,6 +29,7 @@ public sealed class LauncherOrchestrator : ILauncherOrchestrator
private readonly List<ManagedActivity> _activities = [];
private LauncherInstallRecord? _installRecord;
private string _installationStatus;
private bool _disposed;
public LauncherOrchestrator(
@ -40,7 +41,8 @@ public sealed class LauncherOrchestrator : ILauncherOrchestrator
ILauncherSessionConfigService? configService = null,
ILauncherProcessSupervisorFactory? supervisorFactory = null,
IStatusEventSourceFactory? statusSourceFactory = null,
Func<string>? sessionIdFactory = null)
Func<string>? sessionIdFactory = null,
string? installationStatus = null)
{
_profileStore = profileStore ?? throw new ArgumentNullException(nameof(profileStore));
_paths = paths ?? throw new ArgumentNullException(nameof(paths));
@ -51,6 +53,10 @@ public sealed class LauncherOrchestrator : ILauncherOrchestrator
_supervisorFactory = supervisorFactory ?? new LauncherProcessSupervisorFactory();
_statusSourceFactory = statusSourceFactory ?? new StatusFileTailerFactory();
_sessionIdFactory = sessionIdFactory ?? CreateSessionId;
_installationStatus = installationStatus
?? (installRecord is null
? FirstRunRequired
: "Client content paths are configured.");
}
public event EventHandler? StateChanged;
@ -85,9 +91,7 @@ public sealed class LauncherOrchestrator : ILauncherOrchestrator
sessions,
_platform,
_installRecord is not null,
_installRecord is null
? FirstRunRequired
: "Client content paths are configured.");
_installationStatus);
}
}
@ -184,6 +188,9 @@ public sealed class LauncherOrchestrator : ILauncherOrchestrator
{
ThrowIfDisposed();
_installRecord = installRecord;
_installationStatus = installRecord is null
? FirstRunRequired
: "Client content SHA-256, size, and bake-tool version verified.";
}
RaiseStateChanged();