@elizaos/agent 2.0.0-alpha.173 → 2.0.0-alpha.192

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 (1393) hide show
  1. package/apps/app-companion/src/actions/emote.d.ts.map +1 -1
  2. package/apps/app-companion/src/actions/emote.js +1 -0
  3. package/apps/app-elizamaker/src/drop-routes.d.ts +22 -0
  4. package/apps/app-elizamaker/src/drop-routes.d.ts.map +1 -0
  5. package/apps/app-elizamaker/src/drop-service.d.ts +26 -0
  6. package/apps/app-elizamaker/src/drop-service.d.ts.map +1 -0
  7. package/apps/app-elizamaker/src/index.d.ts +8 -0
  8. package/apps/app-elizamaker/src/index.d.ts.map +1 -0
  9. package/apps/app-elizamaker/src/index.js +5 -0
  10. package/apps/app-elizamaker/src/merkle-tree.d.ts.map +1 -0
  11. package/apps/app-elizamaker/src/og-tracker.d.ts.map +1 -0
  12. package/apps/app-elizamaker/src/og-tracker.js +60 -0
  13. package/apps/app-elizamaker/src/twitter-verify.d.ts +25 -0
  14. package/apps/app-elizamaker/src/twitter-verify.d.ts.map +1 -0
  15. package/apps/app-elizamaker/src/twitter-verify.js +168 -0
  16. package/apps/app-lifeops/src/actions/activity-report.d.ts +13 -0
  17. package/apps/app-lifeops/src/actions/activity-report.d.ts.map +1 -0
  18. package/apps/app-lifeops/src/actions/activity-report.js +287 -0
  19. package/apps/app-lifeops/src/actions/app-blocker.d.ts +5 -0
  20. package/apps/app-lifeops/src/actions/app-blocker.d.ts.map +1 -0
  21. package/apps/app-lifeops/src/actions/app-blocker.js +446 -0
  22. package/apps/app-lifeops/src/actions/autofill.d.ts +35 -0
  23. package/apps/app-lifeops/src/actions/autofill.d.ts.map +1 -0
  24. package/apps/app-lifeops/src/actions/autofill.js +340 -0
  25. package/apps/app-lifeops/src/actions/browser-extension.d.ts +19 -0
  26. package/apps/app-lifeops/src/actions/browser-extension.d.ts.map +1 -0
  27. package/apps/app-lifeops/src/actions/browser-extension.js +88 -0
  28. package/apps/app-lifeops/src/actions/calendar.d.ts.map +1 -1
  29. package/apps/app-lifeops/src/actions/calendar.js +405 -973
  30. package/apps/app-lifeops/src/actions/calendly.d.ts +3 -0
  31. package/apps/app-lifeops/src/actions/calendly.d.ts.map +1 -0
  32. package/apps/app-lifeops/src/actions/calendly.js +242 -0
  33. package/apps/app-lifeops/src/actions/checkin.d.ts +4 -0
  34. package/apps/app-lifeops/src/actions/checkin.d.ts.map +1 -0
  35. package/apps/app-lifeops/src/actions/checkin.js +72 -0
  36. package/apps/app-lifeops/src/actions/computer-use.d.ts +14 -0
  37. package/apps/app-lifeops/src/actions/computer-use.d.ts.map +1 -0
  38. package/apps/app-lifeops/src/actions/computer-use.js +149 -0
  39. package/apps/app-lifeops/src/actions/cross-channel-send.d.ts +22 -0
  40. package/apps/app-lifeops/src/actions/cross-channel-send.d.ts.map +1 -0
  41. package/apps/app-lifeops/src/actions/cross-channel-send.js +562 -0
  42. package/apps/app-lifeops/src/actions/device-bus.d.ts +19 -0
  43. package/apps/app-lifeops/src/actions/device-bus.d.ts.map +1 -0
  44. package/apps/app-lifeops/src/actions/device-bus.js +233 -0
  45. package/apps/app-lifeops/src/actions/dossier.d.ts +5 -0
  46. package/apps/app-lifeops/src/actions/dossier.d.ts.map +1 -0
  47. package/apps/app-lifeops/src/actions/dossier.js +195 -0
  48. package/apps/app-lifeops/src/actions/gmail.d.ts.map +1 -1
  49. package/apps/app-lifeops/src/actions/gmail.js +73 -37
  50. package/apps/app-lifeops/src/actions/health.d.ts +9 -0
  51. package/apps/app-lifeops/src/actions/health.d.ts.map +1 -0
  52. package/apps/app-lifeops/src/actions/health.js +357 -0
  53. package/apps/app-lifeops/src/actions/inbox.d.ts +3 -1
  54. package/apps/app-lifeops/src/actions/inbox.d.ts.map +1 -1
  55. package/apps/app-lifeops/src/actions/inbox.js +279 -152
  56. package/apps/app-lifeops/src/actions/intent-sync.d.ts +3 -0
  57. package/apps/app-lifeops/src/actions/intent-sync.d.ts.map +1 -0
  58. package/apps/app-lifeops/src/actions/intent-sync.js +258 -0
  59. package/apps/app-lifeops/src/actions/life.d.ts +0 -4
  60. package/apps/app-lifeops/src/actions/life.d.ts.map +1 -1
  61. package/apps/app-lifeops/src/actions/life.js +162 -249
  62. package/apps/app-lifeops/src/actions/lifeops-google-helpers.d.ts.map +1 -1
  63. package/apps/app-lifeops/src/actions/lifeops-google-helpers.js +11 -3
  64. package/apps/app-lifeops/src/actions/list-remote-sessions.d.ts +6 -0
  65. package/apps/app-lifeops/src/actions/list-remote-sessions.d.ts.map +1 -0
  66. package/apps/app-lifeops/src/actions/list-remote-sessions.js +45 -0
  67. package/apps/app-lifeops/src/actions/password-manager.d.ts +3 -0
  68. package/apps/app-lifeops/src/actions/password-manager.d.ts.map +1 -0
  69. package/apps/app-lifeops/src/actions/password-manager.js +182 -0
  70. package/apps/app-lifeops/src/actions/relationships.d.ts +9 -0
  71. package/apps/app-lifeops/src/actions/relationships.d.ts.map +1 -0
  72. package/apps/app-lifeops/src/actions/relationships.js +504 -0
  73. package/apps/app-lifeops/src/actions/remote-desktop.d.ts +3 -0
  74. package/apps/app-lifeops/src/actions/remote-desktop.d.ts.map +1 -0
  75. package/apps/app-lifeops/src/actions/remote-desktop.js +244 -0
  76. package/apps/app-lifeops/src/actions/revoke-remote-session.d.ts +6 -0
  77. package/apps/app-lifeops/src/actions/revoke-remote-session.d.ts.map +1 -0
  78. package/apps/app-lifeops/src/actions/revoke-remote-session.js +73 -0
  79. package/apps/app-lifeops/src/actions/scheduling.d.ts +55 -0
  80. package/apps/app-lifeops/src/actions/scheduling.d.ts.map +1 -0
  81. package/apps/app-lifeops/src/actions/scheduling.js +914 -0
  82. package/apps/app-lifeops/src/actions/screen-time.d.ts +8 -0
  83. package/apps/app-lifeops/src/actions/screen-time.d.ts.map +1 -0
  84. package/apps/app-lifeops/src/actions/screen-time.js +231 -0
  85. package/apps/app-lifeops/src/actions/search-across-channels.d.ts +13 -0
  86. package/apps/app-lifeops/src/actions/search-across-channels.d.ts.map +1 -0
  87. package/apps/app-lifeops/src/actions/search-across-channels.js +340 -0
  88. package/apps/app-lifeops/src/actions/start-remote-session.d.ts +14 -0
  89. package/apps/app-lifeops/src/actions/start-remote-session.d.ts.map +1 -0
  90. package/apps/app-lifeops/src/actions/start-remote-session.js +138 -0
  91. package/apps/app-lifeops/src/actions/twilio-call.d.ts +20 -0
  92. package/apps/app-lifeops/src/actions/twilio-call.d.ts.map +1 -0
  93. package/apps/app-lifeops/src/actions/twilio-call.js +510 -0
  94. package/apps/app-lifeops/src/actions/update-owner-profile.d.ts +3 -1
  95. package/apps/app-lifeops/src/actions/update-owner-profile.d.ts.map +1 -1
  96. package/apps/app-lifeops/src/actions/update-owner-profile.js +52 -31
  97. package/apps/app-lifeops/src/actions/website-blocker.d.ts +10 -0
  98. package/apps/app-lifeops/src/actions/website-blocker.d.ts.map +1 -0
  99. package/apps/app-lifeops/src/actions/website-blocker.js +539 -0
  100. package/apps/app-lifeops/src/actions/x-read.d.ts +3 -0
  101. package/apps/app-lifeops/src/actions/x-read.d.ts.map +1 -0
  102. package/apps/app-lifeops/src/actions/x-read.js +367 -0
  103. package/apps/app-lifeops/src/activity-profile/activity-tracker-repo.d.ts +28 -0
  104. package/apps/app-lifeops/src/activity-profile/activity-tracker-repo.d.ts.map +1 -0
  105. package/apps/app-lifeops/src/activity-profile/activity-tracker-repo.js +62 -0
  106. package/apps/app-lifeops/src/activity-profile/activity-tracker-reporting.d.ts +45 -0
  107. package/apps/app-lifeops/src/activity-profile/activity-tracker-reporting.d.ts.map +1 -0
  108. package/apps/app-lifeops/src/activity-profile/activity-tracker-reporting.js +112 -0
  109. package/apps/app-lifeops/src/activity-profile/activity-tracker-service.d.ts +26 -0
  110. package/apps/app-lifeops/src/activity-profile/activity-tracker-service.d.ts.map +1 -0
  111. package/apps/app-lifeops/src/activity-profile/activity-tracker-service.js +84 -0
  112. package/apps/app-lifeops/src/activity-profile/analyzer.d.ts.map +1 -0
  113. package/apps/app-lifeops/src/activity-profile/analyzer.js +544 -0
  114. package/apps/app-lifeops/src/activity-profile/proactive-planner.d.ts.map +1 -0
  115. package/apps/app-lifeops/src/activity-profile/proactive-planner.js +458 -0
  116. package/apps/app-lifeops/src/activity-profile/proactive-worker.d.ts.map +1 -0
  117. package/apps/app-lifeops/src/activity-profile/proactive-worker.js +571 -0
  118. package/apps/app-lifeops/src/activity-profile/profile-metadata.d.ts.map +1 -0
  119. package/apps/app-lifeops/src/activity-profile/redactor.d.ts +18 -0
  120. package/apps/app-lifeops/src/activity-profile/redactor.d.ts.map +1 -0
  121. package/apps/app-lifeops/src/activity-profile/redactor.js +39 -0
  122. package/apps/app-lifeops/src/activity-profile/service.d.ts +11 -0
  123. package/apps/app-lifeops/src/activity-profile/service.d.ts.map +1 -0
  124. package/apps/app-lifeops/src/activity-profile/service.js +229 -0
  125. package/apps/app-lifeops/src/activity-profile/types.d.ts.map +1 -0
  126. package/apps/app-lifeops/src/app-blocker/access.d.ts +8 -0
  127. package/apps/app-lifeops/src/app-blocker/access.d.ts.map +1 -0
  128. package/apps/app-lifeops/src/app-blocker/access.js +28 -0
  129. package/apps/app-lifeops/src/app-blocker/engine.d.ts +10 -0
  130. package/apps/app-lifeops/src/app-blocker/engine.d.ts.map +1 -0
  131. package/apps/app-lifeops/src/app-blocker/engine.js +43 -0
  132. package/apps/app-lifeops/src/dossier/action.d.ts +9 -0
  133. package/apps/app-lifeops/src/dossier/action.d.ts.map +1 -0
  134. package/apps/app-lifeops/src/dossier/action.js +87 -0
  135. package/apps/app-lifeops/src/dossier/service.d.ts +145 -0
  136. package/apps/app-lifeops/src/dossier/service.d.ts.map +1 -0
  137. package/apps/app-lifeops/src/dossier/service.js +346 -0
  138. package/apps/app-lifeops/src/followup/actions/listOverdueFollowups.d.ts +3 -0
  139. package/apps/app-lifeops/src/followup/actions/listOverdueFollowups.d.ts.map +1 -0
  140. package/apps/app-lifeops/src/followup/actions/listOverdueFollowups.js +47 -0
  141. package/apps/app-lifeops/src/followup/actions/markFollowupDone.d.ts +3 -0
  142. package/apps/app-lifeops/src/followup/actions/markFollowupDone.d.ts.map +1 -0
  143. package/apps/app-lifeops/src/followup/actions/markFollowupDone.js +172 -0
  144. package/apps/app-lifeops/src/followup/actions/setFollowupThreshold.d.ts +3 -0
  145. package/apps/app-lifeops/src/followup/actions/setFollowupThreshold.d.ts.map +1 -0
  146. package/apps/app-lifeops/src/followup/actions/setFollowupThreshold.js +171 -0
  147. package/apps/app-lifeops/src/followup/followup-tracker.d.ts +81 -0
  148. package/apps/app-lifeops/src/followup/followup-tracker.d.ts.map +1 -0
  149. package/apps/app-lifeops/src/followup/followup-tracker.js +251 -0
  150. package/apps/app-lifeops/src/followup/index.d.ts +5 -0
  151. package/apps/app-lifeops/src/followup/index.d.ts.map +1 -0
  152. package/apps/app-lifeops/src/followup/index.js +4 -0
  153. package/apps/app-lifeops/src/inbox/reflection.d.ts +0 -5
  154. package/apps/app-lifeops/src/inbox/reflection.d.ts.map +1 -1
  155. package/apps/app-lifeops/src/inbox/reflection.js +9 -51
  156. package/apps/app-lifeops/src/inbox/repository.d.ts +0 -1
  157. package/apps/app-lifeops/src/inbox/repository.d.ts.map +1 -1
  158. package/apps/app-lifeops/src/inbox/repository.js +18 -118
  159. package/apps/app-lifeops/src/inbox/triage-classifier.d.ts +4 -6
  160. package/apps/app-lifeops/src/inbox/triage-classifier.d.ts.map +1 -1
  161. package/apps/app-lifeops/src/inbox/triage-classifier.js +68 -101
  162. package/apps/app-lifeops/src/inbox/types.d.ts +4 -42
  163. package/apps/app-lifeops/src/inbox/types.d.ts.map +1 -1
  164. package/apps/app-lifeops/src/lifeops/approval-queue.types.d.ts +162 -0
  165. package/apps/app-lifeops/src/lifeops/approval-queue.types.d.ts.map +1 -0
  166. package/apps/app-lifeops/src/lifeops/approval-queue.types.js +41 -0
  167. package/apps/app-lifeops/src/lifeops/autofill-whitelist.d.ts +24 -0
  168. package/apps/app-lifeops/src/lifeops/autofill-whitelist.d.ts.map +1 -0
  169. package/apps/app-lifeops/src/lifeops/autofill-whitelist.js +125 -0
  170. package/apps/app-lifeops/src/lifeops/background-planner-dispatch.d.ts +59 -0
  171. package/apps/app-lifeops/src/lifeops/background-planner-dispatch.d.ts.map +1 -0
  172. package/apps/app-lifeops/src/lifeops/background-planner-dispatch.js +129 -0
  173. package/apps/app-lifeops/src/lifeops/background-planner.d.ts +141 -0
  174. package/apps/app-lifeops/src/lifeops/background-planner.d.ts.map +1 -0
  175. package/apps/app-lifeops/src/lifeops/background-planner.js +308 -0
  176. package/apps/app-lifeops/src/lifeops/browser-extension-store.d.ts +61 -0
  177. package/apps/app-lifeops/src/lifeops/browser-extension-store.d.ts.map +1 -0
  178. package/apps/app-lifeops/src/lifeops/browser-extension-store.js +181 -0
  179. package/apps/app-lifeops/src/lifeops/calendly-client.d.ts +61 -0
  180. package/apps/app-lifeops/src/lifeops/calendly-client.d.ts.map +1 -0
  181. package/apps/app-lifeops/src/lifeops/calendly-client.js +218 -0
  182. package/apps/app-lifeops/src/lifeops/checkin/checkin-service.d.ts +24 -0
  183. package/apps/app-lifeops/src/lifeops/checkin/checkin-service.d.ts.map +1 -0
  184. package/apps/app-lifeops/src/lifeops/checkin/checkin-service.js +216 -0
  185. package/apps/app-lifeops/src/lifeops/checkin/schedule-resolver.d.ts +14 -0
  186. package/apps/app-lifeops/src/lifeops/checkin/schedule-resolver.d.ts.map +1 -0
  187. package/apps/app-lifeops/src/lifeops/checkin/schedule-resolver.js +33 -0
  188. package/apps/app-lifeops/src/lifeops/checkin/types.d.ts +42 -0
  189. package/apps/app-lifeops/src/lifeops/checkin/types.d.ts.map +1 -0
  190. package/apps/app-lifeops/src/lifeops/checkin/types.js +7 -0
  191. package/apps/app-lifeops/src/lifeops/defaults.d.ts +1 -1
  192. package/apps/app-lifeops/src/lifeops/defaults.d.ts.map +1 -1
  193. package/apps/app-lifeops/src/lifeops/defaults.js +8 -1
  194. package/apps/app-lifeops/src/lifeops/discord-browser-scraper.d.ts +106 -0
  195. package/apps/app-lifeops/src/lifeops/discord-browser-scraper.d.ts.map +1 -0
  196. package/apps/app-lifeops/src/lifeops/discord-browser-scraper.js +488 -0
  197. package/apps/app-lifeops/src/lifeops/enforcement-windows.d.ts +34 -0
  198. package/apps/app-lifeops/src/lifeops/enforcement-windows.d.ts.map +1 -0
  199. package/apps/app-lifeops/src/lifeops/enforcement-windows.js +110 -0
  200. package/apps/app-lifeops/src/lifeops/google-connector-gateway.d.ts +13 -0
  201. package/apps/app-lifeops/src/lifeops/google-connector-gateway.d.ts.map +1 -1
  202. package/apps/app-lifeops/src/lifeops/google-connector-gateway.js +23 -0
  203. package/apps/app-lifeops/src/lifeops/google-drive.d.ts +103 -0
  204. package/apps/app-lifeops/src/lifeops/google-drive.d.ts.map +1 -0
  205. package/apps/app-lifeops/src/lifeops/google-drive.js +265 -0
  206. package/apps/app-lifeops/src/lifeops/google-fetch.d.ts +5 -0
  207. package/apps/app-lifeops/src/lifeops/google-fetch.d.ts.map +1 -1
  208. package/apps/app-lifeops/src/lifeops/google-fetch.js +12 -1
  209. package/apps/app-lifeops/src/lifeops/google-gmail.d.ts.map +1 -1
  210. package/apps/app-lifeops/src/lifeops/google-gmail.js +19 -34
  211. package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts +12 -1
  212. package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts.map +1 -1
  213. package/apps/app-lifeops/src/lifeops/google-managed-client.js +32 -12
  214. package/apps/app-lifeops/src/lifeops/google-oauth.d.ts +4 -0
  215. package/apps/app-lifeops/src/lifeops/google-oauth.d.ts.map +1 -1
  216. package/apps/app-lifeops/src/lifeops/google-oauth.js +99 -13
  217. package/apps/app-lifeops/src/lifeops/health-bridge.d.ts +57 -0
  218. package/apps/app-lifeops/src/lifeops/health-bridge.d.ts.map +1 -0
  219. package/apps/app-lifeops/src/lifeops/health-bridge.js +514 -0
  220. package/apps/app-lifeops/src/lifeops/imessage-bridge.d.ts +98 -0
  221. package/apps/app-lifeops/src/lifeops/imessage-bridge.d.ts.map +1 -0
  222. package/apps/app-lifeops/src/lifeops/imessage-bridge.js +537 -0
  223. package/apps/app-lifeops/src/lifeops/intent-sync.d.ts +56 -0
  224. package/apps/app-lifeops/src/lifeops/intent-sync.d.ts.map +1 -0
  225. package/apps/app-lifeops/src/lifeops/intent-sync.js +223 -0
  226. package/apps/app-lifeops/src/lifeops/notifications-push.d.ts +37 -0
  227. package/apps/app-lifeops/src/lifeops/notifications-push.d.ts.map +1 -0
  228. package/apps/app-lifeops/src/lifeops/notifications-push.js +90 -0
  229. package/apps/app-lifeops/src/lifeops/owner-profile.d.ts +29 -1
  230. package/apps/app-lifeops/src/lifeops/owner-profile.d.ts.map +1 -1
  231. package/apps/app-lifeops/src/lifeops/owner-profile.js +106 -0
  232. package/apps/app-lifeops/src/lifeops/password-manager-bridge.d.ts +49 -0
  233. package/apps/app-lifeops/src/lifeops/password-manager-bridge.d.ts.map +1 -0
  234. package/apps/app-lifeops/src/lifeops/password-manager-bridge.js +374 -0
  235. package/apps/app-lifeops/src/lifeops/remote-desktop.d.ts +37 -0
  236. package/apps/app-lifeops/src/lifeops/remote-desktop.d.ts.map +1 -0
  237. package/apps/app-lifeops/src/lifeops/remote-desktop.js +341 -0
  238. package/apps/app-lifeops/src/lifeops/repository.d.ts +69 -3
  239. package/apps/app-lifeops/src/lifeops/repository.d.ts.map +1 -1
  240. package/apps/app-lifeops/src/lifeops/repository.js +1368 -926
  241. package/apps/app-lifeops/src/lifeops/runtime.d.ts +1 -0
  242. package/apps/app-lifeops/src/lifeops/runtime.d.ts.map +1 -1
  243. package/apps/app-lifeops/src/lifeops/runtime.js +119 -9
  244. package/apps/app-lifeops/src/lifeops/schema.d.ts +5022 -0
  245. package/apps/app-lifeops/src/lifeops/schema.d.ts.map +1 -0
  246. package/apps/app-lifeops/src/lifeops/schema.js +207 -0
  247. package/apps/app-lifeops/src/lifeops/service-constants.d.ts +51 -0
  248. package/apps/app-lifeops/src/lifeops/service-constants.d.ts.map +1 -0
  249. package/apps/app-lifeops/src/lifeops/service-constants.js +111 -0
  250. package/apps/app-lifeops/src/lifeops/service-helpers-browser.d.ts +40 -0
  251. package/apps/app-lifeops/src/lifeops/service-helpers-browser.d.ts.map +1 -0
  252. package/apps/app-lifeops/src/lifeops/service-helpers-browser.js +288 -0
  253. package/apps/app-lifeops/src/lifeops/service-helpers-misc.d.ts +68 -0
  254. package/apps/app-lifeops/src/lifeops/service-helpers-misc.d.ts.map +1 -0
  255. package/apps/app-lifeops/src/lifeops/service-helpers-misc.js +493 -0
  256. package/apps/app-lifeops/src/lifeops/service-helpers-occurrence.d.ts +17 -0
  257. package/apps/app-lifeops/src/lifeops/service-helpers-occurrence.d.ts.map +1 -0
  258. package/apps/app-lifeops/src/lifeops/service-helpers-occurrence.js +214 -0
  259. package/apps/app-lifeops/src/lifeops/service-helpers-reminder.d.ts +24 -0
  260. package/apps/app-lifeops/src/lifeops/service-helpers-reminder.d.ts.map +1 -0
  261. package/apps/app-lifeops/src/lifeops/service-helpers-reminder.js +170 -0
  262. package/apps/app-lifeops/src/lifeops/service-mixin-browser.d.ts +2 -0
  263. package/apps/app-lifeops/src/lifeops/service-mixin-browser.d.ts.map +1 -0
  264. package/apps/app-lifeops/src/lifeops/service-mixin-browser.js +769 -0
  265. package/apps/app-lifeops/src/lifeops/service-mixin-calendar.d.ts +2 -0
  266. package/apps/app-lifeops/src/lifeops/service-mixin-calendar.d.ts.map +1 -0
  267. package/apps/app-lifeops/src/lifeops/service-mixin-calendar.js +513 -0
  268. package/apps/app-lifeops/src/lifeops/service-mixin-core.d.ts +49 -0
  269. package/apps/app-lifeops/src/lifeops/service-mixin-core.d.ts.map +1 -0
  270. package/apps/app-lifeops/src/lifeops/service-mixin-core.js +433 -0
  271. package/apps/app-lifeops/src/lifeops/service-mixin-definitions.d.ts +2 -0
  272. package/apps/app-lifeops/src/lifeops/service-mixin-definitions.d.ts.map +1 -0
  273. package/apps/app-lifeops/src/lifeops/service-mixin-definitions.js +353 -0
  274. package/apps/app-lifeops/src/lifeops/service-mixin-discord.d.ts +2 -0
  275. package/apps/app-lifeops/src/lifeops/service-mixin-discord.d.ts.map +1 -0
  276. package/apps/app-lifeops/src/lifeops/service-mixin-discord.js +603 -0
  277. package/apps/app-lifeops/src/lifeops/service-mixin-dossier.d.ts +2 -0
  278. package/apps/app-lifeops/src/lifeops/service-mixin-dossier.d.ts.map +1 -0
  279. package/apps/app-lifeops/src/lifeops/service-mixin-dossier.js +262 -0
  280. package/apps/app-lifeops/src/lifeops/service-mixin-drive.d.ts +12 -0
  281. package/apps/app-lifeops/src/lifeops/service-mixin-drive.d.ts.map +1 -0
  282. package/apps/app-lifeops/src/lifeops/service-mixin-drive.js +230 -0
  283. package/apps/app-lifeops/src/lifeops/service-mixin-gmail.d.ts +2 -0
  284. package/apps/app-lifeops/src/lifeops/service-mixin-gmail.d.ts.map +1 -0
  285. package/apps/app-lifeops/src/lifeops/service-mixin-gmail.js +1013 -0
  286. package/apps/app-lifeops/src/lifeops/service-mixin-goals.d.ts +2 -0
  287. package/apps/app-lifeops/src/lifeops/service-mixin-goals.d.ts.map +1 -0
  288. package/apps/app-lifeops/src/lifeops/service-mixin-goals.js +714 -0
  289. package/apps/app-lifeops/src/lifeops/service-mixin-google.d.ts +2 -0
  290. package/apps/app-lifeops/src/lifeops/service-mixin-google.d.ts.map +1 -0
  291. package/apps/app-lifeops/src/lifeops/service-mixin-google.js +793 -0
  292. package/apps/app-lifeops/src/lifeops/service-mixin-health.d.ts +2 -0
  293. package/apps/app-lifeops/src/lifeops/service-mixin-health.d.ts.map +1 -0
  294. package/apps/app-lifeops/src/lifeops/service-mixin-health.js +55 -0
  295. package/apps/app-lifeops/src/lifeops/service-mixin-imessage.d.ts +3 -0
  296. package/apps/app-lifeops/src/lifeops/service-mixin-imessage.d.ts.map +1 -0
  297. package/apps/app-lifeops/src/lifeops/service-mixin-imessage.js +106 -0
  298. package/apps/app-lifeops/src/lifeops/service-mixin-relationships.d.ts +2 -0
  299. package/apps/app-lifeops/src/lifeops/service-mixin-relationships.d.ts.map +1 -0
  300. package/apps/app-lifeops/src/lifeops/service-mixin-relationships.js +109 -0
  301. package/apps/app-lifeops/src/lifeops/service-mixin-reminders.d.ts +37 -0
  302. package/apps/app-lifeops/src/lifeops/service-mixin-reminders.d.ts.map +1 -0
  303. package/apps/app-lifeops/src/lifeops/service-mixin-reminders.js +2436 -0
  304. package/apps/app-lifeops/src/lifeops/service-mixin-scheduling.d.ts +2 -0
  305. package/apps/app-lifeops/src/lifeops/service-mixin-scheduling.d.ts.map +1 -0
  306. package/apps/app-lifeops/src/lifeops/service-mixin-scheduling.js +149 -0
  307. package/apps/app-lifeops/src/lifeops/service-mixin-screentime.d.ts +2 -0
  308. package/apps/app-lifeops/src/lifeops/service-mixin-screentime.d.ts.map +1 -0
  309. package/apps/app-lifeops/src/lifeops/service-mixin-screentime.js +97 -0
  310. package/apps/app-lifeops/src/lifeops/service-mixin-signal.d.ts +2 -0
  311. package/apps/app-lifeops/src/lifeops/service-mixin-signal.d.ts.map +1 -0
  312. package/apps/app-lifeops/src/lifeops/service-mixin-signal.js +264 -0
  313. package/apps/app-lifeops/src/lifeops/service-mixin-telegram.d.ts +2 -0
  314. package/apps/app-lifeops/src/lifeops/service-mixin-telegram.d.ts.map +1 -0
  315. package/apps/app-lifeops/src/lifeops/service-mixin-telegram.js +270 -0
  316. package/apps/app-lifeops/src/lifeops/service-mixin-whatsapp.d.ts +2 -0
  317. package/apps/app-lifeops/src/lifeops/service-mixin-whatsapp.d.ts.map +1 -0
  318. package/apps/app-lifeops/src/lifeops/service-mixin-whatsapp.js +56 -0
  319. package/apps/app-lifeops/src/lifeops/service-mixin-workflows.d.ts +2 -0
  320. package/apps/app-lifeops/src/lifeops/service-mixin-workflows.d.ts.map +1 -0
  321. package/apps/app-lifeops/src/lifeops/service-mixin-workflows.js +411 -0
  322. package/apps/app-lifeops/src/lifeops/service-mixin-x-read.d.ts +2 -0
  323. package/apps/app-lifeops/src/lifeops/service-mixin-x-read.d.ts.map +1 -0
  324. package/apps/app-lifeops/src/lifeops/service-mixin-x-read.js +190 -0
  325. package/apps/app-lifeops/src/lifeops/service-mixin-x.d.ts +2 -0
  326. package/apps/app-lifeops/src/lifeops/service-mixin-x.d.ts.map +1 -0
  327. package/apps/app-lifeops/src/lifeops/service-mixin-x.js +120 -0
  328. package/apps/app-lifeops/src/lifeops/service-normalize-calendar.d.ts +42 -0
  329. package/apps/app-lifeops/src/lifeops/service-normalize-calendar.d.ts.map +1 -0
  330. package/apps/app-lifeops/src/lifeops/service-normalize-calendar.js +294 -0
  331. package/apps/app-lifeops/src/lifeops/service-normalize-connector.d.ts +18 -0
  332. package/apps/app-lifeops/src/lifeops/service-normalize-connector.d.ts.map +1 -0
  333. package/apps/app-lifeops/src/lifeops/service-normalize-connector.js +317 -0
  334. package/apps/app-lifeops/src/lifeops/service-normalize-gmail.d.ts +63 -0
  335. package/apps/app-lifeops/src/lifeops/service-normalize-gmail.d.ts.map +1 -0
  336. package/apps/app-lifeops/src/lifeops/service-normalize-gmail.js +553 -0
  337. package/apps/app-lifeops/src/lifeops/service-normalize-task.d.ts +8 -0
  338. package/apps/app-lifeops/src/lifeops/service-normalize-task.d.ts.map +1 -0
  339. package/apps/app-lifeops/src/lifeops/service-normalize-task.js +333 -0
  340. package/apps/app-lifeops/src/lifeops/service-normalize.d.ts +27 -0
  341. package/apps/app-lifeops/src/lifeops/service-normalize.d.ts.map +1 -0
  342. package/apps/app-lifeops/src/lifeops/service-normalize.js +193 -0
  343. package/apps/app-lifeops/src/lifeops/service-types.d.ts +43 -0
  344. package/apps/app-lifeops/src/lifeops/service-types.d.ts.map +1 -0
  345. package/apps/app-lifeops/src/lifeops/service-types.js +8 -0
  346. package/apps/app-lifeops/src/lifeops/service.d.ts +1566 -272
  347. package/apps/app-lifeops/src/lifeops/service.d.ts.map +1 -1
  348. package/apps/app-lifeops/src/lifeops/service.js +38 -9256
  349. package/apps/app-lifeops/src/lifeops/signal-auth.d.ts +26 -0
  350. package/apps/app-lifeops/src/lifeops/signal-auth.d.ts.map +1 -0
  351. package/apps/app-lifeops/src/lifeops/signal-auth.js +300 -0
  352. package/apps/app-lifeops/src/lifeops/signal-runtime-config.d.ts +13 -0
  353. package/apps/app-lifeops/src/lifeops/signal-runtime-config.d.ts.map +1 -0
  354. package/apps/app-lifeops/src/lifeops/signal-runtime-config.js +42 -0
  355. package/apps/app-lifeops/src/lifeops/sql.d.ts +0 -5
  356. package/apps/app-lifeops/src/lifeops/sql.d.ts.map +1 -1
  357. package/apps/app-lifeops/src/lifeops/sql.js +5 -125
  358. package/apps/app-lifeops/src/lifeops/telegram-auth.d.ts +62 -0
  359. package/apps/app-lifeops/src/lifeops/telegram-auth.d.ts.map +1 -0
  360. package/apps/app-lifeops/src/lifeops/telegram-auth.js +496 -0
  361. package/apps/app-lifeops/src/lifeops/telegram-local-client.d.ts +118 -0
  362. package/apps/app-lifeops/src/lifeops/telegram-local-client.d.ts.map +1 -0
  363. package/apps/app-lifeops/src/lifeops/telegram-local-client.js +376 -0
  364. package/apps/app-lifeops/src/lifeops/twilio.d.ts.map +1 -1
  365. package/apps/app-lifeops/src/lifeops/twilio.js +2 -1
  366. package/apps/app-lifeops/src/lifeops/unified-search.d.ts +88 -0
  367. package/apps/app-lifeops/src/lifeops/unified-search.d.ts.map +1 -0
  368. package/apps/app-lifeops/src/lifeops/unified-search.js +431 -0
  369. package/apps/app-lifeops/src/lifeops/whatsapp-client.d.ts +47 -0
  370. package/apps/app-lifeops/src/lifeops/whatsapp-client.d.ts.map +1 -0
  371. package/apps/app-lifeops/src/lifeops/whatsapp-client.js +198 -0
  372. package/apps/app-lifeops/src/lifeops/x-poster.d.ts +22 -0
  373. package/apps/app-lifeops/src/lifeops/x-poster.d.ts.map +1 -1
  374. package/apps/app-lifeops/src/lifeops/x-poster.js +67 -3
  375. package/apps/app-lifeops/src/lifeops/x-reader.d.ts +70 -0
  376. package/apps/app-lifeops/src/lifeops/x-reader.d.ts.map +1 -0
  377. package/apps/app-lifeops/src/lifeops/x-reader.js +260 -0
  378. package/apps/app-lifeops/src/plugin.d.ts +12 -1
  379. package/apps/app-lifeops/src/plugin.d.ts.map +1 -1
  380. package/apps/app-lifeops/src/plugin.js +245 -26
  381. package/apps/app-lifeops/src/provider.d.ts.map +1 -1
  382. package/apps/app-lifeops/src/provider.js +1 -0
  383. package/apps/app-lifeops/src/providers/activity-profile.d.ts.map +1 -0
  384. package/apps/app-lifeops/src/providers/activity-profile.js +140 -0
  385. package/apps/app-lifeops/src/providers/app-blocker.d.ts +3 -0
  386. package/apps/app-lifeops/src/providers/app-blocker.d.ts.map +1 -0
  387. package/apps/app-lifeops/src/providers/app-blocker.js +86 -0
  388. package/apps/app-lifeops/src/providers/cross-channel-context.d.ts +29 -0
  389. package/apps/app-lifeops/src/providers/cross-channel-context.d.ts.map +1 -0
  390. package/apps/app-lifeops/src/providers/cross-channel-context.js +193 -0
  391. package/apps/app-lifeops/src/providers/inbox-triage.d.ts.map +1 -1
  392. package/apps/app-lifeops/src/providers/inbox-triage.js +1 -0
  393. package/apps/app-lifeops/src/providers/lifeops.d.ts +1 -1
  394. package/apps/app-lifeops/src/providers/lifeops.d.ts.map +1 -1
  395. package/apps/app-lifeops/src/providers/lifeops.js +39 -11
  396. package/apps/app-lifeops/src/providers/website-blocker.d.ts +4 -0
  397. package/apps/app-lifeops/src/providers/website-blocker.d.ts.map +1 -0
  398. package/apps/app-lifeops/src/providers/website-blocker.js +117 -0
  399. package/apps/app-lifeops/src/remote/pairing-code.d.ts +39 -0
  400. package/apps/app-lifeops/src/remote/pairing-code.d.ts.map +1 -0
  401. package/apps/app-lifeops/src/remote/pairing-code.js +76 -0
  402. package/apps/app-lifeops/src/remote/remote-session-service.d.ts +107 -0
  403. package/apps/app-lifeops/src/remote/remote-session-service.d.ts.map +1 -0
  404. package/apps/app-lifeops/src/remote/remote-session-service.js +253 -0
  405. package/apps/app-lifeops/src/routes/lifeops-browser-packaging.d.ts.map +1 -1
  406. package/apps/app-lifeops/src/routes/lifeops-browser-packaging.js +9 -3
  407. package/apps/app-lifeops/src/routes/lifeops-routes.d.ts +1 -1
  408. package/apps/app-lifeops/src/routes/lifeops-routes.d.ts.map +1 -1
  409. package/apps/app-lifeops/src/routes/lifeops-routes.js +276 -40
  410. package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts.map +1 -1
  411. package/apps/app-lifeops/src/routes/website-blocker-routes.js +8 -13
  412. package/apps/app-lifeops/src/travel-time/action.d.ts +6 -0
  413. package/apps/app-lifeops/src/travel-time/action.d.ts.map +1 -0
  414. package/apps/app-lifeops/src/travel-time/action.js +81 -0
  415. package/apps/app-lifeops/src/travel-time/service.d.ts +61 -0
  416. package/apps/app-lifeops/src/travel-time/service.d.ts.map +1 -0
  417. package/apps/app-lifeops/src/travel-time/service.js +145 -0
  418. package/apps/app-lifeops/src/types/app-blocker-settings-card.d.ts +2 -0
  419. package/apps/app-lifeops/src/types/app-blocker-settings-card.d.ts.map +1 -0
  420. package/apps/app-lifeops/src/types/index.d.ts +3 -0
  421. package/apps/app-lifeops/src/types/index.d.ts.map +1 -0
  422. package/apps/app-lifeops/src/types/website-blocker-settings-card.d.ts +2 -0
  423. package/apps/app-lifeops/src/types/website-blocker-settings-card.d.ts.map +1 -0
  424. package/apps/app-lifeops/src/website-blocker/access.d.ts +8 -0
  425. package/apps/app-lifeops/src/website-blocker/access.d.ts.map +1 -0
  426. package/apps/app-lifeops/src/website-blocker/access.js +32 -0
  427. package/apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.d.ts +3 -0
  428. package/apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.d.ts.map +1 -0
  429. package/apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.js +212 -0
  430. package/apps/app-lifeops/src/website-blocker/chat-integration/actions/listActiveBlocks.d.ts +3 -0
  431. package/apps/app-lifeops/src/website-blocker/chat-integration/actions/listActiveBlocks.d.ts.map +1 -0
  432. package/apps/app-lifeops/src/website-blocker/chat-integration/actions/listActiveBlocks.js +57 -0
  433. package/apps/app-lifeops/src/website-blocker/chat-integration/actions/releaseBlock.d.ts +3 -0
  434. package/apps/app-lifeops/src/website-blocker/chat-integration/actions/releaseBlock.d.ts.map +1 -0
  435. package/apps/app-lifeops/src/website-blocker/chat-integration/actions/releaseBlock.js +98 -0
  436. package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-reconciler.d.ts +7 -0
  437. package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-reconciler.d.ts.map +1 -0
  438. package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-reconciler.js +111 -0
  439. package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-schema.d.ts +39 -0
  440. package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-schema.d.ts.map +1 -0
  441. package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-schema.js +123 -0
  442. package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-service.d.ts +21 -0
  443. package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-service.d.ts.map +1 -0
  444. package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-service.js +227 -0
  445. package/apps/app-lifeops/src/website-blocker/chat-integration/index.d.ts +8 -0
  446. package/apps/app-lifeops/src/website-blocker/chat-integration/index.d.ts.map +1 -0
  447. package/apps/app-lifeops/src/website-blocker/chat-integration/index.js +6 -0
  448. package/apps/app-lifeops/src/website-blocker/engine.d.ts +116 -0
  449. package/apps/app-lifeops/src/website-blocker/engine.d.ts.map +1 -0
  450. package/apps/app-lifeops/src/website-blocker/engine.js +934 -0
  451. package/apps/app-lifeops/src/website-blocker/permissions.d.ts.map +1 -0
  452. package/apps/app-lifeops/src/website-blocker/permissions.js +1 -0
  453. package/apps/app-lifeops/src/website-blocker/public.d.ts +13 -0
  454. package/apps/app-lifeops/src/website-blocker/public.d.ts.map +1 -0
  455. package/apps/app-lifeops/src/website-blocker/public.js +10 -0
  456. package/apps/app-lifeops/src/website-blocker/roles.d.ts +13 -0
  457. package/apps/app-lifeops/src/website-blocker/roles.d.ts.map +1 -0
  458. package/apps/app-lifeops/src/website-blocker/roles.js +20 -0
  459. package/apps/app-lifeops/src/website-blocker/service.d.ts +21 -0
  460. package/apps/app-lifeops/src/website-blocker/service.d.ts.map +1 -0
  461. package/apps/app-lifeops/src/website-blocker/service.js +268 -0
  462. package/apps/app-steward/src/api/tx-service.d.ts +47 -0
  463. package/apps/app-steward/src/api/tx-service.d.ts.map +1 -0
  464. package/apps/app-steward/src/api/tx-service.js +156 -0
  465. package/apps/app-steward/src/api/wallet-routes.d.ts +1 -9
  466. package/apps/app-steward/src/api/wallet-routes.d.ts.map +1 -1
  467. package/apps/app-steward/src/routes/wallet-export-guard.d.ts +2 -9
  468. package/apps/app-steward/src/routes/wallet-export-guard.d.ts.map +1 -1
  469. package/apps/app-steward/src/types/steward.d.ts +85 -0
  470. package/apps/app-steward/src/types/steward.d.ts.map +1 -0
  471. package/apps/app-steward/src/types/steward.js +9 -0
  472. package/apps/app-training/src/backends/atropos.d.ts +31 -0
  473. package/apps/app-training/src/backends/atropos.d.ts.map +1 -0
  474. package/apps/app-training/src/backends/atropos.js +63 -0
  475. package/apps/app-training/src/backends/native.d.ts +50 -0
  476. package/apps/app-training/src/backends/native.d.ts.map +1 -0
  477. package/apps/app-training/src/backends/native.js +128 -0
  478. package/apps/app-training/src/backends/tinker.d.ts +27 -0
  479. package/apps/app-training/src/backends/tinker.d.ts.map +1 -0
  480. package/apps/app-training/src/backends/tinker.js +56 -0
  481. package/apps/app-training/src/core/privacy-filter.d.ts +73 -0
  482. package/apps/app-training/src/core/privacy-filter.d.ts.map +1 -0
  483. package/apps/app-training/src/core/privacy-filter.js +169 -0
  484. package/apps/app-training/src/core/training-config.d.ts +52 -0
  485. package/apps/app-training/src/core/training-config.d.ts.map +1 -0
  486. package/apps/app-training/src/core/training-config.js +140 -0
  487. package/apps/app-training/src/core/training-orchestrator.d.ts +107 -0
  488. package/apps/app-training/src/core/training-orchestrator.d.ts.map +1 -0
  489. package/apps/app-training/src/core/training-orchestrator.js +409 -0
  490. package/apps/app-training/src/core/trajectory-task-datasets.d.ts +38 -0
  491. package/apps/app-training/src/core/trajectory-task-datasets.d.ts.map +1 -0
  492. package/apps/app-training/src/core/trajectory-task-datasets.js +281 -0
  493. package/apps/app-training/src/optimizers/bootstrap-fewshot.d.ts +42 -0
  494. package/apps/app-training/src/optimizers/bootstrap-fewshot.d.ts.map +1 -0
  495. package/apps/app-training/src/optimizers/bootstrap-fewshot.js +91 -0
  496. package/apps/app-training/src/optimizers/index.d.ts +6 -0
  497. package/apps/app-training/src/optimizers/index.d.ts.map +1 -0
  498. package/apps/app-training/src/optimizers/index.js +4 -0
  499. package/apps/app-training/src/optimizers/instruction-search.d.ts +39 -0
  500. package/apps/app-training/src/optimizers/instruction-search.d.ts.map +1 -0
  501. package/apps/app-training/src/optimizers/instruction-search.js +82 -0
  502. package/apps/app-training/src/optimizers/prompt-evolution.d.ts +39 -0
  503. package/apps/app-training/src/optimizers/prompt-evolution.d.ts.map +1 -0
  504. package/apps/app-training/src/optimizers/prompt-evolution.js +111 -0
  505. package/apps/app-training/src/optimizers/scoring.d.ts +63 -0
  506. package/apps/app-training/src/optimizers/scoring.d.ts.map +1 -0
  507. package/apps/app-training/src/optimizers/scoring.js +117 -0
  508. package/apps/app-training/src/optimizers/types.d.ts +105 -0
  509. package/apps/app-training/src/optimizers/types.d.ts.map +1 -0
  510. package/apps/app-training/src/optimizers/types.js +17 -0
  511. package/apps/app-training/src/services/index.d.ts +1 -0
  512. package/apps/app-training/src/services/index.d.ts.map +1 -1
  513. package/apps/app-training/src/services/index.js +1 -0
  514. package/apps/app-training/src/services/training-trigger.d.ts +166 -0
  515. package/apps/app-training/src/services/training-trigger.d.ts.map +1 -0
  516. package/apps/app-training/src/services/training-trigger.js +376 -0
  517. package/package.json +26 -21
  518. package/packages/agent/src/actions/app-control.js +1 -1
  519. package/packages/agent/src/actions/connector-resolver.d.ts.map +1 -1
  520. package/packages/agent/src/actions/connector-resolver.js +17 -7
  521. package/packages/agent/src/actions/context-signal-lexicon.d.ts +1 -1
  522. package/packages/agent/src/actions/context-signal-lexicon.d.ts.map +1 -1
  523. package/packages/agent/src/actions/context-signal-lexicon.js +7 -1
  524. package/packages/agent/src/actions/context-signal.d.ts +1 -1
  525. package/packages/agent/src/actions/context-signal.d.ts.map +1 -1
  526. package/packages/agent/src/actions/context-signal.js +1 -1
  527. package/packages/agent/src/actions/eject-plugin.d.ts.map +1 -1
  528. package/packages/agent/src/actions/eject-plugin.js +3 -1
  529. package/packages/agent/src/actions/entity-actions.d.ts +1 -0
  530. package/packages/agent/src/actions/entity-actions.d.ts.map +1 -1
  531. package/packages/agent/src/actions/entity-actions.js +233 -1
  532. package/packages/agent/src/actions/get-self-status.d.ts.map +1 -1
  533. package/packages/agent/src/actions/get-self-status.js +12 -1
  534. package/packages/agent/src/actions/grounded-action-reply.d.ts.map +1 -1
  535. package/packages/agent/src/actions/grounded-action-reply.js +1 -1
  536. package/packages/agent/src/actions/index.d.ts +0 -9
  537. package/packages/agent/src/actions/index.d.ts.map +1 -1
  538. package/packages/agent/src/actions/index.js +0 -9
  539. package/packages/agent/src/actions/install-plugin.d.ts.map +1 -1
  540. package/packages/agent/src/actions/install-plugin.js +3 -1
  541. package/packages/agent/src/actions/list-ejected.d.ts.map +1 -1
  542. package/packages/agent/src/actions/list-ejected.js +5 -3
  543. package/packages/agent/src/actions/reinject-plugin.d.ts.map +1 -1
  544. package/packages/agent/src/actions/reinject-plugin.js +3 -1
  545. package/packages/agent/src/actions/set-user-name.d.ts.map +1 -1
  546. package/packages/agent/src/actions/set-user-name.js +1 -1
  547. package/packages/agent/src/actions/sync-plugin.d.ts.map +1 -1
  548. package/packages/agent/src/actions/sync-plugin.js +5 -6
  549. package/packages/agent/src/api/agent-admin-routes.js +1 -1
  550. package/packages/agent/src/api/apps-routes.d.ts +2 -1
  551. package/packages/agent/src/api/apps-routes.d.ts.map +1 -1
  552. package/packages/agent/src/api/apps-routes.js +152 -2
  553. package/packages/agent/src/api/auth-routes.js +1 -1
  554. package/packages/agent/src/api/bsc-trade.d.ts +0 -4
  555. package/packages/agent/src/api/bsc-trade.d.ts.map +1 -1
  556. package/packages/agent/src/api/bsc-trade.js +0 -4
  557. package/packages/agent/src/api/character-routes.d.ts +2 -1
  558. package/packages/agent/src/api/character-routes.d.ts.map +1 -1
  559. package/packages/agent/src/api/chat-augmentation.js +1 -1
  560. package/packages/agent/src/api/chat-routes.d.ts.map +1 -1
  561. package/packages/agent/src/api/chat-routes.js +23 -108
  562. package/packages/agent/src/api/cloud-billing-routes.d.ts +1 -1
  563. package/packages/agent/src/api/cloud-billing-routes.d.ts.map +1 -1
  564. package/packages/agent/src/api/cloud-compat-routes.d.ts +1 -1
  565. package/packages/agent/src/api/cloud-compat-routes.d.ts.map +1 -1
  566. package/packages/agent/src/api/connector-health.d.ts +1 -1
  567. package/packages/agent/src/api/connector-health.d.ts.map +1 -1
  568. package/packages/agent/src/api/conversation-routes.d.ts +2 -2
  569. package/packages/agent/src/api/conversation-routes.d.ts.map +1 -1
  570. package/packages/agent/src/api/conversation-routes.js +1 -1
  571. package/packages/agent/src/api/curated-skills-routes.d.ts +22 -0
  572. package/packages/agent/src/api/curated-skills-routes.d.ts.map +1 -0
  573. package/packages/agent/src/api/curated-skills-routes.js +300 -0
  574. package/packages/agent/src/api/database.d.ts.map +1 -1
  575. package/packages/agent/src/api/database.js +11 -4
  576. package/packages/agent/src/api/discord-profiles.d.ts.map +1 -1
  577. package/packages/agent/src/api/discord-profiles.js +1 -4
  578. package/packages/agent/src/api/index.d.ts +0 -7
  579. package/packages/agent/src/api/index.d.ts.map +1 -1
  580. package/packages/agent/src/api/index.js +0 -7
  581. package/packages/agent/src/api/knowledge-routes.d.ts +22 -1
  582. package/packages/agent/src/api/knowledge-routes.d.ts.map +1 -1
  583. package/packages/agent/src/api/knowledge-routes.js +956 -2
  584. package/packages/agent/src/api/lifeops-browser-packaging.d.ts +1 -1
  585. package/packages/agent/src/api/lifeops-browser-packaging.d.ts.map +1 -1
  586. package/packages/agent/src/api/lifeops-browser-packaging.js +1 -1
  587. package/packages/agent/src/api/misc-routes.d.ts +2 -2
  588. package/packages/agent/src/api/misc-routes.d.ts.map +1 -1
  589. package/packages/agent/src/api/misc-routes.js +43 -6
  590. package/packages/agent/src/api/plugin-discovery-helpers.d.ts.map +1 -1
  591. package/packages/agent/src/api/plugin-discovery-helpers.js +2 -2
  592. package/packages/agent/src/api/plugin-routes.d.ts +1 -1
  593. package/packages/agent/src/api/plugin-routes.d.ts.map +1 -1
  594. package/packages/agent/src/api/plugin-routes.js +11 -2
  595. package/packages/agent/src/api/registry-service.d.ts +1 -1
  596. package/packages/agent/src/api/registry-service.d.ts.map +1 -1
  597. package/packages/agent/src/api/relationships-routes.d.ts.map +1 -1
  598. package/packages/agent/src/api/relationships-routes.js +70 -3
  599. package/packages/agent/src/api/server-auth.d.ts +2 -9
  600. package/packages/agent/src/api/server-auth.d.ts.map +1 -1
  601. package/packages/agent/src/api/server-auth.js +1 -1
  602. package/packages/agent/src/api/server-helpers-auth.d.ts +39 -0
  603. package/packages/agent/src/api/server-helpers-auth.d.ts.map +1 -0
  604. package/packages/agent/src/api/server-helpers-auth.js +432 -0
  605. package/packages/agent/src/api/server-helpers-config.d.ts +37 -0
  606. package/packages/agent/src/api/server-helpers-config.d.ts.map +1 -0
  607. package/packages/agent/src/api/server-helpers-config.js +295 -0
  608. package/packages/agent/src/api/server-helpers-mcp.d.ts +12 -0
  609. package/packages/agent/src/api/server-helpers-mcp.d.ts.map +1 -0
  610. package/packages/agent/src/api/server-helpers-mcp.js +315 -0
  611. package/packages/agent/src/api/server-helpers-plugin.d.ts +13 -0
  612. package/packages/agent/src/api/server-helpers-plugin.d.ts.map +1 -0
  613. package/packages/agent/src/api/server-helpers-plugin.js +158 -0
  614. package/packages/agent/src/api/server-helpers-swarm.d.ts +57 -0
  615. package/packages/agent/src/api/server-helpers-swarm.d.ts.map +1 -0
  616. package/packages/agent/src/api/server-helpers-swarm.js +325 -0
  617. package/packages/agent/src/api/server-helpers-wallet.d.ts +18 -0
  618. package/packages/agent/src/api/server-helpers-wallet.d.ts.map +1 -0
  619. package/packages/agent/src/api/server-helpers-wallet.js +178 -0
  620. package/packages/agent/src/api/server-helpers.d.ts.map +1 -1
  621. package/packages/agent/src/api/server-helpers.js +1 -1
  622. package/packages/agent/src/api/server-types.d.ts +42 -3
  623. package/packages/agent/src/api/server-types.d.ts.map +1 -1
  624. package/packages/agent/src/api/server.d.ts +10 -56
  625. package/packages/agent/src/api/server.d.ts.map +1 -1
  626. package/packages/agent/src/api/server.js +298 -1436
  627. package/packages/agent/src/api/signal-routes.d.ts +1 -1
  628. package/packages/agent/src/api/signal-routes.d.ts.map +1 -1
  629. package/packages/agent/src/api/signal-routes.js +1 -2
  630. package/packages/agent/src/api/skill-discovery-helpers.js +2 -0
  631. package/packages/agent/src/api/skills-routes.d.ts.map +1 -1
  632. package/packages/agent/src/api/skills-routes.js +69 -0
  633. package/packages/agent/src/api/static-file-server.js +1 -1
  634. package/packages/agent/src/api/stream-routes.d.ts +0 -19
  635. package/packages/agent/src/api/stream-routes.d.ts.map +1 -1
  636. package/packages/agent/src/api/trade-safety.d.ts +0 -4
  637. package/packages/agent/src/api/trade-safety.d.ts.map +1 -1
  638. package/packages/agent/src/api/trade-safety.js +0 -4
  639. package/packages/agent/src/api/trigger-routes.d.ts +37 -47
  640. package/packages/agent/src/api/trigger-routes.d.ts.map +1 -1
  641. package/packages/agent/src/api/trigger-routes.js +89 -18
  642. package/packages/agent/src/api/tts-routes.d.ts.map +1 -1
  643. package/packages/agent/src/api/tts-routes.js +1 -1
  644. package/packages/agent/src/api/tx-service.d.ts +0 -4
  645. package/packages/agent/src/api/tx-service.d.ts.map +1 -1
  646. package/packages/agent/src/api/tx-service.js +0 -4
  647. package/packages/agent/src/api/wallet-bsc-routes.d.ts +0 -4
  648. package/packages/agent/src/api/wallet-bsc-routes.d.ts.map +1 -1
  649. package/packages/agent/src/api/wallet-bsc-routes.js +0 -4
  650. package/packages/agent/src/api/wallet-capability.d.ts +0 -5
  651. package/packages/agent/src/api/wallet-capability.d.ts.map +1 -1
  652. package/packages/agent/src/api/wallet-capability.js +0 -5
  653. package/packages/agent/src/api/wallet-dex-prices.d.ts.map +1 -1
  654. package/packages/agent/src/api/wallet-dex-prices.js +0 -4
  655. package/packages/agent/src/api/wallet-env-sync.d.ts.map +1 -1
  656. package/packages/agent/src/api/wallet-env-sync.js +5 -1
  657. package/packages/agent/src/api/wallet-evm-balance.d.ts.map +1 -1
  658. package/packages/agent/src/api/wallet-evm-balance.js +0 -4
  659. package/packages/agent/src/api/wallet-routes.d.ts +1 -14
  660. package/packages/agent/src/api/wallet-routes.d.ts.map +1 -1
  661. package/packages/agent/src/api/wallet-routes.js +9 -15
  662. package/packages/agent/src/api/wallet-rpc.d.ts +0 -5
  663. package/packages/agent/src/api/wallet-rpc.d.ts.map +1 -1
  664. package/packages/agent/src/api/wallet-rpc.js +0 -5
  665. package/packages/agent/src/api/wallet-trade-routes.d.ts +0 -5
  666. package/packages/agent/src/api/wallet-trade-routes.d.ts.map +1 -1
  667. package/packages/agent/src/api/wallet-trade-routes.js +0 -5
  668. package/packages/agent/src/api/wallet-trading-profile.d.ts +2 -27
  669. package/packages/agent/src/api/wallet-trading-profile.d.ts.map +1 -1
  670. package/packages/agent/src/api/wallet-trading-profile.js +0 -5
  671. package/packages/agent/src/api/wallet.d.ts.map +1 -1
  672. package/packages/agent/src/api/wallet.js +0 -4
  673. package/packages/agent/src/api/whatsapp-routes.d.ts +1 -1
  674. package/packages/agent/src/api/whatsapp-routes.d.ts.map +1 -1
  675. package/packages/agent/src/api/whatsapp-routes.js +1 -2
  676. package/packages/agent/src/api/workbench-helpers.d.ts.map +1 -1
  677. package/packages/agent/src/api/workbench-helpers.js +2 -1
  678. package/packages/agent/src/api/workbench-routes.d.ts.map +1 -1
  679. package/packages/agent/src/api/workbench-routes.js +1 -1
  680. package/packages/agent/src/auth/anthropic.d.ts +0 -5
  681. package/packages/agent/src/auth/anthropic.d.ts.map +1 -1
  682. package/packages/agent/src/auth/anthropic.js +0 -5
  683. package/packages/agent/src/auth/openai-codex.d.ts +0 -5
  684. package/packages/agent/src/auth/openai-codex.d.ts.map +1 -1
  685. package/packages/agent/src/auth/openai-codex.js +0 -5
  686. package/packages/agent/src/cloud/cloud-wallet.d.ts +0 -2
  687. package/packages/agent/src/cloud/cloud-wallet.d.ts.map +1 -1
  688. package/packages/agent/src/config/env-vars.d.ts.map +1 -1
  689. package/packages/agent/src/config/env-vars.js +2 -0
  690. package/packages/agent/src/config/includes.js +1 -1
  691. package/packages/agent/src/config/index.d.ts +1 -1
  692. package/packages/agent/src/config/index.d.ts.map +1 -1
  693. package/packages/agent/src/config/index.js +1 -1
  694. package/packages/agent/src/config/plugin-auto-enable.d.ts +8 -0
  695. package/packages/agent/src/config/plugin-auto-enable.d.ts.map +1 -1
  696. package/packages/agent/src/config/plugin-auto-enable.js +28 -0
  697. package/packages/agent/src/config/types.agent-defaults.d.ts +2 -1
  698. package/packages/agent/src/config/types.agent-defaults.d.ts.map +1 -1
  699. package/packages/agent/src/config/types.eliza.d.ts +34 -0
  700. package/packages/agent/src/config/types.eliza.d.ts.map +1 -1
  701. package/packages/agent/src/contracts/index.d.ts +8 -8
  702. package/packages/agent/src/contracts/index.d.ts.map +1 -1
  703. package/packages/agent/src/contracts/index.js +8 -8
  704. package/packages/agent/src/contracts/onboarding-provider-defaults.d.ts +165 -0
  705. package/packages/agent/src/contracts/onboarding-provider-defaults.d.ts.map +1 -0
  706. package/packages/agent/src/contracts/onboarding-provider-defaults.js +189 -0
  707. package/packages/agent/src/index.d.ts +8 -6
  708. package/packages/agent/src/index.d.ts.map +1 -1
  709. package/packages/agent/src/index.js +8 -6
  710. package/packages/agent/src/providers/conversation-utils.d.ts.map +1 -1
  711. package/packages/agent/src/providers/conversation-utils.js +2 -3
  712. package/packages/agent/src/providers/index.d.ts +0 -1
  713. package/packages/agent/src/providers/index.d.ts.map +1 -1
  714. package/packages/agent/src/providers/index.js +0 -1
  715. package/packages/agent/src/providers/user-name.d.ts.map +1 -1
  716. package/packages/agent/src/providers/user-name.js +1 -1
  717. package/packages/agent/src/providers/workspace-provider.d.ts +0 -8
  718. package/packages/agent/src/providers/workspace-provider.d.ts.map +1 -1
  719. package/packages/agent/src/runtime/custom-actions.js +1 -1
  720. package/packages/agent/src/runtime/eliza-plugin.d.ts.map +1 -1
  721. package/packages/agent/src/runtime/eliza-plugin.js +1 -47
  722. package/packages/agent/src/runtime/eliza.d.ts +1 -91
  723. package/packages/agent/src/runtime/eliza.d.ts.map +1 -1
  724. package/packages/agent/src/runtime/eliza.js +109 -12
  725. package/packages/agent/src/runtime/first-time-setup.d.ts +20 -0
  726. package/packages/agent/src/runtime/first-time-setup.d.ts.map +1 -1
  727. package/packages/agent/src/runtime/first-time-setup.js +20 -25
  728. package/packages/agent/src/runtime/index.d.ts +1 -1
  729. package/packages/agent/src/runtime/index.d.ts.map +1 -1
  730. package/packages/agent/src/runtime/index.js +1 -1
  731. package/packages/agent/src/runtime/plugin-collector.d.ts +0 -12
  732. package/packages/agent/src/runtime/plugin-collector.d.ts.map +1 -1
  733. package/packages/agent/src/runtime/plugin-lifecycle.d.ts.map +1 -1
  734. package/packages/agent/src/runtime/plugin-lifecycle.js +6 -2
  735. package/packages/agent/src/runtime/plugin-resolver.d.ts.map +1 -1
  736. package/packages/agent/src/runtime/plugin-resolver.js +6 -7
  737. package/packages/agent/src/runtime/plugin-types.d.ts +0 -6
  738. package/packages/agent/src/runtime/plugin-types.d.ts.map +1 -1
  739. package/packages/agent/src/runtime/roles/src/utils.d.ts +1 -1
  740. package/packages/agent/src/runtime/roles/src/utils.d.ts.map +1 -1
  741. package/packages/agent/src/runtime/roles/src/utils.js +1 -1
  742. package/packages/agent/src/runtime/subagent-output.d.ts +51 -0
  743. package/packages/agent/src/runtime/subagent-output.d.ts.map +1 -0
  744. package/packages/agent/src/runtime/subagent-output.js +173 -0
  745. package/packages/agent/src/runtime/task-heartbeat.d.ts +22 -0
  746. package/packages/agent/src/runtime/task-heartbeat.d.ts.map +1 -0
  747. package/packages/agent/src/runtime/task-heartbeat.js +84 -0
  748. package/packages/agent/src/runtime/trajectory-internals.d.ts +37 -30
  749. package/packages/agent/src/runtime/trajectory-internals.d.ts.map +1 -1
  750. package/packages/agent/src/runtime/trajectory-internals.js +73 -47
  751. package/packages/agent/src/runtime/trajectory-persistence.d.ts +1 -1
  752. package/packages/agent/src/runtime/trajectory-persistence.d.ts.map +1 -1
  753. package/packages/agent/src/runtime/trajectory-persistence.js +1 -1
  754. package/packages/agent/src/runtime/trajectory-storage.d.ts +27 -1
  755. package/packages/agent/src/runtime/trajectory-storage.d.ts.map +1 -1
  756. package/packages/agent/src/runtime/trajectory-storage.js +124 -1
  757. package/packages/agent/src/runtime/web-search-tools.d.ts.map +1 -1
  758. package/packages/agent/src/security/access.d.ts.map +1 -1
  759. package/packages/agent/src/security/access.js +6 -26
  760. package/packages/agent/src/security/audit-log.d.ts +0 -2
  761. package/packages/agent/src/security/audit-log.d.ts.map +1 -1
  762. package/packages/agent/src/security/index.d.ts +1 -0
  763. package/packages/agent/src/security/index.d.ts.map +1 -1
  764. package/packages/agent/src/security/index.js +1 -0
  765. package/packages/agent/src/services/app-manager.d.ts +53 -1
  766. package/packages/agent/src/services/app-manager.d.ts.map +1 -1
  767. package/packages/agent/src/services/app-manager.js +219 -15
  768. package/packages/agent/src/services/app-package-modules.d.ts +3 -12
  769. package/packages/agent/src/services/app-package-modules.d.ts.map +1 -1
  770. package/packages/agent/src/services/app-package-modules.js +78 -11
  771. package/packages/agent/src/services/browser-workspace-desktop.d.ts +22 -0
  772. package/packages/agent/src/services/browser-workspace-desktop.d.ts.map +1 -0
  773. package/packages/agent/src/services/browser-workspace-desktop.js +1379 -0
  774. package/packages/agent/src/services/browser-workspace-elements.d.ts +42 -0
  775. package/packages/agent/src/services/browser-workspace-elements.d.ts.map +1 -0
  776. package/packages/agent/src/services/browser-workspace-elements.js +508 -0
  777. package/packages/agent/src/services/browser-workspace-forms.d.ts +19 -0
  778. package/packages/agent/src/services/browser-workspace-forms.d.ts.map +1 -0
  779. package/packages/agent/src/services/browser-workspace-forms.js +244 -0
  780. package/packages/agent/src/services/browser-workspace-helpers.d.ts +20 -0
  781. package/packages/agent/src/services/browser-workspace-helpers.d.ts.map +1 -0
  782. package/packages/agent/src/services/browser-workspace-helpers.js +121 -0
  783. package/packages/agent/src/services/browser-workspace-jsdom.d.ts +16 -0
  784. package/packages/agent/src/services/browser-workspace-jsdom.d.ts.map +1 -0
  785. package/packages/agent/src/services/browser-workspace-jsdom.js +223 -0
  786. package/packages/agent/src/services/browser-workspace-network.d.ts +7 -0
  787. package/packages/agent/src/services/browser-workspace-network.d.ts.map +1 -0
  788. package/packages/agent/src/services/browser-workspace-network.js +137 -0
  789. package/packages/agent/src/services/browser-workspace-snapshots.d.ts +14 -0
  790. package/packages/agent/src/services/browser-workspace-snapshots.d.ts.map +1 -0
  791. package/packages/agent/src/services/browser-workspace-snapshots.js +144 -0
  792. package/packages/agent/src/services/browser-workspace-state.d.ts +22 -0
  793. package/packages/agent/src/services/browser-workspace-state.d.ts.map +1 -0
  794. package/packages/agent/src/services/browser-workspace-state.js +129 -0
  795. package/packages/agent/src/services/browser-workspace-types.d.ts +262 -0
  796. package/packages/agent/src/services/browser-workspace-types.d.ts.map +1 -0
  797. package/packages/agent/src/services/browser-workspace-types.js +1 -0
  798. package/packages/agent/src/services/browser-workspace-web.d.ts +8 -0
  799. package/packages/agent/src/services/browser-workspace-web.d.ts.map +1 -0
  800. package/packages/agent/src/services/browser-workspace-web.js +1141 -0
  801. package/packages/agent/src/services/browser-workspace.d.ts +22 -165
  802. package/packages/agent/src/services/browser-workspace.d.ts.map +1 -1
  803. package/packages/agent/src/services/browser-workspace.js +89 -4043
  804. package/packages/agent/src/services/built-in-app-routes/hyperscape.d.ts.map +1 -1
  805. package/packages/agent/src/services/built-in-app-routes/hyperscape.js +9 -6
  806. package/packages/agent/src/services/character-persistence.d.ts.map +1 -1
  807. package/packages/agent/src/services/character-persistence.js +1 -2
  808. package/packages/agent/src/services/client-chat-sender.d.ts.map +1 -1
  809. package/packages/agent/src/services/coding-task-executor.d.ts +2 -8
  810. package/packages/agent/src/services/coding-task-executor.d.ts.map +1 -1
  811. package/packages/agent/src/services/coding-task-executor.js +34 -66
  812. package/packages/agent/src/services/connector-setup-service.d.ts +4 -4
  813. package/packages/agent/src/services/connector-setup-service.d.ts.map +1 -1
  814. package/packages/agent/src/services/escalation.d.ts.map +1 -1
  815. package/packages/agent/src/services/escalation.js +1 -1
  816. package/packages/agent/src/services/plugin-manager-types.d.ts +1 -0
  817. package/packages/agent/src/services/plugin-manager-types.d.ts.map +1 -1
  818. package/packages/agent/src/services/privy-wallets.d.ts +0 -5
  819. package/packages/agent/src/services/privy-wallets.d.ts.map +1 -1
  820. package/packages/agent/src/services/privy-wallets.js +0 -5
  821. package/packages/agent/src/services/registry-client-app-meta.d.ts.map +1 -1
  822. package/packages/agent/src/services/registry-client-app-meta.js +1 -0
  823. package/packages/agent/src/services/registry-client-local.d.ts.map +1 -1
  824. package/packages/agent/src/services/registry-client-local.js +1 -0
  825. package/packages/agent/src/services/registry-client-network.d.ts.map +1 -1
  826. package/packages/agent/src/services/registry-client-network.js +1 -0
  827. package/packages/agent/src/services/registry-client-queries.d.ts +11 -0
  828. package/packages/agent/src/services/registry-client-queries.d.ts.map +1 -1
  829. package/packages/agent/src/services/registry-client-queries.js +23 -0
  830. package/packages/agent/src/services/registry-client-types.d.ts +8 -32
  831. package/packages/agent/src/services/registry-client-types.d.ts.map +1 -1
  832. package/packages/agent/src/services/relationships-graph.d.ts +62 -1
  833. package/packages/agent/src/services/relationships-graph.d.ts.map +1 -1
  834. package/packages/agent/src/services/relationships-graph.js +116 -6
  835. package/packages/agent/src/services/signal-pairing.d.ts.map +1 -1
  836. package/packages/agent/src/services/signal-pairing.js +15 -1
  837. package/packages/agent/src/services/steward-evm-account.d.ts +0 -4
  838. package/packages/agent/src/services/steward-evm-account.d.ts.map +1 -1
  839. package/packages/agent/src/services/steward-evm-account.js +0 -4
  840. package/packages/agent/src/services/steward-evm-bridge.d.ts +0 -4
  841. package/packages/agent/src/services/steward-evm-bridge.d.ts.map +1 -1
  842. package/packages/agent/src/services/steward-evm-bridge.js +0 -4
  843. package/packages/agent/src/services/steward-wallet.d.ts +1 -6
  844. package/packages/agent/src/services/steward-wallet.d.ts.map +1 -1
  845. package/packages/agent/src/services/steward-wallet.js +0 -5
  846. package/packages/agent/src/services/tts-stream-bridge.d.ts.map +1 -1
  847. package/packages/agent/src/services/tts-stream-bridge.js +1 -1
  848. package/packages/agent/src/test-support/route-test-helpers.d.ts +2 -2
  849. package/packages/agent/src/test-support/route-test-helpers.d.ts.map +1 -1
  850. package/packages/agent/src/test-support/test-helpers.d.ts +2 -2
  851. package/packages/agent/src/test-support/test-helpers.d.ts.map +1 -1
  852. package/packages/agent/src/triggers/runtime.d.ts +1 -0
  853. package/packages/agent/src/triggers/runtime.d.ts.map +1 -1
  854. package/packages/agent/src/triggers/runtime.js +67 -16
  855. package/packages/agent/src/triggers/scheduling.d.ts +6 -1
  856. package/packages/agent/src/triggers/scheduling.d.ts.map +1 -1
  857. package/packages/agent/src/triggers/scheduling.js +66 -20
  858. package/packages/agent/src/triggers/types.d.ts +14 -37
  859. package/packages/agent/src/triggers/types.d.ts.map +1 -1
  860. package/packages/agent/src/triggers/types.js +1 -1
  861. package/packages/agent/src/types/trajectory.d.ts +42 -1
  862. package/packages/agent/src/types/trajectory.d.ts.map +1 -1
  863. package/packages/agent/src/types/trajectory.js +2 -1
  864. package/packages/agent/src/utils/index.d.ts +1 -1
  865. package/packages/agent/src/utils/index.d.ts.map +1 -1
  866. package/packages/agent/src/utils/index.js +1 -1
  867. package/packages/app-core/src/api/client-types-cloud.d.ts +799 -0
  868. package/packages/app-core/src/api/client-types-cloud.d.ts.map +1 -0
  869. package/packages/app-core/src/api/client-types-cloud.js +57 -0
  870. package/packages/app-core/src/api/client-types-core.d.ts +334 -0
  871. package/packages/app-core/src/api/client-types-core.d.ts.map +1 -0
  872. package/packages/app-core/src/api/client-types-core.js +22 -0
  873. package/packages/app-core/src/api/compat-route-shared.d.ts +2 -2
  874. package/packages/app-core/src/api/compat-route-shared.d.ts.map +1 -1
  875. package/packages/app-core/src/api/server-cloud-tts.js +1 -1
  876. package/packages/app-core/src/bridge/native-plugins.d.ts +290 -0
  877. package/packages/app-core/src/bridge/native-plugins.d.ts.map +1 -0
  878. package/packages/app-core/src/bridge/native-plugins.js +55 -0
  879. package/packages/app-core/src/config/boot-config-store.d.ts +121 -2
  880. package/packages/app-core/src/config/boot-config-store.d.ts.map +1 -1
  881. package/packages/app-core/src/config/boot-config-store.js +16 -7
  882. package/packages/app-core/src/services/plugin-installer.d.ts +93 -0
  883. package/packages/app-core/src/services/plugin-installer.d.ts.map +1 -0
  884. package/packages/app-core/src/services/plugin-installer.js +611 -0
  885. package/packages/app-core/src/utils/env.d.ts.map +1 -1
  886. package/packages/app-core/src/utils/serialise.d.ts +12 -0
  887. package/packages/app-core/src/utils/serialise.d.ts.map +1 -0
  888. package/packages/app-core/src/utils/serialise.js +21 -0
  889. package/packages/native-plugins/activity-tracker/src/index.d.ts +35 -0
  890. package/packages/native-plugins/activity-tracker/src/index.d.ts.map +1 -0
  891. package/packages/native-plugins/activity-tracker/src/index.js +102 -0
  892. package/packages/shared/src/connectors.d.ts.map +1 -1
  893. package/packages/shared/src/connectors.js +8 -3
  894. package/packages/shared/src/contracts/apps.d.ts +53 -0
  895. package/packages/shared/src/contracts/apps.d.ts.map +1 -1
  896. package/packages/shared/src/contracts/cloud-topology.d.ts.map +1 -1
  897. package/packages/shared/src/contracts/cloud-topology.js +2 -4
  898. package/packages/shared/src/contracts/config.d.ts.map +1 -1
  899. package/packages/shared/src/contracts/index.d.ts +1 -1
  900. package/packages/shared/src/contracts/index.d.ts.map +1 -1
  901. package/packages/shared/src/contracts/index.js +1 -1
  902. package/packages/shared/src/contracts/lifeops-extensions.d.ts +181 -0
  903. package/packages/shared/src/contracts/lifeops-extensions.d.ts.map +1 -0
  904. package/packages/shared/src/contracts/lifeops-extensions.js +30 -0
  905. package/packages/shared/src/contracts/lifeops.d.ts +259 -0
  906. package/packages/shared/src/contracts/lifeops.d.ts.map +1 -1
  907. package/packages/shared/src/contracts/lifeops.js +62 -0
  908. package/packages/shared/src/contracts/onboarding.d.ts +5 -0
  909. package/packages/shared/src/contracts/onboarding.d.ts.map +1 -1
  910. package/packages/shared/src/contracts/onboarding.js +7 -6
  911. package/packages/shared/src/contracts/service-routing.d.ts.map +1 -1
  912. package/packages/shared/src/contracts/service-routing.js +1 -3
  913. package/packages/shared/src/contracts/wallet.d.ts +30 -103
  914. package/packages/shared/src/contracts/wallet.d.ts.map +1 -1
  915. package/packages/shared/src/env-utils.impl.d.ts.map +1 -1
  916. package/packages/shared/src/env-utils.impl.js +1 -8
  917. package/packages/shared/src/i18n/keyword-matching.d.ts.map +1 -1
  918. package/packages/shared/src/i18n/validation-keywords.d.ts +1 -1
  919. package/packages/shared/src/i18n/validation-keywords.d.ts.map +1 -1
  920. package/packages/shared/src/i18n/validation-keywords.js +1 -1
  921. package/packages/shared/src/index.d.ts +3 -3
  922. package/packages/shared/src/index.d.ts.map +1 -1
  923. package/packages/shared/src/index.js +3 -3
  924. package/packages/shared/src/onboarding-presets.characters.d.ts.map +1 -1
  925. package/packages/shared/src/onboarding-presets.characters.js +15 -5
  926. package/packages/shared/src/onboarding-presets.d.ts.map +1 -1
  927. package/packages/shared/src/onboarding-presets.js +5 -1
  928. package/packages/shared/src/runtime-env.d.ts.map +1 -1
  929. package/packages/shared/src/runtime-env.js +2 -7
  930. package/packages/shared/src/settings-debug.d.ts.map +1 -1
  931. package/packages/shared/src/settings-debug.js +1 -3
  932. package/packages/skills/src/formatter.d.ts +44 -0
  933. package/packages/skills/src/formatter.d.ts.map +1 -0
  934. package/packages/skills/src/formatter.js +181 -0
  935. package/packages/skills/src/frontmatter.d.ts +51 -0
  936. package/packages/skills/src/frontmatter.d.ts.map +1 -0
  937. package/packages/skills/src/frontmatter.js +155 -0
  938. package/packages/skills/src/index.d.ts +29 -0
  939. package/packages/skills/src/index.d.ts.map +1 -0
  940. package/packages/skills/src/index.js +31 -0
  941. package/packages/skills/src/loader.d.ts +33 -0
  942. package/packages/skills/src/loader.d.ts.map +1 -0
  943. package/packages/skills/src/loader.js +369 -0
  944. package/packages/skills/src/resolver.d.ts +35 -0
  945. package/packages/skills/src/resolver.d.ts.map +1 -0
  946. package/packages/skills/src/resolver.js +146 -0
  947. package/packages/skills/src/types.d.ts +238 -0
  948. package/packages/skills/src/types.d.ts.map +1 -0
  949. package/packages/skills/src/types.js +1 -0
  950. package/packages/typescript/src/action-docs.d.ts.map +1 -1
  951. package/packages/typescript/src/action-docs.js +2 -0
  952. package/packages/typescript/src/actions.d.ts.map +1 -1
  953. package/packages/typescript/src/actions.js +8 -3
  954. package/packages/typescript/src/database/inMemoryAdapter.js +1 -1
  955. package/packages/typescript/src/features/advanced-capabilities/evaluators/factRefinement.d.ts +20 -0
  956. package/packages/typescript/src/features/advanced-capabilities/evaluators/factRefinement.d.ts.map +1 -0
  957. package/packages/typescript/src/features/advanced-capabilities/evaluators/factRefinement.js +362 -0
  958. package/packages/typescript/src/features/advanced-capabilities/evaluators/index.d.ts +3 -0
  959. package/packages/typescript/src/features/advanced-capabilities/evaluators/index.d.ts.map +1 -1
  960. package/packages/typescript/src/features/advanced-capabilities/evaluators/index.js +3 -0
  961. package/packages/typescript/src/features/advanced-capabilities/evaluators/reflection.js +1 -1
  962. package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.d.ts.map +1 -1
  963. package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.js +21 -0
  964. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillExtraction.d.ts +25 -0
  965. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillExtraction.d.ts.map +1 -0
  966. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillExtraction.js +367 -0
  967. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillRefinement.d.ts +21 -0
  968. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillRefinement.d.ts.map +1 -0
  969. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillRefinement.js +545 -0
  970. package/packages/typescript/src/features/advanced-capabilities/form/service.d.ts +1 -5
  971. package/packages/typescript/src/features/advanced-capabilities/form/service.d.ts.map +1 -1
  972. package/packages/typescript/src/features/advanced-capabilities/form/service.js +1 -13
  973. package/packages/typescript/src/features/advanced-capabilities/form/types.d.ts +3 -2
  974. package/packages/typescript/src/features/advanced-capabilities/form/types.d.ts.map +1 -1
  975. package/packages/typescript/src/features/advanced-capabilities/providers/facts.d.ts.map +1 -1
  976. package/packages/typescript/src/features/advanced-capabilities/providers/facts.js +68 -14
  977. package/packages/typescript/src/features/advanced-memory/services/memory-service.d.ts +1 -0
  978. package/packages/typescript/src/features/advanced-memory/services/memory-service.d.ts.map +1 -1
  979. package/packages/typescript/src/features/advanced-memory/services/memory-service.js +31 -11
  980. package/packages/typescript/src/features/autonomy/execution-facade.d.ts +1 -1
  981. package/packages/typescript/src/features/autonomy/execution-facade.d.ts.map +1 -1
  982. package/packages/typescript/src/features/autonomy/execution-facade.js +3 -3
  983. package/packages/typescript/src/features/basic-capabilities/actions/none.js +1 -1
  984. package/packages/typescript/src/features/basic-capabilities/index.d.ts.map +1 -1
  985. package/packages/typescript/src/features/basic-capabilities/index.js +9 -3
  986. package/packages/typescript/src/features/plugin-manager/coreExtensions.d.ts +4 -11
  987. package/packages/typescript/src/features/plugin-manager/coreExtensions.d.ts.map +1 -1
  988. package/packages/typescript/src/features/plugin-manager/coreExtensions.js +0 -23
  989. package/packages/typescript/src/features/plugin-manager/index.d.ts +1 -1
  990. package/packages/typescript/src/features/plugin-manager/index.d.ts.map +1 -1
  991. package/packages/typescript/src/features/plugin-manager/index.js +1 -1
  992. package/packages/typescript/src/features/plugin-manager/providers/relevance.d.ts.map +1 -1
  993. package/packages/typescript/src/features/plugin-manager/providers/relevance.js +1 -3
  994. package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts +13 -0
  995. package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts.map +1 -1
  996. package/packages/typescript/src/features/trajectories/TrajectoriesService.js +12 -9
  997. package/packages/typescript/src/features/trajectories/integration.d.ts +1 -1
  998. package/packages/typescript/src/features/trajectories/integration.d.ts.map +1 -1
  999. package/packages/typescript/src/features/trajectories/types.d.ts +19 -1
  1000. package/packages/typescript/src/features/trajectories/types.d.ts.map +1 -1
  1001. package/packages/typescript/src/features/trust/index.d.ts +3 -52
  1002. package/packages/typescript/src/features/trust/index.d.ts.map +1 -1
  1003. package/packages/typescript/src/features/trust/index.js +5 -122
  1004. package/packages/typescript/src/features/trust/services/wrappers.d.ts +56 -0
  1005. package/packages/typescript/src/features/trust/services/wrappers.d.ts.map +1 -0
  1006. package/packages/typescript/src/features/trust/services/wrappers.js +124 -0
  1007. package/packages/typescript/src/generated/action-docs.d.ts +207 -3
  1008. package/packages/typescript/src/generated/action-docs.d.ts.map +1 -1
  1009. package/packages/typescript/src/generated/action-docs.js +271 -2
  1010. package/packages/typescript/src/index.node.d.ts +3 -0
  1011. package/packages/typescript/src/index.node.d.ts.map +1 -1
  1012. package/packages/typescript/src/index.node.js +6 -0
  1013. package/packages/typescript/src/optimization/ab-analysis.d.ts +1 -1
  1014. package/packages/typescript/src/optimization/ab-analysis.d.ts.map +1 -1
  1015. package/packages/typescript/src/optimization/ab-analysis.js +1 -1
  1016. package/packages/typescript/src/optimization-root-dir.d.ts +6 -1
  1017. package/packages/typescript/src/optimization-root-dir.d.ts.map +1 -1
  1018. package/packages/typescript/src/optimization-root-dir.js +6 -1
  1019. package/packages/typescript/src/prompts.d.ts +2 -2
  1020. package/packages/typescript/src/prompts.d.ts.map +1 -1
  1021. package/packages/typescript/src/prompts.js +4 -1
  1022. package/packages/typescript/src/runtime.d.ts +3 -0
  1023. package/packages/typescript/src/runtime.d.ts.map +1 -1
  1024. package/packages/typescript/src/runtime.js +20 -5
  1025. package/packages/typescript/src/schemas/character.d.ts +1 -1
  1026. package/packages/typescript/src/schemas/character.d.ts.map +1 -1
  1027. package/packages/typescript/src/schemas/character.js +1 -1
  1028. package/packages/typescript/src/schemas/entity-identity.d.ts +29 -0
  1029. package/packages/typescript/src/schemas/entity-identity.d.ts.map +1 -0
  1030. package/packages/typescript/src/schemas/entity-identity.js +334 -0
  1031. package/packages/typescript/src/schemas/index.d.ts +3 -1
  1032. package/packages/typescript/src/schemas/index.d.ts.map +1 -1
  1033. package/packages/typescript/src/schemas/index.js +2 -1
  1034. package/packages/typescript/src/search.d.ts +0 -22
  1035. package/packages/typescript/src/search.d.ts.map +1 -1
  1036. package/packages/typescript/src/services/message.d.ts +11 -0
  1037. package/packages/typescript/src/services/message.d.ts.map +1 -1
  1038. package/packages/typescript/src/services/message.js +63 -36
  1039. package/packages/typescript/src/services/optimized-prompt-resolver.d.ts +23 -0
  1040. package/packages/typescript/src/services/optimized-prompt-resolver.d.ts.map +1 -0
  1041. package/packages/typescript/src/services/optimized-prompt-resolver.js +50 -0
  1042. package/packages/typescript/src/services/optimized-prompt.d.ts +117 -0
  1043. package/packages/typescript/src/services/optimized-prompt.d.ts.map +1 -0
  1044. package/packages/typescript/src/services/optimized-prompt.js +262 -0
  1045. package/packages/typescript/src/services/relationships.d.ts +225 -0
  1046. package/packages/typescript/src/services/relationships.d.ts.map +1 -1
  1047. package/packages/typescript/src/services/relationships.js +979 -3
  1048. package/packages/typescript/src/services/trajectories.d.ts +9 -0
  1049. package/packages/typescript/src/services/trajectories.d.ts.map +1 -1
  1050. package/packages/typescript/src/trajectory-context.d.ts +7 -0
  1051. package/packages/typescript/src/trajectory-context.d.ts.map +1 -1
  1052. package/packages/typescript/src/trajectory-utils.d.ts +24 -0
  1053. package/packages/typescript/src/trajectory-utils.d.ts.map +1 -1
  1054. package/packages/typescript/src/trajectory-utils.js +19 -0
  1055. package/packages/typescript/src/types/components.d.ts +6 -0
  1056. package/packages/typescript/src/types/components.d.ts.map +1 -1
  1057. package/packages/typescript/src/types/plugin.d.ts +11 -0
  1058. package/packages/typescript/src/types/plugin.d.ts.map +1 -1
  1059. package/packages/typescript/src/types/runtime.d.ts +12 -0
  1060. package/packages/typescript/src/types/runtime.d.ts.map +1 -1
  1061. package/packages/typescript/src/types/service.d.ts +2 -0
  1062. package/packages/typescript/src/types/service.d.ts.map +1 -1
  1063. package/packages/typescript/src/types/service.js +1 -0
  1064. package/packages/typescript/src/types/trigger.d.ts +4 -0
  1065. package/packages/typescript/src/types/trigger.d.ts.map +1 -1
  1066. package/packages/typescript/src/utils/batch-queue/batch-processor.d.ts +2 -3
  1067. package/packages/typescript/src/utils/batch-queue/batch-processor.d.ts.map +1 -1
  1068. package/packages/typescript/src/utils/batch-queue/batch-processor.js +0 -3
  1069. package/packages/typescript/src/utils/crypto-compat.js +1 -1
  1070. package/packages/typescript/src/utils/union-find.d.ts +30 -0
  1071. package/packages/typescript/src/utils/union-find.d.ts.map +1 -0
  1072. package/packages/typescript/src/utils/union-find.js +81 -0
  1073. package/packages/typescript/src/utils.d.ts +1 -0
  1074. package/packages/typescript/src/utils.d.ts.map +1 -1
  1075. package/packages/typescript/src/utils.js +5 -1
  1076. package/apps/app-lifeops/src/actions/inbox-digest.d.ts +0 -2
  1077. package/apps/app-lifeops/src/actions/inbox-digest.d.ts.map +0 -1
  1078. package/apps/app-lifeops/src/actions/inbox-digest.js +0 -1
  1079. package/apps/app-lifeops/src/actions/inbox-respond.d.ts +0 -2
  1080. package/apps/app-lifeops/src/actions/inbox-respond.d.ts.map +0 -1
  1081. package/apps/app-lifeops/src/actions/inbox-respond.js +0 -1
  1082. package/apps/app-lifeops/src/actions/inbox-triage.d.ts +0 -2
  1083. package/apps/app-lifeops/src/actions/inbox-triage.d.ts.map +0 -1
  1084. package/apps/app-lifeops/src/actions/inbox-triage.js +0 -1
  1085. package/apps/app-lifeops/src/lifeops/index.d.ts +0 -25
  1086. package/apps/app-lifeops/src/lifeops/index.d.ts.map +0 -1
  1087. package/apps/app-lifeops/src/lifeops/index.js +0 -24
  1088. package/apps/app-lifeops/src/selfcontrol/access.d.ts +0 -8
  1089. package/apps/app-lifeops/src/selfcontrol/access.d.ts.map +0 -1
  1090. package/apps/app-lifeops/src/selfcontrol/access.js +0 -16
  1091. package/apps/app-lifeops/src/selfcontrol/action.d.ts +0 -10
  1092. package/apps/app-lifeops/src/selfcontrol/action.d.ts.map +0 -1
  1093. package/apps/app-lifeops/src/selfcontrol/action.js +0 -506
  1094. package/apps/app-lifeops/src/selfcontrol/index.d.ts +0 -13
  1095. package/apps/app-lifeops/src/selfcontrol/index.d.ts.map +0 -1
  1096. package/apps/app-lifeops/src/selfcontrol/index.js +0 -10
  1097. package/apps/app-lifeops/src/selfcontrol/permissions.d.ts.map +0 -1
  1098. package/apps/app-lifeops/src/selfcontrol/provider.d.ts +0 -4
  1099. package/apps/app-lifeops/src/selfcontrol/provider.d.ts.map +0 -1
  1100. package/apps/app-lifeops/src/selfcontrol/provider.js +0 -116
  1101. package/apps/app-lifeops/src/selfcontrol/roles.d.ts +0 -19
  1102. package/apps/app-lifeops/src/selfcontrol/roles.d.ts.map +0 -1
  1103. package/apps/app-lifeops/src/selfcontrol/roles.js +0 -41
  1104. package/apps/app-lifeops/src/selfcontrol/selfcontrol.d.ts +0 -97
  1105. package/apps/app-lifeops/src/selfcontrol/selfcontrol.d.ts.map +0 -1
  1106. package/apps/app-lifeops/src/selfcontrol/selfcontrol.js +0 -949
  1107. package/apps/app-lifeops/src/selfcontrol/service.d.ts +0 -21
  1108. package/apps/app-lifeops/src/selfcontrol/service.d.ts.map +0 -1
  1109. package/apps/app-lifeops/src/selfcontrol/service.js +0 -268
  1110. package/packages/agent/src/actions/calendar.d.ts +0 -2
  1111. package/packages/agent/src/actions/calendar.d.ts.map +0 -1
  1112. package/packages/agent/src/actions/calendar.js +0 -1
  1113. package/packages/agent/src/actions/check-balance.d.ts +0 -17
  1114. package/packages/agent/src/actions/check-balance.d.ts.map +0 -1
  1115. package/packages/agent/src/actions/check-balance.js +0 -167
  1116. package/packages/agent/src/actions/execute-trade.d.ts +0 -17
  1117. package/packages/agent/src/actions/execute-trade.d.ts.map +0 -1
  1118. package/packages/agent/src/actions/execute-trade.js +0 -299
  1119. package/packages/agent/src/actions/gmail.d.ts +0 -2
  1120. package/packages/agent/src/actions/gmail.d.ts.map +0 -1
  1121. package/packages/agent/src/actions/gmail.js +0 -1
  1122. package/packages/agent/src/actions/inbox-digest.d.ts +0 -2
  1123. package/packages/agent/src/actions/inbox-digest.d.ts.map +0 -1
  1124. package/packages/agent/src/actions/inbox-digest.js +0 -1
  1125. package/packages/agent/src/actions/inbox-respond.d.ts +0 -2
  1126. package/packages/agent/src/actions/inbox-respond.d.ts.map +0 -1
  1127. package/packages/agent/src/actions/inbox-respond.js +0 -1
  1128. package/packages/agent/src/actions/inbox-triage.d.ts +0 -2
  1129. package/packages/agent/src/actions/inbox-triage.d.ts.map +0 -1
  1130. package/packages/agent/src/actions/inbox-triage.js +0 -1
  1131. package/packages/agent/src/actions/inbox.d.ts +0 -2
  1132. package/packages/agent/src/actions/inbox.d.ts.map +0 -1
  1133. package/packages/agent/src/actions/inbox.js +0 -1
  1134. package/packages/agent/src/actions/life-goal-extractor.d.ts +0 -2
  1135. package/packages/agent/src/actions/life-goal-extractor.d.ts.map +0 -1
  1136. package/packages/agent/src/actions/life-goal-extractor.js +0 -1
  1137. package/packages/agent/src/actions/life-param-extractor.d.ts +0 -2
  1138. package/packages/agent/src/actions/life-param-extractor.d.ts.map +0 -1
  1139. package/packages/agent/src/actions/life-param-extractor.js +0 -1
  1140. package/packages/agent/src/actions/life-recent-context.d.ts +0 -2
  1141. package/packages/agent/src/actions/life-recent-context.d.ts.map +0 -1
  1142. package/packages/agent/src/actions/life-recent-context.js +0 -1
  1143. package/packages/agent/src/actions/life-update-extractor.d.ts +0 -2
  1144. package/packages/agent/src/actions/life-update-extractor.d.ts.map +0 -1
  1145. package/packages/agent/src/actions/life-update-extractor.js +0 -1
  1146. package/packages/agent/src/actions/life.d.ts +0 -2
  1147. package/packages/agent/src/actions/life.d.ts.map +0 -1
  1148. package/packages/agent/src/actions/life.extractor.d.ts +0 -2
  1149. package/packages/agent/src/actions/life.extractor.d.ts.map +0 -1
  1150. package/packages/agent/src/actions/life.extractor.js +0 -1
  1151. package/packages/agent/src/actions/life.js +0 -1
  1152. package/packages/agent/src/actions/lifeops-extraction-config.d.ts +0 -2
  1153. package/packages/agent/src/actions/lifeops-extraction-config.d.ts.map +0 -1
  1154. package/packages/agent/src/actions/lifeops-extraction-config.js +0 -1
  1155. package/packages/agent/src/actions/lifeops-google-helpers.d.ts +0 -2
  1156. package/packages/agent/src/actions/lifeops-google-helpers.d.ts.map +0 -1
  1157. package/packages/agent/src/actions/lifeops-google-helpers.js +0 -1
  1158. package/packages/agent/src/actions/timezone-normalization.d.ts +0 -2
  1159. package/packages/agent/src/actions/timezone-normalization.d.ts.map +0 -1
  1160. package/packages/agent/src/actions/timezone-normalization.js +0 -1
  1161. package/packages/agent/src/actions/transfer-token.d.ts +0 -17
  1162. package/packages/agent/src/actions/transfer-token.d.ts.map +0 -1
  1163. package/packages/agent/src/actions/transfer-token.js +0 -470
  1164. package/packages/agent/src/actions/update-owner-profile.d.ts +0 -2
  1165. package/packages/agent/src/actions/update-owner-profile.d.ts.map +0 -1
  1166. package/packages/agent/src/actions/update-owner-profile.js +0 -1
  1167. package/packages/agent/src/actions/wallet-action-shared.d.ts +0 -15
  1168. package/packages/agent/src/actions/wallet-action-shared.d.ts.map +0 -1
  1169. package/packages/agent/src/actions/wallet-action-shared.js +0 -24
  1170. package/packages/agent/src/activity-profile/analyzer.d.ts.map +0 -1
  1171. package/packages/agent/src/activity-profile/analyzer.js +0 -531
  1172. package/packages/agent/src/activity-profile/proactive-planner.d.ts.map +0 -1
  1173. package/packages/agent/src/activity-profile/proactive-planner.js +0 -455
  1174. package/packages/agent/src/activity-profile/proactive-worker.d.ts.map +0 -1
  1175. package/packages/agent/src/activity-profile/proactive-worker.js +0 -523
  1176. package/packages/agent/src/activity-profile/profile-metadata.d.ts.map +0 -1
  1177. package/packages/agent/src/activity-profile/service.d.ts +0 -11
  1178. package/packages/agent/src/activity-profile/service.d.ts.map +0 -1
  1179. package/packages/agent/src/activity-profile/service.js +0 -226
  1180. package/packages/agent/src/activity-profile/types.d.ts.map +0 -1
  1181. package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts +0 -2
  1182. package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts.map +0 -1
  1183. package/packages/agent/src/api/coding-agents-auth-sanitize.js +0 -1
  1184. package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts +0 -2
  1185. package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts.map +0 -1
  1186. package/packages/agent/src/api/coding-agents-preflight-normalize.js +0 -1
  1187. package/packages/agent/src/api/coordinator-types.d.ts +0 -2
  1188. package/packages/agent/src/api/coordinator-types.d.ts.map +0 -1
  1189. package/packages/agent/src/api/coordinator-types.js +0 -1
  1190. package/packages/agent/src/api/coordinator-wiring.d.ts +0 -2
  1191. package/packages/agent/src/api/coordinator-wiring.d.ts.map +0 -1
  1192. package/packages/agent/src/api/coordinator-wiring.js +0 -1
  1193. package/packages/agent/src/api/drop-routes.d.ts +0 -22
  1194. package/packages/agent/src/api/drop-routes.d.ts.map +0 -1
  1195. package/packages/agent/src/api/drop-service.d.ts +0 -26
  1196. package/packages/agent/src/api/drop-service.d.ts.map +0 -1
  1197. package/packages/agent/src/api/lifeops-routes.d.ts +0 -2
  1198. package/packages/agent/src/api/lifeops-routes.d.ts.map +0 -1
  1199. package/packages/agent/src/api/lifeops-routes.js +0 -1
  1200. package/packages/agent/src/api/merkle-tree.d.ts.map +0 -1
  1201. package/packages/agent/src/api/nft-verify.d.ts +0 -16
  1202. package/packages/agent/src/api/nft-verify.d.ts.map +0 -1
  1203. package/packages/agent/src/api/nft-verify.js +0 -81
  1204. package/packages/agent/src/api/og-tracker.d.ts.map +0 -1
  1205. package/packages/agent/src/api/og-tracker.js +0 -60
  1206. package/packages/agent/src/api/task-agent-message-routing.d.ts +0 -2
  1207. package/packages/agent/src/api/task-agent-message-routing.d.ts.map +0 -1
  1208. package/packages/agent/src/api/task-agent-message-routing.js +0 -1
  1209. package/packages/agent/src/api/twitter-verify.d.ts +0 -25
  1210. package/packages/agent/src/api/twitter-verify.d.ts.map +0 -1
  1211. package/packages/agent/src/api/twitter-verify.js +0 -168
  1212. package/packages/agent/src/api/website-blocker-routes.d.ts +0 -2
  1213. package/packages/agent/src/api/website-blocker-routes.d.ts.map +0 -1
  1214. package/packages/agent/src/api/website-blocker-routes.js +0 -1
  1215. package/packages/agent/src/config/runtime-env.d.ts +0 -2
  1216. package/packages/agent/src/config/runtime-env.d.ts.map +0 -1
  1217. package/packages/agent/src/config/runtime-env.js +0 -1
  1218. package/packages/agent/src/evals/coordinator-eval-client.d.ts +0 -2
  1219. package/packages/agent/src/evals/coordinator-eval-client.d.ts.map +0 -1
  1220. package/packages/agent/src/evals/coordinator-eval-client.js +0 -1
  1221. package/packages/agent/src/evals/coordinator-live-runner.d.ts +0 -2
  1222. package/packages/agent/src/evals/coordinator-live-runner.d.ts.map +0 -1
  1223. package/packages/agent/src/evals/coordinator-live-runner.js +0 -1
  1224. package/packages/agent/src/evals/coordinator-preflight.d.ts +0 -2
  1225. package/packages/agent/src/evals/coordinator-preflight.d.ts.map +0 -1
  1226. package/packages/agent/src/evals/coordinator-preflight.js +0 -1
  1227. package/packages/agent/src/evals/coordinator-scenarios.d.ts +0 -2
  1228. package/packages/agent/src/evals/coordinator-scenarios.d.ts.map +0 -1
  1229. package/packages/agent/src/evals/coordinator-scenarios.js +0 -1
  1230. package/packages/agent/src/lifeops/app-state.d.ts +0 -2
  1231. package/packages/agent/src/lifeops/app-state.d.ts.map +0 -1
  1232. package/packages/agent/src/lifeops/app-state.js +0 -1
  1233. package/packages/agent/src/lifeops/apple-reminders.d.ts +0 -2
  1234. package/packages/agent/src/lifeops/apple-reminders.d.ts.map +0 -1
  1235. package/packages/agent/src/lifeops/apple-reminders.js +0 -1
  1236. package/packages/agent/src/lifeops/defaults.d.ts +0 -2
  1237. package/packages/agent/src/lifeops/defaults.d.ts.map +0 -1
  1238. package/packages/agent/src/lifeops/defaults.js +0 -1
  1239. package/packages/agent/src/lifeops/engine.d.ts +0 -2
  1240. package/packages/agent/src/lifeops/engine.d.ts.map +0 -1
  1241. package/packages/agent/src/lifeops/engine.js +0 -1
  1242. package/packages/agent/src/lifeops/goal-grounding.d.ts +0 -2
  1243. package/packages/agent/src/lifeops/goal-grounding.d.ts.map +0 -1
  1244. package/packages/agent/src/lifeops/goal-grounding.js +0 -1
  1245. package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts +0 -2
  1246. package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts.map +0 -1
  1247. package/packages/agent/src/lifeops/goal-semantic-evaluator.js +0 -1
  1248. package/packages/agent/src/lifeops/google-api-error.d.ts +0 -2
  1249. package/packages/agent/src/lifeops/google-api-error.d.ts.map +0 -1
  1250. package/packages/agent/src/lifeops/google-api-error.js +0 -1
  1251. package/packages/agent/src/lifeops/google-calendar.d.ts +0 -2
  1252. package/packages/agent/src/lifeops/google-calendar.d.ts.map +0 -1
  1253. package/packages/agent/src/lifeops/google-calendar.js +0 -1
  1254. package/packages/agent/src/lifeops/google-connector-gateway.d.ts +0 -2
  1255. package/packages/agent/src/lifeops/google-connector-gateway.d.ts.map +0 -1
  1256. package/packages/agent/src/lifeops/google-connector-gateway.js +0 -1
  1257. package/packages/agent/src/lifeops/google-fetch.d.ts +0 -2
  1258. package/packages/agent/src/lifeops/google-fetch.d.ts.map +0 -1
  1259. package/packages/agent/src/lifeops/google-fetch.js +0 -1
  1260. package/packages/agent/src/lifeops/google-gmail.d.ts +0 -2
  1261. package/packages/agent/src/lifeops/google-gmail.d.ts.map +0 -1
  1262. package/packages/agent/src/lifeops/google-gmail.js +0 -1
  1263. package/packages/agent/src/lifeops/google-managed-client.d.ts +0 -2
  1264. package/packages/agent/src/lifeops/google-managed-client.d.ts.map +0 -1
  1265. package/packages/agent/src/lifeops/google-managed-client.js +0 -1
  1266. package/packages/agent/src/lifeops/google-oauth.d.ts +0 -2
  1267. package/packages/agent/src/lifeops/google-oauth.d.ts.map +0 -1
  1268. package/packages/agent/src/lifeops/google-oauth.js +0 -1
  1269. package/packages/agent/src/lifeops/google-scopes.d.ts +0 -2
  1270. package/packages/agent/src/lifeops/google-scopes.d.ts.map +0 -1
  1271. package/packages/agent/src/lifeops/google-scopes.js +0 -1
  1272. package/packages/agent/src/lifeops/index.d.ts +0 -2
  1273. package/packages/agent/src/lifeops/index.d.ts.map +0 -1
  1274. package/packages/agent/src/lifeops/index.js +0 -1
  1275. package/packages/agent/src/lifeops/owner-profile.d.ts +0 -2
  1276. package/packages/agent/src/lifeops/owner-profile.d.ts.map +0 -1
  1277. package/packages/agent/src/lifeops/owner-profile.js +0 -1
  1278. package/packages/agent/src/lifeops/repository.d.ts +0 -2
  1279. package/packages/agent/src/lifeops/repository.d.ts.map +0 -1
  1280. package/packages/agent/src/lifeops/repository.js +0 -1
  1281. package/packages/agent/src/lifeops/runtime.d.ts +0 -2
  1282. package/packages/agent/src/lifeops/runtime.d.ts.map +0 -1
  1283. package/packages/agent/src/lifeops/runtime.js +0 -1
  1284. package/packages/agent/src/lifeops/screen-context.d.ts +0 -2
  1285. package/packages/agent/src/lifeops/screen-context.d.ts.map +0 -1
  1286. package/packages/agent/src/lifeops/screen-context.js +0 -1
  1287. package/packages/agent/src/lifeops/seed-routines.d.ts +0 -2
  1288. package/packages/agent/src/lifeops/seed-routines.d.ts.map +0 -1
  1289. package/packages/agent/src/lifeops/seed-routines.js +0 -1
  1290. package/packages/agent/src/lifeops/service.d.ts +0 -2
  1291. package/packages/agent/src/lifeops/service.d.ts.map +0 -1
  1292. package/packages/agent/src/lifeops/service.js +0 -1
  1293. package/packages/agent/src/lifeops/sql.d.ts +0 -2
  1294. package/packages/agent/src/lifeops/sql.d.ts.map +0 -1
  1295. package/packages/agent/src/lifeops/sql.js +0 -1
  1296. package/packages/agent/src/lifeops/time.d.ts +0 -2
  1297. package/packages/agent/src/lifeops/time.d.ts.map +0 -1
  1298. package/packages/agent/src/lifeops/time.js +0 -1
  1299. package/packages/agent/src/lifeops/twilio.d.ts +0 -2
  1300. package/packages/agent/src/lifeops/twilio.d.ts.map +0 -1
  1301. package/packages/agent/src/lifeops/twilio.js +0 -1
  1302. package/packages/agent/src/lifeops/x-poster.d.ts +0 -2
  1303. package/packages/agent/src/lifeops/x-poster.d.ts.map +0 -1
  1304. package/packages/agent/src/lifeops/x-poster.js +0 -1
  1305. package/packages/agent/src/providers/activity-profile.d.ts.map +0 -1
  1306. package/packages/agent/src/providers/activity-profile.js +0 -140
  1307. package/packages/agent/src/providers/inbox-triage.d.ts +0 -2
  1308. package/packages/agent/src/providers/inbox-triage.d.ts.map +0 -1
  1309. package/packages/agent/src/providers/inbox-triage.js +0 -1
  1310. package/packages/agent/src/providers/lifeops.d.ts +0 -2
  1311. package/packages/agent/src/providers/lifeops.d.ts.map +0 -1
  1312. package/packages/agent/src/providers/lifeops.js +0 -1
  1313. package/packages/agent/src/utils/spoken-text.d.ts +0 -2
  1314. package/packages/agent/src/utils/spoken-text.d.ts.map +0 -1
  1315. package/packages/agent/src/utils/spoken-text.js +0 -1
  1316. package/packages/app-core/src/config/config.d.ts +0 -12
  1317. package/packages/app-core/src/config/config.d.ts.map +0 -1
  1318. package/packages/app-core/src/config/config.js +0 -23
  1319. package/packages/app-core/src/types/index.d.ts +0 -649
  1320. package/packages/app-core/src/types/index.d.ts.map +0 -1
  1321. package/packages/app-core/src/types/lifeops-ui.d.ts +0 -10
  1322. package/packages/app-core/src/types/lifeops-ui.d.ts.map +0 -1
  1323. package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.d.ts +0 -4
  1324. package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.d.ts.map +0 -1
  1325. package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.js +0 -150
  1326. package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.d.ts +0 -4
  1327. package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.d.ts.map +0 -1
  1328. package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.js +0 -136
  1329. package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.d.ts +0 -4
  1330. package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.d.ts.map +0 -1
  1331. package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.js +0 -84
  1332. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.d.ts +0 -4
  1333. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.d.ts.map +0 -1
  1334. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.js +0 -107
  1335. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.d.ts +0 -16
  1336. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.d.ts.map +0 -1
  1337. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.js +0 -187
  1338. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.d.ts +0 -4
  1339. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.d.ts.map +0 -1
  1340. package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.js +0 -138
  1341. package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts +0 -4
  1342. package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts.map +0 -1
  1343. package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.js +0 -96
  1344. package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.d.ts +0 -4
  1345. package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.d.ts.map +0 -1
  1346. package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.js +0 -139
  1347. package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.d.ts +0 -4
  1348. package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.d.ts.map +0 -1
  1349. package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.js +0 -138
  1350. package/packages/typescript/src/advanced-capabilities/clipboard/index.d.ts +0 -39
  1351. package/packages/typescript/src/advanced-capabilities/clipboard/index.d.ts.map +0 -1
  1352. package/packages/typescript/src/advanced-capabilities/clipboard/index.js +0 -78
  1353. package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.d.ts +0 -4
  1354. package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.d.ts.map +0 -1
  1355. package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.js +0 -62
  1356. package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.d.ts +0 -16
  1357. package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.d.ts.map +0 -1
  1358. package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.js +0 -162
  1359. package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.d.ts +0 -65
  1360. package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.d.ts.map +0 -1
  1361. package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.js +0 -352
  1362. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts +0 -24
  1363. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts.map +0 -1
  1364. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.js +0 -63
  1365. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.d.ts +0 -29
  1366. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.d.ts.map +0 -1
  1367. package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.js +0 -195
  1368. package/packages/typescript/src/advanced-capabilities/clipboard/specs.d.ts +0 -15
  1369. package/packages/typescript/src/advanced-capabilities/clipboard/specs.d.ts.map +0 -1
  1370. package/packages/typescript/src/advanced-capabilities/clipboard/specs.js +0 -164
  1371. package/packages/typescript/src/advanced-capabilities/clipboard/types.d.ts +0 -92
  1372. package/packages/typescript/src/advanced-capabilities/clipboard/types.d.ts.map +0 -1
  1373. package/packages/typescript/src/advanced-capabilities/clipboard/types.js +0 -4
  1374. package/packages/typescript/src/index.d.ts +0 -12
  1375. package/packages/typescript/src/index.d.ts.map +0 -1
  1376. package/packages/typescript/src/index.js +0 -13
  1377. /package/{packages/agent/src/api → apps/app-elizamaker/src}/drop-routes.js +0 -0
  1378. /package/{packages/agent/src/api → apps/app-elizamaker/src}/drop-service.js +0 -0
  1379. /package/{packages/agent/src/api → apps/app-elizamaker/src}/merkle-tree.d.ts +0 -0
  1380. /package/{packages/agent/src/api → apps/app-elizamaker/src}/merkle-tree.js +0 -0
  1381. /package/{packages/agent/src/api → apps/app-elizamaker/src}/og-tracker.d.ts +0 -0
  1382. /package/{packages/agent → apps/app-lifeops}/src/activity-profile/analyzer.d.ts +0 -0
  1383. /package/{packages/agent → apps/app-lifeops}/src/activity-profile/proactive-planner.d.ts +0 -0
  1384. /package/{packages/agent → apps/app-lifeops}/src/activity-profile/proactive-worker.d.ts +0 -0
  1385. /package/{packages/agent → apps/app-lifeops}/src/activity-profile/profile-metadata.d.ts +0 -0
  1386. /package/{packages/agent → apps/app-lifeops}/src/activity-profile/profile-metadata.js +0 -0
  1387. /package/{packages/agent → apps/app-lifeops}/src/activity-profile/types.d.ts +0 -0
  1388. /package/{packages/agent → apps/app-lifeops}/src/activity-profile/types.js +0 -0
  1389. /package/{packages/agent → apps/app-lifeops}/src/providers/activity-profile.d.ts +0 -0
  1390. /package/apps/app-lifeops/src/{selfcontrol/permissions.js → types/app-blocker-settings-card.js} +0 -0
  1391. /package/{packages/app-core → apps/app-lifeops}/src/types/index.js +0 -0
  1392. /package/{packages/app-core/src/types/lifeops-ui.js → apps/app-lifeops/src/types/website-blocker-settings-card.js} +0 -0
  1393. /package/apps/app-lifeops/src/{selfcontrol → website-blocker}/permissions.d.ts +0 -0
