Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Move the mobile app into its own package beside desktop/

Dev jacob498d1ba2b627
diff --git a/desktop/lib/app_shell.dart b/desktop/lib/app_shell.dart
new file mode 100644
index 000000000..001469504
--- /dev/null
+++ b/desktop/lib/app_shell.dart
@@ -0,0 +1,320 @@
+import 'dart:async';
+import 'dart:ui' show AppExitResponse;
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+
+import 'analytics/analytics_lifecycle.dart';
+import 'core/crash_log.dart';
+import 'core/desktop_window.dart';
+import 'screens/login_screen.dart';
+import 'state/app_state.dart';
+import 'shared/theme/app_theme.dart' as grid;
+import 'shared/theme/appearance_prefs_store.dart';
+import 'terminal/terminal_font_store.dart';
+import 'widgets/bootstrapping_screen.dart';
+import 'widgets/layout_palette.dart';
+import 'widgets/environment_preflight_screen.dart';
+import 'widgets/environment_setup_screen.dart';
+import 'widgets/flash_firmware_dialog.dart';
+import 'core/startup.dart';
+import 'logging/app_log.dart';
+import 'logging/install.dart';
+import 'shortcuts/app_keymap.dart';
+import 'widgets/shortcuts_sheet.dart';
+import 'widgets/update_notice.dart';
+import 'widgets/window_chrome.dart';
+
+/// The screen an app puts up once someone is signed in — the desktop's swarm of
+/// panes, or the phone's one-agent-at-a-time shell. It is the only thing the two
+/// entry points disagree about; everything below is shared.
+typedef AuthenticatedScreenBuilder = Widget Function(AppNotifier app);
+
+/// Everything both entry points do before their first frame: file logs, the
+/// crash log, the keyboard config, the saved appearance, and the native window
+/// where there is one.
+///
+/// Lives here rather than in either `main.dart` so the two cannot drift — the
+/// mobile app is a separate package (`../mobile`) that depends on this one, and
+/// a second copy of this preamble is exactly how the last mobile build ended up
+/// stranded from the desktop it shared a codebase with.
+Future<void> startHarness({
+ required AuthenticatedScreenBuilder authenticatedScreen,
+}) async {
+ WidgetsFlutterBinding.ensureInitialized();
+ // Before anything else can fail. The file sinks come first so CrashLog's own
+ // install has somewhere to mirror to — see CrashLog.record.
+ installFileLogs();
+ CrashLog.install();
+ appLog.info('app', 'launched');
+ final keymap = AppKeymap(store: AppKeymap.fileStore());
+ // Keyboard configuration has its own file and watchers. It can load beside
+ // the appearance, but both must be ready before the window becomes usable.
+ await Future.wait([loadPersistedSettings(), keymap.start()]);
+ // Apply the saved palette to native chrome as well as the Flutter theme.
+ await configureDesktopWindow(palette: appearancePrefsStore.value.palette);
+ runApp(
+ ProviderScope(
+ child: HarnessApp(keymap: keymap, authenticatedScreen: authenticatedScreen),
+ ),
+ );
+}
+
+class HarnessApp extends StatelessWidget {
+ const HarnessApp({
+ super.key,
+ this.keymap,
+ required this.authenticatedScreen,
+ });
+ final AppKeymap? keymap;
+ final AuthenticatedScreenBuilder authenticatedScreen;
+
+ @override
+ Widget build(BuildContext context) {
+ // Rebuilds MaterialApp on a font/size change, which is what re-resolves
+ // every Grid token with it.
+ //
+ // `buildAppTheme` bakes `AppControl.*Scaled` into plain numbers at the
+ // moment it runs, so a UI size that changed without rebuilding this would
+ // repaint nothing at all.
+ return ValueListenableBuilder<AppearancePrefs>(
+ valueListenable: appearancePrefsStore,
+ builder: (context, prefs, _) => _app(prefs),
+ );
+ }
+
+ Widget _app(AppearancePrefs prefs) {
+ grid.AppTheme.palette.value = prefs.palette;
+ // ⚠️ ORDER MATTERS, and it is why this is a statement rather than something
+ // tucked into the tree below: `buildAppTheme` reads `AppFont.sans` and
+ // `AppControl.*Scaled`, so the settings have to be on `AppFont` BEFORE the
+ // theme is built, in this same frame.
+ //
+ // Pushed through the notifier rather than calling `AppFont.apply` directly,
+ // so widgets past a `const` boundary — which a top-down rebuild never
+ // reaches — are marked dirty too.
+ //
+ // `codeSize` is passed through unchanged: code type is not on this screen
+ // yet, and `apply` takes the whole set, so reading the current value back is
+ // how "leave it alone" is spelled.
+ final scale = prefs.uiSize / grid.AppFont.uiSizeDefault;
+ grid.AppTheme.fonts.apply(
+ uiFamily: prefs.uiFamily,
+ uiScale: scale,
+ codeSize: grid.AppFont.codeSize,
+ );
+ return MaterialApp(
+ title: 'Harness',
+ debugShowCheckedModeBanner: false,
+ // The design system's own `buildAppTheme` — see the note where a second,
+ // hand-written `ThemeData` used to shadow it, in `lib/theme/app_theme.dart`.
+ // Harness Desktop is dark-only: one theme, no `darkTheme`/`themeMode` to
+ // resolve between.
+ theme: grid.buildAppTheme(brightness: Brightness.dark),
+ // The UI size reaches every `Text` as a text SCALE rather than as hundreds
+ // of edited call sites. `withClampedTextScaling` with both bounds equal IS
+ // the way to force a factor — MediaQuery has no "set the scale"
+ // constructor that still inherits the platform's other metrics.
+ //
+ // ⚠️ It is a matched pair with the `AppControl.*Scaled` reads above, not a
+ // separate nicety: those grow the BOXES and this grows the TYPE, and
+ // `AppControl.fontSize` deliberately has no scaled twin so that the factor
+ // is applied exactly once. Ship one without the other and a 19px setting
+ // gives 19px-tall buttons wrapped around 13pt labels.
+ //
+ // ⚠️ The terminal is fenced out of this at five seams — see
+ // `terminal_panel.dart`, `terminal_composer.dart`, `engine_identity.dart`
+ // and `terminal_section.dart`, and the regression test in
+ // `test/terminal_ui_scale_isolation_test.dart`. The terminal keeps its own
+ // font settings because its type is a grid a remote program draws into.
+ //
+ // Outermost inside `builder`, with `_GridTokenScope` inside it: the clamp
+ // has to be an ancestor of everything that lays out text, while the scope
+ // only reads `Theme.of`, which comes from above the builder either way.
+ builder: (context, child) => MediaQuery.withClampedTextScaling(
+ minScaleFactor: scale,
+ maxScaleFactor: scale,
+ child: _GridTokenScope(
+ child: keymap == null
+ ? child ?? const SizedBox.shrink()
+ : KeymapProvider(
+ keymap: keymap!,
+ child: child ?? const SizedBox.shrink(),
+ ),
+ ),
+ ),
+ home: AnalyticsLifecycle(
+ child: RootShell(authenticatedScreen: authenticatedScreen),
+ ),
+ );
+ }
+}
+
+/// Carries Grid's design tokens past this app's `const` chrome.
+///
+/// A `const` widget is reference-identical across its parent's rebuild, so a
+/// top-down rebuild never reaches one — it would keep the palette it first
+/// mounted with. [grid.BrightnessScope] marks the ones that called
+/// `AppTheme.watch` dirty directly, across that boundary.
+///
+/// Pinned to [Brightness.dark] rather than read from `Theme.of(context)`:
+/// Harness Desktop is dark-only, and there is no other theme for `Theme.of`
+/// to ever resolve to here.
+class _GridTokenScope extends StatelessWidget {
+ const _GridTokenScope({required this.child});
+
+ final Widget child;
+
+ @override
+ Widget build(BuildContext context) {
+ grid.AppTheme.brightness.value = Brightness.dark;
+ return grid.BrightnessScope(child: child);
+ }
+}
+
+/// Carries "Check for Updates…" from the macOS application menu into Dart.
+///
+/// The item is installed natively (MainFlutterWindow.swift) so the rest of the
+/// menu bar keeps coming from the nib; all this side does is act on the tap.
+const _appMenuChannel = MethodChannel('harness/app_menu');
+
+class RootShell extends ConsumerStatefulWidget {
+ const RootShell({super.key, required this.authenticatedScreen});
+
+ final AuthenticatedScreenBuilder authenticatedScreen;
+
+ @override
+ ConsumerState<RootShell> createState() => _RootShellState();
+}
+
+class _RootShellState extends ConsumerState<RootShell>
+ with WidgetsBindingObserver {
+ bool _menuDialogOpen = false;
+
+ @override
+ void initState() {
+ super.initState();
+ WidgetsBinding.instance.addObserver(this);
+ _appMenuChannel.setMethodCallHandler(_onAppMenu);
+ }
+
+ @override
+ void dispose() {
+ WidgetsBinding.instance.removeObserver(this);
+ _appMenuChannel.setMethodCallHandler(null);
+ super.dispose();
+ }
+
+ @override
+ Future<AppExitResponse> didRequestAppExit() async {
+ // Save the final arrangement, with a bound so an unavailable disk cannot
+ // trap the user in the app. Input and tab switching never wait for disk.
+ await ref
+ .read(appStateProvider)
+ .flushPaneLayout()
+ .timeout(const Duration(seconds: 1), onTimeout: () {});
+ return AppExitResponse.exit;
+ }
+
+ Future<void> _onAppMenu(MethodCall call) async {
+ if (!mounted) return;
+ switch (call.method) {
+ case 'checkForUpdates':
+ final app = ref.read(appStateProvider);
+ await _menuDialog(() async {
+ final result = await app.checkForUpdates();
+ if (!mounted) return;
+ await showUpdateCheckDialog(context, app, result);
+ });
+ case 'flashFirmware':
+ await _menuDialog(() => showFlashFirmwareDialog(context));
+ case 'showLayout':
+ if (advanceLayoutPalette()) return;
+ await _menuDialog(
+ () => showLayoutPalette(context, ref.read(appStateProvider)),
+ );
+ case 'showShortcuts':
+ await _menuDialog(() => showShortcutsSheet(context));
+ case 'increaseTerminalFontSize':
+ await terminalFontStore.increaseSize();
+ case 'decreaseTerminalFontSize':
+ await terminalFontStore.decreaseSize();
+ case 'resetTerminalFontSize':
+ await terminalFontStore.reset();
+ }
+ }
+
+ Future<void> _menuDialog(Future<void> Function() action) async {
+ if (_menuDialogOpen || ModalRoute.isCurrentOf(context) == false) return;
+ // Reserve before the first frame too: held menu shortcuts can arrive
+ // before the new dialog has changed the route's current state.
+ _menuDialogOpen = true;
+ try {
+ await action();
+ } finally {
+ _menuDialogOpen = false;
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final app = ref.watch(appStateProvider);
+ return ListenableBuilder(
+ listenable: app,
+ builder: (context, _) {
+ final Widget screen;
+ switch (app.status) {
+ case AppStatus.bootstrapping:
+ // `bootstrapping` covers two unrelated moments: the app starting
+ // cold, and a sign-in the user just began. The second keeps
+ // LoginScreen, which carries the wait as a state of its own
+ // button; swapping the window for a separate screen there was a
+ // hard cut in the middle of a flow, and it is why that button's
+ // spinner was almost never seen.
+ //
+ // ⚠️ Keyed on `signingIn`, NOT on `pendingAuthorizeUrl`. The URL
+ // only exists for the middle stretch of the flow — the CLI has to
+ // start before it can print one, and it is cleared again while
+ // the post-login restore is still running — so keying on it blew
+ // the user's own screen away twice per sign-in: once on the click
+ // and again on success.
+ screen = app.signingIn
+ ? LoginScreen(notifier: app)
+ : BootstrappingScreen(statusMessage: app.bootStatusMessage);
+ case AppStatus.checkingEnvironment:
+ screen = EnvironmentPreflightScreen(
+ readiness: app.environmentReadiness,
+ );
+ case AppStatus.preparingEnvironment:
+ screen = EnvironmentSetupScreen(notifier: app);
+ case AppStatus.unauthenticated:
+ screen = LoginScreen(notifier: app);
+ case AppStatus.authenticated:
+ screen = widget.authenticatedScreen(app);
+ }
+ // Only the home shell carries its own drag handle and traffic-light
+ // clearance (the rail's head). Every other screen fills the window
+ // with a centred card, so the strip goes over it here, once, instead
+ // of inside each of them.
+ final framed = app.status == AppStatus.authenticated
+ ? screen
+ : FullWindowScreen(child: screen);
+ // The band takes a row of its own rather than floating over one. As an
+ // overlay it landed on the rail's head — covering the wordmark and the
+ // three buttons beside it, which is the one strip of this window that
+ // must stay reachable.
+ return Column(
+ children: [
+ if (app.hasAvailableUpdate &&
+ app.status != AppStatus.bootstrapping &&
+ app.status != AppStatus.checkingEnvironment &&
+ app.status != AppStatus.preparingEnvironment)
+ UpdateNotice(notifier: app),
+ Expanded(child: framed),
+ ],
+ );
+ },
+ );
+ }
+}
diff --git a/desktop/lib/core/asset_owner.dart b/desktop/lib/core/asset_owner.dart
new file mode 100644
index 000000000..b24965d6a
--- /dev/null
+++ b/desktop/lib/core/asset_owner.dart
@@ -0,0 +1,12 @@
+/// The package Flutter should look in for this app's bundled assets.
+///
+/// `null` in the desktop app, where `harness` IS the root package and
+/// `Image.asset('assets/…')` resolves against its own manifest. An app that
+/// DEPENDS on `harness` — `../mobile` — gets those same files registered under
+/// `packages/harness/assets/…` instead, which only `package:` reaches.
+///
+/// Set once, from that app's `main()`, before the first frame. A mutable global
+/// rather than a `--dart-define` on purpose: a flag that has to be passed on
+/// every `flutter run` and `flutter build` is a flag someone will forget, and
+/// the symptom — every icon silently missing — looks nothing like its cause.
+String? harnessAssetPackage;
diff --git a/desktop/lib/main.dart b/desktop/lib/main.dart
index 89d06af64..52fafc422 100644
--- a/desktop/lib/main.dart
+++ b/desktop/lib/main.dart
@@ -1,299 +1,11 @@
-import 'dart:async';
-import 'dart:ui' show AppExitResponse;
-import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
-import 'package:flutter_riverpod/flutter_riverpod.dart';
-
-import 'analytics/analytics_lifecycle.dart';
-import 'core/crash_log.dart';
-import 'core/desktop_window.dart';
-import 'phone/phone_layout.dart';
-import 'phone/phone_shell.dart';
+import 'app_shell.dart';
import 'screens/swarm_screen.dart';
-import 'screens/login_screen.dart';
-import 'state/app_state.dart';
-import 'shared/theme/app_theme.dart' as grid;
-import 'shared/theme/appearance_prefs_store.dart';
-import 'terminal/terminal_font_store.dart';
-import 'widgets/bootstrapping_screen.dart';
-import 'widgets/layout_palette.dart';
-import 'widgets/environment_preflight_screen.dart';
-import 'widgets/environment_setup_screen.dart';
-import 'widgets/flash_firmware_dialog.dart';
-import 'core/startup.dart';
-import 'logging/app_log.dart';
-import 'logging/install.dart';
-import 'shortcuts/app_keymap.dart';
-import 'widgets/shortcuts_sheet.dart';
-import 'widgets/update_notice.dart';
-import 'widgets/window_chrome.dart';
-
-Future<void> main() async {
- WidgetsFlutterBinding.ensureInitialized();
- // Before anything else can fail. The file sinks come first so CrashLog's own
- // install has somewhere to mirror to — see CrashLog.record.
- installFileLogs();
- CrashLog.install();
- appLog.info('app', 'launched');
- final keymap = AppKeymap(store: AppKeymap.fileStore());
- // Keyboard configuration has its own file and watchers. It can load beside
- // the appearance, but both must be ready before the window becomes usable.
- await Future.wait([loadPersistedSettings(), keymap.start()]);
- // Apply the saved palette to native chrome as well as the Flutter theme.
- await configureDesktopWindow(palette: appearancePrefsStore.value.palette);
- runApp(ProviderScope(child: DesktopApp(keymap: keymap)));
-}
-
-class DesktopApp extends StatelessWidget {
- const DesktopApp({super.key, this.keymap});
- final AppKeymap? keymap;
-
- @override
- Widget build(BuildContext context) {
- // Rebuilds MaterialApp on a font/size change, which is what re-resolves
- // every Grid token with it.
- //
- // `buildAppTheme` bakes `AppControl.*Scaled` into plain numbers at the
- // moment it runs, so a UI size that changed without rebuilding this would
- // repaint nothing at all.
- return ValueListenableBuilder<AppearancePrefs>(
- valueListenable: appearancePrefsStore,
- builder: (context, prefs, _) => _app(prefs),
- );
- }
-
- Widget _app(AppearancePrefs prefs) {
- grid.AppTheme.palette.value = prefs.palette;
- // ⚠️ ORDER MATTERS, and it is why this is a statement rather than something
- // tucked into the tree below: `buildAppTheme` reads `AppFont.sans` and
- // `AppControl.*Scaled`, so the settings have to be on `AppFont` BEFORE the
- // theme is built, in this same frame.
- //
- // Pushed through the notifier rather than calling `AppFont.apply` directly,
- // so widgets past a `const` boundary — which a top-down rebuild never
- // reaches — are marked dirty too.
- //
- // `codeSize` is passed through unchanged: code type is not on this screen
- // yet, and `apply` takes the whole set, so reading the current value back is
- // how "leave it alone" is spelled.
- final scale = prefs.uiSize / grid.AppFont.uiSizeDefault;
- grid.AppTheme.fonts.apply(
- uiFamily: prefs.uiFamily,
- uiScale: scale,
- codeSize: grid.AppFont.codeSize,
- );
- return MaterialApp(
- title: 'Harness',
- debugShowCheckedModeBanner: false,
- // The design system's own `buildAppTheme` — see the note where a second,
- // hand-written `ThemeData` used to shadow it, in `lib/theme/app_theme.dart`.
- // Harness Desktop is dark-only: one theme, no `darkTheme`/`themeMode` to
- // resolve between.
- theme: grid.buildAppTheme(brightness: Brightness.dark),
- // The UI size reaches every `Text` as a text SCALE rather than as hundreds
- // of edited call sites. `withClampedTextScaling` with both bounds equal IS
- // the way to force a factor — MediaQuery has no "set the scale"
- // constructor that still inherits the platform's other metrics.
- //
- // ⚠️ It is a matched pair with the `AppControl.*Scaled` reads above, not a
- // separate nicety: those grow the BOXES and this grows the TYPE, and
- // `AppControl.fontSize` deliberately has no scaled twin so that the factor
- // is applied exactly once. Ship one without the other and a 19px setting
- // gives 19px-tall buttons wrapped around 13pt labels.
- //
- // ⚠️ The terminal is fenced out of this at five seams — see
- // `terminal_panel.dart`, `terminal_composer.dart`, `engine_identity.dart`
- // and `terminal_section.dart`, and the regression test in
- // `test/terminal_ui_scale_isolation_test.dart`. The terminal keeps its own
- // font settings because its type is a grid a remote program draws into.
- //
- // Outermost inside `builder`, with `_GridTokenScope` inside it: the clamp
- // has to be an ancestor of everything that lays out text, while the scope
- // only reads `Theme.of`, which comes from above the builder either way.
- builder: (context, child) => MediaQuery.withClampedTextScaling(
- minScaleFactor: scale,
- maxScaleFactor: scale,
- child: _GridTokenScope(
- child: keymap == null
- ? child ?? const SizedBox.shrink()
- : KeymapProvider(
- keymap: keymap!,
- child: child ?? const SizedBox.shrink(),
- ),
- ),
- ),
- home: const AnalyticsLifecycle(child: RootShell()),
- );
- }
-}
-
-/// Carries Grid's design tokens past this app's `const` chrome.
-///
-/// A `const` widget is reference-identical across its parent's rebuild, so a
-/// top-down rebuild never reaches one — it would keep the palette it first
-/// mounted with. [grid.BrightnessScope] marks the ones that called
-/// `AppTheme.watch` dirty directly, across that boundary.
-///
-/// Pinned to [Brightness.dark] rather than read from `Theme.of(context)`:
-/// Harness Desktop is dark-only, and there is no other theme for `Theme.of`
-/// to ever resolve to here.
-class _GridTokenScope extends StatelessWidget {
- const _GridTokenScope({required this.child});
-
- final Widget child;
-
- @override
- Widget build(BuildContext context) {
- grid.AppTheme.brightness.value = Brightness.dark;
- return grid.BrightnessScope(child: child);
- }
-}
-
-/// Carries "Check for Updates…" from the macOS application menu into Dart.
-///
-/// The item is installed natively (MainFlutterWindow.swift) so the rest of the
-/// menu bar keeps coming from the nib; all this side does is act on the tap.
-const _appMenuChannel = MethodChannel('harness/app_menu');
-
-class RootShell extends ConsumerStatefulWidget {
- const RootShell({super.key});
-
- @override
- ConsumerState<RootShell> createState() => _RootShellState();
-}
-
-class _RootShellState extends ConsumerState<RootShell>
- with WidgetsBindingObserver {
- bool _menuDialogOpen = false;
-
- @override
- void initState() {
- super.initState();
- WidgetsBinding.instance.addObserver(this);
- _appMenuChannel.setMethodCallHandler(_onAppMenu);
- }
-
- @override
- void dispose() {
- WidgetsBinding.instance.removeObserver(this);
- _appMenuChannel.setMethodCallHandler(null);
- super.dispose();
- }
-
- @override
- Future<AppExitResponse> didRequestAppExit() async {
- // Save the final arrangement, with a bound so an unavailable disk cannot
- // trap the user in the app. Input and tab switching never wait for disk.
- await ref
- .read(appStateProvider)
- .flushPaneLayout()
- .timeout(const Duration(seconds: 1), onTimeout: () {});
- return AppExitResponse.exit;
- }
-
- Future<void> _onAppMenu(MethodCall call) async {
- if (!mounted) return;
- switch (call.method) {
- case 'checkForUpdates':
- final app = ref.read(appStateProvider);
- await _menuDialog(() async {
- final result = await app.checkForUpdates();
- if (!mounted) return;
- await showUpdateCheckDialog(context, app, result);
- });
- case 'flashFirmware':
- await _menuDialog(() => showFlashFirmwareDialog(context));
- case 'showLayout':
- if (advanceLayoutPalette()) return;
- await _menuDialog(
- () => showLayoutPalette(context, ref.read(appStateProvider)),
- );
- case 'showShortcuts':
- await _menuDialog(() => showShortcutsSheet(context));
- case 'increaseTerminalFontSize':
- await terminalFontStore.increaseSize();
- case 'decreaseTerminalFontSize':
- await terminalFontStore.decreaseSize();
- case 'resetTerminalFontSize':
- await terminalFontStore.reset();
- }
- }
-
- Future<void> _menuDialog(Future<void> Function() action) async {
- if (_menuDialogOpen || ModalRoute.isCurrentOf(context) == false) return;
- // Reserve before the first frame too: held menu shortcuts can arrive
- // before the new dialog has changed the route's current state.
- _menuDialogOpen = true;
- try {
- await action();
- } finally {
- _menuDialogOpen = false;
- }
- }
- @override
- Widget build(BuildContext context) {
- final app = ref.watch(appStateProvider);
- return ListenableBuilder(
- listenable: app,
- builder: (context, _) {
- final Widget screen;
- switch (app.status) {
- case AppStatus.bootstrapping:
- // `bootstrapping` covers two unrelated moments: the app starting
- // cold, and a sign-in the user just began. The second keeps
- // LoginScreen, which carries the wait as a state of its own
- // button; swapping the window for a separate screen there was a
- // hard cut in the middle of a flow, and it is why that button's
- // spinner was almost never seen.
- //
- // ⚠️ Keyed on `signingIn`, NOT on `pendingAuthorizeUrl`. The URL
- // only exists for the middle stretch of the flow — the CLI has to
- // start before it can print one, and it is cleared again while
- // the post-login restore is still running — so keying on it blew
- // the user's own screen away twice per sign-in: once on the click
- // and again on success.
- screen = app.signingIn
- ? LoginScreen(notifier: app)
- : BootstrappingScreen(statusMessage: app.bootStatusMessage);
- case AppStatus.checkingEnvironment:
- screen = EnvironmentPreflightScreen(
- readiness: app.environmentReadiness,
- );
- case AppStatus.preparingEnvironment:
- screen = EnvironmentSetupScreen(notifier: app);
- case AppStatus.unauthenticated:
- screen = LoginScreen(notifier: app);
- case AppStatus.authenticated:
- // A phone gets one agent at a time, reached machine → agents → terminal:
- // the desktop's tab strip above a grid of panes does not fit in its width.
- screen = usePhoneLayout(context)
- ? PhoneShell(notifier: app)
- : SwarmScreen(notifier: app);
- }
- // Only the home shell carries its own drag handle and traffic-light
- // clearance (the rail's head). Every other screen fills the window
- // with a centred card, so the strip goes over it here, once, instead
- // of inside each of them.
- final framed = app.status == AppStatus.authenticated
- ? screen
- : FullWindowScreen(child: screen);
- // The band takes a row of its own rather than floating over one. As an
- // overlay it landed on the rail's head — covering the wordmark and the
- // three buttons beside it, which is the one strip of this window that
- // must stay reachable.
- return Column(
- children: [
- if (app.hasAvailableUpdate &&
- app.status != AppStatus.bootstrapping &&
- app.status != AppStatus.checkingEnvironment &&
- app.status != AppStatus.preparingEnvironment)
- UpdateNotice(notifier: app),
- Expanded(child: framed),
- ],
- );
- },
- );
- }
-}
+/// Harness for macOS, Linux and Windows: a swarm of terminal panes in one
+/// window. Everything before the first frame, and every screen up to sign-in,
+/// is [startHarness] — shared with `../mobile`, which mounts a phone shell here
+/// instead.
+Future<void> main() => startHarness(
+ authenticatedScreen: (app) => SwarmScreen(notifier: app),
+);
diff --git a/desktop/lib/main_local_manual.dart b/desktop/lib/main_local_manual.dart
index e22651cef..7fb2f04b3 100644
--- a/desktop/lib/main_local_manual.dart
+++ b/desktop/lib/main_local_manual.dart
@@ -1,10 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'app_shell.dart';
import 'auth/auth_session.dart';
import 'core/config.dart';
import 'core/desktop_window.dart';
-import 'main.dart' show DesktopApp;
+import 'screens/swarm_screen.dart';
import 'state/app_state.dart';
/// Normal interactive macOS app wired to a disposable local test stack.
@@ -49,7 +50,9 @@ Future<void> main() async {
runApp(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(notifier)],
- child: const DesktopApp(),
+ child: HarnessApp(
+ authenticatedScreen: (app) => SwarmScreen(notifier: app),
+ ),
),
);
}
diff --git a/desktop/lib/screens/login_screen.dart b/desktop/lib/screens/login_screen.dart
index 214374b1d..84ce70ffd 100644
--- a/desktop/lib/screens/login_screen.dart
+++ b/desktop/lib/screens/login_screen.dart
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
+import '../core/asset_owner.dart';
+
import '../shared/theme/app_theme.dart' as grid;
import '../state/app_state.dart';
import '../widgets/login_relay_diagram.dart';
@@ -307,6 +309,7 @@ class _AppMark extends StatelessWidget {
// No ClipRRect: the asset carries its own rounded corners, and clipping
// would cut the edge twice. Same reason About renders it bare.
child: Image.asset(
+ package: harnessAssetPackage,
'assets/app_icon.png',
width: 36,
height: 36,
diff --git a/desktop/lib/settings/sections/about_section.dart b/desktop/lib/settings/sections/about_section.dart
index b2576807c..75e6a5d2b 100644
--- a/desktop/lib/settings/sections/about_section.dart
+++ b/desktop/lib/settings/sections/about_section.dart
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
+import '../../core/asset_owner.dart';
+
import '../../core/app_version.dart';
import '../../core/build_identity.dart';
import '../../shared/theme/app_theme.dart' as grid;
@@ -161,6 +163,7 @@ class _Identity extends StatelessWidget {
// The icon is already rounded with transparent corners, so it needs no
// clip of its own — one would only cut its edge twice.
Image.asset(
+ package: harnessAssetPackage,
'assets/app_icon.png',
width: 46,
height: 46,
diff --git a/desktop/lib/widgets/bootstrapping_screen.dart b/desktop/lib/widgets/bootstrapping_screen.dart
index 791bdf2b5..170393132 100644
--- a/desktop/lib/widgets/bootstrapping_screen.dart
+++ b/desktop/lib/widgets/bootstrapping_screen.dart
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
+import '../core/asset_owner.dart';
+
import '../shared/theme/app_theme.dart' as grid;
import 'login_relay_diagram.dart';
@@ -148,6 +150,7 @@ class _BootAppMark extends StatelessWidget {
),
alignment: Alignment.center,
child: Image.asset(
+ package: harnessAssetPackage,
'assets/app_icon.png',
width: 36,
height: 36,
diff --git a/desktop/lib/widgets/engine_identity.dart b/desktop/lib/widgets/engine_identity.dart
index 595fde858..60c80ee13 100644
--- a/desktop/lib/widgets/engine_identity.dart
+++ b/desktop/lib/widgets/engine_identity.dart
@@ -1,5 +1,7 @@
import 'dart:math' as math;
+import '../core/asset_owner.dart';
+
import 'package:flutter/material.dart';
import '../theme/app_theme.dart';
@@ -143,6 +145,7 @@ class EngineMark extends StatelessWidget {
final identity = engineIdentity(engine, displayName: displayName);
final mark = identity.asset != null
? Image.asset(
+ package: harnessAssetPackage,
identity.asset!,
key: ValueKey('engine-icon-${identity.id}'),
width: size,
diff --git a/desktop/lib/widgets/swarm_wallpaper.dart b/desktop/lib/widgets/swarm_wallpaper.dart
index afc7ac398..7ce265ab1 100644
--- a/desktop/lib/widgets/swarm_wallpaper.dart
+++ b/desktop/lib/widgets/swarm_wallpaper.dart
@@ -1,5 +1,7 @@
import 'dart:async';
+import '../core/asset_owner.dart';
+
import 'package:flutter/material.dart';
/// Wallpaper belongs only to the empty new-swarm canvas.
@@ -11,8 +13,9 @@ class SwarmWallpaper extends StatefulWidget {
}
class _SwarmWallpaperState extends State<SwarmWallpaper> {
- static const _image = AssetImage(
+ static final _image = AssetImage(
'assets/swarm-wallpapers/swarm-welcome-dusk.jpg',
+ package: harnessAssetPackage,
);
ImageConfiguration _configuration = ImageConfiguration.empty;
diff --git a/desktop/test/app_menu_test.dart b/desktop/test/app_menu_test.dart
index 27b24d3c8..6eb4e0ef8 100644
--- a/desktop/test/app_menu_test.dart
+++ b/desktop/test/app_menu_test.dart
@@ -6,7 +6,8 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
-import 'package:harness/main.dart';
+import 'package:harness/app_shell.dart';
+import 'package:harness/screens/swarm_screen.dart';
import 'package:harness/settings/settings_screen.dart';
import 'package:harness/state/app_state.dart';
import 'package:harness/state/pane_preset.dart';
@@ -40,7 +41,7 @@ Future<void> _mount(WidgetTester tester, AppNotifier app) async {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -118,3 +119,7 @@ void main() {
app.dispose();
});
}
+
+/// The screen the desktop app mounts once signed in — the argument `HarnessApp`
+/// now takes, so the shell itself does not have to know about either app.
+Widget _swarm(AppNotifier app) => SwarmScreen(notifier: app);
diff --git a/desktop/test/boot_flow_widget_test.dart b/desktop/test/boot_flow_widget_test.dart
index 367a2b6c9..13b7b1fa5 100644
--- a/desktop/test/boot_flow_widget_test.dart
+++ b/desktop/test/boot_flow_widget_test.dart
@@ -10,7 +10,8 @@ import 'package:harness/bootstrap/environment_provisioner.dart';
import 'package:harness/core/config.dart';
import 'package:harness/core/local_key_value_store.dart';
import 'package:harness/core/models.dart';
-import 'package:harness/main.dart';
+import 'package:harness/app_shell.dart';
+import 'package:harness/screens/swarm_screen.dart';
import 'package:harness/settings/config_store.dart';
import 'package:harness/state/app_state.dart';
import 'package:harness/state/terminal_pane.dart';
@@ -486,7 +487,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
// `pump`, not `pumpAndSettle`: the sign-in screen's diagram and aurora
@@ -508,7 +509,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -529,7 +530,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -554,7 +555,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
@@ -594,7 +595,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -624,7 +625,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -679,7 +680,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -713,7 +714,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -756,7 +757,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -783,7 +784,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -803,7 +804,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -825,7 +826,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pumpAndSettle();
@@ -850,7 +851,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pumpAndSettle();
@@ -885,7 +886,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
// Endless animation on the sign-in screen underneath; pump instead.
@@ -966,7 +967,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -1018,7 +1019,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
// The link screen now arrives as a popup (a post-frame callback pushes a showDialog route
@@ -1074,7 +1075,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -1152,7 +1153,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -1175,3 +1176,7 @@ void main() {
app.dispose();
});
}
+
+/// The screen the desktop app mounts once signed in — the argument `HarnessApp`
+/// now takes, so the shell itself does not have to know about either app.
+Widget _swarm(AppNotifier app) => SwarmScreen(notifier: app);
diff --git a/desktop/test/swarm_async_test.dart b/desktop/test/swarm_async_test.dart
index 014250f3e..2178932d4 100644
--- a/desktop/test/swarm_async_test.dart
+++ b/desktop/test/swarm_async_test.dart
@@ -6,7 +6,8 @@ import 'dart:ui' show AppExitResponse;
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
-import 'package:harness/main.dart';
+import 'package:harness/app_shell.dart';
+import 'package:harness/screens/swarm_screen.dart';
import 'package:harness/state/app_state.dart';
import 'package:harness/state/swarm_catalog.dart';
import 'package:harness/ws/ws_conn.dart';
@@ -186,7 +187,7 @@ void main() {
await tester.pumpWidget(
ProviderScope(
overrides: [appStateProvider.overrideWithValue(app)],
- child: const DesktopApp(),
+ child: HarnessApp(authenticatedScreen: _swarm),
),
);
await tester.pump();
@@ -311,3 +312,7 @@ void main() {
},
);
}
+
+/// The screen the desktop app mounts once signed in — the argument `HarnessApp`
+/// now takes, so the shell itself does not have to know about either app.
+Widget _swarm(AppNotifier app) => SwarmScreen(notifier: app);
diff --git a/mobile/.gitignore b/mobile/.gitignore
new file mode 100644
index 000000000..79f7ecabd
--- /dev/null
+++ b/mobile/.gitignore
@@ -0,0 +1,48 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.build/
+.buildlog/
+.history
+.svn/
+.swiftpm/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins-dependencies
+.pub-cache/
+.pub/
+/build/
+/coverage/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
+
+# Widget Preview related
+.widget_preview/
diff --git a/mobile/.metadata b/mobile/.metadata
new file mode 100644
index 000000000..986c516c4
--- /dev/null
+++ b/mobile/.metadata
@@ -0,0 +1,33 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: "d3b14c876900e553bc736ca19295fc09e3853e8e"
+ channel: "stable"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: d3b14c876900e553bc736ca19295fc09e3853e8e
+ base_revision: d3b14c876900e553bc736ca19295fc09e3853e8e
+ - platform: android
+ create_revision: d3b14c876900e553bc736ca19295fc09e3853e8e
+ base_revision: d3b14c876900e553bc736ca19295fc09e3853e8e
+ - platform: ios
+ create_revision: d3b14c876900e553bc736ca19295fc09e3853e8e
+ base_revision: d3b14c876900e553bc736ca19295fc09e3853e8e
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/mobile/README.md b/mobile/README.md
new file mode 100644
index 000000000..1e9ddd091
--- /dev/null
+++ b/mobile/README.md
@@ -0,0 +1,17 @@
+# mobile
+
+A new Flutter project.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Learn Flutter](https://docs.flutter.dev/get-started/learn-flutter)
+- [Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
+- [Flutter learning resources](https://docs.flutter.dev/reference/learning-resources)
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml
new file mode 100644
index 000000000..cedcc10f5
--- /dev/null
+++ b/mobile/analysis_options.yaml
@@ -0,0 +1,38 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+analyzer:
+ exclude:
+ - build/**
+ - android/**
+ - ios/**
+ - web/**
+ - windows/**
+ - macos/**
+ - linux/**
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at https://dart.dev/lints.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/desktop/android/.gitignore b/mobile/android/.gitignore
similarity index 100%
rename from desktop/android/.gitignore
rename to mobile/android/.gitignore
diff --git a/desktop/android/app/build.gradle.kts b/mobile/android/app/build.gradle.kts
similarity index 100%
rename from desktop/android/app/build.gradle.kts
rename to mobile/android/app/build.gradle.kts
diff --git a/desktop/android/app/src/debug/AndroidManifest.xml b/mobile/android/app/src/debug/AndroidManifest.xml
similarity index 100%
rename from desktop/android/app/src/debug/AndroidManifest.xml
rename to mobile/android/app/src/debug/AndroidManifest.xml
diff --git a/desktop/android/app/src/main/AndroidManifest.xml b/mobile/android/app/src/main/AndroidManifest.xml
similarity index 100%
rename from desktop/android/app/src/main/AndroidManifest.xml
rename to mobile/android/app/src/main/AndroidManifest.xml
diff --git a/desktop/android/app/src/main/kotlin/com/example/harness/MainActivity.kt b/mobile/android/app/src/main/kotlin/com/example/harness/MainActivity.kt
similarity index 100%
rename from desktop/android/app/src/main/kotlin/com/example/harness/MainActivity.kt
rename to mobile/android/app/src/main/kotlin/com/example/harness/MainActivity.kt
diff --git a/desktop/android/app/src/main/res/drawable-v21/launch_background.xml b/mobile/android/app/src/main/res/drawable-v21/launch_background.xml
similarity index 100%
rename from desktop/android/app/src/main/res/drawable-v21/launch_background.xml
rename to mobile/android/app/src/main/res/drawable-v21/launch_background.xml
diff --git a/desktop/android/app/src/main/res/drawable/launch_background.xml b/mobile/android/app/src/main/res/drawable/launch_background.xml
similarity index 100%
rename from desktop/android/app/src/main/res/drawable/launch_background.xml
rename to mobile/android/app/src/main/res/drawable/launch_background.xml
diff --git a/desktop/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from desktop/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/desktop/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from desktop/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/desktop/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from desktop/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/desktop/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from desktop/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/desktop/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from desktop/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/desktop/android/app/src/main/res/values-night/styles.xml b/mobile/android/app/src/main/res/values-night/styles.xml
similarity index 100%
rename from desktop/android/app/src/main/res/values-night/styles.xml
rename to mobile/android/app/src/main/res/values-night/styles.xml
diff --git a/desktop/android/app/src/main/res/values/styles.xml b/mobile/android/app/src/main/res/values/styles.xml
similarity index 100%
rename from desktop/android/app/src/main/res/values/styles.xml
rename to mobile/android/app/src/main/res/values/styles.xml
diff --git a/desktop/android/app/src/profile/AndroidManifest.xml b/mobile/android/app/src/profile/AndroidManifest.xml
similarity index 100%
rename from desktop/android/app/src/profile/AndroidManifest.xml
rename to mobile/android/app/src/profile/AndroidManifest.xml
diff --git a/desktop/android/build.gradle.kts b/mobile/android/build.gradle.kts
similarity index 100%
rename from desktop/android/build.gradle.kts
rename to mobile/android/build.gradle.kts
diff --git a/desktop/android/gradle.properties b/mobile/android/gradle.properties
similarity index 100%
rename from desktop/android/gradle.properties
rename to mobile/android/gradle.properties
diff --git a/desktop/android/gradle/wrapper/gradle-wrapper.properties b/mobile/android/gradle/wrapper/gradle-wrapper.properties
similarity index 100%
rename from desktop/android/gradle/wrapper/gradle-wrapper.properties
rename to mobile/android/gradle/wrapper/gradle-wrapper.properties
diff --git a/desktop/android/settings.gradle.kts b/mobile/android/settings.gradle.kts
similarity index 100%
rename from desktop/android/settings.gradle.kts
rename to mobile/android/settings.gradle.kts
diff --git a/desktop/ios/.gitignore b/mobile/ios/.gitignore
similarity index 100%
rename from desktop/ios/.gitignore
rename to mobile/ios/.gitignore
diff --git a/desktop/ios/Flutter/AppFrameworkInfo.plist b/mobile/ios/Flutter/AppFrameworkInfo.plist
similarity index 100%
rename from desktop/ios/Flutter/AppFrameworkInfo.plist
rename to mobile/ios/Flutter/AppFrameworkInfo.plist
diff --git a/desktop/ios/Flutter/Debug.xcconfig b/mobile/ios/Flutter/Debug.xcconfig
similarity index 100%
rename from desktop/ios/Flutter/Debug.xcconfig
rename to mobile/ios/Flutter/Debug.xcconfig
diff --git a/desktop/ios/Flutter/Release.xcconfig b/mobile/ios/Flutter/Release.xcconfig
similarity index 100%
rename from desktop/ios/Flutter/Release.xcconfig
rename to mobile/ios/Flutter/Release.xcconfig
diff --git a/desktop/ios/Runner.xcodeproj/project.pbxproj b/mobile/ios/Runner.xcodeproj/project.pbxproj
similarity index 100%
rename from desktop/ios/Runner.xcodeproj/project.pbxproj
rename to mobile/ios/Runner.xcodeproj/project.pbxproj
diff --git a/desktop/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/mobile/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
similarity index 100%
rename from desktop/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
rename to mobile/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
diff --git a/desktop/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
similarity index 100%
rename from desktop/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
rename to mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
diff --git a/desktop/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
similarity index 100%
rename from desktop/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
rename to mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
diff --git a/desktop/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
similarity index 100%
rename from desktop/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
rename to mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
diff --git a/desktop/ios/Runner.xcworkspace/contents.xcworkspacedata b/mobile/ios/Runner.xcworkspace/contents.xcworkspacedata
similarity index 100%
rename from desktop/ios/Runner.xcworkspace/contents.xcworkspacedata
rename to mobile/ios/Runner.xcworkspace/contents.xcworkspacedata
diff --git a/desktop/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mobile/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
similarity index 100%
rename from desktop/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
rename to mobile/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
diff --git a/desktop/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mobile/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
similarity index 100%
rename from desktop/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
rename to mobile/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
diff --git a/desktop/ios/Runner/AppDelegate.swift b/mobile/ios/Runner/AppDelegate.swift
similarity index 100%
rename from desktop/ios/Runner/AppDelegate.swift
rename to mobile/ios/Runner/AppDelegate.swift
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
rename to mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
diff --git a/desktop/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
rename to mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
diff --git a/desktop/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
rename to mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
diff --git a/desktop/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
similarity index 100%
rename from desktop/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
rename to mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
diff --git a/desktop/ios/Runner/Base.lproj/LaunchScreen.storyboard b/mobile/ios/Runner/Base.lproj/LaunchScreen.storyboard
similarity index 100%
rename from desktop/ios/Runner/Base.lproj/LaunchScreen.storyboard
rename to mobile/ios/Runner/Base.lproj/LaunchScreen.storyboard
diff --git a/desktop/ios/Runner/Base.lproj/Main.storyboard b/mobile/ios/Runner/Base.lproj/Main.storyboard
similarity index 100%
rename from desktop/ios/Runner/Base.lproj/Main.storyboard
rename to mobile/ios/Runner/Base.lproj/Main.storyboard
diff --git a/desktop/ios/Runner/Info.plist b/mobile/ios/Runner/Info.plist
similarity index 100%
rename from desktop/ios/Runner/Info.plist
rename to mobile/ios/Runner/Info.plist
diff --git a/desktop/ios/Runner/Runner-Bridging-Header.h b/mobile/ios/Runner/Runner-Bridging-Header.h
similarity index 100%
rename from desktop/ios/Runner/Runner-Bridging-Header.h
rename to mobile/ios/Runner/Runner-Bridging-Header.h
diff --git a/desktop/ios/Runner/SceneDelegate.swift b/mobile/ios/Runner/SceneDelegate.swift
similarity index 100%
rename from desktop/ios/Runner/SceneDelegate.swift
rename to mobile/ios/Runner/SceneDelegate.swift
diff --git a/desktop/ios/RunnerTests/RunnerTests.swift b/mobile/ios/RunnerTests/RunnerTests.swift
similarity index 100%
rename from desktop/ios/RunnerTests/RunnerTests.swift
rename to mobile/ios/RunnerTests/RunnerTests.swift
diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart
new file mode 100644
index 000000000..b4f383982
--- /dev/null
+++ b/mobile/lib/main.dart
@@ -0,0 +1,27 @@
+import 'package:harness/app_shell.dart';
+import 'package:harness/core/asset_owner.dart';
+
+import 'phone/phone_shell.dart';
+
+/// Harness for iOS and Android: a viewer onto the machines this device has
+/// linked, one agent at a time.
+///
+/// Everything before the first frame — file logs, the crash log, the keyboard
+/// config, the saved appearance — and every screen up to sign-in comes from
+/// [startHarness] in `package:harness`, the same code the desktop app runs.
+/// This package adds only what a phone needs that a window does not: the shell
+/// in `lib/phone/`.
+///
+/// The app has no harness CLI beside it, so it is a VIEWER build: it holds its
+/// own SSO session and terminates the end-to-end encryption to each machine
+/// itself (`kViewerMode`, and `viewer/` in `package:harness`). That is decided
+/// by the platform, not here — a Mac can run the same path with
+/// `--dart-define=HARNESS_VIEWER_MODE=true`.
+Future<void> main() {
+ // `harness` is a dependency here rather than the root package, so Flutter
+ // registers its assets under `packages/harness/…`. Set before the first frame.
+ harnessAssetPackage = 'harness';
+ return startHarness(
+ authenticatedScreen: (app) => PhoneShell(notifier: app),
+ );
+}
diff --git a/desktop/lib/phone/account_button.dart b/mobile/lib/phone/account_button.dart
similarity index 96%
rename from desktop/lib/phone/account_button.dart
rename to mobile/lib/phone/account_button.dart
index b1b7b89e5..425008e10 100644
--- a/desktop/lib/phone/account_button.dart
+++ b/mobile/lib/phone/account_button.dart
@@ -2,8 +2,8 @@ import 'dart:async';
import 'package:flutter/material.dart';
-import '../shared/theme/app_theme.dart';
-import '../state/app_state.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/state/app_state.dart';
/// Who is signed in, as a round initial in the corner of the machine list — and, on a tap, the
/// one account action a viewer has: signing out.
diff --git a/desktop/lib/phone/agent_hero.dart b/mobile/lib/phone/agent_hero.dart
similarity index 99%
rename from desktop/lib/phone/agent_hero.dart
rename to mobile/lib/phone/agent_hero.dart
index 1931e2644..99527e570 100644
--- a/desktop/lib/phone/agent_hero.dart
+++ b/mobile/lib/phone/agent_hero.dart
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
-import '../shared/theme/app_theme.dart';
+import 'package:harness/shared/theme/app_theme.dart';
/// The row expanding into the header of the page it opens.
///
diff --git a/desktop/lib/phone/agent_index.dart b/mobile/lib/phone/agent_index.dart
similarity index 98%
rename from desktop/lib/phone/agent_index.dart
rename to mobile/lib/phone/agent_index.dart
index 8779e2397..dc0bbaaf7 100644
--- a/desktop/lib/phone/agent_index.dart
+++ b/mobile/lib/phone/agent_index.dart
@@ -1,5 +1,5 @@
-import '../core/models.dart';
-import '../state/app_state.dart';
+import 'package:harness/core/models.dart';
+import 'package:harness/state/app_state.dart';
import 'phone_status.dart';
/// One agent, together with the machine it runs on.
diff --git a/desktop/lib/phone/agent_row.dart b/mobile/lib/phone/agent_row.dart
similarity index 97%
rename from desktop/lib/phone/agent_row.dart
rename to mobile/lib/phone/agent_row.dart
index 19e16d116..0f85e51d2 100644
--- a/desktop/lib/phone/agent_row.dart
+++ b/mobile/lib/phone/agent_row.dart
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import '../shared/theme/app_theme.dart';
-import '../widgets/engine_identity.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/widgets/engine_identity.dart';
import 'agent_hero.dart';
import 'agent_index.dart';
import 'phone_card.dart';
diff --git a/desktop/lib/phone/agent_tile.dart b/mobile/lib/phone/agent_tile.dart
similarity index 92%
rename from desktop/lib/phone/agent_tile.dart
rename to mobile/lib/phone/agent_tile.dart
index 3a3d42dd7..a334347b1 100644
--- a/desktop/lib/phone/agent_tile.dart
+++ b/mobile/lib/phone/agent_tile.dart
@@ -1,10 +1,10 @@
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import '../core/models.dart';
-import '../shared/theme/app_theme.dart';
-import '../state/app_state.dart';
-import '../widgets/engine_identity.dart';
+import 'package:harness/core/models.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/state/app_state.dart';
+import 'package:harness/widgets/engine_identity.dart';
import 'agent_hero.dart';
import 'phone_card.dart';
import 'phone_status.dart';
diff --git a/desktop/lib/phone/agents_page.dart b/mobile/lib/phone/agents_page.dart
similarity index 96%
rename from desktop/lib/phone/agents_page.dart
rename to mobile/lib/phone/agents_page.dart
index efe22bf9c..4f5e78f78 100644
--- a/desktop/lib/phone/agents_page.dart
+++ b/mobile/lib/phone/agents_page.dart
@@ -3,10 +3,10 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import '../shared/theme/app_theme.dart';
-import '../shared/widgets/app_icon_button.dart';
-import '../shared/widgets/empty_state.dart';
-import '../state/app_state.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/shared/widgets/app_icon_button.dart';
+import 'package:harness/shared/widgets/empty_state.dart';
+import 'package:harness/state/app_state.dart';
import 'agent_hero.dart';
import 'agent_tile.dart';
import 'link_page.dart';
diff --git a/desktop/lib/phone/agents_tab.dart b/mobile/lib/phone/agents_tab.dart
similarity index 98%
rename from desktop/lib/phone/agents_tab.dart
rename to mobile/lib/phone/agents_tab.dart
index 4f6cbf822..e7556b394 100644
--- a/desktop/lib/phone/agents_tab.dart
+++ b/mobile/lib/phone/agents_tab.dart
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import '../shared/theme/app_theme.dart';
-import '../shared/widgets/empty_state.dart';
-import '../state/app_state.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/shared/widgets/empty_state.dart';
+import 'package:harness/state/app_state.dart';
import 'agent_hero.dart';
import 'agent_index.dart';
import 'agent_row.dart';
diff --git a/desktop/lib/phone/link_page.dart b/mobile/lib/phone/link_page.dart
similarity index 94%
rename from desktop/lib/phone/link_page.dart
rename to mobile/lib/phone/link_page.dart
index 21a52c074..38a4533ba 100644
--- a/desktop/lib/phone/link_page.dart
+++ b/mobile/lib/phone/link_page.dart
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
-import '../shared/theme/app_theme.dart';
-import '../state/app_state.dart';
-import '../widgets/link_machine_screen.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/state/app_state.dart';
+import 'package:harness/widgets/link_machine_screen.dart';
import 'agents_page.dart';
import 'phone_header.dart';
import 'phone_navigation.dart';
diff --git a/desktop/lib/phone/machine_filter_bar.dart b/mobile/lib/phone/machine_filter_bar.dart
similarity index 98%
rename from desktop/lib/phone/machine_filter_bar.dart
rename to mobile/lib/phone/machine_filter_bar.dart
index d4bfcf5d5..3cd0b9e18 100644
--- a/desktop/lib/phone/machine_filter_bar.dart
+++ b/mobile/lib/phone/machine_filter_bar.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
-import '../shared/theme/app_theme.dart';
-import '../state/app_state.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/state/app_state.dart';
import 'phone_status.dart';
import 'status_pill.dart';
diff --git a/desktop/lib/phone/machine_tile.dart b/mobile/lib/phone/machine_tile.dart
similarity index 95%
rename from desktop/lib/phone/machine_tile.dart
rename to mobile/lib/phone/machine_tile.dart
index 5903b2bad..810b81a6a 100644
--- a/desktop/lib/phone/machine_tile.dart
+++ b/mobile/lib/phone/machine_tile.dart
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import '../shared/theme/app_theme.dart';
-import '../state/app_state.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/state/app_state.dart';
import 'phone_card.dart';
import 'phone_status.dart';
import 'status_pill.dart';
diff --git a/desktop/lib/phone/machines_tab.dart b/mobile/lib/phone/machines_tab.dart
similarity index 96%
rename from desktop/lib/phone/machines_tab.dart
rename to mobile/lib/phone/machines_tab.dart
index f6b03358e..fc9b870ca 100644
--- a/desktop/lib/phone/machines_tab.dart
+++ b/mobile/lib/phone/machines_tab.dart
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import '../shared/theme/app_theme.dart';
-import '../shared/widgets/empty_state.dart';
-import '../state/app_state.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/shared/widgets/empty_state.dart';
+import 'package:harness/state/app_state.dart';
import 'machine_tile.dart';
import 'phone_card.dart';
import 'phone_header.dart';
diff --git a/desktop/lib/phone/phone_card.dart b/mobile/lib/phone/phone_card.dart
similarity index 97%
rename from desktop/lib/phone/phone_card.dart
rename to mobile/lib/phone/phone_card.dart
index 47838c2fc..a74b19b89 100644
--- a/desktop/lib/phone/phone_card.dart
+++ b/mobile/lib/phone/phone_card.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
-import '../shared/theme/app_theme.dart';
-import '../shared/widgets/skeleton.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/shared/widgets/skeleton.dart';
/// The gap between two cards in a phone list.
const double kPhoneCardGap = 10;
diff --git a/desktop/lib/phone/phone_header.dart b/mobile/lib/phone/phone_header.dart
similarity index 95%
rename from desktop/lib/phone/phone_header.dart
rename to mobile/lib/phone/phone_header.dart
index 90c3de5dc..bb0290a97 100644
--- a/desktop/lib/phone/phone_header.dart
+++ b/mobile/lib/phone/phone_header.dart
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import '../shared/theme/app_theme.dart';
-import '../shared/widgets/app_icon_button.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/shared/widgets/app_icon_button.dart';
/// The top of a phone page, drawn below the status bar and the Dynamic Island rather than into
/// them — the desktop chrome only ever had traffic lights to clear.
diff --git a/desktop/lib/phone/phone_layout.dart b/mobile/lib/phone/phone_layout.dart
similarity index 86%
rename from desktop/lib/phone/phone_layout.dart
rename to mobile/lib/phone/phone_layout.dart
index f1b981ffd..4f255e6d6 100644
--- a/desktop/lib/phone/phone_layout.dart
+++ b/mobile/lib/phone/phone_layout.dart
@@ -1,7 +1,7 @@
import 'package:flutter/widgets.dart';
-import '../core/viewer_mode.dart';
-import '../shared/layouts/window_size.dart';
+import 'package:harness/core/viewer_mode.dart';
+import 'package:harness/shared/layouts/window_size.dart';
/// The shortest side under which a viewer draws its phone layout — the shell's own compact
/// breakpoint, so an iPad keeps the rail beside its terminals.
diff --git a/desktop/lib/phone/phone_navigation.dart b/mobile/lib/phone/phone_navigation.dart
similarity index 98%
rename from desktop/lib/phone/phone_navigation.dart
rename to mobile/lib/phone/phone_navigation.dart
index b9c15eb4d..95f0c8e92 100644
--- a/desktop/lib/phone/phone_navigation.dart
+++ b/mobile/lib/phone/phone_navigation.dart
@@ -2,7 +2,7 @@ import 'dart:async';
import 'package:flutter/cupertino.dart';
-import '../state/app_state.dart';
+import 'package:harness/state/app_state.dart';
import 'agent_hero.dart';
import 'agents_page.dart';
import 'link_page.dart';
diff --git a/desktop/lib/phone/phone_sheet.dart b/mobile/lib/phone/phone_sheet.dart
similarity index 98%
rename from desktop/lib/phone/phone_sheet.dart
rename to mobile/lib/phone/phone_sheet.dart
index 59070a8d8..92a06cdb5 100644
--- a/desktop/lib/phone/phone_sheet.dart
+++ b/mobile/lib/phone/phone_sheet.dart
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
-import '../shared/theme/app_theme.dart';
+import 'package:harness/shared/theme/app_theme.dart';
/// One action in a phone sheet.
class PhoneSheetAction {
diff --git a/desktop/lib/phone/phone_shell.dart b/mobile/lib/phone/phone_shell.dart
similarity index 99%
rename from desktop/lib/phone/phone_shell.dart
rename to mobile/lib/phone/phone_shell.dart
index b045b79ee..57ce852e6 100644
--- a/desktop/lib/phone/phone_shell.dart
+++ b/mobile/lib/phone/phone_shell.dart
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
-import '../state/app_state.dart';
+import 'package:harness/state/app_state.dart';
import 'agent_index.dart';
import 'agents_tab.dart';
import 'machines_tab.dart';
diff --git a/desktop/lib/phone/phone_status.dart b/mobile/lib/phone/phone_status.dart
similarity index 95%
rename from desktop/lib/phone/phone_status.dart
rename to mobile/lib/phone/phone_status.dart
index 6200de474..35506b109 100644
--- a/desktop/lib/phone/phone_status.dart
+++ b/mobile/lib/phone/phone_status.dart
@@ -1,6 +1,6 @@
-import '../core/models.dart';
-import '../state/app_state.dart';
-import '../terminal/terminal_session.dart';
+import 'package:harness/core/models.dart';
+import 'package:harness/state/app_state.dart';
+import 'package:harness/terminal/terminal_session.dart';
/// How a phone status line is coloured. The widgets turn this into a palette colour, so the
/// rules below stay testable without a theme.
diff --git a/desktop/lib/phone/phone_tab_bar.dart b/mobile/lib/phone/phone_tab_bar.dart
similarity index 99%
rename from desktop/lib/phone/phone_tab_bar.dart
rename to mobile/lib/phone/phone_tab_bar.dart
index da81c0222..c9761a7d4 100644
--- a/desktop/lib/phone/phone_tab_bar.dart
+++ b/mobile/lib/phone/phone_tab_bar.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import '../shared/theme/app_theme.dart';
+import 'package:harness/shared/theme/app_theme.dart';
/// The three places a phone can be. Agents first: it is where the app opens and the only tab with
/// anything to act on.
diff --git a/desktop/lib/phone/settings_page.dart b/mobile/lib/phone/settings_page.dart
similarity index 96%
rename from desktop/lib/phone/settings_page.dart
rename to mobile/lib/phone/settings_page.dart
index f0e12fdda..f98d3b4b2 100644
--- a/desktop/lib/phone/settings_page.dart
+++ b/mobile/lib/phone/settings_page.dart
@@ -3,11 +3,11 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import '../core/app_version.dart';
-import '../shared/theme/app_theme.dart';
-import '../shared/theme/appearance_prefs_store.dart';
-import '../state/app_state.dart';
-import '../terminal/terminal_font_store.dart';
+import 'package:harness/core/app_version.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/shared/theme/appearance_prefs_store.dart';
+import 'package:harness/state/app_state.dart';
+import 'package:harness/terminal/terminal_font_store.dart';
import 'phone_header.dart';
import 'phone_sheet.dart';
import 'settings_row.dart';
diff --git a/desktop/lib/phone/settings_row.dart b/mobile/lib/phone/settings_row.dart
similarity index 99%
rename from desktop/lib/phone/settings_row.dart
rename to mobile/lib/phone/settings_row.dart
index 528cb5f89..d97e57b36 100644
--- a/desktop/lib/phone/settings_row.dart
+++ b/mobile/lib/phone/settings_row.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import '../shared/theme/app_theme.dart';
+import 'package:harness/shared/theme/app_theme.dart';
/// The pieces a phone settings list is built from — the grouped inset list every phone OS uses,
/// rather than the desktop's `SettingRow` (a raised block with a fixed-width control on the right,
diff --git a/desktop/lib/phone/status_pill.dart b/mobile/lib/phone/status_pill.dart
similarity index 97%
rename from desktop/lib/phone/status_pill.dart
rename to mobile/lib/phone/status_pill.dart
index 5a13c85eb..0f1c870c6 100644
--- a/desktop/lib/phone/status_pill.dart
+++ b/mobile/lib/phone/status_pill.dart
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
-import '../shared/theme/app_theme.dart';
+import 'package:harness/shared/theme/app_theme.dart';
import 'phone_status.dart';
/// The palette colour a [PhoneTone] draws in.
diff --git a/desktop/lib/phone/terminal_page.dart b/mobile/lib/phone/terminal_page.dart
similarity index 96%
rename from desktop/lib/phone/terminal_page.dart
rename to mobile/lib/phone/terminal_page.dart
index 44e37b4dd..19e078634 100644
--- a/desktop/lib/phone/terminal_page.dart
+++ b/mobile/lib/phone/terminal_page.dart
@@ -3,12 +3,12 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import '../shared/theme/app_theme.dart';
-import '../shared/widgets/app_icon_button.dart';
-import '../state/app_state.dart';
-import '../widgets/engine_identity.dart';
-import '../widgets/rename_agent_dialog.dart';
-import '../widgets/terminal_panel.dart';
+import 'package:harness/shared/theme/app_theme.dart';
+import 'package:harness/shared/widgets/app_icon_button.dart';
+import 'package:harness/state/app_state.dart';
+import 'package:harness/widgets/engine_identity.dart';
+import 'package:harness/widgets/rename_agent_dialog.dart';
+import 'package:harness/widgets/terminal_panel.dart';
import 'agent_hero.dart';
import 'phone_header.dart';
import 'phone_sheet.dart';
diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock
new file mode 100644
index 000000000..8218464e7
--- /dev/null
+++ b/mobile/pubspec.lock
@@ -0,0 +1,704 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.7.0"
+ async:
+ dependency: transitive
+ description:
+ name: async
+ sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.13.1"
+ boolean_selector:
+ dependency: transitive
+ description:
+ name: boolean_selector
+ sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.2"
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.4.1"
+ clock:
+ dependency: transitive
+ description:
+ name: clock
+ sha256: e51d50bca3217c9a9fa2b41a30e4a38971133f5f9ec7a3d57bae095007f1d28e
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.3"
+ collection:
+ dependency: transitive
+ description:
+ name: collection
+ sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.19.1"
+ convert:
+ dependency: transitive
+ description:
+ name: convert
+ sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.2"
+ cross_file:
+ dependency: transitive
+ description:
+ name: cross_file
+ sha256: f141ea4f277af142a0356955707f6556f37b03947d39d55585981a06ca437bd6
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.3.5+5"
+ crypto:
+ dependency: transitive
+ description:
+ name: crypto
+ sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.7"
+ cryptography:
+ dependency: transitive
+ description:
+ name: cryptography
+ sha256: "3eda3029d34ec9095a27a198ac9785630fe525c0eb6a49f3d575272f8e792ef0"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.9.0"
+ cupertino_icons:
+ dependency: "direct main"
+ description:
+ name: cupertino_icons
+ sha256: "41e005c33bd814be4d3096aff55b1908d419fde52ca656c8c47719ec745873cd"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.9"
+ dbus:
+ dependency: transitive
+ description:
+ name: dbus
+ sha256: a48d5da28e89bd02196e80d81ed8d7954923d00a0f4a68cc20b575038f023383
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.7.15"
+ desktop_drop:
+ dependency: transitive
+ description:
+ name: desktop_drop
+ sha256: "47ded09c85909edfed644fd4cbb5051b040d0aed5c79e7e062ea4b3b7156dbe4"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.8.4"
+ dio:
+ dependency: transitive
+ description:
+ name: dio
+ sha256: "852ec3b48cc431ac04fff978413c541502b67ffc3e26921e74e3d994694192c1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.11.1"
+ dio_web_adapter:
+ dependency: transitive
+ description:
+ name: dio_web_adapter
+ sha256: "3a1b2cd7be71086f38504956e3ebcd2837288d231ff454bafa78021244102bfc"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.2"
+ equatable:
+ dependency: transitive
+ description:
+ name: equatable
+ sha256: "3bce007a596ff8b3119c45d68aaef631272537c03d30e5d4534dd24bf4c5eaa2"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
+ fake_async:
+ dependency: transitive
+ description:
+ name: fake_async
+ sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.3"
+ ffi:
+ dependency: transitive
+ description:
+ name: ffi
+ sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.0"
+ ffi_leak_tracker:
+ dependency: transitive
+ description:
+ name: ffi_leak_tracker
+ sha256: "4093d4ef9ca06ffe2786e73bfb25e22aa92112b9bb4ec941f11e3e6b61489a97"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.1.2"
+ file_selector:
+ dependency: transitive
+ description:
+ name: file_selector
+ sha256: bd15e43e9268db636b53eeaca9f56324d1622af30e5c34d6e267649758c84d9a
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.0"
+ file_selector_android:
+ dependency: transitive
+ description:
+ name: file_selector_android
+ sha256: d670cd0ce77a2e785b18d8b4d0a8d6a222d6a813ec9b7ddf2790a1b4fb6fa92c
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.2+11"
+ file_selector_ios:
+ dependency: transitive
+ description:
+ name: file_selector_ios
+ sha256: "97269e5307a0ab813b1fa2430bada0a96e0afb74848417f8676f64ba5de0051c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.3+6"
+ file_selector_linux:
+ dependency: transitive
+ description:
+ name: file_selector_linux
+ sha256: da76400e7872ce7637ffdce12749ec24169c25f6195c28372208e65a24bcd2ab
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.4+1"
+ file_selector_macos:
+ dependency: transitive
+ description:
+ name: file_selector_macos
+ sha256: d57c62362766b5e7ae739448650b66c6aab7a68ba7ecc65e04018652645ae0f4
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.5+1"
+ file_selector_platform_interface:
+ dependency: transitive
+ description:
+ name: file_selector_platform_interface
+ sha256: "35e0bd61ebcdb91a3505813b055b09b79dfdc7d0aee9c09a7ba59ae4bb13dc85"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.7.0"
+ file_selector_web:
+ dependency: transitive
+ description:
+ name: file_selector_web
+ sha256: "73181fbc5257776d8ecaa6a94ab3c8e920ad143b9132a6d984a9271dfc6928d3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.5"
+ file_selector_windows:
+ dependency: transitive
+ description:
+ name: file_selector_windows
+ sha256: fbefc5fb92c6d3cbe8d284a2cd971b593bb07d2cd6da8557b81a862250b4acec
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.3+6"
+ flutter:
+ dependency: "direct main"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_lints:
+ dependency: "direct dev"
+ description:
+ name: flutter_lints
+ sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.0.0"
+ flutter_riverpod:
+ dependency: "direct main"
+ description:
+ name: flutter_riverpod
+ sha256: "9532ee6db4a943a1ed8383072a2e3eeda041db5657cdf6d2acecf3c21ecbe7e1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.6.1"
+ flutter_test:
+ dependency: "direct dev"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_web_plugins:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ go_router:
+ dependency: transitive
+ description:
+ name: go_router
+ sha256: d7a3576cb312649eaa51f2356450aed686085fb58fcdebda5b359aa951eef7ea
+ url: "https://pub.dev"
+ source: hosted
+ version: "17.5.0"
+ harness:
+ dependency: "direct main"
+ description:
+ path: "../desktop"
+ relative: true
+ source: path
+ version: "1.0.0+1"
+ http:
+ dependency: transitive
+ description:
+ name: http
+ sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.6.0"
+ http_parser:
+ dependency: transitive
+ description:
+ name: http_parser
+ sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.1.2"
+ json_annotation:
+ dependency: transitive
+ description:
+ name: json_annotation
+ sha256: "2a743920d81b7910627f68ee2c9ac1fc0bfee32b9fc3403587d7c6791ca12f80"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.12.0"
+ leak_tracker:
+ dependency: transitive
+ description:
+ name: leak_tracker
+ sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
+ url: "https://pub.dev"
+ source: hosted
+ version: "11.0.2"
+ leak_tracker_flutter_testing:
+ dependency: transitive
+ description:
+ name: leak_tracker_flutter_testing
+ sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.10"
+ leak_tracker_testing:
+ dependency: transitive
+ description:
+ name: leak_tracker_testing
+ sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.2"
+ lints:
+ dependency: transitive
+ description:
+ name: lints
+ sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.1.0"
+ logging:
+ dependency: transitive
+ description:
+ name: logging
+ sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.0"
+ lucide_icons_flutter:
+ dependency: "direct main"
+ description:
+ name: lucide_icons_flutter
+ sha256: "3d06144ccc67c29fd080704ee59b6e1927f67654a848443eceb130b2e425e080"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.19"
+ matcher:
+ dependency: transitive
+ description:
+ name: matcher
+ sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.12.20"
+ material_color_utilities:
+ dependency: transitive
+ description:
+ name: material_color_utilities
+ sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.13.0"
+ meta:
+ dependency: transitive
+ description:
+ name: meta
+ sha256: c82594181e3312f3d0695fc95aaaf7758d75b8d4ae2bbecf223b9fd5109a059d
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.18.3"
+ mime:
+ dependency: transitive
+ description:
+ name: mime
+ sha256: bd47de35f07e27267e69c8c8b22edf9473bfee170a60d60fcc93730c5144b7f6
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
+ package_info_plus:
+ dependency: transitive
+ description:
+ name: package_info_plus
+ sha256: "127e1751e37ffb2ff4658beeaca77bad0c27bf5f932bd3a501c2296926d4b481"
+ url: "https://pub.dev"
+ source: hosted
+ version: "10.2.1"
+ package_info_plus_platform_interface:
+ dependency: transitive
+ description:
+ name: package_info_plus_platform_interface
+ sha256: db762cb2f4f25ee60fb6359773861b0f199e00b90d237bd85a76a1e806b46ef4
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.1.0"
+ path:
+ dependency: transitive
+ description:
+ name: path
+ sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.9.1"
+ petitparser:
+ dependency: transitive
+ description:
+ name: petitparser
+ sha256: "91bd59303e9f769f108f8df05e371341b15d59e995e6806aefab827b58336675"
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.0.2"
+ plugin_platform_interface:
+ dependency: transitive
+ description:
+ name: plugin_platform_interface
+ sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.8"
+ quiver:
+ dependency: transitive
+ description:
+ name: quiver
+ sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.2.2"
+ riverpod:
+ dependency: transitive
+ description:
+ name: riverpod
+ sha256: "59062512288d3056b2321804332a13ffdd1bf16df70dcc8e506e411280a72959"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.6.1"
+ screen_retriever:
+ dependency: transitive
+ description:
+ name: screen_retriever
+ sha256: ace919117a7520c13a50a6259e60c4a0d4cbe98809468792a91b5c5adada2aa6
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.2"
+ screen_retriever_linux:
+ dependency: transitive
+ description:
+ name: screen_retriever_linux
+ sha256: "7b52006a5ceae1f3d5af7f77188c3290d6e7d8ded16d99809bea84967c65c257"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.2"
+ screen_retriever_macos:
+ dependency: transitive
+ description:
+ name: screen_retriever_macos
+ sha256: a1489b99cce597c45a54b9aae1cd94c8d4705353b7e0bb2457a6e4de44e0ad8a
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.2"
+ screen_retriever_platform_interface:
+ dependency: transitive
+ description:
+ name: screen_retriever_platform_interface
+ sha256: "94a5535277510a63184ca178ce12a1449bc0b38618879aa1c18bf57369c5064a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.2"
+ screen_retriever_windows:
+ dependency: transitive
+ description:
+ name: screen_retriever_windows
+ sha256: dafc6922b0bfbf1d48cf3ccbf519b4fff47bdcb820da1728ea6db675fecc9324
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.2"
+ sky_engine:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ source_span:
+ dependency: transitive
+ description:
+ name: source_span
+ sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.10.2"
+ sqlite3:
+ dependency: transitive
+ description:
+ name: sqlite3
+ sha256: "3145bd74dcdb4fd6f5c6dda4d4e4490a8087d7f286a14dee5d37087290f0f8a2"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.9.4"
+ stack_trace:
+ dependency: transitive
+ description:
+ name: stack_trace
+ sha256: "277654b3034d17ac6f9f1cb5595db011b1d5d41e8806866db28e0abaa101c490"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.12.2"
+ state_notifier:
+ dependency: transitive
+ description:
+ name: state_notifier
+ sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.0"
+ stream_channel:
+ dependency: transitive
+ description:
+ name: stream_channel
+ sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ string_scanner:
+ dependency: transitive
+ description:
+ name: string_scanner
+ sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.4.1"
+ term_glyph:
+ dependency: transitive
+ description:
+ name: term_glyph
+ sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.2"
+ test_api:
+ dependency: transitive
+ description:
+ name: test_api
+ sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.7.12"
+ typed_data:
+ dependency: transitive
+ description:
+ name: typed_data
+ sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.4.0"
+ universal_platform:
+ dependency: transitive
+ description:
+ name: universal_platform
+ sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.0"
+ unorm_dart:
+ dependency: transitive
+ description:
+ name: unorm_dart
+ sha256: "0c69186b03ca6addab0774bcc0f4f17b88d4ce78d9d4d8f0619e30a99ead58e7"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.3.2"
+ url_launcher:
+ dependency: transitive
+ description:
+ name: url_launcher
+ sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.3.2"
+ url_launcher_android:
+ dependency: transitive
+ description:
+ name: url_launcher_android
+ sha256: "611e87fb320b70d1dd721dc46af89c98aceccea9b31fde49e084591414e0c610"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.3.33"
+ url_launcher_ios:
+ dependency: transitive
+ description:
+ name: url_launcher_ios
+ sha256: "8faa1aab294f1ab4040b43660c887b0418d5fa4f0cffef76a484e6aa1092eb4a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.4.2"
+ url_launcher_linux:
+ dependency: transitive
+ description:
+ name: url_launcher_linux
+ sha256: "10f86fef4c2c43563fa6c211ff9cf757adf4d3ab762c56bd430664a947d70cd0"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.2.3"
+ url_launcher_macos:
+ dependency: transitive
+ description:
+ name: url_launcher_macos
+ sha256: "5e835a3b869c2d70325349c81c5a45c28e20791265b67b2669da6b08c5cd5201"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.2.6"
+ url_launcher_platform_interface:
+ dependency: transitive
+ description:
+ name: url_launcher_platform_interface
+ sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.2"
+ url_launcher_web:
+ dependency: transitive
+ description:
+ name: url_launcher_web
+ sha256: "85c81589622fbc87c1c683aaea164d3604a7777495a79d91e39ffcdec39ddb34"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.3"
+ url_launcher_windows:
+ dependency: transitive
+ description:
+ name: url_launcher_windows
+ sha256: "6c5ad3f22cd4c38e089b81963b3cd7bb83b111b2df5dce008bb066162f42e429"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.6"
+ vector_math:
+ dependency: transitive
+ description:
+ name: vector_math
+ sha256: f36f9f3be64c6198714492bb455c11056e33e2f85d9a0b676a48301e44fdcf47
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.2"
+ vm_service:
+ dependency: transitive
+ description:
+ name: vm_service
+ sha256: "5f37239c4851efcef929cea7824e76df7f2f0970aef85d66bbc430afa40e72f0"
+ url: "https://pub.dev"
+ source: hosted
+ version: "15.3.0"
+ web:
+ dependency: transitive
+ description:
+ name: web
+ sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ web_socket:
+ dependency: transitive
+ description:
+ name: web_socket
+ sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ web_socket_channel:
+ dependency: transitive
+ description:
+ name: web_socket_channel
+ sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.3"
+ win32:
+ dependency: transitive
+ description:
+ name: win32
+ sha256: a0b93865d5644f11cf6a8c3f6db909f1ec168958b5805f6cc684adea957cd63d
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.4.0"
+ window_manager:
+ dependency: transitive
+ description:
+ name: window_manager
+ sha256: "05c231fd7b23d2380f14c5cc10b7b93d60d4fa4a2fb4e0f032de27e44b5560e9"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.2"
+ xml:
+ dependency: transitive
+ description:
+ name: xml
+ sha256: "67f0aff7be013d107995e9b75bf4e7f2c3ef2dfdb2c8e68024bba0a7fd5756a4"
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.0.1"
+ xterm:
+ dependency: transitive
+ description:
+ path: "../desktop/third_party/xterm"
+ relative: true
+ source: path
+ version: "4.0.0"
+ zmodem:
+ dependency: transitive
+ description:
+ name: zmodem
+ sha256: "3b7e5b29f3a7d8aee472029b05165a68438eff2f3f7766edf13daba1e297adbf"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.0.6"
+sdks:
+ dart: ">=3.13.0 <4.0.0"
+ flutter: ">=3.44.0"
diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml
new file mode 100644
index 000000000..08c6941bb
--- /dev/null
+++ b/mobile/pubspec.yaml
@@ -0,0 +1,35 @@
+name: harness_mobile
+description: "Harness viewer for iOS and Android."
+publish_to: 'none'
+
+version: 1.0.0+1
+
+environment:
+ sdk: ^3.13.0
+
+dependencies:
+ flutter:
+ sdk: flutter
+
+ # The shared app: state, API, auth, WS/relay, E2EE, the viewer's stand-ins for
+ # the harness CLI, and the design system. A path dependency rather than a copy
+ # — the mobile work once lived in a separate checkout and drifted out of reach,
+ # which is the whole reason it had to be ported back by hand. One source, two
+ # entry points.
+ harness:
+ path: ../desktop
+
+ # Used directly by this package's own code (lib/phone/, lib/main.dart). Kept
+ # explicit rather than leaned on transitively, so an import here cannot break
+ # because the shared app dropped a dependency it no longer uses.
+ cupertino_icons: ^1.0.8
+ flutter_riverpod: ^2.6.1
+ lucide_icons_flutter: ^3.1.15
+
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+ flutter_lints: ^6.0.0
+
+flutter:
+ uses-material-design: true