@elizaos/app-core 2.0.0-alpha.85 → 2.0.0-beta.2
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/account-pool.d.ts +6 -0
- package/account-pool.d.ts.map +1 -0
- package/account-pool.js +5 -0
- package/api/__tests__/sandbox-test-helpers.d.ts +10 -0
- package/api/__tests__/sandbox-test-helpers.d.ts.map +1 -0
- package/api/__tests__/sandbox-test-helpers.js +15 -0
- package/api/auth/audit.d.ts +52 -0
- package/api/auth/audit.d.ts.map +1 -0
- package/api/auth/audit.js +126 -0
- package/api/auth/auth-context.d.ts +40 -0
- package/api/auth/auth-context.d.ts.map +1 -0
- package/api/auth/auth-context.js +68 -0
- package/api/auth/bootstrap-token.d.ts +50 -0
- package/api/auth/bootstrap-token.d.ts.map +1 -0
- package/api/auth/bootstrap-token.js +157 -0
- package/api/auth/index.d.ts +14 -0
- package/api/auth/index.d.ts.map +1 -0
- package/api/auth/index.js +13 -0
- package/api/auth/passwords.d.ts +65 -0
- package/api/auth/passwords.d.ts.map +1 -0
- package/api/auth/passwords.js +87 -0
- package/api/auth/sensitive-rate-limit.d.ts +56 -0
- package/api/auth/sensitive-rate-limit.d.ts.map +1 -0
- package/api/auth/sensitive-rate-limit.js +95 -0
- package/api/auth/sessions.d.ts +152 -0
- package/api/auth/sessions.d.ts.map +1 -0
- package/api/auth/sessions.js +298 -0
- package/api/auth/tokens.d.ts +3 -0
- package/api/auth/tokens.d.ts.map +1 -0
- package/api/auth/tokens.js +13 -0
- package/api/auth-bootstrap-routes.d.ts +32 -0
- package/api/auth-bootstrap-routes.d.ts.map +1 -0
- package/api/auth-bootstrap-routes.js +179 -0
- package/api/auth-pairing-compat-routes.d.ts +17 -0
- package/api/auth-pairing-compat-routes.d.ts.map +1 -0
- package/api/auth-pairing-compat-routes.js +301 -0
- package/api/auth-session-routes.d.ts +31 -0
- package/api/auth-session-routes.d.ts.map +1 -0
- package/api/auth-session-routes.js +560 -0
- package/api/auth.d.ts +153 -0
- package/api/auth.d.ts.map +1 -0
- package/api/auth.js +290 -0
- package/api/automation-node-contributors.d.ts +14 -0
- package/api/automation-node-contributors.d.ts.map +1 -0
- package/api/automation-node-contributors.js +14 -0
- package/api/automations-compat-routes.d.ts +18 -0
- package/api/automations-compat-routes.d.ts.map +1 -0
- package/api/automations-compat-routes.js +274 -0
- package/api/catalog-routes.d.ts +4 -0
- package/api/catalog-routes.d.ts.map +1 -0
- package/api/catalog-routes.js +61 -0
- package/api/compat-route-shared.d.ts +29 -0
- package/api/compat-route-shared.d.ts.map +1 -0
- package/api/compat-route-shared.js +298 -0
- package/api/credential-resolver.d.ts +31 -0
- package/api/credential-resolver.d.ts.map +1 -0
- package/api/credential-resolver.js +199 -0
- package/api/database-rows-compat-routes.d.ts +4 -0
- package/api/database-rows-compat-routes.d.ts.map +1 -0
- package/api/database-rows-compat-routes.js +100 -0
- package/api/dev-compat-routes.d.ts +11 -0
- package/api/dev-compat-routes.d.ts.map +1 -0
- package/api/dev-compat-routes.js +144 -0
- package/api/dev-console-log.d.ts +21 -0
- package/api/dev-console-log.d.ts.map +1 -0
- package/api/dev-console-log.js +65 -0
- package/api/dev-stack.d.ts +49 -0
- package/api/dev-stack.d.ts.map +1 -0
- package/api/dev-stack.js +60 -0
- package/api/local-inference-compat-routes.d.ts +16 -0
- package/api/local-inference-compat-routes.d.ts.map +1 -0
- package/api/local-inference-compat-routes.js +617 -0
- package/api/onboarding-compat-routes.d.ts +4 -0
- package/api/onboarding-compat-routes.d.ts.map +1 -0
- package/api/onboarding-compat-routes.js +207 -0
- package/api/plugins-compat-routes.d.ts +103 -0
- package/api/plugins-compat-routes.d.ts.map +1 -0
- package/api/plugins-compat-routes.js +1181 -0
- package/api/response.d.ts +4 -0
- package/api/response.d.ts.map +1 -0
- package/api/response.js +28 -0
- package/api/runtime-mode-routes.d.ts +13 -0
- package/api/runtime-mode-routes.d.ts.map +1 -0
- package/api/runtime-mode-routes.js +32 -0
- package/api/secrets-inventory-routes.d.ts +39 -0
- package/api/secrets-inventory-routes.d.ts.map +1 -0
- package/api/secrets-inventory-routes.js +487 -0
- package/api/secrets-manager-routes.d.ts +9 -0
- package/api/secrets-manager-routes.d.ts.map +1 -0
- package/api/secrets-manager-routes.js +476 -0
- package/api/sensitive-request-routes.d.ts +20 -0
- package/api/sensitive-request-routes.d.ts.map +1 -0
- package/api/sensitive-request-routes.js +489 -0
- package/api/sensitive-request-store.d.ts +39 -0
- package/api/sensitive-request-store.d.ts.map +1 -0
- package/api/sensitive-request-store.js +204 -0
- package/api/server-config-filter.d.ts +14 -0
- package/api/server-config-filter.d.ts.map +1 -0
- package/api/server-config-filter.js +77 -0
- package/api/server-cors.d.ts +30 -0
- package/api/server-cors.d.ts.map +1 -0
- package/api/server-cors.js +128 -0
- package/api/server-html.d.ts +4 -0
- package/api/server-html.d.ts.map +1 -0
- package/api/server-html.js +5 -0
- package/api/server-onboarding-compat.d.ts +31 -0
- package/api/server-onboarding-compat.d.ts.map +1 -0
- package/api/server-onboarding-compat.js +283 -0
- package/api/server-security.d.ts +11 -0
- package/api/server-security.d.ts.map +1 -0
- package/api/server-security.js +29 -0
- package/api/server-startup.d.ts +5 -0
- package/api/server-startup.d.ts.map +1 -0
- package/api/server-startup.js +74 -0
- package/api/server-wallet-trade.d.ts +10 -0
- package/api/server-wallet-trade.d.ts.map +1 -0
- package/api/server-wallet-trade.js +240 -0
- package/api/server.d.ts +32 -0
- package/api/server.d.ts.map +1 -0
- package/api/server.js +768 -0
- package/api/workbench-compat-routes.d.ts +11 -0
- package/api/workbench-compat-routes.d.ts.map +1 -0
- package/api/workbench-compat-routes.js +325 -0
- package/benchmark/cua-routes.d.ts +10 -0
- package/benchmark/cua-routes.d.ts.map +1 -0
- package/benchmark/cua-routes.js +179 -0
- package/benchmark/lifeops-bench-handler.d.ts +94 -0
- package/benchmark/lifeops-bench-handler.d.ts.map +1 -0
- package/benchmark/lifeops-bench-handler.js +280 -0
- package/benchmark/lifeops-fake-backend.d.ts +227 -0
- package/benchmark/lifeops-fake-backend.d.ts.map +1 -0
- package/benchmark/lifeops-fake-backend.js +499 -0
- package/benchmark/mock-plugin-base.d.ts +9 -0
- package/benchmark/mock-plugin-base.d.ts.map +1 -0
- package/benchmark/mock-plugin-base.js +325 -0
- package/benchmark/mock-plugin.d.ts +3 -0
- package/benchmark/mock-plugin.d.ts.map +1 -0
- package/benchmark/mock-plugin.js +504 -0
- package/benchmark/params.d.ts +2 -0
- package/benchmark/params.d.ts.map +1 -0
- package/benchmark/params.js +18 -0
- package/benchmark/plugin.d.ts +42 -0
- package/benchmark/plugin.d.ts.map +1 -0
- package/benchmark/plugin.js +422 -0
- package/benchmark/replay-capture.d.ts +73 -0
- package/benchmark/replay-capture.d.ts.map +1 -0
- package/benchmark/replay-capture.js +223 -0
- package/benchmark/server-utils.d.ts +100 -0
- package/benchmark/server-utils.d.ts.map +1 -0
- package/benchmark/server-utils.js +289 -0
- package/benchmark/server.d.ts +2 -0
- package/benchmark/server.d.ts.map +1 -0
- package/benchmark/server.js +1176 -0
- package/browser.d.ts +13 -0
- package/browser.d.ts.map +1 -0
- package/browser.js +15 -0
- package/cli/argv.d.ts +17 -0
- package/cli/argv.d.ts.map +1 -0
- package/cli/argv.js +140 -0
- package/cli/banner.d.ts +11 -0
- package/cli/banner.d.ts.map +1 -0
- package/cli/banner.js +36 -0
- package/cli/cli-name.d.ts +5 -0
- package/cli/cli-name.d.ts.map +1 -0
- package/cli/cli-name.js +21 -0
- package/cli/cli-utils.d.ts +5 -0
- package/cli/cli-utils.d.ts.map +1 -0
- package/cli/cli-utils.js +13 -0
- package/cli/command-format.d.ts +2 -0
- package/cli/command-format.d.ts.map +1 -0
- package/cli/command-format.js +20 -0
- package/cli/doctor/checks.d.ts +96 -0
- package/cli/doctor/checks.d.ts.map +1 -0
- package/cli/doctor/checks.js +483 -0
- package/cli/git-commit.d.ts +5 -0
- package/cli/git-commit.d.ts.map +1 -0
- package/cli/git-commit.js +106 -0
- package/cli/parse-duration.d.ts +5 -0
- package/cli/parse-duration.d.ts.map +1 -0
- package/cli/parse-duration.js +27 -0
- package/cli/plugins-cli.d.ts +26 -0
- package/cli/plugins-cli.d.ts.map +1 -0
- package/cli/plugins-cli.js +892 -0
- package/cli/profile-utils.d.ts +3 -0
- package/cli/profile-utils.d.ts.map +1 -0
- package/cli/profile-utils.js +21 -0
- package/cli/profile.d.ts +15 -0
- package/cli/profile.d.ts.map +1 -0
- package/cli/profile.js +93 -0
- package/cli/program/build-program.d.ts +3 -0
- package/cli/program/build-program.d.ts.map +1 -0
- package/cli/program/build-program.js +12 -0
- package/cli/program/command-registry.d.ts +3 -0
- package/cli/program/command-registry.d.ts.map +1 -0
- package/cli/program/command-registry.js +24 -0
- package/cli/program/help.d.ts +3 -0
- package/cli/program/help.d.ts.map +1 -0
- package/cli/program/help.js +57 -0
- package/cli/program/preaction.d.ts +3 -0
- package/cli/program/preaction.d.ts.map +1 -0
- package/cli/program/preaction.js +40 -0
- package/cli/program/register.auth.d.ts +51 -0
- package/cli/program/register.auth.d.ts.map +1 -0
- package/cli/program/register.auth.js +203 -0
- package/cli/program/register.benchmark.d.ts +3 -0
- package/cli/program/register.benchmark.d.ts.map +1 -0
- package/cli/program/register.benchmark.js +12 -0
- package/cli/program/register.config.d.ts +3 -0
- package/cli/program/register.config.d.ts.map +1 -0
- package/cli/program/register.config.js +150 -0
- package/cli/program/register.configure.d.ts +3 -0
- package/cli/program/register.configure.d.ts.map +1 -0
- package/cli/program/register.configure.js +18 -0
- package/cli/program/register.dashboard.d.ts +3 -0
- package/cli/program/register.dashboard.d.ts.map +1 -0
- package/cli/program/register.dashboard.js +124 -0
- package/cli/program/register.db.d.ts +3 -0
- package/cli/program/register.db.d.ts.map +1 -0
- package/cli/program/register.db.js +45 -0
- package/cli/program/register.doctor.d.ts +3 -0
- package/cli/program/register.doctor.d.ts.map +1 -0
- package/cli/program/register.doctor.js +170 -0
- package/cli/program/register.models.d.ts +3 -0
- package/cli/program/register.models.d.ts.map +1 -0
- package/cli/program/register.models.js +32 -0
- package/cli/program/register.setup.d.ts +16 -0
- package/cli/program/register.setup.d.ts.map +1 -0
- package/cli/program/register.setup.js +333 -0
- package/cli/program/register.start.d.ts +3 -0
- package/cli/program/register.start.d.ts.map +1 -0
- package/cli/program/register.start.js +95 -0
- package/cli/program/register.subclis.d.ts +4 -0
- package/cli/program/register.subclis.d.ts.map +1 -0
- package/cli/program/register.subclis.js +87 -0
- package/cli/program/register.update.d.ts +12 -0
- package/cli/program/register.update.d.ts.map +1 -0
- package/cli/program/register.update.js +173 -0
- package/cli/program.d.ts +2 -0
- package/cli/program.d.ts.map +1 -0
- package/cli/program.js +1 -0
- package/cli/run-main.d.ts +2 -0
- package/cli/run-main.d.ts.map +1 -0
- package/cli/run-main.js +71 -0
- package/cli/version.d.ts +2 -0
- package/cli/version.d.ts.map +1 -0
- package/cli/version.js +2 -0
- package/connectors/capacitor-jsc.d.ts +66 -0
- package/connectors/capacitor-jsc.d.ts.map +1 -0
- package/connectors/capacitor-jsc.js +39 -0
- package/connectors/capacitor-quickjs.d.ts +64 -0
- package/connectors/capacitor-quickjs.d.ts.map +1 -0
- package/connectors/capacitor-quickjs.js +50 -0
- package/connectors/capacitor-sqlite.d.ts +41 -0
- package/connectors/capacitor-sqlite.d.ts.map +1 -0
- package/connectors/capacitor-sqlite.js +87 -0
- package/diagnostics/integration-observability.d.ts +40 -0
- package/diagnostics/integration-observability.d.ts.map +1 -0
- package/diagnostics/integration-observability.js +68 -0
- package/entry.d.ts +10 -0
- package/entry.d.ts.map +1 -0
- package/entry.js +66 -0
- package/index.d.ts +34 -4
- package/index.d.ts.map +1 -1
- package/index.js +42 -6
- package/package.json +81 -151
- package/packaging/PUBLISHING_GUIDE.md +707 -0
- package/packaging/debian/changelog +9 -0
- package/packaging/debian/control +26 -0
- package/packaging/debian/copyright +27 -0
- package/packaging/debian/elizaos-app.service +15 -0
- package/packaging/debian/install +4 -0
- package/packaging/debian/postinst +28 -0
- package/packaging/debian/prerm +14 -0
- package/packaging/debian/rules +44 -0
- package/packaging/debian/source/format +1 -0
- package/packaging/flatpak/README.md +150 -0
- package/packaging/flatpak/ai.elizaos.App.desktop +11 -0
- package/packaging/flatpak/ai.elizaos.App.metainfo.xml +81 -0
- package/packaging/flatpak/ai.elizaos.App.store.yml +142 -0
- package/packaging/flatpak/ai.elizaos.App.yml +142 -0
- package/packaging/flatpak/elizaos-app-wrapper.sh +5 -0
- package/packaging/flatpak/elizaos-app-wrapper.store.sh +16 -0
- package/packaging/flatpak/icons/128x128/ai.elizaos.App.png +0 -0
- package/packaging/flatpak/icons/256x256/ai.elizaos.App.png +0 -0
- package/packaging/flatpak/icons/512x512/ai.elizaos.App.png +0 -0
- package/packaging/homebrew/README.md +80 -0
- package/packaging/homebrew/elizaos-app.cask.rb +60 -0
- package/packaging/homebrew/elizaos-app.rb +49 -0
- package/packaging/inno/ElizaOSApp.iss +53 -0
- package/packaging/inno/build-inno.ps1 +231 -0
- package/packaging/msix/AppxManifest.store.xml +79 -0
- package/packaging/msix/AppxManifest.xml +53 -0
- package/packaging/msix/README.md +201 -0
- package/packaging/msix/assets/LargeTile.png +0 -0
- package/packaging/msix/assets/Square150x150Logo.png +0 -0
- package/packaging/msix/assets/Square44x44Logo.png +0 -0
- package/packaging/msix/assets/StoreLogo.png +0 -0
- package/packaging/msix/assets/Wide310x150Logo.png +0 -0
- package/packaging/msix/build-msix.ps1 +206 -0
- package/packaging/msix/generate-placeholder-assets.ps1 +49 -0
- package/packaging/msix/store/description.md +31 -0
- package/packaging/msix/store/listing.json +27 -0
- package/packaging/pypi/README.md +14 -0
- package/packaging/pypi/elizaos_app/__init__.py +7 -0
- package/packaging/pypi/elizaos_app/__main__.py +6 -0
- package/packaging/pypi/elizaos_app/cli.py +21 -0
- package/packaging/pypi/elizaos_app/loader.py +127 -0
- package/packaging/pypi/elizaos_app/py.typed +1 -0
- package/packaging/pypi/pyproject.toml +38 -0
- package/packaging/snap/snapcraft.yaml +560 -0
- package/packaging/test-packaging.sh +309 -0
- package/patches/@noble%2Fcurves@2.0.1.patch +33 -0
- package/patches/@pixiv%2Fthree-vrm@3.5.2.patch +26 -0
- package/patches/coding-agent-adapters@0.16.3.patch +44 -0
- package/patches/electrobun@1.16.0.patch +13 -0
- package/patches/llama-cpp-capacitor@0.1.5.patch +2387 -0
- package/patches/proper-lockfile@4.1.2.patch +14 -0
- package/patches/pty-manager@1.11.0.patch +194 -0
- package/permissions/types.d.ts +8 -0
- package/permissions/types.d.ts.map +1 -0
- package/permissions/types.js +7 -0
- package/platform/agent-browser-stub.d.ts +27 -0
- package/platform/agent-browser-stub.d.ts.map +1 -0
- package/platform/agent-browser-stub.js +16 -0
- package/platform/empty-node-module.d.ts +31 -0
- package/platform/empty-node-module.d.ts.map +1 -0
- package/platform/empty-node-module.js +22 -0
- package/platforms/android/Gemfile +6 -0
- package/platforms/android/README.md +79 -0
- package/platforms/android/app/build.gradle +124 -0
- package/platforms/android/app/capacitor.build.gradle +32 -0
- package/platforms/android/app/proguard-rules.pro +46 -0
- package/platforms/android/app/src/androidTest/java/ai/elizaos/app/ElizaOsInstrumentedTest.java +162 -0
- package/platforms/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +26 -0
- package/platforms/android/app/src/main/AndroidManifest.xml +83 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/AgentPlugin.java +232 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaAgentService.java +1514 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaAssistActivity.java +21 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaBootReceiver.java +61 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaBrowserActivity.java +39 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaCalendarActivity.java +75 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaCameraActivity.java +54 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaClockActivity.java +70 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaContactsActivity.java +56 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaDialActivity.java +83 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaInCallService.java +168 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaMmsReceiver.java +70 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaNativeBridge.java +38 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaRespondViaMessageService.java +119 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaSmsComposeActivity.java +50 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaSmsReceiver.java +84 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/GatewayConnectionService.java +211 -0
- package/platforms/android/app/src/main/java/ai/elizaos/app/MainActivity.java +202 -0
- package/platforms/android/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/platforms/android/app/src/main/res/drawable/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
- package/platforms/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
- package/platforms/android/app/src/main/res/layout/activity_main.xml +12 -0
- package/platforms/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/platforms/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -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_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_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_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_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_round.png +0 -0
- package/platforms/android/app/src/main/res/values/ic_launcher_background.xml +4 -0
- package/platforms/android/app/src/main/res/values/strings.xml +7 -0
- package/platforms/android/app/src/main/res/values/styles.xml +22 -0
- package/platforms/android/app/src/main/res/xml/file_paths.xml +5 -0
- package/platforms/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +18 -0
- package/platforms/android/build.gradle +63 -0
- package/platforms/android/capacitor-cordova-android-plugins/build.gradle +53 -0
- package/platforms/android/capacitor-cordova-android-plugins/cordova.variables.gradle +3 -0
- package/platforms/android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml +3 -0
- package/platforms/android/capacitor-cordova-android-plugins/src/main/java/.gitkeep +1 -0
- package/platforms/android/capacitor-cordova-android-plugins/src/main/res/.gitkeep +1 -0
- package/platforms/android/capacitor.settings.gradle +45 -0
- package/platforms/android/fastlane/Appfile +2 -0
- package/platforms/android/fastlane/Fastfile +59 -0
- package/platforms/android/fastlane/metadata/android/en-US/full_description.txt +24 -0
- package/platforms/android/fastlane/metadata/android/en-US/short_description.txt +1 -0
- package/platforms/android/fastlane/metadata/android/en-US/title.txt +1 -0
- package/platforms/android/fastlane/metadata/android/en-US/video.txt +0 -0
- package/platforms/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/platforms/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/platforms/android/gradle.properties +27 -0
- package/platforms/android/gradlew +251 -0
- package/platforms/android/gradlew.bat +94 -0
- package/platforms/android/settings.gradle +13 -0
- package/platforms/android/variables.gradle +17 -0
- package/platforms/electrobun/.generated/brand-config.json +8 -0
- package/platforms/electrobun/README.md +44 -0
- package/platforms/electrobun/assets/appIcon.ico +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_128x128.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_128x128@2x.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_16x16.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_16x16@2x.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_256x256.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_256x256@2x.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_32x32.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_32x32@2x.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_512x512.png +0 -0
- package/platforms/electrobun/assets/appIcon.iconset/icon_512x512@2x.png +0 -0
- package/platforms/electrobun/assets/appIcon.png +0 -0
- package/platforms/electrobun/assets/brand-config.json +8 -0
- package/platforms/electrobun/biome.json +11 -0
- package/platforms/electrobun/electrobun.config.ts +435 -0
- package/platforms/electrobun/entitlements/README.md +54 -0
- package/platforms/electrobun/entitlements/mas-child.entitlements +10 -0
- package/platforms/electrobun/entitlements/mas.entitlements +41 -0
- package/platforms/electrobun/native/macos/window-effects.mm +1030 -0
- package/platforms/electrobun/package.json +42 -0
- package/platforms/electrobun/scripts/bin/zip +2 -0
- package/platforms/electrobun/scripts/build-macos-effects.sh +31 -0
- package/platforms/electrobun/scripts/build-whisper-universal.sh +137 -0
- package/platforms/electrobun/scripts/build-whisper.sh +95 -0
- package/platforms/electrobun/scripts/ensure-whisper-model.sh +93 -0
- package/platforms/electrobun/scripts/hdiutil-wrapper.sh +33 -0
- package/platforms/electrobun/scripts/lib/app-dir.mjs +74 -0
- package/platforms/electrobun/scripts/lib/repo-root.mjs +77 -0
- package/platforms/electrobun/scripts/local-adhoc-sign-macos.ts +214 -0
- package/platforms/electrobun/scripts/macos-direct-launcher.c +84 -0
- package/platforms/electrobun/scripts/postwrap-diagnostics.ts +423 -0
- package/platforms/electrobun/scripts/postwrap-sign-runtime-macos.ts +352 -0
- package/platforms/electrobun/scripts/sign-windows.ps1 +121 -0
- package/platforms/electrobun/scripts/smoke-test-windows.ps1 +907 -0
- package/platforms/electrobun/scripts/smoke-test.sh +1186 -0
- package/platforms/electrobun/scripts/stage-macos-release-artifacts.sh +491 -0
- package/platforms/electrobun/scripts/sync-web-assets.mjs +48 -0
- package/platforms/electrobun/scripts/verify-rpc-handlers.ts +162 -0
- package/platforms/electrobun/scripts/verify-windows-installer-proof.ps1 +203 -0
- package/platforms/electrobun/scripts/xcrun-wrapper.sh +80 -0
- package/platforms/electrobun/scripts/zip-wrapper.sh +6 -0
- package/platforms/electrobun/src/__stubs__/bun-ffi.ts +51 -0
- package/platforms/electrobun/src/__stubs__/electrobun-bun.ts +20 -0
- package/platforms/electrobun/src/agent-ready-state.ts +35 -0
- package/platforms/electrobun/src/agent-reset-from-main.ts +87 -0
- package/platforms/electrobun/src/api-base.ts +169 -0
- package/platforms/electrobun/src/application-menu-action-registry.ts +21 -0
- package/platforms/electrobun/src/application-menu.ts +418 -0
- package/platforms/electrobun/src/background-notice.ts +65 -0
- package/platforms/electrobun/src/brand-config.ts +184 -0
- package/platforms/electrobun/src/bridge/browser-tabs-renderer-registry.ts +60 -0
- package/platforms/electrobun/src/bridge/electrobun-direct-rpc.ts +430 -0
- package/platforms/electrobun/src/bridge/electrobun-preload.ts +1 -0
- package/platforms/electrobun/src/bridge/electrobun-stub.ts +21 -0
- package/platforms/electrobun/src/browser-workspace-bridge-server.ts +284 -0
- package/platforms/electrobun/src/cloud-auth-window.ts +216 -0
- package/platforms/electrobun/src/cloud-disconnect-from-main.ts +118 -0
- package/platforms/electrobun/src/constants.ts +2 -0
- package/platforms/electrobun/src/desktop-http-request.test.ts +85 -0
- package/platforms/electrobun/src/desktop-http-request.ts +103 -0
- package/platforms/electrobun/src/desktop-test-bridge-server.ts +248 -0
- package/platforms/electrobun/src/devtools-layout.ts +63 -0
- package/platforms/electrobun/src/diagnostic-format.ts +65 -0
- package/platforms/electrobun/src/fatal-shutdown.test.ts +30 -0
- package/platforms/electrobun/src/fatal-shutdown.ts +10 -0
- package/platforms/electrobun/src/floating-chat-window.ts +239 -0
- package/platforms/electrobun/src/index.ts +2510 -0
- package/platforms/electrobun/src/libMacWindowEffects.dylib +0 -0
- package/platforms/electrobun/src/lifecycle/api-base-owner.ts +119 -0
- package/platforms/electrobun/src/lifecycle/desktop-session-prime.ts +77 -0
- package/platforms/electrobun/src/logger.ts +23 -0
- package/platforms/electrobun/src/main-window-runtime.ts +117 -0
- package/platforms/electrobun/src/main-window-session.ts +88 -0
- package/platforms/electrobun/src/menu-reset-from-main.ts +211 -0
- package/platforms/electrobun/src/native/agent.ts +1963 -0
- package/platforms/electrobun/src/native/auth-bridge.ts +525 -0
- package/platforms/electrobun/src/native/browser-workspace.ts +574 -0
- package/platforms/electrobun/src/native/camera.ts +68 -0
- package/platforms/electrobun/src/native/canvas.ts +504 -0
- package/platforms/electrobun/src/native/credentials.ts +765 -0
- package/platforms/electrobun/src/native/desktop.ts +2317 -0
- package/platforms/electrobun/src/native/editor-bridge.ts +292 -0
- package/platforms/electrobun/src/native/file-watcher.ts +220 -0
- package/platforms/electrobun/src/native/gateway.ts +218 -0
- package/platforms/electrobun/src/native/gpu-window.ts +301 -0
- package/platforms/electrobun/src/native/index.ts +105 -0
- package/platforms/electrobun/src/native/location.ts +110 -0
- package/platforms/electrobun/src/native/loopback-port.ts +81 -0
- package/platforms/electrobun/src/native/mac-window-effects.ts +178 -0
- package/platforms/electrobun/src/native/music-player.ts +61 -0
- package/platforms/electrobun/src/native/permissions-shared.ts +171 -0
- package/platforms/electrobun/src/native/permissions.ts +242 -0
- package/platforms/electrobun/src/native/power-state.ts +195 -0
- package/platforms/electrobun/src/native/screencapture.ts +654 -0
- package/platforms/electrobun/src/native/steward.ts +343 -0
- package/platforms/electrobun/src/native/swabble.ts +349 -0
- package/platforms/electrobun/src/native/talkmode.ts +441 -0
- package/platforms/electrobun/src/native/webgpu-browser-support.ts +220 -0
- package/platforms/electrobun/src/native/whisper.ts +280 -0
- package/platforms/electrobun/src/preload-validation.ts +65 -0
- package/platforms/electrobun/src/preload.js +1 -0
- package/platforms/electrobun/src/print-electrobun-dev-settings-banner.ts +140 -0
- package/platforms/electrobun/src/renderer-static.ts +77 -0
- package/platforms/electrobun/src/rpc-handlers.ts +1079 -0
- package/platforms/electrobun/src/rpc-schema.ts +1870 -0
- package/platforms/electrobun/src/runtime-layout.ts +150 -0
- package/platforms/electrobun/src/runtime-permissions.ts +131 -0
- package/platforms/electrobun/src/screenshot-dev-server.ts +125 -0
- package/platforms/electrobun/src/startup-trace.ts +351 -0
- package/platforms/electrobun/src/surface-windows.ts +475 -0
- package/platforms/electrobun/src/types/web-speech.d.ts +52 -0
- package/platforms/electrobun/src/types.ts +18 -0
- package/platforms/electrobun/src/windows-cef-profile.ts +124 -0
- package/platforms/electrobun/tsconfig.json +75 -0
- package/platforms/electrobun/vitest.electrobun.config.ts +54 -0
- package/platforms/ios/App/App/App.entitlements +18 -0
- package/platforms/ios/App/App/AppDelegate.swift +93 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ios-marketing-1024.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-20x20@1x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-20x20@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-29x29@1x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-29x29@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-40x40@1x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-40x40@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-76x76@1x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-76x76@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-ipad-83_5x83_5@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-20x20@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-20x20@3x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-29x29@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-29x29@3x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-40x40@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-40x40@3x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-60x60@2x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-iphone-60x60@3x.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +116 -0
- package/platforms/ios/App/App/Assets.xcassets/Contents.json +6 -0
- package/platforms/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +23 -0
- package/platforms/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
- package/platforms/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
- package/platforms/ios/App/App/Base.lproj/LaunchScreen.storyboard +32 -0
- package/platforms/ios/App/App/Base.lproj/Main.storyboard +19 -0
- package/platforms/ios/App/App/ElizaIntentPlugin.swift +185 -0
- package/platforms/ios/App/App/Info.plist +123 -0
- package/platforms/ios/App/App/PrivacyInfo.xcprivacy +55 -0
- package/platforms/ios/App/App/SceneDelegate.swift +77 -0
- package/platforms/ios/App/App/WebsiteBlockerContentExtension/ActionRequestHandler.swift +142 -0
- package/platforms/ios/App/App/WebsiteBlockerContentExtension/Info.plist +29 -0
- package/platforms/ios/App/App/WebsiteBlockerContentExtension/PrivacyInfo.xcprivacy +23 -0
- package/platforms/ios/App/App/WebsiteBlockerContentExtension/WebsiteBlockerContentExtension.entitlements +10 -0
- package/platforms/ios/App/App.xcodeproj/project.pbxproj +596 -0
- package/platforms/ios/App/App.xcworkspace/contents.xcworkspacedata +10 -0
- package/platforms/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/platforms/ios/App/ExportOptions.plist +18 -0
- package/platforms/ios/App/Podfile +51 -0
- package/platforms/ios/App/Podfile.lock +131 -0
- package/platforms/ios/Gemfile +6 -0
- package/platforms/ios/fastlane/Appfile +4 -0
- package/platforms/ios/fastlane/Fastfile +94 -0
- package/platforms/ios/fastlane/Matchfile +12 -0
- package/platforms/ios/fastlane/metadata/en-US/description.txt +22 -0
- package/platforms/ios/fastlane/metadata/en-US/keywords.txt +1 -0
- package/platforms/ios/fastlane/metadata/en-US/marketing_url.txt +1 -0
- package/platforms/ios/fastlane/metadata/en-US/name.txt +1 -0
- package/platforms/ios/fastlane/metadata/en-US/privacy_url.txt +1 -0
- package/platforms/ios/fastlane/metadata/en-US/promotional_text.txt +1 -0
- package/platforms/ios/fastlane/metadata/en-US/subtitle.txt +1 -0
- package/platforms/ios/fastlane/metadata/en-US/support_url.txt +1 -0
- package/register-runtime-hooks.d.ts +2 -0
- package/register-runtime-hooks.d.ts.map +1 -0
- package/register-runtime-hooks.js +13 -0
- package/registry/generate-apps.d.ts +2 -0
- package/registry/generate-apps.d.ts.map +1 -0
- package/registry/generate-apps.js +338 -0
- package/registry/generate.d.ts +2 -0
- package/registry/generate.d.ts.map +1 -0
- package/registry/generate.js +506 -0
- package/registry/index.d.ts +6 -0
- package/registry/index.d.ts.map +1 -0
- package/registry/index.js +68 -0
- package/registry/loader.d.ts +27 -0
- package/registry/loader.d.ts.map +1 -0
- package/registry/loader.js +111 -0
- package/registry/schema.d.ts +989 -0
- package/registry/schema.d.ts.map +1 -0
- package/registry/schema.js +264 -0
- package/runtime/api-dev-settings-banner.d.ts +7 -0
- package/runtime/api-dev-settings-banner.d.ts.map +1 -0
- package/runtime/api-dev-settings-banner.js +104 -0
- package/runtime/app-route-plugin-registry.d.ts +3 -0
- package/runtime/app-route-plugin-registry.d.ts.map +1 -0
- package/runtime/app-route-plugin-registry.js +1 -0
- package/runtime/build-character-from-config.d.ts +3 -0
- package/runtime/build-character-from-config.d.ts.map +1 -0
- package/runtime/build-character-from-config.js +59 -0
- package/runtime/build-variant.d.ts +8 -0
- package/runtime/build-variant.d.ts.map +1 -0
- package/runtime/build-variant.js +7 -0
- package/runtime/channel-plugin-map.d.ts +6 -0
- package/runtime/channel-plugin-map.d.ts.map +1 -0
- package/runtime/channel-plugin-map.js +38 -0
- package/runtime/dev-server.d.ts +2 -0
- package/runtime/dev-server.d.ts.map +1 -0
- package/runtime/dev-server.js +383 -0
- package/runtime/dev-settings-figlet-heading.d.ts +22 -0
- package/runtime/dev-settings-figlet-heading.d.ts.map +1 -0
- package/runtime/dev-settings-figlet-heading.js +55 -0
- package/runtime/eliza.d.ts +21 -0
- package/runtime/eliza.d.ts.map +1 -0
- package/runtime/eliza.js +863 -0
- package/runtime/embedding-manager-support.d.ts +77 -0
- package/runtime/embedding-manager-support.d.ts.map +1 -0
- package/runtime/embedding-manager-support.js +309 -0
- package/runtime/embedding-presets.d.ts +5 -0
- package/runtime/embedding-presets.d.ts.map +1 -0
- package/runtime/embedding-presets.js +47 -0
- package/runtime/embedding-warmup-policy.d.ts +13 -0
- package/runtime/embedding-warmup-policy.d.ts.map +1 -0
- package/runtime/embedding-warmup-policy.js +33 -0
- package/runtime/ensure-local-inference-handler.d.ts +25 -0
- package/runtime/ensure-local-inference-handler.d.ts.map +1 -0
- package/runtime/ensure-local-inference-handler.js +389 -0
- package/runtime/ensure-text-to-speech-handler.d.ts +18 -0
- package/runtime/ensure-text-to-speech-handler.d.ts.map +1 -0
- package/runtime/ensure-text-to-speech-handler.js +50 -0
- package/runtime/error-handlers.d.ts +12 -0
- package/runtime/error-handlers.d.ts.map +1 -0
- package/runtime/error-handlers.js +49 -0
- package/runtime/mobile-local-inference-gate.d.ts +21 -0
- package/runtime/mobile-local-inference-gate.d.ts.map +1 -0
- package/runtime/mobile-local-inference-gate.js +24 -0
- package/runtime/mobile-safe-runtime.d.ts +123 -0
- package/runtime/mobile-safe-runtime.d.ts.map +1 -0
- package/runtime/mobile-safe-runtime.js +290 -0
- package/runtime/mode/remote-forwarder.d.ts +35 -0
- package/runtime/mode/remote-forwarder.d.ts.map +1 -0
- package/runtime/mode/remote-forwarder.js +119 -0
- package/runtime/mode/route-mode-guard.d.ts +21 -0
- package/runtime/mode/route-mode-guard.d.ts.map +1 -0
- package/runtime/mode/route-mode-guard.js +30 -0
- package/runtime/mode/route-mode-matrix.d.ts +64 -0
- package/runtime/mode/route-mode-matrix.d.ts.map +1 -0
- package/runtime/mode/route-mode-matrix.js +125 -0
- package/runtime/mode/runtime-mode.d.ts +72 -0
- package/runtime/mode/runtime-mode.d.ts.map +1 -0
- package/runtime/mode/runtime-mode.js +167 -0
- package/runtime/runtime-bootstrap-policy.d.ts +17 -0
- package/runtime/runtime-bootstrap-policy.d.ts.map +1 -0
- package/runtime/runtime-bootstrap-policy.js +37 -0
- package/runtime/sandbox-policy.d.ts +8 -0
- package/runtime/sandbox-policy.d.ts.map +1 -0
- package/runtime/sandbox-policy.js +7 -0
- package/runtime/startup-overlay.d.ts +14 -0
- package/runtime/startup-overlay.d.ts.map +1 -0
- package/runtime/startup-overlay.js +55 -0
- package/runtime/telegram-standalone-handler.d.ts +34 -0
- package/runtime/telegram-standalone-handler.d.ts.map +1 -0
- package/runtime/telegram-standalone-handler.js +195 -0
- package/runtime/telegram-standalone-policy.d.ts +2 -0
- package/runtime/telegram-standalone-policy.d.ts.map +1 -0
- package/runtime/telegram-standalone-policy.js +14 -0
- package/scripts/README.md +27 -0
- package/scripts/align-electrobun-version.mjs +37 -0
- package/scripts/aosp/README.md +66 -0
- package/scripts/aosp/avd-test.mjs +403 -0
- package/scripts/aosp/boot-validate.mjs +536 -0
- package/scripts/aosp/build-aosp.mjs +448 -0
- package/scripts/aosp/build-bootanimation.mjs +178 -0
- package/scripts/aosp/capture-screens.mjs +325 -0
- package/scripts/aosp/compile-libllama.mjs +1333 -0
- package/scripts/aosp/compile-shim.mjs +328 -0
- package/scripts/aosp/e2e-validate.mjs +225 -0
- package/scripts/aosp/lib/load-variant-config.mjs +182 -0
- package/scripts/aosp/lint-init-rc.mjs +258 -0
- package/scripts/aosp/llama-cpp-patches/README.md +49 -0
- package/scripts/aosp/llama-cpp-patches/apply-patches.mjs +198 -0
- package/scripts/aosp/llama-cpp-patches/polarquant/0001-Q4_POLAR-register-GGML_TYPE_Q4_POLAR-45-and-block_q4.patch +108 -0
- package/scripts/aosp/llama-cpp-patches/polarquant/0002-Q4_POLAR-vendor-PolarQuant-ref-kernels-into-ggml-bas.patch +460 -0
- package/scripts/aosp/llama-cpp-patches/polarquant/0003-tests-cover-Q4_POLAR-fix-latent-buffer-overflow.patch +102 -0
- package/scripts/aosp/llama-cpp-patches/polarquant/0004-Q4_POLAR-gate-QJL-residual-on-runtime-flag-default-o.patch +97 -0
- package/scripts/aosp/llama-cpp-patches/qjl/0001-ggml-add-GGML_TYPE_QJL1_256-GGML_OP_ATTN_SCORE_QJL-e.patch +120 -0
- package/scripts/aosp/llama-cpp-patches/qjl/0002-ggml-register-QJL1_256-type-traits-ATTN_SCORE_QJL-op.patch +1392 -0
- package/scripts/aosp/llama-cpp-patches/qjl/0003-ggml-set-QJL1_256-blck_size-to-head_dim-128-not-sket.patch +56 -0
- package/scripts/aosp/llama-cpp-patches/qjl/0004-tests-add-test-qjl-cache-verifying-type-traits-score.patch +335 -0
- package/scripts/aosp/llama-cpp-patches/qjl/0005-ggml-flip-block_qjl1_256-to-signs-then-norm.patch +69 -0
- package/scripts/aosp/llama-shim/eliza_llama_shim.c +276 -0
- package/scripts/aosp/seccomp-shim/loader-wrap.c +141 -0
- package/scripts/aosp/seccomp-shim/sigsys-handler.c +338 -0
- package/scripts/aosp/sim.mjs +277 -0
- package/scripts/aosp/smoke-cuttlefish.mjs +673 -0
- package/scripts/aosp/stage-default-models.mjs +340 -0
- package/scripts/aosp/stage-models-dfm.mjs +384 -0
- package/scripts/aosp/sync-to-aosp.mjs +134 -0
- package/scripts/aosp/validate.mjs +1273 -0
- package/scripts/aosp/variant-config-schema.ts +10 -0
- package/scripts/audit-live-test-surface.mjs +590 -0
- package/scripts/audit-server-test-surface.mjs +163 -0
- package/scripts/benchmark-preflight.mjs +170 -0
- package/scripts/bin/.gitkeep +0 -0
- package/scripts/build-bundled-agent-skills-artifact.mjs +58 -0
- package/scripts/build-bundled-orchestrator-artifact.mjs +66 -0
- package/scripts/build-capacitor-app.mjs +122 -0
- package/scripts/build-electrobun-preload.mjs +117 -0
- package/scripts/build-flatpak.mjs +125 -0
- package/scripts/build-image.sh +461 -0
- package/scripts/build-llama-cpp-dflash.mjs +1866 -0
- package/scripts/build-native-plugins.mjs +153 -0
- package/scripts/build-patched-electrobun-cli.mjs +424 -0
- package/scripts/build-win.mjs +82 -0
- package/scripts/bump-elizaos.sh +438 -0
- package/scripts/check-i18n.mjs +328 -0
- package/scripts/check-secret-hygiene.mjs +344 -0
- package/scripts/check-upstream-drift.mjs +102 -0
- package/scripts/clean-repo.mjs +187 -0
- package/scripts/codesign-mas.mjs +297 -0
- package/scripts/container-entrypoint.mjs +101 -0
- package/scripts/coordinator-cross-platform-review.mjs +192 -0
- package/scripts/copy-package-assets.mjs +31 -0
- package/scripts/copy-runtime-node-modules.ts +1782 -0
- package/scripts/coverage-policy.d.mts +16 -0
- package/scripts/coverage-policy.mjs +38 -0
- package/scripts/css-coverage.mjs +241 -0
- package/scripts/deploy-image.sh +318 -0
- package/scripts/desktop-build.mjs +867 -0
- package/scripts/desktop-stack-status.mjs +80 -0
- package/scripts/dev-platform.mjs +975 -0
- package/scripts/dev-ui.mjs +1178 -0
- package/scripts/dev-win.mjs +25 -0
- package/scripts/disable-local-eliza-workspace.mjs +420 -0
- package/scripts/docker-ci-smoke.sh +500 -0
- package/scripts/docker-entrypoint.sh +11 -0
- package/scripts/docker-runtime-review.mjs +230 -0
- package/scripts/docs-list.js +206 -0
- package/scripts/ensure-avatars.mjs +335 -0
- package/scripts/ensure-bundled-workspaces.mjs +143 -0
- package/scripts/ensure-capacitor-platform.mjs +58 -0
- package/scripts/ensure-electrobun-core.mjs +318 -0
- package/scripts/ensure-generated-core-proto-js.mjs +125 -0
- package/scripts/ensure-shared-i18n-data.mjs +67 -0
- package/scripts/ensure-skills.mjs +177 -0
- package/scripts/ensure-type-package-aliases.mjs +246 -0
- package/scripts/ensure-vision-deps.mjs +196 -0
- package/scripts/entry.ts +11 -0
- package/scripts/find-collisions.mjs +765 -0
- package/scripts/find-duplicate-components.mjs +203 -0
- package/scripts/fix-workspace-deps.mjs +328 -0
- package/scripts/generate-onboarding-voicelines.mjs +194 -0
- package/scripts/generate-plugin-index.js +1055 -0
- package/scripts/generate-static-asset-manifest.mjs +15 -0
- package/scripts/generated/static-asset-manifest.json +4 -0
- package/scripts/i18n-dynamic-keys.json +128 -0
- package/scripts/init-submodules.mjs +425 -0
- package/scripts/ios-xcframework/README.md +233 -0
- package/scripts/ios-xcframework/build-xcframework.mjs +487 -0
- package/scripts/kernel-patches/metal-kernels.mjs +656 -0
- package/scripts/kernel-patches/vulkan-dispatch-patches/01-vulkan-shaders-gen.patch +41 -0
- package/scripts/kernel-patches/vulkan-dispatch-patches/02-ggml-vulkan-pipelines.patch +86 -0
- package/scripts/kernel-patches/vulkan-kernels.mjs +281 -0
- package/scripts/lib/allocate-loopback-port.mjs +58 -0
- package/scripts/lib/api-supervisor.mjs +115 -0
- package/scripts/lib/app-dir.mjs +74 -0
- package/scripts/lib/asset-cdn.mjs +118 -0
- package/scripts/lib/bun-version-guard.mjs +44 -0
- package/scripts/lib/capacitor-platform-templates.mjs +306 -0
- package/scripts/lib/capacitor-plugin-build-needed.mjs +79 -0
- package/scripts/lib/capacitor-plugin-names.mjs +35 -0
- package/scripts/lib/desktop-preflight.mjs +122 -0
- package/scripts/lib/desktop-stack-status.mjs +151 -0
- package/scripts/lib/dev-ui-onchain.mjs +22 -0
- package/scripts/lib/dev-ui-vision.mjs +15 -0
- package/scripts/lib/kill-process-tree.mjs +87 -0
- package/scripts/lib/kill-ui-listen-port.mjs +74 -0
- package/scripts/lib/node-path-env.mjs +11 -0
- package/scripts/lib/orchestrator-desktop-dev-banner.mjs +285 -0
- package/scripts/lib/patch-bun-exports.mjs +1446 -0
- package/scripts/lib/read-app-identity.mjs +54 -0
- package/scripts/lib/release-check-pack-dry-run.ts +34 -0
- package/scripts/lib/repo-root.mjs +77 -0
- package/scripts/lib/stage-android-agent.mjs +704 -0
- package/scripts/lib/static-asset-manifest.mjs +151 -0
- package/scripts/lib/sync-eliza-env-aliases.mjs +37 -0
- package/scripts/lib/vite-renderer-dist-stale.mjs +141 -0
- package/scripts/lib/workspace-discovery.mjs +108 -0
- package/scripts/lifeops-prompt-benchmark.ts +206 -0
- package/scripts/link-browser-server.mjs +157 -0
- package/scripts/link-docker-local-app-packages.mjs +345 -0
- package/scripts/link-external-plugins.mjs +195 -0
- package/scripts/mobile-auth-simulator-smoke.mjs +373 -0
- package/scripts/normalize-parallax-capture.ts +97 -0
- package/scripts/omnivoice-fuse/Makefile +44 -0
- package/scripts/omnivoice-fuse/README.md +266 -0
- package/scripts/omnivoice-fuse/cmake-graft.mjs +180 -0
- package/scripts/omnivoice-fuse/ffi-stub.c +222 -0
- package/scripts/omnivoice-fuse/ffi.h +158 -0
- package/scripts/omnivoice-fuse/libelizainference_stub.dylib +0 -0
- package/scripts/omnivoice-fuse/prepare.mjs +263 -0
- package/scripts/omnivoice-fuse/verify-symbols.mjs +138 -0
- package/scripts/pack-upstreams.mjs +392 -0
- package/scripts/patch-deps.mjs +597 -0
- package/scripts/patch-workspace-plugins.mjs +148 -0
- package/scripts/playwright-ui-live-stack.ts +667 -0
- package/scripts/playwright-ui-smoke-api-stub.mjs +1838 -0
- package/scripts/plugin-index-local-additions.json +12 -0
- package/scripts/plugin-metadata-overrides.json +165 -0
- package/scripts/pre-review-local.mjs +599 -0
- package/scripts/prepare-ios-cocoapods.sh +30 -0
- package/scripts/prepare-package-dist.mjs +358 -0
- package/scripts/process-vrms.mjs +203 -0
- package/scripts/prune-cdn-local-assets.mjs +44 -0
- package/scripts/publish-local-plugins-next.mjs +122 -0
- package/scripts/release-check.ts +1402 -0
- package/scripts/relink-workspace-packages-to-dist.mjs +115 -0
- package/scripts/replace-workspace-versions.mjs +128 -0
- package/scripts/report-coverage-surfaces.mjs +121 -0
- package/scripts/restore-workspace-refs.mjs +128 -0
- package/scripts/rt.mjs +29 -0
- package/scripts/rt.sh +4 -0
- package/scripts/run-biome-check.mjs +191 -0
- package/scripts/run-coding-agent-e2e.mjs +46 -0
- package/scripts/run-desktop-playwright.mjs +35 -0
- package/scripts/run-local-plugin-live-smoke.mjs +185 -0
- package/scripts/run-mobile-build.mjs +3308 -0
- package/scripts/run-node-runtime.mjs +75 -0
- package/scripts/run-node-tsx.mjs +62 -0
- package/scripts/run-node.mjs +294 -0
- package/scripts/run-playwright.mjs +66 -0
- package/scripts/run-production-build.mjs +138 -0
- package/scripts/run-release-contract-suite.mjs +57 -0
- package/scripts/run-repo-setup.mjs +230 -0
- package/scripts/run-screenshotter.mjs +140 -0
- package/scripts/run-ui-smoke-playwright-suite.mjs +96 -0
- package/scripts/run-windows-smoke-launcher.ps1 +35 -0
- package/scripts/run-with-env.mjs +60 -0
- package/scripts/runtime-package-manifest.ts +107 -0
- package/scripts/sandbox-setup.sh +7 -0
- package/scripts/sanitize-npm-package-metadata.mjs +165 -0
- package/scripts/set-package-version.mjs +13 -0
- package/scripts/setup-upstreams.mjs +838 -0
- package/scripts/smoke-api-status.mjs +113 -0
- package/scripts/smoke-lifeops.mjs +305 -0
- package/scripts/startup-integration-script-drift.test.ts +94 -0
- package/scripts/sync-desktop-renderer.mjs +308 -0
- package/scripts/sync-dod-gap-issues-lib.mjs +214 -0
- package/scripts/sync-dod-gap-issues.mjs +218 -0
- package/scripts/type-audit.mjs +606 -0
- package/scripts/validate-cdn-assets.mjs +307 -0
- package/scripts/validate-regression-matrix.mjs +360 -0
- package/scripts/workspace-plugin-patches/plugin-anthropic-elizaos-core-api-compat.patch +34 -0
- package/scripts/workspace-prepare.mjs +192 -0
- package/scripts/worktree-env.sh +41 -0
- package/scripts/write-build-info.ts +69 -0
- package/scripts/write-homepage-release-data.mjs +393 -0
- package/security/agent-vault-id.d.ts +16 -0
- package/security/agent-vault-id.d.ts.map +1 -0
- package/security/agent-vault-id.js +32 -0
- package/security/cloud-secret-store.d.ts +34 -0
- package/security/cloud-secret-store.d.ts.map +1 -0
- package/security/cloud-secret-store.js +65 -0
- package/security/export-guard.d.ts +34 -0
- package/security/export-guard.d.ts.map +1 -0
- package/security/export-guard.js +127 -0
- package/security/hydrate-wallet-keys-from-platform-store.d.ts +13 -0
- package/security/hydrate-wallet-keys-from-platform-store.d.ts.map +1 -0
- package/security/hydrate-wallet-keys-from-platform-store.js +116 -0
- package/security/platform-secure-store-node.d.ts +13 -0
- package/security/platform-secure-store-node.d.ts.map +1 -0
- package/security/platform-secure-store-node.js +311 -0
- package/security/platform-secure-store.d.ts +47 -0
- package/security/platform-secure-store.d.ts.map +1 -0
- package/security/platform-secure-store.js +10 -0
- package/security/wallet-os-store-actions.d.ts +45 -0
- package/security/wallet-os-store-actions.d.ts.map +1 -0
- package/security/wallet-os-store-actions.js +125 -0
- package/services/account-pool.d.ts +134 -0
- package/services/account-pool.d.ts.map +1 -0
- package/services/account-pool.js +693 -0
- package/services/account-usage.d.ts +75 -0
- package/services/account-usage.d.ts.map +1 -0
- package/services/account-usage.js +179 -0
- package/services/auth-store.d.ts +179 -0
- package/services/auth-store.d.ts.map +1 -0
- package/services/auth-store.js +404 -0
- package/services/cloud-jwks-store.d.ts +62 -0
- package/services/cloud-jwks-store.d.ts.map +1 -0
- package/services/cloud-jwks-store.js +118 -0
- package/services/connector-target-catalog.d.ts +78 -0
- package/services/connector-target-catalog.d.ts.map +1 -0
- package/services/connector-target-catalog.js +64 -0
- package/services/discord-target-source.d.ts +53 -0
- package/services/discord-target-source.d.ts.map +1 -0
- package/services/discord-target-source.js +116 -0
- package/services/github-credentials.d.ts +95 -0
- package/services/github-credentials.d.ts.map +1 -0
- package/services/github-credentials.js +144 -0
- package/services/local-inference/__stress__/cache-stress-helpers.d.ts +76 -0
- package/services/local-inference/__stress__/cache-stress-helpers.d.ts.map +1 -0
- package/services/local-inference/__stress__/cache-stress-helpers.js +238 -0
- package/services/local-inference/active-model.d.ts +180 -0
- package/services/local-inference/active-model.d.ts.map +1 -0
- package/services/local-inference/active-model.js +362 -0
- package/services/local-inference/assignments.d.ts +58 -0
- package/services/local-inference/assignments.d.ts.map +1 -0
- package/services/local-inference/assignments.js +179 -0
- package/services/local-inference/backend.d.ts +200 -0
- package/services/local-inference/backend.d.ts.map +1 -0
- package/services/local-inference/backend.js +242 -0
- package/services/local-inference/bundled-models.d.ts +34 -0
- package/services/local-inference/bundled-models.d.ts.map +1 -0
- package/services/local-inference/bundled-models.js +104 -0
- package/services/local-inference/cache-bridge.d.ts +184 -0
- package/services/local-inference/cache-bridge.d.ts.map +1 -0
- package/services/local-inference/cache-bridge.js +333 -0
- package/services/local-inference/catalog.d.ts +57 -0
- package/services/local-inference/catalog.d.ts.map +1 -0
- package/services/local-inference/catalog.js +262 -0
- package/services/local-inference/conversation-registry.d.ts +122 -0
- package/services/local-inference/conversation-registry.d.ts.map +1 -0
- package/services/local-inference/conversation-registry.js +182 -0
- package/services/local-inference/device-bridge.d.ts +139 -0
- package/services/local-inference/device-bridge.d.ts.map +1 -0
- package/services/local-inference/device-bridge.js +774 -0
- package/services/local-inference/dflash-doctor.d.ts +27 -0
- package/services/local-inference/dflash-doctor.d.ts.map +1 -0
- package/services/local-inference/dflash-doctor.js +149 -0
- package/services/local-inference/dflash-server.d.ts +248 -0
- package/services/local-inference/dflash-server.d.ts.map +1 -0
- package/services/local-inference/dflash-server.js +1076 -0
- package/services/local-inference/downloader.d.ts +48 -0
- package/services/local-inference/downloader.d.ts.map +1 -0
- package/services/local-inference/downloader.js +688 -0
- package/services/local-inference/engine.d.ts +282 -0
- package/services/local-inference/engine.d.ts.map +1 -0
- package/services/local-inference/engine.js +743 -0
- package/services/local-inference/external-scanner.d.ts +17 -0
- package/services/local-inference/external-scanner.d.ts.map +1 -0
- package/services/local-inference/external-scanner.js +261 -0
- package/services/local-inference/handler-registry.d.ts +72 -0
- package/services/local-inference/handler-registry.d.ts.map +1 -0
- package/services/local-inference/handler-registry.js +159 -0
- package/services/local-inference/hardware.d.ts +26 -0
- package/services/local-inference/hardware.d.ts.map +1 -0
- package/services/local-inference/hardware.js +139 -0
- package/services/local-inference/hf-search.d.ts +19 -0
- package/services/local-inference/hf-search.d.ts.map +1 -0
- package/services/local-inference/hf-search.js +169 -0
- package/services/local-inference/index.d.ts +10 -0
- package/services/local-inference/index.d.ts.map +1 -0
- package/services/local-inference/index.js +7 -0
- package/services/local-inference/llama-server-metrics.d.ts +108 -0
- package/services/local-inference/llama-server-metrics.d.ts.map +1 -0
- package/services/local-inference/llama-server-metrics.js +175 -0
- package/services/local-inference/manifest/index.d.ts +4 -0
- package/services/local-inference/manifest/index.d.ts.map +1 -0
- package/services/local-inference/manifest/index.js +5 -0
- package/services/local-inference/manifest/schema.d.ts +419 -0
- package/services/local-inference/manifest/schema.d.ts.map +1 -0
- package/services/local-inference/manifest/schema.js +227 -0
- package/services/local-inference/manifest/types.d.ts +23 -0
- package/services/local-inference/manifest/types.d.ts.map +1 -0
- package/services/local-inference/manifest/types.js +5 -0
- package/services/local-inference/manifest/validator.d.ts +43 -0
- package/services/local-inference/manifest/validator.d.ts.map +1 -0
- package/services/local-inference/manifest/validator.js +180 -0
- package/services/local-inference/paths.d.ts +8 -0
- package/services/local-inference/paths.d.ts.map +1 -0
- package/services/local-inference/paths.js +7 -0
- package/services/local-inference/providers.d.ts +61 -0
- package/services/local-inference/providers.d.ts.map +1 -0
- package/services/local-inference/providers.js +334 -0
- package/services/local-inference/ram-budget.d.ts +57 -0
- package/services/local-inference/ram-budget.d.ts.map +1 -0
- package/services/local-inference/ram-budget.js +107 -0
- package/services/local-inference/readiness.d.ts +9 -0
- package/services/local-inference/readiness.d.ts.map +1 -0
- package/services/local-inference/readiness.js +153 -0
- package/services/local-inference/recommendation.d.ts +62 -0
- package/services/local-inference/recommendation.d.ts.map +1 -0
- package/services/local-inference/recommendation.js +309 -0
- package/services/local-inference/registry.d.ts +35 -0
- package/services/local-inference/registry.d.ts.map +1 -0
- package/services/local-inference/registry.js +117 -0
- package/services/local-inference/router-handler.d.ts +51 -0
- package/services/local-inference/router-handler.d.ts.map +1 -0
- package/services/local-inference/router-handler.js +165 -0
- package/services/local-inference/routing-policy.d.ts +55 -0
- package/services/local-inference/routing-policy.d.ts.map +1 -0
- package/services/local-inference/routing-policy.js +195 -0
- package/services/local-inference/routing-preferences.d.ts +8 -0
- package/services/local-inference/routing-preferences.d.ts.map +1 -0
- package/services/local-inference/routing-preferences.js +7 -0
- package/services/local-inference/service.d.ts +88 -0
- package/services/local-inference/service.d.ts.map +1 -0
- package/services/local-inference/service.js +210 -0
- package/services/local-inference/session-pool.d.ts +72 -0
- package/services/local-inference/session-pool.d.ts.map +1 -0
- package/services/local-inference/session-pool.js +125 -0
- package/services/local-inference/types.d.ts +309 -0
- package/services/local-inference/types.d.ts.map +1 -0
- package/services/local-inference/types.js +23 -0
- package/services/local-inference/verify.d.ts +8 -0
- package/services/local-inference/verify.d.ts.map +1 -0
- package/services/local-inference/verify.js +7 -0
- package/services/local-inference/voice/barge-in.d.ts +15 -0
- package/services/local-inference/voice/barge-in.d.ts.map +1 -0
- package/services/local-inference/voice/barge-in.js +20 -0
- package/services/local-inference/voice/engine-bridge.d.ts +256 -0
- package/services/local-inference/voice/engine-bridge.d.ts.map +1 -0
- package/services/local-inference/voice/engine-bridge.js +398 -0
- package/services/local-inference/voice/ffi-bindings.d.ts +114 -0
- package/services/local-inference/voice/ffi-bindings.d.ts.map +1 -0
- package/services/local-inference/voice/ffi-bindings.js +281 -0
- package/services/local-inference/voice/index.d.ts +51 -0
- package/services/local-inference/voice/index.d.ts.map +1 -0
- package/services/local-inference/voice/index.js +50 -0
- package/services/local-inference/voice/lifecycle.d.ts +135 -0
- package/services/local-inference/voice/lifecycle.d.ts.map +1 -0
- package/services/local-inference/voice/lifecycle.js +189 -0
- package/services/local-inference/voice/phoneme-tokenizer.d.ts +58 -0
- package/services/local-inference/voice/phoneme-tokenizer.d.ts.map +1 -0
- package/services/local-inference/voice/phoneme-tokenizer.js +53 -0
- package/services/local-inference/voice/phrase-cache.d.ts +24 -0
- package/services/local-inference/voice/phrase-cache.d.ts.map +1 -0
- package/services/local-inference/voice/phrase-cache.js +32 -0
- package/services/local-inference/voice/phrase-chunker.d.ts +20 -0
- package/services/local-inference/voice/phrase-chunker.d.ts.map +1 -0
- package/services/local-inference/voice/phrase-chunker.js +85 -0
- package/services/local-inference/voice/ring-buffer.d.ts +40 -0
- package/services/local-inference/voice/ring-buffer.d.ts.map +1 -0
- package/services/local-inference/voice/ring-buffer.js +85 -0
- package/services/local-inference/voice/rollback-queue.d.ts +24 -0
- package/services/local-inference/voice/rollback-queue.d.ts.map +1 -0
- package/services/local-inference/voice/rollback-queue.js +49 -0
- package/services/local-inference/voice/scheduler.d.ts +47 -0
- package/services/local-inference/voice/scheduler.d.ts.map +1 -0
- package/services/local-inference/voice/scheduler.js +123 -0
- package/services/local-inference/voice/shared-resources.d.ts +119 -0
- package/services/local-inference/voice/shared-resources.d.ts.map +1 -0
- package/services/local-inference/voice/shared-resources.js +83 -0
- package/services/local-inference/voice/speaker-preset-cache.d.ts +28 -0
- package/services/local-inference/voice/speaker-preset-cache.d.ts.map +1 -0
- package/services/local-inference/voice/speaker-preset-cache.js +44 -0
- package/services/local-inference/voice/types.d.ts +80 -0
- package/services/local-inference/voice/types.d.ts.map +1 -0
- package/services/local-inference/voice/voice-preset-format.d.ts +56 -0
- package/services/local-inference/voice/voice-preset-format.d.ts.map +1 -0
- package/services/local-inference/voice/voice-preset-format.js +184 -0
- package/services/persistence.d.ts +48 -0
- package/services/persistence.d.ts.map +1 -0
- package/services/persistence.js +128 -0
- package/services/plugin-installer.d.ts +22 -0
- package/services/plugin-installer.d.ts.map +1 -0
- package/services/plugin-installer.js +41 -0
- package/services/secrets-manager-installer.d.ts +140 -0
- package/services/secrets-manager-installer.d.ts.map +1 -0
- package/services/secrets-manager-installer.js +374 -0
- package/services/steward-credentials.d.ts +37 -0
- package/services/steward-credentials.d.ts.map +1 -0
- package/services/steward-credentials.js +93 -0
- package/services/steward-sidecar/health-check.d.ts +9 -0
- package/services/steward-sidecar/health-check.d.ts.map +1 -0
- package/services/steward-sidecar/health-check.js +34 -0
- package/services/steward-sidecar/helpers.d.ts +21 -0
- package/services/steward-sidecar/helpers.d.ts.map +1 -0
- package/services/steward-sidecar/helpers.js +71 -0
- package/services/steward-sidecar/process-management.d.ts +9 -0
- package/services/steward-sidecar/process-management.d.ts.map +1 -0
- package/services/steward-sidecar/process-management.js +53 -0
- package/services/steward-sidecar/types.d.ts +60 -0
- package/services/steward-sidecar/types.d.ts.map +1 -0
- package/services/steward-sidecar/types.js +17 -0
- package/services/steward-sidecar/wallet-setup.d.ts +9 -0
- package/services/steward-sidecar/wallet-setup.d.ts.map +1 -0
- package/services/steward-sidecar/wallet-setup.js +114 -0
- package/services/steward-sidecar.d.ts +70 -0
- package/services/steward-sidecar.d.ts.map +1 -0
- package/services/steward-sidecar.js +385 -0
- package/services/tool-call-cache/index.d.ts +13 -0
- package/services/tool-call-cache/index.d.ts.map +1 -0
- package/services/tool-call-cache/index.js +11 -0
- package/services/trigger-event-bridge.d.ts +52 -0
- package/services/trigger-event-bridge.d.ts.map +1 -0
- package/services/trigger-event-bridge.js +217 -0
- package/services/update-notifier.d.ts +6 -0
- package/services/update-notifier.d.ts.map +1 -0
- package/services/update-notifier.js +33 -0
- package/services/vault-bootstrap.d.ts +31 -0
- package/services/vault-bootstrap.d.ts.map +1 -0
- package/services/vault-bootstrap.js +209 -0
- package/services/vault-mirror.d.ts +44 -0
- package/services/vault-mirror.d.ts.map +1 -0
- package/services/vault-mirror.js +80 -0
- package/styles/electrobun-mac-window-drag.css +66 -0
- package/test/helpers/__tests__/live-agent-test.smoke.test.ts +105 -0
- package/test/helpers/action-assertions.ts +364 -0
- package/test/helpers/action-spy.ts +354 -0
- package/test/helpers/browser-launch.ts +103 -0
- package/test/helpers/browser-mocks.ts +275 -0
- package/test/helpers/conditional-tests.ts +42 -0
- package/test/helpers/conversation-harness.ts +334 -0
- package/test/helpers/http.ts +150 -0
- package/test/helpers/i18n.ts +5 -0
- package/test/helpers/isolated-config.ts +34 -0
- package/test/helpers/live-agent-test.ts +660 -0
- package/test/helpers/live-child-env.ts +72 -0
- package/test/helpers/live-provider.test.ts +124 -0
- package/test/helpers/live-provider.ts +362 -0
- package/test/helpers/live-runtime-server.ts +88 -0
- package/test/helpers/loopback.ts +33 -0
- package/test/helpers/pglite-runtime.ts +173 -0
- package/test/helpers/react-test.ts +40 -0
- package/test/helpers/real-connector.ts +250 -0
- package/test/helpers/real-runtime.ts +543 -0
- package/test/helpers/skip-without.ts +53 -0
- package/test/helpers/stochastic-test.ts +186 -0
- package/test/helpers/test-utils.ts +94 -0
- package/test/helpers/trajectory-assertions.ts +168 -0
- package/test/helpers/trajectory-harness.test.ts +101 -0
- package/test/helpers/trajectory-harness.ts +988 -0
- package/test/scripts/managed-test-command.mjs +632 -0
- package/test/scripts/task-agent-live-smoke.ts +1335 -0
- package/test/scripts/test-parallel.mjs +237 -0
- package/test/scripts/test-root-unit.mjs +169 -0
- package/test/scripts/test-runner.mjs +78 -0
- package/test/scripts/validate-all-features.sh +541 -0
- package/test-support/test-helpers.d.ts +111 -0
- package/test-support/test-helpers.d.ts.map +1 -0
- package/test-support/test-helpers.js +410 -0
- package/ui-compat.d.ts +3 -0
- package/ui-compat.d.ts.map +1 -0
- package/ui-compat.js +3 -0
- package/utils/eliza-root.d.ts +9 -0
- package/utils/eliza-root.d.ts.map +1 -0
- package/utils/eliza-root.js +101 -0
- package/utils/globals.d.ts +7 -0
- package/utils/globals.d.ts.map +1 -0
- package/utils/globals.js +47 -0
- package/App.d.ts +0 -5
- package/App.d.ts.map +0 -1
- package/App.js +0 -220
- package/LICENSE +0 -21
- package/actions/character.d.ts +0 -39
- package/actions/character.d.ts.map +0 -1
- package/actions/character.js +0 -247
- package/actions/chat-helpers.d.ts +0 -47
- package/actions/chat-helpers.d.ts.map +0 -1
- package/actions/chat-helpers.js +0 -79
- package/actions/cloud.d.ts +0 -17
- package/actions/cloud.d.ts.map +0 -1
- package/actions/cloud.js +0 -43
- package/actions/index.d.ts +0 -12
- package/actions/index.d.ts.map +0 -1
- package/actions/index.js +0 -11
- package/actions/lifecycle.d.ts +0 -43
- package/actions/lifecycle.d.ts.map +0 -1
- package/actions/lifecycle.js +0 -118
- package/actions/onboarding.d.ts +0 -13
- package/actions/onboarding.d.ts.map +0 -1
- package/actions/onboarding.js +0 -26
- package/actions/triggers.d.ts +0 -23
- package/actions/triggers.d.ts.map +0 -1
- package/actions/triggers.js +0 -148
- package/api/client.d.ts +0 -2742
- package/api/client.d.ts.map +0 -1
- package/api/client.js +0 -2520
- package/api/index.d.ts +0 -2
- package/api/index.d.ts.map +0 -1
- package/api/index.js +0 -1
- package/autonomy/index.d.ts +0 -48
- package/autonomy/index.d.ts.map +0 -1
- package/autonomy/index.js +0 -330
- package/bridge/capacitor-bridge.d.ts +0 -153
- package/bridge/capacitor-bridge.d.ts.map +0 -1
- package/bridge/capacitor-bridge.js +0 -193
- package/bridge/electrobun-rpc.d.ts +0 -28
- package/bridge/electrobun-rpc.d.ts.map +0 -1
- package/bridge/electrobun-rpc.js +0 -35
- package/bridge/electrobun-runtime.d.ts +0 -3
- package/bridge/electrobun-runtime.d.ts.map +0 -1
- package/bridge/electrobun-runtime.js +0 -17
- package/bridge/index.d.ts +0 -6
- package/bridge/index.d.ts.map +0 -1
- package/bridge/index.js +0 -5
- package/bridge/native-plugins.d.ts +0 -82
- package/bridge/native-plugins.d.ts.map +0 -1
- package/bridge/native-plugins.js +0 -39
- package/bridge/plugin-bridge.d.ts +0 -116
- package/bridge/plugin-bridge.d.ts.map +0 -1
- package/bridge/plugin-bridge.js +0 -203
- package/bridge/storage-bridge.d.ts +0 -39
- package/bridge/storage-bridge.d.ts.map +0 -1
- package/bridge/storage-bridge.js +0 -135
- package/chat/index.d.ts +0 -57
- package/chat/index.d.ts.map +0 -1
- package/chat/index.js +0 -160
- package/coding/index.d.ts +0 -25
- package/coding/index.d.ts.map +0 -1
- package/coding/index.js +0 -25
- package/components/AdvancedPageView.d.ts +0 -17
- package/components/AdvancedPageView.d.ts.map +0 -1
- package/components/AdvancedPageView.js +0 -146
- package/components/AgentActivityBox.d.ts +0 -7
- package/components/AgentActivityBox.d.ts.map +0 -1
- package/components/AgentActivityBox.js +0 -25
- package/components/ApiKeyConfig.d.ts +0 -26
- package/components/ApiKeyConfig.d.ts.map +0 -1
- package/components/ApiKeyConfig.js +0 -119
- package/components/AppsPageView.d.ts +0 -7
- package/components/AppsPageView.d.ts.map +0 -1
- package/components/AppsPageView.js +0 -31
- package/components/AppsView.d.ts +0 -8
- package/components/AppsView.d.ts.map +0 -1
- package/components/AppsView.js +0 -149
- package/components/AvatarLoader.d.ts +0 -13
- package/components/AvatarLoader.d.ts.map +0 -1
- package/components/AvatarLoader.js +0 -53
- package/components/AvatarSelector.d.ts +0 -23
- package/components/AvatarSelector.d.ts.map +0 -1
- package/components/AvatarSelector.js +0 -105
- package/components/BscTradePanel.d.ts +0 -22
- package/components/BscTradePanel.d.ts.map +0 -1
- package/components/BscTradePanel.js +0 -221
- package/components/BugReportModal.d.ts +0 -2
- package/components/BugReportModal.d.ts.map +0 -1
- package/components/BugReportModal.js +0 -219
- package/components/CharacterRoster.d.ts +0 -31
- package/components/CharacterRoster.d.ts.map +0 -1
- package/components/CharacterRoster.js +0 -41
- package/components/CharacterView.d.ts +0 -8
- package/components/CharacterView.d.ts.map +0 -1
- package/components/CharacterView.js +0 -685
- package/components/ChatAvatar.d.ts +0 -8
- package/components/ChatAvatar.d.ts.map +0 -1
- package/components/ChatAvatar.js +0 -89
- package/components/ChatComposer.d.ts +0 -37
- package/components/ChatComposer.d.ts.map +0 -1
- package/components/ChatComposer.js +0 -136
- package/components/ChatMessage.d.ts +0 -24
- package/components/ChatMessage.d.ts.map +0 -1
- package/components/ChatMessage.js +0 -187
- package/components/ChatModalView.d.ts +0 -10
- package/components/ChatModalView.d.ts.map +0 -1
- package/components/ChatModalView.js +0 -57
- package/components/ChatView.d.ts +0 -14
- package/components/ChatView.d.ts.map +0 -1
- package/components/ChatView.js +0 -526
- package/components/CloudOnboarding.d.ts +0 -7
- package/components/CloudOnboarding.d.ts.map +0 -1
- package/components/CloudOnboarding.js +0 -22
- package/components/CloudSourceControls.d.ts +0 -13
- package/components/CloudSourceControls.d.ts.map +0 -1
- package/components/CloudSourceControls.js +0 -16
- package/components/CodingAgentSettingsSection.d.ts +0 -8
- package/components/CodingAgentSettingsSection.d.ts.map +0 -1
- package/components/CodingAgentSettingsSection.js +0 -292
- package/components/CommandPalette.d.ts +0 -2
- package/components/CommandPalette.d.ts.map +0 -1
- package/components/CommandPalette.js +0 -181
- package/components/CompanionSceneHost.d.ts +0 -14
- package/components/CompanionSceneHost.d.ts.map +0 -1
- package/components/CompanionSceneHost.js +0 -362
- package/components/CompanionShell.d.ts +0 -17
- package/components/CompanionShell.d.ts.map +0 -1
- package/components/CompanionShell.js +0 -15
- package/components/CompanionView.d.ts +0 -2
- package/components/CompanionView.d.ts.map +0 -1
- package/components/CompanionView.js +0 -22
- package/components/ConfigPageView.d.ts +0 -11
- package/components/ConfigPageView.d.ts.map +0 -1
- package/components/ConfigPageView.js +0 -311
- package/components/ConfigSaveFooter.d.ts +0 -8
- package/components/ConfigSaveFooter.d.ts.map +0 -1
- package/components/ConfigSaveFooter.js +0 -10
- package/components/ConfirmModal.d.ts +0 -61
- package/components/ConfirmModal.d.ts.map +0 -1
- package/components/ConfirmModal.js +0 -164
- package/components/ConnectionFailedBanner.d.ts +0 -6
- package/components/ConnectionFailedBanner.d.ts.map +0 -1
- package/components/ConnectionFailedBanner.js +0 -22
- package/components/ConnectorsPageView.d.ts +0 -7
- package/components/ConnectorsPageView.d.ts.map +0 -1
- package/components/ConnectorsPageView.js +0 -8
- package/components/ConversationsSidebar.d.ts +0 -9
- package/components/ConversationsSidebar.d.ts.map +0 -1
- package/components/ConversationsSidebar.js +0 -116
- package/components/CustomActionEditor.d.ts +0 -10
- package/components/CustomActionEditor.d.ts.map +0 -1
- package/components/CustomActionEditor.js +0 -596
- package/components/CustomActionsPanel.d.ts +0 -9
- package/components/CustomActionsPanel.d.ts.map +0 -1
- package/components/CustomActionsPanel.js +0 -107
- package/components/CustomActionsView.d.ts +0 -2
- package/components/CustomActionsView.d.ts.map +0 -1
- package/components/CustomActionsView.js +0 -134
- package/components/DatabasePageView.d.ts +0 -5
- package/components/DatabasePageView.d.ts.map +0 -1
- package/components/DatabasePageView.js +0 -28
- package/components/DatabaseView.d.ts +0 -9
- package/components/DatabaseView.d.ts.map +0 -1
- package/components/DatabaseView.js +0 -311
- package/components/ElizaCloudDashboard.d.ts +0 -2
- package/components/ElizaCloudDashboard.d.ts.map +0 -1
- package/components/ElizaCloudDashboard.js +0 -657
- package/components/EmotePicker.d.ts +0 -2
- package/components/EmotePicker.d.ts.map +0 -1
- package/components/EmotePicker.js +0 -343
- package/components/ErrorBoundary.d.ts +0 -22
- package/components/ErrorBoundary.d.ts.map +0 -1
- package/components/ErrorBoundary.js +0 -31
- package/components/FineTuningView.d.ts +0 -2
- package/components/FineTuningView.d.ts.map +0 -1
- package/components/FineTuningView.js +0 -433
- package/components/FlaminaGuide.d.ts +0 -10
- package/components/FlaminaGuide.d.ts.map +0 -1
- package/components/FlaminaGuide.js +0 -64
- package/components/GameView.d.ts +0 -11
- package/components/GameView.d.ts.map +0 -1
- package/components/GameView.js +0 -294
- package/components/GameViewOverlay.d.ts +0 -8
- package/components/GameViewOverlay.d.ts.map +0 -1
- package/components/GameViewOverlay.js +0 -70
- package/components/GlobalEmoteOverlay.d.ts +0 -2
- package/components/GlobalEmoteOverlay.d.ts.map +0 -1
- package/components/GlobalEmoteOverlay.js +0 -112
- package/components/Header.d.ts +0 -9
- package/components/Header.d.ts.map +0 -1
- package/components/Header.js +0 -123
- package/components/HeartbeatsView.d.ts +0 -2
- package/components/HeartbeatsView.d.ts.map +0 -1
- package/components/HeartbeatsView.js +0 -378
- package/components/InventoryView.d.ts +0 -10
- package/components/InventoryView.d.ts.map +0 -1
- package/components/InventoryView.js +0 -176
- package/components/KnowledgeView.d.ts +0 -20
- package/components/KnowledgeView.d.ts.map +0 -1
- package/components/KnowledgeView.js +0 -483
- package/components/LanguageDropdown.d.ts +0 -30
- package/components/LanguageDropdown.d.ts.map +0 -1
- package/components/LanguageDropdown.js +0 -99
- package/components/LifoMonitorPanel.d.ts +0 -21
- package/components/LifoMonitorPanel.d.ts.map +0 -1
- package/components/LifoMonitorPanel.js +0 -24
- package/components/LifoSandboxView.d.ts +0 -5
- package/components/LifoSandboxView.d.ts.map +0 -1
- package/components/LifoSandboxView.js +0 -333
- package/components/LoadingScreen.d.ts +0 -13
- package/components/LoadingScreen.d.ts.map +0 -1
- package/components/LoadingScreen.js +0 -70
- package/components/LogsPageView.d.ts +0 -2
- package/components/LogsPageView.d.ts.map +0 -1
- package/components/LogsPageView.js +0 -7
- package/components/LogsView.d.ts +0 -5
- package/components/LogsView.d.ts.map +0 -1
- package/components/LogsView.js +0 -71
- package/components/MediaGalleryView.d.ts +0 -9
- package/components/MediaGalleryView.d.ts.map +0 -1
- package/components/MediaGalleryView.js +0 -236
- package/components/MediaSettingsSection.d.ts +0 -11
- package/components/MediaSettingsSection.d.ts.map +0 -1
- package/components/MediaSettingsSection.js +0 -329
- package/components/MessageContent.d.ts +0 -51
- package/components/MessageContent.d.ts.map +0 -1
- package/components/MessageContent.js +0 -553
- package/components/OnboardingWizard.d.ts +0 -2
- package/components/OnboardingWizard.d.ts.map +0 -1
- package/components/OnboardingWizard.js +0 -86
- package/components/PairingView.d.ts +0 -5
- package/components/PairingView.d.ts.map +0 -1
- package/components/PairingView.js +0 -29
- package/components/PermissionsSection.d.ts +0 -20
- package/components/PermissionsSection.d.ts.map +0 -1
- package/components/PermissionsSection.js +0 -573
- package/components/PluginsPageView.d.ts +0 -5
- package/components/PluginsPageView.d.ts.map +0 -1
- package/components/PluginsPageView.js +0 -8
- package/components/PluginsView.d.ts +0 -21
- package/components/PluginsView.d.ts.map +0 -1
- package/components/PluginsView.js +0 -1534
- package/components/ProviderSwitcher.d.ts +0 -42
- package/components/ProviderSwitcher.d.ts.map +0 -1
- package/components/ProviderSwitcher.js +0 -493
- package/components/RestartBanner.d.ts +0 -2
- package/components/RestartBanner.d.ts.map +0 -1
- package/components/RestartBanner.js +0 -36
- package/components/RuntimeView.d.ts +0 -10
- package/components/RuntimeView.d.ts.map +0 -1
- package/components/RuntimeView.js +0 -165
- package/components/SaveCommandModal.d.ts +0 -12
- package/components/SaveCommandModal.d.ts.map +0 -1
- package/components/SaveCommandModal.js +0 -84
- package/components/SecretsView.d.ts +0 -9
- package/components/SecretsView.d.ts.map +0 -1
- package/components/SecretsView.js +0 -249
- package/components/SettingsView.d.ts +0 -9
- package/components/SettingsView.d.ts.map +0 -1
- package/components/SettingsView.js +0 -230
- package/components/ShellOverlays.d.ts +0 -8
- package/components/ShellOverlays.d.ts.map +0 -1
- package/components/ShellOverlays.js +0 -10
- package/components/ShortcutsOverlay.d.ts +0 -2
- package/components/ShortcutsOverlay.d.ts.map +0 -1
- package/components/ShortcutsOverlay.js +0 -79
- package/components/SkillsView.d.ts +0 -11
- package/components/SkillsView.d.ts.map +0 -1
- package/components/SkillsView.js +0 -358
- package/components/StartupFailureView.d.ts +0 -8
- package/components/StartupFailureView.d.ts.map +0 -1
- package/components/StartupFailureView.js +0 -16
- package/components/StreamView.d.ts +0 -16
- package/components/StreamView.d.ts.map +0 -1
- package/components/StreamView.js +0 -300
- package/components/StripeEmbeddedCheckout.d.ts +0 -24
- package/components/StripeEmbeddedCheckout.d.ts.map +0 -1
- package/components/StripeEmbeddedCheckout.js +0 -101
- package/components/SubscriptionStatus.d.ts +0 -23
- package/components/SubscriptionStatus.d.ts.map +0 -1
- package/components/SubscriptionStatus.js +0 -301
- package/components/SystemWarningBanner.d.ts +0 -6
- package/components/SystemWarningBanner.d.ts.map +0 -1
- package/components/SystemWarningBanner.js +0 -46
- package/components/ThemeToggle.d.ts +0 -21
- package/components/ThemeToggle.d.ts.map +0 -1
- package/components/ThemeToggle.js +0 -24
- package/components/TrajectoriesView.d.ts +0 -12
- package/components/TrajectoriesView.d.ts.map +0 -1
- package/components/TrajectoriesView.js +0 -183
- package/components/TrajectoryDetailView.d.ts +0 -13
- package/components/TrajectoryDetailView.d.ts.map +0 -1
- package/components/TrajectoryDetailView.js +0 -112
- package/components/TriggersView.d.ts +0 -2
- package/components/TriggersView.d.ts.map +0 -1
- package/components/TriggersView.js +0 -1
- package/components/VectorBrowserView.d.ts +0 -10
- package/components/VectorBrowserView.d.ts.map +0 -1
- package/components/VectorBrowserView.js +0 -1000
- package/components/VoiceConfigView.d.ts +0 -11
- package/components/VoiceConfigView.d.ts.map +0 -1
- package/components/VoiceConfigView.js +0 -331
- package/components/VrmStage.d.ts +0 -28
- package/components/VrmStage.d.ts.map +0 -1
- package/components/VrmStage.js +0 -178
- package/components/WhatsAppQrOverlay.d.ts +0 -8
- package/components/WhatsAppQrOverlay.d.ts.map +0 -1
- package/components/WhatsAppQrOverlay.js +0 -63
- package/components/apps/AppDetailPane.d.ts +0 -15
- package/components/apps/AppDetailPane.d.ts.map +0 -1
- package/components/apps/AppDetailPane.js +0 -13
- package/components/apps/AppsCatalogGrid.d.ts +0 -20
- package/components/apps/AppsCatalogGrid.d.ts.map +0 -1
- package/components/apps/AppsCatalogGrid.js +0 -18
- package/components/apps/extensions/registry.d.ts +0 -4
- package/components/apps/extensions/registry.d.ts.map +0 -1
- package/components/apps/extensions/registry.js +0 -7
- package/components/apps/extensions/types.d.ts +0 -7
- package/components/apps/extensions/types.d.ts.map +0 -1
- package/components/apps/helpers.d.ts +0 -7
- package/components/apps/helpers.d.ts.map +0 -1
- package/components/apps/helpers.js +0 -44
- package/components/avatar/VrmAnimationLoader.d.ts +0 -30
- package/components/avatar/VrmAnimationLoader.d.ts.map +0 -1
- package/components/avatar/VrmAnimationLoader.js +0 -99
- package/components/avatar/VrmBlinkController.d.ts +0 -37
- package/components/avatar/VrmBlinkController.d.ts.map +0 -1
- package/components/avatar/VrmBlinkController.js +0 -98
- package/components/avatar/VrmCameraManager.d.ts +0 -57
- package/components/avatar/VrmCameraManager.d.ts.map +0 -1
- package/components/avatar/VrmCameraManager.js +0 -277
- package/components/avatar/VrmEngine.d.ts +0 -246
- package/components/avatar/VrmEngine.d.ts.map +0 -1
- package/components/avatar/VrmEngine.js +0 -2087
- package/components/avatar/VrmFootShadow.d.ts +0 -18
- package/components/avatar/VrmFootShadow.d.ts.map +0 -1
- package/components/avatar/VrmFootShadow.js +0 -83
- package/components/avatar/VrmViewer.d.ts +0 -60
- package/components/avatar/VrmViewer.d.ts.map +0 -1
- package/components/avatar/VrmViewer.js +0 -396
- package/components/avatar/mixamoVRMRigMap.d.ts +0 -3
- package/components/avatar/mixamoVRMRigMap.d.ts.map +0 -1
- package/components/avatar/mixamoVRMRigMap.js +0 -56
- package/components/avatar/retargetMixamoFbxToVrm.d.ts +0 -9
- package/components/avatar/retargetMixamoFbxToVrm.d.ts.map +0 -1
- package/components/avatar/retargetMixamoFbxToVrm.js +0 -88
- package/components/avatar/retargetMixamoGltfToVrm.d.ts +0 -11
- package/components/avatar/retargetMixamoGltfToVrm.d.ts.map +0 -1
- package/components/avatar/retargetMixamoGltfToVrm.js +0 -80
- package/components/chainConfig.d.ts +0 -89
- package/components/chainConfig.d.ts.map +0 -1
- package/components/chainConfig.js +0 -287
- package/components/companion/CompanionHeader.d.ts +0 -15
- package/components/companion/CompanionHeader.d.ts.map +0 -1
- package/components/companion/CompanionHeader.js +0 -7
- package/components/companion/CompanionSceneHost.d.ts +0 -2
- package/components/companion/CompanionSceneHost.d.ts.map +0 -1
- package/components/companion/CompanionSceneHost.js +0 -1
- package/components/companion/VrmStage.d.ts +0 -3
- package/components/companion/VrmStage.d.ts.map +0 -1
- package/components/companion/VrmStage.js +0 -1
- package/components/companion/index.d.ts +0 -18
- package/components/companion/index.d.ts.map +0 -1
- package/components/companion/index.js +0 -17
- package/components/companion/walletUtils.d.ts +0 -95
- package/components/companion/walletUtils.d.ts.map +0 -1
- package/components/companion/walletUtils.js +0 -167
- package/components/companion-shell-styles.d.ts +0 -38
- package/components/companion-shell-styles.d.ts.map +0 -1
- package/components/companion-shell-styles.js +0 -248
- package/components/confirm-delete-control.d.ts +0 -16
- package/components/confirm-delete-control.d.ts.map +0 -1
- package/components/confirm-delete-control.js +0 -12
- package/components/conversations/ConversationListItem.d.ts +0 -31
- package/components/conversations/ConversationListItem.d.ts.map +0 -1
- package/components/conversations/ConversationListItem.js +0 -52
- package/components/conversations/conversation-utils.d.ts +0 -9
- package/components/conversations/conversation-utils.d.ts.map +0 -1
- package/components/conversations/conversation-utils.js +0 -138
- package/components/format.d.ts +0 -54
- package/components/format.d.ts.map +0 -1
- package/components/format.js +0 -82
- package/components/index.d.ts +0 -96
- package/components/index.d.ts.map +0 -1
- package/components/index.js +0 -95
- package/components/inventory/CopyableAddress.d.ts +0 -8
- package/components/inventory/CopyableAddress.d.ts.map +0 -1
- package/components/inventory/CopyableAddress.js +0 -18
- package/components/inventory/InventoryToolbar.d.ts +0 -25
- package/components/inventory/InventoryToolbar.d.ts.map +0 -1
- package/components/inventory/InventoryToolbar.js +0 -28
- package/components/inventory/NftGrid.d.ts +0 -13
- package/components/inventory/NftGrid.d.ts.map +0 -1
- package/components/inventory/NftGrid.js +0 -29
- package/components/inventory/TokenLogo.d.ts +0 -12
- package/components/inventory/TokenLogo.d.ts.map +0 -1
- package/components/inventory/TokenLogo.js +0 -33
- package/components/inventory/TokensTable.d.ts +0 -24
- package/components/inventory/TokensTable.d.ts.map +0 -1
- package/components/inventory/TokensTable.js +0 -26
- package/components/inventory/constants.d.ts +0 -52
- package/components/inventory/constants.d.ts.map +0 -1
- package/components/inventory/constants.js +0 -121
- package/components/inventory/index.d.ts +0 -9
- package/components/inventory/index.d.ts.map +0 -1
- package/components/inventory/index.js +0 -8
- package/components/inventory/media-url.d.ts +0 -6
- package/components/inventory/media-url.d.ts.map +0 -1
- package/components/inventory/media-url.js +0 -28
- package/components/inventory/useInventoryData.d.ts +0 -53
- package/components/inventory/useInventoryData.d.ts.map +0 -1
- package/components/inventory/useInventoryData.js +0 -332
- package/components/knowledge-upload-image.d.ts +0 -27
- package/components/knowledge-upload-image.d.ts.map +0 -1
- package/components/knowledge-upload-image.js +0 -146
- package/components/labels.d.ts +0 -6
- package/components/labels.d.ts.map +0 -1
- package/components/labels.js +0 -40
- package/components/onboarding/ActivateStep.d.ts +0 -2
- package/components/onboarding/ActivateStep.d.ts.map +0 -1
- package/components/onboarding/ActivateStep.js +0 -10
- package/components/onboarding/CloudLoginStep.d.ts +0 -2
- package/components/onboarding/CloudLoginStep.d.ts.map +0 -1
- package/components/onboarding/CloudLoginStep.js +0 -20
- package/components/onboarding/ConnectionStep.d.ts +0 -2
- package/components/onboarding/ConnectionStep.d.ts.map +0 -1
- package/components/onboarding/ConnectionStep.js +0 -609
- package/components/onboarding/IdentityStep.d.ts +0 -2
- package/components/onboarding/IdentityStep.d.ts.map +0 -1
- package/components/onboarding/IdentityStep.js +0 -102
- package/components/onboarding/OnboardingPanel.d.ts +0 -9
- package/components/onboarding/OnboardingPanel.d.ts.map +0 -1
- package/components/onboarding/OnboardingPanel.js +0 -24
- package/components/onboarding/OnboardingStepNav.d.ts +0 -2
- package/components/onboarding/OnboardingStepNav.d.ts.map +0 -1
- package/components/onboarding/OnboardingStepNav.js +0 -24
- package/components/onboarding/PermissionsStep.d.ts +0 -2
- package/components/onboarding/PermissionsStep.d.ts.map +0 -1
- package/components/onboarding/PermissionsStep.js +0 -7
- package/components/onboarding/RpcStep.d.ts +0 -2
- package/components/onboarding/RpcStep.d.ts.map +0 -1
- package/components/onboarding/RpcStep.js +0 -125
- package/components/onboarding/SaveKeysStep.d.ts +0 -2
- package/components/onboarding/SaveKeysStep.d.ts.map +0 -1
- package/components/onboarding/SaveKeysStep.js +0 -44
- package/components/onboarding/WelcomeStep.d.ts +0 -2
- package/components/onboarding/WelcomeStep.d.ts.map +0 -1
- package/components/onboarding/WelcomeStep.js +0 -30
- package/components/permissions/PermissionIcon.d.ts +0 -4
- package/components/permissions/PermissionIcon.d.ts.map +0 -1
- package/components/permissions/PermissionIcon.js +0 -12
- package/components/permissions/StreamingPermissions.d.ts +0 -20
- package/components/permissions/StreamingPermissions.d.ts.map +0 -1
- package/components/permissions/StreamingPermissions.js +0 -178
- package/components/plugins/showcase-data.d.ts +0 -7
- package/components/plugins/showcase-data.d.ts.map +0 -1
- package/components/plugins/showcase-data.js +0 -464
- package/components/shared/ShellHeaderControls.d.ts +0 -27
- package/components/shared/ShellHeaderControls.d.ts.map +0 -1
- package/components/shared/ShellHeaderControls.js +0 -55
- package/components/shared-companion-scene-context.d.ts +0 -3
- package/components/shared-companion-scene-context.d.ts.map +0 -1
- package/components/shared-companion-scene-context.js +0 -13
- package/components/skeletons.d.ts +0 -17
- package/components/skeletons.d.ts.map +0 -1
- package/components/skeletons.js +0 -22
- package/components/stream/ActivityFeed.d.ts +0 -5
- package/components/stream/ActivityFeed.d.ts.map +0 -1
- package/components/stream/ActivityFeed.js +0 -57
- package/components/stream/AvatarPip.d.ts +0 -5
- package/components/stream/AvatarPip.d.ts.map +0 -1
- package/components/stream/AvatarPip.js +0 -6
- package/components/stream/ChatContent.d.ts +0 -6
- package/components/stream/ChatContent.d.ts.map +0 -1
- package/components/stream/ChatContent.js +0 -69
- package/components/stream/ChatTicker.d.ts +0 -5
- package/components/stream/ChatTicker.d.ts.map +0 -1
- package/components/stream/ChatTicker.js +0 -34
- package/components/stream/IdleContent.d.ts +0 -5
- package/components/stream/IdleContent.d.ts.map +0 -1
- package/components/stream/IdleContent.js +0 -17
- package/components/stream/StatusBar.d.ts +0 -36
- package/components/stream/StatusBar.d.ts.map +0 -1
- package/components/stream/StatusBar.js +0 -140
- package/components/stream/StreamSettings.d.ts +0 -33
- package/components/stream/StreamSettings.d.ts.map +0 -1
- package/components/stream/StreamSettings.js +0 -99
- package/components/stream/StreamTerminal.d.ts +0 -2
- package/components/stream/StreamTerminal.d.ts.map +0 -1
- package/components/stream/StreamTerminal.js +0 -52
- package/components/stream/StreamVoiceConfig.d.ts +0 -10
- package/components/stream/StreamVoiceConfig.d.ts.map +0 -1
- package/components/stream/StreamVoiceConfig.js +0 -88
- package/components/stream/helpers.d.ts +0 -32
- package/components/stream/helpers.d.ts.map +0 -1
- package/components/stream/helpers.js +0 -110
- package/components/stream/overlays/OverlayLayer.d.ts +0 -20
- package/components/stream/overlays/OverlayLayer.d.ts.map +0 -1
- package/components/stream/overlays/OverlayLayer.js +0 -24
- package/components/stream/overlays/built-in/ActionTickerWidget.d.ts +0 -8
- package/components/stream/overlays/built-in/ActionTickerWidget.d.ts.map +0 -1
- package/components/stream/overlays/built-in/ActionTickerWidget.js +0 -44
- package/components/stream/overlays/built-in/AlertPopupWidget.d.ts +0 -7
- package/components/stream/overlays/built-in/AlertPopupWidget.d.ts.map +0 -1
- package/components/stream/overlays/built-in/AlertPopupWidget.js +0 -62
- package/components/stream/overlays/built-in/BrandingWidget.d.ts +0 -7
- package/components/stream/overlays/built-in/BrandingWidget.d.ts.map +0 -1
- package/components/stream/overlays/built-in/BrandingWidget.js +0 -36
- package/components/stream/overlays/built-in/CustomHtmlWidget.d.ts +0 -26
- package/components/stream/overlays/built-in/CustomHtmlWidget.d.ts.map +0 -1
- package/components/stream/overlays/built-in/CustomHtmlWidget.js +0 -78
- package/components/stream/overlays/built-in/PeonGlassWidget.d.ts +0 -11
- package/components/stream/overlays/built-in/PeonGlassWidget.d.ts.map +0 -1
- package/components/stream/overlays/built-in/PeonGlassWidget.js +0 -188
- package/components/stream/overlays/built-in/PeonHudWidget.d.ts +0 -10
- package/components/stream/overlays/built-in/PeonHudWidget.d.ts.map +0 -1
- package/components/stream/overlays/built-in/PeonHudWidget.js +0 -168
- package/components/stream/overlays/built-in/PeonSakuraWidget.d.ts +0 -11
- package/components/stream/overlays/built-in/PeonSakuraWidget.d.ts.map +0 -1
- package/components/stream/overlays/built-in/PeonSakuraWidget.js +0 -213
- package/components/stream/overlays/built-in/ThoughtBubbleWidget.d.ts +0 -8
- package/components/stream/overlays/built-in/ThoughtBubbleWidget.d.ts.map +0 -1
- package/components/stream/overlays/built-in/ThoughtBubbleWidget.js +0 -59
- package/components/stream/overlays/built-in/ViewerCountWidget.d.ts +0 -7
- package/components/stream/overlays/built-in/ViewerCountWidget.d.ts.map +0 -1
- package/components/stream/overlays/built-in/ViewerCountWidget.js +0 -34
- package/components/stream/overlays/built-in/index.d.ts +0 -13
- package/components/stream/overlays/built-in/index.d.ts.map +0 -1
- package/components/stream/overlays/built-in/index.js +0 -12
- package/components/stream/overlays/registry.d.ts +0 -11
- package/components/stream/overlays/registry.d.ts.map +0 -1
- package/components/stream/overlays/registry.js +0 -16
- package/components/stream/overlays/types.d.ts +0 -67
- package/components/stream/overlays/types.d.ts.map +0 -1
- package/components/stream/overlays/types.js +0 -7
- package/components/stream/overlays/useOverlayLayout.d.ts +0 -27
- package/components/stream/overlays/useOverlayLayout.d.ts.map +0 -1
- package/components/stream/overlays/useOverlayLayout.js +0 -162
- package/components/trajectory-format.d.ts +0 -6
- package/components/trajectory-format.d.ts.map +0 -1
- package/components/trajectory-format.js +0 -43
- package/components/ui-badges.d.ts +0 -23
- package/components/ui-badges.d.ts.map +0 -1
- package/components/ui-badges.js +0 -38
- package/components/ui-switch.d.ts +0 -14
- package/components/ui-switch.d.ts.map +0 -1
- package/components/ui-switch.js +0 -15
- package/components/vector-browser-three.d.ts +0 -4
- package/components/vector-browser-three.d.ts.map +0 -1
- package/components/vector-browser-three.js +0 -21
- package/config/branding.d.ts +0 -49
- package/config/branding.d.ts.map +0 -1
- package/config/branding.js +0 -16
- package/config/config-catalog.d.ts +0 -376
- package/config/config-catalog.d.ts.map +0 -1
- package/config/config-catalog.js +0 -724
- package/config/config-field.d.ts +0 -68
- package/config/config-field.d.ts.map +0 -1
- package/config/config-field.js +0 -840
- package/config/config-renderer.d.ts +0 -176
- package/config/config-renderer.d.ts.map +0 -1
- package/config/config-renderer.js +0 -405
- package/config/index.d.ts +0 -6
- package/config/index.d.ts.map +0 -1
- package/config/index.js +0 -5
- package/config/ui-renderer.d.ts +0 -26
- package/config/ui-renderer.d.ts.map +0 -1
- package/config/ui-renderer.js +0 -815
- package/config/ui-spec.d.ts +0 -164
- package/config/ui-spec.d.ts.map +0 -1
- package/config/ui-spec.js +0 -13
- package/events/index.d.ts +0 -48
- package/events/index.d.ts.map +0 -1
- package/events/index.js +0 -45
- package/hooks/index.d.ts +0 -15
- package/hooks/index.d.ts.map +0 -1
- package/hooks/index.js +0 -14
- package/hooks/useBugReport.d.ts +0 -14
- package/hooks/useBugReport.d.ts.map +0 -1
- package/hooks/useBugReport.js +0 -18
- package/hooks/useCanvasWindow.d.ts +0 -38
- package/hooks/useCanvasWindow.d.ts.map +0 -1
- package/hooks/useCanvasWindow.js +0 -273
- package/hooks/useChatAvatarVoice.d.ts +0 -10
- package/hooks/useChatAvatarVoice.d.ts.map +0 -1
- package/hooks/useChatAvatarVoice.js +0 -71
- package/hooks/useClickOutside.d.ts +0 -6
- package/hooks/useClickOutside.d.ts.map +0 -1
- package/hooks/useClickOutside.js +0 -25
- package/hooks/useContextMenu.d.ts +0 -17
- package/hooks/useContextMenu.d.ts.map +0 -1
- package/hooks/useContextMenu.js +0 -100
- package/hooks/useKeyboardShortcuts.d.ts +0 -17
- package/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/hooks/useKeyboardShortcuts.js +0 -67
- package/hooks/useLifoSync.d.ts +0 -18
- package/hooks/useLifoSync.d.ts.map +0 -1
- package/hooks/useLifoSync.js +0 -113
- package/hooks/useMemoryMonitor.d.ts +0 -87
- package/hooks/useMemoryMonitor.d.ts.map +0 -1
- package/hooks/useMemoryMonitor.js +0 -209
- package/hooks/useRenderGuard.d.ts +0 -17
- package/hooks/useRenderGuard.d.ts.map +0 -1
- package/hooks/useRenderGuard.js +0 -36
- package/hooks/useRetakeCapture.d.ts +0 -12
- package/hooks/useRetakeCapture.d.ts.map +0 -1
- package/hooks/useRetakeCapture.js +0 -60
- package/hooks/useStreamPopoutNavigation.d.ts +0 -3
- package/hooks/useStreamPopoutNavigation.d.ts.map +0 -1
- package/hooks/useStreamPopoutNavigation.js +0 -17
- package/hooks/useTimeout.d.ts +0 -11
- package/hooks/useTimeout.d.ts.map +0 -1
- package/hooks/useTimeout.js +0 -32
- package/hooks/useVoiceChat.d.ts +0 -94
- package/hooks/useVoiceChat.d.ts.map +0 -1
- package/hooks/useVoiceChat.js +0 -1077
- package/hooks/useWhatsAppPairing.d.ts +0 -11
- package/hooks/useWhatsAppPairing.d.ts.map +0 -1
- package/hooks/useWhatsAppPairing.js +0 -95
- package/i18n/index.d.ts +0 -7
- package/i18n/index.d.ts.map +0 -1
- package/i18n/index.js +0 -53
- package/i18n/locales/en.json +0 -1268
- package/i18n/locales/es.json +0 -1236
- package/i18n/locales/ko.json +0 -1236
- package/i18n/locales/pt.json +0 -1236
- package/i18n/locales/zh-CN.json +0 -1236
- package/i18n/messages.d.ts +0 -6
- package/i18n/messages.d.ts.map +0 -1
- package/i18n/messages.js +0 -14
- package/navigation/index.d.ts +0 -27
- package/navigation/index.d.ts.map +0 -1
- package/navigation/index.js +0 -232
- package/onboarding-config.d.ts +0 -25
- package/onboarding-config.d.ts.map +0 -1
- package/onboarding-config.js +0 -76
- package/platform/browser-launch.d.ts +0 -2
- package/platform/browser-launch.d.ts.map +0 -1
- package/platform/browser-launch.js +0 -109
- package/platform/index.d.ts +0 -14
- package/platform/index.d.ts.map +0 -1
- package/platform/index.js +0 -24
- package/platform/init.d.ts +0 -40
- package/platform/init.d.ts.map +0 -1
- package/platform/init.js +0 -160
- package/platform/lifo.d.ts +0 -51
- package/platform/lifo.d.ts.map +0 -1
- package/platform/lifo.js +0 -138
- package/providers/index.d.ts +0 -19
- package/providers/index.d.ts.map +0 -1
- package/providers/index.js +0 -80
- package/shell-params.d.ts +0 -12
- package/shell-params.d.ts.map +0 -1
- package/shell-params.js +0 -19
- package/state/AppContext.d.ts +0 -12
- package/state/AppContext.d.ts.map +0 -1
- package/state/AppContext.js +0 -5102
- package/state/index.d.ts +0 -7
- package/state/index.d.ts.map +0 -1
- package/state/index.js +0 -6
- package/state/internal.d.ts +0 -7
- package/state/internal.d.ts.map +0 -1
- package/state/internal.js +0 -6
- package/state/onboarding-resume.d.ts +0 -11
- package/state/onboarding-resume.d.ts.map +0 -1
- package/state/onboarding-resume.js +0 -187
- package/state/parsers.d.ts +0 -26
- package/state/parsers.d.ts.map +0 -1
- package/state/parsers.js +0 -255
- package/state/persistence.d.ts +0 -59
- package/state/persistence.d.ts.map +0 -1
- package/state/persistence.js +0 -328
- package/state/shell-routing.d.ts +0 -12
- package/state/shell-routing.d.ts.map +0 -1
- package/state/shell-routing.js +0 -26
- package/state/types.d.ts +0 -426
- package/state/types.d.ts.map +0 -1
- package/state/types.js +0 -89
- package/state/ui-preferences.d.ts +0 -3
- package/state/ui-preferences.d.ts.map +0 -1
- package/state/ui-preferences.js +0 -1
- package/state/useApp.d.ts +0 -4
- package/state/useApp.d.ts.map +0 -1
- package/state/useApp.js +0 -22
- package/state/vrm.d.ts +0 -30
- package/state/vrm.d.ts.map +0 -1
- package/state/vrm.js +0 -82
- package/styles/anime.css +0 -6364
- package/styles/base.css +0 -255
- package/styles/onboarding-game.css +0 -1095
- package/styles/styles.css +0 -2087
- package/styles/xterm.css +0 -241
- package/types/index.d.ts +0 -657
- package/types/index.d.ts.map +0 -1
- package/types/index.js +0 -1
- package/utils/asset-url.d.ts +0 -26
- package/utils/asset-url.d.ts.map +0 -1
- package/utils/asset-url.js +0 -99
- package/utils/assistant-text.d.ts +0 -2
- package/utils/assistant-text.d.ts.map +0 -1
- package/utils/assistant-text.js +0 -161
- package/utils/clipboard.d.ts +0 -2
- package/utils/clipboard.d.ts.map +0 -1
- package/utils/clipboard.js +0 -38
- package/utils/desktop-dialogs.d.ts +0 -19
- package/utils/desktop-dialogs.d.ts.map +0 -1
- package/utils/desktop-dialogs.js +0 -50
- package/utils/eliza-globals.d.ts +0 -11
- package/utils/eliza-globals.d.ts.map +0 -1
- package/utils/eliza-globals.js +0 -33
- package/utils/index.d.ts +0 -8
- package/utils/index.d.ts.map +0 -1
- package/utils/index.js +0 -7
- package/utils/number-parsing.d.ts +0 -44
- package/utils/number-parsing.d.ts.map +0 -1
- package/utils/number-parsing.js +0 -56
- package/utils/openExternalUrl.d.ts +0 -2
- package/utils/openExternalUrl.d.ts.map +0 -1
- package/utils/openExternalUrl.js +0 -17
- package/utils/spoken-text.d.ts +0 -2
- package/utils/spoken-text.d.ts.map +0 -1
- package/utils/spoken-text.js +0 -56
- package/utils/streaming-text.d.ts +0 -3
- package/utils/streaming-text.d.ts.map +0 -1
- package/utils/streaming-text.js +0 -87
- package/voice/index.d.ts +0 -2
- package/voice/index.d.ts.map +0 -1
- package/voice/index.js +0 -1
- package/voice/types.d.ts +0 -25
- package/voice/types.d.ts.map +0 -1
- package/voice/types.js +0 -166
- package/wallet-rpc.d.ts +0 -8
- package/wallet-rpc.d.ts.map +0 -1
- package/wallet-rpc.js +0 -131
- /package/{components/apps/extensions → services/local-inference/voice}/types.js +0 -0
|
@@ -0,0 +1,1446 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Patch @elizaos packages whose exports["."].bun points to ./src/index.ts
|
|
3
|
+
* (missing in published tarball). Exported for use by patch-deps.mjs and tests.
|
|
4
|
+
* See docs/plugin-resolution-and-node-path.md "Bun and published package exports".
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
cpSync,
|
|
8
|
+
existsSync,
|
|
9
|
+
readdirSync,
|
|
10
|
+
readFileSync,
|
|
11
|
+
realpathSync,
|
|
12
|
+
renameSync,
|
|
13
|
+
rmSync,
|
|
14
|
+
writeFileSync,
|
|
15
|
+
} from "node:fs";
|
|
16
|
+
import { dirname, resolve } from "node:path";
|
|
17
|
+
import ts from "typescript";
|
|
18
|
+
|
|
19
|
+
const ELIZA_CORE_RUNTIME_FILES = [
|
|
20
|
+
"dist/index.js",
|
|
21
|
+
"dist/browser/index.browser.js",
|
|
22
|
+
"dist/node/index.node.js",
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
function dedupeRealPaths(paths) {
|
|
26
|
+
const seen = new Set();
|
|
27
|
+
const unique = [];
|
|
28
|
+
|
|
29
|
+
for (const candidate of paths) {
|
|
30
|
+
let key = candidate;
|
|
31
|
+
try {
|
|
32
|
+
key = realpathSync(candidate);
|
|
33
|
+
} catch {
|
|
34
|
+
// Keep the original candidate if realpath resolution fails.
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (seen.has(key)) continue;
|
|
38
|
+
seen.add(key);
|
|
39
|
+
unique.push(candidate);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return unique;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function writeFileAtomic(filePath, contents) {
|
|
46
|
+
const dir = dirname(filePath);
|
|
47
|
+
const tempPath = resolve(
|
|
48
|
+
dir,
|
|
49
|
+
`.tmp-${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2)}`,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
writeFileSync(tempPath, contents, "utf8");
|
|
53
|
+
try {
|
|
54
|
+
renameSync(tempPath, filePath);
|
|
55
|
+
} catch {
|
|
56
|
+
// Windows can reject rename over an existing target; fall back to replace.
|
|
57
|
+
rmSync(filePath, { force: true });
|
|
58
|
+
renameSync(tempPath, filePath);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Find all package.json paths for pkgName under root (main node_modules and
|
|
64
|
+
* Bun cache). Match Bun's cache dir naming: @scope/pkg → scope+pkg.
|
|
65
|
+
* Exported for tests.
|
|
66
|
+
*/
|
|
67
|
+
export function findPackageJsonPaths(root, pkgName) {
|
|
68
|
+
return findPackageFilePaths(root, pkgName, "package.json");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Find all matching files for pkgName under root (main node_modules and Bun
|
|
73
|
+
* cache). Exported so tests and other patch helpers share the same lookup.
|
|
74
|
+
*/
|
|
75
|
+
export function findPackageFilePaths(root, pkgName, relativePath) {
|
|
76
|
+
const candidates = [];
|
|
77
|
+
const mainPath = resolve(root, "node_modules", pkgName, relativePath);
|
|
78
|
+
if (existsSync(mainPath)) candidates.push(mainPath);
|
|
79
|
+
const bunCache = resolve(root, "node_modules/.bun");
|
|
80
|
+
if (existsSync(bunCache)) {
|
|
81
|
+
const safeNames = new Set([
|
|
82
|
+
pkgName.replaceAll("/", "+"),
|
|
83
|
+
pkgName.replaceAll("/", "+").replaceAll("@", ""),
|
|
84
|
+
]);
|
|
85
|
+
for (const entry of readdirSync(bunCache)) {
|
|
86
|
+
if (![...safeNames].some((safeName) => entry.startsWith(safeName)))
|
|
87
|
+
continue;
|
|
88
|
+
const p = resolve(bunCache, entry, "node_modules", pkgName, relativePath);
|
|
89
|
+
if (existsSync(p)) candidates.push(p);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return dedupeRealPaths(candidates);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function hasRequiredFiles(dirPath, relativePaths) {
|
|
96
|
+
return relativePaths.every((relativePath) =>
|
|
97
|
+
existsSync(resolve(dirPath, relativePath)),
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Some published @elizaos/core builds in Bun's cache only contain dist/testing,
|
|
103
|
+
* but their package.json still exports dist/node and dist/browser. Copy the
|
|
104
|
+
* runtime dist from a healthy install when that happens so dependents can boot.
|
|
105
|
+
*/
|
|
106
|
+
export function repairElizaCoreRuntimeDist(targetPkgDir, sourcePkgDir) {
|
|
107
|
+
if (!targetPkgDir || !sourcePkgDir) return false;
|
|
108
|
+
if (targetPkgDir === sourcePkgDir) return false;
|
|
109
|
+
if (!existsSync(targetPkgDir)) return false;
|
|
110
|
+
if (!hasRequiredFiles(sourcePkgDir, ELIZA_CORE_RUNTIME_FILES)) return false;
|
|
111
|
+
if (hasRequiredFiles(targetPkgDir, ELIZA_CORE_RUNTIME_FILES)) return false;
|
|
112
|
+
|
|
113
|
+
const sourceDist = resolve(sourcePkgDir, "dist");
|
|
114
|
+
const targetDist = resolve(targetPkgDir, "dist");
|
|
115
|
+
|
|
116
|
+
rmSync(targetDist, { recursive: true, force: true });
|
|
117
|
+
cpSync(sourceDist, targetDist, { recursive: true });
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Repair any cached @elizaos/core package copies whose runtime dist files are
|
|
123
|
+
* missing by cloning the dist tree from the healthy root install.
|
|
124
|
+
*/
|
|
125
|
+
export function patchBrokenElizaCoreRuntimeDists(root, log = console.log) {
|
|
126
|
+
const pkgPaths = findPackageJsonPaths(root, "@elizaos/core");
|
|
127
|
+
const pkgDirs = pkgPaths.map((pkgPath) => dirname(pkgPath));
|
|
128
|
+
const sourcePkgDir = pkgDirs.find((pkgDir) =>
|
|
129
|
+
hasRequiredFiles(pkgDir, ELIZA_CORE_RUNTIME_FILES),
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
if (!sourcePkgDir) {
|
|
133
|
+
log(
|
|
134
|
+
"[patch-deps] Skipping @elizaos/core runtime repair: no healthy source dist was found.",
|
|
135
|
+
);
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
let patched = false;
|
|
140
|
+
for (const pkgDir of pkgDirs) {
|
|
141
|
+
if (repairElizaCoreRuntimeDist(pkgDir, sourcePkgDir)) {
|
|
142
|
+
patched = true;
|
|
143
|
+
log(
|
|
144
|
+
`[patch-deps] Repaired @elizaos/core runtime dist in Bun cache: ${pkgDir}`,
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return patched;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function findElizaPluginPackageJsonPaths(root) {
|
|
152
|
+
const candidates = [];
|
|
153
|
+
const rootScopeDir = resolve(root, "node_modules", "@elizaos");
|
|
154
|
+
|
|
155
|
+
if (existsSync(rootScopeDir)) {
|
|
156
|
+
for (const entry of readdirSync(rootScopeDir)) {
|
|
157
|
+
if (!entry.startsWith("plugin-")) continue;
|
|
158
|
+
const pkgPath = resolve(rootScopeDir, entry, "package.json");
|
|
159
|
+
if (existsSync(pkgPath)) candidates.push(pkgPath);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const bunCache = resolve(root, "node_modules/.bun");
|
|
164
|
+
if (existsSync(bunCache)) {
|
|
165
|
+
for (const entry of readdirSync(bunCache)) {
|
|
166
|
+
const scopeDir = resolve(bunCache, entry, "node_modules", "@elizaos");
|
|
167
|
+
if (!existsSync(scopeDir)) continue;
|
|
168
|
+
for (const scopedEntry of readdirSync(scopeDir)) {
|
|
169
|
+
if (!scopedEntry.startsWith("plugin-")) continue;
|
|
170
|
+
const pkgPath = resolve(scopeDir, scopedEntry, "package.json");
|
|
171
|
+
if (existsSync(pkgPath)) candidates.push(pkgPath);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return dedupeRealPaths(candidates);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Bun can keep a private @elizaos/core inside individual plugin package dirs.
|
|
181
|
+
* When that happens, ESM resolves the plugin's own nested core first instead of
|
|
182
|
+
* the root install, which can re-introduce version skew even when the root core
|
|
183
|
+
* is pinned and healthy. Remove those nested copies so plugins resolve the
|
|
184
|
+
* canonical top-level core.
|
|
185
|
+
*/
|
|
186
|
+
export function pruneNestedElizaPluginCoreCopies(root, log = console.log) {
|
|
187
|
+
const rootCorePkgPath = resolve(
|
|
188
|
+
root,
|
|
189
|
+
"node_modules",
|
|
190
|
+
"@elizaos",
|
|
191
|
+
"core",
|
|
192
|
+
"package.json",
|
|
193
|
+
);
|
|
194
|
+
const preferredCorePkgPath = existsSync(rootCorePkgPath)
|
|
195
|
+
? rootCorePkgPath
|
|
196
|
+
: findPackageJsonPaths(root, "@elizaos/core")[0];
|
|
197
|
+
|
|
198
|
+
if (!preferredCorePkgPath) {
|
|
199
|
+
log(
|
|
200
|
+
"[patch-deps] Skipping nested @elizaos/core pruning: no root core install was found.",
|
|
201
|
+
);
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
let preferredCoreDir = dirname(preferredCorePkgPath);
|
|
206
|
+
try {
|
|
207
|
+
preferredCoreDir = realpathSync(preferredCoreDir);
|
|
208
|
+
} catch {
|
|
209
|
+
// Keep the unresolved dir when realpath fails.
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
let patched = false;
|
|
213
|
+
for (const pluginPkgPath of findElizaPluginPackageJsonPaths(root)) {
|
|
214
|
+
const pluginDir = dirname(pluginPkgPath);
|
|
215
|
+
const nestedCoreDir = resolve(
|
|
216
|
+
pluginDir,
|
|
217
|
+
"node_modules",
|
|
218
|
+
"@elizaos",
|
|
219
|
+
"core",
|
|
220
|
+
);
|
|
221
|
+
if (!existsSync(nestedCoreDir)) continue;
|
|
222
|
+
|
|
223
|
+
let resolvedNestedCoreDir = nestedCoreDir;
|
|
224
|
+
try {
|
|
225
|
+
resolvedNestedCoreDir = realpathSync(nestedCoreDir);
|
|
226
|
+
} catch {
|
|
227
|
+
// Keep the unresolved dir when realpath fails.
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (resolvedNestedCoreDir === preferredCoreDir) {
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
let pluginName = pluginDir;
|
|
235
|
+
try {
|
|
236
|
+
const pkg = JSON.parse(readFileSync(pluginPkgPath, "utf8"));
|
|
237
|
+
if (typeof pkg.name === "string" && pkg.name.trim()) {
|
|
238
|
+
pluginName = pkg.name.trim();
|
|
239
|
+
}
|
|
240
|
+
} catch {
|
|
241
|
+
// Fall back to the directory path when package.json cannot be read.
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
rmSync(nestedCoreDir, { recursive: true, force: true });
|
|
245
|
+
patched = true;
|
|
246
|
+
log(
|
|
247
|
+
`[patch-deps] Removed nested @elizaos/core from ${pluginName}; plugin imports now resolve the root core.`,
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return patched;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** @see patchElizaCoreStreamingTtsHandlerGuard */
|
|
255
|
+
const ELIZA_CORE_STREAMING_TTS_PATCH_MARKER =
|
|
256
|
+
"getModel(ModelType.TEXT_TO_SPEECH) ? await runtime2.useModel(ModelType.TEXT_TO_SPEECH, params)";
|
|
257
|
+
|
|
258
|
+
const ELIZA_CORE_NODE_EDGE_TTS_FROM =
|
|
259
|
+
"const result2 = await runtime2.useModel(ModelType.TEXT_TO_SPEECH, params);";
|
|
260
|
+
const ELIZA_CORE_NODE_EDGE_TTS_TO =
|
|
261
|
+
"const result2 = runtime2.getModel(ModelType.TEXT_TO_SPEECH) ? await runtime2.useModel(ModelType.TEXT_TO_SPEECH, params) : void 0;";
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Minified browser bundle (variable names change between releases — extend if
|
|
265
|
+
* postinstall logs "Skipping @elizaos/core streaming TTS guard" for browser).
|
|
266
|
+
*/
|
|
267
|
+
const ELIZA_CORE_BROWSER_TTS_REPLACEMENTS = [
|
|
268
|
+
[
|
|
269
|
+
",S=await $.useModel(b$.TEXT_TO_SPEECH,M);",
|
|
270
|
+
",S=$.getModel(b$.TEXT_TO_SPEECH)?await $.useModel(b$.TEXT_TO_SPEECH,M):void 0;",
|
|
271
|
+
],
|
|
272
|
+
[
|
|
273
|
+
",X=await $.useModel(b$.TEXT_TO_SPEECH,J);",
|
|
274
|
+
",X=$.getModel(b$.TEXT_TO_SPEECH)?await $.useModel(b$.TEXT_TO_SPEECH,J):void 0;",
|
|
275
|
+
],
|
|
276
|
+
];
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Eliza core's message handler synthesizes voice audio whenever `onStreamChunk`
|
|
280
|
+
* is provided. Eliza's SSE chat always passes that callback, so the runtime
|
|
281
|
+
* calls `useModel(TEXT_TO_SPEECH)` — unrelated to the dashboard "agent voice"
|
|
282
|
+
* toggle. If no handler is registered yet (e.g. race before Edge TTS loads) or
|
|
283
|
+
* no provider is configured, that throws and logs
|
|
284
|
+
* "No handler found for delegate type: TEXT_TO_SPEECH".
|
|
285
|
+
*
|
|
286
|
+
* Guard both `useModel` sites so we only call TTS when `getModel` finds a handler.
|
|
287
|
+
*/
|
|
288
|
+
export function patchElizaCoreStreamingTtsHandlerGuard(
|
|
289
|
+
root,
|
|
290
|
+
log = console.log,
|
|
291
|
+
) {
|
|
292
|
+
const pkgJsonPaths = findPackageJsonPaths(root, "@elizaos/core");
|
|
293
|
+
let patchedAny = false;
|
|
294
|
+
|
|
295
|
+
for (const pkgJsonPath of pkgJsonPaths) {
|
|
296
|
+
const pkgDir = dirname(pkgJsonPath);
|
|
297
|
+
const files = [
|
|
298
|
+
resolve(pkgDir, "dist/node/index.node.js"),
|
|
299
|
+
resolve(pkgDir, "dist/edge/index.edge.js"),
|
|
300
|
+
resolve(pkgDir, "dist/browser/index.browser.js"),
|
|
301
|
+
];
|
|
302
|
+
|
|
303
|
+
for (const filePath of files) {
|
|
304
|
+
if (!existsSync(filePath)) continue;
|
|
305
|
+
const src = readFileSync(filePath, "utf8");
|
|
306
|
+
if (!src.includes("Error generating voice for remaining text")) continue;
|
|
307
|
+
if (src.includes(ELIZA_CORE_STREAMING_TTS_PATCH_MARKER)) continue;
|
|
308
|
+
|
|
309
|
+
let next = src;
|
|
310
|
+
const isNodeOrEdge =
|
|
311
|
+
filePath.endsWith("index.node.js") ||
|
|
312
|
+
filePath.endsWith("index.edge.js");
|
|
313
|
+
|
|
314
|
+
if (isNodeOrEdge) {
|
|
315
|
+
if (!next.includes(ELIZA_CORE_NODE_EDGE_TTS_FROM)) continue;
|
|
316
|
+
next = next.replaceAll(
|
|
317
|
+
ELIZA_CORE_NODE_EDGE_TTS_FROM,
|
|
318
|
+
ELIZA_CORE_NODE_EDGE_TTS_TO,
|
|
319
|
+
);
|
|
320
|
+
} else {
|
|
321
|
+
// Newer core builds may already ship this guard in the browser bundle.
|
|
322
|
+
if (
|
|
323
|
+
next.includes(
|
|
324
|
+
"getModel(b$.TEXT_TO_SPEECH)?await $.useModel(b$.TEXT_TO_SPEECH",
|
|
325
|
+
)
|
|
326
|
+
)
|
|
327
|
+
continue;
|
|
328
|
+
const allPresent = ELIZA_CORE_BROWSER_TTS_REPLACEMENTS.every(([from]) =>
|
|
329
|
+
next.includes(from),
|
|
330
|
+
);
|
|
331
|
+
if (!allPresent) continue;
|
|
332
|
+
for (const [from, to] of ELIZA_CORE_BROWSER_TTS_REPLACEMENTS) {
|
|
333
|
+
next = next.replace(from, to);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if (next !== src) {
|
|
338
|
+
writeFileSync(filePath, next, "utf8");
|
|
339
|
+
patchedAny = true;
|
|
340
|
+
log(
|
|
341
|
+
`[patch-deps] Patched @elizaos/core streaming TTS guard: ${filePath}`,
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
return patchedAny;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/** User-visible chunk injected on each structured-output retry (non-rich stream). */
|
|
351
|
+
const ELIZA_CORE_STREAM_RETRY_PLACEHOLDER_NODE = ` if (!this.config.hasRichConsumer) {
|
|
352
|
+
this.config.onChunk(\`
|
|
353
|
+
-- that's not right, let me start again:
|
|
354
|
+
\`);
|
|
355
|
+
}
|
|
356
|
+
`;
|
|
357
|
+
|
|
358
|
+
/** Minified browser bundle: comma-operator if sets state then checks hasRichConsumer. */
|
|
359
|
+
const ELIZA_CORE_STREAM_RETRY_PLACEHOLDER_BROWSER_FROM = `if(this.state="retrying",!this.config.hasRichConsumer)this.config.onChunk(\`
|
|
360
|
+
-- that's not right, let me start again:
|
|
361
|
+
\`);`;
|
|
362
|
+
|
|
363
|
+
const ELIZA_CORE_STREAM_RETRY_PLACEHOLDER_BROWSER_TO = `this.state="retrying";`;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Older @elizaos/core structured stream retry handling called `onChunk` with a
|
|
367
|
+
* fixed apology line for non-rich streaming consumers on every parse/validation
|
|
368
|
+
* retry. That duplicates in the saved message (e.g. 3× with maxRetries 3).
|
|
369
|
+
* Remove the placeholder; `emitEvent({ eventType: "retry_start" })` is unchanged.
|
|
370
|
+
*/
|
|
371
|
+
export function patchElizaCoreStreamingRetryPlaceholder(
|
|
372
|
+
root,
|
|
373
|
+
log = console.log,
|
|
374
|
+
) {
|
|
375
|
+
const pkgJsonPaths = findPackageJsonPaths(root, "@elizaos/core");
|
|
376
|
+
let patchedAny = false;
|
|
377
|
+
|
|
378
|
+
for (const pkgJsonPath of pkgJsonPaths) {
|
|
379
|
+
const pkgDir = dirname(pkgJsonPath);
|
|
380
|
+
const files = [
|
|
381
|
+
resolve(pkgDir, "dist/node/index.node.js"),
|
|
382
|
+
resolve(pkgDir, "dist/edge/index.edge.js"),
|
|
383
|
+
resolve(pkgDir, "dist/browser/index.browser.js"),
|
|
384
|
+
];
|
|
385
|
+
|
|
386
|
+
for (const filePath of files) {
|
|
387
|
+
if (!existsSync(filePath)) continue;
|
|
388
|
+
const src = readFileSync(filePath, "utf8");
|
|
389
|
+
if (!src.includes("that's not right, let me start again")) continue;
|
|
390
|
+
|
|
391
|
+
let next = src;
|
|
392
|
+
if (
|
|
393
|
+
filePath.endsWith("index.node.js") ||
|
|
394
|
+
filePath.endsWith("index.edge.js")
|
|
395
|
+
) {
|
|
396
|
+
if (!next.includes(ELIZA_CORE_STREAM_RETRY_PLACEHOLDER_NODE)) continue;
|
|
397
|
+
next = next.replace(ELIZA_CORE_STREAM_RETRY_PLACEHOLDER_NODE, "");
|
|
398
|
+
} else {
|
|
399
|
+
if (!next.includes(ELIZA_CORE_STREAM_RETRY_PLACEHOLDER_BROWSER_FROM))
|
|
400
|
+
continue;
|
|
401
|
+
next = next.replaceAll(
|
|
402
|
+
ELIZA_CORE_STREAM_RETRY_PLACEHOLDER_BROWSER_FROM,
|
|
403
|
+
ELIZA_CORE_STREAM_RETRY_PLACEHOLDER_BROWSER_TO,
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
if (next !== src) {
|
|
408
|
+
writeFileSync(filePath, next, "utf8");
|
|
409
|
+
patchedAny = true;
|
|
410
|
+
log(
|
|
411
|
+
`[patch-deps] Patched @elizaos/core streaming retry placeholder: ${filePath}`,
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return patchedAny;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Detect stale Bun module cache and warn the user.
|
|
422
|
+
*
|
|
423
|
+
* Bun's content-addressable cache deduplicates packages by tarball hash. When
|
|
424
|
+
* upstream publishes multiple versions with identical (stale) build artifacts,
|
|
425
|
+
* they share a hash and Bun serves stale content. We can't safely remove
|
|
426
|
+
* entries during postinstall (symlinks break), so we detect the condition
|
|
427
|
+
* and tell the user to run `bun run repair` which does:
|
|
428
|
+
* rm -rf node_modules/.bun && bun install
|
|
429
|
+
*
|
|
430
|
+
* Runs once per package.json version (stamp-guarded).
|
|
431
|
+
*
|
|
432
|
+
* Bun cache entry format: @scope+pkg@version+contenthash
|
|
433
|
+
* e.g. @elizaos+core@2.0.0-alpha.77+f9c270f5561f2899
|
|
434
|
+
*/
|
|
435
|
+
export function warnStaleBunCache(root, log = console.log) {
|
|
436
|
+
const bunCacheDir = resolve(root, "node_modules/.bun");
|
|
437
|
+
if (!existsSync(bunCacheDir)) return 0;
|
|
438
|
+
|
|
439
|
+
// Only check once per package.json version.
|
|
440
|
+
const pkgJsonPath = resolve(root, "package.json");
|
|
441
|
+
const stampPath = resolve(bunCacheDir, ".bust-cache-stamp");
|
|
442
|
+
if (existsSync(pkgJsonPath) && existsSync(stampPath)) {
|
|
443
|
+
try {
|
|
444
|
+
const pkgVersion =
|
|
445
|
+
JSON.parse(readFileSync(pkgJsonPath, "utf8")).version || "";
|
|
446
|
+
const stamp = readFileSync(stampPath, "utf8").trim();
|
|
447
|
+
if (stamp === pkgVersion) return 0;
|
|
448
|
+
} catch {}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
const prefixes = [
|
|
452
|
+
"@elizaos+core@",
|
|
453
|
+
"@elizaos+autonomous@",
|
|
454
|
+
"@elizaos+app-core@",
|
|
455
|
+
"@elizaos+prompts@",
|
|
456
|
+
"@elizaos+skills@",
|
|
457
|
+
];
|
|
458
|
+
let staleCount = 0;
|
|
459
|
+
|
|
460
|
+
let allEntries;
|
|
461
|
+
try {
|
|
462
|
+
allEntries = readdirSync(bunCacheDir);
|
|
463
|
+
} catch (err) {
|
|
464
|
+
log(`[patch-deps] Warning: failed to read Bun cache: ${err.message}`);
|
|
465
|
+
return 0;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
for (const prefix of prefixes) {
|
|
469
|
+
const entries = allEntries.filter((e) => e.startsWith(prefix));
|
|
470
|
+
if (entries.length < 2) continue;
|
|
471
|
+
|
|
472
|
+
// Group by content hash (the part after the last '+')
|
|
473
|
+
const byHash = new Map();
|
|
474
|
+
for (const entry of entries) {
|
|
475
|
+
const plusIdx = entry.lastIndexOf("+");
|
|
476
|
+
if (plusIdx === -1 || plusIdx === entry.length - 1) continue;
|
|
477
|
+
const hash = entry.slice(plusIdx + 1);
|
|
478
|
+
if (!byHash.has(hash)) byHash.set(hash, []);
|
|
479
|
+
byHash.get(hash).push(entry);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
for (const [, group] of byHash) {
|
|
483
|
+
if (group.length >= 2) staleCount += group.length - 1;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// Write stamp regardless so we don't re-check every install.
|
|
488
|
+
try {
|
|
489
|
+
const pkgVersion = existsSync(pkgJsonPath)
|
|
490
|
+
? JSON.parse(readFileSync(pkgJsonPath, "utf8")).version || ""
|
|
491
|
+
: "";
|
|
492
|
+
writeFileSync(stampPath, pkgVersion, "utf8");
|
|
493
|
+
} catch {}
|
|
494
|
+
|
|
495
|
+
if (staleCount > 0) {
|
|
496
|
+
log(
|
|
497
|
+
`[patch-deps] ⚠️ Detected ${staleCount} stale Bun cache entries. Run: rm -rf node_modules/.bun && bun install`,
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
return staleCount;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* If pkg.json has exports["."].bun = "./src/index.ts" and that file doesn't
|
|
505
|
+
* exist, remove "bun" and "default" so resolver uses "import" → dist/.
|
|
506
|
+
* Returns true if the file was patched.
|
|
507
|
+
*/
|
|
508
|
+
export function applyPatchToPackageJson(pkgPath) {
|
|
509
|
+
if (!existsSync(pkgPath)) return false;
|
|
510
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
511
|
+
const dot = pkg.exports?.["."];
|
|
512
|
+
if (!dot || typeof dot !== "object") return false;
|
|
513
|
+
if (!dot.bun?.endsWith("/src/index.ts")) return false;
|
|
514
|
+
|
|
515
|
+
const dir = dirname(pkgPath);
|
|
516
|
+
if (existsSync(resolve(dir, dot.bun))) return false; // src exists — no patch
|
|
517
|
+
|
|
518
|
+
delete dot.bun;
|
|
519
|
+
if (dot.default?.endsWith("/src/index.ts")) {
|
|
520
|
+
delete dot.default;
|
|
521
|
+
}
|
|
522
|
+
writeFileAtomic(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
523
|
+
return true;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Some published packages only export subpaths with explicit `.js` suffixes
|
|
528
|
+
* (for example "./sha3.js"), while runtime consumers import the extensionless
|
|
529
|
+
* variant ("@scope/pkg/sha3"). Add extensionless aliases so Bun resolves the
|
|
530
|
+
* published package the same way as modern bundlers.
|
|
531
|
+
*/
|
|
532
|
+
export function applyExtensionlessJsExportAliases(pkgPath) {
|
|
533
|
+
if (!existsSync(pkgPath)) return false;
|
|
534
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
535
|
+
const exportsField = pkg.exports;
|
|
536
|
+
if (
|
|
537
|
+
!exportsField ||
|
|
538
|
+
typeof exportsField !== "object" ||
|
|
539
|
+
Array.isArray(exportsField)
|
|
540
|
+
) {
|
|
541
|
+
return false;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
let patched = false;
|
|
545
|
+
for (const [key, value] of Object.entries(exportsField)) {
|
|
546
|
+
if (!key.startsWith("./") || !key.endsWith(".js")) continue;
|
|
547
|
+
const alias = key.slice(0, -3);
|
|
548
|
+
if (Object.hasOwn(exportsField, alias)) continue;
|
|
549
|
+
exportsField[alias] = value;
|
|
550
|
+
patched = true;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
if (!patched) return false;
|
|
554
|
+
|
|
555
|
+
writeFileAtomic(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
556
|
+
return true;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Some upstream @elizaos packages (notably @elizaos/agent and @elizaos/ui)
|
|
561
|
+
* publish exports maps where glob subpath targets still carry the source
|
|
562
|
+
* extension before the .js / .d.ts suffix — e.g. "./packages/agent/src/runtime/*.ts.js".
|
|
563
|
+
* That breaks Bun resolution because the on-disk files are "*.js" / "*.d.ts".
|
|
564
|
+
*
|
|
565
|
+
* The bug originates in eliza's prepare-package-dist.mjs `replaceSourceExtension`
|
|
566
|
+
* helper (it appends ".js" instead of replacing the source extension when the
|
|
567
|
+
* relative path contains a "*"). Rather than wait for upstream republish, we
|
|
568
|
+
* rewrite every export value matching /\*\.(ts|tsx|mts|cts)\.(js|d\.ts)$/
|
|
569
|
+
* back to its correct dist form.
|
|
570
|
+
*/
|
|
571
|
+
function rewriteTsTsxJsGlobValue(value) {
|
|
572
|
+
if (typeof value !== "string") return { value, changed: false };
|
|
573
|
+
// Replace `*.ts.js` / `*.tsx.js` / `*.mts.js` / `*.cts.js` → `*.js`
|
|
574
|
+
// and `*.ts.d.ts` / `*.tsx.d.ts` etc. → `*.d.ts`.
|
|
575
|
+
const next = value
|
|
576
|
+
.replace(/\*\.(?:ts|tsx|mts|cts)\.js$/, "*.js")
|
|
577
|
+
.replace(/\*\.(?:ts|tsx|mts|cts)\.d\.ts$/, "*.d.ts");
|
|
578
|
+
return { value: next, changed: next !== value };
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
function rewriteTsTsxJsGlobConditions(node) {
|
|
582
|
+
if (typeof node === "string") {
|
|
583
|
+
return rewriteTsTsxJsGlobValue(node);
|
|
584
|
+
}
|
|
585
|
+
if (Array.isArray(node)) {
|
|
586
|
+
let changed = false;
|
|
587
|
+
const next = node.map((entry) => {
|
|
588
|
+
const result = rewriteTsTsxJsGlobConditions(entry);
|
|
589
|
+
if (result.changed) changed = true;
|
|
590
|
+
return result.value;
|
|
591
|
+
});
|
|
592
|
+
return { value: next, changed };
|
|
593
|
+
}
|
|
594
|
+
if (node && typeof node === "object") {
|
|
595
|
+
let changed = false;
|
|
596
|
+
const next = {};
|
|
597
|
+
for (const [k, v] of Object.entries(node)) {
|
|
598
|
+
const result = rewriteTsTsxJsGlobConditions(v);
|
|
599
|
+
if (result.changed) changed = true;
|
|
600
|
+
next[k] = result.value;
|
|
601
|
+
}
|
|
602
|
+
return { value: next, changed };
|
|
603
|
+
}
|
|
604
|
+
return { value: node, changed: false };
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
export function applyTsTsxJsGlobFix(pkgPath) {
|
|
608
|
+
if (!existsSync(pkgPath)) return false;
|
|
609
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
610
|
+
const exportsField = pkg.exports;
|
|
611
|
+
if (
|
|
612
|
+
!exportsField ||
|
|
613
|
+
typeof exportsField !== "object" ||
|
|
614
|
+
Array.isArray(exportsField)
|
|
615
|
+
) {
|
|
616
|
+
return false;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
let patched = false;
|
|
620
|
+
for (const [key, value] of Object.entries(exportsField)) {
|
|
621
|
+
const result = rewriteTsTsxJsGlobConditions(value);
|
|
622
|
+
if (result.changed) {
|
|
623
|
+
exportsField[key] = result.value;
|
|
624
|
+
patched = true;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
if (!patched) return false;
|
|
629
|
+
|
|
630
|
+
writeFileAtomic(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
631
|
+
return true;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* @noble/hashes@2.x removed several legacy direct entry points that ethers@6
|
|
636
|
+
* still imports (sha256, sha512, ripemd160). Recreate those shims so Bun can
|
|
637
|
+
* resolve the package without downgrading the whole tree.
|
|
638
|
+
*/
|
|
639
|
+
export function applyNobleHashesCompat(pkgPath) {
|
|
640
|
+
if (!existsSync(pkgPath)) return false;
|
|
641
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
642
|
+
if (pkg.name !== "@noble/hashes") return false;
|
|
643
|
+
|
|
644
|
+
const exportsField = pkg.exports;
|
|
645
|
+
if (
|
|
646
|
+
!exportsField ||
|
|
647
|
+
typeof exportsField !== "object" ||
|
|
648
|
+
Array.isArray(exportsField)
|
|
649
|
+
) {
|
|
650
|
+
return false;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
const dir = dirname(pkgPath);
|
|
654
|
+
const shims = [
|
|
655
|
+
{
|
|
656
|
+
subpath: "_assert",
|
|
657
|
+
sourceFile: "utils.js",
|
|
658
|
+
contents: [
|
|
659
|
+
'import { isBytes, abytes, anumber, ahash, aexists, aoutput } from "./utils.js";',
|
|
660
|
+
"export { isBytes, abytes, anumber, ahash, aexists, aoutput };",
|
|
661
|
+
"export const number = anumber;",
|
|
662
|
+
"export function bool(value) {",
|
|
663
|
+
' if (typeof value !== "boolean") throw new TypeError(`boolean expected, got ${value}`);',
|
|
664
|
+
"}",
|
|
665
|
+
"export function bytes(value, ...lengths) {",
|
|
666
|
+
" abytes(value);",
|
|
667
|
+
" if (lengths.length > 0 && !lengths.includes(value.length)) {",
|
|
668
|
+
" throw new RangeError(`Uint8Array expected of length ${lengths}, got length=${value.length}`);",
|
|
669
|
+
" }",
|
|
670
|
+
"}",
|
|
671
|
+
"export const hash = ahash;",
|
|
672
|
+
"export const exists = aexists;",
|
|
673
|
+
"export const output = aoutput;",
|
|
674
|
+
"export default { number, bool, bytes, hash, exists, output };",
|
|
675
|
+
"",
|
|
676
|
+
].join("\n"),
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
subpath: "ripemd160",
|
|
680
|
+
sourceFile: "legacy.js",
|
|
681
|
+
contents: 'export { ripemd160 } from "./legacy.js";\n',
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
subpath: "sha256",
|
|
685
|
+
sourceFile: "sha2.js",
|
|
686
|
+
contents: 'export { sha256 } from "./sha2.js";\n',
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
subpath: "sha512",
|
|
690
|
+
sourceFile: "sha2.js",
|
|
691
|
+
contents: 'export { sha512 } from "./sha2.js";\n',
|
|
692
|
+
},
|
|
693
|
+
];
|
|
694
|
+
|
|
695
|
+
let patched = false;
|
|
696
|
+
|
|
697
|
+
for (const shim of shims) {
|
|
698
|
+
if (!existsSync(resolve(dir, shim.sourceFile))) continue;
|
|
699
|
+
|
|
700
|
+
const exportKey = `./${shim.subpath}`;
|
|
701
|
+
const exportFileKey = `./${shim.subpath}.js`;
|
|
702
|
+
const exportTarget = `./${shim.subpath}.js`;
|
|
703
|
+
const shimPath = resolve(dir, `${shim.subpath}.js`);
|
|
704
|
+
|
|
705
|
+
if (!existsSync(shimPath)) {
|
|
706
|
+
writeFileSync(shimPath, shim.contents, "utf8");
|
|
707
|
+
patched = true;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
if (exportsField[exportKey] !== exportTarget) {
|
|
711
|
+
exportsField[exportKey] = exportTarget;
|
|
712
|
+
patched = true;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
if (exportsField[exportFileKey] !== exportTarget) {
|
|
716
|
+
exportsField[exportFileKey] = exportTarget;
|
|
717
|
+
patched = true;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
if (!patched) return false;
|
|
722
|
+
|
|
723
|
+
writeFileAtomic(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
724
|
+
return true;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Remove a lifecycle script when it references a file that is missing from the
|
|
729
|
+
* published package tarball. This is used for upstream packages that ship a
|
|
730
|
+
* broken postinstall hook.
|
|
731
|
+
*/
|
|
732
|
+
export function applyMissingLifecycleScriptPatch(
|
|
733
|
+
pkgPath,
|
|
734
|
+
scriptName,
|
|
735
|
+
relativeTarget,
|
|
736
|
+
) {
|
|
737
|
+
if (!existsSync(pkgPath)) return false;
|
|
738
|
+
|
|
739
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
740
|
+
const lifecycleScripts = pkg.scripts;
|
|
741
|
+
const lifecycleCommand = lifecycleScripts?.[scriptName];
|
|
742
|
+
if (
|
|
743
|
+
!lifecycleScripts ||
|
|
744
|
+
typeof lifecycleCommand !== "string" ||
|
|
745
|
+
!lifecycleCommand.includes(relativeTarget)
|
|
746
|
+
) {
|
|
747
|
+
return false;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
const dir = dirname(pkgPath);
|
|
751
|
+
if (existsSync(resolve(dir, relativeTarget))) {
|
|
752
|
+
return false;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
delete lifecycleScripts[scriptName];
|
|
756
|
+
if (Object.keys(lifecycleScripts).length === 0) {
|
|
757
|
+
delete pkg.scripts;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
writeFileAtomic(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
761
|
+
return true;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Patch all copies of pkgName under root (node_modules and Bun cache).
|
|
766
|
+
* Logs when a file is patched. Used by postinstall in patch-deps.mjs.
|
|
767
|
+
*/
|
|
768
|
+
export function patchBunExports(root, pkgName, log = console.log) {
|
|
769
|
+
const candidates = findPackageJsonPaths(root, pkgName);
|
|
770
|
+
let patched = false;
|
|
771
|
+
for (const pkgPath of candidates) {
|
|
772
|
+
if (applyPatchToPackageJson(pkgPath)) {
|
|
773
|
+
patched = true;
|
|
774
|
+
log(
|
|
775
|
+
`[patch-deps] Patched ${pkgName} exports: removed dead "bun"/"default" → src/index.ts conditions.`,
|
|
776
|
+
);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
return patched;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* Patch all copies of pkgName so any "./foo.js" export also exposes "./foo".
|
|
784
|
+
*/
|
|
785
|
+
export function patchExtensionlessJsExports(root, pkgName, log = console.log) {
|
|
786
|
+
const candidates = findPackageJsonPaths(root, pkgName);
|
|
787
|
+
let patched = false;
|
|
788
|
+
for (const pkgPath of candidates) {
|
|
789
|
+
if (applyExtensionlessJsExportAliases(pkgPath)) {
|
|
790
|
+
patched = true;
|
|
791
|
+
log(
|
|
792
|
+
`[patch-deps] Patched ${pkgName} exports: added extensionless aliases for .js subpaths.`,
|
|
793
|
+
);
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
return patched;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Patch all copies of pkgName so any glob export target carrying a stray source
|
|
801
|
+
* extension before .js/.d.ts is rewritten to the actual emitted dist path.
|
|
802
|
+
* Workaround for the upstream prepare-package-dist.mjs glob bug.
|
|
803
|
+
*/
|
|
804
|
+
export function patchTsTsxJsGlobs(root, pkgName, log = console.log) {
|
|
805
|
+
const candidates = findPackageJsonPaths(root, pkgName);
|
|
806
|
+
let patched = false;
|
|
807
|
+
for (const pkgPath of candidates) {
|
|
808
|
+
if (applyTsTsxJsGlobFix(pkgPath)) {
|
|
809
|
+
patched = true;
|
|
810
|
+
log(
|
|
811
|
+
`[patch-deps] Patched ${pkgName} exports: rewrote *.ts.js / *.ts.d.ts glob targets to *.js / *.d.ts.`,
|
|
812
|
+
);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
return patched;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Patch all copies of @noble/hashes so legacy ethers subpaths keep resolving
|
|
820
|
+
* even when Bun installs the newer 2.x package at the root.
|
|
821
|
+
*/
|
|
822
|
+
export function patchNobleHashesCompat(root, log = console.log) {
|
|
823
|
+
const candidates = findPackageJsonPaths(root, "@noble/hashes");
|
|
824
|
+
let patched = false;
|
|
825
|
+
for (const pkgPath of candidates) {
|
|
826
|
+
if (applyNobleHashesCompat(pkgPath)) {
|
|
827
|
+
patched = true;
|
|
828
|
+
log(
|
|
829
|
+
"[patch-deps] Patched @noble/hashes exports: restored legacy ethers-compatible sha256/sha512/ripemd160 shims.",
|
|
830
|
+
);
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
return patched;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Patch all copies of pkgName so a broken lifecycle hook is removed when the
|
|
838
|
+
* referenced script file is missing from the installed package.
|
|
839
|
+
*/
|
|
840
|
+
export function patchMissingLifecycleScript(
|
|
841
|
+
root,
|
|
842
|
+
pkgName,
|
|
843
|
+
scriptName,
|
|
844
|
+
relativeTarget,
|
|
845
|
+
log = console.log,
|
|
846
|
+
) {
|
|
847
|
+
const candidates = findPackageJsonPaths(root, pkgName);
|
|
848
|
+
let patched = false;
|
|
849
|
+
for (const pkgPath of candidates) {
|
|
850
|
+
if (applyMissingLifecycleScriptPatch(pkgPath, scriptName, relativeTarget)) {
|
|
851
|
+
patched = true;
|
|
852
|
+
log(
|
|
853
|
+
`[patch-deps] Patched ${pkgName} ${scriptName}: removed lifecycle hook referencing missing ${relativeTarget}.`,
|
|
854
|
+
);
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
return patched;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
function loadElizaOnboardingPresetsSource(root, targetPath) {
|
|
861
|
+
const sourcePath = resolve(
|
|
862
|
+
root,
|
|
863
|
+
"eliza/packages/app-core/src/onboarding-presets.ts",
|
|
864
|
+
);
|
|
865
|
+
const source = readFileSync(sourcePath, "utf8");
|
|
866
|
+
if (!targetPath?.endsWith(".js")) {
|
|
867
|
+
return source;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
return ts.transpileModule(source, {
|
|
871
|
+
fileName: sourcePath,
|
|
872
|
+
compilerOptions: {
|
|
873
|
+
module: ts.ModuleKind.ESNext,
|
|
874
|
+
target: ts.ScriptTarget.ES2022,
|
|
875
|
+
},
|
|
876
|
+
}).outputText;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* Eliza owns the onboarding preset roster, but the published autonomous
|
|
881
|
+
* package still serves upstream style presets. Replace the installed module
|
|
882
|
+
* with Eliza's local preset source so the onboarding API and runtime expose
|
|
883
|
+
* the same Eliza-specific characters that app-core is patched to display.
|
|
884
|
+
*/
|
|
885
|
+
export function applyAutonomousElizaOnboardingPresetsPatch(filePath, source) {
|
|
886
|
+
if (!existsSync(filePath)) return false;
|
|
887
|
+
|
|
888
|
+
// When writing to a .js file, strip TypeScript-only syntax so Bun can
|
|
889
|
+
// parse it as plain JavaScript. The source is always loaded from the
|
|
890
|
+
// local .ts file which may contain `as const`, type annotations, etc.
|
|
891
|
+
let output = source;
|
|
892
|
+
if (filePath.endsWith(".js")) {
|
|
893
|
+
output = stripTypeScriptSyntax(output);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
const compatSource = readFileSync(filePath, "utf8");
|
|
897
|
+
if (compatSource === output) return false;
|
|
898
|
+
|
|
899
|
+
writeFileSync(filePath, output, "utf8");
|
|
900
|
+
return true;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Naively strip TypeScript-only syntax from a source string so it can be
|
|
905
|
+
* loaded as plain JavaScript by Bun. Handles the patterns used in
|
|
906
|
+
* onboarding-presets.ts:
|
|
907
|
+
* - `] as const;` → `];`
|
|
908
|
+
* - `export const FOO: Type<...> = {` → `export const FOO = {`
|
|
909
|
+
* - Interface-style property lines inside a Record<> type block
|
|
910
|
+
*/
|
|
911
|
+
function stripTypeScriptSyntax(src) {
|
|
912
|
+
// Remove `as const` assertions
|
|
913
|
+
src = src.replace(/\]\s+as\s+const\s*;/g, "];");
|
|
914
|
+
|
|
915
|
+
// Remove inline type annotations on const declarations:
|
|
916
|
+
// export const FOO: Record<\n string,\n {\n ...\n }\n> = {
|
|
917
|
+
// Matches `: <type>` between the variable name and ` = `.
|
|
918
|
+
src = src.replace(
|
|
919
|
+
/^(export\s+const\s+\w+)\s*:\s*Record<[\s\S]*?>\s*=/gm,
|
|
920
|
+
"$1 =",
|
|
921
|
+
);
|
|
922
|
+
|
|
923
|
+
return src;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
export function patchAutonomousElizaOnboardingPresets(
|
|
927
|
+
root,
|
|
928
|
+
log = console.log,
|
|
929
|
+
source,
|
|
930
|
+
) {
|
|
931
|
+
const candidates = [
|
|
932
|
+
...findPackageFilePaths(
|
|
933
|
+
root,
|
|
934
|
+
"@elizaos/agent",
|
|
935
|
+
"eliza/agent/src/onboarding-presets.js",
|
|
936
|
+
),
|
|
937
|
+
...findPackageFilePaths(
|
|
938
|
+
root,
|
|
939
|
+
"@elizaos/agent",
|
|
940
|
+
"src/onboarding-presets.js",
|
|
941
|
+
),
|
|
942
|
+
...findPackageFilePaths(
|
|
943
|
+
root,
|
|
944
|
+
"@elizaos/agent",
|
|
945
|
+
"src/onboarding-presets.ts",
|
|
946
|
+
),
|
|
947
|
+
];
|
|
948
|
+
|
|
949
|
+
let patched = false;
|
|
950
|
+
for (const filePath of candidates) {
|
|
951
|
+
const nextSource =
|
|
952
|
+
source ?? loadElizaOnboardingPresetsSource(root, filePath);
|
|
953
|
+
if (!applyAutonomousElizaOnboardingPresetsPatch(filePath, nextSource)) {
|
|
954
|
+
continue;
|
|
955
|
+
}
|
|
956
|
+
patched = true;
|
|
957
|
+
log(
|
|
958
|
+
"[patch-deps] Patched @elizaos/agent eliza/agent/src/onboarding-presets.js: onboarding presets now derive from Eliza.",
|
|
959
|
+
);
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
return patched;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* @elizaos/plugin-vision currently defaults to CAMERA mode and keeps retrying
|
|
967
|
+
* imagesnap/fswebcam/ffmpeg when OS camera permission is denied. In the
|
|
968
|
+
* desktop app this spams logs and can interfere with startup. Patch the
|
|
969
|
+
* published bundle so camera capture defaults to OFF and a permission denial
|
|
970
|
+
* disables the camera loop until the user explicitly re-enables it.
|
|
971
|
+
*/
|
|
972
|
+
export function applyPluginVisionPermissionPatch(filePath) {
|
|
973
|
+
if (!existsSync(filePath)) return false;
|
|
974
|
+
|
|
975
|
+
let source = readFileSync(filePath, "utf8");
|
|
976
|
+
if (
|
|
977
|
+
source.includes(
|
|
978
|
+
"Camera permission not granted; disabling camera capture until permission is granted.",
|
|
979
|
+
)
|
|
980
|
+
) {
|
|
981
|
+
return false;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
const replacements = [
|
|
985
|
+
[
|
|
986
|
+
' visionMode: "CAMERA" /* CAMERA */,',
|
|
987
|
+
' visionMode: "OFF" /* OFF */,',
|
|
988
|
+
],
|
|
989
|
+
[
|
|
990
|
+
" camera = null;\n lastFrame = null;",
|
|
991
|
+
" camera = null;\n cameraPermissionDenied = false;\n lastFrame = null;",
|
|
992
|
+
],
|
|
993
|
+
[
|
|
994
|
+
" async initializeCameraVision() {\n const toolCheck = await this.checkCameraTools();",
|
|
995
|
+
" async initializeCameraVision() {\n this.cameraPermissionDenied = false;\n const toolCheck = await this.checkCameraTools();",
|
|
996
|
+
],
|
|
997
|
+
[
|
|
998
|
+
" startFrameProcessing() {\n if (this.frameProcessingInterval) {\n return;\n }",
|
|
999
|
+
" startFrameProcessing() {\n if (this.frameProcessingInterval || this.cameraPermissionDenied) {\n return;\n }",
|
|
1000
|
+
],
|
|
1001
|
+
[
|
|
1002
|
+
" if (!this.isProcessing && this.camera) {",
|
|
1003
|
+
" if (!this.isProcessing && this.camera && !this.cameraPermissionDenied) {",
|
|
1004
|
+
],
|
|
1005
|
+
[
|
|
1006
|
+
" if (!this.camera) {\n return;\n }",
|
|
1007
|
+
" if (!this.camera || this.cameraPermissionDenied) {\n return;\n }",
|
|
1008
|
+
],
|
|
1009
|
+
[
|
|
1010
|
+
` } catch (error) {
|
|
1011
|
+
logger14.error("[VisionService] Error capturing frame:", error);
|
|
1012
|
+
}`,
|
|
1013
|
+
` } catch (error) {
|
|
1014
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
1015
|
+
if (/camera access not granted|permission denied|not authorized|not permitted|device access denied/i.test(errorMessage)) {
|
|
1016
|
+
if (!this.cameraPermissionDenied) {
|
|
1017
|
+
logger14.warn("[VisionService] Camera permission not granted; disabling camera capture until permission is granted.");
|
|
1018
|
+
}
|
|
1019
|
+
this.cameraPermissionDenied = true;
|
|
1020
|
+
this.camera = null;
|
|
1021
|
+
if (this.frameProcessingInterval) {
|
|
1022
|
+
clearInterval(this.frameProcessingInterval);
|
|
1023
|
+
this.frameProcessingInterval = null;
|
|
1024
|
+
}
|
|
1025
|
+
if (this.visionConfig.visionMode === "BOTH" /* BOTH */) {
|
|
1026
|
+
this.visionConfig.visionMode = "SCREEN" /* SCREEN */;
|
|
1027
|
+
} else if (this.visionConfig.visionMode === "CAMERA" /* CAMERA */) {
|
|
1028
|
+
this.visionConfig.visionMode = "OFF" /* OFF */;
|
|
1029
|
+
}
|
|
1030
|
+
return;
|
|
1031
|
+
}
|
|
1032
|
+
logger14.error("[VisionService] Error capturing frame:", error);
|
|
1033
|
+
}`,
|
|
1034
|
+
],
|
|
1035
|
+
[
|
|
1036
|
+
` } catch (error) {
|
|
1037
|
+
logger14.error("[VisionService] Failed to capture image:", error);
|
|
1038
|
+
return null;
|
|
1039
|
+
}`,
|
|
1040
|
+
` } catch (error) {
|
|
1041
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
1042
|
+
if (/camera access not granted|permission denied|not authorized|not permitted|device access denied/i.test(errorMessage)) {
|
|
1043
|
+
logger14.warn("[VisionService] Camera permission not granted; skipping image capture.");
|
|
1044
|
+
this.cameraPermissionDenied = true;
|
|
1045
|
+
this.camera = null;
|
|
1046
|
+
return null;
|
|
1047
|
+
}
|
|
1048
|
+
logger14.error("[VisionService] Failed to capture image:", error);
|
|
1049
|
+
return null;
|
|
1050
|
+
}`,
|
|
1051
|
+
],
|
|
1052
|
+
];
|
|
1053
|
+
|
|
1054
|
+
for (const [searchValue, replaceValue] of replacements) {
|
|
1055
|
+
if (!source.includes(searchValue)) return false;
|
|
1056
|
+
source = source.replace(searchValue, replaceValue);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
writeFileSync(filePath, source, "utf8");
|
|
1060
|
+
return true;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
export function patchPluginVisionPermissionHandling(root, log = console.log) {
|
|
1064
|
+
const candidates = findPackageFilePaths(
|
|
1065
|
+
root,
|
|
1066
|
+
"@elizaos/plugin-vision",
|
|
1067
|
+
"dist/index.js",
|
|
1068
|
+
);
|
|
1069
|
+
|
|
1070
|
+
let patched = false;
|
|
1071
|
+
for (const filePath of candidates) {
|
|
1072
|
+
if (!applyPluginVisionPermissionPatch(filePath)) continue;
|
|
1073
|
+
patched = true;
|
|
1074
|
+
log(
|
|
1075
|
+
`[patch-deps] Patched @elizaos/plugin-vision camera permission handling: ${filePath}`,
|
|
1076
|
+
);
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
return patched;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* proper-lockfile expects require("signal-exit") to return a callable export
|
|
1084
|
+
* (v3 behavior). In v4 the package exports an object with { onExit }. Patch the
|
|
1085
|
+
* require site so the dependency works with either version.
|
|
1086
|
+
*/
|
|
1087
|
+
export function applyProperLockfileSignalExitCompat(filePath) {
|
|
1088
|
+
if (!existsSync(filePath)) return false;
|
|
1089
|
+
|
|
1090
|
+
const compatSource = readFileSync(filePath, "utf8");
|
|
1091
|
+
const patchedLine =
|
|
1092
|
+
"const signalExit = require('signal-exit');\nconst onExit = typeof signalExit === 'function' ? signalExit : signalExit.onExit;";
|
|
1093
|
+
if (compatSource.includes(patchedLine)) return false;
|
|
1094
|
+
|
|
1095
|
+
const originalLine = "const onExit = require('signal-exit');";
|
|
1096
|
+
if (!compatSource.includes(originalLine)) return false;
|
|
1097
|
+
|
|
1098
|
+
writeFileSync(
|
|
1099
|
+
filePath,
|
|
1100
|
+
compatSource.replace(originalLine, patchedLine),
|
|
1101
|
+
"utf8",
|
|
1102
|
+
);
|
|
1103
|
+
return true;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* Patch all copies of proper-lockfile so signal-exit v3/v4 both work.
|
|
1108
|
+
*/
|
|
1109
|
+
export function patchProperLockfileSignalExitCompat(root, log = console.log) {
|
|
1110
|
+
const candidates = findPackageFilePaths(
|
|
1111
|
+
root,
|
|
1112
|
+
"proper-lockfile",
|
|
1113
|
+
"lib/lockfile.js",
|
|
1114
|
+
);
|
|
1115
|
+
let patched = false;
|
|
1116
|
+
for (const filePath of candidates) {
|
|
1117
|
+
if (applyProperLockfileSignalExitCompat(filePath)) {
|
|
1118
|
+
patched = true;
|
|
1119
|
+
log(
|
|
1120
|
+
"[patch-deps] Patched proper-lockfile: signal-exit v3/v4 compatibility applied.",
|
|
1121
|
+
);
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
return patched;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
const PTY_MANAGER_CURSOR_POSITION_WRITE =
|
|
1128
|
+
' this.ptyProcess.write("\\x1B[1;1R");';
|
|
1129
|
+
const PTY_MANAGER_ESM_CREATE_REQUIRE_MARKER =
|
|
1130
|
+
"const __require = createRequire(import.meta.url);";
|
|
1131
|
+
const PTY_MANAGER_ESM_DIRNAME_MARKER =
|
|
1132
|
+
"const __dirname = dirname(fileURLToPath(import.meta.url));";
|
|
1133
|
+
const CODEX_TRUST_PROMPT_PATTERN_FROM =
|
|
1134
|
+
"do.?you.?trust.?the.?contents|trust.?this.?directory|yes,?.?continue|prompt.?injection";
|
|
1135
|
+
const CODEX_TRUST_PROMPT_PATTERN_TO =
|
|
1136
|
+
"do.?you.?trust.?the.?contents|trust.?this.?directory|allow.?codex.?to.?work.?in.?this.?folder|without.?asking.?for.?approval|yes,?.?continue|prompt.?injection";
|
|
1137
|
+
const CODEX_BLOCKING_PROMPT_CONDITION_FROM =
|
|
1138
|
+
"/would.?you.?like.?to.?run.?the.?following.?command/i.test(stripped) || /do.?you.?want.?to.?approve.?access/i.test(stripped) || /would.?you.?like.?to.?make.?the.?following.?edits/i.test(stripped) || /press.?enter.?to.?confirm/i.test(stripped) && /esc.?to.?cancel/i.test(stripped)";
|
|
1139
|
+
const CODEX_BLOCKING_PROMPT_CONDITION_TO =
|
|
1140
|
+
"/would.?you.?like.?to.?run.?the.?following.?command/i.test(stripped) || /do.?you.?want.?to.?approve.?access/i.test(stripped) || /would.?you.?like.?to.?make.?the.?following.?edits/i.test(stripped) || /allow.?codex.?to.?work.?in.?this.?folder/i.test(stripped) || /without.?asking.?for.?approval/i.test(stripped) || /press.?enter.?to.?confirm/i.test(stripped) && /esc.?to.?cancel/i.test(stripped)";
|
|
1141
|
+
const PTY_MANAGER_ESM_REQUIRE_PROLOGUE = `var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
1142
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
1143
|
+
}) : x)(function(x) {
|
|
1144
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
1145
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
1146
|
+
});
|
|
1147
|
+
`;
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* pty-manager's published ESM bundle references __dirname but never defines it.
|
|
1151
|
+
* That only blows up once Node executes spawn-time code paths, so patch it
|
|
1152
|
+
* proactively to preserve Node + Bun parity.
|
|
1153
|
+
*/
|
|
1154
|
+
export function applyPtyManagerEsmDirnameCompat(filePath) {
|
|
1155
|
+
if (!existsSync(filePath)) return false;
|
|
1156
|
+
|
|
1157
|
+
const compatSource = readFileSync(filePath, "utf8");
|
|
1158
|
+
if (
|
|
1159
|
+
compatSource.includes(PTY_MANAGER_ESM_DIRNAME_MARKER) &&
|
|
1160
|
+
compatSource.includes(PTY_MANAGER_ESM_CREATE_REQUIRE_MARKER)
|
|
1161
|
+
) {
|
|
1162
|
+
return false;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
const pathImportPattern =
|
|
1166
|
+
/import\s+\{[^}]*\bdirname\b[^}]*\}\s+from\s+"path";/;
|
|
1167
|
+
const moduleImport = 'import { createRequire } from "module";';
|
|
1168
|
+
const childProcessImportPattern =
|
|
1169
|
+
/import\s+\{[^}]*\bexecSync\b[^}]*\}\s+from\s+"child_process";/;
|
|
1170
|
+
if (
|
|
1171
|
+
!pathImportPattern.test(compatSource) ||
|
|
1172
|
+
!childProcessImportPattern.test(compatSource)
|
|
1173
|
+
) {
|
|
1174
|
+
return false;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
let next = compatSource;
|
|
1178
|
+
if (next.includes(PTY_MANAGER_ESM_REQUIRE_PROLOGUE)) {
|
|
1179
|
+
next = next.replace(
|
|
1180
|
+
PTY_MANAGER_ESM_REQUIRE_PROLOGUE,
|
|
1181
|
+
`${moduleImport}\n${PTY_MANAGER_ESM_CREATE_REQUIRE_MARKER}\n`,
|
|
1182
|
+
);
|
|
1183
|
+
} else if (!next.includes(PTY_MANAGER_ESM_CREATE_REQUIRE_MARKER)) {
|
|
1184
|
+
next = `${moduleImport}\n${PTY_MANAGER_ESM_CREATE_REQUIRE_MARKER}\n${next}`;
|
|
1185
|
+
}
|
|
1186
|
+
if (!next.includes('import { fileURLToPath } from "url";')) {
|
|
1187
|
+
next = next.replace(
|
|
1188
|
+
pathImportPattern,
|
|
1189
|
+
(match) => `${match}\nimport { fileURLToPath } from "url";`,
|
|
1190
|
+
);
|
|
1191
|
+
}
|
|
1192
|
+
if (!next.includes(PTY_MANAGER_ESM_DIRNAME_MARKER)) {
|
|
1193
|
+
next = next.replace(
|
|
1194
|
+
childProcessImportPattern,
|
|
1195
|
+
(match) => `${match}\n${PTY_MANAGER_ESM_DIRNAME_MARKER}`,
|
|
1196
|
+
);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
if (next === compatSource) return false;
|
|
1200
|
+
|
|
1201
|
+
writeFileSync(filePath, next, "utf8");
|
|
1202
|
+
return true;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* Patch all installed pty-manager ESM bundles so Node can execute spawn-time
|
|
1207
|
+
* code paths without crashing on an undefined __dirname reference.
|
|
1208
|
+
*/
|
|
1209
|
+
export function patchPtyManagerEsmDirnameCompat(root, log = console.log) {
|
|
1210
|
+
const searchRoots = dedupeRealPaths(
|
|
1211
|
+
[root, resolve(root, "eliza")].filter((candidate) => existsSync(candidate)),
|
|
1212
|
+
);
|
|
1213
|
+
const candidates = dedupeRealPaths(
|
|
1214
|
+
searchRoots.flatMap((searchRoot) =>
|
|
1215
|
+
findPackageFilePaths(searchRoot, "pty-manager", "dist/index.mjs"),
|
|
1216
|
+
),
|
|
1217
|
+
);
|
|
1218
|
+
let patched = false;
|
|
1219
|
+
for (const filePath of candidates) {
|
|
1220
|
+
if (applyPtyManagerEsmDirnameCompat(filePath)) {
|
|
1221
|
+
patched = true;
|
|
1222
|
+
log(
|
|
1223
|
+
`[patch-deps] Patched pty-manager ESM __dirname compatibility: ${filePath}`,
|
|
1224
|
+
);
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
return patched;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Codex asks the terminal emulator for cursor position via ESC[6n during TUI
|
|
1232
|
+
* bootstrap. node-pty exposes a PTY, not a terminal emulator, so nothing
|
|
1233
|
+
* answers unless we synthesize a CPR response on the host side.
|
|
1234
|
+
*/
|
|
1235
|
+
export function applyPtyManagerCursorPositionCompat(filePath) {
|
|
1236
|
+
if (!existsSync(filePath)) return false;
|
|
1237
|
+
|
|
1238
|
+
const compatSource = readFileSync(filePath, "utf8");
|
|
1239
|
+
if (compatSource.includes(PTY_MANAGER_CURSOR_POSITION_WRITE)) return false;
|
|
1240
|
+
|
|
1241
|
+
const outputBufferLine = " this.outputBuffer += data;";
|
|
1242
|
+
const emitOutputLine = ' this.emit("output", data);';
|
|
1243
|
+
const scheduleGuard = " if (!this._processScheduled) {";
|
|
1244
|
+
const processOutputDoc =
|
|
1245
|
+
" /**\n * Process the accumulated output buffer.\n";
|
|
1246
|
+
|
|
1247
|
+
if (
|
|
1248
|
+
!compatSource.includes(outputBufferLine) ||
|
|
1249
|
+
!compatSource.includes(emitOutputLine) ||
|
|
1250
|
+
!compatSource.includes(scheduleGuard) ||
|
|
1251
|
+
!compatSource.includes(processOutputDoc)
|
|
1252
|
+
) {
|
|
1253
|
+
return false;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
let next = compatSource.replace(
|
|
1257
|
+
outputBufferLine,
|
|
1258
|
+
" const sanitizedData = this.respondToCursorPositionRequests(data);\n this.outputBuffer += sanitizedData;",
|
|
1259
|
+
);
|
|
1260
|
+
next = next.replace(
|
|
1261
|
+
emitOutputLine,
|
|
1262
|
+
' if (sanitizedData.length > 0) {\n this.emit("output", sanitizedData);\n }',
|
|
1263
|
+
);
|
|
1264
|
+
next = next.replace(
|
|
1265
|
+
scheduleGuard,
|
|
1266
|
+
" if (sanitizedData.length > 0 && !this._processScheduled) {",
|
|
1267
|
+
);
|
|
1268
|
+
next = next.replace(
|
|
1269
|
+
processOutputDoc,
|
|
1270
|
+
[
|
|
1271
|
+
" respondToCursorPositionRequests(data) {",
|
|
1272
|
+
' if (!this.ptyProcess || !data.includes("\\x1B[6n")) {',
|
|
1273
|
+
" return data;",
|
|
1274
|
+
" }",
|
|
1275
|
+
" let requestCount = 0;",
|
|
1276
|
+
" const sanitizedData = data.replace(/\\x1B\\[6n/g, () => {",
|
|
1277
|
+
" requestCount += 1;",
|
|
1278
|
+
' return "";',
|
|
1279
|
+
" });",
|
|
1280
|
+
" for (let i = 0; i < requestCount; i += 1) {",
|
|
1281
|
+
PTY_MANAGER_CURSOR_POSITION_WRITE,
|
|
1282
|
+
" }",
|
|
1283
|
+
" if (requestCount > 0) {",
|
|
1284
|
+
" this.logger.debug(",
|
|
1285
|
+
" { sessionId: this.id, requestCount },",
|
|
1286
|
+
' "Responded to cursor position request",',
|
|
1287
|
+
" );",
|
|
1288
|
+
" }",
|
|
1289
|
+
" return sanitizedData;",
|
|
1290
|
+
" }",
|
|
1291
|
+
"",
|
|
1292
|
+
processOutputDoc.trimEnd(),
|
|
1293
|
+
].join("\n"),
|
|
1294
|
+
);
|
|
1295
|
+
|
|
1296
|
+
if (next === compatSource) return false;
|
|
1297
|
+
|
|
1298
|
+
writeFileSync(filePath, next, "utf8");
|
|
1299
|
+
return true;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* Patch all installed pty-manager copies so CPR requests get terminal-style
|
|
1304
|
+
* responses when coding-agent CLIs run under node-pty.
|
|
1305
|
+
*/
|
|
1306
|
+
export function patchPtyManagerCursorPositionCompat(root, log = console.log) {
|
|
1307
|
+
const searchRoots = dedupeRealPaths(
|
|
1308
|
+
[root, resolve(root, "eliza")].filter((candidate) => existsSync(candidate)),
|
|
1309
|
+
);
|
|
1310
|
+
const candidates = dedupeRealPaths(
|
|
1311
|
+
searchRoots.flatMap((searchRoot) => [
|
|
1312
|
+
...findPackageFilePaths(searchRoot, "pty-manager", "dist/index.js"),
|
|
1313
|
+
...findPackageFilePaths(searchRoot, "pty-manager", "dist/index.mjs"),
|
|
1314
|
+
...findPackageFilePaths(searchRoot, "pty-manager", "dist/pty-worker.js"),
|
|
1315
|
+
]),
|
|
1316
|
+
);
|
|
1317
|
+
let patched = false;
|
|
1318
|
+
for (const filePath of candidates) {
|
|
1319
|
+
if (applyPtyManagerCursorPositionCompat(filePath)) {
|
|
1320
|
+
patched = true;
|
|
1321
|
+
log(
|
|
1322
|
+
`[patch-deps] Patched pty-manager cursor position compatibility: ${filePath}`,
|
|
1323
|
+
);
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
return patched;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Codex added a repo trust prompt that offers "allow Codex to work in this
|
|
1331
|
+
* folder without asking for approval". Older adapter builds only recognize the
|
|
1332
|
+
* legacy trust-directory copy, so sessions block before the initial task runs.
|
|
1333
|
+
*/
|
|
1334
|
+
export function applyCodexFolderApprovalPromptCompat(filePath) {
|
|
1335
|
+
if (!existsSync(filePath)) return false;
|
|
1336
|
+
|
|
1337
|
+
const compatSource = readFileSync(filePath, "utf8");
|
|
1338
|
+
if (compatSource.includes("allow.?codex.?to.?work.?in.?this.?folder")) {
|
|
1339
|
+
return false;
|
|
1340
|
+
}
|
|
1341
|
+
if (
|
|
1342
|
+
!compatSource.includes(CODEX_TRUST_PROMPT_PATTERN_FROM) ||
|
|
1343
|
+
!compatSource.includes(CODEX_BLOCKING_PROMPT_CONDITION_FROM)
|
|
1344
|
+
) {
|
|
1345
|
+
return false;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
const next = compatSource
|
|
1349
|
+
.replace(CODEX_TRUST_PROMPT_PATTERN_FROM, CODEX_TRUST_PROMPT_PATTERN_TO)
|
|
1350
|
+
.replace(
|
|
1351
|
+
CODEX_BLOCKING_PROMPT_CONDITION_FROM,
|
|
1352
|
+
CODEX_BLOCKING_PROMPT_CONDITION_TO,
|
|
1353
|
+
);
|
|
1354
|
+
|
|
1355
|
+
if (next === compatSource) return false;
|
|
1356
|
+
|
|
1357
|
+
writeFileSync(filePath, next, "utf8");
|
|
1358
|
+
return true;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* Patch installed coding-agent-adapters bundles so Codex auto-accepts the
|
|
1363
|
+
* current repo trust prompt in PTY-driven sessions.
|
|
1364
|
+
*/
|
|
1365
|
+
export function patchCodexFolderApprovalPromptCompat(root, log = console.log) {
|
|
1366
|
+
const candidates = [
|
|
1367
|
+
...findPackageFilePaths(root, "coding-agent-adapters", "dist/index.js"),
|
|
1368
|
+
...findPackageFilePaths(root, "coding-agent-adapters", "dist/index.cjs"),
|
|
1369
|
+
];
|
|
1370
|
+
let patched = false;
|
|
1371
|
+
for (const filePath of candidates) {
|
|
1372
|
+
if (applyCodexFolderApprovalPromptCompat(filePath)) {
|
|
1373
|
+
patched = true;
|
|
1374
|
+
log(
|
|
1375
|
+
`[patch-deps] Patched coding-agent-adapters Codex approval prompt compatibility: ${filePath}`,
|
|
1376
|
+
);
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
return patched;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* Electrobun's CLI download script passes Windows backslash paths to `tar -xzf`.
|
|
1384
|
+
* GNU tar (Git Bash / MSYS2) interprets `A:\...` as a remote host prefix, so
|
|
1385
|
+
* extraction fails. Replace the absolute tarballPath with a relative filename
|
|
1386
|
+
* since cwd is already the cache directory.
|
|
1387
|
+
*
|
|
1388
|
+
* findPackageFilePaths covers both root node_modules/ and Bun's hoisted
|
|
1389
|
+
* .bun/electrobun@* / cache. The workspace-aware createRequire resolution in
|
|
1390
|
+
* build-patched-electrobun-cli.mjs resolves from a specific workspace, but here
|
|
1391
|
+
* we want to patch every copy found — the simpler lookup is appropriate.
|
|
1392
|
+
*/
|
|
1393
|
+
export function patchElectrobunWindowsTar(root, log = console.log) {
|
|
1394
|
+
const tarballPathPlaceholder = "$" + "{tarballPath}";
|
|
1395
|
+
const platformPlaceholder = "$" + "{platform}";
|
|
1396
|
+
const archPlaceholder = "$" + "{arch}";
|
|
1397
|
+
const candidates = findPackageFilePaths(
|
|
1398
|
+
root,
|
|
1399
|
+
"electrobun",
|
|
1400
|
+
"bin/electrobun.cjs",
|
|
1401
|
+
);
|
|
1402
|
+
let patched = false;
|
|
1403
|
+
const needle = `execSync(\`tar -xzf "${tarballPathPlaceholder}"\`, { cwd: cacheDir, stdio: 'pipe' });`;
|
|
1404
|
+
const replacement = `execSync(\`tar -xzf electrobun-${platformPlaceholder}-${archPlaceholder}.tar.gz\`, { cwd: cacheDir, stdio: 'pipe' });`;
|
|
1405
|
+
for (const filePath of candidates) {
|
|
1406
|
+
if (!existsSync(filePath)) continue;
|
|
1407
|
+
const source = readFileSync(filePath, "utf8");
|
|
1408
|
+
if (!source.includes(needle)) continue;
|
|
1409
|
+
writeFileSync(filePath, source.replace(needle, replacement), "utf8");
|
|
1410
|
+
patched = true;
|
|
1411
|
+
log(
|
|
1412
|
+
"[patch-deps] Patched electrobun: tar extraction uses forward slashes on Windows.",
|
|
1413
|
+
);
|
|
1414
|
+
}
|
|
1415
|
+
return patched;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
export function patchAutonomousTypeError(root, log = console.log) {
|
|
1419
|
+
const candidates = findPackageFilePaths(
|
|
1420
|
+
root,
|
|
1421
|
+
"@elizaos/agent",
|
|
1422
|
+
"src/api/server.ts",
|
|
1423
|
+
);
|
|
1424
|
+
let patched = false;
|
|
1425
|
+
for (const filePath of candidates) {
|
|
1426
|
+
if (!existsSync(filePath)) continue;
|
|
1427
|
+
let source = readFileSync(filePath, "utf8");
|
|
1428
|
+
// Skip if already fixed by widening through the generated API surface.
|
|
1429
|
+
if (
|
|
1430
|
+
source.includes(
|
|
1431
|
+
"as Partial<SubscriptionAuthApi> as SubscriptionAuthApi",
|
|
1432
|
+
)
|
|
1433
|
+
)
|
|
1434
|
+
continue;
|
|
1435
|
+
if (source.includes("as SubscriptionAuthApi")) {
|
|
1436
|
+
source = source.replaceAll(
|
|
1437
|
+
"as SubscriptionAuthApi",
|
|
1438
|
+
"as Partial<SubscriptionAuthApi> as SubscriptionAuthApi",
|
|
1439
|
+
);
|
|
1440
|
+
writeFileSync(filePath, source, "utf8");
|
|
1441
|
+
patched = true;
|
|
1442
|
+
log("[patch-deps] Patched @elizaos/agent type error in server.ts");
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
return patched;
|
|
1446
|
+
}
|