@elizaos/app-core 2.0.3-beta.2 → 2.0.3-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/agent-bridge.d.ts +5 -5
  2. package/api/auth/audit.d.ts +1 -1
  3. package/api/auth/auth-context.d.ts +1 -1
  4. package/api/auth/bootstrap-token.d.ts +1 -1
  5. package/api/auth/sessions.d.ts +1 -1
  6. package/api/auth-bootstrap-routes.d.ts +1 -1
  7. package/api/auth-pairing-routes.d.ts +1 -1
  8. package/api/auth-pairing-routes.d.ts.map +1 -1
  9. package/api/auth-pairing-routes.js +2 -3
  10. package/api/auth-session-routes.d.ts +2 -2
  11. package/api/auth.d.ts +1 -1
  12. package/api/automations-compat-routes.d.ts +1 -1
  13. package/api/background-tasks-routes.d.ts +1 -1
  14. package/api/catalog-routes.d.ts +1 -1
  15. package/api/cloud-voice-routes.d.ts +1 -1
  16. package/api/compat-route-shared.d.ts +12 -5
  17. package/api/compat-route-shared.d.ts.map +1 -1
  18. package/api/compat-route-shared.js +22 -187
  19. package/api/database-rows-compat-routes.d.ts +1 -1
  20. package/api/dev-compat-routes.d.ts +1 -1
  21. package/api/dev-route-catalog.d.ts.map +1 -1
  22. package/api/dev-route-catalog.js +20 -0
  23. package/api/drop-status-compat-route.d.ts +3 -0
  24. package/api/drop-status-compat-route.d.ts.map +1 -0
  25. package/api/drop-status-compat-route.js +12 -0
  26. package/api/first-run-routes.d.ts +1 -1
  27. package/api/internal-routes.d.ts +1 -1
  28. package/api/runtime-mode-routes.d.ts +1 -1
  29. package/api/secrets-manager-routes.d.ts.map +1 -1
  30. package/api/sensitive-request-routes.d.ts +2 -2
  31. package/api/server-config-filter.d.ts.map +1 -1
  32. package/api/server-config-filter.js +0 -1
  33. package/api/server-first-run-helpers.d.ts.map +1 -1
  34. package/api/server-first-run-helpers.js +0 -3
  35. package/api/server.d.ts +8 -8
  36. package/api/server.d.ts.map +1 -1
  37. package/api/server.js +13 -59
  38. package/api/training-benchmarks.d.ts +1 -1
  39. package/api/training-benchmarks.d.ts.map +1 -1
  40. package/api/training-benchmarks.js +31 -9
  41. package/api/workbench-compat-routes.d.ts +1 -1
  42. package/benchmark/server-utils.d.ts +2 -2
  43. package/browser.d.ts +4 -4
  44. package/cli/plugins-cli.d.ts.map +1 -1
  45. package/cli/plugins-cli.js +5 -0
  46. package/cli/program/register.auth.d.ts +27 -1
  47. package/cli/program/register.auth.d.ts.map +1 -1
  48. package/cli/program/register.auth.js +187 -0
  49. package/cli/program/register.dashboard.d.ts.map +1 -1
  50. package/cli/program/register.dashboard.js +11 -1
  51. package/cli/program.d.ts +1 -1
  52. package/first-run/first-run-config.d.ts +1 -1
  53. package/index.d.ts +46 -47
  54. package/index.d.ts.map +1 -1
  55. package/index.js +3 -7
  56. package/package.json +42 -36
  57. package/packaging/PUBLISHING_GUIDE.md +20 -20
  58. package/platform/elizaos-agent-browser-stub.d.ts +0 -1
  59. package/platform/elizaos-agent-browser-stub.d.ts.map +1 -1
  60. package/platform/elizaos-agent-browser-stub.js +0 -1
  61. package/platform/ios-runtime-bridge.d.ts.map +1 -1
  62. package/platform/ios-runtime-bridge.js +0 -1
  63. package/platform/native-plugin-entrypoints.d.ts +2 -2
  64. package/platforms/android/app/build.gradle +30 -7
  65. package/platforms/android/app/src/main/elizavoice-jni/elizavoice-jni.cpp +179 -35
  66. package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaAgentService.java +60 -32
  67. package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaBionicInferenceServer.java +405 -65
  68. package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaVoiceNative.java +35 -0
  69. package/platforms/android/app/src/main/java/ai/elizaos/app/ElizaVoicePlugin.java +13 -6
  70. package/platforms/android/app/src/main/res/drawable/splash.png +0 -0
  71. package/platforms/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
  72. package/platforms/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
  73. package/platforms/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
  74. package/platforms/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
  75. package/platforms/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
  76. package/platforms/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
  77. package/platforms/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
  78. package/platforms/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
  79. package/platforms/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
  80. package/platforms/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
  81. package/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  82. package/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
  83. package/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png +0 -0
  84. package/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  85. package/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  86. package/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
  87. package/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png +0 -0
  88. package/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  89. package/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  90. package/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
  91. package/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png +0 -0
  92. package/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  93. package/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  94. package/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
  95. package/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png +0 -0
  96. package/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  97. package/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  98. package/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
  99. package/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png +0 -0
  100. package/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  101. package/platforms/android/app/src/main/res/values/colors.xml +5 -1
  102. package/platforms/android/app/src/main/res/values/ic_launcher_background.xml +1 -1
  103. package/platforms/android/app/src/main/res/values/styles.xml +4 -1
  104. package/platforms/electrobun/electrobun.config.ts +0 -1
  105. package/platforms/electrobun/native/macos/window-effects.mm +4 -0
  106. package/platforms/electrobun/package.json +11 -9
  107. package/platforms/electrobun/remotes/local-model/src/bun/eliza1-catalog.ts +1 -1
  108. package/platforms/electrobun/remotes/runtime/src/dev/phase2-smoke.ts +10 -5
  109. package/platforms/electrobun/remotes/runtime/src/dev/phase3-smoke.ts +11 -15
  110. package/platforms/electrobun/src/application-menu.ts +0 -7
  111. package/platforms/electrobun/src/desktop-http-request.test.ts +30 -1
  112. package/platforms/electrobun/src/desktop-http-request.ts +14 -2
  113. package/platforms/electrobun/src/desktop-test-bridge-server.ts +28 -0
  114. package/platforms/electrobun/src/fatal-shutdown.test.ts +3 -7
  115. package/platforms/electrobun/src/index.ts +64 -13
  116. package/platforms/electrobun/src/lifecycle/api-base-owner.test.ts +83 -0
  117. package/platforms/electrobun/src/lifecycle/api-base-owner.ts +37 -16
  118. package/platforms/electrobun/src/native/agent.ts +28 -17
  119. package/platforms/electrobun/src/native/credentials.ts +6 -1
  120. package/platforms/electrobun/src/native/desktop-window.test.ts +142 -26
  121. package/platforms/electrobun/src/native/desktop.ts +8 -4
  122. package/platforms/electrobun/src/native/index.ts +6 -0
  123. package/platforms/electrobun/src/native/remote-plugin-host.ts +18 -8
  124. package/platforms/electrobun/src/preload.js +1 -1
  125. package/platforms/electrobun/src/voice/voice-live-validation.test.ts +10 -5
  126. package/platforms/electrobun/src/voice/voice-runtime-adapter.ts +3 -2
  127. package/platforms/electrobun/src/voice/voice-service.test.ts +26 -0
  128. package/platforms/electrobun/src/voice/voice-service.ts +57 -17
  129. package/platforms/electrobun/tsconfig.json +17 -1
  130. package/platforms/ios/App/App/Base.lproj/LaunchScreen.storyboard +4 -6
  131. package/registry/index.d.ts +1 -6
  132. package/registry/index.d.ts.map +1 -1
  133. package/registry/index.js +9 -101
  134. package/runtime/android-avf-microdroid-bridge.d.ts +1 -1
  135. package/runtime/bundled-fused-lib.d.ts +36 -0
  136. package/runtime/bundled-fused-lib.d.ts.map +1 -0
  137. package/runtime/bundled-fused-lib.js +77 -0
  138. package/runtime/channel-plugin-map.d.ts +1 -5
  139. package/runtime/channel-plugin-map.d.ts.map +1 -1
  140. package/runtime/channel-plugin-map.js +11 -31
  141. package/runtime/desktop/index.d.ts +5 -5
  142. package/runtime/dev-server.js +11 -2
  143. package/runtime/eliza.d.ts.map +1 -1
  144. package/runtime/eliza.js +18 -8
  145. package/runtime/mode/route-mode-guard.d.ts +1 -1
  146. package/runtime/mode/route-mode-matrix.d.ts +1 -1
  147. package/runtime/voice-warmup.d.ts +4 -19
  148. package/runtime/voice-warmup.d.ts.map +1 -1
  149. package/runtime/voice-warmup.js +4 -14
  150. package/scripts/aosp/README.md +10 -1
  151. package/scripts/aosp/compile-libllama-paths.mjs +110 -0
  152. package/scripts/aosp/compile-libllama-zig-pin.test.mjs +147 -0
  153. package/scripts/aosp/compile-libllama.mjs +377 -81
  154. package/scripts/aosp/compile-libllama.test.mjs +133 -0
  155. package/scripts/aosp/compile-shim.mjs +21 -1
  156. package/scripts/aosp/deploy-pixel.mjs +1 -1
  157. package/scripts/aosp/stage-default-models.mjs +24 -31
  158. package/scripts/aosp/stage-default-models.test.mjs +23 -0
  159. package/scripts/assert-required-bundled-packages.test.ts +22 -1
  160. package/scripts/build-helpers/verify-fused-symbols.mjs +33 -0
  161. package/scripts/build-helpers/verify-fused-symbols.test.mjs +0 -0
  162. package/scripts/build-image.sh +1 -3
  163. package/scripts/build-llama-cpp-mtp.mjs +17 -16
  164. package/scripts/check-i18n.mjs +0 -1
  165. package/scripts/copy-runtime-node-modules.ts +147 -0
  166. package/scripts/desktop-build.mjs +317 -4
  167. package/scripts/docker-ci-smoke.sh +33 -8
  168. package/scripts/ensure-type-package-aliases.mjs +1 -1
  169. package/scripts/ios-xcframework/run-physical-device-smoke.mjs +1 -1
  170. package/scripts/lib/agent-source-watcher.mjs +0 -1
  171. package/scripts/lib/artifact-staleness.d.mts +33 -0
  172. package/scripts/lib/artifact-staleness.mjs +122 -0
  173. package/scripts/lib/artifact-staleness.test.mts +98 -0
  174. package/scripts/lib/duet-bridge.mjs +1 -1
  175. package/scripts/lib/ios-plist-url-scheme.mjs +80 -0
  176. package/scripts/lib/mobile-build-decisions.mjs +97 -0
  177. package/scripts/lib/renderer-build-manifest.d.mts +65 -0
  178. package/scripts/lib/renderer-build-manifest.mjs +257 -0
  179. package/scripts/lib/renderer-build-manifest.test.mts +277 -0
  180. package/scripts/lib/stage-android-agent.mjs +13 -4
  181. package/scripts/lib/verify-ondevice-artifact.d.mts +16 -0
  182. package/scripts/lib/verify-ondevice-artifact.mjs +61 -0
  183. package/scripts/lib/verify-ondevice-artifact.test.mts +98 -0
  184. package/scripts/lib/websocket-pending-queue.ts +92 -0
  185. package/scripts/link-docker-local-app-packages.mjs +6 -0
  186. package/scripts/playwright-ui-live-stack.ts +430 -144
  187. package/scripts/playwright-ui-smoke-api-stub.mjs +160 -168
  188. package/scripts/run-local-plugin-live-smoke.mjs +1 -6
  189. package/scripts/run-mobile-build-brand-separation.test.mts +33 -0
  190. package/scripts/run-mobile-build-ios-engine-gate.test.mjs +85 -0
  191. package/scripts/run-mobile-build-mtp-staleness.test.mts +198 -0
  192. package/scripts/run-mobile-build.mjs +408 -86
  193. package/scripts/serve-real-local-agent.ts +72 -0
  194. package/scripts/stage-desktop-fused-lib.mjs +43 -14
  195. package/scripts/verify-ondevice-artifact.mjs +111 -0
  196. package/scripts/voice-attribution-smoke.ts +144 -38
  197. package/scripts/voice-duet.mjs +6 -6
  198. package/scripts/voice-e2e-hardware.ts +22 -16
  199. package/scripts/voice-interactive.mjs +16 -45
  200. package/security/agent-vault-id.d.ts +1 -1
  201. package/security/platform-secure-store-node.d.ts +1 -1
  202. package/services/ambient-audio/consent.d.ts +1 -1
  203. package/services/ambient-audio/index.d.ts +6 -6
  204. package/services/ambient-audio/replay-buffer.d.ts +1 -1
  205. package/services/ambient-audio/response-gate.d.ts +1 -1
  206. package/services/ambient-audio/service.d.ts +3 -3
  207. package/services/connector-target-catalog.d.ts +1 -1
  208. package/services/sensitive-requests/index.d.ts +6 -6
  209. package/services/steward-sidecar/wallet-setup.d.ts +1 -1
  210. package/services/steward-sidecar.d.ts +3 -3
  211. package/services/tunnel-to-mobile/index.d.ts +1 -1
  212. package/services/vault-bootstrap.d.ts.map +1 -1
  213. package/services/vault-bootstrap.js +14 -10
  214. package/services/voice-profiles/diarization-pipeline.d.ts +1 -1
  215. package/services/voice-profiles/index.d.ts +11 -11
  216. package/services/voice-profiles/owner-confidence.d.ts +1 -1
  217. package/services/voice-profiles/private-challenge.d.ts +1 -1
  218. package/services/voice-profiles/store.d.ts +1 -1
  219. package/test/helpers/live-provider.test.ts +91 -1
  220. package/test/helpers/live-provider.ts +195 -51
  221. package/test/scripts/websocket-pending-queue.test.ts +119 -0
  222. package/test-support/test-helpers.d.ts +0 -33
  223. package/test-support/test-helpers.d.ts.map +1 -1
  224. package/test-support/test-helpers.js +81 -189
  225. package/ui-compat.d.ts +1 -0
  226. package/ui-compat.d.ts.map +1 -1
  227. package/ui-compat.js +4 -0
  228. package/platforms/electrobun/docs/convergence-audit.json +0 -3505
  229. package/platforms/electrobun/docs/convergence-audit.md +0 -694
  230. package/platforms/electrobun/scripts/ensure-whisper-gguf.sh +0 -55
  231. package/platforms/electrobun/scripts/ensure-whisper-model.sh +0 -35
  232. package/platforms/electrobun/scripts/generate-convergence-audit.ts +0 -1203
  233. package/platforms/electrobun/src/native/whisper-env.test.ts +0 -71
  234. package/platforms/electrobun/src/native/whisper-env.ts +0 -68
  235. package/registry/app-registry.d.ts +0 -14
  236. package/registry/app-registry.d.ts.map +0 -1
  237. package/registry/app-registry.js +0 -29
  238. package/registry/entries/apps/app-polymarket.json +0 -31
  239. package/registry/entries/apps/clawville.json +0 -27
  240. package/registry/entries/apps/companion.json +0 -28
  241. package/registry/entries/apps/database-viewer.json +0 -27
  242. package/registry/entries/apps/defense-of-the-agents.json +0 -27
  243. package/registry/entries/apps/documents.json +0 -30
  244. package/registry/entries/apps/feed.json +0 -27
  245. package/registry/entries/apps/hyperliquid.json +0 -31
  246. package/registry/entries/apps/log-viewer.json +0 -27
  247. package/registry/entries/apps/memory-viewer.json +0 -27
  248. package/registry/entries/apps/model-tester.json +0 -31
  249. package/registry/entries/apps/plugin-viewer.json +0 -27
  250. package/registry/entries/apps/relationship-viewer.json +0 -27
  251. package/registry/entries/apps/runtime-debugger.json +0 -27
  252. package/registry/entries/apps/shopify.json +0 -31
  253. package/registry/entries/apps/skills-viewer.json +0 -27
  254. package/registry/entries/apps/steward.json +0 -31
  255. package/registry/entries/apps/training.json +0 -54
  256. package/registry/entries/apps/trajectory-viewer.json +0 -27
  257. package/registry/entries/apps/vincent.json +0 -31
  258. package/registry/entries/connectors/bluebubbles.json +0 -99
  259. package/registry/entries/connectors/bluesky.json +0 -173
  260. package/registry/entries/connectors/discord.json +0 -119
  261. package/registry/entries/connectors/farcaster.json +0 -174
  262. package/registry/entries/connectors/feishu.json +0 -79
  263. package/registry/entries/connectors/google-chat.json +0 -120
  264. package/registry/entries/connectors/google.json +0 -82
  265. package/registry/entries/connectors/imessage.json +0 -96
  266. package/registry/entries/connectors/instagram.json +0 -64
  267. package/registry/entries/connectors/line.json +0 -86
  268. package/registry/entries/connectors/matrix.json +0 -94
  269. package/registry/entries/connectors/mattermost.json +0 -110
  270. package/registry/entries/connectors/msteams.json +0 -104
  271. package/registry/entries/connectors/nextcloud-talk.json +0 -104
  272. package/registry/entries/connectors/nostr.json +0 -70
  273. package/registry/entries/connectors/signal.json +0 -81
  274. package/registry/entries/connectors/slack.json +0 -102
  275. package/registry/entries/connectors/telegram.json +0 -71
  276. package/registry/entries/connectors/tlon.json +0 -94
  277. package/registry/entries/connectors/twitch.json +0 -110
  278. package/registry/entries/connectors/whatsapp.json +0 -113
  279. package/registry/entries/connectors/x.json +0 -231
  280. package/registry/entries/connectors/zalo.json +0 -112
  281. package/registry/entries/connectors/zalouser.json +0 -122
  282. package/registry/entries/plugins/agent-orchestrator.json +0 -33
  283. package/registry/entries/plugins/agent-skills.json +0 -72
  284. package/registry/entries/plugins/anthropic.json +0 -73
  285. package/registry/entries/plugins/app-control.json +0 -23
  286. package/registry/entries/plugins/auto-trader.json +0 -203
  287. package/registry/entries/plugins/background-runner.json +0 -26
  288. package/registry/entries/plugins/blooio.json +0 -102
  289. package/registry/entries/plugins/browser.json +0 -75
  290. package/registry/entries/plugins/cli.json +0 -40
  291. package/registry/entries/plugins/clipboard.json +0 -44
  292. package/registry/entries/plugins/coding-tools.json +0 -71
  293. package/registry/entries/plugins/commands.json +0 -63
  294. package/registry/entries/plugins/computeruse.json +0 -74
  295. package/registry/entries/plugins/copilot-proxy.json +0 -93
  296. package/registry/entries/plugins/directives.json +0 -63
  297. package/registry/entries/plugins/edge-tts.json +0 -97
  298. package/registry/entries/plugins/elevenlabs.json +0 -169
  299. package/registry/entries/plugins/elizacloud.json +0 -208
  300. package/registry/entries/plugins/evm.json +0 -134
  301. package/registry/entries/plugins/experience.json +0 -34
  302. package/registry/entries/plugins/facewear.json +0 -131
  303. package/registry/entries/plugins/form.json +0 -26
  304. package/registry/entries/plugins/github.json +0 -93
  305. package/registry/entries/plugins/gmail-watch.json +0 -25
  306. package/registry/entries/plugins/goals.json +0 -77
  307. package/registry/entries/plugins/google-genai.json +0 -106
  308. package/registry/entries/plugins/groq.json +0 -93
  309. package/registry/entries/plugins/hedera.json +0 -48
  310. package/registry/entries/plugins/inmemorydb.json +0 -25
  311. package/registry/entries/plugins/linear.json +0 -51
  312. package/registry/entries/plugins/local-inference.json +0 -137
  313. package/registry/entries/plugins/local-storage.json +0 -36
  314. package/registry/entries/plugins/localdb.json +0 -25
  315. package/registry/entries/plugins/mcp.json +0 -44
  316. package/registry/entries/plugins/memory.json +0 -124
  317. package/registry/entries/plugins/minecraft.json +0 -79
  318. package/registry/entries/plugins/moltbook.json +0 -83
  319. package/registry/entries/plugins/music.json +0 -155
  320. package/registry/entries/plugins/mysticism.json +0 -48
  321. package/registry/entries/plugins/nearai.json +0 -82
  322. package/registry/entries/plugins/ngrok.json +0 -69
  323. package/registry/entries/plugins/ollama.json +0 -96
  324. package/registry/entries/plugins/openai.json +0 -189
  325. package/registry/entries/plugins/openrouter.json +0 -188
  326. package/registry/entries/plugins/pdf.json +0 -26
  327. package/registry/entries/plugins/plugin-manager.json +0 -23
  328. package/registry/entries/plugins/prose.json +0 -48
  329. package/registry/entries/plugins/rlm.json +0 -26
  330. package/registry/entries/plugins/roblox.json +0 -88
  331. package/registry/entries/plugins/rss.json +0 -64
  332. package/registry/entries/plugins/s3-storage.json +0 -91
  333. package/registry/entries/plugins/scheduling.json +0 -35
  334. package/registry/entries/plugins/shell.json +0 -94
  335. package/registry/entries/plugins/social-alpha.json +0 -72
  336. package/registry/entries/plugins/tailscale.json +0 -81
  337. package/registry/entries/plugins/tee.json +0 -53
  338. package/registry/entries/plugins/todos.json +0 -26
  339. package/registry/entries/plugins/trajectory-logger.json +0 -33
  340. package/registry/entries/plugins/trust.json +0 -39
  341. package/registry/entries/plugins/tts.json +0 -71
  342. package/registry/entries/plugins/tunnel.json +0 -45
  343. package/registry/entries/plugins/twilio.json +0 -168
  344. package/registry/entries/plugins/vercel-ai-gateway.json +0 -128
  345. package/registry/entries/plugins/video.json +0 -23
  346. package/registry/entries/plugins/vision.json +0 -43
  347. package/registry/entries/plugins/webhooks.json +0 -23
  348. package/registry/entries/plugins/workflow.json +0 -25
  349. package/registry/entries/plugins/xai.json +0 -75
  350. package/registry/loader.d.ts +0 -28
  351. package/registry/loader.d.ts.map +0 -1
  352. package/registry/loader.js +0 -158
  353. package/registry/schema.d.ts +0 -1199
  354. package/registry/schema.d.ts.map +0 -1
  355. package/registry/schema.js +0 -300
  356. package/scripts/patches/llama-mobile-kokoro-tts.patch +0 -480
  357. package/scripts/release-workflow-drift.test.ts +0 -57
  358. package/test/helpers/i18n.ts +0 -5
  359. package/test/helpers/loopback.ts +0 -33
  360. package/test/helpers/react-test.ts +0 -40
  361. package/test/helpers/skip-without.ts +0 -53
