@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
|
@@ -13,7 +13,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
13
13
|
import { Module } from '@nestjs/common';
|
|
14
14
|
import { RevisiumModule } from '../revisium/revisium.module.js';
|
|
15
15
|
import { ClaudeCodeService } from './claude-code.service.js';
|
|
16
|
+
import { CodexService } from './codex.service.js';
|
|
16
17
|
import { IntegratorService } from './integrator.js';
|
|
18
|
+
import { WorktreeService } from './worktree.service.js';
|
|
17
19
|
import { PROCESS_EXECUTOR, RUN_AGENT } from './tokens.js';
|
|
18
20
|
import { spawnExecutor } from '../worker/process-executor.js';
|
|
19
21
|
import { stubRunAgent } from '../worker/stub-runner.js';
|
|
@@ -25,15 +27,17 @@ RunnerModule = __decorate([
|
|
|
25
27
|
imports: [RevisiumModule],
|
|
26
28
|
providers: [
|
|
27
29
|
ClaudeCodeService,
|
|
30
|
+
CodexService,
|
|
28
31
|
IntegratorService,
|
|
32
|
+
WorktreeService,
|
|
29
33
|
{ provide: PROCESS_EXECUTOR, useValue: spawnExecutor },
|
|
30
34
|
{
|
|
31
35
|
provide: RUN_AGENT,
|
|
32
|
-
useFactory: (cc) => createRunAgent({ claudeCode: cc.run, script: stubRunAgent }),
|
|
33
|
-
inject: [ClaudeCodeService],
|
|
36
|
+
useFactory: (cc, codex) => createRunAgent({ claudeCode: cc.run, codex: codex.run, script: stubRunAgent }),
|
|
37
|
+
inject: [ClaudeCodeService, CodexService],
|
|
34
38
|
},
|
|
35
39
|
],
|
|
36
|
-
exports: [RUN_AGENT, IntegratorService],
|
|
40
|
+
exports: [RUN_AGENT, IntegratorService, WorktreeService],
|
|
37
41
|
})
|
|
38
42
|
], RunnerModule);
|
|
39
43
|
export { RunnerModule };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.module.js","sourceRoot":"","sources":["../../src/runners/runner.module.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"runner.module.js","sourceRoot":"","sources":["../../src/runners/runner.module.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAmBvD,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,YAAY;IAjBxB,MAAM,CAAC;QACN,OAAO,EAAE,CAAC,cAAc,CAAC;QACzB,SAAS,EAAE;YACT,iBAAiB;YACjB,YAAY;YACZ,iBAAiB;YACjB,eAAe;YACf,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAE;YACtD;gBACE,OAAO,EAAE,SAAS;gBAClB,UAAU,EAAE,CAAC,EAAqB,EAAE,KAAmB,EAAE,EAAE,CACzD,cAAc,CAAC,EAAE,UAAU,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;gBAChF,MAAM,EAAE,CAAC,iBAAiB,EAAE,YAAY,CAAC;aAC1C;SACF;QACD,OAAO,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,eAAe,CAAC;KACzD,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
/**
|
|
14
|
+
* worktree.service.ts — @Injectable wrapper over the per-run git worktree manager (plan 0017).
|
|
15
|
+
*
|
|
16
|
+
* DBOS-SEALED: zero @dbos-inc imports. PipelineService registers `ensure`/`release` as memoized DBOS
|
|
17
|
+
* steps and wires them into the data-driven adapter's run lifecycle (create after live preflight,
|
|
18
|
+
* release at terminal via the workflow `finally`).
|
|
19
|
+
*
|
|
20
|
+
* Resolves the BASE target-repo checkout (where `git worktree add/remove` run) and the feature branch
|
|
21
|
+
* (the SAME `branchName` the integrator commits/pushes on) so the worktree is created already on that
|
|
22
|
+
* branch — making the integrator's branchExists→switch path a no-op and avoiding its dirty-tree
|
|
23
|
+
* `switch -c origin/<base>` failure.
|
|
24
|
+
*/
|
|
25
|
+
import { Inject, Injectable } from '@nestjs/common';
|
|
26
|
+
import { RunService } from '../revisium/run.service.js';
|
|
27
|
+
import { getConfig } from '../config.js';
|
|
28
|
+
import { branchName } from './integrator.js';
|
|
29
|
+
import { createRunWorktree, releaseRunWorktree } from '../worker/git-worktree-manager.js';
|
|
30
|
+
let WorktreeService = class WorktreeService {
|
|
31
|
+
runService;
|
|
32
|
+
resolveBaseCwd;
|
|
33
|
+
constructor(runService) {
|
|
34
|
+
this.runService = runService;
|
|
35
|
+
this.resolveBaseCwd = this.runService.makeResolveTaskCwd();
|
|
36
|
+
}
|
|
37
|
+
/** Create-if-absent the run's isolated worktree. Arrow property: safe to pass unbound to registerStep. */
|
|
38
|
+
ensure = async (runId, taskId, title, base) => {
|
|
39
|
+
const baseRepoCwd = await this.resolveBaseCwd(taskId);
|
|
40
|
+
const branch = branchName(taskId, title);
|
|
41
|
+
return createRunWorktree({ runId, baseRepoCwd, base, branch, dataDir: getConfig().dataDir });
|
|
42
|
+
};
|
|
43
|
+
/** Release the run's worktree (best-effort, idempotent). Arrow property for safe unbound registration. */
|
|
44
|
+
release = async (runId, taskId) => {
|
|
45
|
+
let baseRepoCwd;
|
|
46
|
+
try {
|
|
47
|
+
baseRepoCwd = await this.resolveBaseCwd(taskId);
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
// Task/repo no longer resolvable — nothing to remove from; the worktree dir (if any) is orphaned
|
|
51
|
+
// and will be swept by `git worktree prune` on a later run against the same base repo.
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
releaseRunWorktree({ runId, baseRepoCwd, dataDir: getConfig().dataDir });
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
WorktreeService = __decorate([
|
|
58
|
+
Injectable(),
|
|
59
|
+
__param(0, Inject(RunService)),
|
|
60
|
+
__metadata("design:paramtypes", [RunService])
|
|
61
|
+
], WorktreeService);
|
|
62
|
+
export { WorktreeService };
|
|
63
|
+
//# sourceMappingURL=worktree.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worktree.service.js","sourceRoot":"","sources":["../../src/runners/worktree.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAGnF,IAAM,eAAe,GAArB,MAAM,eAAe;IAGuB;IAFhC,cAAc,CAAsC;IAErE,YAAiD,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QACrE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC;IAC7D,CAAC;IAED,0GAA0G;IAC1G,MAAM,GAAG,KAAK,EACZ,KAAa,EACb,MAAc,EACd,KAAa,EACb,IAAY,EACuB,EAAE;QACrC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACzC,OAAO,iBAAiB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC,CAAC;IAEF,0GAA0G;IAC1G,OAAO,GAAG,KAAK,EAAE,KAAa,EAAE,MAAc,EAAiB,EAAE;QAC/D,IAAI,WAAmB,CAAC;QACxB,IAAI,CAAC;YACH,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAClD,CAAC;QAAC,MAAM,CAAC;YACP,iGAAiG;YACjG,uFAAuF;YACvF,OAAO;QACT,CAAC;QACD,kBAAkB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC,CAAC;CACH,CAAA;AA/BY,eAAe;IAD3B,UAAU,EAAE;IAIE,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;qCAA8B,UAAU;GAH5D,eAAe,CA+B3B"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
let tsxCliPath;
|
|
5
|
+
function resolveTsxCliPath() {
|
|
6
|
+
if (tsxCliPath)
|
|
7
|
+
return tsxCliPath;
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const tsxPackagePath = require.resolve('tsx/package.json');
|
|
10
|
+
const tsxPackage = require(tsxPackagePath);
|
|
11
|
+
const tsxBin = typeof tsxPackage.bin === 'string' ? tsxPackage.bin : tsxPackage.bin.tsx;
|
|
12
|
+
if (!tsxBin)
|
|
13
|
+
throw new Error('Could not resolve tsx CLI path from package.json');
|
|
14
|
+
tsxCliPath = join(dirname(tsxPackagePath), tsxBin);
|
|
15
|
+
return tsxCliPath;
|
|
16
|
+
}
|
|
17
|
+
export function runCli(args, deps = {}) {
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
const spawnCli = deps.spawn ?? spawn;
|
|
20
|
+
const child = spawnCli(process.execPath, [deps.tsxCliPath ?? resolveTsxCliPath(), 'src/cli/index.ts', ...args], {
|
|
21
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
22
|
+
});
|
|
23
|
+
let stdout = '';
|
|
24
|
+
let stderr = '';
|
|
25
|
+
child.stdout.setEncoding('utf8');
|
|
26
|
+
child.stderr.setEncoding('utf8');
|
|
27
|
+
child.stdout.on('data', (chunk) => {
|
|
28
|
+
stdout += chunk;
|
|
29
|
+
});
|
|
30
|
+
child.stderr.on('data', (chunk) => {
|
|
31
|
+
stderr += chunk;
|
|
32
|
+
});
|
|
33
|
+
child.on('error', reject);
|
|
34
|
+
child.on('close', (status) => resolve({ stdout, stderr, status }));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
export function matchId(output, pattern, label) {
|
|
38
|
+
const match = pattern.exec(output);
|
|
39
|
+
if (!match?.[1])
|
|
40
|
+
throw new Error(`Could not parse ${label} from CLI output:\n${output}`);
|
|
41
|
+
return match[1];
|
|
42
|
+
}
|
|
43
|
+
export function assertIncludes(str, sub, label) {
|
|
44
|
+
if (!str.includes(sub))
|
|
45
|
+
throw new Error(`${label}: expected output to include "${sub}".\nGot:\n${str}`);
|
|
46
|
+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AE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,iCAAiC,GAAG,aAAa,GAAG,EAAE,CAAC,CAAC;AAC1G,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { homedir, tmpdir } from 'node:os';
|
|
3
|
+
import { basename, dirname, join, resolve } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
const sourceDir = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const repoRoot = resolve(sourceDir, '..', '..');
|
|
7
|
+
const configPath = join(repoRoot, 'revisium.config.json');
|
|
8
|
+
const DEFAULT_GRAPHQL_PORT_OFFSET = 1;
|
|
9
|
+
function expandHome(path) {
|
|
10
|
+
if (path === '~')
|
|
11
|
+
return homedir();
|
|
12
|
+
if (path.startsWith('~/'))
|
|
13
|
+
return join(homedir(), path.slice(2));
|
|
14
|
+
return path;
|
|
15
|
+
}
|
|
16
|
+
function loadRawConfig() {
|
|
17
|
+
return JSON.parse(readFileSync(configPath, 'utf8'));
|
|
18
|
+
}
|
|
19
|
+
function parseRequiredPort(name, disallowed) {
|
|
20
|
+
const raw = process.env[name];
|
|
21
|
+
if (!raw)
|
|
22
|
+
throw new Error(`${name} is required for state-touching smoke scripts`);
|
|
23
|
+
if (!/^\d+$/.test(raw.trim()))
|
|
24
|
+
throw new Error(`${name} must be a TCP port, got ${raw}`);
|
|
25
|
+
const port = Number(raw);
|
|
26
|
+
if (!Number.isInteger(port) || port <= 0 || port > 65_535) {
|
|
27
|
+
throw new Error(`${name} must be a TCP port, got ${raw}`);
|
|
28
|
+
}
|
|
29
|
+
const reason = disallowed.get(port);
|
|
30
|
+
if (reason) {
|
|
31
|
+
throw new Error(`${name} must not use ${reason} (${port})`);
|
|
32
|
+
}
|
|
33
|
+
return port;
|
|
34
|
+
}
|
|
35
|
+
function assertTempDataDir(dataDir, defaultDataDir) {
|
|
36
|
+
const resolved = resolve(expandHome(dataDir));
|
|
37
|
+
const resolvedDefault = resolve(expandHome(defaultDataDir));
|
|
38
|
+
if (resolved === resolvedDefault) {
|
|
39
|
+
throw new Error(`REVO_DATA_DIR must not use default production data dir ${defaultDataDir}`);
|
|
40
|
+
}
|
|
41
|
+
const tempRoots = [resolve(tmpdir()), '/tmp', '/private/tmp'];
|
|
42
|
+
if (!tempRoots.some((root) => resolved === root || resolved.startsWith(`${root}/`))) {
|
|
43
|
+
throw new Error(`REVO_DATA_DIR must be a temp task-specific path, got ${resolved}`);
|
|
44
|
+
}
|
|
45
|
+
if (basename(resolved) === basename(resolve(tmpdir())) || resolved === resolve(tmpdir())) {
|
|
46
|
+
throw new Error(`REVO_DATA_DIR must be task-specific, got temp root ${resolved}`);
|
|
47
|
+
}
|
|
48
|
+
return resolved;
|
|
49
|
+
}
|
|
50
|
+
function parseRequiredDbosDb() {
|
|
51
|
+
const dbosDb = process.env.REVO_DBOS_DB;
|
|
52
|
+
if (!dbosDb)
|
|
53
|
+
throw new Error('REVO_DBOS_DB is required for state-touching smoke scripts');
|
|
54
|
+
if (dbosDb === 'dbos')
|
|
55
|
+
throw new Error('REVO_DBOS_DB must not use default production database dbos');
|
|
56
|
+
if (!/^[a-z_][a-z0-9_]*$/i.test(dbosDb)) {
|
|
57
|
+
throw new Error(`Invalid REVO_DBOS_DB '${dbosDb}': must be a SQL identifier`);
|
|
58
|
+
}
|
|
59
|
+
return dbosDb;
|
|
60
|
+
}
|
|
61
|
+
export function resolveSmokeIsolation(options) {
|
|
62
|
+
const rawConfig = loadRawConfig();
|
|
63
|
+
const rawDataDir = process.env.REVO_DATA_DIR;
|
|
64
|
+
if (!rawDataDir)
|
|
65
|
+
throw new Error('REVO_DATA_DIR is required for state-touching smoke scripts');
|
|
66
|
+
const dataDir = assertTempDataDir(rawDataDir, rawConfig.dataDir);
|
|
67
|
+
const httpPort = parseRequiredPort('REVO_PORT', new Map([[rawConfig.preferredPort, 'default production HTTP port']]));
|
|
68
|
+
const pgPort = parseRequiredPort('REVO_PG_PORT', new Map([[rawConfig.preferredPgPort, 'default production PostgreSQL port']]));
|
|
69
|
+
const dbosDb = parseRequiredDbosDb();
|
|
70
|
+
let graphqlPort;
|
|
71
|
+
if (options.requireGraphqlPort) {
|
|
72
|
+
graphqlPort = parseRequiredPort('REVO_GRAPHQL_PORT', new Map([
|
|
73
|
+
[rawConfig.preferredPort + DEFAULT_GRAPHQL_PORT_OFFSET, 'default-derived production GraphQL port'],
|
|
74
|
+
[httpPort + DEFAULT_GRAPHQL_PORT_OFFSET, 'implicit derived GraphQL port'],
|
|
75
|
+
]));
|
|
76
|
+
}
|
|
77
|
+
const isolation = {
|
|
78
|
+
scriptName: options.scriptName,
|
|
79
|
+
dataDir,
|
|
80
|
+
httpPort,
|
|
81
|
+
pgPort,
|
|
82
|
+
dbosDb,
|
|
83
|
+
};
|
|
84
|
+
if (typeof graphqlPort === 'number') {
|
|
85
|
+
isolation.graphqlPort = graphqlPort;
|
|
86
|
+
}
|
|
87
|
+
return isolation;
|
|
88
|
+
}
|
|
89
|
+
export function printSmokeIsolation(isolation) {
|
|
90
|
+
console.log(`smokeIsolationScript=${isolation.scriptName}`);
|
|
91
|
+
console.log(`smokeIsolationDataDir=${isolation.dataDir}`);
|
|
92
|
+
console.log(`smokeIsolationHttpPort=${isolation.httpPort}`);
|
|
93
|
+
console.log(`smokeIsolationPgPort=${isolation.pgPort}`);
|
|
94
|
+
console.log(`smokeIsolationDbosDb=${isolation.dbosDb}`);
|
|
95
|
+
if (isolation.graphqlPort !== undefined) {
|
|
96
|
+
console.log(`smokeIsolationGraphqlPort=${isolation.graphqlPort}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export function assertSmokeIsolation(options) {
|
|
100
|
+
const isolation = resolveSmokeIsolation(options);
|
|
101
|
+
printSmokeIsolation(isolation);
|
|
102
|
+
return isolation;
|
|
103
|
+
}
|
|
104
|
+
export function guardSmokeIsolation(options) {
|
|
105
|
+
try {
|
|
106
|
+
return assertSmokeIsolation(options);
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
console.error(`Smoke isolation guard failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
110
|
+
process.exit(1);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=isolation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isolation.js","sourceRoot":"","sources":["../../src/smoke/isolation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAsBzC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAChD,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;AAC1D,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAEtC,SAAS,UAAU,CAAC,IAAY;IAC9B,IAAI,IAAI,KAAK,GAAG;QAAE,OAAO,OAAO,EAAE,CAAC;IACnC,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACjE,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,aAAa;IACpB,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAc,CAAC;AACnE,CAAC;AAED,SAAS,iBAAiB,CA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