@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,403 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Swarm Coordinator Route Handlers
|
|
3
|
-
*
|
|
4
|
-
* Provides SSE streaming and HTTP API for the coordination layer:
|
|
5
|
-
* - SSE event stream for real-time dashboard
|
|
6
|
-
* - Task status and context queries
|
|
7
|
-
* - Pending confirmation management
|
|
8
|
-
* - Supervision level control
|
|
9
|
-
*
|
|
10
|
-
* @module api/coordinator-routes
|
|
11
|
-
*/
|
|
12
|
-
import { getTaskAgentFrameworkState } from "../services/task-agent-frameworks.js";
|
|
13
|
-
import { discoverTaskShareOptions } from "../services/task-share.js";
|
|
14
|
-
import { parseBody, sendError, sendJson } from "./routes.js";
|
|
15
|
-
const COORDINATOR_PREFIX = "/api/coding-agents/coordinator";
|
|
16
|
-
/**
|
|
17
|
-
* Handle coordinator routes (/api/coding-agents/coordinator/*)
|
|
18
|
-
* Returns true if the route was handled, false otherwise.
|
|
19
|
-
*/
|
|
20
|
-
export async function handleCoordinatorRoutes(req, res, pathname, ctx) {
|
|
21
|
-
if (!pathname.startsWith(COORDINATOR_PREFIX)) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
const method = req.method?.toUpperCase();
|
|
25
|
-
const subPath = pathname.slice(COORDINATOR_PREFIX.length);
|
|
26
|
-
if (!ctx.coordinator) {
|
|
27
|
-
sendError(res, "Swarm Coordinator not available", 503);
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
const coordinator = ctx.coordinator;
|
|
31
|
-
// === SSE Event Stream ===
|
|
32
|
-
// GET /api/coding-agents/coordinator/events
|
|
33
|
-
if (method === "GET" && subPath === "/events") {
|
|
34
|
-
// CORS is handled by the server middleware — no need to set it here.
|
|
35
|
-
res.writeHead(200, {
|
|
36
|
-
"Content-Type": "text/event-stream",
|
|
37
|
-
"Cache-Control": "no-cache",
|
|
38
|
-
Connection: "keep-alive",
|
|
39
|
-
});
|
|
40
|
-
// Send initial comment to establish connection
|
|
41
|
-
res.write(":ok\n\n");
|
|
42
|
-
// Register as SSE client (sends snapshot on connect)
|
|
43
|
-
const unsubscribe = coordinator.addSseClient(res);
|
|
44
|
-
// Clean up on close
|
|
45
|
-
req.on("close", unsubscribe);
|
|
46
|
-
// Keep-alive ping every 30s
|
|
47
|
-
const keepAlive = setInterval(() => {
|
|
48
|
-
if (res.writableEnded) {
|
|
49
|
-
clearInterval(keepAlive);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
res.write(":ping\n\n");
|
|
53
|
-
}, 30_000);
|
|
54
|
-
req.on("close", () => clearInterval(keepAlive));
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
// === All Task Contexts ===
|
|
58
|
-
// GET /api/coding-agents/coordinator/status
|
|
59
|
-
if (method === "GET" && subPath === "/status") {
|
|
60
|
-
const allTasks = coordinator.getAllTaskContexts();
|
|
61
|
-
const persistedThreads = await coordinator.listTaskThreads({
|
|
62
|
-
includeArchived: false,
|
|
63
|
-
limit: 50,
|
|
64
|
-
});
|
|
65
|
-
// Only return active tasks — stopped/completed/error are terminal states
|
|
66
|
-
// and should not appear in the UI after refresh.
|
|
67
|
-
const tasks = allTasks.filter((t) => t.status !== "stopped" &&
|
|
68
|
-
t.status !== "completed" &&
|
|
69
|
-
t.status !== "error");
|
|
70
|
-
const recentTasks = allTasks
|
|
71
|
-
.slice()
|
|
72
|
-
.sort((left, right) => right.registeredAt - left.registeredAt)
|
|
73
|
-
.slice(0, 10);
|
|
74
|
-
const frameworkState = await getTaskAgentFrameworkState(ctx.runtime, ctx.ptyService ?? undefined);
|
|
75
|
-
sendJson(res, {
|
|
76
|
-
supervisionLevel: coordinator.getSupervisionLevel(),
|
|
77
|
-
taskCount: tasks.length,
|
|
78
|
-
tasks: tasks.map((t) => ({
|
|
79
|
-
threadId: t.threadId,
|
|
80
|
-
taskNodeId: t.taskNodeId ?? null,
|
|
81
|
-
sessionId: t.sessionId,
|
|
82
|
-
agentType: t.agentType,
|
|
83
|
-
label: t.label,
|
|
84
|
-
originalTask: t.originalTask,
|
|
85
|
-
workdir: t.workdir,
|
|
86
|
-
status: t.status,
|
|
87
|
-
decisionCount: t.decisions.length,
|
|
88
|
-
autoResolvedCount: t.autoResolvedCount,
|
|
89
|
-
completionSummary: t.completionSummary,
|
|
90
|
-
lastActivityAt: t.lastActivityAt,
|
|
91
|
-
})),
|
|
92
|
-
recentTasks: recentTasks.map((t) => ({
|
|
93
|
-
threadId: t.threadId,
|
|
94
|
-
taskNodeId: t.taskNodeId ?? null,
|
|
95
|
-
sessionId: t.sessionId,
|
|
96
|
-
agentType: t.agentType,
|
|
97
|
-
label: t.label,
|
|
98
|
-
status: t.status,
|
|
99
|
-
originalTask: t.originalTask,
|
|
100
|
-
completionSummary: t.completionSummary,
|
|
101
|
-
registeredAt: t.registeredAt,
|
|
102
|
-
lastActivityAt: t.lastActivityAt,
|
|
103
|
-
})),
|
|
104
|
-
taskThreadCount: persistedThreads.length,
|
|
105
|
-
taskThreads: persistedThreads.map((thread) => ({
|
|
106
|
-
id: thread.id,
|
|
107
|
-
title: thread.title,
|
|
108
|
-
kind: thread.kind,
|
|
109
|
-
status: thread.status,
|
|
110
|
-
scenarioId: thread.scenarioId,
|
|
111
|
-
batchId: thread.batchId,
|
|
112
|
-
originalRequest: thread.originalRequest,
|
|
113
|
-
summary: thread.summary,
|
|
114
|
-
sessionCount: thread.sessionCount,
|
|
115
|
-
activeSessionCount: thread.activeSessionCount,
|
|
116
|
-
latestSessionId: thread.latestSessionId,
|
|
117
|
-
latestSessionLabel: thread.latestSessionLabel,
|
|
118
|
-
latestWorkdir: thread.latestWorkdir,
|
|
119
|
-
latestRepo: thread.latestRepo,
|
|
120
|
-
latestActivityAt: thread.latestActivityAt,
|
|
121
|
-
decisionCount: thread.decisionCount,
|
|
122
|
-
nodeCount: thread.nodeCount,
|
|
123
|
-
readyNodeCount: thread.readyNodeCount,
|
|
124
|
-
completedNodeCount: thread.completedNodeCount,
|
|
125
|
-
verifierJobCount: thread.verifierJobCount,
|
|
126
|
-
evidenceCount: thread.evidenceCount,
|
|
127
|
-
createdAt: thread.createdAt,
|
|
128
|
-
updatedAt: thread.updatedAt,
|
|
129
|
-
closedAt: thread.closedAt,
|
|
130
|
-
archivedAt: thread.archivedAt,
|
|
131
|
-
})),
|
|
132
|
-
pendingConfirmations: coordinator.getPendingConfirmations().length,
|
|
133
|
-
preferredAgentType: frameworkState.preferred.id,
|
|
134
|
-
preferredAgentReason: frameworkState.preferred.reason,
|
|
135
|
-
frameworks: frameworkState.frameworks,
|
|
136
|
-
});
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
// === Task Threads ===
|
|
140
|
-
// GET /api/coding-agents/coordinator/threads
|
|
141
|
-
if (method === "GET" && subPath === "/threads") {
|
|
142
|
-
const url = new URL(req.url ?? pathname, "http://localhost");
|
|
143
|
-
const includeArchived = url.searchParams.get("includeArchived") === "true";
|
|
144
|
-
const status = url.searchParams.get("status") ?? undefined;
|
|
145
|
-
const statusesRaw = url.searchParams.get("statuses");
|
|
146
|
-
const statuses = statusesRaw
|
|
147
|
-
?.split(",")
|
|
148
|
-
.map((value) => value.trim())
|
|
149
|
-
.filter(Boolean);
|
|
150
|
-
const kind = (url.searchParams.get("kind") ?? undefined);
|
|
151
|
-
const roomId = url.searchParams.get("roomId") ?? undefined;
|
|
152
|
-
const worldId = url.searchParams.get("worldId") ?? undefined;
|
|
153
|
-
const ownerUserId = url.searchParams.get("ownerUserId") ?? undefined;
|
|
154
|
-
const scenarioId = url.searchParams.get("scenarioId") ?? undefined;
|
|
155
|
-
const batchId = url.searchParams.get("batchId") ?? undefined;
|
|
156
|
-
const createdAfter = url.searchParams.get("createdAfter") ?? undefined;
|
|
157
|
-
const createdBefore = url.searchParams.get("createdBefore") ?? undefined;
|
|
158
|
-
const updatedAfter = url.searchParams.get("updatedAfter") ?? undefined;
|
|
159
|
-
const updatedBefore = url.searchParams.get("updatedBefore") ?? undefined;
|
|
160
|
-
const latestActivityAfterRaw = url.searchParams.get("latestActivityAfter");
|
|
161
|
-
const latestActivityBeforeRaw = url.searchParams.get("latestActivityBefore");
|
|
162
|
-
const latestActivityAfter = latestActivityAfterRaw && Number.isFinite(Number(latestActivityAfterRaw))
|
|
163
|
-
? Number(latestActivityAfterRaw)
|
|
164
|
-
: undefined;
|
|
165
|
-
const latestActivityBefore = latestActivityBeforeRaw &&
|
|
166
|
-
Number.isFinite(Number(latestActivityBeforeRaw))
|
|
167
|
-
? Number(latestActivityBeforeRaw)
|
|
168
|
-
: undefined;
|
|
169
|
-
const hasActiveSessionRaw = url.searchParams.get("hasActiveSession");
|
|
170
|
-
const hasActiveSession = hasActiveSessionRaw === null ? undefined : hasActiveSessionRaw === "true";
|
|
171
|
-
const search = url.searchParams.get("search") ?? undefined;
|
|
172
|
-
const limitRaw = url.searchParams.get("limit");
|
|
173
|
-
const limit = limitRaw && Number.isFinite(Number(limitRaw))
|
|
174
|
-
? Number(limitRaw)
|
|
175
|
-
: undefined;
|
|
176
|
-
const threads = await coordinator.listTaskThreads({
|
|
177
|
-
includeArchived,
|
|
178
|
-
status: status ?? undefined,
|
|
179
|
-
statuses,
|
|
180
|
-
kind,
|
|
181
|
-
roomId,
|
|
182
|
-
worldId,
|
|
183
|
-
ownerUserId,
|
|
184
|
-
scenarioId,
|
|
185
|
-
batchId,
|
|
186
|
-
createdAfter,
|
|
187
|
-
createdBefore,
|
|
188
|
-
updatedAfter,
|
|
189
|
-
updatedBefore,
|
|
190
|
-
latestActivityAfter,
|
|
191
|
-
latestActivityBefore,
|
|
192
|
-
hasActiveSession,
|
|
193
|
-
search,
|
|
194
|
-
limit,
|
|
195
|
-
});
|
|
196
|
-
sendJson(res, threads);
|
|
197
|
-
return true;
|
|
198
|
-
}
|
|
199
|
-
if (method === "GET" && subPath === "/threads/count") {
|
|
200
|
-
const url = new URL(req.url ?? pathname, "http://localhost");
|
|
201
|
-
const includeArchived = url.searchParams.get("includeArchived") === "true";
|
|
202
|
-
const status = url.searchParams.get("status") ?? undefined;
|
|
203
|
-
const statusesRaw = url.searchParams.get("statuses");
|
|
204
|
-
const statuses = statusesRaw
|
|
205
|
-
?.split(",")
|
|
206
|
-
.map((value) => value.trim())
|
|
207
|
-
.filter(Boolean);
|
|
208
|
-
const kind = (url.searchParams.get("kind") ?? undefined);
|
|
209
|
-
const roomId = url.searchParams.get("roomId") ?? undefined;
|
|
210
|
-
const worldId = url.searchParams.get("worldId") ?? undefined;
|
|
211
|
-
const ownerUserId = url.searchParams.get("ownerUserId") ?? undefined;
|
|
212
|
-
const scenarioId = url.searchParams.get("scenarioId") ?? undefined;
|
|
213
|
-
const batchId = url.searchParams.get("batchId") ?? undefined;
|
|
214
|
-
const createdAfter = url.searchParams.get("createdAfter") ?? undefined;
|
|
215
|
-
const createdBefore = url.searchParams.get("createdBefore") ?? undefined;
|
|
216
|
-
const updatedAfter = url.searchParams.get("updatedAfter") ?? undefined;
|
|
217
|
-
const updatedBefore = url.searchParams.get("updatedBefore") ?? undefined;
|
|
218
|
-
const latestActivityAfterRaw = url.searchParams.get("latestActivityAfter");
|
|
219
|
-
const latestActivityBeforeRaw = url.searchParams.get("latestActivityBefore");
|
|
220
|
-
const latestActivityAfter = latestActivityAfterRaw && Number.isFinite(Number(latestActivityAfterRaw))
|
|
221
|
-
? Number(latestActivityAfterRaw)
|
|
222
|
-
: undefined;
|
|
223
|
-
const latestActivityBefore = latestActivityBeforeRaw &&
|
|
224
|
-
Number.isFinite(Number(latestActivityBeforeRaw))
|
|
225
|
-
? Number(latestActivityBeforeRaw)
|
|
226
|
-
: undefined;
|
|
227
|
-
const hasActiveSessionRaw = url.searchParams.get("hasActiveSession");
|
|
228
|
-
const hasActiveSession = hasActiveSessionRaw === null ? undefined : hasActiveSessionRaw === "true";
|
|
229
|
-
const search = url.searchParams.get("search") ?? undefined;
|
|
230
|
-
const total = await coordinator.countTaskThreads({
|
|
231
|
-
includeArchived,
|
|
232
|
-
status: status ?? undefined,
|
|
233
|
-
statuses,
|
|
234
|
-
kind,
|
|
235
|
-
roomId,
|
|
236
|
-
worldId,
|
|
237
|
-
ownerUserId,
|
|
238
|
-
scenarioId,
|
|
239
|
-
batchId,
|
|
240
|
-
createdAfter,
|
|
241
|
-
createdBefore,
|
|
242
|
-
updatedAfter,
|
|
243
|
-
updatedBefore,
|
|
244
|
-
latestActivityAfter,
|
|
245
|
-
latestActivityBefore,
|
|
246
|
-
hasActiveSession,
|
|
247
|
-
search,
|
|
248
|
-
});
|
|
249
|
-
sendJson(res, { total });
|
|
250
|
-
return true;
|
|
251
|
-
}
|
|
252
|
-
// GET /api/coding-agents/coordinator/threads/:threadId
|
|
253
|
-
const threadMatch = subPath.match(/^\/threads\/([^/]+)$/);
|
|
254
|
-
if (method === "GET" && threadMatch) {
|
|
255
|
-
const thread = await coordinator.getTaskThread(threadMatch[1]);
|
|
256
|
-
if (!thread) {
|
|
257
|
-
sendError(res, "Task thread not found", 404);
|
|
258
|
-
return true;
|
|
259
|
-
}
|
|
260
|
-
sendJson(res, thread);
|
|
261
|
-
return true;
|
|
262
|
-
}
|
|
263
|
-
const shareMatch = subPath.match(/^\/threads\/([^/]+)\/share$/);
|
|
264
|
-
if (method === "GET" && shareMatch) {
|
|
265
|
-
const share = await discoverTaskShareOptions(coordinator, shareMatch[1]);
|
|
266
|
-
if (!share) {
|
|
267
|
-
sendError(res, "Task thread not found", 404);
|
|
268
|
-
return true;
|
|
269
|
-
}
|
|
270
|
-
sendJson(res, share);
|
|
271
|
-
return true;
|
|
272
|
-
}
|
|
273
|
-
// POST /api/coding-agents/coordinator/threads/:threadId/archive
|
|
274
|
-
const archiveMatch = subPath.match(/^\/threads\/([^/]+)\/archive$/);
|
|
275
|
-
if (method === "POST" && archiveMatch) {
|
|
276
|
-
await coordinator.archiveTaskThread(archiveMatch[1]);
|
|
277
|
-
sendJson(res, {
|
|
278
|
-
success: true,
|
|
279
|
-
threadId: archiveMatch[1],
|
|
280
|
-
status: "archived",
|
|
281
|
-
});
|
|
282
|
-
return true;
|
|
283
|
-
}
|
|
284
|
-
// POST /api/coding-agents/coordinator/threads/:threadId/reopen
|
|
285
|
-
const reopenMatch = subPath.match(/^\/threads\/([^/]+)\/reopen$/);
|
|
286
|
-
if (method === "POST" && reopenMatch) {
|
|
287
|
-
await coordinator.reopenTaskThread(reopenMatch[1]);
|
|
288
|
-
sendJson(res, { success: true, threadId: reopenMatch[1], status: "open" });
|
|
289
|
-
return true;
|
|
290
|
-
}
|
|
291
|
-
const controlMatch = subPath.match(/^\/threads\/([^/]+)\/control$/);
|
|
292
|
-
if (method === "POST" && controlMatch) {
|
|
293
|
-
try {
|
|
294
|
-
const body = await parseBody(req);
|
|
295
|
-
const action = typeof body.action === "string" ? body.action.trim() : "";
|
|
296
|
-
const note = typeof body.note === "string" ? body.note : undefined;
|
|
297
|
-
const instruction = typeof body.instruction === "string" ? body.instruction : undefined;
|
|
298
|
-
const agentType = typeof body.agentType === "string" ? body.agentType : undefined;
|
|
299
|
-
if (action === "pause") {
|
|
300
|
-
const result = await coordinator.pauseTaskThread(controlMatch[1], note);
|
|
301
|
-
sendJson(res, { success: true, action, ...result });
|
|
302
|
-
return true;
|
|
303
|
-
}
|
|
304
|
-
if (action === "stop") {
|
|
305
|
-
const result = await coordinator.stopTaskThread(controlMatch[1], note);
|
|
306
|
-
sendJson(res, { success: true, action, ...result });
|
|
307
|
-
return true;
|
|
308
|
-
}
|
|
309
|
-
if (action === "resume") {
|
|
310
|
-
const result = await coordinator.resumeTaskThread(controlMatch[1], instruction, agentType);
|
|
311
|
-
sendJson(res, { success: true, action, ...result });
|
|
312
|
-
return true;
|
|
313
|
-
}
|
|
314
|
-
if (action === "continue") {
|
|
315
|
-
const result = await coordinator.continueTaskThread(controlMatch[1], instruction ?? `Continue task thread ${controlMatch[1]}.`, agentType);
|
|
316
|
-
sendJson(res, { success: true, action, ...result });
|
|
317
|
-
return true;
|
|
318
|
-
}
|
|
319
|
-
sendError(res, 'Invalid control action. Must be "pause", "stop", "resume", or "continue".', 400);
|
|
320
|
-
}
|
|
321
|
-
catch (error) {
|
|
322
|
-
sendError(res, error instanceof Error
|
|
323
|
-
? error.message
|
|
324
|
-
: "Failed to control task thread", 500);
|
|
325
|
-
}
|
|
326
|
-
return true;
|
|
327
|
-
}
|
|
328
|
-
// === Single Task Context ===
|
|
329
|
-
// GET /api/coding-agents/coordinator/tasks/:sessionId
|
|
330
|
-
const taskMatch = subPath.match(/^\/tasks\/([^/]+)$/);
|
|
331
|
-
if (method === "GET" && taskMatch) {
|
|
332
|
-
const sessionId = taskMatch[1];
|
|
333
|
-
const task = await coordinator.getTaskContextSnapshot(sessionId);
|
|
334
|
-
if (!task) {
|
|
335
|
-
sendError(res, "Task context not found", 404);
|
|
336
|
-
return true;
|
|
337
|
-
}
|
|
338
|
-
sendJson(res, task);
|
|
339
|
-
return true;
|
|
340
|
-
}
|
|
341
|
-
// === Pending Confirmations ===
|
|
342
|
-
// GET /api/coding-agents/coordinator/pending
|
|
343
|
-
if (method === "GET" && subPath === "/pending") {
|
|
344
|
-
const pending = coordinator.getPendingConfirmations();
|
|
345
|
-
sendJson(res, pending.map((p) => ({
|
|
346
|
-
sessionId: p.sessionId,
|
|
347
|
-
promptText: p.promptText,
|
|
348
|
-
suggestedAction: p.llmDecision.action,
|
|
349
|
-
suggestedResponse: p.llmDecision.response,
|
|
350
|
-
reasoning: p.llmDecision.reasoning,
|
|
351
|
-
agentType: p.taskContext.agentType,
|
|
352
|
-
label: p.taskContext.label,
|
|
353
|
-
createdAt: p.createdAt,
|
|
354
|
-
})));
|
|
355
|
-
return true;
|
|
356
|
-
}
|
|
357
|
-
// === Confirm/Reject Pending Decision ===
|
|
358
|
-
// POST /api/coding-agents/coordinator/confirm/:sessionId
|
|
359
|
-
const confirmMatch = subPath.match(/^\/confirm\/([^/]+)$/);
|
|
360
|
-
if (method === "POST" && confirmMatch) {
|
|
361
|
-
try {
|
|
362
|
-
const sessionId = confirmMatch[1];
|
|
363
|
-
const body = await parseBody(req);
|
|
364
|
-
const approved = body.approved !== false; // default: approved
|
|
365
|
-
const override = body.override;
|
|
366
|
-
await coordinator.confirmDecision(sessionId, approved, override);
|
|
367
|
-
sendJson(res, { success: true, sessionId, approved });
|
|
368
|
-
}
|
|
369
|
-
catch (error) {
|
|
370
|
-
sendError(res, error instanceof Error ? error.message : "Failed to confirm decision", error instanceof Error && error.message.includes("No pending")
|
|
371
|
-
? 404
|
|
372
|
-
: 500);
|
|
373
|
-
}
|
|
374
|
-
return true;
|
|
375
|
-
}
|
|
376
|
-
// === Supervision Level ===
|
|
377
|
-
// GET /api/coding-agents/coordinator/supervision
|
|
378
|
-
if (method === "GET" && subPath === "/supervision") {
|
|
379
|
-
sendJson(res, { level: coordinator.getSupervisionLevel() });
|
|
380
|
-
return true;
|
|
381
|
-
}
|
|
382
|
-
// POST /api/coding-agents/coordinator/supervision
|
|
383
|
-
if (method === "POST" && subPath === "/supervision") {
|
|
384
|
-
try {
|
|
385
|
-
const body = await parseBody(req);
|
|
386
|
-
const level = body.level;
|
|
387
|
-
if (!["autonomous", "confirm", "notify"].includes(level)) {
|
|
388
|
-
sendError(res, 'Invalid supervision level. Must be "autonomous", "confirm", or "notify"', 400);
|
|
389
|
-
return true;
|
|
390
|
-
}
|
|
391
|
-
coordinator.setSupervisionLevel(level);
|
|
392
|
-
sendJson(res, { success: true, level });
|
|
393
|
-
}
|
|
394
|
-
catch (error) {
|
|
395
|
-
sendError(res, error instanceof Error
|
|
396
|
-
? error.message
|
|
397
|
-
: "Failed to set supervision level", 500);
|
|
398
|
-
}
|
|
399
|
-
return true;
|
|
400
|
-
}
|
|
401
|
-
// Not a coordinator route we recognize
|
|
402
|
-
return false;
|
|
403
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coding Agent HTTP Hooks — Webhook Endpoint
|
|
3
|
-
*
|
|
4
|
-
* Receives structured hook events from coding agent CLI hooks systems.
|
|
5
|
-
* Claude Code sends native HTTP hooks; Gemini CLI bridges via curl commands.
|
|
6
|
-
* Replaces fragile PTY output scraping for state detection with deterministic
|
|
7
|
-
* event-driven signals.
|
|
8
|
-
*
|
|
9
|
-
* @module api/hook-routes
|
|
10
|
-
*/
|
|
11
|
-
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
12
|
-
import type { RouteContext } from "./routes.ts";
|
|
13
|
-
/**
|
|
14
|
-
* Handle Claude Code HTTP hook routes.
|
|
15
|
-
* Returns true if the route was handled, false otherwise.
|
|
16
|
-
*/
|
|
17
|
-
export declare function handleHookRoutes(req: IncomingMessage, res: ServerResponse, pathname: string, ctx: RouteContext): Promise<boolean>;
|
|
18
|
-
//# sourceMappingURL=hook-routes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hook-routes.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/api/hook-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAuBhD;;;GAGG;AACH,wBAAsB,gBAAgB,CACrC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,YAAY,GACf,OAAO,CAAC,OAAO,CAAC,CA6KlB"}
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coding Agent HTTP Hooks — Webhook Endpoint
|
|
3
|
-
*
|
|
4
|
-
* Receives structured hook events from coding agent CLI hooks systems.
|
|
5
|
-
* Claude Code sends native HTTP hooks; Gemini CLI bridges via curl commands.
|
|
6
|
-
* Replaces fragile PTY output scraping for state detection with deterministic
|
|
7
|
-
* event-driven signals.
|
|
8
|
-
*
|
|
9
|
-
* @module api/hook-routes
|
|
10
|
-
*/
|
|
11
|
-
import { parseBody, sendError, sendJson } from "./routes.js";
|
|
12
|
-
/**
|
|
13
|
-
* Handle Claude Code HTTP hook routes.
|
|
14
|
-
* Returns true if the route was handled, false otherwise.
|
|
15
|
-
*/
|
|
16
|
-
export async function handleHookRoutes(req, res, pathname, ctx) {
|
|
17
|
-
if (pathname !== "/api/coding-agents/hooks")
|
|
18
|
-
return false;
|
|
19
|
-
const method = req.method?.toUpperCase();
|
|
20
|
-
if (method !== "POST") {
|
|
21
|
-
sendError(res, "Method not allowed", 405);
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
if (!ctx.ptyService) {
|
|
25
|
-
sendError(res, "PTY Service not available", 503);
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
let body;
|
|
29
|
-
try {
|
|
30
|
-
body = await parseBody(req);
|
|
31
|
-
}
|
|
32
|
-
catch (err) {
|
|
33
|
-
sendError(res, err instanceof Error ? err.message : "Failed to parse request body", 400);
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
const payload = body;
|
|
37
|
-
const eventName = payload.hook_event_name;
|
|
38
|
-
if (!eventName) {
|
|
39
|
-
sendError(res, "Missing hook_event_name", 400);
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
// Normalize field names: Gemini uses camelCase, Claude uses snake_case
|
|
43
|
-
const toolName = payload.tool_name ?? payload.toolName;
|
|
44
|
-
const notificationType = payload.notification_type ?? payload.notificationType;
|
|
45
|
-
// Look up PTY session: prefer explicit header, fall back to cwd-based lookup
|
|
46
|
-
const headerSessionId = req.headers["x-parallax-session-id"];
|
|
47
|
-
const sessionId = headerSessionId
|
|
48
|
-
? headerSessionId
|
|
49
|
-
: payload.cwd
|
|
50
|
-
? ctx.ptyService.findSessionIdByCwd(payload.cwd)
|
|
51
|
-
: undefined;
|
|
52
|
-
if (!sessionId) {
|
|
53
|
-
// Not fatal — the hook may fire before we've tracked the session.
|
|
54
|
-
// Return success so the CLI doesn't retry.
|
|
55
|
-
sendJson(res, { status: "ignored", reason: "session_not_found" });
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
// Dispatch by event type
|
|
59
|
-
switch (eventName) {
|
|
60
|
-
// ── Claude Code events ──────────────────────────────────────────
|
|
61
|
-
case "PermissionRequest": {
|
|
62
|
-
// Auto-approve all tool permissions natively — no PTY keystroke needed.
|
|
63
|
-
sendJson(res, {
|
|
64
|
-
hookSpecificOutput: {
|
|
65
|
-
hookEventName: "PermissionRequest",
|
|
66
|
-
decision: { behavior: "allow" },
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
ctx.ptyService.handleHookEvent(sessionId, "permission_approved", {
|
|
70
|
-
tool: toolName,
|
|
71
|
-
});
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
case "PreToolUse": {
|
|
75
|
-
// Track which tool is running — suppress stall detection.
|
|
76
|
-
ctx.ptyService.handleHookEvent(sessionId, "tool_running", {
|
|
77
|
-
toolName,
|
|
78
|
-
source: "hook",
|
|
79
|
-
});
|
|
80
|
-
// Return allow decision so the tool proceeds without permission prompt.
|
|
81
|
-
sendJson(res, {
|
|
82
|
-
hookSpecificOutput: {
|
|
83
|
-
hookEventName: "PreToolUse",
|
|
84
|
-
permissionDecision: "allow",
|
|
85
|
-
},
|
|
86
|
-
});
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
|
-
case "Stop": {
|
|
90
|
-
// Agent finished responding — mark task complete.
|
|
91
|
-
ctx.ptyService.handleHookEvent(sessionId, "task_complete", {
|
|
92
|
-
source: "hook",
|
|
93
|
-
});
|
|
94
|
-
sendJson(res, {});
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
case "TaskCompleted": {
|
|
98
|
-
ctx.ptyService.handleHookEvent(sessionId, "task_complete", {
|
|
99
|
-
source: "hook_task_completed",
|
|
100
|
-
});
|
|
101
|
-
sendJson(res, {});
|
|
102
|
-
return true;
|
|
103
|
-
}
|
|
104
|
-
// ── Gemini CLI events ───────────────────────────────────────────
|
|
105
|
-
case "BeforeTool": {
|
|
106
|
-
// Track which tool is running — suppress stall detection.
|
|
107
|
-
ctx.ptyService.handleHookEvent(sessionId, "tool_running", {
|
|
108
|
-
toolName,
|
|
109
|
-
source: "gemini_hook",
|
|
110
|
-
});
|
|
111
|
-
// Return allow + continue so Gemini proceeds without permission prompt.
|
|
112
|
-
sendJson(res, { decision: "allow", continue: true });
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
case "AfterTool": {
|
|
116
|
-
// Tool finished — update activity (back to "active" state).
|
|
117
|
-
ctx.ptyService.handleHookEvent(sessionId, "notification", {
|
|
118
|
-
type: "tool_complete",
|
|
119
|
-
message: `Tool ${toolName ?? "unknown"} finished`,
|
|
120
|
-
});
|
|
121
|
-
sendJson(res, { continue: true });
|
|
122
|
-
return true;
|
|
123
|
-
}
|
|
124
|
-
case "AfterAgent": {
|
|
125
|
-
// Agent loop ended — mark task complete.
|
|
126
|
-
ctx.ptyService.handleHookEvent(sessionId, "task_complete", {
|
|
127
|
-
source: "gemini_hook",
|
|
128
|
-
});
|
|
129
|
-
sendJson(res, { continue: true });
|
|
130
|
-
return true;
|
|
131
|
-
}
|
|
132
|
-
case "SessionEnd": {
|
|
133
|
-
// Session ending — mark exit.
|
|
134
|
-
ctx.ptyService.handleHookEvent(sessionId, "session_end", {
|
|
135
|
-
source: "hook",
|
|
136
|
-
});
|
|
137
|
-
sendJson(res, { continue: true });
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
// ── Shared events ───────────────────────────────────────────────
|
|
141
|
-
case "Notification": {
|
|
142
|
-
// State change notifications (idle, permission, auth).
|
|
143
|
-
// Gemini ToolPermission notifications get auto-approved.
|
|
144
|
-
if (notificationType === "ToolPermission") {
|
|
145
|
-
ctx.ptyService.handleHookEvent(sessionId, "permission_approved", {
|
|
146
|
-
tool: toolName,
|
|
147
|
-
});
|
|
148
|
-
sendJson(res, { decision: "allow", continue: true });
|
|
149
|
-
return true;
|
|
150
|
-
}
|
|
151
|
-
ctx.ptyService.handleHookEvent(sessionId, "notification", {
|
|
152
|
-
type: notificationType,
|
|
153
|
-
message: payload.message,
|
|
154
|
-
});
|
|
155
|
-
sendJson(res, { continue: true });
|
|
156
|
-
return true;
|
|
157
|
-
}
|
|
158
|
-
default: {
|
|
159
|
-
// Unknown event — acknowledge without action.
|
|
160
|
-
sendJson(res, { status: "ignored", reason: "unknown_event" });
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Issue Route Handlers
|
|
3
|
-
*
|
|
4
|
-
* Handles routes for GitHub issue management:
|
|
5
|
-
* - List issues, create issue
|
|
6
|
-
* - Get issue, comment on issue, close issue
|
|
7
|
-
*
|
|
8
|
-
* @module api/issue-routes
|
|
9
|
-
*/
|
|
10
|
-
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
11
|
-
import type { RouteContext } from "./routes.ts";
|
|
12
|
-
/**
|
|
13
|
-
* Handle issue routes (/api/issues/*)
|
|
14
|
-
* Returns true if the route was handled, false otherwise
|
|
15
|
-
*/
|
|
16
|
-
export declare function handleIssueRoutes(req: IncomingMessage, res: ServerResponse, pathname: string, ctx: RouteContext): Promise<boolean>;
|
|
17
|
-
//# sourceMappingURL=issue-routes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issue-routes.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/api/issue-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAWhD;;;GAGG;AACH,wBAAsB,iBAAiB,CACtC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,YAAY,GACf,OAAO,CAAC,OAAO,CAAC,CA+JlB"}
|