@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,533 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coding Workspace Service - Manages git workspaces for coding tasks
|
|
3
|
-
*
|
|
4
|
-
* Delegates to:
|
|
5
|
-
* - workspace-github.ts (issue management, OAuth, PAT auth)
|
|
6
|
-
* - workspace-git-ops.ts (status, commit, push, PR creation)
|
|
7
|
-
* - workspace-lifecycle.ts (GC, scratch dir cleanup)
|
|
8
|
-
* - workspace-types.ts (shared interface definitions)
|
|
9
|
-
*
|
|
10
|
-
* @module services/workspace-service
|
|
11
|
-
*/
|
|
12
|
-
import * as fs from "node:fs/promises";
|
|
13
|
-
import * as os from "node:os";
|
|
14
|
-
import * as path from "node:path";
|
|
15
|
-
import { CredentialService, GitHubPatClient, MemoryTokenStore, WorkspaceService, } from "git-workspace-service";
|
|
16
|
-
import { addComment as ghAddComment, addLabels as ghAddLabels, closeIssue as ghCloseIssue, createIssue as ghCreateIssue, getIssue as ghGetIssue, listComments as ghListComments, listIssues as ghListIssues, reopenIssue as ghReopenIssue, updateIssue as ghUpdateIssue, } from "./workspace-github.js";
|
|
17
|
-
import { readConfigEnvKey } from "./config-env.js";
|
|
18
|
-
import { normalizeRepositoryInput } from "./repo-input.js";
|
|
19
|
-
import { commit as gitCommit, createPR as gitCreatePR, getStatus as gitGetStatus, push as gitPush, } from "./workspace-git-ops.js";
|
|
20
|
-
import { gcOrphanedWorkspaces, removeScratchDir, } from "./workspace-lifecycle.js";
|
|
21
|
-
export class CodingWorkspaceService {
|
|
22
|
-
static serviceType = "CODING_WORKSPACE_SERVICE";
|
|
23
|
-
capabilityDescription = "Manages git workspaces for coding tasks";
|
|
24
|
-
runtime;
|
|
25
|
-
workspaceService = null;
|
|
26
|
-
credentialService = null;
|
|
27
|
-
githubClient = null;
|
|
28
|
-
githubAuthInProgress = null;
|
|
29
|
-
serviceConfig;
|
|
30
|
-
workspaces = new Map();
|
|
31
|
-
labels = new Map(); // label -> workspaceId
|
|
32
|
-
scratchBySession = new Map();
|
|
33
|
-
scratchCleanupTimers = new Map();
|
|
34
|
-
eventCallbacks = [];
|
|
35
|
-
authPromptCallback = null;
|
|
36
|
-
/** Callback fired when a scratch workspace enters pending_decision state. */
|
|
37
|
-
scratchDecisionCallback = null;
|
|
38
|
-
constructor(runtime, config = {}) {
|
|
39
|
-
this.runtime = runtime;
|
|
40
|
-
this.serviceConfig = {
|
|
41
|
-
baseDir: config.baseDir ?? path.join(os.homedir(), ".eliza", "workspaces"),
|
|
42
|
-
branchPrefix: config.branchPrefix ?? "eliza",
|
|
43
|
-
debug: config.debug ?? false,
|
|
44
|
-
workspaceTtlMs: config.workspaceTtlMs ?? 24 * 60 * 60 * 1000,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
static async start(runtime) {
|
|
48
|
-
const config = runtime.getSetting("CODING_WORKSPACE_CONFIG");
|
|
49
|
-
const service = new CodingWorkspaceService(runtime, config ?? {});
|
|
50
|
-
await service.initialize();
|
|
51
|
-
return service;
|
|
52
|
-
}
|
|
53
|
-
static async stopRuntime(runtime) {
|
|
54
|
-
const service = runtime.getService("CODING_WORKSPACE_SERVICE");
|
|
55
|
-
if (service) {
|
|
56
|
-
await service.stop();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
async initialize() {
|
|
60
|
-
this.credentialService = new CredentialService({
|
|
61
|
-
tokenStore: new MemoryTokenStore(),
|
|
62
|
-
});
|
|
63
|
-
this.workspaceService = new WorkspaceService({
|
|
64
|
-
config: {
|
|
65
|
-
baseDir: this.serviceConfig.baseDir,
|
|
66
|
-
branchPrefix: this.serviceConfig.branchPrefix,
|
|
67
|
-
},
|
|
68
|
-
credentialService: this.credentialService,
|
|
69
|
-
logger: this.serviceConfig.debug
|
|
70
|
-
? {
|
|
71
|
-
info: (data, msg) => console.log(`[WorkspaceService] ${msg ?? ""}`, data),
|
|
72
|
-
warn: (data, msg) => console.warn(`[WorkspaceService] ${msg ?? ""}`, data),
|
|
73
|
-
error: (data, msg) => console.error(`[WorkspaceService] ${msg ?? ""}`, data),
|
|
74
|
-
debug: (_data, msg) => this.log(`${msg ?? ""}`),
|
|
75
|
-
}
|
|
76
|
-
: undefined,
|
|
77
|
-
});
|
|
78
|
-
await this.workspaceService.initialize();
|
|
79
|
-
const githubToken = this.runtime.getSetting("GITHUB_TOKEN");
|
|
80
|
-
if (githubToken) {
|
|
81
|
-
this.githubClient = new GitHubPatClient({ token: githubToken });
|
|
82
|
-
this.log("GitHubPatClient initialized with PAT");
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
this.log("GITHUB_TOKEN not set - will use OAuth device flow when GitHub access is needed");
|
|
86
|
-
}
|
|
87
|
-
this.workspaceService.onEvent((event) => {
|
|
88
|
-
this.emitEvent(event);
|
|
89
|
-
});
|
|
90
|
-
this.log("CodingWorkspaceService initialized");
|
|
91
|
-
// Run startup GC in background (non-blocking)
|
|
92
|
-
this.gcOrphanedWorkspaces().catch((err) => {
|
|
93
|
-
console.warn("[CodingWorkspaceService] Startup GC failed:", err);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
async stop() {
|
|
97
|
-
for (const timer of this.scratchCleanupTimers.values()) {
|
|
98
|
-
clearTimeout(timer);
|
|
99
|
-
}
|
|
100
|
-
this.scratchCleanupTimers.clear();
|
|
101
|
-
for (const [id] of this.workspaces) {
|
|
102
|
-
try {
|
|
103
|
-
await this.removeWorkspace(id);
|
|
104
|
-
}
|
|
105
|
-
catch (err) {
|
|
106
|
-
this.log(`Error cleaning up workspace ${id}: ${err}`);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
this.workspaces.clear();
|
|
110
|
-
this.workspaceService = null;
|
|
111
|
-
this.credentialService = null;
|
|
112
|
-
this.githubClient = null;
|
|
113
|
-
this.log("CodingWorkspaceService shutdown complete");
|
|
114
|
-
}
|
|
115
|
-
/** Provision a new workspace */
|
|
116
|
-
async provisionWorkspace(options) {
|
|
117
|
-
if (!this.workspaceService) {
|
|
118
|
-
throw new Error("CodingWorkspaceService not initialized");
|
|
119
|
-
}
|
|
120
|
-
// Normalize common shorthand like owner/repo before handing it to the
|
|
121
|
-
// lower-level clone service, which expects an actual remote URL.
|
|
122
|
-
const repo = normalizeRepositoryInput(options.repo);
|
|
123
|
-
const executionId = options.execution?.id ?? `exec-${Date.now()}`;
|
|
124
|
-
const taskId = options.task?.id ?? `task-${Date.now()}`;
|
|
125
|
-
const workspaceConfig = {
|
|
126
|
-
repo,
|
|
127
|
-
strategy: options.useWorktree ? "worktree" : "clone",
|
|
128
|
-
parentWorkspace: options.parentWorkspaceId,
|
|
129
|
-
branchStrategy: "feature_branch",
|
|
130
|
-
branchName: options.branchName,
|
|
131
|
-
baseBranch: options.baseBranch ?? "main",
|
|
132
|
-
execution: {
|
|
133
|
-
id: executionId,
|
|
134
|
-
patternName: options.execution?.patternName ?? "eliza-coding",
|
|
135
|
-
},
|
|
136
|
-
task: {
|
|
137
|
-
id: taskId,
|
|
138
|
-
role: options.task?.role ?? "coding-agent",
|
|
139
|
-
slug: options.task?.slug,
|
|
140
|
-
},
|
|
141
|
-
userCredentials: options.userCredentials
|
|
142
|
-
? {
|
|
143
|
-
type: options.userCredentials.type,
|
|
144
|
-
token: options.userCredentials.token ?? "",
|
|
145
|
-
provider: "github",
|
|
146
|
-
}
|
|
147
|
-
: undefined,
|
|
148
|
-
};
|
|
149
|
-
const workspace = await this.workspaceService.provision(workspaceConfig);
|
|
150
|
-
const result = {
|
|
151
|
-
id: workspace.id,
|
|
152
|
-
path: workspace.path,
|
|
153
|
-
branch: workspace.branch.name,
|
|
154
|
-
baseBranch: workspace.branch.baseBranch,
|
|
155
|
-
isWorktree: workspace.strategy === "worktree",
|
|
156
|
-
repo: workspace.repo,
|
|
157
|
-
status: workspace.status,
|
|
158
|
-
};
|
|
159
|
-
this.workspaces.set(workspace.id, result);
|
|
160
|
-
this.log(`Provisioned workspace ${workspace.id}`);
|
|
161
|
-
return result;
|
|
162
|
-
}
|
|
163
|
-
getWorkspace(id) {
|
|
164
|
-
return this.workspaces.get(id);
|
|
165
|
-
}
|
|
166
|
-
listWorkspaces() {
|
|
167
|
-
return Array.from(this.workspaces.values());
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Assign a semantic label to a workspace (e.g. "auth-bugfix").
|
|
171
|
-
* If the label already exists, it is reassigned to the new workspace.
|
|
172
|
-
*/
|
|
173
|
-
setLabel(workspaceId, label) {
|
|
174
|
-
const workspace = this.workspaces.get(workspaceId);
|
|
175
|
-
if (!workspace) {
|
|
176
|
-
throw new Error(`Workspace ${workspaceId} not found`);
|
|
177
|
-
}
|
|
178
|
-
if (workspace.label) {
|
|
179
|
-
this.labels.delete(workspace.label);
|
|
180
|
-
}
|
|
181
|
-
const existing = this.labels.get(label);
|
|
182
|
-
if (existing && existing !== workspaceId) {
|
|
183
|
-
const oldWs = this.workspaces.get(existing);
|
|
184
|
-
if (oldWs)
|
|
185
|
-
oldWs.label = undefined;
|
|
186
|
-
}
|
|
187
|
-
workspace.label = label;
|
|
188
|
-
this.labels.set(label, workspaceId);
|
|
189
|
-
this.log(`Labeled workspace ${workspaceId} as "${label}"`);
|
|
190
|
-
}
|
|
191
|
-
getWorkspaceByLabel(label) {
|
|
192
|
-
const id = this.labels.get(label);
|
|
193
|
-
return id ? this.workspaces.get(id) : undefined;
|
|
194
|
-
}
|
|
195
|
-
/** Resolve a workspace by label or ID. */
|
|
196
|
-
resolveWorkspace(labelOrId) {
|
|
197
|
-
return (this.getWorkspaceByLabel(labelOrId) ?? this.workspaces.get(labelOrId));
|
|
198
|
-
}
|
|
199
|
-
// === Delegated Git Operations ===
|
|
200
|
-
async getStatus(workspaceId) {
|
|
201
|
-
const workspace = this.workspaces.get(workspaceId);
|
|
202
|
-
if (!workspace) {
|
|
203
|
-
throw new Error(`Workspace ${workspaceId} not found`);
|
|
204
|
-
}
|
|
205
|
-
return gitGetStatus(workspace.path);
|
|
206
|
-
}
|
|
207
|
-
async commit(workspaceId, options) {
|
|
208
|
-
const workspace = this.workspaces.get(workspaceId);
|
|
209
|
-
if (!workspace) {
|
|
210
|
-
throw new Error(`Workspace ${workspaceId} not found`);
|
|
211
|
-
}
|
|
212
|
-
const hash = await gitCommit(workspace.path, options, (msg) => this.log(msg));
|
|
213
|
-
this.log(`Committed ${hash.slice(0, 8)} in workspace ${workspaceId}`);
|
|
214
|
-
return hash;
|
|
215
|
-
}
|
|
216
|
-
async push(workspaceId, options) {
|
|
217
|
-
const workspace = this.workspaces.get(workspaceId);
|
|
218
|
-
if (!workspace) {
|
|
219
|
-
throw new Error(`Workspace ${workspaceId} not found`);
|
|
220
|
-
}
|
|
221
|
-
await gitPush(workspace.path, workspace.branch, options, (msg) => this.log(msg));
|
|
222
|
-
this.log(`Pushed workspace ${workspaceId}`);
|
|
223
|
-
}
|
|
224
|
-
async createPR(workspaceId, options) {
|
|
225
|
-
if (!this.workspaceService) {
|
|
226
|
-
throw new Error("CodingWorkspaceService not initialized");
|
|
227
|
-
}
|
|
228
|
-
const workspace = this.workspaces.get(workspaceId);
|
|
229
|
-
if (!workspace) {
|
|
230
|
-
throw new Error(`Workspace ${workspaceId} not found`);
|
|
231
|
-
}
|
|
232
|
-
return gitCreatePR(this.workspaceService, workspace, workspaceId, options, (msg) => this.log(msg));
|
|
233
|
-
}
|
|
234
|
-
// === Delegated GitHub / Issue Management ===
|
|
235
|
-
getGitHubContext() {
|
|
236
|
-
return {
|
|
237
|
-
runtime: this.runtime,
|
|
238
|
-
githubClient: this.githubClient,
|
|
239
|
-
setGithubClient: (client) => {
|
|
240
|
-
this.githubClient = client;
|
|
241
|
-
},
|
|
242
|
-
githubAuthInProgress: this.githubAuthInProgress,
|
|
243
|
-
setGithubAuthInProgress: (p) => {
|
|
244
|
-
this.githubAuthInProgress = p;
|
|
245
|
-
},
|
|
246
|
-
authPromptCallback: this.authPromptCallback,
|
|
247
|
-
log: (msg) => this.log(msg),
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
/** Set a callback to surface OAuth auth prompts to the user. */
|
|
251
|
-
setAuthPromptCallback(callback) {
|
|
252
|
-
this.authPromptCallback = callback;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Register a callback fired when a scratch workspace enters pending_decision.
|
|
256
|
-
* Used to prompt the user via chat: "Want to keep this code?"
|
|
257
|
-
*/
|
|
258
|
-
setScratchDecisionCallback(callback) {
|
|
259
|
-
this.scratchDecisionCallback = callback;
|
|
260
|
-
}
|
|
261
|
-
async createIssue(repo, options) {
|
|
262
|
-
return ghCreateIssue(this.getGitHubContext(), repo, options);
|
|
263
|
-
}
|
|
264
|
-
async getIssue(repo, issueNumber) {
|
|
265
|
-
return ghGetIssue(this.getGitHubContext(), repo, issueNumber);
|
|
266
|
-
}
|
|
267
|
-
async listIssues(repo, options) {
|
|
268
|
-
return ghListIssues(this.getGitHubContext(), repo, options);
|
|
269
|
-
}
|
|
270
|
-
async updateIssue(repo, issueNumber, options) {
|
|
271
|
-
return ghUpdateIssue(this.getGitHubContext(), repo, issueNumber, options);
|
|
272
|
-
}
|
|
273
|
-
async addComment(repo, issueNumber, body) {
|
|
274
|
-
return ghAddComment(this.getGitHubContext(), repo, issueNumber, body);
|
|
275
|
-
}
|
|
276
|
-
async listComments(repo, issueNumber) {
|
|
277
|
-
return ghListComments(this.getGitHubContext(), repo, issueNumber);
|
|
278
|
-
}
|
|
279
|
-
async closeIssue(repo, issueNumber) {
|
|
280
|
-
return ghCloseIssue(this.getGitHubContext(), repo, issueNumber);
|
|
281
|
-
}
|
|
282
|
-
async reopenIssue(repo, issueNumber) {
|
|
283
|
-
return ghReopenIssue(this.getGitHubContext(), repo, issueNumber);
|
|
284
|
-
}
|
|
285
|
-
async addLabels(repo, issueNumber, labels) {
|
|
286
|
-
return ghAddLabels(this.getGitHubContext(), repo, issueNumber, labels);
|
|
287
|
-
}
|
|
288
|
-
// === Workspace Lifecycle ===
|
|
289
|
-
async removeWorkspace(workspaceId) {
|
|
290
|
-
if (!this.workspaceService) {
|
|
291
|
-
throw new Error("CodingWorkspaceService not initialized");
|
|
292
|
-
}
|
|
293
|
-
await this.workspaceService.cleanup(workspaceId);
|
|
294
|
-
const workspace = this.workspaces.get(workspaceId);
|
|
295
|
-
if (workspace?.label) {
|
|
296
|
-
this.labels.delete(workspace.label);
|
|
297
|
-
}
|
|
298
|
-
this.workspaces.delete(workspaceId);
|
|
299
|
-
this.log(`Removed workspace ${workspaceId}`);
|
|
300
|
-
}
|
|
301
|
-
onEvent(callback) {
|
|
302
|
-
this.eventCallbacks.push(callback);
|
|
303
|
-
return () => {
|
|
304
|
-
const index = this.eventCallbacks.indexOf(callback);
|
|
305
|
-
if (index !== -1) {
|
|
306
|
-
this.eventCallbacks.splice(index, 1);
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
emitEvent(event) {
|
|
311
|
-
for (const callback of this.eventCallbacks) {
|
|
312
|
-
try {
|
|
313
|
-
callback(event);
|
|
314
|
-
}
|
|
315
|
-
catch (err) {
|
|
316
|
-
this.log(`Event callback error: ${err}`);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
/** Remove a scratch directory — allowed under base dir or user coding directory. */
|
|
321
|
-
async removeScratchDir(dirPath) {
|
|
322
|
-
const rawCodingDir = this.runtime.getSetting("PARALLAX_CODING_DIRECTORY") ??
|
|
323
|
-
this.readConfigEnvKey("PARALLAX_CODING_DIRECTORY") ??
|
|
324
|
-
process.env.PARALLAX_CODING_DIRECTORY;
|
|
325
|
-
const codingDir = rawCodingDir?.trim()
|
|
326
|
-
? rawCodingDir.trim().startsWith("~")
|
|
327
|
-
? path.join(os.homedir(), rawCodingDir.trim().slice(1))
|
|
328
|
-
: path.resolve(rawCodingDir.trim())
|
|
329
|
-
: undefined;
|
|
330
|
-
const allowedDirs = codingDir ? [codingDir] : undefined;
|
|
331
|
-
return removeScratchDir(dirPath, this.serviceConfig.baseDir, (msg) => this.log(msg), allowedDirs);
|
|
332
|
-
}
|
|
333
|
-
listScratchWorkspaces() {
|
|
334
|
-
return Array.from(this.scratchBySession.values()).sort((a, b) => b.terminalAt - a.terminalAt);
|
|
335
|
-
}
|
|
336
|
-
async registerScratchWorkspace(sessionId, dirPath, label, terminalEvent) {
|
|
337
|
-
const now = Date.now();
|
|
338
|
-
const existing = this.scratchBySession.get(sessionId);
|
|
339
|
-
const base = existing ?? {
|
|
340
|
-
sessionId,
|
|
341
|
-
label,
|
|
342
|
-
path: dirPath,
|
|
343
|
-
createdAt: now,
|
|
344
|
-
terminalAt: now,
|
|
345
|
-
terminalEvent,
|
|
346
|
-
status: "pending_decision",
|
|
347
|
-
};
|
|
348
|
-
const policy = this.getScratchRetentionPolicy();
|
|
349
|
-
this.log(`Scratch retention policy: "${policy}" for "${label}"`);
|
|
350
|
-
if (policy === "ephemeral") {
|
|
351
|
-
await this.removeScratchDir(dirPath);
|
|
352
|
-
this.scratchBySession.delete(sessionId);
|
|
353
|
-
this.clearScratchCleanupTimer(sessionId);
|
|
354
|
-
return null;
|
|
355
|
-
}
|
|
356
|
-
const record = {
|
|
357
|
-
...base,
|
|
358
|
-
label,
|
|
359
|
-
path: dirPath,
|
|
360
|
-
terminalAt: now,
|
|
361
|
-
terminalEvent,
|
|
362
|
-
status: policy === "persistent" ? "kept" : "pending_decision",
|
|
363
|
-
expiresAt: undefined,
|
|
364
|
-
};
|
|
365
|
-
this.scratchBySession.set(sessionId, record);
|
|
366
|
-
if (record.status === "pending_decision") {
|
|
367
|
-
const ttlMs = this.getScratchDecisionTtlMs();
|
|
368
|
-
record.expiresAt = now + ttlMs;
|
|
369
|
-
this.scheduleScratchCleanup(sessionId, ttlMs);
|
|
370
|
-
// Prompt user via chat: "Want to keep this code?"
|
|
371
|
-
if (this.scratchDecisionCallback) {
|
|
372
|
-
this.log(`Firing scratch decision prompt for "${label}" at ${dirPath}`);
|
|
373
|
-
this.scratchDecisionCallback(record).catch((err) => {
|
|
374
|
-
console.warn(`[workspace] Failed to send scratch decision prompt: ${err}`);
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
else {
|
|
378
|
-
this.log(`No scratch decision callback wired — skipping prompt for "${label}"`);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
else {
|
|
382
|
-
this.clearScratchCleanupTimer(sessionId);
|
|
383
|
-
}
|
|
384
|
-
return record;
|
|
385
|
-
}
|
|
386
|
-
async keepScratchWorkspace(sessionId) {
|
|
387
|
-
const record = this.requireScratchWorkspace(sessionId);
|
|
388
|
-
const next = {
|
|
389
|
-
...record,
|
|
390
|
-
status: "kept",
|
|
391
|
-
expiresAt: undefined,
|
|
392
|
-
};
|
|
393
|
-
this.scratchBySession.set(sessionId, next);
|
|
394
|
-
this.clearScratchCleanupTimer(sessionId);
|
|
395
|
-
return next;
|
|
396
|
-
}
|
|
397
|
-
async deleteScratchWorkspace(sessionId) {
|
|
398
|
-
const record = this.requireScratchWorkspace(sessionId);
|
|
399
|
-
await this.removeScratchDir(record.path);
|
|
400
|
-
this.scratchBySession.delete(sessionId);
|
|
401
|
-
this.clearScratchCleanupTimer(sessionId);
|
|
402
|
-
}
|
|
403
|
-
async promoteScratchWorkspace(sessionId, name) {
|
|
404
|
-
const record = this.requireScratchWorkspace(sessionId);
|
|
405
|
-
const baseDir = this.serviceConfig.baseDir;
|
|
406
|
-
const suggestedName = this.sanitizeWorkspaceName(name || record.label);
|
|
407
|
-
const targetPath = await this.allocatePromotedPath(baseDir, suggestedName);
|
|
408
|
-
try {
|
|
409
|
-
await fs.rename(record.path, targetPath);
|
|
410
|
-
}
|
|
411
|
-
catch (error) {
|
|
412
|
-
const isExdev = typeof error === "object" &&
|
|
413
|
-
error !== null &&
|
|
414
|
-
"code" in error &&
|
|
415
|
-
error.code === "EXDEV";
|
|
416
|
-
if (!isExdev)
|
|
417
|
-
throw error;
|
|
418
|
-
await fs.cp(record.path, targetPath, { recursive: true });
|
|
419
|
-
await fs.access(targetPath);
|
|
420
|
-
await fs.rm(record.path, { recursive: true, force: true });
|
|
421
|
-
}
|
|
422
|
-
const next = {
|
|
423
|
-
...record,
|
|
424
|
-
path: targetPath,
|
|
425
|
-
status: "promoted",
|
|
426
|
-
expiresAt: undefined,
|
|
427
|
-
};
|
|
428
|
-
this.scratchBySession.set(sessionId, next);
|
|
429
|
-
this.clearScratchCleanupTimer(sessionId);
|
|
430
|
-
return next;
|
|
431
|
-
}
|
|
432
|
-
/** GC orphaned workspace directories older than workspaceTtlMs. */
|
|
433
|
-
async gcOrphanedWorkspaces() {
|
|
434
|
-
return gcOrphanedWorkspaces(this.serviceConfig.baseDir, this.serviceConfig.workspaceTtlMs ?? 24 * 60 * 60 * 1000, new Set(this.workspaces.keys()), (msg) => this.log(msg));
|
|
435
|
-
}
|
|
436
|
-
log(message) {
|
|
437
|
-
if (this.serviceConfig.debug) {
|
|
438
|
-
console.log(`[CodingWorkspaceService] ${message}`);
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
/** Read a key from the config file's env section (live, no restart needed). */
|
|
442
|
-
readConfigEnvKey(key) {
|
|
443
|
-
return readConfigEnvKey(key);
|
|
444
|
-
}
|
|
445
|
-
getScratchRetentionPolicy() {
|
|
446
|
-
const setting = (this.runtime.getSetting("PARALLAX_SCRATCH_RETENTION") ??
|
|
447
|
-
this.readConfigEnvKey("PARALLAX_SCRATCH_RETENTION") ??
|
|
448
|
-
process.env.PARALLAX_SCRATCH_RETENTION);
|
|
449
|
-
const normalized = setting?.trim().toLowerCase();
|
|
450
|
-
if (normalized === "ephemeral")
|
|
451
|
-
return "ephemeral";
|
|
452
|
-
if (normalized === "persistent" || normalized === "keep") {
|
|
453
|
-
return "persistent";
|
|
454
|
-
}
|
|
455
|
-
// When a coding directory is configured and no explicit retention was set,
|
|
456
|
-
// default to persistent — users don't expect named folders in ~/Projects
|
|
457
|
-
// to auto-delete. If the user explicitly chose pending_decision, respect it.
|
|
458
|
-
if (!normalized) {
|
|
459
|
-
const codingDir = this.runtime.getSetting("PARALLAX_CODING_DIRECTORY") ??
|
|
460
|
-
this.readConfigEnvKey("PARALLAX_CODING_DIRECTORY") ??
|
|
461
|
-
process.env.PARALLAX_CODING_DIRECTORY;
|
|
462
|
-
if (codingDir?.trim())
|
|
463
|
-
return "persistent";
|
|
464
|
-
}
|
|
465
|
-
return "pending_decision";
|
|
466
|
-
}
|
|
467
|
-
getScratchDecisionTtlMs() {
|
|
468
|
-
const setting = this.runtime.getSetting("PARALLAX_SCRATCH_DECISION_TTL_MS");
|
|
469
|
-
const parsed = Number(setting ?? process.env.PARALLAX_SCRATCH_DECISION_TTL_MS);
|
|
470
|
-
if (Number.isFinite(parsed) && parsed > 0)
|
|
471
|
-
return parsed;
|
|
472
|
-
return 24 * 60 * 60 * 1000;
|
|
473
|
-
}
|
|
474
|
-
requireScratchWorkspace(sessionId) {
|
|
475
|
-
const record = this.scratchBySession.get(sessionId);
|
|
476
|
-
if (!record) {
|
|
477
|
-
throw new Error(`Scratch workspace for session ${sessionId} not found`);
|
|
478
|
-
}
|
|
479
|
-
return record;
|
|
480
|
-
}
|
|
481
|
-
clearScratchCleanupTimer(sessionId) {
|
|
482
|
-
const timer = this.scratchCleanupTimers.get(sessionId);
|
|
483
|
-
if (timer) {
|
|
484
|
-
clearTimeout(timer);
|
|
485
|
-
this.scratchCleanupTimers.delete(sessionId);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
scheduleScratchCleanup(sessionId, ttlMs) {
|
|
489
|
-
this.clearScratchCleanupTimer(sessionId);
|
|
490
|
-
const timer = setTimeout(async () => {
|
|
491
|
-
try {
|
|
492
|
-
const record = this.scratchBySession.get(sessionId);
|
|
493
|
-
if (!record || record.status !== "pending_decision")
|
|
494
|
-
return;
|
|
495
|
-
await this.removeScratchDir(record.path);
|
|
496
|
-
}
|
|
497
|
-
catch (error) {
|
|
498
|
-
console.warn(`[CodingWorkspaceService] scratch cleanup failed for ${sessionId}: ${String(error)}`);
|
|
499
|
-
}
|
|
500
|
-
finally {
|
|
501
|
-
this.scratchBySession.delete(sessionId);
|
|
502
|
-
this.scratchCleanupTimers.delete(sessionId);
|
|
503
|
-
}
|
|
504
|
-
}, ttlMs);
|
|
505
|
-
this.scratchCleanupTimers.set(sessionId, timer);
|
|
506
|
-
}
|
|
507
|
-
sanitizeWorkspaceName(raw) {
|
|
508
|
-
const compact = raw
|
|
509
|
-
.toLowerCase()
|
|
510
|
-
.replace(/[^a-z0-9._-]+/g, "-")
|
|
511
|
-
.replace(/-+/g, "-")
|
|
512
|
-
.replace(/^-|-$/g, "");
|
|
513
|
-
return compact || `scratch-${Date.now().toString(36)}`;
|
|
514
|
-
}
|
|
515
|
-
async allocatePromotedPath(baseDir, baseName) {
|
|
516
|
-
const baseResolved = path.resolve(baseDir);
|
|
517
|
-
for (let i = 0; i < 1000; i++) {
|
|
518
|
-
const candidateName = i === 0 ? baseName : `${baseName}-${i}`;
|
|
519
|
-
const candidate = path.resolve(baseResolved, candidateName);
|
|
520
|
-
if (candidate !== baseResolved &&
|
|
521
|
-
!candidate.startsWith(`${baseResolved}${path.sep}`)) {
|
|
522
|
-
continue;
|
|
523
|
-
}
|
|
524
|
-
try {
|
|
525
|
-
await fs.access(candidate);
|
|
526
|
-
}
|
|
527
|
-
catch {
|
|
528
|
-
return candidate;
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
throw new Error("Unable to allocate promoted workspace path");
|
|
532
|
-
}
|
|
533
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definitions for the Coding Workspace Service.
|
|
3
|
-
*
|
|
4
|
-
* Extracted from workspace-service.ts to reduce module size.
|
|
5
|
-
*
|
|
6
|
-
* @module services/workspace-types
|
|
7
|
-
*/
|
|
8
|
-
import type { WorkspaceStatus } from "git-workspace-service";
|
|
9
|
-
export interface CodingWorkspaceConfig {
|
|
10
|
-
/** Base directory for workspaces (default: ~/.eliza/workspaces) */
|
|
11
|
-
baseDir?: string;
|
|
12
|
-
/** Branch prefix (default: "eliza") */
|
|
13
|
-
branchPrefix?: string;
|
|
14
|
-
/** Enable debug logging */
|
|
15
|
-
debug?: boolean;
|
|
16
|
-
/** Max age for orphaned workspace directories in ms (default: 24 hours). Set to 0 to disable GC. */
|
|
17
|
-
workspaceTtlMs?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface ProvisionWorkspaceOptions {
|
|
20
|
-
/** Git repository URL */
|
|
21
|
-
repo: string;
|
|
22
|
-
/** Base branch to create from (default: "main") */
|
|
23
|
-
baseBranch?: string;
|
|
24
|
-
/** Exact branch name to use (overrides auto-generated name) */
|
|
25
|
-
branchName?: string;
|
|
26
|
-
/** Use worktree instead of clone */
|
|
27
|
-
useWorktree?: boolean;
|
|
28
|
-
/** Parent workspace ID for worktree */
|
|
29
|
-
parentWorkspaceId?: string;
|
|
30
|
-
/** Execution context */
|
|
31
|
-
execution?: {
|
|
32
|
-
id: string;
|
|
33
|
-
patternName: string;
|
|
34
|
-
};
|
|
35
|
-
/** Task context */
|
|
36
|
-
task?: {
|
|
37
|
-
id: string;
|
|
38
|
-
role: string;
|
|
39
|
-
slug?: string;
|
|
40
|
-
};
|
|
41
|
-
/** User-provided credentials */
|
|
42
|
-
userCredentials?: {
|
|
43
|
-
type: "pat" | "oauth" | "ssh";
|
|
44
|
-
token?: string;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
export interface WorkspaceResult {
|
|
48
|
-
id: string;
|
|
49
|
-
path: string;
|
|
50
|
-
branch: string;
|
|
51
|
-
baseBranch: string;
|
|
52
|
-
isWorktree: boolean;
|
|
53
|
-
repo: string;
|
|
54
|
-
status: WorkspaceStatus;
|
|
55
|
-
/** Semantic label for referencing this workspace (e.g. "auth-bugfix", "api-tests") */
|
|
56
|
-
label?: string;
|
|
57
|
-
}
|
|
58
|
-
export interface CommitOptions {
|
|
59
|
-
message: string;
|
|
60
|
-
all?: boolean;
|
|
61
|
-
}
|
|
62
|
-
export interface PushOptions {
|
|
63
|
-
setUpstream?: boolean;
|
|
64
|
-
force?: boolean;
|
|
65
|
-
}
|
|
66
|
-
export interface PROptions {
|
|
67
|
-
title: string;
|
|
68
|
-
body: string;
|
|
69
|
-
base?: string;
|
|
70
|
-
draft?: boolean;
|
|
71
|
-
labels?: string[];
|
|
72
|
-
reviewers?: string[];
|
|
73
|
-
}
|
|
74
|
-
export interface WorkspaceStatusResult {
|
|
75
|
-
branch: string;
|
|
76
|
-
clean: boolean;
|
|
77
|
-
modified: string[];
|
|
78
|
-
staged: string[];
|
|
79
|
-
untracked: string[];
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=workspace-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-types.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/workspace-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,qBAAqB;IACrC,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oGAAoG;IACpG,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,yBAAyB;IACzC,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wBAAwB;IACxB,SAAS,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,mBAAmB;IACnB,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnD,gCAAgC;IAChC,eAAe,CAAC,EAAE;QAAE,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACpE;AAED,MAAM,WAAW,eAAe;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,eAAe,CAAC;IACxB,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,qBAAqB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Posts task-agent status updates back to the originating chat channel.
|
|
3
|
-
*
|
|
4
|
-
* Subscribes to `ptyService.onSessionEvent` and turns the most useful
|
|
5
|
-
* lifecycle events into a small number of human-readable messages so the
|
|
6
|
-
* user is not left staring at silence while a CREATE_TASK runs in the
|
|
7
|
-
* background. Deliberately quiet — never spams per-tool, never edits, just
|
|
8
|
-
* one heartbeat after a long stretch of work plus a final result.
|
|
9
|
-
*
|
|
10
|
-
* UX contract:
|
|
11
|
-
* - skip immediately after spawn (the action's own ack already covered it)
|
|
12
|
-
* - one heartbeat per session, only if the agent is still working after
|
|
13
|
-
* {@link HEARTBEAT_AFTER_MS}
|
|
14
|
-
* - one final message on `task_complete` containing the agent's URL line
|
|
15
|
-
* when present, or a short fallback otherwise
|
|
16
|
-
* - one error message on `error`
|
|
17
|
-
*
|
|
18
|
-
* Lives in eliza (not in the shared plugin) because routing back to a
|
|
19
|
-
* specific chat target is deployment-specific — other deployments may not
|
|
20
|
-
* have a discord channel id to write to.
|
|
21
|
-
*/
|
|
22
|
-
import type { IAgentRuntime } from "@elizaos/core";
|
|
23
|
-
/**
|
|
24
|
-
* Install the streamer once per runtime. Idempotent — repeat calls are no-ops.
|
|
25
|
-
* Returns silently if the PTY service does not expose the event API (e.g.
|
|
26
|
-
* tests, mocked services).
|
|
27
|
-
*/
|
|
28
|
-
export declare function installTaskProgressStreamer(runtime: IAgentRuntime, ptyService: unknown): void;
|
|
29
|
-
/**
|
|
30
|
-
* Split `text` into chunks no larger than `max` characters, preferring to
|
|
31
|
-
* break at paragraph boundaries (\n\n), then line boundaries (\n), then
|
|
32
|
-
* word boundaries (space). Discord's hard limit per message is 2000 chars —
|
|
33
|
-
* callers should pass 1900 or lower to leave headroom for formatting.
|
|
34
|
-
*
|
|
35
|
-
* Exported for tests.
|
|
36
|
-
*/
|
|
37
|
-
export declare function chunkForDiscord(text: string, max: number): string[];
|
|
38
|
-
//# sourceMappingURL=task-progress-streamer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-progress-streamer.d.ts","sourceRoot":"","sources":["../../../../../../../typescript/src/features/orchestrator/task-progress-streamer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAQ,MAAM,eAAe,CAAC;AAsBzD;;;;GAIG;AACH,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,OAAO,GACjB,IAAI,CAqNN;AAuCD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBnE"}
|