diff --git a/.agents/skills/multi-agent-mux-ui/SKILL.md b/.agents/skills/multi-agent-mux-ui/SKILL.md deleted file mode 100644 index 7f34d93..0000000 --- a/.agents/skills/multi-agent-mux-ui/SKILL.md +++ /dev/null @@ -1,34 +0,0 @@ -# multi-agent-mux-ui - -MAM (Multi-Agent Mux) 에이전트 세션 및 스킬들을 직관적으로 제어하고 관리하기 위한 Flutter 기반 GUI/TUI 대시보드 프로그램입니다. - -## Related Skills - -- `multi-agent-mux-status` (읽기 전용 조회) -- `multi-agent-mux-stop` (세션 graceful stop & purge) -- `multi-agent-mux-create` (fresh 세션 생성) -- `multi-agent-mux-resume` (세션 복원) -- `multi-agent-mux-delegate-job` (비동기 잡 위임) - -## Structure - -- `packages/mam_core`: 공용 비동기 프로세스 래퍼, 세션 리스트 조회(status.sh래핑), stop/purge 락 및 에러 핸들러 -- `packages/mam_pty`: FFI PTY 스폰 로직 및 Web websocket-PTY 브릿지 -- `apps/mam_desktop`: Flutter Desktop 대시보드 (xterm 연동 attach 제어) -- `apps/mam_web`: Flutter Web 대시보드 (WebSocket 데몬 브릿지 통신) -- `apps/mam_tui`: 순수 Dart TUI (inheritStdio foreground attach) - -## Execution - -- **Desktop 기동**: - ```bash - flutter run -d linux --device-id=linux .agents/skills/multi-agent-mux-ui/apps/mam_desktop - ``` -- **Web 기동**: - ```bash - flutter run -d chrome .agents/skills/multi-agent-mux-ui/apps/mam_web - ``` -- **TUI 기동**: - ```bash - dart run .agents/skills/multi-agent-mux-ui/apps/mam_tui - ``` diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/.gitignore b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/.gitignore deleted file mode 100644 index 3820a95..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -# 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 diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/.metadata b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/.metadata deleted file mode 100644 index 224d2d9..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/.metadata +++ /dev/null @@ -1,36 +0,0 @@ -# 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: "924134a44c189315be2148659913dda1671cbe99" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: 924134a44c189315be2148659913dda1671cbe99 - base_revision: 924134a44c189315be2148659913dda1671cbe99 - - platform: linux - create_revision: 924134a44c189315be2148659913dda1671cbe99 - base_revision: 924134a44c189315be2148659913dda1671cbe99 - - platform: macos - create_revision: 924134a44c189315be2148659913dda1671cbe99 - base_revision: 924134a44c189315be2148659913dda1671cbe99 - - platform: windows - create_revision: 924134a44c189315be2148659913dda1671cbe99 - base_revision: 924134a44c189315be2148659913dda1671cbe99 - - # 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/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/README.md b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/README.md deleted file mode 100644 index a7267ed..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# mam_desktop - -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/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/analysis_options.yaml b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/analysis_options.yaml deleted file mode 100644 index 0d29021..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/analysis_options.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# 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 - -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/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/main.dart b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/main.dart deleted file mode 100644 index 3538563..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/main.dart +++ /dev/null @@ -1,156 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:mam_core/mam_core.dart'; - -import 'src/providers/session_providers.dart'; -import 'src/theme/app_theme.dart'; -import 'src/widgets/detail_pane.dart'; -import 'src/widgets/session_table.dart'; -import 'src/widgets/stale_banner.dart'; - -void main() { - runApp(const ProviderScope(child: MamDesktopApp())); -} - -class MamDesktopApp extends StatelessWidget { - const MamDesktopApp({super.key}); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'multi-agent-mux', - debugShowCheckedModeBanner: false, - theme: buildAppTheme(), - home: const DashboardScreen(), - ); - } -} - -class DashboardScreen extends ConsumerWidget { - const DashboardScreen({super.key}); - - @override - Widget build(BuildContext context, WidgetRef ref) { - final pollAsync = ref.watch(sessionsPollProvider); - - return Scaffold( - body: DecoratedBox( - decoration: const BoxDecoration(gradient: backgroundGradient), - child: SafeArea( - child: pollAsync.when( - data: (poll) => _DashboardBody(poll: poll), - loading: () => const Center(child: CircularProgressIndicator()), - error: (error, stackTrace) => _ErrorScreen(error: error), - ), - ), - ), - ); - } -} - -class _ErrorScreen extends StatelessWidget { - final Object error; - const _ErrorScreen({required this.error}); - - @override - Widget build(BuildContext context) { - return Center( - child: Padding( - padding: const EdgeInsets.all(32), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(Icons.error_outline, color: AppColors.danger, size: 40), - const SizedBox(height: 12), - Text( - 'Failed to start status polling:\n$error', - textAlign: TextAlign.center, - style: const TextStyle(color: AppColors.danger), - ), - ], - ), - ), - ); - } -} - -class _DashboardBody extends ConsumerWidget { - final SessionsPoll poll; - const _DashboardBody({required this.poll}); - - @override - Widget build(BuildContext context, WidgetRef ref) { - final selectedName = ref.watch(selectedSessionNameProvider); - final sessions = poll.snapshot?.sessions ?? const []; - final matches = sessions.where((s) => s.name == selectedName); - final selectedRow = matches.isEmpty ? null : matches.first; - - return Column( - children: [ - _TopBar(poll: poll), - StaleBanner(poll: poll), - Expanded( - child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Expanded( - flex: 3, - child: Padding( - padding: const EdgeInsets.all(16), - child: SessionTable( - sessions: sessions, - selectedName: selectedName, - onSelect: (name) => - ref.read(selectedSessionNameProvider.notifier).state = - name, - ), - ), - ), - SizedBox(width: 380, child: DetailPane(session: selectedRow)), - ], - ), - ), - ], - ); - } -} - -class _TopBar extends StatelessWidget { - final SessionsPoll poll; - const _TopBar({required this.poll}); - - @override - Widget build(BuildContext context) { - final count = poll.snapshot?.sessions.length ?? 0; - return Padding( - padding: const EdgeInsets.fromLTRB(20, 16, 20, 0), - child: Row( - children: [ - const Text( - 'multi-agent-mux', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w700, - color: AppColors.textPrimary, - ), - ), - const SizedBox(width: 12), - Container( - padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4), - decoration: BoxDecoration( - color: AppColors.accent.withValues(alpha: 0.18), - borderRadius: BorderRadius.circular(999), - ), - child: Text( - '$count session${count == 1 ? '' : 's'}', - style: const TextStyle( - color: AppColors.accent2, - fontWeight: FontWeight.w600, - ), - ), - ), - ], - ), - ); - } -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/providers/session_providers.dart b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/providers/session_providers.dart deleted file mode 100644 index b328d5c..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/providers/session_providers.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:mam_core/mam_core.dart'; - -import '../status_script_locator.dart'; - -/// The single [SessionService] instance for this app run — owns the -/// resolved path to `status.sh`. -final sessionServiceProvider = Provider((ref) { - return SessionService(statusScriptPath: locateStatusScript()); -}); - -/// Polling + stale/backoff (D6) sits in `mam_core`; this provider just wires -/// it up. `apps/mam_desktop` does not reimplement the timer/backoff logic. -final statusRepositoryProvider = Provider((ref) { - return StatusRepository(sessionService: ref.watch(sessionServiceProvider)); -}); - -/// Reactive stream of [SessionsPoll] the UI subscribes to. 4s base interval -/// on success, backing off to 6s/15s on repeated `status.sh` failures. -final sessionsPollProvider = StreamProvider((ref) { - final repo = ref.watch(statusRepositoryProvider); - return repo.watch(); -}); - -/// Currently selected row name for the Master-Detail layout. -final selectedSessionNameProvider = StateProvider((ref) => null); diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/status_script_locator.dart b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/status_script_locator.dart deleted file mode 100644 index 08c61c6..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/status_script_locator.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'dart:io'; - -/// Locates `status.sh` by walking up from the current working directory to -/// the repo root (marked by `.git`), then descending a fixed path — robust -/// regardless of which subdirectory `flutter run` happens to be invoked -/// from, unlike a hardcoded relative path. -String locateStatusScript() { - var dir = Directory.current; - while (!Directory('${dir.path}/.git').existsSync()) { - final parent = dir.parent; - if (parent.path == dir.path) { - throw StateError( - 'Could not locate the repo root (.git) from ${Directory.current.path}. ' - 'Run mam_desktop from within the multi-agent-mux repo checkout.', - ); - } - dir = parent; - } - - final scriptPath = - '${dir.path}/.agents/skills/multi-agent-mux-status/scripts/status.sh'; - if (!File(scriptPath).existsSync()) { - throw StateError('status.sh not found at $scriptPath'); - } - return scriptPath; -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/theme/app_theme.dart b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/theme/app_theme.dart deleted file mode 100644 index a1620f8..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/theme/app_theme.dart +++ /dev/null @@ -1,50 +0,0 @@ -import 'package:flutter/material.dart'; - -class AppColors { - AppColors._(); - - static const bgTop = Color(0xFF0B0F1A); - static const bgBottom = Color(0xFF141B2E); - static const accent = Color(0xFF7C5CFF); - static const accent2 = Color(0xFF19C6E0); - static const surface = Color(0xFF171E31); - static const surfaceAlt = Color(0xFF1E2740); - static const border = Color(0xFF2A3350); - static const textPrimary = Color(0xFFEAF0FF); - static const textSecondary = Color(0xFF93A0C4); - static const danger = Color(0xFFFF5C7A); - static const warning = Color(0xFFFFB454); - static const success = Color(0xFF4CE0B3); -} - -const backgroundGradient = LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [AppColors.bgTop, AppColors.bgBottom], -); - -ThemeData buildAppTheme() { - final base = ThemeData(brightness: Brightness.dark, useMaterial3: true); - return base.copyWith( - scaffoldBackgroundColor: AppColors.bgTop, - colorScheme: base.colorScheme.copyWith( - primary: AppColors.accent, - secondary: AppColors.accent2, - surface: AppColors.surface, - error: AppColors.danger, - ), - textTheme: base.textTheme.apply( - bodyColor: AppColors.textPrimary, - displayColor: AppColors.textPrimary, - ), - dividerColor: AppColors.border, - cardTheme: CardThemeData( - color: AppColors.surface, - elevation: 0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(16), - side: const BorderSide(color: AppColors.border), - ), - ), - ); -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/detail_pane.dart b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/detail_pane.dart deleted file mode 100644 index abfe1d1..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/detail_pane.dart +++ /dev/null @@ -1,292 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:mam_core/mam_core.dart'; - -import '../theme/app_theme.dart'; -import 'terminal_pane.dart'; - -class _KV { - final String label; - final String value; - final bool copyable; - const _KV(this.label, this.value, {this.copyable = false}); -} - -class DetailPane extends StatelessWidget { - final SessionRow? session; - const DetailPane({super.key, required this.session}); - - @override - Widget build(BuildContext context) { - final s = session; - return DecoratedBox( - decoration: const BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [AppColors.surface, AppColors.surfaceAlt], - ), - border: Border(left: BorderSide(color: AppColors.border)), - ), - child: s == null - ? const _EmptyDetail() - : DefaultTabController( - length: 2, - child: Column( - children: [ - const TabBar( - tabs: [ - Tab(text: 'INFO'), - Tab(text: 'TERMINAL'), - ], - labelColor: AppColors.accent2, - unselectedLabelColor: AppColors.textSecondary, - indicatorColor: AppColors.accent2, - ), - Expanded( - child: TabBarView( - children: [ - _DetailContent(session: s), - TerminalPane( - sessionName: s.name, - serverName: s.server, - ), - ], - ), - ), - ], - ), - ), - ); - } -} - -class _EmptyDetail extends StatelessWidget { - const _EmptyDetail(); - - @override - Widget build(BuildContext context) { - return const Center( - child: Text( - 'Select a session to see details', - style: TextStyle(color: AppColors.textSecondary), - ), - ); - } -} - -class _DetailContent extends StatelessWidget { - final SessionRow session; - const _DetailContent({required this.session}); - - @override - Widget build(BuildContext context) { - final s = session; - return SingleChildScrollView( - padding: const EdgeInsets.all(24), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - _Header(session: s), - const SizedBox(height: 24), - _Section( - title: 'PANE', - entries: [ - _KV('pid', s.pane.pid?.toString() ?? '?'), - _KV('cwd', s.pane.cwd ?? '?'), - _KV('cmd', s.pane.cmd ?? '?'), - _KV('cmd_full', s.pane.cmdFull ?? '?', copyable: true), - ], - ), - const SizedBox(height: 16), - _Section( - title: 'ATTACH', - entries: [ - _KV('attach_command', s.attachCommand ?? '?', copyable: true), - _KV('start_command', s.startCommand ?? '?', copyable: true), - ], - ), - const SizedBox(height: 16), - _Section( - title: 'STATUS', - entries: [ - _KV('last_visible_status', s.lastVisibleStatus ?? '?'), - _KV('resume_state', s.resumeState), - _KV('job_id', s.jobId), - _KV('job_status', s.jobStatus), - _KV( - 'drift_classes', - s.driftClasses.isEmpty ? '-' : s.driftClasses.join(', '), - ), - ], - ), - ], - ), - ); - } -} - -class _Header extends StatelessWidget { - final SessionRow session; - const _Header({required this.session}); - - @override - Widget build(BuildContext context) { - final s = session; - return Container( - width: double.infinity, - padding: const EdgeInsets.all(20), - decoration: BoxDecoration( - gradient: const LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [AppColors.accent, AppColors.accent2], - ), - borderRadius: BorderRadius.circular(20), - boxShadow: [ - BoxShadow( - color: AppColors.accent.withValues(alpha: 0.35), - blurRadius: 24, - offset: const Offset(0, 8), - ), - ], - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - s.name, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w700, - color: Colors.white, - ), - ), - const SizedBox(height: 10), - Wrap( - spacing: 8, - runSpacing: 8, - children: [ - _Pill(text: s.status.toUpperCase()), - _Pill(text: s.herdrAlive ? 'HERDR ALIVE' : 'HERDR DEAD'), - if (s.role != null) _Pill(text: s.role!.toUpperCase()), - _Pill(text: 'SERVER: ${s.server}'), - ], - ), - ], - ), - ); - } -} - -class _Pill extends StatelessWidget { - final String text; - const _Pill({required this.text}); - - @override - Widget build(BuildContext context) { - return Container( - padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4), - decoration: BoxDecoration( - color: Colors.black.withValues(alpha: 0.25), - borderRadius: BorderRadius.circular(999), - ), - child: Text( - text, - style: const TextStyle( - color: Colors.white, - fontSize: 11, - fontWeight: FontWeight.w600, - ), - ), - ); - } -} - -class _Section extends StatelessWidget { - final String title; - final List<_KV> entries; - const _Section({required this.title, required this.entries}); - - @override - Widget build(BuildContext context) { - return Container( - width: double.infinity, - padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - color: AppColors.surface, - borderRadius: BorderRadius.circular(16), - border: Border.all(color: AppColors.border), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - title, - style: const TextStyle( - color: AppColors.textSecondary, - fontSize: 12, - fontWeight: FontWeight.w700, - letterSpacing: 1.2, - ), - ), - const SizedBox(height: 12), - ...entries.map((e) => _KVRow(entry: e)), - ], - ), - ); - } -} - -class _KVRow extends StatelessWidget { - final _KV entry; - const _KVRow({required this.entry}); - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.symmetric(vertical: 6), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - width: 130, - child: Text( - entry.label, - style: const TextStyle( - color: AppColors.textSecondary, - fontSize: 12, - ), - ), - ), - Expanded( - child: SelectableText( - entry.value, - style: const TextStyle( - color: AppColors.textPrimary, - fontSize: 13, - fontFamily: 'monospace', - ), - ), - ), - if (entry.copyable) - SizedBox( - width: 32, - height: 32, - child: IconButton( - padding: EdgeInsets.zero, - icon: const Icon( - Icons.copy, - size: 15, - color: AppColors.textSecondary, - ), - tooltip: 'Copy', - onPressed: () => - Clipboard.setData(ClipboardData(text: entry.value)), - ), - ), - ], - ), - ); - } -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/session_table.dart b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/session_table.dart deleted file mode 100644 index 5115b2f..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/session_table.dart +++ /dev/null @@ -1,167 +0,0 @@ -import 'package:data_table_2/data_table_2.dart'; -import 'package:flutter/material.dart'; -import 'package:mam_core/mam_core.dart'; - -import '../theme/app_theme.dart'; - -class SessionTable extends StatelessWidget { - final List sessions; - final String? selectedName; - final ValueChanged onSelect; - - const SessionTable({ - super.key, - required this.sessions, - required this.selectedName, - required this.onSelect, - }); - - @override - Widget build(BuildContext context) { - return Container( - decoration: BoxDecoration( - color: AppColors.surface, - borderRadius: BorderRadius.circular(16), - border: Border.all(color: AppColors.border), - ), - clipBehavior: Clip.antiAlias, - child: DataTable2( - columnSpacing: 16, - horizontalMargin: 16, - minWidth: 900, - headingRowColor: WidgetStateProperty.all(AppColors.surfaceAlt), - headingTextStyle: const TextStyle( - color: AppColors.textSecondary, - fontWeight: FontWeight.w700, - fontSize: 12, - letterSpacing: 0.6, - ), - dataRowHeight: 44, - empty: const Center( - child: Text( - '(no sessions registered)', - style: TextStyle(color: AppColors.textSecondary), - ), - ), - columns: const [ - DataColumn2(label: Text('NAME'), size: ColumnSize.L), - DataColumn2(label: Text('SERVER'), size: ColumnSize.S), - DataColumn2(label: Text('YAML'), size: ColumnSize.S), - DataColumn2(label: Text('HERDR'), size: ColumnSize.S), - DataColumn2(label: Text('CMD'), size: ColumnSize.S), - DataColumn2(label: Text('RESUME'), size: ColumnSize.S), - DataColumn2(label: Text('JOB_ID'), size: ColumnSize.S), - DataColumn2(label: Text('JOB_STATUS'), size: ColumnSize.S), - DataColumn2(label: Text('DRIFT'), size: ColumnSize.S), - ], - rows: sessions.map((s) { - final selected = s.name == selectedName; - return DataRow2( - selected: selected, - color: selected - ? WidgetStateProperty.all( - AppColors.accent.withValues(alpha: 0.16), - ) - : null, - onTap: () => onSelect(s.name), - cells: [ - DataCell( - Text( - s.name, - overflow: TextOverflow.ellipsis, - style: const TextStyle(color: AppColors.textPrimary), - ), - ), - DataCell( - Text( - s.server, - style: const TextStyle(color: AppColors.textSecondary), - ), - ), - DataCell(_StatusChip(status: s.status)), - DataCell(_HerdrChip(alive: s.herdrAlive)), - DataCell( - Text( - s.pane.cmd ?? '?', - style: const TextStyle(color: AppColors.textPrimary), - ), - ), - DataCell( - Text( - s.resumeState, - style: const TextStyle(color: AppColors.textSecondary), - ), - ), - DataCell( - Text( - s.jobId, - style: const TextStyle(color: AppColors.textSecondary), - ), - ), - DataCell( - Text( - s.jobStatus, - style: const TextStyle(color: AppColors.textSecondary), - ), - ), - DataCell( - s.hasDrift - ? Text( - s.driftClasses.join(','), - style: const TextStyle( - color: AppColors.warning, - fontWeight: FontWeight.w600, - ), - ) - : const Text( - '-', - style: TextStyle(color: AppColors.textSecondary), - ), - ), - ], - ); - }).toList(), - ), - ); - } -} - -class _StatusChip extends StatelessWidget { - final String status; - const _StatusChip({required this.status}); - - @override - Widget build(BuildContext context) { - Color color; - switch (status) { - case 'running': - color = AppColors.success; - case 'stopped': - case 'terminated': - case 'archived': - color = AppColors.textSecondary; - default: - color = AppColors.warning; - } - return Text( - status, - style: TextStyle(color: color, fontWeight: FontWeight.w600), - ); - } -} - -class _HerdrChip extends StatelessWidget { - final bool alive; - const _HerdrChip({required this.alive}); - - @override - Widget build(BuildContext context) { - return Text( - alive ? 'alive' : 'dead', - style: TextStyle( - color: alive ? AppColors.success : AppColors.danger, - fontWeight: FontWeight.w600, - ), - ); - } -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/stale_banner.dart b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/stale_banner.dart deleted file mode 100644 index 5d6e430..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/stale_banner.dart +++ /dev/null @@ -1,51 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mam_core/mam_core.dart'; - -import '../theme/app_theme.dart'; - -/// D6: when `status.sh` polling fails, the last good snapshot is kept and -/// this banner surfaces staleness instead of the dashboard silently -/// blanking out or crashing. -class StaleBanner extends StatelessWidget { - final SessionsPoll poll; - const StaleBanner({super.key, required this.poll}); - - @override - Widget build(BuildContext context) { - final shouldShow = poll.stale || (poll.snapshot == null && poll.error != null); - if (!shouldShow) return const SizedBox.shrink(); - - final lastOk = poll.lastOkAt; - final lastOkText = lastOk == null - ? 'never' - : '${lastOk.hour.toString().padLeft(2, '0')}:' - '${lastOk.minute.toString().padLeft(2, '0')}:' - '${lastOk.second.toString().padLeft(2, '0')}'; - - return Container( - width: double.infinity, - padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), - color: AppColors.warning.withValues(alpha: 0.15), - child: Row( - children: [ - const Icon( - Icons.warning_amber_rounded, - color: AppColors.warning, - size: 18, - ), - const SizedBox(width: 8), - Expanded( - child: Text( - '⚠ status snapshot stale (last ok: $lastOkText)${poll.error != null ? ' — Error: ${poll.error}' : ''}', - style: const TextStyle( - color: AppColors.warning, - fontWeight: FontWeight.w600, - ), - overflow: TextOverflow.ellipsis, - ), - ), - ], - ), - ); - } -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/terminal_pane.dart b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/terminal_pane.dart deleted file mode 100644 index a2d7381..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/lib/src/widgets/terminal_pane.dart +++ /dev/null @@ -1,141 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; -import 'package:flutter/material.dart'; -import 'package:xterm/xterm.dart'; -import 'package:mam_pty/mam_pty.dart'; -import '../theme/app_theme.dart'; - -class TerminalPane extends StatefulWidget { - final String sessionName; - final String serverName; - final VoidCallback? onClosed; - - const TerminalPane({ - super.key, - required this.sessionName, - required this.serverName, - this.onClosed, - }); - - @override - State createState() => _TerminalPaneState(); -} - -class _TerminalPaneState extends State { - late final Terminal _terminal; - PtySession? _pty; - StreamSubscription>? _stdoutSub; - bool _hasError = false; - String _errorMessage = ''; - - @override - void initState() { - super.initState(); - _terminal = Terminal( - maxLines: 1000, - ); - _startPty(); - } - - Future _startPty() async { - try { - final pty = await PtySession.start( - 'herdr', - ['-L', widget.serverName, 'session', 'attach', widget.sessionName], - ); - if (!mounted) { - pty.close(); - return; - } - - setState(() { - _pty = pty; - }); - - // Handle PTY stdout stream data redirection to xterm widget - _stdoutSub = pty.stdout.listen( - (data) { - _terminal.write(utf8.decode(data, allowMalformed: true)); - }, - onError: (err) { - _showError(err.toString()); - }, - onDone: () { - widget.onClosed?.call(); - }, - ); - - // Handle user keyboard inputs redirection from xterm to PTY using onOutput (xterm v3) - _terminal.onOutput = (data) { - _pty?.writeString(data); - }; - - // Handle user-driven terminal layout resizes (4 args in xterm v3) - _terminal.onResize = (cols, rows, pxW, pxH) { - _pty?.resize(cols, rows); - }; - } catch (e) { - _showError(e.toString()); - } - } - - void _showError(String message) { - if (mounted) { - setState(() { - _hasError = true; - _errorMessage = message; - }); - } - } - - @override - void dispose() { - _stdoutSub?.cancel(); - _pty?.close(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - if (_hasError) { - return Center( - child: Padding( - padding: const EdgeInsets.all(24), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(Icons.error_outline, color: AppColors.danger, size: 40), - const SizedBox(height: 12), - Text( - 'PTY Session failed:\n$_errorMessage', - textAlign: TextAlign.center, - style: const TextStyle(color: AppColors.danger), - ), - const SizedBox(height: 16), - ElevatedButton( - onPressed: () { - setState(() { - _hasError = false; - _errorMessage = ''; - }); - _startPty(); - }, - child: const Text('Retry'), - ), - ], - ), - ), - ); - } - - return Container( - color: Colors.black, - padding: const EdgeInsets.all(8), - child: TerminalView( - _terminal, - autofocus: true, - backgroundOpacity: 1.0, - ), - ); - } -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/.gitignore b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/.gitignore deleted file mode 100644 index d3896c9..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -flutter/ephemeral diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/CMakeLists.txt b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/CMakeLists.txt deleted file mode 100644 index 75f3908..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/CMakeLists.txt +++ /dev/null @@ -1,128 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.13) -project(runner LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "mam_desktop") -# The unique GTK application identifier for this application. See: -# https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.mam.mam_desktop") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(SET CMP0063 NEW) - -# Load bundled libraries from the lib/ directory relative to the binary. -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") - -# Root filesystem for cross-building. -if(FLUTTER_TARGET_PLATFORM_SYSROOT) - set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -endif() - -# Define build configuration options. -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Debug" CACHE - STRING "Flutter build mode" FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Profile" "Release") -endif() - -# Compilation settings that should be applied to most targets. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_14) - target_compile_options(${TARGET} PRIVATE -Wall -Werror) - target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") - target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) - -# Application build; see runner/CMakeLists.txt. -add_subdirectory("runner") - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) - -# Only the install-generated bundle's copy of the executable will launch -# correctly, since the resources must in the right relative locations. To avoid -# people trying to run the unbundled copy, put it in a subdirectory instead of -# the default top-level location. -set_target_properties(${BINARY_NAME} - PROPERTIES - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" -) - - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# By default, "installing" just makes a relocatable bundle in the build -# directory. -set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -# Start with a clean build bundle directory every time. -install(CODE " - file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") - " COMPONENT Runtime) - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") - -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) - install(FILES "${bundled_library}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endforeach(bundled_library) - -# Copy the native assets provided by the build.dart from all packages. -set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") -install(DIRECTORY "${NATIVE_ASSETS_DIR}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -# Fully re-copy the assets directory on each build to avoid having stale files -# from a previous install. -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") -install(CODE " - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") - " COMPONENT Runtime) -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) - -# Install the AOT library on non-Debug builds only. -if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") - install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/CMakeLists.txt b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/CMakeLists.txt deleted file mode 100644 index d5bd016..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.10) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. - -# Serves the same purpose as list(TRANSFORM ... PREPEND ...), -# which isn't available in 3.10. -function(list_prepend LIST_NAME PREFIX) - set(NEW_LIST "") - foreach(element ${${LIST_NAME}}) - list(APPEND NEW_LIST "${PREFIX}${element}") - endforeach(element) - set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) -endfunction() - -# === Flutter Library === -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) -pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) -pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) - -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "fl_basic_message_channel.h" - "fl_binary_codec.h" - "fl_binary_messenger.h" - "fl_dart_project.h" - "fl_engine.h" - "fl_json_message_codec.h" - "fl_json_method_codec.h" - "fl_message_codec.h" - "fl_method_call.h" - "fl_method_channel.h" - "fl_method_codec.h" - "fl_method_response.h" - "fl_plugin_registrar.h" - "fl_plugin_registry.h" - "fl_standard_message_codec.h" - "fl_standard_method_codec.h" - "fl_string_codec.h" - "fl_value.h" - "fl_view.h" - "flutter_linux.h" -) -list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") -target_link_libraries(flutter INTERFACE - PkgConfig::GTK - PkgConfig::GLIB - PkgConfig::GIO -) -add_dependencies(flutter flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CMAKE_CURRENT_BINARY_DIR}/_phony_ - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" - ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} -) diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/generated_plugin_registrant.cc b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index e71a16d..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - - -void fl_register_plugins(FlPluginRegistry* registry) { -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/generated_plugin_registrant.h b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/generated_plugin_registrant.h deleted file mode 100644 index e0f0a47..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void fl_register_plugins(FlPluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/generated_plugins.cmake b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/generated_plugins.cmake deleted file mode 100644 index 2e1de87..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/CMakeLists.txt b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/CMakeLists.txt deleted file mode 100644 index e97dabc..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -cmake_minimum_required(VERSION 3.13) -project(runner LANGUAGES CXX) - -# Define the application target. To change its name, change BINARY_NAME in the -# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer -# work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add preprocessor definitions for the application ID. -add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") - -# Add dependency libraries. Add any application-specific dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) - -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/main.cc b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/main.cc deleted file mode 100644 index e7c5c54..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/main.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "my_application.h" - -int main(int argc, char** argv) { - g_autoptr(MyApplication) app = my_application_new(); - return g_application_run(G_APPLICATION(app), argc, argv); -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/my_application.cc b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/my_application.cc deleted file mode 100644 index 2985f86..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/my_application.cc +++ /dev/null @@ -1,148 +0,0 @@ -#include "my_application.h" - -#include -#ifdef GDK_WINDOWING_X11 -#include -#endif - -#include "flutter/generated_plugin_registrant.h" - -struct _MyApplication { - GtkApplication parent_instance; - char** dart_entrypoint_arguments; -}; - -G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) - -// Called when first Flutter frame received. -static void first_frame_cb(MyApplication* self, FlView* view) { - gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view))); -} - -// Implements GApplication::activate. -static void my_application_activate(GApplication* application) { - MyApplication* self = MY_APPLICATION(application); - GtkWindow* window = - GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); - - // Use a header bar when running in GNOME as this is the common style used - // by applications and is the setup most users will be using (e.g. Ubuntu - // desktop). - // If running on X and not using GNOME then just use a traditional title bar - // in case the window manager does more exotic layout, e.g. tiling. - // If running on Wayland assume the header bar will work (may need changing - // if future cases occur). - gboolean use_header_bar = TRUE; -#ifdef GDK_WINDOWING_X11 - GdkScreen* screen = gtk_window_get_screen(window); - if (GDK_IS_X11_SCREEN(screen)) { - const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); - if (g_strcmp0(wm_name, "GNOME Shell") != 0) { - use_header_bar = FALSE; - } - } -#endif - if (use_header_bar) { - GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); - gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "mam_desktop"); - gtk_header_bar_set_show_close_button(header_bar, TRUE); - gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); - } else { - gtk_window_set_title(window, "mam_desktop"); - } - - gtk_window_set_default_size(window, 1280, 720); - - g_autoptr(FlDartProject) project = fl_dart_project_new(); - fl_dart_project_set_dart_entrypoint_arguments( - project, self->dart_entrypoint_arguments); - - FlView* view = fl_view_new(project); - GdkRGBA background_color; - // Background defaults to black, override it here if necessary, e.g. #00000000 - // for transparent. - gdk_rgba_parse(&background_color, "#000000"); - fl_view_set_background_color(view, &background_color); - gtk_widget_show(GTK_WIDGET(view)); - gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); - - // Show the window when Flutter renders. - // Requires the view to be realized so we can start rendering. - g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb), - self); - gtk_widget_realize(GTK_WIDGET(view)); - - fl_register_plugins(FL_PLUGIN_REGISTRY(view)); - - gtk_widget_grab_focus(GTK_WIDGET(view)); -} - -// Implements GApplication::local_command_line. -static gboolean my_application_local_command_line(GApplication* application, - gchar*** arguments, - int* exit_status) { - MyApplication* self = MY_APPLICATION(application); - // Strip out the first argument as it is the binary name. - self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); - - g_autoptr(GError) error = nullptr; - if (!g_application_register(application, nullptr, &error)) { - g_warning("Failed to register: %s", error->message); - *exit_status = 1; - return TRUE; - } - - g_application_activate(application); - *exit_status = 0; - - return TRUE; -} - -// Implements GApplication::startup. -static void my_application_startup(GApplication* application) { - // MyApplication* self = MY_APPLICATION(object); - - // Perform any actions required at application startup. - - G_APPLICATION_CLASS(my_application_parent_class)->startup(application); -} - -// Implements GApplication::shutdown. -static void my_application_shutdown(GApplication* application) { - // MyApplication* self = MY_APPLICATION(object); - - // Perform any actions required at application shutdown. - - G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); -} - -// Implements GObject::dispose. -static void my_application_dispose(GObject* object) { - MyApplication* self = MY_APPLICATION(object); - g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); - G_OBJECT_CLASS(my_application_parent_class)->dispose(object); -} - -static void my_application_class_init(MyApplicationClass* klass) { - G_APPLICATION_CLASS(klass)->activate = my_application_activate; - G_APPLICATION_CLASS(klass)->local_command_line = - my_application_local_command_line; - G_APPLICATION_CLASS(klass)->startup = my_application_startup; - G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; - G_OBJECT_CLASS(klass)->dispose = my_application_dispose; -} - -static void my_application_init(MyApplication* self) {} - -MyApplication* my_application_new() { - // Set the program name to the application ID, which helps various systems - // like GTK and desktop environments map this running application to its - // corresponding .desktop file. This ensures better integration by allowing - // the application to be recognized beyond its binary name. - g_set_prgname(APPLICATION_ID); - - return MY_APPLICATION(g_object_new(my_application_get_type(), - "application-id", APPLICATION_ID, "flags", - G_APPLICATION_NON_UNIQUE, nullptr)); -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/my_application.h b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/my_application.h deleted file mode 100644 index db16367..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/linux/runner/my_application.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef FLUTTER_MY_APPLICATION_H_ -#define FLUTTER_MY_APPLICATION_H_ - -#include - -G_DECLARE_FINAL_TYPE(MyApplication, - my_application, - MY, - APPLICATION, - GtkApplication) - -/** - * my_application_new: - * - * Creates a new Flutter-based application. - * - * Returns: a new #MyApplication. - */ -MyApplication* my_application_new(); - -#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/.gitignore b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/.gitignore deleted file mode 100644 index 746adbb..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Flutter-related -**/Flutter/ephemeral/ -**/Pods/ - -# Xcode-related -**/dgph -**/xcuserdata/ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Flutter/Flutter-Debug.xcconfig b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index c2efd0b..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Flutter/Flutter-Release.xcconfig b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index c2efd0b..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Flutter/GeneratedPluginRegistrant.swift b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index cccf817..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcodeproj/project.pbxproj b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index a1eb3a8..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,729 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXAggregateTarget section */ - 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; - buildPhases = ( - 33CC111E2044C6BF0003C045 /* ShellScript */, - ); - dependencies = ( - ); - name = "Flutter Assemble"; - productName = FLX; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC10EC2044A3C60003C045; - remoteInfo = Runner; - }; - 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC111A2044C6BA0003C045; - remoteInfo = FLX; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 33CC110E2044A8840003C045 /* Bundle Framework */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Bundle Framework"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* mam_desktop.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "mam_desktop.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; - 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; - 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; - 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; - 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; - 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 331C80D2294CF70F00263BE5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 331C80D6294CF71000263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C80D7294CF71000263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; - 33BA886A226E78AF003329D5 /* Configs */ = { - isa = PBXGroup; - children = ( - 33E5194F232828860026EE4D /* AppInfo.xcconfig */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, - ); - path = Configs; - sourceTree = ""; - }; - 33CC10E42044A3C60003C045 = { - isa = PBXGroup; - children = ( - 33FAB671232836740065AC1E /* Runner */, - 33CEB47122A05771004F2AC0 /* Flutter */, - 331C80D6294CF71000263BE5 /* RunnerTests */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* mam_desktop.app */, - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 33CC11242044D66E0003C045 /* Resources */ = { - isa = PBXGroup; - children = ( - 33CC10F22044A3C60003C045 /* Assets.xcassets */, - 33CC10F42044A3C60003C045 /* MainMenu.xib */, - 33CC10F72044A3C60003C045 /* Info.plist */, - ); - name = Resources; - path = ..; - sourceTree = ""; - }; - 33CEB47122A05771004F2AC0 /* Flutter */ = { - isa = PBXGroup; - children = ( - 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, - ); - path = Flutter; - sourceTree = ""; - }; - 33FAB671232836740065AC1E /* Runner */ = { - isa = PBXGroup; - children = ( - 33CC10F02044A3C60003C045 /* AppDelegate.swift */, - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, - 33E51913231747F40026EE4D /* DebugProfile.entitlements */, - 33E51914231749380026EE4D /* Release.entitlements */, - 33CC11242044D66E0003C045 /* Resources */, - 33BA886A226E78AF003329D5 /* Configs */, - ); - path = Runner; - sourceTree = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 331C80D4294CF70F00263BE5 /* RunnerTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; - buildPhases = ( - 331C80D1294CF70F00263BE5 /* Sources */, - 331C80D2294CF70F00263BE5 /* Frameworks */, - 331C80D3294CF70F00263BE5 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 331C80DA294CF71000263BE5 /* PBXTargetDependency */, - ); - name = RunnerTests; - productName = RunnerTests; - productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - packageProductDependencies = ( - 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, - ); - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* mam_desktop.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 331C80D4294CF70F00263BE5 = { - CreatedOnToolsVersion = 14.0; - TestTargetID = 33CC10EC2044A3C60003C045; - }; - 33CC10EC2044A3C60003C045 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.Sandbox = { - enabled = 1; - }; - }; - }; - 33CC111A2044C6BA0003C045 = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 33CC10E42044A3C60003C045; - packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, - ); - productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 33CC10EC2044A3C60003C045 /* Runner */, - 331C80D4294CF70F00263BE5 /* RunnerTests */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 331C80D3294CF70F00263BE5 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; - }; - 33CC111E2044C6BF0003C045 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - Flutter/ephemeral/FlutterInputs.xcfilelist, - ); - inputPaths = ( - Flutter/ephemeral/tripwire, - ); - outputFileListPaths = ( - Flutter/ephemeral/FlutterOutputs.xcfilelist, - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 331C80D1294CF70F00263BE5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10E92044A3C60003C045 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC10EC2044A3C60003C045 /* Runner */; - targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; - }; - 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; - targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 33CC10F52044A3C60003C045 /* Base */, - ); - name = MainMenu.xib; - path = Runner; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 331C80DB294CF71000263BE5 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.mam.mamDesktop.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/mam_desktop.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/mam_desktop"; - }; - name = Debug; - }; - 331C80DC294CF71000263BE5 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.mam.mamDesktop.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/mam_desktop.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/mam_desktop"; - }; - name = Release; - }; - 331C80DD294CF71000263BE5 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.mam.mamDesktop.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/mam_desktop.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/mam_desktop"; - }; - name = Profile; - }; - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Profile; - }; - 338D0CEA231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Profile; - }; - 338D0CEB231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Profile; - }; - 33CC10F92044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 33CC10FA2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - 33CC10FC2044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 33CC10FD2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 33CC111C2044C6BA0003C045 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 33CC111D2044C6BA0003C045 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 331C80DB294CF71000263BE5 /* Debug */, - 331C80DC294CF71000263BE5 /* Release */, - 331C80DD294CF71000263BE5 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10F92044A3C60003C045 /* Debug */, - 33CC10FA2044A3C60003C045 /* Release */, - 338D0CE9231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10FC2044A3C60003C045 /* Debug */, - 33CC10FD2044A3C60003C045 /* Release */, - 338D0CEA231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC111C2044C6BA0003C045 /* Debug */, - 33CC111D2044C6BA0003C045 /* Release */, - 338D0CEB231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; - }; -/* End XCLocalSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { - isa = XCSwiftPackageProductDependency; - productName = FlutterGeneratedPluginSwiftPackage; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = 33CC10E52044A3C60003C045 /* Project object */; -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 8357044..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcworkspace/contents.xcworkspacedata b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a1..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/AppDelegate.swift b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/AppDelegate.swift deleted file mode 100644 index b3c1761..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import Cocoa -import FlutterMacOS - -@main -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } - - override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { - return true - } -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a2ec33f..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_16.png", - "scale" : "1x" - }, - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "2x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "1x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_64.png", - "scale" : "2x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_128.png", - "scale" : "1x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "2x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "1x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 82b6f9d..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index 13b35eb..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 0a3f5fa..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bdb5722..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index f083318..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index 326c0e7..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 2f1632c..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Base.lproj/MainMenu.xib b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Base.lproj/MainMenu.xib deleted file mode 100644 index 80e867a..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/AppInfo.xcconfig b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index e1fcaeb..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/AppInfo.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// Application-level settings for the Runner target. -// -// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the -// future. If not, the values below would default to using the project name when this becomes a -// 'flutter create' template. - -// The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = mam_desktop - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.mam.mamDesktop - -// The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2026 com.mam. All rights reserved. diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/Debug.xcconfig b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/Debug.xcconfig deleted file mode 100644 index 36b0fd9..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/Release.xcconfig b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f49..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/Warnings.xcconfig b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf4..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Configs/Warnings.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings -GCC_WARN_UNDECLARED_SELECTOR = YES -CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES -CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES -CLANG_WARN_PRAGMA_PACK = YES -CLANG_WARN_STRICT_PROTOTYPES = YES -CLANG_WARN_COMMA = YES -GCC_WARN_STRICT_SELECTOR_MATCH = YES -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES -CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES -GCC_WARN_SHADOW = YES -CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/DebugProfile.entitlements b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/DebugProfile.entitlements deleted file mode 100644 index dddb8a3..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/DebugProfile.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.cs.allow-jit - - com.apple.security.network.server - - - diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Info.plist b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Info.plist deleted file mode 100644 index 4789daa..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - $(PRODUCT_COPYRIGHT) - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/MainFlutterWindow.swift b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/MainFlutterWindow.swift deleted file mode 100644 index 3cc05eb..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Cocoa -import FlutterMacOS - -class MainFlutterWindow: NSWindow { - override func awakeFromNib() { - let flutterViewController = FlutterViewController() - let windowFrame = self.frame - self.contentViewController = flutterViewController - self.setFrame(windowFrame, display: true) - - RegisterGeneratedPlugins(registry: flutterViewController) - - super.awakeFromNib() - } -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Release.entitlements b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Release.entitlements deleted file mode 100644 index 852fa1a..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/RunnerTests/RunnerTests.swift b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/RunnerTests/RunnerTests.swift deleted file mode 100644 index 61f3bd1..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/macos/RunnerTests/RunnerTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Cocoa -import FlutterMacOS -import XCTest - -class RunnerTests: XCTestCase { - - func testExample() { - // If you add code to the Runner application, consider adding tests here. - // See https://developer.apple.com/documentation/xctest for more information about using XCTest. - } - -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/pubspec.lock b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/pubspec.lock deleted file mode 100644 index 2d26da3..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/pubspec.lock +++ /dev/null @@ -1,403 +0,0 @@ -# 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: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" - source: hosted - version: "1.1.2" - 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" - crypto: - dependency: transitive - description: - name: crypto - sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf - url: "https://pub.dev" - source: hosted - version: "3.0.7" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: "41e005c33bd814be4d3096aff55b1908d419fde52ca656c8c47719ec745873cd" - url: "https://pub.dev" - source: hosted - version: "1.0.9" - data_table_2: - dependency: "direct main" - description: - name: data_table_2 - sha256: cb31d465dcf1e1598a662d06d3d2c16c73700ae9e837a3d91588f1dda7519abc - url: "https://pub.dev" - source: hosted - version: "2.7.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" - 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_markdown: - dependency: "direct main" - description: - name: flutter_markdown - sha256: "04c4722cc36ec5af38acc38ece70d22d3c2123c61305d555750a091517bbe504" - url: "https://pub.dev" - source: hosted - version: "0.6.23" - 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" - 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" - 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" - mam_core: - dependency: "direct main" - description: - path: "../../packages/mam_core" - relative: true - source: path - version: "1.0.0" - mam_pty: - dependency: "direct main" - description: - path: "../../packages/mam_pty" - relative: true - source: path - version: "1.0.0" - markdown: - dependency: transitive - description: - name: markdown - sha256: ee85086ad7698b42522c6ad42fe195f1b9898e4d974a1af4576c1a3a176cada9 - url: "https://pub.dev" - source: hosted - version: "7.3.1" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 - url: "https://pub.dev" - source: hosted - version: "0.12.19" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" - url: "https://pub.dev" - source: hosted - version: "0.13.0" - meta: - dependency: "direct main" - description: - name: meta - sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349" - url: "https://pub.dev" - source: hosted - version: "1.18.0" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - 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" - shelf: - dependency: transitive - description: - name: shelf - sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 - url: "https://pub.dev" - source: hosted - version: "1.4.2" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - 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" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - 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: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e" - url: "https://pub.dev" - source: hosted - version: "0.7.11" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b - url: "https://pub.dev" - source: hosted - version: "2.2.0" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360" - url: "https://pub.dev" - source: hosted - version: "15.2.0" - web: - dependency: transitive - description: - name: web - sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b - url: "https://pub.dev" - source: hosted - version: "2.4.0" - xterm: - dependency: "direct main" - description: - name: xterm - sha256: "168dfedca77cba33fdb6f52e2cd001e9fde216e398e89335c19b524bb22da3a2" - url: "https://pub.dev" - source: hosted - version: "4.0.0" - yaml: - dependency: transitive - description: - name: yaml - sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce - url: "https://pub.dev" - source: hosted - version: "3.1.3" - zmodem: - dependency: transitive - description: - name: zmodem - sha256: "3b7e5b29f3a7d8aee472029b05165a68438eff2f3f7766edf13daba1e297adbf" - url: "https://pub.dev" - source: hosted - version: "0.0.6" -sdks: - dart: ">=3.12.1 <4.0.0" - flutter: ">=3.27.0" diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/pubspec.yaml b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/pubspec.yaml deleted file mode 100644 index 42c9bc2..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/pubspec.yaml +++ /dev/null @@ -1,95 +0,0 @@ -name: mam_desktop -description: "A new Flutter project." -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# In Windows, build-name is used as the major, minor, and patch parts -# of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+1 - -environment: - sdk: ^3.12.1 - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. -dependencies: - flutter: - sdk: flutter - cupertino_icons: ^1.0.8 - mam_core: - path: ../../packages/mam_core - mam_pty: - path: ../../packages/mam_pty - flutter_riverpod: ^2.4.9 - data_table_2: ^2.5.8 - xterm: ^4.0.0 - flutter_markdown: ^0.6.18 - meta: ^1.9.0 - -dev_dependencies: - flutter_test: - sdk: flutter - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - flutter_lints: ^6.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/to/resolution-aware-images - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/to/asset-from-package - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/to/font-from-package diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/test/widget_test.dart b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/test/widget_test.dart deleted file mode 100644 index ed5458b..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/test/widget_test.dart +++ /dev/null @@ -1,74 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mam_core/mam_core.dart'; - -import 'package:mam_desktop/src/providers/session_providers.dart'; -import 'package:mam_desktop/src/theme/app_theme.dart'; -import 'package:mam_desktop/src/widgets/detail_pane.dart'; -import 'package:mam_desktop/src/widgets/session_table.dart'; - -void main() { - testWidgets('SessionTable renders rows and drives selection', (tester) async { - final rows = [ - SessionRow( - name: 'demo-session', - server: 'default', - status: 'running', - herdrAlive: true, - pane: const Pane( - pid: 123, - cwd: '/x', - cmd: 'claude', - cmdFull: 'claude --foo', - ), - role: 'creator', - resumeState: 'yes', - jobId: '-', - jobStatus: '-', - attachCommand: 'herdr session attach demo-session', - driftClasses: const ['B'], - ), - ]; - - String? selected; - await tester.pumpWidget( - MaterialApp( - theme: buildAppTheme(), - home: Scaffold( - body: SessionTable( - sessions: rows, - selectedName: null, - onSelect: (name) => selected = name, - ), - ), - ), - ); - - expect(find.text('demo-session'), findsOneWidget); - expect(find.text('running'), findsOneWidget); - - await tester.tap(find.text('demo-session')); - await tester.pump(); - expect(selected, 'demo-session'); - }); - - testWidgets('DetailPane shows placeholder when nothing selected', ( - tester, - ) async { - await tester.pumpWidget( - MaterialApp( - theme: buildAppTheme(), - home: const Scaffold(body: DetailPane(session: null)), - ), - ); - - expect(find.text('Select a session to see details'), findsOneWidget); - }); - - test('selectedSessionNameProvider defaults to null', () { - final container = ProviderContainer(); - addTearDown(container.dispose); - expect(container.read(selectedSessionNameProvider), isNull); - }); -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/.gitignore b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/.gitignore deleted file mode 100644 index d492d0d..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -flutter/ephemeral/ - -# Visual Studio user-specific files. -*.suo -*.user -*.userosscache -*.sln.docstates - -# Visual Studio build-related files. -x64/ -x86/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/CMakeLists.txt b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/CMakeLists.txt deleted file mode 100644 index 0d930bd..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/CMakeLists.txt +++ /dev/null @@ -1,108 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.14) -project(mam_desktop LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "mam_desktop") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(VERSION 3.14...3.25) - -# Define build configuration option. -get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -if(IS_MULTICONFIG) - set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" - CACHE STRING "" FORCE) -else() - if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Debug" CACHE - STRING "Flutter build mode" FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Profile" "Release") - endif() -endif() -# Define settings for the Profile build mode. -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") -set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") -set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") - -# Use Unicode for all projects. -add_definitions(-DUNICODE -D_UNICODE) - -# Compilation settings that should be applied to most targets. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_17) - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") - target_compile_options(${TARGET} PRIVATE /EHsc) - target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") - target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# Application build; see runner/CMakeLists.txt. -add_subdirectory("runner") - - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# Support files are copied into place next to the executable, so that it can -# run in place. This is done instead of making a separate bundle (as on Linux) -# so that building and running from within Visual Studio will work. -set(BUILD_BUNDLE_DIR "$") -# Make the "install" step default, as it's required to run. -set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") - -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# Copy the native assets provided by the build.dart from all packages. -set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") -install(DIRECTORY "${NATIVE_ASSETS_DIR}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -# Fully re-copy the assets directory on each build to avoid having stale files -# from a previous install. -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") -install(CODE " - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") - " COMPONENT Runtime) -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) - -# Install the AOT library on non-Debug builds only. -install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - CONFIGURATIONS Profile;Release - COMPONENT Runtime) diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/CMakeLists.txt b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/CMakeLists.txt deleted file mode 100644 index 903f489..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/CMakeLists.txt +++ /dev/null @@ -1,109 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.14) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. -set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") - -# Set fallback configurations for older versions of the flutter tool. -if (NOT DEFINED FLUTTER_TARGET_PLATFORM) - set(FLUTTER_TARGET_PLATFORM "windows-x64") -endif() - -# === Flutter Library === -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "flutter_export.h" - "flutter_windows.h" - "flutter_messenger.h" - "flutter_plugin_registrar.h" - "flutter_texture_registrar.h" -) -list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") -add_dependencies(flutter flutter_assemble) - -# === Wrapper === -list(APPEND CPP_WRAPPER_SOURCES_CORE - "core_implementations.cc" - "standard_codec.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_PLUGIN - "plugin_registrar.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_APP - "flutter_engine.cc" - "flutter_view_controller.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") - -# Wrapper sources needed for a plugin. -add_library(flutter_wrapper_plugin STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} -) -apply_standard_settings(flutter_wrapper_plugin) -set_target_properties(flutter_wrapper_plugin PROPERTIES - POSITION_INDEPENDENT_CODE ON) -set_target_properties(flutter_wrapper_plugin PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) -target_include_directories(flutter_wrapper_plugin PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_plugin flutter_assemble) - -# Wrapper sources needed for the runner. -add_library(flutter_wrapper_app STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_APP} -) -apply_standard_settings(flutter_wrapper_app) -target_link_libraries(flutter_wrapper_app PUBLIC flutter) -target_include_directories(flutter_wrapper_app PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_app flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") -set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} - ${PHONY_OUTPUT} - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - ${FLUTTER_TARGET_PLATFORM} $ - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} -) diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/generated_plugin_registrant.cc b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8b6d468..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - - -void RegisterPlugins(flutter::PluginRegistry* registry) { -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/generated_plugin_registrant.h b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index dc139d8..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/generated_plugins.cmake b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/generated_plugins.cmake deleted file mode 100644 index b93c4c3..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/CMakeLists.txt b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/CMakeLists.txt deleted file mode 100644 index 394917c..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(runner LANGUAGES CXX) - -# Define the application target. To change its name, change BINARY_NAME in the -# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer -# work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} WIN32 - "flutter_window.cpp" - "main.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add preprocessor definitions for the build version. -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") - -# Disable Windows macros that collide with C++ standard library functions. -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") - -# Add dependency libraries and include directories. Add any application-specific -# dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/Runner.rc b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/Runner.rc deleted file mode 100644 index 2446106..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/Runner.rc +++ /dev/null @@ -1,121 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#pragma code_page(65001) -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_APP_ICON ICON "resources\\app_icon.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) -#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD -#else -#define VERSION_AS_NUMBER 1,0,0,0 -#endif - -#if defined(FLUTTER_VERSION) -#define VERSION_AS_STRING FLUTTER_VERSION -#else -#define VERSION_AS_STRING "1.0.0" -#endif - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_AS_NUMBER - PRODUCTVERSION VERSION_AS_NUMBER - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "com.mam" "\0" - VALUE "FileDescription", "mam_desktop" "\0" - VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "mam_desktop" "\0" - VALUE "LegalCopyright", "Copyright (C) 2026 com.mam. All rights reserved." "\0" - VALUE "OriginalFilename", "mam_desktop.exe" "\0" - VALUE "ProductName", "mam_desktop" "\0" - VALUE "ProductVersion", VERSION_AS_STRING "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/flutter_window.cpp b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/flutter_window.cpp deleted file mode 100644 index 955ee30..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/flutter_window.cpp +++ /dev/null @@ -1,71 +0,0 @@ -#include "flutter_window.h" - -#include - -#include "flutter/generated_plugin_registrant.h" - -FlutterWindow::FlutterWindow(const flutter::DartProject& project) - : project_(project) {} - -FlutterWindow::~FlutterWindow() {} - -bool FlutterWindow::OnCreate() { - if (!Win32Window::OnCreate()) { - return false; - } - - RECT frame = GetClientArea(); - - // The size here must match the window dimensions to avoid unnecessary surface - // creation / destruction in the startup path. - flutter_controller_ = std::make_unique( - frame.right - frame.left, frame.bottom - frame.top, project_); - // Ensure that basic setup of the controller was successful. - if (!flutter_controller_->engine() || !flutter_controller_->view()) { - return false; - } - RegisterPlugins(flutter_controller_->engine()); - SetChildContent(flutter_controller_->view()->GetNativeWindow()); - - flutter_controller_->engine()->SetNextFrameCallback([&]() { - this->Show(); - }); - - // Flutter can complete the first frame before the "show window" callback is - // registered. The following call ensures a frame is pending to ensure the - // window is shown. It is a no-op if the first frame hasn't completed yet. - flutter_controller_->ForceRedraw(); - - return true; -} - -void FlutterWindow::OnDestroy() { - if (flutter_controller_) { - flutter_controller_ = nullptr; - } - - Win32Window::OnDestroy(); -} - -LRESULT -FlutterWindow::MessageHandler(HWND hwnd, UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - // Give Flutter, including plugins, an opportunity to handle window messages. - if (flutter_controller_) { - std::optional result = - flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, - lparam); - if (result) { - return *result; - } - } - - switch (message) { - case WM_FONTCHANGE: - flutter_controller_->engine()->ReloadSystemFonts(); - break; - } - - return Win32Window::MessageHandler(hwnd, message, wparam, lparam); -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/flutter_window.h b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/flutter_window.h deleted file mode 100644 index 6da0652..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/flutter_window.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RUNNER_FLUTTER_WINDOW_H_ -#define RUNNER_FLUTTER_WINDOW_H_ - -#include -#include - -#include - -#include "win32_window.h" - -// A window that does nothing but host a Flutter view. -class FlutterWindow : public Win32Window { - public: - // Creates a new FlutterWindow hosting a Flutter view running |project|. - explicit FlutterWindow(const flutter::DartProject& project); - virtual ~FlutterWindow(); - - protected: - // Win32Window: - bool OnCreate() override; - void OnDestroy() override; - LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, - LPARAM const lparam) noexcept override; - - private: - // The project to run. - flutter::DartProject project_; - - // The Flutter instance hosted by this window. - std::unique_ptr flutter_controller_; -}; - -#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/main.cpp b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/main.cpp deleted file mode 100644 index f2d08b6..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/main.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include - -#include "flutter_window.h" -#include "utils.h" - -int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { - // Attach to console when present (e.g., 'flutter run') or create a - // new console when running with a debugger. - if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { - CreateAndAttachConsole(); - } - - // Initialize COM, so that it is available for use in the library and/or - // plugins. - ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - - flutter::DartProject project(L"data"); - - std::vector command_line_arguments = - GetCommandLineArguments(); - - project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); - - FlutterWindow window(project); - Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.Create(L"mam_desktop", origin, size)) { - return EXIT_FAILURE; - } - window.SetQuitOnClose(true); - - ::MSG msg; - while (::GetMessage(&msg, nullptr, 0, 0)) { - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); - } - - ::CoUninitialize(); - return EXIT_SUCCESS; -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/resource.h b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/resource.h deleted file mode 100644 index 66a65d1..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/resource.h +++ /dev/null @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Runner.rc -// -#define IDI_APP_ICON 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/resources/app_icon.ico b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/resources/app_icon.ico deleted file mode 100644 index c04e20c..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/resources/app_icon.ico and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/runner.exe.manifest b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/runner.exe.manifest deleted file mode 100644 index 153653e..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/runner.exe.manifest +++ /dev/null @@ -1,14 +0,0 @@ - - - - - PerMonitorV2 - - - - - - - - - diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/utils.cpp b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/utils.cpp deleted file mode 100644 index 3cb7146..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/utils.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include "utils.h" - -#include -#include -#include -#include - -#include - -void CreateAndAttachConsole() { - if (::AllocConsole()) { - FILE *unused; - if (freopen_s(&unused, "CONOUT$", "w", stdout)) { - _dup2(_fileno(stdout), 1); - } - if (freopen_s(&unused, "CONOUT$", "w", stderr)) { - _dup2(_fileno(stdout), 2); - } - std::ios::sync_with_stdio(); - FlutterDesktopResyncOutputStreams(); - } -} - -std::vector GetCommandLineArguments() { - // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. - int argc; - wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); - if (argv == nullptr) { - return std::vector(); - } - - std::vector command_line_arguments; - - // Skip the first argument as it's the binary name. - for (int i = 1; i < argc; i++) { - command_line_arguments.push_back(Utf8FromUtf16(argv[i])); - } - - ::LocalFree(argv); - - return command_line_arguments; -} - -std::string Utf8FromUtf16(const wchar_t* utf16_string) { - if (utf16_string == nullptr) { - return std::string(); - } - // First, find the length of the string with a safe upper bound (CWE-126). - // UNICODE_STRING_MAX_CHARS (32767) is the maximum length of a UNICODE_STRING. - int input_length = static_cast(wcsnlen(utf16_string, UNICODE_STRING_MAX_CHARS)); - // Now use that bounded length to determine the required buffer size. - // When an explicit length is passed, WideCharToMultiByte does not include - // the null terminator in its returned size. - int target_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - input_length, nullptr, 0, nullptr, nullptr); - std::string utf8_string; - if (target_length == 0 || static_cast(target_length) > utf8_string.max_size()) { - return utf8_string; - } - utf8_string.resize(target_length); - int converted_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - input_length, utf8_string.data(), target_length, nullptr, nullptr); - if (converted_length == 0) { - return std::string(); - } - return utf8_string; -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/utils.h b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/utils.h deleted file mode 100644 index 3879d54..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/utils.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RUNNER_UTILS_H_ -#define RUNNER_UTILS_H_ - -#include -#include - -// Creates a console for the process, and redirects stdout and stderr to -// it for both the runner and the Flutter library. -void CreateAndAttachConsole(); - -// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string -// encoded in UTF-8. Returns an empty std::string on failure. -std::string Utf8FromUtf16(const wchar_t* utf16_string); - -// Gets the command line arguments passed in as a std::vector, -// encoded in UTF-8. Returns an empty std::vector on failure. -std::vector GetCommandLineArguments(); - -#endif // RUNNER_UTILS_H_ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/win32_window.cpp b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/win32_window.cpp deleted file mode 100644 index 60608d0..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/win32_window.cpp +++ /dev/null @@ -1,288 +0,0 @@ -#include "win32_window.h" - -#include -#include - -#include "resource.h" - -namespace { - -/// Window attribute that enables dark mode window decorations. -/// -/// Redefined in case the developer's machine has a Windows SDK older than -/// version 10.0.22000.0. -/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute -#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE -#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 -#endif - -constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; - -/// Registry key for app theme preference. -/// -/// A value of 0 indicates apps should use dark mode. A non-zero or missing -/// value indicates apps should use light mode. -constexpr const wchar_t kGetPreferredBrightnessRegKey[] = - L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; -constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; - -// The number of Win32Window objects that currently exist. -static int g_active_window_count = 0; - -using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); - -// Scale helper to convert logical scaler values to physical using passed in -// scale factor -int Scale(int source, double scale_factor) { - return static_cast(source * scale_factor); -} - -// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. -// This API is only needed for PerMonitor V1 awareness mode. -void EnableFullDpiSupportIfAvailable(HWND hwnd) { - HMODULE user32_module = LoadLibraryA("User32.dll"); - if (!user32_module) { - return; - } - auto enable_non_client_dpi_scaling = - reinterpret_cast( - GetProcAddress(user32_module, "EnableNonClientDpiScaling")); - if (enable_non_client_dpi_scaling != nullptr) { - enable_non_client_dpi_scaling(hwnd); - } - FreeLibrary(user32_module); -} - -} // namespace - -// Manages the Win32Window's window class registration. -class WindowClassRegistrar { - public: - ~WindowClassRegistrar() = default; - - // Returns the singleton registrar instance. - static WindowClassRegistrar* GetInstance() { - if (!instance_) { - instance_ = new WindowClassRegistrar(); - } - return instance_; - } - - // Returns the name of the window class, registering the class if it hasn't - // previously been registered. - const wchar_t* GetWindowClass(); - - // Unregisters the window class. Should only be called if there are no - // instances of the window. - void UnregisterWindowClass(); - - private: - WindowClassRegistrar() = default; - - static WindowClassRegistrar* instance_; - - bool class_registered_ = false; -}; - -WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; - -const wchar_t* WindowClassRegistrar::GetWindowClass() { - if (!class_registered_) { - WNDCLASS window_class{}; - window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); - window_class.lpszClassName = kWindowClassName; - window_class.style = CS_HREDRAW | CS_VREDRAW; - window_class.cbClsExtra = 0; - window_class.cbWndExtra = 0; - window_class.hInstance = GetModuleHandle(nullptr); - window_class.hIcon = - LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); - window_class.hbrBackground = 0; - window_class.lpszMenuName = nullptr; - window_class.lpfnWndProc = Win32Window::WndProc; - RegisterClass(&window_class); - class_registered_ = true; - } - return kWindowClassName; -} - -void WindowClassRegistrar::UnregisterWindowClass() { - UnregisterClass(kWindowClassName, nullptr); - class_registered_ = false; -} - -Win32Window::Win32Window() { - ++g_active_window_count; -} - -Win32Window::~Win32Window() { - --g_active_window_count; - Destroy(); -} - -bool Win32Window::Create(const std::wstring& title, - const Point& origin, - const Size& size) { - Destroy(); - - const wchar_t* window_class = - WindowClassRegistrar::GetInstance()->GetWindowClass(); - - const POINT target_point = {static_cast(origin.x), - static_cast(origin.y)}; - HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); - UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); - double scale_factor = dpi / 96.0; - - HWND window = CreateWindow( - window_class, title.c_str(), WS_OVERLAPPEDWINDOW, - Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), - Scale(size.width, scale_factor), Scale(size.height, scale_factor), - nullptr, nullptr, GetModuleHandle(nullptr), this); - - if (!window) { - return false; - } - - UpdateTheme(window); - - return OnCreate(); -} - -bool Win32Window::Show() { - return ShowWindow(window_handle_, SW_SHOWNORMAL); -} - -// static -LRESULT CALLBACK Win32Window::WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - if (message == WM_NCCREATE) { - auto window_struct = reinterpret_cast(lparam); - SetWindowLongPtr(window, GWLP_USERDATA, - reinterpret_cast(window_struct->lpCreateParams)); - - auto that = static_cast(window_struct->lpCreateParams); - EnableFullDpiSupportIfAvailable(window); - that->window_handle_ = window; - } else if (Win32Window* that = GetThisFromHandle(window)) { - return that->MessageHandler(window, message, wparam, lparam); - } - - return DefWindowProc(window, message, wparam, lparam); -} - -LRESULT -Win32Window::MessageHandler(HWND hwnd, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - switch (message) { - case WM_DESTROY: - window_handle_ = nullptr; - Destroy(); - if (quit_on_close_) { - PostQuitMessage(0); - } - return 0; - - case WM_DPICHANGED: { - auto newRectSize = reinterpret_cast(lparam); - LONG newWidth = newRectSize->right - newRectSize->left; - LONG newHeight = newRectSize->bottom - newRectSize->top; - - SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, - newHeight, SWP_NOZORDER | SWP_NOACTIVATE); - - return 0; - } - case WM_SIZE: { - RECT rect = GetClientArea(); - if (child_content_ != nullptr) { - // Size and position the child window. - MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, - rect.bottom - rect.top, TRUE); - } - return 0; - } - - case WM_ACTIVATE: - if (child_content_ != nullptr) { - SetFocus(child_content_); - } - return 0; - - case WM_DWMCOLORIZATIONCOLORCHANGED: - UpdateTheme(hwnd); - return 0; - } - - return DefWindowProc(window_handle_, message, wparam, lparam); -} - -void Win32Window::Destroy() { - OnDestroy(); - - if (window_handle_) { - DestroyWindow(window_handle_); - window_handle_ = nullptr; - } - if (g_active_window_count == 0) { - WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); - } -} - -Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { - return reinterpret_cast( - GetWindowLongPtr(window, GWLP_USERDATA)); -} - -void Win32Window::SetChildContent(HWND content) { - child_content_ = content; - SetParent(content, window_handle_); - RECT frame = GetClientArea(); - - MoveWindow(content, frame.left, frame.top, frame.right - frame.left, - frame.bottom - frame.top, true); - - SetFocus(child_content_); -} - -RECT Win32Window::GetClientArea() { - RECT frame; - GetClientRect(window_handle_, &frame); - return frame; -} - -HWND Win32Window::GetHandle() { - return window_handle_; -} - -void Win32Window::SetQuitOnClose(bool quit_on_close) { - quit_on_close_ = quit_on_close; -} - -bool Win32Window::OnCreate() { - // No-op; provided for subclasses. - return true; -} - -void Win32Window::OnDestroy() { - // No-op; provided for subclasses. -} - -void Win32Window::UpdateTheme(HWND const window) { - DWORD light_mode; - DWORD light_mode_size = sizeof(light_mode); - LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, - kGetPreferredBrightnessRegValue, - RRF_RT_REG_DWORD, nullptr, &light_mode, - &light_mode_size); - - if (result == ERROR_SUCCESS) { - BOOL enable_dark_mode = light_mode == 0; - DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, - &enable_dark_mode, sizeof(enable_dark_mode)); - } -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/win32_window.h b/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/win32_window.h deleted file mode 100644 index e901dde..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_desktop/windows/runner/win32_window.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef RUNNER_WIN32_WINDOW_H_ -#define RUNNER_WIN32_WINDOW_H_ - -#include - -#include -#include -#include - -// A class abstraction for a high DPI-aware Win32 Window. Intended to be -// inherited from by classes that wish to specialize with custom -// rendering and input handling -class Win32Window { - public: - struct Point { - unsigned int x; - unsigned int y; - Point(unsigned int x, unsigned int y) : x(x), y(y) {} - }; - - struct Size { - unsigned int width; - unsigned int height; - Size(unsigned int width, unsigned int height) - : width(width), height(height) {} - }; - - Win32Window(); - virtual ~Win32Window(); - - // Creates a win32 window with |title| that is positioned and sized using - // |origin| and |size|. New windows are created on the default monitor. Window - // sizes are specified to the OS in physical pixels, hence to ensure a - // consistent size this function will scale the inputted width and height as - // as appropriate for the default monitor. The window is invisible until - // |Show| is called. Returns true if the window was created successfully. - bool Create(const std::wstring& title, const Point& origin, const Size& size); - - // Show the current window. Returns true if the window was successfully shown. - bool Show(); - - // Release OS resources associated with window. - void Destroy(); - - // Inserts |content| into the window tree. - void SetChildContent(HWND content); - - // Returns the backing Window handle to enable clients to set icon and other - // window properties. Returns nullptr if the window has been destroyed. - HWND GetHandle(); - - // If true, closing this window will quit the application. - void SetQuitOnClose(bool quit_on_close); - - // Return a RECT representing the bounds of the current client area. - RECT GetClientArea(); - - protected: - // Processes and route salient window messages for mouse handling, - // size change and DPI. Delegates handling of these to member overloads that - // inheriting classes can handle. - virtual LRESULT MessageHandler(HWND window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Called when CreateAndShow is called, allowing subclass window-related - // setup. Subclasses should return false if setup fails. - virtual bool OnCreate(); - - // Called when Destroy is called. - virtual void OnDestroy(); - - private: - friend class WindowClassRegistrar; - - // OS callback called by message pump. Handles the WM_NCCREATE message which - // is passed when the non-client area is being created and enables automatic - // non-client DPI scaling so that the non-client area automatically - // responds to changes in DPI. All other messages are handled by - // MessageHandler. - static LRESULT CALLBACK WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Retrieves a class instance pointer for |window| - static Win32Window* GetThisFromHandle(HWND const window) noexcept; - - // Update the window frame's theme to match the system theme. - static void UpdateTheme(HWND const window); - - bool quit_on_close_ = false; - - // window handle for top level window. - HWND window_handle_ = nullptr; - - // window handle for hosted content. - HWND child_content_ = nullptr; -}; - -#endif // RUNNER_WIN32_WINDOW_H_ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_pty_bridge_daemon/pubspec.lock b/.agents/skills/multi-agent-mux-ui/apps/mam_pty_bridge_daemon/pubspec.lock deleted file mode 100644 index 01520e1..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_pty_bridge_daemon/pubspec.lock +++ /dev/null @@ -1,148 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37 - url: "https://pub.dev" - source: hosted - version: "2.13.1" - collection: - dependency: transitive - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf - url: "https://pub.dev" - source: hosted - version: "3.0.7" - ffi: - dependency: transitive - description: - name: ffi - sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45" - url: "https://pub.dev" - source: hosted - version: "2.2.0" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" - url: "https://pub.dev" - source: hosted - version: "4.1.2" - mam_pty: - dependency: "direct main" - description: - path: "../../packages/mam_pty" - relative: true - source: path - version: "1.0.0" - meta: - dependency: "direct main" - description: - name: meta - sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9" - url: "https://pub.dev" - source: hosted - version: "1.19.0" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - shelf: - dependency: transitive - description: - name: shelf - sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 - url: "https://pub.dev" - source: hosted - version: "1.4.2" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - source_span: - dependency: transitive - description: - name: source_span - sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" - url: "https://pub.dev" - source: hosted - version: "1.10.2" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - 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" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - web: - dependency: transitive - description: - name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" - url: "https://pub.dev" - source: hosted - version: "0.5.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" - url: "https://pub.dev" - source: hosted - version: "2.4.5" -sdks: - dart: ">=3.7.0 <4.0.0" diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_pty_bridge_daemon/pubspec.yaml b/.agents/skills/multi-agent-mux-ui/apps/mam_pty_bridge_daemon/pubspec.yaml deleted file mode 100644 index 4129037..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_pty_bridge_daemon/pubspec.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: mam_pty_bridge_daemon -description: Headless Dart daemon serving as a WebSocket PTY bridge for Web clients. -version: 1.0.0 -publish_to: none - -environment: - sdk: '>=3.0.0 <4.0.0' - -dependencies: - mam_pty: - path: ../../packages/mam_pty - meta: ^1.9.0 diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_tui/pubspec.lock b/.agents/skills/multi-agent-mux-ui/apps/mam_tui/pubspec.lock deleted file mode 100644 index 4ca8d66..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_tui/pubspec.lock +++ /dev/null @@ -1,108 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37 - url: "https://pub.dev" - source: hosted - version: "2.13.1" - collection: - dependency: transitive - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.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" - mam_core: - dependency: "direct main" - description: - path: "../../packages/mam_core" - relative: true - source: path - version: "1.0.0" - meta: - dependency: "direct main" - description: - name: meta - sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9" - url: "https://pub.dev" - source: hosted - version: "1.19.0" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - source_span: - dependency: transitive - description: - name: source_span - sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" - url: "https://pub.dev" - source: hosted - version: "1.10.2" - 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" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - web: - dependency: transitive - description: - name: web - sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - yaml: - dependency: transitive - description: - name: yaml - sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce - url: "https://pub.dev" - source: hosted - version: "3.1.3" -sdks: - dart: ">=3.5.0 <4.0.0" diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_tui/pubspec.yaml b/.agents/skills/multi-agent-mux-ui/apps/mam_tui/pubspec.yaml deleted file mode 100644 index fd0508a..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_tui/pubspec.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: mam_tui -description: Plain Dart TUI terminal frontend for multi-agent-mux. -version: 1.0.0 -publish_to: none - -environment: - sdk: '>=3.0.0 <4.0.0' - -dependencies: - mam_core: - path: ../../packages/mam_core - meta: ^1.9.0 diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/.gitignore b/.agents/skills/multi-agent-mux-ui/apps/mam_web/.gitignore deleted file mode 100644 index 3820a95..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_web/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -# 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 diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/.metadata b/.agents/skills/multi-agent-mux-ui/apps/mam_web/.metadata deleted file mode 100644 index 339f86d..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_web/.metadata +++ /dev/null @@ -1,30 +0,0 @@ -# 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: "924134a44c189315be2148659913dda1671cbe99" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: 924134a44c189315be2148659913dda1671cbe99 - base_revision: 924134a44c189315be2148659913dda1671cbe99 - - platform: web - create_revision: 924134a44c189315be2148659913dda1671cbe99 - base_revision: 924134a44c189315be2148659913dda1671cbe99 - - # 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/.agents/skills/multi-agent-mux-ui/apps/mam_web/README.md b/.agents/skills/multi-agent-mux-ui/apps/mam_web/README.md deleted file mode 100644 index cd826cb..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_web/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# mam_web - -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/.agents/skills/multi-agent-mux-ui/apps/mam_web/analysis_options.yaml b/.agents/skills/multi-agent-mux-ui/apps/mam_web/analysis_options.yaml deleted file mode 100644 index 0d29021..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_web/analysis_options.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# 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 - -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/.agents/skills/multi-agent-mux-ui/apps/mam_web/lib/main.dart b/.agents/skills/multi-agent-mux-ui/apps/mam_web/lib/main.dart deleted file mode 100644 index 244a702..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_web/lib/main.dart +++ /dev/null @@ -1,122 +0,0 @@ -import 'package:flutter/material.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({super.key}); - - // This widget is the root of your application. - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - // This is the theme of your application. - // - // TRY THIS: Try running your application with "flutter run". You'll see - // the application has a purple toolbar. Then, without quitting the app, - // try changing the seedColor in the colorScheme below to Colors.green - // and then invoke "hot reload" (save your changes or press the "hot - // reload" button in a Flutter-supported IDE, or press "r" if you used - // the command line to start the app). - // - // Notice that the counter didn't reset back to zero; the application - // state is not lost during the reload. To reset the state, use hot - // restart instead. - // - // This works for code too, not just values: Most code changes can be - // tested with just a hot reload. - colorScheme: .fromSeed(seedColor: Colors.deepPurple), - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({super.key, required this.title}); - - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. - - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - - final String title; - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. - _counter++; - }); - } - - @override - Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. - return Scaffold( - appBar: AppBar( - // TRY THIS: Try changing the color here to a specific color (to - // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar - // change color while the other colors stay the same. - backgroundColor: Theme.of(context).colorScheme.inversePrimary, - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - // - // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" - // action in the IDE, or press "p" in the console), to see the - // wireframe for each widget. - mainAxisAlignment: .center, - children: [ - const Text('You have pushed the button this many times:'), - Text( - '$_counter', - style: Theme.of(context).textTheme.headlineMedium, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), - ); - } -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/pubspec.lock b/.agents/skills/multi-agent-mux-ui/apps/mam_web/pubspec.lock deleted file mode 100644 index 301a4eb..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_web/pubspec.lock +++ /dev/null @@ -1,356 +0,0 @@ -# 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: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" - source: hosted - version: "1.1.2" - 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" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: "41e005c33bd814be4d3096aff55b1908d419fde52ca656c8c47719ec745873cd" - url: "https://pub.dev" - source: hosted - version: "1.0.9" - data_table_2: - dependency: "direct main" - description: - name: data_table_2 - sha256: cb31d465dcf1e1598a662d06d3d2c16c73700ae9e837a3d91588f1dda7519abc - url: "https://pub.dev" - source: hosted - version: "2.7.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" - 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_markdown: - dependency: "direct main" - description: - name: flutter_markdown - sha256: "04c4722cc36ec5af38acc38ece70d22d3c2123c61305d555750a091517bbe504" - url: "https://pub.dev" - source: hosted - version: "0.6.23" - 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" - 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" - 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" - mam_core: - dependency: "direct main" - description: - path: "../../packages/mam_core" - relative: true - source: path - version: "1.0.0" - markdown: - dependency: transitive - description: - name: markdown - sha256: ee85086ad7698b42522c6ad42fe195f1b9898e4d974a1af4576c1a3a176cada9 - url: "https://pub.dev" - source: hosted - version: "7.3.1" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 - url: "https://pub.dev" - source: hosted - version: "0.12.19" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" - url: "https://pub.dev" - source: hosted - version: "0.13.0" - meta: - dependency: "direct main" - description: - name: meta - sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349" - url: "https://pub.dev" - source: hosted - version: "1.18.0" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - 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" - 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" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - 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: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e" - url: "https://pub.dev" - source: hosted - version: "0.7.11" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b - url: "https://pub.dev" - source: hosted - version: "2.2.0" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360" - url: "https://pub.dev" - source: hosted - version: "15.2.0" - web: - dependency: transitive - description: - name: web - sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - xterm: - dependency: "direct main" - description: - name: xterm - sha256: "168dfedca77cba33fdb6f52e2cd001e9fde216e398e89335c19b524bb22da3a2" - url: "https://pub.dev" - source: hosted - version: "4.0.0" - yaml: - dependency: transitive - description: - name: yaml - sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce - url: "https://pub.dev" - source: hosted - version: "3.1.3" - zmodem: - dependency: transitive - description: - name: zmodem - sha256: "3b7e5b29f3a7d8aee472029b05165a68438eff2f3f7766edf13daba1e297adbf" - url: "https://pub.dev" - source: hosted - version: "0.0.6" -sdks: - dart: ">=3.12.1 <4.0.0" - flutter: ">=3.27.0" diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/pubspec.yaml b/.agents/skills/multi-agent-mux-ui/apps/mam_web/pubspec.yaml deleted file mode 100644 index c823e4f..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_web/pubspec.yaml +++ /dev/null @@ -1,93 +0,0 @@ -name: mam_web -description: "A new Flutter project." -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# In Windows, build-name is used as the major, minor, and patch parts -# of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+1 - -environment: - sdk: ^3.12.1 - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. -dependencies: - flutter: - sdk: flutter - cupertino_icons: ^1.0.8 - mam_core: - path: ../../packages/mam_core - flutter_riverpod: ^2.4.9 - data_table_2: ^2.5.8 - xterm: ^4.0.0 - flutter_markdown: ^0.6.18 - meta: ^1.9.0 - -dev_dependencies: - flutter_test: - sdk: flutter - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - flutter_lints: ^6.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/to/resolution-aware-images - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/to/asset-from-package - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/to/font-from-package diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/test/widget_test.dart b/.agents/skills/multi-agent-mux-ui/apps/mam_web/test/widget_test.dart deleted file mode 100644 index 167eb88..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_web/test/widget_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:mam_web/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/favicon.png b/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/favicon.png deleted file mode 100644 index 8aaa46a..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/favicon.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-192.png b/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-192.png deleted file mode 100644 index b749bfe..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-192.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-512.png b/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-512.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-maskable-192.png b/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-maskable-192.png deleted file mode 100644 index eb9b4d7..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-maskable-192.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-maskable-512.png b/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-maskable-512.png deleted file mode 100644 index d69c566..0000000 Binary files a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/icons/Icon-maskable-512.png and /dev/null differ diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/index.html b/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/index.html deleted file mode 100644 index ab8ec94..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/index.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - mam_web - - - - - - - diff --git a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/manifest.json b/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/manifest.json deleted file mode 100644 index 8b24805..0000000 --- a/.agents/skills/multi-agent-mux-ui/apps/mam_web/web/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "mam_web", - "short_name": "mam_web", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -} diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/mam_core.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/mam_core.dart deleted file mode 100644 index 71c8805..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/mam_core.dart +++ /dev/null @@ -1,9 +0,0 @@ -library mam_core; - -export 'src/command_runner.dart'; -export 'src/models/drift_entry.dart'; -export 'src/models/pane.dart'; -export 'src/models/session_row.dart'; -export 'src/models/sessions_snapshot.dart'; -export 'src/services/session_service.dart'; -export 'src/services/status_repository.dart'; diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/command_runner.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/command_runner.dart deleted file mode 100644 index ab5143f..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/command_runner.dart +++ /dev/null @@ -1,107 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; - -/// Result of one [runCommand] invocation. -/// -/// When [timedOut] is true and the call was made with `killOnTimeout: false`, -/// [rc]/[stdout]/[stderr] are sentinel/empty — the real result only becomes -/// available via [backgroundFuture] once the still-running subprocess exits -/// on its own (D-Critical: a purge must never be reported as success/failure -/// before the actual process result is known). -class CommandResult { - final int rc; - final String stdout; - final String stderr; - final bool timedOut; - final Future? backgroundFuture; - - const CommandResult( - this.rc, - this.stdout, - this.stderr, { - this.timedOut = false, - this.backgroundFuture, - }); -} - -/// The only subprocess execution entry point in this codebase (D5). [argv] -/// is always an argv list handed straight to [Process.start] with shell -/// interpolation disabled, so there is no command-injection surface -/// regardless of what user input ends up inside [argv]. -Future runCommand( - List argv, { - Duration? timeout, - Map? environment, - String? workingDirectory, - bool killOnTimeout = true, -}) async { - if (argv.isEmpty) { - throw ArgumentError.value(argv, 'argv', 'must not be empty'); - } - - final process = await Process.start( - argv.first, - argv.sublist(1), - environment: environment, - workingDirectory: workingDirectory, - runInShell: false, - ); - - final stdoutBuffer = StringBuffer(); - final stderrBuffer = StringBuffer(); - final stdoutDone = process.stdout - .transform(utf8.decoder) - .listen(stdoutBuffer.write) - .asFuture(); - final stderrDone = process.stderr - .transform(utf8.decoder) - .listen(stderrBuffer.write) - .asFuture(); - - Future awaitExit() async { - final rc = await process.exitCode; - await stdoutDone; - await stderrDone; - return CommandResult(rc, stdoutBuffer.toString(), stderrBuffer.toString()); - } - - final exitFuture = awaitExit(); - if (timeout == null) { - return exitFuture; - } - - final timeoutMarker = Object(); - final winner = await Future.any([ - exitFuture, - Future.delayed(timeout, () => timeoutMarker), - ]); - - if (!identical(winner, timeoutMarker)) { - return winner as CommandResult; - } - - // Timed out. - if (killOnTimeout) { - process.kill(ProcessSignal.sigterm); - final rc = await process.exitCode.timeout( - const Duration(seconds: 5), - onTimeout: () { - process.kill(ProcessSignal.sigkill); - return -9; - }, - ); - await stdoutDone; - await stderrDone; - return CommandResult( - rc, - stdoutBuffer.toString(), - stderrBuffer.toString(), - timedOut: true, - ); - } - - // Let the process keep running; hand back a future for its eventual result. - return CommandResult(-1, '', '', - timedOut: true, backgroundFuture: exitFuture); -} diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/drift_entry.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/drift_entry.dart deleted file mode 100644 index 209a59c..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/drift_entry.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:meta/meta.dart'; - -/// One entry from the top-level `drifts` list (reconcile.sh classes A/B/C/D), -/// not tied to a specific registered session row. -@immutable -class DriftEntry { - final String driftClass; - final String name; - final String msg; - - const DriftEntry( - {required this.driftClass, required this.name, required this.msg}); - - factory DriftEntry.fromJson(Map json) { - return DriftEntry( - driftClass: json['class'] as String? ?? '?', - name: json['name'] as String? ?? '?', - msg: json['msg'] as String? ?? '', - ); - } -} diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/pane.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/pane.dart deleted file mode 100644 index dd33e21..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/pane.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:meta/meta.dart'; - -/// The herdr pane backing a session row, as reported by `sessions_detail`. -@immutable -class Pane { - final int? pid; - final String? cwd; - final String? cmd; - final String? cmdFull; - - const Pane({this.pid, this.cwd, this.cmd, this.cmdFull}); - - factory Pane.fromSessionJson(Map json) { - return Pane( - pid: json['pane_pid'] as int?, - cwd: json['pane_cwd'] as String?, - cmd: json['cmd'] as String?, - cmdFull: json['cmd_full'] as String?, - ); - } -} diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/session_row.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/session_row.dart deleted file mode 100644 index ed4dad8..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/session_row.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:meta/meta.dart'; - -import 'pane.dart'; - -const _terminalStatuses = {'stopped', 'terminated', 'archived'}; - -/// One row of `sessions_detail`, matching the D8 contract in -/// `.mam/jobs/40bdce88/claude-reports/report-final.md` §3.1 field-for-field, -/// plus the additive pid/cmd_full/start_command/last_visible_status fields -/// the Detail Pane needs. -@immutable -class SessionRow { - final String name; - final String server; - final String status; - final bool herdrAlive; - final Pane pane; - final String? role; - final String resumeState; - final String jobId; - final String jobStatus; - final String? attachCommand; - final String? startCommand; - final String? lastVisibleStatus; - final List driftClasses; - - const SessionRow({ - required this.name, - required this.server, - required this.status, - required this.herdrAlive, - required this.pane, - this.role, - required this.resumeState, - required this.jobId, - required this.jobStatus, - this.attachCommand, - this.startCommand, - this.lastVisibleStatus, - this.driftClasses = const [], - }); - - bool get hasDrift => driftClasses.isNotEmpty; - - bool get isTerminal => _terminalStatuses.contains(status); - - factory SessionRow.fromJson(Map json) { - return SessionRow( - name: json['name'] as String? ?? '?', - server: json['server'] as String? ?? 'default', - status: json['status'] as String? ?? '?', - herdrAlive: json['herdr_alive'] as bool? ?? false, - pane: Pane.fromSessionJson(json), - role: json['role'] as String?, - resumeState: json['resume_state'] as String? ?? '?', - jobId: json['job_id'] as String? ?? '-', - jobStatus: json['job_status'] as String? ?? '-', - attachCommand: json['attach_command'] as String?, - startCommand: json['start_command'] as String?, - lastVisibleStatus: json['last_visible_status'] as String?, - driftClasses: (json['drift_classes'] as List? ?? const []) - .map((e) => e.toString()) - .toList(growable: false), - ); - } -} - diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/sessions_snapshot.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/sessions_snapshot.dart deleted file mode 100644 index ca64a53..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/models/sessions_snapshot.dart +++ /dev/null @@ -1,52 +0,0 @@ -import 'package:meta/meta.dart'; - -import 'drift_entry.dart'; -import 'session_row.dart'; - -/// The full parsed result of one `status.sh --json` call: the untouched -/// pre-D8 keys (timestamp/yaml_path/herdr_sessions_alive/herdr_confirmed/ -/// drifts/actions) plus the additive `sessions_detail` -> [SessionRow]. -@immutable -class SessionsSnapshot { - final DateTime timestamp; - final String yamlPath; - final List herdrSessionsAlive; - final bool herdrConfirmed; - final List drifts; - final List actions; - final List sessions; - - const SessionsSnapshot({ - required this.timestamp, - required this.yamlPath, - required this.herdrSessionsAlive, - required this.herdrConfirmed, - required this.drifts, - required this.actions, - required this.sessions, - }); - - factory SessionsSnapshot.fromJson(Map json) { - return SessionsSnapshot( - timestamp: - DateTime.tryParse(json['timestamp'] as String? ?? '')?.toUtc() ?? - DateTime.now().toUtc(), - yamlPath: json['yaml_path'] as String? ?? '', - herdrSessionsAlive: - (json['herdr_sessions_alive'] as List? ?? const []) - .map((e) => e.toString()) - .toList(growable: false), - herdrConfirmed: json['herdr_confirmed'] as bool? ?? false, - drifts: (json['drifts'] as List? ?? const []) - .map((e) => DriftEntry.fromJson(e as Map)) - .toList(growable: false), - actions: (json['actions'] as List? ?? const []) - .map((e) => e.toString()) - .toList(growable: false), - sessions: (json['sessions_detail'] as List? ?? const []) - .map((e) => SessionRow.fromJson(e as Map)) - .toList(growable: false), - ); - } -} - diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/services/session_service.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/services/session_service.dart deleted file mode 100644 index a2e94af..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/services/session_service.dart +++ /dev/null @@ -1,78 +0,0 @@ -import 'dart:convert'; - -import '../command_runner.dart'; -import '../models/sessions_snapshot.dart'; - -/// Thrown by [SessionService.fetchSnapshot] on any non-zero exit, timeout, -/// or malformed-JSON condition — callers (namely [StatusRepository]) use -/// this to distinguish "no fresh data this poll" from a genuine bug. -class StatusFetchException implements Exception { - final String message; - StatusFetchException(this.message); - - @override - String toString() => 'StatusFetchException: $message'; -} - -/// Wraps `status.sh --json` as safely-parsed [SessionsSnapshot] models. -/// This is the single place that knows the on-disk path to `status.sh` and -/// the shape of its JSON output — nothing else in `mam_core` reads YAML, -/// SQLite, or jsonl directly (Rev.1 §1 principle). -class SessionService { - final String statusScriptPath; - final Duration timeout; - - SessionService({ - required this.statusScriptPath, - this.timeout = const Duration(seconds: 5), - }); - - bool _preflightChecked = false; - - Future _checkPreflight() async { - if (_preflightChecked) return; - - final bashResult = await runCommand(['bash', '--version'], timeout: timeout); - if (bashResult.rc != 0) { - throw StatusFetchException('preflight failed: bash is missing or not executable'); - } - - final herdrResult = await runCommand(['herdr', '-V'], timeout: timeout); - if (herdrResult.rc != 0) { - throw StatusFetchException('preflight failed: herdr is missing or not executable'); - } - - _preflightChecked = true; - } - - Future fetchSnapshot() async { - await _checkPreflight(); - - final result = await runCommand( - ['bash', statusScriptPath, '--json'], - timeout: timeout, - ); - - if (result.timedOut) { - throw StatusFetchException('status.sh --json timed out after $timeout'); - } - if (result.rc != 0) { - throw StatusFetchException( - 'status.sh --json exited ${result.rc}: ${result.stderr.trim()}', - ); - } - - final Object? decoded; - try { - decoded = jsonDecode(result.stdout); - } on FormatException catch (e) { - throw StatusFetchException('malformed JSON from status.sh --json: $e'); - } - - if (decoded is! Map) { - throw StatusFetchException('status.sh --json returned non-object JSON'); - } - - return SessionsSnapshot.fromJson(decoded); - } -} diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/services/status_repository.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/services/status_repository.dart deleted file mode 100644 index b704bd4..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_core/lib/src/services/status_repository.dart +++ /dev/null @@ -1,68 +0,0 @@ -import 'package:meta/meta.dart'; - -import '../models/sessions_snapshot.dart'; -import 'session_service.dart'; - -/// One tick of [StatusRepository.watch]: either a fresh [snapshot], or (on -/// poll failure) the last known-good snapshot marked [stale] (D6) — the UI -/// never sees a null/blank dashboard just because one poll failed. -@immutable -class SessionsPoll { - final SessionsSnapshot? snapshot; - final bool stale; - final DateTime? lastOkAt; - final String? error; - - const SessionsPoll( - {this.snapshot, this.stale = false, this.lastOkAt, this.error}); -} - -/// Polls [SessionService] on an interval, applying the D6 contract: on -/// failure, keep serving the last good snapshot (marked stale) and back off -/// (3s -> 6s -> 15s) instead of hammering a broken `status.sh`. Framework -/// agnostic — `apps/mam_desktop` wires this into a Riverpod `StreamProvider`, -/// it does not reimplement the polling/backoff logic itself. -class StatusRepository { - final SessionService sessionService; - final Duration pollInterval; - final List failureBackoff; - - StatusRepository({ - required this.sessionService, - this.pollInterval = const Duration(seconds: 4), - this.failureBackoff = const [ - Duration(seconds: 3), - Duration(seconds: 6), - Duration(seconds: 15), - ], - }) : assert(failureBackoff.isNotEmpty, 'failureBackoff must not be empty'); - - Stream watch() async* { - SessionsSnapshot? lastGood; - DateTime? lastOkAt; - var failureStreak = 0; - - while (true) { - try { - final snapshot = await sessionService.fetchSnapshot(); - lastGood = snapshot; - lastOkAt = DateTime.now(); - failureStreak = 0; - yield SessionsPoll( - snapshot: snapshot, stale: false, lastOkAt: lastOkAt); - await Future.delayed(pollInterval); - } catch (e) { - final idx = failureStreak.clamp(0, failureBackoff.length - 1); - final delay = failureBackoff[idx]; - failureStreak++; - yield SessionsPoll( - snapshot: lastGood, - stale: lastGood != null, - lastOkAt: lastOkAt, - error: e.toString(), - ); - await Future.delayed(delay); - } - } - } -} diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_core/pubspec.lock b/.agents/skills/multi-agent-mux-ui/packages/mam_core/pubspec.lock deleted file mode 100644 index 9915058..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_core/pubspec.lock +++ /dev/null @@ -1,389 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: "9a3386eea899815698dd55995277cf7cb8572ee52b399a6edfb7ae2b50e5fc19" - url: "https://pub.dev" - source: hosted - version: "105.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "62993bed6eadbe9596c5c20d5c167e7bc563c5fe266657a04ddeb93bdb84f4c9" - url: "https://pub.dev" - source: hosted - version: "14.1.0" - 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" - cli_config: - dependency: transitive - description: - name: cli_config - sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec - url: "https://pub.dev" - source: hosted - version: "0.2.0" - 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" - coverage: - dependency: transitive - description: - name: coverage - sha256: "956a3de0725ca232ad353565a8290d3357592bf4250f6f298a185e2d949c5d3d" - url: "https://pub.dev" - source: hosted - version: "1.15.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf - url: "https://pub.dev" - source: hosted - version: "3.0.7" - file: - dependency: transitive - description: - name: file - sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 - url: "https://pub.dev" - source: hosted - version: "7.0.1" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - glob: - dependency: transitive - description: - name: glob - sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de - url: "https://pub.dev" - source: hosted - version: "2.1.3" - http: - dependency: "direct main" - description: - name: http - sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" - url: "https://pub.dev" - source: hosted - version: "1.6.0" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 - url: "https://pub.dev" - source: hosted - version: "3.2.2" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" - url: "https://pub.dev" - source: hosted - version: "4.1.2" - io: - dependency: transitive - description: - name: io - sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b - url: "https://pub.dev" - source: hosted - version: "1.0.5" - logging: - dependency: transitive - description: - name: logging - sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd" - url: "https://pub.dev" - source: hosted - version: "0.12.20" - meta: - dependency: "direct main" - description: - name: meta - sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9" - url: "https://pub.dev" - source: hosted - version: "1.19.0" - mime: - dependency: transitive - description: - name: mime - sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - node_preamble: - dependency: transitive - description: - name: node_preamble - sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" - url: "https://pub.dev" - source: hosted - version: "2.0.2" - package_config: - dependency: transitive - description: - name: package_config - sha256: ffcf4cf3d6c0b74ac43708d9f56625506e8a68aa935abe9d267a7330f320eb5d - url: "https://pub.dev" - source: hosted - version: "3.0.0" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - pool: - dependency: transitive - description: - name: pool - sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d" - url: "https://pub.dev" - source: hosted - version: "1.5.2" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" - url: "https://pub.dev" - source: hosted - version: "2.2.0" - shelf: - dependency: transitive - description: - name: shelf - sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 - url: "https://pub.dev" - source: hosted - version: "1.4.2" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 - url: "https://pub.dev" - source: hosted - version: "1.1.3" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" - url: "https://pub.dev" - source: hosted - version: "3.0.0" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b - url: "https://pub.dev" - source: hosted - version: "2.1.2" - source_maps: - dependency: transitive - description: - name: source_maps - sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" - url: "https://pub.dev" - source: hosted - version: "0.10.13" - source_span: - dependency: transitive - description: - name: source_span - sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" - url: "https://pub.dev" - source: hosted - version: "1.10.2" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - 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: - dependency: "direct dev" - description: - name: test - sha256: "0d5ba5602ec3baa28c8ce365e1efc5575969c765f45c554a3e167dc7945b9c30" - url: "https://pub.dev" - source: hosted - version: "1.31.2" - test_api: - dependency: transitive - description: - name: test_api - sha256: "475610b2aa23c19687cce2961e44b0cc57cafe220f67c2b80201231b2a07fbe7" - url: "https://pub.dev" - source: hosted - version: "0.7.13" - test_core: - dependency: transitive - description: - name: test_core - sha256: a39c204a4fc7a7ccb04a2b985e359fda3cc37e45e0b8ac61c3fb1a05aa832132 - url: "https://pub.dev" - source: hosted - version: "0.6.19" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360" - url: "https://pub.dev" - source: hosted - version: "15.2.0" - watcher: - dependency: transitive - description: - name: watcher - sha256: "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - 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" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - yaml: - dependency: "direct main" - description: - name: yaml - sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce - url: "https://pub.dev" - source: hosted - version: "3.1.3" -sdks: - dart: ">=3.11.0 <4.0.0" diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_core/pubspec.yaml b/.agents/skills/multi-agent-mux-ui/packages/mam_core/pubspec.yaml deleted file mode 100644 index fd6b119..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_core/pubspec.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: mam_core -description: Core Dart business logic for multi-agent-mux management. -version: 1.0.0 -publish_to: none - -environment: - sdk: '>=3.0.0 <4.0.0' - -dependencies: - yaml: ^3.1.2 - http: ^1.1.0 - meta: ^1.9.0 - -dev_dependencies: - test: ^1.24.0 diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_core/test/session_service_test.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_core/test/session_service_test.dart deleted file mode 100644 index 0bef1cb..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_core/test/session_service_test.dart +++ /dev/null @@ -1,98 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:mam_core/mam_core.dart'; -import 'package:test/test.dart'; - -String _repoRoot() { - var dir = Directory.current; - while (!Directory('${dir.path}/.git').existsSync()) { - final parent = dir.parent; - if (parent.path == dir.path) { - throw StateError( - 'could not locate repo root (.git) from ${Directory.current.path}'); - } - dir = parent; - } - return dir.path; -} - -void main() { - test('SessionsSnapshot.fromJson parses a well-formed sessions_detail payload', - () { - final json = jsonDecode(''' - { - "timestamp": "2026-07-16T11:56:54Z", - "yaml_path": "/x/.mam/agent-sessions.yaml", - "herdr_sessions_alive": ["a|default"], - "herdr_confirmed": true, - "drifts": [{"class": "B", "name": "a", "msg": "registered: a"}], - "actions": ["registered: a"], - "sessions_detail": [ - { - "name": "a", "server": "default", "status": "running", - "herdr_alive": true, "cmd": "claude", "role": "creator", - "resume_state": "yes", "job_id": "-", "job_status": "-", - "pane_cwd": "/x", "attach_command": "herdr session attach a", - "drift_classes": ["B"], "pane_pid": 123, "cmd_full": "claude --foo", - "start_command": "herdr agent start ...", "last_visible_status": "running" - } - ] - } - ''') as Map; - - final snapshot = SessionsSnapshot.fromJson(json); - - expect(snapshot.herdrConfirmed, isTrue); - expect(snapshot.drifts, hasLength(1)); - expect(snapshot.drifts.single.driftClass, 'B'); - expect(snapshot.sessions, hasLength(1)); - - final row = snapshot.sessions.single; - expect(row.name, 'a'); - expect(row.role, 'creator'); - expect(row.resumeState, 'yes'); - expect(row.hasDrift, isTrue); - expect(row.isTerminal, isFalse); - expect(row.pane.pid, 123); - expect(row.pane.cmdFull, 'claude --foo'); - expect(row.attachCommand, 'herdr session attach a'); - }); - - test('SessionsSnapshot.fromJson tolerates missing optional fields', () { - final json = jsonDecode('{"sessions_detail": [{"name": "bare"}]}') - as Map; - final snapshot = SessionsSnapshot.fromJson(json); - - expect(snapshot.herdrConfirmed, isFalse); - expect(snapshot.sessions.single.name, 'bare'); - expect(snapshot.sessions.single.resumeState, '?'); - expect(snapshot.sessions.single.pane.pid, isNull); - }); - - test( - 'SessionService.fetchSnapshot parses the real status.sh --json output', - () async { - final scriptPath = - '${_repoRoot()}/.agents/skills/multi-agent-mux-status/scripts/status.sh'; - if (!File(scriptPath).existsSync()) { - markTestSkipped( - 'status.sh not found at $scriptPath in this environment'); - return; - } - - final service = SessionService(statusScriptPath: scriptPath); - final snapshot = await service.fetchSnapshot(); - - expect(snapshot.yamlPath, isNotEmpty); - // sessions_detail row count must match herdr_sessions_alive's distinct names. - final aliveNames = snapshot.herdrSessionsAlive - .map((entry) => entry.split('|').first) - .toSet(); - final detailNames = snapshot.sessions.map((s) => s.name).toSet(); - expect(detailNames, containsAll(aliveNames.intersection(detailNames))); - }, - timeout: const Timeout(Duration(seconds: 15)), - ); -} - diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_pty/lib/mam_pty.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_pty/lib/mam_pty.dart deleted file mode 100644 index 6d54a70..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_pty/lib/mam_pty.dart +++ /dev/null @@ -1,3 +0,0 @@ -library mam_pty; - -export 'src/pty_session.dart'; diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_pty/lib/src/pty_session.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_pty/lib/src/pty_session.dart deleted file mode 100644 index 6d8ac21..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_pty/lib/src/pty_session.dart +++ /dev/null @@ -1,314 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; -import 'dart:ffi' as ffi; -import 'dart:io'; -import 'package:ffi/ffi.dart'; - -// FFI Signatures for Linux libc -typedef _posix_openpt_c = ffi.Int32 Function(ffi.Int32 flags); -typedef _posix_openpt_dart = int Function(int flags); - -typedef _grantpt_c = ffi.Int32 Function(ffi.Int32 fd); -typedef _grantpt_dart = int Function(int fd); - -typedef _unlockpt_c = ffi.Int32 Function(ffi.Int32 fd); -typedef _unlockpt_dart = int Function(int fd); - -typedef _ptsname_c = ffi.Pointer Function(ffi.Int32 fd); -typedef _ptsname_dart = ffi.Pointer Function(int fd); - -typedef _ioctl_c = ffi.Int32 Function(ffi.Int32 fd, ffi.UnsignedLong request, ffi.Pointer argp); -typedef _ioctl_dart = int Function(int fd, int request, ffi.Pointer argp); - -typedef _fork_c = ffi.Int32 Function(); -typedef _fork_dart = int Function(); - -typedef _setsid_c = ffi.Int32 Function(); -typedef _setsid_dart = int Function(); - -typedef _open_c = ffi.Int32 Function(ffi.Pointer pathname, ffi.Int32 flags); -typedef _open_dart = int Function(ffi.Pointer pathname, int flags); - -typedef _close_c = ffi.Int32 Function(ffi.Int32 fd); -typedef _close_dart = int Function(int fd); - -typedef _dup2_c = ffi.Int32 Function(ffi.Int32 oldfd, ffi.Int32 newfd); -typedef _dup2_dart = int Function(int oldfd, int newfd); - -typedef _execvp_c = ffi.Int32 Function(ffi.Pointer file, ffi.Pointer> argv); -typedef _execvp_dart = int Function(ffi.Pointer file, ffi.Pointer> argv); - -typedef _read_c = ffi.IntPtr Function(ffi.Int32 fd, ffi.Pointer buf, ffi.IntPtr count); -typedef _read_dart = int Function(int fd, ffi.Pointer buf, int count); - -typedef _write_c = ffi.IntPtr Function(ffi.Int32 fd, ffi.Pointer buf, ffi.IntPtr count); -typedef _write_dart = int Function(int fd, ffi.Pointer buf, int count); - -typedef _waitpid_c = ffi.Int32 Function(ffi.Int32 pid, ffi.Pointer status, ffi.Int32 options); -typedef _waitpid_dart = int Function(int pid, ffi.Pointer status, int options); - -typedef _chdir_c = ffi.Int32 Function(ffi.Pointer path); -typedef _chdir_dart = int Function(ffi.Pointer path); - -typedef _fcntl_c = ffi.Int32 Function(ffi.Int32 fd, ffi.Int32 cmd, ffi.Int32 arg); -typedef _fcntl_dart = int Function(int fd, int cmd, int arg); - -typedef _unsetenv_c = ffi.Int32 Function(ffi.Pointer name); -typedef _unsetenv_dart = int Function(ffi.Pointer name); - -typedef _exit_c = ffi.Void Function(ffi.Int32 status); -typedef _exit_dart = void Function(int status); - -base class Winsize extends ffi.Struct { - @ffi.Uint16() - external int ws_row; - @ffi.Uint16() - external int ws_col; - @ffi.Uint16() - external int ws_xpixel; - @ffi.Uint16() - external int ws_ypixel; -} - -class PtySession { - final int masterFd; - final String slaveName; - final int childPid; - - final _stdoutController = StreamController>(); - bool _isClosed = false; - - PtySession._({ - required this.masterFd, - required this.slaveName, - required this.childPid, - }) { - _startReading(); - } - - Stream> get stdout => _stdoutController.stream; - - static Future start(String executable, List arguments, { - String? workingDirectory, - Map? environment, - }) async { - final libc = ffi.DynamicLibrary.open('libc.so.6'); - - final posixOpenpt = libc.lookupFunction<_posix_openpt_c, _posix_openpt_dart>('posix_openpt'); - final grantpt = libc.lookupFunction<_grantpt_c, _grantpt_dart>('grantpt'); - final unlockpt = libc.lookupFunction<_unlockpt_c, _unlockpt_dart>('unlockpt'); - final ptsname = libc.lookupFunction<_ptsname_c, _ptsname_dart>('ptsname'); - final fork = libc.lookupFunction<_fork_c, _fork_dart>('fork'); - final setsid = libc.lookupFunction<_setsid_c, _setsid_dart>('setsid'); - final open = libc.lookupFunction<_open_c, _open_dart>('open'); - final close = libc.lookupFunction<_close_c, _close_dart>('close'); - final dup2 = libc.lookupFunction<_dup2_c, _dup2_dart>('dup2'); - final execvp = libc.lookupFunction<_execvp_c, _execvp_dart>('execvp'); - final ioctl = libc.lookupFunction<_ioctl_c, _ioctl_dart>('ioctl'); - final chdir = libc.lookupFunction<_chdir_c, _chdir_dart>('chdir'); - final fcntl = libc.lookupFunction<_fcntl_c, _fcntl_dart>('fcntl'); - final unsetenv = libc.lookupFunction<_unsetenv_c, _unsetenv_dart>('unsetenv'); - final cExit = libc.lookupFunction<_exit_c, _exit_dart>('_exit'); - - // 1. Prepare master PTY - final masterFd = posixOpenpt(2 | 0x00000400); - if (masterFd < 0) { - throw OSError('Failed to open pseudo-terminal master'); - } - - if (grantpt(masterFd) != 0) { - close(masterFd); - throw OSError('Failed to grant pseudo-terminal slave permissions'); - } - - if (unlockpt(masterFd) != 0) { - close(masterFd); - throw OSError('Failed to unlock pseudo-terminal slave descriptor'); - } - - final slavePtr = ptsname(masterFd); - if (slavePtr == ffi.Pointer.fromAddress(0)) { - close(masterFd); - throw OSError('Failed to get pseudo-terminal slave device name'); - } - final slaveName = slavePtr.cast().toDartString(); - - // Set master fd to non-blocking mode to prevent freezing the Dart event loop (§6.7) - // F_GETFL = 3, F_SETFL = 4, O_NONBLOCK = 2048 (0x800) - final flags = fcntl(masterFd, 3, 0); - if (flags >= 0) { - fcntl(masterFd, 4, flags | 2048); - } - - // 2. Pre-allocate ALL structures on the heap before fork() for async-signal-safety (§6.7) - final pathPtr = slaveName.toNativeUtf8(); - final exePtr = executable.toNativeUtf8(); - final workDirPtr = workingDirectory?.toNativeUtf8(); - - // Environment isolation variables to be cleared in child context - final tmuxNamePtr = 'TMUX'.toNativeUtf8(); - final tmuxPaneNamePtr = 'TMUX_PANE'.toNativeUtf8(); - - final argsCount = arguments.length; - final argv = malloc>(argsCount + 2); - argv[0] = exePtr.cast(); - - final allocatedArgs = >[]; - for (var i = 0; i < argsCount; i++) { - final ptr = arguments[i].toNativeUtf8(); - allocatedArgs.add(ptr); - argv[i + 1] = ptr.cast(); - } - argv[argsCount + 1] = ffi.Pointer.fromAddress(0); - - // 3. Fork child process - final pid = fork(); - if (pid < 0) { - close(masterFd); - malloc.free(pathPtr); - malloc.free(exePtr); - malloc.free(tmuxNamePtr); - malloc.free(tmuxPaneNamePtr); - if (workDirPtr != null) malloc.free(workDirPtr); - malloc.free(argv); - for (final p in allocatedArgs) { - malloc.free(p); - } - throw OSError('Failed to fork child process'); - } - - if (pid == 0) { - // --- CHILD PROCESS BRANCH (Strictly async-signal-safe OS calls only!) --- - // A. Disassociate controlling terminal - setsid(); - - // B. Isolate from nested TMUX/Herdr environments (§6.7) - // We must unset TMUX and TMUX_PANE to ensure the child shell is properly isolated - // from any parent terminal multiplexer session, preventing unexpected nested behavior. - unsetenv(tmuxNamePtr.cast()); - unsetenv(tmuxPaneNamePtr.cast()); - - // C. Open slave and redirect stdio - final slaveFd = open(pathPtr.cast(), 2); - if (slaveFd < 0) { - cExit(-1); // direct libc _exit to prevent async-signal-unsafe Dart runtime exit - } - - ioctl(slaveFd, 0x540E, ffi.Pointer.fromAddress(0)); - - dup2(slaveFd, 0); - dup2(slaveFd, 1); - dup2(slaveFd, 2); - - close(masterFd); - if (slaveFd > 2) { - close(slaveFd); - } - - if (workDirPtr != null) { - chdir(workDirPtr.cast()); - } - - execvp(exePtr.cast(), argv); - cExit(-2); // direct libc _exit on exec failure - } - - // --- PARENT PROCESS BRANCH --- - malloc.free(pathPtr); - malloc.free(exePtr); - malloc.free(tmuxNamePtr); - malloc.free(tmuxPaneNamePtr); - if (workDirPtr != null) malloc.free(workDirPtr); - malloc.free(argv); - for (final p in allocatedArgs) { - malloc.free(p); - } - - return PtySession._( - masterFd: masterFd, - slaveName: slaveName, - childPid: pid, - ); - } - - void _startReading() { - final libc = ffi.DynamicLibrary.open('libc.so.6'); - final cRead = libc.lookupFunction<_read_c, _read_dart>('read'); - final buffer = malloc(1024); - - Timer.periodic(const Duration(milliseconds: 10), (timer) { - if (_isClosed) { - timer.cancel(); - malloc.free(buffer); - return; - } - - final bytesRead = cRead(masterFd, buffer.cast(), 1024); - if (bytesRead > 0) { - final bytes = List.generate(bytesRead, (i) => buffer[i]); - _stdoutController.add(bytes); - } else if (bytesRead < 0) { - final errno = ffi.DynamicLibrary.open('libc.so.6').lookup('errno').value; - if (errno != 4 && errno != 11) { - close(); - } - } else { - close(); - } - }); - } - - void write(List data) { - if (_isClosed) return; - final libc = ffi.DynamicLibrary.open('libc.so.6'); - final cWrite = libc.lookupFunction<_write_c, _write_dart>('write'); - - final buffer = malloc(data.length); - for (var i = 0; i < data.length; i++) { - buffer[i] = data[i]; - } - - cWrite(masterFd, buffer.cast(), data.length); - malloc.free(buffer); - } - - void writeString(String str) { - write(utf8.encode(str)); - } - - void resize(int cols, int rows) { - if (_isClosed) return; - final libc = ffi.DynamicLibrary.open('libc.so.6'); - final ioctl = libc.lookupFunction<_ioctl_c, _ioctl_dart>('ioctl'); - - final size = calloc(); - size.ref.ws_col = cols; - size.ref.ws_row = rows; - - ioctl(masterFd, 0x5414, size.cast()); - calloc.free(size); - } - - void close() { - if (_isClosed) return; - _isClosed = true; - _stdoutController.close(); - - final libc = ffi.DynamicLibrary.open('libc.so.6'); - final close = libc.lookupFunction<_close_c, _close_dart>('close'); - close(masterFd); - - // Send SIGTERM to terminate child process - final kill = libc.lookupFunction< - ffi.Int32 Function(ffi.Int32 pid, ffi.Int32 sig), - int Function(int pid, int sig) - >('kill'); - kill(childPid, 15); // SIGTERM = 15 - - // Reap child zombie process (blocking waitpid options = 0 to guarantee reaping) - final waitpid = libc.lookupFunction<_waitpid_c, _waitpid_dart>('waitpid'); - final statusPtr = calloc(); - waitpid(childPid, statusPtr, 0); // Blocking wait guarantees process resource removal - calloc.free(statusPtr); - } -} diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_pty/pubspec.lock b/.agents/skills/multi-agent-mux-ui/packages/mam_pty/pubspec.lock deleted file mode 100644 index 59c8af1..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_pty/pubspec.lock +++ /dev/null @@ -1,381 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: "9a3386eea899815698dd55995277cf7cb8572ee52b399a6edfb7ae2b50e5fc19" - url: "https://pub.dev" - source: hosted - version: "105.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "62993bed6eadbe9596c5c20d5c167e7bc563c5fe266657a04ddeb93bdb84f4c9" - url: "https://pub.dev" - source: hosted - version: "14.1.0" - 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" - cli_config: - dependency: transitive - description: - name: cli_config - sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec - url: "https://pub.dev" - source: hosted - version: "0.2.0" - 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" - coverage: - dependency: transitive - description: - name: coverage - sha256: "956a3de0725ca232ad353565a8290d3357592bf4250f6f298a185e2d949c5d3d" - url: "https://pub.dev" - source: hosted - version: "1.15.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf - url: "https://pub.dev" - source: hosted - version: "3.0.7" - ffi: - dependency: "direct main" - description: - name: ffi - sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45" - url: "https://pub.dev" - source: hosted - version: "2.2.0" - file: - dependency: transitive - description: - name: file - sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 - url: "https://pub.dev" - source: hosted - version: "7.0.1" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - glob: - dependency: transitive - description: - name: glob - sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de - url: "https://pub.dev" - source: hosted - version: "2.1.3" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 - url: "https://pub.dev" - source: hosted - version: "3.2.2" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" - url: "https://pub.dev" - source: hosted - version: "4.1.2" - io: - dependency: transitive - description: - name: io - sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b - url: "https://pub.dev" - source: hosted - version: "1.0.5" - logging: - dependency: transitive - description: - name: logging - sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd" - url: "https://pub.dev" - source: hosted - version: "0.12.20" - meta: - dependency: "direct main" - description: - name: meta - sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9" - url: "https://pub.dev" - source: hosted - version: "1.19.0" - mime: - dependency: transitive - description: - name: mime - sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - node_preamble: - dependency: transitive - description: - name: node_preamble - sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" - url: "https://pub.dev" - source: hosted - version: "2.0.2" - package_config: - dependency: transitive - description: - name: package_config - sha256: ffcf4cf3d6c0b74ac43708d9f56625506e8a68aa935abe9d267a7330f320eb5d - url: "https://pub.dev" - source: hosted - version: "3.0.0" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - pool: - dependency: transitive - description: - name: pool - sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d" - url: "https://pub.dev" - source: hosted - version: "1.5.2" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" - url: "https://pub.dev" - source: hosted - version: "2.2.0" - shelf: - dependency: "direct main" - description: - name: shelf - sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 - url: "https://pub.dev" - source: hosted - version: "1.4.2" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 - url: "https://pub.dev" - source: hosted - version: "1.1.3" - shelf_web_socket: - dependency: "direct main" - description: - name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b - url: "https://pub.dev" - source: hosted - version: "2.1.2" - source_maps: - dependency: transitive - description: - name: source_maps - sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" - url: "https://pub.dev" - source: hosted - version: "0.10.13" - source_span: - dependency: transitive - description: - name: source_span - sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" - url: "https://pub.dev" - source: hosted - version: "1.10.2" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - 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: - dependency: "direct dev" - description: - name: test - sha256: "0d5ba5602ec3baa28c8ce365e1efc5575969c765f45c554a3e167dc7945b9c30" - url: "https://pub.dev" - source: hosted - version: "1.31.2" - test_api: - dependency: transitive - description: - name: test_api - sha256: "475610b2aa23c19687cce2961e44b0cc57cafe220f67c2b80201231b2a07fbe7" - url: "https://pub.dev" - source: hosted - version: "0.7.13" - test_core: - dependency: transitive - description: - name: test_core - sha256: a39c204a4fc7a7ccb04a2b985e359fda3cc37e45e0b8ac61c3fb1a05aa832132 - url: "https://pub.dev" - source: hosted - version: "0.6.19" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360" - url: "https://pub.dev" - source: hosted - version: "15.2.0" - watcher: - dependency: transitive - description: - name: watcher - sha256: "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - web: - dependency: transitive - description: - name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" - url: "https://pub.dev" - source: hosted - version: "0.5.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" - url: "https://pub.dev" - source: hosted - version: "2.4.5" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - yaml: - dependency: transitive - description: - name: yaml - sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce - url: "https://pub.dev" - source: hosted - version: "3.1.3" -sdks: - dart: ">=3.11.0 <4.0.0" diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_pty/pubspec.yaml b/.agents/skills/multi-agent-mux-ui/packages/mam_pty/pubspec.yaml deleted file mode 100644 index 345de33..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_pty/pubspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: mam_pty -description: Pure Dart FFI bindings for PTY and WebSocket bridge server. -version: 1.0.0 -publish_to: none - -environment: - sdk: '>=3.0.0 <4.0.0' - -dependencies: - ffi: ^2.1.0 - shelf: ^1.4.1 - shelf_web_socket: ^1.0.4 - meta: ^1.9.0 - -dev_dependencies: - test: ^1.24.0 diff --git a/.agents/skills/multi-agent-mux-ui/packages/mam_pty/test/pty_runtime_test.dart b/.agents/skills/multi-agent-mux-ui/packages/mam_pty/test/pty_runtime_test.dart deleted file mode 100644 index e0460b5..0000000 --- a/.agents/skills/multi-agent-mux-ui/packages/mam_pty/test/pty_runtime_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; -import 'package:mam_pty/mam_pty.dart'; -import 'package:test/test.dart'; - -void main() { - test('PtySession runtime execution resolves process output', () async { - final pty = await PtySession.start('echo', ['hello-pty-ok']); - - final completer = Completer(); - final buffer = StringBuffer(); - - final sub = pty.stdout.listen((data) { - buffer.write(utf8.decode(data)); - }, onDone: () { - completer.complete(buffer.toString()); - }); - - final result = await completer.future.timeout(const Duration(seconds: 3)); - sub.cancel(); - pty.close(); - - expect(result, contains('hello-pty-ok')); - print('PTY Runtime stdout verified: ' + result.trim()); - }); -} diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json deleted file mode 100644 index 9050f96..0000000 --- a/.dart_tool/package_config.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "configVersion": 2, - "packages": [ - { - "name": "multi_agent_mux_ui_root", - "rootUri": "../", - "packageUri": "lib/", - "languageVersion": "3.0" - } - ], - "generator": "pub", - "generatorVersion": "3.12.1", - "flutterRoot": "file:///home/godopu16/puenv/flutter", - "flutterVersion": "3.44.1", - "pubCache": "file:///home/godopu16/.pub-cache" -} diff --git a/.dart_tool/package_graph.json b/.dart_tool/package_graph.json deleted file mode 100644 index 5cd06e7..0000000 --- a/.dart_tool/package_graph.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "roots": [ - "multi_agent_mux_ui_root" - ], - "packages": [ - { - "name": "multi_agent_mux_ui_root", - "version": "1.0.0", - "dependencies": [], - "devDependencies": [] - } - ], - "configVersion": 1 -} \ No newline at end of file diff --git a/CLAUDE_WORK_LOGS.md b/CLAUDE_WORK_LOGS.md new file mode 100644 index 0000000..3e34b5b --- /dev/null +++ b/CLAUDE_WORK_LOGS.md @@ -0,0 +1,102 @@ +# CLAUDE_WORK_LOGS.md + +작업 일자: 2026-07-19 +작업자: Claude (herdr 세션 `default:w3:p1`, `claude`) + +## 개요 + +`.agents/skills/` 아래 multi-agent-mux 스킬 세트가 tmux 시절 문법(`capture-pane`, `list-panes`, `kill-session`, `send-keys`, `session attach` 등)을 실제 herdr CLI 문법인 것처럼 잘못 사용하고 있던 문제를 발견하고 전수 조사·수정했다. 추가로 `HERDR_SERVER_NAME` 격리 기능이 진짜 herdr 서버 격리가 아니라 workspace label 흉내에 불과했던 것을 실제 `herdr --session ` 격리로 재설계했고, 프롬프트 주입 검증 로직(`send_keys_safe`)의 멀티바이트/줄바꿈 버그도 잡았다. 모든 수정은 herdr 실제 바이너리(v0.7.4) 대조 + 디스포저블 herdr 세션 실구동 테스트로 검증했으며, 일부는 실제 cline reviewer 에이전트(`canary-projects-multi-agent-mux-reviewer-cline`)에게 `multi-agent-mux-delegate-job`으로 위임하여 독립 교차검증(`[VERDICT: PASS]`)까지 받았다. + +커밋은 아직 하지 않았다 (전부 워킹 트리 변경 상태). + +--- + +## 1. 수정한 내용 + +### 1.1 `.agents/skills/lib.sh` (공유 라이브러리) + +- **`mam_herdr` shim의 `kill-session` 케이스**: `herdr session stop/delete "$sess"` (herdr의 `session`은 서버 전체 단위 개념이라 개별 에이전트 이름으로는 절대 못 찾음, 항상 조용히 실패) → `agent get`으로 `pane_id`를 먼저 해석한 뒤 `pane close `로 교체. +- **`send-keys` 케이스**: 동일하게 `pane send-keys "$sess" ...`(pane_id가 아니라 이름을 넘겨서 항상 실패)를 `agent get`으로 `pane_id` 선해석 후 `pane send-keys ...`로 교체. +- **`list-panes` 케이스**: JSON 경로가 `d.get('pane', d)`로 완전히 틀려있었음 (실제 응답은 `result.agent.{cwd, pane_id, agent}`) → cwd/cmd는 `agent get`에서, pid는 별도로 `pane process-info --pane `에서 조회하도록 재작성. 이 버그로 인해 `create_session.sh`/`update_yaml_resumed.sh`의 `PANE_PID`/`PANE_CWD`/`PANE_CMD` 캡처가 전부 항상 빈 값이었음. +- **`HERDR_SERVER_NAME` 격리를 진짜 herdr session 격리로 통일**: + - `_init_herdr_isolation`에 세션 부트스트랩 로직 추가 — `HERDR_SERVER_NAME != default`일 때 `herdr session list`로 확인 후 없으면 `herdr --session server`를 헤드리스로 백그라운드 기동 (인터랙티브 launch가 걸리는 "nested herdr is disabled" 제한을 회피). + - `_real_herdr()` 헬퍼 도입 — 모든 실제 herdr 호출에 `--session "$HERDR_SERVER_NAME"`를 자동 스코핑. + - `new-session` 케이스에서 기존의 "workspace label 매칭으로 격리 흉내"(진짜 격리가 전혀 아니었음, `agent list`가 서버 전역이라 아무 효과 없었음) 로직을 통째로 제거하고, 활성 세션 안에 fresh workspace를 만들도록 단순화. + - `resolve_herdr_workspace()` 단순화 — workspace_id를 찾던 로직 제거, YAML에 저장된 세션 라벨을 그대로 반환 (호출자 3곳 — resume/stop/update_yaml_resumed — 호환 유지를 위해 함수명은 유지). +- **`send_keys_safe()` paste 검증 로직 버그 2건 수정**: + 1. 마커를 `tail -c 24`(바이트 기준)로 잘라서 한글 등 멀티바이트 UTF-8 문자를 중간에서 자를 위험 → `python3` 문자 기준 슬라이싱(`[-24:]`)으로 교체. + 2. 렌더링된 pane은 터미널 폭에 맞춰 자동 줄바꿈하는데(cline은 이어지는 줄에 공백 들여쓰기까지 추가) 마커가 그 지점에 걸리면 `grep -F`(줄 단위)가 못 찾음 → 매칭 직전에 `tr -d '[:space:]'`로 공백/개행을 전부 제거하고 매칭 (paste 확인 지점 + Enter 제출 확인 지점 둘 다 적용). + +### 1.2 `.agents/skills/multi-agent-mux-create/` +- `SKILL.md`: 문서 예시 명령 정정(`herdr attach`→`agent attach` 등), 존재하지 않는 `list-sessions` 제거, 격리 섹션에 실제 메커니즘(헤드리스 세션 부트스트랩) 설명 추가. +- `scripts/create_session.sh`: YAML에 저장하는 `attach_command`/`kill_command`/`start_command` 템플릿이 `herdr session attach/stop/delete`(서버 전체 단위 명령을 개별 에이전트 이름으로 잘못 호출)로 깨져 있던 것을 `HERDR_SERVER_NAME= herdr ...` 형태로 수정. + +### 1.3 `.agents/skills/multi-agent-mux-resume/` +- `SKILL.md`: Verification 블록의 pseudo-명령 정정, `herdr attach -t`(존재하지 않는 문법) → `herdr agent attach`. +- (스크립트 자체는 버그 없었음 — herdr 관련 이슈 전수조사 완료.) + +### 1.4 `.agents/skills/multi-agent-mux-monitor/` +- `SKILL.md`: `herdr ls`/`list-panes` 문서 예시 정정. +- `scripts/reconcile.sh`: `attach_command` 템플릿의 존재하지 않는 `attach -t` → `agent attach` 수정. (이 파일은 원래 다른 목적 — purging 세션 자동등록 스킵 — 으로 이미 일부 수정되어 있었음.) + +### 1.5 `.agents/skills/multi-agent-mux-status/` +- `SKILL.md`: `herdr has-session`/`list-panes` 설명 정정, 드리프트 안내 메시지의 `herdr kill-session` 제안을 스킬 경유 안내로 변경. + +### 1.6 `.agents/skills/multi-agent-mux-stop/` +- `SKILL.md`: Verification 블록 정정. +- `scripts/stop_session.sh`: (원래 다른 목적으로 이미 수정 중이던) purge 락 파일(`purging-`) 추가, `--agent` 값 검증 추가. + +### 1.7 `.agents/skills/multi-agent-mux-delegate-job/` +- `multi-agent-mux-delegate-job` (메인 스크립트) `run_agent()` 함수의 herdr 버그 3건: + 1. `lib.sh`를 `has-session` 체크보다 늦게 source하고 있어서 체크 시점엔 아직 shim이 아니라 진짜 바이너리 → 존재하지 않는 `has-session` 서브커맨드 호출 → 항상 실패. `source lib.sh`를 파일 최상단으로 이동. + 2. `HERDR_SERVER_NAME`을 레지스트리에서 자동 해석 안 하고 호출자가 export해뒀길 기대함 → 격리 세션에 위임 시 실패 가능 → `resolve_herdr_workspace "$sess"` 자동 호출 추가. + 3. 안내 메시지의 `herdr session attach`(서버 전체 단위) → `herdr agent attach`로 수정. +- `SKILL.md`: "프롬프트는 영어/ASCII/짧게, 한국어 상세 내용은 마크다운 브리핑 파일로" 운영 규칙 추가 (send_keys_safe 버그의 실질적 완화책이자, `submit`의 기본 instructions 템플릿이 이미 따르고 있던 패턴을 명문화). + +### 1.8 기타 +- 루트 `.gitignore`에 Flutter/Dart 빌드 산출물, IDE 파일 패턴 추가 (`multi-agent-mux-ui`), 커밋 완료(`cccc30a`). +- `.mam/agent-sessions.yaml`의 stale 3개 세션(herdr 죽었는데 YAML엔 running으로 남아있던 것) `reconcile.sh`로 정리 → `terminated` 처리. + +--- + +## 2. 검증된 스킬 + +### 2.1 cline reviewer 독립 교차검증 완료 (`[VERDICT: PASS]`) + +**1차 — job `14943484`** (`.mam/jobs/14943484/cline-reports/herdr-cli-fix-review.md`) +- 대상: `lib.sh`(kill-session/send-keys/list-panes 수정 + session 격리 통일), `multi-agent-mux-create/scripts/create_session.sh`, `multi-agent-mux-monitor/scripts/reconcile.sh`, `multi-agent-mux-stop/scripts/stop_session.sh`, 5개 SKILL.md (create/resume/monitor/status/stop) +- 방법: 실제 herdr v0.7.4 바이너리로 10개 명령 문법 + 6개 JSON 스키마 직접 대조, 실구동 테스트, default 경로 회귀 테스트, pipefail 런타임 테스트, 정적분석. +- 잔여 LOW 2건 + INFO 1건 (전부 non-blocking, 비회귀). + +**2차 — job `80040741`** (`.mam/jobs/80040741/cline-agent-reports/report-final.md`, 정식 delegate-job 프로토콜로 완주) +- 대상: `lib.sh`의 `send_keys_safe()` 공백 정규화 수정, `multi-agent-mux-delegate-job/SKILL.md`의 새 규칙. +- 방법: python3 슬라이싱 시뮬레이션(엣지 케이스 15개) + 실제 bash 파이프라인 재현 + 실제 delegate-job 기본 템플릿으로 회귀 테스트. +- 잔여 INFO 1건(빈 marker_norm 위양성 가능성 — 실사용 경로에서 도달 불가로 확인, non-blocking). + +### 2.2 실제 프로덕션 사용으로 검증 (정식 리뷰 없음) + +- **`multi-agent-mux-delegate-job` 메인 스크립트의 `run_agent()` 수정 3건**: 정식 리뷰(job `e84698d7`)가 세션 hang으로 유실됐지만, 그 이후 실제로 여러 차례 `submit`을 성공 실행하면서(격리 세션 안의 살아있는 에이전트를 정확히 찾아내는 것 포함) 실사용 검증됨. +- **`multi-agent-mux-stop/scripts/stop_session.sh`**: 실제로 hung된 `canary-projects-multi-agent-mux-reviewer-cline` 세션을 대상으로 진짜 stop을 실행 — graceful exit-keys → kill-session(수정된 pane close 경로) → conversation id 캡처까지 전 과정 실전 확인. +- **`multi-agent-mux-resume/scripts/resume_session.sh`**: 같은 세션을 동일 conversation id로 실제 resume하여 대화 이력이 정확히 복원되는 것 확인 (2회 반복). + +--- + +## 3. 추후 검증할 스킬 + +| 스킬 | 상태 | +|---|---| +| **`multi-agent-mux-delegate-job` 메인 스크립트** | 정식 cline 리뷰(job `e84698d7`)가 세션 hang으로 미완료. 재위임하면 공식 PASS 서명을 받을 수 있음. | +| **`multi-agent-mux-status/scripts/status.sh`** | `SKILL.md` 문구만 검토됨. 스크립트 자체는 이번 작업에서 한 번도 직접 실행 안 함 (내부적으로 쓰는 `reconcile.sh`는 검증됨). | +| **`multi-agent-mux-loop`** | 완전히 손대지 않음. `run_loop.sh`가 herdr를 직접 다루지 않고 `delegate-job`을 통해서만 위임하는 구조라 영향권 밖일 가능성 높지만 미확인. | +| **`multi-agent-mux-ui`** (Flutter/Dart) | `.gitignore` 정리만 진행. `mam_core`가 `status.sh`를 래핑하는 로직 자체는 이번 herdr 문법 수정과 별개로 전혀 검토 안 함. | + +--- + +## 4. 추후 작업 + +1. **커밋**: 지금까지의 모든 수정(11개 파일, lib.sh + 6개 스킬)이 워킹 트리에 uncommitted 상태. 커밋 여부/단위 결정 필요. +2. **`multi-agent-mux-delegate-job` 메인 스크립트 정식 리뷰 재위임** — job `e84698d7` 재시도 (섹션 3 참조). +3. **`send_keys_safe`의 INFO급 잔여 이슈** — 빈 `marker_norm`일 때 `grep -Fq ''`가 항상 매칭되는 위양성 가능성. 실사용 경로에서 도달 불가로 확인됐지만, 원하면 방어적으로 빈 텍스트 가드를 추가할 수 있음. +4. **`multi-agent-mux-status/scripts/status.sh` 실제 실행 검증** — 아직 한 번도 직접 실행 안 됨. +5. **`multi-agent-mux-loop`/`multi-agent-mux-ui` 전수 조사** — 이번 herdr 문법 감사 범위 밖. +6. **`.mam/agent-sessions.yaml`의 `herdr_workspace`/`herdr_server` 필드명 정리** — 현재 `resolve_herdr_workspace()`가 반환하는 값의 실제 의미(workspace_id가 아니라 session 라벨)와 함수명이 불일치하는 상태(호출자 호환을 위해 이름은 유지함). 장기적으로는 필드명/함수명을 실제 의미(session)에 맞게 리네이밍하는 리팩터링을 고려할 수 있음. diff --git a/melos.yaml b/melos.yaml deleted file mode 100644 index c8961ec..0000000 --- a/melos.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: multi_agent_mux_ui -repository: https://github.com/user/multi-agent-mux -packages: - - .agents/skills/multi-agent-mux-ui/packages/** - - .agents/skills/multi-agent-mux-ui/apps/** diff --git a/pubspec.yaml b/pubspec.yaml deleted file mode 100644 index ba15810..0000000 --- a/pubspec.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: multi_agent_mux_ui_root -description: Root workspace for multi-agent-mux-ui. -version: 1.0.0 -publish_to: none - -environment: - sdk: '>=3.0.0 <4.0.0' diff --git a/tests/conftest.py b/tests/conftest.py index 75490ee..930c46d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -14,8 +14,8 @@ def mam_sandbox(tmp_path, monkeypatch): """ # 1. Copy the skill scripts to sandboxed tmp_path/skills and tmp_path/.agents/skills src_skills = "/home/godopu16/PuKi/laa/canary_projects/multi-agent-mux/.agents/skills" - shutil.copytree(src_skills, tmp_path / "skills", ignore=shutil.ignore_patterns('multi-agent-mux-ui')) - shutil.copytree(src_skills, tmp_path / ".agents" / "skills", ignore=shutil.ignore_patterns('multi-agent-mux-ui')) + shutil.copytree(src_skills, tmp_path / "skills") + shutil.copytree(src_skills, tmp_path / ".agents" / "skills") # 2. Create sandboxed directory structure mam_dir = tmp_path / ".mam" diff --git a/tests/test_challenger_m3.py b/tests/test_challenger_m3.py new file mode 100644 index 0000000..f27786c --- /dev/null +++ b/tests/test_challenger_m3.py @@ -0,0 +1,205 @@ +import os +import subprocess +import json +import sqlite3 +import pytest +import shutil +import yaml +import sys +from pathlib import Path + +# Helper to run mutation on agent-sessions.yaml using atomic_dump_yaml in bash +def run_mutation(mam_sandbox, mutation_str, env=None): + lib_path = mam_sandbox / ".agents" / "skills" / "lib.sh" + yaml_path = mam_sandbox / ".mam" / "agent-sessions.yaml" + cmd_str = f"source {lib_path} && atomic_dump_yaml {yaml_path}" + run_env = dict(os.environ) + if env: + run_env.update(env) + res = subprocess.run(["bash", "-c", cmd_str], input=mutation_str, capture_output=True, text=True, env=run_env) + return res + +def test_stop_session_unvalidated_agent(mam_sandbox, mock_herdr, mock_agents): + """ + Test case 1: Unvalidated agent argument in stop_session.sh + Verify that calling stop_session.sh with an invalid agent name returns code 2 + and exits with a clear error message to stderr. + """ + tmp_path = mam_sandbox + stop_script = tmp_path / "skills" / "multi-agent-mux-stop" / "scripts" / "stop_session.sh" + + # 1. Register a session first + session_name = "invalid-agent-session-creator-claude" + mutation = """ +d['herdr_sessions'] = [{ + 'name': 'invalid-agent-session-creator-claude', + 'status': 'running', + 'role': 'Creator', + 'pane': { + 'cwd': 'WS_PLACEHOLDER', + 'pid': 8888, + 'cmd': 'claude', + 'cmd_full': 'claude' + } +}] +""".replace("WS_PLACEHOLDER", str(tmp_path)) + res_mut = run_mutation(tmp_path, mutation) + assert res_mut.returncode == 0 + + # 2. Try stopping with --agent invalid_agent and --purge-conversation + cmd_stop = [ + "bash", str(stop_script), + "--session", session_name, + "--agent", "invalid_agent", + "--purge-conversation", + "--yes" + ] + res_stop = subprocess.run(cmd_stop, capture_output=True, text=True, cwd=str(tmp_path)) + + # It returns code 2 + assert res_stop.returncode == 2 + + # And prints invalid agent type error to stderr + assert "ERROR: invalid agent type 'invalid_agent'" in res_stop.stderr + + # The registry entry is NOT removed + yaml_path = tmp_path / ".mam" / "agent-sessions.yaml" + with open(yaml_path, 'r') as f: + reg = yaml.safe_load(f) + assert len(reg.get("herdr_sessions", [])) == 1 + + +def test_special_character_workspace_slug_interpretation(mam_sandbox): + """ + Test case 2: Special character workspace slug interpretation + Verify that workspace paths with only special characters result in derived session names + that do NOT start with dashes, preventing option flags injection. + """ + tmp_path = mam_sandbox + lib_path = tmp_path / ".agents" / "skills" / "lib.sh" + + # Workspace consisting of purely special characters + special_ws = tmp_path / "@#$*" / "@#$*" + special_ws.mkdir(parents=True, exist_ok=True) + + cmd = f"source {lib_path} && derive_session_name '{special_ws}' 'claude'" + res = subprocess.run(["bash", "-c", cmd], capture_output=True, text=True, cwd=str(tmp_path)) + assert res.returncode == 0 + derived_name = res.stdout.strip() + + # Confirm that the derived name does NOT start with a dash and is default "ws" + assert not derived_name.startswith("-") + assert derived_name == "ws-creator-claude" + + +def test_monitor_reconcile_race_on_purge(mam_sandbox, mock_herdr): + """ + Test case 3: Concurrency/Race condition during session purge + Verify that if a session is being purged, the presence of the purging lock file + prevents concurrent monitor checks from auto-registering it back. + """ + tmp_path = mam_sandbox + reconcile_script = tmp_path / "skills" / "multi-agent-mux-monitor" / "scripts" / "reconcile.sh" + + # 1. Register a running session in herdr and YAML + session_name = "purged-race-creator-claude" + with open(mock_herdr, 'r') as f: + state = json.load(f) + state["agents"][session_name] = { + "status": "running", + "agent": "claude", + "cwd": str(tmp_path), + "pid": 9999, + "pane_id": "w1:p1", + "command": "claude" + } + with open(mock_herdr, 'w') as f: + json.dump(state, f, indent=2) + + mutation = f""" +d['herdr_sessions'] = [{{ + 'name': '{session_name}', + 'status': 'running', + 'role': 'Creator', + 'pane': {{ + 'cwd': 'WS_PLACEHOLDER', + 'pid': 9999, + 'cmd': 'claude', + 'cmd_full': 'claude' + }} +}}] +""".replace("WS_PLACEHOLDER", str(tmp_path)) + res_mut = run_mutation(tmp_path, mutation) + assert res_mut.returncode == 0 + + # 2. Simulate a purge: stop_session.sh deletes the registry row, but herdr session takes a moment to die. + # We remove it from the YAML registry, and create the purging lock file. + mutation_purge = f""" +d['herdr_sessions'] = [s for s in d.get('herdr_sessions', []) if s.get('name') != '{session_name}'] +""" + res_purge_mut = run_mutation(tmp_path, mutation_purge) + assert res_purge_mut.returncode == 0 + + # Create the purging lock file + purging_file = tmp_path / ".mam" / f"purging-{session_name}" + purging_file.parent.mkdir(parents=True, exist_ok=True) + purging_file.touch() + + # Confirm YAML registry has no sessions + yaml_path = tmp_path / ".mam" / "agent-sessions.yaml" + with open(yaml_path, 'r') as f: + reg = yaml.safe_load(f) + assert len(reg.get("herdr_sessions", [])) == 0 + + # 3. Run reconcile.sh once. It should NOT auto-register it back because the purging lock file exists! + cmd_reconcile = ["bash", str(reconcile_script), "--once", "--emit-diff"] + res_rec = subprocess.run(cmd_reconcile, capture_output=True, text=True, cwd=str(tmp_path)) + assert res_rec.returncode == 0 + + # Verify that the session has NOT been auto-registered back in YAML + with open(yaml_path, 'r') as f: + reg_after = yaml.safe_load(f) + sessions_after = reg_after.get("herdr_sessions", []) + assert len(sessions_after) == 0 + + +def test_mqtt_hmac_and_seq_validation(mam_sandbox): + """ + Test case 4: MQTT HMAC and sequence number validation + Verify that mqtt_common correctly verifies HMAC signatures and drops messages with + invalid signatures or out-of-order sequence numbers. + """ + # Import mqtt_common from sandboxed folder + sys.path.insert(0, str(mam_sandbox / ".agents" / "skills" / "multi-agent-mux-delegate-job" / "scripts")) + import mqtt_common + + # 1. verify_hmac behaviour with no auth_token (PoC mode) + payload_poc = {"data": {"val": 123}} + assert mqtt_common.verify_hmac(payload_poc, None) is True + + # 2. verify_hmac with auth_token and valid HMAC + auth_token = "mysecrettoken" + payload = { + "job_id": "job123", + "event": "started", + "seq": 1, + "data": { + "val": 123 + } + } + + # Compute valid signature + msg = json.dumps(payload, sort_keys=True, separators=(",", ":")).encode() + import hmac + import hashlib + sig = hmac.new(auth_token.encode(), msg, hashlib.sha256).hexdigest() + + payload_signed = dict(payload) + payload_signed["data"] = dict(payload["data"]) + payload_signed["data"]["hmac_sig"] = sig + + assert mqtt_common.verify_hmac(payload_signed, auth_token) is True + + # 3. verify_hmac with invalid signature + payload_signed["data"]["hmac_sig"] = "invalidsignature" + assert mqtt_common.verify_hmac(payload_signed, auth_token) is False