@elizaos/agent 2.0.0-alpha.144 → 2.0.0-alpha.151
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-lifeops/src/actions/inbox-digest.d.ts +2 -0
- package/apps/app-lifeops/src/actions/inbox-digest.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/inbox-digest.js +1 -0
- package/apps/app-lifeops/src/actions/inbox-respond.d.ts +2 -0
- package/apps/app-lifeops/src/actions/inbox-respond.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/inbox-respond.js +1 -0
- package/apps/app-lifeops/src/actions/inbox-triage.d.ts +2 -0
- package/apps/app-lifeops/src/actions/inbox-triage.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/inbox-triage.js +1 -0
- package/apps/app-lifeops/src/actions/inbox.d.ts +3 -0
- package/apps/app-lifeops/src/actions/inbox.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/inbox.js +856 -0
- package/apps/app-lifeops/src/actions/update-owner-profile.d.ts +3 -0
- package/apps/app-lifeops/src/actions/update-owner-profile.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/update-owner-profile.js +131 -0
- package/apps/app-lifeops/src/inbox/channel-deep-links.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/config.d.ts.map +1 -0
- package/{packages/agent → apps/app-lifeops}/src/inbox/config.js +1 -1
- package/apps/app-lifeops/src/inbox/message-fetcher.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/reflection.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/repository.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/triage-classifier.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/types.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/index.d.ts +25 -0
- package/apps/app-lifeops/src/lifeops/index.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/index.js +24 -0
- package/apps/app-lifeops/src/lifeops/screen-context.d.ts +52 -0
- package/apps/app-lifeops/src/lifeops/screen-context.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/screen-context.js +332 -0
- package/apps/app-lifeops/src/plugin.d.ts +3 -0
- package/apps/app-lifeops/src/plugin.d.ts.map +1 -1
- package/apps/app-lifeops/src/plugin.js +16 -3
- package/apps/app-lifeops/src/providers/inbox-triage.d.ts +3 -0
- package/apps/app-lifeops/src/providers/inbox-triage.d.ts.map +1 -0
- package/apps/app-lifeops/src/providers/inbox-triage.js +89 -0
- package/package.json +6 -4
- package/packages/agent/src/actions/calendar.d.ts +1 -18
- package/packages/agent/src/actions/calendar.d.ts.map +1 -1
- package/packages/agent/src/actions/calendar.js +1 -3143
- package/packages/agent/src/actions/check-balance.d.ts +17 -0
- package/packages/agent/src/actions/check-balance.d.ts.map +1 -0
- package/packages/agent/src/actions/check-balance.js +167 -0
- package/packages/agent/src/actions/connector-resolver.d.ts +75 -0
- package/packages/agent/src/actions/connector-resolver.d.ts.map +1 -0
- package/packages/agent/src/actions/connector-resolver.js +245 -0
- 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 +6 -0
- package/packages/agent/src/actions/eject-plugin.d.ts +3 -0
- package/packages/agent/src/actions/eject-plugin.d.ts.map +1 -0
- package/packages/agent/src/actions/eject-plugin.js +48 -0
- package/packages/agent/src/actions/execute-trade.d.ts +17 -0
- package/packages/agent/src/actions/execute-trade.d.ts.map +1 -0
- package/packages/agent/src/actions/execute-trade.js +299 -0
- package/packages/agent/src/actions/get-self-status.d.ts +13 -0
- package/packages/agent/src/actions/get-self-status.d.ts.map +1 -0
- package/packages/agent/src/actions/get-self-status.js +66 -0
- package/packages/agent/src/actions/gmail.d.ts +1 -32
- package/packages/agent/src/actions/gmail.d.ts.map +1 -1
- package/packages/agent/src/actions/gmail.js +1 -1734
- package/packages/agent/src/actions/inbox-digest.d.ts +1 -1
- package/packages/agent/src/actions/inbox-digest.d.ts.map +1 -1
- package/packages/agent/src/actions/inbox-digest.js +1 -1
- package/packages/agent/src/actions/inbox-respond.d.ts +1 -1
- package/packages/agent/src/actions/inbox-respond.d.ts.map +1 -1
- package/packages/agent/src/actions/inbox-respond.js +1 -1
- package/packages/agent/src/actions/inbox-triage.d.ts +1 -1
- package/packages/agent/src/actions/inbox-triage.d.ts.map +1 -1
- package/packages/agent/src/actions/inbox-triage.js +1 -1
- package/packages/agent/src/actions/inbox.d.ts +1 -2
- package/packages/agent/src/actions/inbox.d.ts.map +1 -1
- package/packages/agent/src/actions/inbox.js +1 -856
- package/packages/agent/src/actions/index.d.ts +13 -0
- package/packages/agent/src/actions/index.d.ts.map +1 -1
- package/packages/agent/src/actions/index.js +13 -0
- package/packages/agent/src/actions/install-plugin.d.ts +3 -0
- package/packages/agent/src/actions/install-plugin.d.ts.map +1 -0
- package/packages/agent/src/actions/install-plugin.js +65 -0
- package/packages/agent/src/actions/life-goal-extractor.d.ts +1 -68
- package/packages/agent/src/actions/life-goal-extractor.d.ts.map +1 -1
- package/packages/agent/src/actions/life-goal-extractor.js +1 -354
- package/packages/agent/src/actions/life-param-extractor.d.ts +1 -77
- package/packages/agent/src/actions/life-param-extractor.d.ts.map +1 -1
- package/packages/agent/src/actions/life-param-extractor.js +1 -423
- package/packages/agent/src/actions/life-recent-context.d.ts +1 -8
- package/packages/agent/src/actions/life-recent-context.d.ts.map +1 -1
- package/packages/agent/src/actions/life-recent-context.js +1 -84
- package/packages/agent/src/actions/life-update-extractor.d.ts +1 -26
- package/packages/agent/src/actions/life-update-extractor.d.ts.map +1 -1
- package/packages/agent/src/actions/life-update-extractor.js +1 -195
- package/packages/agent/src/actions/life.d.ts +1 -8
- package/packages/agent/src/actions/life.d.ts.map +1 -1
- package/packages/agent/src/actions/life.extractor.d.ts +1 -17
- package/packages/agent/src/actions/life.extractor.d.ts.map +1 -1
- package/packages/agent/src/actions/life.extractor.js +1 -264
- package/packages/agent/src/actions/life.js +1 -3379
- package/packages/agent/src/actions/lifeops-extraction-config.d.ts +1 -15
- package/packages/agent/src/actions/lifeops-extraction-config.d.ts.map +1 -1
- package/packages/agent/src/actions/lifeops-extraction-config.js +1 -25
- package/packages/agent/src/actions/lifeops-google-helpers.d.ts +1 -61
- package/packages/agent/src/actions/lifeops-google-helpers.d.ts.map +1 -1
- package/packages/agent/src/actions/lifeops-google-helpers.js +1 -607
- package/packages/agent/src/actions/list-ejected.d.ts +3 -0
- package/packages/agent/src/actions/list-ejected.d.ts.map +1 -0
- package/packages/agent/src/actions/list-ejected.js +35 -0
- package/packages/agent/src/actions/log-level.d.ts +3 -0
- package/packages/agent/src/actions/log-level.d.ts.map +1 -0
- package/packages/agent/src/actions/log-level.js +125 -0
- package/packages/agent/src/actions/manage-tasks.d.ts.map +1 -1
- package/packages/agent/src/actions/manage-tasks.js +51 -15
- package/packages/agent/src/actions/media.d.ts +21 -0
- package/packages/agent/src/actions/media.d.ts.map +1 -0
- package/packages/agent/src/actions/media.js +384 -0
- package/packages/agent/src/actions/read-messages.d.ts +14 -0
- package/packages/agent/src/actions/read-messages.d.ts.map +1 -0
- package/packages/agent/src/actions/read-messages.js +228 -0
- package/packages/agent/src/actions/reinject-plugin.d.ts +3 -0
- package/packages/agent/src/actions/reinject-plugin.d.ts.map +1 -0
- package/packages/agent/src/actions/reinject-plugin.js +47 -0
- package/packages/agent/src/actions/send-message.d.ts +0 -7
- package/packages/agent/src/actions/send-message.d.ts.map +1 -1
- package/packages/agent/src/actions/send-message.js +170 -49
- package/packages/agent/src/actions/sync-plugin.d.ts +3 -0
- package/packages/agent/src/actions/sync-plugin.d.ts.map +1 -0
- package/packages/agent/src/actions/sync-plugin.js +47 -0
- package/packages/agent/src/actions/timezone-normalization.d.ts +1 -2
- package/packages/agent/src/actions/timezone-normalization.d.ts.map +1 -1
- package/packages/agent/src/actions/timezone-normalization.js +1 -107
- package/packages/agent/src/actions/transfer-token.d.ts +17 -0
- package/packages/agent/src/actions/transfer-token.d.ts.map +1 -0
- package/packages/agent/src/actions/transfer-token.js +470 -0
- package/packages/agent/src/actions/update-owner-profile.d.ts +1 -2
- package/packages/agent/src/actions/update-owner-profile.d.ts.map +1 -1
- package/packages/agent/src/actions/update-owner-profile.js +1 -131
- package/packages/agent/src/actions/wallet-action-shared.d.ts +15 -0
- package/packages/agent/src/actions/wallet-action-shared.d.ts.map +1 -0
- package/packages/agent/src/actions/wallet-action-shared.js +24 -0
- package/packages/agent/src/api/agent-admin-routes.d.ts.map +1 -1
- package/packages/agent/src/api/agent-admin-routes.js +1 -1
- package/packages/agent/src/api/binance-skill-helpers.d.ts.map +1 -1
- package/packages/agent/src/api/binance-skill-helpers.js +8 -3
- package/packages/agent/src/api/chat-routes.d.ts.map +1 -1
- package/packages/agent/src/api/chat-routes.js +20 -5
- package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts +1 -22
- package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts.map +1 -1
- package/packages/agent/src/api/coding-agents-auth-sanitize.js +1 -39
- package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts +1 -28
- package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts.map +1 -1
- package/packages/agent/src/api/coding-agents-preflight-normalize.js +1 -45
- package/packages/agent/src/api/coordinator-types.d.ts +1 -46
- package/packages/agent/src/api/coordinator-types.d.ts.map +1 -1
- package/packages/agent/src/api/coordinator-types.js +1 -1
- package/packages/agent/src/api/coordinator-wiring.d.ts +1 -45
- package/packages/agent/src/api/coordinator-wiring.d.ts.map +1 -1
- package/packages/agent/src/api/coordinator-wiring.js +1 -108
- package/packages/agent/src/api/index.d.ts +1 -1
- package/packages/agent/src/api/index.d.ts.map +1 -1
- package/packages/agent/src/api/index.js +1 -1
- package/packages/agent/src/api/lifeops-browser-packaging.d.ts +1 -15
- package/packages/agent/src/api/lifeops-browser-packaging.d.ts.map +1 -1
- package/packages/agent/src/api/lifeops-browser-packaging.js +1 -305
- package/packages/agent/src/api/lifeops-routes.d.ts +1 -19
- package/packages/agent/src/api/lifeops-routes.d.ts.map +1 -1
- package/packages/agent/src/api/lifeops-routes.js +1 -1173
- package/packages/agent/src/api/server.d.ts.map +1 -1
- package/packages/agent/src/api/server.js +6 -6
- package/packages/agent/src/api/task-agent-message-routing.d.ts +1 -9
- package/packages/agent/src/api/task-agent-message-routing.d.ts.map +1 -1
- package/packages/agent/src/api/task-agent-message-routing.js +1 -62
- package/packages/agent/src/api/website-blocker-routes.d.ts +1 -6
- package/packages/agent/src/api/website-blocker-routes.d.ts.map +1 -1
- package/packages/agent/src/api/website-blocker-routes.js +1 -174
- package/packages/agent/src/config/types.agent-defaults.d.ts +1 -1
- package/packages/agent/src/config/types.agent-defaults.d.ts.map +1 -1
- package/packages/agent/src/evals/coordinator-eval-client.d.ts +1 -38
- package/packages/agent/src/evals/coordinator-eval-client.d.ts.map +1 -1
- package/packages/agent/src/evals/coordinator-eval-client.js +1 -138
- package/packages/agent/src/evals/coordinator-live-runner.d.ts +1 -56
- package/packages/agent/src/evals/coordinator-live-runner.d.ts.map +1 -1
- package/packages/agent/src/evals/coordinator-live-runner.js +1 -546
- package/packages/agent/src/evals/coordinator-preflight.d.ts +1 -31
- package/packages/agent/src/evals/coordinator-preflight.d.ts.map +1 -1
- package/packages/agent/src/evals/coordinator-preflight.js +1 -296
- package/packages/agent/src/evals/coordinator-scenarios.d.ts +1 -23
- package/packages/agent/src/evals/coordinator-scenarios.d.ts.map +1 -1
- package/packages/agent/src/evals/coordinator-scenarios.js +1 -1141
- package/packages/agent/src/lifeops/app-state.d.ts +1 -10
- package/packages/agent/src/lifeops/app-state.d.ts.map +1 -1
- package/packages/agent/src/lifeops/app-state.js +1 -32
- package/packages/agent/src/lifeops/apple-reminders.d.ts +1 -57
- package/packages/agent/src/lifeops/apple-reminders.d.ts.map +1 -1
- package/packages/agent/src/lifeops/apple-reminders.js +1 -325
- package/packages/agent/src/lifeops/defaults.d.ts +1 -23
- package/packages/agent/src/lifeops/defaults.d.ts.map +1 -1
- package/packages/agent/src/lifeops/defaults.js +1 -205
- package/packages/agent/src/lifeops/engine.d.ts +1 -7
- package/packages/agent/src/lifeops/engine.d.ts.map +1 -1
- package/packages/agent/src/lifeops/engine.js +1 -389
- package/packages/agent/src/lifeops/goal-grounding.d.ts +1 -53
- package/packages/agent/src/lifeops/goal-grounding.d.ts.map +1 -1
- package/packages/agent/src/lifeops/goal-grounding.js +1 -147
- package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts +1 -11
- package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts.map +1 -1
- package/packages/agent/src/lifeops/goal-semantic-evaluator.js +1 -154
- package/packages/agent/src/lifeops/google-api-error.d.ts +1 -6
- package/packages/agent/src/lifeops/google-api-error.d.ts.map +1 -1
- package/packages/agent/src/lifeops/google-api-error.js +1 -35
- package/packages/agent/src/lifeops/google-calendar.d.ts +1 -52
- package/packages/agent/src/lifeops/google-calendar.d.ts.map +1 -1
- package/packages/agent/src/lifeops/google-calendar.js +1 -268
- package/packages/agent/src/lifeops/google-connector-gateway.d.ts +1 -18
- package/packages/agent/src/lifeops/google-connector-gateway.d.ts.map +1 -1
- package/packages/agent/src/lifeops/google-connector-gateway.js +1 -65
- package/packages/agent/src/lifeops/google-fetch.d.ts +1 -10
- package/packages/agent/src/lifeops/google-fetch.d.ts.map +1 -1
- package/packages/agent/src/lifeops/google-fetch.js +1 -85
- package/packages/agent/src/lifeops/google-gmail.d.ts +1 -53
- package/packages/agent/src/lifeops/google-gmail.d.ts.map +1 -1
- package/packages/agent/src/lifeops/google-gmail.js +1 -471
- package/packages/agent/src/lifeops/google-managed-client.d.ts +1 -126
- package/packages/agent/src/lifeops/google-managed-client.d.ts.map +1 -1
- package/packages/agent/src/lifeops/google-managed-client.js +1 -294
- package/packages/agent/src/lifeops/google-oauth.d.ts +1 -60
- package/packages/agent/src/lifeops/google-oauth.d.ts.map +1 -1
- package/packages/agent/src/lifeops/google-oauth.js +1 -494
- package/packages/agent/src/lifeops/google-scopes.d.ts +1 -12
- package/packages/agent/src/lifeops/google-scopes.d.ts.map +1 -1
- package/packages/agent/src/lifeops/google-scopes.js +1 -96
- package/packages/agent/src/lifeops/index.d.ts +1 -2
- package/packages/agent/src/lifeops/index.d.ts.map +1 -1
- package/packages/agent/src/lifeops/index.js +1 -2
- package/packages/agent/src/lifeops/owner-profile.d.ts +1 -14
- package/packages/agent/src/lifeops/owner-profile.d.ts.map +1 -1
- package/packages/agent/src/lifeops/owner-profile.js +1 -194
- package/packages/agent/src/lifeops/repository.d.ts +1 -208
- package/packages/agent/src/lifeops/repository.d.ts.map +1 -1
- package/packages/agent/src/lifeops/repository.js +1 -3187
- package/packages/agent/src/lifeops/runtime.d.ts +1 -13
- package/packages/agent/src/lifeops/runtime.d.ts.map +1 -1
- package/packages/agent/src/lifeops/runtime.js +1 -120
- package/packages/agent/src/lifeops/screen-context.d.ts +1 -51
- package/packages/agent/src/lifeops/screen-context.d.ts.map +1 -1
- package/packages/agent/src/lifeops/screen-context.js +1 -332
- package/packages/agent/src/lifeops/seed-routines.d.ts +1 -19
- package/packages/agent/src/lifeops/seed-routines.d.ts.map +1 -1
- package/packages/agent/src/lifeops/seed-routines.js +1 -111
- package/packages/agent/src/lifeops/service.d.ts +1 -274
- package/packages/agent/src/lifeops/service.d.ts.map +1 -1
- package/packages/agent/src/lifeops/service.js +1 -9260
- package/packages/agent/src/lifeops/sql.d.ts +1 -30
- package/packages/agent/src/lifeops/sql.d.ts.map +1 -1
- package/packages/agent/src/lifeops/sql.js +1 -247
- package/packages/agent/src/lifeops/time.d.ts +1 -16
- package/packages/agent/src/lifeops/time.d.ts.map +1 -1
- package/packages/agent/src/lifeops/time.js +1 -132
- package/packages/agent/src/lifeops/twilio.d.ts +1 -24
- package/packages/agent/src/lifeops/twilio.d.ts.map +1 -1
- package/packages/agent/src/lifeops/twilio.js +1 -157
- package/packages/agent/src/lifeops/x-poster.d.ts +1 -18
- package/packages/agent/src/lifeops/x-poster.d.ts.map +1 -1
- package/packages/agent/src/lifeops/x-poster.js +1 -148
- package/packages/agent/src/providers/inbox-triage.d.ts +1 -2
- package/packages/agent/src/providers/inbox-triage.d.ts.map +1 -1
- package/packages/agent/src/providers/inbox-triage.js +1 -89
- package/packages/agent/src/providers/index.d.ts +4 -1
- package/packages/agent/src/providers/index.d.ts.map +1 -1
- package/packages/agent/src/providers/index.js +4 -1
- package/packages/agent/src/providers/lifeops.d.ts +1 -2
- package/packages/agent/src/providers/lifeops.d.ts.map +1 -1
- package/packages/agent/src/providers/lifeops.js +1 -157
- package/packages/agent/src/providers/local-models.d.ts +118 -0
- package/packages/agent/src/providers/local-models.d.ts.map +1 -0
- package/packages/agent/src/providers/local-models.js +427 -0
- package/packages/agent/src/providers/media-provider.d.ts +192 -0
- package/packages/agent/src/providers/media-provider.d.ts.map +1 -0
- package/packages/agent/src/providers/media-provider.js +1088 -0
- package/packages/agent/src/providers/self-status.d.ts +4 -0
- package/packages/agent/src/providers/self-status.d.ts.map +1 -0
- package/packages/agent/src/providers/self-status.js +12 -0
- package/packages/agent/src/providers/tasks.d.ts.map +1 -1
- package/packages/agent/src/providers/tasks.js +7 -7
- package/packages/agent/src/runtime/core-plugins.js +1 -1
- package/packages/agent/src/runtime/eliza-plugin.d.ts.map +1 -1
- package/packages/agent/src/runtime/eliza-plugin.js +1 -7
- package/packages/agent/src/runtime/eliza.js +2 -2
- package/packages/agent/src/runtime/plugin-collector.js +3 -3
- package/packages/agent/src/runtime/plugin-lifecycle.d.ts.map +1 -1
- package/packages/agent/src/runtime/plugin-lifecycle.js +3 -13
- package/packages/agent/src/runtime/trajectory-internals.d.ts.map +1 -1
- package/packages/agent/src/runtime/trajectory-internals.js +1 -3
- package/packages/agent/src/services/built-in-app-routes/hyperscape.d.ts.map +1 -1
- package/packages/agent/src/services/coding-task-executor.d.ts +3 -3
- package/packages/agent/src/services/coding-task-executor.js +3 -3
- package/packages/shared/src/awareness/index.d.ts +2 -0
- package/packages/shared/src/awareness/index.d.ts.map +1 -0
- package/packages/shared/src/awareness/index.js +1 -0
- package/packages/shared/src/awareness/registry.d.ts +27 -0
- package/packages/shared/src/awareness/registry.d.ts.map +1 -0
- package/packages/shared/src/awareness/registry.js +161 -0
- package/packages/shared/src/i18n/generated/validation-keyword-data.d.ts +24 -0
- package/packages/shared/src/i18n/generated/validation-keyword-data.d.ts.map +1 -1
- package/packages/shared/src/i18n/generated/validation-keyword-data.js +24 -0
- package/packages/shared/src/runtime-env.d.ts.map +1 -1
- package/packages/shared/src/runtime-env.js +5 -1
- package/packages/typescript/src/generated/action-docs.d.ts +135 -0
- package/packages/typescript/src/generated/action-docs.d.ts.map +1 -1
- package/packages/typescript/src/generated/action-docs.js +237 -0
- package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts +24 -0
- package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts.map +1 -1
- package/packages/typescript/src/i18n/generated/validation-keyword-data.js +24 -0
- package/packages/typescript/src/index.node.d.ts +2 -2
- package/packages/typescript/src/index.node.d.ts.map +1 -1
- package/packages/typescript/src/index.node.js +4 -3
- package/packages/typescript/src/plugin-lifecycle.d.ts.map +1 -1
- package/packages/typescript/src/plugin-lifecycle.js +42 -3
- package/packages/typescript/src/services/message.d.ts.map +1 -1
- package/packages/typescript/src/services/message.js +32 -0
- package/apps/app-training/src/core/cli.d.ts +0 -11
- package/apps/app-training/src/core/cli.d.ts.map +0 -1
- package/apps/app-training/src/core/cli.js +0 -302
- package/apps/app-training/src/core/context-audit.d.ts +0 -51
- package/apps/app-training/src/core/context-audit.d.ts.map +0 -1
- package/apps/app-training/src/core/context-audit.js +0 -141
- package/apps/app-training/src/core/context-catalog.d.ts +0 -47
- package/apps/app-training/src/core/context-catalog.d.ts.map +0 -1
- package/apps/app-training/src/core/context-catalog.js +0 -259
- package/apps/app-training/src/core/context-types.d.ts +0 -3
- package/apps/app-training/src/core/context-types.d.ts.map +0 -1
- package/apps/app-training/src/core/context-types.js +0 -11
- package/apps/app-training/src/core/dataset-generator.d.ts +0 -135
- package/apps/app-training/src/core/dataset-generator.d.ts.map +0 -1
- package/apps/app-training/src/core/dataset-generator.js +0 -703
- package/apps/app-training/src/core/replay-validator.d.ts +0 -96
- package/apps/app-training/src/core/replay-validator.d.ts.map +0 -1
- package/apps/app-training/src/core/replay-validator.js +0 -265
- package/apps/app-training/src/core/roleplay-executor.d.ts +0 -123
- package/apps/app-training/src/core/roleplay-executor.d.ts.map +0 -1
- package/apps/app-training/src/core/roleplay-executor.js +0 -645
- package/apps/app-training/src/core/roleplay-trajectories.d.ts +0 -54
- package/apps/app-training/src/core/roleplay-trajectories.d.ts.map +0 -1
- package/apps/app-training/src/core/roleplay-trajectories.js +0 -73
- package/apps/app-training/src/core/scenario-blueprints.d.ts +0 -62
- package/apps/app-training/src/core/scenario-blueprints.d.ts.map +0 -1
- package/apps/app-training/src/core/scenario-blueprints.js +0 -790
- package/apps/app-training/src/core/trajectory-task-datasets.d.ts +0 -38
- package/apps/app-training/src/core/trajectory-task-datasets.d.ts.map +0 -1
- package/apps/app-training/src/core/trajectory-task-datasets.js +0 -281
- package/apps/app-training/src/core/vertex-tuning.d.ts +0 -139
- package/apps/app-training/src/core/vertex-tuning.d.ts.map +0 -1
- package/apps/app-training/src/core/vertex-tuning.js +0 -234
- package/packages/agent/src/inbox/channel-deep-links.d.ts.map +0 -1
- package/packages/agent/src/inbox/config.d.ts.map +0 -1
- package/packages/agent/src/inbox/message-fetcher.d.ts.map +0 -1
- package/packages/agent/src/inbox/reflection.d.ts.map +0 -1
- package/packages/agent/src/inbox/repository.d.ts.map +0 -1
- package/packages/agent/src/inbox/triage-classifier.d.ts.map +0 -1
- package/packages/agent/src/inbox/types.d.ts.map +0 -1
- package/packages/agent/src/training/cli.d.ts +0 -2
- package/packages/agent/src/training/cli.d.ts.map +0 -1
- package/packages/agent/src/training/cli.js +0 -2
- package/packages/agent/src/training/context-audit.d.ts +0 -2
- package/packages/agent/src/training/context-audit.d.ts.map +0 -1
- package/packages/agent/src/training/context-audit.js +0 -2
- package/packages/agent/src/training/context-catalog.d.ts +0 -2
- package/packages/agent/src/training/context-catalog.d.ts.map +0 -1
- package/packages/agent/src/training/context-catalog.js +0 -2
- package/packages/agent/src/training/context-types.d.ts +0 -2
- package/packages/agent/src/training/context-types.d.ts.map +0 -1
- package/packages/agent/src/training/context-types.js +0 -2
- package/packages/agent/src/training/dataset-generator.d.ts +0 -2
- package/packages/agent/src/training/dataset-generator.d.ts.map +0 -1
- package/packages/agent/src/training/dataset-generator.js +0 -2
- package/packages/agent/src/training/replay-validator.d.ts +0 -2
- package/packages/agent/src/training/replay-validator.d.ts.map +0 -1
- package/packages/agent/src/training/replay-validator.js +0 -2
- package/packages/agent/src/training/roleplay-executor.d.ts +0 -2
- package/packages/agent/src/training/roleplay-executor.d.ts.map +0 -1
- package/packages/agent/src/training/roleplay-executor.js +0 -2
- package/packages/agent/src/training/roleplay-trajectories.d.ts +0 -2
- package/packages/agent/src/training/roleplay-trajectories.d.ts.map +0 -1
- package/packages/agent/src/training/roleplay-trajectories.js +0 -2
- package/packages/agent/src/training/scenario-blueprints.d.ts +0 -2
- package/packages/agent/src/training/scenario-blueprints.d.ts.map +0 -1
- package/packages/agent/src/training/scenario-blueprints.js +0 -2
- package/packages/agent/src/training/trajectory-task-datasets.d.ts +0 -2
- package/packages/agent/src/training/trajectory-task-datasets.d.ts.map +0 -1
- package/packages/agent/src/training/trajectory-task-datasets.js +0 -2
- package/packages/agent/src/training/vertex-tuning.d.ts +0 -2
- package/packages/agent/src/training/vertex-tuning.d.ts.map +0 -1
- package/packages/agent/src/training/vertex-tuning.js +0 -2
- package/packages/typescript/src/features/orchestrator/actions/coding-task-handlers.d.ts +0 -41
- package/packages/typescript/src/features/orchestrator/actions/coding-task-handlers.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/coding-task-handlers.js +0 -443
- package/packages/typescript/src/features/orchestrator/actions/coding-task-helpers.d.ts +0 -34
- package/packages/typescript/src/features/orchestrator/actions/coding-task-helpers.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/coding-task-helpers.js +0 -171
- package/packages/typescript/src/features/orchestrator/actions/eval-metadata.d.ts +0 -11
- package/packages/typescript/src/features/orchestrator/actions/eval-metadata.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/eval-metadata.js +0 -55
- package/packages/typescript/src/features/orchestrator/actions/finalize-workspace.d.ts +0 -11
- package/packages/typescript/src/features/orchestrator/actions/finalize-workspace.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/finalize-workspace.js +0 -214
- package/packages/typescript/src/features/orchestrator/actions/list-agents.d.ts +0 -13
- package/packages/typescript/src/features/orchestrator/actions/list-agents.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/list-agents.js +0 -174
- package/packages/typescript/src/features/orchestrator/actions/manage-issues.d.ts +0 -11
- package/packages/typescript/src/features/orchestrator/actions/manage-issues.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/manage-issues.js +0 -428
- package/packages/typescript/src/features/orchestrator/actions/provision-workspace.d.ts +0 -11
- package/packages/typescript/src/features/orchestrator/actions/provision-workspace.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/provision-workspace.js +0 -189
- package/packages/typescript/src/features/orchestrator/actions/send-to-agent.d.ts +0 -12
- package/packages/typescript/src/features/orchestrator/actions/send-to-agent.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/send-to-agent.js +0 -265
- package/packages/typescript/src/features/orchestrator/actions/spawn-agent.d.ts +0 -12
- package/packages/typescript/src/features/orchestrator/actions/spawn-agent.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/spawn-agent.js +0 -356
- package/packages/typescript/src/features/orchestrator/actions/start-coding-task.d.ts +0 -22
- package/packages/typescript/src/features/orchestrator/actions/start-coding-task.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/start-coding-task.js +0 -270
- package/packages/typescript/src/features/orchestrator/actions/stop-agent.d.ts +0 -12
- package/packages/typescript/src/features/orchestrator/actions/stop-agent.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/stop-agent.js +0 -192
- package/packages/typescript/src/features/orchestrator/actions/task-control.d.ts +0 -3
- package/packages/typescript/src/features/orchestrator/actions/task-control.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/task-control.js +0 -217
- package/packages/typescript/src/features/orchestrator/actions/task-history.d.ts +0 -3
- package/packages/typescript/src/features/orchestrator/actions/task-history.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/task-history.js +0 -323
- package/packages/typescript/src/features/orchestrator/actions/task-share.d.ts +0 -3
- package/packages/typescript/src/features/orchestrator/actions/task-share.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/task-share.js +0 -168
- package/packages/typescript/src/features/orchestrator/actions/task-thread-target.d.ts +0 -11
- package/packages/typescript/src/features/orchestrator/actions/task-thread-target.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/actions/task-thread-target.js +0 -68
- package/packages/typescript/src/features/orchestrator/api/agent-routes.d.ts +0 -18
- package/packages/typescript/src/features/orchestrator/api/agent-routes.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/api/agent-routes.js +0 -654
- package/packages/typescript/src/features/orchestrator/api/coordinator-routes.d.ts +0 -22
- package/packages/typescript/src/features/orchestrator/api/coordinator-routes.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/api/coordinator-routes.js +0 -403
- package/packages/typescript/src/features/orchestrator/api/hook-routes.d.ts +0 -18
- package/packages/typescript/src/features/orchestrator/api/hook-routes.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/api/hook-routes.js +0 -164
- package/packages/typescript/src/features/orchestrator/api/issue-routes.d.ts +0 -17
- package/packages/typescript/src/features/orchestrator/api/issue-routes.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/api/issue-routes.js +0 -132
- package/packages/typescript/src/features/orchestrator/api/routes.d.ts +0 -37
- package/packages/typescript/src/features/orchestrator/api/routes.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/api/routes.js +0 -96
- package/packages/typescript/src/features/orchestrator/api/workspace-routes.d.ts +0 -17
- package/packages/typescript/src/features/orchestrator/api/workspace-routes.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/api/workspace-routes.js +0 -149
- package/packages/typescript/src/features/orchestrator/base-plugin.d.ts +0 -19
- package/packages/typescript/src/features/orchestrator/base-plugin.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/base-plugin.js +0 -75
- package/packages/typescript/src/features/orchestrator/claude-jsonl-completion-watcher.d.ts +0 -101
- package/packages/typescript/src/features/orchestrator/claude-jsonl-completion-watcher.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/claude-jsonl-completion-watcher.js +0 -310
- package/packages/typescript/src/features/orchestrator/index.d.ts +0 -33
- package/packages/typescript/src/features/orchestrator/index.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/index.js +0 -30
- package/packages/typescript/src/features/orchestrator/patch-agent-orchestrator-plugin.d.ts +0 -15
- package/packages/typescript/src/features/orchestrator/patch-agent-orchestrator-plugin.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/patch-agent-orchestrator-plugin.js +0 -1449
- package/packages/typescript/src/features/orchestrator/providers/action-examples.d.ts +0 -14
- package/packages/typescript/src/features/orchestrator/providers/action-examples.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/providers/action-examples.js +0 -151
- package/packages/typescript/src/features/orchestrator/providers/active-workspace-context.d.ts +0 -13
- package/packages/typescript/src/features/orchestrator/providers/active-workspace-context.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/providers/active-workspace-context.js +0 -142
- package/packages/typescript/src/features/orchestrator/services/agent-credentials.d.ts +0 -6
- package/packages/typescript/src/features/orchestrator/services/agent-credentials.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/agent-credentials.js +0 -91
- package/packages/typescript/src/features/orchestrator/services/agent-metrics.d.ts +0 -30
- package/packages/typescript/src/features/orchestrator/services/agent-metrics.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/agent-metrics.js +0 -54
- package/packages/typescript/src/features/orchestrator/services/agent-selection.d.ts +0 -53
- package/packages/typescript/src/features/orchestrator/services/agent-selection.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/agent-selection.js +0 -70
- package/packages/typescript/src/features/orchestrator/services/ansi-utils.d.ts +0 -61
- package/packages/typescript/src/features/orchestrator/services/ansi-utils.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/ansi-utils.js +0 -252
- package/packages/typescript/src/features/orchestrator/services/config-env.d.ts +0 -13
- package/packages/typescript/src/features/orchestrator/services/config-env.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/config-env.js +0 -37
- package/packages/typescript/src/features/orchestrator/services/coordinator-event-normalizer.d.ts +0 -50
- package/packages/typescript/src/features/orchestrator/services/coordinator-event-normalizer.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/coordinator-event-normalizer.js +0 -184
- package/packages/typescript/src/features/orchestrator/services/debug-capture.d.ts +0 -38
- package/packages/typescript/src/features/orchestrator/services/debug-capture.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/debug-capture.js +0 -113
- package/packages/typescript/src/features/orchestrator/services/pty-auto-response.d.ts +0 -30
- package/packages/typescript/src/features/orchestrator/services/pty-auto-response.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/pty-auto-response.js +0 -146
- package/packages/typescript/src/features/orchestrator/services/pty-init.d.ts +0 -54
- package/packages/typescript/src/features/orchestrator/services/pty-init.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/pty-init.js +0 -315
- package/packages/typescript/src/features/orchestrator/services/pty-service.d.ts +0 -175
- package/packages/typescript/src/features/orchestrator/services/pty-service.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/pty-service.js +0 -1469
- package/packages/typescript/src/features/orchestrator/services/pty-session-io.d.ts +0 -49
- package/packages/typescript/src/features/orchestrator/services/pty-session-io.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/pty-session-io.js +0 -180
- package/packages/typescript/src/features/orchestrator/services/pty-spawn.d.ts +0 -53
- package/packages/typescript/src/features/orchestrator/services/pty-spawn.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/pty-spawn.js +0 -280
- package/packages/typescript/src/features/orchestrator/services/pty-types.d.ts +0 -80
- package/packages/typescript/src/features/orchestrator/services/pty-types.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/pty-types.js +0 -51
- package/packages/typescript/src/features/orchestrator/services/repo-input.d.ts +0 -16
- package/packages/typescript/src/features/orchestrator/services/repo-input.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/repo-input.js +0 -88
- package/packages/typescript/src/features/orchestrator/services/stall-classifier.d.ts +0 -69
- package/packages/typescript/src/features/orchestrator/services/stall-classifier.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/stall-classifier.js +0 -446
- package/packages/typescript/src/features/orchestrator/services/swarm-coordinator-prompts.d.ts +0 -97
- package/packages/typescript/src/features/orchestrator/services/swarm-coordinator-prompts.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/swarm-coordinator-prompts.js +0 -342
- package/packages/typescript/src/features/orchestrator/services/swarm-coordinator.d.ts +0 -421
- package/packages/typescript/src/features/orchestrator/services/swarm-coordinator.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/swarm-coordinator.js +0 -2356
- package/packages/typescript/src/features/orchestrator/services/swarm-decision-loop.d.ts +0 -52
- package/packages/typescript/src/features/orchestrator/services/swarm-decision-loop.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/swarm-decision-loop.js +0 -1538
- package/packages/typescript/src/features/orchestrator/services/swarm-event-triage.d.ts +0 -49
- package/packages/typescript/src/features/orchestrator/services/swarm-event-triage.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/swarm-event-triage.js +0 -171
- package/packages/typescript/src/features/orchestrator/services/swarm-history.d.ts +0 -27
- package/packages/typescript/src/features/orchestrator/services/swarm-history.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/swarm-history.js +0 -148
- package/packages/typescript/src/features/orchestrator/services/swarm-idle-watchdog.d.ts +0 -22
- package/packages/typescript/src/features/orchestrator/services/swarm-idle-watchdog.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/swarm-idle-watchdog.js +0 -265
- package/packages/typescript/src/features/orchestrator/services/task-acceptance.d.ts +0 -8
- package/packages/typescript/src/features/orchestrator/services/task-acceptance.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/task-acceptance.js +0 -114
- package/packages/typescript/src/features/orchestrator/services/task-agent-auth.d.ts +0 -68
- package/packages/typescript/src/features/orchestrator/services/task-agent-auth.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/task-agent-auth.js +0 -559
- package/packages/typescript/src/features/orchestrator/services/task-agent-frameworks.d.ts +0 -82
- package/packages/typescript/src/features/orchestrator/services/task-agent-frameworks.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/task-agent-frameworks.js +0 -738
- package/packages/typescript/src/features/orchestrator/services/task-kind.d.ts +0 -3
- package/packages/typescript/src/features/orchestrator/services/task-kind.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/task-kind.js +0 -40
- package/packages/typescript/src/features/orchestrator/services/task-policy.d.ts +0 -17
- package/packages/typescript/src/features/orchestrator/services/task-policy.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/task-policy.js +0 -226
- package/packages/typescript/src/features/orchestrator/services/task-registry.d.ts +0 -550
- package/packages/typescript/src/features/orchestrator/services/task-registry.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/task-registry.js +0 -2182
- package/packages/typescript/src/features/orchestrator/services/task-share.d.ts +0 -18
- package/packages/typescript/src/features/orchestrator/services/task-share.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/task-share.js +0 -159
- package/packages/typescript/src/features/orchestrator/services/task-validation.d.ts +0 -69
- package/packages/typescript/src/features/orchestrator/services/task-validation.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/task-validation.js +0 -587
- package/packages/typescript/src/features/orchestrator/services/task-verifier-runner.d.ts +0 -5
- package/packages/typescript/src/features/orchestrator/services/task-verifier-runner.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/task-verifier-runner.js +0 -372
- package/packages/typescript/src/features/orchestrator/services/trajectory-context.d.ts +0 -73
- package/packages/typescript/src/features/orchestrator/services/trajectory-context.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/trajectory-context.js +0 -64
- package/packages/typescript/src/features/orchestrator/services/trajectory-feedback.d.ts +0 -53
- package/packages/typescript/src/features/orchestrator/services/trajectory-feedback.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/trajectory-feedback.js +0 -260
- package/packages/typescript/src/features/orchestrator/services/workspace-git-ops.d.ts +0 -28
- package/packages/typescript/src/features/orchestrator/services/workspace-git-ops.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/workspace-git-ops.js +0 -105
- package/packages/typescript/src/features/orchestrator/services/workspace-github.d.ts +0 -58
- package/packages/typescript/src/features/orchestrator/services/workspace-github.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/workspace-github.js +0 -139
- package/packages/typescript/src/features/orchestrator/services/workspace-lifecycle.d.ts +0 -18
- package/packages/typescript/src/features/orchestrator/services/workspace-lifecycle.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/workspace-lifecycle.js +0 -86
- package/packages/typescript/src/features/orchestrator/services/workspace-service.d.ts +0 -118
- package/packages/typescript/src/features/orchestrator/services/workspace-service.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/workspace-service.js +0 -533
- package/packages/typescript/src/features/orchestrator/services/workspace-types.d.ts +0 -81
- package/packages/typescript/src/features/orchestrator/services/workspace-types.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/services/workspace-types.js +0 -8
- package/packages/typescript/src/features/orchestrator/task-progress-streamer.d.ts +0 -38
- package/packages/typescript/src/features/orchestrator/task-progress-streamer.d.ts.map +0 -1
- package/packages/typescript/src/features/orchestrator/task-progress-streamer.js +0 -293
- /package/{packages/agent → apps/app-lifeops}/src/inbox/channel-deep-links.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/channel-deep-links.js +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/config.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/message-fetcher.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/message-fetcher.js +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/reflection.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/reflection.js +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/repository.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/repository.js +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/triage-classifier.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/triage-classifier.js +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/types.d.ts +0 -0
- /package/{packages/agent → apps/app-lifeops}/src/inbox/types.js +0 -0
|
@@ -1,154 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { buildGoalSemanticReviewMetadata, } from "./goal-grounding.js";
|
|
3
|
-
const VALID_REVIEW_STATES = new Set([
|
|
4
|
-
"idle",
|
|
5
|
-
"needs_attention",
|
|
6
|
-
"on_track",
|
|
7
|
-
"at_risk",
|
|
8
|
-
]);
|
|
9
|
-
const VALID_SUGGESTION_KINDS = new Set([
|
|
10
|
-
"create_support",
|
|
11
|
-
"focus_now",
|
|
12
|
-
"resolve_overdue",
|
|
13
|
-
"review_progress",
|
|
14
|
-
"tighten_cadence",
|
|
15
|
-
]);
|
|
16
|
-
function normalizeText(value) {
|
|
17
|
-
if (typeof value !== "string") {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
const trimmed = value.trim();
|
|
21
|
-
return trimmed.length > 0 ? trimmed : null;
|
|
22
|
-
}
|
|
23
|
-
function normalizeFiniteNumber(value) {
|
|
24
|
-
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
return Math.max(0, Math.min(1, value));
|
|
28
|
-
}
|
|
29
|
-
function normalizeStringArray(value) {
|
|
30
|
-
if (!Array.isArray(value)) {
|
|
31
|
-
return [];
|
|
32
|
-
}
|
|
33
|
-
return value
|
|
34
|
-
.filter((entry) => typeof entry === "string")
|
|
35
|
-
.map((entry) => entry.trim())
|
|
36
|
-
.filter((entry) => entry.length > 0);
|
|
37
|
-
}
|
|
38
|
-
function normalizeSuggestions(value) {
|
|
39
|
-
if (!Array.isArray(value)) {
|
|
40
|
-
return [];
|
|
41
|
-
}
|
|
42
|
-
return value
|
|
43
|
-
.map((entry) => {
|
|
44
|
-
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
const record = entry;
|
|
48
|
-
const title = normalizeText(record.title);
|
|
49
|
-
const detail = normalizeText(record.detail);
|
|
50
|
-
if (!title || !detail) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
const kind = normalizeText(record.kind);
|
|
54
|
-
return {
|
|
55
|
-
kind: kind && VALID_SUGGESTION_KINDS.has(kind)
|
|
56
|
-
? kind
|
|
57
|
-
: null,
|
|
58
|
-
title,
|
|
59
|
-
detail,
|
|
60
|
-
};
|
|
61
|
-
})
|
|
62
|
-
.filter((entry) => entry !== null);
|
|
63
|
-
}
|
|
64
|
-
function buildSemanticEvaluationPrompt(args) {
|
|
65
|
-
return [
|
|
66
|
-
"Evaluate the user's goal semantically using the grounded goal contract and the evidence.",
|
|
67
|
-
"Do not rely only on linked support tasks. If the goal has direct evidence such as sleep data, use it.",
|
|
68
|
-
"Do not bluff. If the evidence is too weak, say so clearly and lower confidence.",
|
|
69
|
-
"",
|
|
70
|
-
"Return ONLY valid JSON with these fields:",
|
|
71
|
-
'- reviewState: one of "idle", "needs_attention", "on_track", "at_risk"',
|
|
72
|
-
"- progressScore: number from 0 to 1 or null if not enough evidence",
|
|
73
|
-
"- confidence: number from 0 to 1",
|
|
74
|
-
"- explanation: short grounded explanation",
|
|
75
|
-
"- evidenceSummary: short summary of the strongest evidence used",
|
|
76
|
-
"- missingEvidence: array of short evidence gaps",
|
|
77
|
-
'- suggestions: array of up to 3 objects with fields kind, title, detail; kind must be one of "create_support", "focus_now", "resolve_overdue", "review_progress", "tighten_cadence"',
|
|
78
|
-
"",
|
|
79
|
-
"Guidance:",
|
|
80
|
-
"- Use on_track only when the available evidence supports progress.",
|
|
81
|
-
"- Use at_risk when the evidence suggests drift, missed targets, or contradictory outcomes.",
|
|
82
|
-
"- Use needs_attention when the goal is grounded but the evidence is insufficient or the support structure is weak.",
|
|
83
|
-
"- Use idle only when the goal is brand new and there is genuinely nothing to judge yet.",
|
|
84
|
-
"",
|
|
85
|
-
`Now: ${JSON.stringify(args.nowIso)}`,
|
|
86
|
-
`Goal: ${JSON.stringify(args.goal)}`,
|
|
87
|
-
`Evidence: ${JSON.stringify(args.evidence)}`,
|
|
88
|
-
].join("\n");
|
|
89
|
-
}
|
|
90
|
-
function buildSemanticRepairPrompt(args) {
|
|
91
|
-
return [
|
|
92
|
-
"Your last reply for the goal semantic evaluator was invalid.",
|
|
93
|
-
"Return ONLY valid JSON with exactly these fields:",
|
|
94
|
-
"reviewState, progressScore, confidence, explanation, evidenceSummary, missingEvidence, suggestions",
|
|
95
|
-
"",
|
|
96
|
-
'reviewState must be one of "idle", "needs_attention", "on_track", "at_risk".',
|
|
97
|
-
"suggestions must be an array of objects with kind, title, detail.",
|
|
98
|
-
"",
|
|
99
|
-
`Now: ${JSON.stringify(args.nowIso)}`,
|
|
100
|
-
`Goal: ${JSON.stringify(args.goal)}`,
|
|
101
|
-
`Evidence: ${JSON.stringify(args.evidence)}`,
|
|
102
|
-
`Previous invalid output: ${JSON.stringify(args.rawResponse)}`,
|
|
103
|
-
].join("\n");
|
|
104
|
-
}
|
|
105
|
-
function buildSemanticEvaluationResult(parsed, nowIso) {
|
|
106
|
-
const reviewState = normalizeText(parsed.reviewState);
|
|
107
|
-
const explanation = normalizeText(parsed.explanation);
|
|
108
|
-
if (!reviewState ||
|
|
109
|
-
!VALID_REVIEW_STATES.has(reviewState) ||
|
|
110
|
-
!explanation) {
|
|
111
|
-
return null;
|
|
112
|
-
}
|
|
113
|
-
return buildGoalSemanticReviewMetadata({
|
|
114
|
-
confidence: normalizeFiniteNumber(parsed.confidence),
|
|
115
|
-
evidenceSummary: normalizeText(parsed.evidenceSummary),
|
|
116
|
-
explanation,
|
|
117
|
-
missingEvidence: normalizeStringArray(parsed.missingEvidence),
|
|
118
|
-
progressScore: normalizeFiniteNumber(parsed.progressScore),
|
|
119
|
-
reviewState: reviewState,
|
|
120
|
-
reviewedAt: nowIso,
|
|
121
|
-
suggestions: normalizeSuggestions(parsed.suggestions),
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
export async function evaluateGoalProgressWithLlm(args) {
|
|
125
|
-
if (typeof args.runtime.useModel !== "function") {
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
const prompt = buildSemanticEvaluationPrompt(args);
|
|
129
|
-
try {
|
|
130
|
-
const raw = await args.runtime.useModel(ModelType.TEXT_LARGE, { prompt });
|
|
131
|
-
const parsed = parseJSONObjectFromText(typeof raw === "string" ? raw : "");
|
|
132
|
-
const evaluation = parsed
|
|
133
|
-
? buildSemanticEvaluationResult(parsed, args.nowIso)
|
|
134
|
-
: null;
|
|
135
|
-
if (evaluation) {
|
|
136
|
-
return evaluation;
|
|
137
|
-
}
|
|
138
|
-
const repairedRaw = await args.runtime.useModel(ModelType.TEXT_LARGE, {
|
|
139
|
-
prompt: buildSemanticRepairPrompt({
|
|
140
|
-
evidence: args.evidence,
|
|
141
|
-
goal: args.goal,
|
|
142
|
-
nowIso: args.nowIso,
|
|
143
|
-
rawResponse: typeof raw === "string" ? raw : "",
|
|
144
|
-
}),
|
|
145
|
-
});
|
|
146
|
-
const repairedParsed = parseJSONObjectFromText(typeof repairedRaw === "string" ? repairedRaw : "");
|
|
147
|
-
return repairedParsed
|
|
148
|
-
? buildSemanticEvaluationResult(repairedParsed, args.nowIso)
|
|
149
|
-
: null;
|
|
150
|
-
}
|
|
151
|
-
catch {
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
1
|
+
export * from "@elizaos/app-lifeops/lifeops/goal-semantic-evaluator";
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
readonly status: number;
|
|
3
|
-
constructor(status: number, message: string);
|
|
4
|
-
}
|
|
5
|
-
export declare function googleErrorRequiresReauth(status: number, message: string): boolean;
|
|
6
|
-
export declare function googleErrorLooksLikeAdminPolicyBlock(message: string): boolean;
|
|
1
|
+
export * from "@elizaos/app-lifeops/lifeops/google-api-error";
|
|
7
2
|
//# sourceMappingURL=google-api-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-api-error.d.ts","sourceRoot":"","sources":["../../../../../src/lifeops/google-api-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"google-api-error.d.ts","sourceRoot":"","sources":["../../../../../src/lifeops/google-api-error.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAC"}
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
|
|
2
|
-
"invalid_grant",
|
|
3
|
-
"expired or revoked",
|
|
4
|
-
"token has been expired or revoked",
|
|
5
|
-
"needs re-authentication",
|
|
6
|
-
"needs reauthentication",
|
|
7
|
-
"insufficient authentication scopes",
|
|
8
|
-
];
|
|
9
|
-
const GOOGLE_ADMIN_POLICY_PATTERNS = [
|
|
10
|
-
"admin policy",
|
|
11
|
-
"administrator",
|
|
12
|
-
"not allowed by your organization",
|
|
13
|
-
"not allowed by your domain",
|
|
14
|
-
"access blocked",
|
|
15
|
-
"workspace",
|
|
16
|
-
"restricted to users within its organization",
|
|
17
|
-
];
|
|
18
|
-
function messageContainsAny(message, patterns) {
|
|
19
|
-
const normalized = message.trim().toLowerCase();
|
|
20
|
-
return patterns.some((pattern) => normalized.includes(pattern));
|
|
21
|
-
}
|
|
22
|
-
export class GoogleApiError extends Error {
|
|
23
|
-
status;
|
|
24
|
-
constructor(status, message) {
|
|
25
|
-
super(message);
|
|
26
|
-
this.status = status;
|
|
27
|
-
this.name = "GoogleApiError";
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export function googleErrorRequiresReauth(status, message) {
|
|
31
|
-
return status === 401 || messageContainsAny(message, GOOGLE_REAUTH_PATTERNS);
|
|
32
|
-
}
|
|
33
|
-
export function googleErrorLooksLikeAdminPolicyBlock(message) {
|
|
34
|
-
return messageContainsAny(message, GOOGLE_ADMIN_POLICY_PATTERNS);
|
|
35
|
-
}
|
|
1
|
+
export * from "@elizaos/app-lifeops/lifeops/google-api-error";
|
|
@@ -1,53 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export interface SyncedGoogleCalendarEvent extends Omit<LifeOpsCalendarEvent, "id" | "agentId" | "provider" | "side" | "syncedAt" | "updatedAt"> {
|
|
3
|
-
}
|
|
4
|
-
export declare function fetchGoogleCalendarEvents(args: {
|
|
5
|
-
accessToken: string;
|
|
6
|
-
calendarId?: string;
|
|
7
|
-
timeMin: string;
|
|
8
|
-
timeMax: string;
|
|
9
|
-
timeZone?: string;
|
|
10
|
-
}): Promise<SyncedGoogleCalendarEvent[]>;
|
|
11
|
-
export declare function fetchGoogleCalendarEvent(args: {
|
|
12
|
-
accessToken: string;
|
|
13
|
-
calendarId?: string;
|
|
14
|
-
eventId: string;
|
|
15
|
-
timeZone?: string;
|
|
16
|
-
}): Promise<SyncedGoogleCalendarEvent>;
|
|
17
|
-
export declare function createGoogleCalendarEvent(args: {
|
|
18
|
-
accessToken: string;
|
|
19
|
-
calendarId?: string;
|
|
20
|
-
title: string;
|
|
21
|
-
description?: string;
|
|
22
|
-
location?: string;
|
|
23
|
-
startAt: string;
|
|
24
|
-
endAt: string;
|
|
25
|
-
timeZone: string;
|
|
26
|
-
attendees?: Array<{
|
|
27
|
-
email: string;
|
|
28
|
-
displayName?: string;
|
|
29
|
-
optional?: boolean;
|
|
30
|
-
}>;
|
|
31
|
-
}): Promise<SyncedGoogleCalendarEvent>;
|
|
32
|
-
export declare function updateGoogleCalendarEvent(args: {
|
|
33
|
-
accessToken: string;
|
|
34
|
-
calendarId?: string;
|
|
35
|
-
eventId: string;
|
|
36
|
-
title?: string;
|
|
37
|
-
description?: string;
|
|
38
|
-
location?: string;
|
|
39
|
-
startAt?: string;
|
|
40
|
-
endAt?: string;
|
|
41
|
-
timeZone?: string;
|
|
42
|
-
attendees?: Array<{
|
|
43
|
-
email: string;
|
|
44
|
-
displayName?: string;
|
|
45
|
-
optional?: boolean;
|
|
46
|
-
}>;
|
|
47
|
-
}): Promise<SyncedGoogleCalendarEvent>;
|
|
48
|
-
export declare function deleteGoogleCalendarEvent(args: {
|
|
49
|
-
accessToken: string;
|
|
50
|
-
calendarId?: string;
|
|
51
|
-
eventId: string;
|
|
52
|
-
}): Promise<void>;
|
|
1
|
+
export * from "@elizaos/app-lifeops/lifeops/google-calendar";
|
|
53
2
|
//# sourceMappingURL=google-calendar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-calendar.d.ts","sourceRoot":"","sources":["../../../../../src/lifeops/google-calendar.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"google-calendar.d.ts","sourceRoot":"","sources":["../../../../../src/lifeops/google-calendar.ts"],"names":[],"mappings":"AAAA,cAAc,8CAA8C,CAAC"}
|
|
@@ -1,268 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { googleApiFetch } from "./google-fetch.js";
|
|
3
|
-
import { buildUtcDateFromLocalParts, formatInstantAsRfc3339InTimeZone, } from "./time.js";
|
|
4
|
-
const GOOGLE_CALENDAR_EVENTS_ENDPOINT = "https://www.googleapis.com/calendar/v3/calendars";
|
|
5
|
-
function hasExplicitDateTimeOffset(dateTime) {
|
|
6
|
-
return /(?:[zZ]|[+-]\d{2}:\d{2})$/.test(dateTime);
|
|
7
|
-
}
|
|
8
|
-
function buildGoogleDateTimePayload(dateTime, timeZone) {
|
|
9
|
-
if (!timeZone) {
|
|
10
|
-
return { dateTime };
|
|
11
|
-
}
|
|
12
|
-
return {
|
|
13
|
-
dateTime: hasExplicitDateTimeOffset(dateTime)
|
|
14
|
-
? formatInstantAsRfc3339InTimeZone(dateTime, timeZone)
|
|
15
|
-
: dateTime,
|
|
16
|
-
timeZone,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
function normalizeGoogleDateOnly(date, timeZone) {
|
|
20
|
-
const match = date.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
21
|
-
const effectiveTimeZone = timeZone?.trim() || "UTC";
|
|
22
|
-
if (!match) {
|
|
23
|
-
return {
|
|
24
|
-
iso: new Date(`${date}T00:00:00.000Z`).toISOString(),
|
|
25
|
-
timeZone: timeZone?.trim() || null,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
const localizedMidnight = buildUtcDateFromLocalParts(effectiveTimeZone, {
|
|
29
|
-
year: Number(match[1]),
|
|
30
|
-
month: Number(match[2]),
|
|
31
|
-
day: Number(match[3]),
|
|
32
|
-
hour: 0,
|
|
33
|
-
minute: 0,
|
|
34
|
-
second: 0,
|
|
35
|
-
});
|
|
36
|
-
return {
|
|
37
|
-
iso: localizedMidnight.toISOString(),
|
|
38
|
-
timeZone: effectiveTimeZone,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function readGoogleEventInstant(value, fallbackTimeZone) {
|
|
42
|
-
if (!value) {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
if (typeof value.dateTime === "string" && value.dateTime.trim().length > 0) {
|
|
46
|
-
return {
|
|
47
|
-
iso: new Date(value.dateTime).toISOString(),
|
|
48
|
-
isAllDay: false,
|
|
49
|
-
timeZone: value.timeZone?.trim() || null,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
if (typeof value.date === "string" && value.date.trim().length > 0) {
|
|
53
|
-
const normalized = normalizeGoogleDateOnly(value.date, value.timeZone?.trim() || fallbackTimeZone);
|
|
54
|
-
return {
|
|
55
|
-
iso: normalized.iso,
|
|
56
|
-
isAllDay: true,
|
|
57
|
-
timeZone: normalized.timeZone,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
function readConferenceLink(event) {
|
|
63
|
-
if (event.hangoutLink?.trim()) {
|
|
64
|
-
return event.hangoutLink.trim();
|
|
65
|
-
}
|
|
66
|
-
const entryPoint = event.conferenceData?.entryPoints?.find((candidate) => typeof candidate.uri === "string" && candidate.uri.trim().length > 0);
|
|
67
|
-
return entryPoint?.uri?.trim() || null;
|
|
68
|
-
}
|
|
69
|
-
function normalizeGoogleCalendarEvent(calendarId, event, fallbackTimeZone) {
|
|
70
|
-
const externalId = event.id?.trim();
|
|
71
|
-
const start = readGoogleEventInstant(event.start, fallbackTimeZone);
|
|
72
|
-
const end = readGoogleEventInstant(event.end, start?.timeZone ?? fallbackTimeZone);
|
|
73
|
-
if (!externalId || !start || !end) {
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
return {
|
|
77
|
-
externalId,
|
|
78
|
-
calendarId,
|
|
79
|
-
title: event.summary?.trim() || "Untitled event",
|
|
80
|
-
description: event.description?.trim() || "",
|
|
81
|
-
location: event.location?.trim() || "",
|
|
82
|
-
status: event.status?.trim() || "confirmed",
|
|
83
|
-
startAt: start.iso,
|
|
84
|
-
endAt: end.iso,
|
|
85
|
-
isAllDay: start.isAllDay,
|
|
86
|
-
timezone: start.timeZone || end.timeZone,
|
|
87
|
-
htmlLink: event.htmlLink?.trim() || null,
|
|
88
|
-
conferenceLink: readConferenceLink(event),
|
|
89
|
-
organizer: event.organizer
|
|
90
|
-
? {
|
|
91
|
-
email: event.organizer.email?.trim() || null,
|
|
92
|
-
displayName: event.organizer.displayName?.trim() || null,
|
|
93
|
-
self: Boolean(event.organizer.self),
|
|
94
|
-
}
|
|
95
|
-
: null,
|
|
96
|
-
attendees: (event.attendees ?? []).map((attendee) => ({
|
|
97
|
-
email: attendee.email?.trim() || null,
|
|
98
|
-
displayName: attendee.displayName?.trim() || null,
|
|
99
|
-
responseStatus: attendee.responseStatus?.trim() || null,
|
|
100
|
-
self: Boolean(attendee.self),
|
|
101
|
-
organizer: Boolean(attendee.organizer),
|
|
102
|
-
optional: Boolean(attendee.optional),
|
|
103
|
-
})),
|
|
104
|
-
metadata: {
|
|
105
|
-
iCalUID: event.iCalUID?.trim() || null,
|
|
106
|
-
recurringEventId: event.recurringEventId?.trim() || null,
|
|
107
|
-
createdAt: event.created?.trim() || null,
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
async function _readGoogleCalendarError(response) {
|
|
112
|
-
const text = await response.text();
|
|
113
|
-
if (!text) {
|
|
114
|
-
return `Google Calendar request failed with ${response.status}`;
|
|
115
|
-
}
|
|
116
|
-
try {
|
|
117
|
-
const parsed = JSON.parse(text);
|
|
118
|
-
return parsed.error?.message || text;
|
|
119
|
-
}
|
|
120
|
-
catch {
|
|
121
|
-
return text;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
export async function fetchGoogleCalendarEvents(args) {
|
|
125
|
-
const calendarId = args.calendarId ?? "primary";
|
|
126
|
-
const params = new URLSearchParams({
|
|
127
|
-
singleEvents: "true",
|
|
128
|
-
orderBy: "startTime",
|
|
129
|
-
showDeleted: "false",
|
|
130
|
-
maxResults: "50",
|
|
131
|
-
timeMin: args.timeMin,
|
|
132
|
-
timeMax: args.timeMax,
|
|
133
|
-
fields: "items(id,status,summary,description,location,htmlLink,hangoutLink,iCalUID,recurringEventId,created,updated,start,end,organizer(email,displayName,self),attendees(email,displayName,responseStatus,self,organizer,optional),conferenceData(entryPoints(uri,label,entryPointType)))",
|
|
134
|
-
});
|
|
135
|
-
if (args.timeZone?.trim()) {
|
|
136
|
-
params.set("timeZone", args.timeZone.trim());
|
|
137
|
-
}
|
|
138
|
-
const response = await googleApiFetch(`${GOOGLE_CALENDAR_EVENTS_ENDPOINT}/${encodeURIComponent(calendarId)}/events?${params.toString()}`, {
|
|
139
|
-
headers: {
|
|
140
|
-
Authorization: `Bearer ${args.accessToken}`,
|
|
141
|
-
},
|
|
142
|
-
});
|
|
143
|
-
const parsed = (await response.json());
|
|
144
|
-
const events = [];
|
|
145
|
-
for (const item of parsed.items ?? []) {
|
|
146
|
-
const normalized = normalizeGoogleCalendarEvent(calendarId, item, args.timeZone);
|
|
147
|
-
if (normalized) {
|
|
148
|
-
events.push(normalized);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
return events;
|
|
152
|
-
}
|
|
153
|
-
export async function fetchGoogleCalendarEvent(args) {
|
|
154
|
-
const calendarId = args.calendarId ?? "primary";
|
|
155
|
-
const response = await googleApiFetch(`${GOOGLE_CALENDAR_EVENTS_ENDPOINT}/${encodeURIComponent(calendarId)}/events/${encodeURIComponent(args.eventId)}`, {
|
|
156
|
-
headers: {
|
|
157
|
-
Authorization: `Bearer ${args.accessToken}`,
|
|
158
|
-
},
|
|
159
|
-
});
|
|
160
|
-
const parsed = (await response.json());
|
|
161
|
-
const normalized = normalizeGoogleCalendarEvent(calendarId, parsed, args.timeZone);
|
|
162
|
-
if (!normalized) {
|
|
163
|
-
throw new Error("Google Calendar get event returned an invalid payload.");
|
|
164
|
-
}
|
|
165
|
-
return normalized;
|
|
166
|
-
}
|
|
167
|
-
export async function createGoogleCalendarEvent(args) {
|
|
168
|
-
const calendarId = args.calendarId ?? "primary";
|
|
169
|
-
const body = {
|
|
170
|
-
summary: args.title,
|
|
171
|
-
start: buildGoogleDateTimePayload(args.startAt, args.timeZone),
|
|
172
|
-
end: buildGoogleDateTimePayload(args.endAt, args.timeZone),
|
|
173
|
-
};
|
|
174
|
-
if (args.description?.trim()) {
|
|
175
|
-
body.description = args.description.trim();
|
|
176
|
-
}
|
|
177
|
-
if (args.location?.trim()) {
|
|
178
|
-
body.location = args.location.trim();
|
|
179
|
-
}
|
|
180
|
-
if (args.attendees && args.attendees.length > 0) {
|
|
181
|
-
body.attendees = args.attendees.map((attendee) => ({
|
|
182
|
-
email: attendee.email,
|
|
183
|
-
...(attendee.displayName?.trim()
|
|
184
|
-
? { displayName: attendee.displayName.trim() }
|
|
185
|
-
: {}),
|
|
186
|
-
...(attendee.optional ? { optional: true } : {}),
|
|
187
|
-
}));
|
|
188
|
-
}
|
|
189
|
-
const response = await googleApiFetch(`${GOOGLE_CALENDAR_EVENTS_ENDPOINT}/${encodeURIComponent(calendarId)}/events`, {
|
|
190
|
-
method: "POST",
|
|
191
|
-
headers: {
|
|
192
|
-
Authorization: `Bearer ${args.accessToken}`,
|
|
193
|
-
"Content-Type": "application/json",
|
|
194
|
-
},
|
|
195
|
-
body: JSON.stringify(body),
|
|
196
|
-
});
|
|
197
|
-
const parsed = (await response.json());
|
|
198
|
-
const normalized = normalizeGoogleCalendarEvent(calendarId, parsed, args.timeZone);
|
|
199
|
-
if (!normalized) {
|
|
200
|
-
throw new Error("Google Calendar create event returned an invalid payload.");
|
|
201
|
-
}
|
|
202
|
-
return normalized;
|
|
203
|
-
}
|
|
204
|
-
export async function updateGoogleCalendarEvent(args) {
|
|
205
|
-
const calendarId = args.calendarId ?? "primary";
|
|
206
|
-
// Use PATCH semantics — only the fields the caller supplies are sent, so
|
|
207
|
-
// unrelated fields on the event keep their existing values.
|
|
208
|
-
const body = {};
|
|
209
|
-
if (args.title !== undefined) {
|
|
210
|
-
body.summary = args.title;
|
|
211
|
-
}
|
|
212
|
-
if (args.description !== undefined) {
|
|
213
|
-
body.description = args.description;
|
|
214
|
-
}
|
|
215
|
-
if (args.location !== undefined) {
|
|
216
|
-
body.location = args.location;
|
|
217
|
-
}
|
|
218
|
-
if (args.startAt !== undefined) {
|
|
219
|
-
body.start = buildGoogleDateTimePayload(args.startAt, args.timeZone);
|
|
220
|
-
}
|
|
221
|
-
if (args.endAt !== undefined) {
|
|
222
|
-
body.end = buildGoogleDateTimePayload(args.endAt, args.timeZone);
|
|
223
|
-
}
|
|
224
|
-
if (args.attendees) {
|
|
225
|
-
body.attendees = args.attendees.map((attendee) => ({
|
|
226
|
-
email: attendee.email,
|
|
227
|
-
...(attendee.displayName?.trim()
|
|
228
|
-
? { displayName: attendee.displayName.trim() }
|
|
229
|
-
: {}),
|
|
230
|
-
...(attendee.optional ? { optional: true } : {}),
|
|
231
|
-
}));
|
|
232
|
-
}
|
|
233
|
-
const response = await googleApiFetch(`${GOOGLE_CALENDAR_EVENTS_ENDPOINT}/${encodeURIComponent(calendarId)}/events/${encodeURIComponent(args.eventId)}`, {
|
|
234
|
-
method: "PATCH",
|
|
235
|
-
headers: {
|
|
236
|
-
Authorization: `Bearer ${args.accessToken}`,
|
|
237
|
-
"Content-Type": "application/json",
|
|
238
|
-
},
|
|
239
|
-
body: JSON.stringify(body),
|
|
240
|
-
});
|
|
241
|
-
const parsed = (await response.json());
|
|
242
|
-
const normalized = normalizeGoogleCalendarEvent(calendarId, parsed, args.timeZone);
|
|
243
|
-
if (!normalized) {
|
|
244
|
-
throw new Error("Google Calendar update event returned an invalid payload.");
|
|
245
|
-
}
|
|
246
|
-
return normalized;
|
|
247
|
-
}
|
|
248
|
-
export async function deleteGoogleCalendarEvent(args) {
|
|
249
|
-
const calendarId = args.calendarId ?? "primary";
|
|
250
|
-
// Google returns 204 on successful delete and 410 if the event was already
|
|
251
|
-
// gone. Treat both as success — the user's intent (the event no longer
|
|
252
|
-
// exists) is satisfied either way. We catch GoogleApiError(410) because
|
|
253
|
-
// googleApiFetch treats 4xx as permanent failures.
|
|
254
|
-
try {
|
|
255
|
-
await googleApiFetch(`${GOOGLE_CALENDAR_EVENTS_ENDPOINT}/${encodeURIComponent(calendarId)}/events/${encodeURIComponent(args.eventId)}`, {
|
|
256
|
-
method: "DELETE",
|
|
257
|
-
headers: {
|
|
258
|
-
Authorization: `Bearer ${args.accessToken}`,
|
|
259
|
-
},
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
catch (error) {
|
|
263
|
-
if (error instanceof GoogleApiError && error.status === 410) {
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
throw error;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
1
|
+
export * from "@elizaos/app-lifeops/lifeops/google-calendar";
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export interface GoogleModeAvailability {
|
|
3
|
-
defaultMode: LifeOpsConnectorMode;
|
|
4
|
-
availableModes: LifeOpsConnectorMode[];
|
|
5
|
-
}
|
|
6
|
-
export declare function resolveGoogleExecutionTarget(grantOrMode: Pick<LifeOpsConnectorGrant, "executionTarget" | "mode"> | LifeOpsConnectorMode): LifeOpsConnectorExecutionTarget;
|
|
7
|
-
export declare function resolveGoogleSourceOfTruth(grantOrMode: Pick<LifeOpsConnectorGrant, "sourceOfTruth" | "mode"> | LifeOpsConnectorMode): LifeOpsConnectorSourceOfTruth;
|
|
8
|
-
export declare function resolveGoogleAvailableModes(args: {
|
|
9
|
-
requestUrl: URL;
|
|
10
|
-
cloudConfigured: boolean;
|
|
11
|
-
grants?: readonly LifeOpsConnectorGrant[];
|
|
12
|
-
}): GoogleModeAvailability;
|
|
13
|
-
export declare function resolvePreferredGoogleGrant(args: {
|
|
14
|
-
grants: readonly LifeOpsConnectorGrant[];
|
|
15
|
-
requestedMode?: LifeOpsConnectorMode;
|
|
16
|
-
requestedSide?: LifeOpsConnectorSide;
|
|
17
|
-
defaultMode: LifeOpsConnectorMode;
|
|
18
|
-
}): LifeOpsConnectorGrant | null;
|
|
1
|
+
export * from "@elizaos/app-lifeops/lifeops/google-connector-gateway";
|
|
19
2
|
//# sourceMappingURL=google-connector-gateway.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-connector-gateway.d.ts","sourceRoot":"","sources":["../../../../../src/lifeops/google-connector-gateway.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"google-connector-gateway.d.ts","sourceRoot":"","sources":["../../../../../src/lifeops/google-connector-gateway.ts"],"names":[],"mappings":"AAAA,cAAc,uDAAuD,CAAC"}
|
|
@@ -1,65 +1 @@
|
|
|
1
|
-
|
|
2
|
-
function uniqueModes(modes) {
|
|
3
|
-
return [...new Set(modes)];
|
|
4
|
-
}
|
|
5
|
-
export function resolveGoogleExecutionTarget(grantOrMode) {
|
|
6
|
-
if (typeof grantOrMode === "string") {
|
|
7
|
-
return grantOrMode === "cloud_managed" ? "cloud" : "local";
|
|
8
|
-
}
|
|
9
|
-
if (grantOrMode.executionTarget === "cloud" ||
|
|
10
|
-
grantOrMode.mode === "cloud_managed") {
|
|
11
|
-
return "cloud";
|
|
12
|
-
}
|
|
13
|
-
return "local";
|
|
14
|
-
}
|
|
15
|
-
export function resolveGoogleSourceOfTruth(grantOrMode) {
|
|
16
|
-
if (typeof grantOrMode === "string") {
|
|
17
|
-
return grantOrMode === "cloud_managed"
|
|
18
|
-
? "cloud_connection"
|
|
19
|
-
: "local_storage";
|
|
20
|
-
}
|
|
21
|
-
if (grantOrMode.sourceOfTruth === "cloud_connection" ||
|
|
22
|
-
grantOrMode.mode === "cloud_managed") {
|
|
23
|
-
return "cloud_connection";
|
|
24
|
-
}
|
|
25
|
-
return "local_storage";
|
|
26
|
-
}
|
|
27
|
-
export function resolveGoogleAvailableModes(args) {
|
|
28
|
-
const localModes = resolveConfiguredGoogleModes();
|
|
29
|
-
const grantedModes = (args.grants ?? [])
|
|
30
|
-
.filter((grant) => grant.provider === "google")
|
|
31
|
-
.map((grant) => grant.mode);
|
|
32
|
-
const availableModes = uniqueModes([
|
|
33
|
-
...localModes,
|
|
34
|
-
...(args.cloudConfigured ? ["cloud_managed"] : []),
|
|
35
|
-
...grantedModes,
|
|
36
|
-
]);
|
|
37
|
-
const defaultMode = args.cloudConfigured
|
|
38
|
-
? "cloud_managed"
|
|
39
|
-
: (availableModes[0] ?? resolveGoogleDefaultMode(args.requestUrl));
|
|
40
|
-
return {
|
|
41
|
-
defaultMode,
|
|
42
|
-
availableModes,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
export function resolvePreferredGoogleGrant(args) {
|
|
46
|
-
const googleGrants = args.grants.filter((grant) => grant.provider === "google");
|
|
47
|
-
const scopedGrants = args.requestedSide
|
|
48
|
-
? googleGrants.filter((grant) => grant.side === args.requestedSide)
|
|
49
|
-
: googleGrants;
|
|
50
|
-
if (scopedGrants.length === 0) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
if (args.requestedMode) {
|
|
54
|
-
return (scopedGrants.find((grant) => grant.mode === args.requestedMode) ?? null);
|
|
55
|
-
}
|
|
56
|
-
const preferredGrant = scopedGrants.find((grant) => grant.preferredByAgent) ?? null;
|
|
57
|
-
if (preferredGrant) {
|
|
58
|
-
return preferredGrant;
|
|
59
|
-
}
|
|
60
|
-
const defaultGrant = scopedGrants.find((grant) => grant.mode === args.defaultMode) ?? null;
|
|
61
|
-
if (defaultGrant) {
|
|
62
|
-
return defaultGrant;
|
|
63
|
-
}
|
|
64
|
-
return ([...scopedGrants].sort((left, right) => right.updatedAt.localeCompare(left.updatedAt))[0] ?? null);
|
|
65
|
-
}
|
|
1
|
+
export * from "@elizaos/app-lifeops/lifeops/google-connector-gateway";
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Fetch wrapper for Google APIs with retry, timeout, and structured logging.
|
|
3
|
-
*
|
|
4
|
-
* - 10-second `AbortSignal.timeout` per attempt
|
|
5
|
-
* - Up to 2 retries with exponential backoff (1s, 2s) on transient failures
|
|
6
|
-
* - Fails fast on 4xx (except 429)
|
|
7
|
-
* - Returns the successful `Response` for caller to parse
|
|
8
|
-
* - Throws `GoogleApiError` on permanent failure or exhausted retries
|
|
9
|
-
*/
|
|
10
|
-
export declare function googleApiFetch(url: string, init?: RequestInit): Promise<Response>;
|
|
1
|
+
export * from "@elizaos/app-lifeops/lifeops/google-fetch";
|
|
11
2
|
//# sourceMappingURL=google-fetch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-fetch.d.ts","sourceRoot":"","sources":["../../../../../src/lifeops/google-fetch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"google-fetch.d.ts","sourceRoot":"","sources":["../../../../../src/lifeops/google-fetch.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC"}
|