@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,853 +0,0 @@
|
|
|
1
|
-
import { extractActionParamsViaLlm, hasAdminAccess, hasOwnerAccess, } from "@elizaos/agent";
|
|
2
|
-
import { logger, } from "@elizaos/core";
|
|
3
|
-
import { LifeOpsService } from "../lifeops/service.js";
|
|
4
|
-
import { readTwilioCredentialsFromEnv, sendTwilioVoiceCall, } from "../lifeops/twilio.js";
|
|
5
|
-
const ACTION_NAME = "TWILIO_VOICE_CALL";
|
|
6
|
-
function coerceString(value) {
|
|
7
|
-
if (typeof value !== "string")
|
|
8
|
-
return undefined;
|
|
9
|
-
const trimmed = value.trim();
|
|
10
|
-
return trimmed.length > 0 ? trimmed : undefined;
|
|
11
|
-
}
|
|
12
|
-
function coerceBool(value) {
|
|
13
|
-
if (value === true)
|
|
14
|
-
return true;
|
|
15
|
-
if (typeof value === "string")
|
|
16
|
-
return value.toLowerCase() === "true";
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
const E164_RE = /^\+[1-9]\d{1,14}$/;
|
|
20
|
-
const PLACEHOLDER_555_RE = /^\+?1?[-\s]?\(?5{3}\)?[-\s]?5{3}[-\s]?5{4}$/;
|
|
21
|
-
function isE164(value) {
|
|
22
|
-
return E164_RE.test(value);
|
|
23
|
-
}
|
|
24
|
-
function isPlaceholderOrNonNumeric(value) {
|
|
25
|
-
if (PLACEHOLDER_555_RE.test(value))
|
|
26
|
-
return true;
|
|
27
|
-
// any letter indicates a natural-language phrase like "owner's cable company"
|
|
28
|
-
if (/[a-zA-Z]/.test(value))
|
|
29
|
-
return true;
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
function invalidPhoneResult(to, contact, actionName, errorCode) {
|
|
33
|
-
const subject = contact ?? "this contact";
|
|
34
|
-
const text = errorCode === "PLACEHOLDER_PHONE_NUMBER"
|
|
35
|
-
? `"${to}" looks like a placeholder phone number. Please share the real E.164 number (e.g. +15551234567) for ${subject} before I can place the call.`
|
|
36
|
-
: `I need a valid phone number in E.164 format (e.g. +15551234567) to place the call. Please confirm the number for ${subject}.`;
|
|
37
|
-
return {
|
|
38
|
-
text,
|
|
39
|
-
success: false,
|
|
40
|
-
values: { success: false, error: errorCode, to, contact: contact ?? null },
|
|
41
|
-
data: { actionName, error: errorCode, to, contact: contact ?? null },
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export const twilioCallAction = {
|
|
45
|
-
name: ACTION_NAME,
|
|
46
|
-
similes: [
|
|
47
|
-
"CALL_ME",
|
|
48
|
-
"PLACE_CALL",
|
|
49
|
-
"VOICE_CALL",
|
|
50
|
-
"TWILIO_CALL",
|
|
51
|
-
"CALL_DENTIST",
|
|
52
|
-
"PHONE_SUPPORT",
|
|
53
|
-
],
|
|
54
|
-
description: "Place a voice call via Twilio. Use only for urgent escalations or " +
|
|
55
|
-
"explicit voice-call requests from the owner. Use this for real phone " +
|
|
56
|
-
"calls, not for calendar-only rescheduling or advice. Always drafts first; the " +
|
|
57
|
-
"caller must pass confirmed: true to actually dial.",
|
|
58
|
-
validate: async (runtime, message) => {
|
|
59
|
-
if (!readTwilioCredentialsFromEnv())
|
|
60
|
-
return false;
|
|
61
|
-
return hasAdminAccess(runtime, message);
|
|
62
|
-
},
|
|
63
|
-
parameters: [
|
|
64
|
-
{
|
|
65
|
-
name: "to",
|
|
66
|
-
description: "Destination phone number in E.164 format (e.g. +15551234567).",
|
|
67
|
-
required: true,
|
|
68
|
-
schema: { type: "string" },
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: "message",
|
|
72
|
-
description: "Plaintext message to speak via TwiML. Will be XML-escaped before dispatch.",
|
|
73
|
-
required: true,
|
|
74
|
-
schema: { type: "string" },
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: "confirmed",
|
|
78
|
-
description: "Set to true when the owner has explicitly confirmed the call should be placed.",
|
|
79
|
-
required: false,
|
|
80
|
-
schema: { type: "boolean" },
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
examples: [
|
|
84
|
-
[
|
|
85
|
-
{
|
|
86
|
-
name: "{{name1}}",
|
|
87
|
-
content: { text: "Call me at +15551234567 and say the build is done" },
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
name: "{{agentName}}",
|
|
91
|
-
content: {
|
|
92
|
-
text: 'Draft voice call to +15551234567:\n\n"The build is done."\n\nSay "confirm" to place the call.',
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
[
|
|
97
|
-
{
|
|
98
|
-
name: "{{name1}}",
|
|
99
|
-
content: { text: "confirm" },
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: "{{agentName}}",
|
|
103
|
-
content: { text: "Placing voice call to +15551234567." },
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
[
|
|
107
|
-
{
|
|
108
|
-
name: "{{name1}}",
|
|
109
|
-
content: {
|
|
110
|
-
text: "Urgent: call +15550000000 and say the server is on fire",
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
name: "{{agentName}}",
|
|
115
|
-
content: {
|
|
116
|
-
text: 'Draft voice call to +15550000000:\n\n"The server is on fire."\n\nSay "confirm" to place the call.',
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
|
-
],
|
|
121
|
-
handler: async (runtime, message, state, options) => {
|
|
122
|
-
if (!(await hasAdminAccess(runtime, message))) {
|
|
123
|
-
return {
|
|
124
|
-
text: "Permission denied: only the owner or admin may place voice calls.",
|
|
125
|
-
success: false,
|
|
126
|
-
values: { success: false, error: "PERMISSION_DENIED" },
|
|
127
|
-
data: { actionName: ACTION_NAME },
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
const credentials = readTwilioCredentialsFromEnv();
|
|
131
|
-
if (!credentials) {
|
|
132
|
-
return {
|
|
133
|
-
text: "Twilio is not configured. Set TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, and TWILIO_PHONE_NUMBER.",
|
|
134
|
-
success: false,
|
|
135
|
-
values: { success: false, error: "TWILIO_NOT_CONFIGURED" },
|
|
136
|
-
data: { actionName: ACTION_NAME },
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
const rawParams = (options?.parameters ??
|
|
140
|
-
{});
|
|
141
|
-
const params = (await extractActionParamsViaLlm({
|
|
142
|
-
runtime,
|
|
143
|
-
message,
|
|
144
|
-
state,
|
|
145
|
-
actionName: ACTION_NAME,
|
|
146
|
-
actionDescription: twilioCallAction.description ?? "",
|
|
147
|
-
paramSchema: twilioCallAction.parameters ?? [],
|
|
148
|
-
existingParams: rawParams,
|
|
149
|
-
requiredFields: ["to", "message"],
|
|
150
|
-
}));
|
|
151
|
-
const to = coerceString(params.to);
|
|
152
|
-
const messageBody = coerceString(params.message);
|
|
153
|
-
const confirmed = coerceBool(params.confirmed);
|
|
154
|
-
if (!to) {
|
|
155
|
-
return {
|
|
156
|
-
text: "Missing required parameter: to (E.164 phone number).",
|
|
157
|
-
success: false,
|
|
158
|
-
values: { success: false, error: "MISSING_TO" },
|
|
159
|
-
data: { actionName: ACTION_NAME },
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
if (isPlaceholderOrNonNumeric(to)) {
|
|
163
|
-
return invalidPhoneResult(to, undefined, ACTION_NAME, "PLACEHOLDER_PHONE_NUMBER");
|
|
164
|
-
}
|
|
165
|
-
if (!isE164(to)) {
|
|
166
|
-
return invalidPhoneResult(to, undefined, ACTION_NAME, "INVALID_PHONE_NUMBER");
|
|
167
|
-
}
|
|
168
|
-
if (!messageBody) {
|
|
169
|
-
return {
|
|
170
|
-
text: "Missing required parameter: message.",
|
|
171
|
-
success: false,
|
|
172
|
-
values: { success: false, error: "MISSING_MESSAGE" },
|
|
173
|
-
data: { actionName: ACTION_NAME },
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
if (!confirmed) {
|
|
177
|
-
return {
|
|
178
|
-
text: `Draft voice call to ${to}:\n\n"${messageBody}"\n\nSay "confirm" or re-issue with confirmed: true to place the call.`,
|
|
179
|
-
// The call was NOT placed — this is just a draft awaiting confirmation.
|
|
180
|
-
success: false,
|
|
181
|
-
values: {
|
|
182
|
-
success: false,
|
|
183
|
-
error: "DRAFT_REQUIRES_CONFIRMATION",
|
|
184
|
-
draft: true,
|
|
185
|
-
to,
|
|
186
|
-
message: messageBody,
|
|
187
|
-
},
|
|
188
|
-
data: {
|
|
189
|
-
actionName: ACTION_NAME,
|
|
190
|
-
draft: true,
|
|
191
|
-
to,
|
|
192
|
-
message: messageBody,
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
const result = await sendTwilioVoiceCall({
|
|
197
|
-
credentials,
|
|
198
|
-
to,
|
|
199
|
-
message: messageBody,
|
|
200
|
-
});
|
|
201
|
-
if (!result.ok) {
|
|
202
|
-
return {
|
|
203
|
-
text: `Voice call to ${to} failed: ${result.error ?? "unknown error"}.`,
|
|
204
|
-
success: false,
|
|
205
|
-
values: {
|
|
206
|
-
success: false,
|
|
207
|
-
error: result.error ?? "CALL_FAILED",
|
|
208
|
-
status: result.status,
|
|
209
|
-
},
|
|
210
|
-
data: {
|
|
211
|
-
actionName: ACTION_NAME,
|
|
212
|
-
to,
|
|
213
|
-
message: messageBody,
|
|
214
|
-
status: result.status,
|
|
215
|
-
retryCount: result.retryCount,
|
|
216
|
-
},
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
return {
|
|
220
|
-
text: `Placed voice call to ${to}.`,
|
|
221
|
-
success: true,
|
|
222
|
-
values: {
|
|
223
|
-
success: true,
|
|
224
|
-
to,
|
|
225
|
-
sid: result.sid ?? null,
|
|
226
|
-
},
|
|
227
|
-
data: {
|
|
228
|
-
actionName: ACTION_NAME,
|
|
229
|
-
to,
|
|
230
|
-
message: messageBody,
|
|
231
|
-
sid: result.sid ?? null,
|
|
232
|
-
status: result.status,
|
|
233
|
-
retryCount: result.retryCount,
|
|
234
|
-
},
|
|
235
|
-
};
|
|
236
|
-
},
|
|
237
|
-
};
|
|
238
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
239
|
-
// T9e — CALL_USER / CALL_EXTERNAL with confirmation + allow-list gates.
|
|
240
|
-
//
|
|
241
|
-
// These are distinct from the generic TWILIO_VOICE_CALL action above:
|
|
242
|
-
// - CALL_USER always dials the configured owner number (safety-fenced).
|
|
243
|
-
// - CALL_EXTERNAL dials a third party only if it appears in the allow-list.
|
|
244
|
-
// Both require `confirmed: true` in parameters to actually dial.
|
|
245
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
246
|
-
const OWNER_NUMBER_ENV_KEYS = [
|
|
247
|
-
"MILADY_E2E_TWILIO_RECIPIENT",
|
|
248
|
-
"TWILIO_OWNER_NUMBER",
|
|
249
|
-
];
|
|
250
|
-
const EXTERNAL_ALLOWLIST_ENV_KEY = "TWILIO_CALL_EXTERNAL_ALLOWLIST";
|
|
251
|
-
function normalizeLookup(value) {
|
|
252
|
-
return value
|
|
253
|
-
.toLowerCase()
|
|
254
|
-
.replace(/[^a-z0-9]+/g, " ")
|
|
255
|
-
.trim();
|
|
256
|
-
}
|
|
257
|
-
function messageText(message) {
|
|
258
|
-
return typeof message.content?.text === "string" ? message.content.text : "";
|
|
259
|
-
}
|
|
260
|
-
function isStandingOwnerCallPolicy(message) {
|
|
261
|
-
const text = normalizeLookup(messageText(message));
|
|
262
|
-
if (!text) {
|
|
263
|
-
return false;
|
|
264
|
-
}
|
|
265
|
-
const isConditional = /\b(if|when|whenever)\b/.test(text) ||
|
|
266
|
-
/\bget stuck\b/.test(text) ||
|
|
267
|
-
/\bblocked\b/.test(text);
|
|
268
|
-
const mentionsCall = /\b(call|phone|dial)\b/.test(text);
|
|
269
|
-
const mentionsBlockedWork = /\b(stuck|blocked|jam|jams|unblock)\b/.test(text) &&
|
|
270
|
-
/\b(browser|computer|desktop|remote|workflow|machine)\b/.test(text);
|
|
271
|
-
return isConditional && mentionsCall && mentionsBlockedWork;
|
|
272
|
-
}
|
|
273
|
-
function getPendingCallCacheKey(roomId, actionName) {
|
|
274
|
-
return `lifeops:twilio-call:pending:${actionName}:${roomId}`;
|
|
275
|
-
}
|
|
276
|
-
async function readPendingCallDraft(runtime, roomId, actionName) {
|
|
277
|
-
if (typeof runtime.getCache !== "function") {
|
|
278
|
-
return null;
|
|
279
|
-
}
|
|
280
|
-
return ((await runtime.getCache(getPendingCallCacheKey(roomId, actionName))) ?? null);
|
|
281
|
-
}
|
|
282
|
-
async function writePendingCallDraft(runtime, roomId, draft) {
|
|
283
|
-
if (typeof runtime.setCache !== "function") {
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
await runtime.setCache(getPendingCallCacheKey(roomId, draft.actionName), draft);
|
|
287
|
-
}
|
|
288
|
-
async function clearPendingCallDraft(runtime, roomId, actionName) {
|
|
289
|
-
if (typeof runtime.deleteCache !== "function") {
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
await runtime.deleteCache(getPendingCallCacheKey(roomId, actionName));
|
|
293
|
-
}
|
|
294
|
-
async function enqueueCallApprovalRequest(args) {
|
|
295
|
-
if (typeof args.runtime.createTask !== "function") {
|
|
296
|
-
return null;
|
|
297
|
-
}
|
|
298
|
-
return await args.runtime.createTask({
|
|
299
|
-
name: `${args.actionName}_${Date.now()}`,
|
|
300
|
-
description: args.actionName === "CALL_USER"
|
|
301
|
-
? `Approve calling the owner${args.body ? ` with message: ${args.body}` : ""}.`
|
|
302
|
-
: `Approve calling ${args.to ?? "the selected recipient"}${args.body ? ` with message: ${args.body}` : ""}.`,
|
|
303
|
-
roomId: args.message.roomId,
|
|
304
|
-
entityId: args.message.entityId,
|
|
305
|
-
tags: ["AWAITING_CHOICE", "APPROVAL", args.actionName],
|
|
306
|
-
metadata: {
|
|
307
|
-
options: [
|
|
308
|
-
{ name: "confirm", description: "Place the call" },
|
|
309
|
-
{ name: "cancel", description: "Do not call" },
|
|
310
|
-
],
|
|
311
|
-
approvalRequest: {
|
|
312
|
-
timeoutMs: 24 * 60 * 60 * 1000,
|
|
313
|
-
timeoutDefault: "cancel",
|
|
314
|
-
createdAt: Date.now(),
|
|
315
|
-
isAsync: true,
|
|
316
|
-
},
|
|
317
|
-
actionName: args.actionName,
|
|
318
|
-
channel: "phone_call",
|
|
319
|
-
payload: {
|
|
320
|
-
to: args.to ?? null,
|
|
321
|
-
message: args.body,
|
|
322
|
-
},
|
|
323
|
-
},
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
function buildCallUserPolicyAcknowledgement(userText) {
|
|
327
|
-
const normalized = userText.trim().toLowerCase();
|
|
328
|
-
if (!normalized) {
|
|
329
|
-
return null;
|
|
330
|
-
}
|
|
331
|
-
const isStandingEscalationPolicy = /\bif\b/u.test(normalized) &&
|
|
332
|
-
/\b(?:stuck|blocked|jammed|jams|unblock|can't continue|cannot continue)\b/u.test(normalized) &&
|
|
333
|
-
/\b(?:browser|computer|desktop|screen|remote workflow|on my machine)\b/u.test(normalized) &&
|
|
334
|
-
/\b(?:call me|phone me|ring me|dial me)\b/u.test(normalized);
|
|
335
|
-
if (!isStandingEscalationPolicy) {
|
|
336
|
-
return null;
|
|
337
|
-
}
|
|
338
|
-
return {
|
|
339
|
-
text: "If I get stuck in the browser or on your computer, I'll escalate by phone so you can jump in and unblock it. I will still require confirmation before placing an actual call.",
|
|
340
|
-
success: true,
|
|
341
|
-
values: {
|
|
342
|
-
success: true,
|
|
343
|
-
policyRecorded: true,
|
|
344
|
-
},
|
|
345
|
-
data: {
|
|
346
|
-
actionName: "CALL_USER",
|
|
347
|
-
policyRecorded: true,
|
|
348
|
-
policyType: "stuck_computer_phone_escalation",
|
|
349
|
-
channel: "phone_call",
|
|
350
|
-
},
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
function isE164PhoneNumber(value) {
|
|
354
|
-
return /^\+[1-9]\d{7,14}$/.test(value.trim());
|
|
355
|
-
}
|
|
356
|
-
async function resolveExternalCallRecipient(args) {
|
|
357
|
-
const explicit = args.providedTo?.trim();
|
|
358
|
-
if (explicit) {
|
|
359
|
-
if (isE164PhoneNumber(explicit)) {
|
|
360
|
-
return { to: explicit, matchedRelationshipId: null };
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
const service = new LifeOpsService(args.runtime);
|
|
364
|
-
const relationships = await service.listRelationships({ limit: 200 });
|
|
365
|
-
const haystack = normalizeLookup([explicit ?? "", args.messageText ?? ""].join(" "));
|
|
366
|
-
if (!haystack) {
|
|
367
|
-
return { to: null, matchedRelationshipId: null };
|
|
368
|
-
}
|
|
369
|
-
const candidates = relationships.filter((relationship) => typeof relationship.phone === "string" && relationship.phone);
|
|
370
|
-
for (const relationship of candidates) {
|
|
371
|
-
const lookupValues = [
|
|
372
|
-
relationship.name,
|
|
373
|
-
relationship.primaryHandle,
|
|
374
|
-
relationship.email ?? "",
|
|
375
|
-
relationship.notes ?? "",
|
|
376
|
-
...relationship.tags,
|
|
377
|
-
]
|
|
378
|
-
.map(normalizeLookup)
|
|
379
|
-
.filter((value) => value.length > 0);
|
|
380
|
-
const matched = lookupValues.some((value) => haystack.includes(value) || value.includes(haystack));
|
|
381
|
-
if (matched && relationship.phone) {
|
|
382
|
-
return {
|
|
383
|
-
to: relationship.phone,
|
|
384
|
-
matchedRelationshipId: relationship.id,
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
return { to: explicit ?? null, matchedRelationshipId: null };
|
|
389
|
-
}
|
|
390
|
-
function readOwnerNumber(runtime) {
|
|
391
|
-
for (const key of OWNER_NUMBER_ENV_KEYS) {
|
|
392
|
-
const envVal = process.env[key]?.trim();
|
|
393
|
-
if (envVal)
|
|
394
|
-
return envVal;
|
|
395
|
-
const setting = runtime?.getSetting?.(key);
|
|
396
|
-
if (typeof setting === "string" && setting.trim().length > 0) {
|
|
397
|
-
return setting.trim();
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
return null;
|
|
401
|
-
}
|
|
402
|
-
function readExternalAllowList(runtime) {
|
|
403
|
-
const raw = process.env[EXTERNAL_ALLOWLIST_ENV_KEY] ??
|
|
404
|
-
(() => {
|
|
405
|
-
const s = runtime?.getSetting?.(EXTERNAL_ALLOWLIST_ENV_KEY);
|
|
406
|
-
return typeof s === "string" ? s : undefined;
|
|
407
|
-
})();
|
|
408
|
-
const list = new Set();
|
|
409
|
-
if (raw) {
|
|
410
|
-
for (const part of raw.split(/[\s,;]+/)) {
|
|
411
|
-
const trimmed = part.trim();
|
|
412
|
-
if (trimmed)
|
|
413
|
-
list.add(trimmed);
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
const owner = readOwnerNumber(runtime);
|
|
417
|
-
if (owner)
|
|
418
|
-
list.add(owner);
|
|
419
|
-
return Array.from(list);
|
|
420
|
-
}
|
|
421
|
-
function normalizePhoneAllowListKey(value) {
|
|
422
|
-
return value.replace(/[^0-9+]/g, "").replace(/^\+/, "");
|
|
423
|
-
}
|
|
424
|
-
function deliveryToResult(delivery, to, actionName) {
|
|
425
|
-
return {
|
|
426
|
-
text: delivery.ok ? `Placed call to ${to}.` : `Call to ${to} failed.`,
|
|
427
|
-
success: delivery.ok,
|
|
428
|
-
values: {
|
|
429
|
-
success: delivery.ok,
|
|
430
|
-
to,
|
|
431
|
-
sid: delivery.sid ?? null,
|
|
432
|
-
},
|
|
433
|
-
data: {
|
|
434
|
-
actionName,
|
|
435
|
-
to,
|
|
436
|
-
sid: delivery.sid ?? null,
|
|
437
|
-
status: delivery.status,
|
|
438
|
-
error: delivery.error,
|
|
439
|
-
retryCount: delivery.retryCount ?? 0,
|
|
440
|
-
},
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
export const callUserAction = {
|
|
444
|
-
name: "CALL_USER",
|
|
445
|
-
similes: [
|
|
446
|
-
"PHONE_USER",
|
|
447
|
-
"CALL_OWNER",
|
|
448
|
-
"DIAL_OWNER",
|
|
449
|
-
"ESCALATE_TO_OWNER",
|
|
450
|
-
"CALL_IF_STUCK",
|
|
451
|
-
],
|
|
452
|
-
tags: [
|
|
453
|
-
"always-include",
|
|
454
|
-
"call me",
|
|
455
|
-
"phone me",
|
|
456
|
-
"stuck in browser",
|
|
457
|
-
"unblock computer",
|
|
458
|
-
"standing escalation policy",
|
|
459
|
-
"call if stuck",
|
|
460
|
-
],
|
|
461
|
-
description: "Place an outbound phone call to the agent owner via Twilio. Use this when the assistant is blocked and needs real-time help from the owner, or when the owner explicitly asks to be called. Standing policies like 'if you get stuck in the browser or on my computer, call me' belong here on the first turn; this action can record the escalation path and return a confirmation/intervention request instead of dialing immediately when confirmation is still required.",
|
|
462
|
-
suppressPostActionContinuation: true,
|
|
463
|
-
validate: async (runtime, message) => {
|
|
464
|
-
return hasOwnerAccess(runtime, message);
|
|
465
|
-
},
|
|
466
|
-
handler: async (runtime, message, _state, options) => {
|
|
467
|
-
if (!(await hasOwnerAccess(runtime, message))) {
|
|
468
|
-
return {
|
|
469
|
-
text: "",
|
|
470
|
-
success: false,
|
|
471
|
-
values: { success: false, error: "PERMISSION_DENIED" },
|
|
472
|
-
data: { actionName: "CALL_USER", error: "PERMISSION_DENIED" },
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
|
-
const params = options?.parameters ?? {};
|
|
476
|
-
const policyAcknowledgement = buildCallUserPolicyAcknowledgement(typeof message.content?.text === "string" ? message.content.text : "");
|
|
477
|
-
if (policyAcknowledgement) {
|
|
478
|
-
return policyAcknowledgement;
|
|
479
|
-
}
|
|
480
|
-
const pendingDraft = await readPendingCallDraft(runtime, message.roomId, "CALL_USER");
|
|
481
|
-
if (params.confirmed !== true && isStandingOwnerCallPolicy(message)) {
|
|
482
|
-
return {
|
|
483
|
-
text: "Recorded. If I get stuck in the browser or on your computer, I'll escalate by phone so you can jump in to unblock it.",
|
|
484
|
-
success: true,
|
|
485
|
-
values: {
|
|
486
|
-
success: true,
|
|
487
|
-
policyRecorded: true,
|
|
488
|
-
channel: "phone_call",
|
|
489
|
-
},
|
|
490
|
-
data: {
|
|
491
|
-
actionName: "CALL_USER",
|
|
492
|
-
policyRecorded: true,
|
|
493
|
-
channel: "phone_call",
|
|
494
|
-
},
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
if (params.confirmed !== true) {
|
|
498
|
-
logger.info({ action: "CALL_USER" }, "[CALL_USER] confirmation required");
|
|
499
|
-
const spokenMessage = params.message?.trim() ||
|
|
500
|
-
pendingDraft?.message?.trim() ||
|
|
501
|
-
"Your agent is calling you.";
|
|
502
|
-
const approvalTaskId = await enqueueCallApprovalRequest({
|
|
503
|
-
runtime,
|
|
504
|
-
message,
|
|
505
|
-
actionName: "CALL_USER",
|
|
506
|
-
body: spokenMessage,
|
|
507
|
-
});
|
|
508
|
-
await writePendingCallDraft(runtime, message.roomId, {
|
|
509
|
-
actionName: "CALL_USER",
|
|
510
|
-
to: readOwnerNumber(runtime),
|
|
511
|
-
message: spokenMessage,
|
|
512
|
-
approvalTaskId,
|
|
513
|
-
createdAt: new Date().toISOString(),
|
|
514
|
-
});
|
|
515
|
-
return {
|
|
516
|
-
text: "Please confirm before I place the call.",
|
|
517
|
-
success: false,
|
|
518
|
-
values: { success: false, requiresConfirmation: true },
|
|
519
|
-
data: {
|
|
520
|
-
actionName: "CALL_USER",
|
|
521
|
-
requiresConfirmation: true,
|
|
522
|
-
approvalTaskId,
|
|
523
|
-
},
|
|
524
|
-
};
|
|
525
|
-
}
|
|
526
|
-
const to = readOwnerNumber(runtime);
|
|
527
|
-
if (!to) {
|
|
528
|
-
logger.warn({ action: "CALL_USER" }, "[CALL_USER] owner phone number not configured");
|
|
529
|
-
return {
|
|
530
|
-
text: "",
|
|
531
|
-
success: false,
|
|
532
|
-
values: { success: false, error: "OWNER_NUMBER_NOT_CONFIGURED" },
|
|
533
|
-
data: {
|
|
534
|
-
actionName: "CALL_USER",
|
|
535
|
-
error: "OWNER_NUMBER_NOT_CONFIGURED",
|
|
536
|
-
},
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
if (!isE164(to) || isPlaceholderOrNonNumeric(to)) {
|
|
540
|
-
return invalidPhoneResult(to, "the owner", "CALL_USER", isPlaceholderOrNonNumeric(to)
|
|
541
|
-
? "PLACEHOLDER_PHONE_NUMBER"
|
|
542
|
-
: "INVALID_PHONE_NUMBER");
|
|
543
|
-
}
|
|
544
|
-
const credentials = readTwilioCredentialsFromEnv();
|
|
545
|
-
if (!credentials) {
|
|
546
|
-
return {
|
|
547
|
-
text: "",
|
|
548
|
-
success: false,
|
|
549
|
-
values: { success: false, error: "TWILIO_NOT_CONFIGURED" },
|
|
550
|
-
data: { actionName: "CALL_USER", error: "TWILIO_NOT_CONFIGURED" },
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
|
-
const spokenMessage = params.message?.trim() ||
|
|
554
|
-
pendingDraft?.message?.trim() ||
|
|
555
|
-
"Your agent is calling you.";
|
|
556
|
-
const delivery = await sendTwilioVoiceCall({
|
|
557
|
-
credentials,
|
|
558
|
-
to,
|
|
559
|
-
message: spokenMessage,
|
|
560
|
-
});
|
|
561
|
-
const result = deliveryToResult(delivery, to, "CALL_USER");
|
|
562
|
-
if (result.success) {
|
|
563
|
-
await clearPendingCallDraft(runtime, message.roomId, "CALL_USER");
|
|
564
|
-
if (pendingDraft?.approvalTaskId &&
|
|
565
|
-
typeof runtime.deleteTask === "function") {
|
|
566
|
-
await runtime.deleteTask(pendingDraft.approvalTaskId);
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
return result;
|
|
570
|
-
},
|
|
571
|
-
parameters: [
|
|
572
|
-
{
|
|
573
|
-
name: "confirmed",
|
|
574
|
-
description: "Must be true to actually place the call. Without it the action returns a confirmation request.",
|
|
575
|
-
schema: { type: "boolean" },
|
|
576
|
-
},
|
|
577
|
-
{
|
|
578
|
-
name: "message",
|
|
579
|
-
description: "Spoken message played when the owner answers.",
|
|
580
|
-
schema: { type: "string" },
|
|
581
|
-
},
|
|
582
|
-
],
|
|
583
|
-
examples: [
|
|
584
|
-
[
|
|
585
|
-
{
|
|
586
|
-
name: "{{name1}}",
|
|
587
|
-
content: {
|
|
588
|
-
text: "If you get stuck in the browser or on my computer, call me and let me jump in to unblock it.",
|
|
589
|
-
},
|
|
590
|
-
},
|
|
591
|
-
{
|
|
592
|
-
name: "{{agentName}}",
|
|
593
|
-
content: {
|
|
594
|
-
text: "Understood. If I get stuck in the browser or on your computer, I'll draft a call to you so you can jump in and unblock it.",
|
|
595
|
-
},
|
|
596
|
-
},
|
|
597
|
-
],
|
|
598
|
-
[
|
|
599
|
-
{
|
|
600
|
-
name: "{{name1}}",
|
|
601
|
-
content: { text: "Call me if the remote workflow jams again." },
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
name: "{{agentName}}",
|
|
605
|
-
content: {
|
|
606
|
-
text: "I can call you if that workflow jams again. I'll ask for confirmation before dialing.",
|
|
607
|
-
},
|
|
608
|
-
},
|
|
609
|
-
],
|
|
610
|
-
],
|
|
611
|
-
};
|
|
612
|
-
export const callExternalAction = {
|
|
613
|
-
name: "CALL_EXTERNAL",
|
|
614
|
-
similes: [
|
|
615
|
-
"PHONE_EXTERNAL",
|
|
616
|
-
"DIAL_EXTERNAL",
|
|
617
|
-
"CALL_THIRD_PARTY",
|
|
618
|
-
"BOOK_BY_PHONE",
|
|
619
|
-
"REBOOK_BY_PHONE",
|
|
620
|
-
"CALL_DENTIST",
|
|
621
|
-
"PHONE_CABLE_COMPANY",
|
|
622
|
-
"CALL_SUPPORT",
|
|
623
|
-
"RESCHEDULE_APPOINTMENT_BY_PHONE",
|
|
624
|
-
],
|
|
625
|
-
tags: [
|
|
626
|
-
"always-include",
|
|
627
|
-
"book by phone",
|
|
628
|
-
"rebook by phone",
|
|
629
|
-
"call vendor",
|
|
630
|
-
"call airline",
|
|
631
|
-
"call dentist",
|
|
632
|
-
"call doctor",
|
|
633
|
-
"phone support",
|
|
634
|
-
"call cable company",
|
|
635
|
-
"reschedule appointment",
|
|
636
|
-
],
|
|
637
|
-
description: "Place an outbound phone call to a third party via Twilio. Use this for approved booking, reschedule, outage, support, or escalation calls to vendors or counterparties. Examples: 'call the dentist and reschedule my appointment', 'phone my cable company and ask about the outage', 'call the airline', or 'call the hotel to rebook'. This action can draft the call, ask which saved contact to use, and then require confirmation before dialing. If the user wants a real phone call to a third party, prefer this action over OWNER_CALENDAR, LIFE, or OWNER_SEND_MESSAGE. The recipient must appear in the configured allow-list before the actual call is placed.",
|
|
638
|
-
suppressPostActionContinuation: true,
|
|
639
|
-
validate: async (runtime, message) => {
|
|
640
|
-
return hasOwnerAccess(runtime, message);
|
|
641
|
-
},
|
|
642
|
-
handler: async (runtime, message, state, options) => {
|
|
643
|
-
if (!(await hasOwnerAccess(runtime, message))) {
|
|
644
|
-
return {
|
|
645
|
-
text: "",
|
|
646
|
-
success: false,
|
|
647
|
-
values: { success: false, error: "PERMISSION_DENIED" },
|
|
648
|
-
data: { actionName: "CALL_EXTERNAL", error: "PERMISSION_DENIED" },
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
const rawParams = options?.parameters ?? {};
|
|
652
|
-
const params = (await extractActionParamsViaLlm({
|
|
653
|
-
runtime,
|
|
654
|
-
message,
|
|
655
|
-
state,
|
|
656
|
-
actionName: "CALL_EXTERNAL",
|
|
657
|
-
actionDescription: callExternalAction.description ?? "",
|
|
658
|
-
paramSchema: callExternalAction.parameters ?? [],
|
|
659
|
-
existingParams: rawParams,
|
|
660
|
-
requiredFields: ["to"],
|
|
661
|
-
}));
|
|
662
|
-
const pendingDraft = await readPendingCallDraft(runtime, message.roomId, "CALL_EXTERNAL");
|
|
663
|
-
const resolvedRecipient = await resolveExternalCallRecipient({
|
|
664
|
-
runtime,
|
|
665
|
-
providedTo: params.to ?? pendingDraft?.to ?? undefined,
|
|
666
|
-
messageText: typeof message.content?.text === "string" ? message.content.text : "",
|
|
667
|
-
});
|
|
668
|
-
const to = resolvedRecipient.to?.trim();
|
|
669
|
-
const contact = undefined;
|
|
670
|
-
if (!to) {
|
|
671
|
-
return {
|
|
672
|
-
text: "Who should I call, or which saved contact/phone number should I use?",
|
|
673
|
-
success: false,
|
|
674
|
-
values: { success: false, error: "MISSING_RECIPIENT" },
|
|
675
|
-
data: { actionName: "CALL_EXTERNAL", error: "MISSING_RECIPIENT" },
|
|
676
|
-
};
|
|
677
|
-
}
|
|
678
|
-
if (isPlaceholderOrNonNumeric(to)) {
|
|
679
|
-
return invalidPhoneResult(to, contact, "CALL_EXTERNAL", "PLACEHOLDER_PHONE_NUMBER");
|
|
680
|
-
}
|
|
681
|
-
if (!isE164(to)) {
|
|
682
|
-
return invalidPhoneResult(to, contact, "CALL_EXTERNAL", "INVALID_PHONE_NUMBER");
|
|
683
|
-
}
|
|
684
|
-
if (params.confirmed !== true) {
|
|
685
|
-
logger.info({ action: "CALL_EXTERNAL", to }, "[CALL_EXTERNAL] confirmation required");
|
|
686
|
-
const spokenMessage = params.message?.trim() ||
|
|
687
|
-
pendingDraft?.message?.trim() ||
|
|
688
|
-
"This is a call from an automated assistant.";
|
|
689
|
-
const approvalTaskId = await enqueueCallApprovalRequest({
|
|
690
|
-
runtime,
|
|
691
|
-
message,
|
|
692
|
-
actionName: "CALL_EXTERNAL",
|
|
693
|
-
to,
|
|
694
|
-
body: spokenMessage,
|
|
695
|
-
});
|
|
696
|
-
await writePendingCallDraft(runtime, message.roomId, {
|
|
697
|
-
actionName: "CALL_EXTERNAL",
|
|
698
|
-
to,
|
|
699
|
-
message: spokenMessage,
|
|
700
|
-
approvalTaskId,
|
|
701
|
-
createdAt: new Date().toISOString(),
|
|
702
|
-
});
|
|
703
|
-
return {
|
|
704
|
-
text: `Please confirm before I call ${to}.`,
|
|
705
|
-
success: false,
|
|
706
|
-
values: { success: false, requiresConfirmation: true, to },
|
|
707
|
-
data: {
|
|
708
|
-
actionName: "CALL_EXTERNAL",
|
|
709
|
-
requiresConfirmation: true,
|
|
710
|
-
to,
|
|
711
|
-
matchedRelationshipId: resolvedRecipient.matchedRelationshipId ?? null,
|
|
712
|
-
approvalTaskId,
|
|
713
|
-
},
|
|
714
|
-
};
|
|
715
|
-
}
|
|
716
|
-
const allowList = readExternalAllowList(runtime);
|
|
717
|
-
const normalizedTo = normalizePhoneAllowListKey(to);
|
|
718
|
-
const isAllowed = allowList.some((candidate) => normalizePhoneAllowListKey(candidate) === normalizedTo);
|
|
719
|
-
if (!isAllowed) {
|
|
720
|
-
logger.warn({ action: "CALL_EXTERNAL", to }, "[CALL_EXTERNAL] recipient not in allow-list");
|
|
721
|
-
return {
|
|
722
|
-
text: "",
|
|
723
|
-
success: false,
|
|
724
|
-
values: { success: false, reason: "disallowed-recipient", to },
|
|
725
|
-
data: {
|
|
726
|
-
actionName: "CALL_EXTERNAL",
|
|
727
|
-
reason: "disallowed-recipient",
|
|
728
|
-
to,
|
|
729
|
-
matchedRelationshipId: resolvedRecipient.matchedRelationshipId ?? null,
|
|
730
|
-
},
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
|
-
const credentials = readTwilioCredentialsFromEnv();
|
|
734
|
-
if (!credentials) {
|
|
735
|
-
return {
|
|
736
|
-
text: "",
|
|
737
|
-
success: false,
|
|
738
|
-
values: { success: false, error: "TWILIO_NOT_CONFIGURED" },
|
|
739
|
-
data: { actionName: "CALL_EXTERNAL", error: "TWILIO_NOT_CONFIGURED" },
|
|
740
|
-
};
|
|
741
|
-
}
|
|
742
|
-
const spokenMessage = params.message?.trim() ||
|
|
743
|
-
pendingDraft?.message?.trim() ||
|
|
744
|
-
"This is a call from an automated assistant.";
|
|
745
|
-
const delivery = await sendTwilioVoiceCall({
|
|
746
|
-
credentials,
|
|
747
|
-
to,
|
|
748
|
-
message: spokenMessage,
|
|
749
|
-
});
|
|
750
|
-
const result = deliveryToResult(delivery, to, "CALL_EXTERNAL");
|
|
751
|
-
if (result.success) {
|
|
752
|
-
await clearPendingCallDraft(runtime, message.roomId, "CALL_EXTERNAL");
|
|
753
|
-
if (pendingDraft?.approvalTaskId) {
|
|
754
|
-
await runtime.deleteTask(pendingDraft.approvalTaskId);
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
return result;
|
|
758
|
-
},
|
|
759
|
-
parameters: [
|
|
760
|
-
{
|
|
761
|
-
name: "confirmed",
|
|
762
|
-
description: "Must be true to actually place the call.",
|
|
763
|
-
schema: { type: "boolean" },
|
|
764
|
-
},
|
|
765
|
-
{
|
|
766
|
-
name: "to",
|
|
767
|
-
description: "E.164 phone number to call. Must appear in the external allow-list.",
|
|
768
|
-
schema: { type: "string" },
|
|
769
|
-
},
|
|
770
|
-
{
|
|
771
|
-
name: "message",
|
|
772
|
-
description: "Spoken message played when the recipient answers.",
|
|
773
|
-
schema: { type: "string" },
|
|
774
|
-
},
|
|
775
|
-
],
|
|
776
|
-
examples: [
|
|
777
|
-
[
|
|
778
|
-
{
|
|
779
|
-
name: "{{name1}}",
|
|
780
|
-
content: {
|
|
781
|
-
text: "If needed, call the airline and help rebook the other thing.",
|
|
782
|
-
},
|
|
783
|
-
},
|
|
784
|
-
{
|
|
785
|
-
name: "{{agentName}}",
|
|
786
|
-
content: {
|
|
787
|
-
text: "I can draft that external call. Tell me which saved contact or number to use, and I'll ask for confirmation before dialing.",
|
|
788
|
-
},
|
|
789
|
-
},
|
|
790
|
-
],
|
|
791
|
-
[
|
|
792
|
-
{
|
|
793
|
-
name: "{{name1}}",
|
|
794
|
-
content: {
|
|
795
|
-
text: "I can go ahead and start booking the flights and hotel today if that's good with you.",
|
|
796
|
-
},
|
|
797
|
-
},
|
|
798
|
-
{
|
|
799
|
-
name: "{{agentName}}",
|
|
800
|
-
content: {
|
|
801
|
-
text: "I can draft the booking calls and hold them behind your approval so nothing gets booked until you say yes.",
|
|
802
|
-
},
|
|
803
|
-
},
|
|
804
|
-
],
|
|
805
|
-
[
|
|
806
|
-
{
|
|
807
|
-
name: "{{name1}}",
|
|
808
|
-
content: {
|
|
809
|
-
text: "Yes, go ahead and call the hotel and lock it in.",
|
|
810
|
-
},
|
|
811
|
-
},
|
|
812
|
-
{
|
|
813
|
-
name: "{{agentName}}",
|
|
814
|
-
content: {
|
|
815
|
-
text: "I'll prepare the hotel call. I still need the saved contact or phone number before I can place it.",
|
|
816
|
-
},
|
|
817
|
-
},
|
|
818
|
-
],
|
|
819
|
-
[
|
|
820
|
-
{
|
|
821
|
-
name: "{{name1}}",
|
|
822
|
-
content: {
|
|
823
|
-
text: "Call the dentist and reschedule my appointment.",
|
|
824
|
-
},
|
|
825
|
-
},
|
|
826
|
-
{
|
|
827
|
-
name: "{{agentName}}",
|
|
828
|
-
content: {
|
|
829
|
-
text: "I can draft that call and hold it behind your approval. Tell me which saved contact or phone number to use, and I'll ask for confirmation before dialing.",
|
|
830
|
-
},
|
|
831
|
-
},
|
|
832
|
-
],
|
|
833
|
-
[
|
|
834
|
-
{
|
|
835
|
-
name: "{{name1}}",
|
|
836
|
-
content: {
|
|
837
|
-
text: "Phone my cable company and ask about the outage.",
|
|
838
|
-
},
|
|
839
|
-
},
|
|
840
|
-
{
|
|
841
|
-
name: "{{agentName}}",
|
|
842
|
-
content: {
|
|
843
|
-
text: "I can draft the support call. Tell me which saved contact or phone number to use, and I'll ask for confirmation before dialing.",
|
|
844
|
-
},
|
|
845
|
-
},
|
|
846
|
-
],
|
|
847
|
-
],
|
|
848
|
-
};
|
|
849
|
-
// Exposed for tests.
|
|
850
|
-
export const __internal = {
|
|
851
|
-
readOwnerNumber,
|
|
852
|
-
readExternalAllowList,
|
|
853
|
-
};
|