@@ -1,23 +1,20 @@
1
1
  import { ModelType, parseJSONObjectFromText, parseKeyValueXml, } from "@elizaos/core";
2
- import { getValidationKeywordTerms, textIncludesKeywordTerm, } from "@elizaos/shared/validation-keywords";
3
2
  import { resolveDefaultTimeZone } from "../lifeops/defaults.js";
4
3
  import { LifeOpsService, LifeOpsServiceError } from "../lifeops/service.js";
5
4
  import { addDaysToLocalDate, buildUtcDateFromLocalParts, getWeekdayForLocalDate, getZonedDateParts, } from "../lifeops/time.js";
6
- import { collectKeywordTermMatchesForKey, hasContextSignalSyncForKey, } from "@elizaos/agent/actions/context-signal";
7
5
  import { renderGroundedActionReply } from "@elizaos/agent/actions/grounded-action-reply";
8
6
  import { calendarReadUnavailableMessage, calendarWriteUnavailableMessage, detailArray, detailBoolean, detailNumber, detailString, formatCalendarEventDateTime, formatCalendarFeed, formatNextEventContext, getGoogleCapabilityStatus, hasLifeOpsAccess, INTERNAL_URL, messageText, toActionData, } from "./lifeops-google-helpers.js";
7
+ const CALENDAR_SUBACTION_VALUES = [
8
+ "feed",
9
+ "next_event",
10
+ "search_events",
11
+ "create_event",
12
+ "update_event",
13
+ "delete_event",
14
+ "trip_window",
15
+ ];
9
16
  const MIN_CREATE_EVENT_DURATION_MINUTES = 15;
