@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,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event Triage — classifies coordinator events as "routine" or "creative"
|
|
3
|
-
* to route them to the fast small-LLM path or the full Milaidy pipeline.
|
|
4
|
-
*
|
|
5
|
-
* Tier 1 (auto-response rules at PTY worker) already handled before we get here.
|
|
6
|
-
* This module splits the remaining events into:
|
|
7
|
-
* - "routine": simple approvals, permissions, config prompts → small LLM (~1-2s)
|
|
8
|
-
* - "creative": error recovery, design questions, task evaluation → Milaidy (~5-10s)
|
|
9
|
-
*
|
|
10
|
-
* Pure functions — no side effects, same pattern as stall-classifier.ts.
|
|
11
|
-
*
|
|
12
|
-
* @module services/swarm-event-triage
|
|
13
|
-
*/
|
|
14
|
-
import { type IAgentRuntime } from "@elizaos/core";
|
|
15
|
-
export type TriageTier = "routine" | "creative";
|
|
16
|
-
export interface TriageContext {
|
|
17
|
-
/** "blocked" or "turn_complete" */
|
|
18
|
-
eventType: "blocked" | "turn_complete";
|
|
19
|
-
/** The blocking prompt text (empty for turn completions). */
|
|
20
|
-
promptText: string;
|
|
21
|
-
/** Adapter's promptInfo.type if available. */
|
|
22
|
-
promptType?: string;
|
|
23
|
-
/** Recent terminal output (for turn completions). */
|
|
24
|
-
recentOutput?: string;
|
|
25
|
-
/** The original task description. */
|
|
26
|
-
originalTask: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Classify an event tier using only heuristics (prompt type + regex).
|
|
30
|
-
* Returns null if inconclusive.
|
|
31
|
-
*/
|
|
32
|
-
export declare function classifyByHeuristic(ctx: TriageContext): TriageTier | null;
|
|
33
|
-
/**
|
|
34
|
-
* Build a short classifier prompt for ambiguous events.
|
|
35
|
-
*/
|
|
36
|
-
export declare function buildTriagePrompt(ctx: TriageContext): string;
|
|
37
|
-
/**
|
|
38
|
-
* Parse the LLM's triage response. Returns null on failure.
|
|
39
|
-
*/
|
|
40
|
-
export declare function parseTriageResponse(llmOutput: string): TriageTier | null;
|
|
41
|
-
/**
|
|
42
|
-
* Main entry point: classify an event as routine or creative.
|
|
43
|
-
*
|
|
44
|
-
* 1. Heuristics (0ms)
|
|
45
|
-
* 2. Small LLM classifier (~500ms-1s) if heuristics are inconclusive
|
|
46
|
-
* 3. Default to "creative" if classifier fails (safe default)
|
|
47
|
-
*/
|
|
48
|
-
export declare function classifyEventTier(runtime: IAgentRuntime, ctx: TriageContext, log: (msg: string) => void): Promise<TriageTier>;
|
|
49
|
-
//# sourceMappingURL=swarm-event-triage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"swarm-event-triage.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/swarm-event-triage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,eAAe,CAAC;AAK9D,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAEhD,MAAM,WAAW,aAAa;IAC7B,mCAAmC;IACnC,SAAS,EAAE,SAAS,GAAG,eAAe,CAAC;IACvC,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,YAAY,EAAE,MAAM,CAAC;CACrB;AAmED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,UAAU,GAAG,IAAI,CAiCzE;AAID;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAc5D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAaxE;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,aAAa,EACtB,GAAG,EAAE,aAAa,EAClB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GACxB,OAAO,CAAC,UAAU,CAAC,CA4BrB"}
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event Triage — classifies coordinator events as "routine" or "creative"
|
|
3
|
-
* to route them to the fast small-LLM path or the full Milaidy pipeline.
|
|
4
|
-
*
|
|
5
|
-
* Tier 1 (auto-response rules at PTY worker) already handled before we get here.
|
|
6
|
-
* This module splits the remaining events into:
|
|
7
|
-
* - "routine": simple approvals, permissions, config prompts → small LLM (~1-2s)
|
|
8
|
-
* - "creative": error recovery, design questions, task evaluation → Milaidy (~5-10s)
|
|
9
|
-
*
|
|
10
|
-
* Pure functions — no side effects, same pattern as stall-classifier.ts.
|
|
11
|
-
*
|
|
12
|
-
* @module services/swarm-event-triage
|
|
13
|
-
*/
|
|
14
|
-
import { ModelType } from "@elizaos/core";
|
|
15
|
-
import { withTrajectoryContext } from "./trajectory-context.js";
|
|
16
|
-
// ─── Heuristic Sets ───
|
|
17
|
-
/** Prompt types from coding-agent-adapters that are always routine. */
|
|
18
|
-
const ROUTINE_PROMPT_TYPES = new Set([
|
|
19
|
-
"permission",
|
|
20
|
-
"config",
|
|
21
|
-
"tos",
|
|
22
|
-
"tool_wait",
|
|
23
|
-
]);
|
|
24
|
-
/** Prompt types that always need creative/contextual handling. */
|
|
25
|
-
const CREATIVE_PROMPT_TYPES = new Set(["project_select", "model_select"]);
|
|
26
|
-
/** Regex patterns that indicate routine approval prompts. */
|
|
27
|
-
const ROUTINE_PATTERNS = [
|
|
28
|
-
/\bAllow\s+tool\b/i,
|
|
29
|
-
/\(Y\/n\)/,
|
|
30
|
-
/\(y\/N\)/,
|
|
31
|
-
/\bTrust\s+(this\s+)?directory\b/i,
|
|
32
|
-
/\bProceed\?/i,
|
|
33
|
-
/\boverwrite\?/i,
|
|
34
|
-
/\bDo you trust\b/i,
|
|
35
|
-
/\bAllow access\b/i,
|
|
36
|
-
/\bGrant permission\b/i,
|
|
37
|
-
/\bAccept\?/i,
|
|
38
|
-
/\bContinue\?/i,
|
|
39
|
-
/\bPermit\b.*\?/i,
|
|
40
|
-
/\bApprove\b.*\?/i,
|
|
41
|
-
];
|
|
42
|
-
/** Regex patterns that indicate creative / contextual decision needed. */
|
|
43
|
-
const CREATIVE_PATTERNS = [
|
|
44
|
-
/\bWhich approach\b/i,
|
|
45
|
-
/\bHow should\b/i,
|
|
46
|
-
/\btests? failing\b/i,
|
|
47
|
-
/\bchoose between\b/i,
|
|
48
|
-
/\bpick (one|a|an)\b/i,
|
|
49
|
-
/\bWhat do you (want|think)\b/i,
|
|
50
|
-
/\berror recover/i,
|
|
51
|
-
/\bfailed with\b/i,
|
|
52
|
-
/\bcompilation error/i,
|
|
53
|
-
/\bbuild failed\b/i,
|
|
54
|
-
/\btype error/i,
|
|
55
|
-
/\bmerge conflict/i,
|
|
56
|
-
];
|
|
57
|
-
/** Turn-complete output patterns that are obviously terminal (routine). */
|
|
58
|
-
const TERMINAL_OUTPUT_PATTERNS = [
|
|
59
|
-
/All \d+ tests? pass/i,
|
|
60
|
-
/Tests?:\s+\d+ passed/i,
|
|
61
|
-
/✓ All checks passed/i,
|
|
62
|
-
/https:\/\/github\.com\/[^\s]+\/pull\/\d+/,
|
|
63
|
-
/Successfully created PR/i,
|
|
64
|
-
/Commit [a-f0-9]{7,40}/i,
|
|
65
|
-
];
|
|
66
|
-
/** Turn-complete output patterns that are obviously intermediate (routine → continue). */
|
|
67
|
-
const INTERMEDIATE_OUTPUT_PATTERNS = [
|
|
68
|
-
/^Running tests?\.\.\./im,
|
|
69
|
-
/^Building\.\.\./im,
|
|
70
|
-
/^Installing dependencies/im,
|
|
71
|
-
];
|
|
72
|
-
// ─── Heuristic Classifier ───
|
|
73
|
-
/**
|
|
74
|
-
* Classify an event tier using only heuristics (prompt type + regex).
|
|
75
|
-
* Returns null if inconclusive.
|
|
76
|
-
*/
|
|
77
|
-
export function classifyByHeuristic(ctx) {
|
|
78
|
-
// 1. Check adapter-provided prompt type
|
|
79
|
-
if (ctx.promptType) {
|
|
80
|
-
if (ROUTINE_PROMPT_TYPES.has(ctx.promptType))
|
|
81
|
-
return "routine";
|
|
82
|
-
if (CREATIVE_PROMPT_TYPES.has(ctx.promptType))
|
|
83
|
-
return "creative";
|
|
84
|
-
}
|
|
85
|
-
// 2. For blocked events, check prompt text patterns
|
|
86
|
-
if (ctx.eventType === "blocked" && ctx.promptText) {
|
|
87
|
-
const hasRoutine = ROUTINE_PATTERNS.some((r) => r.test(ctx.promptText));
|
|
88
|
-
const hasCreative = CREATIVE_PATTERNS.some((r) => r.test(ctx.promptText));
|
|
89
|
-
if (hasRoutine && !hasCreative)
|
|
90
|
-
return "routine";
|
|
91
|
-
if (hasCreative && !hasRoutine)
|
|
92
|
-
return "creative";
|
|
93
|
-
// Both or neither → inconclusive
|
|
94
|
-
if (hasCreative)
|
|
95
|
-
return "creative"; // creative wins ties
|
|
96
|
-
}
|
|
97
|
-
// 3. For turn completions, check output patterns
|
|
98
|
-
if (ctx.eventType === "turn_complete" && ctx.recentOutput) {
|
|
99
|
-
const recentOutput = ctx.recentOutput;
|
|
100
|
-
const isTerminal = TERMINAL_OUTPUT_PATTERNS.some((r) => r.test(recentOutput));
|
|
101
|
-
const isIntermediate = INTERMEDIATE_OUTPUT_PATTERNS.some((r) => r.test(recentOutput));
|
|
102
|
-
if (isTerminal || isIntermediate)
|
|
103
|
-
return "routine";
|
|
104
|
-
// For turn completions, bias toward creative — most benefit from task context
|
|
105
|
-
}
|
|
106
|
-
return null; // Inconclusive — needs LLM classifier
|
|
107
|
-
}
|
|
108
|
-
// ─── LLM Classifier ───
|
|
109
|
-
/**
|
|
110
|
-
* Build a short classifier prompt for ambiguous events.
|
|
111
|
-
*/
|
|
112
|
-
export function buildTriagePrompt(ctx) {
|
|
113
|
-
const eventDesc = ctx.eventType === "blocked"
|
|
114
|
-
? `BLOCKED prompt: "${ctx.promptText.slice(0, 300)}"`
|
|
115
|
-
: `TURN COMPLETE. Recent output:\n${(ctx.recentOutput ?? "").slice(-500)}`;
|
|
116
|
-
return (`Classify this task-agent event as "routine" or "creative".\n\n` +
|
|
117
|
-
`Task: ${ctx.originalTask.slice(0, 200)}\n` +
|
|
118
|
-
`Event: ${eventDesc}\n\n` +
|
|
119
|
-
`"routine" = simple approval, permission, config, yes/no, tool consent, obvious pass/fail.\n` +
|
|
120
|
-
`"creative" = needs task context, error recovery, design choice, ambiguous situation, approach selection.\n\n` +
|
|
121
|
-
`Respond with ONLY a JSON object: {"tier": "routine"} or {"tier": "creative"}`);
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Parse the LLM's triage response. Returns null on failure.
|
|
125
|
-
*/
|
|
126
|
-
export function parseTriageResponse(llmOutput) {
|
|
127
|
-
const matches = llmOutput.matchAll(/\{[\s\S]*?\}/g);
|
|
128
|
-
for (const match of matches) {
|
|
129
|
-
try {
|
|
130
|
-
const parsed = JSON.parse(match[0]);
|
|
131
|
-
if (parsed.tier === "routine" || parsed.tier === "creative") {
|
|
132
|
-
return parsed.tier;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
catch {
|
|
136
|
-
// Try next match
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return null;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Main entry point: classify an event as routine or creative.
|
|
143
|
-
*
|
|
144
|
-
* 1. Heuristics (0ms)
|
|
145
|
-
* 2. Small LLM classifier (~500ms-1s) if heuristics are inconclusive
|
|
146
|
-
* 3. Default to "creative" if classifier fails (safe default)
|
|
147
|
-
*/
|
|
148
|
-
export async function classifyEventTier(runtime, ctx, log) {
|
|
149
|
-
// Step 1: Heuristic classification
|
|
150
|
-
const heuristicResult = classifyByHeuristic(ctx);
|
|
151
|
-
if (heuristicResult) {
|
|
152
|
-
log(`Triage: heuristic → ${heuristicResult}`);
|
|
153
|
-
return heuristicResult;
|
|
154
|
-
}
|
|
155
|
-
// Step 2: Small LLM classifier
|
|
156
|
-
try {
|
|
157
|
-
const prompt = buildTriagePrompt(ctx);
|
|
158
|
-
const result = await withTrajectoryContext(runtime, { source: "orchestrator", decisionType: "event-triage" }, () => runtime.useModel(ModelType.TEXT_SMALL, { prompt }));
|
|
159
|
-
const tier = parseTriageResponse(result);
|
|
160
|
-
if (tier) {
|
|
161
|
-
log(`Triage: LLM → ${tier}`);
|
|
162
|
-
return tier;
|
|
163
|
-
}
|
|
164
|
-
log(`Triage: LLM returned unparseable response — defaulting to creative`);
|
|
165
|
-
}
|
|
166
|
-
catch (err) {
|
|
167
|
-
log(`Triage: LLM classifier failed: ${err} — defaulting to creative`);
|
|
168
|
-
}
|
|
169
|
-
// Step 3: Safe default
|
|
170
|
-
return "creative";
|
|
171
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export type HistoryEntryType = "task_registered" | "task_completed" | "task_stopped" | "task_error" | "key_decision";
|
|
2
|
-
export interface HistoryEntry {
|
|
3
|
-
timestamp: number;
|
|
4
|
-
type: HistoryEntryType;
|
|
5
|
-
sessionId: string;
|
|
6
|
-
label: string;
|
|
7
|
-
agentType: string;
|
|
8
|
-
repo?: string;
|
|
9
|
-
workdir: string;
|
|
10
|
-
originalTask?: string;
|
|
11
|
-
completionSummary?: string;
|
|
12
|
-
reasoning?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare class SwarmHistory {
|
|
15
|
-
private filePath;
|
|
16
|
-
/** In-memory counter to avoid reading the file on every append. */
|
|
17
|
-
private appendCount;
|
|
18
|
-
/** Serializes all file mutations. */
|
|
19
|
-
private mutex;
|
|
20
|
-
constructor(stateDir?: string);
|
|
21
|
-
append(entry: HistoryEntry): Promise<void>;
|
|
22
|
-
readAll(): Promise<HistoryEntry[]>;
|
|
23
|
-
getLastUsedRepo(): Promise<string | undefined>;
|
|
24
|
-
/** Called while holding the mutex — no external callers. */
|
|
25
|
-
private truncateInner;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=swarm-history.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"swarm-history.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/swarm-history.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,gBAAgB,GACzB,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,YAAY,GACZ,cAAc,CAAC;AAElB,MAAM,WAAW,YAAY;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAmCD,qBAAa,YAAY;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,mEAAmE;IACnE,OAAO,CAAC,WAAW,CAAK;IACxB,qCAAqC;IACrC,OAAO,CAAC,KAAK,CAAoB;gBAErB,QAAQ,CAAC,EAAE,MAAM;IASvB,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAqC1C,OAAO,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IA6BlC,eAAe,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAUpD,4DAA4D;YAC9C,aAAa;CAgC3B"}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import * as fs from "node:fs/promises";
|
|
2
|
-
import * as os from "node:os";
|
|
3
|
-
import * as path from "node:path";
|
|
4
|
-
const MAX_ENTRIES = 150;
|
|
5
|
-
const TRUNCATE_TO = 100;
|
|
6
|
-
/** Maximum file size in bytes before forced truncation (1 MB). */
|
|
7
|
-
const MAX_FILE_SIZE_BYTES = 1_048_576;
|
|
8
|
-
/**
|
|
9
|
-
* Simple async mutex — serializes all file mutations so concurrent
|
|
10
|
-
* append() and truncate() calls don't interleave reads and writes.
|
|
11
|
-
*/
|
|
12
|
-
class WriteMutex {
|
|
13
|
-
queue = [];
|
|
14
|
-
locked = false;
|
|
15
|
-
async acquire() {
|
|
16
|
-
if (!this.locked) {
|
|
17
|
-
this.locked = true;
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
return new Promise((resolve) => {
|
|
21
|
-
this.queue.push(resolve);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
release() {
|
|
25
|
-
const next = this.queue.shift();
|
|
26
|
-
if (next) {
|
|
27
|
-
next();
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
this.locked = false;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
export class SwarmHistory {
|
|
35
|
-
filePath;
|
|
36
|
-
/** In-memory counter to avoid reading the file on every append. */
|
|
37
|
-
appendCount = 0;
|
|
38
|
-
/** Serializes all file mutations. */
|
|
39
|
-
mutex = new WriteMutex();
|
|
40
|
-
constructor(stateDir) {
|
|
41
|
-
const dir = stateDir ||
|
|
42
|
-
process.env.ELIZA_STATE_DIR ||
|
|
43
|
-
process.env.ELIZA_STATE_DIR ||
|
|
44
|
-
path.join(os.homedir(), ".eliza");
|
|
45
|
-
this.filePath = path.join(dir, "swarm-history.jsonl");
|
|
46
|
-
}
|
|
47
|
-
async append(entry) {
|
|
48
|
-
await this.mutex.acquire();
|
|
49
|
-
try {
|
|
50
|
-
const dir = path.dirname(this.filePath);
|
|
51
|
-
await fs.mkdir(dir, { recursive: true });
|
|
52
|
-
await fs.appendFile(this.filePath, `${JSON.stringify(entry)}\n`, "utf-8");
|
|
53
|
-
this.appendCount++;
|
|
54
|
-
// Size-based rotation: truncate if file exceeds 1 MB regardless of line count
|
|
55
|
-
try {
|
|
56
|
-
const stat = await fs.stat(this.filePath);
|
|
57
|
-
if (stat.size > MAX_FILE_SIZE_BYTES) {
|
|
58
|
-
await this.truncateInner(TRUNCATE_TO);
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
catch {
|
|
63
|
-
// stat failed — skip size check, fall through to line-count check
|
|
64
|
-
}
|
|
65
|
-
// Line-count check after enough appends to potentially exceed MAX_ENTRIES
|
|
66
|
-
if (this.appendCount >= MAX_ENTRIES - TRUNCATE_TO) {
|
|
67
|
-
const content = await fs.readFile(this.filePath, "utf-8");
|
|
68
|
-
const lineCount = content
|
|
69
|
-
.split("\n")
|
|
70
|
-
.filter((l) => l.trim() !== "").length;
|
|
71
|
-
if (lineCount > MAX_ENTRIES) {
|
|
72
|
-
await this.truncateInner(TRUNCATE_TO);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
catch (err) {
|
|
77
|
-
console.error("[swarm-history] append failed:", err);
|
|
78
|
-
throw err;
|
|
79
|
-
}
|
|
80
|
-
finally {
|
|
81
|
-
this.mutex.release();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
async readAll() {
|
|
85
|
-
try {
|
|
86
|
-
const content = await fs.readFile(this.filePath, "utf-8");
|
|
87
|
-
const entries = [];
|
|
88
|
-
const lines = content.split("\n");
|
|
89
|
-
for (let i = 0; i < lines.length; i++) {
|
|
90
|
-
if (lines[i].trim() === "")
|
|
91
|
-
continue;
|
|
92
|
-
try {
|
|
93
|
-
entries.push(JSON.parse(lines[i]));
|
|
94
|
-
}
|
|
95
|
-
catch {
|
|
96
|
-
console.warn(`[swarm-history] skipping corrupted line at index ${i} (length=${lines[i].length})`);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return entries;
|
|
100
|
-
}
|
|
101
|
-
catch (err) {
|
|
102
|
-
if (err instanceof Error &&
|
|
103
|
-
"code" in err &&
|
|
104
|
-
err.code === "ENOENT") {
|
|
105
|
-
return [];
|
|
106
|
-
}
|
|
107
|
-
console.error("[swarm-history] readAll failed:", err);
|
|
108
|
-
return [];
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
async getLastUsedRepo() {
|
|
112
|
-
const entries = await this.readAll();
|
|
113
|
-
for (let i = entries.length - 1; i >= 0; i--) {
|
|
114
|
-
if (entries[i].repo) {
|
|
115
|
-
return entries[i].repo;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return undefined;
|
|
119
|
-
}
|
|
120
|
-
/** Called while holding the mutex — no external callers. */
|
|
121
|
-
async truncateInner(maxEntries) {
|
|
122
|
-
const entries = await this.readAll();
|
|
123
|
-
// If readAll returned empty but the file exists, a read error occurred —
|
|
124
|
-
// don't overwrite the file or we'd erase valid history.
|
|
125
|
-
if (entries.length === 0) {
|
|
126
|
-
try {
|
|
127
|
-
await fs.stat(this.filePath);
|
|
128
|
-
console.error("[swarm-history] truncate aborted: file exists but readAll returned empty");
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
catch {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
// First enforce entry count, then enforce byte budget.
|
|
136
|
-
// This ensures the file is both under MAX_ENTRIES and MAX_FILE_SIZE_BYTES.
|
|
137
|
-
let kept = entries.slice(-maxEntries);
|
|
138
|
-
let content = `${kept.map((e) => JSON.stringify(e)).join("\n")}\n`;
|
|
139
|
-
// If still over size budget, drop oldest entries until it fits
|
|
140
|
-
while (Buffer.byteLength(content, "utf-8") > MAX_FILE_SIZE_BYTES &&
|
|
141
|
-
kept.length > 1) {
|
|
142
|
-
kept = kept.slice(Math.max(1, Math.floor(kept.length * 0.2)));
|
|
143
|
-
content = `${kept.map((e) => JSON.stringify(e)).join("\n")}\n`;
|
|
144
|
-
}
|
|
145
|
-
await fs.writeFile(this.filePath, content, "utf-8");
|
|
146
|
-
this.appendCount = 0;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Swarm Coordinator — Idle Watchdog
|
|
3
|
-
*
|
|
4
|
-
* Extracted from swarm-coordinator.ts for modularity.
|
|
5
|
-
* Scans active sessions for idle ones and asks the LLM to assess their state.
|
|
6
|
-
*
|
|
7
|
-
* @module services/swarm-idle-watchdog
|
|
8
|
-
*/
|
|
9
|
-
import type { SwarmCoordinatorContext, TaskContext } from "./swarm-coordinator.ts";
|
|
10
|
-
/** How long a session can be idle before the watchdog checks on it (ms). */
|
|
11
|
-
export declare const IDLE_THRESHOLD_MS: number;
|
|
12
|
-
/** Max idle checks before force-escalating a session. */
|
|
13
|
-
export declare const MAX_IDLE_CHECKS = 4;
|
|
14
|
-
/**
|
|
15
|
-
* Scan all active sessions for idle ones. Called periodically by the watchdog timer.
|
|
16
|
-
*/
|
|
17
|
-
export declare function scanIdleSessions(ctx: SwarmCoordinatorContext): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* Handle an idle session by asking the LLM to assess its state.
|
|
20
|
-
*/
|
|
21
|
-
export declare function handleIdleCheck(ctx: SwarmCoordinatorContext, taskCtx: TaskContext, idleMinutes: number): Promise<void>;
|
|
22
|
-
//# sourceMappingURL=swarm-idle-watchdog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"swarm-idle-watchdog.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/swarm-idle-watchdog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EACX,uBAAuB,EACvB,WAAW,EACX,MAAM,wBAAwB,CAAC;AAiBhC,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,QAAgB,CAAC;AAE/C,yDAAyD;AACzD,eAAO,MAAM,eAAe,IAAI,CAAC;AAIjC;;GAEG;AACH,wBAAsB,gBAAgB,CACrC,GAAG,EAAE,uBAAuB,GAC1B,OAAO,CAAC,IAAI,CAAC,CA4Jf;AAED;;GAEG;AACH,wBAAsB,eAAe,CACpC,GAAG,EAAE,uBAAuB,EAC5B,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAyIf"}
|