@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,446 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stall classification subsystem — determines what a "stalled" task agent
|
|
3
|
-
* session is doing (finished, waiting for input, still working, or errored).
|
|
4
|
-
*
|
|
5
|
-
* Extracted as standalone functions that receive dependencies as parameters,
|
|
6
|
-
* making them easy to test without coupling to PTYService.
|
|
7
|
-
*
|
|
8
|
-
* @module services/stall-classifier
|
|
9
|
-
*/
|
|
10
|
-
import { ModelType } from "@elizaos/core";
|
|
11
|
-
import { buildTaskCompletionTimeline, extractTaskCompletionTraceRecords, } from "pty-manager";
|
|
12
|
-
import { stripAnsi } from "./ansi-utils.js";
|
|
13
|
-
import { withTrajectoryContext } from "./trajectory-context.js";
|
|
14
|
-
const STATUS_NOISE_LINE = /messages to be submitted after next tool call|working \(\d+s .*esc to interrupt\)|\b\d+% left\b|context left|use \/skills to list available skills/i;
|
|
15
|
-
const STATUS_PATH_LINE = /(\/private\/|\/var\/folders\/|\/Users\/|\/tmp\/)/;
|
|
16
|
-
const SPINNER_FRAGMENT_TOKEN = /^(?:w|wo|wor|work|worki|workin|working|orking|rking|king|ing|ng|g|\d+|[•·])$/i;
|
|
17
|
-
function normalizeForComparison(value) {
|
|
18
|
-
return stripAnsi(value).replace(/\s+/g, " ").trim().toLowerCase();
|
|
19
|
-
}
|
|
20
|
-
function looksLikeSpinnerFragments(line) {
|
|
21
|
-
const tokens = line
|
|
22
|
-
.replace(/[^\w/%@.:\-/ ]+/g, " ")
|
|
23
|
-
.split(/\s+/)
|
|
24
|
-
.filter(Boolean);
|
|
25
|
-
if (tokens.length === 0)
|
|
26
|
-
return false;
|
|
27
|
-
const fragmentTokens = tokens.filter((token) => SPINNER_FRAGMENT_TOKEN.test(token));
|
|
28
|
-
return (fragmentTokens.length >= 4 &&
|
|
29
|
-
fragmentTokens.length >= Math.ceil(tokens.length * 0.6));
|
|
30
|
-
}
|
|
31
|
-
function isStatusNoiseLine(line) {
|
|
32
|
-
const compact = line.replace(/\s+/g, " ").trim();
|
|
33
|
-
if (!compact)
|
|
34
|
-
return true;
|
|
35
|
-
if (compact.startsWith("› "))
|
|
36
|
-
return true;
|
|
37
|
-
if (STATUS_NOISE_LINE.test(compact))
|
|
38
|
-
return true;
|
|
39
|
-
if (looksLikeSpinnerFragments(compact))
|
|
40
|
-
return true;
|
|
41
|
-
if (STATUS_PATH_LINE.test(compact) && /\b\d+% left\b/i.test(compact))
|
|
42
|
-
return true;
|
|
43
|
-
if (STATUS_PATH_LINE.test(compact) && looksLikeSpinnerFragments(compact))
|
|
44
|
-
return true;
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
function sanitizeOutputForClassification(output, lastSentInput) {
|
|
48
|
-
const normalizedInput = lastSentInput
|
|
49
|
-
? normalizeForComparison(lastSentInput)
|
|
50
|
-
: "";
|
|
51
|
-
let removedEchoLines = 0;
|
|
52
|
-
let removedStatusLines = 0;
|
|
53
|
-
const sanitized = stripAnsi(output)
|
|
54
|
-
.split("\n")
|
|
55
|
-
.map((line) => line.replace(/\s+/g, " ").trim())
|
|
56
|
-
.filter((line) => {
|
|
57
|
-
if (!line)
|
|
58
|
-
return false;
|
|
59
|
-
const normalizedLine = line.toLowerCase();
|
|
60
|
-
if (normalizedInput &&
|
|
61
|
-
normalizedLine.length >= 12 &&
|
|
62
|
-
normalizedInput.includes(normalizedLine)) {
|
|
63
|
-
removedEchoLines += 1;
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
if (isStatusNoiseLine(line)) {
|
|
67
|
-
removedStatusLines += 1;
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
return true;
|
|
71
|
-
})
|
|
72
|
-
.join("\n")
|
|
73
|
-
.trim();
|
|
74
|
-
return { sanitized, removedEchoLines, removedStatusLines };
|
|
75
|
-
}
|
|
76
|
-
function promptLooksLikeFalseBlockedNoise(prompt, lastSentInput) {
|
|
77
|
-
if (!prompt)
|
|
78
|
-
return false;
|
|
79
|
-
const normalizedPrompt = normalizeForComparison(prompt);
|
|
80
|
-
if (!normalizedPrompt)
|
|
81
|
-
return false;
|
|
82
|
-
if (lastSentInput) {
|
|
83
|
-
const normalizedInput = normalizeForComparison(lastSentInput);
|
|
84
|
-
if (normalizedPrompt.length >= 12 &&
|
|
85
|
-
normalizedInput.includes(normalizedPrompt)) {
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return isStatusNoiseLine(prompt) || looksLikeSpinnerFragments(prompt);
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Build the LLM system prompt used to classify stalled output.
|
|
93
|
-
*/
|
|
94
|
-
export function buildStallClassificationPrompt(agentType, sessionId, output) {
|
|
95
|
-
return (`You are Eliza, an AI orchestrator managing task-agent sessions. ` +
|
|
96
|
-
`A ${agentType} task agent (session: ${sessionId}) appears to have stalled — ` +
|
|
97
|
-
`it has stopped producing output while in a busy state.\n\n` +
|
|
98
|
-
`Here is the recent terminal output:\n` +
|
|
99
|
-
`---\n${output.slice(-1500)}\n---\n\n` +
|
|
100
|
-
`Classify what's happening. Read the output carefully and choose the MOST specific match:\n\n` +
|
|
101
|
-
`1. "task_complete" — The agent FINISHED its task and returned to its idle prompt. ` +
|
|
102
|
-
`Strong indicators: a summary of completed work ("Done", "All done", "Here's what was completed"), ` +
|
|
103
|
-
`timing info ("Baked for", "Churned for", "Crunched for", "Cooked for", "Worked for"), ` +
|
|
104
|
-
`or the agent's main prompt symbol (❯) appearing AFTER completion output. ` +
|
|
105
|
-
`If the output contains evidence of completed work followed by an idle prompt, this is ALWAYS task_complete, ` +
|
|
106
|
-
`even though the agent is technically "waiting" — it is waiting for a NEW task, not asking a question.\n\n` +
|
|
107
|
-
`2. "waiting_for_input" — The agent is MID-TASK and blocked on a specific question or permission prompt. ` +
|
|
108
|
-
`The agent has NOT finished its work — it needs a response to continue. ` +
|
|
109
|
-
`Examples: Y/n confirmation, file permission dialogs, "Do you want to proceed?", ` +
|
|
110
|
-
`tool approval prompts, or interactive menus. ` +
|
|
111
|
-
`This is NOT the same as the agent sitting at its idle prompt after finishing work.\n\n` +
|
|
112
|
-
`3. "still_working" — The agent is actively processing (API call, compilation, thinking, etc.) ` +
|
|
113
|
-
`and has not produced final output yet. No prompt or completion summary visible.\n\n` +
|
|
114
|
-
`4. "error" — The agent hit an error state (crash, unrecoverable error, stack trace).\n\n` +
|
|
115
|
-
`5. "tool_running" — The agent is using an external tool (browser automation, ` +
|
|
116
|
-
`MCP tool, etc.). Indicators: "Claude in Chrome", "javascript_tool", ` +
|
|
117
|
-
`"computer_tool", "screenshot", "navigate", tool execution output. ` +
|
|
118
|
-
`The agent is actively working but the terminal may be quiet.\n\n` +
|
|
119
|
-
`IMPORTANT: If you see BOTH completed work output AND an idle prompt (❯), choose "task_complete". ` +
|
|
120
|
-
`Only choose "waiting_for_input" if the agent is clearly asking a question mid-task. ` +
|
|
121
|
-
`Ignore echoed user input, copied prior transcripts, spinner fragments, and status rows like ` +
|
|
122
|
-
`"Working (12s • esc to interrupt)" or "97% left" — those mean the agent is still working, not blocked.\n\n` +
|
|
123
|
-
`If "waiting_for_input", also provide:\n` +
|
|
124
|
-
`- "prompt": the text of what it's asking\n` +
|
|
125
|
-
`- "suggestedResponse": what to type/send. Use "keys:enter" for TUI menu confirmation, ` +
|
|
126
|
-
`"keys:down,enter" to select a non-default option, or plain text like "y" for text prompts.\n\n` +
|
|
127
|
-
`Respond with ONLY a JSON object:\n` +
|
|
128
|
-
`{"state": "...", "prompt": "...", "suggestedResponse": "..."}`);
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Write a debug snapshot to ~/.eliza/debug/ for offline stall analysis.
|
|
132
|
-
*/
|
|
133
|
-
export async function writeStallSnapshot(sessionId, agentType, recentOutput, effectiveOutput, buffers, traceEntries, log) {
|
|
134
|
-
try {
|
|
135
|
-
const fs = await import("node:fs");
|
|
136
|
-
const os = await import("node:os");
|
|
137
|
-
const path = await import("node:path");
|
|
138
|
-
const snapshotDir = path.join(os.homedir(), ".eliza", "debug");
|
|
139
|
-
fs.mkdirSync(snapshotDir, { recursive: true });
|
|
140
|
-
const ourBuffer = buffers.get(sessionId);
|
|
141
|
-
const ourTail = ourBuffer
|
|
142
|
-
? ourBuffer.slice(-100).join("\n")
|
|
143
|
-
: "(no buffer)";
|
|
144
|
-
void ourTail; // used in snapshot context but not directly printed
|
|
145
|
-
let traceTimeline = "(no trace entries)";
|
|
146
|
-
try {
|
|
147
|
-
const records = extractTaskCompletionTraceRecords(traceEntries);
|
|
148
|
-
const timeline = buildTaskCompletionTimeline(records, {
|
|
149
|
-
adapterType: agentType,
|
|
150
|
-
});
|
|
151
|
-
traceTimeline = JSON.stringify(timeline, null, 2);
|
|
152
|
-
}
|
|
153
|
-
catch (e) {
|
|
154
|
-
traceTimeline = `(trace error: ${e})`;
|
|
155
|
-
}
|
|
156
|
-
const snapshot = [
|
|
157
|
-
`=== STALL SNAPSHOT @ ${new Date().toISOString()} ===`,
|
|
158
|
-
`Session: ${sessionId} | Agent: ${agentType}`,
|
|
159
|
-
`recentOutput length: ${recentOutput.length} | effectiveOutput length: ${effectiveOutput.length}`,
|
|
160
|
-
``,
|
|
161
|
-
`--- effectiveOutput (what LLM sees) ---`,
|
|
162
|
-
effectiveOutput.slice(-1500),
|
|
163
|
-
``,
|
|
164
|
-
`--- trace timeline ---`,
|
|
165
|
-
traceTimeline,
|
|
166
|
-
``,
|
|
167
|
-
`--- raw trace entries (last 20 of ${traceEntries.length}) ---`,
|
|
168
|
-
traceEntries.slice(-20).join("\n"),
|
|
169
|
-
``,
|
|
170
|
-
].join("\n");
|
|
171
|
-
const snapshotPath = path.join(snapshotDir, `stall-snapshot-${sessionId}.txt`);
|
|
172
|
-
fs.writeFileSync(snapshotPath, snapshot);
|
|
173
|
-
log(`Stall snapshot → ${snapshotPath}`);
|
|
174
|
-
}
|
|
175
|
-
catch (_) {
|
|
176
|
-
/* best-effort */
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Main stall classification logic. Determines what a stalled session is doing
|
|
181
|
-
* by checking the buffer, building a prompt, and asking the LLM.
|
|
182
|
-
*/
|
|
183
|
-
export async function classifyStallOutput(ctx) {
|
|
184
|
-
const { sessionId, recentOutput, agentType, buffers, traceEntries, runtime, metricsTracker, log, } = ctx;
|
|
185
|
-
metricsTracker.incrementStalls(agentType);
|
|
186
|
-
// Use our own buffer if pty-manager's recentOutput is empty or too short.
|
|
187
|
-
let effectiveOutput = recentOutput;
|
|
188
|
-
if (!recentOutput || recentOutput.trim().length < 200) {
|
|
189
|
-
const ourBuffer = buffers.get(sessionId);
|
|
190
|
-
if (ourBuffer && ourBuffer.length > 0) {
|
|
191
|
-
const rawTail = ourBuffer.slice(-100).join("\n");
|
|
192
|
-
const stripped = stripAnsi(rawTail);
|
|
193
|
-
if (stripped.length > effectiveOutput.length) {
|
|
194
|
-
effectiveOutput = stripped;
|
|
195
|
-
log(`Using own buffer for stall classification (${effectiveOutput.length} chars after stripping, pty-manager had ${recentOutput.length})`);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
const { sanitized: sanitizedOutput, removedEchoLines, removedStatusLines, } = sanitizeOutputForClassification(effectiveOutput, ctx.lastSentInput);
|
|
200
|
-
if (removedEchoLines > 0 || removedStatusLines > 0) {
|
|
201
|
-
log(`Sanitized stall output for ${sessionId}: removed ${removedEchoLines} echoed lines and ${removedStatusLines} status lines`);
|
|
202
|
-
}
|
|
203
|
-
if (!sanitizedOutput && removedEchoLines + removedStatusLines > 0) {
|
|
204
|
-
log(`Stall classification short-circuit for ${sessionId}: only echoed input / status noise remained`);
|
|
205
|
-
return { state: "still_working" };
|
|
206
|
-
}
|
|
207
|
-
const systemPrompt = buildStallClassificationPrompt(agentType, sessionId, sanitizedOutput || effectiveOutput);
|
|
208
|
-
// Dump debug snapshot for offline analysis (opt-in via PTYServiceConfig.debug)
|
|
209
|
-
if (ctx.debugSnapshots) {
|
|
210
|
-
await writeStallSnapshot(sessionId, agentType, recentOutput, effectiveOutput, buffers, traceEntries, log);
|
|
211
|
-
}
|
|
212
|
-
try {
|
|
213
|
-
log(`Stall detected for ${sessionId}, asking LLM to classify...`);
|
|
214
|
-
const result = await withTrajectoryContext(runtime, {
|
|
215
|
-
source: "orchestrator",
|
|
216
|
-
decisionType: "stall-classification",
|
|
217
|
-
sessionId,
|
|
218
|
-
}, () => runtime.useModel(ModelType.TEXT_SMALL, { prompt: systemPrompt }));
|
|
219
|
-
const jsonMatch = result.match(/\{[\s\S]*\}/);
|
|
220
|
-
if (!jsonMatch) {
|
|
221
|
-
log(`Stall classification: no JSON in LLM response`);
|
|
222
|
-
return null;
|
|
223
|
-
}
|
|
224
|
-
const parsed = JSON.parse(jsonMatch[0]);
|
|
225
|
-
const validStates = [
|
|
226
|
-
"waiting_for_input",
|
|
227
|
-
"still_working",
|
|
228
|
-
"task_complete",
|
|
229
|
-
"error",
|
|
230
|
-
"tool_running",
|
|
231
|
-
];
|
|
232
|
-
if (!validStates.includes(parsed.state)) {
|
|
233
|
-
log(`Stall classification: invalid state "${parsed.state}"`);
|
|
234
|
-
return null;
|
|
235
|
-
}
|
|
236
|
-
// Map tool_running → still_working (StallClassification doesn't have tool_running).
|
|
237
|
-
//
|
|
238
|
-
// Also downgrade task_complete → still_working. The stall classifier LLM
|
|
239
|
-
// guesses from raw stripped-ANSI terminal buffer text, which cannot
|
|
240
|
-
// reliably distinguish "agent is truly finished" from "shell prompt
|
|
241
|
-
// showed up between tool calls" or "intermediate command exited with a
|
|
242
|
-
// summary". Treating this LLM's task_complete guess as a completion
|
|
243
|
-
// signal causes the coordinator's turn-complete pipeline to fire
|
|
244
|
-
// mid-work and re-inject the original prompt, creating an infinite
|
|
245
|
-
// retry loop for long open-ended tasks.
|
|
246
|
-
//
|
|
247
|
-
// Task completion is signaled authoritatively by the agent's own hook
|
|
248
|
-
// system (routed through pty-service.handleHookEvent) and by the
|
|
249
|
-
// jsonl-based completion watcher in the eliza package. The stall
|
|
250
|
-
// classifier is still useful for detecting waiting_for_input and error
|
|
251
|
-
// states, which is why we don't short-circuit those paths.
|
|
252
|
-
let mappedState;
|
|
253
|
-
if (parsed.state === "tool_running" || parsed.state === "task_complete") {
|
|
254
|
-
mappedState = "still_working";
|
|
255
|
-
if (parsed.state === "task_complete") {
|
|
256
|
-
log(`Stall classification for ${sessionId}: LLM said task_complete — downgrading to still_working (authoritative completion comes from hooks, not buffer guessing)`);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
else {
|
|
260
|
-
mappedState = parsed.state;
|
|
261
|
-
}
|
|
262
|
-
const classification = {
|
|
263
|
-
state: mappedState,
|
|
264
|
-
prompt: parsed.prompt,
|
|
265
|
-
suggestedResponse: parsed.suggestedResponse,
|
|
266
|
-
};
|
|
267
|
-
if (classification.state === "waiting_for_input" &&
|
|
268
|
-
promptLooksLikeFalseBlockedNoise(classification.prompt, ctx.lastSentInput)) {
|
|
269
|
-
log(`Stall classification override for ${sessionId}: prompt looked like echoed input / status noise`);
|
|
270
|
-
return { state: "still_working" };
|
|
271
|
-
}
|
|
272
|
-
log(`Stall classification for ${sessionId}: ${classification.state}${classification.suggestedResponse ? ` → "${classification.suggestedResponse}"` : ""}`);
|
|
273
|
-
return classification;
|
|
274
|
-
}
|
|
275
|
-
catch (err) {
|
|
276
|
-
log(`Stall classification failed: ${err}`);
|
|
277
|
-
return null;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Build a combined prompt that classifies the stall AND decides how to respond,
|
|
282
|
-
* merging stall classification with coordinator decision guidelines.
|
|
283
|
-
*
|
|
284
|
-
* Used for coordinator-managed sessions in autonomous mode to eliminate the
|
|
285
|
-
* redundant second LLM call in the coordinator's handleBlocked path.
|
|
286
|
-
*/
|
|
287
|
-
export function buildCombinedClassifyDecidePrompt(agentType, sessionId, output, taskContext, decisionHistory) {
|
|
288
|
-
const historySection = decisionHistory.length > 0
|
|
289
|
-
? `\nPrevious decisions for this session:\n${decisionHistory
|
|
290
|
-
.slice(-5)
|
|
291
|
-
.map((d, i) => ` ${i + 1}. [${d.event}] prompt="${d.promptText}" → ${d.action}${d.response ? ` ("${d.response}")` : ""} — ${d.reasoning}`)
|
|
292
|
-
.join("\n")}\n`
|
|
293
|
-
: "";
|
|
294
|
-
return (`You are Eliza, an AI orchestrator managing task-agent sessions. ` +
|
|
295
|
-
`A ${agentType} task agent (session: ${sessionId}) appears to have stalled — ` +
|
|
296
|
-
`it has stopped producing output while in a busy state.\n\n` +
|
|
297
|
-
`Original task: "${taskContext.originalTask}"\n` +
|
|
298
|
-
`Working directory: ${taskContext.workdir}\n` +
|
|
299
|
-
`Repository: ${taskContext.repo ?? "none (scratch directory)"}\n` +
|
|
300
|
-
historySection +
|
|
301
|
-
`\nHere is the recent terminal output:\n` +
|
|
302
|
-
`---\n${output.slice(-1500)}\n---\n\n` +
|
|
303
|
-
`Classify what's happening AND decide how to respond. Read the output carefully.\n\n` +
|
|
304
|
-
`Classification states:\n\n` +
|
|
305
|
-
`1. "task_complete" — The agent FINISHED its task and returned to its idle prompt. ` +
|
|
306
|
-
`Strong indicators: a summary of completed work, timing info, ` +
|
|
307
|
-
`or the agent's main prompt symbol (❯) appearing AFTER completion output.\n\n` +
|
|
308
|
-
`2. "waiting_for_input" — The agent is MID-TASK and blocked on a specific question or permission prompt. ` +
|
|
309
|
-
`Examples: Y/n confirmation, file permission dialogs, tool approval prompts, interactive menus.\n\n` +
|
|
310
|
-
`3. "still_working" — The agent is actively processing (API call, compilation, thinking). ` +
|
|
311
|
-
`No prompt or completion summary visible.\n\n` +
|
|
312
|
-
`4. "error" — The agent hit an error state (crash, unrecoverable error, stack trace).\n\n` +
|
|
313
|
-
`5. "tool_running" — The agent is using an external tool (browser automation, MCP tool, etc.).\n\n` +
|
|
314
|
-
`Ignore echoed user input, copied prior transcripts, spinner fragments, and status rows like ` +
|
|
315
|
-
`"Working (12s • esc to interrupt)" or "97% left" — those indicate active work, not a live prompt.\n\n` +
|
|
316
|
-
`If "waiting_for_input", you must also decide how to respond. Guidelines:\n` +
|
|
317
|
-
`- IMPORTANT: If the prompt asks to approve access to files or directories OUTSIDE the working ` +
|
|
318
|
-
`directory (${taskContext.workdir}), DECLINE the request. Respond with "n" and tell the agent: ` +
|
|
319
|
-
`"That path is outside your workspace. Use ${taskContext.workdir} instead."\n` +
|
|
320
|
-
`- For tool approval prompts (file writes, shell commands), respond "y" or use "keys:enter".\n` +
|
|
321
|
-
`- For Y/n confirmations that align with the original task, respond "y".\n` +
|
|
322
|
-
`- For TUI menus, use "keys:enter" for default or "keys:down,enter" for non-default.\n` +
|
|
323
|
-
`- If the prompt asks for information NOT in the original task, set suggestedResponse to null ` +
|
|
324
|
-
`(this will escalate to the human).\n` +
|
|
325
|
-
`- If a PR was just created, the task is likely done — classify as "task_complete".\n\n` +
|
|
326
|
-
`Respond with ONLY a JSON object:\n` +
|
|
327
|
-
`{"state": "...", "prompt": "...", "suggestedResponse": "..."}`);
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* Combined classify-and-decide for coordinator-managed autonomous sessions.
|
|
331
|
-
*
|
|
332
|
-
* Performs classification AND coordinator-quality response decision in a single
|
|
333
|
-
* LLM call. The suggestedResponse is kept intact (not stripped), so pty-manager
|
|
334
|
-
* auto-responds and the coordinator receives autoResponded: true — skipping
|
|
335
|
-
* the second LLM call in handleBlocked().
|
|
336
|
-
*/
|
|
337
|
-
export async function classifyAndDecideForCoordinator(ctx) {
|
|
338
|
-
const { sessionId, recentOutput, agentType, buffers, traceEntries, runtime, manager, metricsTracker, taskContext, decisionHistory = [], log, } = ctx;
|
|
339
|
-
metricsTracker.incrementStalls(agentType);
|
|
340
|
-
// Buffer fallback — same logic as classifyStallOutput
|
|
341
|
-
let effectiveOutput = recentOutput;
|
|
342
|
-
if (!recentOutput || recentOutput.trim().length < 200) {
|
|
343
|
-
const ourBuffer = buffers.get(sessionId);
|
|
344
|
-
if (ourBuffer && ourBuffer.length > 0) {
|
|
345
|
-
const rawTail = ourBuffer.slice(-100).join("\n");
|
|
346
|
-
const stripped = stripAnsi(rawTail);
|
|
347
|
-
if (stripped.length > effectiveOutput.length) {
|
|
348
|
-
effectiveOutput = stripped;
|
|
349
|
-
log(`Using own buffer for combined classify+decide (${effectiveOutput.length} chars after stripping, pty-manager had ${recentOutput.length})`);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
const { sanitized: sanitizedOutput, removedEchoLines, removedStatusLines, } = sanitizeOutputForClassification(effectiveOutput, ctx.lastSentInput);
|
|
354
|
-
if (removedEchoLines > 0 || removedStatusLines > 0) {
|
|
355
|
-
log(`Sanitized combined stall output for ${sessionId}: removed ${removedEchoLines} echoed lines and ${removedStatusLines} status lines`);
|
|
356
|
-
}
|
|
357
|
-
if (!sanitizedOutput && removedEchoLines + removedStatusLines > 0) {
|
|
358
|
-
log(`Combined classify+decide short-circuit for ${sessionId}: only echoed input / status noise remained`);
|
|
359
|
-
return { state: "still_working" };
|
|
360
|
-
}
|
|
361
|
-
const systemPrompt = buildCombinedClassifyDecidePrompt(agentType, sessionId, sanitizedOutput || effectiveOutput, taskContext, decisionHistory);
|
|
362
|
-
if (ctx.debugSnapshots) {
|
|
363
|
-
await writeStallSnapshot(sessionId, agentType, recentOutput, effectiveOutput, buffers, traceEntries, log);
|
|
364
|
-
}
|
|
365
|
-
try {
|
|
366
|
-
log(`Stall detected for coordinator-managed ${sessionId}, combined classify+decide...`);
|
|
367
|
-
const result = await withTrajectoryContext(runtime, {
|
|
368
|
-
source: "orchestrator",
|
|
369
|
-
decisionType: "stall-classify-decide",
|
|
370
|
-
sessionId,
|
|
371
|
-
taskLabel: taskContext.label,
|
|
372
|
-
repo: taskContext.repo,
|
|
373
|
-
workdir: taskContext.workdir,
|
|
374
|
-
originalTask: taskContext.originalTask,
|
|
375
|
-
}, () => runtime.useModel(ModelType.TEXT_SMALL, { prompt: systemPrompt }));
|
|
376
|
-
const jsonMatch = result.match(/\{[\s\S]*\}/);
|
|
377
|
-
if (!jsonMatch) {
|
|
378
|
-
log(`Combined classify+decide: no JSON in LLM response`);
|
|
379
|
-
return null;
|
|
380
|
-
}
|
|
381
|
-
const parsed = JSON.parse(jsonMatch[0]);
|
|
382
|
-
const validStates = [
|
|
383
|
-
"waiting_for_input",
|
|
384
|
-
"still_working",
|
|
385
|
-
"task_complete",
|
|
386
|
-
"error",
|
|
387
|
-
"tool_running",
|
|
388
|
-
];
|
|
389
|
-
if (!validStates.includes(parsed.state)) {
|
|
390
|
-
log(`Combined classify+decide: invalid state "${parsed.state}"`);
|
|
391
|
-
return null;
|
|
392
|
-
}
|
|
393
|
-
// Same downgrade rationale as classifyStallOutput: the LLM's task_complete
|
|
394
|
-
// guess from buffer text is unreliable on long multi-step tasks. Authoritative
|
|
395
|
-
// completion comes from the agent's hook system (pty-service.handleHookEvent)
|
|
396
|
-
// and the jsonl-based completion watcher in the eliza package.
|
|
397
|
-
let mappedState;
|
|
398
|
-
if (parsed.state === "tool_running" || parsed.state === "task_complete") {
|
|
399
|
-
mappedState = "still_working";
|
|
400
|
-
if (parsed.state === "task_complete") {
|
|
401
|
-
log(`Combined classify+decide for ${sessionId}: LLM said task_complete — downgrading to still_working (authoritative completion comes from hooks)`);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
else {
|
|
405
|
-
mappedState = parsed.state;
|
|
406
|
-
}
|
|
407
|
-
// Deterministic safety guard: if the LLM approved access to a path
|
|
408
|
-
// outside the workspace, override with a decline. This runs before
|
|
409
|
-
// pty-manager auto-responds, so the unsafe approval never reaches the agent.
|
|
410
|
-
if (mappedState === "waiting_for_input" && parsed.suggestedResponse) {
|
|
411
|
-
const promptText = typeof parsed.prompt === "string" ? parsed.prompt : "";
|
|
412
|
-
const responseText = parsed.suggestedResponse.trim().toLowerCase();
|
|
413
|
-
const approving = ["y", "yes", "keys:enter", "keys:down,enter"].includes(responseText);
|
|
414
|
-
const hasAbsPath = /(?:^|[\s"'`])\/[^\s"'`]+/.test(promptText);
|
|
415
|
-
if (approving &&
|
|
416
|
-
hasAbsPath &&
|
|
417
|
-
!promptText.includes(taskContext.workdir)) {
|
|
418
|
-
log(`Combined classify+decide: overriding out-of-scope approval for ${sessionId}`);
|
|
419
|
-
parsed.suggestedResponse = `n — That path is outside your workspace. Use ${taskContext.workdir} instead.`;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
const classification = {
|
|
423
|
-
state: mappedState,
|
|
424
|
-
prompt: parsed.prompt,
|
|
425
|
-
suggestedResponse: parsed.suggestedResponse,
|
|
426
|
-
};
|
|
427
|
-
if (classification.state === "waiting_for_input" &&
|
|
428
|
-
promptLooksLikeFalseBlockedNoise(classification.prompt, ctx.lastSentInput)) {
|
|
429
|
-
log(`Combined classify+decide override for ${sessionId}: prompt looked like echoed input / status noise`);
|
|
430
|
-
return { state: "still_working" };
|
|
431
|
-
}
|
|
432
|
-
log(`Combined classify+decide for ${sessionId}: ${classification.state}${classification.suggestedResponse ? ` → "${classification.suggestedResponse}"` : ""}`);
|
|
433
|
-
if (classification.state === "task_complete") {
|
|
434
|
-
const session = manager?.get(sessionId);
|
|
435
|
-
const durationMs = session?.startedAt
|
|
436
|
-
? Date.now() - new Date(session.startedAt).getTime()
|
|
437
|
-
: 0;
|
|
438
|
-
metricsTracker.recordCompletion(agentType, "classifier", durationMs);
|
|
439
|
-
}
|
|
440
|
-
return classification;
|
|
441
|
-
}
|
|
442
|
-
catch (err) {
|
|
443
|
-
log(`Combined classify+decide failed: ${err}`);
|
|
444
|
-
return null;
|
|
445
|
-
}
|
|
446
|
-
}
|
package/packages/typescript/src/features/orchestrator/services/swarm-coordinator-prompts.d.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prompt construction and response parsing for the Swarm Coordinator's
|
|
3
|
-
* LLM-driven coordination decisions.
|
|
4
|
-
*
|
|
5
|
-
* Pure functions — no side effects, easy to test.
|
|
6
|
-
* Pattern follows stall-classifier.ts:buildStallClassificationPrompt().
|
|
7
|
-
*
|
|
8
|
-
* @module services/swarm-coordinator-prompts
|
|
9
|
-
*/
|
|
10
|
-
/** Per-session task context provided to the LLM for decision-making. */
|
|
11
|
-
export interface TaskContextSummary {
|
|
12
|
-
sessionId: string;
|
|
13
|
-
agentType: string;
|
|
14
|
-
label: string;
|
|
15
|
-
originalTask: string;
|
|
16
|
-
workdir: string;
|
|
17
|
-
repo?: string;
|
|
18
|
-
}
|
|
19
|
-
/** A previous coordination decision, included for context continuity. */
|
|
20
|
-
export interface DecisionHistoryEntry {
|
|
21
|
-
event: string;
|
|
22
|
-
promptText: string;
|
|
23
|
-
action: string;
|
|
24
|
-
response?: string;
|
|
25
|
-
reasoning: string;
|
|
26
|
-
}
|
|
27
|
-
/** Summary of a sibling task in the same swarm — for cross-task context. */
|
|
28
|
-
export interface SiblingTaskSummary {
|
|
29
|
-
label: string;
|
|
30
|
-
agentType: string;
|
|
31
|
-
originalTask: string;
|
|
32
|
-
status: string;
|
|
33
|
-
/** Last significant decision or action taken by this sibling. */
|
|
34
|
-
lastKeyDecision?: string;
|
|
35
|
-
/** Summary of what the sibling accomplished (populated on completion). */
|
|
36
|
-
completionSummary?: string;
|
|
37
|
-
}
|
|
38
|
-
/** A significant creative or architectural decision made by an agent in the swarm. */
|
|
39
|
-
export interface SharedDecision {
|
|
40
|
-
/** Which agent made this decision. */
|
|
41
|
-
agentLabel: string;
|
|
42
|
-
/** Brief description of the decision. */
|
|
43
|
-
summary: string;
|
|
44
|
-
/** When it was recorded. */
|
|
45
|
-
timestamp: number;
|
|
46
|
-
}
|
|
47
|
-
/** Parsed LLM response for a coordination decision. */
|
|
48
|
-
export interface CoordinationLLMResponse {
|
|
49
|
-
action: "respond" | "escalate" | "ignore" | "complete";
|
|
50
|
-
/** Text to send (for action=respond with plain text input). */
|
|
51
|
-
response?: string;
|
|
52
|
-
/** Whether to use sendKeysToSession instead of sendToSession. */
|
|
53
|
-
useKeys?: boolean;
|
|
54
|
-
/** Key sequence to send (for TUI interactions). e.g. ["enter"] or ["down","enter"]. */
|
|
55
|
-
keys?: string[];
|
|
56
|
-
/** LLM's reasoning for the decision. */
|
|
57
|
-
reasoning: string;
|
|
58
|
-
/** Brief summary of a significant creative/architectural decision the agent made, if any. */
|
|
59
|
-
keyDecision?: string;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Build the LLM prompt for making a coordination decision about a blocked agent.
|
|
63
|
-
*/
|
|
64
|
-
export declare function buildCoordinationPrompt(taskCtx: TaskContextSummary, promptText: string, recentOutput: string, decisionHistory: DecisionHistoryEntry[], siblingTasks?: SiblingTaskSummary[], sharedDecisions?: SharedDecision[], swarmContext?: string): string;
|
|
65
|
-
/**
|
|
66
|
-
* Build the LLM prompt for checking on an idle session that hasn't
|
|
67
|
-
* produced any events for a while.
|
|
68
|
-
*/
|
|
69
|
-
export declare function buildIdleCheckPrompt(taskCtx: TaskContextSummary, recentOutput: string, idleMinutes: number, idleCheckNumber: number, maxIdleChecks: number, decisionHistory: DecisionHistoryEntry[], siblingTasks?: SiblingTaskSummary[], sharedDecisions?: SharedDecision[], swarmContext?: string): string;
|
|
70
|
-
/**
|
|
71
|
-
* Build the LLM prompt for assessing whether a completed turn means the
|
|
72
|
-
* overall task is done, or if the agent needs more turns.
|
|
73
|
-
*
|
|
74
|
-
* Called when the adapter detects "task_complete" (agent finished a turn and
|
|
75
|
-
* returned to the idle prompt). The LLM decides whether to stop the session
|
|
76
|
-
* or send a follow-up instruction.
|
|
77
|
-
*/
|
|
78
|
-
export declare function buildTurnCompletePrompt(taskCtx: TaskContextSummary, turnOutput: string, decisionHistory: DecisionHistoryEntry[], siblingTasks?: SiblingTaskSummary[], sharedDecisions?: SharedDecision[], swarmContext?: string): string;
|
|
79
|
-
/**
|
|
80
|
-
* Build a natural language event message describing a blocked agent, intended
|
|
81
|
-
* to be processed by Milaidy's full ElizaOS pipeline (with conversation memory,
|
|
82
|
-
* personality, and actions). Unlike buildCoordinationPrompt(), this omits the
|
|
83
|
-
* "You are Eliza" preamble (she already IS Eliza in the pipeline) and asks
|
|
84
|
-
* for a fenced JSON action block at the end of her response.
|
|
85
|
-
*/
|
|
86
|
-
export declare function buildBlockedEventMessage(taskCtx: TaskContextSummary, promptText: string, recentOutput: string, decisionHistory: DecisionHistoryEntry[], siblingTasks?: SiblingTaskSummary[], sharedDecisions?: SharedDecision[], swarmContext?: string): string;
|
|
87
|
-
/**
|
|
88
|
-
* Build a natural language event message describing a turn completion, intended
|
|
89
|
-
* to be processed by Milaidy's full ElizaOS pipeline.
|
|
90
|
-
*/
|
|
91
|
-
export declare function buildTurnCompleteEventMessage(taskCtx: TaskContextSummary, turnOutput: string, decisionHistory: DecisionHistoryEntry[], siblingTasks?: SiblingTaskSummary[], sharedDecisions?: SharedDecision[], swarmContext?: string): string;
|
|
92
|
-
/**
|
|
93
|
-
* Parse the LLM's coordination response from raw text output.
|
|
94
|
-
* Returns null if the response is invalid or unparseable.
|
|
95
|
-
*/
|
|
96
|
-
export declare function parseCoordinationResponse(llmOutput: string): CoordinationLLMResponse | null;
|
|
97
|
-
//# sourceMappingURL=swarm-coordinator-prompts.d.ts.map
|
package/packages/typescript/src/features/orchestrator/services/swarm-coordinator-prompts.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"swarm-coordinator-prompts.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/swarm-coordinator-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,yEAAyE;AACzE,MAAM,WAAW,oBAAoB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,4EAA4E;AAC5E,MAAM,WAAW,kBAAkB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,sFAAsF;AACtF,MAAM,WAAW,cAAc;IAC9B,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;CAClB;AA+CD,uDAAuD;AACvD,MAAM,WAAW,uBAAuB;IACvC,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;IACvD,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uFAAuF;IACvF,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACtC,OAAO,EAAE,kBAAkB,EAC3B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,oBAAoB,EAAE,EACvC,YAAY,CAAC,EAAE,kBAAkB,EAAE,EACnC,eAAe,CAAC,EAAE,cAAc,EAAE,EAClC,YAAY,CAAC,EAAE,MAAM,GACnB,MAAM,CAiER;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,kBAAkB,EAC3B,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,oBAAoB,EAAE,EACvC,YAAY,CAAC,EAAE,kBAAkB,EAAE,EACnC,eAAe,CAAC,EAAE,cAAc,EAAE,EAClC,YAAY,CAAC,EAAE,MAAM,GACnB,MAAM,CAgER;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACtC,OAAO,EAAE,kBAAkB,EAC3B,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,oBAAoB,EAAE,EACvC,YAAY,CAAC,EAAE,kBAAkB,EAAE,EACnC,eAAe,CAAC,EAAE,cAAc,EAAE,EAClC,YAAY,CAAC,EAAE,MAAM,GACnB,MAAM,CA6CR;AAID;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,kBAAkB,EAC3B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,oBAAoB,EAAE,EACvC,YAAY,CAAC,EAAE,kBAAkB,EAAE,EACnC,eAAe,CAAC,EAAE,cAAc,EAAE,EAClC,YAAY,CAAC,EAAE,MAAM,GACnB,MAAM,CAyCR;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC5C,OAAO,EAAE,kBAAkB,EAC3B,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,oBAAoB,EAAE,EACvC,YAAY,CAAC,EAAE,kBAAkB,EAAE,EACnC,eAAe,CAAC,EAAE,cAAc,EAAE,EAClC,YAAY,CAAC,EAAE,MAAM,GACnB,MAAM,CAwCR;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACxC,SAAS,EAAE,MAAM,GACf,uBAAuB,GAAG,IAAI,CAmChC"}
|