@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,260 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Trajectory Feedback — Past Experience Injection
|
|
3
|
-
*
|
|
4
|
-
* Queries the trajectory database for past orchestrator decisions and
|
|
5
|
-
* formats relevant experience as agent memory context. This closes the
|
|
6
|
-
* loop between trajectory *output* (logging decisions) and trajectory
|
|
7
|
-
* *input* (feeding experience back to agents at spawn time).
|
|
8
|
-
*
|
|
9
|
-
* Inspired by "Codified Context" (arXiv:2602.20478) — known failure
|
|
10
|
-
* modes and past decisions are pre-loaded into agent context so they
|
|
11
|
-
* don't repeat mistakes or re-derive solutions.
|
|
12
|
-
*
|
|
13
|
-
* @module services/trajectory-feedback
|
|
14
|
-
*/
|
|
15
|
-
import { logger as elizaLogger } from "@elizaos/core";
|
|
16
|
-
/** Timeout for trajectory DB calls to prevent blocking agent spawn. */
|
|
17
|
-
const QUERY_TIMEOUT_MS = 5000;
|
|
18
|
-
const SLOW_PATH_BUDGET_MS = 15_000;
|
|
19
|
-
function withTimeout(promise, ms) {
|
|
20
|
-
return Promise.race([
|
|
21
|
-
promise,
|
|
22
|
-
new Promise((_, reject) => setTimeout(() => reject(new Error(`Trajectory query timed out after ${ms}ms`)), ms)),
|
|
23
|
-
]);
|
|
24
|
-
}
|
|
25
|
-
// ─── Trajectory Logger Access ───
|
|
26
|
-
/**
|
|
27
|
-
* Resolve the trajectory logger from the runtime. Returns null if
|
|
28
|
-
* trajectory logging isn't available (e.g. no database).
|
|
29
|
-
*/
|
|
30
|
-
function getTrajectoryLogger(runtime) {
|
|
31
|
-
const runtimeAny = runtime;
|
|
32
|
-
// Try getService first (direct lookup)
|
|
33
|
-
if (typeof runtimeAny.getService === "function") {
|
|
34
|
-
const svc = runtimeAny.getService("trajectories");
|
|
35
|
-
if (svc && typeof svc === "object" && hasListMethod(svc)) {
|
|
36
|
-
return svc;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
// Fallback: getServicesByType
|
|
40
|
-
if (typeof runtimeAny.getServicesByType === "function") {
|
|
41
|
-
const services = runtimeAny.getServicesByType("trajectories");
|
|
42
|
-
if (Array.isArray(services)) {
|
|
43
|
-
for (const svc of services) {
|
|
44
|
-
if (svc && typeof svc === "object" && hasListMethod(svc)) {
|
|
45
|
-
return svc;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
function hasListMethod(obj) {
|
|
53
|
-
const candidate = obj;
|
|
54
|
-
return (typeof candidate.listTrajectories === "function" &&
|
|
55
|
-
typeof candidate.getTrajectoryDetail === "function");
|
|
56
|
-
}
|
|
57
|
-
// ─── Experience Extraction ───
|
|
58
|
-
/**
|
|
59
|
-
* Extract key decisions and insights from an LLM response.
|
|
60
|
-
* Looks for structured decision markers and significant reasoning.
|
|
61
|
-
*/
|
|
62
|
-
function extractInsights(response, purpose) {
|
|
63
|
-
const insights = [];
|
|
64
|
-
// Extract explicit DECISION markers
|
|
65
|
-
const decisionPattern = /DECISION:\s*(.+?)(?:\n|$)/gi;
|
|
66
|
-
let match;
|
|
67
|
-
match = decisionPattern.exec(response);
|
|
68
|
-
while (match !== null) {
|
|
69
|
-
insights.push(match[1].trim());
|
|
70
|
-
match = decisionPattern.exec(response);
|
|
71
|
-
}
|
|
72
|
-
// Extract keyDecision from coordination responses
|
|
73
|
-
const keyDecisionPattern = /"keyDecision"\s*:\s*"([^"]+)"/g;
|
|
74
|
-
match = keyDecisionPattern.exec(response);
|
|
75
|
-
while (match !== null) {
|
|
76
|
-
insights.push(match[1].trim());
|
|
77
|
-
match = keyDecisionPattern.exec(response);
|
|
78
|
-
}
|
|
79
|
-
// For turn-complete and coordination decisions, extract the reasoning
|
|
80
|
-
if ((purpose === "turn-complete" || purpose === "coordination") &&
|
|
81
|
-
insights.length === 0) {
|
|
82
|
-
const reasoningPattern = /"reasoning"\s*:\s*"([^"]{20,200})"/;
|
|
83
|
-
const reasoningMatch = response.match(reasoningPattern);
|
|
84
|
-
if (reasoningMatch) {
|
|
85
|
-
insights.push(reasoningMatch[1].trim());
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return insights;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Check if a past experience is potentially relevant to a new task.
|
|
92
|
-
* Uses simple keyword overlap — not semantic search, but fast and
|
|
93
|
-
* good enough for catching repeated patterns.
|
|
94
|
-
*/
|
|
95
|
-
function isRelevant(experience, taskDescription) {
|
|
96
|
-
if (!taskDescription)
|
|
97
|
-
return true; // No filter = include all
|
|
98
|
-
const taskWords = new Set(taskDescription
|
|
99
|
-
.toLowerCase()
|
|
100
|
-
.replace(/[^a-z0-9\s]/g, " ")
|
|
101
|
-
.split(/\s+/)
|
|
102
|
-
.filter((w) => w.length > 3));
|
|
103
|
-
const insightWords = experience.insight
|
|
104
|
-
.toLowerCase()
|
|
105
|
-
.replace(/[^a-z0-9\s]/g, " ")
|
|
106
|
-
.split(/\s+/)
|
|
107
|
-
.filter((w) => w.length > 3);
|
|
108
|
-
// At least 2 meaningful word overlaps
|
|
109
|
-
let overlap = 0;
|
|
110
|
-
for (const word of insightWords) {
|
|
111
|
-
if (taskWords.has(word))
|
|
112
|
-
overlap++;
|
|
113
|
-
if (overlap >= 2)
|
|
114
|
-
return true;
|
|
115
|
-
}
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
// ─── Main Query ───
|
|
119
|
-
/**
|
|
120
|
-
* Query the trajectory database for past orchestrator decisions and
|
|
121
|
-
* return distilled experience entries relevant to the current task.
|
|
122
|
-
*/
|
|
123
|
-
export async function queryPastExperience(runtime, options = {}) {
|
|
124
|
-
const { maxTrajectories = 30, maxEntries = 8, lookbackHours = 48, taskDescription, repo, } = options;
|
|
125
|
-
const logger = getTrajectoryLogger(runtime);
|
|
126
|
-
if (!logger)
|
|
127
|
-
return [];
|
|
128
|
-
const startDate = new Date(Date.now() - lookbackHours * 60 * 60 * 1000).toISOString();
|
|
129
|
-
try {
|
|
130
|
-
// Fetch recent orchestrator trajectories
|
|
131
|
-
const result = await withTimeout(logger.listTrajectories({
|
|
132
|
-
source: "orchestrator",
|
|
133
|
-
limit: maxTrajectories,
|
|
134
|
-
startDate,
|
|
135
|
-
}), QUERY_TIMEOUT_MS);
|
|
136
|
-
if (!result.trajectories || result.trajectories.length === 0)
|
|
137
|
-
return [];
|
|
138
|
-
const experiences = [];
|
|
139
|
-
const slowPathDeadline = Date.now() + SLOW_PATH_BUDGET_MS;
|
|
140
|
-
// Scan each trajectory for insights. Prefer pre-extracted insights from
|
|
141
|
-
// metadata (populated at write time by milaidy's trajectory-persistence)
|
|
142
|
-
// to avoid loading full trajectory details with their large prompt/response
|
|
143
|
-
// payloads. Fall back to getTrajectoryDetail for older trajectories that
|
|
144
|
-
// predate the metadata insight extraction.
|
|
145
|
-
const maxScans = Math.min(result.trajectories.length, maxTrajectories);
|
|
146
|
-
for (let scanIdx = 0; scanIdx < maxScans; scanIdx++) {
|
|
147
|
-
const summary = result.trajectories[scanIdx];
|
|
148
|
-
const metadata = summary.metadata;
|
|
149
|
-
const metadataInsights = Array.isArray(metadata?.insights)
|
|
150
|
-
? metadata.insights
|
|
151
|
-
.filter((value) => typeof value === "string" && value.trim().length > 0)
|
|
152
|
-
.slice(0, 50)
|
|
153
|
-
: [];
|
|
154
|
-
const decisionType = metadata?.orchestrator?.decisionType ?? "unknown";
|
|
155
|
-
const taskLabel = metadata?.orchestrator?.taskLabel ?? "";
|
|
156
|
-
const trajectoryRepo = metadata?.orchestrator?.repo;
|
|
157
|
-
// Filter by repo: if a repo is specified, only include trajectories
|
|
158
|
-
// from the same repo. This ensures agents working on repo A don't get
|
|
159
|
-
// decisions made for repo B.
|
|
160
|
-
if (repo && (!trajectoryRepo || trajectoryRepo !== repo))
|
|
161
|
-
continue;
|
|
162
|
-
// Fast path: use pre-extracted insights from metadata (no full detail load)
|
|
163
|
-
if (metadataInsights.length > 0) {
|
|
164
|
-
elizaLogger.debug(`[trajectory-feedback] Fast path: ${metadataInsights.length} insight(s) from metadata for ${summary.id}`);
|
|
165
|
-
for (const insight of metadataInsights) {
|
|
166
|
-
experiences.push({
|
|
167
|
-
timestamp: summary.startTime,
|
|
168
|
-
decisionType,
|
|
169
|
-
taskLabel,
|
|
170
|
-
insight,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
// Slow path (fallback): load full detail for pre-extraction trajectories
|
|
176
|
-
if (Date.now() > slowPathDeadline) {
|
|
177
|
-
elizaLogger.debug(`[trajectory-feedback] Slow path budget exhausted; stopping detail loads`);
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
elizaLogger.debug(`[trajectory-feedback] Slow path: loading full detail for ${summary.id} (no metadata insights)`);
|
|
181
|
-
const detail = await withTimeout(logger.getTrajectoryDetail(summary.id), QUERY_TIMEOUT_MS).catch(() => null);
|
|
182
|
-
if (!detail?.steps)
|
|
183
|
-
continue;
|
|
184
|
-
for (const step of detail.steps) {
|
|
185
|
-
if (!step.llmCalls)
|
|
186
|
-
continue;
|
|
187
|
-
for (const call of step.llmCalls) {
|
|
188
|
-
if (!call.response)
|
|
189
|
-
continue;
|
|
190
|
-
const insights = extractInsights(call.response, call.purpose ?? decisionType);
|
|
191
|
-
for (const insight of insights) {
|
|
192
|
-
experiences.push({
|
|
193
|
-
timestamp: call.timestamp ?? summary.startTime,
|
|
194
|
-
decisionType: call.purpose ?? decisionType,
|
|
195
|
-
taskLabel,
|
|
196
|
-
insight,
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
// Filter by relevance if task description provided
|
|
203
|
-
let filtered = taskDescription
|
|
204
|
-
? experiences.filter((e) => isRelevant(e, taskDescription))
|
|
205
|
-
: experiences;
|
|
206
|
-
// If relevance filtering removed everything, fall back to all experiences
|
|
207
|
-
if (filtered.length === 0 && experiences.length > 0) {
|
|
208
|
-
filtered = experiences;
|
|
209
|
-
}
|
|
210
|
-
// Deduplicate by insight text (keep most recent)
|
|
211
|
-
const seen = new Map();
|
|
212
|
-
for (const exp of filtered) {
|
|
213
|
-
const key = exp.insight.toLowerCase();
|
|
214
|
-
const existing = seen.get(key);
|
|
215
|
-
if (!existing || exp.timestamp > existing.timestamp) {
|
|
216
|
-
seen.set(key, exp);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
// Return most recent entries, capped
|
|
220
|
-
return Array.from(seen.values())
|
|
221
|
-
.sort((a, b) => b.timestamp - a.timestamp)
|
|
222
|
-
.slice(0, maxEntries);
|
|
223
|
-
}
|
|
224
|
-
catch (err) {
|
|
225
|
-
// Non-critical — log and return empty
|
|
226
|
-
elizaLogger.error(`[trajectory-feedback] Failed to query past experience: ${err}`);
|
|
227
|
-
return [];
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
// ─── Formatting ───
|
|
231
|
-
/**
|
|
232
|
-
* Format past experience entries as a markdown section suitable for
|
|
233
|
-
* injection into agent memory (CLAUDE.md / GEMINI.md).
|
|
234
|
-
*
|
|
235
|
-
* Returns empty string if no relevant experience is found.
|
|
236
|
-
*/
|
|
237
|
-
export function formatPastExperience(experiences) {
|
|
238
|
-
if (experiences.length === 0)
|
|
239
|
-
return "";
|
|
240
|
-
const lines = experiences.map((e) => {
|
|
241
|
-
const age = formatAge(e.timestamp);
|
|
242
|
-
const label = e.taskLabel ? ` [${e.taskLabel}]` : "";
|
|
243
|
-
return `- ${e.insight}${label} (${age})`;
|
|
244
|
-
});
|
|
245
|
-
return (`# Past Experience\n\n` +
|
|
246
|
-
`The following decisions and insights were captured from recent agent sessions. ` +
|
|
247
|
-
`Use them to avoid repeating mistakes and to stay consistent with established patterns.\n\n` +
|
|
248
|
-
`${lines.join("\n")}\n`);
|
|
249
|
-
}
|
|
250
|
-
/** Format a timestamp as a human-readable relative age (e.g. "2h ago", "1d ago"). */
|
|
251
|
-
function formatAge(timestamp) {
|
|
252
|
-
const diffMs = Date.now() - timestamp;
|
|
253
|
-
const hours = Math.floor(diffMs / (1000 * 60 * 60));
|
|
254
|
-
if (hours < 1)
|
|
255
|
-
return "just now";
|
|
256
|
-
if (hours < 24)
|
|
257
|
-
return `${hours}h ago`;
|
|
258
|
-
const days = Math.floor(hours / 24);
|
|
259
|
-
return `${days}d ago`;
|
|
260
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Git operations for Coding Workspace Service
|
|
3
|
-
*
|
|
4
|
-
* Extracted from workspace-service.ts — provides git status, commit, push,
|
|
5
|
-
* and PR creation as standalone functions operating on workspace paths.
|
|
6
|
-
*
|
|
7
|
-
* @module services/workspace-git-ops
|
|
8
|
-
*/
|
|
9
|
-
import type { PullRequestInfo, WorkspaceService } from "git-workspace-service";
|
|
10
|
-
import type { CommitOptions, PROptions, PushOptions, WorkspaceResult, WorkspaceStatusResult } from "./workspace-service.ts";
|
|
11
|
-
/**
|
|
12
|
-
* Get workspace git status (branch, staged/modified/untracked files).
|
|
13
|
-
*/
|
|
14
|
-
export declare function getStatus(workspacePath: string): Promise<WorkspaceStatusResult>;
|
|
15
|
-
/**
|
|
16
|
-
* Commit changes in a workspace directory.
|
|
17
|
-
* Returns the commit hash.
|
|
18
|
-
*/
|
|
19
|
-
export declare function commit(workspacePath: string, options: CommitOptions, log: (msg: string) => void): Promise<string>;
|
|
20
|
-
/**
|
|
21
|
-
* Push changes to remote for a workspace.
|
|
22
|
-
*/
|
|
23
|
-
export declare function push(workspacePath: string, branch: string, options: PushOptions | undefined, log: (msg: string) => void): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* Create a pull request for a workspace via the underlying WorkspaceService.
|
|
26
|
-
*/
|
|
27
|
-
export declare function createPR(workspaceService: WorkspaceService, workspace: WorkspaceResult, workspaceId: string, options: PROptions, log: (msg: string) => void): Promise<PullRequestInfo>;
|
|
28
|
-
//# sourceMappingURL=workspace-git-ops.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-git-ops.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/workspace-git-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACX,eAAe,EAEf,gBAAgB,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACX,aAAa,EACb,SAAS,EACT,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,wBAAsB,SAAS,CAC9B,aAAa,EAAE,MAAM,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAuChC;AAED;;;GAGG;AACH,wBAAsB,MAAM,CAC3B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,aAAa,EACtB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GACxB,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAED;;GAEG;AACH,wBAAsB,IAAI,CACzB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,WAAW,GAAG,SAAS,EAChC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GACxB,OAAO,CAAC,IAAI,CAAC,CAaf;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAC7B,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,eAAe,EAC1B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,SAAS,EAClB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GACxB,OAAO,CAAC,eAAe,CAAC,CAsB1B"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Git operations for Coding Workspace Service
|
|
3
|
-
*
|
|
4
|
-
* Extracted from workspace-service.ts — provides git status, commit, push,
|
|
5
|
-
* and PR creation as standalone functions operating on workspace paths.
|
|
6
|
-
*
|
|
7
|
-
* @module services/workspace-git-ops
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Get workspace git status (branch, staged/modified/untracked files).
|
|
11
|
-
*/
|
|
12
|
-
export async function getStatus(workspacePath) {
|
|
13
|
-
const { execFileSync } = await import("node:child_process");
|
|
14
|
-
const statusOutput = execFileSync("git", ["status", "--porcelain"], {
|
|
15
|
-
cwd: workspacePath,
|
|
16
|
-
encoding: "utf-8",
|
|
17
|
-
});
|
|
18
|
-
const branchOutput = execFileSync("git", ["branch", "--show-current"], {
|
|
19
|
-
cwd: workspacePath,
|
|
20
|
-
encoding: "utf-8",
|
|
21
|
-
}).trim();
|
|
22
|
-
const lines = statusOutput.split("\n").filter(Boolean);
|
|
23
|
-
const modified = [];
|
|
24
|
-
const staged = [];
|
|
25
|
-
const untracked = [];
|
|
26
|
-
for (const line of lines) {
|
|
27
|
-
const indexStatus = line[0];
|
|
28
|
-
const workTreeStatus = line[1];
|
|
29
|
-
const filename = line.slice(3);
|
|
30
|
-
if (indexStatus === "?" && workTreeStatus === "?") {
|
|
31
|
-
untracked.push(filename);
|
|
32
|
-
}
|
|
33
|
-
else if (indexStatus !== " " && indexStatus !== "?") {
|
|
34
|
-
staged.push(filename);
|
|
35
|
-
}
|
|
36
|
-
else if (workTreeStatus !== " ") {
|
|
37
|
-
modified.push(filename);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
branch: branchOutput,
|
|
42
|
-
clean: lines.length === 0,
|
|
43
|
-
modified,
|
|
44
|
-
staged,
|
|
45
|
-
untracked,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Commit changes in a workspace directory.
|
|
50
|
-
* Returns the commit hash.
|
|
51
|
-
*/
|
|
52
|
-
export async function commit(workspacePath, options, log) {
|
|
53
|
-
const { execFileSync } = await import("node:child_process");
|
|
54
|
-
if (options.all) {
|
|
55
|
-
execFileSync("git", ["add", "-A"], { cwd: workspacePath });
|
|
56
|
-
}
|
|
57
|
-
execFileSync("git", ["commit", "-m", options.message], {
|
|
58
|
-
cwd: workspacePath,
|
|
59
|
-
});
|
|
60
|
-
const hash = execFileSync("git", ["rev-parse", "HEAD"], {
|
|
61
|
-
cwd: workspacePath,
|
|
62
|
-
encoding: "utf-8",
|
|
63
|
-
}).trim();
|
|
64
|
-
log(`Committed ${hash.slice(0, 8)} in workspace at ${workspacePath}`);
|
|
65
|
-
return hash;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Push changes to remote for a workspace.
|
|
69
|
-
*/
|
|
70
|
-
export async function push(workspacePath, branch, options, log) {
|
|
71
|
-
const { execFileSync } = await import("node:child_process");
|
|
72
|
-
const args = ["push"];
|
|
73
|
-
if (options?.setUpstream) {
|
|
74
|
-
args.push("-u", "origin", branch);
|
|
75
|
-
}
|
|
76
|
-
if (options?.force) {
|
|
77
|
-
args.push("--force");
|
|
78
|
-
}
|
|
79
|
-
execFileSync("git", args, { cwd: workspacePath });
|
|
80
|
-
log(`Pushed workspace at ${workspacePath}`);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Create a pull request for a workspace via the underlying WorkspaceService.
|
|
84
|
-
*/
|
|
85
|
-
export async function createPR(workspaceService, workspace, workspaceId, options, log) {
|
|
86
|
-
const finalization = {
|
|
87
|
-
push: false, // Already pushed
|
|
88
|
-
createPr: true,
|
|
89
|
-
pr: {
|
|
90
|
-
title: options.title,
|
|
91
|
-
body: options.body,
|
|
92
|
-
targetBranch: options.base ?? workspace.baseBranch,
|
|
93
|
-
draft: options.draft,
|
|
94
|
-
labels: options.labels,
|
|
95
|
-
reviewers: options.reviewers,
|
|
96
|
-
},
|
|
97
|
-
cleanup: false,
|
|
98
|
-
};
|
|
99
|
-
const result = await workspaceService.finalize(workspaceId, finalization);
|
|
100
|
-
if (!result) {
|
|
101
|
-
throw new Error("Failed to create PR");
|
|
102
|
-
}
|
|
103
|
-
log(`Created PR #${result.number} for workspace ${workspaceId}`);
|
|
104
|
-
return result;
|
|
105
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub integration for Coding Workspace Service
|
|
3
|
-
*
|
|
4
|
-
* Extracted from workspace-service.ts — provides GitHub API access
|
|
5
|
-
* via PAT or OAuth device flow, plus all issue management operations.
|
|
6
|
-
*
|
|
7
|
-
* @module services/workspace-github
|
|
8
|
-
*/
|
|
9
|
-
import type { IAgentRuntime } from "@elizaos/core";
|
|
10
|
-
import { type CreateIssueOptions, GitHubPatClient, type IssueComment, type IssueInfo, type IssueState } from "git-workspace-service";
|
|
11
|
-
/**
|
|
12
|
-
* Callback for surfacing auth prompts to the user.
|
|
13
|
-
* Returns the auth prompt text so Eliza can relay it through chat.
|
|
14
|
-
*/
|
|
15
|
-
export type AuthPromptCallback = (prompt: {
|
|
16
|
-
verificationUri: string;
|
|
17
|
-
userCode: string;
|
|
18
|
-
expiresIn: number;
|
|
19
|
-
}) => void;
|
|
20
|
-
/**
|
|
21
|
-
* Context object passed by CodingWorkspaceService into every GitHub function.
|
|
22
|
-
* Lets us keep the extracted functions stateless while still mutating shared state.
|
|
23
|
-
*/
|
|
24
|
-
export interface GitHubContext {
|
|
25
|
-
runtime: IAgentRuntime;
|
|
26
|
-
githubClient: GitHubPatClient | null;
|
|
27
|
-
setGithubClient: (client: GitHubPatClient) => void;
|
|
28
|
-
githubAuthInProgress: Promise<GitHubPatClient> | null;
|
|
29
|
-
setGithubAuthInProgress: (p: Promise<GitHubPatClient> | null) => void;
|
|
30
|
-
authPromptCallback: AuthPromptCallback | null;
|
|
31
|
-
log: (msg: string) => void;
|
|
32
|
-
}
|
|
33
|
-
export declare function parseOwnerRepo(repo: string): {
|
|
34
|
-
owner: string;
|
|
35
|
-
repo: string;
|
|
36
|
-
};
|
|
37
|
-
export declare function ensureGitHubClient(ctx: GitHubContext): Promise<GitHubPatClient>;
|
|
38
|
-
export declare function performOAuthFlow(ctx: GitHubContext, clientId: string): Promise<GitHubPatClient>;
|
|
39
|
-
export declare function createIssue(ctx: GitHubContext, repo: string, options: CreateIssueOptions): Promise<IssueInfo>;
|
|
40
|
-
export declare function getIssue(ctx: GitHubContext, repo: string, issueNumber: number): Promise<IssueInfo>;
|
|
41
|
-
export declare function listIssues(ctx: GitHubContext, repo: string, options?: {
|
|
42
|
-
state?: IssueState | "all";
|
|
43
|
-
labels?: string[];
|
|
44
|
-
assignee?: string;
|
|
45
|
-
}): Promise<IssueInfo[]>;
|
|
46
|
-
export declare function updateIssue(ctx: GitHubContext, repo: string, issueNumber: number, options: {
|
|
47
|
-
title?: string;
|
|
48
|
-
body?: string;
|
|
49
|
-
state?: IssueState;
|
|
50
|
-
labels?: string[];
|
|
51
|
-
assignees?: string[];
|
|
52
|
-
}): Promise<IssueInfo>;
|
|
53
|
-
export declare function addComment(ctx: GitHubContext, repo: string, issueNumber: number, body: string): Promise<IssueComment>;
|
|
54
|
-
export declare function listComments(ctx: GitHubContext, repo: string, issueNumber: number): Promise<IssueComment[]>;
|
|
55
|
-
export declare function closeIssue(ctx: GitHubContext, repo: string, issueNumber: number): Promise<IssueInfo>;
|
|
56
|
-
export declare function reopenIssue(ctx: GitHubContext, repo: string, issueNumber: number): Promise<IssueInfo>;
|
|
57
|
-
export declare function addLabels(ctx: GitHubContext, repo: string, issueNumber: number, labels: string[]): Promise<void>;
|
|
58
|
-
//# sourceMappingURL=workspace-github.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-github.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/workspace-github.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EACN,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,UAAU,EAEf,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CAClB,KAAK,IAAI,CAAC;AAEX;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,aAAa,CAAC;IACvB,YAAY,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,eAAe,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IACnD,oBAAoB,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;IACtD,uBAAuB,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACtE,kBAAkB,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC9C,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3B;AAID,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACb,CAOA;AAID,wBAAsB,kBAAkB,CACvC,GAAG,EAAE,aAAa,GAChB,OAAO,CAAC,eAAe,CAAC,CAsC1B;AAED,wBAAsB,gBAAgB,CACrC,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,eAAe,CAAC,CA2C1B;AAID,wBAAsB,WAAW,CAChC,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kBAAkB,GACzB,OAAO,CAAC,SAAS,CAAC,CAMpB;AAED,wBAAsB,QAAQ,CAC7B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GACjB,OAAO,CAAC,SAAS,CAAC,CAIpB;AAED,wBAAsB,UAAU,CAC/B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IACT,KAAK,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,GACC,OAAO,CAAC,SAAS,EAAE,CAAC,CAItB;AAED,wBAAsB,WAAW,CAChC,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE;IACR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,GACC,OAAO,CAAC,SAAS,CAAC,CAIpB;AAED,wBAAsB,UAAU,CAC/B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACV,OAAO,CAAC,YAAY,CAAC,CAIvB;AAED,wBAAsB,YAAY,CACjC,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GACjB,OAAO,CAAC,YAAY,EAAE,CAAC,CAIzB;AAED,wBAAsB,UAAU,CAC/B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GACjB,OAAO,CAAC,SAAS,CAAC,CAMpB;AAED,wBAAsB,WAAW,CAChC,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GACjB,OAAO,CAAC,SAAS,CAAC,CAIpB;AAED,wBAAsB,SAAS,CAC9B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EAAE,GACd,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub integration for Coding Workspace Service
|
|
3
|
-
*
|
|
4
|
-
* Extracted from workspace-service.ts — provides GitHub API access
|
|
5
|
-
* via PAT or OAuth device flow, plus all issue management operations.
|
|
6
|
-
*
|
|
7
|
-
* @module services/workspace-github
|
|
8
|
-
*/
|
|
9
|
-
import { GitHubPatClient, OAuthDeviceFlow, } from "git-workspace-service";
|
|
10
|
-
// ── Helpers ────────────────────────────────────────────────────────
|
|
11
|
-
export function parseOwnerRepo(repo) {
|
|
12
|
-
// Handle URLs like https://github.com/owner/repo or owner/repo
|
|
13
|
-
const match = repo.match(/(?:github\.com\/)?([^/]+)\/([^/.]+)/);
|
|
14
|
-
if (!match) {
|
|
15
|
-
throw new Error(`Cannot parse owner/repo from: ${repo}`);
|
|
16
|
-
}
|
|
17
|
-
return { owner: match[1], repo: match[2] };
|
|
18
|
-
}
|
|
19
|
-
// ── Auth ───────────────────────────────────────────────────────────
|
|
20
|
-
export async function ensureGitHubClient(ctx) {
|
|
21
|
-
// Already have a client
|
|
22
|
-
if (ctx.githubClient)
|
|
23
|
-
return ctx.githubClient;
|
|
24
|
-
// Auth already in progress (another call triggered it) - wait for it
|
|
25
|
-
if (ctx.githubAuthInProgress)
|
|
26
|
-
return ctx.githubAuthInProgress;
|
|
27
|
-
// Check for PAT (re-check in case it was set after init)
|
|
28
|
-
const githubToken = ctx.runtime.getSetting("GITHUB_TOKEN");
|
|
29
|
-
if (githubToken) {
|
|
30
|
-
const client = new GitHubPatClient({ token: githubToken });
|
|
31
|
-
ctx.setGithubClient(client);
|
|
32
|
-
ctx.log("GitHubPatClient initialized with PAT (late binding)");
|
|
33
|
-
return client;
|
|
34
|
-
}
|
|
35
|
-
// Try OAuth device flow (explicit user consent, scoped permissions)
|
|
36
|
-
const clientId = ctx.runtime.getSetting("GITHUB_OAUTH_CLIENT_ID");
|
|
37
|
-
if (!clientId) {
|
|
38
|
-
throw new Error("GitHub access required but no credentials available. " +
|
|
39
|
-
"Set GITHUB_TOKEN (PAT) or GITHUB_OAUTH_CLIENT_ID (for OAuth device flow).");
|
|
40
|
-
}
|
|
41
|
-
// Start OAuth - deduplicate concurrent requests
|
|
42
|
-
const authPromise = performOAuthFlow(ctx, clientId);
|
|
43
|
-
ctx.setGithubAuthInProgress(authPromise);
|
|
44
|
-
try {
|
|
45
|
-
const client = await authPromise;
|
|
46
|
-
return client;
|
|
47
|
-
}
|
|
48
|
-
finally {
|
|
49
|
-
ctx.setGithubAuthInProgress(null);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
export async function performOAuthFlow(ctx, clientId) {
|
|
53
|
-
// Read directly from process.env — this is a server-side secret that
|
|
54
|
-
// should not be exposed through the plugin getSetting() allowlist.
|
|
55
|
-
const clientSecret = process.env.GITHUB_OAUTH_CLIENT_SECRET;
|
|
56
|
-
const oauth = new OAuthDeviceFlow({
|
|
57
|
-
clientId,
|
|
58
|
-
clientSecret,
|
|
59
|
-
permissions: {
|
|
60
|
-
repositories: { type: "public" },
|
|
61
|
-
contents: "write",
|
|
62
|
-
issues: "write",
|
|
63
|
-
pullRequests: "write",
|
|
64
|
-
metadata: "read",
|
|
65
|
-
},
|
|
66
|
-
timeout: 300, // 5 minutes
|
|
67
|
-
});
|
|
68
|
-
// Step 1: Request device code
|
|
69
|
-
const deviceCode = await oauth.requestDeviceCode();
|
|
70
|
-
// Step 2: Surface the auth prompt to the user
|
|
71
|
-
if (ctx.authPromptCallback) {
|
|
72
|
-
ctx.authPromptCallback({
|
|
73
|
-
verificationUri: deviceCode.verificationUri,
|
|
74
|
-
userCode: deviceCode.userCode,
|
|
75
|
-
expiresIn: deviceCode.expiresIn,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
// Fallback: log to console
|
|
80
|
-
console.log(`\n[GitHub Auth] Go to ${deviceCode.verificationUri} and enter code: ${deviceCode.userCode}\n`);
|
|
81
|
-
}
|
|
82
|
-
// Step 3: Poll until user completes auth
|
|
83
|
-
const token = await oauth.pollForToken(deviceCode);
|
|
84
|
-
// Step 4: Create client with the obtained token
|
|
85
|
-
const client = new GitHubPatClient({ token: token.accessToken });
|
|
86
|
-
ctx.setGithubClient(client);
|
|
87
|
-
ctx.log("GitHubPatClient initialized via OAuth device flow");
|
|
88
|
-
return client;
|
|
89
|
-
}
|
|
90
|
-
// ── Issue Management ───────────────────────────────────────────────
|
|
91
|
-
export async function createIssue(ctx, repo, options) {
|
|
92
|
-
const client = await ensureGitHubClient(ctx);
|
|
93
|
-
const { owner, repo: repoName } = parseOwnerRepo(repo);
|
|
94
|
-
const issue = await client.createIssue(owner, repoName, options);
|
|
95
|
-
ctx.log(`Created issue #${issue.number}: ${issue.title}`);
|
|
96
|
-
return issue;
|
|
97
|
-
}
|
|
98
|
-
export async function getIssue(ctx, repo, issueNumber) {
|
|
99
|
-
const client = await ensureGitHubClient(ctx);
|
|
100
|
-
const { owner, repo: repoName } = parseOwnerRepo(repo);
|
|
101
|
-
return client.getIssue(owner, repoName, issueNumber);
|
|
102
|
-
}
|
|
103
|
-
export async function listIssues(ctx, repo, options) {
|
|
104
|
-
const client = await ensureGitHubClient(ctx);
|
|
105
|
-
const { owner, repo: repoName } = parseOwnerRepo(repo);
|
|
106
|
-
return client.listIssues(owner, repoName, options);
|
|
107
|
-
}
|
|
108
|
-
export async function updateIssue(ctx, repo, issueNumber, options) {
|
|
109
|
-
const client = await ensureGitHubClient(ctx);
|
|
110
|
-
const { owner, repo: repoName } = parseOwnerRepo(repo);
|
|
111
|
-
return client.updateIssue(owner, repoName, issueNumber, options);
|
|
112
|
-
}
|
|
113
|
-
export async function addComment(ctx, repo, issueNumber, body) {
|
|
114
|
-
const client = await ensureGitHubClient(ctx);
|
|
115
|
-
const { owner, repo: repoName } = parseOwnerRepo(repo);
|
|
116
|
-
return client.addComment(owner, repoName, issueNumber, { body });
|
|
117
|
-
}
|
|
118
|
-
export async function listComments(ctx, repo, issueNumber) {
|
|
119
|
-
const client = await ensureGitHubClient(ctx);
|
|
120
|
-
const { owner, repo: repoName } = parseOwnerRepo(repo);
|
|
121
|
-
return client.listComments(owner, repoName, issueNumber);
|
|
122
|
-
}
|
|
123
|
-
export async function closeIssue(ctx, repo, issueNumber) {
|
|
124
|
-
const client = await ensureGitHubClient(ctx);
|
|
125
|
-
const { owner, repo: repoName } = parseOwnerRepo(repo);
|
|
126
|
-
const issue = await client.closeIssue(owner, repoName, issueNumber);
|
|
127
|
-
ctx.log(`Closed issue #${issueNumber}`);
|
|
128
|
-
return issue;
|
|
129
|
-
}
|
|
130
|
-
export async function reopenIssue(ctx, repo, issueNumber) {
|
|
131
|
-
const client = await ensureGitHubClient(ctx);
|
|
132
|
-
const { owner, repo: repoName } = parseOwnerRepo(repo);
|
|
133
|
-
return client.reopenIssue(owner, repoName, issueNumber);
|
|
134
|
-
}
|
|
135
|
-
export async function addLabels(ctx, repo, issueNumber, labels) {
|
|
136
|
-
const client = await ensureGitHubClient(ctx);
|
|
137
|
-
const { owner, repo: repoName } = parseOwnerRepo(repo);
|
|
138
|
-
await client.addLabels(owner, repoName, issueNumber, labels);
|
|
139
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Workspace lifecycle utilities — garbage collection and scratch directory cleanup.
|
|
3
|
-
*
|
|
4
|
-
* Extracted from workspace-service.ts to reduce module size.
|
|
5
|
-
*
|
|
6
|
-
* @module services/workspace-lifecycle
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Remove a scratch directory (non-git workspace used for ad-hoc tasks).
|
|
10
|
-
* Safe to call for any path under the workspaces base dir.
|
|
11
|
-
*/
|
|
12
|
-
export declare function removeScratchDir(dirPath: string, baseDir: string, log: (msg: string) => void, allowedDirs?: string[]): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Garbage-collect orphaned workspace directories.
|
|
15
|
-
* Removes directories older than the given TTL that aren't tracked by the current session.
|
|
16
|
-
*/
|
|
17
|
-
export declare function gcOrphanedWorkspaces(baseDir: string, workspaceTtlMs: number, trackedWorkspaceIds: Set<string>, log: (msg: string) => void): Promise<void>;
|
|
18
|
-
//# sourceMappingURL=workspace-lifecycle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-lifecycle.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/workspace-lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;GAGG;AACH,wBAAsB,gBAAgB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EAC1B,WAAW,CAAC,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CA8Bf;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,EAChC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GACxB,OAAO,CAAC,IAAI,CAAC,CAkDf"}
|