@elizaos/agent 2.0.0-alpha.173 → 2.0.0-alpha.192
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/actions/emote.d.ts.map +1 -1
- package/apps/app-companion/src/actions/emote.js +1 -0
- package/apps/app-elizamaker/src/drop-routes.d.ts +22 -0
- package/apps/app-elizamaker/src/drop-routes.d.ts.map +1 -0
- package/apps/app-elizamaker/src/drop-service.d.ts +26 -0
- package/apps/app-elizamaker/src/drop-service.d.ts.map +1 -0
- package/apps/app-elizamaker/src/index.d.ts +8 -0
- package/apps/app-elizamaker/src/index.d.ts.map +1 -0
- package/apps/app-elizamaker/src/index.js +5 -0
- package/apps/app-elizamaker/src/merkle-tree.d.ts.map +1 -0
- package/apps/app-elizamaker/src/og-tracker.d.ts.map +1 -0
- package/apps/app-elizamaker/src/og-tracker.js +60 -0
- package/apps/app-elizamaker/src/twitter-verify.d.ts +25 -0
- package/apps/app-elizamaker/src/twitter-verify.d.ts.map +1 -0
- package/apps/app-elizamaker/src/twitter-verify.js +168 -0
- package/apps/app-lifeops/src/actions/activity-report.d.ts +13 -0
- package/apps/app-lifeops/src/actions/activity-report.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/activity-report.js +287 -0
- package/apps/app-lifeops/src/actions/app-blocker.d.ts +5 -0
- package/apps/app-lifeops/src/actions/app-blocker.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/app-blocker.js +446 -0
- package/apps/app-lifeops/src/actions/autofill.d.ts +35 -0
- package/apps/app-lifeops/src/actions/autofill.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/autofill.js +340 -0
- package/apps/app-lifeops/src/actions/browser-extension.d.ts +19 -0
- package/apps/app-lifeops/src/actions/browser-extension.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/browser-extension.js +88 -0
- package/apps/app-lifeops/src/actions/calendar.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/calendar.js +405 -973
- package/apps/app-lifeops/src/actions/calendly.d.ts +3 -0
- package/apps/app-lifeops/src/actions/calendly.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/calendly.js +242 -0
- package/apps/app-lifeops/src/actions/checkin.d.ts +4 -0
- package/apps/app-lifeops/src/actions/checkin.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/checkin.js +72 -0
- package/apps/app-lifeops/src/actions/computer-use.d.ts +14 -0
- package/apps/app-lifeops/src/actions/computer-use.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/computer-use.js +149 -0
- package/apps/app-lifeops/src/actions/cross-channel-send.d.ts +22 -0
- package/apps/app-lifeops/src/actions/cross-channel-send.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/cross-channel-send.js +562 -0
- package/apps/app-lifeops/src/actions/device-bus.d.ts +19 -0
- package/apps/app-lifeops/src/actions/device-bus.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/device-bus.js +233 -0
- package/apps/app-lifeops/src/actions/dossier.d.ts +5 -0
- package/apps/app-lifeops/src/actions/dossier.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/dossier.js +195 -0
- package/apps/app-lifeops/src/actions/gmail.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/gmail.js +73 -37
- package/apps/app-lifeops/src/actions/health.d.ts +9 -0
- package/apps/app-lifeops/src/actions/health.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/health.js +357 -0
- package/apps/app-lifeops/src/actions/inbox.d.ts +3 -1
- package/apps/app-lifeops/src/actions/inbox.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/inbox.js +279 -152
- package/apps/app-lifeops/src/actions/intent-sync.d.ts +3 -0
- package/apps/app-lifeops/src/actions/intent-sync.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/intent-sync.js +258 -0
- package/apps/app-lifeops/src/actions/life.d.ts +0 -4
- package/apps/app-lifeops/src/actions/life.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/life.js +162 -249
- package/apps/app-lifeops/src/actions/lifeops-google-helpers.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/lifeops-google-helpers.js +11 -3
- package/apps/app-lifeops/src/actions/list-remote-sessions.d.ts +6 -0
- package/apps/app-lifeops/src/actions/list-remote-sessions.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/list-remote-sessions.js +45 -0
- package/apps/app-lifeops/src/actions/password-manager.d.ts +3 -0
- package/apps/app-lifeops/src/actions/password-manager.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/password-manager.js +182 -0
- package/apps/app-lifeops/src/actions/relationships.d.ts +9 -0
- package/apps/app-lifeops/src/actions/relationships.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/relationships.js +504 -0
- package/apps/app-lifeops/src/actions/remote-desktop.d.ts +3 -0
- package/apps/app-lifeops/src/actions/remote-desktop.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/remote-desktop.js +244 -0
- package/apps/app-lifeops/src/actions/revoke-remote-session.d.ts +6 -0
- package/apps/app-lifeops/src/actions/revoke-remote-session.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/revoke-remote-session.js +73 -0
- package/apps/app-lifeops/src/actions/scheduling.d.ts +55 -0
- package/apps/app-lifeops/src/actions/scheduling.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/scheduling.js +914 -0
- package/apps/app-lifeops/src/actions/screen-time.d.ts +8 -0
- package/apps/app-lifeops/src/actions/screen-time.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/screen-time.js +231 -0
- package/apps/app-lifeops/src/actions/search-across-channels.d.ts +13 -0
- package/apps/app-lifeops/src/actions/search-across-channels.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/search-across-channels.js +340 -0
- package/apps/app-lifeops/src/actions/start-remote-session.d.ts +14 -0
- package/apps/app-lifeops/src/actions/start-remote-session.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/start-remote-session.js +138 -0
- package/apps/app-lifeops/src/actions/twilio-call.d.ts +20 -0
- package/apps/app-lifeops/src/actions/twilio-call.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/twilio-call.js +510 -0
- package/apps/app-lifeops/src/actions/update-owner-profile.d.ts +3 -1
- package/apps/app-lifeops/src/actions/update-owner-profile.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/update-owner-profile.js +52 -31
- package/apps/app-lifeops/src/actions/website-blocker.d.ts +10 -0
- package/apps/app-lifeops/src/actions/website-blocker.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/website-blocker.js +539 -0
- package/apps/app-lifeops/src/actions/x-read.d.ts +3 -0
- package/apps/app-lifeops/src/actions/x-read.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/x-read.js +367 -0
- package/apps/app-lifeops/src/activity-profile/activity-tracker-repo.d.ts +28 -0
- package/apps/app-lifeops/src/activity-profile/activity-tracker-repo.d.ts.map +1 -0
- package/apps/app-lifeops/src/activity-profile/activity-tracker-repo.js +62 -0
- package/apps/app-lifeops/src/activity-profile/activity-tracker-reporting.d.ts +45 -0
- package/apps/app-lifeops/src/activity-profile/activity-tracker-reporting.d.ts.map +1 -0
- package/apps/app-lifeops/src/activity-profile/activity-tracker-reporting.js +112 -0
- package/apps/app-lifeops/src/activity-profile/activity-tracker-service.d.ts +26 -0
- package/apps/app-lifeops/src/activity-profile/activity-tracker-service.d.ts.map +1 -0
- package/apps/app-lifeops/src/activity-profile/activity-tracker-service.js +84 -0
- package/apps/app-lifeops/src/activity-profile/analyzer.d.ts.map +1 -0
- package/apps/app-lifeops/src/activity-profile/analyzer.js +544 -0
- package/apps/app-lifeops/src/activity-profile/proactive-planner.d.ts.map +1 -0
- package/apps/app-lifeops/src/activity-profile/proactive-planner.js +458 -0
- package/apps/app-lifeops/src/activity-profile/proactive-worker.d.ts.map +1 -0
- package/apps/app-lifeops/src/activity-profile/proactive-worker.js +571 -0
- package/apps/app-lifeops/src/activity-profile/profile-metadata.d.ts.map +1 -0
- package/apps/app-lifeops/src/activity-profile/redactor.d.ts +18 -0
- package/apps/app-lifeops/src/activity-profile/redactor.d.ts.map +1 -0
- package/apps/app-lifeops/src/activity-profile/redactor.js +39 -0
- package/apps/app-lifeops/src/activity-profile/service.d.ts +11 -0
- package/apps/app-lifeops/src/activity-profile/service.d.ts.map +1 -0
- package/apps/app-lifeops/src/activity-profile/service.js +229 -0
- package/apps/app-lifeops/src/activity-profile/types.d.ts.map +1 -0
- package/apps/app-lifeops/src/app-blocker/access.d.ts +8 -0
- package/apps/app-lifeops/src/app-blocker/access.d.ts.map +1 -0
- package/apps/app-lifeops/src/app-blocker/access.js +28 -0
- package/apps/app-lifeops/src/app-blocker/engine.d.ts +10 -0
- package/apps/app-lifeops/src/app-blocker/engine.d.ts.map +1 -0
- package/apps/app-lifeops/src/app-blocker/engine.js +43 -0
- package/apps/app-lifeops/src/dossier/action.d.ts +9 -0
- package/apps/app-lifeops/src/dossier/action.d.ts.map +1 -0
- package/apps/app-lifeops/src/dossier/action.js +87 -0
- package/apps/app-lifeops/src/dossier/service.d.ts +145 -0
- package/apps/app-lifeops/src/dossier/service.d.ts.map +1 -0
- package/apps/app-lifeops/src/dossier/service.js +346 -0
- package/apps/app-lifeops/src/followup/actions/listOverdueFollowups.d.ts +3 -0
- package/apps/app-lifeops/src/followup/actions/listOverdueFollowups.d.ts.map +1 -0
- package/apps/app-lifeops/src/followup/actions/listOverdueFollowups.js +47 -0
- package/apps/app-lifeops/src/followup/actions/markFollowupDone.d.ts +3 -0
- package/apps/app-lifeops/src/followup/actions/markFollowupDone.d.ts.map +1 -0
- package/apps/app-lifeops/src/followup/actions/markFollowupDone.js +172 -0
- package/apps/app-lifeops/src/followup/actions/setFollowupThreshold.d.ts +3 -0
- package/apps/app-lifeops/src/followup/actions/setFollowupThreshold.d.ts.map +1 -0
- package/apps/app-lifeops/src/followup/actions/setFollowupThreshold.js +171 -0
- package/apps/app-lifeops/src/followup/followup-tracker.d.ts +81 -0
- package/apps/app-lifeops/src/followup/followup-tracker.d.ts.map +1 -0
- package/apps/app-lifeops/src/followup/followup-tracker.js +251 -0
- package/apps/app-lifeops/src/followup/index.d.ts +5 -0
- package/apps/app-lifeops/src/followup/index.d.ts.map +1 -0
- package/apps/app-lifeops/src/followup/index.js +4 -0
- package/apps/app-lifeops/src/inbox/reflection.d.ts +0 -5
- package/apps/app-lifeops/src/inbox/reflection.d.ts.map +1 -1
- package/apps/app-lifeops/src/inbox/reflection.js +9 -51
- package/apps/app-lifeops/src/inbox/repository.d.ts +0 -1
- package/apps/app-lifeops/src/inbox/repository.d.ts.map +1 -1
- package/apps/app-lifeops/src/inbox/repository.js +18 -118
- package/apps/app-lifeops/src/inbox/triage-classifier.d.ts +4 -6
- package/apps/app-lifeops/src/inbox/triage-classifier.d.ts.map +1 -1
- package/apps/app-lifeops/src/inbox/triage-classifier.js +68 -101
- package/apps/app-lifeops/src/inbox/types.d.ts +4 -42
- package/apps/app-lifeops/src/inbox/types.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/approval-queue.types.d.ts +162 -0
- package/apps/app-lifeops/src/lifeops/approval-queue.types.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/approval-queue.types.js +41 -0
- package/apps/app-lifeops/src/lifeops/autofill-whitelist.d.ts +24 -0
- package/apps/app-lifeops/src/lifeops/autofill-whitelist.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/autofill-whitelist.js +125 -0
- package/apps/app-lifeops/src/lifeops/background-planner-dispatch.d.ts +59 -0
- package/apps/app-lifeops/src/lifeops/background-planner-dispatch.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/background-planner-dispatch.js +129 -0
- package/apps/app-lifeops/src/lifeops/background-planner.d.ts +141 -0
- package/apps/app-lifeops/src/lifeops/background-planner.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/background-planner.js +308 -0
- package/apps/app-lifeops/src/lifeops/browser-extension-store.d.ts +61 -0
- package/apps/app-lifeops/src/lifeops/browser-extension-store.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/browser-extension-store.js +181 -0
- package/apps/app-lifeops/src/lifeops/calendly-client.d.ts +61 -0
- package/apps/app-lifeops/src/lifeops/calendly-client.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/calendly-client.js +218 -0
- package/apps/app-lifeops/src/lifeops/checkin/checkin-service.d.ts +24 -0
- package/apps/app-lifeops/src/lifeops/checkin/checkin-service.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/checkin/checkin-service.js +216 -0
- package/apps/app-lifeops/src/lifeops/checkin/schedule-resolver.d.ts +14 -0
- package/apps/app-lifeops/src/lifeops/checkin/schedule-resolver.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/checkin/schedule-resolver.js +33 -0
- package/apps/app-lifeops/src/lifeops/checkin/types.d.ts +42 -0
- package/apps/app-lifeops/src/lifeops/checkin/types.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/checkin/types.js +7 -0
- package/apps/app-lifeops/src/lifeops/defaults.d.ts +1 -1
- package/apps/app-lifeops/src/lifeops/defaults.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/defaults.js +8 -1
- package/apps/app-lifeops/src/lifeops/discord-browser-scraper.d.ts +106 -0
- package/apps/app-lifeops/src/lifeops/discord-browser-scraper.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/discord-browser-scraper.js +488 -0
- package/apps/app-lifeops/src/lifeops/enforcement-windows.d.ts +34 -0
- package/apps/app-lifeops/src/lifeops/enforcement-windows.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/enforcement-windows.js +110 -0
- package/apps/app-lifeops/src/lifeops/google-connector-gateway.d.ts +13 -0
- package/apps/app-lifeops/src/lifeops/google-connector-gateway.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-connector-gateway.js +23 -0
- package/apps/app-lifeops/src/lifeops/google-drive.d.ts +103 -0
- package/apps/app-lifeops/src/lifeops/google-drive.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/google-drive.js +265 -0
- package/apps/app-lifeops/src/lifeops/google-fetch.d.ts +5 -0
- package/apps/app-lifeops/src/lifeops/google-fetch.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-fetch.js +12 -1
- package/apps/app-lifeops/src/lifeops/google-gmail.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-gmail.js +19 -34
- package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts +12 -1
- package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-managed-client.js +32 -12
- package/apps/app-lifeops/src/lifeops/google-oauth.d.ts +4 -0
- package/apps/app-lifeops/src/lifeops/google-oauth.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/google-oauth.js +99 -13
- package/apps/app-lifeops/src/lifeops/health-bridge.d.ts +57 -0
- package/apps/app-lifeops/src/lifeops/health-bridge.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/health-bridge.js +514 -0
- package/apps/app-lifeops/src/lifeops/imessage-bridge.d.ts +98 -0
- package/apps/app-lifeops/src/lifeops/imessage-bridge.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/imessage-bridge.js +537 -0
- package/apps/app-lifeops/src/lifeops/intent-sync.d.ts +56 -0
- package/apps/app-lifeops/src/lifeops/intent-sync.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/intent-sync.js +223 -0
- package/apps/app-lifeops/src/lifeops/notifications-push.d.ts +37 -0
- package/apps/app-lifeops/src/lifeops/notifications-push.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/notifications-push.js +90 -0
- package/apps/app-lifeops/src/lifeops/owner-profile.d.ts +29 -1
- package/apps/app-lifeops/src/lifeops/owner-profile.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/owner-profile.js +106 -0
- package/apps/app-lifeops/src/lifeops/password-manager-bridge.d.ts +49 -0
- package/apps/app-lifeops/src/lifeops/password-manager-bridge.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/password-manager-bridge.js +374 -0
- package/apps/app-lifeops/src/lifeops/remote-desktop.d.ts +37 -0
- package/apps/app-lifeops/src/lifeops/remote-desktop.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/remote-desktop.js +341 -0
- package/apps/app-lifeops/src/lifeops/repository.d.ts +69 -3
- package/apps/app-lifeops/src/lifeops/repository.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/repository.js +1368 -926
- package/apps/app-lifeops/src/lifeops/runtime.d.ts +1 -0
- package/apps/app-lifeops/src/lifeops/runtime.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/runtime.js +119 -9
- package/apps/app-lifeops/src/lifeops/schema.d.ts +5022 -0
- package/apps/app-lifeops/src/lifeops/schema.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/schema.js +207 -0
- package/apps/app-lifeops/src/lifeops/service-constants.d.ts +51 -0
- package/apps/app-lifeops/src/lifeops/service-constants.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-constants.js +111 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-browser.d.ts +40 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-browser.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-browser.js +288 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-misc.d.ts +68 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-misc.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-misc.js +493 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-occurrence.d.ts +17 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-occurrence.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-occurrence.js +214 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-reminder.d.ts +24 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-reminder.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-helpers-reminder.js +170 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-browser.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-browser.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-browser.js +769 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-calendar.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-calendar.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-calendar.js +513 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-core.d.ts +49 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-core.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-core.js +433 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-definitions.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-definitions.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-definitions.js +353 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-discord.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-discord.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-discord.js +603 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-dossier.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-dossier.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-dossier.js +262 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-drive.d.ts +12 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-drive.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-drive.js +230 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-gmail.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-gmail.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-gmail.js +1013 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-goals.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-goals.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-goals.js +714 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-google.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-google.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-google.js +793 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-health.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-health.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-health.js +55 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-imessage.d.ts +3 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-imessage.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-imessage.js +106 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-relationships.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-relationships.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-relationships.js +109 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-reminders.d.ts +37 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-reminders.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-reminders.js +2436 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-scheduling.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-scheduling.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-scheduling.js +149 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-screentime.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-screentime.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-screentime.js +97 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-signal.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-signal.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-signal.js +264 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-telegram.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-telegram.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-telegram.js +270 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-whatsapp.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-whatsapp.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-whatsapp.js +56 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-workflows.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-workflows.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-workflows.js +411 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-x-read.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-x-read.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-x-read.js +190 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-x.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-x.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-x.js +120 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-calendar.d.ts +42 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-calendar.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-calendar.js +294 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-connector.d.ts +18 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-connector.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-connector.js +317 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-gmail.d.ts +63 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-gmail.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-gmail.js +553 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-task.d.ts +8 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-task.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-normalize-task.js +333 -0
- package/apps/app-lifeops/src/lifeops/service-normalize.d.ts +27 -0
- package/apps/app-lifeops/src/lifeops/service-normalize.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-normalize.js +193 -0
- package/apps/app-lifeops/src/lifeops/service-types.d.ts +43 -0
- package/apps/app-lifeops/src/lifeops/service-types.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-types.js +8 -0
- package/apps/app-lifeops/src/lifeops/service.d.ts +1566 -272
- package/apps/app-lifeops/src/lifeops/service.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service.js +38 -9256
- package/apps/app-lifeops/src/lifeops/signal-auth.d.ts +26 -0
- package/apps/app-lifeops/src/lifeops/signal-auth.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/signal-auth.js +300 -0
- package/apps/app-lifeops/src/lifeops/signal-runtime-config.d.ts +13 -0
- package/apps/app-lifeops/src/lifeops/signal-runtime-config.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/signal-runtime-config.js +42 -0
- package/apps/app-lifeops/src/lifeops/sql.d.ts +0 -5
- package/apps/app-lifeops/src/lifeops/sql.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/sql.js +5 -125
- package/apps/app-lifeops/src/lifeops/telegram-auth.d.ts +62 -0
- package/apps/app-lifeops/src/lifeops/telegram-auth.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/telegram-auth.js +496 -0
- package/apps/app-lifeops/src/lifeops/telegram-local-client.d.ts +118 -0
- package/apps/app-lifeops/src/lifeops/telegram-local-client.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/telegram-local-client.js +376 -0
- package/apps/app-lifeops/src/lifeops/twilio.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/twilio.js +2 -1
- package/apps/app-lifeops/src/lifeops/unified-search.d.ts +88 -0
- package/apps/app-lifeops/src/lifeops/unified-search.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/unified-search.js +431 -0
- package/apps/app-lifeops/src/lifeops/whatsapp-client.d.ts +47 -0
- package/apps/app-lifeops/src/lifeops/whatsapp-client.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/whatsapp-client.js +198 -0
- package/apps/app-lifeops/src/lifeops/x-poster.d.ts +22 -0
- package/apps/app-lifeops/src/lifeops/x-poster.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/x-poster.js +67 -3
- package/apps/app-lifeops/src/lifeops/x-reader.d.ts +70 -0
- package/apps/app-lifeops/src/lifeops/x-reader.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/x-reader.js +260 -0
- package/apps/app-lifeops/src/plugin.d.ts +12 -1
- package/apps/app-lifeops/src/plugin.d.ts.map +1 -1
- package/apps/app-lifeops/src/plugin.js +245 -26
- package/apps/app-lifeops/src/provider.d.ts.map +1 -1
- package/apps/app-lifeops/src/provider.js +1 -0
- package/apps/app-lifeops/src/providers/activity-profile.d.ts.map +1 -0
- package/apps/app-lifeops/src/providers/activity-profile.js +140 -0
- package/apps/app-lifeops/src/providers/app-blocker.d.ts +3 -0
- package/apps/app-lifeops/src/providers/app-blocker.d.ts.map +1 -0
- package/apps/app-lifeops/src/providers/app-blocker.js +86 -0
- package/apps/app-lifeops/src/providers/cross-channel-context.d.ts +29 -0
- package/apps/app-lifeops/src/providers/cross-channel-context.d.ts.map +1 -0
- package/apps/app-lifeops/src/providers/cross-channel-context.js +193 -0
- package/apps/app-lifeops/src/providers/inbox-triage.d.ts.map +1 -1
- package/apps/app-lifeops/src/providers/inbox-triage.js +1 -0
- package/apps/app-lifeops/src/providers/lifeops.d.ts +1 -1
- package/apps/app-lifeops/src/providers/lifeops.d.ts.map +1 -1
- package/apps/app-lifeops/src/providers/lifeops.js +39 -11
- package/apps/app-lifeops/src/providers/website-blocker.d.ts +4 -0
- package/apps/app-lifeops/src/providers/website-blocker.d.ts.map +1 -0
- package/apps/app-lifeops/src/providers/website-blocker.js +117 -0
- package/apps/app-lifeops/src/remote/pairing-code.d.ts +39 -0
- package/apps/app-lifeops/src/remote/pairing-code.d.ts.map +1 -0
- package/apps/app-lifeops/src/remote/pairing-code.js +76 -0
- package/apps/app-lifeops/src/remote/remote-session-service.d.ts +107 -0
- package/apps/app-lifeops/src/remote/remote-session-service.d.ts.map +1 -0
- package/apps/app-lifeops/src/remote/remote-session-service.js +253 -0
- package/apps/app-lifeops/src/routes/lifeops-browser-packaging.d.ts.map +1 -1
- package/apps/app-lifeops/src/routes/lifeops-browser-packaging.js +9 -3
- package/apps/app-lifeops/src/routes/lifeops-routes.d.ts +1 -1
- package/apps/app-lifeops/src/routes/lifeops-routes.d.ts.map +1 -1
- package/apps/app-lifeops/src/routes/lifeops-routes.js +276 -40
- package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts.map +1 -1
- package/apps/app-lifeops/src/routes/website-blocker-routes.js +8 -13
- package/apps/app-lifeops/src/travel-time/action.d.ts +6 -0
- package/apps/app-lifeops/src/travel-time/action.d.ts.map +1 -0
- package/apps/app-lifeops/src/travel-time/action.js +81 -0
- package/apps/app-lifeops/src/travel-time/service.d.ts +61 -0
- package/apps/app-lifeops/src/travel-time/service.d.ts.map +1 -0
- package/apps/app-lifeops/src/travel-time/service.js +145 -0
- package/apps/app-lifeops/src/types/app-blocker-settings-card.d.ts +2 -0
- package/apps/app-lifeops/src/types/app-blocker-settings-card.d.ts.map +1 -0
- package/apps/app-lifeops/src/types/index.d.ts +3 -0
- package/apps/app-lifeops/src/types/index.d.ts.map +1 -0
- package/apps/app-lifeops/src/types/website-blocker-settings-card.d.ts +2 -0
- package/apps/app-lifeops/src/types/website-blocker-settings-card.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/access.d.ts +8 -0
- package/apps/app-lifeops/src/website-blocker/access.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/access.js +32 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.d.ts +3 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.js +212 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/listActiveBlocks.d.ts +3 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/listActiveBlocks.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/listActiveBlocks.js +57 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/releaseBlock.d.ts +3 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/releaseBlock.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/releaseBlock.js +98 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-reconciler.d.ts +7 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-reconciler.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-reconciler.js +111 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-schema.d.ts +39 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-schema.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-schema.js +123 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-service.d.ts +21 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-service.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/block-rule-service.js +227 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/index.d.ts +8 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/index.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/index.js +6 -0
- package/apps/app-lifeops/src/website-blocker/engine.d.ts +116 -0
- package/apps/app-lifeops/src/website-blocker/engine.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/engine.js +934 -0
- package/apps/app-lifeops/src/website-blocker/permissions.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/permissions.js +1 -0
- package/apps/app-lifeops/src/website-blocker/public.d.ts +13 -0
- package/apps/app-lifeops/src/website-blocker/public.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/public.js +10 -0
- package/apps/app-lifeops/src/website-blocker/roles.d.ts +13 -0
- package/apps/app-lifeops/src/website-blocker/roles.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/roles.js +20 -0
- package/apps/app-lifeops/src/website-blocker/service.d.ts +21 -0
- package/apps/app-lifeops/src/website-blocker/service.d.ts.map +1 -0
- package/apps/app-lifeops/src/website-blocker/service.js +268 -0
- package/apps/app-steward/src/api/tx-service.d.ts +47 -0
- package/apps/app-steward/src/api/tx-service.d.ts.map +1 -0
- package/apps/app-steward/src/api/tx-service.js +156 -0
- package/apps/app-steward/src/api/wallet-routes.d.ts +1 -9
- package/apps/app-steward/src/api/wallet-routes.d.ts.map +1 -1
- package/apps/app-steward/src/routes/wallet-export-guard.d.ts +2 -9
- package/apps/app-steward/src/routes/wallet-export-guard.d.ts.map +1 -1
- package/apps/app-steward/src/types/steward.d.ts +85 -0
- package/apps/app-steward/src/types/steward.d.ts.map +1 -0
- package/apps/app-steward/src/types/steward.js +9 -0
- package/apps/app-training/src/backends/atropos.d.ts +31 -0
- package/apps/app-training/src/backends/atropos.d.ts.map +1 -0
- package/apps/app-training/src/backends/atropos.js +63 -0
- package/apps/app-training/src/backends/native.d.ts +50 -0
- package/apps/app-training/src/backends/native.d.ts.map +1 -0
- package/apps/app-training/src/backends/native.js +128 -0
- package/apps/app-training/src/backends/tinker.d.ts +27 -0
- package/apps/app-training/src/backends/tinker.d.ts.map +1 -0
- package/apps/app-training/src/backends/tinker.js +56 -0
- package/apps/app-training/src/core/privacy-filter.d.ts +73 -0
- package/apps/app-training/src/core/privacy-filter.d.ts.map +1 -0
- package/apps/app-training/src/core/privacy-filter.js +169 -0
- package/apps/app-training/src/core/training-config.d.ts +52 -0
- package/apps/app-training/src/core/training-config.d.ts.map +1 -0
- package/apps/app-training/src/core/training-config.js +140 -0
- package/apps/app-training/src/core/training-orchestrator.d.ts +107 -0
- package/apps/app-training/src/core/training-orchestrator.d.ts.map +1 -0
- package/apps/app-training/src/core/training-orchestrator.js +409 -0
- package/apps/app-training/src/core/trajectory-task-datasets.d.ts +38 -0
- package/apps/app-training/src/core/trajectory-task-datasets.d.ts.map +1 -0
- package/apps/app-training/src/core/trajectory-task-datasets.js +281 -0
- package/apps/app-training/src/optimizers/bootstrap-fewshot.d.ts +42 -0
- package/apps/app-training/src/optimizers/bootstrap-fewshot.d.ts.map +1 -0
- package/apps/app-training/src/optimizers/bootstrap-fewshot.js +91 -0
- package/apps/app-training/src/optimizers/index.d.ts +6 -0
- package/apps/app-training/src/optimizers/index.d.ts.map +1 -0
- package/apps/app-training/src/optimizers/index.js +4 -0
- package/apps/app-training/src/optimizers/instruction-search.d.ts +39 -0
- package/apps/app-training/src/optimizers/instruction-search.d.ts.map +1 -0
- package/apps/app-training/src/optimizers/instruction-search.js +82 -0
- package/apps/app-training/src/optimizers/prompt-evolution.d.ts +39 -0
- package/apps/app-training/src/optimizers/prompt-evolution.d.ts.map +1 -0
- package/apps/app-training/src/optimizers/prompt-evolution.js +111 -0
- package/apps/app-training/src/optimizers/scoring.d.ts +63 -0
- package/apps/app-training/src/optimizers/scoring.d.ts.map +1 -0
- package/apps/app-training/src/optimizers/scoring.js +117 -0
- package/apps/app-training/src/optimizers/types.d.ts +105 -0
- package/apps/app-training/src/optimizers/types.d.ts.map +1 -0
- package/apps/app-training/src/optimizers/types.js +17 -0
- package/apps/app-training/src/services/index.d.ts +1 -0
- package/apps/app-training/src/services/index.d.ts.map +1 -1
- package/apps/app-training/src/services/index.js +1 -0
- package/apps/app-training/src/services/training-trigger.d.ts +166 -0
- package/apps/app-training/src/services/training-trigger.d.ts.map +1 -0
- package/apps/app-training/src/services/training-trigger.js +376 -0
- package/package.json +26 -21
- package/packages/agent/src/actions/app-control.js +1 -1
- package/packages/agent/src/actions/connector-resolver.d.ts.map +1 -1
- package/packages/agent/src/actions/connector-resolver.js +17 -7
- package/packages/agent/src/actions/context-signal-lexicon.d.ts +1 -1
- package/packages/agent/src/actions/context-signal-lexicon.d.ts.map +1 -1
- package/packages/agent/src/actions/context-signal-lexicon.js +7 -1
- package/packages/agent/src/actions/context-signal.d.ts +1 -1
- package/packages/agent/src/actions/context-signal.d.ts.map +1 -1
- package/packages/agent/src/actions/context-signal.js +1 -1
- package/packages/agent/src/actions/eject-plugin.d.ts.map +1 -1
- package/packages/agent/src/actions/eject-plugin.js +3 -1
- package/packages/agent/src/actions/entity-actions.d.ts +1 -0
- package/packages/agent/src/actions/entity-actions.d.ts.map +1 -1
- package/packages/agent/src/actions/entity-actions.js +233 -1
- package/packages/agent/src/actions/get-self-status.d.ts.map +1 -1
- package/packages/agent/src/actions/get-self-status.js +12 -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 +0 -9
- package/packages/agent/src/actions/index.d.ts.map +1 -1
- package/packages/agent/src/actions/index.js +0 -9
- package/packages/agent/src/actions/install-plugin.d.ts.map +1 -1
- package/packages/agent/src/actions/install-plugin.js +3 -1
- package/packages/agent/src/actions/list-ejected.d.ts.map +1 -1
- package/packages/agent/src/actions/list-ejected.js +5 -3
- package/packages/agent/src/actions/reinject-plugin.d.ts.map +1 -1
- package/packages/agent/src/actions/reinject-plugin.js +3 -1
- package/packages/agent/src/actions/set-user-name.d.ts.map +1 -1
- package/packages/agent/src/actions/set-user-name.js +1 -1
- package/packages/agent/src/actions/sync-plugin.d.ts.map +1 -1
- package/packages/agent/src/actions/sync-plugin.js +5 -6
- package/packages/agent/src/api/agent-admin-routes.js +1 -1
- package/packages/agent/src/api/apps-routes.d.ts +2 -1
- package/packages/agent/src/api/apps-routes.d.ts.map +1 -1
- package/packages/agent/src/api/apps-routes.js +152 -2
- package/packages/agent/src/api/auth-routes.js +1 -1
- package/packages/agent/src/api/bsc-trade.d.ts +0 -4
- package/packages/agent/src/api/bsc-trade.d.ts.map +1 -1
- package/packages/agent/src/api/bsc-trade.js +0 -4
- package/packages/agent/src/api/character-routes.d.ts +2 -1
- package/packages/agent/src/api/character-routes.d.ts.map +1 -1
- package/packages/agent/src/api/chat-augmentation.js +1 -1
- package/packages/agent/src/api/chat-routes.d.ts.map +1 -1
- package/packages/agent/src/api/chat-routes.js +23 -108
- package/packages/agent/src/api/cloud-billing-routes.d.ts +1 -1
- package/packages/agent/src/api/cloud-billing-routes.d.ts.map +1 -1
- package/packages/agent/src/api/cloud-compat-routes.d.ts +1 -1
- package/packages/agent/src/api/cloud-compat-routes.d.ts.map +1 -1
- package/packages/agent/src/api/connector-health.d.ts +1 -1
- package/packages/agent/src/api/connector-health.d.ts.map +1 -1
- package/packages/agent/src/api/conversation-routes.d.ts +2 -2
- package/packages/agent/src/api/conversation-routes.d.ts.map +1 -1
- package/packages/agent/src/api/conversation-routes.js +1 -1
- package/packages/agent/src/api/curated-skills-routes.d.ts +22 -0
- package/packages/agent/src/api/curated-skills-routes.d.ts.map +1 -0
- package/packages/agent/src/api/curated-skills-routes.js +300 -0
- package/packages/agent/src/api/database.d.ts.map +1 -1
- package/packages/agent/src/api/database.js +11 -4
- package/packages/agent/src/api/discord-profiles.d.ts.map +1 -1
- package/packages/agent/src/api/discord-profiles.js +1 -4
- package/packages/agent/src/api/index.d.ts +0 -7
- package/packages/agent/src/api/index.d.ts.map +1 -1
- package/packages/agent/src/api/index.js +0 -7
- package/packages/agent/src/api/knowledge-routes.d.ts +22 -1
- package/packages/agent/src/api/knowledge-routes.d.ts.map +1 -1
- package/packages/agent/src/api/knowledge-routes.js +956 -2
- package/packages/agent/src/api/lifeops-browser-packaging.d.ts +1 -1
- package/packages/agent/src/api/lifeops-browser-packaging.d.ts.map +1 -1
- package/packages/agent/src/api/lifeops-browser-packaging.js +1 -1
- package/packages/agent/src/api/misc-routes.d.ts +2 -2
- package/packages/agent/src/api/misc-routes.d.ts.map +1 -1
- package/packages/agent/src/api/misc-routes.js +43 -6
- package/packages/agent/src/api/plugin-discovery-helpers.d.ts.map +1 -1
- package/packages/agent/src/api/plugin-discovery-helpers.js +2 -2
- package/packages/agent/src/api/plugin-routes.d.ts +1 -1
- package/packages/agent/src/api/plugin-routes.d.ts.map +1 -1
- package/packages/agent/src/api/plugin-routes.js +11 -2
- 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/relationships-routes.d.ts.map +1 -1
- package/packages/agent/src/api/relationships-routes.js +70 -3
- package/packages/agent/src/api/server-auth.d.ts +2 -9
- package/packages/agent/src/api/server-auth.d.ts.map +1 -1
- package/packages/agent/src/api/server-auth.js +1 -1
- package/packages/agent/src/api/server-helpers-auth.d.ts +39 -0
- package/packages/agent/src/api/server-helpers-auth.d.ts.map +1 -0
- package/packages/agent/src/api/server-helpers-auth.js +432 -0
- package/packages/agent/src/api/server-helpers-config.d.ts +37 -0
- package/packages/agent/src/api/server-helpers-config.d.ts.map +1 -0
- package/packages/agent/src/api/server-helpers-config.js +295 -0
- package/packages/agent/src/api/server-helpers-mcp.d.ts +12 -0
- package/packages/agent/src/api/server-helpers-mcp.d.ts.map +1 -0
- package/packages/agent/src/api/server-helpers-mcp.js +315 -0
- package/packages/agent/src/api/server-helpers-plugin.d.ts +13 -0
- package/packages/agent/src/api/server-helpers-plugin.d.ts.map +1 -0
- package/packages/agent/src/api/server-helpers-plugin.js +158 -0
- package/packages/agent/src/api/server-helpers-swarm.d.ts +57 -0
- package/packages/agent/src/api/server-helpers-swarm.d.ts.map +1 -0
- package/packages/agent/src/api/server-helpers-swarm.js +325 -0
- package/packages/agent/src/api/server-helpers-wallet.d.ts +18 -0
- package/packages/agent/src/api/server-helpers-wallet.d.ts.map +1 -0
- package/packages/agent/src/api/server-helpers-wallet.js +178 -0
- package/packages/agent/src/api/server-helpers.d.ts.map +1 -1
- package/packages/agent/src/api/server-helpers.js +1 -1
- package/packages/agent/src/api/server-types.d.ts +42 -3
- package/packages/agent/src/api/server-types.d.ts.map +1 -1
- package/packages/agent/src/api/server.d.ts +10 -56
- package/packages/agent/src/api/server.d.ts.map +1 -1
- package/packages/agent/src/api/server.js +298 -1436
- package/packages/agent/src/api/signal-routes.d.ts +1 -1
- package/packages/agent/src/api/signal-routes.d.ts.map +1 -1
- package/packages/agent/src/api/signal-routes.js +1 -2
- package/packages/agent/src/api/skill-discovery-helpers.js +2 -0
- package/packages/agent/src/api/skills-routes.d.ts.map +1 -1
- package/packages/agent/src/api/skills-routes.js +69 -0
- package/packages/agent/src/api/static-file-server.js +1 -1
- package/packages/agent/src/api/stream-routes.d.ts +0 -19
- package/packages/agent/src/api/stream-routes.d.ts.map +1 -1
- package/packages/agent/src/api/trade-safety.d.ts +0 -4
- package/packages/agent/src/api/trade-safety.d.ts.map +1 -1
- package/packages/agent/src/api/trade-safety.js +0 -4
- package/packages/agent/src/api/trigger-routes.d.ts +37 -47
- package/packages/agent/src/api/trigger-routes.d.ts.map +1 -1
- package/packages/agent/src/api/trigger-routes.js +89 -18
- package/packages/agent/src/api/tts-routes.d.ts.map +1 -1
- package/packages/agent/src/api/tts-routes.js +1 -1
- package/packages/agent/src/api/tx-service.d.ts +0 -4
- package/packages/agent/src/api/tx-service.d.ts.map +1 -1
- package/packages/agent/src/api/tx-service.js +0 -4
- package/packages/agent/src/api/wallet-bsc-routes.d.ts +0 -4
- package/packages/agent/src/api/wallet-bsc-routes.d.ts.map +1 -1
- package/packages/agent/src/api/wallet-bsc-routes.js +0 -4
- package/packages/agent/src/api/wallet-capability.d.ts +0 -5
- package/packages/agent/src/api/wallet-capability.d.ts.map +1 -1
- package/packages/agent/src/api/wallet-capability.js +0 -5
- package/packages/agent/src/api/wallet-dex-prices.d.ts.map +1 -1
- package/packages/agent/src/api/wallet-dex-prices.js +0 -4
- package/packages/agent/src/api/wallet-env-sync.d.ts.map +1 -1
- package/packages/agent/src/api/wallet-env-sync.js +5 -1
- package/packages/agent/src/api/wallet-evm-balance.d.ts.map +1 -1
- package/packages/agent/src/api/wallet-evm-balance.js +0 -4
- package/packages/agent/src/api/wallet-routes.d.ts +1 -14
- package/packages/agent/src/api/wallet-routes.d.ts.map +1 -1
- package/packages/agent/src/api/wallet-routes.js +9 -15
- package/packages/agent/src/api/wallet-rpc.d.ts +0 -5
- package/packages/agent/src/api/wallet-rpc.d.ts.map +1 -1
- package/packages/agent/src/api/wallet-rpc.js +0 -5
- package/packages/agent/src/api/wallet-trade-routes.d.ts +0 -5
- package/packages/agent/src/api/wallet-trade-routes.d.ts.map +1 -1
- package/packages/agent/src/api/wallet-trade-routes.js +0 -5
- package/packages/agent/src/api/wallet-trading-profile.d.ts +2 -27
- package/packages/agent/src/api/wallet-trading-profile.d.ts.map +1 -1
- package/packages/agent/src/api/wallet-trading-profile.js +0 -5
- package/packages/agent/src/api/wallet.d.ts.map +1 -1
- package/packages/agent/src/api/wallet.js +0 -4
- package/packages/agent/src/api/whatsapp-routes.d.ts +1 -1
- package/packages/agent/src/api/whatsapp-routes.d.ts.map +1 -1
- package/packages/agent/src/api/whatsapp-routes.js +1 -2
- package/packages/agent/src/api/workbench-helpers.d.ts.map +1 -1
- package/packages/agent/src/api/workbench-helpers.js +2 -1
- package/packages/agent/src/api/workbench-routes.d.ts.map +1 -1
- package/packages/agent/src/api/workbench-routes.js +1 -1
- package/packages/agent/src/auth/anthropic.d.ts +0 -5
- package/packages/agent/src/auth/anthropic.d.ts.map +1 -1
- package/packages/agent/src/auth/anthropic.js +0 -5
- package/packages/agent/src/auth/openai-codex.d.ts +0 -5
- package/packages/agent/src/auth/openai-codex.d.ts.map +1 -1
- package/packages/agent/src/auth/openai-codex.js +0 -5
- package/packages/agent/src/cloud/cloud-wallet.d.ts +0 -2
- package/packages/agent/src/cloud/cloud-wallet.d.ts.map +1 -1
- package/packages/agent/src/config/env-vars.d.ts.map +1 -1
- package/packages/agent/src/config/env-vars.js +2 -0
- package/packages/agent/src/config/includes.js +1 -1
- package/packages/agent/src/config/index.d.ts +1 -1
- package/packages/agent/src/config/index.d.ts.map +1 -1
- package/packages/agent/src/config/index.js +1 -1
- package/packages/agent/src/config/plugin-auto-enable.d.ts +8 -0
- package/packages/agent/src/config/plugin-auto-enable.d.ts.map +1 -1
- package/packages/agent/src/config/plugin-auto-enable.js +28 -0
- package/packages/agent/src/config/types.agent-defaults.d.ts +2 -1
- package/packages/agent/src/config/types.agent-defaults.d.ts.map +1 -1
- package/packages/agent/src/config/types.eliza.d.ts +34 -0
- package/packages/agent/src/config/types.eliza.d.ts.map +1 -1
- package/packages/agent/src/contracts/index.d.ts +8 -8
- package/packages/agent/src/contracts/index.d.ts.map +1 -1
- package/packages/agent/src/contracts/index.js +8 -8
- package/packages/agent/src/contracts/onboarding-provider-defaults.d.ts +165 -0
- package/packages/agent/src/contracts/onboarding-provider-defaults.d.ts.map +1 -0
- package/packages/agent/src/contracts/onboarding-provider-defaults.js +189 -0
- package/packages/agent/src/index.d.ts +8 -6
- package/packages/agent/src/index.d.ts.map +1 -1
- package/packages/agent/src/index.js +8 -6
- package/packages/agent/src/providers/conversation-utils.d.ts.map +1 -1
- package/packages/agent/src/providers/conversation-utils.js +2 -3
- package/packages/agent/src/providers/index.d.ts +0 -1
- package/packages/agent/src/providers/index.d.ts.map +1 -1
- package/packages/agent/src/providers/index.js +0 -1
- package/packages/agent/src/providers/user-name.d.ts.map +1 -1
- package/packages/agent/src/providers/user-name.js +1 -1
- package/packages/agent/src/providers/workspace-provider.d.ts +0 -8
- package/packages/agent/src/providers/workspace-provider.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 +1 -47
- package/packages/agent/src/runtime/eliza.d.ts +1 -91
- package/packages/agent/src/runtime/eliza.d.ts.map +1 -1
- package/packages/agent/src/runtime/eliza.js +109 -12
- package/packages/agent/src/runtime/first-time-setup.d.ts +20 -0
- package/packages/agent/src/runtime/first-time-setup.d.ts.map +1 -1
- package/packages/agent/src/runtime/first-time-setup.js +20 -25
- package/packages/agent/src/runtime/index.d.ts +1 -1
- package/packages/agent/src/runtime/index.d.ts.map +1 -1
- package/packages/agent/src/runtime/index.js +1 -1
- package/packages/agent/src/runtime/plugin-collector.d.ts +0 -12
- package/packages/agent/src/runtime/plugin-collector.d.ts.map +1 -1
- package/packages/agent/src/runtime/plugin-lifecycle.d.ts.map +1 -1
- package/packages/agent/src/runtime/plugin-lifecycle.js +6 -2
- package/packages/agent/src/runtime/plugin-resolver.d.ts.map +1 -1
- package/packages/agent/src/runtime/plugin-resolver.js +6 -7
- package/packages/agent/src/runtime/plugin-types.d.ts +0 -6
- package/packages/agent/src/runtime/plugin-types.d.ts.map +1 -1
- package/packages/agent/src/runtime/roles/src/utils.d.ts +1 -1
- package/packages/agent/src/runtime/roles/src/utils.d.ts.map +1 -1
- package/packages/agent/src/runtime/roles/src/utils.js +1 -1
- package/packages/agent/src/runtime/subagent-output.d.ts +51 -0
- package/packages/agent/src/runtime/subagent-output.d.ts.map +1 -0
- package/packages/agent/src/runtime/subagent-output.js +173 -0
- package/packages/agent/src/runtime/task-heartbeat.d.ts +22 -0
- package/packages/agent/src/runtime/task-heartbeat.d.ts.map +1 -0
- package/packages/agent/src/runtime/task-heartbeat.js +84 -0
- package/packages/agent/src/runtime/trajectory-internals.d.ts +37 -30
- package/packages/agent/src/runtime/trajectory-internals.d.ts.map +1 -1
- package/packages/agent/src/runtime/trajectory-internals.js +73 -47
- package/packages/agent/src/runtime/trajectory-persistence.d.ts +1 -1
- package/packages/agent/src/runtime/trajectory-persistence.d.ts.map +1 -1
- package/packages/agent/src/runtime/trajectory-persistence.js +1 -1
- package/packages/agent/src/runtime/trajectory-storage.d.ts +27 -1
- package/packages/agent/src/runtime/trajectory-storage.d.ts.map +1 -1
- package/packages/agent/src/runtime/trajectory-storage.js +124 -1
- package/packages/agent/src/runtime/web-search-tools.d.ts.map +1 -1
- package/packages/agent/src/security/access.d.ts.map +1 -1
- package/packages/agent/src/security/access.js +6 -26
- package/packages/agent/src/security/audit-log.d.ts +0 -2
- package/packages/agent/src/security/audit-log.d.ts.map +1 -1
- package/packages/agent/src/security/index.d.ts +1 -0
- package/packages/agent/src/security/index.d.ts.map +1 -1
- package/packages/agent/src/security/index.js +1 -0
- package/packages/agent/src/services/app-manager.d.ts +53 -1
- package/packages/agent/src/services/app-manager.d.ts.map +1 -1
- package/packages/agent/src/services/app-manager.js +219 -15
- package/packages/agent/src/services/app-package-modules.d.ts +3 -12
- package/packages/agent/src/services/app-package-modules.d.ts.map +1 -1
- package/packages/agent/src/services/app-package-modules.js +78 -11
- package/packages/agent/src/services/browser-workspace-desktop.d.ts +22 -0
- package/packages/agent/src/services/browser-workspace-desktop.d.ts.map +1 -0
- package/packages/agent/src/services/browser-workspace-desktop.js +1379 -0
- package/packages/agent/src/services/browser-workspace-elements.d.ts +42 -0
- package/packages/agent/src/services/browser-workspace-elements.d.ts.map +1 -0
- package/packages/agent/src/services/browser-workspace-elements.js +508 -0
- package/packages/agent/src/services/browser-workspace-forms.d.ts +19 -0
- package/packages/agent/src/services/browser-workspace-forms.d.ts.map +1 -0
- package/packages/agent/src/services/browser-workspace-forms.js +244 -0
- package/packages/agent/src/services/browser-workspace-helpers.d.ts +20 -0
- package/packages/agent/src/services/browser-workspace-helpers.d.ts.map +1 -0
- package/packages/agent/src/services/browser-workspace-helpers.js +121 -0
- package/packages/agent/src/services/browser-workspace-jsdom.d.ts +16 -0
- package/packages/agent/src/services/browser-workspace-jsdom.d.ts.map +1 -0
- package/packages/agent/src/services/browser-workspace-jsdom.js +223 -0
- package/packages/agent/src/services/browser-workspace-network.d.ts +7 -0
- package/packages/agent/src/services/browser-workspace-network.d.ts.map +1 -0
- package/packages/agent/src/services/browser-workspace-network.js +137 -0
- package/packages/agent/src/services/browser-workspace-snapshots.d.ts +14 -0
- package/packages/agent/src/services/browser-workspace-snapshots.d.ts.map +1 -0
- package/packages/agent/src/services/browser-workspace-snapshots.js +144 -0
- package/packages/agent/src/services/browser-workspace-state.d.ts +22 -0
- package/packages/agent/src/services/browser-workspace-state.d.ts.map +1 -0
- package/packages/agent/src/services/browser-workspace-state.js +129 -0
- package/packages/agent/src/services/browser-workspace-types.d.ts +262 -0
- package/packages/agent/src/services/browser-workspace-types.d.ts.map +1 -0
- package/packages/agent/src/services/browser-workspace-types.js +1 -0
- package/packages/agent/src/services/browser-workspace-web.d.ts +8 -0
- package/packages/agent/src/services/browser-workspace-web.d.ts.map +1 -0
- package/packages/agent/src/services/browser-workspace-web.js +1141 -0
- package/packages/agent/src/services/browser-workspace.d.ts +22 -165
- package/packages/agent/src/services/browser-workspace.d.ts.map +1 -1
- package/packages/agent/src/services/browser-workspace.js +89 -4043
- package/packages/agent/src/services/built-in-app-routes/hyperscape.d.ts.map +1 -1
- package/packages/agent/src/services/built-in-app-routes/hyperscape.js +9 -6
- package/packages/agent/src/services/character-persistence.d.ts.map +1 -1
- package/packages/agent/src/services/character-persistence.js +1 -2
- package/packages/agent/src/services/client-chat-sender.d.ts.map +1 -1
- package/packages/agent/src/services/coding-task-executor.d.ts +2 -8
- package/packages/agent/src/services/coding-task-executor.d.ts.map +1 -1
- package/packages/agent/src/services/coding-task-executor.js +34 -66
- package/packages/agent/src/services/connector-setup-service.d.ts +4 -4
- package/packages/agent/src/services/connector-setup-service.d.ts.map +1 -1
- package/packages/agent/src/services/escalation.d.ts.map +1 -1
- package/packages/agent/src/services/escalation.js +1 -1
- package/packages/agent/src/services/plugin-manager-types.d.ts +1 -0
- package/packages/agent/src/services/plugin-manager-types.d.ts.map +1 -1
- package/packages/agent/src/services/privy-wallets.d.ts +0 -5
- package/packages/agent/src/services/privy-wallets.d.ts.map +1 -1
- package/packages/agent/src/services/privy-wallets.js +0 -5
- package/packages/agent/src/services/registry-client-app-meta.d.ts.map +1 -1
- package/packages/agent/src/services/registry-client-app-meta.js +1 -0
- package/packages/agent/src/services/registry-client-local.d.ts.map +1 -1
- package/packages/agent/src/services/registry-client-local.js +1 -0
- package/packages/agent/src/services/registry-client-network.d.ts.map +1 -1
- package/packages/agent/src/services/registry-client-network.js +1 -0
- package/packages/agent/src/services/registry-client-queries.d.ts +11 -0
- package/packages/agent/src/services/registry-client-queries.d.ts.map +1 -1
- package/packages/agent/src/services/registry-client-queries.js +23 -0
- package/packages/agent/src/services/registry-client-types.d.ts +8 -32
- package/packages/agent/src/services/registry-client-types.d.ts.map +1 -1
- package/packages/agent/src/services/relationships-graph.d.ts +62 -1
- package/packages/agent/src/services/relationships-graph.d.ts.map +1 -1
- package/packages/agent/src/services/relationships-graph.js +116 -6
- package/packages/agent/src/services/signal-pairing.d.ts.map +1 -1
- package/packages/agent/src/services/signal-pairing.js +15 -1
- package/packages/agent/src/services/steward-evm-account.d.ts +0 -4
- package/packages/agent/src/services/steward-evm-account.d.ts.map +1 -1
- package/packages/agent/src/services/steward-evm-account.js +0 -4
- package/packages/agent/src/services/steward-evm-bridge.d.ts +0 -4
- package/packages/agent/src/services/steward-evm-bridge.d.ts.map +1 -1
- package/packages/agent/src/services/steward-evm-bridge.js +0 -4
- package/packages/agent/src/services/steward-wallet.d.ts +1 -6
- package/packages/agent/src/services/steward-wallet.d.ts.map +1 -1
- package/packages/agent/src/services/steward-wallet.js +0 -5
- package/packages/agent/src/services/tts-stream-bridge.d.ts.map +1 -1
- package/packages/agent/src/services/tts-stream-bridge.js +1 -1
- package/packages/agent/src/test-support/route-test-helpers.d.ts +2 -2
- package/packages/agent/src/test-support/route-test-helpers.d.ts.map +1 -1
- package/packages/agent/src/test-support/test-helpers.d.ts +2 -2
- package/packages/agent/src/test-support/test-helpers.d.ts.map +1 -1
- package/packages/agent/src/triggers/runtime.d.ts +1 -0
- package/packages/agent/src/triggers/runtime.d.ts.map +1 -1
- package/packages/agent/src/triggers/runtime.js +67 -16
- package/packages/agent/src/triggers/scheduling.d.ts +6 -1
- package/packages/agent/src/triggers/scheduling.d.ts.map +1 -1
- package/packages/agent/src/triggers/scheduling.js +66 -20
- package/packages/agent/src/triggers/types.d.ts +14 -37
- package/packages/agent/src/triggers/types.d.ts.map +1 -1
- package/packages/agent/src/triggers/types.js +1 -1
- package/packages/agent/src/types/trajectory.d.ts +42 -1
- package/packages/agent/src/types/trajectory.d.ts.map +1 -1
- package/packages/agent/src/types/trajectory.js +2 -1
- package/packages/agent/src/utils/index.d.ts +1 -1
- package/packages/agent/src/utils/index.d.ts.map +1 -1
- package/packages/agent/src/utils/index.js +1 -1
- package/packages/app-core/src/api/client-types-cloud.d.ts +799 -0
- package/packages/app-core/src/api/client-types-cloud.d.ts.map +1 -0
- package/packages/app-core/src/api/client-types-cloud.js +57 -0
- package/packages/app-core/src/api/client-types-core.d.ts +334 -0
- package/packages/app-core/src/api/client-types-core.d.ts.map +1 -0
- package/packages/app-core/src/api/client-types-core.js +22 -0
- package/packages/app-core/src/api/compat-route-shared.d.ts +2 -2
- package/packages/app-core/src/api/compat-route-shared.d.ts.map +1 -1
- package/packages/app-core/src/api/server-cloud-tts.js +1 -1
- package/packages/app-core/src/bridge/native-plugins.d.ts +290 -0
- package/packages/app-core/src/bridge/native-plugins.d.ts.map +1 -0
- package/packages/app-core/src/bridge/native-plugins.js +55 -0
- package/packages/app-core/src/config/boot-config-store.d.ts +121 -2
- package/packages/app-core/src/config/boot-config-store.d.ts.map +1 -1
- package/packages/app-core/src/config/boot-config-store.js +16 -7
- package/packages/app-core/src/services/plugin-installer.d.ts +93 -0
- package/packages/app-core/src/services/plugin-installer.d.ts.map +1 -0
- package/packages/app-core/src/services/plugin-installer.js +611 -0
- package/packages/app-core/src/utils/env.d.ts.map +1 -1
- package/packages/app-core/src/utils/serialise.d.ts +12 -0
- package/packages/app-core/src/utils/serialise.d.ts.map +1 -0
- package/packages/app-core/src/utils/serialise.js +21 -0
- package/packages/native-plugins/activity-tracker/src/index.d.ts +35 -0
- package/packages/native-plugins/activity-tracker/src/index.d.ts.map +1 -0
- package/packages/native-plugins/activity-tracker/src/index.js +102 -0
- package/packages/shared/src/connectors.d.ts.map +1 -1
- package/packages/shared/src/connectors.js +8 -3
- package/packages/shared/src/contracts/apps.d.ts +53 -0
- package/packages/shared/src/contracts/apps.d.ts.map +1 -1
- package/packages/shared/src/contracts/cloud-topology.d.ts.map +1 -1
- package/packages/shared/src/contracts/cloud-topology.js +2 -4
- package/packages/shared/src/contracts/config.d.ts.map +1 -1
- package/packages/shared/src/contracts/index.d.ts +1 -1
- package/packages/shared/src/contracts/index.d.ts.map +1 -1
- package/packages/shared/src/contracts/index.js +1 -1
- package/packages/shared/src/contracts/lifeops-extensions.d.ts +181 -0
- package/packages/shared/src/contracts/lifeops-extensions.d.ts.map +1 -0
- package/packages/shared/src/contracts/lifeops-extensions.js +30 -0
- package/packages/shared/src/contracts/lifeops.d.ts +259 -0
- package/packages/shared/src/contracts/lifeops.d.ts.map +1 -1
- package/packages/shared/src/contracts/lifeops.js +62 -0
- package/packages/shared/src/contracts/onboarding.d.ts +5 -0
- package/packages/shared/src/contracts/onboarding.d.ts.map +1 -1
- package/packages/shared/src/contracts/onboarding.js +7 -6
- package/packages/shared/src/contracts/service-routing.d.ts.map +1 -1
- package/packages/shared/src/contracts/service-routing.js +1 -3
- package/packages/shared/src/contracts/wallet.d.ts +30 -103
- package/packages/shared/src/contracts/wallet.d.ts.map +1 -1
- package/packages/shared/src/env-utils.impl.d.ts.map +1 -1
- package/packages/shared/src/env-utils.impl.js +1 -8
- package/packages/shared/src/i18n/keyword-matching.d.ts.map +1 -1
- package/packages/shared/src/i18n/validation-keywords.d.ts +1 -1
- package/packages/shared/src/i18n/validation-keywords.d.ts.map +1 -1
- package/packages/shared/src/i18n/validation-keywords.js +1 -1
- package/packages/shared/src/index.d.ts +3 -3
- package/packages/shared/src/index.d.ts.map +1 -1
- package/packages/shared/src/index.js +3 -3
- package/packages/shared/src/onboarding-presets.characters.d.ts.map +1 -1
- package/packages/shared/src/onboarding-presets.characters.js +15 -5
- package/packages/shared/src/onboarding-presets.d.ts.map +1 -1
- package/packages/shared/src/onboarding-presets.js +5 -1
- package/packages/shared/src/runtime-env.d.ts.map +1 -1
- package/packages/shared/src/runtime-env.js +2 -7
- package/packages/shared/src/settings-debug.d.ts.map +1 -1
- package/packages/shared/src/settings-debug.js +1 -3
- package/packages/skills/src/formatter.d.ts +44 -0
- package/packages/skills/src/formatter.d.ts.map +1 -0
- package/packages/skills/src/formatter.js +181 -0
- package/packages/skills/src/frontmatter.d.ts +51 -0
- package/packages/skills/src/frontmatter.d.ts.map +1 -0
- package/packages/skills/src/frontmatter.js +155 -0
- package/packages/skills/src/index.d.ts +29 -0
- package/packages/skills/src/index.d.ts.map +1 -0
- package/packages/skills/src/index.js +31 -0
- package/packages/skills/src/loader.d.ts +33 -0
- package/packages/skills/src/loader.d.ts.map +1 -0
- package/packages/skills/src/loader.js +369 -0
- package/packages/skills/src/resolver.d.ts +35 -0
- package/packages/skills/src/resolver.d.ts.map +1 -0
- package/packages/skills/src/resolver.js +146 -0
- package/packages/skills/src/types.d.ts +238 -0
- package/packages/skills/src/types.d.ts.map +1 -0
- package/packages/skills/src/types.js +1 -0
- package/packages/typescript/src/action-docs.d.ts.map +1 -1
- package/packages/typescript/src/action-docs.js +2 -0
- package/packages/typescript/src/actions.d.ts.map +1 -1
- package/packages/typescript/src/actions.js +8 -3
- package/packages/typescript/src/database/inMemoryAdapter.js +1 -1
- package/packages/typescript/src/features/advanced-capabilities/evaluators/factRefinement.d.ts +20 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/factRefinement.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/factRefinement.js +362 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/index.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/index.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/evaluators/index.js +3 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/reflection.js +1 -1
- package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.js +21 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/skillExtraction.d.ts +25 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/skillExtraction.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/skillExtraction.js +367 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/skillRefinement.d.ts +21 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/skillRefinement.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/skillRefinement.js +545 -0
- package/packages/typescript/src/features/advanced-capabilities/form/service.d.ts +1 -5
- package/packages/typescript/src/features/advanced-capabilities/form/service.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/form/service.js +1 -13
- package/packages/typescript/src/features/advanced-capabilities/form/types.d.ts +3 -2
- package/packages/typescript/src/features/advanced-capabilities/form/types.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/providers/facts.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/providers/facts.js +68 -14
- package/packages/typescript/src/features/advanced-memory/services/memory-service.d.ts +1 -0
- package/packages/typescript/src/features/advanced-memory/services/memory-service.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-memory/services/memory-service.js +31 -11
- package/packages/typescript/src/features/autonomy/execution-facade.d.ts +1 -1
- package/packages/typescript/src/features/autonomy/execution-facade.d.ts.map +1 -1
- package/packages/typescript/src/features/autonomy/execution-facade.js +3 -3
- package/packages/typescript/src/features/basic-capabilities/actions/none.js +1 -1
- package/packages/typescript/src/features/basic-capabilities/index.d.ts.map +1 -1
- package/packages/typescript/src/features/basic-capabilities/index.js +9 -3
- package/packages/typescript/src/features/plugin-manager/coreExtensions.d.ts +4 -11
- package/packages/typescript/src/features/plugin-manager/coreExtensions.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/coreExtensions.js +0 -23
- package/packages/typescript/src/features/plugin-manager/index.d.ts +1 -1
- package/packages/typescript/src/features/plugin-manager/index.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/index.js +1 -1
- package/packages/typescript/src/features/plugin-manager/providers/relevance.d.ts.map +1 -1
- package/packages/typescript/src/features/plugin-manager/providers/relevance.js +1 -3
- package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts +13 -0
- package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts.map +1 -1
- package/packages/typescript/src/features/trajectories/TrajectoriesService.js +12 -9
- package/packages/typescript/src/features/trajectories/integration.d.ts +1 -1
- package/packages/typescript/src/features/trajectories/integration.d.ts.map +1 -1
- package/packages/typescript/src/features/trajectories/types.d.ts +19 -1
- package/packages/typescript/src/features/trajectories/types.d.ts.map +1 -1
- package/packages/typescript/src/features/trust/index.d.ts +3 -52
- package/packages/typescript/src/features/trust/index.d.ts.map +1 -1
- package/packages/typescript/src/features/trust/index.js +5 -122
- package/packages/typescript/src/features/trust/services/wrappers.d.ts +56 -0
- package/packages/typescript/src/features/trust/services/wrappers.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/services/wrappers.js +124 -0
- package/packages/typescript/src/generated/action-docs.d.ts +207 -3
- package/packages/typescript/src/generated/action-docs.d.ts.map +1 -1
- package/packages/typescript/src/generated/action-docs.js +271 -2
- package/packages/typescript/src/index.node.d.ts +3 -0
- package/packages/typescript/src/index.node.d.ts.map +1 -1
- package/packages/typescript/src/index.node.js +6 -0
- package/packages/typescript/src/optimization/ab-analysis.d.ts +1 -1
- package/packages/typescript/src/optimization/ab-analysis.d.ts.map +1 -1
- package/packages/typescript/src/optimization/ab-analysis.js +1 -1
- package/packages/typescript/src/optimization-root-dir.d.ts +6 -1
- package/packages/typescript/src/optimization-root-dir.d.ts.map +1 -1
- package/packages/typescript/src/optimization-root-dir.js +6 -1
- package/packages/typescript/src/prompts.d.ts +2 -2
- package/packages/typescript/src/prompts.d.ts.map +1 -1
- package/packages/typescript/src/prompts.js +4 -1
- package/packages/typescript/src/runtime.d.ts +3 -0
- package/packages/typescript/src/runtime.d.ts.map +1 -1
- package/packages/typescript/src/runtime.js +20 -5
- package/packages/typescript/src/schemas/character.d.ts +1 -1
- package/packages/typescript/src/schemas/character.d.ts.map +1 -1
- package/packages/typescript/src/schemas/character.js +1 -1
- package/packages/typescript/src/schemas/entity-identity.d.ts +29 -0
- package/packages/typescript/src/schemas/entity-identity.d.ts.map +1 -0
- package/packages/typescript/src/schemas/entity-identity.js +334 -0
- package/packages/typescript/src/schemas/index.d.ts +3 -1
- package/packages/typescript/src/schemas/index.d.ts.map +1 -1
- package/packages/typescript/src/schemas/index.js +2 -1
- package/packages/typescript/src/search.d.ts +0 -22
- package/packages/typescript/src/search.d.ts.map +1 -1
- package/packages/typescript/src/services/message.d.ts +11 -0
- package/packages/typescript/src/services/message.d.ts.map +1 -1
- package/packages/typescript/src/services/message.js +63 -36
- package/packages/typescript/src/services/optimized-prompt-resolver.d.ts +23 -0
- package/packages/typescript/src/services/optimized-prompt-resolver.d.ts.map +1 -0
- package/packages/typescript/src/services/optimized-prompt-resolver.js +50 -0
- package/packages/typescript/src/services/optimized-prompt.d.ts +117 -0
- package/packages/typescript/src/services/optimized-prompt.d.ts.map +1 -0
- package/packages/typescript/src/services/optimized-prompt.js +262 -0
- package/packages/typescript/src/services/relationships.d.ts +225 -0
- package/packages/typescript/src/services/relationships.d.ts.map +1 -1
- package/packages/typescript/src/services/relationships.js +979 -3
- package/packages/typescript/src/services/trajectories.d.ts +9 -0
- package/packages/typescript/src/services/trajectories.d.ts.map +1 -1
- package/packages/typescript/src/trajectory-context.d.ts +7 -0
- package/packages/typescript/src/trajectory-context.d.ts.map +1 -1
- package/packages/typescript/src/trajectory-utils.d.ts +24 -0
- package/packages/typescript/src/trajectory-utils.d.ts.map +1 -1
- package/packages/typescript/src/trajectory-utils.js +19 -0
- package/packages/typescript/src/types/components.d.ts +6 -0
- package/packages/typescript/src/types/components.d.ts.map +1 -1
- package/packages/typescript/src/types/plugin.d.ts +11 -0
- package/packages/typescript/src/types/plugin.d.ts.map +1 -1
- package/packages/typescript/src/types/runtime.d.ts +12 -0
- package/packages/typescript/src/types/runtime.d.ts.map +1 -1
- package/packages/typescript/src/types/service.d.ts +2 -0
- package/packages/typescript/src/types/service.d.ts.map +1 -1
- package/packages/typescript/src/types/service.js +1 -0
- package/packages/typescript/src/types/trigger.d.ts +4 -0
- package/packages/typescript/src/types/trigger.d.ts.map +1 -1
- package/packages/typescript/src/utils/batch-queue/batch-processor.d.ts +2 -3
- package/packages/typescript/src/utils/batch-queue/batch-processor.d.ts.map +1 -1
- package/packages/typescript/src/utils/batch-queue/batch-processor.js +0 -3
- package/packages/typescript/src/utils/crypto-compat.js +1 -1
- package/packages/typescript/src/utils/union-find.d.ts +30 -0
- package/packages/typescript/src/utils/union-find.d.ts.map +1 -0
- package/packages/typescript/src/utils/union-find.js +81 -0
- package/packages/typescript/src/utils.d.ts +1 -0
- package/packages/typescript/src/utils.d.ts.map +1 -1
- package/packages/typescript/src/utils.js +5 -1
- package/apps/app-lifeops/src/actions/inbox-digest.d.ts +0 -2
- package/apps/app-lifeops/src/actions/inbox-digest.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/inbox-digest.js +0 -1
- package/apps/app-lifeops/src/actions/inbox-respond.d.ts +0 -2
- package/apps/app-lifeops/src/actions/inbox-respond.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/inbox-respond.js +0 -1
- package/apps/app-lifeops/src/actions/inbox-triage.d.ts +0 -2
- package/apps/app-lifeops/src/actions/inbox-triage.d.ts.map +0 -1
- package/apps/app-lifeops/src/actions/inbox-triage.js +0 -1
- package/apps/app-lifeops/src/lifeops/index.d.ts +0 -25
- package/apps/app-lifeops/src/lifeops/index.d.ts.map +0 -1
- package/apps/app-lifeops/src/lifeops/index.js +0 -24
- package/apps/app-lifeops/src/selfcontrol/access.d.ts +0 -8
- package/apps/app-lifeops/src/selfcontrol/access.d.ts.map +0 -1
- package/apps/app-lifeops/src/selfcontrol/access.js +0 -16
- package/apps/app-lifeops/src/selfcontrol/action.d.ts +0 -10
- package/apps/app-lifeops/src/selfcontrol/action.d.ts.map +0 -1
- package/apps/app-lifeops/src/selfcontrol/action.js +0 -506
- package/apps/app-lifeops/src/selfcontrol/index.d.ts +0 -13
- package/apps/app-lifeops/src/selfcontrol/index.d.ts.map +0 -1
- package/apps/app-lifeops/src/selfcontrol/index.js +0 -10
- package/apps/app-lifeops/src/selfcontrol/permissions.d.ts.map +0 -1
- package/apps/app-lifeops/src/selfcontrol/provider.d.ts +0 -4
- package/apps/app-lifeops/src/selfcontrol/provider.d.ts.map +0 -1
- package/apps/app-lifeops/src/selfcontrol/provider.js +0 -116
- package/apps/app-lifeops/src/selfcontrol/roles.d.ts +0 -19
- package/apps/app-lifeops/src/selfcontrol/roles.d.ts.map +0 -1
- package/apps/app-lifeops/src/selfcontrol/roles.js +0 -41
- package/apps/app-lifeops/src/selfcontrol/selfcontrol.d.ts +0 -97
- package/apps/app-lifeops/src/selfcontrol/selfcontrol.d.ts.map +0 -1
- package/apps/app-lifeops/src/selfcontrol/selfcontrol.js +0 -949
- package/apps/app-lifeops/src/selfcontrol/service.d.ts +0 -21
- package/apps/app-lifeops/src/selfcontrol/service.d.ts.map +0 -1
- package/apps/app-lifeops/src/selfcontrol/service.js +0 -268
- package/packages/agent/src/actions/calendar.d.ts +0 -2
- package/packages/agent/src/actions/calendar.d.ts.map +0 -1
- package/packages/agent/src/actions/calendar.js +0 -1
- package/packages/agent/src/actions/check-balance.d.ts +0 -17
- package/packages/agent/src/actions/check-balance.d.ts.map +0 -1
- package/packages/agent/src/actions/check-balance.js +0 -167
- package/packages/agent/src/actions/execute-trade.d.ts +0 -17
- package/packages/agent/src/actions/execute-trade.d.ts.map +0 -1
- package/packages/agent/src/actions/execute-trade.js +0 -299
- package/packages/agent/src/actions/gmail.d.ts +0 -2
- package/packages/agent/src/actions/gmail.d.ts.map +0 -1
- package/packages/agent/src/actions/gmail.js +0 -1
- package/packages/agent/src/actions/inbox-digest.d.ts +0 -2
- package/packages/agent/src/actions/inbox-digest.d.ts.map +0 -1
- package/packages/agent/src/actions/inbox-digest.js +0 -1
- package/packages/agent/src/actions/inbox-respond.d.ts +0 -2
- package/packages/agent/src/actions/inbox-respond.d.ts.map +0 -1
- package/packages/agent/src/actions/inbox-respond.js +0 -1
- package/packages/agent/src/actions/inbox-triage.d.ts +0 -2
- package/packages/agent/src/actions/inbox-triage.d.ts.map +0 -1
- package/packages/agent/src/actions/inbox-triage.js +0 -1
- package/packages/agent/src/actions/inbox.d.ts +0 -2
- package/packages/agent/src/actions/inbox.d.ts.map +0 -1
- package/packages/agent/src/actions/inbox.js +0 -1
- package/packages/agent/src/actions/life-goal-extractor.d.ts +0 -2
- package/packages/agent/src/actions/life-goal-extractor.d.ts.map +0 -1
- package/packages/agent/src/actions/life-goal-extractor.js +0 -1
- package/packages/agent/src/actions/life-param-extractor.d.ts +0 -2
- package/packages/agent/src/actions/life-param-extractor.d.ts.map +0 -1
- package/packages/agent/src/actions/life-param-extractor.js +0 -1
- package/packages/agent/src/actions/life-recent-context.d.ts +0 -2
- package/packages/agent/src/actions/life-recent-context.d.ts.map +0 -1
- package/packages/agent/src/actions/life-recent-context.js +0 -1
- package/packages/agent/src/actions/life-update-extractor.d.ts +0 -2
- package/packages/agent/src/actions/life-update-extractor.d.ts.map +0 -1
- package/packages/agent/src/actions/life-update-extractor.js +0 -1
- package/packages/agent/src/actions/life.d.ts +0 -2
- package/packages/agent/src/actions/life.d.ts.map +0 -1
- package/packages/agent/src/actions/life.extractor.d.ts +0 -2
- package/packages/agent/src/actions/life.extractor.d.ts.map +0 -1
- package/packages/agent/src/actions/life.extractor.js +0 -1
- package/packages/agent/src/actions/life.js +0 -1
- package/packages/agent/src/actions/lifeops-extraction-config.d.ts +0 -2
- package/packages/agent/src/actions/lifeops-extraction-config.d.ts.map +0 -1
- package/packages/agent/src/actions/lifeops-extraction-config.js +0 -1
- package/packages/agent/src/actions/lifeops-google-helpers.d.ts +0 -2
- package/packages/agent/src/actions/lifeops-google-helpers.d.ts.map +0 -1
- package/packages/agent/src/actions/lifeops-google-helpers.js +0 -1
- package/packages/agent/src/actions/timezone-normalization.d.ts +0 -2
- package/packages/agent/src/actions/timezone-normalization.d.ts.map +0 -1
- package/packages/agent/src/actions/timezone-normalization.js +0 -1
- package/packages/agent/src/actions/transfer-token.d.ts +0 -17
- package/packages/agent/src/actions/transfer-token.d.ts.map +0 -1
- package/packages/agent/src/actions/transfer-token.js +0 -470
- package/packages/agent/src/actions/update-owner-profile.d.ts +0 -2
- package/packages/agent/src/actions/update-owner-profile.d.ts.map +0 -1
- package/packages/agent/src/actions/update-owner-profile.js +0 -1
- package/packages/agent/src/actions/wallet-action-shared.d.ts +0 -15
- package/packages/agent/src/actions/wallet-action-shared.d.ts.map +0 -1
- package/packages/agent/src/actions/wallet-action-shared.js +0 -24
- package/packages/agent/src/activity-profile/analyzer.d.ts.map +0 -1
- package/packages/agent/src/activity-profile/analyzer.js +0 -531
- package/packages/agent/src/activity-profile/proactive-planner.d.ts.map +0 -1
- package/packages/agent/src/activity-profile/proactive-planner.js +0 -455
- package/packages/agent/src/activity-profile/proactive-worker.d.ts.map +0 -1
- package/packages/agent/src/activity-profile/proactive-worker.js +0 -523
- package/packages/agent/src/activity-profile/profile-metadata.d.ts.map +0 -1
- package/packages/agent/src/activity-profile/service.d.ts +0 -11
- package/packages/agent/src/activity-profile/service.d.ts.map +0 -1
- package/packages/agent/src/activity-profile/service.js +0 -226
- package/packages/agent/src/activity-profile/types.d.ts.map +0 -1
- package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts +0 -2
- package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts.map +0 -1
- package/packages/agent/src/api/coding-agents-auth-sanitize.js +0 -1
- package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts +0 -2
- package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts.map +0 -1
- package/packages/agent/src/api/coding-agents-preflight-normalize.js +0 -1
- package/packages/agent/src/api/coordinator-types.d.ts +0 -2
- package/packages/agent/src/api/coordinator-types.d.ts.map +0 -1
- package/packages/agent/src/api/coordinator-types.js +0 -1
- package/packages/agent/src/api/coordinator-wiring.d.ts +0 -2
- package/packages/agent/src/api/coordinator-wiring.d.ts.map +0 -1
- package/packages/agent/src/api/coordinator-wiring.js +0 -1
- package/packages/agent/src/api/drop-routes.d.ts +0 -22
- package/packages/agent/src/api/drop-routes.d.ts.map +0 -1
- package/packages/agent/src/api/drop-service.d.ts +0 -26
- package/packages/agent/src/api/drop-service.d.ts.map +0 -1
- package/packages/agent/src/api/lifeops-routes.d.ts +0 -2
- package/packages/agent/src/api/lifeops-routes.d.ts.map +0 -1
- package/packages/agent/src/api/lifeops-routes.js +0 -1
- package/packages/agent/src/api/merkle-tree.d.ts.map +0 -1
- package/packages/agent/src/api/nft-verify.d.ts +0 -16
- package/packages/agent/src/api/nft-verify.d.ts.map +0 -1
- package/packages/agent/src/api/nft-verify.js +0 -81
- package/packages/agent/src/api/og-tracker.d.ts.map +0 -1
- package/packages/agent/src/api/og-tracker.js +0 -60
- package/packages/agent/src/api/task-agent-message-routing.d.ts +0 -2
- package/packages/agent/src/api/task-agent-message-routing.d.ts.map +0 -1
- package/packages/agent/src/api/task-agent-message-routing.js +0 -1
- package/packages/agent/src/api/twitter-verify.d.ts +0 -25
- package/packages/agent/src/api/twitter-verify.d.ts.map +0 -1
- package/packages/agent/src/api/twitter-verify.js +0 -168
- package/packages/agent/src/api/website-blocker-routes.d.ts +0 -2
- package/packages/agent/src/api/website-blocker-routes.d.ts.map +0 -1
- package/packages/agent/src/api/website-blocker-routes.js +0 -1
- package/packages/agent/src/config/runtime-env.d.ts +0 -2
- package/packages/agent/src/config/runtime-env.d.ts.map +0 -1
- package/packages/agent/src/config/runtime-env.js +0 -1
- package/packages/agent/src/evals/coordinator-eval-client.d.ts +0 -2
- package/packages/agent/src/evals/coordinator-eval-client.d.ts.map +0 -1
- package/packages/agent/src/evals/coordinator-eval-client.js +0 -1
- package/packages/agent/src/evals/coordinator-live-runner.d.ts +0 -2
- package/packages/agent/src/evals/coordinator-live-runner.d.ts.map +0 -1
- package/packages/agent/src/evals/coordinator-live-runner.js +0 -1
- package/packages/agent/src/evals/coordinator-preflight.d.ts +0 -2
- package/packages/agent/src/evals/coordinator-preflight.d.ts.map +0 -1
- package/packages/agent/src/evals/coordinator-preflight.js +0 -1
- package/packages/agent/src/evals/coordinator-scenarios.d.ts +0 -2
- package/packages/agent/src/evals/coordinator-scenarios.d.ts.map +0 -1
- package/packages/agent/src/evals/coordinator-scenarios.js +0 -1
- package/packages/agent/src/lifeops/app-state.d.ts +0 -2
- package/packages/agent/src/lifeops/app-state.d.ts.map +0 -1
- package/packages/agent/src/lifeops/app-state.js +0 -1
- package/packages/agent/src/lifeops/apple-reminders.d.ts +0 -2
- package/packages/agent/src/lifeops/apple-reminders.d.ts.map +0 -1
- package/packages/agent/src/lifeops/apple-reminders.js +0 -1
- package/packages/agent/src/lifeops/defaults.d.ts +0 -2
- package/packages/agent/src/lifeops/defaults.d.ts.map +0 -1
- package/packages/agent/src/lifeops/defaults.js +0 -1
- package/packages/agent/src/lifeops/engine.d.ts +0 -2
- package/packages/agent/src/lifeops/engine.d.ts.map +0 -1
- package/packages/agent/src/lifeops/engine.js +0 -1
- package/packages/agent/src/lifeops/goal-grounding.d.ts +0 -2
- package/packages/agent/src/lifeops/goal-grounding.d.ts.map +0 -1
- package/packages/agent/src/lifeops/goal-grounding.js +0 -1
- package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts +0 -2
- package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts.map +0 -1
- package/packages/agent/src/lifeops/goal-semantic-evaluator.js +0 -1
- package/packages/agent/src/lifeops/google-api-error.d.ts +0 -2
- package/packages/agent/src/lifeops/google-api-error.d.ts.map +0 -1
- package/packages/agent/src/lifeops/google-api-error.js +0 -1
- package/packages/agent/src/lifeops/google-calendar.d.ts +0 -2
- package/packages/agent/src/lifeops/google-calendar.d.ts.map +0 -1
- package/packages/agent/src/lifeops/google-calendar.js +0 -1
- package/packages/agent/src/lifeops/google-connector-gateway.d.ts +0 -2
- package/packages/agent/src/lifeops/google-connector-gateway.d.ts.map +0 -1
- package/packages/agent/src/lifeops/google-connector-gateway.js +0 -1
- package/packages/agent/src/lifeops/google-fetch.d.ts +0 -2
- package/packages/agent/src/lifeops/google-fetch.d.ts.map +0 -1
- package/packages/agent/src/lifeops/google-fetch.js +0 -1
- package/packages/agent/src/lifeops/google-gmail.d.ts +0 -2
- package/packages/agent/src/lifeops/google-gmail.d.ts.map +0 -1
- package/packages/agent/src/lifeops/google-gmail.js +0 -1
- package/packages/agent/src/lifeops/google-managed-client.d.ts +0 -2
- package/packages/agent/src/lifeops/google-managed-client.d.ts.map +0 -1
- package/packages/agent/src/lifeops/google-managed-client.js +0 -1
- package/packages/agent/src/lifeops/google-oauth.d.ts +0 -2
- package/packages/agent/src/lifeops/google-oauth.d.ts.map +0 -1
- package/packages/agent/src/lifeops/google-oauth.js +0 -1
- package/packages/agent/src/lifeops/google-scopes.d.ts +0 -2
- package/packages/agent/src/lifeops/google-scopes.d.ts.map +0 -1
- package/packages/agent/src/lifeops/google-scopes.js +0 -1
- package/packages/agent/src/lifeops/index.d.ts +0 -2
- package/packages/agent/src/lifeops/index.d.ts.map +0 -1
- package/packages/agent/src/lifeops/index.js +0 -1
- package/packages/agent/src/lifeops/owner-profile.d.ts +0 -2
- package/packages/agent/src/lifeops/owner-profile.d.ts.map +0 -1
- package/packages/agent/src/lifeops/owner-profile.js +0 -1
- package/packages/agent/src/lifeops/repository.d.ts +0 -2
- package/packages/agent/src/lifeops/repository.d.ts.map +0 -1
- package/packages/agent/src/lifeops/repository.js +0 -1
- package/packages/agent/src/lifeops/runtime.d.ts +0 -2
- package/packages/agent/src/lifeops/runtime.d.ts.map +0 -1
- package/packages/agent/src/lifeops/runtime.js +0 -1
- package/packages/agent/src/lifeops/screen-context.d.ts +0 -2
- package/packages/agent/src/lifeops/screen-context.d.ts.map +0 -1
- package/packages/agent/src/lifeops/screen-context.js +0 -1
- package/packages/agent/src/lifeops/seed-routines.d.ts +0 -2
- package/packages/agent/src/lifeops/seed-routines.d.ts.map +0 -1
- package/packages/agent/src/lifeops/seed-routines.js +0 -1
- package/packages/agent/src/lifeops/service.d.ts +0 -2
- package/packages/agent/src/lifeops/service.d.ts.map +0 -1
- package/packages/agent/src/lifeops/service.js +0 -1
- package/packages/agent/src/lifeops/sql.d.ts +0 -2
- package/packages/agent/src/lifeops/sql.d.ts.map +0 -1
- package/packages/agent/src/lifeops/sql.js +0 -1
- package/packages/agent/src/lifeops/time.d.ts +0 -2
- package/packages/agent/src/lifeops/time.d.ts.map +0 -1
- package/packages/agent/src/lifeops/time.js +0 -1
- package/packages/agent/src/lifeops/twilio.d.ts +0 -2
- package/packages/agent/src/lifeops/twilio.d.ts.map +0 -1
- package/packages/agent/src/lifeops/twilio.js +0 -1
- package/packages/agent/src/lifeops/x-poster.d.ts +0 -2
- package/packages/agent/src/lifeops/x-poster.d.ts.map +0 -1
- package/packages/agent/src/lifeops/x-poster.js +0 -1
- package/packages/agent/src/providers/activity-profile.d.ts.map +0 -1
- package/packages/agent/src/providers/activity-profile.js +0 -140
- package/packages/agent/src/providers/inbox-triage.d.ts +0 -2
- package/packages/agent/src/providers/inbox-triage.d.ts.map +0 -1
- package/packages/agent/src/providers/inbox-triage.js +0 -1
- package/packages/agent/src/providers/lifeops.d.ts +0 -2
- package/packages/agent/src/providers/lifeops.d.ts.map +0 -1
- package/packages/agent/src/providers/lifeops.js +0 -1
- package/packages/agent/src/utils/spoken-text.d.ts +0 -2
- package/packages/agent/src/utils/spoken-text.d.ts.map +0 -1
- package/packages/agent/src/utils/spoken-text.js +0 -1
- package/packages/app-core/src/config/config.d.ts +0 -12
- package/packages/app-core/src/config/config.d.ts.map +0 -1
- package/packages/app-core/src/config/config.js +0 -23
- package/packages/app-core/src/types/index.d.ts +0 -649
- package/packages/app-core/src/types/index.d.ts.map +0 -1
- package/packages/app-core/src/types/lifeops-ui.d.ts +0 -10
- package/packages/app-core/src/types/lifeops-ui.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.d.ts +0 -4
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.js +0 -150
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.d.ts +0 -4
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.js +0 -136
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.d.ts +0 -4
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.js +0 -84
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.d.ts +0 -4
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.js +0 -107
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.d.ts +0 -16
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.js +0 -187
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.d.ts +0 -4
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.js +0 -138
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts +0 -4
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.js +0 -96
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.d.ts +0 -4
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.js +0 -139
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.d.ts +0 -4
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.js +0 -138
- package/packages/typescript/src/advanced-capabilities/clipboard/index.d.ts +0 -39
- package/packages/typescript/src/advanced-capabilities/clipboard/index.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/index.js +0 -78
- package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.d.ts +0 -4
- package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.js +0 -62
- package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.d.ts +0 -16
- package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.js +0 -162
- package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.d.ts +0 -65
- package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.js +0 -352
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts +0 -24
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.js +0 -63
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.d.ts +0 -29
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.js +0 -195
- package/packages/typescript/src/advanced-capabilities/clipboard/specs.d.ts +0 -15
- package/packages/typescript/src/advanced-capabilities/clipboard/specs.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/specs.js +0 -164
- package/packages/typescript/src/advanced-capabilities/clipboard/types.d.ts +0 -92
- package/packages/typescript/src/advanced-capabilities/clipboard/types.d.ts.map +0 -1
- package/packages/typescript/src/advanced-capabilities/clipboard/types.js +0 -4
- package/packages/typescript/src/index.d.ts +0 -12
- package/packages/typescript/src/index.d.ts.map +0 -1
- package/packages/typescript/src/index.js +0 -13
- /package/{packages/agent/src/api → apps/app-elizamaker/src}/drop-routes.js +0 -0
- /package/{packages/agent/src/api → apps/app-elizamaker/src}/drop-service.js +0 -0
- /package/{packages/agent/src/api → apps/app-elizamaker/src}/merkle-tree.d.ts +0 -0
- /package/{packages/agent/src/api → apps/app-elizamaker/src}/merkle-tree.js +0 -0
- /package/{packages/agent/src/api → apps/app-elizamaker/src}/og-tracker.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/activity-profile/analyzer.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/activity-profile/proactive-planner.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/activity-profile/proactive-worker.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/activity-profile/profile-metadata.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/activity-profile/profile-metadata.js +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/activity-profile/types.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/activity-profile/types.js +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/providers/activity-profile.d.ts +0 -0
- /package/apps/app-lifeops/src/{selfcontrol/permissions.js → types/app-blocker-settings-card.js} +0 -0
- /package/{packages/app-core → apps/app-lifeops}/src/types/index.js +0 -0
- /package/{packages/app-core/src/types/lifeops-ui.js → apps/app-lifeops/src/types/website-blocker-settings-card.js} +0 -0
- /package/apps/app-lifeops/src/{selfcontrol → website-blocker}/permissions.d.ts +0 -0
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import { ModelType, parseJSONObjectFromText, parseKeyValueXml, } from "@elizaos/core";
|
|
2
|
-
import { getValidationKeywordTerms, textIncludesKeywordTerm, } from "@elizaos/shared/validation-keywords";
|
|
3
2
|
import { resolveDefaultTimeZone } from "../lifeops/defaults.js";
|
|
4
3
|
import { LifeOpsService, LifeOpsServiceError } from "../lifeops/service.js";
|
|
5
4
|
import { addDaysToLocalDate, buildUtcDateFromLocalParts, getWeekdayForLocalDate, getZonedDateParts, } from "../lifeops/time.js";
|
|
6
|
-
import { collectKeywordTermMatchesForKey, hasContextSignalSyncForKey, } from "@elizaos/agent/actions/context-signal";
|
|
7
5
|
import { renderGroundedActionReply } from "@elizaos/agent/actions/grounded-action-reply";
|
|
8
6
|
import { calendarReadUnavailableMessage, calendarWriteUnavailableMessage, detailArray, detailBoolean, detailNumber, detailString, formatCalendarEventDateTime, formatCalendarFeed, formatNextEventContext, getGoogleCapabilityStatus, hasLifeOpsAccess, INTERNAL_URL, messageText, toActionData, } from "./lifeops-google-helpers.js";
|
|
7
|
+
const CALENDAR_SUBACTION_VALUES = [
|
|
8
|
+
"feed",
|
|
9
|
+
"next_event",
|
|
10
|
+
"search_events",
|
|
11
|
+
"create_event",
|
|
12
|
+
"update_event",
|
|
13
|
+
"delete_event",
|
|
14
|
+
"trip_window",
|
|
15
|
+
];
|
|
9
16
|
const MIN_CREATE_EVENT_DURATION_MINUTES = 15;
|
|
10
|
-
const CALENDAR_VALIDATION_CONTEXT_LIMIT = 12;
|
|
11
17
|
const PARAMETER_DOC_NOISE_PATTERN = /\b(?:actions?|params?|parameters?|query\?:string|subaction\?:string|details\?:object|required parameter|supported keys include|may include:|match against titles|structured calendar arguments|structured data when needed|boolean when)\b|\b\w+\?:\w+\b/i;
|
|
12
|
-
const CAL_I18N_OPTS = { includeAllLocales: true };
|
|
13
|
-
const CAL_AFFIRMATIVE_TERMS = getValidationKeywordTerms("contextSignal.affirmative.strong", CAL_I18N_OPTS);
|
|
14
|
-
const CAL_TEMPORAL_FOLLOWUP_TERMS = getValidationKeywordTerms("contextSignal.temporal_followup.strong", CAL_I18N_OPTS);
|
|
15
|
-
const CAL_LIFEOPS_STRONG_TERMS = getValidationKeywordTerms("contextSignal.lifeops.strong", CAL_I18N_OPTS);
|
|
16
|
-
const CAL_CALENDAR_STRONG_TERMS = getValidationKeywordTerms("contextSignal.calendar.strong", CAL_I18N_OPTS);
|
|
17
|
-
const CAL_CALENDAR_WEAK_TERMS = getValidationKeywordTerms("contextSignal.calendar.weak", CAL_I18N_OPTS);
|
|
18
|
-
function textMatchesAnyCal(text, terms) {
|
|
19
|
-
return terms.some((term) => textIncludesKeywordTerm(text, term));
|
|
20
|
-
}
|
|
21
18
|
const I18N_LOCALES = ["en", "zh-CN", "ko", "es", "pt", "vi", "tl"];
|
|
22
19
|
function buildIntlMonthMap() {
|
|
23
20
|
const map = {};
|
|
@@ -100,6 +97,86 @@ function normalizeCalendarSubaction(value) {
|
|
|
100
97
|
return null;
|
|
101
98
|
}
|
|
102
99
|
}
|
|
100
|
+
function buildCalendarPlanFromParsed(parsed) {
|
|
101
|
+
const shouldAct = normalizeShouldAct(parsed.shouldAct);
|
|
102
|
+
if (shouldAct === null) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
const subaction = normalizeCalendarSubaction(parsed.subaction);
|
|
106
|
+
if (shouldAct && subaction === null) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
const tripLocation = typeof parsed.tripLocation === "string" &&
|
|
110
|
+
parsed.tripLocation.trim().length > 0
|
|
111
|
+
? parsed.tripLocation.trim()
|
|
112
|
+
: undefined;
|
|
113
|
+
const rawQueries = [];
|
|
114
|
+
if (typeof parsed.queries === "string" && parsed.queries.trim().length > 0) {
|
|
115
|
+
for (const q of parsed.queries.split(/\s*\|\|\s*/)) {
|
|
116
|
+
if (q.trim().length > 0)
|
|
117
|
+
rawQueries.push(q.trim());
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else if (Array.isArray(parsed.queries)) {
|
|
121
|
+
for (const value of parsed.queries) {
|
|
122
|
+
if (typeof value === "string")
|
|
123
|
+
rawQueries.push(value);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (typeof parsed.query === "string")
|
|
127
|
+
rawQueries.push(parsed.query);
|
|
128
|
+
if (typeof parsed.query1 === "string")
|
|
129
|
+
rawQueries.push(parsed.query1);
|
|
130
|
+
if (typeof parsed.query2 === "string")
|
|
131
|
+
rawQueries.push(parsed.query2);
|
|
132
|
+
if (typeof parsed.query3 === "string")
|
|
133
|
+
rawQueries.push(parsed.query3);
|
|
134
|
+
if (tripLocation)
|
|
135
|
+
rawQueries.push(tripLocation);
|
|
136
|
+
return {
|
|
137
|
+
subaction,
|
|
138
|
+
queries: dedupeCalendarQueries(rawQueries),
|
|
139
|
+
response: normalizePlannerResponse(parsed.response),
|
|
140
|
+
shouldAct,
|
|
141
|
+
title: typeof parsed.title === "string" && parsed.title.trim().length > 0
|
|
142
|
+
? parsed.title.trim()
|
|
143
|
+
: undefined,
|
|
144
|
+
tripLocation,
|
|
145
|
+
timeMin: normalizeIsoDateTime(parsed.timeMin),
|
|
146
|
+
timeMax: normalizeIsoDateTime(parsed.timeMax),
|
|
147
|
+
windowLabel: normalizeWindowLabel(parsed.windowLabel ?? parsed.label),
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function buildCalendarPlanRepairPrompt(args) {
|
|
151
|
+
return [
|
|
152
|
+
"Your last reply for the calendar planner was invalid or used the wrong schema.",
|
|
153
|
+
"Return ONLY valid JSON with exactly these fields:",
|
|
154
|
+
" subaction: one of the allowed subactions below, or null when this should be reply-only/no-op",
|
|
155
|
+
" shouldAct: boolean",
|
|
156
|
+
" response: short natural-language reply when shouldAct is false, otherwise empty or null",
|
|
157
|
+
" queries: array or ||-delimited string of up to 3 search queries",
|
|
158
|
+
" title: optional event title",
|
|
159
|
+
" tripLocation: optional trip location",
|
|
160
|
+
" timeMin: optional ISO 8601 datetime",
|
|
161
|
+
" timeMax: optional ISO 8601 datetime",
|
|
162
|
+
" windowLabel: optional natural-language window label",
|
|
163
|
+
"",
|
|
164
|
+
"Use ONLY these exact subaction literals:",
|
|
165
|
+
` ${CALENDAR_SUBACTION_VALUES.join(", ")}, or null`,
|
|
166
|
+
"Never invent synonyms such as edit_event, modify_event, reschedule_event, move_event, cancel_event, remove_event, agenda, or itinerary_window.",
|
|
167
|
+
"Map rename/reschedule/move/edit requests for an existing event to update_event.",
|
|
168
|
+
"Map delete/remove/cancel requests for an existing event to delete_event.",
|
|
169
|
+
"The user may speak in any language.",
|
|
170
|
+
"",
|
|
171
|
+
`Current timezone: ${args.timeZone}`,
|
|
172
|
+
`Current local datetime: ${args.localNow}`,
|
|
173
|
+
`Current ISO datetime: ${args.nowIso}`,
|
|
174
|
+
`Current request: ${JSON.stringify(args.currentMessage)}`,
|
|
175
|
+
`Resolved intent: ${JSON.stringify(args.intent)}`,
|
|
176
|
+
`Recent conversation: ${JSON.stringify(args.recentConversation)}`,
|
|
177
|
+
`Previous invalid output: ${JSON.stringify(args.rawResponse)}`,
|
|
178
|
+
].join("\n");
|
|
179
|
+
}
|
|
103
180
|
function normalizeShouldAct(value) {
|
|
104
181
|
if (typeof value === "boolean") {
|
|
105
182
|
return value;
|
|
@@ -140,18 +217,6 @@ function buildCalendarReplyOnlyFallback(subaction) {
|
|
|
140
217
|
return "What do you want to do on your calendar — check your schedule, find an event, or create one?";
|
|
141
218
|
}
|
|
142
219
|
}
|
|
143
|
-
function looksLikeLifeReminderRequestForCalendarAction(text) {
|
|
144
|
-
const normalized = normalizeText(text);
|
|
145
|
-
if (!normalized) {
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
if (collectKeywordTermMatchesForKey([normalized], "calendar", {
|
|
149
|
-
includeAllLocales: true,
|
|
150
|
-
}).size > 0) {
|
|
151
|
-
return false;
|
|
152
|
-
}
|
|
153
|
-
return textMatchesAnyCal(normalized, CAL_LIFEOPS_STRONG_TERMS);
|
|
154
|
-
}
|
|
155
220
|
function buildCalendarServiceErrorFallback(error, intent) {
|
|
156
221
|
const normalized = normalizeText(error.message);
|
|
157
222
|
if (normalized.includes("utc 'z' suffix") ||
|
|
@@ -189,27 +254,6 @@ function buildCalendarEventDisambiguationFallback(args) {
|
|
|
189
254
|
`Tell me which one to ${args.action} by giving the title and date/time.${suffix}`,
|
|
190
255
|
].join("\n");
|
|
191
256
|
}
|
|
192
|
-
function shouldDeleteAllMatchingCalendarEvents(args) {
|
|
193
|
-
const normalizedIntent = normalizeText(args.intent);
|
|
194
|
-
const normalizedTitleHint = normalizeText(args.titleHint ?? "");
|
|
195
|
-
const titleStartsWithQuantifier = /^(all|both|every|each)\b/.test(normalizedTitleHint);
|
|
196
|
-
if (/\b(?:remove|delete|cancel|kill|drop)\b\s+(?:the\s+)?(?:duplicates?|copies)\b/.test(normalizedIntent)) {
|
|
197
|
-
return true;
|
|
198
|
-
}
|
|
199
|
-
const quantifierMatch = normalizedIntent.match(/\b(?:remove|delete|cancel|kill|drop)\b\s+(both|all|every|each)\b/);
|
|
200
|
-
if (!quantifierMatch) {
|
|
201
|
-
return false;
|
|
202
|
-
}
|
|
203
|
-
if (titleStartsWithQuantifier) {
|
|
204
|
-
return false;
|
|
205
|
-
}
|
|
206
|
-
const quantifier = quantifierMatch[1];
|
|
207
|
-
if (quantifier === "both" && args.candidateCount !== 2) {
|
|
208
|
-
return false;
|
|
209
|
-
}
|
|
210
|
-
const trailingIntent = normalizedIntent.slice((quantifierMatch.index ?? 0) + quantifierMatch[0].length);
|
|
211
|
-
return /\b(?:matching|events?|meetings?|appointments?|invites?|entries|duplicates?|copies)\b/.test(trailingIntent);
|
|
212
|
-
}
|
|
213
257
|
async function renderCalendarActionReply(args) {
|
|
214
258
|
const { runtime, message, state, intent, scenario, fallback, context } = args;
|
|
215
259
|
return renderGroundedActionReply({
|
|
@@ -237,21 +281,6 @@ function normalizeText(value) {
|
|
|
237
281
|
function normalizeLookupKey(value) {
|
|
238
282
|
return value.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
239
283
|
}
|
|
240
|
-
function hasCalendarTextSignal(text) {
|
|
241
|
-
if (!text.trim()) {
|
|
242
|
-
return false;
|
|
243
|
-
}
|
|
244
|
-
if (collectKeywordTermMatchesForKey([text], "calendar", {
|
|
245
|
-
includeAllLocales: true,
|
|
246
|
-
strength: "strong",
|
|
247
|
-
}).size > 0) {
|
|
248
|
-
return true;
|
|
249
|
-
}
|
|
250
|
-
return (collectKeywordTermMatchesForKey([text], "calendar", {
|
|
251
|
-
includeAllLocales: true,
|
|
252
|
-
strength: "weak",
|
|
253
|
-
}).size >= 2);
|
|
254
|
-
}
|
|
255
284
|
function wordCount(value) {
|
|
256
285
|
const normalized = normalizeText(value);
|
|
257
286
|
if (!normalized) {
|
|
@@ -296,12 +325,6 @@ function normalizeCalendarSearchQueryValue(value) {
|
|
|
296
325
|
const cleaned = normalizeText(value)
|
|
297
326
|
.replace(/\b(?:actions?|params?|parameters?)\b[:;]*/g, "")
|
|
298
327
|
.replace(/\b\w+\?:\w+(?:\s+\[[^\]]+\])?\s*-\s*/g, " ")
|
|
299
|
-
.replace(/\b(?:search|find|look(?:ing)? for|show me|check)\s+(?:my\s+)?(?:calendar|schedule)\s+for\b/g, "")
|
|
300
|
-
.replace(/\b(?:search|find|look(?:ing)? for|show me|check)\b/g, "")
|
|
301
|
-
.replace(/\b(?:on|in) my calendar\b/g, "")
|
|
302
|
-
.replace(/\b(?:today|tomorrow|tonight|this week(?:end)?|next week(?:end)?|week after(?: next)?|this month|next month|this year|next year)\b/g, "")
|
|
303
|
-
.replace(/\b(?:scheduled|coming up|happening|for me)\b/g, "")
|
|
304
|
-
.replace(/\b(?:events?|appointments?|meetings?)\b$/g, "")
|
|
305
328
|
.replace(/\bsupported keys include\b.*$/g, "")
|
|
306
329
|
.replace(/\bmatch against titles\b.*$/g, "")
|
|
307
330
|
.replace(/\bstructured calendar arguments\b.*$/g, "")
|
|
@@ -310,7 +333,7 @@ function normalizeCalendarSearchQueryValue(value) {
|
|
|
310
333
|
.trim();
|
|
311
334
|
if (!cleaned ||
|
|
312
335
|
["calendar", "schedule", "event", "events"].includes(cleaned) ||
|
|
313
|
-
|
|
336
|
+
cleaned.length > 160 ||
|
|
314
337
|
PARAMETER_DOC_NOISE_PATTERN.test(cleaned)) {
|
|
315
338
|
return undefined;
|
|
316
339
|
}
|
|
@@ -349,57 +372,30 @@ function parseStateLine(line) {
|
|
|
349
372
|
const trimmed = line.trim();
|
|
350
373
|
const timestampedMatch = trimmed.match(/^\d{1,2}:\d{2}\s+\([^)]+\)\s+\[[^\]]+\]\s+(\S+)\s*:\s*(.*)/);
|
|
351
374
|
if (timestampedMatch) {
|
|
375
|
+
const role = timestampedMatch[1];
|
|
376
|
+
const text = timestampedMatch[2];
|
|
377
|
+
if (!role || text === undefined) {
|
|
378
|
+
return { role: "", text: trimmed };
|
|
379
|
+
}
|
|
352
380
|
return {
|
|
353
|
-
role:
|
|
354
|
-
text:
|
|
381
|
+
role: role.toLowerCase(),
|
|
382
|
+
text: text.trim(),
|
|
355
383
|
};
|
|
356
384
|
}
|
|
357
385
|
const simpleMatch = trimmed.match(/^(user|assistant|system|owner|admin|\S+)\s*:\s*(.*)/i);
|
|
358
386
|
if (simpleMatch) {
|
|
387
|
+
const role = simpleMatch[1];
|
|
388
|
+
const text = simpleMatch[2];
|
|
389
|
+
if (!role || text === undefined) {
|
|
390
|
+
return { role: "", text: trimmed };
|
|
391
|
+
}
|
|
359
392
|
return {
|
|
360
|
-
role:
|
|
361
|
-
text:
|
|
393
|
+
role: role.toLowerCase(),
|
|
394
|
+
text: text.trim(),
|
|
362
395
|
};
|
|
363
396
|
}
|
|
364
397
|
return { role: "", text: trimmed };
|
|
365
398
|
}
|
|
366
|
-
const SYSTEM_ROLE_NAMES = new Set(["assistant", "system"]);
|
|
367
|
-
function splitStateTextCandidates(value) {
|
|
368
|
-
return value
|
|
369
|
-
.split(/\n+/)
|
|
370
|
-
.map((line) => parseStateLine(line).text)
|
|
371
|
-
.filter((text) => text.length > 0);
|
|
372
|
-
}
|
|
373
|
-
function userIntentsFromState(state) {
|
|
374
|
-
if (!state || typeof state !== "object") {
|
|
375
|
-
return [];
|
|
376
|
-
}
|
|
377
|
-
const stateRecord = state;
|
|
378
|
-
const values = stateRecord.values && typeof stateRecord.values === "object"
|
|
379
|
-
? stateRecord.values
|
|
380
|
-
: undefined;
|
|
381
|
-
const raw = typeof values?.recentMessages === "string"
|
|
382
|
-
? values.recentMessages
|
|
383
|
-
: typeof stateRecord.text === "string"
|
|
384
|
-
? stateRecord.text
|
|
385
|
-
: "";
|
|
386
|
-
if (!raw) {
|
|
387
|
-
return [];
|
|
388
|
-
}
|
|
389
|
-
const agentName = typeof values?.agentName === "string" ? values.agentName.toLowerCase() : "";
|
|
390
|
-
const excludedRoles = new Set(SYSTEM_ROLE_NAMES);
|
|
391
|
-
if (agentName) {
|
|
392
|
-
excludedRoles.add(agentName);
|
|
393
|
-
}
|
|
394
|
-
return raw
|
|
395
|
-
.split(/\n+/)
|
|
396
|
-
.filter((line) => {
|
|
397
|
-
const { role } = parseStateLine(line);
|
|
398
|
-
return role.length > 0 && !excludedRoles.has(role);
|
|
399
|
-
})
|
|
400
|
-
.map((line) => parseStateLine(line).text)
|
|
401
|
-
.filter((text) => text.length > 0);
|
|
402
|
-
}
|
|
403
399
|
function planningConversationLines(state) {
|
|
404
400
|
if (!state || typeof state !== "object") {
|
|
405
401
|
return [];
|
|
@@ -422,243 +418,36 @@ function planningConversationLines(state) {
|
|
|
422
418
|
.filter((line) => line.role.length > 0 && line.text.length > 0)
|
|
423
419
|
.map((line) => `${line.role}: ${line.text}`);
|
|
424
420
|
}
|
|
425
|
-
function
|
|
426
|
-
return
|
|
427
|
-
contextLimit: CALENDAR_VALIDATION_CONTEXT_LIMIT,
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
function stateTextCandidates(state) {
|
|
431
|
-
if (!state || typeof state !== "object") {
|
|
432
|
-
return [];
|
|
433
|
-
}
|
|
434
|
-
const stateRecord = state;
|
|
435
|
-
const values = stateRecord.values && typeof stateRecord.values === "object"
|
|
436
|
-
? stateRecord.values
|
|
437
|
-
: undefined;
|
|
438
|
-
const candidates = [];
|
|
439
|
-
const pushText = (value) => {
|
|
440
|
-
if (typeof value === "string" && value.trim().length > 0) {
|
|
441
|
-
candidates.push(...splitStateTextCandidates(value));
|
|
442
|
-
}
|
|
443
|
-
};
|
|
444
|
-
pushText(values?.recentMessages);
|
|
445
|
-
pushText(stateRecord.text);
|
|
446
|
-
const recentMessagesData = stateRecord.recentMessagesData ?? stateRecord.recentMessages;
|
|
447
|
-
if (Array.isArray(recentMessagesData)) {
|
|
448
|
-
for (const item of recentMessagesData) {
|
|
449
|
-
if (!item || typeof item !== "object") {
|
|
450
|
-
continue;
|
|
451
|
-
}
|
|
452
|
-
const content = item.content;
|
|
453
|
-
if (!content || typeof content !== "object") {
|
|
454
|
-
continue;
|
|
455
|
-
}
|
|
456
|
-
pushText(content.text);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
return [...new Set(candidates)];
|
|
421
|
+
function resolveCalendarIntentInput(paramsIntent, message) {
|
|
422
|
+
return paramsIntent?.trim() || messageText(message).trim();
|
|
460
423
|
}
|
|
461
|
-
function
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
if (PARAMETER_DOC_NOISE_PATTERN.test(normalized)) {
|
|
471
|
-
score -= 500;
|
|
472
|
-
}
|
|
473
|
-
if (hasCalendarTextSignal(value)) {
|
|
474
|
-
score += 10;
|
|
475
|
-
}
|
|
476
|
-
if (textMatchesAnyCal(normalized, CAL_CALENDAR_STRONG_TERMS)) {
|
|
477
|
-
score += 14;
|
|
478
|
-
}
|
|
479
|
-
if (textMatchesAnyCal(normalized, CAL_CALENDAR_WEAK_TERMS)) {
|
|
480
|
-
score += 10;
|
|
481
|
-
}
|
|
482
|
-
if (textMatchesAnyCal(normalized, CAL_CALENDAR_STRONG_TERMS)) {
|
|
483
|
-
score += 8;
|
|
484
|
-
}
|
|
485
|
-
return score;
|
|
486
|
-
}
|
|
487
|
-
function looksLikeNarrativeCalendarQuery(value) {
|
|
488
|
-
const normalized = normalizeText(value);
|
|
489
|
-
if (!normalized) {
|
|
490
|
-
return false;
|
|
491
|
-
}
|
|
492
|
-
return (/\b(?:tell me if|let me know if|whether|can you|could you|would you|do i have|are there|what(?:'s| is) on|what(?: event| events)? do i have|when do i|try to find)\b/.test(normalized) &&
|
|
493
|
-
/\b(?:calendar|schedule|event|events|flight|flights|travel|trip|appointment|meeting|hotel|stay|return)\b/.test(normalized));
|
|
494
|
-
}
|
|
495
|
-
function looksLikeLiteralRequestEcho(query, intent) {
|
|
496
|
-
const normalizedQuery = normalizeText(query);
|
|
497
|
-
const normalizedIntent = normalizeText(intent);
|
|
498
|
-
const questionLike = /[?¿]/.test(query);
|
|
499
|
-
if (!normalizedQuery || !normalizedIntent) {
|
|
500
|
-
return false;
|
|
501
|
-
}
|
|
502
|
-
if (normalizedQuery === normalizedIntent) {
|
|
503
|
-
return (questionLike ||
|
|
504
|
-
wordCount(normalizedQuery) >= 10 ||
|
|
505
|
-
normalizedQuery.length >= 80);
|
|
506
|
-
}
|
|
507
|
-
return ((normalizedQuery.includes(normalizedIntent) ||
|
|
508
|
-
normalizedIntent.includes(normalizedQuery)) &&
|
|
509
|
-
(questionLike || normalizedQuery.length >= 96));
|
|
510
|
-
}
|
|
511
|
-
function resolveCalendarIntent(paramsIntent, message, state) {
|
|
512
|
-
const normalizeFollowUpConstraint = (value) => {
|
|
513
|
-
const cleaned = value
|
|
514
|
-
.trim()
|
|
515
|
-
.replace(/^(?:yes|yeah|yep|yup|ok|okay|sure|please|please do|do it|go ahead|sounds good)\b[\s,.-]*/i, "")
|
|
516
|
-
.replace(/^(?:and\s+|also\s+)/i, "")
|
|
517
|
-
.replace(/^(?:what about|how about|and the|also the|or the|only the|just the)\s+/i, "")
|
|
518
|
-
.trim();
|
|
519
|
-
if (/^(?:try\s+(?:it|again|that)|retry|do\s+(?:it\s+)?again|one\s+more\s+time|proceed|go for it)$/i.test(cleaned)) {
|
|
520
|
-
return "";
|
|
521
|
-
}
|
|
522
|
-
return cleaned;
|
|
523
|
-
};
|
|
524
|
-
const currentMessageText = messageText(message).trim();
|
|
525
|
-
const normalizedCurrentMessage = normalizeText(currentMessageText);
|
|
526
|
-
const currentMessageHasCalendarSignal = hasCalendarTextSignal(currentMessageText);
|
|
527
|
-
const isRefinement = /^(?:what about|how about|and the|also the|or the|only the|just the)\b/i.test(normalizedCurrentMessage);
|
|
528
|
-
if (currentMessageText && currentMessageHasCalendarSignal && !isRefinement) {
|
|
529
|
-
return currentMessageText;
|
|
530
|
-
}
|
|
531
|
-
if (currentMessageText &&
|
|
532
|
-
(textMatchesAnyCal(normalizedCurrentMessage, CAL_AFFIRMATIVE_TERMS) ||
|
|
533
|
-
textMatchesAnyCal(normalizedCurrentMessage, CAL_TEMPORAL_FOLLOWUP_TERMS) ||
|
|
534
|
-
isRefinement ||
|
|
535
|
-
hasCalendarContextSignal(message, state))) {
|
|
536
|
-
const followUpCandidates = userIntentsFromState(state).filter((candidate) => hasCalendarTextSignal(candidate) &&
|
|
537
|
-
normalizeText(candidate) !== normalizedCurrentMessage);
|
|
538
|
-
const recentRelevantIntent = followUpCandidates.length > 0
|
|
539
|
-
? followUpCandidates.reduce((best, current) => scoreIntentCandidate(current) >= scoreIntentCandidate(best)
|
|
540
|
-
? current
|
|
541
|
-
: best)
|
|
542
|
-
: undefined;
|
|
543
|
-
if (recentRelevantIntent) {
|
|
544
|
-
const followUpConstraint = normalizeFollowUpConstraint(currentMessageText);
|
|
545
|
-
return followUpConstraint
|
|
546
|
-
? `${recentRelevantIntent} ${followUpConstraint}`.trim()
|
|
547
|
-
: recentRelevantIntent;
|
|
424
|
+
function resolveStructuredCalendarSubaction(params, details) {
|
|
425
|
+
if (detailString(details, "eventId")) {
|
|
426
|
+
if (detailString(details, "newTitle") ||
|
|
427
|
+
detailString(details, "title") ||
|
|
428
|
+
detailString(details, "startAt") ||
|
|
429
|
+
detailString(details, "endAt") ||
|
|
430
|
+
detailString(details, "description") ||
|
|
431
|
+
detailString(details, "location")) {
|
|
432
|
+
return "update_event";
|
|
548
433
|
}
|
|
549
|
-
}
|
|
550
|
-
const candidates = [
|
|
551
|
-
{
|
|
552
|
-
text: paramsIntent?.trim(),
|
|
553
|
-
source: "params",
|
|
554
|
-
},
|
|
555
|
-
{
|
|
556
|
-
text: messageText(message).trim(),
|
|
557
|
-
source: "message",
|
|
558
|
-
},
|
|
559
|
-
...stateTextCandidates(state).map((text) => ({
|
|
560
|
-
text,
|
|
561
|
-
source: "state",
|
|
562
|
-
})),
|
|
563
|
-
].filter((candidate) => Boolean(candidate.text && candidate.text.trim().length > 0));
|
|
564
|
-
if (candidates.length === 0) {
|
|
565
|
-
return "";
|
|
566
|
-
}
|
|
567
|
-
return [...candidates]
|
|
568
|
-
.sort((left, right) => {
|
|
569
|
-
const leftBonus = left.source === "message" && hasCalendarTextSignal(left.text) ? 20 : 0;
|
|
570
|
-
const rightBonus = right.source === "message" && hasCalendarTextSignal(right.text)
|
|
571
|
-
? 20
|
|
572
|
-
: 0;
|
|
573
|
-
return (scoreIntentCandidate(right.text) +
|
|
574
|
-
rightBonus -
|
|
575
|
-
(scoreIntentCandidate(left.text) + leftBonus));
|
|
576
|
-
})
|
|
577
|
-
.map((candidate) => candidate.text)[0];
|
|
578
|
-
}
|
|
579
|
-
function inferCalendarSubaction(intent, details, query) {
|
|
580
|
-
// Delete intent is checked first because phrases like "delete the duplicate
|
|
581
|
-
// event" otherwise get swept up by the search_events branch via "duplicate"
|
|
582
|
-
// → "look for". Only the verb decides the subaction here.
|
|
583
|
-
if (/\b(delete|remove|cancel|drop|get rid of|trash|kill)\b.*\b(event|meeting|appointment|calendar|reminder|invite)\b/.test(intent) ||
|
|
584
|
-
/\b(uncancel|unbook|unschedule)\b/.test(intent)) {
|
|
585
434
|
return "delete_event";
|
|
586
435
|
}
|
|
587
|
-
// Update intent — same eager-match treatment so "rename", "move", "reschedule"
|
|
588
|
-
// don't get pulled into search_events.
|
|
589
|
-
if (/\b(rename|reschedule|move|push|change|update|edit|modify)\b.*\b(event|meeting|appointment|calendar|invite)\b/.test(intent)) {
|
|
590
|
-
return "update_event";
|
|
591
|
-
}
|
|
592
|
-
if (query ||
|
|
593
|
-
detailString(details, "query") ||
|
|
594
|
-
/\b(find|search|look for|matching|related to|flight|flights|fly|travel|trip|return)\b/.test(intent)) {
|
|
595
|
-
return "search_events";
|
|
596
|
-
}
|
|
597
436
|
if (detailString(details, "startAt") ||
|
|
437
|
+
detailString(details, "endAt") ||
|
|
438
|
+
detailString(details, "windowPreset") ||
|
|
598
439
|
detailNumber(details, "durationMinutes") ||
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
/\bput\b.*\b(calendar|meeting|event)\b/.test(intent) ||
|
|
602
|
-
/\bmake an event\b/.test(intent)) {
|
|
440
|
+
params.title ||
|
|
441
|
+
detailString(details, "title")) {
|
|
603
442
|
return "create_event";
|
|
604
443
|
}
|
|
605
|
-
if (
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
if (!subaction) {
|
|
613
|
-
return false;
|
|
614
|
-
}
|
|
615
|
-
switch (subaction) {
|
|
616
|
-
case "create_event":
|
|
617
|
-
return Boolean(params.title ||
|
|
618
|
-
detailString(details, "title") ||
|
|
619
|
-
detailString(details, "startAt") ||
|
|
620
|
-
detailString(details, "windowPreset") ||
|
|
621
|
-
detailNumber(details, "durationMinutes"));
|
|
622
|
-
case "update_event":
|
|
623
|
-
return Boolean(detailString(details, "eventId") ||
|
|
624
|
-
detailString(details, "title") ||
|
|
625
|
-
detailString(details, "newTitle") ||
|
|
626
|
-
detailString(details, "startAt") ||
|
|
627
|
-
detailString(details, "endAt"));
|
|
628
|
-
case "delete_event":
|
|
629
|
-
return Boolean(detailString(details, "eventId") ||
|
|
630
|
-
params.title ||
|
|
631
|
-
detailString(details, "title"));
|
|
632
|
-
case "search_events":
|
|
633
|
-
return Boolean(params.query ||
|
|
634
|
-
detailString(details, "query") ||
|
|
635
|
-
(params.queries?.length ?? 0) > 0 ||
|
|
636
|
-
(detailArray(details, "queries")?.length ?? 0) > 0);
|
|
637
|
-
default:
|
|
638
|
-
return false;
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
function cleanTripLocation(value) {
|
|
642
|
-
const cleaned = value
|
|
643
|
-
.trim()
|
|
644
|
-
.replace(/\b(?:today|tomorrow|tonight|this week(?:end)?|next week(?:end)?|this month|next month|for me|coming up|upcoming|on my calendar|on the calendar|on my schedule|on the schedule)\b.*$/i, "")
|
|
645
|
-
.replace(/^[^a-z0-9]+|[^a-z0-9]+$/gi, "")
|
|
646
|
-
.trim();
|
|
647
|
-
return cleaned.length > 0 ? cleaned : undefined;
|
|
648
|
-
}
|
|
649
|
-
function inferTripWindowIntent(intent) {
|
|
650
|
-
const patterns = [
|
|
651
|
-
/\bwhile\s+(?:i(?:'m| am)|im)\s+in\s+(.+?)(?=$|[?.!,])/i,
|
|
652
|
-
/\bwhen\s+(?:i(?:'m| am)|im)\s+in\s+(.+?)(?=$|[?.!,])/i,
|
|
653
|
-
/\bduring\s+(?:my\s+)?(?:trip|stay|visit)\s+(?:to|in)\s+(.+?)(?=$|[?.!,])/i,
|
|
654
|
-
/\bonce\s+(?:i(?:'m| am)|im)\s+in\s+(.+?)(?=$|[?.!,])/i,
|
|
655
|
-
];
|
|
656
|
-
for (const pattern of patterns) {
|
|
657
|
-
const match = intent.match(pattern);
|
|
658
|
-
const location = cleanTripLocation(match?.[1] ?? "");
|
|
659
|
-
if (location) {
|
|
660
|
-
return { location };
|
|
661
|
-
}
|
|
444
|
+
if (params.query ||
|
|
445
|
+
detailString(details, "query") ||
|
|
446
|
+
(params.queries?.length ?? 0) > 0 ||
|
|
447
|
+
(detailArray(details, "queries")?.length ?? 0) > 0 ||
|
|
448
|
+
detailString(details, "timeMin") ||
|
|
449
|
+
detailString(details, "timeMax")) {
|
|
450
|
+
return "search_events";
|
|
662
451
|
}
|
|
663
452
|
return null;
|
|
664
453
|
}
|
|
@@ -675,9 +464,17 @@ function parseExplicitLocalDate(value, timeZone) {
|
|
|
675
464
|
}
|
|
676
465
|
const monthNameMatch = normalized.match(MONTH_NAME_PATTERN);
|
|
677
466
|
if (monthNameMatch) {
|
|
467
|
+
const monthName = monthNameMatch[1];
|
|
468
|
+
if (!monthName) {
|
|
469
|
+
return null;
|
|
470
|
+
}
|
|
471
|
+
const month = MONTH_MAP[normalizeLookupKey(monthName)];
|
|
472
|
+
if (month === undefined) {
|
|
473
|
+
return null;
|
|
474
|
+
}
|
|
678
475
|
return {
|
|
679
476
|
year: monthNameMatch[3] ? Number(monthNameMatch[3]) : localToday.year,
|
|
680
|
-
month
|
|
477
|
+
month,
|
|
681
478
|
day: Number(monthNameMatch[2]),
|
|
682
479
|
};
|
|
683
480
|
}
|
|
@@ -726,14 +523,6 @@ function getLocalTodayDate(timeZone) {
|
|
|
726
523
|
day: localNow.day,
|
|
727
524
|
};
|
|
728
525
|
}
|
|
729
|
-
function addMonthsToLocalDate(dateOnly, monthDelta) {
|
|
730
|
-
const utcDate = new Date(Date.UTC(dateOnly.year, dateOnly.month - 1 + monthDelta, dateOnly.day, 12, 0, 0));
|
|
731
|
-
return {
|
|
732
|
-
year: utcDate.getUTCFullYear(),
|
|
733
|
-
month: utcDate.getUTCMonth() + 1,
|
|
734
|
-
day: utcDate.getUTCDate(),
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
526
|
function buildLocalDateRange(timeZone, startDate, endDateExclusive, options) {
|
|
738
527
|
return {
|
|
739
528
|
timeMin: buildUtcDateFromLocalParts(timeZone, {
|
|
@@ -817,14 +606,11 @@ function formatCreateEventCalendarContext(context) {
|
|
|
817
606
|
}
|
|
818
607
|
return lines.join("\n");
|
|
819
608
|
}
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
function resolveSuggestedCreateEventDurationMinutes(
|
|
824
|
-
|
|
825
|
-
return MIN_CREATE_EVENT_DURATION_MINUTES;
|
|
826
|
-
}
|
|
827
|
-
return isPersonalCreateEvent(intent, title) ? 15 : 60;
|
|
609
|
+
// Fallback default duration when neither the user nor the LLM supplies one.
|
|
610
|
+
// Specialization (personal vs work vs prep) is now handled by the LLM during
|
|
611
|
+
// inferCreateEventDetails — never by English keyword regex.
|
|
612
|
+
function resolveSuggestedCreateEventDurationMinutes() {
|
|
613
|
+
return 60;
|
|
828
614
|
}
|
|
829
615
|
function roundUpToStep(value, step) {
|
|
830
616
|
return Math.ceil(value / step) * step;
|
|
@@ -857,14 +643,12 @@ function busyWindowsForLocalDate(events, targetDate, timeZone) {
|
|
|
857
643
|
}
|
|
858
644
|
return windows.sort((left, right) => left.startMinute - right.startMinute);
|
|
859
645
|
}
|
|
860
|
-
|
|
646
|
+
// Preferred slot ordering for tentative event scheduling. Locale-agnostic:
|
|
647
|
+
// weekdays prefer mid-morning through evening, weekends prefer late morning
|
|
648
|
+
// and afternoon. Specific category preferences (personal vs work) are now
|
|
649
|
+
// supplied by the LLM via inferCreateEventDetails — not by English regex.
|
|
650
|
+
function resolvePreferredCreateEventMinutes(targetDate) {
|
|
861
651
|
const weekday = getWeekdayForLocalDate(targetDate);
|
|
862
|
-
if (isPersonalCreateEvent(intent, title)) {
|
|
863
|
-
return [19 * 60, 20 * 60, 18 * 60 + 30, 17 * 60 + 30];
|
|
864
|
-
}
|
|
865
|
-
if (/\b(dentist|doctor|therapy|appointment|meeting|interview|review|sync)\b/i.test(`${intent} ${title}`)) {
|
|
866
|
-
return [9 * 60, 10 * 60, 11 * 60, 14 * 60, 15 * 60];
|
|
867
|
-
}
|
|
868
652
|
return weekday === 0 || weekday === 6
|
|
869
653
|
? [10 * 60, 13 * 60, 18 * 60]
|
|
870
654
|
: [9 * 60, 11 * 60, 14 * 60, 16 * 60, 19 * 60];
|
|
@@ -897,11 +681,11 @@ function suggestCreateEventStartAt(args) {
|
|
|
897
681
|
if (!targetDate) {
|
|
898
682
|
return null;
|
|
899
683
|
}
|
|
900
|
-
const durationMinutes = resolveSuggestedCreateEventDurationMinutes(
|
|
684
|
+
const durationMinutes = resolveSuggestedCreateEventDurationMinutes();
|
|
901
685
|
const busyWindows = busyWindowsForLocalDate(args.calendarContext.feed.events, targetDate, args.calendarContext.calendarTimeZone);
|
|
902
686
|
const startMinute = chooseSuggestedCreateEventMinute({
|
|
903
687
|
busyWindows,
|
|
904
|
-
preferredMinutes: resolvePreferredCreateEventMinutes(
|
|
688
|
+
preferredMinutes: resolvePreferredCreateEventMinutes(targetDate),
|
|
905
689
|
durationMinutes,
|
|
906
690
|
});
|
|
907
691
|
if (startMinute === null) {
|
|
@@ -927,6 +711,7 @@ async function loadCreateEventCalendarContext(service, details, hasCalendarRead)
|
|
|
927
711
|
const feed = await service.getCalendarFeed(INTERNAL_URL, {
|
|
928
712
|
mode: detailString(details, "mode"),
|
|
929
713
|
side: detailString(details, "side"),
|
|
714
|
+
grantId: detailString(details, "grantId"),
|
|
930
715
|
calendarId: detailString(details, "calendarId"),
|
|
931
716
|
timeZone: requestTimeZone,
|
|
932
717
|
forceSync: detailBoolean(details, "forceSync"),
|
|
@@ -974,56 +759,6 @@ function resolveCalendarLlmWindow(llmPlan) {
|
|
|
974
759
|
label: normalizeWindowLabel(llmPlan?.windowLabel) ?? "for the requested window",
|
|
975
760
|
};
|
|
976
761
|
}
|
|
977
|
-
function resolveWeekendWindow(timeZone, modifier) {
|
|
978
|
-
const localToday = getLocalTodayDate(timeZone);
|
|
979
|
-
const currentWeekday = getWeekdayForLocalDate(localToday);
|
|
980
|
-
let startOffsetDays = (6 - currentWeekday + 7) % 7;
|
|
981
|
-
let endOffsetFromToday = startOffsetDays + 2;
|
|
982
|
-
if (modifier === "this" && (currentWeekday === 6 || currentWeekday === 0)) {
|
|
983
|
-
startOffsetDays = 0;
|
|
984
|
-
endOffsetFromToday = currentWeekday === 6 ? 2 : 1;
|
|
985
|
-
}
|
|
986
|
-
if (modifier === "next") {
|
|
987
|
-
startOffsetDays += 7;
|
|
988
|
-
endOffsetFromToday += 7;
|
|
989
|
-
}
|
|
990
|
-
const startDay = addDaysToLocalDate(localToday, startOffsetDays);
|
|
991
|
-
const endDay = addDaysToLocalDate(localToday, endOffsetFromToday);
|
|
992
|
-
return buildLocalDateRange(timeZone, startDay, endDay);
|
|
993
|
-
}
|
|
994
|
-
function resolveMonthWindow(timeZone, modifier) {
|
|
995
|
-
const localToday = getLocalTodayDate(timeZone);
|
|
996
|
-
if (modifier === "this") {
|
|
997
|
-
const endOfWindow = addMonthsToLocalDate({
|
|
998
|
-
year: localToday.year,
|
|
999
|
-
month: localToday.month,
|
|
1000
|
-
day: 1,
|
|
1001
|
-
}, 1);
|
|
1002
|
-
return buildLocalDateRange(timeZone, localToday, endOfWindow);
|
|
1003
|
-
}
|
|
1004
|
-
const startOfNextMonth = addMonthsToLocalDate({
|
|
1005
|
-
year: localToday.year,
|
|
1006
|
-
month: localToday.month,
|
|
1007
|
-
day: 1,
|
|
1008
|
-
}, 1);
|
|
1009
|
-
const startOfFollowingMonth = addMonthsToLocalDate(startOfNextMonth, 1);
|
|
1010
|
-
return buildLocalDateRange(timeZone, startOfNextMonth, startOfFollowingMonth);
|
|
1011
|
-
}
|
|
1012
|
-
function resolveTonightWindow(timeZone) {
|
|
1013
|
-
const localNow = getZonedDateParts(new Date(), timeZone);
|
|
1014
|
-
const startHour = Math.max(localNow.hour, 17);
|
|
1015
|
-
const startMinute = localNow.hour >= 17 ? localNow.minute : 0;
|
|
1016
|
-
const startDay = {
|
|
1017
|
-
year: localNow.year,
|
|
1018
|
-
month: localNow.month,
|
|
1019
|
-
day: localNow.day,
|
|
1020
|
-
};
|
|
1021
|
-
const endDay = addDaysToLocalDate(startDay, 1);
|
|
1022
|
-
return buildLocalDateRange(timeZone, startDay, endDay, {
|
|
1023
|
-
startHour,
|
|
1024
|
-
startMinute,
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
762
|
// Wide window used by update_event / delete_event lookups when the user
|
|
1028
763
|
// gave no time hint. Reaches 1 year back and 5 years forward — far enough
|
|
1029
764
|
// to find a future birthday or a recent past meeting without scanning the
|
|
@@ -1031,7 +766,7 @@ function resolveTonightWindow(timeZone) {
|
|
|
1031
766
|
function buildWideLookupRange(timeZone) {
|
|
1032
767
|
return buildLocalDayRange(timeZone, -365, 365 * 5);
|
|
1033
768
|
}
|
|
1034
|
-
function resolveCalendarWindow(
|
|
769
|
+
function resolveCalendarWindow(_intent, details, forSearch, llmPlan) {
|
|
1035
770
|
const timeMin = detailString(details, "timeMin");
|
|
1036
771
|
const timeMax = detailString(details, "timeMax");
|
|
1037
772
|
const calendarId = detailString(details, "calendarId");
|
|
@@ -1062,149 +797,6 @@ function resolveCalendarWindow(intent, details, forSearch, llmPlan) {
|
|
|
1062
797
|
label: llmWindow.label,
|
|
1063
798
|
};
|
|
1064
799
|
}
|
|
1065
|
-
const normalizedIntent = normalizeText(intent);
|
|
1066
|
-
const explicitDate = parseExplicitLocalDate(normalizedIntent, timeZone);
|
|
1067
|
-
if (explicitDate) {
|
|
1068
|
-
const nextDate = addDaysToLocalDate(explicitDate, 1);
|
|
1069
|
-
const explicitDateLabel = (normalizedIntent.match(/(?:on|for)\s+(.+)$/i)?.[1] ?? normalizedIntent)
|
|
1070
|
-
.replace(/^(?:on|for)\s+/i, "")
|
|
1071
|
-
.trim();
|
|
1072
|
-
return {
|
|
1073
|
-
request: {
|
|
1074
|
-
calendarId,
|
|
1075
|
-
timeZone,
|
|
1076
|
-
forceSync,
|
|
1077
|
-
timeMin: buildUtcDateFromLocalParts(timeZone, {
|
|
1078
|
-
year: explicitDate.year,
|
|
1079
|
-
month: explicitDate.month,
|
|
1080
|
-
day: explicitDate.day,
|
|
1081
|
-
hour: 0,
|
|
1082
|
-
minute: 0,
|
|
1083
|
-
second: 0,
|
|
1084
|
-
}).toISOString(),
|
|
1085
|
-
timeMax: buildUtcDateFromLocalParts(timeZone, {
|
|
1086
|
-
year: nextDate.year,
|
|
1087
|
-
month: nextDate.month,
|
|
1088
|
-
day: nextDate.day,
|
|
1089
|
-
hour: 0,
|
|
1090
|
-
minute: 0,
|
|
1091
|
-
second: 0,
|
|
1092
|
-
}).toISOString(),
|
|
1093
|
-
},
|
|
1094
|
-
label: `on ${explicitDateLabel}`,
|
|
1095
|
-
};
|
|
1096
|
-
}
|
|
1097
|
-
if (/\btonight\b/.test(normalizedIntent)) {
|
|
1098
|
-
return {
|
|
1099
|
-
request: {
|
|
1100
|
-
calendarId,
|
|
1101
|
-
timeZone,
|
|
1102
|
-
forceSync,
|
|
1103
|
-
...resolveTonightWindow(timeZone),
|
|
1104
|
-
},
|
|
1105
|
-
label: "tonight",
|
|
1106
|
-
};
|
|
1107
|
-
}
|
|
1108
|
-
if (/\bnext week\b/.test(normalizedIntent) &&
|
|
1109
|
-
/\b(?:week after next|the week after)\b/.test(normalizedIntent)) {
|
|
1110
|
-
return {
|
|
1111
|
-
request: {
|
|
1112
|
-
calendarId,
|
|
1113
|
-
timeZone,
|
|
1114
|
-
forceSync,
|
|
1115
|
-
...buildLocalDayRange(timeZone, 7, 21),
|
|
1116
|
-
},
|
|
1117
|
-
label: "next week or the week after",
|
|
1118
|
-
};
|
|
1119
|
-
}
|
|
1120
|
-
if (/\btomorrow\b/.test(normalizedIntent)) {
|
|
1121
|
-
return {
|
|
1122
|
-
request: {
|
|
1123
|
-
calendarId,
|
|
1124
|
-
timeZone,
|
|
1125
|
-
forceSync,
|
|
1126
|
-
...buildLocalDayRange(timeZone, 1, 2),
|
|
1127
|
-
},
|
|
1128
|
-
label: "tomorrow",
|
|
1129
|
-
};
|
|
1130
|
-
}
|
|
1131
|
-
if (/\bnext weekend\b/.test(normalizedIntent)) {
|
|
1132
|
-
return {
|
|
1133
|
-
request: {
|
|
1134
|
-
calendarId,
|
|
1135
|
-
timeZone,
|
|
1136
|
-
forceSync,
|
|
1137
|
-
...resolveWeekendWindow(timeZone, "next"),
|
|
1138
|
-
},
|
|
1139
|
-
label: "next weekend",
|
|
1140
|
-
};
|
|
1141
|
-
}
|
|
1142
|
-
if (/\b(?:this weekend|weekend)\b/.test(normalizedIntent)) {
|
|
1143
|
-
return {
|
|
1144
|
-
request: {
|
|
1145
|
-
calendarId,
|
|
1146
|
-
timeZone,
|
|
1147
|
-
forceSync,
|
|
1148
|
-
...resolveWeekendWindow(timeZone, "this"),
|
|
1149
|
-
},
|
|
1150
|
-
label: "this weekend",
|
|
1151
|
-
};
|
|
1152
|
-
}
|
|
1153
|
-
if (/\b(?:week after next|the week after)\b/.test(normalizedIntent)) {
|
|
1154
|
-
return {
|
|
1155
|
-
request: {
|
|
1156
|
-
calendarId,
|
|
1157
|
-
timeZone,
|
|
1158
|
-
forceSync,
|
|
1159
|
-
...buildLocalDayRange(timeZone, 14, 21),
|
|
1160
|
-
},
|
|
1161
|
-
label: "the week after next",
|
|
1162
|
-
};
|
|
1163
|
-
}
|
|
1164
|
-
if (/\bnext week\b/.test(normalizedIntent)) {
|
|
1165
|
-
return {
|
|
1166
|
-
request: {
|
|
1167
|
-
calendarId,
|
|
1168
|
-
timeZone,
|
|
1169
|
-
forceSync,
|
|
1170
|
-
...buildLocalDayRange(timeZone, 7, 14),
|
|
1171
|
-
},
|
|
1172
|
-
label: "next week",
|
|
1173
|
-
};
|
|
1174
|
-
}
|
|
1175
|
-
if (/\b(this week|week)\b/.test(normalizedIntent)) {
|
|
1176
|
-
return {
|
|
1177
|
-
request: {
|
|
1178
|
-
calendarId,
|
|
1179
|
-
timeZone,
|
|
1180
|
-
forceSync,
|
|
1181
|
-
...buildLocalDayRange(timeZone, 0, 7),
|
|
1182
|
-
},
|
|
1183
|
-
label: "this week",
|
|
1184
|
-
};
|
|
1185
|
-
}
|
|
1186
|
-
if (/\bnext month\b/.test(normalizedIntent)) {
|
|
1187
|
-
return {
|
|
1188
|
-
request: {
|
|
1189
|
-
calendarId,
|
|
1190
|
-
timeZone,
|
|
1191
|
-
forceSync,
|
|
1192
|
-
...resolveMonthWindow(timeZone, "next"),
|
|
1193
|
-
},
|
|
1194
|
-
label: "next month",
|
|
1195
|
-
};
|
|
1196
|
-
}
|
|
1197
|
-
if (/\bthis month\b/.test(normalizedIntent)) {
|
|
1198
|
-
return {
|
|
1199
|
-
request: {
|
|
1200
|
-
calendarId,
|
|
1201
|
-
timeZone,
|
|
1202
|
-
forceSync,
|
|
1203
|
-
...resolveMonthWindow(timeZone, "this"),
|
|
1204
|
-
},
|
|
1205
|
-
label: "this month",
|
|
1206
|
-
};
|
|
1207
|
-
}
|
|
1208
800
|
const windowDays = detailNumber(details, "windowDays");
|
|
1209
801
|
if (forSearch) {
|
|
1210
802
|
const days = windowDays && windowDays > 0 ? Math.min(windowDays, 90) : 30;
|
|
@@ -1262,135 +854,6 @@ function resolveTripWindowRequest(details, llmPlan) {
|
|
|
1262
854
|
...buildLocalDayRange(timeZone, 0, days),
|
|
1263
855
|
};
|
|
1264
856
|
}
|
|
1265
|
-
function inferCalendarSearchQuery(intent) {
|
|
1266
|
-
const normalizedIntent = normalizeText(intent);
|
|
1267
|
-
if (/\b(flight|flights|fly|flying|travel|trip)\b/.test(normalizedIntent)) {
|
|
1268
|
-
const locationMatch = normalizedIntent.match(/\b(?:from|to)\s+(.+?)(?=\b(?:today|tomorrow|tonight|this week(?:end)?|next week(?:end)?|week after(?: next)?|this month|next month|this year|next year|or|and|please|idk|i dk|i don't know)\b|[?.!,]|$)/i);
|
|
1269
|
-
const parts = ["flight"];
|
|
1270
|
-
if (/\b(return|back|home)\b/.test(normalizedIntent)) {
|
|
1271
|
-
parts.push("return");
|
|
1272
|
-
}
|
|
1273
|
-
const location = normalizeCalendarSearchQueryValue(locationMatch?.[1] ?? "");
|
|
1274
|
-
if (location) {
|
|
1275
|
-
parts.push(location);
|
|
1276
|
-
}
|
|
1277
|
-
return normalizeCalendarSearchQueryValue(parts.join(" ")) ?? "flight";
|
|
1278
|
-
}
|
|
1279
|
-
const dateMatch = normalizedIntent.match(/\b(?:on|for)\s+((?:jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|jun(?:e)?|jul(?:y)?|aug(?:ust)?|sep(?:t(?:ember)?)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)\.?\s+\d{1,2}(?:st|nd|rd|th)?(?:,?\s+\d{4})?|\d{1,2}[/-]\d{1,2}(?:[/-]\d{2,4})?|\d{4}-\d{1,2}-\d{1,2})\b/i);
|
|
1280
|
-
const normalizedDate = normalizeCalendarSearchQueryValue(dateMatch?.[1]);
|
|
1281
|
-
if (normalizedDate) {
|
|
1282
|
-
return normalizedDate;
|
|
1283
|
-
}
|
|
1284
|
-
const patterns = [
|
|
1285
|
-
/^(?:please\s+)?(?:find|search(?: for)?|look(?:ing)? for|show me)\s+(.+)$/i,
|
|
1286
|
-
/^(?:please\s+)?(?:do i have|are there)\s+(?:any\s+)?(.+?)(?:\?|$)/i,
|
|
1287
|
-
/^(?:please\s+)?(?:check|look|see)\s+(?:my\s+)?calendar\s+for\s+(.+?)(?:\?|$)/i,
|
|
1288
|
-
/^what\s+(?:event|events)\s+do\s+i\s+have\s+(?:on|for)\s+(.+?)(?:\?|$)/i,
|
|
1289
|
-
/^(?:please\s+)?any\s+(.+?)(?:\?|$)/i,
|
|
1290
|
-
];
|
|
1291
|
-
for (const pattern of patterns) {
|
|
1292
|
-
const match = normalizedIntent.match(pattern);
|
|
1293
|
-
const value = normalizeCalendarSearchQueryValue(match?.[1] ?? "");
|
|
1294
|
-
if (value) {
|
|
1295
|
-
return value;
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
return undefined;
|
|
1299
|
-
}
|
|
1300
|
-
function inferCalendarSearchQueries(intent) {
|
|
1301
|
-
const normalizedIntent = normalizeText(intent);
|
|
1302
|
-
const queries = new Set();
|
|
1303
|
-
const push = (value) => {
|
|
1304
|
-
const normalized = normalizeCalendarSearchQueryValue(value);
|
|
1305
|
-
if (normalized) {
|
|
1306
|
-
queries.add(normalized);
|
|
1307
|
-
}
|
|
1308
|
-
};
|
|
1309
|
-
push(inferCalendarSearchQuery(intent));
|
|
1310
|
-
if (/\b(return|back|home)\b/.test(normalizedIntent)) {
|
|
1311
|
-
const locationMatch = normalizedIntent.match(/\b(?:from|to)\s+(.+?)(?=\b(?:today|tomorrow|tonight|this week(?:end)?|next week(?:end)?|week after(?: next)?|this month|next month|this year|next year|or|and|please|idk|i dk|i don't know)\b|[?.!,]|$)/i);
|
|
1312
|
-
const location = normalizeCalendarSearchQueryValue(locationMatch?.[1] ?? "");
|
|
1313
|
-
push(`return flight${location ? ` ${location}` : ""}`);
|
|
1314
|
-
if (location) {
|
|
1315
|
-
push(`flight back ${location}`);
|
|
1316
|
-
push(`${location} return flight`);
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
return [...queries];
|
|
1320
|
-
}
|
|
1321
|
-
function sanitizeCalendarQuery(query, intent) {
|
|
1322
|
-
if (!query) {
|
|
1323
|
-
return undefined;
|
|
1324
|
-
}
|
|
1325
|
-
const raw = normalizeText(query);
|
|
1326
|
-
if (PARAMETER_DOC_NOISE_PATTERN.test(raw) ||
|
|
1327
|
-
raw.includes("supported keys include") ||
|
|
1328
|
-
raw.includes("match against titles") ||
|
|
1329
|
-
raw.includes("structured calendar arguments")) {
|
|
1330
|
-
return undefined;
|
|
1331
|
-
}
|
|
1332
|
-
const cleaned = normalizeCalendarSearchQueryValue(query);
|
|
1333
|
-
if (!cleaned ||
|
|
1334
|
-
PARAMETER_DOC_NOISE_PATTERN.test(cleaned) ||
|
|
1335
|
-
textMatchesAnyCal(cleaned, CAL_TEMPORAL_FOLLOWUP_TERMS) ||
|
|
1336
|
-
looksLikeLiteralRequestEcho(cleaned, intent) ||
|
|
1337
|
-
cleaned.length > 160) {
|
|
1338
|
-
return undefined;
|
|
1339
|
-
}
|
|
1340
|
-
const inferred = inferCalendarSearchQuery(intent);
|
|
1341
|
-
if (inferred &&
|
|
1342
|
-
looksLikeNarrativeCalendarQuery(cleaned) &&
|
|
1343
|
-
normalizeText(inferred) !== normalizeText(cleaned)) {
|
|
1344
|
-
return undefined;
|
|
1345
|
-
}
|
|
1346
|
-
return cleaned;
|
|
1347
|
-
}
|
|
1348
|
-
function scoreCalendarQueryCandidate(query, intent) {
|
|
1349
|
-
const normalized = normalizeText(query);
|
|
1350
|
-
if (!normalized) {
|
|
1351
|
-
return Number.NEGATIVE_INFINITY;
|
|
1352
|
-
}
|
|
1353
|
-
let score = 0;
|
|
1354
|
-
if (PARAMETER_DOC_NOISE_PATTERN.test(normalized)) {
|
|
1355
|
-
score -= 500;
|
|
1356
|
-
}
|
|
1357
|
-
if (looksLikeNarrativeCalendarQuery(normalized)) {
|
|
1358
|
-
score -= 120;
|
|
1359
|
-
}
|
|
1360
|
-
if (looksLikeLiteralRequestEcho(query, intent)) {
|
|
1361
|
-
score -= 120;
|
|
1362
|
-
}
|
|
1363
|
-
if (textMatchesAnyCal(normalized, CAL_TEMPORAL_FOLLOWUP_TERMS)) {
|
|
1364
|
-
score -= 120;
|
|
1365
|
-
}
|
|
1366
|
-
const tokens = tokenizeForSearch(normalized);
|
|
1367
|
-
if (tokens.length <= 4) {
|
|
1368
|
-
score += 12;
|
|
1369
|
-
}
|
|
1370
|
-
else if (tokens.length >= 8) {
|
|
1371
|
-
score -= 15;
|
|
1372
|
-
}
|
|
1373
|
-
const inferredQueries = inferCalendarSearchQueries(intent).map((value) => normalizeText(value));
|
|
1374
|
-
if (inferredQueries.includes(normalized)) {
|
|
1375
|
-
score += 60;
|
|
1376
|
-
}
|
|
1377
|
-
for (const inferredQuery of inferredQueries) {
|
|
1378
|
-
if (!inferredQuery) {
|
|
1379
|
-
continue;
|
|
1380
|
-
}
|
|
1381
|
-
if (normalized.includes(inferredQuery) ||
|
|
1382
|
-
inferredQuery.includes(normalized)) {
|
|
1383
|
-
score += 18;
|
|
1384
|
-
}
|
|
1385
|
-
const inferredTokens = new Set(tokenizeForSearch(inferredQuery));
|
|
1386
|
-
score += tokens.filter((token) => inferredTokens.has(token)).length * 8;
|
|
1387
|
-
}
|
|
1388
|
-
if (/\b(flight|flights|travel|trip|return|back|home)\b/.test(normalizeText(intent)) &&
|
|
1389
|
-
/\b(flight|flights|travel|trip|return|back|home)\b/.test(normalized)) {
|
|
1390
|
-
score += 12;
|
|
1391
|
-
}
|
|
1392
|
-
return score;
|
|
1393
|
-
}
|
|
1394
857
|
function eventDateSearchTerms(event) {
|
|
1395
858
|
const formatter = (options) => new Intl.DateTimeFormat("en-US", {
|
|
1396
859
|
timeZone: event.timezone || undefined,
|
|
@@ -1421,9 +884,6 @@ function eventDateSearchTerms(event) {
|
|
|
1421
884
|
weekdayShort,
|
|
1422
885
|
].map((term) => normalizeText(term)));
|
|
1423
886
|
}
|
|
1424
|
-
async function extractCalendarSearchQueriesWithLlm(runtime, message, state, intent, timeZone) {
|
|
1425
|
-
return (await extractCalendarPlanWithLlm(runtime, message, state, intent, timeZone)).queries;
|
|
1426
|
-
}
|
|
1427
887
|
export async function extractCalendarPlanWithLlm(runtime, message, state, intent, timeZone = resolveDefaultTimeZone()) {
|
|
1428
888
|
const recentConversation = formatCreateEventRecentConversation(state);
|
|
1429
889
|
const currentMessage = messageText(message).trim();
|
|
@@ -1462,16 +922,20 @@ export async function extractCalendarPlanWithLlm(runtime, message, state, intent
|
|
|
1462
922
|
" update_event — rename, reschedule, move, or edit an existing event (e.g. 'rename my meeting to standup', 'reschedule the dentist to Friday', 'move the call to 3pm')",
|
|
1463
923
|
" delete_event — remove or cancel an existing event (e.g. 'delete the team meeting', 'cancel my appointment', 'remove the duplicate event')",
|
|
1464
924
|
" trip_window — query what's happening during a trip or stay in a specific place (e.g. 'what's happening while I'm in Denver', 'my Tokyo itinerary')",
|
|
925
|
+
"Use only the exact subaction literals listed above.",
|
|
926
|
+
"Do not invent aliases like edit_event, modify_event, reschedule_event, move_event, cancel_event, remove_event, agenda, or itinerary_window.",
|
|
1465
927
|
"",
|
|
1466
|
-
"For feed, search_events, or
|
|
928
|
+
"For feed, search_events, trip_window, update_event, or delete_event, infer an exact timeMin/timeMax window when the request names or implies a date or date range.",
|
|
1467
929
|
"timeMin and timeMax must be ISO 8601 datetimes that the API can use directly.",
|
|
1468
930
|
"windowLabel should be a short natural-language label like on monday, this weekend, next month, or tonight.",
|
|
1469
|
-
"For search_events or trip_window, extract up to 3 short search queries.",
|
|
931
|
+
"For search_events, update_event, delete_event, or trip_window, extract up to 3 short search queries.",
|
|
1470
932
|
"Preserve names, places, and keywords in their original language or script when useful.",
|
|
1471
933
|
"Convert time constraints into concise searchable dates or windows even if the user phrases them in another language.",
|
|
1472
934
|
"Focus on people, places, flights, itinerary, appointments, and explicit dates.",
|
|
1473
935
|
"If the request is about a date, include a date query like april 12 or 2026-04-12.",
|
|
1474
936
|
"If the request asks what is happening while the user is in a place, use trip_window and include tripLocation.",
|
|
937
|
+
"For update_event or delete_event, use queries to identify the existing target event and title for the new title only when the user is renaming it.",
|
|
938
|
+
"For requests like all events, full schedule, everything on my calendar, or a broad itinerary sweep, return a broad timeMin/timeMax window instead of relying on downstream heuristics.",
|
|
1475
939
|
"",
|
|
1476
940
|
"Examples:",
|
|
1477
941
|
' "what\'s on my calendar tomorrow" → {"subaction":"feed","shouldAct":true,"response":null}',
|
|
@@ -1479,6 +943,7 @@ export async function extractCalendarPlanWithLlm(runtime, message, state, intent
|
|
|
1479
943
|
' "find my return flight" → {"subaction":"search_events","shouldAct":true,"response":null,"queries":["return flight"]}',
|
|
1480
944
|
' "what do I have while I\'m in Tokyo" → {"subaction":"trip_window","shouldAct":true,"response":null,"queries":["tokyo"],"tripLocation":"Tokyo"}',
|
|
1481
945
|
' "rename my meeting to standup" → {"subaction":"update_event","shouldAct":true,"response":null,"queries":["meeting"],"title":"standup"}',
|
|
946
|
+
' "Cambia la cita del dentista al viernes" → {"subaction":"update_event","shouldAct":true,"response":null,"queries":["cita del dentista"],"windowLabel":"el viernes"}',
|
|
1482
947
|
' "delete the team meeting tomorrow" → {"subaction":"delete_event","shouldAct":true,"response":null,"queries":["team meeting"]}',
|
|
1483
948
|
' "can you help me with my calendar?" → {"subaction":null,"shouldAct":false,"response":"What do you want to do on your calendar — check your schedule, find an event, or create one?","queries":[]}',
|
|
1484
949
|
"",
|
|
@@ -1502,6 +967,11 @@ export async function extractCalendarPlanWithLlm(runtime, message, state, intent
|
|
|
1502
967
|
"</recent_conversation>",
|
|
1503
968
|
].join("\n");
|
|
1504
969
|
let rawResponse = "";
|
|
970
|
+
const parseResponse = (raw) => {
|
|
971
|
+
const parsed = parseKeyValueXml(raw) ??
|
|
972
|
+
parseJSONObjectFromText(raw);
|
|
973
|
+
return parsed ? buildCalendarPlanFromParsed(parsed) : null;
|
|
974
|
+
};
|
|
1505
975
|
try {
|
|
1506
976
|
const result = await runtime.useModel(ModelType.TEXT_LARGE, {
|
|
1507
977
|
prompt,
|
|
@@ -1519,98 +989,62 @@ export async function extractCalendarPlanWithLlm(runtime, message, state, intent
|
|
|
1519
989
|
shouldAct: null,
|
|
1520
990
|
};
|
|
1521
991
|
}
|
|
1522
|
-
const
|
|
1523
|
-
|
|
1524
|
-
|
|
992
|
+
const parsedPlan = parseResponse(rawResponse);
|
|
993
|
+
if (parsedPlan) {
|
|
994
|
+
return parsedPlan;
|
|
995
|
+
}
|
|
996
|
+
try {
|
|
997
|
+
const repairResult = await runtime.useModel(ModelType.TEXT_LARGE, {
|
|
998
|
+
prompt: buildCalendarPlanRepairPrompt({
|
|
999
|
+
currentMessage,
|
|
1000
|
+
intent,
|
|
1001
|
+
recentConversation,
|
|
1002
|
+
rawResponse,
|
|
1003
|
+
timeZone,
|
|
1004
|
+
nowIso,
|
|
1005
|
+
localNow,
|
|
1006
|
+
}),
|
|
1007
|
+
});
|
|
1008
|
+
const repairedRaw = typeof repairResult === "string" ? repairResult : "";
|
|
1009
|
+
return (parseResponse(repairedRaw) ?? {
|
|
1010
|
+
subaction: null,
|
|
1011
|
+
queries: [],
|
|
1012
|
+
shouldAct: null,
|
|
1013
|
+
});
|
|
1014
|
+
}
|
|
1015
|
+
catch (error) {
|
|
1016
|
+
runtime.logger?.warn?.({
|
|
1017
|
+
src: "action:calendar",
|
|
1018
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1019
|
+
}, "Calendar action repair model call failed");
|
|
1525
1020
|
return {
|
|
1526
1021
|
subaction: null,
|
|
1527
1022
|
queries: [],
|
|
1528
1023
|
shouldAct: null,
|
|
1529
1024
|
};
|
|
1530
1025
|
}
|
|
1531
|
-
const tripLocation = typeof parsed.tripLocation === "string" &&
|
|
1532
|
-
parsed.tripLocation.trim().length > 0
|
|
1533
|
-
? parsed.tripLocation.trim()
|
|
1534
|
-
: undefined;
|
|
1535
|
-
// Extract queries from multiple possible shapes:
|
|
1536
|
-
// - TOON string: "flight || dentist" (split on ||)
|
|
1537
|
-
// - TOON single: "return flight" (no delimiter)
|
|
1538
|
-
// - JSON array: ["flight", "dentist"]
|
|
1539
|
-
// - Numbered fallbacks: query1, query2, query3
|
|
1540
|
-
const rawQueries = [];
|
|
1541
|
-
if (typeof parsed.queries === "string" && parsed.queries.trim().length > 0) {
|
|
1542
|
-
for (const q of parsed.queries.split(/\s*\|\|\s*/)) {
|
|
1543
|
-
if (q.trim().length > 0)
|
|
1544
|
-
rawQueries.push(q.trim());
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
else if (Array.isArray(parsed.queries)) {
|
|
1548
|
-
for (const value of parsed.queries) {
|
|
1549
|
-
if (typeof value === "string")
|
|
1550
|
-
rawQueries.push(value);
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
if (typeof parsed.query === "string")
|
|
1554
|
-
rawQueries.push(parsed.query);
|
|
1555
|
-
if (typeof parsed.query1 === "string")
|
|
1556
|
-
rawQueries.push(parsed.query1);
|
|
1557
|
-
if (typeof parsed.query2 === "string")
|
|
1558
|
-
rawQueries.push(parsed.query2);
|
|
1559
|
-
if (typeof parsed.query3 === "string")
|
|
1560
|
-
rawQueries.push(parsed.query3);
|
|
1561
|
-
if (tripLocation)
|
|
1562
|
-
rawQueries.push(tripLocation);
|
|
1563
|
-
return {
|
|
1564
|
-
subaction: normalizeCalendarSubaction(parsed.subaction),
|
|
1565
|
-
queries: dedupeCalendarQueries(rawQueries),
|
|
1566
|
-
response: normalizePlannerResponse(parsed.response),
|
|
1567
|
-
shouldAct: normalizeShouldAct(parsed.shouldAct),
|
|
1568
|
-
title: typeof parsed.title === "string" && parsed.title.trim().length > 0
|
|
1569
|
-
? parsed.title.trim()
|
|
1570
|
-
: undefined,
|
|
1571
|
-
tripLocation,
|
|
1572
|
-
timeMin: normalizeIsoDateTime(parsed.timeMin),
|
|
1573
|
-
timeMax: normalizeIsoDateTime(parsed.timeMax),
|
|
1574
|
-
windowLabel: normalizeWindowLabel(parsed.windowLabel ?? parsed.label),
|
|
1575
|
-
};
|
|
1576
1026
|
}
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
const stateQueries = userIntentsFromState(state)
|
|
1584
|
-
.reverse()
|
|
1585
|
-
.flatMap((candidate) => inferCalendarSearchQueries(candidate));
|
|
1586
|
-
const candidates = dedupeCalendarQueries([
|
|
1587
|
-
...providedQueries,
|
|
1588
|
-
...llmQueries,
|
|
1589
|
-
...heuristicQueries,
|
|
1590
|
-
...stateQueries,
|
|
1591
|
-
].map((query) => sanitizeCalendarQuery(query, intent)));
|
|
1592
|
-
return [...candidates].sort((left, right) => scoreCalendarQueryCandidate(right, intent) -
|
|
1593
|
-
scoreCalendarQueryCandidate(left, intent));
|
|
1594
|
-
}
|
|
1595
|
-
function inferCreateEventTitle(intent) {
|
|
1596
|
-
const patterns = [
|
|
1597
|
-
/\b(?:create|add|schedule|book|put)\s+(?:a|an|the)?\s*(.+?)(?=\b(?:for|on|at|tomorrow|today|tonight|next|this|from)\b|[?.!,]|$)/i,
|
|
1598
|
-
/\b(?:meeting|appointment|call|event)\s+(?:with|for)\s+(.+?)(?=\b(?:for|on|at|tomorrow|today|tonight|next|this|from)\b|[?.!,]|$)/i,
|
|
1599
|
-
];
|
|
1600
|
-
for (const pattern of patterns) {
|
|
1601
|
-
const match = intent.match(pattern);
|
|
1602
|
-
const value = match?.[1]?.trim();
|
|
1603
|
-
if (value && !/^(calendar|event|meeting|appointment|call)$/i.test(value)) {
|
|
1604
|
-
return value.replace(/\s+/g, " ").trim();
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
return undefined;
|
|
1027
|
+
function resolveCalendarSearchQueries(args) {
|
|
1028
|
+
return dedupeCalendarQueries([
|
|
1029
|
+
...args.explicitQueries,
|
|
1030
|
+
...(args.llmPlan?.queries ?? []),
|
|
1031
|
+
...(args.fallbackQueries ?? []),
|
|
1032
|
+
]);
|
|
1608
1033
|
}
|
|
1609
|
-
function
|
|
1610
|
-
|
|
1034
|
+
function normalizeIsShortPreparationFlag(value) {
|
|
1035
|
+
if (typeof value === "boolean")
|
|
1036
|
+
return value;
|
|
1037
|
+
if (typeof value === "string") {
|
|
1038
|
+
const normalized = value.trim().toLowerCase();
|
|
1039
|
+
if (normalized === "true")
|
|
1040
|
+
return true;
|
|
1041
|
+
if (normalized === "false")
|
|
1042
|
+
return false;
|
|
1043
|
+
}
|
|
1044
|
+
return false;
|
|
1611
1045
|
}
|
|
1612
1046
|
function resolveCreateEventDurationMinutes(args) {
|
|
1613
|
-
const { explicitDuration, extractedDuration,
|
|
1047
|
+
const { explicitDuration, extractedDuration, isShortPreparation, hasExplicitEndAt, hasExplicitWindowPreset, hasExplicitStartAt, } = args;
|
|
1614
1048
|
if (typeof explicitDuration === "number" &&
|
|
1615
1049
|
Number.isFinite(explicitDuration)) {
|
|
1616
1050
|
return explicitDuration > 0 ? explicitDuration : undefined;
|
|
@@ -1620,14 +1054,14 @@ function resolveCreateEventDurationMinutes(args) {
|
|
|
1620
1054
|
if (extractedDuration > 0) {
|
|
1621
1055
|
return extractedDuration;
|
|
1622
1056
|
}
|
|
1623
|
-
if (
|
|
1057
|
+
if (isShortPreparation &&
|
|
1624
1058
|
(hasExplicitStartAt || hasExplicitWindowPreset)) {
|
|
1625
1059
|
return MIN_CREATE_EVENT_DURATION_MINUTES;
|
|
1626
1060
|
}
|
|
1627
1061
|
return undefined;
|
|
1628
1062
|
}
|
|
1629
1063
|
if (!hasExplicitEndAt &&
|
|
1630
|
-
|
|
1064
|
+
isShortPreparation &&
|
|
1631
1065
|
(hasExplicitStartAt || hasExplicitWindowPreset)) {
|
|
1632
1066
|
return MIN_CREATE_EVENT_DURATION_MINUTES;
|
|
1633
1067
|
}
|
|
@@ -1703,8 +1137,7 @@ function buildCreateEventRequest(args) {
|
|
|
1703
1137
|
const durationMinutes = resolveCreateEventDurationMinutes({
|
|
1704
1138
|
explicitDuration: explicitDuration,
|
|
1705
1139
|
extractedDuration,
|
|
1706
|
-
|
|
1707
|
-
title: title ?? args.fallbackRequest?.title ?? "",
|
|
1140
|
+
isShortPreparation: normalizeIsShortPreparationFlag(args.extractedDetails.isShortPreparation),
|
|
1708
1141
|
hasExplicitEndAt: Boolean(rawEndAt),
|
|
1709
1142
|
hasExplicitWindowPreset: Boolean(resolvedWindowPreset),
|
|
1710
1143
|
hasExplicitStartAt: Boolean(resolvedStartAt),
|
|
@@ -1719,6 +1152,7 @@ function buildCreateEventRequest(args) {
|
|
|
1719
1152
|
request: {
|
|
1720
1153
|
mode: detailString(args.details, "mode") ?? args.fallbackRequest?.mode,
|
|
1721
1154
|
side: (detailString(args.details, "side") ?? args.fallbackRequest?.side),
|
|
1155
|
+
grantId: detailString(args.details, "grantId"),
|
|
1722
1156
|
calendarId: detailString(args.details, "calendarId") ??
|
|
1723
1157
|
args.fallbackRequest?.calendarId,
|
|
1724
1158
|
title: title ?? "",
|
|
@@ -1750,6 +1184,7 @@ function createEventRequestFingerprint(request) {
|
|
|
1750
1184
|
calendarId: request.calendarId ?? null,
|
|
1751
1185
|
side: request.side ?? null,
|
|
1752
1186
|
mode: request.mode ?? null,
|
|
1187
|
+
grantId: request.grantId ?? null,
|
|
1753
1188
|
});
|
|
1754
1189
|
}
|
|
1755
1190
|
function formatCreateEventRecentConversation(state) {
|
|
@@ -1819,6 +1254,7 @@ async function inferCreateEventDetails(runtime, message, state, intent, calendar
|
|
|
1819
1254
|
"Return XML only. No prose. Leave fields empty when unknown.",
|
|
1820
1255
|
"If a start time or window is implied but duration is not explicit, infer a reasonable positive duration.",
|
|
1821
1256
|
"For short prep or reminder blocks, use at least 15 minutes instead of 0.",
|
|
1257
|
+
"Set isShortPreparation=true when the event is a brief prep/reminder/leave-for/get-ready block (any language) where 15 minutes is the right default.",
|
|
1822
1258
|
"When the user gives a concrete day or date without an exact time-of-day, use the calendar context to infer a plausible open startAt in the calendar timezone. Avoid obvious overlaps with nearby events. If the calendar context is unavailable or the timing is ambiguous, leave startAt empty.",
|
|
1823
1259
|
"Only use windowPreset for explicit 'tomorrow morning|afternoon|evening' phrasing — never as a fallback for arbitrary dates.",
|
|
1824
1260
|
"",
|
|
@@ -1831,6 +1267,7 @@ async function inferCreateEventDetails(runtime, message, state, intent, calendar
|
|
|
1831
1267
|
" <durationMinutes>number if implied</durationMinutes>",
|
|
1832
1268
|
" <windowPreset>tomorrow_morning|tomorrow_afternoon|tomorrow_evening</windowPreset>",
|
|
1833
1269
|
" <timeZone>IANA timezone if stated</timeZone>",
|
|
1270
|
+
" <isShortPreparation>true|false</isShortPreparation>",
|
|
1834
1271
|
"</response>",
|
|
1835
1272
|
"",
|
|
1836
1273
|
`Current timezone: ${timeZone}`,
|
|
@@ -2037,14 +1474,12 @@ function scoreCalendarEvent(event, query) {
|
|
|
2037
1474
|
score +=
|
|
2038
1475
|
queryTokens.filter((token) => attendeeTokenSet.has(token)).length * 8;
|
|
2039
1476
|
}
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
1477
|
+
// (Earlier revisions added an English-only "return/back/home" boost and a
|
|
1478
|
+
// counter-penalty against generic flight/travel/trip events. Token matching
|
|
1479
|
+
// above already covers any language; the boost was multilingual-hostile and
|
|
1480
|
+
// produced wrong results when the user said the equivalent in another
|
|
1481
|
+
// language. The grounded LLM disambiguation step picks the right match
|
|
1482
|
+
// when token scores are tied.)
|
|
2048
1483
|
const dateTerms = eventDateSearchTerms(event);
|
|
2049
1484
|
if ([...dateTerms].some((term) => term === normalizedQuery ||
|
|
2050
1485
|
normalizedQuery.includes(term) ||
|
|
@@ -2165,9 +1600,6 @@ async function groundCalendarSearchMatchesWithLlm(runtime, state, intent, querie
|
|
|
2165
1600
|
return null;
|
|
2166
1601
|
}
|
|
2167
1602
|
}
|
|
2168
|
-
function isTravelEvent(event) {
|
|
2169
|
-
return /\b(flight|fly|travel|trip|hotel|stay|lodging|airbnb|check[- ]?in|check[- ]?out|return|home)\b/i.test(`${event.title} ${event.description} ${event.location}`);
|
|
2170
|
-
}
|
|
2171
1603
|
function eventStartMs(event) {
|
|
2172
1604
|
return Date.parse(event.startAt);
|
|
2173
1605
|
}
|
|
@@ -2179,10 +1611,14 @@ function eventEndMs(event) {
|
|
|
2179
1611
|
return eventStartMs(event);
|
|
2180
1612
|
}
|
|
2181
1613
|
function resolveTripWindowEvents(events, location) {
|
|
1614
|
+
// Trip-window anchoring is driven entirely by location-token matching via
|
|
1615
|
+
// scoreCalendarEvent. The previous English-only "travel keyword" boost
|
|
1616
|
+
// (flight/hotel/airbnb/...) was multilingual-hostile; the LLM trip_window
|
|
1617
|
+
// planner already supplies a location, so location matching alone is enough.
|
|
2182
1618
|
const anchors = events
|
|
2183
1619
|
.map((event) => ({
|
|
2184
1620
|
event,
|
|
2185
|
-
score: scoreCalendarEvent(event, location)
|
|
1621
|
+
score: scoreCalendarEvent(event, location),
|
|
2186
1622
|
}))
|
|
2187
1623
|
.filter((candidate) => candidate.score > 0)
|
|
2188
1624
|
.sort((left, right) => eventStartMs(left.event) - eventStartMs(right.event));
|
|
@@ -2215,17 +1651,20 @@ function formatTripWindowResults(events, location) {
|
|
|
2215
1651
|
}
|
|
2216
1652
|
return lines.join("\n");
|
|
2217
1653
|
}
|
|
2218
|
-
function formatCalendarSearchResults(events, query, label
|
|
1654
|
+
function formatCalendarSearchResults(events, query, label) {
|
|
2219
1655
|
if (events.length === 0) {
|
|
2220
1656
|
return `No calendar events matched "${query}" ${label}.`;
|
|
2221
1657
|
}
|
|
2222
1658
|
if (events.length === 1) {
|
|
2223
|
-
const event = events
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
1659
|
+
const event = events.at(0);
|
|
1660
|
+
if (!event) {
|
|
1661
|
+
return `No calendar events matched "${query}" ${label}.`;
|
|
1662
|
+
}
|
|
1663
|
+
// The fallback wording is intentionally generic ("calendar event") so it
|
|
1664
|
+
// is correct in any language. The grounded LLM reply renderer is what
|
|
1665
|
+
// gives this string its final natural phrasing — no English keyword
|
|
1666
|
+
// regex picks the noun anymore.
|
|
1667
|
+
return `Your matching calendar event is **${event.title}** (${formatCalendarMoment(event)}).`;
|
|
2229
1668
|
}
|
|
2230
1669
|
const lines = [
|
|
2231
1670
|
`Found ${events.length} calendar event${events.length === 1 ? "" : "s"} for "${query}" ${label}:`,
|
|
@@ -2284,6 +1723,11 @@ export const calendarAction = {
|
|
|
2284
1723
|
similes: [
|
|
2285
1724
|
"CALENDAR",
|
|
2286
1725
|
"CHECK_CALENDAR",
|
|
1726
|
+
"SHOW_CALENDAR_TODAY",
|
|
1727
|
+
"TODAY_SCHEDULE",
|
|
1728
|
+
"WEEK_AHEAD",
|
|
1729
|
+
"WEEK_VIEW",
|
|
1730
|
+
"WHATS_MY_NEXT_MEETING",
|
|
2287
1731
|
"SCHEDULE_EVENT",
|
|
2288
1732
|
"CREATE_CALENDAR_EVENT",
|
|
2289
1733
|
"SEARCH_CALENDAR",
|
|
@@ -2291,20 +1735,33 @@ export const calendarAction = {
|
|
|
2291
1735
|
"ITINERARY",
|
|
2292
1736
|
"TRAVEL_SCHEDULE",
|
|
2293
1737
|
"CHECK_SCHEDULE",
|
|
1738
|
+
"BOOK_TIME_BLOCK",
|
|
1739
|
+
"RECURRING_TIME_BLOCK",
|
|
1740
|
+
"REBOOK_TRAVEL",
|
|
1741
|
+
],
|
|
1742
|
+
tags: [
|
|
1743
|
+
"always-include",
|
|
1744
|
+
"calendar",
|
|
1745
|
+
"schedule",
|
|
1746
|
+
"meeting",
|
|
1747
|
+
"event",
|
|
1748
|
+
"recurring block",
|
|
1749
|
+
"time block",
|
|
1750
|
+
"travel itinerary",
|
|
2294
1751
|
],
|
|
2295
1752
|
description: "Interact with Google Calendar through LifeOps. " +
|
|
2296
1753
|
"USE this action for: viewing today's or this week's schedule; checking the next upcoming event; " +
|
|
2297
1754
|
"searching events by title, attendee, location, or date range; creating new calendar events; " +
|
|
2298
|
-
"
|
|
1755
|
+
"requests like 'what's my next meeting?', 'show me my calendar for today', 'what does my week look like?', or 'schedule a dentist appointment next Tuesday at 3pm'; " +
|
|
1756
|
+
"querying travel itineraries, flights, hotel stays, trip windows, reserving recurring time blocks, and rebooking or moving calendar-backed commitments. " +
|
|
1757
|
+
"These are live calendar reads and writes, so do not answer them from provider context alone and do not fall back to NONE or REPLY when this action is available. " +
|
|
2299
1758
|
"DO NOT use this action for email inbox work, drafting or sending emails — use GMAIL_ACTION instead. " +
|
|
2300
1759
|
"DO NOT use this action for personal habits, goals, routines, or reminders — use LIFE instead. " +
|
|
2301
1760
|
"This action provides the final grounded reply; do not pair it with a speculative REPLY action.",
|
|
1761
|
+
descriptionCompressed: "Google Calendar via LifeOps: view schedule, search events, create events, query travel. Not for email or habits.",
|
|
2302
1762
|
suppressPostActionContinuation: true,
|
|
2303
|
-
validate: async (runtime, message
|
|
2304
|
-
|
|
2305
|
-
return false;
|
|
2306
|
-
}
|
|
2307
|
-
return hasCalendarContextSignal(message, state);
|
|
1763
|
+
validate: async (runtime, message) => {
|
|
1764
|
+
return hasLifeOpsAccess(runtime, message);
|
|
2308
1765
|
},
|
|
2309
1766
|
handler: async (runtime, message, state, options, callback) => {
|
|
2310
1767
|
if (!(await hasLifeOpsAccess(runtime, message))) {
|
|
@@ -2317,30 +1774,32 @@ export const calendarAction = {
|
|
|
2317
1774
|
}
|
|
2318
1775
|
const rawParams = options?.parameters;
|
|
2319
1776
|
const params = rawParams ?? {};
|
|
2320
|
-
const intent =
|
|
1777
|
+
const intent = resolveCalendarIntentInput(params.intent, message);
|
|
2321
1778
|
const details = normalizeCalendarDetails(params.details);
|
|
2322
1779
|
const planningTimeZone = resolveCalendarTimeZone(details);
|
|
2323
1780
|
const llmPlan = await extractCalendarPlanWithLlm(runtime, message, state, intent, planningTimeZone);
|
|
2324
|
-
const
|
|
2325
|
-
const inferredQuery = sanitizeCalendarQuery(params.query ?? detailString(details, "query"), intent);
|
|
2326
|
-
const inferredQueries = dedupeCalendarQueries([
|
|
2327
|
-
inferredQuery,
|
|
2328
|
-
...llmPlan.queries,
|
|
2329
|
-
...(params.queries ?? []),
|
|
2330
|
-
...(detailArray(details, "queries")?.map((value) => typeof value === "string" ? value : undefined) ?? []),
|
|
2331
|
-
]);
|
|
1781
|
+
const explicitSubaction = normalizeCalendarSubaction(params.subaction);
|
|
2332
1782
|
const explicitTitle = (typeof params.title === "string" && params.title.trim().length > 0
|
|
2333
1783
|
? params.title.trim()
|
|
2334
1784
|
: undefined) ??
|
|
2335
1785
|
detailString(details, "title") ??
|
|
2336
1786
|
llmPlan.title;
|
|
2337
|
-
const inferredTitle = explicitTitle ?? llmPlan.title
|
|
1787
|
+
const inferredTitle = explicitTitle ?? llmPlan.title;
|
|
2338
1788
|
const tripWindowIntent = llmPlan.tripLocation && llmPlan.tripLocation.trim().length > 0
|
|
2339
1789
|
? { location: llmPlan.tripLocation.trim() }
|
|
2340
|
-
:
|
|
2341
|
-
const
|
|
2342
|
-
|
|
2343
|
-
|
|
1790
|
+
: null;
|
|
1791
|
+
const searchQueries = resolveCalendarSearchQueries({
|
|
1792
|
+
explicitQueries: [
|
|
1793
|
+
params.query,
|
|
1794
|
+
detailString(details, "query"),
|
|
1795
|
+
...(params.queries ?? []),
|
|
1796
|
+
...(detailArray(details, "queries")?.map((value) => typeof value === "string" ? value : undefined) ?? []),
|
|
1797
|
+
],
|
|
1798
|
+
llmPlan,
|
|
1799
|
+
fallbackQueries: [tripWindowIntent?.location],
|
|
1800
|
+
});
|
|
1801
|
+
const structuredSubaction = resolveStructuredCalendarSubaction(params, details);
|
|
1802
|
+
const hasExplicitCalendarExecutionInput = Boolean(explicitSubaction ||
|
|
2344
1803
|
params.title ||
|
|
2345
1804
|
params.query ||
|
|
2346
1805
|
(params.queries?.length ?? 0) > 0 ||
|
|
@@ -2352,46 +1811,13 @@ export const calendarAction = {
|
|
|
2352
1811
|
detailString(details, "location") ||
|
|
2353
1812
|
detailString(details, "windowPreset") ||
|
|
2354
1813
|
detailNumber(details, "windowDays"));
|
|
2355
|
-
const
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
return "update_event";
|
|
2360
|
-
}
|
|
2361
|
-
if (/\b(delete|remove|cancel|drop|get rid of|trash|kill)\b.*\b(event|meeting|appointment|calendar|invite)\b/.test(text) ||
|
|
2362
|
-
/\b(delete|remove|cancel)\b.+\b(today|tomorrow|tonight|this week|next week)\b/.test(text)) {
|
|
2363
|
-
return "delete_event";
|
|
2364
|
-
}
|
|
2365
|
-
if (/\b(create|add|book|schedule|make|put)\b[^.?!]*\b(event|meeting|appointment|invite|calendar)\b/.test(text)) {
|
|
2366
|
-
return "create_event";
|
|
2367
|
-
}
|
|
2368
|
-
if (/\b(show|list|tell|give|read)\b[^.?!]*\b(all|every|everything|entire|full|whole)\b[^.?!]*\b(event|events|calendar|schedule|meeting|meetings|appointment|appointments|entry|entries|agenda)\b/.test(text) ||
|
|
2369
|
-
/\b(all|every|everything)\b\s+(?:my\s+)?(?:calendar|events?|meetings?|appointments?)\b/.test(text)) {
|
|
2370
|
-
return "feed";
|
|
2371
|
-
}
|
|
2372
|
-
return null;
|
|
2373
|
-
})();
|
|
2374
|
-
let subaction;
|
|
2375
|
-
if (tripWindowIntent) {
|
|
2376
|
-
subaction = "trip_window";
|
|
2377
|
-
}
|
|
2378
|
-
else if (forcedSubaction) {
|
|
2379
|
-
subaction = forcedSubaction;
|
|
2380
|
-
}
|
|
2381
|
-
else if (llmPlan.subaction && !preferExplicitSubaction) {
|
|
2382
|
-
subaction = llmPlan.subaction;
|
|
2383
|
-
}
|
|
2384
|
-
else if (params.subaction) {
|
|
2385
|
-
subaction = params.subaction;
|
|
2386
|
-
}
|
|
2387
|
-
else {
|
|
2388
|
-
runtime.logger?.warn?.({ src: "action:calendar", intent }, "Calendar LLM plan returned no subaction; falling back to regex inference");
|
|
2389
|
-
subaction = inferCalendarSubaction(normalizeText(intent), details, inferredQuery ?? heuristicQuery);
|
|
2390
|
-
}
|
|
1814
|
+
const subaction = explicitSubaction ??
|
|
1815
|
+
llmPlan.subaction ??
|
|
1816
|
+
(tripWindowIntent ? "trip_window" : null) ??
|
|
1817
|
+
structuredSubaction;
|
|
2391
1818
|
runtime.logger?.debug?.({
|
|
2392
1819
|
src: "action:calendar",
|
|
2393
1820
|
subaction,
|
|
2394
|
-
forcedSubaction,
|
|
2395
1821
|
rawMessage: messageText(message).slice(0, 200),
|
|
2396
1822
|
resolvedIntent: intent.slice(0, 200),
|
|
2397
1823
|
params: {
|
|
@@ -2419,26 +1845,25 @@ export const calendarAction = {
|
|
|
2419
1845
|
fallback,
|
|
2420
1846
|
context,
|
|
2421
1847
|
});
|
|
2422
|
-
if (
|
|
2423
|
-
!
|
|
2424
|
-
!
|
|
2425
|
-
|
|
2426
|
-
const fallback = "That sounds like a reminder or todo rather than a calendar event. Tell me the reminder and when it should happen.";
|
|
1848
|
+
if (llmPlan.shouldAct === false &&
|
|
1849
|
+
!hasExplicitCalendarExecutionInput &&
|
|
1850
|
+
!explicitSubaction) {
|
|
1851
|
+
const fallback = llmPlan.response ?? buildCalendarReplyOnlyFallback(llmPlan.subaction);
|
|
2427
1852
|
return respond({
|
|
2428
1853
|
success: true,
|
|
2429
|
-
text: await renderReply("
|
|
2430
|
-
|
|
1854
|
+
text: await renderReply("reply_only", fallback, {
|
|
1855
|
+
llmPlan,
|
|
1856
|
+
suggestedSubaction: llmPlan.subaction,
|
|
2431
1857
|
}),
|
|
2432
1858
|
data: {
|
|
2433
1859
|
noop: true,
|
|
2434
|
-
|
|
1860
|
+
...(llmPlan.subaction
|
|
1861
|
+
? { suggestedSubaction: llmPlan.subaction }
|
|
1862
|
+
: {}),
|
|
2435
1863
|
},
|
|
2436
1864
|
});
|
|
2437
1865
|
}
|
|
2438
|
-
if (
|
|
2439
|
-
!hasExplicitCalendarExecutionInput &&
|
|
2440
|
-
!forcedSubaction &&
|
|
2441
|
-
!tripWindowIntent) {
|
|
1866
|
+
if (!subaction) {
|
|
2442
1867
|
const fallback = llmPlan.response ?? buildCalendarReplyOnlyFallback(llmPlan.subaction);
|
|
2443
1868
|
return respond({
|
|
2444
1869
|
success: true,
|
|
@@ -2598,47 +2023,37 @@ export const calendarAction = {
|
|
|
2598
2023
|
text: calendarWriteUnavailableMessage(google),
|
|
2599
2024
|
});
|
|
2600
2025
|
}
|
|
2601
|
-
// Parse "rename X to Y" / "change X to Y" patterns directly from
|
|
2602
|
-
// the user message. The chat LLM tends to put only the NEW title in
|
|
2603
|
-
// params.title, but we need the OLD title to find the event we're
|
|
2604
|
-
// patching. Pull both halves from the literal phrase if it's there.
|
|
2605
|
-
// We try the raw message first because resolveCalendarIntent may
|
|
2606
|
-
// have replaced the user's text with the LLM's rewritten version,
|
|
2607
|
-
// which often drops "rename" entirely.
|
|
2608
|
-
const rawMessageText = messageText(message);
|
|
2609
|
-
const renamePattern = /\b(?:rename|change|update|edit)\b\s+["“]?([^"”]+?)["”]?\s+(?:to|into|as)\s+["“]?([^"”]+?)["”]?(?:[.!?]|$)/i;
|
|
2610
|
-
const renameMatch = rawMessageText.match(renamePattern) ?? intent.match(renamePattern);
|
|
2611
|
-
const oldTitleFromIntent = renameMatch?.[1]?.trim();
|
|
2612
|
-
const newTitleFromIntent = renameMatch?.[2]?.trim();
|
|
2613
2026
|
const explicitEventId = detailString(details, "eventId");
|
|
2614
2027
|
let resolvedEventId = explicitEventId;
|
|
2615
2028
|
let resolvedCalendarId = detailString(details, "calendarId");
|
|
2616
2029
|
let targetEvent = null;
|
|
2617
|
-
// Same lookup-by-title fallback as delete_event so the user can say
|
|
2618
|
-
// "rename my dentist appointment to dentist follow-up" without first
|
|
2619
|
-
// copying an opaque google id.
|
|
2620
2030
|
if (!resolvedEventId) {
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
const
|
|
2031
|
+
const titleHint = searchQueries[0];
|
|
2032
|
+
if (!titleHint) {
|
|
2033
|
+
return respond({
|
|
2034
|
+
success: false,
|
|
2035
|
+
text: await renderReply("clarify_update_event_target", "Tell me which calendar event you want to change by title, person, place, or date.", {
|
|
2036
|
+
missing: ["target event"],
|
|
2037
|
+
}),
|
|
2038
|
+
});
|
|
2039
|
+
}
|
|
2040
|
+
const feedRequest = detailString(details, "timeMin") ||
|
|
2041
|
+
detailString(details, "timeMax") ||
|
|
2042
|
+
llmPlan.timeMin ||
|
|
2043
|
+
llmPlan.timeMax
|
|
2044
|
+
? resolveCalendarWindow(intent, details, true, llmPlan).request
|
|
2045
|
+
: {
|
|
2046
|
+
calendarId: detailString(details, "calendarId"),
|
|
2047
|
+
timeZone: resolveCalendarTimeZone(details),
|
|
2048
|
+
...buildWideLookupRange(resolveCalendarTimeZone(details)),
|
|
2049
|
+
};
|
|
2631
2050
|
const feed = await service.getCalendarFeed(INTERNAL_URL, {
|
|
2632
2051
|
mode: detailString(details, "mode"),
|
|
2633
2052
|
side: detailString(details, "side"),
|
|
2634
|
-
|
|
2635
|
-
timeZone: resolveCalendarTimeZone(details),
|
|
2053
|
+
grantId: detailString(details, "grantId"),
|
|
2636
2054
|
forceSync: true,
|
|
2637
|
-
...
|
|
2055
|
+
...feedRequest,
|
|
2638
2056
|
});
|
|
2639
|
-
// Prefer the OLD title parsed from "rename X to Y" — explicit
|
|
2640
|
-
// title from the chat LLM almost always carries the NEW name.
|
|
2641
|
-
const titleHint = oldTitleFromIntent ?? explicitTitle ?? inferredTitle;
|
|
2642
2057
|
const candidates = titleHint
|
|
2643
2058
|
? feed.events.filter((e) => normalizeText(e.title).includes(normalizeText(titleHint)))
|
|
2644
2059
|
: feed.events;
|
|
@@ -2668,47 +2083,22 @@ export const calendarAction = {
|
|
|
2668
2083
|
}),
|
|
2669
2084
|
});
|
|
2670
2085
|
}
|
|
2671
|
-
targetEvent = candidates
|
|
2086
|
+
targetEvent = candidates.at(0) ?? null;
|
|
2087
|
+
if (!targetEvent) {
|
|
2088
|
+
return respond({
|
|
2089
|
+
success: false,
|
|
2090
|
+
text: await renderReply("update_event_not_found", "i couldn't find a unique event to update.", { titleHint }),
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2672
2093
|
resolvedEventId = targetEvent.externalId;
|
|
2673
2094
|
resolvedCalendarId = targetEvent.calendarId;
|
|
2674
2095
|
}
|
|
2675
|
-
const newTitle =
|
|
2676
|
-
detailString(details, "newTitle") ??
|
|
2677
|
-
explicitTitle;
|
|
2678
|
-
// Reuse the same LLM extractor that create_event uses to pull
|
|
2679
|
-
// startAt / endAt / location / description out of the user's intent
|
|
2680
|
-
// text. The chat LLM rarely populates `details.startAt` directly for
|
|
2681
|
-
// an update — it just rewrites the intent and lets the action figure
|
|
2682
|
-
// out the time. Without this we'd PATCH with no fields and the
|
|
2683
|
-
// event wouldn't actually move.
|
|
2684
|
-
//
|
|
2685
|
-
// CRITICAL: only run the extractor when the user actually mentioned
|
|
2686
|
-
// a time. For pure rename intents like "rename X to Y" the LLM will
|
|
2687
|
-
// happily hallucinate a startAt from the year in the new title
|
|
2688
|
-
// ("rename my party 2027 to ..." → startAt 2027-01-01), and a
|
|
2689
|
-
// PATCH with start.dateTime but no matching end.dateTime triggers
|
|
2690
|
-
// Google's "Bad Request" rejection. Detect time keywords in the
|
|
2691
|
-
// raw message before invoking the extractor.
|
|
2096
|
+
const newTitle = detailString(details, "newTitle") ?? explicitTitle;
|
|
2692
2097
|
const explicitStartAtForUpdate = detailString(details, "startAt");
|
|
2693
2098
|
const explicitEndAtForUpdate = detailString(details, "endAt");
|
|
2694
|
-
const
|
|
2695
|
-
const hasTimeAnchor = /\b(at|on|by|from|until)\s+\d/.test(rawForUpdate) ||
|
|
2696
|
-
/\b(today|tomorrow|tonight|monday|tuesday|wednesday|thursday|friday|saturday|sunday|january|february|march|april|may|june|july|august|september|october|november|december)\b/.test(rawForUpdate) ||
|
|
2697
|
-
/\b\d{1,2}(?::\d{2})?\s*(?:am|pm)\b/.test(rawForUpdate) ||
|
|
2698
|
-
/\b\d{1,2}\/\d{1,2}(?:\/\d{2,4})?\b/.test(rawForUpdate);
|
|
2699
|
-
const hasRelativeShiftCue = /\b(?:later|earlier|push back|push it back|bring forward|move forward|move back|delay|postpone|advance)\b/.test(rawForUpdate);
|
|
2700
|
-
const needsTimeExtraction = (hasTimeAnchor || hasRelativeShiftCue) &&
|
|
2701
|
-
!(explicitStartAtForUpdate ||
|
|
2702
|
-
explicitEndAtForUpdate ||
|
|
2703
|
-
detailNumber(details, "durationMinutes"));
|
|
2704
|
-
const shouldInferUpdateDetails = Boolean(targetEvent) &&
|
|
2705
|
-
(needsTimeExtraction ||
|
|
2706
|
-
/\b(?:rename|change|move|reschedule|update|edit|location|description|notes)\b/.test(rawForUpdate));
|
|
2707
|
-
const extractedForUpdate = shouldInferUpdateDetails
|
|
2099
|
+
const extractedForUpdate = targetEvent
|
|
2708
2100
|
? await inferUpdateEventDetails(runtime, message, state, intent, targetEvent, targetEvent?.timezone ?? planningTimeZone)
|
|
2709
|
-
:
|
|
2710
|
-
? await inferCreateEventDetails(runtime, message, state, intent, null, targetEvent?.timezone ?? planningTimeZone)
|
|
2711
|
-
: {};
|
|
2101
|
+
: {};
|
|
2712
2102
|
const extractedStartAt = typeof extractedForUpdate.startAt === "string"
|
|
2713
2103
|
? extractedForUpdate.startAt.trim()
|
|
2714
2104
|
: undefined;
|
|
@@ -2727,6 +2117,7 @@ export const calendarAction = {
|
|
|
2727
2117
|
const event = await service.updateCalendarEvent(INTERNAL_URL, {
|
|
2728
2118
|
mode: detailString(details, "mode"),
|
|
2729
2119
|
side: detailString(details, "side"),
|
|
2120
|
+
grantId: detailString(details, "grantId"),
|
|
2730
2121
|
calendarId: resolvedCalendarId,
|
|
2731
2122
|
eventId: resolvedEventId ?? "",
|
|
2732
2123
|
title: newTitle,
|
|
@@ -2760,22 +2151,24 @@ export const calendarAction = {
|
|
|
2760
2151
|
}
|
|
2761
2152
|
const explicitEventId = detailString(details, "eventId");
|
|
2762
2153
|
const calendarIdForDelete = detailString(details, "calendarId");
|
|
2763
|
-
// The LLM may not know the event id directly. Fall back to a feed
|
|
2764
|
-
// lookup so phrases like "delete the duplicate test event tomorrow"
|
|
2765
|
-
// can resolve to a concrete event without forcing the user to copy
|
|
2766
|
-
// an opaque google id from the bot's previous reply.
|
|
2767
2154
|
const resolvedEventId = explicitEventId;
|
|
2768
2155
|
let resolvedEventTitle;
|
|
2769
2156
|
const resolvedCalendarId = calendarIdForDelete;
|
|
2770
2157
|
if (!resolvedEventId) {
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2158
|
+
const titleHint = searchQueries[0];
|
|
2159
|
+
if (!titleHint) {
|
|
2160
|
+
return respond({
|
|
2161
|
+
success: false,
|
|
2162
|
+
text: await renderReply("clarify_delete_event_target", "Tell me which calendar event you want to delete by title, person, place, or date.", {
|
|
2163
|
+
missing: ["target event"],
|
|
2164
|
+
}),
|
|
2165
|
+
});
|
|
2166
|
+
}
|
|
2167
|
+
const feedRequest = detailString(details, "timeMin") ||
|
|
2168
|
+
detailString(details, "timeMax") ||
|
|
2169
|
+
llmPlan.timeMin ||
|
|
2170
|
+
llmPlan.timeMax
|
|
2171
|
+
? resolveCalendarWindow(intent, details, true, llmPlan).request
|
|
2779
2172
|
: {
|
|
2780
2173
|
calendarId: detailString(details, "calendarId"),
|
|
2781
2174
|
timeZone: resolveCalendarTimeZone(details),
|
|
@@ -2784,10 +2177,10 @@ export const calendarAction = {
|
|
|
2784
2177
|
const feed = await service.getCalendarFeed(INTERNAL_URL, {
|
|
2785
2178
|
mode: detailString(details, "mode"),
|
|
2786
2179
|
side: detailString(details, "side"),
|
|
2180
|
+
grantId: detailString(details, "grantId"),
|
|
2787
2181
|
forceSync: true,
|
|
2788
2182
|
...feedRequest,
|
|
2789
2183
|
});
|
|
2790
|
-
const titleHint = explicitTitle ?? inferredTitle;
|
|
2791
2184
|
const candidates = titleHint
|
|
2792
2185
|
? feed.events.filter((e) => normalizeText(e.title).includes(normalizeText(titleHint)))
|
|
2793
2186
|
: feed.events;
|
|
@@ -2802,14 +2195,7 @@ export const calendarAction = {
|
|
|
2802
2195
|
}),
|
|
2803
2196
|
});
|
|
2804
2197
|
}
|
|
2805
|
-
|
|
2806
|
-
// user explicitly opts in to multi-delete, sweep every match.
|
|
2807
|
-
const deleteAllMatch = shouldDeleteAllMatchingCalendarEvents({
|
|
2808
|
-
intent,
|
|
2809
|
-
titleHint,
|
|
2810
|
-
candidateCount: candidates.length,
|
|
2811
|
-
});
|
|
2812
|
-
if (candidates.length > 1 && !deleteAllMatch) {
|
|
2198
|
+
if (candidates.length > 1) {
|
|
2813
2199
|
const fallback = buildCalendarEventDisambiguationFallback({
|
|
2814
2200
|
action: "delete",
|
|
2815
2201
|
candidates,
|
|
@@ -2824,13 +2210,14 @@ export const calendarAction = {
|
|
|
2824
2210
|
}),
|
|
2825
2211
|
});
|
|
2826
2212
|
}
|
|
2827
|
-
const targets =
|
|
2213
|
+
const targets = candidates.slice(0, 1);
|
|
2828
2214
|
const deleteResults = [];
|
|
2829
2215
|
for (const target of targets) {
|
|
2830
2216
|
try {
|
|
2831
2217
|
await service.deleteCalendarEvent(INTERNAL_URL, {
|
|
2832
2218
|
mode: detailString(details, "mode"),
|
|
2833
2219
|
side: detailString(details, "side"),
|
|
2220
|
+
grantId: detailString(details, "grantId"),
|
|
2834
2221
|
calendarId: target.calendarId,
|
|
2835
2222
|
eventId: target.externalId,
|
|
2836
2223
|
});
|
|
@@ -2850,9 +2237,12 @@ export const calendarAction = {
|
|
|
2850
2237
|
title: result.title,
|
|
2851
2238
|
ok: result.ok,
|
|
2852
2239
|
}));
|
|
2240
|
+
const firstDeleteResult = deleteResults.at(0);
|
|
2853
2241
|
const summary = failCount === 0
|
|
2854
2242
|
? targets.length === 1
|
|
2855
|
-
?
|
|
2243
|
+
? firstDeleteResult
|
|
2244
|
+
? `deleted "${firstDeleteResult.title}".`
|
|
2245
|
+
: "deleted that event."
|
|
2856
2246
|
: `deleted ${okCount} matching events.`
|
|
2857
2247
|
: okCount === 0
|
|
2858
2248
|
? `I couldn't delete those ${deleteResults.length} matching events. Try again in a bit or tell me which one to remove.`
|
|
@@ -2878,6 +2268,7 @@ export const calendarAction = {
|
|
|
2878
2268
|
await service.deleteCalendarEvent(INTERNAL_URL, {
|
|
2879
2269
|
mode: detailString(details, "mode"),
|
|
2880
2270
|
side: detailString(details, "side"),
|
|
2271
|
+
grantId: detailString(details, "grantId"),
|
|
2881
2272
|
calendarId: resolvedCalendarId,
|
|
2882
2273
|
eventId: resolvedEventId,
|
|
2883
2274
|
});
|
|
@@ -2901,6 +2292,7 @@ export const calendarAction = {
|
|
|
2901
2292
|
const feed = await service.getCalendarFeed(INTERNAL_URL, {
|
|
2902
2293
|
mode: detailString(details, "mode"),
|
|
2903
2294
|
side: detailString(details, "side"),
|
|
2295
|
+
grantId: detailString(details, "grantId"),
|
|
2904
2296
|
...resolveTripWindowRequest(details, llmPlan),
|
|
2905
2297
|
});
|
|
2906
2298
|
const itineraryEvents = resolveTripWindowEvents(feed.events, tripWindowIntent.location);
|
|
@@ -2939,30 +2331,16 @@ export const calendarAction = {
|
|
|
2939
2331
|
// events" returns "no events today" even when the calendar has
|
|
2940
2332
|
// dozens of upcoming items. We apply this regardless of whether the
|
|
2941
2333
|
// chat LLM picked feed or search_events because both subactions go
|
|
2942
|
-
|
|
2943
|
-
const
|
|
2944
|
-
const
|
|
2945
|
-
/\b(next|past|last)\s+\d+\s*(year|years|month|months|weeks?)\b/.test(rawMessageNorm) ||
|
|
2946
|
-
/\b(today\s+(?:until|through|to)\s+next\s+(?:year|month))\b/.test(rawMessageNorm) ||
|
|
2947
|
-
/\bevery\s+calendar\s+entry\b/.test(rawMessageNorm);
|
|
2948
|
-
const baseResolved = resolveCalendarWindow(intent, details, subaction === "search_events" || wantsWideWindow, llmPlan);
|
|
2949
|
-
const request = wantsWideWindow
|
|
2950
|
-
? {
|
|
2951
|
-
...baseResolved.request,
|
|
2952
|
-
...buildWideLookupRange(resolveCalendarTimeZone(details)),
|
|
2953
|
-
}
|
|
2954
|
-
: baseResolved.request;
|
|
2955
|
-
const label = wantsWideWindow
|
|
2956
|
-
? "across the full window"
|
|
2957
|
-
: baseResolved.label;
|
|
2334
|
+
const baseResolved = resolveCalendarWindow(intent, details, subaction === "search_events", llmPlan);
|
|
2335
|
+
const request = baseResolved.request;
|
|
2336
|
+
const label = baseResolved.label;
|
|
2958
2337
|
const feed = await service.getCalendarFeed(INTERNAL_URL, {
|
|
2959
2338
|
mode: detailString(details, "mode"),
|
|
2960
2339
|
side: detailString(details, "side"),
|
|
2961
|
-
|
|
2340
|
+
grantId: detailString(details, "grantId"),
|
|
2962
2341
|
...request,
|
|
2963
2342
|
});
|
|
2964
2343
|
if (subaction === "search_events") {
|
|
2965
|
-
const searchQueries = await resolveCalendarSearchQueries(runtime, message, state, [...inferredQueries], intent, llmPlan, planningTimeZone);
|
|
2966
2344
|
const query = searchQueries[0];
|
|
2967
2345
|
if (!query || searchQueries.length === 0) {
|
|
2968
2346
|
return respond({
|
|
@@ -3009,7 +2387,7 @@ export const calendarAction = {
|
|
|
3009
2387
|
.map((candidate) => candidate.event);
|
|
3010
2388
|
}
|
|
3011
2389
|
}
|
|
3012
|
-
const fallback = formatCalendarSearchResults(filteredEvents, query, label
|
|
2390
|
+
const fallback = formatCalendarSearchResults(filteredEvents, query, label);
|
|
3013
2391
|
return respond({
|
|
3014
2392
|
success: true,
|
|
3015
2393
|
text: await renderReply("search_results", fallback, {
|
|
@@ -3127,6 +2505,18 @@ export const calendarAction = {
|
|
|
3127
2505
|
},
|
|
3128
2506
|
},
|
|
3129
2507
|
],
|
|
2508
|
+
[
|
|
2509
|
+
{
|
|
2510
|
+
name: "{{name1}}",
|
|
2511
|
+
content: { text: "What does my week look like?" },
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
name: "{{agentName}}",
|
|
2515
|
+
content: {
|
|
2516
|
+
text: "This week's calendar includes 4 events, starting with a dentist appointment on Tuesday at 3:00 PM.",
|
|
2517
|
+
},
|
|
2518
|
+
},
|
|
2519
|
+
],
|
|
3130
2520
|
[
|
|
3131
2521
|
{
|
|
3132
2522
|
name: "{{name1}}",
|
|
@@ -3139,5 +2529,47 @@ export const calendarAction = {
|
|
|
3139
2529
|
},
|
|
3140
2530
|
},
|
|
3141
2531
|
],
|
|
2532
|
+
[
|
|
2533
|
+
{
|
|
2534
|
+
name: "{{name1}}",
|
|
2535
|
+
content: {
|
|
2536
|
+
text: "Put a 1:1 with Alex on my calendar Thursday at 10am for 30 minutes.",
|
|
2537
|
+
},
|
|
2538
|
+
},
|
|
2539
|
+
{
|
|
2540
|
+
name: "{{agentName}}",
|
|
2541
|
+
content: {
|
|
2542
|
+
text: 'Created calendar event "1:1 with Alex" for Thursday at 10:00 AM for 30 minutes.',
|
|
2543
|
+
},
|
|
2544
|
+
},
|
|
2545
|
+
],
|
|
2546
|
+
[
|
|
2547
|
+
{
|
|
2548
|
+
name: "{{name1}}",
|
|
2549
|
+
content: {
|
|
2550
|
+
text: "Need to book 1 hour per day for time with Jill. Any time is fine, ideally before sleep.",
|
|
2551
|
+
},
|
|
2552
|
+
},
|
|
2553
|
+
{
|
|
2554
|
+
name: "{{agentName}}",
|
|
2555
|
+
content: {
|
|
2556
|
+
text: "I'll create a recurring daily one-hour block with Jill, placed before your sleep window when possible.",
|
|
2557
|
+
},
|
|
2558
|
+
},
|
|
2559
|
+
],
|
|
2560
|
+
[
|
|
2561
|
+
{
|
|
2562
|
+
name: "{{name1}}",
|
|
2563
|
+
content: {
|
|
2564
|
+
text: "Flag the conflict before my flight later and, if needed, help rebook the other thing.",
|
|
2565
|
+
},
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
name: "{{agentName}}",
|
|
2569
|
+
content: {
|
|
2570
|
+
text: "I'll check the flight against your calendar, flag the conflict, and help move the other commitment if it collides.",
|
|
2571
|
+
},
|
|
2572
|
+
},
|
|
2573
|
+
],
|
|
3142
2574
|
],
|
|
3143
2575
|
};
|