@shipfox/api-workflows 2.0.0
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/.turbo/turbo-build.log +2 -0
- package/.turbo/turbo-type$colon$emit.log +1 -0
- package/.turbo/turbo-type.log +1 -0
- package/CHANGELOG.md +311 -0
- package/LICENSE +21 -0
- package/dist/core/agent-tool-capability-warning.d.ts +7 -0
- package/dist/core/agent-tool-capability-warning.d.ts.map +1 -0
- package/dist/core/agent-tool-capability-warning.js +149 -0
- package/dist/core/agent-tool-capability-warning.js.map +1 -0
- package/dist/core/agent-tools.d.ts +51 -0
- package/dist/core/agent-tools.d.ts.map +1 -0
- package/dist/core/agent-tools.js +296 -0
- package/dist/core/agent-tools.js.map +1 -0
- package/dist/core/checkout.d.ts +29 -0
- package/dist/core/checkout.d.ts.map +1 -0
- package/dist/core/checkout.js +42 -0
- package/dist/core/checkout.js.map +1 -0
- package/dist/core/condition-trace.d.ts +13 -0
- package/dist/core/condition-trace.d.ts.map +1 -0
- package/dist/core/condition-trace.js +51 -0
- package/dist/core/condition-trace.js.map +1 -0
- package/dist/core/entities/index.d.ts +5 -0
- package/dist/core/entities/index.d.ts.map +1 -0
- package/dist/core/entities/index.js +3 -0
- package/dist/core/entities/index.js.map +1 -0
- package/dist/core/entities/job-execution.d.ts +30 -0
- package/dist/core/entities/job-execution.d.ts.map +1 -0
- package/dist/core/entities/job-execution.js +3 -0
- package/dist/core/entities/job-execution.js.map +1 -0
- package/dist/core/entities/job-listener-event.d.ts +15 -0
- package/dist/core/entities/job-listener-event.d.ts.map +1 -0
- package/dist/core/entities/job-listener-event.js +3 -0
- package/dist/core/entities/job-listener-event.js.map +1 -0
- package/dist/core/entities/job.d.ts +54 -0
- package/dist/core/entities/job.d.ts.map +1 -0
- package/dist/core/entities/job.js +29 -0
- package/dist/core/entities/job.js.map +1 -0
- package/dist/core/entities/step.d.ts +86 -0
- package/dist/core/entities/step.d.ts.map +1 -0
- package/dist/core/entities/step.js +12 -0
- package/dist/core/entities/step.js.map +1 -0
- package/dist/core/entities/workflow-run-attempt.d.ts +20 -0
- package/dist/core/entities/workflow-run-attempt.d.ts.map +1 -0
- package/dist/core/entities/workflow-run-attempt.js +3 -0
- package/dist/core/entities/workflow-run-attempt.js.map +1 -0
- package/dist/core/entities/workflow-run.d.ts +66 -0
- package/dist/core/entities/workflow-run.d.ts.map +1 -0
- package/dist/core/entities/workflow-run.js +10 -0
- package/dist/core/entities/workflow-run.js.map +1 -0
- package/dist/core/errors.d.ts +85 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +134 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/index.d.ts +14 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +9 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/job-execution-outcome.d.ts +29 -0
- package/dist/core/job-execution-outcome.d.ts.map +1 -0
- package/dist/core/job-execution-outcome.js +31 -0
- package/dist/core/job-execution-outcome.js.map +1 -0
- package/dist/core/job-execution.d.ts +37 -0
- package/dist/core/job-execution.d.ts.map +1 -0
- package/dist/core/job-execution.js +425 -0
- package/dist/core/job-execution.js.map +1 -0
- package/dist/core/job-transition/decide-job-activation.d.ts +29 -0
- package/dist/core/job-transition/decide-job-activation.d.ts.map +1 -0
- package/dist/core/job-transition/decide-job-activation.js +51 -0
- package/dist/core/job-transition/decide-job-activation.js.map +1 -0
- package/dist/core/job-transition/derive-job-execution-outputs.d.ts +18 -0
- package/dist/core/job-transition/derive-job-execution-outputs.d.ts.map +1 -0
- package/dist/core/job-transition/derive-job-execution-outputs.js +23 -0
- package/dist/core/job-transition/derive-job-execution-outputs.js.map +1 -0
- package/dist/core/job-transition/derive-job-success.d.ts +16 -0
- package/dist/core/job-transition/derive-job-success.d.ts.map +1 -0
- package/dist/core/job-transition/derive-job-success.js +47 -0
- package/dist/core/job-transition/derive-job-success.js.map +1 -0
- package/dist/core/job-transition/index.d.ts +5 -0
- package/dist/core/job-transition/index.d.ts.map +1 -0
- package/dist/core/job-transition/index.js +6 -0
- package/dist/core/job-transition/index.js.map +1 -0
- package/dist/core/job-transition/runtime-completion-status-for-job.d.ts +4 -0
- package/dist/core/job-transition/runtime-completion-status-for-job.d.ts.map +1 -0
- package/dist/core/job-transition/runtime-completion-status-for-job.js +8 -0
- package/dist/core/job-transition/runtime-completion-status-for-job.js.map +1 -0
- package/dist/core/listener-execution-materialization.d.ts +30 -0
- package/dist/core/listener-execution-materialization.d.ts.map +1 -0
- package/dist/core/listener-execution-materialization.js +87 -0
- package/dist/core/listener-execution-materialization.js.map +1 -0
- package/dist/core/run-workflow.d.ts +11 -0
- package/dist/core/run-workflow.d.ts.map +1 -0
- package/dist/core/run-workflow.js +28 -0
- package/dist/core/run-workflow.js.map +1 -0
- package/dist/core/source-control.d.ts +5 -0
- package/dist/core/source-control.d.ts.map +1 -0
- package/dist/core/source-control.js +19 -0
- package/dist/core/source-control.js.map +1 -0
- package/dist/core/step-config/agent.d.ts +49 -0
- package/dist/core/step-config/agent.d.ts.map +1 -0
- package/dist/core/step-config/agent.js +337 -0
- package/dist/core/step-config/agent.js.map +1 -0
- package/dist/core/step-config/assemble-run-context.d.ts +94 -0
- package/dist/core/step-config/assemble-run-context.d.ts.map +1 -0
- package/dist/core/step-config/assemble-run-context.js +393 -0
- package/dist/core/step-config/assemble-run-context.js.map +1 -0
- package/dist/core/step-config/complete-step-dispatch-config.d.ts +13 -0
- package/dist/core/step-config/complete-step-dispatch-config.d.ts.map +1 -0
- package/dist/core/step-config/complete-step-dispatch-config.js +38 -0
- package/dist/core/step-config/complete-step-dispatch-config.js.map +1 -0
- package/dist/core/step-config/fields.d.ts +38 -0
- package/dist/core/step-config/fields.d.ts.map +1 -0
- package/dist/core/step-config/fields.js +72 -0
- package/dist/core/step-config/fields.js.map +1 -0
- package/dist/core/step-config/index.d.ts +8 -0
- package/dist/core/step-config/index.d.ts.map +1 -0
- package/dist/core/step-config/index.js +7 -0
- package/dist/core/step-config/index.js.map +1 -0
- package/dist/core/step-config/materialize-job-execution-steps.d.ts +35 -0
- package/dist/core/step-config/materialize-job-execution-steps.d.ts.map +1 -0
- package/dist/core/step-config/materialize-job-execution-steps.js +92 -0
- package/dist/core/step-config/materialize-job-execution-steps.js.map +1 -0
- package/dist/core/step-config/materialize-workflow-model.d.ts +42 -0
- package/dist/core/step-config/materialize-workflow-model.d.ts.map +1 -0
- package/dist/core/step-config/materialize-workflow-model.js +96 -0
- package/dist/core/step-config/materialize-workflow-model.js.map +1 -0
- package/dist/core/step-config/resolve-job-execution-name.d.ts +18 -0
- package/dist/core/step-config/resolve-job-execution-name.d.ts.map +1 -0
- package/dist/core/step-config/resolve-job-execution-name.js +36 -0
- package/dist/core/step-config/resolve-job-execution-name.js.map +1 -0
- package/dist/core/step-config/resolve-step-config.d.ts +33 -0
- package/dist/core/step-config/resolve-step-config.d.ts.map +1 -0
- package/dist/core/step-config/resolve-step-config.js +164 -0
- package/dist/core/step-config/resolve-step-config.js.map +1 -0
- package/dist/core/step-config/run.d.ts +39 -0
- package/dist/core/step-config/run.d.ts.map +1 -0
- package/dist/core/step-config/run.js +360 -0
- package/dist/core/step-config/run.js.map +1 -0
- package/dist/core/step-config/workflow-evaluation-context.d.ts +6 -0
- package/dist/core/step-config/workflow-evaluation-context.d.ts.map +1 -0
- package/dist/core/step-config/workflow-evaluation-context.js +3 -0
- package/dist/core/step-config/workflow-evaluation-context.js.map +1 -0
- package/dist/core/step-transition/apply-step-transition.d.ts +26 -0
- package/dist/core/step-transition/apply-step-transition.d.ts.map +1 -0
- package/dist/core/step-transition/apply-step-transition.js +141 -0
- package/dist/core/step-transition/apply-step-transition.js.map +1 -0
- package/dist/core/step-transition/decide-step-transition.d.ts +71 -0
- package/dist/core/step-transition/decide-step-transition.d.ts.map +1 -0
- package/dist/core/step-transition/decide-step-transition.js +110 -0
- package/dist/core/step-transition/decide-step-transition.js.map +1 -0
- package/dist/core/step-transition/evaluate-gate.d.ts +28 -0
- package/dist/core/step-transition/evaluate-gate.d.ts.map +1 -0
- package/dist/core/step-transition/evaluate-gate.js +159 -0
- package/dist/core/step-transition/evaluate-gate.js.map +1 -0
- package/dist/core/step-transition/read-step-outputs.d.ts +3 -0
- package/dist/core/step-transition/read-step-outputs.d.ts.map +1 -0
- package/dist/core/step-transition/read-step-outputs.js +24 -0
- package/dist/core/step-transition/read-step-outputs.js.map +1 -0
- package/dist/core/workflow-run-creation.d.ts +43 -0
- package/dist/core/workflow-run-creation.d.ts.map +1 -0
- package/dist/core/workflow-run-creation.js +80 -0
- package/dist/core/workflow-run-creation.js.map +1 -0
- package/dist/core/workflow-scheduling/index.d.ts +5 -0
- package/dist/core/workflow-scheduling/index.d.ts.map +1 -0
- package/dist/core/workflow-scheduling/index.js +4 -0
- package/dist/core/workflow-scheduling/index.js.map +1 -0
- package/dist/core/workflow-scheduling/run-progress.d.ts +20 -0
- package/dist/core/workflow-scheduling/run-progress.d.ts.map +1 -0
- package/dist/core/workflow-scheduling/run-progress.js +40 -0
- package/dist/core/workflow-scheduling/run-progress.js.map +1 -0
- package/dist/core/workflow-scheduling/runtime-dag.d.ts +10 -0
- package/dist/core/workflow-scheduling/runtime-dag.d.ts.map +1 -0
- package/dist/core/workflow-scheduling/runtime-dag.js +3 -0
- package/dist/core/workflow-scheduling/runtime-dag.js.map +1 -0
- package/dist/core/workflow-scheduling/runtime-scheduling-command.d.ts +16 -0
- package/dist/core/workflow-scheduling/runtime-scheduling-command.d.ts.map +1 -0
- package/dist/core/workflow-scheduling/runtime-scheduling-command.js +3 -0
- package/dist/core/workflow-scheduling/runtime-scheduling-command.js.map +1 -0
- package/dist/core/workflow-scheduling/schedule-runtime-dag.d.ts +9 -0
- package/dist/core/workflow-scheduling/schedule-runtime-dag.d.ts.map +1 -0
- package/dist/core/workflow-scheduling/schedule-runtime-dag.js +72 -0
- package/dist/core/workflow-scheduling/schedule-runtime-dag.js.map +1 -0
- package/dist/db/db.d.ts +4959 -0
- package/dist/db/db.d.ts.map +1 -0
- package/dist/db/db.js +37 -0
- package/dist/db/db.js.map +1 -0
- package/dist/db/index.d.ts +9 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +10 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/job-listener-events.d.ts +18 -0
- package/dist/db/job-listener-events.d.ts.map +1 -0
- package/dist/db/job-listener-events.js +59 -0
- package/dist/db/job-listener-events.js.map +1 -0
- package/dist/db/job-listeners.d.ts +55 -0
- package/dist/db/job-listeners.d.ts.map +1 -0
- package/dist/db/job-listeners.js +358 -0
- package/dist/db/job-listeners.js.map +1 -0
- package/dist/db/outbox-writes.d.ts +12 -0
- package/dist/db/outbox-writes.d.ts.map +1 -0
- package/dist/db/outbox-writes.js +20 -0
- package/dist/db/outbox-writes.js.map +1 -0
- package/dist/db/runner-lease-table.d.ts +469 -0
- package/dist/db/runner-lease-table.d.ts.map +1 -0
- package/dist/db/runner-lease-table.js +42 -0
- package/dist/db/runner-lease-table.js.map +1 -0
- package/dist/db/schema/common.d.ts +2 -0
- package/dist/db/schema/common.d.ts.map +1 -0
- package/dist/db/schema/common.js +4 -0
- package/dist/db/schema/common.js.map +1 -0
- package/dist/db/schema/job-executions.d.ts +311 -0
- package/dist/db/schema/job-executions.d.ts.map +1 -0
- package/dist/db/schema/job-executions.js +76 -0
- package/dist/db/schema/job-executions.js.map +1 -0
- package/dist/db/schema/job-listener-events.d.ts +200 -0
- package/dist/db/schema/job-listener-events.d.ts.map +1 -0
- package/dist/db/schema/job-listener-events.js +50 -0
- package/dist/db/schema/job-listener-events.js.map +1 -0
- package/dist/db/schema/jobs.d.ts +542 -0
- package/dist/db/schema/jobs.d.ts.map +1 -0
- package/dist/db/schema/jobs.js +121 -0
- package/dist/db/schema/jobs.js.map +1 -0
- package/dist/db/schema/outbox.d.ts +195 -0
- package/dist/db/schema/outbox.d.ts.map +1 -0
- package/dist/db/schema/outbox.js +5 -0
- package/dist/db/schema/outbox.js.map +1 -0
- package/dist/db/schema/step-attempts.d.ts +330 -0
- package/dist/db/schema/step-attempts.d.ts.map +1 -0
- package/dist/db/schema/step-attempts.js +80 -0
- package/dist/db/schema/step-attempts.js.map +1 -0
- package/dist/db/schema/steps.d.ts +352 -0
- package/dist/db/schema/steps.d.ts.map +1 -0
- package/dist/db/schema/steps.js +80 -0
- package/dist/db/schema/steps.js.map +1 -0
- package/dist/db/schema/workflow-run-attempts.d.ts +239 -0
- package/dist/db/schema/workflow-run-attempts.d.ts.map +1 -0
- package/dist/db/schema/workflow-run-attempts.js +53 -0
- package/dist/db/schema/workflow-run-attempts.js.map +1 -0
- package/dist/db/schema/workflow-runs.d.ts +360 -0
- package/dist/db/schema/workflow-runs.d.ts.map +1 -0
- package/dist/db/schema/workflow-runs.js +85 -0
- package/dist/db/schema/workflow-runs.js.map +1 -0
- package/dist/db/workflow-runs/job-executions.d.ts +49 -0
- package/dist/db/workflow-runs/job-executions.d.ts.map +1 -0
- package/dist/db/workflow-runs/job-executions.js +271 -0
- package/dist/db/workflow-runs/job-executions.js.map +1 -0
- package/dist/db/workflow-runs/jobs.d.ts +60 -0
- package/dist/db/workflow-runs/jobs.d.ts.map +1 -0
- package/dist/db/workflow-runs/jobs.js +288 -0
- package/dist/db/workflow-runs/jobs.js.map +1 -0
- package/dist/db/workflow-runs/outbox.d.ts +20 -0
- package/dist/db/workflow-runs/outbox.d.ts.map +1 -0
- package/dist/db/workflow-runs/outbox.js +68 -0
- package/dist/db/workflow-runs/outbox.js.map +1 -0
- package/dist/db/workflow-runs/queries.d.ts +71 -0
- package/dist/db/workflow-runs/queries.d.ts.map +1 -0
- package/dist/db/workflow-runs/queries.js +253 -0
- package/dist/db/workflow-runs/queries.js.map +1 -0
- package/dist/db/workflow-runs/run-create.d.ts +32 -0
- package/dist/db/workflow-runs/run-create.d.ts.map +1 -0
- package/dist/db/workflow-runs/run-create.js +288 -0
- package/dist/db/workflow-runs/run-create.js.map +1 -0
- package/dist/db/workflow-runs/run-graph.d.ts +27 -0
- package/dist/db/workflow-runs/run-graph.d.ts.map +1 -0
- package/dist/db/workflow-runs/run-graph.js +63 -0
- package/dist/db/workflow-runs/run-graph.js.map +1 -0
- package/dist/db/workflow-runs/run-rerun.d.ts +8 -0
- package/dist/db/workflow-runs/run-rerun.d.ts.map +1 -0
- package/dist/db/workflow-runs/run-rerun.js +207 -0
- package/dist/db/workflow-runs/run-rerun.js.map +1 -0
- package/dist/db/workflow-runs/run-status.d.ts +24 -0
- package/dist/db/workflow-runs/run-status.d.ts.map +1 -0
- package/dist/db/workflow-runs/run-status.js +249 -0
- package/dist/db/workflow-runs/run-status.js.map +1 -0
- package/dist/db/workflow-runs/runs.d.ts +7 -0
- package/dist/db/workflow-runs/runs.d.ts.map +1 -0
- package/dist/db/workflow-runs/runs.js +5 -0
- package/dist/db/workflow-runs/runs.js.map +1 -0
- package/dist/db/workflow-runs/shared.d.ts +24 -0
- package/dist/db/workflow-runs/shared.d.ts.map +1 -0
- package/dist/db/workflow-runs/shared.js +50 -0
- package/dist/db/workflow-runs/shared.js.map +1 -0
- package/dist/db/workflow-runs/steps.d.ts +83 -0
- package/dist/db/workflow-runs/steps.d.ts.map +1 -0
- package/dist/db/workflow-runs/steps.js +246 -0
- package/dist/db/workflow-runs/steps.js.map +1 -0
- package/dist/db/workflow-runs.d.ts +12 -0
- package/dist/db/workflow-runs.d.ts.map +1 -0
- package/dist/db/workflow-runs.js +8 -0
- package/dist/db/workflow-runs.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/metrics/index.d.ts +2 -0
- package/dist/metrics/index.d.ts.map +1 -0
- package/dist/metrics/index.js +3 -0
- package/dist/metrics/index.js.map +1 -0
- package/dist/metrics/instance.d.ts +20 -0
- package/dist/metrics/instance.d.ts.map +1 -0
- package/dist/metrics/instance.js +127 -0
- package/dist/metrics/instance.js.map +1 -0
- package/dist/metrics/service.d.ts +2 -0
- package/dist/metrics/service.d.ts.map +1 -0
- package/dist/metrics/service.js +30 -0
- package/dist/metrics/service.js.map +1 -0
- package/dist/presentation/dto/checkout-token.d.ts +6 -0
- package/dist/presentation/dto/checkout-token.d.ts.map +1 -0
- package/dist/presentation/dto/checkout-token.js +74 -0
- package/dist/presentation/dto/checkout-token.js.map +1 -0
- package/dist/presentation/dto/index.d.ts +4 -0
- package/dist/presentation/dto/index.d.ts.map +1 -0
- package/dist/presentation/dto/index.js +5 -0
- package/dist/presentation/dto/index.js.map +1 -0
- package/dist/presentation/dto/job.d.ts +6 -0
- package/dist/presentation/dto/job.d.ts.map +1 -0
- package/dist/presentation/dto/job.js +59 -0
- package/dist/presentation/dto/job.js.map +1 -0
- package/dist/presentation/dto/step.d.ts +6 -0
- package/dist/presentation/dto/step.d.ts.map +1 -0
- package/dist/presentation/dto/step.js +162 -0
- package/dist/presentation/dto/step.js.map +1 -0
- package/dist/presentation/dto/workflow-run.d.ts +6 -0
- package/dist/presentation/dto/workflow-run.d.ts.map +1 -0
- package/dist/presentation/dto/workflow-run.js +35 -0
- package/dist/presentation/dto/workflow-run.js.map +1 -0
- package/dist/presentation/index.d.ts +3 -0
- package/dist/presentation/index.d.ts.map +1 -0
- package/dist/presentation/index.js +4 -0
- package/dist/presentation/index.js.map +1 -0
- package/dist/presentation/routes/agent-runtime-config.d.ts +2 -0
- package/dist/presentation/routes/agent-runtime-config.d.ts.map +1 -0
- package/dist/presentation/routes/agent-runtime-config.js +71 -0
- package/dist/presentation/routes/agent-runtime-config.js.map +1 -0
- package/dist/presentation/routes/cancel-run.d.ts +2 -0
- package/dist/presentation/routes/cancel-run.d.ts.map +1 -0
- package/dist/presentation/routes/cancel-run.js +46 -0
- package/dist/presentation/routes/cancel-run.js.map +1 -0
- package/dist/presentation/routes/checkout-token.d.ts +2 -0
- package/dist/presentation/routes/checkout-token.d.ts.map +1 -0
- package/dist/presentation/routes/checkout-token.js +64 -0
- package/dist/presentation/routes/checkout-token.js.map +1 -0
- package/dist/presentation/routes/get-run-aggregates.d.ts +2 -0
- package/dist/presentation/routes/get-run-aggregates.d.ts.map +1 -0
- package/dist/presentation/routes/get-run-aggregates.js +60 -0
- package/dist/presentation/routes/get-run-aggregates.js.map +1 -0
- package/dist/presentation/routes/get-run.d.ts +2 -0
- package/dist/presentation/routes/get-run.d.ts.map +1 -0
- package/dist/presentation/routes/get-run.js +60 -0
- package/dist/presentation/routes/get-run.js.map +1 -0
- package/dist/presentation/routes/get-step-secrets.d.ts +2 -0
- package/dist/presentation/routes/get-step-secrets.d.ts.map +1 -0
- package/dist/presentation/routes/get-step-secrets.js +115 -0
- package/dist/presentation/routes/get-step-secrets.js.map +1 -0
- package/dist/presentation/routes/index.d.ts +4 -0
- package/dist/presentation/routes/index.d.ts.map +1 -0
- package/dist/presentation/routes/index.js +41 -0
- package/dist/presentation/routes/index.js.map +1 -0
- package/dist/presentation/routes/leased-step.d.ts +14 -0
- package/dist/presentation/routes/leased-step.d.ts.map +1 -0
- package/dist/presentation/routes/leased-step.js +50 -0
- package/dist/presentation/routes/leased-step.js.map +1 -0
- package/dist/presentation/routes/list-run-attempts.d.ts +2 -0
- package/dist/presentation/routes/list-run-attempts.d.ts.map +1 -0
- package/dist/presentation/routes/list-run-attempts.js +35 -0
- package/dist/presentation/routes/list-run-attempts.js.map +1 -0
- package/dist/presentation/routes/list-runs.d.ts +2 -0
- package/dist/presentation/routes/list-runs.d.ts.map +1 -0
- package/dist/presentation/routes/list-runs.js +70 -0
- package/dist/presentation/routes/list-runs.js.map +1 -0
- package/dist/presentation/routes/next-step.d.ts +2 -0
- package/dist/presentation/routes/next-step.d.ts.map +1 -0
- package/dist/presentation/routes/next-step.js +65 -0
- package/dist/presentation/routes/next-step.js.map +1 -0
- package/dist/presentation/routes/report-step.d.ts +2 -0
- package/dist/presentation/routes/report-step.d.ts.map +1 -0
- package/dist/presentation/routes/report-step.js +73 -0
- package/dist/presentation/routes/report-step.js.map +1 -0
- package/dist/presentation/routes/require-accessible-run.d.ts +7 -0
- package/dist/presentation/routes/require-accessible-run.d.ts.map +1 -0
- package/dist/presentation/routes/require-accessible-run.js +25 -0
- package/dist/presentation/routes/require-accessible-run.js.map +1 -0
- package/dist/presentation/routes/rerun-run.d.ts +2 -0
- package/dist/presentation/routes/rerun-run.d.ts.map +1 -0
- package/dist/presentation/routes/rerun-run.js +56 -0
- package/dist/presentation/routes/rerun-run.js.map +1 -0
- package/dist/presentation/subscribers/index.d.ts +8 -0
- package/dist/presentation/subscribers/index.d.ts.map +1 -0
- package/dist/presentation/subscribers/index.js +9 -0
- package/dist/presentation/subscribers/index.js.map +1 -0
- package/dist/presentation/subscribers/on-job-event-delivered.d.ts +3 -0
- package/dist/presentation/subscribers/on-job-event-delivered.d.ts.map +1 -0
- package/dist/presentation/subscribers/on-job-event-delivered.js +24 -0
- package/dist/presentation/subscribers/on-job-event-delivered.js.map +1 -0
- package/dist/presentation/subscribers/on-job-steps-settled.d.ts +3 -0
- package/dist/presentation/subscribers/on-job-steps-settled.d.ts.map +1 -0
- package/dist/presentation/subscribers/on-job-steps-settled.js +36 -0
- package/dist/presentation/subscribers/on-job-steps-settled.js.map +1 -0
- package/dist/presentation/subscribers/on-runner-job-claimed.d.ts +3 -0
- package/dist/presentation/subscribers/on-runner-job-claimed.d.ts.map +1 -0
- package/dist/presentation/subscribers/on-runner-job-claimed.js +20 -0
- package/dist/presentation/subscribers/on-runner-job-claimed.js.map +1 -0
- package/dist/presentation/subscribers/on-runner-job-lease-expired.d.ts +3 -0
- package/dist/presentation/subscribers/on-runner-job-lease-expired.d.ts.map +1 -0
- package/dist/presentation/subscribers/on-runner-job-lease-expired.js +35 -0
- package/dist/presentation/subscribers/on-runner-job-lease-expired.js.map +1 -0
- package/dist/presentation/subscribers/on-runner-job-queued.d.ts +3 -0
- package/dist/presentation/subscribers/on-runner-job-queued.d.ts.map +1 -0
- package/dist/presentation/subscribers/on-runner-job-queued.js +20 -0
- package/dist/presentation/subscribers/on-runner-job-queued.js.map +1 -0
- package/dist/presentation/subscribers/on-workflow-run-attempt-created.d.ts +3 -0
- package/dist/presentation/subscribers/on-workflow-run-attempt-created.d.ts.map +1 -0
- package/dist/presentation/subscribers/on-workflow-run-attempt-created.js +35 -0
- package/dist/presentation/subscribers/on-workflow-run-attempt-created.js.map +1 -0
- package/dist/presentation/subscribers/on-workflow-run-cancelled.d.ts +3 -0
- package/dist/presentation/subscribers/on-workflow-run-cancelled.d.ts.map +1 -0
- package/dist/presentation/subscribers/on-workflow-run-cancelled.js +25 -0
- package/dist/presentation/subscribers/on-workflow-run-cancelled.js.map +1 -0
- package/dist/temporal/activities/index.d.ts +23 -0
- package/dist/temporal/activities/index.d.ts.map +1 -0
- package/dist/temporal/activities/index.js +26 -0
- package/dist/temporal/activities/index.js.map +1 -0
- package/dist/temporal/activities/orchestration-activities.d.ts +130 -0
- package/dist/temporal/activities/orchestration-activities.d.ts.map +1 -0
- package/dist/temporal/activities/orchestration-activities.js +188 -0
- package/dist/temporal/activities/orchestration-activities.js.map +1 -0
- package/dist/temporal/constants.d.ts +7 -0
- package/dist/temporal/constants.d.ts.map +1 -0
- package/dist/temporal/constants.js +8 -0
- package/dist/temporal/constants.js.map +1 -0
- package/dist/temporal/index.d.ts +3 -0
- package/dist/temporal/index.d.ts.map +1 -0
- package/dist/temporal/index.js +4 -0
- package/dist/temporal/index.js.map +1 -0
- package/dist/temporal/workflow-not-found.d.ts +2 -0
- package/dist/temporal/workflow-not-found.d.ts.map +1 -0
- package/dist/temporal/workflow-not-found.js +10 -0
- package/dist/temporal/workflow-not-found.js.map +1 -0
- package/dist/temporal/workflows/deadline.d.ts +3 -0
- package/dist/temporal/workflows/deadline.d.ts.map +1 -0
- package/dist/temporal/workflows/deadline.js +8 -0
- package/dist/temporal/workflows/deadline.js.map +1 -0
- package/dist/temporal/workflows/index.d.ts +4 -0
- package/dist/temporal/workflows/index.d.ts.map +1 -0
- package/dist/temporal/workflows/index.js +5 -0
- package/dist/temporal/workflows/index.js.map +1 -0
- package/dist/temporal/workflows/job-execution-orchestration.d.ts +27 -0
- package/dist/temporal/workflows/job-execution-orchestration.d.ts.map +1 -0
- package/dist/temporal/workflows/job-execution-orchestration.js +265 -0
- package/dist/temporal/workflows/job-execution-orchestration.js.map +1 -0
- package/dist/temporal/workflows/job-listener-orchestration.d.ts +40 -0
- package/dist/temporal/workflows/job-listener-orchestration.d.ts.map +1 -0
- package/dist/temporal/workflows/job-listener-orchestration.js +332 -0
- package/dist/temporal/workflows/job-listener-orchestration.js.map +1 -0
- package/dist/temporal/workflows/run-orchestration.d.ts +8 -0
- package/dist/temporal/workflows/run-orchestration.d.ts.map +1 -0
- package/dist/temporal/workflows/run-orchestration.js +243 -0
- package/dist/temporal/workflows/run-orchestration.js.map +1 -0
- package/dist/temporal/workflows/test-env.d.ts +114 -0
- package/dist/temporal/workflows/test-env.d.ts.map +1 -0
- package/dist/temporal/workflows/test-env.js +323 -0
- package/dist/temporal/workflows/test-env.js.map +1 -0
- package/dist/tsconfig.test.tsbuildinfo +1 -0
- package/drizzle/0000_initial.sql +211 -0
- package/drizzle/0001_agent_tool_materialization.sql +1 -0
- package/drizzle/meta/0000_snapshot.json +1613 -0
- package/drizzle/meta/_journal.json +20 -0
- package/drizzle.config.ts +7 -0
- package/package.json +91 -0
- package/src/core/README.md +79 -0
- package/src/core/agent-tool-capability-warning.test.ts +280 -0
- package/src/core/agent-tool-capability-warning.ts +200 -0
- package/src/core/agent-tools.ts +422 -0
- package/src/core/checkout.test.ts +112 -0
- package/src/core/checkout.ts +63 -0
- package/src/core/condition-trace.ts +64 -0
- package/src/core/entities/index.ts +9 -0
- package/src/core/entities/job-execution.ts +32 -0
- package/src/core/entities/job-listener-event.ts +15 -0
- package/src/core/entities/job.ts +91 -0
- package/src/core/entities/step.ts +126 -0
- package/src/core/entities/workflow-run-attempt.ts +21 -0
- package/src/core/entities/workflow-run.ts +94 -0
- package/src/core/errors.test.ts +45 -0
- package/src/core/errors.ts +209 -0
- package/src/core/index.ts +54 -0
- package/src/core/job-execution-outcome.ts +64 -0
- package/src/core/job-execution.test.ts +1560 -0
- package/src/core/job-execution.ts +581 -0
- package/src/core/job-transition/decide-job-activation.test.ts +196 -0
- package/src/core/job-transition/decide-job-activation.ts +79 -0
- package/src/core/job-transition/derive-job-execution-outputs.ts +41 -0
- package/src/core/job-transition/derive-job-success.test.ts +133 -0
- package/src/core/job-transition/derive-job-success.ts +67 -0
- package/src/core/job-transition/index.ts +11 -0
- package/src/core/job-transition/runtime-completion-status-for-job.ts +14 -0
- package/src/core/listener-execution-materialization.test.ts +49 -0
- package/src/core/listener-execution-materialization.ts +162 -0
- package/src/core/run-workflow.test.ts +229 -0
- package/src/core/run-workflow.ts +41 -0
- package/src/core/source-control.test.ts +17 -0
- package/src/core/source-control.ts +22 -0
- package/src/core/step-config/agent.ts +459 -0
- package/src/core/step-config/assemble-run-context.test.ts +1021 -0
- package/src/core/step-config/assemble-run-context.ts +535 -0
- package/src/core/step-config/complete-step-dispatch-config.test.ts +354 -0
- package/src/core/step-config/complete-step-dispatch-config.ts +40 -0
- package/src/core/step-config/fields.ts +111 -0
- package/src/core/step-config/index.ts +41 -0
- package/src/core/step-config/materialize-job-execution-steps.test.ts +494 -0
- package/src/core/step-config/materialize-job-execution-steps.ts +136 -0
- package/src/core/step-config/materialize-workflow-model.test.ts +1214 -0
- package/src/core/step-config/materialize-workflow-model.ts +140 -0
- package/src/core/step-config/resolve-job-execution-name.test.ts +94 -0
- package/src/core/step-config/resolve-job-execution-name.ts +51 -0
- package/src/core/step-config/resolve-step-config.ts +199 -0
- package/src/core/step-config/run.ts +467 -0
- package/src/core/step-config/workflow-evaluation-context.ts +6 -0
- package/src/core/step-transition/apply-step-transition.ts +163 -0
- package/src/core/step-transition/decide-step-transition.test.ts +307 -0
- package/src/core/step-transition/decide-step-transition.ts +200 -0
- package/src/core/step-transition/evaluate-gate.test.ts +317 -0
- package/src/core/step-transition/evaluate-gate.ts +168 -0
- package/src/core/step-transition/read-step-outputs.ts +27 -0
- package/src/core/workflow-run-creation.test.ts +155 -0
- package/src/core/workflow-run-creation.ts +131 -0
- package/src/core/workflow-scheduling/index.ts +15 -0
- package/src/core/workflow-scheduling/run-progress.test.ts +46 -0
- package/src/core/workflow-scheduling/run-progress.ts +68 -0
- package/src/core/workflow-scheduling/runtime-dag.ts +10 -0
- package/src/core/workflow-scheduling/runtime-scheduling-command.ts +20 -0
- package/src/core/workflow-scheduling/schedule-runtime-dag.test.ts +197 -0
- package/src/core/workflow-scheduling/schedule-runtime-dag.ts +115 -0
- package/src/db/db.ts +40 -0
- package/src/db/index.ts +86 -0
- package/src/db/job-listener-events.test.ts +113 -0
- package/src/db/job-listener-events.ts +73 -0
- package/src/db/job-listeners.test.ts +865 -0
- package/src/db/job-listeners.ts +564 -0
- package/src/db/outbox-writes.ts +40 -0
- package/src/db/rerun-listener.test.ts +64 -0
- package/src/db/run-timeout.test.ts +102 -0
- package/src/db/runner-lease-table.ts +39 -0
- package/src/db/schema/common.ts +3 -0
- package/src/db/schema/job-executions.ts +85 -0
- package/src/db/schema/job-listener-events.ts +58 -0
- package/src/db/schema/jobs.ts +136 -0
- package/src/db/schema/outbox.ts +4 -0
- package/src/db/schema/step-attempts.ts +99 -0
- package/src/db/schema/steps.ts +99 -0
- package/src/db/schema/workflow-run-attempts.ts +59 -0
- package/src/db/schema/workflow-runs.ts +112 -0
- package/src/db/workflow-runs/job-executions.test.ts +99 -0
- package/src/db/workflow-runs/job-executions.ts +421 -0
- package/src/db/workflow-runs/job-status.test.ts +532 -0
- package/src/db/workflow-runs/jobs.test.ts +194 -0
- package/src/db/workflow-runs/jobs.ts +418 -0
- package/src/db/workflow-runs/outbox.ts +109 -0
- package/src/db/workflow-runs/queries.test.ts +256 -0
- package/src/db/workflow-runs/queries.ts +437 -0
- package/src/db/workflow-runs/run-create.test.ts +1281 -0
- package/src/db/workflow-runs/run-create.ts +373 -0
- package/src/db/workflow-runs/run-graph.ts +95 -0
- package/src/db/workflow-runs/run-rerun.test.ts +625 -0
- package/src/db/workflow-runs/run-rerun.ts +266 -0
- package/src/db/workflow-runs/run-status.test.ts +425 -0
- package/src/db/workflow-runs/run-status.ts +391 -0
- package/src/db/workflow-runs/runs.ts +17 -0
- package/src/db/workflow-runs/shared.ts +84 -0
- package/src/db/workflow-runs/steps.test.ts +191 -0
- package/src/db/workflow-runs/steps.ts +476 -0
- package/src/db/workflow-runs.ts +111 -0
- package/src/index.ts +99 -0
- package/src/metrics/index.ts +1 -0
- package/src/metrics/instance.ts +160 -0
- package/src/metrics/service.ts +30 -0
- package/src/presentation/dto/checkout-token.test.ts +107 -0
- package/src/presentation/dto/checkout-token.ts +85 -0
- package/src/presentation/dto/index.ts +3 -0
- package/src/presentation/dto/job.test.ts +108 -0
- package/src/presentation/dto/job.ts +64 -0
- package/src/presentation/dto/step.test.ts +307 -0
- package/src/presentation/dto/step.ts +145 -0
- package/src/presentation/dto/workflow-run.ts +38 -0
- package/src/presentation/index.ts +10 -0
- package/src/presentation/routes/agent-runtime-config.test.ts +478 -0
- package/src/presentation/routes/agent-runtime-config.ts +81 -0
- package/src/presentation/routes/cancel-run.test.ts +156 -0
- package/src/presentation/routes/cancel-run.ts +37 -0
- package/src/presentation/routes/checkout-token.test.ts +366 -0
- package/src/presentation/routes/checkout-token.ts +61 -0
- package/src/presentation/routes/get-run-aggregates.test.ts +114 -0
- package/src/presentation/routes/get-run-aggregates.ts +69 -0
- package/src/presentation/routes/get-run.test.ts +604 -0
- package/src/presentation/routes/get-run.ts +66 -0
- package/src/presentation/routes/get-step-secrets.test.ts +260 -0
- package/src/presentation/routes/get-step-secrets.ts +117 -0
- package/src/presentation/routes/index.test.ts +71 -0
- package/src/presentation/routes/index.ts +42 -0
- package/src/presentation/routes/leased-step.ts +54 -0
- package/src/presentation/routes/list-run-attempts.test.ts +163 -0
- package/src/presentation/routes/list-run-attempts.ts +27 -0
- package/src/presentation/routes/list-runs.test.ts +244 -0
- package/src/presentation/routes/list-runs.ts +83 -0
- package/src/presentation/routes/next-step.test.ts +366 -0
- package/src/presentation/routes/next-step.ts +62 -0
- package/src/presentation/routes/report-step.test.ts +374 -0
- package/src/presentation/routes/report-step.ts +61 -0
- package/src/presentation/routes/require-accessible-run.ts +27 -0
- package/src/presentation/routes/rerun-run.test.ts +202 -0
- package/src/presentation/routes/rerun-run.ts +48 -0
- package/src/presentation/subscribers/index.ts +7 -0
- package/src/presentation/subscribers/on-job-event-delivered.test.ts +71 -0
- package/src/presentation/subscribers/on-job-event-delivered.ts +30 -0
- package/src/presentation/subscribers/on-job-steps-settled.test.ts +75 -0
- package/src/presentation/subscribers/on-job-steps-settled.ts +42 -0
- package/src/presentation/subscribers/on-runner-job-claimed.test.ts +57 -0
- package/src/presentation/subscribers/on-runner-job-claimed.ts +23 -0
- package/src/presentation/subscribers/on-runner-job-lease-expired.test.ts +73 -0
- package/src/presentation/subscribers/on-runner-job-lease-expired.ts +36 -0
- package/src/presentation/subscribers/on-runner-job-queued.test.ts +57 -0
- package/src/presentation/subscribers/on-runner-job-queued.ts +23 -0
- package/src/presentation/subscribers/on-workflow-run-attempt-created.test.ts +69 -0
- package/src/presentation/subscribers/on-workflow-run-attempt-created.ts +40 -0
- package/src/presentation/subscribers/on-workflow-run-cancelled.test.ts +59 -0
- package/src/presentation/subscribers/on-workflow-run-cancelled.ts +29 -0
- package/src/temporal/activities/index.ts +45 -0
- package/src/temporal/activities/orchestration-activities.test.ts +115 -0
- package/src/temporal/activities/orchestration-activities.ts +305 -0
- package/src/temporal/constants.ts +6 -0
- package/src/temporal/index.ts +6 -0
- package/src/temporal/workflow-not-found.ts +9 -0
- package/src/temporal/workflows/deadline.ts +7 -0
- package/src/temporal/workflows/index.ts +11 -0
- package/src/temporal/workflows/job-execution-orchestration-timeout.test.ts +165 -0
- package/src/temporal/workflows/job-execution-orchestration.test.ts +311 -0
- package/src/temporal/workflows/job-execution-orchestration.ts +314 -0
- package/src/temporal/workflows/job-listener-orchestration-continuation.test.ts +93 -0
- package/src/temporal/workflows/job-listener-orchestration.test.ts +406 -0
- package/src/temporal/workflows/job-listener-orchestration.ts +490 -0
- package/src/temporal/workflows/run-orchestration.test.ts +409 -0
- package/src/temporal/workflows/run-orchestration.ts +283 -0
- package/src/temporal/workflows/test-env.ts +409 -0
- package/test/env.ts +11 -0
- package/test/factories/job.ts +83 -0
- package/test/factories/project.ts +16 -0
- package/test/factories/workflow-model.test.ts +26 -0
- package/test/factories/workflow-model.ts +268 -0
- package/test/factories/workflow-run.ts +58 -0
- package/test/fixtures/active-lease-token.ts +85 -0
- package/test/fixtures/job-with-steps.ts +42 -0
- package/test/fixtures/lease-token.ts +44 -0
- package/test/fixtures/strip-setup-step.ts +23 -0
- package/test/globalSetup.ts +54 -0
- package/test/helpers/workflow-runs.ts +210 -0
- package/test/index.ts +3 -0
- package/test/setup.ts +17 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.json +3 -0
- package/tsconfig.test.json +8 -0
- package/vitest.config.ts +12 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { PersistedEvaluationTraceEntry } from './step.js';
|
|
2
|
+
export type JobStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'skipped';
|
|
3
|
+
export type JobMode = 'one_shot' | 'listening';
|
|
4
|
+
export type ListenerStatus = 'inactive' | 'listening' | 'resolved';
|
|
5
|
+
export type ResolutionReason = 'until' | 'timeout' | 'max_executions' | 'cancelled';
|
|
6
|
+
export interface JobCheckout {
|
|
7
|
+
permissions: {
|
|
8
|
+
contents: 'read' | 'write';
|
|
9
|
+
};
|
|
10
|
+
persistCredentials: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const JOB_STATUS_REASONS: readonly ["dependency_not_completed", "condition_false", "default_gate_rejected", "condition_rejected", "condition_errored", "user_cancelled", "run_cancelled", "timed_out", "runner_lost", "step_failed", "unknown"];
|
|
13
|
+
export type JobStatusReason = (typeof JOB_STATUS_REASONS)[number];
|
|
14
|
+
export interface Job {
|
|
15
|
+
id: string;
|
|
16
|
+
workflowRunAttemptId: string;
|
|
17
|
+
key: string;
|
|
18
|
+
mode: JobMode;
|
|
19
|
+
name: string | null;
|
|
20
|
+
status: JobStatus;
|
|
21
|
+
statusReason: JobStatusReason | null;
|
|
22
|
+
carriedOver: boolean;
|
|
23
|
+
checkout: JobCheckout;
|
|
24
|
+
success?: string | null;
|
|
25
|
+
evaluationTrace?: readonly PersistedEvaluationTraceEntry[] | null;
|
|
26
|
+
executionTimeoutMs?: number | null;
|
|
27
|
+
listeningTimeoutMs: number | null;
|
|
28
|
+
maxExecutions: number | null;
|
|
29
|
+
onResolve: 'finish' | 'cancel' | null;
|
|
30
|
+
batchDebounceMs: number | null;
|
|
31
|
+
batchMaxSize: number | null;
|
|
32
|
+
batchMaxWaitMs: number | null;
|
|
33
|
+
listenerStatus: ListenerStatus;
|
|
34
|
+
resolutionReason: ResolutionReason | null;
|
|
35
|
+
listeningOn: JobListeningTrigger[] | null;
|
|
36
|
+
listeningUntil: JobListeningTrigger[] | null;
|
|
37
|
+
outputs: Record<string, unknown> | null;
|
|
38
|
+
dependencies: string[];
|
|
39
|
+
runner: string[] | null;
|
|
40
|
+
position: number;
|
|
41
|
+
version: number;
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
updatedAt: Date;
|
|
44
|
+
}
|
|
45
|
+
export interface JobListeningTrigger {
|
|
46
|
+
readonly source: string;
|
|
47
|
+
readonly event: string;
|
|
48
|
+
readonly inputs?: Readonly<Record<string, unknown>>;
|
|
49
|
+
readonly filter?: string;
|
|
50
|
+
}
|
|
51
|
+
export type TerminalJobStatus = Extract<JobStatus, 'succeeded' | 'failed' | 'cancelled' | 'skipped'>;
|
|
52
|
+
export declare function isJobTerminal(status: JobStatus): status is TerminalJobStatus;
|
|
53
|
+
export declare function toJobStatusReason(value: string | null): JobStatusReason | null;
|
|
54
|
+
//# sourceMappingURL=job.d.ts.map
|
|
@@ -0,0 +1 @@
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,IAAI,CAK9E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const JOB_STATUS_REASONS = [
|
|
2
|
+
'dependency_not_completed',
|
|
3
|
+
'condition_false',
|
|
4
|
+
'default_gate_rejected',
|
|
5
|
+
'condition_rejected',
|
|
6
|
+
'condition_errored',
|
|
7
|
+
'user_cancelled',
|
|
8
|
+
'run_cancelled',
|
|
9
|
+
'timed_out',
|
|
10
|
+
'runner_lost',
|
|
11
|
+
'step_failed',
|
|
12
|
+
'unknown'
|
|
13
|
+
];
|
|
14
|
+
const JOB_STATUS_REASON_SET = new Set(JOB_STATUS_REASONS);
|
|
15
|
+
const TERMINAL_JOB_STATUSES = new Set([
|
|
16
|
+
'succeeded',
|
|
17
|
+
'failed',
|
|
18
|
+
'cancelled',
|
|
19
|
+
'skipped'
|
|
20
|
+
]);
|
|
21
|
+
export function isJobTerminal(status) {
|
|
22
|
+
return TERMINAL_JOB_STATUSES.has(status);
|
|
23
|
+
}
|
|
24
|
+
export function toJobStatusReason(value) {
|
|
25
|
+
if (value === null) return null;
|
|
26
|
+
return JOB_STATUS_REASON_SET.has(value) ? value : 'unknown';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=job.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/core/entities/job.ts"],"sourcesContent":["import type {PersistedEvaluationTraceEntry} from './step.js';\n\nexport type JobStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'skipped';\n\nexport type JobMode = 'one_shot' | 'listening';\n\nexport type ListenerStatus = 'inactive' | 'listening' | 'resolved';\n\nexport type ResolutionReason = 'until' | 'timeout' | 'max_executions' | 'cancelled';\n\nexport interface JobCheckout {\n permissions: {\n contents: 'read' | 'write';\n };\n persistCredentials: boolean;\n}\n\nexport const JOB_STATUS_REASONS = [\n 'dependency_not_completed',\n 'condition_false',\n 'default_gate_rejected',\n 'condition_rejected',\n 'condition_errored',\n 'user_cancelled',\n 'run_cancelled',\n 'timed_out',\n 'runner_lost',\n 'step_failed',\n 'unknown',\n] as const;\n\nexport type JobStatusReason = (typeof JOB_STATUS_REASONS)[number];\n\nconst JOB_STATUS_REASON_SET = new Set<JobStatusReason>(JOB_STATUS_REASONS);\n\nexport interface Job {\n id: string;\n workflowRunAttemptId: string;\n key: string;\n mode: JobMode;\n name: string | null;\n status: JobStatus;\n statusReason: JobStatusReason | null;\n carriedOver: boolean;\n checkout: JobCheckout;\n success?: string | null;\n evaluationTrace?: readonly PersistedEvaluationTraceEntry[] | null;\n executionTimeoutMs?: number | null;\n listeningTimeoutMs: number | null;\n maxExecutions: number | null;\n onResolve: 'finish' | 'cancel' | null;\n batchDebounceMs: number | null;\n batchMaxSize: number | null;\n batchMaxWaitMs: number | null;\n listenerStatus: ListenerStatus;\n resolutionReason: ResolutionReason | null;\n listeningOn: JobListeningTrigger[] | null;\n listeningUntil: JobListeningTrigger[] | null;\n outputs: Record<string, unknown> | null;\n dependencies: string[];\n runner: string[] | null;\n position: number;\n version: number;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport interface JobListeningTrigger {\n readonly source: string;\n readonly event: string;\n readonly inputs?: Readonly<Record<string, unknown>>;\n readonly filter?: string;\n}\n\nexport type TerminalJobStatus = Extract<\n JobStatus,\n 'succeeded' | 'failed' | 'cancelled' | 'skipped'\n>;\n\nconst TERMINAL_JOB_STATUSES = new Set<JobStatus>(['succeeded', 'failed', 'cancelled', 'skipped']);\n\nexport function isJobTerminal(status: JobStatus): status is TerminalJobStatus {\n return TERMINAL_JOB_STATUSES.has(status);\n}\n\nexport function toJobStatusReason(value: string | null): JobStatusReason | null {\n if (value === null) return null;\n return JOB_STATUS_REASON_SET.has(value as JobStatusReason)\n ? (value as JobStatusReason)\n : 'unknown';\n}\n"],"names":["JOB_STATUS_REASONS","JOB_STATUS_REASON_SET","Set","TERMINAL_JOB_STATUSES","isJobTerminal","status","has","toJobStatusReason","value"],"mappings":"AAiBA,OAAO,MAAMA,qBAAqB;IAChC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAU;AAIX,MAAMC,wBAAwB,IAAIC,IAAqBF;AA8CvD,MAAMG,wBAAwB,IAAID,IAAe;IAAC;IAAa;IAAU;IAAa;CAAU;AAEhG,OAAO,SAASE,cAAcC,MAAiB;IAC7C,OAAOF,sBAAsBG,GAAG,CAACD;AACnC;AAEA,OAAO,SAASE,kBAAkBC,KAAoB;IACpD,IAAIA,UAAU,MAAM,OAAO;IAC3B,OAAOP,sBAAsBK,GAAG,CAACE,SAC5BA,QACD;AACN"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { AgentIntegrationMcpServerConfigDto, AgentThinking, Harness, MaterializedAgentIntegrationConfigDto } from '@shipfox/api-agent-dto';
|
|
2
|
+
import type { EvaluationTraceEntry, EvaluationTraceLimitEntry, ResolvedField, WorkflowExpression } from '@shipfox/expression';
|
|
3
|
+
import type { InterpolationUnresolvableField } from '../errors.js';
|
|
4
|
+
export type StepStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'skipped';
|
|
5
|
+
export declare const STEP_STATUS_REASONS: readonly ["default_gate_rejected", "condition_rejected", "condition_errored"];
|
|
6
|
+
export type StepStatusReason = (typeof STEP_STATUS_REASONS)[number];
|
|
7
|
+
export declare function toStepStatusReason(value: string | null): StepStatusReason | null;
|
|
8
|
+
export type StepAttemptLogOutcome = 'drained' | 'abandoned';
|
|
9
|
+
export type StepAttemptStatus = Exclude<StepStatus, 'pending' | 'skipped'>;
|
|
10
|
+
export interface StepSourceLocation {
|
|
11
|
+
startLine: number;
|
|
12
|
+
endLine: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Trace entry after a resolver-local expression trace is attached to workflow
|
|
16
|
+
* storage.
|
|
17
|
+
*
|
|
18
|
+
* Step config traces are stored on step attempts with the resolved attempt
|
|
19
|
+
* config; job-level traces are stored on the job or job-execution row whose
|
|
20
|
+
* value/status they explain. Keep `field` as the authored field path that
|
|
21
|
+
* produced the trace, not as a step-only enum.
|
|
22
|
+
*/
|
|
23
|
+
export type PersistedEvaluationTraceEntry = (EvaluationTraceEntry & {
|
|
24
|
+
readonly field: string;
|
|
25
|
+
readonly envKey?: string;
|
|
26
|
+
}) | EvaluationTraceLimitEntry;
|
|
27
|
+
export interface StepConfigEvaluationTraceEntry extends EvaluationTraceEntry {
|
|
28
|
+
readonly field: InterpolationUnresolvableField;
|
|
29
|
+
readonly envKey?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface StepConfigDispatchPlan {
|
|
32
|
+
run?: ResolvedField;
|
|
33
|
+
env?: Readonly<Record<string, ResolvedField>>;
|
|
34
|
+
agent?: {
|
|
35
|
+
prompt?: ResolvedField;
|
|
36
|
+
model?: ResolvedField;
|
|
37
|
+
provider?: ResolvedField;
|
|
38
|
+
harness?: Harness;
|
|
39
|
+
thinking?: AgentThinking;
|
|
40
|
+
tools?: readonly string[];
|
|
41
|
+
integrations?: readonly MaterializedAgentIntegrationConfigDto[];
|
|
42
|
+
mcpServers?: readonly AgentIntegrationMcpServerConfigDto[];
|
|
43
|
+
};
|
|
44
|
+
trace?: readonly (StepConfigEvaluationTraceEntry | EvaluationTraceLimitEntry)[];
|
|
45
|
+
}
|
|
46
|
+
export interface Step {
|
|
47
|
+
id: string;
|
|
48
|
+
jobExecutionId: string;
|
|
49
|
+
key: string | null;
|
|
50
|
+
name: string;
|
|
51
|
+
sourceLocation: StepSourceLocation | null;
|
|
52
|
+
status: StepStatus;
|
|
53
|
+
statusReason: StepStatusReason | null;
|
|
54
|
+
evaluationTrace: readonly PersistedEvaluationTraceEntry[] | null;
|
|
55
|
+
type: string;
|
|
56
|
+
config: Record<string, unknown>;
|
|
57
|
+
condition: WorkflowExpression | null;
|
|
58
|
+
configPlan: StepConfigDispatchPlan | null;
|
|
59
|
+
authoredConfig: Record<string, unknown> | null;
|
|
60
|
+
error: Record<string, unknown> | null;
|
|
61
|
+
position: number;
|
|
62
|
+
version: number;
|
|
63
|
+
currentAttempt: number;
|
|
64
|
+
createdAt: Date;
|
|
65
|
+
updatedAt: Date;
|
|
66
|
+
}
|
|
67
|
+
export interface StepAttempt {
|
|
68
|
+
id: string;
|
|
69
|
+
stepId: string;
|
|
70
|
+
attempt: number;
|
|
71
|
+
executionOrder: number;
|
|
72
|
+
status: StepAttemptStatus;
|
|
73
|
+
config: Record<string, unknown> | null;
|
|
74
|
+
evaluationTrace: readonly PersistedEvaluationTraceEntry[] | null;
|
|
75
|
+
output: Record<string, unknown> | null;
|
|
76
|
+
response: string | null;
|
|
77
|
+
error: Record<string, unknown> | null;
|
|
78
|
+
exitCode: number | null;
|
|
79
|
+
gateResult: Record<string, unknown> | null;
|
|
80
|
+
restartFeedback: string | null;
|
|
81
|
+
logOutcome: StepAttemptLogOutcome | null;
|
|
82
|
+
startedAt: Date;
|
|
83
|
+
finishedAt: Date | null;
|
|
84
|
+
createdAt: Date;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../src/core/entities/step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kCAAkC,EAClC,aAAa,EACb,OAAO,EACP,qCAAqC,EACtC,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,oBAAoB,EACpB,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAC,8BAA8B,EAAC,MAAM,cAAc,CAAC;AAEjE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AAElG,eAAO,MAAM,mBAAmB,+EAItB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAA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AC;IACvC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC3C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACzC,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const STEP_STATUS_REASONS = [
|
|
2
|
+
'default_gate_rejected',
|
|
3
|
+
'condition_rejected',
|
|
4
|
+
'condition_errored'
|
|
5
|
+
];
|
|
6
|
+
const STEP_STATUS_REASON_SET = new Set(STEP_STATUS_REASONS);
|
|
7
|
+
export function toStepStatusReason(value) {
|
|
8
|
+
if (value === null) return null;
|
|
9
|
+
return STEP_STATUS_REASON_SET.has(value) ? value : null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/core/entities/step.ts"],"sourcesContent":["import type {\n AgentIntegrationMcpServerConfigDto,\n AgentThinking,\n Harness,\n MaterializedAgentIntegrationConfigDto,\n} from '@shipfox/api-agent-dto';\nimport type {\n EvaluationTraceEntry,\n EvaluationTraceLimitEntry,\n ResolvedField,\n WorkflowExpression,\n} from '@shipfox/expression';\nimport type {InterpolationUnresolvableField} from '../errors.js';\n\nexport type StepStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'skipped';\n\nexport const STEP_STATUS_REASONS = [\n 'default_gate_rejected',\n 'condition_rejected',\n 'condition_errored',\n] as const;\n\nexport type StepStatusReason = (typeof STEP_STATUS_REASONS)[number];\n\nconst STEP_STATUS_REASON_SET = new Set<StepStatusReason>(STEP_STATUS_REASONS);\n\nexport function toStepStatusReason(value: string | null): StepStatusReason | null {\n if (value === null) return null;\n return STEP_STATUS_REASON_SET.has(value as StepStatusReason) ? (value as StepStatusReason) : null;\n}\n\nexport type StepAttemptLogOutcome = 'drained' | 'abandoned';\n\n// A step_attempts row exists only once an attempt is dispatched, so it is never\n// 'pending' or 'skipped'.\nexport type StepAttemptStatus = Exclude<StepStatus, 'pending' | 'skipped'>;\n\nexport interface StepSourceLocation {\n startLine: number;\n endLine: number;\n}\n\n/**\n * Trace entry after a resolver-local expression trace is attached to workflow\n * storage.\n *\n * Step config traces are stored on step attempts with the resolved attempt\n * config; job-level traces are stored on the job or job-execution row whose\n * value/status they explain. Keep `field` as the authored field path that\n * produced the trace, not as a step-only enum.\n */\nexport type PersistedEvaluationTraceEntry =\n | (EvaluationTraceEntry & {\n readonly field: string;\n readonly envKey?: string;\n })\n | EvaluationTraceLimitEntry;\n\nexport interface StepConfigEvaluationTraceEntry extends EvaluationTraceEntry {\n readonly field: InterpolationUnresolvableField;\n readonly envKey?: string;\n}\n\nexport interface StepConfigDispatchPlan {\n run?: ResolvedField;\n env?: Readonly<Record<string, ResolvedField>>;\n agent?: {\n prompt?: ResolvedField;\n model?: ResolvedField;\n provider?: ResolvedField;\n harness?: Harness;\n thinking?: AgentThinking;\n tools?: readonly string[];\n integrations?: readonly MaterializedAgentIntegrationConfigDto[];\n mcpServers?: readonly AgentIntegrationMcpServerConfigDto[];\n };\n trace?: readonly (StepConfigEvaluationTraceEntry | EvaluationTraceLimitEntry)[];\n}\n\nexport interface Step {\n id: string;\n jobExecutionId: string;\n key: string | null;\n name: string;\n sourceLocation: StepSourceLocation | null;\n status: StepStatus;\n statusReason: StepStatusReason | null;\n evaluationTrace: readonly PersistedEvaluationTraceEntry[] | null;\n type: string;\n config: Record<string, unknown>;\n condition: WorkflowExpression | null;\n configPlan: StepConfigDispatchPlan | null;\n authoredConfig: Record<string, unknown> | null;\n error: Record<string, unknown> | null;\n position: number;\n version: number;\n // Execution-attempt identity for the current projection: which attempt the\n // status/output/error above reflect. Distinct from `version` (the optimistic\n // row counter). Starts at 1 and is bumped when a step is rewound.\n currentAttempt: number;\n createdAt: Date;\n updatedAt: Date;\n}\n\n// Append-only execution history: one row per dispatched attempt of a step. The\n// current projection lives on `Step`; this is the audit trail and the\n// idempotency anchor (unique on (stepId, attempt)).\nexport interface StepAttempt {\n id: string;\n stepId: string;\n attempt: number;\n executionOrder: number;\n status: StepAttemptStatus;\n config: Record<string, unknown> | null;\n evaluationTrace: readonly PersistedEvaluationTraceEntry[] | null;\n output: Record<string, unknown> | null;\n response: string | null;\n error: Record<string, unknown> | null;\n exitCode: number | null;\n gateResult: Record<string, unknown> | null;\n restartFeedback: string | null;\n logOutcome: StepAttemptLogOutcome | null;\n startedAt: Date;\n finishedAt: Date | null;\n createdAt: Date;\n}\n"],"names":["STEP_STATUS_REASONS","STEP_STATUS_REASON_SET","Set","toStepStatusReason","value","has"],"mappings":"AAgBA,OAAO,MAAMA,sBAAsB;IACjC;IACA;IACA;CACD,CAAU;AAIX,MAAMC,yBAAyB,IAAIC,IAAsBF;AAEzD,OAAO,SAASG,mBAAmBC,KAAoB;IACrD,IAAIA,UAAU,MAAM,OAAO;IAC3B,OAAOH,uBAAuBI,GAAG,CAACD,SAA8BA,QAA6B;AAC/F"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WorkflowModel } from '@shipfox/api-definitions';
|
|
2
|
+
import type { AgentToolMaterializationSnapshot } from '#core/agent-tools.js';
|
|
3
|
+
import type { WorkflowRunStatus } from './workflow-run.js';
|
|
4
|
+
export type RerunMode = 'all' | 'failed';
|
|
5
|
+
export interface WorkflowRunAttempt {
|
|
6
|
+
id: string;
|
|
7
|
+
workflowRunId: string;
|
|
8
|
+
attempt: number;
|
|
9
|
+
status: WorkflowRunStatus;
|
|
10
|
+
rerunMode: RerunMode | null;
|
|
11
|
+
rerunByUserId: string | null;
|
|
12
|
+
model: WorkflowModel | null;
|
|
13
|
+
agentToolMaterialization: AgentToolMaterializationSnapshot | null;
|
|
14
|
+
version: number;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
updatedAt: Date;
|
|
17
|
+
startedAt: Date | null;
|
|
18
|
+
finishedAt: Date | null;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=workflow-run-attempt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-run-attempt.d.ts","sourceRoot":"","sources":["../../../src/core/entities/workflow-run-attempt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAC,gCAAgC,EAAC,MAAM,sBAAsB,CAAC;AAC3E,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAEzD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEzC,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,wBAAwB,EAAE,gCAAgC,GAAG,IAAI,CAAC;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/core/entities/workflow-run-attempt.ts"],"sourcesContent":["import type {WorkflowModel} from '@shipfox/api-definitions';\nimport type {AgentToolMaterializationSnapshot} from '#core/agent-tools.js';\nimport type {WorkflowRunStatus} from './workflow-run.js';\n\nexport type RerunMode = 'all' | 'failed';\n\nexport interface WorkflowRunAttempt {\n id: string;\n workflowRunId: string;\n attempt: number;\n status: WorkflowRunStatus;\n rerunMode: RerunMode | null;\n rerunByUserId: string | null;\n model: WorkflowModel | null;\n agentToolMaterialization: AgentToolMaterializationSnapshot | null;\n version: number;\n createdAt: Date;\n updatedAt: Date;\n startedAt: Date | null;\n finishedAt: Date | null;\n}\n"],"names":[],"mappings":"AAMA,WAcC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Job } from './job.js';
|
|
2
|
+
import type { JobExecution } from './job-execution.js';
|
|
3
|
+
import type { Step, StepAttempt } from './step.js';
|
|
4
|
+
import type { WorkflowRunAttempt } from './workflow-run-attempt.js';
|
|
5
|
+
export type WorkflowRunStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';
|
|
6
|
+
export type TerminalWorkflowRunStatus = Extract<WorkflowRunStatus, 'succeeded' | 'failed' | 'cancelled'>;
|
|
7
|
+
export declare function isWorkflowRunTerminal(status: WorkflowRunStatus): status is TerminalWorkflowRunStatus;
|
|
8
|
+
export interface WorkflowSourceSnapshot {
|
|
9
|
+
content: string;
|
|
10
|
+
format: 'yaml';
|
|
11
|
+
}
|
|
12
|
+
export type TriggerPayload = {
|
|
13
|
+
source: 'manual';
|
|
14
|
+
provider?: 'manual' | undefined;
|
|
15
|
+
event: 'fire';
|
|
16
|
+
subscriptionId: string;
|
|
17
|
+
userId: string;
|
|
18
|
+
} | {
|
|
19
|
+
source: 'cron';
|
|
20
|
+
provider?: 'cron' | undefined;
|
|
21
|
+
event: 'tick';
|
|
22
|
+
scheduleId: string;
|
|
23
|
+
} | {
|
|
24
|
+
source: string;
|
|
25
|
+
provider?: string | undefined;
|
|
26
|
+
event: string;
|
|
27
|
+
deliveryId: string;
|
|
28
|
+
data: unknown;
|
|
29
|
+
};
|
|
30
|
+
export interface WorkflowRun {
|
|
31
|
+
id: string;
|
|
32
|
+
workspaceId: string;
|
|
33
|
+
projectId: string;
|
|
34
|
+
definitionId: string;
|
|
35
|
+
name: string;
|
|
36
|
+
status: WorkflowRunStatus;
|
|
37
|
+
currentAttempt: number;
|
|
38
|
+
triggerProvider: string | null;
|
|
39
|
+
triggerSource: string;
|
|
40
|
+
triggerEvent: string;
|
|
41
|
+
triggerPayload: TriggerPayload;
|
|
42
|
+
inputs: Record<string, unknown> | null;
|
|
43
|
+
sourceSnapshot: WorkflowSourceSnapshot | null;
|
|
44
|
+
triggerIdempotencyKey: string | null;
|
|
45
|
+
timeoutMs: number;
|
|
46
|
+
version: number;
|
|
47
|
+
createdAt: Date;
|
|
48
|
+
updatedAt: Date;
|
|
49
|
+
startedAt: Date | null;
|
|
50
|
+
finishedAt: Date | null;
|
|
51
|
+
}
|
|
52
|
+
export interface StepDetail extends Step {
|
|
53
|
+
attempts: StepAttempt[];
|
|
54
|
+
}
|
|
55
|
+
export interface JobExecutionDetail extends JobExecution {
|
|
56
|
+
steps: StepDetail[];
|
|
57
|
+
}
|
|
58
|
+
export interface WorkflowJobDetail extends Job {
|
|
59
|
+
jobExecutions: JobExecutionDetail[];
|
|
60
|
+
}
|
|
61
|
+
export interface WorkflowRunDetail extends WorkflowRun {
|
|
62
|
+
runAttempt: WorkflowRunAttempt;
|
|
63
|
+
latestAttempt: number;
|
|
64
|
+
jobs: WorkflowJobDetail[];
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=workflow-run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-run.d.ts","sourceRoot":"","sources":["../../../src/core/entities/workflow-run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAClC,OAAO,KAAK,EAAC,YAAY,EAAC,MA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AM,EAAE,iBAAiB,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,cAAc,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACvC,cAAc,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC9C,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,UAAW,SAAQ,IAAI;IACtC,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,iBAAkB,SAAQ,GAAG;IAC5C,aAAa,EAAE,kBAAkB,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,UAAU,EAAE,kBAAkB,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,iBAAiB,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/core/entities/workflow-run.ts"],"sourcesContent":["import type {Job} from './job.js';\nimport type {JobExecution} from './job-execution.js';\nimport type {Step, StepAttempt} from './step.js';\nimport type {WorkflowRunAttempt} from './workflow-run-attempt.js';\n\nexport type WorkflowRunStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';\n\nexport type TerminalWorkflowRunStatus = Extract<\n WorkflowRunStatus,\n 'succeeded' | 'failed' | 'cancelled'\n>;\n\nconst TERMINAL_WORKFLOW_RUN_STATUSES = new Set<WorkflowRunStatus>([\n 'succeeded',\n 'failed',\n 'cancelled',\n]);\n\nexport function isWorkflowRunTerminal(\n status: WorkflowRunStatus,\n): status is TerminalWorkflowRunStatus {\n return TERMINAL_WORKFLOW_RUN_STATUSES.has(status);\n}\n\nexport interface WorkflowSourceSnapshot {\n content: string;\n format: 'yaml';\n}\n\nexport type TriggerPayload =\n | {\n source: 'manual';\n provider?: 'manual' | undefined;\n event: 'fire';\n subscriptionId: string;\n userId: string;\n }\n | {\n source: 'cron';\n provider?: 'cron' | undefined;\n event: 'tick';\n scheduleId: string;\n }\n // Integration sources (github, gitlab, sentry, …) flow through opaquely: the\n // run records what fired it and carries the raw event payload, without the\n // triggers module having to know each source's shape.\n | {\n source: string;\n provider?: string | undefined;\n event: string;\n deliveryId: string;\n data: unknown;\n };\n\nexport interface WorkflowRun {\n id: string;\n workspaceId: string;\n projectId: string;\n definitionId: string;\n name: string;\n status: WorkflowRunStatus;\n currentAttempt: number;\n triggerProvider: string | null;\n triggerSource: string;\n triggerEvent: string;\n triggerPayload: TriggerPayload;\n inputs: Record<string, unknown> | null;\n sourceSnapshot: WorkflowSourceSnapshot | null;\n triggerIdempotencyKey: string | null;\n timeoutMs: number;\n version: number;\n createdAt: Date;\n updatedAt: Date;\n startedAt: Date | null;\n finishedAt: Date | null;\n}\n\nexport interface StepDetail extends Step {\n attempts: StepAttempt[];\n}\n\nexport interface JobExecutionDetail extends JobExecution {\n steps: StepDetail[];\n}\n\nexport interface WorkflowJobDetail extends Job {\n jobExecutions: JobExecutionDetail[];\n}\n\nexport interface WorkflowRunDetail extends WorkflowRun {\n runAttempt: WorkflowRunAttempt;\n latestAttempt: number;\n jobs: WorkflowJobDetail[];\n}\n"],"names":["TERMINAL_WORKFLOW_RUN_STATUSES","Set","isWorkflowRunTerminal","status","has"],"mappings":"AAYA,MAAMA,iCAAiC,IAAIC,IAAuB;IAChE;IACA;IACA;CACD;AAED,OAAO,SAASC,sBACdC,MAAyB;IAEzB,OAAOH,+BAA+BI,GAAG,CAACD;AAC5C"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { JobStatus } from './entities/job.js';
|
|
2
|
+
import type { WorkflowRunStatus } from './entities/workflow-run.js';
|
|
3
|
+
export declare class DefinitionNotFoundError extends Error {
|
|
4
|
+
constructor(definitionId: string);
|
|
5
|
+
}
|
|
6
|
+
export declare class ProjectMismatchError extends Error {
|
|
7
|
+
constructor(definitionProjectId: string, requestProjectId: string);
|
|
8
|
+
}
|
|
9
|
+
export declare class AgentConfigUnresolvableError extends Error {
|
|
10
|
+
readonly definitionId: string;
|
|
11
|
+
constructor(definitionId: string, options?: ErrorOptions | undefined);
|
|
12
|
+
}
|
|
13
|
+
export declare class AgentIntegrationMaterializationError extends Error {
|
|
14
|
+
constructor(message: string);
|
|
15
|
+
}
|
|
16
|
+
export type InterpolationUnresolvableField = 'run' | 'env' | 'agent.prompt' | 'agent.model' | 'agent.provider' | 'job.runner' | 'job.outputs' | 'job.name' | 'step.name' | 'step.feedback';
|
|
17
|
+
export declare class InterpolationUnresolvableError extends Error {
|
|
18
|
+
readonly definitionId: string;
|
|
19
|
+
readonly field: InterpolationUnresolvableField;
|
|
20
|
+
readonly source: string;
|
|
21
|
+
readonly envKey?: string;
|
|
22
|
+
constructor(definitionId: string, params: {
|
|
23
|
+
readonly field: InterpolationUnresolvableField;
|
|
24
|
+
readonly source: string;
|
|
25
|
+
readonly envKey?: string;
|
|
26
|
+
readonly cause?: unknown;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* True when a `runWorkflow` failure can never succeed on retry: the definition is gone or
|
|
31
|
+
* the subscription points at the wrong project. Callers (e.g. the trigger dispatcher) use this
|
|
32
|
+
* to skip a permanently-broken target instead of retrying it forever. Every other failure is
|
|
33
|
+
* treated as transient so at-least-once delivery can converge.
|
|
34
|
+
*/
|
|
35
|
+
export declare function isPermanentRunWorkflowError(error: unknown): boolean;
|
|
36
|
+
export declare class JobNotFoundError extends Error {
|
|
37
|
+
constructor(jobId: string);
|
|
38
|
+
}
|
|
39
|
+
export declare class JobLeaseNotActiveError extends Error {
|
|
40
|
+
readonly jobExecutionId: string;
|
|
41
|
+
constructor(jobExecutionId: string);
|
|
42
|
+
}
|
|
43
|
+
export declare class InvalidJobRunnerLabelsError extends Error {
|
|
44
|
+
readonly labels: readonly string[];
|
|
45
|
+
constructor(labels: readonly string[]);
|
|
46
|
+
}
|
|
47
|
+
export declare class JobNotActiveError extends Error {
|
|
48
|
+
readonly jobId: string;
|
|
49
|
+
readonly status: JobStatus;
|
|
50
|
+
constructor(jobId: string, status: JobStatus);
|
|
51
|
+
}
|
|
52
|
+
export declare class WorkflowRunNotFoundError extends Error {
|
|
53
|
+
constructor(workflowRunId: string);
|
|
54
|
+
}
|
|
55
|
+
export declare class WorkflowRunNotCancellableError extends Error {
|
|
56
|
+
readonly workflowRunId: string;
|
|
57
|
+
readonly status: WorkflowRunStatus;
|
|
58
|
+
constructor(workflowRunId: string, status: WorkflowRunStatus);
|
|
59
|
+
}
|
|
60
|
+
export declare class SourceRunNotFoundError extends Error {
|
|
61
|
+
constructor(workflowRunId: string);
|
|
62
|
+
}
|
|
63
|
+
export declare class RunNotTerminalError extends Error {
|
|
64
|
+
constructor(workflowRunId: string);
|
|
65
|
+
}
|
|
66
|
+
export declare class NoFailedJobsError extends Error {
|
|
67
|
+
constructor(workflowRunId: string);
|
|
68
|
+
}
|
|
69
|
+
export declare class CheckoutIntentUnresolvedError extends Error {
|
|
70
|
+
constructor(projectId: string);
|
|
71
|
+
}
|
|
72
|
+
export declare class StepNotFoundError extends Error {
|
|
73
|
+
constructor(stepId: string, jobId: string);
|
|
74
|
+
}
|
|
75
|
+
export declare class StepNotRunningError extends Error {
|
|
76
|
+
constructor(stepId: string, jobId: string);
|
|
77
|
+
}
|
|
78
|
+
export declare class StepAttemptAheadError extends Error {
|
|
79
|
+
readonly stepId: string;
|
|
80
|
+
readonly jobId: string;
|
|
81
|
+
readonly reportedAttempt: number;
|
|
82
|
+
readonly currentAttempt: number;
|
|
83
|
+
constructor(stepId: string, jobId: string, reportedAttempt: number, currentAttempt: number);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,4BAA4B,CAAC;AAElE,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,YAAY,EAAE,MAAM;CAIjC;AAED,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,mBAAmB,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM;CAMlE;AAED,qBAAa,4BAA6B,SAAQ,KAAK;IAEnD,QAAQ,CAAC,YAAY,EAAE,MAAM;gBAApB,YAAY,EAAE,MAAM,EAC7B,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS;CAKrC;AAED,qBAAa,oCAAqC,SAAQ,KAAK;gBACjD,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,MAAM,8BAA8B,GACtC,KAAK,GACL,KAAK,GACL,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,aAAa,GACb,UAAU,GACV,WAAW,GACX,eAAe,CAAC;AAEpB,qBAAa,8BAA+B,SAAQ,KAAK;IAMrD,QAAQ,CAAC,YAAY,EAAE,MAAM;IAL/B,QAAQ,CAAC,KAAK,EAAE,8BAA8B,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;gBAGd,YAAY,EAAE,MAAM,EAC7B,MAA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C,SAAS,EAAE,MAAM;CAI9B;AAED,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAI1C;AAED,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAI1C;AAKD,qBAAa,qBAAsB,SAAQ,KAAK;IAE5C,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,eAAe,EAAE,MAAM;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM;gBAHtB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,MAAM;CAOlC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
export class DefinitionNotFoundError extends Error {
|
|
2
|
+
constructor(definitionId){
|
|
3
|
+
super(`Definition not found: ${definitionId}`);
|
|
4
|
+
this.name = 'DefinitionNotFoundError';
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export class ProjectMismatchError extends Error {
|
|
8
|
+
constructor(definitionProjectId, requestProjectId){
|
|
9
|
+
super(`Definition belongs to project ${definitionProjectId}, but request targets project ${requestProjectId}`);
|
|
10
|
+
this.name = 'ProjectMismatchError';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class AgentConfigUnresolvableError extends Error {
|
|
14
|
+
constructor(definitionId, options){
|
|
15
|
+
super(`Agent configuration cannot be resolved for definition ${definitionId}`, options), this.definitionId = definitionId;
|
|
16
|
+
this.name = 'AgentConfigUnresolvableError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class AgentIntegrationMaterializationError extends Error {
|
|
20
|
+
constructor(message){
|
|
21
|
+
super(message);
|
|
22
|
+
this.name = 'AgentIntegrationMaterializationError';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export class InterpolationUnresolvableError extends Error {
|
|
26
|
+
constructor(definitionId, params){
|
|
27
|
+
super(interpolationUnresolvableMessage(definitionId, params), {
|
|
28
|
+
cause: params.cause
|
|
29
|
+
}), this.definitionId = definitionId;
|
|
30
|
+
this.name = 'InterpolationUnresolvableError';
|
|
31
|
+
this.field = params.field;
|
|
32
|
+
this.source = params.source;
|
|
33
|
+
if (params.envKey !== undefined) this.envKey = params.envKey;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function interpolationUnresolvableMessage(definitionId, params) {
|
|
37
|
+
const envSuffix = params.envKey === undefined ? '' : ` (${params.envKey})`;
|
|
38
|
+
return `Workflow interpolation cannot be resolved for definition ${definitionId}: ${params.field}${envSuffix} uses \`${params.source}\`. Use has(x) ? x : '' for optional references.`;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* True when a `runWorkflow` failure can never succeed on retry: the definition is gone or
|
|
42
|
+
* the subscription points at the wrong project. Callers (e.g. the trigger dispatcher) use this
|
|
43
|
+
* to skip a permanently-broken target instead of retrying it forever. Every other failure is
|
|
44
|
+
* treated as transient so at-least-once delivery can converge.
|
|
45
|
+
*/ export function isPermanentRunWorkflowError(error) {
|
|
46
|
+
return error instanceof DefinitionNotFoundError || error instanceof ProjectMismatchError || error instanceof AgentConfigUnresolvableError || error instanceof AgentIntegrationMaterializationError || error instanceof InterpolationUnresolvableError || error instanceof InvalidJobRunnerLabelsError;
|
|
47
|
+
}
|
|
48
|
+
export class JobNotFoundError extends Error {
|
|
49
|
+
constructor(jobId){
|
|
50
|
+
super(`Job not found or has no steps: ${jobId}`);
|
|
51
|
+
this.name = 'JobNotFoundError';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export class JobLeaseNotActiveError extends Error {
|
|
55
|
+
constructor(jobExecutionId){
|
|
56
|
+
super(`Job lease is no longer active: ${jobExecutionId}`), this.jobExecutionId = jobExecutionId;
|
|
57
|
+
this.name = 'JobLeaseNotActiveError';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export class InvalidJobRunnerLabelsError extends Error {
|
|
61
|
+
constructor(labels){
|
|
62
|
+
super(`Job runner labels are invalid: ${labels.join(', ')}`), this.labels = labels;
|
|
63
|
+
this.name = 'InvalidJobRunnerLabelsError';
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// The job named by a lease is terminal, so it must not exchange its lease for
|
|
67
|
+
// fresh checkout credentials. Server state is the final gate, not the token.
|
|
68
|
+
export class JobNotActiveError extends Error {
|
|
69
|
+
constructor(jobId, status){
|
|
70
|
+
super(`Job ${jobId} is ${status} and cannot mint checkout credentials`), this.jobId = jobId, this.status = status;
|
|
71
|
+
this.name = 'JobNotActiveError';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export class WorkflowRunNotFoundError extends Error {
|
|
75
|
+
constructor(workflowRunId){
|
|
76
|
+
super(`Workflow run not found: ${workflowRunId}`);
|
|
77
|
+
this.name = 'WorkflowRunNotFoundError';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export class WorkflowRunNotCancellableError extends Error {
|
|
81
|
+
constructor(workflowRunId, status){
|
|
82
|
+
super(`Workflow run ${workflowRunId} is ${status} and cannot be cancelled`), this.workflowRunId = workflowRunId, this.status = status;
|
|
83
|
+
this.name = 'WorkflowRunNotCancellableError';
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export class SourceRunNotFoundError extends Error {
|
|
87
|
+
constructor(workflowRunId){
|
|
88
|
+
super(`Source workflow run not found: ${workflowRunId}`);
|
|
89
|
+
this.name = 'SourceRunNotFoundError';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export class RunNotTerminalError extends Error {
|
|
93
|
+
constructor(workflowRunId){
|
|
94
|
+
super(`Workflow run is not terminal: ${workflowRunId}`);
|
|
95
|
+
this.name = 'RunNotTerminalError';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
export class NoFailedJobsError extends Error {
|
|
99
|
+
constructor(workflowRunId){
|
|
100
|
+
super(`Workflow run has no failed or cancelled jobs to re-run: ${workflowRunId}`);
|
|
101
|
+
this.name = 'NoFailedJobsError';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
// The run's project (and therefore its source repository) cannot be resolved, so
|
|
105
|
+
// there is nothing to check out.
|
|
106
|
+
export class CheckoutIntentUnresolvedError extends Error {
|
|
107
|
+
constructor(projectId){
|
|
108
|
+
super(`Checkout intent unresolved: project ${projectId} not found`);
|
|
109
|
+
this.name = 'CheckoutIntentUnresolvedError';
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export class StepNotFoundError extends Error {
|
|
113
|
+
constructor(stepId, jobId){
|
|
114
|
+
super(`Step ${stepId} not found in job ${jobId}`);
|
|
115
|
+
this.name = 'StepNotFoundError';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
export class StepNotRunningError extends Error {
|
|
119
|
+
constructor(stepId, jobId){
|
|
120
|
+
super(`Step ${stepId} in job ${jobId} is not running and cannot accept a result`);
|
|
121
|
+
this.name = 'StepNotRunningError';
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// A report whose attempt is ahead of the step's current attempt. The host
|
|
125
|
+
// allocates attempt numbers, so a runner can never report one it was not
|
|
126
|
+
// dispatched — this is a protocol error, not an idempotent no-op.
|
|
127
|
+
export class StepAttemptAheadError extends Error {
|
|
128
|
+
constructor(stepId, jobId, reportedAttempt, currentAttempt){
|
|
129
|
+
super(`Step ${stepId} in job ${jobId} reported attempt ${reportedAttempt} ahead of current attempt ${currentAttempt}`), this.stepId = stepId, this.jobId = jobId, this.reportedAttempt = reportedAttempt, this.currentAttempt = currentAttempt;
|
|
130
|
+
this.name = 'StepAttemptAheadError';
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/core/errors.ts"],"sourcesContent":["import type {JobStatus} from './entities/job.js';\nimport type {WorkflowRunStatus} from './entities/workflow-run.js';\n\nexport class DefinitionNotFoundError extends Error {\n constructor(definitionId: string) {\n super(`Definition not found: ${definitionId}`);\n this.name = 'DefinitionNotFoundError';\n }\n}\n\nexport class ProjectMismatchError extends Error {\n constructor(definitionProjectId: string, requestProjectId: string) {\n super(\n `Definition belongs to project ${definitionProjectId}, but request targets project ${requestProjectId}`,\n );\n this.name = 'ProjectMismatchError';\n }\n}\n\nexport class AgentConfigUnresolvableError extends Error {\n constructor(\n readonly definitionId: string,\n options?: ErrorOptions | undefined,\n ) {\n super(`Agent configuration cannot be resolved for definition ${definitionId}`, options);\n this.name = 'AgentConfigUnresolvableError';\n }\n}\n\nexport class AgentIntegrationMaterializationError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'AgentIntegrationMaterializationError';\n }\n}\n\nexport type InterpolationUnresolvableField =\n | 'run'\n | 'env'\n | 'agent.prompt'\n | 'agent.model'\n | 'agent.provider'\n | 'job.runner'\n | 'job.outputs'\n | 'job.name'\n | 'step.name'\n | 'step.feedback';\n\nexport class InterpolationUnresolvableError extends Error {\n readonly field: InterpolationUnresolvableField;\n readonly source: string;\n readonly envKey?: string;\n\n constructor(\n readonly definitionId: string,\n params: {\n readonly field: InterpolationUnresolvableField;\n readonly source: string;\n readonly envKey?: string;\n readonly cause?: unknown;\n },\n ) {\n super(interpolationUnresolvableMessage(definitionId, params), {cause: params.cause});\n this.name = 'InterpolationUnresolvableError';\n this.field = params.field;\n this.source = params.source;\n if (params.envKey !== undefined) this.envKey = params.envKey;\n }\n}\n\nfunction interpolationUnresolvableMessage(\n definitionId: string,\n params: {\n readonly field: InterpolationUnresolvableField;\n readonly source: string;\n readonly envKey?: string;\n },\n): string {\n const envSuffix = params.envKey === undefined ? '' : ` (${params.envKey})`;\n return `Workflow interpolation cannot be resolved for definition ${definitionId}: ${params.field}${envSuffix} uses \\`${params.source}\\`. Use has(x) ? x : '' for optional references.`;\n}\n\n/**\n * True when a `runWorkflow` failure can never succeed on retry: the definition is gone or\n * the subscription points at the wrong project. Callers (e.g. the trigger dispatcher) use this\n * to skip a permanently-broken target instead of retrying it forever. Every other failure is\n * treated as transient so at-least-once delivery can converge.\n */\nexport function isPermanentRunWorkflowError(error: unknown): boolean {\n return (\n error instanceof DefinitionNotFoundError ||\n error instanceof ProjectMismatchError ||\n error instanceof AgentConfigUnresolvableError ||\n error instanceof AgentIntegrationMaterializationError ||\n error instanceof InterpolationUnresolvableError ||\n error instanceof InvalidJobRunnerLabelsError\n );\n}\n\nexport class JobNotFoundError extends Error {\n constructor(jobId: string) {\n super(`Job not found or has no steps: ${jobId}`);\n this.name = 'JobNotFoundError';\n }\n}\n\nexport class JobLeaseNotActiveError extends Error {\n constructor(readonly jobExecutionId: string) {\n super(`Job lease is no longer active: ${jobExecutionId}`);\n this.name = 'JobLeaseNotActiveError';\n }\n}\n\nexport class InvalidJobRunnerLabelsError extends Error {\n constructor(readonly labels: readonly string[]) {\n super(`Job runner labels are invalid: ${labels.join(', ')}`);\n this.name = 'InvalidJobRunnerLabelsError';\n }\n}\n\n// The job named by a lease is terminal, so it must not exchange its lease for\n// fresh checkout credentials. Server state is the final gate, not the token.\nexport class JobNotActiveError extends Error {\n constructor(\n readonly jobId: string,\n readonly status: JobStatus,\n ) {\n super(`Job ${jobId} is ${status} and cannot mint checkout credentials`);\n this.name = 'JobNotActiveError';\n }\n}\n\nexport class WorkflowRunNotFoundError extends Error {\n constructor(workflowRunId: string) {\n super(`Workflow run not found: ${workflowRunId}`);\n this.name = 'WorkflowRunNotFoundError';\n }\n}\n\nexport class WorkflowRunNotCancellableError extends Error {\n constructor(\n readonly workflowRunId: string,\n readonly status: WorkflowRunStatus,\n ) {\n super(`Workflow run ${workflowRunId} is ${status} and cannot be cancelled`);\n this.name = 'WorkflowRunNotCancellableError';\n }\n}\n\nexport class SourceRunNotFoundError extends Error {\n constructor(workflowRunId: string) {\n super(`Source workflow run not found: ${workflowRunId}`);\n this.name = 'SourceRunNotFoundError';\n }\n}\n\nexport class RunNotTerminalError extends Error {\n constructor(workflowRunId: string) {\n super(`Workflow run is not terminal: ${workflowRunId}`);\n this.name = 'RunNotTerminalError';\n }\n}\n\nexport class NoFailedJobsError extends Error {\n constructor(workflowRunId: string) {\n super(`Workflow run has no failed or cancelled jobs to re-run: ${workflowRunId}`);\n this.name = 'NoFailedJobsError';\n }\n}\n\n// The run's project (and therefore its source repository) cannot be resolved, so\n// there is nothing to check out.\nexport class CheckoutIntentUnresolvedError extends Error {\n constructor(projectId: string) {\n super(`Checkout intent unresolved: project ${projectId} not found`);\n this.name = 'CheckoutIntentUnresolvedError';\n }\n}\n\nexport class StepNotFoundError extends Error {\n constructor(stepId: string, jobId: string) {\n super(`Step ${stepId} not found in job ${jobId}`);\n this.name = 'StepNotFoundError';\n }\n}\n\nexport class StepNotRunningError extends Error {\n constructor(stepId: string, jobId: string) {\n super(`Step ${stepId} in job ${jobId} is not running and cannot accept a result`);\n this.name = 'StepNotRunningError';\n }\n}\n\n// A report whose attempt is ahead of the step's current attempt. The host\n// allocates attempt numbers, so a runner can never report one it was not\n// dispatched — this is a protocol error, not an idempotent no-op.\nexport class StepAttemptAheadError extends Error {\n constructor(\n readonly stepId: string,\n readonly jobId: string,\n readonly reportedAttempt: number,\n readonly currentAttempt: number,\n ) {\n super(\n `Step ${stepId} in job ${jobId} reported attempt ${reportedAttempt} ahead of current attempt ${currentAttempt}`,\n );\n this.name = 'StepAttemptAheadError';\n }\n}\n"],"names":["DefinitionNotFoundError","Error","definitionId","name","ProjectMismatchError","definitionProjectId","requestProjectId","AgentConfigUnresolvableError","options","AgentIntegrationMaterializationError","message","InterpolationUnresolvableError","params","interpolationUnresolvableMessage","cause","field","source","envKey","undefined","envSuffix","isPermanentRunWorkflowError","error","InvalidJobRunnerLabelsError","JobNotFoundError","jobId","JobLeaseNotActiveError","jobExecutionId","labels","join","JobNotActiveError","status","WorkflowRunNotFoundError","workflowRunId","WorkflowRunNotCancellableError","SourceRunNotFoundError","RunNotTerminalError","NoFailedJobsError","CheckoutIntentUnresolvedError","projectId","StepNotFoundError","stepId","StepNotRunningError","StepAttemptAheadError","reportedAttempt","currentAttempt"],"mappings":"AAGA,OAAO,MAAMA,gCAAgCC;IAC3C,YAAYC,YAAoB,CAAE;QAChC,KAAK,CAAC,CAAC,sBAAsB,EAAEA,cAAc;QAC7C,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMC,6BAA6BH;IACxC,YAAYI,mBAA2B,EAAEC,gBAAwB,CAAE;QACjE,KAAK,CACH,CAAC,8BAA8B,EAAED,oBAAoB,8BAA8B,EAAEC,kBAAkB;QAEzG,IAAI,CAACH,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMI,qCAAqCN;IAChD,YACE,AAASC,YAAoB,EAC7BM,OAAkC,CAClC;QACA,KAAK,CAAC,CAAC,sDAAsD,EAAEN,cAAc,EAAEM,eAHtEN,eAAAA;QAIT,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMM,6CAA6CR;IACxD,YAAYS,OAAe,CAAE;QAC3B,KAAK,CAACA;QACN,IAAI,CAACP,IAAI,GAAG;IACd;AACF;AAcA,OAAO,MAAMQ,uCAAuCV;IAKlD,YACE,AAASC,YAAoB,EAC7BU,MAKC,CACD;QACA,KAAK,CAACC,iCAAiCX,cAAcU,SAAS;YAACE,OAAOF,OAAOE,KAAK;QAAA,SARzEZ,eAAAA;QAST,IAAI,CAACC,IAAI,GAAG;QACZ,IAAI,CAACY,KAAK,GAAGH,OAAOG,KAAK;QACzB,IAAI,CAACC,MAAM,GAAGJ,OAAOI,MAAM;QAC3B,IAAIJ,OAAOK,MAAM,KAAKC,WAAW,IAAI,CAACD,MAAM,GAAGL,OAAOK,MAAM;IAC9D;AACF;AAEA,SAASJ,iCACPX,YAAoB,EACpBU,MAIC;IAED,MAAMO,YAAYP,OAAOK,MAAM,KAAKC,YAAY,KAAK,CAAC,EAAE,EA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CAACrB,IAAI,GAAG;IACd;AACF;AAEA,0EAA0E;AAC1E,yEAAyE;AACzE,kEAAkE;AAClE,OAAO,MAAMuC,8BAA8BzC;IACzC,YACE,AAASuC,MAAc,EACvB,AAAShB,KAAa,EACtB,AAASmB,eAAuB,EAChC,AAASC,cAAsB,CAC/B;QACA,KAAK,CACH,CAAC,KAAK,EAAEJ,OAAO,QAAQ,EAAEhB,MAAM,kBAAkB,EAAEmB,gBAAgB,0BAA0B,EAAEC,gBAAgB,QANxGJ,SAAAA,aACAhB,QAAAA,YACAmB,kBAAAA,sBACAC,iBAAAA;QAKT,IAAI,CAACzC,IAAI,GAAG;IACd;AACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type { Job, JobStatus } from './entities/job.js';
|
|
2
|
+
export type { JobListenerEvent, JobListenerEventDisposition, } from './entities/job-listener-event.js';
|
|
3
|
+
export type { Step, StepStatus } from './entities/step.js';
|
|
4
|
+
export type { TriggerPayload, WorkflowRun, WorkflowRunStatus, WorkflowSourceSnapshot, } from './entities/workflow-run.js';
|
|
5
|
+
export { AgentConfigUnresolvableError, AgentIntegrationMaterializationError, DefinitionNotFoundError, InterpolationUnresolvableError, isPermanentRunWorkflowError, JobNotFoundError, NoFailedJobsError, ProjectMismatchError, RunNotTerminalError, SourceRunNotFoundError, StepNotFoundError, StepNotRunningError, WorkflowRunNotCancellableError, } from './errors.js';
|
|
6
|
+
export type { NextStep, RecordStepResultOutcome, RecordStepResultParams } from './job-execution.js';
|
|
7
|
+
export { nextStepForJob, recordStepResult } from './job-execution.js';
|
|
8
|
+
export { type DecideJobActivationInput, type DeriveJobSuccessResult, decideJobActivation, deriveJobExecutionOutputs, deriveJobSuccess, type JobActivationDecision, } from './job-transition/index.js';
|
|
9
|
+
export type { RunWorkflowParams } from './run-workflow.js';
|
|
10
|
+
export { runWorkflow } from './run-workflow.js';
|
|
11
|
+
export { type MaterializedWorkflowJob, type MaterializedWorkflowStep, materializeWorkflowModel, modelHasAgentStep, } from './step-config/index.js';
|
|
12
|
+
export { deriveInitialJobExecutionPlan, deriveJobExecutionRunner, materializeWorkflowRunJobs, } from './workflow-run-creation.js';
|
|
13
|
+
export { type ScheduleRuntimeDagInput, scheduleRuntimeDag, } from './workflow-scheduling/index.js';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,GAAG,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC;AACtD,YAAY,EACV,gBAAgB,EAChB,2BAA2B,GAC5B,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,oBAAoB,CAAC;AACzD,YAAY,EACV,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,4BAA4B,EAC5B,oCAAoC,EACpC,uBAAuB,EACvB,8BAA8B,EAC9B,2BAA2B,EAC3B,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,8BAA8B,GAC/B,MAAM,aAAa,CAAC;AACrB,YAAY,EAAC,QAAQ,EAAE,uBAAuB,EAAE,sBAAsB,EAAC,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpE,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACL,KAAK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