@elizaos/app-core 2.0.3-beta.2 → 2.0.3-beta.4
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 +5 -5
- package/api/auth/audit.d.ts +1 -1
- package/api/auth/auth-context.d.ts +1 -1
- package/api/auth/bootstrap-token.d.ts +1 -1
- package/api/auth/sessions.d.ts +1 -1
- package/api/auth-bootstrap-routes.d.ts +1 -1
- package/api/auth-pairing-routes.d.ts +1 -1
- package/api/auth-pairing-routes.d.ts.map +1 -1
- package/api/auth-pairing-routes.js +2 -3
- package/api/auth-session-routes.d.ts +2 -2
- package/api/auth.d.ts +1 -1
- package/api/automations-compat-routes.d.ts +1 -1
- package/api/background-tasks-routes.d.ts +1 -1
- package/api/catalog-routes.d.ts +1 -1
- package/api/cloud-voice-routes.d.ts +1 -1
- package/api/compat-route-shared.d.ts +12 -5
- package/api/compat-route-shared.d.ts.map +1 -1
- package/api/compat-route-shared.js +22 -187
- package/api/database-rows-compat-routes.d.ts +1 -1
- package/api/dev-compat-routes.d.ts +1 -1
- package/api/dev-route-catalog.d.ts.map +1 -1
- package/api/dev-route-catalog.js +20 -0
- 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 +1 -1
- package/api/internal-routes.d.ts +1 -1
- package/api/runtime-mode-routes.d.ts +1 -1
- package/api/secrets-manager-routes.d.ts.map +1 -1
- package/api/sensitive-request-routes.d.ts +2 -2
- package/api/server-config-filter.d.ts.map +1 -1
- package/api/server-config-filter.js +0 -1
- package/api/server-first-run-helpers.d.ts.map +1 -1
- package/api/server-first-run-helpers.js +0 -3
- package/api/server.d.ts +8 -8
- package/api/server.d.ts.map +1 -1
- package/api/server.js +13 -59
- package/api/training-benchmarks.d.ts +1 -1
- package/api/training-benchmarks.d.ts.map +1 -1
- package/api/training-benchmarks.js +31 -9
- package/api/workbench-compat-routes.d.ts +1 -1
- package/benchmark/server-utils.d.ts +2 -2
- package/browser.d.ts +4 -4
- package/cli/plugins-cli.d.ts.map +1 -1
- package/cli/plugins-cli.js +5 -0
- 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 +187 -0
- package/cli/program/register.dashboard.d.ts.map +1 -1
- package/cli/program/register.dashboard.js +11 -1
- package/cli/program.d.ts +1 -1
- package/first-run/first-run-config.d.ts +1 -1
- package/index.d.ts +46 -47
- package/index.d.ts.map +1 -1
- package/index.js +3 -7
- package/package.json +42 -36
- package/packaging/PUBLISHING_GUIDE.md +20 -20
- package/platform/elizaos-agent-browser-stub.d.ts +0 -1
- package/platform/elizaos-agent-browser-stub.d.ts.map +1 -1
- package/platform/elizaos-agent-browser-stub.js +0 -1
- package/platform/ios-runtime-bridge.d.ts.map +1 -1
- package/platform/ios-runtime-bridge.js +0 -1
- package/platform/native-plugin-entrypoints.d.ts +2 -2
- package/platforms/android/app/build.gradle +30 -7
- package/platforms/android/app/src/main/elizavoice-jni/elizavoice-jni.cpp +179 -35
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaAgentService.java +60 -32
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaBionicInferenceServer.java +405 -65
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaVoiceNative.java +35 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaVoicePlugin.java +13 -6
- 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/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/colors.xml +5 -1
- package/platforms/android/app/src/main/res/values/ic_launcher_background.xml +1 -1
- package/platforms/android/app/src/main/res/values/styles.xml +4 -1
- package/platforms/electrobun/electrobun.config.ts +0 -1
- package/platforms/electrobun/native/macos/window-effects.mm +4 -0
- package/platforms/electrobun/package.json +11 -9
- package/platforms/electrobun/remotes/local-model/src/bun/eliza1-catalog.ts +1 -1
- package/platforms/electrobun/remotes/runtime/src/dev/phase2-smoke.ts +10 -5
- package/platforms/electrobun/remotes/runtime/src/dev/phase3-smoke.ts +11 -15
- package/platforms/electrobun/src/application-menu.ts +0 -7
- package/platforms/electrobun/src/desktop-http-request.test.ts +30 -1
- package/platforms/electrobun/src/desktop-http-request.ts +14 -2
- package/platforms/electrobun/src/desktop-test-bridge-server.ts +28 -0
- package/platforms/electrobun/src/fatal-shutdown.test.ts +3 -7
- package/platforms/electrobun/src/index.ts +64 -13
- package/platforms/electrobun/src/lifecycle/api-base-owner.test.ts +83 -0
- package/platforms/electrobun/src/lifecycle/api-base-owner.ts +37 -16
- package/platforms/electrobun/src/native/agent.ts +28 -17
- package/platforms/electrobun/src/native/credentials.ts +6 -1
- package/platforms/electrobun/src/native/desktop-window.test.ts +142 -26
- package/platforms/electrobun/src/native/desktop.ts +8 -4
- package/platforms/electrobun/src/native/index.ts +6 -0
- package/platforms/electrobun/src/native/remote-plugin-host.ts +18 -8
- package/platforms/electrobun/src/preload.js +1 -1
- package/platforms/electrobun/src/voice/voice-live-validation.test.ts +10 -5
- package/platforms/electrobun/src/voice/voice-runtime-adapter.ts +3 -2
- package/platforms/electrobun/src/voice/voice-service.test.ts +26 -0
- package/platforms/electrobun/src/voice/voice-service.ts +57 -17
- package/platforms/electrobun/tsconfig.json +17 -1
- package/platforms/ios/App/App/Base.lproj/LaunchScreen.storyboard +4 -6
- package/registry/index.d.ts +1 -6
- package/registry/index.d.ts.map +1 -1
- package/registry/index.js +9 -101
- package/runtime/android-avf-microdroid-bridge.d.ts +1 -1
- 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/index.d.ts +5 -5
- package/runtime/dev-server.js +11 -2
- package/runtime/eliza.d.ts.map +1 -1
- package/runtime/eliza.js +18 -8
- package/runtime/mode/route-mode-guard.d.ts +1 -1
- package/runtime/mode/route-mode-matrix.d.ts +1 -1
- package/runtime/voice-warmup.d.ts +4 -19
- package/runtime/voice-warmup.d.ts.map +1 -1
- package/runtime/voice-warmup.js +4 -14
- package/scripts/aosp/README.md +10 -1
- package/scripts/aosp/compile-libllama-paths.mjs +110 -0
- package/scripts/aosp/compile-libllama-zig-pin.test.mjs +147 -0
- package/scripts/aosp/compile-libllama.mjs +377 -81
- package/scripts/aosp/compile-libllama.test.mjs +133 -0
- package/scripts/aosp/compile-shim.mjs +21 -1
- package/scripts/aosp/deploy-pixel.mjs +1 -1
- package/scripts/aosp/stage-default-models.mjs +24 -31
- package/scripts/aosp/stage-default-models.test.mjs +23 -0
- package/scripts/assert-required-bundled-packages.test.ts +22 -1
- package/scripts/build-helpers/verify-fused-symbols.mjs +33 -0
- package/scripts/build-helpers/verify-fused-symbols.test.mjs +0 -0
- package/scripts/build-image.sh +1 -3
- package/scripts/build-llama-cpp-mtp.mjs +17 -16
- package/scripts/check-i18n.mjs +0 -1
- package/scripts/copy-runtime-node-modules.ts +147 -0
- package/scripts/desktop-build.mjs +317 -4
- package/scripts/docker-ci-smoke.sh +33 -8
- package/scripts/ensure-type-package-aliases.mjs +1 -1
- package/scripts/ios-xcframework/run-physical-device-smoke.mjs +1 -1
- package/scripts/lib/agent-source-watcher.mjs +0 -1
- 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/duet-bridge.mjs +1 -1
- package/scripts/lib/ios-plist-url-scheme.mjs +80 -0
- package/scripts/lib/mobile-build-decisions.mjs +97 -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 +13 -4
- 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/websocket-pending-queue.ts +92 -0
- package/scripts/link-docker-local-app-packages.mjs +6 -0
- package/scripts/playwright-ui-live-stack.ts +430 -144
- package/scripts/playwright-ui-smoke-api-stub.mjs +160 -168
- package/scripts/run-local-plugin-live-smoke.mjs +1 -6
- 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 +408 -86
- package/scripts/serve-real-local-agent.ts +72 -0
- package/scripts/stage-desktop-fused-lib.mjs +43 -14
- package/scripts/verify-ondevice-artifact.mjs +111 -0
- package/scripts/voice-attribution-smoke.ts +144 -38
- package/scripts/voice-duet.mjs +6 -6
- package/scripts/voice-e2e-hardware.ts +22 -16
- package/scripts/voice-interactive.mjs +16 -45
- package/security/agent-vault-id.d.ts +1 -1
- package/security/platform-secure-store-node.d.ts +1 -1
- package/services/ambient-audio/consent.d.ts +1 -1
- package/services/ambient-audio/index.d.ts +6 -6
- package/services/ambient-audio/replay-buffer.d.ts +1 -1
- package/services/ambient-audio/response-gate.d.ts +1 -1
- package/services/ambient-audio/service.d.ts +3 -3
- package/services/connector-target-catalog.d.ts +1 -1
- package/services/sensitive-requests/index.d.ts +6 -6
- package/services/steward-sidecar/wallet-setup.d.ts +1 -1
- package/services/steward-sidecar.d.ts +3 -3
- package/services/tunnel-to-mobile/index.d.ts +1 -1
- package/services/vault-bootstrap.d.ts.map +1 -1
- package/services/vault-bootstrap.js +14 -10
- package/services/voice-profiles/diarization-pipeline.d.ts +1 -1
- package/services/voice-profiles/index.d.ts +11 -11
- package/services/voice-profiles/owner-confidence.d.ts +1 -1
- package/services/voice-profiles/private-challenge.d.ts +1 -1
- package/services/voice-profiles/store.d.ts +1 -1
- package/test/helpers/live-provider.test.ts +91 -1
- package/test/helpers/live-provider.ts +195 -51
- 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 +1 -0
- package/ui-compat.d.ts.map +1 -1
- package/ui-compat.js +4 -0
- package/platforms/electrobun/docs/convergence-audit.json +0 -3505
- package/platforms/electrobun/docs/convergence-audit.md +0 -694
- package/platforms/electrobun/scripts/ensure-whisper-gguf.sh +0 -55
- package/platforms/electrobun/scripts/ensure-whisper-model.sh +0 -35
- package/platforms/electrobun/scripts/generate-convergence-audit.ts +0 -1203
- package/platforms/electrobun/src/native/whisper-env.test.ts +0 -71
- package/platforms/electrobun/src/native/whisper-env.ts +0 -68
- package/registry/app-registry.d.ts +0 -14
- package/registry/app-registry.d.ts.map +0 -1
- package/registry/app-registry.js +0 -29
- package/registry/entries/apps/app-polymarket.json +0 -31
- package/registry/entries/apps/clawville.json +0 -27
- package/registry/entries/apps/companion.json +0 -28
- package/registry/entries/apps/database-viewer.json +0 -27
- package/registry/entries/apps/defense-of-the-agents.json +0 -27
- package/registry/entries/apps/documents.json +0 -30
- package/registry/entries/apps/feed.json +0 -27
- package/registry/entries/apps/hyperliquid.json +0 -31
- package/registry/entries/apps/log-viewer.json +0 -27
- package/registry/entries/apps/memory-viewer.json +0 -27
- package/registry/entries/apps/model-tester.json +0 -31
- package/registry/entries/apps/plugin-viewer.json +0 -27
- package/registry/entries/apps/relationship-viewer.json +0 -27
- package/registry/entries/apps/runtime-debugger.json +0 -27
- package/registry/entries/apps/shopify.json +0 -31
- package/registry/entries/apps/skills-viewer.json +0 -27
- package/registry/entries/apps/steward.json +0 -31
- package/registry/entries/apps/training.json +0 -54
- package/registry/entries/apps/trajectory-viewer.json +0 -27
- package/registry/entries/apps/vincent.json +0 -31
- package/registry/entries/connectors/bluebubbles.json +0 -99
- package/registry/entries/connectors/bluesky.json +0 -173
- package/registry/entries/connectors/discord.json +0 -119
- package/registry/entries/connectors/farcaster.json +0 -174
- package/registry/entries/connectors/feishu.json +0 -79
- package/registry/entries/connectors/google-chat.json +0 -120
- package/registry/entries/connectors/google.json +0 -82
- package/registry/entries/connectors/imessage.json +0 -96
- package/registry/entries/connectors/instagram.json +0 -64
- package/registry/entries/connectors/line.json +0 -86
- package/registry/entries/connectors/matrix.json +0 -94
- package/registry/entries/connectors/mattermost.json +0 -110
- package/registry/entries/connectors/msteams.json +0 -104
- package/registry/entries/connectors/nextcloud-talk.json +0 -104
- package/registry/entries/connectors/nostr.json +0 -70
- package/registry/entries/connectors/signal.json +0 -81
- package/registry/entries/connectors/slack.json +0 -102
- package/registry/entries/connectors/telegram.json +0 -71
- package/registry/entries/connectors/tlon.json +0 -94
- package/registry/entries/connectors/twitch.json +0 -110
- package/registry/entries/connectors/whatsapp.json +0 -113
- package/registry/entries/connectors/x.json +0 -231
- package/registry/entries/connectors/zalo.json +0 -112
- package/registry/entries/connectors/zalouser.json +0 -122
- package/registry/entries/plugins/agent-orchestrator.json +0 -33
- package/registry/entries/plugins/agent-skills.json +0 -72
- package/registry/entries/plugins/anthropic.json +0 -73
- package/registry/entries/plugins/app-control.json +0 -23
- package/registry/entries/plugins/auto-trader.json +0 -203
- package/registry/entries/plugins/background-runner.json +0 -26
- package/registry/entries/plugins/blooio.json +0 -102
- package/registry/entries/plugins/browser.json +0 -75
- package/registry/entries/plugins/cli.json +0 -40
- package/registry/entries/plugins/clipboard.json +0 -44
- package/registry/entries/plugins/coding-tools.json +0 -71
- package/registry/entries/plugins/commands.json +0 -63
- package/registry/entries/plugins/computeruse.json +0 -74
- package/registry/entries/plugins/copilot-proxy.json +0 -93
- package/registry/entries/plugins/directives.json +0 -63
- package/registry/entries/plugins/edge-tts.json +0 -97
- package/registry/entries/plugins/elevenlabs.json +0 -169
- package/registry/entries/plugins/elizacloud.json +0 -208
- package/registry/entries/plugins/evm.json +0 -134
- package/registry/entries/plugins/experience.json +0 -34
- package/registry/entries/plugins/facewear.json +0 -131
- package/registry/entries/plugins/form.json +0 -26
- package/registry/entries/plugins/github.json +0 -93
- package/registry/entries/plugins/gmail-watch.json +0 -25
- package/registry/entries/plugins/goals.json +0 -77
- package/registry/entries/plugins/google-genai.json +0 -106
- package/registry/entries/plugins/groq.json +0 -93
- package/registry/entries/plugins/hedera.json +0 -48
- package/registry/entries/plugins/inmemorydb.json +0 -25
- package/registry/entries/plugins/linear.json +0 -51
- package/registry/entries/plugins/local-inference.json +0 -137
- package/registry/entries/plugins/local-storage.json +0 -36
- package/registry/entries/plugins/localdb.json +0 -25
- package/registry/entries/plugins/mcp.json +0 -44
- package/registry/entries/plugins/memory.json +0 -124
- package/registry/entries/plugins/minecraft.json +0 -79
- package/registry/entries/plugins/moltbook.json +0 -83
- package/registry/entries/plugins/music.json +0 -155
- package/registry/entries/plugins/mysticism.json +0 -48
- package/registry/entries/plugins/nearai.json +0 -82
- package/registry/entries/plugins/ngrok.json +0 -69
- package/registry/entries/plugins/ollama.json +0 -96
- package/registry/entries/plugins/openai.json +0 -189
- package/registry/entries/plugins/openrouter.json +0 -188
- package/registry/entries/plugins/pdf.json +0 -26
- package/registry/entries/plugins/plugin-manager.json +0 -23
- package/registry/entries/plugins/prose.json +0 -48
- package/registry/entries/plugins/rlm.json +0 -26
- package/registry/entries/plugins/roblox.json +0 -88
- package/registry/entries/plugins/rss.json +0 -64
- package/registry/entries/plugins/s3-storage.json +0 -91
- package/registry/entries/plugins/scheduling.json +0 -35
- package/registry/entries/plugins/shell.json +0 -94
- package/registry/entries/plugins/social-alpha.json +0 -72
- package/registry/entries/plugins/tailscale.json +0 -81
- package/registry/entries/plugins/tee.json +0 -53
- package/registry/entries/plugins/todos.json +0 -26
- package/registry/entries/plugins/trajectory-logger.json +0 -33
- package/registry/entries/plugins/trust.json +0 -39
- package/registry/entries/plugins/tts.json +0 -71
- package/registry/entries/plugins/tunnel.json +0 -45
- package/registry/entries/plugins/twilio.json +0 -168
- package/registry/entries/plugins/vercel-ai-gateway.json +0 -128
- package/registry/entries/plugins/video.json +0 -23
- package/registry/entries/plugins/vision.json +0 -43
- package/registry/entries/plugins/webhooks.json +0 -23
- package/registry/entries/plugins/workflow.json +0 -25
- package/registry/entries/plugins/xai.json +0 -75
- package/registry/loader.d.ts +0 -28
- package/registry/loader.d.ts.map +0 -1
- package/registry/loader.js +0 -158
- package/registry/schema.d.ts +0 -1199
- package/registry/schema.d.ts.map +0 -1
- package/registry/schema.js +0 -300
- package/scripts/patches/llama-mobile-kokoro-tts.patch +0 -480
- package/scripts/release-workflow-drift.test.ts +0 -57
- 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
|
@@ -41,8 +41,8 @@ import java.nio.ByteOrder;
|
|
|
41
41
|
* contextCreate({ bundleDir }) -> { handle }
|
|
42
42
|
* contextDestroy({ handle })
|
|
43
43
|
* pipelineOpen({ ctx }) -> { handle }
|
|
44
|
-
* pipelineProcess({ handle, pcm16 })
|
|
45
|
-
* pipelineFlush({ handle })
|
|
44
|
+
* pipelineProcess({ handle, pcm16, includePcm? }) -> { turns: [{turnId,samples,...,embedding?,labels?,pcm?}] }
|
|
45
|
+
* pipelineFlush({ handle, includePcm? }) -> { turns: [...] }
|
|
46
46
|
* pipelineReset({ handle }) / pipelineClose({ handle })
|
|
47
47
|
* wakewordOpen({ ctx, headName }) -> { handle }
|
|
48
48
|
* wakewordScore({ handle, pcm16 }) -> { scores: number[] }
|
|
@@ -273,10 +273,11 @@ public class ElizaVoicePlugin extends Plugin {
|
|
|
273
273
|
if (!ensureLoadedOrReject(call)) return;
|
|
274
274
|
long handle = longArg(call, "handle");
|
|
275
275
|
String pcm16 = call.getString("pcm16", "");
|
|
276
|
+
boolean includePcm = Boolean.TRUE.equals(call.getBoolean("includePcm", false));
|
|
276
277
|
try {
|
|
277
278
|
float[] pcm = decodePcm16(pcm16);
|
|
278
279
|
String turnsJson = ElizaVoiceNative.nativePipelineProcess(handle, pcm);
|
|
279
|
-
call.resolve(buildTurns(handle, turnsJson));
|
|
280
|
+
call.resolve(buildTurns(handle, turnsJson, includePcm));
|
|
280
281
|
} catch (Throwable e) {
|
|
281
282
|
call.reject("pipelineProcess failed: " + e.getMessage());
|
|
282
283
|
}
|
|
@@ -286,16 +287,17 @@ public class ElizaVoicePlugin extends Plugin {
|
|
|
286
287
|
public void pipelineFlush(PluginCall call) {
|
|
287
288
|
if (!ensureLoadedOrReject(call)) return;
|
|
288
289
|
long handle = longArg(call, "handle");
|
|
290
|
+
boolean includePcm = Boolean.TRUE.equals(call.getBoolean("includePcm", false));
|
|
289
291
|
try {
|
|
290
292
|
String turnsJson = ElizaVoiceNative.nativePipelineFlush(handle);
|
|
291
|
-
call.resolve(buildTurns(handle, turnsJson));
|
|
293
|
+
call.resolve(buildTurns(handle, turnsJson, includePcm));
|
|
292
294
|
} catch (Throwable e) {
|
|
293
295
|
call.reject("pipelineFlush failed: " + e.getMessage());
|
|
294
296
|
}
|
|
295
297
|
}
|
|
296
298
|
|
|
297
|
-
/** Attach per-turn
|
|
298
|
-
private JSObject buildTurns(long handle, String turnsJson) throws JSONException {
|
|
299
|
+
/** Attach per-turn native payloads to the native turn JSON. */
|
|
300
|
+
private JSObject buildTurns(long handle, String turnsJson, boolean includePcm) throws JSONException {
|
|
299
301
|
JSONArray native_ = new JSONArray(turnsJson);
|
|
300
302
|
JSArray turns = new JSArray();
|
|
301
303
|
for (int i = 0; i < native_.length(); i++) {
|
|
@@ -306,6 +308,11 @@ public class ElizaVoicePlugin extends Plugin {
|
|
|
306
308
|
turn.put("embeddingDim", emb != null ? emb.length : 0);
|
|
307
309
|
turn.put("labels", encodeBytes(labels));
|
|
308
310
|
turn.put("labelCount", labels != null ? labels.length : 0);
|
|
311
|
+
if (includePcm) {
|
|
312
|
+
float[] pcm = ElizaVoiceNative.nativePipelineTurnPcm(handle, i);
|
|
313
|
+
turn.put("pcm", encodeFloats(pcm));
|
|
314
|
+
turn.put("pcmSampleRate", 16000);
|
|
315
|
+
}
|
|
309
316
|
turns.put(turn);
|
|
310
317
|
}
|
|
311
318
|
JSObject r = new JSObject();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<resources>
|
|
3
|
+
<!-- Brand accent (logos, brand surfaces). -->
|
|
3
4
|
<color name="eliza_orange">#FF5800</color>
|
|
4
|
-
|
|
5
|
+
<!-- Launch surface: matches the default home-background orange (#ef5a1f)
|
|
6
|
+
so the native splash + launch status bar flow into the React home with
|
|
7
|
+
no orange flash (issue #9565). -->
|
|
8
|
+
<color name="splash_background">#ef5a1f</color>
|
|
5
9
|
<color name="colorPrimary">#FF5800</color>
|
|
6
10
|
<color name="colorPrimaryDark">#FF5800</color>
|
|
7
11
|
<color name="colorAccent">#FF5800</color>
|
|
@@ -30,7 +30,10 @@
|
|
|
30
30
|
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
|
|
31
31
|
<item name="android:background">@drawable/splash</item>
|
|
32
32
|
<item name="android:windowSplashScreenBackground">@color/splash_background</item>
|
|
33
|
-
|
|
33
|
+
<!-- Launch status bar matches the splash + home background (#ef5a1f),
|
|
34
|
+
not the brand accent, so there is no orange→orange flash before the
|
|
35
|
+
ambient home renders (issue #9565). -->
|
|
36
|
+
<item name="android:statusBarColor">@color/splash_background</item>
|
|
34
37
|
<!-- After the launch splash, swap to the no-action-bar app theme so the
|
|
35
38
|
Capacitor WebView fills the window. Without this (paired with the
|
|
36
39
|
installSplashScreen() call in MainActivity) the activity keeps this
|
|
@@ -547,7 +547,6 @@ export function createElectrobunConfig(): ElectrobunConfig {
|
|
|
547
547
|
// Plugins — initialized by the API subprocess, never the bun shell.
|
|
548
548
|
"@elizaos/plugin-sql",
|
|
549
549
|
"@elizaos/plugin-local-inference",
|
|
550
|
-
"@elizaos/plugin-local-inference",
|
|
551
550
|
// Database stack pulled in by plugin-sql.
|
|
552
551
|
"@electric-sql/pglite",
|
|
553
552
|
"drizzle-orm",
|
|
@@ -811,8 +811,12 @@ API_AVAILABLE(macos(10.14))
|
|
|
811
811
|
completionHandler(UNNotificationPresentationOptionBanner |
|
|
812
812
|
UNNotificationPresentationOptionSound);
|
|
813
813
|
} else {
|
|
814
|
+
// Alert is the correct foreground presentation option on macOS 10.x.
|
|
815
|
+
#pragma clang diagnostic push
|
|
816
|
+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
814
817
|
completionHandler(UNNotificationPresentationOptionAlert |
|
|
815
818
|
UNNotificationPresentationOptionSound);
|
|
819
|
+
#pragma clang diagnostic pop
|
|
816
820
|
}
|
|
817
821
|
}
|
|
818
822
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/electrobun",
|
|
3
|
-
"version": "2.0.3-beta.
|
|
3
|
+
"version": "2.0.3-beta.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"assets",
|
|
@@ -25,13 +25,15 @@
|
|
|
25
25
|
"build:native-effects": "bash scripts/build-macos-effects.sh"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@elizaos/agent": "2.0.3-beta.
|
|
29
|
-
"@elizaos/app-core": "2.0.3-beta.
|
|
30
|
-
"@elizaos/plugin-browser": "2.0.3-beta.
|
|
31
|
-
"@elizaos/plugin-
|
|
32
|
-
"@elizaos/plugin-
|
|
33
|
-
"@elizaos/
|
|
34
|
-
"
|
|
28
|
+
"@elizaos/agent": "2.0.3-beta.4",
|
|
29
|
+
"@elizaos/app-core": "2.0.3-beta.4",
|
|
30
|
+
"@elizaos/plugin-browser": "2.0.3-beta.4",
|
|
31
|
+
"@elizaos/plugin-capacitor-bridge": "2.0.3-beta.4",
|
|
32
|
+
"@elizaos/plugin-registry": "2.0.3-beta.4",
|
|
33
|
+
"@elizaos/plugin-remote-manifest": "2.0.3-beta.4",
|
|
34
|
+
"@elizaos/plugin-streaming": "2.0.3-beta.4",
|
|
35
|
+
"@elizaos/shared": "2.0.3-beta.4",
|
|
36
|
+
"bonjour-service": "1.4.2",
|
|
35
37
|
"electrobun": "^1.18.1"
|
|
36
38
|
},
|
|
37
39
|
"devDependencies": {
|
|
@@ -44,5 +46,5 @@
|
|
|
44
46
|
"publishConfig": {
|
|
45
47
|
"access": "public"
|
|
46
48
|
},
|
|
47
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "f76f55793a0fb8d6b869dd8ddce03970de061e34"
|
|
48
50
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readPhase2SmokeTestEnv,
|
|
3
|
+
TEST_ENV_NAMES,
|
|
4
|
+
} from "../../../../../../../shared/src/test-env-config.ts";
|
|
1
5
|
import { ElizaRuntimeApiClient } from "../bun/api-client.ts";
|
|
2
6
|
import { serializeError } from "../bun/errors.ts";
|
|
3
7
|
import { RuntimeLogBuffer } from "../bun/log-buffer.ts";
|
|
4
|
-
import { ElizaRuntimeManager } from "../bun/runtime-manager.ts";
|
|
5
8
|
import type { AgentMessageParams } from "../bun/protocol.ts";
|
|
9
|
+
import { ElizaRuntimeManager } from "../bun/runtime-manager.ts";
|
|
6
10
|
|
|
7
11
|
function writeJson(label: string, value: unknown): void {
|
|
8
12
|
process.stdout.write(`${JSON.stringify({ label, value }, null, 2)}\n`);
|
|
@@ -34,6 +38,7 @@ const apiClient = new ElizaRuntimeApiClient({
|
|
|
34
38
|
getAuthToken: () =>
|
|
35
39
|
process.env.ELIZA_RUNTIME_API_TOKEN ?? process.env.ELIZA_API_TOKEN ?? null,
|
|
36
40
|
});
|
|
41
|
+
const phase2Env = readPhase2SmokeTestEnv(process.env);
|
|
37
42
|
|
|
38
43
|
writeJson("initialStatus", manager.status());
|
|
39
44
|
|
|
@@ -60,7 +65,7 @@ await capture("memory.search", () =>
|
|
|
60
65
|
apiClient.searchMemory({ query: "test", limit: 5 }),
|
|
61
66
|
);
|
|
62
67
|
|
|
63
|
-
if (
|
|
68
|
+
if (phase2Env.sendTestMessage) {
|
|
64
69
|
const message: AgentMessageParams = {
|
|
65
70
|
text: "Phase 2 ElizaLaunch API bridge smoke test. Reply briefly.",
|
|
66
71
|
};
|
|
@@ -68,18 +73,18 @@ if (process.env.ELIZA_PHASE2_SEND_TEST_MESSAGE === "1") {
|
|
|
68
73
|
} else {
|
|
69
74
|
writeJson("agent.message", {
|
|
70
75
|
ok: true,
|
|
71
|
-
skipped:
|
|
76
|
+
skipped: `Set ${TEST_ENV_NAMES.phase2.sendTestMessage}=1 to send a real message.`,
|
|
72
77
|
});
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
writeJson("logsTail", manager.logsTail(20));
|
|
76
81
|
|
|
77
|
-
if (
|
|
82
|
+
if (phase2Env.stopAfter) {
|
|
78
83
|
await capture("runtimeStop", () => manager.stop());
|
|
79
84
|
} else {
|
|
80
85
|
writeJson("runtimeStop", {
|
|
81
86
|
ok: true,
|
|
82
|
-
skipped:
|
|
87
|
+
skipped: `Set ${TEST_ENV_NAMES.phase2.stopAfter}=1 to stop after the smoke run.`,
|
|
83
88
|
});
|
|
84
89
|
}
|
|
85
90
|
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readPhase3SmokeTestEnv,
|
|
3
|
+
TEST_ENV_NAMES,
|
|
4
|
+
} from "../../../../../../../shared/src/test-env-config.ts";
|
|
1
5
|
import { ElizaRuntimeApiClient } from "../bun/api-client.ts";
|
|
2
6
|
import { serializeError } from "../bun/errors.ts";
|
|
3
7
|
import { RuntimeLogBuffer } from "../bun/log-buffer.ts";
|
|
8
|
+
import type { AgentMessageStreamEvent } from "../bun/protocol.ts";
|
|
4
9
|
import { ElizaRuntimeManager } from "../bun/runtime-manager.ts";
|
|
5
10
|
import { AgentStreamManager } from "../bun/stream-manager.ts";
|
|
6
|
-
import type { AgentMessageStreamEvent } from "../bun/protocol.ts";
|
|
7
11
|
|
|
8
12
|
function writeJson(label: string, value: unknown): void {
|
|
9
13
|
process.stdout.write(`${JSON.stringify({ label, value }, null, 2)}\n`);
|
|
@@ -28,12 +32,6 @@ async function capture(
|
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
|
|
31
|
-
function parsePositiveInt(value: string | undefined): number | null {
|
|
32
|
-
if (value === undefined || value.trim().length === 0) return null;
|
|
33
|
-
const parsed = Number.parseInt(value, 10);
|
|
34
|
-
return Number.isFinite(parsed) && parsed > 0 ? parsed : null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
35
|
const logBuffer = new RuntimeLogBuffer();
|
|
38
36
|
const manager = new ElizaRuntimeManager({ logBuffer });
|
|
39
37
|
const apiClient = new ElizaRuntimeApiClient({
|
|
@@ -59,6 +57,7 @@ const streamManager = new AgentStreamManager({
|
|
|
59
57
|
},
|
|
60
58
|
log: (line) => logBuffer.push("system", line),
|
|
61
59
|
});
|
|
60
|
+
const phase3Env = readPhase3SmokeTestEnv(process.env);
|
|
62
61
|
|
|
63
62
|
writeJson("initialStatus", manager.status());
|
|
64
63
|
|
|
@@ -85,7 +84,7 @@ if (
|
|
|
85
84
|
writeJson("streamingRoutes", discovery.streamingRoutes);
|
|
86
85
|
}
|
|
87
86
|
|
|
88
|
-
if (
|
|
87
|
+
if (phase3Env.sendStreamMessage) {
|
|
89
88
|
const startResult = await capture("agent.message.stream", () =>
|
|
90
89
|
streamManager.startMessageStream({
|
|
91
90
|
text: "Phase 3 ElizaLaunch streaming bridge smoke test. Reply briefly.",
|
|
@@ -98,9 +97,7 @@ if (process.env.ELIZA_PHASE3_SEND_STREAM_MESSAGE === "1") {
|
|
|
98
97
|
typeof startResult.streamId === "string"
|
|
99
98
|
) {
|
|
100
99
|
const streamId = startResult.streamId;
|
|
101
|
-
const cancelAfterMs =
|
|
102
|
-
process.env.ELIZA_PHASE3_CANCEL_AFTER_MS,
|
|
103
|
-
);
|
|
100
|
+
const cancelAfterMs = phase3Env.cancelAfterMs;
|
|
104
101
|
if (cancelAfterMs !== null) {
|
|
105
102
|
setTimeout(() => {
|
|
106
103
|
void capture("agent.message.stream.cancel", () =>
|
|
@@ -122,19 +119,18 @@ if (process.env.ELIZA_PHASE3_SEND_STREAM_MESSAGE === "1") {
|
|
|
122
119
|
} else {
|
|
123
120
|
writeJson("agent.message.stream", {
|
|
124
121
|
ok: true,
|
|
125
|
-
skipped:
|
|
126
|
-
"Set ELIZA_PHASE3_SEND_STREAM_MESSAGE=1 to send a real streaming message.",
|
|
122
|
+
skipped: `Set ${TEST_ENV_NAMES.phase3.sendStreamMessage}=1 to send a real streaming message.`,
|
|
127
123
|
});
|
|
128
124
|
}
|
|
129
125
|
|
|
130
126
|
writeJson("logsTail", manager.logsTail(20));
|
|
131
127
|
|
|
132
|
-
if (
|
|
128
|
+
if (phase3Env.stopAfter) {
|
|
133
129
|
await capture("runtimeStop", () => manager.stop());
|
|
134
130
|
} else {
|
|
135
131
|
writeJson("runtimeStop", {
|
|
136
132
|
ok: true,
|
|
137
|
-
skipped:
|
|
133
|
+
skipped: `Set ${TEST_ENV_NAMES.phase3.stopAfter}=1 to stop after the smoke run.`,
|
|
138
134
|
});
|
|
139
135
|
}
|
|
140
136
|
|
|
@@ -22,13 +22,6 @@ export interface AppMenuEntry {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
const APP_MENU_ENTRIES: readonly AppMenuEntry[] = [
|
|
25
|
-
{
|
|
26
|
-
slug: "lifeops",
|
|
27
|
-
name: "@elizaos/plugin-personal-assistant",
|
|
28
|
-
displayName: "LifeOps",
|
|
29
|
-
windowPath: "/apps/lifeops",
|
|
30
|
-
hasDetailsPage: true,
|
|
31
|
-
},
|
|
32
25
|
{
|
|
33
26
|
slug: "plugin-viewer",
|
|
34
27
|
name: "@elizaos/app-plugin-viewer",
|
|
@@ -54,11 +54,40 @@ describe("desktopHttpRequest", () => {
|
|
|
54
54
|
"https://agent.example:2138",
|
|
55
55
|
]) {
|
|
56
56
|
expect(() => normalizeDesktopHttpRequest({ url })).toThrow(
|
|
57
|
-
"
|
|
57
|
+
"configured desktop API plain HTTP",
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
+
it("allows the configured external desktop API base even when it is loopback", () => {
|
|
63
|
+
const previous = process.env.ELIZA_DESKTOP_TEST_API_BASE;
|
|
64
|
+
process.env.ELIZA_DESKTOP_TEST_API_BASE = "http://127.0.0.1:2138";
|
|
65
|
+
try {
|
|
66
|
+
expect(
|
|
67
|
+
normalizeDesktopHttpRequest({
|
|
68
|
+
url: "http://127.0.0.1:2138/api/config",
|
|
69
|
+
}),
|
|
70
|
+
).toEqual({
|
|
71
|
+
url: "http://127.0.0.1:2138/api/config",
|
|
72
|
+
method: "GET",
|
|
73
|
+
headers: {},
|
|
74
|
+
body: null,
|
|
75
|
+
timeoutMs: undefined,
|
|
76
|
+
});
|
|
77
|
+
expect(() =>
|
|
78
|
+
normalizeDesktopHttpRequest({
|
|
79
|
+
url: "http://127.0.0.1:31337/api/config",
|
|
80
|
+
}),
|
|
81
|
+
).toThrow("configured desktop API plain HTTP");
|
|
82
|
+
} finally {
|
|
83
|
+
if (typeof previous === "undefined") {
|
|
84
|
+
delete process.env.ELIZA_DESKTOP_TEST_API_BASE;
|
|
85
|
+
} else {
|
|
86
|
+
process.env.ELIZA_DESKTOP_TEST_API_BASE = previous;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
62
91
|
it("times out the full request including response body reads", async () => {
|
|
63
92
|
vi.useFakeTimers();
|
|
64
93
|
vi.stubGlobal(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isLoopbackBindHost, isWildcardBindHost } from "@elizaos/shared";
|
|
2
|
+
import { resolveExternalApiBase } from "./api-base";
|
|
2
3
|
|
|
3
4
|
function isExternalPlainHttpUrl(parsed: URL): boolean {
|
|
4
5
|
return (
|
|
@@ -8,6 +9,14 @@ function isExternalPlainHttpUrl(parsed: URL): boolean {
|
|
|
8
9
|
);
|
|
9
10
|
}
|
|
10
11
|
|
|
12
|
+
function isConfiguredExternalApiBaseUrl(parsed: URL): boolean {
|
|
13
|
+
if (parsed.protocol !== "http:") return false;
|
|
14
|
+
const configured = resolveExternalApiBase(
|
|
15
|
+
process.env as Record<string, string | undefined>,
|
|
16
|
+
).base;
|
|
17
|
+
return Boolean(configured && parsed.origin === configured);
|
|
18
|
+
}
|
|
19
|
+
|
|
11
20
|
export function normalizeDesktopHttpRequest(params: unknown): {
|
|
12
21
|
url: string;
|
|
13
22
|
method: string;
|
|
@@ -23,9 +32,12 @@ export function normalizeDesktopHttpRequest(params: unknown): {
|
|
|
23
32
|
throw new Error("desktopHttpRequest url must be a string.");
|
|
24
33
|
}
|
|
25
34
|
const parsed = new URL(record.url);
|
|
26
|
-
if (
|
|
35
|
+
if (
|
|
36
|
+
!isExternalPlainHttpUrl(parsed) &&
|
|
37
|
+
!isConfiguredExternalApiBaseUrl(parsed)
|
|
38
|
+
) {
|
|
27
39
|
throw new Error(
|
|
28
|
-
"desktopHttpRequest supports only external plain HTTP URLs.",
|
|
40
|
+
"desktopHttpRequest supports only external or configured desktop API plain HTTP URLs.",
|
|
29
41
|
);
|
|
30
42
|
}
|
|
31
43
|
const method = typeof record.method === "string" ? record.method : "GET";
|
|
@@ -161,6 +161,18 @@ export async function startDesktopTestBridgeServer(): Promise<
|
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
+
if (pathname === "/main-window/show" && method === "POST") {
|
|
165
|
+
await getDesktopManager().showWindow();
|
|
166
|
+
json(res, 200, { ok: true });
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (pathname === "/main-window/focus" && method === "POST") {
|
|
171
|
+
await getDesktopManager().focusWindow();
|
|
172
|
+
json(res, 200, { ok: true });
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
|
|
164
176
|
if (pathname === "/main-window/bounds") {
|
|
165
177
|
const snapshot = getCurrentMainWindowSnapshot();
|
|
166
178
|
if (!snapshot.present) {
|
|
@@ -224,6 +236,22 @@ export async function startDesktopTestBridgeServer(): Promise<
|
|
|
224
236
|
return;
|
|
225
237
|
}
|
|
226
238
|
|
|
239
|
+
if (pathname === "/app/quit" && method === "POST") {
|
|
240
|
+
json(res, 202, { ok: true });
|
|
241
|
+
setTimeout(() => {
|
|
242
|
+
void getDesktopManager()
|
|
243
|
+
.quit()
|
|
244
|
+
.catch((error: unknown) => {
|
|
245
|
+
console.warn(
|
|
246
|
+
`[DesktopTestBridge] Graceful quit failed: ${
|
|
247
|
+
error instanceof Error ? error.message : String(error)
|
|
248
|
+
}`,
|
|
249
|
+
);
|
|
250
|
+
});
|
|
251
|
+
}, 0);
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
|
|
227
255
|
json(res, 404, { error: "not found" });
|
|
228
256
|
} catch (error) {
|
|
229
257
|
json(res, 500, {
|
|
@@ -10,12 +10,9 @@ vi.mock("electrobun/bun", () => ({
|
|
|
10
10
|
|
|
11
11
|
// Rule (electrobun.md:601-610):
|
|
12
12
|
// Don't use process.exit() for shutdown — use Utils.quit() for graceful
|
|
13
|
-
// shutdown with CEF cleanup.
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
// export function shutdownAfterFatalError(): void {
|
|
17
|
-
// process.exit(1);
|
|
18
|
-
// }
|
|
13
|
+
// shutdown with CEF cleanup. shutdownAfterFatalError() must therefore call
|
|
14
|
+
// Utils.quit() (not process.exit) so CEF/native destructors run on a fatal
|
|
15
|
+
// startup error.
|
|
19
16
|
|
|
20
17
|
describe("fatal startup shutdown", () => {
|
|
21
18
|
it("does not call process.exit()", () => {
|
|
@@ -23,7 +20,6 @@ describe("fatal startup shutdown", () => {
|
|
|
23
20
|
|
|
24
21
|
shutdownAfterFatalError();
|
|
25
22
|
|
|
26
|
-
// RED: currently calls process.exit(1) — should call Utils.quit()
|
|
27
23
|
expect(processExitSpy).not.toHaveBeenCalled();
|
|
28
24
|
expect(Utils.quit).toHaveBeenCalledOnce();
|
|
29
25
|
});
|