@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,199 @@
|
|
|
1
|
+
/** Project-root file discovery and selection helpers. */
|
|
2
|
+
|
|
3
|
+
import { lstatSync } from "node:fs";
|
|
4
|
+
import { resolve } from "node:path";
|
|
5
|
+
|
|
6
|
+
import { matchesAnyConfigGlob } from "./config-glob.ts";
|
|
7
|
+
import { collectSubmoduleWorktreeFiles } from "./revision-worktree-files.ts";
|
|
8
|
+
import { errorMessage } from "../host-environment/error-message.ts";
|
|
9
|
+
import { processFailed } from "../host-environment/process/command.ts";
|
|
10
|
+
import { runGit, splitNulDelimitedGitFileList } from "../host-environment/git.ts";
|
|
11
|
+
import { toSlashPath } from "../host-environment/path.ts";
|
|
12
|
+
import { walkFiles } from "../host-environment/filesystem.ts";
|
|
13
|
+
import type { ProjectFileSelection, ProjectFileSource } from "./configuration.ts";
|
|
14
|
+
|
|
15
|
+
type NamedProjectFileSelection = Readonly<{
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly selection: ProjectFileSelection;
|
|
18
|
+
}>;
|
|
19
|
+
|
|
20
|
+
const CONFIG_GLOB_MAGIC = /[\\*?[\]{}()!+@]/u;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Resolves multiple named file sets while enumerating each distinct candidate source once.
|
|
24
|
+
*/
|
|
25
|
+
export function collectProjectFileSets(
|
|
26
|
+
rootDir: string,
|
|
27
|
+
selections: Readonly<Record<string, ProjectFileSelection>>
|
|
28
|
+
): ReadonlyMap<string, readonly string[]> {
|
|
29
|
+
const bySource = groupSelectionsBySource(selections);
|
|
30
|
+
const selectedFiles = new Map<string, readonly string[]>();
|
|
31
|
+
|
|
32
|
+
for (const [source, sourceSelections] of bySource) {
|
|
33
|
+
const candidates = collectSourceCandidates(rootDir, source, sourceSelections);
|
|
34
|
+
for (const { id, selection } of sourceSelections) {
|
|
35
|
+
selectedFiles.set(id, Object.freeze(filterProjectFiles(candidates, selection)));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return selectedFiles;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function collectProjectFiles(rootDir: string, selection: ProjectFileSelection): string[] {
|
|
43
|
+
return [...requireProjectFileSet(collectProjectFileSets(rootDir, { selection }), "selection")];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** 返回已收集的命名文件集合;缺失表示收集完整性失效,不能解释为空集合。 */
|
|
47
|
+
export function requireProjectFileSet(
|
|
48
|
+
fileSets: ReadonlyMap<string, readonly string[]>,
|
|
49
|
+
selectionId: string
|
|
50
|
+
): readonly string[] {
|
|
51
|
+
const selectedFiles = fileSets.get(selectionId);
|
|
52
|
+
if (selectedFiles === undefined) {
|
|
53
|
+
throw new Error(`project file collection did not produce selection ${selectionId}`);
|
|
54
|
+
}
|
|
55
|
+
return selectedFiles;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function groupSelectionsBySource(
|
|
59
|
+
selections: Readonly<Record<string, ProjectFileSelection>>
|
|
60
|
+
): ReadonlyMap<ProjectFileSource, readonly NamedProjectFileSelection[]> {
|
|
61
|
+
const mutableGroups = new Map<ProjectFileSource, NamedProjectFileSelection[]>();
|
|
62
|
+
const entries = Object.entries(selections).sort(([left], [right]) => compareText(left, right));
|
|
63
|
+
|
|
64
|
+
for (const [id, selection] of entries) {
|
|
65
|
+
const group = mutableGroups.get(selection.source) ?? [];
|
|
66
|
+
group.push({ id, selection });
|
|
67
|
+
mutableGroups.set(selection.source, group);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return new Map(
|
|
71
|
+
[...mutableGroups].map(([source, group]) => [source, Object.freeze(group)] as const)
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function collectSourceCandidates(
|
|
76
|
+
rootDir: string,
|
|
77
|
+
source: ProjectFileSource,
|
|
78
|
+
selections: readonly NamedProjectFileSelection[]
|
|
79
|
+
): readonly string[] {
|
|
80
|
+
switch (source) {
|
|
81
|
+
case "filesystem":
|
|
82
|
+
return uniqueSorted(
|
|
83
|
+
walkFiles({
|
|
84
|
+
ignoredDirs: commonExcludedDirectoryNames(selections),
|
|
85
|
+
rootDir
|
|
86
|
+
}).map(toSlashPath)
|
|
87
|
+
);
|
|
88
|
+
case "git-worktree":
|
|
89
|
+
return collectGitWorktreeCandidates(rootDir, selections);
|
|
90
|
+
default: {
|
|
91
|
+
const unsupportedSource: never = source;
|
|
92
|
+
throw new TypeError(`unsupported project file source: ${String(unsupportedSource)}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function collectGitWorktreeCandidates(
|
|
98
|
+
rootDir: string,
|
|
99
|
+
selections: readonly NamedProjectFileSelection[]
|
|
100
|
+
): readonly string[] {
|
|
101
|
+
const result = runGit({
|
|
102
|
+
args: ["ls-files", "-z", "--cached", "--others", "--exclude-standard", "--"],
|
|
103
|
+
cwd: rootDir
|
|
104
|
+
});
|
|
105
|
+
if (processFailed(result)) {
|
|
106
|
+
const detail =
|
|
107
|
+
result.stderr.trim() ||
|
|
108
|
+
result.error?.message ||
|
|
109
|
+
(result.signal === null ? `exit status ${result.status}` : `signal ${result.signal}`);
|
|
110
|
+
throw new Error(`could not enumerate git-worktree files in ${rootDir}: ${detail}`);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const include = uniqueSorted(selections.flatMap(({ selection }) => [...selection.include]));
|
|
114
|
+
return uniqueSorted(
|
|
115
|
+
[
|
|
116
|
+
...splitNulDelimitedGitFileList(result.stdout),
|
|
117
|
+
...collectSubmoduleWorktreeFiles({ repository: rootDir, scanInputPaths: include })
|
|
118
|
+
]
|
|
119
|
+
.map(toSlashPath)
|
|
120
|
+
.filter((filePath) => isGitWorktreeFile({ filePath, rootDir }))
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function isGitWorktreeFile({
|
|
125
|
+
filePath,
|
|
126
|
+
rootDir
|
|
127
|
+
}: Readonly<{ readonly filePath: string; readonly rootDir: string }>): boolean {
|
|
128
|
+
try {
|
|
129
|
+
const stats = lstatSync(resolve(rootDir, filePath));
|
|
130
|
+
return stats.isFile() || stats.isSymbolicLink();
|
|
131
|
+
} catch (error: unknown) {
|
|
132
|
+
if (missingPath(error)) return false;
|
|
133
|
+
throw new Error(
|
|
134
|
+
`could not inspect git-worktree candidate ${filePath} in ${rootDir}: ${errorMessage(error)}`,
|
|
135
|
+
{ cause: error }
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function missingPath(error: unknown): boolean {
|
|
141
|
+
const code = error instanceof Error && "code" in error ? error.code : undefined;
|
|
142
|
+
return code === "ENOENT" || code === "ENOTDIR";
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function filterProjectFiles(
|
|
146
|
+
candidates: readonly string[],
|
|
147
|
+
selection: ProjectFileSelection
|
|
148
|
+
): string[] {
|
|
149
|
+
return uniqueSorted(candidates.filter((filePath) => isProjectFile(filePath, selection)));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function isProjectFile(filePath: string, selection: ProjectFileSelection): boolean {
|
|
153
|
+
const normalized = toSlashPath(filePath);
|
|
154
|
+
return (
|
|
155
|
+
matchesAnyConfigGlob(normalized, selection.include) &&
|
|
156
|
+
!matchesAnyConfigGlob(normalized, selection.exclude)
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Recognizes only whole-directory exclusions with one literal directory segment. The
|
|
162
|
+
* intersection is a traversal optimization; public semantics remain in `isProjectFile`.
|
|
163
|
+
*/
|
|
164
|
+
function commonExcludedDirectoryNames(
|
|
165
|
+
selections: readonly NamedProjectFileSelection[]
|
|
166
|
+
): readonly string[] {
|
|
167
|
+
let common: Set<string> | undefined;
|
|
168
|
+
for (const { selection } of selections) {
|
|
169
|
+
const names = new Set(selection.exclude.map(literalExcludedDirectoryName).filter(isString));
|
|
170
|
+
common =
|
|
171
|
+
common === undefined
|
|
172
|
+
? names
|
|
173
|
+
: new Set([...common].filter((directoryName) => names.has(directoryName)));
|
|
174
|
+
}
|
|
175
|
+
return common === undefined ? [] : [...common].sort();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function literalExcludedDirectoryName(configGlob: string): string | undefined {
|
|
179
|
+
const prefix = "**/";
|
|
180
|
+
const suffix = "/**";
|
|
181
|
+
if (!configGlob.startsWith(prefix) || !configGlob.endsWith(suffix)) return undefined;
|
|
182
|
+
const directoryName = configGlob.slice(prefix.length, -suffix.length);
|
|
183
|
+
if (directoryName.length === 0 || directoryName.includes("/")) return undefined;
|
|
184
|
+
return CONFIG_GLOB_MAGIC.test(directoryName) ? undefined : directoryName;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function isString(value: string | undefined): value is string {
|
|
188
|
+
return value !== undefined;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function uniqueSorted(files: readonly string[]): string[] {
|
|
192
|
+
return [...new Set(files)].sort(compareText);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function compareText(left: string, right: string): number {
|
|
196
|
+
if (left < right) return -1;
|
|
197
|
+
if (left > right) return 1;
|
|
198
|
+
return 0;
|
|
199
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { minimatch } from "minimatch";
|
|
2
|
+
|
|
3
|
+
import { toSlashPath } from "../host-environment/path.ts";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Product config glob 的唯一 matcher boundary。
|
|
7
|
+
* Candidate 使用 slash form;dot path 只由显式 glob 决定,不附加隐式忽略规则。
|
|
8
|
+
*/
|
|
9
|
+
export function matchesAnyConfigGlob(
|
|
10
|
+
candidatePath: string,
|
|
11
|
+
configGlobs: readonly string[]
|
|
12
|
+
): boolean {
|
|
13
|
+
const normalizedCandidatePath = toSlashPath(candidatePath);
|
|
14
|
+
return configGlobs.some((configGlob) =>
|
|
15
|
+
minimatch(normalizedCandidatePath, configGlob, { dot: true })
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import {
|
|
2
|
+
hasRequiredAndOptionalRecordKeys,
|
|
3
|
+
snapshotClosedArray,
|
|
4
|
+
snapshotClosedRecord
|
|
5
|
+
} from "../../data-boundary/closed-values.ts";
|
|
6
|
+
|
|
7
|
+
export const PROJECT_FILE_SOURCES = Object.freeze(["filesystem", "git-worktree"] as const);
|
|
8
|
+
|
|
9
|
+
/** 文件选择可使用的显式候选来源。 */
|
|
10
|
+
export type ProjectFileSource = (typeof PROJECT_FILE_SOURCES)[number];
|
|
11
|
+
|
|
12
|
+
/** 读取项目文件的 Check 所拥有的文件选择输入。 */
|
|
13
|
+
export interface ProjectFileSelectionOptions {
|
|
14
|
+
/** 候选文件来源;省略时使用 owning Check 的来源默认值,当前随包 Check 均为 `filesystem`。 */
|
|
15
|
+
readonly source?: ProjectFileSource;
|
|
16
|
+
/** 相对项目根目录且使用 `/` 的 glob;省略时使用 owning Check 的 include 默认值,显式数组完整替换。 */
|
|
17
|
+
readonly include?: readonly string[];
|
|
18
|
+
/** 优先于 `include` 的 glob;省略时使用 owning Check 的 exclude 默认值,显式数组完整替换。 */
|
|
19
|
+
readonly exclude?: readonly string[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Check execution 消费的完整项目文件选择。 */
|
|
23
|
+
export interface ProjectFileSelection {
|
|
24
|
+
readonly exclude: readonly string[];
|
|
25
|
+
readonly include: readonly string[];
|
|
26
|
+
readonly source: ProjectFileSource;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Package-provided Checks 共用的通用文件选择基线。
|
|
31
|
+
*
|
|
32
|
+
* 对象与数组均不可变;需要保留默认排除并追加项目规则时,使用对象与数组 spread 建立新值。
|
|
33
|
+
* 个别 Check 会从此 baseline 派生更精准的默认 include;显式组合此 value 仍表示通配全部路径。
|
|
34
|
+
*/
|
|
35
|
+
export const defaultProjectFileSelection: ProjectFileSelection = deepFreeze({
|
|
36
|
+
exclude: [
|
|
37
|
+
"**/.cache/**",
|
|
38
|
+
"**/.git",
|
|
39
|
+
"**/.git/**",
|
|
40
|
+
"**/.log/**",
|
|
41
|
+
"**/.pytest_cache/**",
|
|
42
|
+
"**/.tmp/**",
|
|
43
|
+
"**/.venv/**",
|
|
44
|
+
"**/.vibe-check/**",
|
|
45
|
+
"**/__pycache__/**",
|
|
46
|
+
"**/artifacts/**",
|
|
47
|
+
"**/build/**",
|
|
48
|
+
"**/coverage/**",
|
|
49
|
+
"**/dist/**",
|
|
50
|
+
"**/generated/**",
|
|
51
|
+
"**/*.generated.*",
|
|
52
|
+
"**/node_modules/**",
|
|
53
|
+
"**/target/**",
|
|
54
|
+
"**/tmp/**",
|
|
55
|
+
"**/vendor/**",
|
|
56
|
+
"**/venv/**"
|
|
57
|
+
],
|
|
58
|
+
include: ["**/*"],
|
|
59
|
+
source: "filesystem"
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/** 按 owning Check 提供的可信完整 defaults 解析并冻结一份 authoring selection。 */
|
|
63
|
+
export function resolveProjectFileSelection(
|
|
64
|
+
value: unknown,
|
|
65
|
+
defaults: ProjectFileSelection = defaultProjectFileSelection
|
|
66
|
+
): ProjectFileSelection | undefined {
|
|
67
|
+
const selection = snapshotClosedRecord(value);
|
|
68
|
+
if (
|
|
69
|
+
selection === undefined ||
|
|
70
|
+
!hasRequiredAndOptionalRecordKeys(selection, {
|
|
71
|
+
optional: ["exclude", "include", "source"],
|
|
72
|
+
required: []
|
|
73
|
+
})
|
|
74
|
+
) {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const exclude = resolveStringArray(selection.exclude, defaults.exclude);
|
|
79
|
+
const include = resolveStringArray(selection.include, defaults.include);
|
|
80
|
+
const source = selection.source ?? defaults.source;
|
|
81
|
+
if (exclude === undefined || include === undefined || !isProjectFileSource(source)) {
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return Object.freeze({ exclude, include, source });
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function snapshotDefaultProjectFileSelection(): ProjectFileSelection {
|
|
89
|
+
return snapshotProjectFileSelection(defaultProjectFileSelection);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** 为 owning Check 对可信的完整 selection 建立 detached、冻结快照。 */
|
|
93
|
+
export function snapshotProjectFileSelection(
|
|
94
|
+
selection: ProjectFileSelection
|
|
95
|
+
): ProjectFileSelection {
|
|
96
|
+
return Object.freeze({
|
|
97
|
+
exclude: Object.freeze([...selection.exclude]),
|
|
98
|
+
include: Object.freeze([...selection.include]),
|
|
99
|
+
source: selection.source
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function validProjectFileSelection(value: unknown): value is ProjectFileSelection {
|
|
104
|
+
const selection = exactRecord(value, ["exclude", "include", "source"]);
|
|
105
|
+
return (
|
|
106
|
+
selection !== undefined &&
|
|
107
|
+
validStringArray(selection.exclude) &&
|
|
108
|
+
validStringArray(selection.include) &&
|
|
109
|
+
isProjectFileSource(selection.source)
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function isProjectFileSource(value: unknown): value is ProjectFileSource {
|
|
114
|
+
return PROJECT_FILE_SOURCES.some((source) => source === value);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function resolveStringArray(
|
|
118
|
+
value: unknown,
|
|
119
|
+
fallback: readonly string[]
|
|
120
|
+
): readonly string[] | undefined {
|
|
121
|
+
if (value === undefined) return Object.freeze([...fallback]);
|
|
122
|
+
const items = snapshotClosedArray(value);
|
|
123
|
+
if (items === undefined || !items.every(isString)) return undefined;
|
|
124
|
+
return Object.freeze([...items]);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function validStringArray(value: unknown): boolean {
|
|
128
|
+
const items = snapshotClosedArray(value);
|
|
129
|
+
return items !== undefined && items.every(isString);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function isString(value: unknown): value is string {
|
|
133
|
+
return typeof value === "string";
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function exactRecord(
|
|
137
|
+
value: unknown,
|
|
138
|
+
keys: readonly string[]
|
|
139
|
+
): Readonly<Record<string, unknown>> | undefined {
|
|
140
|
+
const record = snapshotClosedRecord(value);
|
|
141
|
+
return record !== undefined &&
|
|
142
|
+
Object.keys(record).length === keys.length &&
|
|
143
|
+
keys.every((key) => Object.hasOwn(record, key))
|
|
144
|
+
? record
|
|
145
|
+
: undefined;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function deepFreeze<T>(value: T): T {
|
|
149
|
+
if (typeof value !== "object" || value === null || Object.isFrozen(value)) return value;
|
|
150
|
+
for (const nested of Object.values(value)) deepFreeze(nested);
|
|
151
|
+
return Object.freeze(value);
|
|
152
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type ExactInputMeasurement<T> = {
|
|
2
|
+
readonly payload: T;
|
|
3
|
+
readonly sourcePaths: readonly string[];
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export type ExactInputMeasurementAcceptance<T> =
|
|
7
|
+
| { readonly ok: true; readonly payloads: readonly T[] }
|
|
8
|
+
| { readonly error: string; readonly ok: false };
|
|
9
|
+
|
|
10
|
+
export function acceptExactInputMeasurements<T>(
|
|
11
|
+
measurements: readonly ExactInputMeasurement<T>[],
|
|
12
|
+
approvedExactPaths: readonly string[]
|
|
13
|
+
): ExactInputMeasurementAcceptance<T> {
|
|
14
|
+
const approvedPathSet = new Set(approvedExactPaths);
|
|
15
|
+
|
|
16
|
+
for (const [index, measurement] of measurements.entries()) {
|
|
17
|
+
if (measurement.sourcePaths.length === 0) {
|
|
18
|
+
return {
|
|
19
|
+
error: `scanner measurement #${index + 1} did not declare a source path`,
|
|
20
|
+
ok: false
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
for (const sourcePath of measurement.sourcePaths) {
|
|
25
|
+
if (!approvedPathSet.has(sourcePath)) {
|
|
26
|
+
return {
|
|
27
|
+
error: `scanner measurement #${index + 1} references unapproved input path ${JSON.stringify(sourcePath)}`,
|
|
28
|
+
ok: false
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
ok: true,
|
|
36
|
+
payloads: measurements.map((measurement) => measurement.payload)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
|
|
5
|
+
export interface FileInputFingerprint {
|
|
6
|
+
readonly fileCount: number;
|
|
7
|
+
readonly fileList: readonly string[];
|
|
8
|
+
readonly fingerprint: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Fingerprints one exact path set from stable path order and normalized current file content. */
|
|
12
|
+
export function fingerprintProjectFiles(
|
|
13
|
+
rootDir: string,
|
|
14
|
+
paths: readonly string[]
|
|
15
|
+
): FileInputFingerprint {
|
|
16
|
+
const sortedPaths = [...paths].sort(compareText);
|
|
17
|
+
const inputDigest = createHash("sha256");
|
|
18
|
+
|
|
19
|
+
for (const path of sortedPaths) {
|
|
20
|
+
inputDigest.update(path, "utf8");
|
|
21
|
+
inputDigest.update("\0");
|
|
22
|
+
inputDigest.update(fileContentFingerprint(rootDir, path), "utf8");
|
|
23
|
+
inputDigest.update("\n");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return Object.freeze({
|
|
27
|
+
fileCount: sortedPaths.length,
|
|
28
|
+
fileList: Object.freeze(sortedPaths.slice(0, 200)),
|
|
29
|
+
fingerprint: `sha256:${inputDigest.digest("hex")}:${sortedPaths.length}`
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function fileContentFingerprint(rootDir: string, path: string): string {
|
|
34
|
+
try {
|
|
35
|
+
const content = readFileSync(resolve(rootDir, path), "utf8").replace(/\r\n?/g, "\n");
|
|
36
|
+
return createHash("sha256").update(content).digest("hex");
|
|
37
|
+
} catch {
|
|
38
|
+
return "file-not-readable";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function compareText(left: string, right: string): number {
|
|
43
|
+
if (left < right) return -1;
|
|
44
|
+
if (left > right) return 1;
|
|
45
|
+
return 0;
|
|
46
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/** Reads canonical gitlink entries from a named Git tree revision. */
|
|
2
|
+
|
|
3
|
+
import { processFailed } from "../host-environment/process/command.ts";
|
|
4
|
+
import { runGit } from "../host-environment/git.ts";
|
|
5
|
+
import { toSlashPath } from "../host-environment/path.ts";
|
|
6
|
+
|
|
7
|
+
export type Gitlink = Readonly<{
|
|
8
|
+
readonly path: string;
|
|
9
|
+
readonly sha: string;
|
|
10
|
+
}>;
|
|
11
|
+
|
|
12
|
+
export function gitlinksAtRevision({
|
|
13
|
+
repository,
|
|
14
|
+
revision
|
|
15
|
+
}: Readonly<{
|
|
16
|
+
readonly repository: string;
|
|
17
|
+
readonly revision: string;
|
|
18
|
+
}>): readonly Gitlink[] {
|
|
19
|
+
const result = runGit({
|
|
20
|
+
args: ["ls-tree", "-r", "-z", revision],
|
|
21
|
+
cwd: repository
|
|
22
|
+
});
|
|
23
|
+
if (processFailed(result)) {
|
|
24
|
+
const detail =
|
|
25
|
+
result.stderr.trim() ||
|
|
26
|
+
result.error?.message ||
|
|
27
|
+
(result.signal === null ? `exit status ${result.status}` : `signal ${result.signal}`);
|
|
28
|
+
throw new Error(`could not inspect gitlinks at ${revision} in ${repository}: ${detail}`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const gitlinks: Gitlink[] = [];
|
|
32
|
+
for (const entry of result.stdout.split("\0")) {
|
|
33
|
+
if (!entry) continue;
|
|
34
|
+
const gitlink = parseGitlinkEntry({ entry, repository, revision });
|
|
35
|
+
if (gitlink !== null) gitlinks.push(gitlink);
|
|
36
|
+
}
|
|
37
|
+
return Object.freeze(gitlinks);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function parseGitlinkEntry({
|
|
41
|
+
entry,
|
|
42
|
+
repository,
|
|
43
|
+
revision
|
|
44
|
+
}: Readonly<{
|
|
45
|
+
readonly entry: string;
|
|
46
|
+
readonly repository: string;
|
|
47
|
+
readonly revision: string;
|
|
48
|
+
}>): Gitlink | null {
|
|
49
|
+
const parsed = gitTreeEntryParts(entry);
|
|
50
|
+
if (parsed === undefined) throw invalidTreeOutput(revision, repository);
|
|
51
|
+
const [mode, type, sha] = parsed.metadata;
|
|
52
|
+
if (!validGitTreeMetadata(mode, type, sha)) throw invalidTreeOutput(revision, repository);
|
|
53
|
+
if (mode !== "160000") return null;
|
|
54
|
+
if (type !== "commit") {
|
|
55
|
+
throw new Error(`invalid gitlink output at ${revision} in ${repository}`);
|
|
56
|
+
}
|
|
57
|
+
return Object.freeze({ path: toSlashPath(parsed.path), sha });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function gitTreeEntryParts(entry: string): { metadata: string[]; path: string } | undefined {
|
|
61
|
+
const separator = entry.indexOf("\t");
|
|
62
|
+
if (separator < 0) return undefined;
|
|
63
|
+
const metadata = entry.slice(0, separator).split(/\s+/u);
|
|
64
|
+
const path = entry.slice(separator + 1);
|
|
65
|
+
return metadata.length === 3 && path.length > 0 ? { metadata, path } : undefined;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function validGitTreeMetadata(
|
|
69
|
+
mode: string | undefined,
|
|
70
|
+
type: string | undefined,
|
|
71
|
+
sha: string | undefined
|
|
72
|
+
): sha is string {
|
|
73
|
+
return mode !== undefined && type !== undefined && sha !== undefined && isFullGitObjectId(sha);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function invalidTreeOutput(revision: string, repository: string): Error {
|
|
77
|
+
return new Error(`invalid git tree output at ${revision} in ${repository}`);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function isFullGitObjectId(value: string): boolean {
|
|
81
|
+
return /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/u.test(value);
|
|
82
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/** Canonical Git worktree checks for gitlink traversal. */
|
|
2
|
+
|
|
3
|
+
import { realpathSync, statSync } from "node:fs";
|
|
4
|
+
import { resolve } from "node:path";
|
|
5
|
+
|
|
6
|
+
import { errorMessage } from "../host-environment/error-message.ts";
|
|
7
|
+
import { processFailed } from "../host-environment/process/command.ts";
|
|
8
|
+
import { runGit } from "../host-environment/git.ts";
|
|
9
|
+
|
|
10
|
+
export type GitlinkWorktreeInspection =
|
|
11
|
+
| { readonly kind: "initialized"; readonly repository: string }
|
|
12
|
+
| { readonly kind: "inspection-failed"; readonly error: string }
|
|
13
|
+
| { readonly kind: "missing" }
|
|
14
|
+
| { readonly kind: "not-independent" };
|
|
15
|
+
|
|
16
|
+
export function canonicalRepositoryPath(repository: string): string {
|
|
17
|
+
return realpathSync(resolve(repository));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function inspectGitlinkWorktree({
|
|
21
|
+
gitlinkPath,
|
|
22
|
+
repository
|
|
23
|
+
}: Readonly<{
|
|
24
|
+
readonly gitlinkPath: string;
|
|
25
|
+
readonly repository: string;
|
|
26
|
+
}>): GitlinkWorktreeInspection {
|
|
27
|
+
const submoduleRepository = resolve(repository, gitlinkPath);
|
|
28
|
+
let canonicalSubmoduleRepository: string;
|
|
29
|
+
try {
|
|
30
|
+
if (!statSync(submoduleRepository).isDirectory()) return { kind: "missing" };
|
|
31
|
+
canonicalSubmoduleRepository = canonicalRepositoryPath(submoduleRepository);
|
|
32
|
+
} catch (error: unknown) {
|
|
33
|
+
return missingPath(error)
|
|
34
|
+
? { kind: "missing" }
|
|
35
|
+
: inspectionFailure(`could not inspect submodule worktree ${gitlinkPath}`, error);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const topLevelResult = runGit({
|
|
39
|
+
args: ["rev-parse", "--show-toplevel"],
|
|
40
|
+
cwd: canonicalSubmoduleRepository
|
|
41
|
+
});
|
|
42
|
+
if (processFailed(topLevelResult)) {
|
|
43
|
+
const topLevelFailureDetail =
|
|
44
|
+
topLevelResult.error?.message ||
|
|
45
|
+
topLevelResult.stderr.trim() ||
|
|
46
|
+
`exit ${topLevelResult.status}`;
|
|
47
|
+
return {
|
|
48
|
+
kind: "inspection-failed",
|
|
49
|
+
error: `git rev-parse --show-toplevel failed while inspecting submodule ${gitlinkPath}: ${topLevelFailureDetail}`
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const topLevel = topLevelResult.stdout.trim();
|
|
54
|
+
if (!topLevel) {
|
|
55
|
+
return {
|
|
56
|
+
kind: "inspection-failed",
|
|
57
|
+
error: `git rev-parse --show-toplevel returned no repository path for submodule ${gitlinkPath}`
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
try {
|
|
62
|
+
return canonicalRepositoryPath(resolve(canonicalSubmoduleRepository, topLevel)) ===
|
|
63
|
+
canonicalSubmoduleRepository
|
|
64
|
+
? { kind: "initialized", repository: canonicalSubmoduleRepository }
|
|
65
|
+
: { kind: "not-independent" };
|
|
66
|
+
} catch (error: unknown) {
|
|
67
|
+
return inspectionFailure(`could not resolve Git top-level for submodule ${gitlinkPath}`, error);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function resolveDescendableGitlinkRepository({
|
|
72
|
+
gitlinkPath,
|
|
73
|
+
repository,
|
|
74
|
+
visitedRepositories
|
|
75
|
+
}: Readonly<{
|
|
76
|
+
readonly gitlinkPath: string;
|
|
77
|
+
readonly repository: string;
|
|
78
|
+
readonly visitedRepositories: ReadonlySet<string>;
|
|
79
|
+
}>): string | null {
|
|
80
|
+
const inspection = inspectGitlinkWorktree({ gitlinkPath, repository });
|
|
81
|
+
if (inspection.kind === "inspection-failed") {
|
|
82
|
+
throw new Error(inspection.error);
|
|
83
|
+
}
|
|
84
|
+
return inspection.kind === "initialized" && !visitedRepositories.has(inspection.repository)
|
|
85
|
+
? inspection.repository
|
|
86
|
+
: null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function visitRepository({
|
|
90
|
+
repository,
|
|
91
|
+
visitedRepositories
|
|
92
|
+
}: Readonly<{
|
|
93
|
+
readonly repository: string;
|
|
94
|
+
readonly visitedRepositories: ReadonlySet<string>;
|
|
95
|
+
}>): ReadonlySet<string> {
|
|
96
|
+
return new Set([...visitedRepositories, repository]);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function missingPath(error: unknown): boolean {
|
|
100
|
+
const code = error instanceof Error && "code" in error ? error.code : undefined;
|
|
101
|
+
return code === "ENOENT" || code === "ENOTDIR";
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function inspectionFailure(message: string, error: unknown): GitlinkWorktreeInspection {
|
|
105
|
+
return { kind: "inspection-failed", error: `${message}: ${errorMessage(error)}` };
|
|
106
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** 一个 Check 对完整 selected path set 做 eligibility 分类后的结果。 */
|
|
2
|
+
export interface ProjectFileEligibilityPartition {
|
|
3
|
+
readonly acceptedPaths: readonly string[];
|
|
4
|
+
readonly rejectedPaths: readonly string[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/** 保持输入顺序,将每个 selected path 恰好分配给 accepted 或 rejected。 */
|
|
8
|
+
export function partitionProjectFilesByEligibility(
|
|
9
|
+
selectedPaths: readonly string[],
|
|
10
|
+
accepts: (path: string) => boolean
|
|
11
|
+
): ProjectFileEligibilityPartition {
|
|
12
|
+
const acceptedPaths: string[] = [];
|
|
13
|
+
const rejectedPaths: string[] = [];
|
|
14
|
+
for (const path of selectedPaths) {
|
|
15
|
+
(accepts(path) ? acceptedPaths : rejectedPaths).push(path);
|
|
16
|
+
}
|
|
17
|
+
return Object.freeze({
|
|
18
|
+
acceptedPaths: Object.freeze(acceptedPaths),
|
|
19
|
+
rejectedPaths: Object.freeze(rejectedPaths)
|
|
20
|
+
});
|
|
21
|
+
}
|