@elizaos/agent 2.0.0-alpha.144 → 2.0.0-alpha.152
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,423 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* LLM planning and structured extraction for LifeOps task creation.
|
|
3
|
-
*
|
|
4
|
-
* Performs a second LLM call (TEXT_LARGE) after operation classification
|
|
5
|
-
* to decide whether the current create_definition request should:
|
|
6
|
-
* 1. create or preview a LifeOps item now, or
|
|
7
|
-
* 2. reply/clarify without creating anything yet.
|
|
8
|
-
*
|
|
9
|
-
* When creation is appropriate, the same response also extracts structured
|
|
10
|
-
* fields — title, cadence, priority, time-of-day, etc. — from natural
|
|
11
|
-
* language so life.ts can stay on an LLM-driven extraction path.
|
|
12
|
-
*/
|
|
13
|
-
import { ModelType, parseJSONObjectFromText } from "@elizaos/core";
|
|
14
|
-
import { recentConversationTexts } from "./life-recent-context.js";
|
|
15
|
-
import { resolveContextWindow } from "./lifeops-extraction-config.js";
|
|
16
|
-
import { normalizeExplicitTimeZoneToken } from "./timezone-normalization.js";
|
|
17
|
-
const VALID_CADENCE_KINDS = new Set([
|
|
18
|
-
"once",
|
|
19
|
-
"daily",
|
|
20
|
-
"weekly",
|
|
21
|
-
"times_per_day",
|
|
22
|
-
"interval",
|
|
23
|
-
]);
|
|
24
|
-
const VALID_REQUEST_KINDS = new Set(["alarm", "reminder"]);
|
|
25
|
-
const VALID_CREATE_PLAN_MODES = new Set(["create", "respond"]);
|
|
26
|
-
const ALARM_CONTEXT_RE = /\b(alarm|wake(?:-|\s)?up|wake me up)\b/i;
|
|
27
|
-
const REMINDER_CONTEXT_RE = /\b(remind(?: me)?|reminder|set (?:a )?reminder|create (?:a )?reminder|nudge me|ping me)\b/i;
|
|
28
|
-
const REQUEST_KIND_VALIDATION_WINDOW = 6;
|
|
29
|
-
const DEFAULT_CREATE_PLAN_RESPONSE = "Restate the reminder in one sentence with the task and timing.";
|
|
30
|
-
const EMPTY_TASK_CREATE_PLAN = {
|
|
31
|
-
mode: "respond",
|
|
32
|
-
response: DEFAULT_CREATE_PLAN_RESPONSE,
|
|
33
|
-
requestKind: null,
|
|
34
|
-
title: null,
|
|
35
|
-
description: null,
|
|
36
|
-
cadenceKind: null,
|
|
37
|
-
windows: null,
|
|
38
|
-
weekdays: null,
|
|
39
|
-
timeOfDay: null,
|
|
40
|
-
timeZone: null,
|
|
41
|
-
everyMinutes: null,
|
|
42
|
-
timesPerDay: null,
|
|
43
|
-
priority: null,
|
|
44
|
-
durationMinutes: null,
|
|
45
|
-
};
|
|
46
|
-
// ── Prompt ────────────────────────────────────────────
|
|
47
|
-
function buildExtractionPrompt(intent, recentConversation) {
|
|
48
|
-
return [
|
|
49
|
-
"Plan the next step for a LifeOps create_definition request.",
|
|
50
|
-
"Use the full current user request plus recent conversation.",
|
|
51
|
-
"The user may speak informally, formally, code-switched, or in another language.",
|
|
52
|
-
"Do not strip acknowledgements, fillers, or language-footer text. Interpret the whole request in context.",
|
|
53
|
-
"Infer practical reminder windows from natural phrases when needed: wake up or before work -> morning, lunch or after lunch -> afternoon, after work or dinner -> evening, before bed or before sleep -> night.",
|
|
54
|
-
"Return ONLY a JSON object with these fields (use null for unknown):",
|
|
55
|
-
"",
|
|
56
|
-
'- mode: "create" when the request is specific enough to create or preview a LifeOps item now, "respond" when you should reply without creating anything yet',
|
|
57
|
-
"- response: short natural-language reply when mode is respond, otherwise null",
|
|
58
|
-
'- requestKind: "alarm" when this is explicitly an alarm/wake-up request, "reminder" when it is explicitly a reminder request, otherwise null',
|
|
59
|
-
"- title: short name for the task (2-5 words)",
|
|
60
|
-
"- description: brief description if the user provided context",
|
|
61
|
-
'- cadenceKind: one of "once", "daily", "weekly", "times_per_day", "interval"',
|
|
62
|
-
'- windows: array of time windows like ["morning", "night", "afternoon", "evening"]',
|
|
63
|
-
"- weekdays: array of weekday numbers (0=Sun, 1=Mon, ..., 6=Sat) for weekly tasks",
|
|
64
|
-
'- timeOfDay: specific time in HH:MM 24h format like "15:00" or "08:30" if mentioned',
|
|
65
|
-
'- timeZone: IANA timezone like "America/Denver" when the user explicitly gives one',
|
|
66
|
-
'- everyMinutes: interval in minutes for recurring tasks (e.g., 120 for "every 2 hours")',
|
|
67
|
-
'- timesPerDay: number of times per day if mentioned (e.g., 4 for "four times a day")',
|
|
68
|
-
"- priority: 1-5 (1=low, 5=critical) based on urgency/importance language",
|
|
69
|
-
"- durationMinutes: how long the activity takes if mentioned",
|
|
70
|
-
"",
|
|
71
|
-
"Examples:",
|
|
72
|
-
' "remind me to brush teeth morning and night" -> {"mode":"create","response":null,"requestKind":"reminder","title":"Brush teeth","cadenceKind":"daily","windows":["morning","night"],"description":null,"weekdays":null,"timeOfDay":null,"everyMinutes":null,"timesPerDay":null,"priority":null,"durationMinutes":null}',
|
|
73
|
-
' "call mom every Sunday at 3pm" -> {"mode":"create","response":null,"requestKind":null,"title":"Call mom","cadenceKind":"weekly","weekdays":[0],"timeOfDay":"15:00","description":null,"windows":null,"everyMinutes":null,"timesPerDay":null,"priority":null,"durationMinutes":null}',
|
|
74
|
-
' "drink water every 2 hours" -> {"mode":"create","response":null,"requestKind":null,"title":"Drink water","cadenceKind":"interval","everyMinutes":120,"description":null,"windows":null,"weekdays":null,"timeOfDay":null,"timesPerDay":null,"priority":null,"durationMinutes":null}',
|
|
75
|
-
' "workout 4 times a week" -> {"mode":"create","response":null,"requestKind":null,"title":"Workout","cadenceKind":"weekly","weekdays":[1,3,5,6],"timesPerDay":null,"description":null,"windows":null,"timeOfDay":null,"everyMinutes":null,"priority":null,"durationMinutes":null}',
|
|
76
|
-
' "set an alarm for 7 am" -> {"mode":"create","response":null,"requestKind":"alarm","title":"Alarm","cadenceKind":"once","timeOfDay":"07:00","description":null,"windows":null,"weekdays":null,"everyMinutes":null,"timesPerDay":null,"priority":null,"durationMinutes":null}',
|
|
77
|
-
' "set a reminder for tomorrow at 9am to call mom" -> {"mode":"create","response":null,"requestKind":"reminder","title":"Call mom","cadenceKind":"once","timeOfDay":"09:00","description":null,"windows":null,"weekdays":null,"everyMinutes":null,"timesPerDay":null,"priority":null,"durationMinutes":null}',
|
|
78
|
-
' "make sure I brush my teeth when I wake up and before bed" -> {"mode":"create","response":null,"requestKind":"reminder","title":"Brush teeth","cadenceKind":"daily","windows":["morning","night"],"description":null,"weekdays":null,"timeOfDay":null,"timeZone":null,"everyMinutes":null,"timesPerDay":null,"priority":null,"durationMinutes":null}',
|
|
79
|
-
' "recuérdame cepillarme los dientes por la mañana y por la noche" -> {"mode":"create","response":null,"requestKind":"reminder","title":"Brush teeth","cadenceKind":"daily","windows":["morning","night"],"description":null,"weekdays":null,"timeOfDay":null,"timeZone":null,"everyMinutes":null,"timesPerDay":null,"priority":null,"durationMinutes":null}',
|
|
80
|
-
' "set a reminder for april 17 at 8pm mountain time to hug my wife" -> {"mode":"create","response":null,"requestKind":"reminder","title":"Hug my wife","cadenceKind":"once","timeOfDay":"20:00","timeZone":"America/Denver","description":null,"windows":null,"weekdays":null,"everyMinutes":null,"timesPerDay":null,"priority":null,"durationMinutes":30}',
|
|
81
|
-
' "lol yeah. can you help me add a todo for my life?" -> {"mode":"respond","response":"What do you want the todo to be, and when should it happen?","requestKind":null,"title":null,"description":null,"cadenceKind":null,"windows":null,"weekdays":null,"timeOfDay":null,"everyMinutes":null,"timesPerDay":null,"priority":null,"durationMinutes":null}',
|
|
82
|
-
"",
|
|
83
|
-
"Use recent conversation only to resolve short follow-ups. Do not emit requestKind='alarm' or requestKind='reminder' unless the current request or recent conversation explicitly supports it.",
|
|
84
|
-
"If the user has not actually specified the todo/habit yet, choose mode='respond' and ask a concise clarifying question instead of inventing a task.",
|
|
85
|
-
"",
|
|
86
|
-
"Return ONLY valid JSON. No prose.",
|
|
87
|
-
"",
|
|
88
|
-
`User request: ${JSON.stringify(intent)}`,
|
|
89
|
-
`Recent conversation: ${JSON.stringify(recentConversation)}`,
|
|
90
|
-
].join("\n");
|
|
91
|
-
}
|
|
92
|
-
// ── Validators ────────────────────────────────────────
|
|
93
|
-
function validateTitle(value) {
|
|
94
|
-
if (typeof value !== "string")
|
|
95
|
-
return null;
|
|
96
|
-
const trimmed = value.trim();
|
|
97
|
-
return trimmed.length > 0 ? trimmed : null;
|
|
98
|
-
}
|
|
99
|
-
function validateRequestKind(value) {
|
|
100
|
-
if (typeof value !== "string")
|
|
101
|
-
return null;
|
|
102
|
-
const normalized = value.trim().toLowerCase();
|
|
103
|
-
return VALID_REQUEST_KINDS.has(normalized)
|
|
104
|
-
? normalized
|
|
105
|
-
: null;
|
|
106
|
-
}
|
|
107
|
-
function validateCreatePlanMode(value) {
|
|
108
|
-
if (typeof value !== "string")
|
|
109
|
-
return null;
|
|
110
|
-
const normalized = value.trim().toLowerCase();
|
|
111
|
-
return VALID_CREATE_PLAN_MODES.has(normalized)
|
|
112
|
-
? normalized
|
|
113
|
-
: null;
|
|
114
|
-
}
|
|
115
|
-
function validateResponse(value) {
|
|
116
|
-
if (typeof value !== "string")
|
|
117
|
-
return null;
|
|
118
|
-
const trimmed = value.trim();
|
|
119
|
-
return trimmed.length > 0 ? trimmed : null;
|
|
120
|
-
}
|
|
121
|
-
function validateCadenceKind(value) {
|
|
122
|
-
if (typeof value !== "string")
|
|
123
|
-
return null;
|
|
124
|
-
return VALID_CADENCE_KINDS.has(value)
|
|
125
|
-
? value
|
|
126
|
-
: null;
|
|
127
|
-
}
|
|
128
|
-
function validateWindows(value) {
|
|
129
|
-
if (!Array.isArray(value))
|
|
130
|
-
return null;
|
|
131
|
-
const filtered = value.filter((w) => typeof w === "string" && w.trim().length > 0);
|
|
132
|
-
return filtered.length > 0 ? filtered : null;
|
|
133
|
-
}
|
|
134
|
-
function validateWeekdays(value) {
|
|
135
|
-
if (!Array.isArray(value))
|
|
136
|
-
return null;
|
|
137
|
-
const filtered = value.filter((d) => typeof d === "number" && Number.isInteger(d) && d >= 0 && d <= 6);
|
|
138
|
-
return filtered.length > 0 ? filtered : null;
|
|
139
|
-
}
|
|
140
|
-
function validateTimeOfDay(value) {
|
|
141
|
-
if (typeof value !== "string")
|
|
142
|
-
return null;
|
|
143
|
-
const trimmed = value.trim();
|
|
144
|
-
// Accept HH:MM format
|
|
145
|
-
if (/^\d{1,2}:\d{2}$/.test(trimmed))
|
|
146
|
-
return trimmed;
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
function validateTimeZone(value) {
|
|
150
|
-
if (typeof value !== "string") {
|
|
151
|
-
return null;
|
|
152
|
-
}
|
|
153
|
-
return normalizeExplicitTimeZoneToken(value);
|
|
154
|
-
}
|
|
155
|
-
function validatePositiveNumber(value) {
|
|
156
|
-
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
|
|
157
|
-
return null;
|
|
158
|
-
}
|
|
159
|
-
return value;
|
|
160
|
-
}
|
|
161
|
-
function validatePriority(value) {
|
|
162
|
-
if (typeof value !== "number" || !Number.isFinite(value))
|
|
163
|
-
return null;
|
|
164
|
-
return Math.max(1, Math.min(5, Math.round(value)));
|
|
165
|
-
}
|
|
166
|
-
function validateRequestKindAgainstContext(value, currentText, recentWindow) {
|
|
167
|
-
if (!value) {
|
|
168
|
-
return null;
|
|
169
|
-
}
|
|
170
|
-
const texts = [currentText, ...recentWindow];
|
|
171
|
-
const pattern = value === "alarm" ? ALARM_CONTEXT_RE : REMINDER_CONTEXT_RE;
|
|
172
|
-
return texts.some((text) => pattern.test(text)) ? value : null;
|
|
173
|
-
}
|
|
174
|
-
function buildTaskCreatePlan(args) {
|
|
175
|
-
const { parsed, intent, recentWindow } = args;
|
|
176
|
-
const mode = validateCreatePlanMode(parsed.mode);
|
|
177
|
-
if (!mode) {
|
|
178
|
-
return null;
|
|
179
|
-
}
|
|
180
|
-
return {
|
|
181
|
-
mode,
|
|
182
|
-
response: mode === "respond"
|
|
183
|
-
? (validateResponse(parsed.response) ?? DEFAULT_CREATE_PLAN_RESPONSE)
|
|
184
|
-
: null,
|
|
185
|
-
requestKind: validateRequestKindAgainstContext(validateRequestKind(parsed.requestKind), intent, recentWindow.slice(-REQUEST_KIND_VALIDATION_WINDOW)),
|
|
186
|
-
title: validateTitle(parsed.title),
|
|
187
|
-
description: validateTitle(parsed.description),
|
|
188
|
-
cadenceKind: validateCadenceKind(parsed.cadenceKind),
|
|
189
|
-
windows: validateWindows(parsed.windows),
|
|
190
|
-
weekdays: validateWeekdays(parsed.weekdays),
|
|
191
|
-
timeOfDay: validateTimeOfDay(parsed.timeOfDay),
|
|
192
|
-
timeZone: validateTimeZone(parsed.timeZone),
|
|
193
|
-
everyMinutes: validatePositiveNumber(parsed.everyMinutes),
|
|
194
|
-
timesPerDay: validatePositiveNumber(parsed.timesPerDay),
|
|
195
|
-
priority: validatePriority(parsed.priority),
|
|
196
|
-
durationMinutes: validatePositiveNumber(parsed.durationMinutes),
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
function buildRepairPrompt(args) {
|
|
200
|
-
return [
|
|
201
|
-
"Your last reply for the LifeOps create-definition planner was invalid.",
|
|
202
|
-
"Return ONLY valid JSON with these exact fields:",
|
|
203
|
-
"mode, response, requestKind, title, description, cadenceKind, windows, weekdays, timeOfDay, timeZone, everyMinutes, timesPerDay, priority, durationMinutes",
|
|
204
|
-
"",
|
|
205
|
-
'mode must be "create" or "respond".',
|
|
206
|
-
"If mode is respond, include a short clarifying response.",
|
|
207
|
-
"If mode is create, response must be null.",
|
|
208
|
-
"",
|
|
209
|
-
`User request: ${JSON.stringify(args.intent)}`,
|
|
210
|
-
`Recent conversation: ${JSON.stringify(args.recentConversation)}`,
|
|
211
|
-
`Previous invalid output: ${JSON.stringify(args.rawResponse)}`,
|
|
212
|
-
].join("\n");
|
|
213
|
-
}
|
|
214
|
-
function buildExtractionFailurePlan() {
|
|
215
|
-
return {
|
|
216
|
-
...EMPTY_TASK_CREATE_PLAN,
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
// ── Extractor ─────────────────────────────────────────
|
|
220
|
-
/**
|
|
221
|
-
* Call the LLM to plan whether a create_definition request should create
|
|
222
|
-
* a task draft now or reply first, while also extracting structured
|
|
223
|
-
* task parameters for the create path.
|
|
224
|
-
*/
|
|
225
|
-
export async function extractTaskCreatePlanWithLlm(args) {
|
|
226
|
-
const { runtime, intent } = args;
|
|
227
|
-
if (!intent || intent.trim().length === 0) {
|
|
228
|
-
return buildExtractionFailurePlan();
|
|
229
|
-
}
|
|
230
|
-
const recentWindow = await recentConversationTexts({
|
|
231
|
-
runtime,
|
|
232
|
-
message: args.message,
|
|
233
|
-
state: args.state,
|
|
234
|
-
limit: Math.max(resolveContextWindow(), REQUEST_KIND_VALIDATION_WINDOW),
|
|
235
|
-
});
|
|
236
|
-
if (typeof runtime.useModel !== "function") {
|
|
237
|
-
return buildExtractionFailurePlan();
|
|
238
|
-
}
|
|
239
|
-
const recentConversation = recentWindow
|
|
240
|
-
.slice(-resolveContextWindow())
|
|
241
|
-
.join("\n");
|
|
242
|
-
const prompt = buildExtractionPrompt(intent, recentConversation);
|
|
243
|
-
try {
|
|
244
|
-
const result = await runtime.useModel(ModelType.TEXT_LARGE, { prompt });
|
|
245
|
-
const raw = typeof result === "string" ? result : "";
|
|
246
|
-
const parsed = parseJSONObjectFromText(raw);
|
|
247
|
-
const parsedPlan = parsed
|
|
248
|
-
? buildTaskCreatePlan({
|
|
249
|
-
parsed,
|
|
250
|
-
intent,
|
|
251
|
-
recentWindow,
|
|
252
|
-
})
|
|
253
|
-
: null;
|
|
254
|
-
if (parsedPlan) {
|
|
255
|
-
return parsedPlan;
|
|
256
|
-
}
|
|
257
|
-
const repairResult = await runtime.useModel(ModelType.TEXT_LARGE, {
|
|
258
|
-
prompt: buildRepairPrompt({
|
|
259
|
-
intent,
|
|
260
|
-
recentConversation,
|
|
261
|
-
rawResponse: raw,
|
|
262
|
-
}),
|
|
263
|
-
});
|
|
264
|
-
const repairedRaw = typeof repairResult === "string" ? repairResult : "";
|
|
265
|
-
const repairedParsed = parseJSONObjectFromText(repairedRaw);
|
|
266
|
-
if (!repairedParsed) {
|
|
267
|
-
return buildExtractionFailurePlan();
|
|
268
|
-
}
|
|
269
|
-
return (buildTaskCreatePlan({
|
|
270
|
-
parsed: repairedParsed,
|
|
271
|
-
intent,
|
|
272
|
-
recentWindow,
|
|
273
|
-
}) ?? buildExtractionFailurePlan());
|
|
274
|
-
}
|
|
275
|
-
catch {
|
|
276
|
-
return buildExtractionFailurePlan();
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
export async function extractTaskParamsWithLlm(args) {
|
|
280
|
-
const plan = await extractTaskCreatePlanWithLlm(args);
|
|
281
|
-
const { mode: _mode, response: _response, ...params } = plan;
|
|
282
|
-
return params;
|
|
283
|
-
}
|
|
284
|
-
// ── Reminder intensity extractor ─────────────────────
|
|
285
|
-
/** Valid LifeOpsReminderIntensity values (mirrors shared/contracts/lifeops). */
|
|
286
|
-
const VALID_REMINDER_INTENSITIES = new Set([
|
|
287
|
-
"minimal",
|
|
288
|
-
"normal",
|
|
289
|
-
"persistent",
|
|
290
|
-
"high_priority_only",
|
|
291
|
-
]);
|
|
292
|
-
const EMPTY_REMINDER_INTENSITY_PLAN = {
|
|
293
|
-
intensity: "unknown",
|
|
294
|
-
};
|
|
295
|
-
function parseReminderIntensityPlan(raw) {
|
|
296
|
-
const normalized = raw.trim().toLowerCase();
|
|
297
|
-
if (VALID_REMINDER_INTENSITIES.has(normalized)) {
|
|
298
|
-
return {
|
|
299
|
-
intensity: normalized,
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
const parsed = parseJSONObjectFromText(raw);
|
|
303
|
-
if (!parsed || typeof parsed.intensity !== "string") {
|
|
304
|
-
return null;
|
|
305
|
-
}
|
|
306
|
-
const parsedIntensity = parsed.intensity.trim().toLowerCase();
|
|
307
|
-
if (!VALID_REMINDER_INTENSITIES.has(parsedIntensity)) {
|
|
308
|
-
return null;
|
|
309
|
-
}
|
|
310
|
-
return {
|
|
311
|
-
intensity: parsedIntensity,
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
function buildReminderIntensityRepairPrompt(args) {
|
|
315
|
-
return [
|
|
316
|
-
"Your last reply for the LifeOps reminder-intensity extractor was invalid.",
|
|
317
|
-
'Return ONLY valid JSON like {"intensity":"minimal"}.',
|
|
318
|
-
'Allowed intensity values: "minimal", "normal", "persistent", "high_priority_only".',
|
|
319
|
-
"",
|
|
320
|
-
`User said: ${JSON.stringify(args.intent)}`,
|
|
321
|
-
`Previous invalid output: ${JSON.stringify(args.rawResponse)}`,
|
|
322
|
-
].join("\n");
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Ask a small text model to classify the user's intent into a reminder
|
|
326
|
-
* intensity value. Returns an explicit "unknown" result when the model is
|
|
327
|
-
* unavailable or the response is invalid so callers do not need regex
|
|
328
|
-
* fallbacks.
|
|
329
|
-
*/
|
|
330
|
-
export async function extractReminderIntensityWithLlm(args) {
|
|
331
|
-
if (typeof args.runtime.useModel !== "function") {
|
|
332
|
-
return { ...EMPTY_REMINDER_INTENSITY_PLAN };
|
|
333
|
-
}
|
|
334
|
-
const prompt = [
|
|
335
|
-
"The user is requesting a change to their reminder frequency.",
|
|
336
|
-
"Classify into exactly one of these values:",
|
|
337
|
-
"- minimal: user wants fewer/less reminders",
|
|
338
|
-
"- normal: user wants default/standard reminders",
|
|
339
|
-
"- persistent: user wants more/frequent reminders",
|
|
340
|
-
"- high_priority_only: user wants to pause or mute most reminders",
|
|
341
|
-
"",
|
|
342
|
-
'Return ONLY valid JSON like {"intensity":"minimal"}. No prose.',
|
|
343
|
-
"",
|
|
344
|
-
`User said: ${JSON.stringify(args.intent)}`,
|
|
345
|
-
].join("\n");
|
|
346
|
-
try {
|
|
347
|
-
const result = await args.runtime.useModel(ModelType.TEXT_SMALL, {
|
|
348
|
-
prompt,
|
|
349
|
-
});
|
|
350
|
-
const raw = typeof result === "string" ? result : "";
|
|
351
|
-
const parsed = parseReminderIntensityPlan(raw);
|
|
352
|
-
if (parsed) {
|
|
353
|
-
return parsed;
|
|
354
|
-
}
|
|
355
|
-
const repairResult = await args.runtime.useModel(ModelType.TEXT_SMALL, {
|
|
356
|
-
prompt: buildReminderIntensityRepairPrompt({
|
|
357
|
-
intent: args.intent,
|
|
358
|
-
rawResponse: raw,
|
|
359
|
-
}),
|
|
360
|
-
});
|
|
361
|
-
const repairedRaw = typeof repairResult === "string" ? repairResult : "";
|
|
362
|
-
return (parseReminderIntensityPlan(repairedRaw) ?? {
|
|
363
|
-
...EMPTY_REMINDER_INTENSITY_PLAN,
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
catch {
|
|
367
|
-
return { ...EMPTY_REMINDER_INTENSITY_PLAN };
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
// ── Website unlock mode extractor ────────────────────
|
|
371
|
-
/** Valid unlock modes (mirrors shared/contracts/lifeops). */
|
|
372
|
-
const VALID_UNLOCK_MODES = new Set([
|
|
373
|
-
"fixed_duration",
|
|
374
|
-
"until_manual_lock",
|
|
375
|
-
"until_callback",
|
|
376
|
-
]);
|
|
377
|
-
/**
|
|
378
|
-
* Ask a small text model to determine the website unlock mode from the
|
|
379
|
-
* user's intent. Returns null when the model is unavailable, throws, or
|
|
380
|
-
* returns an invalid value — callers should fall back to regex.
|
|
381
|
-
*/
|
|
382
|
-
export async function extractUnlockModeWithLlm(args) {
|
|
383
|
-
if (typeof args.runtime.useModel !== "function")
|
|
384
|
-
return null;
|
|
385
|
-
const prompt = [
|
|
386
|
-
"The user is configuring website blocking. Determine the unlock mode:",
|
|
387
|
-
"- fixed_duration: unlock for a specific time period (extract durationMinutes)",
|
|
388
|
-
"- until_manual_lock: unlock until user manually re-locks",
|
|
389
|
-
"- until_callback: unlock until a specific event/task completes (extract callbackKey as a slug)",
|
|
390
|
-
"",
|
|
391
|
-
"Return JSON: { mode, durationMinutes?, callbackKey? }",
|
|
392
|
-
"Return null if no unlock mode is detectable.",
|
|
393
|
-
"",
|
|
394
|
-
`User said: ${JSON.stringify(args.intent)}`,
|
|
395
|
-
].join("\n");
|
|
396
|
-
try {
|
|
397
|
-
const result = await args.runtime.useModel(ModelType.TEXT_SMALL, {
|
|
398
|
-
prompt,
|
|
399
|
-
});
|
|
400
|
-
const raw = typeof result === "string" ? result : "";
|
|
401
|
-
const parsed = parseJSONObjectFromText(raw);
|
|
402
|
-
if (!parsed?.mode)
|
|
403
|
-
return null;
|
|
404
|
-
if (!VALID_UNLOCK_MODES.has(parsed.mode))
|
|
405
|
-
return null;
|
|
406
|
-
return {
|
|
407
|
-
mode: parsed.mode,
|
|
408
|
-
callbackKey: typeof parsed.callbackKey === "string"
|
|
409
|
-
? parsed.callbackKey.trim() || undefined
|
|
410
|
-
: undefined,
|
|
411
|
-
durationMinutes: typeof parsed.durationMinutes === "number" &&
|
|
412
|
-
Number.isFinite(parsed.durationMinutes) &&
|
|
413
|
-
parsed.durationMinutes > 0
|
|
414
|
-
? parsed.durationMinutes
|
|
415
|
-
: undefined,
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
catch {
|
|
419
|
-
return null;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
// Re-export for tests
|
|
423
|
-
export { buildExtractionPrompt };
|
|
1
|
+
export * from "@elizaos/app-lifeops/actions/life-param-extractor";
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function recentConversationTextsFromState(state: State | undefined, limit?: number): string[];
|
|
3
|
-
export declare function recentConversationTexts(args: {
|
|
4
|
-
runtime: IAgentRuntime;
|
|
5
|
-
message?: Memory;
|
|
6
|
-
state: State | undefined;
|
|
7
|
-
limit?: number;
|
|
8
|
-
}): Promise<string[]>;
|
|
1
|
+
export * from "@elizaos/app-lifeops/actions/life-recent-context";
|
|
9
2
|
//# sourceMappingURL=life-recent-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"life-recent-context.d.ts","sourceRoot":"","sources":["../../../../../src/actions/life-recent-context.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"life-recent-context.d.ts","sourceRoot":"","sources":["../../../../../src/actions/life-recent-context.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC"}
|
|
@@ -1,84 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// This is language-agnostic — strips any short prefix label followed by a colon,
|
|
3
|
-
// rather than hardcoding specific English role names.
|
|
4
|
-
const STATE_SPEAKER_PREFIX_RE = /^[a-zA-Z\u00C0-\u024F\u0400-\u04FF\u3000-\u9FFF]{1,20}\s*:\s*/;
|
|
5
|
-
function normalizeConversationLine(value) {
|
|
6
|
-
return value.replace(STATE_SPEAKER_PREFIX_RE, "").trim();
|
|
7
|
-
}
|
|
8
|
-
function splitConversationText(value) {
|
|
9
|
-
return value
|
|
10
|
-
.split(/\n+/)
|
|
11
|
-
.map((line) => normalizeConversationLine(line))
|
|
12
|
-
.filter((line) => line.length > 0);
|
|
13
|
-
}
|
|
14
|
-
function dedupePreservingOrder(values) {
|
|
15
|
-
const seen = new Set();
|
|
16
|
-
const deduped = [];
|
|
17
|
-
for (const value of values) {
|
|
18
|
-
if (seen.has(value)) {
|
|
19
|
-
continue;
|
|
20
|
-
}
|
|
21
|
-
seen.add(value);
|
|
22
|
-
deduped.push(value);
|
|
23
|
-
}
|
|
24
|
-
return deduped;
|
|
25
|
-
}
|
|
26
|
-
export function recentConversationTextsFromState(state, limit = 6) {
|
|
27
|
-
if (!state || typeof state !== "object") {
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
const stateRecord = state;
|
|
31
|
-
const values = stateRecord.values && typeof stateRecord.values === "object"
|
|
32
|
-
? stateRecord.values
|
|
33
|
-
: undefined;
|
|
34
|
-
const collected = [];
|
|
35
|
-
const pushText = (value) => {
|
|
36
|
-
if (typeof value === "string" && value.trim().length > 0) {
|
|
37
|
-
collected.push(...splitConversationText(value));
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
pushText(values?.recentMessages);
|
|
41
|
-
pushText(stateRecord.text);
|
|
42
|
-
const recentMessagesData = stateRecord.recentMessagesData ?? stateRecord.recentMessages;
|
|
43
|
-
if (Array.isArray(recentMessagesData)) {
|
|
44
|
-
for (const item of recentMessagesData) {
|
|
45
|
-
if (!item || typeof item !== "object") {
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
const content = item.content;
|
|
49
|
-
if (!content || typeof content !== "object") {
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
pushText(content.text);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return dedupePreservingOrder(collected.slice(-Math.max(1, limit)));
|
|
56
|
-
}
|
|
57
|
-
export async function recentConversationTexts(args) {
|
|
58
|
-
const limit = Math.max(1, args.limit ?? 6);
|
|
59
|
-
const stateTexts = recentConversationTextsFromState(args.state, limit);
|
|
60
|
-
const roomId = typeof args.message?.roomId === "string" ? args.message.roomId : "";
|
|
61
|
-
if (stateTexts.length >= limit ||
|
|
62
|
-
!roomId ||
|
|
63
|
-
typeof args.runtime.getMemories !== "function") {
|
|
64
|
-
return stateTexts;
|
|
65
|
-
}
|
|
66
|
-
try {
|
|
67
|
-
const memories = await args.runtime.getMemories({
|
|
68
|
-
roomId,
|
|
69
|
-
tableName: "messages",
|
|
70
|
-
limit: limit,
|
|
71
|
-
});
|
|
72
|
-
const memoryTexts = Array.isArray(memories)
|
|
73
|
-
? memories
|
|
74
|
-
.map((memory) => typeof memory?.content?.text === "string"
|
|
75
|
-
? normalizeConversationLine(memory.content.text)
|
|
76
|
-
: "")
|
|
77
|
-
.filter((text) => text.length > 0)
|
|
78
|
-
: [];
|
|
79
|
-
return dedupePreservingOrder([...memoryTexts, ...stateTexts].slice(-limit));
|
|
80
|
-
}
|
|
81
|
-
catch {
|
|
82
|
-
return stateTexts;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
1
|
+
export * from "@elizaos/app-lifeops/actions/life-recent-context";
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export interface ExtractedUpdateFields {
|
|
3
|
-
title: string | null;
|
|
4
|
-
cadenceKind: string | null;
|
|
5
|
-
windows: string[] | null;
|
|
6
|
-
weekdays: number[] | null;
|
|
7
|
-
timeOfDay: string | null;
|
|
8
|
-
everyMinutes: number | null;
|
|
9
|
-
priority: number | null;
|
|
10
|
-
description: string | null;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* When the LLM caller passes an update_definition intent without pre-parsed
|
|
14
|
-
* structured fields (e.g. "change my workout to 6am"), this function asks
|
|
15
|
-
* a large text model to extract which fields the user actually wants to change.
|
|
16
|
-
*
|
|
17
|
-
* Returns an explicit empty update object when the model is unavailable or the
|
|
18
|
-
* response is unparseable, so callers do not need heuristic fallbacks.
|
|
19
|
-
*/
|
|
20
|
-
export declare function extractUpdateFieldsWithLlm(args: {
|
|
21
|
-
runtime: IAgentRuntime;
|
|
22
|
-
intent: string;
|
|
23
|
-
currentTitle: string;
|
|
24
|
-
currentCadenceKind: string;
|
|
25
|
-
currentWindows: string[];
|
|
26
|
-
}): Promise<ExtractedUpdateFields>;
|
|
1
|
+
export * from "@elizaos/app-lifeops/actions/life-update-extractor";
|
|
27
2
|
//# sourceMappingURL=life-update-extractor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"life-update-extractor.d.ts","sourceRoot":"","sources":["../../../../../src/actions/life-update-extractor.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"life-update-extractor.d.ts","sourceRoot":"","sources":["../../../../../src/actions/life-update-extractor.ts"],"names":[],"mappings":"AAAA,cAAc,oDAAoD,CAAC"}
|