@elizaos/agent 2.0.0-alpha.144 → 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 (598) hide show
  1. package/apps/app-lifeops/src/actions/inbox-digest.d.ts +2 -0
  2. package/apps/app-lifeops/src/actions/inbox-digest.d.ts.map +1 -0
  3. package/apps/app-lifeops/src/actions/inbox-digest.js +1 -0
  4. package/apps/app-lifeops/src/actions/inbox-respond.d.ts +2 -0
  5. package/apps/app-lifeops/src/actions/inbox-respond.d.ts.map +1 -0
  6. package/apps/app-lifeops/src/actions/inbox-respond.js +1 -0
  7. package/apps/app-lifeops/src/actions/inbox-triage.d.ts +2 -0
  8. package/apps/app-lifeops/src/actions/inbox-triage.d.ts.map +1 -0
  9. package/apps/app-lifeops/src/actions/inbox-triage.js +1 -0
  10. package/apps/app-lifeops/src/actions/inbox.d.ts +3 -0
  11. package/apps/app-lifeops/src/actions/inbox.d.ts.map +1 -0
  12. package/apps/app-lifeops/src/actions/inbox.js +856 -0
  13. package/apps/app-lifeops/src/actions/update-owner-profile.d.ts +3 -0
  14. package/apps/app-lifeops/src/actions/update-owner-profile.d.ts.map +1 -0
  15. package/apps/app-lifeops/src/actions/update-owner-profile.js +131 -0
  16. package/apps/app-lifeops/src/inbox/channel-deep-links.d.ts.map +1 -0
  17. package/apps/app-lifeops/src/inbox/config.d.ts.map +1 -0
  18. package/{packages/agent → apps/app-lifeops}/src/inbox/config.js +1 -1
  19. package/apps/app-lifeops/src/inbox/message-fetcher.d.ts.map +1 -0
  20. package/apps/app-lifeops/src/inbox/reflection.d.ts.map +1 -0
  21. package/apps/app-lifeops/src/inbox/repository.d.ts.map +1 -0
  22. package/apps/app-lifeops/src/inbox/triage-classifier.d.ts.map +1 -0
  23. package/apps/app-lifeops/src/inbox/types.d.ts.map +1 -0
  24. package/apps/app-lifeops/src/lifeops/index.d.ts +25 -0
  25. package/apps/app-lifeops/src/lifeops/index.d.ts.map +1 -0
  26. package/apps/app-lifeops/src/lifeops/index.js +24 -0
  27. package/apps/app-lifeops/src/lifeops/screen-context.d.ts +52 -0
  28. package/apps/app-lifeops/src/lifeops/screen-context.d.ts.map +1 -0
  29. package/apps/app-lifeops/src/lifeops/screen-context.js +332 -0
  30. package/apps/app-lifeops/src/plugin.d.ts +3 -0
  31. package/apps/app-lifeops/src/plugin.d.ts.map +1 -1
  32. package/apps/app-lifeops/src/plugin.js +16 -3
  33. package/apps/app-lifeops/src/providers/inbox-triage.d.ts +3 -0
  34. package/apps/app-lifeops/src/providers/inbox-triage.d.ts.map +1 -0
  35. package/apps/app-lifeops/src/providers/inbox-triage.js +89 -0
  36. package/package.json +6 -4
  37. package/packages/agent/src/actions/calendar.d.ts +1 -18
  38. package/packages/agent/src/actions/calendar.d.ts.map +1 -1
  39. package/packages/agent/src/actions/calendar.js +1 -3143
  40. package/packages/agent/src/actions/check-balance.d.ts +17 -0
  41. package/packages/agent/src/actions/check-balance.d.ts.map +1 -0
  42. package/packages/agent/src/actions/check-balance.js +167 -0
  43. package/packages/agent/src/actions/connector-resolver.d.ts +75 -0
  44. package/packages/agent/src/actions/connector-resolver.d.ts.map +1 -0
  45. package/packages/agent/src/actions/connector-resolver.js +245 -0
  46. package/packages/agent/src/actions/context-signal-lexicon.d.ts +1 -1
  47. package/packages/agent/src/actions/context-signal-lexicon.d.ts.map +1 -1
  48. package/packages/agent/src/actions/context-signal-lexicon.js +6 -0
  49. package/packages/agent/src/actions/eject-plugin.d.ts +3 -0
  50. package/packages/agent/src/actions/eject-plugin.d.ts.map +1 -0
  51. package/packages/agent/src/actions/eject-plugin.js +48 -0
  52. package/packages/agent/src/actions/execute-trade.d.ts +17 -0
  53. package/packages/agent/src/actions/execute-trade.d.ts.map +1 -0
  54. package/packages/agent/src/actions/execute-trade.js +299 -0
  55. package/packages/agent/src/actions/get-self-status.d.ts +13 -0
  56. package/packages/agent/src/actions/get-self-status.d.ts.map +1 -0
  57. package/packages/agent/src/actions/get-self-status.js +66 -0
  58. package/packages/agent/src/actions/gmail.d.ts +1 -32
  59. package/packages/agent/src/actions/gmail.d.ts.map +1 -1
  60. package/packages/agent/src/actions/gmail.js +1 -1734
  61. package/packages/agent/src/actions/inbox-digest.d.ts +1 -1
  62. package/packages/agent/src/actions/inbox-digest.d.ts.map +1 -1
  63. package/packages/agent/src/actions/inbox-digest.js +1 -1
  64. package/packages/agent/src/actions/inbox-respond.d.ts +1 -1
  65. package/packages/agent/src/actions/inbox-respond.d.ts.map +1 -1
  66. package/packages/agent/src/actions/inbox-respond.js +1 -1
  67. package/packages/agent/src/actions/inbox-triage.d.ts +1 -1
  68. package/packages/agent/src/actions/inbox-triage.d.ts.map +1 -1
  69. package/packages/agent/src/actions/inbox-triage.js +1 -1
  70. package/packages/agent/src/actions/inbox.d.ts +1 -2
  71. package/packages/agent/src/actions/inbox.d.ts.map +1 -1
  72. package/packages/agent/src/actions/inbox.js +1 -856
  73. package/packages/agent/src/actions/index.d.ts +13 -0
  74. package/packages/agent/src/actions/index.d.ts.map +1 -1
  75. package/packages/agent/src/actions/index.js +13 -0
  76. package/packages/agent/src/actions/install-plugin.d.ts +3 -0
  77. package/packages/agent/src/actions/install-plugin.d.ts.map +1 -0
  78. package/packages/agent/src/actions/install-plugin.js +65 -0
  79. package/packages/agent/src/actions/life-goal-extractor.d.ts +1 -68
  80. package/packages/agent/src/actions/life-goal-extractor.d.ts.map +1 -1
  81. package/packages/agent/src/actions/life-goal-extractor.js +1 -354
  82. package/packages/agent/src/actions/life-param-extractor.d.ts +1 -77
  83. package/packages/agent/src/actions/life-param-extractor.d.ts.map +1 -1
  84. package/packages/agent/src/actions/life-param-extractor.js +1 -423
  85. package/packages/agent/src/actions/life-recent-context.d.ts +1 -8
  86. package/packages/agent/src/actions/life-recent-context.d.ts.map +1 -1
  87. package/packages/agent/src/actions/life-recent-context.js +1 -84
  88. package/packages/agent/src/actions/life-update-extractor.d.ts +1 -26
  89. package/packages/agent/src/actions/life-update-extractor.d.ts.map +1 -1
  90. package/packages/agent/src/actions/life-update-extractor.js +1 -195
  91. package/packages/agent/src/actions/life.d.ts +1 -8
  92. package/packages/agent/src/actions/life.d.ts.map +1 -1
  93. package/packages/agent/src/actions/life.extractor.d.ts +1 -17
  94. package/packages/agent/src/actions/life.extractor.d.ts.map +1 -1
  95. package/packages/agent/src/actions/life.extractor.js +1 -264
  96. package/packages/agent/src/actions/life.js +1 -3379
  97. package/packages/agent/src/actions/lifeops-extraction-config.d.ts +1 -15
  98. package/packages/agent/src/actions/lifeops-extraction-config.d.ts.map +1 -1
  99. package/packages/agent/src/actions/lifeops-extraction-config.js +1 -25
  100. package/packages/agent/src/actions/lifeops-google-helpers.d.ts +1 -61
  101. package/packages/agent/src/actions/lifeops-google-helpers.d.ts.map +1 -1
  102. package/packages/agent/src/actions/lifeops-google-helpers.js +1 -607
  103. package/packages/agent/src/actions/list-ejected.d.ts +3 -0
  104. package/packages/agent/src/actions/list-ejected.d.ts.map +1 -0
  105. package/packages/agent/src/actions/list-ejected.js +35 -0
  106. package/packages/agent/src/actions/log-level.d.ts +3 -0
  107. package/packages/agent/src/actions/log-level.d.ts.map +1 -0
  108. package/packages/agent/src/actions/log-level.js +125 -0
  109. package/packages/agent/src/actions/manage-tasks.d.ts.map +1 -1
  110. package/packages/agent/src/actions/manage-tasks.js +51 -15
  111. package/packages/agent/src/actions/media.d.ts +21 -0
  112. package/packages/agent/src/actions/media.d.ts.map +1 -0
  113. package/packages/agent/src/actions/media.js +384 -0
  114. package/packages/agent/src/actions/read-messages.d.ts +14 -0
  115. package/packages/agent/src/actions/read-messages.d.ts.map +1 -0
  116. package/packages/agent/src/actions/read-messages.js +228 -0
  117. package/packages/agent/src/actions/reinject-plugin.d.ts +3 -0
  118. package/packages/agent/src/actions/reinject-plugin.d.ts.map +1 -0
  119. package/packages/agent/src/actions/reinject-plugin.js +47 -0
  120. package/packages/agent/src/actions/send-message.d.ts +0 -7
  121. package/packages/agent/src/actions/send-message.d.ts.map +1 -1
  122. package/packages/agent/src/actions/send-message.js +170 -49
  123. package/packages/agent/src/actions/sync-plugin.d.ts +3 -0
  124. package/packages/agent/src/actions/sync-plugin.d.ts.map +1 -0
  125. package/packages/agent/src/actions/sync-plugin.js +47 -0
  126. package/packages/agent/src/actions/timezone-normalization.d.ts +1 -2
  127. package/packages/agent/src/actions/timezone-normalization.d.ts.map +1 -1
  128. package/packages/agent/src/actions/timezone-normalization.js +1 -107
  129. package/packages/agent/src/actions/transfer-token.d.ts +17 -0
  130. package/packages/agent/src/actions/transfer-token.d.ts.map +1 -0
  131. package/packages/agent/src/actions/transfer-token.js +470 -0
  132. package/packages/agent/src/actions/update-owner-profile.d.ts +1 -2
  133. package/packages/agent/src/actions/update-owner-profile.d.ts.map +1 -1
  134. package/packages/agent/src/actions/update-owner-profile.js +1 -131
  135. package/packages/agent/src/actions/wallet-action-shared.d.ts +15 -0
  136. package/packages/agent/src/actions/wallet-action-shared.d.ts.map +1 -0
  137. package/packages/agent/src/actions/wallet-action-shared.js +24 -0
  138. package/packages/agent/src/api/agent-admin-routes.d.ts.map +1 -1
  139. package/packages/agent/src/api/agent-admin-routes.js +1 -1
  140. package/packages/agent/src/api/binance-skill-helpers.d.ts.map +1 -1
  141. package/packages/agent/src/api/binance-skill-helpers.js +8 -3
  142. package/packages/agent/src/api/chat-routes.d.ts.map +1 -1
  143. package/packages/agent/src/api/chat-routes.js +20 -5
  144. package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts +1 -22
  145. package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts.map +1 -1
  146. package/packages/agent/src/api/coding-agents-auth-sanitize.js +1 -39
  147. package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts +1 -28
  148. package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts.map +1 -1
  149. package/packages/agent/src/api/coding-agents-preflight-normalize.js +1 -45
  150. package/packages/agent/src/api/coordinator-types.d.ts +1 -46
  151. package/packages/agent/src/api/coordinator-types.d.ts.map +1 -1
  152. package/packages/agent/src/api/coordinator-types.js +1 -1
  153. package/packages/agent/src/api/coordinator-wiring.d.ts +1 -45
  154. package/packages/agent/src/api/coordinator-wiring.d.ts.map +1 -1
  155. package/packages/agent/src/api/coordinator-wiring.js +1 -108
  156. package/packages/agent/src/api/index.d.ts +1 -1
  157. package/packages/agent/src/api/index.d.ts.map +1 -1
  158. package/packages/agent/src/api/index.js +1 -1
  159. package/packages/agent/src/api/lifeops-browser-packaging.d.ts +1 -15
  160. package/packages/agent/src/api/lifeops-browser-packaging.d.ts.map +1 -1
  161. package/packages/agent/src/api/lifeops-browser-packaging.js +1 -305
  162. package/packages/agent/src/api/lifeops-routes.d.ts +1 -19
  163. package/packages/agent/src/api/lifeops-routes.d.ts.map +1 -1
  164. package/packages/agent/src/api/lifeops-routes.js +1 -1173
  165. package/packages/agent/src/api/server.d.ts.map +1 -1
  166. package/packages/agent/src/api/server.js +6 -6
  167. package/packages/agent/src/api/task-agent-message-routing.d.ts +1 -9
  168. package/packages/agent/src/api/task-agent-message-routing.d.ts.map +1 -1
  169. package/packages/agent/src/api/task-agent-message-routing.js +1 -62
  170. package/packages/agent/src/api/website-blocker-routes.d.ts +1 -6
  171. package/packages/agent/src/api/website-blocker-routes.d.ts.map +1 -1
  172. package/packages/agent/src/api/website-blocker-routes.js +1 -174
  173. package/packages/agent/src/config/types.agent-defaults.d.ts +1 -1
  174. package/packages/agent/src/config/types.agent-defaults.d.ts.map +1 -1
  175. package/packages/agent/src/evals/coordinator-eval-client.d.ts +1 -38
  176. package/packages/agent/src/evals/coordinator-eval-client.d.ts.map +1 -1
  177. package/packages/agent/src/evals/coordinator-eval-client.js +1 -138
  178. package/packages/agent/src/evals/coordinator-live-runner.d.ts +1 -56
  179. package/packages/agent/src/evals/coordinator-live-runner.d.ts.map +1 -1
  180. package/packages/agent/src/evals/coordinator-live-runner.js +1 -546
  181. package/packages/agent/src/evals/coordinator-preflight.d.ts +1 -31
  182. package/packages/agent/src/evals/coordinator-preflight.d.ts.map +1 -1
  183. package/packages/agent/src/evals/coordinator-preflight.js +1 -296
  184. package/packages/agent/src/evals/coordinator-scenarios.d.ts +1 -23
  185. package/packages/agent/src/evals/coordinator-scenarios.d.ts.map +1 -1
  186. package/packages/agent/src/evals/coordinator-scenarios.js +1 -1141
  187. package/packages/agent/src/lifeops/app-state.d.ts +1 -10
  188. package/packages/agent/src/lifeops/app-state.d.ts.map +1 -1
  189. package/packages/agent/src/lifeops/app-state.js +1 -32
  190. package/packages/agent/src/lifeops/apple-reminders.d.ts +1 -57
  191. package/packages/agent/src/lifeops/apple-reminders.d.ts.map +1 -1
  192. package/packages/agent/src/lifeops/apple-reminders.js +1 -325
  193. package/packages/agent/src/lifeops/defaults.d.ts +1 -23
  194. package/packages/agent/src/lifeops/defaults.d.ts.map +1 -1
  195. package/packages/agent/src/lifeops/defaults.js +1 -205
  196. package/packages/agent/src/lifeops/engine.d.ts +1 -7
  197. package/packages/agent/src/lifeops/engine.d.ts.map +1 -1
  198. package/packages/agent/src/lifeops/engine.js +1 -389
  199. package/packages/agent/src/lifeops/goal-grounding.d.ts +1 -53
  200. package/packages/agent/src/lifeops/goal-grounding.d.ts.map +1 -1
  201. package/packages/agent/src/lifeops/goal-grounding.js +1 -147
  202. package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts +1 -11
  203. package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts.map +1 -1
  204. package/packages/agent/src/lifeops/goal-semantic-evaluator.js +1 -154
  205. package/packages/agent/src/lifeops/google-api-error.d.ts +1 -6
  206. package/packages/agent/src/lifeops/google-api-error.d.ts.map +1 -1
  207. package/packages/agent/src/lifeops/google-api-error.js +1 -35
  208. package/packages/agent/src/lifeops/google-calendar.d.ts +1 -52
  209. package/packages/agent/src/lifeops/google-calendar.d.ts.map +1 -1
  210. package/packages/agent/src/lifeops/google-calendar.js +1 -268
  211. package/packages/agent/src/lifeops/google-connector-gateway.d.ts +1 -18
  212. package/packages/agent/src/lifeops/google-connector-gateway.d.ts.map +1 -1
  213. package/packages/agent/src/lifeops/google-connector-gateway.js +1 -65
  214. package/packages/agent/src/lifeops/google-fetch.d.ts +1 -10
  215. package/packages/agent/src/lifeops/google-fetch.d.ts.map +1 -1
  216. package/packages/agent/src/lifeops/google-fetch.js +1 -85
  217. package/packages/agent/src/lifeops/google-gmail.d.ts +1 -53
  218. package/packages/agent/src/lifeops/google-gmail.d.ts.map +1 -1
  219. package/packages/agent/src/lifeops/google-gmail.js +1 -471
  220. package/packages/agent/src/lifeops/google-managed-client.d.ts +1 -126
  221. package/packages/agent/src/lifeops/google-managed-client.d.ts.map +1 -1
  222. package/packages/agent/src/lifeops/google-managed-client.js +1 -294
  223. package/packages/agent/src/lifeops/google-oauth.d.ts +1 -60
  224. package/packages/agent/src/lifeops/google-oauth.d.ts.map +1 -1
  225. package/packages/agent/src/lifeops/google-oauth.js +1 -494
  226. package/packages/agent/src/lifeops/google-scopes.d.ts +1 -12
  227. package/packages/agent/src/lifeops/google-scopes.d.ts.map +1 -1
  228. package/packages/agent/src/lifeops/google-scopes.js +1 -96
  229. package/packages/agent/src/lifeops/index.d.ts +1 -2
  230. package/packages/agent/src/lifeops/index.d.ts.map +1 -1
  231. package/packages/agent/src/lifeops/index.js +1 -2
  232. package/packages/agent/src/lifeops/owner-profile.d.ts +1 -14
  233. package/packages/agent/src/lifeops/owner-profile.d.ts.map +1 -1
  234. package/packages/agent/src/lifeops/owner-profile.js +1 -194
  235. package/packages/agent/src/lifeops/repository.d.ts +1 -208
  236. package/packages/agent/src/lifeops/repository.d.ts.map +1 -1
  237. package/packages/agent/src/lifeops/repository.js +1 -3187
  238. package/packages/agent/src/lifeops/runtime.d.ts +1 -13
  239. package/packages/agent/src/lifeops/runtime.d.ts.map +1 -1
  240. package/packages/agent/src/lifeops/runtime.js +1 -120
  241. package/packages/agent/src/lifeops/screen-context.d.ts +1 -51
  242. package/packages/agent/src/lifeops/screen-context.d.ts.map +1 -1
  243. package/packages/agent/src/lifeops/screen-context.js +1 -332
  244. package/packages/agent/src/lifeops/seed-routines.d.ts +1 -19
  245. package/packages/agent/src/lifeops/seed-routines.d.ts.map +1 -1
  246. package/packages/agent/src/lifeops/seed-routines.js +1 -111
  247. package/packages/agent/src/lifeops/service.d.ts +1 -274
  248. package/packages/agent/src/lifeops/service.d.ts.map +1 -1
  249. package/packages/agent/src/lifeops/service.js +1 -9260
  250. package/packages/agent/src/lifeops/sql.d.ts +1 -30
  251. package/packages/agent/src/lifeops/sql.d.ts.map +1 -1
  252. package/packages/agent/src/lifeops/sql.js +1 -247
  253. package/packages/agent/src/lifeops/time.d.ts +1 -16
  254. package/packages/agent/src/lifeops/time.d.ts.map +1 -1
  255. package/packages/agent/src/lifeops/time.js +1 -132
  256. package/packages/agent/src/lifeops/twilio.d.ts +1 -24
  257. package/packages/agent/src/lifeops/twilio.d.ts.map +1 -1
  258. package/packages/agent/src/lifeops/twilio.js +1 -157
  259. package/packages/agent/src/lifeops/x-poster.d.ts +1 -18
  260. package/packages/agent/src/lifeops/x-poster.d.ts.map +1 -1
  261. package/packages/agent/src/lifeops/x-poster.js +1 -148
  262. package/packages/agent/src/providers/inbox-triage.d.ts +1 -2
  263. package/packages/agent/src/providers/inbox-triage.d.ts.map +1 -1
  264. package/packages/agent/src/providers/inbox-triage.js +1 -89
  265. package/packages/agent/src/providers/index.d.ts +4 -1
  266. package/packages/agent/src/providers/index.d.ts.map +1 -1
  267. package/packages/agent/src/providers/index.js +4 -1
  268. package/packages/agent/src/providers/lifeops.d.ts +1 -2
  269. package/packages/agent/src/providers/lifeops.d.ts.map +1 -1
  270. package/packages/agent/src/providers/lifeops.js +1 -157
  271. package/packages/agent/src/providers/local-models.d.ts +118 -0
  272. package/packages/agent/src/providers/local-models.d.ts.map +1 -0
  273. package/packages/agent/src/providers/local-models.js +427 -0
  274. package/packages/agent/src/providers/media-provider.d.ts +192 -0
  275. package/packages/agent/src/providers/media-provider.d.ts.map +1 -0
  276. package/packages/agent/src/providers/media-provider.js +1088 -0
  277. package/packages/agent/src/providers/self-status.d.ts +4 -0
  278. package/packages/agent/src/providers/self-status.d.ts.map +1 -0
  279. package/packages/agent/src/providers/self-status.js +12 -0
  280. package/packages/agent/src/providers/tasks.d.ts.map +1 -1
  281. package/packages/agent/src/providers/tasks.js +7 -7
  282. package/packages/agent/src/runtime/core-plugins.js +1 -1
  283. package/packages/agent/src/runtime/eliza-plugin.d.ts.map +1 -1
  284. package/packages/agent/src/runtime/eliza-plugin.js +1 -7
  285. package/packages/agent/src/runtime/eliza.js +2 -2
  286. package/packages/agent/src/runtime/plugin-collector.js +3 -3
  287. package/packages/agent/src/runtime/plugin-lifecycle.d.ts.map +1 -1
  288. package/packages/agent/src/runtime/plugin-lifecycle.js +3 -13
  289. package/packages/agent/src/runtime/trajectory-internals.d.ts.map +1 -1
  290. package/packages/agent/src/runtime/trajectory-internals.js +1 -3
  291. package/packages/agent/src/services/built-in-app-routes/hyperscape.d.ts.map +1 -1
  292. package/packages/agent/src/services/coding-task-executor.d.ts +3 -3
  293. package/packages/agent/src/services/coding-task-executor.js +3 -3
  294. package/packages/shared/src/awareness/index.d.ts +2 -0
  295. package/packages/shared/src/awareness/index.d.ts.map +1 -0
  296. package/packages/shared/src/awareness/index.js +1 -0
  297. package/packages/shared/src/awareness/registry.d.ts +27 -0
  298. package/packages/shared/src/awareness/registry.d.ts.map +1 -0
  299. package/packages/shared/src/awareness/registry.js +161 -0
  300. package/packages/shared/src/i18n/generated/validation-keyword-data.d.ts +24 -0
  301. package/packages/shared/src/i18n/generated/validation-keyword-data.d.ts.map +1 -1
  302. package/packages/shared/src/i18n/generated/validation-keyword-data.js +24 -0
  303. package/packages/shared/src/runtime-env.d.ts.map +1 -1
  304. package/packages/shared/src/runtime-env.js +5 -1
  305. package/packages/typescript/src/generated/action-docs.d.ts +135 -0
  306. package/packages/typescript/src/generated/action-docs.d.ts.map +1 -1
  307. package/packages/typescript/src/generated/action-docs.js +237 -0
  308. package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts +24 -0
  309. package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts.map +1 -1
  310. package/packages/typescript/src/i18n/generated/validation-keyword-data.js +24 -0
  311. package/packages/typescript/src/index.node.d.ts +2 -2
  312. package/packages/typescript/src/index.node.d.ts.map +1 -1
  313. package/packages/typescript/src/index.node.js +4 -3
  314. package/packages/typescript/src/plugin-lifecycle.d.ts.map +1 -1
  315. package/packages/typescript/src/plugin-lifecycle.js +42 -3
  316. package/packages/typescript/src/services/message.d.ts.map +1 -1
  317. package/packages/typescript/src/services/message.js +32 -0
  318. package/apps/app-training/src/core/cli.d.ts +0 -11
  319. package/apps/app-training/src/core/cli.d.ts.map +0 -1
  320. package/apps/app-training/src/core/cli.js +0 -302
  321. package/apps/app-training/src/core/context-audit.d.ts +0 -51
  322. package/apps/app-training/src/core/context-audit.d.ts.map +0 -1
  323. package/apps/app-training/src/core/context-audit.js +0 -141
  324. package/apps/app-training/src/core/context-catalog.d.ts +0 -47
  325. package/apps/app-training/src/core/context-catalog.d.ts.map +0 -1
  326. package/apps/app-training/src/core/context-catalog.js +0 -259
  327. package/apps/app-training/src/core/context-types.d.ts +0 -3
  328. package/apps/app-training/src/core/context-types.d.ts.map +0 -1
  329. package/apps/app-training/src/core/context-types.js +0 -11
  330. package/apps/app-training/src/core/dataset-generator.d.ts +0 -135
  331. package/apps/app-training/src/core/dataset-generator.d.ts.map +0 -1
  332. package/apps/app-training/src/core/dataset-generator.js +0 -703
  333. package/apps/app-training/src/core/replay-validator.d.ts +0 -96
  334. package/apps/app-training/src/core/replay-validator.d.ts.map +0 -1
  335. package/apps/app-training/src/core/replay-validator.js +0 -265
  336. package/apps/app-training/src/core/roleplay-executor.d.ts +0 -123
  337. package/apps/app-training/src/core/roleplay-executor.d.ts.map +0 -1
  338. package/apps/app-training/src/core/roleplay-executor.js +0 -645
  339. package/apps/app-training/src/core/roleplay-trajectories.d.ts +0 -54
  340. package/apps/app-training/src/core/roleplay-trajectories.d.ts.map +0 -1
  341. package/apps/app-training/src/core/roleplay-trajectories.js +0 -73
  342. package/apps/app-training/src/core/scenario-blueprints.d.ts +0 -62
  343. package/apps/app-training/src/core/scenario-blueprints.d.ts.map +0 -1
  344. package/apps/app-training/src/core/scenario-blueprints.js +0 -790
  345. package/apps/app-training/src/core/trajectory-task-datasets.d.ts +0 -38
  346. package/apps/app-training/src/core/trajectory-task-datasets.d.ts.map +0 -1
  347. package/apps/app-training/src/core/trajectory-task-datasets.js +0 -281
  348. package/apps/app-training/src/core/vertex-tuning.d.ts +0 -139
  349. package/apps/app-training/src/core/vertex-tuning.d.ts.map +0 -1
  350. package/apps/app-training/src/core/vertex-tuning.js +0 -234
  351. package/packages/agent/src/inbox/channel-deep-links.d.ts.map +0 -1
  352. package/packages/agent/src/inbox/config.d.ts.map +0 -1
  353. package/packages/agent/src/inbox/message-fetcher.d.ts.map +0 -1
  354. package/packages/agent/src/inbox/reflection.d.ts.map +0 -1
  355. package/packages/agent/src/inbox/repository.d.ts.map +0 -1
  356. package/packages/agent/src/inbox/triage-classifier.d.ts.map +0 -1
  357. package/packages/agent/src/inbox/types.d.ts.map +0 -1
  358. package/packages/agent/src/training/cli.d.ts +0 -2
  359. package/packages/agent/src/training/cli.d.ts.map +0 -1
  360. package/packages/agent/src/training/cli.js +0 -2
  361. package/packages/agent/src/training/context-audit.d.ts +0 -2
  362. package/packages/agent/src/training/context-audit.d.ts.map +0 -1
  363. package/packages/agent/src/training/context-audit.js +0 -2
  364. package/packages/agent/src/training/context-catalog.d.ts +0 -2
  365. package/packages/agent/src/training/context-catalog.d.ts.map +0 -1
  366. package/packages/agent/src/training/context-catalog.js +0 -2
  367. package/packages/agent/src/training/context-types.d.ts +0 -2
  368. package/packages/agent/src/training/context-types.d.ts.map +0 -1
  369. package/packages/agent/src/training/context-types.js +0 -2
  370. package/packages/agent/src/training/dataset-generator.d.ts +0 -2
  371. package/packages/agent/src/training/dataset-generator.d.ts.map +0 -1
  372. package/packages/agent/src/training/dataset-generator.js +0 -2
  373. package/packages/agent/src/training/replay-validator.d.ts +0 -2
  374. package/packages/agent/src/training/replay-validator.d.ts.map +0 -1
  375. package/packages/agent/src/training/replay-validator.js +0 -2
  376. package/packages/agent/src/training/roleplay-executor.d.ts +0 -2
  377. package/packages/agent/src/training/roleplay-executor.d.ts.map +0 -1
  378. package/packages/agent/src/training/roleplay-executor.js +0 -2
  379. package/packages/agent/src/training/roleplay-trajectories.d.ts +0 -2
  380. package/packages/agent/src/training/roleplay-trajectories.d.ts.map +0 -1
  381. package/packages/agent/src/training/roleplay-trajectories.js +0 -2
  382. package/packages/agent/src/training/scenario-blueprints.d.ts +0 -2
  383. package/packages/agent/src/training/scenario-blueprints.d.ts.map +0 -1
  384. package/packages/agent/src/training/scenario-blueprints.js +0 -2
  385. package/packages/agent/src/training/trajectory-task-datasets.d.ts +0 -2
  386. package/packages/agent/src/training/trajectory-task-datasets.d.ts.map +0 -1
  387. package/packages/agent/src/training/trajectory-task-datasets.js +0 -2
  388. package/packages/agent/src/training/vertex-tuning.d.ts +0 -2
  389. package/packages/agent/src/training/vertex-tuning.d.ts.map +0 -1
  390. package/packages/agent/src/training/vertex-tuning.js +0 -2
  391. package/packages/typescript/src/features/orchestrator/actions/coding-task-handlers.d.ts +0 -41
  392. package/packages/typescript/src/features/orchestrator/actions/coding-task-handlers.d.ts.map +0 -1
  393. package/packages/typescript/src/features/orchestrator/actions/coding-task-handlers.js +0 -443
  394. package/packages/typescript/src/features/orchestrator/actions/coding-task-helpers.d.ts +0 -34
  395. package/packages/typescript/src/features/orchestrator/actions/coding-task-helpers.d.ts.map +0 -1
  396. package/packages/typescript/src/features/orchestrator/actions/coding-task-helpers.js +0 -171
  397. package/packages/typescript/src/features/orchestrator/actions/eval-metadata.d.ts +0 -11
  398. package/packages/typescript/src/features/orchestrator/actions/eval-metadata.d.ts.map +0 -1
  399. package/packages/typescript/src/features/orchestrator/actions/eval-metadata.js +0 -55
  400. package/packages/typescript/src/features/orchestrator/actions/finalize-workspace.d.ts +0 -11
  401. package/packages/typescript/src/features/orchestrator/actions/finalize-workspace.d.ts.map +0 -1
  402. package/packages/typescript/src/features/orchestrator/actions/finalize-workspace.js +0 -214
  403. package/packages/typescript/src/features/orchestrator/actions/list-agents.d.ts +0 -13
  404. package/packages/typescript/src/features/orchestrator/actions/list-agents.d.ts.map +0 -1
  405. package/packages/typescript/src/features/orchestrator/actions/list-agents.js +0 -174
  406. package/packages/typescript/src/features/orchestrator/actions/manage-issues.d.ts +0 -11
  407. package/packages/typescript/src/features/orchestrator/actions/manage-issues.d.ts.map +0 -1
  408. package/packages/typescript/src/features/orchestrator/actions/manage-issues.js +0 -428
  409. package/packages/typescript/src/features/orchestrator/actions/provision-workspace.d.ts +0 -11
  410. package/packages/typescript/src/features/orchestrator/actions/provision-workspace.d.ts.map +0 -1
  411. package/packages/typescript/src/features/orchestrator/actions/provision-workspace.js +0 -189
  412. package/packages/typescript/src/features/orchestrator/actions/send-to-agent.d.ts +0 -12
  413. package/packages/typescript/src/features/orchestrator/actions/send-to-agent.d.ts.map +0 -1
  414. package/packages/typescript/src/features/orchestrator/actions/send-to-agent.js +0 -265
  415. package/packages/typescript/src/features/orchestrator/actions/spawn-agent.d.ts +0 -12
  416. package/packages/typescript/src/features/orchestrator/actions/spawn-agent.d.ts.map +0 -1
  417. package/packages/typescript/src/features/orchestrator/actions/spawn-agent.js +0 -356
  418. package/packages/typescript/src/features/orchestrator/actions/start-coding-task.d.ts +0 -22
  419. package/packages/typescript/src/features/orchestrator/actions/start-coding-task.d.ts.map +0 -1
  420. package/packages/typescript/src/features/orchestrator/actions/start-coding-task.js +0 -270
  421. package/packages/typescript/src/features/orchestrator/actions/stop-agent.d.ts +0 -12
  422. package/packages/typescript/src/features/orchestrator/actions/stop-agent.d.ts.map +0 -1
  423. package/packages/typescript/src/features/orchestrator/actions/stop-agent.js +0 -192
  424. package/packages/typescript/src/features/orchestrator/actions/task-control.d.ts +0 -3
  425. package/packages/typescript/src/features/orchestrator/actions/task-control.d.ts.map +0 -1
  426. package/packages/typescript/src/features/orchestrator/actions/task-control.js +0 -217
  427. package/packages/typescript/src/features/orchestrator/actions/task-history.d.ts +0 -3
  428. package/packages/typescript/src/features/orchestrator/actions/task-history.d.ts.map +0 -1
  429. package/packages/typescript/src/features/orchestrator/actions/task-history.js +0 -323
  430. package/packages/typescript/src/features/orchestrator/actions/task-share.d.ts +0 -3
  431. package/packages/typescript/src/features/orchestrator/actions/task-share.d.ts.map +0 -1
  432. package/packages/typescript/src/features/orchestrator/actions/task-share.js +0 -168
  433. package/packages/typescript/src/features/orchestrator/actions/task-thread-target.d.ts +0 -11
  434. package/packages/typescript/src/features/orchestrator/actions/task-thread-target.d.ts.map +0 -1
  435. package/packages/typescript/src/features/orchestrator/actions/task-thread-target.js +0 -68
  436. package/packages/typescript/src/features/orchestrator/api/agent-routes.d.ts +0 -18
  437. package/packages/typescript/src/features/orchestrator/api/agent-routes.d.ts.map +0 -1
  438. package/packages/typescript/src/features/orchestrator/api/agent-routes.js +0 -654
  439. package/packages/typescript/src/features/orchestrator/api/coordinator-routes.d.ts +0 -22
  440. package/packages/typescript/src/features/orchestrator/api/coordinator-routes.d.ts.map +0 -1
  441. package/packages/typescript/src/features/orchestrator/api/coordinator-routes.js +0 -403
  442. package/packages/typescript/src/features/orchestrator/api/hook-routes.d.ts +0 -18
  443. package/packages/typescript/src/features/orchestrator/api/hook-routes.d.ts.map +0 -1
  444. package/packages/typescript/src/features/orchestrator/api/hook-routes.js +0 -164
  445. package/packages/typescript/src/features/orchestrator/api/issue-routes.d.ts +0 -17
  446. package/packages/typescript/src/features/orchestrator/api/issue-routes.d.ts.map +0 -1
  447. package/packages/typescript/src/features/orchestrator/api/issue-routes.js +0 -132
  448. package/packages/typescript/src/features/orchestrator/api/routes.d.ts +0 -37
  449. package/packages/typescript/src/features/orchestrator/api/routes.d.ts.map +0 -1
  450. package/packages/typescript/src/features/orchestrator/api/routes.js +0 -96
  451. package/packages/typescript/src/features/orchestrator/api/workspace-routes.d.ts +0 -17
  452. package/packages/typescript/src/features/orchestrator/api/workspace-routes.d.ts.map +0 -1
  453. package/packages/typescript/src/features/orchestrator/api/workspace-routes.js +0 -149
  454. package/packages/typescript/src/features/orchestrator/base-plugin.d.ts +0 -19
  455. package/packages/typescript/src/features/orchestrator/base-plugin.d.ts.map +0 -1
  456. package/packages/typescript/src/features/orchestrator/base-plugin.js +0 -75
  457. package/packages/typescript/src/features/orchestrator/claude-jsonl-completion-watcher.d.ts +0 -101
  458. package/packages/typescript/src/features/orchestrator/claude-jsonl-completion-watcher.d.ts.map +0 -1
  459. package/packages/typescript/src/features/orchestrator/claude-jsonl-completion-watcher.js +0 -310
  460. package/packages/typescript/src/features/orchestrator/index.d.ts +0 -33
  461. package/packages/typescript/src/features/orchestrator/index.d.ts.map +0 -1
  462. package/packages/typescript/src/features/orchestrator/index.js +0 -30
  463. package/packages/typescript/src/features/orchestrator/patch-agent-orchestrator-plugin.d.ts +0 -15
  464. package/packages/typescript/src/features/orchestrator/patch-agent-orchestrator-plugin.d.ts.map +0 -1
  465. package/packages/typescript/src/features/orchestrator/patch-agent-orchestrator-plugin.js +0 -1449
  466. package/packages/typescript/src/features/orchestrator/providers/action-examples.d.ts +0 -14
  467. package/packages/typescript/src/features/orchestrator/providers/action-examples.d.ts.map +0 -1
  468. package/packages/typescript/src/features/orchestrator/providers/action-examples.js +0 -151
  469. package/packages/typescript/src/features/orchestrator/providers/active-workspace-context.d.ts +0 -13
  470. package/packages/typescript/src/features/orchestrator/providers/active-workspace-context.d.ts.map +0 -1
  471. package/packages/typescript/src/features/orchestrator/providers/active-workspace-context.js +0 -142
  472. package/packages/typescript/src/features/orchestrator/services/agent-credentials.d.ts +0 -6
  473. package/packages/typescript/src/features/orchestrator/services/agent-credentials.d.ts.map +0 -1
  474. package/packages/typescript/src/features/orchestrator/services/agent-credentials.js +0 -91
  475. package/packages/typescript/src/features/orchestrator/services/agent-metrics.d.ts +0 -30
  476. package/packages/typescript/src/features/orchestrator/services/agent-metrics.d.ts.map +0 -1
  477. package/packages/typescript/src/features/orchestrator/services/agent-metrics.js +0 -54
  478. package/packages/typescript/src/features/orchestrator/services/agent-selection.d.ts +0 -53
  479. package/packages/typescript/src/features/orchestrator/services/agent-selection.d.ts.map +0 -1
  480. package/packages/typescript/src/features/orchestrator/services/agent-selection.js +0 -70
  481. package/packages/typescript/src/features/orchestrator/services/ansi-utils.d.ts +0 -61
  482. package/packages/typescript/src/features/orchestrator/services/ansi-utils.d.ts.map +0 -1
  483. package/packages/typescript/src/features/orchestrator/services/ansi-utils.js +0 -252
  484. package/packages/typescript/src/features/orchestrator/services/config-env.d.ts +0 -13
  485. package/packages/typescript/src/features/orchestrator/services/config-env.d.ts.map +0 -1
  486. package/packages/typescript/src/features/orchestrator/services/config-env.js +0 -37
  487. package/packages/typescript/src/features/orchestrator/services/coordinator-event-normalizer.d.ts +0 -50
  488. package/packages/typescript/src/features/orchestrator/services/coordinator-event-normalizer.d.ts.map +0 -1
  489. package/packages/typescript/src/features/orchestrator/services/coordinator-event-normalizer.js +0 -184
  490. package/packages/typescript/src/features/orchestrator/services/debug-capture.d.ts +0 -38
  491. package/packages/typescript/src/features/orchestrator/services/debug-capture.d.ts.map +0 -1
  492. package/packages/typescript/src/features/orchestrator/services/debug-capture.js +0 -113
  493. package/packages/typescript/src/features/orchestrator/services/pty-auto-response.d.ts +0 -30
  494. package/packages/typescript/src/features/orchestrator/services/pty-auto-response.d.ts.map +0 -1
  495. package/packages/typescript/src/features/orchestrator/services/pty-auto-response.js +0 -146
  496. package/packages/typescript/src/features/orchestrator/services/pty-init.d.ts +0 -54
  497. package/packages/typescript/src/features/orchestrator/services/pty-init.d.ts.map +0 -1
  498. package/packages/typescript/src/features/orchestrator/services/pty-init.js +0 -315
  499. package/packages/typescript/src/features/orchestrator/services/pty-service.d.ts +0 -175
  500. package/packages/typescript/src/features/orchestrator/services/pty-service.d.ts.map +0 -1
  501. package/packages/typescript/src/features/orchestrator/services/pty-service.js +0 -1469
  502. package/packages/typescript/src/features/orchestrator/services/pty-session-io.d.ts +0 -49
  503. package/packages/typescript/src/features/orchestrator/services/pty-session-io.d.ts.map +0 -1
  504. package/packages/typescript/src/features/orchestrator/services/pty-session-io.js +0 -180
  505. package/packages/typescript/src/features/orchestrator/services/pty-spawn.d.ts +0 -53
  506. package/packages/typescript/src/features/orchestrator/services/pty-spawn.d.ts.map +0 -1
  507. package/packages/typescript/src/features/orchestrator/services/pty-spawn.js +0 -280
  508. package/packages/typescript/src/features/orchestrator/services/pty-types.d.ts +0 -80
  509. package/packages/typescript/src/features/orchestrator/services/pty-types.d.ts.map +0 -1
  510. package/packages/typescript/src/features/orchestrator/services/pty-types.js +0 -51
  511. package/packages/typescript/src/features/orchestrator/services/repo-input.d.ts +0 -16
  512. package/packages/typescript/src/features/orchestrator/services/repo-input.d.ts.map +0 -1
  513. package/packages/typescript/src/features/orchestrator/services/repo-input.js +0 -88
  514. package/packages/typescript/src/features/orchestrator/services/stall-classifier.d.ts +0 -69
  515. package/packages/typescript/src/features/orchestrator/services/stall-classifier.d.ts.map +0 -1
  516. package/packages/typescript/src/features/orchestrator/services/stall-classifier.js +0 -446
  517. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator-prompts.d.ts +0 -97
  518. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator-prompts.d.ts.map +0 -1
  519. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator-prompts.js +0 -342
  520. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator.d.ts +0 -421
  521. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator.d.ts.map +0 -1
  522. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator.js +0 -2356
  523. package/packages/typescript/src/features/orchestrator/services/swarm-decision-loop.d.ts +0 -52
  524. package/packages/typescript/src/features/orchestrator/services/swarm-decision-loop.d.ts.map +0 -1
  525. package/packages/typescript/src/features/orchestrator/services/swarm-decision-loop.js +0 -1538
  526. package/packages/typescript/src/features/orchestrator/services/swarm-event-triage.d.ts +0 -49
  527. package/packages/typescript/src/features/orchestrator/services/swarm-event-triage.d.ts.map +0 -1
  528. package/packages/typescript/src/features/orchestrator/services/swarm-event-triage.js +0 -171
  529. package/packages/typescript/src/features/orchestrator/services/swarm-history.d.ts +0 -27
  530. package/packages/typescript/src/features/orchestrator/services/swarm-history.d.ts.map +0 -1
  531. package/packages/typescript/src/features/orchestrator/services/swarm-history.js +0 -148
  532. package/packages/typescript/src/features/orchestrator/services/swarm-idle-watchdog.d.ts +0 -22
  533. package/packages/typescript/src/features/orchestrator/services/swarm-idle-watchdog.d.ts.map +0 -1
  534. package/packages/typescript/src/features/orchestrator/services/swarm-idle-watchdog.js +0 -265
  535. package/packages/typescript/src/features/orchestrator/services/task-acceptance.d.ts +0 -8
  536. package/packages/typescript/src/features/orchestrator/services/task-acceptance.d.ts.map +0 -1
  537. package/packages/typescript/src/features/orchestrator/services/task-acceptance.js +0 -114
  538. package/packages/typescript/src/features/orchestrator/services/task-agent-auth.d.ts +0 -68
  539. package/packages/typescript/src/features/orchestrator/services/task-agent-auth.d.ts.map +0 -1
  540. package/packages/typescript/src/features/orchestrator/services/task-agent-auth.js +0 -559
  541. package/packages/typescript/src/features/orchestrator/services/task-agent-frameworks.d.ts +0 -82
  542. package/packages/typescript/src/features/orchestrator/services/task-agent-frameworks.d.ts.map +0 -1
  543. package/packages/typescript/src/features/orchestrator/services/task-agent-frameworks.js +0 -738
  544. package/packages/typescript/src/features/orchestrator/services/task-kind.d.ts +0 -3
  545. package/packages/typescript/src/features/orchestrator/services/task-kind.d.ts.map +0 -1
  546. package/packages/typescript/src/features/orchestrator/services/task-kind.js +0 -40
  547. package/packages/typescript/src/features/orchestrator/services/task-policy.d.ts +0 -17
  548. package/packages/typescript/src/features/orchestrator/services/task-policy.d.ts.map +0 -1
  549. package/packages/typescript/src/features/orchestrator/services/task-policy.js +0 -226
  550. package/packages/typescript/src/features/orchestrator/services/task-registry.d.ts +0 -550
  551. package/packages/typescript/src/features/orchestrator/services/task-registry.d.ts.map +0 -1
  552. package/packages/typescript/src/features/orchestrator/services/task-registry.js +0 -2182
  553. package/packages/typescript/src/features/orchestrator/services/task-share.d.ts +0 -18
  554. package/packages/typescript/src/features/orchestrator/services/task-share.d.ts.map +0 -1
  555. package/packages/typescript/src/features/orchestrator/services/task-share.js +0 -159
  556. package/packages/typescript/src/features/orchestrator/services/task-validation.d.ts +0 -69
  557. package/packages/typescript/src/features/orchestrator/services/task-validation.d.ts.map +0 -1
  558. package/packages/typescript/src/features/orchestrator/services/task-validation.js +0 -587
  559. package/packages/typescript/src/features/orchestrator/services/task-verifier-runner.d.ts +0 -5
  560. package/packages/typescript/src/features/orchestrator/services/task-verifier-runner.d.ts.map +0 -1
  561. package/packages/typescript/src/features/orchestrator/services/task-verifier-runner.js +0 -372
  562. package/packages/typescript/src/features/orchestrator/services/trajectory-context.d.ts +0 -73
  563. package/packages/typescript/src/features/orchestrator/services/trajectory-context.d.ts.map +0 -1
  564. package/packages/typescript/src/features/orchestrator/services/trajectory-context.js +0 -64
  565. package/packages/typescript/src/features/orchestrator/services/trajectory-feedback.d.ts +0 -53
  566. package/packages/typescript/src/features/orchestrator/services/trajectory-feedback.d.ts.map +0 -1
  567. package/packages/typescript/src/features/orchestrator/services/trajectory-feedback.js +0 -260
  568. package/packages/typescript/src/features/orchestrator/services/workspace-git-ops.d.ts +0 -28
  569. package/packages/typescript/src/features/orchestrator/services/workspace-git-ops.d.ts.map +0 -1
  570. package/packages/typescript/src/features/orchestrator/services/workspace-git-ops.js +0 -105
  571. package/packages/typescript/src/features/orchestrator/services/workspace-github.d.ts +0 -58
  572. package/packages/typescript/src/features/orchestrator/services/workspace-github.d.ts.map +0 -1
  573. package/packages/typescript/src/features/orchestrator/services/workspace-github.js +0 -139
  574. package/packages/typescript/src/features/orchestrator/services/workspace-lifecycle.d.ts +0 -18
  575. package/packages/typescript/src/features/orchestrator/services/workspace-lifecycle.d.ts.map +0 -1
  576. package/packages/typescript/src/features/orchestrator/services/workspace-lifecycle.js +0 -86
  577. package/packages/typescript/src/features/orchestrator/services/workspace-service.d.ts +0 -118
  578. package/packages/typescript/src/features/orchestrator/services/workspace-service.d.ts.map +0 -1
  579. package/packages/typescript/src/features/orchestrator/services/workspace-service.js +0 -533
  580. package/packages/typescript/src/features/orchestrator/services/workspace-types.d.ts +0 -81
  581. package/packages/typescript/src/features/orchestrator/services/workspace-types.d.ts.map +0 -1
  582. package/packages/typescript/src/features/orchestrator/services/workspace-types.js +0 -8
  583. package/packages/typescript/src/features/orchestrator/task-progress-streamer.d.ts +0 -38
  584. package/packages/typescript/src/features/orchestrator/task-progress-streamer.d.ts.map +0 -1
  585. package/packages/typescript/src/features/orchestrator/task-progress-streamer.js +0 -293
  586. /package/{packages/agent → apps/app-lifeops}/src/inbox/channel-deep-links.d.ts +0 -0
  587. /package/{packages/agent → apps/app-lifeops}/src/inbox/channel-deep-links.js +0 -0
  588. /package/{packages/agent → apps/app-lifeops}/src/inbox/config.d.ts +0 -0
  589. /package/{packages/agent → apps/app-lifeops}/src/inbox/message-fetcher.d.ts +0 -0
  590. /package/{packages/agent → apps/app-lifeops}/src/inbox/message-fetcher.js +0 -0
  591. /package/{packages/agent → apps/app-lifeops}/src/inbox/reflection.d.ts +0 -0
  592. /package/{packages/agent → apps/app-lifeops}/src/inbox/reflection.js +0 -0
  593. /package/{packages/agent → apps/app-lifeops}/src/inbox/repository.d.ts +0 -0
  594. /package/{packages/agent → apps/app-lifeops}/src/inbox/repository.js +0 -0
  595. /package/{packages/agent → apps/app-lifeops}/src/inbox/triage-classifier.d.ts +0 -0
  596. /package/{packages/agent → apps/app-lifeops}/src/inbox/triage-classifier.js +0 -0
  597. /package/{packages/agent → apps/app-lifeops}/src/inbox/types.d.ts +0 -0
  598. /package/{packages/agent → apps/app-lifeops}/src/inbox/types.js +0 -0
