@elizaos/app-core 2.0.0-beta.3 → 2.0.3-beta.3
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.d.ts +1 -1
- package/api/auth/audit.js +1 -1
- package/api/auth/auth-context.d.ts +1 -1
- package/api/auth/auth-context.js +1 -1
- package/api/auth/bootstrap-token.d.ts +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.d.ts +1 -1
- package/api/auth/sessions.js +2 -2
- package/api/auth-bootstrap-routes.d.ts +7 -14
- 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 +299 -0
- package/api/auth-session-routes.d.ts +2 -2
- package/api/auth-session-routes.d.ts.map +1 -1
- package/api/auth-session-routes.js +36 -15
- package/api/auth.d.ts +13 -20
- package/api/auth.d.ts.map +1 -1
- package/api/auth.js +32 -27
- package/api/automations-compat-routes.d.ts +1 -1
- 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.d.ts +1 -1
- 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 +14 -7
- package/api/compat-route-shared.d.ts.map +1 -1
- package/api/compat-route-shared.js +27 -188
- 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 +1 -1
- 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 +6 -1
- 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 +477 -0
- package/api/dev-stack.d.ts.map +1 -1
- package/api/dev-stack.js +6 -9
- package/api/drop-status-compat-route.d.ts +3 -0
- package/api/drop-status-compat-route.d.ts.map +1 -0
- package/api/drop-status-compat-route.js +12 -0
- 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 +1 -1
- 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.d.ts +2 -2
- package/api/sensitive-request-routes.js +5 -5
- package/api/server-config-filter.d.ts.map +1 -1
- package/api/server-config-filter.js +0 -1
- 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 +268 -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 +11 -11
- package/api/server.d.ts.map +1 -1
- package/api/server.js +227 -139
- 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 +329 -0
- package/api/workbench-compat-routes.d.ts +1 -1
- 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 +164 -11
- 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 +82 -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 +27 -1
- package/cli/program/register.auth.d.ts.map +1 -1
- package/cli/program/register.auth.js +193 -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 +17 -8
- 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.d.ts +1 -1
- 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 +46 -34
- package/index.d.ts.map +1 -1
- package/index.js +53 -33
- package/package.json +166 -51
- package/packaging/PUBLISHING_GUIDE.md +20 -20
- 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 +143 -0
- package/platform/elizaos-agent-browser-stub.d.ts.map +1 -0
- package/platform/elizaos-agent-browser-stub.js +157 -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 +526 -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 +291 -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 +335 -18
- 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 +1629 -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 +1283 -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/ElizaBionicInferenceServer.java +740 -0
- 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 +255 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaVoicePlugin.java +505 -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 +12 -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 +28 -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/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 +591 -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 +1526 -0
- package/platforms/electrobun/package.json +21 -13
- 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 +405 -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 +116 -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 +91 -0
- package/platforms/electrobun/remotes/runtime/src/dev/phase3-smoke.ts +137 -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/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 +341 -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 +102 -73
- package/platforms/electrobun/src/desktop-http-request.ts +97 -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 +232 -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 +12 -16
- 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 +2608 -2098
- 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.test.ts +83 -0
- package/platforms/electrobun/src/lifecycle/api-base-owner.ts +63 -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 +2133 -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 +678 -616
- package/platforms/electrobun/src/native/desktop-window.test.ts +416 -0
- package/platforms/electrobun/src/native/desktop.ts +2200 -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 +82 -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 +1541 -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-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 +357 -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 +687 -0
- package/platforms/electrobun/src/voice/voice-service.test.ts +587 -0
- package/platforms/electrobun/src/voice/voice-service.ts +1067 -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 +88 -12
- 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 +4 -9
- 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/index.d.ts +1 -5
- package/registry/index.d.ts.map +1 -1
- package/registry/index.js +10 -68
- 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/bundled-fused-lib.d.ts +36 -0
- package/runtime/bundled-fused-lib.d.ts.map +1 -0
- package/runtime/bundled-fused-lib.js +77 -0
- package/runtime/channel-plugin-map.d.ts +1 -5
- package/runtime/channel-plugin-map.d.ts.map +1 -1
- package/runtime/channel-plugin-map.js +11 -31
- 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 +104 -19
- package/runtime/eliza.d.ts +75 -1
- package/runtime/eliza.d.ts.map +1 -1
- package/runtime/eliza.js +606 -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 +2 -3
- 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 +1 -1
- 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 +66 -0
- package/runtime/voice-warmup.d.ts.map +1 -0
- package/runtime/voice-warmup.js +101 -0
- package/scripts/android-sms-gateway-template.test.mjs +1014 -0
- package/scripts/aosp/README.md +29 -16
- package/scripts/aosp/compile-libllama-zig-pin.test.mjs +147 -0
- package/scripts/aosp/compile-libllama.mjs +1750 -267
- package/scripts/aosp/compile-libllama.test.mjs +133 -0
- package/scripts/aosp/compile-shim.mjs +68 -19
- 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 +59 -35
- package/scripts/aosp/stage-default-models.test.mjs +23 -0
- package/scripts/aosp/variant-config-schema.ts +2 -2
- package/scripts/assert-required-bundled-packages.test.ts +555 -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 +600 -0
- package/scripts/build-helpers/verify-fused-symbols.test.mjs +0 -0
- package/scripts/build-image.sh +1 -1
- package/scripts/build-llama-cpp-mtp.mjs +488 -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 +1 -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 +1050 -195
- package/scripts/deploy-cloud-api-production-gateway.mjs +52 -0
- package/scripts/desktop-build.mjs +965 -98
- 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 +465 -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 +173 -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/artifact-staleness.d.mts +33 -0
- package/scripts/lib/artifact-staleness.mjs +122 -0
- package/scripts/lib/artifact-staleness.test.mts +98 -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/ios-plist-url-scheme.mjs +80 -0
- package/scripts/lib/mobile-build-decisions.mjs +97 -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/renderer-build-manifest.d.mts +65 -0
- package/scripts/lib/renderer-build-manifest.mjs +257 -0
- package/scripts/lib/renderer-build-manifest.test.mts +277 -0
- package/scripts/lib/stage-android-agent.mjs +757 -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/verify-ondevice-artifact.d.mts +16 -0
- package/scripts/lib/verify-ondevice-artifact.mjs +61 -0
- package/scripts/lib/verify-ondevice-artifact.test.mts +98 -0
- package/scripts/lib/vite-renderer-dist-stale.mjs +5 -0
- package/scripts/lib/voice-latency-report.mjs +154 -0
- package/scripts/lib/websocket-pending-queue.ts +92 -0
- package/scripts/lifeops-prompt-benchmark.ts +21 -12
- package/scripts/link-docker-local-app-packages.mjs +109 -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-asr-word-timestamps.patch +218 -0
- package/scripts/playwright-ui-live-stack.ts +588 -157
- package/scripts/playwright-ui-smoke-api-stub.mjs +3495 -111
- 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/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 +66 -2
- package/scripts/run-mobile-build-android-app-actions.test.mjs +426 -0
- package/scripts/run-mobile-build-brand-separation.test.mts +33 -0
- package/scripts/run-mobile-build-ios-engine-gate.test.mjs +85 -0
- package/scripts/run-mobile-build-mtp-staleness.test.mts +198 -0
- package/scripts/run-mobile-build.mjs +5082 -610
- 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/serve-real-local-agent.ts +72 -0
- 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-desktop-fused-lib.mjs +453 -0
- package/scripts/stage-elizavoice-lib.mjs +363 -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/verify-ondevice-artifact.mjs +111 -0
- package/scripts/voice/freeze-voice.mjs +521 -0
- package/scripts/voice-attribution-smoke.ts +644 -0
- package/scripts/voice-create-profile.mjs +379 -0
- package/scripts/voice-duet.mjs +1355 -0
- package/scripts/voice-e2e-hardware.ts +877 -0
- package/scripts/voice-interactive.mjs +1721 -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 +2 -2
- 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 +3 -3
- 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 +11 -4
- 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 +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 +5 -5
- 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 +52 -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/live-agent-test.ts +537 -551
- package/test/helpers/live-provider.test.ts +95 -5
- package/test/helpers/live-provider.ts +234 -56
- package/test/helpers/live-runtime-server.ts +4 -4
- package/test/helpers/pglite-runtime.ts +1 -1
- package/test/helpers/real-runtime.ts +72 -20
- 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/test/scripts/websocket-pending-queue.test.ts +119 -0
- package/test-support/test-helpers.d.ts +0 -33
- package/test-support/test-helpers.d.ts.map +1 -1
- package/test-support/test-helpers.js +81 -189
- package/ui-compat.d.ts +14 -2
- package/ui-compat.d.ts.map +1 -1
- package/ui-compat.js +23 -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/scripts/ensure-whisper-model.sh +0 -93
- 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/registry/loader.d.ts +0 -27
- package/registry/loader.d.ts.map +0 -1
- package/registry/loader.js +0 -111
- package/registry/schema.d.ts +0 -989
- package/registry/schema.d.ts.map +0 -1
- package/registry/schema.js +0 -264
- 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/helpers/i18n.ts +0 -5
- package/test/helpers/loopback.ts +0 -33
- package/test/helpers/react-test.ts +0 -40
- package/test/helpers/skip-without.ts +0 -53
- package/test/scripts/task-agent-live-smoke.ts +0 -1335
- /package/services/{local-inference/voice → ambient-audio}/types.js +0 -0
package/runtime/eliza.js
CHANGED
|
@@ -16,17 +16,28 @@ import { pathToFileURL } from "node:url";
|
|
|
16
16
|
import { CUSTOM_PLUGINS_DIRNAME, getLastFailedPluginNames, loadElizaConfig, resolveDefaultAgentWorkspaceDir, resolvePackageEntry, resolveUserPath, scanDropInPlugins, applyCloudConfigToEnv as upstreamApplyCloudConfigToEnv, bootElizaRuntime as upstreamBootElizaRuntime, collectPluginNames as upstreamCollectPluginNames, configureLocalEmbeddingPlugin as upstreamConfigureLocalEmbeddingPlugin, shutdownRuntime as upstreamShutdownRuntime, startEliza as upstreamStartEliza, } from "@elizaos/agent";
|
|
17
17
|
export { CHANNEL_PLUGIN_MAP } from "./channel-plugin-map.js";
|
|
18
18
|
export { CUSTOM_PLUGINS_DIRNAME, resolvePackageEntry, scanDropInPlugins };
|
|
19
|
-
import { AutonomyService, ChannelType, logger, stringToUuid, } from "@elizaos/core";
|
|
20
|
-
import { ensureRuntimeSqlCompatibility, isMobilePlatform, resolveServerOnlyPort, syncAppEnvToEliza, syncElizaEnvAliases, syncResolvedApiPort, } from "@elizaos/shared";
|
|
21
|
-
import { getApps, loadRegistry } from "../registry";
|
|
19
|
+
import { AutonomyService, ChannelType, isTruthyEnvValue, logger, ModelType, stringToUuid, } from "@elizaos/core";
|
|
20
|
+
import { ensureRuntimeSqlCompatibility, formatError, formatErrorWithStack, isMobilePlatform, resolveDesktopApiPort, resolveServerOnlyPort, syncAppEnvToEliza, syncElizaEnvAliases, syncResolvedApiPort, } from "@elizaos/shared";
|
|
21
|
+
import { getApps, loadRegistry } from "../registry/index.js";
|
|
22
|
+
import { registerCoreSensitiveRequestAdapters } from "../services/sensitive-requests/index.js";
|
|
22
23
|
import { listAppRoutePluginLoaders, } from "./app-route-plugin-registry.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
import { ensureBundledFusedLibDir } from "./bundled-fused-lib.js";
|
|
25
|
+
import { shouldWarmupVoice, warmVoiceModels } from "./voice-warmup.js";
|
|
26
|
+
// plugin-local-inference loaded lazily to avoid static plugin boundary violations.
|
|
27
|
+
let _localInferenceRuntime;
|
|
28
|
+
async function _localInference() {
|
|
29
|
+
if (!_localInferenceRuntime) {
|
|
30
|
+
_localInferenceRuntime = await import("@elizaos/plugin-local-inference/runtime");
|
|
31
|
+
}
|
|
32
|
+
return _localInferenceRuntime;
|
|
33
|
+
}
|
|
34
|
+
import { getSharedCompatRuntimeState, patchHttpCreateServerForCompat, startApiServer, } from "../api/server.js";
|
|
35
|
+
const _require = createRequire(import.meta.url);
|
|
36
|
+
import { invalidateCorsAllowedPorts } from "../api/server-cors.js";
|
|
37
|
+
import { bootLap } from "../boot-profile.js";
|
|
38
|
+
import { isRuntimeAutonomyEnabled } from "./autonomy-policy.js";
|
|
27
39
|
import { ensureTextToSpeechHandler, isEdgeTtsDisabled as isTextToSpeechEdgeTtsDisabled, } from "./ensure-text-to-speech-handler.js";
|
|
28
|
-
import {
|
|
29
|
-
import { updateStartupEmbeddingProgress } from "./startup-overlay.js";
|
|
40
|
+
import { updateStartupEmbeddingProgress, } from "./startup-overlay.js";
|
|
30
41
|
import { handleTelegramStandaloneMessage } from "./telegram-standalone-handler.js";
|
|
31
42
|
import { shouldStartTelegramStandaloneBot } from "./telegram-standalone-policy.js";
|
|
32
43
|
const AUTONOMY_WORLD_ID = stringToUuid("00000000-0000-0000-0000-000000000001");
|
|
@@ -87,7 +98,7 @@ async function ensureAutonomyBootstrapContext(runtime) {
|
|
|
87
98
|
const runtimeWithCompat = runtime;
|
|
88
99
|
const adapter = runtime.adapter;
|
|
89
100
|
const autonomousRoomId = stringToUuid(`autonomy-room-${runtime.agentId}`);
|
|
90
|
-
await runtimeWithCompat.ensureWorldExists
|
|
101
|
+
await runtimeWithCompat.ensureWorldExists({
|
|
91
102
|
id: AUTONOMY_WORLD_ID,
|
|
92
103
|
name: "Autonomy World",
|
|
93
104
|
agentId: runtime.agentId,
|
|
@@ -97,7 +108,7 @@ async function ensureAutonomyBootstrapContext(runtime) {
|
|
|
97
108
|
description: "World for autonomous agent thinking",
|
|
98
109
|
},
|
|
99
110
|
});
|
|
100
|
-
await runtimeWithCompat.ensureRoomExists
|
|
111
|
+
await runtimeWithCompat.ensureRoomExists({
|
|
101
112
|
id: autonomousRoomId,
|
|
102
113
|
name: "Autonomous Thoughts",
|
|
103
114
|
worldId: AUTONOMY_WORLD_ID,
|
|
@@ -117,9 +128,9 @@ async function ensureAutonomyBootstrapContext(runtime) {
|
|
|
117
128
|
description: "Dedicated entity for autonomy service prompts",
|
|
118
129
|
},
|
|
119
130
|
};
|
|
120
|
-
const existingEntity = (await runtimeWithCompat.getEntityById
|
|
131
|
+
const existingEntity = (await runtimeWithCompat.getEntityById(AUTONOMY_ENTITY_ID)) ?? null;
|
|
121
132
|
if (!existingEntity) {
|
|
122
|
-
const created = await runtimeWithCompat.createEntity
|
|
133
|
+
const created = await runtimeWithCompat.createEntity(autonomyEntity);
|
|
123
134
|
if (!created && adapter?.upsertEntities) {
|
|
124
135
|
await adapter.upsertEntities([autonomyEntity]);
|
|
125
136
|
}
|
|
@@ -156,6 +167,48 @@ async function ensureAutonomyBootstrapContext(runtime) {
|
|
|
156
167
|
await runtimeWithCompat.addParticipant(AUTONOMY_ENTITY_ID, autonomousRoomId);
|
|
157
168
|
}
|
|
158
169
|
}
|
|
170
|
+
class OptionalAppRoutePluginUnavailableError extends Error {
|
|
171
|
+
specifier;
|
|
172
|
+
constructor(specifier, cause) {
|
|
173
|
+
super(`Optional app route plugin ${specifier} is unavailable`, { cause });
|
|
174
|
+
this.specifier = specifier;
|
|
175
|
+
this.name = "OptionalAppRoutePluginUnavailableError";
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
function isOptionalAppRoutePluginUnavailableError(err) {
|
|
179
|
+
return err instanceof OptionalAppRoutePluginUnavailableError;
|
|
180
|
+
}
|
|
181
|
+
function splitPackageSpecifier(specifier) {
|
|
182
|
+
const parts = specifier.split("/");
|
|
183
|
+
if (specifier.startsWith("@")) {
|
|
184
|
+
if (parts.length < 2)
|
|
185
|
+
return null;
|
|
186
|
+
return {
|
|
187
|
+
packageName: `${parts[0]}/${parts[1]}`,
|
|
188
|
+
exportSubpath: parts.length > 2 ? `./${parts.slice(2).join("/")}` : ".",
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
if (!parts[0])
|
|
192
|
+
return null;
|
|
193
|
+
return {
|
|
194
|
+
packageName: parts[0],
|
|
195
|
+
exportSubpath: parts.length > 1 ? `./${parts.slice(1).join("/")}` : ".",
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
async function resolveLocalAppRoutePluginEntry(specifier) {
|
|
199
|
+
const parsed = splitPackageSpecifier(specifier);
|
|
200
|
+
if (!parsed)
|
|
201
|
+
return null;
|
|
202
|
+
let packageJsonPath;
|
|
203
|
+
try {
|
|
204
|
+
packageJsonPath = _require.resolve(`${parsed.packageName}/package.json`);
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
const entry = await resolvePackageEntry(path.dirname(packageJsonPath), parsed.exportSubpath);
|
|
210
|
+
return existsSync(entry) ? entry : null;
|
|
211
|
+
}
|
|
159
212
|
function isPlugin(value) {
|
|
160
213
|
return (typeof value === "object" &&
|
|
161
214
|
value !== null &&
|
|
@@ -179,10 +232,27 @@ function resolvePluginExport(module, exportName) {
|
|
|
179
232
|
throw new Error("No plugin export found");
|
|
180
233
|
}
|
|
181
234
|
async function loadAppRoutePluginFromSpecifier(specifier, exportName) {
|
|
182
|
-
|
|
183
|
-
|
|
235
|
+
let module;
|
|
236
|
+
try {
|
|
237
|
+
module = (await import(__rewriteRelativeImportExtension(
|
|
238
|
+
/* webpackIgnore: true */ specifier)));
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
if (!isModuleNotFoundError(err))
|
|
242
|
+
throw err;
|
|
243
|
+
const sourceEntry = await resolveLocalAppRoutePluginEntry(specifier);
|
|
244
|
+
if (!sourceEntry) {
|
|
245
|
+
throw new OptionalAppRoutePluginUnavailableError(specifier, err);
|
|
246
|
+
}
|
|
247
|
+
logger.debug(`[eliza] Loading app route plugin ${specifier} from workspace source at ${sourceEntry}`);
|
|
248
|
+
module = (await import(__rewriteRelativeImportExtension(pathToFileURL(sourceEntry).href)));
|
|
249
|
+
}
|
|
184
250
|
return resolvePluginExport(module, exportName);
|
|
185
251
|
}
|
|
252
|
+
/** @internal Exported for focused loader regression tests. */
|
|
253
|
+
export const __loadAppRoutePluginFromSpecifierForTest = loadAppRoutePluginFromSpecifier;
|
|
254
|
+
const WORKFLOW_ROUTE_PLUGIN_ID = "@elizaos/plugin-workflow:routes";
|
|
255
|
+
const WALLET_ROUTE_PLUGIN_ID = "@elizaos/plugin-wallet:routes";
|
|
186
256
|
function getRegistryAppRoutePluginLoaders() {
|
|
187
257
|
return getApps(loadRegistry()).flatMap((app) => {
|
|
188
258
|
const routePlugin = app.launch.routePlugin;
|
|
@@ -196,6 +266,55 @@ function getRegistryAppRoutePluginLoaders() {
|
|
|
196
266
|
];
|
|
197
267
|
});
|
|
198
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* Opt-in dev knob: comma-separated app-route-plugin ids to skip on boot.
|
|
271
|
+
* Empty / unset => no filtering (default behavior unchanged: every app-route
|
|
272
|
+
* plugin loads). This trims time-to-ready for core/runtime work by not
|
|
273
|
+
* transpiling + registering hundreds of feature routes a core dev does not
|
|
274
|
+
* exercise.
|
|
275
|
+
*
|
|
276
|
+
* A loader's id is its full package name (e.g. `@elizaos/plugin-personal-assistant`,
|
|
277
|
+
* `@elizaos/plugin-steward-app`, `@elizaos/plugin-elizacloud:routes`). Tokens
|
|
278
|
+
* are matched against BOTH the full id and a normalized short alias
|
|
279
|
+
* (see {@link normalizeAppRoutePluginId}), so the ergonomic short forms work
|
|
280
|
+
* too: `ELIZA_SKIP_APP_ROUTE_PLUGINS=lifeops,steward,training,shopify`.
|
|
281
|
+
*/
|
|
282
|
+
export function getSkippedAppRoutePluginIds() {
|
|
283
|
+
return new Set((process.env.ELIZA_SKIP_APP_ROUTE_PLUGINS ?? "")
|
|
284
|
+
.split(",")
|
|
285
|
+
.map((value) => value.trim())
|
|
286
|
+
.filter(Boolean));
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Opt-in dev knob: when set to the literal token `"1"`, the post-ready boot
|
|
290
|
+
* tail (app-route plugins, training hooks, sensitive-request adapters, telegram
|
|
291
|
+
* polling, trigger bridge, connector catalog, voice warmup) runs in the
|
|
292
|
+
* background instead of blocking the readiness gate, so `/api/health` flips
|
|
293
|
+
* `ready:true` and "Agent ready" prints sooner. Composes with
|
|
294
|
+
* {@link getSkippedAppRoutePluginIds}: `ELIZA_SKIP_APP_ROUTE_PLUGINS` filters
|
|
295
|
+
* WHICH route plugins load; this controls WHETHER that tail blocks ready.
|
|
296
|
+
*
|
|
297
|
+
* Returns true ONLY for `"1"` (undefined / `""` / `"0"` / `"false"` / `"true"`
|
|
298
|
+
* all return false) so the default boot is byte-identical: the tail is awaited
|
|
299
|
+
* inline exactly as before.
|
|
300
|
+
*/
|
|
301
|
+
export function getDeferAppRoutesEnabled(env = process.env) {
|
|
302
|
+
return env.ELIZA_DEFER_APP_ROUTES?.trim() === "1";
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Normalize an app-route-plugin id (or a user-supplied skip token) to a short
|
|
306
|
+
* alias for forgiving matching: lowercase, drop the `@elizaos/plugin-` prefix
|
|
307
|
+
* and the `:routes` / `-app` / `-ui` / `-routes` suffixes. So
|
|
308
|
+
* `@elizaos/plugin-steward-app` and `steward` both normalize to `steward`.
|
|
309
|
+
*/
|
|
310
|
+
export function normalizeAppRoutePluginId(id) {
|
|
311
|
+
return id
|
|
312
|
+
.trim()
|
|
313
|
+
.toLowerCase()
|
|
314
|
+
.replace(/^@elizaos\/plugin-/, "")
|
|
315
|
+
.replace(/:routes$/, "")
|
|
316
|
+
.replace(/-(app|ui|routes)$/, "");
|
|
317
|
+
}
|
|
199
318
|
function getAppRoutePluginLoaders() {
|
|
200
319
|
const byId = new Map();
|
|
201
320
|
for (const entry of getRegistryAppRoutePluginLoaders()) {
|
|
@@ -204,48 +323,157 @@ function getAppRoutePluginLoaders() {
|
|
|
204
323
|
for (const entry of listAppRoutePluginLoaders()) {
|
|
205
324
|
byId.set(entry.id, entry);
|
|
206
325
|
}
|
|
207
|
-
|
|
326
|
+
// plugin-workflow is default-enabled and registers its rawPath route plugin
|
|
327
|
+
// (`/api/automations`, `/api/workflow/*`) only as a side effect of its
|
|
328
|
+
// `register-routes` import. That side effect runs inside the plugin's own
|
|
329
|
+
// module init, which is not guaranteed to have executed before this snapshot
|
|
330
|
+
// is taken on the post-ready boot tail — so the loader can be missing and the
|
|
331
|
+
// routes 404. Register it explicitly here (load-order independent), mirroring
|
|
332
|
+
// how every other rawPath route plugin is wired via the registry.
|
|
333
|
+
if (!byId.has(WORKFLOW_ROUTE_PLUGIN_ID)) {
|
|
334
|
+
byId.set(WORKFLOW_ROUTE_PLUGIN_ID, {
|
|
335
|
+
id: WORKFLOW_ROUTE_PLUGIN_ID,
|
|
336
|
+
load: () => loadAppRoutePluginFromSpecifier("@elizaos/plugin-workflow/plugin-routes", "workflowRoutePlugin"),
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
// plugin-wallet has the same load-order hazard: its rawPath route plugin
|
|
340
|
+
// (`/api/wallet/market-overview`) registers only as a side effect of the
|
|
341
|
+
// `register-routes` import, which is not guaranteed to have run before this
|
|
342
|
+
// snapshot. Register it explicitly so the route is always mounted.
|
|
343
|
+
if (!byId.has(WALLET_ROUTE_PLUGIN_ID)) {
|
|
344
|
+
byId.set(WALLET_ROUTE_PLUGIN_ID, {
|
|
345
|
+
id: WALLET_ROUTE_PLUGIN_ID,
|
|
346
|
+
load: () => loadAppRoutePluginFromSpecifier("@elizaos/plugin-wallet/routes/plugin", "walletRoutePlugin"),
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
const skip = getSkippedAppRoutePluginIds();
|
|
350
|
+
if (skip.size === 0) {
|
|
351
|
+
return [...byId.values()];
|
|
352
|
+
}
|
|
353
|
+
// Match a loader against the skip tokens by full id OR normalized short alias
|
|
354
|
+
// (so both `@elizaos/plugin-steward-app` and `steward` skip the same loader).
|
|
355
|
+
const skipNormalized = new Set([...skip].map((token) => normalizeAppRoutePluginId(token)));
|
|
356
|
+
const kept = [];
|
|
357
|
+
const skipped = [];
|
|
358
|
+
for (const entry of byId.values()) {
|
|
359
|
+
if (skip.has(entry.id) ||
|
|
360
|
+
skipNormalized.has(normalizeAppRoutePluginId(entry.id))) {
|
|
361
|
+
skipped.push(entry.id);
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
kept.push(entry);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
if (skipped.length > 0) {
|
|
368
|
+
logger.info(`[eliza] Skipping ${skipped.length} app route plugin(s) via ELIZA_SKIP_APP_ROUTE_PLUGINS: ${skipped.join(", ")}`);
|
|
369
|
+
}
|
|
370
|
+
return kept;
|
|
208
371
|
}
|
|
209
372
|
async function registerAppRoutePlugins(runtime) {
|
|
210
|
-
|
|
373
|
+
// Load all app-route plugin modules concurrently. This runs on the gated
|
|
374
|
+
// ready-path (repairRuntimeAfterBoot is awaited before the runtime is handed
|
|
375
|
+
// back and /api/health flips ready), so the previous sequential await-loop
|
|
376
|
+
// serialized ~11 independent dynamic imports (lifeops alone registers 188
|
|
377
|
+
// routes) and dominated time-to-ready. Imports are independent; loading them
|
|
378
|
+
// together overlaps their I/O and module resolution. Route registration is
|
|
379
|
+
// still applied in loader order after all settle, so dispatch order is
|
|
380
|
+
// unchanged, and per-plugin failures stay isolated (a rejected load logs and
|
|
381
|
+
// contributes no routes rather than aborting the rest).
|
|
382
|
+
const loaded = await Promise.all(getAppRoutePluginLoaders().map(async ({ id, load }) => {
|
|
211
383
|
try {
|
|
212
|
-
|
|
213
|
-
// Push rawPath routes directly onto runtime.routes to avoid the core's
|
|
214
|
-
// registerPlugin() path mangling (which prepends /<pluginName>/ to every
|
|
215
|
-
// route path). The rawPath flag means these routes already have their
|
|
216
|
-
// final absolute paths (e.g. /api/lifeops/app-state).
|
|
217
|
-
if (plugin.routes?.length) {
|
|
218
|
-
for (const route of plugin.routes) {
|
|
219
|
-
const routePath = route.path.startsWith("/")
|
|
220
|
-
? route.path
|
|
221
|
-
: `/${route.path}`;
|
|
222
|
-
runtime.routes.push({ ...route, path: routePath });
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
logger.info(`[eliza] Registered app route plugin: ${plugin.name} (${plugin.routes?.length ?? 0} routes)`);
|
|
384
|
+
return await load();
|
|
226
385
|
}
|
|
227
386
|
catch (err) {
|
|
228
|
-
|
|
387
|
+
if (isOptionalAppRoutePluginUnavailableError(err)) {
|
|
388
|
+
logger.debug(`[eliza] App route plugin ${id} unavailable, skipping route registration`);
|
|
389
|
+
return null;
|
|
390
|
+
}
|
|
391
|
+
logger.warn(`[eliza] Failed to register app route plugin ${id}: ${formatError(err)}`);
|
|
392
|
+
return null;
|
|
393
|
+
}
|
|
394
|
+
}));
|
|
395
|
+
for (const plugin of loaded) {
|
|
396
|
+
if (!plugin)
|
|
397
|
+
continue;
|
|
398
|
+
// Push rawPath routes directly onto runtime.routes to avoid the core's
|
|
399
|
+
// registerPlugin() path mangling (which prepends /<pluginName>/ to every
|
|
400
|
+
// route path). The rawPath flag means these routes already have their
|
|
401
|
+
// final absolute paths (e.g. /api/lifeops/app-state).
|
|
402
|
+
if (plugin.routes?.length) {
|
|
403
|
+
for (const route of plugin.routes) {
|
|
404
|
+
const routePath = route.path.startsWith("/")
|
|
405
|
+
? route.path
|
|
406
|
+
: `/${route.path}`;
|
|
407
|
+
runtime.routes.push({ ...route, path: routePath });
|
|
408
|
+
}
|
|
229
409
|
}
|
|
410
|
+
logger.info(`[eliza] Registered app route plugin: ${plugin.name} (${plugin.routes?.length ?? 0} routes)`);
|
|
230
411
|
}
|
|
231
412
|
}
|
|
232
|
-
const TRAINING_RUNTIME_HOOKS_SPECIFIER = "@elizaos/
|
|
413
|
+
const TRAINING_RUNTIME_HOOKS_SPECIFIER = "@elizaos/plugin-training";
|
|
414
|
+
/**
|
|
415
|
+
* Returns true only for genuine "module is not installed" import failures.
|
|
416
|
+
* Bun raises `ResolveMessage` with `code === "ERR_MODULE_NOT_FOUND"` when a
|
|
417
|
+
* specifier cannot be resolved; Node uses the same `code`. Anything else
|
|
418
|
+
* (syntax error, runtime error during module init, tsconfig path hijack,
|
|
419
|
+
* missing transitive dependency) is a real load failure and must NOT be
|
|
420
|
+
* misreported as "not installed".
|
|
421
|
+
*/
|
|
422
|
+
function isModuleNotFoundError(err) {
|
|
423
|
+
if (!err || typeof err !== "object")
|
|
424
|
+
return false;
|
|
425
|
+
const errObj = err;
|
|
426
|
+
if (errObj.code === "ERR_MODULE_NOT_FOUND")
|
|
427
|
+
return true;
|
|
428
|
+
if (errObj.constructor?.name === "ResolveMessage")
|
|
429
|
+
return true;
|
|
430
|
+
return false;
|
|
431
|
+
}
|
|
233
432
|
async function registerTrainingRuntimeHooks(runtime) {
|
|
234
433
|
let hookMod;
|
|
235
434
|
try {
|
|
236
435
|
hookMod = (await import(__rewriteRelativeImportExtension(TRAINING_RUNTIME_HOOKS_SPECIFIER)));
|
|
237
436
|
}
|
|
238
437
|
catch (err) {
|
|
239
|
-
|
|
240
|
-
|
|
438
|
+
if (isModuleNotFoundError(err)) {
|
|
439
|
+
logger.warn(`[eliza] @elizaos/plugin-training not installed, skipping runtime hooks`);
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
// Real load failure (syntax error, broken transitive, init throw, etc.) —
|
|
443
|
+
// surface it loudly so it is not mistaken for "not installed".
|
|
444
|
+
logger.error(`[eliza] @elizaos/plugin-training failed to load (not 'not installed'): ${formatErrorWithStack(err)}`);
|
|
445
|
+
throw err;
|
|
241
446
|
}
|
|
242
447
|
if (!hookMod.registerTrainingRuntimeHooks) {
|
|
243
448
|
throw new Error(`[eliza] ${TRAINING_RUNTIME_HOOKS_SPECIFIER} did not export registerTrainingRuntimeHooks`);
|
|
244
449
|
}
|
|
245
450
|
await hookMod.registerTrainingRuntimeHooks(runtime);
|
|
246
451
|
}
|
|
452
|
+
// The most recent runtime handed to the post-ready boot tail. A backgrounded
|
|
453
|
+
// (deferred) tail compares against this so a hot-restart that boots a newer
|
|
454
|
+
// runtime supersedes the old one's still-running tail, preventing route/service
|
|
455
|
+
// registration onto a torn-down runtime. In the default inline-await path the
|
|
456
|
+
// tail completes before the next repair call reassigns this, so the guard never
|
|
457
|
+
// trips and default behavior stays byte-identical.
|
|
458
|
+
let latestBootTailRuntime = null;
|
|
247
459
|
async function repairRuntimeAfterBoot(runtime) {
|
|
248
460
|
await ensureRuntimeSqlCompatibility(runtime);
|
|
461
|
+
// Make the app-bundled fused libelizainference (staged into the desktop
|
|
462
|
+
// package) discoverable before any local-inference handler probes
|
|
463
|
+
// `supported()`. No-op in dev / on mobile and when an explicit override is
|
|
464
|
+
// set. Must run before the ensureLocalInferenceHandler calls below.
|
|
465
|
+
ensureBundledFusedLibDir();
|
|
466
|
+
// Invariant guard: the mobile voice backend selector pins phones to the
|
|
467
|
+
// Kokoro-exclusive TTS path via `mobile: isMobilePlatform()`, which keys off
|
|
468
|
+
// ELIZA_PLATFORM. The mobile local-inference gate can fire on the
|
|
469
|
+
// device-bridge / ELIZA_LOCAL_LLAMA / riscv64 triggers without ELIZA_PLATFORM
|
|
470
|
+
// being set, leaving `mobile` false in the selector — risking OmniVoice on a
|
|
471
|
+
// phone. Evaluate both predicates here (outside the mobile branch below) so
|
|
472
|
+
// the warning is actually reachable on the real mismatch.
|
|
473
|
+
(await _localInference()).warnIfMobileGateActiveWithoutPlatform({
|
|
474
|
+
mobilePlatform: isMobilePlatform(),
|
|
475
|
+
warn: logger.warn,
|
|
476
|
+
});
|
|
249
477
|
// Mobile (Android / iOS) shortcut: the runtime is already serving from
|
|
250
478
|
// PGlite + the AI provider plugin. The remaining boot steps either spawn
|
|
251
479
|
// subprocesses (workflow runtime, telegram polling), shell
|
|
@@ -255,31 +483,31 @@ async function repairRuntimeAfterBoot(runtime) {
|
|
|
255
483
|
// them here is what the mobile bundle has to do to avoid crashing on first
|
|
256
484
|
// turn — feature parity comes from cloud-side services, not on-device state.
|
|
257
485
|
if (isMobilePlatform()) {
|
|
258
|
-
if (shouldEnableMobileLocalInference()) {
|
|
259
|
-
await ensureLocalInferenceHandler(runtime);
|
|
486
|
+
if ((await _localInference()).shouldEnableMobileLocalInference()) {
|
|
487
|
+
await (await _localInference()).ensureLocalInferenceHandler(runtime);
|
|
260
488
|
}
|
|
261
489
|
logger.info("[eliza] Mobile platform detected — skipping desktop-only boot helpers");
|
|
262
490
|
return runtime;
|
|
263
491
|
}
|
|
264
|
-
await
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
492
|
+
await (await _localInference()).ensureLocalInferenceHandler(runtime);
|
|
493
|
+
const autonomyLoopEnabled = isRuntimeAutonomyEnabled(process.env);
|
|
494
|
+
if (autonomyLoopEnabled) {
|
|
495
|
+
await ensureAutonomyBootstrapContext(runtime);
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
logger.info("[eliza] Autonomy bootstrap deferred — autonomous loop disabled");
|
|
499
|
+
}
|
|
272
500
|
if (!runtime.getService("AUTONOMY")) {
|
|
273
501
|
try {
|
|
274
502
|
await startAndRegisterAutonomyService(runtime);
|
|
275
|
-
logger.info("[eliza] AutonomyService started
|
|
503
|
+
logger.info("[eliza] AutonomyService started and waiting");
|
|
276
504
|
}
|
|
277
505
|
catch (error) {
|
|
278
|
-
throw new Error(`[eliza] AutonomyService
|
|
506
|
+
throw new Error(`[eliza] AutonomyService start failed: ${formatError(error)}`);
|
|
279
507
|
}
|
|
280
508
|
}
|
|
281
|
-
// Enable the autonomy loop
|
|
282
|
-
{
|
|
509
|
+
// Enable the continuous autonomy loop only when explicitly requested.
|
|
510
|
+
if (autonomyLoopEnabled) {
|
|
283
511
|
const autonomySvc = getAutonomyService(runtime);
|
|
284
512
|
if (autonomySvc) {
|
|
285
513
|
try {
|
|
@@ -287,24 +515,98 @@ async function repairRuntimeAfterBoot(runtime) {
|
|
|
287
515
|
logger.info("[eliza] AutonomyService enabled — trigger instructions will be processed");
|
|
288
516
|
}
|
|
289
517
|
catch (err) {
|
|
290
|
-
throw new Error(`[eliza] Failed to enable autonomy loop: ${
|
|
518
|
+
throw new Error(`[eliza] Failed to enable autonomy loop: ${formatError(err)}`);
|
|
291
519
|
}
|
|
292
520
|
}
|
|
293
521
|
}
|
|
294
|
-
|
|
295
|
-
|
|
522
|
+
else {
|
|
523
|
+
logger.info("[eliza] AutonomyService waiting — set ENABLE_AUTONOMY=true to start autonomous loop");
|
|
524
|
+
}
|
|
525
|
+
// Post-ready tail: feature-route plugins, training hooks, sensitive-request
|
|
526
|
+
// adapters, telegram polling, the trigger bridge, the connector catalog, and
|
|
527
|
+
// voice warmup. None of these gate correctness of the first turn, so when
|
|
528
|
+
// ELIZA_DEFER_APP_ROUTES=1 they run in the background and ready flips before
|
|
529
|
+
// the tail completes (feature routes may 404 for a brief window — same
|
|
530
|
+
// audience as ELIZA_SKIP_APP_ROUTE_PLUGINS). When the knob is unset the tail
|
|
531
|
+
// is awaited inline, identical in steps and order to the pre-split path.
|
|
532
|
+
latestBootTailRuntime = runtime;
|
|
533
|
+
if (getDeferAppRoutesEnabled()) {
|
|
534
|
+
void runPostReadyBootTail(runtime);
|
|
535
|
+
return runtime;
|
|
536
|
+
}
|
|
537
|
+
await runPostReadyBootTail(runtime);
|
|
538
|
+
return runtime;
|
|
539
|
+
}
|
|
540
|
+
const DEFAULT_POST_READY_BOOT_STEPS = {
|
|
541
|
+
ensureTextToSpeechHandler,
|
|
542
|
+
registerAppRoutePlugins,
|
|
543
|
+
registerTrainingRuntimeHooks,
|
|
544
|
+
registerCoreSensitiveRequestAdapters,
|
|
545
|
+
shouldStartTelegramStandaloneBot,
|
|
546
|
+
ensureTelegramBotPolling,
|
|
547
|
+
stopTelegramBotPolling,
|
|
548
|
+
ensureTriggerEventBridge,
|
|
549
|
+
ensureConnectorTargetCatalog,
|
|
550
|
+
startDeferredVoiceWarmup,
|
|
551
|
+
};
|
|
552
|
+
/**
|
|
553
|
+
* Post-ready boot steps split out of {@link repairRuntimeAfterBoot}. Each step
|
|
554
|
+
* keeps its original error behavior verbatim — there is no wrapping try/catch:
|
|
555
|
+
* registerAppRoutePlugins isolates per-loader failures internally,
|
|
556
|
+
* ensureTriggerEventBridge / ensureConnectorTargetCatalog swallow into
|
|
557
|
+
* logger.warn internally, and ensureTextToSpeechHandler /
|
|
558
|
+
* registerTrainingRuntimeHooks throw (preserved in the default inline-await
|
|
559
|
+
* dispatch above).
|
|
560
|
+
*
|
|
561
|
+
* `steps` defaults to the real bound functions, so production behavior is
|
|
562
|
+
* unchanged; the seam exists only so the phase split is unit-testable.
|
|
563
|
+
*/
|
|
564
|
+
export async function runPostReadyBootTail(runtime, steps = DEFAULT_POST_READY_BOOT_STEPS) {
|
|
565
|
+
// Liveness guard: a hot-restart can swap runtimes mid-tail. If a newer boot
|
|
566
|
+
// has already claimed the tail slot, this runtime is superseded — bail before
|
|
567
|
+
// the first mutation so we never register routes/services onto a torn-down
|
|
568
|
+
// runtime. (In the default inline-await path the tail completes before the
|
|
569
|
+
// next repair call reassigns the slot, so this never trips.)
|
|
570
|
+
if (latestBootTailRuntime !== runtime) {
|
|
571
|
+
logger.info("[eliza] post-ready boot tail skipped — runtime superseded");
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
await steps.ensureTextToSpeechHandler(runtime);
|
|
575
|
+
// ── Register app-specific route plugins ─────────────────────────────
|
|
576
|
+
// The registry and explicit registration API own the package bindings; the
|
|
577
|
+
// runtime only consumes app route plugin loaders.
|
|
578
|
+
await steps.registerAppRoutePlugins(runtime);
|
|
579
|
+
await steps.registerTrainingRuntimeHooks(runtime);
|
|
580
|
+
// Register first-party sensitive-request delivery adapters with the
|
|
581
|
+
// dispatch registry (no-op when the registry service isn't present).
|
|
582
|
+
steps.registerCoreSensitiveRequestAdapters(runtime);
|
|
583
|
+
if (steps.shouldStartTelegramStandaloneBot()) {
|
|
584
|
+
await steps.ensureTelegramBotPolling(runtime);
|
|
296
585
|
}
|
|
297
586
|
else {
|
|
298
|
-
stopTelegramBotPolling("passive-lifeops-connectors");
|
|
587
|
+
steps.stopTelegramBotPolling("passive-lifeops-connectors");
|
|
299
588
|
}
|
|
300
589
|
// Subscribe the trigger event bridge to the runtime event bus so
|
|
301
590
|
// event-kind triggers fire on real MESSAGE_RECEIVED / REACTION_RECEIVED /
|
|
302
591
|
// etc. emissions. plugin-workflow registers WORKFLOW_DISPATCH in its `init`
|
|
303
592
|
// so by the time the bridge starts, workflow-kind event triggers already
|
|
304
593
|
// have a dispatcher to call.
|
|
305
|
-
await ensureTriggerEventBridge(runtime);
|
|
306
|
-
await ensureConnectorTargetCatalog(runtime);
|
|
307
|
-
|
|
594
|
+
await steps.ensureTriggerEventBridge(runtime);
|
|
595
|
+
await steps.ensureConnectorTargetCatalog(runtime);
|
|
596
|
+
// Warm local voice models (Whisper STT + Kokoro TTS) in the background now
|
|
597
|
+
// that the runtime is ready. repairRuntimeAfterBoot is the single chokepoint
|
|
598
|
+
// every boot path funnels through (bootElizaRuntime AND startEliza's
|
|
599
|
+
// server-only + restart paths), so the warmup fires regardless of entry
|
|
600
|
+
// point. Fire-and-forget; gated + non-fatal inside startDeferredVoiceWarmup.
|
|
601
|
+
void steps.startDeferredVoiceWarmup(runtime);
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Test seam: set the runtime that owns the post-ready tail slot. Mirrors what
|
|
605
|
+
* {@link repairRuntimeAfterBoot} does just before dispatching the tail, so a
|
|
606
|
+
* unit test can drive the liveness guard without a full boot.
|
|
607
|
+
*/
|
|
608
|
+
export function __setLatestBootTailRuntimeForTest(runtime) {
|
|
609
|
+
latestBootTailRuntime = runtime;
|
|
308
610
|
}
|
|
309
611
|
// Module-level handle for the trigger event bridge. Reset across
|
|
310
612
|
// hot-reloads so we never leave two handler sets racing the runtime's
|
|
@@ -334,7 +636,7 @@ async function ensureTriggerEventBridge(runtime) {
|
|
|
334
636
|
logger.info("[eliza] trigger event bridge armed");
|
|
335
637
|
}
|
|
336
638
|
catch (err) {
|
|
337
|
-
logger.warn(`[eliza] Failed to start trigger event bridge: ${
|
|
639
|
+
logger.warn(`[eliza] Failed to start trigger event bridge: ${formatError(err)}`);
|
|
338
640
|
}
|
|
339
641
|
}
|
|
340
642
|
async function ensureConnectorTargetCatalog(runtime) {
|
|
@@ -353,8 +655,8 @@ async function ensureConnectorTargetCatalog(runtime) {
|
|
|
353
655
|
const { createElizaConnectorTargetCatalog } = await import("../services/connector-target-catalog.js");
|
|
354
656
|
const catalog = createElizaConnectorTargetCatalog({
|
|
355
657
|
getConfig: () => loadElizaConfig(),
|
|
356
|
-
discordCache: _discordEnumerationCache
|
|
357
|
-
logger: { warn: runtime.logger.warn
|
|
658
|
+
discordCache: _discordEnumerationCache,
|
|
659
|
+
logger: { warn: runtime.logger.warn.bind(runtime.logger) },
|
|
358
660
|
});
|
|
359
661
|
runtime.services.set(CONNECTOR_TARGET_CATALOG_SERVICE_TYPE, [
|
|
360
662
|
catalog,
|
|
@@ -372,7 +674,7 @@ async function ensureConnectorTargetCatalog(runtime) {
|
|
|
372
674
|
logger.info("[eliza] connector-target-catalog registered");
|
|
373
675
|
}
|
|
374
676
|
catch (err) {
|
|
375
|
-
logger.warn(`[eliza] Failed to register connector-target-catalog: ${
|
|
677
|
+
logger.warn(`[eliza] Failed to register connector-target-catalog: ${formatError(err)}`);
|
|
376
678
|
}
|
|
377
679
|
}
|
|
378
680
|
// Module-level Telegraf bot reference for lifecycle management across restarts.
|
|
@@ -405,14 +707,14 @@ async function ensureTelegramBotPolling(runtime) {
|
|
|
405
707
|
bot.on("message", async (ctx) => {
|
|
406
708
|
await handleTelegramStandaloneMessage(runtime, ctx);
|
|
407
709
|
});
|
|
408
|
-
bot.catch((err) => logger.warn(`[eliza] Telegram bot error: ${
|
|
710
|
+
bot.catch((err) => logger.warn(`[eliza] Telegram bot error: ${formatError(err)}`));
|
|
409
711
|
// Fire-and-forget — bot.launch() only resolves on stop()
|
|
410
712
|
bot
|
|
411
713
|
.launch({
|
|
412
714
|
dropPendingUpdates: true,
|
|
413
715
|
allowedUpdates: ["message", "message_reaction"],
|
|
414
716
|
})
|
|
415
|
-
.catch((err) => logger.warn(`[eliza] Telegram bot launch error: ${
|
|
717
|
+
.catch((err) => logger.warn(`[eliza] Telegram bot launch error: ${formatError(err)}`));
|
|
416
718
|
_telegramBot = bot;
|
|
417
719
|
// Telegram bot cleanup is handled by the central signal handler in
|
|
418
720
|
// startEliza() via _telegramBot — no separate registration needed.
|
|
@@ -420,7 +722,7 @@ async function ensureTelegramBotPolling(runtime) {
|
|
|
420
722
|
logger.info("[eliza] Telegram bot polling started");
|
|
421
723
|
}
|
|
422
724
|
catch (err) {
|
|
423
|
-
logger.warn(`[eliza] Telegram bot setup failed: ${
|
|
725
|
+
logger.warn(`[eliza] Telegram bot setup failed: ${formatError(err)}`);
|
|
424
726
|
}
|
|
425
727
|
}
|
|
426
728
|
/**
|
|
@@ -439,7 +741,36 @@ async function ensureTelegramBotPolling(runtime) {
|
|
|
439
741
|
* so we do not re-download multi‑GB models. Opt out:
|
|
440
742
|
* `ELIZA_EMBEDDING_WARMUP_NO_REUSE=1`.
|
|
441
743
|
*/
|
|
744
|
+
// In-flight promise cache so concurrent callers (bootElizaRuntime +
|
|
745
|
+
// startEliza both run on agent boot) share a single download. Without this,
|
|
746
|
+
// two `fs.createWriteStream(dest)` open the same GGUF target concurrently,
|
|
747
|
+
// and the first to fail calls `safeUnlink(dest)` — which deletes the file
|
|
748
|
+
// out from under the second's pending write. Downstream `llama.loadModel`
|
|
749
|
+
// then opens the now-missing file and throws ENOENT, which surfaces as an
|
|
750
|
+
// uncaughtException and kills the agent.
|
|
751
|
+
let warmupInFlight = null;
|
|
752
|
+
function isLocalEmbeddingWarmupDeferredByEnv() {
|
|
753
|
+
return isTruthyEnvValue(process.env.ELIZA_DEFER_LOCAL_EMBEDDING_WARMUP);
|
|
754
|
+
}
|
|
755
|
+
function startLocalEmbeddingWarmup(onProgress) {
|
|
756
|
+
void warmupEmbeddingModel(onProgress);
|
|
757
|
+
}
|
|
758
|
+
export function startDeferredLocalEmbeddingWarmup(onProgress) {
|
|
759
|
+
if (!isLocalEmbeddingWarmupDeferredByEnv())
|
|
760
|
+
return false;
|
|
761
|
+
logger.info("[eliza] Starting deferred local embedding warmup");
|
|
762
|
+
startLocalEmbeddingWarmup(onProgress);
|
|
763
|
+
return true;
|
|
764
|
+
}
|
|
442
765
|
async function warmupEmbeddingModel(onProgress) {
|
|
766
|
+
if (warmupInFlight)
|
|
767
|
+
return warmupInFlight;
|
|
768
|
+
warmupInFlight = warmupEmbeddingModelImpl(onProgress).finally(() => {
|
|
769
|
+
warmupInFlight = null;
|
|
770
|
+
});
|
|
771
|
+
return warmupInFlight;
|
|
772
|
+
}
|
|
773
|
+
async function warmupEmbeddingModelImpl(onProgress) {
|
|
443
774
|
// Mobile bundle does not ship `node-llama-cpp` (no Android prebuild) and
|
|
444
775
|
// pulling a multi-GB GGUF over a phone's data plan is not acceptable. The
|
|
445
776
|
// mobile path uses `@elizaos/plugin-elizacloud` or a remote provider for
|
|
@@ -448,19 +779,20 @@ async function warmupEmbeddingModel(onProgress) {
|
|
|
448
779
|
logger.info("[eliza] Skipping local embedding warmup — running on mobile (ELIZA_PLATFORM=android|ios)");
|
|
449
780
|
return;
|
|
450
781
|
}
|
|
451
|
-
|
|
782
|
+
const li = await _localInference();
|
|
783
|
+
if (!li.shouldWarmupLocalEmbeddingModel()) {
|
|
452
784
|
logger.info("[eliza] Skipping local embedding (GGUF) warmup — not needed for this configuration (e.g. Eliza Cloud embeddings, or local embeddings disabled).");
|
|
453
785
|
return;
|
|
454
786
|
}
|
|
455
787
|
const config = loadElizaConfig();
|
|
456
788
|
upstreamConfigureLocalEmbeddingPlugin({}, config);
|
|
457
|
-
const preset = detectEmbeddingPreset();
|
|
458
|
-
const modelsDir = process.env.MODELS_DIR ?? DEFAULT_MODELS_DIR;
|
|
789
|
+
const preset = li.detectEmbeddingPreset();
|
|
790
|
+
const modelsDir = process.env.MODELS_DIR ?? li.DEFAULT_MODELS_DIR;
|
|
459
791
|
let model = process.env.LOCAL_EMBEDDING_MODEL?.trim() || preset.model;
|
|
460
792
|
let modelRepo = process.env.LOCAL_EMBEDDING_MODEL_REPO?.trim() || preset.modelRepo;
|
|
461
|
-
if (!isEmbeddingWarmupReuseDisabled() &&
|
|
462
|
-
!embeddingGgufFilePresent(modelsDir, model)) {
|
|
463
|
-
const reuse = findExistingEmbeddingModelForWarmupReuse(modelsDir);
|
|
793
|
+
if (!li.isEmbeddingWarmupReuseDisabled() &&
|
|
794
|
+
!li.embeddingGgufFilePresent(modelsDir, model)) {
|
|
795
|
+
const reuse = li.findExistingEmbeddingModelForWarmupReuse(modelsDir);
|
|
464
796
|
if (reuse) {
|
|
465
797
|
logger.info(`[eliza] Embedding warmup: configured file "${model}" not found in MODELS_DIR — reusing existing ${reuse.model} to avoid a large re-download. ` +
|
|
466
798
|
"Set LOCAL_EMBEDDING_MODEL or ELIZA_EMBEDDING_WARMUP_NO_REUSE=1 to force the configured model.");
|
|
@@ -478,7 +810,7 @@ async function warmupEmbeddingModel(onProgress) {
|
|
|
478
810
|
logger.info(`[eliza] Local embedding warmup: ${model} (hardware tier preset: ${preset.label}). ` +
|
|
479
811
|
"This file is for TEXT_EMBEDDING / memory only (not your conversation model).");
|
|
480
812
|
const progressCb = (phase, detail) => {
|
|
481
|
-
updateStartupEmbeddingProgress(phase, detail);
|
|
813
|
+
updateStartupEmbeddingProgress(phase, typeof detail === "string" ? detail : undefined);
|
|
482
814
|
// Always log to stdout for server/container monitoring
|
|
483
815
|
if (phase === "downloading") {
|
|
484
816
|
logger.info(`[eliza] Embedding model: ${detail ?? "downloading..."}`);
|
|
@@ -493,27 +825,69 @@ async function warmupEmbeddingModel(onProgress) {
|
|
|
493
825
|
onProgress?.(phase, detail);
|
|
494
826
|
};
|
|
495
827
|
try {
|
|
496
|
-
await ensureModel(modelsDir, modelRepo, model, false, progressCb);
|
|
828
|
+
await li.ensureModel(modelsDir, modelRepo, model, false, progressCb);
|
|
497
829
|
}
|
|
498
830
|
catch (err) {
|
|
499
831
|
// Non-fatal: the plugin will attempt its own download on first use
|
|
500
|
-
logger.warn(`[eliza] Embedding model warmup failed (will retry on first use): ${
|
|
832
|
+
logger.warn(`[eliza] Embedding model warmup failed (will retry on first use): ${formatError(err)}`);
|
|
501
833
|
}
|
|
502
834
|
}
|
|
835
|
+
/**
|
|
836
|
+
* Warm local voice models (Whisper STT + Kokoro TTS) in the background AFTER
|
|
837
|
+
* the runtime is ready, by firing one tiny useModel request at each. Voice
|
|
838
|
+
* models only load through the live runtime (the Kokoro bridge auto-starts on
|
|
839
|
+
* the first TEXT_TO_SPEECH call), so unlike embedding — which warms pre-boot
|
|
840
|
+
* via a runtime-free facade — this runs post-ready. Fire-and-forget; gated to
|
|
841
|
+
* the local-inference path so cloud-only setups never make a paid TTS/STT call.
|
|
842
|
+
*/
|
|
843
|
+
async function startDeferredVoiceWarmup(runtime) {
|
|
844
|
+
if (!shouldWarmupVoice({
|
|
845
|
+
mobile: isMobilePlatform(),
|
|
846
|
+
skipEnv: isTruthyEnvValue(process.env.ELIZA_SKIP_LOCAL_VOICE_WARMUP),
|
|
847
|
+
hotReload: isTruthyEnvValue(process.env.ELIZA_DEV_IS_HOT_RELOAD),
|
|
848
|
+
})) {
|
|
849
|
+
return;
|
|
850
|
+
}
|
|
851
|
+
logger.info("[eliza] Starting deferred voice warmup");
|
|
852
|
+
await warmVoiceModels(runtime, {
|
|
853
|
+
ttsType: ModelType.TEXT_TO_SPEECH,
|
|
854
|
+
transcriptionType: ModelType.TRANSCRIPTION,
|
|
855
|
+
}, {
|
|
856
|
+
info: (m) => logger.info(m),
|
|
857
|
+
warn: (m) => logger.warn(m),
|
|
858
|
+
});
|
|
859
|
+
}
|
|
503
860
|
export async function bootElizaRuntime(opts = {}) {
|
|
504
861
|
syncAppEnvToEliza();
|
|
505
862
|
try {
|
|
506
863
|
// Eagerly download the embedding model before the full runtime boot.
|
|
507
864
|
// This way the TUI loading screen (or server logs) can show download
|
|
508
865
|
// progress instead of the app silently stalling on first embedding call.
|
|
509
|
-
|
|
510
|
-
//
|
|
511
|
-
//
|
|
512
|
-
//
|
|
866
|
+
// Fire-and-forget: warmupEmbeddingModelImpl declares "non-fatal: will
|
|
867
|
+
// retry on first use" semantics, and self-serializes via the module-level
|
|
868
|
+
// warmupInFlight singleton. Awaiting it here parked bootstrap on sticky
|
|
869
|
+
// HF 401 → multi-URL fallback chains with no overall deadline; the API
|
|
870
|
+
// port never bound and dev-ui.mjs's 300s watchdog tore the stack down
|
|
871
|
+
// (W-016). Voiding lets bootstrap proceed; the renderer's startup overlay
|
|
872
|
+
// still surfaces progress via updateStartupEmbeddingProgress.
|
|
873
|
+
if (isLocalEmbeddingWarmupDeferredByEnv()) {
|
|
874
|
+
logger.info("[eliza] Deferring local embedding warmup until runtime ready");
|
|
875
|
+
}
|
|
876
|
+
else {
|
|
877
|
+
startLocalEmbeddingWarmup(opts.onEmbeddingProgress);
|
|
878
|
+
}
|
|
879
|
+
// Default the embedding-vector dimension plugin-sql provisions to 384 when
|
|
880
|
+
// unset: that is the compact SQL-safe column and the native width of the
|
|
881
|
+
// standalone gte-small embedding model. Setting it here lets plugin-sql
|
|
882
|
+
// provision the column without a boot-time model probe (see core
|
|
883
|
+
// provisioning). An explicit EMBEDDING_DIMENSION — a different local model,
|
|
884
|
+
// the desktop Eliza-1 sidecar's Matryoshka width, or cloud embeddings —
|
|
885
|
+
// still wins.
|
|
513
886
|
if (!process.env.EMBEDDING_DIMENSION) {
|
|
514
887
|
process.env.EMBEDDING_DIMENSION = "384";
|
|
515
888
|
}
|
|
516
889
|
const runtime = await upstreamBootElizaRuntime(opts);
|
|
890
|
+
// Voice warmup fires inside repairRuntimeAfterBoot (the shared ready-point).
|
|
517
891
|
return runtime ? await repairRuntimeAfterBoot(runtime) : runtime;
|
|
518
892
|
}
|
|
519
893
|
finally {
|
|
@@ -571,6 +945,19 @@ function isManualResetPgliteError(err) {
|
|
|
571
945
|
normalized.includes("migrations._migrations")) {
|
|
572
946
|
return true;
|
|
573
947
|
}
|
|
948
|
+
// PGlite is an Emscripten/WASM build of Postgres. When the embedded
|
|
949
|
+
// postmaster hits an unrecoverable internal state — most commonly a
|
|
950
|
+
// corrupt on-disk pgdata directory from a previous crash, an
|
|
951
|
+
// unsupported syscall, or pg_logical/WAL replay failure — Emscripten
|
|
952
|
+
// calls `abort()` and surfaces it as an Error whose message starts
|
|
953
|
+
// with `Aborted(). Build with -sASSERTIONS for more info.` That bare
|
|
954
|
+
// string carries no PGlite-specific marker, so the older heuristics
|
|
955
|
+
// above never matched and the dev-server retried forever against the
|
|
956
|
+
// same poisoned data dir. Treat it as a recoverable corruption signal:
|
|
957
|
+
// the auto-reset path quarantines the .elizadb dir and retries once.
|
|
958
|
+
if (normalized.includes("aborted()")) {
|
|
959
|
+
return true;
|
|
960
|
+
}
|
|
574
961
|
return false;
|
|
575
962
|
});
|
|
576
963
|
}
|
|
@@ -607,7 +994,7 @@ function resolveManagedPgliteDataDir() {
|
|
|
607
994
|
return resolveUserPath(configuredDataDir);
|
|
608
995
|
}
|
|
609
996
|
const workspaceDir = config.agents?.defaults?.workspace ?? resolveDefaultAgentWorkspaceDir();
|
|
610
|
-
return path.join(resolveUserPath(workspaceDir), ".
|
|
997
|
+
return path.join(resolveUserPath(workspaceDir), ".elizadb");
|
|
611
998
|
}
|
|
612
999
|
function isAutoResettablePgliteDir(dataDir) {
|
|
613
1000
|
return typeof dataDir === "string" && path.basename(dataDir) === ".elizadb";
|
|
@@ -631,7 +1018,7 @@ async function resetPluginSqlPgliteSingleton(context) {
|
|
|
631
1018
|
]);
|
|
632
1019
|
}
|
|
633
1020
|
catch (err) {
|
|
634
|
-
logger.warn(`[eliza] ${context}: failed to close plugin-sql PGlite singleton: ${
|
|
1021
|
+
logger.warn(`[eliza] ${context}: failed to close plugin-sql PGlite singleton: ${formatError(err)}`);
|
|
635
1022
|
}
|
|
636
1023
|
finally {
|
|
637
1024
|
if (timeoutHandle) {
|
|
@@ -674,8 +1061,7 @@ function normalizePgliteStartupError(err) {
|
|
|
674
1061
|
return err;
|
|
675
1062
|
}
|
|
676
1063
|
const dataDir = getPgliteDataDirFromError(err) ?? resolveManagedPgliteDataDir();
|
|
677
|
-
const detail = collectErrorMessages(err)[0] ??
|
|
678
|
-
(err instanceof Error ? err.message : String(err));
|
|
1064
|
+
const detail = collectErrorMessages(err)[0] ?? formatError(err);
|
|
679
1065
|
const wrapped = new Error(dataDir
|
|
680
1066
|
? `PGlite initialization failed for ${dataDir}: ${detail}. Stop the app, then rename or delete only this directory before retrying: ${dataDir}`
|
|
681
1067
|
: `PGlite initialization failed: ${detail}. Stop the app, then rename or delete only the managed PGlite data directory before retrying.`, { cause: err });
|
|
@@ -720,46 +1106,100 @@ export async function startEliza(options) {
|
|
|
720
1106
|
if (orchRaw !== "0" && orchRaw !== "false" && orchRaw !== "no") {
|
|
721
1107
|
process.env.ELIZA_AGENT_ORCHESTRATOR = "1";
|
|
722
1108
|
}
|
|
1109
|
+
// Install the compat-route http.createServer wrapper BEFORE the upstream
|
|
1110
|
+
// agent's bootElizaRuntime path (which calls upstream startApiServer →
|
|
1111
|
+
// http.createServer at packages/agent/src/runtime/eliza.ts ~3984). The
|
|
1112
|
+
// upstream call binds the port and creates the listener that will receive
|
|
1113
|
+
// every request from the renderer; if our patch isn't already in place,
|
|
1114
|
+
// /api/tts/local-inference, /api/database, /api/runtime/mode, and every
|
|
1115
|
+
// other compat-dispatcher path 404 because the wrapper never runs on the
|
|
1116
|
+
// active listener. The app-core `startApiServer` wrapper (line ~1188 of
|
|
1117
|
+
// ../api/server.ts) ALSO installs the patch, but that's too late — the
|
|
1118
|
+
// upstream listener is already bound by then.
|
|
1119
|
+
//
|
|
1120
|
+
// The patch falls back to a module-scoped singleton state when called
|
|
1121
|
+
// without an explicit one; `startApiServer` later seeds that same
|
|
1122
|
+
// singleton with the live runtime via its `server.updateRuntime` wrapper,
|
|
1123
|
+
// so the early listener picks up the runtime as soon as it's available.
|
|
723
1124
|
try {
|
|
724
|
-
|
|
725
|
-
|
|
1125
|
+
patchHttpCreateServerForCompat();
|
|
1126
|
+
const earlyCompatState = getSharedCompatRuntimeState();
|
|
1127
|
+
// Eagerly download the embedding model with progress reporting.
|
|
1128
|
+
// Fire-and-forget — see comment at the matching call in bootElizaRuntime
|
|
1129
|
+
// (W-016): awaiting parks bootstrap; voiding lets the API port bind on
|
|
1130
|
+
// time while the warmup runs alongside.
|
|
1131
|
+
if (isLocalEmbeddingWarmupDeferredByEnv()) {
|
|
1132
|
+
logger.info("[eliza] Deferring local embedding warmup until runtime ready");
|
|
1133
|
+
}
|
|
1134
|
+
else {
|
|
1135
|
+
startLocalEmbeddingWarmup(options?.onEmbeddingProgress);
|
|
1136
|
+
}
|
|
726
1137
|
// Cap embedding dimension to 384 — see comment in bootElizaRuntime.
|
|
727
1138
|
if (!process.env.EMBEDDING_DIMENSION) {
|
|
728
1139
|
process.env.EMBEDDING_DIMENSION = "384";
|
|
729
1140
|
}
|
|
730
1141
|
if (options?.serverOnly) {
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
1142
|
+
bootLap("startEliza:serverOnly entry");
|
|
1143
|
+
let currentRuntime;
|
|
1144
|
+
// Boot (or re-boot) the runtime headless + repair, and hand the live
|
|
1145
|
+
// runtime to the early-installed compat wrapper so `/api/tts/*`,
|
|
1146
|
+
// `/api/database`, `/api/runtime/mode`, and every other compat-dispatcher
|
|
1147
|
+
// path can resolve. Without the latter, `state.current` stays null and
|
|
1148
|
+
// `handleCompatRoute` short-circuits. Used for the initial async boot AND
|
|
1149
|
+
// the `/api/agent/restart` handler.
|
|
1150
|
+
const bootServerOnlyRuntime = async () => {
|
|
1151
|
+
const booted = (await upstreamStartElizaWithPgliteCompat({
|
|
1152
|
+
...options,
|
|
1153
|
+
headless: true,
|
|
1154
|
+
serverOnly: false,
|
|
1155
|
+
})) ?? undefined;
|
|
1156
|
+
const repaired = booted ? await repairRuntimeAfterBoot(booted) : booted;
|
|
1157
|
+
earlyCompatState.current = repaired ?? null;
|
|
1158
|
+
return repaired;
|
|
1159
|
+
};
|
|
1160
|
+
// Desktop launcher sets ELIZA_API_PORT (default 31337) to match the
|
|
1161
|
+
// renderer's hardcoded API base; honor it when present. CLI/server-only
|
|
1162
|
+
// mode (no ELIZA_API_PORT) keeps the legacy `resolveServerOnlyPort`
|
|
1163
|
+
// default (2138) so this change is transparent for non-desktop users.
|
|
1164
|
+
const apiPort = process.env.ELIZA_API_PORT
|
|
1165
|
+
? resolveDesktopApiPort(process.env)
|
|
1166
|
+
: resolveServerOnlyPort(process.env);
|
|
1167
|
+
let actualApiPort;
|
|
1168
|
+
let updateRuntime;
|
|
1169
|
+
let updateStartup;
|
|
1170
|
+
bootLap("startEliza:before startApiServer (config/registry/embedding setup done)");
|
|
1171
|
+
try {
|
|
1172
|
+
// Bind the API server FIRST with no runtime yet (state "starting"), so
|
|
1173
|
+
// the desktop webview connects + hydrates in PARALLEL with the heavier
|
|
1174
|
+
// agent boot instead of waiting the full boot. The runtime is wired in
|
|
1175
|
+
// via updateRuntime once it finishes booting below. Mirrors the
|
|
1176
|
+
// dev-server's bind-first orchestration.
|
|
1177
|
+
const startedApiServer = await startApiServer({
|
|
1178
|
+
port: apiPort,
|
|
1179
|
+
initialAgentState: "starting",
|
|
1180
|
+
onRestart: async () => {
|
|
1181
|
+
if (currentRuntime) {
|
|
1182
|
+
await upstreamShutdownRuntime(currentRuntime, "server-only restart");
|
|
1183
|
+
}
|
|
1184
|
+
currentRuntime = await bootServerOnlyRuntime();
|
|
1185
|
+
return currentRuntime ?? null;
|
|
1186
|
+
},
|
|
1187
|
+
});
|
|
1188
|
+
actualApiPort = startedApiServer.port;
|
|
1189
|
+
updateRuntime = startedApiServer.updateRuntime;
|
|
1190
|
+
updateStartup = startedApiServer.updateStartup;
|
|
1191
|
+
}
|
|
1192
|
+
catch (apiErr) {
|
|
1193
|
+
const apiErrMsg = apiErr instanceof Error
|
|
1194
|
+
? (apiErr.stack ?? apiErr.message)
|
|
1195
|
+
: String(apiErr);
|
|
1196
|
+
logger.error(`[eliza] API server failed to start: ${apiErrMsg}`);
|
|
1197
|
+
console.error(apiErrMsg);
|
|
1198
|
+
if (options?.serverOnly) {
|
|
1199
|
+
process.exit(1);
|
|
1200
|
+
}
|
|
1201
|
+
throw apiErr;
|
|
741
1202
|
}
|
|
742
|
-
const { startApiServer } = await import("../api/server");
|
|
743
|
-
const apiPort = resolveServerOnlyPort(process.env);
|
|
744
|
-
const { port: actualApiPort } = await startApiServer({
|
|
745
|
-
port: apiPort,
|
|
746
|
-
runtime: currentRuntime,
|
|
747
|
-
onRestart: async () => {
|
|
748
|
-
if (!currentRuntime) {
|
|
749
|
-
return null;
|
|
750
|
-
}
|
|
751
|
-
await upstreamShutdownRuntime(currentRuntime, "server-only restart");
|
|
752
|
-
const restarted = (await upstreamStartElizaWithPgliteCompat({
|
|
753
|
-
...options,
|
|
754
|
-
headless: true,
|
|
755
|
-
serverOnly: false,
|
|
756
|
-
})) ?? undefined;
|
|
757
|
-
currentRuntime = restarted
|
|
758
|
-
? await repairRuntimeAfterBoot(restarted)
|
|
759
|
-
: undefined;
|
|
760
|
-
return currentRuntime ?? null;
|
|
761
|
-
},
|
|
762
|
-
});
|
|
763
1203
|
// WHY: `startApiServer` may bind a different port than requested (busy
|
|
764
1204
|
// socket, upstream policy). Shells, scripts, and follow-up code reading
|
|
765
1205
|
// env must match the real listener or health checks and user-facing URLs
|
|
@@ -768,14 +1208,35 @@ export async function startEliza(options) {
|
|
|
768
1208
|
overwriteUiPort: true,
|
|
769
1209
|
});
|
|
770
1210
|
// Invalidate cached CORS port set so the new port is allowed.
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
}
|
|
775
|
-
catch { }
|
|
776
|
-
logger.info(`[eliza] API server listening on http://localhost:${actualApiPort}`);
|
|
1211
|
+
// server-cors is statically imported at the top of this module — the
|
|
1212
|
+
// previous dynamic import was INEFFECTIVE_DYNAMIC_IMPORT.
|
|
1213
|
+
invalidateCorsAllowedPorts();
|
|
1214
|
+
logger.info(`[eliza] API server listening on http://localhost:${actualApiPort} (agent booting…)`);
|
|
777
1215
|
console.log(`[eliza] Control UI: http://localhost:${actualApiPort}`);
|
|
1216
|
+
bootLap("startEliza:API bound (webview can connect, ready:false)");
|
|
1217
|
+
// Now boot the runtime; the API is already reachable (state "starting"),
|
|
1218
|
+
// so the UI is connecting + hydrating while this runs, then flips to
|
|
1219
|
+
// "running" once the agent is ready.
|
|
1220
|
+
currentRuntime = await bootServerOnlyRuntime();
|
|
1221
|
+
if (!currentRuntime) {
|
|
1222
|
+
updateStartup?.({ phase: "error", state: "error" });
|
|
1223
|
+
return currentRuntime;
|
|
1224
|
+
}
|
|
1225
|
+
updateRuntime?.(currentRuntime);
|
|
1226
|
+
updateStartup?.({ phase: "running", attempt: 0, state: "running" });
|
|
1227
|
+
bootLap("startEliza:runtime booted + ready:true");
|
|
778
1228
|
console.log("[eliza] Server running. Press Ctrl+C to stop.");
|
|
1229
|
+
const { buildSandboxRegistryFromEnv } = await import("../services/sandbox-registry.js");
|
|
1230
|
+
const sandboxRegistry = buildSandboxRegistryFromEnv();
|
|
1231
|
+
if (sandboxRegistry) {
|
|
1232
|
+
try {
|
|
1233
|
+
await sandboxRegistry.register();
|
|
1234
|
+
}
|
|
1235
|
+
catch (err) {
|
|
1236
|
+
logger.error(`[eliza] Failed to register sandbox in Redis (gateways will not route inbound platform messages here until the next heartbeat succeeds): ${formatError(err)}`);
|
|
1237
|
+
}
|
|
1238
|
+
sandboxRegistry.startHeartbeat(30_000);
|
|
1239
|
+
}
|
|
779
1240
|
const keepAlive = setInterval(() => { }, 1 << 30);
|
|
780
1241
|
let isCleaningUp = false;
|
|
781
1242
|
const cleanup = async () => {
|
|
@@ -789,8 +1250,17 @@ export async function startEliza(options) {
|
|
|
789
1250
|
logger.warn("[eliza] Shutdown timed out after 10s — forcing exit");
|
|
790
1251
|
process.exit(1);
|
|
791
1252
|
}, 10_000);
|
|
792
|
-
forceExitTimer.unref
|
|
1253
|
+
forceExitTimer.unref();
|
|
793
1254
|
stopTelegramBotPolling("SIGINT");
|
|
1255
|
+
if (sandboxRegistry) {
|
|
1256
|
+
sandboxRegistry.stopHeartbeat();
|
|
1257
|
+
try {
|
|
1258
|
+
await sandboxRegistry.unregister();
|
|
1259
|
+
}
|
|
1260
|
+
catch (err) {
|
|
1261
|
+
logger.warn(`[eliza] Sandbox unregister failed (keys will expire via TTL): ${formatError(err)}`);
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
794
1264
|
if (currentRuntime) {
|
|
795
1265
|
await upstreamShutdownRuntime(currentRuntime, "server-only shutdown");
|
|
796
1266
|
}
|
|
@@ -815,13 +1285,27 @@ export async function startEliza(options) {
|
|
|
815
1285
|
return currentRuntime;
|
|
816
1286
|
}
|
|
817
1287
|
const runtime = await upstreamStartElizaWithPgliteCompat(options);
|
|
818
|
-
|
|
1288
|
+
const repaired = runtime ? await repairRuntimeAfterBoot(runtime) : runtime;
|
|
1289
|
+
// Same wiring as the serverOnly branch above — hand the live runtime to
|
|
1290
|
+
// the early-installed compat wrapper so its dispatcher engages.
|
|
1291
|
+
if (repaired) {
|
|
1292
|
+
earlyCompatState.current = repaired;
|
|
1293
|
+
}
|
|
1294
|
+
return repaired;
|
|
819
1295
|
}
|
|
820
1296
|
finally {
|
|
821
1297
|
syncElizaEnvAliases();
|
|
822
1298
|
}
|
|
823
1299
|
}
|
|
824
1300
|
function isDirectRuntimeRun() {
|
|
1301
|
+
if (globalThis
|
|
1302
|
+
.__ELIZA_MOBILE_BUNDLE__ === true ||
|
|
1303
|
+
globalThis
|
|
1304
|
+
.__ELIZA_DISABLE_DIRECT_RUN === true ||
|
|
1305
|
+
process.argv.includes("ios-bridge") ||
|
|
1306
|
+
process.env.ELIZA_DISABLE_DIRECT_RUN === "1") {
|
|
1307
|
+
return false;
|
|
1308
|
+
}
|
|
825
1309
|
const scriptArg = process.argv[1];
|
|
826
1310
|
if (!scriptArg) {
|
|
827
1311
|
return false;
|
|
@@ -856,7 +1340,7 @@ if (isDirectRuntimeRun()) {
|
|
|
856
1340
|
}
|
|
857
1341
|
else {
|
|
858
1342
|
startEliza().catch((err) => {
|
|
859
|
-
console.error("[eliza] Fatal error:",
|
|
1343
|
+
console.error("[eliza] Fatal error:", formatErrorWithStack(err));
|
|
860
1344
|
process.exit(1);
|
|
861
1345
|
});
|
|
862
1346
|
}
|