@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,372 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
|
-
import { homedir } from "node:os";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { ModelType } from "@elizaos/core";
|
|
6
|
-
import { withTrajectoryContext } from "./trajectory-context.js";
|
|
7
|
-
const terminalNodeStates = new Set([
|
|
8
|
-
"completed",
|
|
9
|
-
"failed",
|
|
10
|
-
"canceled",
|
|
11
|
-
"interrupted",
|
|
12
|
-
]);
|
|
13
|
-
const activeVerifierRuns = new Set();
|
|
14
|
-
function extractJsonBlock(raw) {
|
|
15
|
-
const trimmed = raw.trim();
|
|
16
|
-
const fenceMatch = trimmed.match(/```(?:json)?\s*([\s\S]*?)\s*```/i);
|
|
17
|
-
return (fenceMatch?.[1] ?? trimmed).trim();
|
|
18
|
-
}
|
|
19
|
-
function parseAcceptanceEvaluation(raw) {
|
|
20
|
-
try {
|
|
21
|
-
const parsed = JSON.parse(extractJsonBlock(raw));
|
|
22
|
-
if ((parsed.verdict !== "pass" && parsed.verdict !== "fail") ||
|
|
23
|
-
typeof parsed.summary !== "string" ||
|
|
24
|
-
parsed.summary.trim().length === 0) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
const checklist = Array.isArray(parsed.checklist)
|
|
28
|
-
? parsed.checklist
|
|
29
|
-
.filter((entry) => Boolean(entry &&
|
|
30
|
-
typeof entry === "object" &&
|
|
31
|
-
typeof entry.criterion ===
|
|
32
|
-
"string" &&
|
|
33
|
-
typeof entry.status === "string" &&
|
|
34
|
-
typeof entry.evidence === "string"))
|
|
35
|
-
.map((entry) => ({
|
|
36
|
-
criterion: entry.criterion.trim(),
|
|
37
|
-
status: entry.status === "pass" ||
|
|
38
|
-
entry.status === "fail" ||
|
|
39
|
-
entry.status === "partial"
|
|
40
|
-
? entry.status
|
|
41
|
-
: "partial",
|
|
42
|
-
evidence: entry.evidence.trim(),
|
|
43
|
-
}))
|
|
44
|
-
.filter((entry) => entry.criterion.length > 0 && entry.evidence.length > 0)
|
|
45
|
-
: [];
|
|
46
|
-
return {
|
|
47
|
-
verdict: parsed.verdict,
|
|
48
|
-
summary: parsed.summary.trim(),
|
|
49
|
-
checklist,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function getVerifierRootDir() {
|
|
57
|
-
const stateDir = process.env.ELIZA_STATE_DIR?.trim() ||
|
|
58
|
-
process.env.ELIZA_STATE_DIR?.trim() ||
|
|
59
|
-
path.join(homedir(), ".eliza");
|
|
60
|
-
return path.join(stateDir, "task-verifiers");
|
|
61
|
-
}
|
|
62
|
-
function truncate(text, limit = 1_200) {
|
|
63
|
-
const compact = text.replace(/\s+/g, " ").trim();
|
|
64
|
-
return compact.length <= limit ? compact : `${compact.slice(0, limit)}...`;
|
|
65
|
-
}
|
|
66
|
-
function isVerifierReady(thread, job) {
|
|
67
|
-
if (job.status !== "pending")
|
|
68
|
-
return false;
|
|
69
|
-
if (job.verifierType !== "acceptance_criteria")
|
|
70
|
-
return false;
|
|
71
|
-
const executionNodes = thread.nodes.filter((node) => node.kind !== "goal");
|
|
72
|
-
if (executionNodes.some((node) => !terminalNodeStates.has(node.status))) {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
if (!job.nodeId)
|
|
76
|
-
return true;
|
|
77
|
-
const node = thread.nodes.find((entry) => entry.id === job.nodeId);
|
|
78
|
-
return node ? terminalNodeStates.has(node.status) : false;
|
|
79
|
-
}
|
|
80
|
-
function collectAcceptancePrerequisiteFailures(thread) {
|
|
81
|
-
const executionNodes = thread.nodes.filter((node) => node.kind === "execution");
|
|
82
|
-
const passedCompletionVerifierNodeIds = new Set(thread.verifierJobs
|
|
83
|
-
.filter((job) => job.verifierType === "task_completion" &&
|
|
84
|
-
job.status === "passed" &&
|
|
85
|
-
typeof job.nodeId === "string")
|
|
86
|
-
.map((job) => job.nodeId));
|
|
87
|
-
const evidenceBackedNodeIds = new Set(thread.evidence
|
|
88
|
-
.filter((entry) => typeof entry.nodeId === "string" &&
|
|
89
|
-
(entry.evidenceType === "validation_summary" ||
|
|
90
|
-
entry.evidenceType === "acceptance_report"))
|
|
91
|
-
.map((entry) => entry.nodeId));
|
|
92
|
-
return {
|
|
93
|
-
failedExecutionNodes: executionNodes.filter((node) => node.status === "failed" ||
|
|
94
|
-
node.status === "canceled" ||
|
|
95
|
-
node.status === "interrupted"),
|
|
96
|
-
completedWithoutEvidence: executionNodes.filter((node) => node.status === "completed" &&
|
|
97
|
-
!passedCompletionVerifierNodeIds.has(node.id) &&
|
|
98
|
-
!evidenceBackedNodeIds.has(node.id)),
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
function buildDeterministicFailureEvaluation(thread, failures) {
|
|
102
|
-
if (failures.failedExecutionNodes.length > 0) {
|
|
103
|
-
return {
|
|
104
|
-
verdict: "fail",
|
|
105
|
-
summary: `Acceptance cannot pass because execution nodes failed: ${failures.failedExecutionNodes.map((node) => node.title).join(", ")}.`,
|
|
106
|
-
checklist: thread.acceptanceCriteria.map((criterion) => ({
|
|
107
|
-
criterion,
|
|
108
|
-
status: "fail",
|
|
109
|
-
evidence: `Execution nodes failed before acceptance verification completed: ${failures.failedExecutionNodes.map((node) => `${node.title}=${node.status}`).join(", ")}.`,
|
|
110
|
-
})),
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
if (failures.completedWithoutEvidence.length > 0) {
|
|
114
|
-
return {
|
|
115
|
-
verdict: "fail",
|
|
116
|
-
summary: `Acceptance cannot pass because completed execution nodes lack verification evidence: ${failures.completedWithoutEvidence.map((node) => node.title).join(", ")}.`,
|
|
117
|
-
checklist: thread.acceptanceCriteria.map((criterion) => ({
|
|
118
|
-
criterion,
|
|
119
|
-
status: "partial",
|
|
120
|
-
evidence: `Missing task-completion evidence for: ${failures.completedWithoutEvidence.map((node) => node.title).join(", ")}.`,
|
|
121
|
-
})),
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
function summarizeThreadEvidence(thread) {
|
|
127
|
-
const sessionSummaries = thread.sessions
|
|
128
|
-
.map((session) => [
|
|
129
|
-
`${session.label} [${session.framework}] status=${session.status}`,
|
|
130
|
-
session.completionSummary
|
|
131
|
-
? `summary=${truncate(session.completionSummary, 400)}`
|
|
132
|
-
: "",
|
|
133
|
-
]
|
|
134
|
-
.filter(Boolean)
|
|
135
|
-
.join(" | "))
|
|
136
|
-
.filter(Boolean)
|
|
137
|
-
.join("\n");
|
|
138
|
-
const decisions = thread.decisions
|
|
139
|
-
.slice(-8)
|
|
140
|
-
.map((decision) => `${decision.decision}: ${truncate(decision.reasoning, 240)}`)
|
|
141
|
-
.join("\n");
|
|
142
|
-
const artifacts = thread.artifacts
|
|
143
|
-
.slice(-12)
|
|
144
|
-
.map((artifact) => `${artifact.artifactType}: ${artifact.title}${artifact.path ? ` (${artifact.path})` : ""}`)
|
|
145
|
-
.join("\n");
|
|
146
|
-
const evidence = thread.evidence
|
|
147
|
-
.slice(-16)
|
|
148
|
-
.map((entry) => `${entry.evidenceType}: ${entry.title}${entry.summary ? ` - ${truncate(entry.summary, 220)}` : ""}`)
|
|
149
|
-
.join("\n");
|
|
150
|
-
const transcripts = thread.transcripts
|
|
151
|
-
.slice(-8)
|
|
152
|
-
.map((entry) => `${entry.direction}: ${truncate(entry.content, 240)}`)
|
|
153
|
-
.join("\n");
|
|
154
|
-
return [
|
|
155
|
-
sessionSummaries ? `Sessions\n${sessionSummaries}` : "",
|
|
156
|
-
decisions ? `Decisions\n${decisions}` : "",
|
|
157
|
-
artifacts ? `Artifacts\n${artifacts}` : "",
|
|
158
|
-
evidence ? `Evidence\n${evidence}` : "",
|
|
159
|
-
transcripts ? `Recent transcripts\n${transcripts}` : "",
|
|
160
|
-
]
|
|
161
|
-
.filter(Boolean)
|
|
162
|
-
.join("\n\n");
|
|
163
|
-
}
|
|
164
|
-
async function evaluateAcceptanceCriteria(runtime, thread, job) {
|
|
165
|
-
const prompt = [
|
|
166
|
-
"You are a strict task verifier for an agent coordinator.",
|
|
167
|
-
"Decide whether the thread satisfies its acceptance criteria based only on the provided evidence.",
|
|
168
|
-
"Return JSON only with keys: verdict, summary, checklist.",
|
|
169
|
-
'Set verdict to "pass" only if every criterion is satisfied by concrete evidence.',
|
|
170
|
-
'Set verdict to "fail" if any criterion is missing, contradicted, or unsupported.',
|
|
171
|
-
"Each checklist entry must contain criterion, status (pass|fail|partial), and evidence.",
|
|
172
|
-
"",
|
|
173
|
-
`Thread title: ${thread.title}`,
|
|
174
|
-
`Original request: ${thread.originalRequest}`,
|
|
175
|
-
`Verifier job: ${job.title}`,
|
|
176
|
-
`Acceptance criteria:\n${thread.acceptanceCriteria.map((criterion, index) => `${index + 1}. ${criterion}`).join("\n")}`,
|
|
177
|
-
"",
|
|
178
|
-
`Thread evidence:\n${summarizeThreadEvidence(thread) || "No evidence recorded."}`,
|
|
179
|
-
].join("\n");
|
|
180
|
-
const raw = await withTrajectoryContext(runtime, {
|
|
181
|
-
source: "orchestrator",
|
|
182
|
-
decisionType: "acceptance-verifier",
|
|
183
|
-
threadId: thread.id,
|
|
184
|
-
verifierJobId: job.id,
|
|
185
|
-
}, () => runtime.useModel(ModelType.TEXT_SMALL, {
|
|
186
|
-
prompt,
|
|
187
|
-
temperature: 0,
|
|
188
|
-
stream: false,
|
|
189
|
-
}));
|
|
190
|
-
const parsed = parseAcceptanceEvaluation(raw);
|
|
191
|
-
if (parsed) {
|
|
192
|
-
return parsed;
|
|
193
|
-
}
|
|
194
|
-
return {
|
|
195
|
-
verdict: "fail",
|
|
196
|
-
summary: "Acceptance verifier returned an invalid response, so the thread could not be proven complete.",
|
|
197
|
-
checklist: thread.acceptanceCriteria.map((criterion) => ({
|
|
198
|
-
criterion,
|
|
199
|
-
status: "partial",
|
|
200
|
-
evidence: "Verifier response was invalid JSON.",
|
|
201
|
-
})),
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
async function writeAcceptanceReport(thread, job, evaluation) {
|
|
205
|
-
const dir = path.join(getVerifierRootDir(), thread.id);
|
|
206
|
-
await mkdir(dir, { recursive: true });
|
|
207
|
-
const reportPath = path.join(dir, `${job.id}.json`);
|
|
208
|
-
const report = {
|
|
209
|
-
threadId: thread.id,
|
|
210
|
-
verifierJobId: job.id,
|
|
211
|
-
title: job.title,
|
|
212
|
-
originalRequest: thread.originalRequest,
|
|
213
|
-
acceptanceCriteria: thread.acceptanceCriteria,
|
|
214
|
-
evaluation,
|
|
215
|
-
generatedAt: new Date().toISOString(),
|
|
216
|
-
};
|
|
217
|
-
const serialized = JSON.stringify(report, null, 2);
|
|
218
|
-
await writeFile(reportPath, serialized, "utf8");
|
|
219
|
-
return {
|
|
220
|
-
reportPath,
|
|
221
|
-
sha256: createHash("sha256").update(serialized).digest("hex"),
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
async function finalizeAcceptanceJob(taskRegistry, thread, job, evaluation, reportPath, sha256) {
|
|
225
|
-
await taskRegistry.updateTaskVerifierJob(job.id, {
|
|
226
|
-
status: evaluation.verdict === "pass" ? "passed" : "failed",
|
|
227
|
-
completedAt: new Date().toISOString(),
|
|
228
|
-
metadata: {
|
|
229
|
-
verdict: evaluation.verdict,
|
|
230
|
-
summary: evaluation.summary,
|
|
231
|
-
reportPath,
|
|
232
|
-
sha256,
|
|
233
|
-
checklist: evaluation.checklist,
|
|
234
|
-
},
|
|
235
|
-
});
|
|
236
|
-
await taskRegistry.recordArtifact({
|
|
237
|
-
threadId: thread.id,
|
|
238
|
-
sessionId: thread.latestSessionId ?? null,
|
|
239
|
-
artifactType: "acceptance_report",
|
|
240
|
-
title: `${job.title} report`,
|
|
241
|
-
path: reportPath,
|
|
242
|
-
mimeType: "application/json",
|
|
243
|
-
metadata: {
|
|
244
|
-
verifierJobId: job.id,
|
|
245
|
-
verdict: evaluation.verdict,
|
|
246
|
-
sha256,
|
|
247
|
-
},
|
|
248
|
-
});
|
|
249
|
-
await taskRegistry.recordTaskEvidence({
|
|
250
|
-
threadId: thread.id,
|
|
251
|
-
nodeId: job.nodeId,
|
|
252
|
-
sessionId: thread.latestSessionId ?? null,
|
|
253
|
-
verifierJobId: job.id,
|
|
254
|
-
evidenceType: "acceptance_report",
|
|
255
|
-
title: job.title,
|
|
256
|
-
summary: evaluation.summary,
|
|
257
|
-
path: reportPath,
|
|
258
|
-
content: {
|
|
259
|
-
checklist: evaluation.checklist,
|
|
260
|
-
verdict: evaluation.verdict,
|
|
261
|
-
},
|
|
262
|
-
metadata: {
|
|
263
|
-
sha256,
|
|
264
|
-
},
|
|
265
|
-
});
|
|
266
|
-
await taskRegistry.appendEvent({
|
|
267
|
-
threadId: thread.id,
|
|
268
|
-
sessionId: thread.latestSessionId ?? null,
|
|
269
|
-
eventType: "verifier_job_completed",
|
|
270
|
-
summary: `${job.title} ${evaluation.verdict}`,
|
|
271
|
-
data: {
|
|
272
|
-
verifierJobId: job.id,
|
|
273
|
-
verdict: evaluation.verdict,
|
|
274
|
-
reportPath,
|
|
275
|
-
},
|
|
276
|
-
});
|
|
277
|
-
if (job.nodeId) {
|
|
278
|
-
const node = thread.nodes.find((entry) => entry.id === job.nodeId);
|
|
279
|
-
const patch = evaluation.verdict === "pass"
|
|
280
|
-
? {
|
|
281
|
-
metadata: {
|
|
282
|
-
acceptanceVerifierJobId: job.id,
|
|
283
|
-
acceptanceSummary: evaluation.summary,
|
|
284
|
-
},
|
|
285
|
-
}
|
|
286
|
-
: {
|
|
287
|
-
status: "failed",
|
|
288
|
-
metadata: {
|
|
289
|
-
acceptanceVerifierJobId: job.id,
|
|
290
|
-
acceptanceSummary: evaluation.summary,
|
|
291
|
-
},
|
|
292
|
-
};
|
|
293
|
-
if (node) {
|
|
294
|
-
await taskRegistry.updateTaskNode(node.id, patch);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
export async function runReadyTaskVerifiers(runtime, taskRegistry, threadId) {
|
|
299
|
-
let thread = await taskRegistry.getThread(threadId);
|
|
300
|
-
if (!thread) {
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
const readyJobs = thread.verifierJobs.filter((job) => isVerifierReady(thread, job));
|
|
304
|
-
for (const job of readyJobs) {
|
|
305
|
-
if (activeVerifierRuns.has(job.id)) {
|
|
306
|
-
continue;
|
|
307
|
-
}
|
|
308
|
-
activeVerifierRuns.add(job.id);
|
|
309
|
-
try {
|
|
310
|
-
await taskRegistry.updateTaskVerifierJob(job.id, {
|
|
311
|
-
status: "running",
|
|
312
|
-
startedAt: new Date().toISOString(),
|
|
313
|
-
metadata: {
|
|
314
|
-
source: "acceptance-runner",
|
|
315
|
-
},
|
|
316
|
-
});
|
|
317
|
-
await taskRegistry.appendEvent({
|
|
318
|
-
threadId,
|
|
319
|
-
sessionId: thread.latestSessionId ?? null,
|
|
320
|
-
eventType: "verifier_job_started",
|
|
321
|
-
summary: `Running ${job.title}`,
|
|
322
|
-
data: {
|
|
323
|
-
verifierJobId: job.id,
|
|
324
|
-
verifierType: job.verifierType,
|
|
325
|
-
},
|
|
326
|
-
});
|
|
327
|
-
thread = (await taskRegistry.getThread(threadId)) ?? thread;
|
|
328
|
-
const deterministicFailure = buildDeterministicFailureEvaluation(thread, collectAcceptancePrerequisiteFailures(thread));
|
|
329
|
-
const evaluation = deterministicFailure ??
|
|
330
|
-
(await evaluateAcceptanceCriteria(runtime, thread, job));
|
|
331
|
-
const report = await writeAcceptanceReport(thread, job, evaluation);
|
|
332
|
-
await finalizeAcceptanceJob(taskRegistry, thread, job, evaluation, report.reportPath, report.sha256);
|
|
333
|
-
thread = (await taskRegistry.getThread(threadId)) ?? thread;
|
|
334
|
-
}
|
|
335
|
-
catch (error) {
|
|
336
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
337
|
-
await taskRegistry.updateTaskVerifierJob(job.id, {
|
|
338
|
-
status: "failed",
|
|
339
|
-
completedAt: new Date().toISOString(),
|
|
340
|
-
metadata: {
|
|
341
|
-
source: "acceptance-runner",
|
|
342
|
-
error: message,
|
|
343
|
-
},
|
|
344
|
-
});
|
|
345
|
-
await taskRegistry.appendEvent({
|
|
346
|
-
threadId,
|
|
347
|
-
sessionId: thread.latestSessionId ?? null,
|
|
348
|
-
eventType: "verifier_job_failed",
|
|
349
|
-
summary: `${job.title} failed`,
|
|
350
|
-
data: {
|
|
351
|
-
verifierJobId: job.id,
|
|
352
|
-
error: message,
|
|
353
|
-
},
|
|
354
|
-
});
|
|
355
|
-
if (job.nodeId) {
|
|
356
|
-
await taskRegistry.updateTaskNode(job.nodeId, {
|
|
357
|
-
status: "failed",
|
|
358
|
-
metadata: {
|
|
359
|
-
acceptanceVerifierJobId: job.id,
|
|
360
|
-
acceptanceSummary: message,
|
|
361
|
-
},
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
finally {
|
|
366
|
-
activeVerifierRuns.delete(job.id);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
export function isTerminalTaskNodeStatus(status) {
|
|
371
|
-
return terminalNodeStates.has(status);
|
|
372
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Trajectory Context — Tag orchestrator LLM calls for trajectory logging.
|
|
3
|
-
*
|
|
4
|
-
* Sets a lightweight context object on the runtime before `useModel()` calls
|
|
5
|
-
* so the trajectory logger can identify orchestrator-specific LLM invocations
|
|
6
|
-
* (coordination decisions, stall classification, idle checks, etc.) and tag
|
|
7
|
-
* them with meaningful metadata instead of the generic "action" / "runtime.useModel".
|
|
8
|
-
*
|
|
9
|
-
* The milaidy trajectory-persistence layer reads `runtime.__orchestratorTrajectoryCtx`
|
|
10
|
-
* in its `appendLlmCall` patch and writes the context into the trajectory record.
|
|
11
|
-
*
|
|
12
|
-
* @module services/trajectory-context
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Any runtime-like object. We accept both `AgentRuntime` and `IAgentRuntime`
|
|
16
|
-
* since different call sites use different types. Using a minimal interface
|
|
17
|
-
* avoids index-signature incompatibilities with ElizaOS types.
|
|
18
|
-
*/
|
|
19
|
-
type RuntimeLike = object;
|
|
20
|
-
/**
|
|
21
|
-
* Orchestrator decision types that map to specific LLM call sites.
|
|
22
|
-
*/
|
|
23
|
-
export type OrchestratorDecisionType = "coordination" | "turn-complete" | "idle-check" | "stall-classification" | "stall-classify-decide" | "swarm-context-generation" | "event-triage" | "task-validation" | "acceptance-verifier";
|
|
24
|
-
export interface OrchestratorTrajectoryContext {
|
|
25
|
-
/** Source identifier — always "orchestrator" */
|
|
26
|
-
source: "orchestrator";
|
|
27
|
-
/** Which decision type triggered this LLM call */
|
|
28
|
-
decisionType: OrchestratorDecisionType;
|
|
29
|
-
/** PTY session ID of the agent being evaluated */
|
|
30
|
-
sessionId?: string;
|
|
31
|
-
/** Durable task thread identifier */
|
|
32
|
-
threadId?: string;
|
|
33
|
-
/** Acceptance verifier job identifier */
|
|
34
|
-
verifierJobId?: string;
|
|
35
|
-
/** Human-readable task label */
|
|
36
|
-
taskLabel?: string;
|
|
37
|
-
/** Repository URL or identifier (for trajectory feedback filtering) */
|
|
38
|
-
repo?: string;
|
|
39
|
-
/** Workspace directory path */
|
|
40
|
-
workdir?: string;
|
|
41
|
-
/** Original task description assigned to the agent */
|
|
42
|
-
originalTask?: string;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Set orchestrator trajectory context on the runtime.
|
|
46
|
-
* Call this before `runtime.useModel()` and clear it after.
|
|
47
|
-
*/
|
|
48
|
-
export declare function setTrajectoryContext(runtime: RuntimeLike, ctx: OrchestratorTrajectoryContext): void;
|
|
49
|
-
/**
|
|
50
|
-
* Clear orchestrator trajectory context from the runtime.
|
|
51
|
-
*/
|
|
52
|
-
export declare function clearTrajectoryContext(runtime: RuntimeLike): void;
|
|
53
|
-
/**
|
|
54
|
-
* Read the current orchestrator trajectory context (if any).
|
|
55
|
-
* Used by the trajectory logger on the milaidy side.
|
|
56
|
-
*/
|
|
57
|
-
export declare function readTrajectoryContext(runtime: unknown): OrchestratorTrajectoryContext | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* Wrap a `useModel()` call with trajectory context tagging.
|
|
60
|
-
* Ensures the context is always cleared, even if the call throws.
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```ts
|
|
64
|
-
* const result = await withTrajectoryContext(
|
|
65
|
-
* ctx.runtime,
|
|
66
|
-
* { source: "orchestrator", decisionType: "coordination", sessionId },
|
|
67
|
-
* () => ctx.runtime.useModel(ModelType.TEXT_SMALL, { prompt }),
|
|
68
|
-
* );
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
export declare function withTrajectoryContext<T>(runtime: RuntimeLike, ctx: OrchestratorTrajectoryContext, fn: () => Promise<T>): Promise<T>;
|
|
72
|
-
export {};
|
|
73
|
-
//# sourceMappingURL=trajectory-context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trajectory-context.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/trajectory-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,KAAK,WAAW,GAAG,MAAM,CAAC;AAE1B;;GAEG;AACH,MAAM,MAAM,wBAAwB,GACjC,cAAc,GACd,eAAe,GACf,YAAY,GACZ,sBAAsB,GACtB,uBAAuB,GACvB,0BAA0B,GAC1B,cAAc,GACd,iBAAiB,GACjB,qBAAqB,CAAC;AAEzB,MAAM,WAAW,6BAA6B;IAC7C,gDAAgD;IAChD,MAAM,EAAE,cAAc,CAAC;IACvB,kDAAkD;IAClD,YAAY,EAAE,wBAAwB,CAAC;IACvC,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAID;;;GAGG;AACH,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,6BAA6B,GAChC,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAEjE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,OAAO,GACd,6BAA6B,GAAG,SAAS,CAQ3C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,EAC5C,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,6BAA6B,EAClC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAClB,OAAO,CAAC,CAAC,CAAC,CAOZ"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Trajectory Context — Tag orchestrator LLM calls for trajectory logging.
|
|
3
|
-
*
|
|
4
|
-
* Sets a lightweight context object on the runtime before `useModel()` calls
|
|
5
|
-
* so the trajectory logger can identify orchestrator-specific LLM invocations
|
|
6
|
-
* (coordination decisions, stall classification, idle checks, etc.) and tag
|
|
7
|
-
* them with meaningful metadata instead of the generic "action" / "runtime.useModel".
|
|
8
|
-
*
|
|
9
|
-
* The milaidy trajectory-persistence layer reads `runtime.__orchestratorTrajectoryCtx`
|
|
10
|
-
* in its `appendLlmCall` patch and writes the context into the trajectory record.
|
|
11
|
-
*
|
|
12
|
-
* @module services/trajectory-context
|
|
13
|
-
*/
|
|
14
|
-
const CTX_KEY = "__orchestratorTrajectoryCtx";
|
|
15
|
-
/**
|
|
16
|
-
* Set orchestrator trajectory context on the runtime.
|
|
17
|
-
* Call this before `runtime.useModel()` and clear it after.
|
|
18
|
-
*/
|
|
19
|
-
export function setTrajectoryContext(runtime, ctx) {
|
|
20
|
-
runtime[CTX_KEY] = ctx;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Clear orchestrator trajectory context from the runtime.
|
|
24
|
-
*/
|
|
25
|
-
export function clearTrajectoryContext(runtime) {
|
|
26
|
-
runtime[CTX_KEY] = undefined;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Read the current orchestrator trajectory context (if any).
|
|
30
|
-
* Used by the trajectory logger on the milaidy side.
|
|
31
|
-
*/
|
|
32
|
-
export function readTrajectoryContext(runtime) {
|
|
33
|
-
if (!runtime || typeof runtime !== "object")
|
|
34
|
-
return undefined;
|
|
35
|
-
const ctx = runtime[CTX_KEY];
|
|
36
|
-
if (!ctx || typeof ctx !== "object")
|
|
37
|
-
return undefined;
|
|
38
|
-
const candidate = ctx;
|
|
39
|
-
if (candidate.source !== "orchestrator" || !candidate.decisionType)
|
|
40
|
-
return undefined;
|
|
41
|
-
return candidate;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Wrap a `useModel()` call with trajectory context tagging.
|
|
45
|
-
* Ensures the context is always cleared, even if the call throws.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```ts
|
|
49
|
-
* const result = await withTrajectoryContext(
|
|
50
|
-
* ctx.runtime,
|
|
51
|
-
* { source: "orchestrator", decisionType: "coordination", sessionId },
|
|
52
|
-
* () => ctx.runtime.useModel(ModelType.TEXT_SMALL, { prompt }),
|
|
53
|
-
* );
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
export async function withTrajectoryContext(runtime, ctx, fn) {
|
|
57
|
-
setTrajectoryContext(runtime, ctx);
|
|
58
|
-
try {
|
|
59
|
-
return await fn();
|
|
60
|
-
}
|
|
61
|
-
finally {
|
|
62
|
-
clearTrajectoryContext(runtime);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Trajectory Feedback — Past Experience Injection
|
|
3
|
-
*
|
|
4
|
-
* Queries the trajectory database for past orchestrator decisions and
|
|
5
|
-
* formats relevant experience as agent memory context. This closes the
|
|
6
|
-
* loop between trajectory *output* (logging decisions) and trajectory
|
|
7
|
-
* *input* (feeding experience back to agents at spawn time).
|
|
8
|
-
*
|
|
9
|
-
* Inspired by "Codified Context" (arXiv:2602.20478) — known failure
|
|
10
|
-
* modes and past decisions are pre-loaded into agent context so they
|
|
11
|
-
* don't repeat mistakes or re-derive solutions.
|
|
12
|
-
*
|
|
13
|
-
* @module services/trajectory-feedback
|
|
14
|
-
*/
|
|
15
|
-
import { type IAgentRuntime } from "@elizaos/core";
|
|
16
|
-
/** A distilled experience entry from a past trajectory. */
|
|
17
|
-
interface PastExperience {
|
|
18
|
-
/** When this experience was recorded */
|
|
19
|
-
timestamp: number;
|
|
20
|
-
/** The orchestrator decision type (coordination, turn-complete, etc.) */
|
|
21
|
-
decisionType: string;
|
|
22
|
-
/** Agent label that produced this experience */
|
|
23
|
-
taskLabel: string;
|
|
24
|
-
/** The key insight or decision (extracted from LLM response) */
|
|
25
|
-
insight: string;
|
|
26
|
-
}
|
|
27
|
-
/** Options for querying past experience. */
|
|
28
|
-
export interface TrajectoryFeedbackOptions {
|
|
29
|
-
/** Maximum number of recent trajectories to scan (default: 30) */
|
|
30
|
-
maxTrajectories?: number;
|
|
31
|
-
/** Maximum number of experience entries to return (default: 8) */
|
|
32
|
-
maxEntries?: number;
|
|
33
|
-
/** Only include trajectories from the last N hours (default: 48) */
|
|
34
|
-
lookbackHours?: number;
|
|
35
|
-
/** Task description for relevance filtering */
|
|
36
|
-
taskDescription?: string;
|
|
37
|
-
/** Repository URL — only return experience from the same repo */
|
|
38
|
-
repo?: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Query the trajectory database for past orchestrator decisions and
|
|
42
|
-
* return distilled experience entries relevant to the current task.
|
|
43
|
-
*/
|
|
44
|
-
export declare function queryPastExperience(runtime: IAgentRuntime, options?: TrajectoryFeedbackOptions): Promise<PastExperience[]>;
|
|
45
|
-
/**
|
|
46
|
-
* Format past experience entries as a markdown section suitable for
|
|
47
|
-
* injection into agent memory (CLAUDE.md / GEMINI.md).
|
|
48
|
-
*
|
|
49
|
-
* Returns empty string if no relevant experience is found.
|
|
50
|
-
*/
|
|
51
|
-
export declare function formatPastExperience(experiences: PastExperience[]): string;
|
|
52
|
-
export {};
|
|
53
|
-
//# sourceMappingURL=trajectory-feedback.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trajectory-feedback.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/trajectory-feedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAyB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAoB1E,2DAA2D;AAC3D,UAAU,cAAc;IACvB,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,4CAA4C;AAC5C,MAAM,WAAW,yBAAyB;IACzC,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AA2JD;;;GAGG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,aAAa,EACtB,OAAO,GAAE,yBAA8B,GACrC,OAAO,CAAC,cAAc,EAAE,CAAC,CA0J3B;AAID;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,cAAc,EAAE,GAAG,MAAM,CAe1E"}
|