@@ -226,6 +226,7 @@ struct PipelineSession {
226
226
  // read them without re-parsing big JSON.
227
227
  std::vector<std::vector<float>> turnEmbeddings;
228
228
  std::vector<std::vector<int8_t>> turnLabels;
229
+ std::vector<std::vector<float>> turnPcms;
229
230
  };
230
231
 
231
232
  // Append `n` samples to a bounded pre-roll ring, dropping oldest beyond cap.
@@ -321,6 +322,7 @@ bool finalize_turn(PipelineSession* s, char** outError) {
321
322
  : std::vector<float>{});
322
323
  s->turnLabels.push_back(haveLabels ? std::move(labels)
323
324
  : std::vector<int8_t>{});
325
+ s->turnPcms.push_back(std::move(s->turnPcm));
324
326
  s->turnPcm.clear();
325
327
  return true;
326
328
  }
@@ -405,49 +407,60 @@ bool bionic_bool_env_or_default(const char* name, bool fallback) {
405
407
  return fallback;
406
408
  }
407
409
 
408
- // Arm the eliza-1 text-model bionic config: the fused QJL K-cache /
409
- // TBQ3 V-cache KV-quant (so the device actually uses the fused QJL attention
410
- // route verified on lavapipe) and the same-file MTP draft window.
410
+ int bionic_int_env_or_default(const char* name, int fallback) {
411
+ const char* v = std::getenv(name);
412
+ if (!v || v[0] == '\0') return fallback;
413
+ int parsed = std::atoi(v);
414
+ return parsed > 0 ? parsed : fallback;
415
+ }
416
+
417
+ // Arm the eliza-1 text-model bionic config for runtime optimizations that are
418
+ // correct for the shipped model.
411
419
  //
