@elizaos/ui 2.0.0-alpha.382 → 2.0.0-alpha.385
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/avatar/VrmViewer.d.ts.map +1 -1
- package/apps/app-companion/src/components/avatar/VrmViewer.js +2 -1
- package/apps/app-companion/src/components/companion/CompanionAppView.d.ts.map +1 -1
- package/apps/app-companion/src/components/companion/CompanionAppView.js +2 -1
- package/apps/app-companion/src/components/companion/CompanionView.d.ts.map +1 -1
- package/apps/app-companion/src/components/companion/CompanionView.js +2 -1
- package/apps/app-companion/src/components/companion/EmotePicker.d.ts.map +1 -1
- package/apps/app-companion/src/components/companion/EmotePicker.js +1 -1
- package/apps/app-companion/src/components/companion/scene-overlay-bridge.d.ts.map +1 -1
- package/apps/app-companion/src/components/companion/scene-overlay-bridge.js +2 -1
- package/apps/app-companion/src/index.d.ts +3 -3
- package/apps/app-companion/src/index.d.ts.map +1 -1
- package/apps/app-companion/src/index.js +3 -3
- package/apps/app-elizamaker/src/drop-service.d.ts +2 -2
- package/apps/app-elizamaker/src/drop-service.d.ts.map +1 -1
- package/apps/app-elizamaker/src/twitter-verify.d.ts +2 -2
- package/apps/app-elizamaker/src/twitter-verify.d.ts.map +1 -1
- package/apps/app-lifeops/src/api/client-lifeops.d.ts +1 -1
- package/apps/app-lifeops/src/api/client-lifeops.d.ts.map +1 -1
- package/apps/app-lifeops/src/contracts/index.d.ts +1 -1
- package/apps/app-lifeops/src/contracts/index.d.ts.map +1 -1
- package/apps/app-lifeops/src/contracts/index.js +1 -1
- package/apps/app-lifeops/src/inbox/message-fetcher.d.ts.map +1 -1
- package/apps/app-lifeops/src/inbox/message-fetcher.js +4 -2
- package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-managed-client.js +4 -3
- package/apps/app-lifeops/src/lifeops/paypal-managed-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/paypal-managed-client.js +4 -3
- package/apps/app-lifeops/src/lifeops/plaid-managed-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/plaid-managed-client.js +4 -3
- package/apps/app-lifeops/src/lifeops/repository.d.ts +12 -1
- package/apps/app-lifeops/src/lifeops/repository.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/repository.js +135 -0
- package/apps/app-lifeops/src/lifeops/schedule-sync-client.js +1 -1
- package/apps/app-lifeops/src/lifeops/schema.d.ts +4587 -3791
- package/apps/app-lifeops/src/lifeops/schema.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/schema.js +30 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-inbox.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-inbox.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-inbox.js +103 -13
- package/apps/app-lifeops/src/routes/cloud-features-routes.d.ts.map +1 -1
- package/apps/app-lifeops/src/routes/cloud-features-routes.js +2 -1
- package/apps/app-lifeops/src/routes/travel-provider-relay-routes.d.ts.map +1 -1
- package/apps/app-lifeops/src/routes/travel-provider-relay-routes.js +2 -1
- package/package.json +1 -1
- package/packages/agent/src/actions/grounded-action-reply.d.ts.map +1 -1
- package/packages/agent/src/actions/grounded-action-reply.js +1 -1
- package/packages/agent/src/actions/index.d.ts +1 -0
- package/packages/agent/src/actions/index.d.ts.map +1 -1
- package/packages/agent/src/actions/index.js +1 -0
- package/packages/agent/src/actions/scratchpad.d.ts +7 -0
- package/packages/agent/src/actions/scratchpad.d.ts.map +1 -0
- package/packages/agent/src/actions/scratchpad.js +394 -0
- package/packages/agent/src/actions/settings-actions.js +1 -1
- package/packages/agent/src/actions/terminal.d.ts.map +1 -1
- package/packages/agent/src/actions/terminal.js +10 -2
- package/packages/agent/src/api/apps-routes.d.ts.map +1 -1
- package/packages/agent/src/api/apps-routes.js +171 -0
- package/packages/agent/src/api/binance-skill-helpers.d.ts.map +1 -1
- package/packages/agent/src/api/chat-routes.d.ts +3 -0
- package/packages/agent/src/api/chat-routes.d.ts.map +1 -1
- package/packages/agent/src/api/chat-routes.js +33 -14
- package/packages/agent/src/api/conversation-routes.js +2 -2
- package/packages/agent/src/api/misc-routes.d.ts.map +1 -1
- package/packages/agent/src/api/misc-routes.js +2 -2
- package/packages/agent/src/api/permissions-routes.js +1 -1
- package/packages/agent/src/api/plugin-routes.d.ts.map +1 -1
- package/packages/agent/src/api/plugin-routes.js +7 -1
- package/packages/agent/src/api/provider-switch-config.js +1 -1
- package/packages/agent/src/api/registry-service.d.ts +1 -1
- package/packages/agent/src/api/registry-service.d.ts.map +1 -1
- package/packages/agent/src/api/server-auth.d.ts.map +1 -1
- package/packages/agent/src/api/server-auth.js +119 -1
- package/packages/agent/src/api/server-helpers-auth.d.ts.map +1 -1
- package/packages/agent/src/api/server-helpers-auth.js +119 -1
- package/packages/agent/src/api/server-helpers-swarm.d.ts +1 -1
- package/packages/agent/src/api/server-helpers-swarm.d.ts.map +1 -1
- package/packages/agent/src/api/server-helpers.js +1 -1
- package/packages/agent/src/api/server-types.d.ts +2 -2
- package/packages/agent/src/api/server-types.d.ts.map +1 -1
- package/packages/agent/src/api/server.d.ts.map +1 -1
- package/packages/agent/src/api/server.js +5 -4
- package/packages/agent/src/api/training-backend-check.d.ts +1 -1
- package/packages/agent/src/api/training-backend-check.d.ts.map +1 -1
- package/packages/agent/src/api/training-backend-check.js +1 -1
- package/packages/agent/src/api/training-routes.d.ts +1 -1
- package/packages/agent/src/api/training-routes.d.ts.map +1 -1
- package/packages/agent/src/api/training-routes.js +1 -1
- package/packages/agent/src/api/training-service-like.d.ts +1 -1
- package/packages/agent/src/api/training-service-like.d.ts.map +1 -1
- package/packages/agent/src/api/trajectory-routes.d.ts +1 -1
- package/packages/agent/src/api/trajectory-routes.d.ts.map +1 -1
- package/packages/agent/src/api/trajectory-routes.js +1 -1
- package/packages/agent/src/api/wallet-capability.js +1 -1
- package/packages/agent/src/api/wallet-evm-balance.js +1 -1
- package/packages/agent/src/api/wallet.d.ts +1 -1
- package/packages/agent/src/api/wallet.d.ts.map +1 -1
- package/packages/agent/src/api/wallet.js +2 -2
- package/packages/agent/src/awareness/index.d.ts +2 -0
- package/packages/agent/src/awareness/index.d.ts.map +1 -0
- package/packages/agent/src/awareness/index.js +1 -0
- package/packages/agent/src/config/config.d.ts.map +1 -1
- package/packages/agent/src/config/config.js +2 -0
- package/packages/agent/src/config/index.d.ts +1 -0
- package/packages/agent/src/config/index.d.ts.map +1 -1
- package/packages/agent/src/config/index.js +1 -0
- package/packages/agent/src/config/model-metadata.d.ts +20 -0
- package/packages/agent/src/config/model-metadata.d.ts.map +1 -0
- package/packages/agent/src/config/model-metadata.js +133 -0
- package/packages/agent/src/config/zod-schema.core.d.ts +28 -28
- package/packages/agent/src/config/zod-schema.core.d.ts.map +1 -1
- package/packages/agent/src/config/zod-schema.core.js +16 -9
- package/packages/agent/src/config/zod-schema.d.ts +10 -10
- package/packages/agent/src/index.d.ts +6 -11
- package/packages/agent/src/index.d.ts.map +1 -1
- package/packages/agent/src/index.js +8 -10
- package/packages/agent/src/providers/media-provider.js +1 -1
- package/packages/agent/src/runtime/custom-actions.d.ts.map +1 -1
- package/packages/agent/src/runtime/custom-actions.js +1 -1
- package/packages/agent/src/runtime/eliza-plugin.d.ts.map +1 -1
- package/packages/agent/src/runtime/eliza-plugin.js +6 -0
- package/packages/agent/src/runtime/eliza.d.ts.map +1 -1
- package/packages/agent/src/runtime/eliza.js +7 -7
- package/packages/agent/src/runtime/prompt-optimization.d.ts +24 -1
- package/packages/agent/src/runtime/prompt-optimization.d.ts.map +1 -1
- package/packages/agent/src/runtime/prompt-optimization.js +292 -27
- package/packages/agent/src/runtime/trajectory-internals.d.ts +1 -0
- package/packages/agent/src/runtime/trajectory-internals.d.ts.map +1 -1
- package/packages/agent/src/runtime/trajectory-storage.d.ts.map +1 -1
- package/packages/agent/src/runtime/trajectory-storage.js +3 -0
- package/packages/agent/src/services/index.d.ts +4 -4
- package/packages/agent/src/services/index.d.ts.map +1 -1
- package/packages/agent/src/services/index.js +2 -2
- package/packages/agent/src/services/registry-client-app-meta.d.ts.map +1 -1
- package/packages/agent/src/services/registry-client-app-meta.js +0 -61
- package/packages/agent/src/services/skill-marketplace.d.ts.map +1 -1
- package/packages/app-core/src/App.js +1 -1
- package/packages/app-core/src/api/auth.js +1 -1
- package/packages/app-core/src/api/client-agent.d.ts +1 -2
- package/packages/app-core/src/api/client-agent.d.ts.map +1 -1
- package/packages/app-core/src/api/client-chat.d.ts +10 -1
- package/packages/app-core/src/api/client-chat.d.ts.map +1 -1
- package/packages/app-core/src/api/client-chat.js +33 -0
- package/packages/app-core/src/api/client-skills.d.ts.map +1 -1
- package/packages/app-core/src/api/client-types-chat.d.ts +1 -0
- package/packages/app-core/src/api/client-types-chat.d.ts.map +1 -1
- package/packages/app-core/src/api/client-types-config.d.ts +2 -2
- package/packages/app-core/src/api/client-types-config.d.ts.map +1 -1
- package/packages/app-core/src/api/client-wallet.d.ts +2 -4
- package/packages/app-core/src/api/client-wallet.d.ts.map +1 -1
- package/packages/app-core/src/api/client.d.ts +3 -4
- package/packages/app-core/src/api/client.d.ts.map +1 -1
- package/packages/app-core/src/api/client.js +1 -1
- package/packages/app-core/src/api/compat-route-shared.d.ts +1 -1
- package/packages/app-core/src/api/compat-route-shared.d.ts.map +1 -1
- package/packages/app-core/src/api/compat-route-shared.js +117 -1
- package/packages/app-core/src/api/server-cloud-tts.js +1 -1
- package/packages/app-core/src/api/trusted-local-request.d.ts +4 -0
- package/packages/app-core/src/api/trusted-local-request.d.ts.map +1 -0
- package/packages/app-core/src/api/trusted-local-request.js +176 -0
- package/packages/app-core/src/autonomy/index.d.ts.map +1 -1
- package/packages/app-core/src/autonomy/index.js +3 -1
- package/packages/app-core/src/components/auth/LoginView.d.ts +3 -23
- package/packages/app-core/src/components/auth/LoginView.d.ts.map +1 -1
- package/packages/app-core/src/components/auth/LoginView.js +43 -33
- package/packages/app-core/src/components/chat/AppsSection.d.ts.map +1 -1
- package/packages/app-core/src/components/chat/AppsSection.js +61 -6
- package/packages/app-core/src/components/chat/MessageContent.d.ts.map +1 -1
- package/packages/app-core/src/components/chat/MessageContent.js +26 -3
- package/packages/app-core/src/components/chat/message-choice-parser.d.ts +20 -0
- package/packages/app-core/src/components/chat/message-choice-parser.d.ts.map +1 -0
- package/packages/app-core/src/components/chat/message-choice-parser.js +53 -0
- package/packages/app-core/src/components/chat/widgets/ChoiceWidget.d.ts +24 -0
- package/packages/app-core/src/components/chat/widgets/ChoiceWidget.d.ts.map +1 -0
- package/packages/app-core/src/components/chat/widgets/ChoiceWidget.js +38 -0
- package/packages/app-core/src/components/connectors/ConnectorSetupPanel.js +1 -1
- package/packages/app-core/src/components/custom-actions/CustomActionEditor.d.ts.map +1 -1
- package/packages/app-core/src/components/custom-actions/CustomActionsPanel.d.ts.map +1 -1
- package/packages/app-core/src/components/custom-actions/CustomActionsView.d.ts.map +1 -1
- package/packages/app-core/src/components/custom-actions/custom-action-form.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/BrowserWorkspaceView.js +1 -1
- package/packages/app-core/src/components/pages/KnowledgeView.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/KnowledgeView.js +11 -1
- package/packages/app-core/src/components/pages/PluginConfigForm.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/PluginConfigForm.js +1 -1
- package/packages/app-core/src/components/pages/ScratchpadView.d.ts +2 -0
- package/packages/app-core/src/components/pages/ScratchpadView.d.ts.map +1 -0
- package/packages/app-core/src/components/pages/ScratchpadView.js +364 -0
- package/packages/app-core/src/components/pages/SettingsView.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/SettingsView.js +29 -5
- package/packages/app-core/src/components/pages/VectorBrowserView.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/VectorBrowserView.js +1 -1
- package/packages/app-core/src/components/pages/config-page-sections.d.ts +1 -1
- package/packages/app-core/src/components/pages/config-page-sections.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/config-page-sections.js +1 -1
- package/packages/app-core/src/components/pages/plugin-list-utils.d.ts +1 -1
- package/packages/app-core/src/components/pages/plugin-list-utils.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/useBrowserWorkspaceWalletBridge.d.ts +1 -1
- package/packages/app-core/src/components/pages/useBrowserWorkspaceWalletBridge.d.ts.map +1 -1
- package/packages/app-core/src/components/pages/useBrowserWorkspaceWalletBridge.js +1 -1
- package/packages/app-core/src/components/settings/ApiKeyConfig.js +1 -1
- package/packages/app-core/src/components/settings/AppearanceSettingsSection.d.ts.map +1 -1
- package/packages/app-core/src/components/settings/AppearanceSettingsSection.js +1 -1
- package/packages/app-core/src/components/settings/AppsManagementSection.d.ts +12 -0
- package/packages/app-core/src/components/settings/AppsManagementSection.d.ts.map +1 -0
- package/packages/app-core/src/components/settings/AppsManagementSection.js +285 -0
- package/packages/app-core/src/components/settings/PermissionsSection.js +1 -1
- package/packages/app-core/src/components/settings/ProviderSwitcher.d.ts.map +1 -1
- package/packages/app-core/src/components/settings/ProviderSwitcher.js +2 -2
- package/packages/app-core/src/components/settings/SecuritySettingsSection.d.ts.map +1 -1
- package/packages/app-core/src/components/settings/SecuritySettingsSection.js +150 -33
- package/packages/app-core/src/components/settings/cloud-model-schema.d.ts +1 -1
- package/packages/app-core/src/components/settings/cloud-model-schema.d.ts.map +1 -1
- package/packages/app-core/src/components/shell/Header.d.ts.map +1 -1
- package/packages/app-core/src/components/shell/Header.js +28 -1
- package/packages/app-core/src/components/steward/injected.d.ts.map +1 -1
- package/packages/app-core/src/components/steward/injected.js +1 -1
- package/packages/app-core/src/components/training/injected.d.ts.map +1 -1
- package/packages/app-core/src/components/training/injected.js +1 -1
- package/packages/app-core/src/config/boot-config-store.d.ts +1 -1
- package/packages/app-core/src/config/boot-config-store.d.ts.map +1 -1
- package/packages/app-core/src/content-packs/bundled-packs.d.ts.map +1 -1
- package/packages/app-core/src/hooks/index.d.ts +0 -2
- package/packages/app-core/src/hooks/index.d.ts.map +1 -1
- package/packages/app-core/src/hooks/index.js +0 -2
- package/packages/app-core/src/hooks/useAuthStatus.d.ts +5 -0
- package/packages/app-core/src/hooks/useAuthStatus.d.ts.map +1 -1
- package/packages/app-core/src/hooks/useAuthStatus.js +41 -18
- package/packages/app-core/src/hooks/useSignalPairing.d.ts +1 -1
- package/packages/app-core/src/hooks/useSignalPairing.d.ts.map +1 -1
- package/packages/app-core/src/hooks/useWhatsAppPairing.d.ts +1 -1
- package/packages/app-core/src/hooks/useWhatsAppPairing.d.ts.map +1 -1
- package/packages/app-core/src/i18n/locales/en.json +0 -1
- package/packages/app-core/src/i18n/locales/es.json +0 -1
- package/packages/app-core/src/i18n/locales/ko.json +0 -1
- package/packages/app-core/src/i18n/locales/pt.json +0 -1
- package/packages/app-core/src/i18n/locales/tl.json +0 -1
- package/packages/app-core/src/i18n/locales/vi.json +0 -1
- package/packages/app-core/src/i18n/locales/zh-CN.json +0 -1
- package/packages/app-core/src/index.d.ts +0 -1
- package/packages/app-core/src/index.d.ts.map +1 -1
- package/packages/app-core/src/index.js +0 -1
- package/packages/app-core/src/runtime/channel-plugin-map.d.ts.map +1 -1
- package/packages/app-core/src/runtime/channel-plugin-map.js +1 -1
- package/packages/app-core/src/runtime/plugin-manager-guard.d.ts.map +1 -1
- package/packages/app-core/src/runtime/plugin-manager-guard.js +1 -1
- package/packages/app-core/src/services/plugin-installer.d.ts.map +1 -1
- package/packages/app-core/src/services/plugin-installer.js +1 -8
- package/packages/app-core/src/state/index.d.ts +0 -1
- package/packages/app-core/src/state/index.d.ts.map +1 -1
- package/packages/app-core/src/state/index.js +0 -1
- package/packages/app-core/src/state/startup-phase-restore.d.ts.map +1 -1
- package/packages/app-core/src/state/startup-phase-restore.js +1 -1
- package/packages/app-core/src/state/useOnboardingState.js +2 -2
- package/packages/app-core/src/state/usePluginsSkillsState.d.ts +4 -4
- package/packages/app-core/src/types/index.d.ts +1 -1
- package/packages/app-core/src/types/index.d.ts.map +1 -1
- package/packages/shared/src/contracts/index.d.ts +1 -0
- package/packages/shared/src/contracts/index.d.ts.map +1 -1
- package/packages/shared/src/contracts/index.js +1 -0
- package/packages/shared/src/contracts/scratchpad.d.ts +136 -0
- package/packages/shared/src/contracts/scratchpad.d.ts.map +1 -0
- package/packages/shared/src/contracts/scratchpad.js +90 -0
- package/packages/shared/src/index.d.ts +13 -13
- package/packages/shared/src/index.d.ts.map +1 -1
- package/packages/shared/src/index.js +19 -19
- package/packages/shared/src/spoken-text.js +1 -1
- package/packages/typescript/src/features/advanced-capabilities/evaluators/factExtractor.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/evaluators/factExtractor.js +12 -6
- package/packages/typescript/src/generated/action-docs.d.ts +25 -0
- package/packages/typescript/src/generated/action-docs.d.ts.map +1 -1
- package/packages/typescript/src/generated/action-docs.js +51 -0
- package/packages/typescript/src/services/message.d.ts.map +1 -1
- package/packages/typescript/src/services/message.js +1 -3
- package/packages/typescript/src/types/tools.d.ts.map +1 -1
- package/packages/typescript/src/types/tools.js +7 -3
- package/apps/app-lifeops/src/action.d.ts +0 -3
- package/apps/app-lifeops/src/action.d.ts.map +0 -1
- package/apps/app-lifeops/src/action.js +0 -351
- package/apps/app-lifeops/src/actions/activity-report.d.ts +0 -13
- package/apps/app-lifeops/src/actions/activity-report.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/activity-report.js +0 -313
- package/apps/app-lifeops/src/actions/app-blocker.d.ts +0 -7
- package/apps/app-lifeops/src/actions/app-blocker.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/app-blocker.js +0 -454
- package/apps/app-lifeops/src/actions/approval.d.ts +0 -21
- package/apps/app-lifeops/src/actions/approval.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/approval.js +0 -342
- package/apps/app-lifeops/src/actions/autofill.d.ts +0 -35
- package/apps/app-lifeops/src/actions/autofill.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/autofill.js +0 -475
- package/apps/app-lifeops/src/actions/book-travel-executor.d.ts +0 -9
- package/apps/app-lifeops/src/actions/book-travel-executor.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/book-travel-executor.js +0 -65
- package/apps/app-lifeops/src/actions/book-travel.d.ts +0 -5
- package/apps/app-lifeops/src/actions/book-travel.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/book-travel.js +0 -491
- package/apps/app-lifeops/src/actions/calendar.d.ts +0 -19
- package/apps/app-lifeops/src/actions/calendar.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/calendar.js +0 -3189
- package/apps/app-lifeops/src/actions/calendly.d.ts +0 -3
- package/apps/app-lifeops/src/actions/calendly.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/calendly.js +0 -285
- package/apps/app-lifeops/src/actions/chat-thread-control.d.ts +0 -3
- package/apps/app-lifeops/src/actions/chat-thread-control.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/chat-thread-control.js +0 -260
- package/apps/app-lifeops/src/actions/checkin.d.ts +0 -8
- package/apps/app-lifeops/src/actions/checkin.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/checkin.js +0 -230
- package/apps/app-lifeops/src/actions/computer-use.d.ts +0 -14
- package/apps/app-lifeops/src/actions/computer-use.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/computer-use.js +0 -365
- package/apps/app-lifeops/src/actions/cross-channel-send.d.ts +0 -34
- package/apps/app-lifeops/src/actions/cross-channel-send.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/cross-channel-send.js +0 -964
- package/apps/app-lifeops/src/actions/device-bus.d.ts +0 -19
- package/apps/app-lifeops/src/actions/device-bus.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/device-bus.js +0 -386
- package/apps/app-lifeops/src/actions/dossier.d.ts +0 -5
- package/apps/app-lifeops/src/actions/dossier.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/dossier.js +0 -227
- package/apps/app-lifeops/src/actions/email-unsubscribe.d.ts +0 -5
- package/apps/app-lifeops/src/actions/email-unsubscribe.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/email-unsubscribe.js +0 -172
- package/apps/app-lifeops/src/actions/gmail.d.ts +0 -57
- package/apps/app-lifeops/src/actions/gmail.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/gmail.js +0 -2540
- package/apps/app-lifeops/src/actions/health.d.ts +0 -9
- package/apps/app-lifeops/src/actions/health.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/health.js +0 -398
- package/apps/app-lifeops/src/actions/inbox.d.ts +0 -5
- package/apps/app-lifeops/src/actions/inbox.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/inbox.js +0 -1244
- package/apps/app-lifeops/src/actions/intent-sync.d.ts +0 -5
- package/apps/app-lifeops/src/actions/intent-sync.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/intent-sync.js +0 -326
- package/apps/app-lifeops/src/actions/life-goal-extractor.d.ts +0 -69
- package/apps/app-lifeops/src/actions/life-goal-extractor.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/life-goal-extractor.js +0 -420
- package/apps/app-lifeops/src/actions/life-param-extractor.d.ts +0 -78
- package/apps/app-lifeops/src/actions/life-param-extractor.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/life-param-extractor.js +0 -431
- package/apps/app-lifeops/src/actions/life-recent-context.d.ts +0 -9
- package/apps/app-lifeops/src/actions/life-recent-context.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/life-recent-context.js +0 -78
- package/apps/app-lifeops/src/actions/life-update-extractor.d.ts +0 -27
- package/apps/app-lifeops/src/actions/life-update-extractor.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/life-update-extractor.js +0 -195
- package/apps/app-lifeops/src/actions/life.d.ts +0 -5
- package/apps/app-lifeops/src/actions/life.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/life.extractor.d.ts +0 -18
- package/apps/app-lifeops/src/actions/life.extractor.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/life.extractor.js +0 -363
- package/apps/app-lifeops/src/actions/life.js +0 -3247
- package/apps/app-lifeops/src/actions/lifeops-connector.d.ts +0 -5
- package/apps/app-lifeops/src/actions/lifeops-connector.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/lifeops-connector.js +0 -683
- package/apps/app-lifeops/src/actions/lifeops-extraction-config.d.ts +0 -16
- package/apps/app-lifeops/src/actions/lifeops-extraction-config.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/lifeops-extraction-config.js +0 -25
- package/apps/app-lifeops/src/actions/lifeops-google-helpers.d.ts +0 -64
- package/apps/app-lifeops/src/actions/lifeops-google-helpers.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/lifeops-google-helpers.js +0 -671
- package/apps/app-lifeops/src/actions/lifeops-mutate.d.ts +0 -5
- package/apps/app-lifeops/src/actions/lifeops-mutate.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/lifeops-mutate.js +0 -769
- package/apps/app-lifeops/src/actions/list-remote-sessions.d.ts +0 -6
- package/apps/app-lifeops/src/actions/list-remote-sessions.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/list-remote-sessions.js +0 -45
- package/apps/app-lifeops/src/actions/non-actionable-request.d.ts +0 -17
- package/apps/app-lifeops/src/actions/non-actionable-request.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/non-actionable-request.js +0 -25
- package/apps/app-lifeops/src/actions/owner-app-block.d.ts +0 -12
- package/apps/app-lifeops/src/actions/owner-app-block.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/owner-app-block.js +0 -144
- package/apps/app-lifeops/src/actions/owner-calendar.d.ts +0 -15
- package/apps/app-lifeops/src/actions/owner-calendar.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/owner-calendar.js +0 -762
- package/apps/app-lifeops/src/actions/owner-inbox.d.ts +0 -5
- package/apps/app-lifeops/src/actions/owner-inbox.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/owner-inbox.js +0 -662
- package/apps/app-lifeops/src/actions/owner-remote-desktop.d.ts +0 -12
- package/apps/app-lifeops/src/actions/owner-remote-desktop.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/owner-remote-desktop.js +0 -173
- package/apps/app-lifeops/src/actions/owner-schedule.d.ts +0 -3
- package/apps/app-lifeops/src/actions/owner-schedule.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/owner-schedule.js +0 -174
- package/apps/app-lifeops/src/actions/owner-screen-time.d.ts +0 -10
- package/apps/app-lifeops/src/actions/owner-screen-time.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/owner-screen-time.js +0 -213
- package/apps/app-lifeops/src/actions/owner-website-block.d.ts +0 -12
- package/apps/app-lifeops/src/actions/owner-website-block.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/owner-website-block.js +0 -424
- package/apps/app-lifeops/src/actions/password-manager.d.ts +0 -5
- package/apps/app-lifeops/src/actions/password-manager.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/password-manager.js +0 -217
- package/apps/app-lifeops/src/actions/payments.d.ts +0 -5
- package/apps/app-lifeops/src/actions/payments.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/payments.js +0 -236
- package/apps/app-lifeops/src/actions/relationships.d.ts +0 -12
- package/apps/app-lifeops/src/actions/relationships.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/relationships.js +0 -880
- package/apps/app-lifeops/src/actions/remote-desktop.d.ts +0 -5
- package/apps/app-lifeops/src/actions/remote-desktop.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/remote-desktop.js +0 -248
- package/apps/app-lifeops/src/actions/revoke-remote-session.d.ts +0 -6
- package/apps/app-lifeops/src/actions/revoke-remote-session.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/revoke-remote-session.js +0 -73
- package/apps/app-lifeops/src/actions/schedule-x-dm-reply.d.ts +0 -3
- package/apps/app-lifeops/src/actions/schedule-x-dm-reply.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/schedule-x-dm-reply.js +0 -134
- package/apps/app-lifeops/src/actions/scheduled-trigger-task.d.ts +0 -19
- package/apps/app-lifeops/src/actions/scheduled-trigger-task.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/scheduled-trigger-task.js +0 -82
- package/apps/app-lifeops/src/actions/scheduling.d.ts +0 -70
- package/apps/app-lifeops/src/actions/scheduling.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/scheduling.js +0 -1078
- package/apps/app-lifeops/src/actions/screen-time.d.ts +0 -8
- package/apps/app-lifeops/src/actions/screen-time.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/screen-time.js +0 -249
- package/apps/app-lifeops/src/actions/search-across-channels.d.ts +0 -13
- package/apps/app-lifeops/src/actions/search-across-channels.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/search-across-channels.js +0 -338
- package/apps/app-lifeops/src/actions/start-remote-session.d.ts +0 -14
- package/apps/app-lifeops/src/actions/start-remote-session.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/start-remote-session.js +0 -139
- package/apps/app-lifeops/src/actions/subscriptions.d.ts +0 -5
- package/apps/app-lifeops/src/actions/subscriptions.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/subscriptions.js +0 -404
- package/apps/app-lifeops/src/actions/timezone-normalization.d.ts +0 -4
- package/apps/app-lifeops/src/actions/timezone-normalization.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/timezone-normalization.js +0 -159
- package/apps/app-lifeops/src/actions/twilio-call.d.ts +0 -20
- package/apps/app-lifeops/src/actions/twilio-call.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/twilio-call.js +0 -853
- package/apps/app-lifeops/src/actions/update-owner-profile.d.ts +0 -5
- package/apps/app-lifeops/src/actions/update-owner-profile.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/update-owner-profile.js +0 -181
- package/apps/app-lifeops/src/actions/x-read.d.ts +0 -5
- package/apps/app-lifeops/src/actions/x-read.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/x-read.js +0 -561
- package/apps/app-lifeops/src/activity-profile/activity-tracker-service.d.ts +0 -36
- package/apps/app-lifeops/src/activity-profile/activity-tracker-service.d.ts.map +0 -1
- package/apps/app-lifeops/src/activity-profile/activity-tracker-service.js +0 -160
- package/apps/app-lifeops/src/activity-profile/analyzer.d.ts +0 -23
- package/apps/app-lifeops/src/activity-profile/analyzer.d.ts.map +0 -1
- package/apps/app-lifeops/src/activity-profile/analyzer.js +0 -555
- package/apps/app-lifeops/src/activity-profile/presence-signal-bridge-service.d.ts +0 -14
- package/apps/app-lifeops/src/activity-profile/presence-signal-bridge-service.d.ts.map +0 -1
- package/apps/app-lifeops/src/activity-profile/presence-signal-bridge-service.js +0 -133
- package/apps/app-lifeops/src/activity-profile/proactive-planner.d.ts +0 -71
- package/apps/app-lifeops/src/activity-profile/proactive-planner.d.ts.map +0 -1
- package/apps/app-lifeops/src/activity-profile/proactive-planner.js +0 -567
- package/apps/app-lifeops/src/activity-profile/proactive-worker.d.ts +0 -32
- package/apps/app-lifeops/src/activity-profile/proactive-worker.d.ts.map +0 -1
- package/apps/app-lifeops/src/activity-profile/proactive-worker.js +0 -676
- package/apps/app-lifeops/src/activity-profile/service.d.ts +0 -11
- package/apps/app-lifeops/src/activity-profile/service.d.ts.map +0 -1
- package/apps/app-lifeops/src/activity-profile/service.js +0 -246
- package/apps/app-lifeops/src/app-blocker/access.d.ts +0 -8
- package/apps/app-lifeops/src/app-blocker/access.d.ts.map +0 -1
- package/apps/app-lifeops/src/app-blocker/access.js +0 -35
- package/apps/app-lifeops/src/app-blocker/engine.d.ts +0 -10
- package/apps/app-lifeops/src/app-blocker/engine.d.ts.map +0 -1
- package/apps/app-lifeops/src/app-blocker/engine.js +0 -43
- 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 -74
- 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 -490
- 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 -565
- 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 -597
- 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 -162
- 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/followup/actions/listOverdueFollowups.d.ts +0 -3
- package/apps/app-lifeops/src/followup/actions/listOverdueFollowups.d.ts.map +0 -1
- package/apps/app-lifeops/src/followup/actions/listOverdueFollowups.js +0 -48
- package/apps/app-lifeops/src/followup/actions/markFollowupDone.d.ts +0 -3
- package/apps/app-lifeops/src/followup/actions/markFollowupDone.d.ts.map +0 -1
- package/apps/app-lifeops/src/followup/actions/markFollowupDone.js +0 -173
- package/apps/app-lifeops/src/followup/actions/setFollowupThreshold.d.ts +0 -3
- package/apps/app-lifeops/src/followup/actions/setFollowupThreshold.d.ts.map +0 -1
- package/apps/app-lifeops/src/followup/actions/setFollowupThreshold.js +0 -172
- package/apps/app-lifeops/src/followup/followup-tracker.d.ts +0 -82
- package/apps/app-lifeops/src/followup/followup-tracker.d.ts.map +0 -1
- package/apps/app-lifeops/src/followup/followup-tracker.js +0 -279
- package/apps/app-lifeops/src/followup/index.d.ts +0 -5
- package/apps/app-lifeops/src/followup/index.d.ts.map +0 -1
- package/apps/app-lifeops/src/followup/index.js +0 -4
- 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 -382
- package/apps/app-lifeops/src/hooks/useLifeOpsAppState.d.ts +0 -21
- 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 -152
- package/apps/app-lifeops/src/inbox/config.d.ts +0 -7
- package/apps/app-lifeops/src/inbox/config.d.ts.map +0 -1
- package/apps/app-lifeops/src/inbox/config.js +0 -67
- package/apps/app-lifeops/src/inbox/reflection.d.ts +0 -40
- package/apps/app-lifeops/src/inbox/reflection.d.ts.map +0 -1
- package/apps/app-lifeops/src/inbox/reflection.js +0 -115
- package/apps/app-lifeops/src/inbox/repository.d.ts +0 -52
- package/apps/app-lifeops/src/inbox/repository.d.ts.map +0 -1
- package/apps/app-lifeops/src/inbox/repository.js +0 -262
- package/apps/app-lifeops/src/inbox/triage-classifier.d.ts +0 -15
- package/apps/app-lifeops/src/inbox/triage-classifier.d.ts.map +0 -1
- package/apps/app-lifeops/src/inbox/triage-classifier.js +0 -179
- package/apps/app-lifeops/src/index.d.ts +0 -20
- package/apps/app-lifeops/src/index.d.ts.map +0 -1
- package/apps/app-lifeops/src/index.js +0 -18
- package/apps/app-lifeops/src/lifeops/approval-queue.d.ts +0 -24
- package/apps/app-lifeops/src/lifeops/approval-queue.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/approval-queue.js +0 -500
- package/apps/app-lifeops/src/lifeops/approval-queue.types.d.ts +0 -166
- package/apps/app-lifeops/src/lifeops/approval-queue.types.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/approval-queue.types.js +0 -22
- package/apps/app-lifeops/src/lifeops/autofill-whitelist.d.ts +0 -15
- package/apps/app-lifeops/src/lifeops/autofill-whitelist.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/autofill-whitelist.js +0 -116
- package/apps/app-lifeops/src/lifeops/background-planner-dispatch.d.ts +0 -60
- package/apps/app-lifeops/src/lifeops/background-planner-dispatch.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/background-planner-dispatch.js +0 -134
- package/apps/app-lifeops/src/lifeops/background-planner.d.ts +0 -141
- package/apps/app-lifeops/src/lifeops/background-planner.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/background-planner.js +0 -377
- package/apps/app-lifeops/src/lifeops/calendly-client.d.ts +0 -61
- package/apps/app-lifeops/src/lifeops/calendly-client.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/calendly-client.js +0 -234
- package/apps/app-lifeops/src/lifeops/checkin/schedule-resolver.d.ts +0 -14
- package/apps/app-lifeops/src/lifeops/checkin/schedule-resolver.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/checkin/schedule-resolver.js +0 -27
- package/apps/app-lifeops/src/lifeops/cross-channel-search.d.ts +0 -88
- package/apps/app-lifeops/src/lifeops/cross-channel-search.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/cross-channel-search.js +0 -446
- package/apps/app-lifeops/src/lifeops/intent-sync.d.ts +0 -59
- package/apps/app-lifeops/src/lifeops/intent-sync.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/intent-sync.js +0 -305
- package/apps/app-lifeops/src/lifeops/notifications-push.d.ts +0 -37
- package/apps/app-lifeops/src/lifeops/notifications-push.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/notifications-push.js +0 -92
- package/apps/app-lifeops/src/lifeops/password-manager-bridge.d.ts +0 -50
- package/apps/app-lifeops/src/lifeops/password-manager-bridge.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/password-manager-bridge.js +0 -448
- package/apps/app-lifeops/src/lifeops/remote-desktop.d.ts +0 -38
- package/apps/app-lifeops/src/lifeops/remote-desktop.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/remote-desktop.js +0 -372
- package/apps/app-lifeops/src/lifeops/runtime.d.ts +0 -11
- package/apps/app-lifeops/src/lifeops/runtime.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/runtime.js +0 -57
- package/apps/app-lifeops/src/lifeops/screen-context.d.ts +0 -52
- package/apps/app-lifeops/src/lifeops/screen-context.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/screen-context.js +0 -349
- 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/index.d.ts +0 -2
- package/apps/app-lifeops/src/platform/index.d.ts.map +0 -1
- package/apps/app-lifeops/src/platform/index.js +0 -1
- 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/plugin.d.ts +0 -33
- package/apps/app-lifeops/src/plugin.d.ts.map +0 -1
- package/apps/app-lifeops/src/plugin.js +0 -316
- package/apps/app-lifeops/src/provider.d.ts +0 -4
- package/apps/app-lifeops/src/provider.d.ts.map +0 -1
- package/apps/app-lifeops/src/provider.js +0 -77
- package/apps/app-lifeops/src/providers/activity-profile.d.ts +0 -3
- package/apps/app-lifeops/src/providers/activity-profile.d.ts.map +0 -1
- package/apps/app-lifeops/src/providers/activity-profile.js +0 -140
- package/apps/app-lifeops/src/providers/app-blocker.d.ts +0 -3
- package/apps/app-lifeops/src/providers/app-blocker.d.ts.map +0 -1
- package/apps/app-lifeops/src/providers/app-blocker.js +0 -86
- package/apps/app-lifeops/src/providers/cross-channel-context.d.ts +0 -29
- package/apps/app-lifeops/src/providers/cross-channel-context.d.ts.map +0 -1
- package/apps/app-lifeops/src/providers/cross-channel-context.js +0 -182
- package/apps/app-lifeops/src/providers/inbox-triage.d.ts +0 -3
- package/apps/app-lifeops/src/providers/inbox-triage.d.ts.map +0 -1
- package/apps/app-lifeops/src/providers/inbox-triage.js +0 -90
- package/apps/app-lifeops/src/providers/lifeops.d.ts +0 -3
- package/apps/app-lifeops/src/providers/lifeops.d.ts.map +0 -1
- package/apps/app-lifeops/src/providers/lifeops.js +0 -197
- package/apps/app-lifeops/src/remote/pairing-code.d.ts +0 -39
- package/apps/app-lifeops/src/remote/pairing-code.d.ts.map +0 -1
- package/apps/app-lifeops/src/remote/pairing-code.js +0 -76
- package/apps/app-lifeops/src/remote/remote-session-service.d.ts +0 -107
- package/apps/app-lifeops/src/remote/remote-session-service.d.ts.map +0 -1
- package/apps/app-lifeops/src/remote/remote-session-service.js +0 -253
- package/apps/app-lifeops/src/service.d.ts +0 -32
- package/apps/app-lifeops/src/service.d.ts.map +0 -1
- package/apps/app-lifeops/src/service.js +0 -67
- package/apps/app-lifeops/src/travel-time/calendar-create.d.ts +0 -17
- package/apps/app-lifeops/src/travel-time/calendar-create.d.ts.map +0 -1
- package/apps/app-lifeops/src/travel-time/calendar-create.js +0 -21
- package/apps/app-lifeops/src/travel-time/service.d.ts +0 -60
- package/apps/app-lifeops/src/travel-time/service.d.ts.map +0 -1
- package/apps/app-lifeops/src/travel-time/service.js +0 -142
- 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/apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.d.ts +0 -3
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.d.ts.map +0 -1
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.js +0 -246
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/listActiveBlocks.d.ts +0 -3
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/listActiveBlocks.d.ts.map +0 -1
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/listActiveBlocks.js +0 -83
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/releaseBlock.d.ts +0 -3
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/releaseBlock.d.ts.map +0 -1
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/releaseBlock.js +0 -98
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-reconciler.d.ts +0 -7
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-reconciler.d.ts.map +0 -1
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-reconciler.js +0 -111
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-schema.d.ts +0 -39
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-schema.d.ts.map +0 -1
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-schema.js +0 -123
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-service.d.ts +0 -21
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-service.d.ts.map +0 -1
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-service.js +0 -258
- package/apps/app-lifeops/src/website-blocker/chat-integration/index.d.ts +0 -8
- package/apps/app-lifeops/src/website-blocker/chat-integration/index.d.ts.map +0 -1
- package/apps/app-lifeops/src/website-blocker/chat-integration/index.js +0 -6
- package/packages/app-core/src/api/client-lifeops.d.ts +0 -35
- package/packages/app-core/src/api/client-lifeops.d.ts.map +0 -1
- package/packages/app-core/src/api/client-lifeops.js +0 -114
- package/packages/app-core/src/hooks/useGoogleLifeOpsConnector.d.ts +0 -20
- package/packages/app-core/src/hooks/useGoogleLifeOpsConnector.d.ts.map +0 -1
- package/packages/app-core/src/hooks/useGoogleLifeOpsConnector.js +0 -69
- package/packages/app-core/src/hooks/useLifeOpsAppState.d.ts +0 -21
- package/packages/app-core/src/hooks/useLifeOpsAppState.d.ts.map +0 -1
- package/packages/app-core/src/hooks/useLifeOpsAppState.js +0 -81
- package/packages/app-core/src/services/steward-sidecar.d.ts +0 -6
- package/packages/app-core/src/services/steward-sidecar.d.ts.map +0 -1
- package/packages/app-core/src/services/steward-sidecar.js +0 -5
|
@@ -1,880 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LifeOps relationships action — Rolodex management.
|
|
3
|
-
*
|
|
4
|
-
* Subactions: list_contacts, add_contact, log_interaction, add_follow_up,
|
|
5
|
-
* complete_follow_up, follow_up_list, days_since, list_overdue_followups,
|
|
6
|
-
* mark_followup_done, set_followup_threshold.
|
|
7
|
-
*/
|
|
8
|
-
import { ModelType, parseJSONObjectFromText, parseKeyValueXml, } from "@elizaos/core";
|
|
9
|
-
import { LIFEOPS_MESSAGE_CHANNELS, } from "@elizaos/shared";
|
|
10
|
-
import { LifeOpsService } from "../lifeops/service.js";
|
|
11
|
-
import { extractActionParamsViaLlm } from "@elizaos/agent";
|
|
12
|
-
import { hasLifeOpsAccess } from "./lifeops-google-helpers.js";
|
|
13
|
-
import { recentConversationTexts as collectRecentConversationTexts } from "./life-recent-context.js";
|
|
14
|
-
function getParams(options) {
|
|
15
|
-
const params = options?.parameters;
|
|
16
|
-
return params ?? {};
|
|
17
|
-
}
|
|
18
|
-
function messageText(message) {
|
|
19
|
-
return (message?.content?.text ?? "").toString();
|
|
20
|
-
}
|
|
21
|
-
function normalizedNonEmpty(value) {
|
|
22
|
-
if (typeof value !== "string") {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
const trimmed = value.trim();
|
|
26
|
-
return trimmed.length > 0 ? trimmed : null;
|
|
27
|
-
}
|
|
28
|
-
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
29
|
-
function escapeRegExp(value) {
|
|
30
|
-
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
31
|
-
}
|
|
32
|
-
function normalizeLookup(value) {
|
|
33
|
-
return value.toLowerCase().replace(/\s+/g, " ").trim();
|
|
34
|
-
}
|
|
35
|
-
async function resolveRelationshipIdByName(service, rawName) {
|
|
36
|
-
const needle = normalizeLookup(rawName);
|
|
37
|
-
if (!needle) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
const relationships = await service.listRelationships({ limit: 200 });
|
|
41
|
-
const exactMatch = relationships.find((relationship) => normalizeLookup(relationship.name) === needle) ??
|
|
42
|
-
relationships.find((relationship) => normalizeLookup(relationship.primaryHandle).includes(needle) ||
|
|
43
|
-
normalizeLookup(relationship.email ?? "").includes(needle));
|
|
44
|
-
if (exactMatch) {
|
|
45
|
-
return exactMatch.id;
|
|
46
|
-
}
|
|
47
|
-
return (relationships.find((relationship) => normalizeLookup(relationship.name).includes(needle))?.id ?? null);
|
|
48
|
-
}
|
|
49
|
-
async function resolveRelationshipIdFromText(service, rawText) {
|
|
50
|
-
const haystack = normalizeLookup(rawText);
|
|
51
|
-
if (!haystack) {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
const relationships = await service.listRelationships({ limit: 200 });
|
|
55
|
-
const fullNameMatch = relationships.find((relationship) => haystack.includes(normalizeLookup(relationship.name)));
|
|
56
|
-
if (fullNameMatch) {
|
|
57
|
-
return fullNameMatch.id;
|
|
58
|
-
}
|
|
59
|
-
const candidateMatches = new Map();
|
|
60
|
-
for (const relationship of relationships) {
|
|
61
|
-
const nameTokens = normalizeLookup(relationship.name)
|
|
62
|
-
.split(" ")
|
|
63
|
-
.filter((token) => token.length >= 3);
|
|
64
|
-
const handleTokens = [
|
|
65
|
-
normalizeLookup(relationship.primaryHandle).replace(/^@/, ""),
|
|
66
|
-
normalizeLookup(relationship.email ?? "").split("@")[0] ?? "",
|
|
67
|
-
].filter((token) => token.length >= 3);
|
|
68
|
-
for (const token of [...nameTokens, ...handleTokens]) {
|
|
69
|
-
const tokenPattern = new RegExp(`\\b${escapeRegExp(token)}\\b`, "i");
|
|
70
|
-
if (tokenPattern.test(rawText)) {
|
|
71
|
-
candidateMatches.set(relationship.id, relationship.id);
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (candidateMatches.size === 1) {
|
|
77
|
-
return [...candidateMatches.values()][0] ?? null;
|
|
78
|
-
}
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
async function resolveRelationshipId(service, params, body) {
|
|
82
|
-
const explicitRelationshipId = normalizedNonEmpty(params.relationshipId);
|
|
83
|
-
if (explicitRelationshipId) {
|
|
84
|
-
if (UUID_PATTERN.test(explicitRelationshipId)) {
|
|
85
|
-
return explicitRelationshipId;
|
|
86
|
-
}
|
|
87
|
-
const resolvedFromRelationshipId = await resolveRelationshipIdByName(service, explicitRelationshipId);
|
|
88
|
-
if (resolvedFromRelationshipId) {
|
|
89
|
-
return resolvedFromRelationshipId;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
const name = normalizedNonEmpty(params.name);
|
|
93
|
-
if (!name) {
|
|
94
|
-
for (const candidate of [params.intent, body]) {
|
|
95
|
-
const normalizedCandidate = normalizedNonEmpty(candidate);
|
|
96
|
-
const resolvedFromText = normalizedCandidate
|
|
97
|
-
? await resolveRelationshipIdFromText(service, normalizedCandidate)
|
|
98
|
-
: null;
|
|
99
|
-
if (resolvedFromText) {
|
|
100
|
-
return resolvedFromText;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
const resolvedFromName = await resolveRelationshipIdByName(service, name);
|
|
106
|
-
if (resolvedFromName) {
|
|
107
|
-
return resolvedFromName;
|
|
108
|
-
}
|
|
109
|
-
return resolveRelationshipIdFromText(service, name);
|
|
110
|
-
}
|
|
111
|
-
function normalizeFollowUpDueAt(rawDueAt) {
|
|
112
|
-
const trimmed = rawDueAt.trim();
|
|
113
|
-
if (!trimmed) {
|
|
114
|
-
return null;
|
|
115
|
-
}
|
|
116
|
-
const directMs = Date.parse(trimmed);
|
|
117
|
-
if (Number.isFinite(directMs)) {
|
|
118
|
-
return new Date(directMs).toISOString();
|
|
119
|
-
}
|
|
120
|
-
const normalized = normalizeLookup(trimmed);
|
|
121
|
-
const base = new Date();
|
|
122
|
-
const atDefaultFollowUpTime = (date) => {
|
|
123
|
-
const copy = new Date(date);
|
|
124
|
-
copy.setHours(9, 0, 0, 0);
|
|
125
|
-
return copy.toISOString();
|
|
126
|
-
};
|
|
127
|
-
if (/\btoday\b/.test(normalized)) {
|
|
128
|
-
return atDefaultFollowUpTime(base);
|
|
129
|
-
}
|
|
130
|
-
if (/\btomorrow\b/.test(normalized)) {
|
|
131
|
-
const tomorrow = new Date(base);
|
|
132
|
-
tomorrow.setDate(tomorrow.getDate() + 1);
|
|
133
|
-
return atDefaultFollowUpTime(tomorrow);
|
|
134
|
-
}
|
|
135
|
-
if (/\bnext week\b/.test(normalized) ||
|
|
136
|
-
/\bin a week\b/.test(normalized) ||
|
|
137
|
-
/\ba week from now\b/.test(normalized)) {
|
|
138
|
-
const nextWeek = new Date(base);
|
|
139
|
-
nextWeek.setDate(nextWeek.getDate() + 7);
|
|
140
|
-
return atDefaultFollowUpTime(nextWeek);
|
|
141
|
-
}
|
|
142
|
-
const weekdayMap = {
|
|
143
|
-
sunday: 0,
|
|
144
|
-
monday: 1,
|
|
145
|
-
tuesday: 2,
|
|
146
|
-
wednesday: 3,
|
|
147
|
-
thursday: 4,
|
|
148
|
-
friday: 5,
|
|
149
|
-
saturday: 6,
|
|
150
|
-
};
|
|
151
|
-
const weekdayMatch = normalized.match(/\b(?:(next)\s+)?(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\b/);
|
|
152
|
-
if (weekdayMatch) {
|
|
153
|
-
const qualifier = weekdayMatch[1] ?? "";
|
|
154
|
-
const weekdayToken = weekdayMatch[2] ?? "";
|
|
155
|
-
const targetWeekday = weekdayMap[weekdayToken];
|
|
156
|
-
if (targetWeekday !== undefined) {
|
|
157
|
-
const currentWeekday = base.getDay();
|
|
158
|
-
let delta = (targetWeekday - currentWeekday + 7) % 7;
|
|
159
|
-
if (qualifier === "next") {
|
|
160
|
-
delta = delta === 0 ? 7 : delta + 7;
|
|
161
|
-
}
|
|
162
|
-
else if (delta === 0) {
|
|
163
|
-
delta = 7;
|
|
164
|
-
}
|
|
165
|
-
const resolved = new Date(base);
|
|
166
|
-
resolved.setDate(resolved.getDate() + delta);
|
|
167
|
-
return atDefaultFollowUpTime(resolved);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return null;
|
|
171
|
-
}
|
|
172
|
-
const RELATIONSHIP_SUBACTIONS = [
|
|
173
|
-
"list_contacts",
|
|
174
|
-
"add_contact",
|
|
175
|
-
"log_interaction",
|
|
176
|
-
"add_follow_up",
|
|
177
|
-
"complete_follow_up",
|
|
178
|
-
"follow_up_list",
|
|
179
|
-
"days_since",
|
|
180
|
-
"list_overdue_followups",
|
|
181
|
-
"mark_followup_done",
|
|
182
|
-
"set_followup_threshold",
|
|
183
|
-
];
|
|
184
|
-
function normalizeRelationshipSubaction(value) {
|
|
185
|
-
if (typeof value !== "string")
|
|
186
|
-
return null;
|
|
187
|
-
const normalized = value.trim().toLowerCase();
|
|
188
|
-
return RELATIONSHIP_SUBACTIONS.includes(normalized)
|
|
189
|
-
? normalized
|
|
190
|
-
: null;
|
|
191
|
-
}
|
|
192
|
-
function normalizeShouldAct(value) {
|
|
193
|
-
if (typeof value === "boolean")
|
|
194
|
-
return value;
|
|
195
|
-
if (typeof value === "string") {
|
|
196
|
-
const normalized = value.trim().toLowerCase();
|
|
197
|
-
if (normalized === "true")
|
|
198
|
-
return true;
|
|
199
|
-
if (normalized === "false")
|
|
200
|
-
return false;
|
|
201
|
-
}
|
|
202
|
-
return null;
|
|
203
|
-
}
|
|
204
|
-
function normalizePlannerResponse(value) {
|
|
205
|
-
if (typeof value !== "string")
|
|
206
|
-
return undefined;
|
|
207
|
-
const trimmed = value.trim();
|
|
208
|
-
return trimmed.length > 0 ? trimmed : undefined;
|
|
209
|
-
}
|
|
210
|
-
const DEFAULT_FOLLOWUP_THRESHOLD_DAYS = 30;
|
|
211
|
-
function parseThresholdDays(value) {
|
|
212
|
-
if (typeof value === "number" && Number.isFinite(value) && value > 0) {
|
|
213
|
-
return Math.floor(value);
|
|
214
|
-
}
|
|
215
|
-
if (typeof value === "string" && value.trim().length > 0) {
|
|
216
|
-
const parsed = Number(value);
|
|
217
|
-
if (Number.isFinite(parsed) && parsed > 0) {
|
|
218
|
-
return Math.floor(parsed);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
return null;
|
|
222
|
-
}
|
|
223
|
-
function resolveRelationshipThresholdDays(relationship) {
|
|
224
|
-
return (parseThresholdDays(relationship.metadata.followupThresholdDays) ??
|
|
225
|
-
DEFAULT_FOLLOWUP_THRESHOLD_DAYS);
|
|
226
|
-
}
|
|
227
|
-
async function listOverdueRelationships(service, nowMs = Date.now()) {
|
|
228
|
-
const overdue = [];
|
|
229
|
-
const relationships = await service.listRelationships({ limit: 200 });
|
|
230
|
-
for (const relationship of relationships) {
|
|
231
|
-
if (!relationship.lastContactedAt) {
|
|
232
|
-
continue;
|
|
233
|
-
}
|
|
234
|
-
const lastContactedMs = new Date(relationship.lastContactedAt).getTime();
|
|
235
|
-
if (!Number.isFinite(lastContactedMs)) {
|
|
236
|
-
continue;
|
|
237
|
-
}
|
|
238
|
-
const thresholdDays = resolveRelationshipThresholdDays(relationship);
|
|
239
|
-
const thresholdMs = thresholdDays * 24 * 60 * 60 * 1000;
|
|
240
|
-
const ageMs = nowMs - lastContactedMs;
|
|
241
|
-
if (ageMs <= thresholdMs) {
|
|
242
|
-
continue;
|
|
243
|
-
}
|
|
244
|
-
overdue.push({
|
|
245
|
-
relationshipId: relationship.id,
|
|
246
|
-
name: relationship.name,
|
|
247
|
-
lastContactedAt: relationship.lastContactedAt,
|
|
248
|
-
thresholdDays,
|
|
249
|
-
daysOverdue: Math.floor((ageMs - thresholdMs) / (24 * 60 * 60 * 1000)),
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
overdue.sort((left, right) => right.daysOverdue - left.daysOverdue);
|
|
253
|
-
return overdue;
|
|
254
|
-
}
|
|
255
|
-
async function resolveRelationshipPlanWithLlm(args) {
|
|
256
|
-
if (typeof args.runtime.useModel !== "function") {
|
|
257
|
-
return { subaction: null, shouldAct: null };
|
|
258
|
-
}
|
|
259
|
-
const recentConversation = (await collectRecentConversationTexts({
|
|
260
|
-
runtime: args.runtime,
|
|
261
|
-
message: args.message,
|
|
262
|
-
state: args.state,
|
|
263
|
-
limit: 6,
|
|
264
|
-
})).join("\n");
|
|
265
|
-
const currentMessage = typeof args.message.content?.text === "string"
|
|
266
|
-
? args.message.content.text
|
|
267
|
-
: "";
|
|
268
|
-
const prompt = [
|
|
269
|
-
"Plan the OWNER_RELATIONSHIP (Rolodex) subaction for this request.",
|
|
270
|
-
"The user may speak in any language.",
|
|
271
|
-
"Return ONLY valid JSON with exactly these fields:",
|
|
272
|
-
'{"subaction":"list_contacts"|"add_contact"|"log_interaction"|"add_follow_up"|"complete_follow_up"|"follow_up_list"|"days_since"|"list_overdue_followups"|"mark_followup_done"|"set_followup_threshold"|null,"shouldAct":true|false,"response":"string|null"}',
|
|
273
|
-
"",
|
|
274
|
-
"Choose list_contacts when the user wants to see, browse, list, or recall who is in the Rolodex.",
|
|
275
|
-
"Choose add_contact when the user wants to remember a new person, store a handle, or add them to the contact list.",
|
|
276
|
-
"Choose log_interaction when the user reports a past conversation, call, meeting, or message they had with a known contact.",
|
|
277
|
-
"Choose add_follow_up when the user wants to schedule a future reminder to reach out to a contact.",
|
|
278
|
-
"Choose complete_follow_up when the user marks an existing follow-up as done or finished.",
|
|
279
|
-
"Choose follow_up_list when the user asks what follow-ups are pending or due.",
|
|
280
|
-
"Choose days_since when the user asks how long it has been since they last talked to or contacted a person.",
|
|
281
|
-
"Choose list_overdue_followups when the user asks who is overdue, who they owe a follow-up to, or who they have not contacted in too long.",
|
|
282
|
-
"Choose mark_followup_done when the user says they already followed up, closed the loop, or wants an overdue follow-up marked done for a contact.",
|
|
283
|
-
"Choose set_followup_threshold when the user wants a durable cadence like every 14 days for a specific contact.",
|
|
284
|
-
"Set shouldAct=false only when the request is too vague to safely choose any of the ten subactions.",
|
|
285
|
-
"When shouldAct=false, response must be a short clarifying question in the user's language.",
|
|
286
|
-
"",
|
|
287
|
-
`Current request: ${JSON.stringify(currentMessage)}`,
|
|
288
|
-
`Resolved intent: ${JSON.stringify(args.intent)}`,
|
|
289
|
-
`Structured parameters: ${JSON.stringify(args.params)}`,
|
|
290
|
-
`Recent conversation: ${JSON.stringify(recentConversation)}`,
|
|
291
|
-
].join("\n");
|
|
292
|
-
try {
|
|
293
|
-
const result = await args.runtime.useModel(ModelType.TEXT_SMALL, {
|
|
294
|
-
prompt,
|
|
295
|
-
});
|
|
296
|
-
const rawResponse = typeof result === "string" ? result : "";
|
|
297
|
-
const parsed = parseKeyValueXml(rawResponse) ??
|
|
298
|
-
parseJSONObjectFromText(rawResponse);
|
|
299
|
-
if (!parsed) {
|
|
300
|
-
return { subaction: null, shouldAct: null };
|
|
301
|
-
}
|
|
302
|
-
const subaction = normalizeRelationshipSubaction(parsed.subaction);
|
|
303
|
-
return {
|
|
304
|
-
subaction,
|
|
305
|
-
shouldAct: subaction ? true : normalizeShouldAct(parsed.shouldAct),
|
|
306
|
-
response: normalizePlannerResponse(parsed.response),
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
catch (error) {
|
|
310
|
-
args.runtime.logger?.warn?.({
|
|
311
|
-
src: "action:relationships",
|
|
312
|
-
error: error instanceof Error ? error.message : String(error),
|
|
313
|
-
}, "Relationship planning model call failed");
|
|
314
|
-
return { subaction: null, shouldAct: null };
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
function formatRelationshipLine(rel) {
|
|
318
|
-
const last = rel.lastContactedAt
|
|
319
|
-
? ` — last contacted ${rel.lastContactedAt}`
|
|
320
|
-
: " — no contact logged";
|
|
321
|
-
return `- ${rel.name} (${rel.primaryChannel}: ${rel.primaryHandle})${last}`;
|
|
322
|
-
}
|
|
323
|
-
export const relationshipAction = {
|
|
324
|
-
name: "OWNER_RELATIONSHIP",
|
|
325
|
-
similes: [
|
|
326
|
-
"RELATIONSHIP",
|
|
327
|
-
"RELATIONSHIPS",
|
|
328
|
-
"CONTACT",
|
|
329
|
-
"CONTACTS",
|
|
330
|
-
"ROLODEX",
|
|
331
|
-
"FOLLOW_UP",
|
|
332
|
-
"FOLLOW_UPS",
|
|
333
|
-
"LOG_INTERACTION",
|
|
334
|
-
"ADD_CONTACT",
|
|
335
|
-
"DAYS_SINCE",
|
|
336
|
-
"LAST_CONTACTED",
|
|
337
|
-
"LIST_OVERDUE_FOLLOWUPS",
|
|
338
|
-
"MARK_FOLLOWUP_DONE",
|
|
339
|
-
"SET_FOLLOWUP_THRESHOLD",
|
|
340
|
-
"OVERDUE_FOLLOWUPS",
|
|
341
|
-
],
|
|
342
|
-
description: "OWNER-scoped contacts / rolodex / follow-up tracker. Single umbrella for " +
|
|
343
|
-
"everything to do with the owner's people graph: listing or adding " +
|
|
344
|
-
"contacts, logging an interaction, asking how long since the owner " +
|
|
345
|
-
"talked to someone, creating or completing a follow-up, listing overdue " +
|
|
346
|
-
"follow-ups, and tuning the overdue threshold. " +
|
|
347
|
-
"Subactions: list_contacts | add_contact | log_interaction | days_since | " +
|
|
348
|
-
"add_follow_up | complete_follow_up | follow_up_list | list_overdue_followups | " +
|
|
349
|
-
"mark_followup_done | set_followup_threshold. " +
|
|
350
|
-
"Positive triggers: 'how long since I talked to <person>' → days_since; " +
|
|
351
|
-
"'remind me to follow up with <person> [when]' → add_follow_up; " +
|
|
352
|
-
"'who do I need to follow up with' / 'show overdue follow-ups' → " +
|
|
353
|
-
"list_overdue_followups; 'mark the <person> follow-up done' → " +
|
|
354
|
-
"mark_followup_done; 'bump the overdue threshold to N days' → " +
|
|
355
|
-
"set_followup_threshold. " +
|
|
356
|
-
"Do NOT split this request across OWNER_RELATIONSHIP and any LIST_OVERDUE_FOLLOWUPS " +
|
|
357
|
-
"/ MARK_FOLLOWUP_DONE / SET_FOLLOWUP_THRESHOLD action — OWNER_RELATIONSHIP is " +
|
|
358
|
-
"the single entry point for the entire contacts + follow-up surface.",
|
|
359
|
-
suppressPostActionContinuation: true,
|
|
360
|
-
validate: async (runtime, message) => hasLifeOpsAccess(runtime, message),
|
|
361
|
-
handler: async (runtime, message, state, options, callback) => {
|
|
362
|
-
if (!(await hasLifeOpsAccess(runtime, message))) {
|
|
363
|
-
const text = "Relationship management is restricted to the owner.";
|
|
364
|
-
await callback?.({ text });
|
|
365
|
-
return { text, success: false, data: { error: "PERMISSION_DENIED" } };
|
|
366
|
-
}
|
|
367
|
-
const rawParams = getParams(options);
|
|
368
|
-
const params = (await extractActionParamsViaLlm({
|
|
369
|
-
runtime,
|
|
370
|
-
message,
|
|
371
|
-
state,
|
|
372
|
-
actionName: "OWNER_RELATIONSHIP",
|
|
373
|
-
actionDescription: relationshipAction.description ?? "",
|
|
374
|
-
paramSchema: relationshipAction.parameters ?? [],
|
|
375
|
-
existingParams: rawParams,
|
|
376
|
-
requiredFields: ["subaction"],
|
|
377
|
-
}));
|
|
378
|
-
const body = messageText(message);
|
|
379
|
-
const explicitSubaction = normalizeRelationshipSubaction(params.subaction);
|
|
380
|
-
let subaction = explicitSubaction;
|
|
381
|
-
if (!subaction) {
|
|
382
|
-
const intent = (params.intent ?? body).trim();
|
|
383
|
-
const plan = await resolveRelationshipPlanWithLlm({
|
|
384
|
-
runtime,
|
|
385
|
-
message,
|
|
386
|
-
state,
|
|
387
|
-
intent,
|
|
388
|
-
params,
|
|
389
|
-
});
|
|
390
|
-
subaction = plan.subaction;
|
|
391
|
-
if (plan.shouldAct === false || !subaction) {
|
|
392
|
-
const text = plan.response ??
|
|
393
|
-
"Tell me whether you want to list contacts, add a contact, log an interaction, schedule a follow-up, complete a follow-up, list overdue follow-ups, change a follow-up threshold, or check days since last contact.";
|
|
394
|
-
await callback?.({ text });
|
|
395
|
-
return {
|
|
396
|
-
text,
|
|
397
|
-
success: false,
|
|
398
|
-
values: {
|
|
399
|
-
success: false,
|
|
400
|
-
error: "PLANNER_SHOULDACT_FALSE",
|
|
401
|
-
noop: true,
|
|
402
|
-
suggestedSubaction: subaction,
|
|
403
|
-
},
|
|
404
|
-
data: {
|
|
405
|
-
noop: true,
|
|
406
|
-
error: "PLANNER_SHOULDACT_FALSE",
|
|
407
|
-
suggestedSubaction: subaction,
|
|
408
|
-
},
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
const service = new LifeOpsService(runtime);
|
|
413
|
-
if (subaction === "list_contacts") {
|
|
414
|
-
const contacts = await service.listRelationships({ limit: 50 });
|
|
415
|
-
const text = contacts.length === 0
|
|
416
|
-
? "You have no contacts in your Rolodex yet."
|
|
417
|
-
: `You have ${contacts.length} contact${contacts.length === 1 ? "" : "s"}:\n${contacts.map(formatRelationshipLine).join("\n")}`;
|
|
418
|
-
await callback?.({ text, source: "action", action: "OWNER_RELATIONSHIP" });
|
|
419
|
-
return {
|
|
420
|
-
text,
|
|
421
|
-
success: true,
|
|
422
|
-
data: { subaction, contacts },
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
if (subaction === "add_contact") {
|
|
426
|
-
const name = params.name;
|
|
427
|
-
const channel = params.channel;
|
|
428
|
-
const handle = params.handle;
|
|
429
|
-
if (!name || !channel || !handle) {
|
|
430
|
-
const text = "To add a contact I need at least a name, a primary channel, and a handle.";
|
|
431
|
-
await callback?.({ text });
|
|
432
|
-
return {
|
|
433
|
-
text,
|
|
434
|
-
success: false,
|
|
435
|
-
data: { subaction, error: "MISSING_FIELDS" },
|
|
436
|
-
};
|
|
437
|
-
}
|
|
438
|
-
if (!LIFEOPS_MESSAGE_CHANNELS.includes(channel)) {
|
|
439
|
-
const text = `Unknown channel '${channel}'. Supported: ${LIFEOPS_MESSAGE_CHANNELS.join(", ")}.`;
|
|
440
|
-
await callback?.({ text });
|
|
441
|
-
return {
|
|
442
|
-
text,
|
|
443
|
-
success: false,
|
|
444
|
-
data: { subaction, error: "INVALID_CHANNEL" },
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
const rel = await service.upsertRelationship({
|
|
448
|
-
name,
|
|
449
|
-
primaryChannel: channel,
|
|
450
|
-
primaryHandle: handle,
|
|
451
|
-
email: params.email ?? null,
|
|
452
|
-
phone: params.phone ?? null,
|
|
453
|
-
notes: params.notes ?? "",
|
|
454
|
-
tags: [],
|
|
455
|
-
relationshipType: "contact",
|
|
456
|
-
lastContactedAt: null,
|
|
457
|
-
metadata: {},
|
|
458
|
-
});
|
|
459
|
-
const text = `Added ${rel.name} (${rel.primaryChannel}: ${rel.primaryHandle}) to your Rolodex.`;
|
|
460
|
-
await callback?.({ text, source: "action", action: "OWNER_RELATIONSHIP" });
|
|
461
|
-
return {
|
|
462
|
-
text,
|
|
463
|
-
success: true,
|
|
464
|
-
data: { subaction, relationship: rel },
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
if (subaction === "log_interaction") {
|
|
468
|
-
const relationshipId = await resolveRelationshipId(service, params, body);
|
|
469
|
-
if (!relationshipId) {
|
|
470
|
-
const text = "I need a known contact to log an interaction.";
|
|
471
|
-
await callback?.({ text });
|
|
472
|
-
return {
|
|
473
|
-
text,
|
|
474
|
-
success: false,
|
|
475
|
-
data: { subaction, error: "MISSING_RELATIONSHIP_ID" },
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
const rel = await service.getRelationship(relationshipId);
|
|
479
|
-
if (!rel) {
|
|
480
|
-
const text = `No contact found with id ${relationshipId}.`;
|
|
481
|
-
await callback?.({ text });
|
|
482
|
-
return {
|
|
483
|
-
text,
|
|
484
|
-
success: false,
|
|
485
|
-
data: { subaction, error: "NOT_FOUND" },
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
const channel = params.channel ?? rel.primaryChannel;
|
|
489
|
-
const interaction = await service.logInteraction({
|
|
490
|
-
relationshipId,
|
|
491
|
-
channel,
|
|
492
|
-
direction: "outbound",
|
|
493
|
-
summary: params.notes ?? params.reason ?? "",
|
|
494
|
-
occurredAt: new Date().toISOString(),
|
|
495
|
-
metadata: {},
|
|
496
|
-
});
|
|
497
|
-
const text = `Logged interaction with ${rel.name} on ${channel}.`;
|
|
498
|
-
await callback?.({ text, source: "action", action: "OWNER_RELATIONSHIP" });
|
|
499
|
-
return {
|
|
500
|
-
text,
|
|
501
|
-
success: true,
|
|
502
|
-
data: { subaction, interaction },
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
|
-
if (subaction === "add_follow_up") {
|
|
506
|
-
const relationshipId = await resolveRelationshipId(service, params, body);
|
|
507
|
-
const dueAtSource = normalizedNonEmpty(params.dueAt) ?? body;
|
|
508
|
-
const dueAt = dueAtSource ? normalizeFollowUpDueAt(dueAtSource) : null;
|
|
509
|
-
const reason = params.reason ?? params.notes ?? "";
|
|
510
|
-
if (!relationshipId || !dueAt) {
|
|
511
|
-
const text = !relationshipId
|
|
512
|
-
? "I need a known contact to schedule a follow-up."
|
|
513
|
-
: "I need a due date or time to schedule a follow-up.";
|
|
514
|
-
await callback?.({ text });
|
|
515
|
-
return {
|
|
516
|
-
text,
|
|
517
|
-
success: false,
|
|
518
|
-
data: { subaction, error: "MISSING_FIELDS" },
|
|
519
|
-
};
|
|
520
|
-
}
|
|
521
|
-
const followUp = await service.createFollowUp({
|
|
522
|
-
relationshipId,
|
|
523
|
-
dueAt,
|
|
524
|
-
reason,
|
|
525
|
-
priority: 3,
|
|
526
|
-
draft: null,
|
|
527
|
-
completedAt: null,
|
|
528
|
-
metadata: {},
|
|
529
|
-
});
|
|
530
|
-
const text = `Scheduled follow-up for ${dueAt}: ${reason || "(no reason)"}.`;
|
|
531
|
-
await callback?.({ text, source: "action", action: "OWNER_RELATIONSHIP" });
|
|
532
|
-
return {
|
|
533
|
-
text,
|
|
534
|
-
success: true,
|
|
535
|
-
data: { subaction, followUp },
|
|
536
|
-
};
|
|
537
|
-
}
|
|
538
|
-
if (subaction === "complete_follow_up") {
|
|
539
|
-
const followUpId = params.followUpId;
|
|
540
|
-
if (!followUpId) {
|
|
541
|
-
const text = "I need the followUpId to complete.";
|
|
542
|
-
await callback?.({ text });
|
|
543
|
-
return {
|
|
544
|
-
text,
|
|
545
|
-
success: false,
|
|
546
|
-
data: { subaction, error: "MISSING_FOLLOW_UP_ID" },
|
|
547
|
-
};
|
|
548
|
-
}
|
|
549
|
-
await service.completeFollowUp(followUpId);
|
|
550
|
-
const text = `Marked follow-up ${followUpId} as completed.`;
|
|
551
|
-
await callback?.({ text, source: "action", action: "OWNER_RELATIONSHIP" });
|
|
552
|
-
return {
|
|
553
|
-
text,
|
|
554
|
-
success: true,
|
|
555
|
-
data: { subaction, followUpId },
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
if (subaction === "follow_up_list") {
|
|
559
|
-
const queue = await service.getDailyFollowUpQueue({ limit: 50 });
|
|
560
|
-
const text = queue.length === 0
|
|
561
|
-
? "No follow-ups due today."
|
|
562
|
-
: `You have ${queue.length} follow-up${queue.length === 1 ? "" : "s"} due:\n${queue
|
|
563
|
-
.map((fu) => `- ${fu.dueAt} — ${fu.reason} (id: ${fu.id})`)
|
|
564
|
-
.join("\n")}`;
|
|
565
|
-
await callback?.({ text, source: "action", action: "OWNER_RELATIONSHIP" });
|
|
566
|
-
return {
|
|
567
|
-
text,
|
|
568
|
-
success: true,
|
|
569
|
-
data: { subaction, followUps: queue },
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
if (subaction === "days_since") {
|
|
573
|
-
const relationshipId = await resolveRelationshipId(service, params, body);
|
|
574
|
-
if (!relationshipId) {
|
|
575
|
-
const text = "I need a known contact to check last contact.";
|
|
576
|
-
await callback?.({ text });
|
|
577
|
-
return {
|
|
578
|
-
text,
|
|
579
|
-
success: false,
|
|
580
|
-
data: { subaction, error: "MISSING_RELATIONSHIP_ID" },
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
const rel = await service.getRelationship(relationshipId);
|
|
584
|
-
const days = await service.getDaysSinceContact(relationshipId);
|
|
585
|
-
const text = days === null
|
|
586
|
-
? `No contact has been logged with ${rel?.name ?? relationshipId}.`
|
|
587
|
-
: `It has been ${days} day${days === 1 ? "" : "s"} since you contacted ${rel?.name ?? relationshipId}.`;
|
|
588
|
-
await callback?.({ text, source: "action", action: "OWNER_RELATIONSHIP" });
|
|
589
|
-
return {
|
|
590
|
-
text,
|
|
591
|
-
success: true,
|
|
592
|
-
data: { subaction, relationshipId, days },
|
|
593
|
-
};
|
|
594
|
-
}
|
|
595
|
-
if (subaction === "list_overdue_followups") {
|
|
596
|
-
const overdue = await listOverdueRelationships(service);
|
|
597
|
-
const text = overdue.length === 0
|
|
598
|
-
? "No overdue follow-ups."
|
|
599
|
-
: `Overdue follow-ups (${overdue.length}):\n${overdue
|
|
600
|
-
.map((entry) => `- ${entry.name}: last contacted ${entry.lastContactedAt} (+${entry.daysOverdue}d over ${entry.thresholdDays}d threshold)`)
|
|
601
|
-
.join("\n")}`;
|
|
602
|
-
await callback?.({ text, source: "action", action: "OWNER_RELATIONSHIP" });
|
|
603
|
-
return {
|
|
604
|
-
text,
|
|
605
|
-
success: true,
|
|
606
|
-
data: { subaction, overdue },
|
|
607
|
-
};
|
|
608
|
-
}
|
|
609
|
-
if (subaction === "mark_followup_done") {
|
|
610
|
-
const relationshipId = await resolveRelationshipId(service, params, body);
|
|
611
|
-
if (!relationshipId) {
|
|
612
|
-
const text = "I need a known contact to mark that follow-up done.";
|
|
613
|
-
await callback?.({ text });
|
|
614
|
-
return {
|
|
615
|
-
text,
|
|
616
|
-
success: false,
|
|
617
|
-
data: { subaction, error: "MISSING_RELATIONSHIP_ID" },
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
const relationship = await service.getRelationship(relationshipId);
|
|
621
|
-
if (!relationship) {
|
|
622
|
-
const text = `No contact found with id ${relationshipId}.`;
|
|
623
|
-
await callback?.({ text });
|
|
624
|
-
return {
|
|
625
|
-
text,
|
|
626
|
-
success: false,
|
|
627
|
-
data: { subaction, error: "NOT_FOUND" },
|
|
628
|
-
};
|
|
629
|
-
}
|
|
630
|
-
const nowIso = new Date().toISOString();
|
|
631
|
-
await service.upsertRelationship({
|
|
632
|
-
id: relationship.id,
|
|
633
|
-
name: relationship.name,
|
|
634
|
-
primaryChannel: relationship.primaryChannel,
|
|
635
|
-
primaryHandle: relationship.primaryHandle,
|
|
636
|
-
email: relationship.email,
|
|
637
|
-
phone: relationship.phone,
|
|
638
|
-
notes: relationship.notes,
|
|
639
|
-
tags: relationship.tags,
|
|
640
|
-
relationshipType: relationship.relationshipType,
|
|
641
|
-
lastContactedAt: nowIso,
|
|
642
|
-
metadata: {
|
|
643
|
-
...relationship.metadata,
|
|
644
|
-
lastFollowupNote: params.notes ?? params.reason ?? null,
|
|
645
|
-
},
|
|
646
|
-
});
|
|
647
|
-
const pendingFollowUps = (await service.listFollowUps({ status: "pending", limit: 100 })).filter((followUp) => followUp.relationshipId === relationship.id);
|
|
648
|
-
for (const followUp of pendingFollowUps) {
|
|
649
|
-
await service.completeFollowUp(followUp.id);
|
|
650
|
-
}
|
|
651
|
-
const text = pendingFollowUps.length > 0
|
|
652
|
-
? `Marked ${relationship.name} as followed up and completed ${pendingFollowUps.length} open follow-up${pendingFollowUps.length === 1 ? "" : "s"}.`
|
|
653
|
-
: `Marked ${relationship.name} as followed up.`;
|
|
654
|
-
await callback?.({ text, source: "action", action: "OWNER_RELATIONSHIP" });
|
|
655
|
-
return {
|
|
656
|
-
text,
|
|
657
|
-
success: true,
|
|
658
|
-
data: {
|
|
659
|
-
subaction,
|
|
660
|
-
relationshipId: relationship.id,
|
|
661
|
-
completedFollowUpIds: pendingFollowUps.map((followUp) => followUp.id),
|
|
662
|
-
lastContactedAt: nowIso,
|
|
663
|
-
},
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
if (subaction === "set_followup_threshold") {
|
|
667
|
-
const relationshipId = await resolveRelationshipId(service, params, body);
|
|
668
|
-
const thresholdDays = parseThresholdDays(params.thresholdDays);
|
|
669
|
-
if (!relationshipId || thresholdDays === null) {
|
|
670
|
-
const text = !relationshipId
|
|
671
|
-
? "I need a known contact to change the follow-up threshold."
|
|
672
|
-
: "I need a positive threshold in days.";
|
|
673
|
-
await callback?.({ text });
|
|
674
|
-
return {
|
|
675
|
-
text,
|
|
676
|
-
success: false,
|
|
677
|
-
data: { subaction, error: "MISSING_FIELDS" },
|
|
678
|
-
};
|
|
679
|
-
}
|
|
680
|
-
const relationship = await service.getRelationship(relationshipId);
|
|
681
|
-
if (!relationship) {
|
|
682
|
-
const text = `No contact found with id ${relationshipId}.`;
|
|
683
|
-
await callback?.({ text });
|
|
684
|
-
return {
|
|
685
|
-
text,
|
|
686
|
-
success: false,
|
|
687
|
-
data: { subaction, error: "NOT_FOUND" },
|
|
688
|
-
};
|
|
689
|
-
}
|
|
690
|
-
await service.upsertRelationship({
|
|
691
|
-
id: relationship.id,
|
|
692
|
-
name: relationship.name,
|
|
693
|
-
primaryChannel: relationship.primaryChannel,
|
|
694
|
-
primaryHandle: relationship.primaryHandle,
|
|
695
|
-
email: relationship.email,
|
|
696
|
-
phone: relationship.phone,
|
|
697
|
-
notes: relationship.notes,
|
|
698
|
-
tags: relationship.tags,
|
|
699
|
-
relationshipType: relationship.relationshipType,
|
|
700
|
-
lastContactedAt: relationship.lastContactedAt,
|
|
701
|
-
metadata: {
|
|
702
|
-
...relationship.metadata,
|
|
703
|
-
followupThresholdDays: thresholdDays,
|
|
704
|
-
},
|
|
705
|
-
});
|
|
706
|
-
const text = `Set follow-up threshold for ${relationship.name} to ${thresholdDays} days.`;
|
|
707
|
-
await callback?.({ text, source: "action", action: "OWNER_RELATIONSHIP" });
|
|
708
|
-
return {
|
|
709
|
-
text,
|
|
710
|
-
success: true,
|
|
711
|
-
data: { subaction, relationshipId: relationship.id, thresholdDays },
|
|
712
|
-
};
|
|
713
|
-
}
|
|
714
|
-
const text = `Unknown relationship subaction: ${subaction}.`;
|
|
715
|
-
await callback?.({ text });
|
|
716
|
-
return {
|
|
717
|
-
text,
|
|
718
|
-
success: false,
|
|
719
|
-
data: { error: "UNKNOWN_SUBACTION", subaction },
|
|
720
|
-
};
|
|
721
|
-
},
|
|
722
|
-
parameters: [
|
|
723
|
-
{
|
|
724
|
-
name: "subaction",
|
|
725
|
-
description: "Which relationship operation to run: list_contacts, add_contact, log_interaction, add_follow_up, complete_follow_up, follow_up_list, days_since, list_overdue_followups, mark_followup_done, or set_followup_threshold.",
|
|
726
|
-
schema: { type: "string" },
|
|
727
|
-
},
|
|
728
|
-
{
|
|
729
|
-
name: "intent",
|
|
730
|
-
description: "Free-form user intent used to infer subaction when not set.",
|
|
731
|
-
schema: { type: "string" },
|
|
732
|
-
},
|
|
733
|
-
{
|
|
734
|
-
name: "name",
|
|
735
|
-
description: "Contact display name. When relationshipId is omitted, the handler resolves an existing contact by this name.",
|
|
736
|
-
schema: { type: "string" },
|
|
737
|
-
},
|
|
738
|
-
{
|
|
739
|
-
name: "channel",
|
|
740
|
-
description: "Primary channel for the contact (email, telegram, discord, signal, sms, twilio_voice, imessage, whatsapp).",
|
|
741
|
-
schema: { type: "string" },
|
|
742
|
-
},
|
|
743
|
-
{
|
|
744
|
-
name: "handle",
|
|
745
|
-
description: "Primary handle/address on the chosen channel.",
|
|
746
|
-
schema: { type: "string" },
|
|
747
|
-
},
|
|
748
|
-
{
|
|
749
|
-
name: "email",
|
|
750
|
-
description: "Optional email address for the contact.",
|
|
751
|
-
schema: { type: "string" },
|
|
752
|
-
},
|
|
753
|
-
{
|
|
754
|
-
name: "phone",
|
|
755
|
-
description: "Optional phone number for the contact.",
|
|
756
|
-
schema: { type: "string" },
|
|
757
|
-
},
|
|
758
|
-
{
|
|
759
|
-
name: "notes",
|
|
760
|
-
description: "Free-form notes or interaction summary.",
|
|
761
|
-
schema: { type: "string" },
|
|
762
|
-
},
|
|
763
|
-
{
|
|
764
|
-
name: "relationshipId",
|
|
765
|
-
description: "Target relationship id.",
|
|
766
|
-
schema: { type: "string" },
|
|
767
|
-
},
|
|
768
|
-
{
|
|
769
|
-
name: "followUpId",
|
|
770
|
-
description: "Target follow-up id.",
|
|
771
|
-
schema: { type: "string" },
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
name: "reason",
|
|
775
|
-
description: "Reason or purpose for a follow-up.",
|
|
776
|
-
schema: { type: "string" },
|
|
777
|
-
},
|
|
778
|
-
{
|
|
779
|
-
name: "dueAt",
|
|
780
|
-
description: "Follow-up due time. Accepts natural language like 'tomorrow', 'next week', or 'next Tuesday at 3pm', or an ISO-8601 timestamp.",
|
|
781
|
-
schema: { type: "string" },
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
name: "thresholdDays",
|
|
785
|
-
description: "Durable overdue threshold in days for this contact. Use for cadence rules like every 14 days.",
|
|
786
|
-
schema: { type: "number" },
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
name: "confirmed",
|
|
790
|
-
description: "Optional explicit confirmation flag.",
|
|
791
|
-
schema: { type: "boolean" },
|
|
792
|
-
},
|
|
793
|
-
],
|
|
794
|
-
examples: [
|
|
795
|
-
[
|
|
796
|
-
{
|
|
797
|
-
name: "{{name1}}",
|
|
798
|
-
content: { text: "Show me my contacts." },
|
|
799
|
-
},
|
|
800
|
-
{
|
|
801
|
-
name: "{{agentName}}",
|
|
802
|
-
content: {
|
|
803
|
-
text: "You have 3 contacts: ...",
|
|
804
|
-
action: "OWNER_RELATIONSHIP",
|
|
805
|
-
},
|
|
806
|
-
},
|
|
807
|
-
],
|
|
808
|
-
[
|
|
809
|
-
{
|
|
810
|
-
name: "{{name1}}",
|
|
811
|
-
content: {
|
|
812
|
-
text: "Add Alice to my Rolodex, her Telegram handle is @alice.",
|
|
813
|
-
},
|
|
814
|
-
},
|
|
815
|
-
{
|
|
816
|
-
name: "{{agentName}}",
|
|
817
|
-
content: {
|
|
818
|
-
text: "Added Alice (telegram: @alice) to your Rolodex.",
|
|
819
|
-
action: "OWNER_RELATIONSHIP",
|
|
820
|
-
},
|
|
821
|
-
},
|
|
822
|
-
],
|
|
823
|
-
[
|
|
824
|
-
{
|
|
825
|
-
name: "{{name1}}",
|
|
826
|
-
content: {
|
|
827
|
-
text: "Log that I spoke with Bob today about the project.",
|
|
828
|
-
},
|
|
829
|
-
},
|
|
830
|
-
{
|
|
831
|
-
name: "{{agentName}}",
|
|
832
|
-
content: {
|
|
833
|
-
text: "Logged interaction with Bob on telegram.",
|
|
834
|
-
action: "OWNER_RELATIONSHIP",
|
|
835
|
-
},
|
|
836
|
-
},
|
|
837
|
-
],
|
|
838
|
-
[
|
|
839
|
-
{
|
|
840
|
-
name: "{{name1}}",
|
|
841
|
-
content: {
|
|
842
|
-
text: "Remind me to follow up with Carol next Monday about the contract.",
|
|
843
|
-
},
|
|
844
|
-
},
|
|
845
|
-
{
|
|
846
|
-
name: "{{agentName}}",
|
|
847
|
-
content: {
|
|
848
|
-
text: "Scheduled follow-up for 2026-04-20T09:00:00Z: the contract.",
|
|
849
|
-
action: "OWNER_RELATIONSHIP",
|
|
850
|
-
},
|
|
851
|
-
},
|
|
852
|
-
],
|
|
853
|
-
[
|
|
854
|
-
{
|
|
855
|
-
name: "{{name1}}",
|
|
856
|
-
content: { text: "What follow-ups do I have today?" },
|
|
857
|
-
},
|
|
858
|
-
{
|
|
859
|
-
name: "{{agentName}}",
|
|
860
|
-
content: {
|
|
861
|
-
text: "You have 2 follow-ups due: ...",
|
|
862
|
-
action: "OWNER_RELATIONSHIP",
|
|
863
|
-
},
|
|
864
|
-
},
|
|
865
|
-
],
|
|
866
|
-
[
|
|
867
|
-
{
|
|
868
|
-
name: "{{name1}}",
|
|
869
|
-
content: { text: "How long has it been since I talked to Dan?" },
|
|
870
|
-
},
|
|
871
|
-
{
|
|
872
|
-
name: "{{agentName}}",
|
|
873
|
-
content: {
|
|
874
|
-
text: "It has been 14 days since you contacted Dan.",
|
|
875
|
-
action: "OWNER_RELATIONSHIP",
|
|
876
|
-
},
|
|
877
|
-
},
|
|
878
|
-
],
|
|
879
|
-
],
|
|
880
|
-
};
|