@elizaos/ui 2.0.0-alpha.385 → 2.0.0-alpha.392

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 (369) 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-lifeops/src/api/client-lifeops.js +6 -0
  6. package/apps/app-lifeops/src/components/AppBlockerSettingsCard.d.ts +3 -0
  7. package/apps/app-lifeops/src/components/AppBlockerSettingsCard.d.ts.map +1 -0
  8. package/apps/app-lifeops/src/components/AppBlockerSettingsCard.js +189 -0
  9. package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.d.ts +2 -0
  10. package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.d.ts.map +1 -0
  11. package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.js +1065 -0
  12. package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.d.ts +7 -0
  13. package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.d.ts.map +1 -0
  14. package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.js +71 -0
  15. package/apps/app-lifeops/src/components/DataSourcesStrip.d.ts +14 -0
  16. package/apps/app-lifeops/src/components/DataSourcesStrip.d.ts.map +1 -0
  17. package/apps/app-lifeops/src/components/DataSourcesStrip.js +36 -0
  18. package/apps/app-lifeops/src/components/EventEditorDrawer.d.ts +23 -0
  19. package/apps/app-lifeops/src/components/EventEditorDrawer.d.ts.map +1 -0
  20. package/apps/app-lifeops/src/components/EventEditorDrawer.js +514 -0
  21. package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.d.ts +2 -0
  22. package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.d.ts.map +1 -0
  23. package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.js +10 -0
  24. package/apps/app-lifeops/src/components/LifeOpsCalendarSection.d.ts +15 -0
  25. package/apps/app-lifeops/src/components/LifeOpsCalendarSection.d.ts.map +1 -0
  26. package/apps/app-lifeops/src/components/LifeOpsCalendarSection.js +515 -0
  27. package/apps/app-lifeops/src/components/LifeOpsChatAdapter.d.ts +34 -0
  28. package/apps/app-lifeops/src/components/LifeOpsChatAdapter.d.ts.map +1 -0
  29. package/apps/app-lifeops/src/components/LifeOpsChatAdapter.js +175 -0
  30. package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.d.ts +2 -0
  31. package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.d.ts.map +1 -0
  32. package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.js +99 -0
  33. package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.d.ts +37 -0
  34. package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.d.ts.map +1 -0
  35. package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.js +88 -0
  36. package/apps/app-lifeops/src/components/LifeOpsInboxSection.d.ts +13 -0
  37. package/apps/app-lifeops/src/components/LifeOpsInboxSection.d.ts.map +1 -0
  38. package/apps/app-lifeops/src/components/LifeOpsInboxSection.js +490 -0
  39. package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.d.ts +12 -0
  40. package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.d.ts.map +1 -0
  41. package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.js +92 -0
  42. package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.d.ts +12 -0
  43. package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.d.ts.map +1 -0
  44. package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.js +160 -0
  45. package/apps/app-lifeops/src/components/LifeOpsMoneySection.d.ts +3 -0
  46. package/apps/app-lifeops/src/components/LifeOpsMoneySection.d.ts.map +1 -0
  47. package/apps/app-lifeops/src/components/LifeOpsMoneySection.js +373 -0
  48. package/apps/app-lifeops/src/components/LifeOpsNavRail.d.ts +9 -0
  49. package/apps/app-lifeops/src/components/LifeOpsNavRail.d.ts.map +1 -0
  50. package/apps/app-lifeops/src/components/LifeOpsNavRail.js +93 -0
  51. package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.d.ts +4 -0
  52. package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.d.ts.map +1 -0
  53. package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.js +274 -0
  54. package/apps/app-lifeops/src/components/LifeOpsOverviewSection.d.ts +7 -0
  55. package/apps/app-lifeops/src/components/LifeOpsOverviewSection.d.ts.map +1 -0
  56. package/apps/app-lifeops/src/components/LifeOpsOverviewSection.js +657 -0
  57. package/apps/app-lifeops/src/components/LifeOpsPageSections.d.ts +42 -0
  58. package/apps/app-lifeops/src/components/LifeOpsPageSections.d.ts.map +1 -0
  59. package/apps/app-lifeops/src/components/LifeOpsPageSections.js +166 -0
  60. package/apps/app-lifeops/src/components/LifeOpsPageView.d.ts +2 -0
  61. package/apps/app-lifeops/src/components/LifeOpsPageView.d.ts.map +1 -0
  62. package/apps/app-lifeops/src/components/LifeOpsPageView.js +566 -0
  63. package/apps/app-lifeops/src/components/LifeOpsRemindersSection.d.ts +2 -0
  64. package/apps/app-lifeops/src/components/LifeOpsRemindersSection.d.ts.map +1 -0
  65. package/apps/app-lifeops/src/components/LifeOpsRemindersSection.js +749 -0
  66. package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.d.ts +27 -0
  67. package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.d.ts.map +1 -0
  68. package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.js +106 -0
  69. package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.d.ts +2 -0
  70. package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.d.ts.map +1 -0
  71. package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.js +373 -0
  72. package/apps/app-lifeops/src/components/LifeOpsSectionContent.d.ts +10 -0
  73. package/apps/app-lifeops/src/components/LifeOpsSectionContent.d.ts.map +1 -0
  74. package/apps/app-lifeops/src/components/LifeOpsSectionContent.js +30 -0
  75. package/apps/app-lifeops/src/components/LifeOpsSelectionContext.d.ts +21 -0
  76. package/apps/app-lifeops/src/components/LifeOpsSelectionContext.d.ts.map +1 -0
  77. package/apps/app-lifeops/src/components/LifeOpsSelectionContext.js +30 -0
  78. package/apps/app-lifeops/src/components/LifeOpsSettingsSection.d.ts +20 -0
  79. package/apps/app-lifeops/src/components/LifeOpsSettingsSection.d.ts.map +1 -0
  80. package/apps/app-lifeops/src/components/LifeOpsSettingsSection.js +597 -0
  81. package/apps/app-lifeops/src/components/LifeOpsSetupGate.d.ts +13 -0
  82. package/apps/app-lifeops/src/components/LifeOpsSetupGate.d.ts.map +1 -0
  83. package/apps/app-lifeops/src/components/LifeOpsSetupGate.js +134 -0
  84. package/apps/app-lifeops/src/components/LifeOpsSleepSection.d.ts +10 -0
  85. package/apps/app-lifeops/src/components/LifeOpsSleepSection.d.ts.map +1 -0
  86. package/apps/app-lifeops/src/components/LifeOpsSleepSection.js +425 -0
  87. package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.d.ts +11 -0
  88. package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.d.ts.map +1 -0
  89. package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.js +49 -0
  90. package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.d.ts +2 -0
  91. package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.d.ts.map +1 -0
  92. package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.js +1041 -0
  93. package/apps/app-lifeops/src/components/MessagingConnectorCards.d.ts +7 -0
  94. package/apps/app-lifeops/src/components/MessagingConnectorCards.d.ts.map +1 -0
  95. package/apps/app-lifeops/src/components/MessagingConnectorCards.js +643 -0
  96. package/apps/app-lifeops/src/components/MissingSourceCard.d.ts +9 -0
  97. package/apps/app-lifeops/src/components/MissingSourceCard.d.ts.map +1 -0
  98. package/apps/app-lifeops/src/components/MissingSourceCard.js +5 -0
  99. package/apps/app-lifeops/src/components/MobileSignalsSetupCard.d.ts +2 -0
  100. package/apps/app-lifeops/src/components/MobileSignalsSetupCard.d.ts.map +1 -0
  101. package/apps/app-lifeops/src/components/MobileSignalsSetupCard.js +163 -0
  102. package/apps/app-lifeops/src/components/SleepInspectionPanel.d.ts +8 -0
  103. package/apps/app-lifeops/src/components/SleepInspectionPanel.d.ts.map +1 -0
  104. package/apps/app-lifeops/src/components/SleepInspectionPanel.js +59 -0
  105. package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.d.ts +3 -0
  106. package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.d.ts.map +1 -0
  107. package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.js +75 -0
  108. package/apps/app-lifeops/src/components/WhatsAppQrOverlay.d.ts +8 -0
  109. package/apps/app-lifeops/src/components/WhatsAppQrOverlay.d.ts.map +1 -0
  110. package/apps/app-lifeops/src/components/WhatsAppQrOverlay.js +48 -0
  111. package/apps/app-lifeops/src/components/lifeops-labels.d.ts +2 -0
  112. package/apps/app-lifeops/src/components/lifeops-labels.d.ts.map +1 -0
  113. package/apps/app-lifeops/src/components/lifeops-labels.js +5 -0
  114. package/apps/app-lifeops/src/events/index.d.ts +34 -0
  115. package/apps/app-lifeops/src/events/index.d.ts.map +1 -0
  116. package/apps/app-lifeops/src/events/index.js +23 -0
  117. package/apps/app-lifeops/src/hooks/useCalendarWeek.d.ts +28 -0
  118. package/apps/app-lifeops/src/hooks/useCalendarWeek.d.ts.map +1 -0
  119. package/apps/app-lifeops/src/hooks/useCalendarWeek.js +93 -0
  120. package/apps/app-lifeops/src/hooks/useDiscordConnector.d.ts +14 -0
  121. package/apps/app-lifeops/src/hooks/useDiscordConnector.d.ts.map +1 -0
  122. package/apps/app-lifeops/src/hooks/useDiscordConnector.js +126 -0
  123. package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.d.ts +29 -0
  124. package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.d.ts.map +1 -0
  125. package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.js +481 -0
  126. package/apps/app-lifeops/src/hooks/useIMessageConnector.d.ts +10 -0
  127. package/apps/app-lifeops/src/hooks/useIMessageConnector.d.ts.map +1 -0
  128. package/apps/app-lifeops/src/hooks/useIMessageConnector.js +50 -0
  129. package/apps/app-lifeops/src/hooks/useInbox.d.ts +34 -0
  130. package/apps/app-lifeops/src/hooks/useInbox.d.ts.map +1 -0
  131. package/apps/app-lifeops/src/hooks/useInbox.js +98 -0
  132. package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.d.ts +2 -0
  133. package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.d.ts.map +1 -0
  134. package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.js +383 -0
  135. package/apps/app-lifeops/src/hooks/useLifeOpsAppState.d.ts +9 -0
  136. package/apps/app-lifeops/src/hooks/useLifeOpsAppState.d.ts.map +1 -0
  137. package/apps/app-lifeops/src/hooks/useLifeOpsAppState.js +83 -0
  138. package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.d.ts +8 -0
  139. package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.d.ts.map +1 -0
  140. package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.js +60 -0
  141. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.d.ts +18 -0
  142. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.d.ts.map +1 -0
  143. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.js +66 -0
  144. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.d.ts +14 -0
  145. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.d.ts.map +1 -0
  146. package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.js +79 -0
  147. package/apps/app-lifeops/src/hooks/useLifeOpsSection.d.ts +18 -0
  148. package/apps/app-lifeops/src/hooks/useLifeOpsSection.d.ts.map +1 -0
  149. package/apps/app-lifeops/src/hooks/useLifeOpsSection.js +78 -0
  150. package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.d.ts +14 -0
  151. package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.d.ts.map +1 -0
  152. package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.js +160 -0
  153. package/apps/app-lifeops/src/hooks/useSignalConnector.d.ts +16 -0
  154. package/apps/app-lifeops/src/hooks/useSignalConnector.d.ts.map +1 -0
  155. package/apps/app-lifeops/src/hooks/useSignalConnector.js +198 -0
  156. package/apps/app-lifeops/src/hooks/useTelegramConnector.d.ts +21 -0
  157. package/apps/app-lifeops/src/hooks/useTelegramConnector.d.ts.map +1 -0
  158. package/apps/app-lifeops/src/hooks/useTelegramConnector.js +177 -0
  159. package/apps/app-lifeops/src/hooks/useWhatsAppConnector.d.ts +8 -0
  160. package/apps/app-lifeops/src/hooks/useWhatsAppConnector.d.ts.map +1 -0
  161. package/apps/app-lifeops/src/hooks/useWhatsAppConnector.js +58 -0
  162. package/apps/app-lifeops/src/hooks/useWhatsAppPairing.d.ts +12 -0
  163. package/apps/app-lifeops/src/hooks/useWhatsAppPairing.d.ts.map +1 -0
  164. package/apps/app-lifeops/src/hooks/useWhatsAppPairing.js +152 -0
  165. package/apps/app-lifeops/src/lifeops/discord-browser-scraper.js +1 -1
  166. package/apps/app-lifeops/src/lifeops/google-gmail.d.ts.map +1 -1
  167. package/apps/app-lifeops/src/lifeops/google-gmail.js +74 -26
  168. package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts.map +1 -1
  169. package/apps/app-lifeops/src/lifeops/google-managed-client.js +4 -5
  170. package/apps/app-lifeops/src/lifeops/google-oauth.d.ts.map +1 -1
  171. package/apps/app-lifeops/src/lifeops/google-oauth.js +2 -2
  172. package/apps/app-lifeops/src/lifeops/owner-profile.d.ts.map +1 -1
  173. package/apps/app-lifeops/src/lifeops/owner-profile.js +1 -1
  174. package/apps/app-lifeops/src/lifeops/paypal-managed-client.d.ts.map +1 -1
  175. package/apps/app-lifeops/src/lifeops/paypal-managed-client.js +4 -5
  176. package/apps/app-lifeops/src/lifeops/plaid-managed-client.d.ts.map +1 -1
  177. package/apps/app-lifeops/src/lifeops/plaid-managed-client.js +4 -5
  178. package/apps/app-lifeops/src/lifeops/schedule-sync-client.js +2 -2
  179. package/apps/app-lifeops/src/lifeops/service-constants.d.ts +1 -0
  180. package/apps/app-lifeops/src/lifeops/service-constants.d.ts.map +1 -1
  181. package/apps/app-lifeops/src/lifeops/service-constants.js +1 -0
  182. package/apps/app-lifeops/src/lifeops/service-mixin-core.d.ts +1 -1
  183. package/apps/app-lifeops/src/lifeops/service-mixin-core.d.ts.map +1 -1
  184. package/apps/app-lifeops/src/lifeops/service-mixin-core.js +2 -1
  185. package/apps/app-lifeops/src/lifeops/service-mixin-imessage.js +1 -1
  186. package/apps/app-lifeops/src/lifeops/service-mixin-inbox.d.ts +3 -1
  187. package/apps/app-lifeops/src/lifeops/service-mixin-inbox.d.ts.map +1 -1
  188. package/apps/app-lifeops/src/lifeops/service-mixin-inbox.js +42 -13
  189. package/apps/app-lifeops/src/lifeops/service-mixin-reminders.d.ts.map +1 -1
  190. package/apps/app-lifeops/src/lifeops/service-mixin-reminders.js +3 -2
  191. package/apps/app-lifeops/src/lifeops/service-mixin-workflows.d.ts.map +1 -1
  192. package/apps/app-lifeops/src/lifeops/service-mixin-workflows.js +1 -1
  193. package/apps/app-lifeops/src/lifeops/service-normalize-calendar.d.ts.map +1 -1
  194. package/apps/app-lifeops/src/lifeops/service-normalize-calendar.js +3 -3
  195. package/apps/app-lifeops/src/lifeops/service-normalize-connector.d.ts +1 -1
  196. package/apps/app-lifeops/src/lifeops/service-normalize-connector.d.ts.map +1 -1
  197. package/apps/app-lifeops/src/lifeops/service-normalize-connector.js +2 -2
  198. package/apps/app-lifeops/src/lifeops/signal-auth.d.ts.map +1 -1
  199. package/apps/app-lifeops/src/lifeops/signal-auth.js +6 -3
  200. package/apps/app-lifeops/src/lifeops/telegram-auth.js +1 -1
  201. package/apps/app-lifeops/src/lifeops/travel-adapters/duffel.d.ts.map +1 -1
  202. package/apps/app-lifeops/src/lifeops/travel-adapters/duffel.js +31 -6
  203. package/apps/app-lifeops/src/lifeops/twilio.js +1 -1
  204. package/apps/app-lifeops/src/lifeops/x-poster.d.ts.map +1 -1
  205. package/apps/app-lifeops/src/lifeops/x-poster.js +13 -3
  206. package/apps/app-lifeops/src/lifeops-route.d.ts +74 -0
  207. package/apps/app-lifeops/src/lifeops-route.d.ts.map +1 -0
  208. package/apps/app-lifeops/src/lifeops-route.js +204 -0
  209. package/apps/app-lifeops/src/platform/lifeops-github.d.ts +15 -0
  210. package/apps/app-lifeops/src/platform/lifeops-github.d.ts.map +1 -0
  211. package/apps/app-lifeops/src/platform/lifeops-github.js +135 -0
  212. package/apps/app-lifeops/src/routes/cloud-features-routes.d.ts +2 -2
  213. package/apps/app-lifeops/src/routes/cloud-features-routes.d.ts.map +1 -1
  214. package/apps/app-lifeops/src/routes/cloud-features-routes.js +5 -3
  215. package/apps/app-lifeops/src/routes/lifeops-routes.d.ts.map +1 -1
  216. package/apps/app-lifeops/src/routes/lifeops-routes.js +15 -3
  217. package/apps/app-lifeops/src/routes/plugin.d.ts.map +1 -1
  218. package/apps/app-lifeops/src/routes/plugin.js +10 -1
  219. package/apps/app-lifeops/src/routes/travel-provider-relay-routes.d.ts +1 -1
  220. package/apps/app-lifeops/src/routes/travel-provider-relay-routes.d.ts.map +1 -1
  221. package/apps/app-lifeops/src/routes/travel-provider-relay-routes.js +4 -2
  222. package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts +1 -1
  223. package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts.map +1 -1
  224. package/apps/app-lifeops/src/ui.d.ts +11 -0
  225. package/apps/app-lifeops/src/ui.d.ts.map +1 -0
  226. package/apps/app-lifeops/src/ui.js +9 -0
  227. package/apps/app-lifeops/src/utils/lifeops-url.d.ts +5 -0
  228. package/apps/app-lifeops/src/utils/lifeops-url.d.ts.map +1 -0
  229. package/apps/app-lifeops/src/utils/lifeops-url.js +35 -0
  230. package/apps/app-lifeops/src/website-blocker/access.d.ts.map +1 -1
  231. package/apps/app-lifeops/src/website-blocker/access.js +1 -1
  232. package/apps/app-steward/src/routes/steward-compat-routes.d.ts +1 -1
  233. package/apps/app-steward/src/routes/steward-compat-routes.d.ts.map +1 -1
  234. package/apps/app-steward/src/routes/steward-compat-routes.js +3 -1
  235. package/apps/app-steward/src/routes/wallet-browser-compat-routes.d.ts +1 -1
  236. package/apps/app-steward/src/routes/wallet-browser-compat-routes.d.ts.map +1 -1
  237. package/apps/app-steward/src/routes/wallet-browser-compat-routes.js +3 -1
  238. package/apps/app-steward/src/routes/wallet-bsc-core-routes.d.ts.map +1 -1
  239. package/apps/app-steward/src/routes/wallet-bsc-core-routes.js +2 -1
  240. package/apps/app-steward/src/routes/wallet-compat-routes.d.ts +1 -1
  241. package/apps/app-steward/src/routes/wallet-compat-routes.d.ts.map +1 -1
  242. package/apps/app-steward/src/routes/wallet-compat-routes.js +3 -1
  243. package/apps/app-steward/src/routes/wallet-core-routes.d.ts.map +1 -1
  244. package/apps/app-steward/src/routes/wallet-core-routes.js +2 -1
  245. package/apps/app-steward/src/routes/wallet-trade-compat-routes.d.ts +1 -1
  246. package/apps/app-steward/src/routes/wallet-trade-compat-routes.d.ts.map +1 -1
  247. package/apps/app-steward/src/routes/wallet-trade-compat-routes.js +3 -1
  248. package/apps/app-training/src/core/dataset-generator.d.ts +1 -1
  249. package/apps/app-training/src/core/dataset-generator.d.ts.map +1 -1
  250. package/apps/app-training/src/core/roleplay-executor.d.ts +1 -1
  251. package/apps/app-training/src/core/roleplay-executor.d.ts.map +1 -1
  252. package/apps/app-training/src/core/trajectory-task-datasets.d.ts +1 -1
  253. package/apps/app-training/src/core/trajectory-task-datasets.d.ts.map +1 -1
  254. package/apps/app-training/src/index.d.ts +1 -2
  255. package/apps/app-training/src/index.d.ts.map +1 -1
  256. package/apps/app-training/src/index.js +1 -2
  257. package/apps/app-training/src/routes/training-routes.d.ts +1 -1
  258. package/apps/app-training/src/routes/training-routes.d.ts.map +1 -1
  259. package/apps/app-training/src/routes/training-routes.js +1 -1
  260. package/apps/app-training/src/routes/trajectory-routes.d.ts +1 -1
  261. package/apps/app-training/src/routes/trajectory-routes.d.ts.map +1 -1
  262. package/apps/app-training/src/routes/trajectory-routes.js +3 -1
  263. package/apps/app-training/src/services/training-service-like.d.ts +1 -1
  264. package/apps/app-training/src/services/training-service-like.d.ts.map +1 -1
  265. package/apps/app-training/src/services/training-service.d.ts +1 -1
  266. package/apps/app-training/src/services/training-service.d.ts.map +1 -1
  267. package/package.json +1 -1
  268. package/packages/agent/src/api/provider-switch-config.js +1 -1
  269. package/packages/agent/src/api/server-helpers-auth.d.ts.map +1 -1
  270. package/packages/agent/src/api/server-helpers-auth.js +5 -4
  271. package/packages/agent/src/providers/media-provider.d.ts +1 -1
  272. package/packages/agent/src/providers/media-provider.d.ts.map +1 -1
  273. package/packages/app-core/src/App.d.ts.map +1 -1
  274. package/packages/app-core/src/App.js +20 -12
  275. package/packages/app-core/src/api/auth.d.ts.map +1 -1
  276. package/packages/app-core/src/api/auth.js +5 -5
  277. package/packages/app-core/src/api/client-types-experience.d.ts +7 -0
  278. package/packages/app-core/src/api/client-types-experience.d.ts.map +1 -1
  279. package/packages/app-core/src/components/apps/helpers.d.ts +1 -1
  280. package/packages/app-core/src/components/apps/helpers.d.ts.map +1 -1
  281. package/packages/app-core/src/components/apps/helpers.js +1 -0
  282. package/packages/app-core/src/components/apps/internal-tool-apps.d.ts +11 -0
  283. package/packages/app-core/src/components/apps/internal-tool-apps.d.ts.map +1 -1
  284. package/packages/app-core/src/components/apps/internal-tool-apps.js +31 -0
  285. package/packages/app-core/src/components/apps/launch-history.d.ts +16 -0
  286. package/packages/app-core/src/components/apps/launch-history.d.ts.map +1 -0
  287. package/packages/app-core/src/components/apps/launch-history.js +77 -0
  288. package/packages/app-core/src/components/apps/per-app-config.d.ts +19 -0
  289. package/packages/app-core/src/components/apps/per-app-config.d.ts.map +1 -0
  290. package/packages/app-core/src/components/apps/per-app-config.js +99 -0
  291. package/packages/app-core/src/components/apps/useRegistryCatalog.d.ts +14 -0
  292. package/packages/app-core/src/components/apps/useRegistryCatalog.d.ts.map +1 -0
  293. package/packages/app-core/src/components/apps/useRegistryCatalog.js +52 -0
  294. package/packages/app-core/src/components/auth/LoginView.d.ts +1 -19
  295. package/packages/app-core/src/components/auth/LoginView.d.ts.map +1 -1
  296. package/packages/app-core/src/components/auth/LoginView.js +4 -99
  297. package/packages/app-core/src/components/character/CharacterExperienceWorkspace.d.ts.map +1 -1
  298. package/packages/app-core/src/components/character/CharacterExperienceWorkspace.js +14 -2
  299. package/packages/app-core/src/components/character/character-hub-helpers.d.ts.map +1 -1
  300. package/packages/app-core/src/components/character/character-hub-helpers.js +7 -0
  301. package/packages/app-core/src/components/character/character-hub-types.d.ts +7 -0
  302. package/packages/app-core/src/components/character/character-hub-types.d.ts.map +1 -1
  303. package/packages/app-core/src/components/onboarding/BootstrapStep.d.ts.map +1 -1
  304. package/packages/app-core/src/components/onboarding/BootstrapStep.js +3 -2
  305. package/packages/app-core/src/components/pages/AppDetailsView.d.ts +36 -0
  306. package/packages/app-core/src/components/pages/AppDetailsView.d.ts.map +1 -0
  307. package/packages/app-core/src/components/pages/AppDetailsView.js +289 -0
  308. package/packages/app-core/src/components/pages/AppsView.d.ts.map +1 -1
  309. package/packages/app-core/src/components/pages/AppsView.js +134 -42
  310. package/packages/app-core/src/components/shell/StartupShell.d.ts.map +1 -1
  311. package/packages/app-core/src/components/shell/StartupShell.js +2 -5
  312. package/packages/app-core/src/i18n/locales/en.json +256 -205
  313. package/packages/app-core/src/i18n/locales/es.json +256 -205
  314. package/packages/app-core/src/i18n/locales/ko.json +256 -205
  315. package/packages/app-core/src/i18n/locales/pt.json +256 -205
  316. package/packages/app-core/src/i18n/locales/tl.json +256 -205
  317. package/packages/app-core/src/i18n/locales/vi.json +256 -205
  318. package/packages/app-core/src/i18n/locales/zh-CN.json +256 -205
  319. package/packages/app-core/src/navigation/index.d.ts.map +1 -1
  320. package/packages/app-core/src/navigation/index.js +6 -0
  321. package/packages/app-core/src/shell/AppWindowRenderer.d.ts +17 -0
  322. package/packages/app-core/src/shell/AppWindowRenderer.d.ts.map +1 -0
  323. package/packages/app-core/src/shell/AppWindowRenderer.js +337 -0
  324. package/packages/app-core/src/shell/DetachedShellRoot.js +4 -1
  325. package/packages/app-core/src/shell/index.d.ts +1 -0
  326. package/packages/app-core/src/shell/index.d.ts.map +1 -1
  327. package/packages/app-core/src/shell/index.js +1 -0
  328. package/packages/app-core/src/state/startup-coordinator.d.ts.map +1 -1
  329. package/packages/app-core/src/state/startup-coordinator.js +0 -3
  330. package/packages/app-core/src/state/startup-phase-poll.d.ts.map +1 -1
  331. package/packages/app-core/src/state/startup-phase-poll.js +2 -4
  332. package/packages/app-core/src/state/usePluginsSkillsState.d.ts +6 -6
  333. package/packages/native-plugins/mobile-signals/src/definitions.d.ts +162 -0
  334. package/packages/native-plugins/mobile-signals/src/definitions.d.ts.map +1 -0
  335. package/packages/native-plugins/mobile-signals/src/definitions.js +1 -0
  336. package/packages/native-plugins/mobile-signals/src/index.d.ts +4 -0
  337. package/packages/native-plugins/mobile-signals/src/index.d.ts.map +1 -0
  338. package/packages/native-plugins/mobile-signals/src/index.js +6 -0
  339. package/packages/native-plugins/mobile-signals/src/web.d.ts +29 -0
  340. package/packages/native-plugins/mobile-signals/src/web.d.ts.map +1 -0
  341. package/packages/native-plugins/mobile-signals/src/web.js +269 -0
  342. package/packages/shared/src/app-hero-art.d.ts.map +1 -1
  343. package/packages/shared/src/app-hero-art.js +13 -0
  344. package/packages/shared/src/contracts/lifeops.d.ts +10 -0
  345. package/packages/shared/src/contracts/lifeops.d.ts.map +1 -1
  346. package/packages/shared/src/contracts/lifeops.js +5 -0
  347. package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.d.ts.map +1 -1
  348. package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.js +46 -4
  349. package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.d.ts.map +1 -1
  350. package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.js +34 -124
  351. package/packages/typescript/src/features/advanced-capabilities/experience/service.d.ts.map +1 -1
  352. package/packages/typescript/src/features/advanced-capabilities/experience/service.js +56 -0
  353. package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts +7 -0
  354. package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts.map +1 -1
  355. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.d.ts +7 -0
  356. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.d.ts.map +1 -0
  357. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.js +123 -0
  358. package/apps/app-training/src/ui/FineTuningView.d.ts +0 -5
  359. package/apps/app-training/src/ui/FineTuningView.d.ts.map +0 -1
  360. package/apps/app-training/src/ui/FineTuningView.js +0 -388
  361. package/apps/app-training/src/ui/fine-tuning-panels.d.ts +0 -111
  362. package/apps/app-training/src/ui/fine-tuning-panels.d.ts.map +0 -1
  363. package/apps/app-training/src/ui/fine-tuning-panels.js +0 -130
  364. package/apps/app-training/src/ui/index.d.ts +0 -3
  365. package/apps/app-training/src/ui/index.d.ts.map +0 -1
  366. package/apps/app-training/src/ui/index.js +0 -2
  367. package/packages/app-core/src/api/trusted-local-request.d.ts +0 -4
  368. package/packages/app-core/src/api/trusted-local-request.d.ts.map +0 -1
  369. package/packages/app-core/src/api/trusted-local-request.js +0 -176
