@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,1078 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LifeOps scheduling-with-others actions.
|
|
3
|
-
*
|
|
4
|
-
* Adds three actions on top of the existing CALENDAR_ACTION CRUD path:
|
|
5
|
-
*
|
|
6
|
-
* - PROPOSE_MEETING_TIMES: reads the owner's busy calendar + meeting
|
|
7
|
-
* preferences (preferred hours, blackout windows, travel buffer) and
|
|
8
|
-
* returns candidate slots that can be offered to another party.
|
|
9
|
-
* - CHECK_AVAILABILITY: given an ISO start/end window, reports whether
|
|
10
|
-
* the owner is free or busy and lists overlapping events.
|
|
11
|
-
* - UPDATE_MEETING_PREFERENCES: persist the owner's preferred meeting
|
|
12
|
-
* hours, blackout windows, and travel buffer to the LifeOps profile
|
|
13
|
-
* (stored alongside the existing owner profile in scheduler task
|
|
14
|
-
* metadata — no new table).
|
|
15
|
-
*/
|
|
16
|
-
import { ModelType, parseJSONObjectFromText, parseKeyValueXml, } from "@elizaos/core";
|
|
17
|
-
import { hasAdminAccess } from "@elizaos/agent";
|
|
18
|
-
import { hasLifeOpsAccess, INTERNAL_URL } from "./lifeops-google-helpers.js";
|
|
19
|
-
import { LifeOpsService, LifeOpsServiceError, } from "../lifeops/service.js";
|
|
20
|
-
import { normalizeLifeOpsMeetingPreferencesPatch, readLifeOpsMeetingPreferences, updateLifeOpsMeetingPreferences, } from "../lifeops/owner-profile.js";
|
|
21
|
-
import { getZonedDateParts } from "../lifeops/time.js";
|
|
22
|
-
import { recentConversationTexts as collectRecentConversationTexts } from "./life-recent-context.js";
|
|
23
|
-
import { inferTimeZoneFromLocationText } from "./timezone-normalization.js";
|
|
24
|
-
const MS_PER_MINUTE = 60_000;
|
|
25
|
-
const MAX_DAYS_LOOKAHEAD = 60;
|
|
26
|
-
const DEFAULT_DAYS_LOOKAHEAD = 7;
|
|
27
|
-
const DEFAULT_SLOTS_COUNT = 3;
|
|
28
|
-
const SLOT_STEP_MINUTES = 15;
|
|
29
|
-
function parseTimeOfDayToMinutes(value) {
|
|
30
|
-
const [h, m] = value.split(":");
|
|
31
|
-
return Number(h) * 60 + Number(m);
|
|
32
|
-
}
|
|
33
|
-
function formatLocalForDisplay(iso, timeZone) {
|
|
34
|
-
const date = new Date(iso);
|
|
35
|
-
return new Intl.DateTimeFormat("en-US", {
|
|
36
|
-
weekday: "short",
|
|
37
|
-
month: "short",
|
|
38
|
-
day: "numeric",
|
|
39
|
-
hour: "numeric",
|
|
40
|
-
minute: "2-digit",
|
|
41
|
-
timeZone,
|
|
42
|
-
}).format(date);
|
|
43
|
-
}
|
|
44
|
-
function dayOfWeekInTz(date, timeZone) {
|
|
45
|
-
// Compute the local Y/M/D in the target IANA zone, then derive day-of-week
|
|
46
|
-
// from a UTC anchor. Avoids any reliance on locale-specific weekday strings.
|
|
47
|
-
const parts = getZonedDateParts(date, timeZone);
|
|
48
|
-
return new Date(Date.UTC(parts.year, Math.max(0, parts.month - 1), parts.day, 12, 0, 0)).getUTCDay();
|
|
49
|
-
}
|
|
50
|
-
function buildBusyIntervals(events, travelBufferMinutes) {
|
|
51
|
-
const bufferMs = travelBufferMinutes * MS_PER_MINUTE;
|
|
52
|
-
const intervals = events
|
|
53
|
-
.filter((e) => e.status !== "cancelled")
|
|
54
|
-
.map((e) => ({
|
|
55
|
-
start: Date.parse(e.startAt) - bufferMs,
|
|
56
|
-
end: Date.parse(e.endAt) + bufferMs,
|
|
57
|
-
}))
|
|
58
|
-
.filter((i) => Number.isFinite(i.start) && Number.isFinite(i.end))
|
|
59
|
-
.sort((a, b) => a.start - b.start);
|
|
60
|
-
const merged = [];
|
|
61
|
-
for (const interval of intervals) {
|
|
62
|
-
const last = merged[merged.length - 1];
|
|
63
|
-
if (last && interval.start <= last.end) {
|
|
64
|
-
last.end = Math.max(last.end, interval.end);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
merged.push({ ...interval });
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return merged;
|
|
71
|
-
}
|
|
72
|
-
function overlapsBusy(slotStart, slotEnd, busy) {
|
|
73
|
-
for (const interval of busy) {
|
|
74
|
-
if (slotStart < interval.end && slotEnd > interval.start)
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
function getZonedMinuteOfDay(date, timeZone) {
|
|
80
|
-
const parts = getZonedDateParts(date, timeZone);
|
|
81
|
-
return parts.hour * 60 + parts.minute;
|
|
82
|
-
}
|
|
83
|
-
function overlapsBlackout(slotStart, slotEnd, timeZone, blackouts) {
|
|
84
|
-
if (blackouts.length === 0)
|
|
85
|
-
return false;
|
|
86
|
-
const slotStartMin = getZonedMinuteOfDay(slotStart, timeZone);
|
|
87
|
-
const slotEndMin = getZonedMinuteOfDay(slotEnd, timeZone);
|
|
88
|
-
const dow = dayOfWeekInTz(slotStart, timeZone);
|
|
89
|
-
for (const window of blackouts) {
|
|
90
|
-
if (window.daysOfWeek && window.daysOfWeek.length > 0) {
|
|
91
|
-
if (!window.daysOfWeek.includes(dow))
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
const bStart = parseTimeOfDayToMinutes(window.startLocal);
|
|
95
|
-
const bEnd = parseTimeOfDayToMinutes(window.endLocal);
|
|
96
|
-
if (slotStartMin < bEnd && slotEndMin > bStart)
|
|
97
|
-
return true;
|
|
98
|
-
}
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
function endOfLocalDayMs(date, timeZone) {
|
|
102
|
-
const parts = getZonedDateParts(date, timeZone);
|
|
103
|
-
const remainingMinutes = 24 * 60 - (parts.hour * 60 + parts.minute);
|
|
104
|
-
return date.getTime() + remainingMinutes * MS_PER_MINUTE;
|
|
105
|
-
}
|
|
106
|
-
export function computeProposedSlots(args) {
|
|
107
|
-
const { now, windowStart, windowEnd, durationMinutes, slotCount, preferences, events, } = args;
|
|
108
|
-
const tz = preferences.timeZone;
|
|
109
|
-
const busy = buildBusyIntervals(events, preferences.travelBufferMinutes);
|
|
110
|
-
const preferredStart = parseTimeOfDayToMinutes(preferences.preferredStartLocal);
|
|
111
|
-
const preferredEnd = parseTimeOfDayToMinutes(preferences.preferredEndLocal);
|
|
112
|
-
const results = [];
|
|
113
|
-
const seenDays = new Set();
|
|
114
|
-
const step = SLOT_STEP_MINUTES * MS_PER_MINUTE;
|
|
115
|
-
const cursor = Math.ceil(Math.max(windowStart.getTime(), now.getTime()) / step) * step;
|
|
116
|
-
const endMs = windowEnd.getTime();
|
|
117
|
-
const durationMs = durationMinutes * MS_PER_MINUTE;
|
|
118
|
-
for (let pass = 0; pass < 2 && results.length < slotCount; pass++) {
|
|
119
|
-
const onePerDay = pass === 0;
|
|
120
|
-
let t = cursor;
|
|
121
|
-
while (t + durationMs <= endMs && results.length < slotCount) {
|
|
122
|
-
const slotStart = new Date(t);
|
|
123
|
-
const slotEnd = new Date(t + durationMs);
|
|
124
|
-
const slotStartMin = getZonedMinuteOfDay(slotStart, tz);
|
|
125
|
-
const slotEndMin = getZonedMinuteOfDay(slotEnd, tz);
|
|
126
|
-
const parts = getZonedDateParts(slotStart, tz);
|
|
127
|
-
const endParts = getZonedDateParts(slotEnd, tz);
|
|
128
|
-
const sameLocalDay = parts.year === endParts.year &&
|
|
129
|
-
parts.month === endParts.month &&
|
|
130
|
-
parts.day === endParts.day;
|
|
131
|
-
const withinPreferred = sameLocalDay &&
|
|
132
|
-
slotStartMin >= preferredStart &&
|
|
133
|
-
slotEndMin <= preferredEnd;
|
|
134
|
-
if (withinPreferred &&
|
|
135
|
-
!overlapsBusy(slotStart.getTime(), slotEnd.getTime(), busy) &&
|
|
136
|
-
!overlapsBlackout(slotStart, slotEnd, tz, preferences.blackoutWindows)) {
|
|
137
|
-
const dayKey = `${parts.year}-${parts.month}-${parts.day}`;
|
|
138
|
-
if (!onePerDay || !seenDays.has(dayKey)) {
|
|
139
|
-
seenDays.add(dayKey);
|
|
140
|
-
results.push({
|
|
141
|
-
startAt: slotStart.toISOString(),
|
|
142
|
-
endAt: slotEnd.toISOString(),
|
|
143
|
-
durationMinutes,
|
|
144
|
-
localStart: formatLocalForDisplay(slotStart.toISOString(), tz),
|
|
145
|
-
localEnd: formatLocalForDisplay(slotEnd.toISOString(), tz),
|
|
146
|
-
timeZone: tz,
|
|
147
|
-
});
|
|
148
|
-
if (onePerDay) {
|
|
149
|
-
t = endOfLocalDayMs(slotStart, tz);
|
|
150
|
-
continue;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
t += step;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return results;
|
|
158
|
-
}
|
|
159
|
-
function formatSlotsText(slots) {
|
|
160
|
-
if (slots.length === 0) {
|
|
161
|
-
return "I couldn't find any open slots matching your preferences in that window.";
|
|
162
|
-
}
|
|
163
|
-
const lines = slots.map((slot, idx) => `${idx + 1}. ${slot.localStart} – ${slot.localEnd} (${slot.durationMinutes} min)`);
|
|
164
|
-
return `Here ${slots.length === 1 ? "is an available option" : `are ${slots.length} options`} you can offer:\n${lines.join("\n")}`;
|
|
165
|
-
}
|
|
166
|
-
function cleanBundledCounterparty(value) {
|
|
167
|
-
return value
|
|
168
|
-
.slice(0, 1024)
|
|
169
|
-
.replace(/^(?:with|for|and|also|maybe|please)\s{1,32}/iu, "")
|
|
170
|
-
.replace(/\s{1,32}(?:at|if|while|during|thanks|please)\b.{0,1024}$/iu, "")
|
|
171
|
-
.replace(/[.?!,;:]+$/u, "")
|
|
172
|
-
.trim();
|
|
173
|
-
}
|
|
174
|
-
export function extractBundledMeetingCounterparties(messageText) {
|
|
175
|
-
const trimmed = messageText.trim().slice(0, 10_000);
|
|
176
|
-
if (trimmed.length === 0) {
|
|
177
|
-
return [];
|
|
178
|
-
}
|
|
179
|
-
const patterns = [
|
|
180
|
-
/\bschedule\s{1,32}(.{1,2048}?)(?:\s{1,32}at\s{1,32}the\s{1,32}same\s{1,32}time\b|\s{1,32}same\s{1,32}day\b|\s{1,32}if\s{1,32}possible\b|[.?!]|$)/iu,
|
|
181
|
-
/\bbundle\s{1,32}(.{1,2048}?)(?:\s{1,32}together\b|\s{1,32}on\s{1,32}the\s{1,32}same\s{1,32}day\b|\s{1,32}if\s{1,32}possible\b|[.?!]|$)/iu,
|
|
182
|
-
/\bmeetings?\s{1,32}with\s{1,32}(.{1,2048}?)(?:\s{1,32}on\s{1,32}the\s{1,32}same\s{1,32}day\b|\s{1,32}at\s{1,32}the\s{1,32}same\s{1,32}time\b|\s{1,32}if\s{1,32}possible\b|[.?!]|$)/iu,
|
|
183
|
-
];
|
|
184
|
-
for (const pattern of patterns) {
|
|
185
|
-
const match = pattern.exec(trimmed);
|
|
186
|
-
const raw = match?.[1]?.trim();
|
|
187
|
-
if (!raw) {
|
|
188
|
-
continue;
|
|
189
|
-
}
|
|
190
|
-
const counterparties = raw
|
|
191
|
-
.slice(0, 2048)
|
|
192
|
-
.split(/\s{0,32}(?:,|&|\band\b)\s{0,32}/iu)
|
|
193
|
-
.map(cleanBundledCounterparty)
|
|
194
|
-
.filter((value) => value.length > 0);
|
|
195
|
-
if (counterparties.length >= 2) {
|
|
196
|
-
return counterparties.slice(0, 4);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
return [];
|
|
200
|
-
}
|
|
201
|
-
function formatCounterpartyList(counterparties) {
|
|
202
|
-
if (counterparties.length === 0) {
|
|
203
|
-
return "those meetings";
|
|
204
|
-
}
|
|
205
|
-
if (counterparties.length === 1) {
|
|
206
|
-
return counterparties[0] ?? "that meeting";
|
|
207
|
-
}
|
|
208
|
-
if (counterparties.length === 2) {
|
|
209
|
-
return `${counterparties[0]} and ${counterparties[1]}`;
|
|
210
|
-
}
|
|
211
|
-
return `${counterparties.slice(0, -1).join(", ")}, and ${counterparties[counterparties.length - 1]}`;
|
|
212
|
-
}
|
|
213
|
-
function deriveBundleLocationLabel(messageText) {
|
|
214
|
-
const lowered = messageText.toLowerCase();
|
|
215
|
-
const inMatch = /\b(?:in|while i(?:'| a)?m in|while im in)\s+([a-z][a-z\s._-]{1,40}?)(?:\s+(?:for|with|so|and)\b|[,.!?]|$)/iu.exec(lowered);
|
|
216
|
-
const candidate = inMatch?.[1]?.replace(/[_]+/g, " ").trim();
|
|
217
|
-
if (!candidate) {
|
|
218
|
-
return null;
|
|
219
|
-
}
|
|
220
|
-
return candidate
|
|
221
|
-
.split(/\s+/u)
|
|
222
|
-
.map((part) => (part.length > 0 ? `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}` : part))
|
|
223
|
-
.join(" ");
|
|
224
|
-
}
|
|
225
|
-
export function formatProposedSlotsReply(args) {
|
|
226
|
-
const counterparties = args.context?.counterparties ?? [];
|
|
227
|
-
const locationLabel = args.context?.bundleLocationLabel?.trim();
|
|
228
|
-
const targetLabel = formatCounterpartyList(counterparties);
|
|
229
|
-
const windowLabel = locationLabel ? `${locationLabel}-time` : args.context?.timeZone;
|
|
230
|
-
if (counterparties.length >= 2) {
|
|
231
|
-
if (args.slots.length === 0) {
|
|
232
|
-
return `I couldn't find ${windowLabel} slots that keep ${targetLabel} in the same window. If you want, I can widen the search or split them across nearby times.`;
|
|
233
|
-
}
|
|
234
|
-
const lines = args.slots.map((slot, idx) => `${idx + 1}. ${slot.localStart} – ${slot.localEnd} (${slot.durationMinutes} min)`);
|
|
235
|
-
return `Here ${args.slots.length === 1 ? "is 1" : `are ${args.slots.length}`} ${windowLabel} option${args.slots.length === 1 ? "" : "s"} that keep ${targetLabel} in the same window:\n${lines.join("\n")}`;
|
|
236
|
-
}
|
|
237
|
-
return formatSlotsText(args.slots);
|
|
238
|
-
}
|
|
239
|
-
function parseOptionalIso(value) {
|
|
240
|
-
if (typeof value !== "string")
|
|
241
|
-
return null;
|
|
242
|
-
const parsed = new Date(value);
|
|
243
|
-
return Number.isNaN(parsed.getTime()) ? null : parsed;
|
|
244
|
-
}
|
|
245
|
-
function getParams(options) {
|
|
246
|
-
const params = options?.parameters;
|
|
247
|
-
return params ?? {};
|
|
248
|
-
}
|
|
249
|
-
async function denyIfNoAccess(runtime, message) {
|
|
250
|
-
return !(await hasLifeOpsAccess(runtime, message));
|
|
251
|
-
}
|
|
252
|
-
export const proposeMeetingTimesAction = {
|
|
253
|
-
name: "PROPOSE_MEETING_TIMES",
|
|
254
|
-
similes: [
|
|
255
|
-
"SUGGEST_MEETING_TIMES",
|
|
256
|
-
"OFFER_MEETING_SLOTS",
|
|
257
|
-
"FIND_MEETING_SLOTS",
|
|
258
|
-
"PROPOSE_SLOTS",
|
|
259
|
-
"BUNDLE_MEETINGS_WHILE_TRAVELING",
|
|
260
|
-
"BULK_RESCHEDULE_MEETINGS",
|
|
261
|
-
"RESCHEDULE_MEETINGS",
|
|
262
|
-
],
|
|
263
|
-
tags: [
|
|
264
|
-
"meeting slots",
|
|
265
|
-
"reschedule options",
|
|
266
|
-
],
|
|
267
|
-
description: "Propose concrete meeting time slots to offer to another person. This is " +
|
|
268
|
-
"the dedicated action for any 'propose N times', 'suggest N slots', " +
|
|
269
|
-
"'offer three times', 'find me three slots', 'give me a few times' request " +
|
|
270
|
-
"targeted at another person or team. It reads the owner's calendar busy " +
|
|
271
|
-
"times and meeting preferences (preferred hours, blackout windows, travel " +
|
|
272
|
-
"buffer) and returns three available slots by default over the next seven " +
|
|
273
|
-
"days. Also correct for bundled scheduling while traveling or concrete " +
|
|
274
|
-
"reschedule options. " +
|
|
275
|
-
"STRONG POSITIVE TRIGGERS — route HERE, not to CALENDAR_ACTION or SCHEDULING: " +
|
|
276
|
-
"'propose three times for a sync with <person>', 'suggest a few times for " +
|
|
277
|
-
"<person>', 'offer Marco three 30-minute slots', 'find us three options " +
|
|
278
|
-
"next week', 'give me slots to send <person>'. " +
|
|
279
|
-
"DO NOT use this for small talk, weather, or vague conversation. " +
|
|
280
|
-
"DO NOT use this to check the owner's calendar, create a calendar event, " +
|
|
281
|
-
"or view upcoming events — that is CALENDAR_ACTION. " +
|
|
282
|
-
"DO NOT use this to start a multi-turn scheduling negotiation record — " +
|
|
283
|
-
"that is SCHEDULING (subaction: start). This action just generates the " +
|
|
284
|
-
"candidate slots; SCHEDULING tracks the negotiation lifecycle around them.",
|
|
285
|
-
suppressPostActionContinuation: true,
|
|
286
|
-
validate: async (runtime, message) => hasLifeOpsAccess(runtime, message),
|
|
287
|
-
handler: async (runtime, message, _state, options, callback) => {
|
|
288
|
-
if (await denyIfNoAccess(runtime, message)) {
|
|
289
|
-
const text = "Scheduling actions are restricted to the owner and authorized users.";
|
|
290
|
-
await callback?.({ text });
|
|
291
|
-
return { text, success: false, data: { error: "PERMISSION_DENIED" } };
|
|
292
|
-
}
|
|
293
|
-
const params = getParams(options);
|
|
294
|
-
const preferences = await readLifeOpsMeetingPreferences(runtime);
|
|
295
|
-
const messageText = typeof message.content?.text === "string" ? message.content.text : "";
|
|
296
|
-
const inferredTimeZone = (typeof params.timeZone === "string" && params.timeZone.trim().length > 0
|
|
297
|
-
? params.timeZone.trim()
|
|
298
|
-
: null) ?? inferTimeZoneFromLocationText(messageText);
|
|
299
|
-
const effectivePreferences = inferredTimeZone
|
|
300
|
-
? { ...preferences, timeZone: inferredTimeZone }
|
|
301
|
-
: preferences;
|
|
302
|
-
const counterparties = Array.isArray(params.counterparties) && params.counterparties.length > 0
|
|
303
|
-
? params.counterparties
|
|
304
|
-
: extractBundledMeetingCounterparties(messageText);
|
|
305
|
-
const bundleLocationLabel = deriveBundleLocationLabel(messageText);
|
|
306
|
-
const durationMinutes = typeof params.durationMinutes === "number" &&
|
|
307
|
-
params.durationMinutes >= 5 &&
|
|
308
|
-
params.durationMinutes <= 480
|
|
309
|
-
? Math.floor(params.durationMinutes)
|
|
310
|
-
: effectivePreferences.defaultDurationMinutes;
|
|
311
|
-
const slotCount = typeof params.slotCount === "number" &&
|
|
312
|
-
params.slotCount >= 1 &&
|
|
313
|
-
params.slotCount <= 10
|
|
314
|
-
? Math.floor(params.slotCount)
|
|
315
|
-
: DEFAULT_SLOTS_COUNT;
|
|
316
|
-
const daysAhead = typeof params.daysAhead === "number" &&
|
|
317
|
-
params.daysAhead >= 1 &&
|
|
318
|
-
params.daysAhead <= MAX_DAYS_LOOKAHEAD
|
|
319
|
-
? Math.floor(params.daysAhead)
|
|
320
|
-
: DEFAULT_DAYS_LOOKAHEAD;
|
|
321
|
-
const now = new Date();
|
|
322
|
-
const explicitStart = parseOptionalIso(params.windowStart);
|
|
323
|
-
const explicitEnd = parseOptionalIso(params.windowEnd);
|
|
324
|
-
const windowStart = explicitStart ?? now;
|
|
325
|
-
const windowEnd = explicitEnd ??
|
|
326
|
-
new Date(windowStart.getTime() + daysAhead * 24 * 60 * 60_000);
|
|
327
|
-
const service = new LifeOpsService(runtime);
|
|
328
|
-
let events = [];
|
|
329
|
-
try {
|
|
330
|
-
const feed = await service.getCalendarFeed(INTERNAL_URL, {
|
|
331
|
-
includeHiddenCalendars: true,
|
|
332
|
-
timeMin: windowStart.toISOString(),
|
|
333
|
-
timeMax: windowEnd.toISOString(),
|
|
334
|
-
timeZone: effectivePreferences.timeZone,
|
|
335
|
-
});
|
|
336
|
-
events = feed.events;
|
|
337
|
-
}
|
|
338
|
-
catch (error) {
|
|
339
|
-
if (error instanceof LifeOpsServiceError) {
|
|
340
|
-
const text = error.status === 403
|
|
341
|
-
? "I can't propose times yet — Google Calendar isn't connected. Connect your calendar and try again."
|
|
342
|
-
: `I couldn't read your calendar (${error.message}).`;
|
|
343
|
-
await callback?.({ text });
|
|
344
|
-
return {
|
|
345
|
-
text,
|
|
346
|
-
success: false,
|
|
347
|
-
data: {
|
|
348
|
-
error: "CALENDAR_UNAVAILABLE",
|
|
349
|
-
status: error.status,
|
|
350
|
-
detail: error.message,
|
|
351
|
-
},
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
throw error;
|
|
355
|
-
}
|
|
356
|
-
const slots = computeProposedSlots({
|
|
357
|
-
now,
|
|
358
|
-
windowStart,
|
|
359
|
-
windowEnd,
|
|
360
|
-
durationMinutes,
|
|
361
|
-
slotCount,
|
|
362
|
-
preferences: effectivePreferences,
|
|
363
|
-
events,
|
|
364
|
-
});
|
|
365
|
-
const text = formatProposedSlotsReply({
|
|
366
|
-
slots,
|
|
367
|
-
context: {
|
|
368
|
-
counterparties,
|
|
369
|
-
bundleLocationLabel,
|
|
370
|
-
timeZone: effectivePreferences.timeZone,
|
|
371
|
-
},
|
|
372
|
-
});
|
|
373
|
-
await callback?.({ text, source: "action", action: "OWNER_CALENDAR" });
|
|
374
|
-
return {
|
|
375
|
-
text,
|
|
376
|
-
success: true,
|
|
377
|
-
data: {
|
|
378
|
-
slots,
|
|
379
|
-
durationMinutes,
|
|
380
|
-
windowStart: windowStart.toISOString(),
|
|
381
|
-
windowEnd: windowEnd.toISOString(),
|
|
382
|
-
timeZone: effectivePreferences.timeZone,
|
|
383
|
-
preferences: effectivePreferences,
|
|
384
|
-
counterparties,
|
|
385
|
-
bundleLocationLabel,
|
|
386
|
-
},
|
|
387
|
-
};
|
|
388
|
-
},
|
|
389
|
-
parameters: [
|
|
390
|
-
{
|
|
391
|
-
name: "durationMinutes",
|
|
392
|
-
description: "Meeting length in minutes. Defaults to the owner's configured default duration.",
|
|
393
|
-
schema: { type: "number" },
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
name: "daysAhead",
|
|
397
|
-
description: "Number of days ahead to search. Defaults to 7. Ignored when windowStart/windowEnd are supplied.",
|
|
398
|
-
schema: { type: "number" },
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
name: "slotCount",
|
|
402
|
-
description: "Number of candidate slots to return. Defaults to 3.",
|
|
403
|
-
schema: { type: "number" },
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
name: "windowStart",
|
|
407
|
-
description: "Optional ISO-8601 earliest start for the search window.",
|
|
408
|
-
schema: { type: "string" },
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
name: "windowEnd",
|
|
412
|
-
description: "Optional ISO-8601 latest end for the search window.",
|
|
413
|
-
schema: { type: "string" },
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
name: "timeZone",
|
|
417
|
-
description: "Optional IANA time zone override when the user is temporarily traveling and wants proposals shown in that local time.",
|
|
418
|
-
schema: { type: "string" },
|
|
419
|
-
},
|
|
420
|
-
],
|
|
421
|
-
examples: [
|
|
422
|
-
[
|
|
423
|
-
{
|
|
424
|
-
name: "{{name1}}",
|
|
425
|
-
content: {
|
|
426
|
-
text: "While I'm traveling, try to bundle meetings with PendingReality and Ryan on the same day if possible.",
|
|
427
|
-
},
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
name: "{{agentName}}",
|
|
431
|
-
content: {
|
|
432
|
-
text: "I'll propose bundled meeting slots that cluster those meetings together while you're traveling.",
|
|
433
|
-
},
|
|
434
|
-
},
|
|
435
|
-
],
|
|
436
|
-
],
|
|
437
|
-
};
|
|
438
|
-
export const checkAvailabilityAction = {
|
|
439
|
-
name: "CHECK_AVAILABILITY",
|
|
440
|
-
similes: ["AM_I_FREE", "AVAILABILITY_CHECK", "FREE_BUSY"],
|
|
441
|
-
description: "Check whether the owner is free or busy across a specific ISO-8601 " +
|
|
442
|
-
"time window. Returns a free/busy summary and any overlapping events.",
|
|
443
|
-
validate: async (runtime, message) => hasLifeOpsAccess(runtime, message),
|
|
444
|
-
handler: async (runtime, message, _state, options, callback) => {
|
|
445
|
-
if (await denyIfNoAccess(runtime, message)) {
|
|
446
|
-
const text = "Scheduling actions are restricted to the owner and authorized users.";
|
|
447
|
-
await callback?.({ text });
|
|
448
|
-
return { text, success: false, data: { error: "PERMISSION_DENIED" } };
|
|
449
|
-
}
|
|
450
|
-
const params = getParams(options);
|
|
451
|
-
const windowStart = parseOptionalIso(params.startAt);
|
|
452
|
-
const windowEnd = parseOptionalIso(params.endAt);
|
|
453
|
-
if (!windowStart || !windowEnd || windowEnd <= windowStart) {
|
|
454
|
-
const text = "I need a valid ISO start and end time to check availability (end must be after start).";
|
|
455
|
-
await callback?.({ text });
|
|
456
|
-
return { text, success: false, data: { error: "INVALID_WINDOW" } };
|
|
457
|
-
}
|
|
458
|
-
const preferences = await readLifeOpsMeetingPreferences(runtime);
|
|
459
|
-
const service = new LifeOpsService(runtime);
|
|
460
|
-
let events = [];
|
|
461
|
-
try {
|
|
462
|
-
const feed = await service.getCalendarFeed(INTERNAL_URL, {
|
|
463
|
-
includeHiddenCalendars: true,
|
|
464
|
-
timeMin: windowStart.toISOString(),
|
|
465
|
-
timeMax: windowEnd.toISOString(),
|
|
466
|
-
timeZone: preferences.timeZone,
|
|
467
|
-
});
|
|
468
|
-
events = feed.events;
|
|
469
|
-
}
|
|
470
|
-
catch (error) {
|
|
471
|
-
if (error instanceof LifeOpsServiceError) {
|
|
472
|
-
const text = error.status === 403
|
|
473
|
-
? "I can't check availability — Google Calendar isn't connected."
|
|
474
|
-
: `I couldn't read your calendar (${error.message}).`;
|
|
475
|
-
await callback?.({ text });
|
|
476
|
-
return {
|
|
477
|
-
text,
|
|
478
|
-
success: false,
|
|
479
|
-
data: {
|
|
480
|
-
error: "CALENDAR_UNAVAILABLE",
|
|
481
|
-
status: error.status,
|
|
482
|
-
detail: error.message,
|
|
483
|
-
},
|
|
484
|
-
};
|
|
485
|
-
}
|
|
486
|
-
throw error;
|
|
487
|
-
}
|
|
488
|
-
const windowStartMs = windowStart.getTime();
|
|
489
|
-
const windowEndMs = windowEnd.getTime();
|
|
490
|
-
const conflicts = events.filter((event) => {
|
|
491
|
-
const s = Date.parse(event.startAt);
|
|
492
|
-
const e = Date.parse(event.endAt);
|
|
493
|
-
return s < windowEndMs && e > windowStartMs;
|
|
494
|
-
});
|
|
495
|
-
const isFree = conflicts.length === 0;
|
|
496
|
-
const text = isFree
|
|
497
|
-
? `You're free from ${formatLocalForDisplay(windowStart.toISOString(), preferences.timeZone)} to ${formatLocalForDisplay(windowEnd.toISOString(), preferences.timeZone)}.`
|
|
498
|
-
: `You have ${conflicts.length} conflict${conflicts.length === 1 ? "" : "s"} in that window: ${conflicts.map((c) => c.title || "Untitled").join(", ")}.`;
|
|
499
|
-
await callback?.({ text, source: "action", action: "OWNER_CALENDAR" });
|
|
500
|
-
return {
|
|
501
|
-
text,
|
|
502
|
-
success: true,
|
|
503
|
-
data: {
|
|
504
|
-
isFree,
|
|
505
|
-
windowStart: windowStart.toISOString(),
|
|
506
|
-
windowEnd: windowEnd.toISOString(),
|
|
507
|
-
conflicts: conflicts.map((c) => ({
|
|
508
|
-
id: c.id,
|
|
509
|
-
title: c.title,
|
|
510
|
-
startAt: c.startAt,
|
|
511
|
-
endAt: c.endAt,
|
|
512
|
-
})),
|
|
513
|
-
timeZone: preferences.timeZone,
|
|
514
|
-
},
|
|
515
|
-
};
|
|
516
|
-
},
|
|
517
|
-
parameters: [
|
|
518
|
-
{
|
|
519
|
-
name: "startAt",
|
|
520
|
-
description: "ISO-8601 start of the window to check.",
|
|
521
|
-
required: true,
|
|
522
|
-
schema: { type: "string" },
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
name: "endAt",
|
|
526
|
-
description: "ISO-8601 end of the window to check.",
|
|
527
|
-
required: true,
|
|
528
|
-
schema: { type: "string" },
|
|
529
|
-
},
|
|
530
|
-
],
|
|
531
|
-
examples: [
|
|
532
|
-
[
|
|
533
|
-
{
|
|
534
|
-
name: "{{name1}}",
|
|
535
|
-
content: {
|
|
536
|
-
text: "Am I free tomorrow between 2pm and 4pm?",
|
|
537
|
-
},
|
|
538
|
-
},
|
|
539
|
-
{
|
|
540
|
-
name: "{{agentName}}",
|
|
541
|
-
content: {
|
|
542
|
-
text: "You're free from Tue, Apr 20, 2:00 PM to Tue, Apr 20, 4:00 PM.",
|
|
543
|
-
},
|
|
544
|
-
},
|
|
545
|
-
],
|
|
546
|
-
[
|
|
547
|
-
{
|
|
548
|
-
name: "{{name1}}",
|
|
549
|
-
content: {
|
|
550
|
-
text: "Do I have anything on my calendar Friday afternoon?",
|
|
551
|
-
},
|
|
552
|
-
},
|
|
553
|
-
{
|
|
554
|
-
name: "{{agentName}}",
|
|
555
|
-
content: {
|
|
556
|
-
text: "You have 1 conflict in that window: Design review with the team.",
|
|
557
|
-
},
|
|
558
|
-
},
|
|
559
|
-
],
|
|
560
|
-
],
|
|
561
|
-
};
|
|
562
|
-
export const updateMeetingPreferencesAction = {
|
|
563
|
-
name: "UPDATE_MEETING_PREFERENCES",
|
|
564
|
-
similes: [
|
|
565
|
-
"SET_MEETING_PREFERENCES",
|
|
566
|
-
"SAVE_MEETING_PREFERENCES",
|
|
567
|
-
"SET_PREFERRED_TIMES",
|
|
568
|
-
"SET_BLACKOUT_WINDOWS",
|
|
569
|
-
"SLEEP_WINDOW",
|
|
570
|
-
"NO_CALL_HOURS",
|
|
571
|
-
"PROTECT_SLEEP",
|
|
572
|
-
],
|
|
573
|
-
tags: [
|
|
574
|
-
"always-include",
|
|
575
|
-
"sleep window",
|
|
576
|
-
"no-call hours",
|
|
577
|
-
"protected hours",
|
|
578
|
-
"blackout window",
|
|
579
|
-
],
|
|
580
|
-
description: "Persist the owner's meeting scheduling preferences: preferred start/end " +
|
|
581
|
-
"of day (24h HH:MM local), blackout windows, default meeting duration, " +
|
|
582
|
-
"and travel buffer. These drive PROPOSE_MEETING_TIMES. Use this for durable " +
|
|
583
|
-
"sleep windows, no-call hours, and other recurring scheduling rules.",
|
|
584
|
-
suppressPostActionContinuation: true,
|
|
585
|
-
validate: async (runtime, message) => hasLifeOpsAccess(runtime, message),
|
|
586
|
-
handler: async (runtime, message, _state, options, callback) => {
|
|
587
|
-
if (await denyIfNoAccess(runtime, message)) {
|
|
588
|
-
const text = "Scheduling actions are restricted to the owner and authorized users.";
|
|
589
|
-
await callback?.({ text });
|
|
590
|
-
return { text, success: false, data: { error: "PERMISSION_DENIED" } };
|
|
591
|
-
}
|
|
592
|
-
const params = getParams(options);
|
|
593
|
-
const patch = normalizeLifeOpsMeetingPreferencesPatch(params);
|
|
594
|
-
if (Object.keys(patch).length === 0) {
|
|
595
|
-
const text = "No valid preference fields were provided. Supply preferredStartLocal/preferredEndLocal as HH:MM, numeric defaultDurationMinutes/travelBufferMinutes, or a blackoutWindows array.";
|
|
596
|
-
await callback?.({ text });
|
|
597
|
-
return { text, success: false, data: { error: "NO_FIELDS" } };
|
|
598
|
-
}
|
|
599
|
-
const updated = await updateLifeOpsMeetingPreferences(runtime, patch);
|
|
600
|
-
if (!updated) {
|
|
601
|
-
const text = "Could not persist meeting preferences.";
|
|
602
|
-
await callback?.({ text });
|
|
603
|
-
return {
|
|
604
|
-
text,
|
|
605
|
-
success: false,
|
|
606
|
-
data: { error: "PREFERENCES_UPDATE_FAILED" },
|
|
607
|
-
};
|
|
608
|
-
}
|
|
609
|
-
const text = `Updated meeting preferences (${updated.preferredStartLocal}–${updated.preferredEndLocal} ${updated.timeZone}, default ${updated.defaultDurationMinutes} min, travel buffer ${updated.travelBufferMinutes} min, ${updated.blackoutWindows.length} blackout window${updated.blackoutWindows.length === 1 ? "" : "s"}).`;
|
|
610
|
-
await callback?.({
|
|
611
|
-
text,
|
|
612
|
-
source: "action",
|
|
613
|
-
action: "OWNER_CALENDAR",
|
|
614
|
-
});
|
|
615
|
-
return {
|
|
616
|
-
text,
|
|
617
|
-
success: true,
|
|
618
|
-
data: { preferences: updated, updatedFields: Object.keys(patch) },
|
|
619
|
-
};
|
|
620
|
-
},
|
|
621
|
-
parameters: [
|
|
622
|
-
{
|
|
623
|
-
name: "timeZone",
|
|
624
|
-
description: "IANA time zone used to interpret preferred hours.",
|
|
625
|
-
schema: { type: "string" },
|
|
626
|
-
},
|
|
627
|
-
{
|
|
628
|
-
name: "preferredStartLocal",
|
|
629
|
-
description: "Earliest preferred meeting start time-of-day (local HH:MM, 24h).",
|
|
630
|
-
schema: { type: "string" },
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
name: "preferredEndLocal",
|
|
634
|
-
description: "Latest preferred meeting end time-of-day (local HH:MM, 24h).",
|
|
635
|
-
schema: { type: "string" },
|
|
636
|
-
},
|
|
637
|
-
{
|
|
638
|
-
name: "defaultDurationMinutes",
|
|
639
|
-
description: "Default meeting duration in minutes (5–480).",
|
|
640
|
-
schema: { type: "number" },
|
|
641
|
-
},
|
|
642
|
-
{
|
|
643
|
-
name: "travelBufferMinutes",
|
|
644
|
-
description: "Minutes to reserve before/after each meeting (0–240).",
|
|
645
|
-
schema: { type: "number" },
|
|
646
|
-
},
|
|
647
|
-
{
|
|
648
|
-
name: "blackoutWindows",
|
|
649
|
-
description: "Array of { label, startLocal (HH:MM), endLocal (HH:MM), daysOfWeek? (0=Sun..6=Sat) }.",
|
|
650
|
-
schema: { type: "array" },
|
|
651
|
-
},
|
|
652
|
-
],
|
|
653
|
-
examples: [
|
|
654
|
-
[
|
|
655
|
-
{
|
|
656
|
-
name: "{{name1}}",
|
|
657
|
-
content: {
|
|
658
|
-
text: "No calls between 11pm and 8am unless I explicitly say it's okay.",
|
|
659
|
-
},
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
name: "{{agentName}}",
|
|
663
|
-
content: {
|
|
664
|
-
text: "Updated your meeting preferences to block calls from 11:00 PM to 8:00 AM unless you override it.",
|
|
665
|
-
},
|
|
666
|
-
},
|
|
667
|
-
],
|
|
668
|
-
[
|
|
669
|
-
{
|
|
670
|
-
name: "{{name1}}",
|
|
671
|
-
content: {
|
|
672
|
-
text: "Keep my mornings protected for deep work and don't schedule meetings before 10am.",
|
|
673
|
-
},
|
|
674
|
-
},
|
|
675
|
-
{
|
|
676
|
-
name: "{{agentName}}",
|
|
677
|
-
content: {
|
|
678
|
-
text: "Stored your meeting preferences so mornings stay protected and meetings start at 10:00 AM or later.",
|
|
679
|
-
},
|
|
680
|
-
},
|
|
681
|
-
],
|
|
682
|
-
],
|
|
683
|
-
};
|
|
684
|
-
function normalizeSchedulingSubaction(value) {
|
|
685
|
-
if (typeof value !== "string") {
|
|
686
|
-
return null;
|
|
687
|
-
}
|
|
688
|
-
const normalized = value.trim().toLowerCase();
|
|
689
|
-
switch (normalized) {
|
|
690
|
-
case "start":
|
|
691
|
-
case "propose":
|
|
692
|
-
case "respond":
|
|
693
|
-
case "finalize":
|
|
694
|
-
case "cancel":
|
|
695
|
-
case "list_active":
|
|
696
|
-
case "list_proposals":
|
|
697
|
-
return normalized;
|
|
698
|
-
default:
|
|
699
|
-
return null;
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
function normalizeShouldAct(value) {
|
|
703
|
-
if (typeof value === "boolean") {
|
|
704
|
-
return value;
|
|
705
|
-
}
|
|
706
|
-
if (typeof value === "string") {
|
|
707
|
-
const normalized = value.trim().toLowerCase();
|
|
708
|
-
if (normalized === "true") {
|
|
709
|
-
return true;
|
|
710
|
-
}
|
|
711
|
-
if (normalized === "false") {
|
|
712
|
-
return false;
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
return null;
|
|
716
|
-
}
|
|
717
|
-
function normalizePlannerResponse(value) {
|
|
718
|
-
if (typeof value !== "string") {
|
|
719
|
-
return undefined;
|
|
720
|
-
}
|
|
721
|
-
const trimmed = value.trim();
|
|
722
|
-
return trimmed.length > 0 ? trimmed : undefined;
|
|
723
|
-
}
|
|
724
|
-
async function resolveSchedulingPlanWithLlm(args) {
|
|
725
|
-
const recentConversation = (await collectRecentConversationTexts({
|
|
726
|
-
runtime: args.runtime,
|
|
727
|
-
message: args.message,
|
|
728
|
-
state: args.state,
|
|
729
|
-
limit: 8,
|
|
730
|
-
})).join("\n");
|
|
731
|
-
const currentMessage = typeof args.message.content?.text === "string" ? args.message.content.text : "";
|
|
732
|
-
const prompt = [
|
|
733
|
-
"Plan the scheduling negotiation action for this request.",
|
|
734
|
-
"The user may speak in any language.",
|
|
735
|
-
"Use the current request, the structured parameters, and recent conversation context.",
|
|
736
|
-
"Return a JSON object with exactly these fields:",
|
|
737
|
-
" subaction: one of start, propose, respond, finalize, cancel, list_active, list_proposals, or null",
|
|
738
|
-
" shouldAct: boolean",
|
|
739
|
-
" response: short natural-language reply when shouldAct is false or clarification is needed",
|
|
740
|
-
"",
|
|
741
|
-
"Use start when beginning a new negotiation.",
|
|
742
|
-
"Use propose when submitting a concrete proposed slot for an existing negotiation.",
|
|
743
|
-
"Use respond when recording accepted, declined, or expired against a proposal.",
|
|
744
|
-
"Use finalize when confirming the winning proposal.",
|
|
745
|
-
"Use cancel when stopping an active negotiation.",
|
|
746
|
-
"Use list_active for listing negotiations.",
|
|
747
|
-
"Use list_proposals for listing proposals in one negotiation.",
|
|
748
|
-
"If the user is making a first-turn calendar request, asking for recurring time, asking to bundle meetings while traveling, or asking for missed-call repair, this action is the wrong tool. Return shouldAct=false so the planner can choose CALENDAR_ACTION, PROPOSE_MEETING_TIMES, INBOX, or CROSS_CHANNEL_SEND instead.",
|
|
749
|
-
"Set shouldAct=false when the user is vague or only asks for general scheduling help.",
|
|
750
|
-
"",
|
|
751
|
-
"Examples:",
|
|
752
|
-
' "start scheduling lunch with Jill" -> {"subaction":"start","shouldAct":true,"response":null}',
|
|
753
|
-
' "propose Tuesday at 3" with negotiationId/startAt/endAt params -> {"subaction":"propose","shouldAct":true,"response":null}',
|
|
754
|
-
' "mark that proposal accepted" with proposalId/response params -> {"subaction":"respond","shouldAct":true,"response":null}',
|
|
755
|
-
' "confirm that slot" with proposalId/confirmed params -> {"subaction":"finalize","shouldAct":true,"response":null}',
|
|
756
|
-
' "list my scheduling negotiations" -> {"subaction":"list_active","shouldAct":true,"response":null}',
|
|
757
|
-
' "help me schedule something" -> {"subaction":null,"shouldAct":false,"response":"Do you want to start, propose, respond, finalize, cancel, or list scheduling negotiations?"}',
|
|
758
|
-
"",
|
|
759
|
-
"Return ONLY valid JSON.",
|
|
760
|
-
`Current request: ${JSON.stringify(currentMessage)}`,
|
|
761
|
-
`Resolved intent: ${JSON.stringify(args.intent)}`,
|
|
762
|
-
`Structured parameters: ${JSON.stringify(args.params)}`,
|
|
763
|
-
`Recent conversation: ${JSON.stringify(recentConversation)}`,
|
|
764
|
-
].join("\n");
|
|
765
|
-
try {
|
|
766
|
-
const result = await args.runtime.useModel(ModelType.TEXT_SMALL, {
|
|
767
|
-
prompt,
|
|
768
|
-
});
|
|
769
|
-
const rawResponse = typeof result === "string" ? result : "";
|
|
770
|
-
const parsed = parseKeyValueXml(rawResponse) ??
|
|
771
|
-
parseJSONObjectFromText(rawResponse);
|
|
772
|
-
if (!parsed) {
|
|
773
|
-
return {
|
|
774
|
-
subaction: null,
|
|
775
|
-
shouldAct: null,
|
|
776
|
-
};
|
|
777
|
-
}
|
|
778
|
-
return {
|
|
779
|
-
subaction: normalizeSchedulingSubaction(parsed.subaction),
|
|
780
|
-
shouldAct: normalizeShouldAct(parsed.shouldAct),
|
|
781
|
-
response: normalizePlannerResponse(parsed.response),
|
|
782
|
-
};
|
|
783
|
-
}
|
|
784
|
-
catch (error) {
|
|
785
|
-
args.runtime.logger?.warn?.({
|
|
786
|
-
src: "action:scheduling",
|
|
787
|
-
error: error instanceof Error ? error.message : String(error),
|
|
788
|
-
}, "Scheduling planning model call failed");
|
|
789
|
-
return {
|
|
790
|
-
subaction: null,
|
|
791
|
-
shouldAct: null,
|
|
792
|
-
};
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
function formatNegotiationSummary(n) {
|
|
796
|
-
return `Negotiation ${n.id} — "${n.subject}" (${n.durationMinutes} min, state=${n.state})`;
|
|
797
|
-
}
|
|
798
|
-
function formatProposalSummary(p) {
|
|
799
|
-
return `Proposal ${p.id}: ${p.startAt} → ${p.endAt} by ${p.proposedBy} (status=${p.status})`;
|
|
800
|
-
}
|
|
801
|
-
export const schedulingAction = {
|
|
802
|
-
name: "SCHEDULING",
|
|
803
|
-
similes: [
|
|
804
|
-
"NEGOTIATE_MEETING",
|
|
805
|
-
"MULTI_TURN_SCHEDULING",
|
|
806
|
-
"MANAGE_SCHEDULING_NEGOTIATION",
|
|
807
|
-
"RESPOND_TO_MEETING_PROPOSAL",
|
|
808
|
-
"FINALIZE_SCHEDULING_NEGOTIATION",
|
|
809
|
-
],
|
|
810
|
-
description: "Multi-turn scheduling negotiation coordinator. Use this only for an " +
|
|
811
|
-
"existing proposal workflow: start a negotiation record, submit a concrete " +
|
|
812
|
-
"proposal for that negotiation, record accepted/declined responses, " +
|
|
813
|
-
"finalize the winning proposal, cancel, or list negotiations/proposals. " +
|
|
814
|
-
"Do not use this for first-turn calendar requests, recurring blocks, " +
|
|
815
|
-
"travel-time bundling, missed-call repair, or fresh candidate-slot " +
|
|
816
|
-
"searches; those belong to CALENDAR_ACTION, PROPOSE_MEETING_TIMES, INBOX, " +
|
|
817
|
-
"or CROSS_CHANNEL_SEND.",
|
|
818
|
-
suppressPostActionContinuation: true,
|
|
819
|
-
validate: async (runtime, message) => hasAdminAccess(runtime, message),
|
|
820
|
-
handler: async (runtime, message, state, options, callback) => {
|
|
821
|
-
if (!(await hasAdminAccess(runtime, message))) {
|
|
822
|
-
const text = "Scheduling negotiation is restricted to admins.";
|
|
823
|
-
await callback?.({ text });
|
|
824
|
-
return { text, success: false, data: { error: "PERMISSION_DENIED" } };
|
|
825
|
-
}
|
|
826
|
-
const params = options?.parameters ?? {};
|
|
827
|
-
const messageBody = typeof message.content?.text === "string" ? message.content.text : "";
|
|
828
|
-
const intent = (params.intent ?? messageBody).trim();
|
|
829
|
-
const explicitSubaction = normalizeSchedulingSubaction(params.subaction);
|
|
830
|
-
const llmPlan = await resolveSchedulingPlanWithLlm({
|
|
831
|
-
runtime,
|
|
832
|
-
message,
|
|
833
|
-
state,
|
|
834
|
-
intent,
|
|
835
|
-
params,
|
|
836
|
-
});
|
|
837
|
-
const subaction = explicitSubaction ?? llmPlan.subaction;
|
|
838
|
-
if (llmPlan.shouldAct === false && !explicitSubaction) {
|
|
839
|
-
const text = llmPlan.response ??
|
|
840
|
-
"Do you want to start, propose, respond, finalize, cancel, or list scheduling negotiations?";
|
|
841
|
-
await callback?.({ text });
|
|
842
|
-
return {
|
|
843
|
-
text,
|
|
844
|
-
success: false,
|
|
845
|
-
values: {
|
|
846
|
-
success: false,
|
|
847
|
-
error: "PLANNER_SHOULDACT_FALSE",
|
|
848
|
-
noop: true,
|
|
849
|
-
},
|
|
850
|
-
data: { noop: true, error: "PLANNER_SHOULDACT_FALSE" },
|
|
851
|
-
};
|
|
852
|
-
}
|
|
853
|
-
if (!subaction) {
|
|
854
|
-
const text = llmPlan.response ??
|
|
855
|
-
"Do you want to start, propose, respond, finalize, cancel, or list scheduling negotiations?";
|
|
856
|
-
await callback?.({ text });
|
|
857
|
-
return { text, success: false, data: { error: "MISSING_SUBACTION" } };
|
|
858
|
-
}
|
|
859
|
-
const service = new LifeOpsService(runtime);
|
|
860
|
-
try {
|
|
861
|
-
if (subaction === "start") {
|
|
862
|
-
const subject = params.subject ?? params.intent ?? messageBody.trim();
|
|
863
|
-
if (!subject) {
|
|
864
|
-
const text = "I need a subject (what the meeting is about) to start a negotiation.";
|
|
865
|
-
await callback?.({ text });
|
|
866
|
-
return { text, success: false, data: { error: "MISSING_SUBJECT" } };
|
|
867
|
-
}
|
|
868
|
-
const neg = await service.startNegotiation({
|
|
869
|
-
subject,
|
|
870
|
-
relationshipId: params.relationshipId ?? null,
|
|
871
|
-
durationMinutes: params.durationMinutes,
|
|
872
|
-
timezone: params.timezone,
|
|
873
|
-
});
|
|
874
|
-
const text = `Started ${formatNegotiationSummary(neg)} and notified the counterparty.`;
|
|
875
|
-
await callback?.({ text, source: "action", action: "OWNER_CALENDAR" });
|
|
876
|
-
return { text, success: true, data: { negotiation: neg } };
|
|
877
|
-
}
|
|
878
|
-
if (subaction === "propose") {
|
|
879
|
-
if (!params.negotiationId || !params.startAt || !params.endAt) {
|
|
880
|
-
const text = "Propose needs negotiationId, startAt, and endAt (ISO-8601).";
|
|
881
|
-
await callback?.({ text });
|
|
882
|
-
return {
|
|
883
|
-
text,
|
|
884
|
-
success: false,
|
|
885
|
-
data: { error: "MISSING_PROPOSAL_FIELDS" },
|
|
886
|
-
};
|
|
887
|
-
}
|
|
888
|
-
const proposedBy = params.proposedBy ?? "agent";
|
|
889
|
-
const proposal = await service.proposeTime({
|
|
890
|
-
negotiationId: params.negotiationId,
|
|
891
|
-
startAt: params.startAt,
|
|
892
|
-
endAt: params.endAt,
|
|
893
|
-
proposedBy,
|
|
894
|
-
});
|
|
895
|
-
const text = proposedBy === "counterparty"
|
|
896
|
-
? `Recorded ${formatProposalSummary(proposal)}.`
|
|
897
|
-
: `Recorded ${formatProposalSummary(proposal)} and sent it to the counterparty.`;
|
|
898
|
-
await callback?.({ text, source: "action", action: "OWNER_CALENDAR" });
|
|
899
|
-
return { text, success: true, data: { proposal } };
|
|
900
|
-
}
|
|
901
|
-
if (subaction === "respond") {
|
|
902
|
-
if (!params.proposalId || !params.response) {
|
|
903
|
-
const text = "Respond needs proposalId and response.";
|
|
904
|
-
await callback?.({ text });
|
|
905
|
-
return {
|
|
906
|
-
text,
|
|
907
|
-
success: false,
|
|
908
|
-
data: { error: "MISSING_RESPONSE_FIELDS" },
|
|
909
|
-
};
|
|
910
|
-
}
|
|
911
|
-
const proposal = await service.respondToProposal(params.proposalId, params.response);
|
|
912
|
-
const text = `Proposal ${proposal.id} is now ${proposal.status}.`;
|
|
913
|
-
await callback?.({ text, source: "action", action: "OWNER_CALENDAR" });
|
|
914
|
-
return { text, success: true, data: { proposal } };
|
|
915
|
-
}
|
|
916
|
-
if (subaction === "finalize") {
|
|
917
|
-
if (!params.negotiationId || !params.proposalId) {
|
|
918
|
-
const text = "Finalize needs negotiationId and proposalId.";
|
|
919
|
-
await callback?.({ text });
|
|
920
|
-
return {
|
|
921
|
-
text,
|
|
922
|
-
success: false,
|
|
923
|
-
data: { error: "MISSING_FINALIZE_FIELDS" },
|
|
924
|
-
};
|
|
925
|
-
}
|
|
926
|
-
const neg = await service.finalizeNegotiation(params.negotiationId, params.proposalId);
|
|
927
|
-
const text = `Confirmed ${formatNegotiationSummary(neg)} and sent confirmation to the counterparty.`;
|
|
928
|
-
await callback?.({ text, source: "action", action: "OWNER_CALENDAR" });
|
|
929
|
-
return { text, success: true, data: { negotiation: neg } };
|
|
930
|
-
}
|
|
931
|
-
if (subaction === "cancel") {
|
|
932
|
-
if (!params.negotiationId) {
|
|
933
|
-
const text = "Cancel needs negotiationId.";
|
|
934
|
-
await callback?.({ text });
|
|
935
|
-
return {
|
|
936
|
-
text,
|
|
937
|
-
success: false,
|
|
938
|
-
data: { error: "MISSING_NEGOTIATION_ID" },
|
|
939
|
-
};
|
|
940
|
-
}
|
|
941
|
-
await service.cancelNegotiation(params.negotiationId, params.reason);
|
|
942
|
-
const text = `Cancelled negotiation ${params.negotiationId} and notified the counterparty.`;
|
|
943
|
-
await callback?.({ text, source: "action", action: "OWNER_CALENDAR" });
|
|
944
|
-
return {
|
|
945
|
-
text,
|
|
946
|
-
success: true,
|
|
947
|
-
data: { negotiationId: params.negotiationId },
|
|
948
|
-
};
|
|
949
|
-
}
|
|
950
|
-
if (subaction === "list_proposals") {
|
|
951
|
-
if (!params.negotiationId) {
|
|
952
|
-
const text = "list_proposals needs negotiationId.";
|
|
953
|
-
await callback?.({ text });
|
|
954
|
-
return {
|
|
955
|
-
text,
|
|
956
|
-
success: false,
|
|
957
|
-
data: { error: "MISSING_NEGOTIATION_ID" },
|
|
958
|
-
};
|
|
959
|
-
}
|
|
960
|
-
const proposals = await service.listProposals(params.negotiationId);
|
|
961
|
-
const text = proposals.length
|
|
962
|
-
? `Proposals for ${params.negotiationId}:\n${proposals.map(formatProposalSummary).join("\n")}`
|
|
963
|
-
: `No proposals for ${params.negotiationId}.`;
|
|
964
|
-
await callback?.({ text, source: "action", action: "OWNER_CALENDAR" });
|
|
965
|
-
return { text, success: true, data: { proposals } };
|
|
966
|
-
}
|
|
967
|
-
// list_active
|
|
968
|
-
const active = await service.listActiveNegotiations({ limit: 20 });
|
|
969
|
-
const text = active.length
|
|
970
|
-
? `Active negotiations:\n${active.map(formatNegotiationSummary).join("\n")}`
|
|
971
|
-
: "No active scheduling negotiations.";
|
|
972
|
-
await callback?.({ text, source: "action", action: "OWNER_CALENDAR" });
|
|
973
|
-
return { text, success: true, data: { negotiations: active } };
|
|
974
|
-
}
|
|
975
|
-
catch (error) {
|
|
976
|
-
if (error instanceof LifeOpsServiceError) {
|
|
977
|
-
const text = `Scheduling error: ${error.message}`;
|
|
978
|
-
await callback?.({ text });
|
|
979
|
-
return {
|
|
980
|
-
text,
|
|
981
|
-
success: false,
|
|
982
|
-
data: { error: "SERVICE_ERROR", status: error.status, detail: error.message },
|
|
983
|
-
};
|
|
984
|
-
}
|
|
985
|
-
throw error;
|
|
986
|
-
}
|
|
987
|
-
},
|
|
988
|
-
parameters: [
|
|
989
|
-
{
|
|
990
|
-
name: "subaction",
|
|
991
|
-
description: "Which step of the negotiation to run: start, propose, respond, finalize, cancel, list_active, list_proposals.",
|
|
992
|
-
schema: { type: "string" },
|
|
993
|
-
},
|
|
994
|
-
{
|
|
995
|
-
name: "intent",
|
|
996
|
-
description: "Free-text description of what the scheduling turn is trying to do.",
|
|
997
|
-
schema: { type: "string" },
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
name: "negotiationId",
|
|
1001
|
-
description: "Target negotiation ID for proposal, finalize, cancel, or list_proposals.",
|
|
1002
|
-
schema: { type: "string" },
|
|
1003
|
-
},
|
|
1004
|
-
{
|
|
1005
|
-
name: "proposalId",
|
|
1006
|
-
description: "Target proposal ID for respond or finalize.",
|
|
1007
|
-
schema: { type: "string" },
|
|
1008
|
-
},
|
|
1009
|
-
{
|
|
1010
|
-
name: "subject",
|
|
1011
|
-
description: "Subject of the meeting (used when starting a negotiation).",
|
|
1012
|
-
schema: { type: "string" },
|
|
1013
|
-
},
|
|
1014
|
-
{
|
|
1015
|
-
name: "startAt",
|
|
1016
|
-
description: "ISO-8601 proposed start time.",
|
|
1017
|
-
schema: { type: "string" },
|
|
1018
|
-
},
|
|
1019
|
-
{
|
|
1020
|
-
name: "endAt",
|
|
1021
|
-
description: "ISO-8601 proposed end time.",
|
|
1022
|
-
schema: { type: "string" },
|
|
1023
|
-
},
|
|
1024
|
-
{
|
|
1025
|
-
name: "durationMinutes",
|
|
1026
|
-
description: "Meeting duration in minutes (defaults to 30 when starting).",
|
|
1027
|
-
schema: { type: "number" },
|
|
1028
|
-
},
|
|
1029
|
-
{
|
|
1030
|
-
name: "response",
|
|
1031
|
-
description: "Proposal response: accepted, declined, or expired.",
|
|
1032
|
-
schema: { type: "string" },
|
|
1033
|
-
},
|
|
1034
|
-
{
|
|
1035
|
-
name: "confirmed",
|
|
1036
|
-
description: "Set true alongside a proposalId to finalize.",
|
|
1037
|
-
schema: { type: "boolean" },
|
|
1038
|
-
},
|
|
1039
|
-
],
|
|
1040
|
-
examples: [
|
|
1041
|
-
[
|
|
1042
|
-
{ name: "{{name1}}", content: { text: "Start a scheduling negotiation with Alice about the quarterly review" } },
|
|
1043
|
-
{
|
|
1044
|
-
name: "{{agentName}}",
|
|
1045
|
-
content: {
|
|
1046
|
-
text: 'Started negotiation — "quarterly review with Alice" (30 min, state=initiated).',
|
|
1047
|
-
},
|
|
1048
|
-
},
|
|
1049
|
-
],
|
|
1050
|
-
[
|
|
1051
|
-
{ name: "{{name1}}", content: { text: "Propose Tuesday 2-3pm for negotiation abc-123" } },
|
|
1052
|
-
{
|
|
1053
|
-
name: "{{agentName}}",
|
|
1054
|
-
content: {
|
|
1055
|
-
text: "Recorded proposal: 2026-04-21T14:00:00Z → 2026-04-21T15:00:00Z (status=pending).",
|
|
1056
|
-
},
|
|
1057
|
-
},
|
|
1058
|
-
],
|
|
1059
|
-
[
|
|
1060
|
-
{ name: "{{name1}}", content: { text: "Alice accepted proposal xyz-789" } },
|
|
1061
|
-
{
|
|
1062
|
-
name: "{{agentName}}",
|
|
1063
|
-
content: {
|
|
1064
|
-
text: "Proposal xyz-789 is now accepted.",
|
|
1065
|
-
},
|
|
1066
|
-
},
|
|
1067
|
-
],
|
|
1068
|
-
[
|
|
1069
|
-
{ name: "{{name1}}", content: { text: "Finalize negotiation abc-123 with proposal xyz-789" } },
|
|
1070
|
-
{
|
|
1071
|
-
name: "{{agentName}}",
|
|
1072
|
-
content: {
|
|
1073
|
-
text: 'Confirmed negotiation — "quarterly review with Alice" (state=confirmed).',
|
|
1074
|
-
},
|
|
1075
|
-
},
|
|
1076
|
-
],
|
|
1077
|
-
],
|
|
1078
|
-
};
|