@elizaos/agent 2.0.0-alpha.385 → 2.0.0-alpha.393

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 (377) hide show
  1. package/apps/app-companion/src/components/companion/CompanionAppView.d.ts.map +1 -1
  2. package/apps/app-companion/src/components/companion/CompanionAppView.js +6 -4
  3. package/apps/app-companion/src/components/companion/CompanionView.d.ts.map +1 -1
  4. package/apps/app-companion/src/components/companion/CompanionView.js +6 -4
  5. package/apps/app-knowledge/src/routes.d.ts +1 -1
  6. package/apps/app-knowledge/src/routes.d.ts.map +1 -1
  7. package/apps/app-knowledge/src/routes.js +1 -1
  8. package/apps/app-lifeops/src/api/client-lifeops.js +6 -0
  9. package/apps/app-lifeops/src/components/AppBlockerSettingsCard.d.ts +3 -0
  10. package/apps/app-lifeops/src/components/AppBlockerSettingsCard.d.ts.map +1 -0
  11. package/apps/app-lifeops/src/components/AppBlockerSettingsCard.js +189 -0
  12. package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.d.ts +2 -0
  13. package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.d.ts.map +1 -0
  14. package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.js +1065 -0
  15. package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.d.ts +7 -0
  16. package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.d.ts.map +1 -0
  17. package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.js +71 -0
  18. package/apps/app-lifeops/src/components/DataSourcesStrip.d.ts +14 -0
  19. package/apps/app-lifeops/src/components/DataSourcesStrip.d.ts.map +1 -0
  20. package/apps/app-lifeops/src/components/DataSourcesStrip.js +36 -0
  21. package/apps/app-lifeops/src/components/EventEditorDrawer.d.ts +23 -0
  22. package/apps/app-lifeops/src/components/EventEditorDrawer.d.ts.map +1 -0
  23. package/apps/app-lifeops/src/components/EventEditorDrawer.js +514 -0
  24. package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.d.ts +2 -0
  25. package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.d.ts.map +1 -0
  26. package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.js +10 -0
  27. package/apps/app-lifeops/src/components/LifeOpsCalendarSection.d.ts +15 -0
  28. package/apps/app-lifeops/src/components/LifeOpsCalendarSection.d.ts.map +1 -0
  29. package/apps/app-lifeops/src/components/LifeOpsCalendarSection.js +515 -0
  30. package/apps/app-lifeops/src/components/LifeOpsChatAdapter.d.ts +34 -0
  31. package/apps/app-lifeops/src/components/LifeOpsChatAdapter.d.ts.map +1 -0
  32. package/apps/app-lifeops/src/components/LifeOpsChatAdapter.js +175 -0
  33. package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.d.ts +2 -0
  34. package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.d.ts.map +1 -0
  35. package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.js +99 -0
  36. package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.d.ts +37 -0
  37. package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.d.ts.map +1 -0
  38. package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.js +88 -0
  39. package/apps/app-lifeops/src/components/LifeOpsInboxSection.d.ts +13 -0
  40. package/apps/app-lifeops/src/components/LifeOpsInboxSection.d.ts.map +1 -0
  41. package/apps/app-lifeops/src/components/LifeOpsInboxSection.js +490 -0
  42. package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.d.ts +12 -0
  43. package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.d.ts.map +1 -0
  44. package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.js +92 -0
  45. package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.d.ts +12 -0
  46. package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.d.ts.map +1 -0
  47. package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.js +160 -0
  48. package/apps/app-lifeops/src/components/LifeOpsMoneySection.d.ts +3 -0
  49. package/apps/app-lifeops/src/components/LifeOpsMoneySection.d.ts.map +1 -0
  50. package/apps/app-lifeops/src/components/LifeOpsMoneySection.js +373 -0
  51. package/apps/app-lifeops/src/components/LifeOpsNavRail.d.ts +9 -0
  52. package/apps/app-lifeops/src/components/LifeOpsNavRail.d.ts.map +1 -0
  53. package/apps/app-lifeops/src/components/LifeOpsNavRail.js +93 -0
  54. package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.d.ts +4 -0
  55. package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.d.ts.map +1 -0
  56. package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.js +274 -0
  57. package/apps/app-lifeops/src/components/LifeOpsOverviewSection.d.ts +7 -0
  58. package/apps/app-lifeops/src/components/LifeOpsOverviewSection.d.ts.map +1 -0
  59. package/apps/app-lifeops/src/components/LifeOpsOverviewSection.js +657 -0
  60. package/apps/app-lifeops/src/components/LifeOpsPageSections.d.ts +42 -0
  61. package/apps/app-lifeops/src/components/LifeOpsPageSections.d.ts.map +1 -0
  62. package/apps/app-lifeops/src/components/LifeOpsPageSections.js +166 -0
  63. package/apps/app-lifeops/src/components/LifeOpsPageView.d.ts +2 -0
  64. package/apps/app-lifeops/src/components/LifeOpsPageView.d.ts.map +1 -0
  65. package/apps/app-lifeops/src/components/LifeOpsPageView.js +566 -0
  66. package/apps/app-lifeops/src/components/LifeOpsRemindersSection.d.ts +2 -0
  67. package/apps/app-lifeops/src/components/LifeOpsRemindersSection.d.ts.map +1 -0
  68. package/apps/app-lifeops/src/components/LifeOpsRemindersSection.js +749 -0
  69. package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.d.ts +27 -0
  70. package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.d.ts.map +1 -0
  71. package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.js +106 -0
  72. package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.d.ts +2 -0
  73. package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.d.ts.map +1 -0
  74. package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.js +373 -0
  75. package/apps/app-lifeops/src/components/LifeOpsSectionContent.d.ts +10 -0
  76. package/apps/app-lifeops/src/components/LifeOpsSectionContent.d.ts.map +1 -0
  77. package/apps/app-lifeops/src/components/LifeOpsSectionContent.js +30 -0
  78. package/apps/app-lifeops/src/components/LifeOpsSelectionContext.d.ts +21 -0
  79. package/apps/app-lifeops/src/components/LifeOpsSelectionContext.d.ts.map +1 -0
  80. package/apps/app-lifeops/src/components/LifeOpsSelectionContext.js +30 -0
  81. package/apps/app-lifeops/src/components/LifeOpsSettingsSection.d.ts +20 -0
  82. package/apps/app-lifeops/src/components/LifeOpsSettingsSection.d.ts.map +1 -0
  83. package/apps/app-lifeops/src/components/LifeOpsSettingsSection.js +597 -0
  84. package/apps/app-lifeops/src/components/LifeOpsSetupGate.d.ts +13 -0
  85. package/apps/app-lifeops/src/components/LifeOpsSetupGate.d.ts.map +1 -0
  86. package/apps/app-lifeops/src/components/LifeOpsSetupGate.js +134 -0
  87. package/apps/app-lifeops/src/components/LifeOpsSleepSection.d.ts +10 -0
  88. package/apps/app-lifeops/src/components/LifeOpsSleepSection.d.ts.map +1 -0
  89. package/apps/app-lifeops/src/components/LifeOpsSleepSection.js +425 -0
  90. package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.d.ts +11 -0
  91. package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.d.ts.map +1 -0
  92. package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.js +49 -0
  93. package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.d.ts +2 -0
  94. package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.d.ts.map +1 -0
  95. package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.js +1041 -0
  96. package/apps/app-lifeops/src/components/MessagingConnectorCards.d.ts +7 -0
  97. package/apps/app-lifeops/src/components/MessagingConnectorCards.d.ts.map +1 -0
  98. package/apps/app-lifeops/src/components/MessagingConnectorCards.js +643 -0
  99. package/apps/app-lifeops/src/components/MissingSourceCard.d.ts +9 -0
  100. package/apps/app-lifeops/src/components/MissingSourceCard.d.ts.map +1 -0
  101. package/apps/app-lifeops/src/components/MissingSourceCard.js +5 -0
  102. package/apps/app-lifeops/src/components/MobileSignalsSetupCard.d.ts +2 -0
  103. package/apps/app-lifeops/src/components/MobileSignalsSetupCard.d.ts.map +1 -0
  104. package/apps/app-lifeops/src/components/MobileSignalsSetupCard.js +163 -0
  105. package/apps/app-lifeops/src/components/SleepInspectionPanel.d.ts +8 -0
  106. package/apps/app-lifeops/src/components/SleepInspectionPanel.d.ts.map +1 -0
  107. package/apps/app-lifeops/src/components/SleepInspectionPanel.js +59 -0
  108. package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.d.ts +3 -0
  109. package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.d.ts.map +1 -0
  110. package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.js +75 -0
  111. package/apps/app-lifeops/src/components/WhatsAppQrOverlay.d.ts +8 -0
  112. package/apps/app-lifeops/src/components/WhatsAppQrOverlay.d.ts.map +1 -0
  113. package/apps/app-lifeops/src/components/WhatsAppQrOverlay.js +48 -0
  114. package/apps/app-lifeops/src/components/lifeops-labels.d.ts +2 -0
  115. package/apps/app-lifeops/src/components/lifeops-labels.d.ts.map +1 -0
  116. package/apps/app-lifeops/src/components/lifeops-labels.js +5 -0
  117. package/apps/app-lifeops/src/events/index.d.ts +34 -0
  118. package/apps/app-lifeops/src/events/index.d.ts.map +1 -0
  119. package/apps/app-lifeops/src/events/index.js +23 -0
  120. package/apps/app-lifeops/src/hooks/useCalendarWeek.d.ts +28 -0
  121. package/apps/app-lifeops/src/hooks/useCalendarWeek.d.ts.map +1 -0
  122. package/apps/app-lifeops/src/hooks/useCalendarWeek.js +93 -0
  123. package/apps/app-lifeops/src/hooks/useDiscordConnector.d.ts +14 -0
  124. package/apps/app-lifeops/src/hooks/useDiscordConnector.d.ts.map +1 -0
  125. package/apps/app-lifeops/src/hooks/useDiscordConnector.js +126 -0
  126. package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.d.ts +29 -0
  127. package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.d.ts.map +1 -0
  128. package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.js +481 -0
  129. package/apps/app-lifeops/src/hooks/useIMessageConnector.d.ts +10 -0
  130. package/apps/app-lifeops/src/hooks/useIMessageConnector.d.ts.map +1 -0
  131. package/apps/app-lifeops/src/hooks/useIMessageConnector.js +50 -0
  132. package/apps/app-lifeops/src/hooks/useInbox.d.ts +34 -0
  133. package/apps/app-lifeops/src/hooks/useInbox.d.ts.map +1 -0
  134. package/apps/app-lifeops/src/hooks/useInbox.js +98 -0
  135. package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.d.ts +2 -0
  136. package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.d.ts.map +1 -0
  137. package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.js +383 -0
  138. package/apps/app-lifeops/src/hooks/useLifeOpsAppState.d.ts +9 -0
  139. package/apps/app-lifeops/src/hooks/useLifeOpsAppState.d.ts.map +1 -0
  140. package/apps/app-lifeops/src/hooks/useLifeOpsAppState.js +83 -0
  141. package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.d.ts +8 -0
  142. package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.d.ts.map +1 -0
  143. package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.js +60 -0
  144. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.d.ts +18 -0
  145. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.d.ts.map +1 -0
  146. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.js +66 -0
  147. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.d.ts +14 -0
  148. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.d.ts.map +1 -0
  149. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.js +79 -0
  150. package/apps/app-lifeops/src/hooks/useLifeOpsSection.d.ts +18 -0
  151. package/apps/app-lifeops/src/hooks/useLifeOpsSection.d.ts.map +1 -0
  152. package/apps/app-lifeops/src/hooks/useLifeOpsSection.js +78 -0
  153. package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.d.ts +14 -0
  154. package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.d.ts.map +1 -0
  155. package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.js +160 -0
  156. package/apps/app-lifeops/src/hooks/useSignalConnector.d.ts +16 -0
  157. package/apps/app-lifeops/src/hooks/useSignalConnector.d.ts.map +1 -0
  158. package/apps/app-lifeops/src/hooks/useSignalConnector.js +198 -0
  159. package/apps/app-lifeops/src/hooks/useTelegramConnector.d.ts +21 -0
  160. package/apps/app-lifeops/src/hooks/useTelegramConnector.d.ts.map +1 -0
  161. package/apps/app-lifeops/src/hooks/useTelegramConnector.js +177 -0
  162. package/apps/app-lifeops/src/hooks/useWhatsAppConnector.d.ts +8 -0
  163. package/apps/app-lifeops/src/hooks/useWhatsAppConnector.d.ts.map +1 -0
  164. package/apps/app-lifeops/src/hooks/useWhatsAppConnector.js +58 -0
  165. package/apps/app-lifeops/src/hooks/useWhatsAppPairing.d.ts +12 -0
  166. package/apps/app-lifeops/src/hooks/useWhatsAppPairing.d.ts.map +1 -0
  167. package/apps/app-lifeops/src/hooks/useWhatsAppPairing.js +152 -0
  168. package/apps/app-lifeops/src/lifeops/discord-browser-scraper.js +1 -1
  169. package/apps/app-lifeops/src/lifeops/google-gmail.d.ts.map +1 -1
  170. package/apps/app-lifeops/src/lifeops/google-gmail.js +74 -26
  171. package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts.map +1 -1
  172. package/apps/app-lifeops/src/lifeops/google-managed-client.js +4 -5
  173. package/apps/app-lifeops/src/lifeops/google-oauth.d.ts.map +1 -1
  174. package/apps/app-lifeops/src/lifeops/google-oauth.js +2 -2
  175. package/apps/app-lifeops/src/lifeops/owner-profile.d.ts.map +1 -1
  176. package/apps/app-lifeops/src/lifeops/owner-profile.js +1 -1
  177. package/apps/app-lifeops/src/lifeops/paypal-managed-client.d.ts.map +1 -1
  178. package/apps/app-lifeops/src/lifeops/paypal-managed-client.js +4 -5
  179. package/apps/app-lifeops/src/lifeops/plaid-managed-client.d.ts.map +1 -1
  180. package/apps/app-lifeops/src/lifeops/plaid-managed-client.js +4 -5
  181. package/apps/app-lifeops/src/lifeops/schedule-sync-client.js +2 -2
  182. package/apps/app-lifeops/src/lifeops/service-constants.d.ts +1 -0
  183. package/apps/app-lifeops/src/lifeops/service-constants.d.ts.map +1 -1
  184. package/apps/app-lifeops/src/lifeops/service-constants.js +1 -0
  185. package/apps/app-lifeops/src/lifeops/service-mixin-core.d.ts +1 -1
  186. package/apps/app-lifeops/src/lifeops/service-mixin-core.d.ts.map +1 -1
  187. package/apps/app-lifeops/src/lifeops/service-mixin-core.js +2 -1
  188. package/apps/app-lifeops/src/lifeops/service-mixin-imessage.js +1 -1
  189. package/apps/app-lifeops/src/lifeops/service-mixin-inbox.d.ts +3 -1
  190. package/apps/app-lifeops/src/lifeops/service-mixin-inbox.d.ts.map +1 -1
  191. package/apps/app-lifeops/src/lifeops/service-mixin-inbox.js +42 -13
  192. package/apps/app-lifeops/src/lifeops/service-mixin-reminders.d.ts.map +1 -1
  193. package/apps/app-lifeops/src/lifeops/service-mixin-reminders.js +3 -2
  194. package/apps/app-lifeops/src/lifeops/service-mixin-workflows.d.ts.map +1 -1
  195. package/apps/app-lifeops/src/lifeops/service-mixin-workflows.js +1 -1
  196. package/apps/app-lifeops/src/lifeops/service-normalize-calendar.d.ts.map +1 -1
  197. package/apps/app-lifeops/src/lifeops/service-normalize-calendar.js +3 -3
  198. package/apps/app-lifeops/src/lifeops/service-normalize-connector.d.ts +1 -1
  199. package/apps/app-lifeops/src/lifeops/service-normalize-connector.d.ts.map +1 -1
  200. package/apps/app-lifeops/src/lifeops/service-normalize-connector.js +2 -2
  201. package/apps/app-lifeops/src/lifeops/signal-auth.d.ts.map +1 -1
  202. package/apps/app-lifeops/src/lifeops/signal-auth.js +6 -3
  203. package/apps/app-lifeops/src/lifeops/telegram-auth.js +1 -1
  204. package/apps/app-lifeops/src/lifeops/travel-adapters/duffel.d.ts.map +1 -1
  205. package/apps/app-lifeops/src/lifeops/travel-adapters/duffel.js +31 -6
  206. package/apps/app-lifeops/src/lifeops/twilio.js +1 -1
  207. package/apps/app-lifeops/src/lifeops/x-poster.d.ts.map +1 -1
  208. package/apps/app-lifeops/src/lifeops/x-poster.js +13 -3
  209. package/apps/app-lifeops/src/lifeops-route.d.ts +74 -0
  210. package/apps/app-lifeops/src/lifeops-route.d.ts.map +1 -0
  211. package/apps/app-lifeops/src/lifeops-route.js +204 -0
  212. package/apps/app-lifeops/src/platform/lifeops-github.d.ts +15 -0
  213. package/apps/app-lifeops/src/platform/lifeops-github.d.ts.map +1 -0
  214. package/apps/app-lifeops/src/platform/lifeops-github.js +135 -0
  215. package/apps/app-lifeops/src/routes/cloud-features-routes.d.ts +2 -2
  216. package/apps/app-lifeops/src/routes/cloud-features-routes.d.ts.map +1 -1
  217. package/apps/app-lifeops/src/routes/cloud-features-routes.js +5 -3
  218. package/apps/app-lifeops/src/routes/lifeops-routes.d.ts.map +1 -1
  219. package/apps/app-lifeops/src/routes/lifeops-routes.js +15 -3
  220. package/apps/app-lifeops/src/routes/plugin.d.ts.map +1 -1
  221. package/apps/app-lifeops/src/routes/plugin.js +10 -1
  222. package/apps/app-lifeops/src/routes/travel-provider-relay-routes.d.ts +1 -1
  223. package/apps/app-lifeops/src/routes/travel-provider-relay-routes.d.ts.map +1 -1
  224. package/apps/app-lifeops/src/routes/travel-provider-relay-routes.js +4 -2
  225. package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts +1 -1
  226. package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts.map +1 -1
  227. package/apps/app-lifeops/src/ui.d.ts +11 -0
  228. package/apps/app-lifeops/src/ui.d.ts.map +1 -0
  229. package/apps/app-lifeops/src/ui.js +9 -0
  230. package/apps/app-lifeops/src/utils/lifeops-url.d.ts +5 -0
  231. package/apps/app-lifeops/src/utils/lifeops-url.d.ts.map +1 -0
  232. package/apps/app-lifeops/src/utils/lifeops-url.js +35 -0
  233. package/apps/app-lifeops/src/website-blocker/access.d.ts.map +1 -1
  234. package/apps/app-lifeops/src/website-blocker/access.js +1 -1
  235. package/apps/app-steward/src/routes/steward-compat-routes.d.ts +1 -1
  236. package/apps/app-steward/src/routes/steward-compat-routes.d.ts.map +1 -1
  237. package/apps/app-steward/src/routes/steward-compat-routes.js +3 -1
  238. package/apps/app-steward/src/routes/wallet-browser-compat-routes.d.ts +1 -1
  239. package/apps/app-steward/src/routes/wallet-browser-compat-routes.d.ts.map +1 -1
  240. package/apps/app-steward/src/routes/wallet-browser-compat-routes.js +3 -1
  241. package/apps/app-steward/src/routes/wallet-bsc-core-routes.d.ts.map +1 -1
  242. package/apps/app-steward/src/routes/wallet-bsc-core-routes.js +2 -1
  243. package/apps/app-steward/src/routes/wallet-compat-routes.d.ts +1 -1
  244. package/apps/app-steward/src/routes/wallet-compat-routes.d.ts.map +1 -1
  245. package/apps/app-steward/src/routes/wallet-compat-routes.js +3 -1
  246. package/apps/app-steward/src/routes/wallet-core-routes.d.ts.map +1 -1
  247. package/apps/app-steward/src/routes/wallet-core-routes.js +2 -1
  248. package/apps/app-steward/src/routes/wallet-trade-compat-routes.d.ts +1 -1
  249. package/apps/app-steward/src/routes/wallet-trade-compat-routes.d.ts.map +1 -1
  250. package/apps/app-steward/src/routes/wallet-trade-compat-routes.js +3 -1
  251. package/apps/app-training/src/core/dataset-generator.d.ts +1 -1
  252. package/apps/app-training/src/core/dataset-generator.d.ts.map +1 -1
  253. package/apps/app-training/src/core/roleplay-executor.d.ts +1 -1
  254. package/apps/app-training/src/core/roleplay-executor.d.ts.map +1 -1
  255. package/apps/app-training/src/core/trajectory-task-datasets.d.ts +1 -1
  256. package/apps/app-training/src/core/trajectory-task-datasets.d.ts.map +1 -1
  257. package/apps/app-training/src/index.d.ts +1 -2
  258. package/apps/app-training/src/index.d.ts.map +1 -1
  259. package/apps/app-training/src/index.js +1 -2
  260. package/apps/app-training/src/routes/training-routes.d.ts +1 -1
  261. package/apps/app-training/src/routes/training-routes.d.ts.map +1 -1
  262. package/apps/app-training/src/routes/training-routes.js +1 -1
  263. package/apps/app-training/src/routes/trajectory-routes.d.ts +1 -1
  264. package/apps/app-training/src/routes/trajectory-routes.d.ts.map +1 -1
  265. package/apps/app-training/src/routes/trajectory-routes.js +3 -1
  266. package/apps/app-training/src/services/training-service-like.d.ts +1 -1
  267. package/apps/app-training/src/services/training-service-like.d.ts.map +1 -1
  268. package/apps/app-training/src/services/training-service.d.ts +1 -1
  269. package/apps/app-training/src/services/training-service.d.ts.map +1 -1
  270. package/package.json +4 -4
  271. package/packages/agent/src/api/provider-switch-config.js +1 -1
  272. package/packages/agent/src/api/server-helpers-auth.d.ts.map +1 -1
  273. package/packages/agent/src/api/server-helpers-auth.js +5 -4
  274. package/packages/agent/src/providers/media-provider.d.ts +1 -1
  275. package/packages/agent/src/providers/media-provider.d.ts.map +1 -1
  276. package/packages/agent/src/providers/self-status.d.ts +1 -1
  277. package/packages/agent/src/providers/self-status.d.ts.map +1 -1
  278. package/packages/app-core/src/App.d.ts.map +1 -1
  279. package/packages/app-core/src/App.js +20 -12
  280. package/packages/app-core/src/api/auth.d.ts.map +1 -1
  281. package/packages/app-core/src/api/auth.js +5 -5
  282. package/packages/app-core/src/api/client-types-experience.d.ts +7 -0
  283. package/packages/app-core/src/api/client-types-experience.d.ts.map +1 -1
  284. package/packages/app-core/src/components/apps/helpers.d.ts +1 -1
  285. package/packages/app-core/src/components/apps/helpers.d.ts.map +1 -1
  286. package/packages/app-core/src/components/apps/helpers.js +1 -0
  287. package/packages/app-core/src/components/apps/internal-tool-apps.d.ts +11 -0
  288. package/packages/app-core/src/components/apps/internal-tool-apps.d.ts.map +1 -1
  289. package/packages/app-core/src/components/apps/internal-tool-apps.js +31 -0
  290. package/packages/app-core/src/components/apps/launch-history.d.ts +16 -0
  291. package/packages/app-core/src/components/apps/launch-history.d.ts.map +1 -0
  292. package/packages/app-core/src/components/apps/launch-history.js +77 -0
  293. package/packages/app-core/src/components/apps/per-app-config.d.ts +19 -0
  294. package/packages/app-core/src/components/apps/per-app-config.d.ts.map +1 -0
  295. package/packages/app-core/src/components/apps/per-app-config.js +99 -0
  296. package/packages/app-core/src/components/apps/useRegistryCatalog.d.ts +14 -0
  297. package/packages/app-core/src/components/apps/useRegistryCatalog.d.ts.map +1 -0
  298. package/packages/app-core/src/components/apps/useRegistryCatalog.js +52 -0
  299. package/packages/app-core/src/components/auth/LoginView.d.ts +1 -19
  300. package/packages/app-core/src/components/auth/LoginView.d.ts.map +1 -1
  301. package/packages/app-core/src/components/auth/LoginView.js +4 -99
  302. package/packages/app-core/src/components/character/CharacterExperienceWorkspace.d.ts.map +1 -1
  303. package/packages/app-core/src/components/character/CharacterExperienceWorkspace.js +14 -2
  304. package/packages/app-core/src/components/character/character-hub-helpers.d.ts.map +1 -1
  305. package/packages/app-core/src/components/character/character-hub-helpers.js +7 -0
  306. package/packages/app-core/src/components/character/character-hub-types.d.ts +7 -0
  307. package/packages/app-core/src/components/character/character-hub-types.d.ts.map +1 -1
  308. package/packages/app-core/src/components/onboarding/BootstrapStep.d.ts.map +1 -1
  309. package/packages/app-core/src/components/onboarding/BootstrapStep.js +3 -2
  310. package/packages/app-core/src/components/pages/AppDetailsView.d.ts +36 -0
  311. package/packages/app-core/src/components/pages/AppDetailsView.d.ts.map +1 -0
  312. package/packages/app-core/src/components/pages/AppDetailsView.js +289 -0
  313. package/packages/app-core/src/components/pages/AppsView.d.ts.map +1 -1
  314. package/packages/app-core/src/components/pages/AppsView.js +134 -42
  315. package/packages/app-core/src/components/shell/StartupShell.d.ts.map +1 -1
  316. package/packages/app-core/src/components/shell/StartupShell.js +2 -5
  317. package/packages/app-core/src/i18n/locales/en.json +256 -205
  318. package/packages/app-core/src/i18n/locales/es.json +256 -205
  319. package/packages/app-core/src/i18n/locales/ko.json +256 -205
  320. package/packages/app-core/src/i18n/locales/pt.json +256 -205
  321. package/packages/app-core/src/i18n/locales/tl.json +256 -205
  322. package/packages/app-core/src/i18n/locales/vi.json +256 -205
  323. package/packages/app-core/src/i18n/locales/zh-CN.json +256 -205
  324. package/packages/app-core/src/navigation/index.d.ts.map +1 -1
  325. package/packages/app-core/src/navigation/index.js +6 -0
  326. package/packages/app-core/src/services/auth-store.d.ts +1 -1
  327. package/packages/app-core/src/services/auth-store.d.ts.map +1 -1
  328. package/packages/app-core/src/services/auth-store.js +1 -1
  329. package/packages/app-core/src/shell/AppWindowRenderer.d.ts +17 -0
  330. package/packages/app-core/src/shell/AppWindowRenderer.d.ts.map +1 -0
  331. package/packages/app-core/src/shell/AppWindowRenderer.js +337 -0
  332. package/packages/app-core/src/shell/DetachedShellRoot.js +4 -1
  333. package/packages/app-core/src/shell/index.d.ts +1 -0
  334. package/packages/app-core/src/shell/index.d.ts.map +1 -1
  335. package/packages/app-core/src/shell/index.js +1 -0
  336. package/packages/app-core/src/state/startup-coordinator.d.ts.map +1 -1
  337. package/packages/app-core/src/state/startup-coordinator.js +0 -3
  338. package/packages/app-core/src/state/startup-phase-poll.d.ts.map +1 -1
  339. package/packages/app-core/src/state/startup-phase-poll.js +2 -4
  340. package/packages/app-core/src/state/usePluginsSkillsState.d.ts +6 -6
  341. package/packages/native-plugins/mobile-signals/src/definitions.d.ts +162 -0
  342. package/packages/native-plugins/mobile-signals/src/definitions.d.ts.map +1 -0
  343. package/packages/native-plugins/mobile-signals/src/definitions.js +1 -0
  344. package/packages/native-plugins/mobile-signals/src/index.d.ts +4 -0
  345. package/packages/native-plugins/mobile-signals/src/index.d.ts.map +1 -0
  346. package/packages/native-plugins/mobile-signals/src/index.js +6 -0
  347. package/packages/native-plugins/mobile-signals/src/web.d.ts +29 -0
  348. package/packages/native-plugins/mobile-signals/src/web.d.ts.map +1 -0
  349. package/packages/native-plugins/mobile-signals/src/web.js +269 -0
  350. package/packages/shared/src/app-hero-art.d.ts.map +1 -1
  351. package/packages/shared/src/app-hero-art.js +13 -0
  352. package/packages/shared/src/contracts/lifeops.d.ts +10 -0
  353. package/packages/shared/src/contracts/lifeops.d.ts.map +1 -1
  354. package/packages/shared/src/contracts/lifeops.js +5 -0
  355. package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.d.ts.map +1 -1
  356. package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.js +46 -4
  357. package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.d.ts.map +1 -1
  358. package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.js +34 -124
  359. package/packages/typescript/src/features/advanced-capabilities/experience/service.d.ts.map +1 -1
  360. package/packages/typescript/src/features/advanced-capabilities/experience/service.js +56 -0
  361. package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts +7 -0
  362. package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts.map +1 -1
  363. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.d.ts +7 -0
  364. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.d.ts.map +1 -0
  365. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.js +123 -0
  366. package/apps/app-training/src/ui/FineTuningView.d.ts +0 -5
  367. package/apps/app-training/src/ui/FineTuningView.d.ts.map +0 -1
  368. package/apps/app-training/src/ui/FineTuningView.js +0 -388
  369. package/apps/app-training/src/ui/fine-tuning-panels.d.ts +0 -111
  370. package/apps/app-training/src/ui/fine-tuning-panels.d.ts.map +0 -1
  371. package/apps/app-training/src/ui/fine-tuning-panels.js +0 -130
  372. package/apps/app-training/src/ui/index.d.ts +0 -3
  373. package/apps/app-training/src/ui/index.d.ts.map +0 -1
  374. package/apps/app-training/src/ui/index.js +0 -2
  375. package/packages/app-core/src/api/trusted-local-request.d.ts +0 -4
  376. package/packages/app-core/src/api/trusted-local-request.d.ts.map +0 -1
  377. package/packages/app-core/src/api/trusted-local-request.js +0 -176
