@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,342 +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
|
-
/**
|
|
11
|
-
* Build a context section describing sibling tasks in the same swarm.
|
|
12
|
-
* Helps the coordinator make decisions with awareness of the broader project.
|
|
13
|
-
*/
|
|
14
|
-
function buildSiblingSection(siblings) {
|
|
15
|
-
if (!siblings || siblings.length === 0)
|
|
16
|
-
return "";
|
|
17
|
-
const lines = siblings.map((s) => {
|
|
18
|
-
let line = ` - [${s.status}] "${s.label}" (${s.agentType}): ${s.originalTask}`;
|
|
19
|
-
if (s.completionSummary) {
|
|
20
|
-
line += `\n Result: ${s.completionSummary}`;
|
|
21
|
-
}
|
|
22
|
-
else if (s.lastKeyDecision) {
|
|
23
|
-
line += `\n Latest: ${s.lastKeyDecision}`;
|
|
24
|
-
}
|
|
25
|
-
return line;
|
|
26
|
-
});
|
|
27
|
-
return (`\nOther agents in this swarm:\n` +
|
|
28
|
-
lines.join("\n") +
|
|
29
|
-
`\nUse this context when the agent asks creative or architectural questions — ` +
|
|
30
|
-
`your answer should be consistent with what sibling agents are doing.\n`);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Build a context section describing significant decisions made by other agents.
|
|
34
|
-
* Helps maintain consistency across the swarm regardless of task type.
|
|
35
|
-
*/
|
|
36
|
-
function buildSharedDecisionsSection(decisions) {
|
|
37
|
-
if (!decisions || decisions.length === 0)
|
|
38
|
-
return "";
|
|
39
|
-
return (`\nKey decisions made by other agents in this swarm:\n` +
|
|
40
|
-
decisions
|
|
41
|
-
.slice(-10)
|
|
42
|
-
.map((d) => ` - [${d.agentLabel}] ${d.summary}`)
|
|
43
|
-
.join("\n") +
|
|
44
|
-
`\nAlign with these decisions for consistency — don't contradict them unless the task requires it.\n`);
|
|
45
|
-
}
|
|
46
|
-
/** Build a project context section from the swarm planning phase. */
|
|
47
|
-
function buildSwarmContextSection(swarmContext) {
|
|
48
|
-
if (!swarmContext)
|
|
49
|
-
return "";
|
|
50
|
-
return `\nProject context (from planning phase):\n${swarmContext}\n`;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Build the LLM prompt for making a coordination decision about a blocked agent.
|
|
54
|
-
*/
|
|
55
|
-
export function buildCoordinationPrompt(taskCtx, promptText, recentOutput, decisionHistory, siblingTasks, sharedDecisions, swarmContext) {
|
|
56
|
-
const historySection = decisionHistory.length > 0
|
|
57
|
-
? `\nPrevious decisions for this session:\n${decisionHistory
|
|
58
|
-
.slice(-5)
|
|
59
|
-
.map((d, i) => ` ${i + 1}. [${d.event}] prompt="${d.promptText}" → ${d.action}${d.response ? ` ("${d.response}")` : ""} — ${d.reasoning}`)
|
|
60
|
-
.join("\n")}\n`
|
|
61
|
-
: "";
|
|
62
|
-
return (`You are Eliza, an AI orchestrator managing a swarm of task agents. ` +
|
|
63
|
-
`A ${taskCtx.agentType} task agent ("${taskCtx.label}", session: ${taskCtx.sessionId}) ` +
|
|
64
|
-
`is blocked and waiting for input.\n\n` +
|
|
65
|
-
`Original task: "${taskCtx.originalTask}"\n` +
|
|
66
|
-
`Working directory: ${taskCtx.workdir}\n` +
|
|
67
|
-
`Repository: ${taskCtx.repo ?? "none (scratch directory)"}\n` +
|
|
68
|
-
buildSwarmContextSection(swarmContext) +
|
|
69
|
-
buildSiblingSection(siblingTasks) +
|
|
70
|
-
buildSharedDecisionsSection(sharedDecisions) +
|
|
71
|
-
historySection +
|
|
72
|
-
`\nRecent terminal output (last 50 lines):\n` +
|
|
73
|
-
`---\n${recentOutput.slice(-3000)}\n---\n\n` +
|
|
74
|
-
`The agent is showing this blocking prompt:\n` +
|
|
75
|
-
`"${promptText}"\n\n` +
|
|
76
|
-
`Decide how to respond. Your options:\n\n` +
|
|
77
|
-
`1. "respond" — Send a response to unblock the agent. For text prompts (Y/n, questions), ` +
|
|
78
|
-
`set "response" to the text to send. For TUI menus or interactive prompts that need ` +
|
|
79
|
-
`special keys, set "useKeys": true and "keys" to the key sequence ` +
|
|
80
|
-
`(e.g. ["enter"], ["down","enter"], ["y","enter"]).\n\n` +
|
|
81
|
-
`2. "complete" — The original task has been fulfilled. The agent has finished its work ` +
|
|
82
|
-
`(e.g. code written, PR created, tests passed) and is back at the idle prompt. ` +
|
|
83
|
-
`Use this when the terminal output shows the task objectives have been met.\n\n` +
|
|
84
|
-
`3. "escalate" — The prompt requires human judgment (e.g. design decisions, ` +
|
|
85
|
-
`ambiguous requirements, security-sensitive actions). Do NOT respond yourself.\n\n` +
|
|
86
|
-
`4. "ignore" — The prompt is not actually blocking or is already being handled.\n\n` +
|
|
87
|
-
`Guidelines:\n` +
|
|
88
|
-
`- IMPORTANT: If the prompt asks to approve access to files or directories OUTSIDE the working ` +
|
|
89
|
-
`directory (${taskCtx.workdir}), DECLINE the request and REDIRECT the agent. Do NOT approve ` +
|
|
90
|
-
`access to paths like /etc, ~/.ssh, ~/, /tmp, or any path that doesn't start with the working ` +
|
|
91
|
-
`directory. Instead, respond with "n" (or the decline option) and tell the agent: ` +
|
|
92
|
-
`"That path is outside your workspace. Use ${taskCtx.workdir} instead — ` +
|
|
93
|
-
`create any files or directories you need there." This keeps the agent moving without ` +
|
|
94
|
-
`granting out-of-scope access. The coordinator will also notify the human in case ` +
|
|
95
|
-
`broader access was intended.\n` +
|
|
96
|
-
`- For tool approval prompts (file writes, shell commands, etc.), respond "y" or use keys:["enter"] to approve.\n` +
|
|
97
|
-
`- For Y/n confirmations that align with the original task, respond "y".\n` +
|
|
98
|
-
`- For design questions or choices that could go either way, escalate.\n` +
|
|
99
|
-
`- For error recovery prompts, try to respond if the path forward is clear.\n` +
|
|
100
|
-
`- If the output shows a PR was just created (e.g. "Created pull request #N"), use "complete" — the task is done.\n` +
|
|
101
|
-
`- If the agent is asking for information that was NOT provided in the original task ` +
|
|
102
|
-
`(e.g. which repository to use, project requirements, credentials), ESCALATE. ` +
|
|
103
|
-
`The coordinator does not have this information — the human must provide it.\n` +
|
|
104
|
-
`- When in doubt, escalate — it's better to ask the human than to make a wrong choice.\n` +
|
|
105
|
-
`- If the agent's output reveals a significant decision that sibling agents should know about ` +
|
|
106
|
-
`(e.g. chose a library, designed an API shape, picked a UI pattern, established a writing style, ` +
|
|
107
|
-
`narrowed a research scope, made any choice that affects the shared project), ` +
|
|
108
|
-
`include "keyDecision" with a brief one-line summary. Skip this for routine tool approvals.\n` +
|
|
109
|
-
`- Look for explicit "DECISION:" markers in the agent's output — these are the agent deliberately ` +
|
|
110
|
-
`surfacing design choices. Always capture these as keyDecision.\n\n` +
|
|
111
|
-
`Respond with ONLY a JSON object:\n` +
|
|
112
|
-
`{"action": "respond|complete|escalate|ignore", "response": "...", "useKeys": false, "keys": [], "reasoning": "...", "keyDecision": "..."}`);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Build the LLM prompt for checking on an idle session that hasn't
|
|
116
|
-
* produced any events for a while.
|
|
117
|
-
*/
|
|
118
|
-
export function buildIdleCheckPrompt(taskCtx, recentOutput, idleMinutes, idleCheckNumber, maxIdleChecks, decisionHistory, siblingTasks, sharedDecisions, swarmContext) {
|
|
119
|
-
const historySection = decisionHistory.length > 0
|
|
120
|
-
? `\nPrevious decisions for this session:\n${decisionHistory
|
|
121
|
-
.slice(-5)
|
|
122
|
-
.map((d, i) => ` ${i + 1}. [${d.event}] prompt="${d.promptText}" → ${d.action}${d.response ? ` ("${d.response}")` : ""} — ${d.reasoning}`)
|
|
123
|
-
.join("\n")}\n`
|
|
124
|
-
: "";
|
|
125
|
-
return (`You are Eliza, an AI orchestrator managing a swarm of task agents. ` +
|
|
126
|
-
`A ${taskCtx.agentType} task agent ("${taskCtx.label}", session: ${taskCtx.sessionId}) ` +
|
|
127
|
-
`has been idle for ${idleMinutes} minutes with no events or output changes.\n\n` +
|
|
128
|
-
`Original task: "${taskCtx.originalTask}"\n` +
|
|
129
|
-
`Working directory: ${taskCtx.workdir}\n` +
|
|
130
|
-
`Repository: ${taskCtx.repo ?? "none (scratch directory)"}\n` +
|
|
131
|
-
`Idle check: ${idleCheckNumber} of ${maxIdleChecks} (session will be force-escalated after ${maxIdleChecks})\n` +
|
|
132
|
-
buildSwarmContextSection(swarmContext) +
|
|
133
|
-
buildSiblingSection(siblingTasks) +
|
|
134
|
-
buildSharedDecisionsSection(sharedDecisions) +
|
|
135
|
-
historySection +
|
|
136
|
-
`\nRecent terminal output (last 50 lines):\n` +
|
|
137
|
-
`---\n${recentOutput.slice(-3000)}\n---\n\n` +
|
|
138
|
-
`The session has gone silent. Analyze the terminal output and decide:\n\n` +
|
|
139
|
-
`1. "complete" — The task is FULLY done. ALL objectives in the original task were met ` +
|
|
140
|
-
`AND the final deliverable is visible in the output (e.g. a PR URL was printed, or the ` +
|
|
141
|
-
`task explicitly did not require a PR). The agent is back at the idle prompt.\n\n` +
|
|
142
|
-
`2. "respond" — The agent appears stuck or waiting for input that wasn't detected ` +
|
|
143
|
-
`as a blocking prompt. Send a message to nudge it (e.g. "continue", or answer a question ` +
|
|
144
|
-
`visible in the output). If code was committed but no PR was created yet, respond with ` +
|
|
145
|
-
`"please create a pull request with your changes" or similar.\n\n` +
|
|
146
|
-
`3. "escalate" — Something looks wrong or unclear. The human should review.\n\n` +
|
|
147
|
-
`4. "ignore" — The agent is still actively working (e.g. compiling, running tests, ` +
|
|
148
|
-
`pushing to remote, creating a PR). The idle period is expected and it will produce output soon.\n\n` +
|
|
149
|
-
`Guidelines:\n` +
|
|
150
|
-
`- IMPORTANT: Do NOT mark "complete" if the original task involves creating a PR and no PR URL ` +
|
|
151
|
-
`(e.g. github.com/...pull/...) appears in the output. Instead use "respond" to nudge the agent ` +
|
|
152
|
-
`to create the PR.\n` +
|
|
153
|
-
`- Do NOT mark "complete" just because code was committed — commits alone don't finish a task ` +
|
|
154
|
-
`that requires a PR.\n` +
|
|
155
|
-
`- Network operations (git push, gh pr create, API calls) can cause several minutes of silence — ` +
|
|
156
|
-
`prefer "ignore" for early idle checks if the agent was mid-workflow.\n` +
|
|
157
|
-
`- If the output ends with a command prompt ($ or >) and ALL task objectives are confirmed met, use "complete".\n` +
|
|
158
|
-
`- If the output shows an error or the agent seems stuck in a loop, escalate.\n` +
|
|
159
|
-
`- If the agent is clearly mid-operation (build output, test runner, git operations), use "ignore".\n` +
|
|
160
|
-
`- On check ${idleCheckNumber} of ${maxIdleChecks} — if unsure, lean toward "respond" with a nudge rather than "complete".\n` +
|
|
161
|
-
`- If the agent's output reveals a significant creative or architectural decision, ` +
|
|
162
|
-
`include "keyDecision" with a brief one-line summary.\n` +
|
|
163
|
-
`- Look for explicit "DECISION:" markers in the agent's output — always capture these as keyDecision.\n\n` +
|
|
164
|
-
// CRITICAL constraint on the `response` field — fixes a real bug
|
|
165
|
-
// where LLMs produced 3rd-person status reports that then got
|
|
166
|
-
// piped verbatim into the agent's stdin as if the user typed them.
|
|
167
|
-
`CRITICAL — "response" field format rules:\n` +
|
|
168
|
-
`- When action is "respond", the "response" string is sent VERBATIM into the agent's terminal as if the user typed it.\n` +
|
|
169
|
-
`- It MUST be a brief, second-person imperative addressed directly to the agent. Examples: "continue", "please create the pull request", "answer the question above", "proceed with the next step".\n` +
|
|
170
|
-
`- NEVER write a third-person status report about the agent. Do NOT write things like "The agent is still setting up" or "The agent needs to continue its work" — that text would be piped into the agent's stdin and confuse it into thinking a new user message arrived describing itself.\n` +
|
|
171
|
-
`- NEVER describe the situation in the response field. If you need to explain your reasoning, put it in the "reasoning" field instead.\n` +
|
|
172
|
-
`- Keep the response under 20 words when possible. Short nudges work best.\n\n` +
|
|
173
|
-
`Respond with ONLY a JSON object:\n` +
|
|
174
|
-
`{"action": "respond|complete|escalate|ignore", "response": "...", "useKeys": false, "keys": [], "reasoning": "...", "keyDecision": "..."}`);
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Build the LLM prompt for assessing whether a completed turn means the
|
|
178
|
-
* overall task is done, or if the agent needs more turns.
|
|
179
|
-
*
|
|
180
|
-
* Called when the adapter detects "task_complete" (agent finished a turn and
|
|
181
|
-
* returned to the idle prompt). The LLM decides whether to stop the session
|
|
182
|
-
* or send a follow-up instruction.
|
|
183
|
-
*/
|
|
184
|
-
export function buildTurnCompletePrompt(taskCtx, turnOutput, decisionHistory, siblingTasks, sharedDecisions, swarmContext) {
|
|
185
|
-
const historySection = decisionHistory.length > 0
|
|
186
|
-
? `\nPrevious decisions for this session:\n${decisionHistory
|
|
187
|
-
.slice(-5)
|
|
188
|
-
.map((d, i) => ` ${i + 1}. [${d.event}] prompt="${d.promptText}" → ${d.action}${d.response ? ` ("${d.response}")` : ""} — ${d.reasoning}`)
|
|
189
|
-
.join("\n")}\n`
|
|
190
|
-
: "";
|
|
191
|
-
return (`You are Eliza, an AI orchestrator managing a swarm of task agents. ` +
|
|
192
|
-
`A ${taskCtx.agentType} task agent ("${taskCtx.label}", session: ${taskCtx.sessionId}) ` +
|
|
193
|
-
`just finished a turn and is back at the idle prompt waiting for input.\n\n` +
|
|
194
|
-
`Original task: "${taskCtx.originalTask}"\n` +
|
|
195
|
-
`Working directory: ${taskCtx.workdir}\n` +
|
|
196
|
-
`Repository: ${taskCtx.repo ?? "none (scratch directory)"}\n` +
|
|
197
|
-
buildSwarmContextSection(swarmContext) +
|
|
198
|
-
buildSiblingSection(siblingTasks) +
|
|
199
|
-
buildSharedDecisionsSection(sharedDecisions) +
|
|
200
|
-
historySection +
|
|
201
|
-
`\nOutput from this turn:\n` +
|
|
202
|
-
`---\n${turnOutput.slice(-3000)}\n---\n\n` +
|
|
203
|
-
`The agent completed a turn. Decide if the task is done or needs more work.\n\n` +
|
|
204
|
-
`Options:\n` +
|
|
205
|
-
`1. "complete" — The task objectives have been met.\n` +
|
|
206
|
-
` - For repo tasks: ONLY when a PR creation signal appears ("Created pull request #N"). ` +
|
|
207
|
-
`A generic "done" or "finished" statement is NOT sufficient for repo tasks — a PR must exist.\n` +
|
|
208
|
-
` - For scratch/research tasks (no repo): when the agent has produced its deliverable.\n` +
|
|
209
|
-
`2. "respond" — The agent needs to do more work.\n` +
|
|
210
|
-
`3. "escalate" — Something is wrong. Let the human decide.\n` +
|
|
211
|
-
`4. "ignore" — The agent is still working (e.g., spinner text like "Germinating...", "Frosting..."). ` +
|
|
212
|
-
`Wait for the next turn.\n\n` +
|
|
213
|
-
`CRITICAL RULES:\n` +
|
|
214
|
-
`- For repo tasks: use "complete" ONLY when "Created pull request #N" appears in output.\n` +
|
|
215
|
-
`- For scratch/research tasks: use "complete" when the agent delivers its output.\n` +
|
|
216
|
-
`- Do NOT ask the agent to review, verify, or re-check work it already completed.\n` +
|
|
217
|
-
`- If output is only spinner text, use "ignore" and wait for the next turn.\n` +
|
|
218
|
-
`- Use "respond" when the agent hasn't started, or when code was written but not yet committed/pushed/PR'd.\n\n` +
|
|
219
|
-
`If the agent's output reveals a significant decision, include "keyDecision" with a brief summary.\n\n` +
|
|
220
|
-
`Respond with ONLY a JSON object:\n` +
|
|
221
|
-
`{"action": "respond|complete|escalate|ignore", "response": "...", "useKeys": false, "keys": [], "reasoning": "...", "keyDecision": "..."}`);
|
|
222
|
-
}
|
|
223
|
-
// ─── Event Messages for Milaidy Pipeline ───
|
|
224
|
-
/**
|
|
225
|
-
* Build a natural language event message describing a blocked agent, intended
|
|
226
|
-
* to be processed by Milaidy's full ElizaOS pipeline (with conversation memory,
|
|
227
|
-
* personality, and actions). Unlike buildCoordinationPrompt(), this omits the
|
|
228
|
-
* "You are Eliza" preamble (she already IS Eliza in the pipeline) and asks
|
|
229
|
-
* for a fenced JSON action block at the end of her response.
|
|
230
|
-
*/
|
|
231
|
-
export function buildBlockedEventMessage(taskCtx, promptText, recentOutput, decisionHistory, siblingTasks, sharedDecisions, swarmContext) {
|
|
232
|
-
const historySection = decisionHistory.length > 0
|
|
233
|
-
? `\nPrevious decisions:\n${decisionHistory
|
|
234
|
-
.slice(-5)
|
|
235
|
-
.map((d, i) => ` ${i + 1}. [${d.event}] "${d.promptText}" → ${d.action}${d.response ? ` ("${d.response}")` : ""} — ${d.reasoning}`)
|
|
236
|
-
.join("\n")}\n`
|
|
237
|
-
: "";
|
|
238
|
-
return (`[Task Agent Event] A ${taskCtx.agentType} agent ("${taskCtx.label}") is blocked and waiting for input.\n\n` +
|
|
239
|
-
`Task: "${taskCtx.originalTask}"\n` +
|
|
240
|
-
`Workdir: ${taskCtx.workdir}\n` +
|
|
241
|
-
`Repo: ${taskCtx.repo ?? "none (scratch directory)"}\n` +
|
|
242
|
-
buildSwarmContextSection(swarmContext) +
|
|
243
|
-
buildSiblingSection(siblingTasks) +
|
|
244
|
-
buildSharedDecisionsSection(sharedDecisions) +
|
|
245
|
-
historySection +
|
|
246
|
-
`\nRecent terminal output:\n---\n${recentOutput.slice(-3000)}\n---\n\n` +
|
|
247
|
-
`Blocking prompt: "${promptText}"\n\n` +
|
|
248
|
-
`Decide how to handle this. Options:\n` +
|
|
249
|
-
`- "respond" — send text or keys to unblock the agent\n` +
|
|
250
|
-
`- "complete" — the task is fully done\n` +
|
|
251
|
-
`- "escalate" — you need the user's input\n` +
|
|
252
|
-
`- "ignore" — not actually blocking\n\n` +
|
|
253
|
-
`Guidelines:\n` +
|
|
254
|
-
`- For tool approvals / Y/n that align with the task, respond "y" or keys:["enter"].\n` +
|
|
255
|
-
`- If the prompt asks for info NOT in the original task, escalate.\n` +
|
|
256
|
-
`- Decline access to paths outside ${taskCtx.workdir}.\n` +
|
|
257
|
-
`- If a PR was just created, the task is done — use "complete".\n` +
|
|
258
|
-
`- When in doubt, escalate.\n\n` +
|
|
259
|
-
`If the agent's output reveals a significant decision that sibling agents should know about, include "keyDecision" with a brief summary.\n` +
|
|
260
|
-
`Look for explicit "DECISION:" markers in the agent's output — always capture these as keyDecision.\n\n` +
|
|
261
|
-
`Include a JSON action block at the end of your response:\n` +
|
|
262
|
-
"```json\n" +
|
|
263
|
-
`{"action": "respond|complete|escalate|ignore", "response": "...", "useKeys": false, "keys": [], "reasoning": "...", "keyDecision": "..."}\n` +
|
|
264
|
-
"```");
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Build a natural language event message describing a turn completion, intended
|
|
268
|
-
* to be processed by Milaidy's full ElizaOS pipeline.
|
|
269
|
-
*/
|
|
270
|
-
export function buildTurnCompleteEventMessage(taskCtx, turnOutput, decisionHistory, siblingTasks, sharedDecisions, swarmContext) {
|
|
271
|
-
const historySection = decisionHistory.length > 0
|
|
272
|
-
? `\nPrevious decisions:\n${decisionHistory
|
|
273
|
-
.slice(-5)
|
|
274
|
-
.map((d, i) => ` ${i + 1}. [${d.event}] "${d.promptText}" → ${d.action}${d.response ? ` ("${d.response}")` : ""} — ${d.reasoning}`)
|
|
275
|
-
.join("\n")}\n`
|
|
276
|
-
: "";
|
|
277
|
-
return (`[Task Agent Event] A ${taskCtx.agentType} agent ("${taskCtx.label}") just finished a turn and is idle.\n\n` +
|
|
278
|
-
`Task: "${taskCtx.originalTask}"\n` +
|
|
279
|
-
`Workdir: ${taskCtx.workdir}\n` +
|
|
280
|
-
`Repo: ${taskCtx.repo ?? "none (scratch directory)"}\n` +
|
|
281
|
-
buildSwarmContextSection(swarmContext) +
|
|
282
|
-
buildSiblingSection(siblingTasks) +
|
|
283
|
-
buildSharedDecisionsSection(sharedDecisions) +
|
|
284
|
-
historySection +
|
|
285
|
-
`\nTurn output:\n---\n${turnOutput.slice(-3000)}\n---\n\n` +
|
|
286
|
-
`Decide if the overall task is done or if the agent needs more work.\n\n` +
|
|
287
|
-
`Options:\n` +
|
|
288
|
-
`- "respond" — send a follow-up instruction (DEFAULT for intermediate steps)\n` +
|
|
289
|
-
`- "complete" — For repo tasks: ONLY when "Created pull request #N" appears. ` +
|
|
290
|
-
`For scratch/research tasks: when the agent delivers its output.\n` +
|
|
291
|
-
`- "escalate" — something looks wrong, ask the user\n` +
|
|
292
|
-
`- "ignore" — spinner/loading output, agent still working\n\n` +
|
|
293
|
-
`Guidelines:\n` +
|
|
294
|
-
`- For repo tasks, a generic "done" is NOT enough — require a PR creation signal.\n` +
|
|
295
|
-
`- If code was written but not committed/pushed/PR'd, respond with next step.\n` +
|
|
296
|
-
`- Do NOT ask the agent to re-verify work it already completed.\n` +
|
|
297
|
-
`- If the agent's output reveals a significant creative or architectural decision, include "keyDecision" with a brief summary.\n` +
|
|
298
|
-
`- Look for explicit "DECISION:" markers in the agent's output — always capture these as keyDecision.\n\n` +
|
|
299
|
-
`Include a JSON action block at the end of your response:\n` +
|
|
300
|
-
"```json\n" +
|
|
301
|
-
`{"action": "respond|complete|escalate|ignore", "response": "...", "useKeys": false, "keys": [], "reasoning": "...", "keyDecision": "..."}\n` +
|
|
302
|
-
"```");
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Parse the LLM's coordination response from raw text output.
|
|
306
|
-
* Returns null if the response is invalid or unparseable.
|
|
307
|
-
*/
|
|
308
|
-
export function parseCoordinationResponse(llmOutput) {
|
|
309
|
-
const jsonMatch = llmOutput.match(/\{[\s\S]*\}/);
|
|
310
|
-
if (!jsonMatch)
|
|
311
|
-
return null;
|
|
312
|
-
try {
|
|
313
|
-
const parsed = JSON.parse(jsonMatch[0]);
|
|
314
|
-
const validActions = ["respond", "escalate", "ignore", "complete"];
|
|
315
|
-
if (!validActions.includes(parsed.action))
|
|
316
|
-
return null;
|
|
317
|
-
const result = {
|
|
318
|
-
action: parsed.action,
|
|
319
|
-
reasoning: parsed.reasoning || "No reasoning provided",
|
|
320
|
-
};
|
|
321
|
-
if (parsed.action === "respond") {
|
|
322
|
-
if (parsed.useKeys && Array.isArray(parsed.keys)) {
|
|
323
|
-
result.useKeys = true;
|
|
324
|
-
result.keys = parsed.keys.map(String);
|
|
325
|
-
}
|
|
326
|
-
else if (typeof parsed.response === "string") {
|
|
327
|
-
result.response = parsed.response;
|
|
328
|
-
}
|
|
329
|
-
else {
|
|
330
|
-
// respond action but no response or keys — invalid
|
|
331
|
-
return null;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
if (typeof parsed.keyDecision === "string" && parsed.keyDecision.trim()) {
|
|
335
|
-
result.keyDecision = parsed.keyDecision.trim().slice(0, 240);
|
|
336
|
-
}
|
|
337
|
-
return result;
|
|
338
|
-
}
|
|
339
|
-
catch {
|
|
340
|
-
return null;
|
|
341
|
-
}
|
|
342
|
-
}
|