10
- const CALENDAR_VALIDATION_CONTEXT_LIMIT = 12;
11
17
  const PARAMETER_DOC_NOISE_PATTERN = /\b(?:actions?|params?|parameters?|query\?:string|subaction\?:string|details\?:object|required parameter|supported keys include|may include:|match against titles|structured calendar arguments|structured data when needed|boolean when)\b|\b\w+\?:\w+\b/i;
12
- const CAL_I18N_OPTS = { includeAllLocales: true };
13
- const CAL_AFFIRMATIVE_TERMS = getValidationKeywordTerms("contextSignal.affirmative.strong", CAL_I18N_OPTS);
14
- const CAL_TEMPORAL_FOLLOWUP_TERMS = getValidationKeywordTerms("contextSignal.temporal_followup.strong", CAL_I18N_OPTS);
15
- const CAL_LIFEOPS_STRONG_TERMS = getValidationKeywordTerms("contextSignal.lifeops.strong", CAL_I18N_OPTS);
16
- const CAL_CALENDAR_STRONG_TERMS = getValidationKeywordTerms("contextSignal.calendar.strong", CAL_I18N_OPTS);
17
- const CAL_CALENDAR_WEAK_TERMS = getValidationKeywordTerms("contextSignal.calendar.weak", CAL_I18N_OPTS);
18
- function textMatchesAnyCal(text, terms) {
19
- return terms.some((term) => textIncludesKeywordTerm(text, term));
20
- }
21
18
  const I18N_LOCALES = ["en", "zh-CN", "ko", "es", "pt", "vi", "tl"];
