@revisium/orchestrator 0.1.0-alpha.4 → 0.1.0-alpha.6
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/README.md +149 -1
- package/control-plane/bootstrap.config.json +1 -0
- package/control-plane/default-playbook/catalog/pipelines.json +289 -52
- package/control-plane/default-playbook/catalog/roles.json +9 -0
- package/control-plane/default-playbook/prompts/analyst.md +3 -1
- package/control-plane/default-playbook/prompts/reviewer.md +2 -2
- package/control-plane/default-playbook/prompts/triager.md +51 -0
- package/control-plane/default-playbook/prompts/watcher.md +2 -2
- package/dist/api/graphql-api/filters/agent-observability-exception.filter.js +24 -0
- package/dist/api/graphql-api/filters/agent-observability-exception.filter.js.map +1 -0
- package/dist/api/graphql-api/filters/graphql-validation-exception.filter.js +36 -0
- package/dist/api/graphql-api/filters/graphql-validation-exception.filter.js.map +1 -0
- package/dist/api/graphql-api/graphql-api.module.js +77 -0
- package/dist/api/graphql-api/graphql-api.module.js.map +1 -0
- package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-bridge.service.js +296 -0
- package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-bridge.service.js.map +1 -0
- package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-mappers.js +64 -0
- package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-mappers.js.map +1 -0
- package/dist/api/graphql-api/graphql-ws/constants.js +11 -0
- package/dist/api/graphql-api/graphql-ws/constants.js.map +1 -0
- package/dist/api/graphql-api/graphql-ws/pubsub.module.js +32 -0
- package/dist/api/graphql-api/graphql-ws/pubsub.module.js.map +1 -0
- package/dist/api/graphql-api/graphql-ws/run-progress-subscription-poller.service.js +101 -0
- package/dist/api/graphql-api/graphql-ws/run-progress-subscription-poller.service.js.map +1 -0
- package/dist/api/graphql-api/graphql-ws/subscription-bridge.service.js +115 -0
- package/dist/api/graphql-api/graphql-ws/subscription-bridge.service.js.map +1 -0
- package/dist/api/graphql-api/graphql-ws/subscription-mappers.js +85 -0
- package/dist/api/graphql-api/graphql-ws/subscription-mappers.js.map +1 -0
- package/dist/api/graphql-api/graphql-ws/ws.js +22 -0
- package/dist/api/graphql-api/graphql-ws/ws.js.map +1 -0
- package/dist/api/graphql-api/inbox/inbox-subscription.resolver.js +56 -0
- package/dist/api/graphql-api/inbox/inbox-subscription.resolver.js.map +1 -0
- package/dist/api/graphql-api/inbox/inbox.resolver.js +125 -0
- package/dist/api/graphql-api/inbox/inbox.resolver.js.map +1 -0
- package/dist/api/graphql-api/inbox/inputs/answer-question.input.js +33 -0
- package/dist/api/graphql-api/inbox/inputs/answer-question.input.js.map +1 -0
- package/dist/api/graphql-api/inbox/inputs/gate-decision.input.js +27 -0
- package/dist/api/graphql-api/inbox/inputs/gate-decision.input.js.map +1 -0
- package/dist/api/graphql-api/inbox/inputs/list-inbox.input.js +28 -0
- package/dist/api/graphql-api/inbox/inputs/list-inbox.input.js.map +1 -0
- package/dist/api/graphql-api/inbox/inputs/resolve-inbox-item.input.js +38 -0
- package/dist/api/graphql-api/inbox/inputs/resolve-inbox-item.input.js.map +1 -0
- package/dist/api/graphql-api/inbox/model/gate-risk.model.js +53 -0
- package/dist/api/graphql-api/inbox/model/gate-risk.model.js.map +1 -0
- package/dist/api/graphql-api/inbox/model/inbox-connection.model.js +16 -0
- package/dist/api/graphql-api/inbox/model/inbox-connection.model.js.map +1 -0
- package/dist/api/graphql-api/inbox/model/inbox-item.model.js +88 -0
- package/dist/api/graphql-api/inbox/model/inbox-item.model.js.map +1 -0
- package/dist/api/graphql-api/inbox/model/inbox-resolution.model.js +48 -0
- package/dist/api/graphql-api/inbox/model/inbox-resolution.model.js.map +1 -0
- package/dist/api/graphql-api/method/inputs/list-method.input.js +15 -0
- package/dist/api/graphql-api/method/inputs/list-method.input.js.map +1 -0
- package/dist/api/graphql-api/method/method.resolver.js +90 -0
- package/dist/api/graphql-api/method/method.resolver.js.map +1 -0
- package/dist/api/graphql-api/method/model/alternative-role-group.model.js +32 -0
- package/dist/api/graphql-api/method/model/alternative-role-group.model.js.map +1 -0
- package/dist/api/graphql-api/method/model/pipeline-connection.model.js +16 -0
- package/dist/api/graphql-api/method/model/pipeline-connection.model.js.map +1 -0
- package/dist/api/graphql-api/method/model/pipeline.model.js +69 -0
- package/dist/api/graphql-api/method/model/pipeline.model.js.map +1 -0
- package/dist/api/graphql-api/method/model/playbook-connection.model.js +16 -0
- package/dist/api/graphql-api/method/model/playbook-connection.model.js.map +1 -0
- package/dist/api/graphql-api/method/model/playbook.model.js +47 -0
- package/dist/api/graphql-api/method/model/playbook.model.js.map +1 -0
- package/dist/api/graphql-api/method/model/role-connection.model.js +16 -0
- package/dist/api/graphql-api/method/model/role-connection.model.js.map +1 -0
- package/dist/api/graphql-api/method/model/role.model.js +98 -0
- package/dist/api/graphql-api/method/model/role.model.js.map +1 -0
- package/dist/api/graphql-api/pr/inputs/pr-readiness.input.js +52 -0
- package/dist/api/graphql-api/pr/inputs/pr-readiness.input.js.map +1 -0
- package/dist/api/graphql-api/pr/model/pr-readiness.model.js +403 -0
- package/dist/api/graphql-api/pr/model/pr-readiness.model.js.map +1 -0
- package/dist/api/graphql-api/pr/pr.resolver.js +76 -0
- package/dist/api/graphql-api/pr/pr.resolver.js.map +1 -0
- package/dist/api/graphql-api/registerGraphqlEnums.js +9 -0
- package/dist/api/graphql-api/registerGraphqlEnums.js.map +1 -0
- package/dist/api/graphql-api/runs/inputs/create-run.input.js +63 -0
- package/dist/api/graphql-api/runs/inputs/create-run.input.js.map +1 -0
- package/dist/api/graphql-api/runs/inputs/get-agent-log.input.js +48 -0
- package/dist/api/graphql-api/runs/inputs/get-agent-log.input.js.map +1 -0
- package/dist/api/graphql-api/runs/inputs/get-run-attempts.input.js +32 -0
- package/dist/api/graphql-api/runs/inputs/get-run-attempts.input.js.map +1 -0
- package/dist/api/graphql-api/runs/inputs/get-run-events.input.js +28 -0
- package/dist/api/graphql-api/runs/inputs/get-run-events.input.js.map +1 -0
- package/dist/api/graphql-api/runs/inputs/list-runs.input.js +23 -0
- package/dist/api/graphql-api/runs/inputs/list-runs.input.js.map +1 -0
- package/dist/api/graphql-api/runs/inputs/simulate-route.input.js +43 -0
- package/dist/api/graphql-api/runs/inputs/simulate-route.input.js.map +1 -0
- package/dist/api/graphql-api/runs/model/agent-activity.model.js +367 -0
- package/dist/api/graphql-api/runs/model/agent-activity.model.js.map +1 -0
- package/dist/api/graphql-api/runs/model/create-run-result.model.js +53 -0
- package/dist/api/graphql-api/runs/model/create-run-result.model.js.map +1 -0
- package/dist/api/graphql-api/runs/model/run-attempt.model.js +114 -0
- package/dist/api/graphql-api/runs/model/run-attempt.model.js.map +1 -0
- package/dist/api/graphql-api/runs/model/run-connection.model.js +16 -0
- package/dist/api/graphql-api/runs/model/run-connection.model.js.map +1 -0
- package/dist/api/graphql-api/runs/model/run-cost.model.js +67 -0
- package/dist/api/graphql-api/runs/model/run-cost.model.js.map +1 -0
- package/dist/api/graphql-api/runs/model/run-digest.model.js +41 -0
- package/dist/api/graphql-api/runs/model/run-digest.model.js.map +1 -0
- package/dist/api/graphql-api/runs/model/run-event-connection.model.js +16 -0
- package/dist/api/graphql-api/runs/model/run-event-connection.model.js.map +1 -0
- package/dist/api/graphql-api/runs/model/run-event.model.js +58 -0
- package/dist/api/graphql-api/runs/model/run-event.model.js.map +1 -0
- package/dist/api/graphql-api/runs/model/run-progress.model.js +33 -0
- package/dist/api/graphql-api/runs/model/run-progress.model.js.map +1 -0
- package/dist/api/graphql-api/runs/model/run-workflow.model.js +287 -0
- package/dist/api/graphql-api/runs/model/run-workflow.model.js.map +1 -0
- package/dist/api/graphql-api/runs/model/run.model.js +57 -0
- package/dist/api/graphql-api/runs/model/run.model.js.map +1 -0
- package/dist/api/graphql-api/runs/model/usage.model.js +32 -0
- package/dist/api/graphql-api/runs/model/usage.model.js.map +1 -0
- package/dist/api/graphql-api/runs/run-digest.resolver.js +40 -0
- package/dist/api/graphql-api/runs/run-digest.resolver.js.map +1 -0
- package/dist/api/graphql-api/runs/run-events.resolver.js +45 -0
- package/dist/api/graphql-api/runs/run-events.resolver.js.map +1 -0
- package/dist/api/graphql-api/runs/run-progress.resolver.js +53 -0
- package/dist/api/graphql-api/runs/run-progress.resolver.js.map +1 -0
- package/dist/api/graphql-api/runs/runs-subscription.resolver.js +124 -0
- package/dist/api/graphql-api/runs/runs-subscription.resolver.js.map +1 -0
- package/dist/api/graphql-api/runs/runs.resolver.js +165 -0
- package/dist/api/graphql-api/runs/runs.resolver.js.map +1 -0
- package/dist/api/graphql-api/share/graphql-param-types.js +6 -0
- package/dist/api/graphql-api/share/graphql-param-types.js.map +1 -0
- package/dist/api/graphql-api/share/inputs/connection.input.js +27 -0
- package/dist/api/graphql-api/share/inputs/connection.input.js.map +1 -0
- package/dist/api/graphql-api/share/inputs/run-subscription.input.js +22 -0
- package/dist/api/graphql-api/share/inputs/run-subscription.input.js.map +1 -0
- package/dist/api/graphql-api/share/model/paginated.model.js +75 -0
- package/dist/api/graphql-api/share/model/paginated.model.js.map +1 -0
- package/dist/api/graphql-api/system/model/daemon-status.model.js +47 -0
- package/dist/api/graphql-api/system/model/daemon-status.model.js.map +1 -0
- package/dist/api/graphql-api/system/model/doctor-result.model.js +33 -0
- package/dist/api/graphql-api/system/model/doctor-result.model.js.map +1 -0
- package/dist/api/graphql-api/system/model/project.model.js +37 -0
- package/dist/api/graphql-api/system/model/project.model.js.map +1 -0
- package/dist/api/graphql-api/system/model/repository-context.model.js +70 -0
- package/dist/api/graphql-api/system/model/repository-context.model.js.map +1 -0
- package/dist/api/graphql-api/system/model/repository-validation.model.js +62 -0
- package/dist/api/graphql-api/system/model/repository-validation.model.js.map +1 -0
- package/dist/api/graphql-api/system/model/system-status.model.js +29 -0
- package/dist/api/graphql-api/system/model/system-status.model.js.map +1 -0
- package/dist/api/graphql-api/system/system.resolver.js +83 -0
- package/dist/api/graphql-api/system/system.resolver.js.map +1 -0
- package/dist/cli/commands/doctor-report.js +39 -0
- package/dist/cli/commands/doctor-report.js.map +1 -0
- package/dist/cli/commands/lifecycle.js +237 -0
- package/dist/cli/commands/lifecycle.js.map +1 -0
- package/dist/cli/commands/mcp.js +46 -8
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/revisium-helpers.js +2 -2
- package/dist/cli/index.js +5 -29
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/program.js +7 -21
- package/dist/cli/program.js.map +1 -1
- package/dist/config.js +57 -5
- package/dist/config.js.map +1 -1
- package/dist/control-plane/bootstrap.js +93 -0
- package/dist/control-plane/bootstrap.js.map +1 -0
- package/dist/control-plane/change-notifications.js +35 -0
- package/dist/control-plane/change-notifications.js.map +1 -0
- package/dist/control-plane/data-access.js +10 -3
- package/dist/control-plane/data-access.js.map +1 -1
- package/dist/control-plane/inbox.js +5 -31
- package/dist/control-plane/inbox.js.map +1 -1
- package/dist/control-plane/index.js +1 -1
- package/dist/control-plane/index.js.map +1 -1
- package/dist/control-plane/resolve-cwd.js +76 -8
- package/dist/control-plane/resolve-cwd.js.map +1 -1
- package/dist/control-plane/schema-migration.js +7 -11
- package/dist/control-plane/schema-migration.js.map +1 -1
- package/dist/control-plane/seed-default-playbook.js +23 -0
- package/dist/control-plane/seed-default-playbook.js.map +1 -1
- package/dist/control-plane/steps.js +15 -349
- package/dist/control-plane/steps.js.map +1 -1
- package/dist/e2e/kit/agents.js +43 -8
- package/dist/e2e/kit/agents.js.map +1 -1
- package/dist/e2e/kit/assertions.js +57 -14
- package/dist/e2e/kit/assertions.js.map +1 -1
- package/dist/e2e/kit/drive.js +0 -4
- package/dist/e2e/kit/drive.js.map +1 -1
- package/dist/e2e/kit/fake-integrator.js +16 -1
- package/dist/e2e/kit/fake-integrator.js.map +1 -1
- package/dist/e2e/kit/gh-emulator.js +173 -10
- package/dist/e2e/kit/gh-emulator.js.map +1 -1
- package/dist/e2e/kit/git-target-repo.js +35 -3
- package/dist/e2e/kit/git-target-repo.js.map +1 -1
- package/dist/e2e/kit/harness.js +16 -3
- package/dist/e2e/kit/harness.js.map +1 -1
- package/dist/e2e/kit/scenarios.js +1 -1
- package/dist/e2e/recovery-dd-crash-child.js +3 -2
- package/dist/e2e/recovery-dd-crash-child.js.map +1 -1
- package/dist/engine/dbos.module.js +2 -1
- package/dist/engine/dbos.module.js.map +1 -1
- package/dist/engine/dbos.service.js +89 -18
- package/dist/engine/dbos.service.js.map +1 -1
- package/dist/engine/ensure-postgres.js +11 -9
- package/dist/engine/ensure-postgres.js.map +1 -1
- package/dist/features/inbox/commands/handlers/inbox-command.handlers.js +80 -0
- package/dist/features/inbox/commands/handlers/inbox-command.handlers.js.map +1 -0
- package/dist/features/inbox/commands/impl/answer-question.command.js +7 -0
- package/dist/features/inbox/commands/impl/answer-question.command.js.map +1 -0
- package/dist/features/inbox/commands/impl/approve-gate.command.js +7 -0
- package/dist/features/inbox/commands/impl/approve-gate.command.js.map +1 -0
- package/dist/features/inbox/commands/impl/reject-gate.command.js +7 -0
- package/dist/features/inbox/commands/impl/reject-gate.command.js.map +1 -0
- package/dist/features/inbox/commands/impl/resolve-inbox-item.command.js +7 -0
- package/dist/features/inbox/commands/impl/resolve-inbox-item.command.js.map +1 -0
- package/dist/features/inbox/commands/index.js +8 -0
- package/dist/features/inbox/commands/index.js.map +1 -0
- package/dist/features/inbox/inbox-api.module.js +23 -0
- package/dist/features/inbox/inbox-api.module.js.map +1 -0
- package/dist/features/inbox/inbox-api.service.js +63 -0
- package/dist/features/inbox/inbox-api.service.js.map +1 -0
- package/dist/features/inbox/queries/handlers/inbox-query.handlers.js +111 -0
- package/dist/features/inbox/queries/handlers/inbox-query.handlers.js.map +1 -0
- package/dist/features/inbox/queries/impl/get-inbox-item.query.js +7 -0
- package/dist/features/inbox/queries/impl/get-inbox-item.query.js.map +1 -0
- package/dist/features/inbox/queries/impl/get-pending-decisions.query.js +7 -0
- package/dist/features/inbox/queries/impl/get-pending-decisions.query.js.map +1 -0
- package/dist/features/inbox/queries/impl/list-inbox.query.js +7 -0
- package/dist/features/inbox/queries/impl/list-inbox.query.js.map +1 -0
- package/dist/features/inbox/queries/impl/summarize-gate-risk.query.js +7 -0
- package/dist/features/inbox/queries/impl/summarize-gate-risk.query.js.map +1 -0
- package/dist/features/inbox/queries/index.js +8 -0
- package/dist/features/inbox/queries/index.js.map +1 -0
- package/dist/features/method/commands/index.js +2 -0
- package/dist/features/method/commands/index.js.map +1 -0
- package/dist/features/method/method-api.module.js +23 -0
- package/dist/features/method/method-api.module.js.map +1 -0
- package/dist/features/method/method-api.service.js +47 -0
- package/dist/features/method/method-api.service.js.map +1 -0
- package/dist/features/method/queries/handlers/method-query.handlers.js +115 -0
- package/dist/features/method/queries/handlers/method-query.handlers.js.map +1 -0
- package/dist/features/method/queries/impl/get-pipeline.query.js +7 -0
- package/dist/features/method/queries/impl/get-pipeline.query.js.map +1 -0
- package/dist/features/method/queries/impl/get-role.query.js +7 -0
- package/dist/features/method/queries/impl/get-role.query.js.map +1 -0
- package/dist/features/method/queries/impl/list-pipelines.query.js +7 -0
- package/dist/features/method/queries/impl/list-pipelines.query.js.map +1 -0
- package/dist/features/method/queries/impl/list-playbooks.query.js +7 -0
- package/dist/features/method/queries/impl/list-playbooks.query.js.map +1 -0
- package/dist/features/method/queries/impl/list-roles.query.js +7 -0
- package/dist/features/method/queries/impl/list-roles.query.js.map +1 -0
- package/dist/features/method/queries/index.js +9 -0
- package/dist/features/method/queries/index.js.map +1 -0
- package/dist/features/pr/commands/index.js +2 -0
- package/dist/features/pr/commands/index.js.map +1 -0
- package/dist/features/pr/pr-api.module.js +23 -0
- package/dist/features/pr/pr-api.module.js.map +1 -0
- package/dist/features/pr/pr-api.service.js +35 -0
- package/dist/features/pr/pr-api.service.js.map +1 -0
- package/dist/features/pr/queries/handlers/pr-query.handlers.js +48 -0
- package/dist/features/pr/queries/handlers/pr-query.handlers.js.map +1 -0
- package/dist/features/pr/queries/impl/get-pr-readiness.query.js +7 -0
- package/dist/features/pr/queries/impl/get-pr-readiness.query.js.map +1 -0
- package/dist/features/pr/queries/impl/list-pr-feedback.query.js +7 -0
- package/dist/features/pr/queries/impl/list-pr-feedback.query.js.map +1 -0
- package/dist/features/pr/queries/index.js +3 -0
- package/dist/features/pr/queries/index.js.map +1 -0
- package/dist/features/runs/commands/handlers/runs-command.handlers.js +32 -0
- package/dist/features/runs/commands/handlers/runs-command.handlers.js.map +1 -0
- package/dist/features/runs/commands/impl/create-run.command.js +7 -0
- package/dist/features/runs/commands/impl/create-run.command.js.map +1 -0
- package/dist/features/runs/commands/index.js +3 -0
- package/dist/features/runs/commands/index.js.map +1 -0
- package/dist/features/runs/queries/handlers/runs-query.handlers.js +359 -0
- package/dist/features/runs/queries/handlers/runs-query.handlers.js.map +1 -0
- package/dist/features/runs/queries/impl/get-agent-activity.query.js +7 -0
- package/dist/features/runs/queries/impl/get-agent-activity.query.js.map +1 -0
- package/dist/features/runs/queries/impl/get-agent-attempts.query.js +7 -0
- package/dist/features/runs/queries/impl/get-agent-attempts.query.js.map +1 -0
- package/dist/features/runs/queries/impl/get-agent-log.query.js +7 -0
- package/dist/features/runs/queries/impl/get-agent-log.query.js.map +1 -0
- package/dist/features/runs/queries/impl/get-run-attempts.query.js +7 -0
- package/dist/features/runs/queries/impl/get-run-attempts.query.js.map +1 -0
- package/dist/features/runs/queries/impl/get-run-digest.query.js +7 -0
- package/dist/features/runs/queries/impl/get-run-digest.query.js.map +1 -0
- package/dist/features/runs/queries/impl/get-run-events.query.js +7 -0
- package/dist/features/runs/queries/impl/get-run-events.query.js.map +1 -0
- package/dist/features/runs/queries/impl/get-run-progress.query.js +7 -0
- package/dist/features/runs/queries/impl/get-run-progress.query.js.map +1 -0
- package/dist/features/runs/queries/impl/get-run-workflow.query.js +7 -0
- package/dist/features/runs/queries/impl/get-run-workflow.query.js.map +1 -0
- package/dist/features/runs/queries/impl/get-run.query.js +7 -0
- package/dist/features/runs/queries/impl/get-run.query.js.map +1 -0
- package/dist/features/runs/queries/impl/list-runs.query.js +7 -0
- package/dist/features/runs/queries/impl/list-runs.query.js.map +1 -0
- package/dist/features/runs/queries/impl/simulate-route.query.js +7 -0
- package/dist/features/runs/queries/impl/simulate-route.query.js.map +1 -0
- package/dist/features/runs/queries/index.js +15 -0
- package/dist/features/runs/queries/index.js.map +1 -0
- package/dist/features/runs/runs-api.module.js +23 -0
- package/dist/features/runs/runs-api.module.js.map +1 -0
- package/dist/features/runs/runs-api.service.js +79 -0
- package/dist/features/runs/runs-api.service.js.map +1 -0
- package/dist/features/shared/connection.js +39 -0
- package/dist/features/shared/connection.js.map +1 -0
- package/dist/features/system/commands/index.js +2 -0
- package/dist/features/system/commands/index.js.map +1 -0
- package/dist/features/system/queries/handlers/system-query.handlers.js +96 -0
- package/dist/features/system/queries/handlers/system-query.handlers.js.map +1 -0
- package/dist/features/system/queries/impl/doctor.query.js +4 -0
- package/dist/features/system/queries/impl/doctor.query.js.map +1 -0
- package/dist/features/system/queries/impl/get-project.query.js +4 -0
- package/dist/features/system/queries/impl/get-project.query.js.map +1 -0
- package/dist/features/system/queries/impl/get-repository-context.query.js +7 -0
- package/dist/features/system/queries/impl/get-repository-context.query.js.map +1 -0
- package/dist/features/system/queries/impl/get-status.query.js +4 -0
- package/dist/features/system/queries/impl/get-status.query.js.map +1 -0
- package/dist/features/system/queries/impl/validate-repository.query.js +7 -0
- package/dist/features/system/queries/impl/validate-repository.query.js.map +1 -0
- package/dist/features/system/queries/index.js +9 -0
- package/dist/features/system/queries/index.js.map +1 -0
- package/dist/features/system/system-api.module.js +23 -0
- package/dist/features/system/system-api.module.js.map +1 -0
- package/dist/features/system/system-api.service.js +47 -0
- package/dist/features/system/system-api.service.js.map +1 -0
- package/dist/host/daemon.js +68 -0
- package/dist/host/daemon.js.map +1 -0
- package/dist/host/ensure-host.js +109 -0
- package/dist/host/ensure-host.js.map +1 -0
- package/dist/host/host-runtime.js +52 -0
- package/dist/host/host-runtime.js.map +1 -0
- package/dist/host/host.lifecycle.js +16 -3
- package/dist/host/host.lifecycle.js.map +1 -1
- package/dist/http/graphql-host.js +56 -0
- package/dist/http/graphql-host.js.map +1 -0
- package/dist/{mcp/mcp.module.js → http/graphql-host.module.js} +12 -10
- package/dist/http/graphql-host.module.js.map +1 -0
- package/dist/infrastructure/metrics/graphql/graphql-metrics.js +91 -0
- package/dist/infrastructure/metrics/graphql/graphql-metrics.js.map +1 -0
- package/dist/mcp/mcp-capabilities.js +6 -1
- package/dist/mcp/mcp-capabilities.js.map +1 -1
- package/dist/mcp/mcp-facade.service.js +24 -0
- package/dist/mcp/mcp-facade.service.js.map +1 -1
- package/dist/mcp/mcp-http.service.js +95 -0
- package/dist/mcp/mcp-http.service.js.map +1 -0
- package/dist/mcp/mcp-tools.js +58 -0
- package/dist/mcp/mcp-tools.js.map +1 -1
- package/dist/observability/agent-activity-reporter.js +185 -0
- package/dist/observability/agent-activity-reporter.js.map +1 -0
- package/dist/observability/agent-observability.service.js +1142 -0
- package/dist/observability/agent-observability.service.js.map +1 -0
- package/dist/observability/index.js +4 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/types.js +11 -0
- package/dist/observability/types.js.map +1 -0
- package/dist/pipeline/await-human.js +8 -4
- package/dist/pipeline/await-human.js.map +1 -1
- package/dist/pipeline/data-driven-task.workflow.js +184 -73
- package/dist/pipeline/data-driven-task.workflow.js.map +1 -1
- package/dist/pipeline/data-driven-template.js +3 -3
- package/dist/pipeline/pipeline.module.js +1 -1
- package/dist/pipeline/pipeline.module.js.map +1 -1
- package/dist/pipeline/{develop-task.workflow.js → pipeline.service.js} +97 -26
- package/dist/pipeline/pipeline.service.js.map +1 -0
- package/dist/pipeline-core/kit/fixtures.js +94 -0
- package/dist/pipeline-core/kit/fixtures.js.map +1 -1
- package/dist/pipeline-core/validate-capability.js +23 -0
- package/dist/pipeline-core/validate-capability.js.map +1 -0
- package/dist/pipeline-core/validate-conflicts.js +37 -0
- package/dist/pipeline-core/validate-conflicts.js.map +1 -0
- package/dist/pipeline-core/validate-dataflow.js +180 -0
- package/dist/pipeline-core/validate-dataflow.js.map +1 -0
- package/dist/pipeline-core/validate-diff.js +158 -0
- package/dist/pipeline-core/validate-diff.js.map +1 -0
- package/dist/pipeline-core/validate-edges.js +44 -0
- package/dist/pipeline-core/validate-edges.js.map +1 -0
- package/dist/pipeline-core/validate-graph.js +123 -0
- package/dist/pipeline-core/validate-graph.js.map +1 -0
- package/dist/pipeline-core/validate-loops.js +226 -0
- package/dist/pipeline-core/validate-loops.js.map +1 -0
- package/dist/pipeline-core/validate-parallel.js +132 -0
- package/dist/pipeline-core/validate-parallel.js.map +1 -0
- package/dist/pipeline-core/validate-sink.js +27 -0
- package/dist/pipeline-core/validate-sink.js.map +1 -0
- package/dist/pipeline-core/validate-topology.js +140 -0
- package/dist/pipeline-core/validate-topology.js.map +1 -0
- package/dist/pipeline-core/validate-verdict.js +72 -0
- package/dist/pipeline-core/validate-verdict.js.map +1 -0
- package/dist/pipeline-core/validate.js +34 -1107
- package/dist/pipeline-core/validate.js.map +1 -1
- package/dist/revisium/run.service.js +31 -8
- package/dist/revisium/run.service.js.map +1 -1
- package/dist/run/create-run.js +5 -31
- package/dist/run/create-run.js.map +1 -1
- package/dist/run/inspect-run.js +2 -29
- package/dist/run/inspect-run.js.map +1 -1
- package/dist/run/terminal-run-status.js +7 -30
- package/dist/run/terminal-run-status.js.map +1 -1
- package/dist/runners/claude-code.service.js +1 -0
- package/dist/runners/claude-code.service.js.map +1 -1
- package/dist/runners/codex.service.js +51 -0
- package/dist/runners/codex.service.js.map +1 -0
- package/dist/runners/integrator-branch-naming.js +24 -0
- package/dist/runners/integrator-branch-naming.js.map +1 -0
- package/dist/runners/integrator-git.js +84 -0
- package/dist/runners/integrator-git.js.map +1 -0
- package/dist/runners/integrator-remote.js +34 -0
- package/dist/runners/integrator-remote.js.map +1 -0
- package/dist/runners/integrator-types.js +9 -0
- package/dist/runners/integrator-types.js.map +1 -0
- package/dist/runners/integrator.js +250 -134
- package/dist/runners/integrator.js.map +1 -1
- package/dist/runners/runner.module.js +7 -3
- package/dist/runners/runner.module.js.map +1 -1
- package/dist/runners/worktree.service.js +63 -0
- package/dist/runners/worktree.service.js.map +1 -0
- package/dist/smoke/cli.js +47 -0
- package/dist/smoke/cli.js.map +1 -0
- package/dist/smoke/isolation.js +113 -0
- package/dist/smoke/isolation.js.map +1 -0
- package/dist/task-control-plane/task-control-plane-api.service.js +317 -4
- package/dist/task-control-plane/task-control-plane-api.service.js.map +1 -1
- package/dist/task-control-plane/task-control-plane.module.js +22 -3
- package/dist/task-control-plane/task-control-plane.module.js.map +1 -1
- package/dist/worker/artifact-store.js +6 -1
- package/dist/worker/artifact-store.js.map +1 -1
- package/dist/worker/build-context.js +135 -1
- package/dist/worker/build-context.js.map +1 -1
- package/dist/worker/claude-code-runner.js +79 -82
- package/dist/worker/claude-code-runner.js.map +1 -1
- package/dist/worker/codex-runner.js +474 -0
- package/dist/worker/codex-runner.js.map +1 -0
- package/dist/worker/git-worktree-manager.js +148 -0
- package/dist/worker/git-worktree-manager.js.map +1 -0
- package/dist/worker/result-envelope.js +75 -63
- package/dist/worker/result-envelope.js.map +1 -1
- package/dist/worker/runner-common.js +106 -0
- package/dist/worker/runner-common.js.map +1 -0
- package/dist/worker/runner-dispatch.js +3 -1
- package/dist/worker/runner-dispatch.js.map +1 -1
- package/dist/worker/runner.js.map +1 -1
- package/dist/worker/stub-runner.js +3 -3
- package/dist/worker/stub-runner.js.map +1 -1
- package/package.json +15 -7
- package/dist/app.module.js +0 -28
- package/dist/app.module.js.map +0 -1
- package/dist/cli/commands/bootstrap.js +0 -100
- package/dist/cli/commands/bootstrap.js.map +0 -1
- package/dist/cli/commands/dev.js +0 -143
- package/dist/cli/commands/dev.js.map +0 -1
- package/dist/cli/commands/inbox.js +0 -288
- package/dist/cli/commands/inbox.js.map +0 -1
- package/dist/cli/commands/playbook.js +0 -74
- package/dist/cli/commands/playbook.js.map +0 -1
- package/dist/cli/commands/poll-workflow-state.js +0 -144
- package/dist/cli/commands/poll-workflow-state.js.map +0 -1
- package/dist/cli/commands/revisium-context.js +0 -23
- package/dist/cli/commands/revisium-context.js.map +0 -1
- package/dist/cli/commands/revisium.js +0 -89
- package/dist/cli/commands/revisium.js.map +0 -1
- package/dist/cli/commands/run.js +0 -453
- package/dist/cli/commands/run.js.map +0 -1
- package/dist/cli/live-guard.js +0 -49
- package/dist/cli/live-guard.js.map +0 -1
- package/dist/cli/needs-host.js +0 -77
- package/dist/cli/needs-host.js.map +0 -1
- package/dist/mcp/mcp-stdio.service.js +0 -48
- package/dist/mcp/mcp-stdio.service.js.map +0 -1
- package/dist/mcp/mcp.module.js.map +0 -1
- package/dist/pipeline/develop-task.workflow.js.map +0 -1
- package/dist/worker/worktree-manager.js +0 -7
- package/dist/worker/worktree-manager.js.map +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Triager
|
|
2
|
+
|
|
3
|
+
You are the **triager** role in a software delivery pipeline. You run AFTER the PR is open, when a
|
|
4
|
+
poll has found **unresolved review comments** (from human reviewers or review bots like CodeRabbit).
|
|
5
|
+
You read the actual diff and the threads, then decide — per thread — *whether* and *how* to respond.
|
|
6
|
+
You do not edit files; you read and reason.
|
|
7
|
+
|
|
8
|
+
## Goal
|
|
9
|
+
|
|
10
|
+
Convert each unresolved review thread into a concrete decision the developer and the reply step can
|
|
11
|
+
act on. Your output drives the next step: a `fix` is implemented by the developer and the threads are
|
|
12
|
+
replied + resolved; a `wontfix` is replied + resolved with your reason; a `question` is escalated to a
|
|
13
|
+
human at the review-question gate.
|
|
14
|
+
|
|
15
|
+
## Inputs
|
|
16
|
+
|
|
17
|
+
You receive (in the `## Inputs` section) the approved **plan** and the **prFeedback** the poll produced:
|
|
18
|
+
the PR number, head sha, failing CI checks, and the unresolved `reviewThreads`
|
|
19
|
+
(`{threadId, path, line, author, body}`). Read the diff (`git diff origin/<base>`) in the worktree to
|
|
20
|
+
judge each comment against the real change.
|
|
21
|
+
|
|
22
|
+
## What to do
|
|
23
|
+
|
|
24
|
+
1. Read the diff and the files each thread points at.
|
|
25
|
+
2. For EVERY unresolved thread, decide one of: `fix`, `wontfix`, or `question`.
|
|
26
|
+
- `fix` — the comment is valid; the developer should change the code. Give precise `guidance`.
|
|
27
|
+
- `wontfix` — the comment does not apply / is out of scope / is already handled. Give a short,
|
|
28
|
+
respectful `replyText` stating the reason (it is posted and the thread is auto-resolved).
|
|
29
|
+
- `question` — the comment is genuinely ambiguous and needs a human to decide. Put the question in
|
|
30
|
+
`replyText`; it is surfaced at the review-question gate.
|
|
31
|
+
3. If CI also failed, summarize the fix direction in `ciGuidance` for the developer.
|
|
32
|
+
|
|
33
|
+
## Output
|
|
34
|
+
|
|
35
|
+
Set the result `output` to a `triage` object:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
{
|
|
39
|
+
"items": [ { "threadId": "<id>", "decision": "fix|wontfix|question", "guidance": "<for the dev>", "replyText": "<to post>" } ],
|
|
40
|
+
"ciGuidance": "<optional>",
|
|
41
|
+
"needsHuman": <true if any item is a question>
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Set the `verdict` field to EXACTLY one of (decision order):
|
|
46
|
+
|
|
47
|
+
- `question` — at least one thread is a question (the human gate fires first).
|
|
48
|
+
- `fix` — no questions, but at least one thread needs a code change.
|
|
49
|
+
- `wontfix` — every thread is a wontfix (reply + resolve, no code change).
|
|
50
|
+
|
|
51
|
+
Keep it concise. You are read-only: never modify the working tree.
|
|
@@ -15,10 +15,10 @@ is not red, and nothing obviously broke.
|
|
|
15
15
|
|
|
16
16
|
## Output
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Set the result `verdict` field (the pipeline routes on it) to EXACTLY one of these tokens:
|
|
19
19
|
|
|
20
20
|
- `clean` — the integrated change is healthy; proceed to the merge gate.
|
|
21
21
|
- `dirty` — something is wrong with the integration (drives rework/fail per the pipeline).
|
|
22
22
|
- `blocker` — a hard problem a human must resolve.
|
|
23
23
|
|
|
24
|
-
You are read-only: never modify the working tree.
|
|
24
|
+
Put your findings in `output`. You are read-only: never modify the working tree.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Catch } from '@nestjs/common';
|
|
8
|
+
import { GraphQLError } from 'graphql';
|
|
9
|
+
import { AgentObservabilityError } from '../../../observability/types.js';
|
|
10
|
+
let AgentObservabilityExceptionFilter = class AgentObservabilityExceptionFilter {
|
|
11
|
+
catch(exception, host) {
|
|
12
|
+
if (host.getType() !== 'graphql') {
|
|
13
|
+
throw exception;
|
|
14
|
+
}
|
|
15
|
+
throw new GraphQLError(exception.message, {
|
|
16
|
+
extensions: { code: exception.code },
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
AgentObservabilityExceptionFilter = __decorate([
|
|
21
|
+
Catch(AgentObservabilityError)
|
|
22
|
+
], AgentObservabilityExceptionFilter);
|
|
23
|
+
export { AgentObservabilityExceptionFilter };
|
|
24
|
+
//# sourceMappingURL=agent-observability-exception.filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-observability-exception.filter.js","sourceRoot":"","sources":["../../../../src/api/graphql-api/filters/agent-observability-exception.filter.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAC5C,KAAK,CAAC,SAAkC,EAAE,IAAmB;QAC3D,IAAI,IAAI,CAAC,OAAO,EAAkB,KAAK,SAAS,EAAE,CAAC;YACjD,MAAM,SAAS,CAAC;QAClB,CAAC;QAED,MAAM,IAAI,YAAY,CAAC,SAAS,CAAC,OAAO,EAAE;YACxC,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE;SACrC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAVY,iCAAiC;IAD7C,KAAK,CAAC,uBAAuB,CAAC;GAClB,iCAAiC,CAU7C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { BadRequestException, Catch } from '@nestjs/common';
|
|
8
|
+
import { GraphQLError } from 'graphql';
|
|
9
|
+
let GraphQLValidationExceptionFilter = class GraphQLValidationExceptionFilter {
|
|
10
|
+
catch(exception, host) {
|
|
11
|
+
if (host.getType() !== 'graphql') {
|
|
12
|
+
throw exception;
|
|
13
|
+
}
|
|
14
|
+
const response = exception.getResponse();
|
|
15
|
+
throw new GraphQLError(this.extractMessage(response, exception), {
|
|
16
|
+
extensions: {
|
|
17
|
+
code: response.code ?? 'BAD_REQUEST',
|
|
18
|
+
details: response.details,
|
|
19
|
+
context: response.context,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
extractMessage(response, exception) {
|
|
24
|
+
const message = response.message;
|
|
25
|
+
if (Array.isArray(message))
|
|
26
|
+
return message.join(', ');
|
|
27
|
+
if (typeof message === 'string')
|
|
28
|
+
return message;
|
|
29
|
+
return exception.message;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
GraphQLValidationExceptionFilter = __decorate([
|
|
33
|
+
Catch(BadRequestException)
|
|
34
|
+
], GraphQLValidationExceptionFilter);
|
|
35
|
+
export { GraphQLValidationExceptionFilter };
|
|
36
|
+
//# sourceMappingURL=graphql-validation-exception.filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql-validation-exception.filter.js","sourceRoot":"","sources":["../../../../src/api/graphql-api/filters/graphql-validation-exception.filter.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAiB,mBAAmB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAUhC,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAC3C,KAAK,CAAC,SAA8B,EAAE,IAAmB;QACvD,IAAI,IAAI,CAAC,OAAO,EAAkB,KAAK,SAAS,EAAE,CAAC;YACjD,MAAM,SAAS,CAAC;QAClB,CAAC;QAED,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,EAAwB,CAAC;QAC/D,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE;YAC/D,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ,CAAC,IAAI,IAAI,aAAa;gBACpC,OAAO,EAAE,QAAQ,CAAC,OAAO;gBACzB,OAAO,EAAE,QAAQ,CAAC,OAAO;aAC1B;SACF,CAAC,CAAC;IACL,CAAC;IAEO,cAAc,CAAC,QAA4B,EAAE,SAA8B;QACjF,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;QACjC,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;YAAE,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,OAAO,OAAO,KAAK,QAAQ;YAAE,OAAO,OAAO,CAAC;QAChD,OAAO,SAAS,CAAC,OAAO,CAAC;IAC3B,CAAC;CACF,CAAA;AAtBY,gCAAgC;IAD5C,KAAK,CAAC,mBAAmB,CAAC;GACd,gCAAgC,CAsB5C"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { YogaDriver } from '@graphql-yoga/nestjs';
|
|
8
|
+
import { Module } from '@nestjs/common';
|
|
9
|
+
import { APP_FILTER } from '@nestjs/core';
|
|
10
|
+
import { GraphQLModule } from '@nestjs/graphql';
|
|
11
|
+
import { DateTimeResolver, JSONResolver } from 'graphql-scalars';
|
|
12
|
+
import { InboxApiModule } from '../../features/inbox/inbox-api.module.js';
|
|
13
|
+
import { MethodApiModule } from '../../features/method/method-api.module.js';
|
|
14
|
+
import { PrApiModule } from '../../features/pr/pr-api.module.js';
|
|
15
|
+
import { RunsApiModule } from '../../features/runs/runs-api.module.js';
|
|
16
|
+
import { SystemApiModule } from '../../features/system/system-api.module.js';
|
|
17
|
+
import { createGraphqlMetricsPlugin } from '../../infrastructure/metrics/graphql/graphql-metrics.js';
|
|
18
|
+
import { AgentObservabilityExceptionFilter } from './filters/agent-observability-exception.filter.js';
|
|
19
|
+
import { GraphQLValidationExceptionFilter } from './filters/graphql-validation-exception.filter.js';
|
|
20
|
+
import { PubSubModule } from './graphql-ws/pubsub.module.js';
|
|
21
|
+
import { InboxResolver } from './inbox/inbox.resolver.js';
|
|
22
|
+
import { InboxSubscriptionResolver } from './inbox/inbox-subscription.resolver.js';
|
|
23
|
+
import { MethodResolver } from './method/method.resolver.js';
|
|
24
|
+
import { PrResolver } from './pr/pr.resolver.js';
|
|
25
|
+
import { registerGraphqlEnums } from './registerGraphqlEnums.js';
|
|
26
|
+
import { RunDigestResolver } from './runs/run-digest.resolver.js';
|
|
27
|
+
import { RunEventsResolver } from './runs/run-events.resolver.js';
|
|
28
|
+
import { RunProgressResolver } from './runs/run-progress.resolver.js';
|
|
29
|
+
import { RunsResolver } from './runs/runs.resolver.js';
|
|
30
|
+
import { RunsSubscriptionResolver } from './runs/runs-subscription.resolver.js';
|
|
31
|
+
import { SystemResolver } from './system/system.resolver.js';
|
|
32
|
+
let GraphqlApiModule = class GraphqlApiModule {
|
|
33
|
+
};
|
|
34
|
+
GraphqlApiModule = __decorate([
|
|
35
|
+
Module({
|
|
36
|
+
imports: [
|
|
37
|
+
InboxApiModule,
|
|
38
|
+
MethodApiModule,
|
|
39
|
+
PrApiModule,
|
|
40
|
+
PubSubModule,
|
|
41
|
+
RunsApiModule,
|
|
42
|
+
SystemApiModule,
|
|
43
|
+
GraphQLModule.forRootAsync({
|
|
44
|
+
driver: YogaDriver,
|
|
45
|
+
useFactory: () => ({
|
|
46
|
+
path: '/graphql',
|
|
47
|
+
autoSchemaFile: true,
|
|
48
|
+
sortSchema: true,
|
|
49
|
+
introspection: true,
|
|
50
|
+
resolvers: { DateTime: DateTimeResolver, JSON: JSONResolver },
|
|
51
|
+
resolverValidationOptions: {
|
|
52
|
+
requireResolversToMatchSchema: 'ignore',
|
|
53
|
+
},
|
|
54
|
+
maskedErrors: process.env.NODE_ENV !== 'development',
|
|
55
|
+
plugins: [createGraphqlMetricsPlugin()],
|
|
56
|
+
}),
|
|
57
|
+
}),
|
|
58
|
+
],
|
|
59
|
+
providers: [
|
|
60
|
+
{ provide: APP_FILTER, useClass: AgentObservabilityExceptionFilter },
|
|
61
|
+
{ provide: APP_FILTER, useClass: GraphQLValidationExceptionFilter },
|
|
62
|
+
InboxResolver,
|
|
63
|
+
InboxSubscriptionResolver,
|
|
64
|
+
MethodResolver,
|
|
65
|
+
PrResolver,
|
|
66
|
+
RunDigestResolver,
|
|
67
|
+
RunEventsResolver,
|
|
68
|
+
RunProgressResolver,
|
|
69
|
+
RunsResolver,
|
|
70
|
+
RunsSubscriptionResolver,
|
|
71
|
+
SystemResolver,
|
|
72
|
+
],
|
|
73
|
+
})
|
|
74
|
+
], GraphqlApiModule);
|
|
75
|
+
export { GraphqlApiModule };
|
|
76
|
+
registerGraphqlEnums();
|
|
77
|
+
//# sourceMappingURL=graphql-api.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql-api.module.js","sourceRoot":"","sources":["../../../src/api/graphql-api/graphql-api.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAoB,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA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AE,YAAY,EAAE;oBAC7D,yBAAyB,EAAE;wBACzB,6BAA6B,EAAE,QAAQ;qBACxC;oBACD,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;oBACpD,OAAO,EAAE,CAAC,0BAA0B,EAAE,CAAC;iBACxC,CAAC;aACH,CAAC;SACH;QACD,SAAS,EAAE;YACT,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,iCAAiC,EAAE;YACpE,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,gCAAgC,EAAE;YACnE,aAAa;YACb,yBAAyB;YACzB,cAAc;YACd,UAAU;YACV,iBAAiB;YACjB,iBAAiB;YACjB,mBAAmB;YACnB,YAAY;YACZ,wBAAwB;YACxB,cAAc;SACf;KACF,CAAC;GACW,gBAAgB,CAAG;;AAEhC,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
var AgentObservabilitySubscriptionBridge_1;
|
|
14
|
+
import { Inject, Injectable, Logger } from '@nestjs/common';
|
|
15
|
+
import { TaskControlPlaneApiService } from '../../../task-control-plane/task-control-plane-api.service.js';
|
|
16
|
+
import { RUN_AGENT_ACTIVITY_UPDATED_TOPIC, RUN_AGENT_OUTPUT_APPENDED_TOPIC, } from './constants.js';
|
|
17
|
+
import { mapAgentOutputEventForSubscription, mapAgentRunActivityForSubscription, } from './agent-observability-subscription-mappers.js';
|
|
18
|
+
const LIVE_TAIL_WARMUP_IDLE_MS = 25;
|
|
19
|
+
const LIVE_TAIL_WARMUP_MAX_EVENTS = 1_000;
|
|
20
|
+
const SUBSCRIPTION_QUEUE_MAX_VALUES = 1_000;
|
|
21
|
+
const SUBSCRIPTION_REFETCH_CODE = 'AGENT_OBSERVABILITY_REFETCH_REQUIRED';
|
|
22
|
+
const SUBSCRIPTION_REFETCH_MESSAGE = 'agent observability subscription is no longer current; refetch current agent observability state before resubscribing';
|
|
23
|
+
export class AgentObservabilitySubscriptionError extends Error {
|
|
24
|
+
code;
|
|
25
|
+
constructor(code, message) {
|
|
26
|
+
super(message);
|
|
27
|
+
this.code = code;
|
|
28
|
+
this.name = 'AgentObservabilitySubscriptionError';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
let AgentObservabilitySubscriptionBridge = AgentObservabilitySubscriptionBridge_1 = class AgentObservabilitySubscriptionBridge {
|
|
32
|
+
api;
|
|
33
|
+
logger = new Logger(AgentObservabilitySubscriptionBridge_1.name);
|
|
34
|
+
watchers = new Map();
|
|
35
|
+
constructor(api) {
|
|
36
|
+
this.api = api;
|
|
37
|
+
}
|
|
38
|
+
onModuleDestroy() {
|
|
39
|
+
for (const state of this.watchers.values()) {
|
|
40
|
+
state.abort.abort();
|
|
41
|
+
for (const subscriber of state.subscribers)
|
|
42
|
+
subscriber.close();
|
|
43
|
+
}
|
|
44
|
+
this.watchers.clear();
|
|
45
|
+
}
|
|
46
|
+
subscribeToActivity(runId) {
|
|
47
|
+
return this.retain(runId, RUN_AGENT_ACTIVITY_UPDATED_TOPIC, (signal) => this.watchActivity(runId, signal));
|
|
48
|
+
}
|
|
49
|
+
subscribeToOutput(runId) {
|
|
50
|
+
return this.retain(runId, RUN_AGENT_OUTPUT_APPENDED_TOPIC, (signal) => this.watchOutput(runId, signal));
|
|
51
|
+
}
|
|
52
|
+
retain(runId, topic, start) {
|
|
53
|
+
const key = watcherKey(topic, runId);
|
|
54
|
+
const current = this.watchers.get(key);
|
|
55
|
+
const subscriber = new SubscriptionQueue(() => this.release(runId, topic, subscriber));
|
|
56
|
+
if (current) {
|
|
57
|
+
current.subscribers.add(subscriber);
|
|
58
|
+
return subscriber;
|
|
59
|
+
}
|
|
60
|
+
const abort = new AbortController();
|
|
61
|
+
const state = { abort, subscribers: new Set([subscriber]) };
|
|
62
|
+
this.watchers.set(key, state);
|
|
63
|
+
void start(abort.signal)
|
|
64
|
+
.catch((error) => {
|
|
65
|
+
if (abort.signal.aborted)
|
|
66
|
+
return;
|
|
67
|
+
const subscriptionError = toSubscriptionError(error);
|
|
68
|
+
this.logger.warn(`${topic} watch stopped for ${runId}: ${subscriptionError.code}; ${diagnosticMessage(error)}`);
|
|
69
|
+
for (const item of state.subscribers)
|
|
70
|
+
item.fail(subscriptionError);
|
|
71
|
+
})
|
|
72
|
+
.finally(() => {
|
|
73
|
+
const latest = this.watchers.get(key);
|
|
74
|
+
if (latest !== state)
|
|
75
|
+
return;
|
|
76
|
+
for (const item of state.subscribers)
|
|
77
|
+
item.close();
|
|
78
|
+
this.watchers.delete(key);
|
|
79
|
+
});
|
|
80
|
+
return subscriber;
|
|
81
|
+
}
|
|
82
|
+
release(runId, topic, subscriber) {
|
|
83
|
+
const key = watcherKey(topic, runId);
|
|
84
|
+
const state = this.watchers.get(key);
|
|
85
|
+
if (!state)
|
|
86
|
+
return;
|
|
87
|
+
state.subscribers.delete(subscriber);
|
|
88
|
+
if (state.subscribers.size > 0)
|
|
89
|
+
return;
|
|
90
|
+
state.abort.abort();
|
|
91
|
+
this.watchers.delete(key);
|
|
92
|
+
}
|
|
93
|
+
async watchActivity(runId, signal) {
|
|
94
|
+
await consumeLiveTail(this.api.watchAgentActivity({ runId }), signal, (activity) => this.publishActivity(runId, activity));
|
|
95
|
+
}
|
|
96
|
+
async watchOutput(runId, signal) {
|
|
97
|
+
await consumeLiveTail(this.api.watchAgentOutput({ runId }), signal, (event) => this.publishOutput(runId, event));
|
|
98
|
+
}
|
|
99
|
+
publishActivity(runId, activity) {
|
|
100
|
+
if (activity.runId !== runId)
|
|
101
|
+
return;
|
|
102
|
+
this.publish(RUN_AGENT_ACTIVITY_UPDATED_TOPIC, runId, {
|
|
103
|
+
runAgentActivityUpdated: mapAgentRunActivityForSubscription(activity),
|
|
104
|
+
runId,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
publishOutput(runId, event) {
|
|
108
|
+
if (event.runId !== runId)
|
|
109
|
+
return;
|
|
110
|
+
this.publish(RUN_AGENT_OUTPUT_APPENDED_TOPIC, runId, {
|
|
111
|
+
runAgentOutputAppended: mapAgentOutputEventForSubscription(event),
|
|
112
|
+
runId,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
publish(topic, runId, payload) {
|
|
116
|
+
const state = this.watchers.get(watcherKey(topic, runId));
|
|
117
|
+
if (!state)
|
|
118
|
+
return;
|
|
119
|
+
for (const subscriber of state.subscribers) {
|
|
120
|
+
const result = subscriber.push(payload);
|
|
121
|
+
if (result === 'overflow') {
|
|
122
|
+
this.logger.warn(`${topic} subscriber queue overflow for ${runId}: ${SUBSCRIPTION_REFETCH_CODE}; queued values exceeded ${SUBSCRIPTION_QUEUE_MAX_VALUES}`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
AgentObservabilitySubscriptionBridge = AgentObservabilitySubscriptionBridge_1 = __decorate([
|
|
128
|
+
Injectable(),
|
|
129
|
+
__param(0, Inject(TaskControlPlaneApiService)),
|
|
130
|
+
__metadata("design:paramtypes", [TaskControlPlaneApiService])
|
|
131
|
+
], AgentObservabilitySubscriptionBridge);
|
|
132
|
+
export { AgentObservabilitySubscriptionBridge };
|
|
133
|
+
function watcherKey(topic, runId) {
|
|
134
|
+
return `${topic}:${runId}`;
|
|
135
|
+
}
|
|
136
|
+
function diagnosticMessage(error) {
|
|
137
|
+
return stringifyReason(error);
|
|
138
|
+
}
|
|
139
|
+
function toError(error, fallbackMessage) {
|
|
140
|
+
if (error instanceof Error)
|
|
141
|
+
return error;
|
|
142
|
+
return new Error(error === undefined ? fallbackMessage : stringifyReason(error));
|
|
143
|
+
}
|
|
144
|
+
function stringifyReason(reason) {
|
|
145
|
+
if (reason instanceof Error)
|
|
146
|
+
return reason.message;
|
|
147
|
+
if (typeof reason === 'string')
|
|
148
|
+
return reason;
|
|
149
|
+
if (reason === undefined)
|
|
150
|
+
return 'undefined';
|
|
151
|
+
if (reason === null)
|
|
152
|
+
return 'null';
|
|
153
|
+
if (typeof reason === 'number' || typeof reason === 'boolean' || typeof reason === 'bigint')
|
|
154
|
+
return `${reason}`;
|
|
155
|
+
if (typeof reason === 'symbol')
|
|
156
|
+
return reason.description ? `Symbol(${reason.description})` : 'Symbol()';
|
|
157
|
+
if (typeof reason === 'function')
|
|
158
|
+
return reason.name ? `[function ${reason.name}]` : '[function]';
|
|
159
|
+
try {
|
|
160
|
+
return JSON.stringify(reason) ?? 'unserializable object';
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
return 'unserializable object';
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function toSubscriptionError(_error) {
|
|
167
|
+
return refetchRequiredSubscriptionError();
|
|
168
|
+
}
|
|
169
|
+
function refetchRequiredSubscriptionError() {
|
|
170
|
+
return new AgentObservabilitySubscriptionError(SUBSCRIPTION_REFETCH_CODE, SUBSCRIPTION_REFETCH_MESSAGE);
|
|
171
|
+
}
|
|
172
|
+
async function consumeLiveTail(source, signal, publish) {
|
|
173
|
+
const iterator = source[Symbol.asyncIterator]();
|
|
174
|
+
let pending = iterator.next();
|
|
175
|
+
let live = false;
|
|
176
|
+
let skipped = 0;
|
|
177
|
+
const abort = () => {
|
|
178
|
+
void iterator.return?.(undefined).catch(() => undefined);
|
|
179
|
+
};
|
|
180
|
+
signal.addEventListener('abort', abort, { once: true });
|
|
181
|
+
try {
|
|
182
|
+
while (!signal.aborted) {
|
|
183
|
+
const next = live ? await pending : await nextWithTimeout(pending, LIVE_TAIL_WARMUP_IDLE_MS);
|
|
184
|
+
if (next === 'timeout') {
|
|
185
|
+
live = true;
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
pending = iterator.next();
|
|
189
|
+
if (next.done || signal.aborted)
|
|
190
|
+
break;
|
|
191
|
+
if (!live) {
|
|
192
|
+
skipped += 1;
|
|
193
|
+
if (skipped > LIVE_TAIL_WARMUP_MAX_EVENTS)
|
|
194
|
+
throw liveTailOverflowError();
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
publish(next.value);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
finally {
|
|
201
|
+
signal.removeEventListener('abort', abort);
|
|
202
|
+
await iterator.return?.(undefined).catch(() => undefined);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
function liveTailOverflowError() {
|
|
206
|
+
return refetchRequiredSubscriptionError();
|
|
207
|
+
}
|
|
208
|
+
async function nextWithTimeout(pending, timeoutMs) {
|
|
209
|
+
let timer;
|
|
210
|
+
try {
|
|
211
|
+
return await Promise.race([
|
|
212
|
+
pending,
|
|
213
|
+
new Promise((resolve) => {
|
|
214
|
+
timer = setTimeout(() => resolve('timeout'), timeoutMs);
|
|
215
|
+
}),
|
|
216
|
+
]);
|
|
217
|
+
}
|
|
218
|
+
finally {
|
|
219
|
+
if (timer)
|
|
220
|
+
clearTimeout(timer);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
class SubscriptionQueue {
|
|
224
|
+
onReturn;
|
|
225
|
+
maxValues;
|
|
226
|
+
values = [];
|
|
227
|
+
waiters = [];
|
|
228
|
+
closed = false;
|
|
229
|
+
error;
|
|
230
|
+
released = false;
|
|
231
|
+
constructor(onReturn, maxValues = SUBSCRIPTION_QUEUE_MAX_VALUES) {
|
|
232
|
+
this.onReturn = onReturn;
|
|
233
|
+
this.maxValues = maxValues;
|
|
234
|
+
}
|
|
235
|
+
[Symbol.asyncIterator]() {
|
|
236
|
+
return this;
|
|
237
|
+
}
|
|
238
|
+
next() {
|
|
239
|
+
if (this.error)
|
|
240
|
+
return Promise.reject(this.error);
|
|
241
|
+
if (this.values.length > 0) {
|
|
242
|
+
return Promise.resolve({ done: false, value: this.values.shift() });
|
|
243
|
+
}
|
|
244
|
+
if (this.closed)
|
|
245
|
+
return Promise.resolve({ done: true, value: undefined });
|
|
246
|
+
return new Promise((resolve, reject) => this.waiters.push({ resolve, reject }));
|
|
247
|
+
}
|
|
248
|
+
async return() {
|
|
249
|
+
this.close();
|
|
250
|
+
this.release();
|
|
251
|
+
return { done: true, value: undefined };
|
|
252
|
+
}
|
|
253
|
+
async throw(error) {
|
|
254
|
+
this.close();
|
|
255
|
+
this.release();
|
|
256
|
+
throw toError(error, 'subscription iterator thrown');
|
|
257
|
+
}
|
|
258
|
+
push(value) {
|
|
259
|
+
if (this.closed || this.error)
|
|
260
|
+
return 'closed';
|
|
261
|
+
const waiter = this.waiters.shift();
|
|
262
|
+
if (waiter) {
|
|
263
|
+
waiter.resolve({ done: false, value });
|
|
264
|
+
return 'accepted';
|
|
265
|
+
}
|
|
266
|
+
if (this.values.length >= this.maxValues) {
|
|
267
|
+
this.fail(refetchRequiredSubscriptionError());
|
|
268
|
+
this.release();
|
|
269
|
+
return 'overflow';
|
|
270
|
+
}
|
|
271
|
+
this.values.push(value);
|
|
272
|
+
return 'accepted';
|
|
273
|
+
}
|
|
274
|
+
fail(error) {
|
|
275
|
+
if (this.closed || this.error)
|
|
276
|
+
return;
|
|
277
|
+
this.error = toError(error, 'subscription queue failed');
|
|
278
|
+
this.values.splice(0);
|
|
279
|
+
for (const waiter of this.waiters.splice(0))
|
|
280
|
+
waiter.reject(this.error);
|
|
281
|
+
}
|
|
282
|
+
close() {
|
|
283
|
+
if (this.closed)
|
|
284
|
+
return;
|
|
285
|
+
this.closed = true;
|
|
286
|
+
for (const waiter of this.waiters.splice(0))
|
|
287
|
+
waiter.resolve({ done: true, value: undefined });
|
|
288
|
+
}
|
|
289
|
+
release() {
|
|
290
|
+
if (this.released)
|
|
291
|
+
return;
|
|
292
|
+
this.released = true;
|
|
293
|
+
this.onReturn();
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
//# sourceMappingURL=agent-observability-subscription-bridge.service.js.map
|
package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-bridge.service.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-observability-subscription-bridge.service.js","sourceRoot":"","sources":["../../../../src/api/graphql-api/graphql-ws/agent-observability-subscription-bridge.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAmB,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,+DAA+D,CAAC;AAE3G,OAAO,EACL,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,kCAAkC,EAClC,kCAAkC,GACnC,MAAM,+CAA+C,CAAC;AAYvD,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAC1C,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAC5C,MAAM,yBAAyB,GAAG,sCAAsC,CAAC;AACzE,MAAM,4BAA4B,GAAG,uHAAuH,CAAC;AAE7J,MAAM,OAAO,mCAAoC,SAAQ,KAAK;IAE1C;IADlB,YACkB,IAA4C,EAC5D,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,SAAI,GAAJ,I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,CAAC,CAAC;QACxB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,IAAI,CAAC,KAAc;QACjB,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO;QACtC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,2BAA2B,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACtB,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzE,CAAC;IAED,KAAK;QACH,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YAAE,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAChG,CAAC;IAEO,OAAO;QACb,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { AgentOutputStream, } from '../runs/model/agent-activity.model.js';
|
|
2
|
+
function toDate(value) {
|
|
3
|
+
const parsed = new Date(value);
|
|
4
|
+
return Number.isNaN(parsed.getTime()) ? new Date(0) : parsed;
|
|
5
|
+
}
|
|
6
|
+
function mapOutputStream(stream) {
|
|
7
|
+
if (stream === 'stdout')
|
|
8
|
+
return AgentOutputStream.stdout;
|
|
9
|
+
if (stream === 'stderr')
|
|
10
|
+
return AgentOutputStream.stderr;
|
|
11
|
+
if (stream === 'agent-jsonl')
|
|
12
|
+
return AgentOutputStream.agent_jsonl;
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
function mapActivitySnapshot(snapshot) {
|
|
16
|
+
return {
|
|
17
|
+
runId: snapshot.runId,
|
|
18
|
+
attemptId: snapshot.attemptId,
|
|
19
|
+
stepId: snapshot.stepId,
|
|
20
|
+
stepKey: snapshot.stepKey,
|
|
21
|
+
role: snapshot.role,
|
|
22
|
+
runner: snapshot.runner,
|
|
23
|
+
pid: snapshot.pid,
|
|
24
|
+
status: snapshot.status,
|
|
25
|
+
startedAt: toDate(snapshot.startedAt),
|
|
26
|
+
lastEventAt: toDate(snapshot.lastEventAt),
|
|
27
|
+
lastOutputAt: snapshot.lastOutputAt ? toDate(snapshot.lastOutputAt) : undefined,
|
|
28
|
+
lastStream: mapOutputStream(snapshot.lastStream),
|
|
29
|
+
stdoutBytes: snapshot.stdoutBytes,
|
|
30
|
+
stderrBytes: snapshot.stderrBytes,
|
|
31
|
+
eventCount: snapshot.eventCount,
|
|
32
|
+
artifactRef: snapshot.artifactRef,
|
|
33
|
+
exitCode: snapshot.exitCode ?? null,
|
|
34
|
+
timedOut: snapshot.timedOut,
|
|
35
|
+
error: snapshot.error,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function mapAgentRunActivityForSubscription(activity) {
|
|
39
|
+
return {
|
|
40
|
+
runId: activity.runId,
|
|
41
|
+
aggregateStatus: activity.aggregateStatus,
|
|
42
|
+
latestActivityAt: toDate(activity.latestActivityAt),
|
|
43
|
+
latestOutputAt: activity.latestOutputAt ? toDate(activity.latestOutputAt) : undefined,
|
|
44
|
+
attempts: activity.attempts.map(mapActivitySnapshot),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export function mapAgentOutputEventForSubscription(event) {
|
|
48
|
+
return {
|
|
49
|
+
cursor: event.cursor,
|
|
50
|
+
runId: event.runId,
|
|
51
|
+
attemptId: event.attemptId,
|
|
52
|
+
attemptSeq: event.attemptSeq,
|
|
53
|
+
stepId: event.stepId,
|
|
54
|
+
stepKey: event.stepKey,
|
|
55
|
+
at: toDate(event.at),
|
|
56
|
+
kind: event.kind,
|
|
57
|
+
stream: mapOutputStream(event.stream),
|
|
58
|
+
bytes: event.bytes,
|
|
59
|
+
preview: event.preview,
|
|
60
|
+
parsedType: event.parsedType,
|
|
61
|
+
statusHint: event.statusHint,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=agent-observability-subscription-mappers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-observability-subscription-mappers.js","sourceRoot":"","sources":["../../../../src/api/graphql-api/graphql-ws/agent-observability-subscription-mappers.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,iBAAiB,GAGlB,MAAM,uCAAuC,CAAC;AAE/C,SAAS,MAAM,CAAC,KAAa;IAC3B,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC/D,CAAC;AAED,SAAS,eAAe,CAAC,MAA2C;IAClE,IAAI,MAAM,KAAK,QAAQ;QAAE,OAAO,iBAAiB,CAAC,MAAM,CAAC;IACzD,IAAI,MAAM,KAAK,QAAQ;QAAE,OAAO,iBAAiB,CAAC,MAAM,CAAC;IACzD,IAAI,MAAM,KAAK,aAAa;QAAE,OAAO,iBAAiB,CAAC,WAAW,CAAC;IACnE,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,mBAAmB,CAAC,QAA+B;IAC1D,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,IAA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,KAAK,CAAC,KAAK;QAClB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACpB,IAAI,EAAE,KAAK,CAAC,IAA4B;QACxC,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC;QACrC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,UAAU,EAAE,KAAK,CAAC,UAA6C;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const APP_PUB_SUB = Symbol('APP_PUB_SUB');
|
|
2
|
+
export const RUN_UPDATED_TOPIC = 'runUpdated';
|
|
3
|
+
export const RUN_WORKFLOW_UPDATED_TOPIC = 'runWorkflowUpdated';
|
|
4
|
+
export const RUN_EVENT_APPENDED_TOPIC = 'runEventAppended';
|
|
5
|
+
export const RUN_PROGRESS_UPDATED_TOPIC = 'runProgressUpdated';
|
|
6
|
+
export const RUN_AGENT_ACTIVITY_UPDATED_TOPIC = 'runAgentActivityUpdated';
|
|
7
|
+
export const RUN_AGENT_OUTPUT_APPENDED_TOPIC = 'runAgentOutputAppended';
|
|
8
|
+
export const INBOX_ITEM_ADDED_TOPIC = 'inboxItemAdded';
|
|
9
|
+
export const INBOX_ITEM_RESOLVED_TOPIC = 'inboxItemResolved';
|
|
10
|
+
export const RUN_COST_RECORDED_TOPIC = 'runCostRecorded';
|
|
11
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/api/graphql-api/graphql-ws/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AAEjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAC9C,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAAoB,CAAC;AAC/D,MAAM,CAAC,MAAM,wBAAwB,GAAG,kBAAkB,CAAC;AAC3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAAoB,CAAC;AAC/D,MAAM,CAAC,MAAM,gCAAgC,GAAG,yBAAyB,CAAC;AAC1E,MAAM,CAAC,MAAM,+BAA+B,GAAG,wBAAwB,CAAC;AACxE,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AACvD,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;AAC7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Global, Module } from '@nestjs/common';
|
|
8
|
+
import { PubSub } from 'graphql-subscriptions';
|
|
9
|
+
import { RunsApiModule } from '../../../features/runs/runs-api.module.js';
|
|
10
|
+
import { TaskControlPlaneModule } from '../../../task-control-plane/task-control-plane.module.js';
|
|
11
|
+
import { AgentObservabilitySubscriptionBridge } from './agent-observability-subscription-bridge.service.js';
|
|
12
|
+
import { APP_PUB_SUB } from './constants.js';
|
|
13
|
+
import { ControlPlaneSubscriptionBridge } from './subscription-bridge.service.js';
|
|
14
|
+
import { RunProgressSubscriptionPoller } from './run-progress-subscription-poller.service.js';
|
|
15
|
+
let PubSubModule = class PubSubModule {
|
|
16
|
+
};
|
|
17
|
+
PubSubModule = __decorate([
|
|
18
|
+
Global(),
|
|
19
|
+
Module({
|
|
20
|
+
imports: [RunsApiModule, TaskControlPlaneModule],
|
|
21
|
+
providers: [
|
|
22
|
+
// Local-first production choice. Swap this provider to graphql-redis-subscriptions for multi-instance hosts.
|
|
23
|
+
{ provide: APP_PUB_SUB, useFactory: () => new PubSub() },
|
|
24
|
+
AgentObservabilitySubscriptionBridge,
|
|
25
|
+
ControlPlaneSubscriptionBridge,
|
|
26
|
+
RunProgressSubscriptionPoller,
|
|
27
|
+
],
|
|
28
|
+
exports: [APP_PUB_SUB, AgentObservabilitySubscriptionBridge],
|
|
29
|
+
})
|
|
30
|
+
], PubSubModule);
|
|
31
|
+
export { PubSubModule };
|
|
32
|
+
//# sourceMappingURL=pubsub.module.js.map
|