neoagent 2.3.1-beta.6 → 2.3.1-beta.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +45 -0
- package/docs/capabilities.md +2 -2
- package/docs/configuration.md +6 -5
- package/docs/hardware.md +1 -1
- package/docs/integrations.md +2 -3
- package/flutter_app/.metadata +42 -0
- package/flutter_app/README.md +21 -0
- package/flutter_app/analysis_options.yaml +32 -0
- package/flutter_app/android/app/build.gradle.kts +111 -0
- package/flutter_app/android/app/src/debug/AndroidManifest.xml +7 -0
- package/flutter_app/android/app/src/main/AndroidManifest.xml +171 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/MainActivity.kt +804 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/auto/NeoAgentCarAppService.kt +114 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/health/HealthConnectGateway.kt +280 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/health/HealthSyncNotifications.kt +113 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/health/HealthSyncPayload.kt +57 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/health/HealthSyncScheduler.kt +78 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/health/HealthSyncWorker.kt +253 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/health/PermissionsRationaleActivity.kt +46 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/recording/RecordingBootReceiver.kt +21 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/recording/RecordingForegroundService.kt +586 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/recording/RecordingStateStore.kt +78 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/recording/RecordingUploadClient.kt +104 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/telecom/NeoAgentConnection.kt +118 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/telecom/NeoAgentConnectionService.kt +86 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/widgets/AiHomeWidgetProvider.kt +457 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/widgets/AiWidgetStore.kt +194 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/widgets/VoiceLaunchWidgetProvider.kt +67 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/widgets/WidgetConfigActivity.kt +228 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/widgets/WidgetSyncScheduler.kt +72 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/widgets/WidgetSyncWorker.kt +186 -0
- package/flutter_app/android/app/src/main/kotlin/com/neoagent/flutter_app/widgets/WidgetTaskRunWorker.kt +210 -0
- package/flutter_app/android/app/src/main/res/drawable/launch_background.xml +12 -0
- package/flutter_app/android/app/src/main/res/drawable/neoagent_ai_widget_bg.xml +11 -0
- package/flutter_app/android/app/src/main/res/drawable/neoagent_ai_widget_task_bg.xml +8 -0
- package/flutter_app/android/app/src/main/res/drawable-v21/launch_background.xml +12 -0
- package/flutter_app/android/app/src/main/res/layout/neoagent_ai_widget.xml +138 -0
- package/flutter_app/android/app/src/main/res/layout/neoagent_ai_widget_task_row.xml +52 -0
- package/flutter_app/android/app/src/main/res/layout/neoagent_voice_widget.xml +49 -0
- package/flutter_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/flutter_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/flutter_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/flutter_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/flutter_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/flutter_app/android/app/src/main/res/values/arrays.xml +8 -0
- package/flutter_app/android/app/src/main/res/values/strings.xml +12 -0
- package/flutter_app/android/app/src/main/res/values/styles.xml +18 -0
- package/flutter_app/android/app/src/main/res/values-night/styles.xml +18 -0
- package/flutter_app/android/app/src/main/res/xml/automotive_app_desc.xml +4 -0
- package/flutter_app/android/app/src/main/res/xml/file_paths.xml +6 -0
- package/flutter_app/android/app/src/main/res/xml/neoagent_ai_widget_info.xml +12 -0
- package/flutter_app/android/app/src/main/res/xml/neoagent_voice_widget_info.xml +12 -0
- package/flutter_app/android/app/src/profile/AndroidManifest.xml +7 -0
- package/flutter_app/android/build.gradle.kts +24 -0
- package/flutter_app/android/ci-release.keystore +0 -0
- package/flutter_app/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/flutter_app/android/gradle.properties +3 -0
- package/flutter_app/android/key.properties +4 -0
- package/flutter_app/android/settings.gradle.kts +26 -0
- package/flutter_app/assets/branding/app_icon_1024.png +0 -0
- package/flutter_app/assets/branding/app_icon_128.png +0 -0
- package/flutter_app/assets/branding/app_icon_192.png +0 -0
- package/flutter_app/assets/branding/app_icon_256.png +0 -0
- package/flutter_app/assets/branding/app_icon_32.png +0 -0
- package/flutter_app/assets/branding/app_icon_512.png +0 -0
- package/flutter_app/assets/branding/app_icon_64.png +0 -0
- package/flutter_app/assets/branding/onboarding_intro.mp4 +0 -0
- package/flutter_app/assets/branding/tray_icon_template.png +0 -0
- package/flutter_app/lib/features/location/location_service.dart +119 -0
- package/flutter_app/lib/features/notifications/notification_interceptor.dart +97 -0
- package/flutter_app/lib/features/onboarding/onboarding_chrome.dart +571 -0
- package/flutter_app/lib/features/onboarding/onboarding_messaging_step.dart +275 -0
- package/flutter_app/lib/features/onboarding/onboarding_model_step.dart +366 -0
- package/flutter_app/lib/features/onboarding/onboarding_shell.dart +57 -0
- package/flutter_app/lib/features/onboarding/onboarding_video_step.dart +218 -0
- package/flutter_app/lib/features/onboarding/onboarding_welcome_step.dart +46 -0
- package/flutter_app/lib/main.dart +103 -0
- package/flutter_app/lib/main_account_settings.dart +1250 -0
- package/flutter_app/lib/main_admin.dart +886 -0
- package/flutter_app/lib/main_app_shell.dart +2134 -0
- package/flutter_app/lib/main_chat.dart +3316 -0
- package/flutter_app/lib/main_controller.dart +6836 -0
- package/flutter_app/lib/main_devices.dart +2396 -0
- package/flutter_app/lib/main_integrations.dart +909 -0
- package/flutter_app/lib/main_launcher.dart +959 -0
- package/flutter_app/lib/main_launcher_entry.dart +5 -0
- package/flutter_app/lib/main_models.dart +3539 -0
- package/flutter_app/lib/main_navigation.dart +188 -0
- package/flutter_app/lib/main_operations.dart +4851 -0
- package/flutter_app/lib/main_recordings.dart +920 -0
- package/flutter_app/lib/main_runtime.dart +838 -0
- package/flutter_app/lib/main_settings.dart +2040 -0
- package/flutter_app/lib/main_shared.dart +3147 -0
- package/flutter_app/lib/main_theme.dart +257 -0
- package/flutter_app/lib/main_voice_assistant.dart +957 -0
- package/flutter_app/lib/src/android_apk_drop_zone.dart +32 -0
- package/flutter_app/lib/src/android_apk_drop_zone_stub.dart +16 -0
- package/flutter_app/lib/src/android_apk_drop_zone_web.dart +348 -0
- package/flutter_app/lib/src/android_app_installer.dart +22 -0
- package/flutter_app/lib/src/android_app_installer_io.dart +122 -0
- package/flutter_app/lib/src/android_app_installer_stub.dart +21 -0
- package/flutter_app/lib/src/android_auto_bridge.dart +59 -0
- package/flutter_app/lib/src/android_launcher_bridge.dart +239 -0
- package/flutter_app/lib/src/app_launch_bridge.dart +29 -0
- package/flutter_app/lib/src/app_release_updater.dart +511 -0
- package/flutter_app/lib/src/backend_client.dart +1837 -0
- package/flutter_app/lib/src/desktop_companion.dart +2 -0
- package/flutter_app/lib/src/desktop_companion_actions.dart +586 -0
- package/flutter_app/lib/src/desktop_companion_io.dart +538 -0
- package/flutter_app/lib/src/desktop_companion_stub.dart +59 -0
- package/flutter_app/lib/src/desktop_native_bridge.dart +91 -0
- package/flutter_app/lib/src/desktop_screen_capture.dart +21 -0
- package/flutter_app/lib/src/desktop_screen_capture_io.dart +142 -0
- package/flutter_app/lib/src/desktop_screen_capture_stub.dart +12 -0
- package/flutter_app/lib/src/diagnostics_logger.dart +119 -0
- package/flutter_app/lib/src/health_bridge.dart +136 -0
- package/flutter_app/lib/src/live_voice_capture.dart +85 -0
- package/flutter_app/lib/src/messaging_access_summary.dart +46 -0
- package/flutter_app/lib/src/network/app_http_client.dart +53 -0
- package/flutter_app/lib/src/network/app_http_client_factory.dart +6 -0
- package/flutter_app/lib/src/network/app_http_client_io.dart +138 -0
- package/flutter_app/lib/src/network/app_http_client_stub.dart +3 -0
- package/flutter_app/lib/src/network/app_http_client_web.dart +94 -0
- package/flutter_app/lib/src/oauth_launcher.dart +33 -0
- package/flutter_app/lib/src/oauth_launcher_io.dart +95 -0
- package/flutter_app/lib/src/oauth_launcher_stub.dart +33 -0
- package/flutter_app/lib/src/oauth_launcher_web.dart +107 -0
- package/flutter_app/lib/src/recording_bridge.dart +232 -0
- package/flutter_app/lib/src/recording_bridge_io.dart +1019 -0
- package/flutter_app/lib/src/recording_bridge_stub.dart +120 -0
- package/flutter_app/lib/src/recording_bridge_web.dart +689 -0
- package/flutter_app/lib/src/recording_payloads.dart +86 -0
- package/flutter_app/lib/src/theme/palette.dart +81 -0
- package/flutter_app/lib/src/web_app_update_monitor.dart +17 -0
- package/flutter_app/lib/src/web_app_update_monitor_stub.dart +24 -0
- package/flutter_app/lib/src/web_app_update_monitor_web.dart +123 -0
- package/flutter_app/lib/src/widget_bridge.dart +49 -0
- package/flutter_app/linux/CMakeLists.txt +128 -0
- package/flutter_app/linux/flutter/CMakeLists.txt +88 -0
- package/flutter_app/linux/flutter/generated_plugin_registrant.cc +47 -0
- package/flutter_app/linux/flutter/generated_plugin_registrant.h +15 -0
- package/flutter_app/linux/flutter/generated_plugins.cmake +32 -0
- package/flutter_app/linux/runner/CMakeLists.txt +26 -0
- package/flutter_app/linux/runner/main.cc +6 -0
- package/flutter_app/linux/runner/my_application.cc +144 -0
- package/flutter_app/linux/runner/my_application.h +18 -0
- package/flutter_app/linux/runner/resources/app_icon.png +0 -0
- package/flutter_app/macos/Flutter/Flutter-Debug.xcconfig +2 -0
- package/flutter_app/macos/Flutter/Flutter-Release.xcconfig +2 -0
- package/flutter_app/macos/Flutter/GeneratedPluginRegistrant.swift +44 -0
- package/flutter_app/macos/Podfile +42 -0
- package/flutter_app/macos/Podfile.lock +87 -0
- package/flutter_app/macos/Runner/AppDelegate.swift +576 -0
- package/flutter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
- package/flutter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
- package/flutter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
- package/flutter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
- package/flutter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
- package/flutter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
- package/flutter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
- package/flutter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
- package/flutter_app/macos/Runner/Base.lproj/MainMenu.xib +342 -0
- package/flutter_app/macos/Runner/Configs/AppInfo.xcconfig +14 -0
- package/flutter_app/macos/Runner/Configs/Debug.xcconfig +2 -0
- package/flutter_app/macos/Runner/Configs/Release.xcconfig +2 -0
- package/flutter_app/macos/Runner/Configs/Warnings.xcconfig +13 -0
- package/flutter_app/macos/Runner/DebugProfile.entitlements +16 -0
- package/flutter_app/macos/Runner/Info.plist +36 -0
- package/flutter_app/macos/Runner/MainFlutterWindow.swift +19 -0
- package/flutter_app/macos/Runner/Release.entitlements +12 -0
- package/flutter_app/macos/Runner.xcodeproj/project.pbxproj +801 -0
- package/flutter_app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/flutter_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +99 -0
- package/flutter_app/macos/Runner.xcworkspace/contents.xcworkspacedata +10 -0
- package/flutter_app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/flutter_app/macos/RunnerTests/RunnerTests.swift +12 -0
- package/flutter_app/patch_strings.py +12 -0
- package/flutter_app/pubspec.lock +1224 -0
- package/flutter_app/pubspec.yaml +57 -0
- package/flutter_app/test/messaging_access_summary_test.dart +22 -0
- package/flutter_app/test/recording_payloads_test.dart +53 -0
- package/flutter_app/third_party/desktop_audio_capture/LICENSE +21 -0
- package/flutter_app/third_party/desktop_audio_capture/README.md +262 -0
- package/flutter_app/third_party/desktop_audio_capture/lib/audio_capture.dart +65 -0
- package/flutter_app/third_party/desktop_audio_capture/lib/config/mic_audio_config.dart +153 -0
- package/flutter_app/third_party/desktop_audio_capture/lib/config/system_adudio_config.dart +110 -0
- package/flutter_app/third_party/desktop_audio_capture/lib/mic/mic_audio_capture.dart +461 -0
- package/flutter_app/third_party/desktop_audio_capture/lib/model/audio_status.dart +91 -0
- package/flutter_app/third_party/desktop_audio_capture/lib/model/decibel_data.dart +106 -0
- package/flutter_app/third_party/desktop_audio_capture/lib/model/input_device_type.dart +219 -0
- package/flutter_app/third_party/desktop_audio_capture/lib/system/system_audio_capture.dart +336 -0
- package/flutter_app/third_party/desktop_audio_capture/linux/CMakeLists.txt +101 -0
- package/flutter_app/third_party/desktop_audio_capture/linux/audio_capture_plugin.cc +692 -0
- package/flutter_app/third_party/desktop_audio_capture/linux/include/audio_capture/audio_capture_plugin.h +35 -0
- package/flutter_app/third_party/desktop_audio_capture/linux/include/audio_capture/mic_capture_plugin.h +36 -0
- package/flutter_app/third_party/desktop_audio_capture/linux/include/desktop_audio_capture/audio_capture_plugin.h +32 -0
- package/flutter_app/third_party/desktop_audio_capture/linux/include/desktop_audio_capture/mic_capture_plugin.h +32 -0
- package/flutter_app/third_party/desktop_audio_capture/linux/mic_capture_plugin.cc +878 -0
- package/flutter_app/third_party/desktop_audio_capture/macos/Classes/AudioCapturePlugin.swift +27 -0
- package/flutter_app/third_party/desktop_audio_capture/macos/Classes/MicCapturePlugin.swift +1172 -0
- package/flutter_app/third_party/desktop_audio_capture/macos/Classes/SystemCapturePlugin.swift +655 -0
- package/flutter_app/third_party/desktop_audio_capture/macos/Resources/PrivacyInfo.xcprivacy +12 -0
- package/flutter_app/third_party/desktop_audio_capture/macos/desktop_audio_capture.podspec +30 -0
- package/flutter_app/third_party/desktop_audio_capture/pubspec.yaml +87 -0
- package/flutter_app/third_party/desktop_audio_capture/windows/CMakeLists.txt +105 -0
- package/flutter_app/third_party/desktop_audio_capture/windows/audio_capture_plugin.cpp +80 -0
- package/flutter_app/third_party/desktop_audio_capture/windows/audio_capture_plugin.h +31 -0
- package/flutter_app/third_party/desktop_audio_capture/windows/audio_capture_plugin_c_api.cpp +12 -0
- package/flutter_app/third_party/desktop_audio_capture/windows/include/audio_capture/audio_capture_plugin_c_api.h +23 -0
- package/flutter_app/third_party/desktop_audio_capture/windows/include/desktop_audio_capture/audio_capture_plugin.h +25 -0
- package/flutter_app/third_party/desktop_audio_capture/windows/mic_capture_plugin.cpp +1117 -0
- package/flutter_app/third_party/desktop_audio_capture/windows/mic_capture_plugin.h +115 -0
- package/flutter_app/third_party/desktop_audio_capture/windows/system_audio_capture_plugin.cpp +777 -0
- package/flutter_app/third_party/desktop_audio_capture/windows/system_audio_capture_plugin.h +87 -0
- package/flutter_app/third_party/flutter_secure_storage_linux/linux/CMakeLists.txt +30 -0
- package/flutter_app/third_party/flutter_secure_storage_linux/linux/flutter_secure_storage_linux_plugin.cc +215 -0
- package/flutter_app/third_party/flutter_secure_storage_linux/linux/include/flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h +27 -0
- package/flutter_app/third_party/flutter_secure_storage_linux/pubspec.yaml +20 -0
- package/flutter_app/tool/generate_desktop_branding.py +219 -0
- package/flutter_app/web/favicon.png +0 -0
- package/flutter_app/web/favicon.svg +12 -0
- package/flutter_app/web/icons/Icon-192.png +0 -0
- package/flutter_app/web/icons/Icon-512.png +0 -0
- package/flutter_app/web/icons/Icon-maskable-192.png +0 -0
- package/flutter_app/web/icons/Icon-maskable-512.png +0 -0
- package/flutter_app/web/index.html +39 -0
- package/flutter_app/web/manifest.json +35 -0
- package/flutter_app/windows/CMakeLists.txt +108 -0
- package/flutter_app/windows/flutter/CMakeLists.txt +109 -0
- package/flutter_app/windows/flutter/generated_plugin_registrant.cc +50 -0
- package/flutter_app/windows/flutter/generated_plugin_registrant.h +15 -0
- package/flutter_app/windows/flutter/generated_plugins.cmake +36 -0
- package/flutter_app/windows/runner/CMakeLists.txt +41 -0
- package/flutter_app/windows/runner/Runner.rc +121 -0
- package/flutter_app/windows/runner/flutter_window.cpp +533 -0
- package/flutter_app/windows/runner/flutter_window.h +37 -0
- package/flutter_app/windows/runner/main.cpp +53 -0
- package/flutter_app/windows/runner/resource.h +16 -0
- package/flutter_app/windows/runner/resources/app_icon.ico +0 -0
- package/flutter_app/windows/runner/runner.exe.manifest +14 -0
- package/flutter_app/windows/runner/utils.cpp +65 -0
- package/flutter_app/windows/runner/utils.h +19 -0
- package/flutter_app/windows/runner/win32_window.cpp +299 -0
- package/flutter_app/windows/runner/win32_window.h +102 -0
- package/lib/install_helpers.js +31 -0
- package/lib/manager.js +201 -6
- package/package.json +5 -3
- package/server/db/database.js +125 -1
- package/server/http/middleware.js +55 -2
- package/server/http/routes.js +1 -0
- package/server/http/static.js +41 -1
- package/server/index.js +3 -0
- package/server/public/.last_build_id +1 -1
- package/server/public/assets/AssetManifest.bin +1 -1
- package/server/public/assets/AssetManifest.bin.json +1 -1
- package/server/public/assets/NOTICES +281 -1
- package/server/public/assets/assets/branding/onboarding_intro.mp4 +0 -0
- package/server/public/assets/fonts/MaterialIcons-Regular.otf +0 -0
- package/server/public/canvaskit/wimp.wasm +0 -0
- package/server/public/flutter_bootstrap.js +2 -2
- package/server/public/main.dart.js +86707 -82621
- package/server/routes/auth.js +26 -5
- package/server/routes/integrations.js +108 -1
- package/server/routes/memory.js +11 -2
- package/server/routes/settings.js +84 -2
- package/server/routes/wearable.js +67 -0
- package/server/services/ai/engine.js +3 -2
- package/server/services/ai/models.js +30 -0
- package/server/services/ai/providers/githubCopilot.js +97 -0
- package/server/services/ai/providers/openai.js +2 -1
- package/server/services/ai/providers/openaiCodex.js +31 -0
- package/server/services/ai/settings.js +20 -0
- package/server/services/ai/toolSelector.js +54 -1
- package/server/services/ai/tools.js +88 -5
- package/server/services/desktop/screenRecorder.js +65 -9
- package/server/services/integrations/env.js +5 -0
- package/server/services/integrations/figma/provider.js +1 -0
- package/server/services/integrations/github/common.js +106 -0
- package/server/services/integrations/github/provider.js +499 -0
- package/server/services/integrations/github/repos.js +1124 -0
- package/server/services/integrations/google/provider.js +1 -0
- package/server/services/integrations/manager.js +88 -12
- package/server/services/integrations/microsoft/provider.js +1 -0
- package/server/services/integrations/oauth_provider.js +25 -8
- package/server/services/integrations/provider_config_store.js +85 -0
- package/server/services/integrations/registry.js +4 -2
- package/server/services/integrations/spotify/provider.js +1 -0
- package/server/services/integrations/trello/provider.js +842 -0
- package/server/services/manager.js +46 -1
- package/server/services/mcp/client.js +120 -23
- package/server/services/memory/manager.js +39 -2
- package/server/services/messaging/access_policy.js +10 -0
- package/server/services/messaging/manager.js +49 -0
- package/server/services/messaging/meshtastic.js +277 -0
- package/server/services/messaging/meshtastic_env.js +40 -0
- package/server/services/messaging/meshtastic_protocol.js +530 -0
- package/server/services/messaging/meshtastic_protocol.test.js +33 -0
- package/server/services/messaging/meshtastic_tcp_transport.js +25 -0
- package/server/services/tasks/runtime.js +1 -1
- package/server/services/voice/openaiClient.js +4 -1
- package/server/services/voice/openaiSpeech.js +6 -1
- package/server/services/voice/providers.js +144 -15
- package/server/services/voice/runtimeManager.js +156 -19
- package/server/services/voice/turnRunner.js +29 -9
- package/server/services/wearable/firmware_manifest.js +353 -0
- package/server/services/wearable/gateway.js +350 -0
- package/server/services/wearable/protocol.js +45 -0
- package/server/services/wearable/service.js +240 -0
- package/server/services/widgets/service.js +3 -0
- package/server/utils/local_secrets.js +56 -0
- package/server/utils/logger.js +37 -9
- package/server/services/integrations/home_assistant/provider.js +0 -350
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
Map<String, dynamic> buildWebScreenAndMicRecordingPayload() {
|
|
2
|
+
return <String, dynamic>{
|
|
3
|
+
'platform': 'web',
|
|
4
|
+
'screenAnalysisReady': true,
|
|
5
|
+
'sources': const <Map<String, dynamic>>[
|
|
6
|
+
<String, dynamic>{
|
|
7
|
+
'sourceKey': 'screen',
|
|
8
|
+
'sourceKind': 'screen-share',
|
|
9
|
+
'mediaKind': 'video',
|
|
10
|
+
'mimeType': 'video/webm',
|
|
11
|
+
'metadata': <String, dynamic>{
|
|
12
|
+
'analysisReady': true,
|
|
13
|
+
'transcribe': false,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
<String, dynamic>{
|
|
17
|
+
'sourceKey': 'microphone',
|
|
18
|
+
'sourceKind': 'microphone',
|
|
19
|
+
'mediaKind': 'audio',
|
|
20
|
+
'mimeType': 'audio/webm',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Map<String, dynamic> buildWebMicrophoneRecordingPayload() {
|
|
27
|
+
return <String, dynamic>{
|
|
28
|
+
'platform': 'web',
|
|
29
|
+
'screenAnalysisReady': false,
|
|
30
|
+
'sources': const <Map<String, dynamic>>[
|
|
31
|
+
<String, dynamic>{
|
|
32
|
+
'sourceKey': 'microphone',
|
|
33
|
+
'sourceKind': 'microphone',
|
|
34
|
+
'mediaKind': 'audio',
|
|
35
|
+
'mimeType': 'audio/webm',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
Map<String, dynamic> buildAndroidBackgroundRecordingPayload() {
|
|
42
|
+
return <String, dynamic>{
|
|
43
|
+
'platform': 'android',
|
|
44
|
+
'screenAnalysisReady': false,
|
|
45
|
+
'sources': const <Map<String, dynamic>>[
|
|
46
|
+
<String, dynamic>{
|
|
47
|
+
'sourceKey': 'microphone',
|
|
48
|
+
'sourceKind': 'microphone',
|
|
49
|
+
'mediaKind': 'audio',
|
|
50
|
+
'mimeType': 'audio/wav',
|
|
51
|
+
'metadata': <String, dynamic>{'backgroundCapable': true},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
Map<String, dynamic> buildDesktopRecordingPayload() {
|
|
58
|
+
return <String, dynamic>{
|
|
59
|
+
'platform': 'desktop',
|
|
60
|
+
'screenAnalysisReady': false,
|
|
61
|
+
'sources': const <Map<String, dynamic>>[
|
|
62
|
+
<String, dynamic>{
|
|
63
|
+
'sourceKey': 'microphone',
|
|
64
|
+
'sourceKind': 'microphone',
|
|
65
|
+
'mediaKind': 'audio',
|
|
66
|
+
'mimeType': 'audio/wav',
|
|
67
|
+
'metadata': <String, dynamic>{
|
|
68
|
+
'backgroundCapable': true,
|
|
69
|
+
'foregroundRole': 'user',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
<String, dynamic>{
|
|
73
|
+
'sourceKey': 'system',
|
|
74
|
+
'sourceKind': 'system-audio',
|
|
75
|
+
'mediaKind': 'audio',
|
|
76
|
+
'mimeType': 'audio/wav',
|
|
77
|
+
'metadata': <String, dynamic>{
|
|
78
|
+
'backgroundCapable': true,
|
|
79
|
+
'floatingToolbarCapable': true,
|
|
80
|
+
'globalHotkeyReady': true,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
'capturePlan': 'desktop-dual-source',
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import 'package:flutter/widgets.dart';
|
|
2
|
+
|
|
3
|
+
class NeoAgentPalette {
|
|
4
|
+
const NeoAgentPalette({
|
|
5
|
+
required this.bgPrimary,
|
|
6
|
+
required this.bgSecondary,
|
|
7
|
+
required this.bgTertiary,
|
|
8
|
+
required this.bgCard,
|
|
9
|
+
required this.textPrimary,
|
|
10
|
+
required this.textSecondary,
|
|
11
|
+
required this.textMuted,
|
|
12
|
+
required this.accent,
|
|
13
|
+
required this.accentHover,
|
|
14
|
+
required this.accentAlt,
|
|
15
|
+
required this.accentMuted,
|
|
16
|
+
required this.border,
|
|
17
|
+
required this.borderLight,
|
|
18
|
+
required this.success,
|
|
19
|
+
required this.warning,
|
|
20
|
+
required this.danger,
|
|
21
|
+
required this.info,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
final Color bgPrimary;
|
|
25
|
+
final Color bgSecondary;
|
|
26
|
+
final Color bgTertiary;
|
|
27
|
+
final Color bgCard;
|
|
28
|
+
final Color textPrimary;
|
|
29
|
+
final Color textSecondary;
|
|
30
|
+
final Color textMuted;
|
|
31
|
+
final Color accent;
|
|
32
|
+
final Color accentHover;
|
|
33
|
+
final Color accentAlt;
|
|
34
|
+
final Color accentMuted;
|
|
35
|
+
final Color border;
|
|
36
|
+
final Color borderLight;
|
|
37
|
+
final Color success;
|
|
38
|
+
final Color warning;
|
|
39
|
+
final Color danger;
|
|
40
|
+
final Color info;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const NeoAgentPalette darkPalette = NeoAgentPalette(
|
|
44
|
+
bgPrimary: Color(0xFF071015),
|
|
45
|
+
bgSecondary: Color(0xFF0E171E),
|
|
46
|
+
bgTertiary: Color(0xFF15232B),
|
|
47
|
+
bgCard: Color(0xFF16212A),
|
|
48
|
+
textPrimary: Color(0xFFF5EFE4),
|
|
49
|
+
textSecondary: Color(0xFFD2D7DC),
|
|
50
|
+
textMuted: Color(0xFF95A0A8),
|
|
51
|
+
accent: Color(0xFFC7A36A),
|
|
52
|
+
accentHover: Color(0xFFE4C58D),
|
|
53
|
+
accentAlt: Color(0xFF5FA897),
|
|
54
|
+
accentMuted: Color(0x24C7A36A),
|
|
55
|
+
border: Color(0x30576875),
|
|
56
|
+
borderLight: Color(0x4A7B8D99),
|
|
57
|
+
success: Color(0xFF37B67E),
|
|
58
|
+
warning: Color(0xFFD49A43),
|
|
59
|
+
danger: Color(0xFFE26E61),
|
|
60
|
+
info: Color(0xFF74A8D9),
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
const NeoAgentPalette lightPalette = NeoAgentPalette(
|
|
64
|
+
bgPrimary: Color(0xFFF3F0EB),
|
|
65
|
+
bgSecondary: Color(0xFFEAE4DA),
|
|
66
|
+
bgTertiary: Color(0xFFDED6CA),
|
|
67
|
+
bgCard: Color(0xFFFFFEFC),
|
|
68
|
+
textPrimary: Color(0xFF16181D),
|
|
69
|
+
textSecondary: Color(0xFF444A55),
|
|
70
|
+
textMuted: Color(0xFF727987),
|
|
71
|
+
accent: Color(0xFF8F6D3E),
|
|
72
|
+
accentHover: Color(0xFFAF8750),
|
|
73
|
+
accentAlt: Color(0xFF2F7D6E),
|
|
74
|
+
accentMuted: Color(0x1F8F6D3E),
|
|
75
|
+
border: Color(0x223F4652),
|
|
76
|
+
borderLight: Color(0x3847505D),
|
|
77
|
+
success: Color(0xFF1F8C58),
|
|
78
|
+
warning: Color(0xFFB87322),
|
|
79
|
+
danger: Color(0xFFD25B4D),
|
|
80
|
+
info: Color(0xFF2F7AA8),
|
|
81
|
+
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import 'package:flutter/foundation.dart';
|
|
2
|
+
|
|
3
|
+
import 'web_app_update_monitor_stub.dart'
|
|
4
|
+
if (dart.library.html) 'web_app_update_monitor_web.dart';
|
|
5
|
+
|
|
6
|
+
abstract class WebAppUpdateMonitor implements Listenable {
|
|
7
|
+
bool get isSupported;
|
|
8
|
+
bool get updateAvailable;
|
|
9
|
+
bool get isReloading;
|
|
10
|
+
|
|
11
|
+
void start();
|
|
12
|
+
Future<void> reloadToLatest();
|
|
13
|
+
void dispose();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
WebAppUpdateMonitor createWebAppUpdateMonitor() =>
|
|
17
|
+
createPlatformWebAppUpdateMonitor();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import 'package:flutter/foundation.dart';
|
|
2
|
+
|
|
3
|
+
import 'web_app_update_monitor.dart';
|
|
4
|
+
|
|
5
|
+
WebAppUpdateMonitor createPlatformWebAppUpdateMonitor() =>
|
|
6
|
+
_UnsupportedWebAppUpdateMonitor();
|
|
7
|
+
|
|
8
|
+
class _UnsupportedWebAppUpdateMonitor extends ChangeNotifier
|
|
9
|
+
implements WebAppUpdateMonitor {
|
|
10
|
+
@override
|
|
11
|
+
bool get isSupported => false;
|
|
12
|
+
|
|
13
|
+
@override
|
|
14
|
+
bool get isReloading => false;
|
|
15
|
+
|
|
16
|
+
@override
|
|
17
|
+
bool get updateAvailable => false;
|
|
18
|
+
|
|
19
|
+
@override
|
|
20
|
+
void start() {}
|
|
21
|
+
|
|
22
|
+
@override
|
|
23
|
+
Future<void> reloadToLatest() async {}
|
|
24
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// ignore_for_file: deprecated_member_use, avoid_web_libraries_in_flutter
|
|
2
|
+
|
|
3
|
+
import 'dart:async';
|
|
4
|
+
import 'dart:convert';
|
|
5
|
+
import 'dart:html' as html;
|
|
6
|
+
|
|
7
|
+
import 'package:flutter/foundation.dart';
|
|
8
|
+
import 'package:http/http.dart' as http;
|
|
9
|
+
|
|
10
|
+
import 'web_app_update_monitor.dart';
|
|
11
|
+
|
|
12
|
+
const String _currentWebBuildId = String.fromEnvironment(
|
|
13
|
+
'NEOAGENT_WEB_BUILD_ID',
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
WebAppUpdateMonitor createPlatformWebAppUpdateMonitor() =>
|
|
17
|
+
_WebPlatformAppUpdateMonitor();
|
|
18
|
+
|
|
19
|
+
class _WebPlatformAppUpdateMonitor extends ChangeNotifier
|
|
20
|
+
implements WebAppUpdateMonitor {
|
|
21
|
+
static const Duration _pollInterval = Duration(minutes: 1);
|
|
22
|
+
|
|
23
|
+
Timer? _pollTimer;
|
|
24
|
+
bool _updateAvailable = false;
|
|
25
|
+
bool _isReloading = false;
|
|
26
|
+
|
|
27
|
+
@override
|
|
28
|
+
bool get isSupported => _currentWebBuildId.trim().isNotEmpty;
|
|
29
|
+
|
|
30
|
+
@override
|
|
31
|
+
bool get updateAvailable => _updateAvailable;
|
|
32
|
+
|
|
33
|
+
@override
|
|
34
|
+
bool get isReloading => _isReloading;
|
|
35
|
+
|
|
36
|
+
@override
|
|
37
|
+
void start() {
|
|
38
|
+
if (!isSupported || _pollTimer != null) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
unawaited(_checkForUpdate());
|
|
42
|
+
_pollTimer = Timer.periodic(
|
|
43
|
+
_pollInterval,
|
|
44
|
+
(_) => unawaited(_checkForUpdate()),
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
Future<void> _checkForUpdate() async {
|
|
49
|
+
if (_updateAvailable || _isReloading) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
final buildInfoUri = Uri.base.resolve(
|
|
54
|
+
'/app-build.json?ts=${DateTime.now().microsecondsSinceEpoch}',
|
|
55
|
+
);
|
|
56
|
+
final response = await http.get(
|
|
57
|
+
buildInfoUri,
|
|
58
|
+
headers: const <String, String>{
|
|
59
|
+
'cache-control': 'no-cache, no-store, max-age=0',
|
|
60
|
+
'pragma': 'no-cache',
|
|
61
|
+
},
|
|
62
|
+
);
|
|
63
|
+
if (response.statusCode != 200) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
final payload = jsonDecode(response.body);
|
|
67
|
+
if (payload is! Map) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
final latestBuildId = payload['buildId']?.toString().trim() ?? '';
|
|
71
|
+
if (latestBuildId.isEmpty || latestBuildId == _currentWebBuildId) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
_updateAvailable = true;
|
|
75
|
+
notifyListeners();
|
|
76
|
+
} catch (_) {}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@override
|
|
80
|
+
Future<void> reloadToLatest() async {
|
|
81
|
+
if (!isSupported || _isReloading) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
_isReloading = true;
|
|
85
|
+
notifyListeners();
|
|
86
|
+
|
|
87
|
+
try {
|
|
88
|
+
final serviceWorker = html.window.navigator.serviceWorker;
|
|
89
|
+
if (serviceWorker != null) {
|
|
90
|
+
final registrations = await serviceWorker.getRegistrations();
|
|
91
|
+
for (final registration in registrations) {
|
|
92
|
+
await registration.unregister();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
} catch (_) {}
|
|
96
|
+
|
|
97
|
+
try {
|
|
98
|
+
final cacheNames = await html.window.caches?.keys();
|
|
99
|
+
if (cacheNames != null) {
|
|
100
|
+
for (final cacheName in cacheNames) {
|
|
101
|
+
await html.window.caches?.delete(cacheName);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
} catch (_) {}
|
|
105
|
+
|
|
106
|
+
final reloadUri = Uri(
|
|
107
|
+
path: Uri.base.path.isEmpty ? '/' : Uri.base.path,
|
|
108
|
+
queryParameters: <String, String>{
|
|
109
|
+
...Uri.base.queryParameters,
|
|
110
|
+
'reload': DateTime.now().microsecondsSinceEpoch.toString(),
|
|
111
|
+
},
|
|
112
|
+
fragment: Uri.base.fragment.isEmpty ? null : Uri.base.fragment,
|
|
113
|
+
);
|
|
114
|
+
html.window.location.replace(reloadUri.toString());
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@override
|
|
118
|
+
void dispose() {
|
|
119
|
+
_pollTimer?.cancel();
|
|
120
|
+
_pollTimer = null;
|
|
121
|
+
super.dispose();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import 'package:flutter/foundation.dart';
|
|
2
|
+
import 'package:flutter/services.dart';
|
|
3
|
+
|
|
4
|
+
class WidgetBridge {
|
|
5
|
+
static const MethodChannel _channel = MethodChannel('neoagent/widgets');
|
|
6
|
+
static const EventChannel _events = EventChannel('neoagent/widgets/events');
|
|
7
|
+
|
|
8
|
+
static Stream<String>? _openWidgetRequests;
|
|
9
|
+
|
|
10
|
+
Future<void> configureHomeWidgets({
|
|
11
|
+
required bool enabled,
|
|
12
|
+
required String backendUrl,
|
|
13
|
+
required String sessionCookie,
|
|
14
|
+
}) async {
|
|
15
|
+
if (!_isAndroid) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
await _channel.invokeMethod('configureHomeWidgets', <String, dynamic>{
|
|
19
|
+
'enabled': enabled,
|
|
20
|
+
'backendUrl': backendUrl,
|
|
21
|
+
'sessionCookie': sessionCookie,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Future<void> syncNow() async {
|
|
26
|
+
if (!_isAndroid) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
await _channel.invokeMethod('syncHomeWidgetsNow');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
Stream<String> get openWidgetRequests {
|
|
33
|
+
if (!_isAndroid) {
|
|
34
|
+
return const Stream<String>.empty();
|
|
35
|
+
}
|
|
36
|
+
return _openWidgetRequests ??= _events
|
|
37
|
+
.receiveBroadcastStream()
|
|
38
|
+
.map((dynamic event) {
|
|
39
|
+
if (event is Map) {
|
|
40
|
+
return event['widgetId']?.toString() ?? '';
|
|
41
|
+
}
|
|
42
|
+
return event?.toString() ?? '';
|
|
43
|
+
})
|
|
44
|
+
.where((widgetId) => widgetId.trim().isNotEmpty);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
bool get _isAndroid =>
|
|
48
|
+
!kIsWeb && defaultTargetPlatform == TargetPlatform.android;
|
|
49
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Project-level configuration.
|
|
2
|
+
cmake_minimum_required(VERSION 3.13)
|
|
3
|
+
project(runner LANGUAGES CXX)
|
|
4
|
+
|
|
5
|
+
# The name of the executable created for the application. Change this to change
|
|
6
|
+
# the on-disk name of your application.
|
|
7
|
+
set(BINARY_NAME "neoagent")
|
|
8
|
+
# The unique GTK application identifier for this application. See:
|
|
9
|
+
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
|
10
|
+
set(APPLICATION_ID "com.neoagent.neoagent")
|
|
11
|
+
|
|
12
|
+
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
|
13
|
+
# versions of CMake.
|
|
14
|
+
cmake_policy(SET CMP0063 NEW)
|
|
15
|
+
|
|
16
|
+
# Load bundled libraries from the lib/ directory relative to the binary.
|
|
17
|
+
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
|
|
18
|
+
|
|
19
|
+
# Root filesystem for cross-building.
|
|
20
|
+
if(FLUTTER_TARGET_PLATFORM_SYSROOT)
|
|
21
|
+
set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
|
|
22
|
+
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
|
|
23
|
+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
24
|
+
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|
25
|
+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
26
|
+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
27
|
+
endif()
|
|
28
|
+
|
|
29
|
+
# Define build configuration options.
|
|
30
|
+
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|
31
|
+
set(CMAKE_BUILD_TYPE "Debug" CACHE
|
|
32
|
+
STRING "Flutter build mode" FORCE)
|
|
33
|
+
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
|
34
|
+
"Debug" "Profile" "Release")
|
|
35
|
+
endif()
|
|
36
|
+
|
|
37
|
+
# Compilation settings that should be applied to most targets.
|
|
38
|
+
#
|
|
39
|
+
# Be cautious about adding new options here, as plugins use this function by
|
|
40
|
+
# default. In most cases, you should add new options to specific targets instead
|
|
41
|
+
# of modifying this function.
|
|
42
|
+
function(APPLY_STANDARD_SETTINGS TARGET)
|
|
43
|
+
target_compile_features(${TARGET} PUBLIC cxx_std_14)
|
|
44
|
+
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
|
|
45
|
+
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
|
|
46
|
+
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
|
|
47
|
+
endfunction()
|
|
48
|
+
|
|
49
|
+
# Flutter library and tool build rules.
|
|
50
|
+
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
|
|
51
|
+
add_subdirectory(${FLUTTER_MANAGED_DIR})
|
|
52
|
+
|
|
53
|
+
# System-level dependencies.
|
|
54
|
+
find_package(PkgConfig REQUIRED)
|
|
55
|
+
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
|
56
|
+
|
|
57
|
+
# Application build; see runner/CMakeLists.txt.
|
|
58
|
+
add_subdirectory("runner")
|
|
59
|
+
|
|
60
|
+
# Run the Flutter tool portions of the build. This must not be removed.
|
|
61
|
+
add_dependencies(${BINARY_NAME} flutter_assemble)
|
|
62
|
+
|
|
63
|
+
# Only the install-generated bundle's copy of the executable will launch
|
|
64
|
+
# correctly, since the resources must in the right relative locations. To avoid
|
|
65
|
+
# people trying to run the unbundled copy, put it in a subdirectory instead of
|
|
66
|
+
# the default top-level location.
|
|
67
|
+
set_target_properties(${BINARY_NAME}
|
|
68
|
+
PROPERTIES
|
|
69
|
+
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# Generated plugin build rules, which manage building the plugins and adding
|
|
74
|
+
# them to the application.
|
|
75
|
+
include(flutter/generated_plugins.cmake)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# === Installation ===
|
|
79
|
+
# By default, "installing" just makes a relocatable bundle in the build
|
|
80
|
+
# directory.
|
|
81
|
+
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
|
|
82
|
+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
83
|
+
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
|
|
84
|
+
endif()
|
|
85
|
+
|
|
86
|
+
# Start with a clean build bundle directory every time.
|
|
87
|
+
install(CODE "
|
|
88
|
+
file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
|
|
89
|
+
" COMPONENT Runtime)
|
|
90
|
+
|
|
91
|
+
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
|
|
92
|
+
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
|
93
|
+
|
|
94
|
+
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
|
95
|
+
COMPONENT Runtime)
|
|
96
|
+
|
|
97
|
+
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
|
|
98
|
+
COMPONENT Runtime)
|
|
99
|
+
|
|
100
|
+
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
|
101
|
+
COMPONENT Runtime)
|
|
102
|
+
|
|
103
|
+
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
|
|
104
|
+
install(FILES "${bundled_library}"
|
|
105
|
+
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
|
106
|
+
COMPONENT Runtime)
|
|
107
|
+
endforeach(bundled_library)
|
|
108
|
+
|
|
109
|
+
# Copy the native assets provided by the build.dart from all packages.
|
|
110
|
+
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}/native_assets/linux/")
|
|
111
|
+
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
|
|
112
|
+
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
|
113
|
+
COMPONENT Runtime)
|
|
114
|
+
|
|
115
|
+
# Fully re-copy the assets directory on each build to avoid having stale files
|
|
116
|
+
# from a previous install.
|
|
117
|
+
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
|
|
118
|
+
install(CODE "
|
|
119
|
+
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
|
|
120
|
+
" COMPONENT Runtime)
|
|
121
|
+
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
|
|
122
|
+
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
|
|
123
|
+
|
|
124
|
+
# Install the AOT library on non-Debug builds only.
|
|
125
|
+
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
|
126
|
+
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
|
127
|
+
COMPONENT Runtime)
|
|
128
|
+
endif()
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# This file controls Flutter-level build steps. It should not be edited.
|
|
2
|
+
cmake_minimum_required(VERSION 3.10)
|
|
3
|
+
|
|
4
|
+
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
|
|
5
|
+
|
|
6
|
+
# Configuration provided via flutter tool.
|
|
7
|
+
include(${EPHEMERAL_DIR}/generated_config.cmake)
|
|
8
|
+
|
|
9
|
+
# TODO: Move the rest of this into files in ephemeral. See
|
|
10
|
+
# https://github.com/flutter/flutter/issues/57146.
|
|
11
|
+
|
|
12
|
+
# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
|
|
13
|
+
# which isn't available in 3.10.
|
|
14
|
+
function(list_prepend LIST_NAME PREFIX)
|
|
15
|
+
set(NEW_LIST "")
|
|
16
|
+
foreach(element ${${LIST_NAME}})
|
|
17
|
+
list(APPEND NEW_LIST "${PREFIX}${element}")
|
|
18
|
+
endforeach(element)
|
|
19
|
+
set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
|
|
20
|
+
endfunction()
|
|
21
|
+
|
|
22
|
+
# === Flutter Library ===
|
|
23
|
+
# System-level dependencies.
|
|
24
|
+
find_package(PkgConfig REQUIRED)
|
|
25
|
+
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
|
26
|
+
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
|
|
27
|
+
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
|
|
28
|
+
|
|
29
|
+
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
|
|
30
|
+
|
|
31
|
+
# Published to parent scope for install step.
|
|
32
|
+
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
|
|
33
|
+
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
|
|
34
|
+
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
|
|
35
|
+
set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
|
|
36
|
+
|
|
37
|
+
list(APPEND FLUTTER_LIBRARY_HEADERS
|
|
38
|
+
"fl_basic_message_channel.h"
|
|
39
|
+
"fl_binary_codec.h"
|
|
40
|
+
"fl_binary_messenger.h"
|
|
41
|
+
"fl_dart_project.h"
|
|
42
|
+
"fl_engine.h"
|
|
43
|
+
"fl_json_message_codec.h"
|
|
44
|
+
"fl_json_method_codec.h"
|
|
45
|
+
"fl_message_codec.h"
|
|
46
|
+
"fl_method_call.h"
|
|
47
|
+
"fl_method_channel.h"
|
|
48
|
+
"fl_method_codec.h"
|
|
49
|
+
"fl_method_response.h"
|
|
50
|
+
"fl_plugin_registrar.h"
|
|
51
|
+
"fl_plugin_registry.h"
|
|
52
|
+
"fl_standard_message_codec.h"
|
|
53
|
+
"fl_standard_method_codec.h"
|
|
54
|
+
"fl_string_codec.h"
|
|
55
|
+
"fl_value.h"
|
|
56
|
+
"fl_view.h"
|
|
57
|
+
"flutter_linux.h"
|
|
58
|
+
)
|
|
59
|
+
list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
|
|
60
|
+
add_library(flutter INTERFACE)
|
|
61
|
+
target_include_directories(flutter INTERFACE
|
|
62
|
+
"${EPHEMERAL_DIR}"
|
|
63
|
+
)
|
|
64
|
+
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
|
|
65
|
+
target_link_libraries(flutter INTERFACE
|
|
66
|
+
PkgConfig::GTK
|
|
67
|
+
PkgConfig::GLIB
|
|
68
|
+
PkgConfig::GIO
|
|
69
|
+
)
|
|
70
|
+
add_dependencies(flutter flutter_assemble)
|
|
71
|
+
|
|
72
|
+
# === Flutter tool backend ===
|
|
73
|
+
# _phony_ is a non-existent file to force this command to run every time,
|
|
74
|
+
# since currently there's no way to get a full input/output list from the
|
|
75
|
+
# flutter tool.
|
|
76
|
+
add_custom_command(
|
|
77
|
+
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
|
|
78
|
+
${CMAKE_CURRENT_BINARY_DIR}/_phony_
|
|
79
|
+
COMMAND ${CMAKE_COMMAND} -E env
|
|
80
|
+
${FLUTTER_TOOL_ENVIRONMENT}
|
|
81
|
+
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
|
|
82
|
+
${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
|
|
83
|
+
VERBATIM
|
|
84
|
+
)
|
|
85
|
+
add_custom_target(flutter_assemble DEPENDS
|
|
86
|
+
"${FLUTTER_LIBRARY}"
|
|
87
|
+
${FLUTTER_LIBRARY_HEADERS}
|
|
88
|
+
)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Generated file. Do not edit.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// clang-format off
|
|
6
|
+
|
|
7
|
+
#include "generated_plugin_registrant.h"
|
|
8
|
+
|
|
9
|
+
#include <audioplayers_linux/audioplayers_linux_plugin.h>
|
|
10
|
+
#include <desktop_audio_capture/audio_capture_plugin.h>
|
|
11
|
+
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
|
12
|
+
#include <hotkey_manager_linux/hotkey_manager_linux_plugin.h>
|
|
13
|
+
#include <record_linux/record_linux_plugin.h>
|
|
14
|
+
#include <screen_retriever_linux/screen_retriever_linux_plugin.h>
|
|
15
|
+
#include <tray_manager/tray_manager_plugin.h>
|
|
16
|
+
#include <url_launcher_linux/url_launcher_plugin.h>
|
|
17
|
+
#include <window_manager/window_manager_plugin.h>
|
|
18
|
+
|
|
19
|
+
void fl_register_plugins(FlPluginRegistry* registry) {
|
|
20
|
+
g_autoptr(FlPluginRegistrar) audioplayers_linux_registrar =
|
|
21
|
+
fl_plugin_registry_get_registrar_for_plugin(registry, "AudioplayersLinuxPlugin");
|
|
22
|
+
audioplayers_linux_plugin_register_with_registrar(audioplayers_linux_registrar);
|
|
23
|
+
g_autoptr(FlPluginRegistrar) desktop_audio_capture_registrar =
|
|
24
|
+
fl_plugin_registry_get_registrar_for_plugin(registry, "AudioCapturePlugin");
|
|
25
|
+
audio_capture_plugin_register_with_registrar(desktop_audio_capture_registrar);
|
|
26
|
+
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
|
|
27
|
+
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
|
|
28
|
+
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
|
|
29
|
+
g_autoptr(FlPluginRegistrar) hotkey_manager_linux_registrar =
|
|
30
|
+
fl_plugin_registry_get_registrar_for_plugin(registry, "HotkeyManagerLinuxPlugin");
|
|
31
|
+
hotkey_manager_linux_plugin_register_with_registrar(hotkey_manager_linux_registrar);
|
|
32
|
+
g_autoptr(FlPluginRegistrar) record_linux_registrar =
|
|
33
|
+
fl_plugin_registry_get_registrar_for_plugin(registry, "RecordLinuxPlugin");
|
|
34
|
+
record_linux_plugin_register_with_registrar(record_linux_registrar);
|
|
35
|
+
g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar =
|
|
36
|
+
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverLinuxPlugin");
|
|
37
|
+
screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar);
|
|
38
|
+
g_autoptr(FlPluginRegistrar) tray_manager_registrar =
|
|
39
|
+
fl_plugin_registry_get_registrar_for_plugin(registry, "TrayManagerPlugin");
|
|
40
|
+
tray_manager_plugin_register_with_registrar(tray_manager_registrar);
|
|
41
|
+
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
|
42
|
+
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
|
43
|
+
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
|
44
|
+
g_autoptr(FlPluginRegistrar) window_manager_registrar =
|
|
45
|
+
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin");
|
|
46
|
+
window_manager_plugin_register_with_registrar(window_manager_registrar);
|
|
47
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Generated file. Do not edit.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// clang-format off
|
|
6
|
+
|
|
7
|
+
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
|
8
|
+
#define GENERATED_PLUGIN_REGISTRANT_
|
|
9
|
+
|
|
10
|
+
#include <flutter_linux/flutter_linux.h>
|
|
11
|
+
|
|
12
|
+
// Registers Flutter plugins.
|
|
13
|
+
void fl_register_plugins(FlPluginRegistry* registry);
|
|
14
|
+
|
|
15
|
+
#endif // GENERATED_PLUGIN_REGISTRANT_
|