@@ -1,1734 +1 @@
1
- import { ModelType, parseJSONObjectFromText, parseKeyValueXml, } from "@elizaos/core";
2
- import { resolveDefaultTimeZone } from "../lifeops/defaults.js";
3
- import { LifeOpsService, LifeOpsServiceError } from "../lifeops/service.js";
4
- import { hasContextSignalForKey } from "./context-signal.js";
5
- import { extractActionResultsFromState, extractRecentMessageEntriesFromState, extractStateDataRecords, renderGroundedActionReply, summarizeActiveTrajectory, summarizeRecentActionHistory, } from "./grounded-action-reply.js";
6
- import { recentConversationTexts as collectRecentConversationTexts } from "./life-recent-context.js";
7
- import { detailArray, detailBoolean, detailNumber, detailString, formatEmailNeedsResponse, formatEmailRead, formatEmailSearch, formatEmailTriage, formatGmailBatchReplyDrafts, formatGmailReplyDraft, getGoogleCapabilityStatus, gmailReadUnavailableMessage, gmailSendUnavailableMessage, hasLifeOpsAccess, INTERNAL_URL, messageText, toActionData, } from "./lifeops-google-helpers.js";
8
- const GMAIL_CONTEXT_WINDOW = 12;
9
- const GMAIL_DETAIL_ALIASES = {
10
- forceSync: ["forcesync", "force_sync"],
11
- maxResults: ["maxresults", "max_results"],
12
- replyNeededOnly: ["replyneededonly", "reply_needed_only"],
13
- messageIds: ["messageids", "message_ids"],
14
- };
15
- async function collectGmailConversationContext(args) {
16
- const recentConversation = await collectRecentConversationTexts({
17
- runtime: args.runtime,
18
- message: args.message,
19
- state: args.state,
20
- limit: GMAIL_CONTEXT_WINDOW,
21
- });
22
- const currentMessage = messageText(args.message).trim();
23
- const combined = [...recentConversation];
24
- if (currentMessage.length > 0) {
25
- combined.push(currentMessage);
26
- }
27
- return combined.slice(-GMAIL_CONTEXT_WINDOW);
28
- }
29
- async function buildGmailDraftGenerationContext(args) {
30
- const [conversationContext, trajectorySummary] = await Promise.all([
31
- collectGmailConversationContext(args),
32
- summarizeActiveTrajectory(args.runtime),
33
- ]);
34
- return {
35
- conversationContext,
36
- actionHistory: summarizeRecentActionHistory(args.state, 4),
37
- trajectorySummary,
38
- };
39
- }
40
- function normalizeGmailSubaction(value) {
41
- if (typeof value !== "string") {
42
- return null;
43
- }
44
- const normalized = value.trim().toLowerCase();
45
- switch (normalized) {
46
- case "triage":
47
- case "needs_response":
48
- case "search":
49
- case "read":
50
- case "draft_reply":
51
- case "draft_batch_replies":
52
- case "send_reply":
53
- case "send_batch_replies":
54
- case "send_message":
55
- return normalized;
56
- default:
57
- return null;
58
- }
59
- }
60
- function normalizeShouldAct(value) {
61
- if (typeof value === "boolean") {
62
- return value;
63
- }
64
- if (typeof value === "string") {
65
- const normalized = value.trim().toLowerCase();
66
- if (normalized === "true") {
67
- return true;
68
- }
69
- if (normalized === "false") {
70
- return false;
71
- }
72
- }
73
- return null;
74
- }
75
- function normalizePlannerResponse(value) {
76
- if (typeof value !== "string") {
77
- return undefined;
78
- }
79
- const trimmed = value.trim();
80
- return trimmed.length > 0 ? trimmed : undefined;
81
- }
82
- function normalizePlannerString(value) {
83
- if (typeof value !== "string") {
84
- return undefined;
85
- }
86
- const trimmed = value.trim();
87
- return trimmed.length > 0 ? trimmed : undefined;
88
- }
89
- function splitLooseListString(value) {
90
- const parts = [];
91
- let current = "";
92
- let inQuotes = false;
93
- let angleDepth = 0;
94
- for (let index = 0; index < value.length; index += 1) {
95
- const char = value[index];
96
- const next = value[index + 1];
97
- if (char === '"') {
98
- inQuotes = !inQuotes;
99
- current += char;
100
- continue;
101
- }
102
- if (!inQuotes && char === "<") {
103
- angleDepth += 1;
104
- current += char;
105
- continue;
106
- }
107
- if (!inQuotes && char === ">") {
108
- angleDepth = Math.max(0, angleDepth - 1);
109
- current += char;
110
- continue;
111
- }
112
- if (!inQuotes && angleDepth === 0 && char === "|" && next === "|") {
113
- const trimmed = current.trim();
114
- if (trimmed.length > 0) {
115
- parts.push(trimmed);
116
- }
117
- current = "";
118
- index += 1;
119
- continue;
120
- }
121
- if (!inQuotes &&
122
- angleDepth === 0 &&
123
- (char === "," || char === ";" || char === "\n")) {
124
- const trimmed = current.trim();
125
- if (trimmed.length > 0) {
126
- parts.push(trimmed);
127
- }
128
- current = "";
129
- continue;
130
- }
131
- current += char;
132
- }
133
- const trimmed = current.trim();
134
- if (trimmed.length > 0) {
135
- parts.push(trimmed);
136
- }
137
- return parts;
138
- }
139
- function normalizePlannerStringArray(value) {
140
- if (Array.isArray(value)) {
141
- return dedupeQueries(value.flatMap((item) => typeof item === "string" ? splitLooseListString(item) : []));
142
- }
143
- if (typeof value === "string") {
144
- return dedupeQueries(splitLooseListString(value));
145
- }
146
- return undefined;
147
- }
148
- function normalizeQueryStringArray(value) {
149
- if (Array.isArray(value)) {
150
- return dedupeQueries(value.map((item) => (typeof item === "string" ? item.trim() : "")));
151
- }
152
- if (typeof value === "string") {
153
- return dedupeQueries(value.split(/\s*\|\|\s*/).map((item) => item.trim()));
154
- }
155
- return undefined;
156
- }
157
- function buildGmailReplyOnlyFallback(subaction) {
158
- switch (subaction) {
159
- case "search":
160
- return "What email do you want me to search for?";
161
- case "read":
162
- return "Which email do you want me to read?";
163
- case "draft_reply":
164
- case "draft_batch_replies":
165
- return "Which email do you want me to draft a reply for?";
166
- case "send_reply":
167
- case "send_batch_replies":
168
- case "send_message":
169
- return "What exactly do you want me to send in Gmail?";
170
- case "needs_response":
171
- return "Do you want emails that need a reply, or something else in Gmail?";
172
- default:
173
- return "What do you want to do in Gmail — check inbox, search, read, or draft a reply?";
174
- }
175
- }
176
- function looksLikeReplyDraftRewriteFollowup(text) {
177
- const normalized = normalizeText(text);
178
- if (!normalized) {
179
- return false;
180
- }
181
- if (/\b(search|find|look for|read|open|show me|check (?:my )?inbox|who emailed)\b/.test(normalized)) {
182
- return false;
183
- }
184
- return (/\b(rewrite|edit|revise|change|update|adjust|redo|rework)\b/.test(normalized) ||
185
- /\b(make it|have it|say that|say i'm|say im|say i am|say he's|say hes|mention|instead|actually|we need to)\b/.test(normalized) ||
186
- /\b(let (?:him|her|them) know|tell (?:him|her|them))\b/.test(normalized));
187
- }
188
- function looksLikeSendReplyFollowup(text) {
189
- const normalized = normalizeText(text);
190
- if (!normalized) {
191
- return false;
192
- }
193
- return (/\b(send (?:it|that|the reply|the draft|that reply|that draft))\b/.test(normalized) ||
194
- /\bemail (?:it|that|them back now)\b/.test(normalized) ||
195
- /^\s*send now\b/.test(normalized));
196
- }
197
- function buildGmailServiceErrorFallback(error) {
198
- const normalized = normalizeText(error.message);
199
- if (error.status === 429 || normalized.includes("rate limit")) {
200
- return "Gmail is rate-limited right now. Try again in a bit.";
201
- }
202
- if (normalized.includes("multiple gmail messages matched") ||
203
- (error.status === 409 &&
204
- normalized.includes("narrow the query") &&
205
- normalized.includes("message"))) {
206
- return "I found more than one matching email. Tell me the sender, subject, or message id.";
207
- }
208
- if (normalized.includes("not found")) {
209
- return "I couldn't find that email. Tell me who it was from or what the subject looked like.";
210
- }
211
- if (normalized.includes("missing") &&
212
- (normalized.includes("message") || normalized.includes("body"))) {
213
- return "I still need the exact message or the reply text to finish that Gmail action.";
214
- }
215
- return "I couldn't finish that Gmail action yet. Tell me what message you want and what you want me to do with it.";
216
- }
217
- function buildGmailTargetDisambiguationFallback(feed) {
218
- return `${formatEmailSearch(feed)}\nTell me which email you mean by sender, subject, or message id.`;
219
- }
220
- function shouldUseCanonicalGmailReplyFallback(scenario) {
221
- return (scenario === "access_denied" ||
222
- scenario === "gmail_read_unavailable" ||
223
- scenario === "gmail_send_unavailable");
224
- }
225
- async function renderGmailActionReply(args) {
226
- const { runtime, message, state, intent, scenario, fallback, context } = args;
227
- if (shouldUseCanonicalGmailReplyFallback(scenario)) {
228
- return fallback;
229
- }
230
- return renderGroundedActionReply({
231
- runtime,
232
- message,
233
- state,
234
- intent,
235
- domain: "gmail",
236
- scenario,
237
- fallback,
238
- context,
239
- preferCharacterVoice: true,
240
- additionalRules: [
241
- "Mirror the user's wording for time windows, urgency, and reply intent when possible.",
242
- "Preserve all concrete email facts from the context and canonical fallback.",
243
- "If this is reply-only or a clarification, do not pretend you already searched, drafted, or sent something.",
244
- ],
245
- });
246
- }
247
- function normalizeText(value) {
248
- return value.trim().toLowerCase().replace(/\s+/g, " ");
249
- }
250
- function normalizeLookupKey(value) {
251
- return value.toLowerCase().replace(/[^a-z0-9]/g, "");
252
- }
253
- function dedupeQueries(values) {
254
- const queries = [];
255
- const seen = new Set();
256
- for (const value of values) {
257
- const query = typeof value === "string" ? value.trim().replace(/\s+/g, " ") : "";
258
- if (!query) {
259
- continue;
260
- }
261
- const key = query.toLowerCase();
262
- if (seen.has(key)) {
263
- continue;
264
- }
265
- seen.add(key);
266
- queries.push(query);
267
- }
268
- return queries;
269
- }
270
- function normalizeGmailDetails(details) {
271
- if (!details) {
272
- return undefined;
273
- }
274
- const normalized = { ...details };
275
- const aliasMap = new Map();
276
- for (const [canonical, aliases] of Object.entries(GMAIL_DETAIL_ALIASES)) {
277
- aliasMap.set(normalizeLookupKey(canonical), canonical);
278
- for (const alias of aliases) {
279
- aliasMap.set(normalizeLookupKey(alias), canonical);
280
- }
281
- }
282
- for (const [key, value] of Object.entries(details)) {
283
- const canonical = aliasMap.get(normalizeLookupKey(key));
284
- if (!canonical) {
285
- continue;
286
- }
287
- if (normalized[canonical] === undefined) {
288
- normalized[canonical] = value;
289
- }
290
- }
291
- return normalized;
292
- }
293
- function normalizeStringArray(value) {
294
- const normalized = Array.isArray(value)
295
- ? value.flatMap((item) => typeof item === "string" ? splitLooseListString(item) : [])
296
- : typeof value === "string"
297
- ? splitLooseListString(value)
298
- : [];
299
- return normalized.length > 0 ? normalized : undefined;
300
- }
301
- function normalizeOptionalBoolean(value) {
302
- return typeof value === "boolean" ? value : undefined;
303
- }
304
- function coerceGmailComposeDraft(value) {
305
- if (!value || typeof value !== "object" || Array.isArray(value)) {
306
- return null;
307
- }
308
- const record = value;
309
- if (record.subaction !== "send_message") {
310
- return null;
311
- }
312
- const status = record.status === "sent" || record.status === "pending_clarification"
313
- ? record.status
314
- : null;
315
- if (!status) {
316
- return null;
317
- }
318
- return {
319
- subaction: "send_message",
320
- status,
321
- intent: normalizePlannerString(record.intent),
322
- to: normalizePlannerStringArray(record.to),
323
- cc: normalizePlannerStringArray(record.cc),
324
- bcc: normalizePlannerStringArray(record.bcc),
325
- subject: normalizePlannerString(record.subject),
326
- bodyText: normalizePlannerString(record.bodyText),
327
- updatedAt: normalizePlannerString(record.updatedAt),
328
- };
329
- }
330
- function buildGmailComposeDraft(args) {
331
- return {
332
- subaction: "send_message",
333
- status: args.status,
334
- intent: args.intent,
335
- to: args.to,
336
- cc: args.cc,
337
- bcc: args.bcc,
338
- subject: args.subject,
339
- bodyText: args.bodyText,
340
- updatedAt: new Date().toISOString(),
341
- };
342
- }
343
- function composeDraftFromActionResult(result) {
344
- if (!result?.data || typeof result.data !== "object") {
345
- return null;
346
- }
347
- return coerceGmailComposeDraft(result.data.gmailDraft);
348
- }
349
- function coerceGmailReplyDraftContext(value) {
350
- if (!value || typeof value !== "object" || Array.isArray(value)) {
351
- return null;
352
- }
353
- const record = value;
354
- const messageId = normalizePlannerString(record.messageId);
355
- const bodyText = normalizePlannerString(record.bodyText ?? record.body);
356
- if (!messageId || !bodyText) {
357
- return null;
358
- }
359
- return {
360
- messageId,
361
- bodyText,
362
- subject: normalizePlannerString(record.subject),
363
- to: normalizePlannerStringArray(record.to),
364
- cc: normalizePlannerStringArray(record.cc),
365
- };
366
- }
367
- function coerceGmailMessageTargetContext(value) {
368
- if (!value || typeof value !== "object" || Array.isArray(value)) {
369
- return null;
370
- }
371
- const record = value;
372
- const messageId = normalizePlannerString(record.id ?? record.messageId);
373
- if (!messageId) {
374
- return null;
375
- }
376
- return {
377
- messageId,
378
- subject: normalizePlannerString(record.subject),
379
- from: normalizePlannerString(record.from),
380
- query: normalizePlannerString(record.query),
381
- };
382
- }
383
- function gmailStateDataRecords(state) {
384
- return extractStateDataRecords(state);
385
- }
386
- function latestGmailReplyDraftContext(state) {
387
- const records = gmailStateDataRecords(state);
388
- for (const record of records.reverse()) {
389
- const directDraft = coerceGmailReplyDraftContext(record.gmailDraft) ??
390
- coerceGmailReplyDraftContext(record.draft) ??
391
- coerceGmailReplyDraftContext(record);
392
- if (directDraft) {
393
- return directDraft;
394
- }
395
- if (Array.isArray(record.drafts)) {
396
- for (const candidate of [...record.drafts].reverse()) {
397
- const draft = coerceGmailReplyDraftContext(candidate);
398
- if (draft) {
399
- return draft;
400
- }
401
- }
402
- }
403
- }
404
- return null;
405
- }
406
- function latestGmailBatchReplyDraftItems(state) {
407
- const records = gmailStateDataRecords(state);
408
- for (const record of records.reverse()) {
409
- const drafts = Array.isArray(record.drafts)
410
- ? record.drafts
411
- .map((draft) => coerceGmailReplyDraftContext(draft))
412
- .filter((draft) => draft !== null)
413
- : [];
414
- if (drafts.length === 0) {
415
- continue;
416
- }
417
- return drafts.map((draft) => ({
418
- messageId: draft.messageId,
419
- bodyText: draft.bodyText,
420
- subject: draft.subject,
421
- to: draft.to,
422
- cc: draft.cc,
423
- }));
424
- }
425
- return undefined;
426
- }
427
- function latestGmailMessageTargetContext(state) {
428
- const records = gmailStateDataRecords(state);
429
- for (const record of records.reverse()) {
430
- const directTarget = coerceGmailMessageTargetContext(record.message) ??
431
- coerceGmailMessageTargetContext(record.gmailMessage) ??
432
- coerceGmailMessageTargetContext(record);
433
- if (directTarget) {
434
- return directTarget;
435
- }
436
- if (Array.isArray(record.messages)) {
437
- for (const candidate of record.messages) {
438
- const message = coerceGmailMessageTargetContext(candidate);
439
- if (message) {
440
- return {
441
- ...message,
442
- query: message.query ?? normalizePlannerString(record.query),
443
- };
444
- }
445
- }
446
- }
447
- }
448
- return null;
449
- }
450
- function gmailComposeDraftFromMessageEntry(entry) {
451
- const content = entry.content && typeof entry.content === "object"
452
- ? entry.content
453
- : null;
454
- if (!content) {
455
- return null;
456
- }
457
- return (coerceGmailComposeDraft(content.gmailDraft) ??
458
- coerceGmailComposeDraft(content.data && typeof content.data === "object"
459
- ? content.data.gmailDraft
460
- : undefined));
461
- }
462
- function latestGmailComposeDraft(state, statuses) {
463
- const drafts = [];
464
- for (const result of extractActionResultsFromState(state)) {
465
- const draft = composeDraftFromActionResult(result);
466
- if (draft) {
467
- drafts.push(draft);
468
- }
469
- }
470
- for (const entry of extractRecentMessageEntriesFromState(state)) {
471
- const draft = gmailComposeDraftFromMessageEntry(entry);
472
- if (draft) {
473
- drafts.push(draft);
474
- }
475
- }
476
- const allowed = new Set(statuses);
477
- for (const draft of drafts.reverse()) {
478
- if (allowed.has(draft.status)) {
479
- return draft;
480
- }
481
- }
482
- return null;
483
- }
484
- function mergePlannerArray(primary, fallback) {
485
- if (primary && primary.length > 0) {
486
- return primary;
487
- }
488
- return fallback && fallback.length > 0 ? fallback : undefined;
489
- }
490
- function mergeComposeDrafts(...drafts) {
491
- let to;
492
- let cc;
493
- let bcc;
494
- let subject;
495
- let bodyText;
496
- let intent;
497
- let status = "pending_clarification";
498
- for (const draft of drafts) {
499
- if (!draft) {
500
- continue;
501
- }
502
- to = mergePlannerArray(draft.to, to);
503
- cc = mergePlannerArray(draft.cc, cc);
504
- bcc = mergePlannerArray(draft.bcc, bcc);
505
- subject =
506
- normalizePlannerString(draft.subject) ?? normalizePlannerString(subject);
507
- bodyText =
508
- normalizePlannerString(draft.bodyText) ??
509
- normalizePlannerString(bodyText);
510
- if ("intent" in draft) {
511
- intent =
512
- normalizePlannerString(draft.intent) ??
513
- intent;
514
- }
515
- if ("status" in draft) {
516
- const candidate = draft.status;
517
- if (candidate === "pending_clarification" || candidate === "sent") {
518
- status = candidate;
519
- }
520
- }
521
- }
522
- return buildGmailComposeDraft({
523
- status,
524
- intent,
525
- to,
526
- cc,
527
- bcc,
528
- subject,
529
- bodyText,
530
- });
531
- }
532
- export async function extractGmailPlanWithLlm(runtime, message, state, intent, activeComposeDraft) {
533
- const recentConversation = (await collectGmailConversationContext({ runtime, message, state })).join("\n");
534
- const latestReplyDraft = latestGmailReplyDraftContext(state);
535
- const latestMessageTarget = latestGmailMessageTargetContext(state);
536
- const currentMessage = messageText(message).trim();
537
- const timeZone = resolveDefaultTimeZone();
538
- const now = new Date();
539
- const nowIso = now.toISOString();
540
- const localNow = new Intl.DateTimeFormat(undefined, {
541
- timeZone,
542
- year: "numeric",
543
- month: "2-digit",
544
- day: "2-digit",
545
- hour: "2-digit",
546
- minute: "2-digit",
547
- second: "2-digit",
548
- hour12: false,
549
- }).format(now);
550
- const prompt = [
551
- "Plan the Gmail action for this request.",
552
- "The user may speak in any language.",
553
- "Use the current request plus recent conversation context.",
554
- "If the current request is vague or a follow-up, recover the subject from recent conversation and apply the new constraint from the current request.",
555
- "You are allowed to decide that the assistant should reply naturally without acting yet.",
556
- "Set shouldAct=false when the user is vague, only acknowledging, brainstorming, or asking for email help without enough specifics to safely act.",
557
- "When shouldAct=false, provide a short natural response that asks only for what is missing.",
558
- "When shouldAct=false, write that response in the user's language unless they clearly asked to switch languages.",
559
- "For clear reply-workflow commands like 'draft a reply to John's email' or 'send that reply now', still choose the intent-level subaction even if the exact Gmail message id is not known yet. Downstream Gmail logic can clarify the target email.",
560
- "",
561
- "Return a JSON object with exactly these fields:",
562
- " subaction: one of the allowed subactions below, or null when this should be reply-only/no-op",
563
- " shouldAct: boolean",
564
- " response: short natural-language reply when shouldAct is false, otherwise empty or null",
565
- " queries: array or ||-delimited string of up to 3 Gmail search queries",
566
- " messageId: optional Gmail message id",
567
- " replyNeededOnly: optional boolean",
568
- " to: optional array of recipient email addresses when subaction is send_message",
569
- " cc: optional array of cc email addresses when subaction is send_message",
570
- " bcc: optional array of bcc email addresses when subaction is send_message",
571
- " subject: optional subject line when subaction is send_message",
572
- " bodyText: optional email body when subaction is send_message",
573
- "",
574
- "Subactions and when to use each:",
575
- " triage — general inbox overview, unread count, email summary (e.g. 'check my inbox', 'any new emails')",
576
- " needs_response — specifically about emails that need a reply (e.g. 'which emails need a response', 'any reply-needed emails')",
577
- " search — find emails by sender, subject, keyword, date, label (e.g. 'emails from John', 'who emailed me today', 'find the invoice email')",
578
- " read — read a specific email body by message ID (e.g. 'read that email', 'show me the full message')",
579
- " draft_reply — compose a reply to a specific email (e.g. 'draft a reply to John', 'write a response to that email')",
580
- " draft_batch_replies — compose replies to multiple emails at once (e.g. 'draft replies to all of those', 'respond to each one')",
581
- " send_reply — send a confirmed reply to an email (e.g. 'send that reply', 'email them back now')",
582
- " send_batch_replies — send confirmed replies to multiple emails (e.g. 'send all those replies')",
583
- " send_message — compose and send a brand-new outbound email (e.g. 'send an email to zo@iqlabs.dev, subject hello, body how are you doing today?')",
584
- "",
585
- "For search or read, extract up to 3 short Gmail-compatible queries using Gmail search operators.",
586
- "For draft_reply, send_reply, and draft_batch_replies, also extract Gmail-compatible queries whenever the target email is described by sender, subject, keyword, or timeframe but no explicit Gmail message id is known.",
587
- "Return Gmail operators in Gmail syntax even if the user speaks another language, and preserve names, addresses, and subject keywords in their original language or script when useful.",
588
- "For send_message, preserve the exact recipient addresses and keep the user's intended subject/body wording as close as possible.",
589
- "When the user writes in another language, still infer the correct Gmail action and keep extracted subject/body wording in that language unless the user asked to translate.",
590
- "",
591
- "Gmail search operators — complete reference:",
592
- " Sender/recipient: from:name to:name cc:name bcc:name deliveredto:alias@example.com",
593
- ' Content: subject:word "exact phrase" has:attachment filename:report.pdf has:drive has:document has:spreadsheet has:presentation has:youtube',
594
- " Status: is:unread is:read is:starred is:important is:snoozed",
595
- " Location: in:inbox in:sent in:draft in:trash in:spam in:anywhere label:work category:primary category:social category:promotions category:updates category:forums",
596
- " Date/time: newer_than:7d older_than:30d after:2025/01/01 before:2025/12/31",
597
- " Size: size:5m larger:10m smaller:1m larger_than:500k smaller_than:2m",
598
- " Special: from:me list:info@mailinglist.com",
599
- " Negation: -from:name -subject:word -label:work -is:unread (prefix any operator with - to exclude)",
600
- " Boolean: {term1 term2} for OR. Combine operators: from:suran is:unread newer_than:21d",
601
- " Proximity: AROUND (not widely supported but available)",
602
- "",
603
- "Preserve sender names, email addresses, subject keywords, unread/starred/important status, attachment mentions, and time windows.",
604
- "Use the current local datetime to convert relative time references like today, yesterday, this week, and this month into Gmail-compatible operators.",
605
- "Set replyNeededOnly to true only when the request is specifically about emails that need a reply.",
606
- "",
607
- "Examples:",
608
- ' "who emailed me today" → {"subaction":"search","shouldAct":true,"response":null,"queries":["newer_than:1d"]}',
609
- ' "did suran email me" → {"subaction":"search","shouldAct":true,"response":null,"queries":["from:suran"]}',
610
- ' "draft a reply to John" → {"subaction":"draft_reply","shouldAct":true,"response":null,"queries":["from:john"]}',
611
- ' "draft a reply to John\'s email" → {"subaction":"draft_reply","shouldAct":true,"response":null,"queries":["from:john"]}',
612
- ' "what about unread ones?" with recent context about a Suran email search → {"subaction":"search","shouldAct":true,"response":null,"queries":["from:suran is:unread"]}',
613
- ' "rewrite that reply to say I\'m in San Francisco, not NYC" with recent context about an existing Suran draft → {"subaction":"draft_reply","shouldAct":true,"response":null}',
614
- ' "send that reply now" with recent context about an existing drafted reply → {"subaction":"send_reply","shouldAct":true,"response":null}',
615
- ' "check my inbox" → {"subaction":"triage","shouldAct":true,"response":null}',
616
- ' "any emails from Sarah about the report" → {"subaction":"search","shouldAct":true,"response":null,"queries":["from:sarah subject:report"]}',
617
- ' "busca en mi correo si Suran me escribió hoy" → {"subaction":"search","shouldAct":true,"response":null,"queries":["from:suran newer_than:1d"]}',
618
- ' "envíale un correo a maria@example.com con asunto hola y cuerpo nos vemos mañana" → {"subaction":"send_message","shouldAct":true,"response":null,"queries":[],"to":["maria@example.com"],"subject":"hola","bodyText":"nos vemos mañana"}',
619
- ' "send an email to zo@iqlabs.dev, subject hello anon, body how are you doing today?" → {"subaction":"send_message","shouldAct":true,"response":null,"queries":[],"to":["zo@iqlabs.dev"],"subject":"hello anon","bodyText":"how are you doing today?"}',
620
- ' "can you help me with my email?" → {"subaction":null,"shouldAct":false,"response":"What do you want to do in Gmail — check inbox, search, read, or draft a reply?","queries":[]}',
621
- ' "send an email like \'test\'" with active draft having to=["shaw@gmail.com"] → {"subaction":"send_message","shouldAct":true,"response":null,"queries":[],"to":["shaw@gmail.com"],"subject":"test","bodyText":"test"}',
622
- ...(activeComposeDraft
623
- ? [
624
- "",
625
- "Active compose draft (fields already established in this conversation):",
626
- ` ${JSON.stringify({ to: activeComposeDraft.to, cc: activeComposeDraft.cc, bcc: activeComposeDraft.bcc, subject: activeComposeDraft.subject, bodyText: activeComposeDraft.bodyText })}`,
627
- "If the active compose draft already has a recipient, subject, or body, do NOT ask for those again.",
628
- "Set shouldAct=true and subaction=send_message when the user provides missing fields, confirms sending, or provides a short payload like 'test' to use as subject and body.",
629
- "Only set shouldAct=false when genuinely no information is available from conversation context or active draft.",
630
- ]
631
- : []),
632
- ...(latestReplyDraft || latestMessageTarget
633
- ? [
634
- "",
635
- "Recent reply-draft context:",
636
- ` ${JSON.stringify({
637
- latestReplyDraft,
638
- latestMessageTarget,
639
- })}`,
640
- "If there is a recent drafted reply or known target email and the user says rewrite, edit, revise, change, update, or 'send that reply', keep working on that same reply workflow even if they do not restate the sender or subject.",
641
- ]
642
- : []),
643
- "",
644
- "Return ONLY valid JSON. No prose. No markdown. No XML. No <think>.",
645
- "",
646
- `Current timezone: ${timeZone}`,
647
- `Current local datetime: ${localNow}`,
648
- `Current ISO datetime: ${nowIso}`,
649
- `Current request: ${JSON.stringify(currentMessage)}`,
650
- `Resolved intent: ${JSON.stringify(intent)}`,
651
- `Recent conversation: ${JSON.stringify(recentConversation)}`,
652
- ].join("\n");
653
- let rawResponse = "";
654
- try {
655
- const result = await runtime.useModel(ModelType.TEXT_LARGE, {
656
- prompt,
657
- });
658
- rawResponse = typeof result === "string" ? result : "";
659
- }
660
- catch (error) {
661
- runtime.logger?.warn?.({
662
- src: "action:gmail",
663
- error: error instanceof Error ? error.message : String(error),
664
- }, "Gmail action planning model call failed");
665
- return {
666
- subaction: null,
667
- queries: [],
668
- shouldAct: null,
669
- };
670
- }
671
- const parsed = parseKeyValueXml(rawResponse) ??
672
- parseJSONObjectFromText(rawResponse);
673
- if (!parsed) {
674
- return {
675
- subaction: null,
676
- queries: [],
677
- shouldAct: null,
678
- };
679
- }
680
- // Extract queries from multiple possible shapes:
681
- // - TOON string: "from:john || subject:report" (split on ||)
682
- // - TOON single: "from:john" (no delimiter)
683
- // - JSON array: ["from:john", "subject:report"]
684
- // - Numbered fallbacks: query1, query2, query3
685
- const rawQueries = [];
686
- if (typeof parsed.queries === "string" && parsed.queries.trim().length > 0) {
687
- // TOON path: split on || delimiter
688
- for (const q of parsed.queries.split(/\s*\|\|\s*/)) {
689
- if (q.trim().length > 0)
690
- rawQueries.push(q.trim());
691
- }
692
- }
693
- else if (Array.isArray(parsed.queries)) {
694
- // JSON path: array of strings
695
- for (const value of parsed.queries) {
696
- if (typeof value === "string")
697
- rawQueries.push(value);
698
- }
699
- }
700
- if (typeof parsed.query === "string")
701
- rawQueries.push(parsed.query);
702
- if (typeof parsed.query1 === "string")
703
- rawQueries.push(parsed.query1);
704
- if (typeof parsed.query2 === "string")
705
- rawQueries.push(parsed.query2);
706
- if (typeof parsed.query3 === "string")
707
- rawQueries.push(parsed.query3);
708
- return {
709
- subaction: normalizeGmailSubaction(parsed.subaction),
710
- queries: dedupeQueries(rawQueries),
711
- response: normalizePlannerResponse(parsed.response),
712
- shouldAct: normalizeShouldAct(parsed.shouldAct),
713
- messageId: typeof parsed.messageId === "string" && parsed.messageId.trim().length > 0
714
- ? parsed.messageId.trim()
715
- : undefined,
716
- replyNeededOnly: normalizeOptionalBoolean(parsed.replyNeededOnly),
717
- to: normalizePlannerStringArray(parsed.to ?? parsed.recipients),
718
- cc: normalizePlannerStringArray(parsed.cc),
719
- bcc: normalizePlannerStringArray(parsed.bcc),
720
- subject: normalizePlannerString(parsed.subject),
721
- bodyText: normalizePlannerString(parsed.bodyText ?? parsed.body),
722
- };
723
- }
724
- async function recoverSendMessagePlanWithLlm(args) {
725
- const { runtime, message, state, intent, currentPlan, activeDraft, previousSentDraft, } = args;
726
- if (typeof runtime.useModel !== "function") {
727
- return null;
728
- }
729
- const recentConversation = (await collectGmailConversationContext({ runtime, message, state })).join("\n");
730
- const currentMessage = messageText(message).trim();
731
- const prompt = [
732
- "Extract or recover the Gmail compose draft for this conversation.",
733
- "The user may speak in any language.",
734
- "This is only for brand-new outbound emails, not replies to an existing thread.",
735
- "There may be no existing compose draft yet. Start a new draft from the current user message whenever they are trying to send a brand-new email.",
736
- "Use the current user message as the source of truth for any new or overridden compose fields.",
737
- "Preserve already-established compose fields unless the current user message clearly overrides them.",
738
- "If the current user only gives part of the email, keep any extracted fields and leave the rest empty.",
739
- "Return shouldResume=true whenever the conversation is still actively composing a brand-new outbound email, even if recipient, subject, or body is still missing.",
740
- "When there is an active pending compose draft, keep its recipient, cc, bcc, subject, and body unless the user changes them.",
741
- "When the user says something like 'same as the last email', reuse subject/body/cc/bcc from the most recent completed outbound email, but keep the active draft recipient unless the user changes it.",
742
- "When a recipient is already known and the user gives a single short payload like send an email like 'test', treat that payload as the body text and, if subject is still missing, use the same short payload as the minimal subject.",
743
- "Keep the subject and body in the user's language unless the user explicitly asks to translate or switch languages.",
744
- "If the user is only pausing, thinking, or not ready yet, set shouldResume=false and do not invent missing fields.",
745
- "If the user cancels the email, set cancelled=true and shouldResume=false.",
746
- "",
747
- "Return ONLY XML with exactly these tags and nothing else.",
748
- "Use || between multiple addresses inside to, cc, or bcc.",
749
- "<shouldResume>true|false</shouldResume>",
750
- "<cancelled>true|false</cancelled>",
751
- "<response></response>",
752
- "<to></to>",
753
- "<cc></cc>",
754
- "<bcc></bcc>",
755
- "<subject></subject>",
756
- "<bodyText></bodyText>",
757
- "",
758
- "Examples:",
759
- ' current message: "send an email to zo@iqlabs.dev the subject should say hello anon and the body should say how are you doing today?"',
760
- " <shouldResume>true</shouldResume><cancelled>false</cancelled><to>zo@iqlabs.dev</to><subject>hello anon</subject><bodyText>how are you doing today?</bodyText>",
761
- ' current message: "send it to shawmakesmagic@gmail.com this time"',
762
- " <shouldResume>true</shouldResume><cancelled>false</cancelled><to>shawmakesmagic@gmail.com</to>",
763
- ' active draft recipient: ["shawmakesmagic@gmail.com"], current message: "send an email like \\"test\\""',
764
- " <shouldResume>true</shouldResume><cancelled>false</cancelled><to>shawmakesmagic@gmail.com</to><subject>test</subject><bodyText>test</bodyText>",
765
- ' active draft recipient: ["shawmakesmagic@gmail.com"], previous sent subject/body: "Quick test" / "test", current message: "same as the last email"',
766
- " <shouldResume>true</shouldResume><cancelled>false</cancelled><to>shawmakesmagic@gmail.com</to><subject>Quick test</subject><bodyText>test</bodyText>",
767
- ' current message: "enviale un correo a maria@example.com con asunto hola y cuerpo nos vemos manana"',
768
- " <shouldResume>true</shouldResume><cancelled>false</cancelled><to>maria@example.com</to><subject>hola</subject><bodyText>nos vemos manana</bodyText>",
769
- `Current user message: ${JSON.stringify(currentMessage)}`,
770
- `Resolved intent: ${JSON.stringify(intent)}`,
771
- `Current Gmail planner draft: ${JSON.stringify({
772
- to: currentPlan.to,
773
- cc: currentPlan.cc,
774
- bcc: currentPlan.bcc,
775
- subject: currentPlan.subject,
776
- bodyText: currentPlan.bodyText,
777
- response: currentPlan.response,
778
- shouldAct: currentPlan.shouldAct,
779
- subaction: currentPlan.subaction,
780
- })}`,
781
- `Active pending compose draft: ${JSON.stringify(activeDraft ?? null)}`,
782
- `Most recent completed outbound email draft: ${JSON.stringify(previousSentDraft ?? null)}`,
783
- `Recent conversation: ${JSON.stringify(recentConversation)}`,
784
- ].join("\n");
785
- let rawResponse = "";
786
- try {
787
- const result = await runtime.useModel(ModelType.TEXT_LARGE, { prompt });
788
- rawResponse = typeof result === "string" ? result : "";
789
- }
790
- catch (error) {
791
- runtime.logger?.warn?.({
792
- src: "action:gmail",
793
- error: error instanceof Error ? error.message : String(error),
794
- }, "Gmail compose recovery model call failed");
795
- return null;
796
- }
797
- const parsed = parseKeyValueXml(rawResponse) ??
798
- parseJSONObjectFromText(rawResponse);
799
- if (!parsed) {
800
- return null;
801
- }
802
- return {
803
- shouldResume: normalizeOptionalBoolean(parsed.shouldResume),
804
- cancelled: normalizeOptionalBoolean(parsed.cancelled),
805
- response: normalizePlannerResponse(parsed.response),
806
- to: normalizePlannerStringArray(parsed.to ?? parsed.recipients),
807
- cc: normalizePlannerStringArray(parsed.cc),
808
- bcc: normalizePlannerStringArray(parsed.bcc),
809
- subject: normalizePlannerString(parsed.subject),
810
- bodyText: normalizePlannerString(parsed.bodyText ?? parsed.body),
811
- };
812
- }
813
- function resolveGmailSearchQueries(explicitQueries, llmPlan) {
814
- return dedupeQueries([...explicitQueries, ...(llmPlan?.queries ?? [])]);
815
- }
816
- function buildGmailSearchPlan(args) {
817
- const queries = dedupeQueries(args.queries);
818
- if (queries.length === 0) {
819
- return null;
820
- }
821
- return {
822
- queries,
823
- displayQuery: queries[0],
824
- };
825
- }
826
- async function resolveGmailTargetMessage(args) {
827
- const resolvedQueries = resolveGmailSearchQueries([
828
- ...args.explicitQueryArray,
829
- args.paramsQuery,
830
- detailString(args.details, "query"),
831
- ], args.llmPlan);
832
- const searchPlan = buildGmailSearchPlan({
833
- queries: resolvedQueries,
834
- });
835
- if (!searchPlan) {
836
- return { kind: "missing" };
837
- }
838
- const requestBase = {
839
- mode: detailString(args.details, "mode"),
840
- side: detailString(args.details, "side"),
841
- forceSync: detailBoolean(args.details, "forceSync"),
842
- maxResults: detailNumber(args.details, "maxResults") ?? 10,
843
- replyNeededOnly: detailBoolean(args.details, "replyNeededOnly") ??
844
- args.llmPlan.replyNeededOnly ??
845
- false,
846
- };
847
- for (const query of searchPlan.queries) {
848
- const feed = await args.service.getGmailSearch(INTERNAL_URL, {
849
- ...requestBase,
850
- query,
851
- });
852
- if (feed.messages.length === 0) {
853
- continue;
854
- }
855
- const displayFeed = feed.query === searchPlan.displayQuery
856
- ? feed
857
- : {
858
- ...feed,
859
- query: searchPlan.displayQuery,
860
- };
861
- if (feed.messages.length > 1) {
862
- return {
863
- kind: "ambiguous",
864
- feed: displayFeed,
865
- displayQuery: searchPlan.displayQuery,
866
- };
867
- }
868
- const message = feed.messages[0];
869
- return message
870
- ? {
871
- kind: "resolved",
872
- target: {
873
- messageId: message.id,
874
- subject: message.subject,
875
- from: message.from,
876
- query: searchPlan.displayQuery,
877
- },
878
- }
879
- : { kind: "missing" };
880
- }
881
- return { kind: "missing" };
882
- }
883
- function normalizeBatchSendItems(details) {
884
- const items = detailArray(details, "items");
885
- if (!items) {
886
- return undefined;
887
- }
888
- const normalized = items
889
- .map((item) => {
890
- if (!item || typeof item !== "object" || Array.isArray(item)) {
891
- return null;
892
- }
893
- const record = item;
894
- const messageId = typeof record.messageId === "string" &&
895
- record.messageId.trim().length > 0
896
- ? record.messageId.trim()
897
- : null;
898
- const bodyText = typeof record.bodyText === "string" && record.bodyText.trim().length > 0
899
- ? record.bodyText.trim()
900
- : null;
901
- if (!messageId || !bodyText) {
902
- return null;
903
- }
904
- const normalized = {
905
- messageId,
906
- bodyText,
907
- subject: typeof record.subject === "string" && record.subject.trim().length > 0
908
- ? record.subject.trim()
909
- : undefined,
910
- to: normalizeStringArray(record.to),
911
- cc: normalizeStringArray(record.cc),
912
- };
913
- return normalized;
914
- })
915
- .filter((item) => item !== null);
916
- return normalized.length > 0 ? normalized : undefined;
917
- }
918
- // `suppressPostActionContinuation` is a local feature flag the runtime
919
- // reads via a wider Action shape than the npm `@elizaos/core@alpha`
920
- // dist-tag's exported type — the published type hasn't caught up yet
921
- // so tsc rejects the property when compiled against node_modules on CI
922
- // (local resolves via paths map to the newer eliza/ source and accepts
923
- // it natively).
924
- //
925
- // We used to end this declaration with
926
- // `} satisfies Action & { suppressPostActionContinuation?: boolean }`,
927
- // but `satisfies` keeps the inferred literal type on the `const`. When
928
- // the Docker CI Smoke build walks `packages/agent` with
929
- // `declaration: true`, TypeScript tries to emit a portable `.d.ts`
930
- // and fails with TS2742 because the inferred literal transitively
931
- // references `@bufbuild/protobuf` types that are not in this package's
932
- // direct dependency graph. An explicit type annotation on the binding
933
- // makes `gmailAction` widen to the declared type, so tsc only has to
934
- // emit the (portable) declared shape in the `.d.ts`.
935
- export const gmailAction = {
936
- name: "GMAIL_ACTION",
937
- similes: [
938
- "GMAIL",
939
- "CHECK_EMAIL",
940
- "EMAIL_TRIAGE",
941
- "SEARCH_EMAIL",
942
- "DRAFT_EMAIL_REPLY",
943
- "SEND_EMAIL_REPLY",
944
- ],
945
- description: "Interact with Gmail through LifeOps. " +
946
- "USE this action for: inbox triage and unread summaries; searching emails by sender, subject, keyword, date, or label; " +
947
- "reading full email bodies by message ID; checking which emails need a reply; " +
948
- "drafting reply text for one or more emails; sending confirmed replies. " +
949
- "DO NOT use this action for calendar events, meetings, or scheduling — use CALENDAR_ACTION instead. " +
950
- "DO NOT use this action for personal habits, goals, routines, or reminders — use LIFE instead. " +
951
- "This action provides the final grounded reply; do not pair it with a speculative REPLY action.",
952
- suppressPostActionContinuation: true,
953
- validate: async (runtime, message, state) => {
954
- if (!(await hasLifeOpsAccess(runtime, message)))
955
- return false;
956
- return hasContextSignalForKey(runtime, message, state, "gmail", {
957
- contextLimit: GMAIL_CONTEXT_WINDOW,
958
- });
959
- },
960
- handler: async (runtime, message, state, options, callback) => {
961
- if (!(await hasLifeOpsAccess(runtime, message))) {
962
- const fallback = "Gmail actions are restricted to the owner, explicitly granted users, and the agent.";
963
- return {
964
- success: false,
965
- text: await renderGmailActionReply({
966
- runtime,
967
- message,
968
- state,
969
- intent: messageText(message).trim(),
970
- scenario: "access_denied",
971
- fallback,
972
- }),
973
- };
974
- }
975
- const rawParams = options?.parameters;
976
- const params = rawParams ?? {};
977
- const details = normalizeGmailDetails(params.details);
978
- const explicitSubaction = normalizeGmailSubaction(params.subaction);
979
- const intent = normalizePlannerString(params.intent) ?? messageText(message).trim();
980
- const activeComposeDraft = latestGmailComposeDraft(state, [
981
- "pending_clarification",
982
- ]);
983
- const previousSentComposeDraft = latestGmailComposeDraft(state, ["sent"]);
984
- const llmPlan = await extractGmailPlanWithLlm(runtime, message, state, intent, activeComposeDraft);
985
- const latestReplyDraft = latestGmailReplyDraftContext(state);
986
- const latestMessageTarget = latestGmailMessageTargetContext(state);
987
- const latestBatchReplyDraftItems = latestGmailBatchReplyDraftItems(state);
988
- const hasStructuredComposeSignal = Boolean(params.bodyText ||
989
- detailString(details, "bodyText") ||
990
- detailString(details, "subject") ||
991
- (normalizeStringArray(details?.to)?.length ?? 0) > 0 ||
992
- (normalizeStringArray(details?.cc)?.length ?? 0) > 0 ||
993
- (normalizeStringArray(details?.bcc)?.length ?? 0) > 0 ||
994
- (llmPlan.to?.length ?? 0) > 0 ||
995
- (llmPlan.cc?.length ?? 0) > 0 ||
996
- (llmPlan.bcc?.length ?? 0) > 0 ||
997
- Boolean(llmPlan.subject) ||
998
- Boolean(llmPlan.bodyText));
999
- const hasReplyOrBatchTarget = Boolean(params.messageId ||
1000
- detailString(details, "messageId") ||
1001
- detailArray(details, "items") ||
1002
- (normalizeStringArray(details?.messageIds)?.length ?? 0) > 0);
1003
- const shouldAttemptComposeRecovery = !hasReplyOrBatchTarget &&
1004
- (Boolean(activeComposeDraft || previousSentComposeDraft) ||
1005
- llmPlan.subaction === "send_message" ||
1006
- llmPlan.subaction === null ||
1007
- explicitSubaction === "send_message" ||
1008
- hasStructuredComposeSignal);
1009
- const composeRecoveryPlan = shouldAttemptComposeRecovery
1010
- ? await recoverSendMessagePlanWithLlm({
1011
- runtime,
1012
- message,
1013
- state,
1014
- intent,
1015
- currentPlan: llmPlan,
1016
- activeDraft: activeComposeDraft,
1017
- previousSentDraft: previousSentComposeDraft,
1018
- })
1019
- : null;
1020
- const composeRecoveryActivated = composeRecoveryPlan?.shouldResume === true;
1021
- const resolvedComposeDraft = mergeComposeDrafts(previousSentComposeDraft ?? undefined, activeComposeDraft ?? undefined, {
1022
- subaction: "send_message",
1023
- status: "pending_clarification",
1024
- intent,
1025
- to: llmPlan.to,
1026
- cc: llmPlan.cc,
1027
- bcc: llmPlan.bcc,
1028
- subject: llmPlan.subject,
1029
- bodyText: llmPlan.bodyText,
1030
- }, composeRecoveryPlan ?? undefined);
1031
- const explicitQueryArray = [
1032
- ...(params.queries ?? []),
1033
- ...(normalizeQueryStringArray(details?.queries) ?? []),
1034
- ];
1035
- const hasExplicitGmailExecutionInput = Boolean(explicitSubaction ||
1036
- params.query ||
1037
- explicitQueryArray.length > 0 ||
1038
- params.messageId ||
1039
- detailString(details, "messageId") ||
1040
- params.bodyText ||
1041
- detailString(details, "bodyText") ||
1042
- (normalizeStringArray(details?.to)?.length ?? 0) > 0 ||
1043
- (normalizeStringArray(details?.cc)?.length ?? 0) > 0 ||
1044
- (normalizeStringArray(details?.bcc)?.length ?? 0) > 0 ||
1045
- detailString(details, "subject"));
1046
- let subaction = explicitSubaction ?? llmPlan.subaction;
1047
- const currentMessageText = messageText(message).trim();
1048
- const composeRecipients = normalizeStringArray(details?.to) ??
1049
- resolvedComposeDraft.to ??
1050
- llmPlan.to ??
1051
- [];
1052
- const hasComposeRecipients = composeRecipients.length > 0;
1053
- const hasComposeContent = Boolean(params.bodyText ||
1054
- detailString(details, "bodyText") ||
1055
- resolvedComposeDraft.bodyText ||
1056
- llmPlan.bodyText ||
1057
- detailString(details, "subject") ||
1058
- resolvedComposeDraft.subject ||
1059
- llmPlan.subject);
1060
- if (!explicitSubaction && composeRecoveryActivated) {
1061
- subaction = "send_message";
1062
- }
1063
- if (!explicitSubaction &&
1064
- !subaction &&
1065
- latestReplyDraft &&
1066
- looksLikeReplyDraftRewriteFollowup(currentMessageText)) {
1067
- subaction = "draft_reply";
1068
- }
1069
- if (!explicitSubaction &&
1070
- !subaction &&
1071
- latestReplyDraft &&
1072
- looksLikeSendReplyFollowup(currentMessageText)) {
1073
- subaction = "send_reply";
1074
- }
1075
- if (!subaction &&
1076
- !params.messageId &&
1077
- !detailString(details, "messageId") &&
1078
- !detailArray(details, "items") &&
1079
- (hasComposeRecipients || hasStructuredComposeSignal) &&
1080
- hasComposeContent) {
1081
- subaction = "send_message";
1082
- }
1083
- runtime.logger?.debug?.({
1084
- src: "action:gmail",
1085
- subaction,
1086
- rawMessage: messageText(message).slice(0, 200),
1087
- resolvedIntent: intent.slice(0, 200),
1088
- params: {
1089
- subaction: params.subaction,
1090
- query: params.query,
1091
- messageId: params.messageId,
1092
- bodyText: params.bodyText?.slice(0, 100),
1093
- },
1094
- detailKeys: details ? Object.keys(details) : [],
1095
- detailToType: typeof details?.to,
1096
- detailSubject: typeof details?.subject === "string" ? details.subject : undefined,
1097
- }, "gmail action dispatch");
1098
- const service = new LifeOpsService(runtime);
1099
- const respond = async (payload) => {
1100
- await callback?.({
1101
- text: payload.text,
1102
- source: "action",
1103
- action: "GMAIL_ACTION",
1104
- });
1105
- return payload;
1106
- };
1107
- const renderReply = (scenario, fallback, context) => renderGmailActionReply({
1108
- runtime,
1109
- message,
1110
- state,
1111
- intent,
1112
- scenario,
1113
- fallback,
1114
- context,
1115
- });
1116
- if (composeRecoveryPlan?.cancelled) {
1117
- return respond({
1118
- success: true,
1119
- text: await renderReply("cancel_send_message", composeRecoveryPlan.response ?? "Okay, I won't send that email.", {
1120
- composeRecoveryPlan,
1121
- activeComposeDraft,
1122
- }),
1123
- data: {
1124
- noop: true,
1125
- },
1126
- });
1127
- }
1128
- if (!subaction &&
1129
- !composeRecoveryActivated &&
1130
- !hasExplicitGmailExecutionInput) {
1131
- const fallback = composeRecoveryPlan?.response ??
1132
- llmPlan.response ??
1133
- buildGmailReplyOnlyFallback(llmPlan.subaction);
1134
- return respond({
1135
- success: true,
1136
- text: await renderReply("reply_only", fallback, {
1137
- llmPlan,
1138
- composeRecoveryPlan,
1139
- suggestedSubaction: llmPlan.subaction,
1140
- }),
1141
- data: {
1142
- noop: true,
1143
- ...(llmPlan.subaction
1144
- ? { suggestedSubaction: llmPlan.subaction }
1145
- : {}),
1146
- },
1147
- });
1148
- }
1149
- if (!subaction) {
1150
- const fallback = llmPlan.response ??
1151
- composeRecoveryPlan?.response ??
1152
- buildGmailReplyOnlyFallback(llmPlan.subaction);
1153
- return respond({
1154
- success: false,
1155
- text: await renderReply("clarify_gmail_request", fallback, {
1156
- llmPlan,
1157
- composeRecoveryPlan,
1158
- }),
1159
- data: {
1160
- noop: true,
1161
- },
1162
- });
1163
- }
1164
- try {
1165
- const google = await getGoogleCapabilityStatus(service);
1166
- if (subaction === "send_reply" ||
1167
- subaction === "send_batch_replies" ||
1168
- subaction === "send_message") {
1169
- if (!google.hasGmailSend) {
1170
- return respond({
1171
- success: false,
1172
- text: await renderReply("gmail_send_unavailable", gmailSendUnavailableMessage(google), {
1173
- subaction,
1174
- google,
1175
- }),
1176
- });
1177
- }
1178
- }
1179
- else if (!google.hasGmailTriage) {
1180
- return respond({
1181
- success: false,
1182
- text: await renderReply("gmail_read_unavailable", gmailReadUnavailableMessage(google), {
1183
- subaction,
1184
- google,
1185
- }),
1186
- });
1187
- }
1188
- if (subaction === "triage") {
1189
- const feed = await service.getGmailTriage(INTERNAL_URL, {
1190
- mode: detailString(details, "mode"),
1191
- side: detailString(details, "side"),
1192
- forceSync: detailBoolean(details, "forceSync"),
1193
- maxResults: detailNumber(details, "maxResults") ?? 10,
1194
- });
1195
- const fallback = formatEmailTriage(feed);
1196
- return respond({
1197
- success: true,
1198
- text: await renderReply("triage_results", fallback, {
1199
- summary: feed.summary,
1200
- messages: feed.messages,
1201
- }),
1202
- data: toActionData(feed),
1203
- });
1204
- }
1205
- if (subaction === "needs_response") {
1206
- const feed = await service.getGmailNeedsResponse(INTERNAL_URL, {
1207
- mode: detailString(details, "mode"),
1208
- side: detailString(details, "side"),
1209
- forceSync: detailBoolean(details, "forceSync"),
1210
- maxResults: detailNumber(details, "maxResults") ?? 10,
1211
- });
1212
- const fallback = formatEmailNeedsResponse(feed);
1213
- return respond({
1214
- success: true,
1215
- text: await renderReply("needs_response_results", fallback, {
1216
- summary: feed.summary,
1217
- messages: feed.messages,
1218
- }),
1219
- data: toActionData(feed),
1220
- });
1221
- }
1222
- if (subaction === "search") {
1223
- const resolvedQueries = resolveGmailSearchQueries([...explicitQueryArray, params.query, detailString(details, "query")], llmPlan);
1224
- const searchPlan = buildGmailSearchPlan({
1225
- queries: resolvedQueries,
1226
- });
1227
- if (!searchPlan) {
1228
- return respond({
1229
- success: false,
1230
- text: await renderReply("clarify_search_target", "I need a sender, subject, keyword, or email search target to run that Gmail search.", {
1231
- missing: ["search target"],
1232
- }),
1233
- });
1234
- }
1235
- const requestBase = {
1236
- mode: detailString(details, "mode"),
1237
- side: detailString(details, "side"),
1238
- forceSync: detailBoolean(details, "forceSync"),
1239
- maxResults: detailNumber(details, "maxResults") ?? 10,
1240
- replyNeededOnly: detailBoolean(details, "replyNeededOnly") ??
1241
- llmPlan.replyNeededOnly ??
1242
- false,
1243
- };
1244
- let feed = await service.getGmailSearch(INTERNAL_URL, {
1245
- ...requestBase,
1246
- query: searchPlan.queries[0] ?? searchPlan.displayQuery,
1247
- });
1248
- for (const query of searchPlan.queries.slice(1)) {
1249
- if (feed.messages.length > 0) {
1250
- break;
1251
- }
1252
- feed = await service.getGmailSearch(INTERNAL_URL, {
1253
- ...requestBase,
1254
- query,
1255
- });
1256
- }
1257
- const displayFeed = feed.query === searchPlan.displayQuery
1258
- ? feed
1259
- : {
1260
- ...feed,
1261
- query: searchPlan.displayQuery,
1262
- };
1263
- const fallback = formatEmailSearch(displayFeed);
1264
- return respond({
1265
- success: true,
1266
- text: await renderReply("search_results", fallback, {
1267
- query: displayFeed.query,
1268
- messages: displayFeed.messages,
1269
- }),
1270
- data: toActionData(displayFeed),
1271
- });
1272
- }
1273
- if (subaction === "read") {
1274
- const messageId = params.messageId ??
1275
- detailString(details, "messageId") ??
1276
- llmPlan.messageId ??
1277
- latestMessageTarget?.messageId ??
1278
- latestReplyDraft?.messageId;
1279
- if (messageId) {
1280
- const result = await service.readGmailMessage(INTERNAL_URL, {
1281
- mode: detailString(details, "mode"),
1282
- side: detailString(details, "side"),
1283
- forceSync: detailBoolean(details, "forceSync"),
1284
- messageId,
1285
- });
1286
- const fallback = formatEmailRead(result);
1287
- return respond({
1288
- success: true,
1289
- text: await renderReply("read_result", fallback, {
1290
- message: result,
1291
- }),
1292
- data: toActionData(result),
1293
- });
1294
- }
1295
- const resolvedTarget = await resolveGmailTargetMessage({
1296
- service,
1297
- details,
1298
- explicitQueryArray,
1299
- paramsQuery: params.query,
1300
- llmPlan,
1301
- });
1302
- if (resolvedTarget.kind === "missing") {
1303
- return respond({
1304
- success: false,
1305
- text: await renderReply("clarify_read_target", "I need to know which email to read. Give me a sender, subject, keyword, or specific message id.", {
1306
- missing: ["message target"],
1307
- }),
1308
- });
1309
- }
1310
- if (resolvedTarget.kind === "ambiguous") {
1311
- const fallback = buildGmailTargetDisambiguationFallback(resolvedTarget.feed);
1312
- return respond({
1313
- success: false,
1314
- text: await renderReply("clarify_read_target", fallback, {
1315
- query: resolvedTarget.displayQuery,
1316
- messages: resolvedTarget.feed.messages,
1317
- }),
1318
- });
1319
- }
1320
- const result = await service.readGmailMessage(INTERNAL_URL, {
1321
- mode: detailString(details, "mode"),
1322
- side: detailString(details, "side"),
1323
- forceSync: detailBoolean(details, "forceSync"),
1324
- messageId: resolvedTarget.target.messageId,
1325
- });
1326
- const displayResult = {
1327
- ...result,
1328
- query: resolvedTarget.target.query ?? result.query,
1329
- };
1330
- const fallback = formatEmailRead(displayResult);
1331
- return respond({
1332
- success: true,
1333
- text: await renderReply("read_result", fallback, {
1334
- message: displayResult,
1335
- }),
1336
- data: toActionData(displayResult),
1337
- });
1338
- }
1339
- if (subaction === "draft_reply") {
1340
- let messageId = params.messageId ??
1341
- detailString(details, "messageId") ??
1342
- llmPlan.messageId ??
1343
- latestMessageTarget?.messageId ??
1344
- latestReplyDraft?.messageId;
1345
- if (!messageId) {
1346
- const resolvedTarget = await resolveGmailTargetMessage({
1347
- service,
1348
- details,
1349
- explicitQueryArray,
1350
- paramsQuery: params.query,
1351
- llmPlan,
1352
- });
1353
- if (resolvedTarget.kind === "ambiguous") {
1354
- const fallback = buildGmailTargetDisambiguationFallback(resolvedTarget.feed);
1355
- return respond({
1356
- success: false,
1357
- text: await renderReply("clarify_draft_reply_target", fallback, {
1358
- query: resolvedTarget.displayQuery,
1359
- messages: resolvedTarget.feed.messages,
1360
- }),
1361
- });
1362
- }
1363
- messageId =
1364
- resolvedTarget.kind === "resolved"
1365
- ? resolvedTarget.target.messageId
1366
- : undefined;
1367
- if (!messageId) {
1368
- return respond({
1369
- success: false,
1370
- text: await renderReply("clarify_draft_reply_target", "Which email do you want me to draft a reply for?", {
1371
- missing: ["message target"],
1372
- latestMessageTarget,
1373
- latestReplyDraft,
1374
- }),
1375
- });
1376
- }
1377
- }
1378
- const draftGenerationContext = await buildGmailDraftGenerationContext({
1379
- runtime,
1380
- message,
1381
- state,
1382
- });
1383
- const draft = await service.createGmailReplyDraft(INTERNAL_URL, {
1384
- mode: detailString(details, "mode"),
1385
- side: detailString(details, "side"),
1386
- messageId,
1387
- tone: detailString(details, "tone"),
1388
- intent: detailString(details, "draftIntent") ??
1389
- detailString(details, "intent") ??
1390
- intent,
1391
- includeQuotedOriginal: detailBoolean(details, "includeQuotedOriginal"),
1392
- ...draftGenerationContext,
1393
- });
1394
- const fallback = formatGmailReplyDraft(draft);
1395
- return respond({
1396
- success: true,
1397
- text: await renderReply("draft_reply", fallback, {
1398
- draft,
1399
- }),
1400
- data: toActionData({
1401
- ...draft,
1402
- gmailDraft: draft,
1403
- gmailMessage: {
1404
- messageId: draft.messageId,
1405
- subject: draft.subject,
1406
- query: latestMessageTarget?.query,
1407
- },
1408
- }),
1409
- });
1410
- }
1411
- if (subaction === "draft_batch_replies") {
1412
- const batchSearchQueries = (normalizeStringArray(details?.messageIds)?.length ?? 0)
1413
- ? []
1414
- : resolveGmailSearchQueries([
1415
- ...explicitQueryArray,
1416
- params.query,
1417
- detailString(details, "query"),
1418
- ], llmPlan);
1419
- const draftGenerationContext = await buildGmailDraftGenerationContext({
1420
- runtime,
1421
- message,
1422
- state,
1423
- });
1424
- const request = {
1425
- mode: detailString(details, "mode"),
1426
- side: detailString(details, "side"),
1427
- forceSync: detailBoolean(details, "forceSync"),
1428
- maxResults: detailNumber(details, "maxResults") ?? 10,
1429
- query: batchSearchQueries[0],
1430
- messageIds: normalizeStringArray(details?.messageIds),
1431
- tone: detailString(details, "tone"),
1432
- intent: detailString(details, "draftIntent") ??
1433
- detailString(details, "intent") ??
1434
- intent,
1435
- includeQuotedOriginal: detailBoolean(details, "includeQuotedOriginal"),
1436
- replyNeededOnly: detailBoolean(details, "replyNeededOnly") ??
1437
- llmPlan.replyNeededOnly ??
1438
- false,
1439
- ...draftGenerationContext,
1440
- };
1441
- const batch = await service.createGmailBatchReplyDrafts(INTERNAL_URL, request);
1442
- const fallback = formatGmailBatchReplyDrafts(batch);
1443
- return respond({
1444
- success: true,
1445
- text: await renderReply("draft_batch_replies", fallback, {
1446
- batch,
1447
- }),
1448
- data: toActionData(batch),
1449
- });
1450
- }
1451
- if (subaction === "send_reply") {
1452
- let messageId = params.messageId ??
1453
- detailString(details, "messageId") ??
1454
- llmPlan.messageId ??
1455
- latestReplyDraft?.messageId ??
1456
- latestMessageTarget?.messageId;
1457
- if (!messageId) {
1458
- const resolvedTarget = await resolveGmailTargetMessage({
1459
- service,
1460
- details,
1461
- explicitQueryArray,
1462
- paramsQuery: params.query,
1463
- llmPlan,
1464
- });
1465
- if (resolvedTarget.kind === "ambiguous") {
1466
- const fallback = buildGmailTargetDisambiguationFallback(resolvedTarget.feed);
1467
- return respond({
1468
- success: false,
1469
- text: await renderReply("clarify_send_reply", fallback, {
1470
- query: resolvedTarget.displayQuery,
1471
- messages: resolvedTarget.feed.messages,
1472
- }),
1473
- });
1474
- }
1475
- messageId =
1476
- resolvedTarget.kind === "resolved"
1477
- ? resolvedTarget.target.messageId
1478
- : undefined;
1479
- }
1480
- const bodyText = params.bodyText ??
1481
- detailString(details, "bodyText") ??
1482
- latestReplyDraft?.bodyText;
1483
- if (!messageId || !bodyText) {
1484
- return respond({
1485
- success: false,
1486
- text: await renderReply("clarify_send_reply", "I need both the email you're replying to and the reply text before I can send it.", {
1487
- missing: [
1488
- ...(!messageId ? ["messageId"] : []),
1489
- ...(!bodyText ? ["bodyText"] : []),
1490
- ],
1491
- latestReplyDraft,
1492
- latestMessageTarget,
1493
- }),
1494
- });
1495
- }
1496
- const result = await service.sendGmailReply(INTERNAL_URL, {
1497
- mode: detailString(details, "mode"),
1498
- side: detailString(details, "side"),
1499
- messageId,
1500
- bodyText,
1501
- subject: detailString(details, "subject") ?? latestReplyDraft?.subject,
1502
- to: normalizeStringArray(details?.to) ?? latestReplyDraft?.to,
1503
- cc: normalizeStringArray(details?.cc) ?? latestReplyDraft?.cc,
1504
- confirmSend: detailBoolean(details, "confirmSend") ?? true,
1505
- });
1506
- const fallback = "Gmail reply sent.";
1507
- return respond({
1508
- success: true,
1509
- text: await renderReply("sent_reply", fallback, {
1510
- result,
1511
- messageId,
1512
- }),
1513
- data: toActionData(result),
1514
- });
1515
- }
1516
- if (subaction === "send_message") {
1517
- const to = normalizeStringArray(details?.to) ??
1518
- resolvedComposeDraft.to ??
1519
- llmPlan.to ??
1520
- [];
1521
- const cc = normalizeStringArray(details?.cc) ?? resolvedComposeDraft.cc;
1522
- const bcc = normalizeStringArray(details?.bcc) ?? resolvedComposeDraft.bcc;
1523
- const subject = detailString(details, "subject") ?? resolvedComposeDraft.subject;
1524
- const bodyText = params.bodyText ??
1525
- detailString(details, "bodyText") ??
1526
- resolvedComposeDraft.bodyText;
1527
- const composeDraft = buildGmailComposeDraft({
1528
- status: "pending_clarification",
1529
- intent,
1530
- to,
1531
- cc,
1532
- bcc,
1533
- subject,
1534
- bodyText,
1535
- });
1536
- if (to.length === 0 || !subject || !bodyText) {
1537
- const missing = [];
1538
- if (to.length === 0)
1539
- missing.push("recipient address");
1540
- if (!subject)
1541
- missing.push("subject");
1542
- if (!bodyText)
1543
- missing.push("body text");
1544
- const fallback = `I need ${missing.join(", ")} to compose that email.`;
1545
- return respond({
1546
- success: false,
1547
- text: await renderReply("clarify_send_message", fallback, {
1548
- composeDraft,
1549
- missing,
1550
- }),
1551
- data: {
1552
- gmailDraft: composeDraft,
1553
- missing,
1554
- noop: true,
1555
- },
1556
- });
1557
- }
1558
- const result = await service.sendGmailMessage(INTERNAL_URL, {
1559
- mode: detailString(details, "mode"),
1560
- side: detailString(details, "side"),
1561
- to,
1562
- cc,
1563
- bcc,
1564
- subject,
1565
- bodyText,
1566
- confirmSend: detailBoolean(details, "confirmSend") ?? true,
1567
- });
1568
- const fallback = `sent to ${to.join(", ")}.`;
1569
- return respond({
1570
- success: true,
1571
- text: await renderReply("sent_message", fallback, {
1572
- result,
1573
- to,
1574
- subject,
1575
- }),
1576
- data: toActionData({
1577
- ...result,
1578
- gmailDraft: buildGmailComposeDraft({
1579
- status: "sent",
1580
- intent,
1581
- to,
1582
- cc,
1583
- bcc,
1584
- subject,
1585
- bodyText,
1586
- }),
1587
- }),
1588
- });
1589
- }
1590
- const items = normalizeBatchSendItems(details) ?? latestBatchReplyDraftItems;
1591
- if (!items) {
1592
- return respond({
1593
- success: false,
1594
- text: await renderReply("clarify_send_batch_replies", "I need the list of replies to send, with each email and its reply text.", {
1595
- missing: ["items"],
1596
- latestBatchReplyDraftItems,
1597
- }),
1598
- });
1599
- }
1600
- const result = await service.sendGmailReplies(INTERNAL_URL, {
1601
- mode: detailString(details, "mode"),
1602
- side: detailString(details, "side"),
1603
- confirmSend: detailBoolean(details, "confirmSend") ?? true,
1604
- items,
1605
- });
1606
- const fallback = `Sent ${result.sentCount} Gmail repl${result.sentCount === 1 ? "y" : "ies"}.`;
1607
- return respond({
1608
- success: true,
1609
- text: await renderReply("sent_batch_replies", fallback, {
1610
- result,
1611
- }),
1612
- data: toActionData(result),
1613
- });
1614
- }
1615
- catch (error) {
1616
- if (error instanceof LifeOpsServiceError) {
1617
- const fallback = buildGmailServiceErrorFallback(error);
1618
- return respond({
1619
- success: false,
1620
- text: await renderReply("service_error", fallback, {
1621
- status: error.status,
1622
- subaction,
1623
- }),
1624
- });
1625
- }
1626
- throw error;
1627
- }
1628
- },
1629
- parameters: [
1630
- {
1631
- name: "subaction",
1632
- description: "Gmail operation to run. Use triage, needs_response, search, read, draft_reply, draft_batch_replies, send_reply, send_batch_replies, or send_message (compose a brand-new outbound email).",
1633
- required: false,
1634
- schema: {
1635
- type: "string",
1636
- enum: [
1637
- "triage",
1638
- "needs_response",
1639
- "search",
1640
- "read",
1641
- "draft_reply",
1642
- "draft_batch_replies",
1643
- "send_reply",
1644
- "send_batch_replies",
1645
- "send_message",
1646
- ],
1647
- },
1648
- },
1649
- {
1650
- name: "intent",
1651
- description: 'Natural language Gmail request. Examples: "what emails need a reply", "search email for investor", "read the latest email from suran", "draft a reply to message 123".',
1652
- required: false,
1653
- schema: { type: "string" },
1654
- },
1655
- {
1656
- name: "query",
1657
- description: "Search query for Gmail search or batch draft selection. Use Gmail-style query fragments when helpful, such as from:suran, is:unread, newer_than:21d, subject:venue.",
1658
- required: false,
1659
- schema: { type: "string" },
1660
- },
1661
- {
1662
- name: "queries",
1663
- description: "Optional array of Gmail search queries to try in order when the planner has multiple good variants.",
1664
- required: false,
1665
- schema: { type: "array", items: { type: "string" } },
1666
- },
1667
- {
1668
- name: "messageId",
1669
- description: "Single Gmail message id for read, draft_reply, or send_reply operations.",
1670
- required: false,
1671
- schema: { type: "string" },
1672
- },
1673
- {
1674
- name: "bodyText",
1675
- description: "Reply body for send_reply.",
1676
- required: false,
1677
- schema: { type: "string" },
1678
- },
1679
- {
1680
- name: "details",
1681
- description: "Structured Gmail arguments. Supported keys include mode, side, forceSync, maxResults, query, queries, replyNeededOnly, tone, includeQuotedOriginal, messageId, messageIds, draftIntent, subject, to, cc, bodyText, confirmSend, and items for batch send.",
1682
- required: false,
1683
- schema: { type: "object" },
1684
- },
1685
- ],
1686
- examples: [
1687
- [
1688
- {
1689
- name: "{{name1}}",
1690
- content: { text: "Do I have any emails I need to reply to?" },
1691
- },
1692
- {
1693
- name: "{{agentName}}",
1694
- content: {
1695
- text: "Emails that likely need a reply: 3.\n- **Investor follow-up** from Jane Doe · 2h ago",
1696
- },
1697
- },
1698
- ],
1699
- [
1700
- {
1701
- name: "{{name1}}",
1702
- content: { text: "Search my email for OneBlade receipts." },
1703
- },
1704
- {
1705
- name: "{{agentName}}",
1706
- content: { text: 'Found 2 emails for "OneBlade receipts".' },
1707
- },
1708
- ],
1709
- [
1710
- {
1711
- name: "{{name1}}",
1712
- content: { text: "Read the latest email from Suran." },
1713
- },
1714
- {
1715
- name: "{{agentName}}",
1716
- content: {
1717
- text: "**Suran follow-up** from Suran Lee · 2d ago\n\nWanted to follow up on the last few weeks.",
1718
- },
1719
- },
1720
- ],
1721
- [
1722
- {
1723
- name: "{{name1}}",
1724
- content: {
1725
- text: "Draft a reply to message abc123 thanking them and saying next week works.",
1726
- },
1727
- },
1728
- {
1729
- name: "{{agentName}}",
1730
- content: { text: "Drafted reply for **Re: Scheduling**." },
1731
- },
1732
- ],
1733
- ],
1734
- };
1
+ export * from "@elizaos/app-lifeops/actions/gmail";