@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,265 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SEND_TO_AGENT action - Send input to a running task agent.
|
|
3
|
-
*
|
|
4
|
-
* Allows sending text or commands to an active PTY session.
|
|
5
|
-
* Useful for responding to prompts, providing feedback, or giving new instructions.
|
|
6
|
-
*
|
|
7
|
-
* @module actions/send-to-agent
|
|
8
|
-
*/
|
|
9
|
-
import { getCoordinator } from "../services/pty-service.js";
|
|
10
|
-
import { normalizeAgentType } from "../services/pty-types.js";
|
|
11
|
-
import { requireTaskAgentAccess } from "../services/task-policy.js";
|
|
12
|
-
import { mergeTaskThreadEvalMetadata } from "./eval-metadata.js";
|
|
13
|
-
export const sendToAgentAction = {
|
|
14
|
-
name: "SEND_TO_AGENT",
|
|
15
|
-
similes: [
|
|
16
|
-
"SEND_TO_CODING_AGENT",
|
|
17
|
-
"MESSAGE_CODING_AGENT",
|
|
18
|
-
"INPUT_TO_AGENT",
|
|
19
|
-
"RESPOND_TO_AGENT",
|
|
20
|
-
"TELL_CODING_AGENT",
|
|
21
|
-
"MESSAGE_AGENT",
|
|
22
|
-
"TELL_TASK_AGENT",
|
|
23
|
-
],
|
|
24
|
-
description: "Send text input or key presses to a running task-agent session. " +
|
|
25
|
-
"Use this to respond to agent prompts, provide feedback, continue a task, or assign a fresh tracked task to an existing agent.",
|
|
26
|
-
examples: [
|
|
27
|
-
[
|
|
28
|
-
{
|
|
29
|
-
name: "{{user1}}",
|
|
30
|
-
content: { text: "Tell the running sub-agent to accept the changes" },
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: "{{agentName}}",
|
|
34
|
-
content: {
|
|
35
|
-
text: "I'll send the approval to the task agent.",
|
|
36
|
-
action: "SEND_TO_AGENT",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
[
|
|
41
|
-
{
|
|
42
|
-
name: "{{user1}}",
|
|
43
|
-
content: { text: "Say yes to the agent prompt" },
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "{{agentName}}",
|
|
47
|
-
content: {
|
|
48
|
-
text: "Sending confirmation to the agent.",
|
|
49
|
-
action: "SEND_TO_AGENT",
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
],
|
|
54
|
-
validate: async (runtime, _message) => {
|
|
55
|
-
const ptyService = runtime.getService("PTY_SERVICE");
|
|
56
|
-
if (!ptyService) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
// Fast-fail: listSessions() does a JSON-RPC call to the Node worker which
|
|
60
|
-
// can take 30s to timeout when the worker is busy. Cap at 2s so action
|
|
61
|
-
// validation doesn't block the entire message pipeline.
|
|
62
|
-
try {
|
|
63
|
-
const sessions = await Promise.race([
|
|
64
|
-
ptyService.listSessions(),
|
|
65
|
-
new Promise((_, reject) => setTimeout(() => reject(new Error("validate timeout")), 2000)),
|
|
66
|
-
]);
|
|
67
|
-
return sessions.length > 0;
|
|
68
|
-
}
|
|
69
|
-
catch {
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
handler: async (runtime, message, state, options, callback) => {
|
|
74
|
-
const access = await requireTaskAgentAccess(runtime, message, "interact");
|
|
75
|
-
if (access.allowed === false) {
|
|
76
|
-
if (callback) {
|
|
77
|
-
await callback({
|
|
78
|
-
text: access.reason,
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
return { success: false, error: "FORBIDDEN", text: access.reason };
|
|
82
|
-
}
|
|
83
|
-
const ptyService = runtime.getService("PTY_SERVICE");
|
|
84
|
-
if (!ptyService) {
|
|
85
|
-
if (callback) {
|
|
86
|
-
await callback({
|
|
87
|
-
text: "PTY Service is not available.",
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
return { success: false, error: "SERVICE_UNAVAILABLE" };
|
|
91
|
-
}
|
|
92
|
-
const params = options?.parameters;
|
|
93
|
-
const content = message.content;
|
|
94
|
-
// Get session ID from content or state
|
|
95
|
-
let sessionId = params?.sessionId ?? content.sessionId;
|
|
96
|
-
if (!sessionId && state?.codingSession) {
|
|
97
|
-
sessionId = state.codingSession.id;
|
|
98
|
-
}
|
|
99
|
-
if (!sessionId) {
|
|
100
|
-
// Try to find the most recent session
|
|
101
|
-
const sessions = await ptyService.listSessions();
|
|
102
|
-
if (sessions.length === 0) {
|
|
103
|
-
if (callback) {
|
|
104
|
-
await callback({
|
|
105
|
-
text: "No active task-agent sessions. Spawn an agent first.",
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
return { success: false, error: "NO_SESSION" };
|
|
109
|
-
}
|
|
110
|
-
sessionId = sessions[sessions.length - 1].id;
|
|
111
|
-
}
|
|
112
|
-
const session = ptyService.getSession(sessionId);
|
|
113
|
-
if (!session) {
|
|
114
|
-
if (callback) {
|
|
115
|
-
await callback({
|
|
116
|
-
text: `Session ${sessionId} not found.`,
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
return { success: false, error: "SESSION_NOT_FOUND" };
|
|
120
|
-
}
|
|
121
|
-
try {
|
|
122
|
-
const keys = params?.keys ?? content.keys;
|
|
123
|
-
const trackedTask = params?.task ?? content.task;
|
|
124
|
-
const taskLabel = params?.label ?? content.label;
|
|
125
|
-
const input = params?.input ?? content.input ?? trackedTask;
|
|
126
|
-
if (keys) {
|
|
127
|
-
// Send special key sequence
|
|
128
|
-
await ptyService.sendKeysToSession(sessionId, keys);
|
|
129
|
-
if (callback) {
|
|
130
|
-
await callback({
|
|
131
|
-
text: "Sent key sequence to task agent.",
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
return {
|
|
135
|
-
success: true,
|
|
136
|
-
text: "Sent key sequence",
|
|
137
|
-
data: { sessionId, keys },
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
else if (input) {
|
|
141
|
-
// Send text input
|
|
142
|
-
await ptyService.sendToSession(sessionId, input);
|
|
143
|
-
if (trackedTask) {
|
|
144
|
-
const coordinator = getCoordinator(runtime);
|
|
145
|
-
const existingTask = coordinator?.getTaskContext(sessionId);
|
|
146
|
-
const evalMetadata = mergeTaskThreadEvalMetadata(message, {
|
|
147
|
-
source: "send-to-agent-action",
|
|
148
|
-
messageId: message.id,
|
|
149
|
-
sessionId,
|
|
150
|
-
});
|
|
151
|
-
const taskThread = coordinator && !existingTask
|
|
152
|
-
? await coordinator.createTaskThread({
|
|
153
|
-
title: taskLabel ||
|
|
154
|
-
(typeof session.metadata?.label === "string"
|
|
155
|
-
? session.metadata.label
|
|
156
|
-
: `agent-${sessionId.slice(-8)}`),
|
|
157
|
-
originalRequest: trackedTask,
|
|
158
|
-
roomId: typeof message
|
|
159
|
-
.roomId === "string"
|
|
160
|
-
? message
|
|
161
|
-
.roomId
|
|
162
|
-
: null,
|
|
163
|
-
ownerUserId: typeof message
|
|
164
|
-
.userId === "string"
|
|
165
|
-
? message
|
|
166
|
-
.userId
|
|
167
|
-
: null,
|
|
168
|
-
scenarioId: evalMetadata.scenarioId,
|
|
169
|
-
batchId: evalMetadata.batchId,
|
|
170
|
-
metadata: evalMetadata.metadata,
|
|
171
|
-
})
|
|
172
|
-
: null;
|
|
173
|
-
if (coordinator) {
|
|
174
|
-
await coordinator.registerTask(sessionId, {
|
|
175
|
-
threadId: existingTask?.threadId ?? taskThread?.id ?? sessionId,
|
|
176
|
-
agentType: normalizeAgentType(session.agentType),
|
|
177
|
-
label: taskLabel ||
|
|
178
|
-
existingTask?.label ||
|
|
179
|
-
(typeof session.metadata?.label === "string"
|
|
180
|
-
? session.metadata.label
|
|
181
|
-
: `agent-${sessionId.slice(-8)}`),
|
|
182
|
-
originalTask: trackedTask,
|
|
183
|
-
workdir: session.workdir,
|
|
184
|
-
...(existingTask?.repo ? { repo: existingTask.repo } : {}),
|
|
185
|
-
metadata: session.metadata &&
|
|
186
|
-
typeof session.metadata === "object" &&
|
|
187
|
-
!Array.isArray(session.metadata)
|
|
188
|
-
? session.metadata
|
|
189
|
-
: undefined,
|
|
190
|
-
});
|
|
191
|
-
await coordinator.setTaskDelivered(sessionId);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
if (callback) {
|
|
195
|
-
await callback({
|
|
196
|
-
text: trackedTask
|
|
197
|
-
? `Assigned new tracked task to task agent: "${trackedTask}"`
|
|
198
|
-
: `Sent to task agent: "${input}"`,
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
return {
|
|
202
|
-
success: true,
|
|
203
|
-
text: trackedTask
|
|
204
|
-
? "Assigned new task to agent"
|
|
205
|
-
: "Sent input to agent",
|
|
206
|
-
data: {
|
|
207
|
-
sessionId,
|
|
208
|
-
input,
|
|
209
|
-
...(trackedTask ? { task: trackedTask } : {}),
|
|
210
|
-
},
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
if (callback) {
|
|
215
|
-
await callback({
|
|
216
|
-
text: "No input provided. Specify 'input', 'task', or 'keys' parameter.",
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
return { success: false, error: "NO_INPUT" };
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
catch (error) {
|
|
223
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
224
|
-
if (callback) {
|
|
225
|
-
await callback({
|
|
226
|
-
text: `Failed to send to agent: ${errorMessage}`,
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
return { success: false, error: errorMessage };
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
parameters: [
|
|
233
|
-
{
|
|
234
|
-
name: "sessionId",
|
|
235
|
-
description: "ID of the task-agent session to send to. If not specified, uses the current session.",
|
|
236
|
-
required: false,
|
|
237
|
-
schema: { type: "string" },
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
name: "input",
|
|
241
|
-
description: "Text input to send to the running task agent.",
|
|
242
|
-
required: false,
|
|
243
|
-
schema: { type: "string" },
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
name: "task",
|
|
247
|
-
description: "New tracked task to assign to the existing agent. This is also sent as the next input so LIST_AGENTS and provider status reflect the new assignment.",
|
|
248
|
-
required: false,
|
|
249
|
-
schema: { type: "string" },
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
name: "label",
|
|
253
|
-
description: "Optional label to use when tracking a newly assigned task on an existing agent.",
|
|
254
|
-
required: false,
|
|
255
|
-
schema: { type: "string" },
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
name: "keys",
|
|
259
|
-
description: "Special key sequence to send (e.g., 'Enter', 'Ctrl-C', 'y').",
|
|
260
|
-
required: false,
|
|
261
|
-
schema: { type: "string" },
|
|
262
|
-
},
|
|
263
|
-
],
|
|
264
|
-
};
|
|
265
|
-
export const sendToTaskAgentAction = sendToAgentAction;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SPAWN_AGENT action - Spawns a CLI task agent.
|
|
3
|
-
*
|
|
4
|
-
* Creates a new PTY session for a task agent (Claude Code, Codex, etc.)
|
|
5
|
-
* and returns a session ID for subsequent interactions.
|
|
6
|
-
*
|
|
7
|
-
* @module actions/spawn-agent
|
|
8
|
-
*/
|
|
9
|
-
import { type Action } from "@elizaos/core";
|
|
10
|
-
export declare const spawnAgentAction: Action;
|
|
11
|
-
export declare const spawnTaskAgentAction: Action;
|
|
12
|
-
//# sourceMappingURL=spawn-agent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spawn-agent.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/actions/spawn-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACN,KAAK,MAAM,EAQX,MAAM,eAAe,CAAC;AAqBvB,eAAO,MAAM,gBAAgB,EAAE,MAuZ9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAmB,CAAC"}
|
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SPAWN_AGENT action - Spawns a CLI task agent.
|
|
3
|
-
*
|
|
4
|
-
* Creates a new PTY session for a task agent (Claude Code, Codex, etc.)
|
|
5
|
-
* and returns a session ID for subsequent interactions.
|
|
6
|
-
*
|
|
7
|
-
* @module actions/spawn-agent
|
|
8
|
-
*/
|
|
9
|
-
import * as os from "node:os";
|
|
10
|
-
import * as path from "node:path";
|
|
11
|
-
import { logger, } from "@elizaos/core";
|
|
12
|
-
import { buildAgentCredentials, isAnthropicOAuthToken, sanitizeCustomCredentials, } from "../services/agent-credentials.js";
|
|
13
|
-
import { readConfigEnvKey } from "../services/config-env.js";
|
|
14
|
-
import { getCoordinator } from "../services/pty-service.js";
|
|
15
|
-
import { isPiAgentType, normalizeAgentType, toPiCommand, } from "../services/pty-types.js";
|
|
16
|
-
import { requireTaskAgentAccess } from "../services/task-policy.js";
|
|
17
|
-
import { mergeTaskThreadEvalMetadata } from "./eval-metadata.js";
|
|
18
|
-
export const spawnAgentAction = {
|
|
19
|
-
name: "SPAWN_AGENT",
|
|
20
|
-
similes: [
|
|
21
|
-
"SPAWN_CODING_AGENT",
|
|
22
|
-
"START_CODING_AGENT",
|
|
23
|
-
"LAUNCH_CODING_AGENT",
|
|
24
|
-
"CREATE_CODING_AGENT",
|
|
25
|
-
"SPAWN_CODER",
|
|
26
|
-
"RUN_CODING_AGENT",
|
|
27
|
-
"SPAWN_SUB_AGENT",
|
|
28
|
-
"START_TASK_AGENT",
|
|
29
|
-
"CREATE_AGENT",
|
|
30
|
-
],
|
|
31
|
-
description: "Spawn a specific task agent inside an existing workspace when you need direct control. " +
|
|
32
|
-
"These agents are intentionally open-ended and can handle investigation, writing, planning, testing, synthesis, repo work, and general async task execution. " +
|
|
33
|
-
"Returns a session ID that can be used to interact with the agent.",
|
|
34
|
-
examples: [
|
|
35
|
-
[
|
|
36
|
-
{
|
|
37
|
-
name: "{{user1}}",
|
|
38
|
-
content: {
|
|
39
|
-
text: "Start a Codex task agent in that workspace and have it continue the investigation.",
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: "{{agentName}}",
|
|
44
|
-
content: {
|
|
45
|
-
text: "I'll spawn a task agent in the current workspace and hand it the next chunk of work.",
|
|
46
|
-
action: "SPAWN_AGENT",
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
[
|
|
51
|
-
{
|
|
52
|
-
name: "{{user1}}",
|
|
53
|
-
content: {
|
|
54
|
-
text: "Spin up a task agent for the follow-up work in this repo.",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: "{{agentName}}",
|
|
59
|
-
content: {
|
|
60
|
-
text: "I'll create a task-agent session for that.",
|
|
61
|
-
action: "SPAWN_AGENT",
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
],
|
|
66
|
-
validate: async (runtime, _message) => {
|
|
67
|
-
// Check if PTYService is available
|
|
68
|
-
const ptyService = runtime.getService("PTY_SERVICE");
|
|
69
|
-
if (!ptyService) {
|
|
70
|
-
logger.warn("[SPAWN_AGENT] PTYService not available");
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
return true;
|
|
74
|
-
},
|
|
75
|
-
handler: async (runtime, message, state, options, callback) => {
|
|
76
|
-
const access = await requireTaskAgentAccess(runtime, message, "create");
|
|
77
|
-
if (access.allowed === false) {
|
|
78
|
-
if (callback) {
|
|
79
|
-
await callback({
|
|
80
|
-
text: access.reason,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
return { success: false, error: "FORBIDDEN", text: access.reason };
|
|
84
|
-
}
|
|
85
|
-
const ptyService = runtime.getService("PTY_SERVICE");
|
|
86
|
-
if (!ptyService) {
|
|
87
|
-
if (callback) {
|
|
88
|
-
await callback({
|
|
89
|
-
text: "PTY Service is not available. Cannot spawn a task agent.",
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
return { success: false, error: "SERVICE_UNAVAILABLE" };
|
|
93
|
-
}
|
|
94
|
-
// Extract parameters from options or message content
|
|
95
|
-
const params = options?.parameters;
|
|
96
|
-
const content = message.content;
|
|
97
|
-
const explicitRawType = params?.agentType ?? content.agentType;
|
|
98
|
-
const task = params?.task ?? content.task;
|
|
99
|
-
const rawAgentType = explicitRawType ??
|
|
100
|
-
(await ptyService.resolveAgentType({
|
|
101
|
-
task,
|
|
102
|
-
workdir: (params?.workdir ?? content.workdir) ||
|
|
103
|
-
undefined,
|
|
104
|
-
}));
|
|
105
|
-
const agentType = normalizeAgentType(rawAgentType);
|
|
106
|
-
const piRequested = isPiAgentType(rawAgentType);
|
|
107
|
-
const initialTask = piRequested ? toPiCommand(task) : task;
|
|
108
|
-
// Resolve workdir: explicit param > state from PROVISION_WORKSPACE > most recent workspace > cwd
|
|
109
|
-
let workdir = params?.workdir ?? content.workdir;
|
|
110
|
-
if (!workdir && state?.codingWorkspace) {
|
|
111
|
-
workdir = state.codingWorkspace.path;
|
|
112
|
-
}
|
|
113
|
-
if (!workdir) {
|
|
114
|
-
// Check workspace service for most recently provisioned workspace
|
|
115
|
-
const wsService = runtime.getService("CODING_WORKSPACE_SERVICE");
|
|
116
|
-
if (wsService) {
|
|
117
|
-
const workspaces = wsService.listWorkspaces();
|
|
118
|
-
if (workspaces.length > 0) {
|
|
119
|
-
workdir = workspaces[workspaces.length - 1].path;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
if (!workdir) {
|
|
124
|
-
if (callback) {
|
|
125
|
-
await callback({
|
|
126
|
-
text: "No workspace found. Please provision a workspace first using PROVISION_WORKSPACE or provide a workdir.",
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
return { success: false, error: "NO_WORKSPACE" };
|
|
130
|
-
}
|
|
131
|
-
// Validate workdir is within allowed directories
|
|
132
|
-
const resolvedWorkdir = path.resolve(workdir);
|
|
133
|
-
const workspaceBaseDir = path.join(os.homedir(), ".eliza", "workspaces");
|
|
134
|
-
const allowedPrefixes = [
|
|
135
|
-
path.resolve(workspaceBaseDir),
|
|
136
|
-
path.resolve(process.cwd()),
|
|
137
|
-
];
|
|
138
|
-
const isAllowed = allowedPrefixes.some((prefix) => resolvedWorkdir.startsWith(prefix + path.sep) ||
|
|
139
|
-
resolvedWorkdir === prefix);
|
|
140
|
-
if (!isAllowed) {
|
|
141
|
-
if (callback) {
|
|
142
|
-
await callback({
|
|
143
|
-
text: "The specified workdir is outside of allowed directories. Please use a workspace directory.",
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
return { success: false, error: "WORKDIR_OUTSIDE_ALLOWED" };
|
|
147
|
-
}
|
|
148
|
-
workdir = resolvedWorkdir;
|
|
149
|
-
const memoryContent = params?.memoryContent ?? content.memoryContent;
|
|
150
|
-
const approvalPreset = params?.approvalPreset ?? content.approvalPreset;
|
|
151
|
-
// Custom credentials for MCP servers and other integrations
|
|
152
|
-
const customCredentialKeys = runtime.getSetting("CUSTOM_CREDENTIAL_KEYS");
|
|
153
|
-
let customCredentials;
|
|
154
|
-
if (customCredentialKeys) {
|
|
155
|
-
customCredentials = {};
|
|
156
|
-
for (const key of customCredentialKeys.split(",").map((k) => k.trim())) {
|
|
157
|
-
const val = runtime.getSetting(key);
|
|
158
|
-
if (val)
|
|
159
|
-
customCredentials[key] = val;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
const rawAnthropicKey = runtime.getSetting("ANTHROPIC_API_KEY");
|
|
163
|
-
customCredentials = sanitizeCustomCredentials(customCredentials, isAnthropicOAuthToken(rawAnthropicKey) ? [rawAnthropicKey] : []);
|
|
164
|
-
// Build credentials based on the user's configured LLM provider.
|
|
165
|
-
// Throws if cloud mode is selected but no cloud API key is paired.
|
|
166
|
-
const llmProvider = readConfigEnvKey("PARALLAX_LLM_PROVIDER") || "subscription";
|
|
167
|
-
let credentials;
|
|
168
|
-
try {
|
|
169
|
-
credentials = buildAgentCredentials(runtime);
|
|
170
|
-
}
|
|
171
|
-
catch (err) {
|
|
172
|
-
const msg = err instanceof Error ? err.message : "Failed to build credentials";
|
|
173
|
-
logger.error(`[spawn-agent] ${msg}`);
|
|
174
|
-
if (callback) {
|
|
175
|
-
await callback({ text: msg });
|
|
176
|
-
}
|
|
177
|
-
return { success: false, error: "INVALID_CREDENTIALS" };
|
|
178
|
-
}
|
|
179
|
-
try {
|
|
180
|
-
// Check if the agent CLI is installed (for non-shell agents)
|
|
181
|
-
if (agentType !== "shell" && agentType !== "pi") {
|
|
182
|
-
const [preflight] = await ptyService.checkAvailableAgents([
|
|
183
|
-
agentType,
|
|
184
|
-
]);
|
|
185
|
-
if (preflight && !preflight.installed) {
|
|
186
|
-
if (callback) {
|
|
187
|
-
await callback({
|
|
188
|
-
text: `${preflight.adapter} CLI is not installed.\n` +
|
|
189
|
-
`Install with: ${preflight.installCommand}\n` +
|
|
190
|
-
`Docs: ${preflight.docsUrl}`,
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
return { success: false, error: "AGENT_NOT_INSTALLED" };
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
// Check if coordinator is active — route blocking prompts through it
|
|
197
|
-
const coordinator = getCoordinator(runtime);
|
|
198
|
-
const evalMetadata = mergeTaskThreadEvalMetadata(message, {
|
|
199
|
-
source: "spawn-agent-action",
|
|
200
|
-
messageId: message.id,
|
|
201
|
-
requestedType: rawAgentType,
|
|
202
|
-
});
|
|
203
|
-
const taskThread = coordinator && task
|
|
204
|
-
? await coordinator.createTaskThread({
|
|
205
|
-
title: `agent-${Date.now()}`,
|
|
206
|
-
originalRequest: task,
|
|
207
|
-
roomId: typeof message
|
|
208
|
-
.roomId === "string"
|
|
209
|
-
? message
|
|
210
|
-
.roomId
|
|
211
|
-
: null,
|
|
212
|
-
ownerUserId: typeof message
|
|
213
|
-
.userId === "string"
|
|
214
|
-
? message
|
|
215
|
-
.userId
|
|
216
|
-
: null,
|
|
217
|
-
scenarioId: evalMetadata.scenarioId,
|
|
218
|
-
batchId: evalMetadata.batchId,
|
|
219
|
-
metadata: evalMetadata.metadata,
|
|
220
|
-
})
|
|
221
|
-
: null;
|
|
222
|
-
// Spawn the PTY session
|
|
223
|
-
const session = await ptyService.spawnSession({
|
|
224
|
-
name: `task-${Date.now()}`,
|
|
225
|
-
agentType,
|
|
226
|
-
workdir,
|
|
227
|
-
initialTask,
|
|
228
|
-
memoryContent,
|
|
229
|
-
credentials,
|
|
230
|
-
approvalPreset: approvalPreset ??
|
|
231
|
-
ptyService.defaultApprovalPreset,
|
|
232
|
-
customCredentials,
|
|
233
|
-
// Let adapter auto-response handle startup prompts (API key, trust, etc.)
|
|
234
|
-
// when using cloud/API key mode — the LLM coordinator misinterprets these.
|
|
235
|
-
// In subscription mode, the coordinator handles all prompts.
|
|
236
|
-
...(coordinator && llmProvider === "subscription"
|
|
237
|
-
? { skipAdapterAutoResponse: true }
|
|
238
|
-
: {}),
|
|
239
|
-
metadata: {
|
|
240
|
-
threadId: taskThread?.id,
|
|
241
|
-
requestedType: rawAgentType,
|
|
242
|
-
messageId: message.id,
|
|
243
|
-
userId: message.userId,
|
|
244
|
-
},
|
|
245
|
-
});
|
|
246
|
-
// Register event handler for this session
|
|
247
|
-
ptyService.onSessionEvent((sessionId, event, data) => {
|
|
248
|
-
if (sessionId !== session.id)
|
|
249
|
-
return;
|
|
250
|
-
// Log session events for debugging
|
|
251
|
-
logger.debug(`[Session ${sessionId}] ${event}: ${JSON.stringify(data)}`);
|
|
252
|
-
// When coordinator is active it owns chat messaging for these events
|
|
253
|
-
if (!coordinator) {
|
|
254
|
-
// Handle blocked state - agent is waiting for input
|
|
255
|
-
if (event === "blocked" && callback) {
|
|
256
|
-
callback({
|
|
257
|
-
text: `Task agent is waiting for input: ${data.prompt ?? "unknown prompt"}`,
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
// Handle completion
|
|
261
|
-
if (event === "completed" && callback) {
|
|
262
|
-
callback({
|
|
263
|
-
text: "Task agent completed the task.",
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
// Handle errors
|
|
267
|
-
if (event === "error" && callback) {
|
|
268
|
-
callback({
|
|
269
|
-
text: `Task agent encountered an error: ${data.message ?? "unknown error"}`,
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
if (coordinator && task) {
|
|
275
|
-
await coordinator.registerTask(session.id, {
|
|
276
|
-
threadId: taskThread?.id ?? session.id,
|
|
277
|
-
agentType,
|
|
278
|
-
label: `agent-${session.id.slice(-8)}`,
|
|
279
|
-
originalTask: task,
|
|
280
|
-
workdir,
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
// Store session info in state for subsequent actions
|
|
284
|
-
if (state) {
|
|
285
|
-
state.codingSession = {
|
|
286
|
-
id: session.id,
|
|
287
|
-
agentType: session.agentType,
|
|
288
|
-
workdir: session.workdir,
|
|
289
|
-
status: session.status,
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
if (callback) {
|
|
293
|
-
await callback({
|
|
294
|
-
text: `Started ${piRequested ? "pi" : agentType} task agent in ${workdir}${task ? ` with task: "${task}"` : ""}. Session ID: ${session.id}`,
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
return {
|
|
298
|
-
success: true,
|
|
299
|
-
text: `Started ${piRequested ? "pi" : agentType} task agent`,
|
|
300
|
-
data: {
|
|
301
|
-
sessionId: session.id,
|
|
302
|
-
agentType: piRequested ? "pi" : session.agentType,
|
|
303
|
-
workdir: session.workdir,
|
|
304
|
-
status: session.status,
|
|
305
|
-
},
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
catch (error) {
|
|
309
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
310
|
-
logger.error("[SPAWN_AGENT] Failed to spawn agent:", errorMessage);
|
|
311
|
-
if (callback) {
|
|
312
|
-
await callback({
|
|
313
|
-
text: `Failed to spawn task agent: ${errorMessage}`,
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
return { success: false, error: errorMessage };
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
parameters: [
|
|
320
|
-
{
|
|
321
|
-
name: "agentType",
|
|
322
|
-
description: "Specific task-agent framework to spawn. Options: claude (Claude Code), codex (OpenAI Codex), gemini (Google Gemini), aider, pi, shell (generic shell). " +
|
|
323
|
-
"If omitted, the orchestrator picks the preferred available framework.",
|
|
324
|
-
required: false,
|
|
325
|
-
schema: { type: "string" },
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
name: "workdir",
|
|
329
|
-
description: "Working directory for the agent. Defaults to current directory.",
|
|
330
|
-
required: false,
|
|
331
|
-
schema: { type: "string" },
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
name: "task",
|
|
335
|
-
description: "Open-ended task or prompt to send to the task agent once spawned.",
|
|
336
|
-
required: false,
|
|
337
|
-
schema: { type: "string" },
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
name: "memoryContent",
|
|
341
|
-
description: "Instructions or shared context to write to the task agent's memory file before spawning.",
|
|
342
|
-
required: false,
|
|
343
|
-
schema: { type: "string" },
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
name: "approvalPreset",
|
|
347
|
-
description: "Permission level for the task agent: readonly (safe audit), standard (reads+web auto, writes prompt), permissive (file ops auto, shell prompts), autonomous (all auto, use with sandbox)",
|
|
348
|
-
required: false,
|
|
349
|
-
schema: {
|
|
350
|
-
type: "string",
|
|
351
|
-
enum: ["readonly", "standard", "permissive", "autonomous"],
|
|
352
|
-
},
|
|
353
|
-
},
|
|
354
|
-
],
|
|
355
|
-
};
|
|
356
|
-
export const spawnTaskAgentAction = spawnAgentAction;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CREATE_TASK action - Unified action to set up and launch task agents.
|
|
3
|
-
*
|
|
4
|
-
* Combines workspace provisioning and agent spawning into a single atomic action.
|
|
5
|
-
* - If a repo URL is provided, clones it into a fresh workspace
|
|
6
|
-
* - If no repo, creates a scratch sandbox directory
|
|
7
|
-
* - Spawns the specified task agent(s) in that workspace with the given task
|
|
8
|
-
* - Supports multi-agent mode via pipe-delimited `agents` param
|
|
9
|
-
*
|
|
10
|
-
* This eliminates the need for multi-action chaining (PROVISION_WORKSPACE -> SPAWN_AGENT)
|
|
11
|
-
* and ensures agents always run in an isolated directory.
|
|
12
|
-
*
|
|
13
|
-
* @module actions/start-coding-task
|
|
14
|
-
*/
|
|
15
|
-
import { type Action } from "@elizaos/core";
|
|
16
|
-
type BackgroundAction = Action & {
|
|
17
|
-
suppressPostActionContinuation?: boolean;
|
|
18
|
-
};
|
|
19
|
-
export declare const startCodingTaskAction: BackgroundAction;
|
|
20
|
-
export declare const createTaskAction: BackgroundAction;
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=start-coding-task.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start-coding-task.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/actions/start-coding-task.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACN,KAAK,MAAM,EAQX,MAAM,eAAe,CAAC;AAkBvB,KAAK,gBAAgB,GAAG,MAAM,GAAG;IAChC,8BAA8B,CAAC,EAAE,OAAO,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,gBA0TnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,kBAAwB,CAAC"}
|