412
- // KV-quant: ON by default (ELIZA_BIONIC_KV_QUANT != 0). Sets
413
- // cache_type_k = "qjl1_256" (256-dim JL sketch matching quants-qjl.c's
414
- // process-global default Π, seed=42, head_dim=128)
415
- // cache_type_v = "tbq3_0" (TurboQuant-3 V-cache)
416
- // matching CatalogModel.runtime.kvCache (catalog.ts). When set to 0 the fields
417
- // stay NULL the FFI leaves the llama.cpp f16 default (safe fallback).
420
+ // KV-quant stays OFF by default. The shipped Eliza-1 tiers are Gemma 4, whose
421
+ // KV is already minimal by construction (MQA + windowed-SWA + shared-KV, dual
422
+ // head dims 512 global / 256 SWA) and runs on stock f16/q8_0 KV. The legacy
423
+ // QJL1_256 / fused QJL-TBQ kernels are head_dim=128 and dimensionally
424
+ // inapplicable to Gemma, so cache_type_k=qjl1_256/cache_type_v=tbq3_0 is not a
425
+ // shipping path; F16 KV is correct. ELIZA_BIONIC_KV_QUANT=1 is left as an
426
+ // explicit lab override for head_dim=128 test bundles only.
418
427
  //
419
- // MTP: OFF by default (no NextN draft on the keystone path). When
420
- // ELIZA_BIONIC_MTP=1 the same-file MTP draft window is armed
421
- // (draft_min/draft_max from ELIZA_BIONIC_MTP_DRAFT_MIN/MAX, default 1/2 =
422
- // the single-NextN-head throughput peak). The 0.8b tier has no NextN head,
423
- // so the FFI's same-file MTP path falls back to the plain decode loop there —
424
- // tier gating is the bootstrap's job (ELIZA_1_LOAD_METADATA); this is the
425
- // native override seam.
428
+ // MTP is enabled only when the caller supplies a Gemma separate-drafter GGUF.
429
+ // Omitting cfg.mtp_drafter_path would select the retired same-file NextN path,
430
+ // so shipped Gemma bundles without a staged drafter run plain decode even if
431
+ // ELIZA_BIONIC_MTP is set in the app process.
426
432
  //
