@elizaos/agent 2.0.0-alpha.441 → 2.0.0-alpha.501
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.
- package/apps/app-companion/src/components/companion/CompanionAppView.d.ts.map +1 -1
- package/apps/app-companion/src/components/companion/CompanionAppView.js +6 -2
- package/apps/app-companion/src/components/companion/CompanionHeader.d.ts +3 -1
- package/apps/app-companion/src/components/companion/CompanionHeader.d.ts.map +1 -1
- package/apps/app-companion/src/components/companion/CompanionHeader.js +8 -2
- package/apps/app-companion/src/components/companion/CompanionPerformanceSettings.d.ts +2 -0
- package/apps/app-companion/src/components/companion/CompanionPerformanceSettings.d.ts.map +1 -0
- package/apps/app-companion/src/components/companion/CompanionPerformanceSettings.js +33 -0
- package/apps/app-companion/src/components/companion/CompanionSettingsPanel.d.ts +2 -0
- package/apps/app-companion/src/components/companion/CompanionSettingsPanel.d.ts.map +1 -0
- package/apps/app-companion/src/components/companion/CompanionSettingsPanel.js +7 -0
- package/apps/app-companion/src/components/companion/CompanionShell.d.ts.map +1 -1
- package/apps/app-companion/src/components/companion/CompanionShell.js +1 -1
- package/apps/app-companion/src/components/companion/CompanionView.d.ts.map +1 -1
- package/apps/app-companion/src/components/companion/CompanionView.js +6 -2
- package/apps/app-companion/src/types/render-modes.d.ts +4 -0
- package/apps/app-companion/src/types/render-modes.d.ts.map +1 -0
- package/apps/app-companion/src/types/render-modes.js +6 -0
- package/apps/app-elizamaker/src/drop-routes.d.ts.map +1 -1
- package/apps/app-elizamaker/src/drop-service.d.ts +1 -1
- package/apps/app-elizamaker/src/drop-service.d.ts.map +1 -1
- package/apps/app-elizamaker/src/og-tracker.d.ts.map +1 -1
- package/apps/app-elizamaker/src/og-tracker.js +1 -1
- package/apps/app-elizamaker/src/twitter-verify.js +1 -1
- package/apps/app-lifeops/src/actions/website-blocker.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/website-blocker.js +18 -16
- package/apps/app-lifeops/src/api/client-lifeops.d.ts +37 -75
- package/apps/app-lifeops/src/api/client-lifeops.d.ts.map +1 -1
- package/apps/app-lifeops/src/api/client-lifeops.js +119 -0
- package/apps/app-lifeops/src/inbox/channel-deep-links.d.ts +2 -4
- package/apps/app-lifeops/src/inbox/channel-deep-links.d.ts.map +1 -1
- package/apps/app-lifeops/src/inbox/channel-deep-links.js +8 -38
- package/apps/app-lifeops/src/inbox/message-fetcher.d.ts +1 -1
- package/apps/app-lifeops/src/inbox/message-fetcher.d.ts.map +1 -1
- package/apps/app-lifeops/src/inbox/message-fetcher.js +180 -77
- package/apps/app-lifeops/src/inbox/types.d.ts +1 -1
- package/apps/app-lifeops/src/inbox/types.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/browser-extension-store.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/browser-readiness.d.ts +16 -0
- package/apps/app-lifeops/src/lifeops/browser-readiness.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/browser-readiness.js +74 -0
- package/apps/app-lifeops/src/lifeops/browser-session-lifecycle.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/browser-session-lifecycle.js +1 -1
- package/apps/app-lifeops/src/lifeops/checkin/checkin-service.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/defaults.d.ts +1 -1
- package/apps/app-lifeops/src/lifeops/defaults.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/discord-desktop-cdp.d.ts +16 -0
- package/apps/app-lifeops/src/lifeops/discord-desktop-cdp.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/discord-desktop-cdp.js +217 -1
- package/apps/app-lifeops/src/lifeops/email-unsubscribe-gmail.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/email-unsubscribe-gmail.js +8 -3
- package/apps/app-lifeops/src/lifeops/feature-flags.types.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/goal-semantic-evaluator.js +1 -1
- package/apps/app-lifeops/src/lifeops/google-calendar.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-calendar.js +24 -31
- package/apps/app-lifeops/src/lifeops/google-drive.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-drive.js +7 -1
- package/apps/app-lifeops/src/lifeops/google-fetch.d.ts +1 -1
- package/apps/app-lifeops/src/lifeops/google-fetch.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-fetch.js +4 -6
- package/apps/app-lifeops/src/lifeops/google-gmail.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-gmail.js +50 -34
- package/apps/app-lifeops/src/lifeops/health-bridge.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/health-bridge.js +53 -10
- package/apps/app-lifeops/src/lifeops/health-connectors.d.ts +23 -0
- package/apps/app-lifeops/src/lifeops/health-connectors.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/health-connectors.js +962 -0
- package/apps/app-lifeops/src/lifeops/health-oauth.d.ts +62 -0
- package/apps/app-lifeops/src/lifeops/health-oauth.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/health-oauth.js +496 -0
- package/apps/app-lifeops/src/lifeops/payment-csv-import.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/payment-csv-import.js +1 -5
- package/apps/app-lifeops/src/lifeops/payment-recurrence.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/payment-recurrence.js +2 -1
- package/apps/app-lifeops/src/lifeops/payment-types.d.ts +8 -7
- package/apps/app-lifeops/src/lifeops/payment-types.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/priority-scoring.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/repository.d.ts +46 -10
- package/apps/app-lifeops/src/lifeops/repository.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/repository.js +683 -65
- package/apps/app-lifeops/src/lifeops/schedule-insight.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/schedule-insight.js +2 -3
- package/apps/app-lifeops/src/lifeops/schema.d.ts +6403 -3831
- package/apps/app-lifeops/src/lifeops/schema.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/schema.js +105 -18
- package/apps/app-lifeops/src/lifeops/seed-routines.d.ts +1 -1
- package/apps/app-lifeops/src/lifeops/seed-routines.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/seed-routines.js +7 -2
- package/apps/app-lifeops/src/lifeops/service-constants.d.ts +15 -0
- package/apps/app-lifeops/src/lifeops/service-constants.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-constants.js +21 -3
- package/apps/app-lifeops/src/lifeops/service-helpers-browser.d.ts +1 -1
- package/apps/app-lifeops/src/lifeops/service-helpers-browser.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-helpers-browser.js +1 -1
- package/apps/app-lifeops/src/lifeops/service-helpers-misc.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-helpers-misc.js +5 -5
- package/apps/app-lifeops/src/lifeops/service-helpers-occurrence.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-helpers-occurrence.js +1 -1
- package/apps/app-lifeops/src/lifeops/service-helpers-reminder.d.ts +48 -1
- package/apps/app-lifeops/src/lifeops/service-helpers-reminder.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-helpers-reminder.js +191 -17
- package/apps/app-lifeops/src/lifeops/service-mixin-browser.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-browser.js +10 -7
- package/apps/app-lifeops/src/lifeops/service-mixin-calendar.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-calendar.js +4 -11
- package/apps/app-lifeops/src/lifeops/service-mixin-core.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-core.js +5 -2
- package/apps/app-lifeops/src/lifeops/service-mixin-definitions.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-definitions.js +7 -6
- package/apps/app-lifeops/src/lifeops/service-mixin-discord.js +237 -32
- package/apps/app-lifeops/src/lifeops/service-mixin-drive.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-drive.js +6 -5
- package/apps/app-lifeops/src/lifeops/service-mixin-gmail.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-gmail.js +86 -31
- package/apps/app-lifeops/src/lifeops/service-mixin-goals.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-goals.js +14 -15
- package/apps/app-lifeops/src/lifeops/service-mixin-google.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-google.js +71 -51
- package/apps/app-lifeops/src/lifeops/service-mixin-health.js +528 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-imessage.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-imessage.js +94 -6
- package/apps/app-lifeops/src/lifeops/service-mixin-inbox.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-inbox.js +9 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-payments.d.ts +3 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-payments.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-payments.js +93 -26
- package/apps/app-lifeops/src/lifeops/service-mixin-reminders.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-reminders.js +331 -167
- package/apps/app-lifeops/src/lifeops/service-mixin-scheduling.js +5 -10
- package/apps/app-lifeops/src/lifeops/service-mixin-screentime.js +372 -10
- package/apps/app-lifeops/src/lifeops/service-mixin-signal.js +179 -43
- package/apps/app-lifeops/src/lifeops/service-mixin-sleep.js +31 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-status.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-status.js +82 -13
- package/apps/app-lifeops/src/lifeops/service-mixin-subscriptions.js +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-telegram.js +59 -12
- package/apps/app-lifeops/src/lifeops/service-mixin-whatsapp.js +165 -22
- package/apps/app-lifeops/src/lifeops/service-mixin-workflows.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-workflows.js +3 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-calendar.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-normalize-calendar.js +4 -4
- package/apps/app-lifeops/src/lifeops/service-normalize-gmail.d.ts +3 -1
- package/apps/app-lifeops/src/lifeops/service-normalize-gmail.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-normalize-gmail.js +5 -3
- package/apps/app-lifeops/src/lifeops/service-normalize-health.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-normalize-health.js +4 -3
- package/apps/app-lifeops/src/lifeops/service-normalize-task.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-normalize-task.js +10 -1
- package/apps/app-lifeops/src/lifeops/service-normalize.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-normalize.js +3 -3
- package/apps/app-lifeops/src/lifeops/service-types.d.ts +1 -1
- package/apps/app-lifeops/src/lifeops/service-types.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service.d.ts +92 -166
- package/apps/app-lifeops/src/lifeops/service.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service.js +2 -2
- package/apps/app-lifeops/src/lifeops/signal-auth.d.ts +7 -0
- package/apps/app-lifeops/src/lifeops/signal-auth.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/signal-auth.js +50 -6
- package/apps/app-lifeops/src/lifeops/signal-local-client.d.ts +7 -0
- package/apps/app-lifeops/src/lifeops/signal-local-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/signal-local-client.js +95 -4
- package/apps/app-lifeops/src/lifeops/sleep-cycle.d.ts +7 -1
- package/apps/app-lifeops/src/lifeops/sleep-cycle.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/sleep-cycle.js +16 -6
- package/apps/app-lifeops/src/lifeops/sleep-episode-store.d.ts +2 -1
- package/apps/app-lifeops/src/lifeops/sleep-episode-store.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/sleep-episode-store.js +7 -3
- package/apps/app-lifeops/src/lifeops/social-taxonomy.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/social-taxonomy.js +68 -16
- package/apps/app-lifeops/src/lifeops/subscriptions-playbooks.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/subscriptions-playbooks.js +24 -14
- package/apps/app-lifeops/src/lifeops/subscriptions-types.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/telegram-auth.d.ts +8 -1
- package/apps/app-lifeops/src/lifeops/telegram-auth.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/telegram-auth.js +44 -5
- package/apps/app-lifeops/src/lifeops/telegram-local-client.d.ts +1 -0
- package/apps/app-lifeops/src/lifeops/telegram-local-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/telegram-local-client.js +141 -7
- package/apps/app-lifeops/src/lifeops/twilio.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/twilio.js +3 -1
- package/apps/app-lifeops/src/lifeops/whatsapp-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/whatsapp-client.js +7 -4
- package/apps/app-lifeops/src/lifeops/x-poster.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/x-poster.js +3 -1
- package/apps/app-lifeops/src/lifeops/x-reader.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/x-reader.js +10 -3
- package/apps/app-lifeops/src/providers/website-blocker.js +2 -2
- package/apps/app-lifeops/src/public.d.ts +2 -2
- package/apps/app-lifeops/src/public.d.ts.map +1 -1
- package/apps/app-lifeops/src/public.js +2 -2
- package/apps/app-lifeops/src/routes/lifeops-routes.d.ts.map +1 -1
- package/apps/app-lifeops/src/routes/lifeops-routes.js +327 -92
- package/apps/app-lifeops/src/routes/plugin.d.ts.map +1 -1
- package/apps/app-lifeops/src/routes/plugin.js +79 -50
- package/apps/app-lifeops/src/routes/sleep-routes.d.ts.map +1 -1
- package/apps/app-lifeops/src/website-blocker/access.d.ts +1 -1
- package/apps/app-lifeops/src/website-blocker/access.d.ts.map +1 -1
- package/apps/app-lifeops/src/website-blocker/access.js +13 -9
- package/apps/app-lifeops/src/website-blocker/engine.d.ts.map +1 -1
- package/apps/app-lifeops/src/website-blocker/engine.js +23 -2
- package/apps/app-lifeops/src/website-blocker/public.d.ts +4 -4
- package/apps/app-lifeops/src/website-blocker/public.d.ts.map +1 -1
- package/apps/app-lifeops/src/website-blocker/public.js +2 -2
- package/apps/app-lifeops/src/website-blocker/roles.d.ts +2 -4
- package/apps/app-lifeops/src/website-blocker/roles.d.ts.map +1 -1
- package/apps/app-lifeops/src/website-blocker/roles.js +1 -4
- package/apps/app-steward/src/actions/check-balance.d.ts.map +1 -1
- package/apps/app-steward/src/actions/wallet-action-shared.d.ts.map +1 -1
- package/apps/app-steward/src/actions/wallet-action-shared.js +1 -1
- package/apps/app-steward/src/api/wallet-evm-balance.d.ts.map +1 -1
- package/apps/app-steward/src/browser-workspace-wallet.d.ts +15 -1
- package/apps/app-steward/src/browser-workspace-wallet.d.ts.map +1 -1
- package/apps/app-steward/src/browser-workspace-wallet.js +7 -1
- package/apps/app-steward/src/index.d.ts +4 -4
- package/apps/app-steward/src/index.d.ts.map +1 -1
- package/apps/app-steward/src/index.js +4 -4
- package/apps/app-steward/src/routes/steward-bridge.d.ts.map +1 -1
- package/apps/app-steward/src/routes/steward-bridge.js +1 -1
- package/apps/app-steward/src/routes/wallet-browser-compat-routes.d.ts.map +1 -1
- package/apps/app-steward/src/routes/wallet-browser-compat-routes.js +88 -1
- package/apps/app-training/src/backends/atropos.d.ts.map +1 -1
- package/apps/app-training/src/backends/atropos.js +2 -2
- package/apps/app-training/src/backends/native.d.ts +1 -1
- package/apps/app-training/src/backends/native.d.ts.map +1 -1
- package/apps/app-training/src/backends/tinker.d.ts.map +1 -1
- package/apps/app-training/src/core/index.d.ts +5 -5
- package/apps/app-training/src/core/index.d.ts.map +1 -1
- package/apps/app-training/src/core/index.js +4 -4
- package/apps/app-training/src/core/privacy-filter.d.ts.map +1 -1
- package/apps/app-training/src/core/training-orchestrator.d.ts.map +1 -1
- package/apps/app-training/src/optimizers/bootstrap-fewshot.d.ts.map +1 -1
- package/apps/app-training/src/optimizers/bootstrap-fewshot.js +7 -3
- package/apps/app-training/src/optimizers/index.d.ts +4 -4
- package/apps/app-training/src/optimizers/index.d.ts.map +1 -1
- package/apps/app-training/src/optimizers/index.js +2 -2
- package/apps/app-training/src/optimizers/instruction-search.d.ts.map +1 -1
- package/apps/app-training/src/optimizers/instruction-search.js +6 -1
- package/apps/app-training/src/optimizers/prompt-evolution.d.ts.map +1 -1
- package/apps/app-training/src/optimizers/prompt-evolution.js +6 -1
- package/apps/app-training/src/optimizers/scoring.d.ts +5 -7
- package/apps/app-training/src/optimizers/scoring.d.ts.map +1 -1
- package/apps/app-training/src/optimizers/types.d.ts.map +1 -1
- package/apps/app-training/src/routes/index.d.ts +1 -1
- package/apps/app-training/src/routes/index.d.ts.map +1 -1
- package/apps/app-training/src/routes/index.js +1 -1
- package/apps/app-training/src/services/index.d.ts +3 -3
- package/apps/app-training/src/services/index.d.ts.map +1 -1
- package/apps/app-training/src/services/index.js +2 -2
- package/apps/app-training/src/services/training-trigger.d.ts.map +1 -1
- package/package.json +4 -4
- package/packages/agent/src/actions/browser-session.d.ts.map +1 -1
- package/packages/agent/src/actions/browser-session.js +73 -5
- package/packages/agent/src/actions/extract-page.d.ts.map +1 -1
- package/packages/agent/src/actions/extract-page.js +11 -3
- package/packages/agent/src/actions/launchpad-launch.d.ts +16 -0
- package/packages/agent/src/actions/launchpad-launch.d.ts.map +1 -0
- package/packages/agent/src/actions/launchpad-launch.js +207 -0
- package/packages/agent/src/actions/logs.d.ts.map +1 -1
- package/packages/agent/src/actions/logs.js +19 -2
- package/packages/agent/src/actions/manage-tasks.d.ts.map +1 -1
- package/packages/agent/src/actions/manage-tasks.js +55 -0
- package/packages/agent/src/actions/page-action-groups.d.ts +17 -0
- package/packages/agent/src/actions/page-action-groups.d.ts.map +1 -0
- package/packages/agent/src/actions/page-action-groups.js +171 -0
- package/packages/agent/src/actions/scratchpad.d.ts.map +1 -1
- package/packages/agent/src/actions/scratchpad.js +17 -2
- package/packages/agent/src/actions/web-search.d.ts.map +1 -1
- package/packages/agent/src/actions/web-search.js +10 -2
- package/packages/agent/src/api/accounts-routes.d.ts.map +1 -1
- package/packages/agent/src/api/accounts-routes.js +8 -10
- package/packages/agent/src/api/chat-augmentation.d.ts.map +1 -1
- package/packages/agent/src/api/chat-augmentation.js +18 -6
- package/packages/agent/src/api/cloud-relay-routes.d.ts.map +1 -1
- package/packages/agent/src/api/cloud-relay-routes.js +3 -2
- package/packages/agent/src/api/cloud-routes.d.ts +3 -0
- package/packages/agent/src/api/cloud-routes.d.ts.map +1 -1
- package/packages/agent/src/api/cloud-routes.js +54 -1
- package/packages/agent/src/api/cloud-status-routes.d.ts.map +1 -1
- package/packages/agent/src/api/cloud-status-routes.js +25 -15
- package/packages/agent/src/api/connector-routes.d.ts +8 -0
- package/packages/agent/src/api/connector-routes.d.ts.map +1 -1
- package/packages/agent/src/api/connector-routes.js +25 -1
- package/packages/agent/src/api/experience-routes.d.ts.map +1 -1
- package/packages/agent/src/api/experience-routes.js +57 -0
- package/packages/agent/src/api/index.d.ts +1 -1
- package/packages/agent/src/api/index.d.ts.map +1 -1
- package/packages/agent/src/api/index.js +5 -5
- package/packages/agent/src/api/provider-switch-config.d.ts +4 -1
- package/packages/agent/src/api/provider-switch-config.d.ts.map +1 -1
- package/packages/agent/src/api/provider-switch-config.js +8 -1
- package/packages/agent/src/api/provider-switch-routes.d.ts +7 -1
- package/packages/agent/src/api/provider-switch-routes.d.ts.map +1 -1
- package/packages/agent/src/api/provider-switch-routes.js +62 -27
- package/packages/agent/src/api/runtime-plugin-routes.d.ts +5 -0
- package/packages/agent/src/api/runtime-plugin-routes.d.ts.map +1 -1
- package/packages/agent/src/api/runtime-plugin-routes.js +13 -0
- package/packages/agent/src/api/server-helpers-auth.d.ts.map +1 -1
- package/packages/agent/src/api/server-helpers-auth.js +7 -0
- package/packages/agent/src/api/server.d.ts.map +1 -1
- package/packages/agent/src/api/server.js +73 -11
- package/packages/agent/src/api/subscription-routes.d.ts.map +1 -1
- package/packages/agent/src/api/subscription-routes.js +6 -2
- package/packages/agent/src/auth/credentials.d.ts.map +1 -1
- package/packages/agent/src/auth/credentials.js +6 -2
- package/packages/agent/src/autonomy/index.d.ts.map +1 -1
- package/packages/agent/src/autonomy/index.js +5 -3
- package/packages/agent/src/bin.js +25 -0
- package/packages/agent/src/cli/index.d.ts.map +1 -1
- package/packages/agent/src/cli/index.js +17 -1
- package/packages/agent/src/cloud/cloud-manager.d.ts +1 -0
- package/packages/agent/src/cloud/cloud-manager.d.ts.map +1 -1
- package/packages/agent/src/cloud/cloud-manager.js +9 -0
- package/packages/agent/src/providers/page-scoped-context.d.ts.map +1 -1
- package/packages/agent/src/providers/page-scoped-context.js +48 -8
- package/packages/agent/src/runtime/aosp-llama-adapter.d.ts +193 -0
- package/packages/agent/src/runtime/aosp-llama-adapter.d.ts.map +1 -0
- package/packages/agent/src/runtime/aosp-llama-adapter.js +938 -0
- package/packages/agent/src/runtime/aosp-local-inference-bootstrap.d.ts +42 -0
- package/packages/agent/src/runtime/aosp-local-inference-bootstrap.d.ts.map +1 -0
- package/packages/agent/src/runtime/aosp-local-inference-bootstrap.js +299 -0
- package/packages/agent/src/runtime/core-plugins.d.ts +20 -0
- package/packages/agent/src/runtime/core-plugins.d.ts.map +1 -1
- package/packages/agent/src/runtime/core-plugins.js +22 -2
- package/packages/agent/src/runtime/discord-local-plugin.d.ts.map +1 -1
- package/packages/agent/src/runtime/discord-local-plugin.js +36 -0
- package/packages/agent/src/runtime/eliza-plugin.d.ts.map +1 -1
- package/packages/agent/src/runtime/eliza-plugin.js +9 -0
- package/packages/agent/src/runtime/eliza.d.ts.map +1 -1
- package/packages/agent/src/runtime/eliza.js +18 -8
- package/packages/agent/src/runtime/first-time-setup.d.ts +1 -0
- package/packages/agent/src/runtime/first-time-setup.d.ts.map +1 -1
- package/packages/agent/src/runtime/first-time-setup.js +1 -0
- package/packages/agent/src/runtime/operations/classifier.d.ts +36 -0
- package/packages/agent/src/runtime/operations/classifier.d.ts.map +1 -0
- package/packages/agent/src/runtime/operations/classifier.js +72 -0
- package/packages/agent/src/runtime/operations/cold-strategy.d.ts +19 -0
- package/packages/agent/src/runtime/operations/cold-strategy.d.ts.map +1 -0
- package/packages/agent/src/runtime/operations/cold-strategy.js +83 -0
- package/packages/agent/src/runtime/operations/health-checks.d.ts +24 -0
- package/packages/agent/src/runtime/operations/health-checks.d.ts.map +1 -0
- package/packages/agent/src/runtime/operations/health-checks.js +186 -0
- package/packages/agent/src/runtime/operations/health.d.ts +32 -0
- package/packages/agent/src/runtime/operations/health.d.ts.map +1 -0
- package/packages/agent/src/runtime/operations/health.js +151 -0
- package/packages/agent/src/runtime/operations/index.d.ts +16 -0
- package/packages/agent/src/runtime/operations/index.d.ts.map +1 -0
- package/packages/agent/src/runtime/operations/index.js +14 -0
- package/packages/agent/src/runtime/operations/manager.d.ts +68 -0
- package/packages/agent/src/runtime/operations/manager.d.ts.map +1 -0
- package/packages/agent/src/runtime/operations/manager.js +182 -0
- package/packages/agent/src/runtime/operations/reload-hot.d.ts +40 -0
- package/packages/agent/src/runtime/operations/reload-hot.d.ts.map +1 -0
- package/packages/agent/src/runtime/operations/reload-hot.js +176 -0
- package/packages/agent/src/runtime/operations/repository.d.ts +44 -0
- package/packages/agent/src/runtime/operations/repository.d.ts.map +1 -0
- package/packages/agent/src/runtime/operations/repository.js +233 -0
- package/packages/agent/src/runtime/operations/types.d.ts +201 -0
- package/packages/agent/src/runtime/operations/types.d.ts.map +1 -0
- package/packages/agent/src/runtime/operations/types.js +30 -0
- package/packages/agent/src/runtime/plugin-collector.d.ts.map +1 -1
- package/packages/agent/src/runtime/plugin-collector.js +47 -7
- package/packages/agent/src/runtime/plugin-role-gating.d.ts.map +1 -1
- package/packages/agent/src/runtime/plugin-role-gating.js +42 -9
- package/packages/agent/src/runtime/restart.d.ts +14 -38
- package/packages/agent/src/runtime/restart.d.ts.map +1 -1
- package/packages/agent/src/runtime/restart.js +14 -39
- package/packages/agent/src/services/browser-workspace-desktop.d.ts.map +1 -1
- package/packages/agent/src/services/browser-workspace-desktop.js +107 -0
- package/packages/agent/src/services/browser-workspace-types.d.ts +7 -1
- package/packages/agent/src/services/browser-workspace-types.d.ts.map +1 -1
- package/packages/agent/src/services/browser-workspace.d.ts.map +1 -1
- package/packages/agent/src/services/browser-workspace.js +7 -0
- package/packages/agent/src/services/index.d.ts +1 -0
- package/packages/agent/src/services/index.d.ts.map +1 -1
- package/packages/agent/src/services/index.js +1 -0
- package/packages/agent/src/services/launchpads/image-generator.d.ts +22 -0
- package/packages/agent/src/services/launchpads/image-generator.d.ts.map +1 -0
- package/packages/agent/src/services/launchpads/image-generator.js +46 -0
- package/packages/agent/src/services/launchpads/launchpad-engine.d.ts +32 -0
- package/packages/agent/src/services/launchpads/launchpad-engine.d.ts.map +1 -0
- package/packages/agent/src/services/launchpads/launchpad-engine.js +191 -0
- package/packages/agent/src/services/launchpads/launchpad-types.d.ts +116 -0
- package/packages/agent/src/services/launchpads/launchpad-types.d.ts.map +1 -0
- package/packages/agent/src/services/launchpads/launchpad-types.js +19 -0
- package/packages/agent/src/services/launchpads/metadata-generator.d.ts +24 -0
- package/packages/agent/src/services/launchpads/metadata-generator.d.ts.map +1 -0
- package/packages/agent/src/services/launchpads/metadata-generator.js +96 -0
- package/packages/agent/src/services/launchpads/profiles/flap-sh.d.ts +25 -0
- package/packages/agent/src/services/launchpads/profiles/flap-sh.d.ts.map +1 -0
- package/packages/agent/src/services/launchpads/profiles/flap-sh.js +80 -0
- package/packages/agent/src/services/launchpads/profiles/four-meme.d.ts +11 -0
- package/packages/agent/src/services/launchpads/profiles/four-meme.d.ts.map +1 -0
- package/packages/agent/src/services/launchpads/profiles/four-meme.js +70 -0
- package/packages/agent/src/services/registry-client.js +1 -1
- package/packages/agent/src/services/research-task-executor.d.ts.map +1 -1
- package/packages/agent/src/services/research-task-executor.js +3 -1
- package/packages/app-core/src/App.d.ts.map +1 -1
- package/packages/app-core/src/App.js +6 -8
- package/packages/app-core/src/api/auth/sessions.js +1 -1
- package/packages/app-core/src/api/auth/tokens.d.ts +3 -0
- package/packages/app-core/src/api/auth/tokens.d.ts.map +1 -0
- package/packages/app-core/src/api/auth/tokens.js +13 -0
- package/packages/app-core/src/api/auth.d.ts +1 -3
- package/packages/app-core/src/api/auth.d.ts.map +1 -1
- package/packages/app-core/src/api/auth.js +2 -16
- package/packages/app-core/src/api/client-agent.d.ts +14 -3
- package/packages/app-core/src/api/client-agent.d.ts.map +1 -1
- package/packages/app-core/src/api/client-agent.js +74 -1
- package/packages/app-core/src/api/client-base.d.ts.map +1 -1
- package/packages/app-core/src/api/client-base.js +34 -2
- package/packages/app-core/src/api/client-cloud.d.ts +5 -1
- package/packages/app-core/src/api/client-cloud.d.ts.map +1 -1
- package/packages/app-core/src/api/client-cloud.js +9 -2
- package/packages/app-core/src/api/client-types-chat.d.ts +8 -0
- package/packages/app-core/src/api/client-types-chat.d.ts.map +1 -1
- package/packages/app-core/src/api/client-types-cloud.d.ts +2 -0
- package/packages/app-core/src/api/client-types-cloud.d.ts.map +1 -1
- package/packages/app-core/src/api/client-types-config.d.ts +1 -1
- package/packages/app-core/src/api/client-types-config.d.ts.map +1 -1
- package/packages/app-core/src/api/client-types-core.d.ts +1 -1
- package/packages/app-core/src/api/client-types-core.d.ts.map +1 -1
- package/packages/app-core/src/api/client-types-experience.d.ts +50 -0
- package/packages/app-core/src/api/client-types-experience.d.ts.map +1 -1
- package/packages/app-core/src/api/client-wallet.d.ts +7 -1
- package/packages/app-core/src/api/client-wallet.d.ts.map +1 -1
- package/packages/app-core/src/api/client-wallet.js +6 -0
- package/packages/app-core/src/components/accounts/AccountCard.d.ts.map +1 -1
- package/packages/app-core/src/components/accounts/AccountCard.js +5 -3
- package/packages/app-core/src/components/accounts/AccountList.d.ts.map +1 -1
- package/packages/app-core/src/components/accounts/AccountList.js +1 -9
- package/packages/app-core/src/components/accounts/AddAccountDialog.d.ts.map +1 -1
- package/packages/app-core/src/components/accounts/AddAccountDialog.js +2 -27
- package/packages/app-core/src/components/accounts/RotationStrategyPicker.d.ts.map +1 -1
- package/packages/app-core/src/components/accounts/RotationStrategyPicker.js +0 -5
- package/packages/app-core/src/components/apps/AppsCatalogGrid.js +1 -1
- package/packages/app-core/src/components/apps/app-identity.d.ts +8 -0
- package/packages/app-core/src/components/apps/app-identity.d.ts.map +1 -1
- package/packages/app-core/src/components/apps/app-identity.js +23 -2
- package/packages/app-core/src/components/apps/catalog-loader.d.ts.map +1 -1
- package/packages/app-core/src/components/apps/catalog-loader.js +10 -1
- package/packages/app-core/src/components/apps/helpers.d.ts +5 -2
- package/packages/app-core/src/components/apps/helpers.d.ts.map +1 -1
- package/packages/app-core/src/components/apps/helpers.js +14 -3
- package/packages/app-core/src/components/apps/overlay-app-registry.d.ts.map +1 -1
- package/packages/app-core/src/components/apps/overlay-app-registry.js +13 -2
- package/packages/app-core/src/components/character/CharacterExperienceWorkspace.d.ts.map +1 -1
- package/packages/app-core/src/components/character/CharacterExperienceWorkspace.js +220 -3
- package/packages/app-core/src/components/character/character-hub-helpers.d.ts.map +1 -1
- package/packages/app-core/src/components/character/character-hub-helpers.js +4 -0
- package/packages/app-core/src/components/character/character-hub-types.d.ts +4 -0
- package/packages/app-core/src/components/character/character-hub-types.d.ts.map +1 -1
- package/packages/app-core/src/components/chat/AppsSection.d.ts.map +1 -1
- package/packages/app-core/src/components/chat/AppsSection.js +24 -1
- package/packages/app-core/src/components/chat/TasksEventsPanel.d.ts.map +1 -1
- package/packages/app-core/src/components/chat/TasksEventsPanel.js +1 -1
- package/packages/app-core/src/components/connectors/ConnectorModeSelector.d.ts +35 -0
- package/packages/app-core/src/components/connectors/ConnectorModeSelector.d.ts.map +1 -0
- package/packages/app-core/src/components/connectors/ConnectorModeSelector.js +150 -0
- package/packages/app-core/src/components/conversations/ConversationsSidebar.d.ts.map +1 -1
- package/packages/app-core/src/components/conversations/ConversationsSidebar.js +8 -6
- package/packages/app-core/src/components/custom-actions/custom-action-form.d.ts +1 -1
- package/packages/app-core/src/components/custom-actions/custom-action-form.d.ts.map +1 -1
- package/packages/app-core/src/components/custom-actions/custom-action-form.js +1 -1
- package/packages/app-core/src/components/local-inference/LocalInferencePanel.d.ts.map +1 -1
- package/packages/app-core/src/components/local-inference/LocalInferencePanel.js +1 -3
- package/packages/app-core/src/components/local-inference/ProvidersList.d.ts +0 -13
- package/packages/app-core/src/components/local-inference/ProvidersList.d.ts.map +1 -1
- package/packages/app-core/src/components/local-inference/ProvidersList.js +10 -21
- package/packages/app-core/src/components/local-inference/RoutingMatrix.d.ts +0 -11
- package/packages/app-core/src/components/local-inference/RoutingMatrix.d.ts.map +1 -1
- package/packages/app-core/src/components/local-inference/RoutingMatrix.js +21 -18
- package/packages/app-core/src/components/local-inference/SlotAssignments.d.ts.map +1 -1
- package/packages/app-core/src/components/local-inference/SlotAssignments.js +11 -11
- package/packages/app-core/src/components/onboarding/BootstrapStep.d.ts +5 -2
- package/packages/app-core/src/components/onboarding/BootstrapStep.d.ts.map +1 -1
- package/packages/app-core/src/components/onboarding/BootstrapStep.js +54 -6
- package/packages/app-core/src/components/pages/AppDetailsView.d.ts +4 -6
- package/packages/app-core/src/components/pages/AppDetailsView.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/AppDetailsView.js +109 -54
- package/packages/app-core/src/components/pages/AppsView.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/AppsView.js +33 -53
- package/packages/app-core/src/components/pages/AutomationsView.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/AutomationsView.js +6 -22
- package/packages/app-core/src/components/pages/BrowserWorkspaceView.d.ts +14 -0
- package/packages/app-core/src/components/pages/BrowserWorkspaceView.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/BrowserWorkspaceView.js +462 -45
- package/packages/app-core/src/components/pages/ChatView.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/ChatView.js +1 -1
- package/packages/app-core/src/components/pages/ConfigPageView.js +2 -2
- package/packages/app-core/src/components/pages/InventoryView.js +4 -4
- package/packages/app-core/src/components/pages/KnowledgeView.js +1 -1
- package/packages/app-core/src/components/pages/LogsView.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/LogsView.js +0 -4
- package/packages/app-core/src/components/pages/SecretsView.js +1 -1
- package/packages/app-core/src/components/pages/SettingsView.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/SettingsView.js +76 -176
- package/packages/app-core/src/components/pages/WorkflowGraphViewer.js +1 -1
- package/packages/app-core/src/components/pages/page-scoped-conversations.d.ts +1 -1
- package/packages/app-core/src/components/pages/page-scoped-conversations.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/page-scoped-conversations.js +62 -7
- package/packages/app-core/src/components/pages/plugin-list-utils.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/plugin-list-utils.js +0 -1
- package/packages/app-core/src/components/pages/plugin-view-connectors.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/plugin-view-connectors.js +12 -4
- package/packages/app-core/src/components/pages/useBrowserWorkspaceWalletBridge.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/useBrowserWorkspaceWalletBridge.js +41 -0
- package/packages/app-core/src/components/settings/AppearanceSettingsSection.d.ts.map +1 -1
- package/packages/app-core/src/components/settings/AppearanceSettingsSection.js +3 -42
- package/packages/app-core/src/components/settings/ProviderSwitcher.d.ts.map +1 -1
- package/packages/app-core/src/components/settings/ProviderSwitcher.js +74 -39
- package/packages/app-core/src/components/settings/SubscriptionStatus.d.ts.map +1 -1
- package/packages/app-core/src/components/settings/SubscriptionStatus.js +2 -2
- package/packages/app-core/src/components/settings/permission-controls.d.ts.map +1 -1
- package/packages/app-core/src/components/settings/permission-controls.js +41 -7
- package/packages/app-core/src/components/shell/BugReportModal.js +2 -2
- package/packages/app-core/src/components/shell/CommandPalette.d.ts.map +1 -1
- package/packages/app-core/src/components/shell/CommandPalette.js +3 -3
- package/packages/app-core/src/components/shell/Header.js +2 -2
- package/packages/app-core/src/components/shell/RuntimeGate.d.ts.map +1 -1
- package/packages/app-core/src/components/shell/RuntimeGate.js +309 -57
- package/packages/app-core/src/components/shell/StartupShell.js +2 -2
- package/packages/app-core/src/components/workspace/AppWorkspaceChrome.js +2 -2
- package/packages/app-core/src/config/boot-config-store.d.ts +35 -6
- package/packages/app-core/src/config/boot-config-store.d.ts.map +1 -1
- package/packages/app-core/src/hooks/useAccounts.d.ts +1 -1
- package/packages/app-core/src/hooks/useAccounts.d.ts.map +1 -1
- package/packages/app-core/src/hooks/voice-chat-playback.d.ts.map +1 -1
- package/packages/app-core/src/hooks/voice-chat-playback.js +2 -2
- package/packages/app-core/src/i18n/locales/en.json +229 -210
- package/packages/app-core/src/i18n/locales/es.json +255 -236
- package/packages/app-core/src/i18n/locales/ko.json +255 -236
- package/packages/app-core/src/i18n/locales/pt.json +255 -236
- package/packages/app-core/src/i18n/locales/tl.json +254 -235
- package/packages/app-core/src/i18n/locales/vi.json +255 -236
- package/packages/app-core/src/i18n/locales/zh-CN.json +255 -236
- package/packages/app-core/src/onboarding/mobile-runtime-mode.d.ts +1 -1
- package/packages/app-core/src/onboarding/mobile-runtime-mode.d.ts.map +1 -1
- package/packages/app-core/src/onboarding/mobile-runtime-mode.js +3 -0
- package/packages/app-core/src/onboarding/probe-local-agent.d.ts +44 -0
- package/packages/app-core/src/onboarding/probe-local-agent.d.ts.map +1 -0
- package/packages/app-core/src/onboarding/probe-local-agent.js +126 -0
- package/packages/app-core/src/onboarding-config.d.ts +1 -0
- package/packages/app-core/src/onboarding-config.d.ts.map +1 -1
- package/packages/app-core/src/onboarding-config.js +3 -0
- package/packages/app-core/src/platform/init.d.ts +8 -0
- package/packages/app-core/src/platform/init.d.ts.map +1 -1
- package/packages/app-core/src/platform/init.js +10 -0
- package/packages/app-core/src/services/account-pool.d.ts +98 -0
- package/packages/app-core/src/services/account-pool.d.ts.map +1 -0
- package/packages/app-core/src/services/account-pool.js +506 -0
- package/packages/app-core/src/services/account-usage.d.ts +75 -0
- package/packages/app-core/src/services/account-usage.d.ts.map +1 -0
- package/packages/app-core/src/services/account-usage.js +179 -0
- package/packages/app-core/src/services/local-inference/active-model.d.ts +14 -0
- package/packages/app-core/src/services/local-inference/active-model.d.ts.map +1 -1
- package/packages/app-core/src/services/local-inference/device-bridge.d.ts +7 -0
- package/packages/app-core/src/services/local-inference/device-bridge.d.ts.map +1 -1
- package/packages/app-core/src/services/local-inference/device-bridge.js +108 -3
- package/packages/app-core/src/services/local-inference/paths.d.ts +9 -2
- package/packages/app-core/src/services/local-inference/paths.d.ts.map +1 -1
- package/packages/app-core/src/services/local-inference/paths.js +10 -3
- package/packages/app-core/src/services/local-inference/providers.d.ts +1 -1
- package/packages/app-core/src/services/local-inference/providers.d.ts.map +1 -1
- package/packages/app-core/src/services/local-inference/providers.js +46 -0
- package/packages/app-core/src/services/local-inference/routing-preferences.d.ts +3 -1
- package/packages/app-core/src/services/local-inference/routing-preferences.d.ts.map +1 -1
- package/packages/app-core/src/services/local-inference/routing-preferences.js +1 -0
- package/packages/app-core/src/services/local-inference/types.d.ts +1 -1
- package/packages/app-core/src/services/local-inference/types.d.ts.map +1 -1
- package/packages/app-core/src/shell/AppWindowRenderer.d.ts.map +1 -1
- package/packages/app-core/src/shell/AppWindowRenderer.js +14 -26
- package/packages/app-core/src/state/AppContext.d.ts +1 -1
- package/packages/app-core/src/state/AppContext.d.ts.map +1 -1
- package/packages/app-core/src/state/AppContext.js +1 -1
- package/packages/app-core/src/state/connector-deeplink.d.ts +30 -0
- package/packages/app-core/src/state/connector-deeplink.d.ts.map +1 -0
- package/packages/app-core/src/state/connector-deeplink.js +46 -0
- package/packages/app-core/src/state/index.d.ts +1 -0
- package/packages/app-core/src/state/index.d.ts.map +1 -1
- package/packages/app-core/src/state/index.js +1 -0
- package/packages/app-core/src/state/useCloudState.d.ts.map +1 -1
- package/packages/app-core/src/state/useCloudState.js +4 -1
- package/packages/app-core/src/state/useMiscUiState.js +1 -1
- package/packages/app-core/src/utils/asset-url.d.ts.map +1 -1
- package/packages/app-core/src/utils/asset-url.js +14 -1
- package/packages/app-core/src/utils/browser-tabs-renderer-registry.d.ts +56 -0
- package/packages/app-core/src/utils/browser-tabs-renderer-registry.d.ts.map +1 -0
- package/packages/app-core/src/utils/browser-tabs-renderer-registry.js +738 -0
- package/packages/app-core/src/utils/errors.d.ts +13 -0
- package/packages/app-core/src/utils/errors.d.ts.map +1 -0
- package/packages/app-core/src/utils/errors.js +25 -0
- package/packages/shared/src/connector-cred-types.d.ts +27 -0
- package/packages/shared/src/connector-cred-types.d.ts.map +1 -0
- package/packages/shared/src/connector-cred-types.js +63 -0
- package/packages/shared/src/contracts/apps.d.ts.map +1 -1
- package/packages/shared/src/contracts/apps.js +10 -0
- package/packages/shared/src/contracts/lifeops-extensions.d.ts +145 -0
- package/packages/shared/src/contracts/lifeops-extensions.d.ts.map +1 -1
- package/packages/shared/src/contracts/lifeops-extensions.js +6 -0
- package/packages/shared/src/contracts/lifeops.d.ts +265 -25
- package/packages/shared/src/contracts/lifeops.d.ts.map +1 -1
- package/packages/shared/src/contracts/lifeops.js +56 -0
- package/packages/shared/src/contracts/service-routing.d.ts +1 -0
- package/packages/shared/src/contracts/service-routing.d.ts.map +1 -1
- package/packages/shared/src/contracts/service-routing.js +3 -0
- package/packages/shared/src/index.d.ts +1 -0
- package/packages/shared/src/index.d.ts.map +1 -1
- package/packages/shared/src/index.js +1 -0
- package/packages/shared/src/runtime-env.d.ts +2 -0
- package/packages/shared/src/runtime-env.d.ts.map +1 -1
- package/packages/shared/src/runtime-env.js +20 -0
- package/packages/shared/src/spoken-text.js +2 -2
- package/packages/typescript/src/action-docs.d.ts +4 -0
- package/packages/typescript/src/action-docs.d.ts.map +1 -1
- package/packages/typescript/src/action-docs.js +29 -5
- package/packages/typescript/src/actions.d.ts.map +1 -1
- package/packages/typescript/src/actions.js +19 -3
- package/packages/typescript/src/features/advanced-capabilities/actions/removeContact.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/actions/removeContact.js +23 -4
- package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.js +2 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/searchContacts.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/actions/searchContacts.js +2 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/updateContact.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/actions/updateContact.js +23 -3
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-attachment.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-attachment.js +9 -1
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-file.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-file.js +4 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/save-attachment-to-clipboard.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/save-attachment-to-clipboard.js +8 -1
- package/packages/typescript/src/features/advanced-capabilities/clipboard/types.d.ts +1 -1
- package/packages/typescript/src/features/advanced-capabilities/clipboard/types.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/evaluators/factExtractor.js +2 -2
- package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.js +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/actions/search-experiences.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/actions/search-experiences.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/actions/search-experiences.js +110 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.js +5 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/index.d.ts +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/index.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/index.js +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/providers/experienceProvider.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/providers/experienceProvider.js +16 -6
- package/packages/typescript/src/features/advanced-capabilities/experience/service.d.ts +21 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/service.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/service.js +391 -8
- package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts +44 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceFormatter.d.ts +24 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceFormatter.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceFormatter.js +152 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.d.ts +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceText.js +53 -1
- package/packages/typescript/src/features/advanced-capabilities/index.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/index.js +4 -2
- package/packages/typescript/src/features/advanced-capabilities/personality/index.d.ts +1 -2
- package/packages/typescript/src/features/advanced-capabilities/personality/index.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/personality/index.js +1 -2
- package/packages/typescript/src/features/advanced-planning/actions/chain-example.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-planning/actions/chain-example.js +4 -7
- package/packages/typescript/src/features/basic-capabilities/actions/reply.d.ts.map +1 -1
- package/packages/typescript/src/features/basic-capabilities/actions/reply.js +1 -0
- package/packages/typescript/src/features/basic-capabilities/index.d.ts +1 -1
- package/packages/typescript/src/features/basic-capabilities/index.d.ts.map +1 -1
- package/packages/typescript/src/features/basic-capabilities/providers/actions.d.ts.map +1 -1
- package/packages/typescript/src/features/basic-capabilities/providers/actions.js +40 -2
- package/packages/typescript/src/features/index.js +1 -1
- package/packages/typescript/src/features/knowledge/actions.d.ts.map +1 -1
- package/packages/typescript/src/features/knowledge/actions.js +42 -16
- package/packages/typescript/src/features/plugin-manager/actions/coreStatusAction.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/actions/coreStatusAction.js +23 -5
- package/packages/typescript/src/features/plugin-manager/actions/listEjectedPluginsAction.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/actions/listEjectedPluginsAction.js +31 -6
- package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/core-status.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/create.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/create.js +21 -5
- package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/eject.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/eject.js +3 -1
- package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/install.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/actions/plugin.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/actions/plugin.js +4 -1
- package/packages/typescript/src/features/plugin-manager/actions/searchPluginAction.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/actions/searchPluginAction.js +44 -11
- package/packages/typescript/src/features/plugin-manager/index.d.ts +2 -2
- package/packages/typescript/src/features/plugin-manager/index.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/index.js +3 -3
- package/packages/typescript/src/features/plugin-manager/security.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/services/pluginManagerService.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/services/pluginManagerService.js +0 -1
- package/packages/typescript/src/features/plugin-manager/services/pluginRegistryService.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/services/pluginRegistryService.js +1 -2
- package/packages/typescript/src/features/secrets/actions/manage-secret.d.ts.map +1 -1
- package/packages/typescript/src/features/secrets/actions/manage-secret.js +13 -2
- package/packages/typescript/src/features/secrets/actions/request-secret.d.ts.map +1 -1
- package/packages/typescript/src/features/secrets/actions/request-secret.js +23 -5
- package/packages/typescript/src/features/secrets/actions/set-secret.d.ts.map +1 -1
- package/packages/typescript/src/features/secrets/actions/set-secret.js +22 -4
- package/packages/typescript/src/features/secrets/index.d.ts +22 -0
- package/packages/typescript/src/features/secrets/index.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/index.js +24 -0
- package/packages/typescript/src/features/secrets/onboarding/action.d.ts.map +1 -1
- package/packages/typescript/src/features/secrets/onboarding/action.js +1 -0
- package/packages/typescript/src/features/secrets/plugin.d.ts +70 -0
- package/packages/typescript/src/features/secrets/plugin.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/plugin.js +87 -0
- package/packages/typescript/src/features/secrets/services/index.d.ts +7 -0
- package/packages/typescript/src/features/secrets/services/index.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/services/index.js +5 -0
- package/packages/typescript/src/features/secrets/types.d.ts +1 -1
- package/packages/typescript/src/features/secrets/types.js +1 -1
- package/packages/typescript/src/features/trust/actions/evaluateTrust.d.ts.map +1 -1
- package/packages/typescript/src/features/trust/actions/evaluateTrust.js +5 -0
- package/packages/typescript/src/features/trust/actions/recordTrustInteraction.d.ts.map +1 -1
- package/packages/typescript/src/features/trust/actions/recordTrustInteraction.js +5 -0
- package/packages/typescript/src/features/trust/actions/requestElevation.d.ts.map +1 -1
- package/packages/typescript/src/features/trust/actions/requestElevation.js +5 -0
- package/packages/typescript/src/features/trust/actions/roles.d.ts.map +1 -1
- package/packages/typescript/src/features/trust/actions/roles.js +4 -0
- package/packages/typescript/src/features/trust/actions/settings.d.ts.map +1 -1
- package/packages/typescript/src/features/trust/actions/settings.js +17 -4
- package/packages/typescript/src/features/trust/index.js +4 -4
- package/packages/typescript/src/features/trust/providers/settings.js +1 -1
- package/packages/typescript/src/features/trust/services/SecurityStore.d.ts +1 -1
- package/packages/typescript/src/features/trust/services/SecurityStore.js +1 -1
- package/packages/typescript/src/features/trust/services/db.js +1 -1
- package/packages/typescript/src/generated/action-docs.d.ts +93 -15
- package/packages/typescript/src/generated/action-docs.d.ts.map +1 -1
- package/packages/typescript/src/generated/action-docs.js +93 -16
- package/packages/typescript/src/index.node.d.ts +3 -0
- package/packages/typescript/src/index.node.d.ts.map +1 -1
- package/packages/typescript/src/index.node.js +4 -0
- package/packages/typescript/src/lifeops-passive-connectors.d.ts +7 -0
- package/packages/typescript/src/lifeops-passive-connectors.d.ts.map +1 -0
- package/packages/typescript/src/lifeops-passive-connectors.js +39 -0
- package/packages/typescript/src/runtime.d.ts +1 -0
- package/packages/typescript/src/runtime.d.ts.map +1 -1
- package/packages/typescript/src/runtime.js +199 -9
- package/packages/typescript/src/services/message.d.ts +7 -0
- package/packages/typescript/src/services/message.d.ts.map +1 -1
- package/packages/typescript/src/services/message.js +222 -25
- package/packages/typescript/src/types/components.d.ts +5 -0
- package/packages/typescript/src/types/components.d.ts.map +1 -1
- package/packages/typescript/src/types/memory.d.ts +2 -1
- package/packages/typescript/src/types/memory.d.ts.map +1 -1
- package/packages/typescript/src/utils/context-catalog.d.ts.map +1 -1
- package/packages/typescript/src/utils/context-catalog.js +124 -14
- package/packages/typescript/src/utils/context-routing.d.ts.map +1 -1
- package/packages/typescript/src/utils/context-routing.js +42 -0
- package/packages/typescript/src/utils/prompt-compression.d.ts +6 -0
- package/packages/typescript/src/utils/prompt-compression.d.ts.map +1 -0
- package/packages/typescript/src/utils/prompt-compression.js +14 -0
- package/packages/typescript/src/utils.d.ts +1 -0
- package/packages/typescript/src/utils.d.ts.map +1 -1
- package/packages/typescript/src/utils.js +2 -1
- package/packages/ui/src/components/composites/chat/chat-composer-shell.js +1 -1
- package/packages/ui/src/components/composites/sidebar/sidebar-root.js +3 -3
- package/packages/ui/src/components/ui/dialog.js +1 -1
- package/packages/ui/src/components/ui/drawer-sheet.js +1 -1
- package/packages/ui/src/components/ui/themed-select.js +2 -2
- package/packages/ui/src/components/ui/tooltip-extended.js +1 -1
- package/packages/ui/src/components/ui/tooltip.js +1 -1
- package/packages/ui/src/layouts/page-layout/page-layout-mobile-drawer.js +1 -1
- package/packages/ui/src/layouts/workspace-layout/workspace-layout.js +2 -2
- package/plugins/plugin-browser-bridge/src/actions.d.ts +44 -0
- package/plugins/plugin-browser-bridge/src/actions.d.ts.map +1 -0
- package/plugins/plugin-browser-bridge/src/actions.js +234 -0
- package/plugins/plugin-browser-bridge/src/contracts.d.ts +272 -0
- package/plugins/plugin-browser-bridge/src/contracts.d.ts.map +1 -0
- package/plugins/plugin-browser-bridge/src/contracts.js +48 -0
- package/plugins/plugin-browser-bridge/src/index.d.ts +19 -0
- package/plugins/plugin-browser-bridge/src/index.d.ts.map +1 -0
- package/plugins/plugin-browser-bridge/src/index.js +18 -0
- package/plugins/plugin-browser-bridge/src/packaging.d.ts +27 -0
- package/plugins/plugin-browser-bridge/src/packaging.d.ts.map +1 -0
- package/plugins/plugin-browser-bridge/src/packaging.js +503 -0
- package/plugins/plugin-browser-bridge/src/plugin.d.ts +10 -0
- package/plugins/plugin-browser-bridge/src/plugin.d.ts.map +1 -0
- package/plugins/plugin-browser-bridge/src/plugin.js +140 -0
- package/plugins/plugin-browser-bridge/src/routes.d.ts +37 -0
- package/plugins/plugin-browser-bridge/src/routes.d.ts.map +1 -0
- package/plugins/plugin-browser-bridge/src/routes.js +496 -0
- package/plugins/plugin-browser-bridge/src/schema.d.ts +2250 -0
- package/plugins/plugin-browser-bridge/src/schema.d.ts.map +1 -0
- package/plugins/plugin-browser-bridge/src/schema.js +111 -0
- package/plugins/plugin-browser-bridge/src/service.d.ts +28 -0
- package/plugins/plugin-browser-bridge/src/service.d.ts.map +1 -0
- package/plugins/plugin-browser-bridge/src/service.js +1 -0
- package/apps/app-lifeops/src/components/AppBlockerSettingsCard.d.ts +0 -3
- package/apps/app-lifeops/src/components/AppBlockerSettingsCard.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/AppBlockerSettingsCard.js +0 -189
- package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.d.ts +0 -2
- package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/BrowserBridgeSetupPanel.js +0 -1065
- package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.d.ts +0 -7
- package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/BrowserBridgeStatusChip.js +0 -71
- package/apps/app-lifeops/src/components/DataSourcesStrip.d.ts +0 -14
- package/apps/app-lifeops/src/components/DataSourcesStrip.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/DataSourcesStrip.js +0 -36
- package/apps/app-lifeops/src/components/EventEditorDrawer.d.ts +0 -23
- package/apps/app-lifeops/src/components/EventEditorDrawer.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/EventEditorDrawer.js +0 -514
- package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.d.ts +0 -2
- package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsActivitySignalsEffect.js +0 -10
- package/apps/app-lifeops/src/components/LifeOpsCalendarSection.d.ts +0 -15
- package/apps/app-lifeops/src/components/LifeOpsCalendarSection.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsCalendarSection.js +0 -515
- package/apps/app-lifeops/src/components/LifeOpsChatAdapter.d.ts +0 -34
- package/apps/app-lifeops/src/components/LifeOpsChatAdapter.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsChatAdapter.js +0 -175
- package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.d.ts +0 -2
- package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsFeatureTogglesSection.js +0 -99
- package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.d.ts +0 -37
- package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsHabitVisuals.js +0 -88
- package/apps/app-lifeops/src/components/LifeOpsInboxSection.d.ts +0 -13
- package/apps/app-lifeops/src/components/LifeOpsInboxSection.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsInboxSection.js +0 -491
- package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.d.ts +0 -12
- package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsLinkBankButton.js +0 -92
- package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.d.ts +0 -12
- package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsLinkPaypalButton.js +0 -160
- package/apps/app-lifeops/src/components/LifeOpsMoneySection.d.ts +0 -3
- package/apps/app-lifeops/src/components/LifeOpsMoneySection.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsMoneySection.js +0 -373
- package/apps/app-lifeops/src/components/LifeOpsNavRail.d.ts +0 -9
- package/apps/app-lifeops/src/components/LifeOpsNavRail.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsNavRail.js +0 -93
- package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.d.ts +0 -4
- package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsOperationalPanels.js +0 -274
- package/apps/app-lifeops/src/components/LifeOpsOverviewSection.d.ts +0 -7
- package/apps/app-lifeops/src/components/LifeOpsOverviewSection.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsOverviewSection.js +0 -670
- package/apps/app-lifeops/src/components/LifeOpsPageSections.d.ts +0 -42
- package/apps/app-lifeops/src/components/LifeOpsPageSections.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsPageSections.js +0 -166
- package/apps/app-lifeops/src/components/LifeOpsPageView.d.ts +0 -2
- package/apps/app-lifeops/src/components/LifeOpsPageView.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsPageView.js +0 -566
- package/apps/app-lifeops/src/components/LifeOpsRemindersSection.d.ts +0 -2
- package/apps/app-lifeops/src/components/LifeOpsRemindersSection.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsRemindersSection.js +0 -749
- package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.d.ts +0 -27
- package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsResizableSidebar.js +0 -106
- package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.d.ts +0 -2
- package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsScreenTimeSection.js +0 -373
- package/apps/app-lifeops/src/components/LifeOpsSectionContent.d.ts +0 -10
- package/apps/app-lifeops/src/components/LifeOpsSectionContent.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsSectionContent.js +0 -30
- package/apps/app-lifeops/src/components/LifeOpsSelectionContext.d.ts +0 -21
- package/apps/app-lifeops/src/components/LifeOpsSelectionContext.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsSelectionContext.js +0 -30
- package/apps/app-lifeops/src/components/LifeOpsSettingsSection.d.ts +0 -20
- package/apps/app-lifeops/src/components/LifeOpsSettingsSection.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsSettingsSection.js +0 -598
- package/apps/app-lifeops/src/components/LifeOpsSetupGate.d.ts +0 -13
- package/apps/app-lifeops/src/components/LifeOpsSetupGate.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsSetupGate.js +0 -134
- package/apps/app-lifeops/src/components/LifeOpsSleepSection.d.ts +0 -10
- package/apps/app-lifeops/src/components/LifeOpsSleepSection.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsSleepSection.js +0 -425
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.d.ts +0 -11
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceShell.js +0 -49
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.d.ts +0 -2
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/LifeOpsWorkspaceView.js +0 -1041
- package/apps/app-lifeops/src/components/MessagingConnectorCards.d.ts +0 -7
- package/apps/app-lifeops/src/components/MessagingConnectorCards.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/MessagingConnectorCards.js +0 -643
- package/apps/app-lifeops/src/components/MissingSourceCard.d.ts +0 -9
- package/apps/app-lifeops/src/components/MissingSourceCard.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/MissingSourceCard.js +0 -5
- package/apps/app-lifeops/src/components/MobileSignalsSetupCard.d.ts +0 -2
- package/apps/app-lifeops/src/components/MobileSignalsSetupCard.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/MobileSignalsSetupCard.js +0 -163
- package/apps/app-lifeops/src/components/SleepInspectionPanel.d.ts +0 -8
- package/apps/app-lifeops/src/components/SleepInspectionPanel.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/SleepInspectionPanel.js +0 -59
- package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.d.ts +0 -3
- package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/WebsiteBlockerSettingsCard.js +0 -75
- package/apps/app-lifeops/src/components/WhatsAppQrOverlay.d.ts +0 -8
- package/apps/app-lifeops/src/components/WhatsAppQrOverlay.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/WhatsAppQrOverlay.js +0 -48
- package/apps/app-lifeops/src/components/lifeops-labels.d.ts +0 -2
- package/apps/app-lifeops/src/components/lifeops-labels.d.ts.map +0 -1
- package/apps/app-lifeops/src/components/lifeops-labels.js +0 -5
- package/apps/app-lifeops/src/events/index.d.ts +0 -34
- package/apps/app-lifeops/src/events/index.d.ts.map +0 -1
- package/apps/app-lifeops/src/events/index.js +0 -23
- package/apps/app-lifeops/src/hooks/useCalendarWeek.d.ts +0 -28
- package/apps/app-lifeops/src/hooks/useCalendarWeek.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useCalendarWeek.js +0 -93
- package/apps/app-lifeops/src/hooks/useDiscordConnector.d.ts +0 -14
- package/apps/app-lifeops/src/hooks/useDiscordConnector.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useDiscordConnector.js +0 -126
- package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.d.ts +0 -29
- package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useGoogleLifeOpsConnector.js +0 -481
- package/apps/app-lifeops/src/hooks/useIMessageConnector.d.ts +0 -10
- package/apps/app-lifeops/src/hooks/useIMessageConnector.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useIMessageConnector.js +0 -50
- package/apps/app-lifeops/src/hooks/useInbox.d.ts +0 -34
- package/apps/app-lifeops/src/hooks/useInbox.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useInbox.js +0 -98
- package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.d.ts +0 -2
- package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useLifeOpsActivitySignals.js +0 -383
- package/apps/app-lifeops/src/hooks/useLifeOpsAppState.d.ts +0 -9
- package/apps/app-lifeops/src/hooks/useLifeOpsAppState.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useLifeOpsAppState.js +0 -83
- package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.d.ts +0 -8
- package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useLifeOpsCapabilitiesStatus.js +0 -60
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.d.ts +0 -18
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleInspection.js +0 -66
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.d.ts +0 -14
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useLifeOpsScheduleState.js +0 -79
- package/apps/app-lifeops/src/hooks/useLifeOpsSection.d.ts +0 -18
- package/apps/app-lifeops/src/hooks/useLifeOpsSection.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useLifeOpsSection.js +0 -78
- package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.d.ts +0 -14
- package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useLifeOpsXConnector.js +0 -160
- package/apps/app-lifeops/src/hooks/useSignalConnector.d.ts +0 -16
- package/apps/app-lifeops/src/hooks/useSignalConnector.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useSignalConnector.js +0 -198
- package/apps/app-lifeops/src/hooks/useTelegramConnector.d.ts +0 -21
- package/apps/app-lifeops/src/hooks/useTelegramConnector.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useTelegramConnector.js +0 -177
- package/apps/app-lifeops/src/hooks/useWhatsAppConnector.d.ts +0 -8
- package/apps/app-lifeops/src/hooks/useWhatsAppConnector.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useWhatsAppConnector.js +0 -58
- package/apps/app-lifeops/src/hooks/useWhatsAppPairing.d.ts +0 -12
- package/apps/app-lifeops/src/hooks/useWhatsAppPairing.d.ts.map +0 -1
- package/apps/app-lifeops/src/hooks/useWhatsAppPairing.js +0 -159
- package/apps/app-lifeops/src/lifeops-route.d.ts +0 -74
- package/apps/app-lifeops/src/lifeops-route.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops-route.js +0 -204
- package/apps/app-lifeops/src/platform/lifeops-github.d.ts +0 -15
- package/apps/app-lifeops/src/platform/lifeops-github.d.ts.map +0 -1
- package/apps/app-lifeops/src/platform/lifeops-github.js +0 -135
- package/apps/app-lifeops/src/types/app-blocker-settings-card.d.ts +0 -2
- package/apps/app-lifeops/src/types/app-blocker-settings-card.d.ts.map +0 -1
- package/apps/app-lifeops/src/types/app-blocker-settings-card.js +0 -1
- package/apps/app-lifeops/src/types/index.d.ts +0 -3
- package/apps/app-lifeops/src/types/index.d.ts.map +0 -1
- package/apps/app-lifeops/src/types/index.js +0 -1
- package/apps/app-lifeops/src/types/website-blocker-settings-card.d.ts +0 -2
- package/apps/app-lifeops/src/types/website-blocker-settings-card.d.ts.map +0 -1
- package/apps/app-lifeops/src/types/website-blocker-settings-card.js +0 -1
- package/apps/app-lifeops/src/ui.d.ts +0 -11
- package/apps/app-lifeops/src/ui.d.ts.map +0 -1
- package/apps/app-lifeops/src/ui.js +0 -9
- package/apps/app-lifeops/src/utils/lifeops-url.d.ts +0 -5
- package/apps/app-lifeops/src/utils/lifeops-url.d.ts.map +0 -1
- package/apps/app-lifeops/src/utils/lifeops-url.js +0 -35
- package/packages/native-plugins/mobile-signals/src/definitions.d.ts +0 -162
- package/packages/native-plugins/mobile-signals/src/definitions.d.ts.map +0 -1
- package/packages/native-plugins/mobile-signals/src/definitions.js +0 -1
- package/packages/native-plugins/mobile-signals/src/index.d.ts +0 -4
- package/packages/native-plugins/mobile-signals/src/index.d.ts.map +0 -1
- package/packages/native-plugins/mobile-signals/src/index.js +0 -6
- package/packages/native-plugins/mobile-signals/src/web.d.ts +0 -29
- package/packages/native-plugins/mobile-signals/src/web.d.ts.map +0 -1
- package/packages/native-plugins/mobile-signals/src/web.js +0 -269
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import crypto from "node:crypto";
|
|
2
2
|
import { logger } from "@elizaos/core";
|
|
3
3
|
import { browserBridgeSchema, } from "@elizaos/plugin-browser-bridge";
|
|
4
|
+
import { LIFEOPS_INBOX_CHANNELS, } from "../contracts/index.js";
|
|
4
5
|
import { refreshLifeOpsRelativeTime } from "./relative-time.js";
|
|
5
6
|
import { lifeOpsSchema } from "./schema.js";
|
|
6
7
|
import { executeRawSql, parseJsonArray, parseJsonRecord, sqlBoolean, sqlInteger, sqlJson, sqlNumber, sqlQuote, sqlText, toBoolean, toNumber, toText, } from "./sql.js";
|
|
@@ -16,6 +17,15 @@ function deriveConnectorIdentityEmail(identity) {
|
|
|
16
17
|
normalizeConnectorIdentityEmail(identity.emailAddress) ??
|
|
17
18
|
normalizeConnectorIdentityEmail(identity.primaryEmail));
|
|
18
19
|
}
|
|
20
|
+
function requireScopedGmailGrantId(grantId) {
|
|
21
|
+
if (typeof grantId !== "string" || grantId.trim().length === 0) {
|
|
22
|
+
throw new Error("Gmail message persistence requires grantId.");
|
|
23
|
+
}
|
|
24
|
+
return grantId.trim();
|
|
25
|
+
}
|
|
26
|
+
const LIFEOPS_INBOX_CHANNEL_SET = new Set(LIFEOPS_INBOX_CHANNELS);
|
|
27
|
+
const LIFEOPS_INBOX_CHAT_TYPES = new Set(["dm", "group", "channel"]);
|
|
28
|
+
const LIFEOPS_INBOX_PRIORITY_CATEGORIES = new Set(["important", "planning", "casual"]);
|
|
19
29
|
function isoNow() {
|
|
20
30
|
return new Date().toISOString();
|
|
21
31
|
}
|
|
@@ -27,11 +37,14 @@ function parseOwnershipFields(row) {
|
|
|
27
37
|
: "user_lifeops",
|
|
28
38
|
subjectType,
|
|
29
39
|
subjectId: toText(row.subject_id, toText(row.agent_id)),
|
|
30
|
-
visibilityScope:
|
|
40
|
+
visibilityScope: subjectType === "owner"
|
|
31
41
|
? "owner_only"
|
|
32
|
-
: toText(row.visibility_scope,
|
|
33
|
-
? "
|
|
34
|
-
: "
|
|
42
|
+
: toText(row.visibility_scope, "agent_and_admin") === "owner_only"
|
|
43
|
+
? "owner_only"
|
|
44
|
+
: toText(row.visibility_scope, "agent_and_admin") ===
|
|
45
|
+
"agent_and_admin"
|
|
46
|
+
? "agent_and_admin"
|
|
47
|
+
: "owner_agent_admin",
|
|
35
48
|
contextPolicy: toText(row.context_policy, subjectType === "agent" ? "never" : "explicit_only") === "never"
|
|
36
49
|
? "never"
|
|
37
50
|
: toText(row.context_policy, subjectType === "agent" ? "never" : "explicit_only") === "sidebar_only"
|
|
@@ -242,6 +255,7 @@ function parseConnectorGrant(row) {
|
|
|
242
255
|
provider: toText(row.provider),
|
|
243
256
|
side: toText(row.side, "owner"),
|
|
244
257
|
identity,
|
|
258
|
+
identityEmail: row.identity_email ? toText(row.identity_email) : null,
|
|
245
259
|
grantedScopes: parseJsonArray(row.granted_scopes_json),
|
|
246
260
|
capabilities: parseJsonArray(row.capabilities_json),
|
|
247
261
|
tokenRef: row.token_ref ? toText(row.token_ref) : null,
|
|
@@ -428,10 +442,16 @@ function parseHealthSignal(value) {
|
|
|
428
442
|
!Array.isArray(record.permissions)
|
|
429
443
|
? record.permissions
|
|
430
444
|
: null;
|
|
445
|
+
const source = toText(record.source, "healthkit");
|
|
446
|
+
const normalizedSource = source === "health_connect" ||
|
|
447
|
+
source === "strava" ||
|
|
448
|
+
source === "fitbit" ||
|
|
449
|
+
source === "withings" ||
|
|
450
|
+
source === "oura"
|
|
451
|
+
? source
|
|
452
|
+
: "healthkit";
|
|
431
453
|
return {
|
|
432
|
-
source:
|
|
433
|
-
? "health_connect"
|
|
434
|
-
: "healthkit",
|
|
454
|
+
source: normalizedSource,
|
|
435
455
|
permissions: {
|
|
436
456
|
sleep: toBoolean(permissionsRecord?.sleep ?? false),
|
|
437
457
|
biometrics: toBoolean(permissionsRecord?.biometrics ?? false),
|
|
@@ -484,6 +504,118 @@ function parseActivitySignal(row) {
|
|
|
484
504
|
createdAt: toText(row.created_at),
|
|
485
505
|
};
|
|
486
506
|
}
|
|
507
|
+
function parseHealthMetricSample(row) {
|
|
508
|
+
return {
|
|
509
|
+
id: toText(row.id),
|
|
510
|
+
agentId: toText(row.agent_id),
|
|
511
|
+
provider: toText(row.provider),
|
|
512
|
+
grantId: toText(row.grant_id),
|
|
513
|
+
metric: toText(row.metric),
|
|
514
|
+
value: toNumber(row.value, 0),
|
|
515
|
+
unit: toText(row.unit),
|
|
516
|
+
startAt: toText(row.start_at),
|
|
517
|
+
endAt: toText(row.end_at),
|
|
518
|
+
localDate: toText(row.local_date),
|
|
519
|
+
sourceExternalId: toText(row.source_external_id),
|
|
520
|
+
metadata: parseJsonRecord(row.metadata_json),
|
|
521
|
+
createdAt: toText(row.created_at),
|
|
522
|
+
updatedAt: toText(row.updated_at),
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
function parseHealthWorkout(row) {
|
|
526
|
+
return {
|
|
527
|
+
id: toText(row.id),
|
|
528
|
+
agentId: toText(row.agent_id),
|
|
529
|
+
provider: toText(row.provider),
|
|
530
|
+
grantId: toText(row.grant_id),
|
|
531
|
+
sourceExternalId: toText(row.source_external_id),
|
|
532
|
+
workoutType: toText(row.workout_type),
|
|
533
|
+
title: toText(row.title),
|
|
534
|
+
startAt: toText(row.start_at),
|
|
535
|
+
endAt: row.end_at ? toText(row.end_at) : null,
|
|
536
|
+
durationSeconds: toNumber(row.duration_seconds, 0),
|
|
537
|
+
distanceMeters: row.distance_meters === null || row.distance_meters === undefined
|
|
538
|
+
? null
|
|
539
|
+
: toNumber(row.distance_meters, 0),
|
|
540
|
+
calories: row.calories === null || row.calories === undefined
|
|
541
|
+
? null
|
|
542
|
+
: toNumber(row.calories, 0),
|
|
543
|
+
averageHeartRate: row.average_heart_rate === null || row.average_heart_rate === undefined
|
|
544
|
+
? null
|
|
545
|
+
: toNumber(row.average_heart_rate, 0),
|
|
546
|
+
maxHeartRate: row.max_heart_rate === null || row.max_heart_rate === undefined
|
|
547
|
+
? null
|
|
548
|
+
: toNumber(row.max_heart_rate, 0),
|
|
549
|
+
metadata: parseJsonRecord(row.metadata_json),
|
|
550
|
+
createdAt: toText(row.created_at),
|
|
551
|
+
updatedAt: toText(row.updated_at),
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
function parseHealthSyncState(row) {
|
|
555
|
+
return {
|
|
556
|
+
id: toText(row.id),
|
|
557
|
+
agentId: toText(row.agent_id),
|
|
558
|
+
provider: toText(row.provider),
|
|
559
|
+
grantId: toText(row.grant_id),
|
|
560
|
+
cursor: row.cursor ? toText(row.cursor) : null,
|
|
561
|
+
lastSyncedAt: row.last_synced_at ? toText(row.last_synced_at) : null,
|
|
562
|
+
lastSyncStartedAt: row.last_sync_started_at
|
|
563
|
+
? toText(row.last_sync_started_at)
|
|
564
|
+
: null,
|
|
565
|
+
lastSyncError: row.last_sync_error ? toText(row.last_sync_error) : null,
|
|
566
|
+
metadata: parseJsonRecord(row.metadata_json),
|
|
567
|
+
updatedAt: toText(row.updated_at),
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
function parseHealthSleepStageSamples(value) {
|
|
571
|
+
return parseJsonArray(value).filter((candidate) => {
|
|
572
|
+
if (!candidate || typeof candidate !== "object") {
|
|
573
|
+
return false;
|
|
574
|
+
}
|
|
575
|
+
const record = candidate;
|
|
576
|
+
return (typeof record.stage === "string" &&
|
|
577
|
+
typeof record.startAt === "string" &&
|
|
578
|
+
typeof record.endAt === "string" &&
|
|
579
|
+
(record.confidence === null || typeof record.confidence === "number") &&
|
|
580
|
+
(record.providerCode === null ||
|
|
581
|
+
typeof record.providerCode === "string"));
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
function parseHealthSleepEpisode(row) {
|
|
585
|
+
const nullableNumber = (value) => value === null || value === undefined ? null : toNumber(value, 0);
|
|
586
|
+
return {
|
|
587
|
+
id: toText(row.id),
|
|
588
|
+
agentId: toText(row.agent_id),
|
|
589
|
+
provider: toText(row.provider),
|
|
590
|
+
grantId: toText(row.grant_id),
|
|
591
|
+
sourceExternalId: toText(row.source_external_id),
|
|
592
|
+
localDate: toText(row.local_date),
|
|
593
|
+
timezone: row.timezone ? toText(row.timezone) : null,
|
|
594
|
+
startAt: toText(row.start_at),
|
|
595
|
+
endAt: toText(row.end_at),
|
|
596
|
+
isMainSleep: toBoolean(row.is_main_sleep, false),
|
|
597
|
+
sleepType: row.sleep_type ? toText(row.sleep_type) : null,
|
|
598
|
+
durationSeconds: toNumber(row.duration_seconds, 0),
|
|
599
|
+
timeInBedSeconds: nullableNumber(row.time_in_bed_seconds),
|
|
600
|
+
efficiency: nullableNumber(row.efficiency),
|
|
601
|
+
latencySeconds: nullableNumber(row.latency_seconds),
|
|
602
|
+
awakeSeconds: nullableNumber(row.awake_seconds),
|
|
603
|
+
lightSleepSeconds: nullableNumber(row.light_sleep_seconds),
|
|
604
|
+
deepSleepSeconds: nullableNumber(row.deep_sleep_seconds),
|
|
605
|
+
remSleepSeconds: nullableNumber(row.rem_sleep_seconds),
|
|
606
|
+
sleepScore: nullableNumber(row.sleep_score),
|
|
607
|
+
readinessScore: nullableNumber(row.readiness_score),
|
|
608
|
+
averageHeartRate: nullableNumber(row.average_heart_rate),
|
|
609
|
+
lowestHeartRate: nullableNumber(row.lowest_heart_rate),
|
|
610
|
+
averageHrvMs: nullableNumber(row.average_hrv_ms),
|
|
611
|
+
respiratoryRate: nullableNumber(row.respiratory_rate),
|
|
612
|
+
bloodOxygenPercent: nullableNumber(row.blood_oxygen_percent),
|
|
613
|
+
stageSamples: parseHealthSleepStageSamples(row.stage_samples_json),
|
|
614
|
+
metadata: parseJsonRecord(row.metadata_json),
|
|
615
|
+
createdAt: toText(row.created_at),
|
|
616
|
+
updatedAt: toText(row.updated_at),
|
|
617
|
+
};
|
|
618
|
+
}
|
|
487
619
|
function parseCalendarEvent(row) {
|
|
488
620
|
return {
|
|
489
621
|
id: toText(row.id),
|
|
@@ -516,6 +648,7 @@ function parseGmailMessageSummary(row) {
|
|
|
516
648
|
agentId: toText(row.agent_id),
|
|
517
649
|
provider: "google",
|
|
518
650
|
side: toText(row.side, "owner"),
|
|
651
|
+
grantId: row.grant_id ? toText(row.grant_id) : undefined,
|
|
519
652
|
threadId: toText(row.thread_id),
|
|
520
653
|
subject: toText(row.subject),
|
|
521
654
|
from: toText(row.from_display),
|
|
@@ -537,9 +670,94 @@ function parseGmailMessageSummary(row) {
|
|
|
537
670
|
updatedAt: toText(row.updated_at),
|
|
538
671
|
};
|
|
539
672
|
}
|
|
673
|
+
function normalizeInboxChatType(channel, value, participantCount) {
|
|
674
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
675
|
+
const normalized = value.trim().toLowerCase();
|
|
676
|
+
if (LIFEOPS_INBOX_CHAT_TYPES.has(normalized)) {
|
|
677
|
+
return normalized;
|
|
678
|
+
}
|
|
679
|
+
throw new Error(`[LifeOpsRepository] invalid inbox chat type: ${value}`);
|
|
680
|
+
}
|
|
681
|
+
if (channel === "gmail")
|
|
682
|
+
return "dm";
|
|
683
|
+
if (typeof participantCount === "number") {
|
|
684
|
+
return participantCount > 2 ? "group" : "dm";
|
|
685
|
+
}
|
|
686
|
+
return "channel";
|
|
687
|
+
}
|
|
688
|
+
function normalizeInboxChannelValue(value, label = "inbox channel") {
|
|
689
|
+
if (typeof value === "string") {
|
|
690
|
+
const normalized = value.trim().toLowerCase();
|
|
691
|
+
if (LIFEOPS_INBOX_CHANNEL_SET.has(normalized)) {
|
|
692
|
+
return normalized;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
throw new Error(`[LifeOpsRepository] invalid ${label}: ${String(value)}`);
|
|
696
|
+
}
|
|
697
|
+
function requireInboxExternalId(value, label) {
|
|
698
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
699
|
+
return value;
|
|
700
|
+
}
|
|
701
|
+
throw new Error(`[LifeOpsRepository] missing ${label}`);
|
|
702
|
+
}
|
|
703
|
+
function parseCachedInboxSourceRef(value, channel, externalId) {
|
|
704
|
+
const sourceRef = parseJsonRecord(value);
|
|
705
|
+
const sourceRefChannel = sourceRef.channel === undefined || sourceRef.channel === null
|
|
706
|
+
? channel
|
|
707
|
+
: normalizeInboxChannelValue(sourceRef.channel, "inbox sourceRef channel");
|
|
708
|
+
if (sourceRefChannel !== channel) {
|
|
709
|
+
throw new Error(`[LifeOpsRepository] inbox sourceRef channel ${sourceRefChannel} does not match row channel ${channel}`);
|
|
710
|
+
}
|
|
711
|
+
return {
|
|
712
|
+
channel: sourceRefChannel,
|
|
713
|
+
externalId: sourceRef.externalId === undefined || sourceRef.externalId === null
|
|
714
|
+
? externalId
|
|
715
|
+
: requireInboxExternalId(sourceRef.externalId, "inbox sourceRef externalId"),
|
|
716
|
+
};
|
|
717
|
+
}
|
|
718
|
+
function normalizeInboxWriteSourceRef(sourceRef, channel) {
|
|
719
|
+
const sourceRefChannel = normalizeInboxChannelValue(sourceRef.channel, "inbox sourceRef channel");
|
|
720
|
+
if (sourceRefChannel !== channel) {
|
|
721
|
+
throw new Error(`[LifeOpsRepository] inbox sourceRef channel ${sourceRefChannel} does not match message channel ${channel}`);
|
|
722
|
+
}
|
|
723
|
+
return {
|
|
724
|
+
channel: sourceRefChannel,
|
|
725
|
+
externalId: requireInboxExternalId(sourceRef.externalId, "inbox sourceRef externalId"),
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
function normalizeInboxPriorityCategory(value) {
|
|
729
|
+
if (value === null || value === undefined || value === "") {
|
|
730
|
+
return undefined;
|
|
731
|
+
}
|
|
732
|
+
if (typeof value !== "string") {
|
|
733
|
+
throw new Error("[LifeOpsRepository] invalid inbox priority category");
|
|
734
|
+
}
|
|
735
|
+
const normalized = value.trim().toLowerCase();
|
|
736
|
+
if (LIFEOPS_INBOX_PRIORITY_CATEGORIES.has(normalized)) {
|
|
737
|
+
return normalized;
|
|
738
|
+
}
|
|
739
|
+
throw new Error(`[LifeOpsRepository] invalid inbox priority category: ${value}`);
|
|
740
|
+
}
|
|
741
|
+
function normalizeInboxPriorityFlags(flags) {
|
|
742
|
+
if (!flags)
|
|
743
|
+
return [];
|
|
744
|
+
const out = [];
|
|
745
|
+
const seen = new Set();
|
|
746
|
+
for (const flag of flags) {
|
|
747
|
+
const normalized = flag.trim();
|
|
748
|
+
if (!normalized || seen.has(normalized))
|
|
749
|
+
continue;
|
|
750
|
+
seen.add(normalized);
|
|
751
|
+
out.push(normalized);
|
|
752
|
+
}
|
|
753
|
+
return out;
|
|
754
|
+
}
|
|
755
|
+
function hasOwnPriorityFlags(message) {
|
|
756
|
+
return Object.hasOwn(message, "priorityFlags");
|
|
757
|
+
}
|
|
540
758
|
function parseCachedInboxMessage(row) {
|
|
541
|
-
const channel =
|
|
542
|
-
const externalId =
|
|
759
|
+
const channel = normalizeInboxChannelValue(row.channel);
|
|
760
|
+
const externalId = requireInboxExternalId(row.external_id, "inbox external_id");
|
|
543
761
|
const priorityScore = row.priority_score === null || row.priority_score === undefined
|
|
544
762
|
? undefined
|
|
545
763
|
: toNumber(row.priority_score);
|
|
@@ -549,7 +767,8 @@ function parseCachedInboxMessage(row) {
|
|
|
549
767
|
const participantCount = row.participant_count === null || row.participant_count === undefined
|
|
550
768
|
? undefined
|
|
551
769
|
: toNumber(row.participant_count);
|
|
552
|
-
const
|
|
770
|
+
const chatType = normalizeInboxChatType(channel, row.chat_type, participantCount);
|
|
771
|
+
const sourceRef = parseCachedInboxSourceRef(row.source_ref_json, channel, externalId);
|
|
553
772
|
const flags = parseJsonArray(row.priority_flags_json).filter((flag) => typeof flag === "string");
|
|
554
773
|
return {
|
|
555
774
|
id: toText(row.id),
|
|
@@ -565,16 +784,9 @@ function parseCachedInboxMessage(row) {
|
|
|
565
784
|
receivedAt: toText(row.received_at),
|
|
566
785
|
unread: toBoolean(row.is_unread),
|
|
567
786
|
deepLink: row.deep_link ? toText(row.deep_link) : null,
|
|
568
|
-
sourceRef
|
|
569
|
-
channel: typeof sourceRef.channel === "string"
|
|
570
|
-
? sourceRef.channel
|
|
571
|
-
: channel,
|
|
572
|
-
externalId: typeof sourceRef.externalId === "string"
|
|
573
|
-
? sourceRef.externalId
|
|
574
|
-
: externalId,
|
|
575
|
-
},
|
|
787
|
+
sourceRef,
|
|
576
788
|
threadId: row.thread_id ? toText(row.thread_id) : undefined,
|
|
577
|
-
chatType
|
|
789
|
+
chatType,
|
|
578
790
|
participantCount,
|
|
579
791
|
gmailAccountId: row.gmail_account_id
|
|
580
792
|
? toText(row.gmail_account_id)
|
|
@@ -582,8 +794,10 @@ function parseCachedInboxMessage(row) {
|
|
|
582
794
|
gmailAccountEmail: row.gmail_account_email
|
|
583
795
|
? toText(row.gmail_account_email)
|
|
584
796
|
: undefined,
|
|
797
|
+
lastSeenAt: row.last_seen_at ? toText(row.last_seen_at) : undefined,
|
|
798
|
+
repliedAt: row.replied_at ? toText(row.replied_at) : undefined,
|
|
585
799
|
priorityScore,
|
|
586
|
-
priorityCategory: priorityCategory,
|
|
800
|
+
priorityCategory: normalizeInboxPriorityCategory(priorityCategory),
|
|
587
801
|
cachedAt: toText(row.cached_at),
|
|
588
802
|
updatedAt: toText(row.updated_at),
|
|
589
803
|
priorityFlags: flags,
|
|
@@ -829,6 +1043,7 @@ function parseGmailSyncState(row) {
|
|
|
829
1043
|
provider: toText(row.provider),
|
|
830
1044
|
side: toText(row.side, "owner"),
|
|
831
1045
|
mailbox: toText(row.mailbox),
|
|
1046
|
+
grantId: toText(row.grant_id),
|
|
832
1047
|
maxResults: toNumber(row.max_results, 0),
|
|
833
1048
|
syncedAt: toText(row.synced_at),
|
|
834
1049
|
updatedAt: toText(row.updated_at),
|
|
@@ -1191,9 +1406,59 @@ function parseDossier(row) {
|
|
|
1191
1406
|
updatedAt: toText(row.updated_at),
|
|
1192
1407
|
};
|
|
1193
1408
|
}
|
|
1194
|
-
function
|
|
1195
|
-
const message = error
|
|
1196
|
-
|
|
1409
|
+
function isMissingTableError(error, table) {
|
|
1410
|
+
const message = errorMessagesWithCauses(error).join("\n");
|
|
1411
|
+
const escaped = table.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1412
|
+
const pattern = new RegExp(`no such table: ${escaped}|relation ["']?${escaped}["']? does not exist|undefined table`, "i");
|
|
1413
|
+
return pattern.test(message);
|
|
1414
|
+
}
|
|
1415
|
+
/**
|
|
1416
|
+
* Probe whether a table exists by running a no-op query against it.
|
|
1417
|
+
*
|
|
1418
|
+
* Boot-order contract: callers MUST run after `adapter.runPluginMigrations`
|
|
1419
|
+
* has completed in `bootstrapSchema`, which already early-returns when the
|
|
1420
|
+
* adapter is missing or `adapter.isReady() === false`. We rely on that
|
|
1421
|
+
* gating; this helper does not re-check.
|
|
1422
|
+
*
|
|
1423
|
+
* SECURITY: `table` is interpolated directly into the SQL. Callers MUST
|
|
1424
|
+
* pass a hardcoded literal, NEVER a user-derived or runtime-derived name.
|
|
1425
|
+
* The current three callers (life_scheduling_negotiations,
|
|
1426
|
+
* life_activity_signals, life_inbox_messages) all pass string literals.
|
|
1427
|
+
*
|
|
1428
|
+
* Failure mode: any error other than the recognized "missing table"
|
|
1429
|
+
* patterns (`isMissingTableError`) rethrows. We deliberately fail loud on
|
|
1430
|
+
* connection / syntax / permission errors rather than silent-skip the
|
|
1431
|
+
* column-repair pass.
|
|
1432
|
+
*/
|
|
1433
|
+
async function tableExists(runtime, table) {
|
|
1434
|
+
try {
|
|
1435
|
+
await executeRawSql(runtime, `SELECT 1 FROM ${table} WHERE 1=0`);
|
|
1436
|
+
return true;
|
|
1437
|
+
}
|
|
1438
|
+
catch (error) {
|
|
1439
|
+
if (isMissingTableError(error, table)) {
|
|
1440
|
+
return false;
|
|
1441
|
+
}
|
|
1442
|
+
throw error;
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
function errorMessagesWithCauses(error) {
|
|
1446
|
+
const messages = [];
|
|
1447
|
+
let current = error;
|
|
1448
|
+
while (current && typeof current === "object") {
|
|
1449
|
+
if (current instanceof Error) {
|
|
1450
|
+
messages.push(current.message);
|
|
1451
|
+
}
|
|
1452
|
+
const cause = current.cause;
|
|
1453
|
+
if (!cause || cause === current) {
|
|
1454
|
+
break;
|
|
1455
|
+
}
|
|
1456
|
+
current = cause;
|
|
1457
|
+
}
|
|
1458
|
+
if (messages.length === 0) {
|
|
1459
|
+
messages.push(String(error));
|
|
1460
|
+
}
|
|
1461
|
+
return messages;
|
|
1197
1462
|
}
|
|
1198
1463
|
export class LifeOpsRepository {
|
|
1199
1464
|
runtime;
|
|
@@ -1237,17 +1502,29 @@ export class LifeOpsRepository {
|
|
|
1237
1502
|
force: process.env.ELIZA_ALLOW_DESTRUCTIVE_MIGRATIONS === "true",
|
|
1238
1503
|
dryRun: false,
|
|
1239
1504
|
});
|
|
1505
|
+
await LifeOpsRepository.ensureActivitySignalColumns(runtime);
|
|
1506
|
+
await LifeOpsRepository.ensureSchedulingNegotiationColumns(runtime);
|
|
1240
1507
|
await LifeOpsRepository.ensureInboxCacheIndexes(runtime);
|
|
1241
1508
|
}
|
|
1242
|
-
static async
|
|
1243
|
-
|
|
1244
|
-
|
|
1509
|
+
static async ensureSchedulingNegotiationColumns(runtime) {
|
|
1510
|
+
if (!(await tableExists(runtime, "life_scheduling_negotiations"))) {
|
|
1511
|
+
return;
|
|
1245
1512
|
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1513
|
+
await executeRawSql(runtime, "ALTER TABLE life_scheduling_negotiations ADD COLUMN IF NOT EXISTS accepted_proposal_id TEXT");
|
|
1514
|
+
}
|
|
1515
|
+
static async ensureActivitySignalColumns(runtime) {
|
|
1516
|
+
if (!(await tableExists(runtime, "life_activity_signals"))) {
|
|
1517
|
+
return;
|
|
1518
|
+
}
|
|
1519
|
+
await executeRawSql(runtime, "ALTER TABLE life_activity_signals ADD COLUMN IF NOT EXISTS platform TEXT NOT NULL DEFAULT ''");
|
|
1520
|
+
await executeRawSql(runtime, "ALTER TABLE life_activity_signals ADD COLUMN IF NOT EXISTS idle_state TEXT");
|
|
1521
|
+
await executeRawSql(runtime, "ALTER TABLE life_activity_signals ADD COLUMN IF NOT EXISTS idle_time_seconds INTEGER");
|
|
1522
|
+
await executeRawSql(runtime, "ALTER TABLE life_activity_signals ADD COLUMN IF NOT EXISTS on_battery BOOLEAN");
|
|
1523
|
+
await executeRawSql(runtime, "CREATE INDEX IF NOT EXISTS idx_life_activity_signals_agent ON life_activity_signals (agent_id, observed_at)");
|
|
1524
|
+
}
|
|
1525
|
+
static async ensureInboxCacheIndexes(runtime) {
|
|
1526
|
+
if (!(await tableExists(runtime, "life_inbox_messages"))) {
|
|
1527
|
+
return;
|
|
1251
1528
|
}
|
|
1252
1529
|
await executeRawSql(runtime, `DELETE FROM life_inbox_messages
|
|
1253
1530
|
WHERE id IN (
|
|
@@ -1264,6 +1541,25 @@ export class LifeOpsRepository {
|
|
|
1264
1541
|
)`);
|
|
1265
1542
|
await executeRawSql(runtime, `CREATE UNIQUE INDEX IF NOT EXISTS idx_life_inbox_messages_agent_channel_external
|
|
1266
1543
|
ON life_inbox_messages (agent_id, channel, external_id)`);
|
|
1544
|
+
const inboxCacheColumnRepairs = [
|
|
1545
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS thread_id TEXT",
|
|
1546
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS sender_email TEXT",
|
|
1547
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS subject TEXT",
|
|
1548
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS deep_link TEXT",
|
|
1549
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS source_ref_json TEXT NOT NULL DEFAULT '{}'",
|
|
1550
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS chat_type TEXT NOT NULL DEFAULT 'channel'",
|
|
1551
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS participant_count INTEGER",
|
|
1552
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS gmail_account_id TEXT",
|
|
1553
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS gmail_account_email TEXT",
|
|
1554
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS last_seen_at TEXT",
|
|
1555
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS replied_at TEXT",
|
|
1556
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS priority_score INTEGER",
|
|
1557
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS priority_category TEXT",
|
|
1558
|
+
"ALTER TABLE life_inbox_messages ADD COLUMN IF NOT EXISTS priority_flags_json TEXT NOT NULL DEFAULT '[]'",
|
|
1559
|
+
];
|
|
1560
|
+
for (const statement of inboxCacheColumnRepairs) {
|
|
1561
|
+
await executeRawSql(runtime, statement);
|
|
1562
|
+
}
|
|
1267
1563
|
}
|
|
1268
1564
|
async createDefinition(definition) {
|
|
1269
1565
|
await executeRawSql(this.runtime, `INSERT INTO life_task_definitions (
|
|
@@ -2149,6 +2445,242 @@ export class LifeOpsRepository {
|
|
|
2149
2445
|
${limitClause}`);
|
|
2150
2446
|
return rows.map(parseActivitySignal);
|
|
2151
2447
|
}
|
|
2448
|
+
async upsertHealthMetricSample(sample) {
|
|
2449
|
+
await executeRawSql(this.runtime, `INSERT INTO life_health_metric_samples (
|
|
2450
|
+
id, agent_id, provider, grant_id, metric, value, unit, start_at, end_at,
|
|
2451
|
+
local_date, source_external_id, metadata_json, created_at, updated_at
|
|
2452
|
+
) VALUES (
|
|
2453
|
+
${sqlQuote(sample.id)},
|
|
2454
|
+
${sqlQuote(sample.agentId)},
|
|
2455
|
+
${sqlQuote(sample.provider)},
|
|
2456
|
+
${sqlText(sample.grantId)},
|
|
2457
|
+
${sqlQuote(sample.metric)},
|
|
2458
|
+
${sqlNumber(sample.value)},
|
|
2459
|
+
${sqlQuote(sample.unit)},
|
|
2460
|
+
${sqlQuote(sample.startAt)},
|
|
2461
|
+
${sqlQuote(sample.endAt)},
|
|
2462
|
+
${sqlQuote(sample.localDate)},
|
|
2463
|
+
${sqlText(sample.sourceExternalId)},
|
|
2464
|
+
${sqlJson(sample.metadata)},
|
|
2465
|
+
${sqlQuote(sample.createdAt)},
|
|
2466
|
+
${sqlQuote(sample.updatedAt)}
|
|
2467
|
+
)
|
|
2468
|
+
ON CONFLICT(agent_id, provider, grant_id, metric, start_at, source_external_id)
|
|
2469
|
+
DO UPDATE SET
|
|
2470
|
+
value = excluded.value,
|
|
2471
|
+
unit = excluded.unit,
|
|
2472
|
+
end_at = excluded.end_at,
|
|
2473
|
+
local_date = excluded.local_date,
|
|
2474
|
+
metadata_json = excluded.metadata_json,
|
|
2475
|
+
updated_at = excluded.updated_at`);
|
|
2476
|
+
}
|
|
2477
|
+
async listHealthMetricSamples(agentId, args = {}) {
|
|
2478
|
+
const clauses = [`agent_id = ${sqlQuote(agentId)}`];
|
|
2479
|
+
if (args.provider) {
|
|
2480
|
+
clauses.push(`provider = ${sqlQuote(args.provider)}`);
|
|
2481
|
+
}
|
|
2482
|
+
if (args.startDate) {
|
|
2483
|
+
clauses.push(`local_date >= ${sqlQuote(args.startDate)}`);
|
|
2484
|
+
}
|
|
2485
|
+
if (args.endDate) {
|
|
2486
|
+
clauses.push(`local_date <= ${sqlQuote(args.endDate)}`);
|
|
2487
|
+
}
|
|
2488
|
+
if (args.metrics && args.metrics.length > 0) {
|
|
2489
|
+
clauses.push(`metric IN (${args.metrics.map((metric) => sqlQuote(metric)).join(", ")})`);
|
|
2490
|
+
}
|
|
2491
|
+
const limitClause = typeof args.limit === "number" && args.limit > 0
|
|
2492
|
+
? `LIMIT ${Math.trunc(args.limit)}`
|
|
2493
|
+
: "";
|
|
2494
|
+
const rows = await executeRawSql(this.runtime, `SELECT *
|
|
2495
|
+
FROM life_health_metric_samples
|
|
2496
|
+
WHERE ${clauses.join("\n AND ")}
|
|
2497
|
+
ORDER BY start_at DESC, metric ASC
|
|
2498
|
+
${limitClause}`);
|
|
2499
|
+
return rows.map(parseHealthMetricSample);
|
|
2500
|
+
}
|
|
2501
|
+
async upsertHealthWorkout(workout) {
|
|
2502
|
+
await executeRawSql(this.runtime, `INSERT INTO life_health_workouts (
|
|
2503
|
+
id, agent_id, provider, grant_id, source_external_id, workout_type,
|
|
2504
|
+
title, start_at, end_at, duration_seconds, distance_meters, calories,
|
|
2505
|
+
average_heart_rate, max_heart_rate, metadata_json, created_at,
|
|
2506
|
+
updated_at
|
|
2507
|
+
) VALUES (
|
|
2508
|
+
${sqlQuote(workout.id)},
|
|
2509
|
+
${sqlQuote(workout.agentId)},
|
|
2510
|
+
${sqlQuote(workout.provider)},
|
|
2511
|
+
${sqlText(workout.grantId)},
|
|
2512
|
+
${sqlQuote(workout.sourceExternalId)},
|
|
2513
|
+
${sqlQuote(workout.workoutType)},
|
|
2514
|
+
${sqlQuote(workout.title)},
|
|
2515
|
+
${sqlQuote(workout.startAt)},
|
|
2516
|
+
${sqlText(workout.endAt)},
|
|
2517
|
+
${sqlInteger(workout.durationSeconds)},
|
|
2518
|
+
${sqlNumber(workout.distanceMeters)},
|
|
2519
|
+
${sqlNumber(workout.calories)},
|
|
2520
|
+
${sqlNumber(workout.averageHeartRate)},
|
|
2521
|
+
${sqlNumber(workout.maxHeartRate)},
|
|
2522
|
+
${sqlJson(workout.metadata)},
|
|
2523
|
+
${sqlQuote(workout.createdAt)},
|
|
2524
|
+
${sqlQuote(workout.updatedAt)}
|
|
2525
|
+
)
|
|
2526
|
+
ON CONFLICT(agent_id, provider, grant_id, source_external_id) DO UPDATE SET
|
|
2527
|
+
workout_type = excluded.workout_type,
|
|
2528
|
+
title = excluded.title,
|
|
2529
|
+
start_at = excluded.start_at,
|
|
2530
|
+
end_at = excluded.end_at,
|
|
2531
|
+
duration_seconds = excluded.duration_seconds,
|
|
2532
|
+
distance_meters = excluded.distance_meters,
|
|
2533
|
+
calories = excluded.calories,
|
|
2534
|
+
average_heart_rate = excluded.average_heart_rate,
|
|
2535
|
+
max_heart_rate = excluded.max_heart_rate,
|
|
2536
|
+
metadata_json = excluded.metadata_json,
|
|
2537
|
+
updated_at = excluded.updated_at`);
|
|
2538
|
+
}
|
|
2539
|
+
async listHealthWorkouts(agentId, args = {}) {
|
|
2540
|
+
const clauses = [`agent_id = ${sqlQuote(agentId)}`];
|
|
2541
|
+
if (args.provider) {
|
|
2542
|
+
clauses.push(`provider = ${sqlQuote(args.provider)}`);
|
|
2543
|
+
}
|
|
2544
|
+
if (args.startDate) {
|
|
2545
|
+
clauses.push(`start_at >= ${sqlQuote(`${args.startDate}T00:00:00.000Z`)}`);
|
|
2546
|
+
}
|
|
2547
|
+
if (args.endDate) {
|
|
2548
|
+
clauses.push(`start_at <= ${sqlQuote(`${args.endDate}T23:59:59.999Z`)}`);
|
|
2549
|
+
}
|
|
2550
|
+
const limitClause = typeof args.limit === "number" && args.limit > 0
|
|
2551
|
+
? `LIMIT ${Math.trunc(args.limit)}`
|
|
2552
|
+
: "";
|
|
2553
|
+
const rows = await executeRawSql(this.runtime, `SELECT *
|
|
2554
|
+
FROM life_health_workouts
|
|
2555
|
+
WHERE ${clauses.join("\n AND ")}
|
|
2556
|
+
ORDER BY start_at DESC
|
|
2557
|
+
${limitClause}`);
|
|
2558
|
+
return rows.map(parseHealthWorkout);
|
|
2559
|
+
}
|
|
2560
|
+
async upsertHealthSleepEpisode(episode) {
|
|
2561
|
+
await executeRawSql(this.runtime, `INSERT INTO life_health_sleep_episodes (
|
|
2562
|
+
id, agent_id, provider, grant_id, source_external_id, local_date,
|
|
2563
|
+
timezone, start_at, end_at, is_main_sleep, sleep_type,
|
|
2564
|
+
duration_seconds, time_in_bed_seconds, efficiency, latency_seconds,
|
|
2565
|
+
awake_seconds, light_sleep_seconds, deep_sleep_seconds,
|
|
2566
|
+
rem_sleep_seconds, sleep_score, readiness_score, average_heart_rate,
|
|
2567
|
+
lowest_heart_rate, average_hrv_ms, respiratory_rate,
|
|
2568
|
+
blood_oxygen_percent, stage_samples_json, metadata_json, created_at,
|
|
2569
|
+
updated_at
|
|
2570
|
+
) VALUES (
|
|
2571
|
+
${sqlQuote(episode.id)},
|
|
2572
|
+
${sqlQuote(episode.agentId)},
|
|
2573
|
+
${sqlQuote(episode.provider)},
|
|
2574
|
+
${sqlQuote(episode.grantId)},
|
|
2575
|
+
${sqlQuote(episode.sourceExternalId)},
|
|
2576
|
+
${sqlQuote(episode.localDate)},
|
|
2577
|
+
${sqlText(episode.timezone)},
|
|
2578
|
+
${sqlQuote(episode.startAt)},
|
|
2579
|
+
${sqlQuote(episode.endAt)},
|
|
2580
|
+
${sqlBoolean(episode.isMainSleep)},
|
|
2581
|
+
${sqlText(episode.sleepType)},
|
|
2582
|
+
${sqlInteger(episode.durationSeconds)},
|
|
2583
|
+
${sqlInteger(episode.timeInBedSeconds)},
|
|
2584
|
+
${sqlNumber(episode.efficiency)},
|
|
2585
|
+
${sqlInteger(episode.latencySeconds)},
|
|
2586
|
+
${sqlInteger(episode.awakeSeconds)},
|
|
2587
|
+
${sqlInteger(episode.lightSleepSeconds)},
|
|
2588
|
+
${sqlInteger(episode.deepSleepSeconds)},
|
|
2589
|
+
${sqlInteger(episode.remSleepSeconds)},
|
|
2590
|
+
${sqlNumber(episode.sleepScore)},
|
|
2591
|
+
${sqlNumber(episode.readinessScore)},
|
|
2592
|
+
${sqlNumber(episode.averageHeartRate)},
|
|
2593
|
+
${sqlNumber(episode.lowestHeartRate)},
|
|
2594
|
+
${sqlNumber(episode.averageHrvMs)},
|
|
2595
|
+
${sqlNumber(episode.respiratoryRate)},
|
|
2596
|
+
${sqlNumber(episode.bloodOxygenPercent)},
|
|
2597
|
+
${sqlJson(episode.stageSamples)},
|
|
2598
|
+
${sqlJson(episode.metadata)},
|
|
2599
|
+
${sqlQuote(episode.createdAt)},
|
|
2600
|
+
${sqlQuote(episode.updatedAt)}
|
|
2601
|
+
)
|
|
2602
|
+
ON CONFLICT(agent_id, provider, grant_id, source_external_id) DO UPDATE SET
|
|
2603
|
+
local_date = excluded.local_date,
|
|
2604
|
+
timezone = excluded.timezone,
|
|
2605
|
+
start_at = excluded.start_at,
|
|
2606
|
+
end_at = excluded.end_at,
|
|
2607
|
+
is_main_sleep = excluded.is_main_sleep,
|
|
2608
|
+
sleep_type = excluded.sleep_type,
|
|
2609
|
+
duration_seconds = excluded.duration_seconds,
|
|
2610
|
+
time_in_bed_seconds = excluded.time_in_bed_seconds,
|
|
2611
|
+
efficiency = excluded.efficiency,
|
|
2612
|
+
latency_seconds = excluded.latency_seconds,
|
|
2613
|
+
awake_seconds = excluded.awake_seconds,
|
|
2614
|
+
light_sleep_seconds = excluded.light_sleep_seconds,
|
|
2615
|
+
deep_sleep_seconds = excluded.deep_sleep_seconds,
|
|
2616
|
+
rem_sleep_seconds = excluded.rem_sleep_seconds,
|
|
2617
|
+
sleep_score = excluded.sleep_score,
|
|
2618
|
+
readiness_score = excluded.readiness_score,
|
|
2619
|
+
average_heart_rate = excluded.average_heart_rate,
|
|
2620
|
+
lowest_heart_rate = excluded.lowest_heart_rate,
|
|
2621
|
+
average_hrv_ms = excluded.average_hrv_ms,
|
|
2622
|
+
respiratory_rate = excluded.respiratory_rate,
|
|
2623
|
+
blood_oxygen_percent = excluded.blood_oxygen_percent,
|
|
2624
|
+
stage_samples_json = excluded.stage_samples_json,
|
|
2625
|
+
metadata_json = excluded.metadata_json,
|
|
2626
|
+
updated_at = excluded.updated_at`);
|
|
2627
|
+
}
|
|
2628
|
+
async listHealthSleepEpisodes(agentId, args = {}) {
|
|
2629
|
+
const clauses = [`agent_id = ${sqlQuote(agentId)}`];
|
|
2630
|
+
if (args.provider) {
|
|
2631
|
+
clauses.push(`provider = ${sqlQuote(args.provider)}`);
|
|
2632
|
+
}
|
|
2633
|
+
if (args.startDate) {
|
|
2634
|
+
clauses.push(`local_date >= ${sqlQuote(args.startDate)}`);
|
|
2635
|
+
}
|
|
2636
|
+
if (args.endDate) {
|
|
2637
|
+
clauses.push(`local_date <= ${sqlQuote(args.endDate)}`);
|
|
2638
|
+
}
|
|
2639
|
+
const limitClause = typeof args.limit === "number" && args.limit > 0
|
|
2640
|
+
? `LIMIT ${Math.trunc(args.limit)}`
|
|
2641
|
+
: "";
|
|
2642
|
+
const rows = await executeRawSql(this.runtime, `SELECT *
|
|
2643
|
+
FROM life_health_sleep_episodes
|
|
2644
|
+
WHERE ${clauses.join("\n AND ")}
|
|
2645
|
+
ORDER BY start_at DESC
|
|
2646
|
+
${limitClause}`);
|
|
2647
|
+
return rows.map(parseHealthSleepEpisode);
|
|
2648
|
+
}
|
|
2649
|
+
async upsertHealthSyncState(state) {
|
|
2650
|
+
await executeRawSql(this.runtime, `INSERT INTO life_health_sync_states (
|
|
2651
|
+
id, agent_id, provider, grant_id, cursor, last_synced_at,
|
|
2652
|
+
last_sync_started_at, last_sync_error, metadata_json, updated_at
|
|
2653
|
+
) VALUES (
|
|
2654
|
+
${sqlQuote(state.id)},
|
|
2655
|
+
${sqlQuote(state.agentId)},
|
|
2656
|
+
${sqlQuote(state.provider)},
|
|
2657
|
+
${sqlQuote(state.grantId)},
|
|
2658
|
+
${sqlText(state.cursor)},
|
|
2659
|
+
${sqlText(state.lastSyncedAt)},
|
|
2660
|
+
${sqlText(state.lastSyncStartedAt)},
|
|
2661
|
+
${sqlText(state.lastSyncError)},
|
|
2662
|
+
${sqlJson(state.metadata)},
|
|
2663
|
+
${sqlQuote(state.updatedAt)}
|
|
2664
|
+
)
|
|
2665
|
+
ON CONFLICT(agent_id, provider, grant_id) DO UPDATE SET
|
|
2666
|
+
cursor = excluded.cursor,
|
|
2667
|
+
last_synced_at = excluded.last_synced_at,
|
|
2668
|
+
last_sync_started_at = excluded.last_sync_started_at,
|
|
2669
|
+
last_sync_error = excluded.last_sync_error,
|
|
2670
|
+
metadata_json = excluded.metadata_json,
|
|
2671
|
+
updated_at = excluded.updated_at`);
|
|
2672
|
+
}
|
|
2673
|
+
async getHealthSyncState(agentId, provider, grantId) {
|
|
2674
|
+
const rows = await executeRawSql(this.runtime, `SELECT *
|
|
2675
|
+
FROM life_health_sync_states
|
|
2676
|
+
WHERE agent_id = ${sqlQuote(agentId)}
|
|
2677
|
+
AND provider = ${sqlQuote(provider)}
|
|
2678
|
+
AND grant_id = ${sqlQuote(grantId)}
|
|
2679
|
+
ORDER BY updated_at DESC
|
|
2680
|
+
LIMIT 1`);
|
|
2681
|
+
const row = rows[0];
|
|
2682
|
+
return row ? parseHealthSyncState(row) : null;
|
|
2683
|
+
}
|
|
2152
2684
|
async upsertChannelPolicy(policy) {
|
|
2153
2685
|
await executeRawSql(this.runtime, `INSERT INTO life_channel_policies (
|
|
2154
2686
|
id, agent_id, channel_type, channel_ref, privacy_class,
|
|
@@ -2336,14 +2868,16 @@ export class LifeOpsRepository {
|
|
|
2336
2868
|
const row = rows[0];
|
|
2337
2869
|
return row ? parseConnectorGrant(row) : null;
|
|
2338
2870
|
}
|
|
2339
|
-
async deleteConnectorGrant(agentId, provider, mode, side) {
|
|
2871
|
+
async deleteConnectorGrant(agentId, provider, mode, side, grantId) {
|
|
2340
2872
|
const modeClause = mode ? `AND mode = ${sqlQuote(mode)}` : "";
|
|
2341
2873
|
const sideClause = side ? `AND side = ${sqlQuote(side)}` : "";
|
|
2874
|
+
const grantClause = grantId ? `AND id = ${sqlQuote(grantId)}` : "";
|
|
2342
2875
|
await executeRawSql(this.runtime, `DELETE FROM life_connector_grants
|
|
2343
2876
|
WHERE agent_id = ${sqlQuote(agentId)}
|
|
2344
2877
|
AND provider = ${sqlQuote(provider)}
|
|
2345
2878
|
${modeClause}
|
|
2346
|
-
${sideClause}
|
|
2879
|
+
${sideClause}
|
|
2880
|
+
${grantClause}`);
|
|
2347
2881
|
}
|
|
2348
2882
|
async upsertCalendarEvent(event, side = event.side) {
|
|
2349
2883
|
await executeRawSql(this.runtime, `INSERT INTO life_calendar_events (
|
|
@@ -2510,18 +3044,20 @@ export class LifeOpsRepository {
|
|
|
2510
3044
|
${sideClause}`);
|
|
2511
3045
|
}
|
|
2512
3046
|
async upsertGmailMessage(message, side = message.side) {
|
|
3047
|
+
const grantId = requireScopedGmailGrantId(message.grantId);
|
|
2513
3048
|
await executeRawSql(this.runtime, `INSERT INTO life_gmail_messages (
|
|
2514
|
-
id, agent_id, provider, side, external_message_id,
|
|
2515
|
-
from_display, from_email, reply_to, to_json, cc_json, snippet,
|
|
2516
|
-
received_at, is_unread, is_important, likely_reply_needed,
|
|
2517
|
-
|
|
2518
|
-
|
|
3049
|
+
id, agent_id, provider, side, external_message_id, grant_id, thread_id,
|
|
3050
|
+
subject, from_display, from_email, reply_to, to_json, cc_json, snippet,
|
|
3051
|
+
received_at, is_unread, is_important, likely_reply_needed, triage_score,
|
|
3052
|
+
triage_reason, label_ids_json, html_link, metadata_json, synced_at,
|
|
3053
|
+
updated_at
|
|
2519
3054
|
) VALUES (
|
|
2520
3055
|
${sqlQuote(message.id)},
|
|
2521
3056
|
${sqlQuote(message.agentId)},
|
|
2522
3057
|
${sqlQuote(message.provider)},
|
|
2523
3058
|
${sqlQuote(side)},
|
|
2524
3059
|
${sqlQuote(message.externalId)},
|
|
3060
|
+
${sqlQuote(grantId)},
|
|
2525
3061
|
${sqlQuote(message.threadId)},
|
|
2526
3062
|
${sqlQuote(message.subject)},
|
|
2527
3063
|
${sqlQuote(message.from)},
|
|
@@ -2542,7 +3078,8 @@ export class LifeOpsRepository {
|
|
|
2542
3078
|
${sqlQuote(message.syncedAt)},
|
|
2543
3079
|
${sqlQuote(message.updatedAt)}
|
|
2544
3080
|
)
|
|
2545
|
-
ON CONFLICT(agent_id, provider, side, external_message_id) DO UPDATE SET
|
|
3081
|
+
ON CONFLICT(agent_id, provider, side, grant_id, external_message_id) DO UPDATE SET
|
|
3082
|
+
id = excluded.id,
|
|
2546
3083
|
thread_id = excluded.thread_id,
|
|
2547
3084
|
subject = excluded.subject,
|
|
2548
3085
|
from_display = excluded.from_display,
|
|
@@ -2563,17 +3100,19 @@ export class LifeOpsRepository {
|
|
|
2563
3100
|
synced_at = excluded.synced_at,
|
|
2564
3101
|
updated_at = excluded.updated_at`);
|
|
2565
3102
|
}
|
|
2566
|
-
async pruneGmailMessages(agentId, provider, keepExternalIds, side) {
|
|
3103
|
+
async pruneGmailMessages(agentId, provider, keepExternalIds, side, grantId) {
|
|
2567
3104
|
const keepClause = keepExternalIds.length > 0
|
|
2568
3105
|
? `AND external_message_id NOT IN (${keepExternalIds
|
|
2569
3106
|
.map((externalId) => sqlQuote(externalId))
|
|
2570
3107
|
.join(", ")})`
|
|
2571
3108
|
: "";
|
|
2572
3109
|
const sideClause = side ? `AND side = ${sqlQuote(side)}` : "";
|
|
3110
|
+
const grantClause = grantId ? `AND grant_id = ${sqlQuote(grantId)}` : "";
|
|
2573
3111
|
await executeRawSql(this.runtime, `DELETE FROM life_gmail_messages
|
|
2574
3112
|
WHERE agent_id = ${sqlQuote(agentId)}
|
|
2575
3113
|
AND provider = ${sqlQuote(provider)}
|
|
2576
3114
|
${sideClause}
|
|
3115
|
+
${grantClause}
|
|
2577
3116
|
${keepClause}`);
|
|
2578
3117
|
}
|
|
2579
3118
|
async listGmailMessages(agentId, provider, options, side) {
|
|
@@ -2589,24 +3128,30 @@ export class LifeOpsRepository {
|
|
|
2589
3128
|
? `AND received_at >= ${sqlQuote(options.since)}`
|
|
2590
3129
|
: "";
|
|
2591
3130
|
const sideClause = side ? `AND side = ${sqlQuote(side)}` : "";
|
|
3131
|
+
const grantClause = options?.grantId
|
|
3132
|
+
? `AND grant_id = ${sqlQuote(options.grantId)}`
|
|
3133
|
+
: "";
|
|
2592
3134
|
const rows = await executeRawSql(this.runtime, `SELECT *
|
|
2593
3135
|
FROM life_gmail_messages
|
|
2594
3136
|
WHERE agent_id = ${sqlQuote(agentId)}
|
|
2595
3137
|
AND provider = ${sqlQuote(provider)}
|
|
2596
3138
|
${sideClause}
|
|
3139
|
+
${grantClause}
|
|
2597
3140
|
${threadClause}
|
|
2598
3141
|
${sinceClause}
|
|
2599
3142
|
ORDER BY triage_score DESC, received_at DESC
|
|
2600
3143
|
${maxResultsClause}`);
|
|
2601
3144
|
return rows.map(parseGmailMessageSummary);
|
|
2602
3145
|
}
|
|
2603
|
-
async getGmailMessage(agentId, provider, messageId, side) {
|
|
3146
|
+
async getGmailMessage(agentId, provider, messageId, side, grantId) {
|
|
2604
3147
|
const sideClause = side ? `AND side = ${sqlQuote(side)}` : "";
|
|
3148
|
+
const grantClause = grantId ? `AND grant_id = ${sqlQuote(grantId)}` : "";
|
|
2605
3149
|
const rows = await executeRawSql(this.runtime, `SELECT *
|
|
2606
3150
|
FROM life_gmail_messages
|
|
2607
3151
|
WHERE agent_id = ${sqlQuote(agentId)}
|
|
2608
3152
|
AND provider = ${sqlQuote(provider)}
|
|
2609
3153
|
${sideClause}
|
|
3154
|
+
${grantClause}
|
|
2610
3155
|
AND id = ${sqlQuote(messageId)}
|
|
2611
3156
|
LIMIT 1`);
|
|
2612
3157
|
const row = rows[0];
|
|
@@ -2617,17 +3162,25 @@ export class LifeOpsRepository {
|
|
|
2617
3162
|
return;
|
|
2618
3163
|
const now = isoNow();
|
|
2619
3164
|
for (const message of messages) {
|
|
3165
|
+
const channel = normalizeInboxChannelValue(message.channel);
|
|
3166
|
+
const sourceRef = normalizeInboxWriteSourceRef(message.sourceRef, channel);
|
|
3167
|
+
const chatType = normalizeInboxChatType(channel, message.chatType, message.participantCount);
|
|
3168
|
+
const hasPriorityFlags = hasOwnPriorityFlags(message);
|
|
3169
|
+
const priorityFlags = normalizeInboxPriorityFlags(message.priorityFlags);
|
|
3170
|
+
const priorityFlagsUpdate = hasPriorityFlags
|
|
3171
|
+
? "excluded.priority_flags_json"
|
|
3172
|
+
: "life_inbox_messages.priority_flags_json";
|
|
2620
3173
|
await executeRawSql(this.runtime, `INSERT INTO life_inbox_messages (
|
|
2621
3174
|
id, agent_id, channel, external_id, thread_id, sender_id,
|
|
2622
3175
|
sender_display, sender_email, subject, snippet, received_at,
|
|
2623
3176
|
is_unread, deep_link, source_ref_json, chat_type, participant_count,
|
|
2624
|
-
gmail_account_id, gmail_account_email, priority_score,
|
|
3177
|
+
gmail_account_id, gmail_account_email, last_seen_at, replied_at, priority_score,
|
|
2625
3178
|
priority_category, priority_flags_json, cached_at, updated_at
|
|
2626
3179
|
) VALUES (
|
|
2627
3180
|
${sqlQuote(message.id)},
|
|
2628
3181
|
${sqlQuote(agentId)},
|
|
2629
|
-
${sqlQuote(
|
|
2630
|
-
${sqlQuote(
|
|
3182
|
+
${sqlQuote(channel)},
|
|
3183
|
+
${sqlQuote(sourceRef.externalId)},
|
|
2631
3184
|
${sqlText(message.threadId)},
|
|
2632
3185
|
${sqlQuote(message.sender.id)},
|
|
2633
3186
|
${sqlQuote(message.sender.displayName)},
|
|
@@ -2637,14 +3190,16 @@ export class LifeOpsRepository {
|
|
|
2637
3190
|
${sqlQuote(message.receivedAt)},
|
|
2638
3191
|
${sqlBoolean(message.unread)},
|
|
2639
3192
|
${sqlText(message.deepLink)},
|
|
2640
|
-
${sqlJson(
|
|
2641
|
-
${sqlQuote(
|
|
3193
|
+
${sqlJson(sourceRef)},
|
|
3194
|
+
${sqlQuote(chatType)},
|
|
2642
3195
|
${sqlInteger(message.participantCount)},
|
|
2643
3196
|
${sqlText(message.gmailAccountId)},
|
|
2644
3197
|
${sqlText(message.gmailAccountEmail)},
|
|
3198
|
+
${sqlText(message.lastSeenAt)},
|
|
3199
|
+
${sqlText(message.repliedAt)},
|
|
2645
3200
|
${sqlInteger(message.priorityScore)},
|
|
2646
3201
|
${sqlText(message.priorityCategory)},
|
|
2647
|
-
${sqlJson(
|
|
3202
|
+
${sqlJson(priorityFlags)},
|
|
2648
3203
|
${sqlQuote(now)},
|
|
2649
3204
|
${sqlQuote(now)}
|
|
2650
3205
|
)
|
|
@@ -2664,19 +3219,19 @@ export class LifeOpsRepository {
|
|
|
2664
3219
|
participant_count = excluded.participant_count,
|
|
2665
3220
|
gmail_account_id = excluded.gmail_account_id,
|
|
2666
3221
|
gmail_account_email = excluded.gmail_account_email,
|
|
3222
|
+
last_seen_at = COALESCE(excluded.last_seen_at, life_inbox_messages.last_seen_at),
|
|
3223
|
+
replied_at = COALESCE(excluded.replied_at, life_inbox_messages.replied_at),
|
|
2667
3224
|
priority_score = COALESCE(excluded.priority_score, life_inbox_messages.priority_score),
|
|
2668
3225
|
priority_category = COALESCE(excluded.priority_category, life_inbox_messages.priority_category),
|
|
2669
|
-
priority_flags_json =
|
|
2670
|
-
WHEN excluded.priority_score IS NULL THEN life_inbox_messages.priority_flags_json
|
|
2671
|
-
ELSE excluded.priority_flags_json
|
|
2672
|
-
END,
|
|
3226
|
+
priority_flags_json = ${priorityFlagsUpdate},
|
|
2673
3227
|
cached_at = excluded.cached_at,
|
|
2674
3228
|
updated_at = excluded.updated_at`);
|
|
2675
3229
|
}
|
|
2676
3230
|
}
|
|
2677
3231
|
async listCachedInboxMessages(agentId, options) {
|
|
2678
|
-
const
|
|
2679
|
-
|
|
3232
|
+
const channels = options?.channels?.map((channel) => normalizeInboxChannelValue(channel)) ?? [];
|
|
3233
|
+
const channelClause = channels.length > 0
|
|
3234
|
+
? `AND channel IN (${channels
|
|
2680
3235
|
.map((channel) => sqlQuote(channel))
|
|
2681
3236
|
.join(", ")})`
|
|
2682
3237
|
: "";
|
|
@@ -2695,62 +3250,89 @@ export class LifeOpsRepository {
|
|
|
2695
3250
|
LIMIT ${sqlInteger(limit)}`);
|
|
2696
3251
|
return rows.map(parseCachedInboxMessage);
|
|
2697
3252
|
}
|
|
2698
|
-
async
|
|
3253
|
+
async markCachedInboxMessageRead(agentId, messageId, readAt = isoNow()) {
|
|
3254
|
+
await executeRawSql(this.runtime, `UPDATE life_inbox_messages
|
|
3255
|
+
SET is_unread = ${sqlBoolean(false)},
|
|
3256
|
+
last_seen_at = ${sqlQuote(readAt)},
|
|
3257
|
+
updated_at = ${sqlQuote(readAt)}
|
|
3258
|
+
WHERE agent_id = ${sqlQuote(agentId)}
|
|
3259
|
+
AND id = ${sqlQuote(messageId)}`);
|
|
3260
|
+
const rows = await executeRawSql(this.runtime, `SELECT *
|
|
3261
|
+
FROM life_inbox_messages
|
|
3262
|
+
WHERE agent_id = ${sqlQuote(agentId)}
|
|
3263
|
+
AND id = ${sqlQuote(messageId)}
|
|
3264
|
+
LIMIT 1`);
|
|
3265
|
+
const row = rows[0];
|
|
3266
|
+
return row ? parseCachedInboxMessage(row) : null;
|
|
3267
|
+
}
|
|
3268
|
+
async deleteGmailMessages(agentId, provider, messageIds, side, grantId) {
|
|
2699
3269
|
if (messageIds.length === 0) {
|
|
2700
3270
|
return;
|
|
2701
3271
|
}
|
|
2702
3272
|
const sideClause = side ? `AND side = ${sqlQuote(side)}` : "";
|
|
3273
|
+
const grantClause = grantId ? `AND grant_id = ${sqlQuote(grantId)}` : "";
|
|
2703
3274
|
await executeRawSql(this.runtime, `DELETE FROM life_gmail_messages
|
|
2704
3275
|
WHERE agent_id = ${sqlQuote(agentId)}
|
|
2705
3276
|
AND provider = ${sqlQuote(provider)}
|
|
2706
3277
|
${sideClause}
|
|
3278
|
+
${grantClause}
|
|
2707
3279
|
AND id IN (${messageIds.map((messageId) => sqlQuote(messageId)).join(", ")})`);
|
|
2708
3280
|
}
|
|
2709
|
-
async deleteGmailMessagesForProvider(agentId, provider, side) {
|
|
3281
|
+
async deleteGmailMessagesForProvider(agentId, provider, side, grantId) {
|
|
2710
3282
|
const sideClause = side ? `AND side = ${sqlQuote(side)}` : "";
|
|
3283
|
+
const grantClause = grantId ? `AND grant_id = ${sqlQuote(grantId)}` : "";
|
|
2711
3284
|
await executeRawSql(this.runtime, `DELETE FROM life_gmail_messages
|
|
2712
3285
|
WHERE agent_id = ${sqlQuote(agentId)}
|
|
2713
3286
|
AND provider = ${sqlQuote(provider)}
|
|
2714
|
-
${sideClause}
|
|
3287
|
+
${sideClause}
|
|
3288
|
+
${grantClause}`);
|
|
2715
3289
|
}
|
|
2716
3290
|
async upsertGmailSyncState(state) {
|
|
3291
|
+
const grantId = requireScopedGmailGrantId(state.grantId);
|
|
2717
3292
|
await executeRawSql(this.runtime, `INSERT INTO life_gmail_sync_states (
|
|
2718
|
-
id, agent_id, provider, side, mailbox, max_results, synced_at,
|
|
3293
|
+
id, agent_id, provider, side, mailbox, grant_id, max_results, synced_at,
|
|
3294
|
+
updated_at
|
|
2719
3295
|
) VALUES (
|
|
2720
3296
|
${sqlQuote(state.id)},
|
|
2721
3297
|
${sqlQuote(state.agentId)},
|
|
2722
3298
|
${sqlQuote(state.provider)},
|
|
2723
3299
|
${sqlQuote(state.side)},
|
|
2724
3300
|
${sqlQuote(state.mailbox)},
|
|
3301
|
+
${sqlQuote(grantId)},
|
|
2725
3302
|
${sqlInteger(state.maxResults)},
|
|
2726
3303
|
${sqlQuote(state.syncedAt)},
|
|
2727
3304
|
${sqlQuote(state.updatedAt)}
|
|
2728
3305
|
)
|
|
2729
|
-
ON CONFLICT(agent_id, provider, side, mailbox) DO UPDATE SET
|
|
3306
|
+
ON CONFLICT(agent_id, provider, side, grant_id, mailbox) DO UPDATE SET
|
|
3307
|
+
id = excluded.id,
|
|
2730
3308
|
max_results = excluded.max_results,
|
|
2731
3309
|
synced_at = excluded.synced_at,
|
|
2732
3310
|
updated_at = excluded.updated_at`);
|
|
2733
3311
|
}
|
|
2734
|
-
async getGmailSyncState(agentId, provider, mailbox, side) {
|
|
3312
|
+
async getGmailSyncState(agentId, provider, mailbox, side, grantId) {
|
|
2735
3313
|
const sideClause = side ? `AND side = ${sqlQuote(side)}` : "";
|
|
3314
|
+
const grantClause = grantId ? `AND grant_id = ${sqlQuote(grantId)}` : "";
|
|
2736
3315
|
const rows = await executeRawSql(this.runtime, `SELECT *
|
|
2737
3316
|
FROM life_gmail_sync_states
|
|
2738
3317
|
WHERE agent_id = ${sqlQuote(agentId)}
|
|
2739
3318
|
AND provider = ${sqlQuote(provider)}
|
|
2740
3319
|
AND mailbox = ${sqlQuote(mailbox)}
|
|
2741
3320
|
${sideClause}
|
|
3321
|
+
${grantClause}
|
|
2742
3322
|
LIMIT 1`);
|
|
2743
3323
|
const row = rows[0];
|
|
2744
3324
|
return row ? parseGmailSyncState(row) : null;
|
|
2745
3325
|
}
|
|
2746
|
-
async deleteGmailSyncState(agentId, provider, mailbox, side) {
|
|
3326
|
+
async deleteGmailSyncState(agentId, provider, mailbox, side, grantId) {
|
|
2747
3327
|
const mailboxClause = mailbox ? `AND mailbox = ${sqlQuote(mailbox)}` : "";
|
|
2748
3328
|
const sideClause = side ? `AND side = ${sqlQuote(side)}` : "";
|
|
3329
|
+
const grantClause = grantId ? `AND grant_id = ${sqlQuote(grantId)}` : "";
|
|
2749
3330
|
await executeRawSql(this.runtime, `DELETE FROM life_gmail_sync_states
|
|
2750
3331
|
WHERE agent_id = ${sqlQuote(agentId)}
|
|
2751
3332
|
AND provider = ${sqlQuote(provider)}
|
|
2752
3333
|
${mailboxClause}
|
|
2753
|
-
${sideClause}
|
|
3334
|
+
${sideClause}
|
|
3335
|
+
${grantClause}`);
|
|
2754
3336
|
}
|
|
2755
3337
|
async upsertGmailSpamReviewItem(item) {
|
|
2756
3338
|
await executeRawSql(this.runtime, `INSERT INTO life_gmail_spam_review_items (
|
|
@@ -2840,12 +3422,14 @@ export class LifeOpsRepository {
|
|
|
2840
3422
|
${sideClause}
|
|
2841
3423
|
AND id = ${sqlQuote(itemId)}`);
|
|
2842
3424
|
}
|
|
2843
|
-
async deleteGmailSpamReviewItemsForProvider(agentId, provider, side) {
|
|
3425
|
+
async deleteGmailSpamReviewItemsForProvider(agentId, provider, side, grantId) {
|
|
2844
3426
|
const sideClause = side ? `AND side = ${sqlQuote(side)}` : "";
|
|
3427
|
+
const grantClause = grantId ? `AND grant_id = ${sqlQuote(grantId)}` : "";
|
|
2845
3428
|
await executeRawSql(this.runtime, `DELETE FROM life_gmail_spam_review_items
|
|
2846
3429
|
WHERE agent_id = ${sqlQuote(agentId)}
|
|
2847
3430
|
AND provider = ${sqlQuote(provider)}
|
|
2848
|
-
${sideClause}
|
|
3431
|
+
${sideClause}
|
|
3432
|
+
${grantClause}`);
|
|
2849
3433
|
}
|
|
2850
3434
|
async createWorkflow(definition) {
|
|
2851
3435
|
await executeRawSql(this.runtime, `INSERT INTO life_workflow_definitions (
|
|
@@ -3581,8 +4165,8 @@ export class LifeOpsRepository {
|
|
|
3581
4165
|
is_inbound = excluded.is_inbound,
|
|
3582
4166
|
text = excluded.text,
|
|
3583
4167
|
received_at = excluded.received_at,
|
|
3584
|
-
read_at = excluded.read_at,
|
|
3585
|
-
replied_at = excluded.replied_at,
|
|
4168
|
+
read_at = COALESCE(excluded.read_at, life_x_dms.read_at),
|
|
4169
|
+
replied_at = COALESCE(excluded.replied_at, life_x_dms.replied_at),
|
|
3586
4170
|
metadata_json = excluded.metadata_json,
|
|
3587
4171
|
synced_at = excluded.synced_at,
|
|
3588
4172
|
updated_at = excluded.updated_at`);
|
|
@@ -4515,6 +5099,40 @@ export function createLifeOpsConnectorGrant(params) {
|
|
|
4515
5099
|
updatedAt: timestamp,
|
|
4516
5100
|
};
|
|
4517
5101
|
}
|
|
5102
|
+
export function createLifeOpsHealthMetricSample(params) {
|
|
5103
|
+
const timestamp = isoNow();
|
|
5104
|
+
return {
|
|
5105
|
+
...params,
|
|
5106
|
+
id: crypto.randomUUID(),
|
|
5107
|
+
createdAt: timestamp,
|
|
5108
|
+
updatedAt: timestamp,
|
|
5109
|
+
};
|
|
5110
|
+
}
|
|
5111
|
+
export function createLifeOpsHealthWorkout(params) {
|
|
5112
|
+
const timestamp = isoNow();
|
|
5113
|
+
return {
|
|
5114
|
+
...params,
|
|
5115
|
+
id: crypto.randomUUID(),
|
|
5116
|
+
createdAt: timestamp,
|
|
5117
|
+
updatedAt: timestamp,
|
|
5118
|
+
};
|
|
5119
|
+
}
|
|
5120
|
+
export function createLifeOpsHealthSleepEpisode(params) {
|
|
5121
|
+
const timestamp = isoNow();
|
|
5122
|
+
return {
|
|
5123
|
+
...params,
|
|
5124
|
+
id: crypto.randomUUID(),
|
|
5125
|
+
createdAt: timestamp,
|
|
5126
|
+
updatedAt: timestamp,
|
|
5127
|
+
};
|
|
5128
|
+
}
|
|
5129
|
+
export function createLifeOpsHealthSyncState(params) {
|
|
5130
|
+
return {
|
|
5131
|
+
...params,
|
|
5132
|
+
id: crypto.randomUUID(),
|
|
5133
|
+
updatedAt: isoNow(),
|
|
5134
|
+
};
|
|
5135
|
+
}
|
|
4518
5136
|
export function createLifeOpsCalendarSyncState(params) {
|
|
4519
5137
|
return {
|
|
4520
5138
|
...params,
|