@elizaos/app-core 2.0.3-beta.2 → 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 +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-zig-pin.test.mjs +147 -0
- package/scripts/aosp/compile-libllama.mjs +446 -59
- 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
|
@@ -12,6 +12,7 @@ import fs from "node:fs";
|
|
|
12
12
|
import os from "node:os";
|
|
13
13
|
import path from "node:path";
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
|
+
import { readVoiceE2eTestEnv } from "../../shared/src/test-env-config.ts";
|
|
15
16
|
|
|
16
17
|
const __filename = fileURLToPath(import.meta.url);
|
|
17
18
|
const __dirname = path.dirname(__filename);
|
|
@@ -158,23 +159,28 @@ Options:
|
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
function parseArgs(argv: readonly string[]): CliArgs {
|
|
162
|
+
const voiceEnv = readVoiceE2eTestEnv(process.env, {
|
|
163
|
+
backend: defaultBackend(),
|
|
164
|
+
cases: "roundtrip",
|
|
165
|
+
phrase: DEFAULT_PHRASE,
|
|
166
|
+
maxWer: 0.15,
|
|
167
|
+
maxBargeMs: 250,
|
|
168
|
+
maxFirstAudioMs: 1500,
|
|
169
|
+
});
|
|
161
170
|
const args: CliArgs = {
|
|
162
|
-
bundle:
|
|
163
|
-
dylib:
|
|
164
|
-
backend:
|
|
165
|
-
cases: parseCases(
|
|
166
|
-
phrase:
|
|
167
|
-
out:
|
|
168
|
-
audioDir:
|
|
169
|
-
maxWer:
|
|
170
|
-
maxBargeMs:
|
|
171
|
-
maxFirstAudioMs:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
latencyBase: process.env.ELIZA_VOICE_E2E_LATENCY_BASE || "",
|
|
176
|
-
allowTtsOnlyBargeIn:
|
|
177
|
-
process.env.ELIZA_VOICE_E2E_ALLOW_TTS_ONLY_BARGE_IN === "1",
|
|
171
|
+
bundle: voiceEnv.bundle,
|
|
172
|
+
dylib: voiceEnv.dylib,
|
|
173
|
+
backend: voiceEnv.backend,
|
|
174
|
+
cases: parseCases(voiceEnv.cases),
|
|
175
|
+
phrase: voiceEnv.phrase,
|
|
176
|
+
out: voiceEnv.report,
|
|
177
|
+
audioDir: voiceEnv.audioDir,
|
|
178
|
+
maxWer: voiceEnv.maxWer,
|
|
179
|
+
maxBargeMs: voiceEnv.maxBargeMs,
|
|
180
|
+
maxFirstAudioMs: voiceEnv.maxFirstAudioMs,
|
|
181
|
+
eventsJson: voiceEnv.eventsJson,
|
|
182
|
+
latencyBase: voiceEnv.latencyBase,
|
|
183
|
+
allowTtsOnlyBargeIn: voiceEnv.allowTtsOnlyBargeIn,
|
|
178
184
|
json: false,
|
|
179
185
|
};
|
|
180
186
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Send a voice message, get a voice response back — the full optimized
|
|
6
6
|
* voice-assistant loop the W1–W13 swarm landed, run interactively:
|
|
7
7
|
*
|
|
8
|
-
* mic → VAD (RMS + Silero v5 GGUF) → streaming
|
|
8
|
+
* mic → VAD (RMS + Silero v5 GGUF) → streaming local ASR
|
|
9
9
|
* → turn controller (prewarm-on-speech-start, speculative-on-pause,
|
|
10
10
|
* abort-on-resume, promote-or-rerun on speech-end)
|
|
11
11
|
* → runtime message handler (Stage-1 forced-JSON grammar, streamed)
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
* →first-replyText-char=Yms llm-first-token → llm-first-replytext-char
|
|
44
44
|
* →first-TTS-audio=Zms vad-trigger → tts-first-audio-chunk
|
|
45
45
|
* →audio-played=Wms vad-trigger → audio-first-played (the headline TTAP)
|
|
46
|
-
* mtp-accept=N% MTP
|
|
46
|
+
* mtp-accept=N% MTP draft token-acceptance rate (from llama-server /metrics)
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
49
|
import { existsSync } from "node:fs";
|
|
@@ -146,7 +146,7 @@ async function inspectActiveOptimizations(args) {
|
|
|
146
146
|
const { findCatalogModel, FIRST_RUN_DEFAULT_MODEL_ID } = await import(
|
|
147
147
|
"../../shared/src/local-inference/catalog.ts"
|
|
148
148
|
);
|
|
149
|
-
// The duet harness passes `args.modelId` (e.g. `eliza-1-
|
|
149
|
+
// The duet harness passes `args.modelId` (e.g. `eliza-1-2b`); the
|
|
150
150
|
// interactive harness leaves it unset → the first-run default.
|
|
151
151
|
catalogEntry = findCatalogModel(
|
|
152
152
|
args?.modelId ?? FIRST_RUN_DEFAULT_MODEL_ID,
|
|
@@ -281,12 +281,12 @@ async function inspectActiveOptimizations(args) {
|
|
|
281
281
|
active.push({
|
|
282
282
|
name: "streaming OmniVoice TTS",
|
|
283
283
|
on: true,
|
|
284
|
-
detail: `fused libelizainference at ${ttsLibPath} (OmniVoice TTS +
|
|
284
|
+
detail: `fused libelizainference at ${ttsLibPath} (OmniVoice TTS + local ASR); streaming LLM→TTS via the voice scheduler. On macOS-Metal this is the full graph; on a CPU fused build it runs but slower.`,
|
|
285
285
|
});
|
|
286
286
|
} else {
|
|
287
287
|
missing.push({
|
|
288
288
|
what: "no real TTS backend — interactive voice needs the fused libelizainference build (the stub backend emits silence and is rejected)",
|
|
289
|
-
fix: "build it: see packages/app-core/scripts/omnivoice-merged/README.md (the fused build ships real OmniVoice TTS +
|
|
289
|
+
fix: "build it: see packages/app-core/scripts/omnivoice-merged/README.md (the fused build ships real OmniVoice TTS + local ASR on macOS-Metal; stub elsewhere)",
|
|
290
290
|
});
|
|
291
291
|
active.push({
|
|
292
292
|
name: "streaming OmniVoice TTS",
|
|
@@ -296,17 +296,17 @@ async function inspectActiveOptimizations(args) {
|
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
// ── ASR backend (
|
|
299
|
+
// ── ASR backend (eligible local ASR via libelizainference only) ─────────
|
|
300
300
|
let asrBackend = null;
|
|
301
301
|
if (bundleRoot && existsSync(path.join(bundleRoot, "asr"))) {
|
|
302
|
-
asrBackend = "fused (
|
|
302
|
+
asrBackend = "fused (local ASR region in the bundle)";
|
|
303
303
|
}
|
|
304
304
|
if (asrBackend) {
|
|
305
305
|
active.push({ name: "streaming ASR", on: true, detail: asrBackend });
|
|
306
306
|
} else {
|
|
307
307
|
missing.push({
|
|
308
|
-
what: "no ASR backend (no fused
|
|
309
|
-
fix: "rebuild or download a libelizainference bundle that ships
|
|
308
|
+
what: "no ASR backend (no fused local ASR region in the bundle)",
|
|
309
|
+
fix: "rebuild or download a libelizainference bundle that ships an eligible local ASR region (asr/ subdirectory).",
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
312
|
|
|
@@ -637,7 +637,7 @@ const PLATFORM_MATRIX = [
|
|
|
637
637
|
"sox/play — or ffplay — (afplay needs a file, not used) — or renderer AudioContext",
|
|
638
638
|
vad: "fused libelizainference Silero v5 (arm64)",
|
|
639
639
|
ttsAsr:
|
|
640
|
-
"fused libelizainference.dylib (real OmniVoice TTS +
|
|
640
|
+
"fused libelizainference.dylib (real OmniVoice TTS + local ASR, full graph)",
|
|
641
641
|
verified:
|
|
642
642
|
"Metal kernels hardware-verified on M4 Max; needs a macOS arm64 host to build",
|
|
643
643
|
},
|
|
@@ -956,41 +956,12 @@ async function ensureBundleRegistered(catalogEntry, bundleRoot) {
|
|
|
956
956
|
`registered ${catalogEntry.id} bundle in the local-inference registry (text=${textGguf})`,
|
|
957
957
|
);
|
|
958
958
|
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
const { findCatalogModel } = await import(
|
|
965
|
-
"../../shared/src/local-inference/catalog.ts"
|
|
959
|
+
if (catalogEntry.runtime?.mtp?.enabled) {
|
|
960
|
+
tag(
|
|
961
|
+
"setup",
|
|
962
|
+
"blue",
|
|
963
|
+
`${catalogEntry.id} declares same-file MTP metadata; no separate drafter registration is needed`,
|
|
966
964
|
);
|
|
967
|
-
const companion = findCatalogModel(companionId);
|
|
968
|
-
if (companion) {
|
|
969
|
-
const drafterGguf = path.join(bundleRoot, companion.ggufFile);
|
|
970
|
-
if (existsSync(drafterGguf)) {
|
|
971
|
-
const dstat = await fs.stat(drafterGguf);
|
|
972
|
-
await upsertElizaModel({
|
|
973
|
-
id: companion.id,
|
|
974
|
-
displayName: companion.displayName ?? companion.id,
|
|
975
|
-
path: drafterGguf,
|
|
976
|
-
sizeBytes: dstat.size,
|
|
977
|
-
hfRepo: companion.hfRepo,
|
|
978
|
-
installedAt: now,
|
|
979
|
-
lastUsedAt: null,
|
|
980
|
-
source: "eliza-download",
|
|
981
|
-
sha256: null,
|
|
982
|
-
lastVerifiedAt: now,
|
|
983
|
-
runtimeRole: "mtp-drafter",
|
|
984
|
-
companionFor: catalogEntry.id,
|
|
985
|
-
...bundleMeta,
|
|
986
|
-
});
|
|
987
|
-
tag(
|
|
988
|
-
"setup",
|
|
989
|
-
"blue",
|
|
990
|
-
`registered ${companion.id} (MTP drafter) at ${drafterGguf}`,
|
|
991
|
-
);
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
965
|
}
|
|
995
966
|
return model;
|
|
996
967
|
}
|
|
@@ -1012,7 +983,7 @@ async function bootStandaloneRuntime({ roomId }) {
|
|
|
1012
983
|
// The runtime needs plugin-sql (storage) + the local-inference model handler.
|
|
1013
984
|
// Core wires DefaultMessageService during initialize(). Fail loudly if a
|
|
1014
985
|
// piece is missing rather than half-booting.
|
|
1015
|
-
const { AgentRuntime
|
|
986
|
+
const { AgentRuntime } = await import("@elizaos/core");
|
|
1016
987
|
let sqlPlugin;
|
|
1017
988
|
try {
|
|
1018
989
|
sqlPlugin =
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SecureStoreSecretKind } from "./platform-secure-store";
|
|
1
|
+
import type { SecureStoreSecretKind } from "./platform-secure-store.js";
|
|
2
2
|
/** Fixed Keychain / Secret Service “service” identifier (see docs/guides/platform-secure-store.md). */
|
|
3
3
|
export declare const ELIZA_AGENT_VAULT_SERVICE = "ai.elizaos.agent.vault";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PlatformSecureStore } from "./platform-secure-store";
|
|
1
|
+
import type { PlatformSecureStore } from "./platform-secure-store.js";
|
|
2
2
|
/**
|
|
3
3
|
* Node-side factory: macOS Keychain, Linux `secret-tool`, or the explicit
|
|
4
4
|
* unavailable backend on platforms without an OS credential-store adapter.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { AmbientAudioConsentState } from "./consent.
|
|
2
|
-
export { ReplayBuffer } from "./replay-buffer.
|
|
3
|
-
export { decideResponse } from "./response-gate.
|
|
4
|
-
export type { InMemoryAmbientAudioServiceOptions } from "./service.
|
|
5
|
-
export { InMemoryAmbientAudioService } from "./service.
|
|
6
|
-
export type { AmbientAudioMode, AmbientAudioService, AudioFrame, ConsentRecord, ResponseDecision, ResponseGateSignals, TranscribedSegment, } from "./types.
|
|
1
|
+
export { AmbientAudioConsentState } from "./consent.js";
|
|
2
|
+
export { ReplayBuffer } from "./replay-buffer.js";
|
|
3
|
+
export { decideResponse } from "./response-gate.js";
|
|
4
|
+
export type { InMemoryAmbientAudioServiceOptions } from "./service.js";
|
|
5
|
+
export { InMemoryAmbientAudioService } from "./service.js";
|
|
6
|
+
export type { AmbientAudioMode, AmbientAudioService, AudioFrame, ConsentRecord, ResponseDecision, ResponseGateSignals, TranscribedSegment, } from "./types.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ResponseDecision, ResponseGateSignals } from "./types.
|
|
1
|
+
import type { ResponseDecision, ResponseGateSignals } from "./types.js";
|
|
2
2
|
export declare function decideResponse(signals: ResponseGateSignals): ResponseDecision;
|
|
3
3
|
//# sourceMappingURL=response-gate.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AmbientAudioConsentState } from "./consent.
|
|
2
|
-
import { ReplayBuffer } from "./replay-buffer.
|
|
3
|
-
import type { AmbientAudioMode, AmbientAudioService, AudioFrame } from "./types.
|
|
1
|
+
import type { AmbientAudioConsentState } from "./consent.js";
|
|
2
|
+
import { ReplayBuffer } from "./replay-buffer.js";
|
|
3
|
+
import type { AmbientAudioMode, AmbientAudioService, AudioFrame } from "./types.js";
|
|
4
4
|
export interface InMemoryAmbientAudioServiceOptions {
|
|
5
5
|
consent: AmbientAudioConsentState;
|
|
6
6
|
replayBuffer?: ReplayBuffer;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* `discordCache` instance — a "generate" call that already primed the
|
|
14
14
|
* runtime-context cache pays no extra REST cost when the user picks.
|
|
15
15
|
*/
|
|
16
|
-
import { type DiscordSourceCache, type DiscordSourceLogger } from "./discord-target-source";
|
|
16
|
+
import { type DiscordSourceCache, type DiscordSourceLogger } from "./discord-target-source.js";
|
|
17
17
|
export interface TargetGroup {
|
|
18
18
|
/** Connector platform: 'discord', 'slack', 'telegram', 'gmail', etc. */
|
|
19
19
|
platform: string;
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
* - `public_link` — unauthenticated payment URL for any-payer payments.
|
|
12
12
|
* - `instruct_dm_only` — text-only "no link / no form" fallback.
|
|
13
13
|
*/
|
|
14
|
-
export { cloudLinkSensitiveRequestAdapter, createCloudLinkSensitiveRequestAdapter, } from "./cloud-link-adapter";
|
|
15
|
-
export { instructDmOnlySensitiveRequestAdapter } from "./instruct-dm-only-adapter";
|
|
16
|
-
export { ownerAppInlineSensitiveRequestAdapter } from "./owner-app-inline-adapter";
|
|
17
|
-
export { ownerAppOAuthSensitiveRequestAdapter } from "./owner-app-oauth-adapter";
|
|
18
|
-
export { publicLinkSensitiveRequestAdapter } from "./public-link-adapter";
|
|
19
|
-
export { createTunnelLinkSensitiveRequestAdapter, tunnelLinkSensitiveRequestAdapter, } from "./tunnel-link-adapter";
|
|
14
|
+
export { cloudLinkSensitiveRequestAdapter, createCloudLinkSensitiveRequestAdapter, } from "./cloud-link-adapter.js";
|
|
15
|
+
export { instructDmOnlySensitiveRequestAdapter } from "./instruct-dm-only-adapter.js";
|
|
16
|
+
export { ownerAppInlineSensitiveRequestAdapter } from "./owner-app-inline-adapter.js";
|
|
17
|
+
export { ownerAppOAuthSensitiveRequestAdapter } from "./owner-app-oauth-adapter.js";
|
|
18
|
+
export { publicLinkSensitiveRequestAdapter } from "./public-link-adapter.js";
|
|
19
|
+
export { createTunnelLinkSensitiveRequestAdapter, tunnelLinkSensitiveRequestAdapter, } from "./tunnel-link-adapter.js";
|
|
20
20
|
/**
|
|
21
21
|
* Registers app-core's first-party sensitive-request delivery adapters with
|
|
22
22
|
* the runtime's `SensitiveRequestDispatchRegistry` service. No-op when the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Steward Sidecar - first-launch wallet creation and verification.
|
|
3
3
|
*/
|
|
4
|
-
import type { StewardCredentials, StewardSidecarStatus } from "./types";
|
|
4
|
+
import type { StewardCredentials, StewardSidecarStatus } from "./types.js";
|
|
5
5
|
/**
|
|
6
6
|
* Ensure wallet is set up: verify existing wallet or perform first-launch setup.
|
|
7
7
|
*/
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* const client = sidecar.getClient();
|
|
19
19
|
* await sidecar.stop();
|
|
20
20
|
*/
|
|
21
|
-
import { type StewardCredentials, type StewardSidecarConfig, type StewardSidecarStatus } from "./steward-sidecar/types";
|
|
22
|
-
export { allocateFirstFreeLoopbackPort, fingerprintRandomToken, generateApiKey, generateMasterPassword, resolveDataDir, } from "./steward-sidecar/helpers";
|
|
23
|
-
export type { StewardCredentials, StewardSidecarConfig, StewardSidecarStatus, StewardWalletInfo, } from "./steward-sidecar/types";
|
|
21
|
+
import { type StewardCredentials, type StewardSidecarConfig, type StewardSidecarStatus } from "./steward-sidecar/types.js";
|
|
22
|
+
export { allocateFirstFreeLoopbackPort, fingerprintRandomToken, generateApiKey, generateMasterPassword, resolveDataDir, } from "./steward-sidecar/helpers.js";
|
|
23
|
+
export type { StewardCredentials, StewardSidecarConfig, StewardSidecarStatus, StewardWalletInfo, } from "./steward-sidecar/types.js";
|
|
24
24
|
export declare class StewardSidecar {
|
|
25
25
|
private config;
|
|
26
26
|
private status;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { TunnelToMobileClient, type TunnelToMobileOptions, type TunnelToMobileState, type WebSocketLike, } from "./tunnel-to-mobile-client";
|
|
1
|
+
export { TunnelToMobileClient, type TunnelToMobileOptions, type TunnelToMobileState, type WebSocketLike, } from "./tunnel-to-mobile-client.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vault-bootstrap.d.ts","sourceRoot":"","sources":["../../../../../src/services/vault-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"vault-bootstrap.d.ts","sourceRoot":"","sources":["../../../../../src/services/vault-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAoCH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAwC5C,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,UAAU,qBAAqB;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AA4LD,wBAAsB,iBAAiB,CACrC,IAAI,GAAE,qBAA0B,GAC/B,OAAO,CAAC,oBAAoB,CAAC,CAkE/B"}
|
|
@@ -24,17 +24,21 @@ async function agentBridge() {
|
|
|
24
24
|
return bridgeCache;
|
|
25
25
|
// Dynamic import defers the agent ↔ app-core edge until after both
|
|
26
26
|
// modules have fully evaluated. By the time this runs the runVaultBootstrap
|
|
27
|
-
// call site is already inside an async function body
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
// call site is already inside an async function body.
|
|
28
|
+
const [vaultBridge, configEnv, config, paths] = await Promise.all([
|
|
29
|
+
import("@elizaos/agent/runtime/operations/vault-bridge"),
|
|
30
|
+
import("@elizaos/agent/api/config-env"),
|
|
31
|
+
import("@elizaos/agent/config/config"),
|
|
32
|
+
import("@elizaos/agent/config/paths"),
|
|
33
|
+
]);
|
|
30
34
|
bridgeCache = {
|
|
31
|
-
formatVaultRef:
|
|
32
|
-
isVaultRef:
|
|
33
|
-
loadElizaConfig:
|
|
34
|
-
persistConfigEnv:
|
|
35
|
-
readConfigEnv:
|
|
36
|
-
resolveStateDir:
|
|
37
|
-
saveElizaConfig:
|
|
35
|
+
formatVaultRef: vaultBridge.formatVaultRef,
|
|
36
|
+
isVaultRef: vaultBridge.isVaultRef,
|
|
37
|
+
loadElizaConfig: config.loadElizaConfig,
|
|
38
|
+
persistConfigEnv: configEnv.persistConfigEnv,
|
|
39
|
+
readConfigEnv: configEnv.readConfigEnv,
|
|
40
|
+
resolveStateDir: paths.resolveStateDir,
|
|
41
|
+
saveElizaConfig: config.saveElizaConfig,
|
|
38
42
|
};
|
|
39
43
|
return bridgeCache;
|
|
40
44
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export type { DiarizationPipeline } from "./diarization-pipeline.
|
|
2
|
-
export { MOCK_DIARIZATION_PIPELINE } from "./diarization-pipeline.
|
|
3
|
-
export type { NicknameEvaluator, NicknameProposal, } from "./nickname-evaluator.
|
|
4
|
-
export { NAIVE_NICKNAME_EVALUATOR } from "./nickname-evaluator.
|
|
5
|
-
export type { OwnerConfidenceInput } from "./owner-confidence.
|
|
6
|
-
export { scoreOwnerConfidence } from "./owner-confidence.
|
|
7
|
-
export type { ChallengeService, InMemoryChallengeServiceOptions, } from "./private-challenge.
|
|
8
|
-
export { InMemoryChallengeService } from "./private-challenge.
|
|
9
|
-
export type { VoiceProfileSearchHit, VoiceProfileStore } from "./store.
|
|
10
|
-
export { InMemoryVoiceProfileStore } from "./store.
|
|
11
|
-
export type { DiarizationSegment, OwnerChallenge, OwnerConfidence, VoiceEmbeddingSummary, VoiceProfile, VoiceProfileQuality, } from "./types.
|
|
1
|
+
export type { DiarizationPipeline } from "./diarization-pipeline.js";
|
|
2
|
+
export { MOCK_DIARIZATION_PIPELINE } from "./diarization-pipeline.js";
|
|
3
|
+
export type { NicknameEvaluator, NicknameProposal, } from "./nickname-evaluator.js";
|
|
4
|
+
export { NAIVE_NICKNAME_EVALUATOR } from "./nickname-evaluator.js";
|
|
5
|
+
export type { OwnerConfidenceInput } from "./owner-confidence.js";
|
|
6
|
+
export { scoreOwnerConfidence } from "./owner-confidence.js";
|
|
7
|
+
export type { ChallengeService, InMemoryChallengeServiceOptions, } from "./private-challenge.js";
|
|
8
|
+
export { InMemoryChallengeService } from "./private-challenge.js";
|
|
9
|
+
export type { VoiceProfileSearchHit, VoiceProfileStore } from "./store.js";
|
|
10
|
+
export { InMemoryVoiceProfileStore } from "./store.js";
|
|
11
|
+
export type { DiarizationSegment, OwnerChallenge, OwnerConfidence, VoiceEmbeddingSummary, VoiceProfile, VoiceProfileQuality, } from "./types.js";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
1
4
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
5
|
|
|
3
6
|
describe("selectLiveProvider", () => {
|
|
@@ -18,6 +21,11 @@ describe("selectLiveProvider", () => {
|
|
|
18
21
|
"OPENROUTER_API_KEY",
|
|
19
22
|
"ELIZA_E2E_OPENROUTER_API_KEY",
|
|
20
23
|
"ELIZA_PROVIDER",
|
|
24
|
+
"ELIZA_LIVE_PROVIDER_CONFIG_PATH",
|
|
25
|
+
"ELIZA_LIVE_PROVIDER_STATE_DIR",
|
|
26
|
+
"ELIZA_STATE_DIR",
|
|
27
|
+
"ELIZA_NAMESPACE",
|
|
28
|
+
"XDG_STATE_HOME",
|
|
21
29
|
]) {
|
|
22
30
|
vi.stubEnv(key, "");
|
|
23
31
|
}
|
|
@@ -25,6 +33,7 @@ describe("selectLiveProvider", () => {
|
|
|
25
33
|
|
|
26
34
|
afterEach(() => {
|
|
27
35
|
vi.resetModules();
|
|
36
|
+
vi.doUnmock("@elizaos/vault");
|
|
28
37
|
vi.unstubAllEnvs();
|
|
29
38
|
});
|
|
30
39
|
|
|
@@ -98,9 +107,90 @@ describe("selectLiveProvider", () => {
|
|
|
98
107
|
const provider = selectLiveProvider();
|
|
99
108
|
expect(provider?.name).toBe("cerebras");
|
|
100
109
|
expect(provider?.baseUrl).toBe("https://api.cerebras.ai/v1");
|
|
101
|
-
expect(provider?.largeModel).toBe("
|
|
110
|
+
expect(provider?.largeModel).toBe("zai-glm-4.7");
|
|
102
111
|
expect(provider?.smallModel).toBe("gpt-oss-120b");
|
|
103
112
|
expect(provider?.env.ELIZA_PROVIDER).toBe("cerebras");
|
|
113
|
+
expect(provider?.env.CEREBRAS_MODEL).toBe("zai-glm-4.7");
|
|
114
|
+
expect(provider?.env.OPENAI_SMALL_MODEL).toBe("gpt-oss-120b");
|
|
115
|
+
expect(provider?.env.OPENAI_LARGE_MODEL).toBe("zai-glm-4.7");
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it("resolves Cerebras vault references in the async selector", async () => {
|
|
119
|
+
vi.stubEnv("CEREBRAS_API_KEY", "vault://providers.cerebras.api-key");
|
|
120
|
+
vi.stubEnv("GROQ_API_KEY", "");
|
|
121
|
+
vi.stubEnv("OPENAI_API_KEY", "");
|
|
122
|
+
vi.stubEnv("ELIZA_PROVIDER", "cerebras");
|
|
123
|
+
|
|
124
|
+
const get = vi.fn(async (key: string) => {
|
|
125
|
+
expect(key).toBe("providers.cerebras.api-key");
|
|
126
|
+
return "csk_resolved_cerebras_key";
|
|
127
|
+
});
|
|
128
|
+
const close = vi.fn(async () => {});
|
|
129
|
+
vi.doMock("@elizaos/vault", () => ({
|
|
130
|
+
createVault: vi.fn(() => ({ get, close })),
|
|
131
|
+
}));
|
|
132
|
+
|
|
133
|
+
const { selectLiveProviderAsync } = await import("./live-provider.ts");
|
|
134
|
+
|
|
135
|
+
const provider = await selectLiveProviderAsync();
|
|
136
|
+
expect(provider?.name).toBe("cerebras");
|
|
137
|
+
expect(provider?.apiKey).toBe("csk_resolved_cerebras_key");
|
|
138
|
+
expect(provider?.env.CEREBRAS_API_KEY).toBe("csk_resolved_cerebras_key");
|
|
139
|
+
expect(provider?.env.OPENAI_API_KEY).toBe("csk_resolved_cerebras_key");
|
|
140
|
+
expect(close).toHaveBeenCalledTimes(1);
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it("loads a vault-referenced Cerebras key from local eliza.json in the async selector", async () => {
|
|
144
|
+
const stateDir = await mkdtemp(path.join(tmpdir(), "eliza-live-provider-"));
|
|
145
|
+
await writeFile(
|
|
146
|
+
path.join(stateDir, "eliza.json"),
|
|
147
|
+
JSON.stringify({
|
|
148
|
+
env: {
|
|
149
|
+
vars: {
|
|
150
|
+
CEREBRAS_API_KEY: "vault://CEREBRAS_API_KEY",
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
}),
|
|
154
|
+
"utf8",
|
|
155
|
+
);
|
|
156
|
+
vi.stubEnv("ELIZA_LIVE_PROVIDER_STATE_DIR", stateDir);
|
|
157
|
+
vi.stubEnv("ELIZA_PROVIDER", "cerebras");
|
|
158
|
+
vi.stubEnv("CEREBRAS_API_KEY", "");
|
|
159
|
+
vi.stubEnv("GROQ_API_KEY", "");
|
|
160
|
+
vi.stubEnv("OPENAI_API_KEY", "");
|
|
161
|
+
|
|
162
|
+
const createVault = vi.fn(() => ({
|
|
163
|
+
get: vi.fn(async (key: string) => {
|
|
164
|
+
expect(key).toBe("CEREBRAS_API_KEY");
|
|
165
|
+
return "csk_local_config_cerebras_key";
|
|
166
|
+
}),
|
|
167
|
+
close: vi.fn(async () => {}),
|
|
168
|
+
}));
|
|
169
|
+
vi.doMock("@elizaos/vault", () => ({ createVault }));
|
|
170
|
+
|
|
171
|
+
try {
|
|
172
|
+
const { selectLiveProviderAsync } = await import("./live-provider.ts");
|
|
173
|
+
|
|
174
|
+
const provider = await selectLiveProviderAsync();
|
|
175
|
+
expect(provider?.name).toBe("cerebras");
|
|
176
|
+
expect(provider?.apiKey).toBe("csk_local_config_cerebras_key");
|
|
177
|
+
expect(createVault).toHaveBeenCalledWith({ workDir: stateDir });
|
|
178
|
+
} finally {
|
|
179
|
+
await rm(stateDir, { force: true, recursive: true });
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
it("uses the first-class Cerebras first-run provider id", async () => {
|
|
184
|
+
const { getFirstRunProviderForLiveProvider } = await import(
|
|
185
|
+
"./live-provider.ts"
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
expect(getFirstRunProviderForLiveProvider({ name: "cerebras" })).toBe(
|
|
189
|
+
"cerebras",
|
|
190
|
+
);
|
|
191
|
+
expect(
|
|
192
|
+
getFirstRunProviderForLiveProvider({ name: "local-llama-cpp" }),
|
|
193
|
+
).toBe("openai");
|
|
104
194
|
});
|
|
105
195
|
|
|
106
196
|
it("prefers groq over a bare cerebras eval key unless cerebras is explicitly selected", async () => {
|