@@ -0,0 +1,9 @@
1
+ interface MissingSourceCardProps {
2
+ title: string;
3
+ ctaLabel?: string;
4
+ onCta?: () => void;
5
+ className?: string;
6
+ }
7
+ export declare function MissingSourceCard({ title, ctaLabel, onCta, className, }: MissingSourceCardProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=MissingSourceCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MissingSourceCard.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/components/MissingSourceCard.tsx"],"names":[],"mappings":"AAEA,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAc,GACf,EAAE,sBAAsB,2CA0BxB"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ArrowRight, PlugZap } from "lucide-react";
3
+ export function MissingSourceCard({ title, ctaLabel, onCta, className = "", }) {
4
+ return (_jsxs("section", { "data-testid": "lifeops-overview-missing-source", "data-source-title": title, className: `flex min-w-0 items-center gap-3 rounded-lg border border-border/16 bg-card/8 px-3 py-2 ${className}`, children: [_jsx("span", { className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-border/16 bg-bg/30 text-muted", children: _jsx(PlugZap, { className: "h-3.5 w-3.5", "aria-hidden": true }) }), _jsx("div", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-txt", children: title }), ctaLabel && onCta ? (_jsx("button", { type: "button", onClick: onCta, "aria-label": ctaLabel, title: ctaLabel, className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-border/16 bg-bg/40 text-txt transition-colors hover:border-accent/30 hover:text-accent", children: _jsx(ArrowRight, { className: "h-3.5 w-3.5", "aria-hidden": true }) })) : null] }));
5
+ }
@@ -0,0 +1,2 @@
1
+ export declare function MobileSignalsSetupCard(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=MobileSignalsSetupCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileSignalsSetupCard.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/components/MobileSignalsSetupCard.tsx"],"names":[],"mappings":"AAuGA,wBAAgB,sBAAsB,4CA4NrC"}
@@ -0,0 +1,163 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Badge, Button, isElectrobunRuntime, isNative, useApp, } from "@elizaos/app-core";
3
+ import { MobileSignals, } from "@elizaos/capacitor-mobile-signals";
4
+ import { Activity, Monitor, RefreshCw, Settings, Smartphone, } from "lucide-react";
5
+ import { useCallback, useEffect, useMemo, useState } from "react";
6
+ function actionBadge(action, t) {
7
+ if (action.status === "ready") {
8
+ return {
9
+ variant: "secondary",
10
+ label: t("lifeopssettings.deviceSetupReady", { defaultValue: "Ready" }),
11
+ };
12
+ }
13
+ if (action.status === "unavailable") {
14
+ return {
15
+ variant: "outline",
16
+ label: t("lifeopssettings.deviceSetupUnavailable", {
17
+ defaultValue: "Unavailable",
18
+ }),
19
+ };
20
+ }
21
+ return {
22
+ variant: "outline",
23
+ label: t("lifeopssettings.deviceSetupNeedsAction", {
24
+ defaultValue: "Needs action",
25
+ }),
26
+ };
27
+ }
28
+ function primaryActionLabel(action, t) {
29
+ if (action.canRequest) {
30
+ return t("lifeopssettings.deviceSetupGrant", { defaultValue: "Grant" });
31
+ }
32
+ return t("lifeopssettings.deviceSetupOpenSettings", {
33
+ defaultValue: "Open Settings",
34
+ });
35
+ }
36
+ function nonMobileBadgeLabel(t) {
37
+ return isElectrobunRuntime()
38
+ ? t("lifeopssettings.deviceSetupDesktop", {
39
+ defaultValue: "Desktop",
40
+ })
41
+ : t("lifeopssettings.deviceSetupWeb", {
42
+ defaultValue: "Web",
43
+ });
44
+ }
45
+ function DeviceRuntimeGlyph({ label, nativeMobile, ready, }) {
46
+ const Icon = nativeMobile ? Smartphone : Monitor;
47
+ const tone = ready
48
+ ? "border-emerald-500/30 bg-emerald-500/12 text-emerald-500"
49
+ : "border-border/50 bg-bg/40 text-muted";
50
+ return (_jsx("span", { "aria-label": label, className: `inline-flex h-8 w-8 items-center justify-center rounded-full border ${tone}`, role: "img", title: label, children: _jsx(Icon, { className: "h-4 w-4", "aria-hidden": true }) }));
51
+ }
52
+ export function MobileSignalsSetupCard() {
53
+ const { t } = useApp();
54
+ const nativeMobile = isNative && !isElectrobunRuntime();
55
+ const [permissionStatus, setPermissionStatus] = useState(null);
56
+ const [busy, setBusy] = useState(null);
57
+ const [message, setMessage] = useState(null);
58
+ const plugin = useMemo(() => {
59
+ if (!nativeMobile) {
60
+ return null;
61
+ }
62
+ try {
63
+ return MobileSignals;
64
+ }
65
+ catch {
66
+ return null;
67
+ }
68
+ }, [nativeMobile]);
69
+ const refresh = useCallback(async () => {
70
+ if (!plugin || typeof plugin.checkPermissions !== "function") {
71
+ return;
72
+ }
73
+ setBusy("refresh");
74
+ try {
75
+ setPermissionStatus(await plugin.checkPermissions());
76
+ setMessage(null);
77
+ }
78
+ catch (error) {
79
+ setMessage(error instanceof Error
80
+ ? error.message
81
+ : t("lifeopssettings.deviceSetupRefreshFailed", {
82
+ defaultValue: "Failed to refresh device setup.",
83
+ }));
84
+ }
85
+ finally {
86
+ setBusy(null);
87
+ }
88
+ }, [plugin, t]);
89
+ useEffect(() => {
90
+ void refresh();
91
+ }, [refresh]);
92
+ const requestPermissions = useCallback(async () => {
93
+ if (!plugin || typeof plugin.requestPermissions !== "function") {
94
+ return;
95
+ }
96
+ setBusy("request");
97
+ try {
98
+ const next = await plugin.requestPermissions();
99
+ setPermissionStatus(next);
100
+ setMessage(next.reason ?? null);
101
+ }
102
+ catch (error) {
103
+ setMessage(error instanceof Error
104
+ ? error.message
105
+ : t("lifeopssettings.deviceSetupRequestFailed", {
106
+ defaultValue: "Failed to request device permissions.",
107
+ }));
108
+ }
109
+ finally {
110
+ setBusy(null);
111
+ }
112
+ }, [plugin, t]);
113
+ const openSettings = useCallback(async (action) => {
114
+ if (!plugin ||
115
+ !action.settingsTarget ||
116
+ typeof plugin.openSettings !== "function") {
117
+ return;
118
+ }
119
+ setBusy(`open:${action.id}`);
120
+ try {
121
+ const result = await plugin.openSettings({
122
+ target: action.settingsTarget,
123
+ });
124
+ setMessage(result.reason ?? null);
125
+ window.setTimeout(() => {
126
+ void refresh();
127
+ }, 1_500);
128
+ }
129
+ catch (error) {
130
+ setMessage(error instanceof Error
131
+ ? error.message
132
+ : t("lifeopssettings.deviceSetupOpenFailed", {
133
+ defaultValue: "Failed to open device settings.",
134
+ }));
135
+ }
136
+ finally {
137
+ setBusy(null);
138
+ }
139
+ }, [plugin, refresh, t]);
140
+ const actions = permissionStatus?.setupActions ?? [];
141
+ const needsRequest = actions.some((action) => action.status !== "ready" && action.canRequest);
142
+ const runtimeLabel = nativeMobile
143
+ ? (permissionStatus?.status ?? "checking")
144
+ : nonMobileBadgeLabel(t);
145
+ const runtimeReady = nativeMobile
146
+ ? permissionStatus?.status === "granted"
147
+ : true;
148
+ return (_jsxs("div", { className: "rounded-2xl border border-border/40 bg-card/62 shadow-sm", children: [_jsxs("div", { className: "flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between", children: [_jsxs("div", { className: "flex min-w-0 items-start gap-3", children: [_jsx("div", { className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-bg/36", children: _jsx(Activity, { className: "h-5 w-5 text-txt", "aria-hidden": true }) }), _jsxs("div", { className: "min-w-0 space-y-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("div", { className: "font-bold text-sm text-txt", children: t("lifeopssettings.deviceSetupTitle", {
149
+ defaultValue: "Device Data",
150
+ }) }), _jsx(DeviceRuntimeGlyph, { label: runtimeLabel, nativeMobile: nativeMobile, ready: runtimeReady })] }), message ? _jsx("p", { className: "text-xs text-muted", children: message }) : null] })] }), _jsx("div", { className: "flex shrink-0 flex-wrap gap-2 sm:pt-0.5", children: nativeMobile && plugin ? (_jsxs(_Fragment, { children: [needsRequest ? (_jsxs(Button, { type: "button", size: "sm", className: "min-h-10 rounded-xl px-3 text-xs-tight font-semibold", disabled: busy !== null, onClick: () => void requestPermissions(), children: [_jsx(Settings, { className: "mr-1.5 h-3.5 w-3.5", "aria-hidden": true }), t("lifeopssettings.deviceSetupEnable", {
151
+ defaultValue: "Enable",
152
+ })] })) : null, _jsxs(Button, { type: "button", size: "sm", variant: "outline", className: "min-h-10 rounded-xl px-3 text-xs-tight font-semibold", disabled: busy !== null, onClick: () => void refresh(), children: [_jsx(RefreshCw, { className: "mr-1.5 h-3.5 w-3.5", "aria-hidden": true }), t("lifeopssettings.deviceSetupRefresh", {
153
+ defaultValue: "Refresh",
154
+ })] })] })) : null })] }), nativeMobile && actions.length > 0 ? (_jsx("div", { className: "grid gap-2 border-t border-border/60 px-4 py-3 md:grid-cols-2", children: actions.map((action) => {
155
+ const badge = actionBadge(action, t);
156
+ const canAct = action.status !== "ready" &&
157
+ (action.canRequest ||
158
+ (action.canOpenSettings && action.settingsTarget !== null));
159
+ return (_jsxs("div", { className: "flex min-w-0 items-start justify-between gap-3 rounded-xl border border-border/50 bg-bg/30 px-3 py-3", children: [_jsxs("div", { className: "min-w-0 space-y-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("div", { className: "text-xs font-semibold text-txt", children: action.label }), _jsx(Badge, { variant: badge.variant, className: "text-3xs", children: badge.label })] }), action.reason ? (_jsx("p", { className: "text-xs-tight leading-5 text-muted", children: action.reason })) : null] }), canAct ? (_jsx(Button, { type: "button", size: "sm", variant: action.canRequest ? "default" : "outline", className: "min-h-8 shrink-0 rounded-xl px-2.5 text-2xs font-semibold", disabled: busy !== null, onClick: () => action.canRequest
160
+ ? void requestPermissions()
161
+ : void openSettings(action), children: primaryActionLabel(action, t) })) : null] }, action.id));
162
+ }) })) : null] }));
163
+ }
@@ -0,0 +1,8 @@
1
+ import type { JSX } from "react";
2
+ /**
3
+ * 7-day sleep/wake episode browser. Reads from
4
+ * `GET /api/lifeops/schedule/inspection` so the timeline matches exactly
5
+ * what the scorer saw this tick.
6
+ */
7
+ export declare function SleepInspectionPanel(): JSX.Element;
8
+ //# sourceMappingURL=SleepInspectionPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SleepInspectionPanel.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/components/SleepInspectionPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAwBjC;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,OAAO,CA0HlD"}
@@ -0,0 +1,59 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Moon, Sunrise } from "lucide-react";
3
+ import { useMemo } from "react";
4
+ import { useLifeOpsScheduleInspection } from "../hooks/useLifeOpsScheduleInspection.js";
5
+ const DAY_MS = 24 * 60 * 60 * 1_000;
6
+ function parseIsoMs(value) {
7
+ if (typeof value !== "string" || value.trim().length === 0)
8
+ return null;
9
+ const parsed = Date.parse(value);
10
+ return Number.isFinite(parsed) ? parsed : null;
11
+ }
12
+ /**
13
+ * 7-day sleep/wake episode browser. Reads from
14
+ * `GET /api/lifeops/schedule/inspection` so the timeline matches exactly
15
+ * what the scorer saw this tick.
16
+ */
17
+ export function SleepInspectionPanel() {
18
+ const { inspection, loading, error, refresh } = useLifeOpsScheduleInspection();
19
+ const episodes = useMemo(() => {
20
+ if (!inspection)
21
+ return [];
22
+ const cutoffMs = Date.now() - 7 * DAY_MS;
23
+ const rows = [];
24
+ for (const episode of inspection.sleepEpisodes) {
25
+ const startMs = parseIsoMs(episode.startAt);
26
+ if (startMs === null || startMs < cutoffMs)
27
+ continue;
28
+ const endMs = parseIsoMs(episode.endAt);
29
+ rows.push({
30
+ startIso: episode.startAt,
31
+ endIso: episode.endAt,
32
+ startMs,
33
+ endMs,
34
+ durationMinutes: episode.durationMinutes,
35
+ // Naps are <4h and non-current; the server exposes the raw episode
36
+ // so we classify client-side to avoid teaching the inspection type
37
+ // about cycle semantics.
38
+ isNap: !episode.current && episode.durationMinutes < 240,
39
+ current: episode.current,
40
+ source: episode.source,
41
+ confidence: episode.confidence,
42
+ });
43
+ }
44
+ rows.sort((left, right) => right.startMs - left.startMs);
45
+ return rows;
46
+ }, [inspection]);
47
+ if (loading && !inspection) {
48
+ return (_jsx("div", { className: "rounded-2xl border border-border/20 bg-bg/36 px-3 py-2 text-xs text-muted", children: "Loading sleep inspection\u2026" }));
49
+ }
50
+ if (error) {
51
+ return (_jsxs("div", { className: "rounded-2xl border border-rose-500/30 bg-rose-500/10 px-3 py-2 text-xs text-rose-200", children: [error, _jsx("button", { type: "button", onClick: () => void refresh(), className: "ml-2 rounded-md border border-rose-400/40 px-2 py-0.5 text-[11px]", children: "Retry" })] }));
52
+ }
53
+ if (!inspection || !inspection.insight) {
54
+ return (_jsx("div", { className: "rounded-2xl border border-border/20 bg-bg/36 px-3 py-2 text-xs text-muted", children: "No schedule inspection available yet." }));
55
+ }
56
+ const { insight } = inspection;
57
+ const regularity = insight.regularity;
58
+ return (_jsxs("div", { className: "space-y-3 rounded-2xl border border-border/20 bg-bg/36 px-3 py-3", children: [_jsxs("div", { className: "flex items-baseline justify-between", children: [_jsx("div", { className: "text-[11px] uppercase tracking-wide text-muted", children: "Sleep inspection \u00B7 last 7 days" }), _jsxs("div", { className: "text-[11px] text-muted", children: ["SRI ", Math.round(regularity.sri), " \u00B7", " ", regularity.regularityClass.replace(/_/g, " "), " \u00B7 n", regularity.sampleCount] })] }), episodes.length === 0 ? (_jsx("div", { className: "text-xs text-muted", children: "No sleep episodes recorded in the last 7 days." })) : (_jsx("ul", { className: "space-y-1.5", children: episodes.map((episode) => (_jsxs("li", { className: "flex items-center gap-2 text-xs", children: [episode.isNap ? (_jsx(Sunrise, { className: "h-3.5 w-3.5 text-amber-300" })) : (_jsx(Moon, { className: "h-3.5 w-3.5 text-violet-300" })), _jsxs("span", { className: "flex-1", children: [new Date(episode.startMs).toLocaleString(), episode.endMs !== null ? (_jsxs(_Fragment, { children: [" → ", new Date(episode.endMs).toLocaleString()] })) : (_jsx("span", { className: "text-amber-300", children: " \u00B7 in progress" }))] }), _jsx("span", { className: "text-muted", children: `${Math.floor(episode.durationMinutes / 60)}h${episode.durationMinutes % 60}m` }), _jsxs("span", { className: "text-[11px] text-muted", children: [episode.source, " \u00B7 ", Math.round(episode.confidence * 100), "%"] })] }, `${episode.startIso}:${episode.endIso ?? "open"}`))) })), _jsx("div", { className: "flex flex-wrap gap-1.5 pt-2", children: _jsxs("span", { className: "text-[11px] uppercase tracking-wide text-muted", children: ["Bedtime stddev ", Math.round(regularity.bedtimeStddevMin), "m \u00B7 wake stddev ", Math.round(regularity.wakeStddevMin), "m"] }) })] }));
59
+ }
@@ -0,0 +1,3 @@
1
+ import type { WebsiteBlockerSettingsCardProps } from "../types";
2
+ export declare function WebsiteBlockerSettingsCard({ mode, permission, platform, onOpenPermissionSettings, onRequestPermission, }: WebsiteBlockerSettingsCardProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=WebsiteBlockerSettingsCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebsiteBlockerSettingsCard.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAqEhE,wBAAgB,0BAA0B,CAAC,EACzC,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,wBAAwB,EACxB,mBAAmB,GACpB,EAAE,+BAA+B,2CA8GjC"}
@@ -0,0 +1,75 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Badge, Button, useApp } from "@elizaos/app-core";
3
+ import { ShieldBan } from "lucide-react";
4
+ function translate(t, key, fallback) {
5
+ const value = t(key);
6
+ return value === key ? fallback : value;
7
+ }
8
+ function statusBadge(t, status, platform) {
9
+ if (!status) {
10
+ return {
11
+ variant: "outline",
12
+ label: translate(t, "permissionssection.badge.unknown", "Unknown"),
13
+ };
14
+ }
15
+ if (status === "denied") {
16
+ return {
17
+ variant: "outline",
18
+ label: translate(t, "permissionssection.badge.needsAdmin", "Needs Admin"),
19
+ };
20
+ }
21
+ if (status === "not-determined") {
22
+ return {
23
+ variant: "outline",
24
+ label: translate(t, "permissionssection.badge.needsApproval", "Needs Approval"),
25
+ };
26
+ }
27
+ if (status === "granted" || status === "not-applicable") {
28
+ return {
29
+ variant: "secondary",
30
+ label: translate(t, "permissionssection.badge.ready", "Ready"),
31
+ };
32
+ }
33
+ if (status === "restricted") {
34
+ return {
35
+ variant: "outline",
36
+ label: translate(t, "permissionssection.badge.restricted", "Restricted"),
37
+ };
38
+ }
39
+ return {
40
+ variant: "outline",
41
+ label: platform === "darwin"
42
+ ? translate(t, "permissionssection.badge.offInSettings", "Off in Settings")
43
+ : translate(t, "permissionssection.badge.off", "Off"),
44
+ };
45
+ }
46
+ export function WebsiteBlockerSettingsCard({ mode, permission, platform, onOpenPermissionSettings, onRequestPermission, }) {
47
+ const { t: rawT } = useApp();
48
+ const t = typeof rawT === "function" ? rawT : (key) => key;
49
+ const title = translate(t, "permissionssection.permission.websiteBlocking.name", "Website Blocking");
50
+ const description = translate(t, "permissionssection.permission.websiteBlocking.description", "Edit the system hosts file to block distracting websites. This may require admin or root approval each time.");
51
+ if (mode === "web" || mode === "mobile") {
52
+ return (_jsx("div", { className: "rounded-2xl border border-border/60 bg-card/92 px-4 py-4 shadow-sm", children: _jsxs("div", { className: "flex items-start gap-3", children: [_jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border/50 bg-bg/40", children: _jsx(ShieldBan, { className: "h-5 w-5 text-muted", "aria-hidden": true }) }), _jsxs("div", { className: "min-w-0 space-y-1", children: [_jsx("div", { className: "font-bold text-sm text-txt", children: title }), _jsx("p", { className: "text-xs-tight leading-5 text-muted", children: mode === "web"
53
+ ? translate(t, "permissionssection.websiteBlocking.webInfo", "Hosts-file website blocking runs in the desktop app. Use Milady on macOS, Windows, or Linux to enable SelfControl-style blocking for your agent.")
54
+ : translate(t, "permissionssection.websiteBlocking.mobileInfo", "Website blocking via the system hosts file is a desktop feature. Install the desktop build to manage blocked sites for LifeOps.") })] })] }) }));
55
+ }
56
+ const badge = statusBadge(t, permission?.status, platform);
57
+ const primary = permission &&
58
+ permission.status !== "granted" &&
59
+ permission.status !== "not-applicable"
60
+ ? permission.status === "not-determined" && permission.canRequest
61
+ ? onRequestPermission
62
+ ? {
63
+ label: translate(t, "permissionssection.RequestApproval", "Request Approval"),
64
+ action: onRequestPermission,
65
+ }
66
+ : null
67
+ : onOpenPermissionSettings
68
+ ? {
69
+ label: translate(t, "permissionssection.OpenHostsFile", "Open Hosts File"),
70
+ action: onOpenPermissionSettings,
71
+ }
72
+ : null
73
+ : null;
74
+ return (_jsx("div", { className: "rounded-2xl border border-border/60 bg-card/92 shadow-sm", children: _jsxs("div", { className: "flex flex-col gap-3 px-4 py-4 sm:flex-row sm:items-start sm:justify-between", children: [_jsxs("div", { className: "flex min-w-0 items-start gap-3", children: [_jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border/50 bg-bg/40", children: _jsx(ShieldBan, { className: "h-5 w-5 text-txt", "aria-hidden": true }) }), _jsxs("div", { className: "min-w-0 space-y-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("div", { className: "font-bold text-sm text-txt", children: title }), permission ? (_jsx(Badge, { variant: badge.variant, children: badge.label })) : null] }), _jsx("p", { className: "max-w-2xl text-xs-tight leading-5 text-muted", children: description }), permission?.reason ? (_jsx("p", { className: "text-xs text-danger", children: permission.reason })) : null] })] }), primary ? (_jsx("div", { className: "flex shrink-0 flex-wrap gap-2 sm:pt-0.5", children: _jsx(Button, { type: "button", size: "sm", variant: "default", className: "min-h-10 rounded-xl px-3 text-xs-tight font-semibold", onClick: () => void primary.action(), children: primary.label }) })) : null] }) }));
75
+ }
@@ -0,0 +1,8 @@
1
+ interface WhatsAppQrOverlayProps {
2
+ accountId?: string;
3
+ onConnected?: () => void;
4
+ connectedMessage?: string;
5
+ }
6
+ export declare function WhatsAppQrOverlay({ accountId, onConnected, connectedMessage, }: WhatsAppQrOverlayProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=WhatsAppQrOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WhatsAppQrOverlay.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/components/WhatsAppQrOverlay.tsx"],"names":[],"mappings":"AAKA,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAqB,EACrB,WAAW,EACX,gBAAgB,GACjB,EAAE,sBAAsB,2CAgLxB"}
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useApp } from "@elizaos/app-core/state";
3
+ import { Button } from "@elizaos/ui";
4
+ import { useEffect, useRef } from "react";
5
+ import { useWhatsAppPairing } from "../hooks/useWhatsAppPairing.js";
6
+ export function WhatsAppQrOverlay({ accountId = "default", onConnected, connectedMessage, }) {
7
+ const { status, qrDataUrl, phoneNumber, error, startPairing, stopPairing, disconnect, } = useWhatsAppPairing(accountId);
8
+ const { t } = useApp();
9
+ const firedRef = useRef(false);
10
+ useEffect(() => {
11
+ if (status !== "connected" || !onConnected || firedRef.current) {
12
+ return;
13
+ }
14
+ firedRef.current = true;
15
+ const timer = setTimeout(onConnected, 1200);
16
+ return () => clearTimeout(timer);
17
+ }, [status, onConnected]);
18
+ if (status === "connected") {
19
+ return (_jsxs("div", { className: "mt-3 border border-ok bg-[var(--ok-subtle)] p-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "inline-block h-2 w-2 rounded-full bg-ok" }), _jsxs("span", { className: "text-xs font-medium text-ok", children: [t("common.connected"), phoneNumber ? ` (+${phoneNumber})` : ""] })] }), _jsx("div", { className: "text-2xs mt-1 text-muted", children: connectedMessage ??
20
+ (onConnected
21
+ ? "Finishing WhatsApp setup..."
22
+ : "WhatsApp is paired. Auth state is saved for automatic reconnection.") }), !onConnected ? (_jsx(Button, { variant: "destructive", size: "sm", className: "mt-2 text-2xs", onClick: () => void disconnect(), children: t("common.disconnect") })) : null] }));
23
+ }
24
+ if (status === "error" || status === "timeout") {
25
+ return (_jsxs("div", { className: "mt-3 border border-danger bg-[var(--destructive-subtle)] p-4", children: [_jsx("div", { className: "mb-2 text-xs text-danger", children: status === "timeout"
26
+ ? "QR code expired. Please try again."
27
+ : (error ?? "An error occurred.") }), _jsx(Button, { variant: "outline", size: "sm", className: "text-xs-tight", style: { borderColor: "var(--accent)", color: "var(--accent)" }, onClick: () => {
28
+ firedRef.current = false;
29
+ void startPairing();
30
+ }, children: t("whatsappqroverlay.TryAgain") })] }));
31
+ }
32
+ if (status === "idle" || status === "disconnected") {
33
+ return (_jsxs("div", { className: "mt-3 border border-border bg-bg-hover p-4", children: [_jsx("div", { className: "mb-2 text-xs text-muted", children: t("whatsappqroverlay.ScanAQRCodeWith") }), _jsx("div", { className: "text-2xs mb-2 text-muted opacity-70", children: t("whatsappqroverlay.UsesAnUnofficialW") }), _jsx(Button, { variant: "outline", size: "sm", className: "text-xs-tight", style: { borderColor: "var(--accent)", color: "var(--accent)" }, onClick: () => {
34
+ firedRef.current = false;
35
+ void startPairing();
36
+ }, children: t("whatsappqroverlay.ConnectWhatsApp") })] }));
37
+ }
38
+ return (_jsx("div", { className: "mt-3 p-4", style: {
39
+ border: "1px solid rgba(255,255,255,0.08)",
40
+ background: "rgba(255,255,255,0.04)",
41
+ }, children: _jsxs("div", { className: "flex flex-col items-start gap-4 sm:flex-row", children: [_jsx("div", { className: "shrink-0", children: qrDataUrl ? (_jsx("img", { src: qrDataUrl, alt: "WhatsApp QR Code", className: "h-40 w-40 bg-white dark:bg-white sm:h-48 sm:w-48", style: {
42
+ imageRendering: "pixelated",
43
+ border: "1px solid var(--border)",
44
+ } })) : (_jsx("div", { className: "flex h-40 w-40 items-center justify-center sm:h-48 sm:w-48", style: {
45
+ border: "1px solid var(--border)",
46
+ background: "var(--bg-hover)",
47
+ }, children: _jsx("span", { className: "animate-pulse text-xs text-muted", children: t("whatsappqroverlay.GeneratingQR") }) })) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "mb-2 text-xs font-medium text-txt", children: t("whatsappqroverlay.ScanWithWhatsApp") }), _jsxs("ol", { className: "text-xs-tight m-0 list-decimal space-y-1 pl-4 text-muted", children: [_jsx("li", { children: t("whatsappqroverlay.OpenWhatsAppOnYou") }), _jsxs("li", { children: [t("whatsappqroverlay.Tap"), " ", _jsx("strong", { children: t("whatsappqroverlay.Menu") }), " or", " ", _jsx("strong", { children: t("nav.settings") }), " ", t("whatsappqroverlay.andSelect"), " ", _jsx("strong", { children: t("whatsappqroverlay.LinkedDevices") })] }), _jsxs("li", { children: [t("whatsappqroverlay.Tap"), " ", _jsx("strong", { children: t("whatsappqroverlay.LinkADevice") })] }), _jsx("li", { children: t("whatsappqroverlay.PointYourPhoneAt") })] }), _jsxs("div", { className: "mt-3 flex items-center gap-2", children: [_jsx("span", { className: "inline-block h-1.5 w-1.5 animate-pulse rounded-full", style: { background: "var(--accent)" } }), _jsx("span", { className: "text-2xs text-muted", children: t("whatsappqroverlay.QRRefreshesAutomat") })] }), _jsx(Button, { variant: "ghost", size: "sm", className: "text-2xs mt-3 text-muted", onClick: () => void stopPairing(), children: t("common.cancel") })] })] }) }));
48
+ }
@@ -0,0 +1,2 @@
1
+ export declare function humanizeLifeOpsLabel(value: string): string;
2
+ //# sourceMappingURL=lifeops-labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifeops-labels.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/components/lifeops-labels.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAI1D"}
@@ -0,0 +1,5 @@
1
+ export function humanizeLifeOpsLabel(value) {
2
+ return value
3
+ .replace(/_/g, " ")
4
+ .replace(/\b\w/g, (match) => match.toUpperCase());
5
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * LifeOps-specific window events.
3
+ *
4
+ * Dispatched on `window` for cross-frame visibility and local diagnostics.
5
+ */
6
+ import type { LifeOpsConnectorMode, LifeOpsConnectorSide } from "@elizaos/shared";
7
+ export declare const LIFEOPS_GOOGLE_CONNECTOR_REFRESH_EVENT: "eliza:lifeops-google-connector-refresh";
8
+ export declare const LIFEOPS_GITHUB_CALLBACK_EVENT: "eliza:lifeops-github-callback";
9
+ export declare const LIFEOPS_ACTIVITY_SIGNALS_STATUS_EVENT: "eliza:lifeops-activity-signals-status";
10
+ export interface LifeOpsGoogleConnectorRefreshDetail {
11
+ origin?: string;
12
+ side?: LifeOpsConnectorSide;
13
+ mode?: LifeOpsConnectorMode;
14
+ source?: "callback" | "connect" | "disconnect" | "mode_change" | "refresh" | "focus" | "visibility" | "resume";
15
+ }
16
+ export interface LifeOpsGithubCallbackDetail {
17
+ target: "owner" | "agent";
18
+ status: "connected" | "error";
19
+ connectionId?: string | null;
20
+ agentId?: string | null;
21
+ githubUsername?: string | null;
22
+ bindingMode?: "cloud-managed" | "shared-owner" | null;
23
+ message?: string | null;
24
+ restarted?: boolean;
25
+ }
26
+ export interface LifeOpsActivitySignalsStatusDetail {
27
+ status: "capture_error" | "snapshot_unavailable" | "background_refresh_unavailable";
28
+ message?: string;
29
+ reason?: string;
30
+ }
31
+ export declare function dispatchLifeOpsGoogleConnectorRefresh(detail?: LifeOpsGoogleConnectorRefreshDetail): void;
32
+ export declare function dispatchLifeOpsGithubCallback(detail: LifeOpsGithubCallbackDetail): void;
33
+ export declare function dispatchLifeOpsActivitySignalsStatus(detail: LifeOpsActivitySignalsStatusDetail): void;
34
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/events/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,sCAAsC,EACjD,wCAAiD,CAAC;AAEpD,eAAO,MAAM,6BAA6B,EACxC,+BAAwC,CAAC;AAE3C,eAAO,MAAM,qCAAqC,EAChD,uCAAgD,CAAC;AAEnD,MAAM,WAAW,mCAAmC;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,MAAM,CAAC,EACH,UAAU,GACV,SAAS,GACT,YAAY,GACZ,aAAa,GACb,SAAS,GACT,OAAO,GACP,YAAY,GACZ,QAAQ,CAAC;CACd;AAED,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1B,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,eAAe,GAAG,cAAc,GAAG,IAAI,CAAC;IACtD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,kCAAkC;IACjD,MAAM,EACF,eAAe,GACf,sBAAsB,GACtB,gCAAgC,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,qCAAqC,CACnD,MAAM,CAAC,EAAE,mCAAmC,GAC3C,IAAI,CAKN;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,2BAA2B,GAClC,IAAI,CAKN;AAED,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,kCAAkC,GACzC,IAAI,CAKN"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * LifeOps-specific window events.
3
+ *
4
+ * Dispatched on `window` for cross-frame visibility and local diagnostics.
5
+ */
6
+ export const LIFEOPS_GOOGLE_CONNECTOR_REFRESH_EVENT = "eliza:lifeops-google-connector-refresh";
7
+ export const LIFEOPS_GITHUB_CALLBACK_EVENT = "eliza:lifeops-github-callback";
8
+ export const LIFEOPS_ACTIVITY_SIGNALS_STATUS_EVENT = "eliza:lifeops-activity-signals-status";
9
+ export function dispatchLifeOpsGoogleConnectorRefresh(detail) {
10
+ if (typeof window === "undefined")
11
+ return;
12
+ window.dispatchEvent(new CustomEvent(LIFEOPS_GOOGLE_CONNECTOR_REFRESH_EVENT, { detail }));
13
+ }
14
+ export function dispatchLifeOpsGithubCallback(detail) {
15
+ if (typeof window === "undefined")
16
+ return;
17
+ window.dispatchEvent(new CustomEvent(LIFEOPS_GITHUB_CALLBACK_EVENT, { detail }));
18
+ }
19
+ export function dispatchLifeOpsActivitySignalsStatus(detail) {
20
+ if (typeof window === "undefined")
21
+ return;
22
+ window.dispatchEvent(new CustomEvent(LIFEOPS_ACTIVITY_SIGNALS_STATUS_EVENT, { detail }));
23
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * useCalendarWeek — fetches calendar events for a date window.
3
+ *
4
+ * Defaults to the current week (7 days from today). The caller can
5
+ * switch to day or month views by passing windowDays.
6
+ */
7
+ import type { LifeOpsCalendarEvent } from "@elizaos/shared";
8
+ export type CalendarViewMode = "day" | "week" | "month";
9
+ export interface UseCalendarWeekOptions {
10
+ viewMode?: CalendarViewMode;
11
+ /** Base date for the window. Defaults to today. */
12
+ baseDate?: Date;
13
+ }
14
+ export interface UseCalendarWeekResult {
15
+ events: LifeOpsCalendarEvent[];
16
+ loading: boolean;
17
+ error: string | null;
18
+ viewMode: CalendarViewMode;
19
+ setViewMode: (mode: CalendarViewMode) => void;
20
+ windowStart: Date;
21
+ windowEnd: Date;
22
+ refresh: () => Promise<void>;
23
+ goToToday: () => void;
24
+ goPrevious: () => void;
25
+ goNext: () => void;
26
+ }
27
+ export declare function useCalendarWeek(opts?: UseCalendarWeekOptions): UseCalendarWeekResult;
28
+ //# sourceMappingURL=useCalendarWeek.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCalendarWeek.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/hooks/useCalendarWeek.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG5D,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAExD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC9C,WAAW,EAAE,IAAI,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAmBD,wBAAgB,eAAe,CAC7B,IAAI,GAAE,sBAA2B,GAChC,qBAAqB,CAmFvB"}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * useCalendarWeek — fetches calendar events for a date window.
3
+ *
4
+ * Defaults to the current week (7 days from today). The caller can
5
+ * switch to day or month views by passing windowDays.
6
+ */
7
+ import { client, useApp } from "@elizaos/app-core";
8
+ import { useCallback, useEffect, useMemo, useState } from "react";
9
+ function windowDaysForMode(mode) {
10
+ switch (mode) {
11
+ case "day":
12
+ return 1;
13
+ case "month":
14
+ return 31;
15
+ default:
16
+ return 7;
17
+ }
18
+ }
19
+ function startOfLocalDay(date = new Date()) {
20
+ const d = new Date(date);
21
+ d.setHours(0, 0, 0, 0);
22
+ return d;
23
+ }
24
+ export function useCalendarWeek(opts = {}) {
25
+ const { t } = useApp();
26
+ const [viewMode, setViewMode] = useState(opts.viewMode ?? "week");
27
+ const [baseDate, setBaseDate] = useState(() => opts.baseDate ?? new Date());
28
+ const [events, setEvents] = useState([]);
29
+ const [loading, setLoading] = useState(false);
30
+ const [error, setError] = useState(null);
31
+ const windowStart = useMemo(() => startOfLocalDay(baseDate), [baseDate]);
32
+ const windowEnd = useMemo(() => {
33
+ const end = new Date(windowStart);
34
+ end.setDate(end.getDate() + windowDaysForMode(viewMode));
35
+ return end;
36
+ }, [windowStart, viewMode]);
37
+ const shiftBase = useCallback((direction) => {
38
+ setBaseDate((current) => {
39
+ const next = new Date(current);
40
+ const days = windowDaysForMode(viewMode);
41
+ if (viewMode === "month") {
42
+ next.setMonth(next.getMonth() + direction);
43
+ }
44
+ else {
45
+ next.setDate(next.getDate() + direction * days);
46
+ }
47
+ return next;
48
+ });
49
+ }, [viewMode]);
50
+ const goToToday = useCallback(() => setBaseDate(new Date()), []);
51
+ const goPrevious = useCallback(() => shiftBase(-1), [shiftBase]);
52
+ const goNext = useCallback(() => shiftBase(1), [shiftBase]);
53
+ const fetch = useCallback(async () => {
54
+ setLoading(true);
55
+ setError(null);
56
+ try {
57
+ const feed = await client.getLifeOpsCalendarFeed({
58
+ side: "owner",
59
+ timeMin: windowStart.toISOString(),
60
+ timeMax: windowEnd.toISOString(),
61
+ timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
62
+ });
63
+ const sorted = [...feed.events].sort((a, b) => a.startAt.localeCompare(b.startAt));
64
+ setEvents(sorted);
65
+ }
66
+ catch (cause) {
67
+ setError(cause instanceof Error && cause.message.trim().length > 0
68
+ ? cause.message.trim()
69
+ : t("lifeopsCalendar.loadFailed", {
70
+ defaultValue: "Calendar failed to load.",
71
+ }));
72
+ }
73
+ finally {
74
+ setLoading(false);
75
+ }
76
+ }, [windowStart, windowEnd, t]);
77
+ useEffect(() => {
78
+ void fetch();
79
+ }, [fetch]);
80
+ return {
81
+ events,
82
+ loading,
83
+ error,
84
+ viewMode,
85
+ setViewMode,
86
+ windowStart,
87
+ windowEnd,
88
+ refresh: fetch,
89
+ goToToday,
90
+ goPrevious,
91
+ goNext,
92
+ };
93
+ }