@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,607 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { hasPrivateAccess } from "../security/access.js";
|
|
3
|
-
export const INTERNAL_URL = new URL("http://127.0.0.1/");
|
|
4
|
-
// Truncate snippet/preview text and append an ellipsis when we actually cut.
|
|
5
|
-
// Without the marker the slice looks like a sentence the sender wrote, which
|
|
6
|
-
// confuses readers when content gets clipped mid-word.
|
|
7
|
-
function truncateForPreview(value, maxLength) {
|
|
8
|
-
if (value.length <= maxLength) {
|
|
9
|
-
return value;
|
|
10
|
-
}
|
|
11
|
-
return `${value.slice(0, maxLength).trimEnd()}…`;
|
|
12
|
-
}
|
|
13
|
-
// Build a "Display Name <email@host>" string when both are available, or
|
|
14
|
-
// fall back to whichever field is set. Without explicit email rendering the
|
|
15
|
-
// reader can't see who actually sent the message — only the display name,
|
|
16
|
-
// which is often spoofable or generic ("Google", "Notifications").
|
|
17
|
-
function formatEmailSender(display, email) {
|
|
18
|
-
const trimmedDisplay = typeof display === "string" ? display.trim() : "";
|
|
19
|
-
const trimmedEmail = typeof email === "string" ? email.trim() : "";
|
|
20
|
-
if (trimmedDisplay && trimmedEmail && trimmedDisplay !== trimmedEmail) {
|
|
21
|
-
return `${trimmedDisplay} <${trimmedEmail}>`;
|
|
22
|
-
}
|
|
23
|
-
return trimmedDisplay || trimmedEmail || "unknown";
|
|
24
|
-
}
|
|
25
|
-
export function toActionData(data) {
|
|
26
|
-
return data;
|
|
27
|
-
}
|
|
28
|
-
export function messageSource(message) {
|
|
29
|
-
const source = message.content
|
|
30
|
-
?.source;
|
|
31
|
-
return typeof source === "string" ? source : null;
|
|
32
|
-
}
|
|
33
|
-
export function messageText(message) {
|
|
34
|
-
const text = message.content?.text;
|
|
35
|
-
return typeof text === "string" ? text : "";
|
|
36
|
-
}
|
|
37
|
-
export async function hasLifeOpsAccess(runtime, message) {
|
|
38
|
-
return hasPrivateAccess(runtime, message);
|
|
39
|
-
}
|
|
40
|
-
export function detailString(details, key) {
|
|
41
|
-
const value = details?.[key];
|
|
42
|
-
return typeof value === "string" && value.trim().length > 0
|
|
43
|
-
? value.trim()
|
|
44
|
-
: undefined;
|
|
45
|
-
}
|
|
46
|
-
export function detailNumber(details, key) {
|
|
47
|
-
const value = details?.[key];
|
|
48
|
-
return typeof value === "number" && Number.isFinite(value)
|
|
49
|
-
? value
|
|
50
|
-
: undefined;
|
|
51
|
-
}
|
|
52
|
-
export function detailBoolean(details, key) {
|
|
53
|
-
const value = details?.[key];
|
|
54
|
-
return typeof value === "boolean" ? value : undefined;
|
|
55
|
-
}
|
|
56
|
-
export function detailObject(details, key) {
|
|
57
|
-
const value = details?.[key];
|
|
58
|
-
return value && typeof value === "object" && !Array.isArray(value)
|
|
59
|
-
? value
|
|
60
|
-
: undefined;
|
|
61
|
-
}
|
|
62
|
-
export function detailArray(details, key) {
|
|
63
|
-
const value = details?.[key];
|
|
64
|
-
return Array.isArray(value) ? value : undefined;
|
|
65
|
-
}
|
|
66
|
-
export function dayRange(offset) {
|
|
67
|
-
const base = new Date();
|
|
68
|
-
base.setHours(0, 0, 0, 0);
|
|
69
|
-
const start = new Date(base.getTime() + offset * 86_400_000);
|
|
70
|
-
return {
|
|
71
|
-
timeMin: start.toISOString(),
|
|
72
|
-
timeMax: new Date(start.getTime() + 86_400_000).toISOString(),
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
export function weekRange() {
|
|
76
|
-
const base = new Date();
|
|
77
|
-
base.setHours(0, 0, 0, 0);
|
|
78
|
-
return {
|
|
79
|
-
timeMin: base.toISOString(),
|
|
80
|
-
timeMax: new Date(base.getTime() + 7 * 86_400_000).toISOString(),
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
export function futureRange(days) {
|
|
84
|
-
const base = new Date();
|
|
85
|
-
base.setHours(0, 0, 0, 0);
|
|
86
|
-
return {
|
|
87
|
-
timeMin: base.toISOString(),
|
|
88
|
-
timeMax: new Date(base.getTime() + days * 86_400_000).toISOString(),
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
function formatCalendarDatePart(date, timeZone, options) {
|
|
92
|
-
return new Intl.DateTimeFormat("en-US", {
|
|
93
|
-
timeZone,
|
|
94
|
-
...options,
|
|
95
|
-
}).format(date);
|
|
96
|
-
}
|
|
97
|
-
function getCalendarYearForDisplay(date, timeZone) {
|
|
98
|
-
return Number(formatCalendarDatePart(date, timeZone, {
|
|
99
|
-
year: "numeric",
|
|
100
|
-
}));
|
|
101
|
-
}
|
|
102
|
-
export function formatCalendarEventDateTime(event, options) {
|
|
103
|
-
const start = new Date(event.startAt);
|
|
104
|
-
const timeZone = event.timezone || undefined;
|
|
105
|
-
const currentYear = getCalendarYearForDisplay(new Date(), timeZone);
|
|
106
|
-
const eventYear = getCalendarYearForDisplay(start, timeZone);
|
|
107
|
-
const includeYear = options?.includeYear ?? eventYear !== currentYear;
|
|
108
|
-
const month = options?.numericDate ? "numeric" : "short";
|
|
109
|
-
const datePart = formatCalendarDatePart(start, timeZone, {
|
|
110
|
-
month,
|
|
111
|
-
day: "numeric",
|
|
112
|
-
...(includeYear ? { year: "numeric" } : {}),
|
|
113
|
-
});
|
|
114
|
-
const timePart = formatCalendarDatePart(start, timeZone, {
|
|
115
|
-
hour: "numeric",
|
|
116
|
-
minute: "2-digit",
|
|
117
|
-
...(options?.includeTimeZoneName ? { timeZoneName: "short" } : {}),
|
|
118
|
-
});
|
|
119
|
-
return `${datePart}, ${timePart}`;
|
|
120
|
-
}
|
|
121
|
-
function formatEventTime(event) {
|
|
122
|
-
if (event.isAllDay) {
|
|
123
|
-
return "all day";
|
|
124
|
-
}
|
|
125
|
-
const start = new Date(event.startAt);
|
|
126
|
-
const end = new Date(event.endAt);
|
|
127
|
-
// Always include the date so a list of multiple events doesn't show
|
|
128
|
-
// identical-looking time-only entries with no way to tell which day
|
|
129
|
-
// they belong to. Year is included only when the event is in a year
|
|
130
|
-
// other than the current one to keep the common case readable.
|
|
131
|
-
const timeZone = event.timezone || undefined;
|
|
132
|
-
const currentYear = getCalendarYearForDisplay(new Date(), timeZone);
|
|
133
|
-
const eventYear = getCalendarYearForDisplay(start, timeZone);
|
|
134
|
-
const includeYear = eventYear !== currentYear;
|
|
135
|
-
const datePart = formatCalendarDatePart(start, timeZone, {
|
|
136
|
-
month: "short",
|
|
137
|
-
day: "numeric",
|
|
138
|
-
...(includeYear ? { year: "numeric" } : {}),
|
|
139
|
-
});
|
|
140
|
-
const startTime = formatCalendarDatePart(start, timeZone, {
|
|
141
|
-
hour: "numeric",
|
|
142
|
-
minute: "2-digit",
|
|
143
|
-
});
|
|
144
|
-
const endTime = formatCalendarDatePart(end, timeZone, {
|
|
145
|
-
hour: "numeric",
|
|
146
|
-
minute: "2-digit",
|
|
147
|
-
});
|
|
148
|
-
return `${datePart}, ${startTime} – ${endTime}`;
|
|
149
|
-
}
|
|
150
|
-
export function formatRelativeMinutes(minutes) {
|
|
151
|
-
if (minutes <= 0) {
|
|
152
|
-
return "now";
|
|
153
|
-
}
|
|
154
|
-
if (minutes < 60) {
|
|
155
|
-
return `in ${Math.round(minutes)} min`;
|
|
156
|
-
}
|
|
157
|
-
const hours = Math.floor(minutes / 60);
|
|
158
|
-
const remainingMinutes = Math.round(minutes % 60);
|
|
159
|
-
return remainingMinutes === 0
|
|
160
|
-
? `in ${hours}h`
|
|
161
|
-
: `in ${hours}h ${remainingMinutes}m`;
|
|
162
|
-
}
|
|
163
|
-
export function formatRelativeTime(isoDate) {
|
|
164
|
-
const diff = Date.now() - Date.parse(isoDate);
|
|
165
|
-
const minutes = Math.floor(diff / 60_000);
|
|
166
|
-
if (minutes < 1) {
|
|
167
|
-
return "just now";
|
|
168
|
-
}
|
|
169
|
-
if (minutes < 60) {
|
|
170
|
-
return `${minutes}m ago`;
|
|
171
|
-
}
|
|
172
|
-
const hours = Math.floor(minutes / 60);
|
|
173
|
-
if (hours < 24) {
|
|
174
|
-
return `${hours}h ago`;
|
|
175
|
-
}
|
|
176
|
-
return `${Math.floor(hours / 24)}d ago`;
|
|
177
|
-
}
|
|
178
|
-
export function formatCalendarFeed(feed, label) {
|
|
179
|
-
if (feed.events.length === 0) {
|
|
180
|
-
return `No events ${label}.`;
|
|
181
|
-
}
|
|
182
|
-
const lines = [`Events ${label}:`];
|
|
183
|
-
for (const event of feed.events) {
|
|
184
|
-
const time = formatEventTime(event);
|
|
185
|
-
const parts = [`- **${event.title}** (${time})`];
|
|
186
|
-
if (event.location) {
|
|
187
|
-
parts.push(` Location: ${event.location}`);
|
|
188
|
-
}
|
|
189
|
-
if (event.attendees.length > 0) {
|
|
190
|
-
const names = event.attendees
|
|
191
|
-
.slice(0, 4)
|
|
192
|
-
.map((attendee) => attendee.displayName || attendee.email || "unknown")
|
|
193
|
-
.join(", ");
|
|
194
|
-
const suffix = event.attendees.length > 4
|
|
195
|
-
? ` +${event.attendees.length - 4} more`
|
|
196
|
-
: "";
|
|
197
|
-
parts.push(` With: ${names}${suffix}`);
|
|
198
|
-
}
|
|
199
|
-
if (event.conferenceLink) {
|
|
200
|
-
parts.push(` Video: ${event.conferenceLink}`);
|
|
201
|
-
}
|
|
202
|
-
lines.push(parts.join("\n"));
|
|
203
|
-
}
|
|
204
|
-
return lines.join("\n");
|
|
205
|
-
}
|
|
206
|
-
export function formatNextEventContext(context) {
|
|
207
|
-
if (!context.event) {
|
|
208
|
-
return "No upcoming events on your calendar.";
|
|
209
|
-
}
|
|
210
|
-
const lines = [
|
|
211
|
-
`**Next event: ${context.event.title}** (${formatEventTime(context.event)})`,
|
|
212
|
-
];
|
|
213
|
-
if (context.startsInMinutes !== null) {
|
|
214
|
-
lines[0] += ` — ${formatRelativeMinutes(context.startsInMinutes)}`;
|
|
215
|
-
}
|
|
216
|
-
if (context.location) {
|
|
217
|
-
lines.push(`Location: ${context.location}`);
|
|
218
|
-
}
|
|
219
|
-
if (context.conferenceLink) {
|
|
220
|
-
lines.push(`Video link: ${context.conferenceLink}`);
|
|
221
|
-
}
|
|
222
|
-
if (context.attendeeNames.length > 0) {
|
|
223
|
-
lines.push(`Attendees: ${context.attendeeNames.join(", ")}`);
|
|
224
|
-
}
|
|
225
|
-
if (context.preparationChecklist.length > 0) {
|
|
226
|
-
lines.push("Preparation:");
|
|
227
|
-
for (const item of context.preparationChecklist) {
|
|
228
|
-
lines.push(`- ${item}`);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
if (context.linkedMail.length > 0) {
|
|
232
|
-
lines.push("Related emails:");
|
|
233
|
-
for (const mail of context.linkedMail.slice(0, 3)) {
|
|
234
|
-
const snippet = mail.snippet
|
|
235
|
-
? ` (${truncateForPreview(mail.snippet, 60)})`
|
|
236
|
-
: "";
|
|
237
|
-
lines.push(`- "${mail.subject}" from ${mail.from}${snippet}`);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
return lines.join("\n");
|
|
241
|
-
}
|
|
242
|
-
export function formatEmailTriage(feed) {
|
|
243
|
-
if (feed.messages.length === 0) {
|
|
244
|
-
return "No important emails right now.";
|
|
245
|
-
}
|
|
246
|
-
const { summary } = feed;
|
|
247
|
-
const parts = [];
|
|
248
|
-
if (summary.unreadCount > 0) {
|
|
249
|
-
parts.push(`${summary.unreadCount} unread`);
|
|
250
|
-
}
|
|
251
|
-
if (summary.importantNewCount > 0) {
|
|
252
|
-
parts.push(`${summary.importantNewCount} important`);
|
|
253
|
-
}
|
|
254
|
-
if (summary.likelyReplyNeededCount > 0) {
|
|
255
|
-
parts.push(`${summary.likelyReplyNeededCount} likely need a reply`);
|
|
256
|
-
}
|
|
257
|
-
const lines = [
|
|
258
|
-
parts.length > 0 ? `Email inbox: ${parts.join(", ")}.` : "Email inbox:",
|
|
259
|
-
];
|
|
260
|
-
for (const message of feed.messages.slice(0, 8)) {
|
|
261
|
-
const badges = [];
|
|
262
|
-
if (message.isImportant) {
|
|
263
|
-
badges.push("important");
|
|
264
|
-
}
|
|
265
|
-
if (message.likelyReplyNeeded) {
|
|
266
|
-
badges.push("reply needed");
|
|
267
|
-
}
|
|
268
|
-
const badgeText = badges.length > 0 ? ` [${badges.join(", ")}]` : "";
|
|
269
|
-
const sender = formatEmailSender(message.from, message.fromEmail);
|
|
270
|
-
lines.push(`- **${message.subject}**${badgeText}`);
|
|
271
|
-
lines.push(` From: ${sender} · ${formatRelativeTime(message.receivedAt)}`);
|
|
272
|
-
if (message.snippet) {
|
|
273
|
-
lines.push(` ${truncateForPreview(message.snippet, 100)}`);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
return lines.join("\n");
|
|
277
|
-
}
|
|
278
|
-
export function formatEmailNeedsResponse(feed) {
|
|
279
|
-
if (feed.messages.length === 0) {
|
|
280
|
-
return "No emails look like they need a reply right now.";
|
|
281
|
-
}
|
|
282
|
-
const lines = [
|
|
283
|
-
`Emails that likely need a reply: ${feed.summary.totalCount}.`,
|
|
284
|
-
];
|
|
285
|
-
for (const message of feed.messages.slice(0, 8)) {
|
|
286
|
-
const sender = formatEmailSender(message.from, message.fromEmail);
|
|
287
|
-
lines.push(`- **${message.subject}** from ${sender} · ${formatRelativeTime(message.receivedAt)}`);
|
|
288
|
-
if (message.snippet) {
|
|
289
|
-
lines.push(` ${truncateForPreview(message.snippet, 120)}`);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
return lines.join("\n");
|
|
293
|
-
}
|
|
294
|
-
function describeEmailSearchQuery(query) {
|
|
295
|
-
const parts = query
|
|
296
|
-
.trim()
|
|
297
|
-
.split(/\s+/)
|
|
298
|
-
.map((part) => part.trim())
|
|
299
|
-
.filter((part) => part.length > 0);
|
|
300
|
-
if (parts.length === 0) {
|
|
301
|
-
return `"${query}"`;
|
|
302
|
-
}
|
|
303
|
-
const sender = parts
|
|
304
|
-
.find((part) => /^from:/i.test(part))
|
|
305
|
-
?.replace(/^from:/i, "")
|
|
306
|
-
.replace(/^"|"$/g, "");
|
|
307
|
-
const newerThan = parts
|
|
308
|
-
.find((part) => /^newer_than:/i.test(part))
|
|
309
|
-
?.replace(/^newer_than:/i, "");
|
|
310
|
-
const before = parts
|
|
311
|
-
.find((part) => /^before:/i.test(part))
|
|
312
|
-
?.replace(/^before:/i, "");
|
|
313
|
-
const after = parts
|
|
314
|
-
.find((part) => /^after:/i.test(part))
|
|
315
|
-
?.replace(/^after:/i, "");
|
|
316
|
-
const isUnread = parts.some((part) => /^is:unread$/i.test(part));
|
|
317
|
-
const isImportant = parts.some((part) => /^is:important$/i.test(part));
|
|
318
|
-
const keywords = parts.filter((part) => !/^(from|newer_than|before|after|is):/i.test(part) &&
|
|
319
|
-
part.trim().length > 0);
|
|
320
|
-
const descriptions = [];
|
|
321
|
-
const formatRelativeWindow = (value) => {
|
|
322
|
-
const match = value.match(/^(\d+)([dmy])$/i);
|
|
323
|
-
if (!match) {
|
|
324
|
-
return value;
|
|
325
|
-
}
|
|
326
|
-
const unit = match[2].toLowerCase() === "d"
|
|
327
|
-
? "day"
|
|
328
|
-
: match[2].toLowerCase() === "m"
|
|
329
|
-
? "month"
|
|
330
|
-
: "year";
|
|
331
|
-
const amount = Number(match[1]);
|
|
332
|
-
return `${amount} ${unit}${amount === 1 ? "" : "s"}`;
|
|
333
|
-
};
|
|
334
|
-
if (sender) {
|
|
335
|
-
descriptions.push(`sender "${sender}"`);
|
|
336
|
-
}
|
|
337
|
-
if (keywords.length > 0) {
|
|
338
|
-
descriptions.push(`matching "${keywords.join(" ")}"`);
|
|
339
|
-
}
|
|
340
|
-
if (newerThan) {
|
|
341
|
-
descriptions.push(`from the last ${formatRelativeWindow(newerThan)}`);
|
|
342
|
-
}
|
|
343
|
-
if (after) {
|
|
344
|
-
descriptions.push(`after ${after}`);
|
|
345
|
-
}
|
|
346
|
-
if (before) {
|
|
347
|
-
descriptions.push(`before ${before}`);
|
|
348
|
-
}
|
|
349
|
-
if (isUnread) {
|
|
350
|
-
descriptions.push("that are unread");
|
|
351
|
-
}
|
|
352
|
-
if (isImportant) {
|
|
353
|
-
descriptions.push("that are marked important");
|
|
354
|
-
}
|
|
355
|
-
return descriptions.length > 0 ? descriptions.join(" ") : `"${query}"`;
|
|
356
|
-
}
|
|
357
|
-
export function formatEmailSearch(feed) {
|
|
358
|
-
const queryDescription = describeEmailSearchQuery(feed.query);
|
|
359
|
-
if (feed.messages.length === 0) {
|
|
360
|
-
return `No email matched ${queryDescription}.`;
|
|
361
|
-
}
|
|
362
|
-
const lines = [
|
|
363
|
-
`Found ${feed.summary.totalCount} email${feed.summary.totalCount === 1 ? "" : "s"} for ${queryDescription}.`,
|
|
364
|
-
];
|
|
365
|
-
for (const message of feed.messages.slice(0, 8)) {
|
|
366
|
-
const badges = [];
|
|
367
|
-
if (message.isImportant) {
|
|
368
|
-
badges.push("important");
|
|
369
|
-
}
|
|
370
|
-
if (message.likelyReplyNeeded) {
|
|
371
|
-
badges.push("reply needed");
|
|
372
|
-
}
|
|
373
|
-
const badgeText = badges.length > 0 ? ` [${badges.join(", ")}]` : "";
|
|
374
|
-
const sender = formatEmailSender(message.from, message.fromEmail);
|
|
375
|
-
lines.push(`- **${message.subject}**${badgeText} from ${sender} · ${formatRelativeTime(message.receivedAt)}`);
|
|
376
|
-
if (message.snippet) {
|
|
377
|
-
lines.push(` ${truncateForPreview(message.snippet, 120)}`);
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
return lines.join("\n");
|
|
381
|
-
}
|
|
382
|
-
export function formatEmailRead(result) {
|
|
383
|
-
const from = formatEmailSender(result.message.from, result.message.fromEmail);
|
|
384
|
-
const bodyText = result.bodyText.trim();
|
|
385
|
-
const maxChars = 2_500;
|
|
386
|
-
const truncated = bodyText.length > maxChars;
|
|
387
|
-
const preview = truncated
|
|
388
|
-
? `${bodyText.slice(0, maxChars).trimEnd()}\n\n[truncated]`
|
|
389
|
-
: bodyText;
|
|
390
|
-
const lines = [
|
|
391
|
-
`**${result.message.subject}** from ${from} · ${formatRelativeTime(result.message.receivedAt)}`,
|
|
392
|
-
];
|
|
393
|
-
if (result.query) {
|
|
394
|
-
lines.push(`Resolved from ${describeEmailSearchQuery(result.query)}.`);
|
|
395
|
-
}
|
|
396
|
-
if (preview.length > 0) {
|
|
397
|
-
lines.push(preview);
|
|
398
|
-
}
|
|
399
|
-
else if (result.message.snippet) {
|
|
400
|
-
lines.push(`No readable body was available. Snippet: ${result.message.snippet}`);
|
|
401
|
-
}
|
|
402
|
-
else {
|
|
403
|
-
lines.push("No readable body was available for that email.");
|
|
404
|
-
}
|
|
405
|
-
return lines.join("\n\n");
|
|
406
|
-
}
|
|
407
|
-
export function formatGmailReplyDraft(draft) {
|
|
408
|
-
const lines = [`Drafted reply for **${draft.subject}**.`];
|
|
409
|
-
if (draft.to.length > 0) {
|
|
410
|
-
lines.push(`To: ${draft.to.join(", ")}`);
|
|
411
|
-
}
|
|
412
|
-
if (draft.cc.length > 0) {
|
|
413
|
-
lines.push(`Cc: ${draft.cc.join(", ")}`);
|
|
414
|
-
}
|
|
415
|
-
lines.push("Preview:");
|
|
416
|
-
for (const line of draft.previewLines.slice(0, 5)) {
|
|
417
|
-
lines.push(`- ${line}`);
|
|
418
|
-
}
|
|
419
|
-
lines.push(draft.sendAllowed
|
|
420
|
-
? "Send is allowed, but still requires explicit confirmation."
|
|
421
|
-
: "Send is not allowed with the current Google grant.");
|
|
422
|
-
return lines.join("\n");
|
|
423
|
-
}
|
|
424
|
-
export function formatGmailBatchReplyDrafts(batch) {
|
|
425
|
-
if (batch.drafts.length === 0) {
|
|
426
|
-
return "No Gmail reply drafts were created.";
|
|
427
|
-
}
|
|
428
|
-
const lines = [
|
|
429
|
-
`Drafted ${batch.summary.totalCount} Gmail repl${batch.summary.totalCount === 1 ? "y" : "ies"}.`,
|
|
430
|
-
];
|
|
431
|
-
for (const draft of batch.drafts.slice(0, 5)) {
|
|
432
|
-
lines.push(`- **${draft.subject}** → ${draft.to.join(", ") || "reply recipients"}`);
|
|
433
|
-
}
|
|
434
|
-
if (batch.summary.requiresConfirmationCount > 0) {
|
|
435
|
-
lines.push(`${batch.summary.requiresConfirmationCount} draft${batch.summary.requiresConfirmationCount === 1 ? "" : "s"} still require send confirmation.`);
|
|
436
|
-
}
|
|
437
|
-
return lines.join("\n");
|
|
438
|
-
}
|
|
439
|
-
export function formatOverview(overview) {
|
|
440
|
-
const summary = overview.owner.summary;
|
|
441
|
-
const lines = [
|
|
442
|
-
"Life Ops overview:",
|
|
443
|
-
`- ${summary.activeOccurrenceCount} active items (${summary.overdueOccurrenceCount} overdue, ${summary.snoozedOccurrenceCount} snoozed)`,
|
|
444
|
-
`- ${summary.activeGoalCount} active goals`,
|
|
445
|
-
`- ${summary.activeReminderCount} pending reminders`,
|
|
446
|
-
];
|
|
447
|
-
if (overview.owner.occurrences.length > 0) {
|
|
448
|
-
lines.push("\nCurrent items:");
|
|
449
|
-
for (const occurrence of overview.owner.occurrences.slice(0, 5)) {
|
|
450
|
-
const state = occurrence.state !== "visible" ? ` (${occurrence.state})` : "";
|
|
451
|
-
lines.push(`- ${occurrence.title}${state}`);
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
if (overview.owner.goals.length > 0) {
|
|
455
|
-
lines.push("\nActive goals:");
|
|
456
|
-
for (const goal of overview.owner.goals.slice(0, 3)) {
|
|
457
|
-
lines.push(`- ${goal.title} (${goal.status})`);
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
return lines.join("\n");
|
|
461
|
-
}
|
|
462
|
-
const REMAINING_TODAY_QUERY_RE = /\b(?:what'?s still left(?: for today)?|what do i still need to do today|anything else .*?(?:get done|finish).*?today|what life ops tasks are still left for today|what remains today|what(?:'s| is) left today)\b/i;
|
|
463
|
-
function looksLikeRemainingTodayOverviewQuery(query) {
|
|
464
|
-
return REMAINING_TODAY_QUERY_RE.test(query);
|
|
465
|
-
}
|
|
466
|
-
function overviewAnchorIso(occurrence) {
|
|
467
|
-
return (occurrence.snoozedUntil ??
|
|
468
|
-
occurrence.dueAt ??
|
|
469
|
-
occurrence.scheduledAt ??
|
|
470
|
-
occurrence.relevanceStartAt);
|
|
471
|
-
}
|
|
472
|
-
function isRelevantToToday(occurrence, now) {
|
|
473
|
-
const timeZone = typeof occurrence.timezone === "string" && occurrence.timezone.trim()
|
|
474
|
-
? occurrence.timezone.trim()
|
|
475
|
-
: "UTC";
|
|
476
|
-
const anchor = new Date(overviewAnchorIso(occurrence));
|
|
477
|
-
if (!Number.isFinite(anchor.getTime())) {
|
|
478
|
-
return true;
|
|
479
|
-
}
|
|
480
|
-
const todayKey = getLocalDateKey(getZonedDateParts(now, timeZone));
|
|
481
|
-
const anchorKey = getLocalDateKey(getZonedDateParts(anchor, timeZone));
|
|
482
|
-
return anchorKey <= todayKey;
|
|
483
|
-
}
|
|
484
|
-
function normalizeRemainingTodayWindowLabel(value) {
|
|
485
|
-
if (typeof value !== "string") {
|
|
486
|
-
return null;
|
|
487
|
-
}
|
|
488
|
-
const trimmed = value.trim();
|
|
489
|
-
return trimmed.length > 0 ? trimmed.toLowerCase() : null;
|
|
490
|
-
}
|
|
491
|
-
function buildRemainingTodayGroups(occurrences, now) {
|
|
492
|
-
const groups = new Map();
|
|
493
|
-
for (const occurrence of occurrences) {
|
|
494
|
-
if (!isRelevantToToday(occurrence, now)) {
|
|
495
|
-
continue;
|
|
496
|
-
}
|
|
497
|
-
const key = `${occurrence.definitionId}:${occurrence.title}`;
|
|
498
|
-
const anchorMs = Date.parse(overviewAnchorIso(occurrence));
|
|
499
|
-
const windowLabel = normalizeRemainingTodayWindowLabel(occurrence.windowName);
|
|
500
|
-
const existing = groups.get(key);
|
|
501
|
-
if (existing) {
|
|
502
|
-
existing.count += 1;
|
|
503
|
-
if (Number.isFinite(anchorMs) && anchorMs < existing.earliestAnchorMs) {
|
|
504
|
-
existing.earliestAnchorMs = anchorMs;
|
|
505
|
-
}
|
|
506
|
-
if (windowLabel && !existing.windows.includes(windowLabel)) {
|
|
507
|
-
existing.windows.push(windowLabel);
|
|
508
|
-
}
|
|
509
|
-
continue;
|
|
510
|
-
}
|
|
511
|
-
groups.set(key, {
|
|
512
|
-
definitionId: occurrence.definitionId,
|
|
513
|
-
title: occurrence.title,
|
|
514
|
-
count: 1,
|
|
515
|
-
earliestAnchorMs: Number.isFinite(anchorMs)
|
|
516
|
-
? anchorMs
|
|
517
|
-
: Number.MAX_SAFE_INTEGER,
|
|
518
|
-
windows: windowLabel ? [windowLabel] : [],
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
return [...groups.values()].sort((left, right) => left.earliestAnchorMs - right.earliestAnchorMs);
|
|
522
|
-
}
|
|
523
|
-
function formatRemainingTodayLabel(group) {
|
|
524
|
-
if (group.windows.length === 1) {
|
|
525
|
-
return `${group.title} ${group.windows[0]}`;
|
|
526
|
-
}
|
|
527
|
-
if (group.windows.length > 1) {
|
|
528
|
-
return `${group.title} (${formatHumanList(group.windows)})`;
|
|
529
|
-
}
|
|
530
|
-
if (group.count > 1) {
|
|
531
|
-
return `${group.title} (${group.count} times)`;
|
|
532
|
-
}
|
|
533
|
-
return group.title;
|
|
534
|
-
}
|
|
535
|
-
function formatHumanList(items) {
|
|
536
|
-
if (items.length === 0)
|
|
537
|
-
return "";
|
|
538
|
-
if (items.length === 1)
|
|
539
|
-
return items[0] || "";
|
|
540
|
-
return new Intl.ListFormat("en", {
|
|
541
|
-
style: "long",
|
|
542
|
-
type: "conjunction",
|
|
543
|
-
}).format(items);
|
|
544
|
-
}
|
|
545
|
-
export function formatOverviewForQuery(overview, query, now = new Date()) {
|
|
546
|
-
if (!looksLikeRemainingTodayOverviewQuery(query)) {
|
|
547
|
-
return formatOverview(overview);
|
|
548
|
-
}
|
|
549
|
-
const remainingTodayGroups = buildRemainingTodayGroups(overview.owner.occurrences, now);
|
|
550
|
-
if (remainingTodayGroups.length === 0) {
|
|
551
|
-
return "You don't have any LifeOps tasks left for today.";
|
|
552
|
-
}
|
|
553
|
-
const labels = remainingTodayGroups
|
|
554
|
-
.slice(0, 5)
|
|
555
|
-
.map((group) => formatRemainingTodayLabel(group));
|
|
556
|
-
const noun = remainingTodayGroups.length === 1 ? "task" : "tasks";
|
|
557
|
-
if (remainingTodayGroups.length <= labels.length) {
|
|
558
|
-
return `You have ${remainingTodayGroups.length} LifeOps ${noun} left for today: ${formatHumanList(labels)}.`;
|
|
559
|
-
}
|
|
560
|
-
return `You have ${remainingTodayGroups.length} LifeOps ${noun} left for today. Next up: ${formatHumanList(labels)}, plus ${remainingTodayGroups.length - labels.length} more.`;
|
|
561
|
-
}
|
|
562
|
-
export async function getGoogleCapabilityStatus(service) {
|
|
563
|
-
let status;
|
|
564
|
-
try {
|
|
565
|
-
status = await service.getGoogleConnectorStatus(INTERNAL_URL);
|
|
566
|
-
}
|
|
567
|
-
catch {
|
|
568
|
-
return {
|
|
569
|
-
status: null,
|
|
570
|
-
connected: false,
|
|
571
|
-
hasCalendarRead: false,
|
|
572
|
-
hasCalendarWrite: false,
|
|
573
|
-
hasGmailTriage: false,
|
|
574
|
-
hasGmailSend: false,
|
|
575
|
-
};
|
|
576
|
-
}
|
|
577
|
-
const capabilities = new Set(status.grantedCapabilities ?? []);
|
|
578
|
-
return {
|
|
579
|
-
status,
|
|
580
|
-
connected: status.connected,
|
|
581
|
-
hasCalendarRead: capabilities.has("google.calendar.read") ||
|
|
582
|
-
capabilities.has("google.calendar.write"),
|
|
583
|
-
hasCalendarWrite: capabilities.has("google.calendar.write"),
|
|
584
|
-
hasGmailTriage: capabilities.has("google.gmail.triage"),
|
|
585
|
-
hasGmailSend: capabilities.has("google.gmail.send"),
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
export function calendarReadUnavailableMessage(google) {
|
|
589
|
-
return google.connected
|
|
590
|
-
? "Google Calendar access is limited. Reconnect Google in LifeOps settings to grant calendar access."
|
|
591
|
-
: "Google Calendar is not connected. Connect Google in LifeOps settings to use calendar actions.";
|
|
592
|
-
}
|
|
593
|
-
export function calendarWriteUnavailableMessage(google) {
|
|
594
|
-
return google.connected
|
|
595
|
-
? "Google Calendar write access is not granted. Reconnect Google in LifeOps settings to allow calendar event creation."
|
|
596
|
-
: "Google Calendar is not connected. Connect Google in LifeOps settings before creating calendar events.";
|
|
597
|
-
}
|
|
598
|
-
export function gmailReadUnavailableMessage(google) {
|
|
599
|
-
return google.connected
|
|
600
|
-
? "Gmail access is limited. Reconnect Google in LifeOps settings to grant Gmail triage and search access."
|
|
601
|
-
: "Gmail is not connected. Connect Google in LifeOps settings to use Gmail actions.";
|
|
602
|
-
}
|
|
603
|
-
export function gmailSendUnavailableMessage(google) {
|
|
604
|
-
return google.connected
|
|
605
|
-
? "Gmail send access is not granted. Reconnect Google in LifeOps settings to allow email sending."
|
|
606
|
-
: "Gmail is not connected. Connect Google in LifeOps settings before sending email.";
|
|
607
|
-
}
|
|
1
|
+
export * from "@elizaos/app-lifeops/actions/lifeops-google-helpers";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-ejected.d.ts","sourceRoot":"","sources":["../../../../../src/actions/list-ejected.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,eAAe,CAAC;AAc3D,eAAO,MAAM,iBAAiB,EAAE,MAqC/B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function getPluginManager(runtime) {
|
|
2
|
+
return runtime.getService("plugin_manager");
|
|
3
|
+
}
|
|
4
|
+
export const listEjectedAction = {
|
|
5
|
+
name: "LIST_EJECTED_PLUGINS",
|
|
6
|
+
similes: ["SHOW_EJECTED", "EJECTED_PLUGINS", "LIST_LOCAL_PLUGIN_FORKS"],
|
|
7
|
+
description: "List all ejected plugins and their upstream metadata.",
|
|
8
|
+
validate: async () => true,
|
|
9
|
+
handler: async (runtime) => {
|
|
10
|
+
const mgr = getPluginManager(runtime);
|
|
11
|
+
if (!mgr) {
|
|
12
|
+
return {
|
|
13
|
+
text: "Plugin manager service is not available.",
|
|
14
|
+
success: false,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const plugins = await mgr.listEjectedPlugins();
|
|
18
|
+
if (plugins.length === 0) {
|
|
19
|
+
return {
|
|
20
|
+
text: "No ejected plugins found.",
|
|
21
|
+
success: true,
|
|
22
|
+
data: { count: 0, plugins: [] },
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const lines = plugins.map((p) => {
|
|
26
|
+
const branch = p.upstream?.branch ? `@${p.upstream.branch}` : "";
|
|
27
|
+
return `- ${p.name}${branch} (${p.path})`;
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
text: [`Ejected plugins (${plugins.length}):`, ...lines].join("\n"),
|
|
31
|
+
success: true,
|
|
32
|
+
data: { count: plugins.length, plugins },
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-level.d.ts","sourceRoot":"","sources":["../../../../../src/actions/log-level.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EAMZ,MAAM,eAAe,CAAC;AA4DvB,eAAO,MAAM,cAAc,EAAE,MAmG5B,CAAC"}
|