@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,443 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Handler logic for the START_CODING_TASK action.
|
|
3
|
-
*
|
|
4
|
-
* handleMultiAgent() handles both multi-agent and single-agent modes.
|
|
5
|
-
* A single-agent call is just a length-1 agent spec.
|
|
6
|
-
*
|
|
7
|
-
* @module actions/coding-task-handlers
|
|
8
|
-
*/
|
|
9
|
-
import { logger, ModelType, } from "@elizaos/core";
|
|
10
|
-
import { readConfigEnvKey } from "../services/config-env.js";
|
|
11
|
-
import { getCoordinator } from "../services/pty-service.js";
|
|
12
|
-
import { isPiAgentType, normalizeAgentType, toPiCommand, } from "../services/pty-types.js";
|
|
13
|
-
import { diagnoseWorkspaceBootstrapFailure } from "../services/repo-input.js";
|
|
14
|
-
import { withTrajectoryContext } from "../services/trajectory-context.js";
|
|
15
|
-
import { formatPastExperience, queryPastExperience, } from "../services/trajectory-feedback.js";
|
|
16
|
-
import { createScratchDir, generateLabel, registerSessionEvents, } from "./coding-task-helpers.js";
|
|
17
|
-
import { mergeTaskThreadEvalMetadata } from "./eval-metadata.js";
|
|
18
|
-
/** Maximum number of agents that can be spawned in a single multi-agent call */
|
|
19
|
-
const MAX_CONCURRENT_AGENTS = 8;
|
|
20
|
-
/** Known agent type prefixes used in "agentType:task" spec format. */
|
|
21
|
-
const KNOWN_AGENT_PREFIXES = [
|
|
22
|
-
"claude",
|
|
23
|
-
"claude-code",
|
|
24
|
-
"claudecode",
|
|
25
|
-
"codex",
|
|
26
|
-
"openai",
|
|
27
|
-
"gemini",
|
|
28
|
-
"google",
|
|
29
|
-
"aider",
|
|
30
|
-
"pi",
|
|
31
|
-
"piai",
|
|
32
|
-
"pi-coding-agent",
|
|
33
|
-
"picodingagent",
|
|
34
|
-
"shell",
|
|
35
|
-
"bash",
|
|
36
|
-
];
|
|
37
|
-
/**
|
|
38
|
-
* Strip an agent-type prefix from a spec string (e.g. "claude:Fix the bug" → "Fix the bug").
|
|
39
|
-
* Returns the original string if no known prefix is found.
|
|
40
|
-
*/
|
|
41
|
-
function stripAgentPrefix(spec) {
|
|
42
|
-
const colonIdx = spec.indexOf(":");
|
|
43
|
-
if (colonIdx <= 0 || colonIdx >= 20)
|
|
44
|
-
return spec;
|
|
45
|
-
const prefix = spec.slice(0, colonIdx).trim().toLowerCase();
|
|
46
|
-
if (KNOWN_AGENT_PREFIXES.includes(prefix)) {
|
|
47
|
-
return spec.slice(colonIdx + 1).trim();
|
|
48
|
-
}
|
|
49
|
-
return spec;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Build CLAUDE.md instructions that tell a swarm agent how to coordinate.
|
|
53
|
-
* Each agent gets awareness of its role within the swarm and instructions
|
|
54
|
-
* to surface design decisions explicitly so the orchestrator can share them.
|
|
55
|
-
*/
|
|
56
|
-
function buildSwarmMemoryInstructions(agentLabel, agentTask, allSubtasks, agentIndex) {
|
|
57
|
-
const siblingTasks = allSubtasks
|
|
58
|
-
.filter((_, i) => i !== agentIndex)
|
|
59
|
-
.map((t, i) => ` ${i + 1}. ${t}`)
|
|
60
|
-
.join("\n");
|
|
61
|
-
return (`# Swarm Coordination\n\n` +
|
|
62
|
-
`You are agent "${agentLabel}" in a multi-agent swarm of ${allSubtasks.length} agents.\n` +
|
|
63
|
-
`Your task: ${agentTask}\n\n` +
|
|
64
|
-
`Other agents are working on:\n${siblingTasks}\n\n` +
|
|
65
|
-
`## Coordination Rules\n\n` +
|
|
66
|
-
`- **Follow the Shared Context exactly.** The planning brief above contains ` +
|
|
67
|
-
`concrete decisions (names, file paths, APIs, conventions). Use them as-is.\n` +
|
|
68
|
-
`- **Surface design decisions.** If you need to make a creative or architectural ` +
|
|
69
|
-
`choice not covered by the Shared Context (naming something, choosing a library, ` +
|
|
70
|
-
`designing an interface, picking an approach), state your decision clearly in your ` +
|
|
71
|
-
`output so the orchestrator can share it with sibling agents. Write it as:\n` +
|
|
72
|
-
` "DECISION: [brief description of what you decided and why]"\n` +
|
|
73
|
-
`- **Don't contradict sibling work.** If the orchestrator tells you about decisions ` +
|
|
74
|
-
`other agents have made, align with them.\n` +
|
|
75
|
-
`- **Ask when uncertain.** If your task depends on another agent's output and you ` +
|
|
76
|
-
`don't have enough context, ask rather than guessing.\n`);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Generate a shared context brief for a swarm of agents.
|
|
80
|
-
* The LLM produces shared guidance (style, conventions, constraints) from
|
|
81
|
-
* the user's request and subtask list. Task-type agnostic — works for coding,
|
|
82
|
-
* research, writing, or any multi-agent workflow.
|
|
83
|
-
*/
|
|
84
|
-
async function generateSwarmContext(runtime, subtasks, userRequest) {
|
|
85
|
-
const taskList = subtasks.map((t, i) => ` ${i + 1}. ${t}`).join("\n");
|
|
86
|
-
const prompt = `You are an AI orchestrator about to launch ${subtasks.length} parallel agents. ` +
|
|
87
|
-
`Before they start, produce a brief shared context document so all agents stay aligned.\n\n` +
|
|
88
|
-
`User's request: "${userRequest}"\n\n` +
|
|
89
|
-
`Subtasks being assigned:\n${taskList}\n\n` +
|
|
90
|
-
`Generate a concise shared context brief (3-10 bullet points) covering:\n` +
|
|
91
|
-
`- Project intent and overall goal\n` +
|
|
92
|
-
`- Key constraints or preferences from the user's request\n` +
|
|
93
|
-
`- Conventions all agents should follow (naming, style, patterns, tone)\n` +
|
|
94
|
-
`- How subtasks relate to each other (dependencies, shared interfaces, etc.)\n` +
|
|
95
|
-
`- Any decisions that should be consistent across all agents\n\n` +
|
|
96
|
-
`CRITICAL — Concrete Decisions:\n` +
|
|
97
|
-
`If any subtask involves creative choices (naming a feature, choosing an approach, ` +
|
|
98
|
-
`designing an API, picking a concept), YOU must make those decisions NOW in this brief. ` +
|
|
99
|
-
`Do NOT leave creative choices to individual agents — they run in parallel and will ` +
|
|
100
|
-
`each make different choices, causing inconsistency.\n` +
|
|
101
|
-
`For example: if one agent builds a feature and another writes tests for it, ` +
|
|
102
|
-
`decide the feature name, file paths, function signatures, and key design choices here ` +
|
|
103
|
-
`so both agents use the same names and structure.\n\n` +
|
|
104
|
-
`Only include what's relevant — skip categories that don't apply. ` +
|
|
105
|
-
`Be specific and actionable, not generic. Be as detailed as the task requires — ` +
|
|
106
|
-
`a trivial task needs a few bullets, a complex task deserves a thorough roadmap.\n\n` +
|
|
107
|
-
`Output ONLY the bullet points, no preamble.`;
|
|
108
|
-
try {
|
|
109
|
-
// Disable streaming so planning output doesn't pipe to the user's chat.
|
|
110
|
-
// The action handler runs inside a streaming context; without stream:false,
|
|
111
|
-
// the planning LLM response would be forwarded as chat text.
|
|
112
|
-
const result = await withTrajectoryContext(runtime, { source: "orchestrator", decisionType: "swarm-context-generation" }, () => runtime.useModel(ModelType.TEXT_SMALL, {
|
|
113
|
-
prompt,
|
|
114
|
-
temperature: 0.3,
|
|
115
|
-
stream: false,
|
|
116
|
-
}));
|
|
117
|
-
return result?.trim() || "";
|
|
118
|
-
}
|
|
119
|
-
catch (err) {
|
|
120
|
-
logger.warn(`Swarm context generation failed: ${err}`);
|
|
121
|
-
return "";
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Multi-agent mode handler.
|
|
126
|
-
*
|
|
127
|
-
* Parses pipe-delimited agent specs and spawns each agent in its own
|
|
128
|
-
* workspace clone (or scratch directory).
|
|
129
|
-
*/
|
|
130
|
-
export async function handleMultiAgent(ctx, agentsParam) {
|
|
131
|
-
const { runtime, ptyService, wsService, credentials, customCredentials, callback, message, state, repo, defaultAgentType, rawAgentType, agentTypeExplicit, memoryContent, approvalPreset, explicitLabel, } = ctx;
|
|
132
|
-
// Parse pipe-delimited agent specs: "task1 | task2 | agentType:task3"
|
|
133
|
-
// A single empty string means "spawn one agent with no initial task".
|
|
134
|
-
const agentSpecs = agentsParam
|
|
135
|
-
.split("|")
|
|
136
|
-
.map((s) => s.trim())
|
|
137
|
-
.filter(Boolean);
|
|
138
|
-
// If nothing parsed (e.g. empty string), treat as one agent with no task
|
|
139
|
-
if (agentSpecs.length === 0) {
|
|
140
|
-
agentSpecs.push("");
|
|
141
|
-
}
|
|
142
|
-
// Cap multi-agent count to the concurrency limit
|
|
143
|
-
if (agentSpecs.length > MAX_CONCURRENT_AGENTS) {
|
|
144
|
-
if (callback) {
|
|
145
|
-
await callback({
|
|
146
|
-
text: `Too many agents requested (${agentSpecs.length}). Maximum is ${MAX_CONCURRENT_AGENTS}.`,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
return { success: false, error: "TOO_MANY_AGENTS" };
|
|
150
|
-
}
|
|
151
|
-
if (repo && !wsService) {
|
|
152
|
-
if (callback) {
|
|
153
|
-
await callback({
|
|
154
|
-
text: "Workspace Service is not available. Cannot clone repository.",
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
return { success: false, error: "WORKSPACE_SERVICE_UNAVAILABLE" };
|
|
158
|
-
}
|
|
159
|
-
// Skip the spawn callback — the LLM REPLY already says "on it" (character
|
|
160
|
-
// prompt ack rule) and the task-progress-streamer delivers the final
|
|
161
|
-
// result. Emitting "Launching N agents..." here duplicates the ack and
|
|
162
|
-
// spams discord. See eliza nubs/full-working-state clean Discord UX fix.
|
|
163
|
-
// Planning phase: generate shared context brief for multi-agent coordination.
|
|
164
|
-
// Strip agent-type prefixes from specs to get clean subtask descriptions.
|
|
165
|
-
const cleanSubtasks = agentSpecs.map(stripAgentPrefix);
|
|
166
|
-
const userRequest = message.content?.text ?? agentsParam;
|
|
167
|
-
const swarmContext = agentSpecs.length > 1
|
|
168
|
-
? await generateSwarmContext(runtime, cleanSubtasks, userRequest)
|
|
169
|
-
: "";
|
|
170
|
-
// Store swarm context on coordinator for use in decision prompts
|
|
171
|
-
if (swarmContext) {
|
|
172
|
-
const coordinator = getCoordinator(runtime);
|
|
173
|
-
coordinator?.setSwarmContext(swarmContext);
|
|
174
|
-
}
|
|
175
|
-
// Query past orchestrator experience for trajectory feedback injection.
|
|
176
|
-
// This feeds lessons from previous agent sessions back into new agents,
|
|
177
|
-
// preventing repeated mistakes and maintaining consistency with past decisions.
|
|
178
|
-
const pastExperience = await queryPastExperience(runtime, {
|
|
179
|
-
taskDescription: userRequest,
|
|
180
|
-
lookbackHours: 48,
|
|
181
|
-
maxEntries: 8,
|
|
182
|
-
repo,
|
|
183
|
-
});
|
|
184
|
-
const pastExperienceBlock = formatPastExperience(pastExperience);
|
|
185
|
-
const results = [];
|
|
186
|
-
// Read LLM provider once before the spawn loop to avoid repeated sync I/O
|
|
187
|
-
// and ensure consistent provider selection across all agents in this swarm.
|
|
188
|
-
const llmProvider = readConfigEnvKey("PARALLAX_LLM_PROVIDER") || "subscription";
|
|
189
|
-
const coordinator = getCoordinator(runtime);
|
|
190
|
-
const threadTitle = explicitLabel || generateLabel(repo, userRequest);
|
|
191
|
-
const evalMetadata = mergeTaskThreadEvalMetadata(message, {
|
|
192
|
-
repo: repo ?? null,
|
|
193
|
-
messageId: message.id,
|
|
194
|
-
requestedAgents: agentSpecs.length,
|
|
195
|
-
});
|
|
196
|
-
const taskThread = coordinator
|
|
197
|
-
? await coordinator.createTaskThread({
|
|
198
|
-
title: threadTitle,
|
|
199
|
-
originalRequest: userRequest,
|
|
200
|
-
roomId: message.roomId,
|
|
201
|
-
worldId: message.worldId,
|
|
202
|
-
ownerUserId: message.userId ?? message.entityId,
|
|
203
|
-
scenarioId: evalMetadata.scenarioId,
|
|
204
|
-
batchId: evalMetadata.batchId,
|
|
205
|
-
currentPlan: swarmContext && cleanSubtasks.length > 1
|
|
206
|
-
? {
|
|
207
|
-
sharedContext: swarmContext,
|
|
208
|
-
subtasks: cleanSubtasks,
|
|
209
|
-
}
|
|
210
|
-
: { subtasks: cleanSubtasks },
|
|
211
|
-
metadata: evalMetadata.metadata,
|
|
212
|
-
})
|
|
213
|
-
: null;
|
|
214
|
-
const plannedAgents = await Promise.all(agentSpecs.map(async (spec, i) => {
|
|
215
|
-
let specAgentType = defaultAgentType;
|
|
216
|
-
let specPiRequested = isPiAgentType(rawAgentType);
|
|
217
|
-
let specRequestedType = rawAgentType;
|
|
218
|
-
let specTask = spec;
|
|
219
|
-
let hasExplicitPrefix = false;
|
|
220
|
-
const colonIdx = spec.indexOf(":");
|
|
221
|
-
if (ctx.agentSelectionStrategy !== "fixed" &&
|
|
222
|
-
colonIdx > 0 &&
|
|
223
|
-
colonIdx < 20) {
|
|
224
|
-
const prefix = spec.slice(0, colonIdx).trim().toLowerCase();
|
|
225
|
-
if (KNOWN_AGENT_PREFIXES.includes(prefix)) {
|
|
226
|
-
hasExplicitPrefix = true;
|
|
227
|
-
specRequestedType = prefix;
|
|
228
|
-
specPiRequested = isPiAgentType(prefix);
|
|
229
|
-
specAgentType = normalizeAgentType(prefix);
|
|
230
|
-
specTask = spec.slice(colonIdx + 1).trim();
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
else if (ctx.agentSelectionStrategy === "fixed" &&
|
|
234
|
-
colonIdx > 0 &&
|
|
235
|
-
colonIdx < 20) {
|
|
236
|
-
specTask = stripAgentPrefix(spec);
|
|
237
|
-
}
|
|
238
|
-
const specLabel = explicitLabel
|
|
239
|
-
? `${explicitLabel}-${i + 1}`
|
|
240
|
-
: generateLabel(repo, specTask);
|
|
241
|
-
if (!agentTypeExplicit && !hasExplicitPrefix) {
|
|
242
|
-
specRequestedType = await ptyService.resolveAgentType({
|
|
243
|
-
task: specTask,
|
|
244
|
-
repo,
|
|
245
|
-
subtaskCount: agentSpecs.length,
|
|
246
|
-
});
|
|
247
|
-
specPiRequested = isPiAgentType(specRequestedType);
|
|
248
|
-
specAgentType = normalizeAgentType(specRequestedType);
|
|
249
|
-
}
|
|
250
|
-
return {
|
|
251
|
-
specAgentType,
|
|
252
|
-
specPiRequested,
|
|
253
|
-
specRequestedType,
|
|
254
|
-
specTask,
|
|
255
|
-
specLabel,
|
|
256
|
-
};
|
|
257
|
-
}));
|
|
258
|
-
const graphPlan = coordinator && taskThread
|
|
259
|
-
? await coordinator.planTaskThreadGraph({
|
|
260
|
-
threadId: taskThread.id,
|
|
261
|
-
title: threadTitle,
|
|
262
|
-
originalRequest: userRequest,
|
|
263
|
-
sharedContext: swarmContext || undefined,
|
|
264
|
-
subtasks: plannedAgents.map((agent) => ({
|
|
265
|
-
label: agent.specLabel,
|
|
266
|
-
originalTask: agent.specTask,
|
|
267
|
-
agentType: agent.specAgentType,
|
|
268
|
-
repo,
|
|
269
|
-
})),
|
|
270
|
-
})
|
|
271
|
-
: null;
|
|
272
|
-
for (const [i, plannedAgent] of plannedAgents.entries()) {
|
|
273
|
-
const { specAgentType, specPiRequested, specRequestedType, specTask, specLabel, } = plannedAgent;
|
|
274
|
-
const taskNodeId = graphPlan?.workerNodes[i]?.id;
|
|
275
|
-
let failureStage = "workspace";
|
|
276
|
-
try {
|
|
277
|
-
// Provision workspace (each agent gets its own clone or scratch dir)
|
|
278
|
-
let workdir;
|
|
279
|
-
let workspaceId;
|
|
280
|
-
let branch;
|
|
281
|
-
if (repo && wsService) {
|
|
282
|
-
const workspace = await wsService.provisionWorkspace({ repo });
|
|
283
|
-
workdir = workspace.path;
|
|
284
|
-
workspaceId = workspace.id;
|
|
285
|
-
branch = workspace.branch;
|
|
286
|
-
wsService.setLabel(workspace.id, specLabel);
|
|
287
|
-
}
|
|
288
|
-
else {
|
|
289
|
-
workdir = createScratchDir(runtime, specLabel);
|
|
290
|
-
}
|
|
291
|
-
// Preflight check
|
|
292
|
-
failureStage = "preflight";
|
|
293
|
-
if (specAgentType !== "shell" && specAgentType !== "pi") {
|
|
294
|
-
const [preflight] = await ptyService.checkAvailableAgents([
|
|
295
|
-
specAgentType,
|
|
296
|
-
]);
|
|
297
|
-
if (preflight && !preflight.installed) {
|
|
298
|
-
results.push({
|
|
299
|
-
sessionId: "",
|
|
300
|
-
agentType: specAgentType,
|
|
301
|
-
workdir,
|
|
302
|
-
label: specLabel,
|
|
303
|
-
status: "failed",
|
|
304
|
-
error: `${preflight.adapter} CLI is not installed`,
|
|
305
|
-
});
|
|
306
|
-
continue;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
// Check if coordinator is active — route blocking prompts through it
|
|
310
|
-
// Spawn the agent — prepend shared context brief if available
|
|
311
|
-
const taskWithContext = swarmContext
|
|
312
|
-
? `${specTask}\n\n--- Shared Context (from project planning) ---\n${swarmContext}\n--- End Shared Context ---`
|
|
313
|
-
: specTask;
|
|
314
|
-
const initialTask = specPiRequested
|
|
315
|
-
? toPiCommand(taskWithContext)
|
|
316
|
-
: taskWithContext;
|
|
317
|
-
const displayType = specPiRequested ? "pi" : specAgentType;
|
|
318
|
-
// Append swarm coordination instructions to agent memory so the agent
|
|
319
|
-
// knows to surface design decisions explicitly for the orchestrator.
|
|
320
|
-
const swarmMemory = agentSpecs.length > 1 && swarmContext
|
|
321
|
-
? buildSwarmMemoryInstructions(specLabel, specTask, cleanSubtasks, i)
|
|
322
|
-
: undefined;
|
|
323
|
-
const agentMemory = [memoryContent, swarmMemory, pastExperienceBlock]
|
|
324
|
-
.filter(Boolean)
|
|
325
|
-
.join("\n\n") || undefined;
|
|
326
|
-
const coordinatorManagedSession = !!coordinator && llmProvider === "subscription";
|
|
327
|
-
const useDirectCallbackResponses = Boolean(callback);
|
|
328
|
-
failureStage = "spawn";
|
|
329
|
-
const session = await ptyService.spawnSession({
|
|
330
|
-
name: `coding-${Date.now()}-${i}`,
|
|
331
|
-
agentType: specAgentType,
|
|
332
|
-
workdir,
|
|
333
|
-
initialTask,
|
|
334
|
-
memoryContent: agentMemory,
|
|
335
|
-
credentials,
|
|
336
|
-
approvalPreset: approvalPreset ??
|
|
337
|
-
ptyService.defaultApprovalPreset,
|
|
338
|
-
customCredentials,
|
|
339
|
-
...(coordinatorManagedSession ? { skipAdapterAutoResponse: true } : {}),
|
|
340
|
-
metadata: {
|
|
341
|
-
threadId: taskThread?.id,
|
|
342
|
-
taskNodeId,
|
|
343
|
-
requestedType: specRequestedType,
|
|
344
|
-
messageId: message.id,
|
|
345
|
-
userId: message.userId,
|
|
346
|
-
workspaceId,
|
|
347
|
-
label: specLabel,
|
|
348
|
-
multiAgentIndex: i,
|
|
349
|
-
// Carry the originating message routing context so deployments can
|
|
350
|
-
// post async session updates back to the originating channel.
|
|
351
|
-
roomId: message.roomId,
|
|
352
|
-
worldId: message.worldId,
|
|
353
|
-
source: message.content?.source,
|
|
354
|
-
},
|
|
355
|
-
});
|
|
356
|
-
// Register event handler
|
|
357
|
-
const isScratch = !repo;
|
|
358
|
-
const scratchDir = isScratch ? workdir : null;
|
|
359
|
-
// Pass coordinatorActive=false so the session event handler uses the
|
|
360
|
-
// DIRECT callback path for chat responses. The coordinator still monitors
|
|
361
|
-
// lifecycle via its own subscriptions — this only affects who sends the
|
|
362
|
-
// "done" message to discord. When coordinatorActive=true, the coordinator
|
|
363
|
-
// generates the reply from originalTask (the user's text), producing the
|
|
364
|
-
// "done — <echo of user message>" bug. When false, registerSessionEvents
|
|
365
|
-
// pulls data.response (the subagent's ACTUAL output) and sends that.
|
|
366
|
-
registerSessionEvents(ptyService, runtime, session.id, specLabel, scratchDir, callback, coordinatorManagedSession && !useDirectCallbackResponses);
|
|
367
|
-
if (coordinator && specTask) {
|
|
368
|
-
failureStage = "register";
|
|
369
|
-
await coordinator.registerTask(session.id, {
|
|
370
|
-
threadId: taskThread?.id ?? session.id,
|
|
371
|
-
taskNodeId,
|
|
372
|
-
agentType: specAgentType,
|
|
373
|
-
label: specLabel,
|
|
374
|
-
originalTask: specTask,
|
|
375
|
-
workdir,
|
|
376
|
-
repo,
|
|
377
|
-
metadata: session.metadata &&
|
|
378
|
-
typeof session.metadata === "object" &&
|
|
379
|
-
!Array.isArray(session.metadata)
|
|
380
|
-
? session.metadata
|
|
381
|
-
: undefined,
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
results.push({
|
|
385
|
-
sessionId: session.id,
|
|
386
|
-
agentType: displayType,
|
|
387
|
-
workdir,
|
|
388
|
-
workspaceId,
|
|
389
|
-
branch,
|
|
390
|
-
label: specLabel,
|
|
391
|
-
status: session.status,
|
|
392
|
-
});
|
|
393
|
-
// Per-agent spawn chatter removed. The streamer reports the final
|
|
394
|
-
// result; the intermediate "[1/N] Spawned ..." messages are noise.
|
|
395
|
-
}
|
|
396
|
-
catch (error) {
|
|
397
|
-
const rawErrorMessage = error instanceof Error ? error.message : String(error);
|
|
398
|
-
const errorMessage = repo && failureStage === "workspace"
|
|
399
|
-
? `${rawErrorMessage}. ${diagnoseWorkspaceBootstrapFailure(repo, rawErrorMessage)}`
|
|
400
|
-
: rawErrorMessage;
|
|
401
|
-
logger.error(`[START_CODING_TASK] Failed to spawn agent ${i + 1}:`, errorMessage);
|
|
402
|
-
if (callback) {
|
|
403
|
-
await callback({
|
|
404
|
-
text: `[${i + 1}/${agentSpecs.length}] Failed to launch "${specLabel}". ` +
|
|
405
|
-
errorMessage,
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
results.push({
|
|
409
|
-
sessionId: "",
|
|
410
|
-
agentType: specAgentType,
|
|
411
|
-
workdir: "",
|
|
412
|
-
label: specLabel,
|
|
413
|
-
status: "failed",
|
|
414
|
-
error: errorMessage,
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
// Store all sessions in state
|
|
419
|
-
if (state) {
|
|
420
|
-
state.codingSessions = results.filter((r) => r.sessionId);
|
|
421
|
-
}
|
|
422
|
-
const succeeded = results.filter((r) => r.sessionId);
|
|
423
|
-
const failed = results.filter((r) => !r.sessionId);
|
|
424
|
-
const summary = [
|
|
425
|
-
`Launched ${succeeded.length}/${agentSpecs.length} agents${repo ? ` on ${repo}` : ""}:`,
|
|
426
|
-
...succeeded.map((r) => ` - "${r.label}" (${r.agentType}) [session: ${r.sessionId}]`),
|
|
427
|
-
...(failed.length > 0
|
|
428
|
-
? [`Failed: ${failed.map((r) => `"${r.label}": ${r.error}`).join(", ")}`]
|
|
429
|
-
: []),
|
|
430
|
-
].join("\n");
|
|
431
|
-
// The final summary is suppressed from chat in favor of the
|
|
432
|
-
// task-progress-streamer, which delivers the actual subagent answer.
|
|
433
|
-
// We still include `summary` in the ActionResult.text so programmatic
|
|
434
|
-
// consumers (tests, logs) see the full detail.
|
|
435
|
-
if (callback && failed.length > 0) {
|
|
436
|
-
await callback({ text: summary });
|
|
437
|
-
}
|
|
438
|
-
return {
|
|
439
|
-
success: failed.length === 0,
|
|
440
|
-
text: summary,
|
|
441
|
-
data: { agents: results },
|
|
442
|
-
};
|
|
443
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Helper functions for the START_CODING_TASK action.
|
|
3
|
-
*
|
|
4
|
-
* - createScratchDir() -- Creates a scratch sandbox directory for non-repo tasks
|
|
5
|
-
* - generateLabel() -- Generate a short semantic label from repo URL and/or task description
|
|
6
|
-
* - registerSessionEvents() -- Register lifecycle event handlers for a spawned session
|
|
7
|
-
*
|
|
8
|
-
* @module actions/coding-task-helpers
|
|
9
|
-
*/
|
|
10
|
-
import type { IAgentRuntime } from "@elizaos/core";
|
|
11
|
-
import { type HandlerCallback } from "@elizaos/core";
|
|
12
|
-
import type { PTYService } from "../services/pty-service.ts";
|
|
13
|
-
/**
|
|
14
|
-
* Create a scratch sandbox directory for non-repo tasks.
|
|
15
|
-
*
|
|
16
|
-
* When `PARALLAX_CODING_DIRECTORY` is set (e.g. `~/Projects`), creates a
|
|
17
|
-
* named subdir like `~/Projects/todo-app/` derived from the task label.
|
|
18
|
-
* Otherwise falls back to `~/.eliza/workspaces/{uuid}`.
|
|
19
|
-
*/
|
|
20
|
-
export declare function createScratchDir(runtime?: IAgentRuntime, label?: string): string;
|
|
21
|
-
/**
|
|
22
|
-
* Generate a short semantic label from repo URL and/or task description.
|
|
23
|
-
* e.g. "git-workspace-service-testbed/hello-mima" or "scratch/react-research"
|
|
24
|
-
*/
|
|
25
|
-
export declare function generateLabel(repo: string | undefined, task: string | undefined): string;
|
|
26
|
-
/**
|
|
27
|
-
* Register lifecycle event handlers for a spawned session.
|
|
28
|
-
*
|
|
29
|
-
* When `coordinatorActive` is true the SwarmCoordinator owns chat messaging
|
|
30
|
-
* and session lifecycle for blocked / task_complete / error events.
|
|
31
|
-
* This listener still handles scratch-dir cleanup regardless.
|
|
32
|
-
*/
|
|
33
|
-
export declare function registerSessionEvents(ptyService: PTYService, runtime: IAgentRuntime, sessionId: string, label: string, scratchDir: string | null, callback?: HandlerCallback, coordinatorActive?: boolean): void;
|
|
34
|
-
//# sourceMappingURL=coding-task-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coding-task-helpers.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/actions/coding-task-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,eAAe,EAAU,MAAM,eAAe,CAAC;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAgC7D;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC/B,OAAO,CAAC,EAAE,aAAa,EACvB,KAAK,CAAC,EAAE,MAAM,GACZ,MAAM,CA4BR;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC5B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,GAAG,SAAS,GACtB,MAAM,CA4BR;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACpC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,aAAa,EACtB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,QAAQ,CAAC,EAAE,eAAe,EAC1B,iBAAiB,UAAQ,GACvB,IAAI,CAsEN"}
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Helper functions for the START_CODING_TASK action.
|
|
3
|
-
*
|
|
4
|
-
* - createScratchDir() -- Creates a scratch sandbox directory for non-repo tasks
|
|
5
|
-
* - generateLabel() -- Generate a short semantic label from repo URL and/or task description
|
|
6
|
-
* - registerSessionEvents() -- Register lifecycle event handlers for a spawned session
|
|
7
|
-
*
|
|
8
|
-
* @module actions/coding-task-helpers
|
|
9
|
-
*/
|
|
10
|
-
import { randomUUID } from "node:crypto";
|
|
11
|
-
import * as fs from "node:fs";
|
|
12
|
-
import * as os from "node:os";
|
|
13
|
-
import * as path from "node:path";
|
|
14
|
-
import { logger } from "@elizaos/core";
|
|
15
|
-
import { readConfigEnvKey } from "../services/config-env.js";
|
|
16
|
-
/**
|
|
17
|
-
* Sanitize a label into a safe directory name.
|
|
18
|
-
* Strips non-alphanumeric chars (keeps hyphens), lowercases, truncates to 60 chars.
|
|
19
|
-
*/
|
|
20
|
-
function sanitizeDirName(label) {
|
|
21
|
-
return (label
|
|
22
|
-
.toLowerCase()
|
|
23
|
-
.replace(/[^a-z0-9-]/g, "-")
|
|
24
|
-
.replace(/-{2,}/g, "-")
|
|
25
|
-
.replace(/^-|-$/g, "")
|
|
26
|
-
.slice(0, 60) || "scratch");
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Find a non-colliding directory path by appending -2, -3, etc. if needed.
|
|
30
|
-
*/
|
|
31
|
-
function resolveNonColliding(baseDir, name) {
|
|
32
|
-
let candidate = path.join(baseDir, name);
|
|
33
|
-
if (!fs.existsSync(candidate))
|
|
34
|
-
return candidate;
|
|
35
|
-
for (let i = 2; i < 100; i++) {
|
|
36
|
-
candidate = path.join(baseDir, `${name}-${i}`);
|
|
37
|
-
if (!fs.existsSync(candidate))
|
|
38
|
-
return candidate;
|
|
39
|
-
}
|
|
40
|
-
// Fallback to uuid to guarantee uniqueness
|
|
41
|
-
return path.join(baseDir, `${name}-${randomUUID().slice(0, 8)}`);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Create a scratch sandbox directory for non-repo tasks.
|
|
45
|
-
*
|
|
46
|
-
* When `PARALLAX_CODING_DIRECTORY` is set (e.g. `~/Projects`), creates a
|
|
47
|
-
* named subdir like `~/Projects/todo-app/` derived from the task label.
|
|
48
|
-
* Otherwise falls back to `~/.eliza/workspaces/{uuid}`.
|
|
49
|
-
*/
|
|
50
|
-
export function createScratchDir(runtime, label) {
|
|
51
|
-
// Check for user-configured coding directory.
|
|
52
|
-
// Try runtime settings → config file env → process.env (in priority order).
|
|
53
|
-
// Config file is checked directly because runtime.getSetting() doesn't read
|
|
54
|
-
// the config env section, and process.env is only set at boot time.
|
|
55
|
-
const codingDir = runtime?.getSetting("PARALLAX_CODING_DIRECTORY") ??
|
|
56
|
-
readConfigEnvKey("PARALLAX_CODING_DIRECTORY") ??
|
|
57
|
-
process.env.PARALLAX_CODING_DIRECTORY;
|
|
58
|
-
if (codingDir?.trim()) {
|
|
59
|
-
const resolved = codingDir.startsWith("~")
|
|
60
|
-
? path.join(os.homedir(), codingDir.slice(1))
|
|
61
|
-
: path.resolve(codingDir);
|
|
62
|
-
const dirName = label
|
|
63
|
-
? sanitizeDirName(label)
|
|
64
|
-
: `scratch-${randomUUID().slice(0, 8)}`;
|
|
65
|
-
const scratchDir = resolveNonColliding(resolved, dirName);
|
|
66
|
-
fs.mkdirSync(scratchDir, { recursive: true });
|
|
67
|
-
return scratchDir;
|
|
68
|
-
}
|
|
69
|
-
// Default: ephemeral UUID-based dir
|
|
70
|
-
const baseDir = path.join(os.homedir(), ".eliza", "workspaces");
|
|
71
|
-
const scratchId = randomUUID();
|
|
72
|
-
const scratchDir = path.join(baseDir, scratchId);
|
|
73
|
-
fs.mkdirSync(scratchDir, { recursive: true });
|
|
74
|
-
return scratchDir;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Generate a short semantic label from repo URL and/or task description.
|
|
78
|
-
* e.g. "git-workspace-service-testbed/hello-mima" or "scratch/react-research"
|
|
79
|
-
*/
|
|
80
|
-
export function generateLabel(repo, task) {
|
|
81
|
-
const parts = [];
|
|
82
|
-
if (repo) {
|
|
83
|
-
// Extract repo name from URL: "https://github.com/owner/my-repo.git" -> "my-repo"
|
|
84
|
-
const match = repo.match(/\/([^/]+?)(?:\.git)?$/);
|
|
85
|
-
parts.push(match ? match[1] : "repo");
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
parts.push("scratch");
|
|
89
|
-
}
|
|
90
|
-
if (task) {
|
|
91
|
-
// Extract a slug from the first few meaningful words of the task
|
|
92
|
-
const slug = task
|
|
93
|
-
.toLowerCase()
|
|
94
|
-
.replace(/[^a-z0-9\s-]/g, "")
|
|
95
|
-
.split(/\s+/)
|
|
96
|
-
.filter((w) => w.length > 2 &&
|
|
97
|
-
!["the", "and", "for", "with", "that", "this", "from"].includes(w))
|
|
98
|
-
.slice(0, 3)
|
|
99
|
-
.join("-");
|
|
100
|
-
if (slug)
|
|
101
|
-
parts.push(slug);
|
|
102
|
-
}
|
|
103
|
-
return parts.join("/");
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Register lifecycle event handlers for a spawned session.
|
|
107
|
-
*
|
|
108
|
-
* When `coordinatorActive` is true the SwarmCoordinator owns chat messaging
|
|
109
|
-
* and session lifecycle for blocked / task_complete / error events.
|
|
110
|
-
* This listener still handles scratch-dir cleanup regardless.
|
|
111
|
-
*/
|
|
112
|
-
export function registerSessionEvents(ptyService, runtime, sessionId, label, scratchDir, callback, coordinatorActive = false) {
|
|
113
|
-
let scratchRegistered = false;
|
|
114
|
-
ptyService.onSessionEvent((sid, event, data) => {
|
|
115
|
-
if (sid !== sessionId)
|
|
116
|
-
return;
|
|
117
|
-
// When coordinator is active it handles chat + lifecycle for these events
|
|
118
|
-
if (!coordinatorActive) {
|
|
119
|
-
if (event === "blocked" && callback) {
|
|
120
|
-
callback({
|
|
121
|
-
text: `Agent "${label}" is waiting for input: ${data.prompt ?? "unknown prompt"}`,
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
if (event === "task_complete") {
|
|
125
|
-
if (callback) {
|
|
126
|
-
const response = data.response ?? "";
|
|
127
|
-
const preview = response.length > 500 ? `${response.slice(0, 500)}...` : response;
|
|
128
|
-
callback({
|
|
129
|
-
text: preview
|
|
130
|
-
? `Agent "${label}" completed the task.\n\n${preview}`
|
|
131
|
-
: `Agent "${label}" completed the task.`,
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
// NOTE: do NOT force-kill the session here. task_complete fires after
|
|
135
|
-
// every tool call (when the prompt reappears), not only when the agent
|
|
136
|
-
// is truly finished. killing here causes the agent to be reaped mid-
|
|
137
|
-
// work (e.g. after WebSearch but before composing the answer). the
|
|
138
|
-
// session will be cleaned up by the idle watchdog after 5 minutes of
|
|
139
|
-
// real inactivity, or when the agent naturally exits.
|
|
140
|
-
}
|
|
141
|
-
if (event === "error" && callback) {
|
|
142
|
-
callback({
|
|
143
|
-
text: `Agent "${label}" encountered an error: ${data.message ?? "unknown error"}`,
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
// Scratch lifecycle: register terminal scratch workspaces for retention
|
|
148
|
-
// policy handling (ephemeral / pending_decision / persistent).
|
|
149
|
-
if ((event === "stopped" || event === "task_complete" || event === "error") &&
|
|
150
|
-
scratchDir &&
|
|
151
|
-
!scratchRegistered) {
|
|
152
|
-
logger.info(`[scratch-lifecycle] Terminal event "${event}" for "${label}" — registering scratch workspace at ${scratchDir}`);
|
|
153
|
-
const wsService = runtime.getService("CODING_WORKSPACE_SERVICE");
|
|
154
|
-
if (!wsService) {
|
|
155
|
-
logger.warn(`[scratch-lifecycle] CODING_WORKSPACE_SERVICE not found — cannot register scratch workspace`);
|
|
156
|
-
// Leave scratchRegistered false so a later event can retry
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
wsService
|
|
160
|
-
.registerScratchWorkspace(sessionId, scratchDir, label, event)
|
|
161
|
-
.then(() => {
|
|
162
|
-
scratchRegistered = true;
|
|
163
|
-
})
|
|
164
|
-
.catch((err) => {
|
|
165
|
-
logger.warn(`[START_CODING_TASK] Failed to register scratch workspace for "${label}": ${err}`);
|
|
166
|
-
// Leave scratchRegistered false so a later event can retry
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Memory } from "@elizaos/core";
|
|
2
|
-
export declare function extractEvalRunMetadata(value: Memory | Record<string, unknown> | null | undefined): {
|
|
3
|
-
scenarioId?: string;
|
|
4
|
-
batchId?: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function mergeTaskThreadEvalMetadata(message: Memory | null | undefined, metadata: Record<string, unknown> | undefined): {
|
|
7
|
-
scenarioId?: string;
|
|
8
|
-
batchId?: string;
|
|
9
|
-
metadata: Record<string, unknown>;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=eval-metadata.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eval-metadata.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/actions/eval-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAsB5C,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GACxD;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CA0BA;AAED,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC3C;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAkBA"}
|