@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,3163 @@
1
+ import { v4 } from "uuid";
2
+ import { parseActionParams } from "../actions";
3
+ import { createUniqueUuid } from "../entities";
4
+ import { formatTaskCompletionStatus, getTaskCompletionCacheKey, } from "../features/advanced-capabilities/evaluators/task-completion";
5
+ import { logger } from "../logger";
6
+ import { imageDescriptionTemplate, messageHandlerTemplate, multiStepDecisionTemplate, multiStepSummaryTemplate, postActionDecisionTemplate, shouldRespondTemplate, } from "../prompts";
7
+ import { isExplicitSelfModificationRequest } from "../should-respond";
8
+ import { runWithStreamingContext } from "../streaming-context";
9
+ import { runWithTrajectoryContext, setTrajectoryPurpose, } from "../trajectory-context";
10
+ import { EventType } from "../types/events";
11
+ import { ModelType } from "../types/model";
12
+ import { asUUID, ChannelType, ContentType } from "../types/primitives";
13
+ import { composePromptFromState, getLocalServerUrl, parseBooleanFromText, parseKeyValueXml, truncateToCompleteSentence, } from "../utils";
14
+ import { AVAILABLE_CONTEXTS_STATE_KEY, attachAvailableContexts, CONTEXT_ROUTING_STATE_KEY, mergeContextRouting, parseContextRoutingMetadata, setContextRoutingMetadata, } from "../utils/context-routing";
15
+ import { createStreamingContext, MarkableExtractor, ResponseStreamExtractor, } from "../utils/streaming";
16
+ import { extractFirstSentence, hasFirstSentence, } from "../utils/text-splitting";
17
+ /**
18
+ * Reserved XML response keys that are NOT action names.
19
+ * Used when scanning parsedXml for standalone action param blocks.
20
+ */
21
+ export const RESERVED_XML_KEYS = new Set([
22
+ "actions",
23
+ "thought",
24
+ "text",
25
+ "simple",
26
+ "providers",
27
+ ]);
28
+ function escapeRegex(value) {
29
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
30
+ }
31
+ function textContainsAgentName(text, names) {
32
+ if (!text) {
33
+ return false;
34
+ }
35
+ return names.some((name) => {
36
+ const candidate = name?.trim();
37
+ if (!candidate) {
38
+ return false;
39
+ }
40
+ const pattern = new RegExp(`(^|[^\\p{L}\\p{N}])${escapeRegex(candidate)}(?=$|[^\\p{L}\\p{N}])`, "iu");
41
+ return pattern.test(text);
42
+ });
43
+ }
44
+ function textContainsUserTag(text) {
45
+ if (!text) {
46
+ return false;
47
+ }
48
+ return /<@!?[^>]+>|@\w+/u.test(text);
49
+ }
50
+ const DEFAULT_DUAL_PRESSURE_THRESHOLD = 20;
51
+ const ALLOWED_CLASSIFIER_ACTIONS = new Set([
52
+ "REPLY",
53
+ "RESPOND",
54
+ "IGNORE",
55
+ "STOP",
56
+ ]);
57
+ function resolveDualPressureThreshold(runtime) {
58
+ const raw = runtime.getSetting("DUAL_PRESSURE_THRESHOLD");
59
+ const value = Number.parseInt(String(raw ?? ""), 10);
60
+ if (Number.isFinite(value) && value >= 1 && value <= 100) {
61
+ return value;
62
+ }
63
+ return DEFAULT_DUAL_PRESSURE_THRESHOLD;
64
+ }
65
+ function parseOptionalPressureInt(value) {
66
+ if (typeof value === "number" && Number.isInteger(value)) {
67
+ return value >= 0 && value <= 100 ? value : null;
68
+ }
69
+ if (typeof value === "string" && value.trim() !== "") {
70
+ const parsed = Number.parseInt(value, 10);
71
+ return Number.isFinite(parsed) && parsed >= 0 && parsed <= 100
72
+ ? parsed
73
+ : null;
74
+ }
75
+ return null;
76
+ }
77
+ function applyDualPressureToClassifierAction(runtime, responseObject, rawAction) {
78
+ const threshold = resolveDualPressureThreshold(runtime);
79
+ const actionUpper = rawAction.trim().toUpperCase();
80
+ const speakRaw = responseObject?.speak_up ?? responseObject?.speakUp;
81
+ const holdRaw = responseObject?.hold_back ?? responseObject?.holdBack;
82
+ const speakUp = parseOptionalPressureInt(speakRaw);
83
+ const holdBack = parseOptionalPressureInt(holdRaw);
84
+ if (speakUp === null || holdBack === null) {
85
+ runtime.logger.warn({
86
+ src: "service:message",
87
+ action: actionUpper,
88
+ speakUp: speakRaw,
89
+ holdBack: holdRaw,
90
+ }, "Classifier response missing valid dual-pressure scores; treating as IGNORE");
91
+ return { pressure: null, finalActionUpper: "IGNORE" };
92
+ }
93
+ const net = speakUp - holdBack;
94
+ const pressure = { speakUp, holdBack, net };
95
+ if (actionUpper === "STOP") {
96
+ return { pressure, finalActionUpper: "STOP" };
97
+ }
98
+ const isEngage = actionUpper === "REPLY" || actionUpper === "RESPOND";
99
+ if (net <= -threshold && isEngage) {
100
+ runtime.logger.warn({
101
+ src: "service:message",
102
+ net,
103
+ threshold,
104
+ originalAction: actionUpper,
105
+ speakUp,
106
+ holdBack,
107
+ }, "Dual pressure: net below threshold but model chose engage; clamping to IGNORE");
108
+ return { pressure, finalActionUpper: "IGNORE" };
109
+ }
110
+ if (net >= threshold && actionUpper === "IGNORE") {
111
+ runtime.logger.warn({
112
+ src: "service:message",
113
+ net,
114
+ threshold,
115
+ speakUp,
116
+ holdBack,
117
+ }, "Dual pressure: high net but IGNORE chosen; allowing model decision");
118
+ }
119
+ return { pressure, finalActionUpper: actionUpper };
120
+ }
121
+ /**
122
+ * Extract action params from standalone XML blocks in a parsedXml object.
123
+ *
124
+ * When the LLM outputs `<actions>REPLY,START_CODING_TASK</actions>` alongside
125
+ * `<START_CODING_TASK><repo>...</repo></START_CODING_TASK>`, the XML parser
126
+ * puts the action block as a top-level key on parsedXml. This function finds
127
+ * those keys and assembles them into the legacy flat params format that
128
+ * `parseActionParams` consumes.
129
+ *
130
+ * Returns the assembled params string, or empty string if none found.
131
+ */
132
+ export function extractStandaloneActionParams(actionNames, parsedXml) {
133
+ const fragments = [];
134
+ for (const actionName of actionNames) {
135
+ const upperName = actionName.toUpperCase();
136
+ const matchingKey = Object.keys(parsedXml).find((k) => k.toUpperCase() === upperName);
137
+ if (matchingKey &&
138
+ !RESERVED_XML_KEYS.has(matchingKey.toLowerCase()) &&
139
+ typeof parsedXml[matchingKey] === "string" &&
140
+ parsedXml[matchingKey].includes("<")) {
141
+ fragments.push(`<${upperName}>${parsedXml[matchingKey]}</${upperName}>`);
142
+ }
143
+ }
144
+ return fragments.join("\n");
145
+ }
146
+ function normalizePlannerActions(parsedXml, runtime) {
147
+ const normalizedActions = (() => {
148
+ if (typeof parsedXml.actions === "string") {
149
+ const actionsXml = parsedXml.actions;
150
+ if (actionsXml.includes("<action>") || actionsXml.includes("<action ")) {
151
+ const actionEntries = [];
152
+ for (const match of actionsXml.matchAll(/<action>([\s\S]*?)<\/action>/g)) {
153
+ const inner = match[1];
154
+ const nameMatch = inner.match(/<name>([\s\S]*?)<\/name>/);
155
+ const paramsMatch = inner.match(/<params>([\s\S]*?)<\/params>/);
156
+ if (nameMatch) {
157
+ const name = nameMatch[1].trim();
158
+ const paramsXml = paramsMatch ? paramsMatch[1].trim() : undefined;
159
+ if (name)
160
+ actionEntries.push({ name, paramsXml });
161
+ }
162
+ }
163
+ if (actionEntries.length > 0) {
164
+ const inlineParamsXml = actionEntries
165
+ .filter((entry) => entry.paramsXml)
166
+ .map((entry) => `<${entry.name.toUpperCase()}>${entry.paramsXml}</${entry.name.toUpperCase()}>`)
167
+ .join("\n");
168
+ if (inlineParamsXml &&
169
+ (!parsedXml.params || parsedXml.params === "")) {
170
+ parsedXml.params = inlineParamsXml;
171
+ }
172
+ return actionEntries.map((entry) => entry.name);
173
+ }
174
+ }
175
+ const commaSplitActions = actionsXml
176
+ .split(",")
177
+ .map((action) => String(action).trim())
178
+ .filter((action) => action.length > 0);
179
+ if (!parsedXml.params || parsedXml.params === "") {
180
+ const assembled = extractStandaloneActionParams(commaSplitActions, parsedXml);
181
+ if (assembled) {
182
+ parsedXml.params = assembled;
183
+ }
184
+ }
185
+ return commaSplitActions;
186
+ }
187
+ if (Array.isArray(parsedXml.actions)) {
188
+ return parsedXml.actions
189
+ .map((action) => String(action).trim())
190
+ .filter((action) => action.length > 0);
191
+ }
192
+ return [];
193
+ })();
194
+ const finalActions = !runtime.isActionPlanningEnabled() && normalizedActions.length > 1
195
+ ? [normalizedActions[0]]
196
+ : normalizedActions;
197
+ if (finalActions.length > 0) {
198
+ return finalActions;
199
+ }
200
+ const replyText = typeof parsedXml.text === "string" ? parsedXml.text.trim() : "";
201
+ return replyText.length > 0 ? ["REPLY"] : ["IGNORE"];
202
+ }
203
+ /**
204
+ * Escape Handlebars syntax in a string to prevent template injection.
205
+ *
206
+ * WHY: When embedding LLM-generated text into continuation prompts, the text
207
+ * goes through Handlebars.compile(). If the LLM output contains {{variable}},
208
+ * Handlebars will try to substitute it with state values, corrupting the prompt.
209
+ *
210
+ * This function escapes {{ to \\{{ so Handlebars outputs literal {{.
211
+ *
212
+ * @param text - Text that may contain Handlebars-like syntax
213
+ * @returns Text with {{ escaped to prevent interpretation
214
+ */
215
+ function escapeHandlebars(text) {
216
+ // Single-pass replacement to avoid double-escaping triple braces.
217
+ return text.replace(/\{\{\{|\{\{/g, (match) => `\\${match}`);
218
+ }
219
+ function sanitizeAttachmentsForStorage(attachments) {
220
+ if (!attachments?.length) {
221
+ return attachments;
222
+ }
223
+ return attachments.map((attachment) => {
224
+ const { _data: _discardData, _mimeType: _discardMimeType, ...rest } = attachment;
225
+ return rest;
226
+ });
227
+ }
228
+ function resolvePromptAttachments(attachments) {
229
+ if (!attachments?.length) {
230
+ return undefined;
231
+ }
232
+ const resolved = attachments.flatMap((attachment) => {
233
+ const withInlineData = attachment;
234
+ if (typeof withInlineData._data === "string" &&
235
+ withInlineData._data.trim() &&
236
+ typeof withInlineData._mimeType === "string" &&
237
+ withInlineData._mimeType.trim()) {
238
+ return [
239
+ {
240
+ data: withInlineData._data,
241
+ mediaType: withInlineData._mimeType,
242
+ filename: attachment.title,
243
+ },
244
+ ];
245
+ }
246
+ const dataUrlMatch = attachment.url.match(/^data:([^;,]+);base64,(.+)$/i);
247
+ if (dataUrlMatch) {
248
+ return [
249
+ {
250
+ data: dataUrlMatch[2],
251
+ mediaType: dataUrlMatch[1],
252
+ filename: attachment.title,
253
+ },
254
+ ];
255
+ }
256
+ return [];
257
+ });
258
+ return resolved.length > 0 ? resolved : undefined;
259
+ }
260
+ function normalizeShouldRespondModelType(value) {
261
+ if (typeof value !== "string") {
262
+ return "response-handler";
263
+ }
264
+ const normalized = value.trim().toLowerCase();
265
+ switch (normalized) {
266
+ case "nano":
267
+ case "text_nano":
268
+ return "nano";
269
+ case "small":
270
+ case "text_small":
271
+ return "small";
272
+ case "large":
273
+ case "text_large":
274
+ return "large";
275
+ case "mega":
276
+ case "text_mega":
277
+ return "mega";
278
+ case "response-handler":
279
+ case "response_handler":
280
+ case "responsehandler":
281
+ return "response-handler";
282
+ case "response_handler_model":
283
+ return "response-handler";
284
+ default:
285
+ return "response-handler";
286
+ }
287
+ }
288
+ function resolveShouldRespondModelType(model) {
289
+ switch (normalizeShouldRespondModelType(model)) {
290
+ case "nano":
291
+ return ModelType.TEXT_NANO;
292
+ case "small":
293
+ return ModelType.TEXT_SMALL;
294
+ case "large":
295
+ return ModelType.TEXT_LARGE;
296
+ case "mega":
297
+ return ModelType.TEXT_MEGA;
298
+ default:
299
+ return ModelType.RESPONSE_HANDLER;
300
+ }
301
+ }
302
+ /**
303
+ * Tracks the latest response ID per agent+room to handle message superseding
304
+ */
305
+ const latestResponseIds = new Map();
306
+ function clearLatestResponseId(agentId, roomId, responseId) {
307
+ const agentMap = latestResponseIds.get(agentId);
308
+ if (!agentMap) {
309
+ return;
310
+ }
311
+ if (agentMap.get(roomId) !== responseId) {
312
+ return;
313
+ }
314
+ agentMap.delete(roomId);
315
+ if (agentMap.size === 0) {
316
+ latestResponseIds.delete(agentId);
317
+ }
318
+ }
319
+ export function isSimpleReplyResponse(responseContent) {
320
+ return !!(responseContent?.actions &&
321
+ responseContent.actions.length === 1 &&
322
+ typeof responseContent.actions[0] === "string" &&
323
+ responseContent.actions[0].toUpperCase() === "REPLY");
324
+ }
325
+ function isStopResponse(responseContent) {
326
+ return !!(responseContent?.actions &&
327
+ responseContent.actions.length === 1 &&
328
+ typeof responseContent.actions[0] === "string" &&
329
+ responseContent.actions[0].toUpperCase() === "STOP");
330
+ }
331
+ function normalizeActionIdentifier(actionName) {
332
+ return actionName.trim().toUpperCase().replace(/_/g, "");
333
+ }
334
+ function buildRuntimeActionLookup(runtime) {
335
+ const actionMap = new Map();
336
+ for (const action of runtime.actions ?? []) {
337
+ const identifiers = [action.name, ...(action.similes ?? [])];
338
+ for (const identifier of identifiers) {
339
+ const normalized = normalizeActionIdentifier(identifier);
340
+ if (!normalized || actionMap.has(normalized)) {
341
+ continue;
342
+ }
343
+ actionMap.set(normalized, action);
344
+ }
345
+ }
346
+ return actionMap;
347
+ }
348
+ function resolveRuntimeAction(actionLookup, actionName) {
349
+ const normalized = normalizeActionIdentifier(actionName);
350
+ if (!normalized) {
351
+ return undefined;
352
+ }
353
+ return actionLookup.get(normalized);
354
+ }
355
+ const TERMINAL_ACTION_IDENTIFIERS = new Set([
356
+ "REPLY",
357
+ "IGNORE",
358
+ "STOP",
359
+ "CREATE_TASK",
360
+ "START_CODING_TASK",
361
+ "CODE_TASK",
362
+ "SPAWN_AGENT",
363
+ "SPAWN_CODING_AGENT",
364
+ ].map(normalizeActionIdentifier));
365
+ function shouldContinueAfterActions(runtime, responseContent) {
366
+ // Async background/task actions handle their own follow-up and should not
367
+ // trigger an immediate continuation loop from the main message service.
368
+ const actionLookup = buildRuntimeActionLookup(runtime);
369
+ return !!responseContent?.actions?.some((action) => {
370
+ if (typeof action !== "string")
371
+ return false;
372
+ const resolvedAction = resolveRuntimeAction(actionLookup, action);
373
+ if (resolvedAction?.suppressPostActionContinuation) {
374
+ return false;
375
+ }
376
+ const canonicalAction = resolvedAction?.name ?? action;
377
+ return !TERMINAL_ACTION_IDENTIFIERS.has(normalizeActionIdentifier(canonicalAction));
378
+ });
379
+ }
380
+ function suppressesPostActionContinuation(runtime, responseContent) {
381
+ if (!responseContent?.actions?.length) {
382
+ return false;
383
+ }
384
+ const actionLookup = buildRuntimeActionLookup(runtime);
385
+ return responseContent.actions.some((action) => {
386
+ if (typeof action !== "string")
387
+ return false;
388
+ return (resolveRuntimeAction(actionLookup, action)
389
+ ?.suppressPostActionContinuation === true);
390
+ });
391
+ }
392
+ function stripPlannerReplyForSuppressiveActions(runtime, responseContent) {
393
+ if (!responseContent?.actions?.length) {
394
+ return;
395
+ }
396
+ if (!suppressesPostActionContinuation(runtime, responseContent)) {
397
+ return;
398
+ }
399
+ const actionLookup = buildRuntimeActionLookup(runtime);
400
+ const filteredActions = responseContent.actions.filter((action) => {
401
+ if (typeof action !== "string")
402
+ return true;
403
+ const canonicalAction = resolveRuntimeAction(actionLookup, action)?.name ?? action;
404
+ return (normalizeActionIdentifier(canonicalAction) !==
405
+ normalizeActionIdentifier("REPLY"));
406
+ });
407
+ if (filteredActions.length > 0) {
408
+ responseContent.actions = filteredActions;
409
+ }
410
+ if (typeof responseContent.text === "string" && responseContent.text.trim()) {
411
+ responseContent.text = "";
412
+ }
413
+ }
414
+ function callbackTextPreview(content) {
415
+ if (!content || typeof content !== "object") {
416
+ return "";
417
+ }
418
+ const text = typeof content.text === "string" ? content.text.trim() : "";
419
+ if (!text) {
420
+ return "";
421
+ }
422
+ return text.replace(/\s+/g, " ").slice(0, 200);
423
+ }
424
+ function summarizeAttachmentKeyPart(url) {
425
+ const trimmed = url.trim();
426
+ if (trimmed.length <= 256) {
427
+ return trimmed;
428
+ }
429
+ return `${trimmed.slice(0, 128)}...(${trimmed.length})`;
430
+ }
431
+ function callbackDeliveryKey(content) {
432
+ if (!content || typeof content !== "object") {
433
+ return "";
434
+ }
435
+ const text = typeof content.text === "string"
436
+ ? content.text.replace(/\s+/g, " ").trim()
437
+ : "";
438
+ const attachmentKeys = Array.isArray(content.attachments)
439
+ ? content.attachments
440
+ .map((attachment) => {
441
+ if (!attachment || typeof attachment !== "object") {
442
+ return "";
443
+ }
444
+ const url = typeof attachment.url === "string"
445
+ ? summarizeAttachmentKeyPart(attachment.url)
446
+ : "";
447
+ const title = typeof attachment.title === "string" ? attachment.title.trim() : "";
448
+ const contentType = typeof attachment.contentType === "string"
449
+ ? attachment.contentType
450
+ : "";
451
+ if (!url && !title && !contentType) {
452
+ return "";
453
+ }
454
+ return `${contentType}:${title}:${url}`;
455
+ })
456
+ .filter((key) => key.length > 0)
457
+ .sort()
458
+ : [];
459
+ if (!text && attachmentKeys.length === 0) {
460
+ return "";
461
+ }
462
+ return JSON.stringify({
463
+ text,
464
+ attachments: attachmentKeys,
465
+ });
466
+ }
467
+ function getLatestVisibleReplyText(responseContent, actionResults) {
468
+ for (let index = actionResults.length - 1; index >= 0; index--) {
469
+ const result = actionResults[index];
470
+ const actionName = typeof result?.data?.actionName === "string"
471
+ ? result.data.actionName
472
+ : "";
473
+ if (normalizeActionIdentifier(actionName) !== "REPLY") {
474
+ continue;
475
+ }
476
+ if (typeof result.text === "string" && result.text.trim().length > 0) {
477
+ return result.text.trim();
478
+ }
479
+ }
480
+ const responseText = typeof responseContent?.text === "string"
481
+ ? responseContent.text.trim()
482
+ : "";
483
+ return responseText;
484
+ }
485
+ function isLikelyClarifyingQuestion(text) {
486
+ const normalized = text.trim();
487
+ if (!normalized) {
488
+ return false;
489
+ }
490
+ if (/[?؟]\s*$/.test(normalized)) {
491
+ return true;
492
+ }
493
+ const firstSentence = extractFirstSentence(normalized)
494
+ .first.trim()
495
+ .toLowerCase();
496
+ return /^(what|which|when|where|who|whom|whose|why|how|can you|could you|would you|will you|do you|did you|are you|is it|should i|should we)\b/.test(firstSentence);
497
+ }
498
+ function shouldWaitForUserAfterIncompleteReflection(responseContent, actionResults) {
499
+ const latestVisibleReply = getLatestVisibleReplyText(responseContent, actionResults);
500
+ if (!isLikelyClarifyingQuestion(latestVisibleReply)) {
501
+ return false;
502
+ }
503
+ if (actionResults.length === 0) {
504
+ return isSimpleReplyResponse(responseContent);
505
+ }
506
+ return actionResults.every((result) => {
507
+ const actionName = typeof result?.data?.actionName === "string"
508
+ ? result.data.actionName
509
+ : "";
510
+ return normalizeActionIdentifier(actionName) === "REPLY";
511
+ });
512
+ }
513
+ function formatActionResultsForPrompt(actionResults) {
514
+ if (actionResults.length === 0) {
515
+ return "No action results available.";
516
+ }
517
+ return [
518
+ "# Action Results",
519
+ ...actionResults.map((result, index) => {
520
+ const actionNameValue = result.data?.actionName;
521
+ const actionName = typeof actionNameValue === "string"
522
+ ? actionNameValue
523
+ : "Unknown Action";
524
+ const lines = [
525
+ `${index + 1}. ${actionName} - ${result.success === false ? "failed" : "succeeded"}`,
526
+ ];
527
+ if (typeof result.text === "string" && result.text.trim()) {
528
+ lines.push(`Output: ${result.text.trim().slice(0, 2000)}`);
529
+ }
530
+ if (result.error) {
531
+ const errorText = result.error instanceof Error
532
+ ? result.error.message
533
+ : String(result.error);
534
+ lines.push(`Error: ${errorText.slice(0, 1000)}`);
535
+ }
536
+ return lines.join("\n");
537
+ }),
538
+ ].join("\n\n");
539
+ }
540
+ function withActionResults(state, actionResults) {
541
+ return {
542
+ ...state,
543
+ values: {
544
+ ...state.values,
545
+ actionResults: formatActionResultsForPrompt(actionResults),
546
+ },
547
+ data: {
548
+ ...state.data,
549
+ actionResults,
550
+ },
551
+ };
552
+ }
553
+ function withTaskCompletion(state, taskCompletion) {
554
+ if (!taskCompletion) {
555
+ return state;
556
+ }
557
+ return {
558
+ ...state,
559
+ values: {
560
+ ...state.values,
561
+ taskCompletionStatus: formatTaskCompletionStatus(taskCompletion),
562
+ taskCompleted: taskCompletion.completed,
563
+ taskCompletionAssessed: taskCompletion.assessed,
564
+ taskCompletionReason: taskCompletion.reason,
565
+ },
566
+ data: {
567
+ ...state.data,
568
+ taskCompletion,
569
+ },
570
+ };
571
+ }
572
+ function getStructuredOutputFailure(state) {
573
+ const candidate = state.data?.structuredOutputFailure;
574
+ if (!candidate || typeof candidate !== "object") {
575
+ return null;
576
+ }
577
+ return candidate;
578
+ }
579
+ function summarizeStructuredOutputFailure(failure) {
580
+ if (!failure) {
581
+ return "Structured output parsing failed, but no additional diagnostics were recorded.";
582
+ }
583
+ const parts = [
584
+ `Kind: ${failure.kind}`,
585
+ `Model: ${failure.model}`,
586
+ `Format: ${failure.format}`,
587
+ `Attempts: ${failure.attempts}/${failure.maxRetries + 1}`,
588
+ ];
589
+ if (failure.key) {
590
+ parts.push(`Key: ${failure.key}`);
591
+ }
592
+ if (failure.parseError) {
593
+ parts.push(`Error: ${failure.parseError}`);
594
+ }
595
+ if (failure.issues && failure.issues.length > 0) {
596
+ parts.push(`Issues: ${failure.issues.join(" | ")}`);
597
+ }
598
+ if (failure.responsePreview) {
599
+ parts.push(`Response Preview:\n${failure.responsePreview}`);
600
+ }
601
+ return parts.join("\n");
602
+ }
603
+ function summarizeActionResultsForUser(actionResults) {
604
+ if (actionResults.length === 0) {
605
+ return "";
606
+ }
607
+ const summary = actionResults
608
+ .slice(-3)
609
+ .map((result) => {
610
+ const actionName = typeof result.data?.actionName === "string"
611
+ ? result.data.actionName
612
+ : "unknown action";
613
+ return `${actionName} (${result.success === false ? "failed" : "succeeded"})`;
614
+ })
615
+ .join(", ");
616
+ return `Completed action state before the error: ${summary}.`;
617
+ }
618
+ function withContextRoutingValues(state, contextRoutingStateValues) {
619
+ if (!contextRoutingStateValues) {
620
+ return state;
621
+ }
622
+ const mergedStateValues = {
623
+ ...state.values,
624
+ };
625
+ if (contextRoutingStateValues[AVAILABLE_CONTEXTS_STATE_KEY] !== undefined) {
626
+ mergedStateValues[AVAILABLE_CONTEXTS_STATE_KEY] = contextRoutingStateValues[AVAILABLE_CONTEXTS_STATE_KEY];
627
+ }
628
+ if (contextRoutingStateValues[CONTEXT_ROUTING_STATE_KEY] !== undefined) {
629
+ mergedStateValues[CONTEXT_ROUTING_STATE_KEY] = contextRoutingStateValues[CONTEXT_ROUTING_STATE_KEY];
630
+ }
631
+ return {
632
+ ...state,
633
+ values: mergedStateValues,
634
+ };
635
+ }
636
+ async function composeContinuationDecisionState(runtime, message, contextRoutingStateValues) {
637
+ // Continuation prompts run after the runtime has already persisted an
638
+ // assistant reply and/or action_result memories. Refresh RECENT_MESSAGES so
639
+ // the follow-up planner does not reuse stale conversation history cached on
640
+ // the original user turn.
641
+ return withContextRoutingValues(await runtime.composeState(message, ["RECENT_MESSAGES", "ACTIONS"], false, false), contextRoutingStateValues);
642
+ }
643
+ function withoutProviders(state, providerNamesToOmit) {
644
+ if (providerNamesToOmit.length === 0) {
645
+ return state;
646
+ }
647
+ const omittedProviderNames = new Set(providerNamesToOmit.map((providerName) => providerName.trim().toUpperCase()));
648
+ const providerResults = typeof state.data?.providers === "object" && state.data?.providers !== null
649
+ ? state.data.providers
650
+ : {};
651
+ const providerOrder = Array.isArray(state.data?.providerOrder)
652
+ ? state.data.providerOrder
653
+ : Object.keys(providerResults);
654
+ const filteredProviderOrder = providerOrder.filter((providerName) => !omittedProviderNames.has(providerName.toUpperCase()));
655
+ const filteredProviderResults = Object.fromEntries(Object.entries(providerResults).filter(([providerName]) => !omittedProviderNames.has(providerName.trim().toUpperCase())));
656
+ const filteredProvidersText = filteredProviderOrder
657
+ .map((providerName) => filteredProviderResults[providerName]?.text)
658
+ .filter((text) => typeof text === "string" && text.trim() !== "")
659
+ .join("\n");
660
+ return {
661
+ ...state,
662
+ values: {
663
+ ...state.values,
664
+ providers: filteredProvidersText,
665
+ },
666
+ data: {
667
+ ...state.data,
668
+ providerOrder: filteredProviderOrder,
669
+ providers: filteredProviderResults,
670
+ },
671
+ text: filteredProvidersText,
672
+ };
673
+ }
674
+ function buildShouldRespondCharacterText(providerResult) {
675
+ if (!providerResult) {
676
+ return "";
677
+ }
678
+ const values = typeof providerResult.values === "object" && providerResult.values !== null
679
+ ? providerResult.values
680
+ : {};
681
+ const bio = typeof values.bio === "string" ? values.bio : "";
682
+ const directions = typeof values.directions === "string" ? values.directions : "";
683
+ const system = typeof values.system === "string" ? values.system : "";
684
+ const classifierText = [bio, directions, system]
685
+ .filter((section) => section.trim().length > 0)
686
+ .join("\n\n");
687
+ return (classifierText ||
688
+ (typeof providerResult.text === "string" ? providerResult.text : ""));
689
+ }
690
+ function prepareShouldRespondState(state) {
691
+ const stateWithoutActions = withoutProviders(state, ["ACTIONS"]);
692
+ const providerResults = typeof stateWithoutActions.data?.providers === "object" &&
693
+ stateWithoutActions.data?.providers !== null
694
+ ? {
695
+ ...stateWithoutActions.data.providers,
696
+ }
697
+ : null;
698
+ if (!providerResults?.CHARACTER) {
699
+ return stateWithoutActions;
700
+ }
701
+ providerResults.CHARACTER = {
702
+ ...providerResults.CHARACTER,
703
+ text: buildShouldRespondCharacterText(providerResults.CHARACTER),
704
+ };
705
+ const providerOrder = Array.isArray(stateWithoutActions.data?.providerOrder)
706
+ ? stateWithoutActions.data.providerOrder
707
+ : Object.keys(providerResults);
708
+ const providersText = providerOrder
709
+ .map((providerName) => providerResults[providerName]?.text)
710
+ .filter((text) => typeof text === "string" && text.trim() !== "")
711
+ .join("\n");
712
+ return {
713
+ ...stateWithoutActions,
714
+ values: {
715
+ ...stateWithoutActions.values,
716
+ providers: providersText,
717
+ },
718
+ data: {
719
+ ...stateWithoutActions.data,
720
+ providers: providerResults,
721
+ },
722
+ text: providersText,
723
+ };
724
+ }
725
+ /**
726
+ * Default implementation of the MessageService interface.
727
+ * This service handles the complete message processing pipeline including:
728
+ * - Message validation and memory creation
729
+ * - Smart response decision (shouldRespond)
730
+ * - Single-shot or multi-step processing strategies
731
+ * - Action execution and evaluation
732
+ * - Attachment processing
733
+ * - Message deletion and channel clearing
734
+ *
735
+ * This is the standard message handler used by elizaOS and can be replaced
736
+ * with custom implementations via the IMessageService interface.
737
+ */
738
+ export class DefaultMessageService {
739
+ /**
740
+ * Main message handling entry point
741
+ */
742
+ async handleMessage(runtime, message, callback, options) {
743
+ const source = typeof message.content?.source === "string" &&
744
+ message.content.source.trim() !== ""
745
+ ? message.content.source
746
+ : "messageService";
747
+ let trajectoryStepId = typeof message.metadata === "object" &&
748
+ message.metadata !== null &&
749
+ "trajectoryStepId" in message.metadata
750
+ ? message.metadata.trajectoryStepId
751
+ : undefined;
752
+ if (!(typeof trajectoryStepId === "string" && trajectoryStepId.trim() !== "")) {
753
+ try {
754
+ await runtime.emitEvent(EventType.MESSAGE_RECEIVED, {
755
+ runtime,
756
+ message,
757
+ callback,
758
+ source,
759
+ });
760
+ }
761
+ catch (error) {
762
+ runtime.logger.warn({
763
+ src: "service:message",
764
+ agentId: runtime.agentId,
765
+ entityId: message.entityId,
766
+ roomId: message.roomId,
767
+ error: error instanceof Error ? error.message : String(error),
768
+ }, "Failed to emit MESSAGE_RECEIVED before handling message");
769
+ }
770
+ trajectoryStepId =
771
+ typeof message.metadata === "object" &&
772
+ message.metadata !== null &&
773
+ "trajectoryStepId" in message.metadata
774
+ ? message.metadata.trajectoryStepId
775
+ : undefined;
776
+ }
777
+ return await runWithTrajectoryContext(typeof trajectoryStepId === "string" && trajectoryStepId.trim() !== ""
778
+ ? { trajectoryStepId: trajectoryStepId.trim() }
779
+ : undefined, async () => {
780
+ // Determine shouldRespondModel from options or runtime settings
781
+ const shouldRespondModelSetting = runtime.getSetting("SHOULD_RESPOND_MODEL");
782
+ const resolvedShouldRespondModel = normalizeShouldRespondModelType(options?.shouldRespondModel ?? shouldRespondModelSetting);
783
+ // WHY voice detection wraps onStreamChunk here instead of using a
784
+ // separate ResponseStreamExtractor + AsyncLocalStorage context:
785
+ //
786
+ // Previously handleMessage created a second XML extractor
787
+ // (ResponseStreamExtractor) and injected it via runWithStreamingContext.
788
+ // Both extractors received the same raw LLM tokens in useModel and
789
+ // emitted independently, causing the dual-extractor garbling bug —
790
+ // consumers saw overlapping deltas that produced unintelligible TTS.
791
+ //
792
+ // The fix: a single extractor (ValidationStreamExtractor in
793
+ // dynamicPromptExecFromState) now provides `accumulated` — the full
794
+ // extracted text — via the third StreamChunkCallback argument. Voice
795
+ // detection wraps the caller's callback to intercept accumulated text
796
+ // for first-sentence detection, then forwards to the original. This
797
+ // keeps voice logic in handleMessage (encapsulation) without adding a
798
+ // second extraction pipeline.
799
+ //
800
+ // The `streamTextFallback` path exists for action handlers or other
801
+ // call sites that don't provide `accumulated` (raw token streams).
802
+ let firstSentenceSent = false;
803
+ let streamTextFallback = "";
804
+ const userOnStreamChunk = options?.onStreamChunk;
805
+ const wrappedOnStreamChunk = userOnStreamChunk
806
+ ? async (chunk, messageId, accumulated) => {
807
+ let streamText;
808
+ // If we have accumulated text, also sync streamTextFallback so the
809
+ // fallback path has accurate state if the stream source later changes.
810
+ if (accumulated !== undefined) {
811
+ streamTextFallback = accumulated;
812
+ streamText = accumulated;
813
+ }
814
+ else {
815
+ streamTextFallback += chunk;
816
+ streamText = streamTextFallback;
817
+ }
818
+ // Only run first-sentence TTS detection when `accumulated` is present.
819
+ // Raw-token streams (no accumulated) may contain XML markup or partial
820
+ // structured output that would garble hasFirstSentence() and TTS.
821
+ if (!firstSentenceSent &&
822
+ accumulated !== undefined &&
823
+ hasFirstSentence(streamText)) {
824
+ const { first } = extractFirstSentence(streamText);
825
+ if (first.length > 5) {
826
+ firstSentenceSent = true;
827
+ (async () => {
828
+ try {
829
+ const voiceSettings = runtime.character.settings
830
+ ?.voice;
831
+ const model = voiceSettings?.model || "en_US-male-medium";
832
+ const voiceId = voiceSettings?.url ||
833
+ voiceSettings?.voiceId ||
834
+ "nova";
835
+ let audioBuffer = null;
836
+ const params = {
837
+ text: first,
838
+ voice: voiceId,
839
+ model: model,
840
+ };
841
+ const result = runtime.getModel(ModelType.TEXT_TO_SPEECH)
842
+ ? await runtime.useModel(ModelType.TEXT_TO_SPEECH, params)
843
+ : undefined;
844
+ if (result instanceof ArrayBuffer ||
845
+ Object.prototype.toString.call(result) ===
846
+ "[object ArrayBuffer]") {
847
+ audioBuffer = Buffer.from(result);
848
+ }
849
+ else if (Buffer.isBuffer(result)) {
850
+ audioBuffer = result;
851
+ }
852
+ else if (result instanceof Uint8Array) {
853
+ audioBuffer = Buffer.from(result);
854
+ }
855
+ if (audioBuffer && callback) {
856
+ const audioBase64 = audioBuffer.toString("base64");
857
+ await callback({
858
+ text: "",
859
+ attachments: [
860
+ {
861
+ id: v4(),
862
+ url: `data:audio/wav;base64,${audioBase64}`,
863
+ title: "Voice Response",
864
+ source: "voice-cache",
865
+ description: "Voice response for first sentence",
866
+ text: first,
867
+ contentType: ContentType.AUDIO,
868
+ },
869
+ ],
870
+ source: "voice",
871
+ });
872
+ }
873
+ }
874
+ catch (error) {
875
+ runtime.logger.error({ error }, "Error generating voice for first sentence");
876
+ }
877
+ })();
878
+ }
879
+ }
880
+ await userOnStreamChunk(chunk, messageId, accumulated);
881
+ }
882
+ : undefined;
883
+ const opts = {
884
+ maxRetries: options?.maxRetries ?? 3,
885
+ timeoutDuration: options?.timeoutDuration ?? 60 * 60 * 1000, // 1 hour
886
+ useMultiStep: options?.useMultiStep ??
887
+ parseBooleanFromText(String(runtime.getSetting("USE_MULTI_STEP") ?? "")),
888
+ maxMultiStepIterations: options?.maxMultiStepIterations ??
889
+ parseInt(String(runtime.getSetting("MAX_MULTISTEP_ITERATIONS") ?? "6"), 10),
890
+ continueAfterActions: options?.continueAfterActions ??
891
+ parseBooleanFromText(String(runtime.getSetting("CONTINUE_AFTER_ACTIONS") ?? "true")),
892
+ onStreamChunk: wrappedOnStreamChunk,
893
+ keepExistingResponses: options?.keepExistingResponses ??
894
+ parseBooleanFromText(String(runtime.getSetting("BASIC_CAPABILITIES_KEEP_RESP") ?? "")),
895
+ shouldRespondModel: resolvedShouldRespondModel,
896
+ };
897
+ let visibleCallbackCount = 0;
898
+ let firstVisibleCallbackPreview = "";
899
+ const deliveredCallbackKeys = new Set();
900
+ const instrumentedCallback = callback
901
+ ? async (content, actionName) => {
902
+ const deliveryKey = callbackDeliveryKey(content);
903
+ const preview = callbackTextPreview(content);
904
+ if (deliveryKey && deliveredCallbackKeys.has(deliveryKey)) {
905
+ runtime.logger.warn({
906
+ src: "service:message",
907
+ agentId: runtime.agentId,
908
+ messageId: message.id,
909
+ roomId: message.roomId,
910
+ action: typeof content?.action ===
911
+ "string"
912
+ ? String(content.action)
913
+ : actionName,
914
+ source: typeof content.source === "string"
915
+ ? content.source
916
+ : undefined,
917
+ preview: preview ||
918
+ (Array.isArray(content.attachments) &&
919
+ content.attachments.length > 0
920
+ ? `[attachments:${content.attachments.length}]`
921
+ : ""),
922
+ }, "Suppressing duplicate visible callback reply emitted for a single turn");
923
+ return [];
924
+ }
925
+ if (deliveryKey) {
926
+ deliveredCallbackKeys.add(deliveryKey);
927
+ }
928
+ if (preview) {
929
+ visibleCallbackCount += 1;
930
+ if (visibleCallbackCount === 1) {
931
+ firstVisibleCallbackPreview = preview;
932
+ }
933
+ else {
934
+ runtime.logger.warn({
935
+ src: "service:message",
936
+ agentId: runtime.agentId,
937
+ messageId: message.id,
938
+ roomId: message.roomId,
939
+ callbackCount: visibleCallbackCount,
940
+ action: typeof content?.action ===
941
+ "string"
942
+ ? String(content.action)
943
+ : actionName,
944
+ source: typeof content.source === "string"
945
+ ? content.source
946
+ : undefined,
947
+ firstPreview: firstVisibleCallbackPreview,
948
+ currentPreview: preview,
949
+ }, "Multiple visible callback replies emitted for a single turn");
950
+ }
951
+ }
952
+ return actionName === undefined
953
+ ? callback(content)
954
+ : callback(content, actionName);
955
+ }
956
+ : undefined;
957
+ // Set up timeout monitoring
958
+ let timeoutId;
959
+ // Single ID used for tracking, streaming, and the final message
960
+ const responseId = asUUID(v4());
961
+ try {
962
+ runtime.logger.info({
963
+ src: "service:message",
964
+ agentId: runtime.agentId,
965
+ entityId: message.entityId,
966
+ roomId: message.roomId,
967
+ }, "Message received");
968
+ // Track this response ID - ensure map exists for this agent
969
+ let agentResponses = latestResponseIds.get(runtime.agentId);
970
+ if (!agentResponses) {
971
+ agentResponses = new Map();
972
+ latestResponseIds.set(runtime.agentId, agentResponses);
973
+ }
974
+ const previousResponseId = agentResponses.get(message.roomId);
975
+ if (previousResponseId) {
976
+ logger.debug({
977
+ src: "service:message",
978
+ roomId: message.roomId,
979
+ previousResponseId,
980
+ responseId,
981
+ }, "Updating response ID");
982
+ }
983
+ agentResponses.set(message.roomId, responseId);
984
+ // Start run tracking with roomId for proper log association
985
+ const runId = runtime.startRun(message.roomId);
986
+ if (!runId) {
987
+ runtime.logger.error("Failed to start run tracking");
988
+ return {
989
+ didRespond: false,
990
+ responseContent: null,
991
+ responseMessages: [],
992
+ state: { values: {}, data: {}, text: "" },
993
+ mode: "none",
994
+ };
995
+ }
996
+ const startTime = Date.now();
997
+ // Emit run started event
998
+ await runtime.emitEvent(EventType.RUN_STARTED, {
999
+ runtime,
1000
+ source: "messageHandler",
1001
+ runId,
1002
+ messageId: message.id,
1003
+ roomId: message.roomId,
1004
+ entityId: message.entityId,
1005
+ startTime,
1006
+ status: "started",
1007
+ });
1008
+ const timeoutPromise = new Promise((_, reject) => {
1009
+ timeoutId = setTimeout(async () => {
1010
+ await runtime.emitEvent(EventType.RUN_TIMEOUT, {
1011
+ runtime,
1012
+ source: "messageHandler",
1013
+ runId,
1014
+ messageId: message.id,
1015
+ roomId: message.roomId,
1016
+ entityId: message.entityId,
1017
+ startTime,
1018
+ status: "timeout",
1019
+ endTime: Date.now(),
1020
+ duration: Date.now() - startTime,
1021
+ error: "Run exceeded timeout",
1022
+ });
1023
+ reject(new Error("Run exceeded timeout"));
1024
+ }, opts.timeoutDuration);
1025
+ });
1026
+ // Wrap processing with streaming context for automatic streaming in useModel calls
1027
+ // Use ResponseStreamExtractor to filter XML and only stream <text> (if REPLY) or <message>
1028
+ let streamingContext;
1029
+ // Voice handling state
1030
+ let firstSentenceSent = false;
1031
+ let firstSentenceText = "";
1032
+ if (opts.onStreamChunk) {
1033
+ const extractor = new ResponseStreamExtractor();
1034
+ const onStreamChunk = opts.onStreamChunk;
1035
+ let streamText = "";
1036
+ streamingContext = {
1037
+ onStreamChunk: async (chunk, msgId) => {
1038
+ if (extractor.done)
1039
+ return;
1040
+ const textToStream = extractor.push(chunk);
1041
+ if (textToStream) {
1042
+ streamText += textToStream;
1043
+ // Check for first sentence to send to voice
1044
+ if (!firstSentenceSent && hasFirstSentence(streamText)) {
1045
+ const { first } = extractFirstSentence(streamText);
1046
+ firstSentenceText = first;
1047
+ if (first.length > 5) {
1048
+ // Minimal length check
1049
+ firstSentenceSent = true;
1050
+ // Process voice in background
1051
+ (async () => {
1052
+ try {
1053
+ const voiceSettings = runtime.character.settings
1054
+ ?.voice;
1055
+ const model = voiceSettings?.model || "en_US-male-medium";
1056
+ const voiceId = voiceSettings?.url ||
1057
+ voiceSettings?.voiceId ||
1058
+ "nova";
1059
+ let audioBuffer = null;
1060
+ const params = {
1061
+ text: first,
1062
+ voice: voiceId,
1063
+ model: model,
1064
+ };
1065
+ const result = runtime.getModel(ModelType.TEXT_TO_SPEECH)
1066
+ ? await runtime.useModel(ModelType.TEXT_TO_SPEECH, params)
1067
+ : undefined;
1068
+ if (result instanceof ArrayBuffer ||
1069
+ Object.prototype.toString.call(result) ===
1070
+ "[object ArrayBuffer]") {
1071
+ audioBuffer = Buffer.from(result);
1072
+ }
1073
+ else if (Buffer.isBuffer(result)) {
1074
+ audioBuffer = result;
1075
+ }
1076
+ else if (result instanceof Uint8Array) {
1077
+ audioBuffer = Buffer.from(result);
1078
+ }
1079
+ if (audioBuffer && instrumentedCallback) {
1080
+ const audioBase64 = audioBuffer.toString("base64");
1081
+ await instrumentedCallback({
1082
+ text: "",
1083
+ attachments: [
1084
+ {
1085
+ id: v4(),
1086
+ url: `data:audio/wav;base64,${audioBase64}`,
1087
+ title: "Voice Response",
1088
+ source: "voice-cache",
1089
+ description: "Voice response for first sentence",
1090
+ text: first,
1091
+ contentType: ContentType.AUDIO,
1092
+ },
1093
+ ],
1094
+ source: "voice",
1095
+ });
1096
+ }
1097
+ }
1098
+ catch (error) {
1099
+ runtime.logger.error({ error }, "Error generating voice for first sentence");
1100
+ }
1101
+ })();
1102
+ }
1103
+ }
1104
+ await onStreamChunk(textToStream, msgId);
1105
+ }
1106
+ },
1107
+ messageId: responseId,
1108
+ };
1109
+ }
1110
+ const processingPromise = runWithStreamingContext(streamingContext, () => this.processMessage(runtime, message, instrumentedCallback, responseId, runId, startTime, opts));
1111
+ const result = await Promise.race([
1112
+ processingPromise,
1113
+ timeoutPromise,
1114
+ ]);
1115
+ // Clean up timeout
1116
+ clearTimeout(timeoutId);
1117
+ // Voice: Handle the rest of the message
1118
+ if (firstSentenceSent && result.responseContent?.text) {
1119
+ const fullText = result.responseContent.text;
1120
+ const rest = fullText.replace(firstSentenceText, "").trim();
1121
+ if (rest.length > 0) {
1122
+ // Generate voice for rest
1123
+ // (Async immediately)
1124
+ (async () => {
1125
+ try {
1126
+ const voiceSettings = runtime.character.settings?.voice;
1127
+ const model = voiceSettings?.model || "en_US-male-medium";
1128
+ const voiceId = voiceSettings?.url || voiceSettings?.voiceId || "nova";
1129
+ let audioBuffer = null;
1130
+ const params = {
1131
+ text: rest,
1132
+ voice: voiceId,
1133
+ model: model,
1134
+ };
1135
+ const result = runtime.getModel(ModelType.TEXT_TO_SPEECH)
1136
+ ? await runtime.useModel(ModelType.TEXT_TO_SPEECH, params)
1137
+ : undefined;
1138
+ if (result instanceof ArrayBuffer ||
1139
+ Object.prototype.toString.call(result) ===
1140
+ "[object ArrayBuffer]") {
1141
+ audioBuffer = Buffer.from(result);
1142
+ }
1143
+ else if (Buffer.isBuffer(result)) {
1144
+ audioBuffer = result;
1145
+ }
1146
+ else if (result instanceof Uint8Array) {
1147
+ audioBuffer = Buffer.from(result);
1148
+ }
1149
+ if (audioBuffer && instrumentedCallback) {
1150
+ const audioBase64 = audioBuffer.toString("base64");
1151
+ await instrumentedCallback({
1152
+ text: "",
1153
+ attachments: [
1154
+ {
1155
+ id: v4(),
1156
+ url: `data:audio/wav;base64,${audioBase64}`,
1157
+ title: "Voice Response",
1158
+ source: "voice",
1159
+ description: "Voice response for remaining text",
1160
+ text: rest,
1161
+ contentType: ContentType.AUDIO,
1162
+ },
1163
+ ],
1164
+ source: "voice",
1165
+ });
1166
+ }
1167
+ }
1168
+ catch (error) {
1169
+ runtime.logger.error({ error }, "Error generating voice for remaining text");
1170
+ }
1171
+ })();
1172
+ }
1173
+ }
1174
+ return result;
1175
+ }
1176
+ finally {
1177
+ clearTimeout(timeoutId);
1178
+ // Ensure latestResponseIds is cleaned up even if processMessage
1179
+ // threw before reaching its own cleanup at the end of the method.
1180
+ clearLatestResponseId(runtime.agentId, message.roomId, responseId);
1181
+ }
1182
+ });
1183
+ }
1184
+ /**
1185
+ * Internal message processing implementation
1186
+ */
1187
+ async processMessage(runtime, message, callback, responseId, runId, startTime, opts) {
1188
+ const agentResponses = latestResponseIds.get(runtime.agentId);
1189
+ if (!agentResponses)
1190
+ throw new Error("Agent responses map not found");
1191
+ // Skip messages from self (unless it's an autonomous message)
1192
+ const isAutonomousMessage = message.content?.metadata &&
1193
+ typeof message.content.metadata === "object" &&
1194
+ message.content.metadata.isAutonomous ===
1195
+ true;
1196
+ if (message.entityId === runtime.agentId && !isAutonomousMessage) {
1197
+ runtime.logger.debug({ src: "service:message", agentId: runtime.agentId }, "Skipping message from self");
1198
+ await this.emitRunEnded(runtime, runId, message, startTime, "self");
1199
+ return {
1200
+ didRespond: false,
1201
+ responseContent: null,
1202
+ responseMessages: [],
1203
+ state: { values: {}, data: {}, text: "" },
1204
+ mode: "none",
1205
+ };
1206
+ }
1207
+ runtime.logger.debug({
1208
+ src: "service:message",
1209
+ messagePreview: truncateToCompleteSentence(message.content.text || "", 50),
1210
+ }, "Processing message");
1211
+ // ── Save the incoming message to memory ────────────────────────────
1212
+ runtime.logger.debug({ src: "service:message" }, "Saving message to memory");
1213
+ let memoryToQueue;
1214
+ if (message.id) {
1215
+ const existingMemory = await runtime.getMemoryById(message.id);
1216
+ if (existingMemory) {
1217
+ runtime.logger.debug({ src: "service:message" }, "Memory already exists, skipping creation");
1218
+ memoryToQueue = existingMemory;
1219
+ }
1220
+ else {
1221
+ const createdMemoryId = await runtime.createMemory(message, "messages");
1222
+ memoryToQueue = { ...message, id: createdMemoryId };
1223
+ }
1224
+ await runtime.queueEmbeddingGeneration(memoryToQueue, "high");
1225
+ }
1226
+ else {
1227
+ const memoryId = await runtime.createMemory(message, "messages");
1228
+ message.id = memoryId;
1229
+ memoryToQueue = { ...message, id: memoryId };
1230
+ await runtime.queueEmbeddingGeneration(memoryToQueue, "normal");
1231
+ }
1232
+ // Check if LLM is off by default
1233
+ const agentUserState = await runtime.getParticipantUserState(message.roomId, runtime.agentId);
1234
+ const defLllmOff = parseBooleanFromText(String(runtime.getSetting("BASIC_CAPABILITIES_DEFLLMOFF") || ""));
1235
+ if (defLllmOff && agentUserState === null) {
1236
+ runtime.logger.debug({ src: "service:message" }, "LLM is off by default");
1237
+ await this.emitRunEnded(runtime, runId, message, startTime, "off");
1238
+ return {
1239
+ didRespond: false,
1240
+ responseContent: null,
1241
+ responseMessages: [],
1242
+ state: { values: {}, data: {}, text: "" },
1243
+ mode: "none",
1244
+ };
1245
+ }
1246
+ // Check if room is muted
1247
+ const agentName = runtime.character.name ?? "agent";
1248
+ const mentionContext = message.content.mentionContext;
1249
+ const explicitlyAddressesAgent = mentionContext?.isMention === true ||
1250
+ mentionContext?.isReply === true ||
1251
+ textContainsAgentName(message.content.text, [
1252
+ runtime.character.name,
1253
+ runtime.character.username,
1254
+ ]);
1255
+ if (agentUserState === "MUTED" &&
1256
+ message.content.text &&
1257
+ !explicitlyAddressesAgent &&
1258
+ !message.content.text.toLowerCase().includes(agentName.toLowerCase())) {
1259
+ runtime.logger.debug({ src: "service:message", roomId: message.roomId }, "Ignoring muted room");
1260
+ await this.emitRunEnded(runtime, runId, message, startTime, "muted");
1261
+ return {
1262
+ didRespond: false,
1263
+ responseContent: null,
1264
+ responseMessages: [],
1265
+ state: { values: {}, data: {}, text: "" },
1266
+ mode: "none",
1267
+ };
1268
+ }
1269
+ // Compose initial state
1270
+ let state = await runtime.composeState(message, ["ENTITIES", "CHARACTER", "RECENT_MESSAGES", "ACTIONS"], true, false);
1271
+ state = attachAvailableContexts(state, runtime);
1272
+ // Get room and mention context
1273
+ const room = await runtime.getRoom(message.roomId);
1274
+ // Process attachments before deciding to respond
1275
+ if (message.content.attachments && message.content.attachments.length > 0) {
1276
+ message.content.attachments = await this.processAttachments(runtime, message.content.attachments);
1277
+ if (message.id) {
1278
+ await runtime.updateMemory({
1279
+ id: message.id,
1280
+ content: {
1281
+ ...message.content,
1282
+ attachments: sanitizeAttachmentsForStorage(message.content.attachments),
1283
+ },
1284
+ });
1285
+ }
1286
+ }
1287
+ const promptAttachments = resolvePromptAttachments(message.content.attachments);
1288
+ let shouldRespondToMessage = true;
1289
+ let terminalDecision = null;
1290
+ let routedDecision = null;
1291
+ let dualPressureLog = null;
1292
+ let shouldRespondClassifierAction = null;
1293
+ const metadata = typeof message.content.metadata === "object" &&
1294
+ message.content.metadata !== null
1295
+ ? message.content.metadata
1296
+ : null;
1297
+ const isAutonomous = metadata?.isAutonomous === true;
1298
+ const autonomyMode = typeof metadata?.autonomyMode === "string" ? metadata.autonomyMode : null;
1299
+ if (isAutonomous) {
1300
+ runtime.logger.debug({ src: "service:message", autonomyMode }, "Autonomy message bypassing shouldRespond checks");
1301
+ shouldRespondToMessage = true;
1302
+ }
1303
+ else {
1304
+ // Check if shouldRespond evaluation is enabled
1305
+ const checkShouldRespondEnabled = runtime.isCheckShouldRespondEnabled();
1306
+ // Determine if we should respond
1307
+ const responseDecision = this.shouldRespond(runtime, message, room ?? undefined, mentionContext);
1308
+ runtime.logger.debug({ src: "service:message", responseDecision, checkShouldRespondEnabled }, "Response decision");
1309
+ // If checkShouldRespond is disabled, always respond (ChatGPT mode)
1310
+ if (!checkShouldRespondEnabled) {
1311
+ runtime.logger.debug({ src: "service:message" }, "checkShouldRespond disabled, always responding (ChatGPT mode)");
1312
+ shouldRespondToMessage = true;
1313
+ }
1314
+ else if (responseDecision.skipEvaluation) {
1315
+ // If we can skip the evaluation, use the decision directly
1316
+ runtime.logger.debug({
1317
+ src: "service:message",
1318
+ agentName: runtime.character.name ?? "Agent",
1319
+ reason: responseDecision.reason,
1320
+ }, "Skipping LLM evaluation");
1321
+ routedDecision = parseContextRoutingMetadata(responseDecision);
1322
+ setContextRoutingMetadata(message, routedDecision);
1323
+ shouldRespondToMessage = responseDecision.shouldRespond;
1324
+ }
1325
+ else {
1326
+ state = {
1327
+ ...state,
1328
+ values: {
1329
+ ...state.values,
1330
+ dualPressureThreshold: resolveDualPressureThreshold(runtime),
1331
+ },
1332
+ };
1333
+ const shouldRespondState = prepareShouldRespondState(state);
1334
+ // Need LLM evaluation for ambiguous case
1335
+ const _shouldRespondPrompt = composePromptFromState({
1336
+ state: shouldRespondState,
1337
+ template: runtime.character.templates?.shouldRespondTemplate ||
1338
+ shouldRespondTemplate,
1339
+ });
1340
+ runtime.logger.debug({
1341
+ src: "service:message",
1342
+ agentName: runtime.character.name ?? "Agent",
1343
+ reason: responseDecision.reason,
1344
+ model: opts.shouldRespondModel,
1345
+ }, "Using LLM evaluation");
1346
+ // Use dynamicPromptExecFromState for structured output with validation
1347
+ setTrajectoryPurpose("should_respond");
1348
+ const responseObject = await runtime.dynamicPromptExecFromState({
1349
+ state: shouldRespondState,
1350
+ params: {
1351
+ prompt: runtime.character.templates?.shouldRespondTemplate ||
1352
+ shouldRespondTemplate,
1353
+ ...(promptAttachments ? { attachments: promptAttachments } : {}),
1354
+ },
1355
+ schema: [
1356
+ // Decision schema - no streaming, no per-field validation needed
1357
+ // WHY: This is internal decision-making, not user-facing output
1358
+ {
1359
+ field: "name",
1360
+ description: "The name of the agent responding",
1361
+ validateField: false,
1362
+ streamField: false,
1363
+ },
1364
+ {
1365
+ field: "reasoning",
1366
+ description: "Your reasoning for this decision",
1367
+ validateField: false,
1368
+ streamField: false,
1369
+ },
1370
+ {
1371
+ field: "speak_up",
1372
+ description: "Integer 0-100 pressure TO engage",
1373
+ validateField: false,
1374
+ streamField: false,
1375
+ },
1376
+ {
1377
+ field: "hold_back",
1378
+ description: "Integer 0-100 pressure to STAY QUIET",
1379
+ validateField: false,
1380
+ streamField: false,
1381
+ },
1382
+ {
1383
+ field: "action",
1384
+ description: "REPLY | RESPOND | IGNORE | STOP (REPLY and RESPOND both mean engage)",
1385
+ validateField: false,
1386
+ streamField: false,
1387
+ },
1388
+ {
1389
+ field: "primaryContext",
1390
+ description: "Primary domain context from available_contexts (e.g., wallet, knowledge)",
1391
+ validateField: false,
1392
+ streamField: false,
1393
+ },
1394
+ {
1395
+ field: "secondaryContexts",
1396
+ description: "Optional comma-separated additional domain contexts",
1397
+ validateField: false,
1398
+ streamField: false,
1399
+ },
1400
+ {
1401
+ field: "evidenceTurnIds",
1402
+ description: "Optional comma-separated message IDs that influenced this decision",
1403
+ validateField: false,
1404
+ streamField: false,
1405
+ },
1406
+ ],
1407
+ options: {
1408
+ contextCheckLevel: 0, // Set to 0 for now
1409
+ // Classifier failures are usually transient provider hiccups;
1410
+ // give this internal decision one short retry window.
1411
+ maxRetries: Math.max(1, Math.min(opts.maxRetries, 2)),
1412
+ retryBackoff: {
1413
+ initialMs: 500,
1414
+ multiplier: 2,
1415
+ maxMs: 2000,
1416
+ },
1417
+ modelType: resolveShouldRespondModelType(opts.shouldRespondModel),
1418
+ preferredEncapsulation: "toon",
1419
+ },
1420
+ });
1421
+ runtime.logger.debug({ src: "service:message", responseObject }, "Parsed evaluation result");
1422
+ const rawAction = typeof responseObject?.action === "string"
1423
+ ? responseObject.action
1424
+ : "";
1425
+ const actionUpper = rawAction.trim().toUpperCase();
1426
+ const hasValidClassifierAction = actionUpper.length > 0 && ALLOWED_CLASSIFIER_ACTIONS.has(actionUpper);
1427
+ routedDecision = parseContextRoutingMetadata(responseObject);
1428
+ setContextRoutingMetadata(message, routedDecision);
1429
+ if (!hasValidClassifierAction) {
1430
+ runtime.logger.warn({
1431
+ src: "service:message",
1432
+ action: responseObject?.action,
1433
+ }, "Classifier response missing valid action; treating as IGNORE");
1434
+ terminalDecision = "IGNORE";
1435
+ shouldRespondToMessage = false;
1436
+ }
1437
+ else {
1438
+ const dual = applyDualPressureToClassifierAction(runtime, responseObject, rawAction);
1439
+ dualPressureLog = dual.pressure;
1440
+ shouldRespondClassifierAction = dual.finalActionUpper;
1441
+ if (dual.finalActionUpper === "IGNORE" ||
1442
+ dual.finalActionUpper === "STOP") {
1443
+ terminalDecision = dual.finalActionUpper;
1444
+ }
1445
+ shouldRespondToMessage =
1446
+ dual.finalActionUpper === "REPLY" ||
1447
+ dual.finalActionUpper === "RESPOND";
1448
+ }
1449
+ }
1450
+ }
1451
+ let responseContent = null;
1452
+ let responseMessages = [];
1453
+ let mode = "none";
1454
+ // Holds a deferred simple-mode reply that will be flushed after
1455
+ // evaluators + reflection have had a chance to override it. Declared
1456
+ // out here so the post-evaluation flush at the bottom of handleMessage
1457
+ // can see the same variable that the simple-mode branch sets.
1458
+ let pendingSimpleEmit = null;
1459
+ // Track memory IDs created for the simple-mode reply so we can clean
1460
+ // them up if reflection overrides the deferred emit (Greptile P1 fix).
1461
+ let pendingSimpleMemoryIds = [];
1462
+ if (shouldRespondToMessage) {
1463
+ const resolvedRouting = mergeContextRouting(state, message);
1464
+ let executionState = state;
1465
+ if (routedDecision) {
1466
+ executionState = withContextRoutingValues(await runtime.composeState(message, ["ACTIONS", "PROVIDERS"], false, false), {
1467
+ [AVAILABLE_CONTEXTS_STATE_KEY]: state.values?.[AVAILABLE_CONTEXTS_STATE_KEY],
1468
+ [CONTEXT_ROUTING_STATE_KEY]: resolvedRouting,
1469
+ });
1470
+ }
1471
+ const result = opts.useMultiStep
1472
+ ? await this.runMultiStepCore(runtime, message, executionState, callback, opts, responseId, promptAttachments, {
1473
+ precomposedState: executionState,
1474
+ })
1475
+ : await this.runSingleShotCore(runtime, message, executionState, opts, responseId, promptAttachments, {
1476
+ precomposedState: executionState,
1477
+ });
1478
+ responseContent = result.responseContent;
1479
+ responseMessages = result.responseMessages;
1480
+ state = result.state;
1481
+ mode = result.mode;
1482
+ // Race check before we send anything
1483
+ const currentResponseId = agentResponses.get(message.roomId);
1484
+ if (currentResponseId !== responseId && !opts.keepExistingResponses) {
1485
+ runtime.logger.info({
1486
+ src: "service:message",
1487
+ agentId: runtime.agentId,
1488
+ roomId: message.roomId,
1489
+ }, "Response discarded - newer message being processed");
1490
+ return {
1491
+ didRespond: false,
1492
+ responseContent: null,
1493
+ responseMessages: [],
1494
+ state,
1495
+ mode: "none",
1496
+ };
1497
+ }
1498
+ if (responseContent && message.id) {
1499
+ responseContent.inReplyTo = createUniqueUuid(runtime, message.id);
1500
+ }
1501
+ if (responseContent?.providers && responseContent.providers.length > 0) {
1502
+ state = await runtime.composeState(message, responseContent.providers, false, false);
1503
+ }
1504
+ // Save response memory to database
1505
+ if (responseMessages.length > 0) {
1506
+ for (const responseMemory of responseMessages) {
1507
+ // Update the content in case inReplyTo was added
1508
+ if (responseContent) {
1509
+ responseMemory.content = responseContent;
1510
+ }
1511
+ runtime.logger.debug({ src: "service:message", memoryId: responseMemory.id }, "Saving response to memory");
1512
+ await runtime.createMemory(responseMemory, "messages");
1513
+ await this.emitMessageSent(runtime, responseMemory, message.content.source ?? "messageHandler");
1514
+ // Track IDs for simple-mode so we can delete orphaned
1515
+ // memories if reflection overrides the deferred emit.
1516
+ if (mode === "simple" && responseMemory.id) {
1517
+ pendingSimpleMemoryIds.push(responseMemory.id);
1518
+ }
1519
+ }
1520
+ }
1521
+ if (responseContent) {
1522
+ if (mode === "simple") {
1523
+ // Log provider usage for simple responses
1524
+ if (responseContent.providers &&
1525
+ responseContent.providers.length > 0) {
1526
+ runtime.logger.debug({
1527
+ src: "service:message",
1528
+ providers: responseContent.providers,
1529
+ }, "Simple response used providers");
1530
+ }
1531
+ // Defer the callback until after reflection has had a
1532
+ // chance to override. Redact secrets now so the content
1533
+ // is ready to flush at the bottom of handleMessage.
1534
+ if (responseContent.text) {
1535
+ responseContent.text = runtime.redactSecrets(responseContent.text);
1536
+ }
1537
+ pendingSimpleEmit = responseContent;
1538
+ }
1539
+ else if (mode === "actions") {
1540
+ // Pass onStreamChunk to processActions so each action can manage its own streaming context
1541
+ await runtime.processActions(message, responseMessages, state, async (content) => {
1542
+ runtime.logger.debug({ src: "service:message", content }, "Action callback");
1543
+ if (responseContent) {
1544
+ responseContent.actionCallbacks = content;
1545
+ }
1546
+ if (callback) {
1547
+ return callback(content);
1548
+ }
1549
+ return [];
1550
+ }, { onStreamChunk: opts.onStreamChunk });
1551
+ if (opts.continueAfterActions &&
1552
+ message.id &&
1553
+ shouldContinueAfterActions(runtime, responseContent) &&
1554
+ !suppressesPostActionContinuation(runtime, responseContent)) {
1555
+ const continuation = await this.runPostActionContinuation(runtime, message, state, callback, opts, runtime.getActionResults(message.id));
1556
+ if (continuation.responseMessages.length > 0) {
1557
+ responseMessages = [
1558
+ ...responseMessages,
1559
+ ...continuation.responseMessages,
1560
+ ];
1561
+ }
1562
+ if (continuation.responseContent) {
1563
+ responseContent = continuation.responseContent;
1564
+ mode = continuation.mode;
1565
+ }
1566
+ state = continuation.state;
1567
+ }
1568
+ }
1569
+ }
1570
+ }
1571
+ else {
1572
+ // Agent decided not to respond
1573
+ runtime.logger.debug({ src: "service:message" }, "Agent decided not to respond");
1574
+ // Check if we still have the latest response ID
1575
+ const currentResponseId = agentResponses.get(message.roomId);
1576
+ if (currentResponseId !== responseId && !opts.keepExistingResponses) {
1577
+ runtime.logger.info({
1578
+ src: "service:message",
1579
+ agentId: runtime.agentId,
1580
+ roomId: message.roomId,
1581
+ }, "Ignore response discarded - newer message being processed");
1582
+ await this.emitRunEnded(runtime, runId, message, startTime, "replaced");
1583
+ return {
1584
+ didRespond: false,
1585
+ responseContent: null,
1586
+ responseMessages: [],
1587
+ state,
1588
+ mode: "none",
1589
+ };
1590
+ }
1591
+ if (!message.id) {
1592
+ runtime.logger.error({ src: "service:message", agentId: runtime.agentId }, "Message ID is missing, cannot create ignore response");
1593
+ await this.emitRunEnded(runtime, runId, message, startTime, "noMessageId");
1594
+ return {
1595
+ didRespond: false,
1596
+ responseContent: null,
1597
+ responseMessages: [],
1598
+ state,
1599
+ mode: "none",
1600
+ };
1601
+ }
1602
+ // Construct a minimal content object indicating the terminal decision
1603
+ const terminalAction = terminalDecision ?? "IGNORE";
1604
+ const terminalContent = {
1605
+ thought: terminalAction === "STOP"
1606
+ ? "Agent decided to stop and end the run."
1607
+ : "Agent decided not to respond to this message.",
1608
+ actions: [terminalAction],
1609
+ simple: true,
1610
+ inReplyTo: createUniqueUuid(runtime, message.id),
1611
+ };
1612
+ // Call the callback with the terminal content
1613
+ if (callback) {
1614
+ await callback(terminalContent);
1615
+ }
1616
+ // Save this terminal action/thought to memory
1617
+ const terminalMemory = {
1618
+ id: asUUID(v4()),
1619
+ entityId: runtime.agentId,
1620
+ agentId: runtime.agentId,
1621
+ content: terminalContent,
1622
+ roomId: message.roomId,
1623
+ createdAt: Date.now(),
1624
+ };
1625
+ await runtime.createMemory(terminalMemory, "messages");
1626
+ await this.emitMessageSent(runtime, terminalMemory, message.content.source ?? "messageHandler");
1627
+ runtime.logger.debug({ src: "service:message", memoryId: terminalMemory.id }, "Saved terminal response to memory");
1628
+ }
1629
+ // Clean up the response ID
1630
+ clearLatestResponseId(runtime.agentId, message.roomId, responseId);
1631
+ // Run evaluators before ending the turn because reflection can now mark
1632
+ // the task incomplete and trigger another continuation/action pass.
1633
+ const runEvaluate = () => runtime.evaluate(message, state, shouldRespondToMessage && !isStopResponse(responseContent), async (content) => {
1634
+ runtime.logger.debug({ src: "service:message", content }, "Evaluate callback");
1635
+ if (responseContent) {
1636
+ responseContent.evalCallbacks = content;
1637
+ }
1638
+ if (callback) {
1639
+ if (content.text) {
1640
+ content.text = runtime.redactSecrets(content.text);
1641
+ }
1642
+ return callback(content);
1643
+ }
1644
+ return [];
1645
+ }, responseMessages);
1646
+ await runEvaluate();
1647
+ if (opts.continueAfterActions && message.id) {
1648
+ const taskCompletion = await runtime.getCache(getTaskCompletionCacheKey(message.id));
1649
+ await runtime.deleteCache(getTaskCompletionCacheKey(message.id));
1650
+ if (taskCompletion?.assessed &&
1651
+ !taskCompletion.completed &&
1652
+ // Honor `suppressPostActionContinuation` here too. The flag's
1653
+ // contract per Action.suppressPostActionContinuation is "stop after
1654
+ // this action — don't run any continuation LLM turn." Without this
1655
+ // guard, an action that already emitted a complete user-facing
1656
+ // reply (e.g. CALENDAR_ACTION) will get a second visible callback
1657
+ // when the reflection evaluator marks the task as incomplete and
1658
+ // triggers another LLM/processActions pass.
1659
+ !suppressesPostActionContinuation(runtime, responseContent)) {
1660
+ const directReplyText = typeof responseContent?.text === "string"
1661
+ ? responseContent.text.trim()
1662
+ : "";
1663
+ let latestActionResults = [];
1664
+ const shouldWaitForUser = isSimpleReplyResponse(responseContent) && directReplyText.length > 0
1665
+ ? isLikelyClarifyingQuestion(directReplyText)
1666
+ : (() => {
1667
+ latestActionResults = runtime.getActionResults(message.id);
1668
+ return shouldWaitForUserAfterIncompleteReflection(responseContent, latestActionResults);
1669
+ })();
1670
+ if (shouldWaitForUser) {
1671
+ runtime.logger.debug({
1672
+ src: "service:message",
1673
+ messageId: message.id,
1674
+ taskCompletionReason: taskCompletion.reason,
1675
+ replyPreview: getLatestVisibleReplyText(responseContent, latestActionResults).slice(0, 200),
1676
+ }, "Skipping reflection continuation because the agent is waiting for user input");
1677
+ }
1678
+ else {
1679
+ const continuation = await this.runReflectionTaskContinuation(runtime, message, state, callback, opts, taskCompletion);
1680
+ if (continuation.responseMessages.length > 0) {
1681
+ responseMessages = [
1682
+ ...responseMessages,
1683
+ ...continuation.responseMessages,
1684
+ ];
1685
+ }
1686
+ if (continuation.responseContent) {
1687
+ responseContent = continuation.responseContent;
1688
+ mode = continuation.mode;
1689
+ }
1690
+ // Reflection produced a continuation (may or may not have
1691
+ // responseContent — e.g. actions that set results but the
1692
+ // helper returned early). Drop the deferred chatty REPLY
1693
+ // either way: emitting both would show two contradictory
1694
+ // messages, and even when responseContent is null the
1695
+ // continuation's action callbacks already went to the user.
1696
+ if (pendingSimpleEmit &&
1697
+ (continuation.responseContent ||
1698
+ continuation.responseMessages.length > 0)) {
1699
+ // Clean up orphaned memories that were persisted before
1700
+ // we knew reflection would override (Greptile P1 fix).
1701
+ for (const memId of pendingSimpleMemoryIds) {
1702
+ await runtime.deleteMemory(memId);
1703
+ }
1704
+ pendingSimpleMemoryIds = [];
1705
+ pendingSimpleEmit = null;
1706
+ }
1707
+ state = continuation.state;
1708
+ }
1709
+ }
1710
+ }
1711
+ // Flush the deferred simple-mode reply now that reflection has had its
1712
+ // chance to override. If reflection produced its own response, this is
1713
+ // already null and the original chatty REPLY is dropped.
1714
+ if (pendingSimpleEmit && callback) {
1715
+ await callback(pendingSimpleEmit);
1716
+ }
1717
+ const didRespond = responseMessages.length > 0 && !isStopResponse(responseContent);
1718
+ // Collect metadata for logging
1719
+ let entityName = "noname";
1720
+ if (message.metadata &&
1721
+ "entityName" in message.metadata &&
1722
+ typeof message.metadata.entityName === "string") {
1723
+ entityName = message.metadata.entityName;
1724
+ }
1725
+ const isDM = message.content && message.content.channelType === ChannelType.DM;
1726
+ let roomName = entityName;
1727
+ if (!isDM) {
1728
+ const roomDatas = await runtime.getRoomsByIds([message.roomId]);
1729
+ if (roomDatas?.length) {
1730
+ const roomData = roomDatas[0];
1731
+ if (roomData.name) {
1732
+ roomName = roomData.name;
1733
+ }
1734
+ if (roomData.worldId) {
1735
+ const worldData = await runtime.getWorld(roomData.worldId);
1736
+ if (worldData) {
1737
+ roomName = `${worldData.name}-${roomName}`;
1738
+ }
1739
+ }
1740
+ }
1741
+ }
1742
+ const date = new Date();
1743
+ // Extract available actions from provider data
1744
+ const stateData = state.data;
1745
+ const stateDataProviders = stateData?.providers;
1746
+ const actionsProvider = stateDataProviders?.ACTIONS;
1747
+ const actionsProviderData = actionsProvider?.data;
1748
+ const actionsData = actionsProviderData && "actionsData" in actionsProviderData
1749
+ ? actionsProviderData.actionsData
1750
+ : undefined;
1751
+ const availableActions = actionsData?.map((a) => a.name) ?? [];
1752
+ const _logData = {
1753
+ at: date.toString(),
1754
+ timestamp: Math.floor(date.getTime() / 1000),
1755
+ messageId: message.id,
1756
+ userEntityId: message.entityId,
1757
+ input: message.content.text,
1758
+ thought: responseContent?.thought,
1759
+ simple: responseContent?.simple,
1760
+ availableActions,
1761
+ actions: responseContent?.actions,
1762
+ providers: responseContent?.providers,
1763
+ irt: responseContent?.inReplyTo,
1764
+ output: responseContent?.text,
1765
+ entityName,
1766
+ source: message.content.source,
1767
+ channelType: message.content.channelType,
1768
+ roomName,
1769
+ };
1770
+ // Emit run ended event
1771
+ await runtime.emitEvent(EventType.RUN_ENDED, {
1772
+ runtime,
1773
+ source: "messageHandler",
1774
+ runId,
1775
+ messageId: message.id,
1776
+ roomId: message.roomId,
1777
+ entityId: message.entityId,
1778
+ startTime,
1779
+ status: "completed",
1780
+ endTime: Date.now(),
1781
+ duration: Date.now() - startTime,
1782
+ });
1783
+ return {
1784
+ didRespond,
1785
+ responseContent,
1786
+ responseMessages,
1787
+ state,
1788
+ mode,
1789
+ ...(dualPressureLog !== null || shouldRespondClassifierAction !== null
1790
+ ? {
1791
+ dualPressure: dualPressureLog,
1792
+ shouldRespondClassifierAction,
1793
+ }
1794
+ : {}),
1795
+ };
1796
+ }
1797
+ /**
1798
+ * Determines whether the agent should respond to a message.
1799
+ * Uses simple rules for obvious cases (DM, mentions) and defers to LLM for ambiguous cases.
1800
+ */
1801
+ shouldRespond(runtime, message, room, mentionContext) {
1802
+ if (!room) {
1803
+ return {
1804
+ shouldRespond: false,
1805
+ skipEvaluation: true,
1806
+ reason: "no room context",
1807
+ primaryContext: "general",
1808
+ };
1809
+ }
1810
+ function normalizeEnvList(value) {
1811
+ if (!value || typeof value !== "string")
1812
+ return [];
1813
+ const cleaned = value.trim().replace(/^\[|\]$/g, "");
1814
+ return cleaned
1815
+ .split(",")
1816
+ .map((v) => v.trim())
1817
+ .filter(Boolean);
1818
+ }
1819
+ // Channel types that always trigger a response (private channels)
1820
+ const alwaysRespondChannels = [
1821
+ ChannelType.DM,
1822
+ ChannelType.VOICE_DM,
1823
+ ChannelType.SELF,
1824
+ ChannelType.API,
1825
+ ];
1826
+ // Sources that always trigger a response
1827
+ const alwaysRespondSources = ["client_chat"];
1828
+ // Support runtime-configurable overrides via env settings
1829
+ const customChannels = normalizeEnvList(runtime.getSetting("ALWAYS_RESPOND_CHANNELS") ??
1830
+ runtime.getSetting("SHOULD_RESPOND_BYPASS_TYPES"));
1831
+ const customSources = normalizeEnvList(runtime.getSetting("ALWAYS_RESPOND_SOURCES") ??
1832
+ runtime.getSetting("SHOULD_RESPOND_BYPASS_SOURCES"));
1833
+ const respondChannels = new Set([
1834
+ ...alwaysRespondChannels.map((t) => t.toString()),
1835
+ ...customChannels,
1836
+ ].map((s) => s.trim().toLowerCase()));
1837
+ const respondSources = [...alwaysRespondSources, ...customSources].map((s) => s.trim().toLowerCase());
1838
+ const roomType = room.type?.toString().toLowerCase();
1839
+ const sourceStr = message.content.source?.toLowerCase() || "";
1840
+ const textMentionsAgentByName = textContainsAgentName(message.content.text, [runtime.character.name, runtime.character.username]);
1841
+ const textMentionsTaggedParticipants = textContainsUserTag(message.content.text);
1842
+ // 1. DM/VOICE_DM/API channels: always respond (private channels)
1843
+ if (respondChannels.has(roomType)) {
1844
+ return {
1845
+ shouldRespond: true,
1846
+ skipEvaluation: true,
1847
+ reason: `private channel: ${roomType}`,
1848
+ primaryContext: "general",
1849
+ };
1850
+ }
1851
+ // 2. Specific sources (e.g., client_chat): always respond
1852
+ if (respondSources.some((pattern) => sourceStr.includes(pattern))) {
1853
+ return {
1854
+ shouldRespond: true,
1855
+ skipEvaluation: true,
1856
+ reason: `whitelisted source: ${sourceStr}`,
1857
+ primaryContext: "general",
1858
+ };
1859
+ }
1860
+ // 3. Platform mentions and replies: always respond
1861
+ const hasPlatformMention = !!(mentionContext?.isMention || mentionContext?.isReply);
1862
+ if (hasPlatformMention) {
1863
+ const mentionType = mentionContext?.isMention ? "mention" : "reply";
1864
+ return {
1865
+ shouldRespond: true,
1866
+ skipEvaluation: true,
1867
+ reason: `platform ${mentionType}`,
1868
+ primaryContext: "general",
1869
+ };
1870
+ }
1871
+ // 4. Mixed-address messages should still reach the agent when the text
1872
+ // explicitly names it alongside other tagged participants.
1873
+ if (textMentionsTaggedParticipants && textMentionsAgentByName) {
1874
+ return {
1875
+ shouldRespond: true,
1876
+ skipEvaluation: true,
1877
+ reason: "text address with tagged participants",
1878
+ primaryContext: "general",
1879
+ };
1880
+ }
1881
+ // 5. Clear self-modification requests should bypass the ignore-biased
1882
+ // classifier even in group chat, but only for narrow personality/style
1883
+ // update phrasing to avoid broad false positives.
1884
+ if (isExplicitSelfModificationRequest(message.content.text || "")) {
1885
+ return {
1886
+ shouldRespond: true,
1887
+ skipEvaluation: true,
1888
+ reason: "explicit self-modification request",
1889
+ primaryContext: "social",
1890
+ secondaryContexts: ["system"],
1891
+ };
1892
+ }
1893
+ // 6. All other cases are ambiguous enough to need the classifier.
1894
+ // Lack of a platform mention is not proof the message isn't directed
1895
+ // at the agent in a fast-moving group conversation.
1896
+ return {
1897
+ shouldRespond: false,
1898
+ skipEvaluation: false,
1899
+ reason: textMentionsAgentByName
1900
+ ? "agent named in text requires LLM evaluation"
1901
+ : "needs LLM evaluation",
1902
+ primaryContext: "general",
1903
+ };
1904
+ }
1905
+ /**
1906
+ * Processes attachments by generating descriptions for supported media types.
1907
+ */
1908
+ async processAttachments(runtime, attachments) {
1909
+ if (!attachments || attachments.length === 0) {
1910
+ return [];
1911
+ }
1912
+ runtime.logger.debug({ src: "service:message", count: attachments.length }, "Processing attachments");
1913
+ const processedAttachments = await Promise.all(attachments.map(async (attachment) => {
1914
+ const processedAttachment = { ...attachment };
1915
+ const isRemote = /^(http|https):\/\//.test(attachment.url);
1916
+ const url = isRemote
1917
+ ? attachment.url
1918
+ : getLocalServerUrl(attachment.url);
1919
+ // Only process images that don't already have descriptions
1920
+ if (attachment.contentType === ContentType.IMAGE &&
1921
+ !attachment.description) {
1922
+ // Skip image analysis when vision / image-description is explicitly
1923
+ // disabled (e.g. the user toggled the Vision capability off).
1924
+ const disableImageDesc = runtime.getSetting("DISABLE_IMAGE_DESCRIPTION");
1925
+ if (disableImageDesc === true || disableImageDesc === "true") {
1926
+ return processedAttachment;
1927
+ }
1928
+ runtime.logger.debug({ src: "service:message", imageUrl: attachment.url }, "Generating image description");
1929
+ let imageUrl = url;
1930
+ const runtimeFetch = runtime.fetch ?? globalThis.fetch;
1931
+ const inlineData = attachment;
1932
+ if (typeof inlineData._data === "string" &&
1933
+ inlineData._data.trim() &&
1934
+ typeof inlineData._mimeType === "string" &&
1935
+ inlineData._mimeType.trim()) {
1936
+ imageUrl = `data:${inlineData._mimeType};base64,${inlineData._data}`;
1937
+ }
1938
+ else if (!isRemote) {
1939
+ // Convert local/internal media to base64
1940
+ const res = await runtimeFetch(url);
1941
+ if (!res.ok)
1942
+ throw new Error(`Failed to fetch image: ${res.statusText}`);
1943
+ const arrayBuffer = await res.arrayBuffer();
1944
+ const buffer = Buffer.from(arrayBuffer);
1945
+ const contentType = res.headers.get("content-type") || "application/octet-stream";
1946
+ imageUrl = `data:${contentType};base64,${buffer.toString("base64")}`;
1947
+ }
1948
+ const response = await runtime.useModel(ModelType.IMAGE_DESCRIPTION, {
1949
+ prompt: imageDescriptionTemplate,
1950
+ imageUrl,
1951
+ });
1952
+ if (typeof response === "string") {
1953
+ const parsedXml = parseKeyValueXml(response);
1954
+ if (parsedXml && (parsedXml.description || parsedXml.text)) {
1955
+ processedAttachment.description =
1956
+ (typeof parsedXml.description === "string"
1957
+ ? parsedXml.description
1958
+ : "") || "";
1959
+ processedAttachment.title =
1960
+ (typeof parsedXml.title === "string"
1961
+ ? parsedXml.title
1962
+ : "Image") || "Image";
1963
+ processedAttachment.text =
1964
+ (typeof parsedXml.text === "string" ? parsedXml.text : "") ||
1965
+ (typeof parsedXml.description === "string"
1966
+ ? parsedXml.description
1967
+ : "") ||
1968
+ "";
1969
+ runtime.logger.debug({
1970
+ src: "service:message",
1971
+ descriptionPreview: processedAttachment.description?.substring(0, 100),
1972
+ }, "Generated image description");
1973
+ }
1974
+ else {
1975
+ // Fallback: Try simple regex parsing
1976
+ const responseStr = response;
1977
+ const titleMatch = responseStr.match(/<title>([^<]+)<\/title>/);
1978
+ const descMatch = responseStr.match(/<description>([^<]+)<\/description>/);
1979
+ const textMatch = responseStr.match(/<text>([^<]+)<\/text>/);
1980
+ if (titleMatch || descMatch || textMatch) {
1981
+ processedAttachment.title = titleMatch?.[1] || "Image";
1982
+ processedAttachment.description = descMatch?.[1] || "";
1983
+ processedAttachment.text =
1984
+ textMatch?.[1] || descMatch?.[1] || "";
1985
+ runtime.logger.debug({
1986
+ src: "service:message",
1987
+ descriptionPreview: processedAttachment.description?.substring(0, 100),
1988
+ }, "Used fallback XML parsing for description");
1989
+ }
1990
+ else {
1991
+ runtime.logger.warn({ src: "service:message" }, "Failed to parse XML response for image description");
1992
+ }
1993
+ }
1994
+ }
1995
+ else if (response &&
1996
+ typeof response === "object" &&
1997
+ "description" in response) {
1998
+ // Handle object responses for backwards compatibility
1999
+ const objResponse = response;
2000
+ processedAttachment.description = objResponse.description;
2001
+ processedAttachment.title = objResponse.title || "Image";
2002
+ processedAttachment.text = objResponse.description;
2003
+ runtime.logger.debug({
2004
+ src: "service:message",
2005
+ descriptionPreview: processedAttachment.description?.substring(0, 100),
2006
+ }, "Generated image description");
2007
+ }
2008
+ else {
2009
+ runtime.logger.warn({ src: "service:message" }, "Unexpected response format for image description");
2010
+ }
2011
+ }
2012
+ else if (attachment.contentType === ContentType.DOCUMENT &&
2013
+ !attachment.text) {
2014
+ const docFetch = runtime.fetch ?? globalThis.fetch;
2015
+ const res = await docFetch(url);
2016
+ if (!res.ok)
2017
+ throw new Error(`Failed to fetch document: ${res.statusText}`);
2018
+ const contentType = res.headers.get("content-type") || "";
2019
+ const isPlainText = contentType.startsWith("text/plain");
2020
+ if (isPlainText) {
2021
+ runtime.logger.debug({ src: "service:message", documentUrl: attachment.url }, "Processing plain text document");
2022
+ const textContent = await res.text();
2023
+ processedAttachment.text = textContent;
2024
+ processedAttachment.title =
2025
+ processedAttachment.title || "Text File";
2026
+ runtime.logger.debug({
2027
+ src: "service:message",
2028
+ textPreview: processedAttachment.text?.substring(0, 100),
2029
+ }, "Extracted text content");
2030
+ }
2031
+ else {
2032
+ runtime.logger.warn({ src: "service:message", contentType }, "Skipping non-plain-text document");
2033
+ }
2034
+ }
2035
+ else if (attachment.contentType === ContentType.AUDIO &&
2036
+ !attachment.text) {
2037
+ runtime.logger.debug({ src: "service:message", audioUrl: attachment.url }, "Transcribing audio attachment");
2038
+ try {
2039
+ let transcriptionInput = url;
2040
+ const audioFetch = runtime.fetch ?? globalThis.fetch;
2041
+ // For local/internal URLs, fetch the audio as a buffer
2042
+ if (!isRemote) {
2043
+ const res = await audioFetch(url);
2044
+ if (!res.ok)
2045
+ throw new Error(`Failed to fetch audio: ${res.statusText}`);
2046
+ const arrayBuffer = await res.arrayBuffer();
2047
+ transcriptionInput = Buffer.from(arrayBuffer);
2048
+ }
2049
+ const transcript = await runtime.useModel(ModelType.TRANSCRIPTION, transcriptionInput);
2050
+ if (typeof transcript === "string" && transcript.trim()) {
2051
+ processedAttachment.text = transcript.trim();
2052
+ processedAttachment.title = processedAttachment.title || "Audio";
2053
+ processedAttachment.description = `Transcript: ${transcript.trim()}`;
2054
+ runtime.logger.debug({
2055
+ src: "service:message",
2056
+ transcriptPreview: processedAttachment.text?.substring(0, 100),
2057
+ }, "Transcribed audio attachment");
2058
+ }
2059
+ }
2060
+ catch (err) {
2061
+ runtime.logger.warn({ src: "service:message", err }, "Audio transcription failed, continuing without transcript");
2062
+ }
2063
+ }
2064
+ else if (attachment.contentType === ContentType.VIDEO &&
2065
+ !attachment.text) {
2066
+ runtime.logger.debug({ src: "service:message", videoUrl: attachment.url }, "Transcribing video attachment");
2067
+ try {
2068
+ let transcriptionInput = url;
2069
+ const videoFetch = runtime.fetch ?? globalThis.fetch;
2070
+ // For local/internal URLs, fetch the video as a buffer
2071
+ if (!isRemote) {
2072
+ const res = await videoFetch(url);
2073
+ if (!res.ok)
2074
+ throw new Error(`Failed to fetch video: ${res.statusText}`);
2075
+ const arrayBuffer = await res.arrayBuffer();
2076
+ transcriptionInput = Buffer.from(arrayBuffer);
2077
+ }
2078
+ const transcript = await runtime.useModel(ModelType.TRANSCRIPTION, transcriptionInput);
2079
+ if (typeof transcript === "string" && transcript.trim()) {
2080
+ processedAttachment.text = transcript.trim();
2081
+ processedAttachment.title = processedAttachment.title || "Video";
2082
+ processedAttachment.description = `Transcript: ${transcript.trim()}`;
2083
+ runtime.logger.debug({
2084
+ src: "service:message",
2085
+ transcriptPreview: processedAttachment.text?.substring(0, 100),
2086
+ }, "Transcribed video attachment");
2087
+ }
2088
+ }
2089
+ catch (err) {
2090
+ runtime.logger.warn({ src: "service:message", err }, "Video transcription failed, continuing without transcript");
2091
+ }
2092
+ }
2093
+ return processedAttachment;
2094
+ }));
2095
+ return processedAttachments;
2096
+ }
2097
+ async runPostActionContinuation(runtime, message, state, callback, opts, initialActionResults) {
2098
+ const contextRoutingStateValues = {
2099
+ [AVAILABLE_CONTEXTS_STATE_KEY]: state.values?.[AVAILABLE_CONTEXTS_STATE_KEY],
2100
+ [CONTEXT_ROUTING_STATE_KEY]: state.values?.[CONTEXT_ROUTING_STATE_KEY],
2101
+ };
2102
+ const taskCompletion = state.data?.taskCompletion;
2103
+ if (!message.id || initialActionResults.length === 0) {
2104
+ return {
2105
+ responseContent: null,
2106
+ responseMessages: [],
2107
+ state,
2108
+ mode: "none",
2109
+ };
2110
+ }
2111
+ const traceActionResults = [...initialActionResults];
2112
+ const responseMessages = [];
2113
+ let accumulatedState = state;
2114
+ let responseContent = null;
2115
+ for (let iterationCount = 0; iterationCount < opts.maxMultiStepIterations; iterationCount++) {
2116
+ accumulatedState = withTaskCompletion(withActionResults(await composeContinuationDecisionState(runtime, message, contextRoutingStateValues), traceActionResults), taskCompletion);
2117
+ const continuation = await this.runSingleShotCore(runtime, message, accumulatedState, opts, asUUID(v4()), resolvePromptAttachments(message.content.attachments), {
2118
+ prompt: runtime.character.templates?.postActionDecisionTemplate ||
2119
+ postActionDecisionTemplate,
2120
+ precomposedState: accumulatedState,
2121
+ failureStage: "preparing the follow-up reply after actions",
2122
+ });
2123
+ if (!continuation.responseContent) {
2124
+ runtime.logger.debug({ src: "service:message", iteration: iterationCount + 1 }, "Post-action continuation produced no response");
2125
+ break;
2126
+ }
2127
+ responseContent = continuation.responseContent;
2128
+ if (message.id) {
2129
+ responseContent.inReplyTo = createUniqueUuid(runtime, message.id);
2130
+ }
2131
+ if (responseContent.providers && responseContent.providers.length > 0) {
2132
+ accumulatedState = withActionResults(withContextRoutingValues(await runtime.composeState(message, responseContent.providers, false, false), contextRoutingStateValues), traceActionResults);
2133
+ }
2134
+ else {
2135
+ accumulatedState = withActionResults(continuation.state, traceActionResults);
2136
+ }
2137
+ accumulatedState = withTaskCompletion(accumulatedState, taskCompletion);
2138
+ if (continuation.responseMessages.length > 0) {
2139
+ for (const responseMemory of continuation.responseMessages) {
2140
+ responseMemory.content = responseContent;
2141
+ await runtime.createMemory(responseMemory, "messages");
2142
+ await this.emitMessageSent(runtime, responseMemory, message.content.source ?? "messageHandler");
2143
+ }
2144
+ responseMessages.push(...continuation.responseMessages);
2145
+ }
2146
+ if (continuation.mode === "simple") {
2147
+ if (callback) {
2148
+ if (responseContent.text) {
2149
+ responseContent.text = runtime.redactSecrets(responseContent.text);
2150
+ }
2151
+ await callback(responseContent);
2152
+ }
2153
+ break;
2154
+ }
2155
+ if (continuation.mode !== "actions") {
2156
+ break;
2157
+ }
2158
+ await runtime.processActions(message, continuation.responseMessages, accumulatedState, async (content) => {
2159
+ runtime.logger.debug({ src: "service:message", content }, "Post-action callback");
2160
+ if (responseContent) {
2161
+ responseContent.actionCallbacks = content;
2162
+ }
2163
+ if (callback) {
2164
+ return callback(content);
2165
+ }
2166
+ return [];
2167
+ }, { onStreamChunk: opts.onStreamChunk });
2168
+ if (!shouldContinueAfterActions(runtime, responseContent) ||
2169
+ suppressesPostActionContinuation(runtime, responseContent)) {
2170
+ break;
2171
+ }
2172
+ const latestActionResults = runtime.getActionResults(message.id);
2173
+ if (latestActionResults.length === 0) {
2174
+ runtime.logger.warn({ src: "service:message", iteration: iterationCount + 1 }, "Post-action continuation produced no new action results");
2175
+ break;
2176
+ }
2177
+ traceActionResults.push(...latestActionResults);
2178
+ }
2179
+ accumulatedState = withTaskCompletion(withActionResults(accumulatedState, traceActionResults), taskCompletion);
2180
+ return {
2181
+ responseContent,
2182
+ responseMessages,
2183
+ state: accumulatedState,
2184
+ mode: responseContent ? "simple" : "none",
2185
+ };
2186
+ }
2187
+ async runReflectionTaskContinuation(runtime, message, state, callback, opts, taskCompletion) {
2188
+ const contextRoutingStateValues = {
2189
+ [AVAILABLE_CONTEXTS_STATE_KEY]: state.values?.[AVAILABLE_CONTEXTS_STATE_KEY],
2190
+ [CONTEXT_ROUTING_STATE_KEY]: state.values?.[CONTEXT_ROUTING_STATE_KEY],
2191
+ };
2192
+ const initialActionResults = message.id
2193
+ ? runtime.getActionResults(message.id)
2194
+ : [];
2195
+ let accumulatedState = withTaskCompletion(withActionResults(await composeContinuationDecisionState(runtime, message, contextRoutingStateValues), initialActionResults), taskCompletion);
2196
+ const continuation = await this.runSingleShotCore(runtime, message, accumulatedState, opts, asUUID(v4()), resolvePromptAttachments(message.content.attachments), {
2197
+ prompt: runtime.character.templates?.postActionDecisionTemplate ||
2198
+ postActionDecisionTemplate,
2199
+ precomposedState: accumulatedState,
2200
+ failureStage: "continuing after reflection marked the task incomplete",
2201
+ });
2202
+ if (!continuation.responseContent) {
2203
+ return {
2204
+ responseContent: null,
2205
+ responseMessages: [],
2206
+ state: accumulatedState,
2207
+ mode: "none",
2208
+ };
2209
+ }
2210
+ const responseMessages = [];
2211
+ const responseContent = continuation.responseContent;
2212
+ if (message.id) {
2213
+ responseContent.inReplyTo = createUniqueUuid(runtime, message.id);
2214
+ }
2215
+ if (responseContent.providers && responseContent.providers.length > 0) {
2216
+ accumulatedState = withTaskCompletion(withActionResults(withContextRoutingValues(await runtime.composeState(message, responseContent.providers, false, false), contextRoutingStateValues), initialActionResults), taskCompletion);
2217
+ }
2218
+ else {
2219
+ accumulatedState = withTaskCompletion(withActionResults(continuation.state, initialActionResults), taskCompletion);
2220
+ }
2221
+ if (continuation.responseMessages.length > 0) {
2222
+ for (const responseMemory of continuation.responseMessages) {
2223
+ responseMemory.content = responseContent;
2224
+ await runtime.createMemory(responseMemory, "messages");
2225
+ await this.emitMessageSent(runtime, responseMemory, message.content.source ?? "messageHandler");
2226
+ }
2227
+ responseMessages.push(...continuation.responseMessages);
2228
+ }
2229
+ if (continuation.mode === "simple") {
2230
+ if (callback) {
2231
+ if (responseContent.text) {
2232
+ responseContent.text = runtime.redactSecrets(responseContent.text);
2233
+ }
2234
+ await callback(responseContent);
2235
+ }
2236
+ return {
2237
+ responseContent,
2238
+ responseMessages,
2239
+ state: accumulatedState,
2240
+ mode: "simple",
2241
+ };
2242
+ }
2243
+ if (continuation.mode !== "actions") {
2244
+ return {
2245
+ responseContent,
2246
+ responseMessages,
2247
+ state: accumulatedState,
2248
+ mode: continuation.mode,
2249
+ };
2250
+ }
2251
+ await runtime.processActions(message, continuation.responseMessages, accumulatedState, async (content) => {
2252
+ runtime.logger.debug({ src: "service:message", content }, "Reflection continuation callback");
2253
+ responseContent.actionCallbacks = content;
2254
+ if (callback) {
2255
+ return callback(content);
2256
+ }
2257
+ return [];
2258
+ }, { onStreamChunk: opts.onStreamChunk });
2259
+ const latestActionResults = message.id
2260
+ ? runtime.getActionResults(message.id)
2261
+ : [];
2262
+ accumulatedState = withTaskCompletion(withActionResults(accumulatedState, latestActionResults.length > 0
2263
+ ? latestActionResults
2264
+ : initialActionResults), taskCompletion);
2265
+ if (latestActionResults.length > 0 &&
2266
+ shouldContinueAfterActions(runtime, responseContent) &&
2267
+ !suppressesPostActionContinuation(runtime, responseContent)) {
2268
+ return await this.runPostActionContinuation(runtime, message, accumulatedState, callback, opts, latestActionResults);
2269
+ }
2270
+ return {
2271
+ responseContent,
2272
+ responseMessages,
2273
+ state: accumulatedState,
2274
+ mode: "actions",
2275
+ };
2276
+ }
2277
+ /**
2278
+ * Single-shot strategy: one LLM call to generate response
2279
+ * Uses dynamicPromptExecFromState for validation-aware structured output
2280
+ */
2281
+ async runSingleShotCore(runtime, message, state, opts, responseId, promptAttachments, overrides) {
2282
+ state =
2283
+ overrides?.precomposedState ??
2284
+ (await runtime.composeState(message, ["ACTIONS"], false, false));
2285
+ if (!state.values?.actionNames) {
2286
+ runtime.logger.warn({ src: "service:message" }, "actionNames data missing from state");
2287
+ }
2288
+ // Self-modification requests already have a deterministic action path.
2289
+ // Skip the planner so group-chat style updates reliably hit MODIFY_CHARACTER.
2290
+ if (isExplicitSelfModificationRequest(message.content.text || "")) {
2291
+ const modifyCharacterAction = runtime.actions.find((action) => action.name === "MODIFY_CHARACTER");
2292
+ const canHandleSelfModification = await modifyCharacterAction?.validate?.(runtime, message, state);
2293
+ if (canHandleSelfModification) {
2294
+ const responseContent = {
2295
+ thought: "Directly route explicit self-modification request to MODIFY_CHARACTER.",
2296
+ actions: ["MODIFY_CHARACTER"],
2297
+ providers: [],
2298
+ text: "",
2299
+ simple: false,
2300
+ responseId,
2301
+ };
2302
+ const responseMessages = [
2303
+ {
2304
+ id: responseId,
2305
+ entityId: runtime.agentId,
2306
+ agentId: runtime.agentId,
2307
+ content: responseContent,
2308
+ roomId: message.roomId,
2309
+ createdAt: Date.now(),
2310
+ },
2311
+ ];
2312
+ return {
2313
+ responseContent,
2314
+ responseMessages,
2315
+ state,
2316
+ mode: "actions",
2317
+ };
2318
+ }
2319
+ }
2320
+ let responseContent = null;
2321
+ // Create streaming context for retry state tracking
2322
+ const streamingExtractor = opts.onStreamChunk
2323
+ ? new MarkableExtractor()
2324
+ : undefined;
2325
+ const streamingCtx = streamingExtractor && opts.onStreamChunk
2326
+ ? createStreamingContext(streamingExtractor, opts.onStreamChunk, responseId)
2327
+ : undefined;
2328
+ // Resolve the template prompt once so it's available for both the primary
2329
+ // call and any follow-up repair prompts (e.g. parameter repair).
2330
+ const prompt = overrides?.prompt ||
2331
+ runtime.character.templates?.messageHandlerTemplate ||
2332
+ messageHandlerTemplate;
2333
+ // Use dynamicPromptExecFromState for structured output with validation
2334
+ setTrajectoryPurpose("response");
2335
+ const parsedXml = await runtime.dynamicPromptExecFromState({
2336
+ state,
2337
+ params: {
2338
+ prompt,
2339
+ ...(promptAttachments ? { attachments: promptAttachments } : {}),
2340
+ },
2341
+ schema: [
2342
+ // WHY validateField: false on non-streamed fields?
2343
+ // At validation level 1, each field gets validation codes by default.
2344
+ // If a non-streamed field's code is corrupted, we'd retry unnecessarily.
2345
+ // By opting out, we reduce token overhead AND avoid false failures.
2346
+ {
2347
+ field: "thought",
2348
+ description: "Your internal reasoning about the message and what to do",
2349
+ validateField: false,
2350
+ streamField: false,
2351
+ },
2352
+ {
2353
+ field: "actions",
2354
+ description: "Ordered action entries. For XML, use one or more <action><name>ACTION_NAME</name><params>...</params></action> blocks inside <actions>.",
2355
+ required: false,
2356
+ validateField: false,
2357
+ streamField: false,
2358
+ },
2359
+ // WHY streamField: true? This is the user-facing output - stream it!
2360
+ // WHY validateField default? At level 1, we want to validate text integrity
2361
+ {
2362
+ field: "text",
2363
+ description: "The text response to send to the user",
2364
+ streamField: true,
2365
+ },
2366
+ {
2367
+ field: "simple",
2368
+ description: "Whether this is a simple response (true/false)",
2369
+ validateField: false,
2370
+ streamField: false,
2371
+ },
2372
+ ],
2373
+ options: {
2374
+ modelType: ModelType.ACTION_PLANNER,
2375
+ preferredEncapsulation: "xml",
2376
+ maxRetries: opts.maxRetries,
2377
+ // Stream through the filtered context callback for real-time output
2378
+ onStreamChunk: streamingCtx?.onStreamChunk,
2379
+ },
2380
+ });
2381
+ runtime.logger.debug({ src: "service:message", parsedXml }, "Parsed Response Content");
2382
+ if (parsedXml) {
2383
+ // Mark streaming as complete now that we have a valid response
2384
+ streamingExtractor?.markComplete();
2385
+ const finalActions = normalizePlannerActions(parsedXml, runtime);
2386
+ responseContent = {
2387
+ ...parsedXml,
2388
+ thought: String(parsedXml.thought || ""),
2389
+ actions: finalActions,
2390
+ providers: [],
2391
+ text: String(parsedXml.text || ""),
2392
+ simple: parsedXml.simple === true || parsedXml.simple === "true",
2393
+ };
2394
+ }
2395
+ else {
2396
+ // dynamicPromptExecFromState returned null - use streamed text if available
2397
+ const streamedText = streamingCtx?.getStreamedText?.() || "";
2398
+ const isTextComplete = streamingCtx?.isComplete?.() ?? false;
2399
+ if (isTextComplete && streamedText) {
2400
+ runtime.logger.info({
2401
+ src: "service:message",
2402
+ streamedTextLength: streamedText.length,
2403
+ streamedTextPreview: streamedText.substring(0, 100),
2404
+ }, "Text extraction complete - using streamed text");
2405
+ responseContent = {
2406
+ thought: "Response generated via streaming",
2407
+ actions: ["REPLY"],
2408
+ providers: [],
2409
+ text: streamedText,
2410
+ simple: true,
2411
+ };
2412
+ }
2413
+ else if (streamedText && !isTextComplete) {
2414
+ // Text was cut mid-stream - attempt continuation
2415
+ runtime.logger.debug({
2416
+ src: "service:message",
2417
+ streamedTextLength: streamedText.length,
2418
+ streamedTextPreview: streamedText.substring(0, 100),
2419
+ }, "Text cut mid-stream - attempting continuation");
2420
+ // Reset extractor for fresh streaming of continuation
2421
+ streamingCtx?.reset?.();
2422
+ // Build continuation prompt with full context (reuses `prompt` from outer scope)
2423
+ const escapedStreamedText = escapeHandlebars(streamedText);
2424
+ const continuationPrompt = `${prompt}
2425
+
2426
+ [CONTINUATION REQUIRED]
2427
+ Your previous response was cut off. The user already received this text:
2428
+ "${escapedStreamedText}"
2429
+
2430
+ Continue EXACTLY from where you left off. Do NOT repeat what was already said.
2431
+ Output ONLY the continuation, starting immediately after the last character above.`;
2432
+ const continuationParsed = await runtime.dynamicPromptExecFromState({
2433
+ state,
2434
+ params: {
2435
+ prompt: continuationPrompt,
2436
+ ...(promptAttachments ? { attachments: promptAttachments } : {}),
2437
+ },
2438
+ schema: [
2439
+ {
2440
+ field: "text",
2441
+ description: "Continuation of response",
2442
+ required: true,
2443
+ streamField: true,
2444
+ },
2445
+ ],
2446
+ options: {
2447
+ modelType: ModelType.ACTION_PLANNER,
2448
+ preferredEncapsulation: "xml",
2449
+ contextCheckLevel: 0, // Fast mode for continuations - we trust the model
2450
+ onStreamChunk: streamingCtx?.onStreamChunk,
2451
+ },
2452
+ });
2453
+ const continuationText = String(continuationParsed?.text || "");
2454
+ const fullText = streamedText + continuationText;
2455
+ responseContent = {
2456
+ thought: "Response completed via continuation",
2457
+ actions: ["REPLY"],
2458
+ providers: [],
2459
+ text: fullText,
2460
+ simple: true,
2461
+ };
2462
+ }
2463
+ else {
2464
+ runtime.logger.warn({ src: "service:message" }, "dynamicPromptExecFromState returned null");
2465
+ return await this.buildStructuredFailureReply(runtime, message, state, responseId, overrides?.failureStage ?? "preparing the reply");
2466
+ }
2467
+ }
2468
+ if (!responseContent) {
2469
+ return {
2470
+ responseContent: null,
2471
+ responseMessages: [],
2472
+ state,
2473
+ mode: "none",
2474
+ };
2475
+ }
2476
+ // Action parameter repair (Python parity):
2477
+ // If the model selected actions with required parameters but omitted <params>,
2478
+ // do a second pass asking for ONLY a <params> block.
2479
+ const requiredByAction = new Map();
2480
+ const actionByName = new Map();
2481
+ for (const action of runtime.actions) {
2482
+ const normalizedName = action.name.trim().toUpperCase();
2483
+ if (normalizedName) {
2484
+ actionByName.set(normalizedName, action);
2485
+ }
2486
+ }
2487
+ for (const a of responseContent.actions ?? []) {
2488
+ const actionName = typeof a === "string" ? a.trim().toUpperCase() : "";
2489
+ if (!actionName)
2490
+ continue;
2491
+ const actionDef = actionByName.get(actionName);
2492
+ const required = actionDef?.parameters?.filter((p) => p.required).map((p) => p.name) ??
2493
+ [];
2494
+ if (required.length > 0) {
2495
+ requiredByAction.set(actionName, required);
2496
+ }
2497
+ }
2498
+ const existingParams = parseActionParams(responseContent.params);
2499
+ const missingRequiredParams = () => {
2500
+ for (const [actionName, required] of requiredByAction) {
2501
+ const params = existingParams.get(actionName);
2502
+ if (!params)
2503
+ return true;
2504
+ for (const key of required) {
2505
+ if (!(key in params))
2506
+ return true;
2507
+ }
2508
+ }
2509
+ return false;
2510
+ };
2511
+ if (requiredByAction.size > 0 && missingRequiredParams()) {
2512
+ const requirementLines = Array.from(requiredByAction.entries())
2513
+ .map(([a, req]) => `- ${a}: ${req.join(", ")}`)
2514
+ .join("\n");
2515
+ const repairPrompt = [
2516
+ prompt,
2517
+ "",
2518
+ "# Parameter Repair",
2519
+ "You selected actions that require parameters but did not include a complete params object.",
2520
+ "Return ONLY XML with a top-level <params> field.",
2521
+ "Example:",
2522
+ "<response>",
2523
+ " <params>",
2524
+ " <SEND_MESSAGE>",
2525
+ " <target>room-or-channel-id</target>",
2526
+ " <text>message body</text>",
2527
+ " </SEND_MESSAGE>",
2528
+ " </params>",
2529
+ "</response>",
2530
+ "",
2531
+ "Required parameters by action:",
2532
+ requirementLines,
2533
+ "",
2534
+ "Do not include thought, actions, providers, text, or any other fields.",
2535
+ ].join("\n");
2536
+ const repairResponse = await runtime.useModel(ModelType.TEXT_LARGE, {
2537
+ prompt: repairPrompt,
2538
+ });
2539
+ const repairParsed = parseKeyValueXml(repairResponse);
2540
+ if (repairParsed?.params) {
2541
+ responseContent.params = repairParsed.params;
2542
+ }
2543
+ }
2544
+ // Benchmark mode (Python parity): force action-based loop when benchmark context is present.
2545
+ const benchmarkMode = state.values.benchmark_has_context === true;
2546
+ if (benchmarkMode) {
2547
+ if (!responseContent.actions || responseContent.actions.length === 0) {
2548
+ responseContent.actions = ["REPLY"];
2549
+ }
2550
+ if (!responseContent.providers ||
2551
+ responseContent.providers.length === 0) {
2552
+ responseContent.providers = ["CONTEXT_BENCH"];
2553
+ }
2554
+ // Suppress any direct planner answer; the REPLY action should generate final output.
2555
+ if (responseContent.actions.some((a) => a.toUpperCase() === "REPLY")) {
2556
+ responseContent.text = "";
2557
+ }
2558
+ }
2559
+ // LLM terminal-control ambiguity handling
2560
+ if (responseContent.actions && responseContent.actions.length > 1) {
2561
+ const isIgnore = (a) => typeof a === "string" && a.toUpperCase() === "IGNORE";
2562
+ const isStop = (a) => typeof a === "string" && a.toUpperCase() === "STOP";
2563
+ const hasIgnore = responseContent.actions.some(isIgnore);
2564
+ const hasStop = responseContent.actions.some(isStop);
2565
+ if (hasIgnore) {
2566
+ if (!responseContent.text || responseContent.text.trim() === "") {
2567
+ responseContent.actions = ["IGNORE"];
2568
+ }
2569
+ else {
2570
+ const filtered = responseContent.actions.filter((a) => !isIgnore(a));
2571
+ responseContent.actions = filtered.length ? filtered : ["REPLY"];
2572
+ }
2573
+ }
2574
+ if (hasStop) {
2575
+ const filtered = responseContent.actions.filter((a) => !isStop(a));
2576
+ responseContent.actions = filtered.length ? filtered : ["STOP"];
2577
+ }
2578
+ }
2579
+ // Some actions are intended to provide the only grounded user-facing answer.
2580
+ // If the planner emits both REPLY/text and one of those actions, drop the
2581
+ // speculative planner text before persisting/sending the initial assistant turn.
2582
+ stripPlannerReplyForSuppressiveActions(runtime, responseContent);
2583
+ // Automatically determine if response is simple
2584
+ const isSimple = isSimpleReplyResponse(responseContent);
2585
+ const isStop = isStopResponse(responseContent);
2586
+ responseContent.simple = isSimple;
2587
+ // Include message ID for streaming coordination (so broadcast uses same ID)
2588
+ responseContent.responseId = responseId;
2589
+ const responseMessages = [
2590
+ {
2591
+ id: responseId,
2592
+ entityId: runtime.agentId,
2593
+ agentId: runtime.agentId,
2594
+ content: responseContent,
2595
+ roomId: message.roomId,
2596
+ createdAt: Date.now(),
2597
+ },
2598
+ ];
2599
+ return {
2600
+ responseContent,
2601
+ responseMessages,
2602
+ state,
2603
+ mode: isStop
2604
+ ? "none"
2605
+ : isSimple && responseContent.text
2606
+ ? "simple"
2607
+ : "actions",
2608
+ };
2609
+ }
2610
+ async buildStructuredFailureReply(runtime, message, state, responseId, stage) {
2611
+ const failure = getStructuredOutputFailure(state);
2612
+ const recentMessages = typeof state.values?.recentMessages === "string" &&
2613
+ state.values.recentMessages.trim().length > 0
2614
+ ? state.values.recentMessages
2615
+ : typeof state.text === "string" && state.text.trim().length > 0
2616
+ ? state.text
2617
+ : typeof message.content.text === "string"
2618
+ ? message.content.text
2619
+ : "(unavailable)";
2620
+ const actionResults = Array.isArray(state.data?.actionResults)
2621
+ ? state.data.actionResults
2622
+ : [];
2623
+ const failurePrompt = [
2624
+ "You are recovering from an internal structured-output failure while responding to a user.",
2625
+ "Write the next user-facing reply in plain language.",
2626
+ "",
2627
+ "Rules:",
2628
+ "- Explain what failed and why using only the diagnostics below.",
2629
+ "- Mention any completed or failed actions if action results are available.",
2630
+ "- Be transparent, concise, and avoid inventing causes.",
2631
+ "- If the model returned malformed XML, TOON, or JSON, say that clearly.",
2632
+ "- Suggest the most useful next step for the user.",
2633
+ "- Return only the reply text. No XML, JSON, TOON, bullet labels, or <think>.",
2634
+ "",
2635
+ `Failure Stage: ${stage}`,
2636
+ "",
2637
+ "Structured Failure Diagnostics:",
2638
+ summarizeStructuredOutputFailure(failure),
2639
+ "",
2640
+ "Recent Conversation:",
2641
+ recentMessages,
2642
+ "",
2643
+ "Action Results So Far:",
2644
+ typeof state.values?.actionResults === "string" &&
2645
+ state.values.actionResults.trim().length > 0
2646
+ ? state.values.actionResults
2647
+ : "No action results available.",
2648
+ "",
2649
+ "Reply:",
2650
+ ].join("\n");
2651
+ let replyText = "";
2652
+ for (const modelType of [
2653
+ ModelType.TEXT_LARGE,
2654
+ ModelType.RESPONSE_HANDLER,
2655
+ ModelType.TEXT_SMALL,
2656
+ ModelType.TEXT_NANO,
2657
+ ]) {
2658
+ try {
2659
+ const response = await runtime.useModel(modelType, {
2660
+ prompt: failurePrompt,
2661
+ });
2662
+ if (typeof response !== "string") {
2663
+ continue;
2664
+ }
2665
+ const cleaned = response
2666
+ .replace(/<think>[\s\S]*?<\/think>/g, "")
2667
+ .trim();
2668
+ const looksStructuredReply = cleaned.startsWith("<") ||
2669
+ /^TOON\b/i.test(cleaned) ||
2670
+ /^(thought|text)\s*:/i.test(cleaned);
2671
+ const parsed = looksStructuredReply
2672
+ ? parseKeyValueXml(cleaned)
2673
+ : null;
2674
+ replyText =
2675
+ typeof parsed?.text === "string" && parsed.text.trim().length > 0
2676
+ ? parsed.text.trim()
2677
+ : cleaned;
2678
+ if (replyText) {
2679
+ break;
2680
+ }
2681
+ }
2682
+ catch (error) {
2683
+ runtime.logger.warn({
2684
+ src: "service:message",
2685
+ stage,
2686
+ modelType,
2687
+ error: error instanceof Error ? error.message : String(error),
2688
+ }, "Structured failure reply generation failed for model");
2689
+ }
2690
+ }
2691
+ if (!replyText) {
2692
+ const failureReason = failure?.parseError ??
2693
+ failure?.issues?.[0] ??
2694
+ "the model returned output that did not match the required format";
2695
+ replyText = [
2696
+ `I hit an internal parsing error while ${stage}.`,
2697
+ `Reason: ${failureReason}.`,
2698
+ summarizeActionResultsForUser(actionResults),
2699
+ "Please try again or ask me to retry the last step.",
2700
+ ]
2701
+ .filter(Boolean)
2702
+ .join(" ");
2703
+ }
2704
+ replyText = runtime.redactSecrets(truncateToCompleteSentence(replyText.trim(), 2000));
2705
+ const responseContent = {
2706
+ thought: `Explain the structured-output failure during ${stage}.`,
2707
+ actions: ["REPLY"],
2708
+ providers: [],
2709
+ text: replyText,
2710
+ simple: true,
2711
+ responseId,
2712
+ };
2713
+ const responseMessages = [
2714
+ {
2715
+ id: responseId,
2716
+ entityId: runtime.agentId,
2717
+ agentId: runtime.agentId,
2718
+ content: responseContent,
2719
+ roomId: message.roomId,
2720
+ createdAt: Date.now(),
2721
+ },
2722
+ ];
2723
+ return {
2724
+ responseContent,
2725
+ responseMessages,
2726
+ state,
2727
+ mode: "simple",
2728
+ };
2729
+ }
2730
+ /**
2731
+ * Multi-step strategy: iterative action execution with final summary
2732
+ */
2733
+ async runMultiStepCore(runtime, message, state, callback, opts, responseId, promptAttachments, overrides) {
2734
+ const contextRoutingStateValues = {
2735
+ [AVAILABLE_CONTEXTS_STATE_KEY]: overrides?.precomposedState?.values?.[AVAILABLE_CONTEXTS_STATE_KEY],
2736
+ [CONTEXT_ROUTING_STATE_KEY]: overrides?.precomposedState?.values?.[CONTEXT_ROUTING_STATE_KEY],
2737
+ };
2738
+ const traceActionResult = [];
2739
+ let accumulatedState = state;
2740
+ let iterationCount = 0;
2741
+ while (iterationCount < opts.maxMultiStepIterations) {
2742
+ iterationCount++;
2743
+ runtime.logger.debug({
2744
+ src: "service:message",
2745
+ iteration: iterationCount,
2746
+ maxIterations: opts.maxMultiStepIterations,
2747
+ }, "Starting multi-step iteration");
2748
+ accumulatedState = withContextRoutingValues((await runtime.composeState(message, ["RECENT_MESSAGES", "ACTION_STATE", "PROVIDERS"], false, false)), contextRoutingStateValues);
2749
+ accumulatedState.data.actionResults = traceActionResult;
2750
+ // Use dynamicPromptExecFromState for structured decision output
2751
+ const parsedStep = await runtime.dynamicPromptExecFromState({
2752
+ state: accumulatedState,
2753
+ params: {
2754
+ prompt: runtime.character.templates?.multiStepDecisionTemplate ||
2755
+ multiStepDecisionTemplate,
2756
+ ...(promptAttachments ? { attachments: promptAttachments } : {}),
2757
+ },
2758
+ schema: [
2759
+ // Multi-step decision loop - internal reasoning, no streaming needed
2760
+ // WHY: This is orchestration logic, not user-facing output
2761
+ {
2762
+ field: "thought",
2763
+ description: "Your reasoning for the selected providers and/or action, and how this step contributes to resolving the user's request",
2764
+ validateField: false,
2765
+ streamField: false,
2766
+ },
2767
+ {
2768
+ field: "providers",
2769
+ description: "Comma-separated list of providers to call to gather necessary data",
2770
+ validateField: false,
2771
+ streamField: false,
2772
+ },
2773
+ {
2774
+ field: "action",
2775
+ description: "Name of the action to execute after providers return (can be empty if no action is needed)",
2776
+ validateField: false,
2777
+ streamField: false,
2778
+ },
2779
+ // WHY parameters: Actions need input data. Without this field in the schema,
2780
+ // the LLM won't be instructed to output parameters, breaking action execution.
2781
+ {
2782
+ field: "params",
2783
+ description: "Optional TOON parameters for the selected action. Use a `params` object keyed by action name when the action needs input.",
2784
+ validateField: false,
2785
+ streamField: false,
2786
+ },
2787
+ {
2788
+ field: "isFinish",
2789
+ description: "true if the task is fully resolved and no further steps are needed, false otherwise",
2790
+ validateField: false,
2791
+ streamField: false,
2792
+ },
2793
+ ],
2794
+ options: {
2795
+ modelType: ModelType.ACTION_PLANNER,
2796
+ preferredEncapsulation: "toon",
2797
+ },
2798
+ });
2799
+ if (!parsedStep) {
2800
+ runtime.logger.warn({ src: "service:message", iteration: iterationCount }, "Failed to parse multi-step result");
2801
+ traceActionResult.push({
2802
+ data: { actionName: "parse_error" },
2803
+ success: false,
2804
+ error: "Failed to parse step result",
2805
+ });
2806
+ return await this.buildStructuredFailureReply(runtime, message, withActionResults(accumulatedState, traceActionResult), responseId, "planning the next multi-step action");
2807
+ }
2808
+ const thought = typeof parsedStep.thought === "string" ? parsedStep.thought : undefined;
2809
+ // Handle providers as comma-separated string or array
2810
+ let providers = [];
2811
+ if (Array.isArray(parsedStep.providers)) {
2812
+ providers = parsedStep.providers;
2813
+ }
2814
+ else if (typeof parsedStep.providers === "string") {
2815
+ providers = parsedStep.providers
2816
+ .split(",")
2817
+ .map((p) => p.trim())
2818
+ .filter((p) => p.length > 0);
2819
+ }
2820
+ const action = typeof parsedStep.action === "string" ? parsedStep.action : undefined;
2821
+ const isFinish = parsedStep.isFinish;
2822
+ // Check for completion condition
2823
+ if (isFinish === "true" || isFinish === true) {
2824
+ runtime.logger.info({
2825
+ src: "service:message",
2826
+ agentId: runtime.agentId,
2827
+ iteration: iterationCount,
2828
+ }, "Multi-step task completed");
2829
+ if (callback) {
2830
+ await callback({
2831
+ text: "",
2832
+ thought: typeof thought === "string" ? thought : "",
2833
+ });
2834
+ }
2835
+ break;
2836
+ }
2837
+ // Validate that we have something to do
2838
+ const providersArray = Array.isArray(providers) ? providers : [];
2839
+ if ((!providersArray || providersArray.length === 0) && !action) {
2840
+ runtime.logger.warn({ src: "service:message", iteration: iterationCount }, "No providers or action specified, forcing completion");
2841
+ break;
2842
+ }
2843
+ // Total timeout for all providers running in parallel (configurable via PROVIDERS_TOTAL_TIMEOUT_MS env var)
2844
+ // Since providers run in parallel, this is the max wall-clock time allowed
2845
+ const PROVIDERS_TOTAL_TIMEOUT_MS = parseInt(String(runtime.getSetting("PROVIDERS_TOTAL_TIMEOUT_MS") || "1000"), 10);
2846
+ // Track which providers have completed (for timeout diagnostics)
2847
+ const completedProviders = new Set();
2848
+ const providerByName = new Map(runtime.providers.map((provider) => [provider.name, provider]));
2849
+ const providerPromises = [];
2850
+ for (const name of providersArray) {
2851
+ if (typeof name !== "string")
2852
+ continue;
2853
+ providerPromises.push((async (providerName) => {
2854
+ const provider = providerByName.get(providerName);
2855
+ if (!provider) {
2856
+ runtime.logger.warn({ src: "service:message", providerName }, "Provider not found");
2857
+ completedProviders.add(providerName);
2858
+ return {
2859
+ providerName,
2860
+ success: false,
2861
+ error: `Provider not found: ${providerName}`,
2862
+ };
2863
+ }
2864
+ try {
2865
+ const providerResult = await provider.get(runtime, message, state);
2866
+ completedProviders.add(providerName);
2867
+ if (!providerResult) {
2868
+ runtime.logger.warn({ src: "service:message", providerName }, "Provider returned no result");
2869
+ return {
2870
+ providerName,
2871
+ success: false,
2872
+ error: "Provider returned no result",
2873
+ };
2874
+ }
2875
+ const success = !!providerResult.text;
2876
+ return {
2877
+ providerName,
2878
+ success,
2879
+ text: success ? providerResult.text : undefined,
2880
+ error: success ? undefined : "Provider returned no result",
2881
+ };
2882
+ }
2883
+ catch (err) {
2884
+ completedProviders.add(providerName);
2885
+ const errorMsg = err instanceof Error ? err.message : String(err);
2886
+ runtime.logger.error({ src: "service:message", providerName, error: errorMsg }, "Provider execution failed");
2887
+ return { providerName, success: false, error: errorMsg };
2888
+ }
2889
+ })(name));
2890
+ }
2891
+ // Create timeout promise for provider execution (with cleanup)
2892
+ let timeoutId;
2893
+ const timeoutPromise = new Promise((resolve) => {
2894
+ timeoutId = setTimeout(() => resolve("timeout"), PROVIDERS_TOTAL_TIMEOUT_MS);
2895
+ });
2896
+ // Race between all providers completing and timeout
2897
+ const allProvidersPromise = Promise.allSettled(providerPromises);
2898
+ const raceResult = await Promise.race([
2899
+ allProvidersPromise,
2900
+ timeoutPromise,
2901
+ ]);
2902
+ // Clear timeout if providers completed first
2903
+ if (timeoutId !== undefined) {
2904
+ clearTimeout(timeoutId);
2905
+ }
2906
+ // Check if providers took too long - abort pipeline and notify user
2907
+ if (raceResult === "timeout") {
2908
+ // Identify which providers were still pending when timeout hit
2909
+ const allProviderNames = providersArray.filter((name) => typeof name === "string");
2910
+ const pendingProviders = allProviderNames.filter((name) => !completedProviders.has(name));
2911
+ runtime.logger.error({
2912
+ src: "service:message",
2913
+ timeoutMs: PROVIDERS_TOTAL_TIMEOUT_MS,
2914
+ pendingProviders,
2915
+ completedProviders: Array.from(completedProviders),
2916
+ }, `Providers took too long (>${PROVIDERS_TOTAL_TIMEOUT_MS}ms) - slow providers: ${pendingProviders.join(", ")}`);
2917
+ if (callback) {
2918
+ await callback({
2919
+ text: "Providers took too long to respond. Please optimize your providers or use caching.",
2920
+ actions: [],
2921
+ thought: "Provider timeout - pipeline aborted",
2922
+ });
2923
+ }
2924
+ return {
2925
+ responseContent: null,
2926
+ responseMessages: [],
2927
+ state,
2928
+ mode: "none",
2929
+ };
2930
+ }
2931
+ // Providers completed in time
2932
+ const providerResults = raceResult;
2933
+ // Process results and notify via callback
2934
+ for (const result of providerResults) {
2935
+ if (result.status === "fulfilled") {
2936
+ const { providerName, success, text, error } = result.value;
2937
+ traceActionResult.push({
2938
+ data: { actionName: providerName },
2939
+ success,
2940
+ text,
2941
+ error,
2942
+ });
2943
+ if (callback) {
2944
+ await callback({
2945
+ text: `🔎 Provider executed: ${providerName}`,
2946
+ actions: [providerName],
2947
+ thought: typeof thought === "string" ? thought : "",
2948
+ });
2949
+ }
2950
+ }
2951
+ else {
2952
+ runtime.logger.error({
2953
+ src: "service:message",
2954
+ error: result.reason || "Unknown provider failure",
2955
+ }, "Unexpected provider promise rejection");
2956
+ }
2957
+ }
2958
+ if (action) {
2959
+ const actionContent = {
2960
+ text: `🔎 Executing action: ${action}`,
2961
+ actions: [action],
2962
+ thought: thought || "",
2963
+ };
2964
+ if (parsedStep && typeof parsedStep.params === "string") {
2965
+ actionContent.params = parsedStep.params;
2966
+ }
2967
+ await runtime.processActions(message, [
2968
+ {
2969
+ id: v4(),
2970
+ entityId: runtime.agentId,
2971
+ roomId: message.roomId,
2972
+ createdAt: Date.now(),
2973
+ content: actionContent,
2974
+ },
2975
+ ], state, async () => {
2976
+ return [];
2977
+ });
2978
+ // Get cached action results from runtime
2979
+ const cachedState = runtime.stateCache.get(`${message.id}_action_results`);
2980
+ const cachedStateValues = cachedState?.values;
2981
+ const rawActionResults = cachedStateValues?.actionResults;
2982
+ const actionResults = Array.isArray(rawActionResults)
2983
+ ? rawActionResults
2984
+ : [];
2985
+ const result = actionResults.length > 0 ? actionResults[0] : null;
2986
+ const success = result?.success ?? false;
2987
+ traceActionResult.push({
2988
+ data: { actionName: typeof action === "string" ? action : "unknown" },
2989
+ success,
2990
+ text: result && "text" in result && typeof result.text === "string"
2991
+ ? result.text
2992
+ : undefined,
2993
+ values: result &&
2994
+ "values" in result &&
2995
+ typeof result.values === "object" &&
2996
+ result.values !== null
2997
+ ? result.values
2998
+ : undefined,
2999
+ error: success
3000
+ ? undefined
3001
+ : result && "text" in result && typeof result.text === "string"
3002
+ ? result.text
3003
+ : undefined,
3004
+ });
3005
+ }
3006
+ }
3007
+ if (iterationCount >= opts.maxMultiStepIterations) {
3008
+ runtime.logger.warn({ src: "service:message", maxIterations: opts.maxMultiStepIterations }, "Reached maximum iterations, forcing completion");
3009
+ }
3010
+ accumulatedState = withContextRoutingValues((await runtime.composeState(message, ["RECENT_MESSAGES", "ACTION_STATE"], false, false)), contextRoutingStateValues);
3011
+ // Use dynamicPromptExecFromState for final summary generation
3012
+ // Stream the final summary for better UX
3013
+ const summary = await runtime.dynamicPromptExecFromState({
3014
+ state: accumulatedState,
3015
+ params: {
3016
+ prompt: runtime.character.templates?.multiStepSummaryTemplate ||
3017
+ multiStepSummaryTemplate,
3018
+ ...(promptAttachments ? { attachments: promptAttachments } : {}),
3019
+ },
3020
+ schema: [
3021
+ {
3022
+ field: "thought",
3023
+ description: "Your internal reasoning about the summary",
3024
+ validateField: false,
3025
+ streamField: false,
3026
+ },
3027
+ // WHY streamField: true? This is the final user-facing output
3028
+ {
3029
+ field: "text",
3030
+ description: "The final summary message to send to the user",
3031
+ required: true,
3032
+ streamField: true,
3033
+ },
3034
+ ],
3035
+ options: {
3036
+ modelSize: "large",
3037
+ preferredEncapsulation: opts.onStreamChunk ? "xml" : "toon",
3038
+ requiredFields: ["text"],
3039
+ // Stream the final summary to the user
3040
+ onStreamChunk: opts.onStreamChunk,
3041
+ },
3042
+ });
3043
+ let responseContent = null;
3044
+ const summaryText = summary?.text;
3045
+ if (typeof summaryText === "string" && summaryText) {
3046
+ responseContent = {
3047
+ actions: ["MULTI_STEP_SUMMARY"],
3048
+ text: summaryText,
3049
+ thought: (typeof summary?.thought === "string"
3050
+ ? summary.thought
3051
+ : "Final user-facing message after task completion.") ||
3052
+ "Final user-facing message after task completion.",
3053
+ simple: true,
3054
+ responseId,
3055
+ };
3056
+ }
3057
+ else {
3058
+ return await this.buildStructuredFailureReply(runtime, message, withActionResults(accumulatedState, traceActionResult), responseId, "writing the final summary");
3059
+ }
3060
+ const responseMessages = responseContent
3061
+ ? [
3062
+ {
3063
+ id: responseId,
3064
+ entityId: runtime.agentId,
3065
+ agentId: runtime.agentId,
3066
+ content: responseContent,
3067
+ roomId: message.roomId,
3068
+ createdAt: Date.now(),
3069
+ },
3070
+ ]
3071
+ : [];
3072
+ return {
3073
+ responseContent,
3074
+ responseMessages,
3075
+ state: accumulatedState,
3076
+ mode: responseContent ? "simple" : "none",
3077
+ };
3078
+ }
3079
+ /**
3080
+ * Helper to emit run ended events
3081
+ */
3082
+ async emitRunEnded(runtime, runId, message, startTime, status) {
3083
+ await runtime.emitEvent(EventType.RUN_ENDED, {
3084
+ runtime,
3085
+ source: "messageHandler",
3086
+ runId,
3087
+ messageId: message.id,
3088
+ roomId: message.roomId,
3089
+ entityId: message.entityId,
3090
+ startTime,
3091
+ status: status,
3092
+ endTime: Date.now(),
3093
+ duration: Date.now() - startTime,
3094
+ });
3095
+ }
3096
+ async emitMessageSent(runtime, message, source) {
3097
+ await runtime.emitEvent(EventType.MESSAGE_SENT, {
3098
+ runtime,
3099
+ message,
3100
+ source,
3101
+ });
3102
+ }
3103
+ /**
3104
+ * Deletes a message from the agent's memory.
3105
+ * This method handles the actual deletion logic that was previously in event handlers.
3106
+ *
3107
+ * @param runtime - The agent runtime instance
3108
+ * @param message - The message memory to delete
3109
+ * @returns Promise resolving when deletion is complete
3110
+ */
3111
+ async deleteMessage(runtime, message) {
3112
+ if (!message.id) {
3113
+ runtime.logger.error({ src: "service:message", agentId: runtime.agentId }, "Cannot delete memory: message ID is missing");
3114
+ return;
3115
+ }
3116
+ runtime.logger.info({
3117
+ src: "service:message",
3118
+ agentId: runtime.agentId,
3119
+ messageId: message.id,
3120
+ roomId: message.roomId,
3121
+ }, "Deleting memory");
3122
+ await runtime.deleteMemory(message.id);
3123
+ runtime.logger.debug({ src: "service:message", messageId: message.id }, "Successfully deleted memory");
3124
+ }
3125
+ /**
3126
+ * Clears all messages from a channel/room.
3127
+ * This method handles bulk deletion of all message memories in a room.
3128
+ *
3129
+ * @param runtime - The agent runtime instance
3130
+ * @param roomId - The room ID to clear messages from
3131
+ * @param channelId - The original channel ID (for logging)
3132
+ * @returns Promise resolving when channel is cleared
3133
+ */
3134
+ async clearChannel(runtime, roomId, channelId) {
3135
+ runtime.logger.info({ src: "service:message", agentId: runtime.agentId, channelId, roomId }, "Clearing message memories from channel");
3136
+ // Get all message memories for this room
3137
+ const memories = await runtime.getMemoriesByRoomIds({
3138
+ tableName: "messages",
3139
+ roomIds: [roomId],
3140
+ });
3141
+ runtime.logger.debug({ src: "service:message", channelId, count: memories.length }, "Found message memories to delete");
3142
+ // Delete each message memory
3143
+ let deletedCount = 0;
3144
+ for (const memory of memories) {
3145
+ if (memory.id) {
3146
+ try {
3147
+ await runtime.deleteMemory(memory.id);
3148
+ deletedCount++;
3149
+ }
3150
+ catch (error) {
3151
+ runtime.logger.warn({ src: "service:message", error, memoryId: memory.id }, "Failed to delete message memory");
3152
+ }
3153
+ }
3154
+ }
3155
+ runtime.logger.info({
3156
+ src: "service:message",
3157
+ agentId: runtime.agentId,
3158
+ channelId,
3159
+ deletedCount,
3160
+ totalCount: memories.length,
3161
+ }, "Cleared message memories from channel");
3162
+ }
3163
+ }