@elizaos/agent 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 (381) hide show
  1. package/__tests__/view-user-journeys.d.ts.map +1 -1
  2. package/__tests__/view-user-journeys.js +52 -41
  3. package/actions/context-signal.d.ts +2 -2
  4. package/actions/files.d.ts +9 -0
  5. package/actions/files.d.ts.map +1 -0
  6. package/actions/files.js +183 -0
  7. package/actions/index.d.ts +17 -17
  8. package/api/accounts-routes.d.ts +1 -1
  9. package/api/accounts-routes.js +1 -1
  10. package/api/agent-admin-routes.d.ts +1 -1
  11. package/api/agent-admin-routes.js +2 -2
  12. package/api/agent-model.d.ts +1 -1
  13. package/api/agent-status-routes.d.ts +1 -3
  14. package/api/agent-status-routes.d.ts.map +1 -1
  15. package/api/agent-status-routes.js +0 -2
  16. package/api/approval-routes.d.ts +38 -0
  17. package/api/approval-routes.d.ts.map +1 -0
  18. package/api/approval-routes.js +223 -0
  19. package/api/background-routes.d.ts +13 -0
  20. package/api/background-routes.d.ts.map +1 -0
  21. package/api/background-routes.js +91 -0
  22. package/api/binance-skill-helpers.d.ts +2 -2
  23. package/api/binance-skill-helpers.js +2 -2
  24. package/api/builtin-views.d.ts.map +1 -1
  25. package/api/builtin-views.js +44 -4
  26. package/api/character-routes.d.ts +1 -1
  27. package/api/chat-augmentation.d.ts.map +1 -1
  28. package/api/chat-augmentation.js +17 -0
  29. package/api/chat-routes.d.ts +29 -2
  30. package/api/chat-routes.d.ts.map +1 -1
  31. package/api/chat-routes.js +76 -1
  32. package/api/commands-routes.d.ts +10 -8
  33. package/api/commands-routes.d.ts.map +1 -1
  34. package/api/commands-routes.js +17 -59
  35. package/api/config-routes.d.ts +1 -1
  36. package/api/config-routes.d.ts.map +1 -1
  37. package/api/config-routes.js +0 -2
  38. package/api/connector-routes.d.ts +1 -1
  39. package/api/conversation-metadata.d.ts +1 -1
  40. package/api/conversation-metadata.d.ts.map +1 -1
  41. package/api/conversation-metadata.js +0 -1
  42. package/api/conversation-routes.d.ts +4 -3
  43. package/api/conversation-routes.d.ts.map +1 -1
  44. package/api/conversation-routes.js +34 -1
  45. package/api/documents-service-loader.d.ts +0 -4
  46. package/api/documents-service-loader.d.ts.map +1 -1
  47. package/api/documents-service-loader.js +0 -2
  48. package/api/files-routes.d.ts +14 -0
  49. package/api/files-routes.d.ts.map +1 -0
  50. package/api/files-routes.js +47 -0
  51. package/api/first-run-routes.d.ts +1 -1
  52. package/api/health-routes.d.ts +2 -2
  53. package/api/index.d.ts +40 -39
  54. package/api/index.d.ts.map +1 -1
  55. package/api/index.js +1 -0
  56. package/api/interactions-routes.d.ts +33 -0
  57. package/api/interactions-routes.d.ts.map +1 -0
  58. package/api/interactions-routes.js +63 -0
  59. package/api/media-runtime.d.ts +2 -1
  60. package/api/media-runtime.d.ts.map +1 -1
  61. package/api/media-runtime.js +64 -7
  62. package/api/media-store.d.ts +36 -0
  63. package/api/media-store.d.ts.map +1 -1
  64. package/api/media-store.js +141 -2
  65. package/api/memory-bounds.d.ts +0 -1
  66. package/api/memory-bounds.d.ts.map +1 -1
  67. package/api/memory-bounds.js +0 -1
  68. package/api/misc-routes.d.ts +1 -1
  69. package/api/model-provider-helpers.d.ts +2 -2
  70. package/api/model-provider-helpers.js +2 -2
  71. package/api/permissions-routes-extra.d.ts +1 -1
  72. package/api/permissions-routes.d.ts +1 -1
  73. package/api/permissions-routes.d.ts.map +1 -1
  74. package/api/permissions-routes.js +8 -7
  75. package/api/plugin-discovery-helpers.d.ts +5 -6
  76. package/api/plugin-discovery-helpers.d.ts.map +1 -1
  77. package/api/plugin-discovery-helpers.js +3 -4
  78. package/api/plugin-runtime-apply.d.ts +2 -2
  79. package/api/plugin-runtime-apply.d.ts.map +1 -1
  80. package/api/plugin-runtime-apply.js +74 -0
  81. package/api/provider-switch-config.d.ts +1 -1
  82. package/api/provider-switch-routes.d.ts +2 -2
  83. package/api/registry-routes.d.ts +1 -1
  84. package/api/registry-service.d.ts +1 -1
  85. package/api/remote-capability-routes.d.ts +2 -2
  86. package/api/remote-capability-routes.d.ts.map +1 -1
  87. package/api/remote-capability-routes.js +19 -0
  88. package/api/server-autonomy-helpers.d.ts +2 -2
  89. package/api/server-helpers-auth.d.ts +10 -0
  90. package/api/server-helpers-auth.d.ts.map +1 -1
  91. package/api/server-helpers-auth.js +16 -210
  92. package/api/server-helpers-config.d.ts +1 -1
  93. package/api/server-helpers-mcp.d.ts +2 -2
  94. package/api/server-helpers-plugin.d.ts +1 -1
  95. package/api/server-helpers-swarm.d.ts +3 -3
  96. package/api/server-helpers-swarm.d.ts.map +1 -1
  97. package/api/server-helpers-swarm.js +15 -5
  98. package/api/server-helpers-wallet.d.ts +1 -1
  99. package/api/server-helpers.d.ts +4 -4
  100. package/api/server-lazy-routes.d.ts +40 -38
  101. package/api/server-lazy-routes.d.ts.map +1 -1
  102. package/api/server-lazy-routes.js +7 -0
  103. package/api/server-route-dispatch.d.ts +2 -2
  104. package/api/server-route-dispatch.d.ts.map +1 -1
  105. package/api/server-route-dispatch.js +7 -0
  106. package/api/server-types.d.ts +9 -7
  107. package/api/server-types.d.ts.map +1 -1
  108. package/api/server.d.ts +19 -19
  109. package/api/server.d.ts.map +1 -1
  110. package/api/server.js +111 -17
  111. package/api/static-file-server.d.ts +2 -2
  112. package/api/static-file-server.js +2 -2
  113. package/api/subscription-routes.d.ts +4 -4
  114. package/api/subscription-routes.js +3 -4
  115. package/api/suggestions-routes.d.ts +1 -1
  116. package/api/suggestions-routes.d.ts.map +1 -1
  117. package/api/suggestions-routes.js +2 -3
  118. package/api/terminal-execution-routing.d.ts +1 -1
  119. package/api/training-service-like.d.ts +1 -1
  120. package/api/trajectory-fallback-routes.d.ts.map +1 -1
  121. package/api/trajectory-fallback-routes.js +21 -1
  122. package/api/update-routes.d.ts +1 -1
  123. package/api/view-registry-types.d.ts +1 -1
  124. package/api/views-registry.d.ts +14 -4
  125. package/api/views-registry.d.ts.map +1 -1
  126. package/api/views-registry.js +107 -72
  127. package/api/views-routes.d.ts +1 -1
  128. package/api/views-routes.d.ts.map +1 -1
  129. package/api/views-routes.js +131 -14
  130. package/api/views-search-index.d.ts +1 -1
  131. package/api/wallet-capability.d.ts +3 -3
  132. package/api/wallet-rpc.d.ts +1 -1
  133. package/api/wallet.d.ts +3 -3
  134. package/api/wallet.d.ts.map +1 -1
  135. package/api/wallet.js +4 -3
  136. package/api/workbench-context.d.ts +1 -1
  137. package/api/workbench-helpers.d.ts +3 -3
  138. package/api/workbench-helpers.js +3 -3
  139. package/api/workbench-routes.d.ts +2 -2
  140. package/api/workbench-vfs-routes.d.ts +1 -1
  141. package/api/ws-event-replay.d.ts +1 -2
  142. package/api/ws-event-replay.d.ts.map +1 -1
  143. package/api/ws-event-replay.js +1 -2
  144. package/api/x-relay-routes.d.ts +2 -2
  145. package/api/x402-route-validation.d.ts +4 -0
  146. package/api/x402-route-validation.d.ts.map +1 -0
  147. package/api/x402-route-validation.js +6 -0
  148. package/assets/view-heroes/background.png +0 -0
  149. package/auth/account-storage.d.ts +1 -1
  150. package/auth/anthropic.d.ts +1 -1
  151. package/auth/credentials.d.ts +2 -2
  152. package/auth/index.d.ts +7 -7
  153. package/auth/oauth-flow.d.ts +2 -2
  154. package/auth/openai-codex.d.ts +1 -1
  155. package/awareness/index.d.ts +1 -1
  156. package/config/config.js +0 -1
  157. package/config/env-vars.d.ts +1 -1
  158. package/config/env-vars.d.ts.map +1 -1
  159. package/config/env-vars.js +0 -1
  160. package/config/index.d.ts +10 -10
  161. package/config/model-metadata.d.ts +1 -1
  162. package/config/owner-contacts.d.ts +1 -1
  163. package/config/schema.d.ts +1 -1
  164. package/hooks/discovery.d.ts +1 -1
  165. package/hooks/eligibility.d.ts +2 -2
  166. package/hooks/index.d.ts +2 -2
  167. package/hooks/loader.d.ts +2 -2
  168. package/hooks/registry.d.ts +1 -1
  169. package/index.d.ts +87 -85
  170. package/index.d.ts.map +1 -1
  171. package/index.js +11 -3
  172. package/package.json +54 -44
  173. package/providers/media-provider.d.ts +1 -1
  174. package/providers/page-scoped-context.d.ts.map +1 -1
  175. package/providers/page-scoped-context.js +1 -70
  176. package/providers/relevant-conversations.d.ts.map +1 -1
  177. package/providers/relevant-conversations.js +8 -9
  178. package/providers/workspace.d.ts +1 -1
  179. package/runtime/actions/web-fetch.d.ts.map +1 -1
  180. package/runtime/actions/web-fetch.js +23 -3
  181. package/runtime/actions/web-search.d.ts +32 -0
  182. package/runtime/actions/web-search.d.ts.map +1 -0
  183. package/runtime/actions/web-search.js +245 -0
  184. package/runtime/advanced-capabilities-config.d.ts +1 -1
  185. package/runtime/boot-telemetry.d.ts +1 -1
  186. package/runtime/conversation-compactor-runtime.d.ts +1 -1
  187. package/runtime/conversation-compactor-runtime.js +1 -1
  188. package/runtime/conversation-compactor.d.ts +1 -1
  189. package/runtime/core-plugins.d.ts.map +1 -1
  190. package/runtime/core-plugins.js +9 -0
  191. package/runtime/custom-actions.d.ts +18 -9
  192. package/runtime/custom-actions.d.ts.map +1 -1
  193. package/runtime/custom-actions.js +85 -23
  194. package/runtime/eliza-plugin.d.ts.map +1 -1
  195. package/runtime/eliza-plugin.js +15 -1
  196. package/runtime/eliza.d.ts +9 -7
  197. package/runtime/eliza.d.ts.map +1 -1
  198. package/runtime/eliza.js +86 -23
  199. package/runtime/first-time-setup.d.ts +1 -3
  200. package/runtime/first-time-setup.d.ts.map +1 -1
  201. package/runtime/first-time-setup.js +0 -2
  202. package/runtime/index.d.ts +18 -18
  203. package/runtime/load-plugin-from-vfs.d.ts +2 -2
  204. package/runtime/mobile-dns.d.ts.map +1 -1
  205. package/runtime/mobile-dns.js +2 -5
  206. package/runtime/operations/classifier.d.ts +1 -1
  207. package/runtime/operations/cold-strategy.d.ts +1 -1
  208. package/runtime/operations/health-checks.d.ts +1 -1
  209. package/runtime/operations/health.d.ts +1 -1
  210. package/runtime/operations/index.d.ts +10 -10
  211. package/runtime/operations/manager.d.ts +3 -3
  212. package/runtime/operations/reload-hot.d.ts +1 -1
  213. package/runtime/operations/repository.d.ts +1 -1
  214. package/runtime/operations/vault-bridge.d.ts +1 -1
  215. package/runtime/plugin-collector.d.ts +6 -1
  216. package/runtime/plugin-collector.d.ts.map +1 -1
  217. package/runtime/plugin-collector.js +11 -28
  218. package/runtime/plugin-lifecycle.d.ts.map +1 -1
  219. package/runtime/plugin-lifecycle.js +1 -0
  220. package/runtime/plugin-resolver.d.ts +2 -2
  221. package/runtime/plugin-resolver.d.ts.map +1 -1
  222. package/runtime/plugin-resolver.js +113 -65
  223. package/runtime/plugin-types.d.ts +1 -1
  224. package/runtime/prompt-optimization.d.ts +4 -4
  225. package/runtime/remote-coding-runner-gate.d.ts +7 -0
  226. package/runtime/remote-coding-runner-gate.d.ts.map +1 -0
  227. package/runtime/remote-coding-runner-gate.js +36 -0
  228. package/runtime/roles/src/index.d.ts +4 -4
  229. package/runtime/roles.d.ts +2 -2
  230. package/runtime/sandbox-character.d.ts +1 -1
  231. package/runtime/tool-call-cache/cache.d.ts +1 -1
  232. package/runtime/tool-call-cache/disk-store.d.ts +1 -1
  233. package/runtime/tool-call-cache/index.d.ts +6 -6
  234. package/runtime/tool-call-cache/key.d.ts +1 -1
  235. package/runtime/tool-call-cache/redact.d.ts +1 -1
  236. package/runtime/tool-call-cache/registry.d.ts +1 -1
  237. package/runtime/tool-call-cache-wrapper.d.ts +7 -9
  238. package/runtime/tool-call-cache-wrapper.d.ts.map +1 -1
  239. package/runtime/tool-call-cache-wrapper.js +6 -11
  240. package/runtime/trajectory-export.d.ts +3 -3
  241. package/runtime/trajectory-internals.d.ts +2 -1
  242. package/runtime/trajectory-internals.d.ts.map +1 -1
  243. package/runtime/trajectory-persistence.d.ts +5 -5
  244. package/runtime/trajectory-steps-reader.d.ts +1 -1
  245. package/runtime/trajectory-steps-writer.d.ts +1 -1
  246. package/runtime/trajectory-storage.d.ts +4 -4
  247. package/runtime/view-action-affinity.d.ts +18 -15
  248. package/runtime/view-action-affinity.d.ts.map +1 -1
  249. package/runtime/view-action-affinity.js +26 -29
  250. package/runtime/web-search-tools.d.ts +4 -1
  251. package/runtime/web-search-tools.d.ts.map +1 -1
  252. package/runtime/web-search-tools.js +37 -9
  253. package/security/index.d.ts +3 -3
  254. package/services/approval/index.d.ts +9 -0
  255. package/services/approval/index.d.ts.map +1 -0
  256. package/services/approval/index.js +8 -0
  257. package/services/approval/service.d.ts +35 -0
  258. package/services/approval/service.d.ts.map +1 -0
  259. package/services/approval/service.js +40 -0
  260. package/services/approval/sql.d.ts +18 -0
  261. package/services/approval/sql.d.ts.map +1 -0
  262. package/services/approval/sql.js +104 -0
  263. package/services/approval/store.d.ts +39 -0
  264. package/services/approval/store.d.ts.map +1 -0
  265. package/services/approval/store.js +534 -0
  266. package/services/approval/types.d.ts +207 -0
  267. package/services/approval/types.d.ts.map +1 -0
  268. package/services/approval/types.js +34 -0
  269. package/services/character-persistence.d.ts +2 -2
  270. package/services/client-chat-sender.d.ts +1 -1
  271. package/services/config-plugin-manager.d.ts +2 -2
  272. package/services/connector-setup-service.d.ts +1 -1
  273. package/services/cove-quote-x509.d.ts +1 -1
  274. package/services/cove-quote.d.ts +2 -2
  275. package/services/dstack-tee-provider.d.ts +1 -1
  276. package/services/file-storage.d.ts +20 -0
  277. package/services/file-storage.d.ts.map +1 -0
  278. package/services/file-storage.js +70 -0
  279. package/services/global-pause/index.d.ts +8 -0
  280. package/services/global-pause/index.d.ts.map +1 -0
  281. package/services/global-pause/index.js +7 -0
  282. package/services/global-pause/service.d.ts +29 -0
  283. package/services/global-pause/service.d.ts.map +1 -0
  284. package/services/global-pause/service.js +34 -0
  285. package/services/global-pause/store.d.ts +31 -0
  286. package/services/global-pause/store.d.ts.map +1 -0
  287. package/services/global-pause/store.js +83 -0
  288. package/services/handoff/index.d.ts +8 -0
  289. package/services/handoff/index.d.ts.map +1 -0
  290. package/services/handoff/index.js +7 -0
  291. package/services/handoff/service.d.ts +29 -0
  292. package/services/handoff/service.d.ts.map +1 -0
  293. package/services/handoff/service.js +34 -0
  294. package/services/handoff/store.d.ts +76 -0
  295. package/services/handoff/store.d.ts.map +1 -0
  296. package/services/handoff/store.js +148 -0
  297. package/services/index.d.ts +30 -31
  298. package/services/index.d.ts.map +1 -1
  299. package/services/index.js +0 -6
  300. package/services/js-runtime-bridge.d.ts.map +1 -1
  301. package/services/js-runtime-bridge.js +8 -2
  302. package/services/knowledge-graph/index.d.ts +4 -4
  303. package/services/knowledge-graph/service.d.ts +2 -2
  304. package/services/pending-prompts/index.d.ts +8 -0
  305. package/services/pending-prompts/index.d.ts.map +1 -0
  306. package/services/pending-prompts/index.js +7 -0
  307. package/services/pending-prompts/service.d.ts +34 -0
  308. package/services/pending-prompts/service.d.ts.map +1 -0
  309. package/services/pending-prompts/service.js +68 -0
  310. package/services/pending-prompts/store.d.ts +70 -0
  311. package/services/pending-prompts/store.d.ts.map +1 -0
  312. package/services/pending-prompts/store.js +191 -0
  313. package/services/plugin-compiler.d.ts +1 -1
  314. package/services/plugin-installer.d.ts.map +1 -1
  315. package/services/plugin-installer.js +21 -11
  316. package/services/plugin-manager-types.d.ts +1 -1
  317. package/services/proactive-interaction-decider.d.ts +62 -11
  318. package/services/proactive-interaction-decider.d.ts.map +1 -1
  319. package/services/proactive-interaction-decider.js +223 -35
  320. package/services/push/apns-provider.d.ts +1 -1
  321. package/services/push/fcm-provider.d.ts +1 -1
  322. package/services/push/notification-push-service.d.ts +2 -2
  323. package/services/registry-client-app-meta.d.ts +1 -1
  324. package/services/registry-client-endpoints.d.ts +2 -2
  325. package/services/registry-client-local.d.ts +1 -1
  326. package/services/registry-client-network.d.ts +1 -1
  327. package/services/registry-client-queries.d.ts +1 -1
  328. package/services/registry-client.d.ts +3 -3
  329. package/services/relationships-graph.d.ts +1 -1
  330. package/services/remote-capability-cloud-sandbox.d.ts +3 -3
  331. package/services/remote-capability-endpoint-conformance.d.ts +1 -1
  332. package/services/remote-capability-endpoint-provider.d.ts +4 -4
  333. package/services/remote-capability-url-endpoint-providers.d.ts +1 -1
  334. package/services/remote-plugin-adapter.d.ts.map +1 -1
  335. package/services/remote-plugin-adapter.js +3 -0
  336. package/services/remote-plugin-bridge.d.ts.map +1 -1
  337. package/services/remote-plugin-bridge.js +97 -26
  338. package/services/remote-signing-service.d.ts +4 -4
  339. package/services/research-task-executor.d.ts +1 -1
  340. package/services/sandbox-manager.d.ts +1 -1
  341. package/services/self-updater.d.ts +1 -1
  342. package/services/self-updater.d.ts.map +1 -1
  343. package/services/self-updater.js +23 -9
  344. package/services/shell-execution-router.d.ts +1 -1
  345. package/services/shell-execution-router.d.ts.map +1 -1
  346. package/services/shell-execution-router.js +19 -2
  347. package/services/tee-boot-gate-state.d.ts +1 -1
  348. package/services/tee-boot-gate.d.ts +4 -4
  349. package/services/tee-confidential-inference.d.ts +3 -3
  350. package/services/tee-key-release.d.ts +2 -2
  351. package/services/tee-model-key-boot.d.ts +4 -4
  352. package/services/tee-policy.d.ts +1 -1
  353. package/services/tee-production-profile.d.ts +1 -1
  354. package/services/tee-release-policy.d.ts +1 -1
  355. package/services/tee-revocation.d.ts +2 -2
  356. package/services/tee-runtime-config.d.ts +1 -1
  357. package/services/tee-sealed-volume.d.ts +3 -3
  358. package/services/tee-signer-backend.d.ts +3 -3
  359. package/services/update-checker.d.ts +1 -1
  360. package/services/vault-signer-backend.d.ts +1 -1
  361. package/services/vfs-git.d.ts +1 -1
  362. package/test-support/index.d.ts +3 -3
  363. package/triggers/runtime.d.ts +1 -1
  364. package/triggers/scheduling.d.ts +3 -22
  365. package/triggers/scheduling.d.ts.map +1 -1
  366. package/triggers/scheduling.js +2 -214
  367. package/tui/agent-terminal-tui.d.ts.map +1 -1
  368. package/tui/agent-terminal-tui.js +174 -72
  369. package/types/index.d.ts +3 -3
  370. package/api/nfa-routes.d.ts +0 -6
  371. package/api/nfa-routes.d.ts.map +0 -1
  372. package/api/nfa-routes.js +0 -125
  373. package/api/server-auth.d.ts +0 -46
  374. package/api/server-auth.d.ts.map +0 -1
  375. package/api/server-auth.js +0 -504
  376. package/runtime/restart.d.ts +0 -9
  377. package/runtime/restart.d.ts.map +0 -1
  378. package/runtime/restart.js +0 -8
  379. package/test-utils/sqlite-compat.d.ts +0 -23
  380. package/test-utils/sqlite-compat.d.ts.map +0 -1
  381. package/test-utils/sqlite-compat.js +0 -214
