@zxyycom/vibe-check 0.0.1
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/LICENSE +21 -0
- package/README.md +154 -0
- package/dist/esm/check/check.mjs +5 -0
- package/dist/esm/check/check.mjs.map +1 -0
- package/dist/esm/check/descriptor-validation.mjs +37 -0
- package/dist/esm/check/descriptor-validation.mjs.map +1 -0
- package/dist/esm/check/descriptor.mjs +2 -0
- package/dist/esm/check/descriptor.mjs.map +1 -0
- package/dist/esm/check/inherited-collection.mjs +62 -0
- package/dist/esm/check/inherited-collection.mjs.map +1 -0
- package/dist/esm/check/options-snapshot.mjs +75 -0
- package/dist/esm/check/options-snapshot.mjs.map +1 -0
- package/dist/esm/check-settlement/fact-validation.mjs +216 -0
- package/dist/esm/check-settlement/fact-validation.mjs.map +1 -0
- package/dist/esm/check-settlement/facts.mjs +2 -0
- package/dist/esm/check-settlement/facts.mjs.map +1 -0
- package/dist/esm/check-settlement/outcome-normalization.mjs +80 -0
- package/dist/esm/check-settlement/outcome-normalization.mjs.map +1 -0
- package/dist/esm/check-settlement/record-store.mjs +59 -0
- package/dist/esm/check-settlement/record-store.mjs.map +1 -0
- package/dist/esm/check-settlement/session.mjs +179 -0
- package/dist/esm/check-settlement/session.mjs.map +1 -0
- package/dist/esm/data-boundary/canonical-data.mjs +159 -0
- package/dist/esm/data-boundary/canonical-data.mjs.map +1 -0
- package/dist/esm/data-boundary/canonical-json.mjs +2 -0
- package/dist/esm/data-boundary/canonical-json.mjs.map +1 -0
- package/dist/esm/data-boundary/closed-values.mjs +98 -0
- package/dist/esm/data-boundary/closed-values.mjs.map +1 -0
- package/dist/esm/data-boundary/value-shapes.mjs +13 -0
- package/dist/esm/data-boundary/value-shapes.mjs.map +1 -0
- package/dist/esm/finding-waivers/reconciliation.mjs +84 -0
- package/dist/esm/finding-waivers/reconciliation.mjs.map +1 -0
- package/dist/esm/index.mjs +26 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/machine-output/v4/atomic-publication.mjs +102 -0
- package/dist/esm/machine-output/v4/atomic-publication.mjs.map +1 -0
- package/dist/esm/machine-output/v4/freeze-publication-value.mjs +14 -0
- package/dist/esm/machine-output/v4/freeze-publication-value.mjs.map +1 -0
- package/dist/esm/machine-output/v4/projection.mjs +23 -0
- package/dist/esm/machine-output/v4/projection.mjs.map +1 -0
- package/dist/esm/machine-output/v4/publication-invariants.mjs +59 -0
- package/dist/esm/machine-output/v4/publication-invariants.mjs.map +1 -0
- package/dist/esm/machine-output/v4/publication-model.mjs +19 -0
- package/dist/esm/machine-output/v4/publication-model.mjs.map +1 -0
- package/dist/esm/machine-output/v4/publish.mjs +20 -0
- package/dist/esm/machine-output/v4/publish.mjs.map +1 -0
- package/dist/esm/machine-output/v4/records-fingerprint.mjs +9 -0
- package/dist/esm/machine-output/v4/records-fingerprint.mjs.map +1 -0
- package/dist/esm/machine-output/v4/schema-identities.mjs +8 -0
- package/dist/esm/machine-output/v4/schema-identities.mjs.map +1 -0
- package/dist/esm/machine-output/v4/schema.mjs +50 -0
- package/dist/esm/machine-output/v4/schema.mjs.map +1 -0
- package/dist/esm/machine-output/v4/serializers.mjs +9 -0
- package/dist/esm/machine-output/v4/serializers.mjs.map +1 -0
- package/dist/esm/machine-output/v4/validation-result.mjs +16 -0
- package/dist/esm/machine-output/v4/validation-result.mjs.map +1 -0
- package/dist/esm/machine-output/v4/validation.mjs +131 -0
- package/dist/esm/machine-output/v4/validation.mjs.map +1 -0
- package/dist/esm/package-checks/code-quality-findings/policy.mjs +49 -0
- package/dist/esm/package-checks/code-quality-findings/policy.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/area-policy.mjs +71 -0
- package/dist/esm/package-checks/duplicate-detection/area-policy.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/cache-contract.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/cache/cache-contract.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/identity.mjs +37 -0
- package/dist/esm/package-checks/duplicate-detection/cache/identity.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/key.mjs +38 -0
- package/dist/esm/package-checks/duplicate-detection/cache/key.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/payload.mjs +47 -0
- package/dist/esm/package-checks/duplicate-detection/cache/payload.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/store.mjs +44 -0
- package/dist/esm/package-checks/duplicate-detection/cache/store.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs +39 -0
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/execution.mjs +124 -0
- package/dist/esm/package-checks/duplicate-detection/execution.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/final-data.mjs +6 -0
- package/dist/esm/package-checks/duplicate-detection/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs +77 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-path.mjs +6 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-path.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-resolution.mjs +87 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/json-report.mjs +94 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/json-report.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner-contract.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner-contract.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner.mjs +180 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scoped-fragments.mjs +10 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scoped-fragments.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/measurement-model.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/measurement-model.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/measurement.mjs +151 -0
- package/dist/esm/package-checks/duplicate-detection/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/options-resolution.mjs +126 -0
- package/dist/esm/package-checks/duplicate-detection/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/options-validation.mjs +60 -0
- package/dist/esm/package-checks/duplicate-detection/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/options.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/options.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/project-revision.mjs +5 -0
- package/dist/esm/package-checks/duplicate-detection/project-revision.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/records.mjs +119 -0
- package/dist/esm/package-checks/duplicate-detection/records.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/constructor.mjs +39 -0
- package/dist/esm/package-checks/file-metrics/constructor.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/execution.mjs +170 -0
- package/dist/esm/package-checks/file-metrics/execution.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/final-data.mjs +6 -0
- package/dist/esm/package-checks/file-metrics/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/measurement-model.mjs +2 -0
- package/dist/esm/package-checks/file-metrics/measurement-model.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/measurement.mjs +33 -0
- package/dist/esm/package-checks/file-metrics/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/options-resolution.mjs +171 -0
- package/dist/esm/package-checks/file-metrics/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/options-validation.mjs +82 -0
- package/dist/esm/package-checks/file-metrics/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/options.mjs +2 -0
- package/dist/esm/package-checks/file-metrics/options.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/records.mjs +109 -0
- package/dist/esm/package-checks/file-metrics/records.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs +59 -0
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/csv.mjs +17 -0
- package/dist/esm/package-checks/file-metrics/scc/csv.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/parser.mjs +145 -0
- package/dist/esm/package-checks/file-metrics/scc/parser.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs +54 -0
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs.map +1 -0
- package/dist/esm/package-checks/final-data-parsing.mjs +35 -0
- package/dist/esm/package-checks/final-data-parsing.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analysis.mjs +96 -0
- package/dist/esm/package-checks/function-metrics/analysis.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/constructor.mjs +43 -0
- package/dist/esm/package-checks/function-metrics/constructor.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/execution.mjs +178 -0
- package/dist/esm/package-checks/function-metrics/execution.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/final-data.mjs +6 -0
- package/dist/esm/package-checks/function-metrics/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/availability.mjs +64 -0
- package/dist/esm/package-checks/function-metrics/lizard/availability.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/csv.mjs +17 -0
- package/dist/esm/package-checks/function-metrics/lizard/csv.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/parser.mjs +138 -0
- package/dist/esm/package-checks/function-metrics/lizard/parser.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/scanner.mjs +35 -0
- package/dist/esm/package-checks/function-metrics/lizard/scanner.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/measurement-model.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/measurement-model.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/measurement.mjs +35 -0
- package/dist/esm/package-checks/function-metrics/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/options-resolution.mjs +171 -0
- package/dist/esm/package-checks/function-metrics/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/options-validation.mjs +71 -0
- package/dist/esm/package-checks/function-metrics/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/options.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/options.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/records.mjs +133 -0
- package/dist/esm/package-checks/function-metrics/records.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/target-files.mjs +75 -0
- package/dist/esm/package-checks/function-metrics/target-files.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/error-message.mjs +4 -0
- package/dist/esm/package-checks/host-environment/error-message.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/filesystem.mjs +81 -0
- package/dist/esm/package-checks/host-environment/filesystem.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/git.mjs +51 -0
- package/dist/esm/package-checks/host-environment/git.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/path.mjs +18 -0
- package/dist/esm/package-checks/host-environment/path.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/command.mjs +13 -0
- package/dist/esm/package-checks/host-environment/process/command.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/contract.mjs +2 -0
- package/dist/esm/package-checks/host-environment/process/contract.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/env.mjs +19 -0
- package/dist/esm/package-checks/host-environment/process/env.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/failure.mjs +34 -0
- package/dist/esm/package-checks/host-environment/process/failure.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/result.mjs +33 -0
- package/dist/esm/package-checks/host-environment/process/result.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/runner.mjs +30 -0
- package/dist/esm/package-checks/host-environment/process/runner.mjs.map +1 -0
- package/dist/esm/package-checks/json-document/strict-document.mjs +163 -0
- package/dist/esm/package-checks/json-document/strict-document.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs +39 -0
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/execution-stages.mjs +141 -0
- package/dist/esm/package-checks/json-schema-validation/execution-stages.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/final-data.mjs +64 -0
- package/dist/esm/package-checks/json-schema-validation/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/issue-collector.mjs +35 -0
- package/dist/esm/package-checks/json-schema-validation/issue-collector.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/json-schema-validation.mjs +118 -0
- package/dist/esm/package-checks/json-schema-validation/json-schema-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/options-resolution.mjs +45 -0
- package/dist/esm/package-checks/json-schema-validation/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/options-validation.mjs +212 -0
- package/dist/esm/package-checks/json-schema-validation/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/options.mjs +2 -0
- package/dist/esm/package-checks/json-schema-validation/options.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs +128 -0
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/remote-response.mjs +71 -0
- package/dist/esm/package-checks/json-schema-validation/remote-response.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/schema-engine.mjs +190 -0
- package/dist/esm/package-checks/json-schema-validation/schema-engine.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs +234 -0
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/default-check.mjs +39 -0
- package/dist/esm/package-checks/json-validation/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/final-data.mjs +27 -0
- package/dist/esm/package-checks/json-validation/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/json-validation.mjs +138 -0
- package/dist/esm/package-checks/json-validation/json-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/options-resolution.mjs +33 -0
- package/dist/esm/package-checks/json-validation/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/options-validation.mjs +16 -0
- package/dist/esm/package-checks/json-validation/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/options.mjs +2 -0
- package/dist/esm/package-checks/json-validation/options.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/assessment-results.mjs +73 -0
- package/dist/esm/package-checks/maintenance-reminders/assessment-results.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/final-data.mjs +153 -0
- package/dist/esm/package-checks/maintenance-reminders/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs +155 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs +58 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/measurement.mjs +125 -0
- package/dist/esm/package-checks/maintenance-reminders/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/options-validation.mjs +72 -0
- package/dist/esm/package-checks/maintenance-reminders/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs +55 -0
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs +199 -0
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/filesystem-probes.mjs +109 -0
- package/dist/esm/package-checks/markdown-link-validation/filesystem-probes.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/final-data.mjs +28 -0
- package/dist/esm/package-checks/markdown-link-validation/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolution.mjs +158 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolver.mjs +17 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolver.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs +191 -0
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs +83 -0
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs +50 -0
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/options.mjs +2 -0
- package/dist/esm/package-checks/markdown-link-validation/options.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/records.mjs +32 -0
- package/dist/esm/package-checks/markdown-link-validation/records.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/resolver-engine.mjs +196 -0
- package/dist/esm/package-checks/markdown-link-validation/resolver-engine.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/target-descriptor.mjs +23 -0
- package/dist/esm/package-checks/markdown-link-validation/target-descriptor.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/traversal-result.mjs +41 -0
- package/dist/esm/package-checks/markdown-link-validation/traversal-result.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/collection.mjs +142 -0
- package/dist/esm/package-checks/project-files/collection.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/config-glob.mjs +11 -0
- package/dist/esm/package-checks/project-files/config-glob.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/configuration.mjs +104 -0
- package/dist/esm/package-checks/project-files/configuration.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/exact-input-measurement.mjs +24 -0
- package/dist/esm/package-checks/project-files/exact-input-measurement.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/file-fingerprint.mjs +36 -0
- package/dist/esm/package-checks/project-files/file-fingerprint.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs +57 -0
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs +72 -0
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/input-eligibility.mjs +13 -0
- package/dist/esm/package-checks/project-files/input-eligibility.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/reported-path.mjs +30 -0
- package/dist/esm/package-checks/project-files/reported-path.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/revision-paths.mjs +19 -0
- package/dist/esm/package-checks/project-files/revision-paths.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs +102 -0
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs +242 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs +50 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/resolution.mjs +60 -0
- package/dist/esm/project-definition/check-tree/resolution.mjs.map +1 -0
- package/dist/esm/project-definition/output-defaults.mjs +7 -0
- package/dist/esm/project-definition/output-defaults.mjs.map +1 -0
- package/dist/esm/project-definition/output-validation.mjs +44 -0
- package/dist/esm/project-definition/output-validation.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition-validation.mjs +95 -0
- package/dist/esm/project-definition/project-definition-validation.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition.mjs +92 -0
- package/dist/esm/project-definition/project-definition.mjs.map +1 -0
- package/dist/esm/project-run/aggregation.mjs +66 -0
- package/dist/esm/project-run/aggregation.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/callback.mjs +70 -0
- package/dist/esm/project-run/check-execution/callback.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/dependencies.mjs +50 -0
- package/dist/esm/project-run/check-execution/dependencies.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/execution-finalization.mjs +103 -0
- package/dist/esm/project-run/check-execution/execution-finalization.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/execution-settlement.mjs +90 -0
- package/dist/esm/project-run/check-execution/execution-settlement.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/messages.mjs +38 -0
- package/dist/esm/project-run/check-execution/messages.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/plan.mjs +35 -0
- package/dist/esm/project-run/check-execution/plan.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/preflight-result.mjs +83 -0
- package/dist/esm/project-run/check-execution/preflight-result.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/preflight.mjs +186 -0
- package/dist/esm/project-run/check-execution/preflight.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/resolved-checks.mjs +168 -0
- package/dist/esm/project-run/check-execution/resolved-checks.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/terminal-result.mjs +49 -0
- package/dist/esm/project-run/check-execution/terminal-result.mjs.map +1 -0
- package/dist/esm/project-run/completion.mjs +173 -0
- package/dist/esm/project-run/completion.mjs.map +1 -0
- package/dist/esm/project-run/controls/contract.mjs +2 -0
- package/dist/esm/project-run/controls/contract.mjs.map +1 -0
- package/dist/esm/project-run/controls/outputs-override-validation.mjs +61 -0
- package/dist/esm/project-run/controls/outputs-override-validation.mjs.map +1 -0
- package/dist/esm/project-run/controls/validation-result.mjs +2 -0
- package/dist/esm/project-run/controls/validation-result.mjs.map +1 -0
- package/dist/esm/project-run/controls/validation.mjs +156 -0
- package/dist/esm/project-run/controls/validation.mjs.map +1 -0
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs +182 -0
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs.map +1 -0
- package/dist/esm/project-run/diagnostic-logging/logger.mjs +242 -0
- package/dist/esm/project-run/diagnostic-logging/logger.mjs.map +1 -0
- package/dist/esm/project-run/invocation-creation.mjs +111 -0
- package/dist/esm/project-run/invocation-creation.mjs.map +1 -0
- package/dist/esm/project-run/invocation.mjs +195 -0
- package/dist/esm/project-run/invocation.mjs.map +1 -0
- package/dist/esm/project-run/machine-publication.mjs +16 -0
- package/dist/esm/project-run/machine-publication.mjs.map +1 -0
- package/dist/esm/project-run/output-configuration.mjs +17 -0
- package/dist/esm/project-run/output-configuration.mjs.map +1 -0
- package/dist/esm/project-run/output-status.mjs +43 -0
- package/dist/esm/project-run/output-status.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/presentation.mjs +135 -0
- package/dist/esm/project-run/progress-rendering/presentation.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs +100 -0
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs +123 -0
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/renderer.mjs +12 -0
- package/dist/esm/project-run/progress-rendering/renderer.mjs.map +1 -0
- package/dist/esm/project-run/project-context.mjs +8 -0
- package/dist/esm/project-run/project-context.mjs.map +1 -0
- package/dist/esm/project-run/result.mjs +54 -0
- package/dist/esm/project-run/result.mjs.map +1 -0
- package/dist/esm/project-run/run.mjs +23 -0
- package/dist/esm/project-run/run.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/execution-state.mjs +66 -0
- package/dist/esm/project-run/task-scheduler/execution-state.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/graph-validation.mjs +119 -0
- package/dist/esm/project-run/task-scheduler/graph-validation.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/graph.mjs +116 -0
- package/dist/esm/project-run/task-scheduler/graph.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-admission-decision.mjs +82 -0
- package/dist/esm/project-run/task-scheduler/scheduler-admission-decision.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-blocker-summary.mjs +27 -0
- package/dist/esm/project-run/task-scheduler/scheduler-blocker-summary.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-inspection.mjs +125 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-inspection.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-model.mjs +45 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-model.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision.mjs +74 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler.mjs +147 -0
- package/dist/esm/project-run/task-scheduler/scheduler.mjs.map +1 -0
- package/docs/api-mechanics.md +205 -0
- package/docs/checks/duplicate-detection.md +195 -0
- package/docs/checks/file-metrics.md +229 -0
- package/docs/checks/function-metrics.md +222 -0
- package/docs/checks/json-schema-validation.md +190 -0
- package/docs/checks/json-validation.md +133 -0
- package/docs/checks/maintenance-reminders.md +158 -0
- package/docs/checks/markdown-link-validation.md +192 -0
- package/docs/examples/artifacts/mixed-outcomes/definition.ts +195 -0
- package/docs/examples/artifacts/mixed-outcomes/records.ndjson +2 -0
- package/docs/examples/artifacts/mixed-outcomes/run.json +70 -0
- package/docs/output.md +97 -0
- package/docs/schemas/vibe-check-record.schema.json +33 -0
- package/docs/schemas/vibe-check-run.schema.json +173 -0
- package/index.mjs +1 -0
- package/package.json +49 -0
- package/src/check/check.ts +497 -0
- package/src/check/descriptor-validation.ts +60 -0
- package/src/check/descriptor.ts +5 -0
- package/src/check/inherited-collection.ts +101 -0
- package/src/check/options-snapshot.ts +80 -0
- package/src/check-settlement/fact-validation.ts +289 -0
- package/src/check-settlement/facts.ts +27 -0
- package/src/check-settlement/outcome-normalization.ts +118 -0
- package/src/check-settlement/record-store.ts +73 -0
- package/src/check-settlement/session.ts +257 -0
- package/src/data-boundary/canonical-data.ts +188 -0
- package/src/data-boundary/canonical-json.ts +11 -0
- package/src/data-boundary/closed-values.ts +126 -0
- package/src/data-boundary/value-shapes.ts +15 -0
- package/src/finding-waivers/reconciliation.ts +176 -0
- package/src/index.ts +123 -0
- package/src/machine-output/v4/atomic-publication.ts +123 -0
- package/src/machine-output/v4/freeze-publication-value.ts +12 -0
- package/src/machine-output/v4/projection.ts +36 -0
- package/src/machine-output/v4/publication-invariants.ts +89 -0
- package/src/machine-output/v4/publication-model.ts +38 -0
- package/src/machine-output/v4/publish.ts +23 -0
- package/src/machine-output/v4/records-fingerprint.ts +12 -0
- package/src/machine-output/v4/schema-identities.ts +8 -0
- package/src/machine-output/v4/schema.ts +97 -0
- package/src/machine-output/v4/serializers.ts +18 -0
- package/src/machine-output/v4/validation-result.ts +59 -0
- package/src/machine-output/v4/validation.ts +166 -0
- package/src/package-checks/code-quality-findings/policy.ts +85 -0
- package/src/package-checks/duplicate-detection/area-policy.ts +103 -0
- package/src/package-checks/duplicate-detection/cache/cache-contract.ts +49 -0
- package/src/package-checks/duplicate-detection/cache/identity.ts +61 -0
- package/src/package-checks/duplicate-detection/cache/key.ts +46 -0
- package/src/package-checks/duplicate-detection/cache/payload.ts +78 -0
- package/src/package-checks/duplicate-detection/cache/store.ts +77 -0
- package/src/package-checks/duplicate-detection/default-check.ts +50 -0
- package/src/package-checks/duplicate-detection/execution.ts +168 -0
- package/src/package-checks/duplicate-detection/final-data.ts +10 -0
- package/src/package-checks/duplicate-detection/jscpd/availability.ts +137 -0
- package/src/package-checks/duplicate-detection/jscpd/command-path.ts +8 -0
- package/src/package-checks/duplicate-detection/jscpd/command-resolution.ts +112 -0
- package/src/package-checks/duplicate-detection/jscpd/json-report.ts +137 -0
- package/src/package-checks/duplicate-detection/jscpd/scanner-contract.ts +18 -0
- package/src/package-checks/duplicate-detection/jscpd/scanner.ts +257 -0
- package/src/package-checks/duplicate-detection/jscpd/scoped-fragments.ts +17 -0
- package/src/package-checks/duplicate-detection/measurement-model.ts +44 -0
- package/src/package-checks/duplicate-detection/measurement.ts +223 -0
- package/src/package-checks/duplicate-detection/options-resolution.ts +162 -0
- package/src/package-checks/duplicate-detection/options-validation.ts +75 -0
- package/src/package-checks/duplicate-detection/options.ts +72 -0
- package/src/package-checks/duplicate-detection/project-revision.ts +5 -0
- package/src/package-checks/duplicate-detection/records.ts +171 -0
- package/src/package-checks/file-metrics/constructor.ts +46 -0
- package/src/package-checks/file-metrics/execution.ts +233 -0
- package/src/package-checks/file-metrics/final-data.ts +10 -0
- package/src/package-checks/file-metrics/measurement-model.ts +10 -0
- package/src/package-checks/file-metrics/measurement.ts +52 -0
- package/src/package-checks/file-metrics/options-resolution.ts +213 -0
- package/src/package-checks/file-metrics/options-validation.ts +104 -0
- package/src/package-checks/file-metrics/options.ts +91 -0
- package/src/package-checks/file-metrics/records.ts +182 -0
- package/src/package-checks/file-metrics/scc/availability.ts +100 -0
- package/src/package-checks/file-metrics/scc/csv.ts +20 -0
- package/src/package-checks/file-metrics/scc/parser.ts +223 -0
- package/src/package-checks/file-metrics/scc/scanner.ts +68 -0
- package/src/package-checks/final-data-parsing.ts +49 -0
- package/src/package-checks/function-metrics/analysis.ts +138 -0
- package/src/package-checks/function-metrics/constructor.ts +55 -0
- package/src/package-checks/function-metrics/execution.ts +263 -0
- package/src/package-checks/function-metrics/final-data.ts +10 -0
- package/src/package-checks/function-metrics/lizard/availability.ts +90 -0
- package/src/package-checks/function-metrics/lizard/csv.ts +20 -0
- package/src/package-checks/function-metrics/lizard/parser.ts +179 -0
- package/src/package-checks/function-metrics/lizard/scanner.ts +62 -0
- package/src/package-checks/function-metrics/measurement-model.ts +30 -0
- package/src/package-checks/function-metrics/measurement.ts +57 -0
- package/src/package-checks/function-metrics/options-resolution.ts +215 -0
- package/src/package-checks/function-metrics/options-validation.ts +89 -0
- package/src/package-checks/function-metrics/options.ts +84 -0
- package/src/package-checks/function-metrics/records.ts +254 -0
- package/src/package-checks/function-metrics/target-files.ts +85 -0
- package/src/package-checks/host-environment/error-message.ts +3 -0
- package/src/package-checks/host-environment/filesystem.ts +110 -0
- package/src/package-checks/host-environment/git.ts +68 -0
- package/src/package-checks/host-environment/path.ts +20 -0
- package/src/package-checks/host-environment/process/command.ts +21 -0
- package/src/package-checks/host-environment/process/contract.ts +56 -0
- package/src/package-checks/host-environment/process/env.ts +25 -0
- package/src/package-checks/host-environment/process/failure.ts +40 -0
- package/src/package-checks/host-environment/process/result.ts +39 -0
- package/src/package-checks/host-environment/process/runner.ts +47 -0
- package/src/package-checks/json-document/strict-document.ts +209 -0
- package/src/package-checks/json-schema-validation/default-check.ts +54 -0
- package/src/package-checks/json-schema-validation/execution-stages.ts +230 -0
- package/src/package-checks/json-schema-validation/final-data.ts +115 -0
- package/src/package-checks/json-schema-validation/issue-collector.ts +43 -0
- package/src/package-checks/json-schema-validation/json-schema-validation.ts +191 -0
- package/src/package-checks/json-schema-validation/options-resolution.ts +61 -0
- package/src/package-checks/json-schema-validation/options-validation.ts +256 -0
- package/src/package-checks/json-schema-validation/options.ts +66 -0
- package/src/package-checks/json-schema-validation/reference-resolver.ts +165 -0
- package/src/package-checks/json-schema-validation/remote-response.ts +84 -0
- package/src/package-checks/json-schema-validation/schema-engine.ts +263 -0
- package/src/package-checks/json-schema-validation/schema-policy.ts +275 -0
- package/src/package-checks/json-validation/default-check.ts +48 -0
- package/src/package-checks/json-validation/final-data.ts +46 -0
- package/src/package-checks/json-validation/json-validation.ts +212 -0
- package/src/package-checks/json-validation/options-resolution.ts +50 -0
- package/src/package-checks/json-validation/options-validation.ts +27 -0
- package/src/package-checks/json-validation/options.ts +18 -0
- package/src/package-checks/maintenance-reminders/assessment-results.ts +117 -0
- package/src/package-checks/maintenance-reminders/final-data.ts +239 -0
- package/src/package-checks/maintenance-reminders/maintenance-reminders.ts +264 -0
- package/src/package-checks/maintenance-reminders/maintenance-support.ts +67 -0
- package/src/package-checks/maintenance-reminders/measurement.ts +183 -0
- package/src/package-checks/maintenance-reminders/options-validation.ts +88 -0
- package/src/package-checks/markdown-link-validation/default-check.ts +70 -0
- package/src/package-checks/markdown-link-validation/execution.ts +325 -0
- package/src/package-checks/markdown-link-validation/filesystem-probes.ts +127 -0
- package/src/package-checks/markdown-link-validation/final-data.ts +47 -0
- package/src/package-checks/markdown-link-validation/local-resolution.ts +306 -0
- package/src/package-checks/markdown-link-validation/local-resolver.ts +51 -0
- package/src/package-checks/markdown-link-validation/markdown-parser.ts +302 -0
- package/src/package-checks/markdown-link-validation/options-resolution.ts +114 -0
- package/src/package-checks/markdown-link-validation/options-validation.ts +72 -0
- package/src/package-checks/markdown-link-validation/options.ts +50 -0
- package/src/package-checks/markdown-link-validation/records.ts +77 -0
- package/src/package-checks/markdown-link-validation/resolver-engine.ts +276 -0
- package/src/package-checks/markdown-link-validation/target-descriptor.ts +34 -0
- package/src/package-checks/markdown-link-validation/traversal-result.ts +58 -0
- package/src/package-checks/project-files/collection.ts +199 -0
- package/src/package-checks/project-files/config-glob.ts +17 -0
- package/src/package-checks/project-files/configuration.ts +152 -0
- package/src/package-checks/project-files/exact-input-measurement.ts +38 -0
- package/src/package-checks/project-files/file-fingerprint.ts +46 -0
- package/src/package-checks/project-files/gitlink-revision.ts +82 -0
- package/src/package-checks/project-files/gitlink-worktree.ts +106 -0
- package/src/package-checks/project-files/input-eligibility.ts +21 -0
- package/src/package-checks/project-files/reported-path.ts +35 -0
- package/src/package-checks/project-files/revision-paths.ts +34 -0
- package/src/package-checks/project-files/revision-worktree-files.ts +148 -0
- package/src/project-definition/check-tree/authoring.ts +332 -0
- package/src/project-definition/check-tree/materialization.ts +56 -0
- package/src/project-definition/check-tree/resolution.ts +108 -0
- package/src/project-definition/output-defaults.ts +6 -0
- package/src/project-definition/output-validation.ts +54 -0
- package/src/project-definition/project-definition-validation.ts +123 -0
- package/src/project-definition/project-definition.ts +184 -0
- package/src/project-run/aggregation.ts +90 -0
- package/src/project-run/check-execution/callback.ts +106 -0
- package/src/project-run/check-execution/dependencies.ts +70 -0
- package/src/project-run/check-execution/execution-finalization.ts +177 -0
- package/src/project-run/check-execution/execution-settlement.ts +147 -0
- package/src/project-run/check-execution/messages.ts +46 -0
- package/src/project-run/check-execution/plan.ts +46 -0
- package/src/project-run/check-execution/preflight-result.ts +131 -0
- package/src/project-run/check-execution/preflight.ts +321 -0
- package/src/project-run/check-execution/resolved-checks.ts +285 -0
- package/src/project-run/check-execution/terminal-result.ts +74 -0
- package/src/project-run/completion.ts +263 -0
- package/src/project-run/controls/contract.ts +24 -0
- package/src/project-run/controls/outputs-override-validation.ts +86 -0
- package/src/project-run/controls/validation-result.ts +12 -0
- package/src/project-run/controls/validation.ts +176 -0
- package/src/project-run/diagnostic-logging/diagnostic-detail-rendering.ts +223 -0
- package/src/project-run/diagnostic-logging/logger.ts +325 -0
- package/src/project-run/invocation-creation.ts +160 -0
- package/src/project-run/invocation.ts +303 -0
- package/src/project-run/machine-publication.ts +23 -0
- package/src/project-run/output-configuration.ts +24 -0
- package/src/project-run/output-status.ts +69 -0
- package/src/project-run/progress-rendering/presentation.ts +189 -0
- package/src/project-run/progress-rendering/renderer-formatting.ts +141 -0
- package/src/project-run/progress-rendering/renderer-lifecycle.ts +152 -0
- package/src/project-run/progress-rendering/renderer.ts +68 -0
- package/src/project-run/project-context.ts +11 -0
- package/src/project-run/result.ts +175 -0
- package/src/project-run/run.ts +50 -0
- package/src/project-run/task-scheduler/execution-state.ts +153 -0
- package/src/project-run/task-scheduler/graph-validation.ts +176 -0
- package/src/project-run/task-scheduler/graph.ts +185 -0
- package/src/project-run/task-scheduler/scheduler-admission-decision.ts +177 -0
- package/src/project-run/task-scheduler/scheduler-blocker-summary.ts +42 -0
- package/src/project-run/task-scheduler/scheduler-decision-inspection.ts +199 -0
- package/src/project-run/task-scheduler/scheduler-decision-model.ts +158 -0
- package/src/project-run/task-scheduler/scheduler-decision.ts +103 -0
- package/src/project-run/task-scheduler/scheduler.ts +228 -0
- package/third-party-licenses/momoa-3.3.12-LICENSE +201 -0
- package/types/check/check.d.ts +350 -0
- package/types/check/descriptor-validation.d.ts +18 -0
- package/types/check/descriptor.d.ts +5 -0
- package/types/check/inherited-collection.d.ts +35 -0
- package/types/check/options-snapshot.d.ts +2 -0
- package/types/check-settlement/fact-validation.d.ts +14 -0
- package/types/check-settlement/facts.d.ts +19 -0
- package/types/check-settlement/outcome-normalization.d.ts +9 -0
- package/types/check-settlement/record-store.d.ts +14 -0
- package/types/check-settlement/session.d.ts +41 -0
- package/types/data-boundary/canonical-data.d.ts +13 -0
- package/types/data-boundary/canonical-json.d.ts +6 -0
- package/types/data-boundary/closed-values.d.ts +8 -0
- package/types/data-boundary/value-shapes.d.ts +4 -0
- package/types/finding-waivers/reconciliation.d.ts +66 -0
- package/types/index.d.ts +57 -0
- package/types/machine-output/v4/atomic-publication.d.ts +9 -0
- package/types/machine-output/v4/freeze-publication-value.d.ts +6 -0
- package/types/machine-output/v4/projection.d.ts +7 -0
- package/types/machine-output/v4/publication-invariants.d.ts +3 -0
- package/types/machine-output/v4/publication-model.d.ts +15 -0
- package/types/machine-output/v4/publish.d.ts +7 -0
- package/types/machine-output/v4/records-fingerprint.d.ts +4 -0
- package/types/machine-output/v4/schema-identities.d.ts +7 -0
- package/types/machine-output/v4/schema.d.ts +44 -0
- package/types/machine-output/v4/serializers.d.ts +6 -0
- package/types/machine-output/v4/validation-result.d.ts +26 -0
- package/types/machine-output/v4/validation.d.ts +6 -0
- package/types/package-checks/code-quality-findings/policy.d.ts +20 -0
- package/types/package-checks/duplicate-detection/area-policy.d.ts +3 -0
- package/types/package-checks/duplicate-detection/cache/cache-contract.d.ts +48 -0
- package/types/package-checks/duplicate-detection/cache/identity.d.ts +17 -0
- package/types/package-checks/duplicate-detection/cache/key.d.ts +4 -0
- package/types/package-checks/duplicate-detection/cache/payload.d.ts +4 -0
- package/types/package-checks/duplicate-detection/cache/store.d.ts +18 -0
- package/types/package-checks/duplicate-detection/default-check.d.ts +11 -0
- package/types/package-checks/duplicate-detection/execution.d.ts +11 -0
- package/types/package-checks/duplicate-detection/final-data.d.ts +5 -0
- package/types/package-checks/duplicate-detection/jscpd/availability.d.ts +19 -0
- package/types/package-checks/duplicate-detection/jscpd/command-path.d.ts +1 -0
- package/types/package-checks/duplicate-detection/jscpd/command-resolution.d.ts +23 -0
- package/types/package-checks/duplicate-detection/jscpd/json-report.d.ts +2 -0
- package/types/package-checks/duplicate-detection/jscpd/scanner-contract.d.ts +11 -0
- package/types/package-checks/duplicate-detection/jscpd/scanner.d.ts +21 -0
- package/types/package-checks/duplicate-detection/jscpd/scoped-fragments.d.ts +4 -0
- package/types/package-checks/duplicate-detection/measurement-model.d.ts +36 -0
- package/types/package-checks/duplicate-detection/measurement.d.ts +14 -0
- package/types/package-checks/duplicate-detection/options-resolution.d.ts +3 -0
- package/types/package-checks/duplicate-detection/options-validation.d.ts +1 -0
- package/types/package-checks/duplicate-detection/options.d.ts +65 -0
- package/types/package-checks/duplicate-detection/project-revision.d.ts +1 -0
- package/types/package-checks/duplicate-detection/records.d.ts +22 -0
- package/types/package-checks/file-metrics/constructor.d.ts +11 -0
- package/types/package-checks/file-metrics/execution.d.ts +11 -0
- package/types/package-checks/file-metrics/final-data.d.ts +5 -0
- package/types/package-checks/file-metrics/measurement-model.d.ts +12 -0
- package/types/package-checks/file-metrics/measurement.d.ts +13 -0
- package/types/package-checks/file-metrics/options-resolution.d.ts +3 -0
- package/types/package-checks/file-metrics/options-validation.d.ts +3 -0
- package/types/package-checks/file-metrics/options.d.ts +75 -0
- package/types/package-checks/file-metrics/records.d.ts +43 -0
- package/types/package-checks/file-metrics/scc/availability.d.ts +18 -0
- package/types/package-checks/file-metrics/scc/csv.d.ts +1 -0
- package/types/package-checks/file-metrics/scc/parser.d.ts +25 -0
- package/types/package-checks/file-metrics/scc/scanner.d.ts +14 -0
- package/types/package-checks/final-data-parsing.d.ts +9 -0
- package/types/package-checks/function-metrics/analysis.d.ts +10 -0
- package/types/package-checks/function-metrics/constructor.d.ts +11 -0
- package/types/package-checks/function-metrics/execution.d.ts +7 -0
- package/types/package-checks/function-metrics/final-data.d.ts +5 -0
- package/types/package-checks/function-metrics/lizard/availability.d.ts +11 -0
- package/types/package-checks/function-metrics/lizard/csv.d.ts +1 -0
- package/types/package-checks/function-metrics/lizard/parser.d.ts +17 -0
- package/types/package-checks/function-metrics/lizard/scanner.d.ts +15 -0
- package/types/package-checks/function-metrics/measurement-model.d.ts +26 -0
- package/types/package-checks/function-metrics/measurement.d.ts +21 -0
- package/types/package-checks/function-metrics/options-resolution.d.ts +3 -0
- package/types/package-checks/function-metrics/options-validation.d.ts +3 -0
- package/types/package-checks/function-metrics/options.d.ts +76 -0
- package/types/package-checks/function-metrics/records.d.ts +37 -0
- package/types/package-checks/function-metrics/target-files.d.ts +3 -0
- package/types/package-checks/host-environment/error-message.d.ts +1 -0
- package/types/package-checks/host-environment/filesystem.d.ts +19 -0
- package/types/package-checks/host-environment/git.d.ts +13 -0
- package/types/package-checks/host-environment/path.d.ts +3 -0
- package/types/package-checks/host-environment/process/command.d.ts +7 -0
- package/types/package-checks/host-environment/process/contract.d.ts +50 -0
- package/types/package-checks/host-environment/process/env.d.ts +16 -0
- package/types/package-checks/host-environment/process/failure.d.ts +4 -0
- package/types/package-checks/host-environment/process/result.d.ts +2 -0
- package/types/package-checks/host-environment/process/runner.d.ts +3 -0
- package/types/package-checks/json-document/strict-document.d.ts +35 -0
- package/types/package-checks/json-schema-validation/default-check.d.ts +11 -0
- package/types/package-checks/json-schema-validation/execution-stages.d.ts +27 -0
- package/types/package-checks/json-schema-validation/final-data.d.ts +15 -0
- package/types/package-checks/json-schema-validation/issue-collector.d.ts +12 -0
- package/types/package-checks/json-schema-validation/json-schema-validation.d.ts +42 -0
- package/types/package-checks/json-schema-validation/options-resolution.d.ts +3 -0
- package/types/package-checks/json-schema-validation/options-validation.d.ts +2 -0
- package/types/package-checks/json-schema-validation/options.d.ts +53 -0
- package/types/package-checks/json-schema-validation/reference-resolver.d.ts +23 -0
- package/types/package-checks/json-schema-validation/remote-response.d.ts +2 -0
- package/types/package-checks/json-schema-validation/schema-engine.d.ts +33 -0
- package/types/package-checks/json-schema-validation/schema-policy.d.ts +17 -0
- package/types/package-checks/json-validation/default-check.d.ts +11 -0
- package/types/package-checks/json-validation/final-data.d.ts +10 -0
- package/types/package-checks/json-validation/json-validation.d.ts +28 -0
- package/types/package-checks/json-validation/options-resolution.d.ts +3 -0
- package/types/package-checks/json-validation/options-validation.d.ts +2 -0
- package/types/package-checks/json-validation/options.d.ts +13 -0
- package/types/package-checks/maintenance-reminders/assessment-results.d.ts +10 -0
- package/types/package-checks/maintenance-reminders/final-data.d.ts +47 -0
- package/types/package-checks/maintenance-reminders/maintenance-reminders.d.ts +111 -0
- package/types/package-checks/maintenance-reminders/maintenance-support.d.ts +7 -0
- package/types/package-checks/maintenance-reminders/measurement.d.ts +10 -0
- package/types/package-checks/maintenance-reminders/options-validation.d.ts +3 -0
- package/types/package-checks/markdown-link-validation/default-check.d.ts +27 -0
- package/types/package-checks/markdown-link-validation/execution.d.ts +12 -0
- package/types/package-checks/markdown-link-validation/filesystem-probes.d.ts +10 -0
- package/types/package-checks/markdown-link-validation/final-data.d.ts +10 -0
- package/types/package-checks/markdown-link-validation/local-resolution.d.ts +92 -0
- package/types/package-checks/markdown-link-validation/local-resolver.d.ts +5 -0
- package/types/package-checks/markdown-link-validation/markdown-parser.d.ts +37 -0
- package/types/package-checks/markdown-link-validation/options-resolution.d.ts +3 -0
- package/types/package-checks/markdown-link-validation/options-validation.d.ts +2 -0
- package/types/package-checks/markdown-link-validation/options.d.ts +43 -0
- package/types/package-checks/markdown-link-validation/records.d.ts +37 -0
- package/types/package-checks/markdown-link-validation/resolver-engine.d.ts +15 -0
- package/types/package-checks/markdown-link-validation/target-descriptor.d.ts +5 -0
- package/types/package-checks/markdown-link-validation/traversal-result.d.ts +12 -0
- package/types/package-checks/project-files/collection.d.ts +9 -0
- package/types/package-checks/project-files/config-glob.d.ts +5 -0
- package/types/package-checks/project-files/configuration.d.ts +31 -0
- package/types/package-checks/project-files/exact-input-measurement.d.ts +12 -0
- package/types/package-checks/project-files/file-fingerprint.d.ts +7 -0
- package/types/package-checks/project-files/gitlink-revision.d.ts +9 -0
- package/types/package-checks/project-files/gitlink-worktree.d.ts +26 -0
- package/types/package-checks/project-files/input-eligibility.d.ts +7 -0
- package/types/package-checks/project-files/reported-path.d.ts +1 -0
- package/types/package-checks/project-files/revision-paths.d.ts +12 -0
- package/types/package-checks/project-files/revision-worktree-files.d.ts +5 -0
- package/types/project-definition/check-tree/authoring.d.ts +41 -0
- package/types/project-definition/check-tree/materialization.d.ts +4 -0
- package/types/project-definition/check-tree/resolution.d.ts +25 -0
- package/types/project-definition/output-defaults.d.ts +14 -0
- package/types/project-definition/output-validation.d.ts +3 -0
- package/types/project-definition/project-definition-validation.d.ts +6 -0
- package/types/project-definition/project-definition.d.ts +88 -0
- package/types/project-run/aggregation.d.ts +7 -0
- package/types/project-run/check-execution/callback.d.ts +24 -0
- package/types/project-run/check-execution/dependencies.d.ts +9 -0
- package/types/project-run/check-execution/execution-finalization.d.ts +18 -0
- package/types/project-run/check-execution/execution-settlement.d.ts +41 -0
- package/types/project-run/check-execution/messages.d.ts +3 -0
- package/types/project-run/check-execution/plan.d.ts +10 -0
- package/types/project-run/check-execution/preflight-result.d.ts +23 -0
- package/types/project-run/check-execution/preflight.d.ts +27 -0
- package/types/project-run/check-execution/resolved-checks.d.ts +51 -0
- package/types/project-run/check-execution/terminal-result.d.ts +27 -0
- package/types/project-run/completion.d.ts +14 -0
- package/types/project-run/controls/contract.d.ts +24 -0
- package/types/project-run/controls/outputs-override-validation.d.ts +3 -0
- package/types/project-run/controls/validation-result.d.ts +14 -0
- package/types/project-run/controls/validation.d.ts +3 -0
- package/types/project-run/diagnostic-logging/diagnostic-detail-rendering.d.ts +11 -0
- package/types/project-run/diagnostic-logging/logger.d.ts +33 -0
- package/types/project-run/invocation-creation.d.ts +12 -0
- package/types/project-run/invocation.d.ts +34 -0
- package/types/project-run/machine-publication.d.ts +10 -0
- package/types/project-run/output-configuration.d.ts +3 -0
- package/types/project-run/output-status.d.ts +21 -0
- package/types/project-run/progress-rendering/presentation.d.ts +28 -0
- package/types/project-run/progress-rendering/renderer-formatting.d.ts +23 -0
- package/types/project-run/progress-rendering/renderer-lifecycle.d.ts +24 -0
- package/types/project-run/progress-rendering/renderer.d.ts +44 -0
- package/types/project-run/project-context.d.ts +7 -0
- package/types/project-run/result.d.ts +99 -0
- package/types/project-run/run.d.ts +18 -0
- package/types/project-run/task-scheduler/execution-state.d.ts +67 -0
- package/types/project-run/task-scheduler/graph-validation.d.ts +11 -0
- package/types/project-run/task-scheduler/graph.d.ts +40 -0
- package/types/project-run/task-scheduler/scheduler-admission-decision.d.ts +8 -0
- package/types/project-run/task-scheduler/scheduler-blocker-summary.d.ts +4 -0
- package/types/project-run/task-scheduler/scheduler-decision-inspection.d.ts +24 -0
- package/types/project-run/task-scheduler/scheduler-decision-model.d.ts +94 -0
- package/types/project-run/task-scheduler/scheduler-decision.d.ts +8 -0
- package/types/project-run/task-scheduler/scheduler.d.ts +3 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineCheck,
|
|
3
|
+
type CheckExecutionContext,
|
|
4
|
+
type CheckResult,
|
|
5
|
+
type TypedCheckWithOptions
|
|
6
|
+
} from "../../check/check.ts";
|
|
7
|
+
import {
|
|
8
|
+
MAINTENANCE_REMINDER_UNAVAILABLE_REASON,
|
|
9
|
+
parseMaintenanceRemindersData,
|
|
10
|
+
type MaintenanceReminderAssessment,
|
|
11
|
+
type MaintenanceRemindersFinalData
|
|
12
|
+
} from "./final-data.ts";
|
|
13
|
+
import { runGit } from "./maintenance-support.ts";
|
|
14
|
+
import { exactRecord, validEntries, validGit } from "./options-validation.ts";
|
|
15
|
+
import {
|
|
16
|
+
completedResult,
|
|
17
|
+
reminderEvaluation,
|
|
18
|
+
unavailableAssessment,
|
|
19
|
+
unavailableHistory,
|
|
20
|
+
unavailableResult
|
|
21
|
+
} from "./assessment-results.ts";
|
|
22
|
+
import { measureReminder, parseCommitId, parseFirstParentHistory } from "./measurement.ts";
|
|
23
|
+
|
|
24
|
+
export const MAINTENANCE_REMINDERS_CHECK_ID = "maintenance-reminders";
|
|
25
|
+
|
|
26
|
+
const MAINTENANCE_REMINDER_OPTION_KEYS: readonly string[] = ["entries", "git"];
|
|
27
|
+
const WHOLE_CHECK_UNAVAILABLE_CODE = Object.freeze({
|
|
28
|
+
invalidOptions: "invalid-options",
|
|
29
|
+
executionCancelled: "execution-cancelled",
|
|
30
|
+
internalFailure: "maintenance-reminders-internal-failure"
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/** 一项维护提醒的项目政策输入。 */
|
|
34
|
+
export interface MaintenanceReminder {
|
|
35
|
+
/** 在同一次构造函数调用中唯一的小写短横线命名局部标识。 */
|
|
36
|
+
readonly id: string;
|
|
37
|
+
/** 维护者在完成真实复核后手动推进的不可变完整 Git commit ID。 */
|
|
38
|
+
readonly baseCommit: string;
|
|
39
|
+
/** 超过任一已配置上限时触发该提醒。 */
|
|
40
|
+
readonly limits: Readonly<{
|
|
41
|
+
/** 从基线到 `HEAD` 的 `first-parent` 提交数上限。 */
|
|
42
|
+
readonly commits?: number;
|
|
43
|
+
/** 从基线到 `HEAD` 的累计 Git `numstat` 增加行加删除行上限。 */
|
|
44
|
+
readonly changedLines?: number;
|
|
45
|
+
}>;
|
|
46
|
+
/** 到期或无法评估时展示给人的非空提醒正文。 */
|
|
47
|
+
readonly message: string;
|
|
48
|
+
/** 省略时只提示;`enforcing` 会使到期或不可测量的条目令所属 Check 失败。 */
|
|
49
|
+
readonly mode?: "advisory" | "enforcing";
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** `maintenanceReminders` 生成且完全由 Check 持有的选项。 */
|
|
53
|
+
export interface MaintenanceReminderOptions {
|
|
54
|
+
/** 保留作者声明顺序的提醒政策条目。 */
|
|
55
|
+
readonly entries: readonly MaintenanceReminder[];
|
|
56
|
+
/** 执行已提交历史测量的 Git 可执行文件。 */
|
|
57
|
+
readonly git: Readonly<{
|
|
58
|
+
readonly executable: string;
|
|
59
|
+
}>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** `maintenance-reminders` whole-Check unavailable outcome 的稳定 reason code。 */
|
|
63
|
+
export type MaintenanceRemindersUnavailableCode =
|
|
64
|
+
(typeof WHOLE_CHECK_UNAVAILABLE_CODE)[keyof typeof WHOLE_CHECK_UNAVAILABLE_CODE];
|
|
65
|
+
export type FirstParentHistoryUnavailableReason =
|
|
66
|
+
| typeof MAINTENANCE_REMINDER_UNAVAILABLE_REASON.firstParentHistoryInvalid
|
|
67
|
+
| typeof MAINTENANCE_REMINDER_UNAVAILABLE_REASON.firstParentHistoryUnavailable
|
|
68
|
+
| typeof MAINTENANCE_REMINDER_UNAVAILABLE_REASON.headInvalid
|
|
69
|
+
| typeof MAINTENANCE_REMINDER_UNAVAILABLE_REASON.headUnavailable;
|
|
70
|
+
|
|
71
|
+
export type ReminderEvaluation = Readonly<{
|
|
72
|
+
readonly assessment: MaintenanceReminderAssessment;
|
|
73
|
+
readonly message: string;
|
|
74
|
+
}>;
|
|
75
|
+
|
|
76
|
+
export type GitCommandResult =
|
|
77
|
+
| Readonly<{ readonly kind: "cancelled" }>
|
|
78
|
+
| Readonly<{ readonly kind: "failed" }>
|
|
79
|
+
| Readonly<{ readonly kind: "succeeded"; readonly stdout: string }>;
|
|
80
|
+
|
|
81
|
+
export type FirstParentHistory = Readonly<{
|
|
82
|
+
readonly commits: readonly string[];
|
|
83
|
+
readonly headCommit: string;
|
|
84
|
+
}>;
|
|
85
|
+
|
|
86
|
+
export type FirstParentHistoryResolution =
|
|
87
|
+
| Readonly<{ readonly kind: "cancelled" }>
|
|
88
|
+
| Readonly<{ readonly kind: "unavailable"; readonly reason: FirstParentHistoryUnavailableReason }>
|
|
89
|
+
| Readonly<{ readonly kind: "succeeded"; readonly value: FirstParentHistory }>;
|
|
90
|
+
|
|
91
|
+
export type ReminderMeasurement =
|
|
92
|
+
| Readonly<{ readonly kind: "cancelled" }>
|
|
93
|
+
| Readonly<{ readonly kind: "succeeded"; readonly value: ReminderEvaluation }>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* 创建一个固定 ID 的普通 Check,并在其局部最终数据中评估多条维护提醒。
|
|
97
|
+
*
|
|
98
|
+
* @remarks 构造函数只接收项目无法可靠推断的提醒政策;它补齐 Git 可执行文件、身份、可见性和直接执行逻辑。返回值仍是普通 Check,可按现有原生对象组合规则替换完整 `options` 分支。
|
|
99
|
+
* @example 创建一个单一 Check 的维护提醒
|
|
100
|
+
* ```ts
|
|
101
|
+
* import { defineConfig, maintenanceReminders, run } from "@zxyycom/vibe-check";
|
|
102
|
+
*
|
|
103
|
+
* // 下列 baseCommit 都是示例占位值;实际使用时,每条都必须替换为该提醒最近一次真实复核对应的完整 commit ID。
|
|
104
|
+
* const maintenance = maintenanceReminders([
|
|
105
|
+
* {
|
|
106
|
+
* id: "documentation-review",
|
|
107
|
+
* baseCommit: "0123456789abcdef0123456789abcdef01234567",
|
|
108
|
+
* limits: { commits: 40, changedLines: 2_000 },
|
|
109
|
+
* message: "Review the documentation structure after this body of change."
|
|
110
|
+
* },
|
|
111
|
+
* {
|
|
112
|
+
* id: "optimization-audit",
|
|
113
|
+
* baseCommit: "89abcdef0123456789abcdef0123456789abcdef",
|
|
114
|
+
* limits: { commits: 80 },
|
|
115
|
+
* message: "Audit optimization quality before this becomes older.",
|
|
116
|
+
* mode: "enforcing"
|
|
117
|
+
* }
|
|
118
|
+
* ]);
|
|
119
|
+
*
|
|
120
|
+
* const definition = defineConfig({
|
|
121
|
+
* checks: [maintenance],
|
|
122
|
+
* outputs: {
|
|
123
|
+
* diagnosticLogging: { enabled: false },
|
|
124
|
+
* machinePublication: { enabled: false },
|
|
125
|
+
* progressRendering: { enabled: false }
|
|
126
|
+
* }
|
|
127
|
+
* });
|
|
128
|
+
*
|
|
129
|
+
* const result = await run(definition);
|
|
130
|
+
* if (result.kind !== "completed") throw new Error(`Run did not complete: ${result.kind}`);
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
export function maintenanceReminders(
|
|
134
|
+
entries: readonly MaintenanceReminder[]
|
|
135
|
+
): TypedCheckWithOptions<
|
|
136
|
+
typeof MAINTENANCE_REMINDERS_CHECK_ID,
|
|
137
|
+
MaintenanceReminderOptions,
|
|
138
|
+
typeof parseMaintenanceRemindersData
|
|
139
|
+
> {
|
|
140
|
+
return defineCheck({
|
|
141
|
+
checkId: MAINTENANCE_REMINDERS_CHECK_ID,
|
|
142
|
+
displayName: "Maintenance reminders",
|
|
143
|
+
execution: executeMaintenanceReminders,
|
|
144
|
+
parseData: parseMaintenanceRemindersData,
|
|
145
|
+
preflight: (options) =>
|
|
146
|
+
validMaintenanceReminderOptions(options)
|
|
147
|
+
? { status: "success", preparedOptions: options }
|
|
148
|
+
: {
|
|
149
|
+
status: "failure",
|
|
150
|
+
action: "block",
|
|
151
|
+
reason: { code: "invalid-options" },
|
|
152
|
+
messages: [
|
|
153
|
+
{
|
|
154
|
+
code: "invalid-options",
|
|
155
|
+
level: "error",
|
|
156
|
+
message:
|
|
157
|
+
"maintenanceReminders options are invalid; recreate the Check with maintenanceReminders(entries) or restore its complete resolved options."
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
options: {
|
|
162
|
+
entries,
|
|
163
|
+
git: { executable: "git" }
|
|
164
|
+
},
|
|
165
|
+
visibility: "attention"
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** 在普通对象组合后验证完整的选项形状。 */
|
|
170
|
+
export function validMaintenanceReminderOptions(
|
|
171
|
+
value: unknown
|
|
172
|
+
): value is MaintenanceReminderOptions {
|
|
173
|
+
const options = exactRecord(value, MAINTENANCE_REMINDER_OPTION_KEYS);
|
|
174
|
+
return options !== undefined && validEntries(options.entries) && validGit(options.git);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
async function executeMaintenanceReminders(
|
|
178
|
+
context: CheckExecutionContext<MaintenanceReminderOptions>
|
|
179
|
+
): Promise<CheckResult<MaintenanceRemindersFinalData>> {
|
|
180
|
+
if (!validMaintenanceReminderOptions(context.options))
|
|
181
|
+
return unavailableResult("invalid-options");
|
|
182
|
+
if (context.signal.aborted)
|
|
183
|
+
return unavailableResult(WHOLE_CHECK_UNAVAILABLE_CODE.executionCancelled);
|
|
184
|
+
|
|
185
|
+
try {
|
|
186
|
+
const history = await resolveFirstParentHistory({
|
|
187
|
+
executable: context.options.git.executable,
|
|
188
|
+
projectRoot: context.project.root,
|
|
189
|
+
signal: context.signal
|
|
190
|
+
});
|
|
191
|
+
if (history.kind === "cancelled") {
|
|
192
|
+
return unavailableResult(WHOLE_CHECK_UNAVAILABLE_CODE.executionCancelled);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (history.kind === "unavailable") {
|
|
196
|
+
return completedResult(
|
|
197
|
+
context.options.entries.map((entry) =>
|
|
198
|
+
reminderEvaluation(entry, unavailableAssessment(entry, null, history.reason))
|
|
199
|
+
)
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const evaluations: ReminderEvaluation[] = [];
|
|
204
|
+
for (const entry of context.options.entries) {
|
|
205
|
+
const measurement = await measureReminder({
|
|
206
|
+
entry,
|
|
207
|
+
executable: context.options.git.executable,
|
|
208
|
+
history: history.value,
|
|
209
|
+
projectRoot: context.project.root,
|
|
210
|
+
signal: context.signal
|
|
211
|
+
});
|
|
212
|
+
if (measurement.kind === "cancelled") {
|
|
213
|
+
return unavailableResult(WHOLE_CHECK_UNAVAILABLE_CODE.executionCancelled);
|
|
214
|
+
}
|
|
215
|
+
evaluations.push(measurement.value);
|
|
216
|
+
}
|
|
217
|
+
return completedResult(evaluations);
|
|
218
|
+
} catch {
|
|
219
|
+
return unavailableResult(WHOLE_CHECK_UNAVAILABLE_CODE.internalFailure);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
async function resolveFirstParentHistory(input: {
|
|
224
|
+
readonly executable: string;
|
|
225
|
+
readonly projectRoot: string;
|
|
226
|
+
readonly signal: AbortSignal;
|
|
227
|
+
}): Promise<FirstParentHistoryResolution> {
|
|
228
|
+
const head = await runGit({
|
|
229
|
+
args: ["rev-parse", "--verify", "HEAD^{commit}"],
|
|
230
|
+
executable: input.executable,
|
|
231
|
+
projectRoot: input.projectRoot,
|
|
232
|
+
signal: input.signal
|
|
233
|
+
});
|
|
234
|
+
if (head.kind === "cancelled") return head;
|
|
235
|
+
if (head.kind === "failed")
|
|
236
|
+
return unavailableHistory(MAINTENANCE_REMINDER_UNAVAILABLE_REASON.headUnavailable);
|
|
237
|
+
|
|
238
|
+
const headCommit = parseCommitId(head.stdout);
|
|
239
|
+
if (headCommit === null)
|
|
240
|
+
return unavailableHistory(MAINTENANCE_REMINDER_UNAVAILABLE_REASON.headInvalid);
|
|
241
|
+
|
|
242
|
+
const history = await runGit({
|
|
243
|
+
args: ["rev-list", "--first-parent", "HEAD"],
|
|
244
|
+
executable: input.executable,
|
|
245
|
+
projectRoot: input.projectRoot,
|
|
246
|
+
signal: input.signal
|
|
247
|
+
});
|
|
248
|
+
if (history.kind === "cancelled") return history;
|
|
249
|
+
if (history.kind === "failed") {
|
|
250
|
+
return unavailableHistory(
|
|
251
|
+
MAINTENANCE_REMINDER_UNAVAILABLE_REASON.firstParentHistoryUnavailable
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const firstParentHistory = parseFirstParentHistory(history.stdout, headCommit);
|
|
256
|
+
if (firstParentHistory === undefined) {
|
|
257
|
+
return unavailableHistory(MAINTENANCE_REMINDER_UNAVAILABLE_REASON.firstParentHistoryInvalid);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return {
|
|
261
|
+
kind: "succeeded",
|
|
262
|
+
value: firstParentHistory
|
|
263
|
+
};
|
|
264
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
|
|
3
|
+
import type { GitCommandResult } from "./maintenance-reminders.ts";
|
|
4
|
+
|
|
5
|
+
const MAX_GIT_OUTPUT_BYTES = 64 * 1024 * 1024;
|
|
6
|
+
|
|
7
|
+
export async function runGit(input: {
|
|
8
|
+
readonly args: readonly string[];
|
|
9
|
+
readonly executable: string;
|
|
10
|
+
readonly projectRoot: string;
|
|
11
|
+
readonly signal: AbortSignal;
|
|
12
|
+
}): Promise<GitCommandResult> {
|
|
13
|
+
if (input.signal.aborted) return { kind: "cancelled" };
|
|
14
|
+
|
|
15
|
+
return new Promise((resolve) => {
|
|
16
|
+
let settled = false;
|
|
17
|
+
let outputBytes = 0;
|
|
18
|
+
let stdout = "";
|
|
19
|
+
let overflowed = false;
|
|
20
|
+
let child: ReturnType<typeof spawn>;
|
|
21
|
+
|
|
22
|
+
const settle = (result: GitCommandResult): void => {
|
|
23
|
+
if (settled) return;
|
|
24
|
+
settled = true;
|
|
25
|
+
input.signal.removeEventListener("abort", abort);
|
|
26
|
+
resolve(result);
|
|
27
|
+
};
|
|
28
|
+
const abort = (): void => {
|
|
29
|
+
child.kill("SIGTERM");
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
child = spawn(input.executable, input.args, {
|
|
34
|
+
cwd: input.projectRoot,
|
|
35
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
36
|
+
windowsHide: true
|
|
37
|
+
});
|
|
38
|
+
} catch {
|
|
39
|
+
settle({ kind: "failed" });
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
input.signal.addEventListener("abort", abort, { once: true });
|
|
44
|
+
child.stdout?.on("data", (chunk: Buffer | string) => {
|
|
45
|
+
const text = String(chunk);
|
|
46
|
+
outputBytes += Buffer.byteLength(text);
|
|
47
|
+
if (outputBytes > MAX_GIT_OUTPUT_BYTES) {
|
|
48
|
+
overflowed = true;
|
|
49
|
+
child.kill("SIGTERM");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
stdout += text;
|
|
53
|
+
});
|
|
54
|
+
child.once("error", () =>
|
|
55
|
+
settle(input.signal.aborted ? { kind: "cancelled" } : { kind: "failed" })
|
|
56
|
+
);
|
|
57
|
+
child.once("close", (status) => {
|
|
58
|
+
if (input.signal.aborted) {
|
|
59
|
+
settle({ kind: "cancelled" });
|
|
60
|
+
} else if (overflowed || status !== 0) {
|
|
61
|
+
settle({ kind: "failed" });
|
|
62
|
+
} else {
|
|
63
|
+
settle({ kind: "succeeded", stdout });
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isMaintenanceCommitId,
|
|
3
|
+
type MaintenanceReminderAssessment,
|
|
4
|
+
type MaintenanceReminderUnavailableReason
|
|
5
|
+
} from "./final-data.ts";
|
|
6
|
+
import { completedMeasurement, modeOf, unavailableAssessment } from "./assessment-results.ts";
|
|
7
|
+
import { runGit } from "./maintenance-support.ts";
|
|
8
|
+
import type {
|
|
9
|
+
FirstParentHistory,
|
|
10
|
+
MaintenanceReminder,
|
|
11
|
+
ReminderMeasurement
|
|
12
|
+
} from "./maintenance-reminders.ts";
|
|
13
|
+
|
|
14
|
+
export async function measureReminder(input: {
|
|
15
|
+
readonly entry: Readonly<MaintenanceReminder>;
|
|
16
|
+
readonly executable: string;
|
|
17
|
+
readonly history: FirstParentHistory;
|
|
18
|
+
readonly projectRoot: string;
|
|
19
|
+
readonly signal: AbortSignal;
|
|
20
|
+
}): Promise<ReminderMeasurement> {
|
|
21
|
+
const base = await resolvedBaseCommit(input);
|
|
22
|
+
if (base.kind === "cancelled") return base;
|
|
23
|
+
if (base.kind === "unavailable") return unavailableMeasurement(input, base.reason);
|
|
24
|
+
const changedLines = await measuredChangedLines(input, base.value);
|
|
25
|
+
if (changedLines.kind === "cancelled") return changedLines;
|
|
26
|
+
if (changedLines.kind === "unavailable")
|
|
27
|
+
return unavailableMeasurement(input, changedLines.reason);
|
|
28
|
+
return completedMeasurement(
|
|
29
|
+
input.entry,
|
|
30
|
+
measuredAssessment(input, base.value, changedLines.value)
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type ReminderMeasureStage<T> =
|
|
35
|
+
| Readonly<{ readonly kind: "cancelled" }>
|
|
36
|
+
| Readonly<{ readonly kind: "complete"; readonly value: T }>
|
|
37
|
+
| Readonly<{
|
|
38
|
+
readonly kind: "unavailable";
|
|
39
|
+
readonly reason: MaintenanceReminderUnavailableReason;
|
|
40
|
+
}>;
|
|
41
|
+
|
|
42
|
+
async function resolvedBaseCommit(input: {
|
|
43
|
+
readonly entry: Readonly<MaintenanceReminder>;
|
|
44
|
+
readonly executable: string;
|
|
45
|
+
readonly history: FirstParentHistory;
|
|
46
|
+
readonly projectRoot: string;
|
|
47
|
+
readonly signal: AbortSignal;
|
|
48
|
+
}): Promise<ReminderMeasureStage<number>> {
|
|
49
|
+
const base = await runGit({
|
|
50
|
+
args: ["rev-parse", "--verify", `${input.entry.baseCommit}^{commit}`],
|
|
51
|
+
executable: input.executable,
|
|
52
|
+
projectRoot: input.projectRoot,
|
|
53
|
+
signal: input.signal
|
|
54
|
+
});
|
|
55
|
+
if (base.kind === "cancelled") return base;
|
|
56
|
+
if (base.kind === "failed") return unavailableMeasure("base-commit-unavailable");
|
|
57
|
+
|
|
58
|
+
const baseCommit = parseCommitId(base.stdout);
|
|
59
|
+
if (baseCommit === null) return unavailableMeasure("base-commit-unavailable");
|
|
60
|
+
|
|
61
|
+
const baseIndex = input.history.commits.indexOf(baseCommit);
|
|
62
|
+
return baseIndex < 0
|
|
63
|
+
? unavailableMeasure("base-not-first-parent-ancestor")
|
|
64
|
+
: completeMeasure(baseIndex);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async function measuredChangedLines(
|
|
68
|
+
input: {
|
|
69
|
+
readonly executable: string;
|
|
70
|
+
readonly history: FirstParentHistory;
|
|
71
|
+
readonly projectRoot: string;
|
|
72
|
+
readonly signal: AbortSignal;
|
|
73
|
+
},
|
|
74
|
+
baseIndex: number
|
|
75
|
+
): Promise<ReminderMeasureStage<number>> {
|
|
76
|
+
let changedLines = 0;
|
|
77
|
+
for (const commit of input.history.commits.slice(0, baseIndex)) {
|
|
78
|
+
const numstat = await runGit({
|
|
79
|
+
args: ["diff-tree", "--no-commit-id", "--numstat", "-r", `${commit}^`, commit],
|
|
80
|
+
executable: input.executable,
|
|
81
|
+
projectRoot: input.projectRoot,
|
|
82
|
+
signal: input.signal
|
|
83
|
+
});
|
|
84
|
+
if (numstat.kind === "cancelled") return numstat;
|
|
85
|
+
if (numstat.kind === "failed") return unavailableMeasure("numstat-unavailable");
|
|
86
|
+
const count = parseChangedLines(numstat.stdout);
|
|
87
|
+
if (count === null || !Number.isSafeInteger(changedLines + count))
|
|
88
|
+
return unavailableMeasure("numstat-invalid");
|
|
89
|
+
changedLines += count;
|
|
90
|
+
}
|
|
91
|
+
return completeMeasure(changedLines);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function measuredAssessment(
|
|
95
|
+
input: Readonly<{
|
|
96
|
+
readonly entry: Readonly<MaintenanceReminder>;
|
|
97
|
+
readonly history: FirstParentHistory;
|
|
98
|
+
}>,
|
|
99
|
+
baseIndex: number,
|
|
100
|
+
changedLines: number
|
|
101
|
+
): MaintenanceReminderAssessment {
|
|
102
|
+
const mode = modeOf(input.entry);
|
|
103
|
+
const exceeded = [
|
|
104
|
+
...(input.entry.limits.commits !== undefined && baseIndex > input.entry.limits.commits
|
|
105
|
+
? (["commits"] as const)
|
|
106
|
+
: []),
|
|
107
|
+
...(input.entry.limits.changedLines !== undefined &&
|
|
108
|
+
changedLines > input.entry.limits.changedLines
|
|
109
|
+
? (["changed-lines"] as const)
|
|
110
|
+
: [])
|
|
111
|
+
];
|
|
112
|
+
return {
|
|
113
|
+
assessment: exceeded.length > 0 ? "due" : "clear",
|
|
114
|
+
baseCommit: input.entry.baseCommit,
|
|
115
|
+
changedLines,
|
|
116
|
+
commitCount: baseIndex,
|
|
117
|
+
exceeded,
|
|
118
|
+
headCommit: input.history.headCommit,
|
|
119
|
+
id: input.entry.id,
|
|
120
|
+
mode
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function unavailableMeasurement(
|
|
125
|
+
input: Readonly<{
|
|
126
|
+
readonly entry: Readonly<MaintenanceReminder>;
|
|
127
|
+
readonly history: FirstParentHistory;
|
|
128
|
+
}>,
|
|
129
|
+
reason: MaintenanceReminderUnavailableReason
|
|
130
|
+
): ReminderMeasurement {
|
|
131
|
+
return completedMeasurement(
|
|
132
|
+
input.entry,
|
|
133
|
+
unavailableAssessment(input.entry, input.history.headCommit, reason)
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function completeMeasure<T>(value: T): ReminderMeasureStage<T> {
|
|
138
|
+
return { kind: "complete", value };
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function unavailableMeasure(
|
|
142
|
+
reason: MaintenanceReminderUnavailableReason
|
|
143
|
+
): ReminderMeasureStage<never> {
|
|
144
|
+
return { kind: "unavailable", reason };
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function parseCommitId(stdout: string): string | null {
|
|
148
|
+
const value = stdout.trim();
|
|
149
|
+
return isMaintenanceCommitId(value) ? value.toLowerCase() : null;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function parseFirstParentHistory(
|
|
153
|
+
stdout: string,
|
|
154
|
+
headCommit: string
|
|
155
|
+
): FirstParentHistory | undefined {
|
|
156
|
+
const commits: string[] = [];
|
|
157
|
+
for (const line of stdout.split(/\r?\n/)) {
|
|
158
|
+
if (line.trim().length === 0) continue;
|
|
159
|
+
const commit = parseCommitId(line);
|
|
160
|
+
if (commit === null) return undefined;
|
|
161
|
+
commits.push(commit);
|
|
162
|
+
}
|
|
163
|
+
if (commits.length === 0 || commits[0] !== headCommit) return undefined;
|
|
164
|
+
return Object.freeze({ commits: Object.freeze(commits), headCommit });
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function parseChangedLines(stdout: string): number | null {
|
|
168
|
+
let changedLines = 0;
|
|
169
|
+
for (const line of stdout.split(/\r?\n/)) {
|
|
170
|
+
if (line.length === 0) continue;
|
|
171
|
+
const [additions, deletions] = line.split("\t", 3);
|
|
172
|
+
if (additions === "-" && deletions === "-") continue;
|
|
173
|
+
if (!decimal(additions) || !decimal(deletions)) return null;
|
|
174
|
+
const count = Number(additions) + Number(deletions);
|
|
175
|
+
if (!Number.isSafeInteger(count) || !Number.isSafeInteger(changedLines + count)) return null;
|
|
176
|
+
changedLines += count;
|
|
177
|
+
}
|
|
178
|
+
return changedLines;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function decimal(value: string | undefined): value is string {
|
|
182
|
+
return value !== undefined && /^(?:0|[1-9]\d*)$/.test(value);
|
|
183
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { snapshotClosedArray, snapshotClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
2
|
+
import { isMaintenanceCommitId, isMaintenanceReminderId } from "./final-data.ts";
|
|
3
|
+
|
|
4
|
+
const MAINTENANCE_REMINDER_ENTRY_KEYS: readonly string[] = [
|
|
5
|
+
"id",
|
|
6
|
+
"baseCommit",
|
|
7
|
+
"limits",
|
|
8
|
+
"message",
|
|
9
|
+
"mode"
|
|
10
|
+
];
|
|
11
|
+
const MAINTENANCE_REMINDER_LIMIT_KEYS: readonly string[] = ["commits", "changedLines"];
|
|
12
|
+
const MAINTENANCE_REMINDER_GIT_KEYS: readonly string[] = ["executable"];
|
|
13
|
+
|
|
14
|
+
export function validEntries(value: unknown): boolean {
|
|
15
|
+
const entries = snapshotClosedArray(value);
|
|
16
|
+
if (entries === undefined) return false;
|
|
17
|
+
const identifiers = new Set<string>();
|
|
18
|
+
return entries.every((candidate) => {
|
|
19
|
+
const entry = snapshotClosedRecord(candidate);
|
|
20
|
+
if (entry === undefined || !validEntry(entry)) return false;
|
|
21
|
+
const identifier = entry.id;
|
|
22
|
+
if (typeof identifier !== "string" || identifiers.has(identifier)) return false;
|
|
23
|
+
identifiers.add(identifier);
|
|
24
|
+
return true;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function validEntry(entry: Readonly<Record<string, unknown>>): boolean {
|
|
29
|
+
return (
|
|
30
|
+
hasExpectedEntryKeys(entry) &&
|
|
31
|
+
validEntryIdentity(entry) &&
|
|
32
|
+
validLimits(entry.limits) &&
|
|
33
|
+
validEntryMode(entry)
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function hasExpectedEntryKeys(entry: Readonly<Record<string, unknown>>): boolean {
|
|
38
|
+
return (
|
|
39
|
+
Object.keys(entry).every((key) => MAINTENANCE_REMINDER_ENTRY_KEYS.includes(key)) &&
|
|
40
|
+
["id", "baseCommit", "limits", "message"].every((key) => Object.hasOwn(entry, key))
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function validEntryIdentity(entry: Readonly<Record<string, unknown>>): boolean {
|
|
45
|
+
return (
|
|
46
|
+
isMaintenanceReminderId(entry.id) &&
|
|
47
|
+
isMaintenanceCommitId(entry.baseCommit) &&
|
|
48
|
+
typeof entry.message === "string" &&
|
|
49
|
+
entry.message.length > 0
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function validEntryMode(entry: Readonly<Record<string, unknown>>): boolean {
|
|
54
|
+
return !Object.hasOwn(entry, "mode") || entry.mode === "advisory" || entry.mode === "enforcing";
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function validGit(value: unknown): boolean {
|
|
58
|
+
const git = exactRecord(value, MAINTENANCE_REMINDER_GIT_KEYS);
|
|
59
|
+
return git !== undefined && typeof git.executable === "string" && git.executable.length > 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function validLimits(value: unknown): boolean {
|
|
63
|
+
const limits = snapshotClosedRecord(value);
|
|
64
|
+
if (limits === undefined) return false;
|
|
65
|
+
const keys = Object.keys(limits);
|
|
66
|
+
return (
|
|
67
|
+
keys.length > 0 &&
|
|
68
|
+
keys.every((key) => MAINTENANCE_REMINDER_LIMIT_KEYS.includes(key)) &&
|
|
69
|
+
(!Object.hasOwn(limits, "commits") || positiveSafeInteger(limits.commits)) &&
|
|
70
|
+
(!Object.hasOwn(limits, "changedLines") || positiveSafeInteger(limits.changedLines))
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function exactRecord(
|
|
75
|
+
value: unknown,
|
|
76
|
+
keys: readonly string[]
|
|
77
|
+
): Readonly<Record<string, unknown>> | undefined {
|
|
78
|
+
const record = snapshotClosedRecord(value);
|
|
79
|
+
return record !== undefined &&
|
|
80
|
+
Object.keys(record).length === keys.length &&
|
|
81
|
+
keys.every((key) => Object.hasOwn(record, key))
|
|
82
|
+
? record
|
|
83
|
+
: undefined;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function positiveSafeInteger(value: unknown): value is number {
|
|
87
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value > 0;
|
|
88
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineCheck, type TypedCheckWithOptions } from "../../check/check.ts";
|
|
2
|
+
import {
|
|
3
|
+
MARKDOWN_LINK_VALIDATION_CHECK_DEFINITION,
|
|
4
|
+
executeMarkdownLinkValidation
|
|
5
|
+
} from "./execution.ts";
|
|
6
|
+
import { parseMarkdownLinkValidationData } from "./final-data.ts";
|
|
7
|
+
import type {
|
|
8
|
+
MarkdownLinkValidationOptions,
|
|
9
|
+
ResolvedMarkdownLinkValidationOptions
|
|
10
|
+
} from "./options.ts";
|
|
11
|
+
import { resolveMarkdownLinkValidationOptions } from "./options-resolution.ts";
|
|
12
|
+
import { validMarkdownLinkValidationOptions } from "./options-validation.ts";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 使用可省略的 source、target 与 work-limit policy 构造离线 Markdown 引用 Check。
|
|
16
|
+
*
|
|
17
|
+
* @param options - 省略字段由 package 补齐;files 数组是完整替换值,limits fields 可分别省略。
|
|
18
|
+
* @returns 固定 `markdown-link-validation` identity、完整冻结 options、parser 与执行逻辑。
|
|
19
|
+
* @throws {TypeError} input 含未知字段、非法 target policy 或非法 work limit 时抛出。
|
|
20
|
+
* @example 离线 Markdown 本地链接完整性
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { defineConfig, markdownLinkValidation, run } from "@zxyycom/vibe-check";
|
|
23
|
+
*
|
|
24
|
+
* const definition = defineConfig({
|
|
25
|
+
* checks: [markdownLinkValidation()],
|
|
26
|
+
* outputs: {
|
|
27
|
+
* diagnosticLogging: { enabled: false },
|
|
28
|
+
* machinePublication: { enabled: false },
|
|
29
|
+
* progressRendering: { enabled: false }
|
|
30
|
+
* }
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* const result = await run(definition);
|
|
34
|
+
* if (result.kind !== "completed") throw new Error(`Run did not complete: ${result.kind}`);
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export function markdownLinkValidation(
|
|
38
|
+
options: MarkdownLinkValidationOptions = {}
|
|
39
|
+
): TypedCheckWithOptions<
|
|
40
|
+
"markdown-link-validation",
|
|
41
|
+
ResolvedMarkdownLinkValidationOptions,
|
|
42
|
+
typeof parseMarkdownLinkValidationData
|
|
43
|
+
> {
|
|
44
|
+
const resolvedOptions = resolveMarkdownLinkValidationOptions(options);
|
|
45
|
+
if (resolvedOptions === undefined) {
|
|
46
|
+
throw new TypeError("markdownLinkValidation options must match the documented closed policy");
|
|
47
|
+
}
|
|
48
|
+
return defineCheck({
|
|
49
|
+
...MARKDOWN_LINK_VALIDATION_CHECK_DEFINITION,
|
|
50
|
+
execution: executeMarkdownLinkValidation,
|
|
51
|
+
parseData: parseMarkdownLinkValidationData,
|
|
52
|
+
preflight: (preparedOptions) =>
|
|
53
|
+
validMarkdownLinkValidationOptions(preparedOptions)
|
|
54
|
+
? { status: "success", preparedOptions }
|
|
55
|
+
: {
|
|
56
|
+
status: "failure",
|
|
57
|
+
action: "block",
|
|
58
|
+
reason: { code: "invalid-options" },
|
|
59
|
+
messages: [
|
|
60
|
+
{
|
|
61
|
+
code: "invalid-options",
|
|
62
|
+
level: "error",
|
|
63
|
+
message:
|
|
64
|
+
"markdownLinkValidation options are invalid; recreate the Check with markdownLinkValidation(options) or restore its complete resolved options."
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
options: resolvedOptions
|
|
69
|
+
});
|
|
70
|
+
}
|