@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,587 +0,0 @@
|
|
|
1
|
-
import { execFile } from "node:child_process";
|
|
2
|
-
import { createHash } from "node:crypto";
|
|
3
|
-
import { mkdir, readdir, stat, writeFile } from "node:fs/promises";
|
|
4
|
-
import { homedir } from "node:os";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
import { promisify } from "node:util";
|
|
7
|
-
const execFileAsync = promisify(execFile);
|
|
8
|
-
import { ModelType } from "@elizaos/core";
|
|
9
|
-
import { withTrajectoryContext } from "./trajectory-context.js";
|
|
10
|
-
function extractJsonBlock(raw) {
|
|
11
|
-
const trimmed = raw.trim();
|
|
12
|
-
const fenceMatch = trimmed.match(/```(?:json)?\s*([\s\S]*?)\s*```/i);
|
|
13
|
-
return (fenceMatch?.[1] ?? trimmed).trim();
|
|
14
|
-
}
|
|
15
|
-
function parseValidationResponse(raw) {
|
|
16
|
-
try {
|
|
17
|
-
const parsed = JSON.parse(extractJsonBlock(raw));
|
|
18
|
-
const verdict = parsed.verdict;
|
|
19
|
-
const summary = parsed.summary?.trim();
|
|
20
|
-
if ((verdict !== "pass" && verdict !== "revise" && verdict !== "escalate") ||
|
|
21
|
-
!summary) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
const followUpPrompt = parsed.followUpPrompt?.trim();
|
|
25
|
-
const checklist = Array.isArray(parsed.checklist)
|
|
26
|
-
? parsed.checklist.filter((item) => typeof item === "string" && item.trim().length > 0)
|
|
27
|
-
: undefined;
|
|
28
|
-
return {
|
|
29
|
-
verdict,
|
|
30
|
-
summary,
|
|
31
|
-
...(followUpPrompt ? { followUpPrompt } : {}),
|
|
32
|
-
...(checklist && checklist.length > 0 ? { checklist } : {}),
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
catch {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function getValidationRootDir() {
|
|
40
|
-
const stateDir = process.env.ELIZA_STATE_DIR?.trim() ||
|
|
41
|
-
process.env.ELIZA_STATE_DIR?.trim() ||
|
|
42
|
-
path.join(homedir(), ".eliza");
|
|
43
|
-
return path.join(stateDir, "task-validation");
|
|
44
|
-
}
|
|
45
|
-
function truncate(text, limit = 1200) {
|
|
46
|
-
const compact = text.replace(/\s+/g, " ").trim();
|
|
47
|
-
if (compact.length <= limit)
|
|
48
|
-
return compact;
|
|
49
|
-
return `${compact.slice(0, limit)}...`;
|
|
50
|
-
}
|
|
51
|
-
function pngHeaderValid(buffer) {
|
|
52
|
-
if (buffer.length < 8)
|
|
53
|
-
return false;
|
|
54
|
-
const signature = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
55
|
-
return signature.every((value, index) => buffer[index] === value);
|
|
56
|
-
}
|
|
57
|
-
function resolveLoopbackApiBase() {
|
|
58
|
-
const port = process.env.ELIZA_API_PORT?.trim() ||
|
|
59
|
-
process.env.ELIZA_PORT?.trim() ||
|
|
60
|
-
"31337";
|
|
61
|
-
return `http://127.0.0.1:${port}`;
|
|
62
|
-
}
|
|
63
|
-
async function captureValidationScreenshot(runtime, task, thread, sessionId) {
|
|
64
|
-
try {
|
|
65
|
-
const token = process.env.ELIZA_API_TOKEN?.trim() ||
|
|
66
|
-
process.env.ELIZA_API_TOKEN?.trim() ||
|
|
67
|
-
process.env.ELIZA_API_AUTH_TOKEN?.trim();
|
|
68
|
-
const response = await fetch(`${resolveLoopbackApiBase()}/api/dev/cursor-screenshot`, {
|
|
69
|
-
headers: token ? { Authorization: `Bearer ${token}` } : undefined,
|
|
70
|
-
});
|
|
71
|
-
if (!response.ok) {
|
|
72
|
-
return {
|
|
73
|
-
status: "unavailable",
|
|
74
|
-
reason: `HTTP ${response.status} from /api/dev/cursor-screenshot`,
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
78
|
-
if (bytes.length === 0) {
|
|
79
|
-
return {
|
|
80
|
-
status: "unavailable",
|
|
81
|
-
reason: "Screenshot endpoint returned an empty PNG payload",
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
const dir = path.join(getValidationRootDir(), task.threadId);
|
|
85
|
-
await mkdir(dir, { recursive: true });
|
|
86
|
-
const screenshotPath = path.join(dir, `screenshot-${sessionId}-${Date.now()}.png`);
|
|
87
|
-
await writeFile(screenshotPath, bytes);
|
|
88
|
-
const screenshotDescription = await describeScreenshotContent(runtime, task, thread, bytes);
|
|
89
|
-
return {
|
|
90
|
-
status: "captured",
|
|
91
|
-
path: screenshotPath,
|
|
92
|
-
sizeBytes: bytes.length,
|
|
93
|
-
fileIntegrityVerified: pngHeaderValid(bytes) && bytes.length > 1024,
|
|
94
|
-
sha256: createHash("sha256").update(bytes).digest("hex"),
|
|
95
|
-
captureScope: "desktop-fullscreen",
|
|
96
|
-
contentVerified: screenshotDescription.contentVerified,
|
|
97
|
-
...(screenshotDescription.contentSummary
|
|
98
|
-
? { contentSummary: screenshotDescription.contentSummary }
|
|
99
|
-
: {}),
|
|
100
|
-
...(screenshotDescription.contentVerificationError
|
|
101
|
-
? {
|
|
102
|
-
contentVerificationError: screenshotDescription.contentVerificationError,
|
|
103
|
-
}
|
|
104
|
-
: {}),
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
catch (error) {
|
|
108
|
-
return {
|
|
109
|
-
status: "unavailable",
|
|
110
|
-
reason: error instanceof Error ? error.message : String(error),
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
async function listRelevantTrajectories(runtime, task, thread) {
|
|
115
|
-
const logger = runtime.getService("trajectories");
|
|
116
|
-
if (!logger?.listTrajectories) {
|
|
117
|
-
return [];
|
|
118
|
-
}
|
|
119
|
-
const searchTerms = [
|
|
120
|
-
task.sessionId,
|
|
121
|
-
task.threadId,
|
|
122
|
-
task.label,
|
|
123
|
-
task.originalTask,
|
|
124
|
-
]
|
|
125
|
-
.map((value) => value?.trim())
|
|
126
|
-
.filter((value) => Boolean(value));
|
|
127
|
-
const seen = new Set();
|
|
128
|
-
const trajectories = [];
|
|
129
|
-
for (const search of searchTerms) {
|
|
130
|
-
const result = await logger.listTrajectories({
|
|
131
|
-
limit: 10,
|
|
132
|
-
search,
|
|
133
|
-
...(thread?.createdAt ? { startDate: thread.createdAt } : {}),
|
|
134
|
-
});
|
|
135
|
-
for (const item of result?.trajectories ?? []) {
|
|
136
|
-
if (seen.has(item.id))
|
|
137
|
-
continue;
|
|
138
|
-
seen.add(item.id);
|
|
139
|
-
const metadata = (item.metadata ?? {});
|
|
140
|
-
const orchestrator = metadata.orchestrator;
|
|
141
|
-
const sessionMatches = orchestrator?.sessionId === task.sessionId ||
|
|
142
|
-
metadata.sessionId === task.sessionId;
|
|
143
|
-
const labelMatches = orchestrator?.taskLabel === task.label ||
|
|
144
|
-
metadata.taskLabel === task.label;
|
|
145
|
-
if (!sessionMatches && !labelMatches && search !== task.sessionId) {
|
|
146
|
-
continue;
|
|
147
|
-
}
|
|
148
|
-
trajectories.push(item);
|
|
149
|
-
if (trajectories.length >= 3) {
|
|
150
|
-
return trajectories;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return trajectories;
|
|
155
|
-
}
|
|
156
|
-
function extractImageDescriptionText(raw) {
|
|
157
|
-
if (typeof raw === "string") {
|
|
158
|
-
const trimmed = raw.trim();
|
|
159
|
-
return trimmed.length > 0 ? trimmed : null;
|
|
160
|
-
}
|
|
161
|
-
if (raw && typeof raw === "object") {
|
|
162
|
-
const description = raw.description;
|
|
163
|
-
if (typeof description === "string" && description.trim().length > 0) {
|
|
164
|
-
return description.trim();
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return null;
|
|
168
|
-
}
|
|
169
|
-
async function describeScreenshotContent(runtime, task, thread, bytes) {
|
|
170
|
-
try {
|
|
171
|
-
const dataUri = `data:image/png;base64,${Buffer.from(bytes).toString("base64")}`;
|
|
172
|
-
const acceptanceCriteria = thread?.acceptanceCriteria?.length
|
|
173
|
-
? thread.acceptanceCriteria.map((item) => `- ${item}`).join("\n")
|
|
174
|
-
: "- none";
|
|
175
|
-
const raw = await runtime.useModel(ModelType.IMAGE_DESCRIPTION, {
|
|
176
|
-
imageUrl: dataUri,
|
|
177
|
-
prompt: [
|
|
178
|
-
"Describe this validation screenshot for an orchestrated task.",
|
|
179
|
-
"Focus on visible terminal output, UI state, status banners, tests, errors, and other completion evidence.",
|
|
180
|
-
`Task: ${task.originalTask}`,
|
|
181
|
-
"Acceptance criteria:",
|
|
182
|
-
acceptanceCriteria,
|
|
183
|
-
"Return a concise factual description.",
|
|
184
|
-
].join("\n"),
|
|
185
|
-
});
|
|
186
|
-
const contentSummary = extractImageDescriptionText(raw);
|
|
187
|
-
if (!contentSummary) {
|
|
188
|
-
return {
|
|
189
|
-
contentVerified: false,
|
|
190
|
-
contentVerificationError: "Vision model returned no usable screenshot description.",
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
return {
|
|
194
|
-
contentVerified: true,
|
|
195
|
-
contentSummary: truncate(contentSummary, 800),
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
catch (error) {
|
|
199
|
-
return {
|
|
200
|
-
contentVerified: false,
|
|
201
|
-
contentVerificationError: error instanceof Error ? error.message : String(error),
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
function describeScreenshotEvidence(screenshot) {
|
|
206
|
-
if (screenshot.status !== "captured") {
|
|
207
|
-
return `- status=unavailable reason=${screenshot.reason}`;
|
|
208
|
-
}
|
|
209
|
-
return `- status=captured scope=${screenshot.captureScope} fileIntegrityVerified=${screenshot.fileIntegrityVerified} contentVerified=${screenshot.contentVerified} sha256=${screenshot.sha256} path=${screenshot.path} sizeBytes=${screenshot.sizeBytes}${screenshot.contentSummary ? ` summary=${truncate(screenshot.contentSummary, 500)}` : ""}${screenshot.contentVerificationError ? ` contentVerificationError=${screenshot.contentVerificationError}` : ""}`;
|
|
210
|
-
}
|
|
211
|
-
export const WORKSPACE_EVIDENCE_FILE_LIMIT = 200;
|
|
212
|
-
export const WORKSPACE_EVIDENCE_MAX_DEPTH = 5;
|
|
213
|
-
// Hard ceiling on the total walk. We still report `fileCount` up to this
|
|
214
|
-
// number, but stop walking once we cross it so an enormous tree (e.g.
|
|
215
|
-
// someone passing `~` as workdir) can't wedge the validator.
|
|
216
|
-
export const WORKSPACE_EVIDENCE_MAX_WALK = 2_000;
|
|
217
|
-
const WORKSPACE_EVIDENCE_SKIP_DIRS = new Set([
|
|
218
|
-
".git",
|
|
219
|
-
"node_modules",
|
|
220
|
-
".next",
|
|
221
|
-
"dist",
|
|
222
|
-
"build",
|
|
223
|
-
"out",
|
|
224
|
-
"target",
|
|
225
|
-
".turbo",
|
|
226
|
-
"__pycache__",
|
|
227
|
-
".venv",
|
|
228
|
-
"venv",
|
|
229
|
-
".DS_Store",
|
|
230
|
-
".cache",
|
|
231
|
-
]);
|
|
232
|
-
/**
|
|
233
|
-
* Read the workspace filesystem to produce objective evidence for the
|
|
234
|
-
* validator prompt.
|
|
235
|
-
*
|
|
236
|
-
* - Walks `workdir` up to `WORKSPACE_EVIDENCE_MAX_DEPTH` levels, skipping
|
|
237
|
-
* common build/dep directories.
|
|
238
|
-
* - Caps the file list at `WORKSPACE_EVIDENCE_FILE_LIMIT` entries; the
|
|
239
|
-
* `fileCount` field still reflects the total discovered so the
|
|
240
|
-
* validator can see truncation happened.
|
|
241
|
-
* - If `workdir` is a git repository, captures `git status --short` and
|
|
242
|
-
* `git diff --stat HEAD` so the validator can see uncommitted work.
|
|
243
|
-
* - Never throws. All errors are captured in `notes` so the validator
|
|
244
|
-
* can judge whether missing evidence should downgrade the verdict.
|
|
245
|
-
*/
|
|
246
|
-
export async function collectWorkspaceEvidence(workdir) {
|
|
247
|
-
const evidence = {
|
|
248
|
-
workdir: workdir ?? "",
|
|
249
|
-
files: [],
|
|
250
|
-
fileCount: 0,
|
|
251
|
-
isGitRepo: false,
|
|
252
|
-
gitStatus: "",
|
|
253
|
-
gitDiffStat: "",
|
|
254
|
-
notes: [],
|
|
255
|
-
};
|
|
256
|
-
if (!workdir) {
|
|
257
|
-
evidence.notes.push("no workdir supplied");
|
|
258
|
-
return evidence;
|
|
259
|
-
}
|
|
260
|
-
// Resolve ~ and confirm the directory exists.
|
|
261
|
-
const resolved = workdir.startsWith("~")
|
|
262
|
-
? path.join(homedir(), workdir.slice(1))
|
|
263
|
-
: path.resolve(workdir);
|
|
264
|
-
evidence.workdir = resolved;
|
|
265
|
-
try {
|
|
266
|
-
const rootStat = await stat(resolved);
|
|
267
|
-
if (!rootStat.isDirectory()) {
|
|
268
|
-
evidence.notes.push(`workdir is not a directory: ${resolved}`);
|
|
269
|
-
return evidence;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
catch (err) {
|
|
273
|
-
evidence.notes.push(`workdir not readable: ${err instanceof Error ? err.message : String(err)}`);
|
|
274
|
-
return evidence;
|
|
275
|
-
}
|
|
276
|
-
const collected = [];
|
|
277
|
-
let totalCount = 0;
|
|
278
|
-
let walkCeilingHit = false;
|
|
279
|
-
const walk = async (dir, depth) => {
|
|
280
|
-
if (depth > WORKSPACE_EVIDENCE_MAX_DEPTH)
|
|
281
|
-
return;
|
|
282
|
-
if (totalCount >= WORKSPACE_EVIDENCE_MAX_WALK) {
|
|
283
|
-
walkCeilingHit = true;
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
let entries;
|
|
287
|
-
try {
|
|
288
|
-
entries = (await readdir(dir, { withFileTypes: true }));
|
|
289
|
-
}
|
|
290
|
-
catch {
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
for (const entry of entries) {
|
|
294
|
-
if (WORKSPACE_EVIDENCE_SKIP_DIRS.has(entry.name))
|
|
295
|
-
continue;
|
|
296
|
-
if (totalCount >= WORKSPACE_EVIDENCE_MAX_WALK) {
|
|
297
|
-
walkCeilingHit = true;
|
|
298
|
-
break;
|
|
299
|
-
}
|
|
300
|
-
const full = path.join(dir, entry.name);
|
|
301
|
-
if (entry.isDirectory()) {
|
|
302
|
-
await walk(full, depth + 1);
|
|
303
|
-
}
|
|
304
|
-
else if (entry.isFile()) {
|
|
305
|
-
totalCount++;
|
|
306
|
-
if (collected.length < WORKSPACE_EVIDENCE_FILE_LIMIT) {
|
|
307
|
-
collected.push(path.relative(resolved, full));
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
try {
|
|
313
|
-
await walk(resolved, 0);
|
|
314
|
-
}
|
|
315
|
-
catch (err) {
|
|
316
|
-
evidence.notes.push(`walk failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
317
|
-
}
|
|
318
|
-
collected.sort();
|
|
319
|
-
evidence.files = collected;
|
|
320
|
-
evidence.fileCount = totalCount;
|
|
321
|
-
if (walkCeilingHit) {
|
|
322
|
-
evidence.notes.push(`workspace walk hit the ${WORKSPACE_EVIDENCE_MAX_WALK}-file ceiling; counts and listing are truncated`);
|
|
323
|
-
}
|
|
324
|
-
// Git evidence — best-effort, silent on failure.
|
|
325
|
-
try {
|
|
326
|
-
await execFileAsync("git", ["rev-parse", "--is-inside-work-tree"], {
|
|
327
|
-
cwd: resolved,
|
|
328
|
-
timeout: 3_000,
|
|
329
|
-
});
|
|
330
|
-
evidence.isGitRepo = true;
|
|
331
|
-
try {
|
|
332
|
-
const { stdout } = await execFileAsync("git", ["status", "--short", "--untracked-files=all"], { cwd: resolved, timeout: 5_000, maxBuffer: 256 * 1024 });
|
|
333
|
-
evidence.gitStatus = stdout.trim();
|
|
334
|
-
}
|
|
335
|
-
catch {
|
|
336
|
-
/* ignore */
|
|
337
|
-
}
|
|
338
|
-
try {
|
|
339
|
-
const { stdout } = await execFileAsync("git", ["diff", "--stat", "HEAD"], { cwd: resolved, timeout: 5_000, maxBuffer: 256 * 1024 });
|
|
340
|
-
evidence.gitDiffStat = stdout.trim();
|
|
341
|
-
}
|
|
342
|
-
catch {
|
|
343
|
-
// No HEAD yet (empty repo) or other error — fall back to a
|
|
344
|
-
// full diff against the empty tree.
|
|
345
|
-
try {
|
|
346
|
-
const { stdout } = await execFileAsync("git", ["diff", "--stat"], {
|
|
347
|
-
cwd: resolved,
|
|
348
|
-
timeout: 5_000,
|
|
349
|
-
maxBuffer: 256 * 1024,
|
|
350
|
-
});
|
|
351
|
-
evidence.gitDiffStat = stdout.trim();
|
|
352
|
-
}
|
|
353
|
-
catch {
|
|
354
|
-
/* ignore */
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
catch {
|
|
359
|
-
// Not a git repo, or git not installed. Both fine — filesystem
|
|
360
|
-
// listing alone is still useful for scratch dirs.
|
|
361
|
-
}
|
|
362
|
-
return evidence;
|
|
363
|
-
}
|
|
364
|
-
function formatWorkspaceEvidence(evidence) {
|
|
365
|
-
if (!evidence.workdir)
|
|
366
|
-
return "- no workdir supplied";
|
|
367
|
-
if (evidence.fileCount === 0 && evidence.notes.length > 0) {
|
|
368
|
-
return `- workdir: ${evidence.workdir}\n- ${evidence.notes.join("\n- ")}`;
|
|
369
|
-
}
|
|
370
|
-
const lines = [];
|
|
371
|
-
lines.push(`workdir: ${evidence.workdir}`);
|
|
372
|
-
lines.push(`file count: ${evidence.fileCount}${evidence.files.length < evidence.fileCount
|
|
373
|
-
? ` (showing first ${evidence.files.length})`
|
|
374
|
-
: ""}`);
|
|
375
|
-
if (evidence.files.length > 0) {
|
|
376
|
-
lines.push("files:");
|
|
377
|
-
for (const file of evidence.files) {
|
|
378
|
-
lines.push(` ${file}`);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
else {
|
|
382
|
-
lines.push("files: (workspace is empty)");
|
|
383
|
-
}
|
|
384
|
-
if (evidence.isGitRepo) {
|
|
385
|
-
lines.push(evidence.gitStatus
|
|
386
|
-
? `git status:\n${indent(evidence.gitStatus, " ")}`
|
|
387
|
-
: "git status: (clean or no changes)");
|
|
388
|
-
if (evidence.gitDiffStat) {
|
|
389
|
-
lines.push(`git diff --stat HEAD:\n${indent(evidence.gitDiffStat, " ")}`);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
if (evidence.notes.length > 0) {
|
|
393
|
-
lines.push(`notes: ${evidence.notes.join("; ")}`);
|
|
394
|
-
}
|
|
395
|
-
return lines.join("\n");
|
|
396
|
-
}
|
|
397
|
-
function indent(text, prefix) {
|
|
398
|
-
return text
|
|
399
|
-
.split("\n")
|
|
400
|
-
.map((line) => `${prefix}${line}`)
|
|
401
|
-
.join("\n");
|
|
402
|
-
}
|
|
403
|
-
function buildValidationPrompt(task, thread, completionReasoning, completionSummary, turnOutput, trajectories, screenshot, workspaceEvidence) {
|
|
404
|
-
const acceptanceCriteria = thread?.acceptanceCriteria?.length
|
|
405
|
-
? thread.acceptanceCriteria.map((item) => `- ${item}`).join("\n")
|
|
406
|
-
: "- Complete the user's request\n- Verify the result with available evidence\n- Do not claim success if important work is still missing";
|
|
407
|
-
const completionExcerpt = turnOutput || completionSummary || completionReasoning || "none";
|
|
408
|
-
const trajectoryBlock = trajectories.length > 0
|
|
409
|
-
? trajectories
|
|
410
|
-
.map((item) => `- ${item.id} | status=${item.status} | llmCalls=${item.llmCallCount} | createdAt=${item.createdAt}`)
|
|
411
|
-
.join("\n")
|
|
412
|
-
: "- none";
|
|
413
|
-
const transcriptPreview = thread?.transcripts
|
|
414
|
-
?.slice(-8)
|
|
415
|
-
.map((entry) => {
|
|
416
|
-
const content = truncate(entry.content, 220);
|
|
417
|
-
return `- [${entry.direction}] ${content}`;
|
|
418
|
-
})
|
|
419
|
-
.join("\n") ?? "- none";
|
|
420
|
-
const artifactBlock = thread?.artifacts
|
|
421
|
-
?.slice(-8)
|
|
422
|
-
.map((artifact) => {
|
|
423
|
-
const locator = artifact.path ?? artifact.uri ?? "inline";
|
|
424
|
-
return `- ${artifact.artifactType}: ${artifact.title} (${locator})`;
|
|
425
|
-
})
|
|
426
|
-
.join("\n") ?? "- none";
|
|
427
|
-
return [
|
|
428
|
-
"You are validating whether an orchestrated task is actually finished.",
|
|
429
|
-
"Return strict JSON only with this shape:",
|
|
430
|
-
'{"verdict":"pass|revise|escalate","summary":"short summary","followUpPrompt":"only if verdict=revise","checklist":["optional evidence notes"]}',
|
|
431
|
-
"",
|
|
432
|
-
`Task title: ${task.label}`,
|
|
433
|
-
`Original request: ${task.originalTask}`,
|
|
434
|
-
`Completion reasoning: ${completionReasoning || "none"}`,
|
|
435
|
-
`Completion summary: ${completionSummary || "none"}`,
|
|
436
|
-
"",
|
|
437
|
-
"Acceptance criteria:",
|
|
438
|
-
acceptanceCriteria,
|
|
439
|
-
"",
|
|
440
|
-
"Latest turn output excerpt:",
|
|
441
|
-
truncate(completionExcerpt, 2400),
|
|
442
|
-
"",
|
|
443
|
-
"Recent transcript excerpt:",
|
|
444
|
-
transcriptPreview,
|
|
445
|
-
"",
|
|
446
|
-
"Existing task artifacts:",
|
|
447
|
-
artifactBlock,
|
|
448
|
-
"",
|
|
449
|
-
"Related trajectories:",
|
|
450
|
-
trajectoryBlock,
|
|
451
|
-
"",
|
|
452
|
-
"Screenshot evidence:",
|
|
453
|
-
describeScreenshotEvidence(screenshot),
|
|
454
|
-
"",
|
|
455
|
-
// Objective filesystem evidence. This is the ground truth — it does
|
|
456
|
-
// NOT depend on the agent's own turn output, so it is reliable
|
|
457
|
-
// regardless of which CLI produced the work. Use this as the
|
|
458
|
-
// primary signal for "did files actually get created / modified".
|
|
459
|
-
"Workspace evidence (read from disk):",
|
|
460
|
-
formatWorkspaceEvidence(workspaceEvidence),
|
|
461
|
-
"",
|
|
462
|
-
"Rules:",
|
|
463
|
-
"- Pass only if the task appears complete and the available evidence supports that claim.",
|
|
464
|
-
"- Revise if the agent should keep working. In that case, provide a direct follow-up prompt.",
|
|
465
|
-
"- Escalate if the task cannot be validated from available evidence and needs human review.",
|
|
466
|
-
"- For information / question-answering / research tasks (no repo, no files expected), the completion summary IS the deliverable. Pass if the summary directly answers the original request with concrete content. Empty workspace evidence is expected for these and is not a failure signal.",
|
|
467
|
-
"- For code / build tasks (repo set, or the request asks to create/edit/test files), missing tests or missing verification should usually mean revise or escalate, not pass.",
|
|
468
|
-
"- Treat screenshot capture as artifact evidence only. A desktop screenshot may prove the UI rendered, but it does not semantically prove the task without supporting transcript, test, or trajectory evidence.",
|
|
469
|
-
"- Trust the 'Workspace evidence' block over agent commentary: if files are listed there, they exist on disk, regardless of how the agent described its work. If the task was to create files and the workspace evidence shows them, that is strong evidence for pass.",
|
|
470
|
-
"- Conversely, if the agent CLAIMS to have created files but the workspace evidence shows an empty directory or missing files, treat that as revise (not pass) — the agent's claim is unverified. This rule applies only when files were actually expected.",
|
|
471
|
-
].join("\n");
|
|
472
|
-
}
|
|
473
|
-
async function persistValidationReport(threadId, sessionId, report) {
|
|
474
|
-
const dir = path.join(getValidationRootDir(), threadId);
|
|
475
|
-
await mkdir(dir, { recursive: true });
|
|
476
|
-
const reportPath = path.join(dir, `validation-${sessionId}-${Date.now()}.json`);
|
|
477
|
-
await writeFile(reportPath, JSON.stringify(report, null, 2), "utf8");
|
|
478
|
-
return reportPath;
|
|
479
|
-
}
|
|
480
|
-
export async function validateTaskCompletion(ctx, input) {
|
|
481
|
-
const { sessionId, taskCtx, completionReasoning, completionSummary, turnOutput, } = input;
|
|
482
|
-
const thread = await ctx.taskRegistry.getThread(taskCtx.threadId);
|
|
483
|
-
const trajectories = await listRelevantTrajectories(ctx.runtime, taskCtx, thread);
|
|
484
|
-
const [screenshot, workspaceEvidence] = await Promise.all([
|
|
485
|
-
captureValidationScreenshot(ctx.runtime, taskCtx, thread, sessionId),
|
|
486
|
-
collectWorkspaceEvidence(taskCtx.workdir),
|
|
487
|
-
]);
|
|
488
|
-
const prompt = buildValidationPrompt(taskCtx, thread, completionReasoning, completionSummary, turnOutput, trajectories, screenshot, workspaceEvidence);
|
|
489
|
-
const rawValidation = await withTrajectoryContext(ctx.runtime, {
|
|
490
|
-
source: "orchestrator",
|
|
491
|
-
decisionType: "task-validation",
|
|
492
|
-
sessionId,
|
|
493
|
-
taskLabel: taskCtx.label,
|
|
494
|
-
repo: taskCtx.repo,
|
|
495
|
-
workdir: taskCtx.workdir,
|
|
496
|
-
originalTask: taskCtx.originalTask,
|
|
497
|
-
}, () => ctx.runtime.useModel(ModelType.TEXT_SMALL, { prompt }));
|
|
498
|
-
const parsed = parseValidationResponse(rawValidation);
|
|
499
|
-
const verdict = parsed ?? {
|
|
500
|
-
verdict: "escalate",
|
|
501
|
-
summary: "Validation model returned an invalid response, so this task needs human review.",
|
|
502
|
-
};
|
|
503
|
-
const report = {
|
|
504
|
-
version: 1,
|
|
505
|
-
createdAt: new Date().toISOString(),
|
|
506
|
-
threadId: taskCtx.threadId,
|
|
507
|
-
sessionId,
|
|
508
|
-
label: taskCtx.label,
|
|
509
|
-
originalTask: taskCtx.originalTask,
|
|
510
|
-
completionReasoning,
|
|
511
|
-
completionSummary,
|
|
512
|
-
verdict: verdict.verdict,
|
|
513
|
-
summary: verdict.summary,
|
|
514
|
-
followUpPrompt: verdict.followUpPrompt ?? null,
|
|
515
|
-
acceptanceCriteria: thread?.acceptanceCriteria ?? [],
|
|
516
|
-
evidence: {
|
|
517
|
-
transcriptCount: thread?.transcripts.length ?? 0,
|
|
518
|
-
decisionCount: thread?.decisions.length ?? 0,
|
|
519
|
-
eventCount: thread?.events.length ?? 0,
|
|
520
|
-
artifactCount: thread?.artifacts.length ?? 0,
|
|
521
|
-
screenshot,
|
|
522
|
-
trajectories: trajectories.map((item) => ({
|
|
523
|
-
id: item.id,
|
|
524
|
-
status: item.status,
|
|
525
|
-
llmCallCount: item.llmCallCount,
|
|
526
|
-
createdAt: item.createdAt,
|
|
527
|
-
})),
|
|
528
|
-
checklist: verdict.checklist ?? [],
|
|
529
|
-
turnOutputExcerpt: truncate(turnOutput || completionSummary || completionReasoning || ""),
|
|
530
|
-
},
|
|
531
|
-
};
|
|
532
|
-
const reportPath = await persistValidationReport(taskCtx.threadId, sessionId, report);
|
|
533
|
-
const artifacts = [
|
|
534
|
-
{
|
|
535
|
-
artifactType: "validation_report",
|
|
536
|
-
title: `Validation report for ${taskCtx.label}`,
|
|
537
|
-
path: reportPath,
|
|
538
|
-
mimeType: "application/json",
|
|
539
|
-
metadata: {
|
|
540
|
-
verdict: verdict.verdict,
|
|
541
|
-
summary: verdict.summary,
|
|
542
|
-
},
|
|
543
|
-
},
|
|
544
|
-
...trajectories.map((item) => ({
|
|
545
|
-
artifactType: "trajectory_link",
|
|
546
|
-
title: `Trajectory ${item.id}`,
|
|
547
|
-
uri: `/api/trajectories/${encodeURIComponent(item.id)}`,
|
|
548
|
-
metadata: {
|
|
549
|
-
trajectoryId: item.id,
|
|
550
|
-
status: item.status,
|
|
551
|
-
llmCallCount: item.llmCallCount,
|
|
552
|
-
},
|
|
553
|
-
})),
|
|
554
|
-
];
|
|
555
|
-
if (screenshot.status === "captured") {
|
|
556
|
-
artifacts.push({
|
|
557
|
-
artifactType: "screenshot",
|
|
558
|
-
title: `Validation screenshot for ${taskCtx.label}`,
|
|
559
|
-
path: screenshot.path,
|
|
560
|
-
mimeType: "image/png",
|
|
561
|
-
metadata: {
|
|
562
|
-
fileIntegrityVerified: screenshot.fileIntegrityVerified,
|
|
563
|
-
sizeBytes: screenshot.sizeBytes,
|
|
564
|
-
sha256: screenshot.sha256,
|
|
565
|
-
captureScope: screenshot.captureScope,
|
|
566
|
-
contentVerified: screenshot.contentVerified,
|
|
567
|
-
...(screenshot.contentSummary
|
|
568
|
-
? { contentSummary: screenshot.contentSummary }
|
|
569
|
-
: {}),
|
|
570
|
-
...(screenshot.contentVerificationError
|
|
571
|
-
? {
|
|
572
|
-
contentVerificationError: screenshot.contentVerificationError,
|
|
573
|
-
}
|
|
574
|
-
: {}),
|
|
575
|
-
},
|
|
576
|
-
});
|
|
577
|
-
}
|
|
578
|
-
return {
|
|
579
|
-
verdict: verdict.verdict,
|
|
580
|
-
summary: verdict.summary,
|
|
581
|
-
...(verdict.followUpPrompt
|
|
582
|
-
? { followUpPrompt: verdict.followUpPrompt }
|
|
583
|
-
: {}),
|
|
584
|
-
reportPath,
|
|
585
|
-
artifacts,
|
|
586
|
-
};
|
|
587
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type IAgentRuntime } from "@elizaos/core";
|
|
2
|
-
import type { TaskNodeRecord, TaskRegistry } from "./task-registry.ts";
|
|
3
|
-
export declare function runReadyTaskVerifiers(runtime: IAgentRuntime, taskRegistry: TaskRegistry, threadId: string): Promise<void>;
|
|
4
|
-
export declare function isTerminalTaskNodeStatus(status: TaskNodeRecord["status"]): boolean;
|
|
5
|
-
//# sourceMappingURL=task-verifier-runner.d.ts.map
|
package/packages/typescript/src/features/orchestrator/services/task-verifier-runner.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-verifier-runner.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/task-verifier-runner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EACX,cAAc,EACd,YAAY,EAGZ,MAAM,oBAAoB,CAAC;AAqY5B,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAkFf;AAED,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAC9B,OAAO,CAET"}
|