@@ -0,0 +1,160 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * LifeOpsLinkPaypalButton — drives the PayPal OAuth Login flow for the
4
+ * Money page using a popup window.
5
+ *
6
+ * Flow:
7
+ * 1. User clicks the button.
8
+ * 2. We mint a fresh `state` (CSRF nonce) and ask Eliza Cloud to build
9
+ * the PayPal authorize URL.
10
+ * 3. Open a popup at that URL. PayPal redirects to the cloud's
11
+ * `popup-callback` page after consent; that page posts a message
12
+ * back to this window with `{ code, state, error }`.
13
+ * 4. We verify the `state` matches the one we generated, then call
14
+ * `client.completeLifeOpsPaypalLink({ code })`. Eliza Cloud exchanges
15
+ * the code for tokens, persists them to the new payment_source row,
16
+ * and tells us whether the granted scope includes the Reporting API.
17
+ * 5. If `capability.hasReporting === false`, the user is on a personal
18
+ * PayPal account; we show a CSV-export fallback prompt.
19
+ */
20
+ import { client, useApp } from "@elizaos/app-core";
21
+ import { Loader2, Wallet } from "lucide-react";
22
+ import { useCallback, useEffect, useRef, useState } from "react";
23
+ const POPUP_FEATURES = "width=560,height=720,resizable=yes,scrollbars=yes";
24
+ const POPUP_NAME = "milady-paypal-oauth";
25
+ const POPUP_TIMEOUT_MS = 5 * 60 * 1000;
26
+ const ORIGIN_ALLOWLIST_ENV_FALLBACK = "*";
27
+ function isOauthMessage(value) {
28
+ if (!value || typeof value !== "object")
29
+ return false;
30
+ const msg = value;
31
+ return msg.type === "milady-paypal-oauth";
32
+ }
33
+ export function LifeOpsLinkPaypalButton({ onLinked, label = "Link PayPal", }) {
34
+ const { elizaCloudConnected } = useApp();
35
+ const [status, setStatus] = useState("idle");
36
+ const [error, setError] = useState(null);
37
+ const [capability, setCapability] = useState(null);
38
+ const popupRef = useRef(null);
39
+ const stateRef = useRef(null);
40
+ const handlerRef = useRef(null);
41
+ const watchdogRef = useRef(null);
42
+ const cleanup = useCallback(() => {
43
+ if (handlerRef.current) {
44
+ window.removeEventListener("message", handlerRef.current);
45
+ handlerRef.current = null;
46
+ }
47
+ if (watchdogRef.current) {
48
+ clearTimeout(watchdogRef.current);
49
+ watchdogRef.current = null;
50
+ }
51
+ if (popupRef.current && !popupRef.current.closed) {
52
+ try {
53
+ popupRef.current.close();
54
+ }
55
+ catch {
56
+ // Cross-origin closed by user — ignore.
57
+ }
58
+ }
59
+ popupRef.current = null;
60
+ stateRef.current = null;
61
+ }, []);
62
+ useEffect(() => {
63
+ return () => cleanup();
64
+ }, [cleanup]);
65
+ const onClick = useCallback(async () => {
66
+ setError(null);
67
+ setCapability(null);
68
+ setStatus("preparing");
69
+ const state = `${Date.now().toString(36)}_${Math.random().toString(36).slice(2)}`;
70
+ stateRef.current = state;
71
+ let authorizeUrl;
72
+ try {
73
+ const result = await client.createLifeOpsPaypalAuthorizeUrl({ state });
74
+ authorizeUrl = result.url;
75
+ }
76
+ catch (err) {
77
+ setStatus("error");
78
+ setError(err instanceof Error ? err.message : String(err));
79
+ return;
80
+ }
81
+ const popup = window.open(authorizeUrl, POPUP_NAME, POPUP_FEATURES);
82
+ if (!popup) {
83
+ setStatus("error");
84
+ setError("Popup blocked. Allow popups for this site and try again, or use the CSV export from paypal.com.");
85
+ return;
86
+ }
87
+ popupRef.current = popup;
88
+ setStatus("awaiting_user");
89
+ const handler = (event) => {
90
+ const expectedOrigin = process.env.MILADY_APP_ORIGIN ?? ORIGIN_ALLOWLIST_ENV_FALLBACK;
91
+ if (expectedOrigin !== "*" &&
92
+ event.origin &&
93
+ event.origin !== window.location.origin &&
94
+ event.origin !== expectedOrigin) {
95
+ // Drop messages from unexpected origins.
96
+ return;
97
+ }
98
+ if (!isOauthMessage(event.data))
99
+ return;
100
+ const payload = event.data;
101
+ if (payload.state !== stateRef.current) {
102
+ // Stale or forged message — ignore.
103
+ return;
104
+ }
105
+ window.removeEventListener("message", handler);
106
+ handlerRef.current = null;
107
+ if (watchdogRef.current) {
108
+ clearTimeout(watchdogRef.current);
109
+ watchdogRef.current = null;
110
+ }
111
+ if (payload.error) {
112
+ setStatus("error");
113
+ setError(payload.errorDescription || payload.error);
114
+ cleanup();
115
+ return;
116
+ }
117
+ if (!payload.code) {
118
+ setStatus("error");
119
+ setError("PayPal returned no authorization code.");
120
+ cleanup();
121
+ return;
122
+ }
123
+ setStatus("exchanging");
124
+ void client
125
+ .completeLifeOpsPaypalLink({ code: payload.code })
126
+ .then((result) => {
127
+ setStatus("done");
128
+ setCapability(result.capability);
129
+ onLinked?.(result.source, result.capability);
130
+ })
131
+ .catch((err) => {
132
+ setStatus("error");
133
+ setError(err instanceof Error ? err.message : String(err));
134
+ })
135
+ .finally(() => {
136
+ cleanup();
137
+ });
138
+ };
139
+ handlerRef.current = handler;
140
+ window.addEventListener("message", handler);
141
+ watchdogRef.current = setTimeout(() => {
142
+ setStatus("error");
143
+ setError("PayPal authorization timed out. Try again.");
144
+ cleanup();
145
+ }, POPUP_TIMEOUT_MS);
146
+ }, [cleanup, onLinked]);
147
+ const disabled = !elizaCloudConnected || status === "preparing" || status === "exchanging";
148
+ let buttonLabel = label;
149
+ if (status === "preparing")
150
+ buttonLabel = "Preparing PayPal…";
151
+ else if (status === "awaiting_user")
152
+ buttonLabel = "Waiting for PayPal…";
153
+ else if (status === "exchanging")
154
+ buttonLabel = "Linking…";
155
+ else if (status === "done")
156
+ buttonLabel = "Linked";
157
+ return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("button", { type: "button", onClick: onClick, disabled: disabled, title: !elizaCloudConnected
158
+ ? "PayPal link is not available — Eliza Cloud not connected, or PAYPAL_* env vars not set in cloud."
159
+ : undefined, className: "inline-flex items-center gap-1.5 rounded-md border border-border/30 bg-bg-muted/30 px-2.5 py-1 text-xs font-medium hover:bg-bg-muted/60 disabled:cursor-not-allowed disabled:opacity-50", children: [status === "preparing" || status === "exchanging" ? (_jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin", "aria-hidden": true })) : (_jsx(Wallet, { className: "h-3.5 w-3.5", "aria-hidden": true })), buttonLabel] }), error ? (_jsxs("span", { className: "text-[11px] text-rose-300", children: ["PayPal: ", error] })) : null, status === "done" && capability && !capability.hasReporting ? (_jsx("span", { className: "text-[11px] text-amber-300", children: "PayPal connected, but this account is personal-tier. Use CSV export from paypal.com \u2192 Activity \u2192 Statements to import transactions." })) : null] }));
160
+ }
@@ -0,0 +1,3 @@
1
+ import { type JSX } from "react";
2
+ export declare function LifeOpsMoneySection(): JSX.Element | null;
3
+ //# sourceMappingURL=LifeOpsMoneySection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LifeOpsMoneySection.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/components/LifeOpsMoneySection.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,KAAK,GAAG,EAA6C,MAAM,OAAO,CAAC;AAkG5E,wBAAgB,mBAAmB,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CA4uBxD"}
@@ -0,0 +1,373 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { client, useApp, } from "@elizaos/app-core";
3
+ import { Ban, CalendarClock, CheckCircle2, CreditCard, DollarSign, FilePlus2, Loader2, MessageCircle, RefreshCw, Sparkles, Timer, Trash2, TrendingDown, Upload, } from "lucide-react";
4
+ import { useCallback, useEffect, useMemo, useState } from "react";
5
+ import { useLifeOpsChatLauncher } from "./LifeOpsChatAdapter.js";
6
+ import { LifeOpsLinkBankButton } from "./LifeOpsLinkBankButton.js";
7
+ import { LifeOpsLinkPaypalButton } from "./LifeOpsLinkPaypalButton.js";
8
+ function formatUsd(value) {
9
+ return `$${value.toLocaleString("en-US", {
10
+ minimumFractionDigits: 2,
11
+ maximumFractionDigits: 2,
12
+ })}`;
13
+ }
14
+ function formatDate(iso) {
15
+ try {
16
+ return new Date(iso).toLocaleDateString(undefined, {
17
+ month: "short",
18
+ day: "numeric",
19
+ year: "numeric",
20
+ });
21
+ }
22
+ catch {
23
+ return iso.slice(0, 10);
24
+ }
25
+ }
26
+ const RELATIVE_TIME_UNITS = [
27
+ { unit: "year", ms: 365 * 24 * 60 * 60 * 1000 },
28
+ { unit: "month", ms: 30 * 24 * 60 * 60 * 1000 },
29
+ { unit: "day", ms: 24 * 60 * 60 * 1000 },
30
+ { unit: "hour", ms: 60 * 60 * 1000 },
31
+ { unit: "minute", ms: 60 * 1000 },
32
+ ];
33
+ function formatRelative(iso) {
34
+ const ts = Date.parse(iso);
35
+ if (!Number.isFinite(ts))
36
+ return iso.slice(0, 10);
37
+ const diffMs = ts - Date.now();
38
+ const absMs = Math.abs(diffMs);
39
+ if (absMs < 30_000)
40
+ return "just now";
41
+ const formatter = new Intl.RelativeTimeFormat(undefined, { numeric: "auto" });
42
+ for (const { unit, ms } of RELATIVE_TIME_UNITS) {
43
+ if (absMs >= ms) {
44
+ return formatter.format(Math.round(diffMs / ms), unit);
45
+ }
46
+ }
47
+ return formatter.format(Math.round(diffMs / 1000), "second");
48
+ }
49
+ function formatDueRelative(dueDateIso) {
50
+ // dueDateIso is YYYY-MM-DD; treat as UTC noon to avoid TZ-shift edge cases.
51
+ const due = new Date(`${dueDateIso}T12:00:00.000Z`).getTime();
52
+ if (!Number.isFinite(due))
53
+ return dueDateIso;
54
+ const today = new Date();
55
+ const todayUtc = Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate(), 12);
56
+ const diffDays = Math.round((due - todayUtc) / (24 * 60 * 60 * 1000));
57
+ if (diffDays === 0)
58
+ return "due today";
59
+ if (diffDays === 1)
60
+ return "due tomorrow";
61
+ if (diffDays > 1)
62
+ return `due in ${diffDays}d`;
63
+ return `${Math.abs(diffDays)}d overdue`;
64
+ }
65
+ function formatCredits(value) {
66
+ return value.toLocaleString("en-US", {
67
+ minimumFractionDigits: 2,
68
+ maximumFractionDigits: 2,
69
+ });
70
+ }
71
+ function cadenceLabel(cadence) {
72
+ switch (cadence) {
73
+ case "weekly":
74
+ return "Weekly";
75
+ case "biweekly":
76
+ return "Every 2 weeks";
77
+ case "monthly":
78
+ return "Monthly";
79
+ case "quarterly":
80
+ return "Quarterly";
81
+ case "annual":
82
+ return "Annual";
83
+ case "irregular":
84
+ return "Irregular";
85
+ }
86
+ }
87
+ export function LifeOpsMoneySection() {
88
+ const [dashboard, setDashboard] = useState(null);
89
+ const [loading, setLoading] = useState(true);
90
+ const [error, setError] = useState(null);
91
+ const [importStatus, setImportStatus] = useState(null);
92
+ const { openLifeOpsChat } = useLifeOpsChatLauncher();
93
+ const { elizaCloudConnected, elizaCloudCredits, elizaCloudCreditsLow, elizaCloudCreditsCritical, } = useApp();
94
+ const [creditTransactions, setCreditTransactions] = useState(null);
95
+ const [creditTransactionsLoading, setCreditTransactionsLoading] = useState(false);
96
+ const refresh = useCallback(async () => {
97
+ setLoading(true);
98
+ setError(null);
99
+ try {
100
+ const dash = await client.getLifeOpsPaymentsDashboard({ windowDays: 30 });
101
+ setDashboard(dash);
102
+ }
103
+ catch (err) {
104
+ setError(err instanceof Error ? err.message : String(err));
105
+ }
106
+ finally {
107
+ setLoading(false);
108
+ }
109
+ }, []);
110
+ useEffect(() => {
111
+ void refresh();
112
+ }, [refresh]);
113
+ const refreshCreditTransactions = useCallback(async () => {
114
+ if (!elizaCloudConnected) {
115
+ setCreditTransactions(null);
116
+ return;
117
+ }
118
+ setCreditTransactionsLoading(true);
119
+ try {
120
+ const result = await client.getCloudBillingHistory();
121
+ const list = result.data ??
122
+ result.items ??
123
+ result.history ??
124
+ [];
125
+ setCreditTransactions(list);
126
+ }
127
+ catch {
128
+ // 401/404/network → no data yet, keep section quiet rather than erroring loudly.
129
+ setCreditTransactions([]);
130
+ }
131
+ finally {
132
+ setCreditTransactionsLoading(false);
133
+ }
134
+ }, [elizaCloudConnected]);
135
+ useEffect(() => {
136
+ void refreshCreditTransactions();
137
+ }, [refreshCreditTransactions]);
138
+ const onAddSource = useCallback(async () => {
139
+ const label = window.prompt("Source label (e.g. 'Chase Checking', 'Amex'):");
140
+ if (!label)
141
+ return;
142
+ const kindAnswer = window.prompt("Source kind — csv / manual / plaid / paypal:", "csv");
143
+ const kind = (kindAnswer ?? "csv").trim().toLowerCase();
144
+ if (!["csv", "manual", "plaid", "paypal"].includes(kind)) {
145
+ window.alert("Invalid kind.");
146
+ return;
147
+ }
148
+ const institution = window.prompt("Institution (optional):", "") ?? undefined;
149
+ try {
150
+ await client.addLifeOpsPaymentSource({
151
+ kind: kind,
152
+ label,
153
+ institution: institution && institution.trim().length > 0 ? institution : null,
154
+ });
155
+ await refresh();
156
+ }
157
+ catch (err) {
158
+ window.alert(`Failed to add source: ${err instanceof Error ? err.message : String(err)}`);
159
+ }
160
+ }, [refresh]);
161
+ const onImportCsv = useCallback(async (source) => {
162
+ const csvText = window.prompt(`Paste CSV content for "${source.label}" (first row = header):`);
163
+ if (!csvText || csvText.trim().length === 0)
164
+ return;
165
+ setImportStatus(`Importing CSV into ${source.label}…`);
166
+ try {
167
+ const result = await client.importLifeOpsPaymentCsv({
168
+ sourceId: source.id,
169
+ csvText,
170
+ });
171
+ setImportStatus(`Imported ${result.inserted} new transactions (${result.skipped} already on file${result.errors.length > 0 ? `, ${result.errors.length} errors` : ""}).`);
172
+ await refresh();
173
+ }
174
+ catch (err) {
175
+ setImportStatus(null);
176
+ window.alert(`CSV import failed: ${err instanceof Error ? err.message : String(err)}`);
177
+ }
178
+ }, [refresh]);
179
+ const onDeleteSource = useCallback(async (source) => {
180
+ if (!window.confirm(`Delete source "${source.label}"? This removes its transactions too.`)) {
181
+ return;
182
+ }
183
+ try {
184
+ await client.deleteLifeOpsPaymentSource(source.id);
185
+ await refresh();
186
+ }
187
+ catch (err) {
188
+ window.alert(`Delete failed: ${err instanceof Error ? err.message : String(err)}`);
189
+ }
190
+ }, [refresh]);
191
+ const onSyncPlaid = useCallback(async (source) => {
192
+ setImportStatus(`Syncing ${source.label} via Plaid…`);
193
+ try {
194
+ const result = await client.syncLifeOpsPlaidTransactions({
195
+ sourceId: source.id,
196
+ });
197
+ setImportStatus(`Plaid sync: ${result.inserted} new transaction${result.inserted === 1 ? "" : "s"} (${result.skipped} already on file).`);
198
+ await refresh();
199
+ }
200
+ catch (err) {
201
+ setImportStatus(null);
202
+ window.alert(`Plaid sync failed: ${err instanceof Error ? err.message : String(err)}`);
203
+ }
204
+ }, [refresh]);
205
+ const onSyncPaypal = useCallback(async (source) => {
206
+ setImportStatus(`Syncing ${source.label} via PayPal…`);
207
+ try {
208
+ const result = await client.syncLifeOpsPaypalTransactions({
209
+ sourceId: source.id,
210
+ windowDays: 90,
211
+ });
212
+ if (result.fallback === "csv_export") {
213
+ setImportStatus("PayPal Reporting API isn't available for this account (typically personal-tier). Use the CSV export from paypal.com → Activity → Statements.");
214
+ }
215
+ else {
216
+ setImportStatus(`PayPal sync: ${result.inserted} new transaction${result.inserted === 1 ? "" : "s"} (${result.skipped} already on file).`);
217
+ }
218
+ await refresh();
219
+ }
220
+ catch (err) {
221
+ setImportStatus(null);
222
+ window.alert(`PayPal sync failed: ${err instanceof Error ? err.message : String(err)}`);
223
+ }
224
+ }, [refresh]);
225
+ const onScanGmail = useCallback(async () => {
226
+ try {
227
+ const result = await client.scanLifeOpsEmailSubscriptions();
228
+ window.alert(`Scan complete. ${result.summary.uniqueSenderCount} senders found (${result.summary.oneClickEligibleCount} one-click eligible).`);
229
+ }
230
+ catch (err) {
231
+ window.alert(`Scan failed: ${err instanceof Error ? err.message : String(err)}`);
232
+ }
233
+ }, []);
234
+ const onChatAboutRecurringCharge = useCallback((charge) => {
235
+ openLifeOpsChat([
236
+ `Help me review this recurring charge from ${charge.merchantDisplay}.`,
237
+ `Cadence: ${cadenceLabel(charge.cadence)}.`,
238
+ `Average charge: ${formatUsd(charge.averageAmountUsd)}.`,
239
+ `Annualized cost: ${formatUsd(charge.annualizedCostUsd)}.`,
240
+ `Last charged: ${formatDate(charge.latestSeenAt)}.`,
241
+ "If it makes sense, prepare the cancellation steps before doing anything destructive.",
242
+ ].join(" "));
243
+ }, [openLifeOpsChat]);
244
+ const onCancelRecurringCharge = useCallback(async (charge, playbookKey) => {
245
+ try {
246
+ const summary = (await client.cancelLifeOpsSubscription({
247
+ serviceSlug: playbookKey,
248
+ executor: "user_browser",
249
+ confirmed: false,
250
+ }));
251
+ const status = summary.cancellation.status;
252
+ if (status === "completed" || status === "already_canceled") {
253
+ window.alert(`${summary.cancellation.serviceName} cancellation: ${status.replace("_", " ")}.`);
254
+ await refresh();
255
+ return;
256
+ }
257
+ if (status === "awaiting_confirmation" ||
258
+ status === "needs_login" ||
259
+ status === "needs_mfa" ||
260
+ status === "phone_only" ||
261
+ status === "chat_only" ||
262
+ status === "blocked") {
263
+ openLifeOpsChat([
264
+ `Cancellation for ${charge.merchantDisplay} is in state "${status}".`,
265
+ "Continue in chat — I'll guide you through the next step (login, MFA, retention prompts, or phone/chat handoff).",
266
+ ].join(" "));
267
+ return;
268
+ }
269
+ if (status === "failed" || status === "unsupported_surface") {
270
+ // PLAYBOOK_NOT_IMPLEMENTED comes through as `failed` with the error
271
+ // string carrying the prefix and the managementUrl populated. Open
272
+ // the management page in a new tab so the user can finish manually.
273
+ const error = summary.cancellation.error ?? "";
274
+ const url = summary.cancellation.managementUrl;
275
+ if (error.includes("PLAYBOOK_NOT_IMPLEMENTED") && url) {
276
+ window.open(url, "_blank", "noopener");
277
+ return;
278
+ }
279
+ window.alert(`Cancellation could not start: ${error || status}`);
280
+ return;
281
+ }
282
+ }
283
+ catch (err) {
284
+ window.alert(`Cancellation failed: ${err instanceof Error ? err.message : String(err)}`);
285
+ }
286
+ }, [openLifeOpsChat, refresh]);
287
+ const onMarkBillPaid = useCallback(async (bill) => {
288
+ try {
289
+ await client.markLifeOpsBillPaid({ billId: bill.id });
290
+ await refresh();
291
+ }
292
+ catch (err) {
293
+ window.alert(`Mark paid failed: ${err instanceof Error ? err.message : String(err)}`);
294
+ }
295
+ }, [refresh]);
296
+ const onSnoozeBill = useCallback(async (bill) => {
297
+ try {
298
+ await client.snoozeLifeOpsBill({ billId: bill.id, days: 7 });
299
+ await refresh();
300
+ }
301
+ catch (err) {
302
+ window.alert(`Snooze failed: ${err instanceof Error ? err.message : String(err)}`);
303
+ }
304
+ }, [refresh]);
305
+ const onChatAboutBill = useCallback((bill) => {
306
+ openLifeOpsChat([
307
+ `Help me look at this bill from ${bill.merchant}.`,
308
+ `Amount: ${formatUsd(bill.amountUsd)} ${bill.currency}.`,
309
+ `Due: ${bill.dueDate} (${formatDueRelative(bill.dueDate)}).`,
310
+ "What should I do about it?",
311
+ ].join(" "));
312
+ }, [openLifeOpsChat]);
313
+ const playbookHitsByMerchant = useMemo(() => {
314
+ const map = new Map();
315
+ if (!dashboard?.recurringPlaybookHits)
316
+ return map;
317
+ for (const hit of dashboard.recurringPlaybookHits) {
318
+ map.set(hit.merchantNormalized, hit.playbookKey);
319
+ }
320
+ return map;
321
+ }, [dashboard]);
322
+ const annualRecurring = useMemo(() => {
323
+ if (!dashboard)
324
+ return 0;
325
+ return dashboard.recurring.reduce((total, charge) => total + charge.annualizedCostUsd, 0);
326
+ }, [dashboard]);
327
+ if (loading && !dashboard) {
328
+ return (_jsxs("div", { className: "flex items-center justify-center gap-2 p-6 text-sm text-muted", children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": true }), "Loading money dashboard\u2026"] }));
329
+ }
330
+ if (error) {
331
+ return (_jsxs("div", { className: "space-y-3 p-6", children: [_jsx("div", { className: "rounded-md border border-rose-500/30 bg-rose-500/10 px-3 py-2 text-xs text-rose-300", children: error }), _jsxs("button", { type: "button", onClick: () => void refresh(), className: "inline-flex items-center gap-2 rounded-md border border-border/30 bg-bg-muted/30 px-3 py-1.5 text-xs font-medium text-txt hover:bg-bg-muted/60", children: [_jsx(RefreshCw, { className: "h-3.5 w-3.5" }), " Retry"] })] }));
332
+ }
333
+ const dash = dashboard;
334
+ if (!dash)
335
+ return null;
336
+ return (_jsxs("div", { className: "flex h-full w-full flex-col gap-4 p-4", "data-testid": "lifeops-money-section", children: [_jsxs("header", { className: "flex items-center justify-between", children: [_jsx("div", { children: _jsxs("h1", { className: "flex items-center gap-2 text-base font-semibold", children: [_jsx(CreditCard, { className: "h-4 w-4", "aria-hidden": true }), " Money"] }) }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("button", { type: "button", onClick: () => void onScanGmail(), "aria-label": "Scan Gmail for subscription senders", className: "inline-flex h-8 w-8 items-center justify-center rounded-full border border-border/30 bg-bg-muted/30 text-muted hover:bg-bg-muted/60 hover:text-txt", title: "Scan Gmail for subscription senders", children: _jsx(Upload, { className: "h-3.5 w-3.5", "aria-hidden": true }) }), _jsx("button", { type: "button", onClick: () => {
337
+ void refresh();
338
+ void refreshCreditTransactions();
339
+ }, "aria-label": "Refresh dashboard", className: "inline-flex h-8 w-8 items-center justify-center rounded-full border border-border/30 bg-bg-muted/30 text-muted hover:bg-bg-muted/60 hover:text-txt", title: "Refresh dashboard", children: _jsx(RefreshCw, { className: "h-3.5 w-3.5", "aria-hidden": true }) })] })] }), importStatus ? (_jsx("div", { className: "rounded-md border border-emerald-500/30 bg-emerald-500/10 px-3 py-2 text-xs text-emerald-300", children: importStatus })) : null, _jsx(CloudCreditsBalance, { connected: elizaCloudConnected, balance: elizaCloudCredits, low: elizaCloudCreditsLow, critical: elizaCloudCreditsCritical }), _jsxs("section", { className: "grid grid-cols-1 gap-3 md:grid-cols-3", children: [_jsx(Kpi, { label: `Last ${dash.spending.windowDays}d spend`, value: formatUsd(dash.spending.totalSpendUsd), icon: _jsx(TrendingDown, { className: "h-4 w-4", "aria-hidden": true }) }), _jsx(Kpi, { label: "Monthly recurring", value: formatUsd(dash.spending.recurringSpendUsd), icon: _jsx(CreditCard, { className: "h-4 w-4", "aria-hidden": true }) }), _jsx(Kpi, { label: "Annualized recurring", value: formatUsd(annualRecurring), icon: _jsx(DollarSign, { className: "h-4 w-4", "aria-hidden": true }) })] }), _jsxs("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]", children: [_jsxs("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [_jsxs("section", { className: "rounded-lg border border-border/20 bg-bg/30 p-3", children: [_jsxs("header", { className: "mb-2 flex items-center justify-between gap-2", children: [_jsx("h2", { className: "text-sm font-semibold", children: "Sources" }), _jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [_jsx(LifeOpsLinkBankButton, { onLinked: () => void refresh() }), _jsx(LifeOpsLinkPaypalButton, { onLinked: () => void refresh() }), _jsx("button", { type: "button", onClick: () => void onAddSource(), "aria-label": "Add a source manually", className: "inline-flex h-7 w-7 items-center justify-center rounded-full border border-border/30 bg-bg-muted/30 text-muted hover:bg-bg-muted/60 hover:text-txt", title: "Add a source manually (CSV / manual)", children: _jsx(FilePlus2, { className: "h-3.5 w-3.5", "aria-hidden": true }) })] })] }), dash.sources.length === 0 ? (_jsx("p", { className: "text-xs text-muted", children: "No sources." })) : (_jsx("ul", { className: "space-y-2", children: dash.sources.map((source) => (_jsxs("li", { className: "flex items-center justify-between gap-2 rounded border border-border/20 bg-bg/40 px-3 py-2 text-xs", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: "inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-border/20 bg-bg-muted/30 font-mono text-[10px] uppercase text-muted", children: source.kind.slice(0, 2) }), _jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "truncate font-medium text-txt", children: source.label }), _jsx("div", { className: "truncate text-[11px] text-muted", children: source.institution ??
340
+ (source.lastSyncedAt
341
+ ? formatDate(source.lastSyncedAt)
342
+ : `${source.transactionCount} tx`) })] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [source.kind === "csv" ? (_jsx("button", { type: "button", onClick: () => void onImportCsv(source), "aria-label": `Import CSV for ${source.label}`, className: "inline-flex h-7 w-7 items-center justify-center rounded-full border border-border/30 bg-bg-muted/30 text-muted hover:bg-bg-muted/60 hover:text-txt", title: "Import CSV", children: _jsx(Upload, { className: "h-3.5 w-3.5", "aria-hidden": true }) })) : null, source.kind === "plaid" ? (_jsx("button", { type: "button", onClick: () => void onSyncPlaid(source), "aria-label": `Sync ${source.label}`, className: "inline-flex h-7 w-7 items-center justify-center rounded-full border border-border/30 bg-bg-muted/30 text-muted hover:bg-bg-muted/60 hover:text-txt", title: "Pull the latest transactions from Plaid", children: _jsx(RefreshCw, { className: "h-3.5 w-3.5", "aria-hidden": true }) })) : null, source.kind === "paypal" ? (_jsx("button", { type: "button", onClick: () => void onSyncPaypal(source), "aria-label": `Sync ${source.label}`, className: "inline-flex h-7 w-7 items-center justify-center rounded-full border border-border/30 bg-bg-muted/30 text-muted hover:bg-bg-muted/60 hover:text-txt", title: "Pull recent PayPal transactions (Reporting API)", children: _jsx(RefreshCw, { className: "h-3.5 w-3.5", "aria-hidden": true }) })) : null, _jsx("button", { type: "button", onClick: () => void onDeleteSource(source), "aria-label": `Remove ${source.label}`, className: "inline-flex h-7 w-7 items-center justify-center rounded-full text-muted hover:bg-bg-muted/40 hover:text-rose-300", title: "Remove source", children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) })] })] }, source.id))) }))] }), _jsxs("section", { className: "rounded-lg border border-border/20 bg-bg/30 p-3", children: [_jsx("h2", { className: "mb-2 text-sm font-semibold", children: "Top categories" }), dash.spending.topCategories.length === 0 ? (_jsx("p", { className: "text-xs text-muted", children: "No categories." })) : (_jsx("ul", { className: "space-y-1.5", children: dash.spending.topCategories.map((category) => (_jsxs("li", { className: "flex items-center justify-between text-xs", children: [_jsx("span", { className: "truncate text-txt/85", children: category.category }), _jsx("span", { className: "tabular-nums text-muted", children: formatUsd(category.totalUsd) })] }, category.category))) }))] })] }), _jsx(CloudCreditsActivity, { connected: elizaCloudConnected, loading: creditTransactionsLoading, transactions: creditTransactions })] }), _jsxs("section", { className: "rounded-lg border border-border/20 bg-bg/30 p-3", "data-testid": "lifeops-money-bills", children: [_jsx("header", { className: "mb-2 flex items-center justify-between gap-2", children: _jsxs("h2", { className: "flex items-center gap-1.5 text-sm font-semibold", children: [_jsx(CalendarClock, { className: "h-3.5 w-3.5", "aria-hidden": true }), " Upcoming bills"] }) }), (dash.upcomingBills ?? []).length === 0 ? (_jsx("p", { className: "text-xs text-muted", children: "No bills detected from email yet." })) : (_jsx("ul", { className: "space-y-1.5", children: (dash.upcomingBills ?? []).map((bill) => (_jsxs("li", { className: "flex items-center justify-between gap-2 rounded border border-border/10 bg-bg/40 px-2.5 py-1.5 text-xs", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "truncate font-medium text-txt", children: bill.merchant }), _jsxs("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted", children: [_jsx("span", { children: formatDate(bill.dueDate) }), _jsx("span", { className: "rounded bg-bg-muted/40 px-1.5 py-0.5 font-mono text-[10px]", children: formatDueRelative(bill.dueDate) })] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [_jsx("span", { className: "tabular-nums font-semibold text-amber-300", children: formatUsd(bill.amountUsd) }), _jsx("button", { type: "button", onClick: () => void onMarkBillPaid(bill), "aria-label": `Mark ${bill.merchant} paid`, className: "inline-flex h-7 w-7 items-center justify-center rounded-full border border-emerald-500/30 bg-emerald-500/10 text-emerald-200 hover:bg-emerald-500/20", title: "Mark this bill as paid", children: _jsx(CheckCircle2, { className: "h-3.5 w-3.5", "aria-hidden": true }) }), _jsx("button", { type: "button", onClick: () => void onSnoozeBill(bill), "aria-label": `Snooze ${bill.merchant} one week`, className: "inline-flex h-7 w-7 items-center justify-center rounded-full border border-border/30 bg-bg-muted/30 text-muted hover:bg-bg-muted/60 hover:text-txt", title: "Push the due date out a week", children: _jsx(Timer, { className: "h-3.5 w-3.5", "aria-hidden": true }) }), _jsx("button", { type: "button", onClick: () => onChatAboutBill(bill), "aria-label": `Open chat about ${bill.merchant}`, className: "inline-flex h-7 w-7 items-center justify-center rounded-full border border-border/30 bg-bg-muted/30 text-muted hover:bg-bg-muted/60 hover:text-txt", title: "Open chat about this bill", children: _jsx(MessageCircle, { className: "h-3.5 w-3.5", "aria-hidden": true }) })] })] }, bill.id))) }))] }), _jsxs("section", { className: "rounded-lg border border-border/20 bg-bg/30 p-3", children: [_jsx("header", { className: "mb-2 flex items-center justify-between", children: _jsx("h2", { className: "text-sm font-semibold", children: "Recurring charges" }) }), dash.recurring.length === 0 ? (_jsx("p", { className: "text-xs text-muted", children: "No recurring charges." })) : (_jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: "w-full min-w-[640px] text-xs", children: [_jsx("thead", { className: "text-left text-[11px] uppercase tracking-wide text-muted", children: _jsxs("tr", { children: [_jsx("th", { className: "py-1.5 pr-3 font-medium", children: "Merchant" }), _jsx("th", { className: "py-1.5 pr-3 font-medium", children: "Cadence" }), _jsx("th", { className: "py-1.5 pr-3 text-right font-medium", children: "Typical" }), _jsx("th", { className: "py-1.5 pr-3 text-right font-medium", children: "Annualized" }), _jsx("th", { className: "py-1.5 pr-3 font-medium", children: "Last charged" }), _jsx("th", { className: "py-1.5 font-medium", children: "Actions" })] }) }), _jsx("tbody", { children: dash.recurring.map((charge) => (_jsxs("tr", { className: "border-t border-border/10", children: [_jsx("td", { className: "py-1.5 pr-3 font-medium text-txt", children: charge.merchantDisplay }), _jsx("td", { className: "py-1.5 pr-3 text-muted", children: cadenceLabel(charge.cadence) }), _jsx("td", { className: "py-1.5 pr-3 text-right tabular-nums", children: formatUsd(charge.averageAmountUsd) }), _jsx("td", { className: "py-1.5 pr-3 text-right tabular-nums font-semibold text-rose-300", children: formatUsd(charge.annualizedCostUsd) }), _jsx("td", { className: "py-1.5 pr-3 text-muted", children: formatDate(charge.latestSeenAt) }), _jsxs("td", { className: "py-1.5 text-muted", children: [(() => {
343
+ const playbookKey = playbookHitsByMerchant.get(charge.merchantNormalized);
344
+ if (playbookKey) {
345
+ return (_jsx("button", { type: "button", onClick: () => void onCancelRecurringCharge(charge, playbookKey), "aria-label": `Cancel ${charge.merchantDisplay}`, className: "mr-1 inline-flex h-7 w-7 items-center justify-center rounded-full border border-rose-500/40 bg-rose-500/10 text-rose-200 hover:bg-rose-500/20", title: `Open the cancellation flow for ${charge.merchantDisplay}`, children: _jsx(Ban, { className: "h-3.5 w-3.5", "aria-hidden": true }) }));
346
+ }
347
+ return null;
348
+ })(), _jsx("button", { type: "button", onClick: () => onChatAboutRecurringCharge(charge), "aria-label": `Open chat about ${charge.merchantDisplay}`, className: "mr-1 inline-flex h-7 w-7 items-center justify-center rounded-full border border-border/30 bg-bg-muted/30 text-muted hover:bg-bg-muted/60 hover:text-txt", title: "Open chat with this recurring charge attached", children: _jsx(MessageCircle, { className: "h-3.5 w-3.5", "aria-hidden": true }) })] })] }, charge.merchantNormalized))) })] }) }))] }), dash.spending.topMerchants.length > 0 ? (_jsxs("section", { className: "rounded-lg border border-border/20 bg-bg/30 p-3", children: [_jsx("h2", { className: "mb-2 text-sm font-semibold", children: "Top merchants" }), _jsx("ul", { className: "grid grid-cols-1 gap-2 md:grid-cols-2", children: dash.spending.topMerchants.map((merchant) => (_jsxs("li", { className: "flex items-center justify-between rounded border border-border/10 bg-bg/40 px-2 py-1 text-xs", children: [_jsx("span", { className: "truncate text-txt/85", children: merchant.merchantDisplay }), _jsxs("span", { className: "tabular-nums text-muted", children: [formatUsd(merchant.totalUsd), " \u00B7 ", merchant.transactionCount, "\u00D7"] })] }, merchant.merchantNormalized))) })] })) : null, loading ? (_jsxs("div", { className: "flex items-center gap-2 text-[11px] text-muted", children: [_jsx(Loader2, { className: "h-3 w-3 animate-spin", "aria-hidden": true }), " Refreshing\u2026"] })) : null] }));
349
+ }
350
+ function Kpi(props) {
351
+ return (_jsxs("div", { className: "rounded-lg border border-border/20 bg-bg/30 px-3 py-3", children: [_jsxs("div", { className: "flex items-center gap-2 text-[11px] text-muted", children: [props.icon, _jsx("span", { children: props.label })] }), _jsx("div", { className: "mt-1 text-lg font-semibold tabular-nums", children: props.value })] }));
352
+ }
353
+ function CloudCreditsBalance(props) {
354
+ if (!props.connected) {
355
+ return (_jsxs("section", { className: "flex items-center justify-between gap-3 rounded-lg border border-border/20 bg-bg/30 px-4 py-3 text-xs text-muted", children: [_jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx(Sparkles, { className: "h-3.5 w-3.5", "aria-hidden": true }), "Eliza Cloud"] }), _jsx("a", { href: "#/settings", className: "font-medium text-txt underline-offset-2 hover:underline", children: "Settings" })] }));
356
+ }
357
+ const showLoading = props.balance === null;
358
+ const accentColor = props.critical
359
+ ? "text-rose-300"
360
+ : props.low
361
+ ? "text-amber-300"
362
+ : "text-emerald-300";
363
+ return (_jsxs("section", { className: "flex items-center justify-between gap-4 rounded-lg border border-border/20 bg-bg/40 px-4 py-3", title: "Eliza Cloud balance", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "rounded-md border border-border/30 bg-bg-muted/30 p-2 text-txt/80", children: _jsx(Sparkles, { className: "h-4 w-4", "aria-hidden": true }) }), _jsx("div", { children: showLoading ? (_jsx("div", { className: "mt-1 h-6 w-32 animate-pulse rounded bg-bg-muted/40" })) : (_jsx("div", { className: `text-2xl font-semibold tabular-nums ${accentColor}`, children: formatCredits(props.balance ?? 0) })) })] }), props.low && !showLoading ? (_jsx("span", { className: "h-2.5 w-2.5 rounded-full bg-amber-300 shadow-[0_0_0_3px_rgba(245,158,11,0.18)]", title: "Low balance" })) : null] }));
364
+ }
365
+ function CloudCreditsActivity(props) {
366
+ if (!props.connected)
367
+ return null;
368
+ const recent = (props.transactions ?? []).slice(0, 10);
369
+ return (_jsxs("section", { className: "rounded-lg border border-border/20 bg-bg/30 p-3", children: [_jsxs("header", { className: "mb-2 flex items-center justify-between", children: [_jsx("h2", { className: "text-sm font-semibold", children: "Credits" }), props.loading ? (_jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin text-muted", "aria-hidden": true })) : null] }), recent.length === 0 ? (_jsx("p", { className: "text-xs text-muted", children: props.loading ? "Loading…" : "No recent activity" })) : (_jsx("ul", { className: "space-y-1.5", children: recent.map((txn) => {
370
+ const isCredit = txn.amount >= 0;
371
+ return (_jsxs("li", { className: "flex items-center justify-between gap-2 rounded border border-border/10 bg-bg/40 px-2.5 py-1.5 text-xs", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "truncate font-medium text-txt/90", children: txn.description ?? (isCredit ? "Top-up" : "Usage") }), _jsx("div", { className: "mt-0.5 text-[11px] text-muted", children: formatRelative(txn.createdAt) })] }), _jsxs("span", { className: `shrink-0 tabular-nums font-semibold ${isCredit ? "text-emerald-300" : "text-rose-300"}`, children: [isCredit ? "+" : "−", formatCredits(Math.abs(txn.amount))] })] }, txn.id));
372
+ }) }))] }));
373
+ }
@@ -0,0 +1,9 @@
1
+ import type { LifeOpsSection } from "../hooks/useLifeOpsSection.js";
2
+ interface LifeOpsNavRailProps {
3
+ activeSection: LifeOpsSection;
4
+ onNavigate: (section: LifeOpsSection) => void;
5
+ collapsible?: boolean;
6
+ }
7
+ export declare function LifeOpsNavRail({ activeSection, onNavigate, collapsible, }: LifeOpsNavRailProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=LifeOpsNavRail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LifeOpsNavRail.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/components/LifeOpsNavRail.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,UAAU,mBAAmB;IAC3B,aAAa,EAAE,cAAc,CAAC;IAC9B,UAAU,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAsFD,wBAAgB,cAAc,CAAC,EAC7B,aAAa,EACb,UAAU,EACV,WAAkB,GACnB,EAAE,mBAAmB,2CA8FrB"}