@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,160 @@
|
|
|
1
|
+
import {instanceMetrics} from '@shipfox/node-opentelemetry';
|
|
2
|
+
import type {JobStatus, ResolutionReason} from '#core/entities/job.js';
|
|
3
|
+
import type {JobExecutionStatus} from '#core/entities/job-execution.js';
|
|
4
|
+
import type {WorkflowRunStatus} from '#core/entities/workflow-run.js';
|
|
5
|
+
import type {RuntimeCompletionStatus} from '#core/workflow-scheduling/runtime-dag.js';
|
|
6
|
+
|
|
7
|
+
const meter = instanceMetrics.getMeter('workflows');
|
|
8
|
+
|
|
9
|
+
const runCreatedCount = meter.createCounter<{provider: string}>('workflows_run_created', {
|
|
10
|
+
description: 'Workflow runs created by bounded trigger provider',
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const runStatusChangedCount = meter.createCounter<{status: WorkflowRunStatus}>(
|
|
14
|
+
'workflows_run_status_changed',
|
|
15
|
+
{description: 'Workflow run status transitions by resulting status'},
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const jobStatusChangedCount = meter.createCounter<{status: JobStatus}>(
|
|
19
|
+
'workflows_job_status_changed',
|
|
20
|
+
{description: 'Workflow job status transitions by resulting status'},
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
const jobExecutionStatusChangedCount = meter.createCounter<{status: JobExecutionStatus}>(
|
|
24
|
+
'workflows_job_execution_status_changed',
|
|
25
|
+
{description: 'Workflow job execution status transitions by resulting status'},
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const jobExecutionQueuedCount = meter.createCounter<Record<string, never>>(
|
|
29
|
+
'workflows_job_execution_queued',
|
|
30
|
+
{
|
|
31
|
+
description: 'Workflow job executions first marked as queued from runner queue events',
|
|
32
|
+
},
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const jobExecutionStartedCount = meter.createCounter<Record<string, never>>(
|
|
36
|
+
'workflows_job_execution_started',
|
|
37
|
+
{
|
|
38
|
+
description: 'Workflow job executions first marked as started from runner claim events',
|
|
39
|
+
},
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const jobExecutionStepsSettledCount = meter.createCounter<{
|
|
43
|
+
status: Extract<RuntimeCompletionStatus, 'failed' | 'succeeded'>;
|
|
44
|
+
}>('workflows_job_execution_steps_settled', {
|
|
45
|
+
description: 'Job execution steps-settled events enqueued by resulting completion status',
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const jobExecutionTimedOutCount = meter.createCounter<Record<string, never>>(
|
|
49
|
+
'workflows_job_execution_timed_out',
|
|
50
|
+
{
|
|
51
|
+
description: 'Workflow job executions failed by the execution orchestration timeout path',
|
|
52
|
+
},
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const jobExecutionLeaseExpiryResolvedCount = meter.createCounter<{status: RuntimeCompletionStatus}>(
|
|
56
|
+
'workflows_job_execution_lease_expiry_resolved',
|
|
57
|
+
{description: 'Runner lease-expiry resolutions by resulting runtime status'},
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const stepRestartEnqueuedCount = meter.createCounter<Record<string, never>>(
|
|
61
|
+
'workflows_step_restart_enqueued',
|
|
62
|
+
{description: 'Durable step restart events enqueued after a restartable gate failure'},
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
const listenerEventsReceivedCount = meter.createCounter<{provider: string}>(
|
|
66
|
+
'workflows_listener_events_received',
|
|
67
|
+
{description: 'Listener integration events buffered by bounded trigger provider'},
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
const listenerExecutionsCount = meter.createCounter<{
|
|
71
|
+
outcome: 'succeeded' | 'failed' | 'cancelled';
|
|
72
|
+
}>('workflows_listener_executions', {
|
|
73
|
+
description: 'Listener job execution firings by terminal outcome',
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
const listenerResolvedCount = meter.createCounter<{reason: ResolutionReason}>(
|
|
77
|
+
'workflows_listener_resolved',
|
|
78
|
+
{description: 'Listener resolutions by bounded reason'},
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
const agentToolWarningFailedCount = meter.createCounter<{
|
|
82
|
+
reason: 'budget' | 'lookup' | 'write';
|
|
83
|
+
}>('workflows_agent_tool_warning_failed', {
|
|
84
|
+
description: 'Agent tool capability warning failures by bounded reason',
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const listenerEventsCoalesced = meter.createHistogram<Record<string, never>>(
|
|
88
|
+
'workflows_listener_events_coalesced',
|
|
89
|
+
{
|
|
90
|
+
description: 'Listener firing batch sizes',
|
|
91
|
+
unit: '1',
|
|
92
|
+
advice: {explicitBucketBoundaries: [1, 2, 5, 10, 25, 50, 100, 250]},
|
|
93
|
+
},
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
export function recordWorkflowRunCreated(provider: string): void {
|
|
97
|
+
runCreatedCount.add(1, {provider});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function recordWorkflowRunStatusChanged(status: WorkflowRunStatus): void {
|
|
101
|
+
runStatusChangedCount.add(1, {status});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function recordWorkflowJobStatusChanged(status: JobStatus): void {
|
|
105
|
+
jobStatusChangedCount.add(1, {status});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function recordWorkflowJobExecutionStatusChanged(status: JobExecutionStatus): void {
|
|
109
|
+
jobExecutionStatusChangedCount.add(1, {status});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function recordWorkflowJobExecutionQueued(): void {
|
|
113
|
+
jobExecutionQueuedCount.add(1);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function recordWorkflowJobExecutionStarted(): void {
|
|
117
|
+
jobExecutionStartedCount.add(1);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function recordWorkflowJobExecutionStepsSettled(
|
|
121
|
+
status: Extract<RuntimeCompletionStatus, 'failed' | 'succeeded'>,
|
|
122
|
+
): void {
|
|
123
|
+
jobExecutionStepsSettledCount.add(1, {status});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function recordWorkflowJobExecutionTimedOut(): void {
|
|
127
|
+
jobExecutionTimedOutCount.add(1);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function recordWorkflowJobExecutionLeaseExpiryResolved(
|
|
131
|
+
status: RuntimeCompletionStatus,
|
|
132
|
+
): void {
|
|
133
|
+
jobExecutionLeaseExpiryResolvedCount.add(1, {status});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function recordWorkflowStepRestartEnqueued(): void {
|
|
137
|
+
stepRestartEnqueuedCount.add(1);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function recordListenerEventReceived(provider: string): void {
|
|
141
|
+
listenerEventsReceivedCount.add(1, {provider});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function recordWorkflowListenerExecution(
|
|
145
|
+
outcome: 'succeeded' | 'failed' | 'cancelled',
|
|
146
|
+
): void {
|
|
147
|
+
listenerExecutionsCount.add(1, {outcome});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function recordWorkflowListenerResolved(reason: ResolutionReason): void {
|
|
151
|
+
listenerResolvedCount.add(1, {reason});
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function recordListenerEventsCoalesced(batchSize: number): void {
|
|
155
|
+
listenerEventsCoalesced.record(batchSize);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function recordWorkflowAgentToolWarningFailed(reason: 'budget' | 'lookup' | 'write'): void {
|
|
159
|
+
agentToolWarningFailedCount.add(1, {reason});
|
|
160
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {getServiceMetricsProvider} from '@shipfox/node-opentelemetry';
|
|
2
|
+
import {countActiveListeners} from '#db/job-listeners.js';
|
|
3
|
+
import {getWorkflowJobExecutionDepth} from '#db/workflow-runs.js';
|
|
4
|
+
|
|
5
|
+
export function registerWorkflowsServiceMetrics(): void {
|
|
6
|
+
const meter = getServiceMetricsProvider().getMeter('workflows');
|
|
7
|
+
|
|
8
|
+
const runningRuns = meter.createObservableGauge('workflows_running_runs', {
|
|
9
|
+
description: 'Workflow runs currently marked running',
|
|
10
|
+
});
|
|
11
|
+
const runningJobExecutions = meter.createObservableGauge('workflows_running_job_executions', {
|
|
12
|
+
description: 'Workflow job executions currently marked running',
|
|
13
|
+
});
|
|
14
|
+
const activeListeners = meter.createObservableGauge('workflows_active_listeners', {
|
|
15
|
+
description: 'Workflow jobs currently marked as listening',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
meter.addBatchObservableCallback(
|
|
19
|
+
async (observer) => {
|
|
20
|
+
const [depth, listenerCount] = await Promise.all([
|
|
21
|
+
getWorkflowJobExecutionDepth(),
|
|
22
|
+
countActiveListeners(),
|
|
23
|
+
]);
|
|
24
|
+
observer.observe(runningRuns, depth.runningRuns);
|
|
25
|
+
observer.observe(runningJobExecutions, depth.runningJobExecutions);
|
|
26
|
+
observer.observe(activeListeners, listenerCount);
|
|
27
|
+
},
|
|
28
|
+
[runningRuns, runningJobExecutions, activeListeners],
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type {CheckoutSpec} from '@shipfox/api-integration-core';
|
|
2
|
+
import {toCheckoutTokenDto} from './checkout-token.js';
|
|
3
|
+
|
|
4
|
+
describe('toCheckoutTokenDto', () => {
|
|
5
|
+
it('maps credentials to basic auth with an ISO expiry', () => {
|
|
6
|
+
const spec: CheckoutSpec = {
|
|
7
|
+
repositoryUrl: 'https://github.com/acme/repo.git',
|
|
8
|
+
ref: 'main',
|
|
9
|
+
gitAuthor: {
|
|
10
|
+
name: 'shipfox-test[bot]',
|
|
11
|
+
email: '1+shipfox-test[bot]@users.noreply.github.com',
|
|
12
|
+
},
|
|
13
|
+
credentials: {
|
|
14
|
+
username: 'x-access-token',
|
|
15
|
+
token: 'ghs-token',
|
|
16
|
+
expiresAt: new Date('2026-06-10T12:00:00.000Z'),
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const dto = toCheckoutTokenDto(spec, {persist: true});
|
|
21
|
+
|
|
22
|
+
expect(dto).toEqual({
|
|
23
|
+
repository_url: 'https://github.com/acme/repo.git',
|
|
24
|
+
ref: 'main',
|
|
25
|
+
git_author: {
|
|
26
|
+
name: 'shipfox-test[bot]',
|
|
27
|
+
email: '1+shipfox-test[bot]@users.noreply.github.com',
|
|
28
|
+
},
|
|
29
|
+
auth: {
|
|
30
|
+
kind: 'basic',
|
|
31
|
+
username: 'x-access-token',
|
|
32
|
+
token: 'ghs-token',
|
|
33
|
+
expires_at: '2026-06-10T12:00:00.000Z',
|
|
34
|
+
carry: 'header',
|
|
35
|
+
host: 'github.com',
|
|
36
|
+
persist: true,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('maps persist false into credential auth', () => {
|
|
42
|
+
const spec: CheckoutSpec = {
|
|
43
|
+
repositoryUrl: 'https://github.com/acme/repo.git',
|
|
44
|
+
ref: 'main',
|
|
45
|
+
credentials: {
|
|
46
|
+
username: 'x-access-token',
|
|
47
|
+
token: 'ghs-token',
|
|
48
|
+
expiresAt: new Date('2026-06-10T12:00:00.000Z'),
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const dto = toCheckoutTokenDto(spec, {persist: false});
|
|
53
|
+
|
|
54
|
+
expect(dto.auth).toMatchObject({carry: 'header', host: 'github.com', persist: false});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('omits auth when the spec has no credentials', () => {
|
|
58
|
+
const spec: CheckoutSpec = {repositoryUrl: 'https://example.com/acme/repo.git', ref: 'trunk'};
|
|
59
|
+
|
|
60
|
+
const dto = toCheckoutTokenDto(spec, {persist: true});
|
|
61
|
+
|
|
62
|
+
expect(dto).toEqual({repository_url: 'https://example.com/acme/repo.git', ref: 'trunk'});
|
|
63
|
+
expect(dto.auth).toBeUndefined();
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it('rejects a repository URL that embeds credentials', () => {
|
|
67
|
+
const spec: CheckoutSpec = {
|
|
68
|
+
repositoryUrl: 'https://x-access-token:ghs-token@github.com/acme/repo.git',
|
|
69
|
+
ref: 'main',
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
expect(() => toCheckoutTokenDto(spec, {persist: true})).toThrow();
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it('rejects an scp-like URL that embeds credentials', () => {
|
|
76
|
+
const spec: CheckoutSpec = {
|
|
77
|
+
repositoryUrl: 'user:secret@github.com:acme/repo.git',
|
|
78
|
+
ref: 'main',
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
expect(() => toCheckoutTokenDto(spec, {persist: true})).toThrow();
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it('accepts a credential-free scp-like URL', () => {
|
|
85
|
+
const spec: CheckoutSpec = {repositoryUrl: 'git@github.com:acme/repo.git', ref: 'main'};
|
|
86
|
+
|
|
87
|
+
const dto = toCheckoutTokenDto(spec, {persist: true});
|
|
88
|
+
|
|
89
|
+
expect(dto).toEqual({repository_url: 'git@github.com:acme/repo.git', ref: 'main'});
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('maps the host from an scp-like credentialed URL', () => {
|
|
93
|
+
const spec: CheckoutSpec = {
|
|
94
|
+
repositoryUrl: 'git@github.com:acme/repo.git',
|
|
95
|
+
ref: 'main',
|
|
96
|
+
credentials: {
|
|
97
|
+
username: 'x-access-token',
|
|
98
|
+
token: 'ghs-token',
|
|
99
|
+
expiresAt: new Date('2026-06-10T12:00:00.000Z'),
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const dto = toCheckoutTokenDto(spec, {persist: true});
|
|
104
|
+
|
|
105
|
+
expect(dto.auth).toMatchObject({host: 'github.com'});
|
|
106
|
+
});
|
|
107
|
+
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type {CheckoutSpec} from '@shipfox/api-integration-core';
|
|
2
|
+
import type {CheckoutTokenResponseDto} from '@shipfox/api-workflows-dto';
|
|
3
|
+
|
|
4
|
+
const SCP_LIKE_HOST_RE = /^(?:[^@:/]+@)?([^:/]+):/;
|
|
5
|
+
|
|
6
|
+
// Defense in depth: createCheckoutSpec's contract is that `repositoryUrl` never
|
|
7
|
+
// embeds credentials (they live in `credentials` so redaction can mask them). A
|
|
8
|
+
// provider bug that put a token in the URL would bypass redaction and leak it
|
|
9
|
+
// into `git remote -v` and logs, so reject it before it reaches the runner.
|
|
10
|
+
function assertNoEmbeddedCredentials(repositoryUrl: string): void {
|
|
11
|
+
// Run the scp-style check unconditionally: a genuine scp form
|
|
12
|
+
// (git@host:org/repo.git) fails URL parsing, but a `user:secret@host:path`
|
|
13
|
+
// string parses with a bogus `user:` scheme and *empty* URL userinfo, so the
|
|
14
|
+
// url.username check below would miss its embedded password.
|
|
15
|
+
assertNoScpCredentials(repositoryUrl);
|
|
16
|
+
|
|
17
|
+
let url: URL;
|
|
18
|
+
try {
|
|
19
|
+
url = new URL(repositoryUrl);
|
|
20
|
+
} catch {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (url.username || url.password) {
|
|
24
|
+
throw new Error('Checkout repository URL must not embed credentials');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// scp-like userinfo is everything before the first `@`, and that `@` precedes
|
|
29
|
+
// the first `/`. A bare `git@host:path` user is fine; a `user:secret@host:path`
|
|
30
|
+
// password embeds a credential, so reject any colon in the userinfo segment.
|
|
31
|
+
function assertNoScpCredentials(repositoryUrl: string): void {
|
|
32
|
+
const atIndex = repositoryUrl.indexOf('@');
|
|
33
|
+
const slashIndex = repositoryUrl.indexOf('/');
|
|
34
|
+
if (atIndex === -1 || (slashIndex !== -1 && atIndex > slashIndex)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (repositoryUrl.slice(0, atIndex).includes(':')) {
|
|
38
|
+
throw new Error('Checkout repository URL must not embed credentials');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function toCheckoutTokenDto(
|
|
43
|
+
spec: CheckoutSpec,
|
|
44
|
+
options: {persist: boolean},
|
|
45
|
+
): CheckoutTokenResponseDto {
|
|
46
|
+
assertNoEmbeddedCredentials(spec.repositoryUrl);
|
|
47
|
+
|
|
48
|
+
// Every provider that returns credentials uses a username (GitHub:
|
|
49
|
+
// 'x-access-token'), so the response is always basic auth; a credential-free
|
|
50
|
+
// spec (debug) omits auth entirely.
|
|
51
|
+
return {
|
|
52
|
+
repository_url: spec.repositoryUrl,
|
|
53
|
+
ref: spec.ref,
|
|
54
|
+
...(spec.gitAuthor
|
|
55
|
+
? {git_author: {name: spec.gitAuthor.name, email: spec.gitAuthor.email}}
|
|
56
|
+
: {}),
|
|
57
|
+
...(spec.credentials
|
|
58
|
+
? {
|
|
59
|
+
auth: {
|
|
60
|
+
kind: 'basic' as const,
|
|
61
|
+
username: spec.credentials.username,
|
|
62
|
+
token: spec.credentials.token,
|
|
63
|
+
expires_at: spec.credentials.expiresAt.toISOString(),
|
|
64
|
+
carry: 'header' as const,
|
|
65
|
+
host: checkoutHost(spec.repositoryUrl),
|
|
66
|
+
persist: options.persist,
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
: {}),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function checkoutHost(repositoryUrl: string): string {
|
|
74
|
+
try {
|
|
75
|
+
const host = new URL(repositoryUrl).host;
|
|
76
|
+
if (host) return host;
|
|
77
|
+
} catch {
|
|
78
|
+
// Fall through to scp-like parsing.
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const scpLike = SCP_LIKE_HOST_RE.exec(repositoryUrl);
|
|
82
|
+
if (scpLike?.[1]) return scpLike[1];
|
|
83
|
+
|
|
84
|
+
throw new Error('Checkout repository URL must include a host');
|
|
85
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type {Job} from '#core/entities/job.js';
|
|
2
|
+
import type {JobExecution} from '#core/entities/job-execution.js';
|
|
3
|
+
import {toJobDto, toJobExecutionDto} from './job.js';
|
|
4
|
+
|
|
5
|
+
describe('toJobDto', () => {
|
|
6
|
+
it('maps job status reason to snake_case', () => {
|
|
7
|
+
const job = jobEntity({
|
|
8
|
+
status: 'skipped',
|
|
9
|
+
statusReason: 'dependency_not_completed',
|
|
10
|
+
outputs: {image_sha: 'abc123'},
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const dto = toJobDto(job);
|
|
14
|
+
|
|
15
|
+
expect(dto.status).toBe('skipped');
|
|
16
|
+
expect(dto.status_reason).toBe('dependency_not_completed');
|
|
17
|
+
expect(dto.outputs).toEqual({image_sha: 'abc123'});
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
describe('toJobExecutionDto', () => {
|
|
22
|
+
it('maps listener trigger events', () => {
|
|
23
|
+
const jobExecution = jobExecutionEntity({
|
|
24
|
+
outputs: {verdict: 'approved'},
|
|
25
|
+
triggerEvents: [
|
|
26
|
+
{
|
|
27
|
+
source: 'github',
|
|
28
|
+
event: 'deployment_status',
|
|
29
|
+
delivery_id: 'delivery-1',
|
|
30
|
+
received_at: '2026-06-25T00:00:00.000Z',
|
|
31
|
+
data: {state: 'success'},
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const dto = toJobExecutionDto(jobExecution);
|
|
37
|
+
|
|
38
|
+
expect(dto.outputs).toEqual({verdict: 'approved'});
|
|
39
|
+
expect(dto.trigger_events).toEqual([
|
|
40
|
+
{
|
|
41
|
+
source: 'github',
|
|
42
|
+
event: 'deployment_status',
|
|
43
|
+
delivery_id: 'delivery-1',
|
|
44
|
+
received_at: '2026-06-25T00:00:00.000Z',
|
|
45
|
+
data: {state: 'success'},
|
|
46
|
+
},
|
|
47
|
+
]);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
function jobEntity(overrides: Partial<Job> = {}): Job {
|
|
52
|
+
return {
|
|
53
|
+
id: '11111111-1111-4111-8111-111111111111',
|
|
54
|
+
workflowRunAttemptId: '22222222-2222-4222-8222-222222222222',
|
|
55
|
+
key: 'deploy',
|
|
56
|
+
name: null,
|
|
57
|
+
mode: 'one_shot',
|
|
58
|
+
status: 'pending',
|
|
59
|
+
statusReason: null,
|
|
60
|
+
outputs: null,
|
|
61
|
+
carriedOver: false,
|
|
62
|
+
checkout: {
|
|
63
|
+
permissions: {contents: 'read'},
|
|
64
|
+
persistCredentials: true,
|
|
65
|
+
},
|
|
66
|
+
success: null,
|
|
67
|
+
executionTimeoutMs: null,
|
|
68
|
+
listeningTimeoutMs: null,
|
|
69
|
+
maxExecutions: null,
|
|
70
|
+
onResolve: null,
|
|
71
|
+
batchDebounceMs: null,
|
|
72
|
+
batchMaxSize: null,
|
|
73
|
+
batchMaxWaitMs: null,
|
|
74
|
+
listenerStatus: 'inactive',
|
|
75
|
+
resolutionReason: null,
|
|
76
|
+
listeningOn: null,
|
|
77
|
+
listeningUntil: null,
|
|
78
|
+
dependencies: [],
|
|
79
|
+
runner: null,
|
|
80
|
+
position: 0,
|
|
81
|
+
version: 1,
|
|
82
|
+
createdAt: new Date('2026-06-25T00:00:00.000Z'),
|
|
83
|
+
updatedAt: new Date('2026-06-25T00:00:01.000Z'),
|
|
84
|
+
...overrides,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function jobExecutionEntity(overrides: Partial<JobExecution> = {}): JobExecution {
|
|
89
|
+
return {
|
|
90
|
+
id: '33333333-3333-4333-8333-333333333333',
|
|
91
|
+
jobId: '11111111-1111-4111-8111-111111111111',
|
|
92
|
+
sequence: 1,
|
|
93
|
+
name: 'deploy',
|
|
94
|
+
runner: null,
|
|
95
|
+
status: 'pending',
|
|
96
|
+
statusReason: null,
|
|
97
|
+
outputs: null,
|
|
98
|
+
triggerEvents: [],
|
|
99
|
+
version: 1,
|
|
100
|
+
createdAt: new Date('2026-06-25T00:00:00.000Z'),
|
|
101
|
+
updatedAt: new Date('2026-06-25T00:00:01.000Z'),
|
|
102
|
+
queuedAt: null,
|
|
103
|
+
startedAt: null,
|
|
104
|
+
finishedAt: null,
|
|
105
|
+
timedOutAt: null,
|
|
106
|
+
...overrides,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type {JobDto, JobExecutionDto} from '@shipfox/api-workflows-dto';
|
|
2
|
+
import type {Job} from '#core/entities/job.js';
|
|
3
|
+
import type {JobExecution} from '#core/entities/job-execution.js';
|
|
4
|
+
|
|
5
|
+
export function toJobDto(job: Job): JobDto {
|
|
6
|
+
return {
|
|
7
|
+
id: job.id,
|
|
8
|
+
run_attempt_id: job.workflowRunAttemptId,
|
|
9
|
+
key: job.key,
|
|
10
|
+
name: job.name,
|
|
11
|
+
mode: job.mode,
|
|
12
|
+
status: job.status,
|
|
13
|
+
status_reason: job.statusReason,
|
|
14
|
+
carried_over: job.carriedOver,
|
|
15
|
+
listening:
|
|
16
|
+
job.listeningOn === null
|
|
17
|
+
? null
|
|
18
|
+
: {
|
|
19
|
+
on: job.listeningOn,
|
|
20
|
+
until: job.listeningUntil,
|
|
21
|
+
timeout_ms: job.listeningTimeoutMs,
|
|
22
|
+
max_executions: job.maxExecutions,
|
|
23
|
+
batch:
|
|
24
|
+
job.batchDebounceMs === null &&
|
|
25
|
+
job.batchMaxSize === null &&
|
|
26
|
+
job.batchMaxWaitMs === null
|
|
27
|
+
? null
|
|
28
|
+
: {
|
|
29
|
+
...(job.batchDebounceMs === null ? {} : {debounce_ms: job.batchDebounceMs}),
|
|
30
|
+
...(job.batchMaxSize === null ? {} : {max_size: job.batchMaxSize}),
|
|
31
|
+
...(job.batchMaxWaitMs === null ? {} : {max_wait_ms: job.batchMaxWaitMs}),
|
|
32
|
+
},
|
|
33
|
+
on_resolve: job.onResolve ?? 'finish',
|
|
34
|
+
execution_timeout_ms: job.executionTimeoutMs ?? null,
|
|
35
|
+
name: job.name,
|
|
36
|
+
},
|
|
37
|
+
listener_status: job.listenerStatus,
|
|
38
|
+
resolution_reason: job.resolutionReason,
|
|
39
|
+
outputs: job.outputs,
|
|
40
|
+
dependencies: job.dependencies,
|
|
41
|
+
position: job.position,
|
|
42
|
+
created_at: job.createdAt.toISOString(),
|
|
43
|
+
updated_at: job.updatedAt.toISOString(),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function toJobExecutionDto(jobExecution: JobExecution): JobExecutionDto {
|
|
48
|
+
return {
|
|
49
|
+
id: jobExecution.id,
|
|
50
|
+
job_id: jobExecution.jobId,
|
|
51
|
+
sequence: jobExecution.sequence,
|
|
52
|
+
name: jobExecution.name,
|
|
53
|
+
status: jobExecution.status,
|
|
54
|
+
status_reason: jobExecution.statusReason,
|
|
55
|
+
trigger_events: jobExecution.triggerEvents,
|
|
56
|
+
outputs: jobExecution.outputs,
|
|
57
|
+
queued_at: jobExecution.queuedAt?.toISOString() ?? null,
|
|
58
|
+
started_at: jobExecution.startedAt?.toISOString() ?? null,
|
|
59
|
+
finished_at: jobExecution.finishedAt?.toISOString() ?? null,
|
|
60
|
+
timed_out_at: jobExecution.timedOutAt?.toISOString() ?? null,
|
|
61
|
+
created_at: jobExecution.createdAt.toISOString(),
|
|
62
|
+
updated_at: jobExecution.updatedAt.toISOString(),
|
|
63
|
+
};
|
|
64
|
+
}
|