@elizaos/agent 0.25.9 → 2.0.0-alpha.151

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 (2938) hide show
  1. package/LICENSE +1 -1
  2. package/apps/app-companion/src/actions/emote.d.ts +10 -0
  3. package/apps/app-companion/src/actions/emote.d.ts.map +1 -0
  4. package/apps/app-companion/src/actions/emote.js +79 -0
  5. package/apps/app-companion/src/emotes/catalog.d.ts +31 -0
  6. package/apps/app-companion/src/emotes/catalog.d.ts.map +1 -0
  7. package/apps/app-companion/src/emotes/catalog.js +402 -0
  8. package/apps/app-companion/src/plugin.d.ts +9 -0
  9. package/apps/app-companion/src/plugin.d.ts.map +1 -0
  10. package/apps/app-companion/src/plugin.js +15 -0
  11. package/apps/app-knowledge/src/routes.d.ts +23 -0
  12. package/apps/app-knowledge/src/routes.d.ts.map +1 -0
  13. package/apps/app-knowledge/src/routes.js +956 -0
  14. package/apps/app-knowledge/src/service-loader.d.ts +51 -0
  15. package/apps/app-knowledge/src/service-loader.d.ts.map +1 -0
  16. package/apps/app-knowledge/src/service-loader.js +34 -0
  17. package/apps/app-lifeops/src/action.d.ts +3 -0
  18. package/apps/app-lifeops/src/action.d.ts.map +1 -0
  19. package/apps/app-lifeops/src/action.js +332 -0
  20. package/apps/app-lifeops/src/actions/calendar.d.ts +19 -0
  21. package/apps/app-lifeops/src/actions/calendar.d.ts.map +1 -0
  22. package/apps/app-lifeops/src/actions/calendar.js +3143 -0
  23. package/apps/app-lifeops/src/actions/gmail.d.ts +33 -0
  24. package/apps/app-lifeops/src/actions/gmail.d.ts.map +1 -0
  25. package/apps/app-lifeops/src/actions/gmail.js +1734 -0
  26. package/apps/app-lifeops/src/actions/inbox-digest.d.ts +2 -0
  27. package/apps/app-lifeops/src/actions/inbox-digest.d.ts.map +1 -0
  28. package/apps/app-lifeops/src/actions/inbox-digest.js +1 -0
  29. package/apps/app-lifeops/src/actions/inbox-respond.d.ts +2 -0
  30. package/apps/app-lifeops/src/actions/inbox-respond.d.ts.map +1 -0
  31. package/apps/app-lifeops/src/actions/inbox-respond.js +1 -0
  32. package/apps/app-lifeops/src/actions/inbox-triage.d.ts +2 -0
  33. package/apps/app-lifeops/src/actions/inbox-triage.d.ts.map +1 -0
  34. package/apps/app-lifeops/src/actions/inbox-triage.js +1 -0
  35. package/apps/app-lifeops/src/actions/inbox.d.ts +3 -0
  36. package/apps/app-lifeops/src/actions/inbox.d.ts.map +1 -0
  37. package/apps/app-lifeops/src/actions/inbox.js +856 -0
  38. package/apps/app-lifeops/src/actions/life-goal-extractor.d.ts +69 -0
  39. package/apps/app-lifeops/src/actions/life-goal-extractor.d.ts.map +1 -0
  40. package/apps/app-lifeops/src/actions/life-goal-extractor.js +354 -0
  41. package/apps/app-lifeops/src/actions/life-param-extractor.d.ts +78 -0
  42. package/apps/app-lifeops/src/actions/life-param-extractor.d.ts.map +1 -0
  43. package/apps/app-lifeops/src/actions/life-param-extractor.js +423 -0
  44. package/apps/app-lifeops/src/actions/life-recent-context.d.ts +9 -0
  45. package/apps/app-lifeops/src/actions/life-recent-context.d.ts.map +1 -0
  46. package/apps/app-lifeops/src/actions/life-recent-context.js +84 -0
  47. package/apps/app-lifeops/src/actions/life-update-extractor.d.ts +27 -0
  48. package/apps/app-lifeops/src/actions/life-update-extractor.d.ts.map +1 -0
  49. package/apps/app-lifeops/src/actions/life-update-extractor.js +195 -0
  50. package/apps/app-lifeops/src/actions/life.d.ts +9 -0
  51. package/apps/app-lifeops/src/actions/life.d.ts.map +1 -0
  52. package/apps/app-lifeops/src/actions/life.extractor.d.ts +18 -0
  53. package/apps/app-lifeops/src/actions/life.extractor.d.ts.map +1 -0
  54. package/apps/app-lifeops/src/actions/life.extractor.js +264 -0
  55. package/apps/app-lifeops/src/actions/life.js +3379 -0
  56. package/apps/app-lifeops/src/actions/lifeops-extraction-config.d.ts +16 -0
  57. package/apps/app-lifeops/src/actions/lifeops-extraction-config.d.ts.map +1 -0
  58. package/apps/app-lifeops/src/actions/lifeops-extraction-config.js +25 -0
  59. package/apps/app-lifeops/src/actions/lifeops-google-helpers.d.ts +62 -0
  60. package/apps/app-lifeops/src/actions/lifeops-google-helpers.d.ts.map +1 -0
  61. package/apps/app-lifeops/src/actions/lifeops-google-helpers.js +607 -0
  62. package/apps/app-lifeops/src/actions/timezone-normalization.d.ts +3 -0
  63. package/apps/app-lifeops/src/actions/timezone-normalization.d.ts.map +1 -0
  64. package/apps/app-lifeops/src/actions/timezone-normalization.js +105 -0
  65. package/apps/app-lifeops/src/actions/update-owner-profile.d.ts +3 -0
  66. package/apps/app-lifeops/src/actions/update-owner-profile.d.ts.map +1 -0
  67. package/apps/app-lifeops/src/actions/update-owner-profile.js +131 -0
  68. package/apps/app-lifeops/src/inbox/channel-deep-links.d.ts +20 -0
  69. package/apps/app-lifeops/src/inbox/channel-deep-links.d.ts.map +1 -0
  70. package/apps/app-lifeops/src/inbox/channel-deep-links.js +185 -0
  71. package/apps/app-lifeops/src/inbox/config.d.ts +7 -0
  72. package/apps/app-lifeops/src/inbox/config.d.ts.map +1 -0
  73. package/apps/app-lifeops/src/inbox/config.js +59 -0
  74. package/apps/app-lifeops/src/inbox/message-fetcher.d.ts +33 -0
  75. package/apps/app-lifeops/src/inbox/message-fetcher.d.ts.map +1 -0
  76. package/apps/app-lifeops/src/inbox/message-fetcher.js +252 -0
  77. package/apps/app-lifeops/src/inbox/reflection.d.ts +45 -0
  78. package/apps/app-lifeops/src/inbox/reflection.d.ts.map +1 -0
  79. package/apps/app-lifeops/src/inbox/reflection.js +157 -0
  80. package/apps/app-lifeops/src/inbox/repository.d.ts +53 -0
  81. package/apps/app-lifeops/src/inbox/repository.d.ts.map +1 -0
  82. package/apps/app-lifeops/src/inbox/repository.js +362 -0
  83. package/apps/app-lifeops/src/inbox/triage-classifier.d.ts +17 -0
  84. package/apps/app-lifeops/src/inbox/triage-classifier.d.ts.map +1 -0
  85. package/apps/app-lifeops/src/inbox/triage-classifier.js +209 -0
  86. package/apps/app-lifeops/src/inbox/types.d.ts +130 -0
  87. package/apps/app-lifeops/src/inbox/types.d.ts.map +1 -0
  88. package/apps/app-lifeops/src/inbox/types.js +1 -0
  89. package/apps/app-lifeops/src/lifeops/app-state.d.ts +11 -0
  90. package/apps/app-lifeops/src/lifeops/app-state.d.ts.map +1 -0
  91. package/apps/app-lifeops/src/lifeops/app-state.js +32 -0
  92. package/apps/app-lifeops/src/lifeops/apple-reminders.d.ts +58 -0
  93. package/apps/app-lifeops/src/lifeops/apple-reminders.d.ts.map +1 -0
  94. package/apps/app-lifeops/src/lifeops/apple-reminders.js +325 -0
  95. package/apps/app-lifeops/src/lifeops/defaults.d.ts +24 -0
  96. package/apps/app-lifeops/src/lifeops/defaults.d.ts.map +1 -0
  97. package/apps/app-lifeops/src/lifeops/defaults.js +205 -0
  98. package/apps/app-lifeops/src/lifeops/engine.d.ts +8 -0
  99. package/apps/app-lifeops/src/lifeops/engine.d.ts.map +1 -0
  100. package/apps/app-lifeops/src/lifeops/engine.js +389 -0
  101. package/apps/app-lifeops/src/lifeops/goal-grounding.d.ts +54 -0
  102. package/apps/app-lifeops/src/lifeops/goal-grounding.d.ts.map +1 -0
  103. package/apps/app-lifeops/src/lifeops/goal-grounding.js +147 -0
  104. package/apps/app-lifeops/src/lifeops/goal-semantic-evaluator.d.ts +12 -0
  105. package/apps/app-lifeops/src/lifeops/goal-semantic-evaluator.d.ts.map +1 -0
  106. package/apps/app-lifeops/src/lifeops/goal-semantic-evaluator.js +154 -0
  107. package/apps/app-lifeops/src/lifeops/google-api-error.d.ts +7 -0
  108. package/apps/app-lifeops/src/lifeops/google-api-error.d.ts.map +1 -0
  109. package/apps/app-lifeops/src/lifeops/google-api-error.js +35 -0
  110. package/apps/app-lifeops/src/lifeops/google-calendar.d.ts +53 -0
  111. package/apps/app-lifeops/src/lifeops/google-calendar.d.ts.map +1 -0
  112. package/apps/app-lifeops/src/lifeops/google-calendar.js +268 -0
  113. package/apps/app-lifeops/src/lifeops/google-connector-gateway.d.ts +19 -0
  114. package/apps/app-lifeops/src/lifeops/google-connector-gateway.d.ts.map +1 -0
  115. package/apps/app-lifeops/src/lifeops/google-connector-gateway.js +65 -0
  116. package/apps/app-lifeops/src/lifeops/google-fetch.d.ts +11 -0
  117. package/apps/app-lifeops/src/lifeops/google-fetch.d.ts.map +1 -0
  118. package/apps/app-lifeops/src/lifeops/google-fetch.js +85 -0
  119. package/apps/app-lifeops/src/lifeops/google-gmail.d.ts +54 -0
  120. package/apps/app-lifeops/src/lifeops/google-gmail.d.ts.map +1 -0
  121. package/apps/app-lifeops/src/lifeops/google-gmail.js +471 -0
  122. package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts +127 -0
  123. package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts.map +1 -0
  124. package/apps/app-lifeops/src/lifeops/google-managed-client.js +294 -0
  125. package/apps/app-lifeops/src/lifeops/google-oauth.d.ts +61 -0
  126. package/apps/app-lifeops/src/lifeops/google-oauth.d.ts.map +1 -0
  127. package/apps/app-lifeops/src/lifeops/google-oauth.js +491 -0
  128. package/apps/app-lifeops/src/lifeops/google-scopes.d.ts +13 -0
  129. package/apps/app-lifeops/src/lifeops/google-scopes.d.ts.map +1 -0
  130. package/apps/app-lifeops/src/lifeops/google-scopes.js +96 -0
  131. package/apps/app-lifeops/src/lifeops/index.d.ts +25 -0
  132. package/apps/app-lifeops/src/lifeops/index.d.ts.map +1 -0
  133. package/apps/app-lifeops/src/lifeops/index.js +24 -0
  134. package/apps/app-lifeops/src/lifeops/owner-profile.d.ts +15 -0
  135. package/apps/app-lifeops/src/lifeops/owner-profile.d.ts.map +1 -0
  136. package/apps/app-lifeops/src/lifeops/owner-profile.js +194 -0
  137. package/apps/app-lifeops/src/lifeops/repository.d.ts +209 -0
  138. package/apps/app-lifeops/src/lifeops/repository.d.ts.map +1 -0
  139. package/apps/app-lifeops/src/lifeops/repository.js +3187 -0
  140. package/apps/app-lifeops/src/lifeops/runtime.d.ts +14 -0
  141. package/apps/app-lifeops/src/lifeops/runtime.d.ts.map +1 -0
  142. package/apps/app-lifeops/src/lifeops/runtime.js +120 -0
  143. package/apps/app-lifeops/src/lifeops/screen-context.d.ts +52 -0
  144. package/apps/app-lifeops/src/lifeops/screen-context.d.ts.map +1 -0
  145. package/apps/app-lifeops/src/lifeops/screen-context.js +332 -0
  146. package/apps/app-lifeops/src/lifeops/seed-routines.d.ts +20 -0
  147. package/apps/app-lifeops/src/lifeops/seed-routines.d.ts.map +1 -0
  148. package/apps/app-lifeops/src/lifeops/seed-routines.js +111 -0
  149. package/apps/app-lifeops/src/lifeops/service.d.ts +275 -0
  150. package/apps/app-lifeops/src/lifeops/service.d.ts.map +1 -0
  151. package/apps/app-lifeops/src/lifeops/service.js +9260 -0
  152. package/apps/app-lifeops/src/lifeops/sql.d.ts +31 -0
  153. package/apps/app-lifeops/src/lifeops/sql.d.ts.map +1 -0
  154. package/apps/app-lifeops/src/lifeops/sql.js +247 -0
  155. package/apps/app-lifeops/src/lifeops/time.d.ts +17 -0
  156. package/apps/app-lifeops/src/lifeops/time.d.ts.map +1 -0
  157. package/apps/app-lifeops/src/lifeops/time.js +132 -0
  158. package/apps/app-lifeops/src/lifeops/twilio.d.ts +25 -0
  159. package/apps/app-lifeops/src/lifeops/twilio.d.ts.map +1 -0
  160. package/apps/app-lifeops/src/lifeops/twilio.js +157 -0
  161. package/apps/app-lifeops/src/lifeops/x-poster.d.ts +19 -0
  162. package/apps/app-lifeops/src/lifeops/x-poster.d.ts.map +1 -0
  163. package/apps/app-lifeops/src/lifeops/x-poster.js +148 -0
  164. package/apps/app-lifeops/src/plugin.d.ts +22 -0
  165. package/apps/app-lifeops/src/plugin.d.ts.map +1 -0
  166. package/apps/app-lifeops/src/plugin.js +92 -0
  167. package/apps/app-lifeops/src/provider.d.ts +3 -0
  168. package/apps/app-lifeops/src/provider.d.ts.map +1 -0
  169. package/apps/app-lifeops/src/provider.js +75 -0
  170. package/apps/app-lifeops/src/providers/inbox-triage.d.ts +3 -0
  171. package/apps/app-lifeops/src/providers/inbox-triage.d.ts.map +1 -0
  172. package/apps/app-lifeops/src/providers/inbox-triage.js +89 -0
  173. package/apps/app-lifeops/src/providers/lifeops.d.ts +3 -0
  174. package/apps/app-lifeops/src/providers/lifeops.d.ts.map +1 -0
  175. package/apps/app-lifeops/src/providers/lifeops.js +157 -0
  176. package/apps/app-lifeops/src/routes/lifeops-browser-packaging.d.ts +16 -0
  177. package/apps/app-lifeops/src/routes/lifeops-browser-packaging.d.ts.map +1 -0
  178. package/apps/app-lifeops/src/routes/lifeops-browser-packaging.js +305 -0
  179. package/apps/app-lifeops/src/routes/lifeops-routes.d.ts +20 -0
  180. package/apps/app-lifeops/src/routes/lifeops-routes.d.ts.map +1 -0
  181. package/apps/app-lifeops/src/routes/lifeops-routes.js +1173 -0
  182. package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts +7 -0
  183. package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts.map +1 -0
  184. package/apps/app-lifeops/src/routes/website-blocker-routes.js +175 -0
  185. package/apps/app-lifeops/src/selfcontrol/access.d.ts +8 -0
  186. package/apps/app-lifeops/src/selfcontrol/access.d.ts.map +1 -0
  187. package/apps/app-lifeops/src/selfcontrol/access.js +16 -0
  188. package/apps/app-lifeops/src/selfcontrol/action.d.ts +10 -0
  189. package/apps/app-lifeops/src/selfcontrol/action.d.ts.map +1 -0
  190. package/apps/app-lifeops/src/selfcontrol/action.js +506 -0
  191. package/apps/app-lifeops/src/selfcontrol/index.d.ts +13 -0
  192. package/apps/app-lifeops/src/selfcontrol/index.d.ts.map +1 -0
  193. package/apps/app-lifeops/src/selfcontrol/index.js +10 -0
  194. package/apps/app-lifeops/src/selfcontrol/permissions.d.ts +9 -0
  195. package/apps/app-lifeops/src/selfcontrol/permissions.d.ts.map +1 -0
  196. package/apps/app-lifeops/src/selfcontrol/permissions.js +1 -0
  197. package/apps/app-lifeops/src/selfcontrol/provider.d.ts +4 -0
  198. package/apps/app-lifeops/src/selfcontrol/provider.d.ts.map +1 -0
  199. package/apps/app-lifeops/src/selfcontrol/provider.js +116 -0
  200. package/apps/app-lifeops/src/selfcontrol/roles.d.ts +13 -0
  201. package/apps/app-lifeops/src/selfcontrol/roles.d.ts.map +1 -0
  202. package/apps/app-lifeops/src/selfcontrol/roles.js +228 -0
  203. package/apps/app-lifeops/src/selfcontrol/selfcontrol.d.ts +97 -0
  204. package/apps/app-lifeops/src/selfcontrol/selfcontrol.d.ts.map +1 -0
  205. package/apps/app-lifeops/src/selfcontrol/selfcontrol.js +949 -0
  206. package/apps/app-lifeops/src/selfcontrol/service.d.ts +21 -0
  207. package/apps/app-lifeops/src/selfcontrol/service.d.ts.map +1 -0
  208. package/apps/app-lifeops/src/selfcontrol/service.js +268 -0
  209. package/apps/app-lifeops/src/service.d.ts +8 -0
  210. package/apps/app-lifeops/src/service.d.ts.map +1 -0
  211. package/apps/app-lifeops/src/service.js +11 -0
  212. package/apps/app-steward/src/api/wallet-capability.d.ts +28 -0
  213. package/apps/app-steward/src/api/wallet-capability.d.ts.map +1 -0
  214. package/apps/app-steward/src/api/wallet-capability.js +94 -0
  215. package/apps/app-steward/src/api/wallet-dex-prices.d.ts +43 -0
  216. package/apps/app-steward/src/api/wallet-dex-prices.d.ts.map +1 -0
  217. package/apps/app-steward/src/api/wallet-dex-prices.js +149 -0
  218. package/apps/app-steward/src/api/wallet-evm-balance.d.ts +66 -0
  219. package/apps/app-steward/src/api/wallet-evm-balance.d.ts.map +1 -0
  220. package/apps/app-steward/src/api/wallet-evm-balance.js +666 -0
  221. package/apps/app-steward/src/api/wallet-routes.d.ts +35 -0
  222. package/apps/app-steward/src/api/wallet-routes.d.ts.map +1 -0
  223. package/apps/app-steward/src/api/wallet-routes.js +470 -0
  224. package/apps/app-steward/src/api/wallet-rpc.d.ts +67 -0
  225. package/apps/app-steward/src/api/wallet-rpc.d.ts.map +1 -0
  226. package/apps/app-steward/src/api/wallet-rpc.js +453 -0
  227. package/apps/app-steward/src/api/wallet.d.ts +60 -0
  228. package/apps/app-steward/src/api/wallet.d.ts.map +1 -0
  229. package/apps/app-steward/src/api/wallet.js +639 -0
  230. package/apps/app-steward/src/routes/server-wallet-trade.d.ts +27 -0
  231. package/apps/app-steward/src/routes/server-wallet-trade.d.ts.map +1 -0
  232. package/apps/app-steward/src/routes/server-wallet-trade.js +69 -0
  233. package/apps/app-steward/src/routes/wallet-core-routes.d.ts +16 -0
  234. package/apps/app-steward/src/routes/wallet-core-routes.d.ts.map +1 -0
  235. package/apps/app-steward/src/routes/wallet-core-routes.js +46 -0
  236. package/apps/app-steward/src/routes/wallet-export-guard.d.ts +51 -0
  237. package/apps/app-steward/src/routes/wallet-export-guard.d.ts.map +1 -0
  238. package/apps/app-steward/src/routes/wallet-export-guard.js +248 -0
  239. package/apps/app-steward/src/services/steward-evm-account.d.ts +58 -0
  240. package/apps/app-steward/src/services/steward-evm-account.d.ts.map +1 -0
  241. package/apps/app-steward/src/services/steward-evm-account.js +302 -0
  242. package/apps/app-steward/src/services/steward-evm-bridge.d.ts +35 -0
  243. package/apps/app-steward/src/services/steward-evm-bridge.d.ts.map +1 -0
  244. package/apps/app-steward/src/services/steward-evm-bridge.js +99 -0
  245. package/apps/app-training/src/services/index.d.ts +3 -0
  246. package/apps/app-training/src/services/index.d.ts.map +1 -0
  247. package/apps/app-training/src/services/index.js +1 -0
  248. package/apps/app-training/src/services/training-backend-check.d.ts +8 -0
  249. package/apps/app-training/src/services/training-backend-check.d.ts.map +1 -0
  250. package/apps/app-training/src/services/training-backend-check.js +28 -0
  251. package/apps/app-training/src/services/training-service-like.d.ts +38 -0
  252. package/apps/app-training/src/services/training-service-like.d.ts.map +1 -0
  253. package/apps/app-training/src/services/training-service-like.js +1 -0
  254. package/package.json +491 -34
  255. package/packages/agent/src/actions/app-control.d.ts +17 -0
  256. package/packages/agent/src/actions/app-control.d.ts.map +1 -0
  257. package/packages/agent/src/actions/app-control.js +212 -0
  258. package/packages/agent/src/actions/calendar.d.ts +2 -0
  259. package/packages/agent/src/actions/calendar.d.ts.map +1 -0
  260. package/packages/agent/src/actions/calendar.js +1 -0
  261. package/packages/agent/src/actions/check-balance.d.ts +17 -0
  262. package/packages/agent/src/actions/check-balance.d.ts.map +1 -0
  263. package/packages/agent/src/actions/check-balance.js +167 -0
  264. package/packages/agent/src/actions/connector-resolver.d.ts +75 -0
  265. package/packages/agent/src/actions/connector-resolver.d.ts.map +1 -0
  266. package/packages/agent/src/actions/connector-resolver.js +245 -0
  267. package/packages/agent/src/actions/context-signal-lexicon.d.ts +17 -0
  268. package/packages/agent/src/actions/context-signal-lexicon.d.ts.map +1 -0
  269. package/packages/agent/src/actions/context-signal-lexicon.js +207 -0
  270. package/packages/agent/src/actions/context-signal.d.ts +46 -0
  271. package/packages/agent/src/actions/context-signal.d.ts.map +1 -0
  272. package/packages/agent/src/actions/context-signal.js +134 -0
  273. package/packages/agent/src/actions/eject-plugin.d.ts +3 -0
  274. package/packages/agent/src/actions/eject-plugin.d.ts.map +1 -0
  275. package/packages/agent/src/actions/eject-plugin.js +48 -0
  276. package/packages/agent/src/actions/entity-actions.d.ts +4 -0
  277. package/packages/agent/src/actions/entity-actions.d.ts.map +1 -0
  278. package/packages/agent/src/actions/entity-actions.js +344 -0
  279. package/packages/agent/src/actions/execute-trade.d.ts +17 -0
  280. package/packages/agent/src/actions/execute-trade.d.ts.map +1 -0
  281. package/packages/agent/src/actions/execute-trade.js +299 -0
  282. package/packages/agent/src/actions/get-self-status.d.ts +13 -0
  283. package/packages/agent/src/actions/get-self-status.d.ts.map +1 -0
  284. package/packages/agent/src/actions/get-self-status.js +66 -0
  285. package/packages/agent/src/actions/gmail.d.ts +2 -0
  286. package/packages/agent/src/actions/gmail.d.ts.map +1 -0
  287. package/packages/agent/src/actions/gmail.js +1 -0
  288. package/packages/agent/src/actions/grounded-action-reply.d.ts +22 -0
  289. package/packages/agent/src/actions/grounded-action-reply.d.ts.map +1 -0
  290. package/packages/agent/src/actions/grounded-action-reply.js +309 -0
  291. package/packages/agent/src/actions/inbox-digest.d.ts +2 -0
  292. package/packages/agent/src/actions/inbox-digest.d.ts.map +1 -0
  293. package/packages/agent/src/actions/inbox-digest.js +1 -0
  294. package/packages/agent/src/actions/inbox-respond.d.ts +2 -0
  295. package/packages/agent/src/actions/inbox-respond.d.ts.map +1 -0
  296. package/packages/agent/src/actions/inbox-respond.js +1 -0
  297. package/packages/agent/src/actions/inbox-triage.d.ts +2 -0
  298. package/packages/agent/src/actions/inbox-triage.d.ts.map +1 -0
  299. package/packages/agent/src/actions/inbox-triage.js +1 -0
  300. package/packages/agent/src/actions/inbox.d.ts +2 -0
  301. package/packages/agent/src/actions/inbox.d.ts.map +1 -0
  302. package/packages/agent/src/actions/inbox.js +1 -0
  303. package/packages/agent/src/actions/index.d.ts +24 -0
  304. package/packages/agent/src/actions/index.d.ts.map +1 -0
  305. package/packages/agent/src/actions/index.js +23 -0
  306. package/packages/agent/src/actions/install-plugin.d.ts +3 -0
  307. package/packages/agent/src/actions/install-plugin.d.ts.map +1 -0
  308. package/packages/agent/src/actions/install-plugin.js +65 -0
  309. package/packages/agent/src/actions/life-goal-extractor.d.ts +2 -0
  310. package/packages/agent/src/actions/life-goal-extractor.d.ts.map +1 -0
  311. package/packages/agent/src/actions/life-goal-extractor.js +1 -0
  312. package/packages/agent/src/actions/life-param-extractor.d.ts +2 -0
  313. package/packages/agent/src/actions/life-param-extractor.d.ts.map +1 -0
  314. package/packages/agent/src/actions/life-param-extractor.js +1 -0
  315. package/packages/agent/src/actions/life-recent-context.d.ts +2 -0
  316. package/packages/agent/src/actions/life-recent-context.d.ts.map +1 -0
  317. package/packages/agent/src/actions/life-recent-context.js +1 -0
  318. package/packages/agent/src/actions/life-update-extractor.d.ts +2 -0
  319. package/packages/agent/src/actions/life-update-extractor.d.ts.map +1 -0
  320. package/packages/agent/src/actions/life-update-extractor.js +1 -0
  321. package/packages/agent/src/actions/life.d.ts +2 -0
  322. package/packages/agent/src/actions/life.d.ts.map +1 -0
  323. package/packages/agent/src/actions/life.extractor.d.ts +2 -0
  324. package/packages/agent/src/actions/life.extractor.d.ts.map +1 -0
  325. package/packages/agent/src/actions/life.extractor.js +1 -0
  326. package/packages/agent/src/actions/life.js +1 -0
  327. package/packages/agent/src/actions/lifeops-extraction-config.d.ts +2 -0
  328. package/packages/agent/src/actions/lifeops-extraction-config.d.ts.map +1 -0
  329. package/packages/agent/src/actions/lifeops-extraction-config.js +1 -0
  330. package/packages/agent/src/actions/lifeops-google-helpers.d.ts +2 -0
  331. package/packages/agent/src/actions/lifeops-google-helpers.d.ts.map +1 -0
  332. package/packages/agent/src/actions/lifeops-google-helpers.js +1 -0
  333. package/packages/agent/src/actions/list-ejected.d.ts +3 -0
  334. package/packages/agent/src/actions/list-ejected.d.ts.map +1 -0
  335. package/packages/agent/src/actions/list-ejected.js +35 -0
  336. package/packages/agent/src/actions/log-level.d.ts +3 -0
  337. package/packages/agent/src/actions/log-level.d.ts.map +1 -0
  338. package/packages/agent/src/actions/log-level.js +125 -0
  339. package/packages/agent/src/actions/manage-tasks.d.ts +8 -0
  340. package/packages/agent/src/actions/manage-tasks.d.ts.map +1 -0
  341. package/packages/agent/src/actions/manage-tasks.js +289 -0
  342. package/packages/agent/src/actions/media.d.ts +21 -0
  343. package/packages/agent/src/actions/media.d.ts.map +1 -0
  344. package/packages/agent/src/actions/media.js +384 -0
  345. package/packages/agent/src/actions/read-channel.d.ts +3 -0
  346. package/packages/agent/src/actions/read-channel.d.ts.map +1 -0
  347. package/packages/agent/src/actions/read-channel.js +224 -0
  348. package/packages/agent/src/actions/read-messages.d.ts +14 -0
  349. package/packages/agent/src/actions/read-messages.d.ts.map +1 -0
  350. package/packages/agent/src/actions/read-messages.js +228 -0
  351. package/packages/agent/src/actions/reinject-plugin.d.ts +3 -0
  352. package/packages/agent/src/actions/reinject-plugin.d.ts.map +1 -0
  353. package/packages/agent/src/actions/reinject-plugin.js +47 -0
  354. package/packages/agent/src/actions/restart.d.ts +19 -0
  355. package/packages/agent/src/actions/restart.d.ts.map +1 -0
  356. package/packages/agent/src/actions/restart.js +109 -0
  357. package/packages/agent/src/actions/search-conversations.d.ts +3 -0
  358. package/packages/agent/src/actions/search-conversations.d.ts.map +1 -0
  359. package/packages/agent/src/actions/search-conversations.js +181 -0
  360. package/packages/agent/src/actions/send-admin-message.d.ts +3 -0
  361. package/packages/agent/src/actions/send-admin-message.d.ts.map +1 -0
  362. package/packages/agent/src/actions/send-admin-message.js +106 -0
  363. package/packages/agent/src/actions/send-message.d.ts +4 -0
  364. package/packages/agent/src/actions/send-message.d.ts.map +1 -0
  365. package/packages/agent/src/actions/send-message.js +364 -0
  366. package/packages/agent/src/actions/set-user-name.d.ts +13 -0
  367. package/packages/agent/src/actions/set-user-name.d.ts.map +1 -0
  368. package/packages/agent/src/actions/set-user-name.js +82 -0
  369. package/packages/agent/src/actions/skill-command.d.ts +20 -0
  370. package/packages/agent/src/actions/skill-command.d.ts.map +1 -0
  371. package/packages/agent/src/actions/skill-command.js +141 -0
  372. package/packages/agent/src/actions/stream-control.d.ts +11 -0
  373. package/packages/agent/src/actions/stream-control.d.ts.map +1 -0
  374. package/packages/agent/src/actions/stream-control.js +112 -0
  375. package/packages/agent/src/actions/sync-plugin.d.ts +3 -0
  376. package/packages/agent/src/actions/sync-plugin.d.ts.map +1 -0
  377. package/packages/agent/src/actions/sync-plugin.js +47 -0
  378. package/packages/agent/src/actions/terminal.d.ts +15 -0
  379. package/packages/agent/src/actions/terminal.d.ts.map +1 -0
  380. package/packages/agent/src/actions/terminal.js +453 -0
  381. package/packages/agent/src/actions/timezone-normalization.d.ts +2 -0
  382. package/packages/agent/src/actions/timezone-normalization.d.ts.map +1 -0
  383. package/packages/agent/src/actions/timezone-normalization.js +1 -0
  384. package/packages/agent/src/actions/transfer-token.d.ts +17 -0
  385. package/packages/agent/src/actions/transfer-token.d.ts.map +1 -0
  386. package/packages/agent/src/actions/transfer-token.js +470 -0
  387. package/packages/agent/src/actions/update-owner-profile.d.ts +2 -0
  388. package/packages/agent/src/actions/update-owner-profile.d.ts.map +1 -0
  389. package/packages/agent/src/actions/update-owner-profile.js +1 -0
  390. package/packages/agent/src/actions/wallet-action-shared.d.ts +15 -0
  391. package/packages/agent/src/actions/wallet-action-shared.d.ts.map +1 -0
  392. package/packages/agent/src/actions/wallet-action-shared.js +24 -0
  393. package/packages/agent/src/actions/web-search.d.ts +16 -0
  394. package/packages/agent/src/actions/web-search.d.ts.map +1 -0
  395. package/packages/agent/src/actions/web-search.js +196 -0
  396. package/packages/agent/src/activity-profile/analyzer.d.ts +23 -0
  397. package/packages/agent/src/activity-profile/analyzer.d.ts.map +1 -0
  398. package/packages/agent/src/activity-profile/analyzer.js +531 -0
  399. package/packages/agent/src/activity-profile/proactive-planner.d.ts +49 -0
  400. package/packages/agent/src/activity-profile/proactive-planner.d.ts.map +1 -0
  401. package/packages/agent/src/activity-profile/proactive-planner.js +455 -0
  402. package/packages/agent/src/activity-profile/proactive-worker.d.ts +32 -0
  403. package/packages/agent/src/activity-profile/proactive-worker.d.ts.map +1 -0
  404. package/packages/agent/src/activity-profile/proactive-worker.js +523 -0
  405. package/packages/agent/src/activity-profile/profile-metadata.d.ts +10 -0
  406. package/packages/agent/src/activity-profile/profile-metadata.d.ts.map +1 -0
  407. package/packages/agent/src/activity-profile/profile-metadata.js +25 -0
  408. package/packages/agent/src/activity-profile/service.d.ts +11 -0
  409. package/packages/agent/src/activity-profile/service.d.ts.map +1 -0
  410. package/packages/agent/src/activity-profile/service.js +226 -0
  411. package/packages/agent/src/activity-profile/types.d.ts +89 -0
  412. package/packages/agent/src/activity-profile/types.d.ts.map +1 -0
  413. package/packages/agent/src/activity-profile/types.js +29 -0
  414. package/packages/agent/src/api/agent-admin-routes.d.ts +39 -0
  415. package/packages/agent/src/api/agent-admin-routes.d.ts.map +1 -0
  416. package/packages/agent/src/api/agent-admin-routes.js +155 -0
  417. package/packages/agent/src/api/agent-lifecycle-routes.d.ts +16 -0
  418. package/packages/agent/src/api/agent-lifecycle-routes.d.ts.map +1 -0
  419. package/packages/agent/src/api/agent-lifecycle-routes.js +94 -0
  420. package/packages/agent/src/api/agent-model.d.ts +5 -0
  421. package/packages/agent/src/api/agent-model.d.ts.map +1 -0
  422. package/packages/agent/src/api/agent-model.js +154 -0
  423. package/packages/agent/src/api/agent-status-routes.d.ts +96 -0
  424. package/packages/agent/src/api/agent-status-routes.d.ts.map +1 -0
  425. package/packages/agent/src/api/agent-status-routes.js +274 -0
  426. package/packages/agent/src/api/agent-transfer-routes.d.ts +16 -0
  427. package/packages/agent/src/api/agent-transfer-routes.d.ts.map +1 -0
  428. package/packages/agent/src/api/agent-transfer-routes.js +124 -0
  429. package/packages/agent/src/api/app-package-routes.d.ts +7 -0
  430. package/packages/agent/src/api/app-package-routes.d.ts.map +1 -0
  431. package/packages/agent/src/api/app-package-routes.js +59 -0
  432. package/packages/agent/src/api/apps-routes.d.ts +24 -0
  433. package/packages/agent/src/api/apps-routes.d.ts.map +1 -0
  434. package/packages/agent/src/api/apps-routes.js +477 -0
  435. package/packages/agent/src/api/auth-routes.d.ts +11 -0
  436. package/packages/agent/src/api/auth-routes.d.ts.map +1 -0
  437. package/packages/agent/src/api/auth-routes.js +74 -0
  438. package/packages/agent/src/api/avatar-routes.d.ts +11 -0
  439. package/packages/agent/src/api/avatar-routes.d.ts.map +1 -0
  440. package/packages/agent/src/api/avatar-routes.js +205 -0
  441. package/packages/agent/src/api/binance-skill-helpers.d.ts +26 -0
  442. package/packages/agent/src/api/binance-skill-helpers.d.ts.map +1 -0
  443. package/packages/agent/src/api/binance-skill-helpers.js +781 -0
  444. package/packages/agent/src/api/bluebubbles-routes.d.ts +10 -0
  445. package/packages/agent/src/api/bluebubbles-routes.d.ts.map +1 -0
  446. package/packages/agent/src/api/bluebubbles-routes.js +129 -0
  447. package/packages/agent/src/api/browser-workspace-routes.d.ts +5 -0
  448. package/packages/agent/src/api/browser-workspace-routes.d.ts.map +1 -0
  449. package/packages/agent/src/api/browser-workspace-routes.js +100 -0
  450. package/packages/agent/src/api/bsc-trade.d.ts +40 -0
  451. package/packages/agent/src/api/bsc-trade.d.ts.map +1 -0
  452. package/packages/agent/src/api/bsc-trade.js +786 -0
  453. package/packages/agent/src/api/bug-report-routes.d.ts +10 -0
  454. package/packages/agent/src/api/bug-report-routes.d.ts.map +1 -0
  455. package/packages/agent/src/api/bug-report-routes.js +264 -0
  456. package/packages/agent/src/api/character-routes.d.ts +51 -0
  457. package/packages/agent/src/api/character-routes.d.ts.map +1 -0
  458. package/packages/agent/src/api/character-routes.js +367 -0
  459. package/packages/agent/src/api/chat-augmentation.d.ts +89 -0
  460. package/packages/agent/src/api/chat-augmentation.d.ts.map +1 -0
  461. package/packages/agent/src/api/chat-augmentation.js +396 -0
  462. package/packages/agent/src/api/chat-routes.d.ts +106 -0
  463. package/packages/agent/src/api/chat-routes.d.ts.map +1 -0
  464. package/packages/agent/src/api/chat-routes.js +1500 -0
  465. package/packages/agent/src/api/chat-text-helpers.d.ts +11 -0
  466. package/packages/agent/src/api/chat-text-helpers.d.ts.map +1 -0
  467. package/packages/agent/src/api/chat-text-helpers.js +183 -0
  468. package/packages/agent/src/api/cloud-billing-routes.d.ts +9 -0
  469. package/packages/agent/src/api/cloud-billing-routes.d.ts.map +1 -0
  470. package/packages/agent/src/api/cloud-billing-routes.js +388 -0
  471. package/packages/agent/src/api/cloud-compat-routes.d.ts +10 -0
  472. package/packages/agent/src/api/cloud-compat-routes.d.ts.map +1 -0
  473. package/packages/agent/src/api/cloud-compat-routes.js +212 -0
  474. package/packages/agent/src/api/cloud-provisioning.d.ts +14 -0
  475. package/packages/agent/src/api/cloud-provisioning.d.ts.map +1 -0
  476. package/packages/agent/src/api/cloud-provisioning.js +30 -0
  477. package/packages/agent/src/api/cloud-relay-routes.d.ts +22 -0
  478. package/packages/agent/src/api/cloud-relay-routes.d.ts.map +1 -0
  479. package/packages/agent/src/api/cloud-relay-routes.js +52 -0
  480. package/packages/agent/src/api/cloud-routes.d.ts +80 -0
  481. package/packages/agent/src/api/cloud-routes.d.ts.map +1 -0
  482. package/packages/agent/src/api/cloud-routes.js +582 -0
  483. package/packages/agent/src/api/cloud-status-routes.d.ts +15 -0
  484. package/packages/agent/src/api/cloud-status-routes.d.ts.map +1 -0
  485. package/packages/agent/src/api/cloud-status-routes.js +143 -0
  486. package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts +2 -0
  487. package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts.map +1 -0
  488. package/packages/agent/src/api/coding-agents-auth-sanitize.js +1 -0
  489. package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts +2 -0
  490. package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts.map +1 -0
  491. package/packages/agent/src/api/coding-agents-preflight-normalize.js +1 -0
  492. package/packages/agent/src/api/compat-utils.d.ts +49 -0
  493. package/packages/agent/src/api/compat-utils.d.ts.map +1 -0
  494. package/packages/agent/src/api/compat-utils.js +126 -0
  495. package/packages/agent/src/api/config-env.d.ts +43 -0
  496. package/packages/agent/src/api/config-env.d.ts.map +1 -0
  497. package/packages/agent/src/api/config-env.js +284 -0
  498. package/packages/agent/src/api/config-routes.d.ts +33 -0
  499. package/packages/agent/src/api/config-routes.d.ts.map +1 -0
  500. package/packages/agent/src/api/config-routes.js +253 -0
  501. package/packages/agent/src/api/connector-health.d.ts +42 -0
  502. package/packages/agent/src/api/connector-health.d.ts.map +1 -0
  503. package/packages/agent/src/api/connector-health.js +132 -0
  504. package/packages/agent/src/api/connector-routes.d.ts +21 -0
  505. package/packages/agent/src/api/connector-routes.d.ts.map +1 -0
  506. package/packages/agent/src/api/connector-routes.js +79 -0
  507. package/packages/agent/src/api/conversation-routes.d.ts +42 -0
  508. package/packages/agent/src/api/conversation-routes.d.ts.map +1 -0
  509. package/packages/agent/src/api/conversation-routes.js +1128 -0
  510. package/packages/agent/src/api/coordinator-types.d.ts +2 -0
  511. package/packages/agent/src/api/coordinator-types.d.ts.map +1 -0
  512. package/packages/agent/src/api/coordinator-types.js +1 -0
  513. package/packages/agent/src/api/coordinator-wiring.d.ts +2 -0
  514. package/packages/agent/src/api/coordinator-wiring.d.ts.map +1 -0
  515. package/packages/agent/src/api/coordinator-wiring.js +1 -0
  516. package/packages/agent/src/api/credit-detection.d.ts +9 -0
  517. package/packages/agent/src/api/credit-detection.d.ts.map +1 -0
  518. package/packages/agent/src/api/credit-detection.js +41 -0
  519. package/packages/agent/src/api/database.d.ts +33 -0
  520. package/packages/agent/src/api/database.d.ts.map +1 -0
  521. package/packages/agent/src/api/database.js +1020 -0
  522. package/packages/agent/src/api/diagnostics-routes.d.ts +53 -0
  523. package/packages/agent/src/api/diagnostics-routes.d.ts.map +1 -0
  524. package/packages/agent/src/api/diagnostics-routes.js +250 -0
  525. package/packages/agent/src/api/discord-avatar-cache.d.ts +10 -0
  526. package/packages/agent/src/api/discord-avatar-cache.d.ts.map +1 -0
  527. package/packages/agent/src/api/discord-avatar-cache.js +149 -0
  528. package/packages/agent/src/api/discord-local-routes.d.ts +12 -0
  529. package/packages/agent/src/api/discord-local-routes.d.ts.map +1 -0
  530. package/packages/agent/src/api/discord-local-routes.js +145 -0
  531. package/packages/agent/src/api/discord-profiles.d.ts +26 -0
  532. package/packages/agent/src/api/discord-profiles.d.ts.map +1 -0
  533. package/packages/agent/src/api/discord-profiles.js +282 -0
  534. package/packages/agent/src/api/drop-routes.d.ts +22 -0
  535. package/packages/agent/src/api/drop-routes.d.ts.map +1 -0
  536. package/packages/agent/src/api/drop-routes.js +155 -0
  537. package/packages/agent/src/api/drop-service.d.ts +26 -0
  538. package/packages/agent/src/api/drop-service.d.ts.map +1 -0
  539. package/packages/agent/src/api/drop-service.js +134 -0
  540. package/packages/agent/src/api/early-logs.d.ts +29 -0
  541. package/packages/agent/src/api/early-logs.d.ts.map +1 -0
  542. package/packages/agent/src/api/early-logs.js +96 -0
  543. package/packages/agent/src/api/health-routes.d.ts +44 -0
  544. package/packages/agent/src/api/health-routes.d.ts.map +1 -0
  545. package/packages/agent/src/api/health-routes.js +449 -0
  546. package/packages/agent/src/api/http-helpers.d.ts +50 -0
  547. package/packages/agent/src/api/http-helpers.d.ts.map +1 -0
  548. package/packages/agent/src/api/http-helpers.js +148 -0
  549. package/packages/agent/src/api/imessage-routes.d.ts +55 -0
  550. package/packages/agent/src/api/imessage-routes.d.ts.map +1 -0
  551. package/packages/agent/src/api/imessage-routes.js +231 -0
  552. package/packages/agent/src/api/inbox-routes.d.ts +48 -0
  553. package/packages/agent/src/api/inbox-routes.d.ts.map +1 -0
  554. package/packages/agent/src/api/inbox-routes.js +1547 -0
  555. package/packages/agent/src/api/index.d.ts +63 -0
  556. package/packages/agent/src/api/index.d.ts.map +1 -0
  557. package/packages/agent/src/api/index.js +62 -0
  558. package/packages/agent/src/api/knowledge-routes.d.ts +2 -0
  559. package/packages/agent/src/api/knowledge-routes.d.ts.map +1 -0
  560. package/packages/agent/src/api/knowledge-routes.js +2 -0
  561. package/packages/agent/src/api/knowledge-service-loader.d.ts +2 -0
  562. package/packages/agent/src/api/knowledge-service-loader.d.ts.map +1 -0
  563. package/packages/agent/src/api/knowledge-service-loader.js +2 -0
  564. package/packages/agent/src/api/lifeops-browser-packaging.d.ts +2 -0
  565. package/packages/agent/src/api/lifeops-browser-packaging.d.ts.map +1 -0
  566. package/packages/agent/src/api/lifeops-browser-packaging.js +1 -0
  567. package/packages/agent/src/api/lifeops-routes.d.ts +2 -0
  568. package/packages/agent/src/api/lifeops-routes.d.ts.map +1 -0
  569. package/packages/agent/src/api/lifeops-routes.js +1 -0
  570. package/packages/agent/src/api/mcp-routes.d.ts +33 -0
  571. package/packages/agent/src/api/mcp-routes.d.ts.map +1 -0
  572. package/packages/agent/src/api/mcp-routes.js +186 -0
  573. package/packages/agent/src/api/memory-bounds.d.ts +51 -0
  574. package/packages/agent/src/api/memory-bounds.d.ts.map +1 -0
  575. package/packages/agent/src/api/memory-bounds.js +81 -0
  576. package/packages/agent/src/api/memory-routes.d.ts +9 -0
  577. package/packages/agent/src/api/memory-routes.d.ts.map +1 -0
  578. package/packages/agent/src/api/memory-routes.js +420 -0
  579. package/packages/agent/src/api/merkle-tree.d.ts +90 -0
  580. package/packages/agent/src/api/merkle-tree.d.ts.map +1 -0
  581. package/packages/agent/src/api/merkle-tree.js +174 -0
  582. package/packages/agent/src/api/misc-routes.d.ts +64 -0
  583. package/packages/agent/src/api/misc-routes.d.ts.map +1 -0
  584. package/packages/agent/src/api/misc-routes.js +557 -0
  585. package/packages/agent/src/api/model-provider-helpers.d.ts +84 -0
  586. package/packages/agent/src/api/model-provider-helpers.d.ts.map +1 -0
  587. package/packages/agent/src/api/model-provider-helpers.js +588 -0
  588. package/packages/agent/src/api/models-routes.d.ts +14 -0
  589. package/packages/agent/src/api/models-routes.d.ts.map +1 -0
  590. package/packages/agent/src/api/models-routes.js +37 -0
  591. package/packages/agent/src/api/music-player-route-fallback.d.ts +16 -0
  592. package/packages/agent/src/api/music-player-route-fallback.d.ts.map +1 -0
  593. package/packages/agent/src/api/music-player-route-fallback.js +65 -0
  594. package/packages/agent/src/api/nfa-routes.d.ts +5 -0
  595. package/packages/agent/src/api/nfa-routes.d.ts.map +1 -0
  596. package/packages/agent/src/api/nfa-routes.js +133 -0
  597. package/packages/agent/src/api/nft-verify.d.ts +16 -0
  598. package/packages/agent/src/api/nft-verify.d.ts.map +1 -0
  599. package/packages/agent/src/api/nft-verify.js +81 -0
  600. package/packages/agent/src/api/og-tracker.d.ts +28 -0
  601. package/packages/agent/src/api/og-tracker.d.ts.map +1 -0
  602. package/packages/agent/src/api/og-tracker.js +60 -0
  603. package/packages/agent/src/api/onboarding-routes.d.ts +50 -0
  604. package/packages/agent/src/api/onboarding-routes.d.ts.map +1 -0
  605. package/packages/agent/src/api/onboarding-routes.js +561 -0
  606. package/packages/agent/src/api/owner-contact-helpers.d.ts +39 -0
  607. package/packages/agent/src/api/owner-contact-helpers.d.ts.map +1 -0
  608. package/packages/agent/src/api/owner-contact-helpers.js +47 -0
  609. package/packages/agent/src/api/parse-action-block.d.ts +35 -0
  610. package/packages/agent/src/api/parse-action-block.d.ts.map +1 -0
  611. package/packages/agent/src/api/parse-action-block.js +110 -0
  612. package/packages/agent/src/api/permissions-routes-extra.d.ts +30 -0
  613. package/packages/agent/src/api/permissions-routes-extra.d.ts.map +1 -0
  614. package/packages/agent/src/api/permissions-routes-extra.js +78 -0
  615. package/packages/agent/src/api/permissions-routes.d.ts +28 -0
  616. package/packages/agent/src/api/permissions-routes.d.ts.map +1 -0
  617. package/packages/agent/src/api/permissions-routes.js +180 -0
  618. package/packages/agent/src/api/plugin-discovery-helpers.d.ts +147 -0
  619. package/packages/agent/src/api/plugin-discovery-helpers.d.ts.map +1 -0
  620. package/packages/agent/src/api/plugin-discovery-helpers.js +1015 -0
  621. package/packages/agent/src/api/plugin-routes.d.ts +127 -0
  622. package/packages/agent/src/api/plugin-routes.d.ts.map +1 -0
  623. package/packages/agent/src/api/plugin-routes.js +1140 -0
  624. package/packages/agent/src/api/plugin-runtime-apply.d.ts +31 -0
  625. package/packages/agent/src/api/plugin-runtime-apply.d.ts.map +1 -0
  626. package/packages/agent/src/api/plugin-runtime-apply.js +217 -0
  627. package/packages/agent/src/api/plugin-validation.d.ts +86 -0
  628. package/packages/agent/src/api/plugin-validation.d.ts.map +1 -0
  629. package/packages/agent/src/api/plugin-validation.js +259 -0
  630. package/packages/agent/src/api/provider-switch-config.d.ts +60 -0
  631. package/packages/agent/src/api/provider-switch-config.d.ts.map +1 -0
  632. package/packages/agent/src/api/provider-switch-config.js +718 -0
  633. package/packages/agent/src/api/provider-switch-routes.d.ts +22 -0
  634. package/packages/agent/src/api/provider-switch-routes.d.ts.map +1 -0
  635. package/packages/agent/src/api/provider-switch-routes.js +92 -0
  636. package/packages/agent/src/api/rate-limiter.d.ts +29 -0
  637. package/packages/agent/src/api/rate-limiter.d.ts.map +1 -0
  638. package/packages/agent/src/api/rate-limiter.js +54 -0
  639. package/packages/agent/src/api/registry-routes.d.ts +29 -0
  640. package/packages/agent/src/api/registry-routes.d.ts.map +1 -0
  641. package/packages/agent/src/api/registry-routes.js +98 -0
  642. package/packages/agent/src/api/registry-service.d.ts +77 -0
  643. package/packages/agent/src/api/registry-service.d.ts.map +1 -0
  644. package/packages/agent/src/api/registry-service.js +190 -0
  645. package/packages/agent/src/api/relationships-routes.d.ts +7 -0
  646. package/packages/agent/src/api/relationships-routes.d.ts.map +1 -0
  647. package/packages/agent/src/api/relationships-routes.js +181 -0
  648. package/packages/agent/src/api/route-helpers.d.ts +16 -0
  649. package/packages/agent/src/api/route-helpers.d.ts.map +1 -0
  650. package/packages/agent/src/api/route-helpers.js +1 -0
  651. package/packages/agent/src/api/runtime-plugin-routes.d.ts +21 -0
  652. package/packages/agent/src/api/runtime-plugin-routes.d.ts.map +1 -0
  653. package/packages/agent/src/api/runtime-plugin-routes.js +132 -0
  654. package/packages/agent/src/api/sandbox-routes.d.ts +12 -0
  655. package/packages/agent/src/api/sandbox-routes.d.ts.map +1 -0
  656. package/packages/agent/src/api/sandbox-routes.js +1334 -0
  657. package/packages/agent/src/api/server-auth.d.ts +52 -0
  658. package/packages/agent/src/api/server-auth.d.ts.map +1 -0
  659. package/packages/agent/src/api/server-auth.js +332 -0
  660. package/packages/agent/src/api/server-helpers.d.ts +95 -0
  661. package/packages/agent/src/api/server-helpers.d.ts.map +1 -0
  662. package/packages/agent/src/api/server-helpers.js +708 -0
  663. package/packages/agent/src/api/server-startup.d.ts +16 -0
  664. package/packages/agent/src/api/server-startup.d.ts.map +1 -0
  665. package/packages/agent/src/api/server-startup.js +14 -0
  666. package/packages/agent/src/api/server-types.d.ts +216 -0
  667. package/packages/agent/src/api/server-types.d.ts.map +1 -0
  668. package/packages/agent/src/api/server-types.js +6 -0
  669. package/packages/agent/src/api/server.d.ts +144 -0
  670. package/packages/agent/src/api/server.d.ts.map +1 -0
  671. package/packages/agent/src/api/server.js +5304 -0
  672. package/packages/agent/src/api/signal-routes.d.ts +42 -0
  673. package/packages/agent/src/api/signal-routes.d.ts.map +1 -0
  674. package/packages/agent/src/api/signal-routes.js +232 -0
  675. package/packages/agent/src/api/skill-discovery-helpers.d.ts +80 -0
  676. package/packages/agent/src/api/skill-discovery-helpers.d.ts.map +1 -0
  677. package/packages/agent/src/api/skill-discovery-helpers.js +381 -0
  678. package/packages/agent/src/api/skills-routes.d.ts +32 -0
  679. package/packages/agent/src/api/skills-routes.d.ts.map +1 -0
  680. package/packages/agent/src/api/skills-routes.js +947 -0
  681. package/packages/agent/src/api/static-file-server.d.ts +19 -0
  682. package/packages/agent/src/api/static-file-server.d.ts.map +1 -0
  683. package/packages/agent/src/api/static-file-server.js +233 -0
  684. package/packages/agent/src/api/stream-persistence.d.ts +64 -0
  685. package/packages/agent/src/api/stream-persistence.d.ts.map +1 -0
  686. package/packages/agent/src/api/stream-persistence.js +231 -0
  687. package/packages/agent/src/api/stream-route-state.d.ts +56 -0
  688. package/packages/agent/src/api/stream-route-state.d.ts.map +1 -0
  689. package/packages/agent/src/api/stream-route-state.js +1 -0
  690. package/packages/agent/src/api/stream-routes.d.ts +43 -0
  691. package/packages/agent/src/api/stream-routes.d.ts.map +1 -0
  692. package/packages/agent/src/api/stream-routes.js +728 -0
  693. package/packages/agent/src/api/streaming-text.d.ts +9 -0
  694. package/packages/agent/src/api/streaming-text.d.ts.map +1 -0
  695. package/packages/agent/src/api/streaming-text.js +85 -0
  696. package/packages/agent/src/api/streaming-types.d.ts +30 -0
  697. package/packages/agent/src/api/streaming-types.d.ts.map +1 -0
  698. package/packages/agent/src/api/streaming-types.js +1 -0
  699. package/packages/agent/src/api/subscription-routes.d.ts +20 -0
  700. package/packages/agent/src/api/subscription-routes.d.ts.map +1 -0
  701. package/packages/agent/src/api/subscription-routes.js +213 -0
  702. package/packages/agent/src/api/task-agent-message-routing.d.ts +2 -0
  703. package/packages/agent/src/api/task-agent-message-routing.d.ts.map +1 -0
  704. package/packages/agent/src/api/task-agent-message-routing.js +1 -0
  705. package/packages/agent/src/api/telegram-account-routes.d.ts +26 -0
  706. package/packages/agent/src/api/telegram-account-routes.d.ts.map +1 -0
  707. package/packages/agent/src/api/telegram-account-routes.js +229 -0
  708. package/packages/agent/src/api/telegram-setup-routes.d.ts +27 -0
  709. package/packages/agent/src/api/telegram-setup-routes.d.ts.map +1 -0
  710. package/packages/agent/src/api/telegram-setup-routes.js +125 -0
  711. package/packages/agent/src/api/terminal-run-limits.d.ts +5 -0
  712. package/packages/agent/src/api/terminal-run-limits.d.ts.map +1 -0
  713. package/packages/agent/src/api/terminal-run-limits.js +22 -0
  714. package/packages/agent/src/api/trade-safety.d.ts +39 -0
  715. package/packages/agent/src/api/trade-safety.d.ts.map +1 -0
  716. package/packages/agent/src/api/trade-safety.js +66 -0
  717. package/packages/agent/src/api/training-backend-check.d.ts +2 -0
  718. package/packages/agent/src/api/training-backend-check.d.ts.map +1 -0
  719. package/packages/agent/src/api/training-backend-check.js +2 -0
  720. package/packages/agent/src/api/training-routes.d.ts +2 -0
  721. package/packages/agent/src/api/training-routes.d.ts.map +1 -0
  722. package/packages/agent/src/api/training-routes.js +2 -0
  723. package/packages/agent/src/api/training-service-like.d.ts +2 -0
  724. package/packages/agent/src/api/training-service-like.d.ts.map +1 -0
  725. package/packages/agent/src/api/training-service-like.js +1 -0
  726. package/packages/agent/src/api/trajectory-routes.d.ts +3 -0
  727. package/packages/agent/src/api/trajectory-routes.d.ts.map +1 -0
  728. package/packages/agent/src/api/trajectory-routes.js +2 -0
  729. package/packages/agent/src/api/trigger-routes.d.ts +73 -0
  730. package/packages/agent/src/api/trigger-routes.d.ts.map +1 -0
  731. package/packages/agent/src/api/trigger-routes.js +308 -0
  732. package/packages/agent/src/api/tts-routes.d.ts +24 -0
  733. package/packages/agent/src/api/tts-routes.d.ts.map +1 -0
  734. package/packages/agent/src/api/tts-routes.js +200 -0
  735. package/packages/agent/src/api/twitter-verify.d.ts +25 -0
  736. package/packages/agent/src/api/twitter-verify.d.ts.map +1 -0
  737. package/packages/agent/src/api/twitter-verify.js +168 -0
  738. package/packages/agent/src/api/tx-service.d.ts +51 -0
  739. package/packages/agent/src/api/tx-service.d.ts.map +1 -0
  740. package/packages/agent/src/api/tx-service.js +160 -0
  741. package/packages/agent/src/api/update-routes.d.ts +19 -0
  742. package/packages/agent/src/api/update-routes.d.ts.map +1 -0
  743. package/packages/agent/src/api/update-routes.js +54 -0
  744. package/packages/agent/src/api/wallet-bsc-routes.d.ts +67 -0
  745. package/packages/agent/src/api/wallet-bsc-routes.d.ts.map +1 -0
  746. package/packages/agent/src/api/wallet-bsc-routes.js +322 -0
  747. package/packages/agent/src/api/wallet-capability.d.ts +33 -0
  748. package/packages/agent/src/api/wallet-capability.d.ts.map +1 -0
  749. package/packages/agent/src/api/wallet-capability.js +124 -0
  750. package/packages/agent/src/api/wallet-dex-prices.d.ts +43 -0
  751. package/packages/agent/src/api/wallet-dex-prices.d.ts.map +1 -0
  752. package/packages/agent/src/api/wallet-dex-prices.js +153 -0
  753. package/packages/agent/src/api/wallet-env-sync.d.ts +2 -0
  754. package/packages/agent/src/api/wallet-env-sync.d.ts.map +1 -0
  755. package/packages/agent/src/api/wallet-env-sync.js +104 -0
  756. package/packages/agent/src/api/wallet-evm-balance.d.ts +66 -0
  757. package/packages/agent/src/api/wallet-evm-balance.d.ts.map +1 -0
  758. package/packages/agent/src/api/wallet-evm-balance.js +667 -0
  759. package/packages/agent/src/api/wallet-routes.d.ts +55 -0
  760. package/packages/agent/src/api/wallet-routes.d.ts.map +1 -0
  761. package/packages/agent/src/api/wallet-routes.js +833 -0
  762. package/packages/agent/src/api/wallet-rpc.d.ts +78 -0
  763. package/packages/agent/src/api/wallet-rpc.d.ts.map +1 -0
  764. package/packages/agent/src/api/wallet-rpc.js +476 -0
  765. package/packages/agent/src/api/wallet-trade-routes.d.ts +110 -0
  766. package/packages/agent/src/api/wallet-trade-routes.d.ts.map +1 -0
  767. package/packages/agent/src/api/wallet-trade-routes.js +353 -0
  768. package/packages/agent/src/api/wallet-trading-profile.d.ts +56 -0
  769. package/packages/agent/src/api/wallet-trading-profile.d.ts.map +1 -0
  770. package/packages/agent/src/api/wallet-trading-profile.js +565 -0
  771. package/packages/agent/src/api/wallet.d.ts +64 -0
  772. package/packages/agent/src/api/wallet.d.ts.map +1 -0
  773. package/packages/agent/src/api/wallet.js +674 -0
  774. package/packages/agent/src/api/website-blocker-routes.d.ts +2 -0
  775. package/packages/agent/src/api/website-blocker-routes.d.ts.map +1 -0
  776. package/packages/agent/src/api/website-blocker-routes.js +1 -0
  777. package/packages/agent/src/api/whatsapp-routes.d.ts +39 -0
  778. package/packages/agent/src/api/whatsapp-routes.d.ts.map +1 -0
  779. package/packages/agent/src/api/whatsapp-routes.js +226 -0
  780. package/packages/agent/src/api/workbench-helpers.d.ts +39 -0
  781. package/packages/agent/src/api/workbench-helpers.d.ts.map +1 -0
  782. package/packages/agent/src/api/workbench-helpers.js +133 -0
  783. package/packages/agent/src/api/workbench-routes.d.ts +53 -0
  784. package/packages/agent/src/api/workbench-routes.d.ts.map +1 -0
  785. package/packages/agent/src/api/workbench-routes.js +405 -0
  786. package/packages/agent/src/api/zip-utils.d.ts +8 -0
  787. package/packages/agent/src/api/zip-utils.d.ts.map +1 -0
  788. package/packages/agent/src/api/zip-utils.js +115 -0
  789. package/packages/agent/src/auth/anthropic.d.ts +29 -0
  790. package/packages/agent/src/auth/anthropic.d.ts.map +1 -0
  791. package/packages/agent/src/auth/anthropic.js +43 -0
  792. package/packages/agent/src/auth/claude-code-stealth.d.ts +2 -0
  793. package/packages/agent/src/auth/claude-code-stealth.d.ts.map +1 -0
  794. package/packages/agent/src/auth/claude-code-stealth.js +114 -0
  795. package/packages/agent/src/auth/credentials.d.ts +74 -0
  796. package/packages/agent/src/auth/credentials.d.ts.map +1 -0
  797. package/packages/agent/src/auth/credentials.js +379 -0
  798. package/packages/agent/src/auth/index.d.ts +6 -0
  799. package/packages/agent/src/auth/index.d.ts.map +1 -0
  800. package/packages/agent/src/auth/index.js +5 -0
  801. package/packages/agent/src/auth/openai-codex.d.ts +32 -0
  802. package/packages/agent/src/auth/openai-codex.d.ts.map +1 -0
  803. package/packages/agent/src/auth/openai-codex.js +81 -0
  804. package/packages/agent/src/auth/types.d.ts +18 -0
  805. package/packages/agent/src/auth/types.d.ts.map +1 -0
  806. package/packages/agent/src/auth/types.js +8 -0
  807. package/packages/agent/src/auth/vendor/pi-oauth/anthropic-login.d.ts +16 -0
  808. package/packages/agent/src/auth/vendor/pi-oauth/anthropic-login.d.ts.map +1 -0
  809. package/packages/agent/src/auth/vendor/pi-oauth/anthropic-login.js +78 -0
  810. package/packages/agent/src/auth/vendor/pi-oauth/openai-codex-login.d.ts +26 -0
  811. package/packages/agent/src/auth/vendor/pi-oauth/openai-codex-login.d.ts.map +1 -0
  812. package/packages/agent/src/auth/vendor/pi-oauth/openai-codex-login.js +342 -0
  813. package/packages/agent/src/auth/vendor/pi-oauth/pkce.d.ts +9 -0
  814. package/packages/agent/src/auth/vendor/pi-oauth/pkce.d.ts.map +1 -0
  815. package/packages/agent/src/auth/vendor/pi-oauth/pkce.js +21 -0
  816. package/packages/agent/src/autonomy/index.d.ts +48 -0
  817. package/packages/agent/src/autonomy/index.d.ts.map +1 -0
  818. package/packages/agent/src/autonomy/index.js +330 -0
  819. package/packages/agent/src/awareness/index.d.ts +2 -0
  820. package/packages/agent/src/awareness/index.d.ts.map +1 -0
  821. package/packages/agent/src/awareness/index.js +1 -0
  822. package/packages/agent/src/awareness/registry.d.ts +27 -0
  823. package/packages/agent/src/awareness/registry.d.ts.map +1 -0
  824. package/packages/agent/src/awareness/registry.js +161 -0
  825. package/packages/agent/src/bin.d.ts +3 -0
  826. package/packages/agent/src/bin.d.ts.map +1 -0
  827. package/packages/agent/src/bin.js +6 -0
  828. package/packages/agent/src/cli/benchmark.d.ts +10 -0
  829. package/packages/agent/src/cli/benchmark.d.ts.map +1 -0
  830. package/packages/agent/src/cli/benchmark.js +293 -0
  831. package/packages/agent/src/cli/index.d.ts +2 -0
  832. package/packages/agent/src/cli/index.d.ts.map +1 -0
  833. package/packages/agent/src/cli/index.js +70 -0
  834. package/packages/agent/src/cli/parse-duration.d.ts +5 -0
  835. package/packages/agent/src/cli/parse-duration.d.ts.map +1 -0
  836. package/packages/agent/src/cli/parse-duration.js +27 -0
  837. package/packages/agent/src/cloud/auth.d.ts +19 -0
  838. package/packages/agent/src/cloud/auth.d.ts.map +1 -0
  839. package/packages/agent/src/cloud/auth.js +110 -0
  840. package/packages/agent/src/cloud/backup.d.ts +18 -0
  841. package/packages/agent/src/cloud/backup.d.ts.map +1 -0
  842. package/packages/agent/src/cloud/backup.js +42 -0
  843. package/packages/agent/src/cloud/base-url.d.ts +3 -0
  844. package/packages/agent/src/cloud/base-url.d.ts.map +1 -0
  845. package/packages/agent/src/cloud/base-url.js +52 -0
  846. package/packages/agent/src/cloud/bridge-client.d.ts +126 -0
  847. package/packages/agent/src/cloud/bridge-client.d.ts.map +1 -0
  848. package/packages/agent/src/cloud/bridge-client.js +380 -0
  849. package/packages/agent/src/cloud/cloud-manager.d.ts +32 -0
  850. package/packages/agent/src/cloud/cloud-manager.d.ts.map +1 -0
  851. package/packages/agent/src/cloud/cloud-manager.js +121 -0
  852. package/packages/agent/src/cloud/cloud-proxy.d.ts +20 -0
  853. package/packages/agent/src/cloud/cloud-proxy.d.ts.map +1 -0
  854. package/packages/agent/src/cloud/cloud-proxy.js +34 -0
  855. package/packages/agent/src/cloud/cloud-wallet.d.ts +94 -0
  856. package/packages/agent/src/cloud/cloud-wallet.d.ts.map +1 -0
  857. package/packages/agent/src/cloud/cloud-wallet.js +199 -0
  858. package/packages/agent/src/cloud/index.d.ts +7 -0
  859. package/packages/agent/src/cloud/index.d.ts.map +1 -0
  860. package/packages/agent/src/cloud/index.js +6 -0
  861. package/packages/agent/src/cloud/reconnect.d.ts +26 -0
  862. package/packages/agent/src/cloud/reconnect.d.ts.map +1 -0
  863. package/packages/agent/src/cloud/reconnect.js +89 -0
  864. package/packages/agent/src/cloud/validate-url.d.ts +2 -0
  865. package/packages/agent/src/cloud/validate-url.d.ts.map +1 -0
  866. package/packages/agent/src/cloud/validate-url.js +162 -0
  867. package/packages/agent/src/config/character-schema.d.ts +25 -0
  868. package/packages/agent/src/config/character-schema.d.ts.map +1 -0
  869. package/packages/agent/src/config/character-schema.js +39 -0
  870. package/packages/agent/src/config/config.d.ts +6 -0
  871. package/packages/agent/src/config/config.d.ts.map +1 -0
  872. package/packages/agent/src/config/config.js +277 -0
  873. package/packages/agent/src/config/env-vars.d.ts +9 -0
  874. package/packages/agent/src/config/env-vars.d.ts.map +1 -0
  875. package/packages/agent/src/config/env-vars.js +282 -0
  876. package/packages/agent/src/config/feature-flags.d.ts +17 -0
  877. package/packages/agent/src/config/feature-flags.d.ts.map +1 -0
  878. package/packages/agent/src/config/feature-flags.js +37 -0
  879. package/packages/agent/src/config/includes.d.ts +26 -0
  880. package/packages/agent/src/config/includes.d.ts.map +1 -0
  881. package/packages/agent/src/config/includes.js +148 -0
  882. package/packages/agent/src/config/index.d.ts +19 -0
  883. package/packages/agent/src/config/index.d.ts.map +1 -0
  884. package/packages/agent/src/config/index.js +18 -0
  885. package/packages/agent/src/config/object-utils.d.ts +2 -0
  886. package/packages/agent/src/config/object-utils.d.ts.map +1 -0
  887. package/packages/agent/src/config/object-utils.js +6 -0
  888. package/packages/agent/src/config/owner-contacts.d.ts +42 -0
  889. package/packages/agent/src/config/owner-contacts.d.ts.map +1 -0
  890. package/packages/agent/src/config/owner-contacts.js +223 -0
  891. package/packages/agent/src/config/paths.d.ts +13 -0
  892. package/packages/agent/src/config/paths.d.ts.map +1 -0
  893. package/packages/agent/src/config/paths.js +106 -0
  894. package/packages/agent/src/config/plugin-auto-enable.d.ts +36 -0
  895. package/packages/agent/src/config/plugin-auto-enable.d.ts.map +1 -0
  896. package/packages/agent/src/config/plugin-auto-enable.js +519 -0
  897. package/packages/agent/src/config/plugin-widgets.d.ts +29 -0
  898. package/packages/agent/src/config/plugin-widgets.d.ts.map +1 -0
  899. package/packages/agent/src/config/plugin-widgets.js +70 -0
  900. package/packages/agent/src/config/runtime-env.d.ts +2 -0
  901. package/packages/agent/src/config/runtime-env.d.ts.map +1 -0
  902. package/packages/agent/src/config/runtime-env.js +1 -0
  903. package/packages/agent/src/config/schema.d.ts +87 -0
  904. package/packages/agent/src/config/schema.d.ts.map +1 -0
  905. package/packages/agent/src/config/schema.js +922 -0
  906. package/packages/agent/src/config/telegram-custom-commands.d.ts +25 -0
  907. package/packages/agent/src/config/telegram-custom-commands.d.ts.map +1 -0
  908. package/packages/agent/src/config/telegram-custom-commands.js +71 -0
  909. package/packages/agent/src/config/types.agent-defaults.d.ts +362 -0
  910. package/packages/agent/src/config/types.agent-defaults.d.ts.map +1 -0
  911. package/packages/agent/src/config/types.agent-defaults.js +1 -0
  912. package/packages/agent/src/config/types.agents.d.ts +114 -0
  913. package/packages/agent/src/config/types.agents.d.ts.map +1 -0
  914. package/packages/agent/src/config/types.agents.js +1 -0
  915. package/packages/agent/src/config/types.d.ts +8 -0
  916. package/packages/agent/src/config/types.d.ts.map +1 -0
  917. package/packages/agent/src/config/types.eliza.d.ts +670 -0
  918. package/packages/agent/src/config/types.eliza.d.ts.map +1 -0
  919. package/packages/agent/src/config/types.eliza.js +1 -0
  920. package/packages/agent/src/config/types.gateway.d.ts +216 -0
  921. package/packages/agent/src/config/types.gateway.d.ts.map +1 -0
  922. package/packages/agent/src/config/types.gateway.js +1 -0
  923. package/packages/agent/src/config/types.hooks.d.ts +107 -0
  924. package/packages/agent/src/config/types.hooks.d.ts.map +1 -0
  925. package/packages/agent/src/config/types.hooks.js +1 -0
  926. package/packages/agent/src/config/types.js +7 -0
  927. package/packages/agent/src/config/types.messages.d.ts +176 -0
  928. package/packages/agent/src/config/types.messages.d.ts.map +1 -0
  929. package/packages/agent/src/config/types.messages.js +1 -0
  930. package/packages/agent/src/config/types.tools.d.ts +400 -0
  931. package/packages/agent/src/config/types.tools.d.ts.map +1 -0
  932. package/packages/agent/src/config/types.tools.js +1 -0
  933. package/packages/agent/src/config/zod-schema.agent-runtime.d.ts +1137 -0
  934. package/packages/agent/src/config/zod-schema.agent-runtime.d.ts.map +1 -0
  935. package/packages/agent/src/config/zod-schema.agent-runtime.js +782 -0
  936. package/packages/agent/src/config/zod-schema.core.d.ts +1021 -0
  937. package/packages/agent/src/config/zod-schema.core.d.ts.map +1 -0
  938. package/packages/agent/src/config/zod-schema.core.js +694 -0
  939. package/packages/agent/src/config/zod-schema.d.ts +3185 -0
  940. package/packages/agent/src/config/zod-schema.d.ts.map +1 -0
  941. package/packages/agent/src/config/zod-schema.hooks.d.ts +88 -0
  942. package/packages/agent/src/config/zod-schema.hooks.d.ts.map +1 -0
  943. package/packages/agent/src/config/zod-schema.hooks.js +133 -0
  944. package/packages/agent/src/config/zod-schema.js +850 -0
  945. package/packages/agent/src/config/zod-schema.providers-core.d.ts +2746 -0
  946. package/packages/agent/src/config/zod-schema.providers-core.d.ts.map +1 -0
  947. package/packages/agent/src/config/zod-schema.providers-core.js +961 -0
  948. package/packages/agent/src/config/zod-schema.session.d.ts +183 -0
  949. package/packages/agent/src/config/zod-schema.session.d.ts.map +1 -0
  950. package/packages/agent/src/config/zod-schema.session.js +86 -0
  951. package/packages/agent/src/contracts/apps.d.ts +2 -0
  952. package/packages/agent/src/contracts/apps.d.ts.map +1 -0
  953. package/packages/agent/src/contracts/apps.js +1 -0
  954. package/packages/agent/src/contracts/awareness.d.ts +38 -0
  955. package/packages/agent/src/contracts/awareness.d.ts.map +1 -0
  956. package/packages/agent/src/contracts/awareness.js +7 -0
  957. package/packages/agent/src/contracts/config.d.ts +148 -0
  958. package/packages/agent/src/contracts/config.d.ts.map +1 -0
  959. package/packages/agent/src/contracts/config.js +4 -0
  960. package/packages/agent/src/contracts/drop.d.ts +2 -0
  961. package/packages/agent/src/contracts/drop.d.ts.map +1 -0
  962. package/packages/agent/src/contracts/drop.js +1 -0
  963. package/packages/agent/src/contracts/index.d.ts +11 -0
  964. package/packages/agent/src/contracts/index.d.ts.map +1 -0
  965. package/packages/agent/src/contracts/index.js +10 -0
  966. package/packages/agent/src/contracts/lifeops.d.ts +2 -0
  967. package/packages/agent/src/contracts/lifeops.d.ts.map +1 -0
  968. package/packages/agent/src/contracts/lifeops.js +1 -0
  969. package/packages/agent/src/contracts/onboarding.d.ts +2 -0
  970. package/packages/agent/src/contracts/onboarding.d.ts.map +1 -0
  971. package/packages/agent/src/contracts/onboarding.js +1 -0
  972. package/packages/agent/src/contracts/permissions.d.ts +2 -0
  973. package/packages/agent/src/contracts/permissions.d.ts.map +1 -0
  974. package/packages/agent/src/contracts/permissions.js +1 -0
  975. package/packages/agent/src/contracts/service-routing.d.ts +2 -0
  976. package/packages/agent/src/contracts/service-routing.d.ts.map +1 -0
  977. package/packages/agent/src/contracts/service-routing.js +1 -0
  978. package/packages/agent/src/contracts/verification.d.ts +2 -0
  979. package/packages/agent/src/contracts/verification.d.ts.map +1 -0
  980. package/packages/agent/src/contracts/verification.js +1 -0
  981. package/packages/agent/src/contracts/wallet.d.ts +2 -0
  982. package/packages/agent/src/contracts/wallet.d.ts.map +1 -0
  983. package/packages/agent/src/contracts/wallet.js +1 -0
  984. package/packages/agent/src/diagnostics/index.d.ts +2 -0
  985. package/packages/agent/src/diagnostics/index.d.ts.map +1 -0
  986. package/packages/agent/src/diagnostics/index.js +1 -0
  987. package/packages/agent/src/diagnostics/integration-observability.d.ts +40 -0
  988. package/packages/agent/src/diagnostics/integration-observability.d.ts.map +1 -0
  989. package/packages/agent/src/diagnostics/integration-observability.js +75 -0
  990. package/packages/agent/src/evals/coordinator-eval-client.d.ts +2 -0
  991. package/packages/agent/src/evals/coordinator-eval-client.d.ts.map +1 -0
  992. package/packages/agent/src/evals/coordinator-eval-client.js +1 -0
  993. package/packages/agent/src/evals/coordinator-live-runner.d.ts +2 -0
  994. package/packages/agent/src/evals/coordinator-live-runner.d.ts.map +1 -0
  995. package/packages/agent/src/evals/coordinator-live-runner.js +1 -0
  996. package/packages/agent/src/evals/coordinator-preflight.d.ts +2 -0
  997. package/packages/agent/src/evals/coordinator-preflight.d.ts.map +1 -0
  998. package/packages/agent/src/evals/coordinator-preflight.js +1 -0
  999. package/packages/agent/src/evals/coordinator-scenarios.d.ts +2 -0
  1000. package/packages/agent/src/evals/coordinator-scenarios.d.ts.map +1 -0
  1001. package/packages/agent/src/evals/coordinator-scenarios.js +1 -0
  1002. package/packages/agent/src/evaluators/late-join-whitelist.d.ts +16 -0
  1003. package/packages/agent/src/evaluators/late-join-whitelist.d.ts.map +1 -0
  1004. package/packages/agent/src/evaluators/late-join-whitelist.js +67 -0
  1005. package/packages/agent/src/hooks/discovery.d.ts +13 -0
  1006. package/packages/agent/src/hooks/discovery.d.ts.map +1 -0
  1007. package/packages/agent/src/hooks/discovery.js +191 -0
  1008. package/packages/agent/src/hooks/eligibility.d.ts +12 -0
  1009. package/packages/agent/src/hooks/eligibility.d.ts.map +1 -0
  1010. package/packages/agent/src/hooks/eligibility.js +105 -0
  1011. package/packages/agent/src/hooks/index.d.ts +3 -0
  1012. package/packages/agent/src/hooks/index.d.ts.map +1 -0
  1013. package/packages/agent/src/hooks/index.js +2 -0
  1014. package/packages/agent/src/hooks/loader.d.ts +34 -0
  1015. package/packages/agent/src/hooks/loader.d.ts.map +1 -0
  1016. package/packages/agent/src/hooks/loader.js +214 -0
  1017. package/packages/agent/src/hooks/registry.d.ts +11 -0
  1018. package/packages/agent/src/hooks/registry.d.ts.map +1 -0
  1019. package/packages/agent/src/hooks/registry.js +58 -0
  1020. package/packages/agent/src/hooks/types.d.ts +104 -0
  1021. package/packages/agent/src/hooks/types.d.ts.map +1 -0
  1022. package/packages/agent/src/hooks/types.js +8 -0
  1023. package/packages/agent/src/index.d.ts +22 -0
  1024. package/packages/agent/src/index.d.ts.map +1 -0
  1025. package/packages/agent/src/index.js +20 -0
  1026. package/packages/agent/src/lifeops/app-state.d.ts +2 -0
  1027. package/packages/agent/src/lifeops/app-state.d.ts.map +1 -0
  1028. package/packages/agent/src/lifeops/app-state.js +1 -0
  1029. package/packages/agent/src/lifeops/apple-reminders.d.ts +2 -0
  1030. package/packages/agent/src/lifeops/apple-reminders.d.ts.map +1 -0
  1031. package/packages/agent/src/lifeops/apple-reminders.js +1 -0
  1032. package/packages/agent/src/lifeops/defaults.d.ts +2 -0
  1033. package/packages/agent/src/lifeops/defaults.d.ts.map +1 -0
  1034. package/packages/agent/src/lifeops/defaults.js +1 -0
  1035. package/packages/agent/src/lifeops/engine.d.ts +2 -0
  1036. package/packages/agent/src/lifeops/engine.d.ts.map +1 -0
  1037. package/packages/agent/src/lifeops/engine.js +1 -0
  1038. package/packages/agent/src/lifeops/goal-grounding.d.ts +2 -0
  1039. package/packages/agent/src/lifeops/goal-grounding.d.ts.map +1 -0
  1040. package/packages/agent/src/lifeops/goal-grounding.js +1 -0
  1041. package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts +2 -0
  1042. package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts.map +1 -0
  1043. package/packages/agent/src/lifeops/goal-semantic-evaluator.js +1 -0
  1044. package/packages/agent/src/lifeops/google-api-error.d.ts +2 -0
  1045. package/packages/agent/src/lifeops/google-api-error.d.ts.map +1 -0
  1046. package/packages/agent/src/lifeops/google-api-error.js +1 -0
  1047. package/packages/agent/src/lifeops/google-calendar.d.ts +2 -0
  1048. package/packages/agent/src/lifeops/google-calendar.d.ts.map +1 -0
  1049. package/packages/agent/src/lifeops/google-calendar.js +1 -0
  1050. package/packages/agent/src/lifeops/google-connector-gateway.d.ts +2 -0
  1051. package/packages/agent/src/lifeops/google-connector-gateway.d.ts.map +1 -0
  1052. package/packages/agent/src/lifeops/google-connector-gateway.js +1 -0
  1053. package/packages/agent/src/lifeops/google-fetch.d.ts +2 -0
  1054. package/packages/agent/src/lifeops/google-fetch.d.ts.map +1 -0
  1055. package/packages/agent/src/lifeops/google-fetch.js +1 -0
  1056. package/packages/agent/src/lifeops/google-gmail.d.ts +2 -0
  1057. package/packages/agent/src/lifeops/google-gmail.d.ts.map +1 -0
  1058. package/packages/agent/src/lifeops/google-gmail.js +1 -0
  1059. package/packages/agent/src/lifeops/google-managed-client.d.ts +2 -0
  1060. package/packages/agent/src/lifeops/google-managed-client.d.ts.map +1 -0
  1061. package/packages/agent/src/lifeops/google-managed-client.js +1 -0
  1062. package/packages/agent/src/lifeops/google-oauth.d.ts +2 -0
  1063. package/packages/agent/src/lifeops/google-oauth.d.ts.map +1 -0
  1064. package/packages/agent/src/lifeops/google-oauth.js +1 -0
  1065. package/packages/agent/src/lifeops/google-scopes.d.ts +2 -0
  1066. package/packages/agent/src/lifeops/google-scopes.d.ts.map +1 -0
  1067. package/packages/agent/src/lifeops/google-scopes.js +1 -0
  1068. package/packages/agent/src/lifeops/index.d.ts +2 -0
  1069. package/packages/agent/src/lifeops/index.d.ts.map +1 -0
  1070. package/packages/agent/src/lifeops/index.js +1 -0
  1071. package/packages/agent/src/lifeops/owner-profile.d.ts +2 -0
  1072. package/packages/agent/src/lifeops/owner-profile.d.ts.map +1 -0
  1073. package/packages/agent/src/lifeops/owner-profile.js +1 -0
  1074. package/packages/agent/src/lifeops/repository.d.ts +2 -0
  1075. package/packages/agent/src/lifeops/repository.d.ts.map +1 -0
  1076. package/packages/agent/src/lifeops/repository.js +1 -0
  1077. package/packages/agent/src/lifeops/runtime.d.ts +2 -0
  1078. package/packages/agent/src/lifeops/runtime.d.ts.map +1 -0
  1079. package/packages/agent/src/lifeops/runtime.js +1 -0
  1080. package/packages/agent/src/lifeops/screen-context.d.ts +2 -0
  1081. package/packages/agent/src/lifeops/screen-context.d.ts.map +1 -0
  1082. package/packages/agent/src/lifeops/screen-context.js +1 -0
  1083. package/packages/agent/src/lifeops/seed-routines.d.ts +2 -0
  1084. package/packages/agent/src/lifeops/seed-routines.d.ts.map +1 -0
  1085. package/packages/agent/src/lifeops/seed-routines.js +1 -0
  1086. package/packages/agent/src/lifeops/service.d.ts +2 -0
  1087. package/packages/agent/src/lifeops/service.d.ts.map +1 -0
  1088. package/packages/agent/src/lifeops/service.js +1 -0
  1089. package/packages/agent/src/lifeops/sql.d.ts +2 -0
  1090. package/packages/agent/src/lifeops/sql.d.ts.map +1 -0
  1091. package/packages/agent/src/lifeops/sql.js +1 -0
  1092. package/packages/agent/src/lifeops/time.d.ts +2 -0
  1093. package/packages/agent/src/lifeops/time.d.ts.map +1 -0
  1094. package/packages/agent/src/lifeops/time.js +1 -0
  1095. package/packages/agent/src/lifeops/twilio.d.ts +2 -0
  1096. package/packages/agent/src/lifeops/twilio.d.ts.map +1 -0
  1097. package/packages/agent/src/lifeops/twilio.js +1 -0
  1098. package/packages/agent/src/lifeops/x-poster.d.ts +2 -0
  1099. package/packages/agent/src/lifeops/x-poster.d.ts.map +1 -0
  1100. package/packages/agent/src/lifeops/x-poster.js +1 -0
  1101. package/packages/agent/src/onboarding-presets.d.ts +2 -0
  1102. package/packages/agent/src/onboarding-presets.d.ts.map +1 -0
  1103. package/packages/agent/src/onboarding-presets.js +1 -0
  1104. package/packages/agent/src/plugins/custom-rtmp/index.d.ts +12 -0
  1105. package/packages/agent/src/plugins/custom-rtmp/index.d.ts.map +1 -0
  1106. package/packages/agent/src/plugins/custom-rtmp/index.js +26 -0
  1107. package/packages/agent/src/plugins/discord-voice-capability.d.ts +35 -0
  1108. package/packages/agent/src/plugins/discord-voice-capability.d.ts.map +1 -0
  1109. package/packages/agent/src/plugins/discord-voice-capability.js +97 -0
  1110. package/packages/agent/src/providers/activity-profile.d.ts +3 -0
  1111. package/packages/agent/src/providers/activity-profile.d.ts.map +1 -0
  1112. package/packages/agent/src/providers/activity-profile.js +140 -0
  1113. package/packages/agent/src/providers/admin-panel.d.ts +4 -0
  1114. package/packages/agent/src/providers/admin-panel.d.ts.map +1 -0
  1115. package/packages/agent/src/providers/admin-panel.js +83 -0
  1116. package/packages/agent/src/providers/admin-trust.d.ts +4 -0
  1117. package/packages/agent/src/providers/admin-trust.d.ts.map +1 -0
  1118. package/packages/agent/src/providers/admin-trust.js +34 -0
  1119. package/packages/agent/src/providers/conversation-utils.d.ts +11 -0
  1120. package/packages/agent/src/providers/conversation-utils.d.ts.map +1 -0
  1121. package/packages/agent/src/providers/conversation-utils.js +79 -0
  1122. package/packages/agent/src/providers/escalation-trigger.d.ts +15 -0
  1123. package/packages/agent/src/providers/escalation-trigger.d.ts.map +1 -0
  1124. package/packages/agent/src/providers/escalation-trigger.js +165 -0
  1125. package/packages/agent/src/providers/inbox-triage.d.ts +2 -0
  1126. package/packages/agent/src/providers/inbox-triage.d.ts.map +1 -0
  1127. package/packages/agent/src/providers/inbox-triage.js +1 -0
  1128. package/packages/agent/src/providers/index.d.ts +18 -0
  1129. package/packages/agent/src/providers/index.d.ts.map +1 -0
  1130. package/packages/agent/src/providers/index.js +17 -0
  1131. package/packages/agent/src/providers/lifeops.d.ts +2 -0
  1132. package/packages/agent/src/providers/lifeops.d.ts.map +1 -0
  1133. package/packages/agent/src/providers/lifeops.js +1 -0
  1134. package/packages/agent/src/providers/local-models.d.ts +118 -0
  1135. package/packages/agent/src/providers/local-models.d.ts.map +1 -0
  1136. package/packages/agent/src/providers/local-models.js +427 -0
  1137. package/packages/agent/src/providers/media-provider.d.ts +192 -0
  1138. package/packages/agent/src/providers/media-provider.d.ts.map +1 -0
  1139. package/packages/agent/src/providers/media-provider.js +1088 -0
  1140. package/packages/agent/src/providers/recent-conversations.d.ts +3 -0
  1141. package/packages/agent/src/providers/recent-conversations.d.ts.map +1 -0
  1142. package/packages/agent/src/providers/recent-conversations.js +87 -0
  1143. package/packages/agent/src/providers/relevant-conversations.d.ts +3 -0
  1144. package/packages/agent/src/providers/relevant-conversations.d.ts.map +1 -0
  1145. package/packages/agent/src/providers/relevant-conversations.js +88 -0
  1146. package/packages/agent/src/providers/role-backfill.d.ts +18 -0
  1147. package/packages/agent/src/providers/role-backfill.d.ts.map +1 -0
  1148. package/packages/agent/src/providers/role-backfill.js +84 -0
  1149. package/packages/agent/src/providers/rolodex.d.ts +3 -0
  1150. package/packages/agent/src/providers/rolodex.d.ts.map +1 -0
  1151. package/packages/agent/src/providers/rolodex.js +77 -0
  1152. package/packages/agent/src/providers/self-status.d.ts +4 -0
  1153. package/packages/agent/src/providers/self-status.d.ts.map +1 -0
  1154. package/packages/agent/src/providers/self-status.js +12 -0
  1155. package/packages/agent/src/providers/session-bridge.d.ts +24 -0
  1156. package/packages/agent/src/providers/session-bridge.d.ts.map +1 -0
  1157. package/packages/agent/src/providers/session-bridge.js +85 -0
  1158. package/packages/agent/src/providers/session-utils.d.ts +20 -0
  1159. package/packages/agent/src/providers/session-utils.d.ts.map +1 -0
  1160. package/packages/agent/src/providers/session-utils.js +33 -0
  1161. package/packages/agent/src/providers/simple-mode.d.ts +4 -0
  1162. package/packages/agent/src/providers/simple-mode.d.ts.map +1 -0
  1163. package/packages/agent/src/providers/simple-mode.js +85 -0
  1164. package/packages/agent/src/providers/skill-provider.d.ts +16 -0
  1165. package/packages/agent/src/providers/skill-provider.d.ts.map +1 -0
  1166. package/packages/agent/src/providers/skill-provider.js +336 -0
  1167. package/packages/agent/src/providers/tasks.d.ts +9 -0
  1168. package/packages/agent/src/providers/tasks.d.ts.map +1 -0
  1169. package/packages/agent/src/providers/tasks.js +113 -0
  1170. package/packages/agent/src/providers/ui-catalog.d.ts +3 -0
  1171. package/packages/agent/src/providers/ui-catalog.d.ts.map +1 -0
  1172. package/packages/agent/src/providers/ui-catalog.js +95 -0
  1173. package/packages/agent/src/providers/user-name.d.ts +11 -0
  1174. package/packages/agent/src/providers/user-name.d.ts.map +1 -0
  1175. package/packages/agent/src/providers/user-name.js +40 -0
  1176. package/packages/agent/src/providers/workspace-provider.d.ts +22 -0
  1177. package/packages/agent/src/providers/workspace-provider.d.ts.map +1 -0
  1178. package/packages/agent/src/providers/workspace-provider.js +177 -0
  1179. package/packages/agent/src/providers/workspace.d.ts +54 -0
  1180. package/packages/agent/src/providers/workspace.d.ts.map +1 -0
  1181. package/packages/agent/src/providers/workspace.js +481 -0
  1182. package/packages/agent/src/runtime/agent-event-service.d.ts +35 -0
  1183. package/packages/agent/src/runtime/agent-event-service.d.ts.map +1 -0
  1184. package/packages/agent/src/runtime/agent-event-service.js +16 -0
  1185. package/packages/agent/src/runtime/cloud-onboarding.d.ts +35 -0
  1186. package/packages/agent/src/runtime/cloud-onboarding.d.ts.map +1 -0
  1187. package/packages/agent/src/runtime/cloud-onboarding.js +279 -0
  1188. package/packages/agent/src/runtime/core-plugins.d.ts +19 -0
  1189. package/packages/agent/src/runtime/core-plugins.d.ts.map +1 -0
  1190. package/packages/agent/src/runtime/core-plugins.js +62 -0
  1191. package/packages/agent/src/runtime/custom-actions.d.ts +43 -0
  1192. package/packages/agent/src/runtime/custom-actions.d.ts.map +1 -0
  1193. package/packages/agent/src/runtime/custom-actions.js +507 -0
  1194. package/packages/agent/src/runtime/default-knowledge.d.ts +20 -0
  1195. package/packages/agent/src/runtime/default-knowledge.d.ts.map +1 -0
  1196. package/packages/agent/src/runtime/default-knowledge.js +256 -0
  1197. package/packages/agent/src/runtime/discord-local-plugin.d.ts +86 -0
  1198. package/packages/agent/src/runtime/discord-local-plugin.d.ts.map +1 -0
  1199. package/packages/agent/src/runtime/discord-local-plugin.js +884 -0
  1200. package/packages/agent/src/runtime/eliza-plugin.d.ts +16 -0
  1201. package/packages/agent/src/runtime/eliza-plugin.d.ts.map +1 -0
  1202. package/packages/agent/src/runtime/eliza-plugin.js +212 -0
  1203. package/packages/agent/src/runtime/eliza.d.ts +181 -0
  1204. package/packages/agent/src/runtime/eliza.d.ts.map +1 -0
  1205. package/packages/agent/src/runtime/eliza.js +3286 -0
  1206. package/packages/agent/src/runtime/embedding-presets.d.ts +19 -0
  1207. package/packages/agent/src/runtime/embedding-presets.d.ts.map +1 -0
  1208. package/packages/agent/src/runtime/embedding-presets.js +60 -0
  1209. package/packages/agent/src/runtime/first-time-setup.d.ts +25 -0
  1210. package/packages/agent/src/runtime/first-time-setup.d.ts.map +1 -0
  1211. package/packages/agent/src/runtime/first-time-setup.js +697 -0
  1212. package/packages/agent/src/runtime/index.d.ts +13 -0
  1213. package/packages/agent/src/runtime/index.d.ts.map +1 -0
  1214. package/packages/agent/src/runtime/index.js +12 -0
  1215. package/packages/agent/src/runtime/native-runtime-features.d.ts +4 -0
  1216. package/packages/agent/src/runtime/native-runtime-features.d.ts.map +1 -0
  1217. package/packages/agent/src/runtime/native-runtime-features.js +10 -0
  1218. package/packages/agent/src/runtime/onboarding-names.d.ts +11 -0
  1219. package/packages/agent/src/runtime/onboarding-names.d.ts.map +1 -0
  1220. package/packages/agent/src/runtime/onboarding-names.js +74 -0
  1221. package/packages/agent/src/runtime/owner-entity.d.ts +4 -0
  1222. package/packages/agent/src/runtime/owner-entity.d.ts.map +1 -0
  1223. package/packages/agent/src/runtime/owner-entity.js +30 -0
  1224. package/packages/agent/src/runtime/pglite-error-compat.d.ts +28 -0
  1225. package/packages/agent/src/runtime/pglite-error-compat.d.ts.map +1 -0
  1226. package/packages/agent/src/runtime/pglite-error-compat.js +54 -0
  1227. package/packages/agent/src/runtime/plugin-collector.d.ts +38 -0
  1228. package/packages/agent/src/runtime/plugin-collector.d.ts.map +1 -0
  1229. package/packages/agent/src/runtime/plugin-collector.js +397 -0
  1230. package/packages/agent/src/runtime/plugin-lifecycle.d.ts +44 -0
  1231. package/packages/agent/src/runtime/plugin-lifecycle.d.ts.map +1 -0
  1232. package/packages/agent/src/runtime/plugin-lifecycle.js +574 -0
  1233. package/packages/agent/src/runtime/plugin-resolver.d.ts +31 -0
  1234. package/packages/agent/src/runtime/plugin-resolver.d.ts.map +1 -0
  1235. package/packages/agent/src/runtime/plugin-resolver.js +828 -0
  1236. package/packages/agent/src/runtime/plugin-role-gating.d.ts +34 -0
  1237. package/packages/agent/src/runtime/plugin-role-gating.d.ts.map +1 -0
  1238. package/packages/agent/src/runtime/plugin-role-gating.js +232 -0
  1239. package/packages/agent/src/runtime/plugin-types.d.ts +71 -0
  1240. package/packages/agent/src/runtime/plugin-types.d.ts.map +1 -0
  1241. package/packages/agent/src/runtime/plugin-types.js +318 -0
  1242. package/packages/agent/src/runtime/prompt-compaction.d.ts +80 -0
  1243. package/packages/agent/src/runtime/prompt-compaction.d.ts.map +1 -0
  1244. package/packages/agent/src/runtime/prompt-compaction.js +307 -0
  1245. package/packages/agent/src/runtime/prompt-optimization.d.ts +11 -0
  1246. package/packages/agent/src/runtime/prompt-optimization.d.ts.map +1 -0
  1247. package/packages/agent/src/runtime/prompt-optimization.js +421 -0
  1248. package/packages/agent/src/runtime/release-plugin-policy.d.ts +20 -0
  1249. package/packages/agent/src/runtime/release-plugin-policy.d.ts.map +1 -0
  1250. package/packages/agent/src/runtime/release-plugin-policy.js +85 -0
  1251. package/packages/agent/src/runtime/restart.d.ts +45 -0
  1252. package/packages/agent/src/runtime/restart.d.ts.map +1 -0
  1253. package/packages/agent/src/runtime/restart.js +45 -0
  1254. package/packages/agent/src/runtime/roles/src/action.d.ts +11 -0
  1255. package/packages/agent/src/runtime/roles/src/action.d.ts.map +1 -0
  1256. package/packages/agent/src/runtime/roles/src/action.js +676 -0
  1257. package/packages/agent/src/runtime/roles/src/index.d.ts +24 -0
  1258. package/packages/agent/src/runtime/roles/src/index.d.ts.map +1 -0
  1259. package/packages/agent/src/runtime/roles/src/index.js +243 -0
  1260. package/packages/agent/src/runtime/roles/src/intent.d.ts +18 -0
  1261. package/packages/agent/src/runtime/roles/src/intent.d.ts.map +1 -0
  1262. package/packages/agent/src/runtime/roles/src/intent.js +299 -0
  1263. package/packages/agent/src/runtime/roles/src/provider.d.ts +7 -0
  1264. package/packages/agent/src/runtime/roles/src/provider.d.ts.map +1 -0
  1265. package/packages/agent/src/runtime/roles/src/provider.js +133 -0
  1266. package/packages/agent/src/runtime/roles/src/types.d.ts +3 -0
  1267. package/packages/agent/src/runtime/roles/src/types.d.ts.map +1 -0
  1268. package/packages/agent/src/runtime/roles/src/types.js +1 -0
  1269. package/packages/agent/src/runtime/roles/src/utils.d.ts +2 -0
  1270. package/packages/agent/src/runtime/roles/src/utils.d.ts.map +1 -0
  1271. package/packages/agent/src/runtime/roles/src/utils.js +1 -0
  1272. package/packages/agent/src/runtime/roles.d.ts +3 -0
  1273. package/packages/agent/src/runtime/roles.d.ts.map +1 -0
  1274. package/packages/agent/src/runtime/roles.js +5 -0
  1275. package/packages/agent/src/runtime/trajectory-export.d.ts +8 -0
  1276. package/packages/agent/src/runtime/trajectory-export.d.ts.map +1 -0
  1277. package/packages/agent/src/runtime/trajectory-export.js +7 -0
  1278. package/packages/agent/src/runtime/trajectory-internals.d.ts +217 -0
  1279. package/packages/agent/src/runtime/trajectory-internals.d.ts.map +1 -0
  1280. package/packages/agent/src/runtime/trajectory-internals.js +1296 -0
  1281. package/packages/agent/src/runtime/trajectory-persistence.d.ts +15 -0
  1282. package/packages/agent/src/runtime/trajectory-persistence.d.ts.map +1 -0
  1283. package/packages/agent/src/runtime/trajectory-persistence.js +29 -0
  1284. package/packages/agent/src/runtime/trajectory-query.d.ts +8 -0
  1285. package/packages/agent/src/runtime/trajectory-query.d.ts.map +1 -0
  1286. package/packages/agent/src/runtime/trajectory-query.js +27 -0
  1287. package/packages/agent/src/runtime/trajectory-storage.d.ts +65 -0
  1288. package/packages/agent/src/runtime/trajectory-storage.d.ts.map +1 -0
  1289. package/packages/agent/src/runtime/trajectory-storage.js +1026 -0
  1290. package/packages/agent/src/runtime/version.d.ts +2 -0
  1291. package/packages/agent/src/runtime/version.d.ts.map +1 -0
  1292. package/packages/agent/src/runtime/version.js +5 -0
  1293. package/packages/agent/src/runtime/web-search-tools.d.ts +22 -0
  1294. package/packages/agent/src/runtime/web-search-tools.d.ts.map +1 -0
  1295. package/packages/agent/src/runtime/web-search-tools.js +149 -0
  1296. package/packages/agent/src/security/access.d.ts +17 -0
  1297. package/packages/agent/src/security/access.d.ts.map +1 -0
  1298. package/packages/agent/src/security/access.js +149 -0
  1299. package/packages/agent/src/security/audit-log.d.ts +49 -0
  1300. package/packages/agent/src/security/audit-log.d.ts.map +1 -0
  1301. package/packages/agent/src/security/audit-log.js +161 -0
  1302. package/packages/agent/src/security/index.d.ts +3 -0
  1303. package/packages/agent/src/security/index.d.ts.map +1 -0
  1304. package/packages/agent/src/security/index.js +2 -0
  1305. package/packages/agent/src/security/network-policy.d.ts +6 -0
  1306. package/packages/agent/src/security/network-policy.d.ts.map +1 -0
  1307. package/packages/agent/src/security/network-policy.js +85 -0
  1308. package/packages/agent/src/server/index.d.ts +3 -0
  1309. package/packages/agent/src/server/index.d.ts.map +1 -0
  1310. package/packages/agent/src/server/index.js +1 -0
  1311. package/packages/agent/src/services/agent-export.d.ts +100 -0
  1312. package/packages/agent/src/services/agent-export.d.ts.map +1 -0
  1313. package/packages/agent/src/services/agent-export.js +729 -0
  1314. package/packages/agent/src/services/app-manager.d.ts +56 -0
  1315. package/packages/agent/src/services/app-manager.d.ts.map +1 -0
  1316. package/packages/agent/src/services/app-manager.js +2019 -0
  1317. package/packages/agent/src/services/app-package-modules.d.ts +30 -0
  1318. package/packages/agent/src/services/app-package-modules.d.ts.map +1 -0
  1319. package/packages/agent/src/services/app-package-modules.js +348 -0
  1320. package/packages/agent/src/services/app-run-store.d.ts +6 -0
  1321. package/packages/agent/src/services/app-run-store.d.ts.map +1 -0
  1322. package/packages/agent/src/services/app-run-store.js +490 -0
  1323. package/packages/agent/src/services/app-session-gate.d.ts +15 -0
  1324. package/packages/agent/src/services/app-session-gate.d.ts.map +1 -0
  1325. package/packages/agent/src/services/app-session-gate.js +71 -0
  1326. package/packages/agent/src/services/browser-capture.d.ts +41 -0
  1327. package/packages/agent/src/services/browser-capture.d.ts.map +1 -0
  1328. package/packages/agent/src/services/browser-capture.js +173 -0
  1329. package/packages/agent/src/services/browser-workspace.d.ts +179 -0
  1330. package/packages/agent/src/services/browser-workspace.d.ts.map +1 -0
  1331. package/packages/agent/src/services/browser-workspace.js +4589 -0
  1332. package/packages/agent/src/services/built-in-app-routes/2004scape.d.ts +28 -0
  1333. package/packages/agent/src/services/built-in-app-routes/2004scape.d.ts.map +1 -0
  1334. package/packages/agent/src/services/built-in-app-routes/2004scape.js +1343 -0
  1335. package/packages/agent/src/services/built-in-app-routes/hyperscape.d.ts +5 -0
  1336. package/packages/agent/src/services/built-in-app-routes/hyperscape.d.ts.map +1 -0
  1337. package/packages/agent/src/services/built-in-app-routes/hyperscape.js +189 -0
  1338. package/packages/agent/src/services/character-persistence.d.ts +39 -0
  1339. package/packages/agent/src/services/character-persistence.d.ts.map +1 -0
  1340. package/packages/agent/src/services/character-persistence.js +159 -0
  1341. package/packages/agent/src/services/client-chat-sender.d.ts +19 -0
  1342. package/packages/agent/src/services/client-chat-sender.d.ts.map +1 -0
  1343. package/packages/agent/src/services/client-chat-sender.js +88 -0
  1344. package/packages/agent/src/services/coding-agent-context.d.ts +310 -0
  1345. package/packages/agent/src/services/coding-agent-context.d.ts.map +1 -0
  1346. package/packages/agent/src/services/coding-agent-context.js +281 -0
  1347. package/packages/agent/src/services/coding-task-executor.d.ts +20 -0
  1348. package/packages/agent/src/services/coding-task-executor.d.ts.map +1 -0
  1349. package/packages/agent/src/services/coding-task-executor.js +141 -0
  1350. package/packages/agent/src/services/config-plugin-manager.d.ts +6 -0
  1351. package/packages/agent/src/services/config-plugin-manager.d.ts.map +1 -0
  1352. package/packages/agent/src/services/config-plugin-manager.js +53 -0
  1353. package/packages/agent/src/services/connector-setup-service.d.ts +48 -0
  1354. package/packages/agent/src/services/connector-setup-service.d.ts.map +1 -0
  1355. package/packages/agent/src/services/connector-setup-service.js +60 -0
  1356. package/packages/agent/src/services/conversation-proximity.d.ts +27 -0
  1357. package/packages/agent/src/services/conversation-proximity.d.ts.map +1 -0
  1358. package/packages/agent/src/services/conversation-proximity.js +124 -0
  1359. package/packages/agent/src/services/credential-words.d.ts +26 -0
  1360. package/packages/agent/src/services/credential-words.d.ts.map +1 -0
  1361. package/packages/agent/src/services/credential-words.js +116 -0
  1362. package/packages/agent/src/services/escalation.d.ts +46 -0
  1363. package/packages/agent/src/services/escalation.d.ts.map +1 -0
  1364. package/packages/agent/src/services/escalation.js +415 -0
  1365. package/packages/agent/src/services/executor-registry.d.ts +4 -0
  1366. package/packages/agent/src/services/executor-registry.d.ts.map +1 -0
  1367. package/packages/agent/src/services/executor-registry.js +10 -0
  1368. package/packages/agent/src/services/index.d.ts +25 -0
  1369. package/packages/agent/src/services/index.d.ts.map +1 -0
  1370. package/packages/agent/src/services/index.js +24 -0
  1371. package/packages/agent/src/services/mcp-marketplace.d.ts +89 -0
  1372. package/packages/agent/src/services/mcp-marketplace.d.ts.map +1 -0
  1373. package/packages/agent/src/services/mcp-marketplace.js +200 -0
  1374. package/packages/agent/src/services/overlay-app-presence.d.ts +9 -0
  1375. package/packages/agent/src/services/overlay-app-presence.d.ts.map +1 -0
  1376. package/packages/agent/src/services/overlay-app-presence.js +18 -0
  1377. package/packages/agent/src/services/plugin-manager-types.d.ts +113 -0
  1378. package/packages/agent/src/services/plugin-manager-types.d.ts.map +1 -0
  1379. package/packages/agent/src/services/plugin-manager-types.js +18 -0
  1380. package/packages/agent/src/services/privy-wallets.d.ts +23 -0
  1381. package/packages/agent/src/services/privy-wallets.d.ts.map +1 -0
  1382. package/packages/agent/src/services/privy-wallets.js +230 -0
  1383. package/packages/agent/src/services/registry-client-app-meta.d.ts +6 -0
  1384. package/packages/agent/src/services/registry-client-app-meta.d.ts.map +1 -0
  1385. package/packages/agent/src/services/registry-client-app-meta.js +225 -0
  1386. package/packages/agent/src/services/registry-client-endpoints.d.ts +7 -0
  1387. package/packages/agent/src/services/registry-client-endpoints.d.ts.map +1 -0
  1388. package/packages/agent/src/services/registry-client-endpoints.js +190 -0
  1389. package/packages/agent/src/services/registry-client-local.d.ts +4 -0
  1390. package/packages/agent/src/services/registry-client-local.d.ts.map +1 -0
  1391. package/packages/agent/src/services/registry-client-local.js +545 -0
  1392. package/packages/agent/src/services/registry-client-network.d.ts +9 -0
  1393. package/packages/agent/src/services/registry-client-network.d.ts.map +1 -0
  1394. package/packages/agent/src/services/registry-client-network.js +119 -0
  1395. package/packages/agent/src/services/registry-client-queries.d.ts +15 -0
  1396. package/packages/agent/src/services/registry-client-queries.d.ts.map +1 -0
  1397. package/packages/agent/src/services/registry-client-queries.js +172 -0
  1398. package/packages/agent/src/services/registry-client-types.d.ts +125 -0
  1399. package/packages/agent/src/services/registry-client-types.d.ts.map +1 -0
  1400. package/packages/agent/src/services/registry-client-types.js +1 -0
  1401. package/packages/agent/src/services/registry-client.d.ts +39 -0
  1402. package/packages/agent/src/services/registry-client.d.ts.map +1 -0
  1403. package/packages/agent/src/services/registry-client.js +332 -0
  1404. package/packages/agent/src/services/relationships-graph.d.ts +134 -0
  1405. package/packages/agent/src/services/relationships-graph.d.ts.map +1 -0
  1406. package/packages/agent/src/services/relationships-graph.js +1332 -0
  1407. package/packages/agent/src/services/remote-signing-service.d.ts +58 -0
  1408. package/packages/agent/src/services/remote-signing-service.d.ts.map +1 -0
  1409. package/packages/agent/src/services/remote-signing-service.js +185 -0
  1410. package/packages/agent/src/services/research-task-executor.d.ts +14 -0
  1411. package/packages/agent/src/services/research-task-executor.d.ts.map +1 -0
  1412. package/packages/agent/src/services/research-task-executor.js +136 -0
  1413. package/packages/agent/src/services/sandbox-engine.d.ts +96 -0
  1414. package/packages/agent/src/services/sandbox-engine.d.ts.map +1 -0
  1415. package/packages/agent/src/services/sandbox-engine.js +604 -0
  1416. package/packages/agent/src/services/sandbox-manager.d.ts +106 -0
  1417. package/packages/agent/src/services/sandbox-manager.d.ts.map +1 -0
  1418. package/packages/agent/src/services/sandbox-manager.js +380 -0
  1419. package/packages/agent/src/services/self-updater.d.ts +21 -0
  1420. package/packages/agent/src/services/self-updater.d.ts.map +1 -0
  1421. package/packages/agent/src/services/self-updater.js +162 -0
  1422. package/packages/agent/src/services/send-handler-availability.d.ts +5 -0
  1423. package/packages/agent/src/services/send-handler-availability.d.ts.map +1 -0
  1424. package/packages/agent/src/services/send-handler-availability.js +20 -0
  1425. package/packages/agent/src/services/signal-pairing.d.ts +57 -0
  1426. package/packages/agent/src/services/signal-pairing.d.ts.map +1 -0
  1427. package/packages/agent/src/services/signal-pairing.js +393 -0
  1428. package/packages/agent/src/services/signing-policy.d.ts +44 -0
  1429. package/packages/agent/src/services/signing-policy.d.ts.map +1 -0
  1430. package/packages/agent/src/services/signing-policy.js +165 -0
  1431. package/packages/agent/src/services/skill-catalog-client.d.ts +47 -0
  1432. package/packages/agent/src/services/skill-catalog-client.d.ts.map +1 -0
  1433. package/packages/agent/src/services/skill-catalog-client.js +130 -0
  1434. package/packages/agent/src/services/skill-marketplace.d.ts +42 -0
  1435. package/packages/agent/src/services/skill-marketplace.d.ts.map +1 -0
  1436. package/packages/agent/src/services/skill-marketplace.js +689 -0
  1437. package/packages/agent/src/services/steward-evm-account.d.ts +62 -0
  1438. package/packages/agent/src/services/steward-evm-account.d.ts.map +1 -0
  1439. package/packages/agent/src/services/steward-evm-account.js +308 -0
  1440. package/packages/agent/src/services/steward-evm-bridge.d.ts +39 -0
  1441. package/packages/agent/src/services/steward-evm-bridge.d.ts.map +1 -0
  1442. package/packages/agent/src/services/steward-evm-bridge.js +103 -0
  1443. package/packages/agent/src/services/steward-wallet.d.ts +30 -0
  1444. package/packages/agent/src/services/steward-wallet.d.ts.map +1 -0
  1445. package/packages/agent/src/services/steward-wallet.js +334 -0
  1446. package/packages/agent/src/services/stream-manager.d.ts +121 -0
  1447. package/packages/agent/src/services/stream-manager.d.ts.map +1 -0
  1448. package/packages/agent/src/services/stream-manager.js +609 -0
  1449. package/packages/agent/src/services/task-executor.d.ts +47 -0
  1450. package/packages/agent/src/services/task-executor.d.ts.map +1 -0
  1451. package/packages/agent/src/services/task-executor.js +31 -0
  1452. package/packages/agent/src/services/telegram-account-auth.d.ts +99 -0
  1453. package/packages/agent/src/services/telegram-account-auth.d.ts.map +1 -0
  1454. package/packages/agent/src/services/telegram-account-auth.js +611 -0
  1455. package/packages/agent/src/services/tts-stream-bridge.d.ts +83 -0
  1456. package/packages/agent/src/services/tts-stream-bridge.d.ts.map +1 -0
  1457. package/packages/agent/src/services/tts-stream-bridge.js +360 -0
  1458. package/packages/agent/src/services/update-checker.d.ts +29 -0
  1459. package/packages/agent/src/services/update-checker.d.ts.map +1 -0
  1460. package/packages/agent/src/services/update-checker.js +134 -0
  1461. package/packages/agent/src/services/version-compat.d.ts +99 -0
  1462. package/packages/agent/src/services/version-compat.d.ts.map +1 -0
  1463. package/packages/agent/src/services/version-compat.js +203 -0
  1464. package/packages/agent/src/services/whatsapp-pairing.d.ts +41 -0
  1465. package/packages/agent/src/services/whatsapp-pairing.d.ts.map +1 -0
  1466. package/packages/agent/src/services/whatsapp-pairing.js +209 -0
  1467. package/packages/agent/src/shared/index.d.ts +2 -0
  1468. package/packages/agent/src/shared/index.d.ts.map +1 -0
  1469. package/packages/agent/src/shared/index.js +1 -0
  1470. package/packages/agent/src/shared/ui-catalog-prompt.d.ts +52 -0
  1471. package/packages/agent/src/shared/ui-catalog-prompt.d.ts.map +1 -0
  1472. package/packages/agent/src/shared/ui-catalog-prompt.js +1028 -0
  1473. package/packages/agent/src/test-support/index.d.ts +4 -0
  1474. package/packages/agent/src/test-support/index.d.ts.map +1 -0
  1475. package/packages/agent/src/test-support/index.js +3 -0
  1476. package/packages/agent/src/test-support/process-helpers.d.ts +13 -0
  1477. package/packages/agent/src/test-support/process-helpers.d.ts.map +1 -0
  1478. package/packages/agent/src/test-support/process-helpers.js +23 -0
  1479. package/packages/agent/src/test-support/route-test-helpers.d.ts +37 -0
  1480. package/packages/agent/src/test-support/route-test-helpers.d.ts.map +1 -0
  1481. package/packages/agent/src/test-support/route-test-helpers.js +54 -0
  1482. package/packages/agent/src/test-support/test-helpers.d.ts +77 -0
  1483. package/packages/agent/src/test-support/test-helpers.d.ts.map +1 -0
  1484. package/packages/agent/src/test-support/test-helpers.js +217 -0
  1485. package/packages/agent/src/test-utils/sqlite-compat.d.ts +17 -0
  1486. package/packages/agent/src/test-utils/sqlite-compat.d.ts.map +1 -0
  1487. package/packages/agent/src/test-utils/sqlite-compat.js +48 -0
  1488. package/packages/agent/src/testing/index.d.ts +4 -0
  1489. package/packages/agent/src/testing/index.d.ts.map +1 -0
  1490. package/packages/agent/src/testing/index.js +3 -0
  1491. package/packages/agent/src/triggers/action.d.ts +4 -0
  1492. package/packages/agent/src/triggers/action.d.ts.map +1 -0
  1493. package/packages/agent/src/triggers/action.js +316 -0
  1494. package/packages/agent/src/triggers/index.d.ts +5 -0
  1495. package/packages/agent/src/triggers/index.d.ts.map +1 -0
  1496. package/packages/agent/src/triggers/index.js +4 -0
  1497. package/packages/agent/src/triggers/runtime.d.ts +25 -0
  1498. package/packages/agent/src/triggers/runtime.d.ts.map +1 -0
  1499. package/packages/agent/src/triggers/runtime.js +456 -0
  1500. package/packages/agent/src/triggers/scheduling.d.ts +71 -0
  1501. package/packages/agent/src/triggers/scheduling.d.ts.map +1 -0
  1502. package/packages/agent/src/triggers/scheduling.js +355 -0
  1503. package/packages/agent/src/triggers/types.d.ts +115 -0
  1504. package/packages/agent/src/triggers/types.d.ts.map +1 -0
  1505. package/packages/agent/src/triggers/types.js +1 -0
  1506. package/packages/agent/src/types/agent-skills.d.ts +19 -0
  1507. package/packages/agent/src/types/agent-skills.d.ts.map +1 -0
  1508. package/packages/agent/src/types/agent-skills.js +7 -0
  1509. package/packages/agent/src/types/config-like.d.ts +17 -0
  1510. package/packages/agent/src/types/config-like.d.ts.map +1 -0
  1511. package/packages/agent/src/types/config-like.js +7 -0
  1512. package/packages/agent/src/types/trajectory.d.ts +106 -0
  1513. package/packages/agent/src/types/trajectory.d.ts.map +1 -0
  1514. package/packages/agent/src/types/trajectory.js +7 -0
  1515. package/packages/agent/src/utils/exec-safety.d.ts +2 -0
  1516. package/packages/agent/src/utils/exec-safety.d.ts.map +1 -0
  1517. package/packages/agent/src/utils/exec-safety.js +21 -0
  1518. package/packages/agent/src/utils/index.d.ts +3 -0
  1519. package/packages/agent/src/utils/index.d.ts.map +1 -0
  1520. package/packages/agent/src/utils/index.js +2 -0
  1521. package/packages/agent/src/utils/number-parsing.d.ts +26 -0
  1522. package/packages/agent/src/utils/number-parsing.d.ts.map +1 -0
  1523. package/packages/agent/src/utils/number-parsing.js +52 -0
  1524. package/packages/agent/src/utils/spoken-text.d.ts +2 -0
  1525. package/packages/agent/src/utils/spoken-text.d.ts.map +1 -0
  1526. package/packages/agent/src/utils/spoken-text.js +1 -0
  1527. package/packages/agent/src/version-resolver.d.ts +2 -0
  1528. package/packages/agent/src/version-resolver.d.ts.map +1 -0
  1529. package/packages/agent/src/version-resolver.js +50 -0
  1530. package/packages/app-core/src/api/cloud-secrets.d.ts +23 -0
  1531. package/packages/app-core/src/api/cloud-secrets.d.ts.map +1 -0
  1532. package/packages/app-core/src/api/cloud-secrets.js +50 -0
  1533. package/packages/app-core/src/api/compat-route-shared.d.ts +16 -0
  1534. package/packages/app-core/src/api/compat-route-shared.d.ts.map +1 -0
  1535. package/packages/app-core/src/api/compat-route-shared.js +99 -0
  1536. package/packages/app-core/src/api/response.d.ts +12 -0
  1537. package/packages/app-core/src/api/response.d.ts.map +1 -0
  1538. package/packages/app-core/src/api/response.js +18 -0
  1539. package/packages/app-core/src/api/server-cloud-tts.d.ts +41 -0
  1540. package/packages/app-core/src/api/server-cloud-tts.d.ts.map +1 -0
  1541. package/packages/app-core/src/api/server-cloud-tts.js +469 -0
  1542. package/packages/app-core/src/config/boot-config-store.d.ts +117 -0
  1543. package/packages/app-core/src/config/boot-config-store.d.ts.map +1 -0
  1544. package/packages/app-core/src/config/boot-config-store.js +135 -0
  1545. package/packages/app-core/src/config/boot-config.d.ts +6 -0
  1546. package/packages/app-core/src/config/boot-config.d.ts.map +1 -0
  1547. package/packages/app-core/src/config/boot-config.js +5 -0
  1548. package/packages/app-core/src/config/branding.d.ts +55 -0
  1549. package/packages/app-core/src/config/branding.d.ts.map +1 -0
  1550. package/packages/app-core/src/config/branding.js +23 -0
  1551. package/packages/app-core/src/config/config.d.ts +12 -0
  1552. package/packages/app-core/src/config/config.d.ts.map +1 -0
  1553. package/packages/app-core/src/config/config.js +23 -0
  1554. package/packages/app-core/src/navigation/index.d.ts +52 -0
  1555. package/packages/app-core/src/navigation/index.d.ts.map +1 -0
  1556. package/packages/app-core/src/navigation/index.js +354 -0
  1557. package/packages/app-core/src/state/action-notice.d.ts +7 -0
  1558. package/packages/app-core/src/state/action-notice.d.ts.map +1 -0
  1559. package/packages/app-core/src/state/action-notice.js +1 -0
  1560. package/packages/app-core/src/types/index.d.ts +649 -0
  1561. package/packages/app-core/src/types/index.d.ts.map +1 -0
  1562. package/packages/app-core/src/types/index.js +1 -0
  1563. package/packages/app-core/src/types/lifeops-ui.d.ts +10 -0
  1564. package/packages/app-core/src/types/lifeops-ui.d.ts.map +1 -0
  1565. package/packages/app-core/src/types/lifeops-ui.js +1 -0
  1566. package/packages/app-core/src/utils/env.d.ts +31 -0
  1567. package/packages/app-core/src/utils/env.d.ts.map +1 -0
  1568. package/packages/app-core/src/utils/env.js +51 -0
  1569. package/packages/app-core/src/utils/tts-debug.d.ts +9 -0
  1570. package/packages/app-core/src/utils/tts-debug.d.ts.map +1 -0
  1571. package/packages/app-core/src/utils/tts-debug.js +68 -0
  1572. package/packages/shared/src/awareness/index.d.ts +2 -0
  1573. package/packages/shared/src/awareness/index.d.ts.map +1 -0
  1574. package/packages/shared/src/awareness/index.js +1 -0
  1575. package/packages/shared/src/awareness/registry.d.ts +27 -0
  1576. package/packages/shared/src/awareness/registry.d.ts.map +1 -0
  1577. package/packages/shared/src/awareness/registry.js +161 -0
  1578. package/packages/shared/src/connectors.d.ts +13 -0
  1579. package/packages/shared/src/connectors.d.ts.map +1 -0
  1580. package/packages/shared/src/connectors.js +91 -0
  1581. package/packages/shared/src/contracts/apps.d.ts +204 -0
  1582. package/packages/shared/src/contracts/apps.d.ts.map +1 -0
  1583. package/packages/shared/src/contracts/apps.js +188 -0
  1584. package/packages/shared/src/contracts/awareness.d.ts +38 -0
  1585. package/packages/shared/src/contracts/awareness.d.ts.map +1 -0
  1586. package/packages/shared/src/contracts/awareness.js +7 -0
  1587. package/packages/shared/src/contracts/cloud-topology.d.ts +13 -0
  1588. package/packages/shared/src/contracts/cloud-topology.d.ts.map +1 -0
  1589. package/packages/shared/src/contracts/cloud-topology.js +73 -0
  1590. package/packages/shared/src/contracts/config.d.ts +146 -0
  1591. package/packages/shared/src/contracts/config.d.ts.map +1 -0
  1592. package/packages/shared/src/contracts/config.js +4 -0
  1593. package/packages/shared/src/contracts/content-pack.d.ts +131 -0
  1594. package/packages/shared/src/contracts/content-pack.d.ts.map +1 -0
  1595. package/packages/shared/src/contracts/content-pack.js +102 -0
  1596. package/packages/shared/src/contracts/drop.d.ts +20 -0
  1597. package/packages/shared/src/contracts/drop.d.ts.map +1 -0
  1598. package/packages/shared/src/contracts/drop.js +4 -0
  1599. package/packages/shared/src/contracts/index.d.ts +13 -0
  1600. package/packages/shared/src/contracts/index.d.ts.map +1 -0
  1601. package/packages/shared/src/contracts/index.js +12 -0
  1602. package/packages/shared/src/contracts/lifeops.d.ts +1337 -0
  1603. package/packages/shared/src/contracts/lifeops.d.ts.map +1 -0
  1604. package/packages/shared/src/contracts/lifeops.js +278 -0
  1605. package/packages/shared/src/contracts/onboarding.d.ts +443 -0
  1606. package/packages/shared/src/contracts/onboarding.d.ts.map +1 -0
  1607. package/packages/shared/src/contracts/onboarding.js +1020 -0
  1608. package/packages/shared/src/contracts/permissions.d.ts +38 -0
  1609. package/packages/shared/src/contracts/permissions.d.ts.map +1 -0
  1610. package/packages/shared/src/contracts/permissions.js +4 -0
  1611. package/packages/shared/src/contracts/service-routing.d.ts +77 -0
  1612. package/packages/shared/src/contracts/service-routing.d.ts.map +1 -0
  1613. package/packages/shared/src/contracts/service-routing.js +227 -0
  1614. package/packages/shared/src/contracts/theme.d.ts +136 -0
  1615. package/packages/shared/src/contracts/theme.d.ts.map +1 -0
  1616. package/packages/shared/src/contracts/theme.js +133 -0
  1617. package/packages/shared/src/contracts/verification.d.ts +9 -0
  1618. package/packages/shared/src/contracts/verification.d.ts.map +1 -0
  1619. package/packages/shared/src/contracts/verification.js +4 -0
  1620. package/packages/shared/src/contracts/wallet.d.ts +626 -0
  1621. package/packages/shared/src/contracts/wallet.d.ts.map +1 -0
  1622. package/packages/shared/src/contracts/wallet.js +60 -0
  1623. package/packages/shared/src/env-utils.d.ts +5 -0
  1624. package/packages/shared/src/env-utils.d.ts.map +1 -0
  1625. package/packages/shared/src/env-utils.impl.d.ts +2 -0
  1626. package/packages/shared/src/env-utils.impl.d.ts.map +1 -0
  1627. package/packages/shared/src/env-utils.impl.js +16 -0
  1628. package/packages/shared/src/env-utils.js +4 -0
  1629. package/packages/shared/src/i18n/generated/validation-keyword-data.d.ts +1054 -0
  1630. package/packages/shared/src/i18n/generated/validation-keyword-data.d.ts.map +1 -0
  1631. package/packages/shared/src/i18n/generated/validation-keyword-data.js +1057 -0
  1632. package/packages/shared/src/i18n/keyword-matching.d.ts +23 -0
  1633. package/packages/shared/src/i18n/keyword-matching.d.ts.map +1 -0
  1634. package/packages/shared/src/i18n/keyword-matching.js +112 -0
  1635. package/packages/shared/src/i18n/validation-keywords.d.ts +13 -0
  1636. package/packages/shared/src/i18n/validation-keywords.d.ts.map +1 -0
  1637. package/packages/shared/src/i18n/validation-keywords.js +12 -0
  1638. package/packages/shared/src/index.d.ts +13 -0
  1639. package/packages/shared/src/index.d.ts.map +1 -0
  1640. package/packages/shared/src/index.js +12 -0
  1641. package/packages/shared/src/onboarding-presets.characters.d.ts +22 -0
  1642. package/packages/shared/src/onboarding-presets.characters.d.ts.map +1 -0
  1643. package/packages/shared/src/onboarding-presets.characters.js +2606 -0
  1644. package/packages/shared/src/onboarding-presets.d.ts +40 -0
  1645. package/packages/shared/src/onboarding-presets.d.ts.map +1 -0
  1646. package/packages/shared/src/onboarding-presets.js +176 -0
  1647. package/packages/shared/src/onboarding-presets.shared.d.ts +2 -0
  1648. package/packages/shared/src/onboarding-presets.shared.d.ts.map +1 -0
  1649. package/packages/shared/src/onboarding-presets.shared.js +7 -0
  1650. package/packages/shared/src/restart.d.ts +27 -0
  1651. package/packages/shared/src/restart.d.ts.map +1 -0
  1652. package/packages/shared/src/restart.js +28 -0
  1653. package/packages/shared/src/runtime-env.d.ts +82 -0
  1654. package/packages/shared/src/runtime-env.d.ts.map +1 -0
  1655. package/packages/shared/src/runtime-env.js +246 -0
  1656. package/packages/shared/src/settings-debug.d.ts +20 -0
  1657. package/packages/shared/src/settings-debug.d.ts.map +1 -0
  1658. package/packages/shared/src/settings-debug.js +116 -0
  1659. package/packages/shared/src/spoken-text.d.ts +2 -0
  1660. package/packages/shared/src/spoken-text.d.ts.map +1 -0
  1661. package/packages/shared/src/spoken-text.js +56 -0
  1662. package/packages/shared/src/types.d.ts +27 -0
  1663. package/packages/shared/src/types.d.ts.map +1 -0
  1664. package/packages/shared/src/types.js +1 -0
  1665. package/packages/shared/src/validation-keywords.d.ts +2 -0
  1666. package/packages/shared/src/validation-keywords.d.ts.map +1 -0
  1667. package/packages/shared/src/validation-keywords.js +1 -0
  1668. package/packages/typescript/src/action-docs.d.ts +22 -0
  1669. package/packages/typescript/src/action-docs.d.ts.map +1 -0
  1670. package/packages/typescript/src/action-docs.js +93 -0
  1671. package/packages/typescript/src/actions.d.ts +29 -0
  1672. package/packages/typescript/src/actions.d.ts.map +1 -0
  1673. package/packages/typescript/src/actions.js +456 -0
  1674. package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.d.ts +4 -0
  1675. package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.d.ts.map +1 -0
  1676. package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.js +150 -0
  1677. package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.d.ts +4 -0
  1678. package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.d.ts.map +1 -0
  1679. package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.js +136 -0
  1680. package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.d.ts +4 -0
  1681. package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.d.ts.map +1 -0
  1682. package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.js +84 -0
  1683. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.d.ts +4 -0
  1684. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.d.ts.map +1 -0
  1685. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.js +107 -0
  1686. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.d.ts +16 -0
  1687. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.d.ts.map +1 -0
  1688. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.js +187 -0
  1689. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.d.ts +4 -0
  1690. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.d.ts.map +1 -0
  1691. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.js +138 -0
  1692. package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts +4 -0
  1693. package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts.map +1 -0
  1694. package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.js +96 -0
  1695. package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.d.ts +4 -0
  1696. package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.d.ts.map +1 -0
  1697. package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.js +139 -0
  1698. package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.d.ts +4 -0
  1699. package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.d.ts.map +1 -0
  1700. package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.js +138 -0
  1701. package/packages/typescript/src/advanced-capabilities/clipboard/index.d.ts +39 -0
  1702. package/packages/typescript/src/advanced-capabilities/clipboard/index.d.ts.map +1 -0
  1703. package/packages/typescript/src/advanced-capabilities/clipboard/index.js +78 -0
  1704. package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.d.ts +4 -0
  1705. package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.d.ts.map +1 -0
  1706. package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.js +62 -0
  1707. package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.d.ts +16 -0
  1708. package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.d.ts.map +1 -0
  1709. package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.js +162 -0
  1710. package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.d.ts +65 -0
  1711. package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.d.ts.map +1 -0
  1712. package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.js +352 -0
  1713. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts +24 -0
  1714. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts.map +1 -0
  1715. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.js +63 -0
  1716. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.d.ts +29 -0
  1717. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.d.ts.map +1 -0
  1718. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.js +195 -0
  1719. package/packages/typescript/src/advanced-capabilities/clipboard/specs.d.ts +15 -0
  1720. package/packages/typescript/src/advanced-capabilities/clipboard/specs.d.ts.map +1 -0
  1721. package/packages/typescript/src/advanced-capabilities/clipboard/specs.js +164 -0
  1722. package/packages/typescript/src/advanced-capabilities/clipboard/types.d.ts +92 -0
  1723. package/packages/typescript/src/advanced-capabilities/clipboard/types.d.ts.map +1 -0
  1724. package/packages/typescript/src/advanced-capabilities/clipboard/types.js +4 -0
  1725. package/packages/typescript/src/character-utils.d.ts +138 -0
  1726. package/packages/typescript/src/character-utils.d.ts.map +1 -0
  1727. package/packages/typescript/src/character-utils.js +271 -0
  1728. package/packages/typescript/src/character.d.ts +68 -0
  1729. package/packages/typescript/src/character.d.ts.map +1 -0
  1730. package/packages/typescript/src/character.js +155 -0
  1731. package/packages/typescript/src/connection.d.ts +45 -0
  1732. package/packages/typescript/src/connection.d.ts.map +1 -0
  1733. package/packages/typescript/src/connection.js +149 -0
  1734. package/packages/typescript/src/constants/index.d.ts +7 -0
  1735. package/packages/typescript/src/constants/index.d.ts.map +1 -0
  1736. package/packages/typescript/src/constants/index.js +6 -0
  1737. package/packages/typescript/src/constants/secrets.d.ts +99 -0
  1738. package/packages/typescript/src/constants/secrets.d.ts.map +1 -0
  1739. package/packages/typescript/src/constants/secrets.js +239 -0
  1740. package/packages/typescript/src/database/inMemoryAdapter.d.ts +285 -0
  1741. package/packages/typescript/src/database/inMemoryAdapter.d.ts.map +1 -0
  1742. package/packages/typescript/src/database/inMemoryAdapter.js +1149 -0
  1743. package/packages/typescript/src/database.d.ts +426 -0
  1744. package/packages/typescript/src/database.d.ts.map +1 -0
  1745. package/packages/typescript/src/database.js +24 -0
  1746. package/packages/typescript/src/entities.d.ts +11 -0
  1747. package/packages/typescript/src/entities.d.ts.map +1 -0
  1748. package/packages/typescript/src/entities.js +437 -0
  1749. package/packages/typescript/src/features/advanced-capabilities/actions/addContact.d.ts +3 -0
  1750. package/packages/typescript/src/features/advanced-capabilities/actions/addContact.d.ts.map +1 -0
  1751. package/packages/typescript/src/features/advanced-capabilities/actions/addContact.js +142 -0
  1752. package/packages/typescript/src/features/advanced-capabilities/actions/followRoom.d.ts +3 -0
  1753. package/packages/typescript/src/features/advanced-capabilities/actions/followRoom.d.ts.map +1 -0
  1754. package/packages/typescript/src/features/advanced-capabilities/actions/followRoom.js +183 -0
  1755. package/packages/typescript/src/features/advanced-capabilities/actions/imageGeneration.d.ts +3 -0
  1756. package/packages/typescript/src/features/advanced-capabilities/actions/imageGeneration.d.ts.map +1 -0
  1757. package/packages/typescript/src/features/advanced-capabilities/actions/imageGeneration.js +148 -0
  1758. package/packages/typescript/src/features/advanced-capabilities/actions/index.d.ts +21 -0
  1759. package/packages/typescript/src/features/advanced-capabilities/actions/index.d.ts.map +1 -0
  1760. package/packages/typescript/src/features/advanced-capabilities/actions/index.js +20 -0
  1761. package/packages/typescript/src/features/advanced-capabilities/actions/muteRoom.d.ts +3 -0
  1762. package/packages/typescript/src/features/advanced-capabilities/actions/muteRoom.d.ts.map +1 -0
  1763. package/packages/typescript/src/features/advanced-capabilities/actions/muteRoom.js +181 -0
  1764. package/packages/typescript/src/features/advanced-capabilities/actions/removeContact.d.ts +3 -0
  1765. package/packages/typescript/src/features/advanced-capabilities/actions/removeContact.d.ts.map +1 -0
  1766. package/packages/typescript/src/features/advanced-capabilities/actions/removeContact.js +102 -0
  1767. package/packages/typescript/src/features/advanced-capabilities/actions/roles.d.ts +13 -0
  1768. package/packages/typescript/src/features/advanced-capabilities/actions/roles.d.ts.map +1 -0
  1769. package/packages/typescript/src/features/advanced-capabilities/actions/roles.js +317 -0
  1770. package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.d.ts +3 -0
  1771. package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.d.ts.map +1 -0
  1772. package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.js +129 -0
  1773. package/packages/typescript/src/features/advanced-capabilities/actions/searchContacts.d.ts +3 -0
  1774. package/packages/typescript/src/features/advanced-capabilities/actions/searchContacts.d.ts.map +1 -0
  1775. package/packages/typescript/src/features/advanced-capabilities/actions/searchContacts.js +176 -0
  1776. package/packages/typescript/src/features/advanced-capabilities/actions/sendMessage.d.ts +15 -0
  1777. package/packages/typescript/src/features/advanced-capabilities/actions/sendMessage.d.ts.map +1 -0
  1778. package/packages/typescript/src/features/advanced-capabilities/actions/sendMessage.js +476 -0
  1779. package/packages/typescript/src/features/advanced-capabilities/actions/settings.d.ts +22 -0
  1780. package/packages/typescript/src/features/advanced-capabilities/actions/settings.d.ts.map +1 -0
  1781. package/packages/typescript/src/features/advanced-capabilities/actions/settings.js +823 -0
  1782. package/packages/typescript/src/features/advanced-capabilities/actions/think.d.ts +3 -0
  1783. package/packages/typescript/src/features/advanced-capabilities/actions/think.d.ts.map +1 -0
  1784. package/packages/typescript/src/features/advanced-capabilities/actions/think.js +84 -0
  1785. package/packages/typescript/src/features/advanced-capabilities/actions/unfollowRoom.d.ts +3 -0
  1786. package/packages/typescript/src/features/advanced-capabilities/actions/unfollowRoom.d.ts.map +1 -0
  1787. package/packages/typescript/src/features/advanced-capabilities/actions/unfollowRoom.js +134 -0
  1788. package/packages/typescript/src/features/advanced-capabilities/actions/unmuteRoom.d.ts +3 -0
  1789. package/packages/typescript/src/features/advanced-capabilities/actions/unmuteRoom.d.ts.map +1 -0
  1790. package/packages/typescript/src/features/advanced-capabilities/actions/unmuteRoom.js +193 -0
  1791. package/packages/typescript/src/features/advanced-capabilities/actions/updateContact.d.ts +3 -0
  1792. package/packages/typescript/src/features/advanced-capabilities/actions/updateContact.d.ts.map +1 -0
  1793. package/packages/typescript/src/features/advanced-capabilities/actions/updateContact.js +199 -0
  1794. package/packages/typescript/src/features/advanced-capabilities/actions/updateEntity.d.ts +43 -0
  1795. package/packages/typescript/src/features/advanced-capabilities/actions/updateEntity.d.ts.map +1 -0
  1796. package/packages/typescript/src/features/advanced-capabilities/actions/updateEntity.js +372 -0
  1797. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/append.d.ts +4 -0
  1798. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/append.d.ts.map +1 -0
  1799. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/append.js +150 -0
  1800. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/delete.d.ts +4 -0
  1801. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/delete.d.ts.map +1 -0
  1802. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/delete.js +136 -0
  1803. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/list.d.ts +4 -0
  1804. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/list.d.ts.map +1 -0
  1805. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/list.js +84 -0
  1806. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-attachment.d.ts +4 -0
  1807. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-attachment.d.ts.map +1 -0
  1808. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-attachment.js +112 -0
  1809. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-file.d.ts +16 -0
  1810. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-file.d.ts.map +1 -0
  1811. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-file.js +192 -0
  1812. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read.d.ts +4 -0
  1813. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read.d.ts.map +1 -0
  1814. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read.js +138 -0
  1815. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts +4 -0
  1816. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts.map +1 -0
  1817. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/remove-from-clipboard.js +96 -0
  1818. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/search.d.ts +4 -0
  1819. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/search.d.ts.map +1 -0
  1820. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/search.js +139 -0
  1821. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/write.d.ts +4 -0
  1822. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/write.d.ts.map +1 -0
  1823. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/write.js +138 -0
  1824. package/packages/typescript/src/features/advanced-capabilities/clipboard/index.d.ts +39 -0
  1825. package/packages/typescript/src/features/advanced-capabilities/clipboard/index.d.ts.map +1 -0
  1826. package/packages/typescript/src/features/advanced-capabilities/clipboard/index.js +78 -0
  1827. package/packages/typescript/src/features/advanced-capabilities/clipboard/providers/clipboard.d.ts +4 -0
  1828. package/packages/typescript/src/features/advanced-capabilities/clipboard/providers/clipboard.d.ts.map +1 -0
  1829. package/packages/typescript/src/features/advanced-capabilities/clipboard/providers/clipboard.js +62 -0
  1830. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/attachmentContext.d.ts +16 -0
  1831. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/attachmentContext.d.ts.map +1 -0
  1832. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/attachmentContext.js +162 -0
  1833. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/clipboardService.d.ts +65 -0
  1834. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/clipboardService.d.ts.map +1 -0
  1835. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/clipboardService.js +352 -0
  1836. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts +24 -0
  1837. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts.map +1 -0
  1838. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardPersistence.js +63 -0
  1839. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardService.d.ts +29 -0
  1840. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardService.d.ts.map +1 -0
  1841. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardService.js +195 -0
  1842. package/packages/typescript/src/features/advanced-capabilities/clipboard/specs.d.ts +15 -0
  1843. package/packages/typescript/src/features/advanced-capabilities/clipboard/specs.d.ts.map +1 -0
  1844. package/packages/typescript/src/features/advanced-capabilities/clipboard/specs.js +164 -0
  1845. package/packages/typescript/src/features/advanced-capabilities/clipboard/types.d.ts +92 -0
  1846. package/packages/typescript/src/features/advanced-capabilities/clipboard/types.d.ts.map +1 -0
  1847. package/packages/typescript/src/features/advanced-capabilities/clipboard/types.js +4 -0
  1848. package/packages/typescript/src/features/advanced-capabilities/evaluators/index.d.ts +8 -0
  1849. package/packages/typescript/src/features/advanced-capabilities/evaluators/index.d.ts.map +1 -0
  1850. package/packages/typescript/src/features/advanced-capabilities/evaluators/index.js +7 -0
  1851. package/packages/typescript/src/features/advanced-capabilities/evaluators/reflection.d.ts +3 -0
  1852. package/packages/typescript/src/features/advanced-capabilities/evaluators/reflection.d.ts.map +1 -0
  1853. package/packages/typescript/src/features/advanced-capabilities/evaluators/reflection.js +633 -0
  1854. package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.d.ts +3 -0
  1855. package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.d.ts.map +1 -0
  1856. package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.js +619 -0
  1857. package/packages/typescript/src/features/advanced-capabilities/evaluators/task-completion.d.ts +12 -0
  1858. package/packages/typescript/src/features/advanced-capabilities/evaluators/task-completion.d.ts.map +1 -0
  1859. package/packages/typescript/src/features/advanced-capabilities/evaluators/task-completion.js +14 -0
  1860. package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.d.ts +3 -0
  1861. package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.d.ts.map +1 -0
  1862. package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.js +70 -0
  1863. package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.d.ts +3 -0
  1864. package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.d.ts.map +1 -0
  1865. package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.js +256 -0
  1866. package/packages/typescript/src/features/advanced-capabilities/experience/generated/prompts/typescript/prompts.d.ts +12 -0
  1867. package/packages/typescript/src/features/advanced-capabilities/experience/generated/prompts/typescript/prompts.d.ts.map +1 -0
  1868. package/packages/typescript/src/features/advanced-capabilities/experience/generated/prompts/typescript/prompts.js +41 -0
  1869. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/spec-helpers.d.ts +49 -0
  1870. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/spec-helpers.d.ts.map +1 -0
  1871. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/spec-helpers.js +78 -0
  1872. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/specs.d.ts +159 -0
  1873. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/specs.d.ts.map +1 -0
  1874. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/specs.js +192 -0
  1875. package/packages/typescript/src/features/advanced-capabilities/experience/index.d.ts +10 -0
  1876. package/packages/typescript/src/features/advanced-capabilities/experience/index.d.ts.map +1 -0
  1877. package/packages/typescript/src/features/advanced-capabilities/experience/index.js +8 -0
  1878. package/packages/typescript/src/features/advanced-capabilities/experience/providers/experienceProvider.d.ts +3 -0
  1879. package/packages/typescript/src/features/advanced-capabilities/experience/providers/experienceProvider.d.ts.map +1 -0
  1880. package/packages/typescript/src/features/advanced-capabilities/experience/providers/experienceProvider.js +51 -0
  1881. package/packages/typescript/src/features/advanced-capabilities/experience/service.d.ts +46 -0
  1882. package/packages/typescript/src/features/advanced-capabilities/experience/service.d.ts.map +1 -0
  1883. package/packages/typescript/src/features/advanced-capabilities/experience/service.js +569 -0
  1884. package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts +95 -0
  1885. package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts.map +1 -0
  1886. package/packages/typescript/src/features/advanced-capabilities/experience/types.js +22 -0
  1887. package/packages/typescript/src/features/advanced-capabilities/experience/utils/confidenceDecay.d.ts +34 -0
  1888. package/packages/typescript/src/features/advanced-capabilities/experience/utils/confidenceDecay.d.ts.map +1 -0
  1889. package/packages/typescript/src/features/advanced-capabilities/experience/utils/confidenceDecay.js +106 -0
  1890. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceRelationships.d.ts +25 -0
  1891. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceRelationships.d.ts.map +1 -0
  1892. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceRelationships.js +116 -0
  1893. package/packages/typescript/src/features/advanced-capabilities/form/actions/restore.d.ts +13 -0
  1894. package/packages/typescript/src/features/advanced-capabilities/form/actions/restore.d.ts.map +1 -0
  1895. package/packages/typescript/src/features/advanced-capabilities/form/actions/restore.js +152 -0
  1896. package/packages/typescript/src/features/advanced-capabilities/form/builder.d.ts +101 -0
  1897. package/packages/typescript/src/features/advanced-capabilities/form/builder.d.ts.map +1 -0
  1898. package/packages/typescript/src/features/advanced-capabilities/form/builder.js +362 -0
  1899. package/packages/typescript/src/features/advanced-capabilities/form/builtins.d.ts +16 -0
  1900. package/packages/typescript/src/features/advanced-capabilities/form/builtins.d.ts.map +1 -0
  1901. package/packages/typescript/src/features/advanced-capabilities/form/builtins.js +245 -0
  1902. package/packages/typescript/src/features/advanced-capabilities/form/defaults.d.ts +32 -0
  1903. package/packages/typescript/src/features/advanced-capabilities/form/defaults.d.ts.map +1 -0
  1904. package/packages/typescript/src/features/advanced-capabilities/form/defaults.js +98 -0
  1905. package/packages/typescript/src/features/advanced-capabilities/form/evaluators/extractor.d.ts +12 -0
  1906. package/packages/typescript/src/features/advanced-capabilities/form/evaluators/extractor.d.ts.map +1 -0
  1907. package/packages/typescript/src/features/advanced-capabilities/form/evaluators/extractor.js +231 -0
  1908. package/packages/typescript/src/features/advanced-capabilities/form/extraction.d.ts +24 -0
  1909. package/packages/typescript/src/features/advanced-capabilities/form/extraction.d.ts.map +1 -0
  1910. package/packages/typescript/src/features/advanced-capabilities/form/extraction.js +319 -0
  1911. package/packages/typescript/src/features/advanced-capabilities/form/index.d.ts +22 -0
  1912. package/packages/typescript/src/features/advanced-capabilities/form/index.d.ts.map +1 -0
  1913. package/packages/typescript/src/features/advanced-capabilities/form/index.js +52 -0
  1914. package/packages/typescript/src/features/advanced-capabilities/form/intent.d.ts +41 -0
  1915. package/packages/typescript/src/features/advanced-capabilities/form/intent.d.ts.map +1 -0
  1916. package/packages/typescript/src/features/advanced-capabilities/form/intent.js +119 -0
  1917. package/packages/typescript/src/features/advanced-capabilities/form/providers/context.d.ts +11 -0
  1918. package/packages/typescript/src/features/advanced-capabilities/form/providers/context.d.ts.map +1 -0
  1919. package/packages/typescript/src/features/advanced-capabilities/form/providers/context.js +166 -0
  1920. package/packages/typescript/src/features/advanced-capabilities/form/service.d.ts +70 -0
  1921. package/packages/typescript/src/features/advanced-capabilities/form/service.d.ts.map +1 -0
  1922. package/packages/typescript/src/features/advanced-capabilities/form/service.js +924 -0
  1923. package/packages/typescript/src/features/advanced-capabilities/form/storage.d.ts +26 -0
  1924. package/packages/typescript/src/features/advanced-capabilities/form/storage.d.ts.map +1 -0
  1925. package/packages/typescript/src/features/advanced-capabilities/form/storage.js +228 -0
  1926. package/packages/typescript/src/features/advanced-capabilities/form/template.d.ts +10 -0
  1927. package/packages/typescript/src/features/advanced-capabilities/form/template.d.ts.map +1 -0
  1928. package/packages/typescript/src/features/advanced-capabilities/form/template.js +56 -0
  1929. package/packages/typescript/src/features/advanced-capabilities/form/ttl.d.ts +40 -0
  1930. package/packages/typescript/src/features/advanced-capabilities/form/ttl.d.ts.map +1 -0
  1931. package/packages/typescript/src/features/advanced-capabilities/form/ttl.js +107 -0
  1932. package/packages/typescript/src/features/advanced-capabilities/form/types.d.ts +588 -0
  1933. package/packages/typescript/src/features/advanced-capabilities/form/types.d.ts.map +1 -0
  1934. package/packages/typescript/src/features/advanced-capabilities/form/types.js +71 -0
  1935. package/packages/typescript/src/features/advanced-capabilities/form/validation.d.ts +24 -0
  1936. package/packages/typescript/src/features/advanced-capabilities/form/validation.d.ts.map +1 -0
  1937. package/packages/typescript/src/features/advanced-capabilities/form/validation.js +311 -0
  1938. package/packages/typescript/src/features/advanced-capabilities/index.d.ts +47 -0
  1939. package/packages/typescript/src/features/advanced-capabilities/index.d.ts.map +1 -0
  1940. package/packages/typescript/src/features/advanced-capabilities/index.js +114 -0
  1941. package/packages/typescript/src/features/advanced-capabilities/personality/actions/modify-character.d.ts +7 -0
  1942. package/packages/typescript/src/features/advanced-capabilities/personality/actions/modify-character.d.ts.map +1 -0
  1943. package/packages/typescript/src/features/advanced-capabilities/personality/actions/modify-character.js +1299 -0
  1944. package/packages/typescript/src/features/advanced-capabilities/personality/evaluators/character-evolution.d.ts +53 -0
  1945. package/packages/typescript/src/features/advanced-capabilities/personality/evaluators/character-evolution.d.ts.map +1 -0
  1946. package/packages/typescript/src/features/advanced-capabilities/personality/evaluators/character-evolution.js +429 -0
  1947. package/packages/typescript/src/features/advanced-capabilities/personality/index.d.ts +10 -0
  1948. package/packages/typescript/src/features/advanced-capabilities/personality/index.d.ts.map +1 -0
  1949. package/packages/typescript/src/features/advanced-capabilities/personality/index.js +8 -0
  1950. package/packages/typescript/src/features/advanced-capabilities/personality/providers/user-personality.d.ts +8 -0
  1951. package/packages/typescript/src/features/advanced-capabilities/personality/providers/user-personality.d.ts.map +1 -0
  1952. package/packages/typescript/src/features/advanced-capabilities/personality/providers/user-personality.js +57 -0
  1953. package/packages/typescript/src/features/advanced-capabilities/personality/services/character-file-manager.d.ts +71 -0
  1954. package/packages/typescript/src/features/advanced-capabilities/personality/services/character-file-manager.d.ts.map +1 -0
  1955. package/packages/typescript/src/features/advanced-capabilities/personality/services/character-file-manager.js +498 -0
  1956. package/packages/typescript/src/features/advanced-capabilities/personality/types.d.ts +18 -0
  1957. package/packages/typescript/src/features/advanced-capabilities/personality/types.d.ts.map +1 -0
  1958. package/packages/typescript/src/features/advanced-capabilities/personality/types.js +8 -0
  1959. package/packages/typescript/src/features/advanced-capabilities/providers/contacts.d.ts +3 -0
  1960. package/packages/typescript/src/features/advanced-capabilities/providers/contacts.d.ts.map +1 -0
  1961. package/packages/typescript/src/features/advanced-capabilities/providers/contacts.js +77 -0
  1962. package/packages/typescript/src/features/advanced-capabilities/providers/facts.d.ts +11 -0
  1963. package/packages/typescript/src/features/advanced-capabilities/providers/facts.d.ts.map +1 -0
  1964. package/packages/typescript/src/features/advanced-capabilities/providers/facts.js +108 -0
  1965. package/packages/typescript/src/features/advanced-capabilities/providers/followUps.d.ts +3 -0
  1966. package/packages/typescript/src/features/advanced-capabilities/providers/followUps.d.ts.map +1 -0
  1967. package/packages/typescript/src/features/advanced-capabilities/providers/followUps.js +112 -0
  1968. package/packages/typescript/src/features/advanced-capabilities/providers/index.d.ts +13 -0
  1969. package/packages/typescript/src/features/advanced-capabilities/providers/index.d.ts.map +1 -0
  1970. package/packages/typescript/src/features/advanced-capabilities/providers/index.js +12 -0
  1971. package/packages/typescript/src/features/advanced-capabilities/providers/knowledge.d.ts +9 -0
  1972. package/packages/typescript/src/features/advanced-capabilities/providers/knowledge.d.ts.map +1 -0
  1973. package/packages/typescript/src/features/advanced-capabilities/providers/knowledge.js +83 -0
  1974. package/packages/typescript/src/features/advanced-capabilities/providers/relationships.d.ts +15 -0
  1975. package/packages/typescript/src/features/advanced-capabilities/providers/relationships.d.ts.map +1 -0
  1976. package/packages/typescript/src/features/advanced-capabilities/providers/relationships.js +125 -0
  1977. package/packages/typescript/src/features/advanced-capabilities/providers/roles.d.ts +19 -0
  1978. package/packages/typescript/src/features/advanced-capabilities/providers/roles.d.ts.map +1 -0
  1979. package/packages/typescript/src/features/advanced-capabilities/providers/roles.js +180 -0
  1980. package/packages/typescript/src/features/advanced-capabilities/providers/settings.d.ts +7 -0
  1981. package/packages/typescript/src/features/advanced-capabilities/providers/settings.d.ts.map +1 -0
  1982. package/packages/typescript/src/features/advanced-capabilities/providers/settings.js +286 -0
  1983. package/packages/typescript/src/features/advanced-memory/evaluators/index.d.ts +3 -0
  1984. package/packages/typescript/src/features/advanced-memory/evaluators/index.d.ts.map +1 -0
  1985. package/packages/typescript/src/features/advanced-memory/evaluators/index.js +2 -0
  1986. package/packages/typescript/src/features/advanced-memory/evaluators/long-term-extraction.d.ts +3 -0
  1987. package/packages/typescript/src/features/advanced-memory/evaluators/long-term-extraction.d.ts.map +1 -0
  1988. package/packages/typescript/src/features/advanced-memory/evaluators/long-term-extraction.js +198 -0
  1989. package/packages/typescript/src/features/advanced-memory/evaluators/summarization.d.ts +3 -0
  1990. package/packages/typescript/src/features/advanced-memory/evaluators/summarization.d.ts.map +1 -0
  1991. package/packages/typescript/src/features/advanced-memory/evaluators/summarization.js +240 -0
  1992. package/packages/typescript/src/features/advanced-memory/index.d.ts +16 -0
  1993. package/packages/typescript/src/features/advanced-memory/index.d.ts.map +1 -0
  1994. package/packages/typescript/src/features/advanced-memory/index.js +26 -0
  1995. package/packages/typescript/src/features/advanced-memory/prompts.d.ts +2 -0
  1996. package/packages/typescript/src/features/advanced-memory/prompts.d.ts.map +1 -0
  1997. package/packages/typescript/src/features/advanced-memory/prompts.js +1 -0
  1998. package/packages/typescript/src/features/advanced-memory/providers/context-summary.d.ts +3 -0
  1999. package/packages/typescript/src/features/advanced-memory/providers/context-summary.d.ts.map +1 -0
  2000. package/packages/typescript/src/features/advanced-memory/providers/context-summary.js +85 -0
  2001. package/packages/typescript/src/features/advanced-memory/providers/index.d.ts +3 -0
  2002. package/packages/typescript/src/features/advanced-memory/providers/index.d.ts.map +1 -0
  2003. package/packages/typescript/src/features/advanced-memory/providers/index.js +2 -0
  2004. package/packages/typescript/src/features/advanced-memory/providers/long-term-memory.d.ts +3 -0
  2005. package/packages/typescript/src/features/advanced-memory/providers/long-term-memory.d.ts.map +1 -0
  2006. package/packages/typescript/src/features/advanced-memory/providers/long-term-memory.js +92 -0
  2007. package/packages/typescript/src/features/advanced-memory/schemas/index.d.ts +5 -0
  2008. package/packages/typescript/src/features/advanced-memory/schemas/index.d.ts.map +1 -0
  2009. package/packages/typescript/src/features/advanced-memory/schemas/index.js +3 -0
  2010. package/packages/typescript/src/features/advanced-memory/schemas/long-term-memories.d.ts +10 -0
  2011. package/packages/typescript/src/features/advanced-memory/schemas/long-term-memories.d.ts.map +1 -0
  2012. package/packages/typescript/src/features/advanced-memory/schemas/long-term-memories.js +65 -0
  2013. package/packages/typescript/src/features/advanced-memory/schemas/memory-access-logs.d.ts +10 -0
  2014. package/packages/typescript/src/features/advanced-memory/schemas/memory-access-logs.d.ts.map +1 -0
  2015. package/packages/typescript/src/features/advanced-memory/schemas/memory-access-logs.js +45 -0
  2016. package/packages/typescript/src/features/advanced-memory/schemas/session-summaries.d.ts +10 -0
  2017. package/packages/typescript/src/features/advanced-memory/schemas/session-summaries.d.ts.map +1 -0
  2018. package/packages/typescript/src/features/advanced-memory/schemas/session-summaries.js +66 -0
  2019. package/packages/typescript/src/features/advanced-memory/services/memory-service.d.ts +37 -0
  2020. package/packages/typescript/src/features/advanced-memory/services/memory-service.d.ts.map +1 -0
  2021. package/packages/typescript/src/features/advanced-memory/services/memory-service.js +347 -0
  2022. package/packages/typescript/src/features/advanced-memory/trajectory.d.ts +10 -0
  2023. package/packages/typescript/src/features/advanced-memory/trajectory.d.ts.map +1 -0
  2024. package/packages/typescript/src/features/advanced-memory/trajectory.js +33 -0
  2025. package/packages/typescript/src/features/advanced-memory/types.d.ts +68 -0
  2026. package/packages/typescript/src/features/advanced-memory/types.d.ts.map +1 -0
  2027. package/packages/typescript/src/features/advanced-memory/types.js +6 -0
  2028. package/packages/typescript/src/features/advanced-planning/actions/chain-example.d.ts +6 -0
  2029. package/packages/typescript/src/features/advanced-planning/actions/chain-example.d.ts.map +1 -0
  2030. package/packages/typescript/src/features/advanced-planning/actions/chain-example.js +181 -0
  2031. package/packages/typescript/src/features/advanced-planning/index.d.ts +5 -0
  2032. package/packages/typescript/src/features/advanced-planning/index.d.ts.map +1 -0
  2033. package/packages/typescript/src/features/advanced-planning/index.js +20 -0
  2034. package/packages/typescript/src/features/advanced-planning/providers/message-classifier.d.ts +3 -0
  2035. package/packages/typescript/src/features/advanced-planning/providers/message-classifier.d.ts.map +1 -0
  2036. package/packages/typescript/src/features/advanced-planning/providers/message-classifier.js +105 -0
  2037. package/packages/typescript/src/features/advanced-planning/services/planning-service.d.ts +77 -0
  2038. package/packages/typescript/src/features/advanced-planning/services/planning-service.d.ts.map +1 -0
  2039. package/packages/typescript/src/features/advanced-planning/services/planning-service.js +875 -0
  2040. package/packages/typescript/src/features/advanced-planning/types.d.ts +78 -0
  2041. package/packages/typescript/src/features/advanced-planning/types.d.ts.map +1 -0
  2042. package/packages/typescript/src/features/advanced-planning/types.js +1 -0
  2043. package/packages/typescript/src/features/autonomy/action.d.ts +14 -0
  2044. package/packages/typescript/src/features/autonomy/action.d.ts.map +1 -0
  2045. package/packages/typescript/src/features/autonomy/action.js +177 -0
  2046. package/packages/typescript/src/features/autonomy/execution-facade.d.ts +22 -0
  2047. package/packages/typescript/src/features/autonomy/execution-facade.d.ts.map +1 -0
  2048. package/packages/typescript/src/features/autonomy/execution-facade.js +132 -0
  2049. package/packages/typescript/src/features/autonomy/index.d.ts +11 -0
  2050. package/packages/typescript/src/features/autonomy/index.d.ts.map +1 -0
  2051. package/packages/typescript/src/features/autonomy/index.js +13 -0
  2052. package/packages/typescript/src/features/autonomy/providers.d.ts +21 -0
  2053. package/packages/typescript/src/features/autonomy/providers.d.ts.map +1 -0
  2054. package/packages/typescript/src/features/autonomy/providers.js +154 -0
  2055. package/packages/typescript/src/features/autonomy/routes.d.ts +11 -0
  2056. package/packages/typescript/src/features/autonomy/routes.d.ts.map +1 -0
  2057. package/packages/typescript/src/features/autonomy/routes.js +158 -0
  2058. package/packages/typescript/src/features/autonomy/service.d.ts +138 -0
  2059. package/packages/typescript/src/features/autonomy/service.d.ts.map +1 -0
  2060. package/packages/typescript/src/features/autonomy/service.js +813 -0
  2061. package/packages/typescript/src/features/autonomy/types.d.ts +31 -0
  2062. package/packages/typescript/src/features/autonomy/types.d.ts.map +1 -0
  2063. package/packages/typescript/src/features/autonomy/types.js +6 -0
  2064. package/packages/typescript/src/features/basic-capabilities/actions/choice.d.ts +4 -0
  2065. package/packages/typescript/src/features/basic-capabilities/actions/choice.d.ts.map +1 -0
  2066. package/packages/typescript/src/features/basic-capabilities/actions/choice.js +278 -0
  2067. package/packages/typescript/src/features/basic-capabilities/actions/ignore.d.ts +3 -0
  2068. package/packages/typescript/src/features/basic-capabilities/actions/ignore.d.ts.map +1 -0
  2069. package/packages/typescript/src/features/basic-capabilities/actions/ignore.js +23 -0
  2070. package/packages/typescript/src/features/basic-capabilities/actions/index.d.ts +10 -0
  2071. package/packages/typescript/src/features/basic-capabilities/actions/index.d.ts.map +1 -0
  2072. package/packages/typescript/src/features/basic-capabilities/actions/index.js +9 -0
  2073. package/packages/typescript/src/features/basic-capabilities/actions/none.d.ts +3 -0
  2074. package/packages/typescript/src/features/basic-capabilities/actions/none.d.ts.map +1 -0
  2075. package/packages/typescript/src/features/basic-capabilities/actions/none.js +26 -0
  2076. package/packages/typescript/src/features/basic-capabilities/actions/reply.d.ts +3 -0
  2077. package/packages/typescript/src/features/basic-capabilities/actions/reply.d.ts.map +1 -0
  2078. package/packages/typescript/src/features/basic-capabilities/actions/reply.js +80 -0
  2079. package/packages/typescript/src/features/basic-capabilities/index.d.ts +108 -0
  2080. package/packages/typescript/src/features/basic-capabilities/index.d.ts.map +1 -0
  2081. package/packages/typescript/src/features/basic-capabilities/index.js +1020 -0
  2082. package/packages/typescript/src/features/basic-capabilities/providers/actionState.d.ts +7 -0
  2083. package/packages/typescript/src/features/basic-capabilities/providers/actionState.d.ts.map +1 -0
  2084. package/packages/typescript/src/features/basic-capabilities/providers/actionState.js +232 -0
  2085. package/packages/typescript/src/features/basic-capabilities/providers/actions.d.ts +35 -0
  2086. package/packages/typescript/src/features/basic-capabilities/providers/actions.d.ts.map +1 -0
  2087. package/packages/typescript/src/features/basic-capabilities/providers/actions.js +82 -0
  2088. package/packages/typescript/src/features/basic-capabilities/providers/attachments.d.ts +20 -0
  2089. package/packages/typescript/src/features/basic-capabilities/providers/attachments.d.ts.map +1 -0
  2090. package/packages/typescript/src/features/basic-capabilities/providers/attachments.js +94 -0
  2091. package/packages/typescript/src/features/basic-capabilities/providers/character.d.ts +17 -0
  2092. package/packages/typescript/src/features/basic-capabilities/providers/character.d.ts.map +1 -0
  2093. package/packages/typescript/src/features/basic-capabilities/providers/character.js +190 -0
  2094. package/packages/typescript/src/features/basic-capabilities/providers/choice.d.ts +11 -0
  2095. package/packages/typescript/src/features/basic-capabilities/providers/choice.d.ts.map +1 -0
  2096. package/packages/typescript/src/features/basic-capabilities/providers/choice.js +86 -0
  2097. package/packages/typescript/src/features/basic-capabilities/providers/contextBench.d.ts +12 -0
  2098. package/packages/typescript/src/features/basic-capabilities/providers/contextBench.d.ts.map +1 -0
  2099. package/packages/typescript/src/features/basic-capabilities/providers/contextBench.js +50 -0
  2100. package/packages/typescript/src/features/basic-capabilities/providers/currentTime.d.ts +11 -0
  2101. package/packages/typescript/src/features/basic-capabilities/providers/currentTime.d.ts.map +1 -0
  2102. package/packages/typescript/src/features/basic-capabilities/providers/currentTime.js +56 -0
  2103. package/packages/typescript/src/features/basic-capabilities/providers/entities.d.ts +7 -0
  2104. package/packages/typescript/src/features/basic-capabilities/providers/entities.d.ts.map +1 -0
  2105. package/packages/typescript/src/features/basic-capabilities/providers/entities.js +39 -0
  2106. package/packages/typescript/src/features/basic-capabilities/providers/evaluators.d.ts +27 -0
  2107. package/packages/typescript/src/features/basic-capabilities/providers/evaluators.d.ts.map +1 -0
  2108. package/packages/typescript/src/features/basic-capabilities/providers/evaluators.js +107 -0
  2109. package/packages/typescript/src/features/basic-capabilities/providers/index.d.ts +19 -0
  2110. package/packages/typescript/src/features/basic-capabilities/providers/index.d.ts.map +1 -0
  2111. package/packages/typescript/src/features/basic-capabilities/providers/index.js +18 -0
  2112. package/packages/typescript/src/features/basic-capabilities/providers/providers.d.ts +18 -0
  2113. package/packages/typescript/src/features/basic-capabilities/providers/providers.d.ts.map +1 -0
  2114. package/packages/typescript/src/features/basic-capabilities/providers/providers.js +70 -0
  2115. package/packages/typescript/src/features/basic-capabilities/providers/recentMessages.d.ts +14 -0
  2116. package/packages/typescript/src/features/basic-capabilities/providers/recentMessages.d.ts.map +1 -0
  2117. package/packages/typescript/src/features/basic-capabilities/providers/recentMessages.js +323 -0
  2118. package/packages/typescript/src/features/basic-capabilities/providers/time.d.ts +12 -0
  2119. package/packages/typescript/src/features/basic-capabilities/providers/time.d.ts.map +1 -0
  2120. package/packages/typescript/src/features/basic-capabilities/providers/time.js +36 -0
  2121. package/packages/typescript/src/features/basic-capabilities/providers/world.d.ts +8 -0
  2122. package/packages/typescript/src/features/basic-capabilities/providers/world.d.ts.map +1 -0
  2123. package/packages/typescript/src/features/basic-capabilities/providers/world.js +212 -0
  2124. package/packages/typescript/src/features/index.d.ts +58 -0
  2125. package/packages/typescript/src/features/index.d.ts.map +1 -0
  2126. package/packages/typescript/src/features/index.js +155 -0
  2127. package/packages/typescript/src/features/knowledge/actions.d.ts +5 -0
  2128. package/packages/typescript/src/features/knowledge/actions.d.ts.map +1 -0
  2129. package/packages/typescript/src/features/knowledge/actions.js +269 -0
  2130. package/packages/typescript/src/features/knowledge/config.d.ts +5 -0
  2131. package/packages/typescript/src/features/knowledge/config.d.ts.map +1 -0
  2132. package/packages/typescript/src/features/knowledge/config.js +147 -0
  2133. package/packages/typescript/src/features/knowledge/ctx-embeddings.d.ts +53 -0
  2134. package/packages/typescript/src/features/knowledge/ctx-embeddings.d.ts.map +1 -0
  2135. package/packages/typescript/src/features/knowledge/ctx-embeddings.js +412 -0
  2136. package/packages/typescript/src/features/knowledge/docs-loader.d.ts +9 -0
  2137. package/packages/typescript/src/features/knowledge/docs-loader.d.ts.map +1 -0
  2138. package/packages/typescript/src/features/knowledge/docs-loader.js +202 -0
  2139. package/packages/typescript/src/features/knowledge/document-processor.d.ts +26 -0
  2140. package/packages/typescript/src/features/knowledge/document-processor.d.ts.map +1 -0
  2141. package/packages/typescript/src/features/knowledge/document-processor.js +618 -0
  2142. package/packages/typescript/src/features/knowledge/documents-provider.d.ts +3 -0
  2143. package/packages/typescript/src/features/knowledge/documents-provider.d.ts.map +1 -0
  2144. package/packages/typescript/src/features/knowledge/documents-provider.js +106 -0
  2145. package/packages/typescript/src/features/knowledge/index.d.ts +16 -0
  2146. package/packages/typescript/src/features/knowledge/index.d.ts.map +1 -0
  2147. package/packages/typescript/src/features/knowledge/index.js +29 -0
  2148. package/packages/typescript/src/features/knowledge/llm.d.ts +27 -0
  2149. package/packages/typescript/src/features/knowledge/llm.d.ts.map +1 -0
  2150. package/packages/typescript/src/features/knowledge/llm.js +444 -0
  2151. package/packages/typescript/src/features/knowledge/provider.d.ts +3 -0
  2152. package/packages/typescript/src/features/knowledge/provider.d.ts.map +1 -0
  2153. package/packages/typescript/src/features/knowledge/provider.js +62 -0
  2154. package/packages/typescript/src/features/knowledge/service.d.ts +76 -0
  2155. package/packages/typescript/src/features/knowledge/service.d.ts.map +1 -0
  2156. package/packages/typescript/src/features/knowledge/service.js +511 -0
  2157. package/packages/typescript/src/features/knowledge/types.d.ts +144 -0
  2158. package/packages/typescript/src/features/knowledge/types.d.ts.map +1 -0
  2159. package/packages/typescript/src/features/knowledge/types.js +57 -0
  2160. package/packages/typescript/src/features/knowledge/utils.d.ts +17 -0
  2161. package/packages/typescript/src/features/knowledge/utils.d.ts.map +1 -0
  2162. package/packages/typescript/src/features/knowledge/utils.js +313 -0
  2163. package/packages/typescript/src/features/plugin-manager/actions/coreStatusAction.d.ts +3 -0
  2164. package/packages/typescript/src/features/plugin-manager/actions/coreStatusAction.d.ts.map +1 -0
  2165. package/packages/typescript/src/features/plugin-manager/actions/coreStatusAction.js +65 -0
  2166. package/packages/typescript/src/features/plugin-manager/actions/listEjectedPluginsAction.d.ts +3 -0
  2167. package/packages/typescript/src/features/plugin-manager/actions/listEjectedPluginsAction.d.ts.map +1 -0
  2168. package/packages/typescript/src/features/plugin-manager/actions/listEjectedPluginsAction.js +63 -0
  2169. package/packages/typescript/src/features/plugin-manager/actions/searchPluginAction.d.ts +4 -0
  2170. package/packages/typescript/src/features/plugin-manager/actions/searchPluginAction.d.ts.map +1 -0
  2171. package/packages/typescript/src/features/plugin-manager/actions/searchPluginAction.js +232 -0
  2172. package/packages/typescript/src/features/plugin-manager/coreExtensions.d.ts +35 -0
  2173. package/packages/typescript/src/features/plugin-manager/coreExtensions.d.ts.map +1 -0
  2174. package/packages/typescript/src/features/plugin-manager/coreExtensions.js +77 -0
  2175. package/packages/typescript/src/features/plugin-manager/index.d.ts +25 -0
  2176. package/packages/typescript/src/features/plugin-manager/index.d.ts.map +1 -0
  2177. package/packages/typescript/src/features/plugin-manager/index.js +53 -0
  2178. package/packages/typescript/src/features/plugin-manager/providers/pluginConfigurationStatus.d.ts +5 -0
  2179. package/packages/typescript/src/features/plugin-manager/providers/pluginConfigurationStatus.d.ts.map +1 -0
  2180. package/packages/typescript/src/features/plugin-manager/providers/pluginConfigurationStatus.js +104 -0
  2181. package/packages/typescript/src/features/plugin-manager/providers/pluginStateProvider.d.ts +5 -0
  2182. package/packages/typescript/src/features/plugin-manager/providers/pluginStateProvider.d.ts.map +1 -0
  2183. package/packages/typescript/src/features/plugin-manager/providers/pluginStateProvider.js +105 -0
  2184. package/packages/typescript/src/features/plugin-manager/providers/registryPluginsProvider.d.ts +5 -0
  2185. package/packages/typescript/src/features/plugin-manager/providers/registryPluginsProvider.d.ts.map +1 -0
  2186. package/packages/typescript/src/features/plugin-manager/providers/registryPluginsProvider.js +93 -0
  2187. package/packages/typescript/src/features/plugin-manager/providers/relevance.d.ts +9 -0
  2188. package/packages/typescript/src/features/plugin-manager/providers/relevance.d.ts.map +1 -0
  2189. package/packages/typescript/src/features/plugin-manager/providers/relevance.js +226 -0
  2190. package/packages/typescript/src/features/plugin-manager/services/coreManagerService.d.ts +76 -0
  2191. package/packages/typescript/src/features/plugin-manager/services/coreManagerService.d.ts.map +1 -0
  2192. package/packages/typescript/src/features/plugin-manager/services/coreManagerService.js +479 -0
  2193. package/packages/typescript/src/features/plugin-manager/services/pluginConfigurationService.d.ts +31 -0
  2194. package/packages/typescript/src/features/plugin-manager/services/pluginConfigurationService.d.ts.map +1 -0
  2195. package/packages/typescript/src/features/plugin-manager/services/pluginConfigurationService.js +57 -0
  2196. package/packages/typescript/src/features/plugin-manager/services/pluginManagerService.d.ts +68 -0
  2197. package/packages/typescript/src/features/plugin-manager/services/pluginManagerService.d.ts.map +1 -0
  2198. package/packages/typescript/src/features/plugin-manager/services/pluginManagerService.js +1007 -0
  2199. package/packages/typescript/src/features/plugin-manager/services/pluginRegistryService.d.ts +84 -0
  2200. package/packages/typescript/src/features/plugin-manager/services/pluginRegistryService.d.ts.map +1 -0
  2201. package/packages/typescript/src/features/plugin-manager/services/pluginRegistryService.js +402 -0
  2202. package/packages/typescript/src/features/plugin-manager/types.d.ts +142 -0
  2203. package/packages/typescript/src/features/plugin-manager/types.d.ts.map +1 -0
  2204. package/packages/typescript/src/features/plugin-manager/types.js +13 -0
  2205. package/packages/typescript/src/features/plugin-manager/utils/paths.d.ts +4 -0
  2206. package/packages/typescript/src/features/plugin-manager/utils/paths.d.ts.map +1 -0
  2207. package/packages/typescript/src/features/plugin-manager/utils/paths.js +32 -0
  2208. package/packages/typescript/src/features/secrets/actions/index.d.ts +7 -0
  2209. package/packages/typescript/src/features/secrets/actions/index.d.ts.map +1 -0
  2210. package/packages/typescript/src/features/secrets/actions/index.js +6 -0
  2211. package/packages/typescript/src/features/secrets/actions/manage-secret.d.ts +12 -0
  2212. package/packages/typescript/src/features/secrets/actions/manage-secret.d.ts.map +1 -0
  2213. package/packages/typescript/src/features/secrets/actions/manage-secret.js +278 -0
  2214. package/packages/typescript/src/features/secrets/actions/request-secret.d.ts +3 -0
  2215. package/packages/typescript/src/features/secrets/actions/request-secret.d.ts.map +1 -0
  2216. package/packages/typescript/src/features/secrets/actions/request-secret.js +105 -0
  2217. package/packages/typescript/src/features/secrets/actions/set-secret.d.ts +12 -0
  2218. package/packages/typescript/src/features/secrets/actions/set-secret.d.ts.map +1 -0
  2219. package/packages/typescript/src/features/secrets/actions/set-secret.js +223 -0
  2220. package/packages/typescript/src/features/secrets/crypto/encryption.d.ts +184 -0
  2221. package/packages/typescript/src/features/secrets/crypto/encryption.d.ts.map +1 -0
  2222. package/packages/typescript/src/features/secrets/crypto/encryption.js +373 -0
  2223. package/packages/typescript/src/features/secrets/crypto/index.d.ts +5 -0
  2224. package/packages/typescript/src/features/secrets/crypto/index.d.ts.map +1 -0
  2225. package/packages/typescript/src/features/secrets/crypto/index.js +16 -0
  2226. package/packages/typescript/src/features/secrets/onboarding/action.d.ts +12 -0
  2227. package/packages/typescript/src/features/secrets/onboarding/action.d.ts.map +1 -0
  2228. package/packages/typescript/src/features/secrets/onboarding/action.js +337 -0
  2229. package/packages/typescript/src/features/secrets/onboarding/config.d.ts +99 -0
  2230. package/packages/typescript/src/features/secrets/onboarding/config.d.ts.map +1 -0
  2231. package/packages/typescript/src/features/secrets/onboarding/config.js +240 -0
  2232. package/packages/typescript/src/features/secrets/onboarding/index.d.ts +13 -0
  2233. package/packages/typescript/src/features/secrets/onboarding/index.d.ts.map +1 -0
  2234. package/packages/typescript/src/features/secrets/onboarding/index.js +12 -0
  2235. package/packages/typescript/src/features/secrets/onboarding/provider.d.ts +16 -0
  2236. package/packages/typescript/src/features/secrets/onboarding/provider.d.ts.map +1 -0
  2237. package/packages/typescript/src/features/secrets/onboarding/provider.js +231 -0
  2238. package/packages/typescript/src/features/secrets/onboarding/service.d.ts +134 -0
  2239. package/packages/typescript/src/features/secrets/onboarding/service.d.ts.map +1 -0
  2240. package/packages/typescript/src/features/secrets/onboarding/service.js +436 -0
  2241. package/packages/typescript/src/features/secrets/providers/index.d.ts +5 -0
  2242. package/packages/typescript/src/features/secrets/providers/index.d.ts.map +1 -0
  2243. package/packages/typescript/src/features/secrets/providers/index.js +4 -0
  2244. package/packages/typescript/src/features/secrets/providers/secrets-status.d.ts +22 -0
  2245. package/packages/typescript/src/features/secrets/providers/secrets-status.d.ts.map +1 -0
  2246. package/packages/typescript/src/features/secrets/providers/secrets-status.js +160 -0
  2247. package/packages/typescript/src/features/secrets/services/plugin-activator.d.ts +182 -0
  2248. package/packages/typescript/src/features/secrets/services/plugin-activator.d.ts.map +1 -0
  2249. package/packages/typescript/src/features/secrets/services/plugin-activator.js +617 -0
  2250. package/packages/typescript/src/features/secrets/services/secrets.d.ts +183 -0
  2251. package/packages/typescript/src/features/secrets/services/secrets.d.ts.map +1 -0
  2252. package/packages/typescript/src/features/secrets/services/secrets.js +566 -0
  2253. package/packages/typescript/src/features/secrets/storage/character-store.d.ts +63 -0
  2254. package/packages/typescript/src/features/secrets/storage/character-store.d.ts.map +1 -0
  2255. package/packages/typescript/src/features/secrets/storage/character-store.js +265 -0
  2256. package/packages/typescript/src/features/secrets/storage/component-store.d.ts +47 -0
  2257. package/packages/typescript/src/features/secrets/storage/component-store.d.ts.map +1 -0
  2258. package/packages/typescript/src/features/secrets/storage/component-store.js +264 -0
  2259. package/packages/typescript/src/features/secrets/storage/index.d.ts +10 -0
  2260. package/packages/typescript/src/features/secrets/storage/index.d.ts.map +1 -0
  2261. package/packages/typescript/src/features/secrets/storage/index.js +8 -0
  2262. package/packages/typescript/src/features/secrets/storage/interface.d.ts +52 -0
  2263. package/packages/typescript/src/features/secrets/storage/interface.d.ts.map +1 -0
  2264. package/packages/typescript/src/features/secrets/storage/interface.js +92 -0
  2265. package/packages/typescript/src/features/secrets/storage/memory-store.d.ts +44 -0
  2266. package/packages/typescript/src/features/secrets/storage/memory-store.d.ts.map +1 -0
  2267. package/packages/typescript/src/features/secrets/storage/memory-store.js +142 -0
  2268. package/packages/typescript/src/features/secrets/storage/world-store.d.ts +52 -0
  2269. package/packages/typescript/src/features/secrets/storage/world-store.d.ts.map +1 -0
  2270. package/packages/typescript/src/features/secrets/storage/world-store.js +292 -0
  2271. package/packages/typescript/src/features/secrets/types.d.ts +438 -0
  2272. package/packages/typescript/src/features/secrets/types.d.ts.map +1 -0
  2273. package/packages/typescript/src/features/secrets/types.js +57 -0
  2274. package/packages/typescript/src/features/secrets/validation.d.ts +33 -0
  2275. package/packages/typescript/src/features/secrets/validation.d.ts.map +1 -0
  2276. package/packages/typescript/src/features/secrets/validation.js +389 -0
  2277. package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts +275 -0
  2278. package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts.map +1 -0
  2279. package/packages/typescript/src/features/trajectories/TrajectoriesService.js +1401 -0
  2280. package/packages/typescript/src/features/trajectories/action-interceptor.d.ts +23 -0
  2281. package/packages/typescript/src/features/trajectories/action-interceptor.d.ts.map +1 -0
  2282. package/packages/typescript/src/features/trajectories/action-interceptor.js +178 -0
  2283. package/packages/typescript/src/features/trajectories/art-format.d.ts +32 -0
  2284. package/packages/typescript/src/features/trajectories/art-format.d.ts.map +1 -0
  2285. package/packages/typescript/src/features/trajectories/art-format.js +221 -0
  2286. package/packages/typescript/src/features/trajectories/export.d.ts +40 -0
  2287. package/packages/typescript/src/features/trajectories/export.d.ts.map +1 -0
  2288. package/packages/typescript/src/features/trajectories/export.js +99 -0
  2289. package/packages/typescript/src/features/trajectories/game-rewards.d.ts +14 -0
  2290. package/packages/typescript/src/features/trajectories/game-rewards.d.ts.map +1 -0
  2291. package/packages/typescript/src/features/trajectories/game-rewards.js +20 -0
  2292. package/packages/typescript/src/features/trajectories/index.d.ts +24 -0
  2293. package/packages/typescript/src/features/trajectories/index.d.ts.map +1 -0
  2294. package/packages/typescript/src/features/trajectories/index.js +253 -0
  2295. package/packages/typescript/src/features/trajectories/integration.d.ts +59 -0
  2296. package/packages/typescript/src/features/trajectories/integration.d.ts.map +1 -0
  2297. package/packages/typescript/src/features/trajectories/integration.js +83 -0
  2298. package/packages/typescript/src/features/trajectories/reward-service.d.ts +24 -0
  2299. package/packages/typescript/src/features/trajectories/reward-service.d.ts.map +1 -0
  2300. package/packages/typescript/src/features/trajectories/reward-service.js +89 -0
  2301. package/packages/typescript/src/features/trajectories/types.d.ts +243 -0
  2302. package/packages/typescript/src/features/trajectories/types.d.ts.map +1 -0
  2303. package/packages/typescript/src/features/trajectories/types.js +1 -0
  2304. package/packages/typescript/src/features/trust/actions/evaluateTrust.d.ts +3 -0
  2305. package/packages/typescript/src/features/trust/actions/evaluateTrust.d.ts.map +1 -0
  2306. package/packages/typescript/src/features/trust/actions/evaluateTrust.js +225 -0
  2307. package/packages/typescript/src/features/trust/actions/hasTrustEngine.d.ts +3 -0
  2308. package/packages/typescript/src/features/trust/actions/hasTrustEngine.d.ts.map +1 -0
  2309. package/packages/typescript/src/features/trust/actions/hasTrustEngine.js +3 -0
  2310. package/packages/typescript/src/features/trust/actions/index.d.ts +6 -0
  2311. package/packages/typescript/src/features/trust/actions/index.d.ts.map +1 -0
  2312. package/packages/typescript/src/features/trust/actions/index.js +5 -0
  2313. package/packages/typescript/src/features/trust/actions/recordTrustInteraction.d.ts +3 -0
  2314. package/packages/typescript/src/features/trust/actions/recordTrustInteraction.d.ts.map +1 -0
  2315. package/packages/typescript/src/features/trust/actions/recordTrustInteraction.js +189 -0
  2316. package/packages/typescript/src/features/trust/actions/requestElevation.d.ts +3 -0
  2317. package/packages/typescript/src/features/trust/actions/requestElevation.d.ts.map +1 -0
  2318. package/packages/typescript/src/features/trust/actions/requestElevation.js +165 -0
  2319. package/packages/typescript/src/features/trust/actions/roles.d.ts +3 -0
  2320. package/packages/typescript/src/features/trust/actions/roles.d.ts.map +1 -0
  2321. package/packages/typescript/src/features/trust/actions/roles.js +295 -0
  2322. package/packages/typescript/src/features/trust/actions/settings.d.ts +5 -0
  2323. package/packages/typescript/src/features/trust/actions/settings.d.ts.map +1 -0
  2324. package/packages/typescript/src/features/trust/actions/settings.js +603 -0
  2325. package/packages/typescript/src/features/trust/evaluators/index.d.ts +4 -0
  2326. package/packages/typescript/src/features/trust/evaluators/index.d.ts.map +1 -0
  2327. package/packages/typescript/src/features/trust/evaluators/index.js +3 -0
  2328. package/packages/typescript/src/features/trust/evaluators/reflection.d.ts +3 -0
  2329. package/packages/typescript/src/features/trust/evaluators/reflection.d.ts.map +1 -0
  2330. package/packages/typescript/src/features/trust/evaluators/reflection.js +290 -0
  2331. package/packages/typescript/src/features/trust/evaluators/securityEvaluator.d.ts +3 -0
  2332. package/packages/typescript/src/features/trust/evaluators/securityEvaluator.d.ts.map +1 -0
  2333. package/packages/typescript/src/features/trust/evaluators/securityEvaluator.js +270 -0
  2334. package/packages/typescript/src/features/trust/evaluators/trustChangeEvaluator.d.ts +3 -0
  2335. package/packages/typescript/src/features/trust/evaluators/trustChangeEvaluator.d.ts.map +1 -0
  2336. package/packages/typescript/src/features/trust/evaluators/trustChangeEvaluator.js +201 -0
  2337. package/packages/typescript/src/features/trust/index.d.ts +72 -0
  2338. package/packages/typescript/src/features/trust/index.d.ts.map +1 -0
  2339. package/packages/typescript/src/features/trust/index.js +213 -0
  2340. package/packages/typescript/src/features/trust/providers/adminTrust.d.ts +3 -0
  2341. package/packages/typescript/src/features/trust/providers/adminTrust.d.ts.map +1 -0
  2342. package/packages/typescript/src/features/trust/providers/adminTrust.js +49 -0
  2343. package/packages/typescript/src/features/trust/providers/index.d.ts +6 -0
  2344. package/packages/typescript/src/features/trust/providers/index.d.ts.map +1 -0
  2345. package/packages/typescript/src/features/trust/providers/index.js +5 -0
  2346. package/packages/typescript/src/features/trust/providers/roles.d.ts +4 -0
  2347. package/packages/typescript/src/features/trust/providers/roles.d.ts.map +1 -0
  2348. package/packages/typescript/src/features/trust/providers/roles.js +142 -0
  2349. package/packages/typescript/src/features/trust/providers/securityStatus.d.ts +3 -0
  2350. package/packages/typescript/src/features/trust/providers/securityStatus.d.ts.map +1 -0
  2351. package/packages/typescript/src/features/trust/providers/securityStatus.js +110 -0
  2352. package/packages/typescript/src/features/trust/providers/settings.d.ts +3 -0
  2353. package/packages/typescript/src/features/trust/providers/settings.d.ts.map +1 -0
  2354. package/packages/typescript/src/features/trust/providers/settings.js +212 -0
  2355. package/packages/typescript/src/features/trust/providers/trustProfile.d.ts +3 -0
  2356. package/packages/typescript/src/features/trust/providers/trustProfile.d.ts.map +1 -0
  2357. package/packages/typescript/src/features/trust/providers/trustProfile.js +68 -0
  2358. package/packages/typescript/src/features/trust/schema.d.ts +1170 -0
  2359. package/packages/typescript/src/features/trust/schema.d.ts.map +1 -0
  2360. package/packages/typescript/src/features/trust/schema.js +108 -0
  2361. package/packages/typescript/src/features/trust/services/ContextualPermissionSystem.d.ts +40 -0
  2362. package/packages/typescript/src/features/trust/services/ContextualPermissionSystem.d.ts.map +1 -0
  2363. package/packages/typescript/src/features/trust/services/ContextualPermissionSystem.js +317 -0
  2364. package/packages/typescript/src/features/trust/services/CredentialProtector.d.ts +62 -0
  2365. package/packages/typescript/src/features/trust/services/CredentialProtector.d.ts.map +1 -0
  2366. package/packages/typescript/src/features/trust/services/CredentialProtector.js +417 -0
  2367. package/packages/typescript/src/features/trust/services/SecurityModule.d.ts +142 -0
  2368. package/packages/typescript/src/features/trust/services/SecurityModule.d.ts.map +1 -0
  2369. package/packages/typescript/src/features/trust/services/SecurityModule.js +1057 -0
  2370. package/packages/typescript/src/features/trust/services/SecurityStore.d.ts +53 -0
  2371. package/packages/typescript/src/features/trust/services/SecurityStore.d.ts.map +1 -0
  2372. package/packages/typescript/src/features/trust/services/SecurityStore.js +123 -0
  2373. package/packages/typescript/src/features/trust/services/TrustEngine.d.ts +81 -0
  2374. package/packages/typescript/src/features/trust/services/TrustEngine.d.ts.map +1 -0
  2375. package/packages/typescript/src/features/trust/services/TrustEngine.js +621 -0
  2376. package/packages/typescript/src/features/trust/services/adminContext.d.ts +3 -0
  2377. package/packages/typescript/src/features/trust/services/adminContext.d.ts.map +1 -0
  2378. package/packages/typescript/src/features/trust/services/adminContext.js +32 -0
  2379. package/packages/typescript/src/features/trust/services/db.d.ts +12 -0
  2380. package/packages/typescript/src/features/trust/services/db.d.ts.map +1 -0
  2381. package/packages/typescript/src/features/trust/services/db.js +10 -0
  2382. package/packages/typescript/src/features/trust/types/permissions.d.ts +185 -0
  2383. package/packages/typescript/src/features/trust/types/permissions.d.ts.map +1 -0
  2384. package/packages/typescript/src/features/trust/types/permissions.js +58 -0
  2385. package/packages/typescript/src/features/trust/types/security.d.ts +114 -0
  2386. package/packages/typescript/src/features/trust/types/security.d.ts.map +1 -0
  2387. package/packages/typescript/src/features/trust/types/security.js +15 -0
  2388. package/packages/typescript/src/features/trust/types/trust.d.ts +179 -0
  2389. package/packages/typescript/src/features/trust/types/trust.d.ts.map +1 -0
  2390. package/packages/typescript/src/features/trust/types/trust.js +25 -0
  2391. package/packages/typescript/src/generated/action-docs.d.ts +2605 -0
  2392. package/packages/typescript/src/generated/action-docs.d.ts.map +1 -0
  2393. package/packages/typescript/src/generated/action-docs.js +3786 -0
  2394. package/packages/typescript/src/generated/spec-helpers.d.ts +49 -0
  2395. package/packages/typescript/src/generated/spec-helpers.d.ts.map +1 -0
  2396. package/packages/typescript/src/generated/spec-helpers.js +78 -0
  2397. package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts +1056 -0
  2398. package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts.map +1 -0
  2399. package/packages/typescript/src/i18n/generated/validation-keyword-data.js +1056 -0
  2400. package/packages/typescript/src/i18n/validation-keywords.d.ts +25 -0
  2401. package/packages/typescript/src/i18n/validation-keywords.d.ts.map +1 -0
  2402. package/packages/typescript/src/i18n/validation-keywords.js +112 -0
  2403. package/packages/typescript/src/index.d.ts +12 -0
  2404. package/packages/typescript/src/index.d.ts.map +1 -0
  2405. package/packages/typescript/src/index.js +13 -0
  2406. package/packages/typescript/src/index.node.d.ts +78 -0
  2407. package/packages/typescript/src/index.node.d.ts.map +1 -0
  2408. package/packages/typescript/src/index.node.js +107 -0
  2409. package/packages/typescript/src/logger.d.ts +121 -0
  2410. package/packages/typescript/src/logger.d.ts.map +1 -0
  2411. package/packages/typescript/src/logger.js +1023 -0
  2412. package/packages/typescript/src/markdown/chunk.d.ts +50 -0
  2413. package/packages/typescript/src/markdown/chunk.d.ts.map +1 -0
  2414. package/packages/typescript/src/markdown/chunk.js +268 -0
  2415. package/packages/typescript/src/markdown/code-spans.d.ts +42 -0
  2416. package/packages/typescript/src/markdown/code-spans.d.ts.map +1 -0
  2417. package/packages/typescript/src/markdown/code-spans.js +89 -0
  2418. package/packages/typescript/src/markdown/fences.d.ts +50 -0
  2419. package/packages/typescript/src/markdown/fences.d.ts.map +1 -0
  2420. package/packages/typescript/src/markdown/fences.js +90 -0
  2421. package/packages/typescript/src/markdown/frontmatter.d.ts +24 -0
  2422. package/packages/typescript/src/markdown/frontmatter.d.ts.map +1 -0
  2423. package/packages/typescript/src/markdown/frontmatter.js +151 -0
  2424. package/packages/typescript/src/markdown/index.d.ts +18 -0
  2425. package/packages/typescript/src/markdown/index.d.ts.map +1 -0
  2426. package/packages/typescript/src/markdown/index.js +17 -0
  2427. package/packages/typescript/src/markdown/ir.d.ts +101 -0
  2428. package/packages/typescript/src/markdown/ir.d.ts.map +1 -0
  2429. package/packages/typescript/src/markdown/ir.js +789 -0
  2430. package/packages/typescript/src/media/fetch.d.ts +39 -0
  2431. package/packages/typescript/src/media/fetch.d.ts.map +1 -0
  2432. package/packages/typescript/src/media/fetch.js +205 -0
  2433. package/packages/typescript/src/media/index.d.ts +8 -0
  2434. package/packages/typescript/src/media/index.d.ts.map +1 -0
  2435. package/packages/typescript/src/media/index.js +7 -0
  2436. package/packages/typescript/src/media/mime.d.ts +51 -0
  2437. package/packages/typescript/src/media/mime.d.ts.map +1 -0
  2438. package/packages/typescript/src/media/mime.js +225 -0
  2439. package/packages/typescript/src/memory.d.ts +40 -0
  2440. package/packages/typescript/src/memory.d.ts.map +1 -0
  2441. package/packages/typescript/src/memory.js +58 -0
  2442. package/packages/typescript/src/network/fetch-guard.d.ts +34 -0
  2443. package/packages/typescript/src/network/fetch-guard.d.ts.map +1 -0
  2444. package/packages/typescript/src/network/fetch-guard.js +136 -0
  2445. package/packages/typescript/src/network/index.d.ts +11 -0
  2446. package/packages/typescript/src/network/index.d.ts.map +1 -0
  2447. package/packages/typescript/src/network/index.js +10 -0
  2448. package/packages/typescript/src/network/ssrf.d.ts +58 -0
  2449. package/packages/typescript/src/network/ssrf.d.ts.map +1 -0
  2450. package/packages/typescript/src/network/ssrf.js +252 -0
  2451. package/packages/typescript/src/plugin-lifecycle.d.ts +16 -0
  2452. package/packages/typescript/src/plugin-lifecycle.d.ts.map +1 -0
  2453. package/packages/typescript/src/plugin-lifecycle.js +590 -0
  2454. package/packages/typescript/src/plugin.d.ts +13 -0
  2455. package/packages/typescript/src/plugin.d.ts.map +1 -0
  2456. package/packages/typescript/src/plugin.js +334 -0
  2457. package/packages/typescript/src/plugins/index.d.ts +9 -0
  2458. package/packages/typescript/src/plugins/index.d.ts.map +1 -0
  2459. package/packages/typescript/src/plugins/index.js +8 -0
  2460. package/packages/typescript/src/plugins/native-features.d.ts +14 -0
  2461. package/packages/typescript/src/plugins/native-features.d.ts.map +1 -0
  2462. package/packages/typescript/src/plugins/native-features.js +59 -0
  2463. package/packages/typescript/src/prompts.d.ts +88 -0
  2464. package/packages/typescript/src/prompts.d.ts.map +1 -0
  2465. package/packages/typescript/src/prompts.js +1123 -0
  2466. package/packages/typescript/src/providers/onboarding-progress.d.ts +19 -0
  2467. package/packages/typescript/src/providers/onboarding-progress.d.ts.map +1 -0
  2468. package/packages/typescript/src/providers/onboarding-progress.js +268 -0
  2469. package/packages/typescript/src/providers/skill-eligibility.d.ts +28 -0
  2470. package/packages/typescript/src/providers/skill-eligibility.d.ts.map +1 -0
  2471. package/packages/typescript/src/providers/skill-eligibility.js +179 -0
  2472. package/packages/typescript/src/provisioning.d.ts +54 -0
  2473. package/packages/typescript/src/provisioning.d.ts.map +1 -0
  2474. package/packages/typescript/src/provisioning.js +209 -0
  2475. package/packages/typescript/src/roles.d.ts +70 -0
  2476. package/packages/typescript/src/roles.d.ts.map +1 -0
  2477. package/packages/typescript/src/roles.js +544 -0
  2478. package/packages/typescript/src/runtime-composition.d.ts +129 -0
  2479. package/packages/typescript/src/runtime-composition.d.ts.map +1 -0
  2480. package/packages/typescript/src/runtime-composition.js +335 -0
  2481. package/packages/typescript/src/runtime.d.ts +877 -0
  2482. package/packages/typescript/src/runtime.d.ts.map +1 -0
  2483. package/packages/typescript/src/runtime.js +5277 -0
  2484. package/packages/typescript/src/schemas/agent.d.ts +7 -0
  2485. package/packages/typescript/src/schemas/agent.d.ts.map +1 -0
  2486. package/packages/typescript/src/schemas/agent.js +112 -0
  2487. package/packages/typescript/src/schemas/cache.d.ts +7 -0
  2488. package/packages/typescript/src/schemas/cache.d.ts.map +1 -0
  2489. package/packages/typescript/src/schemas/cache.js +55 -0
  2490. package/packages/typescript/src/schemas/channel-participant.d.ts +7 -0
  2491. package/packages/typescript/src/schemas/channel-participant.d.ts.map +1 -0
  2492. package/packages/typescript/src/schemas/channel-participant.js +49 -0
  2493. package/packages/typescript/src/schemas/channel.d.ts +7 -0
  2494. package/packages/typescript/src/schemas/channel.d.ts.map +1 -0
  2495. package/packages/typescript/src/schemas/channel.js +94 -0
  2496. package/packages/typescript/src/schemas/character.d.ts +445 -0
  2497. package/packages/typescript/src/schemas/character.d.ts.map +1 -0
  2498. package/packages/typescript/src/schemas/character.js +309 -0
  2499. package/packages/typescript/src/schemas/component.d.ts +7 -0
  2500. package/packages/typescript/src/schemas/component.d.ts.map +1 -0
  2501. package/packages/typescript/src/schemas/component.js +156 -0
  2502. package/packages/typescript/src/schemas/embedding.d.ts +7 -0
  2503. package/packages/typescript/src/schemas/embedding.d.ts.map +1 -0
  2504. package/packages/typescript/src/schemas/embedding.js +89 -0
  2505. package/packages/typescript/src/schemas/entity.d.ts +7 -0
  2506. package/packages/typescript/src/schemas/entity.d.ts.map +1 -0
  2507. package/packages/typescript/src/schemas/entity.js +69 -0
  2508. package/packages/typescript/src/schemas/index.d.ts +75 -0
  2509. package/packages/typescript/src/schemas/index.d.ts.map +1 -0
  2510. package/packages/typescript/src/schemas/index.js +74 -0
  2511. package/packages/typescript/src/schemas/log.d.ts +6 -0
  2512. package/packages/typescript/src/schemas/log.d.ts.map +1 -0
  2513. package/packages/typescript/src/schemas/log.js +93 -0
  2514. package/packages/typescript/src/schemas/memory.d.ts +7 -0
  2515. package/packages/typescript/src/schemas/memory.d.ts.map +1 -0
  2516. package/packages/typescript/src/schemas/memory.js +167 -0
  2517. package/packages/typescript/src/schemas/message-server-agent.d.ts +7 -0
  2518. package/packages/typescript/src/schemas/message-server-agent.d.ts.map +1 -0
  2519. package/packages/typescript/src/schemas/message-server-agent.js +58 -0
  2520. package/packages/typescript/src/schemas/message-server.d.ts +6 -0
  2521. package/packages/typescript/src/schemas/message-server.d.ts.map +1 -0
  2522. package/packages/typescript/src/schemas/message-server.js +62 -0
  2523. package/packages/typescript/src/schemas/message.d.ts +7 -0
  2524. package/packages/typescript/src/schemas/message.d.ts.map +1 -0
  2525. package/packages/typescript/src/schemas/message.js +106 -0
  2526. package/packages/typescript/src/schemas/pairing-allowlist.d.ts +7 -0
  2527. package/packages/typescript/src/schemas/pairing-allowlist.d.ts.map +1 -0
  2528. package/packages/typescript/src/schemas/pairing-allowlist.js +76 -0
  2529. package/packages/typescript/src/schemas/pairing-request.d.ts +7 -0
  2530. package/packages/typescript/src/schemas/pairing-request.d.ts.map +1 -0
  2531. package/packages/typescript/src/schemas/pairing-request.js +96 -0
  2532. package/packages/typescript/src/schemas/participant.d.ts +6 -0
  2533. package/packages/typescript/src/schemas/participant.d.ts.map +1 -0
  2534. package/packages/typescript/src/schemas/participant.js +91 -0
  2535. package/packages/typescript/src/schemas/relationship.d.ts +7 -0
  2536. package/packages/typescript/src/schemas/relationship.d.ts.map +1 -0
  2537. package/packages/typescript/src/schemas/relationship.js +102 -0
  2538. package/packages/typescript/src/schemas/room.d.ts +6 -0
  2539. package/packages/typescript/src/schemas/room.d.ts.map +1 -0
  2540. package/packages/typescript/src/schemas/room.js +86 -0
  2541. package/packages/typescript/src/schemas/server.d.ts +7 -0
  2542. package/packages/typescript/src/schemas/server.d.ts.map +1 -0
  2543. package/packages/typescript/src/schemas/server.js +33 -0
  2544. package/packages/typescript/src/schemas/task.d.ts +6 -0
  2545. package/packages/typescript/src/schemas/task.d.ts.map +1 -0
  2546. package/packages/typescript/src/schemas/task.js +95 -0
  2547. package/packages/typescript/src/schemas/world.d.ts +6 -0
  2548. package/packages/typescript/src/schemas/world.d.ts.map +1 -0
  2549. package/packages/typescript/src/schemas/world.js +64 -0
  2550. package/packages/typescript/src/search.d.ts +381 -0
  2551. package/packages/typescript/src/search.d.ts.map +1 -0
  2552. package/packages/typescript/src/search.js +1580 -0
  2553. package/packages/typescript/src/secrets.d.ts +6 -0
  2554. package/packages/typescript/src/secrets.d.ts.map +1 -0
  2555. package/packages/typescript/src/secrets.js +28 -0
  2556. package/packages/typescript/src/security/external-content.d.ts +96 -0
  2557. package/packages/typescript/src/security/external-content.d.ts.map +1 -0
  2558. package/packages/typescript/src/security/external-content.js +252 -0
  2559. package/packages/typescript/src/security/index.d.ts +12 -0
  2560. package/packages/typescript/src/security/index.d.ts.map +1 -0
  2561. package/packages/typescript/src/security/index.js +13 -0
  2562. package/packages/typescript/src/security/redact.d.ts +111 -0
  2563. package/packages/typescript/src/security/redact.d.ts.map +1 -0
  2564. package/packages/typescript/src/security/redact.js +254 -0
  2565. package/packages/typescript/src/services/agentEvent.d.ts +297 -0
  2566. package/packages/typescript/src/services/agentEvent.d.ts.map +1 -0
  2567. package/packages/typescript/src/services/agentEvent.js +422 -0
  2568. package/packages/typescript/src/services/approval.d.ts +169 -0
  2569. package/packages/typescript/src/services/approval.d.ts.map +1 -0
  2570. package/packages/typescript/src/services/approval.js +399 -0
  2571. package/packages/typescript/src/services/embedding.d.ts +29 -0
  2572. package/packages/typescript/src/services/embedding.d.ts.map +1 -0
  2573. package/packages/typescript/src/services/embedding.js +211 -0
  2574. package/packages/typescript/src/services/followUp.d.ts +48 -0
  2575. package/packages/typescript/src/services/followUp.d.ts.map +1 -0
  2576. package/packages/typescript/src/services/followUp.js +333 -0
  2577. package/packages/typescript/src/services/hook.d.ts +85 -0
  2578. package/packages/typescript/src/services/hook.d.ts.map +1 -0
  2579. package/packages/typescript/src/services/hook.js +396 -0
  2580. package/packages/typescript/src/services/message.d.ts +93 -0
  2581. package/packages/typescript/src/services/message.d.ts.map +1 -0
  2582. package/packages/typescript/src/services/message.js +3163 -0
  2583. package/packages/typescript/src/services/onboarding-cli.d.ts +240 -0
  2584. package/packages/typescript/src/services/onboarding-cli.d.ts.map +1 -0
  2585. package/packages/typescript/src/services/onboarding-cli.js +688 -0
  2586. package/packages/typescript/src/services/onboarding-rpc.d.ts +225 -0
  2587. package/packages/typescript/src/services/onboarding-rpc.d.ts.map +1 -0
  2588. package/packages/typescript/src/services/onboarding-rpc.js +318 -0
  2589. package/packages/typescript/src/services/onboarding-state.d.ts +155 -0
  2590. package/packages/typescript/src/services/onboarding-state.d.ts.map +1 -0
  2591. package/packages/typescript/src/services/onboarding-state.js +706 -0
  2592. package/packages/typescript/src/services/pairing-integration.d.ts +96 -0
  2593. package/packages/typescript/src/services/pairing-integration.d.ts.map +1 -0
  2594. package/packages/typescript/src/services/pairing-integration.js +145 -0
  2595. package/packages/typescript/src/services/pairing-migration.d.ts +105 -0
  2596. package/packages/typescript/src/services/pairing-migration.d.ts.map +1 -0
  2597. package/packages/typescript/src/services/pairing-migration.js +283 -0
  2598. package/packages/typescript/src/services/pairing.d.ts +80 -0
  2599. package/packages/typescript/src/services/pairing.d.ts.map +1 -0
  2600. package/packages/typescript/src/services/pairing.js +253 -0
  2601. package/packages/typescript/src/services/plugin-hooks.d.ts +112 -0
  2602. package/packages/typescript/src/services/plugin-hooks.d.ts.map +1 -0
  2603. package/packages/typescript/src/services/plugin-hooks.js +163 -0
  2604. package/packages/typescript/src/services/relationships.d.ts +125 -0
  2605. package/packages/typescript/src/services/relationships.d.ts.map +1 -0
  2606. package/packages/typescript/src/services/relationships.js +637 -0
  2607. package/packages/typescript/src/services/task-scheduler.d.ts +28 -0
  2608. package/packages/typescript/src/services/task-scheduler.d.ts.map +1 -0
  2609. package/packages/typescript/src/services/task-scheduler.js +89 -0
  2610. package/packages/typescript/src/services/task.d.ts +130 -0
  2611. package/packages/typescript/src/services/task.d.ts.map +1 -0
  2612. package/packages/typescript/src/services/task.js +536 -0
  2613. package/packages/typescript/src/services/tool-policy.d.ts +186 -0
  2614. package/packages/typescript/src/services/tool-policy.d.ts.map +1 -0
  2615. package/packages/typescript/src/services/tool-policy.js +332 -0
  2616. package/packages/typescript/src/services/trajectories.d.ts +25 -0
  2617. package/packages/typescript/src/services/trajectories.d.ts.map +1 -0
  2618. package/packages/typescript/src/services/trajectories.js +1 -0
  2619. package/packages/typescript/src/services.d.ts +61 -0
  2620. package/packages/typescript/src/services.d.ts.map +1 -0
  2621. package/packages/typescript/src/services.js +99 -0
  2622. package/packages/typescript/src/sessions/index.d.ts +17 -0
  2623. package/packages/typescript/src/sessions/index.d.ts.map +1 -0
  2624. package/packages/typescript/src/sessions/index.js +29 -0
  2625. package/packages/typescript/src/sessions/provider.d.ts +71 -0
  2626. package/packages/typescript/src/sessions/provider.d.ts.map +1 -0
  2627. package/packages/typescript/src/sessions/provider.js +243 -0
  2628. package/packages/typescript/src/sessions/session-key.d.ts +201 -0
  2629. package/packages/typescript/src/sessions/session-key.d.ts.map +1 -0
  2630. package/packages/typescript/src/sessions/session-key.js +396 -0
  2631. package/packages/typescript/src/sessions/types.d.ts +197 -0
  2632. package/packages/typescript/src/sessions/types.d.ts.map +1 -0
  2633. package/packages/typescript/src/sessions/types.js +68 -0
  2634. package/packages/typescript/src/settings.d.ts +99 -0
  2635. package/packages/typescript/src/settings.d.ts.map +1 -0
  2636. package/packages/typescript/src/settings.js +409 -0
  2637. package/packages/typescript/src/should-respond.d.ts +2 -0
  2638. package/packages/typescript/src/should-respond.d.ts.map +1 -0
  2639. package/packages/typescript/src/should-respond.js +16 -0
  2640. package/packages/typescript/src/streaming-context.d.ts +79 -0
  2641. package/packages/typescript/src/streaming-context.d.ts.map +1 -0
  2642. package/packages/typescript/src/streaming-context.js +115 -0
  2643. package/packages/typescript/src/trajectory-context.d.ts +26 -0
  2644. package/packages/typescript/src/trajectory-context.d.ts.map +1 -0
  2645. package/packages/typescript/src/trajectory-context.js +85 -0
  2646. package/packages/typescript/src/trajectory-utils.d.ts +49 -0
  2647. package/packages/typescript/src/trajectory-utils.d.ts.map +1 -0
  2648. package/packages/typescript/src/trajectory-utils.js +105 -0
  2649. package/packages/typescript/src/types/agent.d.ts +62 -0
  2650. package/packages/typescript/src/types/agent.d.ts.map +1 -0
  2651. package/packages/typescript/src/types/agent.js +5 -0
  2652. package/packages/typescript/src/types/agentEvent.d.ts +258 -0
  2653. package/packages/typescript/src/types/agentEvent.d.ts.map +1 -0
  2654. package/packages/typescript/src/types/agentEvent.js +11 -0
  2655. package/packages/typescript/src/types/channel-config.d.ts +167 -0
  2656. package/packages/typescript/src/types/channel-config.d.ts.map +1 -0
  2657. package/packages/typescript/src/types/channel-config.js +7 -0
  2658. package/packages/typescript/src/types/components.d.ts +346 -0
  2659. package/packages/typescript/src/types/components.d.ts.map +1 -0
  2660. package/packages/typescript/src/types/components.js +1 -0
  2661. package/packages/typescript/src/types/database.d.ts +1079 -0
  2662. package/packages/typescript/src/types/database.d.ts.map +1 -0
  2663. package/packages/typescript/src/types/database.js +9 -0
  2664. package/packages/typescript/src/types/environment.d.ts +73 -0
  2665. package/packages/typescript/src/types/environment.d.ts.map +1 -0
  2666. package/packages/typescript/src/types/environment.js +16 -0
  2667. package/packages/typescript/src/types/events.d.ts +386 -0
  2668. package/packages/typescript/src/types/events.d.ts.map +1 -0
  2669. package/packages/typescript/src/types/events.js +83 -0
  2670. package/packages/typescript/src/types/generated/eliza/v1/agent_pb.d.ts +400 -0
  2671. package/packages/typescript/src/types/generated/eliza/v1/agent_pb.d.ts.map +1 -0
  2672. package/packages/typescript/src/types/generated/eliza/v1/agent_pb.js +72 -0
  2673. package/packages/typescript/src/types/generated/eliza/v1/components_pb.d.ts +364 -0
  2674. package/packages/typescript/src/types/generated/eliza/v1/components_pb.d.ts.map +1 -0
  2675. package/packages/typescript/src/types/generated/eliza/v1/components_pb.js +68 -0
  2676. package/packages/typescript/src/types/generated/eliza/v1/database_pb.d.ts +694 -0
  2677. package/packages/typescript/src/types/generated/eliza/v1/database_pb.d.ts.map +1 -0
  2678. package/packages/typescript/src/types/generated/eliza/v1/database_pb.js +172 -0
  2679. package/packages/typescript/src/types/generated/eliza/v1/environment_pb.d.ts +299 -0
  2680. package/packages/typescript/src/types/generated/eliza/v1/environment_pb.d.ts.map +1 -0
  2681. package/packages/typescript/src/types/generated/eliza/v1/environment_pb.js +52 -0
  2682. package/packages/typescript/src/types/generated/eliza/v1/events_pb.d.ts +746 -0
  2683. package/packages/typescript/src/types/generated/eliza/v1/events_pb.d.ts.map +1 -0
  2684. package/packages/typescript/src/types/generated/eliza/v1/events_pb.js +357 -0
  2685. package/packages/typescript/src/types/generated/eliza/v1/ipc_pb.d.ts +799 -0
  2686. package/packages/typescript/src/types/generated/eliza/v1/ipc_pb.d.ts.map +1 -0
  2687. package/packages/typescript/src/types/generated/eliza/v1/ipc_pb.js +172 -0
  2688. package/packages/typescript/src/types/generated/eliza/v1/knowledge_pb.d.ts +63 -0
  2689. package/packages/typescript/src/types/generated/eliza/v1/knowledge_pb.d.ts.map +1 -0
  2690. package/packages/typescript/src/types/generated/eliza/v1/knowledge_pb.js +18 -0
  2691. package/packages/typescript/src/types/generated/eliza/v1/memory_pb.d.ts +290 -0
  2692. package/packages/typescript/src/types/generated/eliza/v1/memory_pb.d.ts.map +1 -0
  2693. package/packages/typescript/src/types/generated/eliza/v1/memory_pb.js +53 -0
  2694. package/packages/typescript/src/types/generated/eliza/v1/message_service_pb.d.ts +160 -0
  2695. package/packages/typescript/src/types/generated/eliza/v1/message_service_pb.d.ts.map +1 -0
  2696. package/packages/typescript/src/types/generated/eliza/v1/message_service_pb.js +88 -0
  2697. package/packages/typescript/src/types/generated/eliza/v1/messaging_pb.d.ts +214 -0
  2698. package/packages/typescript/src/types/generated/eliza/v1/messaging_pb.d.ts.map +1 -0
  2699. package/packages/typescript/src/types/generated/eliza/v1/messaging_pb.js +78 -0
  2700. package/packages/typescript/src/types/generated/eliza/v1/model_pb.d.ts +653 -0
  2701. package/packages/typescript/src/types/generated/eliza/v1/model_pb.d.ts.map +1 -0
  2702. package/packages/typescript/src/types/generated/eliza/v1/model_pb.js +237 -0
  2703. package/packages/typescript/src/types/generated/eliza/v1/payment_pb.d.ts +147 -0
  2704. package/packages/typescript/src/types/generated/eliza/v1/payment_pb.d.ts.map +1 -0
  2705. package/packages/typescript/src/types/generated/eliza/v1/payment_pb.js +27 -0
  2706. package/packages/typescript/src/types/generated/eliza/v1/plugin_pb.d.ts +286 -0
  2707. package/packages/typescript/src/types/generated/eliza/v1/plugin_pb.d.ts.map +1 -0
  2708. package/packages/typescript/src/types/generated/eliza/v1/plugin_pb.js +86 -0
  2709. package/packages/typescript/src/types/generated/eliza/v1/primitives_pb.d.ts +263 -0
  2710. package/packages/typescript/src/types/generated/eliza/v1/primitives_pb.d.ts.map +1 -0
  2711. package/packages/typescript/src/types/generated/eliza/v1/primitives_pb.js +38 -0
  2712. package/packages/typescript/src/types/generated/eliza/v1/prompts_pb.d.ts +137 -0
  2713. package/packages/typescript/src/types/generated/eliza/v1/prompts_pb.d.ts.map +1 -0
  2714. package/packages/typescript/src/types/generated/eliza/v1/prompts_pb.js +27 -0
  2715. package/packages/typescript/src/types/generated/eliza/v1/service_interfaces_pb.d.ts +2687 -0
  2716. package/packages/typescript/src/types/generated/eliza/v1/service_interfaces_pb.d.ts.map +1 -0
  2717. package/packages/typescript/src/types/generated/eliza/v1/service_interfaces_pb.js +392 -0
  2718. package/packages/typescript/src/types/generated/eliza/v1/service_pb.d.ts +144 -0
  2719. package/packages/typescript/src/types/generated/eliza/v1/service_pb.d.ts.map +1 -0
  2720. package/packages/typescript/src/types/generated/eliza/v1/service_pb.js +99 -0
  2721. package/packages/typescript/src/types/generated/eliza/v1/settings_pb.d.ts +146 -0
  2722. package/packages/typescript/src/types/generated/eliza/v1/settings_pb.d.ts.map +1 -0
  2723. package/packages/typescript/src/types/generated/eliza/v1/settings_pb.js +32 -0
  2724. package/packages/typescript/src/types/generated/eliza/v1/state_pb.d.ts +259 -0
  2725. package/packages/typescript/src/types/generated/eliza/v1/state_pb.d.ts.map +1 -0
  2726. package/packages/typescript/src/types/generated/eliza/v1/state_pb.js +44 -0
  2727. package/packages/typescript/src/types/generated/eliza/v1/task_pb.d.ts +120 -0
  2728. package/packages/typescript/src/types/generated/eliza/v1/task_pb.d.ts.map +1 -0
  2729. package/packages/typescript/src/types/generated/eliza/v1/task_pb.js +53 -0
  2730. package/packages/typescript/src/types/generated/eliza/v1/tee_pb.d.ts +205 -0
  2731. package/packages/typescript/src/types/generated/eliza/v1/tee_pb.d.ts.map +1 -0
  2732. package/packages/typescript/src/types/generated/eliza/v1/tee_pb.js +89 -0
  2733. package/packages/typescript/src/types/generated/eliza/v1/testing_pb.d.ts +47 -0
  2734. package/packages/typescript/src/types/generated/eliza/v1/testing_pb.d.ts.map +1 -0
  2735. package/packages/typescript/src/types/generated/eliza/v1/testing_pb.js +16 -0
  2736. package/packages/typescript/src/types/hook.d.ts +338 -0
  2737. package/packages/typescript/src/types/hook.d.ts.map +1 -0
  2738. package/packages/typescript/src/types/hook.js +73 -0
  2739. package/packages/typescript/src/types/index.d.ts +38 -0
  2740. package/packages/typescript/src/types/index.d.ts.map +1 -0
  2741. package/packages/typescript/src/types/index.js +46 -0
  2742. package/packages/typescript/src/types/knowledge.d.ts +49 -0
  2743. package/packages/typescript/src/types/knowledge.d.ts.map +1 -0
  2744. package/packages/typescript/src/types/knowledge.js +1 -0
  2745. package/packages/typescript/src/types/memory-storage.d.ts +28 -0
  2746. package/packages/typescript/src/types/memory-storage.d.ts.map +1 -0
  2747. package/packages/typescript/src/types/memory-storage.js +13 -0
  2748. package/packages/typescript/src/types/memory.d.ts +438 -0
  2749. package/packages/typescript/src/types/memory.d.ts.map +1 -0
  2750. package/packages/typescript/src/types/memory.js +16 -0
  2751. package/packages/typescript/src/types/message-service.d.ts +169 -0
  2752. package/packages/typescript/src/types/message-service.d.ts.map +1 -0
  2753. package/packages/typescript/src/types/message-service.js +1 -0
  2754. package/packages/typescript/src/types/messaging.d.ts +358 -0
  2755. package/packages/typescript/src/types/messaging.d.ts.map +1 -0
  2756. package/packages/typescript/src/types/messaging.js +27 -0
  2757. package/packages/typescript/src/types/model.d.ts +697 -0
  2758. package/packages/typescript/src/types/model.d.ts.map +1 -0
  2759. package/packages/typescript/src/types/model.js +247 -0
  2760. package/packages/typescript/src/types/onboarding.d.ts +319 -0
  2761. package/packages/typescript/src/types/onboarding.d.ts.map +1 -0
  2762. package/packages/typescript/src/types/onboarding.js +97 -0
  2763. package/packages/typescript/src/types/pairing.d.ts +124 -0
  2764. package/packages/typescript/src/types/pairing.d.ts.map +1 -0
  2765. package/packages/typescript/src/types/pairing.js +32 -0
  2766. package/packages/typescript/src/types/payment.d.ts +45 -0
  2767. package/packages/typescript/src/types/payment.d.ts.map +1 -0
  2768. package/packages/typescript/src/types/payment.js +1 -0
  2769. package/packages/typescript/src/types/plugin-manifest.d.ts +381 -0
  2770. package/packages/typescript/src/types/plugin-manifest.d.ts.map +1 -0
  2771. package/packages/typescript/src/types/plugin-manifest.js +10 -0
  2772. package/packages/typescript/src/types/plugin-store.d.ts +173 -0
  2773. package/packages/typescript/src/types/plugin-store.d.ts.map +1 -0
  2774. package/packages/typescript/src/types/plugin-store.js +1 -0
  2775. package/packages/typescript/src/types/plugin.d.ts +325 -0
  2776. package/packages/typescript/src/types/plugin.d.ts.map +1 -0
  2777. package/packages/typescript/src/types/plugin.js +1 -0
  2778. package/packages/typescript/src/types/primitives.d.ts +176 -0
  2779. package/packages/typescript/src/types/primitives.d.ts.map +1 -0
  2780. package/packages/typescript/src/types/primitives.js +41 -0
  2781. package/packages/typescript/src/types/prompt-batcher.d.ts +126 -0
  2782. package/packages/typescript/src/types/prompt-batcher.d.ts.map +1 -0
  2783. package/packages/typescript/src/types/prompt-batcher.js +6 -0
  2784. package/packages/typescript/src/types/prompts.d.ts +39 -0
  2785. package/packages/typescript/src/types/prompts.d.ts.map +1 -0
  2786. package/packages/typescript/src/types/prompts.js +7 -0
  2787. package/packages/typescript/src/types/proto.d.ts +60 -0
  2788. package/packages/typescript/src/types/proto.d.ts.map +1 -0
  2789. package/packages/typescript/src/types/proto.js +53 -0
  2790. package/packages/typescript/src/types/runtime.d.ts +394 -0
  2791. package/packages/typescript/src/types/runtime.d.ts.map +1 -0
  2792. package/packages/typescript/src/types/runtime.js +1 -0
  2793. package/packages/typescript/src/types/schema-builder.d.ts +43 -0
  2794. package/packages/typescript/src/types/schema-builder.d.ts.map +1 -0
  2795. package/packages/typescript/src/types/schema-builder.js +16 -0
  2796. package/packages/typescript/src/types/schema.d.ts +99 -0
  2797. package/packages/typescript/src/types/schema.d.ts.map +1 -0
  2798. package/packages/typescript/src/types/schema.js +11 -0
  2799. package/packages/typescript/src/types/service-interfaces.d.ts +1200 -0
  2800. package/packages/typescript/src/types/service-interfaces.d.ts.map +1 -0
  2801. package/packages/typescript/src/types/service-interfaces.js +81 -0
  2802. package/packages/typescript/src/types/service.d.ts +173 -0
  2803. package/packages/typescript/src/types/service.d.ts.map +1 -0
  2804. package/packages/typescript/src/types/service.js +78 -0
  2805. package/packages/typescript/src/types/settings.d.ts +36 -0
  2806. package/packages/typescript/src/types/settings.d.ts.map +1 -0
  2807. package/packages/typescript/src/types/settings.js +1 -0
  2808. package/packages/typescript/src/types/state.d.ts +251 -0
  2809. package/packages/typescript/src/types/state.d.ts.map +1 -0
  2810. package/packages/typescript/src/types/state.js +1 -0
  2811. package/packages/typescript/src/types/streaming.d.ts +93 -0
  2812. package/packages/typescript/src/types/streaming.d.ts.map +1 -0
  2813. package/packages/typescript/src/types/streaming.js +21 -0
  2814. package/packages/typescript/src/types/task.d.ts +122 -0
  2815. package/packages/typescript/src/types/task.d.ts.map +1 -0
  2816. package/packages/typescript/src/types/task.js +1 -0
  2817. package/packages/typescript/src/types/tee.d.ts +3 -0
  2818. package/packages/typescript/src/types/tee.d.ts.map +1 -0
  2819. package/packages/typescript/src/types/tee.js +1 -0
  2820. package/packages/typescript/src/types/testing.d.ts +15 -0
  2821. package/packages/typescript/src/types/testing.d.ts.map +1 -0
  2822. package/packages/typescript/src/types/testing.js +1 -0
  2823. package/packages/typescript/src/types/tools.d.ts +166 -0
  2824. package/packages/typescript/src/types/tools.d.ts.map +1 -0
  2825. package/packages/typescript/src/types/tools.js +380 -0
  2826. package/packages/typescript/src/types/trigger.d.ts +38 -0
  2827. package/packages/typescript/src/types/trigger.d.ts.map +1 -0
  2828. package/packages/typescript/src/types/trigger.js +1 -0
  2829. package/packages/typescript/src/utils/batch-queue/batch-processor.d.ts +53 -0
  2830. package/packages/typescript/src/utils/batch-queue/batch-processor.d.ts.map +1 -0
  2831. package/packages/typescript/src/utils/batch-queue/batch-processor.js +129 -0
  2832. package/packages/typescript/src/utils/batch-queue/index.d.ts +97 -0
  2833. package/packages/typescript/src/utils/batch-queue/index.d.ts.map +1 -0
  2834. package/packages/typescript/src/utils/batch-queue/index.js +175 -0
  2835. package/packages/typescript/src/utils/batch-queue/priority-queue.d.ts +53 -0
  2836. package/packages/typescript/src/utils/batch-queue/priority-queue.d.ts.map +1 -0
  2837. package/packages/typescript/src/utils/batch-queue/priority-queue.js +128 -0
  2838. package/packages/typescript/src/utils/batch-queue/semaphore.d.ts +18 -0
  2839. package/packages/typescript/src/utils/batch-queue/semaphore.d.ts.map +1 -0
  2840. package/packages/typescript/src/utils/batch-queue/semaphore.js +34 -0
  2841. package/packages/typescript/src/utils/batch-queue/task-drain.d.ts +57 -0
  2842. package/packages/typescript/src/utils/batch-queue/task-drain.d.ts.map +1 -0
  2843. package/packages/typescript/src/utils/batch-queue/task-drain.js +150 -0
  2844. package/packages/typescript/src/utils/batch-queue.d.ts +20 -0
  2845. package/packages/typescript/src/utils/batch-queue.d.ts.map +1 -0
  2846. package/packages/typescript/src/utils/batch-queue.js +19 -0
  2847. package/packages/typescript/src/utils/boolean.d.ts +50 -0
  2848. package/packages/typescript/src/utils/boolean.d.ts.map +1 -0
  2849. package/packages/typescript/src/utils/boolean.js +73 -0
  2850. package/packages/typescript/src/utils/buffer.d.ts +107 -0
  2851. package/packages/typescript/src/utils/buffer.d.ts.map +1 -0
  2852. package/packages/typescript/src/utils/buffer.js +229 -0
  2853. package/packages/typescript/src/utils/channel-utils.d.ts +274 -0
  2854. package/packages/typescript/src/utils/channel-utils.d.ts.map +1 -0
  2855. package/packages/typescript/src/utils/channel-utils.js +337 -0
  2856. package/packages/typescript/src/utils/context-catalog.d.ts +6 -0
  2857. package/packages/typescript/src/utils/context-catalog.d.ts.map +1 -0
  2858. package/packages/typescript/src/utils/context-catalog.js +126 -0
  2859. package/packages/typescript/src/utils/context-routing.d.ts +25 -0
  2860. package/packages/typescript/src/utils/context-routing.d.ts.map +1 -0
  2861. package/packages/typescript/src/utils/context-routing.js +160 -0
  2862. package/packages/typescript/src/utils/crypto-compat.d.ts +83 -0
  2863. package/packages/typescript/src/utils/crypto-compat.d.ts.map +1 -0
  2864. package/packages/typescript/src/utils/crypto-compat.js +368 -0
  2865. package/packages/typescript/src/utils/deterministic.d.ts +9 -0
  2866. package/packages/typescript/src/utils/deterministic.d.ts.map +1 -0
  2867. package/packages/typescript/src/utils/deterministic.js +70 -0
  2868. package/packages/typescript/src/utils/environment.d.ts +125 -0
  2869. package/packages/typescript/src/utils/environment.d.ts.map +1 -0
  2870. package/packages/typescript/src/utils/environment.js +290 -0
  2871. package/packages/typescript/src/utils/example-names.d.ts +3 -0
  2872. package/packages/typescript/src/utils/example-names.d.ts.map +1 -0
  2873. package/packages/typescript/src/utils/example-names.js +30 -0
  2874. package/packages/typescript/src/utils/json-llm.d.ts +17 -0
  2875. package/packages/typescript/src/utils/json-llm.d.ts.map +1 -0
  2876. package/packages/typescript/src/utils/json-llm.js +32 -0
  2877. package/packages/typescript/src/utils/model-errors.d.ts +3 -0
  2878. package/packages/typescript/src/utils/model-errors.d.ts.map +1 -0
  2879. package/packages/typescript/src/utils/model-errors.js +23 -0
  2880. package/packages/typescript/src/utils/node.d.ts +8 -0
  2881. package/packages/typescript/src/utils/node.d.ts.map +1 -0
  2882. package/packages/typescript/src/utils/node.js +12 -0
  2883. package/packages/typescript/src/utils/paths.d.ts +97 -0
  2884. package/packages/typescript/src/utils/paths.d.ts.map +1 -0
  2885. package/packages/typescript/src/utils/paths.js +204 -0
  2886. package/packages/typescript/src/utils/prompt-batcher/batcher.d.ts +163 -0
  2887. package/packages/typescript/src/utils/prompt-batcher/batcher.d.ts.map +1 -0
  2888. package/packages/typescript/src/utils/prompt-batcher/batcher.js +896 -0
  2889. package/packages/typescript/src/utils/prompt-batcher/dispatcher.d.ts +15 -0
  2890. package/packages/typescript/src/utils/prompt-batcher/dispatcher.d.ts.map +1 -0
  2891. package/packages/typescript/src/utils/prompt-batcher/dispatcher.js +230 -0
  2892. package/packages/typescript/src/utils/prompt-batcher/shared.d.ts +66 -0
  2893. package/packages/typescript/src/utils/prompt-batcher/shared.d.ts.map +1 -0
  2894. package/packages/typescript/src/utils/prompt-batcher/shared.js +101 -0
  2895. package/packages/typescript/src/utils/prompt-batcher.d.ts +5 -0
  2896. package/packages/typescript/src/utils/prompt-batcher.d.ts.map +1 -0
  2897. package/packages/typescript/src/utils/prompt-batcher.js +4 -0
  2898. package/packages/typescript/src/utils/retry.d.ts +128 -0
  2899. package/packages/typescript/src/utils/retry.d.ts.map +1 -0
  2900. package/packages/typescript/src/utils/retry.js +190 -0
  2901. package/packages/typescript/src/utils/server-health.d.ts +35 -0
  2902. package/packages/typescript/src/utils/server-health.d.ts.map +1 -0
  2903. package/packages/typescript/src/utils/server-health.js +76 -0
  2904. package/packages/typescript/src/utils/slice-to-fit-budget.d.ts +12 -0
  2905. package/packages/typescript/src/utils/slice-to-fit-budget.d.ts.map +1 -0
  2906. package/packages/typescript/src/utils/slice-to-fit-budget.js +36 -0
  2907. package/packages/typescript/src/utils/streaming.d.ts +275 -0
  2908. package/packages/typescript/src/utils/streaming.d.ts.map +1 -0
  2909. package/packages/typescript/src/utils/streaming.js +774 -0
  2910. package/packages/typescript/src/utils/text-normalize.d.ts +23 -0
  2911. package/packages/typescript/src/utils/text-normalize.d.ts.map +1 -0
  2912. package/packages/typescript/src/utils/text-normalize.js +42 -0
  2913. package/packages/typescript/src/utils/text-splitting.d.ts +14 -0
  2914. package/packages/typescript/src/utils/text-splitting.d.ts.map +1 -0
  2915. package/packages/typescript/src/utils/text-splitting.js +66 -0
  2916. package/packages/typescript/src/utils/toon.d.ts +8 -0
  2917. package/packages/typescript/src/utils/toon.d.ts.map +1 -0
  2918. package/packages/typescript/src/utils/toon.js +325 -0
  2919. package/packages/typescript/src/utils/type-guards.d.ts +25 -0
  2920. package/packages/typescript/src/utils/type-guards.d.ts.map +1 -0
  2921. package/packages/typescript/src/utils/type-guards.js +73 -0
  2922. package/packages/typescript/src/utils.d.ts +190 -0
  2923. package/packages/typescript/src/utils.d.ts.map +1 -0
  2924. package/packages/typescript/src/utils.js +1115 -0
  2925. package/packages/typescript/src/validation/index.d.ts +8 -0
  2926. package/packages/typescript/src/validation/index.d.ts.map +1 -0
  2927. package/packages/typescript/src/validation/index.js +7 -0
  2928. package/packages/typescript/src/validation/keywords.d.ts +26 -0
  2929. package/packages/typescript/src/validation/keywords.d.ts.map +1 -0
  2930. package/packages/typescript/src/validation/keywords.js +76 -0
  2931. package/packages/typescript/src/validation/secrets.d.ts +94 -0
  2932. package/packages/typescript/src/validation/secrets.d.ts.map +1 -0
  2933. package/packages/typescript/src/validation/secrets.js +399 -0
  2934. package/jest.config.js +0 -17
  2935. package/src/__tests__/client-type-identification.test.ts +0 -59
  2936. package/src/defaultCharacter.ts +0 -530
  2937. package/src/index.ts +0 -911
  2938. package/tsconfig.json +0 -16
@@ -0,0 +1,3286 @@
1
+ /**
2
+ * elizaOS runtime entry point for Eliza.
3
+ *
4
+ * Starts the elizaOS agent runtime with Eliza's plugin configuration.
5
+ * Can be run directly via: node --import tsx src/runtime/eliza.ts
6
+ * Or via the CLI: eliza start
7
+ *
8
+ * @module eliza
9
+ */
10
+ import crypto from "node:crypto";
11
+ import { existsSync, mkdirSync, readFileSync, unlinkSync } from "node:fs";
12
+ import fs from "node:fs/promises";
13
+ import { createRequire } from "node:module";
14
+ import os from "node:os";
15
+ import path from "node:path";
16
+ import process from "node:process";
17
+ import * as readline from "node:readline";
18
+ import { fileURLToPath, pathToFileURL } from "node:url";
19
+ // ---------------------------------------------------------------------------
20
+ // Extracted modules — re-exported for backward compatibility
21
+ // ---------------------------------------------------------------------------
22
+ import { runFirstTimeSetup } from "./first-time-setup.js";
23
+ import { resolvePlugins } from "./plugin-resolver.js";
24
+ import { CUSTOM_PLUGINS_DIRNAME as CUSTOM_RUNTIME_PLUGINS_DIRNAME, STATIC_ELIZA_PLUGINS, } from "./plugin-types.js";
25
+ export { CHANNEL_PLUGIN_MAP, collectPluginNames, OPTIONAL_PLUGIN_MAP, PROVIDER_PLUGIN_MAP, } from "./plugin-collector.js";
26
+ export { CUSTOM_PLUGINS_DIRNAME, EJECTED_PLUGINS_DIRNAME, ensureBrowserServerLink, findPluginBrowserStagehandDir, findRuntimePluginExport, mergeDropInPlugins, repairBrokenInstallRecord, resolveElizaPluginImportSpecifier, resolvePackageEntry, STATIC_ELIZA_PLUGINS, scanDropInPlugins, shouldIgnoreMissingPluginExport, } from "./plugin-types.js";
27
+ // resolvePlugins is re-exported via index.ts from ./plugin-resolver
28
+ import * as pluginAppCompanion from "@elizaos/app-companion/plugin";
29
+ import * as pluginAppLifeops from "@elizaos/app-lifeops/plugin";
30
+ import { AgentRuntime, AutonomyService, addLogListener, ChannelType, createBasicCapabilitiesPlugin, createMessageMemory, logger,
31
+ // loggerScope, // removed
32
+ mergeCharacterDefaults, stringToUuid, } from "@elizaos/core";
33
+ import * as pluginAgentSkills from "@elizaos/plugin-agent-skills";
34
+ import * as pluginAnthropic from "@elizaos/plugin-anthropic";
35
+ import * as pluginLocalEmbedding from "@elizaos/plugin-local-embedding";
36
+ import * as pluginPdf from "@elizaos/plugin-pdf";
37
+ import * as pluginSql from "@elizaos/plugin-sql";
38
+ import { isElizaSettingsDebugEnabled, settingsDebugCloudSummary, } from "@elizaos/shared";
39
+ import { resolveElizaCloudTopology } from "@elizaos/shared/contracts";
40
+ import { getOnboardingProviderOption, migrateLegacyRuntimeConfig, normalizeOnboardingProviderId, resolveDeploymentTargetInConfig, resolveServiceRoutingInConfig, } from "@elizaos/shared/contracts/onboarding";
41
+ import { debugLogResolvedContext, validateRuntimeContext, } from "../api/plugin-validation.js";
42
+ import { getWalletAddresses, syncSolanaPublicKeyEnv } from "../api/wallet.js";
43
+ import { configFileExists, loadElizaConfig, } from "../config/config.js";
44
+ import { CONNECTOR_ENV_MAP, collectConfigEnvVars, collectConnectorEnvVars, } from "../config/env-vars.js";
45
+ import { resolveStateDir, resolveUserPath } from "../config/paths.js";
46
+ import { resolveServerOnlyPort } from "../config/runtime-env.js";
47
+ import { createHookEvent, loadHooks, triggerHook, } from "../hooks/index.js";
48
+ import { getDefaultStylePreset, normalizeCharacterLanguage, resolveStylePresetByAvatarIndex, resolveStylePresetById, resolveStylePresetByName, } from "../onboarding-presets.js";
49
+ import { ensureAgentWorkspace, resolveDefaultAgentWorkspaceDir, } from "../providers/workspace.js";
50
+ import { SandboxAuditLog } from "../security/audit-log.js";
51
+ import { SandboxManager, } from "../services/sandbox-manager.js";
52
+ import { CORE_PLUGINS, OPTIONAL_CORE_PLUGINS } from "./core-plugins.js";
53
+ import { seedBundledKnowledge } from "./default-knowledge.js";
54
+ import discordLocalPlugin from "./discord-local-plugin.js";
55
+ import { createElizaPlugin } from "./eliza-plugin.js";
56
+ import { detectEmbeddingPreset } from "./embedding-presets.js";
57
+ import { runtimeKnowledgeEnabled, runtimeTrajectoriesEnabled, } from "./native-runtime-features.js";
58
+ import { createPgliteInitError, getPgliteErrorCode, PGLITE_ERROR_CODES, } from "./pglite-error-compat";
59
+ import { installRuntimePluginLifecycle } from "./plugin-lifecycle.js";
60
+ import rolesPlugin from "./roles.js";
61
+ import { shouldEnableTrajectoryLoggingByDefault } from "./trajectory-persistence.js";
62
+ const require = createRequire(import.meta.url);
63
+ // Agent orchestrator ships as the standalone @elizaos/plugin-agent-orchestrator package.
64
+ let pluginAgentOrchestrator = null;
65
+ try {
66
+ pluginAgentOrchestrator = require("@elizaos/plugin-agent-orchestrator");
67
+ }
68
+ catch {
69
+ pluginAgentOrchestrator = null;
70
+ }
71
+ // Keep plugin-shell behind a guarded runtime require too. The published alpha
72
+ // tarball can declare dist/index.js without actually shipping it, which breaks
73
+ // CLI/bootstrap in published-only CI.
74
+ let pluginShell = null;
75
+ try {
76
+ pluginShell = require("@elizaos/plugin-shell");
77
+ }
78
+ catch {
79
+ pluginShell = null;
80
+ }
81
+ // Keep plugin-commands behind a guarded runtime require. Some published alpha
82
+ // builds advertise dist/index.js without actually shipping it, and a static
83
+ // ESM import here makes the CLI fail before it can print --help/--version.
84
+ let pluginCommands = null;
85
+ try {
86
+ pluginCommands = require("@elizaos/plugin-commands");
87
+ }
88
+ catch {
89
+ pluginCommands = null;
90
+ }
91
+ // plugin-plugin-manager, plugin-secrets-manager, and plugin-trust are now
92
+ // built-in core capabilities in @elizaos/core. Enable via character settings:
93
+ // ENABLE_PLUGIN_MANAGER, ENABLE_SECRETS_MANAGER, ENABLE_TRUST.
94
+ // Keep plugin-cron behind a guarded runtime require for the same reason. Some
95
+ // published alpha builds resolve through package.json but are missing the
96
+ // shipped dist/index.js entry, which breaks CLI bootstrap before help/version.
97
+ let pluginCron = null;
98
+ try {
99
+ pluginCron = require("@elizaos/plugin-cron");
100
+ }
101
+ catch {
102
+ pluginCron = null;
103
+ }
104
+ // Keep plugin-elizacloud behind a guarded runtime require as well. Some
105
+ // published alpha builds advertise dist/node/index.node.js but do not ship
106
+ // that ESM entry, which breaks CLI bootstrap in published-only CI.
107
+ let pluginElizacloud = null;
108
+ try {
109
+ pluginElizacloud = require("@elizaos/plugin-elizacloud");
110
+ }
111
+ catch {
112
+ pluginElizacloud = null;
113
+ }
114
+ // Keep plugin-ollama behind a guarded runtime require as well. Some published
115
+ // alpha builds advertise dist/node/index.node.js but do not ship that ESM
116
+ // entry, which breaks CLI bootstrap and startup smokes in published-only CI.
117
+ let pluginOllama = null;
118
+ try {
119
+ pluginOllama = require("@elizaos/plugin-ollama");
120
+ }
121
+ catch {
122
+ pluginOllama = null;
123
+ }
124
+ // Keep plugin-openai behind a guarded runtime require too. Some published
125
+ // alpha builds advertise dist/node/index.node.js without shipping that entry,
126
+ // which breaks CLI bootstrap and validation in published-only CI.
127
+ let pluginOpenai = null;
128
+ try {
129
+ pluginOpenai = require("@elizaos/plugin-openai");
130
+ }
131
+ catch {
132
+ pluginOpenai = null;
133
+ }
134
+ let activeSignalShutdownContext = null;
135
+ let signalHandlersRegistered = false;
136
+ let signalShutdownPromise = null;
137
+ function registerSignalShutdownHandlers(context) {
138
+ activeSignalShutdownContext = context;
139
+ if (signalHandlersRegistered) {
140
+ return;
141
+ }
142
+ const shutdown = async () => {
143
+ if (signalShutdownPromise) {
144
+ await signalShutdownPromise;
145
+ return;
146
+ }
147
+ signalShutdownPromise = (async () => {
148
+ const current = activeSignalShutdownContext;
149
+ if (!current) {
150
+ process.exit(0);
151
+ }
152
+ try {
153
+ await current?.beforeShutdown?.();
154
+ }
155
+ catch (err) {
156
+ logger.warn(`[eliza] Pre-shutdown cleanup error: ${formatError(err)}`);
157
+ }
158
+ try {
159
+ const sandboxManager = current?.getSandboxManager();
160
+ if (sandboxManager) {
161
+ try {
162
+ await sandboxManager.stop();
163
+ logger.info("[eliza] Sandbox manager stopped");
164
+ }
165
+ catch (err) {
166
+ logger.warn(`[eliza] Sandbox stop error: ${err instanceof Error ? err.message : String(err)}`);
167
+ }
168
+ }
169
+ }
170
+ catch (err) {
171
+ logger.warn(`[eliza] Sandbox shutdown error: ${formatError(err)}`);
172
+ }
173
+ try {
174
+ const runtime = current?.getRuntime();
175
+ if (runtime) {
176
+ await shutdownRuntime(runtime, "signal shutdown");
177
+ }
178
+ }
179
+ catch (err) {
180
+ logger.warn(`[eliza] Error during shutdown: ${formatError(err)}`);
181
+ }
182
+ process.exit(0);
183
+ })();
184
+ await signalShutdownPromise;
185
+ };
186
+ process.on("SIGINT", () => void shutdown());
187
+ process.on("SIGTERM", () => void shutdown());
188
+ signalHandlersRegistered = true;
189
+ }
190
+ /**
191
+ * Map of baseline bundled @elizaos plugin names to their statically imported
192
+ * modules.
193
+ *
194
+ * Post-release plugins are intentionally excluded so the packaged runtime can
195
+ * ship a smaller baseline bundle. Those plugins fall through to dynamic
196
+ * import() and can be installed later via the plugin installer.
197
+ */
198
+ // Populate the shared STATIC_ELIZA_PLUGINS registry (defined in plugin-types.ts)
199
+ // so plugin-resolver.ts can read it without importing this module directly.
200
+ Object.assign(STATIC_ELIZA_PLUGINS, {
201
+ "@elizaos/plugin-sql": pluginSql,
202
+ "@elizaos/plugin-local-embedding": pluginLocalEmbedding,
203
+ // secrets-manager: now built-in core capability (ENABLE_SECRETS_MANAGER)
204
+ ...(pluginAgentOrchestrator
205
+ ? { "agent-orchestrator": pluginAgentOrchestrator }
206
+ : {}),
207
+ ...(pluginCron ? { "@elizaos/plugin-cron": pluginCron } : {}),
208
+ ...(pluginShell ? { "@elizaos/plugin-shell": pluginShell } : {}),
209
+ // plugin-manager: now built-in core capability (ENABLE_PLUGIN_MANAGER)
210
+ "@elizaos/plugin-agent-skills": pluginAgentSkills,
211
+ ...(pluginCommands ? { "@elizaos/plugin-commands": pluginCommands } : {}),
212
+ "@elizaos/plugin-pdf": pluginPdf,
213
+ ...(pluginOpenai ? { "@elizaos/plugin-openai": pluginOpenai } : {}),
214
+ "@elizaos/plugin-anthropic": pluginAnthropic,
215
+ ...(pluginOllama ? { "@elizaos/plugin-ollama": pluginOllama } : {}),
216
+ ...(pluginElizacloud
217
+ ? { "@elizaos/plugin-elizacloud": pluginElizacloud }
218
+ : {}),
219
+ // trust: now built-in core capability (ENABLE_TRUST)
220
+ "@elizaos/app-lifeops": pluginAppLifeops,
221
+ "@elizaos/app-companion": pluginAppCompanion,
222
+ "@elizaos/plugin-discord-local": discordLocalPlugin,
223
+ // personality: now built-in advanced capability (advancedCapabilities: true)
224
+ });
225
+ // NODE_PATH so dynamic plugin imports (e.g. @elizaos/plugin-*) resolve.
226
+ // WHY: When eliza is loaded from dist/ or by a test runner, Node's resolution does not
227
+ // search repo root node_modules; import("@elizaos/plugin-*") then fails. We prepend
228
+ // repo root node_modules only if not already in NODE_PATH (run-node.mjs may have set it)
229
+ // to avoid duplicate entries; _initPaths() makes Node re-read NODE_PATH. See docs/plugin-resolution-and-node-path.md.
230
+ // We walk up from this file to find node_modules — we do not assume a fixed depth
231
+ // (e.g. two levels for src/runtime/ or dist/runtime/) so we still work if build
232
+ // output structure changes (e.g. flat dist). First directory with node_modules wins.
233
+ const _elizaDir = path.dirname(fileURLToPath(import.meta.url));
234
+ let _dir = _elizaDir;
235
+ let _rootModules = null;
236
+ while (_dir !== path.dirname(_dir)) {
237
+ const candidate = path.join(_dir, "node_modules");
238
+ if (existsSync(candidate)) {
239
+ _rootModules = candidate;
240
+ break;
241
+ }
242
+ _dir = path.dirname(_dir);
243
+ }
244
+ if (_rootModules) {
245
+ const prev = process.env.NODE_PATH ?? "";
246
+ const entries = prev ? prev.split(path.delimiter) : [];
247
+ const normalizedRoot = path.resolve(_rootModules);
248
+ if (!entries.some((e) => path.resolve(e) === normalizedRoot)) {
249
+ process.env.NODE_PATH = prev
250
+ ? `${_rootModules}${path.delimiter}${prev}`
251
+ : _rootModules;
252
+ createRequire(import.meta.url)("node:module").Module._initPaths();
253
+ }
254
+ }
255
+ export function configureLocalEmbeddingPlugin(_plugin, config) {
256
+ const detectedPreset = detectEmbeddingPreset();
257
+ const SQL_COMPATIBLE_EMBEDDING_DIMENSIONS = new Set([
258
+ 384, 512, 768, 1024, 1536, 3072,
259
+ ]);
260
+ const normalizeEmbeddingDimensions = (rawValue) => {
261
+ if (!rawValue)
262
+ return undefined;
263
+ const parsed = Number.parseInt(rawValue, 10);
264
+ if (!Number.isInteger(parsed) || parsed <= 0)
265
+ return undefined;
266
+ return SQL_COMPATIBLE_EMBEDDING_DIMENSIONS.has(parsed)
267
+ ? String(parsed)
268
+ : "384";
269
+ };
270
+ const embeddingConfig = config?.embedding;
271
+ const configuredModel = embeddingConfig?.model?.trim();
272
+ const configuredRepo = embeddingConfig?.modelRepo?.trim();
273
+ const configuredDimensions = normalizeEmbeddingDimensions(typeof embeddingConfig?.dimensions === "number" &&
274
+ Number.isInteger(embeddingConfig.dimensions) &&
275
+ embeddingConfig.dimensions > 0
276
+ ? String(embeddingConfig.dimensions)
277
+ : undefined);
278
+ const detectedDimensions = normalizeEmbeddingDimensions(String(detectedPreset.dimensions));
279
+ const configuredContextSize = typeof embeddingConfig?.contextSize === "number" &&
280
+ Number.isInteger(embeddingConfig.contextSize) &&
281
+ embeddingConfig.contextSize > 0
282
+ ? String(embeddingConfig.contextSize)
283
+ : undefined;
284
+ const configuredGpuLayers = (() => {
285
+ const value = embeddingConfig?.gpuLayers;
286
+ if (typeof value === "number" && Number.isInteger(value) && value >= 0) {
287
+ return String(value);
288
+ }
289
+ if (value === "auto" || value === "max") {
290
+ // plugin-local-embedding understands "auto" and treats it as runtime max
291
+ return "auto";
292
+ }
293
+ return undefined;
294
+ })();
295
+ const setEnvIfMissing = (key, value) => {
296
+ if (!value || process.env[key])
297
+ return;
298
+ process.env[key] = value;
299
+ };
300
+ const setEnvFromConfig = (key, value) => {
301
+ if (!value)
302
+ return;
303
+ process.env[key] = value;
304
+ };
305
+ // Keep plugin-local-embedding aligned with Eliza's hardware-adaptive preset
306
+ // selection. Hard-coding the standard preset here forces slower first-run
307
+ // downloads on Windows and low-spec machines.
308
+ setEnvIfMissing("LOCAL_EMBEDDING_MODEL", configuredModel || detectedPreset.model);
309
+ if (configuredRepo) {
310
+ setEnvFromConfig("LOCAL_EMBEDDING_MODEL_REPO", configuredRepo);
311
+ }
312
+ else if (!configuredModel) {
313
+ setEnvIfMissing("LOCAL_EMBEDDING_MODEL_REPO", detectedPreset.modelRepo);
314
+ }
315
+ if (configuredDimensions) {
316
+ setEnvFromConfig("LOCAL_EMBEDDING_DIMENSIONS", configuredDimensions);
317
+ }
318
+ else if (!configuredModel) {
319
+ setEnvIfMissing("LOCAL_EMBEDDING_DIMENSIONS", detectedDimensions);
320
+ }
321
+ if (configuredContextSize) {
322
+ setEnvFromConfig("LOCAL_EMBEDDING_CONTEXT_SIZE", configuredContextSize);
323
+ }
324
+ else if (!configuredModel) {
325
+ setEnvIfMissing("LOCAL_EMBEDDING_CONTEXT_SIZE", String(detectedPreset.contextSize));
326
+ }
327
+ if (configuredGpuLayers) {
328
+ process.env.LOCAL_EMBEDDING_GPU_LAYERS = configuredGpuLayers;
329
+ }
330
+ else if (!process.env.LOCAL_EMBEDDING_GPU_LAYERS) {
331
+ process.env.LOCAL_EMBEDDING_GPU_LAYERS = String(detectedPreset.gpuLayers);
332
+ }
333
+ // Performance tuning
334
+ // Disable mmap on Metal to prevent "different text" errors with some models
335
+ setEnvIfMissing("LOCAL_EMBEDDING_USE_MMAP", detectedPreset.gpuLayers === "auto" ? "false" : "true");
336
+ // Set default models directory if not present
337
+ setEnvIfMissing("MODELS_DIR", path.join(os.homedir(), ".eliza", "models"));
338
+ // Normalize Google AI API key aliases — the elizaOS plugin and @google/genai
339
+ // SDK expect different env var names. Canonicalize to the long form that
340
+ // @elizaos/plugin-google-genai reads via runtime.getSetting(). Users can set
341
+ // any of: GEMINI_API_KEY, GOOGLE_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY.
342
+ setEnvIfMissing("GOOGLE_GENERATIVE_AI_API_KEY", process.env.GEMINI_API_KEY || process.env.GOOGLE_API_KEY);
343
+ // Default Google model names — the Google GenAI plugin's getSetting() returns
344
+ // null (not undefined) for missing keys, but the plugin checks !== undefined
345
+ // causing String(null) = "null" to be sent as the model name. Set sensible
346
+ // defaults so the plugin always has valid model names.
347
+ setEnvIfMissing("GOOGLE_SMALL_MODEL", "gemini-3-flash-preview");
348
+ setEnvIfMissing("GOOGLE_LARGE_MODEL", "gemini-3.1-pro-preview");
349
+ // Default Groq model names — plugin-groq still ships a deprecated large-model
350
+ // fallback. Seed runtime defaults before plugin init so direct Groq provider
351
+ // sessions do not inherit the retired qwen-qwq-32b default.
352
+ const currentSharedSmallModel = process.env.OPENAI_SMALL_MODEL ?? process.env.SMALL_MODEL;
353
+ const currentSharedLargeModel = process.env.OPENAI_LARGE_MODEL ?? process.env.LARGE_MODEL;
354
+ setEnvIfMissing("GROQ_SMALL_MODEL", currentSharedSmallModel && !isLikelyOpenAiTextModel(currentSharedSmallModel)
355
+ ? currentSharedSmallModel
356
+ : "llama-3.1-8b-instant");
357
+ setEnvIfMissing("GROQ_LARGE_MODEL", currentSharedLargeModel && !isLikelyOpenAiTextModel(currentSharedLargeModel)
358
+ ? currentSharedLargeModel
359
+ : "qwen/qwen3-32b");
360
+ logger.info(`[eliza] Configured local embedding env: ${process.env.LOCAL_EMBEDDING_MODEL} (repo: ${process.env.LOCAL_EMBEDDING_MODEL_REPO ?? "auto"}, dims: ${process.env.LOCAL_EMBEDDING_DIMENSIONS ?? "auto"}, ctx: ${process.env.LOCAL_EMBEDDING_CONTEXT_SIZE ?? "auto"}, GPU: ${process.env.LOCAL_EMBEDDING_GPU_LAYERS}, mmap: ${process.env.LOCAL_EMBEDDING_USE_MMAP})`);
361
+ }
362
+ // ---------------------------------------------------------------------------
363
+ // Helpers
364
+ // ---------------------------------------------------------------------------
365
+ /** Extract a human-readable error message from an unknown thrown value. */
366
+ function formatError(err) {
367
+ return err instanceof Error ? err.message : String(err);
368
+ }
369
+ function trimEnvString(value) {
370
+ if (typeof value !== "string")
371
+ return undefined;
372
+ const trimmed = value.trim();
373
+ return trimmed.length > 0 ? trimmed : undefined;
374
+ }
375
+ function getMutableConfigEnv(config) {
376
+ if (!config.env ||
377
+ typeof config.env !== "object" ||
378
+ Array.isArray(config.env)) {
379
+ return null;
380
+ }
381
+ return config.env;
382
+ }
383
+ function getMutableConfigEnvVars(configEnv) {
384
+ if (!configEnv.vars ||
385
+ typeof configEnv.vars !== "object" ||
386
+ Array.isArray(configEnv.vars)) {
387
+ return null;
388
+ }
389
+ return configEnv.vars;
390
+ }
391
+ function readConfigEnvValue(config, key) {
392
+ const configEnv = getMutableConfigEnv(config);
393
+ if (!configEnv)
394
+ return undefined;
395
+ const vars = getMutableConfigEnvVars(configEnv);
396
+ return trimEnvString(vars?.[key]) ?? trimEnvString(configEnv[key]);
397
+ }
398
+ function readEffectiveEnvValue(config, key, env = process.env) {
399
+ return trimEnvString(env[key]) ?? readConfigEnvValue(config, key);
400
+ }
401
+ function setConfigEnvValue(config, key, value) {
402
+ if (!config.env ||
403
+ typeof config.env !== "object" ||
404
+ Array.isArray(config.env)) {
405
+ config.env = {};
406
+ }
407
+ const configEnv = config.env;
408
+ const vars = getMutableConfigEnvVars(configEnv);
409
+ if (vars) {
410
+ vars[key] = value;
411
+ delete configEnv[key];
412
+ return;
413
+ }
414
+ configEnv[key] = value;
415
+ }
416
+ function deleteConfigEnvValue(config, key) {
417
+ const configEnv = getMutableConfigEnv(config);
418
+ if (!configEnv)
419
+ return;
420
+ const vars = getMutableConfigEnvVars(configEnv);
421
+ if (vars) {
422
+ delete vars[key];
423
+ if (Object.keys(vars).length === 0) {
424
+ delete configEnv.vars;
425
+ }
426
+ }
427
+ delete configEnv[key];
428
+ }
429
+ function detectOpenAiBaseUrlProvider(baseUrl) {
430
+ try {
431
+ const hostname = new URL(baseUrl).hostname.trim().toLowerCase();
432
+ if (hostname === "api.groq.com" || hostname.endsWith(".groq.com")) {
433
+ return "groq";
434
+ }
435
+ }
436
+ catch {
437
+ return null;
438
+ }
439
+ return null;
440
+ }
441
+ function looksLikeGroqApiKey(value) {
442
+ return Boolean(value && /^gsk[-_]/i.test(value));
443
+ }
444
+ function isLikelyOpenAiTextModel(value) {
445
+ if (!value)
446
+ return false;
447
+ const normalized = value.trim().toLowerCase();
448
+ return normalized.startsWith("gpt-") || normalized.startsWith("openai/");
449
+ }
450
+ /**
451
+ * Normalize known-bad provider compatibility shims before plugin resolution.
452
+ *
453
+ * A common failure mode is routing the OpenAI plugin through Groq's
454
+ * OpenAI-compatible base URL while leaving OpenAI defaults (`gpt-5.4`,
455
+ * `gpt-5.4-mini`) in place. Structured XML/object generation then fails during
456
+ * message handling because Groq does not serve those model IDs.
457
+ *
458
+ * When we can confidently detect that state, rewrite the effective runtime
459
+ * config to use the Groq plugin directly.
460
+ */
461
+ /** @internal Exported for testing. */
462
+ export function normalizeOpenAiCompatibleProviderConfig(config, env = process.env) {
463
+ const cloudInferenceEnabled = resolveElizaCloudTopology(config).services.inference;
464
+ if (cloudInferenceEnabled) {
465
+ return false;
466
+ }
467
+ const openaiBaseUrl = readEffectiveEnvValue(config, "OPENAI_BASE_URL", env);
468
+ if (!openaiBaseUrl) {
469
+ return false;
470
+ }
471
+ if (detectOpenAiBaseUrlProvider(openaiBaseUrl) !== "groq") {
472
+ return false;
473
+ }
474
+ const openaiApiKey = readEffectiveEnvValue(config, "OPENAI_API_KEY", env);
475
+ const groqApiKey = readEffectiveEnvValue(config, "GROQ_API_KEY", env);
476
+ const inheritedGroqApiKey = groqApiKey ??
477
+ (looksLikeGroqApiKey(openaiApiKey) ? openaiApiKey : undefined);
478
+ if (!inheritedGroqApiKey) {
479
+ return false;
480
+ }
481
+ const currentGroqSmallModel = readEffectiveEnvValue(config, "GROQ_SMALL_MODEL", env);
482
+ const currentGroqLargeModel = readEffectiveEnvValue(config, "GROQ_LARGE_MODEL", env);
483
+ const currentSharedSmallModel = readEffectiveEnvValue(config, "OPENAI_SMALL_MODEL", env) ??
484
+ readEffectiveEnvValue(config, "SMALL_MODEL", env);
485
+ const currentSharedLargeModel = readEffectiveEnvValue(config, "OPENAI_LARGE_MODEL", env) ??
486
+ readEffectiveEnvValue(config, "LARGE_MODEL", env);
487
+ const normalizedGroqSmallModel = currentGroqSmallModel ??
488
+ (currentSharedSmallModel &&
489
+ !isLikelyOpenAiTextModel(currentSharedSmallModel)
490
+ ? currentSharedSmallModel
491
+ : "llama-3.1-8b-instant");
492
+ const normalizedGroqLargeModel = currentGroqLargeModel ??
493
+ (currentSharedLargeModel &&
494
+ !isLikelyOpenAiTextModel(currentSharedLargeModel)
495
+ ? currentSharedLargeModel
496
+ : "qwen/qwen3-32b");
497
+ env.GROQ_API_KEY = inheritedGroqApiKey;
498
+ env.GROQ_SMALL_MODEL = normalizedGroqSmallModel;
499
+ env.GROQ_LARGE_MODEL = normalizedGroqLargeModel;
500
+ setConfigEnvValue(config, "GROQ_API_KEY", inheritedGroqApiKey);
501
+ setConfigEnvValue(config, "GROQ_SMALL_MODEL", normalizedGroqSmallModel);
502
+ setConfigEnvValue(config, "GROQ_LARGE_MODEL", normalizedGroqLargeModel);
503
+ delete env.OPENAI_BASE_URL;
504
+ deleteConfigEnvValue(config, "OPENAI_BASE_URL");
505
+ const shouldDisableOpenAiKey = !openaiApiKey ||
506
+ openaiApiKey === groqApiKey ||
507
+ looksLikeGroqApiKey(openaiApiKey);
508
+ if (shouldDisableOpenAiKey) {
509
+ delete env.OPENAI_API_KEY;
510
+ deleteConfigEnvValue(config, "OPENAI_API_KEY");
511
+ }
512
+ const primaryModel = trimEnvString(config.agents?.defaults?.model?.primary);
513
+ if (shouldDisableOpenAiKey &&
514
+ primaryModel &&
515
+ (primaryModel.toLowerCase() === "openai" ||
516
+ isLikelyOpenAiTextModel(primaryModel))) {
517
+ config.agents ??= {};
518
+ config.agents.defaults ??= {};
519
+ config.agents.defaults.model = {
520
+ ...config.agents.defaults.model,
521
+ primary: "groq",
522
+ };
523
+ }
524
+ logger.warn("[eliza] Detected Groq routed through OPENAI_BASE_URL; normalizing runtime settings to use @elizaos/plugin-groq");
525
+ return true;
526
+ }
527
+ /** Redact username segments from filesystem paths to avoid leaking user info in logs. */
528
+ function _redactUserSegments(filepath) {
529
+ // Replace /Users/<name>/ or /home/<name>/ with /Users/<redacted>/ etc.
530
+ return filepath.replace(/\/(Users|home)\/[^/]+\//g, "/$1/<redacted>/");
531
+ }
532
+ /**
533
+ * Best-effort runtime shutdown that also closes the database adapter.
534
+ *
535
+ * AgentRuntime.stop() only stops services. plugin-sql keeps a process-global
536
+ * PGlite manager, so restarts must close the adapter or the next runtime can
537
+ * silently reuse the same broken manager instance.
538
+ */
539
+ export async function shutdownRuntime(runtime, context) {
540
+ if (!runtime)
541
+ return;
542
+ const adapter = runtime.adapter;
543
+ let firstError = null;
544
+ try {
545
+ await runtime.stop();
546
+ }
547
+ catch (err) {
548
+ firstError = err;
549
+ logger.warn(`[eliza] ${context}: runtime stop failed: ${formatError(err)}`);
550
+ }
551
+ if (adapter && typeof adapter.close === "function") {
552
+ try {
553
+ await adapter.close();
554
+ }
555
+ catch (err) {
556
+ if (!firstError) {
557
+ firstError = err;
558
+ }
559
+ logger.warn(`[eliza] ${context}: database adapter close failed: ${formatError(err)}`);
560
+ }
561
+ }
562
+ if (firstError) {
563
+ throw firstError;
564
+ }
565
+ }
566
+ /**
567
+ * Remove duplicate actions across an ordered list of plugins.
568
+ *
569
+ * When multiple plugins define an action with the same `name`, only the first
570
+ * occurrence is kept. This prevents "Action already registered" warnings from
571
+ * elizaOS core. The function mutates each plugin's `actions` array in-place.
572
+ */
573
+ export function deduplicatePluginActions(plugins) {
574
+ const seen = new Set();
575
+ for (const plugin of plugins) {
576
+ if (plugin.actions) {
577
+ plugin.actions = plugin.actions.filter((action) => {
578
+ if (seen.has(action.name)) {
579
+ logger.debug(`[eliza] Skipping duplicate action "${action.name}" from plugin "${plugin.name}"`);
580
+ return false;
581
+ }
582
+ seen.add(action.name);
583
+ return true;
584
+ });
585
+ }
586
+ }
587
+ }
588
+ async function waitForTrajectoriesService(runtime, context, timeoutMs = 3000) {
589
+ if (!runtimeTrajectoriesEnabled(runtime)) {
590
+ return;
591
+ }
592
+ const runtimeLike = runtime;
593
+ // Check if already available
594
+ if (typeof runtimeLike.getService === "function") {
595
+ const existing = runtimeLike.getService("trajectories");
596
+ if (existing)
597
+ return;
598
+ }
599
+ const registrationStatus = typeof runtimeLike.getServiceRegistrationStatus === "function"
600
+ ? runtimeLike.getServiceRegistrationStatus("trajectories")
601
+ : "unknown";
602
+ if (registrationStatus !== "pending" &&
603
+ registrationStatus !== "registering") {
604
+ return;
605
+ }
606
+ if (typeof runtimeLike.getServiceLoadPromise !== "function")
607
+ return;
608
+ let timedOut = false;
609
+ let timeoutHandle;
610
+ const timeoutPromise = new Promise((resolve) => {
611
+ timeoutHandle = setTimeout(() => {
612
+ timedOut = true;
613
+ resolve();
614
+ }, timeoutMs);
615
+ });
616
+ try {
617
+ await Promise.race([
618
+ runtimeLike.getServiceLoadPromise("trajectories").then(() => { }),
619
+ timeoutPromise,
620
+ ]);
621
+ if (timedOut) {
622
+ logger.debug(`[eliza] trajectories still ${registrationStatus} after ${timeoutMs}ms (${context})`);
623
+ }
624
+ }
625
+ catch (err) {
626
+ logger.debug(`[eliza] trajectories registration failed while waiting (${context}): ${formatError(err)}`);
627
+ }
628
+ finally {
629
+ if (timeoutHandle)
630
+ clearTimeout(timeoutHandle);
631
+ }
632
+ }
633
+ function ensureTrajectoryLoggerEnabled(runtime, context) {
634
+ if (!runtimeTrajectoriesEnabled(runtime)) {
635
+ logger.info(`[eliza] Native trajectories disabled (${context})`);
636
+ return;
637
+ }
638
+ const trajectoryLogger = runtime.getService("trajectories");
639
+ if (!trajectoryLogger) {
640
+ logger.warn(`[eliza] trajectories service unavailable (${context}); trajectory capture disabled`);
641
+ return;
642
+ }
643
+ const isEnabled = typeof trajectoryLogger.isEnabled === "function"
644
+ ? trajectoryLogger.isEnabled()
645
+ : shouldEnableTrajectoryLoggingByDefault();
646
+ const shouldEnable = shouldEnableTrajectoryLoggingByDefault();
647
+ if (isEnabled !== shouldEnable &&
648
+ typeof trajectoryLogger.setEnabled === "function") {
649
+ trajectoryLogger.setEnabled(shouldEnable);
650
+ logger.info(`[eliza] trajectories defaulted ${shouldEnable ? "on" : "off"} (${context})`);
651
+ }
652
+ }
653
+ async function installPromptOptimizationLayer(runtime, context) {
654
+ try {
655
+ const { installPromptOptimizations } = await import("./prompt-optimization.js");
656
+ installPromptOptimizations(runtime);
657
+ }
658
+ catch (err) {
659
+ logger.warn(`[eliza] Failed to install prompt optimizations (${context}): ${err instanceof Error ? err.message : err}`);
660
+ }
661
+ }
662
+ async function prepareRuntimeForTrajectoryCapture(runtime, context) {
663
+ await waitForTrajectoriesService(runtime, context);
664
+ ensureTrajectoryLoggerEnabled(runtime, context);
665
+ await installPromptOptimizationLayer(runtime, context);
666
+ }
667
+ // ---------------------------------------------------------------------------
668
+ // Channel secret mapping
669
+ // ---------------------------------------------------------------------------
670
+ /**
671
+ * Maps Eliza channel config fields to the environment variable names
672
+ * that elizaOS plugins expect.
673
+ *
674
+ * Eliza stores channel credentials under `config.channels.<name>.<field>`,
675
+ * while elizaOS plugins read them from process.env.
676
+ */
677
+ const CHANNEL_ENV_MAP = CONNECTOR_ENV_MAP;
678
+ // ---------------------------------------------------------------------------
679
+ // Plugin resolution
680
+ // ---------------------------------------------------------------------------
681
+ export { CORE_PLUGINS, OPTIONAL_CORE_PLUGINS };
682
+ /**
683
+ * Optional plugins that require native binaries or specific config.
684
+ * These are only loaded when explicitly enabled via features config,
685
+ * NOT by default — they crash if their prerequisites are missing.
686
+ */
687
+ const _OPTIONAL_NATIVE_PLUGINS = [
688
+ "@elizaos/plugin-browser", // requires browser server binary
689
+ "@elizaos/plugin-vision", // requires @tensorflow/tfjs-node native addon
690
+ "@elizaos/plugin-computeruse", // requires platform-specific binaries
691
+ ];
692
+ // CHANNEL_PLUGIN_MAP, PROVIDER_PLUGIN_MAP, and OPTIONAL_PLUGIN_MAP live in
693
+ // ./plugin-collector.ts and are re-exported from this module for backward compatibility.
694
+ // ---------------------------------------------------------------------------
695
+ // Custom / drop-in plugin discovery (moved to plugin-types.ts)
696
+ // ---------------------------------------------------------------------------
697
+ // ---------------------------------------------------------------------------
698
+ // Plugin resolution
699
+ // ---------------------------------------------------------------------------
700
+ // ---------------------------------------------------------------------------
701
+ // Browser server pre-flight
702
+ // ---------------------------------------------------------------------------
703
+ /**
704
+ * Returns true if the given env var key is safe to forward to runtime.settings.
705
+ * Blocks blockchain private keys, secrets, passwords, tokens, credentials,
706
+ * mnemonics, and seed phrases while allowing API keys that plugins need.
707
+ */
708
+ export function isEnvKeyAllowedForForwarding(key) {
709
+ const upper = key.toUpperCase();
710
+ if (upper === "ALLOW_NO_DATABASE")
711
+ return false;
712
+ // Block blockchain private keys
713
+ if (upper.includes("PRIVATE_KEY"))
714
+ return false;
715
+ if (upper.startsWith("EVM_") || upper.startsWith("SOLANA_"))
716
+ return false;
717
+ // Block secrets, passwords, tokens, and seed phrases (but not API_KEY which plugins need)
718
+ if (/(SECRET|PASSWORD|CREDENTIAL|MNEMONIC|SEED_PHRASE)/i.test(key))
719
+ return false;
720
+ if (/(ACCESS_TOKEN|REFRESH_TOKEN|SESSION_TOKEN|AUTH_TOKEN)$/i.test(key))
721
+ return false;
722
+ // Block elizaCloud connection keys — these must only come from config.cloud
723
+ // via applyCloudConfigToEnv(). Forwarding them from config.env.vars into
724
+ // runtime.settings would let a stale env-var shadow the live cloud key that
725
+ // the app sets when the user connects through the UI.
726
+ if (upper === "ELIZAOS_CLOUD_API_KEY" ||
727
+ upper === "ELIZAOS_CLOUD_ENABLED" ||
728
+ upper === "ELIZAOS_CLOUD_BASE_URL" ||
729
+ upper === "ELIZAOS_CLOUD_NANO_MODEL" ||
730
+ upper === "ELIZAOS_CLOUD_MEDIUM_MODEL" ||
731
+ upper === "ELIZAOS_CLOUD_SMALL_MODEL" ||
732
+ upper === "ELIZAOS_CLOUD_LARGE_MODEL" ||
733
+ upper === "ELIZAOS_CLOUD_MEGA_MODEL" ||
734
+ upper === "ELIZAOS_CLOUD_RESPONSE_HANDLER_MODEL" ||
735
+ upper === "ELIZAOS_CLOUD_SHOULD_RESPOND_MODEL" ||
736
+ upper === "ELIZAOS_CLOUD_ACTION_PLANNER_MODEL" ||
737
+ upper === "ELIZAOS_CLOUD_PLANNER_MODEL")
738
+ return false;
739
+ return true;
740
+ }
741
+ function assertPersistentDatabaseRequired(runtime) {
742
+ const raw = runtime.getSetting("ALLOW_NO_DATABASE") ?? process.env.ALLOW_NO_DATABASE;
743
+ const normalized = String(raw ?? "")
744
+ .trim()
745
+ .toLowerCase();
746
+ if (normalized === "true" ||
747
+ normalized === "1" ||
748
+ normalized === "yes" ||
749
+ normalized === "on") {
750
+ throw new Error(`Eliza requires persistent database storage and does not permit ALLOW_NO_DATABASE (agent ${runtime.agentId}). Remove ALLOW_NO_DATABASE from config/env and use @elizaos/plugin-sql.`);
751
+ }
752
+ }
753
+ function isElizaCloudManagedProcessEnvKey(key) {
754
+ const upper = key.toUpperCase();
755
+ return (upper === "ELIZAOS_CLOUD_API_KEY" ||
756
+ upper === "ELIZAOS_CLOUD_ENABLED" ||
757
+ upper === "ELIZAOS_CLOUD_BASE_URL" ||
758
+ upper === "ELIZAOS_CLOUD_NANO_MODEL" ||
759
+ upper === "ELIZAOS_CLOUD_MEDIUM_MODEL" ||
760
+ upper === "ELIZAOS_CLOUD_SMALL_MODEL" ||
761
+ upper === "ELIZAOS_CLOUD_LARGE_MODEL" ||
762
+ upper === "ELIZAOS_CLOUD_MEGA_MODEL" ||
763
+ upper === "ELIZAOS_CLOUD_RESPONSE_HANDLER_MODEL" ||
764
+ upper === "ELIZAOS_CLOUD_SHOULD_RESPOND_MODEL" ||
765
+ upper === "ELIZAOS_CLOUD_ACTION_PLANNER_MODEL" ||
766
+ upper === "ELIZAOS_CLOUD_PLANNER_MODEL");
767
+ }
768
+ // findPluginBrowserStagehandDir, ensureBrowserServerLink,
769
+ // repairBrokenInstallRecord, resolvePackageEntry — moved to plugin-types.ts
770
+ // ---------------------------------------------------------------------------
771
+ // Config → Character mapping
772
+ // ---------------------------------------------------------------------------
773
+ /**
774
+ * Propagate channel credentials from Eliza config into process.env so
775
+ * that elizaOS plugins can find them.
776
+ */
777
+ /** @internal Exported for testing. */
778
+ export function applyConnectorSecretsToEnv(config) {
779
+ // Prefer config.connectors, fall back to config.channels for backward compatibility
780
+ const connectors = config.connectors ?? config.channels ?? {};
781
+ for (const [channelName, channelConfig] of Object.entries(connectors)) {
782
+ if (!channelConfig || typeof channelConfig !== "object")
783
+ continue;
784
+ const configObj = channelConfig;
785
+ // Discord plugins in the ecosystem use both DISCORD_API_TOKEN and
786
+ // DISCORD_BOT_TOKEN across versions. Mirror to both when available.
787
+ if (channelName === "discord") {
788
+ const tokenValue = (typeof configObj.token === "string" && configObj.token.trim()) ||
789
+ (typeof configObj.botToken === "string" && configObj.botToken.trim()) ||
790
+ "";
791
+ if (tokenValue) {
792
+ process.env.DISCORD_API_TOKEN = tokenValue;
793
+ process.env.DISCORD_BOT_TOKEN = tokenValue;
794
+ }
795
+ }
796
+ const envMap = CHANNEL_ENV_MAP[channelName];
797
+ if (!envMap)
798
+ continue;
799
+ for (const [configField, envKey] of Object.entries(envMap)) {
800
+ const value = configObj[configField];
801
+ if (typeof value === "boolean" || typeof value === "number") {
802
+ process.env[envKey] = String(value);
803
+ }
804
+ else if (typeof value === "string" && value.trim()) {
805
+ process.env[envKey] = value;
806
+ }
807
+ }
808
+ if (channelName === "whatsapp") {
809
+ const allowFrom = configObj.allowFrom;
810
+ if (Array.isArray(allowFrom) && allowFrom.length > 0) {
811
+ const normalized = allowFrom
812
+ .map((value) => String(value).trim())
813
+ .filter(Boolean);
814
+ if (normalized.length > 0) {
815
+ process.env.WHATSAPP_ALLOW_FROM = normalized.join(",");
816
+ }
817
+ }
818
+ const groupAllowFrom = configObj.groupAllowFrom;
819
+ if (Array.isArray(groupAllowFrom) && groupAllowFrom.length > 0) {
820
+ const normalized = groupAllowFrom
821
+ .map((value) => String(value).trim())
822
+ .filter(Boolean);
823
+ if (normalized.length > 0) {
824
+ process.env.WHATSAPP_GROUP_ALLOW_FROM = normalized.join(",");
825
+ }
826
+ }
827
+ const accounts = configObj.accounts;
828
+ if (accounts &&
829
+ typeof accounts === "object" &&
830
+ !Array.isArray(accounts)) {
831
+ const firstEnabledAccount = Object.values(accounts).find((account) => {
832
+ if (!account ||
833
+ typeof account !== "object" ||
834
+ Array.isArray(account)) {
835
+ return false;
836
+ }
837
+ const candidate = account;
838
+ return (candidate.enabled !== false && typeof candidate.authDir === "string");
839
+ });
840
+ if (firstEnabledAccount &&
841
+ typeof firstEnabledAccount.authDir === "string" &&
842
+ firstEnabledAccount.authDir.trim()) {
843
+ process.env.WHATSAPP_AUTH_DIR = firstEnabledAccount.authDir.trim();
844
+ }
845
+ }
846
+ }
847
+ }
848
+ }
849
+ /**
850
+ * Auto-resolve Discord Application ID from the bot token via Discord API.
851
+ * Called during async runtime init so that users only need a bot token.
852
+ */
853
+ /** @internal Exported for testing. */
854
+ export async function autoResolveDiscordAppId() {
855
+ if (process.env.DISCORD_APPLICATION_ID)
856
+ return;
857
+ const discordToken = process.env.DISCORD_API_TOKEN || process.env.DISCORD_BOT_TOKEN;
858
+ if (!discordToken)
859
+ return;
860
+ try {
861
+ const res = await fetch("https://discord.com/api/v10/oauth2/applications/@me", { headers: { Authorization: `Bot ${discordToken}` } });
862
+ if (!res.ok) {
863
+ logger.warn(`[eliza] Failed to auto-resolve Discord Application ID: ${res.status}`);
864
+ return;
865
+ }
866
+ const app = (await res.json());
867
+ if (!app.id)
868
+ return;
869
+ process.env.DISCORD_APPLICATION_ID = app.id;
870
+ logger.info(`[eliza] Auto-resolved Discord Application ID: ${app.id}`);
871
+ }
872
+ catch (err) {
873
+ logger.warn(`[eliza] Could not auto-resolve Discord Application ID: ${err}`);
874
+ }
875
+ }
876
+ /**
877
+ * Fetch GitHub OAuth token from cloud if available and no local token is set.
878
+ * Called during async runtime init after cloud config is applied.
879
+ *
880
+ * Flow: If the agent has a managed GitHub connection in the cloud, and no
881
+ * local GITHUB_TOKEN is set, fetch the OAuth token from the cloud API and
882
+ * inject it into process.env so plugins (plugin-github, git-workspace-service)
883
+ * can use it for API calls and git credential helpers.
884
+ */
885
+ /** @internal Exported for testing. */
886
+ export async function autoFetchCloudGithubToken(agentId) {
887
+ // Skip if a local token is already configured
888
+ if (process.env.GITHUB_TOKEN || process.env.GITHUB_PAT)
889
+ return;
890
+ // Need cloud credentials and an agent ID
891
+ const cloudApiKey = process.env.ELIZAOS_CLOUD_API_KEY?.trim();
892
+ const cloudBaseUrl = process.env.ELIZAOS_CLOUD_BASE_URL?.trim() || "https://api.elizacloud.ai";
893
+ if (!cloudApiKey || !agentId)
894
+ return;
895
+ const managedNs = process.env.ELIZA_CLOUD_MANAGED_AGENTS_API_SEGMENT?.trim();
896
+ if (!managedNs)
897
+ return;
898
+ try {
899
+ const url = `${cloudBaseUrl}/api/v1/${managedNs}/agents/${encodeURIComponent(agentId)}/github/token`;
900
+ const res = await fetch(url, {
901
+ headers: {
902
+ Authorization: `Bearer ${cloudApiKey}`,
903
+ Accept: "application/json",
904
+ },
905
+ signal: AbortSignal.timeout(10_000),
906
+ });
907
+ if (!res.ok) {
908
+ // 404 = no GitHub connection for this agent, which is fine
909
+ if (res.status !== 404) {
910
+ logger.warn(`[eliza] Failed to fetch cloud GitHub token: ${res.status}`);
911
+ }
912
+ return;
913
+ }
914
+ const body = (await res.json());
915
+ if (!body.success || !body.data?.accessToken)
916
+ return;
917
+ process.env.GITHUB_TOKEN = body.data.accessToken;
918
+ logger.info(`[eliza] Fetched GitHub token from cloud for @${body.data.githubUsername || "unknown"}`);
919
+ }
920
+ catch (err) {
921
+ logger.warn(`[eliza] Could not fetch cloud GitHub token: ${err}`);
922
+ }
923
+ }
924
+ /**
925
+ * Propagate cloud config from Eliza config into process.env so the
926
+ * ElizaCloud plugin can discover settings at startup.
927
+ */
928
+ /** @internal Exported for testing. */
929
+ export function applyCloudConfigToEnv(config) {
930
+ migrateLegacyRuntimeConfig(config);
931
+ const cloud = config.cloud;
932
+ const isCloudContainer = process.env.ELIZA_CLOUD_PROVISIONED === "1";
933
+ if (!cloud && !isCloudContainer)
934
+ return;
935
+ const topology = resolveElizaCloudTopology(config);
936
+ // Cloud inference is selected from the canonical onboarding connection, not
937
+ // just from raw cloud flags. This keeps linked cloud auth from re-enabling
938
+ // Eliza Cloud after the user has switched to a local or remote provider.
939
+ const effectivelyEnabled = topology.services.inference || isCloudContainer;
940
+ const shouldLoadCloudPlugin = topology.shouldLoadPlugin || isCloudContainer;
941
+ const setCloudUsageEnv = (key, enabled) => {
942
+ if (enabled) {
943
+ process.env[key] = "true";
944
+ }
945
+ else {
946
+ delete process.env[key];
947
+ }
948
+ };
949
+ if (isElizaSettingsDebugEnabled()) {
950
+ const c = (cloud ?? {});
951
+ logger.debug(`[eliza][settings][runtime] applyCloudConfigToEnv inference=${effectivelyEnabled} shouldLoadPlugin=${shouldLoadCloudPlugin} isCloudContainer=${isCloudContainer} cloud=${JSON.stringify(settingsDebugCloudSummary(c))}`);
952
+ }
953
+ setCloudUsageEnv("ELIZAOS_CLOUD_USE_INFERENCE", effectivelyEnabled);
954
+ setCloudUsageEnv("ELIZAOS_CLOUD_USE_TTS", topology.services.tts || isCloudContainer);
955
+ setCloudUsageEnv("ELIZAOS_CLOUD_USE_MEDIA", topology.services.media);
956
+ setCloudUsageEnv("ELIZAOS_CLOUD_USE_EMBEDDINGS", topology.services.embeddings);
957
+ setCloudUsageEnv("ELIZAOS_CLOUD_USE_RPC", topology.services.rpc);
958
+ if (effectivelyEnabled) {
959
+ process.env.ELIZAOS_CLOUD_ENABLED = "true";
960
+ }
961
+ else {
962
+ delete process.env.ELIZAOS_CLOUD_ENABLED;
963
+ }
964
+ if (shouldLoadCloudPlugin) {
965
+ logger.info(`[eliza] Cloud config: inference=${topology.services.inference}, runtime=${topology.runtime}, hasApiKey=${Boolean(cloud?.apiKey || process.env.ELIZAOS_CLOUD_API_KEY)}, baseUrl=${cloud?.baseUrl ?? "(default)"}, isCloudContainer=${isCloudContainer}`);
966
+ // Only propagate the API key when cloud is enabled AND it is a real
967
+ // credential — never set the literal "[REDACTED]" placeholder (which can
968
+ // leak into the config via UI round-trips through the redacted GET → PUT
969
+ // cycle). WHY: when enabled is false (BYOK / disconnected), leaving the key
970
+ // in process.env still auto-loads @elizaos/plugin-elizacloud and steals
971
+ // TEXT_LARGE even if the JSON says cloud is off.
972
+ const isRealApiKey = cloud?.apiKey && cloud.apiKey.trim().toUpperCase() !== "[REDACTED]";
973
+ if (isRealApiKey) {
974
+ process.env.ELIZAOS_CLOUD_API_KEY = cloud.apiKey;
975
+ }
976
+ else if (!isCloudContainer) {
977
+ delete process.env.ELIZAOS_CLOUD_API_KEY;
978
+ }
979
+ if (cloud?.baseUrl) {
980
+ process.env.ELIZAOS_CLOUD_BASE_URL = cloud.baseUrl;
981
+ }
982
+ else if (!isCloudContainer) {
983
+ delete process.env.ELIZAOS_CLOUD_BASE_URL;
984
+ }
985
+ }
986
+ else {
987
+ delete process.env.ELIZAOS_CLOUD_NANO_MODEL;
988
+ delete process.env.ELIZAOS_CLOUD_MEDIUM_MODEL;
989
+ delete process.env.ELIZAOS_CLOUD_SMALL_MODEL;
990
+ delete process.env.ELIZAOS_CLOUD_LARGE_MODEL;
991
+ delete process.env.ELIZAOS_CLOUD_MEGA_MODEL;
992
+ delete process.env.ELIZAOS_CLOUD_RESPONSE_HANDLER_MODEL;
993
+ delete process.env.ELIZAOS_CLOUD_SHOULD_RESPOND_MODEL;
994
+ delete process.env.ELIZAOS_CLOUD_ACTION_PLANNER_MODEL;
995
+ delete process.env.ELIZAOS_CLOUD_PLANNER_MODEL;
996
+ delete process.env.ELIZAOS_CLOUD_API_KEY;
997
+ delete process.env.ELIZAOS_CLOUD_BASE_URL;
998
+ }
999
+ // Propagate model names so the cloud plugin picks them up. Falls back to
1000
+ // sensible defaults when cloud is enabled but no explicit selection exists.
1001
+ // Skip when inferenceMode is "byok"/"local" or services.inference is off —
1002
+ // user's own keys handle models.
1003
+ // If the user chose a subscription provider, treat that as "byok" unless
1004
+ // they explicitly set inferenceMode to "cloud".
1005
+ const llmText = resolveServiceRoutingInConfig(config)?.llmText;
1006
+ const models = config.models;
1007
+ if (effectivelyEnabled) {
1008
+ const nano = llmText?.nanoModel || models?.nano || "openai/gpt-5.4-nano";
1009
+ const small = llmText?.smallModel || models?.small || "minimax/minimax-m2.7";
1010
+ const medium = llmText?.mediumModel || models?.medium || small;
1011
+ const large = llmText?.largeModel || models?.large || "anthropic/claude-sonnet-4.6";
1012
+ const mega = llmText?.megaModel || models?.mega || large;
1013
+ const responseHandlerModel = llmText?.responseHandlerModel || llmText?.shouldRespondModel;
1014
+ const actionPlannerModel = llmText?.actionPlannerModel || llmText?.plannerModel;
1015
+ process.env.SMALL_MODEL = small;
1016
+ process.env.NANO_MODEL = nano;
1017
+ process.env.MEDIUM_MODEL = medium;
1018
+ process.env.LARGE_MODEL = large;
1019
+ process.env.MEGA_MODEL = mega;
1020
+ if (responseHandlerModel) {
1021
+ process.env.ELIZAOS_CLOUD_RESPONSE_HANDLER_MODEL = responseHandlerModel;
1022
+ process.env.ELIZAOS_CLOUD_SHOULD_RESPOND_MODEL = responseHandlerModel;
1023
+ }
1024
+ else {
1025
+ delete process.env.ELIZAOS_CLOUD_RESPONSE_HANDLER_MODEL;
1026
+ delete process.env.ELIZAOS_CLOUD_SHOULD_RESPOND_MODEL;
1027
+ }
1028
+ if (actionPlannerModel) {
1029
+ process.env.ELIZAOS_CLOUD_ACTION_PLANNER_MODEL = actionPlannerModel;
1030
+ process.env.ELIZAOS_CLOUD_PLANNER_MODEL = actionPlannerModel;
1031
+ }
1032
+ else {
1033
+ delete process.env.ELIZAOS_CLOUD_ACTION_PLANNER_MODEL;
1034
+ delete process.env.ELIZAOS_CLOUD_PLANNER_MODEL;
1035
+ }
1036
+ process.env.ELIZAOS_CLOUD_NANO_MODEL = nano;
1037
+ process.env.ELIZAOS_CLOUD_MEDIUM_MODEL = medium;
1038
+ process.env.ELIZAOS_CLOUD_SMALL_MODEL = small;
1039
+ process.env.ELIZAOS_CLOUD_LARGE_MODEL = large;
1040
+ process.env.ELIZAOS_CLOUD_MEGA_MODEL = mega;
1041
+ }
1042
+ else if (shouldLoadCloudPlugin) {
1043
+ // Cloud plugin may still be active for non-inference services; keep model
1044
+ // routing local by clearing the cloud model aliases.
1045
+ delete process.env.ELIZAOS_CLOUD_NANO_MODEL;
1046
+ delete process.env.ELIZAOS_CLOUD_MEDIUM_MODEL;
1047
+ delete process.env.ELIZAOS_CLOUD_SMALL_MODEL;
1048
+ delete process.env.ELIZAOS_CLOUD_LARGE_MODEL;
1049
+ delete process.env.ELIZAOS_CLOUD_MEGA_MODEL;
1050
+ delete process.env.ELIZAOS_CLOUD_RESPONSE_HANDLER_MODEL;
1051
+ delete process.env.ELIZAOS_CLOUD_SHOULD_RESPOND_MODEL;
1052
+ delete process.env.ELIZAOS_CLOUD_ACTION_PLANNER_MODEL;
1053
+ delete process.env.ELIZAOS_CLOUD_PLANNER_MODEL;
1054
+ delete process.env.NANO_MODEL;
1055
+ delete process.env.MEDIUM_MODEL;
1056
+ delete process.env.SMALL_MODEL;
1057
+ delete process.env.LARGE_MODEL;
1058
+ delete process.env.MEGA_MODEL;
1059
+ }
1060
+ // Propagate per-service disable flags so downstream code can check them
1061
+ // without needing direct access to the ElizaConfig object.
1062
+ if (!topology.services.tts) {
1063
+ process.env.ELIZA_CLOUD_TTS_DISABLED = "true";
1064
+ }
1065
+ else {
1066
+ delete process.env.ELIZA_CLOUD_TTS_DISABLED;
1067
+ }
1068
+ if (!topology.services.media) {
1069
+ process.env.ELIZA_CLOUD_MEDIA_DISABLED = "true";
1070
+ }
1071
+ else {
1072
+ delete process.env.ELIZA_CLOUD_MEDIA_DISABLED;
1073
+ }
1074
+ if (!topology.services.embeddings) {
1075
+ process.env.ELIZA_CLOUD_EMBEDDINGS_DISABLED = "true";
1076
+ }
1077
+ else {
1078
+ delete process.env.ELIZA_CLOUD_EMBEDDINGS_DISABLED;
1079
+ }
1080
+ if (!topology.services.rpc) {
1081
+ process.env.ELIZA_CLOUD_RPC_DISABLED = "true";
1082
+ }
1083
+ else {
1084
+ delete process.env.ELIZA_CLOUD_RPC_DISABLED;
1085
+ }
1086
+ }
1087
+ /**
1088
+ * Translate `config.database` into the environment variables that
1089
+ * `@elizaos/plugin-sql` reads at init time (`POSTGRES_URL`, `PGLITE_DATA_DIR`).
1090
+ *
1091
+ * When the provider is "postgres", we build a connection string from the
1092
+ * credentials (or use the explicit `connectionString` field) and set
1093
+ * `POSTGRES_URL`. When the provider is "pglite" (the default), we set
1094
+ * `PGLITE_DATA_DIR` to either the configured value or the resolved default
1095
+ * workspace (`<workspace>/.eliza/.elizadb`) and remove any stale
1096
+ * `POSTGRES_URL`.
1097
+ */
1098
+ /** @internal Exported for testing. */
1099
+ export function applyX402ConfigToEnv(config) {
1100
+ const x402 = config.x402;
1101
+ if (!x402?.enabled)
1102
+ return;
1103
+ if (!process.env.X402_ENABLED)
1104
+ process.env.X402_ENABLED = "true";
1105
+ if (x402.apiKey && !process.env.X402_API_KEY)
1106
+ process.env.X402_API_KEY = x402.apiKey;
1107
+ if (x402.baseUrl && !process.env.X402_BASE_URL)
1108
+ process.env.X402_BASE_URL = x402.baseUrl;
1109
+ }
1110
+ function resolveDefaultPgliteDataDir(config) {
1111
+ const workspaceDir = config.agents?.defaults?.workspace ?? resolveDefaultAgentWorkspaceDir();
1112
+ return path.join(resolveUserPath(workspaceDir), ".eliza", ".elizadb");
1113
+ }
1114
+ /** @internal Exported for testing. */
1115
+ export function applyDatabaseConfigToEnv(config) {
1116
+ const db = config.database;
1117
+ const provider = db?.provider ?? "pglite";
1118
+ if (provider === "postgres" && db?.postgres) {
1119
+ const pg = db.postgres;
1120
+ let url = pg.connectionString;
1121
+ if (!url) {
1122
+ const host = pg.host ?? "localhost";
1123
+ const port = pg.port ?? 5432;
1124
+ const user = encodeURIComponent(pg.user ?? "postgres");
1125
+ const password = pg.password ? encodeURIComponent(pg.password) : "";
1126
+ const database = pg.database ?? "postgres";
1127
+ const auth = password ? `${user}:${password}` : user;
1128
+ const sslParam = pg.ssl ? "?sslmode=require" : "";
1129
+ url = `postgresql://${auth}@${host}:${port}/${database}${sslParam}`;
1130
+ }
1131
+ process.env.POSTGRES_URL = url;
1132
+ // Clear PGLite dir so plugin-sql does not fall back to PGLite
1133
+ delete process.env.PGLITE_DATA_DIR;
1134
+ }
1135
+ else {
1136
+ // PGLite mode (default): ensure no leftover POSTGRES_URL and pin
1137
+ // PGLite to the workspace path unless overridden by config/env.
1138
+ delete process.env.POSTGRES_URL;
1139
+ const configuredDataDir = db?.pglite?.dataDir?.trim();
1140
+ if (configuredDataDir) {
1141
+ process.env.PGLITE_DATA_DIR = resolveUserPath(configuredDataDir);
1142
+ // Fall through to directory creation below instead of returning early
1143
+ }
1144
+ const envDataDir = process.env.PGLITE_DATA_DIR?.trim();
1145
+ if (!envDataDir) {
1146
+ process.env.PGLITE_DATA_DIR = resolveDefaultPgliteDataDir(config);
1147
+ }
1148
+ // Ensure the PGlite data directory exists before init so PGlite does
1149
+ // not silently fall back to in-memory mode on first run.
1150
+ const dataDir = process.env.PGLITE_DATA_DIR;
1151
+ if (dataDir) {
1152
+ const alreadyExisted = existsSync(dataDir);
1153
+ mkdirSync(dataDir, { recursive: true });
1154
+ logger.info(`[eliza] PGlite data dir: ${dataDir} (${alreadyExisted ? "existed" : "created"})`);
1155
+ // Remove stale postmaster.pid left by a crashed process. Without this,
1156
+ // PGlite sees the lock and either fails or, with explicit destructive
1157
+ // recovery enabled, triggers the resetPgliteDataDir path.
1158
+ cleanStalePglitePid(dataDir);
1159
+ }
1160
+ }
1161
+ }
1162
+ function reconcilePglitePidFile(dataDir) {
1163
+ const pidPath = path.join(dataDir, "postmaster.pid");
1164
+ if (!existsSync(pidPath))
1165
+ return "missing";
1166
+ try {
1167
+ const content = readFileSync(pidPath, "utf-8");
1168
+ const firstLine = content.split("\n")[0]?.trim();
1169
+ const pid = parseInt(firstLine, 10);
1170
+ if (Number.isNaN(pid) || pid <= 0) {
1171
+ // Malformed pid file — remove it
1172
+ unlinkSync(pidPath);
1173
+ logger.info(`[eliza] Removed malformed PGlite postmaster.pid`);
1174
+ return "cleared-malformed";
1175
+ }
1176
+ // Check if the process is still alive
1177
+ try {
1178
+ process.kill(pid, 0); // signal 0 = existence check, doesn't kill
1179
+ // Process exists — pid file is NOT stale, leave it alone
1180
+ logger.info(`[eliza] PGlite postmaster.pid references running process ${pid} — leaving intact`);
1181
+ return "active";
1182
+ }
1183
+ catch (killErr) {
1184
+ const code = killErr.code;
1185
+ if (code === "ESRCH") {
1186
+ // Process doesn't exist — stale pid file, safe to remove
1187
+ unlinkSync(pidPath);
1188
+ logger.info(`[eliza] Removed stale PGlite postmaster.pid (process ${pid} not running)`);
1189
+ return "cleared-stale";
1190
+ }
1191
+ else {
1192
+ // EPERM or other — process may be alive under a different user,
1193
+ // leave the file alone to avoid data directory corruption
1194
+ logger.warn(`[eliza] Cannot confirm postmaster.pid staleness (${code}) — leaving intact`);
1195
+ return "active-unconfirmed";
1196
+ }
1197
+ }
1198
+ }
1199
+ catch (err) {
1200
+ logger.warn(`[eliza] Failed to check PGlite postmaster.pid: ${formatError(err)}`);
1201
+ return "check-failed";
1202
+ }
1203
+ }
1204
+ /**
1205
+ * Check for and remove a stale postmaster.pid in the PGlite data directory.
1206
+ * The pid file is stale if the recorded process is no longer running.
1207
+ */
1208
+ export function cleanStalePglitePid(dataDir) {
1209
+ try {
1210
+ reconcilePglitePidFile(dataDir);
1211
+ }
1212
+ catch (err) {
1213
+ logger.warn(`[eliza] PGlite PID reconciliation failed: ${err}`);
1214
+ }
1215
+ }
1216
+ function collectErrorMessages(err) {
1217
+ const messages = [];
1218
+ const seen = new Set();
1219
+ let current = err;
1220
+ while (current && !seen.has(current)) {
1221
+ seen.add(current);
1222
+ if (typeof current === "string") {
1223
+ messages.push(current);
1224
+ break;
1225
+ }
1226
+ if (current instanceof Error) {
1227
+ if (current.message)
1228
+ messages.push(current.message);
1229
+ if (current.stack)
1230
+ messages.push(current.stack);
1231
+ current = current.cause;
1232
+ continue;
1233
+ }
1234
+ if (typeof current === "object") {
1235
+ const maybeErr = current;
1236
+ if (typeof maybeErr.message === "string" && maybeErr.message) {
1237
+ messages.push(maybeErr.message);
1238
+ }
1239
+ if (maybeErr.cause !== undefined) {
1240
+ current = maybeErr.cause;
1241
+ continue;
1242
+ }
1243
+ }
1244
+ break;
1245
+ }
1246
+ return messages;
1247
+ }
1248
+ function isPgliteLockError(err) {
1249
+ const haystack = collectErrorMessages(err).join("\n").toLowerCase();
1250
+ if (!haystack)
1251
+ return false;
1252
+ const hasPglite = haystack.includes("pglite");
1253
+ const hasSqlite = haystack.includes("sqlite");
1254
+ const hasLockSignal = haystack.includes("database is locked") ||
1255
+ haystack.includes("lock file already exists");
1256
+ return hasLockSignal && (hasPglite || hasSqlite);
1257
+ }
1258
+ /** @internal Exported for testing. */
1259
+ export function isRecoverablePgliteInitError(err) {
1260
+ const code = getPgliteErrorCode(err);
1261
+ if (code === PGLITE_ERROR_CODES.ACTIVE_LOCK ||
1262
+ code === PGLITE_ERROR_CODES.CORRUPT_DATA ||
1263
+ code === PGLITE_ERROR_CODES.MANUAL_RESET_REQUIRED) {
1264
+ return true;
1265
+ }
1266
+ const haystack = collectErrorMessages(err).join("\n").toLowerCase();
1267
+ if (!haystack)
1268
+ return false;
1269
+ const hasAbort = haystack.includes("aborted(). build with -sassertions");
1270
+ const hasPglite = haystack.includes("pglite");
1271
+ const _hasSqlite = haystack.includes("sqlite");
1272
+ const hasMigrationsSchema = haystack.includes("create schema if not exists migrations") ||
1273
+ haystack.includes("failed query: create schema if not exists migrations");
1274
+ const hasRecoverableStorageSignal = [
1275
+ "database disk image is malformed",
1276
+ "file is not a database",
1277
+ "malformed database schema",
1278
+ "database is locked",
1279
+ "lock file already exists",
1280
+ "wal file",
1281
+ "checkpoint failed",
1282
+ "checksum mismatch",
1283
+ "corrupt",
1284
+ "could not read blocks",
1285
+ "read only ",
1286
+ "unreachable code should not be executed",
1287
+ "_pgl_backend",
1288
+ ].some((needle) => haystack.includes(needle));
1289
+ if (hasMigrationsSchema)
1290
+ return true;
1291
+ if (hasAbort && hasPglite)
1292
+ return true;
1293
+ if (hasRecoverableStorageSignal)
1294
+ return true;
1295
+ return false;
1296
+ }
1297
+ /** @internal Exported for testing. */
1298
+ export function getPgliteRecoveryAction(err, dataDir) {
1299
+ const code = getPgliteErrorCode(err);
1300
+ if (code === PGLITE_ERROR_CODES.ACTIVE_LOCK) {
1301
+ return "fail-active-lock";
1302
+ }
1303
+ if (code === PGLITE_ERROR_CODES.CORRUPT_DATA ||
1304
+ code === PGLITE_ERROR_CODES.MANUAL_RESET_REQUIRED) {
1305
+ return "fail-manual-reset";
1306
+ }
1307
+ if (!isRecoverablePgliteInitError(err))
1308
+ return "none";
1309
+ const pidStatus = reconcilePglitePidFile(dataDir);
1310
+ const treatPidAsActiveLock = code === PGLITE_ERROR_CODES.ACTIVE_LOCK || isPgliteLockError(err);
1311
+ if ((treatPidAsActiveLock && pidStatus === "active") ||
1312
+ (treatPidAsActiveLock && pidStatus === "active-unconfirmed") ||
1313
+ (treatPidAsActiveLock && pidStatus === "check-failed")) {
1314
+ return "fail-active-lock";
1315
+ }
1316
+ if (pidStatus === "cleared-stale" || pidStatus === "cleared-malformed") {
1317
+ return "retry-without-reset";
1318
+ }
1319
+ return "fail-manual-reset";
1320
+ }
1321
+ function createActivePgliteLockError(dataDir, err) {
1322
+ if (getPgliteErrorCode(err) === PGLITE_ERROR_CODES.ACTIVE_LOCK &&
1323
+ err instanceof Error) {
1324
+ return err;
1325
+ }
1326
+ return createPgliteInitError(PGLITE_ERROR_CODES.ACTIVE_LOCK, `PGLite data dir is already in use at ${dataDir}. Close the other Eliza or Eliza process, or set a different PGLITE_DATA_DIR before retrying.`, { cause: err, dataDir });
1327
+ }
1328
+ function formatPgliteFailure(err) {
1329
+ return collectErrorMessages(err)[0] ?? formatError(err);
1330
+ }
1331
+ function createManualResetRequiredPgliteError(dataDir, err) {
1332
+ if (getPgliteErrorCode(err) === PGLITE_ERROR_CODES.MANUAL_RESET_REQUIRED &&
1333
+ err instanceof Error) {
1334
+ return err;
1335
+ }
1336
+ const errorText = formatPgliteFailure(err);
1337
+ const cause = getPgliteErrorCode(err) === PGLITE_ERROR_CODES.CORRUPT_DATA
1338
+ ? err
1339
+ : createPgliteInitError(PGLITE_ERROR_CODES.CORRUPT_DATA, `PGlite data dir at ${dataDir} appears corrupt or unreadable: ${errorText}`, { cause: err, dataDir });
1340
+ return createPgliteInitError(PGLITE_ERROR_CODES.MANUAL_RESET_REQUIRED, `PGlite initialization failed for ${dataDir}: ${errorText}. Stop Eliza, then rename or delete only this directory before retrying: ${dataDir}`, { cause, dataDir });
1341
+ }
1342
+ export function isFatalPgliteStartupError(err) {
1343
+ const code = getPgliteErrorCode(err);
1344
+ return (code === PGLITE_ERROR_CODES.ACTIVE_LOCK ||
1345
+ code === PGLITE_ERROR_CODES.CORRUPT_DATA ||
1346
+ code === PGLITE_ERROR_CODES.MANUAL_RESET_REQUIRED);
1347
+ }
1348
+ function resolveActivePgliteDataDir(config) {
1349
+ const provider = config.database?.provider ?? "pglite";
1350
+ if (provider === "postgres")
1351
+ return null;
1352
+ const configured = process.env.PGLITE_DATA_DIR?.trim();
1353
+ const dataDir = configured || resolveDefaultPgliteDataDir(config);
1354
+ return resolveUserPath(dataDir);
1355
+ }
1356
+ /** Call whichever init method the adapter exposes (.init or .initialize). */
1357
+ async function callAdapterInit(adapter) {
1358
+ const fn = adapter.init ?? adapter.initialize;
1359
+ if (typeof fn === "function")
1360
+ await fn.call(adapter);
1361
+ }
1362
+ async function initializeDatabaseAdapter(runtime, config) {
1363
+ if (!runtime.adapter || (await runtime.adapter.isReady()))
1364
+ return;
1365
+ try {
1366
+ await callAdapterInit(runtime.adapter);
1367
+ logger.info("[eliza] Database adapter initialized early (before plugin inits)");
1368
+ }
1369
+ catch (err) {
1370
+ const pgliteDataDir = resolveActivePgliteDataDir(config);
1371
+ if (!pgliteDataDir) {
1372
+ throw err;
1373
+ }
1374
+ const recoveryAction = getPgliteRecoveryAction(err, pgliteDataDir);
1375
+ if (recoveryAction === "none") {
1376
+ throw err;
1377
+ }
1378
+ if (recoveryAction === "fail-active-lock") {
1379
+ throw createActivePgliteLockError(pgliteDataDir, err);
1380
+ }
1381
+ if (recoveryAction === "fail-manual-reset") {
1382
+ throw createManualResetRequiredPgliteError(pgliteDataDir, err);
1383
+ }
1384
+ logger.warn(`[eliza] PGLite init failed (${formatError(err)}). Cleared a stale PGLite lock in ${pgliteDataDir} and retrying without resetting data.`);
1385
+ await callAdapterInit(runtime.adapter);
1386
+ logger.info("[eliza] Database adapter recovered after clearing a stale PGLite lock");
1387
+ }
1388
+ // Health check: verify PGlite data directory has files after init.
1389
+ // Runs on BOTH the happy path and the recovery path.
1390
+ await verifyPgliteDataDir(config);
1391
+ }
1392
+ /**
1393
+ * Verify PGlite data directory contains files after init.
1394
+ * Warns if the directory is empty (suggests ephemeral/in-memory fallback).
1395
+ */
1396
+ async function verifyPgliteDataDir(config) {
1397
+ const pgliteDataDir = resolveActivePgliteDataDir(config);
1398
+ if (!pgliteDataDir || !existsSync(pgliteDataDir))
1399
+ return;
1400
+ try {
1401
+ const files = await fs.readdir(pgliteDataDir);
1402
+ logger.info(`[eliza] PGlite health check: ${files.length} file(s) in ${pgliteDataDir}`);
1403
+ if (files.length === 0) {
1404
+ logger.warn(`[eliza] PGlite data directory is empty after init — data may not persist across restarts`);
1405
+ }
1406
+ }
1407
+ catch (err) {
1408
+ logger.warn(`[eliza] PGlite health check failed: ${formatError(err)}`);
1409
+ }
1410
+ }
1411
+ function isPluginAlreadyRegisteredError(err) {
1412
+ return formatError(err).toLowerCase().includes("already registered");
1413
+ }
1414
+ function getConstraintName(error) {
1415
+ if (!error || typeof error !== "object")
1416
+ return null;
1417
+ const err = error;
1418
+ if (typeof err.constraint === "string" && err.constraint.length > 0) {
1419
+ return err.constraint;
1420
+ }
1421
+ if (err.cause)
1422
+ return getConstraintName(err.cause);
1423
+ return null;
1424
+ }
1425
+ function isComponentsWorldFkViolation(error) {
1426
+ return getConstraintName(error) === "components_world_id_worlds_id_fk";
1427
+ }
1428
+ function toErrorDetails(error, depth = 0) {
1429
+ if (!error || typeof error !== "object") {
1430
+ return { value: String(error) };
1431
+ }
1432
+ const err = error;
1433
+ const details = {};
1434
+ for (const key of [
1435
+ "name",
1436
+ "message",
1437
+ "code",
1438
+ "detail",
1439
+ "hint",
1440
+ "constraint",
1441
+ "schema",
1442
+ "table",
1443
+ "column",
1444
+ "where",
1445
+ ]) {
1446
+ const value = err[key];
1447
+ if (typeof value === "string" || typeof value === "number") {
1448
+ details[key] = value;
1449
+ }
1450
+ }
1451
+ if (depth < 2 && err.cause) {
1452
+ details.cause = toErrorDetails(err.cause, depth + 1);
1453
+ }
1454
+ return details;
1455
+ }
1456
+ async function withEntityCreateMutex(runtimeWithBindings, fn) {
1457
+ const previous = runtimeWithBindings.__elizaEntityCreateMutex;
1458
+ let release = () => { };
1459
+ runtimeWithBindings.__elizaEntityCreateMutex = new Promise((resolve) => {
1460
+ release = resolve;
1461
+ });
1462
+ if (previous) {
1463
+ await previous;
1464
+ }
1465
+ try {
1466
+ return await fn();
1467
+ }
1468
+ finally {
1469
+ release();
1470
+ }
1471
+ }
1472
+ function summarizeComponentWrite(input) {
1473
+ if (!input || typeof input !== "object" || Array.isArray(input)) {
1474
+ return { inputType: typeof input };
1475
+ }
1476
+ const record = input;
1477
+ const data = record.data;
1478
+ const dataKeys = data && typeof data === "object" && !Array.isArray(data)
1479
+ ? Object.keys(data).slice(0, 20)
1480
+ : [];
1481
+ return {
1482
+ id: record.id,
1483
+ type: record.type,
1484
+ entityId: record.entityId ?? record.entity_id,
1485
+ sourceEntityId: record.sourceEntityId ?? record.source_entity_id,
1486
+ roomId: record.roomId ?? record.room_id,
1487
+ worldId: record.worldId ?? record.world_id,
1488
+ agentId: record.agentId ?? record.agent_id,
1489
+ dataKeys,
1490
+ };
1491
+ }
1492
+ export function installRuntimeMethodBindings(runtime) {
1493
+ const runtimeWithBindings = runtime;
1494
+ if (runtimeWithBindings.__elizaMethodBindingsInstalled) {
1495
+ return;
1496
+ }
1497
+ installRuntimePluginLifecycle(runtime);
1498
+ // Some plugin builds store this method and invoke it later without the
1499
+ // runtime receiver, which breaks private-field access in AgentRuntime.
1500
+ runtime.getConversationLength = runtime.getConversationLength.bind(runtime);
1501
+ // Wrap getSetting() to fall back to process.env for known keys when the
1502
+ // core returns null. elizaOS core returns null for missing keys, but some
1503
+ // plugins (e.g. @elizaos/plugin-google-genai) check `!== undefined` and
1504
+ // convert null to the string "null", causing API calls like `models/null`.
1505
+ // Scoped to an allowlist to avoid leaking arbitrary env vars to plugins.
1506
+ const GETSETTING_ENV_ALLOWLIST = new Set([
1507
+ // Model provider API keys
1508
+ "ANTHROPIC_API_KEY",
1509
+ "OPENAI_API_KEY",
1510
+ "GOOGLE_GENERATIVE_AI_API_KEY",
1511
+ "GOOGLE_API_KEY",
1512
+ "GEMINI_API_KEY",
1513
+ "GROQ_API_KEY",
1514
+ "XAI_API_KEY",
1515
+ "DEEPSEEK_API_KEY",
1516
+ "OPENROUTER_API_KEY",
1517
+ // Google model defaults
1518
+ "GOOGLE_SMALL_MODEL",
1519
+ "GOOGLE_LARGE_MODEL",
1520
+ // GitHub
1521
+ "GITHUB_TOKEN",
1522
+ "GITHUB_OAUTH_CLIENT_ID",
1523
+ // Coding agent model preferences
1524
+ "PARALLAX_CLAUDE_MODEL_POWERFUL",
1525
+ "PARALLAX_CLAUDE_MODEL_FAST",
1526
+ "PARALLAX_GEMINI_MODEL_POWERFUL",
1527
+ "PARALLAX_GEMINI_MODEL_FAST",
1528
+ "PARALLAX_CODEX_MODEL_POWERFUL",
1529
+ "PARALLAX_CODEX_MODEL_FAST",
1530
+ "PARALLAX_AIDER_PROVIDER",
1531
+ "PARALLAX_AIDER_MODEL_POWERFUL",
1532
+ "PARALLAX_AIDER_MODEL_FAST",
1533
+ // Custom credential forwarding — intentionally broad: users configure which env vars
1534
+ // to forward to coding agents via this comma-separated key list (e.g. MCP server tokens).
1535
+ "CUSTOM_CREDENTIAL_KEYS",
1536
+ ]);
1537
+ const originalGetSetting = runtime.getSetting.bind(runtime);
1538
+ runtime.getSetting = (key) => {
1539
+ const result = originalGetSetting(key);
1540
+ if (result !== null && result !== undefined)
1541
+ return result;
1542
+ if (GETSETTING_ENV_ALLOWLIST.has(key)) {
1543
+ const envVal = process.env[key];
1544
+ if (envVal !== undefined && envVal.trim() !== "")
1545
+ return envVal;
1546
+ }
1547
+ return result;
1548
+ };
1549
+ // Add targeted diagnostics around component writes. Relationships reflection and
1550
+ // relationship extraction rely heavily on components; when inserts fail,
1551
+ // upstream logs often hide the concrete DB cause/constraint.
1552
+ if (!runtimeWithBindings.__elizaComponentWriteDiagnosticsInstalled) {
1553
+ const runtimeWithComponentWrites = runtime;
1554
+ if (typeof runtimeWithComponentWrites.createComponent === "function") {
1555
+ const originalCreate = runtimeWithComponentWrites.createComponent.bind(runtime);
1556
+ runtimeWithComponentWrites.createComponent = async (input) => {
1557
+ try {
1558
+ return await originalCreate(input);
1559
+ }
1560
+ catch (error) {
1561
+ // Recovery path: some evaluators (e.g. relationship extraction)
1562
+ // compute a synthetic worldId that may not exist yet. If we hit the
1563
+ // components->worlds FK, retry once with the room's canonical worldId.
1564
+ if (isComponentsWorldFkViolation(error) &&
1565
+ input.roomId &&
1566
+ typeof runtime.getRoom === "function") {
1567
+ try {
1568
+ const room = await runtime.getRoom(input.roomId);
1569
+ const fallbackWorldId = room?.worldId ?? null;
1570
+ if (fallbackWorldId !== input.worldId) {
1571
+ logger.warn(`[eliza] createComponent retry with ${fallbackWorldId ? `room worldId (${fallbackWorldId})` : "null worldId"} after FK violation`);
1572
+ const recovered = {
1573
+ ...input,
1574
+ worldId: fallbackWorldId,
1575
+ };
1576
+ return await originalCreate(recovered);
1577
+ }
1578
+ }
1579
+ catch (retryLookupError) {
1580
+ logger.warn(`[eliza] createComponent recovery lookup failed: ${formatError(retryLookupError)}`);
1581
+ }
1582
+ }
1583
+ const component = summarizeComponentWrite(input);
1584
+ logger.error(`[eliza] createComponent failed: ${formatError(error)} | component=${JSON.stringify(component)}`);
1585
+ logger.error(`[eliza] createComponent db details: ${JSON.stringify(toErrorDetails(error))}`);
1586
+ throw error;
1587
+ }
1588
+ };
1589
+ }
1590
+ if (typeof runtimeWithComponentWrites.updateComponent === "function") {
1591
+ const originalUpdate = runtimeWithComponentWrites.updateComponent.bind(runtime);
1592
+ runtimeWithComponentWrites.updateComponent = async (input) => {
1593
+ try {
1594
+ return await originalUpdate(input);
1595
+ }
1596
+ catch (error) {
1597
+ const component = summarizeComponentWrite(input);
1598
+ logger.error(`[eliza] updateComponent failed: ${formatError(error)} | component=${JSON.stringify(component)}`);
1599
+ logger.error(`[eliza] updateComponent db details: ${JSON.stringify(toErrorDetails(error))}`);
1600
+ throw error;
1601
+ }
1602
+ };
1603
+ }
1604
+ runtimeWithBindings.__elizaComponentWriteDiagnosticsInstalled = true;
1605
+ }
1606
+ // Proactive guard for plugin-sql entity creation. Some evaluators may attempt
1607
+ // to create the same entity in rapid succession; plugin-sql's batch insert is
1608
+ // non-idempotent and can fail entire writes on duplicate/conflicting rows.
1609
+ if (!runtimeWithBindings.__elizaEntityWriteDiagnosticsInstalled) {
1610
+ const runtimeWithEntityWrites = runtime;
1611
+ if (typeof runtimeWithEntityWrites.createEntities === "function") {
1612
+ const originalCreateEntities = runtimeWithEntityWrites.createEntities.bind(runtime);
1613
+ runtimeWithEntityWrites.createEntities = async (entities) => {
1614
+ return withEntityCreateMutex(runtimeWithBindings, async () => {
1615
+ const uniqueById = new Map();
1616
+ for (const entity of entities) {
1617
+ if (entity?.id)
1618
+ uniqueById.set(entity.id, entity);
1619
+ }
1620
+ const deduped = Array.from(uniqueById.values());
1621
+ if (deduped.length === 0)
1622
+ return deduped.map((e) => e.id);
1623
+ let missing = deduped;
1624
+ if (typeof runtimeWithEntityWrites.getEntitiesByIds === "function") {
1625
+ try {
1626
+ const existing = (await runtimeWithEntityWrites.getEntitiesByIds(deduped.map((e) => e.id))) ?? [];
1627
+ const existingIds = new Set();
1628
+ for (const entity of existing) {
1629
+ if (entity?.id)
1630
+ existingIds.add(entity.id);
1631
+ }
1632
+ missing = deduped.filter((entity) => !existingIds.has(entity.id));
1633
+ }
1634
+ catch (err) {
1635
+ logger.warn(`[eliza] createEntities precheck failed; proceeding with guarded insert: ${formatError(err)}`);
1636
+ }
1637
+ }
1638
+ if (missing.length === 0)
1639
+ return deduped.map((e) => e.id);
1640
+ const result = await originalCreateEntities(missing);
1641
+ if (Array.isArray(result) ? result.length > 0 : result)
1642
+ return deduped.map((e) => e.id);
1643
+ if (typeof runtimeWithEntityWrites.ensureEntityExists === "function") {
1644
+ let allRecovered = true;
1645
+ for (const entity of missing) {
1646
+ try {
1647
+ const ensured = await runtimeWithEntityWrites.ensureEntityExists(entity);
1648
+ allRecovered = allRecovered && ensured;
1649
+ }
1650
+ catch (err) {
1651
+ allRecovered = false;
1652
+ logger.warn(`[eliza] ensureEntityExists recovery failed for ${String(entity.id)}: ${formatError(err)}`);
1653
+ }
1654
+ }
1655
+ if (allRecovered)
1656
+ return deduped.map((e) => e.id);
1657
+ }
1658
+ logger.warn(`[eliza] createEntities unresolved after guarded retries (requested=${entities.length}, deduped=${deduped.length}, missing=${missing.length})`);
1659
+ return [];
1660
+ });
1661
+ };
1662
+ }
1663
+ runtimeWithBindings.__elizaEntityWriteDiagnosticsInstalled = true;
1664
+ }
1665
+ runtimeWithBindings.__elizaMethodBindingsInstalled = true;
1666
+ }
1667
+ function installActionAliases(runtime) {
1668
+ const runtimeWithAliases = runtime;
1669
+ if (runtimeWithAliases.__elizaActionAliasesInstalled) {
1670
+ return;
1671
+ }
1672
+ const actions = Array.isArray(runtimeWithAliases.actions)
1673
+ ? runtimeWithAliases.actions
1674
+ : [];
1675
+ // Keep compaction automatic-only; do not allow manual COMPACT_SESSION invokes.
1676
+ const compactSessionIndex = actions.findIndex((action) => action?.name?.toUpperCase() === "COMPACT_SESSION");
1677
+ if (compactSessionIndex !== -1) {
1678
+ actions.splice(compactSessionIndex, 1);
1679
+ logger.info("[eliza] Disabled manual COMPACT_SESSION action; auto-compaction remains enabled");
1680
+ }
1681
+ // Compatibility alias: older prompts/docs still reference CODE_TASK,
1682
+ // while agent-orchestrator exposes CREATE_TASK.
1683
+ const createTaskAction = actions.find((action) => action?.name?.toUpperCase() === "CREATE_TASK");
1684
+ if (createTaskAction) {
1685
+ const similes = Array.isArray(createTaskAction.similes)
1686
+ ? createTaskAction.similes
1687
+ : [];
1688
+ const hasCodeTaskAlias = similes.some((simile) => simile.toUpperCase() === "CODE_TASK");
1689
+ if (!hasCodeTaskAlias) {
1690
+ createTaskAction.similes = [...similes, "CODE_TASK"];
1691
+ logger.info("[eliza] Added action alias CODE_TASK -> CREATE_TASK for agent-orchestrator");
1692
+ }
1693
+ }
1694
+ runtimeWithAliases.__elizaActionAliasesInstalled = true;
1695
+ }
1696
+ async function registerSqlPluginWithRecovery(runtime, sqlPlugin, config) {
1697
+ let registerError = null;
1698
+ try {
1699
+ await runtime.registerPlugin(sqlPlugin.plugin);
1700
+ }
1701
+ catch (err) {
1702
+ registerError = err;
1703
+ }
1704
+ if (registerError) {
1705
+ const pgliteDataDir = resolveActivePgliteDataDir(config);
1706
+ if (!pgliteDataDir) {
1707
+ throw registerError;
1708
+ }
1709
+ const recoveryAction = getPgliteRecoveryAction(registerError, pgliteDataDir);
1710
+ if (recoveryAction === "none") {
1711
+ throw registerError;
1712
+ }
1713
+ if (recoveryAction === "fail-active-lock") {
1714
+ throw createActivePgliteLockError(pgliteDataDir, registerError);
1715
+ }
1716
+ if (recoveryAction === "fail-manual-reset") {
1717
+ throw createManualResetRequiredPgliteError(pgliteDataDir, registerError);
1718
+ }
1719
+ logger.warn(`[eliza] SQL plugin registration failed (${formatError(registerError)}). Cleared a stale PGLite lock in ${pgliteDataDir} and retrying without resetting data.`);
1720
+ try {
1721
+ await runtime.registerPlugin(sqlPlugin.plugin);
1722
+ }
1723
+ catch (retryErr) {
1724
+ if (!isPluginAlreadyRegisteredError(retryErr)) {
1725
+ throw retryErr;
1726
+ }
1727
+ }
1728
+ }
1729
+ await initializeDatabaseAdapter(runtime, config);
1730
+ }
1731
+ /**
1732
+ * Build an elizaOS Character from the Eliza config.
1733
+ *
1734
+ * Resolves the agent name from `config.agents.list` (first entry) or
1735
+ * `config.ui.assistant.name`, falling back to the default bundled preset.
1736
+ * Character
1737
+ * personality data (bio, system prompt, style, etc.) is stored in the
1738
+ * database — not the config file — so we only provide sensible defaults
1739
+ * here for the initial setup.
1740
+ */
1741
+ /** @internal Exported for testing. */
1742
+ export function buildCharacterFromConfig(config) {
1743
+ const agentEntry = config.agents?.list?.[0];
1744
+ const uiConfig = (config.ui ?? {});
1745
+ const language = normalizeCharacterLanguage(uiConfig.language);
1746
+ const configuredUiName = uiConfig.assistant?.name?.trim();
1747
+ const configuredAgentName = agentEntry?.name?.trim();
1748
+ // Prefer the UI-level assistant name when it diverges from the bundled
1749
+ // preset entry so renames take effect immediately across prompts/logging.
1750
+ const configuredName = configuredUiName || configuredAgentName;
1751
+ const bundledPreset = resolveStylePresetById(uiConfig.presetId, language) ??
1752
+ resolveStylePresetByAvatarIndex(uiConfig.avatarIndex, language) ??
1753
+ resolveStylePresetByName(configuredName, language) ??
1754
+ (configuredName ? undefined : getDefaultStylePreset(language));
1755
+ const name = configuredName ??
1756
+ bundledPreset?.name ??
1757
+ getDefaultStylePreset(language).name;
1758
+ // Read personality fields from the agent config entry (set during
1759
+ // onboarding from the chosen style preset). Fall back to generic
1760
+ // defaults when the preset data is not present (e.g. pre-onboarding
1761
+ // setup or configs created before this change). For built-in default
1762
+ // characters, fall back to the bundled preset so legacy name-only configs
1763
+ // still retain their default posts/messages.
1764
+ const bio = agentEntry?.bio ??
1765
+ bundledPreset?.bio ?? [
1766
+ "{{name}} is an AI assistant powered by Eliza and elizaOS.",
1767
+ ];
1768
+ const systemPrompt = agentEntry?.system ??
1769
+ bundledPreset?.system ??
1770
+ "You are {{name}}, an autonomous AI agent powered by elizaOS.";
1771
+ const style = agentEntry?.style ?? bundledPreset?.style;
1772
+ const adjectives = agentEntry?.adjectives ?? bundledPreset?.adjectives;
1773
+ const topics = agentEntry?.topics && agentEntry.topics.length > 0
1774
+ ? agentEntry.topics
1775
+ : bundledPreset?.topics;
1776
+ const postExamples = agentEntry?.postExamples ?? bundledPreset?.postExamples;
1777
+ const messageExamples = agentEntry?.messageExamples ?? bundledPreset?.messageExamples;
1778
+ const advancedMemory = agentEntry?.advancedMemory ??
1779
+ config.agents?.defaults?.advancedMemory ??
1780
+ true;
1781
+ const settings = {
1782
+ MEMORY_SUMMARY_MODEL_TYPE: process.env.MEMORY_SUMMARY_MODEL_TYPE?.trim() || "TEXT_SMALL",
1783
+ MEMORY_REFLECTION_MODEL_TYPE: process.env.MEMORY_REFLECTION_MODEL_TYPE?.trim() || "TEXT_LARGE",
1784
+ };
1785
+ // Collect secrets from process.env (API keys the plugins need)
1786
+ const secretKeys = [
1787
+ "ANTHROPIC_API_KEY",
1788
+ "OPENAI_API_KEY",
1789
+ "GEMINI_API_KEY",
1790
+ "GOOGLE_API_KEY",
1791
+ "GOOGLE_GENERATIVE_AI_API_KEY",
1792
+ "GROQ_API_KEY",
1793
+ "XAI_API_KEY",
1794
+ "OPENROUTER_API_KEY",
1795
+ "AI_GATEWAY_API_KEY",
1796
+ "AIGATEWAY_API_KEY",
1797
+ "AI_GATEWAY_BASE_URL",
1798
+ "AI_GATEWAY_SMALL_MODEL",
1799
+ "AI_GATEWAY_LARGE_MODEL",
1800
+ "AI_GATEWAY_EMBEDDING_MODEL",
1801
+ "AI_GATEWAY_EMBEDDING_DIMENSIONS",
1802
+ "AI_GATEWAY_IMAGE_MODEL",
1803
+ "AI_GATEWAY_TIMEOUT_MS",
1804
+ "OLLAMA_BASE_URL",
1805
+ "DISCORD_API_TOKEN",
1806
+ "DISCORD_APPLICATION_ID",
1807
+ "DISCORD_BOT_TOKEN",
1808
+ "TELEGRAM_BOT_TOKEN",
1809
+ "WHATSAPP_ACCESS_TOKEN",
1810
+ "WHATSAPP_PHONE_NUMBER_ID",
1811
+ "WHATSAPP_AUTH_DIR",
1812
+ "WHATSAPP_SESSION_PATH",
1813
+ "WHATSAPP_WEBHOOK_VERIFY_TOKEN",
1814
+ "WHATSAPP_API_VERSION",
1815
+ "WHATSAPP_DM_POLICY",
1816
+ "WHATSAPP_GROUP_POLICY",
1817
+ "WHATSAPP_ALLOW_FROM",
1818
+ "WHATSAPP_GROUP_ALLOW_FROM",
1819
+ "TELEGRAM_ACCOUNT_PHONE",
1820
+ "TELEGRAM_ACCOUNT_APP_ID",
1821
+ "TELEGRAM_ACCOUNT_APP_HASH",
1822
+ "TELEGRAM_ACCOUNT_DEVICE_MODEL",
1823
+ "TELEGRAM_ACCOUNT_SYSTEM_VERSION",
1824
+ "SLACK_BOT_TOKEN",
1825
+ "SLACK_APP_TOKEN",
1826
+ "SLACK_USER_TOKEN",
1827
+ "SIGNAL_ACCOUNT_NUMBER",
1828
+ "MSTEAMS_APP_ID",
1829
+ "MSTEAMS_APP_PASSWORD",
1830
+ "MATTERMOST_BOT_TOKEN",
1831
+ "MATTERMOST_BASE_URL",
1832
+ // ElizaCloud secrets
1833
+ "ELIZAOS_CLOUD_API_KEY",
1834
+ "ELIZAOS_CLOUD_BASE_URL",
1835
+ "ELIZAOS_CLOUD_ENABLED",
1836
+ // Wallet / blockchain secrets
1837
+ "EVM_PRIVATE_KEY",
1838
+ "SOLANA_PRIVATE_KEY",
1839
+ "ALCHEMY_API_KEY",
1840
+ "HELIUS_API_KEY",
1841
+ "BIRDEYE_API_KEY",
1842
+ "SOLANA_RPC_URL",
1843
+ "X402_PRIVATE_KEY",
1844
+ "X402_NETWORK",
1845
+ "X402_PAY_TO",
1846
+ "X402_FACILITATOR_URL",
1847
+ "X402_MAX_PAYMENT_USD",
1848
+ "X402_MAX_TOTAL_USD",
1849
+ "X402_ENABLED",
1850
+ "X402_DB_PATH",
1851
+ // GitHub access for coding agent plugin
1852
+ "GITHUB_TOKEN",
1853
+ "GITHUB_OAUTH_CLIENT_ID",
1854
+ ];
1855
+ const secrets = {};
1856
+ for (const key of secretKeys) {
1857
+ const value = process.env[key];
1858
+ if (value?.trim()) {
1859
+ secrets[key] = value;
1860
+ }
1861
+ }
1862
+ // Normalise messageExamples to the {examples: [{name,content}]} shape
1863
+ // that @elizaos/core expects. Config may contain EITHER format:
1864
+ // OLD (preset/onboarding): [[{user, content}, ...], ...]
1865
+ // NEW (@elizaos/core): [{examples: [{name, content}, ...]}, ...]
1866
+ const mappedExamples = messageExamples?.map((item) => {
1867
+ // Already in new format — pass through
1868
+ if (item &&
1869
+ typeof item === "object" &&
1870
+ "examples" in item) {
1871
+ return item;
1872
+ }
1873
+ // Old format — array of {user, content} entries
1874
+ const arr = item;
1875
+ return {
1876
+ examples: arr.map((msg) => ({
1877
+ name: msg.name ?? msg.user ?? "",
1878
+ content: msg.content,
1879
+ })),
1880
+ };
1881
+ });
1882
+ return mergeCharacterDefaults({
1883
+ name,
1884
+ ...(agentEntry?.username ? { username: agentEntry.username } : {}),
1885
+ bio,
1886
+ system: systemPrompt,
1887
+ ...(topics ? { topics } : {}),
1888
+ ...(style ? { style } : {}),
1889
+ ...(adjectives ? { adjectives } : {}),
1890
+ ...(postExamples ? { postExamples } : {}),
1891
+ ...(mappedExamples ? { messageExamples: mappedExamples } : {}),
1892
+ advancedMemory,
1893
+ settings,
1894
+ secrets,
1895
+ });
1896
+ }
1897
+ /**
1898
+ * Resolve the primary model identifier from Eliza config.
1899
+ *
1900
+ * Eliza stores the model under `agents.defaults.model.primary` as an
1901
+ * AgentModelListConfig object. Returns undefined when no model is
1902
+ * explicitly configured (elizaOS falls back to whichever model
1903
+ * plugin is loaded).
1904
+ */
1905
+ /** @internal Exported for testing. */
1906
+ export function resolvePrimaryModel(config) {
1907
+ const modelConfig = config.agents?.defaults?.model;
1908
+ if (!modelConfig)
1909
+ return undefined;
1910
+ // AgentDefaultsConfig.model is AgentModelListConfig: { primary?, fallbacks? }
1911
+ return modelConfig.primary;
1912
+ }
1913
+ function resolveProviderIdFromSelectionHint(value) {
1914
+ const trimmed = trimEnvString(value);
1915
+ if (!trimmed)
1916
+ return undefined;
1917
+ return (normalizeOnboardingProviderId(trimmed) ??
1918
+ normalizeOnboardingProviderId(trimmed.split("/", 1)[0]) ??
1919
+ undefined);
1920
+ }
1921
+ /** @internal Exported for testing. */
1922
+ export function resolvePreferredProviderId(config) {
1923
+ const llmText = resolveServiceRoutingInConfig(config)?.llmText;
1924
+ const backend = normalizeOnboardingProviderId(llmText?.backend);
1925
+ if (llmText?.transport === "cloud-proxy" && backend === "elizacloud") {
1926
+ return "elizacloud";
1927
+ }
1928
+ if (llmText?.transport === "direct") {
1929
+ const directProvider = backend && backend !== "elizacloud" ? backend : undefined;
1930
+ return (directProvider ?? resolveProviderIdFromSelectionHint(llmText.primaryModel));
1931
+ }
1932
+ if (llmText?.transport === "remote") {
1933
+ const remoteProvider = backend && backend !== "elizacloud" ? backend : undefined;
1934
+ return (remoteProvider ?? resolveProviderIdFromSelectionHint(llmText.primaryModel));
1935
+ }
1936
+ return resolveProviderIdFromSelectionHint(resolvePrimaryModel(config));
1937
+ }
1938
+ /** @internal Exported for testing. */
1939
+ export function resolvePreferredProviderPluginName(config) {
1940
+ const providerId = resolvePreferredProviderId(config);
1941
+ return providerId
1942
+ ? getOnboardingProviderOption(providerId)?.pluginName
1943
+ : undefined;
1944
+ }
1945
+ /**
1946
+ * Vision is a heavy optional plugin. When Eliza enables it, keep the service
1947
+ * loaded but idle until the user explicitly selects CAMERA, SCREEN, or BOTH.
1948
+ * This avoids background capture loops during normal app startup.
1949
+ */
1950
+ export function resolveVisionModeSetting(config, env = process.env) {
1951
+ const explicitMode = env.VISION_MODE?.trim();
1952
+ if (explicitMode)
1953
+ return explicitMode;
1954
+ if (config.features?.vision === true)
1955
+ return "OFF";
1956
+ return undefined;
1957
+ }
1958
+ /** @internal Exported for testing. */
1959
+ export function resolveWalletRuntimeSettings(config, env = process.env) {
1960
+ const directRpcUrl = trimEnvString(env.SOLANA_RPC_URL);
1961
+ const solanaNoActions = trimEnvString(env.SOLANA_NO_ACTIONS);
1962
+ const configEnv = config?.env;
1963
+ const configVars = configEnv?.vars &&
1964
+ typeof configEnv.vars === "object" &&
1965
+ !Array.isArray(configEnv.vars)
1966
+ ? configEnv.vars
1967
+ : undefined;
1968
+ const getConfigEnvString = (key) => {
1969
+ const value = configVars?.[key] ?? configEnv?.[key];
1970
+ return typeof value === "string" && value.trim() ? value.trim() : undefined;
1971
+ };
1972
+ const explicitSolanaPublicKey = trimEnvString(env.SOLANA_PUBLIC_KEY) ??
1973
+ trimEnvString(env.WALLET_PUBLIC_KEY) ??
1974
+ getConfigEnvString("SOLANA_PUBLIC_KEY") ??
1975
+ getConfigEnvString("WALLET_PUBLIC_KEY");
1976
+ const derivedSolanaPublicKey = trimEnvString(getWalletAddresses().solanaAddress) ??
1977
+ trimEnvString(syncSolanaPublicKeyEnv(getConfigEnvString("SOLANA_PRIVATE_KEY")));
1978
+ const solanaPublicKey = explicitSolanaPublicKey ?? derivedSolanaPublicKey;
1979
+ const settings = {};
1980
+ if (directRpcUrl) {
1981
+ settings.SOLANA_RPC_URL = directRpcUrl;
1982
+ }
1983
+ if (solanaNoActions) {
1984
+ settings.SOLANA_NO_ACTIONS = solanaNoActions;
1985
+ }
1986
+ if (!solanaPublicKey) {
1987
+ return settings;
1988
+ }
1989
+ settings.SOLANA_PUBLIC_KEY = solanaPublicKey;
1990
+ settings.WALLET_PUBLIC_KEY = solanaPublicKey;
1991
+ return settings;
1992
+ }
1993
+ /**
1994
+ * Boot the elizaOS runtime without starting the readline chat loop.
1995
+ *
1996
+ * This is a convenience wrapper around {@link startEliza} in headless mode,
1997
+ * with optional config guards.
1998
+ */
1999
+ export async function bootElizaRuntime(opts = {}) {
2000
+ if (opts.requireConfig && !configFileExists()) {
2001
+ throw new Error("No config found. Run `eliza start` once to complete setup.");
2002
+ }
2003
+ const runtime = await startEliza({ headless: true });
2004
+ if (!runtime) {
2005
+ throw new Error("Failed to boot runtime");
2006
+ }
2007
+ return runtime;
2008
+ }
2009
+ const LEVEL_TO_NAME = {
2010
+ 10: "trace",
2011
+ 20: "debug",
2012
+ 27: "success",
2013
+ 28: "progress",
2014
+ 29: "log",
2015
+ 30: "info",
2016
+ 40: "warn",
2017
+ 50: "error",
2018
+ 60: "fatal",
2019
+ };
2020
+ export const logToChatListener = (entry) => {
2021
+ if (entry.roomId && entry.runtime) {
2022
+ const runtime = entry.runtime;
2023
+ // access dynamic property
2024
+ const overrides = runtime.logLevelOverrides;
2025
+ const overrideLevel = overrides?.get(String(entry.roomId));
2026
+ if (overrideLevel) {
2027
+ const levelKey = entry.level;
2028
+ const levelName = (levelKey && LEVEL_TO_NAME[levelKey] ? LEVEL_TO_NAME[levelKey] : "log").toUpperCase();
2029
+ const prefix = `[${levelName}]`;
2030
+ const content = `${prefix} ${entry.msg}`;
2031
+ // Prevent infinite loops by suppressing logs from this action
2032
+ runtime
2033
+ .sendMessageToTarget({ roomId: entry.roomId }, {
2034
+ text: `\`\`\`\n${content}\n\`\`\``,
2035
+ source: "system",
2036
+ isLog: "true",
2037
+ })
2038
+ .catch((err) => {
2039
+ logger.debug(`[runtime] failed to send log message to target: ${err}`);
2040
+ });
2041
+ }
2042
+ }
2043
+ };
2044
+ /**
2045
+ * Start the elizaOS runtime with Eliza's configuration.
2046
+ *
2047
+ * In headless mode the runtime is returned instead of entering the
2048
+ * interactive readline loop.
2049
+ */
2050
+ export async function startEliza(opts) {
2051
+ // Start buffering logs early so startup messages appear in the UI log viewer
2052
+ const { captureEarlyLogs } = await import("../api/early-logs.js");
2053
+ captureEarlyLogs();
2054
+ // Register log listener for chat mirroring
2055
+ addLogListener(logToChatListener);
2056
+ // 1. Load Eliza config from ~/.eliza/eliza.json
2057
+ let config;
2058
+ try {
2059
+ config = loadElizaConfig();
2060
+ }
2061
+ catch (err) {
2062
+ if (err.code === "ENOENT") {
2063
+ logger.warn("[eliza] No config found, using defaults");
2064
+ // All ElizaConfig fields are optional, so an empty object is
2065
+ // structurally valid. The `as` cast is safe here.
2066
+ config = {};
2067
+ }
2068
+ else {
2069
+ throw err;
2070
+ }
2071
+ }
2072
+ // 1b. First-run onboarding — ask for agent name if not configured.
2073
+ // In headless mode (GUI) the onboarding is handled by the web UI,
2074
+ // so we skip the interactive CLI prompt and let the runtime start
2075
+ // with defaults. The GUI will restart the agent after onboarding.
2076
+ if (!opts?.headless) {
2077
+ config = await runFirstTimeSetup(config);
2078
+ }
2079
+ // 1c. Apply logging level from config to process.env so the global
2080
+ // @elizaos/core logger (used by plugins) respects it.
2081
+ // config.logging.level is guaranteed to be set (defaults to "error").
2082
+ // Users can still opt into noisy logs via config.logging.level or
2083
+ // an explicit LOG_LEVEL environment variable.
2084
+ if (!process.env.LOG_LEVEL) {
2085
+ process.env.LOG_LEVEL = config.logging?.level ?? "error";
2086
+ }
2087
+ // 2. Push channel secrets into process.env for plugin discovery
2088
+ applyConnectorSecretsToEnv(config);
2089
+ await autoResolveDiscordAppId();
2090
+ // 2b. Propagate cloud config into process.env for ElizaCloud plugin
2091
+ applyCloudConfigToEnv(config);
2092
+ // 2c. Propagate x402 config into process.env
2093
+ applyX402ConfigToEnv(config);
2094
+ // 2d. Propagate database config into process.env for plugin-sql
2095
+ applyDatabaseConfigToEnv(config);
2096
+ // 2e. Propagate arbitrary env vars from config.env into process.env.
2097
+ // Eliza stores user-defined env vars (plugin settings, API URLs, etc.)
2098
+ // in config.env; elizaOS plugins read them via process.env / getSetting.
2099
+ // Skip ELIZAOS_CLOUD_* — applyCloudConfigToEnv() owns those; otherwise a
2100
+ // stale key in config.env refills process.env after disconnect cleared it.
2101
+ if (config.env &&
2102
+ typeof config.env === "object" &&
2103
+ !Array.isArray(config.env)) {
2104
+ for (const [key, value] of Object.entries(config.env)) {
2105
+ if (isElizaCloudManagedProcessEnvKey(key))
2106
+ continue;
2107
+ if (typeof value === "string" && !process.env[key]) {
2108
+ process.env[key] = value;
2109
+ }
2110
+ }
2111
+ // Also hydrate from config.env.vars — setEnvValue writes API keys to
2112
+ // both config.env["KEY"] and config.env.vars["KEY"]. If the top-level
2113
+ // key was lost (e.g. pruneEnv, config migration), the nested form is
2114
+ // the authoritative source.
2115
+ const vars = config.env.vars;
2116
+ if (vars && typeof vars === "object" && !Array.isArray(vars)) {
2117
+ for (const [key, value] of Object.entries(vars)) {
2118
+ if (isElizaCloudManagedProcessEnvKey(key))
2119
+ continue;
2120
+ if (typeof value === "string" && !process.env[key]) {
2121
+ process.env[key] = value;
2122
+ }
2123
+ }
2124
+ }
2125
+ }
2126
+ // Keep the canonical public key env in sync for Solana plugins that still
2127
+ // read process.env directly instead of runtime settings.
2128
+ syncSolanaPublicKeyEnv();
2129
+ normalizeOpenAiCompatibleProviderConfig(config);
2130
+ // Log active database configuration for debugging persistence issues
2131
+ {
2132
+ const dbProvider = config.database?.provider ?? "pglite";
2133
+ const pgliteDir = process.env.PGLITE_DATA_DIR;
2134
+ const postgresUrl = process.env.POSTGRES_URL;
2135
+ logger.info(`[eliza] Database provider: ${dbProvider}` +
2136
+ (dbProvider === "pglite" && pgliteDir
2137
+ ? ` | data dir: ${pgliteDir}`
2138
+ : "") +
2139
+ (dbProvider === "postgres" && postgresUrl
2140
+ ? ` | connection: ${postgresUrl.replace(/:\/\/([^:]+):([^@]+)@/, "://$1:***@")}`
2141
+ : ""));
2142
+ }
2143
+ // 2d-iii. OG tracking code initialization
2144
+ try {
2145
+ const { initializeOGCode } = await import("../api/og-tracker.js");
2146
+ initializeOGCode();
2147
+ }
2148
+ catch {
2149
+ // Silent — OG tracking is non-critical
2150
+ }
2151
+ // 2d-ii. Allow destructive migrations (e.g. dropping tables removed between
2152
+ // plugin versions) so the runtime doesn't silently stall. Without this
2153
+ // the migration system throws an error that gets swallowed, leaving the
2154
+ // app hanging indefinitely with no output.
2155
+ if (!process.env.ELIZA_ALLOW_DESTRUCTIVE_MIGRATIONS) {
2156
+ process.env.ELIZA_ALLOW_DESTRUCTIVE_MIGRATIONS = "true";
2157
+ }
2158
+ // 2e-ii. Ensure SECRET_SALT is set to suppress the @elizaos/core default
2159
+ // warning and avoid using a predictable value in production.
2160
+ if (!process.env.SECRET_SALT) {
2161
+ process.env.SECRET_SALT = crypto.randomBytes(32).toString("hex");
2162
+ logger.info("[eliza] Generated random SECRET_SALT for this session");
2163
+ }
2164
+ // 2e-iii. Pre-flight validation for Google AI API keys. If the key looks
2165
+ // obviously invalid (too short, placeholder, wrong prefix), clear it
2166
+ // to prevent plugin-google-genai from making a failing API call.
2167
+ for (const gkey of [
2168
+ "GEMINI_API_KEY",
2169
+ "GOOGLE_API_KEY",
2170
+ "GOOGLE_GENERATIVE_AI_API_KEY",
2171
+ ]) {
2172
+ const val = process.env[gkey]?.trim();
2173
+ if (val &&
2174
+ (val.length < 20 || val === "your-key-here" || val.startsWith("sk-"))) {
2175
+ logger.warn(`[eliza] ${gkey} appears invalid (length/format), clearing to skip Google AI plugin`);
2176
+ delete process.env[gkey];
2177
+ }
2178
+ }
2179
+ // 2f. Apply subscription-based credentials (Claude Max, Codex Max).
2180
+ // Failure is non-fatal — the agent can still start with other providers.
2181
+ // Config is NOT rolled back on failure; partial mutations may persist in
2182
+ // the in-memory config but are not saved to disk until explicit save.
2183
+ try {
2184
+ const { applySubscriptionCredentials } = await import("../auth/index.js");
2185
+ await applySubscriptionCredentials(config);
2186
+ }
2187
+ catch (err) {
2188
+ logger.warn(`[eliza] Failed to apply subscription credentials (agent will continue without them): ${formatError(err)}`);
2189
+ }
2190
+ // 2g. Cloud mode — if the user chose cloud during onboarding (or on a
2191
+ // subsequent start with cloud config), skip local runtime setup and
2192
+ // connect via the thin client instead.
2193
+ const deploymentTarget = resolveDeploymentTargetInConfig(config);
2194
+ if (deploymentTarget.runtime === "cloud" &&
2195
+ deploymentTarget.provider === "elizacloud" &&
2196
+ config.cloud?.apiKey &&
2197
+ config.cloud?.agentId?.trim()) {
2198
+ return startInCloudMode(config, config.cloud.agentId, opts);
2199
+ }
2200
+ // 3. Build elizaOS Character from Eliza config
2201
+ const character = buildCharacterFromConfig(config);
2202
+ const primaryModel = resolvePrimaryModel(config);
2203
+ const preferredProviderId = resolvePreferredProviderId(config);
2204
+ const preferredProviderPluginName = resolvePreferredProviderPluginName(config);
2205
+ // 4. Ensure workspace exists with required files
2206
+ const workspaceDir = config.agents?.defaults?.workspace ?? resolveDefaultAgentWorkspaceDir();
2207
+ await ensureAgentWorkspace({ dir: workspaceDir, ensureInitFiles: true });
2208
+ // 4b. Ensure custom plugins directory exists for drop-in plugins
2209
+ await fs.mkdir(path.join(resolveStateDir(), CUSTOM_RUNTIME_PLUGINS_DIRNAME), {
2210
+ recursive: true,
2211
+ });
2212
+ // 5. Create the Eliza bridge plugin (workspace context + session keys + compaction)
2213
+ const agentId = character.name?.toLowerCase().replace(/\s+/g, "-") ?? "main";
2214
+ // 5a. If cloud is configured and no local GitHub token, try fetching from cloud
2215
+ await autoFetchCloudGithubToken(config.cloud?.agentId?.trim() || agentId);
2216
+ const elizaPlugin = createElizaPlugin({
2217
+ workspaceDir,
2218
+ agentId,
2219
+ });
2220
+ // 6. Resolve and load plugins
2221
+ // In headless (GUI) mode before onboarding, the user hasn't configured a
2222
+ // provider yet. Downgrade diagnostics so the expected "no AI provider"
2223
+ // state doesn't appear as a scary Error in the terminal.
2224
+ const preOnboarding = opts?.headless && !config.agents;
2225
+ const resolvedPlugins = await resolvePlugins(config, {
2226
+ quiet: preOnboarding,
2227
+ });
2228
+ if (resolvedPlugins.length === 0) {
2229
+ if (preOnboarding) {
2230
+ logger.info("[eliza] No plugins loaded yet — the onboarding wizard will configure a model provider");
2231
+ }
2232
+ else {
2233
+ logger.error("[eliza] No plugins loaded — at least one model provider plugin is required");
2234
+ logger.error("[eliza] Set an API key (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY) in your environment");
2235
+ throw new Error("No plugins loaded");
2236
+ }
2237
+ }
2238
+ // 6b. Debug logging — print full context after provider + plugin resolution
2239
+ {
2240
+ const pluginNames = resolvedPlugins.map((p) => p.name);
2241
+ const providerNames = resolvedPlugins
2242
+ .flatMap((p) => p.plugin.providers ?? [])
2243
+ .map((prov) => prov.name);
2244
+ // Build a context summary for validation
2245
+ const contextSummary = {
2246
+ agentName: character.name,
2247
+ pluginCount: resolvedPlugins.length,
2248
+ providerCount: providerNames.length,
2249
+ primaryModel: primaryModel ?? "(auto-detect)",
2250
+ preferredProvider: preferredProviderId ?? "(auto-detect)",
2251
+ workspaceDir,
2252
+ };
2253
+ debugLogResolvedContext(pluginNames, providerNames, contextSummary, (msg) => logger.debug(msg));
2254
+ // Validate the context and surface issues early
2255
+ const contextValidation = validateRuntimeContext(contextSummary);
2256
+ if (!contextValidation.valid) {
2257
+ const issues = [];
2258
+ if (contextValidation.nullFields.length > 0) {
2259
+ issues.push(`null: ${contextValidation.nullFields.join(", ")}`);
2260
+ }
2261
+ if (contextValidation.undefinedFields.length > 0) {
2262
+ issues.push(`undefined: ${contextValidation.undefinedFields.join(", ")}`);
2263
+ }
2264
+ if (contextValidation.emptyFields.length > 0) {
2265
+ issues.push(`empty: ${contextValidation.emptyFields.join(", ")}`);
2266
+ }
2267
+ logger.warn(`[eliza] Context validation issues detected: ${issues.join("; ")}`);
2268
+ }
2269
+ }
2270
+ // 7. Create the AgentRuntime with Eliza plugin + resolved plugins
2271
+ // All CORE_PLUGINS are pre-registered sequentially (in CORE_PLUGINS
2272
+ // order) before runtime.initialize() so that cross-plugin getService()
2273
+ // calls always resolve. runtime.initialize() registers remaining
2274
+ // characterPlugins (connectors, providers, custom) in parallel — those
2275
+ // are NOT core and don't have ordering dependencies.
2276
+ const PREREGISTER_PLUGINS = new Set(CORE_PLUGINS);
2277
+ const sqlPlugin = resolvedPlugins.find((p) => p.name === "@elizaos/plugin-sql");
2278
+ const localEmbeddingPlugin = resolvedPlugins.find((p) => p.name === "@elizaos/plugin-local-embedding");
2279
+ const otherPlugins = resolvedPlugins.filter((p) => !PREREGISTER_PLUGINS.has(p.name));
2280
+ // Resolve the runtime log level from config (AgentRuntime doesn't support
2281
+ // "silent", so we map it to "fatal" as the quietest supported level).
2282
+ const runtimeLogLevel = (() => {
2283
+ // process.env.LOG_LEVEL is already resolved (set explicitly or from
2284
+ // config.logging.level above), so prefer it to honour the dev-mode
2285
+ // LOG_LEVEL=error override set by eliza/packages/app-core/scripts/dev-ui.mjs.
2286
+ const lvl = process.env.LOG_LEVEL ?? config.logging?.level ?? "error";
2287
+ if (lvl === "silent")
2288
+ return "fatal";
2289
+ return lvl;
2290
+ })();
2291
+ // 7a. Resolve bundled skills directory from @elizaos/skills so
2292
+ // plugin-agent-skills auto-loads them on startup.
2293
+ let bundledSkillsDir = null;
2294
+ try {
2295
+ const { getSkillsDir } = (await import("@elizaos/skills"));
2296
+ bundledSkillsDir = getSkillsDir();
2297
+ logger.info(`[eliza] Bundled skills dir: ${bundledSkillsDir}`);
2298
+ }
2299
+ catch {
2300
+ logger.debug("[eliza] @elizaos/skills not available — bundled skills will not be loaded");
2301
+ }
2302
+ // Workspace skills directory (highest precedence for overrides)
2303
+ const workspaceSkillsDir = workspaceDir ? `${workspaceDir}/skills` : null;
2304
+ const managedSkillsDir = path.join(resolveStateDir(), "skills");
2305
+ // ── Sandbox mode setup ──────────────────────────────────────────────────
2306
+ const sandboxConfig = config.agents?.defaults?.sandbox;
2307
+ const sandboxModeStr = sandboxConfig
2308
+ ?.mode;
2309
+ const sandboxMode = sandboxModeStr === "light" ||
2310
+ sandboxModeStr === "standard" ||
2311
+ sandboxModeStr === "max"
2312
+ ? sandboxModeStr
2313
+ : "off";
2314
+ const isSandboxActive = sandboxMode !== "off";
2315
+ let sandboxManager = null;
2316
+ let sandboxAuditLog = null;
2317
+ if (isSandboxActive) {
2318
+ logger.info(`[eliza] Sandbox mode: ${sandboxMode}`);
2319
+ sandboxAuditLog = new SandboxAuditLog({ console: true });
2320
+ // Standard/max modes also start the container sandbox manager
2321
+ if (sandboxMode === "standard" || sandboxMode === "max") {
2322
+ const dockerSettings = sandboxConfig?.docker;
2323
+ const browserSettings = sandboxConfig?.browser;
2324
+ sandboxManager = new SandboxManager({
2325
+ mode: sandboxMode,
2326
+ image: dockerSettings?.image ?? undefined,
2327
+ containerPrefix: dockerSettings?.containerPrefix ?? undefined,
2328
+ network: dockerSettings?.network ?? undefined,
2329
+ memory: dockerSettings?.memory ?? undefined,
2330
+ cpus: dockerSettings?.cpus ?? undefined,
2331
+ workspaceRoot: workspaceDir ?? undefined,
2332
+ browser: browserSettings
2333
+ ? {
2334
+ enabled: browserSettings.enabled ?? false,
2335
+ image: browserSettings.image ?? undefined,
2336
+ cdpPort: browserSettings.cdpPort ?? undefined,
2337
+ vncPort: browserSettings.vncPort ?? undefined,
2338
+ noVncPort: browserSettings.noVncPort ?? undefined,
2339
+ headless: browserSettings.headless ?? undefined,
2340
+ enableNoVnc: browserSettings.enableNoVnc ?? undefined,
2341
+ autoStart: browserSettings.autoStart ?? true,
2342
+ autoStartTimeoutMs: browserSettings.autoStartTimeoutMs ?? undefined,
2343
+ }
2344
+ : undefined,
2345
+ });
2346
+ try {
2347
+ await sandboxManager.start();
2348
+ logger.info("[eliza] Sandbox manager started");
2349
+ }
2350
+ catch (err) {
2351
+ logger.error(`[eliza] Sandbox manager failed to start: ${err instanceof Error ? err.message : String(err)}`);
2352
+ // Non-fatal: light mode fallback
2353
+ }
2354
+ }
2355
+ sandboxAuditLog.record({
2356
+ type: "sandbox_lifecycle",
2357
+ summary: `Sandbox initialized: mode=${sandboxMode}`,
2358
+ severity: "info",
2359
+ });
2360
+ }
2361
+ // ── End sandbox setup ───────────────────────────────────────────────────
2362
+ // ── Boost preferred provider plugin priority ──────────────────────────
2363
+ // elizaOS selects the model handler with the highest `priority` for each
2364
+ // ModelType. All provider plugins default to priority 0, so whichever
2365
+ // registers first wins — essentially random when using Promise.all.
2366
+ // When the user has explicitly selected a provider or model, prefer that
2367
+ // provider's plugin so its handlers are selected over registration order.
2368
+ const pluginsForRuntime = otherPlugins.map((p) => p.plugin);
2369
+ const visionModeSetting = resolveVisionModeSetting(config);
2370
+ if (preferredProviderPluginName) {
2371
+ for (const plugin of pluginsForRuntime) {
2372
+ if (plugin.name === preferredProviderPluginName) {
2373
+ plugin.priority = (plugin.priority ?? 0) + 10;
2374
+ logger.info(`[eliza] Boosted plugin "${plugin.name}" priority to ${plugin.priority} (preferred provider: ${preferredProviderId ?? "unknown"})`);
2375
+ break;
2376
+ }
2377
+ }
2378
+ }
2379
+ // ── Strip upstream skill providers ──────────────────────────────────────
2380
+ // The upstream @elizaos/plugin-agent-skills registers providers that dump
2381
+ // ALL loaded skills into every prompt (~2000-4000 tokens). Eliza replaces
2382
+ // them with a BM25-lite dynamic provider (see providers/skill-provider.ts)
2383
+ // that injects only the most relevant skills per turn.
2384
+ //
2385
+ // We keep:
2386
+ // - agent_skills_overview (lightweight stats, ~50 tokens)
2387
+ // - all actions (GET_SKILL_GUIDANCE, SEARCH_SKILLS, INSTALL_SKILL, …)
2388
+ // - the AGENT_SKILLS_SERVICE itself
2389
+ {
2390
+ const UPSTREAM_SKILL_PROVIDERS_TO_STRIP = new Set([
2391
+ "agent_skills",
2392
+ "agent_skill_instructions",
2393
+ "agent_skills_catalog",
2394
+ ]);
2395
+ for (const plugin of pluginsForRuntime) {
2396
+ if (plugin.name === "@elizaos/plugin-agent-skills" &&
2397
+ Array.isArray(plugin.providers)) {
2398
+ const before = plugin.providers.length;
2399
+ plugin.providers = plugin.providers.filter((p) => !UPSTREAM_SKILL_PROVIDERS_TO_STRIP.has(p.name ?? ""));
2400
+ const removed = before - plugin.providers.length;
2401
+ if (removed > 0) {
2402
+ logger.info(`[eliza] Stripped ${removed} upstream skill provider(s) — using dynamic BM25-lite provider instead`);
2403
+ }
2404
+ }
2405
+ }
2406
+ }
2407
+ // Deduplicate actions across all plugins to avoid "Action already registered"
2408
+ // warnings from elizaOS core. basic-capabilities is registered first by the
2409
+ // runtime, so include it in deduplication so its actions take precedence.
2410
+ const settings = character.settings ?? {};
2411
+ const basicCapabilitiesPlugin = createBasicCapabilitiesPlugin({
2412
+ disableBasic: settings.DISABLE_BASIC_CAPABILITIES === true ||
2413
+ settings.DISABLE_BASIC_CAPABILITIES === "true",
2414
+ enableExtended: settings.ENABLE_EXTENDED_CAPABILITIES === true ||
2415
+ settings.ENABLE_EXTENDED_CAPABILITIES === "true" ||
2416
+ settings.ADVANCED_CAPABILITIES === true ||
2417
+ settings.ADVANCED_CAPABILITIES === "true",
2418
+ skipCharacterProvider: false,
2419
+ enableAutonomy: settings.ENABLE_AUTONOMY === true || settings.ENABLE_AUTONOMY === "true",
2420
+ });
2421
+ deduplicatePluginActions([
2422
+ basicCapabilitiesPlugin,
2423
+ elizaPlugin,
2424
+ ...pluginsForRuntime,
2425
+ ]);
2426
+ let runtime = new AgentRuntime({
2427
+ character,
2428
+ // advancedCapabilities: true,
2429
+ actionPlanning: true,
2430
+ // advancedMemory is enabled via character.advancedMemory
2431
+ plugins: [elizaPlugin, ...pluginsForRuntime],
2432
+ ...(runtimeLogLevel ? { logLevel: runtimeLogLevel } : {}),
2433
+ // Sandbox options — only active when mode != "off"
2434
+ ...(isSandboxActive
2435
+ ? {
2436
+ sandboxMode: true,
2437
+ sandboxAuditHandler: sandboxAuditLog
2438
+ ? (event) => {
2439
+ sandboxAuditLog.recordTokenReplacement(event.direction, event.url, event.tokenIds);
2440
+ }
2441
+ : undefined,
2442
+ }
2443
+ : {}),
2444
+ settings: {
2445
+ VALIDATION_LEVEL: "fast",
2446
+ // Forward non-sensitive Eliza config.env vars as runtime settings so
2447
+ // plugins can access them via runtime.getSetting(). This fixes a bug where
2448
+ // plugins (e.g. @elizaos/plugin-google-genai) call runtime.getSetting()
2449
+ // which returns null for keys not in settings, but the plugin checks
2450
+ // !== undefined causing it to use "null" as the model name.
2451
+ //
2452
+ // Security: Filter out blockchain private keys and secrets. API keys are
2453
+ // allowed since plugins need them via runtime.getSetting(). Private keys
2454
+ // should only be accessed via process.env by signing services.
2455
+ ...Object.fromEntries(Object.entries(collectConfigEnvVars(config)).filter(([key]) => isEnvKeyAllowedForForwarding(key))),
2456
+ // Forward connector config vars as-is. The connector env map is curated
2457
+ // and plugins need access to secrets like passwords and tokens via
2458
+ // runtime.getSetting() for real transports to boot.
2459
+ ...collectConnectorEnvVars(config),
2460
+ // Forward Eliza config env vars as runtime settings
2461
+ ...(preferredProviderId ? { MODEL_PROVIDER: preferredProviderId } : {}),
2462
+ ...(visionModeSetting ? { VISION_MODE: visionModeSetting } : {}),
2463
+ ...resolveWalletRuntimeSettings(config),
2464
+ ...(typeof config.agents?.defaults?.adminEntityId === "string" &&
2465
+ config.agents.defaults.adminEntityId.trim().length > 0
2466
+ ? {
2467
+ ELIZA_ADMIN_ENTITY_ID: config.agents.defaults.adminEntityId.trim(),
2468
+ }
2469
+ : {}),
2470
+ ...(config.agents?.defaults?.ownerContacts
2471
+ ? {
2472
+ ELIZA_OWNER_CONTACTS_JSON: JSON.stringify(config.agents.defaults.ownerContacts),
2473
+ }
2474
+ : {}),
2475
+ ...(config.roles?.connectorAdmins
2476
+ ? {
2477
+ ELIZA_ROLES_CONNECTOR_ADMINS_JSON: JSON.stringify(config.roles.connectorAdmins),
2478
+ }
2479
+ : {}),
2480
+ // Forward skills config so plugin-agent-skills can apply allow/deny filtering
2481
+ ...(config.skills?.allowBundled
2482
+ ? { SKILLS_ALLOWLIST: config.skills.allowBundled.join(",") }
2483
+ : {}),
2484
+ ...(config.skills?.denyBundled
2485
+ ? { SKILLS_DENYLIST: config.skills.denyBundled.join(",") }
2486
+ : {}),
2487
+ // Managed skills are stored in the Eliza state dir (~/.eliza/skills).
2488
+ SKILLS_DIR: managedSkillsDir,
2489
+ // Tell plugin-agent-skills where to find bundled + workspace skills
2490
+ ...(bundledSkillsDir ? { BUNDLED_SKILLS_DIRS: bundledSkillsDir } : {}),
2491
+ ...(workspaceSkillsDir
2492
+ ? { WORKSPACE_SKILLS_DIR: workspaceSkillsDir }
2493
+ : {}),
2494
+ // Also forward extra dirs from config
2495
+ ...(config.skills?.load?.extraDirs?.length
2496
+ ? { EXTRA_SKILLS_DIRS: config.skills.load.extraDirs.join(",") }
2497
+ : {}),
2498
+ // Disable image description when vision is explicitly toggled off.
2499
+ // The cloud plugin always registers IMAGE_DESCRIPTION, so we need a
2500
+ // runtime setting to prevent the message service from calling it.
2501
+ ...(config.features?.vision === false
2502
+ ? { DISABLE_IMAGE_DESCRIPTION: "true" }
2503
+ : {}),
2504
+ },
2505
+ });
2506
+ installRuntimeMethodBindings(runtime);
2507
+ // 7b. Pre-register plugin-sql so the adapter is ready before other plugins init.
2508
+ // This is OPTIONAL — without it, some features (memory, todos) won't work.
2509
+ // runtime.db is a getter that returns this.adapter.db and throws when
2510
+ // this.adapter is undefined, so plugins that use runtime.db will fail.
2511
+ if (sqlPlugin) {
2512
+ // 7c. Eagerly initialize the database adapter so it's fully ready
2513
+ // BEFORE other plugins run their init(). When legacy/corrupt PGLite
2514
+ // state causes startup aborts, reset the local DB dir and retry once.
2515
+ await registerSqlPluginWithRecovery(runtime, sqlPlugin, config);
2516
+ }
2517
+ else {
2518
+ const loadedNames = resolvedPlugins.map((p) => p.name).join(", ");
2519
+ logger.error(`[eliza] @elizaos/plugin-sql was NOT found among resolved plugins. ` +
2520
+ `Loaded: [${loadedNames}]`);
2521
+ throw new Error("@elizaos/plugin-sql is required but was not loaded. " +
2522
+ "Ensure the package is installed and built (check for import errors above).");
2523
+ }
2524
+ // 7d. Pre-register plugin-local-embedding so its TEXT_EMBEDDING handler
2525
+ // (priority 10) is available before runtime.initialize() starts all
2526
+ // plugins in parallel. Without this, the basic-capabilities plugin's services
2527
+ // (ActionFilterService, EmbeddingGenerationService) race ahead and use
2528
+ // the cloud plugin's TEXT_EMBEDDING handler — which hits a paid API —
2529
+ // because local-embedding's heavier init hasn't completed yet.
2530
+ if (localEmbeddingPlugin) {
2531
+ configureLocalEmbeddingPlugin(localEmbeddingPlugin.plugin, config);
2532
+ await runtime.registerPlugin(localEmbeddingPlugin.plugin);
2533
+ logger.info("[eliza] plugin-local-embedding pre-registered (TEXT_EMBEDDING ready)");
2534
+ }
2535
+ else {
2536
+ logger.warn("[eliza] @elizaos/plugin-local-embedding not found — embeddings " +
2537
+ "will fall back to whatever TEXT_EMBEDDING handler is registered by " +
2538
+ "other plugins (may incur cloud API costs)");
2539
+ }
2540
+ // 7e. Pre-register remaining core plugins sequentially in CORE_PLUGINS order.
2541
+ // Each registerPlugin() call runs the plugin's init() before proceeding
2542
+ // to the next, guaranteeing that cross-plugin getService() calls resolve.
2543
+ {
2544
+ try {
2545
+ logger.info("[eliza] Pre-registering roles capability...");
2546
+ await runtime.registerPlugin(rolesPlugin);
2547
+ logger.info("[eliza] ✓ roles capability pre-registered");
2548
+ }
2549
+ catch (err) {
2550
+ logger.warn(`[eliza] Roles capability pre-registration failed: ${formatError(err)}`);
2551
+ }
2552
+ const alreadyPreRegistered = new Set([
2553
+ "@elizaos/plugin-sql",
2554
+ "@elizaos/plugin-local-embedding",
2555
+ ]);
2556
+ for (const name of CORE_PLUGINS) {
2557
+ if (alreadyPreRegistered.has(name))
2558
+ continue;
2559
+ const resolved = resolvedPlugins.find((p) => p.name === name);
2560
+ if (!resolved) {
2561
+ logger.debug(`[eliza] Core plugin ${name} not resolved — skipping pre-registration`);
2562
+ continue;
2563
+ }
2564
+ try {
2565
+ const regStart = Date.now();
2566
+ logger.info(`[eliza] Pre-registering core plugin: ${name}...`);
2567
+ const PLUGIN_REG_TIMEOUT_MS = 30_000;
2568
+ await Promise.race([
2569
+ runtime.registerPlugin(resolved.plugin),
2570
+ new Promise((_resolve, reject) => setTimeout(() => reject(new Error(`Timed out after ${PLUGIN_REG_TIMEOUT_MS / 1000}s`)), PLUGIN_REG_TIMEOUT_MS)),
2571
+ ]);
2572
+ logger.info(`[eliza] ✓ ${name} pre-registered (${Date.now() - regStart}ms)`);
2573
+ }
2574
+ catch (err) {
2575
+ logger.warn(`[eliza] Core plugin ${name} pre-registration failed: ${formatError(err)}`);
2576
+ }
2577
+ }
2578
+ }
2579
+ const warmAgentSkillsService = async () => {
2580
+ // Let runtime startup complete first; this warm-up runs asynchronously
2581
+ // so API + agent come online immediately.
2582
+ try {
2583
+ const skillServicePromise = runtime.getServiceLoadPromise("AGENT_SKILLS_SERVICE");
2584
+ const timeout = new Promise((_resolve, reject) => {
2585
+ setTimeout(() => {
2586
+ reject(new Error("AgentSkillsService warm-up timed out (10s) — non-blocking, agent will function without skills"));
2587
+ }, 10_000);
2588
+ });
2589
+ await Promise.race([skillServicePromise, timeout]);
2590
+ const svc = runtime.getService("AGENT_SKILLS_SERVICE");
2591
+ if (svc?.getCatalogStats) {
2592
+ const stats = svc.getCatalogStats();
2593
+ logger.info(`[eliza] AgentSkills ready — ${stats.loaded} skills loaded, ` +
2594
+ `${stats.total} in catalog (storage: ${stats.storageType})`);
2595
+ }
2596
+ // Guard against non-string skill.description values.
2597
+ // The bundled YAML parser produces {} for multi-line descriptions, which
2598
+ // crashes findBestLocalMatch / scoreSkillMatch (call .toLowerCase() on it).
2599
+ // Instead of a one-shot sanitize (which misses skills loaded later by
2600
+ // syncCatalog / autoRefresh), we monkey-patch getLoadedSkills to always
2601
+ // return sanitized values.
2602
+ const svcAny = svc;
2603
+ const origGetLoaded = svcAny?.getLoadedSkills;
2604
+ if (origGetLoaded && svcAny) {
2605
+ svcAny.getLoadedSkills = function (...args) {
2606
+ const skills = origGetLoaded.apply(this, args);
2607
+ for (const skill of skills) {
2608
+ if (typeof skill.description !== "string") {
2609
+ skill.description =
2610
+ skill.description == null
2611
+ ? ""
2612
+ : JSON.stringify(skill.description);
2613
+ }
2614
+ }
2615
+ return skills;
2616
+ };
2617
+ logger.debug("[eliza] Patched getLoadedSkills to guard descriptions");
2618
+ }
2619
+ }
2620
+ catch (err) {
2621
+ // Non-fatal — the agent can operate without skills. This warm-up runs
2622
+ // async so it doesn't block startup.
2623
+ logger.debug(`[eliza] AgentSkillsService warm-up: ${formatError(err)}`);
2624
+ }
2625
+ };
2626
+ const initializeRuntimeServices = async () => {
2627
+ try {
2628
+ const { stewardEvmPreBoot } = await import("../services/steward-evm-bridge.js");
2629
+ await stewardEvmPreBoot(runtime);
2630
+ }
2631
+ catch (err) {
2632
+ logger.debug(`[eliza] Steward EVM pre-boot skipped: ${formatError(err)}`);
2633
+ }
2634
+ // 7f. Pre-register ConnectorSetupService so connector plugins can access
2635
+ // shared config/escalation/owner-contact helpers via runtime.getService().
2636
+ try {
2637
+ const { ConnectorSetupService } = await import("../services/connector-setup-service.js");
2638
+ await runtime.registerService(ConnectorSetupService);
2639
+ }
2640
+ catch (err) {
2641
+ logger.debug(`[eliza] ConnectorSetupService registration skipped: ${formatError(err)}`);
2642
+ }
2643
+ // 8. Initialize the runtime (registers remaining plugins, starts services)
2644
+ assertPersistentDatabaseRequired(runtime);
2645
+ await runtime.initialize();
2646
+ await prepareRuntimeForTrajectoryCapture(runtime, "runtime.initialize()");
2647
+ // 8a. Apply role gating to wallet plugins (EVM, Solana) — admin-only actions.
2648
+ try {
2649
+ const { applyPluginRoleGating } = await import("./plugin-role-gating.js");
2650
+ applyPluginRoleGating(runtime.plugins ?? []);
2651
+ }
2652
+ catch (err) {
2653
+ logger.debug(`[eliza] Plugin role gating skipped: ${formatError(err)}`);
2654
+ }
2655
+ // 8b. Register lightweight conversation-proximity evaluator.
2656
+ // Updates relationship strength when people post near each other in a room.
2657
+ // No LLM calls — deterministic, runs on every message.
2658
+ try {
2659
+ const { updateProximityRelationships } = await import("../services/conversation-proximity.js");
2660
+ await runtime.registerPlugin({
2661
+ name: "eliza-conversation-proximity",
2662
+ description: "Lightweight relationship updates from conversation co-occurrence",
2663
+ evaluators: [
2664
+ {
2665
+ name: "CONVERSATION_PROXIMITY",
2666
+ description: "Update relationship strength for co-participants in a room",
2667
+ similes: [],
2668
+ alwaysRun: true,
2669
+ examples: [],
2670
+ validate: async (_runtime, message) => {
2671
+ // Run for any message with text from a real user (not the agent).
2672
+ const text = message.content?.text;
2673
+ return Boolean(text) && message.entityId !== _runtime.agentId;
2674
+ },
2675
+ handler: async (_runtime, message) => {
2676
+ await updateProximityRelationships(_runtime, message);
2677
+ return undefined;
2678
+ },
2679
+ },
2680
+ ],
2681
+ });
2682
+ logger.info("[eliza] ✓ conversation-proximity evaluator registered");
2683
+ }
2684
+ catch (err) {
2685
+ logger.debug(`[eliza] Conversation-proximity evaluator skipped: ${formatError(err)}`);
2686
+ }
2687
+ try {
2688
+ if (runtimeKnowledgeEnabled(runtime)) {
2689
+ await seedBundledKnowledge(runtime);
2690
+ }
2691
+ else {
2692
+ logger.info("[eliza] Native knowledge disabled; skipping bundled knowledge seeding");
2693
+ }
2694
+ }
2695
+ catch (err) {
2696
+ logger.warn(`[eliza] Failed to seed bundled knowledge: ${formatError(err)}`);
2697
+ }
2698
+ try {
2699
+ const { stewardEvmPostBoot } = await import("../services/steward-evm-bridge.js");
2700
+ await stewardEvmPostBoot(runtime);
2701
+ }
2702
+ catch (err) {
2703
+ logger.debug(`[eliza] Steward EVM post-boot skipped: ${formatError(err)}`);
2704
+ }
2705
+ try {
2706
+ const { installAnthropicWebSearch } = await import("./web-search-tools.js");
2707
+ installAnthropicWebSearch(runtime);
2708
+ }
2709
+ catch (err) {
2710
+ logger.debug(`[eliza] Anthropic web search setup skipped: ${formatError(err)}`);
2711
+ }
2712
+ // 8b. Ensure AutonomyService is available for trigger dispatch.
2713
+ // registers this service) from loading, so we start it explicitly.
2714
+ // Respect ENABLE_AUTONOMY env var — cloud-provisioned containers may
2715
+ // disable this to prevent runaway autonomous actions.
2716
+ const autonomyEnabled = (process.env.ENABLE_AUTONOMY ?? "true").toLowerCase() !== "false";
2717
+ if (autonomyEnabled && !runtime.getService("AUTONOMY")) {
2718
+ try {
2719
+ await AutonomyService.start(runtime);
2720
+ logger.info("[eliza] AutonomyService started for trigger dispatch");
2721
+ }
2722
+ catch (err) {
2723
+ logger.warn(`[eliza] AutonomyService failed to start: ${formatError(err)}`);
2724
+ }
2725
+ }
2726
+ else if (!autonomyEnabled) {
2727
+ logger.info("[eliza] AutonomyService skipped — ENABLE_AUTONOMY=false");
2728
+ }
2729
+ // Enable the autonomy loop so trigger/heartbeat instructions are
2730
+ // actually processed. Without this, memories created by
2731
+ // dispatchInstruction() sit in the DB and are never acted on.
2732
+ if (autonomyEnabled) {
2733
+ const autonomySvc = (runtime.getService("AUTONOMY") ??
2734
+ runtime.getService("autonomy"));
2735
+ if (autonomySvc && typeof autonomySvc.enableAutonomy === "function") {
2736
+ try {
2737
+ await autonomySvc.enableAutonomy();
2738
+ logger.info("[eliza] AutonomyService enabled — trigger instructions will be processed");
2739
+ }
2740
+ catch (err) {
2741
+ logger.warn(`[eliza] Failed to enable autonomy loop: ${formatError(err)}`);
2742
+ }
2743
+ }
2744
+ }
2745
+ // Do not block runtime startup on skills warm-up.
2746
+ void warmAgentSkillsService().catch((err) => {
2747
+ logger.warn(`[eliza] Skills warm-up failed: ${formatError(err)}`);
2748
+ });
2749
+ };
2750
+ try {
2751
+ await initializeRuntimeServices();
2752
+ }
2753
+ catch (err) {
2754
+ const pgliteDataDir = resolveActivePgliteDataDir(config);
2755
+ const recoveryAction = !opts?.pgliteRecoveryAttempted && pgliteDataDir
2756
+ ? getPgliteRecoveryAction(err, pgliteDataDir)
2757
+ : "none";
2758
+ if (!pgliteDataDir || recoveryAction === "none") {
2759
+ throw err;
2760
+ }
2761
+ if (recoveryAction === "fail-active-lock") {
2762
+ throw createActivePgliteLockError(pgliteDataDir, err);
2763
+ }
2764
+ if (recoveryAction === "fail-manual-reset") {
2765
+ throw createManualResetRequiredPgliteError(pgliteDataDir, err);
2766
+ }
2767
+ logger.warn(`[eliza] Runtime migrations failed (${formatError(err)}). Cleared a stale PGLite lock in ${pgliteDataDir} and retrying startup once without resetting data.`);
2768
+ try {
2769
+ await shutdownRuntime(runtime, "PGLite recovery");
2770
+ }
2771
+ catch {
2772
+ // Ignore cleanup errors — retry creates a fresh runtime anyway.
2773
+ }
2774
+ return await startEliza({
2775
+ ...opts,
2776
+ pgliteRecoveryAttempted: true,
2777
+ });
2778
+ }
2779
+ installActionAliases(runtime);
2780
+ // 9. Graceful shutdown handler
2781
+ //
2782
+ // In headless mode the caller (dev-server / desktop shell) owns the process
2783
+ // lifecycle, so we must NOT register signal handlers here — they would
2784
+ // stack on every hot-restart, close over stale runtime references, and
2785
+ // race with bun --watch's own process teardown.
2786
+ if (!opts?.headless) {
2787
+ registerSignalShutdownHandlers({
2788
+ getRuntime: () => runtime,
2789
+ getSandboxManager: () => sandboxManager,
2790
+ });
2791
+ }
2792
+ const loadHooksSystem = async () => {
2793
+ try {
2794
+ const internalHooksConfig = config.hooks
2795
+ ?.internal;
2796
+ await loadHooks({
2797
+ workspacePath: workspaceDir,
2798
+ internalConfig: internalHooksConfig,
2799
+ elizaConfig: config,
2800
+ });
2801
+ const startupEvent = createHookEvent("gateway", "startup", "system", {
2802
+ cfg: config,
2803
+ });
2804
+ await triggerHook(startupEvent);
2805
+ }
2806
+ catch (err) {
2807
+ logger.warn(`[eliza] Hooks system could not load: ${formatError(err)}`);
2808
+ }
2809
+ };
2810
+ // ── Headless mode — return runtime for API server wiring ──────────────
2811
+ if (opts?.headless) {
2812
+ void loadHooksSystem().catch((err) => {
2813
+ logger.warn(`[eliza] Hooks system load failed: ${formatError(err)}`);
2814
+ });
2815
+ logger.info("[eliza] Runtime initialised in headless mode (autonomy enabled)");
2816
+ return runtime;
2817
+ }
2818
+ // 10. Load hooks system
2819
+ await loadHooksSystem();
2820
+ // ── Start API server for GUI access ──────────────────────────────────────
2821
+ // In CLI mode (non-headless), start the API server in the background so
2822
+ // the GUI can connect to the running agent. This ensures full feature
2823
+ // parity: whether started via `npx elizaos`, `bun run dev`, or the
2824
+ // desktop app, the API server is always available for the GUI admin
2825
+ // surface.
2826
+ try {
2827
+ const { startApiServer } = await import("../api/server.js");
2828
+ const apiPort = resolveServerOnlyPort(process.env);
2829
+ const { port: actualApiPort } = await startApiServer({
2830
+ port: apiPort,
2831
+ runtime,
2832
+ onRestart: async () => {
2833
+ logger.info("[eliza] Hot-reload: Restarting runtime...");
2834
+ try {
2835
+ // Stop the old runtime to release resources (DB connections, timers, etc.)
2836
+ try {
2837
+ await shutdownRuntime(runtime, "hot-reload cleanup");
2838
+ }
2839
+ catch (stopErr) {
2840
+ logger.warn(`[eliza] Hot-reload: old runtime stop failed: ${formatError(stopErr)}`);
2841
+ }
2842
+ // Reload config from disk (updated by API)
2843
+ const freshConfig = loadElizaConfig();
2844
+ // Propagate secrets & cloud config into process.env so plugins
2845
+ // (especially plugin-elizacloud) can discover them. The initial
2846
+ // startup does this in startEliza(); the hot-reload must repeat it
2847
+ // because the config may have changed (e.g. cloud enabled during
2848
+ // onboarding).
2849
+ applyConnectorSecretsToEnv(freshConfig);
2850
+ await autoResolveDiscordAppId();
2851
+ applyCloudConfigToEnv(freshConfig);
2852
+ applyX402ConfigToEnv(freshConfig);
2853
+ applyDatabaseConfigToEnv(freshConfig);
2854
+ await autoFetchCloudGithubToken(freshConfig.cloud?.agentId?.trim() || agentId);
2855
+ // Apply subscription-based credentials (Claude Max, Codex Max)
2856
+ // that may have been set up during onboarding.
2857
+ try {
2858
+ const { applySubscriptionCredentials } = await import("../auth/index.js");
2859
+ await applySubscriptionCredentials(freshConfig);
2860
+ }
2861
+ catch (subErr) {
2862
+ logger.warn(`[eliza] Hot-reload: subscription credentials: ${formatError(subErr)}`);
2863
+ }
2864
+ // Resolve plugins using same function as startup
2865
+ const resolvedPlugins = await resolvePlugins(freshConfig);
2866
+ // Rebuild character from the fresh config so onboarding changes
2867
+ // (name, bio, style, etc.) are picked up on restart.
2868
+ const freshCharacter = buildCharacterFromConfig(freshConfig);
2869
+ // Recreate Eliza plugin with fresh workspace
2870
+ const freshElizaPlugin = createElizaPlugin({
2871
+ workspaceDir: freshConfig.agents?.defaults?.workspace ?? workspaceDir,
2872
+ agentId: freshCharacter.name?.toLowerCase().replace(/\s+/g, "-") ?? "main",
2873
+ });
2874
+ // Create new runtime with updated plugins.
2875
+ // Filter out pre-registered plugins so they aren't double-loaded
2876
+ // inside initialize()'s Promise.all — same pattern as the initial
2877
+ // startup to avoid the TEXT_EMBEDDING race condition.
2878
+ const freshPreferredProviderId = resolvePreferredProviderId(freshConfig);
2879
+ const freshPreferredProviderPluginName = resolvePreferredProviderPluginName(freshConfig);
2880
+ const freshOtherPlugins = resolvedPlugins.filter((p) => !PREREGISTER_PLUGINS.has(p.name));
2881
+ // Boost the preferred provider plugin priority (same as initial startup)
2882
+ const freshPluginsForRuntime = freshOtherPlugins.map((p) => p.plugin);
2883
+ const freshVisionModeSetting = resolveVisionModeSetting(freshConfig);
2884
+ if (freshPreferredProviderPluginName) {
2885
+ for (const plugin of freshPluginsForRuntime) {
2886
+ if (plugin.name === freshPreferredProviderPluginName) {
2887
+ plugin.priority = (plugin.priority ?? 0) + 10;
2888
+ break;
2889
+ }
2890
+ }
2891
+ }
2892
+ const newRuntime = new AgentRuntime({
2893
+ character: freshCharacter,
2894
+ plugins: [freshElizaPlugin, ...freshPluginsForRuntime],
2895
+ ...(runtimeLogLevel ? { logLevel: runtimeLogLevel } : {}),
2896
+ settings: {
2897
+ ...(freshPreferredProviderId
2898
+ ? { MODEL_PROVIDER: freshPreferredProviderId }
2899
+ : {}),
2900
+ ...(freshVisionModeSetting
2901
+ ? { VISION_MODE: freshVisionModeSetting }
2902
+ : {}),
2903
+ // Disable image description when vision is explicitly toggled off.
2904
+ ...(freshConfig.features?.vision === false
2905
+ ? { DISABLE_IMAGE_DESCRIPTION: "true" }
2906
+ : {}),
2907
+ },
2908
+ });
2909
+ installRuntimeMethodBindings(newRuntime);
2910
+ // Pre-register plugin-sql + local-embedding before initialize()
2911
+ // to avoid the same race condition as the initial startup.
2912
+ // Re-derive from freshly resolved plugins (not outer closure) so
2913
+ // hot-reload picks up any plugin updates.
2914
+ const freshSqlPlugin = resolvedPlugins.find((p) => p.name === "@elizaos/plugin-sql");
2915
+ const freshLocalEmbeddingPlugin = resolvedPlugins.find((p) => p.name === "@elizaos/plugin-local-embedding");
2916
+ if (freshSqlPlugin) {
2917
+ await registerSqlPluginWithRecovery(newRuntime, freshSqlPlugin, freshConfig);
2918
+ }
2919
+ if (freshLocalEmbeddingPlugin) {
2920
+ configureLocalEmbeddingPlugin(freshLocalEmbeddingPlugin.plugin, freshConfig);
2921
+ await newRuntime.registerPlugin(freshLocalEmbeddingPlugin.plugin);
2922
+ }
2923
+ // Pre-register remaining core plugins sequentially (same as startup)
2924
+ {
2925
+ try {
2926
+ await newRuntime.registerPlugin(rolesPlugin);
2927
+ }
2928
+ catch (err) {
2929
+ logger.warn(`[eliza] Hot-reload: roles capability pre-registration failed: ${formatError(err)}`);
2930
+ }
2931
+ const alreadyPreRegistered = new Set([
2932
+ "@elizaos/plugin-sql",
2933
+ "@elizaos/plugin-local-embedding",
2934
+ ]);
2935
+ for (const name of CORE_PLUGINS) {
2936
+ if (alreadyPreRegistered.has(name))
2937
+ continue;
2938
+ const resolved = resolvedPlugins.find((p) => p.name === name);
2939
+ if (!resolved)
2940
+ continue;
2941
+ try {
2942
+ await newRuntime.registerPlugin(resolved.plugin);
2943
+ }
2944
+ catch (err) {
2945
+ logger.warn(`[eliza] Hot-reload: core plugin ${name} pre-registration failed: ${formatError(err)}`);
2946
+ }
2947
+ }
2948
+ }
2949
+ assertPersistentDatabaseRequired(newRuntime);
2950
+ try {
2951
+ const { ConnectorSetupService: CSSReload } = await import("../services/connector-setup-service.js");
2952
+ await newRuntime.registerService(CSSReload);
2953
+ }
2954
+ catch {
2955
+ // non-fatal
2956
+ }
2957
+ try {
2958
+ const { stewardEvmPreBoot: preBootHR } = await import("../services/steward-evm-bridge.js");
2959
+ await preBootHR(newRuntime);
2960
+ }
2961
+ catch {
2962
+ // non-fatal
2963
+ }
2964
+ assertPersistentDatabaseRequired(newRuntime);
2965
+ await newRuntime.initialize();
2966
+ await prepareRuntimeForTrajectoryCapture(newRuntime, "hot-reload runtime.initialize()");
2967
+ try {
2968
+ const { stewardEvmPostBoot: postBootHR } = await import("../services/steward-evm-bridge.js");
2969
+ await postBootHR(newRuntime);
2970
+ }
2971
+ catch {
2972
+ // non-fatal
2973
+ }
2974
+ // Ensure AutonomyService survives hot-reload (respects ENABLE_AUTONOMY)
2975
+ const hotReloadAutonomyEnabled = (process.env.ENABLE_AUTONOMY ?? "true").toLowerCase() !== "false";
2976
+ if (hotReloadAutonomyEnabled && !newRuntime.getService("AUTONOMY")) {
2977
+ try {
2978
+ await AutonomyService.start(newRuntime);
2979
+ }
2980
+ catch (err) {
2981
+ logger.warn(`[eliza] AutonomyService failed to start after hot-reload: ${formatError(err)}`);
2982
+ }
2983
+ }
2984
+ // Enable the autonomy loop after hot-reload (same as initial boot)
2985
+ if (hotReloadAutonomyEnabled) {
2986
+ const svc = (newRuntime.getService("AUTONOMY") ??
2987
+ newRuntime.getService("autonomy"));
2988
+ if (svc && typeof svc.enableAutonomy === "function") {
2989
+ try {
2990
+ await svc.enableAutonomy();
2991
+ }
2992
+ catch (err) {
2993
+ logger.warn(`[eliza] Failed to enable autonomy after hot-reload: ${formatError(err)}`);
2994
+ }
2995
+ }
2996
+ }
2997
+ installActionAliases(newRuntime);
2998
+ runtime = newRuntime;
2999
+ logger.info("[eliza] Hot-reload: Runtime restarted successfully");
3000
+ return newRuntime;
3001
+ }
3002
+ catch (err) {
3003
+ logger.error(`[eliza] Hot-reload failed: ${formatError(err)}`);
3004
+ return null;
3005
+ }
3006
+ },
3007
+ });
3008
+ const dashboardUrl = `http://localhost:${actualApiPort}`;
3009
+ console.log(`[eliza] Control UI: ${dashboardUrl}`);
3010
+ logger.info(`[eliza] API server listening on ${dashboardUrl}`);
3011
+ }
3012
+ catch (apiErr) {
3013
+ // Log to both stderr (visible to Electrobun agent.ts) and the in-memory
3014
+ // logger so the error is never silently swallowed in packaged builds.
3015
+ const apiErrMsg = `[eliza] Could not start API server: ${formatError(apiErr)}`;
3016
+ console.error(apiErrMsg);
3017
+ logger.warn(apiErrMsg);
3018
+ // In server-only mode (Electrobun desktop), a missing API server is fatal
3019
+ // — nothing else can serve requests. Exit so the parent process sees a
3020
+ // non-zero exit code instead of the misleading "Server running" message.
3021
+ if (opts?.serverOnly) {
3022
+ console.error("[eliza] Exiting: API server is required in server-only mode.");
3023
+ process.exit(1);
3024
+ }
3025
+ // Non-fatal in CLI mode — the interactive chat loop still works.
3026
+ }
3027
+ // ── Server-only mode — keep running without chat loop ────────────────────
3028
+ if (opts?.serverOnly) {
3029
+ logger.info("[eliza] Running in server-only mode (no interactive chat)");
3030
+ console.log("[eliza] Server running. Press Ctrl+C to stop.");
3031
+ // Keep process alive — the API server handles all interaction
3032
+ const keepAlive = setInterval(() => { }, 1 << 30); // ~12 days
3033
+ registerSignalShutdownHandlers({
3034
+ getRuntime: () => runtime,
3035
+ getSandboxManager: () => sandboxManager,
3036
+ beforeShutdown: () => {
3037
+ clearInterval(keepAlive);
3038
+ },
3039
+ });
3040
+ return runtime;
3041
+ }
3042
+ // ── Interactive chat loop ────────────────────────────────────────────────
3043
+ const agentName = character.name ?? "Eliza";
3044
+ const userId = crypto.randomUUID();
3045
+ // Use `let` so the fallback path can reassign to fresh IDs.
3046
+ let roomId = stringToUuid(`${agentName}-chat-room`);
3047
+ try {
3048
+ const worldId = stringToUuid(`${agentName}-chat-world`);
3049
+ // Use a deterministic messageServerId so the settings provider
3050
+ // can reference the world by serverId after it is found.
3051
+ const messageServerId = stringToUuid(`${agentName}-cli-server`);
3052
+ await runtime.ensureConnection({
3053
+ entityId: userId,
3054
+ roomId,
3055
+ worldId,
3056
+ userName: "User",
3057
+ source: "cli",
3058
+ channelId: `${agentName}-chat`,
3059
+ type: ChannelType.DM,
3060
+ messageServerId,
3061
+ metadata: { ownership: { ownerId: userId } },
3062
+ });
3063
+ // Ensure the world has ownership metadata so the settings
3064
+ // provider can locate it via findWorldsForOwner during onboarding.
3065
+ // This also handles worlds that already exist from a prior session
3066
+ // but were created without ownership metadata.
3067
+ const world = await runtime.getWorld(worldId);
3068
+ if (world) {
3069
+ let needsUpdate = false;
3070
+ if (!world.metadata) {
3071
+ world.metadata = {};
3072
+ needsUpdate = true;
3073
+ }
3074
+ if (!world.metadata.ownership ||
3075
+ typeof world.metadata.ownership !== "object" ||
3076
+ world.metadata.ownership.ownerId !== userId) {
3077
+ world.metadata.ownership = { ownerId: userId };
3078
+ needsUpdate = true;
3079
+ }
3080
+ if (needsUpdate) {
3081
+ await runtime.updateWorld(world);
3082
+ }
3083
+ }
3084
+ }
3085
+ catch (err) {
3086
+ logger.warn(`[eliza] Could not establish chat room, retrying with fresh IDs: ${formatError(err)}`);
3087
+ // Fall back to unique IDs if deterministic ones conflict with stale data.
3088
+ // IMPORTANT: reassign roomId so the message loop below uses the same room.
3089
+ roomId = crypto.randomUUID();
3090
+ const freshWorldId = crypto.randomUUID();
3091
+ const freshServerId = crypto.randomUUID();
3092
+ try {
3093
+ await runtime.ensureConnection({
3094
+ entityId: userId,
3095
+ roomId,
3096
+ worldId: freshWorldId,
3097
+ userName: "User",
3098
+ source: "cli",
3099
+ channelId: `${agentName}-chat`,
3100
+ type: ChannelType.DM,
3101
+ messageServerId: freshServerId,
3102
+ metadata: { ownership: { ownerId: userId } },
3103
+ });
3104
+ // Same ownership metadata fix for the fallback world.
3105
+ const fallbackWorld = await runtime.getWorld(freshWorldId);
3106
+ if (fallbackWorld) {
3107
+ let needsUpdate = false;
3108
+ if (!fallbackWorld.metadata) {
3109
+ fallbackWorld.metadata = {};
3110
+ needsUpdate = true;
3111
+ }
3112
+ if (!fallbackWorld.metadata.ownership ||
3113
+ typeof fallbackWorld.metadata.ownership !== "object" ||
3114
+ fallbackWorld.metadata.ownership.ownerId !==
3115
+ userId) {
3116
+ fallbackWorld.metadata.ownership = { ownerId: userId };
3117
+ needsUpdate = true;
3118
+ }
3119
+ if (needsUpdate) {
3120
+ await runtime.updateWorld(fallbackWorld);
3121
+ }
3122
+ }
3123
+ }
3124
+ catch (retryErr) {
3125
+ logger.error(`[eliza] Chat room setup failed after retry: ${formatError(retryErr)}`);
3126
+ throw retryErr;
3127
+ }
3128
+ }
3129
+ const rl = readline.createInterface({
3130
+ input: process.stdin,
3131
+ output: process.stdout,
3132
+ });
3133
+ console.log(`\n💬 Chat with ${agentName} (type 'exit' to quit)\n`);
3134
+ const prompt = () => {
3135
+ rl.question("You: ", async (input) => {
3136
+ const text = input.trim();
3137
+ if (text.toLowerCase() === "exit" || text.toLowerCase() === "quit") {
3138
+ console.log("\nGoodbye!");
3139
+ rl.close();
3140
+ try {
3141
+ await shutdownRuntime(runtime, "cli shutdown");
3142
+ }
3143
+ catch (err) {
3144
+ logger.warn(`[eliza] Error stopping runtime: ${formatError(err)}`);
3145
+ }
3146
+ process.exit(0);
3147
+ }
3148
+ if (!text) {
3149
+ prompt();
3150
+ return;
3151
+ }
3152
+ try {
3153
+ const message = createMessageMemory({
3154
+ id: crypto.randomUUID(),
3155
+ entityId: userId,
3156
+ roomId,
3157
+ content: {
3158
+ text,
3159
+ source: "client_chat",
3160
+ channelType: ChannelType.DM,
3161
+ },
3162
+ });
3163
+ process.stdout.write(`${agentName}: `);
3164
+ if (!runtime.messageService) {
3165
+ logger.error("[eliza] runtime.messageService is not available — cannot process messages");
3166
+ console.log("[Error: message service unavailable]\n");
3167
+ prompt();
3168
+ return;
3169
+ }
3170
+ await runtime.messageService.handleMessage(runtime, message, async (content) => {
3171
+ if (content?.text) {
3172
+ process.stdout.write(content.text);
3173
+ }
3174
+ return [];
3175
+ });
3176
+ console.log("\n");
3177
+ }
3178
+ catch (err) {
3179
+ // Log the error and continue the prompt loop — don't let a single
3180
+ // failed message kill the interactive session.
3181
+ console.log(`\n[Error: ${formatError(err)}]\n`);
3182
+ logger.error(`[eliza] Chat message handling failed: ${formatError(err)}`);
3183
+ }
3184
+ prompt();
3185
+ });
3186
+ };
3187
+ prompt();
3188
+ }
3189
+ // When run directly (not imported), start immediately.
3190
+ // Use path.resolve to normalise both sides before comparing so that
3191
+ // symlinks, trailing slashes, and relative paths don't cause false negatives.
3192
+ // ---------------------------------------------------------------------------
3193
+ // Cloud thin-client mode
3194
+ // ---------------------------------------------------------------------------
3195
+ /**
3196
+ * Start in cloud mode — connect to a remote cloud agent via the thin client.
3197
+ * Skips all local runtime construction (plugins, database, etc.).
3198
+ */
3199
+ export async function startInCloudMode(config, agentId, opts) {
3200
+ const { CloudManager } = await import("../cloud/cloud-manager.js");
3201
+ const cloudConfig = config.cloud;
3202
+ if (!cloudConfig) {
3203
+ throw new Error("Cloud mode requires a cloud configuration block in the config");
3204
+ }
3205
+ logger.info(`[eliza] Starting in cloud mode (agentId=${agentId}, baseUrl=${cloudConfig.baseUrl ?? "(default)"})`);
3206
+ const manager = new CloudManager(cloudConfig, {
3207
+ onStatusChange: (status) => {
3208
+ logger.info(`[eliza] Cloud connection: ${status}`);
3209
+ },
3210
+ });
3211
+ try {
3212
+ await manager.init();
3213
+ const proxy = await manager.connect(agentId);
3214
+ if (opts?.headless || opts?.serverOnly) {
3215
+ // In headless/server mode, start the API server with the cloud proxy.
3216
+ // The proxy exposes the same interface the API server needs.
3217
+ logger.info(`[eliza] Cloud agent connected (headless). Agent: ${proxy.agentName}`);
3218
+ // Return undefined here; GUI cloud mode is handled through the
3219
+ // dedicated cloud proxy routes instead of a local AgentRuntime.
3220
+ return undefined;
3221
+ }
3222
+ // Interactive CLI mode — simple chat loop against the cloud agent
3223
+ console.log(`\n☁️ Connected to cloud agent "${proxy.agentName}" (${agentId})\n`);
3224
+ console.log("Type a message to chat, or Ctrl+C to quit.\n");
3225
+ const rl = (await import("node:readline")).createInterface({
3226
+ input: process.stdin,
3227
+ output: process.stdout,
3228
+ });
3229
+ const prompt = () => {
3230
+ rl.question("You: ", async (input) => {
3231
+ const text = input.trim();
3232
+ if (!text) {
3233
+ prompt();
3234
+ return;
3235
+ }
3236
+ try {
3237
+ // Use streaming if available
3238
+ let response = "";
3239
+ process.stdout.write(`${proxy.agentName}: `);
3240
+ for await (const chunk of proxy.handleChatMessageStream(text)) {
3241
+ process.stdout.write(chunk);
3242
+ response += chunk;
3243
+ }
3244
+ if (!response) {
3245
+ // Fallback to non-streaming
3246
+ response = await proxy.handleChatMessage(text);
3247
+ process.stdout.write(response);
3248
+ }
3249
+ console.log("\n");
3250
+ }
3251
+ catch (err) {
3252
+ const msg = err instanceof Error ? err.message : String(err);
3253
+ console.error(`\n[error] ${msg}\n`);
3254
+ }
3255
+ prompt();
3256
+ });
3257
+ };
3258
+ rl.on("close", async () => {
3259
+ console.log("\nDisconnecting from cloud agent...");
3260
+ await manager.disconnect();
3261
+ process.exit(0);
3262
+ });
3263
+ prompt();
3264
+ // Keep the process alive
3265
+ return undefined;
3266
+ }
3267
+ catch (err) {
3268
+ const msg = err instanceof Error ? err.message : String(err);
3269
+ logger.error(`[eliza] Failed to connect to cloud agent: ${msg}`);
3270
+ throw new Error(`Failed to connect to cloud agent: ${msg}\n` +
3271
+ "You can retry with `eliza start`, or switch to local mode by setting `deploymentTarget.runtime` to `local`");
3272
+ }
3273
+ }
3274
+ const isDirectRun = (() => {
3275
+ const scriptArg = process.argv[1];
3276
+ if (!scriptArg)
3277
+ return false;
3278
+ const normalised = path.resolve(scriptArg);
3279
+ return import.meta.url === pathToFileURL(normalised).href;
3280
+ })();
3281
+ if (isDirectRun) {
3282
+ startEliza().catch((err) => {
3283
+ console.error("[eliza] Fatal error:", err instanceof Error ? (err.stack ?? err.message) : err);
3284
+ process.exit(1);
3285
+ });
3286
+ }