@zxyycom/vibe-check 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -5
- package/dist/esm/check/check.mjs +4 -0
- package/dist/esm/check/check.mjs.map +1 -1
- package/dist/esm/check/flag-enablement.mjs +32 -0
- package/dist/esm/check/flag-enablement.mjs.map +1 -0
- package/dist/esm/check/handoff-provider-identity.mjs +18 -0
- package/dist/esm/check/handoff-provider-identity.mjs.map +1 -0
- package/dist/esm/check/inherited-collection.mjs +1 -1
- package/dist/esm/check/inherited-collection.mjs.map +1 -1
- package/dist/esm/check/project-changes.mjs +2 -0
- package/dist/esm/check/project-changes.mjs.map +1 -0
- package/dist/esm/check/project-context.mjs +2 -0
- package/dist/esm/check/project-context.mjs.map +1 -0
- package/dist/esm/check-settlement/facts.mjs.map +1 -1
- package/dist/esm/check-settlement/record-store.mjs +1 -1
- package/dist/esm/check-settlement/record-store.mjs.map +1 -1
- package/dist/esm/data-boundary/canonical-data.mjs +36 -7
- package/dist/esm/data-boundary/canonical-data.mjs.map +1 -1
- package/dist/esm/data-boundary/canonical-json.mjs.map +1 -1
- package/dist/esm/data-boundary/closed-values.mjs +28 -4
- package/dist/esm/data-boundary/closed-values.mjs.map +1 -1
- package/dist/esm/{package-checks/project-files → data-boundary}/config-glob.mjs +3 -3
- package/dist/esm/data-boundary/config-glob.mjs.map +1 -0
- package/dist/esm/data-boundary/project-path.mjs +19 -0
- package/dist/esm/data-boundary/project-path.mjs.map +1 -0
- package/dist/esm/index.mjs +12 -5
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/machine-output/v4/atomic-publication.mjs +4 -1
- package/dist/esm/machine-output/v4/atomic-publication.mjs.map +1 -1
- package/dist/esm/package-checks/check-authoring.mjs +69 -0
- package/dist/esm/package-checks/check-authoring.mjs.map +1 -0
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-authoring.mjs.map +1 -1
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-evidence.mjs.map +1 -1
- package/dist/esm/package-checks/command-check/command-check.mjs +55 -0
- package/dist/esm/package-checks/command-check/command-check.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/contract.mjs +2 -0
- package/dist/esm/package-checks/command-check/contract.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/execution.mjs +134 -0
- package/dist/esm/package-checks/command-check/execution.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/options.mjs +284 -0
- package/dist/esm/package-checks/command-check/options.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/transcript.mjs +26 -0
- package/dist/esm/package-checks/command-check/transcript.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs +9 -11
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/execution.mjs +2 -4
- package/dist/esm/package-checks/duplicate-detection/execution.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/options.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/records.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/constructor.mjs +9 -11
- package/dist/esm/package-checks/file-metrics/constructor.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/execution.mjs +2 -4
- package/dist/esm/package-checks/file-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/options.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/records.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs +1 -1
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs +38 -0
- package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs +35 -0
- package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs +102 -29
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analysis.mjs +7 -2
- package/dist/esm/package-checks/function-metrics/analysis.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs +1 -3
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/protocol.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs +3 -2
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs +6 -6
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs +12 -7
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs +6 -6
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs +5 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs +12 -5
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs +20 -8
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/constructor.mjs +9 -11
- package/dist/esm/package-checks/function-metrics/constructor.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/execution.mjs +2 -4
- package/dist/esm/package-checks/function-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/measurement.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/measurement.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/options.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/records.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/git.mjs +11 -0
- package/dist/esm/package-checks/host-environment/git.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/path.mjs +1 -17
- package/dist/esm/package-checks/host-environment/path.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/contract.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/result.mjs +43 -17
- package/dist/esm/package-checks/host-environment/process/result.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/runner.mjs +7 -5
- package/dist/esm/package-checks/host-environment/process/runner.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs +9 -11
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs +6 -2
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs +11 -3
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/default-check.mjs +9 -11
- package/dist/esm/package-checks/json-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/local-cache-options.mjs +28 -0
- package/dist/esm/package-checks/local-cache-options.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs +37 -45
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs.map +1 -1
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs +3 -1
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs +19 -33
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs +1 -1
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs +1 -3
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs +3 -18
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs +2 -14
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs +4 -5
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-lint/adapter.mjs +125 -0
- package/dist/esm/package-checks/markdown-lint/adapter.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/default-check.mjs +37 -0
- package/dist/esm/package-checks/markdown-lint/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/execution.mjs +202 -0
- package/dist/esm/package-checks/markdown-lint/execution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/final-data.mjs +16 -0
- package/dist/esm/package-checks/markdown-lint/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/finding-messages.mjs +72 -0
- package/dist/esm/package-checks/markdown-lint/finding-messages.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs +41 -0
- package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/findings-cache.mjs +110 -0
- package/dist/esm/package-checks/markdown-lint/findings-cache.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options-resolution.mjs +74 -0
- package/dist/esm/package-checks/markdown-lint/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options-validation.mjs +41 -0
- package/dist/esm/package-checks/markdown-lint/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options.mjs +13 -0
- package/dist/esm/package-checks/markdown-lint/options.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/records.mjs +65 -0
- package/dist/esm/package-checks/markdown-lint/records.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs +14 -0
- package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/collection.mjs +23 -19
- package/dist/esm/package-checks/project-files/collection.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/configuration.mjs +1 -1
- package/dist/esm/package-checks/project-files/configuration.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs +2 -5
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs +22 -6
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/public-collection.mjs +1 -1
- package/dist/esm/package-checks/project-files/public-collection.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/revision-paths.mjs +3 -3
- package/dist/esm/package-checks/project-files/revision-paths.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs +11 -15
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/default-check.mjs +9 -11
- package/dist/esm/package-checks/secret-detection/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/execution.mjs +2 -2
- package/dist/esm/package-checks/secret-detection/execution.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs +46 -7
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/options.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/records.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs +3 -4
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs.map +1 -1
- package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs +10 -0
- package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs.map +1 -0
- package/dist/esm/{cache → package-tools/cache}/cache-json-by-key.mjs +13 -14
- package/dist/esm/package-tools/cache/cache-json-by-key.mjs.map +1 -0
- package/dist/esm/package-tools/finding-presentation/finding-presentation.mjs.map +1 -0
- package/dist/esm/{finding-waivers → package-tools/finding-waivers}/reconciliation.mjs +14 -5
- package/dist/esm/package-tools/finding-waivers/reconciliation.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/critical-path-ranking.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/duration-model/bounded-history.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.mjs +2 -2
- package/dist/esm/package-tools/learned-critical-path/duration-model/prediction.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.mjs +4 -2
- package/dist/esm/package-tools/learned-critical-path/duration-model/preparation.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/duration-model/recording.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.mjs +8 -8
- package/dist/esm/package-tools/learned-critical-path/duration-model/storage.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.mjs +1 -2
- package/dist/esm/package-tools/learned-critical-path/selection-layers.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/static-decision.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/strategy.mjs +3 -3
- package/dist/esm/package-tools/learned-critical-path/strategy.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs +8 -5
- package/dist/esm/project-definition/check-tree/authoring.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs +79 -66
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/flag-conditions.mjs +71 -0
- package/dist/esm/project-definition/check-tree/flag-conditions.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs +13 -8
- package/dist/esm/project-definition/check-tree/materialization.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/resolution.mjs +7 -6
- package/dist/esm/project-definition/check-tree/resolution.mjs.map +1 -1
- package/dist/esm/project-definition/declarative-snapshot.mjs +2 -1
- package/dist/esm/project-definition/declarative-snapshot.mjs.map +1 -1
- package/dist/esm/project-definition/project-changes.mjs +70 -0
- package/dist/esm/project-definition/project-changes.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition-validation.mjs +40 -8
- package/dist/esm/project-definition/project-definition-validation.mjs.map +1 -1
- package/dist/esm/project-definition/project-definition.mjs +22 -15
- package/dist/esm/project-definition/project-definition.mjs.map +1 -1
- package/dist/esm/project-definition/scheduler-policy.mjs.map +1 -1
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs +9 -6
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs.map +1 -1
- package/dist/esm/project-run/admission-strategy-provider/prepared-admission-strategy.mjs.map +1 -1
- package/dist/esm/project-run/aggregation.mjs +42 -59
- package/dist/esm/project-run/aggregation.mjs.map +1 -1
- package/dist/esm/project-run/changes/git.mjs +161 -0
- package/dist/esm/project-run/changes/git.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/admitted-check-execution.mjs +41 -0
- package/dist/esm/project-run/check-execution/admitted-check-execution.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/callback.mjs +3 -2
- package/dist/esm/project-run/check-execution/callback.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/dependencies.mjs +80 -5
- package/dist/esm/project-run/check-execution/dependencies.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-finalization.mjs +5 -3
- package/dist/esm/project-run/check-execution/execution-finalization.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-settlement.mjs +37 -16
- package/dist/esm/project-run/check-execution/execution-settlement.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/flag-controls.mjs +15 -7
- package/dist/esm/project-run/check-execution/flag-controls.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/lifecycle.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/{preflight-result.mjs → preparation-result.mjs} +24 -24
- package/dist/esm/project-run/check-execution/preparation-result.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/{preflight.mjs → preparation.mjs} +52 -52
- package/dist/esm/project-run/check-execution/preparation.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/ready-check-execution.mjs +71 -0
- package/dist/esm/project-run/check-execution/ready-check-execution.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/resolved-checks.mjs +27 -164
- package/dist/esm/project-run/check-execution/resolved-checks.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/scheduled-check-run.mjs +79 -0
- package/dist/esm/project-run/check-execution/scheduled-check-run.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/terminal-result.mjs +70 -25
- package/dist/esm/project-run/check-execution/terminal-result.mjs.map +1 -1
- package/dist/esm/project-run/completion/completion.mjs +18 -1
- package/dist/esm/project-run/completion/completion.mjs.map +1 -1
- package/dist/esm/project-run/controls/contract.mjs.map +1 -1
- package/dist/esm/project-run/controls/validation.mjs +7 -54
- package/dist/esm/project-run/controls/validation.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs +3 -3
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs +1 -1
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs.map +1 -1
- package/dist/esm/project-run/invocation/candidate.mjs +17 -13
- package/dist/esm/project-run/invocation/candidate.mjs.map +1 -1
- package/dist/esm/project-run/invocation/candidates.mjs +26 -0
- package/dist/esm/project-run/invocation/candidates.mjs.map +1 -0
- package/dist/esm/project-run/invocation/creation.mjs +7 -3
- package/dist/esm/project-run/invocation/creation.mjs.map +1 -1
- package/dist/esm/project-run/invocation/execution.mjs +98 -0
- package/dist/esm/project-run/invocation/execution.mjs.map +1 -0
- package/dist/esm/project-run/invocation/run.mjs +13 -112
- package/dist/esm/project-run/invocation/run.mjs.map +1 -1
- package/dist/esm/project-run/invocation/scheduler.mjs +13 -6
- package/dist/esm/project-run/invocation/scheduler.mjs.map +1 -1
- package/dist/esm/project-run/outputs/status.mjs +12 -12
- package/dist/esm/project-run/outputs/status.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/presentation.mjs +31 -11
- package/dist/esm/project-run/progress-rendering/presentation.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs +11 -4
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs +20 -6
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer.mjs +6 -2
- package/dist/esm/project-run/progress-rendering/renderer.mjs.map +1 -1
- package/dist/esm/project-run/project-context.mjs +2 -1
- package/dist/esm/project-run/project-context.mjs.map +1 -1
- package/dist/esm/project-run/result.mjs +2 -2
- package/dist/esm/project-run/result.mjs.map +1 -1
- package/dist/esm/project-run/run.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs +45 -0
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs +9 -4
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs +3 -5
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs +25 -8
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs +8 -8
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/execution-state.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs +8 -4
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs +12 -6
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs +3 -1
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs +17 -17
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler.mjs +18 -6
- package/dist/esm/project-run/task-scheduler/scheduler.mjs.map +1 -1
- package/docs/api-mechanics.md +147 -28
- package/docs/changelog.md +145 -2
- package/docs/checks/duplicate-detection.md +22 -3
- package/docs/checks/file-metrics.md +25 -6
- package/docs/checks/function-metrics.md +21 -2
- package/docs/checks/json-schema-validation.md +25 -4
- package/docs/checks/json-validation.md +24 -5
- package/docs/checks/maintenance-reminders.md +30 -6
- package/docs/checks/markdown-link-validation.md +24 -4
- package/docs/checks/markdown-lint.md +167 -0
- package/docs/checks/secret-detection.md +31 -7
- package/docs/examples/artifacts/mixed-outcomes/definition.ts +10 -10
- package/docs/guides/building-project-gate.md +706 -0
- package/docs/guides/callbacks.md +81 -22
- package/docs/guides/check-dependencies.md +41 -10
- package/docs/guides/collecting-project-files.md +7 -7
- package/docs/guides/command-check.md +155 -0
- package/docs/guides/data-boundaries.md +140 -0
- package/docs/guides/extending-check-lifecycle.md +77 -25
- package/docs/guides/finding-waivers.md +43 -1
- package/docs/guides/learned-scheduling.md +1 -1
- package/docs/guides/run-outputs.md +35 -9
- package/docs/guides/scheduling.md +15 -15
- package/docs/output.md +6 -5
- package/package.json +2 -1
- package/src/check/check.ts +332 -92
- package/src/check/flag-enablement.ts +76 -0
- package/src/check/handoff-provider-identity.ts +34 -0
- package/src/check/inherited-collection.ts +1 -1
- package/src/check/project-changes.ts +14 -0
- package/src/check/project-context.ts +11 -0
- package/src/check-settlement/facts.ts +1 -1
- package/src/check-settlement/record-store.ts +1 -1
- package/src/data-boundary/canonical-data.ts +36 -9
- package/src/data-boundary/canonical-json.ts +18 -1
- package/src/data-boundary/closed-values.ts +26 -6
- package/src/data-boundary/config-glob.ts +17 -0
- package/src/data-boundary/project-path.ts +21 -0
- package/src/index.ts +72 -11
- package/src/machine-output/v4/atomic-publication.ts +3 -1
- package/src/package-checks/check-authoring.ts +136 -0
- package/src/package-checks/code-quality-findings/finding-waiver-authoring.ts +1 -1
- package/src/package-checks/code-quality-findings/finding-waiver-evidence.ts +1 -1
- package/src/package-checks/command-check/command-check.ts +152 -0
- package/src/package-checks/command-check/contract.ts +168 -0
- package/src/package-checks/command-check/execution.ts +211 -0
- package/src/package-checks/command-check/options.ts +331 -0
- package/src/package-checks/command-check/transcript.ts +35 -0
- package/src/package-checks/duplicate-detection/default-check.ts +37 -6
- package/src/package-checks/duplicate-detection/execution.ts +2 -4
- package/src/package-checks/duplicate-detection/finding-messages.ts +2 -2
- package/src/package-checks/duplicate-detection/jscpd/availability.ts +1 -1
- package/src/package-checks/duplicate-detection/options.ts +6 -3
- package/src/package-checks/duplicate-detection/records.ts +1 -1
- package/src/package-checks/file-metrics/constructor.ts +29 -6
- package/src/package-checks/file-metrics/execution.ts +2 -4
- package/src/package-checks/file-metrics/finding-messages.ts +1 -1
- package/src/package-checks/file-metrics/options.ts +6 -3
- package/src/package-checks/file-metrics/records.ts +1 -1
- package/src/package-checks/file-metrics/scc/availability.ts +1 -1
- package/src/package-checks/file-metrics/scc/batch-planner.ts +56 -0
- package/src/package-checks/file-metrics/scc/logical-scan-resources.ts +59 -0
- package/src/package-checks/file-metrics/scc/scanner.ts +134 -32
- package/src/package-checks/function-metrics/analysis.ts +7 -2
- package/src/package-checks/function-metrics/analyzer/analysis-model.ts +1 -1
- package/src/package-checks/function-metrics/analyzer/extension-output.ts +14 -6
- package/src/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.ts +1 -3
- package/src/package-checks/function-metrics/analyzer/extensions/protocol.ts +3 -3
- package/src/package-checks/function-metrics/analyzer/pipeline.ts +4 -2
- package/src/package-checks/function-metrics/analyzer/readers/erlang.ts +6 -6
- package/src/package-checks/function-metrics/analyzer/readers/fortran.ts +1 -1
- package/src/package-checks/function-metrics/analyzer/readers/objc.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/php-states.ts +14 -7
- package/src/package-checks/function-metrics/analyzer/readers/plsql.ts +8 -4
- package/src/package-checks/function-metrics/analyzer/readers/python.ts +4 -3
- package/src/package-checks/function-metrics/analyzer/readers/r.ts +2 -1
- package/src/package-checks/function-metrics/analyzer/readers/ttcn.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/typescript.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/zig.ts +2 -1
- package/src/package-checks/function-metrics/analyzer/shared/code-reader.ts +3 -1
- package/src/package-checks/function-metrics/analyzer/shared/js-style-regex.ts +10 -5
- package/src/package-checks/function-metrics/analyzer-worker-port.ts +20 -6
- package/src/package-checks/function-metrics/constructor.ts +30 -7
- package/src/package-checks/function-metrics/execution.ts +2 -4
- package/src/package-checks/function-metrics/finding-messages.ts +2 -2
- package/src/package-checks/function-metrics/measurement.ts +3 -1
- package/src/package-checks/function-metrics/options.ts +6 -3
- package/src/package-checks/function-metrics/records.ts +1 -1
- package/src/package-checks/host-environment/git.ts +11 -0
- package/src/package-checks/host-environment/path.ts +1 -20
- package/src/package-checks/host-environment/process/contract.ts +17 -9
- package/src/package-checks/host-environment/process/result.ts +48 -20
- package/src/package-checks/host-environment/process/runner.ts +8 -4
- package/src/package-checks/json-schema-validation/default-check.ts +38 -5
- package/src/package-checks/json-schema-validation/options.ts +4 -1
- package/src/package-checks/json-schema-validation/reference-resolver.ts +6 -2
- package/src/package-checks/json-schema-validation/schema-policy.ts +10 -5
- package/src/package-checks/json-validation/default-check.ts +27 -6
- package/src/package-checks/json-validation/options.ts +4 -1
- package/src/package-checks/local-cache-options.ts +40 -0
- package/src/package-checks/maintenance-reminders/maintenance-reminders.ts +89 -9
- package/src/package-checks/maintenance-reminders/maintenance-support.ts +3 -3
- package/src/package-checks/markdown-link-validation/default-check.ts +48 -5
- package/src/package-checks/markdown-link-validation/execution.ts +1 -1
- package/src/package-checks/markdown-link-validation/finding-messages.ts +1 -1
- package/src/package-checks/markdown-link-validation/markdown-parser.ts +1 -5
- package/src/package-checks/markdown-link-validation/options-resolution.ts +2 -19
- package/src/package-checks/markdown-link-validation/options-validation.ts +2 -17
- package/src/package-checks/markdown-link-validation/options.ts +6 -7
- package/src/package-checks/markdown-link-validation/parse-facts-cache-payload.ts +4 -5
- package/src/package-checks/markdown-lint/adapter.ts +167 -0
- package/src/package-checks/markdown-lint/default-check.ts +92 -0
- package/src/package-checks/markdown-lint/execution.ts +266 -0
- package/src/package-checks/markdown-lint/final-data.ts +33 -0
- package/src/package-checks/markdown-lint/finding-messages.ts +87 -0
- package/src/package-checks/markdown-lint/finding-waiver-identity.ts +54 -0
- package/src/package-checks/markdown-lint/findings-cache.ts +141 -0
- package/src/package-checks/markdown-lint/options-resolution.ts +102 -0
- package/src/package-checks/markdown-lint/options-validation.ts +50 -0
- package/src/package-checks/markdown-lint/options.ts +82 -0
- package/src/package-checks/markdown-lint/records.ts +132 -0
- package/src/package-checks/markdown-lint/unavailable-reasons.ts +33 -0
- package/src/package-checks/project-files/collection.ts +38 -22
- package/src/package-checks/project-files/config-glob.ts +1 -17
- package/src/package-checks/project-files/configuration.ts +1 -1
- package/src/package-checks/project-files/gitlink-revision.ts +4 -6
- package/src/package-checks/project-files/gitlink-worktree.ts +35 -7
- package/src/package-checks/project-files/public-collection.ts +1 -1
- package/src/package-checks/project-files/revision-paths.ts +3 -3
- package/src/package-checks/project-files/revision-worktree-files.ts +16 -16
- package/src/package-checks/secret-detection/default-check.ts +29 -6
- package/src/package-checks/secret-detection/execution.ts +2 -2
- package/src/package-checks/secret-detection/input-preparation.ts +64 -7
- package/src/package-checks/secret-detection/options.ts +5 -2
- package/src/package-checks/secret-detection/records.ts +1 -1
- package/src/package-checks/secret-detection/secretlint/adapter.ts +3 -4
- package/src/package-tools/admission-policy/define-admission-policy.ts +54 -0
- package/src/{cache → package-tools/cache}/cache-json-by-key.ts +13 -17
- package/src/{check → package-tools/finding-presentation}/finding-presentation.ts +3 -1
- package/src/{finding-waivers → package-tools/finding-waivers}/reconciliation.ts +16 -8
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.ts +5 -2
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.ts +5 -3
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.ts +5 -4
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.ts +9 -10
- package/src/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.ts +2 -3
- package/src/{learned-critical-path → package-tools/learned-critical-path}/static-decision.ts +1 -1
- package/src/{learned-critical-path → package-tools/learned-critical-path}/strategy.ts +7 -4
- package/src/project-definition/check-tree/authoring.ts +15 -8
- package/src/project-definition/check-tree/check-fields-authoring.ts +106 -91
- package/src/project-definition/check-tree/flag-conditions.ts +99 -0
- package/src/project-definition/check-tree/materialization.ts +12 -8
- package/src/project-definition/check-tree/resolution.ts +13 -15
- package/src/project-definition/declarative-snapshot.ts +9 -2
- package/src/project-definition/project-changes.ts +112 -0
- package/src/project-definition/project-definition-validation.ts +58 -10
- package/src/project-definition/project-definition.ts +41 -68
- package/src/project-definition/scheduler-policy.ts +6 -3
- package/src/project-run/admission-strategy-provider/custom-strategy-preparation.ts +11 -8
- package/src/project-run/admission-strategy-provider/prepared-admission-strategy.ts +2 -2
- package/src/project-run/aggregation.ts +51 -74
- package/src/project-run/changes/git.ts +206 -0
- package/src/project-run/check-execution/admitted-check-execution.ts +62 -0
- package/src/project-run/check-execution/callback.ts +3 -2
- package/src/project-run/check-execution/dependencies.ts +120 -6
- package/src/project-run/check-execution/execution-finalization.ts +6 -4
- package/src/project-run/check-execution/execution-settlement.ts +88 -29
- package/src/project-run/check-execution/flag-controls.ts +22 -8
- package/src/project-run/check-execution/lifecycle.ts +14 -6
- package/src/project-run/check-execution/{preflight-result.ts → preparation-result.ts} +34 -32
- package/src/project-run/check-execution/{preflight.ts → preparation.ts} +92 -84
- package/src/project-run/check-execution/ready-check-execution.ts +97 -0
- package/src/project-run/check-execution/resolved-checks.ts +40 -219
- package/src/project-run/check-execution/scheduled-check-run.ts +119 -0
- package/src/project-run/check-execution/terminal-result.ts +108 -29
- package/src/project-run/completion/completion.ts +17 -3
- package/src/project-run/controls/contract.ts +6 -16
- package/src/project-run/controls/validation.ts +7 -60
- package/src/project-run/diagnostic-logging/diagnostic-detail-rendering.ts +1 -2
- package/src/project-run/diagnostic-logging/observation-rendering.ts +1 -1
- package/src/project-run/invocation/candidate.ts +28 -15
- package/src/project-run/invocation/candidates.ts +56 -0
- package/src/project-run/invocation/creation.ts +7 -3
- package/src/project-run/invocation/execution.ts +136 -0
- package/src/project-run/invocation/run.ts +15 -179
- package/src/project-run/invocation/scheduler.ts +13 -6
- package/src/project-run/outputs/status.ts +15 -15
- package/src/project-run/progress-rendering/presentation.ts +35 -13
- package/src/project-run/progress-rendering/renderer-formatting.ts +20 -7
- package/src/project-run/progress-rendering/renderer-lifecycle.ts +23 -6
- package/src/project-run/progress-rendering/renderer.ts +10 -4
- package/src/project-run/project-context.ts +8 -4
- package/src/project-run/result.ts +5 -5
- package/src/project-run/run.ts +1 -1
- package/src/project-run/task-scheduler/admission-core/compiled-graph-lookup.ts +71 -0
- package/src/project-run/task-scheduler/admission-core/compiled-graph.ts +9 -4
- package/src/project-run/task-scheduler/admission-core/selection-query.ts +6 -4
- package/src/project-run/task-scheduler/admission-core/selection-seed.ts +36 -6
- package/src/project-run/task-scheduler/admission-core/selection-transition.ts +17 -8
- package/src/project-run/task-scheduler/execution-state.ts +4 -4
- package/src/project-run/task-scheduler/measurement/diagnostics.ts +10 -4
- package/src/project-run/task-scheduler/measurement/timing.ts +13 -5
- package/src/project-run/task-scheduler/scheduler-observation.ts +3 -1
- package/src/project-run/task-scheduler/scheduler-terminal-measurement.ts +24 -22
- package/src/project-run/task-scheduler/scheduler.ts +23 -6
- package/types/check/check.d.ts +178 -67
- package/types/check/flag-enablement.d.ts +42 -0
- package/types/check/handoff-provider-identity.d.ts +12 -0
- package/types/check/project-changes.d.ts +13 -0
- package/types/check/project-context.d.ts +10 -0
- package/types/check-settlement/facts.d.ts +1 -1
- package/types/data-boundary/canonical-data.d.ts +28 -5
- package/types/data-boundary/canonical-json.d.ts +18 -1
- package/types/data-boundary/closed-values.d.ts +17 -1
- package/types/data-boundary/config-glob.d.ts +5 -0
- package/types/data-boundary/project-path.d.ts +4 -0
- package/types/index.d.ts +27 -11
- package/types/package-checks/check-authoring.d.ts +45 -0
- package/types/package-checks/code-quality-findings/finding-waiver-authoring.d.ts +1 -1
- package/types/package-checks/code-quality-findings/finding-waiver-evidence.d.ts +1 -1
- package/types/package-checks/command-check/command-check.d.ts +48 -0
- package/types/package-checks/command-check/contract.d.ts +108 -0
- package/types/package-checks/command-check/execution.d.ts +7 -0
- package/types/package-checks/command-check/options.d.ts +11 -0
- package/types/package-checks/command-check/transcript.d.ts +8 -0
- package/types/package-checks/duplicate-detection/default-check.d.ts +5 -2
- package/types/package-checks/duplicate-detection/finding-messages.d.ts +1 -1
- package/types/package-checks/duplicate-detection/options.d.ts +4 -3
- package/types/package-checks/duplicate-detection/records.d.ts +1 -1
- package/types/package-checks/file-metrics/constructor.d.ts +5 -2
- package/types/package-checks/file-metrics/options.d.ts +4 -3
- package/types/package-checks/file-metrics/records.d.ts +1 -1
- package/types/package-checks/file-metrics/scc/batch-planner.d.ts +18 -0
- package/types/package-checks/file-metrics/scc/logical-scan-resources.d.ts +14 -0
- package/types/package-checks/function-metrics/analyzer/extensions/protocol.d.ts +3 -3
- package/types/package-checks/function-metrics/constructor.d.ts +5 -2
- package/types/package-checks/function-metrics/finding-messages.d.ts +1 -1
- package/types/package-checks/function-metrics/options.d.ts +4 -3
- package/types/package-checks/function-metrics/records.d.ts +1 -1
- package/types/package-checks/host-environment/git.d.ts +2 -0
- package/types/package-checks/host-environment/path.d.ts +1 -3
- package/types/package-checks/host-environment/process/contract.d.ts +17 -9
- package/types/package-checks/json-schema-validation/default-check.d.ts +4 -1
- package/types/package-checks/json-schema-validation/options.d.ts +2 -1
- package/types/package-checks/json-validation/default-check.d.ts +4 -1
- package/types/package-checks/json-validation/options.d.ts +2 -1
- package/types/package-checks/local-cache-options.d.ts +9 -0
- package/types/package-checks/maintenance-reminders/maintenance-reminders.d.ts +11 -2
- package/types/package-checks/markdown-link-validation/default-check.d.ts +4 -1
- package/types/package-checks/markdown-link-validation/options.d.ts +4 -7
- package/types/package-checks/markdown-lint/adapter.d.ts +10 -0
- package/types/package-checks/markdown-lint/default-check.d.ts +37 -0
- package/types/package-checks/markdown-lint/execution.d.ts +24 -0
- package/types/package-checks/markdown-lint/final-data.d.ts +8 -0
- package/types/package-checks/markdown-lint/finding-messages.d.ts +6 -0
- package/types/package-checks/markdown-lint/finding-waiver-identity.d.ts +3 -0
- package/types/package-checks/markdown-lint/findings-cache.d.ts +17 -0
- package/types/package-checks/markdown-lint/options-resolution.d.ts +3 -0
- package/types/package-checks/markdown-lint/options-validation.d.ts +2 -0
- package/types/package-checks/markdown-lint/options.d.ts +65 -0
- package/types/package-checks/markdown-lint/records.d.ts +39 -0
- package/types/package-checks/markdown-lint/unavailable-reasons.d.ts +3 -0
- package/types/package-checks/secret-detection/default-check.d.ts +4 -1
- package/types/package-checks/secret-detection/options.d.ts +3 -2
- package/types/package-tools/admission-policy/define-admission-policy.d.ts +26 -0
- package/types/{check → package-tools/finding-presentation}/finding-presentation.d.ts +3 -1
- package/types/{finding-waivers → package-tools/finding-waivers}/reconciliation.d.ts +3 -3
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.d.ts +2 -2
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/static-decision.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/strategy.d.ts +1 -1
- package/types/project-definition/check-tree/authoring.d.ts +5 -3
- package/types/project-definition/check-tree/check-fields-authoring.d.ts +12 -7
- package/types/project-definition/check-tree/flag-conditions.d.ts +5 -0
- package/types/project-definition/check-tree/resolution.d.ts +6 -4
- package/types/project-definition/declarative-snapshot.d.ts +4 -1
- package/types/project-definition/project-changes.d.ts +30 -0
- package/types/project-definition/project-definition.d.ts +15 -30
- package/types/project-definition/scheduler-policy.d.ts +3 -3
- package/types/project-run/admission-strategy-provider/prepared-admission-strategy.d.ts +2 -2
- package/types/project-run/aggregation.d.ts +8 -6
- package/types/project-run/changes/git.d.ts +14 -0
- package/types/project-run/check-execution/admitted-check-execution.d.ts +18 -0
- package/types/project-run/check-execution/dependencies.d.ts +3 -0
- package/types/project-run/check-execution/execution-finalization.d.ts +1 -1
- package/types/project-run/check-execution/execution-settlement.d.ts +15 -7
- package/types/project-run/check-execution/flag-controls.d.ts +1 -1
- package/types/project-run/check-execution/lifecycle.d.ts +9 -5
- package/types/project-run/check-execution/{preflight-result.d.ts → preparation-result.d.ts} +3 -3
- package/types/project-run/check-execution/{preflight.d.ts → preparation.d.ts} +10 -9
- package/types/project-run/check-execution/ready-check-execution.d.ts +18 -0
- package/types/project-run/check-execution/resolved-checks.d.ts +12 -13
- package/types/project-run/check-execution/scheduled-check-run.d.ts +10 -0
- package/types/project-run/check-execution/terminal-result.d.ts +13 -1
- package/types/project-run/completion/completion.d.ts +3 -1
- package/types/project-run/controls/contract.d.ts +6 -16
- package/types/project-run/invocation/candidates.d.ts +8 -0
- package/types/project-run/invocation/execution.d.ts +5 -0
- package/types/project-run/invocation/run.d.ts +2 -2
- package/types/project-run/outputs/status.d.ts +4 -4
- package/types/project-run/progress-rendering/presentation.d.ts +4 -3
- package/types/project-run/progress-rendering/renderer-formatting.d.ts +5 -2
- package/types/project-run/progress-rendering/renderer-lifecycle.d.ts +2 -0
- package/types/project-run/progress-rendering/renderer.d.ts +4 -2
- package/types/project-run/project-context.d.ts +3 -3
- package/types/project-run/result.d.ts +3 -3
- package/types/project-run/run.d.ts +1 -1
- package/types/project-run/task-scheduler/admission-core/compiled-graph-lookup.d.ts +10 -0
- package/types/project-run/task-scheduler/execution-state.d.ts +4 -4
- package/types/project-run/task-scheduler/measurement/diagnostics.d.ts +2 -2
- package/types/project-run/task-scheduler/scheduler-terminal-measurement.d.ts +1 -1
- package/dist/esm/cache/cache-json-by-key.mjs.map +0 -1
- package/dist/esm/check/finding-presentation.mjs.map +0 -1
- package/dist/esm/finding-waivers/reconciliation.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/bounded-history.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/prediction.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/preparation.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/recording.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/storage.mjs.map +0 -1
- package/dist/esm/learned-critical-path/selection-layers.mjs.map +0 -1
- package/dist/esm/learned-critical-path/static-decision.mjs.map +0 -1
- package/dist/esm/learned-critical-path/strategy.mjs.map +0 -1
- package/dist/esm/package-checks/project-files/config-glob.mjs.map +0 -1
- package/dist/esm/project-run/check-execution/preflight-result.mjs.map +0 -1
- package/dist/esm/project-run/check-execution/preflight.mjs.map +0 -1
- package/dist/esm/project-run/task-scheduler/critical-path-ranking.mjs.map +0 -1
- package/types/package-checks/project-files/config-glob.d.ts +0 -5
- /package/dist/esm/{check → package-tools/finding-presentation}/finding-presentation.mjs +0 -0
- /package/dist/esm/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/static-decision.mjs +0 -0
- /package/src/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.ts +0 -0
- /package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.ts +0 -0
- /package/types/{cache → package-tools/cache}/cache-json-by-key.d.ts +0 -0
- /package/types/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.d.ts +0 -0
- /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.d.ts +0 -0
- /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.d.ts +0 -0
package/src/check/check.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { CanonicalJsonObject, CanonicalJsonValue } from "../data-boundary/canonical-json.ts";
|
|
2
2
|
import type { InheritableCheckCollection } from "./inherited-collection.ts";
|
|
3
|
+
import type { CheckFlagEnablement } from "./flag-enablement.ts";
|
|
4
|
+
import type { CheckProjectContext } from "./project-context.ts";
|
|
5
|
+
import { registerHandoffProviderIdentity } from "./handoff-provider-identity.ts";
|
|
3
6
|
|
|
4
7
|
export {
|
|
5
8
|
inherit,
|
|
@@ -47,30 +50,17 @@ export interface CheckMessage {
|
|
|
47
50
|
/** 可附加到每个 {@link CheckResult} branch 的有序 terminal messages。 */
|
|
48
51
|
export interface CheckResultMessages {
|
|
49
52
|
/** 省略、`undefined` 或空数组都表示没有 supplemental messages。 */
|
|
50
|
-
readonly messages?: readonly CheckMessage[];
|
|
53
|
+
readonly messages?: readonly CheckMessage[] | undefined;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
export type CheckVisibility = "always" | "attention";
|
|
56
|
+
type HandoffForbidden = Readonly<{ readonly handoff?: never }>;
|
|
55
57
|
|
|
56
58
|
/** Check Task 在 admission 到 settlement 期间持有的静态 named resource units。 */
|
|
57
59
|
export type CheckResourceClaims = Readonly<Record<string, number>>;
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
export type
|
|
61
|
-
|
|
62
|
-
/** executable Check 的声明式多 flag 启用条件。 */
|
|
63
|
-
export interface CheckFlagEnablement {
|
|
64
|
-
/** 非空 flag token 集合;Definition 会去重并稳定排序。 */
|
|
65
|
-
readonly flags: readonly [string, ...string[]];
|
|
66
|
-
/** 对声明 token 与本次 Run flags 执行的 presence predicate。 */
|
|
67
|
-
readonly mode: CheckFlagEnablementMode;
|
|
68
|
-
/**
|
|
69
|
-
* 条件命中时是否启动本 Check 的传递 `dependsOn` prerequisite;省略时保持只选择直接命中 Check 的兼容行为。
|
|
70
|
-
* `observes` 不参与此选择,且 dependency 自己的 flag 条件不会阻止本次已启动的 prerequisite。
|
|
71
|
-
*/
|
|
72
|
-
readonly propagateDependsOn?: true;
|
|
73
|
-
}
|
|
61
|
+
export type { CheckFlagCondition, CheckFlagEnablement } from "./flag-enablement.ts";
|
|
62
|
+
export type { ProjectChanges } from "./project-changes.ts";
|
|
63
|
+
export type { CheckProjectContext } from "./project-context.ts";
|
|
74
64
|
|
|
75
65
|
/**
|
|
76
66
|
* Check callback 的 terminal result。
|
|
@@ -79,36 +69,70 @@ export interface CheckFlagEnablement {
|
|
|
79
69
|
* @remarks `not-applicable` 与 `unavailable` 不携带 final data;普通 callback、Record 或取消失败由
|
|
80
70
|
* Product 转换为 `unavailable`,而不是抛出为 Run 的成功结果。
|
|
81
71
|
*/
|
|
82
|
-
export type CheckResult<
|
|
72
|
+
export type CheckResult<
|
|
73
|
+
FinalData extends object = object,
|
|
74
|
+
Handoff extends object = never
|
|
75
|
+
> = Readonly<
|
|
83
76
|
(
|
|
84
|
-
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
77
|
+
| ([Handoff] extends [never]
|
|
78
|
+
? {
|
|
79
|
+
/** Check 已产生通过的 final data。 */
|
|
80
|
+
readonly status: "passed";
|
|
81
|
+
/** 此 Check 的主要终态事实。 */
|
|
82
|
+
readonly data: FinalData;
|
|
83
|
+
} & HandoffForbidden
|
|
84
|
+
: {
|
|
85
|
+
/** Check 已产生通过的 final data。 */
|
|
86
|
+
readonly status: "passed";
|
|
87
|
+
/** 此 Check 的主要终态事实。 */
|
|
88
|
+
readonly data: FinalData;
|
|
89
|
+
/** 仅由声明 `handoff: true` 的 provider 交接给 direct dependents 的 reference。 */
|
|
90
|
+
readonly handoff: Handoff;
|
|
91
|
+
})
|
|
92
|
+
| ({
|
|
91
93
|
/** Check 已产生失败的 final data。 */
|
|
92
94
|
readonly status: "failed";
|
|
93
95
|
/** 此 Check 的主要终态事实。 */
|
|
94
96
|
readonly data: FinalData;
|
|
95
|
-
}
|
|
96
|
-
| {
|
|
97
|
+
} & HandoffForbidden)
|
|
98
|
+
| ({
|
|
97
99
|
/** Check 在当前 invocation 中不适用。 */
|
|
98
100
|
readonly status: "not-applicable";
|
|
99
101
|
/** 不适用的可选受控原因。 */
|
|
100
102
|
readonly reason?: CheckNotApplicableReason;
|
|
101
|
-
}
|
|
102
|
-
| {
|
|
103
|
+
} & HandoffForbidden)
|
|
104
|
+
| ({
|
|
103
105
|
/** Check 不能提供 terminal data。 */
|
|
104
106
|
readonly status: "unavailable";
|
|
105
107
|
/** 不可用的受控原因。 */
|
|
106
108
|
readonly reason: CheckDeclaredUnavailableReason;
|
|
107
|
-
}
|
|
109
|
+
} & HandoffForbidden)
|
|
108
110
|
) &
|
|
109
111
|
CheckResultMessages
|
|
110
112
|
>;
|
|
111
113
|
|
|
114
|
+
/** Check callback 的同步或异步 terminal result。 */
|
|
115
|
+
type CheckExecutionResult<FinalData extends object = object, Handoff extends object = never> =
|
|
116
|
+
| CheckResult<FinalData, Handoff>
|
|
117
|
+
| Promise<CheckResult<FinalData, Handoff>>;
|
|
118
|
+
|
|
119
|
+
declare const CHECK_HANDOFF_PROVIDER_BRAND: unique symbol;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* A Check returned by `defineCheck({ handoff: true })`. The type-only brand lets
|
|
123
|
+
* `dependencies.get(provider)` infer the reference returned by that provider.
|
|
124
|
+
*
|
|
125
|
+
* @internal This is used by public callback types but authors never construct it.
|
|
126
|
+
*/
|
|
127
|
+
export type CheckHandoffProvider<
|
|
128
|
+
Id extends string = string,
|
|
129
|
+
Handoff extends object = object
|
|
130
|
+
> = Readonly<{
|
|
131
|
+
readonly checkId: Id;
|
|
132
|
+
readonly handoff: true;
|
|
133
|
+
readonly [CHECK_HANDOFF_PROVIDER_BRAND]: Handoff;
|
|
134
|
+
}>;
|
|
135
|
+
|
|
112
136
|
/** 已 materialize 到 Core snapshot 的 Check terminal outcome。 */
|
|
113
137
|
export type CheckOutcome = Readonly<
|
|
114
138
|
| {
|
|
@@ -137,14 +161,12 @@ export type CheckOutcome = Readonly<
|
|
|
137
161
|
}
|
|
138
162
|
>;
|
|
139
163
|
|
|
140
|
-
/**
|
|
141
|
-
export type DeepReadonly<
|
|
142
|
-
?
|
|
143
|
-
:
|
|
144
|
-
? readonly DeepReadonly<
|
|
145
|
-
:
|
|
146
|
-
? { readonly [Key in keyof T]: DeepReadonly<T[Key]> }
|
|
147
|
-
: never;
|
|
164
|
+
/** 递归只读 Check callback options,同时保留 array/tuple 形状和非 object leaf 类型。 */
|
|
165
|
+
export type DeepReadonly<Value> = Value extends readonly unknown[]
|
|
166
|
+
? { readonly [Key in keyof Value]: DeepReadonly<Value[Key]> }
|
|
167
|
+
: Value extends object
|
|
168
|
+
? { readonly [Key in keyof Value]: DeepReadonly<Value[Key]> }
|
|
169
|
+
: Value;
|
|
148
170
|
|
|
149
171
|
/** callback 写入 supplemental Record 时的 Check-local identity。 */
|
|
150
172
|
interface RecordIdentityInput {
|
|
@@ -196,6 +218,35 @@ export type DependencyReadResult = Readonly<
|
|
|
196
218
|
}
|
|
197
219
|
>;
|
|
198
220
|
|
|
221
|
+
/** `dependsOn` provider-object handoff read 的受控结果。 */
|
|
222
|
+
export type DependencyHandoffReadResult<Id extends string, Handoff extends object> = Readonly<
|
|
223
|
+
| {
|
|
224
|
+
/** 同一 execution graph 中接受的 provider handoff。 */
|
|
225
|
+
readonly ok: true;
|
|
226
|
+
readonly checkId: Id;
|
|
227
|
+
readonly status: "passed";
|
|
228
|
+
/** Core-owned canonical provider final data。 */
|
|
229
|
+
readonly data: CanonicalJsonObject;
|
|
230
|
+
/** Provider 交接且未由 Product clone、freeze 或 serialize 的引用。 */
|
|
231
|
+
readonly handoff: Handoff;
|
|
232
|
+
}
|
|
233
|
+
| {
|
|
234
|
+
readonly ok: false;
|
|
235
|
+
readonly error: Readonly<
|
|
236
|
+
| {
|
|
237
|
+
/** 当前 Check 未将 provider 声明为 direct `dependsOn`。 */
|
|
238
|
+
readonly code: "dependency-not-declared";
|
|
239
|
+
readonly checkId: string;
|
|
240
|
+
}
|
|
241
|
+
| {
|
|
242
|
+
/** 已授权 provider 没有与其 Definition-internal identity 对应的已接受 passed handoff。 */
|
|
243
|
+
readonly code: "upstream-handoff-unavailable";
|
|
244
|
+
readonly checkId: string;
|
|
245
|
+
}
|
|
246
|
+
>;
|
|
247
|
+
}
|
|
248
|
+
>;
|
|
249
|
+
|
|
199
250
|
/** 当前 Check 的一个已规范化直接 relation 及其完整终态事实。 */
|
|
200
251
|
export type DependencyObservation = Readonly<{
|
|
201
252
|
/** 已规范化、稳定排序的 direct relation ID。 */
|
|
@@ -206,6 +257,18 @@ export type DependencyObservation = Readonly<{
|
|
|
206
257
|
|
|
207
258
|
/** 当前 Check 的已规范化直接 relation outcomes 的 data reader。 */
|
|
208
259
|
export interface CheckDependencies {
|
|
260
|
+
/**
|
|
261
|
+
* Reads a `handoff: true` provider's accepted invocation-private handoff.
|
|
262
|
+
*
|
|
263
|
+
* @returns Only an effective direct `dependsOn` provider declared with `handoff: true`, whose
|
|
264
|
+
* Definition-internal identity has accepted `passed` data, returns canonical data plus its typed
|
|
265
|
+
* reference. `observes`, string IDs, lookalikes and unavailable handoffs fail closed without
|
|
266
|
+
* upstream data.
|
|
267
|
+
*/
|
|
268
|
+
get<Id extends string, Handoff extends object>(
|
|
269
|
+
provider: CheckHandoffProvider<Id, Handoff>
|
|
270
|
+
): DependencyHandoffReadResult<Id, Handoff>;
|
|
271
|
+
|
|
209
272
|
/**
|
|
210
273
|
* 读取一个直接 relation 的 canonical final data。
|
|
211
274
|
*
|
|
@@ -224,18 +287,10 @@ export interface CheckDependencies {
|
|
|
224
287
|
list(): readonly DependencyObservation[];
|
|
225
288
|
}
|
|
226
289
|
|
|
227
|
-
/** callback 可读取的、由 Product 规范化的项目上下文。 */
|
|
228
|
-
export interface CheckProjectContext {
|
|
229
|
-
/** 本次 Run 使用的绝对项目根目录。 */
|
|
230
|
-
readonly root: string;
|
|
231
|
-
/** 已去重、排序的 caller-supplied flags。 */
|
|
232
|
-
readonly flags: readonly string[];
|
|
233
|
-
}
|
|
234
|
-
|
|
235
290
|
/**
|
|
236
291
|
* Check callback 收到的 Product-owned execution context。
|
|
237
292
|
*
|
|
238
|
-
* @typeParam Options - 此 Check
|
|
293
|
+
* @typeParam Options - 此 Check preparation 后传给 execution 的 options shape。
|
|
239
294
|
*/
|
|
240
295
|
export interface CheckExecutionContext<Options extends object> {
|
|
241
296
|
/** 当前 Check 的 absolute invocation artifact directory;caller 未授予时为 `null`。 */
|
|
@@ -263,29 +318,30 @@ export interface CheckExecutionContext<Options extends object> {
|
|
|
263
318
|
export type CheckExecution<Options extends object = object> = (
|
|
264
319
|
this: void,
|
|
265
320
|
context: CheckExecutionContext<Options>
|
|
266
|
-
) =>
|
|
321
|
+
) => CheckExecutionResult;
|
|
267
322
|
|
|
268
323
|
/**
|
|
269
324
|
* 在 Check execution 前,可选地为本次 invocation 准备 options。
|
|
270
325
|
*
|
|
271
|
-
* @remarks `signal` 与同一次 callback execution 使用同一个 cancellation signal
|
|
272
|
-
*
|
|
273
|
-
* collection;Product 仍只会用该 Check 自己的 authored options 调用它。精确结果见
|
|
274
|
-
* {@link
|
|
326
|
+
* @remarks `signal` 与同一次 callback execution 使用同一个 cancellation signal;`project` 与 execution
|
|
327
|
+
* 收到同一个冻结 project context。实现应在可等待工作中协作退出,而不是留下悬挂 work。bivariant callback
|
|
328
|
+
* 保持具体 options Check 可进入普通递归 Check collection;Product 仍只会用该 Check 自己的 authored options 调用它。精确结果见
|
|
329
|
+
* {@link CheckPreparationResult}。
|
|
275
330
|
*/
|
|
276
|
-
export type
|
|
331
|
+
export type CheckPreparation<
|
|
277
332
|
AuthoredOptions extends object = object,
|
|
278
333
|
PreparedOptions extends object = AuthoredOptions
|
|
279
334
|
> = {
|
|
280
335
|
bivarianceHack(
|
|
281
336
|
this: void,
|
|
282
337
|
options: DeepReadonly<AuthoredOptions>,
|
|
283
|
-
signal: AbortSignal
|
|
284
|
-
|
|
338
|
+
signal: AbortSignal,
|
|
339
|
+
project?: CheckProjectContext
|
|
340
|
+
): CheckPreparationResult<PreparedOptions> | Promise<CheckPreparationResult<PreparedOptions>>;
|
|
285
341
|
}["bivarianceHack"];
|
|
286
342
|
|
|
287
343
|
/**
|
|
288
|
-
* Check-owned
|
|
344
|
+
* Check-owned preparation 的判别结果。
|
|
289
345
|
*
|
|
290
346
|
* `failure/block` 不允许 fallback,直接以 owning reason 结算为 unavailable;`failure/continue` 必须给出
|
|
291
347
|
* fallback 并继续 execution。两种进入 execution 的值都只属于本次 invocation,Product canonicalize/freeze
|
|
@@ -293,7 +349,7 @@ export type CheckPreflight<
|
|
|
293
349
|
* 是 Check-owned diagnostic identity,当前不会单独 materialize 为 outcome,调用方通过 messages 与后续
|
|
294
350
|
* outcome 观察结果;block 物理上不含 fallback 字段。
|
|
295
351
|
*/
|
|
296
|
-
export type
|
|
352
|
+
export type CheckPreparationResult<PreparedOptions extends object = object> = Readonly<
|
|
297
353
|
| {
|
|
298
354
|
readonly status: "success";
|
|
299
355
|
readonly preparedOptions: PreparedOptions;
|
|
@@ -318,10 +374,10 @@ export type CheckPreflightResult<PreparedOptions extends object = object> = Read
|
|
|
318
374
|
* 普通递归 Check authoring value 的共享字段。
|
|
319
375
|
*
|
|
320
376
|
* @typeParam AuthoredOptions - Definition 中的 declarative options shape。
|
|
321
|
-
* @typeParam PreparedOptions -
|
|
322
|
-
* @remarks 该值可以同时有 `
|
|
377
|
+
* @typeParam PreparedOptions - preparation 后 callback 接收的 invocation-local options shape。
|
|
378
|
+
* @remarks 该值可以同时有 `execute` 和 `checks`;只有 executable node 产生 final Check fact。
|
|
323
379
|
*/
|
|
324
|
-
interface CheckBase<AuthoredOptions extends object,
|
|
380
|
+
interface CheckBase<AuthoredOptions extends object, _PreparedOptions extends object> {
|
|
325
381
|
/** 在 Definition 内唯一的 stable Check ID。 */
|
|
326
382
|
readonly checkId: string;
|
|
327
383
|
/** 人读 progress 与 output 使用的非空名称。 */
|
|
@@ -330,11 +386,8 @@ interface CheckBase<AuthoredOptions extends object, PreparedOptions extends obje
|
|
|
330
386
|
readonly options?: AuthoredOptions;
|
|
331
387
|
/** 仅当多 flag presence predicate 匹配时启用 executable Check;省略时始终启用。 */
|
|
332
388
|
readonly enabledByFlags?: CheckFlagEnablement;
|
|
333
|
-
/**
|
|
334
|
-
|
|
335
|
-
this: void,
|
|
336
|
-
context: CheckExecutionContext<PreparedOptions>
|
|
337
|
-
): CheckResult | Promise<CheckResult>;
|
|
389
|
+
/** `true` declares an invocation-private handoff on this executable Check. */
|
|
390
|
+
readonly handoff?: true;
|
|
338
391
|
/** 继承 scheduling context 的 child Checks,不会单独形成 container result。 */
|
|
339
392
|
readonly checks?: readonly Check[];
|
|
340
393
|
/** 必须全部 `passed` 才能开始当前 Check author work 的直接 prerequisite Check IDs。 */
|
|
@@ -349,10 +402,24 @@ interface CheckBase<AuthoredOptions extends object, PreparedOptions extends obje
|
|
|
349
402
|
readonly mutex?: InheritableCheckCollection<string>;
|
|
350
403
|
/** 静态 named resource claims;省略时继承,显式 mapping 完整替换。 */
|
|
351
404
|
readonly resourceClaims?: CheckResourceClaims;
|
|
352
|
-
/** 已结算 Check 的人读可见性;可执行节点默认 `always`。 */
|
|
353
|
-
readonly visibility?: CheckVisibility;
|
|
354
405
|
}
|
|
355
406
|
|
|
407
|
+
interface ExecutableCheckFields<
|
|
408
|
+
PreparedOptions extends object,
|
|
409
|
+
ExecutionResult = CheckExecutionResult
|
|
410
|
+
> {
|
|
411
|
+
/** 可执行节点的 callback;拥有本字段的节点产生一个 terminal Check fact。 */
|
|
412
|
+
execute(this: void, context: CheckExecutionContext<PreparedOptions>): ExecutionResult;
|
|
413
|
+
/**
|
|
414
|
+
* `true` 时,progress renderer 不保留没有 accepted Record 或 message 的 passed row;运行中与所有保留的
|
|
415
|
+
* 终态 row 都无编号。该 policy 只属于 executable Check,不继承给 child Checks。
|
|
416
|
+
*/
|
|
417
|
+
readonly omitQuietPassedRow?: true;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/** Container 只承载 children 与 scheduling,不能执行或设置 executable presentation policy。 */
|
|
421
|
+
type ContainerCheckFields = Readonly<{ execute?: never; omitQuietPassedRow?: never }>;
|
|
422
|
+
|
|
356
423
|
/**
|
|
357
424
|
* 判断两个 options shape 是否互相可赋值;互相可赋值时 execution 不需要 preparation 转换。
|
|
358
425
|
*/
|
|
@@ -364,26 +431,33 @@ type HasSameOptionsShape<AuthoredOptions extends object, PreparedOptions extends
|
|
|
364
431
|
: false
|
|
365
432
|
: false;
|
|
366
433
|
|
|
367
|
-
/** Prepared shape 不同时,
|
|
368
|
-
type
|
|
434
|
+
/** Prepared shape 不同时,preparation 是建立安全转换的必填边界。 */
|
|
435
|
+
type CheckPreparationField<AuthoredOptions extends object, PreparedOptions extends object> =
|
|
369
436
|
HasSameOptionsShape<AuthoredOptions, PreparedOptions> extends true
|
|
370
|
-
? Readonly<{ readonly
|
|
371
|
-
: Readonly<{ readonly
|
|
437
|
+
? Readonly<{ readonly prepare?: CheckPreparation<AuthoredOptions, PreparedOptions> }>
|
|
438
|
+
: Readonly<{ readonly prepare: CheckPreparation<AuthoredOptions, PreparedOptions> }>;
|
|
372
439
|
|
|
373
440
|
/**
|
|
374
441
|
* Project Definition 中的普通递归 Check authoring value。
|
|
375
442
|
*
|
|
376
443
|
* @typeParam AuthoredOptions - Definition 中的 declarative options shape。
|
|
377
|
-
* @typeParam PreparedOptions -
|
|
444
|
+
* @typeParam PreparedOptions - preparation 后 callback 接收的 invocation-local options shape。
|
|
378
445
|
* @remarks Definition 只闭合 authored JSON options;每个 admitted Check 先在自身 Task lifecycle 内执行
|
|
379
|
-
*
|
|
446
|
+
* preparation,随后才执行 callback。`PreparedOptions` 与 `AuthoredOptions` 不同时必须提供 preparation;同形时可以
|
|
380
447
|
* 省略。它不进入 declarative fingerprint 或 machine output。
|
|
381
448
|
*/
|
|
382
449
|
export type Check<
|
|
383
450
|
AuthoredOptions extends object = object,
|
|
384
451
|
PreparedOptions extends object = AuthoredOptions
|
|
385
452
|
> = CheckBase<AuthoredOptions, PreparedOptions> &
|
|
386
|
-
|
|
453
|
+
CheckPreparationField<AuthoredOptions, PreparedOptions> &
|
|
454
|
+
(
|
|
455
|
+
| ExecutableCheckFields<
|
|
456
|
+
PreparedOptions,
|
|
457
|
+
CheckExecutionResult | CheckExecutionResult<Readonly<Record<never, never>>, object>
|
|
458
|
+
>
|
|
459
|
+
| ContainerCheckFields
|
|
460
|
+
);
|
|
387
461
|
|
|
388
462
|
export type EmptyCheckOptions = Readonly<Record<never, never>>;
|
|
389
463
|
|
|
@@ -408,17 +482,16 @@ type CheckAuthoringBase<
|
|
|
408
482
|
Id extends string,
|
|
409
483
|
AuthoredOptions extends object,
|
|
410
484
|
PreparedOptions extends object
|
|
411
|
-
> = Omit<CheckBase<AuthoredOptions, PreparedOptions>, "checkId" | "
|
|
412
|
-
|
|
485
|
+
> = Omit<CheckBase<AuthoredOptions, PreparedOptions>, "checkId" | "handoff" | "options"> &
|
|
486
|
+
CheckPreparationField<AuthoredOptions, PreparedOptions> &
|
|
413
487
|
Readonly<{ readonly checkId: Id }>;
|
|
414
488
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
}
|
|
489
|
+
/** Ordinary Check branches cannot declare typed-provider parsing or private handoff. */
|
|
490
|
+
type OrdinaryCheckRestrictions = HandoffForbidden & Readonly<{ parseData?: undefined }>;
|
|
491
|
+
|
|
492
|
+
type OrdinaryCheckFields<PreparedOptions extends object> =
|
|
493
|
+
| (ExecutableCheckFields<PreparedOptions> & OrdinaryCheckRestrictions)
|
|
494
|
+
| (ContainerCheckFields & OrdinaryCheckRestrictions);
|
|
422
495
|
|
|
423
496
|
export type CheckWithOptions<
|
|
424
497
|
Id extends string,
|
|
@@ -440,7 +513,13 @@ export type CheckWithoutOptions<Id extends string> = CheckAuthoringBase<
|
|
|
440
513
|
readonly options?: never;
|
|
441
514
|
}>;
|
|
442
515
|
|
|
443
|
-
interface TypedCheckFields<
|
|
516
|
+
interface TypedCheckFields<
|
|
517
|
+
PreparedOptions extends object,
|
|
518
|
+
Parser extends CheckDataParser
|
|
519
|
+
> extends ExecutableCheckFields<
|
|
520
|
+
PreparedOptions,
|
|
521
|
+
CheckExecutionResult<NoInfer<ReturnType<Parser>>>
|
|
522
|
+
> {
|
|
444
523
|
/**
|
|
445
524
|
* 将 canonical runtime data 还原为 provider data。
|
|
446
525
|
*
|
|
@@ -450,12 +529,63 @@ interface TypedCheckFields<PreparedOptions extends object, Parser extends CheckD
|
|
|
450
529
|
*/
|
|
451
530
|
readonly parseData: Parser;
|
|
452
531
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
532
|
+
readonly handoff?: never;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
interface HandoffCheckFields<
|
|
536
|
+
PreparedOptions extends object,
|
|
537
|
+
Handoff extends object
|
|
538
|
+
> extends ExecutableCheckFields<PreparedOptions, CheckExecutionResult<object, Handoff>> {
|
|
539
|
+
readonly handoff: true;
|
|
540
|
+
readonly parseData?: undefined;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
interface TypedHandoffCheckFields<
|
|
544
|
+
PreparedOptions extends object,
|
|
545
|
+
Parser extends CheckDataParser,
|
|
546
|
+
Handoff extends object
|
|
547
|
+
> extends ExecutableCheckFields<
|
|
548
|
+
PreparedOptions,
|
|
549
|
+
CheckExecutionResult<NoInfer<ReturnType<Parser>>, Handoff>
|
|
550
|
+
> {
|
|
551
|
+
readonly handoff: true;
|
|
552
|
+
readonly parseData: Parser;
|
|
457
553
|
}
|
|
458
554
|
|
|
555
|
+
/** Extracts the private reference type from an already-validated passed terminal result. */
|
|
556
|
+
type HandoffFromTerminalResult<Result> =
|
|
557
|
+
Extract<Awaited<Result>, { readonly status: "passed" }> extends {
|
|
558
|
+
readonly handoff: infer Handoff;
|
|
559
|
+
}
|
|
560
|
+
? Handoff extends object
|
|
561
|
+
? Handoff
|
|
562
|
+
: never
|
|
563
|
+
: never;
|
|
564
|
+
|
|
565
|
+
type PassedHandoffResult<Result> = Extract<Awaited<Result>, { readonly status: "passed" }>;
|
|
566
|
+
|
|
567
|
+
/** Every passed branch must accept the complete inferred handoff type, not just one union member. */
|
|
568
|
+
type PassedHandoffBranchIsConsistent<Passed, Handoff> = Passed extends {
|
|
569
|
+
readonly handoff: infer BranchHandoff;
|
|
570
|
+
}
|
|
571
|
+
? [Handoff] extends [BranchHandoff]
|
|
572
|
+
? true
|
|
573
|
+
: false
|
|
574
|
+
: false;
|
|
575
|
+
|
|
576
|
+
type HandoffTerminalResultConstraint<Result> =
|
|
577
|
+
false extends PassedHandoffBranchIsConsistent<
|
|
578
|
+
PassedHandoffResult<Result>,
|
|
579
|
+
HandoffFromTerminalResult<Result>
|
|
580
|
+
>
|
|
581
|
+
? never
|
|
582
|
+
: unknown;
|
|
583
|
+
|
|
584
|
+
type HandoffExecution<PreparedOptions extends object, FinalData extends object = object> = (
|
|
585
|
+
this: void,
|
|
586
|
+
context: CheckExecutionContext<PreparedOptions>
|
|
587
|
+
) => CheckExecutionResult<FinalData, object>;
|
|
588
|
+
|
|
459
589
|
export type TypedCheckWithOptions<
|
|
460
590
|
Id extends string,
|
|
461
591
|
AuthoredOptions extends object,
|
|
@@ -476,6 +606,40 @@ export type TypedCheckWithoutOptions<
|
|
|
476
606
|
readonly options?: never;
|
|
477
607
|
}>;
|
|
478
608
|
|
|
609
|
+
export type HandoffCheckWithOptions<
|
|
610
|
+
Id extends string,
|
|
611
|
+
AuthoredOptions extends object,
|
|
612
|
+
Handoff extends object,
|
|
613
|
+
PreparedOptions extends object = AuthoredOptions
|
|
614
|
+
> = CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> &
|
|
615
|
+
HandoffCheckFields<PreparedOptions, Handoff> &
|
|
616
|
+
Readonly<{ readonly options: AuthoredOptions }>;
|
|
617
|
+
|
|
618
|
+
export type HandoffCheckWithoutOptions<
|
|
619
|
+
Id extends string,
|
|
620
|
+
Handoff extends object
|
|
621
|
+
> = CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> &
|
|
622
|
+
HandoffCheckFields<EmptyCheckOptions, Handoff> &
|
|
623
|
+
Readonly<{ readonly options?: never }>;
|
|
624
|
+
|
|
625
|
+
export type TypedHandoffCheckWithOptions<
|
|
626
|
+
Id extends string,
|
|
627
|
+
AuthoredOptions extends object,
|
|
628
|
+
Parser extends CheckDataParser,
|
|
629
|
+
Handoff extends object,
|
|
630
|
+
PreparedOptions extends object = AuthoredOptions
|
|
631
|
+
> = CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> &
|
|
632
|
+
TypedHandoffCheckFields<PreparedOptions, Parser, Handoff> &
|
|
633
|
+
Readonly<{ readonly options: AuthoredOptions }>;
|
|
634
|
+
|
|
635
|
+
export type TypedHandoffCheckWithoutOptions<
|
|
636
|
+
Id extends string,
|
|
637
|
+
Parser extends CheckDataParser,
|
|
638
|
+
Handoff extends object
|
|
639
|
+
> = CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> &
|
|
640
|
+
TypedHandoffCheckFields<EmptyCheckOptions, Parser, Handoff> &
|
|
641
|
+
Readonly<{ readonly options?: never }>;
|
|
642
|
+
|
|
479
643
|
/**
|
|
480
644
|
* 定义一个 Check,同时保留 literal `checkId`、options 与 typed-provider parser 的 inference。
|
|
481
645
|
*
|
|
@@ -498,13 +662,13 @@ export type TypedCheckWithoutOptions<
|
|
|
498
662
|
* checkId: "license-policy",
|
|
499
663
|
* displayName: "License policy",
|
|
500
664
|
* options: { denied: ["GPL-3.0-only"] },
|
|
501
|
-
*
|
|
665
|
+
* prepare(options) {
|
|
502
666
|
* return hasValidLicensePolicyOptions(options)
|
|
503
667
|
* ? { status: "success", preparedOptions: options }
|
|
504
668
|
* : { status: "failure", action: "block", reason: { code: "invalid-options" } };
|
|
505
669
|
* },
|
|
506
|
-
*
|
|
507
|
-
*
|
|
670
|
+
* omitQuietPassedRow: true,
|
|
671
|
+
* execute({ options, records, signal }) {
|
|
508
672
|
* if (signal.aborted) return { status: "unavailable", reason: { code: "cancelled" } };
|
|
509
673
|
*
|
|
510
674
|
* const deniedCount = options.denied.length;
|
|
@@ -521,6 +685,79 @@ export type TypedCheckWithoutOptions<
|
|
|
521
685
|
* });
|
|
522
686
|
* ```
|
|
523
687
|
*/
|
|
688
|
+
export function defineCheck<
|
|
689
|
+
const Id extends string,
|
|
690
|
+
AuthoredOptions extends object,
|
|
691
|
+
const Execution extends HandoffExecution<PreparedOptions>,
|
|
692
|
+
PreparedOptions extends object = AuthoredOptions
|
|
693
|
+
>(
|
|
694
|
+
value: CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> &
|
|
695
|
+
Readonly<{
|
|
696
|
+
readonly handoff: true;
|
|
697
|
+
readonly options: AuthoredOptions;
|
|
698
|
+
readonly parseData?: undefined;
|
|
699
|
+
readonly execute: Execution;
|
|
700
|
+
}> &
|
|
701
|
+
HandoffTerminalResultConstraint<ReturnType<Execution>>
|
|
702
|
+
): HandoffCheckWithOptions<
|
|
703
|
+
Id,
|
|
704
|
+
AuthoredOptions,
|
|
705
|
+
HandoffFromTerminalResult<ReturnType<Execution>>,
|
|
706
|
+
PreparedOptions
|
|
707
|
+
> &
|
|
708
|
+
CheckHandoffProvider<Id, HandoffFromTerminalResult<ReturnType<Execution>>>;
|
|
709
|
+
export function defineCheck<
|
|
710
|
+
const Id extends string,
|
|
711
|
+
const Execution extends HandoffExecution<EmptyCheckOptions>
|
|
712
|
+
>(
|
|
713
|
+
value: CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> &
|
|
714
|
+
Readonly<{
|
|
715
|
+
readonly handoff: true;
|
|
716
|
+
readonly options?: never;
|
|
717
|
+
readonly parseData?: undefined;
|
|
718
|
+
readonly execute: Execution;
|
|
719
|
+
}> &
|
|
720
|
+
HandoffTerminalResultConstraint<ReturnType<Execution>>
|
|
721
|
+
): HandoffCheckWithoutOptions<Id, HandoffFromTerminalResult<ReturnType<Execution>>> &
|
|
722
|
+
CheckHandoffProvider<Id, HandoffFromTerminalResult<ReturnType<Execution>>>;
|
|
723
|
+
export function defineCheck<
|
|
724
|
+
const Id extends string,
|
|
725
|
+
AuthoredOptions extends object,
|
|
726
|
+
const Parser extends CheckDataParser,
|
|
727
|
+
const Execution extends HandoffExecution<PreparedOptions, NoInfer<ReturnType<Parser>>>,
|
|
728
|
+
PreparedOptions extends object = AuthoredOptions
|
|
729
|
+
>(
|
|
730
|
+
value: CheckAuthoringBase<Id, AuthoredOptions, PreparedOptions> &
|
|
731
|
+
Readonly<{
|
|
732
|
+
readonly handoff: true;
|
|
733
|
+
readonly options: AuthoredOptions;
|
|
734
|
+
readonly parseData: Parser;
|
|
735
|
+
readonly execute: Execution;
|
|
736
|
+
}> &
|
|
737
|
+
HandoffTerminalResultConstraint<ReturnType<Execution>>
|
|
738
|
+
): TypedHandoffCheckWithOptions<
|
|
739
|
+
Id,
|
|
740
|
+
AuthoredOptions,
|
|
741
|
+
Parser,
|
|
742
|
+
HandoffFromTerminalResult<ReturnType<Execution>>,
|
|
743
|
+
PreparedOptions
|
|
744
|
+
> &
|
|
745
|
+
CheckHandoffProvider<Id, HandoffFromTerminalResult<ReturnType<Execution>>>;
|
|
746
|
+
export function defineCheck<
|
|
747
|
+
const Id extends string,
|
|
748
|
+
const Parser extends CheckDataParser,
|
|
749
|
+
const Execution extends HandoffExecution<EmptyCheckOptions, NoInfer<ReturnType<Parser>>>
|
|
750
|
+
>(
|
|
751
|
+
value: CheckAuthoringBase<Id, EmptyCheckOptions, EmptyCheckOptions> &
|
|
752
|
+
Readonly<{
|
|
753
|
+
readonly handoff: true;
|
|
754
|
+
readonly options?: never;
|
|
755
|
+
readonly parseData: Parser;
|
|
756
|
+
readonly execute: Execution;
|
|
757
|
+
}> &
|
|
758
|
+
HandoffTerminalResultConstraint<ReturnType<Execution>>
|
|
759
|
+
): TypedHandoffCheckWithoutOptions<Id, Parser, HandoffFromTerminalResult<ReturnType<Execution>>> &
|
|
760
|
+
CheckHandoffProvider<Id, HandoffFromTerminalResult<ReturnType<Execution>>>;
|
|
524
761
|
export function defineCheck<
|
|
525
762
|
const Id extends string,
|
|
526
763
|
AuthoredOptions extends object,
|
|
@@ -543,5 +780,8 @@ export function defineCheck<const Id extends string, const Parser extends CheckD
|
|
|
543
780
|
value: TypedCheckWithoutOptions<Id, Parser>
|
|
544
781
|
): TypedCheckWithoutOptions<Id, Parser>;
|
|
545
782
|
export function defineCheck(value: Check): Check {
|
|
783
|
+
if (value.handoff === true) {
|
|
784
|
+
registerHandoffProviderIdentity(value);
|
|
785
|
+
}
|
|
546
786
|
return value;
|
|
547
787
|
}
|