@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
package/api/server.js
CHANGED
|
@@ -45,6 +45,7 @@ import { handleCatalogRoutes } from "./catalog-routes.js";
|
|
|
45
45
|
import { handleCloudPairRoute } from "./cloud-pair-route.js";
|
|
46
46
|
import { handleDatabaseRowsCompatRoute } from "./database-rows-compat-routes.js";
|
|
47
47
|
import { handleDevCompatRoutes } from "./dev-compat-routes.js";
|
|
48
|
+
import { handleDropStatusCompatRoute } from "./drop-status-compat-route.js";
|
|
48
49
|
import { handleFirstRunRoute } from "./first-run-routes.js";
|
|
49
50
|
import { handleFirstRunTtsRoute } from "./first-run-tts-route.js";
|
|
50
51
|
import { handleInternalWakeRoute } from "./internal-routes.js";
|
|
@@ -53,11 +54,6 @@ import { handleSecretsInventoryRoute } from "./secrets-inventory-routes.js";
|
|
|
53
54
|
import { handleSecretsManagerRoute } from "./secrets-manager-routes.js";
|
|
54
55
|
import { handleSensitiveRequestRoutes } from "./sensitive-request-routes.js";
|
|
55
56
|
import { getCorsAllowedPorts, isAllowedOrigin } from "./server-cors.js";
|
|
56
|
-
// Wallet market overview route extracted to @elizaos/plugin-wallet/routes/wallet-market-overview-route.
|
|
57
|
-
// Now served via walletRoutePlugin.routes (rawPath) on the runtime plugin route system.
|
|
58
|
-
// Phase 2 extraction: Steward compat routes → app-steward/src/plugin.ts (stewardPlugin)
|
|
59
|
-
// Includes: handleWalletBrowserCompatRoutes, handleWalletTradeCompatRoutes,
|
|
60
|
-
// handleStewardCompatRoutes, handleWalletCompatRoutes
|
|
61
57
|
import { handleWorkbenchCompatRoutes } from "./workbench-compat-routes.js";
|
|
62
58
|
const _require = createRequire(import.meta.url);
|
|
63
59
|
import { syncAppEnvToEliza, syncElizaEnvAliases, } from "@elizaos/shared/utils/env";
|
|
@@ -199,7 +195,7 @@ async function clearCompatPgliteDataDir(runtime, config) {
|
|
|
199
195
|
let timeoutHandle = null;
|
|
200
196
|
try {
|
|
201
197
|
await Promise.race([
|
|
202
|
-
Promise.resolve(runtime.stop()),
|
|
198
|
+
Promise.resolve(runtime.stop({ fast: true })),
|
|
203
199
|
new Promise((resolve) => {
|
|
204
200
|
timeoutHandle = setTimeout(() => {
|
|
205
201
|
stopTimedOut = true;
|
|
@@ -353,11 +349,6 @@ async function _getTableColumnNames(runtime, tableName, schemaName = "public") {
|
|
|
353
349
|
}
|
|
354
350
|
return columns;
|
|
355
351
|
}
|
|
356
|
-
// normalizePluginCategory, normalizePluginId, titleCasePluginId,
|
|
357
|
-
// buildPluginParamDefs, findNearestFile, resolvePluginManifestPath,
|
|
358
|
-
// resolveInstalledPackageVersion, resolveLoadedPluginNames, isPluginLoaded,
|
|
359
|
-
// buildPluginListResponse, validateCompatPluginConfig, persistCompatPluginMutation
|
|
360
|
-
// — extracted to ./plugins-routes
|
|
361
352
|
/**
|
|
362
353
|
* Load config from disk and backfill `cloud.apiKey` from sealed secrets when the
|
|
363
354
|
* user is still linked to Eliza Cloud but a stale write dropped the key.
|
|
@@ -472,7 +463,7 @@ async function handleCompatRouteInner(req, res, state) {
|
|
|
472
463
|
runtime: state.current,
|
|
473
464
|
});
|
|
474
465
|
}
|
|
475
|
-
// Dev observability routes
|
|
466
|
+
// Dev observability routes.
|
|
476
467
|
if (await handleDevCompatRoutes(req, res, state))
|
|
477
468
|
return true;
|
|
478
469
|
// Cloud SSO popup landing — `/pair?token=X` calls cloud-api server-side,
|
|
@@ -486,7 +477,7 @@ async function handleCompatRouteInner(req, res, state) {
|
|
|
486
477
|
// Cookie + CSRF session lifecycle (setup, login, logout, me, sessions).
|
|
487
478
|
if (await handleAuthSessionRoutes(req, res, state))
|
|
488
479
|
return true;
|
|
489
|
-
// Auth / pairing / first-run status
|
|
480
|
+
// Auth / pairing / first-run status.
|
|
490
481
|
if (await handleAuthPairingCompatRoutes(req, res, state))
|
|
491
482
|
return true;
|
|
492
483
|
// Sensitive-request REST surface (create/get/submit/cancel) for owner secret
|
|
@@ -519,11 +510,6 @@ async function handleCompatRouteInner(req, res, state) {
|
|
|
519
510
|
}
|
|
520
511
|
if (await handleAutomationsCompatRoutes(req, res, state))
|
|
521
512
|
return true;
|
|
522
|
-
// workflow routes — extracted to plugins/plugin-workflow/src/plugin-routes.ts.
|
|
523
|
-
// Now served via workflowRoutePlugin.routes (rawPath) on the runtime
|
|
524
|
-
// plugin route system.
|
|
525
|
-
// GitHub PAT routes — extracted to plugins/plugin-github/src/routes/github-routes.ts.
|
|
526
|
-
// Now served via githubPlugin.routes (rawPath) on the runtime plugin route system.
|
|
527
513
|
if (method === "POST" && url.pathname === "/api/tts/cloud") {
|
|
528
514
|
if (!(await ensureRouteAuthorized(req, res, state)))
|
|
529
515
|
return true;
|
|
@@ -545,11 +531,9 @@ async function handleCompatRouteInner(req, res, state) {
|
|
|
545
531
|
// lets the request fall through to the next handler in the chain.
|
|
546
532
|
return false;
|
|
547
533
|
}
|
|
548
|
-
// Workbench / todos routes
|
|
534
|
+
// Workbench / todos routes.
|
|
549
535
|
if (await handleWorkbenchCompatRoutes(req, res, state))
|
|
550
536
|
return true;
|
|
551
|
-
// Public cached market overview for wallet empty states and cloud feeds —
|
|
552
|
-
// now served via @elizaos/plugin-wallet:routes Plugin.routes (rawPath).
|
|
553
537
|
if (url.pathname.startsWith("/api/secrets/")) {
|
|
554
538
|
if (!(await ensureRouteAuthorized(req, res, state)))
|
|
555
539
|
return true;
|
|
@@ -560,38 +544,12 @@ async function handleCompatRouteInner(req, res, state) {
|
|
|
560
544
|
return true;
|
|
561
545
|
}
|
|
562
546
|
}
|
|
563
|
-
//
|
|
564
|
-
//
|
|
565
|
-
//
|
|
566
|
-
//
|
|
567
|
-
|
|
568
|
-
// the upstream state.config in agreement with disk on login / disconnect.
|
|
569
|
-
// Note: /api/cloud/compat/* and /api/cloud/billing/* still dispatch
|
|
570
|
-
// above this point through @elizaos/agent (intentional — those are thin
|
|
571
|
-
// proxies to Eliza Cloud, not local cloud-connection management).
|
|
572
|
-
if (method === "GET" && url.pathname === "/api/drop/status") {
|
|
573
|
-
const config = loadElizaConfig();
|
|
574
|
-
if (config.features?.dropEnabled === true) {
|
|
575
|
-
return false;
|
|
576
|
-
}
|
|
577
|
-
sendJsonResponse(res, 200, {
|
|
578
|
-
dropEnabled: false,
|
|
579
|
-
publicMintOpen: false,
|
|
580
|
-
whitelistMintOpen: false,
|
|
581
|
-
mintedOut: false,
|
|
582
|
-
currentSupply: 0,
|
|
583
|
-
maxSupply: 0,
|
|
584
|
-
shinyPrice: "0",
|
|
585
|
-
userHasMinted: false,
|
|
586
|
-
});
|
|
547
|
+
// `/api/cloud/compat/*` and `/api/cloud/billing/*` dispatch above this
|
|
548
|
+
// point through @elizaos/agent — thin proxies to Eliza Cloud, not local
|
|
549
|
+
// cloud-connection management. `/api/cloud/*` connection management is
|
|
550
|
+
// served by elizaCloudRoutePlugin.routes on the runtime plugin route system.
|
|
551
|
+
if (handleDropStatusCompatRoute(req, res, method, url.pathname))
|
|
587
552
|
return true;
|
|
588
|
-
}
|
|
589
|
-
// ── Vincent OAuth routes — extracted to app-vincent/src/plugin.ts ──
|
|
590
|
-
// Now served via vincentPlugin.routes (rawPath) on the runtime plugin
|
|
591
|
-
// route system. /callback/vincent is marked public: true.
|
|
592
|
-
// ── Shopify routes — extracted to app-shopify/src/plugin.ts ───────
|
|
593
|
-
// Now served via shopifyPlugin.routes (rawPath) on the runtime plugin
|
|
594
|
-
// route system.
|
|
595
553
|
if (method === "POST" && url.pathname === "/api/agent/reset") {
|
|
596
554
|
if (!ensureCompatSensitiveRouteAuthorized(req, res)) {
|
|
597
555
|
logger.warn("[eliza][reset] POST /api/agent/reset rejected (sensitive route not authorized)");
|
|
@@ -623,13 +581,9 @@ async function handleCompatRouteInner(req, res, state) {
|
|
|
623
581
|
}
|
|
624
582
|
return true;
|
|
625
583
|
}
|
|
626
|
-
//
|
|
627
|
-
//
|
|
628
|
-
//
|
|
629
|
-
// stewardPlugin.routes (rawPath) on the runtime plugin route system.
|
|
630
|
-
// Plugin routes — extracted to @elizaos/plugin-registry. That package pulls
|
|
631
|
-
// in heavyweight registry/install code, so keep it out of the startup path
|
|
632
|
-
// and only load it for plugin-management requests.
|
|
584
|
+
// Plugin routes load @elizaos/plugin-registry lazily: that package pulls in
|
|
585
|
+
// heavyweight registry/install code, so keep it out of the startup path and
|
|
586
|
+
// only load it for plugin-management requests.
|
|
633
587
|
if (url.pathname.startsWith("/api/plugins")) {
|
|
634
588
|
const { handlePluginsCompatRoutes } = await getPluginRegistryApi();
|
|
635
589
|
if (await handlePluginsCompatRoutes(req, res, state))
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* coordinated change across the Python store and these routes.
|
|
37
37
|
*/
|
|
38
38
|
import type http from "node:http";
|
|
39
|
-
import type { CompatRuntimeState } from "./compat-route-shared";
|
|
39
|
+
import type { CompatRuntimeState } from "./compat-route-shared.js";
|
|
40
40
|
export declare const ELIZA_BENCHMARK_SCORES_SCHEMA: "elizaos.training.benchmark-scores/v1";
|
|
41
41
|
export declare const ELIZA_BENCHMARK_COMPARE_SCHEMA: "elizaos.training.benchmark-compare/v1";
|
|
42
42
|
export interface BenchmarkRunDTO {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"training-benchmarks.d.ts","sourceRoot":"","sources":["../../../../../src/api/training-benchmarks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"training-benchmarks.d.ts","sourceRoot":"","sources":["../../../../../src/api/training-benchmarks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAkFlC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAmBhE,eAAO,MAAM,6BAA6B,EACxC,sCAA+C,CAAC;AAClD,eAAO,MAAM,8BAA8B,EACzC,uCAAgD,CAAC;AAEnD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,OAAO,6BAA6B,CAAC;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,eAAe,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,OAAO,8BAA8B,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC1B,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC1B,uEAAuE;IACvE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAMD,wBAAgB,6BAA6B,CAC3C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAMR;AAyBD,UAAU,sBAAsB;IAC9B,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,IAAI,EAAE;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,eAAe,EAAE,CAAC;IACtB,SAAS,CAAC,IAAI,EAAE;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,eAAe,GAAG,IAAI,CAAC;IAC3B,KAAK,IAAI,IAAI,CAAC;CACf;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,MAAM,GACb,sBAAsB,CAmDxB;AA+ED,MAAM,WAAW,8BAA8B;IAC7C,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,sBAAsB,CAAC;CACzD;AAED,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,GAAG,EAAE,IAAI,CAAC,cAAc,EACxB,KAAK,EAAE,kBAAkB,EACzB,OAAO,GAAE,8BAAmC,GAC3C,OAAO,CAAC,OAAO,CAAC,CA6BlB"}
|
|
@@ -164,8 +164,7 @@ export function openBenchmarkResultsReader(dbPath) {
|
|
|
164
164
|
return {
|
|
165
165
|
ready: true,
|
|
166
166
|
getHistory({ modelId, benchmark, limit }) {
|
|
167
|
-
|
|
168
|
-
return rows.map(rowToDto);
|
|
167
|
+
return historyStmt.all(modelId, benchmark, limit).map(rowToDto);
|
|
169
168
|
},
|
|
170
169
|
getLatest({ modelId, benchmark }) {
|
|
171
170
|
const rows = latestStmt.all(modelId, benchmark);
|
|
@@ -180,15 +179,38 @@ export function openBenchmarkResultsReader(dbPath) {
|
|
|
180
179
|
}
|
|
181
180
|
function rowToDto(row) {
|
|
182
181
|
return {
|
|
183
|
-
id:
|
|
184
|
-
modelId: row
|
|
185
|
-
benchmark: row
|
|
186
|
-
score: row
|
|
187
|
-
ts:
|
|
188
|
-
datasetVersion: row
|
|
189
|
-
codeCommit: row
|
|
182
|
+
id: readSqliteInteger(row, "id"),
|
|
183
|
+
modelId: readSqliteString(row, "model_id"),
|
|
184
|
+
benchmark: readSqliteString(row, "benchmark"),
|
|
185
|
+
score: readSqliteNumber(row, "score"),
|
|
186
|
+
ts: readSqliteInteger(row, "ts"),
|
|
187
|
+
datasetVersion: readSqliteString(row, "dataset_version"),
|
|
188
|
+
codeCommit: readSqliteString(row, "code_commit"),
|
|
190
189
|
};
|
|
191
190
|
}
|
|
191
|
+
function readSqliteString(row, column) {
|
|
192
|
+
const value = row[column];
|
|
193
|
+
if (typeof value === "string")
|
|
194
|
+
return value;
|
|
195
|
+
throw new Error(`Invalid benchmark row: ${column} must be a string`);
|
|
196
|
+
}
|
|
197
|
+
function readSqliteNumber(row, column) {
|
|
198
|
+
const value = row[column];
|
|
199
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
200
|
+
return value;
|
|
201
|
+
throw new Error(`Invalid benchmark row: ${column} must be a finite number`);
|
|
202
|
+
}
|
|
203
|
+
function readSqliteInteger(row, column) {
|
|
204
|
+
const value = row[column];
|
|
205
|
+
if (typeof value === "number" && Number.isSafeInteger(value))
|
|
206
|
+
return value;
|
|
207
|
+
if (typeof value === "bigint") {
|
|
208
|
+
const asNumber = Number(value);
|
|
209
|
+
if (Number.isSafeInteger(asNumber))
|
|
210
|
+
return asNumber;
|
|
211
|
+
}
|
|
212
|
+
throw new Error(`Invalid benchmark row: ${column} must be a safe integer`);
|
|
213
|
+
}
|
|
192
214
|
// ---------------------------------------------------------------------------
|
|
193
215
|
// Query-parameter helpers
|
|
194
216
|
// ---------------------------------------------------------------------------
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type http from "node:http";
|
|
7
7
|
import { type AgentRuntime } from "@elizaos/core";
|
|
8
|
-
import { type CompatRuntimeState } from "./compat-route-shared";
|
|
8
|
+
import { type CompatRuntimeState } from "./compat-route-shared.js";
|
|
9
9
|
export declare function runtimeHasTodoDatabase(runtime: AgentRuntime | null): boolean;
|
|
10
10
|
export declare function handleWorkbenchCompatRoutes(req: http.IncomingMessage, res: http.ServerResponse, state: CompatRuntimeState): Promise<boolean>;
|
|
11
11
|
//# sourceMappingURL=workbench-compat-routes.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AgentRuntime, type Plugin, type RoleName, type UUID } from "@elizaos/core";
|
|
2
|
-
import type { BenchmarkContext, CapturedAction } from "./plugin";
|
|
3
|
-
export { coerceParams } from "./params";
|
|
2
|
+
import type { BenchmarkContext, CapturedAction } from "./plugin.js";
|
|
3
|
+
export { coerceParams } from "./params.js";
|
|
4
4
|
export declare const DEFAULT_PORT = 3939;
|
|
5
5
|
export declare const DEFAULT_HOST = "127.0.0.1";
|
|
6
6
|
export declare const BENCHMARK_WORLD_ID: string;
|
package/browser.d.ts
CHANGED
|
@@ -17,10 +17,10 @@ export { Input } from "@elizaos/ui/components/ui/input";
|
|
|
17
17
|
export { Spinner } from "@elizaos/ui/components/ui/spinner";
|
|
18
18
|
export { type IosRuntimeConfig, resolveIosRuntimeConfig, } from "@elizaos/ui/platform/ios-runtime";
|
|
19
19
|
export { useApp } from "@elizaos/ui/state/useApp";
|
|
20
|
-
export { type AutomationNodeContributorContext, registerAutomationNodeContributor, } from "./api/automation-node-contributors";
|
|
21
|
-
export { buildLocalizedTrayMenu, DESKTOP_TRAY_MENU_ITEMS, DesktopSurfaceNavigationRuntime, DesktopTrayRuntime, DetachedShellRoot, } from "./runtime/desktop";
|
|
22
|
-
export { AppWindowRenderer } from "./runtime/desktop/AppWindowRenderer";
|
|
23
|
-
export { getHostExecutionCapabilities } from "./services/task-host-capabilities";
|
|
20
|
+
export { type AutomationNodeContributorContext, registerAutomationNodeContributor, } from "./api/automation-node-contributors.js";
|
|
21
|
+
export { buildLocalizedTrayMenu, DESKTOP_TRAY_MENU_ITEMS, DesktopSurfaceNavigationRuntime, DesktopTrayRuntime, DetachedShellRoot, } from "./runtime/desktop/index.js";
|
|
22
|
+
export { AppWindowRenderer } from "./runtime/desktop/AppWindowRenderer.js";
|
|
23
|
+
export { getHostExecutionCapabilities } from "./services/task-host-capabilities.js";
|
|
24
24
|
export type CompatRuntimeState = {
|
|
25
25
|
current: unknown;
|
|
26
26
|
pendingAgentName?: string | null;
|
package/cli/plugins-cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-cli.d.ts","sourceRoot":"","sources":["../../../../../src/cli/plugins-cli.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAczD;AAwCD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYxD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CA4BA;AAwED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"plugins-cli.d.ts","sourceRoot":"","sources":["../../../../../src/cli/plugins-cli.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAczD;AAwCD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYxD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CA4BA;AAwED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA69BzD;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAsD9C"}
|
package/cli/plugins-cli.js
CHANGED
|
@@ -875,6 +875,11 @@ export function registerPluginsCli(program) {
|
|
|
875
875
|
try {
|
|
876
876
|
const result = spawnSync(editorCmd, [...editorArgs, targetDir], {
|
|
877
877
|
stdio: "inherit",
|
|
878
|
+
// Editors are usually `.cmd`/`.bat` shims on Windows (e.g. `code`),
|
|
879
|
+
// which Node cannot spawn without a shell (ENOENT) — the editor would
|
|
880
|
+
// silently never open. Route through the shell on win32 so EDITOR
|
|
881
|
+
// actually launches. EDITOR is local, user-controlled config.
|
|
882
|
+
shell: process.platform === "win32",
|
|
878
883
|
});
|
|
879
884
|
if (result.error)
|
|
880
885
|
throw result.error;
|
|
@@ -25,7 +25,7 @@ interface RunResetParams {
|
|
|
25
25
|
/** Override the proof reader for tests. */
|
|
26
26
|
proofReader?: () => Promise<string | null>;
|
|
27
27
|
/** Pre-resolved store; if omitted the CLI opens its own. */
|
|
28
|
-
store?: import("../../services/auth-store").AuthStore;
|
|
28
|
+
store?: import("../../services/auth-store.js").AuthStore;
|
|
29
29
|
/** Cleanup hook when the CLI opened its own store. */
|
|
30
30
|
cleanup?: () => Promise<void>;
|
|
31
31
|
/** Skip the file-deletion step (tests). */
|
|
@@ -46,6 +46,32 @@ export interface RunResetResult {
|
|
|
46
46
|
* Test-callable entry point. Real CLI action wraps this in commander glue.
|
|
47
47
|
*/
|
|
48
48
|
export declare function runElizaAuthReset(params?: RunResetParams): Promise<RunResetResult>;
|
|
49
|
+
export interface DevWalletLoginResult {
|
|
50
|
+
ok: boolean;
|
|
51
|
+
apiKey?: string;
|
|
52
|
+
address?: string;
|
|
53
|
+
isNewAccount?: boolean;
|
|
54
|
+
organizationId?: string | null;
|
|
55
|
+
savedTo?: string | null;
|
|
56
|
+
message?: string;
|
|
57
|
+
}
|
|
58
|
+
interface DevWalletLoginParams {
|
|
59
|
+
cloudApiBase?: string;
|
|
60
|
+
/** Persist the minted key as ELIZAOS_CLOUD_API_KEY in the eliza config. Default true. */
|
|
61
|
+
save?: boolean;
|
|
62
|
+
/** Reuse a fixed private key instead of generating one (tests / reproducible runs). */
|
|
63
|
+
privateKey?: string;
|
|
64
|
+
log?: (line: string) => void;
|
|
65
|
+
/** Test override for fetch. */
|
|
66
|
+
fetchImpl?: typeof fetch;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* DEV/TEST cloud login with no browser/OAuth: generate an ephemeral Ethereum
|
|
70
|
+
* wallet, sign the SIWE challenge, and exchange it for an Eliza Cloud API key.
|
|
71
|
+
* Optionally persists the key as ELIZAOS_CLOUD_API_KEY so the local agent uses
|
|
72
|
+
* Eliza Cloud for inference. Test-callable; the CLI action wraps it.
|
|
73
|
+
*/
|
|
74
|
+
export declare function runDevWalletLogin(params?: DevWalletLoginParams): Promise<DevWalletLoginResult>;
|
|
49
75
|
export declare function registerAuthCommand(program: Command): void;
|
|
50
76
|
export {};
|
|
51
77
|
//# sourceMappingURL=register.auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.auth.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/program/register.auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiHzC,UAAU,cAAc;IACtB,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC3C,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,2BAA2B,EAAE,SAAS,CAAC;IACtD,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sDAAsD;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,CAAC,EAAE,cAAc,GAAG,cAAc,GAAG,aAAa,CAAC;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,GAAE,cAAmB,GAC1B,OAAO,CAAC,cAAc,CAAC,CAmGzB;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"register.auth.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/program/register.auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiHzC,UAAU,cAAc;IACtB,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC3C,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,2BAA2B,EAAE,SAAS,CAAC;IACtD,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sDAAsD;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,CAAC,EAAE,cAAc,GAAG,cAAc,GAAG,aAAa,CAAC;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,GAAE,cAAmB,GAC1B,OAAO,CAAC,cAAc,CAAC,CAmGzB;AAwDD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,oBAAoB;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yFAAyF;IACzF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,+BAA+B;IAC/B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,GAAE,oBAAyB,GAChC,OAAO,CAAC,oBAAoB,CAAC,CAqI/B;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,QAkEnD"}
|
|
@@ -180,6 +180,156 @@ export async function runElizaAuthReset(params = {}) {
|
|
|
180
180
|
log(theme.success(`auth reset complete — revoked ${revoked} session(s)`));
|
|
181
181
|
return { ok: true };
|
|
182
182
|
}
|
|
183
|
+
const DEFAULT_CLOUD_API_BASE = "https://api.elizacloud.ai";
|
|
184
|
+
/**
|
|
185
|
+
* Rewrite any elizacloud.ai web host to the API host, mirroring the app's
|
|
186
|
+
* `resolveDirectCloudAuthApiBase`. Keeps a non-elizacloud (self-hosted) base as-is.
|
|
187
|
+
*/
|
|
188
|
+
function resolveCloudApiBase(input) {
|
|
189
|
+
const raw = (input ||
|
|
190
|
+
process.env.ELIZAOS_CLOUD_BASE_URL ||
|
|
191
|
+
DEFAULT_CLOUD_API_BASE).trim();
|
|
192
|
+
try {
|
|
193
|
+
const u = new URL(raw);
|
|
194
|
+
if (/(^|\.)elizacloud\.ai$/.test(u.hostname) &&
|
|
195
|
+
u.hostname !== "api.elizacloud.ai") {
|
|
196
|
+
u.hostname = "api.elizacloud.ai";
|
|
197
|
+
}
|
|
198
|
+
// Strip a trailing /api/v1 etc. — the SIWE endpoints live at the origin.
|
|
199
|
+
return `${u.protocol}//${u.host}`;
|
|
200
|
+
}
|
|
201
|
+
catch {
|
|
202
|
+
return raw.replace(/\/+$/, "");
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Build the EIP-4361 (SIWE) message string the way viem's `createSiweMessage`
|
|
207
|
+
* does, so the cloud's `verifyMessage` parses it. `ethers.Wallet.signMessage`
|
|
208
|
+
* applies the EIP-191 personal_sign prefix the server expects.
|
|
209
|
+
*/
|
|
210
|
+
function buildSiweMessage(args) {
|
|
211
|
+
const head = `${args.domain} wants you to sign in with your Ethereum account:\n${args.address}\n`;
|
|
212
|
+
const body = `\nURI: ${args.uri}\n` +
|
|
213
|
+
`Version: ${args.version}\n` +
|
|
214
|
+
`Chain ID: ${args.chainId}\n` +
|
|
215
|
+
`Nonce: ${args.nonce}\n` +
|
|
216
|
+
`Issued At: ${args.issuedAt}`;
|
|
217
|
+
return args.statement
|
|
218
|
+
? `${head}\n${args.statement}\n${body}`
|
|
219
|
+
: `${head}${body}`;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* DEV/TEST cloud login with no browser/OAuth: generate an ephemeral Ethereum
|
|
223
|
+
* wallet, sign the SIWE challenge, and exchange it for an Eliza Cloud API key.
|
|
224
|
+
* Optionally persists the key as ELIZAOS_CLOUD_API_KEY so the local agent uses
|
|
225
|
+
* Eliza Cloud for inference. Test-callable; the CLI action wraps it.
|
|
226
|
+
*/
|
|
227
|
+
export async function runDevWalletLogin(params = {}) {
|
|
228
|
+
const log = params.log ?? ((line) => console.log(line));
|
|
229
|
+
const doFetch = params.fetchImpl ?? fetch;
|
|
230
|
+
const apiBase = resolveCloudApiBase(params.cloudApiBase);
|
|
231
|
+
let ethers;
|
|
232
|
+
try {
|
|
233
|
+
ethers = await import("ethers");
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
return {
|
|
237
|
+
ok: false,
|
|
238
|
+
message: "ethers is required for dev-login but could not be loaded. Install it or run from the workspace.",
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
let nonce = null;
|
|
242
|
+
let lastNonceErr = "";
|
|
243
|
+
for (let attempt = 0; attempt < 6; attempt++) {
|
|
244
|
+
try {
|
|
245
|
+
const nonceRes = await doFetch(`${apiBase}/api/auth/siwe/nonce?chainId=1`, { headers: { accept: "application/json" } });
|
|
246
|
+
if (nonceRes.ok) {
|
|
247
|
+
const body = (await nonceRes.json());
|
|
248
|
+
if (body?.nonce && body?.domain && body?.uri) {
|
|
249
|
+
nonce = body;
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
lastNonceErr = "malformed nonce response";
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
lastNonceErr = `status ${nonceRes.status}`;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
catch (err) {
|
|
259
|
+
lastNonceErr = err instanceof Error ? err.message : String(err);
|
|
260
|
+
}
|
|
261
|
+
if (attempt < 5)
|
|
262
|
+
await new Promise((r) => setTimeout(r, 2500));
|
|
263
|
+
}
|
|
264
|
+
if (!nonce) {
|
|
265
|
+
return {
|
|
266
|
+
ok: false,
|
|
267
|
+
message: `SIWE nonce request failed at ${apiBase} (${lastNonceErr})`,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
// 2. Wallet + signed SIWE message
|
|
271
|
+
const wallet = params.privateKey
|
|
272
|
+
? new ethers.Wallet(params.privateKey)
|
|
273
|
+
: ethers.Wallet.createRandom();
|
|
274
|
+
const message = buildSiweMessage({
|
|
275
|
+
domain: nonce.domain,
|
|
276
|
+
address: wallet.address,
|
|
277
|
+
statement: nonce.statement,
|
|
278
|
+
uri: nonce.uri,
|
|
279
|
+
version: nonce.version || "1",
|
|
280
|
+
chainId: nonce.chainId || 1,
|
|
281
|
+
nonce: nonce.nonce,
|
|
282
|
+
issuedAt: new Date().toISOString(),
|
|
283
|
+
});
|
|
284
|
+
const signature = await wallet.signMessage(message);
|
|
285
|
+
// 3. Verify → API key
|
|
286
|
+
const verifyRes = await doFetch(`${apiBase}/api/auth/siwe/verify`, {
|
|
287
|
+
method: "POST",
|
|
288
|
+
headers: { "content-type": "application/json" },
|
|
289
|
+
body: JSON.stringify({ message, signature }),
|
|
290
|
+
});
|
|
291
|
+
if (!verifyRes.ok) {
|
|
292
|
+
const txt = await verifyRes.text().catch(() => "");
|
|
293
|
+
return {
|
|
294
|
+
ok: false,
|
|
295
|
+
message: `SIWE verify failed (${verifyRes.status}): ${txt.slice(0, 160)}`,
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
const verified = (await verifyRes.json());
|
|
299
|
+
const apiKey = verified.apiKey;
|
|
300
|
+
if (!apiKey) {
|
|
301
|
+
return { ok: false, message: "SIWE verify returned no apiKey" };
|
|
302
|
+
}
|
|
303
|
+
const orgId = verified.organization?.id ?? verified.user?.organization_id ?? null;
|
|
304
|
+
// 4. Persist (default) so the local agent routes to Eliza Cloud.
|
|
305
|
+
let savedTo = null;
|
|
306
|
+
if (params.save !== false) {
|
|
307
|
+
try {
|
|
308
|
+
const { resolveConfigPath, loadConfig, saveConfig } = await import("./register.setup.js");
|
|
309
|
+
const configPath = resolveConfigPath();
|
|
310
|
+
const config = loadConfig(configPath);
|
|
311
|
+
const envSection = config.env && typeof config.env === "object"
|
|
312
|
+
? config.env
|
|
313
|
+
: {};
|
|
314
|
+
envSection.ELIZAOS_CLOUD_API_KEY = apiKey;
|
|
315
|
+
envSection.ELIZAOS_CLOUD_ENABLED = "true";
|
|
316
|
+
config.env = envSection;
|
|
317
|
+
saveConfig(configPath, config);
|
|
318
|
+
savedTo = configPath;
|
|
319
|
+
}
|
|
320
|
+
catch (err) {
|
|
321
|
+
log(theme.muted(`(could not persist key to config: ${err instanceof Error ? err.message : String(err)})`));
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return {
|
|
325
|
+
ok: true,
|
|
326
|
+
apiKey,
|
|
327
|
+
address: wallet.address,
|
|
328
|
+
isNewAccount: verified.isNewAccount,
|
|
329
|
+
organizationId: orgId,
|
|
330
|
+
savedTo,
|
|
331
|
+
};
|
|
332
|
+
}
|
|
183
333
|
export function registerAuthCommand(program) {
|
|
184
334
|
const auth = program.command("auth").description("Manage Eliza auth state");
|
|
185
335
|
auth
|
|
@@ -194,4 +344,41 @@ export function registerAuthCommand(program) {
|
|
|
194
344
|
}
|
|
195
345
|
});
|
|
196
346
|
});
|
|
347
|
+
auth
|
|
348
|
+
.command("dev-login")
|
|
349
|
+
.description("DEV: generate an ephemeral Ethereum wallet, SIWE sign-in, and mint an Eliza Cloud API key (no browser/OAuth)")
|
|
350
|
+
.option("--cloud <url>", "Cloud API base (default https://api.elizacloud.ai or $ELIZAOS_CLOUD_BASE_URL)")
|
|
351
|
+
.option("--no-save", "Print the key only; do not persist it to the config")
|
|
352
|
+
.option("--json", "Emit the result as JSON (for scripting)")
|
|
353
|
+
.action(async (opts) => {
|
|
354
|
+
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
355
|
+
const result = await runDevWalletLogin({
|
|
356
|
+
cloudApiBase: opts.cloud,
|
|
357
|
+
save: opts.save,
|
|
358
|
+
});
|
|
359
|
+
if (opts.json) {
|
|
360
|
+
console.log(JSON.stringify(result));
|
|
361
|
+
if (!result.ok)
|
|
362
|
+
process.exitCode = 1;
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
if (!result.ok) {
|
|
366
|
+
console.error(theme.error(result.message ?? "dev-login failed"));
|
|
367
|
+
process.exitCode = 1;
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
console.log(theme.heading("Eliza Cloud dev-login"));
|
|
371
|
+
console.log(`${theme.success("✓")} wallet ${theme.command(result.address ?? "?")}${result.isNewAccount ? " (new account)" : ""}`);
|
|
372
|
+
console.log(`${theme.success("✓")} API key ${theme.command(result.apiKey ?? "?")}`);
|
|
373
|
+
if (result.organizationId) {
|
|
374
|
+
console.log(`${theme.muted("→")} org ${result.organizationId}`);
|
|
375
|
+
}
|
|
376
|
+
if (result.savedTo) {
|
|
377
|
+
console.log(`${theme.success("✓")} saved ELIZAOS_CLOUD_API_KEY to ${theme.command(result.savedTo)} — the agent will use Eliza Cloud`);
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
console.log(`${theme.muted("→")} not saved (use without --no-save to persist, or export ELIZAOS_CLOUD_API_KEY=<key>)`);
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
});
|
|
197
384
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.dashboard.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/program/register.dashboard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4CzC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"register.dashboard.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/program/register.dashboard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4CzC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,QAgIxD"}
|
|
@@ -84,11 +84,15 @@ export function registerDashboardCommand(program) {
|
|
|
84
84
|
process.exitCode = 1;
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
|
-
const { spawn } = await import("node:child_process");
|
|
87
|
+
const { spawn, spawnSync } = await import("node:child_process");
|
|
88
88
|
const child = spawn("npx", ["vite"], {
|
|
89
89
|
cwd: appDir,
|
|
90
90
|
stdio: ["ignore", "pipe", "pipe"],
|
|
91
91
|
env: { ...process.env },
|
|
92
|
+
// npx is `npx.cmd` on Windows; Node cannot spawn a .cmd without a
|
|
93
|
+
// shell (ENOENT), so the dev dashboard never started there. The args
|
|
94
|
+
// are constant, so enabling the shell on Windows is injection-safe.
|
|
95
|
+
shell: process.platform === "win32",
|
|
92
96
|
});
|
|
93
97
|
let opened = false;
|
|
94
98
|
const tryOpen = () => {
|
|
@@ -115,6 +119,12 @@ export function registerDashboardCommand(program) {
|
|
|
115
119
|
});
|
|
116
120
|
setTimeout(tryOpen, 10_000);
|
|
117
121
|
const cleanup = () => {
|
|
122
|
+
if (process.platform === "win32" && child.pid) {
|
|
123
|
+
// shell:true ran npx inside cmd.exe; a SIGTERM to the shell would
|
|
124
|
+
// orphan the vite grandchild, so kill the whole tree by PID.
|
|
125
|
+
spawnSync("taskkill", ["/pid", String(child.pid), "/t", "/f"]);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
118
128
|
child.kill("SIGTERM");
|
|
119
129
|
};
|
|
120
130
|
process.on("SIGINT", cleanup);
|
package/cli/program.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { buildProgram } from "./program/build-program";
|
|
1
|
+
export { buildProgram } from "./program/build-program.js";
|
|
2
2
|
//# sourceMappingURL=program.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DeploymentTargetConfig, type FirstRunCredentialInputs, type LinkedAccountFlagsConfig, type ServiceRoutingConfig } from "@elizaos/shared";
|
|
2
|
-
import { type FirstRunRuntimeTarget } from "./runtime-target";
|
|
2
|
+
import { type FirstRunRuntimeTarget } from "./runtime-target.js";
|
|
3
3
|
export interface BuildFirstRunConnectionArgs {
|
|
4
4
|
firstRunRuntimeTarget?: FirstRunRuntimeTarget;
|
|
5
5
|
firstRunCloudApiKey: string;
|