427
433
  // The two static names below outlive the cfg they're attached to (cfg is a
428
434
  // stack struct consumed synchronously by eliza_inference_llm_stream_open).
429
- void arm_bionic_text_cfg(eliza_llm_stream_config_t& cfg) {
435
+ void arm_bionic_text_cfg(eliza_llm_stream_config_t& cfg,
436
+ const char* bundle_dir = nullptr) {
430
437
  static const char* kKvTypeK = "qjl1_256";
431
438
  static const char* kKvTypeV = "tbq3_0";
432
- if (bionic_bool_env_or_default("ELIZA_BIONIC_KV_QUANT", true)) {
439
+ if (bionic_bool_env_or_default("ELIZA_BIONIC_KV_QUANT", false)) {
433
440
  cfg.cache_type_k = kKvTypeK;
434
441
  cfg.cache_type_v = kKvTypeV;
435
- LOGI("bionic text cfg: KV-quant ON (k=%s v=%s)", kKvTypeK, kKvTypeV);
442
+ LOGI("bionic text cfg: KV-quant ON by explicit override (k=%s v=%s)",
443
+ kKvTypeK, kKvTypeV);
436
444
  } else {
437
- LOGI("bionic text cfg: KV-quant OFF (f16 fallback)");
445
+ LOGI("bionic text cfg: KV-quant OFF (stock f16/q8_0 KV; Gemma 4 KV is "
446
+ "already minimal)");
438
447
  }
439
448
 
440
- if (bionic_bool_env_or_default("ELIZA_BIONIC_MTP", false)) {
441
- const char* dmin = std::getenv("ELIZA_BIONIC_MTP_DRAFT_MIN");
442
- const char* dmax = std::getenv("ELIZA_BIONIC_MTP_DRAFT_MAX");
443
- int draft_min = dmin && dmin[0] ? std::atoi(dmin) : 1;
444
- int draft_max = dmax && dmax[0] ? std::atoi(dmax) : 2;
449
+ (void)bundle_dir;
450
+ const bool has_drafter =
451
+ cfg.mtp_drafter_path && cfg.mtp_drafter_path[0] != '\0';
452
+ if (has_drafter && bionic_bool_env_or_default("ELIZA_BIONIC_MTP", true)) {
453
+ int draft_min = bionic_int_env_or_default("ELIZA_BIONIC_MTP_DRAFT_MIN", 1);
454
+ int draft_max = bionic_int_env_or_default("ELIZA_BIONIC_MTP_DRAFT_MAX", 1);
445
455
  if (draft_min < 1) draft_min = 1;
446
456
  if (draft_max < draft_min) draft_max = draft_min;
447
457
  cfg.draft_min = draft_min;
448
458
  cfg.draft_max = draft_max;
449
- LOGI("bionic text cfg: MTP ON (draft_min=%d draft_max=%d, same-file)",
450
- draft_min, draft_max);
459
+ LOGI("bionic text cfg: MTP ON (draft_min=%d draft_max=%d, drafter=%s)",
460
+ draft_min, draft_max, cfg.mtp_drafter_path);
461
+ } else {
462
+ LOGI("bionic text cfg: MTP OFF (%s)",
463
+ has_drafter ? "disabled by ELIZA_BIONIC_MTP" : "no drafter");
451
464
  }
452
465
  }
453
466
 
@@ -797,6 +810,7 @@ Java_ai_elizaos_app_ElizaVoiceNative_nativePipelineProcess(JNIEnv* env, jclass,
797
810
  s->turns.clear();
798
811
  s->turnEmbeddings.clear();
799
812
  s->turnLabels.clear();
813
+ s->turnPcms.clear();
800
814
 
801
815
  const std::vector<float> pcm = read_float_array(env, jPcm);
802
816
  s->pending.insert(s->pending.end(), pcm.begin(), pcm.end());
@@ -825,6 +839,7 @@ Java_ai_elizaos_app_ElizaVoiceNative_nativePipelineFlush(JNIEnv* env, jclass,
825
839
  s->turns.clear();
826
840
  s->turnEmbeddings.clear();
827
841
  s->turnLabels.clear();
842
+ s->turnPcms.clear();
828
843
  if (s->seg.forceEnd()) {
829
844
  s->capturing = false;
830
845
  char* outError = nullptr;
@@ -880,6 +895,26 @@ Java_ai_elizaos_app_ElizaVoiceNative_nativePipelineTurnLabels(JNIEnv* env,
880
895
  return out;
881
896
  }
882
897
 
898
+ // Read the segmented turn PCM for the i-th turn. Empty array when unavailable.
899
+ JNIEXPORT jfloatArray JNICALL
900
+ Java_ai_elizaos_app_ElizaVoiceNative_nativePipelineTurnPcm(JNIEnv* env,
901
+ jclass,
902
+ jlong handle,
903
+ jint index) {
904
+ auto* s = reinterpret_cast<PipelineSession*>(handle);
905
+ if (!s || index < 0 ||
906
+ static_cast<size_t>(index) >= s->turnPcms.size()) {
907
+ return env->NewFloatArray(0);
908
+ }
909
+ const auto& pcm = s->turnPcms[static_cast<size_t>(index)];
910
+ jfloatArray out = env->NewFloatArray(static_cast<jsize>(pcm.size()));
911
+ if (out && !pcm.empty()) {
912
+ env->SetFloatArrayRegion(out, 0, static_cast<jsize>(pcm.size()),
913
+ pcm.data());
914
+ }
915
+ return out;
916
+ }
917
+
883
918
  JNIEXPORT void JNICALL
884
919
  Java_ai_elizaos_app_ElizaVoiceNative_nativePipelineReset(JNIEnv*, jclass,
885
920
  jlong handle) {
@@ -888,6 +923,7 @@ Java_ai_elizaos_app_ElizaVoiceNative_nativePipelineReset(JNIEnv*, jclass,
888
923
  s->seg.reset();
889
924
  s->pending.clear();
890
925
  s->turnPcm.clear();
926
+ s->turnPcms.clear();
891
927
  s->preRoll.clear();
892
928
  s->capturing = false;
893
929
  char* outError = nullptr;
@@ -1222,16 +1258,14 @@ Java_ai_elizaos_app_ElizaVoiceNative_nativeLlmStreamOpen(
1222
1258
  cfg.repeat_penalty = 1.0f;
1223
1259
  cfg.n_gpu_layers = nGpuLayers;
1224
1260
  cfg.mtp_drafter_path = drafter.empty() ? nullptr : drafter.c_str();
1225
- // Arm the fused QJL/TBQ3 KV-quant + (env-gated) same-file MTP draft window.
1226
- // A caller-supplied drafter path is separate-drafter MTP and needs its own
1227
- // draft window — only arm the same-file MTP env override when no drafter
1228
- // was passed.
1261
+ // Arm safe runtime optimizations: stock f16/q8_0 KV for the shipped Gemma 4
1262
+ // tiers, and separate-drafter MTP only when the caller passes a drafter.
1229
1263
  arm_bionic_text_cfg(cfg);
1230
1264
  if (!drafter.empty() && cfg.draft_min <= 0) {
1231
1265
  // Separate drafter supplied but env left the window 0; give it the
1232
1266
  // single-head default so the drafter actually drives speculation.
1233
1267
  cfg.draft_min = 1;
1234
- cfg.draft_max = 2;
1268
+ cfg.draft_max = 1;
1235
1269
  }
1236
1270
  char* outError = nullptr;
1237
1271
  EliLlmStream* s = eliza_inference_llm_stream_open(ctx, &cfg, &outError);
@@ -1321,6 +1355,18 @@ Java_ai_elizaos_app_ElizaVoiceNative_nativeLlmStreamReset(JNIEnv*, jclass,
1321
1355
  return static_cast<jint>(rc == ELIZA_OK ? 1 : 0);
1322
1356
  }
1323
1357
 
1358
+ // Prefix-preserving reset: keep the first nKeep tokens of KV resident, drop the
1359
+ // rest. Returns the n_keep actually applied (>= 0), or a negative ELIZA_* on a
1360
+ // NULL / MTP / unopened stream (caller falls back to a full reset + prefill).
1361
+ JNIEXPORT jint JNICALL
1362
+ Java_ai_elizaos_app_ElizaVoiceNative_nativeLlmStreamResetKeep(JNIEnv*, jclass,
1363
+ jlong streamHandle,
1364
+ jint nKeep) {
1365
+ const int rc = eliza_inference_llm_stream_reset_keep(
1366
+ reinterpret_cast<EliLlmStream*>(streamHandle), static_cast<int32_t>(nKeep));
1367
+ return static_cast<jint>(rc);
1368
+ }
1369
+
1324
1370
  // ── LLM self-test (one native call: ctx→tokenize→stream→generate) ─────────
1325
1371
  //
1326
1372
  // THE KEYSTONE PROOF: runs a whole greedy text generation in ONE native call,
@@ -1358,9 +1404,9 @@ Java_ai_elizaos_app_ElizaVoiceNative_nativeLlmSelfTest(JNIEnv* env, jclass,
1358
1404
  cfg.top_p = 1.0f;
1359
1405
  cfg.repeat_penalty = 1.0f;
1360
1406
  cfg.n_gpu_layers = -1; // all-GPU when the vulkan lib is staged
1361
- // Arm the fused QJL/TBQ3 KV-quant + (env-gated) same-file MTP draft window
1362
- // so the keystone generation path exercises the fused QJL attention route.
1363
- arm_bionic_text_cfg(cfg);
1407
+ // Arm safe runtime optimizations (stock f16/q8_0 KV for shipped Gemma 4
1408
+ // tiers; no MTP here because nativeLlmSelfTest has no drafter argument).
1409
+ arm_bionic_text_cfg(cfg, bundleDir.c_str());
1364
1410
  EliLlmStream* s = eliza_inference_llm_stream_open(ctx, &cfg, &outError);
1365
1411
  if (!s) {
1366
1412
  if (tok) eliza_inference_free_tokens(tok);
@@ -1482,4 +1528,102 @@ Java_ai_elizaos_app_ElizaVoiceNative_nativeKokoroSynthesize(JNIEnv* env, jclass,
1482
1528
  return out;
1483
1529
  }
1484
1530
 
1531
+ // ── Batch ASR (synchronous, VAD-free) ────────────────────────────────────
1532
+ //
1533
+ // The streaming pipeline (nativePipelineProcess) is VAD-gated and needs the
1534
+ // VAD/diariz/speaker GGUFs staged; this is the DIRECT audio-in/text-out
1535
+ // transcribe the fused lib exposes (eliza_inference_asr_transcribe), which
1536
+ // only mmap-acquires the `asr/` weights on the resident context. The bionic
1537
+ // host's op="asr" calls this so the agent's TRANSCRIPTION delegate gets a
1538
+ // real on-device transcript without the full attribution pipeline.
1539
+ JNIEXPORT jstring JNICALL
1540
+ Java_ai_elizaos_app_ElizaVoiceNative_nativeAsrTranscribe(JNIEnv* env, jclass,
1541
+ jlong ctxHandle,
1542
+ jfloatArray jPcm,
1543
+ jint sampleRate) {
1544
+ auto* ctx = reinterpret_cast<EliInferenceContext*>(ctxHandle);
1545
+ if (!ctx) {
1546
+ throw_runtime(env, "asrTranscribe: null context", nullptr);
1547
+ return nullptr;
1548
+ }
1549
+ const jsize n = env->GetArrayLength(jPcm);
1550
+ jfloat* pcm = env->GetFloatArrayElements(jPcm, nullptr);
1551
+ if (!pcm) {
1552
+ throw_runtime(env, "asrTranscribe: null PCM", nullptr);
1553
+ return nullptr;
1554
+ }
1555
+ // The ASR weights are a voice-only mmap region that must be armed before
1556
+ // transcribe (VoiceLifecycle normally does this on voice-on). The agent's
1557
+ // one-shot transcribe path has no lifecycle, so arm it here (idempotent if
1558
+ // already acquired).
1559
+ char* acqErr = nullptr;
1560
+ if (eliza_inference_mmap_acquire(ctx, "asr", &acqErr) != 0) {
1561
+ env->ReleaseFloatArrayElements(jPcm, pcm, JNI_ABORT);
1562
+ throw_runtime(env, "asr mmap_acquire", acqErr);
1563
+ return nullptr;
1564
+ }
1565
+ // 64 KiB transcript cap — far longer than any single utterance.
1566
+ std::vector<char> out(65536, 0);
1567
+ char* err = nullptr;
1568
+ const int rc = eliza_inference_asr_transcribe(
1569
+ ctx, reinterpret_cast<const float*>(pcm), static_cast<size_t>(n),
1570
+ sampleRate > 0 ? sampleRate : kSampleRate, out.data(), out.size(),
1571
+ &err);
1572
+ env->ReleaseFloatArrayElements(jPcm, pcm, JNI_ABORT);
1573
+ if (rc < 0) {
1574
+ throw_runtime(env, "asr_transcribe", err);
1575
+ return nullptr;
1576
+ }
1577
+ LOGI("nativeAsrTranscribe: %d samples @ %d Hz -> %d transcript bytes",
1578
+ (int)n, (int)sampleRate, rc);
1579
+ return to_jstring(env, std::string(out.data()));
1580
+ }
1581
+
1582
+ // ── mmproj vision (ABI v9) ───────────────────────────────────────────────
1583
+ JNIEXPORT jint JNICALL
1584
+ Java_ai_elizaos_app_ElizaVoiceNative_nativeVisionSupported(JNIEnv*, jclass) {
1585
+ return static_cast<jint>(eliza_inference_vision_supported());
1586
+ }
1587
+
1588
+ // Describe a raw PNG/JPEG/WebP image with the resident TEXT model + an mmproj
1589
+ // projector (eliza_inference_describe_image). The bionic host's op="image"
1590
+ // calls this so the agent's IMAGE_DESCRIPTION delegate runs screen/vision
1591
+ // recognition fully on-device.
1592
+ JNIEXPORT jstring JNICALL
1593
+ Java_ai_elizaos_app_ElizaVoiceNative_nativeDescribeImage(JNIEnv* env, jclass,
1594
+ jlong ctxHandle,
1595
+ jbyteArray jImage,
1596
+ jstring jMmproj,
1597
+ jstring jPrompt) {
1598
+ auto* ctx = reinterpret_cast<EliInferenceContext*>(ctxHandle);
1599
+ if (!ctx) {
1600
+ throw_runtime(env, "describeImage: null context", nullptr);
1601
+ return nullptr;
1602
+ }
1603
+ const std::string mmproj = from_jstring(env, jMmproj);
1604
+ const std::string prompt = from_jstring(env, jPrompt);
1605
+ const jsize n = env->GetArrayLength(jImage);
1606
+ jbyte* img = env->GetByteArrayElements(jImage, nullptr);
1607
+ if (!img) {
1608
+ throw_runtime(env, "describeImage: null image bytes", nullptr);
1609
+ return nullptr;
1610
+ }
1611
+ std::vector<char> out(16384, 0);
1612
+ char* err = nullptr;
1613
+ const int rc = eliza_inference_describe_image(
1614
+ ctx, reinterpret_cast<const unsigned char*>(img),
1615
+ static_cast<size_t>(n),
1616
+ mmproj.empty() ? nullptr : mmproj.c_str(),
1617
+ prompt.empty() ? nullptr : prompt.c_str(), out.data(), out.size(),
1618
+ &err);
1619
+ env->ReleaseByteArrayElements(jImage, img, JNI_ABORT);
1620
+ if (rc < 0) {
1621
+ throw_runtime(env, "describe_image", err);
1622
+ return nullptr;
1623
+ }
1624
+ LOGI("nativeDescribeImage: %d image bytes -> %d description bytes", (int)n,
1625
+ rc);
1626
+ return to_jstring(env, std::string(out.data()));
1627
+ }
1628
+
1485
1629
  } // extern "C"
@@ -1115,7 +1115,56 @@ public class ElizaAgentService extends Service {
1115
1115
 
1116
1116
  // ── Process lifecycle ────────────────────────────────────────────────
1117
1117
 
1118
+ /**
1119
+ * Start the in-process bionic inference host whenever the fused native lib
1120
+ * AND a local voice bundle (kokoro) are present — independent of the LLM
1121
+ * runtime mode and of whether the agent process spawns fresh or adopts a
1122
+ * surviving one.
1123
+ *
1124
+ * <p>Previously the host was started ONLY inside {@link #startAgentProcess()}'s
1125
+ * fresh-spawn {@code delegateToBionicHost} block, so after a process restart
1126
+ * that adopts a surviving agent (or when the agent runs cloud-routed) the
1127
+ * host never bound its abstract UDS, and {@code TalkMode}'s local Kokoro TTS
1128
+ * silently fell back to the system (Google) TTS. The voice host serves Kokoro
1129
+ * from {@code libelizainference} + the staged bundle and needs no LLM, so its
1130
+ * lifecycle is decoupled from agent inference here.
1131
+ *
1132
+ * <p>{@link ElizaBionicInferenceServer#start()} is idempotent and never throws
1133
+ * (it logs + returns on lib-load / socket-bind failure), so this is purely
1134
+ * additive: worst case the host stays down and TalkMode falls back to system
1135
+ * TTS exactly as before — it cannot affect agent startup.
1136
+ */
1137
+ private synchronized void ensureBionicVoiceHost() {
1138
+ if (bionicInferenceServer != null) {
1139
+ return;
1140
+ }
1141
+ File fusedLib = new File(nativeLibraryDir(), "libelizainference.so");
1142
+ if (!fusedLib.isFile()) {
1143
+ return;
1144
+ }
1145
+ File kokoroVoice = new File(getFilesDir(), "eliza-1/bundle/tts/kokoro");
1146
+ if (!kokoroVoice.isDirectory()) {
1147
+ return;
1148
+ }
1149
+ try {
1150
+ String defaultBundleDir =
1151
+ new File(getFilesDir(), "eliza-1/bundle").getAbsolutePath();
1152
+ ElizaBionicInferenceServer host =
1153
+ new ElizaBionicInferenceServer(BIONIC_INFERENCE_SOCKET_NAME, defaultBundleDir);
1154
+ host.start();
1155
+ bionicInferenceServer = host;
1156
+ Log.i(TAG, "ensureBionicVoiceHost: local voice host started"
1157
+ + " (kokoro bundle present, independent of LLM mode)");
1158
+ } catch (Throwable t) {
1159
+ Log.w(TAG, "ensureBionicVoiceHost: could not start local voice host", t);
1160
+ }
1161
+ }
1162
+
1118
1163
  private void requestAgentStart(boolean restartFirst) {
1164
+ // Bring up the local-voice (Kokoro TTS) bionic host on every service
1165
+ // start, before the agent-already-running guards below — so it binds
1166
+ // even when the agent is adopted rather than freshly spawned.
1167
+ ensureBionicVoiceHost();
1119
1168
  synchronized (processLock) {
1120
1169
  if (!restartFirst && agentProcess != null && agentProcess.isAlive()) {
1121
1170
  return;
@@ -1393,10 +1442,11 @@ public class ElizaAgentService extends Service {
1393
1442
  // (tryBuildAospFusedTextLoader) and aosp-llama-paths.ts
1394
1443
  // (isAospEnabled reads ELIZA_LOCAL_LLAMA).
1395
1444
  // This is required, not optional: the eliza-1 model tiers are
1396
- // qwen35-arch + QJL/PolarQuant/TBQ-quantized, and the stock
1397
- // llama-cpp-capacitor JNI lib cannot load those GGUFs at all
1398
- // (`context->loadModel() returned false`). The fused
1399
- // libelizainference.so carries the kernels + qwen35 arch and is
1445
+ // Gemma-4-arch GGUFs (TurboQuant-quantized; stock f16/q8_0 KV — the
1446
+ // legacy QJL/PolarQuant/TBQ KV kernels are retired post-#9033), and
1447
+ // the stock llama-cpp-capacitor JNI lib cannot load those GGUFs at
1448
+ // all (`context->loadModel() returned false`). The fused
1449
+ // libelizainference.so carries the kernels + Gemma arch and is
1400
1450
  // the SOLE text/voice native library the bun agent loads.
1401
1451
  //
1402
1452
  // This was previously gated on `BuildConfig.AOSP_BUILD &&
@@ -1417,7 +1467,6 @@ public class ElizaAgentService extends Service {
1417
1467
  File abiFusedInference = new File(abiDir, "libelizainference.so");
1418
1468
  File abiLibllama = new File(abiDir, "libllama.so");
1419
1469
  File abiLlamaShim = new File(abiDir, "libeliza-llama-shim.so");
1420
- File abiSpeculativeShim = new File(abiDir, "libeliza-llama-speculative-shim.so");
1421
1470
  File abiGgmlVulkan = new File(abiDir, "libggml-vulkan.so");
1422
1471
  boolean fusedInferenceBundled = abiFusedInference.isFile();
1423
1472
  boolean legacyLibllamaBundled = abiLibllama.isFile() && abiLlamaShim.isFile();
@@ -1501,33 +1550,12 @@ public class ElizaAgentService extends Service {
1501
1550
  // cache priming.
1502
1551
  agentEnv.put("ELIZA_KOKORO_PREWARM_DELAY_MS", "60000");
1503
1552
  }
1504
- if (abiSpeculativeShim.isFile()
1505
- && !env.containsKey("ELIZA_SPEC_TYPE")
1506
- && !env.containsKey("ELIZA_SPECULATIVE_TYPE")) {
1507
- // Prefer the in-process MTP path when the bundled
1508
- // llama.cpp fork supports it. This is intentionally not
1509
- // required: current mobile Eliza-1 bundles ship MTP
1510
- // drafter GGUFs, and the adapter falls back to MTP when
1511
- // the target model lacks NextN/MTP tensors.
1512
- agentEnv.put("ELIZA_SPEC_TYPE", "mtp");
1513
- Log.i(TAG, "agent/" + abiDir.getName()
1514
- + "/libeliza-llama-speculative-shim.so present; preferring MTP speculative decode with MTP fallback");
1515
- }
1516
- if (abiSpeculativeShim.isFile() && brandedAospBuild && !env.containsKey("ELIZA_MTP")) {
1517
- agentEnv.put("ELIZA_MTP", "1");
1518
- Log.i(TAG, "agent/" + abiDir.getName()
1519
- + "/libeliza-llama-speculative-shim.so present on branded AOSP build; enabling in-process MTP (ELIZA_MTP=1)");
1520
- } else if (abiSpeculativeShim.isFile() && !brandedAospBuild) {
1521
- // Ship the speculative shim in stock APKs so explicit
1522
- // ELIZA_MTP diagnostics still work, but do not make
1523
- // MTP the default merely because the .so is present.
1524
- // Pixel APK validation showed the current 2B drafter path
1525
- // is functional but slower than target-only decode for
1526
- // short chat turns, so stock Android stays target-only
1527
- // until benchmark gating or a faster drafter path lands.
1528
- Log.i(TAG, "agent/" + abiDir.getName()
1529
- + "/libeliza-llama-speculative-shim.so present; leaving MTP opt-in for stock APK");
1530
- }
1553
+ // MTP (multi-token / speculative decode) is compiled into the
1554
+ // single fused libelizainference.so (the eliza_mtp::Engine over
1555
+ // common/speculative.cpp, exported as eliza_inference_llm_mtp_supported).
1556
+ // It is controlled in-process by ELIZA_BIONIC_MTP and the FFI
1557
+ // capability probe NOT by a separate speculative-shim .so (that
1558
+ // shim is retired and never staged). No env wiring needed here.
1531
1559
  if (BuildConfig.DEBUG && !env.containsKey("ELIZA_AOSP_LLAMA_DEBUG_LOG")) {
1532
1560
  File debugLog = new File(agentStateDir(), "aosp-llama-debug.log");
1533
1561
  agentEnv.put("ELIZA_AOSP_LLAMA_DEBUG_LOG", debugLog.getAbsolutePath());