22
19
  function buildIntlMonthMap() {
23
20
  const map = {};
@@ -100,6 +97,86 @@ function normalizeCalendarSubaction(value) {
100
97
  return null;
101
98
  }
102
99
  }
100
+ function buildCalendarPlanFromParsed(parsed) {
101
+ const shouldAct = normalizeShouldAct(parsed.shouldAct);
102
+ if (shouldAct === null) {
103
+ return null;
104
+ }
105
+ const subaction = normalizeCalendarSubaction(parsed.subaction);
106
+ if (shouldAct && subaction === null) {
107
+ return null;
108
+ }
109
+ const tripLocation = typeof parsed.tripLocation === "string" &&
110
+ parsed.tripLocation.trim().length > 0
111
+ ? parsed.tripLocation.trim()
112
+ : undefined;
113
+ const rawQueries = [];
114
+ if (typeof parsed.queries === "string" && parsed.queries.trim().length > 0) {
115
+ for (const q of parsed.queries.split(/\s*\|\|\s*/)) {
116
+ if (q.trim().length > 0)
117
+ rawQueries.push(q.trim());
118
+ }
119
+ }
120
+ else if (Array.isArray(parsed.queries)) {
121
+ for (const value of parsed.queries) {
122
+ if (typeof value === "string")
123
+ rawQueries.push(value);
124
+ }
125
+ }
126
+ if (typeof parsed.query === "string")
127
+ rawQueries.push(parsed.query);
128
+ if (typeof parsed.query1 === "string")
129
+ rawQueries.push(parsed.query1);
130
+ if (typeof parsed.query2 === "string")
131
+ rawQueries.push(parsed.query2);
132
+ if (typeof parsed.query3 === "string")
133
+ rawQueries.push(parsed.query3);
134
+ if (tripLocation)
135
+ rawQueries.push(tripLocation);
136
+ return {
137
+ subaction,
138
+ queries: dedupeCalendarQueries(rawQueries),
139
+ response: normalizePlannerResponse(parsed.response),
140
+ shouldAct,
141
+ title: typeof parsed.title === "string" && parsed.title.trim().length > 0
142
+ ? parsed.title.trim()
143
+ : undefined,
144
+ tripLocation,
145
+ timeMin: normalizeIsoDateTime(parsed.timeMin),
146
+ timeMax: normalizeIsoDateTime(parsed.timeMax),
147
+ windowLabel: normalizeWindowLabel(parsed.windowLabel ?? parsed.label),
148
+ };
149
+ }
150
+ function buildCalendarPlanRepairPrompt(args) {
151
+ return [
152
+ "Your last reply for the calendar planner was invalid or used the wrong schema.",
153
+ "Return ONLY valid JSON with exactly these fields:",
154
+ " subaction: one of the allowed subactions below, or null when this should be reply-only/no-op",
155
+ " shouldAct: boolean",
156
+ " response: short natural-language reply when shouldAct is false, otherwise empty or null",
157
+ " queries: array or ||-delimited string of up to 3 search queries",
158
+ " title: optional event title",
159
+ " tripLocation: optional trip location",
160
+ " timeMin: optional ISO 8601 datetime",
161
+ " timeMax: optional ISO 8601 datetime",
162
+ " windowLabel: optional natural-language window label",
163
+ "",
164
+ "Use ONLY these exact subaction literals:",
165
+ ` ${CALENDAR_SUBACTION_VALUES.join(", ")}, or null`,
166
+ "Never invent synonyms such as edit_event, modify_event, reschedule_event, move_event, cancel_event, remove_event, agenda, or itinerary_window.",
167
+ "Map rename/reschedule/move/edit requests for an existing event to update_event.",
168
+ "Map delete/remove/cancel requests for an existing event to delete_event.",
169
+ "The user may speak in any language.",
170
+ "",
171
+ `Current timezone: ${args.timeZone}`,
172
+ `Current local datetime: ${args.localNow}`,
173
+ `Current ISO datetime: ${args.nowIso}`,
174
+ `Current request: ${JSON.stringify(args.currentMessage)}`,
175
+ `Resolved intent: ${JSON.stringify(args.intent)}`,
176
+ `Recent conversation: ${JSON.stringify(args.recentConversation)}`,
177
+ `Previous invalid output: ${JSON.stringify(args.rawResponse)}`,
178
+ ].join("\n");
179
+ }
103
180
  function normalizeShouldAct(value) {
104
181
  if (typeof value === "boolean") {
105
182
  return value;
@@ -140,18 +217,6 @@ function buildCalendarReplyOnlyFallback(subaction) {
140
217
  return "What do you want to do on your calendar — check your schedule, find an event, or create one?";
141
218
  }
142
219
  }
143
- function looksLikeLifeReminderRequestForCalendarAction(text) {
144
- const normalized = normalizeText(text);
145
- if (!normalized) {
146
- return false;
147
- }
148
- if (collectKeywordTermMatchesForKey([normalized], "calendar", {
149
- includeAllLocales: true,
150
- }).size > 0) {
151
- return false;
152
- }
153
- return textMatchesAnyCal(normalized, CAL_LIFEOPS_STRONG_TERMS);
154
- }
155
220
  function buildCalendarServiceErrorFallback(error, intent) {
156
221
  const normalized = normalizeText(error.message);
157
222
  if (normalized.includes("utc 'z' suffix") ||
@@ -189,27 +254,6 @@ function buildCalendarEventDisambiguationFallback(args) {
189
254
  `Tell me which one to ${args.action} by giving the title and date/time.${suffix}`,
190
255
  ].join("\n");
191
256
  }
192
- function shouldDeleteAllMatchingCalendarEvents(args) {
193
- const normalizedIntent = normalizeText(args.intent);
194
- const normalizedTitleHint = normalizeText(args.titleHint ?? "");
195
- const titleStartsWithQuantifier = /^(all|both|every|each)\b/.test(normalizedTitleHint);
196
- if (/\b(?:remove|delete|cancel|kill|drop)\b\s+(?:the\s+)?(?:duplicates?|copies)\b/.test(normalizedIntent)) {
197
- return true;
198
- }
199
- const quantifierMatch = normalizedIntent.match(/\b(?:remove|delete|cancel|kill|drop)\b\s+(both|all|every|each)\b/);
200
- if (!quantifierMatch) {
201
- return false;
202
- }
203
- if (titleStartsWithQuantifier) {
204
- return false;
205
- }
206
- const quantifier = quantifierMatch[1];
207
- if (quantifier === "both" && args.candidateCount !== 2) {
208
- return false;
209
- }
210
- const trailingIntent = normalizedIntent.slice((quantifierMatch.index ?? 0) + quantifierMatch[0].length);
211
- return /\b(?:matching|events?|meetings?|appointments?|invites?|entries|duplicates?|copies)\b/.test(trailingIntent);
212
- }
213
257
  async function renderCalendarActionReply(args) {
214
258
  const { runtime, message, state, intent, scenario, fallback, context } = args;
215
259
  return renderGroundedActionReply({
@@ -237,21 +281,6 @@ function normalizeText(value) {
237
281
  function normalizeLookupKey(value) {
238
282
  return value.toLowerCase().replace(/[^a-z0-9]/g, "");
239
283
  }
240
- function hasCalendarTextSignal(text) {
241
- if (!text.trim()) {
242
- return false;
243
- }
244
- if (collectKeywordTermMatchesForKey([text], "calendar", {
245
- includeAllLocales: true,
246
- strength: "strong",
247
- }).size > 0) {
248
- return true;
249
- }
250
- return (collectKeywordTermMatchesForKey([text], "calendar", {
251
- includeAllLocales: true,
252
- strength: "weak",
253
- }).size >= 2);
254
- }
255
284
  function wordCount(value) {
256
285
  const normalized = normalizeText(value);
257
286
  if (!normalized) {
@@ -296,12 +325,6 @@ function normalizeCalendarSearchQueryValue(value) {
296
325
  const cleaned = normalizeText(value)
297
326
  .replace(/\b(?:actions?|params?|parameters?)\b[:;]*/g, "")
298
327
  .replace(/\b\w+\?:\w+(?:\s+\[[^\]]+\])?\s*-\s*/g, " ")
299
- .replace(/\b(?:search|find|look(?:ing)? for|show me|check)\s+(?:my\s+)?(?:calendar|schedule)\s+for\b/g, "")
300
- .replace(/\b(?:search|find|look(?:ing)? for|show me|check)\b/g, "")
301
- .replace(/\b(?:on|in) my calendar\b/g, "")
302
- .replace(/\b(?:today|tomorrow|tonight|this week(?:end)?|next week(?:end)?|week after(?: next)?|this month|next month|this year|next year)\b/g, "")
303
- .replace(/\b(?:scheduled|coming up|happening|for me)\b/g, "")
304
- .replace(/\b(?:events?|appointments?|meetings?)\b$/g, "")
305
328
  .replace(/\bsupported keys include\b.*$/g, "")
306
329
  .replace(/\bmatch against titles\b.*$/g, "")
307
330
  .replace(/\bstructured calendar arguments\b.*$/g, "")
@@ -310,7 +333,7 @@ function normalizeCalendarSearchQueryValue(value) {
310
333
  .trim();
311
334
  if (!cleaned ||
312
335
  ["calendar", "schedule", "event", "events"].includes(cleaned) ||
313
- textMatchesAnyCal(cleaned, CAL_TEMPORAL_FOLLOWUP_TERMS) ||
336
+ cleaned.length > 160 ||
314
337
  PARAMETER_DOC_NOISE_PATTERN.test(cleaned)) {
315
338
  return undefined;
316
339
  }
@@ -349,57 +372,30 @@ function parseStateLine(line) {
349
372
  const trimmed = line.trim();
350
373
  const timestampedMatch = trimmed.match(/^\d{1,2}:\d{2}\s+\([^)]+\)\s+\[[^\]]+\]\s+(\S+)\s*:\s*(.*)/);
351
374
  if (timestampedMatch) {
375
+ const role = timestampedMatch[1];
376
+ const text = timestampedMatch[2];
377
+ if (!role || text === undefined) {
378
+ return { role: "", text: trimmed };
379
+ }
352
380
  return {
353
- role: timestampedMatch[1].toLowerCase(),
354
- text: timestampedMatch[2].trim(),
381
+ role: role.toLowerCase(),
382
+ text: text.trim(),
355
383
  };
356
384
  }
357
385
  const simpleMatch = trimmed.match(/^(user|assistant|system|owner|admin|\S+)\s*:\s*(.*)/i);
358
386
  if (simpleMatch) {
387
+ const role = simpleMatch[1];
388
+ const text = simpleMatch[2];
389
+ if (!role || text === undefined) {
390
+ return { role: "", text: trimmed };
391
+ }
359
392
  return {
360
- role: simpleMatch[1].toLowerCase(),
361
- text: simpleMatch[2].trim(),
393
+ role: role.toLowerCase(),
394
+ text: text.trim(),
362
395
  };
363
396
  }
364
397
  return { role: "", text: trimmed };
365
398
  }
366
- const SYSTEM_ROLE_NAMES = new Set(["assistant", "system"]);
367
- function splitStateTextCandidates(value) {
368
- return value
369
- .split(/\n+/)
370
- .map((line) => parseStateLine(line).text)
371
- .filter((text) => text.length > 0);
372
- }
373
- function userIntentsFromState(state) {
374
- if (!state || typeof state !== "object") {
375
- return [];
376
- }
377
- const stateRecord = state;
378
- const values = stateRecord.values && typeof stateRecord.values === "object"
379
- ? stateRecord.values
380
- : undefined;
381
- const raw = typeof values?.recentMessages === "string"
382
- ? values.recentMessages
383
- : typeof stateRecord.text === "string"
384
- ? stateRecord.text
385
- : "";
386
- if (!raw) {
387
- return [];
388
- }
389
- const agentName = typeof values?.agentName === "string" ? values.agentName.toLowerCase() : "";
390
- const excludedRoles = new Set(SYSTEM_ROLE_NAMES);
391
- if (agentName) {
392
- excludedRoles.add(agentName);
393
- }
394
- return raw
395
- .split(/\n+/)
396
- .filter((line) => {
397
- const { role } = parseStateLine(line);
398
- return role.length > 0 && !excludedRoles.has(role);
399
- })
400
- .map((line) => parseStateLine(line).text)
401
- .filter((text) => text.length > 0);
402
- }
403
399
  function planningConversationLines(state) {
404
400
  if (!state || typeof state !== "object") {
405
401
  return [];
@@ -422,243 +418,36 @@ function planningConversationLines(state) {
422
418
  .filter((line) => line.role.length > 0 && line.text.length > 0)
423
419
  .map((line) => `${line.role}: ${line.text}`);
424
420
  }
425
- function hasCalendarContextSignal(message, state) {
426
- return hasContextSignalSyncForKey(message, state, "calendar", {
427
- contextLimit: CALENDAR_VALIDATION_CONTEXT_LIMIT,
428
- });
429
- }
430
- function stateTextCandidates(state) {
431
- if (!state || typeof state !== "object") {
432
- return [];
433
- }
434
- const stateRecord = state;
435
- const values = stateRecord.values && typeof stateRecord.values === "object"
436
- ? stateRecord.values
437
- : undefined;
438
- const candidates = [];
439
- const pushText = (value) => {
440
- if (typeof value === "string" && value.trim().length > 0) {
441
- candidates.push(...splitStateTextCandidates(value));
442
- }
443
- };
444
- pushText(values?.recentMessages);
445
- pushText(stateRecord.text);
446
- const recentMessagesData = stateRecord.recentMessagesData ?? stateRecord.recentMessages;
447
- if (Array.isArray(recentMessagesData)) {
448
- for (const item of recentMessagesData) {
449
- if (!item || typeof item !== "object") {
450
- continue;
451
- }
452
- const content = item.content;
453
- if (!content || typeof content !== "object") {
454
- continue;
455
- }
456
- pushText(content.text);
457
- }
458
- }
459
- return [...new Set(candidates)];
421
+ function resolveCalendarIntentInput(paramsIntent, message) {
422
+ return paramsIntent?.trim() || messageText(message).trim();
460
423
  }
461
- function scoreIntentCandidate(value) {
462
- const normalized = normalizeText(value);
463
- if (!normalized) {
464
- return Number.NEGATIVE_INFINITY;
465
- }
466
- let score = Math.min(normalized.length, 160) / 16;
467
- if (textMatchesAnyCal(normalized, CAL_AFFIRMATIVE_TERMS)) {
468
- score -= 200;
469
- }
470
- if (PARAMETER_DOC_NOISE_PATTERN.test(normalized)) {
471
- score -= 500;
472
- }
473
- if (hasCalendarTextSignal(value)) {
474
- score += 10;
475
- }
476
- if (textMatchesAnyCal(normalized, CAL_CALENDAR_STRONG_TERMS)) {
477
- score += 14;
478
- }
479
- if (textMatchesAnyCal(normalized, CAL_CALENDAR_WEAK_TERMS)) {
480
- score += 10;
481
- }
482
- if (textMatchesAnyCal(normalized, CAL_CALENDAR_STRONG_TERMS)) {
483
- score += 8;
484
- }
485
- return score;
486
- }
487
- function looksLikeNarrativeCalendarQuery(value) {
488
- const normalized = normalizeText(value);
489
- if (!normalized) {
490
- return false;
491
- }
492
- return (/\b(?:tell me if|let me know if|whether|can you|could you|would you|do i have|are there|what(?:'s| is) on|what(?: event| events)? do i have|when do i|try to find)\b/.test(normalized) &&
493
- /\b(?:calendar|schedule|event|events|flight|flights|travel|trip|appointment|meeting|hotel|stay|return)\b/.test(normalized));
494
- }
495
- function looksLikeLiteralRequestEcho(query, intent) {
496
- const normalizedQuery = normalizeText(query);
497
- const normalizedIntent = normalizeText(intent);
498
- const questionLike = /[?¿]/.test(query);
499
- if (!normalizedQuery || !normalizedIntent) {
500
- return false;
501
- }
502
- if (normalizedQuery === normalizedIntent) {
503
- return (questionLike ||
504
- wordCount(normalizedQuery) >= 10 ||
505
- normalizedQuery.length >= 80);
506
- }
507
- return ((normalizedQuery.includes(normalizedIntent) ||
508
- normalizedIntent.includes(normalizedQuery)) &&
509
- (questionLike || normalizedQuery.length >= 96));
510
- }
511
- function resolveCalendarIntent(paramsIntent, message, state) {
512
- const normalizeFollowUpConstraint = (value) => {
513
- const cleaned = value
514
- .trim()
515
- .replace(/^(?:yes|yeah|yep|yup|ok|okay|sure|please|please do|do it|go ahead|sounds good)\b[\s,.-]*/i, "")
516
- .replace(/^(?:and\s+|also\s+)/i, "")
517
- .replace(/^(?:what about|how about|and the|also the|or the|only the|just the)\s+/i, "")
518
- .trim();
519
- if (/^(?:try\s+(?:it|again|that)|retry|do\s+(?:it\s+)?again|one\s+more\s+time|proceed|go for it)$/i.test(cleaned)) {
520
- return "";
521
- }
522
- return cleaned;
523
- };
524
- const currentMessageText = messageText(message).trim();
525
- const normalizedCurrentMessage = normalizeText(currentMessageText);
526
- const currentMessageHasCalendarSignal = hasCalendarTextSignal(currentMessageText);
527
- const isRefinement = /^(?:what about|how about|and the|also the|or the|only the|just the)\b/i.test(normalizedCurrentMessage);
528
- if (currentMessageText && currentMessageHasCalendarSignal && !isRefinement) {
529
- return currentMessageText;
530
- }
531
- if (currentMessageText &&
532
- (textMatchesAnyCal(normalizedCurrentMessage, CAL_AFFIRMATIVE_TERMS) ||
533
- textMatchesAnyCal(normalizedCurrentMessage, CAL_TEMPORAL_FOLLOWUP_TERMS) ||
534
- isRefinement ||
535
- hasCalendarContextSignal(message, state))) {
536
- const followUpCandidates = userIntentsFromState(state).filter((candidate) => hasCalendarTextSignal(candidate) &&
537
- normalizeText(candidate) !== normalizedCurrentMessage);
538
- const recentRelevantIntent = followUpCandidates.length > 0
539
- ? followUpCandidates.reduce((best, current) => scoreIntentCandidate(current) >= scoreIntentCandidate(best)
540
- ? current
541
- : best)
542
- : undefined;
543
- if (recentRelevantIntent) {
544
- const followUpConstraint = normalizeFollowUpConstraint(currentMessageText);
545
- return followUpConstraint
546
- ? `${recentRelevantIntent} ${followUpConstraint}`.trim()
547
- : recentRelevantIntent;
424
+ function resolveStructuredCalendarSubaction(params, details) {
425
+ if (detailString(details, "eventId")) {
426
+ if (detailString(details, "newTitle") ||
427
+ detailString(details, "title") ||
428
+ detailString(details, "startAt") ||
429
+ detailString(details, "endAt") ||
430
+ detailString(details, "description") ||
431
+ detailString(details, "location")) {
432
+ return "update_event";
548
433
  }
549
- }
550
- const candidates = [
551
- {
552
- text: paramsIntent?.trim(),
553
- source: "params",
554
- },
555
- {
556
- text: messageText(message).trim(),
557
- source: "message",
558
- },
559
- ...stateTextCandidates(state).map((text) => ({
560
- text,
561
- source: "state",
562
- })),
563
- ].filter((candidate) => Boolean(candidate.text && candidate.text.trim().length > 0));
564
- if (candidates.length === 0) {
565
- return "";
566
- }
567
- return [...candidates]
568
- .sort((left, right) => {
569
- const leftBonus = left.source === "message" && hasCalendarTextSignal(left.text) ? 20 : 0;
570
- const rightBonus = right.source === "message" && hasCalendarTextSignal(right.text)
571
- ? 20
572
- : 0;
573
- return (scoreIntentCandidate(right.text) +
574
- rightBonus -
575
- (scoreIntentCandidate(left.text) + leftBonus));
576
- })
577
- .map((candidate) => candidate.text)[0];
578
- }
579
- function inferCalendarSubaction(intent, details, query) {
580
- // Delete intent is checked first because phrases like "delete the duplicate
581
- // event" otherwise get swept up by the search_events branch via "duplicate"
582
- // → "look for". Only the verb decides the subaction here.
583
- if (/\b(delete|remove|cancel|drop|get rid of|trash|kill)\b.*\b(event|meeting|appointment|calendar|reminder|invite)\b/.test(intent) ||
584
- /\b(uncancel|unbook|unschedule)\b/.test(intent)) {
585
434
  return "delete_event";
586
435
  }
587
- // Update intent — same eager-match treatment so "rename", "move", "reschedule"
588
- // don't get pulled into search_events.
589
- if (/\b(rename|reschedule|move|push|change|update|edit|modify)\b.*\b(event|meeting|appointment|calendar|invite)\b/.test(intent)) {
590
- return "update_event";
591
- }
592
- if (query ||
593
- detailString(details, "query") ||
594
- /\b(find|search|look for|matching|related to|flight|flights|fly|travel|trip|return)\b/.test(intent)) {
595
- return "search_events";
596
- }
597
436
  if (detailString(details, "startAt") ||
437
+ detailString(details, "endAt") ||
438
+ detailString(details, "windowPreset") ||
598
439
  detailNumber(details, "durationMinutes") ||
599
- /\b(create|add|book)\b/.test(intent) ||
600
- /\bschedule\s+(?:a|an|this|that|the)?\s*(?:calendar\s+)?(?:meeting|event|appointment|call)\b/.test(intent) ||
601
- /\bput\b.*\b(calendar|meeting|event)\b/.test(intent) ||
602
- /\bmake an event\b/.test(intent)) {
440
+ params.title ||
441
+ detailString(details, "title")) {
603
442
  return "create_event";
604
443
  }
605
- if (/\b(next|upcoming|soon|about to|coming up)\b/.test(intent) &&
606
- /\b(event|meeting|appointment|call|calendar item|thing)\b/.test(intent)) {
607
- return "next_event";
608
- }
609
- return "feed";
610
- }
611
- function shouldTrustExplicitCalendarSubaction(subaction, params, details) {
612
- if (!subaction) {
613
- return false;
614
- }
615
- switch (subaction) {
616
- case "create_event":
617
- return Boolean(params.title ||
618
- detailString(details, "title") ||
619
- detailString(details, "startAt") ||
620
- detailString(details, "windowPreset") ||
621
- detailNumber(details, "durationMinutes"));
622
- case "update_event":
623
- return Boolean(detailString(details, "eventId") ||
624
- detailString(details, "title") ||
625
- detailString(details, "newTitle") ||
626
- detailString(details, "startAt") ||
627
- detailString(details, "endAt"));
628
- case "delete_event":
629
- return Boolean(detailString(details, "eventId") ||
630
- params.title ||
631
- detailString(details, "title"));
632
- case "search_events":
633
- return Boolean(params.query ||
634
- detailString(details, "query") ||
635
- (params.queries?.length ?? 0) > 0 ||
636
- (detailArray(details, "queries")?.length ?? 0) > 0);
637
- default:
638
- return false;
639
- }
640
- }
641
- function cleanTripLocation(value) {
642
- const cleaned = value
643
- .trim()
644
- .replace(/\b(?:today|tomorrow|tonight|this week(?:end)?|next week(?:end)?|this month|next month|for me|coming up|upcoming|on my calendar|on the calendar|on my schedule|on the schedule)\b.*$/i, "")
645
- .replace(/^[^a-z0-9]+|[^a-z0-9]+$/gi, "")
646
- .trim();
647
- return cleaned.length > 0 ? cleaned : undefined;
648
- }
649
- function inferTripWindowIntent(intent) {
650
- const patterns = [
651
- /\bwhile\s+(?:i(?:'m| am)|im)\s+in\s+(.+?)(?=$|[?.!,])/i,
652
- /\bwhen\s+(?:i(?:'m| am)|im)\s+in\s+(.+?)(?=$|[?.!,])/i,
653
- /\bduring\s+(?:my\s+)?(?:trip|stay|visit)\s+(?:to|in)\s+(.+?)(?=$|[?.!,])/i,
654
- /\bonce\s+(?:i(?:'m| am)|im)\s+in\s+(.+?)(?=$|[?.!,])/i,
655
- ];
656
- for (const pattern of patterns) {
657
- const match = intent.match(pattern);
658
- const location = cleanTripLocation(match?.[1] ?? "");
659
- if (location) {
660
- return { location };
661
- }
444
+ if (params.query ||
445
+ detailString(details, "query") ||
446
+ (params.queries?.length ?? 0) > 0 ||
447
+ (detailArray(details, "queries")?.length ?? 0) > 0 ||
448
+ detailString(details, "timeMin") ||
449
+ detailString(details, "timeMax")) {
450
+ return "search_events";
662
451
  }
663
452
  return null;
664
453
  }
@@ -675,9 +464,17 @@ function parseExplicitLocalDate(value, timeZone) {
675
464
  }
676
465
  const monthNameMatch = normalized.match(MONTH_NAME_PATTERN);
677
466
  if (monthNameMatch) {
467
+ const monthName = monthNameMatch[1];
468
+ if (!monthName) {
469
+ return null;
470
+ }
471
+ const month = MONTH_MAP[normalizeLookupKey(monthName)];
472
+ if (month === undefined) {
473
+ return null;
474
+ }
678
475
  return {
679
476
  year: monthNameMatch[3] ? Number(monthNameMatch[3]) : localToday.year,
680
- month: MONTH_MAP[normalizeLookupKey(monthNameMatch[1])],
477
+ month,
681
478
  day: Number(monthNameMatch[2]),
682
479
  };
683
480
  }
@@ -726,14 +523,6 @@ function getLocalTodayDate(timeZone) {
726
523
  day: localNow.day,
727
524
  };
728
525
  }
729
- function addMonthsToLocalDate(dateOnly, monthDelta) {
730
- const utcDate = new Date(Date.UTC(dateOnly.year, dateOnly.month - 1 + monthDelta, dateOnly.day, 12, 0, 0));
731
- return {
732
- year: utcDate.getUTCFullYear(),
733
- month: utcDate.getUTCMonth() + 1,
734
- day: utcDate.getUTCDate(),
735
- };
736
- }
737
526
  function buildLocalDateRange(timeZone, startDate, endDateExclusive, options) {
738
527
  return {
739
528
  timeMin: buildUtcDateFromLocalParts(timeZone, {
@@ -817,14 +606,11 @@ function formatCreateEventCalendarContext(context) {
817
606
  }
818
607
  return lines.join("\n");
819
608
  }
820
- function isPersonalCreateEvent(intent, title) {
821
- return /\b(hug|wife|husband|partner|girlfriend|boyfriend|family|mom|dad|date|dinner|lunch|coffee|check in|check-in|call|text|birthday|anniversary|pick up|pickup|drop off|drop-off)\b/i.test(`${intent} ${title}`);
822
- }
823
- function resolveSuggestedCreateEventDurationMinutes(intent, title) {
824
- if (isShortPreparationEvent(intent, title)) {
825
- return MIN_CREATE_EVENT_DURATION_MINUTES;
826
- }
827
- return isPersonalCreateEvent(intent, title) ? 15 : 60;
609
+ // Fallback default duration when neither the user nor the LLM supplies one.
610
+ // Specialization (personal vs work vs prep) is now handled by the LLM during
611
+ // inferCreateEventDetails — never by English keyword regex.
612
+ function resolveSuggestedCreateEventDurationMinutes() {
613
+ return 60;
828
614
  }
829
615
  function roundUpToStep(value, step) {
830
616
  return Math.ceil(value / step) * step;
@@ -857,14 +643,12 @@ function busyWindowsForLocalDate(events, targetDate, timeZone) {
857
643
  }
858
644
  return windows.sort((left, right) => left.startMinute - right.startMinute);
859
645
  }
860
- function resolvePreferredCreateEventMinutes(intent, title, targetDate) {
646
+ // Preferred slot ordering for tentative event scheduling. Locale-agnostic:
647
+ // weekdays prefer mid-morning through evening, weekends prefer late morning
648
+ // and afternoon. Specific category preferences (personal vs work) are now
649
+ // supplied by the LLM via inferCreateEventDetails — not by English regex.
650
+ function resolvePreferredCreateEventMinutes(targetDate) {
861
651
  const weekday = getWeekdayForLocalDate(targetDate);
862
- if (isPersonalCreateEvent(intent, title)) {
863
- return [19 * 60, 20 * 60, 18 * 60 + 30, 17 * 60 + 30];
864
- }
865
- if (/\b(dentist|doctor|therapy|appointment|meeting|interview|review|sync)\b/i.test(`${intent} ${title}`)) {
866
- return [9 * 60, 10 * 60, 11 * 60, 14 * 60, 15 * 60];
867
- }
868
652
  return weekday === 0 || weekday === 6
869
653
  ? [10 * 60, 13 * 60, 18 * 60]
870
654
  : [9 * 60, 11 * 60, 14 * 60, 16 * 60, 19 * 60];
@@ -897,11 +681,11 @@ function suggestCreateEventStartAt(args) {
897
681
  if (!targetDate) {
898
682
  return null;
899
683
  }
900
- const durationMinutes = resolveSuggestedCreateEventDurationMinutes(args.intent, args.title);
684
+ const durationMinutes = resolveSuggestedCreateEventDurationMinutes();
901
685
  const busyWindows = busyWindowsForLocalDate(args.calendarContext.feed.events, targetDate, args.calendarContext.calendarTimeZone);
902
686
  const startMinute = chooseSuggestedCreateEventMinute({
903
687
  busyWindows,
904
- preferredMinutes: resolvePreferredCreateEventMinutes(args.intent, args.title, targetDate),
688
+ preferredMinutes: resolvePreferredCreateEventMinutes(targetDate),
905
689
  durationMinutes,
906
690
  });
907
691
  if (startMinute === null) {
@@ -927,6 +711,7 @@ async function loadCreateEventCalendarContext(service, details, hasCalendarRead)
927
711
  const feed = await service.getCalendarFeed(INTERNAL_URL, {
928
712
  mode: detailString(details, "mode"),
929
713
  side: detailString(details, "side"),
714
+ grantId: detailString(details, "grantId"),
930
715
  calendarId: detailString(details, "calendarId"),
931
716
  timeZone: requestTimeZone,
932
717
  forceSync: detailBoolean(details, "forceSync"),
@@ -974,56 +759,6 @@ function resolveCalendarLlmWindow(llmPlan) {
974
759
  label: normalizeWindowLabel(llmPlan?.windowLabel) ?? "for the requested window",
975
760
  };
976
761
  }
977
- function resolveWeekendWindow(timeZone, modifier) {
978
- const localToday = getLocalTodayDate(timeZone);
979
- const currentWeekday = getWeekdayForLocalDate(localToday);
980
- let startOffsetDays = (6 - currentWeekday + 7) % 7;
981
- let endOffsetFromToday = startOffsetDays + 2;
982
- if (modifier === "this" && (currentWeekday === 6 || currentWeekday === 0)) {
983
- startOffsetDays = 0;
984
- endOffsetFromToday = currentWeekday === 6 ? 2 : 1;
985
- }
986
- if (modifier === "next") {
987
- startOffsetDays += 7;
988
- endOffsetFromToday += 7;
989
- }
990
- const startDay = addDaysToLocalDate(localToday, startOffsetDays);
991
- const endDay = addDaysToLocalDate(localToday, endOffsetFromToday);
992
- return buildLocalDateRange(timeZone, startDay, endDay);
993
- }
994
- function resolveMonthWindow(timeZone, modifier) {
995
- const localToday = getLocalTodayDate(timeZone);
996
- if (modifier === "this") {
997
- const endOfWindow = addMonthsToLocalDate({
998
- year: localToday.year,
999
- month: localToday.month,
1000
- day: 1,
1001
- }, 1);
1002
- return buildLocalDateRange(timeZone, localToday, endOfWindow);
1003
- }
1004
- const startOfNextMonth = addMonthsToLocalDate({
1005
- year: localToday.year,
1006
- month: localToday.month,
1007
- day: 1,
1008
- }, 1);
1009
- const startOfFollowingMonth = addMonthsToLocalDate(startOfNextMonth, 1);
1010
- return buildLocalDateRange(timeZone, startOfNextMonth, startOfFollowingMonth);
1011
- }
1012
- function resolveTonightWindow(timeZone) {
1013
- const localNow = getZonedDateParts(new Date(), timeZone);
1014
- const startHour = Math.max(localNow.hour, 17);
1015
- const startMinute = localNow.hour >= 17 ? localNow.minute : 0;
1016
- const startDay = {
1017
- year: localNow.year,
1018
- month: localNow.month,
1019
- day: localNow.day,
1020
- };
1021
- const endDay = addDaysToLocalDate(startDay, 1);
1022
- return buildLocalDateRange(timeZone, startDay, endDay, {
1023
- startHour,
1024
- startMinute,
1025
- });
1026
- }
1027
762
  // Wide window used by update_event / delete_event lookups when the user
1028
763
  // gave no time hint. Reaches 1 year back and 5 years forward — far enough
1029
764
  // to find a future birthday or a recent past meeting without scanning the
@@ -1031,7 +766,7 @@ function resolveTonightWindow(timeZone) {
1031
766
  function buildWideLookupRange(timeZone) {
1032
767
  return buildLocalDayRange(timeZone, -365, 365 * 5);
1033
768
  }
1034
- function resolveCalendarWindow(intent, details, forSearch, llmPlan) {
769
+ function resolveCalendarWindow(_intent, details, forSearch, llmPlan) {
1035
770
  const timeMin = detailString(details, "timeMin");
1036
771
  const timeMax = detailString(details, "timeMax");
1037
772
  const calendarId = detailString(details, "calendarId");
@@ -1062,149 +797,6 @@ function resolveCalendarWindow(intent, details, forSearch, llmPlan) {
1062
797
  label: llmWindow.label,
1063
798
  };
1064
799
  }
1065
- const normalizedIntent = normalizeText(intent);
1066
- const explicitDate = parseExplicitLocalDate(normalizedIntent, timeZone);
1067
- if (explicitDate) {
1068
- const nextDate = addDaysToLocalDate(explicitDate, 1);
1069
- const explicitDateLabel = (normalizedIntent.match(/(?:on|for)\s+(.+)$/i)?.[1] ?? normalizedIntent)
1070
- .replace(/^(?:on|for)\s+/i, "")
1071
- .trim();
1072
- return {
1073
- request: {
1074
- calendarId,
1075
- timeZone,
1076
- forceSync,
1077
- timeMin: buildUtcDateFromLocalParts(timeZone, {
1078
- year: explicitDate.year,
1079
- month: explicitDate.month,
1080
- day: explicitDate.day,
1081
- hour: 0,
1082
- minute: 0,
1083
- second: 0,
1084
- }).toISOString(),
1085
- timeMax: buildUtcDateFromLocalParts(timeZone, {
1086
- year: nextDate.year,
1087
- month: nextDate.month,
1088
- day: nextDate.day,
1089
- hour: 0,
1090
- minute: 0,
1091
- second: 0,
1092
- }).toISOString(),
1093
- },
1094
- label: `on ${explicitDateLabel}`,
1095
- };
1096
- }
1097
- if (/\btonight\b/.test(normalizedIntent)) {
1098
- return {
1099
- request: {
1100
- calendarId,
1101
- timeZone,
1102
- forceSync,
1103
- ...resolveTonightWindow(timeZone),
1104
- },
1105
- label: "tonight",
1106
- };
1107
- }
1108
- if (/\bnext week\b/.test(normalizedIntent) &&
1109
- /\b(?:week after next|the week after)\b/.test(normalizedIntent)) {
1110
- return {
1111
- request: {
1112
- calendarId,
1113
- timeZone,
1114
- forceSync,
1115
- ...buildLocalDayRange(timeZone, 7, 21),
1116
- },
1117
- label: "next week or the week after",
1118
- };
1119
- }
1120
- if (/\btomorrow\b/.test(normalizedIntent)) {
1121
- return {
1122
- request: {
1123
- calendarId,
1124
- timeZone,
1125
- forceSync,
1126
- ...buildLocalDayRange(timeZone, 1, 2),
1127
- },
1128
- label: "tomorrow",
1129
- };
1130
- }
1131
- if (/\bnext weekend\b/.test(normalizedIntent)) {
1132
- return {
1133
- request: {
1134
- calendarId,
1135
- timeZone,
1136
- forceSync,
1137
- ...resolveWeekendWindow(timeZone, "next"),
1138
- },
1139
- label: "next weekend",
1140
- };
1141
- }
1142
- if (/\b(?:this weekend|weekend)\b/.test(normalizedIntent)) {
1143
- return {
1144
- request: {
1145
- calendarId,
1146
- timeZone,
1147
- forceSync,
1148
- ...resolveWeekendWindow(timeZone, "this"),
1149
- },
1150
- label: "this weekend",
1151
- };
1152
- }
1153
- if (/\b(?:week after next|the week after)\b/.test(normalizedIntent)) {
1154
- return {
1155
- request: {
1156
- calendarId,
1157
- timeZone,
1158
- forceSync,
1159
- ...buildLocalDayRange(timeZone, 14, 21),
1160
- },
1161
- label: "the week after next",
1162
- };
1163
- }
1164
- if (/\bnext week\b/.test(normalizedIntent)) {
1165
- return {
1166
- request: {
1167
- calendarId,
1168
- timeZone,
1169
- forceSync,
1170
- ...buildLocalDayRange(timeZone, 7, 14),
1171
- },
1172
- label: "next week",
1173
- };
1174
- }
1175
- if (/\b(this week|week)\b/.test(normalizedIntent)) {
1176
- return {
1177
- request: {
1178
- calendarId,
1179
- timeZone,
1180
- forceSync,
1181
- ...buildLocalDayRange(timeZone, 0, 7),
1182
- },
1183
- label: "this week",
1184
- };
1185
- }
1186
- if (/\bnext month\b/.test(normalizedIntent)) {
1187
- return {
1188
- request: {
1189
- calendarId,
1190
- timeZone,
1191
- forceSync,
1192
- ...resolveMonthWindow(timeZone, "next"),
1193
- },
1194
- label: "next month",
1195
- };
1196
- }
1197
- if (/\bthis month\b/.test(normalizedIntent)) {
1198
- return {
1199
- request: {
1200
- calendarId,
1201
- timeZone,
1202
- forceSync,
1203
- ...resolveMonthWindow(timeZone, "this"),
1204
- },
1205
- label: "this month",
1206
- };
1207
- }
1208
800
  const windowDays = detailNumber(details, "windowDays");
1209
801
  if (forSearch) {
1210
802
  const days = windowDays && windowDays > 0 ? Math.min(windowDays, 90) : 30;
@@ -1262,135 +854,6 @@ function resolveTripWindowRequest(details, llmPlan) {
1262
854
  ...buildLocalDayRange(timeZone, 0, days),
1263
855
  };
1264
856
  }
1265
- function inferCalendarSearchQuery(intent) {
1266
- const normalizedIntent = normalizeText(intent);
1267
- if (/\b(flight|flights|fly|flying|travel|trip)\b/.test(normalizedIntent)) {
1268
- const locationMatch = normalizedIntent.match(/\b(?:from|to)\s+(.+?)(?=\b(?:today|tomorrow|tonight|this week(?:end)?|next week(?:end)?|week after(?: next)?|this month|next month|this year|next year|or|and|please|idk|i dk|i don't know)\b|[?.!,]|$)/i);
1269
- const parts = ["flight"];
1270
- if (/\b(return|back|home)\b/.test(normalizedIntent)) {
1271
- parts.push("return");
1272
- }
1273
- const location = normalizeCalendarSearchQueryValue(locationMatch?.[1] ?? "");
1274
- if (location) {
1275
- parts.push(location);
1276
- }
1277
- return normalizeCalendarSearchQueryValue(parts.join(" ")) ?? "flight";
1278
- }
1279
- const dateMatch = normalizedIntent.match(/\b(?:on|for)\s+((?:jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|jun(?:e)?|jul(?:y)?|aug(?:ust)?|sep(?:t(?:ember)?)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)\.?\s+\d{1,2}(?:st|nd|rd|th)?(?:,?\s+\d{4})?|\d{1,2}[/-]\d{1,2}(?:[/-]\d{2,4})?|\d{4}-\d{1,2}-\d{1,2})\b/i);
1280
- const normalizedDate = normalizeCalendarSearchQueryValue(dateMatch?.[1]);
1281
- if (normalizedDate) {
1282
- return normalizedDate;
1283
- }
1284
- const patterns = [
1285
- /^(?:please\s+)?(?:find|search(?: for)?|look(?:ing)? for|show me)\s+(.+)$/i,
1286
- /^(?:please\s+)?(?:do i have|are there)\s+(?:any\s+)?(.+?)(?:\?|$)/i,
1287
- /^(?:please\s+)?(?:check|look|see)\s+(?:my\s+)?calendar\s+for\s+(.+?)(?:\?|$)/i,
1288
- /^what\s+(?:event|events)\s+do\s+i\s+have\s+(?:on|for)\s+(.+?)(?:\?|$)/i,
1289
- /^(?:please\s+)?any\s+(.+?)(?:\?|$)/i,
1290
- ];
1291
- for (const pattern of patterns) {
1292
- const match = normalizedIntent.match(pattern);
1293
- const value = normalizeCalendarSearchQueryValue(match?.[1] ?? "");
1294
- if (value) {
1295
- return value;
1296
- }
1297
- }
1298
- return undefined;
1299
- }
1300
- function inferCalendarSearchQueries(intent) {
1301
- const normalizedIntent = normalizeText(intent);
1302
- const queries = new Set();
1303
- const push = (value) => {
1304
- const normalized = normalizeCalendarSearchQueryValue(value);
1305
- if (normalized) {
1306
- queries.add(normalized);
1307
- }
1308
- };
1309
- push(inferCalendarSearchQuery(intent));
1310
- if (/\b(return|back|home)\b/.test(normalizedIntent)) {
1311
- const locationMatch = normalizedIntent.match(/\b(?:from|to)\s+(.+?)(?=\b(?:today|tomorrow|tonight|this week(?:end)?|next week(?:end)?|week after(?: next)?|this month|next month|this year|next year|or|and|please|idk|i dk|i don't know)\b|[?.!,]|$)/i);
1312
- const location = normalizeCalendarSearchQueryValue(locationMatch?.[1] ?? "");
1313
- push(`return flight${location ? ` ${location}` : ""}`);
1314
- if (location) {
1315
- push(`flight back ${location}`);
1316
- push(`${location} return flight`);
1317
- }
1318
- }
1319
- return [...queries];
1320
- }
1321
- function sanitizeCalendarQuery(query, intent) {
1322
- if (!query) {
1323
- return undefined;
1324
- }
1325
- const raw = normalizeText(query);
1326
- if (PARAMETER_DOC_NOISE_PATTERN.test(raw) ||
1327
- raw.includes("supported keys include") ||
1328
- raw.includes("match against titles") ||
1329
- raw.includes("structured calendar arguments")) {
1330
- return undefined;
1331
- }
1332
- const cleaned = normalizeCalendarSearchQueryValue(query);
1333
- if (!cleaned ||
1334
- PARAMETER_DOC_NOISE_PATTERN.test(cleaned) ||
1335
- textMatchesAnyCal(cleaned, CAL_TEMPORAL_FOLLOWUP_TERMS) ||
1336
- looksLikeLiteralRequestEcho(cleaned, intent) ||
1337
- cleaned.length > 160) {
1338
- return undefined;
1339
- }
1340
- const inferred = inferCalendarSearchQuery(intent);
1341
- if (inferred &&
1342
- looksLikeNarrativeCalendarQuery(cleaned) &&
1343
- normalizeText(inferred) !== normalizeText(cleaned)) {
1344
- return undefined;
1345
- }
1346
- return cleaned;
1347
- }
1348
- function scoreCalendarQueryCandidate(query, intent) {
1349
- const normalized = normalizeText(query);
1350
- if (!normalized) {
1351
- return Number.NEGATIVE_INFINITY;
1352
- }
1353
- let score = 0;
1354
- if (PARAMETER_DOC_NOISE_PATTERN.test(normalized)) {
1355
- score -= 500;
1356
- }
1357
- if (looksLikeNarrativeCalendarQuery(normalized)) {
1358
- score -= 120;
1359
- }
1360
- if (looksLikeLiteralRequestEcho(query, intent)) {
1361
- score -= 120;
1362
- }
1363
- if (textMatchesAnyCal(normalized, CAL_TEMPORAL_FOLLOWUP_TERMS)) {
1364
- score -= 120;
1365
- }
1366
- const tokens = tokenizeForSearch(normalized);
1367
- if (tokens.length <= 4) {
1368
- score += 12;
1369
- }
1370
- else if (tokens.length >= 8) {
1371
- score -= 15;
1372
- }
1373
- const inferredQueries = inferCalendarSearchQueries(intent).map((value) => normalizeText(value));
1374
- if (inferredQueries.includes(normalized)) {
1375
- score += 60;
1376
- }
1377
- for (const inferredQuery of inferredQueries) {
1378
- if (!inferredQuery) {
1379
- continue;
1380
- }
1381
- if (normalized.includes(inferredQuery) ||
1382
- inferredQuery.includes(normalized)) {
1383
- score += 18;
1384
- }
1385
- const inferredTokens = new Set(tokenizeForSearch(inferredQuery));
1386
- score += tokens.filter((token) => inferredTokens.has(token)).length * 8;
1387
- }
1388
- if (/\b(flight|flights|travel|trip|return|back|home)\b/.test(normalizeText(intent)) &&
1389
- /\b(flight|flights|travel|trip|return|back|home)\b/.test(normalized)) {
1390
- score += 12;
1391
- }
1392
- return score;
1393
- }
1394
857
  function eventDateSearchTerms(event) {
1395
858
  const formatter = (options) => new Intl.DateTimeFormat("en-US", {
1396
859
  timeZone: event.timezone || undefined,
@@ -1421,9 +884,6 @@ function eventDateSearchTerms(event) {
1421
884
  weekdayShort,
1422
885
  ].map((term) => normalizeText(term)));
1423
886
  }
1424
- async function extractCalendarSearchQueriesWithLlm(runtime, message, state, intent, timeZone) {
1425
- return (await extractCalendarPlanWithLlm(runtime, message, state, intent, timeZone)).queries;
1426
- }
1427
887
  export async function extractCalendarPlanWithLlm(runtime, message, state, intent, timeZone = resolveDefaultTimeZone()) {
1428
888
  const recentConversation = formatCreateEventRecentConversation(state);
1429
889
  const currentMessage = messageText(message).trim();
@@ -1462,16 +922,20 @@ export async function extractCalendarPlanWithLlm(runtime, message, state, intent
1462
922
  " update_event — rename, reschedule, move, or edit an existing event (e.g. 'rename my meeting to standup', 'reschedule the dentist to Friday', 'move the call to 3pm')",
1463
923
  " delete_event — remove or cancel an existing event (e.g. 'delete the team meeting', 'cancel my appointment', 'remove the duplicate event')",
1464
924
  " trip_window — query what's happening during a trip or stay in a specific place (e.g. 'what's happening while I'm in Denver', 'my Tokyo itinerary')",
925
+ "Use only the exact subaction literals listed above.",
926
+ "Do not invent aliases like edit_event, modify_event, reschedule_event, move_event, cancel_event, remove_event, agenda, or itinerary_window.",
1465
927
  "",
1466
- "For feed, search_events, or trip_window, infer an exact timeMin/timeMax window when the request names or implies a date or date range.",
928
+ "For feed, search_events, trip_window, update_event, or delete_event, infer an exact timeMin/timeMax window when the request names or implies a date or date range.",
1467
929
  "timeMin and timeMax must be ISO 8601 datetimes that the API can use directly.",
1468
930
  "windowLabel should be a short natural-language label like on monday, this weekend, next month, or tonight.",
1469
- "For search_events or trip_window, extract up to 3 short search queries.",
931
+ "For search_events, update_event, delete_event, or trip_window, extract up to 3 short search queries.",
1470
932
  "Preserve names, places, and keywords in their original language or script when useful.",
1471
933
  "Convert time constraints into concise searchable dates or windows even if the user phrases them in another language.",
1472
934
  "Focus on people, places, flights, itinerary, appointments, and explicit dates.",
1473
935
  "If the request is about a date, include a date query like april 12 or 2026-04-12.",
1474
936
  "If the request asks what is happening while the user is in a place, use trip_window and include tripLocation.",
937
+ "For update_event or delete_event, use queries to identify the existing target event and title for the new title only when the user is renaming it.",
938
+ "For requests like all events, full schedule, everything on my calendar, or a broad itinerary sweep, return a broad timeMin/timeMax window instead of relying on downstream heuristics.",
1475
939
  "",
1476
940
  "Examples:",
1477
941
  ' "what\'s on my calendar tomorrow" → {"subaction":"feed","shouldAct":true,"response":null}',
@@ -1479,6 +943,7 @@ export async function extractCalendarPlanWithLlm(runtime, message, state, intent
1479
943
  ' "find my return flight" → {"subaction":"search_events","shouldAct":true,"response":null,"queries":["return flight"]}',
1480
944
  ' "what do I have while I\'m in Tokyo" → {"subaction":"trip_window","shouldAct":true,"response":null,"queries":["tokyo"],"tripLocation":"Tokyo"}',
1481
945
  ' "rename my meeting to standup" → {"subaction":"update_event","shouldAct":true,"response":null,"queries":["meeting"],"title":"standup"}',
946
+ ' "Cambia la cita del dentista al viernes" → {"subaction":"update_event","shouldAct":true,"response":null,"queries":["cita del dentista"],"windowLabel":"el viernes"}',
1482
947
  ' "delete the team meeting tomorrow" → {"subaction":"delete_event","shouldAct":true,"response":null,"queries":["team meeting"]}',
1483
948
  ' "can you help me with my calendar?" → {"subaction":null,"shouldAct":false,"response":"What do you want to do on your calendar — check your schedule, find an event, or create one?","queries":[]}',
1484
949
  "",
@@ -1502,6 +967,11 @@ export async function extractCalendarPlanWithLlm(runtime, message, state, intent
1502
967
  "</recent_conversation>",
1503
968
  ].join("\n");
1504
969
  let rawResponse = "";
970
+ const parseResponse = (raw) => {
971
+ const parsed = parseKeyValueXml(raw) ??
972
+ parseJSONObjectFromText(raw);
973
+ return parsed ? buildCalendarPlanFromParsed(parsed) : null;
974
+ };
1505
975
  try {
1506
976
  const result = await runtime.useModel(ModelType.TEXT_LARGE, {
1507
977
  prompt,
@@ -1519,98 +989,62 @@ export async function extractCalendarPlanWithLlm(runtime, message, state, intent
1519
989
  shouldAct: null,
1520
990
  };
1521
991
  }
1522
- const parsed = parseKeyValueXml(rawResponse) ??
1523
- parseJSONObjectFromText(rawResponse);
1524
- if (!parsed) {
992
+ const parsedPlan = parseResponse(rawResponse);
993
+ if (parsedPlan) {
994
+ return parsedPlan;
995
+ }
996
+ try {
997
+ const repairResult = await runtime.useModel(ModelType.TEXT_LARGE, {
998
+ prompt: buildCalendarPlanRepairPrompt({
999
+ currentMessage,
1000
+ intent,
1001
+ recentConversation,
1002
+ rawResponse,
1003
+ timeZone,
1004
+ nowIso,
1005
+ localNow,
1006
+ }),
1007
+ });
1008
+ const repairedRaw = typeof repairResult === "string" ? repairResult : "";
1009
+ return (parseResponse(repairedRaw) ?? {
1010
+ subaction: null,
1011
+ queries: [],
1012
+ shouldAct: null,
1013
+ });
1014
+ }
1015
+ catch (error) {
1016
+ runtime.logger?.warn?.({
1017
+ src: "action:calendar",
1018
+ error: error instanceof Error ? error.message : String(error),
1019
+ }, "Calendar action repair model call failed");
1525
1020
  return {
1526
1021
  subaction: null,
1527
1022
  queries: [],
1528
1023
  shouldAct: null,
1529
1024
  };
1530
1025
  }
1531
- const tripLocation = typeof parsed.tripLocation === "string" &&
1532
- parsed.tripLocation.trim().length > 0
1533
- ? parsed.tripLocation.trim()
1534
- : undefined;
1535
- // Extract queries from multiple possible shapes:
1536
- // - TOON string: "flight || dentist" (split on ||)
1537
- // - TOON single: "return flight" (no delimiter)
1538
- // - JSON array: ["flight", "dentist"]
1539
- // - Numbered fallbacks: query1, query2, query3
1540
- const rawQueries = [];
1541
- if (typeof parsed.queries === "string" && parsed.queries.trim().length > 0) {
1542
- for (const q of parsed.queries.split(/\s*\|\|\s*/)) {
1543
- if (q.trim().length > 0)
1544
- rawQueries.push(q.trim());
1545
- }
1546
- }
1547
- else if (Array.isArray(parsed.queries)) {
1548
- for (const value of parsed.queries) {
1549
- if (typeof value === "string")
1550
- rawQueries.push(value);
1551
- }
1552
- }
1553
- if (typeof parsed.query === "string")
1554
- rawQueries.push(parsed.query);
1555
- if (typeof parsed.query1 === "string")
1556
- rawQueries.push(parsed.query1);
1557
- if (typeof parsed.query2 === "string")
1558
- rawQueries.push(parsed.query2);
1559
- if (typeof parsed.query3 === "string")
1560
- rawQueries.push(parsed.query3);
1561
- if (tripLocation)
1562
- rawQueries.push(tripLocation);
1563
- return {
1564
- subaction: normalizeCalendarSubaction(parsed.subaction),
1565
- queries: dedupeCalendarQueries(rawQueries),
1566
- response: normalizePlannerResponse(parsed.response),
1567
- shouldAct: normalizeShouldAct(parsed.shouldAct),
1568
- title: typeof parsed.title === "string" && parsed.title.trim().length > 0
1569
- ? parsed.title.trim()
1570
- : undefined,
1571
- tripLocation,
1572
- timeMin: normalizeIsoDateTime(parsed.timeMin),
1573
- timeMax: normalizeIsoDateTime(parsed.timeMax),
1574
- windowLabel: normalizeWindowLabel(parsed.windowLabel ?? parsed.label),
1575
- };
1576
1026
  }
1577
- async function resolveCalendarSearchQueries(runtime, message, state, explicitQueries, intent, llmPlan, timeZone) {
1578
- const providedQueries = dedupeCalendarQueries(explicitQueries.map((query) => sanitizeCalendarQuery(query, intent)));
1579
- const heuristicQueries = inferCalendarSearchQueries(intent);
1580
- const llmQueries = llmPlan && llmPlan.queries.length > 0
1581
- ? llmPlan.queries
1582
- : await extractCalendarSearchQueriesWithLlm(runtime, message, state, intent, timeZone);
1583
- const stateQueries = userIntentsFromState(state)
1584
- .reverse()
1585
- .flatMap((candidate) => inferCalendarSearchQueries(candidate));
1586
- const candidates = dedupeCalendarQueries([
1587
- ...providedQueries,
1588
- ...llmQueries,
1589
- ...heuristicQueries,
1590
- ...stateQueries,
1591
- ].map((query) => sanitizeCalendarQuery(query, intent)));
1592
- return [...candidates].sort((left, right) => scoreCalendarQueryCandidate(right, intent) -
1593
- scoreCalendarQueryCandidate(left, intent));
1594
- }
1595
- function inferCreateEventTitle(intent) {
1596
- const patterns = [
1597
- /\b(?:create|add|schedule|book|put)\s+(?:a|an|the)?\s*(.+?)(?=\b(?:for|on|at|tomorrow|today|tonight|next|this|from)\b|[?.!,]|$)/i,
1598
- /\b(?:meeting|appointment|call|event)\s+(?:with|for)\s+(.+?)(?=\b(?:for|on|at|tomorrow|today|tonight|next|this|from)\b|[?.!,]|$)/i,
1599
- ];
1600
- for (const pattern of patterns) {
1601
- const match = intent.match(pattern);
1602
- const value = match?.[1]?.trim();
1603
- if (value && !/^(calendar|event|meeting|appointment|call)$/i.test(value)) {
1604
- return value.replace(/\s+/g, " ").trim();
1605
- }
1606
- }
1607
- return undefined;
1027
+ function resolveCalendarSearchQueries(args) {
1028
+ return dedupeCalendarQueries([
1029
+ ...args.explicitQueries,
1030
+ ...(args.llmPlan?.queries ?? []),
1031
+ ...(args.fallbackQueries ?? []),
1032
+ ]);
1608
1033
  }
1609
- function isShortPreparationEvent(intent, title) {
1610
- return /\b(get ready|ready for|prep|prepare|packing|pack|leave for|head to|airport|flight|reminder|remind me)\b/i.test(`${intent} ${title}`);
1034
+ function normalizeIsShortPreparationFlag(value) {
1035
+ if (typeof value === "boolean")
1036
+ return value;
1037
+ if (typeof value === "string") {
1038
+ const normalized = value.trim().toLowerCase();
1039
+ if (normalized === "true")
1040
+ return true;
1041
+ if (normalized === "false")
1042
+ return false;
1043
+ }
1044
+ return false;
1611
1045
  }
1612
1046
  function resolveCreateEventDurationMinutes(args) {
1613
- const { explicitDuration, extractedDuration, intent, title, hasExplicitEndAt, hasExplicitWindowPreset, hasExplicitStartAt, } = args;
1047
+ const { explicitDuration, extractedDuration, isShortPreparation, hasExplicitEndAt, hasExplicitWindowPreset, hasExplicitStartAt, } = args;
1614
1048
  if (typeof explicitDuration === "number" &&
1615
1049
  Number.isFinite(explicitDuration)) {
1616
1050
  return explicitDuration > 0 ? explicitDuration : undefined;
@@ -1620,14 +1054,14 @@ function resolveCreateEventDurationMinutes(args) {
1620
1054
  if (extractedDuration > 0) {
1621
1055
  return extractedDuration;
1622
1056
  }
1623
- if (isShortPreparationEvent(intent, title) &&
1057
+ if (isShortPreparation &&
1624
1058
  (hasExplicitStartAt || hasExplicitWindowPreset)) {
1625
1059
  return MIN_CREATE_EVENT_DURATION_MINUTES;
1626
1060
  }
1627
1061
  return undefined;
1628
1062
  }
1629
1063
  if (!hasExplicitEndAt &&
1630
- isShortPreparationEvent(intent, title) &&
1064
+ isShortPreparation &&
1631
1065
  (hasExplicitStartAt || hasExplicitWindowPreset)) {
1632
1066
  return MIN_CREATE_EVENT_DURATION_MINUTES;
1633
1067
  }
@@ -1703,8 +1137,7 @@ function buildCreateEventRequest(args) {
1703
1137
  const durationMinutes = resolveCreateEventDurationMinutes({
1704
1138
  explicitDuration: explicitDuration,
1705
1139
  extractedDuration,
1706
- intent: args.intent,
1707
- title: title ?? args.fallbackRequest?.title ?? "",
1140
+ isShortPreparation: normalizeIsShortPreparationFlag(args.extractedDetails.isShortPreparation),
1708
1141
  hasExplicitEndAt: Boolean(rawEndAt),
1709
1142
  hasExplicitWindowPreset: Boolean(resolvedWindowPreset),
1710
1143
  hasExplicitStartAt: Boolean(resolvedStartAt),
@@ -1719,6 +1152,7 @@ function buildCreateEventRequest(args) {
1719
1152
  request: {
1720
1153
  mode: detailString(args.details, "mode") ?? args.fallbackRequest?.mode,
1721
1154
  side: (detailString(args.details, "side") ?? args.fallbackRequest?.side),
1155
+ grantId: detailString(args.details, "grantId"),
1722
1156
  calendarId: detailString(args.details, "calendarId") ??
1723
1157
  args.fallbackRequest?.calendarId,
1724
1158
  title: title ?? "",
@@ -1750,6 +1184,7 @@ function createEventRequestFingerprint(request) {
1750
1184
  calendarId: request.calendarId ?? null,
1751
1185
  side: request.side ?? null,
1752
1186
  mode: request.mode ?? null,
1187
+ grantId: request.grantId ?? null,
1753
1188
  });
1754
1189
  }
1755
1190
  function formatCreateEventRecentConversation(state) {
@@ -1819,6 +1254,7 @@ async function inferCreateEventDetails(runtime, message, state, intent, calendar
1819
1254
  "Return XML only. No prose. Leave fields empty when unknown.",
1820
1255
  "If a start time or window is implied but duration is not explicit, infer a reasonable positive duration.",
1821
1256
  "For short prep or reminder blocks, use at least 15 minutes instead of 0.",
1257
+ "Set isShortPreparation=true when the event is a brief prep/reminder/leave-for/get-ready block (any language) where 15 minutes is the right default.",
1822
1258
  "When the user gives a concrete day or date without an exact time-of-day, use the calendar context to infer a plausible open startAt in the calendar timezone. Avoid obvious overlaps with nearby events. If the calendar context is unavailable or the timing is ambiguous, leave startAt empty.",
1823
1259
  "Only use windowPreset for explicit 'tomorrow morning|afternoon|evening' phrasing — never as a fallback for arbitrary dates.",
1824
1260
  "",
@@ -1831,6 +1267,7 @@ async function inferCreateEventDetails(runtime, message, state, intent, calendar
1831
1267
  " <durationMinutes>number if implied</durationMinutes>",
1832
1268
  " <windowPreset>tomorrow_morning|tomorrow_afternoon|tomorrow_evening</windowPreset>",
1833
1269
  " <timeZone>IANA timezone if stated</timeZone>",
1270
+ " <isShortPreparation>true|false</isShortPreparation>",
1834
1271
  "</response>",
1835
1272
  "",
1836
1273
  `Current timezone: ${timeZone}`,
@@ -2037,14 +1474,12 @@ function scoreCalendarEvent(event, query) {
2037
1474
  score +=
2038
1475
  queryTokens.filter((token) => attendeeTokenSet.has(token)).length * 8;
2039
1476
  }
2040
- if (/\b(return|back|home)\b/.test(normalizedQuery)) {
2041
- if (/\b(return|back|home)\b/.test(`${title} ${description}`)) {
2042
- score += 24;
2043
- }
2044
- else if (/\b(flight|travel|trip)\b/.test(`${title} ${description} ${location}`)) {
2045
- score -= 36;
2046
- }
2047
- }
1477
+ // (Earlier revisions added an English-only "return/back/home" boost and a
1478
+ // counter-penalty against generic flight/travel/trip events. Token matching
1479
+ // above already covers any language; the boost was multilingual-hostile and
1480
+ // produced wrong results when the user said the equivalent in another
1481
+ // language. The grounded LLM disambiguation step picks the right match
1482
+ // when token scores are tied.)
2048
1483
  const dateTerms = eventDateSearchTerms(event);
2049
1484
  if ([...dateTerms].some((term) => term === normalizedQuery ||
2050
1485
  normalizedQuery.includes(term) ||
@@ -2165,9 +1600,6 @@ async function groundCalendarSearchMatchesWithLlm(runtime, state, intent, querie
2165
1600
  return null;
2166
1601
  }
2167
1602
  }
2168
- function isTravelEvent(event) {
2169
- return /\b(flight|fly|travel|trip|hotel|stay|lodging|airbnb|check[- ]?in|check[- ]?out|return|home)\b/i.test(`${event.title} ${event.description} ${event.location}`);
2170
- }
2171
1603
  function eventStartMs(event) {
2172
1604
  return Date.parse(event.startAt);
2173
1605
  }
@@ -2179,10 +1611,14 @@ function eventEndMs(event) {
2179
1611
  return eventStartMs(event);
2180
1612
  }
2181
1613
  function resolveTripWindowEvents(events, location) {
1614
+ // Trip-window anchoring is driven entirely by location-token matching via
1615
+ // scoreCalendarEvent. The previous English-only "travel keyword" boost
1616
+ // (flight/hotel/airbnb/...) was multilingual-hostile; the LLM trip_window
1617
+ // planner already supplies a location, so location matching alone is enough.
2182
1618
  const anchors = events
2183
1619
  .map((event) => ({
2184
1620
  event,
2185
- score: scoreCalendarEvent(event, location) + (isTravelEvent(event) ? 12 : 0),
1621
+ score: scoreCalendarEvent(event, location),
2186
1622
  }))
2187
1623
  .filter((candidate) => candidate.score > 0)
2188
1624
  .sort((left, right) => eventStartMs(left.event) - eventStartMs(right.event));
@@ -2215,17 +1651,20 @@ function formatTripWindowResults(events, location) {
2215
1651
  }
2216
1652
  return lines.join("\n");
2217
1653
  }
2218
- function formatCalendarSearchResults(events, query, label, intent) {
1654
+ function formatCalendarSearchResults(events, query, label) {
2219
1655
  if (events.length === 0) {
2220
1656
  return `No calendar events matched "${query}" ${label}.`;
2221
1657
  }
2222
1658
  if (events.length === 1) {
2223
- const event = events[0];
2224
- const normalizedIntent = normalizeText(intent);
2225
- const matchingSubject = /\b(flight|flights|fly|travel|trip|return|back|home)\b/.test(`${normalizedIntent} ${query}`)
2226
- ? "flight"
2227
- : "calendar event";
2228
- return `Your matching ${matchingSubject} is **${event.title}** (${formatCalendarMoment(event)}).`;
1659
+ const event = events.at(0);
1660
+ if (!event) {
1661
+ return `No calendar events matched "${query}" ${label}.`;
1662
+ }
1663
+ // The fallback wording is intentionally generic ("calendar event") so it
1664
+ // is correct in any language. The grounded LLM reply renderer is what
1665
+ // gives this string its final natural phrasing — no English keyword
1666
+ // regex picks the noun anymore.
1667
+ return `Your matching calendar event is **${event.title}** (${formatCalendarMoment(event)}).`;
2229
1668
  }
2230
1669
  const lines = [
2231
1670
  `Found ${events.length} calendar event${events.length === 1 ? "" : "s"} for "${query}" ${label}:`,
@@ -2284,6 +1723,11 @@ export const calendarAction = {
2284
1723
  similes: [
2285
1724
  "CALENDAR",
2286
1725
  "CHECK_CALENDAR",
1726
+ "SHOW_CALENDAR_TODAY",
1727
+ "TODAY_SCHEDULE",
1728
+ "WEEK_AHEAD",
1729
+ "WEEK_VIEW",
1730
+ "WHATS_MY_NEXT_MEETING",
2287
1731
  "SCHEDULE_EVENT",
2288
1732
  "CREATE_CALENDAR_EVENT",
2289
1733
  "SEARCH_CALENDAR",
@@ -2291,20 +1735,33 @@ export const calendarAction = {
2291
1735
  "ITINERARY",
2292
1736
  "TRAVEL_SCHEDULE",
2293
1737
  "CHECK_SCHEDULE",
1738
+ "BOOK_TIME_BLOCK",
1739
+ "RECURRING_TIME_BLOCK",
1740
+ "REBOOK_TRAVEL",
1741
+ ],
1742
+ tags: [
1743
+ "always-include",
1744
+ "calendar",
1745
+ "schedule",
1746
+ "meeting",
1747
+ "event",
1748
+ "recurring block",
1749
+ "time block",
1750
+ "travel itinerary",
2294
1751
  ],
2295
1752
  description: "Interact with Google Calendar through LifeOps. " +
2296
1753
  "USE this action for: viewing today's or this week's schedule; checking the next upcoming event; " +
2297
1754
  "searching events by title, attendee, location, or date range; creating new calendar events; " +
2298
- "querying travel itineraries, flights, hotel stays, and trip windows. " +
1755
+ "requests like 'what's my next meeting?', 'show me my calendar for today', 'what does my week look like?', or 'schedule a dentist appointment next Tuesday at 3pm'; " +
1756
+ "querying travel itineraries, flights, hotel stays, trip windows, reserving recurring time blocks, and rebooking or moving calendar-backed commitments. " +
1757
+ "These are live calendar reads and writes, so do not answer them from provider context alone and do not fall back to NONE or REPLY when this action is available. " +
2299
1758
  "DO NOT use this action for email inbox work, drafting or sending emails — use GMAIL_ACTION instead. " +
2300
1759
  "DO NOT use this action for personal habits, goals, routines, or reminders — use LIFE instead. " +
2301
1760
  "This action provides the final grounded reply; do not pair it with a speculative REPLY action.",
1761
+ descriptionCompressed: "Google Calendar via LifeOps: view schedule, search events, create events, query travel. Not for email or habits.",
2302
1762
  suppressPostActionContinuation: true,
2303
- validate: async (runtime, message, state) => {
2304
- if (!(await hasLifeOpsAccess(runtime, message))) {
2305
- return false;
2306
- }
2307
- return hasCalendarContextSignal(message, state);
1763
+ validate: async (runtime, message) => {
1764
+ return hasLifeOpsAccess(runtime, message);
2308
1765
  },
2309
1766
  handler: async (runtime, message, state, options, callback) => {
2310
1767
  if (!(await hasLifeOpsAccess(runtime, message))) {
@@ -2317,30 +1774,32 @@ export const calendarAction = {
2317
1774
  }
2318
1775
  const rawParams = options?.parameters;
2319
1776
  const params = rawParams ?? {};
2320
- const intent = resolveCalendarIntent(params.intent, message, state);
1777
+ const intent = resolveCalendarIntentInput(params.intent, message);
2321
1778
  const details = normalizeCalendarDetails(params.details);
2322
1779
  const planningTimeZone = resolveCalendarTimeZone(details);
2323
1780
  const llmPlan = await extractCalendarPlanWithLlm(runtime, message, state, intent, planningTimeZone);
2324
- const heuristicQuery = inferCalendarSearchQuery(intent);
2325
- const inferredQuery = sanitizeCalendarQuery(params.query ?? detailString(details, "query"), intent);
2326
- const inferredQueries = dedupeCalendarQueries([
2327
- inferredQuery,
2328
- ...llmPlan.queries,
2329
- ...(params.queries ?? []),
2330
- ...(detailArray(details, "queries")?.map((value) => typeof value === "string" ? value : undefined) ?? []),
2331
- ]);
1781
+ const explicitSubaction = normalizeCalendarSubaction(params.subaction);
2332
1782
  const explicitTitle = (typeof params.title === "string" && params.title.trim().length > 0
2333
1783
  ? params.title.trim()
2334
1784
  : undefined) ??
2335
1785
  detailString(details, "title") ??
2336
1786
  llmPlan.title;
2337
- const inferredTitle = explicitTitle ?? llmPlan.title ?? inferCreateEventTitle(intent);
1787
+ const inferredTitle = explicitTitle ?? llmPlan.title;
2338
1788
  const tripWindowIntent = llmPlan.tripLocation && llmPlan.tripLocation.trim().length > 0
2339
1789
  ? { location: llmPlan.tripLocation.trim() }
2340
- : inferTripWindowIntent(intent);
2341
- const explicitSubaction = params.subaction;
2342
- const preferExplicitSubaction = shouldTrustExplicitCalendarSubaction(explicitSubaction, params, details);
2343
- const hasExplicitCalendarExecutionInput = Boolean(params.subaction ||
1790
+ : null;
1791
+ const searchQueries = resolveCalendarSearchQueries({
1792
+ explicitQueries: [
1793
+ params.query,
1794
+ detailString(details, "query"),
1795
+ ...(params.queries ?? []),
1796
+ ...(detailArray(details, "queries")?.map((value) => typeof value === "string" ? value : undefined) ?? []),
1797
+ ],
1798
+ llmPlan,
1799
+ fallbackQueries: [tripWindowIntent?.location],
1800
+ });
1801
+ const structuredSubaction = resolveStructuredCalendarSubaction(params, details);
1802
+ const hasExplicitCalendarExecutionInput = Boolean(explicitSubaction ||
2344
1803
  params.title ||
2345
1804
  params.query ||
2346
1805
  (params.queries?.length ?? 0) > 0 ||
@@ -2352,46 +1811,13 @@ export const calendarAction = {
2352
1811
  detailString(details, "location") ||
2353
1812
  detailString(details, "windowPreset") ||
2354
1813
  detailNumber(details, "windowDays"));
2355
- const forcedSubaction = (() => {
2356
- const text = normalizeText(messageText(message));
2357
- if (/\b(?:rename|change|move|reschedule|push back)\b[^.?!]+\bto\b/.test(text) ||
2358
- /\b(rename|reschedule|update|edit|modify|change|move)\b.*\b(event|meeting|appointment|calendar|invite)\b/.test(text)) {
2359
- return "update_event";
2360
- }
2361
- if (/\b(delete|remove|cancel|drop|get rid of|trash|kill)\b.*\b(event|meeting|appointment|calendar|invite)\b/.test(text) ||
2362
- /\b(delete|remove|cancel)\b.+\b(today|tomorrow|tonight|this week|next week)\b/.test(text)) {
2363
- return "delete_event";
2364
- }
2365
- if (/\b(create|add|book|schedule|make|put)\b[^.?!]*\b(event|meeting|appointment|invite|calendar)\b/.test(text)) {
2366
- return "create_event";
2367
- }
2368
- if (/\b(show|list|tell|give|read)\b[^.?!]*\b(all|every|everything|entire|full|whole)\b[^.?!]*\b(event|events|calendar|schedule|meeting|meetings|appointment|appointments|entry|entries|agenda)\b/.test(text) ||
2369
- /\b(all|every|everything)\b\s+(?:my\s+)?(?:calendar|events?|meetings?|appointments?)\b/.test(text)) {
2370
- return "feed";
2371
- }
2372
- return null;
2373
- })();
2374
- let subaction;
2375
- if (tripWindowIntent) {
2376
- subaction = "trip_window";
2377
- }
2378
- else if (forcedSubaction) {
2379
- subaction = forcedSubaction;
2380
- }
2381
- else if (llmPlan.subaction && !preferExplicitSubaction) {
2382
- subaction = llmPlan.subaction;
2383
- }
2384
- else if (params.subaction) {
2385
- subaction = params.subaction;
2386
- }
2387
- else {
2388
- runtime.logger?.warn?.({ src: "action:calendar", intent }, "Calendar LLM plan returned no subaction; falling back to regex inference");
2389
- subaction = inferCalendarSubaction(normalizeText(intent), details, inferredQuery ?? heuristicQuery);
2390
- }
1814
+ const subaction = explicitSubaction ??
1815
+ llmPlan.subaction ??
1816
+ (tripWindowIntent ? "trip_window" : null) ??
1817
+ structuredSubaction;
2391
1818
  runtime.logger?.debug?.({
2392
1819
  src: "action:calendar",
2393
1820
  subaction,
2394
- forcedSubaction,
2395
1821
  rawMessage: messageText(message).slice(0, 200),
2396
1822
  resolvedIntent: intent.slice(0, 200),
2397
1823
  params: {
@@ -2419,26 +1845,25 @@ export const calendarAction = {
2419
1845
  fallback,
2420
1846
  context,
2421
1847
  });
2422
- if (!hasExplicitCalendarExecutionInput &&
2423
- !forcedSubaction &&
2424
- !tripWindowIntent &&
2425
- looksLikeLifeReminderRequestForCalendarAction(messageText(message))) {
2426
- const fallback = "That sounds like a reminder or todo rather than a calendar event. Tell me the reminder and when it should happen.";
1848
+ if (llmPlan.shouldAct === false &&
1849
+ !hasExplicitCalendarExecutionInput &&
1850
+ !explicitSubaction) {
1851
+ const fallback = llmPlan.response ?? buildCalendarReplyOnlyFallback(llmPlan.subaction);
2427
1852
  return respond({
2428
1853
  success: true,
2429
- text: await renderReply("out_of_domain", fallback, {
2430
- requestedDomain: "lifeops",
1854
+ text: await renderReply("reply_only", fallback, {
1855
+ llmPlan,
1856
+ suggestedSubaction: llmPlan.subaction,
2431
1857
  }),
2432
1858
  data: {
2433
1859
  noop: true,
2434
- suggestedSubaction: null,
1860
+ ...(llmPlan.subaction
1861
+ ? { suggestedSubaction: llmPlan.subaction }
1862
+ : {}),
2435
1863
  },
2436
1864
  });
2437
1865
  }
2438
- if (llmPlan.shouldAct === false &&
2439
- !hasExplicitCalendarExecutionInput &&
2440
- !forcedSubaction &&
2441
- !tripWindowIntent) {
1866
+ if (!subaction) {
2442
1867
  const fallback = llmPlan.response ?? buildCalendarReplyOnlyFallback(llmPlan.subaction);
2443
1868
  return respond({
2444
1869
  success: true,
@@ -2598,47 +2023,37 @@ export const calendarAction = {
2598
2023
  text: calendarWriteUnavailableMessage(google),
2599
2024
  });
2600
2025
  }
2601
- // Parse "rename X to Y" / "change X to Y" patterns directly from
2602
- // the user message. The chat LLM tends to put only the NEW title in
2603
- // params.title, but we need the OLD title to find the event we're
2604
- // patching. Pull both halves from the literal phrase if it's there.
2605
- // We try the raw message first because resolveCalendarIntent may
2606
- // have replaced the user's text with the LLM's rewritten version,
2607
- // which often drops "rename" entirely.
2608
- const rawMessageText = messageText(message);
2609
- const renamePattern = /\b(?:rename|change|update|edit)\b\s+["“]?([^"”]+?)["”]?\s+(?:to|into|as)\s+["“]?([^"”]+?)["”]?(?:[.!?]|$)/i;
2610
- const renameMatch = rawMessageText.match(renamePattern) ?? intent.match(renamePattern);
2611
- const oldTitleFromIntent = renameMatch?.[1]?.trim();
2612
- const newTitleFromIntent = renameMatch?.[2]?.trim();
2613
2026
  const explicitEventId = detailString(details, "eventId");
2614
2027
  let resolvedEventId = explicitEventId;
2615
2028
  let resolvedCalendarId = detailString(details, "calendarId");
2616
2029
  let targetEvent = null;
2617
- // Same lookup-by-title fallback as delete_event so the user can say
2618
- // "rename my dentist appointment to dentist follow-up" without first
2619
- // copying an opaque google id.
2620
2030
  if (!resolvedEventId) {
2621
- // Use a wide lookup window — events can be far in the future
2622
- // (e.g. a birthday in 2027). The default narrow window would
2623
- // miss anything beyond the current day.
2624
- // forceSync: true is critical here — without it the feed query
2625
- // returns the local cache (life_calendar_events), which may not
2626
- // contain far-future events that have never been synced before
2627
- // (or any events at all if the cache was wiped). Forcing the
2628
- // sync makes the bot pull a fresh window from Google so the
2629
- // title-based lookup actually has events to filter against.
2630
- const wideLookup = buildWideLookupRange(resolveCalendarTimeZone(details));
2031
+ const titleHint = searchQueries[0];
2032
+ if (!titleHint) {
2033
+ return respond({
2034
+ success: false,
2035
+ text: await renderReply("clarify_update_event_target", "Tell me which calendar event you want to change by title, person, place, or date.", {
2036
+ missing: ["target event"],
2037
+ }),
2038
+ });
2039
+ }
2040
+ const feedRequest = detailString(details, "timeMin") ||
2041
+ detailString(details, "timeMax") ||
2042
+ llmPlan.timeMin ||
2043
+ llmPlan.timeMax
2044
+ ? resolveCalendarWindow(intent, details, true, llmPlan).request
2045
+ : {
2046
+ calendarId: detailString(details, "calendarId"),
2047
+ timeZone: resolveCalendarTimeZone(details),
2048
+ ...buildWideLookupRange(resolveCalendarTimeZone(details)),
2049
+ };
2631
2050
  const feed = await service.getCalendarFeed(INTERNAL_URL, {
2632
2051
  mode: detailString(details, "mode"),
2633
2052
  side: detailString(details, "side"),
2634
- calendarId: detailString(details, "calendarId"),
2635
- timeZone: resolveCalendarTimeZone(details),
2053
+ grantId: detailString(details, "grantId"),
2636
2054
  forceSync: true,
2637
- ...wideLookup,
2055
+ ...feedRequest,
2638
2056
  });
2639
- // Prefer the OLD title parsed from "rename X to Y" — explicit
2640
- // title from the chat LLM almost always carries the NEW name.
2641
- const titleHint = oldTitleFromIntent ?? explicitTitle ?? inferredTitle;
2642
2057
  const candidates = titleHint
2643
2058
  ? feed.events.filter((e) => normalizeText(e.title).includes(normalizeText(titleHint)))
2644
2059
  : feed.events;
@@ -2668,47 +2083,22 @@ export const calendarAction = {
2668
2083
  }),
2669
2084
  });
2670
2085
  }
2671
- targetEvent = candidates[0];
2086
+ targetEvent = candidates.at(0) ?? null;
2087
+ if (!targetEvent) {
2088
+ return respond({
2089
+ success: false,
2090
+ text: await renderReply("update_event_not_found", "i couldn't find a unique event to update.", { titleHint }),
2091
+ });
2092
+ }
2672
2093
  resolvedEventId = targetEvent.externalId;
2673
2094
  resolvedCalendarId = targetEvent.calendarId;
2674
2095
  }
2675
- const newTitle = newTitleFromIntent ??
2676
- detailString(details, "newTitle") ??
2677
- explicitTitle;
2678
- // Reuse the same LLM extractor that create_event uses to pull
2679
- // startAt / endAt / location / description out of the user's intent
2680
- // text. The chat LLM rarely populates `details.startAt` directly for
2681
- // an update — it just rewrites the intent and lets the action figure
2682
- // out the time. Without this we'd PATCH with no fields and the
2683
- // event wouldn't actually move.
2684
- //
2685
- // CRITICAL: only run the extractor when the user actually mentioned
2686
- // a time. For pure rename intents like "rename X to Y" the LLM will
2687
- // happily hallucinate a startAt from the year in the new title
2688
- // ("rename my party 2027 to ..." → startAt 2027-01-01), and a
2689
- // PATCH with start.dateTime but no matching end.dateTime triggers
2690
- // Google's "Bad Request" rejection. Detect time keywords in the
2691
- // raw message before invoking the extractor.
2096
+ const newTitle = detailString(details, "newTitle") ?? explicitTitle;
2692
2097
  const explicitStartAtForUpdate = detailString(details, "startAt");
2693
2098
  const explicitEndAtForUpdate = detailString(details, "endAt");
2694
- const rawForUpdate = normalizeText(messageText(message));
2695
- const hasTimeAnchor = /\b(at|on|by|from|until)\s+\d/.test(rawForUpdate) ||
2696
- /\b(today|tomorrow|tonight|monday|tuesday|wednesday|thursday|friday|saturday|sunday|january|february|march|april|may|june|july|august|september|october|november|december)\b/.test(rawForUpdate) ||
2697
- /\b\d{1,2}(?::\d{2})?\s*(?:am|pm)\b/.test(rawForUpdate) ||
2698
- /\b\d{1,2}\/\d{1,2}(?:\/\d{2,4})?\b/.test(rawForUpdate);
2699
- const hasRelativeShiftCue = /\b(?:later|earlier|push back|push it back|bring forward|move forward|move back|delay|postpone|advance)\b/.test(rawForUpdate);
2700
- const needsTimeExtraction = (hasTimeAnchor || hasRelativeShiftCue) &&
2701
- !(explicitStartAtForUpdate ||
2702
- explicitEndAtForUpdate ||
2703
- detailNumber(details, "durationMinutes"));
2704
- const shouldInferUpdateDetails = Boolean(targetEvent) &&
2705
- (needsTimeExtraction ||
2706
- /\b(?:rename|change|move|reschedule|update|edit|location|description|notes)\b/.test(rawForUpdate));
2707
- const extractedForUpdate = shouldInferUpdateDetails
2099
+ const extractedForUpdate = targetEvent
2708
2100
  ? await inferUpdateEventDetails(runtime, message, state, intent, targetEvent, targetEvent?.timezone ?? planningTimeZone)
2709
- : needsTimeExtraction
2710
- ? await inferCreateEventDetails(runtime, message, state, intent, null, targetEvent?.timezone ?? planningTimeZone)
2711
- : {};
2101
+ : {};
2712
2102
  const extractedStartAt = typeof extractedForUpdate.startAt === "string"
2713
2103
  ? extractedForUpdate.startAt.trim()
2714
2104
  : undefined;
@@ -2727,6 +2117,7 @@ export const calendarAction = {
2727
2117
  const event = await service.updateCalendarEvent(INTERNAL_URL, {
2728
2118
  mode: detailString(details, "mode"),
2729
2119
  side: detailString(details, "side"),
2120
+ grantId: detailString(details, "grantId"),
2730
2121
  calendarId: resolvedCalendarId,
2731
2122
  eventId: resolvedEventId ?? "",
2732
2123
  title: newTitle,
@@ -2760,22 +2151,24 @@ export const calendarAction = {
2760
2151
  }
2761
2152
  const explicitEventId = detailString(details, "eventId");
2762
2153
  const calendarIdForDelete = detailString(details, "calendarId");
2763
- // The LLM may not know the event id directly. Fall back to a feed
2764
- // lookup so phrases like "delete the duplicate test event tomorrow"
2765
- // can resolve to a concrete event without forcing the user to copy
2766
- // an opaque google id from the bot's previous reply.
2767
2154
  const resolvedEventId = explicitEventId;
2768
2155
  let resolvedEventTitle;
2769
2156
  const resolvedCalendarId = calendarIdForDelete;
2770
2157
  if (!resolvedEventId) {
2771
- // For delete-by-title we honor an explicit time window if the
2772
- // user gave one ("delete the test event tomorrow"); otherwise we
2773
- // search wide so far-future events are still findable.
2774
- // forceSync: true ensures the lookup actually queries Google
2775
- // instead of returning a stale (or empty) local cache.
2776
- const hasExplicitWindow = /\b(today|tomorrow|tonight|this week|next week|the week after|this weekend|next weekend|weekend|this month|next month|monday|tuesday|wednesday|thursday|friday|saturday|sunday)\b/i.test(intent);
2777
- const feedRequest = hasExplicitWindow
2778
- ? resolveCalendarWindow(intent, details, false, llmPlan).request
2158
+ const titleHint = searchQueries[0];
2159
+ if (!titleHint) {
2160
+ return respond({
2161
+ success: false,
2162
+ text: await renderReply("clarify_delete_event_target", "Tell me which calendar event you want to delete by title, person, place, or date.", {
2163
+ missing: ["target event"],
2164
+ }),
2165
+ });
2166
+ }
2167
+ const feedRequest = detailString(details, "timeMin") ||
2168
+ detailString(details, "timeMax") ||
2169
+ llmPlan.timeMin ||
2170
+ llmPlan.timeMax
2171
+ ? resolveCalendarWindow(intent, details, true, llmPlan).request
2779
2172
  : {
2780
2173
  calendarId: detailString(details, "calendarId"),
2781
2174
  timeZone: resolveCalendarTimeZone(details),
@@ -2784,10 +2177,10 @@ export const calendarAction = {
2784
2177
  const feed = await service.getCalendarFeed(INTERNAL_URL, {
2785
2178
  mode: detailString(details, "mode"),
2786
2179
  side: detailString(details, "side"),
2180
+ grantId: detailString(details, "grantId"),
2787
2181
  forceSync: true,
2788
2182
  ...feedRequest,
2789
2183
  });
2790
- const titleHint = explicitTitle ?? inferredTitle;
2791
2184
  const candidates = titleHint
2792
2185
  ? feed.events.filter((e) => normalizeText(e.title).includes(normalizeText(titleHint)))
2793
2186
  : feed.events;
@@ -2802,14 +2195,7 @@ export const calendarAction = {
2802
2195
  }),
2803
2196
  });
2804
2197
  }
2805
- // Detect "delete all / delete both / delete N" phrasing — when the
2806
- // user explicitly opts in to multi-delete, sweep every match.
2807
- const deleteAllMatch = shouldDeleteAllMatchingCalendarEvents({
2808
- intent,
2809
- titleHint,
2810
- candidateCount: candidates.length,
2811
- });
2812
- if (candidates.length > 1 && !deleteAllMatch) {
2198
+ if (candidates.length > 1) {
2813
2199
  const fallback = buildCalendarEventDisambiguationFallback({
2814
2200
  action: "delete",
2815
2201
  candidates,
@@ -2824,13 +2210,14 @@ export const calendarAction = {
2824
2210
  }),
2825
2211
  });
2826
2212
  }
2827
- const targets = deleteAllMatch ? candidates : [candidates[0]];
2213
+ const targets = candidates.slice(0, 1);
2828
2214
  const deleteResults = [];
2829
2215
  for (const target of targets) {
2830
2216
  try {
2831
2217
  await service.deleteCalendarEvent(INTERNAL_URL, {
2832
2218
  mode: detailString(details, "mode"),
2833
2219
  side: detailString(details, "side"),
2220
+ grantId: detailString(details, "grantId"),
2834
2221
  calendarId: target.calendarId,
2835
2222
  eventId: target.externalId,
2836
2223
  });
@@ -2850,9 +2237,12 @@ export const calendarAction = {
2850
2237
  title: result.title,
2851
2238
  ok: result.ok,
2852
2239
  }));
2240
+ const firstDeleteResult = deleteResults.at(0);
2853
2241
  const summary = failCount === 0
2854
2242
  ? targets.length === 1
2855
- ? `deleted "${deleteResults[0].title}".`
2243
+ ? firstDeleteResult
2244
+ ? `deleted "${firstDeleteResult.title}".`
2245
+ : "deleted that event."
2856
2246
  : `deleted ${okCount} matching events.`
2857
2247
  : okCount === 0
2858
2248
  ? `I couldn't delete those ${deleteResults.length} matching events. Try again in a bit or tell me which one to remove.`
@@ -2878,6 +2268,7 @@ export const calendarAction = {
2878
2268
  await service.deleteCalendarEvent(INTERNAL_URL, {
2879
2269
  mode: detailString(details, "mode"),
2880
2270
  side: detailString(details, "side"),
2271
+ grantId: detailString(details, "grantId"),
2881
2272
  calendarId: resolvedCalendarId,
2882
2273
  eventId: resolvedEventId,
2883
2274
  });
@@ -2901,6 +2292,7 @@ export const calendarAction = {
2901
2292
  const feed = await service.getCalendarFeed(INTERNAL_URL, {
2902
2293
  mode: detailString(details, "mode"),
2903
2294
  side: detailString(details, "side"),
2295
+ grantId: detailString(details, "grantId"),
2904
2296
  ...resolveTripWindowRequest(details, llmPlan),
2905
2297
  });
2906
2298
  const itineraryEvents = resolveTripWindowEvents(feed.events, tripWindowIntent.location);
@@ -2939,30 +2331,16 @@ export const calendarAction = {
2939
2331
  // events" returns "no events today" even when the calendar has
2940
2332
  // dozens of upcoming items. We apply this regardless of whether the
2941
2333
  // chat LLM picked feed or search_events because both subactions go
2942
- // through this code path.
2943
- const rawMessageNorm = normalizeText(messageText(message));
2944
- const wantsWideWindow = /\b(all|every|everything|entire|full|whole)\b[^.?!]*\b(event|events|calendar|schedule|meeting|meetings|appointment|appointments|entry|entries|agenda)\b/.test(rawMessageNorm) ||
2945
- /\b(next|past|last)\s+\d+\s*(year|years|month|months|weeks?)\b/.test(rawMessageNorm) ||
2946
- /\b(today\s+(?:until|through|to)\s+next\s+(?:year|month))\b/.test(rawMessageNorm) ||
2947
- /\bevery\s+calendar\s+entry\b/.test(rawMessageNorm);
2948
- const baseResolved = resolveCalendarWindow(intent, details, subaction === "search_events" || wantsWideWindow, llmPlan);
2949
- const request = wantsWideWindow
2950
- ? {
2951
- ...baseResolved.request,
2952
- ...buildWideLookupRange(resolveCalendarTimeZone(details)),
2953
- }
2954
- : baseResolved.request;
2955
- const label = wantsWideWindow
2956
- ? "across the full window"
2957
- : baseResolved.label;
2334
+ const baseResolved = resolveCalendarWindow(intent, details, subaction === "search_events", llmPlan);
2335
+ const request = baseResolved.request;
2336
+ const label = baseResolved.label;
2958
2337
  const feed = await service.getCalendarFeed(INTERNAL_URL, {
2959
2338
  mode: detailString(details, "mode"),
2960
2339
  side: detailString(details, "side"),
2961
- forceSync: wantsWideWindow,
2340
+ grantId: detailString(details, "grantId"),
2962
2341
  ...request,
2963
2342
  });
2964
2343
  if (subaction === "search_events") {
2965
- const searchQueries = await resolveCalendarSearchQueries(runtime, message, state, [...inferredQueries], intent, llmPlan, planningTimeZone);
2966
2344
  const query = searchQueries[0];
2967
2345
  if (!query || searchQueries.length === 0) {
2968
2346
  return respond({
@@ -3009,7 +2387,7 @@ export const calendarAction = {
3009
2387
  .map((candidate) => candidate.event);
3010
2388
  }
3011
2389
  }
3012
- const fallback = formatCalendarSearchResults(filteredEvents, query, label, intent);
2390
+ const fallback = formatCalendarSearchResults(filteredEvents, query, label);
3013
2391
  return respond({
3014
2392
  success: true,
3015
2393
  text: await renderReply("search_results", fallback, {
@@ -3127,6 +2505,18 @@ export const calendarAction = {
3127
2505
  },
3128
2506
  },
3129
2507
  ],
2508
+ [
2509
+ {
2510
+ name: "{{name1}}",
2511
+ content: { text: "What does my week look like?" },
2512
+ },
2513
+ {
2514
+ name: "{{agentName}}",
2515
+ content: {
2516
+ text: "This week's calendar includes 4 events, starting with a dentist appointment on Tuesday at 3:00 PM.",
2517
+ },
2518
+ },
2519
+ ],
3130
2520
  [
3131
2521
  {
3132
2522
  name: "{{name1}}",
@@ -3139,5 +2529,47 @@ export const calendarAction = {
3139
2529
  },
3140
2530
  },
3141
2531
  ],
2532
+ [
2533
+ {
2534
+ name: "{{name1}}",
2535
+ content: {
2536
+ text: "Put a 1:1 with Alex on my calendar Thursday at 10am for 30 minutes.",
2537
+ },
2538
+ },
2539
+ {
2540
+ name: "{{agentName}}",
2541
+ content: {
2542
+ text: 'Created calendar event "1:1 with Alex" for Thursday at 10:00 AM for 30 minutes.',
2543
+ },
2544
+ },
2545
+ ],
2546
+ [
2547
+ {
2548
+ name: "{{name1}}",
2549
+ content: {
2550
+ text: "Need to book 1 hour per day for time with Jill. Any time is fine, ideally before sleep.",
2551
+ },
2552
+ },
2553
+ {
2554
+ name: "{{agentName}}",
2555
+ content: {
2556
+ text: "I'll create a recurring daily one-hour block with Jill, placed before your sleep window when possible.",
2557
+ },
2558
+ },
2559
+ ],
2560
+ [
2561
+ {
2562
+ name: "{{name1}}",
2563
+ content: {
2564
+ text: "Flag the conflict before my flight later and, if needed, help rebook the other thing.",
2565
+ },
2566
+ },
2567
+ {
2568
+ name: "{{agentName}}",
2569
+ content: {
2570
+ text: "I'll check the flight against your calendar, flag the conflict, and help move the other commitment if it collides.",
2571
+ },
2572
+ },
2573
+ ],
3142
2574
  ],
3143
2575
  };