@elizaos/app-core 2.0.0-beta.3 → 2.0.11-beta.6
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/agent-bridge.d.ts +27 -0
- package/agent-bridge.d.ts.map +1 -0
- package/agent-bridge.js +26 -0
- package/api/__tests__/sandbox-test-helpers.js +1 -1
- package/api/auth/audit.js +1 -1
- package/api/auth/auth-context.js +1 -1
- package/api/auth/bootstrap-token.js +2 -2
- package/api/auth/index.d.ts +9 -10
- package/api/auth/index.d.ts.map +1 -1
- package/api/auth/index.js +9 -10
- package/api/auth/passwords.js +2 -2
- package/api/auth/sensitive-rate-limit.d.ts +1 -4
- package/api/auth/sensitive-rate-limit.d.ts.map +1 -1
- package/api/auth/sensitive-rate-limit.js +6 -6
- package/api/auth/sessions.js +2 -2
- package/api/auth-bootstrap-routes.d.ts +6 -13
- package/api/auth-bootstrap-routes.d.ts.map +1 -1
- package/api/auth-bootstrap-routes.js +14 -27
- package/api/auth-pairing-routes.d.ts +17 -0
- package/api/auth-pairing-routes.d.ts.map +1 -0
- package/api/auth-pairing-routes.js +300 -0
- package/api/auth-session-routes.d.ts.map +1 -1
- package/api/auth-session-routes.js +36 -15
- package/api/auth.d.ts +12 -19
- package/api/auth.d.ts.map +1 -1
- package/api/auth.js +32 -27
- package/api/automations-compat-routes.d.ts.map +1 -1
- package/api/automations-compat-routes.js +5 -5
- package/api/background-tasks-routes.d.ts +4 -0
- package/api/background-tasks-routes.d.ts.map +1 -0
- package/api/background-tasks-routes.js +63 -0
- package/api/catalog-routes.js +3 -3
- package/api/cloud-pair-route.d.ts +26 -0
- package/api/cloud-pair-route.d.ts.map +1 -0
- package/api/cloud-pair-route.js +222 -0
- package/api/cloud-voice-routes.d.ts +52 -0
- package/api/cloud-voice-routes.d.ts.map +1 -0
- package/api/cloud-voice-routes.js +50 -0
- package/api/compat-route-shared.d.ts +2 -2
- package/api/compat-route-shared.d.ts.map +1 -1
- package/api/compat-route-shared.js +11 -7
- package/api/credential-resolver.d.ts +2 -2
- package/api/credential-resolver.d.ts.map +1 -1
- package/api/credential-resolver.js +8 -2
- package/api/database-rows-compat-routes.d.ts.map +1 -1
- package/api/database-rows-compat-routes.js +69 -31
- package/api/dev-boot-history.d.ts +26 -0
- package/api/dev-boot-history.d.ts.map +1 -0
- package/api/dev-boot-history.js +69 -0
- package/api/dev-compat-routes.d.ts +5 -0
- package/api/dev-compat-routes.d.ts.map +1 -1
- package/api/dev-compat-routes.js +127 -4
- package/api/dev-console-log.d.ts +2 -2
- package/api/dev-console-log.d.ts.map +1 -1
- package/api/dev-console-log.js +8 -5
- package/api/dev-route-catalog.d.ts +58 -0
- package/api/dev-route-catalog.d.ts.map +1 -0
- package/api/dev-route-catalog.js +447 -0
- package/api/dev-stack.d.ts.map +1 -1
- package/api/dev-stack.js +6 -9
- package/api/first-run-routes.d.ts +4 -0
- package/api/first-run-routes.d.ts.map +1 -0
- package/api/first-run-routes.js +208 -0
- package/api/first-run-tts-route.d.ts +19 -0
- package/api/first-run-tts-route.d.ts.map +1 -0
- package/api/first-run-tts-route.js +59 -0
- package/api/internal-routes.d.ts +23 -0
- package/api/internal-routes.d.ts.map +1 -0
- package/api/internal-routes.js +203 -0
- package/api/ios-local-agent-transport.d.ts +36 -0
- package/api/ios-local-agent-transport.d.ts.map +1 -0
- package/api/ios-local-agent-transport.js +566 -0
- package/api/onboarding-voice-lines.d.ts +23 -0
- package/api/onboarding-voice-lines.d.ts.map +1 -0
- package/api/onboarding-voice-lines.js +8 -0
- package/api/perf-instrument.d.ts +43 -0
- package/api/perf-instrument.d.ts.map +1 -0
- package/api/perf-instrument.js +113 -0
- package/api/response.d.ts.map +1 -1
- package/api/response.js +14 -14
- package/api/runtime-mode-routes.d.ts.map +1 -1
- package/api/runtime-mode-routes.js +2 -2
- package/api/secrets-inventory-routes.js +2 -2
- package/api/secrets-manager-routes.d.ts +1 -1
- package/api/secrets-manager-routes.d.ts.map +1 -1
- package/api/secrets-manager-routes.js +9 -10
- package/api/sensitive-request-routes.js +5 -5
- package/api/server-cors.d.ts.map +1 -1
- package/api/server-cors.js +13 -2
- package/api/server-first-run-helpers.d.ts +26 -0
- package/api/server-first-run-helpers.d.ts.map +1 -0
- package/api/server-first-run-helpers.js +271 -0
- package/api/server-security.js +1 -1
- package/api/server-startup.d.ts.map +1 -1
- package/api/server-startup.js +3 -4
- package/api/server-wallet-trade.js +1 -1
- package/api/server.d.ts +4 -4
- package/api/server.d.ts.map +1 -1
- package/api/server.js +222 -88
- package/api/setup-contract.d.ts +63 -0
- package/api/setup-contract.d.ts.map +1 -0
- package/api/setup-contract.js +39 -0
- package/api/training-benchmarks.d.ts +97 -0
- package/api/training-benchmarks.d.ts.map +1 -0
- package/api/training-benchmarks.js +307 -0
- package/api/workbench-compat-routes.js +2 -2
- package/benchmark/cerebras-autowire.d.ts +28 -0
- package/benchmark/cerebras-autowire.d.ts.map +1 -0
- package/benchmark/cerebras-autowire.js +62 -0
- package/benchmark/lifeops-bench-handler.d.ts +36 -0
- package/benchmark/lifeops-bench-handler.d.ts.map +1 -1
- package/benchmark/lifeops-bench-handler.js +63 -1
- package/benchmark/lifeops-fake-backend.d.ts +39 -0
- package/benchmark/lifeops-fake-backend.d.ts.map +1 -1
- package/benchmark/lifeops-fake-backend.js +993 -21
- package/benchmark/mock-plugin.d.ts.map +1 -1
- package/benchmark/mock-plugin.js +0 -24
- package/benchmark/plugin.d.ts +2 -1
- package/benchmark/plugin.d.ts.map +1 -1
- package/benchmark/plugin.js +989 -68
- package/benchmark/replay-capture.d.ts +2 -2
- package/benchmark/replay-capture.d.ts.map +1 -1
- package/benchmark/replay-capture.js +3 -3
- package/benchmark/server-utils.d.ts +162 -9
- package/benchmark/server-utils.d.ts.map +1 -1
- package/benchmark/server-utils.js +625 -62
- package/benchmark/server.d.ts.map +1 -1
- package/benchmark/server.js +1962 -118
- package/boot-profile.d.ts +3 -0
- package/boot-profile.d.ts.map +1 -0
- package/boot-profile.js +30 -0
- package/browser.d.ts +23 -1
- package/browser.d.ts.map +1 -1
- package/browser.js +20 -1
- package/cli/argv.js +1 -1
- package/cli/banner.js +1 -1
- package/cli/command-format.js +2 -2
- package/cli/doctor/checks.d.ts.map +1 -1
- package/cli/doctor/checks.js +6 -6
- package/cli/plugins-cli.d.ts.map +1 -1
- package/cli/plugins-cli.js +77 -32
- package/cli/profile.d.ts.map +1 -1
- package/cli/profile.js +5 -4
- package/cli/program/build-program.js +4 -4
- package/cli/program/command-registry.d.ts.map +1 -1
- package/cli/program/command-registry.js +13 -11
- package/cli/program/help.js +5 -5
- package/cli/program/preaction.js +5 -5
- package/cli/program/register.auth.d.ts.map +1 -1
- package/cli/program/register.auth.js +6 -12
- package/cli/program/register.capability-router.d.ts +29 -0
- package/cli/program/register.capability-router.d.ts.map +1 -0
- package/cli/program/register.capability-router.js +568 -0
- package/cli/program/register.config.js +1 -1
- package/cli/program/register.configure.d.ts.map +1 -1
- package/cli/program/register.configure.js +1 -1
- package/cli/program/register.dashboard.d.ts.map +1 -1
- package/cli/program/register.dashboard.js +6 -7
- package/cli/program/register.db.d.ts.map +1 -1
- package/cli/program/register.db.js +3 -4
- package/cli/program/register.doctor.js +7 -7
- package/cli/program/register.setup.d.ts.map +1 -1
- package/cli/program/register.setup.js +14 -10
- package/cli/program/register.start.d.ts.map +1 -1
- package/cli/program/register.start.js +5 -3
- package/cli/program/register.subclis.js +3 -3
- package/cli/program/register.update.d.ts +6 -0
- package/cli/program/register.update.d.ts.map +1 -1
- package/cli/program/register.update.js +58 -6
- package/cli/program.js +1 -1
- package/cli/run-main.js +4 -4
- package/config/app-config.d.ts +2 -0
- package/config/app-config.d.ts.map +1 -0
- package/config/app-config.js +1 -0
- package/connectors/capacitor-jsc.d.ts.map +1 -1
- package/connectors/capacitor-jsc.js +16 -10
- package/connectors/capacitor-quickjs.d.ts.map +1 -1
- package/connectors/capacitor-quickjs.js +18 -13
- package/connectors/capacitor-sqlite.d.ts.map +1 -1
- package/connectors/capacitor-sqlite.js +27 -12
- package/dispatch/approval-queue.d.ts +37 -0
- package/dispatch/approval-queue.d.ts.map +1 -0
- package/dispatch/approval-queue.js +25 -0
- package/dispatch/channel-registry.d.ts +30 -0
- package/dispatch/channel-registry.d.ts.map +1 -0
- package/dispatch/channel-registry.js +22 -0
- package/dispatch/connector-registry.d.ts +39 -0
- package/dispatch/connector-registry.d.ts.map +1 -0
- package/dispatch/connector-registry.js +24 -0
- package/dispatch/index.d.ts +14 -0
- package/dispatch/index.d.ts.map +1 -0
- package/dispatch/index.js +13 -0
- package/dispatch/send-policy.d.ts +36 -0
- package/dispatch/send-policy.d.ts.map +1 -0
- package/dispatch/send-policy.js +16 -0
- package/entry.js +28 -11
- package/first-run/first-run-config.d.ts +55 -0
- package/first-run/first-run-config.d.ts.map +1 -0
- package/first-run/first-run-config.js +178 -0
- package/first-run/runtime-target.d.ts +4 -0
- package/first-run/runtime-target.d.ts.map +1 -0
- package/first-run/runtime-target.js +13 -0
- package/index.d.ts +16 -3
- package/index.d.ts.map +1 -1
- package/index.js +57 -33
- package/package.json +159 -50
- package/packaging/debian/apt-repo-config/README.md +18 -0
- package/packaging/debian/apt-repo-config/conf/distributions +11 -0
- package/packaging/flatpak/README.md +26 -16
- package/packaging/flatpak/ai.elizaos.App.metainfo.xml +17 -12
- package/packaging/flatpak/ai.elizaos.App.store.yml +5 -5
- package/packaging/flatpak/ai.elizaos.App.yml +10 -24
- package/packaging/flatpak/elizaos-app-wrapper.store.sh +2 -2
- package/packaging/flatpak/generate-sources.sh +74 -0
- package/packaging/flatpak/node-sources.json +7930 -0
- package/packaging/inno/build-inno.ps1 +34 -9
- package/packaging/msix/AppxManifest.store.xml +1 -1
- package/packaging/msix/README.md +39 -19
- package/packaging/msix/build-msix.ps1 +44 -14
- package/packaging/snap/snapcraft.yaml +22 -21
- package/packaging/test-packaging.sh +2 -2
- package/permissions/types.d.ts +1 -1
- package/permissions/types.js +1 -1
- package/platform/elizaos-agent-browser-stub.d.ts +144 -0
- package/platform/elizaos-agent-browser-stub.d.ts.map +1 -0
- package/platform/elizaos-agent-browser-stub.js +158 -0
- package/platform/elizaos-plugin-elizacloud-browser-stub.d.ts +34 -0
- package/platform/elizaos-plugin-elizacloud-browser-stub.d.ts.map +1 -0
- package/platform/elizaos-plugin-elizacloud-browser-stub.js +51 -0
- package/platform/empty-node-module.d.ts +148 -0
- package/platform/empty-node-module.d.ts.map +1 -1
- package/platform/empty-node-module.js +140 -3
- package/platform/ios-runtime-backends.d.ts +83 -0
- package/platform/ios-runtime-backends.d.ts.map +1 -0
- package/platform/ios-runtime-backends.js +133 -0
- package/platform/ios-runtime-bridge.d.ts +15 -0
- package/platform/ios-runtime-bridge.d.ts.map +1 -0
- package/platform/ios-runtime-bridge.js +527 -0
- package/platform/native-library-policy.d.ts +23 -0
- package/platform/native-library-policy.d.ts.map +1 -0
- package/platform/native-library-policy.js +112 -0
- package/platform/native-plugin-entrypoints.d.ts +19 -0
- package/platform/native-plugin-entrypoints.d.ts.map +1 -0
- package/platform/native-plugin-entrypoints.js +29 -0
- package/platforms/android/README.md +68 -10
- package/platforms/android/app/build.gradle +268 -3
- package/platforms/android/app/capacitor.build.gradle +18 -1
- package/platforms/android/app/proguard-rules.pro +17 -2
- package/platforms/android/app/src/androidTest/java/ai/elizaos/app/ElizaOsInstrumentedTest.java +1 -1
- package/platforms/android/app/src/main/AndroidManifest.xml +334 -17
- package/platforms/android/app/src/main/assets/runners/eliza-tasks.js +177 -0
- package/platforms/android/app/src/main/elizavoice-jni/CMakeLists.txt +100 -0
- package/platforms/android/app/src/main/elizavoice-jni/elizavoice-jni.cpp +1349 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/AgentPlugin.java +111 -171
- package/platforms/android/app/src/main/java/ai/elizaos/app/AndroidVirtualizationBridge.java +284 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/BatteryOptimizationPlugin.java +95 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaAccessibilityService.java +55 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaAgentService.java +1198 -141
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaAndroidSystemBridge.java +83 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaAssistActivity.java +50 -1
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaBootReceiver.java +90 -8
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaBrowserActivity.java +2 -2
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaCalendarActivity.java +1 -1
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaCameraActivity.java +1 -1
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaClockActivity.java +2 -2
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaContactsActivity.java +1 -1
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaDialActivity.java +1 -1
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaInCallService.java +1 -1
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaMmsReceiver.java +1 -1
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaNativeBridge.java +22 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaNotificationListenerService.java +45 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaQuickActionsWidgetProvider.java +68 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaShareActivity.java +132 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaSmsComposeActivity.java +1 -1
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaSmsGatewayService.java +268 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaSmsReceiver.java +12 -1
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaTasksWorker.java +194 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaVoiceCaptureService.java +198 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaVoiceNative.java +205 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaVoicePlugin.java +498 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaVoiceTileService.java +39 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaWorkScheduler.java +60 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/GatewayConnectionService.java +53 -19
- package/platforms/android/app/src/main/java/ai/elizaos/app/MainActivity.java +160 -33
- package/platforms/android/app/src/main/java/ai/elizaos/app/ResourceProbePlugin.java +169 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/VoiceCapturePlugin.java +119 -0
- package/platforms/android/app/src/main/res/drawable/eliza_widget_background.xml +10 -0
- package/platforms/android/app/src/main/res/drawable/eliza_widget_button_background.xml +13 -0
- package/platforms/android/app/src/main/res/drawable/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/layout/eliza_quick_actions_widget.xml +86 -0
- package/platforms/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +2 -1
- package/platforms/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +2 -1
- package/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png +0 -0
- package/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/platforms/android/app/src/main/res/values/android_app_actions.xml +48 -0
- package/platforms/android/app/src/main/res/values/colors.xml +8 -0
- package/platforms/android/app/src/main/res/values/ic_launcher_background.xml +2 -2
- package/platforms/android/app/src/main/res/values/strings.xml +2 -2
- package/platforms/android/app/src/main/res/values/styles.xml +25 -1
- package/platforms/android/app/src/main/res/xml/eliza_accessibility_service.xml +9 -0
- package/platforms/android/app/src/main/res/xml/eliza_quick_actions_widget.xml +13 -0
- package/platforms/android/app/src/main/res/xml/shortcuts.xml +121 -0
- package/platforms/android/build.gradle +2 -2
- package/platforms/android/capacitor-cordova-android-plugins/build.gradle +9 -3
- package/platforms/android/capacitor-cordova-android-plugins/cordova.variables.gradle +6 -2
- package/platforms/android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml +7 -2
- package/platforms/android/capacitor-cordova-android-plugins/src/main/java/.gitkeep +0 -1
- package/platforms/android/capacitor.settings.gradle +66 -16
- package/platforms/android/gradle.properties +1 -0
- package/platforms/android/update-manifest/generate-manifest.mjs +97 -0
- package/platforms/android/update-manifest/schema.json +26 -0
- package/platforms/apple-store-entitlements.reviewed.json +155 -0
- package/platforms/electrobun/.generated/brand-config.json +3 -2
- package/platforms/electrobun/LICENSE +21 -0
- package/platforms/electrobun/README.md +15 -1
- package/platforms/electrobun/assets/appIcon.icns +0 -0
- package/platforms/electrobun/assets/appIcon.ico +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_128x128.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_128x128@2x.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_16x16.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_16x16@2x.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_256x256.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_256x256@2x.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_32x32.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_32x32@2x.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_512x512.png +0 -0
- package/platforms/electrobun/assets/brand-config.json +6 -6
- package/platforms/electrobun/biome.json +9 -9
- package/platforms/electrobun/docs/capability-collapse-matrix.json +318 -0
- package/platforms/electrobun/docs/capability-collapse-matrix.md +129 -0
- package/platforms/electrobun/docs/capability-routing.md +86 -0
- package/platforms/electrobun/docs/convergence-audit.json +3505 -0
- package/platforms/electrobun/docs/convergence-audit.md +694 -0
- package/platforms/electrobun/docs/database-boot-policy.md +90 -0
- package/platforms/electrobun/docs/riscv64-port.md +175 -0
- package/platforms/electrobun/docs/startup-first-run-cleanup.md +18 -0
- package/platforms/electrobun/docs/trace-first-annotations.md +52 -0
- package/platforms/electrobun/docs/ui-boundary-audit.json +580 -0
- package/platforms/electrobun/docs/ui-boundary-audit.md +257 -0
- package/platforms/electrobun/electrobun.config.ts +592 -364
- package/platforms/electrobun/entitlements/JUSTIFICATIONS.md +141 -0
- package/platforms/electrobun/entitlements/README.md +34 -6
- package/platforms/electrobun/entitlements/mas-bun.entitlements +15 -0
- package/platforms/electrobun/entitlements/mas.entitlements +6 -4
- package/platforms/electrobun/native/macos/window-effects.mm +1522 -0
- package/platforms/electrobun/package.json +18 -12
- package/platforms/electrobun/remotes/fs/README.md +70 -0
- package/platforms/electrobun/remotes/fs/electrobun.config.ts +38 -0
- package/platforms/electrobun/remotes/fs/package.json +12 -0
- package/platforms/electrobun/remotes/fs/plugin.json +25 -0
- package/platforms/electrobun/remotes/fs/src/bun/errors.ts +57 -0
- package/platforms/electrobun/remotes/fs/src/bun/file-limits.ts +50 -0
- package/platforms/electrobun/remotes/fs/src/bun/fs-service.ts +389 -0
- package/platforms/electrobun/remotes/fs/src/bun/path-guard.ts +270 -0
- package/platforms/electrobun/remotes/fs/src/bun/protocol.ts +149 -0
- package/platforms/electrobun/remotes/fs/src/bun/worker.ts +174 -0
- package/platforms/electrobun/remotes/fs/src/dev/phase5-smoke.ts +171 -0
- package/platforms/electrobun/remotes/fs/src/web/index.html +8 -0
- package/platforms/electrobun/remotes/git/README.md +75 -0
- package/platforms/electrobun/remotes/git/electrobun.config.ts +44 -0
- package/platforms/electrobun/remotes/git/package.json +12 -0
- package/platforms/electrobun/remotes/git/plugin.json +31 -0
- package/platforms/electrobun/remotes/git/src/bun/errors.ts +69 -0
- package/platforms/electrobun/remotes/git/src/bun/git-command.ts +156 -0
- package/platforms/electrobun/remotes/git/src/bun/git-service.ts +446 -0
- package/platforms/electrobun/remotes/git/src/bun/operation-history.ts +124 -0
- package/platforms/electrobun/remotes/git/src/bun/protocol.ts +252 -0
- package/platforms/electrobun/remotes/git/src/bun/worker.ts +316 -0
- package/platforms/electrobun/remotes/git/src/dev/phase7-smoke.ts +141 -0
- package/platforms/electrobun/remotes/git/src/web/index.html +8 -0
- package/platforms/electrobun/remotes/local-model/README.md +138 -0
- package/platforms/electrobun/remotes/local-model/electrobun.config.ts +46 -0
- package/platforms/electrobun/remotes/local-model/package.json +12 -0
- package/platforms/electrobun/remotes/local-model/plugin.json +33 -0
- package/platforms/electrobun/remotes/local-model/src/bun/download-state.ts +115 -0
- package/platforms/electrobun/remotes/local-model/src/bun/eliza1-catalog.ts +425 -0
- package/platforms/electrobun/remotes/local-model/src/bun/errors.ts +74 -0
- package/platforms/electrobun/remotes/local-model/src/bun/hf-eliza1-client.ts +169 -0
- package/platforms/electrobun/remotes/local-model/src/bun/local-inference-api-client.ts +245 -0
- package/platforms/electrobun/remotes/local-model/src/bun/model-service.ts +490 -0
- package/platforms/electrobun/remotes/local-model/src/bun/protocol.ts +301 -0
- package/platforms/electrobun/remotes/local-model/src/bun/worker.ts +248 -0
- package/platforms/electrobun/remotes/local-model/src/dev/phase8-smoke.ts +117 -0
- package/platforms/electrobun/remotes/local-model/src/web/index.html +13 -0
- package/platforms/electrobun/remotes/pty/README.md +65 -0
- package/platforms/electrobun/remotes/pty/electrobun.config.ts +47 -0
- package/platforms/electrobun/remotes/pty/package.json +12 -0
- package/platforms/electrobun/remotes/pty/plugin.json +34 -0
- package/platforms/electrobun/remotes/pty/src/bun/errors.ts +57 -0
- package/platforms/electrobun/remotes/pty/src/bun/output-buffer.ts +127 -0
- package/platforms/electrobun/remotes/pty/src/bun/protocol.ts +192 -0
- package/platforms/electrobun/remotes/pty/src/bun/pty-service.ts +562 -0
- package/platforms/electrobun/remotes/pty/src/bun/worker.ts +218 -0
- package/platforms/electrobun/remotes/pty/src/dev/phase6-smoke.ts +127 -0
- package/platforms/electrobun/remotes/pty/src/web/index.html +8 -0
- package/platforms/electrobun/remotes/runtime/README.md +370 -0
- package/platforms/electrobun/remotes/runtime/electrobun.config.ts +48 -0
- package/platforms/electrobun/remotes/runtime/package.json +14 -0
- package/platforms/electrobun/remotes/runtime/plugin.json +30 -0
- package/platforms/electrobun/remotes/runtime/src/bun/api-client.ts +620 -0
- package/platforms/electrobun/remotes/runtime/src/bun/errors.ts +45 -0
- package/platforms/electrobun/remotes/runtime/src/bun/log-buffer.ts +33 -0
- package/platforms/electrobun/remotes/runtime/src/bun/protocol.ts +366 -0
- package/platforms/electrobun/remotes/runtime/src/bun/route-discovery.ts +419 -0
- package/platforms/electrobun/remotes/runtime/src/bun/runtime-manager.ts +423 -0
- package/platforms/electrobun/remotes/runtime/src/bun/sse-parser.ts +99 -0
- package/platforms/electrobun/remotes/runtime/src/bun/stream-manager.ts +887 -0
- package/platforms/electrobun/remotes/runtime/src/bun/worker.ts +1231 -0
- package/platforms/electrobun/remotes/runtime/src/dev/phase1-smoke.ts +34 -0
- package/platforms/electrobun/remotes/runtime/src/dev/phase2-smoke.ts +86 -0
- package/platforms/electrobun/remotes/runtime/src/dev/phase3-smoke.ts +141 -0
- package/platforms/electrobun/remotes/runtime/src/web/index.css +187 -0
- package/platforms/electrobun/remotes/runtime/src/web/index.html +76 -0
- package/platforms/electrobun/remotes/runtime/src/web/index.ts +192 -0
- package/platforms/electrobun/remotes/surface/README.md +201 -0
- package/platforms/electrobun/remotes/surface/electrobun.config.ts +38 -0
- package/platforms/electrobun/remotes/surface/package.json +12 -0
- package/platforms/electrobun/remotes/surface/plugin.json +28 -0
- package/platforms/electrobun/remotes/surface/src/bun/worker.ts +132 -0
- package/platforms/electrobun/remotes/surface/src/dev/phase4-smoke.ts +566 -0
- package/platforms/electrobun/remotes/surface/src/protocol/event-types.ts +84 -0
- package/platforms/electrobun/remotes/surface/src/protocol/runtime-client.ts +673 -0
- package/platforms/electrobun/remotes/surface/src/web/app.ts +595 -0
- package/platforms/electrobun/remotes/surface/src/web/index.css +460 -0
- package/platforms/electrobun/remotes/surface/src/web/index.html +466 -0
- package/platforms/electrobun/remotes/surface/src/web/index.ts +5 -0
- package/platforms/electrobun/remotes/surface/src/web/render.ts +455 -0
- package/platforms/electrobun/remotes/surface/src/web/state.ts +427 -0
- package/platforms/electrobun/scripts/build-macos-effects.sh +4 -0
- package/platforms/electrobun/scripts/ensure-build-folder.ts +28 -0
- package/platforms/electrobun/scripts/ensure-whisper-gguf.sh +55 -0
- package/platforms/electrobun/scripts/ensure-whisper-model.sh +22 -80
- package/platforms/electrobun/scripts/generate-convergence-audit.ts +1203 -0
- package/platforms/electrobun/scripts/local-adhoc-sign-macos.ts +159 -159
- package/platforms/electrobun/scripts/postwrap-diagnostics.ts +424 -339
- package/platforms/electrobun/scripts/postwrap-sign-runtime-macos.ts +302 -271
- package/platforms/electrobun/scripts/smoke-test-windows.ps1 +17 -16
- package/platforms/electrobun/scripts/smoke-test.sh +5 -7
- package/platforms/electrobun/scripts/sync-web-assets.mjs +13 -13
- package/platforms/electrobun/scripts/verify-rpc-handlers.ts +109 -110
- package/platforms/electrobun/scripts/verify-windows-installer-proof.ps1 +3 -8
- package/platforms/electrobun/src/__stubs__/bun-ffi.ts +31 -31
- package/platforms/electrobun/src/__stubs__/electrobun-bun.ts +1 -1
- package/platforms/electrobun/src/agent-ready-state.ts +8 -8
- package/platforms/electrobun/src/agent-reset-from-main.test.ts +162 -0
- package/platforms/electrobun/src/agent-reset-from-main.ts +62 -62
- package/platforms/electrobun/src/agent-status-rpc.test.ts +95 -0
- package/platforms/electrobun/src/agent-status-rpc.ts +156 -0
- package/platforms/electrobun/src/api-base.test.ts +247 -0
- package/platforms/electrobun/src/api-base.ts +202 -93
- package/platforms/electrobun/src/application-menu-action-registry.ts +9 -9
- package/platforms/electrobun/src/application-menu.ts +348 -348
- package/platforms/electrobun/src/background-notice.ts +36 -36
- package/platforms/electrobun/src/boot-progress.test.ts +188 -0
- package/platforms/electrobun/src/boot-progress.ts +111 -0
- package/platforms/electrobun/src/brand-config.test.ts +39 -0
- package/platforms/electrobun/src/brand-config.ts +141 -129
- package/platforms/electrobun/src/bridge/browser-tabs-renderer-registry.ts +28 -28
- package/platforms/electrobun/src/bridge/electrobun-boot-config.ts +42 -0
- package/platforms/electrobun/src/bridge/electrobun-crypto-ready.ts +120 -0
- package/platforms/electrobun/src/bridge/electrobun-direct-rpc.ts +342 -357
- package/platforms/electrobun/src/bridge/electrobun-stub.ts +13 -13
- package/platforms/electrobun/src/browser-workspace-bridge-server.ts +285 -243
- package/platforms/electrobun/src/cloud-auth-window.ts +136 -136
- package/platforms/electrobun/src/cloud-disconnect-from-main.ts +90 -90
- package/platforms/electrobun/src/config-and-auth-rpc.test.ts +256 -0
- package/platforms/electrobun/src/config-and-auth-rpc.ts +302 -0
- package/platforms/electrobun/src/conversations-and-character-rpc.test.ts +185 -0
- package/platforms/electrobun/src/conversations-and-character-rpc.ts +131 -0
- package/platforms/electrobun/src/dashboard-rpc.test.ts +200 -0
- package/platforms/electrobun/src/dashboard-rpc.ts +344 -0
- package/platforms/electrobun/src/database/database-lock.ts +141 -0
- package/platforms/electrobun/src/database/database-mode.ts +149 -0
- package/platforms/electrobun/src/database/database-recovery.ts +72 -0
- package/platforms/electrobun/src/database/database-snapshot.ts +190 -0
- package/platforms/electrobun/src/database/database.test.ts +196 -0
- package/platforms/electrobun/src/database/index.ts +5 -0
- package/platforms/electrobun/src/database/pglite-paths.ts +100 -0
- package/platforms/electrobun/src/desktop-deep-link-events.test.ts +30 -0
- package/platforms/electrobun/src/desktop-deep-link-events.ts +17 -0
- package/platforms/electrobun/src/desktop-http-request.test.ts +73 -73
- package/platforms/electrobun/src/desktop-http-request.ts +85 -85
- package/platforms/electrobun/src/desktop-pill-config.test.ts +27 -0
- package/platforms/electrobun/src/desktop-pill-config.ts +40 -0
- package/platforms/electrobun/src/desktop-test-bridge-server.ts +204 -204
- package/platforms/electrobun/src/desktop-tray-config.test.ts +87 -0
- package/platforms/electrobun/src/desktop-tray-config.ts +84 -0
- package/platforms/electrobun/src/devtools-layout.ts +41 -41
- package/platforms/electrobun/src/diagnostic-format.test.ts +71 -0
- package/platforms/electrobun/src/diagnostic-format.ts +75 -36
- package/platforms/electrobun/src/dynamic-view-rpc-schema.test.ts +37 -0
- package/platforms/electrobun/src/dynamic-views/README.md +44 -0
- package/platforms/electrobun/src/dynamic-views/demo/agent-run-trace.html +135 -0
- package/platforms/electrobun/src/dynamic-views/errors.ts +29 -0
- package/platforms/electrobun/src/dynamic-views/host.test.ts +353 -0
- package/platforms/electrobun/src/dynamic-views/host.ts +332 -0
- package/platforms/electrobun/src/dynamic-views/index.ts +57 -0
- package/platforms/electrobun/src/dynamic-views/kiosk-canvas.ts +89 -0
- package/platforms/electrobun/src/dynamic-views/registry.test.ts +139 -0
- package/platforms/electrobun/src/dynamic-views/registry.ts +196 -0
- package/platforms/electrobun/src/dynamic-views/session-manager.test.ts +355 -0
- package/platforms/electrobun/src/dynamic-views/session-manager.ts +348 -0
- package/platforms/electrobun/src/dynamic-views/types.ts +105 -0
- package/platforms/electrobun/src/electrobun-boot-config.test.ts +50 -0
- package/platforms/electrobun/src/electrobun-config.test.ts +62 -0
- package/platforms/electrobun/src/electrobun-crypto-ready.test.ts +65 -0
- package/platforms/electrobun/src/electrobun-window-options.ts +25 -0
- package/platforms/electrobun/src/extension-rpc.test.ts +88 -0
- package/platforms/electrobun/src/extension-rpc.ts +102 -0
- package/platforms/electrobun/src/fatal-shutdown.test.ts +10 -10
- package/platforms/electrobun/src/fatal-shutdown.ts +1 -1
- package/platforms/electrobun/src/first-party-remotes.test.ts +169 -0
- package/platforms/electrobun/src/first-party-remotes.ts +297 -0
- package/platforms/electrobun/src/first-run-rpc.test.ts +192 -0
- package/platforms/electrobun/src/first-run-rpc.ts +146 -0
- package/platforms/electrobun/src/floating-chat-window.ts +181 -181
- package/platforms/electrobun/src/inbox-rpc.test.ts +123 -0
- package/platforms/electrobun/src/inbox-rpc.ts +158 -0
- package/platforms/electrobun/src/index.ts +2555 -2096
- package/platforms/electrobun/src/kiosk-mode.ts +50 -0
- package/platforms/electrobun/src/launch/index.ts +4 -0
- package/platforms/electrobun/src/launch/launch-dynamic-view.ts +37 -0
- package/platforms/electrobun/src/launch/launch-orchestrator.test.ts +224 -0
- package/platforms/electrobun/src/launch/launch-orchestrator.ts +456 -0
- package/platforms/electrobun/src/launch/launch-store.test.ts +97 -0
- package/platforms/electrobun/src/launch/launch-store.ts +134 -0
- package/platforms/electrobun/src/launch/types.ts +103 -0
- package/platforms/electrobun/src/launch/views/launch-diagnostics.html +205 -0
- package/platforms/electrobun/src/lifecycle/agent-ready-publish.test.ts +50 -0
- package/platforms/electrobun/src/lifecycle/agent-ready-publish.ts +27 -0
- package/platforms/electrobun/src/lifecycle/api-base-owner.ts +42 -31
- package/platforms/electrobun/src/lifecycle/desktop-session-prime.ts +44 -44
- package/platforms/electrobun/src/logger.ts +14 -14
- package/platforms/electrobun/src/main-window-runtime.ts +83 -83
- package/platforms/electrobun/src/main-window-session.test.ts +109 -0
- package/platforms/electrobun/src/main-window-session.ts +87 -51
- package/platforms/electrobun/src/menu-reset-from-main.ts +158 -158
- package/platforms/electrobun/src/native/agent-env.test.ts +52 -0
- package/platforms/electrobun/src/native/agent-runtime-layout.test.ts +42 -0
- package/platforms/electrobun/src/native/agent-state-dir.test.ts +91 -0
- package/platforms/electrobun/src/native/agent.ts +2122 -1682
- package/platforms/electrobun/src/native/auth-bridge.test.ts +67 -0
- package/platforms/electrobun/src/native/auth-bridge.ts +464 -360
- package/platforms/electrobun/src/native/browser-workspace.ts +723 -471
- package/platforms/electrobun/src/native/camera.ts +50 -50
- package/platforms/electrobun/src/native/canvas.ts +444 -445
- package/platforms/electrobun/src/native/credentials.ts +673 -616
- package/platforms/electrobun/src/native/desktop-window.test.ts +300 -0
- package/platforms/electrobun/src/native/desktop.ts +2196 -2156
- package/platforms/electrobun/src/native/editor-bridge.ts +201 -201
- package/platforms/electrobun/src/native/file-watcher.ts +154 -154
- package/platforms/electrobun/src/native/gateway.ts +179 -180
- package/platforms/electrobun/src/native/gpu-window.ts +256 -256
- package/platforms/electrobun/src/native/index.ts +76 -74
- package/platforms/electrobun/src/native/location.test.ts +44 -0
- package/platforms/electrobun/src/native/location.ts +90 -80
- package/platforms/electrobun/src/native/loopback-port.ts +60 -60
- package/platforms/electrobun/src/native/mac-window-effects.ts +166 -104
- package/platforms/electrobun/src/native/music-player.ts +38 -38
- package/platforms/electrobun/src/native/permissions-shared.ts +249 -150
- package/platforms/electrobun/src/native/permissions.ts +301 -208
- package/platforms/electrobun/src/native/power-state.ts +129 -129
- package/platforms/electrobun/src/native/remote-plugin-host.test.ts +1394 -0
- package/platforms/electrobun/src/native/remote-plugin-host.ts +1531 -0
- package/platforms/electrobun/src/native/screencapture.ts +667 -573
- package/platforms/electrobun/src/native/steward.ts +207 -204
- package/platforms/electrobun/src/native/swabble.ts +68 -324
- package/platforms/electrobun/src/native/talkmode.ts +253 -422
- package/platforms/electrobun/src/native/webgpu-browser-support.test.ts +18 -0
- package/platforms/electrobun/src/native/webgpu-browser-support.ts +165 -147
- package/platforms/electrobun/src/native/whisper-env.test.ts +71 -0
- package/platforms/electrobun/src/native/whisper-env.ts +68 -0
- package/platforms/electrobun/src/native-onboarding.ts +270 -0
- package/platforms/electrobun/src/onboarding-overlay-window.ts +141 -0
- package/platforms/electrobun/src/persisted-deployment.ts +91 -0
- package/platforms/electrobun/src/pill-window.test.ts +91 -0
- package/platforms/electrobun/src/pill-window.ts +99 -0
- package/platforms/electrobun/src/preload-validation.ts +44 -44
- package/platforms/electrobun/src/preload.js +1 -1
- package/platforms/electrobun/src/print-electrobun-dev-settings-banner.ts +120 -120
- package/platforms/electrobun/src/renderer-api-proxy.test.ts +73 -0
- package/platforms/electrobun/src/renderer-api-proxy.ts +86 -0
- package/platforms/electrobun/src/renderer-static.test.ts +53 -0
- package/platforms/electrobun/src/renderer-static.ts +144 -57
- package/platforms/electrobun/src/rpc-handler-slices.ts +121 -0
- package/platforms/electrobun/src/rpc-handlers.test.ts +267 -0
- package/platforms/electrobun/src/rpc-handlers.ts +1306 -913
- package/platforms/electrobun/src/rpc-parse-utils.ts +57 -0
- package/platforms/electrobun/src/rpc-port-resolver.test.ts +45 -0
- package/platforms/electrobun/src/rpc-port-resolver.ts +31 -0
- package/platforms/electrobun/src/rpc-schema.ts +2556 -1619
- package/platforms/electrobun/src/runtime-layout.ts +105 -105
- package/platforms/electrobun/src/runtime-permissions.ts +95 -95
- package/platforms/electrobun/src/runtime-rpc.test.ts +126 -0
- package/platforms/electrobun/src/runtime-rpc.ts +237 -0
- package/platforms/electrobun/src/screenshot-dev-server.ts +87 -87
- package/platforms/electrobun/src/settings-mutations-rpc.test.ts +193 -0
- package/platforms/electrobun/src/settings-mutations-rpc.ts +220 -0
- package/platforms/electrobun/src/startup-trace.ts +274 -270
- package/platforms/electrobun/src/subscription-rpc.test.ts +89 -0
- package/platforms/electrobun/src/subscription-rpc.ts +192 -0
- package/platforms/electrobun/src/surface-windows.test.ts +355 -0
- package/platforms/electrobun/src/surface-windows.ts +410 -410
- package/platforms/electrobun/src/trace/README.md +73 -0
- package/platforms/electrobun/src/trace/errors.ts +21 -0
- package/platforms/electrobun/src/trace/index.ts +40 -0
- package/platforms/electrobun/src/trace/trace-dynamic-view.ts +40 -0
- package/platforms/electrobun/src/trace/trace-host-requests.ts +473 -0
- package/platforms/electrobun/src/trace/trace-service.test.ts +186 -0
- package/platforms/electrobun/src/trace/trace-service.ts +324 -0
- package/platforms/electrobun/src/trace/trace-store.test.ts +141 -0
- package/platforms/electrobun/src/trace/trace-store.ts +551 -0
- package/platforms/electrobun/src/trace/types.ts +250 -0
- package/platforms/electrobun/src/trace/views/agent-run-trace.html +311 -0
- package/platforms/electrobun/src/types/web-speech.d.ts +28 -28
- package/platforms/electrobun/src/types.ts +5 -5
- package/platforms/electrobun/src/update-availability.test.ts +72 -0
- package/platforms/electrobun/src/update-availability.ts +90 -0
- package/platforms/electrobun/src/update-rpc.test.ts +83 -0
- package/platforms/electrobun/src/update-rpc.ts +123 -0
- package/platforms/electrobun/src/voice/README.md +184 -0
- package/platforms/electrobun/src/voice/errors.ts +42 -0
- package/platforms/electrobun/src/voice/index.ts +78 -0
- package/platforms/electrobun/src/voice/types.ts +316 -0
- package/platforms/electrobun/src/voice/voice-host-requests.ts +259 -0
- package/platforms/electrobun/src/voice/voice-latency-budget.test.ts +66 -0
- package/platforms/electrobun/src/voice/voice-latency-budget.ts +243 -0
- package/platforms/electrobun/src/voice/voice-live-validation.test.ts +352 -0
- package/platforms/electrobun/src/voice/voice-live-validation.ts +838 -0
- package/platforms/electrobun/src/voice/voice-pipeline.ts +250 -0
- package/platforms/electrobun/src/voice/voice-playback-adapter.ts +31 -0
- package/platforms/electrobun/src/voice/voice-runtime-adapter.test.ts +213 -0
- package/platforms/electrobun/src/voice/voice-runtime-adapter.ts +686 -0
- package/platforms/electrobun/src/voice/voice-service.test.ts +561 -0
- package/platforms/electrobun/src/voice/voice-service.ts +1027 -0
- package/platforms/electrobun/src/voice/voice-stream-coordinator.test.ts +115 -0
- package/platforms/electrobun/src/voice/voice-stream-coordinator.ts +270 -0
- package/platforms/electrobun/src/voice/voice-trace.ts +97 -0
- package/platforms/electrobun/src/voice/voice-tts-chunker.test.ts +91 -0
- package/platforms/electrobun/src/voice/voice-tts-chunker.ts +194 -0
- package/platforms/electrobun/src/windows-cef-profile.ts +88 -88
- package/platforms/electrobun/tsconfig.json +73 -13
- package/platforms/electrobun/update-channels.json +22 -0
- package/platforms/electrobun/vitest.electrobun.config.ts +72 -42
- package/platforms/ios/App/App/App.entitlements +4 -0
- package/platforms/ios/App/App/AppDelegate.swift +80 -18
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ios-marketing-1024.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-20x20@1x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-20x20@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-29x29@1x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-29x29@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-40x40@1x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-40x40@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-76x76@1x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-76x76@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-83_5x83_5@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-20x20@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-20x20@3x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-29x29@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-29x29@3x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-40x40@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-40x40@3x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-60x60@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-60x60@3x.png +0 -0
- package/platforms/ios/App/App/Base.lproj/LaunchScreen.storyboard +1 -4
- package/platforms/ios/App/App/ComputerUseBridge.swift +589 -0
- package/platforms/ios/App/App/DeviceActivityMonitorExtension/DeviceActivityMonitorExtension.entitlements +12 -0
- package/platforms/ios/App/App/DeviceActivityMonitorExtension/DeviceActivityMonitorExtension.swift +34 -0
- package/platforms/ios/App/App/DeviceActivityMonitorExtension/Info.plist +29 -0
- package/platforms/ios/App/App/DeviceActivityReportExtension/DeviceActivityReportExtension.entitlements +12 -0
- package/platforms/ios/App/App/DeviceActivityReportExtension/DeviceActivityReportExtension.swift +53 -0
- package/platforms/ios/App/App/DeviceActivityReportExtension/Info.plist +27 -0
- package/platforms/ios/App/App/ElizaAppIntents.swift +183 -0
- package/platforms/ios/App/App/ElizaIntentPlugin.swift +342 -5
- package/platforms/ios/App/App/Info.plist +17 -1
- package/platforms/ios/App/App/runners/eliza-tasks.js +177 -0
- package/platforms/ios/App/App.xcodeproj/project.pbxproj +262 -6
- package/platforms/ios/App/BroadcastExtension/SampleHandler.swift +100 -0
- package/platforms/ios/App/Podfile +5 -0
- package/platforms/ios/App/Podfile.lock +83 -59
- package/register-runtime-hooks.js +11 -5
- package/registry/app-registry.d.ts +14 -0
- package/registry/app-registry.d.ts.map +1 -0
- package/registry/app-registry.js +29 -0
- package/registry/entries/apps/app-polymarket.json +31 -0
- package/registry/entries/apps/clawville.json +27 -0
- package/registry/entries/apps/companion.json +28 -0
- package/registry/entries/apps/database-viewer.json +27 -0
- package/registry/entries/apps/defense-of-the-agents.json +27 -0
- package/registry/entries/apps/documents.json +30 -0
- package/registry/entries/apps/feed.json +27 -0
- package/registry/entries/apps/hyperliquid.json +31 -0
- package/registry/entries/apps/log-viewer.json +27 -0
- package/registry/entries/apps/memory-viewer.json +27 -0
- package/registry/entries/apps/model-tester.json +31 -0
- package/registry/entries/apps/plugin-viewer.json +27 -0
- package/registry/entries/apps/relationship-viewer.json +27 -0
- package/registry/entries/apps/runtime-debugger.json +27 -0
- package/registry/entries/apps/shopify.json +31 -0
- package/registry/entries/apps/skills-viewer.json +27 -0
- package/registry/entries/apps/steward.json +31 -0
- package/registry/entries/apps/training.json +54 -0
- package/registry/entries/apps/trajectory-viewer.json +27 -0
- package/registry/entries/apps/vincent.json +31 -0
- package/registry/entries/connectors/bluebubbles.json +99 -0
- package/registry/entries/connectors/bluesky.json +173 -0
- package/registry/entries/connectors/discord.json +119 -0
- package/registry/entries/connectors/farcaster.json +174 -0
- package/registry/entries/connectors/feishu.json +79 -0
- package/registry/entries/connectors/google-chat.json +120 -0
- package/registry/entries/connectors/google.json +82 -0
- package/registry/entries/connectors/imessage.json +96 -0
- package/registry/entries/connectors/instagram.json +64 -0
- package/registry/entries/connectors/line.json +86 -0
- package/registry/entries/connectors/matrix.json +94 -0
- package/registry/entries/connectors/mattermost.json +110 -0
- package/registry/entries/connectors/msteams.json +104 -0
- package/registry/entries/connectors/nextcloud-talk.json +104 -0
- package/registry/entries/connectors/nostr.json +70 -0
- package/registry/entries/connectors/signal.json +81 -0
- package/registry/entries/connectors/slack.json +102 -0
- package/registry/entries/connectors/telegram.json +71 -0
- package/registry/entries/connectors/tlon.json +94 -0
- package/registry/entries/connectors/twitch.json +110 -0
- package/registry/entries/connectors/whatsapp.json +113 -0
- package/registry/entries/connectors/x.json +231 -0
- package/registry/entries/connectors/zalo.json +112 -0
- package/registry/entries/connectors/zalouser.json +122 -0
- package/registry/entries/plugins/agent-orchestrator.json +33 -0
- package/registry/entries/plugins/agent-skills.json +72 -0
- package/registry/entries/plugins/anthropic.json +73 -0
- package/registry/entries/plugins/app-control.json +23 -0
- package/registry/entries/plugins/auto-trader.json +203 -0
- package/registry/entries/plugins/background-runner.json +26 -0
- package/registry/entries/plugins/blooio.json +102 -0
- package/registry/entries/plugins/browser.json +75 -0
- package/registry/entries/plugins/cli.json +40 -0
- package/registry/entries/plugins/clipboard.json +44 -0
- package/registry/entries/plugins/coding-tools.json +71 -0
- package/registry/entries/plugins/commands.json +63 -0
- package/registry/entries/plugins/computeruse.json +74 -0
- package/registry/entries/plugins/copilot-proxy.json +93 -0
- package/registry/entries/plugins/directives.json +63 -0
- package/registry/entries/plugins/edge-tts.json +97 -0
- package/registry/entries/plugins/elevenlabs.json +169 -0
- package/registry/entries/plugins/elizacloud.json +208 -0
- package/registry/entries/plugins/evm.json +134 -0
- package/registry/entries/plugins/experience.json +34 -0
- package/registry/entries/plugins/facewear.json +131 -0
- package/registry/entries/plugins/form.json +26 -0
- package/registry/entries/plugins/github.json +93 -0
- package/registry/entries/plugins/gmail-watch.json +25 -0
- package/registry/entries/plugins/goals.json +77 -0
- package/registry/entries/plugins/google-genai.json +106 -0
- package/registry/entries/plugins/groq.json +93 -0
- package/registry/entries/plugins/hedera.json +48 -0
- package/registry/entries/plugins/inmemorydb.json +25 -0
- package/registry/entries/plugins/linear.json +51 -0
- package/registry/entries/plugins/local-inference.json +142 -0
- package/registry/entries/plugins/local-storage.json +36 -0
- package/registry/entries/plugins/localdb.json +25 -0
- package/registry/entries/plugins/mcp.json +44 -0
- package/registry/entries/plugins/memory.json +124 -0
- package/registry/entries/plugins/minecraft.json +79 -0
- package/registry/entries/plugins/moltbook.json +83 -0
- package/registry/entries/plugins/music.json +155 -0
- package/registry/entries/plugins/mysticism.json +48 -0
- package/registry/entries/plugins/nearai.json +82 -0
- package/registry/entries/plugins/ngrok.json +69 -0
- package/registry/entries/plugins/ollama.json +96 -0
- package/registry/entries/plugins/openai.json +189 -0
- package/registry/entries/plugins/openrouter.json +188 -0
- package/registry/entries/plugins/pdf.json +26 -0
- package/registry/entries/plugins/plugin-manager.json +23 -0
- package/registry/entries/plugins/prose.json +48 -0
- package/registry/entries/plugins/rlm.json +26 -0
- package/registry/entries/plugins/roblox.json +88 -0
- package/registry/entries/plugins/rss.json +64 -0
- package/registry/entries/plugins/s3-storage.json +91 -0
- package/registry/entries/plugins/scheduling.json +35 -0
- package/registry/entries/plugins/shell.json +94 -0
- package/registry/entries/plugins/social-alpha.json +72 -0
- package/registry/entries/plugins/tailscale.json +81 -0
- package/registry/entries/plugins/tee.json +53 -0
- package/registry/entries/plugins/todos.json +26 -0
- package/registry/entries/plugins/trajectory-logger.json +33 -0
- package/registry/entries/plugins/trust.json +39 -0
- package/registry/entries/plugins/tts.json +71 -0
- package/registry/entries/plugins/tunnel.json +45 -0
- package/registry/entries/plugins/twilio.json +168 -0
- package/registry/entries/plugins/vercel-ai-gateway.json +128 -0
- package/registry/entries/plugins/video.json +23 -0
- package/registry/entries/plugins/vision.json +43 -0
- package/registry/entries/plugins/webhooks.json +23 -0
- package/registry/entries/plugins/workflow.json +25 -0
- package/registry/entries/plugins/xai.json +75 -0
- package/registry/index.d.ts +2 -1
- package/registry/index.d.ts.map +1 -1
- package/registry/index.js +46 -12
- package/registry/loader.d.ts +2 -1
- package/registry/loader.d.ts.map +1 -1
- package/registry/loader.js +49 -2
- package/registry/schema.d.ts +244 -34
- package/registry/schema.d.ts.map +1 -1
- package/registry/schema.js +36 -0
- package/runtime/android-avf-microdroid-bridge.d.ts +29 -0
- package/runtime/android-avf-microdroid-bridge.d.ts.map +1 -0
- package/runtime/android-avf-microdroid-bridge.js +149 -0
- package/runtime/api-dev-settings-banner.d.ts.map +1 -1
- package/runtime/api-dev-settings-banner.js +5 -13
- package/runtime/app-core-runtime-hooks.d.ts +21 -0
- package/runtime/app-core-runtime-hooks.d.ts.map +1 -0
- package/runtime/app-core-runtime-hooks.js +10 -0
- package/runtime/autonomy-policy.d.ts +2 -0
- package/runtime/autonomy-policy.d.ts.map +1 -0
- package/runtime/autonomy-policy.js +4 -0
- package/runtime/desktop/AppWindowRenderer.d.ts +17 -0
- package/runtime/desktop/AppWindowRenderer.d.ts.map +1 -0
- package/runtime/desktop/AppWindowRenderer.js +360 -0
- package/runtime/desktop/DesktopSurfaceNavigationRuntime.d.ts +2 -0
- package/runtime/desktop/DesktopSurfaceNavigationRuntime.d.ts.map +1 -0
- package/runtime/desktop/DesktopSurfaceNavigationRuntime.js +41 -0
- package/runtime/desktop/DesktopTrayRuntime.d.ts +2 -0
- package/runtime/desktop/DesktopTrayRuntime.d.ts.map +1 -0
- package/runtime/desktop/DesktopTrayRuntime.js +174 -0
- package/runtime/desktop/DetachedShellRoot.d.ts +10 -0
- package/runtime/desktop/DetachedShellRoot.d.ts.map +1 -0
- package/runtime/desktop/DetachedShellRoot.js +111 -0
- package/runtime/desktop/index.d.ts +6 -0
- package/runtime/desktop/index.d.ts.map +1 -0
- package/runtime/desktop/index.js +5 -0
- package/runtime/desktop/tray-menu.d.ts +20 -0
- package/runtime/desktop/tray-menu.d.ts.map +1 -0
- package/runtime/desktop/tray-menu.js +143 -0
- package/runtime/dev-server.d.ts +1 -1
- package/runtime/dev-server.d.ts.map +1 -1
- package/runtime/dev-server.js +93 -17
- package/runtime/eliza.d.ts +75 -1
- package/runtime/eliza.d.ts.map +1 -1
- package/runtime/eliza.js +596 -122
- package/runtime/ensure-text-to-speech-handler.d.ts.map +1 -1
- package/runtime/ensure-text-to-speech-handler.js +10 -3
- package/runtime/mobile-safe-runtime.d.ts +181 -2
- package/runtime/mobile-safe-runtime.d.ts.map +1 -1
- package/runtime/mobile-safe-runtime.js +1019 -12
- package/runtime/mode/remote-forwarder.d.ts.map +1 -1
- package/runtime/mode/remote-forwarder.js +2 -2
- package/runtime/mode/route-mode-guard.d.ts +1 -2
- package/runtime/mode/route-mode-guard.d.ts.map +1 -1
- package/runtime/mode/route-mode-guard.js +4 -5
- package/runtime/mode/route-mode-matrix.d.ts.map +1 -1
- package/runtime/mode/route-mode-matrix.js +14 -1
- package/runtime/mode/runtime-mode.d.ts +1 -1
- package/runtime/mode/runtime-mode.js +1 -1
- package/runtime/runtime-bootstrap-policy.d.ts.map +1 -1
- package/runtime/runtime-bootstrap-policy.js +14 -2
- package/runtime/telegram-standalone-handler.d.ts.map +1 -1
- package/runtime/telegram-standalone-handler.js +10 -9
- package/runtime/tts-cache-wiring.d.ts +29 -0
- package/runtime/tts-cache-wiring.d.ts.map +1 -0
- package/runtime/tts-cache-wiring.js +114 -0
- package/runtime/voice-warmup.d.ts +81 -0
- package/runtime/voice-warmup.d.ts.map +1 -0
- package/runtime/voice-warmup.js +111 -0
- package/scripts/android-sms-gateway-template.test.mjs +1014 -0
- package/scripts/aosp/README.md +19 -15
- package/scripts/aosp/compile-libllama.mjs +1344 -248
- package/scripts/aosp/compile-shim.mjs +47 -18
- package/scripts/aosp/deploy-pixel.mjs +405 -0
- package/scripts/aosp/lib/load-variant-config.mjs +3 -3
- package/scripts/aosp/llama-cpp-patches/README.md +8 -8
- package/scripts/aosp/llama-cpp-patches/apply-patches.mjs +23 -6
- package/scripts/aosp/llama-cpp-patches/polarquant/README.md +37 -0
- package/scripts/aosp/llama-cpp-patches/qjl/README.md +37 -0
- package/scripts/aosp/seccomp-shim/sigsys-handler-arm64.c +169 -0
- package/scripts/aosp/seccomp-shim/sigsys-handler-riscv64.c +217 -0
- package/scripts/aosp/smoke-cuttlefish.mjs +34 -4
- package/scripts/aosp/stage-default-models.mjs +18 -18
- package/scripts/aosp/variant-config-schema.ts +2 -2
- package/scripts/assert-required-bundled-packages.test.ts +534 -0
- package/scripts/audit-apple-store-sandbox.mjs +146 -0
- package/scripts/audit-live-test-surface.mjs +5 -2
- package/scripts/build-capacitor-app.mjs +21 -0
- package/scripts/build-flatpak.mjs +5 -5
- package/scripts/build-helpers/arm64-simd.mjs +72 -0
- package/scripts/build-helpers/omnivoice-merged.mjs +87 -0
- package/scripts/build-helpers/verify-fused-symbols.mjs +567 -0
- package/scripts/build-image.sh +1 -1
- package/scripts/build-llama-cpp-mtp.mjs +487 -0
- package/scripts/build-native-plugins.mjs +230 -18
- package/scripts/build-patched-electrobun-cli.mjs +68 -10
- package/scripts/build-win.mjs +1 -1
- package/scripts/bun-riscv64/Dockerfile +418 -0
- package/scripts/bun-riscv64/README.md +316 -0
- package/scripts/bun-riscv64/build.sh +469 -0
- package/scripts/bun-riscv64/bun-patches/0001-config-add-riscv64-arch.patch +74 -0
- package/scripts/bun-riscv64/bun-patches/0002-flags-add-riscv64-march-mabi.patch +16 -0
- package/scripts/bun-riscv64/bun-patches/0003-zig-add-riscv64-target-triple-and-cpu.patch +26 -0
- package/scripts/bun-riscv64/bun-patches/0004-webkit-force-local-mode-on-riscv64.patch +33 -0
- package/scripts/bun-riscv64/bun-patches/0005-tinycc-disable-on-riscv64.patch +16 -0
- package/scripts/bun-riscv64/bun-patches/0006-build-add-riscv64-cli-validation.patch +15 -0
- package/scripts/bun-riscv64/bun-patches/0007-deps-per-dep-riscv64-checks.patch +24 -0
- package/scripts/bun-riscv64/bun-patches/0008-source-stabilize-riscv64-musl-build.patch +226 -0
- package/scripts/bun-riscv64/bun-patches/0009-disable-wasm-streaming-hooks-for-c-loop.patch +162 -0
- package/scripts/bun-riscv64/bun-patches/0010-disable-inspector-profiler-for-riscv64-c-loop.patch +80 -0
- package/scripts/bun-riscv64/bun-patches/0011-process-arch-add-riscv64.patch +23 -0
- package/scripts/bun-riscv64/bun-patches/0012-cpu-features-add-riscv64-fallback.patch +13 -0
- package/scripts/bun-riscv64/bun-patches/0013-disable-console-inspector-hooks-for-riscv64-c-loop.patch +43 -0
- package/scripts/bun-riscv64/bun-patches/0014-disable-custom-inspector-dispatchers-on-riscv64.patch +127 -0
- package/scripts/bun-riscv64/bun-patches/0015-disable-jsc-profiler-builtins-on-riscv64.patch +75 -0
- package/scripts/bun-riscv64/bun-patches/0016-node-vm-disable-jit-cached-data-on-riscv64-c-loop.patch +96 -0
- package/scripts/bun-riscv64/bun-patches/0017-disable-performance-domjit-signature-on-riscv64-c-loop.patch +34 -0
- package/scripts/bun-riscv64/bun-patches/0018-fix-serialized-script-identifier-big-endian-path.patch +19 -0
- package/scripts/bun-riscv64/bun-patches/0019-add-wtf-timer-fire-bridge-for-c-loop.patch +24 -0
- package/scripts/bun-riscv64/bun-patches/0020-run-riscv64-smoke-test-under-qemu.patch +13 -0
- package/scripts/bun-riscv64/bun-patches/0021-fix-riscv64-linux-open-flags.patch +25 -0
- package/scripts/bun-riscv64/bun-patches/0022-zlib-riscv64-generic-kernels.patch +25 -0
- package/scripts/bun-riscv64/bun-patches/README.md +127 -0
- package/scripts/bun-riscv64/bun-version.json +202 -0
- package/scripts/bun-riscv64/run-build.sh +162 -0
- package/scripts/bun-riscv64/rust-core/0001-riscv64-rust-core-port.patch +868 -0
- package/scripts/bun-riscv64/rust-core/0002-second-wave-riscv64-source-gaps.patch +130 -0
- package/scripts/bun-riscv64/rust-core/0003-third-wave-riscv64-crash-handler-gaps.patch +78 -0
- package/scripts/bun-riscv64/rust-core/0004-rust-target-cpu-riscv64.patch +39 -0
- package/scripts/bun-riscv64/rust-core/0005-fifth-wave-riscv64-source-gaps.patch +96 -0
- package/scripts/bun-riscv64/rust-core/0006-cpp-wasm-and-inspector-guards-riscv64.patch +91 -0
- package/scripts/bun-riscv64/rust-core/0007-bun-alloc-max-align-t-riscv64.patch +36 -0
- package/scripts/bun-riscv64/rust-core/0008-workspace-lints-warn-not-deny-riscv64.patch +75 -0
- package/scripts/bun-riscv64/rust-core/0009-zigglobalobject-wasm-streaming-guards-riscv64.patch +109 -0
- package/scripts/bun-riscv64/rust-core/0010-tcc-externs-stub-on-riscv64.patch +62 -0
- package/scripts/bun-riscv64/rust-core/0011-clippy-ptr-cast-lints-warn-riscv64.patch +61 -0
- package/scripts/bun-riscv64/rust-core/README.md +80 -0
- package/scripts/bun-riscv64/rust-core/webkit-patches/0003-disable-dfg-ftl-on-riscv64.patch +60 -0
- package/scripts/bun-riscv64/rust-core/webkit-patches/0004-riscv64-do-not-force-wasm-in-c-loop.patch +31 -0
- package/scripts/bun-riscv64/rust-core/webkit-patches/0005-domjit-effect-allow-no-dfg-c-loop.patch +40 -0
- package/scripts/bun-riscv64/rust-core/webkit-patches/0006-disable-usewasm-when-webassembly-compiled-out.patch +33 -0
- package/scripts/bun-riscv64/rust-core/webkit-patches/0007-restore-dropped-includes-and-llint-fwd-decl.patch +31 -0
- package/scripts/bun-riscv64/validate.sh +264 -0
- package/scripts/bun-riscv64/webkit-patches/0001-cherry-pick-llint-riscv64.recipe +155 -0
- package/scripts/bun-riscv64/webkit-patches/0002-cherry-pick-baseline-jit-riscv64.recipe +40 -0
- package/scripts/bun-riscv64/webkit-patches/0003-disable-dfg-ftl-on-riscv64.patch +60 -0
- package/scripts/bun-riscv64/webkit-patches/0004-riscv64-do-not-force-wasm-in-c-loop.patch +31 -0
- package/scripts/bun-riscv64/webkit-patches/0005-domjit-effect-allow-no-dfg-c-loop.patch +40 -0
- package/scripts/bun-riscv64/webkit-patches/0006-disable-usewasm-when-webassembly-compiled-out.patch +33 -0
- package/scripts/bun-riscv64/webkit-patches/0007-restore-dropped-includes-and-llint-fwd-decl.patch +72 -0
- package/scripts/bun-riscv64/webkit-patches/README.md +146 -0
- package/scripts/check-homepage-public-readiness.mjs +353 -0
- package/scripts/check-homepage-release-data.mjs +110 -0
- package/scripts/check-i18n.mjs +2 -1
- package/scripts/check-real-local-chat.ts +147 -0
- package/scripts/check-real-local-provisioning.ts +104 -0
- package/scripts/check-real-local-reset.ts +249 -0
- package/scripts/check-sms-gateway-completion-audit.mjs +428 -0
- package/scripts/check-sms-gateway-readiness.mjs +266 -0
- package/scripts/clean-repo.mjs +5 -5
- package/scripts/codesign-mas.mjs +222 -16
- package/scripts/collect-docker-runtime-deps.mjs +229 -0
- package/scripts/continue-sms-gateway-work.mjs +121 -0
- package/scripts/copy-runtime-node-modules.ts +903 -195
- package/scripts/deploy-cloud-api-production-gateway.mjs +52 -0
- package/scripts/desktop-build.mjs +655 -101
- package/scripts/dev-platform.mjs +346 -102
- package/scripts/dev-startup-smoke.mjs +248 -0
- package/scripts/dev-ui.mjs +418 -176
- package/scripts/disable-local-eliza-workspace.mjs +35 -0
- package/scripts/docker-ci-smoke.sh +298 -96
- package/scripts/docker-entrypoint.sh +62 -1
- package/scripts/docker-entrypoint.test.ts +283 -0
- package/scripts/ensure-avatars.mjs +2 -2
- package/scripts/ensure-electrobun-core.mjs +1 -1
- package/scripts/ensure-generated-core-proto-js.mjs +1 -1
- package/scripts/ensure-type-package-aliases.mjs +62 -5
- package/scripts/ensure-vision-deps.mjs +20 -1
- package/scripts/entry.ts +1 -1
- package/scripts/ffi-stub/Makefile +64 -0
- package/scripts/ffi-stub/README.md +391 -0
- package/scripts/ffi-stub/asr-ffi-smoke.ts +139 -0
- package/scripts/ffi-stub/ffi-stub.c +539 -0
- package/scripts/ffi-stub/ffi.h +538 -0
- package/scripts/ffi-stub/libelizainference_stub.so +0 -0
- package/scripts/ffi-stub/tts-stream-ffi-smoke.ts +349 -0
- package/scripts/generate-first-run-voicelines.mjs +194 -0
- package/scripts/generate-plugin-index.js +4 -3
- package/scripts/generate-static-asset-manifest.mjs +1 -1
- package/scripts/i18n-dynamic-keys.json +5 -5
- package/scripts/init-submodules.mjs +2 -2
- package/scripts/install-android-sms-gateway.md +177 -0
- package/scripts/install-android-sms-gateway.mjs +1088 -0
- package/scripts/ios-xcframework/README.md +74 -72
- package/scripts/ios-xcframework/build-xcframework.mjs +204 -43
- package/scripts/ios-xcframework/run-physical-device-smoke.mjs +1943 -0
- package/scripts/ios-xcframework/runtime-symbol-shim.c +450 -0
- package/scripts/kernel-patches/cpu-polar-kernels.mjs +441 -0
- package/scripts/kernel-patches/cpu-simd-kernels.mjs +253 -0
- package/scripts/kernel-patches/cpu-thread-parallelism.mjs +368 -0
- package/scripts/kernel-patches/cuda-kernels.mjs +117 -0
- package/scripts/kernel-patches/metal-kernels.mjs +1698 -109
- package/scripts/kernel-patches/server-omnivoice-route.mjs +718 -0
- package/scripts/kernel-patches/server-structured-output.mjs +279 -0
- package/scripts/kernel-patches/vulkan-dispatch-log.mjs +166 -0
- package/scripts/kernel-patches/vulkan-dispatch-log.test.mjs +50 -0
- package/scripts/kernel-patches/vulkan-dispatch-patches/01-vulkan-shaders-gen.patch +30 -16
- package/scripts/kernel-patches/vulkan-dispatch-patches/02-ggml-vulkan-pipelines.patch +75 -30
- package/scripts/kernel-patches/vulkan-kernels.mjs +800 -49
- package/scripts/lib/agent-source-watcher.mjs +174 -0
- package/scripts/lib/agent-source-watcher.test.mjs +184 -0
- package/scripts/lib/api-supervisor.mjs +78 -9
- package/scripts/lib/api-supervisor.test.mjs +121 -0
- package/scripts/lib/app-dir.mjs +2 -16
- package/scripts/lib/apple-entitlement-audit.mjs +655 -0
- package/scripts/lib/apple-entitlement-audit.test.mjs +144 -0
- package/scripts/lib/bun-version-guard.mjs +13 -13
- package/scripts/lib/capacitor-plugin-build-needed.mjs +4 -3
- package/scripts/lib/capacitor-plugin-names.mjs +30 -14
- package/scripts/lib/desktop-preflight.mjs +9 -5
- package/scripts/lib/desktop-startup-embedding-warmup-policy.mjs +51 -0
- package/scripts/lib/desktop-startup-embedding-warmup-policy.test.mjs +55 -0
- package/scripts/lib/duet-bridge.d.mts +63 -0
- package/scripts/lib/duet-bridge.mjs +193 -0
- package/scripts/lib/node-path-env.mjs +4 -2
- package/scripts/lib/orchestrator-desktop-dev-banner.mjs +12 -3
- package/scripts/lib/patch-bun-exports.mjs +90 -27
- package/scripts/lib/patch-bun-exports.test.mjs +79 -0
- package/scripts/lib/renderer-build-action.mjs +35 -0
- package/scripts/lib/renderer-build-action.test.mjs +70 -0
- package/scripts/lib/stage-android-agent.mjs +748 -99
- package/scripts/lib/sync-eliza-env-aliases.mjs +3 -25
- package/scripts/lib/ui-smoke-stub-decision.mjs +33 -0
- package/scripts/lib/ui-smoke-stub-decision.test.mjs +46 -0
- package/scripts/lib/vite-renderer-dist-stale.mjs +5 -0
- package/scripts/lib/voice-latency-report.mjs +154 -0
- package/scripts/lifeops-prompt-benchmark.ts +21 -12
- package/scripts/link-docker-local-app-packages.mjs +89 -36
- package/scripts/local-stt-bench.ts +192 -0
- package/scripts/maintain-cloud-api-production-gateway.mjs +54 -0
- package/scripts/mas-smoke.mjs +459 -0
- package/scripts/mas-smoke.test.mjs +220 -0
- package/scripts/mobile-auth-simulator-smoke.mjs +0 -1
- package/scripts/normalize-eliza-capture.ts +97 -0
- package/scripts/omnivoice-fuse/prepare.mjs +2543 -23
- package/scripts/pack-upstreams.mjs +65 -5
- package/scripts/package-electrobun-linux.mjs +303 -0
- package/scripts/patch-deps.mjs +5 -3
- package/scripts/patches/llama-mobile-kokoro-tts.patch +480 -0
- package/scripts/playwright-ui-live-stack.ts +194 -49
- package/scripts/playwright-ui-smoke-api-stub.mjs +3501 -109
- package/scripts/pre-review-local.mjs +2 -2
- package/scripts/prepare-ios-cocoapods.sh +41 -3
- package/scripts/release-check.ts +180 -84
- package/scripts/release-workflow-drift.test.ts +57 -0
- package/scripts/relink-workspace-packages-to-dist.mjs +21 -4
- package/scripts/rt.mjs +16 -1
- package/scripts/run-biome-check.mjs +1 -1
- package/scripts/run-coding-agent-e2e.mjs +3 -3
- package/scripts/run-eliza-app-core-script.mjs +34 -0
- package/scripts/run-local-plugin-live-smoke.mjs +71 -2
- package/scripts/run-mobile-build-android-app-actions.test.mjs +426 -0
- package/scripts/run-mobile-build.mjs +4757 -607
- package/scripts/run-node-runtime.mjs +184 -7
- package/scripts/run-node-runtime.test.mjs +167 -0
- package/scripts/run-node-tsx.mjs +80 -33
- package/scripts/run-node.mjs +41 -1
- package/scripts/run-production-build.mjs +34 -27
- package/scripts/run-release-check.mjs +19 -0
- package/scripts/run-release-contract-suite.mjs +107 -14
- package/scripts/run-ui-smoke-playwright-suite.mjs +0 -2
- package/scripts/runtime-package-manifest.ts +21 -3
- package/scripts/setup-upstreams.mjs +42 -1
- package/scripts/sms-gateway-status.mjs +194 -0
- package/scripts/stage-android-agent.test.mjs +97 -0
- package/scripts/stage-elizavoice-lib.mjs +203 -0
- package/scripts/startup-integration-script-drift.test.ts +82 -4
- package/scripts/streaming-pipeline-bench.ts +543 -0
- package/scripts/sync-homepage-porkbun-dns.mjs +262 -0
- package/scripts/test-sms-gateway-software.mjs +100 -0
- package/scripts/type-audit.mjs +1 -1
- package/scripts/validate-bluebubbles-outbound.mjs +293 -0
- package/scripts/validate-cdn-assets.mjs +15 -7
- package/scripts/validate-regression-matrix.mjs +109 -8
- package/scripts/verify-android-sms-gateway-e2e.mjs +362 -0
- package/scripts/verify-bluebubbles-gateway-e2e.mjs +191 -0
- package/scripts/verify-bluebubbles-inbound-readiness.mjs +88 -0
- package/scripts/verify-cloud-api-production-deploy.mjs +87 -0
- package/scripts/verify-cloud-sms-onboarding-flow.mjs +336 -0
- package/scripts/voice/freeze-voice.mjs +521 -0
- package/scripts/voice-attribution-smoke.ts +538 -0
- package/scripts/voice-create-profile.mjs +379 -0
- package/scripts/voice-duet.mjs +1355 -0
- package/scripts/voice-e2e-hardware.ts +871 -0
- package/scripts/voice-interactive.mjs +1750 -0
- package/scripts/voice-latency-report.mjs +96 -0
- package/scripts/voice-latency-report.test.ts +176 -0
- package/scripts/voice-preset/build-default-voice-preset.mjs +249 -0
- package/scripts/voice-preset/build-onboarding-voice.mjs +281 -0
- package/scripts/watch-sms-gateway-readiness.mjs +303 -0
- package/scripts/write-homepage-release-data.mjs +458 -26
- package/security/agent-vault-id.d.ts +1 -1
- package/security/agent-vault-id.js +1 -1
- package/security/hydrate-wallet-keys-from-platform-store.d.ts.map +1 -1
- package/security/hydrate-wallet-keys-from-platform-store.js +23 -14
- package/security/platform-secure-store-node.d.ts +2 -2
- package/security/platform-secure-store-node.js +3 -3
- package/security/wallet-os-store-actions.d.ts +0 -9
- package/security/wallet-os-store-actions.d.ts.map +1 -1
- package/security/wallet-os-store-actions.js +3 -10
- package/services/account-pool.d.ts +23 -14
- package/services/account-pool.d.ts.map +1 -1
- package/services/account-pool.js +86 -24
- package/services/account-usage.d.ts.map +1 -1
- package/services/account-usage.js +2 -5
- package/services/ambient-audio/consent.d.ts +9 -0
- package/services/ambient-audio/consent.d.ts.map +1 -0
- package/services/ambient-audio/consent.js +28 -0
- package/services/ambient-audio/index.d.ts +7 -0
- package/services/ambient-audio/index.d.ts.map +1 -0
- package/services/ambient-audio/index.js +4 -0
- package/services/ambient-audio/replay-buffer.d.ts +14 -0
- package/services/ambient-audio/replay-buffer.d.ts.map +1 -0
- package/services/ambient-audio/replay-buffer.js +66 -0
- package/services/ambient-audio/response-gate.d.ts +3 -0
- package/services/ambient-audio/response-gate.d.ts.map +1 -0
- package/services/ambient-audio/response-gate.js +33 -0
- package/services/ambient-audio/service.d.ts +22 -0
- package/services/ambient-audio/service.d.ts.map +1 -0
- package/services/ambient-audio/service.js +47 -0
- package/services/ambient-audio/types.d.ts +42 -0
- package/services/ambient-audio/types.d.ts.map +1 -0
- package/services/app-updates/update-policy.d.ts +64 -0
- package/services/app-updates/update-policy.d.ts.map +1 -0
- package/services/app-updates/update-policy.js +228 -0
- package/services/auth-store.d.ts +37 -1
- package/services/auth-store.d.ts.map +1 -1
- package/services/auth-store.js +59 -26
- package/services/cloud-jwks-store.d.ts +3 -3
- package/services/cloud-jwks-store.d.ts.map +1 -1
- package/services/cloud-jwks-store.js +5 -8
- package/services/coding-account-bridge.d.ts +71 -0
- package/services/coding-account-bridge.d.ts.map +1 -0
- package/services/coding-account-bridge.js +267 -0
- package/services/connector-target-catalog.d.ts +10 -3
- package/services/connector-target-catalog.d.ts.map +1 -1
- package/services/connector-target-catalog.js +7 -4
- package/services/credential-tunnel-service.d.ts +66 -0
- package/services/credential-tunnel-service.d.ts.map +1 -0
- package/services/credential-tunnel-service.js +227 -0
- package/services/github-credentials.d.ts +1 -1
- package/services/github-credentials.js +1 -1
- package/services/inference-abort.d.ts +47 -0
- package/services/inference-abort.d.ts.map +1 -0
- package/services/inference-abort.js +76 -0
- package/services/persistence.d.ts +2 -3
- package/services/persistence.d.ts.map +1 -1
- package/services/persistence.js +2 -3
- package/services/phrase-chunked-tts.d.ts +136 -0
- package/services/phrase-chunked-tts.d.ts.map +1 -0
- package/services/phrase-chunked-tts.js +208 -0
- package/services/sandbox-registry.d.ts +78 -0
- package/services/sandbox-registry.d.ts.map +1 -0
- package/services/sandbox-registry.js +323 -0
- package/services/secrets-manager-installer.d.ts +8 -1
- package/services/secrets-manager-installer.d.ts.map +1 -1
- package/services/secrets-manager-installer.js +27 -2
- package/services/sensitive-requests/cloud-link-adapter.d.ts +15 -0
- package/services/sensitive-requests/cloud-link-adapter.d.ts.map +1 -0
- package/services/sensitive-requests/cloud-link-adapter.js +73 -0
- package/services/sensitive-requests/index.d.ts +27 -0
- package/services/sensitive-requests/index.d.ts.map +1 -0
- package/services/sensitive-requests/index.js +51 -0
- package/services/sensitive-requests/instruct-dm-only-adapter.d.ts +14 -0
- package/services/sensitive-requests/instruct-dm-only-adapter.d.ts.map +1 -0
- package/services/sensitive-requests/instruct-dm-only-adapter.js +22 -0
- package/services/sensitive-requests/owner-app-inline-adapter.d.ts +3 -0
- package/services/sensitive-requests/owner-app-inline-adapter.d.ts.map +1 -0
- package/services/sensitive-requests/owner-app-inline-adapter.js +146 -0
- package/services/sensitive-requests/owner-app-oauth-adapter.d.ts +3 -0
- package/services/sensitive-requests/owner-app-oauth-adapter.d.ts.map +1 -0
- package/services/sensitive-requests/owner-app-oauth-adapter.js +156 -0
- package/services/sensitive-requests/public-link-adapter.d.ts +14 -0
- package/services/sensitive-requests/public-link-adapter.d.ts.map +1 -0
- package/services/sensitive-requests/public-link-adapter.js +86 -0
- package/services/sensitive-requests/tunnel-link-adapter.d.ts +17 -0
- package/services/sensitive-requests/tunnel-link-adapter.d.ts.map +1 -0
- package/services/sensitive-requests/tunnel-link-adapter.js +38 -0
- package/services/steward-credentials.d.ts +1 -1
- package/services/steward-credentials.d.ts.map +1 -1
- package/services/steward-credentials.js +10 -6
- package/services/steward-sidecar/health-check.d.ts.map +1 -1
- package/services/steward-sidecar/health-check.js +4 -3
- package/services/steward-sidecar/process-management.d.ts +1 -1
- package/services/steward-sidecar/process-management.d.ts.map +1 -1
- package/services/steward-sidecar/process-management.js +9 -3
- package/services/steward-sidecar/types.d.ts +1 -1
- package/services/steward-sidecar/types.d.ts.map +1 -1
- package/services/steward-sidecar/wallet-setup.d.ts.map +1 -1
- package/services/steward-sidecar/wallet-setup.js +8 -7
- package/services/steward-sidecar.d.ts +2 -2
- package/services/steward-sidecar.d.ts.map +1 -1
- package/services/steward-sidecar.js +27 -19
- package/services/task-host-capabilities.d.ts +60 -0
- package/services/task-host-capabilities.d.ts.map +1 -0
- package/services/task-host-capabilities.js +122 -0
- package/services/tool-call-cache/index.d.ts +2 -2
- package/services/tool-call-cache/index.d.ts.map +1 -1
- package/services/tool-call-cache/index.js +1 -1
- package/services/trigger-event-bridge.js +1 -1
- package/services/tunnel-to-mobile/index.d.ts +2 -0
- package/services/tunnel-to-mobile/index.d.ts.map +1 -0
- package/services/tunnel-to-mobile/index.js +1 -0
- package/services/tunnel-to-mobile/tunnel-to-mobile-client.d.ts +105 -0
- package/services/tunnel-to-mobile/tunnel-to-mobile-client.d.ts.map +1 -0
- package/services/tunnel-to-mobile/tunnel-to-mobile-client.js +190 -0
- package/services/vault-bootstrap.d.ts.map +1 -1
- package/services/vault-bootstrap.js +48 -21
- package/services/vault-mirror.d.ts +1 -1
- package/services/vault-mirror.d.ts.map +1 -1
- package/services/vault-mirror.js +29 -6
- package/services/voice-profiles/diarization-pipeline.d.ts +6 -0
- package/services/voice-profiles/diarization-pipeline.d.ts.map +1 -0
- package/services/voice-profiles/diarization-pipeline.js +20 -0
- package/services/voice-profiles/index.d.ts +12 -0
- package/services/voice-profiles/index.d.ts.map +1 -0
- package/services/voice-profiles/index.js +5 -0
- package/services/voice-profiles/nickname-evaluator.d.ts +14 -0
- package/services/voice-profiles/nickname-evaluator.d.ts.map +1 -0
- package/services/voice-profiles/nickname-evaluator.js +46 -0
- package/services/voice-profiles/owner-confidence.d.ts +10 -0
- package/services/voice-profiles/owner-confidence.d.ts.map +1 -0
- package/services/voice-profiles/owner-confidence.js +38 -0
- package/services/voice-profiles/private-challenge.d.ts +20 -0
- package/services/voice-profiles/private-challenge.d.ts.map +1 -0
- package/services/voice-profiles/private-challenge.js +44 -0
- package/services/voice-profiles/store.d.ts +21 -0
- package/services/voice-profiles/store.d.ts.map +1 -0
- package/services/voice-profiles/store.js +50 -0
- package/services/voice-profiles/types.d.ts +38 -0
- package/services/voice-profiles/types.d.ts.map +1 -0
- package/services/voice-profiles/types.js +1 -0
- package/styles/electrobun-mac-window-drag.css +4 -4
- package/test/helpers/__tests__/live-agent-test.smoke.test.ts +43 -70
- package/test/helpers/browser-mocks.ts +2 -2
- package/test/helpers/conditional-tests.ts +2 -2
- package/test/helpers/i18n.ts +1 -1
- package/test/helpers/live-agent-test.ts +537 -551
- package/test/helpers/live-provider.test.ts +4 -4
- package/test/helpers/live-provider.ts +41 -7
- package/test/helpers/live-runtime-server.ts +4 -4
- package/test/helpers/pglite-runtime.ts +1 -1
- package/test/helpers/real-runtime.ts +54 -15
- package/test/helpers/trajectory-harness.ts +11 -7
- package/test/scripts/start-eliza-live.ts +9 -0
- package/test/scripts/test-parallel.mjs +1 -1
- package/test/scripts/test-root-unit.mjs +6 -7
- package/ui-compat.d.ts +13 -2
- package/ui-compat.d.ts.map +1 -1
- package/ui-compat.js +19 -3
- package/api/auth-pairing-compat-routes.d.ts +0 -17
- package/api/auth-pairing-compat-routes.d.ts.map +0 -1
- package/api/auth-pairing-compat-routes.js +0 -301
- package/api/local-inference-compat-routes.d.ts +0 -16
- package/api/local-inference-compat-routes.d.ts.map +0 -1
- package/api/local-inference-compat-routes.js +0 -617
- package/api/onboarding-compat-routes.d.ts +0 -4
- package/api/onboarding-compat-routes.d.ts.map +0 -1
- package/api/onboarding-compat-routes.js +0 -207
- package/api/plugins-compat-routes.d.ts +0 -103
- package/api/plugins-compat-routes.d.ts.map +0 -1
- package/api/plugins-compat-routes.js +0 -1181
- package/api/server-onboarding-compat.d.ts +0 -31
- package/api/server-onboarding-compat.d.ts.map +0 -1
- package/api/server-onboarding-compat.js +0 -283
- package/benchmark/cua-routes.d.ts +0 -10
- package/benchmark/cua-routes.d.ts.map +0 -1
- package/benchmark/cua-routes.js +0 -179
- package/benchmark/mock-plugin-base.d.ts +0 -9
- package/benchmark/mock-plugin-base.d.ts.map +0 -1
- package/benchmark/mock-plugin-base.js +0 -325
- package/cli/parse-duration.d.ts +0 -5
- package/cli/parse-duration.d.ts.map +0 -1
- package/cli/parse-duration.js +0 -27
- package/patches/llama-cpp-capacitor@0.1.5.patch +0 -2387
- package/platform/agent-browser-stub.d.ts +0 -27
- package/platform/agent-browser-stub.d.ts.map +0 -1
- package/platform/agent-browser-stub.js +0 -16
- package/platforms/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +0 -26
- package/platforms/android/app/src/main/res/drawable/ic_launcher_background.xml +0 -170
- package/platforms/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +0 -34
- package/platforms/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +0 -18
- package/platforms/electrobun/assets/appIcon.iconset/icon_512x512@2x.png +0 -0
- package/platforms/electrobun/assets/appIcon.png +0 -0
- package/platforms/electrobun/scripts/build-whisper-universal.sh +0 -137
- package/platforms/electrobun/scripts/build-whisper.sh +0 -95
- package/platforms/electrobun/src/libMacWindowEffects.dylib +0 -0
- package/platforms/electrobun/src/native/whisper.ts +0 -280
- package/platforms/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
- package/registry/generate-apps.d.ts +0 -2
- package/registry/generate-apps.d.ts.map +0 -1
- package/registry/generate-apps.js +0 -338
- package/registry/generate.d.ts +0 -2
- package/registry/generate.d.ts.map +0 -1
- package/registry/generate.js +0 -506
- package/runtime/embedding-manager-support.d.ts +0 -77
- package/runtime/embedding-manager-support.d.ts.map +0 -1
- package/runtime/embedding-manager-support.js +0 -309
- package/runtime/embedding-presets.d.ts +0 -5
- package/runtime/embedding-presets.d.ts.map +0 -1
- package/runtime/embedding-presets.js +0 -47
- package/runtime/embedding-warmup-policy.d.ts +0 -13
- package/runtime/embedding-warmup-policy.d.ts.map +0 -1
- package/runtime/embedding-warmup-policy.js +0 -33
- package/runtime/ensure-local-inference-handler.d.ts +0 -25
- package/runtime/ensure-local-inference-handler.d.ts.map +0 -1
- package/runtime/ensure-local-inference-handler.js +0 -389
- package/runtime/mobile-local-inference-gate.d.ts +0 -21
- package/runtime/mobile-local-inference-gate.d.ts.map +0 -1
- package/runtime/mobile-local-inference-gate.js +0 -24
- package/scripts/aosp/avd-test.mjs +0 -403
- package/scripts/aosp/boot-validate.mjs +0 -536
- package/scripts/aosp/build-aosp.mjs +0 -448
- package/scripts/aosp/build-bootanimation.mjs +0 -178
- package/scripts/aosp/capture-screens.mjs +0 -325
- package/scripts/aosp/e2e-validate.mjs +0 -225
- package/scripts/aosp/lint-init-rc.mjs +0 -258
- package/scripts/aosp/llama-shim/eliza_llama_shim.c +0 -276
- package/scripts/aosp/sim.mjs +0 -277
- package/scripts/aosp/sync-to-aosp.mjs +0 -134
- package/scripts/aosp/validate.mjs +0 -1273
- package/scripts/build-llama-cpp-dflash.mjs +0 -1866
- package/scripts/generate-onboarding-voicelines.mjs +0 -194
- package/scripts/generated/static-asset-manifest.json +0 -4
- package/scripts/normalize-parallax-capture.ts +0 -97
- package/scripts/omnivoice-fuse/Makefile +0 -44
- package/scripts/omnivoice-fuse/README.md +0 -266
- package/scripts/omnivoice-fuse/cmake-graft.mjs +0 -180
- package/scripts/omnivoice-fuse/ffi-stub.c +0 -222
- package/scripts/omnivoice-fuse/ffi.h +0 -158
- package/scripts/omnivoice-fuse/libelizainference_stub.dylib +0 -0
- package/scripts/omnivoice-fuse/verify-symbols.mjs +0 -138
- package/security/cloud-secret-store.d.ts +0 -34
- package/security/cloud-secret-store.d.ts.map +0 -1
- package/security/cloud-secret-store.js +0 -65
- package/security/export-guard.d.ts +0 -34
- package/security/export-guard.d.ts.map +0 -1
- package/security/export-guard.js +0 -127
- package/services/local-inference/__stress__/cache-stress-helpers.d.ts +0 -76
- package/services/local-inference/__stress__/cache-stress-helpers.d.ts.map +0 -1
- package/services/local-inference/__stress__/cache-stress-helpers.js +0 -238
- package/services/local-inference/active-model.d.ts +0 -180
- package/services/local-inference/active-model.d.ts.map +0 -1
- package/services/local-inference/active-model.js +0 -362
- package/services/local-inference/assignments.d.ts +0 -58
- package/services/local-inference/assignments.d.ts.map +0 -1
- package/services/local-inference/assignments.js +0 -179
- package/services/local-inference/backend.d.ts +0 -200
- package/services/local-inference/backend.d.ts.map +0 -1
- package/services/local-inference/backend.js +0 -242
- package/services/local-inference/bundled-models.d.ts +0 -34
- package/services/local-inference/bundled-models.d.ts.map +0 -1
- package/services/local-inference/bundled-models.js +0 -104
- package/services/local-inference/cache-bridge.d.ts +0 -184
- package/services/local-inference/cache-bridge.d.ts.map +0 -1
- package/services/local-inference/cache-bridge.js +0 -333
- package/services/local-inference/catalog.d.ts +0 -57
- package/services/local-inference/catalog.d.ts.map +0 -1
- package/services/local-inference/catalog.js +0 -262
- package/services/local-inference/conversation-registry.d.ts +0 -122
- package/services/local-inference/conversation-registry.d.ts.map +0 -1
- package/services/local-inference/conversation-registry.js +0 -182
- package/services/local-inference/device-bridge.d.ts +0 -139
- package/services/local-inference/device-bridge.d.ts.map +0 -1
- package/services/local-inference/device-bridge.js +0 -774
- package/services/local-inference/dflash-doctor.d.ts +0 -27
- package/services/local-inference/dflash-doctor.d.ts.map +0 -1
- package/services/local-inference/dflash-doctor.js +0 -149
- package/services/local-inference/dflash-server.d.ts +0 -248
- package/services/local-inference/dflash-server.d.ts.map +0 -1
- package/services/local-inference/dflash-server.js +0 -1076
- package/services/local-inference/downloader.d.ts +0 -48
- package/services/local-inference/downloader.d.ts.map +0 -1
- package/services/local-inference/downloader.js +0 -688
- package/services/local-inference/engine.d.ts +0 -282
- package/services/local-inference/engine.d.ts.map +0 -1
- package/services/local-inference/engine.js +0 -743
- package/services/local-inference/external-scanner.d.ts +0 -17
- package/services/local-inference/external-scanner.d.ts.map +0 -1
- package/services/local-inference/external-scanner.js +0 -261
- package/services/local-inference/handler-registry.d.ts +0 -72
- package/services/local-inference/handler-registry.d.ts.map +0 -1
- package/services/local-inference/handler-registry.js +0 -159
- package/services/local-inference/hardware.d.ts +0 -26
- package/services/local-inference/hardware.d.ts.map +0 -1
- package/services/local-inference/hardware.js +0 -139
- package/services/local-inference/hf-search.d.ts +0 -19
- package/services/local-inference/hf-search.d.ts.map +0 -1
- package/services/local-inference/hf-search.js +0 -169
- package/services/local-inference/index.d.ts +0 -10
- package/services/local-inference/index.d.ts.map +0 -1
- package/services/local-inference/index.js +0 -7
- package/services/local-inference/llama-server-metrics.d.ts +0 -108
- package/services/local-inference/llama-server-metrics.d.ts.map +0 -1
- package/services/local-inference/llama-server-metrics.js +0 -175
- package/services/local-inference/manifest/index.d.ts +0 -4
- package/services/local-inference/manifest/index.d.ts.map +0 -1
- package/services/local-inference/manifest/index.js +0 -5
- package/services/local-inference/manifest/schema.d.ts +0 -419
- package/services/local-inference/manifest/schema.d.ts.map +0 -1
- package/services/local-inference/manifest/schema.js +0 -227
- package/services/local-inference/manifest/types.d.ts +0 -23
- package/services/local-inference/manifest/types.d.ts.map +0 -1
- package/services/local-inference/manifest/types.js +0 -5
- package/services/local-inference/manifest/validator.d.ts +0 -43
- package/services/local-inference/manifest/validator.d.ts.map +0 -1
- package/services/local-inference/manifest/validator.js +0 -187
- package/services/local-inference/paths.d.ts +0 -8
- package/services/local-inference/paths.d.ts.map +0 -1
- package/services/local-inference/paths.js +0 -7
- package/services/local-inference/providers.d.ts +0 -61
- package/services/local-inference/providers.d.ts.map +0 -1
- package/services/local-inference/providers.js +0 -334
- package/services/local-inference/ram-budget.d.ts +0 -57
- package/services/local-inference/ram-budget.d.ts.map +0 -1
- package/services/local-inference/ram-budget.js +0 -107
- package/services/local-inference/readiness.d.ts +0 -9
- package/services/local-inference/readiness.d.ts.map +0 -1
- package/services/local-inference/readiness.js +0 -153
- package/services/local-inference/recommendation.d.ts +0 -62
- package/services/local-inference/recommendation.d.ts.map +0 -1
- package/services/local-inference/recommendation.js +0 -309
- package/services/local-inference/registry.d.ts +0 -35
- package/services/local-inference/registry.d.ts.map +0 -1
- package/services/local-inference/registry.js +0 -117
- package/services/local-inference/router-handler.d.ts +0 -51
- package/services/local-inference/router-handler.d.ts.map +0 -1
- package/services/local-inference/router-handler.js +0 -165
- package/services/local-inference/routing-policy.d.ts +0 -55
- package/services/local-inference/routing-policy.d.ts.map +0 -1
- package/services/local-inference/routing-policy.js +0 -195
- package/services/local-inference/routing-preferences.d.ts +0 -8
- package/services/local-inference/routing-preferences.d.ts.map +0 -1
- package/services/local-inference/routing-preferences.js +0 -7
- package/services/local-inference/service.d.ts +0 -88
- package/services/local-inference/service.d.ts.map +0 -1
- package/services/local-inference/service.js +0 -210
- package/services/local-inference/session-pool.d.ts +0 -72
- package/services/local-inference/session-pool.d.ts.map +0 -1
- package/services/local-inference/session-pool.js +0 -125
- package/services/local-inference/types.d.ts +0 -309
- package/services/local-inference/types.d.ts.map +0 -1
- package/services/local-inference/types.js +0 -23
- package/services/local-inference/verify.d.ts +0 -8
- package/services/local-inference/verify.d.ts.map +0 -1
- package/services/local-inference/verify.js +0 -7
- package/services/local-inference/voice/barge-in.d.ts +0 -15
- package/services/local-inference/voice/barge-in.d.ts.map +0 -1
- package/services/local-inference/voice/barge-in.js +0 -20
- package/services/local-inference/voice/engine-bridge.d.ts +0 -256
- package/services/local-inference/voice/engine-bridge.d.ts.map +0 -1
- package/services/local-inference/voice/engine-bridge.js +0 -398
- package/services/local-inference/voice/ffi-bindings.d.ts +0 -114
- package/services/local-inference/voice/ffi-bindings.d.ts.map +0 -1
- package/services/local-inference/voice/ffi-bindings.js +0 -281
- package/services/local-inference/voice/index.d.ts +0 -51
- package/services/local-inference/voice/index.d.ts.map +0 -1
- package/services/local-inference/voice/index.js +0 -50
- package/services/local-inference/voice/lifecycle.d.ts +0 -135
- package/services/local-inference/voice/lifecycle.d.ts.map +0 -1
- package/services/local-inference/voice/lifecycle.js +0 -189
- package/services/local-inference/voice/phoneme-tokenizer.d.ts +0 -58
- package/services/local-inference/voice/phoneme-tokenizer.d.ts.map +0 -1
- package/services/local-inference/voice/phoneme-tokenizer.js +0 -53
- package/services/local-inference/voice/phrase-cache.d.ts +0 -24
- package/services/local-inference/voice/phrase-cache.d.ts.map +0 -1
- package/services/local-inference/voice/phrase-cache.js +0 -32
- package/services/local-inference/voice/phrase-chunker.d.ts +0 -20
- package/services/local-inference/voice/phrase-chunker.d.ts.map +0 -1
- package/services/local-inference/voice/phrase-chunker.js +0 -85
- package/services/local-inference/voice/ring-buffer.d.ts +0 -40
- package/services/local-inference/voice/ring-buffer.d.ts.map +0 -1
- package/services/local-inference/voice/ring-buffer.js +0 -85
- package/services/local-inference/voice/rollback-queue.d.ts +0 -24
- package/services/local-inference/voice/rollback-queue.d.ts.map +0 -1
- package/services/local-inference/voice/rollback-queue.js +0 -49
- package/services/local-inference/voice/scheduler.d.ts +0 -47
- package/services/local-inference/voice/scheduler.d.ts.map +0 -1
- package/services/local-inference/voice/scheduler.js +0 -123
- package/services/local-inference/voice/shared-resources.d.ts +0 -119
- package/services/local-inference/voice/shared-resources.d.ts.map +0 -1
- package/services/local-inference/voice/shared-resources.js +0 -83
- package/services/local-inference/voice/speaker-preset-cache.d.ts +0 -28
- package/services/local-inference/voice/speaker-preset-cache.d.ts.map +0 -1
- package/services/local-inference/voice/speaker-preset-cache.js +0 -44
- package/services/local-inference/voice/types.d.ts +0 -80
- package/services/local-inference/voice/types.d.ts.map +0 -1
- package/services/local-inference/voice/voice-preset-format.d.ts +0 -56
- package/services/local-inference/voice/voice-preset-format.d.ts.map +0 -1
- package/services/local-inference/voice/voice-preset-format.js +0 -184
- package/services/plugin-installer.d.ts +0 -22
- package/services/plugin-installer.d.ts.map +0 -1
- package/services/plugin-installer.js +0 -41
- package/test/scripts/task-agent-live-smoke.ts +0 -1335
- /package/services/{local-inference/voice → ambient-audio}/types.js +0 -0
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Layout produced under `packages/app/android/app/src/main/assets/agent/`:
|
|
11
11
|
*
|
|
12
|
-
* agent-bundle.js (ABI-independent
|
|
13
|
-
* until Phase D replaces it with the real
|
|
14
|
-
* @elizaos/agent bundle)
|
|
12
|
+
* agent-bundle.js (ABI-independent @elizaos/agent bundle)
|
|
15
13
|
* launch.sh (ABI-independent device-side launcher,
|
|
16
14
|
* a parameterised double-fork daemoniser)
|
|
17
15
|
* x86_64/bun (cuttlefish + x86_64 emulator)
|
|
@@ -22,43 +20,56 @@
|
|
|
22
20
|
* arm64-v8a/ld-musl-aarch64.so.1
|
|
23
21
|
* arm64-v8a/libstdc++.so.6.0.33
|
|
24
22
|
* arm64-v8a/libgcc_s.so.1
|
|
23
|
+
* riscv64/bun (cuttlefish riscv64; required unless
|
|
24
|
+
* ELIZA_BUN_RISCV64_OPTIONAL=1 since
|
|
25
|
+
* upstream Bun has no riscv64-linux-musl
|
|
26
|
+
* release)
|
|
27
|
+
* riscv64/ld-musl-riscv64.so.1
|
|
28
|
+
* riscv64/libstdc++.so.6.0.33
|
|
29
|
+
* riscv64/libgcc_s.so.1
|
|
25
30
|
*
|
|
26
31
|
* Downloads are cached under `~/.cache/eliza-android-agent/<bun-version>/`
|
|
27
|
-
* and the staging step is idempotent — already-staged files with
|
|
28
|
-
*
|
|
32
|
+
* and the staging step is idempotent — already-staged files with matching
|
|
33
|
+
* bytes are left in place.
|
|
29
34
|
*
|
|
30
|
-
* Pinned versions
|
|
31
|
-
* - bun 1.3.
|
|
35
|
+
* Pinned versions:
|
|
36
|
+
* - bun 1.3.14 validated by Android agent bring-up
|
|
32
37
|
* - Alpine v3.21 ships gcc 14.2 → libstdc++.so.6.0.33
|
|
33
38
|
*
|
|
34
|
-
* The ABI-independent `launch.sh`
|
|
35
|
-
*
|
|
36
|
-
* `scripts/spike-android-agent/server.js` respectively. Phase D replaces
|
|
37
|
-
* `agent-bundle.js` with the real bundled runtime.
|
|
39
|
+
* The ABI-independent `launch.sh` is the packaged production launcher;
|
|
40
|
+
* `agent-bundle.js` is produced by `bun run --cwd packages/agent build:mobile`.
|
|
38
41
|
*/
|
|
39
42
|
import { spawn } from "node:child_process";
|
|
43
|
+
import crypto from "node:crypto";
|
|
40
44
|
import fs from "node:fs";
|
|
41
45
|
import os from "node:os";
|
|
42
46
|
import path from "node:path";
|
|
43
47
|
import { fileURLToPath } from "node:url";
|
|
44
48
|
|
|
45
49
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
50
|
+
const APP_CORE_ROOT = path.resolve(__dirname, "..", "..");
|
|
51
|
+
const ELIZA_REPO_ROOT = path.resolve(APP_CORE_ROOT, "..", "..");
|
|
46
52
|
|
|
47
|
-
const BUN_VERSION = "1.3.
|
|
48
|
-
// Bun 1.3.13
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
|
|
53
|
+
const BUN_VERSION = "1.3.14";
|
|
54
|
+
// Bun 1.3.13 had a segfault during inference on Cuttlefish at peak
|
|
55
|
+
// ~2.3 GB RSS ("panic(main thread): Segmentation fault at address 0x5420").
|
|
56
|
+
// 1.3.14 (released 2026-05-13) is the stable release that supersedes the
|
|
57
|
+
// canary stopgap we used while waiting for it. The canary channel remains
|
|
58
|
+
// the default below for AOSP/CVD builds via run-mobile-build; stock APK
|
|
59
|
+
// builds use this stable pin unless explicitly overridden.
|
|
60
|
+
const DEFAULT_BUN_CHANNEL = "canary";
|
|
54
61
|
const ALPINE_BRANCH = "v3.21";
|
|
62
|
+
const RISCV64_BUN_ARTIFACT_FILENAME = "bun-linux-riscv64-musl.zip";
|
|
63
|
+
export const RUNTIME_PROVENANCE_FILENAME =
|
|
64
|
+
"android-agent-runtime-provenance.json";
|
|
55
65
|
|
|
56
66
|
/**
|
|
57
67
|
* Default cache dir for compile-shim.mjs's outputs. Mirrors the default
|
|
58
|
-
* in `scripts/
|
|
59
|
-
* directly instead of importing `compile-shim.mjs` to
|
|
60
|
-
* zig probe + shell-out machinery into the staging
|
|
61
|
-
* runs unconditionally on every gradle build, not
|
|
68
|
+
* in `packages/app-core/scripts/aosp/compile-shim.mjs`. We resolve from
|
|
69
|
+
* `os.homedir()` directly instead of importing `compile-shim.mjs` to
|
|
70
|
+
* avoid pulling the zig probe + shell-out machinery into the staging
|
|
71
|
+
* step (this module runs unconditionally on every gradle build, not
|
|
72
|
+
* just AOSP).
|
|
62
73
|
*/
|
|
63
74
|
const SECCOMP_SHIM_CACHE_DIR = path.join(
|
|
64
75
|
os.homedir(),
|
|
@@ -80,6 +91,24 @@ const ABI_TARGETS = [
|
|
|
80
91
|
alpineArch: "aarch64",
|
|
81
92
|
ldName: "ld-musl-aarch64.so.1",
|
|
82
93
|
},
|
|
94
|
+
{
|
|
95
|
+
// Upstream Bun has no riscv64-linux-musl release as of this writing,
|
|
96
|
+
// so this ABI only succeeds when `ELIZA_BUN_RISCV64_FILE` or
|
|
97
|
+
// `ELIZA_BUN_RISCV64_URL` points at a self-built canary zip produced
|
|
98
|
+
// by `packages/app-core/scripts/bun-riscv64/build.sh`. Objective AOSP
|
|
99
|
+
// builds fail closed by default; local native-library iteration can
|
|
100
|
+
// opt out with ELIZA_BUN_RISCV64_OPTIONAL=1.
|
|
101
|
+
androidAbi: "riscv64",
|
|
102
|
+
bunArch: "riscv64",
|
|
103
|
+
alpineArch: "riscv64",
|
|
104
|
+
ldName: "ld-musl-riscv64.so.1",
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
const NATIVE_LLAMA_ASSET_ENV_KEYS = [
|
|
109
|
+
"ELIZA_ANDROID_AGENT_NATIVE_ASSET_DIR",
|
|
110
|
+
"ELIZA_AOSP_LLAMA_ASSET_DIR",
|
|
111
|
+
"ELIZA_MTP_ANDROID_LIBDIR",
|
|
83
112
|
];
|
|
84
113
|
|
|
85
114
|
const APK_PACKAGES = [
|
|
@@ -88,9 +117,93 @@ const APK_PACKAGES = [
|
|
|
88
117
|
{ pkg: "libgcc", file: "libgcc.apk" },
|
|
89
118
|
];
|
|
90
119
|
|
|
120
|
+
const LLAMA_KERNEL_DIAGNOSTIC_SCRIPT = `#!/usr/bin/env bun
|
|
121
|
+
/**
|
|
122
|
+
* Model-free llama.cpp kernel capability diagnostic for ElizaOS Android.
|
|
123
|
+
*
|
|
124
|
+
* This does not load a model or claim inference throughput. It verifies that
|
|
125
|
+
* the ABI-local llama.cpp payload advertises the kernel families expected by
|
|
126
|
+
* the E1/AOSP path, and optionally checks llama-server --help for CLI surface.
|
|
127
|
+
*/
|
|
128
|
+
import { spawnSync } from "node:child_process";
|
|
129
|
+
import fs from "node:fs";
|
|
130
|
+
import path from "node:path";
|
|
131
|
+
import process from "node:process";
|
|
132
|
+
|
|
133
|
+
const REQUIRED_KERNELS = ["mtp", "turbo3", "turbo4", "turbo3_tcq", "qjl_full", "polarquant"];
|
|
134
|
+
const REQUIRED_HELP_NEEDLES = ["--spec-type", "mtp", "tbq3_0", "tbq4_0", "qjl1_256", "q4_polar"];
|
|
135
|
+
const REQUIRED_FILES = [
|
|
136
|
+
"CAPABILITIES.json",
|
|
137
|
+
"libllama.so",
|
|
138
|
+
"libggml.so",
|
|
139
|
+
"libeliza-llama-shim.so",
|
|
140
|
+
"libeliza-llama-speculative-shim.so",
|
|
141
|
+
"llama-server",
|
|
142
|
+
];
|
|
143
|
+
|
|
144
|
+
function hasKernel(capabilities, name) {
|
|
145
|
+
const kernels = capabilities.kernels ?? capabilities.kernel_features ?? {};
|
|
146
|
+
if (Array.isArray(kernels)) return kernels.includes(name);
|
|
147
|
+
if (typeof kernels === "object" && kernels !== null) {
|
|
148
|
+
const value = kernels[name];
|
|
149
|
+
if (value === true) return true;
|
|
150
|
+
if (typeof value === "object" && value !== null) {
|
|
151
|
+
return value.enabled === true || value.publishable === true;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return capabilities[name] === true;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const abiDir = path.resolve(process.argv[2] ?? process.cwd());
|
|
158
|
+
const staticOnly = process.argv.includes("--static-only");
|
|
159
|
+
const missingFiles = REQUIRED_FILES.filter((name) => !fs.existsSync(path.join(abiDir, name)));
|
|
160
|
+
const capabilitiesPath = path.join(abiDir, "CAPABILITIES.json");
|
|
161
|
+
let capabilities = {};
|
|
162
|
+
if (fs.existsSync(capabilitiesPath)) {
|
|
163
|
+
capabilities = JSON.parse(fs.readFileSync(capabilitiesPath, "utf8"));
|
|
164
|
+
}
|
|
165
|
+
const missingKernels = REQUIRED_KERNELS.filter((name) => !hasKernel(capabilities, name));
|
|
166
|
+
const publishable = capabilities.publishable === true || capabilities.release_status === "publishable";
|
|
167
|
+
|
|
168
|
+
let helpStatus = null;
|
|
169
|
+
let missingHelpNeedles = [];
|
|
170
|
+
if (!staticOnly && fs.existsSync(path.join(abiDir, "llama-server"))) {
|
|
171
|
+
const result = spawnSync(path.join(abiDir, "llama-server"), ["--help"], {
|
|
172
|
+
cwd: abiDir,
|
|
173
|
+
encoding: "utf8",
|
|
174
|
+
});
|
|
175
|
+
const text = (result.stdout ?? "") + "\\n" + (result.stderr ?? "");
|
|
176
|
+
helpStatus = result.status;
|
|
177
|
+
missingHelpNeedles = REQUIRED_HELP_NEEDLES.filter((needle) => !text.includes(needle));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const ok =
|
|
181
|
+
missingFiles.length === 0 &&
|
|
182
|
+
missingKernels.length === 0 &&
|
|
183
|
+
publishable &&
|
|
184
|
+
(staticOnly || (helpStatus === 0 && missingHelpNeedles.length === 0));
|
|
185
|
+
|
|
186
|
+
console.log(JSON.stringify({
|
|
187
|
+
schema: "eliza.android_llama_kernel_diagnostic.v1",
|
|
188
|
+
claim_boundary: "model_free_llama_cpp_kernel_capability_check_only_not_model_inference_or_performance_evidence",
|
|
189
|
+
abi_dir: abiDir,
|
|
190
|
+
ok,
|
|
191
|
+
publishable,
|
|
192
|
+
static_only: staticOnly,
|
|
193
|
+
required_files: REQUIRED_FILES,
|
|
194
|
+
missing_files: missingFiles,
|
|
195
|
+
required_kernels: REQUIRED_KERNELS,
|
|
196
|
+
missing_kernels: missingKernels,
|
|
197
|
+
llama_server_help_status: helpStatus,
|
|
198
|
+
missing_help_needles: missingHelpNeedles,
|
|
199
|
+
}, null, 2));
|
|
200
|
+
process.exit(ok ? 0 : 1);
|
|
201
|
+
`;
|
|
202
|
+
|
|
91
203
|
function jniLoaderName(ldName) {
|
|
92
204
|
if (ldName.includes("aarch64")) return "libeliza_ld_musl_aarch64.so";
|
|
93
205
|
if (ldName.includes("x86_64")) return "libeliza_ld_musl_x86_64.so";
|
|
206
|
+
if (ldName.includes("riscv64")) return "libeliza_ld_musl_riscv64.so";
|
|
94
207
|
return `libeliza_${ldName.replace(/[^a-zA-Z0-9]+/g, "_")}.so`;
|
|
95
208
|
}
|
|
96
209
|
|
|
@@ -103,11 +216,10 @@ function jniRealLoaderName(ldName) {
|
|
|
103
216
|
}
|
|
104
217
|
|
|
105
218
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* shell file can drive both ABIs at runtime.
|
|
219
|
+
* The script ships *inside* the APK and is copied (with executable bit set)
|
|
220
|
+
* into the app data dir by ElizaAgentService at first launch. It accepts the
|
|
221
|
+
* device path, ABI-specific musl loader, and listen port as env vars so a
|
|
222
|
+
* single shell file can drive both ABIs at runtime.
|
|
111
223
|
*/
|
|
112
224
|
const LAUNCH_SCRIPT = `#!/system/bin/sh
|
|
113
225
|
# launch.sh — device-side launcher for the on-device Eliza agent.
|
|
@@ -118,26 +230,46 @@ const LAUNCH_SCRIPT = `#!/system/bin/sh
|
|
|
118
230
|
# it off; without that adb shell / Service.onCreate parents reap it.
|
|
119
231
|
#
|
|
120
232
|
# Required env vars:
|
|
121
|
-
# DEVICE_DIR Absolute path on the device that holds bun + musl
|
|
233
|
+
# DEVICE_DIR Absolute path on the device that holds bun + musl.
|
|
122
234
|
# LD_NAME Per-ABI musl loader filename (ld-musl-{x86_64,aarch64}.so.1).
|
|
123
235
|
# PORT Loopback port for Bun.serve() to bind 127.0.0.1 on.
|
|
124
236
|
#
|
|
125
237
|
# Optional:
|
|
126
|
-
#
|
|
127
|
-
#
|
|
238
|
+
# AGENT_ROOT Directory that holds agent-bundle.js; defaults DEVICE_DIR.
|
|
239
|
+
# RUNTIME_DIR Directory that holds bun + runtime libs; defaults DEVICE_DIR.
|
|
240
|
+
# BUN_PATH Absolute bun executable path; defaults RUNTIME_DIR/bun.
|
|
241
|
+
# LD_PATH Absolute musl-loader path; defaults RUNTIME_DIR/LD_NAME.
|
|
242
|
+
# AGENT_BUNDLE Bundle filename; defaults agent-bundle.js.
|
|
243
|
+
# AGENT_BUNDLE_PATH Absolute bundle path; defaults AGENT_ROOT/AGENT_BUNDLE.
|
|
244
|
+
# AGENT_COMMAND Optional agent CLI command, e.g. android-bridge.
|
|
245
|
+
# LOG_FILE Defaults to agent.log in AGENT_ROOT.
|
|
128
246
|
|
|
129
247
|
DEVICE_DIR=\${DEVICE_DIR:-/data/local/tmp}
|
|
248
|
+
RUNTIME_DIR=\${RUNTIME_DIR:-\${DEVICE_DIR}}
|
|
249
|
+
AGENT_ROOT=\${AGENT_ROOT:-\${DEVICE_DIR}}
|
|
130
250
|
LD_NAME=\${LD_NAME:-ld-musl-x86_64.so.1}
|
|
131
251
|
PORT=\${PORT:-31337}
|
|
132
252
|
AGENT_BUNDLE=\${AGENT_BUNDLE:-agent-bundle.js}
|
|
133
|
-
|
|
253
|
+
BUN_PATH=\${BUN_PATH:-\${RUNTIME_DIR}/bun}
|
|
254
|
+
LD_PATH=\${LD_PATH:-\${RUNTIME_DIR}/\${LD_NAME}}
|
|
255
|
+
AGENT_BUNDLE_PATH=\${AGENT_BUNDLE_PATH:-\${AGENT_ROOT}/\${AGENT_BUNDLE}}
|
|
256
|
+
AGENT_COMMAND=\${AGENT_COMMAND:-}
|
|
257
|
+
LOG_FILE=\${LOG_FILE:-\${AGENT_ROOT}/agent.log}
|
|
258
|
+
RUNTIME_LD_LIBRARY_PATH=\${LD_LIBRARY_PATH:-\${RUNTIME_DIR}}
|
|
134
259
|
|
|
135
|
-
cd "$
|
|
136
|
-
pkill -f "\${
|
|
260
|
+
cd "$AGENT_ROOT" || exit 1
|
|
261
|
+
pkill -f "\${BUN_PATH}" 2>/dev/null
|
|
262
|
+
pkill -f "\${AGENT_BUNDLE_PATH}" 2>/dev/null
|
|
137
263
|
sleep 1
|
|
138
264
|
|
|
265
|
+
if [ -n "\${AGENT_COMMAND}" ]; then
|
|
266
|
+
set -- "\${LD_PATH}" "\${BUN_PATH}" "\${AGENT_BUNDLE_PATH}" "\${AGENT_COMMAND}"
|
|
267
|
+
else
|
|
268
|
+
set -- "\${LD_PATH}" "\${BUN_PATH}" "\${AGENT_BUNDLE_PATH}"
|
|
269
|
+
fi
|
|
270
|
+
|
|
139
271
|
(
|
|
140
|
-
setsid sh -c
|
|
272
|
+
setsid sh -c 'log_file=$1; agent_root=$2; runtime_ld=$3; port=$4; shift 4; exec </dev/null >"$log_file" 2>&1; cd "$agent_root" || exit 1; LD_LIBRARY_PATH="$runtime_ld" PORT="$port" exec "$@"' sh "\${LOG_FILE}" "\${AGENT_ROOT}" "\${RUNTIME_LD_LIBRARY_PATH}" "\${PORT}" "$@" &
|
|
141
273
|
) &
|
|
142
274
|
disown 2>/dev/null || true
|
|
143
275
|
exit 0
|
|
@@ -182,33 +314,273 @@ async function downloadFile(url, targetPath) {
|
|
|
182
314
|
fs.writeFileSync(targetPath, buf);
|
|
183
315
|
}
|
|
184
316
|
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
317
|
+
function normalizeSha256(value, envName) {
|
|
318
|
+
const sha256 = value?.trim().toLowerCase();
|
|
319
|
+
if (!sha256) return null;
|
|
320
|
+
if (!/^[a-f0-9]{64}$/.test(sha256)) {
|
|
321
|
+
throw new Error(
|
|
322
|
+
`${envName} must be a lowercase or uppercase 64-character SHA-256 hex digest.`,
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
return sha256;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
function firstEnvValue(names) {
|
|
329
|
+
for (const name of names) {
|
|
330
|
+
const value = process.env[name]?.trim();
|
|
331
|
+
if (value) return { name, value };
|
|
332
|
+
}
|
|
333
|
+
return null;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
function riscv64BunSha256() {
|
|
337
|
+
const configured = firstEnvValue(["ELIZA_BUN_RISCV64_SHA256"]);
|
|
338
|
+
return normalizeSha256(
|
|
339
|
+
configured?.value,
|
|
340
|
+
configured?.name ?? "ELIZA_BUN_RISCV64_SHA256",
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
function defaultRiscv64BunArtifactPath() {
|
|
345
|
+
return path.resolve(
|
|
346
|
+
__dirname,
|
|
347
|
+
"..",
|
|
348
|
+
"bun-riscv64",
|
|
349
|
+
"dist",
|
|
350
|
+
RISCV64_BUN_ARTIFACT_FILENAME,
|
|
351
|
+
);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
function riscv64BunFilePath() {
|
|
355
|
+
const configured = firstEnvValue(["ELIZA_BUN_RISCV64_FILE"]);
|
|
356
|
+
if (configured) return path.resolve(configured.value);
|
|
357
|
+
const defaultPath = defaultRiscv64BunArtifactPath();
|
|
358
|
+
return fs.existsSync(defaultPath) ? defaultPath : null;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
function riscv64BunUrl() {
|
|
362
|
+
return firstEnvValue(["ELIZA_BUN_RISCV64_URL"])?.value ?? null;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
function riscv64BunArtifactSource() {
|
|
366
|
+
const filePath = riscv64BunFilePath();
|
|
367
|
+
if (filePath) return { kind: "file", ...provenancePath(filePath) };
|
|
368
|
+
const url = riscv64BunUrl();
|
|
369
|
+
if (url) return { kind: "url", url };
|
|
370
|
+
return null;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function sha256File(filePath) {
|
|
374
|
+
const hash = crypto.createHash("sha256");
|
|
375
|
+
hash.update(fs.readFileSync(filePath));
|
|
376
|
+
return hash.digest("hex");
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
function toPosixPath(value) {
|
|
380
|
+
return value.replace(/\\/g, "/");
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
function pathWithin(root, filePath) {
|
|
384
|
+
const relative = path.relative(root, filePath);
|
|
385
|
+
return relative && !relative.startsWith("..") && !path.isAbsolute(relative)
|
|
386
|
+
? toPosixPath(relative)
|
|
387
|
+
: null;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function provenancePath(filePath) {
|
|
391
|
+
const absolute = path.resolve(filePath);
|
|
392
|
+
const repoRelative = pathWithin(ELIZA_REPO_ROOT, absolute);
|
|
393
|
+
if (repoRelative) {
|
|
394
|
+
return {
|
|
395
|
+
path: repoRelative,
|
|
396
|
+
path_provenance: "relative_to_git_checkout",
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
const appCoreRelative = pathWithin(APP_CORE_ROOT, absolute);
|
|
400
|
+
if (appCoreRelative) {
|
|
401
|
+
return {
|
|
402
|
+
path: appCoreRelative,
|
|
403
|
+
path_provenance: "relative_to_app_core",
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
return {
|
|
407
|
+
path: path.basename(absolute),
|
|
408
|
+
path_provenance: "external_artifact_basename",
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
function normalizeSourceForProvenance(value) {
|
|
413
|
+
if (Array.isArray(value)) return value.map(normalizeSourceForProvenance);
|
|
414
|
+
if (!value || typeof value !== "object") return value;
|
|
415
|
+
const normalized = {};
|
|
416
|
+
for (const [key, child] of Object.entries(value)) {
|
|
417
|
+
if (
|
|
418
|
+
typeof child === "string" &&
|
|
419
|
+
path.isAbsolute(child) &&
|
|
420
|
+
(key === "path" || key.endsWith("_path"))
|
|
421
|
+
) {
|
|
422
|
+
Object.assign(normalized, provenancePath(child));
|
|
423
|
+
} else if (
|
|
424
|
+
typeof child === "string" &&
|
|
425
|
+
path.isAbsolute(child) &&
|
|
426
|
+
(key === "cache_dir" || key.endsWith("_dir"))
|
|
427
|
+
) {
|
|
428
|
+
normalized[key] = path.basename(child);
|
|
429
|
+
normalized[`${key}_provenance`] = "external_cache_dir_basename";
|
|
430
|
+
} else {
|
|
431
|
+
normalized[key] = normalizeSourceForProvenance(child);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
return normalized;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
function readJsonIfExists(filePath) {
|
|
438
|
+
if (!fs.existsSync(filePath)) return null;
|
|
439
|
+
return JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
function fileProvenanceEntry({ filePath, relativePath, source }) {
|
|
443
|
+
const stat = fs.statSync(filePath);
|
|
444
|
+
return {
|
|
445
|
+
path: androidApkEntryPath(relativePath),
|
|
446
|
+
size_bytes: stat.size,
|
|
447
|
+
sha256: sha256File(filePath),
|
|
448
|
+
source: normalizeSourceForProvenance(source),
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
function androidApkEntryPath(relativePath) {
|
|
453
|
+
const entryPath = toPosixPath(relativePath);
|
|
454
|
+
return entryPath.replace(/^jniLibs\//, "lib/");
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
function normalizeBunChannel(value) {
|
|
458
|
+
const channel = String(value ?? DEFAULT_BUN_CHANNEL)
|
|
459
|
+
.trim()
|
|
460
|
+
.toLowerCase();
|
|
461
|
+
if (channel === "stable" || channel === "release") return "stable";
|
|
462
|
+
if (channel === "canary") return "canary";
|
|
463
|
+
throw new Error(
|
|
464
|
+
`Unsupported ELIZA_BUN_CHANNEL=${JSON.stringify(value)}. ` +
|
|
465
|
+
"Expected stable or canary.",
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
function resolveBunChannel(preferredChannel) {
|
|
470
|
+
return normalizeBunChannel(
|
|
471
|
+
process.env.ELIZA_BUN_CHANNEL ?? preferredChannel ?? DEFAULT_BUN_CHANNEL,
|
|
472
|
+
);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
function bunCacheKey(channel) {
|
|
476
|
+
return channel === "canary" ? "canary" : BUN_VERSION;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
function bunChannelLabel(channel) {
|
|
480
|
+
return channel === "canary" ? "bun-canary" : `bun-${BUN_VERSION}`;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
function defaultBunCacheDir(channel) {
|
|
484
|
+
return path.join(
|
|
485
|
+
os.homedir(),
|
|
486
|
+
".cache",
|
|
487
|
+
"eliza-android-agent",
|
|
488
|
+
`bun-${bunCacheKey(channel)}`,
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
async function ensureBunBinary({ cacheDir, bunArch, bunChannel, log }) {
|
|
493
|
+
const channelTag = bunChannel === "canary" ? "canary" : `bun-v${BUN_VERSION}`;
|
|
494
|
+
const cacheKey = bunCacheKey(bunChannel);
|
|
189
495
|
const archCache = path.join(cacheDir, `bun-${bunArch}-${cacheKey}`);
|
|
190
496
|
const bunPath = path.join(archCache, "bun");
|
|
497
|
+
const sourceSha256Path = path.join(archCache, ".source.sha256");
|
|
498
|
+
const expectedRiscv64Sha256 =
|
|
499
|
+
bunArch === "riscv64" ? riscv64BunSha256() : null;
|
|
191
500
|
// Canary cache invalidates after 24h so we pull bug-fix snapshots
|
|
192
501
|
// automatically without forcing every CI run to re-download.
|
|
193
502
|
const isFresh = (() => {
|
|
194
503
|
if (!fs.existsSync(bunPath)) return false;
|
|
195
504
|
const st = fs.statSync(bunPath);
|
|
196
505
|
if (st.size <= 1_000_000) return false;
|
|
197
|
-
if (
|
|
506
|
+
if (bunArch === "riscv64") {
|
|
507
|
+
if (!expectedRiscv64Sha256) return false;
|
|
508
|
+
if (!fs.existsSync(sourceSha256Path)) return false;
|
|
509
|
+
const cachedSha256 = fs
|
|
510
|
+
.readFileSync(sourceSha256Path, "utf8")
|
|
511
|
+
.trim()
|
|
512
|
+
.toLowerCase();
|
|
513
|
+
if (cachedSha256 !== expectedRiscv64Sha256) return false;
|
|
514
|
+
}
|
|
515
|
+
if (bunChannel !== "canary") return true;
|
|
198
516
|
const ageMs = Date.now() - st.mtimeMs;
|
|
199
517
|
return ageMs < 24 * 60 * 60 * 1000;
|
|
200
518
|
})();
|
|
201
|
-
if (isFresh)
|
|
519
|
+
if (isFresh) {
|
|
520
|
+
return {
|
|
521
|
+
bunPath,
|
|
522
|
+
source: {
|
|
523
|
+
kind: "cache",
|
|
524
|
+
cache_key: path.basename(archCache),
|
|
525
|
+
artifact_sha256: expectedRiscv64Sha256,
|
|
526
|
+
},
|
|
527
|
+
};
|
|
528
|
+
}
|
|
202
529
|
fs.mkdirSync(archCache, { recursive: true });
|
|
203
530
|
const zipPath = path.join(archCache, "bun.zip");
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
531
|
+
// riscv64 has no upstream Bun release. Allow operators to point at a
|
|
532
|
+
// self-built canary artifact via a local file or URL; otherwise refuse to
|
|
533
|
+
// download from a guessed URL and surface a clear pointer at the cross-build
|
|
534
|
+
// pipeline. We never invent a default URL.
|
|
535
|
+
let url;
|
|
536
|
+
let sourceFile;
|
|
537
|
+
if (bunArch === "riscv64") {
|
|
538
|
+
sourceFile = riscv64BunFilePath();
|
|
539
|
+
url = riscv64BunUrl();
|
|
540
|
+
if (!sourceFile && !url) {
|
|
541
|
+
throw new Error(
|
|
542
|
+
"Bun riscv64 artifact not available: upstream Bun has no riscv64-linux-musl release. " +
|
|
543
|
+
"Set ELIZA_BUN_RISCV64_FILE to a local " +
|
|
544
|
+
"self-built zip, or set ELIZA_BUN_RISCV64_URL " +
|
|
545
|
+
"to a hosted zip produced by packages/app-core/scripts/bun-riscv64/build.sh, " +
|
|
546
|
+
"or set ELIZA_BUN_RISCV64_OPTIONAL=1 for local non-objective builds.",
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
if (!expectedRiscv64Sha256) {
|
|
550
|
+
throw new Error(
|
|
551
|
+
"Bun riscv64 artifact hash is required: set ELIZA_BUN_RISCV64_SHA256 " +
|
|
552
|
+
"to the SHA-256 of bun-linux-riscv64-musl.zip.",
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
} else {
|
|
556
|
+
url =
|
|
557
|
+
bunChannel === "canary"
|
|
558
|
+
? `https://github.com/oven-sh/bun/releases/download/canary/bun-linux-${bunArch}-musl.zip`
|
|
559
|
+
: `https://github.com/oven-sh/bun/releases/download/${channelTag}/bun-linux-${bunArch}-musl.zip`;
|
|
560
|
+
}
|
|
561
|
+
const channelLabel = bunChannelLabel(bunChannel);
|
|
562
|
+
if (sourceFile) {
|
|
563
|
+
if (!fs.existsSync(sourceFile)) {
|
|
564
|
+
throw new Error(`Bun riscv64 artifact file not found: ${sourceFile}`);
|
|
565
|
+
}
|
|
566
|
+
log(
|
|
567
|
+
`Using local ${channelLabel} (${bunArch}-musl) artifact at ${sourceFile}`,
|
|
568
|
+
);
|
|
569
|
+
fs.copyFileSync(sourceFile, zipPath);
|
|
570
|
+
} else {
|
|
571
|
+
log(`Downloading ${channelLabel} (${bunArch}-musl) from ${url}`);
|
|
572
|
+
await downloadFile(url, zipPath);
|
|
573
|
+
}
|
|
574
|
+
if (expectedRiscv64Sha256) {
|
|
575
|
+
const actualSha256 = sha256File(zipPath);
|
|
576
|
+
if (actualSha256 !== expectedRiscv64Sha256) {
|
|
577
|
+
fs.rmSync(zipPath, { force: true });
|
|
578
|
+
throw new Error(
|
|
579
|
+
`bun-linux-riscv64-musl.zip SHA-256 mismatch: expected ` +
|
|
580
|
+
`${expectedRiscv64Sha256}, got ${actualSha256}`,
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
}
|
|
212
584
|
await run("unzip", ["-q", "-o", zipPath, "-d", archCache]);
|
|
213
585
|
const extractedDir = path.join(archCache, `bun-linux-${bunArch}-musl`);
|
|
214
586
|
const extractedBun = path.join(extractedDir, "bun");
|
|
@@ -220,7 +592,22 @@ async function ensureBunBinary({ cacheDir, bunArch, log }) {
|
|
|
220
592
|
fs.rmSync(extractedDir, { recursive: true, force: true });
|
|
221
593
|
fs.rmSync(zipPath, { force: true });
|
|
222
594
|
fs.chmodSync(bunPath, 0o755);
|
|
223
|
-
|
|
595
|
+
if (expectedRiscv64Sha256) {
|
|
596
|
+
fs.writeFileSync(sourceSha256Path, `${expectedRiscv64Sha256}\n`, "utf8");
|
|
597
|
+
}
|
|
598
|
+
return {
|
|
599
|
+
bunPath,
|
|
600
|
+
source: {
|
|
601
|
+
kind: sourceFile ? "file" : "url",
|
|
602
|
+
...(sourceFile ? provenancePath(sourceFile) : {}),
|
|
603
|
+
url: sourceFile ? null : url,
|
|
604
|
+
artifact_filename:
|
|
605
|
+
bunArch === "riscv64"
|
|
606
|
+
? RISCV64_BUN_ARTIFACT_FILENAME
|
|
607
|
+
: path.basename(url),
|
|
608
|
+
artifact_sha256: expectedRiscv64Sha256,
|
|
609
|
+
},
|
|
610
|
+
};
|
|
224
611
|
}
|
|
225
612
|
|
|
226
613
|
/**
|
|
@@ -304,12 +691,124 @@ function copyIfDifferent(source, target) {
|
|
|
304
691
|
if (fs.existsSync(target)) {
|
|
305
692
|
const a = fs.statSync(source);
|
|
306
693
|
const b = fs.statSync(target);
|
|
307
|
-
if (a.size === b.size
|
|
694
|
+
if (a.size === b.size) {
|
|
695
|
+
const sameBytes = fs.readFileSync(source).equals(fs.readFileSync(target));
|
|
696
|
+
if (sameBytes) return false;
|
|
697
|
+
}
|
|
308
698
|
}
|
|
309
699
|
fs.copyFileSync(source, target);
|
|
310
700
|
return true;
|
|
311
701
|
}
|
|
312
702
|
|
|
703
|
+
function resolveNativeLlamaAssetDir(androidAbi) {
|
|
704
|
+
// Look up an env-var-supplied prebuilt native llama asset dir for this
|
|
705
|
+
// ABI. Each env var may be either:
|
|
706
|
+
// - a single absolute dir (legacy arm64-only contract — the prebuilt
|
|
707
|
+
// lives directly inside; only honoured when androidAbi is arm64-v8a),
|
|
708
|
+
// - a per-ABI suffixed variant `<KEY>_<ABI>` where ABI is the upper-
|
|
709
|
+
// snake-cased androidAbi (e.g. ELIZA_AOSP_LLAMA_ASSET_DIR_ARM64_V8A,
|
|
710
|
+
// _X86_64, _RISCV64),
|
|
711
|
+
// - or a base dir that contains per-ABI subdirectories named after the
|
|
712
|
+
// androidAbi (e.g. `<dir>/arm64-v8a/`, `<dir>/x86_64/`, `<dir>/riscv64/`).
|
|
713
|
+
// The first env key that resolves to a real dir for this ABI wins. We
|
|
714
|
+
// never fall back across ABIs (an arm64 prebuilt is not valid for x86_64
|
|
715
|
+
// or riscv64).
|
|
716
|
+
const abiSuffix = androidAbi.replace(/-/g, "_").toUpperCase();
|
|
717
|
+
for (const key of NATIVE_LLAMA_ASSET_ENV_KEYS) {
|
|
718
|
+
// 1. Per-ABI env var wins outright.
|
|
719
|
+
const perAbiRaw = process.env[`${key}_${abiSuffix}`]?.trim();
|
|
720
|
+
if (perAbiRaw) {
|
|
721
|
+
const resolved = path.resolve(perAbiRaw);
|
|
722
|
+
if (fs.existsSync(resolved) && fs.statSync(resolved).isDirectory()) {
|
|
723
|
+
return { dir: resolved, key: `${key}_${abiSuffix}` };
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
const raw = process.env[key]?.trim();
|
|
727
|
+
if (!raw) continue;
|
|
728
|
+
const baseResolved = path.resolve(raw);
|
|
729
|
+
if (!fs.existsSync(baseResolved)) continue;
|
|
730
|
+
if (!fs.statSync(baseResolved).isDirectory()) continue;
|
|
731
|
+
// 2. Base dir containing per-ABI subdirs.
|
|
732
|
+
const perAbiSubdir = path.join(baseResolved, androidAbi);
|
|
733
|
+
if (
|
|
734
|
+
fs.existsSync(perAbiSubdir) &&
|
|
735
|
+
fs.statSync(perAbiSubdir).isDirectory()
|
|
736
|
+
) {
|
|
737
|
+
return { dir: perAbiSubdir, key: `${key}/${androidAbi}` };
|
|
738
|
+
}
|
|
739
|
+
// 3. Legacy: the env var points directly at the prebuilt dir; honour
|
|
740
|
+
// it only for arm64-v8a since that's the only ABI the legacy
|
|
741
|
+
// contract ever shipped a prebuilt for.
|
|
742
|
+
if (androidAbi === "arm64-v8a") {
|
|
743
|
+
return { dir: baseResolved, key };
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
return null;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
function shouldStageNativeLlamaAsset(name) {
|
|
750
|
+
return (
|
|
751
|
+
/^lib(?:llama|llama-common|ggml|mtmd|eliza-llama|elizainference).*(?:\.so|\.so\.\d.*)$/.test(
|
|
752
|
+
name,
|
|
753
|
+
) ||
|
|
754
|
+
/^libomnivoice(?:\.so|\.so\.\d.*)$/.test(name) ||
|
|
755
|
+
name === "llama-server" ||
|
|
756
|
+
name === "llama-omnivoice-server" ||
|
|
757
|
+
name === "CAPABILITIES.json" ||
|
|
758
|
+
name === "OMNIVOICE_FUSE_VERIFY.json"
|
|
759
|
+
);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
function stageNativeLlamaAssetsForAbi({ androidAbi, abiAssetsDir, log }) {
|
|
763
|
+
const source = resolveNativeLlamaAssetDir(androidAbi);
|
|
764
|
+
if (!source) return 0;
|
|
765
|
+
|
|
766
|
+
let changes = 0;
|
|
767
|
+
let copied = 0;
|
|
768
|
+
for (const entry of fs.readdirSync(source.dir, { withFileTypes: true })) {
|
|
769
|
+
if (!entry.isFile() || !shouldStageNativeLlamaAsset(entry.name)) continue;
|
|
770
|
+
const src = path.join(source.dir, entry.name);
|
|
771
|
+
const dst = path.join(abiAssetsDir, entry.name);
|
|
772
|
+
if (copyIfDifferent(src, dst)) changes += 1;
|
|
773
|
+
if (
|
|
774
|
+
entry.name === "llama-server" ||
|
|
775
|
+
entry.name === "llama-omnivoice-server"
|
|
776
|
+
) {
|
|
777
|
+
fs.chmodSync(dst, fs.statSync(dst).mode | 0o755);
|
|
778
|
+
}
|
|
779
|
+
copied += 1;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
// The fused libelizainference.so is the activation lib (ElizaAgentService
|
|
783
|
+
// gates ELIZA_LOCAL_LLAMA on it). As of the static-fuse build recipe
|
|
784
|
+
// (BUILD_SHARED_LIBS=OFF + CMAKE_POSITION_INDEPENDENT_CODE=ON in
|
|
785
|
+
// build-helpers/omnivoice-merged.mjs fusedExtraCmakeFlags + the bionic JNI
|
|
786
|
+
// builder) it is SELF-CONTAINED: llama/ggml/mtmd are folded in as static
|
|
787
|
+
// archives, so its only DT_NEEDED entries are libc/libm/libdl — there is no
|
|
788
|
+
// runtime libllama.so / libggml*.so sibling to resolve via LD_LIBRARY_PATH.
|
|
789
|
+
// So only libelizainference.so is required. A non-fused bulk build may still
|
|
790
|
+
// emit libllama.so + the libggml* family as a byproduct; if present they
|
|
791
|
+
// stage harmlessly via shouldStageNativeLlamaAsset() above, but they are no
|
|
792
|
+
// longer a hard requirement for the fused activation path. The
|
|
793
|
+
// eliza-llama-shim was retired with the libllama TS adapter.
|
|
794
|
+
const required = ["libelizainference.so"];
|
|
795
|
+
const missing = required.filter(
|
|
796
|
+
(name) => !fs.existsSync(path.join(abiAssetsDir, name)),
|
|
797
|
+
);
|
|
798
|
+
if (missing.length > 0) {
|
|
799
|
+
log(
|
|
800
|
+
`Native llama asset dir from ${source.key} did not provide ${missing.join(", ")}; ` +
|
|
801
|
+
`ELIZA_LOCAL_LLAMA will remain disabled for ${androidAbi}.`,
|
|
802
|
+
);
|
|
803
|
+
} else {
|
|
804
|
+
log(
|
|
805
|
+
`Staged ${copied} native llama asset file(s) for ${androidAbi} from ${source.key}` +
|
|
806
|
+
(changes > 0 ? ` (${changes} updated)` : " (already current)"),
|
|
807
|
+
);
|
|
808
|
+
}
|
|
809
|
+
return changes;
|
|
810
|
+
}
|
|
811
|
+
|
|
313
812
|
function writeIfChanged(target, content) {
|
|
314
813
|
if (fs.existsSync(target)) {
|
|
315
814
|
const current = fs.readFileSync(target, "utf8");
|
|
@@ -331,8 +830,8 @@ function writeIfChanged(target, content) {
|
|
|
331
830
|
* - Drop `libsigsys-handler.so` next to it.
|
|
332
831
|
*
|
|
333
832
|
* Returns the number of files changed this call (0 when nothing
|
|
334
|
-
* happened). When no compiled shim exists for the ABI
|
|
335
|
-
*
|
|
833
|
+
* happened). When no compiled shim exists for the ABI this returns 0 and
|
|
834
|
+
* the Capacitor APK build path keeps the legacy loader.
|
|
336
835
|
*
|
|
337
836
|
* Exported for testing.
|
|
338
837
|
*/
|
|
@@ -343,17 +842,14 @@ export function stageSeccompShimForAbi({
|
|
|
343
842
|
cacheDir = SECCOMP_SHIM_CACHE_DIR,
|
|
344
843
|
log,
|
|
345
844
|
}) {
|
|
346
|
-
// ARM64 short-circuits: compile-shim never builds for that ABI.
|
|
347
|
-
if (androidAbi !== "x86_64") return 0;
|
|
348
|
-
|
|
349
845
|
const abiCacheDir = path.join(cacheDir, androidAbi);
|
|
350
846
|
const cachedWrap = path.join(abiCacheDir, ldName);
|
|
351
847
|
const cachedShim = path.join(abiCacheDir, "libsigsys-handler.so");
|
|
352
848
|
if (!fs.existsSync(cachedWrap) || !fs.existsSync(cachedShim)) {
|
|
353
849
|
log?.(
|
|
354
850
|
`No compiled SIGSYS shim for ${androidAbi}; leaving the Alpine ` +
|
|
355
|
-
`loader at ${ldName} (run \`node scripts/
|
|
356
|
-
`the AOSP path).`,
|
|
851
|
+
`loader at ${ldName} (run \`node packages/app-core/scripts/aosp/compile-shim.mjs\` ` +
|
|
852
|
+
`for the AOSP path).`,
|
|
357
853
|
);
|
|
358
854
|
return 0;
|
|
359
855
|
}
|
|
@@ -416,23 +912,20 @@ export function stageSeccompShimForAbi({
|
|
|
416
912
|
*
|
|
417
913
|
* Required:
|
|
418
914
|
* androidDir Absolute path to packages/app/android/.
|
|
419
|
-
* spikeDir Absolute path to
|
|
420
|
-
*
|
|
421
|
-
*
|
|
915
|
+
* spikeDir Absolute path to the Android-agent script directory. Kept
|
|
916
|
+
* for legacy workspace-root resolution; it is not used as a
|
|
917
|
+
* bundle fallback.
|
|
422
918
|
*
|
|
423
919
|
* Optional:
|
|
424
920
|
* cacheDir Defaults to ~/.cache/eliza-android-agent/<bun-version>/.
|
|
921
|
+
* bunChannel stable | canary. ELIZA_BUN_CHANNEL overrides this option.
|
|
425
922
|
* log Defaults to console.log.
|
|
426
923
|
*/
|
|
427
924
|
export async function stageAndroidAgentRuntime({
|
|
428
925
|
androidDir,
|
|
429
926
|
spikeDir,
|
|
430
|
-
cacheDir
|
|
431
|
-
|
|
432
|
-
".cache",
|
|
433
|
-
"eliza-android-agent",
|
|
434
|
-
`bun-${BUN_CHANNEL === "canary" ? "canary" : BUN_VERSION}`,
|
|
435
|
-
),
|
|
927
|
+
cacheDir,
|
|
928
|
+
bunChannel: preferredBunChannel,
|
|
436
929
|
log = console.log,
|
|
437
930
|
} = {}) {
|
|
438
931
|
if (!androidDir)
|
|
@@ -441,7 +934,10 @@ export async function stageAndroidAgentRuntime({
|
|
|
441
934
|
throw new Error("stageAndroidAgentRuntime: spikeDir is required");
|
|
442
935
|
|
|
443
936
|
const tlog = logFor(log);
|
|
444
|
-
|
|
937
|
+
const bunChannel = resolveBunChannel(preferredBunChannel);
|
|
938
|
+
const resolvedCacheDir = cacheDir ?? defaultBunCacheDir(bunChannel);
|
|
939
|
+
tlog(`Staging Android agent runtime with ${bunChannelLabel(bunChannel)}.`);
|
|
940
|
+
fs.mkdirSync(resolvedCacheDir, { recursive: true });
|
|
445
941
|
|
|
446
942
|
// Runtime files ship under `assets/agent/{abi}/` for AOSP builds that can
|
|
447
943
|
// execute from priv-app data, and under `jniLibs/{abi}/libeliza_*.so` for
|
|
@@ -461,17 +957,49 @@ export async function stageAndroidAgentRuntime({
|
|
|
461
957
|
fs.mkdirSync(jniLibsDir, { recursive: true });
|
|
462
958
|
|
|
463
959
|
let stagedCount = 0;
|
|
960
|
+
const stagedFiles = [];
|
|
961
|
+
const riscv64Artifact = {
|
|
962
|
+
required: true,
|
|
963
|
+
filename: RISCV64_BUN_ARTIFACT_FILENAME,
|
|
964
|
+
sha256: riscv64BunSha256(),
|
|
965
|
+
source: riscv64BunArtifactSource(),
|
|
966
|
+
};
|
|
464
967
|
|
|
465
968
|
for (const target of ABI_TARGETS) {
|
|
466
969
|
const { androidAbi, bunArch, alpineArch, ldName } = target;
|
|
970
|
+
// Objective builds fail closed on riscv64. Upstream Bun has no
|
|
971
|
+
// riscv64-linux-musl release, so provide ELIZA_BUN_RISCV64_FILE or
|
|
972
|
+
// ELIZA_BUN_RISCV64_URL from packages/app-core/scripts/bun-riscv64/build.sh.
|
|
973
|
+
// Local native-library iteration may opt out with
|
|
974
|
+
// ELIZA_BUN_RISCV64_OPTIONAL=1, but that build is not valid AOSP/chip
|
|
975
|
+
// objective evidence.
|
|
976
|
+
if (bunArch === "riscv64") {
|
|
977
|
+
const riscvFile = riscv64BunFilePath();
|
|
978
|
+
const riscvUrl = riscv64BunUrl();
|
|
979
|
+
const optional = process.env.ELIZA_BUN_RISCV64_OPTIONAL === "1";
|
|
980
|
+
if (!riscvFile && !riscvUrl && optional) {
|
|
981
|
+
tlog(
|
|
982
|
+
`Skipping optional ABI ${androidAbi}: no ELIZA_BUN_RISCV64_FILE or URL is set ` +
|
|
983
|
+
`(upstream Bun has no riscv64-linux-musl release). Build with ` +
|
|
984
|
+
`packages/app-core/scripts/bun-riscv64/build.sh and re-run for AOSP/chip evidence.`,
|
|
985
|
+
);
|
|
986
|
+
continue;
|
|
987
|
+
}
|
|
988
|
+
}
|
|
467
989
|
const abiAssetsDir = path.join(assetsAgentDir, androidAbi);
|
|
468
990
|
const abiJniDir = path.join(jniLibsDir, androidAbi);
|
|
469
991
|
fs.mkdirSync(abiAssetsDir, { recursive: true });
|
|
470
992
|
fs.mkdirSync(abiJniDir, { recursive: true });
|
|
471
993
|
|
|
472
|
-
const
|
|
994
|
+
const bun = await ensureBunBinary({
|
|
995
|
+
cacheDir: resolvedCacheDir,
|
|
996
|
+
bunArch,
|
|
997
|
+
bunChannel,
|
|
998
|
+
log: tlog,
|
|
999
|
+
});
|
|
1000
|
+
const bunPath = bun.bunPath;
|
|
473
1001
|
const extractDir = await ensureAlpineApkExtracted({
|
|
474
|
-
cacheDir,
|
|
1002
|
+
cacheDir: resolvedCacheDir,
|
|
475
1003
|
alpineArch,
|
|
476
1004
|
log: tlog,
|
|
477
1005
|
});
|
|
@@ -496,11 +1024,17 @@ export async function stageAndroidAgentRuntime({
|
|
|
496
1024
|
if (copyIfDifferent(src, dst)) abiChanges += 1;
|
|
497
1025
|
}
|
|
498
1026
|
|
|
1027
|
+
abiChanges += stageNativeLlamaAssetsForAbi({
|
|
1028
|
+
androidAbi,
|
|
1029
|
+
abiAssetsDir,
|
|
1030
|
+
log: tlog,
|
|
1031
|
+
});
|
|
1032
|
+
|
|
499
1033
|
// llama-server is produced by compile-libllama.mjs (per-ABI). It already
|
|
500
1034
|
// lands at <abiAssetsDir>/llama-server when that script ran successfully,
|
|
501
1035
|
// so we don't re-copy here — but we do ensure the bit is +x because some
|
|
502
1036
|
// file-copy paths (e.g. zip → unzip on Windows builders) lose the
|
|
503
|
-
// executable bit. The aosp-llama-adapter spawns it for
|
|
1037
|
+
// executable bit. The aosp-llama-adapter spawns it for MTP decode;
|
|
504
1038
|
// without +x exec fails with EACCES at runtime.
|
|
505
1039
|
const llamaServerStaged = path.join(abiAssetsDir, "llama-server");
|
|
506
1040
|
if (fs.existsSync(llamaServerStaged)) {
|
|
@@ -512,16 +1046,16 @@ export async function stageAndroidAgentRuntime({
|
|
|
512
1046
|
}
|
|
513
1047
|
} else {
|
|
514
1048
|
tlog(
|
|
515
|
-
`No llama-server staged for ${androidAbi};
|
|
1049
|
+
`No llama-server staged for ${androidAbi}; MTP spec-decode on AOSP ` +
|
|
516
1050
|
`will fall back to single-model decode. Run \`node ` +
|
|
517
1051
|
`packages/app-core/scripts/aosp/compile-libllama.mjs\` to build it.`,
|
|
518
1052
|
);
|
|
519
1053
|
}
|
|
520
1054
|
|
|
521
|
-
// Per-ABI seccomp shim install.
|
|
522
|
-
//
|
|
523
|
-
//
|
|
524
|
-
// the artifacts exist:
|
|
1055
|
+
// Per-ABI seccomp shim install. Both x86_64 (legacy non-AT syscalls)
|
|
1056
|
+
// and arm64-v8a (the new-syscall case — bun's `epoll_pwait2` blocked
|
|
1057
|
+
// by Android's `untrusted_app` filter) have compiled shim artifacts.
|
|
1058
|
+
// When the artifacts exist:
|
|
525
1059
|
// 1. Stage `libsigsys-handler.so` next to bun.
|
|
526
1060
|
// 2. Rename the Alpine-extracted ld-musl-*.so.1 → .so.1.real.
|
|
527
1061
|
// 3. Stage our `loader-wrap` ELF as ld-musl-*.so.1.
|
|
@@ -531,8 +1065,8 @@ export async function stageAndroidAgentRuntime({
|
|
|
531
1065
|
//
|
|
532
1066
|
// Idempotent: if the wrapper is already in place we just refresh
|
|
533
1067
|
// the .real loader and the shim file (handled by copyIfDifferent's
|
|
534
|
-
// size+mtime check). If shim artifacts are missing we leave the
|
|
535
|
-
//
|
|
1068
|
+
// size+mtime check). If shim artifacts are missing we leave the packaged
|
|
1069
|
+
// musl loader in place so the Capacitor APK build still works.
|
|
536
1070
|
const shimChanges = stageSeccompShimForAbi({
|
|
537
1071
|
androidAbi,
|
|
538
1072
|
ldName,
|
|
@@ -583,6 +1117,27 @@ export async function stageAndroidAgentRuntime({
|
|
|
583
1117
|
if (copyIfDifferent(src, dst)) abiChanges += 1;
|
|
584
1118
|
}
|
|
585
1119
|
|
|
1120
|
+
const stagedSource = {
|
|
1121
|
+
bun: bun.source,
|
|
1122
|
+
alpine: {
|
|
1123
|
+
branch: ALPINE_BRANCH,
|
|
1124
|
+
arch: alpineArch,
|
|
1125
|
+
packages: APK_PACKAGES.map(({ pkg }) => pkg),
|
|
1126
|
+
},
|
|
1127
|
+
};
|
|
1128
|
+
for (const [, dst] of [...sources, ...jniSources]) {
|
|
1129
|
+
stagedFiles.push(
|
|
1130
|
+
fileProvenanceEntry({
|
|
1131
|
+
filePath: dst,
|
|
1132
|
+
relativePath: path.relative(
|
|
1133
|
+
path.join(androidDir, "app", "src", "main"),
|
|
1134
|
+
dst,
|
|
1135
|
+
),
|
|
1136
|
+
source: stagedSource,
|
|
1137
|
+
}),
|
|
1138
|
+
);
|
|
1139
|
+
}
|
|
1140
|
+
|
|
586
1141
|
stagedCount += abiChanges;
|
|
587
1142
|
tlog(
|
|
588
1143
|
`Staged ${sources.length} runtime file(s) for ABI ${androidAbi}` +
|
|
@@ -590,9 +1145,8 @@ export async function stageAndroidAgentRuntime({
|
|
|
590
1145
|
);
|
|
591
1146
|
}
|
|
592
1147
|
|
|
593
|
-
// ABI-independent assets: agent-bundle.js + PGlite payload
|
|
594
|
-
//
|
|
595
|
-
// produces a 33 MB real bundle in packages/agent/dist-mobile/ via
|
|
1148
|
+
// ABI-independent assets: agent-bundle.js + PGlite payload. The real
|
|
1149
|
+
// bundle is produced in packages/agent/dist-mobile/ via
|
|
596
1150
|
// `bun run --cwd packages/agent build:mobile`. PGlite at runtime
|
|
597
1151
|
// resolves vector.tar.gz and fuzzystrmatch.tar.gz with `new URL("../X",
|
|
598
1152
|
// import.meta.url)`, so those two files must land ONE DIR ABOVE the
|
|
@@ -645,30 +1199,34 @@ export async function stageAndroidAgentRuntime({
|
|
|
645
1199
|
distMobileDir = elizaPackagesAgentDistMobile;
|
|
646
1200
|
distBundle = path.join(distMobileDir, "agent-bundle.js");
|
|
647
1201
|
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
let bundleSrc;
|
|
651
|
-
if (fs.existsSync(distBundle)) {
|
|
652
|
-
bundleSrc = distBundle;
|
|
653
|
-
tlog(
|
|
654
|
-
`Using Phase D agent bundle (${(fs.statSync(distBundle).size / (1024 * 1024)).toFixed(1)} MB)`,
|
|
655
|
-
);
|
|
656
|
-
} else if (fs.existsSync(spikeServerJs)) {
|
|
657
|
-
bundleSrc = spikeServerJs;
|
|
658
|
-
tlog(
|
|
659
|
-
"Using spike placeholder agent-bundle.js — run `bun run --cwd " +
|
|
660
|
-
"packages/agent build:mobile` to ship the real agent.",
|
|
661
|
-
);
|
|
662
|
-
} else {
|
|
1202
|
+
if (!fs.existsSync(distBundle)) {
|
|
663
1203
|
throw new Error(
|
|
664
|
-
`No agent bundle
|
|
1204
|
+
`No mobile agent bundle found at ${distBundle}. Run ` +
|
|
1205
|
+
"`bun run --cwd packages/agent build:mobile` before staging Android assets.",
|
|
665
1206
|
);
|
|
666
1207
|
}
|
|
1208
|
+
const bundleSrc = distBundle;
|
|
1209
|
+
tlog(
|
|
1210
|
+
`Using mobile agent bundle (${(fs.statSync(distBundle).size / (1024 * 1024)).toFixed(1)} MB)`,
|
|
1211
|
+
);
|
|
667
1212
|
const bundleTarget = path.join(assetsAgentDir, "agent-bundle.js");
|
|
668
1213
|
if (copyIfDifferent(bundleSrc, bundleTarget)) stagedCount += 1;
|
|
1214
|
+
stagedFiles.push(
|
|
1215
|
+
fileProvenanceEntry({
|
|
1216
|
+
filePath: bundleTarget,
|
|
1217
|
+
relativePath: path.relative(
|
|
1218
|
+
path.join(androidDir, "app", "src", "main"),
|
|
1219
|
+
bundleTarget,
|
|
1220
|
+
),
|
|
1221
|
+
source: {
|
|
1222
|
+
kind: "mobile-agent-bundle",
|
|
1223
|
+
path: bundleSrc,
|
|
1224
|
+
},
|
|
1225
|
+
}),
|
|
1226
|
+
);
|
|
669
1227
|
|
|
670
|
-
// PGlite runtime artifacts.
|
|
671
|
-
//
|
|
1228
|
+
// PGlite runtime artifacts. They are optional because minimal mobile bundles
|
|
1229
|
+
// can run without embedded database extensions.
|
|
672
1230
|
const pgliteAssets = [
|
|
673
1231
|
"pglite.wasm",
|
|
674
1232
|
"initdb.wasm",
|
|
@@ -682,17 +1240,100 @@ export async function stageAndroidAgentRuntime({
|
|
|
682
1240
|
if (!fs.existsSync(src)) continue;
|
|
683
1241
|
const dst = path.join(assetsAgentDir, name);
|
|
684
1242
|
if (copyIfDifferent(src, dst)) stagedCount += 1;
|
|
1243
|
+
stagedFiles.push(
|
|
1244
|
+
fileProvenanceEntry({
|
|
1245
|
+
filePath: dst,
|
|
1246
|
+
relativePath: path.relative(
|
|
1247
|
+
path.join(androidDir, "app", "src", "main"),
|
|
1248
|
+
dst,
|
|
1249
|
+
),
|
|
1250
|
+
source: {
|
|
1251
|
+
kind: "mobile-agent-bundle",
|
|
1252
|
+
path: src,
|
|
1253
|
+
},
|
|
1254
|
+
}),
|
|
1255
|
+
);
|
|
685
1256
|
}
|
|
686
1257
|
|
|
687
1258
|
const launchTarget = path.join(assetsAgentDir, "launch.sh");
|
|
688
1259
|
if (writeIfChanged(launchTarget, LAUNCH_SCRIPT)) stagedCount += 1;
|
|
1260
|
+
stagedFiles.push(
|
|
1261
|
+
fileProvenanceEntry({
|
|
1262
|
+
filePath: launchTarget,
|
|
1263
|
+
relativePath: path.relative(
|
|
1264
|
+
path.join(androidDir, "app", "src", "main"),
|
|
1265
|
+
launchTarget,
|
|
1266
|
+
),
|
|
1267
|
+
source: { kind: "stage-android-agent", constant: "LAUNCH_SCRIPT" },
|
|
1268
|
+
}),
|
|
1269
|
+
);
|
|
1270
|
+
const llamaDiagnosticTarget = path.join(
|
|
1271
|
+
assetsAgentDir,
|
|
1272
|
+
"llama-kernel-diagnostic.mjs",
|
|
1273
|
+
);
|
|
1274
|
+
if (writeIfChanged(llamaDiagnosticTarget, LLAMA_KERNEL_DIAGNOSTIC_SCRIPT)) {
|
|
1275
|
+
stagedCount += 1;
|
|
1276
|
+
}
|
|
1277
|
+
stagedFiles.push(
|
|
1278
|
+
fileProvenanceEntry({
|
|
1279
|
+
filePath: llamaDiagnosticTarget,
|
|
1280
|
+
relativePath: path.relative(
|
|
1281
|
+
path.join(androidDir, "app", "src", "main"),
|
|
1282
|
+
llamaDiagnosticTarget,
|
|
1283
|
+
),
|
|
1284
|
+
source: {
|
|
1285
|
+
kind: "stage-android-agent",
|
|
1286
|
+
constant: "LLAMA_KERNEL_DIAGNOSTIC_SCRIPT",
|
|
1287
|
+
},
|
|
1288
|
+
}),
|
|
1289
|
+
);
|
|
1290
|
+
|
|
1291
|
+
const bunRiscv64VersionPath = path.resolve(
|
|
1292
|
+
__dirname,
|
|
1293
|
+
"..",
|
|
1294
|
+
"bun-riscv64",
|
|
1295
|
+
"bun-version.json",
|
|
1296
|
+
);
|
|
1297
|
+
const runtimeProvenanceTarget = path.join(
|
|
1298
|
+
assetsAgentDir,
|
|
1299
|
+
RUNTIME_PROVENANCE_FILENAME,
|
|
1300
|
+
);
|
|
1301
|
+
const runtimeProvenance = {
|
|
1302
|
+
schema: "eliza.android_agent_runtime_provenance.v1",
|
|
1303
|
+
generated_by: "packages/app-core/scripts/lib/stage-android-agent.mjs",
|
|
1304
|
+
claim_boundary:
|
|
1305
|
+
"apk_staged_runtime_file_hashes_only_not_android_boot_or_runtime_execution_evidence",
|
|
1306
|
+
bun: {
|
|
1307
|
+
version: BUN_VERSION,
|
|
1308
|
+
channel: bunChannel,
|
|
1309
|
+
cache_key: bunCacheKey(bunChannel),
|
|
1310
|
+
},
|
|
1311
|
+
alpine: {
|
|
1312
|
+
branch: ALPINE_BRANCH,
|
|
1313
|
+
},
|
|
1314
|
+
riscv64_bun_artifact: riscv64Artifact,
|
|
1315
|
+
riscv64_bun_build_contract: readJsonIfExists(bunRiscv64VersionPath),
|
|
1316
|
+
files: stagedFiles.sort((a, b) => a.path.localeCompare(b.path)),
|
|
1317
|
+
};
|
|
1318
|
+
if (
|
|
1319
|
+
writeIfChanged(
|
|
1320
|
+
runtimeProvenanceTarget,
|
|
1321
|
+
`${JSON.stringify(runtimeProvenance, null, 2)}\n`,
|
|
1322
|
+
)
|
|
1323
|
+
) {
|
|
1324
|
+
stagedCount += 1;
|
|
1325
|
+
}
|
|
689
1326
|
|
|
690
1327
|
tlog(
|
|
691
1328
|
`Staged on-device agent runtime in ${path.relative(androidDir, assetsAgentDir)} ` +
|
|
692
1329
|
`(${stagedCount} file change${stagedCount === 1 ? "" : "s"} this run).`,
|
|
693
1330
|
);
|
|
694
1331
|
|
|
695
|
-
return {
|
|
1332
|
+
return {
|
|
1333
|
+
assetsAgentDir,
|
|
1334
|
+
stagedCount,
|
|
1335
|
+
runtimeProvenancePath: runtimeProvenanceTarget,
|
|
1336
|
+
};
|
|
696
1337
|
}
|
|
697
1338
|
|
|
698
1339
|
export const __testables = {
|
|
@@ -701,4 +1342,12 @@ export const __testables = {
|
|
|
701
1342
|
ABI_TARGETS,
|
|
702
1343
|
APK_PACKAGES,
|
|
703
1344
|
LAUNCH_SCRIPT,
|
|
1345
|
+
LLAMA_KERNEL_DIAGNOSTIC_SCRIPT,
|
|
1346
|
+
RISCV64_BUN_ARTIFACT_FILENAME,
|
|
1347
|
+
RUNTIME_PROVENANCE_FILENAME,
|
|
1348
|
+
defaultRiscv64BunArtifactPath,
|
|
1349
|
+
riscv64BunFilePath,
|
|
1350
|
+
riscv64BunArtifactSource,
|
|
1351
|
+
riscv64BunSha256,
|
|
1352
|
+
provenancePath,
|
|
704
1353
|
};
|