@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
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* poll-workflow-state.ts — shared polling helper used by `run start` and `inbox resolve`.
|
|
3
|
-
*
|
|
4
|
-
* After enqueueing or signaling a DBOS workflow, the CLI must wait for either:
|
|
5
|
-
* - a terminal DBOS status (SUCCESS / ERROR / CANCELLED / MAX_RECOVERY_ATTEMPTS_EXCEEDED), or
|
|
6
|
-
* - a parked gate (pending inbox approval row for this runId).
|
|
7
|
-
*
|
|
8
|
-
* Extracted from run.ts / inbox.ts to eliminate duplication (Sonar CPD).
|
|
9
|
-
* Used by both the run-start path (§3.6) and the gate-resolve path (§3.7).
|
|
10
|
-
*
|
|
11
|
-
* 0006: PollOpts added with wait/maxAttempts/intervalMs.
|
|
12
|
-
* - wait:false (default): return on first terminal or first pending gate (unchanged behavior).
|
|
13
|
-
* - wait:true: loop through RUNNING step transitions, exit at gate (print resolve + re-attach
|
|
14
|
-
* hint) or at terminal; generous cap (2400 × 500ms ≈ 20 min).
|
|
15
|
-
* SIGINT handling: sets an aborted flag so the loop returns normally, letting index.ts finally
|
|
16
|
-
* { app.close() } run. Never calls process.exit(0).
|
|
17
|
-
*/
|
|
18
|
-
/** DBOS terminal workflow statuses. MAX_RECOVERY_ATTEMPTS_EXCEEDED included per G10. */
|
|
19
|
-
export const TERMINAL_STATUSES = new Set([
|
|
20
|
-
'SUCCESS',
|
|
21
|
-
'ERROR',
|
|
22
|
-
'CANCELLED',
|
|
23
|
-
'MAX_RECOVERY_ATTEMPTS_EXCEEDED',
|
|
24
|
-
]);
|
|
25
|
-
/** Default cap for wait:false mode (40 × 500ms = 20s). */
|
|
26
|
-
const DEFAULT_MAX_ATTEMPTS = 40;
|
|
27
|
-
/** Default interval between poll iterations in ms. */
|
|
28
|
-
const DEFAULT_INTERVAL_MS = 500;
|
|
29
|
-
/** Cap for wait:true mode: 2400 × 500ms ≈ 20 min. */
|
|
30
|
-
const WAIT_MAX_ATTEMPTS = 2400;
|
|
31
|
-
/** Shared detach/re-attach message printed by both the SIGINT path and the gate path. */
|
|
32
|
-
const DETACH_MSG = (runId) => `detached — the durable state is preserved; resume with: revo run start ${runId} --wait`;
|
|
33
|
-
/** DBOS terminal statuses that mean the workflow FAILED (vs. SUCCESS / CANCELLED). */
|
|
34
|
-
const FAILURE_STATUSES = new Set(['ERROR', 'MAX_RECOVERY_ATTEMPTS_EXCEEDED']);
|
|
35
|
-
/**
|
|
36
|
-
* abortableSleep — sleep for intervalMs, but resolve early if the SIGINT handler
|
|
37
|
-
* calls earlyResolveRef.resolve(). Uses a single timer; no polling loop needed.
|
|
38
|
-
*/
|
|
39
|
-
function abortableSleep(intervalMs, earlyResolveRef) {
|
|
40
|
-
return new Promise((resolve) => {
|
|
41
|
-
earlyResolveRef.resolve = resolve;
|
|
42
|
-
setTimeout(resolve, intervalMs);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* checkTerminalStatus — check if the workflow has reached a terminal DBOS status.
|
|
47
|
-
* Prints the status line and returns true if terminal so the caller can stop.
|
|
48
|
-
*
|
|
49
|
-
* 0008 #2: on a FAILURE terminal status (ERROR / MAX_RECOVERY_ATTEMPTS_EXCEEDED), read the
|
|
50
|
-
* Revisium run-row failure reason (if a reader is supplied) and surface it as a clear
|
|
51
|
-
* "run failed" line — never a silent sleep→ERROR with no explanation.
|
|
52
|
-
*/
|
|
53
|
-
async function checkTerminalStatus(runId, dbosService, readFailure) {
|
|
54
|
-
const wfStatus = await dbosService.getWorkflowStatus(runId);
|
|
55
|
-
if (!wfStatus || !TERMINAL_STATUSES.has(wfStatus.status)) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
console.log(`status: ${wfStatus.status}`);
|
|
59
|
-
if (FAILURE_STATUSES.has(wfStatus.status) && readFailure) {
|
|
60
|
-
try {
|
|
61
|
-
const failure = await readFailure(runId);
|
|
62
|
-
if (failure?.reason) {
|
|
63
|
-
console.log(`run failed: ${failure.reason}`);
|
|
64
|
-
}
|
|
65
|
-
else if (failure?.runStatus && failure.runStatus !== 'failed') {
|
|
66
|
-
// DBOS says failure but the run-row was never patched — surface the integrity gap.
|
|
67
|
-
console.log(`note: DBOS=${wfStatus.status} but run-row status=${failure.runStatus} (no run_failed reason recorded)`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
catch {
|
|
71
|
-
// A failure-reason read should never mask the terminal signal — ignore and stop anyway.
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* checkParkedGate — check if the workflow is parked at a gate (pending inbox row).
|
|
78
|
-
* Prints the parked line, resolve hint, and (in wait:true mode) the re-attach hint.
|
|
79
|
-
* Returns true if parked so the caller can stop.
|
|
80
|
-
*/
|
|
81
|
-
async function checkParkedGate(runId, inboxSvc, wait) {
|
|
82
|
-
const pending = await inboxSvc.listInbox({ runId, status: 'pending' });
|
|
83
|
-
if (pending.length === 0) {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
const gateRow = pending[0];
|
|
87
|
-
if (gateRow) {
|
|
88
|
-
const ctx = gateRow.context;
|
|
89
|
-
const topic = typeof ctx?.topic === 'string' ? ctx.topic : '?';
|
|
90
|
-
console.log(`parked: run ${runId} is waiting at the '${topic}' gate`);
|
|
91
|
-
console.log(` resolve with: revo inbox resolve ${gateRow.id} --approve|--reject`);
|
|
92
|
-
if (wait) {
|
|
93
|
-
console.log(` ${DETACH_MSG(runId)}`);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return true;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* pollWorkflowState — poll until the workflow is terminal or parked at a gate.
|
|
100
|
-
*
|
|
101
|
-
* @param runId - Workflow / run ID to observe.
|
|
102
|
-
* @param dbosService - DBOS status provider (getWorkflowStatus).
|
|
103
|
-
* @param inboxSvc - Inbox service for pending-approval detection.
|
|
104
|
-
* @param opts - Poll options (wait, maxAttempts, intervalMs).
|
|
105
|
-
*/
|
|
106
|
-
export async function pollWorkflowState(runId, dbosService, inboxSvc, opts = {}) {
|
|
107
|
-
const wait = opts.wait ?? false;
|
|
108
|
-
const intervalMs = opts.intervalMs ?? DEFAULT_INTERVAL_MS;
|
|
109
|
-
// Use a generous cap in wait:true mode so long-running steps don't time out prematurely.
|
|
110
|
-
const maxAttempts = opts.maxAttempts ?? (wait ? WAIT_MAX_ATTEMPTS : DEFAULT_MAX_ATTEMPTS);
|
|
111
|
-
// SIGINT abort: set a flag so the loop returns normally (no process.exit).
|
|
112
|
-
// Also holds a reference to the current sleep's resolve so Ctrl-C wakes it early.
|
|
113
|
-
let aborted = false;
|
|
114
|
-
const sleepRef = {};
|
|
115
|
-
const onSigint = () => {
|
|
116
|
-
aborted = true;
|
|
117
|
-
if (sleepRef.resolve) {
|
|
118
|
-
sleepRef.resolve();
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
process.once('SIGINT', onSigint);
|
|
122
|
-
try {
|
|
123
|
-
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
124
|
-
if (aborted) {
|
|
125
|
-
console.log(DETACH_MSG(runId));
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
if (await checkTerminalStatus(runId, dbosService, opts.readFailure)) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
if (await checkParkedGate(runId, inboxSvc, wait)) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
// Still running a step — wait and retry.
|
|
135
|
-
await abortableSleep(intervalMs, sleepRef);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
finally {
|
|
139
|
-
process.removeListener('SIGINT', onSigint);
|
|
140
|
-
}
|
|
141
|
-
// Timed out — report unknown state.
|
|
142
|
-
console.log('note: timed out waiting for settled state; check status with: revo run show');
|
|
143
|
-
}
|
|
144
|
-
//# sourceMappingURL=poll-workflow-state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"poll-workflow-state.js","sourceRoot":"","sources":["../../../src/cli/commands/poll-workflow-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,wFAAwF;AACxF,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACvC,SAAS;IACT,OAAO;IACP,WAAW;IACX,gCAAgC;CACjC,CAAC,CAAC;AAEH,0DAA0D;AAC1D,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,sDAAsD;AACtD,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,qDAAqD;AACrD,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAE/B,yFAAyF;AACzF,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,EAAE,CACnC,0EAA0E,KAAK,SAAS,CAAC;AAU3F,sFAAsF;AACtF,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,gCAAgC,CAAC,CAAC,CAAC;AAwB9E;;;GAGG;AACH,SAAS,cAAc,CAAC,UAAkB,EAAE,eAAyC;IACnF,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QACnC,eAAe,CAAC,OAAO,GAAG,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GAAG,IAAI,CAAC;QACf,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACrB,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC;IACH,CAAC,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAEjC,IAAI,CAAC;QACH,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,WAAW,EAAE,OAAO,EAAE,EAAE,CAAC;YACvD,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC/B,OAAO;YACT,CAAC;YAED,IAAI,MAAM,mBAAmB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;gBACpE,OAAO;YACT,CAAC;YAED,IAAI,MAAM,eAAe,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC;gBACjD,OAAO;YACT,CAAC;YAED,yCAAyC;YACzC,MAAM,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED,oCAAoC;IACpC,OAAO,CAAC,GAAG,CAAC,iFAAiF,CAAC,CAAC;AACjG,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* withRevisiumService — create a per-invocation Revisium-only Nest standalone context,
|
|
3
|
-
* resolve the service identified by `token`, call `fn(svc)`, and always close the context.
|
|
4
|
-
*
|
|
5
|
-
* @param token - Injectable class token (e.g. RunService, InboxService).
|
|
6
|
-
* @param fn - Async callback that receives the resolved service instance.
|
|
7
|
-
* @returns Whatever `fn` returns.
|
|
8
|
-
*/
|
|
9
|
-
export async function withRevisiumService(token, fn) {
|
|
10
|
-
const { NestFactory } = await import('@nestjs/core');
|
|
11
|
-
const { RevisiumModule } = await import('../../revisium/revisium.module.js');
|
|
12
|
-
const ctx = await NestFactory.createApplicationContext(RevisiumModule, {
|
|
13
|
-
logger: false,
|
|
14
|
-
});
|
|
15
|
-
try {
|
|
16
|
-
const svc = ctx.get(token);
|
|
17
|
-
return await fn(svc);
|
|
18
|
-
}
|
|
19
|
-
finally {
|
|
20
|
-
await ctx.close();
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=revisium-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"revisium-context.js","sourceRoot":"","sources":["../../../src/cli/commands/revisium-context.ts"],"names":[],"mappings":"AAYA;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,KAAc,EACd,EAA0B;IAE1B,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;IACrD,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC,mCAAmC,CAAC,CAAC;IAC7E,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,wBAAwB,CAAC,cAAc,EAAE;QACrE,MAAM,EAAE,KAAK;KACd,CAAC,CAAC;IACH,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC3B,OAAO,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;YAAS,CAAC;QACT,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;AACH,CAAC"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { spawn } from 'node:child_process';
|
|
2
|
-
import { baseUrl, getConfig, isAlive, isHealthy, readRuntime, removeRuntime, } from '../config.js';
|
|
3
|
-
import { ensureRevisium } from '../../host/ensure-revisium.js';
|
|
4
|
-
import { killTree, tailLines, waitForExit } from './revisium-helpers.js';
|
|
5
|
-
async function startRevisium(options) {
|
|
6
|
-
try {
|
|
7
|
-
const { runtime, alreadyRunning } = await ensureRevisium(options);
|
|
8
|
-
if (alreadyRunning) {
|
|
9
|
-
console.log(`already running on ${baseUrl(runtime.httpPort)}`);
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
console.log(`Revisium started (pid ${runtime.pid})`);
|
|
13
|
-
console.log(`Admin: ${baseUrl(runtime.httpPort)}/`);
|
|
14
|
-
console.log(`REST: ${baseUrl(runtime.httpPort)}/api`);
|
|
15
|
-
console.log(`GraphQL: ${baseUrl(runtime.httpPort)}/graphql`);
|
|
16
|
-
console.log(`MCP: ${baseUrl(runtime.httpPort)}/mcp`);
|
|
17
|
-
console.log(`PostgreSQL port: ${runtime.pgPort}`);
|
|
18
|
-
}
|
|
19
|
-
catch (err) {
|
|
20
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
21
|
-
process.exitCode = 1;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
async function stopRevisium() {
|
|
25
|
-
const runtime = readRuntime();
|
|
26
|
-
if (!runtime) {
|
|
27
|
-
console.log('not running');
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (isAlive(runtime.pid)) {
|
|
31
|
-
killTree(runtime.pid, 'SIGTERM');
|
|
32
|
-
const exited = await waitForExit(runtime.pid, 20_000);
|
|
33
|
-
if (!exited) {
|
|
34
|
-
killTree(runtime.pid, 'SIGKILL');
|
|
35
|
-
await waitForExit(runtime.pid, 5_000);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
removeRuntime();
|
|
39
|
-
console.log('stopped');
|
|
40
|
-
}
|
|
41
|
-
async function statusRevisium() {
|
|
42
|
-
const runtime = readRuntime();
|
|
43
|
-
if (!runtime || !isAlive(runtime.pid)) {
|
|
44
|
-
if (runtime)
|
|
45
|
-
removeRuntime();
|
|
46
|
-
console.log('stopped');
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
if (await isHealthy(runtime.httpPort)) {
|
|
50
|
-
console.log(`running (pid ${runtime.pid}) on ${baseUrl(runtime.httpPort)} - health OK`);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
console.log(`running (pid ${runtime.pid}) on ${baseUrl(runtime.httpPort)} but health FAILING`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function logsRevisium(options) {
|
|
57
|
-
const { logFile } = getConfig();
|
|
58
|
-
const lines = Number(options.lines ?? 50);
|
|
59
|
-
if (!Number.isInteger(lines) || lines <= 0) {
|
|
60
|
-
throw new Error(`Invalid line count: ${options.lines}`);
|
|
61
|
-
}
|
|
62
|
-
if (options.follow) {
|
|
63
|
-
const child = spawn('tail', ['-n', String(lines), '-f', logFile], { stdio: 'inherit' });
|
|
64
|
-
child.on('exit', (code) => {
|
|
65
|
-
process.exitCode = code ?? 0;
|
|
66
|
-
});
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
const output = tailLines(logFile, lines);
|
|
70
|
-
if (output)
|
|
71
|
-
console.log(output);
|
|
72
|
-
}
|
|
73
|
-
export function registerRevisium(program) {
|
|
74
|
-
const revisium = program.command('revisium').description('Manage local standalone Revisium');
|
|
75
|
-
revisium
|
|
76
|
-
.command('start')
|
|
77
|
-
.option('--port <n>', 'HTTP port scan base')
|
|
78
|
-
.option('--pg-port <n>', 'PostgreSQL port scan base')
|
|
79
|
-
.option('--data <dir>', 'Standalone data directory')
|
|
80
|
-
.action(startRevisium);
|
|
81
|
-
revisium.command('stop').action(stopRevisium);
|
|
82
|
-
revisium.command('status').action(statusRevisium);
|
|
83
|
-
revisium
|
|
84
|
-
.command('logs')
|
|
85
|
-
.option('-n, --lines <lines>', 'Number of log lines', '50')
|
|
86
|
-
.option('-f, --follow', 'Follow log output')
|
|
87
|
-
.action(logsRevisium);
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=revisium.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"revisium.js","source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