@@ -9,7 +9,7 @@ import { createHash } from "node:crypto";
9
9
  import { existsSync, promises as fs } from "node:fs";
10
10
  import path from "node:path";
11
11
  import { fileURLToPath } from "node:url";
12
- import { logger, } from "@elizaos/core";
12
+ import { getViewModalities, logger, resolveViewKind, } from "@elizaos/core";
13
13
  import { generateViewHeroSvgFor } from "@elizaos/shared";
14
14
  import { BUILTIN_VIEWS } from "./builtin-views.js";
15
15
  import { viewSearchIndex } from "./views-search-index.js";
@@ -43,35 +43,44 @@ const warnedLargeBundles = new Set();
43
43
  async function resolvePluginPackageDir(pluginName) {
44
44
  const { createRequire } = await import("node:module");
45
45
  const req = createRequire(import.meta.url);
46
- // Preferred: resolve the package's own package.json directly. Requires the
47
- // package to expose "./package.json" in its exports map.
48
- try {
49
- return path.dirname(req.resolve(`${pluginName}/package.json`));
50
- }
51
- catch {
52
- // Fall through to resolving the package entry instead.
46
+ const packageNames = pluginName.startsWith("@")
47
+ ? [pluginName]
48
+ : [pluginName, `@elizaos/plugin-${pluginName}`];
49
+ for (const packageName of packageNames) {
50
+ // Preferred: resolve the package's own package.json directly. Requires the
51
+ // package to expose "./package.json" in its exports map.
52
+ try {
53
+ return path.dirname(req.resolve(`${packageName}/package.json`));
54
+ }
55
+ catch {
56
+ // Fall through to resolving the package entry instead.
57
+ }
53
58
  }
54
59
  // Fallback: resolve the package main entry (the "." export always exists for
55
60
  // a loadable plugin) and walk up to the directory that owns its package.json.
56
61
  // This keeps view bundles resolvable for plugins that don't export
57
62
  // "./package.json".
58
- try {
59
- let dir = path.dirname(req.resolve(pluginName));
60
- for (let depth = 0; depth < 8; depth++) {
61
- if (await fileExists(path.join(dir, "package.json")))
62
- return dir;
63
- const parent = path.dirname(dir);
64
- if (parent === dir)
65
- break;
66
- dir = parent;
63
+ for (const packageName of packageNames) {
64
+ try {
65
+ let dir = path.dirname(req.resolve(packageName));
66
+ for (let depth = 0; depth < 8; depth++) {
67
+ if (await fileExists(path.join(dir, "package.json")))
68
+ return dir;
69
+ const parent = path.dirname(dir);
70
+ if (parent === dir)
71
+ break;
72
+ dir = parent;
73
+ }
74
+ }
75
+ catch {
76
+ // Package is not reachable from this module under this name.
67
77
  }
68
78
  }
69
- catch {
70
- // Package is not reachable from this module at all.
79
+ for (const packageName of packageNames) {
80
+ const workspaceDir = await resolveWorkspacePluginPackageDir(packageName);
81
+ if (workspaceDir)
82
+ return workspaceDir;
71
83
  }
72
- const workspaceDir = await resolveWorkspacePluginPackageDir(pluginName);
73
- if (workspaceDir)
74
- return workspaceDir;
75
84
  logger.warn({ src: "ViewRegistry", pluginName }, `Could not resolve package directory for plugin "${pluginName}"; its view bundle will be unavailable`);
76
85
  return undefined;
77
86
  }
@@ -211,26 +220,30 @@ export async function registerPluginViews(plugin, pluginDir, runtime) {
211
220
  const resolvedDir = pluginDir ?? (await resolvePluginPackageDir(plugin.name));
212
221
  const registered = [];
213
222
  for (const view of views) {
214
- const entry = await buildEntry(view, plugin.name, resolvedDir);
215
- const key = viewRegistryKey(entry.id, entry.viewType);
216
- const existing = registry.get(key);
217
- if (existing && existing.pluginName !== plugin.name) {
218
- logger.warn({
223
+ for (const viewType of getViewModalities(view)) {
224
+ const entry = await buildEntry({ ...view, viewType }, plugin.name, resolvedDir);
225
+ const key = viewRegistryKey(entry.id, entry.viewType);
226
+ const existing = registry.get(key);
227
+ if (existing && existing.pluginName !== plugin.name) {
228
+ logger.warn({
229
+ src: "ViewRegistry",
230
+ viewId: entry.id,
231
+ viewType: entry.viewType,
232
+ existingPlugin: existing.pluginName,
233
+ incomingPlugin: plugin.name,
234
+ }, `View id "${entry.id}" (${entry.viewType}) from plugin "${plugin.name}" conflicts with plugin "${existing.pluginName}"; keeping existing entry`);
235
+ continue;
236
+ }
237
+ registry.set(key, entry);
238
+ registered.push(entry);
239
+ logger.debug({
219
240
  src: "ViewRegistry",
220
241
  viewId: entry.id,
221
- existingPlugin: existing.pluginName,
222
- incomingPlugin: plugin.name,
223
- }, `View id "${entry.id}" from plugin "${plugin.name}" conflicts with plugin "${existing.pluginName}"; keeping existing entry`);
224
- continue;
242
+ viewType: entry.viewType,
243
+ pluginName: entry.pluginName,
244
+ available: entry.available,
245
+ }, `Registered view "${entry.id}" (${entry.viewType}) from plugin "${plugin.name}"`);
225
246
  }
226
- registry.set(key, entry);
227
- registered.push(entry);
228
- logger.debug({
229
- src: "ViewRegistry",
230
- viewId: entry.id,
231
- pluginName: entry.pluginName,
232
- available: entry.available,
233
- }, `Registered view "${entry.id}" from plugin "${plugin.name}"`);
234
247
  }
235
248
  // Queue embedding computation in the background — non-blocking.
236
249
  if (runtime && registered.length > 0) {
@@ -275,36 +288,43 @@ export function registerBuiltinViews(runtime) {
275
288
  const pluginName = "@elizaos/builtin";
276
289
  const registered = [];
277
290
  for (const view of BUILTIN_VIEWS) {
278
- const viewType = normalizeViewType(view.viewType);
279
- const key = viewRegistryKey(view.id, viewType);
280
- if (registry.has(key)) {
281
- // Already registered (e.g. called twice at startup). Skip silently.
282
- continue;
283
- }
284
- const platform = view.platforms?.[0] ?? "web";
285
- const pluginDir = AGENT_PACKAGE_DIR;
286
- const hasHeroImage = pluginDir
287
- ? hasDeclaredHeroOnDiskSync({
291
+ for (const modality of getViewModalities(view)) {
292
+ const viewType = normalizeViewType(modality);
293
+ const key = viewRegistryKey(view.id, viewType);
294
+ if (registry.has(key)) {
295
+ // Already registered (e.g. called twice at startup). Skip silently.
296
+ continue;
297
+ }
298
+ const platform = view.platforms?.[0] ?? "web";
299
+ const pluginDir = AGENT_PACKAGE_DIR;
300
+ const hasHeroImage = pluginDir
301
+ ? hasDeclaredHeroOnDiskSync({
302
+ pluginDir,
303
+ heroImagePath: view.heroImagePath,
304
+ })
305
+ : false;
306
+ const params = new URLSearchParams();
307
+ if (viewType !== DEFAULT_VIEW_TYPE) {
308
+ params.set("viewType", viewType);
309
+ }
310
+ const query = params.toString();
311
+ const entry = {
312
+ ...view,
313
+ viewType,
314
+ pluginName,
288
315
  pluginDir,
289
- heroImagePath: view.heroImagePath,
290
- })
291
- : false;
292
- const entry = {
293
- ...view,
294
- viewType,
295
- pluginName,
296
- pluginDir,
297
- bundleUrl: undefined,
298
- bundleUrlVersioned: undefined,
299
- heroImageUrl: `/api/views/${encodeURIComponent(view.id)}/hero`,
300
- hasHeroImage,
301
- available: true,
302
- loadedAt,
303
- platform,
304
- builtin: true,
305
- };
306
- registry.set(key, entry);
307
- registered.push(entry);
316
+ bundleUrl: undefined,
317
+ bundleUrlVersioned: undefined,
318
+ heroImageUrl: `/api/views/${encodeURIComponent(view.id)}/hero${query ? `?${query}` : ""}`,
319
+ hasHeroImage,
320
+ available: true,
321
+ loadedAt,
322
+ platform,
323
+ builtin: true,
324
+ };
325
+ registry.set(key, entry);
326
+ registered.push(entry);
327
+ }
308
328
  }
309
329
  // Called on every /api/views request and again during deferred startup, but
310
330
  // registration is idempotent — only the first call adds entries. Stay silent
@@ -324,16 +344,31 @@ export function registerBuiltinViews(runtime) {
324
344
  /**
325
345
  * List all registered views.
326
346
  *
327
- * @param filter.developerMode - When `false` (default) hidden developer-only
328
- * views are excluded. Pass `true` to include them.
347
+ * Visibility follows the four-kind taxonomy ({@link resolveViewKind}):
348
+ * `system`/`release` views are always listed. `developer` views are listed
349
+ * only when `developerMode` is true. `preview` views are listed only when
350
+ * `includeAllKinds` is true. The dashboard's `GET /api/views` passes
351
+ * `includeAllKinds: true` so the client receives every view (with its
352
+ * `viewKind`) and applies the user's Settings toggles itself — the server
353
+ * cannot know whether it is talking to a dev build or which toggles are on.
354
+ *
355
+ * @param filter.developerMode - Include `developer`-kind views. Default false.
356
+ * @param filter.includeAllKinds - Include every kind regardless of toggle
357
+ * (developer + preview). Default false.
329
358
  */
330
359
  export function listViews(filter) {
331
360
  const developerMode = filter?.developerMode ?? false;
361
+ const includeAllKinds = filter?.includeAllKinds ?? false;
332
362
  const requestedViewType = filter?.viewType ?? DEFAULT_VIEW_TYPE;
333
363
  const byId = new Map();
334
364
  for (const entry of registry.values()) {
335
- if (entry.developerOnly && !developerMode)
336
- continue;
365
+ if (!includeAllKinds) {
366
+ const kind = resolveViewKind(entry);
367
+ if (kind === "preview")
368
+ continue;
369
+ if (kind === "developer" && !developerMode)
370
+ continue;
371
+ }
337
372
  const existing = byId.get(entry.id);
338
373
  if (!existing) {
339
374
  if (entry.viewType === requestedViewType ||
@@ -19,7 +19,7 @@
19
19
  */
20
20
  import { type IAgentRuntime, type RouteRequestMeta, type ViewType } from "@elizaos/core";
21
21
  import { type RouteHelpers } from "@elizaos/shared";
22
- import { type ViewInteractResult } from "./pending-request-map.ts";
22
+ import { type ViewInteractResult } from "./pending-request-map.js";
23
23
  export interface CurrentViewState {
24
24
  viewId: string;
25
25
  viewPath: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"views-routes.d.ts","sourceRoot":"","sources":["../../src/api/views-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,iBAAiB,CAAC;AAOlE,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAyLlC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,M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B,OAAO,CAAC,OAAO,CAAC,CA82BlB"}
@@ -22,7 +22,9 @@ import { promises as fs } from "node:fs";
22
22
  import path from "node:path";
23
23
  import { EventType, logger, } from "@elizaos/core";
24
24
  import { readJsonBody } from "@elizaos/shared";
25
- import { clearActiveViewContext, setActiveViewContext, setActiveViewElements, } from "../runtime/view-action-affinity.js";
25
+ import { AGENT_SURFACE_CAPABILITY_IDS } from "@elizaos/ui/agent-surface/types";
26
+ import { STANDARD_CAPABILITIES } from "@elizaos/ui/views/view-interact-protocol";
27
+ import { clearActiveViewContext, getActiveViewContext, setActiveViewContext, setActiveViewElements, } from "../runtime/view-action-affinity.js";
26
28
  import { PendingRequestMap, } from "./pending-request-map.js";
27
29
  import { detectClientPlatform, isDynamicLoadingAllowed, } from "./platform-detect.js";
28
30
  import { findHeroOnDisk, generateViewHeroSvg, getBundleDiskPath, getView, listViews, } from "./views-registry.js";
@@ -150,14 +152,17 @@ function parseHostExternalSpecifiers(url) {
150
152
  .map((item) => item.trim())
151
153
  .filter(Boolean);
152
154
  }
153
- /** Standard capabilities every view supports even without an `interact` export. */
155
+ /**
156
+ * Capabilities accepted on any view without a matching declaration in
157
+ * `entry.capabilities` — the protocol's standard caps (get-state / refresh /
158
+ * focus-element / get-text / click-element / fill-input) plus the agent-surface
159
+ * caps the shell registry handles generically (list-elements / agent-click /
160
+ * agent-fill / …). Derived from the single canonical ui-side sources so the
161
+ * route never drifts from what the frontend actually dispatches. (#8798)
162
+ */
154
163
  const STANDARD_CAPABILITY_IDS = new Set([
155
- "get-state",
156
- "refresh",
157
- "focus-element",
158
- "get-text",
159
- "click-element",
160
- "fill-input",
164
+ ...Object.values(STANDARD_CAPABILITIES),
165
+ ...AGENT_SURFACE_CAPABILITY_IDS,
161
166
  ]);
162
167
  /** Module-level map of pending interact requests awaiting a frontend result. */
163
168
  const pendingInteractRequests = new PendingRequestMap();
@@ -271,11 +276,14 @@ export async function handleViewsRoutes(ctx) {
271
276
  }
272
277
  // ── GET /api/views ────────────────────────────────────────────────────────
273
278
  if (method === "GET" && (pathname === PREFIX || pathname === `${PREFIX}/`)) {
274
- const developerMode = ctx.developerMode ?? url.searchParams.get("developerMode") === "true";
275
279
  const platform = detectClientPlatform(req);
276
280
  const dynamicAllowed = isDynamicLoadingAllowed(platform);
277
281
  const viewType = parseViewTypeParam(url.searchParams.get("viewType"));
278
- const allViews = listViews({ developerMode, viewType });
282
+ // Return every view (all four kinds) with its `viewKind` so the client can
283
+ // apply the user's Settings toggles + build defaults itself. The server has
284
+ // no way to know whether it is talking to a dev build or which kinds the
285
+ // user enabled, so kind-gating is a client responsibility.
286
+ const allViews = listViews({ includeAllKinds: true, viewType });
279
287
  // On restricted platforms (iOS/Android store builds), only surface views
280
288
  // without a dynamic bundle URL (already in-process).
281
289
  const filtered = dynamicAllowed
@@ -453,7 +461,7 @@ export async function handleViewsRoutes(ctx) {
453
461
  // `/api/views/:id/chunk-abc.js`, so serve files beside the root bundle.
454
462
  if ((method === "GET" || method === "HEAD") &&
455
463
  subResource !== "" &&
456
- !["hero", "navigate", "interact"].includes(subResource)) {
464
+ !["hero", "navigate", "interact", "elements", "activate"].includes(subResource)) {
457
465
  const clientPlatform = detectClientPlatform(req);
458
466
  if (!isDynamicLoadingAllowed(clientPlatform)) {
459
467
  error(res, "Dynamic view asset loading is not permitted on this platform.", 403);
@@ -642,6 +650,9 @@ export async function handleViewsRoutes(ctx) {
642
650
  viewLabel,
643
651
  viewType: resolvedViewType,
644
652
  viewPath,
653
+ // Carry freshness so Stage-1 can acknowledge a just-happened switch (#8788).
654
+ ...(switchedAt ? { switchedAt } : {}),
655
+ ...(source ? { source } : {}),
645
656
  });
646
657
  // Emit the first-class VIEW_SWITCHED interaction event (#8792) so a
647
658
  // proactive decider can comment. Only on a real change (no spam on
@@ -702,6 +713,60 @@ export async function handleViewsRoutes(ctx) {
702
713
  json(res, { ok: true, viewId: id, accepted, count: elements.length });
703
714
  return true;
704
715
  }
716
+ // ── POST /api/views/:id/activate ─────────────────────────────────────────
717
+ // Activate one addressable control in a view by its element id (the focused
718
+ // button's agent id in a spatial/TUI mount). This is the terminal host's
719
+ // "a focused view button was pressed" → agent path.
720
+ //
721
+ // Contract:
722
+ // body: { elementId: string }
723
+ // - The element is resolved against the active-view element snapshot
724
+ // (reported via POST /:id/elements) for observability/context — absent
725
+ // when no snapshot was reported, which is fine.
726
+ // - The activation is dispatched as the STANDARD `click-element` capability
727
+ // through the exact same interact path as POST /:id/interact (a
728
+ // `serverInteract` handler when present, else a frontend round-trip),
729
+ // reusing the established CLICK_ELEMENT semantics rather than inventing a
730
+ // new dispatch.
731
+ // response: { ok, viewId, elementId, element?, dispatch: <interact result> }
732
+ if (method === "POST" && subResource === "activate") {
733
+ const body = await readJsonBody(req, res);
734
+ if (!body)
735
+ return true;
736
+ const elementId = typeof body.elementId === "string" && body.elementId.length > 0
737
+ ? body.elementId
738
+ : null;
739
+ if (!elementId) {
740
+ error(res, "Missing elementId in activate body", 400);
741
+ return true;
742
+ }
743
+ const viewType = parseViewTypeValue(body.viewType) ??
744
+ parseViewTypeParam(url.searchParams.get("viewType"));
745
+ const entry = getView(id, { viewType });
746
+ if (!entry) {
747
+ error(res, `View "${id}" not found`, 404);
748
+ return true;
749
+ }
750
+ // Resolve the element from the active-view snapshot for context (the planner
751
+ // reports it via /:id/elements). Only used when this view is the foreground
752
+ // active view; absent otherwise — the click still dispatches by id.
753
+ const active = getActiveViewContext();
754
+ const element = active?.viewId === id
755
+ ? active.elements?.find((el) => el.id === elementId)
756
+ : undefined;
757
+ const capability = STANDARD_CAPABILITIES.CLICK_ELEMENT;
758
+ const params = { elementId, id: elementId };
759
+ logger.info({ src: "ViewsRoutes", viewId: id, elementId, capability }, `[ViewsRoutes] Activate element "${elementId}" on view "${id}"`);
760
+ const dispatch = await dispatchViewInteract(entry, id, capability, params, ctx.broadcastWs);
761
+ json(res, {
762
+ ok: dispatch.success,
763
+ viewId: id,
764
+ elementId,
765
+ ...(element ? { element } : {}),
766
+ dispatch,
767
+ });
768
+ return true;
769
+ }
705
770
  // ── POST /api/views/interact-result ──────────────────────────────────────
706
771
  // Called by the frontend over HTTP (or proxied from WS) when a view has
707
772
  // finished handling an interact request. Resolves the pending promise so
@@ -818,9 +883,61 @@ export async function handleViewsRoutes(ctx) {
818
883
  }
819
884
  return false;
820
885
  }
821
- // ---------------------------------------------------------------------------
822
- // Private helpers
823
- // ---------------------------------------------------------------------------
886
+ /**
887
+ * Dispatch a capability to a view, reusing the established interact semantics:
888
+ * a `serverInteract` handler when the view declares one, else a frontend
889
+ * `view:interact` WebSocket round-trip resolved via the pending-request map.
890
+ * Shared by POST /:id/activate (CLICK_ELEMENT) so activation never re-implements
891
+ * the dispatch.
892
+ */
893
+ async function dispatchViewInteract(entry, viewId, capability, params, broadcastWs, timeoutMs = 5_000) {
894
+ const requestId = randomUUID();
895
+ if (typeof entry.serverInteract === "function") {
896
+ try {
897
+ const result = await entry.serverInteract(capability, params);
898
+ broadcastWs?.({
899
+ type: "view:event",
900
+ viewEventType: `view:${viewId}:updated`,
901
+ payload: { viewId, capability },
902
+ });
903
+ return { requestId, success: resultSuccess(result), result };
904
+ }
905
+ catch (err) {
906
+ logger.warn({ src: "ViewsRoutes", viewId, capability, requestId, err }, `[ViewsRoutes] Server interaction failed for view "${viewId}"`);
907
+ return {
908
+ requestId,
909
+ success: false,
910
+ error: err instanceof Error ? err.message : String(err),
911
+ };
912
+ }
913
+ }
914
+ const resultPromise = pendingInteractRequests.waitFor(requestId, timeoutMs);
915
+ broadcastWs?.({
916
+ type: "view:interact",
917
+ viewId,
918
+ viewType: entry.viewType,
919
+ capability,
920
+ params,
921
+ requestId,
922
+ });
923
+ try {
924
+ const result = (await resultPromise);
925
+ return {
926
+ requestId,
927
+ success: result.success,
928
+ result: result.result,
929
+ ...(result.error ? { error: result.error } : {}),
930
+ };
931
+ }
932
+ catch (err) {
933
+ logger.warn({ src: "ViewsRoutes", viewId, capability, requestId, err }, `[ViewsRoutes] Interact timed out for view "${viewId}"`);
934
+ return {
935
+ requestId,
936
+ success: false,
937
+ error: `View "${viewId}" did not respond to capability "${capability}" within ${timeoutMs}ms`,
938
+ };
939
+ }
940
+ }
824
941
  function resultSuccess(result) {
825
942
  if (!result || typeof result !== "object" || Array.isArray(result)) {
826
943
  return true;
@@ -10,7 +10,7 @@
10
10
  * const results = await viewSearchIndex.search(query, runtime, 10);
11
11
  */
12
12
  import type { IAgentRuntime } from "@elizaos/core";
13
- import type { ViewRegistryEntry } from "./view-registry-types.ts";
13
+ import type { ViewRegistryEntry } from "./view-registry-types.js";
14
14
  export interface ViewSearchEntry {
15
15
  viewId: string;
16
16
  viewType: ViewRegistryEntry["viewType"];
@@ -1,7 +1,7 @@
1
1
  import type { AgentRuntime } from "@elizaos/core";
2
- import type { ElizaConfig } from "../config/config.ts";
3
- import { type EvmSigningCapabilityKind, resolveEvmSigningCapability } from "../services/evm-signing-capability.ts";
4
- import { getWalletAddresses } from "./wallet.ts";
2
+ import type { ElizaConfig } from "../config/config.js";
3
+ import { type EvmSigningCapabilityKind, resolveEvmSigningCapability } from "../services/evm-signing-capability.js";
4
+ import { getWalletAddresses } from "./wallet.js";
5
5
  export declare const EVM_PLUGIN_PACKAGE = "@elizaos/plugin-wallet";
6
6
  export interface WalletCapabilityStatus {
7
7
  walletSource: "local" | "managed" | "none";
@@ -1,5 +1,5 @@
1
1
  import { type WalletConfigUpdateRequest, type WalletRpcChain, type WalletRpcCredentialKey, type WalletRpcSelections } from "@elizaos/shared";
2
- import type { ElizaConfig } from "../config/config.ts";
2
+ import type { ElizaConfig } from "../config/config.js";
3
3
  export declare const DEFAULT_PUBLIC_BSC_RPC_URLS: readonly ["https://bsc.publicnode.com/", "https://bsc-rpc.publicnode.com/", "https://binance.llamarpc.com/", "https://rpc.ankr.com/bsc", "https://bsc-dataseed.bnbchain.org/", "https://bsc-dataseed1.binance.org/", "https://bsc-dataseed2.binance.org/", "https://bsc-dataseed3.binance.org/"];
4
4
  export declare const DEFAULT_PUBLIC_BSC_TESTNET_RPC_URLS: readonly ["https://bsc-testnet.publicnode.com/", "https://bsc-testnet-rpc.publicnode.com/", "https://data-seed-prebsc-1-s1.binance.org:8545/"];
5
5
  export declare const DEFAULT_PUBLIC_ETHEREUM_RPC_URLS: readonly ["https://ethereum.publicnode.com/", "https://ethereum-rpc.publicnode.com/", "https://eth.llamarpc.com/", "https://rpc.ankr.com/eth"];
package/api/wallet.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { KeyValidationResult, SolanaTokenBalance, WalletAddresses, WalletChain, WalletGenerateResult, WalletImportResult, WalletKeys } from "@elizaos/shared";
2
2
  export type { BscTradeExecuteRequest, BscTradeExecuteResponse, BscTradeExecutionResult, BscTradePreflightRequest, BscTradePreflightResponse, BscTradeQuoteRequest, BscTradeQuoteResponse, BscTradeSide, BscTradeTxStatus, BscTradeTxStatusResponse, BscTransferExecuteRequest, BscTransferExecuteResponse, BscTransferExecutionResult, BscUnsignedApprovalTx, BscUnsignedTradeTx, BscUnsignedTransferTx, EvmChainBalance, EvmTokenBalance, KeyValidationResult, SolanaTokenBalance, TradePermissionMode, WalletAddresses, WalletBalancesResponse, WalletChain, WalletConfigStatus, WalletGenerateResult, WalletImportResult, WalletKeys, WalletTradeLedgerEntry, WalletTradeSource, WalletTradingProfileResponse, WalletTradingProfileSourceFilter, WalletTradingProfileWindow, } from "@elizaos/shared";
3
- export { computeValueUsd, DEX_PRICE_TIMEOUT_MS, DEXPAPRIKA_CHAIN_MAP, DEXSCREENER_CHAIN_MAP, type DexScreenerPair, type DexTokenMeta, fetchDexPaprikaPrices, fetchDexPrices, fetchDexScreenerPrices, WRAPPED_NATIVE, } from "./wallet-dex-prices.ts";
4
- export { type AnkrTokenAsset, DEFAULT_EVM_CHAINS, type EvmProviderKeys, fetchEvmBalances, resolveEvmProviderKeys, } from "./wallet-evm-balance.ts";
3
+ export { computeValueUsd, DEX_PRICE_TIMEOUT_MS, DEXPAPRIKA_CHAIN_MAP, DEXSCREENER_CHAIN_MAP, type DexScreenerPair, type DexTokenMeta, fetchDexPaprikaPrices, fetchDexPrices, fetchDexScreenerPrices, WRAPPED_NATIVE, } from "./wallet-dex-prices.js";
4
+ export { type AnkrTokenAsset, DEFAULT_EVM_CHAINS, type EvmProviderKeys, fetchEvmBalances, resolveEvmProviderKeys, } from "./wallet-evm-balance.js";
5
5
  export declare const MANAGED_EVM_ADDRESS_ENV_KEY = "ELIZA_MANAGED_EVM_ADDRESS";
6
6
  export declare const MANAGED_SOLANA_ADDRESS_ENV_KEY = "ELIZA_MANAGED_SOLANA_ADDRESS";
7
7
  export declare const CLOUD_EVM_ADDRESS_ENV_KEY = "ELIZA_CLOUD_EVM_ADDRESS";
@@ -18,7 +18,7 @@ export declare function validatePrivateKey(key: string): KeyValidationResult;
18
18
  export declare function maskSecret(value: string): string;
19
19
  export declare function generateWalletKeys(): WalletKeys;
20
20
  export declare function generateWalletForChain(chain: WalletChain): WalletGenerateResult;
21
- export { syncSolanaPublicKeyEnv } from "./wallet-env-sync.ts";
21
+ export { syncSolanaPublicKeyEnv } from "./wallet-env-sync.js";
22
22
  export declare function setSolanaWalletEnv(privateKey: string): string | null;
23
23
  /** Validate key, store in process.env. Caller persists to config if needed. */
24
24
  export declare function importWallet(chain: WalletChain, privateKey: string): WalletImportResult;
@@ -1 +1 @@
1
- {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/api/wallet.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACX,MAAM,iBAAiB,CAAC;AAWzB,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B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3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/api/wallet.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACX,MAAM,iBAAiB,CAAC;AAWzB,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,4BAA4B,EAC5B,gCAAgC,EAChC,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,cAAc,GACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,KAAK,cAAc,EACnB,kBAAkB,EAClB,KAAK,eAAe,EACpB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AAKjC,eAAO,MAAM,2BAA2B,8BAA8B,CAAC;AACvE,eAAO,MAAM,8BAA8B,iCAAiC,CAAC;AAC7E,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AACnE,eAAO,MAAM,4BAA4B,+BAA+B,CAAC;AACzE,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAC7D,eAAO,MAAM,4BAA4B,yBA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C,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IACT,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B,CAAC,CA+FD;AAED,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC;IACT,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B,CAAC,CA4FD"}
package/api/wallet.js CHANGED
@@ -346,9 +346,10 @@ export function generateWalletForChain(chain) {
346
346
  privateKey: sol.privateKey,
347
347
  };
348
348
  }
349
- // Extracted to wallet-env-sync.ts to break circular dependency with config/config.ts.
350
- // Local import for internal use (setSolanaWalletEnv below), plus re-export for
351
- // backward compatibility so existing consumers of wallet.js keep working.
349
+ // `syncSolanaPublicKeyEnv` lives in wallet-env-sync.ts to avoid a circular
350
+ // dependency with config/config.ts. Imported here for internal use
351
+ // (setSolanaWalletEnv below) and re-exported so consumers of this module
352
+ // (e.g. runtime/eliza.ts) can reach it through wallet.ts.
352
353
  import { syncSolanaPublicKeyEnv } from "./wallet-env-sync.js";
353
354
  export { syncSolanaPublicKeyEnv } from "./wallet-env-sync.js";
354
355
  export function setSolanaWalletEnv(privateKey) {
@@ -9,7 +9,7 @@
9
9
  import type http from "node:http";
10
10
  import type { AgentRuntime, Task, UUID } from "@elizaos/core";
11
11
  import type { ReadJsonBodyOptions } from "@elizaos/shared";
12
- import type { TriggerSummary } from "../triggers/types.ts";
12
+ import type { TriggerSummary } from "../triggers/types.js";
13
13
  export interface WorkbenchTodoView {
14
14
  id: string;
15
15
  name: string;
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Workbench task/todo normalization helpers.
3
3
  *
4
- * Extracted from server.ts — used exclusively by workbench-routes.ts
5
- * to transform elizaOS Task records into the WorkbenchTaskView / WorkbenchTodoView
6
- * shapes consumed by the dashboard UI.
4
+ * Used exclusively by workbench-routes.ts to transform elizaOS Task records
5
+ * into the WorkbenchTaskView / WorkbenchTodoView shapes consumed by the
6
+ * dashboard UI.
7
7
  */
8
8
  import type { Task } from "@elizaos/core";
9
9
  export declare const WORKBENCH_TODO_TAG = "workbench-todo";
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Workbench task/todo normalization helpers.
3
3
  *
4
- * Extracted from server.ts — used exclusively by workbench-routes.ts
5
- * to transform elizaOS Task records into the WorkbenchTaskView / WorkbenchTodoView
6
- * shapes consumed by the dashboard UI.
4
+ * Used exclusively by workbench-routes.ts to transform elizaOS Task records
5
+ * into the WorkbenchTaskView / WorkbenchTodoView shapes consumed by the
6
+ * dashboard UI.
7
7
  */
8
8
  import { readTriggerConfig } from "../triggers/runtime.js";
9
9
  // ---------------------------------------------------------------------------
@@ -1,5 +1,5 @@
1
- export type { WorkbenchRouteContext } from "./workbench-context.ts";
2
- import type { WorkbenchRouteContext } from "./workbench-context.ts";
1
+ export type { WorkbenchRouteContext } from "./workbench-context.js";
2
+ import type { WorkbenchRouteContext } from "./workbench-context.js";
3
3
  export declare const WORKBENCH_BOOTSTRAP_TODO_NAME = "Get the user's name and understand what they need help with";
4
4
  export declare function handleWorkbenchRoutes(ctx: WorkbenchRouteContext): Promise<boolean>;
5
5
  //# sourceMappingURL=workbench-routes.d.ts.map
@@ -1,3 +1,3 @@
1
- import type { WorkbenchRouteContext } from "./workbench-context.ts";
1
+ import type { WorkbenchRouteContext } from "./workbench-context.js";
2
2
  export declare function handleWorkbenchVfsRoutes(ctx: WorkbenchRouteContext): Promise<boolean>;
3
3
  //# sourceMappingURL=workbench-vfs-routes.d.ts.map
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * Pure helpers for the WebSocket event-buffer replay on (re)connect.
3
3
  *
4
- * Extracted from server.ts so the cursor-replay slice logic can be unit-tested
5
- * in isolation. See loadperf research report 05 (Network & Data Sync),
4
+ * See loadperf research report 05 (Network & Data Sync),
6
5
  * Finding 4: on every (re)connect the server replays the tail of
7
6
  * `state.eventBuffer`, re-flooding the client with up to `DEFAULT_REPLAY_LIMIT`
8
7
  * historical envelopes even after a brief reconnect. A client that tracks the
@@ -1 +1 @@
1
- {"version":3,"file":"ws-event-replay.d.ts","sourceRoot":"","sources":["../../src/api/ws-event-replay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAYnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC7B,MAAM,GAAG,IAAI,CAQf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,eAAe,EAC1D,MAAM,EAAE,SAAS,CAAC,EAAE,EACpB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,GAAE,MAA6B,GACnC,CAAC,EAAE,CAUL"}
1
+ {"version":3,"file":"ws-event-replay.d.ts","sourceRoot":"","sources":["../../src/api/ws-event-replay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAYnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC7B,MAAM,GAAG,IAAI,CAQf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,eAAe,EAC1D,MAAM,EAAE,SAAS,CAAC,EAAE,EACpB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,GAAE,MAA6B,GACnC,CAAC,EAAE,CAUL"}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * Pure helpers for the WebSocket event-buffer replay on (re)connect.
3
3
  *
4
- * Extracted from server.ts so the cursor-replay slice logic can be unit-tested
5
- * in isolation. See loadperf research report 05 (Network & Data Sync),
4
+ * See loadperf research report 05 (Network & Data Sync),
6
5
  * Finding 4: on every (re)connect the server replays the tail of
7
6
  * `state.eventBuffer`, re-flooding the client with up to `DEFAULT_REPLAY_LIMIT`
8
7
  * historical envelopes even after a brief reconnect. A client that tracks the
@@ -8,8 +8,8 @@
8
8
  */
9
9
  import type http from "node:http";
10
10
  import { type Service } from "@elizaos/core";
11
- import type { ElizaConfig } from "../config/config.ts";
12
- import type { CloudProxyConfigLike } from "../types/config-like.ts";
11
+ import type { ElizaConfig } from "../config/config.js";
12
+ import type { CloudProxyConfigLike } from "../types/config-like.js";
13
13
  interface XRelayRuntime {
14
14
  getService(serviceType: string): Service | null;
15
15
  getSetting?: (key: string) => unknown;
@@ -0,0 +1,4 @@
1
+ import type { Route } from "@elizaos/core";
2
+ export declare function routeNeedsX402Validation(route: Route): boolean;
3
+ export declare function runtimeRoutesNeedX402Validation(routes: readonly Route[] | null | undefined): boolean;
4
+ //# sourceMappingURL=x402-route-validation.d.ts.map